diff --git a/3rdparty/wxwidgets3.0-3.0.1/.pc/.quilt_patches b/3rdparty/wxwidgets3.0-3.0.1/.pc/.quilt_patches new file mode 100644 index 0000000000..6857a8d448 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/.pc/.quilt_patches @@ -0,0 +1 @@ +debian/patches diff --git a/3rdparty/wxwidgets3.0-3.0.1/.pc/.quilt_series b/3rdparty/wxwidgets3.0-3.0.1/.pc/.quilt_series new file mode 100644 index 0000000000..c2067066ab --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/.pc/.quilt_series @@ -0,0 +1 @@ +series diff --git a/3rdparty/wxwidgets3.0-3.0.1/.pc/.version b/3rdparty/wxwidgets3.0-3.0.1/.pc/.version new file mode 100644 index 0000000000..0cfbf08886 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/.pc/.version @@ -0,0 +1 @@ +2 diff --git a/3rdparty/wxwidgets3.0-3.0.1/.pc/applied-patches b/3rdparty/wxwidgets3.0-3.0.1/.pc/applied-patches new file mode 100644 index 0000000000..43e522223b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/.pc/applied-patches @@ -0,0 +1,2 @@ +wx-config-conditionalise-webview-in-std.patch +gcc4.9-workaround.patch diff --git a/3rdparty/wxwidgets3.0-3.0.1/.pc/gcc4.9-workaround.patch/include/wx/event.h b/3rdparty/wxwidgets3.0-3.0.1/.pc/gcc4.9-workaround.patch/include/wx/event.h new file mode 100644 index 0000000000..61ec19c5b3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/.pc/gcc4.9-workaround.patch/include/wx/event.h @@ -0,0 +1,4501 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/event.h +// Purpose: Event classes +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_EVENT_H_ +#define _WX_EVENT_H_ + +#include "wx/defs.h" +#include "wx/cpp.h" +#include "wx/object.h" +#include "wx/clntdata.h" + +#if wxUSE_GUI + #include "wx/gdicmn.h" + #include "wx/cursor.h" + #include "wx/mousestate.h" +#endif + +#include "wx/dynarray.h" +#include "wx/thread.h" +#include "wx/tracker.h" +#include "wx/typeinfo.h" +#include "wx/any.h" + +#ifdef wxHAS_EVENT_BIND + #include "wx/meta/convertible.h" +#endif + +// Currently VC6 and VC7 are known to not be able to compile CallAfter() code, +// so disable it for them. +#if !defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(8) + #include "wx/meta/removeref.h" + + #define wxHAS_CALL_AFTER +#endif + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxList; +class WXDLLIMPEXP_FWD_BASE wxEvent; +class WXDLLIMPEXP_FWD_BASE wxEventFilter; +#if wxUSE_GUI + class WXDLLIMPEXP_FWD_CORE wxDC; + class WXDLLIMPEXP_FWD_CORE wxMenu; + class WXDLLIMPEXP_FWD_CORE wxWindow; + class WXDLLIMPEXP_FWD_CORE wxWindowBase; +#endif // wxUSE_GUI + +// We operate with pointer to members of wxEvtHandler (such functions are used +// as event handlers in the event tables or as arguments to Connect()) but by +// default MSVC uses a restricted (but more efficient) representation of +// pointers to members which can't deal with multiple base classes. To avoid +// mysterious (as the compiler is not good enough to detect this and give a +// sensible error message) errors in the user code as soon as it defines +// classes inheriting from both wxEvtHandler (possibly indirectly, e.g. via +// wxWindow) and something else (including our own wxTrackable but not limited +// to it), we use the special MSVC keyword telling the compiler to use a more +// general pointer to member representation for the classes inheriting from +// wxEvtHandler. +#ifdef __VISUALC__ + #define wxMSVC_FWD_MULTIPLE_BASES __multiple_inheritance +#else + #define wxMSVC_FWD_MULTIPLE_BASES +#endif + +class WXDLLIMPEXP_FWD_BASE wxMSVC_FWD_MULTIPLE_BASES wxEvtHandler; +class wxEventConnectionRef; + +// ---------------------------------------------------------------------------- +// Event types +// ---------------------------------------------------------------------------- + +typedef int wxEventType; + +#define wxEVT_ANY ((wxEventType)-1) + +// this is used to make the event table entry type safe, so that for an event +// handler only a function with proper parameter list can be given. See also +// the wxEVENT_HANDLER_CAST-macro. +#define wxStaticCastEvent(type, val) static_cast(val) + +#define wxDECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \ + wxEventTableEntry(type, winid, idLast, wxNewEventTableFunctor(type, fn), obj) + +#define wxDECLARE_EVENT_TABLE_TERMINATOR() \ + wxEventTableEntry(wxEVT_NULL, 0, 0, 0, 0) + +// generate a new unique event type +extern WXDLLIMPEXP_BASE wxEventType wxNewEventType(); + +// define macros to create new event types: +#ifdef wxHAS_EVENT_BIND + // events are represented by an instance of wxEventTypeTag and the + // corresponding type must be specified for type-safety checks + + // define a new custom event type, can be used alone or after event + // declaration in the header using one of the macros below + #define wxDEFINE_EVENT( name, type ) \ + const wxEventTypeTag< type > name( wxNewEventType() ) + + // the general version allowing exporting the event type from DLL, used by + // wxWidgets itself + #define wxDECLARE_EXPORTED_EVENT( expdecl, name, type ) \ + extern const expdecl wxEventTypeTag< type > name + + // this is the version which will normally be used in the user code + #define wxDECLARE_EVENT( name, type ) \ + wxDECLARE_EXPORTED_EVENT( wxEMPTY_PARAMETER_VALUE, name, type ) + + + // these macros are only used internally for backwards compatibility and + // allow to define an alias for an existing event type (this is used by + // wxEVT_SPIN_XXX) + #define wxDEFINE_EVENT_ALIAS( name, type, value ) \ + const wxEventTypeTag< type > name( value ) + + #define wxDECLARE_EXPORTED_EVENT_ALIAS( expdecl, name, type ) \ + extern const expdecl wxEventTypeTag< type > name +#else // !wxHAS_EVENT_BIND + // the macros are the same ones as above but defined differently as we only + // use the integer event type values to identify events in this case + + #define wxDEFINE_EVENT( name, type ) \ + const wxEventType name( wxNewEventType() ) + + #define wxDECLARE_EXPORTED_EVENT( expdecl, name, type ) \ + extern const expdecl wxEventType name + #define wxDECLARE_EVENT( name, type ) \ + wxDECLARE_EXPORTED_EVENT( wxEMPTY_PARAMETER_VALUE, name, type ) + + #define wxDEFINE_EVENT_ALIAS( name, type, value ) \ + const wxEventType name = value + #define wxDECLARE_EXPORTED_EVENT_ALIAS( expdecl, name, type ) \ + extern const expdecl wxEventType name +#endif // wxHAS_EVENT_BIND/!wxHAS_EVENT_BIND + +// Try to cast the given event handler to the correct handler type: + +#define wxEVENT_HANDLER_CAST( functype, func ) \ + ( wxObjectEventFunction )( wxEventFunction )wxStaticCastEvent( functype, &func ) + + +#ifdef wxHAS_EVENT_BIND + +// The tag is a type associated to the event type (which is an integer itself, +// in spite of its name) value. It exists in order to be used as a template +// parameter and provide a mapping between the event type values and their +// corresponding wxEvent-derived classes. +template +class wxEventTypeTag +{ +public: + // The class of wxEvent-derived class carried by the events of this type. + typedef T EventClass; + + wxEventTypeTag(wxEventType type) { m_type = type; } + + // Return a wxEventType reference for the initialization of the static + // event tables. See wxEventTableEntry::m_eventType for a more thorough + // explanation. + operator const wxEventType&() const { return m_type; } + +private: + wxEventType m_type; +}; + +#endif // wxHAS_EVENT_BIND + +// These are needed for the functor definitions +typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&); + +// We had some trouble (specifically with eVC for ARM WinCE build) with using +// wxEventFunction in the past so we had introduced wxObjectEventFunction which +// used to be a typedef for a member of wxObject and not wxEvtHandler to work +// around this but as eVC is not really supported any longer we now only keep +// this for backwards compatibility and, despite its name, this is a typedef +// for wxEvtHandler member now -- but if we have the same problem with another +// compiler we can restore its old definition for it. +typedef wxEventFunction wxObjectEventFunction; + +// The event functor which is stored in the static and dynamic event tables: +class WXDLLIMPEXP_BASE wxEventFunctor +{ +public: + virtual ~wxEventFunctor(); + + // Invoke the actual event handler: + virtual void operator()(wxEvtHandler *, wxEvent&) = 0; + + // this function tests whether this functor is matched, for the purpose of + // finding it in an event table in Unbind(), by the given functor: + virtual bool IsMatching(const wxEventFunctor& functor) const = 0; + + // If the functor holds an wxEvtHandler, then get access to it and track + // its lifetime with wxEventConnectionRef: + virtual wxEvtHandler *GetEvtHandler() const + { return NULL; } + + // This is only used to maintain backward compatibility in + // wxAppConsoleBase::CallEventHandler and ensures that an overwritten + // wxAppConsoleBase::HandleEvent is still called for functors which hold an + // wxEventFunction: + virtual wxEventFunction GetEvtMethod() const + { return NULL; } + +private: + WX_DECLARE_ABSTRACT_TYPEINFO(wxEventFunctor) +}; + +// A plain method functor for the untyped legacy event types: +class WXDLLIMPEXP_BASE wxObjectEventFunctor : public wxEventFunctor +{ +public: + wxObjectEventFunctor(wxObjectEventFunction method, wxEvtHandler *handler) + : m_handler( handler ), m_method( method ) + { } + + virtual void operator()(wxEvtHandler *handler, wxEvent& event); + + virtual bool IsMatching(const wxEventFunctor& functor) const + { + if ( wxTypeId(functor) == wxTypeId(*this) ) + { + const wxObjectEventFunctor &other = + static_cast< const wxObjectEventFunctor & >( functor ); + + // FIXME-VC6: amazing but true: replacing "m_method == 0" here + // with "!m_method" makes VC6 crash with an ICE in DLL build (only!) + // Also notice that using "NULL" instead of "0" results in warnings + // about "using NULL in arithmetics" from arm-linux-androideabi-g++ + // 4.4.3 used for wxAndroid build. + + return ( m_method == other.m_method || other.m_method == 0 ) && + ( m_handler == other.m_handler || other.m_handler == NULL ); + } + else + return false; + } + + virtual wxEvtHandler *GetEvtHandler() const + { return m_handler; } + + virtual wxEventFunction GetEvtMethod() const + { return m_method; } + +private: + wxEvtHandler *m_handler; + wxEventFunction m_method; + + // Provide a dummy default ctor for type info purposes + wxObjectEventFunctor() { } + + WX_DECLARE_TYPEINFO_INLINE(wxObjectEventFunctor) +}; + +// Create a functor for the legacy events: used by Connect() +inline wxObjectEventFunctor * +wxNewEventFunctor(const wxEventType& WXUNUSED(evtType), + wxObjectEventFunction method, + wxEvtHandler *handler) +{ + return new wxObjectEventFunctor(method, handler); +} + +// This version is used by wxDECLARE_EVENT_TABLE_ENTRY() +inline wxObjectEventFunctor * +wxNewEventTableFunctor(const wxEventType& WXUNUSED(evtType), + wxObjectEventFunction method) +{ + return new wxObjectEventFunctor(method, NULL); +} + +inline wxObjectEventFunctor +wxMakeEventFunctor(const wxEventType& WXUNUSED(evtType), + wxObjectEventFunction method, + wxEvtHandler *handler) +{ + return wxObjectEventFunctor(method, handler); +} + +#ifdef wxHAS_EVENT_BIND + +namespace wxPrivate +{ + +// helper template defining nested "type" typedef as the event class +// corresponding to the given event type +template struct EventClassOf; + +// the typed events provide the information about the class of the events they +// carry themselves: +template +struct EventClassOf< wxEventTypeTag > +{ + typedef typename wxEventTypeTag::EventClass type; +}; + +// for the old untyped events we don't have information about the exact event +// class carried by them +template <> +struct EventClassOf +{ + typedef wxEvent type; +}; + + +// helper class defining operations different for method functors using an +// object of wxEvtHandler-derived class as handler and the others +template struct HandlerImpl; + +// specialization for handlers deriving from wxEvtHandler +template +struct HandlerImpl +{ + static bool IsEvtHandler() + { return true; } + static T *ConvertFromEvtHandler(wxEvtHandler *p) + { return static_cast(p); } + static wxEvtHandler *ConvertToEvtHandler(T *p) + { return p; } + static wxEventFunction ConvertToEvtMethod(void (T::*f)(A&)) + { return static_cast( + reinterpret_cast(f)); } +}; + +// specialization for handlers not deriving from wxEvtHandler +template +struct HandlerImpl +{ + static bool IsEvtHandler() + { return false; } + static T *ConvertFromEvtHandler(wxEvtHandler *) + { return NULL; } + static wxEvtHandler *ConvertToEvtHandler(T *) + { return NULL; } + static wxEventFunction ConvertToEvtMethod(void (T::*)(A&)) + { return NULL; } +}; + +} // namespace wxPrivate + +// functor forwarding the event to a method of the given object +// +// notice that the object class may be different from the class in which the +// method is defined but it must be convertible to this class +// +// also, the type of the handler parameter doesn't need to be exactly the same +// as EventTag::EventClass but it must be its base class -- this is explicitly +// allowed to handle different events in the same handler taking wxEvent&, for +// example +template + +class wxEventFunctorMethod + : public wxEventFunctor, + private wxPrivate::HandlerImpl + < + Class, + EventArg, + wxConvertibleTo::value != 0 + > +{ +private: + static void CheckHandlerArgument(EventArg *) { } + +public: + // the event class associated with the given event tag + typedef typename wxPrivate::EventClassOf::type EventClass; + + + wxEventFunctorMethod(void (Class::*method)(EventArg&), EventHandler *handler) + : m_handler( handler ), m_method( method ) + { + wxASSERT_MSG( handler || this->IsEvtHandler(), + "handlers defined in non-wxEvtHandler-derived classes " + "must be connected with a valid sink object" ); + + // if you get an error here it means that the signature of the handler + // you're trying to use is not compatible with (i.e. is not the same as + // or a base class of) the real event class used for this event type + CheckHandlerArgument(static_cast(NULL)); + } + + virtual void operator()(wxEvtHandler *handler, wxEvent& event) + { + Class * realHandler = m_handler; + if ( !realHandler ) + { + realHandler = this->ConvertFromEvtHandler(handler); + + // this is not supposed to happen but check for it nevertheless + wxCHECK_RET( realHandler, "invalid event handler" ); + } + + // the real (run-time) type of event is EventClass and we checked in + // the ctor that EventClass can be converted to EventArg, so this cast + // is always valid + (realHandler->*m_method)(static_cast(event)); + } + + virtual bool IsMatching(const wxEventFunctor& functor) const + { + if ( wxTypeId(functor) != wxTypeId(*this) ) + return false; + + typedef wxEventFunctorMethod + ThisFunctor; + + // the cast is valid because wxTypeId()s matched above + const ThisFunctor& other = static_cast(functor); + + return (m_method == other.m_method || other.m_method == NULL) && + (m_handler == other.m_handler || other.m_handler == NULL); + } + + virtual wxEvtHandler *GetEvtHandler() const + { return this->ConvertToEvtHandler(m_handler); } + + virtual wxEventFunction GetEvtMethod() const + { return this->ConvertToEvtMethod(m_method); } + +private: + EventHandler *m_handler; + void (Class::*m_method)(EventArg&); + + // Provide a dummy default ctor for type info purposes + wxEventFunctorMethod() { } + + typedef wxEventFunctorMethod thisClass; + WX_DECLARE_TYPEINFO_INLINE(thisClass) +}; + + +// functor forwarding the event to function (function, static method) +template +class wxEventFunctorFunction : public wxEventFunctor +{ +private: + static void CheckHandlerArgument(EventArg *) { } + +public: + // the event class associated with the given event tag + typedef typename wxPrivate::EventClassOf::type EventClass; + + wxEventFunctorFunction( void ( *handler )( EventArg & )) + : m_handler( handler ) + { + // if you get an error here it means that the signature of the handler + // you're trying to use is not compatible with (i.e. is not the same as + // or a base class of) the real event class used for this event type + CheckHandlerArgument(static_cast(NULL)); + } + + virtual void operator()(wxEvtHandler *WXUNUSED(handler), wxEvent& event) + { + // If you get an error here like "must use .* or ->* to call + // pointer-to-member function" then you probably tried to call + // Bind/Unbind with a method pointer but without a handler pointer or + // NULL as a handler e.g.: + // Unbind( wxEVT_XXX, &EventHandler::method ); + // or + // Unbind( wxEVT_XXX, &EventHandler::method, NULL ) + m_handler(static_cast(event)); + } + + virtual bool IsMatching(const wxEventFunctor &functor) const + { + if ( wxTypeId(functor) != wxTypeId(*this) ) + return false; + + typedef wxEventFunctorFunction ThisFunctor; + + const ThisFunctor& other = static_cast( functor ); + + return m_handler == other.m_handler; + } + +private: + void (*m_handler)(EventArg&); + + // Provide a dummy default ctor for type info purposes + wxEventFunctorFunction() { } + + typedef wxEventFunctorFunction thisClass; + WX_DECLARE_TYPEINFO_INLINE(thisClass) +}; + + +template +class wxEventFunctorFunctor : public wxEventFunctor +{ +public: + typedef typename EventTag::EventClass EventArg; + + wxEventFunctorFunctor(const Functor& handler) + : m_handler(handler), m_handlerAddr(&handler) + { } + + virtual void operator()(wxEvtHandler *WXUNUSED(handler), wxEvent& event) + { + // If you get an error here like "must use '.*' or '->*' to call + // pointer-to-member function" then you probably tried to call + // Bind/Unbind with a method pointer but without a handler pointer or + // NULL as a handler e.g.: + // Unbind( wxEVT_XXX, &EventHandler::method ); + // or + // Unbind( wxEVT_XXX, &EventHandler::method, NULL ) + m_handler(static_cast(event)); + } + + virtual bool IsMatching(const wxEventFunctor &functor) const + { + if ( wxTypeId(functor) != wxTypeId(*this) ) + return false; + + typedef wxEventFunctorFunctor FunctorThis; + + const FunctorThis& other = static_cast(functor); + + // The only reliable/portable way to compare two functors is by + // identity: + return m_handlerAddr == other.m_handlerAddr; + } + +private: + // Store a copy of the functor to prevent using/calling an already + // destroyed instance: + Functor m_handler; + + // Use the address of the original functor for comparison in IsMatching: + const void *m_handlerAddr; + + // Provide a dummy default ctor for type info purposes + wxEventFunctorFunctor() { } + + typedef wxEventFunctorFunctor thisClass; + WX_DECLARE_TYPEINFO_INLINE(thisClass) +}; + +// Create functors for the templatized events, either allocated on the heap for +// wxNewXXX() variants (this is needed in wxEvtHandler::Bind<>() to store them +// in dynamic event table) or just by returning them as temporary objects (this +// is enough for Unbind<>() and we avoid unnecessary heap allocation like this). + + +// Create functors wrapping functions: +template +inline wxEventFunctorFunction * +wxNewEventFunctor(const EventTag&, void (*func)(EventArg &)) +{ + return new wxEventFunctorFunction(func); +} + +template +inline wxEventFunctorFunction +wxMakeEventFunctor(const EventTag&, void (*func)(EventArg &)) +{ + return wxEventFunctorFunction(func); +} + +// Create functors wrapping other functors: +template +inline wxEventFunctorFunctor * +wxNewEventFunctor(const EventTag&, const Functor &func) +{ + return new wxEventFunctorFunctor(func); +} + +template +inline wxEventFunctorFunctor +wxMakeEventFunctor(const EventTag&, const Functor &func) +{ + return wxEventFunctorFunctor(func); +} + +// Create functors wrapping methods: +template + +inline wxEventFunctorMethod * +wxNewEventFunctor(const EventTag&, + void (Class::*method)(EventArg&), + EventHandler *handler) +{ + return new wxEventFunctorMethod( + method, handler); +} + +template + +inline wxEventFunctorMethod +wxMakeEventFunctor(const EventTag&, + void (Class::*method)(EventArg&), + EventHandler *handler) +{ + return wxEventFunctorMethod( + method, handler); +} + +// Create an event functor for the event table via wxDECLARE_EVENT_TABLE_ENTRY: +// in this case we don't have the handler (as it's always the same as the +// object which generated the event) so we must use Class as its type +template +inline wxEventFunctorMethod * +wxNewEventTableFunctor(const EventTag&, void (Class::*method)(EventArg&)) +{ + return new wxEventFunctorMethod( + method, NULL); +} + +#endif // wxHAS_EVENT_BIND + + +// many, but not all, standard event types + + // some generic events +extern WXDLLIMPEXP_BASE const wxEventType wxEVT_NULL; +extern WXDLLIMPEXP_BASE const wxEventType wxEVT_FIRST; +extern WXDLLIMPEXP_BASE const wxEventType wxEVT_USER_FIRST; + + // Need events declared to do this +class WXDLLIMPEXP_FWD_BASE wxIdleEvent; +class WXDLLIMPEXP_FWD_BASE wxThreadEvent; +class WXDLLIMPEXP_FWD_BASE wxAsyncMethodCallEvent; +class WXDLLIMPEXP_FWD_CORE wxCommandEvent; +class WXDLLIMPEXP_FWD_CORE wxMouseEvent; +class WXDLLIMPEXP_FWD_CORE wxFocusEvent; +class WXDLLIMPEXP_FWD_CORE wxChildFocusEvent; +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; +class WXDLLIMPEXP_FWD_CORE wxNavigationKeyEvent; +class WXDLLIMPEXP_FWD_CORE wxSetCursorEvent; +class WXDLLIMPEXP_FWD_CORE wxScrollEvent; +class WXDLLIMPEXP_FWD_CORE wxSpinEvent; +class WXDLLIMPEXP_FWD_CORE wxScrollWinEvent; +class WXDLLIMPEXP_FWD_CORE wxSizeEvent; +class WXDLLIMPEXP_FWD_CORE wxMoveEvent; +class WXDLLIMPEXP_FWD_CORE wxCloseEvent; +class WXDLLIMPEXP_FWD_CORE wxActivateEvent; +class WXDLLIMPEXP_FWD_CORE wxWindowCreateEvent; +class WXDLLIMPEXP_FWD_CORE wxWindowDestroyEvent; +class WXDLLIMPEXP_FWD_CORE wxShowEvent; +class WXDLLIMPEXP_FWD_CORE wxIconizeEvent; +class WXDLLIMPEXP_FWD_CORE wxMaximizeEvent; +class WXDLLIMPEXP_FWD_CORE wxMouseCaptureChangedEvent; +class WXDLLIMPEXP_FWD_CORE wxMouseCaptureLostEvent; +class WXDLLIMPEXP_FWD_CORE wxPaintEvent; +class WXDLLIMPEXP_FWD_CORE wxEraseEvent; +class WXDLLIMPEXP_FWD_CORE wxNcPaintEvent; +class WXDLLIMPEXP_FWD_CORE wxMenuEvent; +class WXDLLIMPEXP_FWD_CORE wxContextMenuEvent; +class WXDLLIMPEXP_FWD_CORE wxSysColourChangedEvent; +class WXDLLIMPEXP_FWD_CORE wxDisplayChangedEvent; +class WXDLLIMPEXP_FWD_CORE wxQueryNewPaletteEvent; +class WXDLLIMPEXP_FWD_CORE wxPaletteChangedEvent; +class WXDLLIMPEXP_FWD_CORE wxJoystickEvent; +class WXDLLIMPEXP_FWD_CORE wxDropFilesEvent; +class WXDLLIMPEXP_FWD_CORE wxInitDialogEvent; +class WXDLLIMPEXP_FWD_CORE wxUpdateUIEvent; +class WXDLLIMPEXP_FWD_CORE wxClipboardTextEvent; +class WXDLLIMPEXP_FWD_CORE wxHelpEvent; + + + // Command events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_BUTTON, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHECKBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHOICE, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LISTBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LISTBOX_DCLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHECKLISTBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SLIDER, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RADIOBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RADIOBUTTON, wxCommandEvent); + +// wxEVT_SCROLLBAR is deprecated, use wxEVT_SCROLL... events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLBAR, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_VLBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_RCLICKED, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_DROPDOWN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_ENTER, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX_DROPDOWN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX_CLOSEUP, wxCommandEvent); + + // Thread and asynchronous method call events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_THREAD, wxThreadEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_ASYNC_METHOD_CALL, wxAsyncMethodCallEvent); + + // Mouse event types +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_DOWN, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_UP, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MIDDLE_DOWN, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MIDDLE_UP, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RIGHT_DOWN, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RIGHT_UP, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOTION, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ENTER_WINDOW, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEAVE_WINDOW, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_DCLICK, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MIDDLE_DCLICK, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RIGHT_DCLICK, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SET_FOCUS, wxFocusEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_KILL_FOCUS, wxFocusEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHILD_FOCUS, wxChildFocusEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOUSEWHEEL, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX1_DOWN, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX1_UP, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX1_DCLICK, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_DOWN, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_UP, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_DCLICK, wxMouseEvent); + + // Character input event type +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHAR, wxKeyEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHAR_HOOK, wxKeyEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_NAVIGATION_KEY, wxNavigationKeyEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_KEY_DOWN, wxKeyEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_KEY_UP, wxKeyEvent); +#if wxUSE_HOTKEY +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HOTKEY, wxKeyEvent); +#endif +// This is a private event used by wxMSW code only and subject to change or +// disappear in the future. Don't use. +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AFTER_CHAR, wxKeyEvent); + + // Set cursor event +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SET_CURSOR, wxSetCursorEvent); + + // wxScrollBar and wxSlider event identifiers +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_TOP, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_BOTTOM, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_LINEUP, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_LINEDOWN, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_PAGEUP, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_PAGEDOWN, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_THUMBTRACK, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_THUMBRELEASE, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_CHANGED, wxScrollEvent); + +// Due to a bug in older wx versions, wxSpinEvents were being sent with type of +// wxEVT_SCROLL_LINEUP, wxEVT_SCROLL_LINEDOWN and wxEVT_SCROLL_THUMBTRACK. But +// with the type-safe events in place, these event types are associated with +// wxScrollEvent. To allow handling of spin events, new event types have been +// defined in spinbutt.h/spinnbuttcmn.cpp. To maintain backward compatibility +// the spin event types are being initialized with the scroll event types. + +#if wxUSE_SPINBTN + +wxDECLARE_EXPORTED_EVENT_ALIAS( WXDLLIMPEXP_CORE, wxEVT_SPIN_UP, wxSpinEvent ); +wxDECLARE_EXPORTED_EVENT_ALIAS( WXDLLIMPEXP_CORE, wxEVT_SPIN_DOWN, wxSpinEvent ); +wxDECLARE_EXPORTED_EVENT_ALIAS( WXDLLIMPEXP_CORE, wxEVT_SPIN, wxSpinEvent ); + +#endif + + // Scroll events from wxWindow +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_TOP, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_BOTTOM, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_LINEUP, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_LINEDOWN, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_PAGEUP, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_PAGEDOWN, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_THUMBTRACK, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_THUMBRELEASE, wxScrollWinEvent); + + // System events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SIZE, wxSizeEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVE, wxMoveEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CLOSE_WINDOW, wxCloseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_END_SESSION, wxCloseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_QUERY_END_SESSION, wxCloseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ACTIVATE_APP, wxActivateEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ACTIVATE, wxActivateEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CREATE, wxWindowCreateEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DESTROY, wxWindowDestroyEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SHOW, wxShowEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ICONIZE, wxIconizeEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MAXIMIZE, wxMaximizeEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOUSE_CAPTURE_CHANGED, wxMouseCaptureChangedEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_PAINT, wxPaintEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ERASE_BACKGROUND, wxEraseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_NC_PAINT, wxNcPaintEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU_OPEN, wxMenuEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU_CLOSE, wxMenuEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU_HIGHLIGHT, wxMenuEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CONTEXT_MENU, wxContextMenuEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SYS_COLOUR_CHANGED, wxSysColourChangedEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DISPLAY_CHANGED, wxDisplayChangedEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_QUERY_NEW_PALETTE, wxQueryNewPaletteEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_PALETTE_CHANGED, wxPaletteChangedEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_BUTTON_DOWN, wxJoystickEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_BUTTON_UP, wxJoystickEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_MOVE, wxJoystickEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_ZMOVE, wxJoystickEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DROP_FILES, wxDropFilesEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_INIT_DIALOG, wxInitDialogEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_IDLE, wxIdleEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_UPDATE_UI, wxUpdateUIEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SIZING, wxSizeEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVING, wxMoveEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVE_START, wxMoveEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVE_END, wxMoveEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HIBERNATE, wxActivateEvent); + + // Clipboard events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_COPY, wxClipboardTextEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_CUT, wxClipboardTextEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_PASTE, wxClipboardTextEvent); + + // Generic command events + // Note: a click is a higher-level event than button down/up +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LEFT_CLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LEFT_DCLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RIGHT_CLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RIGHT_DCLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SET_FOCUS, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_KILL_FOCUS, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_ENTER, wxCommandEvent); + + // Help events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HELP, wxHelpEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DETAILED_HELP, wxHelpEvent); + +// these 2 events are the same +#define wxEVT_TOOL wxEVT_MENU + +// ---------------------------------------------------------------------------- +// Compatibility +// ---------------------------------------------------------------------------- + +// this event is also used by wxComboBox and wxSpinCtrl which don't include +// wx/textctrl.h in all ports [yet], so declare it here as well +// +// still, any new code using it should include wx/textctrl.h explicitly +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT, wxCommandEvent); + + +// ---------------------------------------------------------------------------- +// wxEvent(-derived) classes +// ---------------------------------------------------------------------------- + +// the predefined constants for the number of times we propagate event +// upwards window child-parent chain +enum wxEventPropagation +{ + // don't propagate it at all + wxEVENT_PROPAGATE_NONE = 0, + + // propagate it until it is processed + wxEVENT_PROPAGATE_MAX = INT_MAX +}; + +// The different categories for a wxEvent; see wxEvent::GetEventCategory. +// NOTE: they are used as OR-combinable flags by wxEventLoopBase::YieldFor +enum wxEventCategory +{ + // this is the category for those events which are generated to update + // the appearance of the GUI but which (usually) do not comport data + // processing, i.e. which do not provide input or output data + // (e.g. size events, scroll events, etc). + // They are events NOT directly generated by the user's input devices. + wxEVT_CATEGORY_UI = 1, + + // this category groups those events which are generated directly from the + // user through input devices like mouse and keyboard and usually result in + // data to be processed from the application. + // (e.g. mouse clicks, key presses, etc) + wxEVT_CATEGORY_USER_INPUT = 2, + + // this category is for wxSocketEvent + wxEVT_CATEGORY_SOCKET = 4, + + // this category is for wxTimerEvent + wxEVT_CATEGORY_TIMER = 8, + + // this category is for any event used to send notifications from the + // secondary threads to the main one or in general for notifications among + // different threads (which may or may not be user-generated) + wxEVT_CATEGORY_THREAD = 16, + + + // implementation only + + // used in the implementations of wxEventLoopBase::YieldFor + wxEVT_CATEGORY_UNKNOWN = 32, + + // a special category used as an argument to wxEventLoopBase::YieldFor to indicate that + // Yield() should leave all wxEvents on the queue while emptying the native event queue + // (native events will be processed but the wxEvents they generate will be queued) + wxEVT_CATEGORY_CLIPBOARD = 64, + + + // shortcut masks + + // this category groups those events which are emitted in response to + // events of the native toolkit and which typically are not-"delayable". + wxEVT_CATEGORY_NATIVE_EVENTS = wxEVT_CATEGORY_UI|wxEVT_CATEGORY_USER_INPUT, + + // used in wxEventLoopBase::YieldFor to specify all event categories should be processed: + wxEVT_CATEGORY_ALL = + wxEVT_CATEGORY_UI|wxEVT_CATEGORY_USER_INPUT|wxEVT_CATEGORY_SOCKET| \ + wxEVT_CATEGORY_TIMER|wxEVT_CATEGORY_THREAD|wxEVT_CATEGORY_UNKNOWN| \ + wxEVT_CATEGORY_CLIPBOARD +}; + +/* + * wxWidgets events, covering all interesting things that might happen + * (button clicking, resizing, setting text in widgets, etc.). + * + * For each completely new event type, derive a new event class. + * An event CLASS represents a C++ class defining a range of similar event TYPES; + * examples are canvas events, panel item command events. + * An event TYPE is a unique identifier for a particular system event, + * such as a button press or a listbox deselection. + * + */ + +class WXDLLIMPEXP_BASE wxEvent : public wxObject +{ +public: + wxEvent(int winid = 0, wxEventType commandType = wxEVT_NULL ); + + void SetEventType(wxEventType typ) { m_eventType = typ; } + wxEventType GetEventType() const { return m_eventType; } + + wxObject *GetEventObject() const { return m_eventObject; } + void SetEventObject(wxObject *obj) { m_eventObject = obj; } + + long GetTimestamp() const { return m_timeStamp; } + void SetTimestamp(long ts = 0) { m_timeStamp = ts; } + + int GetId() const { return m_id; } + void SetId(int Id) { m_id = Id; } + + // Returns the user data optionally associated with the event handler when + // using Connect() or Bind(). + wxObject *GetEventUserData() const { return m_callbackUserData; } + + // Can instruct event processor that we wish to ignore this event + // (treat as if the event table entry had not been found): this must be done + // to allow the event processing by the base classes (calling event.Skip() + // is the analog of calling the base class version of a virtual function) + void Skip(bool skip = true) { m_skipped = skip; } + bool GetSkipped() const { return m_skipped; } + + // This function is used to create a copy of the event polymorphically and + // all derived classes must implement it because otherwise wxPostEvent() + // for them wouldn't work (it needs to do a copy of the event) + virtual wxEvent *Clone() const = 0; + + // this function is used to selectively process events in wxEventLoopBase::YieldFor + // NOTE: by default it returns wxEVT_CATEGORY_UI just because the major + // part of wxWidgets events belong to that category. + virtual wxEventCategory GetEventCategory() const + { return wxEVT_CATEGORY_UI; } + + // Implementation only: this test is explicitly anti OO and this function + // exists only for optimization purposes. + bool IsCommandEvent() const { return m_isCommandEvent; } + + // Determine if this event should be propagating to the parent window. + bool ShouldPropagate() const + { return m_propagationLevel != wxEVENT_PROPAGATE_NONE; } + + // Stop an event from propagating to its parent window, returns the old + // propagation level value + int StopPropagation() + { + int propagationLevel = m_propagationLevel; + m_propagationLevel = wxEVENT_PROPAGATE_NONE; + return propagationLevel; + } + + // Resume the event propagation by restoring the propagation level + // (returned by StopPropagation()) + void ResumePropagation(int propagationLevel) + { + m_propagationLevel = propagationLevel; + } + + // This method is for internal use only and allows to get the object that + // is propagating this event upwards the window hierarchy, if any. + wxEvtHandler* GetPropagatedFrom() const { return m_propagatedFrom; } + + // This is for internal use only and is only called by + // wxEvtHandler::ProcessEvent() to check whether it's the first time this + // event is being processed + bool WasProcessed() + { + if ( m_wasProcessed ) + return true; + + m_wasProcessed = true; + + return false; + } + + // This is for internal use only and is used for setting, testing and + // resetting of m_willBeProcessedAgain flag. + void SetWillBeProcessedAgain() + { + m_willBeProcessedAgain = true; + } + + bool WillBeProcessedAgain() + { + if ( m_willBeProcessedAgain ) + { + m_willBeProcessedAgain = false; + return true; + } + + return false; + } + + // This is also used only internally by ProcessEvent() to check if it + // should process the event normally or only restrict the search for the + // event handler to this object itself. + bool ShouldProcessOnlyIn(wxEvtHandler *h) const + { + return h == m_handlerToProcessOnlyIn; + } + + // Called to indicate that the result of ShouldProcessOnlyIn() wasn't taken + // into account. The existence of this function may seem counterintuitive + // but unfortunately it's needed by wxScrollHelperEvtHandler, see comments + // there. Don't even think of using this in your own code, this is a gross + // hack and is only needed because of wx complicated history and should + // never be used anywhere else. + void DidntHonourProcessOnlyIn() + { + m_handlerToProcessOnlyIn = NULL; + } + +protected: + wxObject* m_eventObject; + wxEventType m_eventType; + long m_timeStamp; + int m_id; + +public: + // m_callbackUserData is for internal usage only + wxObject* m_callbackUserData; + +private: + // If this handler + wxEvtHandler *m_handlerToProcessOnlyIn; + +protected: + // the propagation level: while it is positive, we propagate the event to + // the parent window (if any) + int m_propagationLevel; + + // The object that the event is being propagated from, initially NULL and + // only set by wxPropagateOnce. + wxEvtHandler* m_propagatedFrom; + + bool m_skipped; + bool m_isCommandEvent; + + // initially false but becomes true as soon as WasProcessed() is called for + // the first time, as this is done only by ProcessEvent() it explains the + // variable name: it becomes true after ProcessEvent() was called at least + // once for this event + bool m_wasProcessed; + + // This one is initially false too, but can be set to true to indicate that + // the event will be passed to another handler if it's not processed in + // this one. + bool m_willBeProcessedAgain; + +protected: + wxEvent(const wxEvent&); // for implementing Clone() + wxEvent& operator=(const wxEvent&); // for derived classes operator=() + +private: + // It needs to access our m_propagationLevel and m_propagatedFrom fields. + friend class WXDLLIMPEXP_FWD_BASE wxPropagateOnce; + + // and this one needs to access our m_handlerToProcessOnlyIn + friend class WXDLLIMPEXP_FWD_BASE wxEventProcessInHandlerOnly; + + + DECLARE_ABSTRACT_CLASS(wxEvent) +}; + +/* + * Helper class to temporarily change an event not to propagate. + */ +class WXDLLIMPEXP_BASE wxPropagationDisabler +{ +public: + wxPropagationDisabler(wxEvent& event) : m_event(event) + { + m_propagationLevelOld = m_event.StopPropagation(); + } + + ~wxPropagationDisabler() + { + m_event.ResumePropagation(m_propagationLevelOld); + } + +private: + wxEvent& m_event; + int m_propagationLevelOld; + + wxDECLARE_NO_COPY_CLASS(wxPropagationDisabler); +}; + +/* + * Helper used to indicate that an event is propagated upwards the window + * hierarchy by the given window. + */ +class WXDLLIMPEXP_BASE wxPropagateOnce +{ +public: + // The handler argument should normally be non-NULL to allow the parent + // event handler to know that it's being used to process an event coming + // from the child, it's only NULL by default for backwards compatibility. + wxPropagateOnce(wxEvent& event, wxEvtHandler* handler = NULL) + : m_event(event), + m_propagatedFromOld(event.m_propagatedFrom) + { + wxASSERT_MSG( m_event.m_propagationLevel > 0, + wxT("shouldn't be used unless ShouldPropagate()!") ); + + m_event.m_propagationLevel--; + m_event.m_propagatedFrom = handler; + } + + ~wxPropagateOnce() + { + m_event.m_propagatedFrom = m_propagatedFromOld; + m_event.m_propagationLevel++; + } + +private: + wxEvent& m_event; + wxEvtHandler* const m_propagatedFromOld; + + wxDECLARE_NO_COPY_CLASS(wxPropagateOnce); +}; + +// A helper object used to temporarily make wxEvent::ShouldProcessOnlyIn() +// return true for the handler passed to its ctor. +class wxEventProcessInHandlerOnly +{ +public: + wxEventProcessInHandlerOnly(wxEvent& event, wxEvtHandler *handler) + : m_event(event), + m_handlerToProcessOnlyInOld(event.m_handlerToProcessOnlyIn) + { + m_event.m_handlerToProcessOnlyIn = handler; + } + + ~wxEventProcessInHandlerOnly() + { + m_event.m_handlerToProcessOnlyIn = m_handlerToProcessOnlyInOld; + } + +private: + wxEvent& m_event; + wxEvtHandler * const m_handlerToProcessOnlyInOld; + + wxDECLARE_NO_COPY_CLASS(wxEventProcessInHandlerOnly); +}; + + +class WXDLLIMPEXP_BASE wxEventBasicPayloadMixin +{ +public: + wxEventBasicPayloadMixin() + : m_commandInt(0), + m_extraLong(0) + { + } + + void SetString(const wxString& s) { m_cmdString = s; } + const wxString& GetString() const { return m_cmdString; } + + void SetInt(int i) { m_commandInt = i; } + int GetInt() const { return m_commandInt; } + + void SetExtraLong(long extraLong) { m_extraLong = extraLong; } + long GetExtraLong() const { return m_extraLong; } + +protected: + // Note: these variables have "cmd" or "command" in their name for backward compatibility: + // they used to be part of wxCommandEvent, not this mixin. + wxString m_cmdString; // String event argument + int m_commandInt; + long m_extraLong; // Additional information (e.g. select/deselect) + + wxDECLARE_NO_ASSIGN_CLASS(wxEventBasicPayloadMixin); +}; + +class WXDLLIMPEXP_BASE wxEventAnyPayloadMixin : public wxEventBasicPayloadMixin +{ +public: + wxEventAnyPayloadMixin() : wxEventBasicPayloadMixin() {} + +#if wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7)) + template + void SetPayload(const T& payload) + { + m_payload = payload; + } + + template + T GetPayload() const + { + return m_payload.As(); + } + +protected: + wxAny m_payload; +#endif // wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7)) + + wxDECLARE_NO_ASSIGN_CLASS(wxEventBasicPayloadMixin); +}; + + +// Idle event +/* + wxEVT_IDLE + */ + +// Whether to always send idle events to windows, or +// to only send update events to those with the +// wxWS_EX_PROCESS_IDLE style. + +enum wxIdleMode +{ + // Send idle events to all windows + wxIDLE_PROCESS_ALL, + + // Send idle events to windows that have + // the wxWS_EX_PROCESS_IDLE flag specified + wxIDLE_PROCESS_SPECIFIED +}; + +class WXDLLIMPEXP_BASE wxIdleEvent : public wxEvent +{ +public: + wxIdleEvent() + : wxEvent(0, wxEVT_IDLE), + m_requestMore(false) + { } + wxIdleEvent(const wxIdleEvent& event) + : wxEvent(event), + m_requestMore(event.m_requestMore) + { } + + void RequestMore(bool needMore = true) { m_requestMore = needMore; } + bool MoreRequested() const { return m_requestMore; } + + virtual wxEvent *Clone() const { return new wxIdleEvent(*this); } + + // Specify how wxWidgets will send idle events: to + // all windows, or only to those which specify that they + // will process the events. + static void SetMode(wxIdleMode mode) { sm_idleMode = mode; } + + // Returns the idle event mode + static wxIdleMode GetMode() { return sm_idleMode; } + +protected: + bool m_requestMore; + static wxIdleMode sm_idleMode; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIdleEvent) +}; + + +// Thread event + +class WXDLLIMPEXP_BASE wxThreadEvent : public wxEvent, + public wxEventAnyPayloadMixin +{ +public: + wxThreadEvent(wxEventType eventType = wxEVT_THREAD, int id = wxID_ANY) + : wxEvent(id, eventType) + { } + + wxThreadEvent(const wxThreadEvent& event) + : wxEvent(event), + wxEventAnyPayloadMixin(event) + { + // make sure our string member (which uses COW, aka refcounting) is not + // shared by other wxString instances: + SetString(GetString().Clone()); + } + + virtual wxEvent *Clone() const + { + return new wxThreadEvent(*this); + } + + // this is important to avoid that calling wxEventLoopBase::YieldFor thread events + // gets processed when this is unwanted: + virtual wxEventCategory GetEventCategory() const + { return wxEVT_CATEGORY_THREAD; } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxThreadEvent) +}; + + +// Asynchronous method call events: these event are processed by wxEvtHandler +// itself and result in a call to its Execute() method which simply calls the +// specified method. The difference with a simple method call is that this is +// done asynchronously, i.e. at some later time, instead of immediately when +// the event object is constructed. + +#ifdef wxHAS_CALL_AFTER + +// This is a base class used to process all method calls. +class wxAsyncMethodCallEvent : public wxEvent +{ +public: + wxAsyncMethodCallEvent(wxObject* object) + : wxEvent(wxID_ANY, wxEVT_ASYNC_METHOD_CALL) + { + SetEventObject(object); + } + + wxAsyncMethodCallEvent(const wxAsyncMethodCallEvent& other) + : wxEvent(other) + { + } + + virtual void Execute() = 0; +}; + +// This is a version for calling methods without parameters. +template +class wxAsyncMethodCallEvent0 : public wxAsyncMethodCallEvent +{ +public: + typedef T ObjectType; + typedef void (ObjectType::*MethodType)(); + + wxAsyncMethodCallEvent0(ObjectType* object, + MethodType method) + : wxAsyncMethodCallEvent(object), + m_object(object), + m_method(method) + { + } + + wxAsyncMethodCallEvent0(const wxAsyncMethodCallEvent0& other) + : wxAsyncMethodCallEvent(other), + m_object(other.m_object), + m_method(other.m_method) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEvent0(*this); + } + + virtual void Execute() + { + (m_object->*m_method)(); + } + +private: + ObjectType* const m_object; + const MethodType m_method; +}; + +// This is a version for calling methods with a single parameter. +template +class wxAsyncMethodCallEvent1 : public wxAsyncMethodCallEvent +{ +public: + typedef T ObjectType; + typedef void (ObjectType::*MethodType)(T1 x1); + typedef typename wxRemoveRef::type ParamType1; + + wxAsyncMethodCallEvent1(ObjectType* object, + MethodType method, + const ParamType1& x1) + : wxAsyncMethodCallEvent(object), + m_object(object), + m_method(method), + m_param1(x1) + { + } + + wxAsyncMethodCallEvent1(const wxAsyncMethodCallEvent1& other) + : wxAsyncMethodCallEvent(other), + m_object(other.m_object), + m_method(other.m_method), + m_param1(other.m_param1) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEvent1(*this); + } + + virtual void Execute() + { + (m_object->*m_method)(m_param1); + } + +private: + ObjectType* const m_object; + const MethodType m_method; + const ParamType1 m_param1; +}; + +// This is a version for calling methods with two parameters. +template +class wxAsyncMethodCallEvent2 : public wxAsyncMethodCallEvent +{ +public: + typedef T ObjectType; + typedef void (ObjectType::*MethodType)(T1 x1, T2 x2); + typedef typename wxRemoveRef::type ParamType1; + typedef typename wxRemoveRef::type ParamType2; + + wxAsyncMethodCallEvent2(ObjectType* object, + MethodType method, + const ParamType1& x1, + const ParamType2& x2) + : wxAsyncMethodCallEvent(object), + m_object(object), + m_method(method), + m_param1(x1), + m_param2(x2) + { + } + + wxAsyncMethodCallEvent2(const wxAsyncMethodCallEvent2& other) + : wxAsyncMethodCallEvent(other), + m_object(other.m_object), + m_method(other.m_method), + m_param1(other.m_param1), + m_param2(other.m_param2) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEvent2(*this); + } + + virtual void Execute() + { + (m_object->*m_method)(m_param1, m_param2); + } + +private: + ObjectType* const m_object; + const MethodType m_method; + const ParamType1 m_param1; + const ParamType2 m_param2; +}; + +// This is a version for calling any functors +template +class wxAsyncMethodCallEventFunctor : public wxAsyncMethodCallEvent +{ +public: + typedef T FunctorType; + + wxAsyncMethodCallEventFunctor(wxObject *object, const FunctorType& fn) + : wxAsyncMethodCallEvent(object), + m_fn(fn) + { + } + + wxAsyncMethodCallEventFunctor(const wxAsyncMethodCallEventFunctor& other) + : wxAsyncMethodCallEvent(other), + m_fn(other.m_fn) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEventFunctor(*this); + } + + virtual void Execute() + { + m_fn(); + } + +private: + FunctorType m_fn; +}; + +#endif // wxHAS_CALL_AFTER + + +#if wxUSE_GUI + + +// Item or menu event class +/* + wxEVT_BUTTON + wxEVT_CHECKBOX + wxEVT_CHOICE + wxEVT_LISTBOX + wxEVT_LISTBOX_DCLICK + wxEVT_TEXT + wxEVT_TEXT_ENTER + wxEVT_MENU + wxEVT_SLIDER + wxEVT_RADIOBOX + wxEVT_RADIOBUTTON + wxEVT_SCROLLBAR + wxEVT_VLBOX + wxEVT_COMBOBOX + wxEVT_TOGGLEBUTTON +*/ + +class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent, + public wxEventBasicPayloadMixin +{ +public: + wxCommandEvent(wxEventType commandType = wxEVT_NULL, int winid = 0); + + wxCommandEvent(const wxCommandEvent& event) + : wxEvent(event), + wxEventBasicPayloadMixin(event), + m_clientData(event.m_clientData), + m_clientObject(event.m_clientObject) + { + // Because GetString() can retrieve the string text only on demand, we + // need to copy it explicitly. + if ( m_cmdString.empty() ) + m_cmdString = event.GetString(); + } + + // Set/Get client data from controls + void SetClientData(void* clientData) { m_clientData = clientData; } + void *GetClientData() const { return m_clientData; } + + // Set/Get client object from controls + void SetClientObject(wxClientData* clientObject) { m_clientObject = clientObject; } + wxClientData *GetClientObject() const { return m_clientObject; } + + // Note: this shadows wxEventBasicPayloadMixin::GetString(), because it does some + // GUI-specific hacks + wxString GetString() const; + + // Get listbox selection if single-choice + int GetSelection() const { return m_commandInt; } + + // Get checkbox value + bool IsChecked() const { return m_commandInt != 0; } + + // true if the listbox event was a selection. + bool IsSelection() const { return (m_extraLong != 0); } + + virtual wxEvent *Clone() const { return new wxCommandEvent(*this); } + virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_USER_INPUT; } + +protected: + void* m_clientData; // Arbitrary client data + wxClientData* m_clientObject; // Arbitrary client object + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCommandEvent) +}; + +// this class adds a possibility to react (from the user) code to a control +// notification: allow or veto the operation being reported. +class WXDLLIMPEXP_CORE wxNotifyEvent : public wxCommandEvent +{ +public: + wxNotifyEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) + : wxCommandEvent(commandType, winid) + { m_bAllow = true; } + + wxNotifyEvent(const wxNotifyEvent& event) + : wxCommandEvent(event) + { m_bAllow = event.m_bAllow; } + + // veto the operation (usually it's allowed by default) + void Veto() { m_bAllow = false; } + + // allow the operation if it was disabled by default + void Allow() { m_bAllow = true; } + + // for implementation code only: is the operation allowed? + bool IsAllowed() const { return m_bAllow; } + + virtual wxEvent *Clone() const { return new wxNotifyEvent(*this); } + +private: + bool m_bAllow; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNotifyEvent) +}; + + +// Scroll event class, derived form wxCommandEvent. wxScrollEvents are +// sent by wxSlider and wxScrollBar. +/* + wxEVT_SCROLL_TOP + wxEVT_SCROLL_BOTTOM + wxEVT_SCROLL_LINEUP + wxEVT_SCROLL_LINEDOWN + wxEVT_SCROLL_PAGEUP + wxEVT_SCROLL_PAGEDOWN + wxEVT_SCROLL_THUMBTRACK + wxEVT_SCROLL_THUMBRELEASE + wxEVT_SCROLL_CHANGED +*/ + +class WXDLLIMPEXP_CORE wxScrollEvent : public wxCommandEvent +{ +public: + wxScrollEvent(wxEventType commandType = wxEVT_NULL, + int winid = 0, int pos = 0, int orient = 0); + + int GetOrientation() const { return (int) m_extraLong; } + int GetPosition() const { return m_commandInt; } + void SetOrientation(int orient) { m_extraLong = (long) orient; } + void SetPosition(int pos) { m_commandInt = pos; } + + virtual wxEvent *Clone() const { return new wxScrollEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxScrollEvent) +}; + +// ScrollWin event class, derived fom wxEvent. wxScrollWinEvents +// are sent by wxWindow. +/* + wxEVT_SCROLLWIN_TOP + wxEVT_SCROLLWIN_BOTTOM + wxEVT_SCROLLWIN_LINEUP + wxEVT_SCROLLWIN_LINEDOWN + wxEVT_SCROLLWIN_PAGEUP + wxEVT_SCROLLWIN_PAGEDOWN + wxEVT_SCROLLWIN_THUMBTRACK + wxEVT_SCROLLWIN_THUMBRELEASE +*/ + +class WXDLLIMPEXP_CORE wxScrollWinEvent : public wxEvent +{ +public: + wxScrollWinEvent(wxEventType commandType = wxEVT_NULL, + int pos = 0, int orient = 0); + wxScrollWinEvent(const wxScrollWinEvent& event) : wxEvent(event) + { m_commandInt = event.m_commandInt; + m_extraLong = event.m_extraLong; } + + int GetOrientation() const { return (int) m_extraLong; } + int GetPosition() const { return m_commandInt; } + void SetOrientation(int orient) { m_extraLong = (long) orient; } + void SetPosition(int pos) { m_commandInt = pos; } + + virtual wxEvent *Clone() const { return new wxScrollWinEvent(*this); } + +protected: + int m_commandInt; + long m_extraLong; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxScrollWinEvent) +}; + + + +// Mouse event class + +/* + wxEVT_LEFT_DOWN + wxEVT_LEFT_UP + wxEVT_MIDDLE_DOWN + wxEVT_MIDDLE_UP + wxEVT_RIGHT_DOWN + wxEVT_RIGHT_UP + wxEVT_MOTION + wxEVT_ENTER_WINDOW + wxEVT_LEAVE_WINDOW + wxEVT_LEFT_DCLICK + wxEVT_MIDDLE_DCLICK + wxEVT_RIGHT_DCLICK +*/ + +enum wxMouseWheelAxis +{ + wxMOUSE_WHEEL_VERTICAL, + wxMOUSE_WHEEL_HORIZONTAL +}; + +class WXDLLIMPEXP_CORE wxMouseEvent : public wxEvent, + public wxMouseState +{ +public: + wxMouseEvent(wxEventType mouseType = wxEVT_NULL); + wxMouseEvent(const wxMouseEvent& event) + : wxEvent(event), + wxMouseState(event) + { + Assign(event); + } + + // Was it a button event? (*doesn't* mean: is any button *down*?) + bool IsButton() const { return Button(wxMOUSE_BTN_ANY); } + + // Was it a down event from this (or any) button? + bool ButtonDown(int but = wxMOUSE_BTN_ANY) const; + + // Was it a dclick event from this (or any) button? + bool ButtonDClick(int but = wxMOUSE_BTN_ANY) const; + + // Was it a up event from this (or any) button? + bool ButtonUp(int but = wxMOUSE_BTN_ANY) const; + + // Was this event generated by the given button? + bool Button(int but) const; + + // Get the button which is changing state (wxMOUSE_BTN_NONE if none) + int GetButton() const; + + // Find which event was just generated + bool LeftDown() const { return (m_eventType == wxEVT_LEFT_DOWN); } + bool MiddleDown() const { return (m_eventType == wxEVT_MIDDLE_DOWN); } + bool RightDown() const { return (m_eventType == wxEVT_RIGHT_DOWN); } + bool Aux1Down() const { return (m_eventType == wxEVT_AUX1_DOWN); } + bool Aux2Down() const { return (m_eventType == wxEVT_AUX2_DOWN); } + + bool LeftUp() const { return (m_eventType == wxEVT_LEFT_UP); } + bool MiddleUp() const { return (m_eventType == wxEVT_MIDDLE_UP); } + bool RightUp() const { return (m_eventType == wxEVT_RIGHT_UP); } + bool Aux1Up() const { return (m_eventType == wxEVT_AUX1_UP); } + bool Aux2Up() const { return (m_eventType == wxEVT_AUX2_UP); } + + bool LeftDClick() const { return (m_eventType == wxEVT_LEFT_DCLICK); } + bool MiddleDClick() const { return (m_eventType == wxEVT_MIDDLE_DCLICK); } + bool RightDClick() const { return (m_eventType == wxEVT_RIGHT_DCLICK); } + bool Aux1DClick() const { return (m_eventType == wxEVT_AUX1_DCLICK); } + bool Aux2DClick() const { return (m_eventType == wxEVT_AUX2_DCLICK); } + + // True if a button is down and the mouse is moving + bool Dragging() const + { + return (m_eventType == wxEVT_MOTION) && ButtonIsDown(wxMOUSE_BTN_ANY); + } + + // True if the mouse is moving, and no button is down + bool Moving() const + { + return (m_eventType == wxEVT_MOTION) && !ButtonIsDown(wxMOUSE_BTN_ANY); + } + + // True if the mouse is just entering the window + bool Entering() const { return (m_eventType == wxEVT_ENTER_WINDOW); } + + // True if the mouse is just leaving the window + bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); } + + // Returns the number of mouse clicks associated with this event. + int GetClickCount() const { return m_clickCount; } + + // Find the logical position of the event given the DC + wxPoint GetLogicalPosition(const wxDC& dc) const; + + // Get wheel rotation, positive or negative indicates direction of + // rotation. Current devices all send an event when rotation is equal to + // +/-WheelDelta, but this allows for finer resolution devices to be + // created in the future. Because of this you shouldn't assume that one + // event is equal to 1 line or whatever, but you should be able to either + // do partial line scrolling or wait until +/-WheelDelta rotation values + // have been accumulated before scrolling. + int GetWheelRotation() const { return m_wheelRotation; } + + // Get wheel delta, normally 120. This is the threshold for action to be + // taken, and one such action (for example, scrolling one increment) + // should occur for each delta. + int GetWheelDelta() const { return m_wheelDelta; } + + // Gets the axis the wheel operation concerns; wxMOUSE_WHEEL_VERTICAL + // (most common case) or wxMOUSE_WHEEL_HORIZONTAL (for horizontal scrolling + // using e.g. a trackpad). + wxMouseWheelAxis GetWheelAxis() const { return m_wheelAxis; } + + // Returns the configured number of lines (or whatever) to be scrolled per + // wheel action. Defaults to three. + int GetLinesPerAction() const { return m_linesPerAction; } + + // Returns the configured number of columns (or whatever) to be scrolled per + // wheel action. Defaults to three. + int GetColumnsPerAction() const { return m_columnsPerAction; } + + // Is the system set to do page scrolling? + bool IsPageScroll() const { return ((unsigned int)m_linesPerAction == UINT_MAX); } + + virtual wxEvent *Clone() const { return new wxMouseEvent(*this); } + virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_USER_INPUT; } + + wxMouseEvent& operator=(const wxMouseEvent& event) + { + if (&event != this) + Assign(event); + return *this; + } + +public: + int m_clickCount; + + wxMouseWheelAxis m_wheelAxis; + int m_wheelRotation; + int m_wheelDelta; + int m_linesPerAction; + int m_columnsPerAction; + +protected: + void Assign(const wxMouseEvent& evt); + +private: + DECLARE_DYNAMIC_CLASS(wxMouseEvent) +}; + +// Cursor set event + +/* + wxEVT_SET_CURSOR + */ + +class WXDLLIMPEXP_CORE wxSetCursorEvent : public wxEvent +{ +public: + wxSetCursorEvent(wxCoord x = 0, wxCoord y = 0) + : wxEvent(0, wxEVT_SET_CURSOR), + m_x(x), m_y(y), m_cursor() + { } + + wxSetCursorEvent(const wxSetCursorEvent& event) + : wxEvent(event), + m_x(event.m_x), + m_y(event.m_y), + m_cursor(event.m_cursor) + { } + + wxCoord GetX() const { return m_x; } + wxCoord GetY() const { return m_y; } + + void SetCursor(const wxCursor& cursor) { m_cursor = cursor; } + const wxCursor& GetCursor() const { return m_cursor; } + bool HasCursor() const { return m_cursor.IsOk(); } + + virtual wxEvent *Clone() const { return new wxSetCursorEvent(*this); } + +private: + wxCoord m_x, m_y; + wxCursor m_cursor; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSetCursorEvent) +}; + +// Keyboard input event class + +/* + wxEVT_CHAR + wxEVT_CHAR_HOOK + wxEVT_KEY_DOWN + wxEVT_KEY_UP + wxEVT_HOTKEY + */ + +// key categories: the bit flags for IsKeyInCategory() function +// +// the enum values used may change in future version of wx +// use the named constants only, or bitwise combinations thereof +enum wxKeyCategoryFlags +{ + // arrow keys, on and off numeric keypads + WXK_CATEGORY_ARROW = 1, + + // page up and page down keys, on and off numeric keypads + WXK_CATEGORY_PAGING = 2, + + // home and end keys, on and off numeric keypads + WXK_CATEGORY_JUMP = 4, + + // tab key, on and off numeric keypads + WXK_CATEGORY_TAB = 8, + + // backspace and delete keys, on and off numeric keypads + WXK_CATEGORY_CUT = 16, + + // all keys usually used for navigation + WXK_CATEGORY_NAVIGATION = WXK_CATEGORY_ARROW | + WXK_CATEGORY_PAGING | + WXK_CATEGORY_JUMP +}; + +class WXDLLIMPEXP_CORE wxKeyEvent : public wxEvent, + public wxKeyboardState +{ +public: + wxKeyEvent(wxEventType keyType = wxEVT_NULL); + + // Normal copy ctor and a ctor creating a new event for the same key as the + // given one but a different event type (this is used in implementation + // code only, do not use outside of the library). + wxKeyEvent(const wxKeyEvent& evt); + wxKeyEvent(wxEventType eventType, const wxKeyEvent& evt); + + // get the key code: an ASCII7 char or an element of wxKeyCode enum + int GetKeyCode() const { return (int)m_keyCode; } + + // returns true iff this event's key code is of a certain type + bool IsKeyInCategory(int category) const; + +#if wxUSE_UNICODE + // get the Unicode character corresponding to this key + wxChar GetUnicodeKey() const { return m_uniChar; } +#endif // wxUSE_UNICODE + + // get the raw key code (platform-dependent) + wxUint32 GetRawKeyCode() const { return m_rawCode; } + + // get the raw key flags (platform-dependent) + wxUint32 GetRawKeyFlags() const { return m_rawFlags; } + + // Find the position of the event + void GetPosition(wxCoord *xpos, wxCoord *ypos) const + { + if (xpos) + *xpos = GetX(); + if (ypos) + *ypos = GetY(); + } + + // This version if provided only for backwards compatiblity, don't use. + void GetPosition(long *xpos, long *ypos) const + { + if (xpos) + *xpos = GetX(); + if (ypos) + *ypos = GetY(); + } + + wxPoint GetPosition() const + { return wxPoint(GetX(), GetY()); } + + // Get X position + wxCoord GetX() const; + + // Get Y position + wxCoord GetY() const; + + // Can be called from wxEVT_CHAR_HOOK handler to allow generation of normal + // key events even though the event had been handled (by default they would + // not be generated in this case). + void DoAllowNextEvent() { m_allowNext = true; } + + // Return the value of the "allow next" flag, for internal use only. + bool IsNextEventAllowed() const { return m_allowNext; } + + + virtual wxEvent *Clone() const { return new wxKeyEvent(*this); } + virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_USER_INPUT; } + + // we do need to copy wxKeyEvent sometimes (in wxTreeCtrl code, for + // example) + wxKeyEvent& operator=(const wxKeyEvent& evt) + { + if ( &evt != this ) + { + wxEvent::operator=(evt); + + // Borland C++ 5.82 doesn't compile an explicit call to an + // implicitly defined operator=() so need to do it this way: + *static_cast(this) = evt; + + DoAssignMembers(evt); + } + return *this; + } + +public: + // Do not use these fields directly, they are initialized on demand, so + // call GetX() and GetY() or GetPosition() instead. + wxCoord m_x, m_y; + + long m_keyCode; + +#if wxUSE_UNICODE + // This contains the full Unicode character + // in a character events in Unicode mode + wxChar m_uniChar; +#endif + + // these fields contain the platform-specific information about + // key that was pressed + wxUint32 m_rawCode; + wxUint32 m_rawFlags; + +private: + // Set the event to propagate if necessary, i.e. if it's of wxEVT_CHAR_HOOK + // type. This is used by all ctors. + void InitPropagation() + { + if ( m_eventType == wxEVT_CHAR_HOOK ) + m_propagationLevel = wxEVENT_PROPAGATE_MAX; + + m_allowNext = false; + } + + // Copy only the event data present in this class, this is used by + // AssignKeyData() and copy ctor. + void DoAssignMembers(const wxKeyEvent& evt) + { + m_x = evt.m_x; + m_y = evt.m_y; + m_hasPosition = evt.m_hasPosition; + + m_keyCode = evt.m_keyCode; + + m_rawCode = evt.m_rawCode; + m_rawFlags = evt.m_rawFlags; +#if wxUSE_UNICODE + m_uniChar = evt.m_uniChar; +#endif + } + + // Initialize m_x and m_y using the current mouse cursor position if + // necessary. + void InitPositionIfNecessary() const; + + // If this flag is true, the normal key events should still be generated + // even if wxEVT_CHAR_HOOK had been handled. By default it is false as + // handling wxEVT_CHAR_HOOK suppresses all the subsequent events. + bool m_allowNext; + + // If true, m_x and m_y were already initialized. If false, try to get them + // when they're requested. + bool m_hasPosition; + + DECLARE_DYNAMIC_CLASS(wxKeyEvent) +}; + +// Size event class +/* + wxEVT_SIZE + */ + +class WXDLLIMPEXP_CORE wxSizeEvent : public wxEvent +{ +public: + wxSizeEvent() : wxEvent(0, wxEVT_SIZE) + { } + wxSizeEvent(const wxSize& sz, int winid = 0) + : wxEvent(winid, wxEVT_SIZE), + m_size(sz) + { } + wxSizeEvent(const wxSizeEvent& event) + : wxEvent(event), + m_size(event.m_size), m_rect(event.m_rect) + { } + wxSizeEvent(const wxRect& rect, int id = 0) + : m_size(rect.GetSize()), m_rect(rect) + { m_eventType = wxEVT_SIZING; m_id = id; } + + wxSize GetSize() const { return m_size; } + void SetSize(wxSize size) { m_size = size; } + wxRect GetRect() const { return m_rect; } + void SetRect(const wxRect& rect) { m_rect = rect; } + + virtual wxEvent *Clone() const { return new wxSizeEvent(*this); } + +public: + // For internal usage only. Will be converted to protected members. + wxSize m_size; + wxRect m_rect; // Used for wxEVT_SIZING + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSizeEvent) +}; + +// Move event class + +/* + wxEVT_MOVE + */ + +class WXDLLIMPEXP_CORE wxMoveEvent : public wxEvent +{ +public: + wxMoveEvent() + : wxEvent(0, wxEVT_MOVE) + { } + wxMoveEvent(const wxPoint& pos, int winid = 0) + : wxEvent(winid, wxEVT_MOVE), + m_pos(pos) + { } + wxMoveEvent(const wxMoveEvent& event) + : wxEvent(event), + m_pos(event.m_pos) + { } + wxMoveEvent(const wxRect& rect, int id = 0) + : m_pos(rect.GetPosition()), m_rect(rect) + { m_eventType = wxEVT_MOVING; m_id = id; } + + wxPoint GetPosition() const { return m_pos; } + void SetPosition(const wxPoint& pos) { m_pos = pos; } + wxRect GetRect() const { return m_rect; } + void SetRect(const wxRect& rect) { m_rect = rect; } + + virtual wxEvent *Clone() const { return new wxMoveEvent(*this); } + +protected: + wxPoint m_pos; + wxRect m_rect; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMoveEvent) +}; + +// Paint event class +/* + wxEVT_PAINT + wxEVT_NC_PAINT + */ + +#if wxDEBUG_LEVEL && (defined(__WXMSW__) || defined(__WXPM__)) + #define wxHAS_PAINT_DEBUG + + // see comments in src/msw|os2/dcclient.cpp where g_isPainting is defined + extern WXDLLIMPEXP_CORE int g_isPainting; +#endif // debug + +class WXDLLIMPEXP_CORE wxPaintEvent : public wxEvent +{ +public: + wxPaintEvent(int Id = 0) + : wxEvent(Id, wxEVT_PAINT) + { +#ifdef wxHAS_PAINT_DEBUG + // set the internal flag for the duration of redrawing + g_isPainting++; +#endif // debug + } + + // default copy ctor and dtor are normally fine, we only need them to keep + // g_isPainting updated in debug build +#ifdef wxHAS_PAINT_DEBUG + wxPaintEvent(const wxPaintEvent& event) + : wxEvent(event) + { + g_isPainting++; + } + + virtual ~wxPaintEvent() + { + g_isPainting--; + } +#endif // debug + + virtual wxEvent *Clone() const { return new wxPaintEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPaintEvent) +}; + +class WXDLLIMPEXP_CORE wxNcPaintEvent : public wxEvent +{ +public: + wxNcPaintEvent(int winid = 0) + : wxEvent(winid, wxEVT_NC_PAINT) + { } + + virtual wxEvent *Clone() const { return new wxNcPaintEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNcPaintEvent) +}; + +// Erase background event class +/* + wxEVT_ERASE_BACKGROUND + */ + +class WXDLLIMPEXP_CORE wxEraseEvent : public wxEvent +{ +public: + wxEraseEvent(int Id = 0, wxDC *dc = NULL) + : wxEvent(Id, wxEVT_ERASE_BACKGROUND), + m_dc(dc) + { } + + wxEraseEvent(const wxEraseEvent& event) + : wxEvent(event), + m_dc(event.m_dc) + { } + + wxDC *GetDC() const { return m_dc; } + + virtual wxEvent *Clone() const { return new wxEraseEvent(*this); } + +protected: + wxDC *m_dc; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxEraseEvent) +}; + +// Focus event class +/* + wxEVT_SET_FOCUS + wxEVT_KILL_FOCUS + */ + +class WXDLLIMPEXP_CORE wxFocusEvent : public wxEvent +{ +public: + wxFocusEvent(wxEventType type = wxEVT_NULL, int winid = 0) + : wxEvent(winid, type) + { m_win = NULL; } + + wxFocusEvent(const wxFocusEvent& event) + : wxEvent(event) + { m_win = event.m_win; } + + // The window associated with this event is the window which had focus + // before for SET event and the window which will have focus for the KILL + // one. NB: it may be NULL in both cases! + wxWindow *GetWindow() const { return m_win; } + void SetWindow(wxWindow *win) { m_win = win; } + + virtual wxEvent *Clone() const { return new wxFocusEvent(*this); } + +private: + wxWindow *m_win; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFocusEvent) +}; + +// wxChildFocusEvent notifies the parent that a child has got the focus: unlike +// wxFocusEvent it is propagated upwards the window chain +class WXDLLIMPEXP_CORE wxChildFocusEvent : public wxCommandEvent +{ +public: + wxChildFocusEvent(wxWindow *win = NULL); + + wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } + + virtual wxEvent *Clone() const { return new wxChildFocusEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxChildFocusEvent) +}; + +// Activate event class +/* + wxEVT_ACTIVATE + wxEVT_ACTIVATE_APP + wxEVT_HIBERNATE + */ + +class WXDLLIMPEXP_CORE wxActivateEvent : public wxEvent +{ +public: + // Type of activation. For now we can only detect if it was by mouse or by + // some other method and even this is only available under wxMSW. + enum Reason + { + Reason_Mouse, + Reason_Unknown + }; + + wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true, + int Id = 0, Reason activationReason = Reason_Unknown) + : wxEvent(Id, type), + m_activationReason(activationReason) + { + m_active = active; + } + wxActivateEvent(const wxActivateEvent& event) + : wxEvent(event) + { + m_active = event.m_active; + m_activationReason = event.m_activationReason; + } + + bool GetActive() const { return m_active; } + Reason GetActivationReason() const { return m_activationReason;} + + virtual wxEvent *Clone() const { return new wxActivateEvent(*this); } + +private: + bool m_active; + Reason m_activationReason; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxActivateEvent) +}; + +// InitDialog event class +/* + wxEVT_INIT_DIALOG + */ + +class WXDLLIMPEXP_CORE wxInitDialogEvent : public wxEvent +{ +public: + wxInitDialogEvent(int Id = 0) + : wxEvent(Id, wxEVT_INIT_DIALOG) + { } + + virtual wxEvent *Clone() const { return new wxInitDialogEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxInitDialogEvent) +}; + +// Miscellaneous menu event class +/* + wxEVT_MENU_OPEN, + wxEVT_MENU_CLOSE, + wxEVT_MENU_HIGHLIGHT, +*/ + +class WXDLLIMPEXP_CORE wxMenuEvent : public wxEvent +{ +public: + wxMenuEvent(wxEventType type = wxEVT_NULL, int winid = 0, wxMenu* menu = NULL) + : wxEvent(winid, type) + { m_menuId = winid; m_menu = menu; } + wxMenuEvent(const wxMenuEvent& event) + : wxEvent(event) + { m_menuId = event.m_menuId; m_menu = event.m_menu; } + + // only for wxEVT_MENU_HIGHLIGHT + int GetMenuId() const { return m_menuId; } + + // only for wxEVT_MENU_OPEN/CLOSE + bool IsPopup() const { return m_menuId == wxID_ANY; } + + // only for wxEVT_MENU_OPEN/CLOSE + wxMenu* GetMenu() const { return m_menu; } + + virtual wxEvent *Clone() const { return new wxMenuEvent(*this); } + +private: + int m_menuId; + wxMenu* m_menu; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMenuEvent) +}; + +// Window close or session close event class +/* + wxEVT_CLOSE_WINDOW, + wxEVT_END_SESSION, + wxEVT_QUERY_END_SESSION + */ + +class WXDLLIMPEXP_CORE wxCloseEvent : public wxEvent +{ +public: + wxCloseEvent(wxEventType type = wxEVT_NULL, int winid = 0) + : wxEvent(winid, type), + m_loggingOff(true), + m_veto(false), // should be false by default + m_canVeto(true) {} + + wxCloseEvent(const wxCloseEvent& event) + : wxEvent(event), + m_loggingOff(event.m_loggingOff), + m_veto(event.m_veto), + m_canVeto(event.m_canVeto) {} + + void SetLoggingOff(bool logOff) { m_loggingOff = logOff; } + bool GetLoggingOff() const + { + // m_loggingOff flag is only used by wxEVT_[QUERY_]END_SESSION, it + // doesn't make sense for wxEVT_CLOSE_WINDOW + wxASSERT_MSG( m_eventType != wxEVT_CLOSE_WINDOW, + wxT("this flag is for end session events only") ); + + return m_loggingOff; + } + + void Veto(bool veto = true) + { + // GetVeto() will return false anyhow... + wxCHECK_RET( m_canVeto, + wxT("call to Veto() ignored (can't veto this event)") ); + + m_veto = veto; + } + void SetCanVeto(bool canVeto) { m_canVeto = canVeto; } + bool CanVeto() const { return m_canVeto; } + bool GetVeto() const { return m_canVeto && m_veto; } + + virtual wxEvent *Clone() const { return new wxCloseEvent(*this); } + +protected: + bool m_loggingOff, + m_veto, + m_canVeto; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCloseEvent) +}; + +/* + wxEVT_SHOW + */ + +class WXDLLIMPEXP_CORE wxShowEvent : public wxEvent +{ +public: + wxShowEvent(int winid = 0, bool show = false) + : wxEvent(winid, wxEVT_SHOW) + { m_show = show; } + wxShowEvent(const wxShowEvent& event) + : wxEvent(event) + { m_show = event.m_show; } + + void SetShow(bool show) { m_show = show; } + + // return true if the window was shown, false if hidden + bool IsShown() const { return m_show; } + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( bool GetShow() const { return IsShown(); } ) +#endif + + virtual wxEvent *Clone() const { return new wxShowEvent(*this); } + +protected: + bool m_show; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxShowEvent) +}; + +/* + wxEVT_ICONIZE + */ + +class WXDLLIMPEXP_CORE wxIconizeEvent : public wxEvent +{ +public: + wxIconizeEvent(int winid = 0, bool iconized = true) + : wxEvent(winid, wxEVT_ICONIZE) + { m_iconized = iconized; } + wxIconizeEvent(const wxIconizeEvent& event) + : wxEvent(event) + { m_iconized = event.m_iconized; } + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( bool Iconized() const { return IsIconized(); } ) +#endif + // return true if the frame was iconized, false if restored + bool IsIconized() const { return m_iconized; } + + virtual wxEvent *Clone() const { return new wxIconizeEvent(*this); } + +protected: + bool m_iconized; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIconizeEvent) +}; +/* + wxEVT_MAXIMIZE + */ + +class WXDLLIMPEXP_CORE wxMaximizeEvent : public wxEvent +{ +public: + wxMaximizeEvent(int winid = 0) + : wxEvent(winid, wxEVT_MAXIMIZE) + { } + + virtual wxEvent *Clone() const { return new wxMaximizeEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMaximizeEvent) +}; + +// Joystick event class +/* + wxEVT_JOY_BUTTON_DOWN, + wxEVT_JOY_BUTTON_UP, + wxEVT_JOY_MOVE, + wxEVT_JOY_ZMOVE +*/ + +// Which joystick? Same as Windows ids so no conversion necessary. +enum +{ + wxJOYSTICK1, + wxJOYSTICK2 +}; + +// Which button is down? +enum +{ + wxJOY_BUTTON_ANY = -1, + wxJOY_BUTTON1 = 1, + wxJOY_BUTTON2 = 2, + wxJOY_BUTTON3 = 4, + wxJOY_BUTTON4 = 8 +}; + +class WXDLLIMPEXP_CORE wxJoystickEvent : public wxEvent +{ +protected: + wxPoint m_pos; + int m_zPosition; + int m_buttonChange; // Which button changed? + int m_buttonState; // Which buttons are down? + int m_joyStick; // Which joystick? + +public: + wxJoystickEvent(wxEventType type = wxEVT_NULL, + int state = 0, + int joystick = wxJOYSTICK1, + int change = 0) + : wxEvent(0, type), + m_pos(), + m_zPosition(0), + m_buttonChange(change), + m_buttonState(state), + m_joyStick(joystick) + { + } + wxJoystickEvent(const wxJoystickEvent& event) + : wxEvent(event), + m_pos(event.m_pos), + m_zPosition(event.m_zPosition), + m_buttonChange(event.m_buttonChange), + m_buttonState(event.m_buttonState), + m_joyStick(event.m_joyStick) + { } + + wxPoint GetPosition() const { return m_pos; } + int GetZPosition() const { return m_zPosition; } + int GetButtonState() const { return m_buttonState; } + int GetButtonChange() const { return m_buttonChange; } + int GetJoystick() const { return m_joyStick; } + + void SetJoystick(int stick) { m_joyStick = stick; } + void SetButtonState(int state) { m_buttonState = state; } + void SetButtonChange(int change) { m_buttonChange = change; } + void SetPosition(const wxPoint& pos) { m_pos = pos; } + void SetZPosition(int zPos) { m_zPosition = zPos; } + + // Was it a button event? (*doesn't* mean: is any button *down*?) + bool IsButton() const { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) || + (GetEventType() == wxEVT_JOY_BUTTON_UP)); } + + // Was it a move event? + bool IsMove() const { return (GetEventType() == wxEVT_JOY_MOVE); } + + // Was it a zmove event? + bool IsZMove() const { return (GetEventType() == wxEVT_JOY_ZMOVE); } + + // Was it a down event from button 1, 2, 3, 4 or any? + bool ButtonDown(int but = wxJOY_BUTTON_ANY) const + { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) && + ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); } + + // Was it a up event from button 1, 2, 3 or any? + bool ButtonUp(int but = wxJOY_BUTTON_ANY) const + { return ((GetEventType() == wxEVT_JOY_BUTTON_UP) && + ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); } + + // Was the given button 1,2,3,4 or any in Down state? + bool ButtonIsDown(int but = wxJOY_BUTTON_ANY) const + { return (((but == wxJOY_BUTTON_ANY) && (m_buttonState != 0)) || + ((m_buttonState & but) == but)); } + + virtual wxEvent *Clone() const { return new wxJoystickEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxJoystickEvent) +}; + +// Drop files event class +/* + wxEVT_DROP_FILES + */ + +class WXDLLIMPEXP_CORE wxDropFilesEvent : public wxEvent +{ +public: + int m_noFiles; + wxPoint m_pos; + wxString* m_files; + + wxDropFilesEvent(wxEventType type = wxEVT_NULL, + int noFiles = 0, + wxString *files = NULL) + : wxEvent(0, type), + m_noFiles(noFiles), + m_pos(), + m_files(files) + { } + + // we need a copy ctor to avoid deleting m_files pointer twice + wxDropFilesEvent(const wxDropFilesEvent& other) + : wxEvent(other), + m_noFiles(other.m_noFiles), + m_pos(other.m_pos), + m_files(NULL) + { + m_files = new wxString[m_noFiles]; + for ( int n = 0; n < m_noFiles; n++ ) + { + m_files[n] = other.m_files[n]; + } + } + + virtual ~wxDropFilesEvent() + { + delete [] m_files; + } + + wxPoint GetPosition() const { return m_pos; } + int GetNumberOfFiles() const { return m_noFiles; } + wxString *GetFiles() const { return m_files; } + + virtual wxEvent *Clone() const { return new wxDropFilesEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDropFilesEvent) +}; + +// Update UI event +/* + wxEVT_UPDATE_UI + */ + +// Whether to always send update events to windows, or +// to only send update events to those with the +// wxWS_EX_PROCESS_UI_UPDATES style. + +enum wxUpdateUIMode +{ + // Send UI update events to all windows + wxUPDATE_UI_PROCESS_ALL, + + // Send UI update events to windows that have + // the wxWS_EX_PROCESS_UI_UPDATES flag specified + wxUPDATE_UI_PROCESS_SPECIFIED +}; + +class WXDLLIMPEXP_CORE wxUpdateUIEvent : public wxCommandEvent +{ +public: + wxUpdateUIEvent(wxWindowID commandId = 0) + : wxCommandEvent(wxEVT_UPDATE_UI, commandId) + { + m_checked = + m_enabled = + m_shown = + m_setEnabled = + m_setShown = + m_setText = + m_setChecked = false; + } + wxUpdateUIEvent(const wxUpdateUIEvent& event) + : wxCommandEvent(event), + m_checked(event.m_checked), + m_enabled(event.m_enabled), + m_shown(event.m_shown), + m_setEnabled(event.m_setEnabled), + m_setShown(event.m_setShown), + m_setText(event.m_setText), + m_setChecked(event.m_setChecked), + m_text(event.m_text) + { } + + bool GetChecked() const { return m_checked; } + bool GetEnabled() const { return m_enabled; } + bool GetShown() const { return m_shown; } + wxString GetText() const { return m_text; } + bool GetSetText() const { return m_setText; } + bool GetSetChecked() const { return m_setChecked; } + bool GetSetEnabled() const { return m_setEnabled; } + bool GetSetShown() const { return m_setShown; } + + void Check(bool check) { m_checked = check; m_setChecked = true; } + void Enable(bool enable) { m_enabled = enable; m_setEnabled = true; } + void Show(bool show) { m_shown = show; m_setShown = true; } + void SetText(const wxString& text) { m_text = text; m_setText = true; } + + // Sets the interval between updates in milliseconds. + // Set to -1 to disable updates, or to 0 to update as frequently as possible. + static void SetUpdateInterval(long updateInterval) { sm_updateInterval = updateInterval; } + + // Returns the current interval between updates in milliseconds + static long GetUpdateInterval() { return sm_updateInterval; } + + // Can we update this window? + static bool CanUpdate(wxWindowBase *win); + + // Reset the update time to provide a delay until the next + // time we should update + static void ResetUpdateTime(); + + // Specify how wxWidgets will send update events: to + // all windows, or only to those which specify that they + // will process the events. + static void SetMode(wxUpdateUIMode mode) { sm_updateMode = mode; } + + // Returns the UI update mode + static wxUpdateUIMode GetMode() { return sm_updateMode; } + + virtual wxEvent *Clone() const { return new wxUpdateUIEvent(*this); } + +protected: + bool m_checked; + bool m_enabled; + bool m_shown; + bool m_setEnabled; + bool m_setShown; + bool m_setText; + bool m_setChecked; + wxString m_text; +#if wxUSE_LONGLONG + static wxLongLong sm_lastUpdate; +#endif + static long sm_updateInterval; + static wxUpdateUIMode sm_updateMode; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxUpdateUIEvent) +}; + +/* + wxEVT_SYS_COLOUR_CHANGED + */ + +// TODO: shouldn't all events record the window ID? +class WXDLLIMPEXP_CORE wxSysColourChangedEvent : public wxEvent +{ +public: + wxSysColourChangedEvent() + : wxEvent(0, wxEVT_SYS_COLOUR_CHANGED) + { } + + virtual wxEvent *Clone() const { return new wxSysColourChangedEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSysColourChangedEvent) +}; + +/* + wxEVT_MOUSE_CAPTURE_CHANGED + The window losing the capture receives this message + (even if it released the capture itself). + */ + +class WXDLLIMPEXP_CORE wxMouseCaptureChangedEvent : public wxEvent +{ +public: + wxMouseCaptureChangedEvent(wxWindowID winid = 0, wxWindow* gainedCapture = NULL) + : wxEvent(winid, wxEVT_MOUSE_CAPTURE_CHANGED), + m_gainedCapture(gainedCapture) + { } + + wxMouseCaptureChangedEvent(const wxMouseCaptureChangedEvent& event) + : wxEvent(event), + m_gainedCapture(event.m_gainedCapture) + { } + + virtual wxEvent *Clone() const { return new wxMouseCaptureChangedEvent(*this); } + + wxWindow* GetCapturedWindow() const { return m_gainedCapture; } + +private: + wxWindow* m_gainedCapture; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMouseCaptureChangedEvent) +}; + +/* + wxEVT_MOUSE_CAPTURE_LOST + The window losing the capture receives this message, unless it released it + it itself or unless wxWindow::CaptureMouse was called on another window + (and so capture will be restored when the new capturer releases it). + */ + +class WXDLLIMPEXP_CORE wxMouseCaptureLostEvent : public wxEvent +{ +public: + wxMouseCaptureLostEvent(wxWindowID winid = 0) + : wxEvent(winid, wxEVT_MOUSE_CAPTURE_LOST) + {} + + wxMouseCaptureLostEvent(const wxMouseCaptureLostEvent& event) + : wxEvent(event) + {} + + virtual wxEvent *Clone() const { return new wxMouseCaptureLostEvent(*this); } + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMouseCaptureLostEvent) +}; + +/* + wxEVT_DISPLAY_CHANGED + */ +class WXDLLIMPEXP_CORE wxDisplayChangedEvent : public wxEvent +{ +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDisplayChangedEvent) + +public: + wxDisplayChangedEvent() + : wxEvent(0, wxEVT_DISPLAY_CHANGED) + { } + + virtual wxEvent *Clone() const { return new wxDisplayChangedEvent(*this); } +}; + +/* + wxEVT_PALETTE_CHANGED + */ + +class WXDLLIMPEXP_CORE wxPaletteChangedEvent : public wxEvent +{ +public: + wxPaletteChangedEvent(wxWindowID winid = 0) + : wxEvent(winid, wxEVT_PALETTE_CHANGED), + m_changedWindow(NULL) + { } + + wxPaletteChangedEvent(const wxPaletteChangedEvent& event) + : wxEvent(event), + m_changedWindow(event.m_changedWindow) + { } + + void SetChangedWindow(wxWindow* win) { m_changedWindow = win; } + wxWindow* GetChangedWindow() const { return m_changedWindow; } + + virtual wxEvent *Clone() const { return new wxPaletteChangedEvent(*this); } + +protected: + wxWindow* m_changedWindow; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPaletteChangedEvent) +}; + +/* + wxEVT_QUERY_NEW_PALETTE + Indicates the window is getting keyboard focus and should re-do its palette. + */ + +class WXDLLIMPEXP_CORE wxQueryNewPaletteEvent : public wxEvent +{ +public: + wxQueryNewPaletteEvent(wxWindowID winid = 0) + : wxEvent(winid, wxEVT_QUERY_NEW_PALETTE), + m_paletteRealized(false) + { } + wxQueryNewPaletteEvent(const wxQueryNewPaletteEvent& event) + : wxEvent(event), + m_paletteRealized(event.m_paletteRealized) + { } + + // App sets this if it changes the palette. + void SetPaletteRealized(bool realized) { m_paletteRealized = realized; } + bool GetPaletteRealized() const { return m_paletteRealized; } + + virtual wxEvent *Clone() const { return new wxQueryNewPaletteEvent(*this); } + +protected: + bool m_paletteRealized; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxQueryNewPaletteEvent) +}; + +/* + Event generated by dialog navigation keys + wxEVT_NAVIGATION_KEY + */ +// NB: don't derive from command event to avoid being propagated to the parent +class WXDLLIMPEXP_CORE wxNavigationKeyEvent : public wxEvent +{ +public: + wxNavigationKeyEvent() + : wxEvent(0, wxEVT_NAVIGATION_KEY), + m_flags(IsForward | FromTab), // defaults are for TAB + m_focus(NULL) + { + m_propagationLevel = wxEVENT_PROPAGATE_NONE; + } + + wxNavigationKeyEvent(const wxNavigationKeyEvent& event) + : wxEvent(event), + m_flags(event.m_flags), + m_focus(event.m_focus) + { } + + // direction: forward (true) or backward (false) + bool GetDirection() const + { return (m_flags & IsForward) != 0; } + void SetDirection(bool bForward) + { if ( bForward ) m_flags |= IsForward; else m_flags &= ~IsForward; } + + // it may be a window change event (MDI, notebook pages...) or a control + // change event + bool IsWindowChange() const + { return (m_flags & WinChange) != 0; } + void SetWindowChange(bool bIs) + { if ( bIs ) m_flags |= WinChange; else m_flags &= ~WinChange; } + + // Set to true under MSW if the event was generated using the tab key. + // This is required for proper navogation over radio buttons + bool IsFromTab() const + { return (m_flags & FromTab) != 0; } + void SetFromTab(bool bIs) + { if ( bIs ) m_flags |= FromTab; else m_flags &= ~FromTab; } + + // the child which has the focus currently (may be NULL - use + // wxWindow::FindFocus then) + wxWindow* GetCurrentFocus() const { return m_focus; } + void SetCurrentFocus(wxWindow *win) { m_focus = win; } + + // Set flags + void SetFlags(long flags) { m_flags = flags; } + + virtual wxEvent *Clone() const { return new wxNavigationKeyEvent(*this); } + + enum wxNavigationKeyEventFlags + { + IsBackward = 0x0000, + IsForward = 0x0001, + WinChange = 0x0002, + FromTab = 0x0004 + }; + + long m_flags; + wxWindow *m_focus; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNavigationKeyEvent) +}; + +// Window creation/destruction events: the first is sent as soon as window is +// created (i.e. the underlying GUI object exists), but when the C++ object is +// fully initialized (so virtual functions may be called). The second, +// wxEVT_DESTROY, is sent right before the window is destroyed - again, it's +// still safe to call virtual functions at this moment +/* + wxEVT_CREATE + wxEVT_DESTROY + */ + +class WXDLLIMPEXP_CORE wxWindowCreateEvent : public wxCommandEvent +{ +public: + wxWindowCreateEvent(wxWindow *win = NULL); + + wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } + + virtual wxEvent *Clone() const { return new wxWindowCreateEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWindowCreateEvent) +}; + +class WXDLLIMPEXP_CORE wxWindowDestroyEvent : public wxCommandEvent +{ +public: + wxWindowDestroyEvent(wxWindow *win = NULL); + + wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } + + virtual wxEvent *Clone() const { return new wxWindowDestroyEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWindowDestroyEvent) +}; + +// A help event is sent when the user clicks on a window in context-help mode. +/* + wxEVT_HELP + wxEVT_DETAILED_HELP +*/ + +class WXDLLIMPEXP_CORE wxHelpEvent : public wxCommandEvent +{ +public: + // how was this help event generated? + enum Origin + { + Origin_Unknown, // unrecognized event source + Origin_Keyboard, // event generated from F1 key press + Origin_HelpButton // event from [?] button on the title bar (Windows) + }; + + wxHelpEvent(wxEventType type = wxEVT_NULL, + wxWindowID winid = 0, + const wxPoint& pt = wxDefaultPosition, + Origin origin = Origin_Unknown) + : wxCommandEvent(type, winid), + m_pos(pt), + m_origin(GuessOrigin(origin)) + { } + wxHelpEvent(const wxHelpEvent& event) + : wxCommandEvent(event), + m_pos(event.m_pos), + m_target(event.m_target), + m_link(event.m_link), + m_origin(event.m_origin) + { } + + // Position of event (in screen coordinates) + const wxPoint& GetPosition() const { return m_pos; } + void SetPosition(const wxPoint& pos) { m_pos = pos; } + + // Optional link to further help + const wxString& GetLink() const { return m_link; } + void SetLink(const wxString& link) { m_link = link; } + + // Optional target to display help in. E.g. a window specification + const wxString& GetTarget() const { return m_target; } + void SetTarget(const wxString& target) { m_target = target; } + + virtual wxEvent *Clone() const { return new wxHelpEvent(*this); } + + // optional indication of the event source + Origin GetOrigin() const { return m_origin; } + void SetOrigin(Origin origin) { m_origin = origin; } + +protected: + wxPoint m_pos; + wxString m_target; + wxString m_link; + Origin m_origin; + + // we can try to guess the event origin ourselves, even if none is + // specified in the ctor + static Origin GuessOrigin(Origin origin); + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxHelpEvent) +}; + +// A Clipboard Text event is sent when a window intercepts text copy/cut/paste +// message, i.e. the user has cut/copied/pasted data from/into a text control +// via ctrl-C/X/V, ctrl/shift-del/insert, a popup menu command, etc. +// NOTE : under windows these events are *NOT* generated automatically +// for a Rich Edit text control. +/* +wxEVT_TEXT_COPY +wxEVT_TEXT_CUT +wxEVT_TEXT_PASTE +*/ + +class WXDLLIMPEXP_CORE wxClipboardTextEvent : public wxCommandEvent +{ +public: + wxClipboardTextEvent(wxEventType type = wxEVT_NULL, + wxWindowID winid = 0) + : wxCommandEvent(type, winid) + { } + wxClipboardTextEvent(const wxClipboardTextEvent& event) + : wxCommandEvent(event) + { } + + virtual wxEvent *Clone() const { return new wxClipboardTextEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxClipboardTextEvent) +}; + +// A Context event is sent when the user right clicks on a window or +// presses Shift-F10 +// NOTE : Under windows this is a repackaged WM_CONTETXMENU message +// Under other systems it may have to be generated from a right click event +/* + wxEVT_CONTEXT_MENU +*/ + +class WXDLLIMPEXP_CORE wxContextMenuEvent : public wxCommandEvent +{ +public: + wxContextMenuEvent(wxEventType type = wxEVT_NULL, + wxWindowID winid = 0, + const wxPoint& pt = wxDefaultPosition) + : wxCommandEvent(type, winid), + m_pos(pt) + { } + wxContextMenuEvent(const wxContextMenuEvent& event) + : wxCommandEvent(event), + m_pos(event.m_pos) + { } + + // Position of event (in screen coordinates) + const wxPoint& GetPosition() const { return m_pos; } + void SetPosition(const wxPoint& pos) { m_pos = pos; } + + virtual wxEvent *Clone() const { return new wxContextMenuEvent(*this); } + +protected: + wxPoint m_pos; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxContextMenuEvent) +}; + + +/* TODO + wxEVT_MOUSE_CAPTURE_CHANGED, + wxEVT_SETTING_CHANGED, // WM_WININICHANGE (NT) / WM_SETTINGCHANGE (Win95) +// wxEVT_FONT_CHANGED, // WM_FONTCHANGE: roll into wxEVT_SETTING_CHANGED, but remember to propagate + // wxEVT_FONT_CHANGED to all other windows (maybe). + wxEVT_DRAW_ITEM, // Leave these three as virtual functions in wxControl?? Platform-specific. + wxEVT_MEASURE_ITEM, + wxEVT_COMPARE_ITEM +*/ + +#endif // wxUSE_GUI + + +// ============================================================================ +// event handler and related classes +// ============================================================================ + + +// struct containing the members common to static and dynamic event tables +// entries +struct WXDLLIMPEXP_BASE wxEventTableEntryBase +{ + wxEventTableEntryBase(int winid, int idLast, + wxEventFunctor* fn, wxObject *data) + : m_id(winid), + m_lastId(idLast), + m_fn(fn), + m_callbackUserData(data) + { + wxASSERT_MSG( idLast == wxID_ANY || winid <= idLast, + "invalid IDs range: lower bound > upper bound" ); + } + + wxEventTableEntryBase( const wxEventTableEntryBase &entry ) + : m_id( entry.m_id ), + m_lastId( entry.m_lastId ), + m_fn( entry.m_fn ), + m_callbackUserData( entry.m_callbackUserData ) + { + // This is a 'hack' to ensure that only one instance tries to delete + // the functor pointer. It is safe as long as the only place where the + // copy constructor is being called is when the static event tables are + // being initialized (a temporary instance is created and then this + // constructor is called). + + const_cast( entry ).m_fn = NULL; + } + + ~wxEventTableEntryBase() + { + delete m_fn; + } + + // the range of ids for this entry: if m_lastId == wxID_ANY, the range + // consists only of m_id, otherwise it is m_id..m_lastId inclusive + int m_id, + m_lastId; + + // function/method/functor to call + wxEventFunctor* m_fn; + + // arbitrary user data associated with the callback + wxObject* m_callbackUserData; + +private: + wxDECLARE_NO_ASSIGN_CLASS(wxEventTableEntryBase); +}; + +// an entry from a static event table +struct WXDLLIMPEXP_BASE wxEventTableEntry : public wxEventTableEntryBase +{ + wxEventTableEntry(const int& evType, int winid, int idLast, + wxEventFunctor* fn, wxObject *data) + : wxEventTableEntryBase(winid, idLast, fn, data), + m_eventType(evType) + { } + + // the reference to event type: this allows us to not care about the + // (undefined) order in which the event table entries and the event types + // are initialized: initially the value of this reference might be + // invalid, but by the time it is used for the first time, all global + // objects will have been initialized (including the event type constants) + // and so it will have the correct value when it is needed + const int& m_eventType; + +private: + wxDECLARE_NO_ASSIGN_CLASS(wxEventTableEntry); +}; + +// an entry used in dynamic event table managed by wxEvtHandler::Connect() +struct WXDLLIMPEXP_BASE wxDynamicEventTableEntry : public wxEventTableEntryBase +{ + wxDynamicEventTableEntry(int evType, int winid, int idLast, + wxEventFunctor* fn, wxObject *data) + : wxEventTableEntryBase(winid, idLast, fn, data), + m_eventType(evType) + { } + + // not a reference here as we can't keep a reference to a temporary int + // created to wrap the constant value typically passed to Connect() - nor + // do we need it + int m_eventType; + +private: + wxDECLARE_NO_ASSIGN_CLASS(wxDynamicEventTableEntry); +}; + +// ---------------------------------------------------------------------------- +// wxEventTable: an array of event entries terminated with {0, 0, 0, 0, 0} +// ---------------------------------------------------------------------------- + +struct WXDLLIMPEXP_BASE wxEventTable +{ + const wxEventTable *baseTable; // base event table (next in chain) + const wxEventTableEntry *entries; // bottom of entry array +}; + +// ---------------------------------------------------------------------------- +// wxEventHashTable: a helper of wxEvtHandler to speed up wxEventTable lookups. +// ---------------------------------------------------------------------------- + +WX_DEFINE_ARRAY_PTR(const wxEventTableEntry*, wxEventTableEntryPointerArray); + +class WXDLLIMPEXP_BASE wxEventHashTable +{ +private: + // Internal data structs + struct EventTypeTable + { + wxEventType eventType; + wxEventTableEntryPointerArray eventEntryTable; + }; + typedef EventTypeTable* EventTypeTablePointer; + +public: + // Constructor, needs the event table it needs to hash later on. + // Note: hashing of the event table is not done in the constructor as it + // can be that the event table is not yet full initialize, the hash + // will gets initialized when handling the first event look-up request. + wxEventHashTable(const wxEventTable &table); + // Destructor. + ~wxEventHashTable(); + + // Handle the given event, in other words search the event table hash + // and call self->ProcessEvent() if a match was found. + bool HandleEvent(wxEvent& event, wxEvtHandler *self); + + // Clear table + void Clear(); + +#if wxUSE_MEMORY_TRACING + // Clear all tables: only used to work around problems in memory tracing + // code + static void ClearAll(); +#endif // wxUSE_MEMORY_TRACING + +protected: + // Init the hash table with the entries of the static event table. + void InitHashTable(); + // Helper function of InitHashTable() to insert 1 entry into the hash table. + void AddEntry(const wxEventTableEntry &entry); + // Allocate and init with null pointers the base hash table. + void AllocEventTypeTable(size_t size); + // Grow the hash table in size and transfer all items currently + // in the table to the correct location in the new table. + void GrowEventTypeTable(); + +protected: + const wxEventTable &m_table; + bool m_rebuildHash; + + size_t m_size; + EventTypeTablePointer *m_eventTypeTable; + + static wxEventHashTable* sm_first; + wxEventHashTable* m_previous; + wxEventHashTable* m_next; + + wxDECLARE_NO_COPY_CLASS(wxEventHashTable); +}; + +// ---------------------------------------------------------------------------- +// wxEvtHandler: the base class for all objects handling wxWidgets events +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxEvtHandler : public wxObject + , public wxTrackable +{ +public: + wxEvtHandler(); + virtual ~wxEvtHandler(); + + + // Event handler chain + // ------------------- + + wxEvtHandler *GetNextHandler() const { return m_nextHandler; } + wxEvtHandler *GetPreviousHandler() const { return m_previousHandler; } + virtual void SetNextHandler(wxEvtHandler *handler) { m_nextHandler = handler; } + virtual void SetPreviousHandler(wxEvtHandler *handler) { m_previousHandler = handler; } + + void SetEvtHandlerEnabled(bool enabled) { m_enabled = enabled; } + bool GetEvtHandlerEnabled() const { return m_enabled; } + + void Unlink(); + bool IsUnlinked() const; + + + // Global event filters + // -------------------- + + // Add an event filter whose FilterEvent() method will be called for each + // and every event processed by wxWidgets. The filters are called in LIFO + // order and wxApp is registered as an event filter by default. The pointer + // must remain valid until it's removed with RemoveFilter() and is not + // deleted by wxEvtHandler. + static void AddFilter(wxEventFilter* filter); + + // Remove a filter previously installed with AddFilter(). + static void RemoveFilter(wxEventFilter* filter); + + + // Event queuing and processing + // ---------------------------- + + // Process an event right now: this can only be called from the main + // thread, use QueueEvent() for scheduling the events for + // processing from other threads. + virtual bool ProcessEvent(wxEvent& event); + + // Process an event by calling ProcessEvent and handling any exceptions + // thrown by event handlers. It's mostly useful when processing wx events + // when called from C code (e.g. in GTK+ callback) when the exception + // wouldn't correctly propagate to wxEventLoop. + bool SafelyProcessEvent(wxEvent& event); + // NOTE: uses ProcessEvent() + + // This method tries to process the event in this event handler, including + // any preprocessing done by TryBefore() and all the handlers chained to + // it, but excluding the post-processing done in TryAfter(). + // + // It is meant to be called from ProcessEvent() only and is not virtual, + // additional event handlers can be hooked into the normal event processing + // logic using TryBefore() and TryAfter() hooks. + // + // You can also call it yourself to forward an event to another handler but + // without propagating it upwards if it's unhandled (this is usually + // unwanted when forwarding as the original handler would already do it if + // needed normally). + bool ProcessEventLocally(wxEvent& event); + + // Schedule the given event to be processed later. It takes ownership of + // the event pointer, i.e. it will be deleted later. This is safe to call + // from multiple threads although you still need to ensure that wxString + // fields of the event object are deep copies and not use the same string + // buffer as other wxString objects in this thread. + virtual void QueueEvent(wxEvent *event); + + // Add an event to be processed later: notice that this function is not + // safe to call from threads other than main, use QueueEvent() + virtual void AddPendingEvent(const wxEvent& event) + { + // notice that the thread-safety problem comes from the fact that + // Clone() doesn't make deep copies of wxString fields of wxEvent + // object and so the same wxString could be used from both threads when + // the event object is destroyed in this one -- QueueEvent() avoids + // this problem as the event pointer is not used any more in this + // thread at all after it is called. + QueueEvent(event.Clone()); + } + + void ProcessPendingEvents(); + // NOTE: uses ProcessEvent() + + void DeletePendingEvents(); + +#if wxUSE_THREADS + bool ProcessThreadEvent(const wxEvent& event); + // NOTE: uses AddPendingEvent(); call only from secondary threads +#endif + +#ifdef wxHAS_CALL_AFTER + // Asynchronous method calls: these methods schedule the given method + // pointer for a later call (during the next idle event loop iteration). + // + // Notice that the method is called on this object itself, so the object + // CallAfter() is called on must have the correct dynamic type. + // + // These method can be used from another thread. + + template + void CallAfter(void (T::*method)()) + { + QueueEvent( + new wxAsyncMethodCallEvent0(static_cast(this), method) + ); + } + + // Notice that we use P1 and not T1 for the parameter to allow passing + // parameters that are convertible to the type taken by the method + // instead of being exactly the same, to be closer to the usual method call + // semantics. + template + void CallAfter(void (T::*method)(T1 x1), P1 x1) + { + QueueEvent( + new wxAsyncMethodCallEvent1( + static_cast(this), method, x1) + ); + } + + template + void CallAfter(void (T::*method)(T1 x1, T2 x2), P1 x1, P2 x2) + { + QueueEvent( + new wxAsyncMethodCallEvent2( + static_cast(this), method, x1, x2) + ); + } + + template + void CallAfter(const T& fn) + { + QueueEvent(new wxAsyncMethodCallEventFunctor(this, fn)); + } +#endif // wxHAS_CALL_AFTER + + + // Connecting and disconnecting + // ---------------------------- + + // These functions are used for old, untyped, event handlers and don't + // check that the type of the function passed to them actually matches the + // type of the event. They also only allow connecting events to methods of + // wxEvtHandler-derived classes. + // + // The template Connect() methods below are safer and allow connecting + // events to arbitrary functions or functors -- but require compiler + // support for templates. + + // Dynamic association of a member function handler with the event handler, + // winid and event type + void Connect(int winid, + int lastId, + wxEventType eventType, + wxObjectEventFunction func, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { + DoBind(winid, lastId, eventType, + wxNewEventFunctor(eventType, func, eventSink), + userData); + } + + // Convenience function: take just one id + void Connect(int winid, + wxEventType eventType, + wxObjectEventFunction func, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { Connect(winid, wxID_ANY, eventType, func, userData, eventSink); } + + // Even more convenient: without id (same as using id of wxID_ANY) + void Connect(wxEventType eventType, + wxObjectEventFunction func, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { Connect(wxID_ANY, wxID_ANY, eventType, func, userData, eventSink); } + + bool Disconnect(int winid, + int lastId, + wxEventType eventType, + wxObjectEventFunction func = NULL, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { + return DoUnbind(winid, lastId, eventType, + wxMakeEventFunctor(eventType, func, eventSink), + userData ); + } + + bool Disconnect(int winid = wxID_ANY, + wxEventType eventType = wxEVT_NULL, + wxObjectEventFunction func = NULL, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { return Disconnect(winid, wxID_ANY, eventType, func, userData, eventSink); } + + bool Disconnect(wxEventType eventType, + wxObjectEventFunction func, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { return Disconnect(wxID_ANY, eventType, func, userData, eventSink); } + +#ifdef wxHAS_EVENT_BIND + // Bind functions to an event: + template + void Bind(const EventTag& eventType, + void (*function)(EventArg &), + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL) + { + DoBind(winid, lastId, eventType, + wxNewEventFunctor(eventType, function), + userData); + } + + + template + bool Unbind(const EventTag& eventType, + void (*function)(EventArg &), + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL) + { + return DoUnbind(winid, lastId, eventType, + wxMakeEventFunctor(eventType, function), + userData); + } + + // Bind functors to an event: + template + void Bind(const EventTag& eventType, + const Functor &functor, + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL) + { + DoBind(winid, lastId, eventType, + wxNewEventFunctor(eventType, functor), + userData); + } + + + template + bool Unbind(const EventTag& eventType, + const Functor &functor, + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL) + { + return DoUnbind(winid, lastId, eventType, + wxMakeEventFunctor(eventType, functor), + userData); + } + + + // Bind a method of a class (called on the specified handler which must + // be convertible to this class) object to an event: + + template + void Bind(const EventTag &eventType, + void (Class::*method)(EventArg &), + EventHandler *handler, + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL) + { + DoBind(winid, lastId, eventType, + wxNewEventFunctor(eventType, method, handler), + userData); + } + + template + bool Unbind(const EventTag &eventType, + void (Class::*method)(EventArg&), + EventHandler *handler, + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL ) + { + return DoUnbind(winid, lastId, eventType, + wxMakeEventFunctor(eventType, method, handler), + userData); + } +#endif // wxHAS_EVENT_BIND + + wxList* GetDynamicEventTable() const { return m_dynamicEvents ; } + + // User data can be associated with each wxEvtHandler + void SetClientObject( wxClientData *data ) { DoSetClientObject(data); } + wxClientData *GetClientObject() const { return DoGetClientObject(); } + + void SetClientData( void *data ) { DoSetClientData(data); } + void *GetClientData() const { return DoGetClientData(); } + + + // implementation from now on + // -------------------------- + + // check if the given event table entry matches this event by id (the check + // for the event type should be done by caller) and call the handler if it + // does + // + // return true if the event was processed, false otherwise (no match or the + // handler decided to skip the event) + static bool ProcessEventIfMatchesId(const wxEventTableEntryBase& tableEntry, + wxEvtHandler *handler, + wxEvent& event); + + virtual bool SearchEventTable(wxEventTable& table, wxEvent& event); + bool SearchDynamicEventTable( wxEvent& event ); + + // Avoid problems at exit by cleaning up static hash table gracefully + void ClearEventHashTable() { GetEventHashTable().Clear(); } + void OnSinkDestroyed( wxEvtHandler *sink ); + + +private: + void DoBind(int winid, + int lastId, + wxEventType eventType, + wxEventFunctor *func, + wxObject* userData = NULL); + + bool DoUnbind(int winid, + int lastId, + wxEventType eventType, + const wxEventFunctor& func, + wxObject *userData = NULL); + + static const wxEventTableEntry sm_eventTableEntries[]; + +protected: + // hooks for wxWindow used by ProcessEvent() + // ----------------------------------------- + + // this one is called before trying our own event table to allow plugging + // in the event handlers overriding the default logic, this is used by e.g. + // validators. + virtual bool TryBefore(wxEvent& event); + + // This one is not a hook but just a helper which looks up the handler in + // this object itself. + // + // It is called from ProcessEventLocally() and normally shouldn't be called + // directly as doing it would ignore any chained event handlers + bool TryHereOnly(wxEvent& event); + + // Another helper which simply calls pre-processing hook and then tries to + // handle the event at this handler level. + bool TryBeforeAndHere(wxEvent& event) + { + return TryBefore(event) || TryHereOnly(event); + } + + // this one is called after failing to find the event handle in our own + // table to give a chance to the other windows to process it + // + // base class implementation passes the event to wxTheApp + virtual bool TryAfter(wxEvent& event); + +#if WXWIN_COMPATIBILITY_2_8 + // deprecated method: override TryBefore() instead of this one + wxDEPRECATED_BUT_USED_INTERNALLY_INLINE( + virtual bool TryValidator(wxEvent& WXUNUSED(event)), return false; ) + + wxDEPRECATED_BUT_USED_INTERNALLY_INLINE( + virtual bool TryParent(wxEvent& event), return DoTryApp(event); ) +#endif // WXWIN_COMPATIBILITY_2_8 + + + static const wxEventTable sm_eventTable; + virtual const wxEventTable *GetEventTable() const; + + static wxEventHashTable sm_eventHashTable; + virtual wxEventHashTable& GetEventHashTable() const; + + wxEvtHandler* m_nextHandler; + wxEvtHandler* m_previousHandler; + wxList* m_dynamicEvents; + wxList* m_pendingEvents; + +#if wxUSE_THREADS + // critical section protecting m_pendingEvents + wxCriticalSection m_pendingEventsLock; +#endif // wxUSE_THREADS + + // Is event handler enabled? + bool m_enabled; + + + // The user data: either an object which will be deleted by the container + // when it's deleted or some raw pointer which we do nothing with - only + // one type of data can be used with the given window (i.e. you cannot set + // the void data and then associate the container with wxClientData or vice + // versa) + union + { + wxClientData *m_clientObject; + void *m_clientData; + }; + + // what kind of data do we have? + wxClientDataType m_clientDataType; + + // client data accessors + virtual void DoSetClientObject( wxClientData *data ); + virtual wxClientData *DoGetClientObject() const; + + virtual void DoSetClientData( void *data ); + virtual void *DoGetClientData() const; + + // Search tracker objects for event connection with this sink + wxEventConnectionRef *FindRefInTrackerList(wxEvtHandler *handler); + +private: + // pass the event to wxTheApp instance, called from TryAfter() + bool DoTryApp(wxEvent& event); + + // try to process events in all handlers chained to this one + bool DoTryChain(wxEvent& event); + + // Head of the event filter linked list. + static wxEventFilter* ms_filterList; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxEvtHandler) +}; + +WX_DEFINE_ARRAY_WITH_DECL_PTR(wxEvtHandler *, wxEvtHandlerArray, class WXDLLIMPEXP_BASE); + + +// Define an inline method of wxObjectEventFunctor which couldn't be defined +// before wxEvtHandler declaration: at least Sun CC refuses to compile function +// calls through pointer to member for forward-declared classes (see #12452). +inline void wxObjectEventFunctor::operator()(wxEvtHandler *handler, wxEvent& event) +{ + wxEvtHandler * const realHandler = m_handler ? m_handler : handler; + + (realHandler->*m_method)(event); +} + +// ---------------------------------------------------------------------------- +// wxEventConnectionRef represents all connections between two event handlers +// and enables automatic disconnect when an event handler sink goes out of +// scope. Each connection/disconnect increases/decreases ref count, and +// when it reaches zero the node goes out of scope. +// ---------------------------------------------------------------------------- + +class wxEventConnectionRef : public wxTrackerNode +{ +public: + wxEventConnectionRef() : m_src(NULL), m_sink(NULL), m_refCount(0) { } + wxEventConnectionRef(wxEvtHandler *src, wxEvtHandler *sink) + : m_src(src), m_sink(sink), m_refCount(1) + { + m_sink->AddNode(this); + } + + // The sink is being destroyed + virtual void OnObjectDestroy( ) + { + if ( m_src ) + m_src->OnSinkDestroyed( m_sink ); + delete this; + } + + virtual wxEventConnectionRef *ToEventConnection() { return this; } + + void IncRef() { m_refCount++; } + void DecRef() + { + if ( !--m_refCount ) + { + // The sink holds the only external pointer to this object + if ( m_sink ) + m_sink->RemoveNode(this); + delete this; + } + } + +private: + wxEvtHandler *m_src, + *m_sink; + int m_refCount; + + friend class wxEvtHandler; + + wxDECLARE_NO_ASSIGN_CLASS(wxEventConnectionRef); +}; + +// Post a message to the given event handler which will be processed during the +// next event loop iteration. +// +// Notice that this one is not thread-safe, use wxQueueEvent() +inline void wxPostEvent(wxEvtHandler *dest, const wxEvent& event) +{ + wxCHECK_RET( dest, "need an object to post event to" ); + + dest->AddPendingEvent(event); +} + +// Wrapper around wxEvtHandler::QueueEvent(): adds an event for later +// processing, unlike wxPostEvent it is safe to use from different thread even +// for events with wxString members +inline void wxQueueEvent(wxEvtHandler *dest, wxEvent *event) +{ + wxCHECK_RET( dest, "need an object to queue event for" ); + + dest->QueueEvent(event); +} + +typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&); +typedef void (wxEvtHandler::*wxIdleEventFunction)(wxIdleEvent&); +typedef void (wxEvtHandler::*wxThreadEventFunction)(wxThreadEvent&); + +#define wxEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxEventFunction, func) +#define wxIdleEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxIdleEventFunction, func) +#define wxThreadEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxThreadEventFunction, func) + +#if wxUSE_GUI + +// ---------------------------------------------------------------------------- +// wxEventBlocker: helper class to temporarily disable event handling for a window +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxEventBlocker : public wxEvtHandler +{ +public: + wxEventBlocker(wxWindow *win, wxEventType type = wxEVT_ANY); + virtual ~wxEventBlocker(); + + void Block(wxEventType type) + { + m_eventsToBlock.push_back(type); + } + + virtual bool ProcessEvent(wxEvent& event); + +protected: + wxArrayInt m_eventsToBlock; + wxWindow *m_window; + + wxDECLARE_NO_COPY_CLASS(wxEventBlocker); +}; + +typedef void (wxEvtHandler::*wxCommandEventFunction)(wxCommandEvent&); +typedef void (wxEvtHandler::*wxScrollEventFunction)(wxScrollEvent&); +typedef void (wxEvtHandler::*wxScrollWinEventFunction)(wxScrollWinEvent&); +typedef void (wxEvtHandler::*wxSizeEventFunction)(wxSizeEvent&); +typedef void (wxEvtHandler::*wxMoveEventFunction)(wxMoveEvent&); +typedef void (wxEvtHandler::*wxPaintEventFunction)(wxPaintEvent&); +typedef void (wxEvtHandler::*wxNcPaintEventFunction)(wxNcPaintEvent&); +typedef void (wxEvtHandler::*wxEraseEventFunction)(wxEraseEvent&); +typedef void (wxEvtHandler::*wxMouseEventFunction)(wxMouseEvent&); +typedef void (wxEvtHandler::*wxCharEventFunction)(wxKeyEvent&); +typedef void (wxEvtHandler::*wxFocusEventFunction)(wxFocusEvent&); +typedef void (wxEvtHandler::*wxChildFocusEventFunction)(wxChildFocusEvent&); +typedef void (wxEvtHandler::*wxActivateEventFunction)(wxActivateEvent&); +typedef void (wxEvtHandler::*wxMenuEventFunction)(wxMenuEvent&); +typedef void (wxEvtHandler::*wxJoystickEventFunction)(wxJoystickEvent&); +typedef void (wxEvtHandler::*wxDropFilesEventFunction)(wxDropFilesEvent&); +typedef void (wxEvtHandler::*wxInitDialogEventFunction)(wxInitDialogEvent&); +typedef void (wxEvtHandler::*wxSysColourChangedEventFunction)(wxSysColourChangedEvent&); +typedef void (wxEvtHandler::*wxDisplayChangedEventFunction)(wxDisplayChangedEvent&); +typedef void (wxEvtHandler::*wxUpdateUIEventFunction)(wxUpdateUIEvent&); +typedef void (wxEvtHandler::*wxCloseEventFunction)(wxCloseEvent&); +typedef void (wxEvtHandler::*wxShowEventFunction)(wxShowEvent&); +typedef void (wxEvtHandler::*wxIconizeEventFunction)(wxIconizeEvent&); +typedef void (wxEvtHandler::*wxMaximizeEventFunction)(wxMaximizeEvent&); +typedef void (wxEvtHandler::*wxNavigationKeyEventFunction)(wxNavigationKeyEvent&); +typedef void (wxEvtHandler::*wxPaletteChangedEventFunction)(wxPaletteChangedEvent&); +typedef void (wxEvtHandler::*wxQueryNewPaletteEventFunction)(wxQueryNewPaletteEvent&); +typedef void (wxEvtHandler::*wxWindowCreateEventFunction)(wxWindowCreateEvent&); +typedef void (wxEvtHandler::*wxWindowDestroyEventFunction)(wxWindowDestroyEvent&); +typedef void (wxEvtHandler::*wxSetCursorEventFunction)(wxSetCursorEvent&); +typedef void (wxEvtHandler::*wxNotifyEventFunction)(wxNotifyEvent&); +typedef void (wxEvtHandler::*wxHelpEventFunction)(wxHelpEvent&); +typedef void (wxEvtHandler::*wxContextMenuEventFunction)(wxContextMenuEvent&); +typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureChangedEvent&); +typedef void (wxEvtHandler::*wxMouseCaptureLostEventFunction)(wxMouseCaptureLostEvent&); +typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&); + + +#define wxCommandEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxCommandEventFunction, func) +#define wxScrollEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxScrollEventFunction, func) +#define wxScrollWinEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxScrollWinEventFunction, func) +#define wxSizeEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxSizeEventFunction, func) +#define wxMoveEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMoveEventFunction, func) +#define wxPaintEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxPaintEventFunction, func) +#define wxNcPaintEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxNcPaintEventFunction, func) +#define wxEraseEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxEraseEventFunction, func) +#define wxMouseEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMouseEventFunction, func) +#define wxCharEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxCharEventFunction, func) +#define wxKeyEventHandler(func) wxCharEventHandler(func) +#define wxFocusEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxFocusEventFunction, func) +#define wxChildFocusEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxChildFocusEventFunction, func) +#define wxActivateEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxActivateEventFunction, func) +#define wxMenuEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMenuEventFunction, func) +#define wxJoystickEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxJoystickEventFunction, func) +#define wxDropFilesEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxDropFilesEventFunction, func) +#define wxInitDialogEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxInitDialogEventFunction, func) +#define wxSysColourChangedEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxSysColourChangedEventFunction, func) +#define wxDisplayChangedEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxDisplayChangedEventFunction, func) +#define wxUpdateUIEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxUpdateUIEventFunction, func) +#define wxCloseEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxCloseEventFunction, func) +#define wxShowEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxShowEventFunction, func) +#define wxIconizeEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxIconizeEventFunction, func) +#define wxMaximizeEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMaximizeEventFunction, func) +#define wxNavigationKeyEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxNavigationKeyEventFunction, func) +#define wxPaletteChangedEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxPaletteChangedEventFunction, func) +#define wxQueryNewPaletteEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxQueryNewPaletteEventFunction, func) +#define wxWindowCreateEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxWindowCreateEventFunction, func) +#define wxWindowDestroyEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxWindowDestroyEventFunction, func) +#define wxSetCursorEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxSetCursorEventFunction, func) +#define wxNotifyEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxNotifyEventFunction, func) +#define wxHelpEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxHelpEventFunction, func) +#define wxContextMenuEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxContextMenuEventFunction, func) +#define wxMouseCaptureChangedEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMouseCaptureChangedEventFunction, func) +#define wxMouseCaptureLostEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMouseCaptureLostEventFunction, func) +#define wxClipboardTextEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxClipboardTextEventFunction, func) + +#endif // wxUSE_GUI + +// N.B. In GNU-WIN32, you *have* to take the address of a member function +// (use &) or the compiler crashes... + +#define wxDECLARE_EVENT_TABLE() \ + private: \ + static const wxEventTableEntry sm_eventTableEntries[]; \ + protected: \ + static const wxEventTable sm_eventTable; \ + virtual const wxEventTable* GetEventTable() const; \ + static wxEventHashTable sm_eventHashTable; \ + virtual wxEventHashTable& GetEventHashTable() const + +// N.B.: when building DLL with Borland C++ 5.5 compiler, you must initialize +// sm_eventTable before using it in GetEventTable() or the compiler gives +// E2233 (see http://groups.google.com/groups?selm=397dcc8a%241_2%40dnews) + +#define wxBEGIN_EVENT_TABLE(theClass, baseClass) \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE1(theClass, baseClass, T1) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE2(theClass, baseClass, T1, T2) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE3(theClass, baseClass, T1, T2, T3) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE4(theClass, baseClass, T1, T2, T3, T4) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE5(theClass, baseClass, T1, T2, T3, T4, T5) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE7(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE8(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7, T8) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxEND_EVENT_TABLE() \ + wxDECLARE_EVENT_TABLE_TERMINATOR() }; + +/* + * Event table macros + */ + +// helpers for writing shorter code below: declare an event macro taking 2, 1 +// or none ids (the missing ids default to wxID_ANY) +// +// macro arguments: +// - evt one of wxEVT_XXX constants +// - id1, id2 ids of the first/last id +// - fn the function (should be cast to the right type) +#define wx__DECLARE_EVT2(evt, id1, id2, fn) \ + wxDECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL), +#define wx__DECLARE_EVT1(evt, id, fn) \ + wx__DECLARE_EVT2(evt, id, wxID_ANY, fn) +#define wx__DECLARE_EVT0(evt, fn) \ + wx__DECLARE_EVT1(evt, wxID_ANY, fn) + + +// Generic events +#define EVT_CUSTOM(event, winid, func) \ + wx__DECLARE_EVT1(event, winid, wxEventHandler(func)) +#define EVT_CUSTOM_RANGE(event, id1, id2, func) \ + wx__DECLARE_EVT2(event, id1, id2, wxEventHandler(func)) + +// EVT_COMMAND +#define EVT_COMMAND(winid, event, func) \ + wx__DECLARE_EVT1(event, winid, wxCommandEventHandler(func)) + +#define EVT_COMMAND_RANGE(id1, id2, event, func) \ + wx__DECLARE_EVT2(event, id1, id2, wxCommandEventHandler(func)) + +#define EVT_NOTIFY(event, winid, func) \ + wx__DECLARE_EVT1(event, winid, wxNotifyEventHandler(func)) + +#define EVT_NOTIFY_RANGE(event, id1, id2, func) \ + wx__DECLARE_EVT2(event, id1, id2, wxNotifyEventHandler(func)) + +// Miscellaneous +#define EVT_SIZE(func) wx__DECLARE_EVT0(wxEVT_SIZE, wxSizeEventHandler(func)) +#define EVT_SIZING(func) wx__DECLARE_EVT0(wxEVT_SIZING, wxSizeEventHandler(func)) +#define EVT_MOVE(func) wx__DECLARE_EVT0(wxEVT_MOVE, wxMoveEventHandler(func)) +#define EVT_MOVING(func) wx__DECLARE_EVT0(wxEVT_MOVING, wxMoveEventHandler(func)) +#define EVT_MOVE_START(func) wx__DECLARE_EVT0(wxEVT_MOVE_START, wxMoveEventHandler(func)) +#define EVT_MOVE_END(func) wx__DECLARE_EVT0(wxEVT_MOVE_END, wxMoveEventHandler(func)) +#define EVT_CLOSE(func) wx__DECLARE_EVT0(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(func)) +#define EVT_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_END_SESSION, wxCloseEventHandler(func)) +#define EVT_QUERY_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_QUERY_END_SESSION, wxCloseEventHandler(func)) +#define EVT_PAINT(func) wx__DECLARE_EVT0(wxEVT_PAINT, wxPaintEventHandler(func)) +#define EVT_NC_PAINT(func) wx__DECLARE_EVT0(wxEVT_NC_PAINT, wxNcPaintEventHandler(func)) +#define EVT_ERASE_BACKGROUND(func) wx__DECLARE_EVT0(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(func)) +#define EVT_CHAR(func) wx__DECLARE_EVT0(wxEVT_CHAR, wxCharEventHandler(func)) +#define EVT_KEY_DOWN(func) wx__DECLARE_EVT0(wxEVT_KEY_DOWN, wxKeyEventHandler(func)) +#define EVT_KEY_UP(func) wx__DECLARE_EVT0(wxEVT_KEY_UP, wxKeyEventHandler(func)) +#if wxUSE_HOTKEY +#define EVT_HOTKEY(winid, func) wx__DECLARE_EVT1(wxEVT_HOTKEY, winid, wxCharEventHandler(func)) +#endif +#define EVT_CHAR_HOOK(func) wx__DECLARE_EVT0(wxEVT_CHAR_HOOK, wxCharEventHandler(func)) +#define EVT_MENU_OPEN(func) wx__DECLARE_EVT0(wxEVT_MENU_OPEN, wxMenuEventHandler(func)) +#define EVT_MENU_CLOSE(func) wx__DECLARE_EVT0(wxEVT_MENU_CLOSE, wxMenuEventHandler(func)) +#define EVT_MENU_HIGHLIGHT(winid, func) wx__DECLARE_EVT1(wxEVT_MENU_HIGHLIGHT, winid, wxMenuEventHandler(func)) +#define EVT_MENU_HIGHLIGHT_ALL(func) wx__DECLARE_EVT0(wxEVT_MENU_HIGHLIGHT, wxMenuEventHandler(func)) +#define EVT_SET_FOCUS(func) wx__DECLARE_EVT0(wxEVT_SET_FOCUS, wxFocusEventHandler(func)) +#define EVT_KILL_FOCUS(func) wx__DECLARE_EVT0(wxEVT_KILL_FOCUS, wxFocusEventHandler(func)) +#define EVT_CHILD_FOCUS(func) wx__DECLARE_EVT0(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(func)) +#define EVT_ACTIVATE(func) wx__DECLARE_EVT0(wxEVT_ACTIVATE, wxActivateEventHandler(func)) +#define EVT_ACTIVATE_APP(func) wx__DECLARE_EVT0(wxEVT_ACTIVATE_APP, wxActivateEventHandler(func)) +#define EVT_HIBERNATE(func) wx__DECLARE_EVT0(wxEVT_HIBERNATE, wxActivateEventHandler(func)) +#define EVT_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_END_SESSION, wxCloseEventHandler(func)) +#define EVT_QUERY_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_QUERY_END_SESSION, wxCloseEventHandler(func)) +#define EVT_DROP_FILES(func) wx__DECLARE_EVT0(wxEVT_DROP_FILES, wxDropFilesEventHandler(func)) +#define EVT_INIT_DIALOG(func) wx__DECLARE_EVT0(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(func)) +#define EVT_SYS_COLOUR_CHANGED(func) wx__DECLARE_EVT0(wxEVT_SYS_COLOUR_CHANGED, wxSysColourChangedEventHandler(func)) +#define EVT_DISPLAY_CHANGED(func) wx__DECLARE_EVT0(wxEVT_DISPLAY_CHANGED, wxDisplayChangedEventHandler(func)) +#define EVT_SHOW(func) wx__DECLARE_EVT0(wxEVT_SHOW, wxShowEventHandler(func)) +#define EVT_MAXIMIZE(func) wx__DECLARE_EVT0(wxEVT_MAXIMIZE, wxMaximizeEventHandler(func)) +#define EVT_ICONIZE(func) wx__DECLARE_EVT0(wxEVT_ICONIZE, wxIconizeEventHandler(func)) +#define EVT_NAVIGATION_KEY(func) wx__DECLARE_EVT0(wxEVT_NAVIGATION_KEY, wxNavigationKeyEventHandler(func)) +#define EVT_PALETTE_CHANGED(func) wx__DECLARE_EVT0(wxEVT_PALETTE_CHANGED, wxPaletteChangedEventHandler(func)) +#define EVT_QUERY_NEW_PALETTE(func) wx__DECLARE_EVT0(wxEVT_QUERY_NEW_PALETTE, wxQueryNewPaletteEventHandler(func)) +#define EVT_WINDOW_CREATE(func) wx__DECLARE_EVT0(wxEVT_CREATE, wxWindowCreateEventHandler(func)) +#define EVT_WINDOW_DESTROY(func) wx__DECLARE_EVT0(wxEVT_DESTROY, wxWindowDestroyEventHandler(func)) +#define EVT_SET_CURSOR(func) wx__DECLARE_EVT0(wxEVT_SET_CURSOR, wxSetCursorEventHandler(func)) +#define EVT_MOUSE_CAPTURE_CHANGED(func) wx__DECLARE_EVT0(wxEVT_MOUSE_CAPTURE_CHANGED, wxMouseCaptureChangedEventHandler(func)) +#define EVT_MOUSE_CAPTURE_LOST(func) wx__DECLARE_EVT0(wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEventHandler(func)) + +// Mouse events +#define EVT_LEFT_DOWN(func) wx__DECLARE_EVT0(wxEVT_LEFT_DOWN, wxMouseEventHandler(func)) +#define EVT_LEFT_UP(func) wx__DECLARE_EVT0(wxEVT_LEFT_UP, wxMouseEventHandler(func)) +#define EVT_MIDDLE_DOWN(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(func)) +#define EVT_MIDDLE_UP(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_UP, wxMouseEventHandler(func)) +#define EVT_RIGHT_DOWN(func) wx__DECLARE_EVT0(wxEVT_RIGHT_DOWN, wxMouseEventHandler(func)) +#define EVT_RIGHT_UP(func) wx__DECLARE_EVT0(wxEVT_RIGHT_UP, wxMouseEventHandler(func)) +#define EVT_MOTION(func) wx__DECLARE_EVT0(wxEVT_MOTION, wxMouseEventHandler(func)) +#define EVT_LEFT_DCLICK(func) wx__DECLARE_EVT0(wxEVT_LEFT_DCLICK, wxMouseEventHandler(func)) +#define EVT_MIDDLE_DCLICK(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(func)) +#define EVT_RIGHT_DCLICK(func) wx__DECLARE_EVT0(wxEVT_RIGHT_DCLICK, wxMouseEventHandler(func)) +#define EVT_LEAVE_WINDOW(func) wx__DECLARE_EVT0(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(func)) +#define EVT_ENTER_WINDOW(func) wx__DECLARE_EVT0(wxEVT_ENTER_WINDOW, wxMouseEventHandler(func)) +#define EVT_MOUSEWHEEL(func) wx__DECLARE_EVT0(wxEVT_MOUSEWHEEL, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX1_DOWN(func) wx__DECLARE_EVT0(wxEVT_AUX1_DOWN, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX1_UP(func) wx__DECLARE_EVT0(wxEVT_AUX1_UP, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX1_DCLICK(func) wx__DECLARE_EVT0(wxEVT_AUX1_DCLICK, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX2_DOWN(func) wx__DECLARE_EVT0(wxEVT_AUX2_DOWN, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX2_UP(func) wx__DECLARE_EVT0(wxEVT_AUX2_UP, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX2_DCLICK(func) wx__DECLARE_EVT0(wxEVT_AUX2_DCLICK, wxMouseEventHandler(func)) + +// All mouse events +#define EVT_MOUSE_EVENTS(func) \ + EVT_LEFT_DOWN(func) \ + EVT_LEFT_UP(func) \ + EVT_LEFT_DCLICK(func) \ + EVT_MIDDLE_DOWN(func) \ + EVT_MIDDLE_UP(func) \ + EVT_MIDDLE_DCLICK(func) \ + EVT_RIGHT_DOWN(func) \ + EVT_RIGHT_UP(func) \ + EVT_RIGHT_DCLICK(func) \ + EVT_MOUSE_AUX1_DOWN(func) \ + EVT_MOUSE_AUX1_UP(func) \ + EVT_MOUSE_AUX1_DCLICK(func) \ + EVT_MOUSE_AUX2_DOWN(func) \ + EVT_MOUSE_AUX2_UP(func) \ + EVT_MOUSE_AUX2_DCLICK(func) \ + EVT_MOTION(func) \ + EVT_LEAVE_WINDOW(func) \ + EVT_ENTER_WINDOW(func) \ + EVT_MOUSEWHEEL(func) + +// Scrolling from wxWindow (sent to wxScrolledWindow) +#define EVT_SCROLLWIN_TOP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_TOP, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_BOTTOM(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_BOTTOM, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_LINEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_LINEUP, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_LINEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_LINEDOWN, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_PAGEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_PAGEUP, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_PAGEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_PAGEDOWN, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_THUMBTRACK(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_THUMBTRACK, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_THUMBRELEASE(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_THUMBRELEASE, wxScrollWinEventHandler(func)) + +#define EVT_SCROLLWIN(func) \ + EVT_SCROLLWIN_TOP(func) \ + EVT_SCROLLWIN_BOTTOM(func) \ + EVT_SCROLLWIN_LINEUP(func) \ + EVT_SCROLLWIN_LINEDOWN(func) \ + EVT_SCROLLWIN_PAGEUP(func) \ + EVT_SCROLLWIN_PAGEDOWN(func) \ + EVT_SCROLLWIN_THUMBTRACK(func) \ + EVT_SCROLLWIN_THUMBRELEASE(func) + +// Scrolling from wxSlider and wxScrollBar +#define EVT_SCROLL_TOP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_TOP, wxScrollEventHandler(func)) +#define EVT_SCROLL_BOTTOM(func) wx__DECLARE_EVT0(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(func)) +#define EVT_SCROLL_LINEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(func)) +#define EVT_SCROLL_LINEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(func)) +#define EVT_SCROLL_PAGEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(func)) +#define EVT_SCROLL_PAGEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(func)) +#define EVT_SCROLL_THUMBTRACK(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(func)) +#define EVT_SCROLL_THUMBRELEASE(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(func)) +#define EVT_SCROLL_CHANGED(func) wx__DECLARE_EVT0(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(func)) + +#define EVT_SCROLL(func) \ + EVT_SCROLL_TOP(func) \ + EVT_SCROLL_BOTTOM(func) \ + EVT_SCROLL_LINEUP(func) \ + EVT_SCROLL_LINEDOWN(func) \ + EVT_SCROLL_PAGEUP(func) \ + EVT_SCROLL_PAGEDOWN(func) \ + EVT_SCROLL_THUMBTRACK(func) \ + EVT_SCROLL_THUMBRELEASE(func) \ + EVT_SCROLL_CHANGED(func) + +// Scrolling from wxSlider and wxScrollBar, with an id +#define EVT_COMMAND_SCROLL_TOP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_TOP, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_BOTTOM(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_BOTTOM, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_LINEUP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_LINEUP, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_LINEDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_LINEDOWN, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_PAGEUP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_PAGEUP, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_PAGEDOWN, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBTRACK, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBRELEASE, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_CHANGED(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_CHANGED, winid, wxScrollEventHandler(func)) + +#define EVT_COMMAND_SCROLL(winid, func) \ + EVT_COMMAND_SCROLL_TOP(winid, func) \ + EVT_COMMAND_SCROLL_BOTTOM(winid, func) \ + EVT_COMMAND_SCROLL_LINEUP(winid, func) \ + EVT_COMMAND_SCROLL_LINEDOWN(winid, func) \ + EVT_COMMAND_SCROLL_PAGEUP(winid, func) \ + EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) \ + EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) \ + EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) \ + EVT_COMMAND_SCROLL_CHANGED(winid, func) + +#if WXWIN_COMPATIBILITY_2_6 + // compatibility macros for the old name, deprecated in 2.8 + #define wxEVT_SCROLL_ENDSCROLL wxEVT_SCROLL_CHANGED + #define EVT_COMMAND_SCROLL_ENDSCROLL EVT_COMMAND_SCROLL_CHANGED + #define EVT_SCROLL_ENDSCROLL EVT_SCROLL_CHANGED +#endif // WXWIN_COMPATIBILITY_2_6 + +// Convenience macros for commonly-used commands +#define EVT_CHECKBOX(winid, func) wx__DECLARE_EVT1(wxEVT_CHECKBOX, winid, wxCommandEventHandler(func)) +#define EVT_CHOICE(winid, func) wx__DECLARE_EVT1(wxEVT_CHOICE, winid, wxCommandEventHandler(func)) +#define EVT_LISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_LISTBOX, winid, wxCommandEventHandler(func)) +#define EVT_LISTBOX_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_LISTBOX_DCLICK, winid, wxCommandEventHandler(func)) +#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_MENU, winid, wxCommandEventHandler(func)) +#define EVT_MENU_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_MENU, id1, id2, wxCommandEventHandler(func)) +#if defined(__SMARTPHONE__) +# define EVT_BUTTON(winid, func) EVT_MENU(winid, func) +#else +# define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_BUTTON, winid, wxCommandEventHandler(func)) +#endif +#define EVT_SLIDER(winid, func) wx__DECLARE_EVT1(wxEVT_SLIDER, winid, wxCommandEventHandler(func)) +#define EVT_RADIOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_RADIOBOX, winid, wxCommandEventHandler(func)) +#define EVT_RADIOBUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_RADIOBUTTON, winid, wxCommandEventHandler(func)) +// EVT_SCROLLBAR is now obsolete since we use EVT_COMMAND_SCROLL... events +#define EVT_SCROLLBAR(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLLBAR, winid, wxCommandEventHandler(func)) +#define EVT_VLBOX(winid, func) wx__DECLARE_EVT1(wxEVT_VLBOX, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX, winid, wxCommandEventHandler(func)) +#define EVT_TOOL(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_DROPDOWN, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_TOOL, id1, id2, wxCommandEventHandler(func)) +#define EVT_TOOL_RCLICKED(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_RCLICKED, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_RCLICKED_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_TOOL_RCLICKED, id1, id2, wxCommandEventHandler(func)) +#define EVT_TOOL_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_ENTER, winid, wxCommandEventHandler(func)) +#define EVT_CHECKLISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_CHECKLISTBOX, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX_DROPDOWN, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX_CLOSEUP(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX_CLOSEUP, winid, wxCommandEventHandler(func)) + +// Generic command events +#define EVT_COMMAND_LEFT_CLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LEFT_CLICK, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_LEFT_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LEFT_DCLICK, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_RIGHT_CLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RIGHT_CLICK, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_RIGHT_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RIGHT_DCLICK, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_SET_FOCUS(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SET_FOCUS, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_KILL_FOCUS(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_KILL_FOCUS, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_ENTER, winid, wxCommandEventHandler(func)) + +// Joystick events + +#define EVT_JOY_BUTTON_DOWN(func) wx__DECLARE_EVT0(wxEVT_JOY_BUTTON_DOWN, wxJoystickEventHandler(func)) +#define EVT_JOY_BUTTON_UP(func) wx__DECLARE_EVT0(wxEVT_JOY_BUTTON_UP, wxJoystickEventHandler(func)) +#define EVT_JOY_MOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_MOVE, wxJoystickEventHandler(func)) +#define EVT_JOY_ZMOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_ZMOVE, wxJoystickEventHandler(func)) + +// All joystick events +#define EVT_JOYSTICK_EVENTS(func) \ + EVT_JOY_BUTTON_DOWN(func) \ + EVT_JOY_BUTTON_UP(func) \ + EVT_JOY_MOVE(func) \ + EVT_JOY_ZMOVE(func) + +// Idle event +#define EVT_IDLE(func) wx__DECLARE_EVT0(wxEVT_IDLE, wxIdleEventHandler(func)) + +// Update UI event +#define EVT_UPDATE_UI(winid, func) wx__DECLARE_EVT1(wxEVT_UPDATE_UI, winid, wxUpdateUIEventHandler(func)) +#define EVT_UPDATE_UI_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_UPDATE_UI, id1, id2, wxUpdateUIEventHandler(func)) + +// Help events +#define EVT_HELP(winid, func) wx__DECLARE_EVT1(wxEVT_HELP, winid, wxHelpEventHandler(func)) +#define EVT_HELP_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_HELP, id1, id2, wxHelpEventHandler(func)) +#define EVT_DETAILED_HELP(winid, func) wx__DECLARE_EVT1(wxEVT_DETAILED_HELP, winid, wxHelpEventHandler(func)) +#define EVT_DETAILED_HELP_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_DETAILED_HELP, id1, id2, wxHelpEventHandler(func)) + +// Context Menu Events +#define EVT_CONTEXT_MENU(func) wx__DECLARE_EVT0(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(func)) +#define EVT_COMMAND_CONTEXT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_CONTEXT_MENU, winid, wxContextMenuEventHandler(func)) + +// Clipboard text Events +#define EVT_TEXT_CUT(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_CUT, winid, wxClipboardTextEventHandler(func)) +#define EVT_TEXT_COPY(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_COPY, winid, wxClipboardTextEventHandler(func)) +#define EVT_TEXT_PASTE(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_PASTE, winid, wxClipboardTextEventHandler(func)) + +// Thread events +#define EVT_THREAD(id, func) wx__DECLARE_EVT1(wxEVT_THREAD, id, wxThreadEventHandler(func)) + +// ---------------------------------------------------------------------------- +// Helper functions +// ---------------------------------------------------------------------------- + +// This is an ugly hack to allow the use of Bind() instead of Connect() inside +// the library code if the library was built with support for it, here is how +// it is used: +// +// class SomeEventHandlingClass : wxBIND_OR_CONNECT_HACK_BASE_CLASS +// public SomeBaseClass +// { +// public: +// SomeEventHandlingClass(wxWindow *win) +// { +// // connect to the event for the given window +// wxBIND_OR_CONNECT_HACK(win, wxEVT_SOMETHING, wxSomeEventHandler, +// SomeEventHandlingClass::OnSomeEvent, this); +// } +// +// private: +// void OnSomeEvent(wxSomeEvent&) { ... } +// }; +// +// This is *not* meant to be used by library users, it is only defined here +// (and not in a private header) because the base class must be visible from +// other public headers, please do NOT use this in your code, it will be +// removed from future wx versions without warning. +#ifdef wxHAS_EVENT_BIND + #define wxBIND_OR_CONNECT_HACK_BASE_CLASS + #define wxBIND_OR_CONNECT_HACK_ONLY_BASE_CLASS + #define wxBIND_OR_CONNECT_HACK(win, evt, handler, func, obj) \ + win->Bind(evt, &func, obj) +#else // wxHAS_EVENT_BIND + #define wxBIND_OR_CONNECT_HACK_BASE_CLASS public wxEvtHandler, + #define wxBIND_OR_CONNECT_HACK_ONLY_BASE_CLASS : public wxEvtHandler + #define wxBIND_OR_CONNECT_HACK(win, evt, handler, func, obj) \ + win->Connect(evt, handler(func), NULL, obj) +#endif // wxHAS_EVENT_BIND + +#if wxUSE_GUI + +// Find a window with the focus, that is also a descendant of the given window. +// This is used to determine the window to initially send commands to. +WXDLLIMPEXP_CORE wxWindow* wxFindFocusDescendant(wxWindow* ancestor); + +#endif // wxUSE_GUI + + +// ---------------------------------------------------------------------------- +// Compatibility macro aliases +// ---------------------------------------------------------------------------- + +// deprecated variants _not_ requiring a semicolon after them and without wx prefix +// (note that also some wx-prefixed macro do _not_ require a semicolon because +// it's not always possible to force the compire to require it) + +#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \ + wxDECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) +#define DECLARE_EVENT_TABLE_TERMINATOR() wxDECLARE_EVENT_TABLE_TERMINATOR() +#define DECLARE_EVENT_TABLE() wxDECLARE_EVENT_TABLE(); +#define BEGIN_EVENT_TABLE(a,b) wxBEGIN_EVENT_TABLE(a,b) +#define BEGIN_EVENT_TABLE_TEMPLATE1(a,b,c) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c) +#define BEGIN_EVENT_TABLE_TEMPLATE2(a,b,c,d) wxBEGIN_EVENT_TABLE_TEMPLATE2(a,b,c,d) +#define BEGIN_EVENT_TABLE_TEMPLATE3(a,b,c,d,e) wxBEGIN_EVENT_TABLE_TEMPLATE3(a,b,c,d,e) +#define BEGIN_EVENT_TABLE_TEMPLATE4(a,b,c,d,e,f) wxBEGIN_EVENT_TABLE_TEMPLATE4(a,b,c,d,e,f) +#define BEGIN_EVENT_TABLE_TEMPLATE5(a,b,c,d,e,f,g) wxBEGIN_EVENT_TABLE_TEMPLATE5(a,b,c,d,e,f,g) +#define BEGIN_EVENT_TABLE_TEMPLATE6(a,b,c,d,e,f,g,h) wxBEGIN_EVENT_TABLE_TEMPLATE6(a,b,c,d,e,f,g,h) +#define END_EVENT_TABLE() wxEND_EVENT_TABLE() + +// other obsolete event declaration/definition macros; we don't need them any longer +// but we keep them for compatibility as it doesn't cost us anything anyhow +#define BEGIN_DECLARE_EVENT_TYPES() +#define END_DECLARE_EVENT_TYPES() +#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \ + extern expdecl const wxEventType name; +#define DECLARE_EVENT_TYPE(name, value) \ + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, name, value) +#define DECLARE_LOCAL_EVENT_TYPE(name, value) \ + DECLARE_EXPORTED_EVENT_TYPE(wxEMPTY_PARAMETER_VALUE, name, value) +#define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType(); +#define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name) + +// alias for backward compatibility with 2.9.0: +#define wxEVT_COMMAND_THREAD wxEVT_THREAD +// other old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_BUTTON_CLICKED wxEVT_BUTTON +#define wxEVT_COMMAND_CHECKBOX_CLICKED wxEVT_CHECKBOX +#define wxEVT_COMMAND_CHOICE_SELECTED wxEVT_CHOICE +#define wxEVT_COMMAND_LISTBOX_SELECTED wxEVT_LISTBOX +#define wxEVT_COMMAND_LISTBOX_DOUBLECLICKED wxEVT_LISTBOX_DCLICK +#define wxEVT_COMMAND_CHECKLISTBOX_TOGGLED wxEVT_CHECKLISTBOX +#define wxEVT_COMMAND_MENU_SELECTED wxEVT_MENU +#define wxEVT_COMMAND_TOOL_CLICKED wxEVT_TOOL +#define wxEVT_COMMAND_SLIDER_UPDATED wxEVT_SLIDER +#define wxEVT_COMMAND_RADIOBOX_SELECTED wxEVT_RADIOBOX +#define wxEVT_COMMAND_RADIOBUTTON_SELECTED wxEVT_RADIOBUTTON +#define wxEVT_COMMAND_SCROLLBAR_UPDATED wxEVT_SCROLLBAR +#define wxEVT_COMMAND_VLBOX_SELECTED wxEVT_VLBOX +#define wxEVT_COMMAND_COMBOBOX_SELECTED wxEVT_COMBOBOX +#define wxEVT_COMMAND_TOOL_RCLICKED wxEVT_TOOL_RCLICKED +#define wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED wxEVT_TOOL_DROPDOWN +#define wxEVT_COMMAND_TOOL_ENTER wxEVT_TOOL_ENTER +#define wxEVT_COMMAND_COMBOBOX_DROPDOWN wxEVT_COMBOBOX_DROPDOWN +#define wxEVT_COMMAND_COMBOBOX_CLOSEUP wxEVT_COMBOBOX_CLOSEUP +#define wxEVT_COMMAND_TEXT_COPY wxEVT_TEXT_COPY +#define wxEVT_COMMAND_TEXT_CUT wxEVT_TEXT_CUT +#define wxEVT_COMMAND_TEXT_PASTE wxEVT_TEXT_PASTE +#define wxEVT_COMMAND_TEXT_UPDATED wxEVT_TEXT + +#endif // _WX_EVENT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/.pc/wx-config-conditionalise-webview-in-std.patch/wx-config.in b/3rdparty/wxwidgets3.0-3.0.1/.pc/wx-config-conditionalise-webview-in-std.patch/wx-config.in new file mode 100755 index 0000000000..ede85833a0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/.pc/wx-config-conditionalise-webview-in-std.patch/wx-config.in @@ -0,0 +1,1391 @@ +#!/bin/sh +# +# Name: wx-config{.in,} +# Purpose: wx configuration search and query tool {template,} +# Author: Ron +# Modified by: +# Created: 8/9/2004 +# Copyright: (c) 2004 Ron +# Essentially a fresh start this time around, but for maximum +# compatibility basic code was taken from, and heavy reference +# made to, the previously unattributed wx-config from cvs. +# All the usual suspects contributed to the dicussion that led +# to this new work and likewise to the ideas and content in the +# original (which was probably influenced by gtk), among them: +# Robert Roebling, Vadim Zeitlin, Vaclav Slavik, Robin Dunn +# Licence: wxWindows licence +############################################################################ + +# Extra^2 debug mode, for if things ever get really weird. +[ -z "$WXDEBUG_X" ] || set -x + + +# On with some basic stuff, like the ability to die gracefully, +# and to tell people what we are about. +# ------------------------------------------------------------------ + +# decho _message +# Output a message to stderr. +decho() { echo "$*" 1>&2; } + +# usage _exitcode +# Outputs a usage message to stderr and exits with _exitcode. +# Try to keep this to a single page (ie. < 25 lines). We can add +# alternate or interactive help targets if people want more detail. +# +# Exit codes are now subject to a more strict interpretation. +# wx-config should return 0 upon successful operation, 1 if the +# reqested operation could not be completed successfully, and 2 +# if the requested operation is not supported by this version of +# wx-config. +usage() +{ + cat 1>&2 < /dev/null && ls | grep -v "^inplace-"` + +is_cross && target="@host_alias@" + +# Define a pseudo-hash to contain the specification of this wx-config +# instance and its associated library. +this_host="${target:+${target}}" +this_toolkit="@TOOLKIT_DIR@@TOOLKIT_VERSION@" +this_widgetset="@WIDGET_SET@" +this_chartype="@WX_CHARTYPE@" +this_debugtype="release" +this_flavour="@WX_FLAVOUR@" +this_version="@WX_RELEASE@" +this_linkage=`[ "x@SHARED@" = "x1" ] || echo 'static'` + + +# Extract the user specification from the options parsed. +m_host=${input_option_host:+"${input_option_host}-?"} +m_host=${m_host:-$this_host} +m_toolkit=${input_option_toolkit:-'[^-]+'} +m_widgetset=${input_option_widgetset-'(univ)?'} +m_chartype=${input_option_chartype:-'(unicode|ansi)'} +m_debugtype=${input_option_debugtype:-'(debug|release)'} +m_flavour=${input_option_flavour:+-$input_option_flavour} +m_flavour=${m_flavour:-${input_option_flavour-'(-[^-]+)?'}} +m_version=${input_option_version:-'[0-9]+\.[0-9]+'} +m_linkage=${input_option_linkage-'?(static)?'} + +# Test whether or not --version has been specified +# +# This must be done after getting the input options so get_mask works correctly +# since it is version-dependent + +if [ -z "$input_option_version" ]; then + m_ourversion="2.9" +else + m_ourversion=$m_version +fi + +this_config=`get_mask this` + +configmask="^`get_mask`$" + + +# Dump the user specification in debug mode. +if [ -n "$WXDEBUG" ]; then + + decho + decho " prefix = '$prefix'" + decho " exec_prefix = '$exec_prefix'" + decho " wxconfdir = '$wxconfdir'" + + decho " m_host = '$m_host'" + decho " m_toolkit = '$m_toolkit'" + decho " m_widgetset = '$m_widgetset'" + decho " m_chartype = '$m_chartype'" + decho " m_debugtype = '$m_debugtype'" + decho " m_flavour = '$m_flavour'" + decho " m_version = '$m_version'" + decho " m_linkage = '$m_linkage'" + + decho " configmask = '$configmask'" + decho " this config = '$this_config'" + decho + +fi + + + +# From here on, we'll need to be able to figure out a delegation target. +# ----------------------------------------------------------------------- + +# The rules for delegation are: +# +# 1. If the specification is so general that it matches the default config +# (ie. this one on a first pass), then the default config will be used +# even if other installed libs would also match the spec. +# +# 2. If the default config does not match, find a list of all installed +# libraries that do match. +# a. If that list is empty, the specification is incompatible +# with any installed lib. Warn and abort. +# b. If that list contains exactly one candidate. Delegate to +# that candidate. +# c. If the list contains multiple candidates, pass on to step 3. +# +# 3. Attempt to discriminate among rival candidates by their similarity +# to the default configuration (ie. this one). If we can find a unique +# candidate in this way, delegate to it. If not, present a list of +# options to the user and request that they disambiguate it with one or +# more additional fields. +# +# To refine the specified pattern, we specialise each unbound field +# using the default value from this config file. If that results in +# no matches, we unbind it again and try the next field. If it still +# results in multiple matches we try binding the next field as well +# until a unique or null result again occurs. +# +# A more general way to look at this, is the feature specifiers are all +# modifiers of the wx-config you are calling. If you supply none, the +# default for that build configuration will be used. If you supply one +# or more that the default build cannot satisfy, it will try to find the +# config most like itself with the desired feature(s) enabled. +# The features configured into the first wx-config called will be taken +# as implicitly specified if it is necessary to disambiguate likely +# candidates from the information that was explicitly provided. + + +# But first, more sugar to keep what follows clear and legible. +# -------------------------------------------------------------- + +# find_eligible_delegates _mask +# Outputs all the config files installed which match the +# (extended regex) _mask passed as an argument. +find_eligible_delegates() { echo "$installed_configs" | $EGREP "$1" 2> /dev/null; } + +# user_mask_fits _config +# Returns true if the string _config satisfies the user specified mask. +user_mask_fits() { echo "$1" | $EGREP "$configmask" > /dev/null 2>&1; } + +# count_fields _word +# Returns the number of IFS split fields in _word +count_fields() { return $#; } + +# count_delegates _mask +# Return the number of eligible config files that match _mask +count_delegates() { count_fields `find_eligible_delegates $1`; } + +# is_set _variablename +# Returns true if $_variablename is initialised. +is_set() { [ "x`eval echo \"\\\${$1-unset}\"`" != "xunset" ]; } + +# not _cmd _args... +# true iff _cmd is false +not() { if "$@"; then false; else true; fi; } + +# do_find_best_delegate _unbound-options +# The real worker part of find_best_delegate below. Recurses though all +# unbound options binding them one at a time to the default derived from +# this file until a unique match is made or no alternatives remain that +# may be sensibly guessed at. It will preferentially bind the unspecified +# options in the order they are listed in wxconfig_schema. Using this +# partial ordering it should find the first match with the most significant +# similarity to this file that unambiguously meets the user specification. +# If such a match exists it will be output to stdout. +# +# Be careful if you modify this function. If the pruning logic is rendered +# inoperative it will simply recurse over every permutation in the search +# space, which may still appear to work, but add a couple more options (or +# explicitly specify a few less) and you may not live long enough to learn +# the result. WXDEBUG=findprogress is your friend here, it will show you +# how many nodes get searched before a result. If you start seeing +# increases in that number for the same input, check your work. +# Raising the number of discriminating options from 6 to 8 raised the worst +# case time for this to run (without pruning) from 3 to nearly 15 seconds +# and its downhill fast from here if we have to ride that boat. +# Early pruning still gets that down to under half a second (up from about +# .25), so we have some breathing space yet before a different search method +# will be called for, but let's not squander it. +do_find_best_delegate() +{ + ( + if [ "x$WXDEBUG" = "xverbose" ]; then + _fbd_indent="${_fbd_indent}. " + decho " $_fbd_indent---> unbound options: $*" + fi + + for i do + + if [ "x$WXDEBUG" = "xverbose" ]; then + decho " ${_fbd_indent}binding '$i' with '`remove_field $i $*`' still free" + [ -z "$_pruned" ] || decho " ${_fbd_indent} --- pruned: $_pruned ---" + fi + + if ( + eval m_$i=\$this_$i + _mask="^`get_mask`$" + + if [ "x$WXDEBUG" = "xverbose" ]; then + decho " ${_fbd_indent} checking: $_mask" + count_delegates "$_mask" + decho " $_fbd_indent $? eligible delegates" + for d in `find_eligible_delegates "$_mask"`; do + decho " ${_fbd_indent} $d" + done + fi + + count_delegates "$_mask" + _still_eligible=$? + + if [ $_still_eligible -eq 1 ]; then + echo `find_eligible_delegates "$_mask"` + return + fi + + [ "x$WXDEBUG" != "xfindprogress" ] || printf "." 1>&2 + + [ $_still_eligible -gt 1 ] && [ $# -gt 1 ] && + do_find_best_delegate `remove_field $i $*` + ) + then + + return + + elif [ $# -gt 1 ]; then + + if [ "x$WXDEBUG" = "xverbose" ]; then + decho " ${_fbd_indent}pruning: $i" + _pruned="${_pruned:+$_pruned }$i" + fi + set `remove_field $i $*` + + fi + + done + false + ) +} + +# find_best_delegate +# A simple wrapper around do_find_best_delegate that first determines +# the unbound options (ie. the ones that the user did not explicitly +# declare a preference for on the command line) +find_best_delegate() +{ + for _fbdi in $wxconfig_schema; do + is_set input_option_$_fbdi || + _unbound_options="${_unbound_options:+$_unbound_options }$_fbdi" + done + do_find_best_delegate $_unbound_options +} + + +# Legacy wx-config helpers. +# ------------------------- + +# get_legacy_mask +# Returns a mask in the format used by wx2.4. +get_legacy_mask() +{ + [ $# -gt 0 ] || set m + eval [ "x\${$1_chartype}" != "xunicode" ] || _unicode_flag=u + eval echo "wx\${$1_toolkit}${_unicode_flag}-\${$1_version}\${$1_host}-config" +} + +# find_legacy_configs +# Returns a list of configs installed by wx2.4 releases. +find_legacy_configs() +{ + ( + cd "$prefix/bin" && + { + ls wx*-2.4-config | grep -v ^wxbase + ls wx*-2.4-config | grep ^wxbase + } + ) 2> /dev/null +} + +# find_best_legacy_config +# Returns the best legacy config for a given specification. +# This assumes no matching new style config has been found. +find_best_legacy_config() +{ + _legacy_configs=`find_legacy_configs` + if [ -n "$_legacy_configs" ]; then + _legacy_mask=`get_legacy_mask` + for d in $_legacy_configs; do + if echo $d | $EGREP $_legacy_mask > /dev/null 2>&1 ; then + echo "$d" + return + fi + done + fi + false +} + + + +# The only action we can perform authoritatively prior to delegation +# is to list all the possible delegates. +# -------------------------------------------------------------- + +config_spec="$0 $*" +[ -z "$WXDEBUG" ] || config_spec=$configmask + +# Next chance for another satisfied customer then +# +# If we want to get really polished here we can do plural checking, +# but we should probably leave that until the day we gettextise it. +if [ -n "$output_option_list" ]; then + + _remains_in_prefix=$installed_configs + _delegates=`find_eligible_delegates $configmask` + _best_delegate=`find_best_delegate` + + if [ "x$WXDEBUG" = "xverbose" ]; then + decho + decho " all = $_remains_in_prefix" + decho " matching = $_delegates" + decho " best = $_best_delegate" + decho " this = $this_config" + fi + + for d in $_delegates; do + _remains_in_prefix=`remove_field $d $_remains_in_prefix` + done + + echo + echo " Default config is $this_config" + echo + + if user_mask_fits "$this_config" ; then + + echo " Default config ${this_exec_prefix+in $this_exec_prefix }will be used for output" + + if match_field "$this_config" $_delegates ; then + _delegates=`remove_field $this_config $_delegates` + else + echo " though it is not installed in: $prefix" + if [ -n "$_best_delegate" ] && [ "x$_best_delegate" != "x$this_config" ]; then + echo + echo " Best alternate in $prefix:" + echo " $_best_delegate" + fi + fi + + elif [ -n "$_best_delegate" ]; then + + echo " Specification best match: $_best_delegate" + + elif [ -z "$_delegates" ]; then + + _last_chance=`find_best_legacy_config` + if [ -n "$_last_chance" ]; then + + echo " Specification matches legacy config: $_last_chance" + + else + + cat <<-EOF + No config found to match: $config_spec + in $wxconfdir + + Please install the desired library build, or specify a different + prefix where it may be found. If the library is not installed + you may call its wx-config directly by specifying its full path. + +EOF + + fi + + else + echo " Specification was ambiguous. Use additional feature options" + echo " to choose between alternate matches." + fi + + _delegates=`remove_field "$_best_delegate" $_delegates` + + if [ -n "$_delegates" ]; then + echo + echo " Alternate matches:" + for d in $_delegates; do + echo " $d" + done + fi + if [ -n "$_remains_in_prefix" ]; then + echo + echo " Also available in $prefix:" + for d in $_remains_in_prefix; do + echo " $d" + done + fi + + _legacy_configs=`find_legacy_configs` + if [ -n "$_legacy_configs" ]; then + echo + echo " Legacy configs available in $prefix:" + for d in $_legacy_configs; do + echo " $d" | sed 's/-config$//' + done + fi + + echo + exit +fi + + + +# ... so if that wasn't what they wanted, then we need to know for +# certain, can this config satisfy the user specification? +# -------------------------------------------------------------- + +if not user_mask_fits "$this_config" ; then + + # No? Then let's see if it knows anybody who can. + # But first, just be sure someone hasn't typo'd us into a loop. + # In present day wx, correct delegation should never need more + # than one hop so this is trivial to detect. + + if [ -n "$WXCONFIG_DELEGATED" ]; then + decho + decho " *** Error: Bad config delegation" + decho + decho " to: $0" + decho " ($this_config) cannot satisfy:" + decho " $config_spec" + decho " Someone has been terribly careless." + decho + exit 1 + fi + + count_delegates "$configmask" + _numdelegates=$? + + if [ -n "$WXDEBUG" ]; then + decho " must delegate to an alternate config" + decho " potential delegates ($_numdelegates):" + for i in `find_eligible_delegates "$configmask"`; do + decho " $i" + done + fi + + if [ $_numdelegates -eq 0 ]; then + + _last_chance=`find_best_legacy_config` + if [ -n "$_last_chance" ]; then + + for arg do + case "$arg" in + --prefix*|--exec-prefix*| \ + --version|--release|--basename| \ + --static|--libs|--gl_libs| \ + --cppflags|--cflags|--cxxflags| \ + --cc|--cxx|--ld| \ + --rezflags|--inplace) + _legacy_args="$_legacy_args $arg" + ;; + + --static|--static=y*|--static=Y*) + _legacy_args="$_legacy_args --static" + ;; + esac + done + + if [ -n "$WXDEBUG" ]; then + decho " found a suitable legacy delegate: $_last_chance" + decho "--> $prefix/bin/$_last_chance $_legacy_args" + fi + + WXCONFIG_DELEGATED=yes + export WXCONFIG_DELEGATED + $prefix/bin/$_last_chance $_legacy_args + exit + + else + + cat 1>&2 <<-EOF + + Warning: No config found to match: $config_spec + in $wxconfdir + If you require this configuration, please install the desired + library build. If this is part of an automated configuration + test and no other errors occur, you may safely ignore it. + You may use wx-config --list to see all configs available in + the default prefix. + +EOF + + # PIPEDREAM: from here we are actually just a teensy step + # from simply building the missing config for the user + # on the fly if this is an in tree wx-config. + + exit 1 + fi + fi + + if [ $_numdelegates -gt 1 ]; then + + [ -z "$WXDEBUG" ] || decho " must prune the list of eligible delegates" + + best_delegate=`find_best_delegate` + + if [ -n "$best_delegate" ]; then + + if [ -n "$WXDEBUG" ]; then + decho " found a suitable delegate: $best_delegate" + decho "--> $wxconfdir/$best_delegate $*" + fi + + WXCONFIG_DELEGATED=yes + export WXCONFIG_DELEGATED + $wxconfdir/$best_delegate $* + exit + fi + + decho + decho " *** Error: Specification is ambiguous" + decho " as $config_spec" + decho " Use additional feature options to choose between:" + for i in `find_eligible_delegates "$configmask"`; do + decho " $i" + done + decho + + exit 1 + fi + + if [ -n "$WXDEBUG" ]; then + decho " using the only suitable delegate" + decho "--> $wxconfdir/`find_eligible_delegates $configmask` $*" + fi + + WXCONFIG_DELEGATED=yes + export WXCONFIG_DELEGATED + $wxconfdir/`find_eligible_delegates $configmask` $* + exit +fi + + + +# If we are still here, then from now on we are responsible for +# all the user's needs. Time to rustle up some output for them. +# -------------------------------------------------------------- + +[ -z "$WXDEBUG" ] || decho " using this config" + +# If the user supplied a prefix, and the in tree config did not +# delegate out to anything in that prefix, then reset the build +# tree prefix to provide the correct output for using this +# uninstalled wx build. Or put more simply: +prefix=${this_prefix-$prefix} +exec_prefix=${this_exec_prefix-$exec_prefix} + +includedir="@includedir@" +libdir="@libdir@" +bindir="@bindir@" + +# Trivial queries we can answer now. +[ -z "$output_option_prefix" ] || echo $prefix +[ -z "$output_option_exec_prefix" ] || echo $exec_prefix +[ -z "$output_option_release" ] || echo "@WX_RELEASE@" +[ -z "$output_option_version" ] || echo "@WX_VERSION@" +[ -z "$output_option_version_full" ] || echo "@WX_SUBVERSION@" +[ -z "$output_option_basename" ] || echo "@WX_LIBRARY_BASENAME_GUI@" +[ -z "$output_option_cc" ] || echo "@CC@" +[ -z "$output_option_cxx" ] || echo "@CXX@" +[ -z "$output_option_ld" ] || echo "@CXX@ -o" +[ -z "$flag_option_selected_config" ] || echo "$this_config" + +for q in $query_options; do + eval echo "\$this_$q" +done + +# --rezflags is deprecated and disabled (2005/11/29) +if [ -n "$output_option_rezflags" ]; then + echo "@true" + decho "Warning: --rezflags, along with Mac OS classic resource building" \ + "is deprecated. You should remove this from your Makefile and" \ + "build .app bundles instead." +fi + + +# The rest are going to need a little more work. +# -------------------------------------------------------------- + +is_monolithic() { [ "x@MONOLITHIC@" = "x1" ]; } +is_static() { [ -n "$this_linkage" ]; } +is_installed() { [ -z "$this_prefix" ]; } + + +# Is the user after a support utility? +# If this is a cross build, we need to find and return a suitable +# native utility for the job, so we search: +# +# 1. local build dir (for native uninstalled builds only). +# 2. (optional) user supplied prefix. +# 3. configured install prefix. +# 4. environment $PATH. +# +# and if such a thing still cannot be found, exit signalling an error. +if [ -n "$input_option_utility" ]; then + + # This is dumb, in tree binaries should be in a standard location + # like the libs, but work with what we've got for now. + is_cross || _util="$exec_prefix/utils/$input_option_utility/$input_option_utility" + + if not is_installed && [ -x "$_util" ]; then + is_static || _preload="eval LD_LIBRARY_PATH=$exec_prefix/lib" + echo $_preload $_util + exit + fi + + IFS=':' + _user_prefix=${input_option_exec_prefix:-$input_option_prefix} + + for _util in "${input_option_utility}-@WX_RELEASE@@WX_FLAVOUR@" \ + "${input_option_utility}-@WX_RELEASE@" \ + "${input_option_utility}" + do + for p in ${_user_prefix:+$_user_prefix/bin} $bindir $PATH; do + + [ -z "$WXDEBUG" ] || decho " checking for: '$p/$_util'" + + if [ -x "$p/$_util" ]; then + echo "$p/$_util" + exit + fi + + done + done + exit 1 + +fi + + +# Still here? Then get the options together for building an app. +# ---------------------------------------------------------------- + +# Additional configuration for individual library components. +ldflags_gl="@LDFLAGS_GL@" + +ldlibs_base="@WXCONFIG_LIBS@" +ldlibs_core="@EXTRALIBS_GUI@" +ldlibs_gl="@OPENGL_LIBS@" +ldlibs_html="@EXTRALIBS_HTML@" +ldlibs_xml="@EXTRALIBS_XML@" +ldlibs_adv="@EXTRALIBS_SDL@" +ldlibs_stc="@EXTRALIBS_STC@" + + +# Order the libraries passed to us correctly for static linking. +# +# While the libraries order doesn't matter when linking dynamically, we must +# put the libraries depending on other libraries in front of their dependencies +# when linking statically or the dependencies wouldn't be resolved by the +# standard UNIX linkers. +order_libs() +{ + if is_static; then + for lib do + # Distinguish between the libraries that may need to be moved to + # the end of the list (because other ones may depend on them) and + # those that can be output immediately because no other libraries + # depend on them. + case "$lib" in + base|core|html|xml|adv) eval "use_$lib=1" ;; + *) libs="$libs $lib" ;; + esac + done + + # Add the libraries that we postponed adding above. + # Order of the checks here is important. + [ -z "$use_html" ] || libs="$libs html" + [ -z "$use_adv" ] || libs="$libs adv" + [ -z "$use_core" ] || libs="$libs core" + [ -z "$use_xml" ] || libs="$libs xml" + [ -z "$use_base" ] || libs="$libs base" + else + # No need to order them. + libs="$@" + fi + + echo $libs +} + +# lib_flags_for _liblist +# This function returns a list of flags suitable to return with the +# output of --libs for all of the libraries in _liblist. You can +# add support for a new library by adding an entry for it in the +# psuedo-hashes above if it requires additional linker options. +lib_flags_for() +{ + [ -z "$WXDEBUG" ] || decho " fetching lib flags for: '$*'" + + _all_ldflags='' + _all_libs='' + _wxlibs='' + + is_cross && _target="-${target}" + + for lib do + + # We evidently can't trust people not to duplicate things in + # configure, or to keep them in any sort of sane order overall, + # so only add unique new fields here even if it takes us a while. + # In the case of libs, we bubble any duplicates to the end, + # because if multiple libs require it, static linking at least + # will require it to come after all of them. So long as local + # order is ok in configure then we should always be able to + # massage a correct result here like this. + # + # FIXME: ldlibs_core is totally bogus. Fix the duplication + # there independently of this. This covers for it, but we + # want to do this anyway because some libs may share common + # deps without a common ancestor in wx. This is not a licence + # for sloppy work elsewhere though and @GUI_TK_LIBRARY should + # be fixed. + + for f in `eval echo \"\\\$ldflags_$lib\"`; do + match_field "$f" $_all_ldflags || _all_ldflags="$_all_ldflags $f" + done + + if match_field "$lib" @STD_BASE_LIBS@ ; then + _libname="@WX_LIBRARY_BASENAME_NOGUI@" + else + _libname="@WX_LIBRARY_BASENAME_GUI@" + fi + [ $lib = base ] || _libname="${_libname}_$lib" + _libname="${_libname}-@WX_RELEASE@$_target" + + if is_static; then + _wxlibs="$_wxlibs ${libdir}/lib${_libname}.a" + for f in `eval echo \"\\\$ldlibs_$lib\"`; do + + # Only propagate duplicate -libraries to their latest + # possible position. Do not eliminate any other + # duplicates that might occur. They should be fixed + # in configure long before they get here. + # This started as a workaround for Mac -framework, + # but it seems like a better policy in general, which + # will let the more heinous bugs in configure shake out. + # We should maybe filter *.a here too, but not unless + # we have to. + case "$f" in + -l*) _all_libs="`remove_field $f $_all_libs` $f" ;; + *) _all_libs="$_all_libs $f" ;; + esac + + done + else + _wxlibs="$_wxlibs -l${_libname}" + fi + + done + + if [ -n "$WXDEBUG" ]; then + decho " retrieved: ldflags = $_all_ldflags" + decho " wxlibs = $_wxlibs" + decho " alllibs = $_all_libs" + fi + + echo $_all_ldflags $_wxlibs $_all_libs +} + +# this is the strict subset of the above function which returns only the +# (static) libraries themselves: this is used for linkdeps output which should +# output the list of libraries the main program should depend on +# +# of course, this duplication is bad but I'll leave to somebody else the care +# of refactoring this as I don't see any way to do it - VZ. + +# This (and the other cruft to support it) should be removed with +# reference to the FIXME above when configure stops piping us a slurry +# of options that need to be decomposed again for most practical uses - RL. +link_deps_for() +{ + _wxlibs='' + + is_cross && _target="-${target}" + + for lib do + if match_field "$lib" @STD_BASE_LIBS@ ; then + _libname="@WX_LIBRARY_BASENAME_NOGUI@" + else + _libname="@WX_LIBRARY_BASENAME_GUI@" + fi + [ $lib = base ] || _libname="${_libname}_$lib" + _libname="${_libname}-@WX_RELEASE@$_target" + + _wxlibs="$_wxlibs ${libdir}/lib${_libname}.a" + done + + echo $_wxlibs +} + +# Sanity check the list of libs the user provided us, if any. +# -------------------------------------------------------------- + +wx_libs=`echo "$libs_parameters" | tr ',' ' '` +wx_optional_libs=`echo "$optional_libs_parameters" | tr ',' ' '` + +# Add the --optional-libs, if they've been compiled and aren't already added +for i in $wx_optional_libs; do + if match_field $i @BUILT_WX_LIBS@; then + if not match_field $i $wx_libs; then + wx_libs="${wx_libs:+$wx_libs }$i" + fi + fi +done + +[ -z "$WXDEBUG" ] || decho " user supplied libs: '$wx_libs'" + +# Assume we are using the GUI, unless --libs was specified with no GUI libs +using_gui=yes + +if is_monolithic; then + + # Only add additional info if --libs was specified and not just --optional-libs + if [ -n "$output_option_libs" ]; then + # The only library we need to add when using monolithic build is the gl + # one as all the others are already included into the main one. + if match_field gl $wx_libs; then + wx_libs=gl + else + wx_libs= + fi + + wx_libs="@WXCONFIG_LDFLAGS_GUI@ `lib_flags_for $wx_libs`" + + # We still need the core lib deps for a static build though + if is_static; then + link_deps="${libdir}/libwx_@TOOLCHAIN_NAME@.a" + wx_libs="$wx_libs $link_deps $ldlibs_core $ldlibs_base" + else + wx_libs="$wx_libs -lwx_@TOOLCHAIN_NAME@" + fi + fi +else # MONOLITHIC = 0 + + # Import core libs by default, expand std if specified, or add base if omitted. + if [ -n "$output_option_libs" ] && [ -z "$libs_parameters" ]; then + wx_libs="@STD_GUI_LIBS@ @STD_BASE_LIBS@" + elif match_field all $wx_libs; then + wx_libs="@BUILT_WX_LIBS@" + elif match_field std $wx_libs; then + # Bubble any libs that were already specified to the end + # of the list and ensure static linking order is retained. + wx_libs=`remove_field std $wx_libs` + for i in @STD_GUI_LIBS@ @STD_BASE_LIBS@; do + wx_libs="`remove_field $i $wx_libs` $i" + done + elif not match_field base $wx_libs ; then + # Only add base if --libs was specified and not just --optional-libs + if [ -n "$output_option_libs" ]; then + wx_libs="$wx_libs base" + fi + fi + + if [ -n "$output_option_libs" ]; then + using_gui=no + for i in $wx_libs ; do + if match_field "$i" @STD_GUI_LIBS@; then + _guildflags="@WXCONFIG_LDFLAGS_GUI@" + using_gui=yes + break + fi + match_field "$i" @STD_BASE_LIBS@ || using_gui=yes + done + fi + + if is_static; then + link_deps=`link_deps_for $wx_libs` + fi + wx_libs=`order_libs $wx_libs` + wx_libs="$_guildflags `lib_flags_for $wx_libs`" +fi + + +# If they explicitly set "--cxx(pp)flags base" then they don't want the GUI +if [ "$cxx_parameters" = "base" ]; then + using_gui=no +fi + + +if [ -n "$WXDEBUG" ]; then + decho + decho " using libs: '$wx_libs'" + decho " using_gui = $using_gui" + decho +fi + + +# Endgame. Nothing left to discover now. +# -------------------------------------------------------------- + +[ "$using_gui" = "yes" ] || _gui_cppflags="-DwxUSE_GUI=0" + +if is_installed; then + _include_cppflags="-I${includedir}/wx-@WX_RELEASE@@WX_FLAVOUR@" +else + _include_cppflags="-I${includedir}" +fi + +_cppflags=`echo "-I${libdir}/wx/include/@TOOLCHAIN_FULLNAME@" $_include_cppflags "@WXCONFIG_CPPFLAGS@" $_gui_cppflags` + +# now without further ado, we can answer these too. +[ -z "$output_option_cppflags" ] || echo $_cppflags +[ -z "$output_option_cflags" ] || echo $_cppflags "@WXCONFIG_CFLAGS@" +[ -z "$output_option_cxxflags" ] || echo $_cppflags "@WXCONFIG_CXXFLAGS@" +[ -z "$output_option_gl_libs" ] || echo `lib_flags_for gl` +[ -z "$output_option_linkdeps" ] || echo $link_deps + +if [ -n "$output_option_libs" ]; then + # if --libs [--optional-libs] then output the full linker information + + is_cross && + [ "x$libdir" = "x/usr/${target}/lib" ] || + [ "x$libdir" = "x/usr/lib" ] || + _ldflags="-L$libdir" + + if [ -n "$MAC_FRAMEWORK" ]; then + wx_libs="-framework $MAC_FRAMEWORK" + if [ -n "$MAC_FRAMEWORK_PREFIX" ]; then + _ldflags="-F$MAC_FRAMEWORK_PREFIX" + else + _ldflags="" + fi + fi + + is_installed || [ -n "$flag_option_no_rpath" ] || _rpath="@WXCONFIG_RPATH@" + + echo $_ldflags "@WXCONFIG_LDFLAGS@" $_rpath $wx_libs "@DMALLOC_LIBS@" + +elif [ -n "$output_option_optional_libs" ]; then + # if only --optional-libs then output just the libs + + echo $wx_libs +fi + + +# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +# +# Beyond here reside only machine or tool specific workarounds +# that require knowlege not obtainable prior to this comment. +# +# Please. Avoid addding things here, wx-config should avoid +# hard coding tool specific details. Do not use things here +# as an example of other things that should be here, These +# shouldn't be here either. This is a place of last resort +# for interim workarounds. I can but stress as strongly as +# the censor will allow, there are only bad examples of things +# that belong at this level of abstraction to follow. It is +# a limbo for glitches awaiting the Next Design Repair. Ok. +# +# With that firmly in mind, our debut dilemma is: + +# Resource compilers. An elusive term that covers some pretty +# dissimilar concepts on various platforms. The good news is, +# each platform has only one definition of 'resource', compiled +# or not, and so we can abstract that neatly to return a platform +# specific invocation of the appropriate tool. The bad news is, +# windres (at least) requires knowledge of the wx header files +# location(s) that cannot be predicted reliably before the call to +# wx-config is made. Currently for all known resource compilers, +# we can simply return a command and some salient configuration +# options in response to a request for --rescomp. So here we +# top up the options for any tools that may require information +# that was only just determined in the last few machine cycles, +# then output the necessary incantation for the platform. +# +# Most things should already be constant by the time configure +# has run. Do not add anything here that is already known there. + +if [ -n "$output_option_rescomp" ]; then + + case "@RESCOMP@" in + *windres|wrc) + # Note that with late model windres, we could just insert + # _include_cppflags here, but use the old notation for now + # as it is more universally accepted. + if is_installed; then + echo "@RESCOMP@ --include-dir" \ + "${includedir}/wx-@WX_RELEASE@@WX_FLAVOUR@" \ + "@WXCONFIG_RESFLAGS@" + else + echo "@RESCOMP@ --include-dir ${includedir}" \ + "@WXCONFIG_RESFLAGS@" + fi + ;; + + # neither rez not emxbind have any specific needs from + # us, so just output what was determined by configure. + *) + echo @RESCOMP@ @WXCONFIG_RESFLAGS@ + ;; + esac + +fi + +# +# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +# And so that's it, we're done. Have a nice build. + +exit 0 diff --git a/3rdparty/wxwidgets3.0-3.0.1/.travis.yml b/3rdparty/wxwidgets3.0-3.0.1/.travis.yml new file mode 100644 index 0000000000..7f19bdead3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/.travis.yml @@ -0,0 +1,38 @@ +# This is the control file for Travis continuous integration system. +# +# It is used automatically for the repositories on Github if it's found in the +# root directory of the project. +language: cpp + +compiler: gcc + +branches: + only: + - master + +notifications: + email: + recipients: + - vadim@wxwidgets.org + on_success: change + on_failure: change + +before_install: + - sudo apt-get install -y libcppunit-dev + +env: + - wxCONFIGURE_FLAGS= + - wxCONFIGURE_FLAGS="--disable-shared" + - wxCONFIGURE_FLAGS="--disable-precomp-headers --enable-monolithic" + - wxCONFIGURE_FLAGS="--enable-stl" CXXFLAGS=-std=c++0x + +script: + - ./configure --disable-optimise $wxCONFIGURE_FLAGS + - make + - make -C tests + - pushd tests + - ./test -t + - popd + - make samples + - sudo make install + - make -C samples/minimal -f makefile.unx diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/addbookm.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/addbookm.xpm new file mode 100644 index 0000000000..fb13ff161d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/addbookm.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static const char *const addbookm_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +". c Black", +"X c #00C000", +" c None", +/* pixels */ +" ....... ", +" .XXXXX. ", +" .. .XXXXX. ", +" .. .XXXXX. ", +" ...... .XXXXX. ", +" ...... .XXXXX. ", +" .. .XXXXX. ", +" .. .XXXXX. ", +" .XXXXX. ", +" .XXXXX. ", +" .XXXXX. ", +" .XXXXX. ", +" .XX.XX. ", +" .X. .X. ", +" .. .. " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/back.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/back.xpm new file mode 100644 index 0000000000..38b0f4b7dd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/back.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static const char *const back_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ", +" . ", +" .. ", +" .X. ", +" .XX........ ", +" .XXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXX. ", +" .XX........ ", +" .X. ", +" .. ", +" . ", +" "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/cdrom.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/cdrom.xpm new file mode 100644 index 0000000000..fecc52ec74 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/cdrom.xpm @@ -0,0 +1,57 @@ +/* XPM */ +static const char *const cdrom_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 36 1", +"= c #9BACC2", +"y c #547B99", +"$ c #FFFFFF", +"@ c #839CB5", +"o c #547897", +"4 c #4D7492", +"% c #F1F4F7", +"X c #5A809C", +"< c #8497A5", +"0 c #7898AD", +"+ c #CAD2DC", +"r c #ACAEB2", +"2 c #BECAD9", +"* c #65839D", +"e c #DCE2EA", +"- c #ADBED2", +"t c #597B9A", +" c None", +"1 c #467291", +"9 c #D6DFE7", +"O c #7393AB", +"u c #49708B", +"5 c #A0BACB", +"& c #AABFCD", +"8 c #B9CBD5", +"; c #B4C4D3", +": c #6F90A6", +"3 c #A8B6CA", +"# c #ADBACE", +"w c #E4E9ED", +". c #8EA9BC", +"> c #B3BFD1", +", c #C2CBDB", +"6 c #C0D1DC", +"7 c #A2B3C5", +"q c #5D7C93", +/* pixels */ +" .XooOo+ ", +" X@#$$$%o& ", +" *=-;$$$$$o+ ", +" +O#;-$$$$$$: ", +" o=>,-<1<$2-o ", +" o3>--1$122-* ", +" o=--$<4<22-X ", +" o5$$$$$26;7* ", +" X%$$$$2;-X8 ", +" 90*9$$$-7Xqo ", +" wXwe@O44X422222<<*4", +" ttyyyoo4441uuuo", +" t>$$$$$$$$$$$>o", +" XXXtyyyoo44411u" +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/close.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/close.xpm new file mode 100644 index 0000000000..d79030228c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/close.xpm @@ -0,0 +1,16 @@ +/* XPM */ +static const char * const close_xpm[] = { +"12 10 2 1", +" c None", +"X c black", +" ", +" XX XX ", +" XX XX ", +" XXXX ", +" XX ", +" XXXX ", +" XX XX ", +" XX XX ", +" ", +" "}; + diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/copy.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/copy.xpm new file mode 100644 index 0000000000..9143caa9b2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/copy.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static const char *const copy_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 23 1", +"o c #97C4E7", +"* c #FFFFFF", +"@ c #60A9DA", +"= c #D1E5F5", +"& c #C3DDF1", +". c #7EA6C0", +" c None", +"X c #2F93CD", +"O c #85BBE2", +", c #EFF6FC", +"; c #DEEDF8", +"+ c #72B2DD", +"3 c #F7FBFD", +"4 c #FAFCFE", +": c #DAEAF7", +"< c #E9F3FA", +"1 c #E2EFF8", +"- c #FDFDFE", +"% c #B6D5EE", +"$ c #A5CCEA", +"> c #E5F0F9", +"# c #AFD1EC", +"2 c #F4F9FD", +/* pixels */ +" .....XX ", +" .oO+@X#X ", +" .$oO+X##X ", +" .%$o........ ", +" .&%$.*=&#o.-. ", +" .=&%.*;=&#.--. ", +" .:=&.*>;=&.... ", +" .>:=.*,>;=&#o. ", +" .<1:.*2,>:=&#. ", +" .2<1.*32,>:=&. ", +" .32<.*432,>:=. ", +" .32<.*-432,>:. ", +" .....**-432,>. ", +" .***-432,. ", +" .......... " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/cross.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/cross.xpm new file mode 100644 index 0000000000..20ab3f3466 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/cross.xpm @@ -0,0 +1,17 @@ +/* XPM */ +static const char *const cross_xpm[] = { +/* columns rows colors chars-per-pixel */ +"10 10 2 1", +" c Gray0", +"# c None", +/* pixels */ +" ######## ", +" #### ", +"# ## #", +"## ##", +"### ###", +"### ###", +"## ##", +"# ## #", +" #### ", +" ###### "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/cut.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/cut.xpm new file mode 100644 index 0000000000..eacd7f94b3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/cut.xpm @@ -0,0 +1,46 @@ +/* XPM */ +static const char *const cut_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 25 1", +"6 c #D8BDC0", +": c #C3C3C4", +"- c #FFFFFF", +". c #6C6D70", +"2 c #AD3A45", +"o c #DBDBDB", +"# c #939495", +"< c #E42234", +"& c #C3C5C8", +"; c #C6CCD3", +"% c #B7B7B8", +" c None", +"* c #DFE0E2", +"5 c #B69596", +"3 c #9C2A35", +"1 c #CFCFD0", +", c #AB5C64", +"+ c #D2D3D4", +"$ c #BCBDBE", +"@ c #C6C8CA", +"> c #CDC0C1", +"O c #826F72", +"X c #979BA0", +"4 c #9B8687", +"= c #9FA0A0", +/* pixels */ +" .X .o ", +" O.+ @. ", +" O. .. ", +" O#$ %.& ", +" O.*.. ", +" #%#.. ", +" O=-.. ", +" #%#;. ", +" OO:=O ", +" >,,<, ,<,,1 ", +" ><23<1 1<32<1 ", +" ,2 4< <5 2, ", +" <, ,2 2, ,< ", +" 23,<5 5<,32 ", +" 6225 522> " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/deffile.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/deffile.xpm new file mode 100644 index 0000000000..182fbe4180 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/deffile.xpm @@ -0,0 +1,54 @@ +/* XPM */ +static const char *const deffile_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 32 1", +"= c #97C4E7", +": c #72A8D2", +"1 c #FFFFFF", +"w c #839CB5", +"X c #6B98B8", +". c #5A89A6", +"@ c #3A749C", +", c #D1E5F5", +"< c #67A1CF", +"> c #F1F4F7", +"e c #85A7BC", +"% c #C3DDF1", +"0 c #749BB4", +"2 c #7EA6C0", +"; c #5F9BC8", +" c None", +"O c #538DB3", +"- c #85BBE2", +"$ c #D6DFE7", +"9 c #EFF6FC", +"o c #6591AE", +"4 c #F7FBFD", +"8 c #FAFCFE", +"6 c #DAEAF7", +"7 c #E9F3FA", +"q c #FDFDFE", +"3 c #E2EFF8", +"# c #8EA9BC", +"& c #B6D5EE", +"* c #A5CCEA", +"5 c #F4F9FD", +"+ c #4581AA", +/* pixels */ +" ..XooO+@#$ ", +" .%%&*=-;:;> ", +" .,,%&*=<1=X> ", +" #%%%%&*211=X ", +" #3----- c #5A7BB4", +"% c #5F7FB5", +/* pixels */ +" ", +" .Xo OO ", +" +@#. $@% ", +" &@@X .*@*o ", +" =@= .*@*. ", +" -@@X*@*. ", +" .#@@@$. ", +" ;@@: ", +" ;@@@+ ", +" .>@#%@@. ", +" o*@*oO@@, ", +" <#@*. .@@= ", +"&@@$ :@@1 ", +";#& 2#>. ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/dir_up.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/dir_up.xpm new file mode 100644 index 0000000000..f644d93e6d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/dir_up.xpm @@ -0,0 +1,52 @@ +/* XPM */ +static const char *const dir_up_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 31 1", +"6 c #9BACC2", +"o c #9AEA53", +"7 c #94A5BD", +"8 c #547897", +"5 c #839CB5", +"@ c #376485", +"$ c #5A809C", +"# c #7F99B4", +": c #D1D9E5", +"< c #EAEDF3", +"& c #446A8C", +"q c #65839D", +"> c #DCE2EA", +", c #E1E6EE", +"2 c #F5F6F7", +"O c #8DA0B9", +" c None", +"% c #467291", +". c #305F81", +"X c #7393AB", +"+ c #6A89A2", +"4 c #A8B6CA", +"1 c #EEF1F3", +"3 c #F8F9FA", +"0 c #215579", +"9 c #7F97B0", +"* c #B3BFD1", +"w c #7A90AC", +"- c #C2CBDB", +"; c #CAD6E1", +"= c #BBC4D6", +/* pixels */ +" .. ", +" X.o. ", +".... X.ooo. ", +".OO+....ooooo. ", +".OOOOOO@@ooo.. ", +".OOOO#OO@ooo.$ ", +".OOOOOOO@ooo.$ ", +".O%............&", +".O&*=-;:>,<1231.", +".+.4*=-;:>,<12$.", +"..564*=-;:>,<1. ", +".@O764*=-;:>,<. ", +".89O764*=-;:>$$ ", +"0qw9O764*=-;:. ", +"0............. " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/down.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/down.xpm new file mode 100644 index 0000000000..88b0a9fdc9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/down.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static const char *const down_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ...... ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" ....XXXX.... ", +" .XXXXXXXX. ", +" .XXXXXX. ", +" .XXXX. ", +" .XX. ", +" .. ", +" "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/exefile.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/exefile.xpm new file mode 100644 index 0000000000..f814a597e8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/exefile.xpm @@ -0,0 +1,73 @@ +/* XPM */ +static const char *const exefile_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 51 1", +"% c #E8E8EC", +"= c #E8E8ED", +"z c #CACAD4", +"8 c #D9D9E1", +"p c #D2D2DA", +"u c #E1E1E7", +"a c #D2D2DB", +"< c #E9E9ED", +"q c #DADAE1", +"+ c #F1F1F4", +"g c #D3D3DB", +"1 c #E2E2E8", +"x c #D3D3DC", +"5 c #00A5FF", +"$ c #EAEAEE", +"4 c #DBDBE2", +"h c #CCCCD6", +"y c #D4D4DC", +"r c #E3E3E9", +"d c #D4D4DD", +"7 c #DCDCE2", +": c #EBEBEF", +"0 c #DCDCE3", +" c None", +"O c #F3F3F5", +"> c #E4E4E9", +"& c #F3F3F6", +"j c #D5D5DD", +"6 c #E4E4EA", +". c #C6C6D5", +"# c #ECECF0", +"f c #CECED7", +"l c #CECED8", +"e c #D6D6DE", +"; c #EDEDF0", +"3 c #DEDEE4", +", c #EDEDF1", +"c c #CFCFD8", +"o c #F5F5F7", +"- c #E6E6EB", +"w c #D7D7DF", +"v c #C8C8D3", +"i c #DFDFE5", +"@ c #EEEEF2", +"s c #D0D0D9", +"X c #9494AD", +"9 c #D8D8DF", +"t c #D8D8E0", +"* c #EFEFF2", +"2 c #E0E0E6", +"k c #D1D1DA", +/* pixels */ +" ........X ", +" .oO+@#$%XX ", +" .&+*#$=-XXX ", +" .+*;:=->XXXX ", +" .*,:<->1234X ", +" .,5:5612378X ", +" 5,5559530qwX ", +" 55555550q9eX ", +" 5555r5555teyX ", +" 55rui559eypX ", +" 5555i5555yasX ", +" 5555555dasfX ", +" 5355595gsfhX ", +" .3595jgklhzX ", +" .0qwjxkchzvX ", +" XXXXXXXXXXXX " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/fileopen.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/fileopen.xpm new file mode 100644 index 0000000000..636a904123 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/fileopen.xpm @@ -0,0 +1,57 @@ +/* XPM */ +static const char *const fileopen_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 36 1", +"6 c #9BACC2", +"< c #9AEA53", +"9 c #94A5BD", +"5 c #839CB5", +"; c #4D7492", +". c #376485", +"$ c #7F99B4", +"r c #D1D9E5", +"7 c #EAEDF3", +"@ c #CAD2DC", +"% c #718BA7", +"t c #BECAD9", +"& c #65839D", +"0 c #DCE2EA", +"4 c #F5F6F7", +"w c #597B9A", +"O c #8DA0B9", +" c None", +"+ c #467291", +"u c #305F81", +"= c #B4C4D3", +"# c #CAE2AA", +"1 c #FAFCFE", +"3 c #A8B6CA", +"q c #E4E9ED", +"8 c #EEF1F3", +"X c #215579", +"2 c #7F97B0", +": c #B3BFD1", +"y c #7A90AC", +", c #C2CBDB", +"- c #ADD668", +"* c #B6D791", +"e c #CAD6E1", +"o c #DFF0D0", +"> c #BBC4D6", +/* pixels */ +" ", +" .... ", +"XXXXX .oo. ", +"XOOOO+@.#o. ", +"XOOOO$%&.*oXXX ", +"XOOOOOOO.*oX=X ", +"XOXXXX...-oXXXX;", +"XOX:>,.<<<<,.<<>.>.X0q7; ", +"Xw2O963:>>er0t; ", +"X&y2O963:>,er; ", +"uXXXXXXXXXXXX; ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/filesave.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/filesave.xpm new file mode 100644 index 0000000000..b1ffda3346 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/filesave.xpm @@ -0,0 +1,42 @@ +/* XPM */ +static const char *const filesave_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 21 1", +"O c #FFFFFF", +"> c #D5D6D8", +"; c #446A8C", +"1 c #CAD2DC", +": c #C0C7D1", +" c #5F666D", +"% c #A5B0BA", +"o c #65839D", +", c #DCE2EA", +"< c #C3C5C8", +"- c #E1E6EE", +"* c #C6CCD3", +". c None", +"$ c #305F81", +"2 c #D6DFE7", +"= c #D2D9E0", +"& c #B7BFC7", +"X c #1B4467", +"# c #BCBDBE", +"@ c #7A90AC", +"+ c #5D7C93", +/* pixels */ +" .", +" XoOOOOOOOOO+X .", +" @oO#######O+@ .", +" @oOOOOOOOOO+@ .", +" @oO#######O+@ .", +" @oOOOOOOOOO+@ .", +" @@+++++++++@@ .", +" @@@@@@@@@@@@@ .", +" @@@$$$$$$$$@@ .", +" @@$%%%&*=-O$@ .", +" @@$%X;;*=-O$@ .", +" @@$%X;;:>,O$@ .", +" @@$%X;;<12O$@ .", +" @@$<<2OOOOO$@ .", +". .." +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/filesaveas.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/filesaveas.xpm new file mode 100644 index 0000000000..4ca8e26227 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/filesaveas.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static const char *const filesaveas_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 23 1", +"X c Black", +"+ c #FFFFFF", +"< c #D5D6D8", +"> c #446A8C", +"3 c #CAD2DC", +", c #C0C7D1", +" c #5F666D", +"* c #A5B0BA", +"O c #65839D", +"1 c #DCE2EA", +"2 c #C3C5C8", +": c #E1E6EE", +". c #FFFF00", +"- c #C6CCD3", +"@ c None", +"& c #305F81", +"4 c #D6DFE7", +"; c #D2D9E0", +"= c #B7BFC7", +"o c #1B4467", +"$ c #BCBDBE", +"# c #7A90AC", +"% c #5D7C93", +/* pixels */ +" .X .XX.", +" oO+++++++.X.X.@", +" #O+$$$$$XX...XX", +" #O++++++.......", +" #O+$$$$$XX...XX", +" #O+++++++.X.X.@", +" ##%%%%%%.X%.X .", +" ############# @", +" ###&&&&&&&&## @", +" ##&***=-;:+&# @", +" ##&*o>>-;:+&# @", +" ##&*o>>,<1+&# @", +" ##&*o>>234+&# @", +" ##&224+++++&# @", +"@ @@" +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/find.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/find.xpm new file mode 100644 index 0000000000..d5f24f8e41 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/find.xpm @@ -0,0 +1,62 @@ +/* XPM */ +static const char *const find_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 41 1", +"y c #A06959", +"9 c #A7DAF2", +"$ c #B5CAD7", +"> c #35B4E1", +"t c #6B98B8", +"w c #B6E0F4", +"q c #AEC9D7", +"1 c #5A89A6", +"+ c #98B3C6", +"4 c #EAF6FC", +"3 c #DEF1FA", +"= c #4CBCE3", +"d c #DB916B", +"X c #85A7BC", +"s c #D8BCA4", +"o c #749BB4", +"e c #BCD9EF", +"* c #62B4DD", +"< c #91D2EF", +"a c #E6DED2", +"0 c #E9F4FB", +" c None", +"@ c #A0BACB", +"O c #AABFCD", +"i c #6591AE", +": c #B9CBD5", +"- c #71C5E7", +"5 c #D3ECF8", +"% c #81A3B9", +"6 c #8AD0EE", +"8 c #FDFDFE", +"p c #8EA9BC", +"r c #B6D5EE", +", c #81CCEB", +". c #ACC4D3", +"; c #AFD1DE", +"7 c #EFF8FC", +"u c #C2CBDB", +"# c #C0D1DC", +"2 c #CAD6E1", +"& c #8FB0C3", +/* pixels */ +" .XooXO ", +" +@###$+% ", +" .&#*==-;@@ ", +" o:*>,<--:X ", +" 12>-345-#% ", +" 12>678392% ", +" %$*,3059q& ", +" @Oq,wwer@@ ", +" t@q22q&+ ", +" yyui+%o%p ", +" yasy ", +" yasdy ", +" yasdy ", +" ysdy ", +" yy " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/findrepl.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/findrepl.xpm new file mode 100644 index 0000000000..55380e5c06 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/findrepl.xpm @@ -0,0 +1,63 @@ +/* XPM */ +static const char *const findrepl_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 42 1", +"y c #A06959", +"9 c #A7DAF2", +"$ c #B5CAD7", +"> c #35B4E1", +"t c #6B98B8", +"w c #B6E0F4", +"q c #AEC9D7", +"1 c #5A89A6", +"+ c #98B3C6", +"4 c #EAF6FC", +"d c #008000", +"3 c #DEF1FA", +"= c #4CBCE3", +"f c #DB916B", +"X c #85A7BC", +"s c #D8BCA4", +"o c #749BB4", +"e c #BCD9EF", +"* c #62B4DD", +"< c #91D2EF", +"a c #E6DED2", +"0 c #E9F4FB", +" c None", +"@ c #A0BACB", +"O c #AABFCD", +"i c #6591AE", +": c #B9CBD5", +"- c #71C5E7", +"5 c #D3ECF8", +"% c #81A3B9", +"6 c #8AD0EE", +"8 c #FDFDFE", +"p c #8EA9BC", +"r c #B6D5EE", +", c #81CCEB", +". c #ACC4D3", +"; c #AFD1DE", +"7 c #EFF8FC", +"u c #C2CBDB", +"# c #C0D1DC", +"2 c #CAD6E1", +"& c #8FB0C3", +/* pixels */ +" .XooXO ", +" +@###$+% ", +" .&#*==-;@@ ", +" o:*>,<--:X ", +" 12>-345-#% ", +" 12>678392% ", +" %$*,3059q& ", +" @Oq,wwer@@ ", +" t@q22q&+ ", +" yyui+%o%p ", +" yasy d d ", +" yasfy dd dd ", +"yasfy ddddddddd", +"ysfy dd dd ", +" yy d d " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/first.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/first.xpm new file mode 100644 index 0000000000..6660af49e6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/first.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char *const first_xpm[] = { +"16 16 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ", +"... . ", +"... .. ", +"... .X. ", +"... .XX........ ", +"....XXXXXXXXXX. ", +"...XXXXXXXXXXX. ", +"...XXXXXXXXXXX. ", +"....XXXXXXXXXX. ", +"... .XX........ ", +"... .X. ", +"... .. ", +"... . ", +" ", +" "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/floppy.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/floppy.xpm new file mode 100644 index 0000000000..0c685efbcb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/floppy.xpm @@ -0,0 +1,39 @@ +/* XPM */ +static const char *const floppy_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 18 1", +"& c #E3E4E6", +"+ c #FFFFFF", +". c #446A8C", +"o c #697787", +"> c #5F666D", +"* c #B2B3B3", +" c None", +", c #4B4C4D", +"= c #DCDBDA", +"$ c #1B4467", +": c #E4E9ED", +"@ c #979BA0", +"X c #203646", +"O c #215579", +"- c #545B63", +"; c #636465", +"# c #CAD6E1", +"% c #7F8286", +/* pixels */ +" .XoooooooXO ", +" .o+++++++.O ", +" .o+OOOOO+.O ", +" .o+++++++.O ", +" .o@@@@@@@.O ", +" ..........O ", +" ..#+++++#.O ", +" ..+$O+++#.O ", +" ..+$O+++#.O ", +" %&.........*% ", +"%=+++++++++++&% ", +"--------------; ", +"-:::::::::::::- ", +"-:X:XXXXXXXXX:> ", +"-*************, " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/folder.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/folder.xpm new file mode 100644 index 0000000000..a116dcbd7b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/folder.xpm @@ -0,0 +1,43 @@ +/* XPM */ +static const char *const folder_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 22 1", +"> c #9BACC2", +". c #547897", +"1 c #7F99B4", +"X c #D1D9E5", +"< c #EAEDF3", +"+ c #CAD2DC", +"3 c #718BA7", +"O c #BECAD9", +"$ c #E1E6EE", +"* c #F5F6F7", +", c #8DA0B9", +" c None", +"# c #D6DFE7", +"@ c #D2D9E0", +"- c #FAFCFE", +"; c #ADBACE", +"& c #EEF1F3", +"= c #F8F9FA", +"o c #B3BFD1", +"2 c #7A90AC", +": c #A2B3C5", +"% c #E5EAF1", +/* pixels */ +" ", +" ..... ", +" .XXXX. ", +" ............. ", +" .oO+@#$%&*=-. ", +" .oO+@#$%&*=-. ", +" .;oO+X#$%&*=. ", +" .:;oO+X#$%&*. ", +" .>:;oO+X#$%&. ", +" .,>:;oO+X#$<. ", +" .1,>:;oO+X#$. ", +" .21,>:;oO+X#. ", +" .321,>:;oO+X. ", +" ............. ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/folder_open.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/folder_open.xpm new file mode 100644 index 0000000000..dd450e73b9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/folder_open.xpm @@ -0,0 +1,52 @@ +/* XPM */ +static const char *const folder_open_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 31 1", +"6 c #9BACC2", +"w c #547B99", +"5 c #94A5BD", +". c #376485", +"; c #F1F4F7", +"o c #7F99B4", +"2 c #D1D9E5", +"- c #EAEDF3", +"O c #718BA7", +"0 c #65839D", +"* c #DCE2EA", +": c #F5F6F7", +"7 c #597B9A", +"X c #8DA0B9", +" c None", +"+ c #467291", +"q c #305F81", +"& c #D6DFE7", +"3 c #6A89A2", +"1 c #A8B6CA", +"= c #E4E9ED", +"> c #F8F9FA", +", c #FDFDFE", +"9 c #215579", +"8 c #7F97B0", +"@ c #B3BFD1", +"< c #7A90AC", +"$ c #C2CBDB", +"4 c #A2B3C5", +"% c #CAD6E1", +"# c #BBC4D6", +/* pixels */ +" ", +"..... ", +".XXXo. ", +".XXXXO........ ", +".XXXXXXXXXXXX. ", +".XXXXXXXXXXXX. ", +".X++++++++++++++", +".X+@#$%&*=-;:>,+", +".<.1@#$%2*=-;:23", +"..X41@#$%2*=-;3 ", +"..X561@#$%2*=-3 ", +".78X561@#$%2*%3 ", +"90<8X561@#$%23 ", +"q++++++++++++w ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/forward.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/forward.xpm new file mode 100644 index 0000000000..d17eef486e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/forward.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static const char *const forward_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ", +" . ", +" .. ", +" .X. ", +" ........XX. ", +" .XXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXX. ", +" ........XX. ", +" .X. ", +" .. ", +" . ", +" "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/gtk/error.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/gtk/error.xpm new file mode 100644 index 0000000000..2505d3d4a8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/gtk/error.xpm @@ -0,0 +1,58 @@ +/* XPM */ +static const char *const error_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 4 1", +" c None", +"X c #242424", +"o c #DCDF00", +". c #C00000", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ..... ", +" ............. ", +" ................. ", +" ................... ", +" ....................... ", +" ......................... ", +" ........................... ", +" ...........................X ", +" .............................X ", +" ............................... ", +" ...............................X ", +" .................................X ", +" .................................X ", +" .................................XX ", +" ...ooooooooooooooooooooooooooo...XX ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" .................................XX ", +" .................................XX ", +" ...............................XXX ", +" ...............................XXX ", +" .............................XXX ", +" ...........................XXXX ", +" ...........................XXX ", +" .........................XXX ", +" .......................XXXX ", +" X...................XXXXX ", +" X.................XXXXX ", +" X.............XXXXX ", +" XXXX.....XXXXXXXX ", +" XXXXXXXXXXXXX ", +" XXXXX ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/gtk/info.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/gtk/info.xpm new file mode 100644 index 0000000000..8883955448 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/gtk/info.xpm @@ -0,0 +1,63 @@ +/* XPM */ +static const char *const info_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"$ c Black", +"O c #FFFFFF", +"@ c #808080", +"+ c #000080", +"o c #E8EB01", +" c None", +"X c #FFFF40", +"# c #C0C0C0", +". c #ABAD01", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ..... ", +" ..XXXXX.. ", +" ..XXXXXXXXo.. ", +" .XXXOXXXXXXXoo. ", +" .XOOXXX+XXXXXo. ", +" .XOOOXX+++XXXXoo. ", +" .XOOXXX+++XXXXXo. ", +" .XOOOXXX+++XXXXXXo. ", +" .XOOXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXXX. ", +" .XXXXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXoo. ", +" .XXXXXX+++XXXXXo. ", +" .XXXXXXX+XXXXXXo. ", +" .XXXXXXXXXXXXo. ", +" .XXXXX+++XXXoo. ", +" .XXXX+++XXoo. ", +" .XXXXXXXXo. ", +" ..XXXXXXo.. ", +" .XXXXXo.. ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@ ", +" ### ", +" $$$ ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/gtk/question.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/gtk/question.xpm new file mode 100644 index 0000000000..701f4457ba --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/gtk/question.xpm @@ -0,0 +1,75 @@ +/* XPM */ +static const char *const question_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 21 1", +". c Black", +"> c #696969", +"O c #1F1F00", +"+ c #181818", +"o c #F6F900", +"; c #3F3F00", +"$ c #111111", +" c None", +"& c #202020", +"X c #AAAA00", +"@ c #949400", +": c #303030", +"1 c #383838", +"% c #2A2A00", +", c #404040", +"= c #B4B400", +"- c #484848", +"# c #151500", +"< c #9F9F00", +"2 c #6A6A00", +"* c #353500", +/* pixels */ +" ", +" ", +" ", +" ", +" ......... ", +" ...XXXXXXX.. ", +" ..XXXXoooooXXXO+ ", +" ..XXooooooooooooX@.. ", +" ..XoooooooooooooooXX#. ", +" $%XoooooooooooooooooXX#. ", +" &.XoooooooXXXXXXooooooXX.. ", +" .XooooooXX.$...$XXoooooX*. ", +" $.XoooooX%.$ .*oooooo=.. ", +" .XooooooX.. -.XoooooX.. ", +" .XoooooX..+ .XoooooX;. ", +" ...XXXX..: .XoooooX;. ", +" ........ >.XoooooX;. ", +" +.XoooooX.. ", +" ,.Xoooooo<.. ", +" 1#XooooooXO.. ", +" &#XooooooX2.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" &.XooooooXX.. ", +" .XooooooXX.. ", +" &.XoooooXX.. ", +" ..XooooXX.. ", +" ..XooooX... ", +" ..XXooXX..& ", +" ...XXXXX.. ", +" ........ ", +" ", +" ", +" ....... ", +" ..XXXXX.. ", +" ..XXoooXX.. ", +" ..XoooooX.. ", +" ..XoooooX.. ", +" ..XXoooXX.. ", +" ..XXXXX.. ", +" ....... ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/gtk/warning.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/gtk/warning.xpm new file mode 100644 index 0000000000..35e60316c3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/gtk/warning.xpm @@ -0,0 +1,63 @@ +/* XPM */ +static const char *const warning_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"@ c Black", +"o c #A6A800", +"+ c #8A8C00", +"$ c #B8BA00", +" c None", +"O c #6E7000", +"X c #DCDF00", +". c #C00000", +"# c #373800", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" . ", +" ... ", +" ... ", +" ..... ", +" ...X.. ", +" ..XXX.. ", +" ...XXX... ", +" ..XXXXX.. ", +" ..XXXXXX... ", +" ...XXoO+XX.. ", +" ..XXXO@#XXX.. ", +" ..XXXXO@#XXX... ", +" ...XXXXO@#XXXX.. ", +" ..XXXXXO@#XXXX... ", +" ...XXXXXo@OXXXXX.. ", +" ...XXXXXXo@OXXXXXX.. ", +" ..XXXXXXX$@OXXXXXX... ", +" ...XXXXXXXX@XXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXX... ", +" ..XXXXXXXXXXOXXXXXXXXX.. ", +" ...XXXXXXXXXO@#XXXXXXXXX.. ", +" ..XXXXXXXXXXX#XXXXXXXXXX... ", +" ...XXXXXXXXXXXXXXXXXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXXXXXXXX... ", +" .............................. ", +" .............................. ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/harddisk.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/harddisk.xpm new file mode 100644 index 0000000000..3151a7f308 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/harddisk.xpm @@ -0,0 +1,60 @@ +/* XPM */ +static const char *const harddisk_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 39 1", +"7 c #E3E4E6", +"4 c #FFFFFF", +"5 c #839CB5", +". c #547897", +"1 c #4D7492", +"@ c #376485", +"o c #7A92A3", +"u c #D1D9E5", +"y c #446A8C", +"i c #51B03D", +"> c #CAD2DC", +"O c #718BA7", +"2 c #65839D", +"6 c #DCE2EA", +"0 c #C3C5C8", +"9 c #F5F6F7", +": c #EBEBEC", +"< c #597B9A", +"t c #C6CCD3", +" c None", +"* c #DFE0E2", +"e c #467291", +"a c #526E8B", +", c #7393AB", +"p c #130A0B", +"# c #AABFCD", +"r c #B4C4D3", +"; c #CFCFD0", +"X c #6F90A6", +"+ c #6A89A2", +"- c #D2D3D4", +"= c #DCDBDA", +"w c #E4E9ED", +"q c #C6C8CA", +"% c #215579", +"$ c #E7E7E7", +"3 c #7F97B0", +"8 c #C0D1DC", +"& c #5D7C93", +/* pixels */ +" ", +" .XoooXO+@ ", +" #$$%%%%$$$X ", +" &$*==-;$$$& ", +" &:>+,<1234o5 ", +" ###+67;;78242 ", +" &4,49*0q*9we4. ", +" &4+49*,,*9wo4. ", +"&4%r,67;;782t%4.", +"&44468rrrr84444,", +"y11111111111111e", +"1uu1:::::::::::1", +"1uu1::::::::ip:1", +"auu&:::::::::::1", +"1111111111111111" +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/helpicon.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/helpicon.xpm new file mode 100644 index 0000000000..356c452399 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/helpicon.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static const char *const helpicon_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 6 1", +" c Gray0", +". c Blue", +"X c #808080808080", +"o c #c0c0c0c0c0c0", +"O c Gray100", +"+ c None", +/* pixels */ +"+++++++++++XXXXXXXX+++++++++++++", +"++++++++XXXoOOOOOOoXXX++++++++++", +"++++++XXoOOOOOOOOOOOOoXX++++++++", +"+++++XoOOOOOOOOOOOOOOOOoX+++++++", +"++++XOOOOOOOOOOOOOOOOOOOO ++++++", +"+++XOOOOOOOo......oOOOOOOO +++++", +"++XOOOOOOOo.oOO....oOOOOOOO ++++", +"+XoOOOOOOO..OOOO....OOOOOOOo +++", +"+XOOOOOOOO....OO....OOOOOOOO X++", +"XoOOOOOOOO....Oo....OOOOOOOOo X+", +"XOOOOOOOOOo..oO....OOOOOOOOOO X+", +"XOOOOOOOOOOOOOo...OOOOOOOOOOO XX", +"XOOOOOOOOOOOOO...OOOOOOOOOOOO XX", +"XOOOOOOOOOOOOO..oOOOOOOOOOOOO XX", +"XOOOOOOOOOOOOO..OOOOOOOOOOOOO XX", +"XoOOOOOOOOOOOOOOOOOOOOOOOOOOo XX", +"+XOOOOOOOOOOOo..oOOOOOOOOOOO XXX", +"+XoOOOOOOOOOO....OOOOOOOOOOo XXX", +"++XOOOOOOOOOO....OOOOOOOOOO XXX+", +"+++ OOOOOOOOOo..oOOOOOOOOO XXXX+", +"++++ OOOOOOOOOOOOOOOOOOOO XXXX++", +"+++++ oOOOOOOOOOOOOOOOOo XXXX+++", +"++++++ oOOOOOOOOOOOOo XXXX++++", +"+++++++X oOOOOOOo XXXXX+++++", +"++++++++XXX oOOO XXXXXXX++++++", +"++++++++++XXXX OOO XXXXX++++++++", +"+++++++++++++X OOO XX+++++++++++", +"+++++++++++++++ OO XX+++++++++++", +"++++++++++++++++ O XX+++++++++++", +"+++++++++++++++++ XX+++++++++++", +"++++++++++++++++++XXX+++++++++++", +"+++++++++++++++++++XX+++++++++++" +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/home.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/home.xpm new file mode 100644 index 0000000000..d246b1d72e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/home.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static const char *const home_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +". c Black", +"X c #FFFFFF", +" c None", +/* pixels */ +" .... ", +" .XXXX. ", +" .XXXXXX. ", +" .XXXXXXXX. ", +" .XXXXXXXXXX. ", +" .............. ", +" .XXXXXXXXXXXX. ", +" .XXXXXXXXXXXX. ", +" .XXXXXXXXXXXX. ", +" .X.....X....X. ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" .X.....X. .X. ", +" .XXXXXXX. .X. ", +" ......... ... " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/htmbook.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/htmbook.xpm new file mode 100644 index 0000000000..e49b4685f9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/htmbook.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static const char *const htmbook_xpm[] = { +"16 16 6 1", +" c None", +". c Black", +"X c #000080", +"o c #c0c0c0", +"O c #808080", +"+ c Gray100", +" ", +" .. ", +" ..XX. ", +" ..XXXXX. ", +" ..XXXXXXXX. ", +".oXXXXXXXXXX. ", +".XoXXXXXXXXXX. ", +".XXoXXXXXXXXXX. ", +".XXXoXXXXXXXXX..", +".XXXXoXXXXXX..O ", +" .XXXXoXXX..O+O ", +" .XXXXo..O++o..", +" .XXX.O+++o.. ", +" .XX.o+o.. ", +" .X.o.. ", +" ... "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/htmfoldr.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/htmfoldr.xpm new file mode 100644 index 0000000000..dacef687b1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/htmfoldr.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static const char *const htmfoldr_xpm[] = { +"16 16 6 1", +" c None", +". c Black", +"X c #000080", +"o c #c0c0c0", +"O c #808080", +"+ c Gray100", +" ", +" .. ", +" ..XX. ", +" ..XXXXX. ", +" ..XXXXXXXX. ", +".oXXXXXXXXXX. ", +".XoXXXXXXXXXX. ", +".XXoXXXXXXXXXX. ", +".XXXoXXXXXXXXX..", +".XXXXoXXXXXX..O ", +" .XXXXoXXX..O+O ", +" .XXXXo..O++o..", +" .XXX.O+++o.. ", +" .XX.o+o.. ", +" .X.o.. ", +" ... "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/htmoptns.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/htmoptns.xpm new file mode 100644 index 0000000000..8806749ea4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/htmoptns.xpm @@ -0,0 +1,20 @@ +/* XPM */ +static const char *const htmoptns_xpm[] = { +"16 15 2 1", +" c None", +". c #000000", +" ", +" .. ", +" ... ", +" .... ", +" . ... ", +" .. ... ", +" . .. ", +" .. ... ", +" . .. ", +" ......... ", +" .. ... ", +" . ... ", +" .. ... ", +" .... ....... ", +" "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/htmpage.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/htmpage.xpm new file mode 100644 index 0000000000..e4fa3fbc71 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/htmpage.xpm @@ -0,0 +1,23 @@ +/* XPM */ +static const char *const htmpage_xpm[] = { +"16 16 4 1", +" c None", +". c #808080", +"X c Gray100", +"o c Black", +" ", +" .......... ", +" .XXXXXXXX.. ", +" .XXXXXXXXooo ", +" .X......XXXo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .XXXXXXXXXXo ", +" oooooooooooo "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/htmsidep.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/htmsidep.xpm new file mode 100644 index 0000000000..30f6a92392 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/htmsidep.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static const char *const htmsidep_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 6 1", +". c Black", +"X c #FFFFFF", +"+ c #808080", +" c None", +"O c #0000C0", +"o c #C0C0C0", +/* pixels */ +" ", +" .............. ", +" .XXXX.ooooooo. ", +" .XOXX.oo...oo. ", +" .XXOX.ooooooo. ", +" .OOOO.o...+.o. ", +" .XXOX.ooooooo. ", +" .XOXX.ooooooo. ", +" .XXXX.o..+ooo. ", +" .XXOX.ooooooo. ", +" .XOXX.o...+.o. ", +" .OOOO.ooooooo. ", +" .XOXX.o.+...o. ", +" .XXOX.ooooooo. ", +" .............. " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/last.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/last.xpm new file mode 100644 index 0000000000..66c3bd3382 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/last.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char *const last_xpm[] = { +"16 16 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ", +" . ...", +" .. ...", +" .X. ...", +" ........XX. ...", +" .XXXXXXXXXX....", +" .XXXXXXXXXXX...", +" .XXXXXXXXXXX...", +" .XXXXXXXXXX....", +" ........XX. ...", +" .X. ...", +" .. ...", +" . ...", +" ", +" "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/listview.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/listview.xpm new file mode 100644 index 0000000000..30f748abb4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/listview.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static const char *const listview_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 4 1", +" c Black", +". c #FFFFFF", +"X c #000084", +"o c #848484", +/* pixels */ +" ", +" .............. ", +" .XXX.......... ", +" .XXX. o o . ", +" .XXX.......... ", +" .............. ", +" .XXX.......... ", +" .XXX. o . ", +" .XXX.......... ", +" .............. ", +" .XXX.......... ", +" .XXX. o o . ", +" .XXX.......... ", +" .............. ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/minus.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/minus.xpm new file mode 100644 index 0000000000..d8cc34f362 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/minus.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char *const minus_xpm[] = { +"16 16 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ", +" ", +" ", +" ", +" ", +" .............. ", +" .XXXXXXXXXXXX. ", +" .XXXXXXXXXXXX. ", +" .............. ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/missimg.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/missimg.xpm new file mode 100644 index 0000000000..80eecbcf2a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/missimg.xpm @@ -0,0 +1,43 @@ +/* XPM */ +static const char *const missimg_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 5 1", +"X c Black", +"o c #FFFFFF", +" c None", +". c #C0C0C0", +"O c #E0E0E0", +/* pixels */ +" .............................X ", +" .ooooooooooooooooooooooooooooX ", +" .ooooooooooooooooooooooooooooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOXOOOOOOOOOOOOOOOOooX ", +" XXXOOOOOXX XOOOOOOOOOOOOOOOooX ", +" XXXXX XOOOOOOOOOOOOOOooX ", +" XOOOXXXOOOOOOOooX ", +" XXX XXOOOOOooX ", +" XOOOOooX ", +" . XOOOooX ", +" .. XXOooX ", +" .o.. XooX ", +" .ooO... XXX ", +" .ooOOOO.......... ", +" .ooOOOOOOOOOOOOOO.. ", +" .ooOOOOOOOOOOOOOOOO.. ", +" .ooOOOOOOOOOOOOOOOOOO......... ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooooooooooooooooooooooooooooX ", +" .ooooooooooooooooooooooooooooX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/motif/error.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/motif/error.xpm new file mode 100644 index 0000000000..2505d3d4a8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/motif/error.xpm @@ -0,0 +1,58 @@ +/* XPM */ +static const char *const error_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 4 1", +" c None", +"X c #242424", +"o c #DCDF00", +". c #C00000", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ..... ", +" ............. ", +" ................. ", +" ................... ", +" ....................... ", +" ......................... ", +" ........................... ", +" ...........................X ", +" .............................X ", +" ............................... ", +" ...............................X ", +" .................................X ", +" .................................X ", +" .................................XX ", +" ...ooooooooooooooooooooooooooo...XX ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" .................................XX ", +" .................................XX ", +" ...............................XXX ", +" ...............................XXX ", +" .............................XXX ", +" ...........................XXXX ", +" ...........................XXX ", +" .........................XXX ", +" .......................XXXX ", +" X...................XXXXX ", +" X.................XXXXX ", +" X.............XXXXX ", +" XXXX.....XXXXXXXX ", +" XXXXXXXXXXXXX ", +" XXXXX ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/motif/info.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/motif/info.xpm new file mode 100644 index 0000000000..8883955448 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/motif/info.xpm @@ -0,0 +1,63 @@ +/* XPM */ +static const char *const info_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"$ c Black", +"O c #FFFFFF", +"@ c #808080", +"+ c #000080", +"o c #E8EB01", +" c None", +"X c #FFFF40", +"# c #C0C0C0", +". c #ABAD01", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ..... ", +" ..XXXXX.. ", +" ..XXXXXXXXo.. ", +" .XXXOXXXXXXXoo. ", +" .XOOXXX+XXXXXo. ", +" .XOOOXX+++XXXXoo. ", +" .XOOXXX+++XXXXXo. ", +" .XOOOXXX+++XXXXXXo. ", +" .XOOXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXXX. ", +" .XXXXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXoo. ", +" .XXXXXX+++XXXXXo. ", +" .XXXXXXX+XXXXXXo. ", +" .XXXXXXXXXXXXo. ", +" .XXXXX+++XXXoo. ", +" .XXXX+++XXoo. ", +" .XXXXXXXXo. ", +" ..XXXXXXo.. ", +" .XXXXXo.. ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@ ", +" ### ", +" $$$ ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/motif/question.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/motif/question.xpm new file mode 100644 index 0000000000..701f4457ba --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/motif/question.xpm @@ -0,0 +1,75 @@ +/* XPM */ +static const char *const question_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 21 1", +". c Black", +"> c #696969", +"O c #1F1F00", +"+ c #181818", +"o c #F6F900", +"; c #3F3F00", +"$ c #111111", +" c None", +"& c #202020", +"X c #AAAA00", +"@ c #949400", +": c #303030", +"1 c #383838", +"% c #2A2A00", +", c #404040", +"= c #B4B400", +"- c #484848", +"# c #151500", +"< c #9F9F00", +"2 c #6A6A00", +"* c #353500", +/* pixels */ +" ", +" ", +" ", +" ", +" ......... ", +" ...XXXXXXX.. ", +" ..XXXXoooooXXXO+ ", +" ..XXooooooooooooX@.. ", +" ..XoooooooooooooooXX#. ", +" $%XoooooooooooooooooXX#. ", +" &.XoooooooXXXXXXooooooXX.. ", +" .XooooooXX.$...$XXoooooX*. ", +" $.XoooooX%.$ .*oooooo=.. ", +" .XooooooX.. -.XoooooX.. ", +" .XoooooX..+ .XoooooX;. ", +" ...XXXX..: .XoooooX;. ", +" ........ >.XoooooX;. ", +" +.XoooooX.. ", +" ,.Xoooooo<.. ", +" 1#XooooooXO.. ", +" &#XooooooX2.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" &.XooooooXX.. ", +" .XooooooXX.. ", +" &.XoooooXX.. ", +" ..XooooXX.. ", +" ..XooooX... ", +" ..XXooXX..& ", +" ...XXXXX.. ", +" ........ ", +" ", +" ", +" ....... ", +" ..XXXXX.. ", +" ..XXoooXX.. ", +" ..XoooooX.. ", +" ..XoooooX.. ", +" ..XXoooXX.. ", +" ..XXXXX.. ", +" ....... ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/motif/warning.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/motif/warning.xpm new file mode 100644 index 0000000000..35e60316c3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/motif/warning.xpm @@ -0,0 +1,63 @@ +/* XPM */ +static const char *const warning_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"@ c Black", +"o c #A6A800", +"+ c #8A8C00", +"$ c #B8BA00", +" c None", +"O c #6E7000", +"X c #DCDF00", +". c #C00000", +"# c #373800", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" . ", +" ... ", +" ... ", +" ..... ", +" ...X.. ", +" ..XXX.. ", +" ...XXX... ", +" ..XXXXX.. ", +" ..XXXXXX... ", +" ...XXoO+XX.. ", +" ..XXXO@#XXX.. ", +" ..XXXXO@#XXX... ", +" ...XXXXO@#XXXX.. ", +" ..XXXXXO@#XXXX... ", +" ...XXXXXo@OXXXXX.. ", +" ...XXXXXXo@OXXXXXX.. ", +" ..XXXXXXX$@OXXXXXX... ", +" ...XXXXXXXX@XXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXX... ", +" ..XXXXXXXXXXOXXXXXXXXX.. ", +" ...XXXXXXXXXO@#XXXXXXXXX.. ", +" ..XXXXXXXXXXX#XXXXXXXXXX... ", +" ...XXXXXXXXXXXXXXXXXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXXXXXXXX... ", +" .............................. ", +" .............................. ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/new.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/new.xpm new file mode 100644 index 0000000000..6a0b133350 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/new.xpm @@ -0,0 +1,50 @@ +/* XPM */ +static const char *const new_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 29 1", +"* c #97C4E7", +"- c #72A8D2", +": c #FFFFFF", +"9 c #839CB5", +"o c #6B98B8", +"X c #5A89A6", +"# c #3A749C", +", c #D1E5F5", +"0 c #85A7BC", +"$ c #C3DDF1", +"8 c #749BB4", +"; c #5F9BC8", +" c None", +"+ c #538DB3", +"= c #85BBE2", +"3 c #EFF6FC", +"O c #6591AE", +"5 c #F7FBFD", +"7 c #FAFCFE", +"< c #DAEAF7", +"4 c #E9F3FA", +"6 c #FDFDFE", +"1 c #E2EFF8", +". c #8EA9BC", +"% c #B6D5EE", +"& c #A5CCEA", +"> c #ACE95B", +"2 c #F4F9FD", +"@ c #4581AA", +/* pixels */ +" .XoOO+@#. ", +" .$$%&*=O-; ", +" @@@@$%&*O:*o ", +" @>>@$$%&O::*o ", +"@@@>>@@@$%OOoO+ ", +"@>>>>>>@,$%&*=+ ", +"@>>>>>>@<,$%&*+ ", +"@@@>>@@@1<,$%&O ", +" @>>@2341<,$%O ", +" @@@@52341<,$o ", +" .:6752341<,8 ", +" .::6752341<8 ", +" .:::67523419 ", +" .::::6752340 ", +" ............ " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/new_dir.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/new_dir.xpm new file mode 100644 index 0000000000..d100eea753 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/new_dir.xpm @@ -0,0 +1,43 @@ +/* XPM */ +static const char *const new_dir_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 22 1", +"X c Black", +"> c #9BACC2", +"o c #547897", +"1 c #7F99B4", +"O c #D1D9E5", +"< c #EAEDF3", +"# c #CAD2DC", +"3 c #718BA7", +"@ c #BECAD9", +"& c #E1E6EE", +"; c #F5F6F7", +". c #FFFF00", +", c #8DA0B9", +" c None", +"% c #D6DFE7", +"$ c #D2D9E0", +"- c #ADBACE", +"= c #EEF1F3", +"+ c #B3BFD1", +"2 c #7A90AC", +": c #A2B3C5", +"* c #E5EAF1", +/* pixels */ +" .X .XX.", +" ooooo .X.X. ", +" oOOOOo XX...XX", +" oooooooo.......", +" o+@#$%&*XX...XX", +" o+@#$%&*=.X.X. ", +" o-+@#O%&.X;.X .", +" o:-+@#O%&*=;o ", +" o>:-+@#O%&*=o ", +" o,>:-+@#O%&:-+@#O%&o ", +" o21,>:-+@#O%o ", +" o321,>:-+@#Oo ", +" ooooooooooooo ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/osx/README b/3rdparty/wxwidgets3.0-3.0.1/art/osx/README new file mode 100644 index 0000000000..6b959391ae --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/osx/README @@ -0,0 +1,2 @@ +The files in this directory are the sources which were converted by +misc/scripts/png2c.py and included in src/osx/carbon/renderer.cpp. diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/osx/close.png b/3rdparty/wxwidgets3.0-3.0.1/art/osx/close.png new file mode 100644 index 0000000000..7d8f22e77b Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/art/osx/close.png differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/osx/close_current.png b/3rdparty/wxwidgets3.0-3.0.1/art/osx/close_current.png new file mode 100644 index 0000000000..042ca60ce1 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/art/osx/close_current.png differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/osx/close_pressed.png b/3rdparty/wxwidgets3.0-3.0.1/art/osx/close_pressed.png new file mode 100644 index 0000000000..77f665ebfe Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/art/osx/close_pressed.png differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/paste.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/paste.xpm new file mode 100644 index 0000000000..2458378f86 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/paste.xpm @@ -0,0 +1,46 @@ +/* XPM */ +static const char *const paste_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 25 1", +"< c #FEECE4", +"> c #FEE3D7", +"O c #FFFFFF", +"o c #7B767D", +"% c #F79586", +"& c #CAE1F3", +"@ c #F08B62", +"# c #FCCBB8", +"- c #FDD8C9", +"4 c #FFF8F4", +"5 c #FFF5F0", +" c None", +"$ c #F8AA8F", +", c #EFF6FC", +"1 c #F7FBFD", +"2 c #FAFCFE", +"; c #DAEAF7", +": c #E9F3FA", +"6 c #FFFAF8", +". c #3C78A6", +"3 c #FFF1ED", +"X c #9B8687", +"+ c #FBBCA4", +"* c #B6D5EE", +"= c #F4F9FD", +/* pixels */ +" ...... ", +" .XoOOOOoo. ", +".+XOOOOOOX@. ", +".+XXXXXXXX@. ", +".#++$$%@..... ", +".##++$$%.&*.=. ", +".-##++$$.;&.==. ", +".--##++$.:;.... ", +".>--##++.,:;&*. ", +".<>--##+.1,:;&. ", +".<<>--##.21,:;. ", +".3<<>--#.O21=:. ", +".45<<>--....... ", +".6453<>----. ", +"............ " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/plus.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/plus.xpm new file mode 100644 index 0000000000..25d299b305 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/plus.xpm @@ -0,0 +1,22 @@ +/* XPM */ +static const char *const plus_xpm[] = { +"16 16 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ", +" .... ", +" .XX. ", +" .XX. ", +" .XX. ", +" ......XX...... ", +" .XXXXXXXXXXXX. ", +" .XXXXXXXXXXXX. ", +" ......XX...... ", +" .XX. ", +" .XX. ", +" .XX. ", +" .... ", +" ", +" "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/print.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/print.xpm new file mode 100644 index 0000000000..dbdfe6b4d9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/print.xpm @@ -0,0 +1,60 @@ +/* XPM */ +static const char *const print_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 39 1", +"< c #E3E4E6", +"+ c #C3C3C4", +"i c #FFFFFF", +": c #74879B", +"# c #5A89A6", +"a c #F1F4F7", +"r c #5A809C", +"@ c #BDCCD9", +"e c #7A92A4", +"% c #3F6F93", +"t c #9FA2A6", +"3 c #939495", +"w c #5F666D", +"9 c #65839E", +"5 c #4A7291", +"$ c #4B7F9E", +" c None", +"O c #DFE0E2", +"o c #F3F3F3", +"; c #84A5BB", +"& c #467291", +". c #7897AD", +"* c #407598", +"4 c #CFCFD0", +"7 c #6F90A6", +"y c #6A89A2", +"0 c #AAADB2", +"1 c #D2D3D4", +"u c #4F7592", +", c #BCBDBE", +"p c #57778E", +"q c #979BA0", +"2 c #ABABAC", +"- c #E7E7E7", +"= c #D6DEE6", +"> c #9FA0A0", +"8 c #829EB5", +"X c #8FB0C3", +"6 c #5D7C93", +/* pixels */ +" .XXXXXXXX ", +" .oooooooX ", +" .OOOOOOOX ", +" .+++++++X ", +"@##$%&&&&&%*##@ ", +"$=-;:>,<123$-=$ ", +".44.5678.96$44. ", +"7,,,,,,,,,,,,,7 ", +"900qwwwwwwwe009 ", +"rtt9ryyyyyyuttr ", +"6qq6iiiiiii%qq6 ", +"633paiiiiii%336 ", +"XXX*iiiiiii%XXX ", +" 6iiiiiii% ", +" $XXXXXXX# " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/quit.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/quit.xpm new file mode 100644 index 0000000000..885bbd0fa4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/quit.xpm @@ -0,0 +1,90 @@ +/* XPM */ +static const char *const quit_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 69 1", +"@ c Black", +"i c #9AEA53", +"D c #7E9BB1", +"H c #839FB4", +", c #B7C7D3", +"8 c #BCCBD6", +"7 c #C1CFDA", +"v c #92ABBD", +"- c #D0DBE2", +"O c #547897", +"+ c #376485", +"L c #7090A8", +"t c #AEC0CE", +"g c #B3C4D1", +"S c #84A0B4", +"G c #89A4B8", +"> c #BDCCD7", +"F c #5A809C", +"2 c #C2D0DA", +"k c #93ACBE", +"= c #D6E0E6", +"* c #446A8C", +"z c #A5B9C8", +"# c #DEE5EB", +"0 c #AFC1CE", +"r c #B4C5D2", +"p c #B9C9D5", +"A c #8AA5B8", +"M c #92AABD", +"j c #A6BAC9", +"K c #7796AC", +"l c #ABBECC", +"o c #E4EAEF", +"9 c #B5C6D2", +" c None", +"; c #C9D6DF", +"X c #305F81", +"m c #98AFC0", +"V c #9DB3C3", +"% c #D1DBE3", +"u c #A2B7C6", +"y c #A7BBCA", +"h c #ACBFCD", +"4 c #B6C7D3", +"w c #C0CFD9", +"d c #982106", +"B c #85A0B5", +"6 c #C8D4DE", +"c c #99B0C1", +"x c #9EB4C4", +"$ c #D7E0E7", +"q c #A8BCCA", +"s c #ADC0CD", +"3 c #BCCCD7", +"N c #8BA5B9", +": c #C4D1DB", +"1 c #C9D5DE", +"f c #9AB1C2", +"n c #A4B9C8", +"a c #B3C5D1", +". c #215579", +"J c #7D9AB0", +"& c #829EB5", +"e c #BBCAD6", +"b c #8CA6B9", +"Z c #91AABC", +"C c #96AEC0", +"< c #CFDAE2", +"5 c #AFC2CF", +/* pixels */ +" ..XXXXXXXXXX ", +" XoO+X@@@@@@X ", +" X#$%&X*@@@@X ", +" X=-;:>,X@@@X ", +" X<12345X@@@X ", +" X67890qX@XXX ", +" XwertyuX@XiX ", +" XpasddfX++iiX ", +" XghjddkXiiiiiX ", +" XlzxcvbXiiiiiiX", +" XnxmMNBXiiiiiX ", +" XVCZASDXXXiiX ", +" XXFGHJKX XiX ", +" FXXFLX XX ", +" XX* " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/redo.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/redo.xpm new file mode 100644 index 0000000000..84ed3553ca --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/redo.xpm @@ -0,0 +1,58 @@ +/* XPM */ +static const char *const redo_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 37 1", +"4 c #9BACC2", +"; c #4C7398", +"3 c #547B99", +"* c #547897", +"# c #5A89A6", +"8 c #3A749C", +"5 c #5A809C", +", c #7F99B4", +"& c #3F6F93", +"9 c #85A7BC", +"+ c #749BB4", +"> c #718BA7", +"e c #A5B3C8", +"w c #BECAD9", +": c #65839D", +"u c #E1E6EE", +"o c #236289", +"r c #ADBED2", +"= c #597B9A", +"2 c #8DA0B9", +" c None", +"% c #467291", +"1 c #7393AB", +"i c #4C809F", +"- c #A0BACB", +"O c #6591AE", +"X c #407598", +"6 c #6F90A6", +"t c #D2D9E0", +"7 c #ADBACE", +"@ c #326A8F", +"0 c #467A9C", +". c #ACC4D3", +"< c #7F97B0", +"y c #B3BFD1", +"q c #A2B3C5", +"$ c #8FB0C3", +/* pixels */ +" .XoooO ", +" +o@@@@@o# +", +" $@%%&@&%%&@ +o", +" X*=@+-+@*=;@#&@", +" @:=+ @=:=*:@", +" &>:$ @:>>>@", +" &,,,,&", +" +123 @<2222&", +" X44X #@56<44X", +" O1748 .9#&o", +" 0qwe8 ", +" 8rty8 ", +" 8wu+ ", +" i## ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/removable.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/removable.xpm new file mode 100644 index 0000000000..e066fd4df7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/removable.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static const char *const removable_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 23 1", +"@ c #C3C3C4", +"4 c #FFFFFF", +"o c #D5D6D8", +"> c #7A92A3", +". c #8497A5", +"% c #ACAEB2", +"2 c #4A7898", +": c #DCE2EA", +", c #F5F6F7", +"= c #EBEBEC", +"$ c #B7B7B8", +" c None", +"X c #DFE0E2", +"* c #A6A8AD", +"1 c #4C809F", +"3 c #407598", +"O c #CFCFD0", +"; c #9EA2A8", +"# c #BCBDBE", +"+ c #C6C8CA", +"- c #979BA0", +"& c #E7E7E7", +"< c #8FB0C3", +/* pixels */ +" ......... ", +" .XoO+@#$%. ", +" .XoO+@#$%. ", +" .&XoO+@#$%*. ", +" .&XoO+@#$%*. ", +" .=&XoO+@#$%*-. ", +" .=&XoO+@#$%*;. ", +".:=&XoO+@#$%*;>.", +".,=&XoO+@#$%*;-.", +"<..............<", +"<,=&XoO+@#$%%%%.", +" c #718BA7", +"0 c #A5B3C8", +"q c #BECAD9", +": c #65839D", +"u c #E1E6EE", +"X c #236289", +"y c #ADBED2", +"= c #597B9A", +"1 c #8DA0B9", +" c None", +"% c #467291", +"3 c #7393AB", +"i c #4C809F", +"; c #A0BACB", +". c #6591AE", +"o c #407598", +"5 c #6F90A6", +"t c #D2D9E0", +"9 c #ADBACE", +"# c #326A8F", +"e c #467A9C", +"O c #ACC4D3", +"< c #7F97B0", +"r c #B3BFD1", +"w c #A2B3C5", +"& c #8FB0C3", +/* pixels */ +" .XXXoO ", +"+ @X#####X+ ", +"X+ #$%%$#$%%#& ", +"#$@#*=-#+;+#=-o ", +"#:-=:=# +=:# ", +"#>>>:# &:>$ ", +"$,,,>o o<,$ ", +"$1111<# 213+ ", +"o44<56#@ o44o ", +"X$@7O 8493. ", +" 80qwe ", +" 8rty8 ", +" +uq8 ", +" @@i ", +" " +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/up.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/up.xpm new file mode 100644 index 0000000000..f29ed3d386 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/up.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static const char *const up_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" .. ", +" .XX. ", +" .XXXX. ", +" .XXXXXX. ", +" .XXXXXXXX. ", +" ....XXXX.... ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" ...... ", +" "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/wxwin.ico b/3rdparty/wxwidgets3.0-3.0.1/art/wxwin.ico new file mode 100644 index 0000000000..0893f8c636 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/art/wxwin.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/wxwin16x16.png b/3rdparty/wxwidgets3.0-3.0.1/art/wxwin16x16.png new file mode 100644 index 0000000000..93e2ec1729 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/art/wxwin16x16.png differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/wxwin16x16.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/wxwin16x16.xpm new file mode 100644 index 0000000000..119185329a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/wxwin16x16.xpm @@ -0,0 +1,161 @@ +/* XPM */ +static const char *const wxwin16x16_xpm[] = { +"16 16 142 2", +" c None", +". c #7171C0", +"+ c #7D7DC7", +"@ c #8181CE", +"# c #7979CE", +"$ c #7171CE", +"% c #6868CD", +"& c #5050C0", +"* c #7C7CCB", +"= c #D3D3FC", +"- c #C0C0FF", +"; c #B1B1FF", +"> c #A4A4FF", +", c #9696FF", +"' c #6B6BE3", +") c #3E3EC0", +"! c #7B7BD3", +"~ c #CFCFFF", +"{ c #A7A7FF", +"] c #8989FF", +"^ c #7B7BFF", +"/ c #5E5EEB", +"( c #3333BF", +"_ c #6969D3", +": c #BEBEFF", +"< c #8E8EFF", +"[ c #5E5EFF", +"} c #4C4CFD", +"| c #6464C6", +"1 c #A4A478", +"2 c #BFBF63", +"3 c #BFBF5C", +"4 c #BFBF56", +"5 c #BFBF51", +"6 c #C17474", +"7 c #BF7070", +"8 c #BF6969", +"9 c #BF6363", +"0 c #544AC7", +"a c #A8A8FF", +"b c #7070FF", +"c c #5050FF", +"d c #3F3FFF", +"e c #8C8CBA", +"f c #F6F6C8", +"g c #FBFBBB", +"h c #FBFBAE", +"i c #FBFBA1", +"j c #F9F993", +"k c #D7D760", +"l c #D28D8D", +"m c #EEB8B8", +"n c #EFAAAA", +"o c #EF9E9E", +"p c #7C5ABC", +"q c #8D8DFF", +"r c #4747FF", +"s c #3535FF", +"t c #2B2BFF", +"u c #AAAAA7", +"v c #FFFFD2", +"w c #FFFFA9", +"x c #FFFF9A", +"y c #FFFF8D", +"z c #FFFF80", +"A c #E4E45B", +"B c #E39F9F", +"C c #FFCCCC", +"D c #FFA9A9", +"E c #FF9C9C", +"F c #B469A0", +"G c #3E3DE7", +"H c #2828EF", +"I c #1E1EEF", +"J c #1515EF", +"K c #A5A595", +"L c #FFFFC2", +"M c #FFFF8F", +"N c #F7F765", +"O c #F2F251", +"P c #DBDB3A", +"Q c #E48E8E", +"R c #FFBABA", +"S c #FF8E8E", +"T c #FF8181", +"U c #FF6868", +"V c #E54D60", +"W c #AC2E56", +"X c #0B0BBF", +"Y c #0606BF", +"Z c #C8C85D", +"` c #FEFEB1", +" . c #FEFE74", +".. c #F4F456", +"+. c #EFEF42", +"@. c #EFEF38", +"#. c #D7D725", +"$. c #E47676", +"%. c #FFA8A8", +"&. c #FF7373", +"*. c #FF5555", +"=. c #FF4343", +"-. c #FF3939", +";. c #DA2323", +">. c #CFCF3C", +",. c #F6F694", +"'. c #F0F047", +"). c #EFEF2E", +"!. c #EFEF24", +"~. c #D7D715", +"{. c #E45757", +"]. c #FF8888", +"^. c #FF4646", +"/. c #FF2F2F", +"(. c #FF2525", +"_. c #DA1414", +":. c #C3C328", +"<. c #EBEB55", +"[. c #ECEC2F", +"}. c #ECEC24", +"|. c #ECEC1A", +"1. c #EBEB10", +"2. c #CDCD06", +"3. c #DD3A3A", +"4. c #FF6060", +"5. c #FF1B1B", +"6. c #FE1111", +"7. c #D10707", +"8. c #B8B819", +"9. c #B7B715", +"0. c #B7B710", +"a. c #B7B70B", +"b. c #B7B706", +"c. c #B7B701", +"d. c #B7B700", +"e. c #BF1A1A", +"f. c #CC1919", +"g. c #CE1414", +"h. c #CE0E0E", +"i. c #CE0808", +"j. c #C90202", +"k. c #C00000", +" ", +" ", +" . + @ # $ % & ", +" * = - ; > , ' ) ", +" ! ~ { , ] ^ / ( ", +" _ : < ^ [ } | 1 2 3 4 5 ", +"6 7 8 9 0 a b c d e f g h i j k ", +"l m n o p q r s t u v w x y z A ", +"B C D E F G H I J K L M z N O P ", +"Q R S T U V W X Y Z ` ...+.@.#.", +"$.%.&.*.=.-.;. >.,.'.@.).!.~.", +"{.].^.-./.(._. :.<.[.}.|.1.2.", +"3.4./.(.5.6.7. 8.9.0.a.b.c.d.", +"e.f.g.h.i.j.k. ", +" ", +" "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/wxwin32x32.png b/3rdparty/wxwidgets3.0-3.0.1/art/wxwin32x32.png new file mode 100644 index 0000000000..42e4fd97f7 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/art/wxwin32x32.png differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/art/wxwin32x32.xpm b/3rdparty/wxwidgets3.0-3.0.1/art/wxwin32x32.xpm new file mode 100644 index 0000000000..d318f0aadb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/art/wxwin32x32.xpm @@ -0,0 +1,442 @@ +/* XPM */ +static const char *const wxwin32x32_xpm[] = { +"32 32 407 2", +" c None", +". c #7373C1", +"+ c #6E6EBF", +"@ c #6B6BBF", +"# c #6868BF", +"$ c #6464BF", +"% c #6161BF", +"& c #5E5EBF", +"* c #5A5ABF", +"= c #5959C0", +"- c #7171C0", +"; c #7272C1", +"> c #8686CE", +", c #8686D0", +"' c #8282D0", +") c #7D7DD0", +"! c #7979D0", +"~ c #7575D0", +"{ c #7171D0", +"] c #6D6DD0", +"^ c #6666CD", +"/ c #5151C1", +"( c #4C4CBF", +"_ c #7171C1", +": c #7272C2", +"< c #C1C1F2", +"[ c #D7D7FF", +"} c #C9C9FF", +"| c #C2C2FF", +"1 c #BBBBFF", +"2 c #B4B4FF", +"3 c #AEAEFF", +"4 c #A7A7FF", +"5 c #A0A0FF", +"6 c #9A9AFF", +"7 c #8484F2", +"8 c #4949C2", +"9 c #4444C1", +"0 c #6A6AC0", +"a c #8989D4", +"b c #DADAFF", +"c c #C0C0FF", +"d c #9393FF", +"e c #8C8CFF", +"f c #8686FF", +"g c #5454D4", +"h c #3E3EC0", +"i c #6363BF", +"j c #8686D8", +"k c #D4D4FF", +"l c #D2D2FF", +"m c #7F7FFF", +"n c #7878FF", +"o c #4F4FD7", +"p c #3737BF", +"q c #5C5CBF", +"r c #7D7DD8", +"s c #CCCCFF", +"t c #CACAFF", +"u c #A8A8FF", +"v c #7070FF", +"w c #6B6BFF", +"x c #4545D7", +"y c #3030BF", +"z c #5555BF", +"A c #7373D8", +"B c #C3C3FF", +"C c #9C9CFF", +"D c #8D8DFF", +"E c #7777FF", +"F c #6262FF", +"G c #5252FF", +"H c #4B4BFF", +"I c #4848FF", +"J c #3232D7", +"K c #2626BF", +"L c #4E4EBF", +"M c #6A6AD8", +"N c #B9B9FF", +"O c #9090FF", +"P c #6F6FFF", +"Q c #5555FF", +"R c #4646FF", +"S c #4B4BF5", +"T c #8282B4", +"U c #93938E", +"V c #B1B173", +"W c #BFBF68", +"X c #BFBF65", +"Y c #BFBF62", +"Z c #BFBF5E", +"` c #BFBF5B", +" . c #BFBF57", +".. c #BFBF54", +"+. c #BFBF51", +"@. c #5858D8", +"#. c #B2B2FF", +"$. c #B1B1FF", +"%. c #8484FF", +"&. c #7272FF", +"*. c #6767FF", +"=. c #4F4FFF", +"-. c #4747FF", +";. c #4242FF", +">. c #4141FA", +",. c #ABAB8A", +"'. c #E4E4AA", +"). c #F5F5C3", +"!. c #F6F6BE", +"~. c #F6F6B7", +"{. c #F6F6B1", +"]. c #F6F6AB", +"^. c #F6F6A5", +"/. c #F6F69E", +"(. c #F6F698", +"_. c #F1F18C", +":. c #D0D05F", +"<. c #BFBF48", +"[. c #C17474", +"}. c #C07171", +"|. c #BF6E6E", +"1. c #BF6B6B", +"2. c #BF6868", +"3. c #BF6464", +"4. c #BF6161", +"5. c #7C498C", +"6. c #4242D8", +"7. c #A4A4FF", +"8. c #5959FF", +"9. c #3D3DFF", +"0. c #3838FF", +"a. c #6666CA", +"b. c #DCDC98", +"c. c #FFFFDD", +"d. c #FFFFD7", +"e. c #FFFFC0", +"f. c #FFFFB8", +"g. c #FFFFB2", +"h. c #FFFFAB", +"i. c #FFFFA4", +"j. c #FFFF9D", +"k. c #FFFF97", +"l. c #FFFF90", +"m. c #FBFB85", +"n. c #C2C244", +"o. c #C37676", +"p. c #DA9B9B", +"q. c #DF9F9F", +"r. c #DF9A9A", +"s. c #DF9494", +"t. c #DF8F8F", +"u. c #DF8A8A", +"v. c #B47094", +"w. c #3B3BD8", +"x. c #9292FF", +"y. c #5656FF", +"z. c #3333FF", +"A. c #2E2EFF", +"B. c #7070B6", +"C. c #E7E79F", +"D. c #FFFFDE", +"E. c #FFFFCF", +"F. c #FFFFB5", +"G. c #FFFF9E", +"H. c #FFFF8A", +"I. c #FFFF83", +"J. c #FFFF7C", +"K. c #C8C843", +"L. c #C06D6D", +"M. c #F1BEBE", +"N. c #FFDBDB", +"O. c #FFCBCB", +"P. c #FFC0C0", +"Q. c #FFBABA", +"R. c #FFB3B3", +"S. c #FFACAC", +"T. c #CE89AC", +"U. c #3333D7", +"V. c #8787FF", +"W. c #4D4DFF", +"X. c #2929FF", +"Y. c #2424FF", +"Z. c #6B6BB3", +"`. c #E7E795", +" + c #FFFFC6", +".+ c #FFFFA8", +"++ c #FFFF76", +"@+ c #FFFF6F", +"#+ c #C8C83C", +"$+ c #C77474", +"%+ c #FFD3D3", +"&+ c #FFDEDE", +"*+ c #FFC4C4", +"=+ c #FFA6A6", +"-+ c #FF9F9F", +";+ c #F3929A", +">+ c #2F29C3", +",+ c #4C4CFB", +"'+ c #6868FF", +")+ c #3939FF", +"!+ c #1F1FFF", +"~+ c #1A1AFF", +"{+ c #6666B0", +"]+ c #E7E78A", +"^+ c #FFFFD0", +"/+ c #FFFFBD", +"(+ c #FFFF9B", +"_+ c #FFFF91", +":+ c #FAFA6E", +"<+ c #F5F55F", +"[+ c #F5F558", +"}+ c #F7F756", +"|+ c #C7C732", +"1+ c #C86E6E", +"2+ c #FFC9C9", +"3+ c #FFD7D7", +"4+ c #FFB8B8", +"5+ c #FF9898", +"6+ c #FF9292", +"7+ c #FF8B8B", +"8+ c #B16098", +"9+ c #2420C6", +"0+ c #2222DD", +"a+ c #1F1FDF", +"b+ c #1B1BDF", +"c+ c #1818DF", +"d+ c #1414DF", +"e+ c #1010DF", +"f+ c #0C0CDF", +"g+ c #5F5F9C", +"h+ c #E7E77F", +"i+ c #FFFFC9", +"j+ c #FFFFB4", +"k+ c #FFFF8E", +"l+ c #FFFF7D", +"m+ c #FEFE75", +"n+ c #F4F45D", +"o+ c #EFEF4F", +"p+ c #EFEF4A", +"q+ c #EFEF44", +"r+ c #EFEF3F", +"s+ c #BFBF22", +"t+ c #C86666", +"u+ c #FFBFBF", +"v+ c #FFD0D0", +"w+ c #FFADAD", +"x+ c #FF8484", +"y+ c #FF7E7E", +"z+ c #FF7373", +"A+ c #E75F70", +"B+ c #B0457F", +"C+ c #9A3776", +"D+ c #5F1D7C", +"E+ c #0C0CBF", +"F+ c #0909BF", +"G+ c #0707BF", +"H+ c #0404BF", +"I+ c #878766", +"J+ c #E6E674", +"K+ c #FFFFC2", +"L+ c #FFFF82", +"M+ c #FEFE6E", +"N+ c #F3F355", +"O+ c #EFEF45", +"P+ c #EFEF40", +"Q+ c #EFEF3B", +"R+ c #EFEF36", +"S+ c #BFBF1C", +"T+ c #C85F5F", +"U+ c #FFB4B4", +"V+ c #FFA2A2", +"W+ c #FF7575", +"X+ c #FF5E5E", +"Y+ c #FF5050", +"Z+ c #FF4A4A", +"`+ c #FF4545", +" @ c #E73535", +".@ c #BF2121", +"+@ c #B7B733", +"@@ c #DCDC55", +"#@ c #FDFDB7", +"$@ c #FFFFA2", +"%@ c #FFFF75", +"&@ c #FCFC64", +"*@ c #F2F24E", +"=@ c #EFEF31", +"-@ c #EFEF2C", +";@ c #BFBF16", +">@ c #C85656", +",@ c #FFAAAA", +"'@ c #FFC2C2", +")@ c #FF9797", +"!@ c #FF7777", +"~@ c #FF6E6E", +"{@ c #FF5454", +"]@ c #FF4040", +"^@ c #FF3B3B", +"/@ c #E72C2C", +"(@ c #BF1919", +"_@ c #B7B72E", +":@ c #DADA48", +"<@ c #F7F7A6", +"[@ c #F6F689", +"}@ c #F2F254", +"|@ c #EFEF27", +"1@ c #EFEF22", +"2@ c #BFBF10", +"3@ c #C84040", +"4@ c #FF9A9A", +"5@ c #FFBBBB", +"6@ c #FF7171", +"7@ c #FF6666", +"8@ c #FF4E4E", +"9@ c #FF4646", +"0@ c #FF4141", +"a@ c #FF3C3C", +"b@ c #FF3737", +"c@ c #FF3232", +"d@ c #E72424", +"e@ c #BF1414", +"f@ c #B7B729", +"g@ c #DADA3F", +"h@ c #F7F7A1", +"i@ c #F4F480", +"j@ c #F0F047", +"k@ c #EFEF1D", +"l@ c #EFEF18", +"m@ c #BFBF0B", +"n@ c #C83636", +"o@ c #FFABAB", +"p@ c #FF7676", +"q@ c #FF2D2D", +"r@ c #FF2828", +"s@ c #E71C1C", +"t@ c #BF0F0F", +"u@ c #B7B724", +"v@ c #D1D132", +"w@ c #F4F478", +"x@ c #EFEF13", +"y@ c #ECEC0E", +"z@ c #BABA05", +"A@ c #C83030", +"B@ c #FF6161", +"C@ c #FF2323", +"D@ c #FF1E1E", +"E@ c #E71414", +"F@ c #BF0A0A", +"G@ c #B8B820", +"H@ c #B9B91F", +"I@ c #DADA2C", +"J@ c #E9E931", +"K@ c #EAEA2A", +"L@ c #EAEA25", +"M@ c #EAEA20", +"N@ c #EAEA1C", +"O@ c #EAEA17", +"P@ c #EAEA12", +"Q@ c #EAEA0D", +"R@ c #E5E508", +"S@ c #C7C703", +"T@ c #B7B701", +"U@ c #C52929", +"V@ c #FF5858", +"W@ c #FF1919", +"X@ c #FF1414", +"Y@ c #E30C0C", +"Z@ c #BF0606", +"`@ c #B8B819", +" # c #B7B717", +".# c #B7B714", +"+# c #B7B711", +"@# c #B7B70F", +"## c #B7B70C", +"$# c #B7B70A", +"%# c #B7B707", +"&# c #B7B705", +"*# c #B7B702", +"=# c #B7B700", +"-# c #BF2020", +";# c #E63131", +"># c #FF5555", +",# c #FF3A3A", +"'# c #FF0F0F", +")# c #FA0A0A", +"!# c #C90303", +"~# c #C00202", +"{# c #C01C1C", +"]# c #CB1B1B", +"^# c #D01A1A", +"/# c #D01616", +"(# c #D01313", +"_# c #D01010", +":# c #D00D0D", +"<# c #D00A0A", +"[# c #D00707", +"}# c #CF0303", +"|# c #C30101", +"1# c #C00000", +"2# c #C21414", +"3# c #BF1111", +"4# c #BF0E0E", +"5# c #BF0C0C", +"6# c #BF0909", +"7# c #BF0707", +"8# c #BF0404", +"9# c #BF0202", +"0# c #C50000", +" ", +" ", +" ", +" ", +" . + @ # $ % & * = ", +" - ; > , ' ) ! ~ { ] ^ / ( ", +" _ : < [ } | 1 2 3 4 5 6 7 8 9 ", +" 0 a b b c 2 3 4 5 6 d e f g h ", +" i j k l 2 4 5 6 d e f m n o p ", +" q r s t u 6 d e f m n v w x y ", +" z A B | C D f m E F G H I J K ", +" L M 1 N O m n P Q H R S T U V W X Y Z ` ...+. ", +" p @.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.", +" [.}.|.1.2.3.4.5.6.6 7.&.8.I ;.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.", +"}.o.p.q.r.s.t.u.v.w.O x.y.;.9.0.z.A.B.C.D.E.F.h.i.G.k.l.H.I.J.K.", +"L.M.N.O.P.Q.R.S.T.U.V.e W.0.z.A.X.Y.Z.`.d. +.+G.k.l.H.I.J.++@+#+", +"$+%+&+*+R.S.=+-+;+>+,+'+)+A.X.Y.!+~+{+]+^+/+(+_+H.I.J.:+<+[+}+|+", +"1+2+3+4+=+-+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+j+k+I.l+m+n+o+p+q+r+s+", +"t+u+v+w+5+6+7+x+y+z+A+B+C+D+E+F+G+H+I+J+K+h.L+++M+N+p+O+P+Q+R+S+", +"T+U+2+V+7+x+y+W+X+Y+Z+`+ @.@ +@@@#@$@%@&@*@O+P+Q+R+=@-@;@", +">@,@'@)@y+!@~@{@Z+`+]@^@/@(@ _@:@<@[@}@O+P+Q+R+=@-@|@1@2@", +"3@4@5@7+6@7@8@9@0@a@b@c@d@e@ f@g@h@i@j@Q+R+=@-@|@1@k@l@m@", +"n@y+o@p@{@9@0@a@b@c@q@r@s@t@ u@v@i@w@Q+=@-@|@1@k@l@x@y@z@", +"A@p@-+B@0@a@b@c@q@r@C@D@E@F@ G@H@I@J@K@L@M@N@O@P@Q@R@S@T@", +"U@7@4@V@b@c@q@r@C@D@W@X@Y@Z@ `@ #.#+#@###$#%#&#*#=#=# ", +"-#;#>#,#q@r@C@D@W@X@'#)#!#~# ", +"{#(@]#^#/#(#_#:#<#[#}#|#1# ", +" 2#3#4#5#6#7#8#9#1#0# ", +" ", +" ", +" ", +" "}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.bcc b/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.bcc new file mode 100644 index 0000000000..b2307a8591 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.bcc @@ -0,0 +1,222 @@ +# ========================================================================= +# This configuration file was generated by +# Bakefile 0.2.9 (http://www.bakefile.org) +# Beware that all changes made to this file will be overwritten next +# time you run Bakefile! +# ========================================================================= + + +# ------------------------------------------------------------------------- +# These are configurable options: +# ------------------------------------------------------------------------- + +# C compiler +!ifndef CC +CC = bcc32 +!endif + +# C++ compiler +!ifndef CXX +CXX = bcc32 +!endif + +# Standard flags for CC +!ifndef CFLAGS +CFLAGS = +!endif + +# Standard flags for C++ +!ifndef CXXFLAGS +CXXFLAGS = +!endif + +# Standard preprocessor flags (common for CC and CXX) +!ifndef CPPFLAGS +CPPFLAGS = -a8 -g0 +!endif + +# Standard linker flags +!ifndef LDFLAGS +LDFLAGS = +!endif + +# The C preprocessor +!ifndef CPP +CPP = cpp32 -Sr -oCON +!endif + +# What type of library to build? [0,1] +!ifndef SHARED +SHARED = 0 +!endif + +# GTK+ toolkit version [,2] +!ifndef TOOLKIT_VERSION +TOOLKIT_VERSION = +!endif + +# Build wxUniversal instead of native port? [0,1] +!ifndef WXUNIV +WXUNIV = 0 +!endif + +# Compile Unicode build of wxWidgets? [0,1] +!ifndef UNICODE +UNICODE = 1 +!endif + +# Use MSLU library when building Unicode version. [0,1] +!ifndef MSLU +MSLU = 0 +!endif + +# Type of compiled binaries [debug,release] +!ifndef BUILD +BUILD = debug +!endif + +# Should debugging info be included in the executables? The default value +# "default" means that debug info will be included if BUILD=debug +# and not included if BUILD=release. [0,1,default] +!ifndef DEBUG_INFO +DEBUG_INFO = default +!endif + +# Value of wxDEBUG_LEVEL. The default value is the same as 1 and means that all +# but expensive assert checks are enabled, use 0 to completely remove debugging +# code. [0,1,default] +!ifndef DEBUG_FLAG +DEBUG_FLAG = 1 +!endif + +# Multiple libraries or single huge monolithic one? [0,1] +!ifndef MONOLITHIC +MONOLITHIC = 0 +!endif + +# Build GUI libraries? [0,1] +!ifndef USE_GUI +USE_GUI = 1 +!endif + +# Build wxHTML library (USE_GUI must be 1)? [0,1] +!ifndef USE_HTML +USE_HTML = 1 +!endif + +# Build wxWebView library (USE_GUI must be 1)? [0,1] +!ifndef USE_WEBVIEW +USE_WEBVIEW = 1 +!endif + +# Build multimedia library (USE_GUI must be 1)? [0,1] +!ifndef USE_MEDIA +USE_MEDIA = 1 +!endif + +# Build wxXRC library (USE_GUI must be 1)? [0,1] +!ifndef USE_XRC +USE_XRC = 1 +!endif + +# Build wxAUI library (USE_GUI must be 1)? [0,1] +!ifndef USE_AUI +USE_AUI = 1 +!endif + +# Build wxRibbon library (USE_GUI must be 1)? [0,1] +!ifndef USE_RIBBON +USE_RIBBON = 1 +!endif + +# Build wxPropertyGrid library (USE_GUI must be 1)? [0,1] +!ifndef USE_PROPGRID +USE_PROPGRID = 1 +!endif + +# Build wxRichTextCtrl library (USE_GUI must be 1)? [0,1] +!ifndef USE_RICHTEXT +USE_RICHTEXT = 1 +!endif + +# Build wxStyledTextCtrl library (USE_GUI must be 1)? [0,1] +!ifndef USE_STC +USE_STC = 1 +!endif + +# Build OpenGL canvas library (USE_GUI must be 1)? [0,1] +!ifndef USE_OPENGL +USE_OPENGL = 1 +!endif + +# Build quality assurance classes library (USE_GUI must be 1)? [0,1] +!ifndef USE_QA +USE_QA = 0 +!endif + +# Enable exceptions in compiled code. [0,1] +!ifndef USE_EXCEPTIONS +USE_EXCEPTIONS = 1 +!endif + +# Enable run-time type information (RTTI) in compiled code. [0,1] +!ifndef USE_RTTI +USE_RTTI = 1 +!endif + +# Enable threading in compiled code. [0,1] +!ifndef USE_THREADS +USE_THREADS = 1 +!endif + +# Enable wxCairoContext for platforms other than Linux/GTK. [0,1] +!ifndef USE_CAIRO +USE_CAIRO = 0 +!endif + +# Is this official build by wxWidgets developers? [0,1] +!ifndef OFFICIAL_BUILD +OFFICIAL_BUILD = 0 +!endif + +# Use this to name your customized DLLs differently +!ifndef VENDOR +VENDOR = custom +!endif + +# +!ifndef WX_FLAVOUR +WX_FLAVOUR = +!endif + +# +!ifndef WX_LIB_FLAVOUR +WX_LIB_FLAVOUR = +!endif + +# Name of your custom configuration. This affects directory +# where object files are stored as well as the location of +# compiled .lib files and setup.h under the lib/ toplevel directory. +!ifndef CFG +CFG = +!endif + +# Compiler flags needed to compile test suite in tests directory. If you want +# to run the tests, set it so that the compiler can find CppUnit headers. +!ifndef CPPUNIT_CFLAGS +CPPUNIT_CFLAGS = +!endif + +# Linker flags needed to link test suite in tests directory. If you want +# to run the tests, include CppUnit library here. +!ifndef CPPUNIT_LIBS +CPPUNIT_LIBS = +!endif + +# Version of C runtime library to use. You can change this to +# static if SHARED=0, but it is highly recommended to not do +# it if SHARED=1 unless you know what you are doing. [dynamic,static] +!ifndef RUNTIME_LIBS +RUNTIME_LIBS = dynamic +!endif + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.gcc b/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.gcc new file mode 100644 index 0000000000..f744f795d7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.gcc @@ -0,0 +1,157 @@ +# ========================================================================= +# This configuration file was generated by +# Bakefile 0.2.9 (http://www.bakefile.org) +# Beware that all changes made to this file will be overwritten next +# time you run Bakefile! +# ========================================================================= + + +# ------------------------------------------------------------------------- +# These are configurable options: +# ------------------------------------------------------------------------- + +# Compiler flags to link shared library +LINK_DLL_FLAGS ?= -shared + +# Compiler flags to link loadable module +LINK_MODULE_FLAGS ?= -shared + +# C compiler +CC = gcc + +# C++ compiler +CXX = g++ + +# Standard flags for CC +CFLAGS ?= + +# Standard flags for C++ +CXXFLAGS ?= + +# Standard preprocessor flags (common for CC and CXX) +CPPFLAGS ?= + +# Standard linker flags +LDFLAGS ?= + +# The C preprocessor +CPP ?= $(CC) -E + +# What type of library to build? [0,1] +SHARED ?= 0 + +# GTK+ toolkit version [,2] +TOOLKIT_VERSION ?= + +# Build wxUniversal instead of native port? [0,1] +WXUNIV ?= 0 + +# Compile Unicode build of wxWidgets? [0,1] +UNICODE ?= 1 + +# Use MSLU library when building Unicode version. [0,1] +MSLU ?= 0 + +# Type of compiled binaries [debug,release] +BUILD ?= debug + +# Should debugging info be included in the executables? The default value +# "default" means that debug info will be included if BUILD=debug +# and not included if BUILD=release. [0,1,default] +DEBUG_INFO ?= default + +# Value of wxDEBUG_LEVEL. The default value is the same as 1 and means that all +# but expensive assert checks are enabled, use 0 to completely remove debugging +# code. [0,1,default] +DEBUG_FLAG ?= 1 + +# Multiple libraries or single huge monolithic one? [0,1] +MONOLITHIC ?= 0 + +# Build GUI libraries? [0,1] +USE_GUI ?= 1 + +# Build wxHTML library (USE_GUI must be 1)? [0,1] +USE_HTML ?= 1 + +# Build wxWebView library (USE_GUI must be 1)? [0,1] +USE_WEBVIEW ?= 1 + +# Build multimedia library (USE_GUI must be 1)? [0,1] +USE_MEDIA ?= 1 + +# Build wxXRC library (USE_GUI must be 1)? [0,1] +USE_XRC ?= 1 + +# Build wxAUI library (USE_GUI must be 1)? [0,1] +USE_AUI ?= 1 + +# Build wxRibbon library (USE_GUI must be 1)? [0,1] +USE_RIBBON ?= 1 + +# Build wxPropertyGrid library (USE_GUI must be 1)? [0,1] +USE_PROPGRID ?= 1 + +# Build wxRichTextCtrl library (USE_GUI must be 1)? [0,1] +USE_RICHTEXT ?= 1 + +# Build wxStyledTextCtrl library (USE_GUI must be 1)? [0,1] +USE_STC ?= 1 + +# Build OpenGL canvas library (USE_GUI must be 1)? [0,1] +USE_OPENGL ?= 1 + +# Build quality assurance classes library (USE_GUI must be 1)? [0,1] +USE_QA ?= 0 + +# Enable exceptions in compiled code. [0,1] +USE_EXCEPTIONS ?= 1 + +# Enable run-time type information (RTTI) in compiled code. [0,1] +USE_RTTI ?= 1 + +# Enable threading in compiled code. [0,1] +USE_THREADS ?= 1 + +# Enable wxCairoContext for platforms other than Linux/GTK. [0,1] +USE_CAIRO ?= 0 + +# Is this official build by wxWidgets developers? [0,1] +OFFICIAL_BUILD ?= 0 + +# Use this to name your customized DLLs differently +VENDOR ?= custom + +# +WX_FLAVOUR ?= + +# +WX_LIB_FLAVOUR ?= + +# Name of your custom configuration. This affects directory +# where object files are stored as well as the location of +# compiled .lib files and setup.h under the lib/ toplevel directory. +CFG ?= + +# Compiler flags needed to compile test suite in tests directory. If you want +# to run the tests, set it so that the compiler can find CppUnit headers. +CPPUNIT_CFLAGS ?= + +# Linker flags needed to link test suite in tests directory. If you want +# to run the tests, include CppUnit library here. +CPPUNIT_LIBS ?= + +# Version of C runtime library to use. You can change this to +# static if SHARED=0, but it is highly recommended to not do +# it if SHARED=1 unless you know what you are doing. [dynamic,static] +RUNTIME_LIBS ?= dynamic + +# Set the version of your Mingw installation here. +# "3" ...... this is for Mingw 2.0 or newer (comes with gcc3) +# "2.95" ... for Mingw 1.1 or any of the older versions [3,2.95] +GCC_VERSION ?= 3 + +# Windows resource compiler to use, possibly including extra options. +# For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. +WINDRES ?= windres --use-temp-file + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.vc b/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.vc new file mode 100644 index 0000000000..c254e8e0d4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.vc @@ -0,0 +1,156 @@ +# ========================================================================= +# This configuration file was generated by +# Bakefile 0.2.9 (http://www.bakefile.org) +# Beware that all changes made to this file will be overwritten next +# time you run Bakefile! +# ========================================================================= + + +# ------------------------------------------------------------------------- +# These are configurable options: +# ------------------------------------------------------------------------- + +# C compiler +CC = cl + +# C++ compiler +CXX = cl + +# Standard flags for CC +CFLAGS = + +# Standard flags for C++ +CXXFLAGS = + +# Standard preprocessor flags (common for CC and CXX) +CPPFLAGS = + +# Standard linker flags +LDFLAGS = + +# The C preprocessor +CPP = $(CC) /EP /nologo + +# What type of library to build? [0,1] +SHARED = 0 + +# GTK+ toolkit version [,2] +TOOLKIT_VERSION = + +# Build wxUniversal instead of native port? [0,1] +WXUNIV = 0 + +# Compile Unicode build of wxWidgets? [0,1] +UNICODE = 1 + +# Use MSLU library when building Unicode version. [0,1] +MSLU = 0 + +# Type of compiled binaries [debug,release] +BUILD = debug + +# The target processor architecture must be specified when it is not X86. +# This does not affect the compiler output, so you still need to make sure +# your environment is set up appropriately with the correct compiler in the +# PATH. Rather it affects some options passed to some of the common build +# utilities such as the resource compiler and the linker. +# +# Accepted values: IA64, X64 +# (AMD64 accepted as synonym for X64 but should not be used any more). +TARGET_CPU = $(CPU) + +# Should debugging info be included in the executables? The default value +# "default" means that debug info will be included if BUILD=debug +# and not included if BUILD=release. [0,1,default] +DEBUG_INFO = 1 + +# Value of wxDEBUG_LEVEL. The default value is the same as 1 and means that all +# but expensive assert checks are enabled, use 0 to completely remove debugging +# code. [0,1,default] +DEBUG_FLAG = 1 + +# Link against debug (e.g. msvcrtd.dll) or release (msvcrt.dll) RTL? +# Default is to use debug CRT if and only if BUILD==debug. [0,1,default] +DEBUG_RUNTIME_LIBS = default + +# Multiple libraries or single huge monolithic one? [0,1] +MONOLITHIC = 0 + +# Build GUI libraries? [0,1] +USE_GUI = 1 + +# Build wxHTML library (USE_GUI must be 1)? [0,1] +USE_HTML = 1 + +# Build wxWebView library (USE_GUI must be 1)? [0,1] +USE_WEBVIEW = 1 + +# Build multimedia library (USE_GUI must be 1)? [0,1] +USE_MEDIA = 1 + +# Build wxXRC library (USE_GUI must be 1)? [0,1] +USE_XRC = 1 + +# Build wxAUI library (USE_GUI must be 1)? [0,1] +USE_AUI = 1 + +# Build wxRibbon library (USE_GUI must be 1)? [0,1] +USE_RIBBON = 1 + +# Build wxPropertyGrid library (USE_GUI must be 1)? [0,1] +USE_PROPGRID = 1 + +# Build wxRichTextCtrl library (USE_GUI must be 1)? [0,1] +USE_RICHTEXT = 1 + +# Build wxStyledTextCtrl library (USE_GUI must be 1)? [0,1] +USE_STC = 1 + +# Build OpenGL canvas library (USE_GUI must be 1)? [0,1] +USE_OPENGL = 1 + +# Build quality assurance classes library (USE_GUI must be 1)? [0,1] +USE_QA = 1 + +# Enable exceptions in compiled code. [0,1] +USE_EXCEPTIONS = 1 + +# Enable run-time type information (RTTI) in compiled code. [0,1] +USE_RTTI = 1 + +# Enable threading in compiled code. [0,1] +USE_THREADS = 1 + +# Enable wxCairoContext for platforms other than Linux/GTK. [0,1] +USE_CAIRO = 0 + +# Is this official build by wxWidgets developers? [0,1] +OFFICIAL_BUILD = 0 + +# Use this to name your customized DLLs differently +VENDOR = custom + +# +WX_FLAVOUR = + +# +WX_LIB_FLAVOUR = + +# Name of your custom configuration. This affects directory +# where object files are stored as well as the location of +# compiled .lib files and setup.h under the lib/ toplevel directory. +CFG = + +# Compiler flags needed to compile test suite in tests directory. If you want +# to run the tests, set it so that the compiler can find CppUnit headers. +CPPUNIT_CFLAGS = + +# Linker flags needed to link test suite in tests directory. If you want +# to run the tests, include CppUnit library here. +CPPUNIT_LIBS = + +# Version of C runtime library to use. You can change this to +# static if SHARED=0, but it is highly recommended to not do +# it if SHARED=1 unless you know what you are doing. [dynamic,static] +RUNTIME_LIBS = dynamic + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.wat b/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.wat new file mode 100644 index 0000000000..95493b4a85 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/config.wat @@ -0,0 +1,146 @@ +# ========================================================================= +# This configuration file was generated by +# Bakefile 0.2.9 (http://www.bakefile.org) +# Beware that all changes made to this file will be overwritten next +# time you run Bakefile! +# ========================================================================= + + +# ------------------------------------------------------------------------- +# These are configurable options: +# ------------------------------------------------------------------------- + +# C compiler +CC = wcc386 + +# C++ compiler +CXX = wpp386 + +# Standard flags for CC +CFLAGS = + +# Standard flags for C++ +CXXFLAGS = + +# Standard preprocessor flags (common for CC and CXX) +CPPFLAGS = + +# Standard linker flags +LDFLAGS = + +# The C preprocessor +CPP = $(CC) -p + +# What type of library to build? [0,1] +# 1 - DLL +SHARED = 0 + +# GTK+ toolkit version [,2] +TOOLKIT_VERSION = + +# Build wxUniversal instead of native port? [0,1] +# 1 - Universal +WXUNIV = 0 + +# Compile Unicode build of wxWidgets? [0,1] +# 1 - Unicode +UNICODE = 1 + +# Type of compiled binaries [debug,release] +BUILD = debug + +# Should debugging info be included in the executables? The default value +# "default" means that debug info will be included if BUILD=debug +# and not included if BUILD=release. [0,1,default] +DEBUG_INFO = default + +# Value of wxDEBUG_LEVEL. The default value is the same as 1 and means that all +# but expensive assert checks are enabled, use 0 to completely remove debugging +# code. [0,1,default] +DEBUG_FLAG = 1 + +# Multiple libraries or single huge monolithic one? [0,1] +# 0 - Multilib +# 1 - Monolithic +MONOLITHIC = 1 + +# Build GUI libraries? [0,1] +# 0 - Base +# 1 - GUI +USE_GUI = 1 + +# Build wxHTML library (USE_GUI must be 1)? [0,1] +USE_HTML = 1 + +# Build wxWebView library (USE_GUI must be 1)? [0,1] +USE_WEBVIEW = 1 + +# Build multimedia library (USE_GUI must be 1)? [0,1] +USE_MEDIA = 1 + +# Build wxXRC library (USE_GUI must be 1)? [0,1] +USE_XRC = 1 + +# Build wxAUI library (USE_GUI must be 1)? [0,1] +USE_AUI = 1 + +# Build wxRibbon library (USE_GUI must be 1)? [0,1] +USE_RIBBON = 1 + +# Build wxPropertyGrid library (USE_GUI must be 1)? [0,1] +USE_PROPGRID = 1 + +# Build wxRichTextCtrl library (USE_GUI must be 1)? [0,1] +USE_RICHTEXT = 1 + +# Build wxStyledTextCtrl library (USE_GUI must be 1)? [0,1] +USE_STC = 1 + +# Build OpenGL canvas library (USE_GUI must be 1)? [0,1] +USE_OPENGL = 1 + +# Build quality assurance classes library (USE_GUI must be 1)? [0,1] +USE_QA = 0 + +# Enable exceptions in compiled code. [0,1] +USE_EXCEPTIONS = 1 + +# Enable run-time type information (RTTI) in compiled code. [0,1] +USE_RTTI = 1 + +# Enable threading in compiled code. [0,1] +USE_THREADS = 1 + +# Enable wxCairoContext for platforms other than Linux/GTK. [0,1] +USE_CAIRO = 0 + +# Is this official build by wxWidgets developers? [0,1] +OFFICIAL_BUILD = 0 + +# Use this to name your customized DLLs differently +VENDOR = custom + +# +WX_FLAVOUR = + +# +WX_LIB_FLAVOUR = + +# Name of your custom configuration. This affects directory +# where object files are stored as well as the location of +# compiled .lib files and setup.h under the lib/ toplevel directory. +CFG = + +# Compiler flags needed to compile test suite in tests directory. If you want +# to run the tests, set it so that the compiler can find CppUnit headers. +CPPUNIT_CFLAGS = + +# Linker flags needed to link test suite in tests directory. If you want +# to run the tests, include CppUnit library here. +CPPUNIT_LIBS = + +# Version of C runtime library to use. You can change this to +# static if SHARED=0, but it is highly recommended to not do +# it if SHARED=1 unless you know what you are doing. [dynamic,static] +RUNTIME_LIBS = dynamic + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.bcc b/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.bcc new file mode 100644 index 0000000000..7205b12f0d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.bcc @@ -0,0 +1,16139 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.2.9 (http://www.bakefile.org) +# Do not modify, all changes will be overwritten! +# ========================================================================= + +.autodepend + +!ifndef BCCDIR +!ifndef MAKEDIR +!error Your Borland compiler does not define MAKEDIR. Please define the BCCDIR variable, e.g. BCCDIR=d:\bc4 +!endif +BCCDIR = $(MAKEDIR)\.. +!endif + +!include config.bcc + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +### Variables: ### + +MAKEARGS = -DCC="$(CC)" -DCXX="$(CXX)" -DCFLAGS="$(CFLAGS)" \ + -DCXXFLAGS="$(CXXFLAGS)" -DCPPFLAGS="$(CPPFLAGS)" -DLDFLAGS="$(LDFLAGS)" \ + -DCPP="$(CPP)" -DSHARED="$(SHARED)" -DTOOLKIT_VERSION="$(TOOLKIT_VERSION)" \ + -DWXUNIV="$(WXUNIV)" -DUNICODE="$(UNICODE)" -DMSLU="$(MSLU)" \ + -DBUILD="$(BUILD)" -DDEBUG_INFO="$(DEBUG_INFO)" \ + -DDEBUG_FLAG="$(DEBUG_FLAG)" -DMONOLITHIC="$(MONOLITHIC)" \ + -DUSE_GUI="$(USE_GUI)" -DUSE_HTML="$(USE_HTML)" \ + -DUSE_WEBVIEW="$(USE_WEBVIEW)" -DUSE_MEDIA="$(USE_MEDIA)" \ + -DUSE_XRC="$(USE_XRC)" -DUSE_AUI="$(USE_AUI)" -DUSE_RIBBON="$(USE_RIBBON)" \ + -DUSE_PROPGRID="$(USE_PROPGRID)" -DUSE_RICHTEXT="$(USE_RICHTEXT)" \ + -DUSE_STC="$(USE_STC)" -DUSE_OPENGL="$(USE_OPENGL)" -DUSE_QA="$(USE_QA)" \ + -DUSE_EXCEPTIONS="$(USE_EXCEPTIONS)" -DUSE_RTTI="$(USE_RTTI)" \ + -DUSE_THREADS="$(USE_THREADS)" -DUSE_CAIRO="$(USE_CAIRO)" \ + -DOFFICIAL_BUILD="$(OFFICIAL_BUILD)" -DVENDOR="$(VENDOR)" \ + -DWX_FLAVOUR="$(WX_FLAVOUR)" -DWX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" \ + -DCFG="$(CFG)" -DCPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" \ + -DCPPUNIT_LIBS="$(CPPUNIT_LIBS)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)" +WX_RELEASE_NODOT = 30 +COMPILER_PREFIX = bcc +OBJS = \ + $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + ..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG) +SETUPHDIR = \ + $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) +WXREGEX_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -DNDEBUG -I..\..\include -I$(SETUPHDIR) \ + -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__UNICODE_DEFINE_p) -w-8008 -w-8012 \ + -w-8057 -w-8064 -w-8066 -w-8070 $(CPPFLAGS) $(CFLAGS) +WXREGEX_OBJECTS = \ + $(OBJS)\wxregex_regcomp.obj \ + $(OBJS)\wxregex_regexec.obj \ + $(OBJS)\wxregex_regerror.obj \ + $(OBJS)\wxregex_regfree.obj +WXZLIB_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -DNDEBUG -w-8004 -w-8008 -w-8012 -w-8057 \ + -w-8066 $(CPPFLAGS) $(CFLAGS) +WXZLIB_OBJECTS = \ + $(OBJS)\wxzlib_adler32.obj \ + $(OBJS)\wxzlib_compress.obj \ + $(OBJS)\wxzlib_crc32.obj \ + $(OBJS)\wxzlib_deflate.obj \ + $(OBJS)\wxzlib_gzclose.obj \ + $(OBJS)\wxzlib_gzlib.obj \ + $(OBJS)\wxzlib_gzread.obj \ + $(OBJS)\wxzlib_gzwrite.obj \ + $(OBJS)\wxzlib_infback.obj \ + $(OBJS)\wxzlib_inffast.obj \ + $(OBJS)\wxzlib_inflate.obj \ + $(OBJS)\wxzlib_inftrees.obj \ + $(OBJS)\wxzlib_trees.obj \ + $(OBJS)\wxzlib_uncompr.obj \ + $(OBJS)\wxzlib_zutil.obj +WXPNG_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -DNDEBUG -I..\..\src\zlib -w-8004 \ + $(CPPFLAGS) $(CFLAGS) +WXPNG_OBJECTS = \ + $(OBJS)\wxpng_png.obj \ + $(OBJS)\wxpng_pngerror.obj \ + $(OBJS)\wxpng_pngget.obj \ + $(OBJS)\wxpng_pngmem.obj \ + $(OBJS)\wxpng_pngpread.obj \ + $(OBJS)\wxpng_pngread.obj \ + $(OBJS)\wxpng_pngrio.obj \ + $(OBJS)\wxpng_pngrtran.obj \ + $(OBJS)\wxpng_pngrutil.obj \ + $(OBJS)\wxpng_pngset.obj \ + $(OBJS)\wxpng_pngtrans.obj \ + $(OBJS)\wxpng_pngwio.obj \ + $(OBJS)\wxpng_pngwrite.obj \ + $(OBJS)\wxpng_pngwtran.obj \ + $(OBJS)\wxpng_pngwutil.obj +WXJPEG_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -DNDEBUG -I$(SETUPHDIR) -w-8004 -w-8008 \ + -w-8057 -w-8066 $(CPPFLAGS) $(CFLAGS) +WXJPEG_OBJECTS = \ + $(OBJS)\wxjpeg_jcomapi.obj \ + $(OBJS)\wxjpeg_jutils.obj \ + $(OBJS)\wxjpeg_jerror.obj \ + $(OBJS)\wxjpeg_jmemmgr.obj \ + $(OBJS)\wxjpeg_jmemnobs.obj \ + $(OBJS)\wxjpeg_jcapimin.obj \ + $(OBJS)\wxjpeg_jcapistd.obj \ + $(OBJS)\wxjpeg_jctrans.obj \ + $(OBJS)\wxjpeg_jcparam.obj \ + $(OBJS)\wxjpeg_jdatadst.obj \ + $(OBJS)\wxjpeg_jcinit.obj \ + $(OBJS)\wxjpeg_jcmaster.obj \ + $(OBJS)\wxjpeg_jcmarker.obj \ + $(OBJS)\wxjpeg_jcmainct.obj \ + $(OBJS)\wxjpeg_jcprepct.obj \ + $(OBJS)\wxjpeg_jccoefct.obj \ + $(OBJS)\wxjpeg_jccolor.obj \ + $(OBJS)\wxjpeg_jcsample.obj \ + $(OBJS)\wxjpeg_jchuff.obj \ + $(OBJS)\wxjpeg_jcphuff.obj \ + $(OBJS)\wxjpeg_jcdctmgr.obj \ + $(OBJS)\wxjpeg_jfdctfst.obj \ + $(OBJS)\wxjpeg_jfdctflt.obj \ + $(OBJS)\wxjpeg_jfdctint.obj \ + $(OBJS)\wxjpeg_jdapimin.obj \ + $(OBJS)\wxjpeg_jdapistd.obj \ + $(OBJS)\wxjpeg_jdtrans.obj \ + $(OBJS)\wxjpeg_jdatasrc.obj \ + $(OBJS)\wxjpeg_jdmaster.obj \ + $(OBJS)\wxjpeg_jdinput.obj \ + $(OBJS)\wxjpeg_jdmarker.obj \ + $(OBJS)\wxjpeg_jdhuff.obj \ + $(OBJS)\wxjpeg_jdphuff.obj \ + $(OBJS)\wxjpeg_jdmainct.obj \ + $(OBJS)\wxjpeg_jdcoefct.obj \ + $(OBJS)\wxjpeg_jdpostct.obj \ + $(OBJS)\wxjpeg_jddctmgr.obj \ + $(OBJS)\wxjpeg_jidctfst.obj \ + $(OBJS)\wxjpeg_jidctflt.obj \ + $(OBJS)\wxjpeg_jidctint.obj \ + $(OBJS)\wxjpeg_jidctred.obj \ + $(OBJS)\wxjpeg_jdsample.obj \ + $(OBJS)\wxjpeg_jdcolor.obj \ + $(OBJS)\wxjpeg_jquant1.obj \ + $(OBJS)\wxjpeg_jquant2.obj \ + $(OBJS)\wxjpeg_jdmerge.obj +WXTIFF_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -DNDEBUG -I..\..\src\zlib \ + -I..\..\src\jpeg -I..\..\src\tiff\libtiff -w-8004 -w-8012 -w-8057 -w-8060 \ + -w-8066 $(CPPFLAGS) $(CFLAGS) +WXTIFF_OBJECTS = \ + $(OBJS)\wxtiff_tif_win32.obj \ + $(OBJS)\wxtiff_tif_aux.obj \ + $(OBJS)\wxtiff_tif_close.obj \ + $(OBJS)\wxtiff_tif_codec.obj \ + $(OBJS)\wxtiff_tif_color.obj \ + $(OBJS)\wxtiff_tif_compress.obj \ + $(OBJS)\wxtiff_tif_dir.obj \ + $(OBJS)\wxtiff_tif_dirinfo.obj \ + $(OBJS)\wxtiff_tif_dirread.obj \ + $(OBJS)\wxtiff_tif_dirwrite.obj \ + $(OBJS)\wxtiff_tif_dumpmode.obj \ + $(OBJS)\wxtiff_tif_error.obj \ + $(OBJS)\wxtiff_tif_extension.obj \ + $(OBJS)\wxtiff_tif_fax3.obj \ + $(OBJS)\wxtiff_tif_fax3sm.obj \ + $(OBJS)\wxtiff_tif_flush.obj \ + $(OBJS)\wxtiff_tif_getimage.obj \ + $(OBJS)\wxtiff_tif_jbig.obj \ + $(OBJS)\wxtiff_tif_jpeg.obj \ + $(OBJS)\wxtiff_tif_jpeg_12.obj \ + $(OBJS)\wxtiff_tif_luv.obj \ + $(OBJS)\wxtiff_tif_lzma.obj \ + $(OBJS)\wxtiff_tif_lzw.obj \ + $(OBJS)\wxtiff_tif_next.obj \ + $(OBJS)\wxtiff_tif_ojpeg.obj \ + $(OBJS)\wxtiff_tif_open.obj \ + $(OBJS)\wxtiff_tif_packbits.obj \ + $(OBJS)\wxtiff_tif_pixarlog.obj \ + $(OBJS)\wxtiff_tif_predict.obj \ + $(OBJS)\wxtiff_tif_print.obj \ + $(OBJS)\wxtiff_tif_read.obj \ + $(OBJS)\wxtiff_tif_strip.obj \ + $(OBJS)\wxtiff_tif_swab.obj \ + $(OBJS)\wxtiff_tif_thunder.obj \ + $(OBJS)\wxtiff_tif_tile.obj \ + $(OBJS)\wxtiff_tif_version.obj \ + $(OBJS)\wxtiff_tif_warning.obj \ + $(OBJS)\wxtiff_tif_write.obj \ + $(OBJS)\wxtiff_tif_zip.obj +WXEXPAT_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -DNDEBUG -I$(LIBDIRNAME) \ + -DCOMPILED_FROM_DSP -w-8004 -w-8008 -w-8012 -w-8057 -w-8066 $(CPPFLAGS) \ + $(CFLAGS) +WXEXPAT_OBJECTS = \ + $(OBJS)\wxexpat_xmlparse.obj \ + $(OBJS)\wxexpat_xmlrole.obj \ + $(OBJS)\wxexpat_xmltok.obj +WXSCINTILLA_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -DNDEBUG \ + -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib \ + -I..\..\src\stc\scintilla\src -D__WX__ -DSCI_LEXER -DLINK_LEXERS -w-8027 \ + -I$(SETUPHDIR) -I..\..\include $(__wxscintilla_usingdll_p) -D__WXMSW__ \ + $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) $(CPPFLAGS) \ + $(CXXFLAGS) +WXSCINTILLA_OBJECTS = \ + $(OBJS)\wxscintilla_LexA68k.obj \ + $(OBJS)\wxscintilla_LexAbaqus.obj \ + $(OBJS)\wxscintilla_LexAda.obj \ + $(OBJS)\wxscintilla_LexAPDL.obj \ + $(OBJS)\wxscintilla_LexAsm.obj \ + $(OBJS)\wxscintilla_LexAsn1.obj \ + $(OBJS)\wxscintilla_LexASY.obj \ + $(OBJS)\wxscintilla_LexAU3.obj \ + $(OBJS)\wxscintilla_LexAVE.obj \ + $(OBJS)\wxscintilla_LexAVS.obj \ + $(OBJS)\wxscintilla_LexBaan.obj \ + $(OBJS)\wxscintilla_LexBash.obj \ + $(OBJS)\wxscintilla_LexBasic.obj \ + $(OBJS)\wxscintilla_LexBullant.obj \ + $(OBJS)\wxscintilla_LexCaml.obj \ + $(OBJS)\wxscintilla_LexCLW.obj \ + $(OBJS)\wxscintilla_LexCmake.obj \ + $(OBJS)\wxscintilla_LexCOBOL.obj \ + $(OBJS)\wxscintilla_LexCoffeeScript.obj \ + $(OBJS)\wxscintilla_LexConf.obj \ + $(OBJS)\wxscintilla_LexCPP.obj \ + $(OBJS)\wxscintilla_LexCrontab.obj \ + $(OBJS)\wxscintilla_LexCsound.obj \ + $(OBJS)\wxscintilla_LexCSS.obj \ + $(OBJS)\wxscintilla_LexD.obj \ + $(OBJS)\wxscintilla_LexECL.obj \ + $(OBJS)\wxscintilla_LexEiffel.obj \ + $(OBJS)\wxscintilla_LexErlang.obj \ + $(OBJS)\wxscintilla_LexEScript.obj \ + $(OBJS)\wxscintilla_LexFlagship.obj \ + $(OBJS)\wxscintilla_LexForth.obj \ + $(OBJS)\wxscintilla_LexFortran.obj \ + $(OBJS)\wxscintilla_LexGAP.obj \ + $(OBJS)\wxscintilla_LexGui4Cli.obj \ + $(OBJS)\wxscintilla_LexHaskell.obj \ + $(OBJS)\wxscintilla_LexHTML.obj \ + $(OBJS)\wxscintilla_LexInno.obj \ + $(OBJS)\wxscintilla_LexKix.obj \ + $(OBJS)\wxscintilla_LexLisp.obj \ + $(OBJS)\wxscintilla_LexLout.obj \ + $(OBJS)\wxscintilla_LexLua.obj \ + $(OBJS)\wxscintilla_LexMagik.obj \ + $(OBJS)\wxscintilla_LexMarkdown.obj \ + $(OBJS)\wxscintilla_LexMatlab.obj \ + $(OBJS)\wxscintilla_LexMetapost.obj \ + $(OBJS)\wxscintilla_LexMMIXAL.obj \ + $(OBJS)\wxscintilla_LexModula.obj \ + $(OBJS)\wxscintilla_LexMPT.obj \ + $(OBJS)\wxscintilla_LexMSSQL.obj \ + $(OBJS)\wxscintilla_LexMySQL.obj \ + $(OBJS)\wxscintilla_LexNimrod.obj \ + $(OBJS)\wxscintilla_LexNsis.obj \ + $(OBJS)\wxscintilla_LexOpal.obj \ + $(OBJS)\wxscintilla_LexOScript.obj \ + $(OBJS)\wxscintilla_LexOthers.obj \ + $(OBJS)\wxscintilla_LexPascal.obj \ + $(OBJS)\wxscintilla_LexPB.obj \ + $(OBJS)\wxscintilla_LexPerl.obj \ + $(OBJS)\wxscintilla_LexPLM.obj \ + $(OBJS)\wxscintilla_LexPOV.obj \ + $(OBJS)\wxscintilla_LexPowerPro.obj \ + $(OBJS)\wxscintilla_LexPowerShell.obj \ + $(OBJS)\wxscintilla_LexProgress.obj \ + $(OBJS)\wxscintilla_LexPS.obj \ + $(OBJS)\wxscintilla_LexPython.obj \ + $(OBJS)\wxscintilla_LexR.obj \ + $(OBJS)\wxscintilla_LexRebol.obj \ + $(OBJS)\wxscintilla_LexRuby.obj \ + $(OBJS)\wxscintilla_LexScriptol.obj \ + $(OBJS)\wxscintilla_LexSmalltalk.obj \ + $(OBJS)\wxscintilla_LexSML.obj \ + $(OBJS)\wxscintilla_LexSorcus.obj \ + $(OBJS)\wxscintilla_LexSpecman.obj \ + $(OBJS)\wxscintilla_LexSpice.obj \ + $(OBJS)\wxscintilla_LexSQL.obj \ + $(OBJS)\wxscintilla_LexTACL.obj \ + $(OBJS)\wxscintilla_LexTADS3.obj \ + $(OBJS)\wxscintilla_LexTAL.obj \ + $(OBJS)\wxscintilla_LexTCL.obj \ + $(OBJS)\wxscintilla_LexTCMD.obj \ + $(OBJS)\wxscintilla_LexTeX.obj \ + $(OBJS)\wxscintilla_LexTxt2tags.obj \ + $(OBJS)\wxscintilla_LexVB.obj \ + $(OBJS)\wxscintilla_LexVerilog.obj \ + $(OBJS)\wxscintilla_LexVHDL.obj \ + $(OBJS)\wxscintilla_LexVisualProlog.obj \ + $(OBJS)\wxscintilla_LexYAML.obj \ + $(OBJS)\wxscintilla_Accessor.obj \ + $(OBJS)\wxscintilla_CharacterSet.obj \ + $(OBJS)\wxscintilla_LexerBase.obj \ + $(OBJS)\wxscintilla_LexerModule.obj \ + $(OBJS)\wxscintilla_LexerNoExceptions.obj \ + $(OBJS)\wxscintilla_LexerSimple.obj \ + $(OBJS)\wxscintilla_PropSetSimple.obj \ + $(OBJS)\wxscintilla_StyleContext.obj \ + $(OBJS)\wxscintilla_WordList.obj \ + $(OBJS)\wxscintilla_AutoComplete.obj \ + $(OBJS)\wxscintilla_CallTip.obj \ + $(OBJS)\wxscintilla_Catalogue.obj \ + $(OBJS)\wxscintilla_CellBuffer.obj \ + $(OBJS)\wxscintilla_CharClassify.obj \ + $(OBJS)\wxscintilla_ContractionState.obj \ + $(OBJS)\wxscintilla_Decoration.obj \ + $(OBJS)\wxscintilla_Document.obj \ + $(OBJS)\wxscintilla_Editor.obj \ + $(OBJS)\wxscintilla_ExternalLexer.obj \ + $(OBJS)\wxscintilla_Indicator.obj \ + $(OBJS)\wxscintilla_KeyMap.obj \ + $(OBJS)\wxscintilla_LineMarker.obj \ + $(OBJS)\wxscintilla_PerLine.obj \ + $(OBJS)\wxscintilla_PositionCache.obj \ + $(OBJS)\wxscintilla_RESearch.obj \ + $(OBJS)\wxscintilla_RunStyles.obj \ + $(OBJS)\wxscintilla_ScintillaBase.obj \ + $(OBJS)\wxscintilla_Selection.obj \ + $(OBJS)\wxscintilla_Style.obj \ + $(OBJS)\wxscintilla_UniConversion.obj \ + $(OBJS)\wxscintilla_ViewStyle.obj \ + $(OBJS)\wxscintilla_XPM.obj +MONODLL_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -I..\..\src\stc\scintilla\include \ + -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ \ + -DSCI_LEXER -DLINK_LEXERS -w-8027 -DwxUSE_BASE=1 -DWXMAKINGDLL $(CPPFLAGS) \ + $(CFLAGS) +MONODLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -I..\..\src\stc\scintilla\include \ + -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ \ + -DSCI_LEXER -DLINK_LEXERS -w-8027 -DwxUSE_BASE=1 -DWXMAKINGDLL -Hu \ + -H=$(OBJS)\wxprec_monodll.csm $(CPPFLAGS) $(CXXFLAGS) +MONODLL_OBJECTS = \ + $(OBJS)\monodll_dummy.obj \ + $(OBJS)\monodll_any.obj \ + $(OBJS)\monodll_appbase.obj \ + $(OBJS)\monodll_arcall.obj \ + $(OBJS)\monodll_arcfind.obj \ + $(OBJS)\monodll_archive.obj \ + $(OBJS)\monodll_arrstr.obj \ + $(OBJS)\monodll_base64.obj \ + $(OBJS)\monodll_clntdata.obj \ + $(OBJS)\monodll_cmdline.obj \ + $(OBJS)\monodll_config.obj \ + $(OBJS)\monodll_convauto.obj \ + $(OBJS)\monodll_datetime.obj \ + $(OBJS)\monodll_datetimefmt.obj \ + $(OBJS)\monodll_datstrm.obj \ + $(OBJS)\monodll_dircmn.obj \ + $(OBJS)\monodll_dynarray.obj \ + $(OBJS)\monodll_dynlib.obj \ + $(OBJS)\monodll_dynload.obj \ + $(OBJS)\monodll_encconv.obj \ + $(OBJS)\monodll_evtloopcmn.obj \ + $(OBJS)\monodll_extended.obj \ + $(OBJS)\monodll_ffile.obj \ + $(OBJS)\monodll_file.obj \ + $(OBJS)\monodll_fileback.obj \ + $(OBJS)\monodll_fileconf.obj \ + $(OBJS)\monodll_filefn.obj \ + $(OBJS)\monodll_filename.obj \ + $(OBJS)\monodll_filesys.obj \ + $(OBJS)\monodll_filtall.obj \ + $(OBJS)\monodll_filtfind.obj \ + $(OBJS)\monodll_fmapbase.obj \ + $(OBJS)\monodll_fs_arc.obj \ + $(OBJS)\monodll_fs_filter.obj \ + $(OBJS)\monodll_hash.obj \ + $(OBJS)\monodll_hashmap.obj \ + $(OBJS)\monodll_init.obj \ + $(OBJS)\monodll_intl.obj \ + $(OBJS)\monodll_ipcbase.obj \ + $(OBJS)\monodll_languageinfo.obj \ + $(OBJS)\monodll_list.obj \ + $(OBJS)\monodll_log.obj \ + $(OBJS)\monodll_longlong.obj \ + $(OBJS)\monodll_memory.obj \ + $(OBJS)\monodll_mimecmn.obj \ + $(OBJS)\monodll_module.obj \ + $(OBJS)\monodll_mstream.obj \ + $(OBJS)\monodll_numformatter.obj \ + $(OBJS)\monodll_object.obj \ + $(OBJS)\monodll_platinfo.obj \ + $(OBJS)\monodll_powercmn.obj \ + $(OBJS)\monodll_process.obj \ + $(OBJS)\monodll_regex.obj \ + $(OBJS)\monodll_stdpbase.obj \ + $(OBJS)\monodll_sstream.obj \ + $(OBJS)\monodll_stdstream.obj \ + $(OBJS)\monodll_stopwatch.obj \ + $(OBJS)\monodll_strconv.obj \ + $(OBJS)\monodll_stream.obj \ + $(OBJS)\monodll_string.obj \ + $(OBJS)\monodll_stringimpl.obj \ + $(OBJS)\monodll_stringops.obj \ + $(OBJS)\monodll_strvararg.obj \ + $(OBJS)\monodll_sysopt.obj \ + $(OBJS)\monodll_tarstrm.obj \ + $(OBJS)\monodll_textbuf.obj \ + $(OBJS)\monodll_textfile.obj \ + $(OBJS)\monodll_threadinfo.obj \ + $(OBJS)\monodll_time.obj \ + $(OBJS)\monodll_timercmn.obj \ + $(OBJS)\monodll_timerimpl.obj \ + $(OBJS)\monodll_tokenzr.obj \ + $(OBJS)\monodll_translation.obj \ + $(OBJS)\monodll_txtstrm.obj \ + $(OBJS)\monodll_unichar.obj \ + $(OBJS)\monodll_uri.obj \ + $(OBJS)\monodll_ustring.obj \ + $(OBJS)\monodll_variant.obj \ + $(OBJS)\monodll_wfstream.obj \ + $(OBJS)\monodll_wxcrt.obj \ + $(OBJS)\monodll_wxprintf.obj \ + $(OBJS)\monodll_xlocale.obj \ + $(OBJS)\monodll_xti.obj \ + $(OBJS)\monodll_xtistrm.obj \ + $(OBJS)\monodll_zipstrm.obj \ + $(OBJS)\monodll_zstream.obj \ + $(OBJS)\monodll_fswatchercmn.obj \ + $(OBJS)\monodll_fswatcherg.obj \ + $(OBJS)\monodll_basemsw.obj \ + $(OBJS)\monodll_crashrpt.obj \ + $(OBJS)\monodll_debughlp.obj \ + $(OBJS)\monodll_dde.obj \ + $(OBJS)\monodll_dir.obj \ + $(OBJS)\monodll_dlmsw.obj \ + $(OBJS)\monodll_evtloopconsole.obj \ + $(OBJS)\monodll_mimetype.obj \ + $(OBJS)\monodll_power.obj \ + $(OBJS)\monodll_regconf.obj \ + $(OBJS)\monodll_registry.obj \ + $(OBJS)\monodll_snglinst.obj \ + $(OBJS)\monodll_stackwalk.obj \ + $(OBJS)\monodll_stdpaths.obj \ + $(OBJS)\monodll_thread.obj \ + $(OBJS)\monodll_timer.obj \ + $(OBJS)\monodll_utils.obj \ + $(OBJS)\monodll_utilsexc.obj \ + $(OBJS)\monodll_fswatcher.obj \ + $(OBJS)\monodll_event.obj \ + $(OBJS)\monodll_fs_mem.obj \ + $(OBJS)\monodll_msgout.obj \ + $(OBJS)\monodll_utilscmn.obj \ + $(OBJS)\monodll_main.obj \ + $(OBJS)\monodll_mslu.obj \ + $(OBJS)\monodll_volume.obj \ + $(OBJS)\monodll_fs_inet.obj \ + $(OBJS)\monodll_ftp.obj \ + $(OBJS)\monodll_http.obj \ + $(OBJS)\monodll_protocol.obj \ + $(OBJS)\monodll_sckaddr.obj \ + $(OBJS)\monodll_sckfile.obj \ + $(OBJS)\monodll_sckipc.obj \ + $(OBJS)\monodll_sckstrm.obj \ + $(OBJS)\monodll_socket.obj \ + $(OBJS)\monodll_url.obj \ + $(OBJS)\monodll_sockmsw.obj \ + $(OBJS)\monodll_urlmsw.obj \ + $(____MONOLIB_GUI_SRC_FILENAMES_OBJECTS) \ + $(OBJS)\monodll_xml.obj \ + $(OBJS)\monodll_xtixml.obj +MONOLIB_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -I..\..\src\stc\scintilla\include \ + -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ \ + -DSCI_LEXER -DLINK_LEXERS -w-8027 -DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +MONOLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -I..\..\src\stc\scintilla\include \ + -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ \ + -DSCI_LEXER -DLINK_LEXERS -w-8027 -DwxUSE_BASE=1 -Hu \ + -H=$(OBJS)\wxprec_monolib.csm $(CPPFLAGS) $(CXXFLAGS) +MONOLIB_OBJECTS = \ + $(OBJS)\monolib_dummy.obj \ + $(OBJS)\monolib_any.obj \ + $(OBJS)\monolib_appbase.obj \ + $(OBJS)\monolib_arcall.obj \ + $(OBJS)\monolib_arcfind.obj \ + $(OBJS)\monolib_archive.obj \ + $(OBJS)\monolib_arrstr.obj \ + $(OBJS)\monolib_base64.obj \ + $(OBJS)\monolib_clntdata.obj \ + $(OBJS)\monolib_cmdline.obj \ + $(OBJS)\monolib_config.obj \ + $(OBJS)\monolib_convauto.obj \ + $(OBJS)\monolib_datetime.obj \ + $(OBJS)\monolib_datetimefmt.obj \ + $(OBJS)\monolib_datstrm.obj \ + $(OBJS)\monolib_dircmn.obj \ + $(OBJS)\monolib_dynarray.obj \ + $(OBJS)\monolib_dynlib.obj \ + $(OBJS)\monolib_dynload.obj \ + $(OBJS)\monolib_encconv.obj \ + $(OBJS)\monolib_evtloopcmn.obj \ + $(OBJS)\monolib_extended.obj \ + $(OBJS)\monolib_ffile.obj \ + $(OBJS)\monolib_file.obj \ + $(OBJS)\monolib_fileback.obj \ + $(OBJS)\monolib_fileconf.obj \ + $(OBJS)\monolib_filefn.obj \ + $(OBJS)\monolib_filename.obj \ + $(OBJS)\monolib_filesys.obj \ + $(OBJS)\monolib_filtall.obj \ + $(OBJS)\monolib_filtfind.obj \ + $(OBJS)\monolib_fmapbase.obj \ + $(OBJS)\monolib_fs_arc.obj \ + $(OBJS)\monolib_fs_filter.obj \ + $(OBJS)\monolib_hash.obj \ + $(OBJS)\monolib_hashmap.obj \ + $(OBJS)\monolib_init.obj \ + $(OBJS)\monolib_intl.obj \ + $(OBJS)\monolib_ipcbase.obj \ + $(OBJS)\monolib_languageinfo.obj \ + $(OBJS)\monolib_list.obj \ + $(OBJS)\monolib_log.obj \ + $(OBJS)\monolib_longlong.obj \ + $(OBJS)\monolib_memory.obj \ + $(OBJS)\monolib_mimecmn.obj \ + $(OBJS)\monolib_module.obj \ + $(OBJS)\monolib_mstream.obj \ + $(OBJS)\monolib_numformatter.obj \ + $(OBJS)\monolib_object.obj \ + $(OBJS)\monolib_platinfo.obj \ + $(OBJS)\monolib_powercmn.obj \ + $(OBJS)\monolib_process.obj \ + $(OBJS)\monolib_regex.obj \ + $(OBJS)\monolib_stdpbase.obj \ + $(OBJS)\monolib_sstream.obj \ + $(OBJS)\monolib_stdstream.obj \ + $(OBJS)\monolib_stopwatch.obj \ + $(OBJS)\monolib_strconv.obj \ + $(OBJS)\monolib_stream.obj \ + $(OBJS)\monolib_string.obj \ + $(OBJS)\monolib_stringimpl.obj \ + $(OBJS)\monolib_stringops.obj \ + $(OBJS)\monolib_strvararg.obj \ + $(OBJS)\monolib_sysopt.obj \ + $(OBJS)\monolib_tarstrm.obj \ + $(OBJS)\monolib_textbuf.obj \ + $(OBJS)\monolib_textfile.obj \ + $(OBJS)\monolib_threadinfo.obj \ + $(OBJS)\monolib_time.obj \ + $(OBJS)\monolib_timercmn.obj \ + $(OBJS)\monolib_timerimpl.obj \ + $(OBJS)\monolib_tokenzr.obj \ + $(OBJS)\monolib_translation.obj \ + $(OBJS)\monolib_txtstrm.obj \ + $(OBJS)\monolib_unichar.obj \ + $(OBJS)\monolib_uri.obj \ + $(OBJS)\monolib_ustring.obj \ + $(OBJS)\monolib_variant.obj \ + $(OBJS)\monolib_wfstream.obj \ + $(OBJS)\monolib_wxcrt.obj \ + $(OBJS)\monolib_wxprintf.obj \ + $(OBJS)\monolib_xlocale.obj \ + $(OBJS)\monolib_xti.obj \ + $(OBJS)\monolib_xtistrm.obj \ + $(OBJS)\monolib_zipstrm.obj \ + $(OBJS)\monolib_zstream.obj \ + $(OBJS)\monolib_fswatchercmn.obj \ + $(OBJS)\monolib_fswatcherg.obj \ + $(OBJS)\monolib_basemsw.obj \ + $(OBJS)\monolib_crashrpt.obj \ + $(OBJS)\monolib_debughlp.obj \ + $(OBJS)\monolib_dde.obj \ + $(OBJS)\monolib_dir.obj \ + $(OBJS)\monolib_dlmsw.obj \ + $(OBJS)\monolib_evtloopconsole.obj \ + $(OBJS)\monolib_mimetype.obj \ + $(OBJS)\monolib_power.obj \ + $(OBJS)\monolib_regconf.obj \ + $(OBJS)\monolib_registry.obj \ + $(OBJS)\monolib_snglinst.obj \ + $(OBJS)\monolib_stackwalk.obj \ + $(OBJS)\monolib_stdpaths.obj \ + $(OBJS)\monolib_thread.obj \ + $(OBJS)\monolib_timer.obj \ + $(OBJS)\monolib_utils.obj \ + $(OBJS)\monolib_utilsexc.obj \ + $(OBJS)\monolib_fswatcher.obj \ + $(OBJS)\monolib_event.obj \ + $(OBJS)\monolib_fs_mem.obj \ + $(OBJS)\monolib_msgout.obj \ + $(OBJS)\monolib_utilscmn.obj \ + $(OBJS)\monolib_main.obj \ + $(OBJS)\monolib_mslu.obj \ + $(OBJS)\monolib_volume.obj \ + $(OBJS)\monolib_fs_inet.obj \ + $(OBJS)\monolib_ftp.obj \ + $(OBJS)\monolib_http.obj \ + $(OBJS)\monolib_protocol.obj \ + $(OBJS)\monolib_sckaddr.obj \ + $(OBJS)\monolib_sckfile.obj \ + $(OBJS)\monolib_sckipc.obj \ + $(OBJS)\monolib_sckstrm.obj \ + $(OBJS)\monolib_socket.obj \ + $(OBJS)\monolib_url.obj \ + $(OBJS)\monolib_sockmsw.obj \ + $(OBJS)\monolib_urlmsw.obj \ + $(____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS) \ + $(OBJS)\monolib_xml.obj \ + $(OBJS)\monolib_xtixml.obj +BASEDLL_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 \ + $(CPPFLAGS) $(CFLAGS) +BASEDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 -Hu \ + -H=$(OBJS)\wxprec_basedll.csm $(CPPFLAGS) $(CXXFLAGS) +BASEDLL_OBJECTS = \ + $(OBJS)\basedll_dummy.obj \ + $(OBJS)\basedll_any.obj \ + $(OBJS)\basedll_appbase.obj \ + $(OBJS)\basedll_arcall.obj \ + $(OBJS)\basedll_arcfind.obj \ + $(OBJS)\basedll_archive.obj \ + $(OBJS)\basedll_arrstr.obj \ + $(OBJS)\basedll_base64.obj \ + $(OBJS)\basedll_clntdata.obj \ + $(OBJS)\basedll_cmdline.obj \ + $(OBJS)\basedll_config.obj \ + $(OBJS)\basedll_convauto.obj \ + $(OBJS)\basedll_datetime.obj \ + $(OBJS)\basedll_datetimefmt.obj \ + $(OBJS)\basedll_datstrm.obj \ + $(OBJS)\basedll_dircmn.obj \ + $(OBJS)\basedll_dynarray.obj \ + $(OBJS)\basedll_dynlib.obj \ + $(OBJS)\basedll_dynload.obj \ + $(OBJS)\basedll_encconv.obj \ + $(OBJS)\basedll_evtloopcmn.obj \ + $(OBJS)\basedll_extended.obj \ + $(OBJS)\basedll_ffile.obj \ + $(OBJS)\basedll_file.obj \ + $(OBJS)\basedll_fileback.obj \ + $(OBJS)\basedll_fileconf.obj \ + $(OBJS)\basedll_filefn.obj \ + $(OBJS)\basedll_filename.obj \ + $(OBJS)\basedll_filesys.obj \ + $(OBJS)\basedll_filtall.obj \ + $(OBJS)\basedll_filtfind.obj \ + $(OBJS)\basedll_fmapbase.obj \ + $(OBJS)\basedll_fs_arc.obj \ + $(OBJS)\basedll_fs_filter.obj \ + $(OBJS)\basedll_hash.obj \ + $(OBJS)\basedll_hashmap.obj \ + $(OBJS)\basedll_init.obj \ + $(OBJS)\basedll_intl.obj \ + $(OBJS)\basedll_ipcbase.obj \ + $(OBJS)\basedll_languageinfo.obj \ + $(OBJS)\basedll_list.obj \ + $(OBJS)\basedll_log.obj \ + $(OBJS)\basedll_longlong.obj \ + $(OBJS)\basedll_memory.obj \ + $(OBJS)\basedll_mimecmn.obj \ + $(OBJS)\basedll_module.obj \ + $(OBJS)\basedll_mstream.obj \ + $(OBJS)\basedll_numformatter.obj \ + $(OBJS)\basedll_object.obj \ + $(OBJS)\basedll_platinfo.obj \ + $(OBJS)\basedll_powercmn.obj \ + $(OBJS)\basedll_process.obj \ + $(OBJS)\basedll_regex.obj \ + $(OBJS)\basedll_stdpbase.obj \ + $(OBJS)\basedll_sstream.obj \ + $(OBJS)\basedll_stdstream.obj \ + $(OBJS)\basedll_stopwatch.obj \ + $(OBJS)\basedll_strconv.obj \ + $(OBJS)\basedll_stream.obj \ + $(OBJS)\basedll_string.obj \ + $(OBJS)\basedll_stringimpl.obj \ + $(OBJS)\basedll_stringops.obj \ + $(OBJS)\basedll_strvararg.obj \ + $(OBJS)\basedll_sysopt.obj \ + $(OBJS)\basedll_tarstrm.obj \ + $(OBJS)\basedll_textbuf.obj \ + $(OBJS)\basedll_textfile.obj \ + $(OBJS)\basedll_threadinfo.obj \ + $(OBJS)\basedll_time.obj \ + $(OBJS)\basedll_timercmn.obj \ + $(OBJS)\basedll_timerimpl.obj \ + $(OBJS)\basedll_tokenzr.obj \ + $(OBJS)\basedll_translation.obj \ + $(OBJS)\basedll_txtstrm.obj \ + $(OBJS)\basedll_unichar.obj \ + $(OBJS)\basedll_uri.obj \ + $(OBJS)\basedll_ustring.obj \ + $(OBJS)\basedll_variant.obj \ + $(OBJS)\basedll_wfstream.obj \ + $(OBJS)\basedll_wxcrt.obj \ + $(OBJS)\basedll_wxprintf.obj \ + $(OBJS)\basedll_xlocale.obj \ + $(OBJS)\basedll_xti.obj \ + $(OBJS)\basedll_xtistrm.obj \ + $(OBJS)\basedll_zipstrm.obj \ + $(OBJS)\basedll_zstream.obj \ + $(OBJS)\basedll_fswatchercmn.obj \ + $(OBJS)\basedll_fswatcherg.obj \ + $(OBJS)\basedll_basemsw.obj \ + $(OBJS)\basedll_crashrpt.obj \ + $(OBJS)\basedll_debughlp.obj \ + $(OBJS)\basedll_dde.obj \ + $(OBJS)\basedll_dir.obj \ + $(OBJS)\basedll_dlmsw.obj \ + $(OBJS)\basedll_evtloopconsole.obj \ + $(OBJS)\basedll_mimetype.obj \ + $(OBJS)\basedll_power.obj \ + $(OBJS)\basedll_regconf.obj \ + $(OBJS)\basedll_registry.obj \ + $(OBJS)\basedll_snglinst.obj \ + $(OBJS)\basedll_stackwalk.obj \ + $(OBJS)\basedll_stdpaths.obj \ + $(OBJS)\basedll_thread.obj \ + $(OBJS)\basedll_timer.obj \ + $(OBJS)\basedll_utils.obj \ + $(OBJS)\basedll_utilsexc.obj \ + $(OBJS)\basedll_fswatcher.obj \ + $(OBJS)\basedll_event.obj \ + $(OBJS)\basedll_fs_mem.obj \ + $(OBJS)\basedll_msgout.obj \ + $(OBJS)\basedll_utilscmn.obj \ + $(OBJS)\basedll_main.obj \ + $(OBJS)\basedll_mslu.obj \ + $(OBJS)\basedll_volume.obj +BASELIB_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DwxUSE_GUI=0 -DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +BASELIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DwxUSE_GUI=0 -DwxUSE_BASE=1 -Hu \ + -H=$(OBJS)\wxprec_baselib.csm $(CPPFLAGS) $(CXXFLAGS) +BASELIB_OBJECTS = \ + $(OBJS)\baselib_dummy.obj \ + $(OBJS)\baselib_any.obj \ + $(OBJS)\baselib_appbase.obj \ + $(OBJS)\baselib_arcall.obj \ + $(OBJS)\baselib_arcfind.obj \ + $(OBJS)\baselib_archive.obj \ + $(OBJS)\baselib_arrstr.obj \ + $(OBJS)\baselib_base64.obj \ + $(OBJS)\baselib_clntdata.obj \ + $(OBJS)\baselib_cmdline.obj \ + $(OBJS)\baselib_config.obj \ + $(OBJS)\baselib_convauto.obj \ + $(OBJS)\baselib_datetime.obj \ + $(OBJS)\baselib_datetimefmt.obj \ + $(OBJS)\baselib_datstrm.obj \ + $(OBJS)\baselib_dircmn.obj \ + $(OBJS)\baselib_dynarray.obj \ + $(OBJS)\baselib_dynlib.obj \ + $(OBJS)\baselib_dynload.obj \ + $(OBJS)\baselib_encconv.obj \ + $(OBJS)\baselib_evtloopcmn.obj \ + $(OBJS)\baselib_extended.obj \ + $(OBJS)\baselib_ffile.obj \ + $(OBJS)\baselib_file.obj \ + $(OBJS)\baselib_fileback.obj \ + $(OBJS)\baselib_fileconf.obj \ + $(OBJS)\baselib_filefn.obj \ + $(OBJS)\baselib_filename.obj \ + $(OBJS)\baselib_filesys.obj \ + $(OBJS)\baselib_filtall.obj \ + $(OBJS)\baselib_filtfind.obj \ + $(OBJS)\baselib_fmapbase.obj \ + $(OBJS)\baselib_fs_arc.obj \ + $(OBJS)\baselib_fs_filter.obj \ + $(OBJS)\baselib_hash.obj \ + $(OBJS)\baselib_hashmap.obj \ + $(OBJS)\baselib_init.obj \ + $(OBJS)\baselib_intl.obj \ + $(OBJS)\baselib_ipcbase.obj \ + $(OBJS)\baselib_languageinfo.obj \ + $(OBJS)\baselib_list.obj \ + $(OBJS)\baselib_log.obj \ + $(OBJS)\baselib_longlong.obj \ + $(OBJS)\baselib_memory.obj \ + $(OBJS)\baselib_mimecmn.obj \ + $(OBJS)\baselib_module.obj \ + $(OBJS)\baselib_mstream.obj \ + $(OBJS)\baselib_numformatter.obj \ + $(OBJS)\baselib_object.obj \ + $(OBJS)\baselib_platinfo.obj \ + $(OBJS)\baselib_powercmn.obj \ + $(OBJS)\baselib_process.obj \ + $(OBJS)\baselib_regex.obj \ + $(OBJS)\baselib_stdpbase.obj \ + $(OBJS)\baselib_sstream.obj \ + $(OBJS)\baselib_stdstream.obj \ + $(OBJS)\baselib_stopwatch.obj \ + $(OBJS)\baselib_strconv.obj \ + $(OBJS)\baselib_stream.obj \ + $(OBJS)\baselib_string.obj \ + $(OBJS)\baselib_stringimpl.obj \ + $(OBJS)\baselib_stringops.obj \ + $(OBJS)\baselib_strvararg.obj \ + $(OBJS)\baselib_sysopt.obj \ + $(OBJS)\baselib_tarstrm.obj \ + $(OBJS)\baselib_textbuf.obj \ + $(OBJS)\baselib_textfile.obj \ + $(OBJS)\baselib_threadinfo.obj \ + $(OBJS)\baselib_time.obj \ + $(OBJS)\baselib_timercmn.obj \ + $(OBJS)\baselib_timerimpl.obj \ + $(OBJS)\baselib_tokenzr.obj \ + $(OBJS)\baselib_translation.obj \ + $(OBJS)\baselib_txtstrm.obj \ + $(OBJS)\baselib_unichar.obj \ + $(OBJS)\baselib_uri.obj \ + $(OBJS)\baselib_ustring.obj \ + $(OBJS)\baselib_variant.obj \ + $(OBJS)\baselib_wfstream.obj \ + $(OBJS)\baselib_wxcrt.obj \ + $(OBJS)\baselib_wxprintf.obj \ + $(OBJS)\baselib_xlocale.obj \ + $(OBJS)\baselib_xti.obj \ + $(OBJS)\baselib_xtistrm.obj \ + $(OBJS)\baselib_zipstrm.obj \ + $(OBJS)\baselib_zstream.obj \ + $(OBJS)\baselib_fswatchercmn.obj \ + $(OBJS)\baselib_fswatcherg.obj \ + $(OBJS)\baselib_basemsw.obj \ + $(OBJS)\baselib_crashrpt.obj \ + $(OBJS)\baselib_debughlp.obj \ + $(OBJS)\baselib_dde.obj \ + $(OBJS)\baselib_dir.obj \ + $(OBJS)\baselib_dlmsw.obj \ + $(OBJS)\baselib_evtloopconsole.obj \ + $(OBJS)\baselib_mimetype.obj \ + $(OBJS)\baselib_power.obj \ + $(OBJS)\baselib_regconf.obj \ + $(OBJS)\baselib_registry.obj \ + $(OBJS)\baselib_snglinst.obj \ + $(OBJS)\baselib_stackwalk.obj \ + $(OBJS)\baselib_stdpaths.obj \ + $(OBJS)\baselib_thread.obj \ + $(OBJS)\baselib_timer.obj \ + $(OBJS)\baselib_utils.obj \ + $(OBJS)\baselib_utilsexc.obj \ + $(OBJS)\baselib_fswatcher.obj \ + $(OBJS)\baselib_event.obj \ + $(OBJS)\baselib_fs_mem.obj \ + $(OBJS)\baselib_msgout.obj \ + $(OBJS)\baselib_utilscmn.obj \ + $(OBJS)\baselib_main.obj \ + $(OBJS)\baselib_mslu.obj \ + $(OBJS)\baselib_volume.obj +NETDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DwxUSE_GUI=0 -DWXUSINGDLL -DWXMAKINGDLL_NET -Hu \ + -H=$(OBJS)\wxprec_netdll.csm $(CPPFLAGS) $(CXXFLAGS) +NETDLL_OBJECTS = \ + $(OBJS)\netdll_dummy.obj \ + $(OBJS)\netdll_fs_inet.obj \ + $(OBJS)\netdll_ftp.obj \ + $(OBJS)\netdll_http.obj \ + $(OBJS)\netdll_protocol.obj \ + $(OBJS)\netdll_sckaddr.obj \ + $(OBJS)\netdll_sckfile.obj \ + $(OBJS)\netdll_sckipc.obj \ + $(OBJS)\netdll_sckstrm.obj \ + $(OBJS)\netdll_socket.obj \ + $(OBJS)\netdll_url.obj \ + $(OBJS)\netdll_sockmsw.obj \ + $(OBJS)\netdll_urlmsw.obj +NETLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DwxUSE_GUI=0 -Hu -H=$(OBJS)\wxprec_netlib.csm \ + $(CPPFLAGS) $(CXXFLAGS) +NETLIB_OBJECTS = \ + $(OBJS)\netlib_dummy.obj \ + $(OBJS)\netlib_fs_inet.obj \ + $(OBJS)\netlib_ftp.obj \ + $(OBJS)\netlib_http.obj \ + $(OBJS)\netlib_protocol.obj \ + $(OBJS)\netlib_sckaddr.obj \ + $(OBJS)\netlib_sckfile.obj \ + $(OBJS)\netlib_sckipc.obj \ + $(OBJS)\netlib_sckstrm.obj \ + $(OBJS)\netlib_socket.obj \ + $(OBJS)\netlib_url.obj \ + $(OBJS)\netlib_sockmsw.obj \ + $(OBJS)\netlib_urlmsw.obj +COREDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_CORE -DwxUSE_BASE=0 -Hu \ + -H=$(OBJS)\wxprec_coredll.csm $(CPPFLAGS) $(CXXFLAGS) +COREDLL_OBJECTS = \ + $(OBJS)\coredll_dummy.obj \ + $(OBJS)\coredll_event.obj \ + $(OBJS)\coredll_fs_mem.obj \ + $(OBJS)\coredll_msgout.obj \ + $(OBJS)\coredll_utilscmn.obj \ + $(OBJS)\coredll_main.obj \ + $(OBJS)\coredll_mslu.obj \ + $(OBJS)\coredll_volume.obj \ + $(____CORE_SRC_FILENAMES_2_OBJECTS) +CORELIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DwxUSE_BASE=0 -Hu -H=$(OBJS)\wxprec_corelib.csm \ + $(CPPFLAGS) $(CXXFLAGS) +CORELIB_OBJECTS = \ + $(OBJS)\corelib_dummy.obj \ + $(OBJS)\corelib_event.obj \ + $(OBJS)\corelib_fs_mem.obj \ + $(OBJS)\corelib_msgout.obj \ + $(OBJS)\corelib_utilscmn.obj \ + $(OBJS)\corelib_main.obj \ + $(OBJS)\corelib_mslu.obj \ + $(OBJS)\corelib_volume.obj \ + $(____CORE_SRC_FILENAMES_3_OBJECTS) +ADVDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_ADV -Hu \ + -H=$(OBJS)\wxprec_advdll.csm $(CPPFLAGS) $(CXXFLAGS) +ADVDLL_OBJECTS = \ + $(OBJS)\advdll_dummy.obj \ + $(____ADVANCED_SRC_FILENAMES_2_OBJECTS) +ADVLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_advlib.csm $(CPPFLAGS) \ + $(CXXFLAGS) +ADVLIB_OBJECTS = \ + $(OBJS)\advlib_dummy.obj \ + $(____ADVANCED_SRC_FILENAMES_3_OBJECTS) +MEDIADLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_MEDIA -Hu \ + -H=$(OBJS)\wxprec_mediadll.csm $(CPPFLAGS) $(CXXFLAGS) +MEDIADLL_OBJECTS = \ + $(OBJS)\mediadll_dummy.obj \ + $(OBJS)\mediadll_mediactrlcmn.obj \ + $(OBJS)\mediadll_mediactrl_am.obj \ + $(OBJS)\mediadll_mediactrl_wmp10.obj \ + $(OBJS)\mediadll_mediactrl_qt.obj +MEDIALIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_medialib.csm $(CPPFLAGS) \ + $(CXXFLAGS) +MEDIALIB_OBJECTS = \ + $(OBJS)\medialib_dummy.obj \ + $(OBJS)\medialib_mediactrlcmn.obj \ + $(OBJS)\medialib_mediactrl_am.obj \ + $(OBJS)\medialib_mediactrl_wmp10.obj \ + $(OBJS)\medialib_mediactrl_qt.obj +HTMLDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_HTML -Hu \ + -H=$(OBJS)\wxprec_htmldll.csm $(CPPFLAGS) $(CXXFLAGS) +HTMLDLL_OBJECTS = \ + $(OBJS)\htmldll_dummy.obj \ + $(OBJS)\htmldll_helpbest.obj \ + $(OBJS)\htmldll_helpctrl.obj \ + $(OBJS)\htmldll_helpdata.obj \ + $(OBJS)\htmldll_helpdlg.obj \ + $(OBJS)\htmldll_helpfrm.obj \ + $(OBJS)\htmldll_helpwnd.obj \ + $(OBJS)\htmldll_htmlcell.obj \ + $(OBJS)\htmldll_htmlfilt.obj \ + $(OBJS)\htmldll_htmlpars.obj \ + $(OBJS)\htmldll_htmltag.obj \ + $(OBJS)\htmldll_htmlwin.obj \ + $(OBJS)\htmldll_htmprint.obj \ + $(OBJS)\htmldll_m_dflist.obj \ + $(OBJS)\htmldll_m_fonts.obj \ + $(OBJS)\htmldll_m_hline.obj \ + $(OBJS)\htmldll_m_image.obj \ + $(OBJS)\htmldll_m_layout.obj \ + $(OBJS)\htmldll_m_links.obj \ + $(OBJS)\htmldll_m_list.obj \ + $(OBJS)\htmldll_m_pre.obj \ + $(OBJS)\htmldll_m_span.obj \ + $(OBJS)\htmldll_m_style.obj \ + $(OBJS)\htmldll_m_tables.obj \ + $(OBJS)\htmldll_styleparams.obj \ + $(OBJS)\htmldll_winpars.obj \ + $(OBJS)\htmldll_htmllbox.obj +HTMLLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_htmllib.csm $(CPPFLAGS) \ + $(CXXFLAGS) +HTMLLIB_OBJECTS = \ + $(OBJS)\htmllib_dummy.obj \ + $(OBJS)\htmllib_helpbest.obj \ + $(OBJS)\htmllib_helpctrl.obj \ + $(OBJS)\htmllib_helpdata.obj \ + $(OBJS)\htmllib_helpdlg.obj \ + $(OBJS)\htmllib_helpfrm.obj \ + $(OBJS)\htmllib_helpwnd.obj \ + $(OBJS)\htmllib_htmlcell.obj \ + $(OBJS)\htmllib_htmlfilt.obj \ + $(OBJS)\htmllib_htmlpars.obj \ + $(OBJS)\htmllib_htmltag.obj \ + $(OBJS)\htmllib_htmlwin.obj \ + $(OBJS)\htmllib_htmprint.obj \ + $(OBJS)\htmllib_m_dflist.obj \ + $(OBJS)\htmllib_m_fonts.obj \ + $(OBJS)\htmllib_m_hline.obj \ + $(OBJS)\htmllib_m_image.obj \ + $(OBJS)\htmllib_m_layout.obj \ + $(OBJS)\htmllib_m_links.obj \ + $(OBJS)\htmllib_m_list.obj \ + $(OBJS)\htmllib_m_pre.obj \ + $(OBJS)\htmllib_m_span.obj \ + $(OBJS)\htmllib_m_style.obj \ + $(OBJS)\htmllib_m_tables.obj \ + $(OBJS)\htmllib_styleparams.obj \ + $(OBJS)\htmllib_winpars.obj \ + $(OBJS)\htmllib_htmllbox.obj +WEBVIEWDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_WEBVIEW -Hu \ + -H=$(OBJS)\wxprec_webviewdll.csm $(CPPFLAGS) $(CXXFLAGS) +WEBVIEWDLL_OBJECTS = \ + $(OBJS)\webviewdll_dummy.obj \ + $(OBJS)\webviewdll_webview_ie.obj \ + $(OBJS)\webviewdll_webview.obj \ + $(OBJS)\webviewdll_webviewarchivehandler.obj \ + $(OBJS)\webviewdll_webviewfshandler.obj +WEBVIEWLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_webviewlib.csm $(CPPFLAGS) \ + $(CXXFLAGS) +WEBVIEWLIB_OBJECTS = \ + $(OBJS)\webviewlib_dummy.obj \ + $(OBJS)\webviewlib_webview_ie.obj \ + $(OBJS)\webviewlib_webview.obj \ + $(OBJS)\webviewlib_webviewarchivehandler.obj \ + $(OBJS)\webviewlib_webviewfshandler.obj +QADLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_QA -Hu \ + -H=$(OBJS)\wxprec_qadll.csm $(CPPFLAGS) $(CXXFLAGS) +QADLL_OBJECTS = \ + $(OBJS)\qadll_dummy.obj \ + $(OBJS)\qadll_debugrpt.obj \ + $(OBJS)\qadll_dbgrptg.obj +QALIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_qalib.csm $(CPPFLAGS) \ + $(CXXFLAGS) +QALIB_OBJECTS = \ + $(OBJS)\qalib_dummy.obj \ + $(OBJS)\qalib_debugrpt.obj \ + $(OBJS)\qalib_dbgrptg.obj +XMLDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DwxUSE_GUI=0 -DWXUSINGDLL -DWXMAKINGDLL_XML -Hu \ + -H=$(OBJS)\wxprec_xmldll.csm $(CPPFLAGS) $(CXXFLAGS) +XMLDLL_OBJECTS = \ + $(OBJS)\xmldll_dummy.obj \ + $(OBJS)\xmldll_xml.obj \ + $(OBJS)\xmldll_xtixml.obj +XMLLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DwxUSE_GUI=0 -Hu -H=$(OBJS)\wxprec_xmllib.csm \ + $(CPPFLAGS) $(CXXFLAGS) +XMLLIB_OBJECTS = \ + $(OBJS)\xmllib_dummy.obj \ + $(OBJS)\xmllib_xml.obj \ + $(OBJS)\xmllib_xtixml.obj +XRCDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_XRC -Hu \ + -H=$(OBJS)\wxprec_xrcdll.csm $(CPPFLAGS) $(CXXFLAGS) +XRCDLL_OBJECTS = \ + $(OBJS)\xrcdll_dummy.obj \ + $(OBJS)\xrcdll_xh_animatctrl.obj \ + $(OBJS)\xrcdll_xh_bannerwindow.obj \ + $(OBJS)\xrcdll_xh_bmp.obj \ + $(OBJS)\xrcdll_xh_bmpcbox.obj \ + $(OBJS)\xrcdll_xh_bmpbt.obj \ + $(OBJS)\xrcdll_xh_bttn.obj \ + $(OBJS)\xrcdll_xh_cald.obj \ + $(OBJS)\xrcdll_xh_chckb.obj \ + $(OBJS)\xrcdll_xh_chckl.obj \ + $(OBJS)\xrcdll_xh_choic.obj \ + $(OBJS)\xrcdll_xh_choicbk.obj \ + $(OBJS)\xrcdll_xh_clrpicker.obj \ + $(OBJS)\xrcdll_xh_cmdlinkbn.obj \ + $(OBJS)\xrcdll_xh_collpane.obj \ + $(OBJS)\xrcdll_xh_combo.obj \ + $(OBJS)\xrcdll_xh_comboctrl.obj \ + $(OBJS)\xrcdll_xh_datectrl.obj \ + $(OBJS)\xrcdll_xh_dirpicker.obj \ + $(OBJS)\xrcdll_xh_dlg.obj \ + $(OBJS)\xrcdll_xh_editlbox.obj \ + $(OBJS)\xrcdll_xh_filectrl.obj \ + $(OBJS)\xrcdll_xh_filepicker.obj \ + $(OBJS)\xrcdll_xh_fontpicker.obj \ + $(OBJS)\xrcdll_xh_frame.obj \ + $(OBJS)\xrcdll_xh_gauge.obj \ + $(OBJS)\xrcdll_xh_gdctl.obj \ + $(OBJS)\xrcdll_xh_grid.obj \ + $(OBJS)\xrcdll_xh_html.obj \ + $(OBJS)\xrcdll_xh_hyperlink.obj \ + $(OBJS)\xrcdll_xh_listb.obj \ + $(OBJS)\xrcdll_xh_listbk.obj \ + $(OBJS)\xrcdll_xh_listc.obj \ + $(OBJS)\xrcdll_xh_mdi.obj \ + $(OBJS)\xrcdll_xh_menu.obj \ + $(OBJS)\xrcdll_xh_notbk.obj \ + $(OBJS)\xrcdll_xh_odcombo.obj \ + $(OBJS)\xrcdll_xh_panel.obj \ + $(OBJS)\xrcdll_xh_propdlg.obj \ + $(OBJS)\xrcdll_xh_radbt.obj \ + $(OBJS)\xrcdll_xh_radbx.obj \ + $(OBJS)\xrcdll_xh_scrol.obj \ + $(OBJS)\xrcdll_xh_scwin.obj \ + $(OBJS)\xrcdll_xh_htmllbox.obj \ + $(OBJS)\xrcdll_xh_sizer.obj \ + $(OBJS)\xrcdll_xh_slidr.obj \ + $(OBJS)\xrcdll_xh_spin.obj \ + $(OBJS)\xrcdll_xh_split.obj \ + $(OBJS)\xrcdll_xh_srchctrl.obj \ + $(OBJS)\xrcdll_xh_statbar.obj \ + $(OBJS)\xrcdll_xh_stbmp.obj \ + $(OBJS)\xrcdll_xh_stbox.obj \ + $(OBJS)\xrcdll_xh_stlin.obj \ + $(OBJS)\xrcdll_xh_sttxt.obj \ + $(OBJS)\xrcdll_xh_text.obj \ + $(OBJS)\xrcdll_xh_tglbtn.obj \ + $(OBJS)\xrcdll_xh_timectrl.obj \ + $(OBJS)\xrcdll_xh_toolb.obj \ + $(OBJS)\xrcdll_xh_toolbk.obj \ + $(OBJS)\xrcdll_xh_tree.obj \ + $(OBJS)\xrcdll_xh_treebk.obj \ + $(OBJS)\xrcdll_xh_unkwn.obj \ + $(OBJS)\xrcdll_xh_wizrd.obj \ + $(OBJS)\xrcdll_xmlres.obj \ + $(OBJS)\xrcdll_xmladv.obj \ + $(OBJS)\xrcdll_xmlrsall.obj +XRCLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_xrclib.csm $(CPPFLAGS) \ + $(CXXFLAGS) +XRCLIB_OBJECTS = \ + $(OBJS)\xrclib_dummy.obj \ + $(OBJS)\xrclib_xh_animatctrl.obj \ + $(OBJS)\xrclib_xh_bannerwindow.obj \ + $(OBJS)\xrclib_xh_bmp.obj \ + $(OBJS)\xrclib_xh_bmpcbox.obj \ + $(OBJS)\xrclib_xh_bmpbt.obj \ + $(OBJS)\xrclib_xh_bttn.obj \ + $(OBJS)\xrclib_xh_cald.obj \ + $(OBJS)\xrclib_xh_chckb.obj \ + $(OBJS)\xrclib_xh_chckl.obj \ + $(OBJS)\xrclib_xh_choic.obj \ + $(OBJS)\xrclib_xh_choicbk.obj \ + $(OBJS)\xrclib_xh_clrpicker.obj \ + $(OBJS)\xrclib_xh_cmdlinkbn.obj \ + $(OBJS)\xrclib_xh_collpane.obj \ + $(OBJS)\xrclib_xh_combo.obj \ + $(OBJS)\xrclib_xh_comboctrl.obj \ + $(OBJS)\xrclib_xh_datectrl.obj \ + $(OBJS)\xrclib_xh_dirpicker.obj \ + $(OBJS)\xrclib_xh_dlg.obj \ + $(OBJS)\xrclib_xh_editlbox.obj \ + $(OBJS)\xrclib_xh_filectrl.obj \ + $(OBJS)\xrclib_xh_filepicker.obj \ + $(OBJS)\xrclib_xh_fontpicker.obj \ + $(OBJS)\xrclib_xh_frame.obj \ + $(OBJS)\xrclib_xh_gauge.obj \ + $(OBJS)\xrclib_xh_gdctl.obj \ + $(OBJS)\xrclib_xh_grid.obj \ + $(OBJS)\xrclib_xh_html.obj \ + $(OBJS)\xrclib_xh_hyperlink.obj \ + $(OBJS)\xrclib_xh_listb.obj \ + $(OBJS)\xrclib_xh_listbk.obj \ + $(OBJS)\xrclib_xh_listc.obj \ + $(OBJS)\xrclib_xh_mdi.obj \ + $(OBJS)\xrclib_xh_menu.obj \ + $(OBJS)\xrclib_xh_notbk.obj \ + $(OBJS)\xrclib_xh_odcombo.obj \ + $(OBJS)\xrclib_xh_panel.obj \ + $(OBJS)\xrclib_xh_propdlg.obj \ + $(OBJS)\xrclib_xh_radbt.obj \ + $(OBJS)\xrclib_xh_radbx.obj \ + $(OBJS)\xrclib_xh_scrol.obj \ + $(OBJS)\xrclib_xh_scwin.obj \ + $(OBJS)\xrclib_xh_htmllbox.obj \ + $(OBJS)\xrclib_xh_sizer.obj \ + $(OBJS)\xrclib_xh_slidr.obj \ + $(OBJS)\xrclib_xh_spin.obj \ + $(OBJS)\xrclib_xh_split.obj \ + $(OBJS)\xrclib_xh_srchctrl.obj \ + $(OBJS)\xrclib_xh_statbar.obj \ + $(OBJS)\xrclib_xh_stbmp.obj \ + $(OBJS)\xrclib_xh_stbox.obj \ + $(OBJS)\xrclib_xh_stlin.obj \ + $(OBJS)\xrclib_xh_sttxt.obj \ + $(OBJS)\xrclib_xh_text.obj \ + $(OBJS)\xrclib_xh_tglbtn.obj \ + $(OBJS)\xrclib_xh_timectrl.obj \ + $(OBJS)\xrclib_xh_toolb.obj \ + $(OBJS)\xrclib_xh_toolbk.obj \ + $(OBJS)\xrclib_xh_tree.obj \ + $(OBJS)\xrclib_xh_treebk.obj \ + $(OBJS)\xrclib_xh_unkwn.obj \ + $(OBJS)\xrclib_xh_wizrd.obj \ + $(OBJS)\xrclib_xmlres.obj \ + $(OBJS)\xrclib_xmladv.obj \ + $(OBJS)\xrclib_xmlrsall.obj +AUIDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_AUI -Hu \ + -H=$(OBJS)\wxprec_auidll.csm $(CPPFLAGS) $(CXXFLAGS) +AUIDLL_OBJECTS = \ + $(OBJS)\auidll_dummy.obj \ + $(OBJS)\auidll_framemanager.obj \ + $(OBJS)\auidll_dockart.obj \ + $(OBJS)\auidll_floatpane.obj \ + $(OBJS)\auidll_auibook.obj \ + $(OBJS)\auidll_auibar.obj \ + $(OBJS)\auidll_tabmdi.obj \ + $(OBJS)\auidll_tabart.obj \ + $(OBJS)\auidll_xh_auinotbk.obj +AUILIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_auilib.csm $(CPPFLAGS) \ + $(CXXFLAGS) +AUILIB_OBJECTS = \ + $(OBJS)\auilib_dummy.obj \ + $(OBJS)\auilib_framemanager.obj \ + $(OBJS)\auilib_dockart.obj \ + $(OBJS)\auilib_floatpane.obj \ + $(OBJS)\auilib_auibook.obj \ + $(OBJS)\auilib_auibar.obj \ + $(OBJS)\auilib_tabmdi.obj \ + $(OBJS)\auilib_tabart.obj \ + $(OBJS)\auilib_xh_auinotbk.obj +RIBBONDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_RIBBON -Hu \ + -H=$(OBJS)\wxprec_ribbondll.csm $(CPPFLAGS) $(CXXFLAGS) +RIBBONDLL_OBJECTS = \ + $(OBJS)\ribbondll_dummy.obj \ + $(OBJS)\ribbondll_art_internal.obj \ + $(OBJS)\ribbondll_art_msw.obj \ + $(OBJS)\ribbondll_art_aui.obj \ + $(OBJS)\ribbondll_bar.obj \ + $(OBJS)\ribbondll_buttonbar.obj \ + $(OBJS)\ribbondll_control.obj \ + $(OBJS)\ribbondll_gallery.obj \ + $(OBJS)\ribbondll_page.obj \ + $(OBJS)\ribbondll_panel.obj \ + $(OBJS)\ribbondll_toolbar.obj \ + $(OBJS)\ribbondll_xh_ribbon.obj +RIBBONLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_ribbonlib.csm $(CPPFLAGS) \ + $(CXXFLAGS) +RIBBONLIB_OBJECTS = \ + $(OBJS)\ribbonlib_dummy.obj \ + $(OBJS)\ribbonlib_art_internal.obj \ + $(OBJS)\ribbonlib_art_msw.obj \ + $(OBJS)\ribbonlib_art_aui.obj \ + $(OBJS)\ribbonlib_bar.obj \ + $(OBJS)\ribbonlib_buttonbar.obj \ + $(OBJS)\ribbonlib_control.obj \ + $(OBJS)\ribbonlib_gallery.obj \ + $(OBJS)\ribbonlib_page.obj \ + $(OBJS)\ribbonlib_panel.obj \ + $(OBJS)\ribbonlib_toolbar.obj \ + $(OBJS)\ribbonlib_xh_ribbon.obj +PROPGRIDDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_PROPGRID -Hu \ + -H=$(OBJS)\wxprec_propgriddll.csm $(CPPFLAGS) $(CXXFLAGS) +PROPGRIDDLL_OBJECTS = \ + $(OBJS)\propgriddll_dummy.obj \ + $(OBJS)\propgriddll_advprops.obj \ + $(OBJS)\propgriddll_editors.obj \ + $(OBJS)\propgriddll_manager.obj \ + $(OBJS)\propgriddll_property.obj \ + $(OBJS)\propgriddll_propgrid.obj \ + $(OBJS)\propgriddll_propgridiface.obj \ + $(OBJS)\propgriddll_propgridpagestate.obj \ + $(OBJS)\propgriddll_props.obj +PROPGRIDLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_propgridlib.csm $(CPPFLAGS) \ + $(CXXFLAGS) +PROPGRIDLIB_OBJECTS = \ + $(OBJS)\propgridlib_dummy.obj \ + $(OBJS)\propgridlib_advprops.obj \ + $(OBJS)\propgridlib_editors.obj \ + $(OBJS)\propgridlib_manager.obj \ + $(OBJS)\propgridlib_property.obj \ + $(OBJS)\propgridlib_propgrid.obj \ + $(OBJS)\propgridlib_propgridiface.obj \ + $(OBJS)\propgridlib_propgridpagestate.obj \ + $(OBJS)\propgridlib_props.obj +RICHTEXTDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_RICHTEXT -Hu \ + -H=$(OBJS)\wxprec_richtextdll.csm $(CPPFLAGS) $(CXXFLAGS) +RICHTEXTDLL_OBJECTS = \ + $(OBJS)\richtextdll_dummy.obj \ + $(OBJS)\richtextdll_richtextbuffer.obj \ + $(OBJS)\richtextdll_richtextctrl.obj \ + $(OBJS)\richtextdll_richtextformatdlg.obj \ + $(OBJS)\richtextdll_richtexthtml.obj \ + $(OBJS)\richtextdll_richtextimagedlg.obj \ + $(OBJS)\richtextdll_richtextprint.obj \ + $(OBJS)\richtextdll_richtextstyledlg.obj \ + $(OBJS)\richtextdll_richtextstyles.obj \ + $(OBJS)\richtextdll_richtextsymboldlg.obj \ + $(OBJS)\richtextdll_richtextxml.obj \ + $(OBJS)\richtextdll_xh_richtext.obj +RICHTEXTLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_richtextlib.csm $(CPPFLAGS) \ + $(CXXFLAGS) +RICHTEXTLIB_OBJECTS = \ + $(OBJS)\richtextlib_dummy.obj \ + $(OBJS)\richtextlib_richtextbuffer.obj \ + $(OBJS)\richtextlib_richtextctrl.obj \ + $(OBJS)\richtextlib_richtextformatdlg.obj \ + $(OBJS)\richtextlib_richtexthtml.obj \ + $(OBJS)\richtextlib_richtextimagedlg.obj \ + $(OBJS)\richtextlib_richtextprint.obj \ + $(OBJS)\richtextlib_richtextstyledlg.obj \ + $(OBJS)\richtextlib_richtextstyles.obj \ + $(OBJS)\richtextlib_richtextsymboldlg.obj \ + $(OBJS)\richtextlib_richtextxml.obj \ + $(OBJS)\richtextlib_xh_richtext.obj +STCDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -I..\..\src\stc\scintilla\include \ + -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ \ + -DSCI_LEXER -DLINK_LEXERS -w-8027 -DWXUSINGDLL -DWXMAKINGDLL_STC -Hu \ + -H=$(OBJS)\wxprec_stcdll.csm $(CPPFLAGS) $(CXXFLAGS) +STCDLL_OBJECTS = \ + $(OBJS)\stcdll_dummy.obj \ + $(OBJS)\stcdll_stc.obj \ + $(OBJS)\stcdll_PlatWX.obj \ + $(OBJS)\stcdll_ScintillaWX.obj +STCLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -I..\..\src\stc\scintilla\include \ + -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ \ + -DSCI_LEXER -DLINK_LEXERS -w-8027 -Hu -H=$(OBJS)\wxprec_stclib.csm \ + $(CPPFLAGS) $(CXXFLAGS) +STCLIB_OBJECTS = \ + $(OBJS)\stclib_dummy.obj \ + $(OBJS)\stclib_stc.obj \ + $(OBJS)\stclib_PlatWX.obj \ + $(OBJS)\stclib_ScintillaWX.obj +GLDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_GL -Hu \ + -H=$(OBJS)\wxprec_gldll.csm $(CPPFLAGS) $(CXXFLAGS) +GLDLL_OBJECTS = \ + $(OBJS)\gldll_dummy.obj \ + $(OBJS)\gldll_glcmn.obj \ + $(OBJS)\gldll_glcanvas.obj +GLLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -DWXBUILDING -I..\..\src\tiff\libtiff \ + -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \ + -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_gllib.csm $(CPPFLAGS) \ + $(CXXFLAGS) +GLLIB_OBJECTS = \ + $(OBJS)\gllib_dummy.obj \ + $(OBJS)\gllib_glcmn.obj \ + $(OBJS)\gllib_glcanvas.obj +BUILD_CFG_FILE = $(SETUPHDIR)\build.cfg + +### Conditionally set variables: ### + +!if "$(USE_GUI)" == "0" +PORTNAME = base +!endif +!if "$(USE_GUI)" == "1" +PORTNAME = msw$(TOOLKIT_VERSION) +!endif +!if "$(OFFICIAL_BUILD)" == "1" +COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD +!endif +!if "$(OFFICIAL_BUILD)" == "0" +WXCOMPILER = _bcc +!endif +!if "$(OFFICIAL_BUILD)" == "1" +WXCOMPILER = _bcc$(COMPILER_VERSION) +!endif +!if "$(OFFICIAL_BUILD)" == "0" +VENDORTAG = _$(VENDOR) +!endif +!if "$(OFFICIAL_BUILD)" == "1" +VENDORTAG = +!endif +!if "$(BUILD)" == "debug" +WXDEBUGFLAG = d +!endif +!if "$(UNICODE)" == "1" +WXUNICODEFLAG = u +!endif +!if "$(WXUNIV)" == "1" +WXUNIVNAME = univ +!endif +!if "$(SHARED)" == "1" +WXDLLFLAG = dll +!endif +!if "$(SHARED)" == "0" +LIBTYPE_SUFFIX = lib +!endif +!if "$(SHARED)" == "1" +LIBTYPE_SUFFIX = dll +!endif +!if "$(USE_GUI)" == "1" +__wxpng___depname = $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__wxjpeg___depname = $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__wxtiff___depname = $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +__wxscintilla_usingdll_p = -DWXUSINGDLL +!endif +!if "$(MONOLITHIC)" == "0" +EXTRALIBS_FOR_BASE = +!endif +!if "$(MONOLITHIC)" == "1" +EXTRALIBS_FOR_BASE = +!endif +!if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "1" +__monodll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(USE_GUI)" == "1" +____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ + $(____CORE_SRC_FILENAMES_OBJECTS) \ + $(____ADVANCED_SRC_FILENAMES_OBJECTS) \ + $(OBJS)\monodll_mediactrlcmn.obj \ + $(OBJS)\monodll_mediactrl_am.obj \ + $(OBJS)\monodll_mediactrl_wmp10.obj \ + $(OBJS)\monodll_mediactrl_qt.obj \ + $(OBJS)\monodll_helpbest.obj \ + $(OBJS)\monodll_helpctrl.obj \ + $(OBJS)\monodll_helpdata.obj \ + $(OBJS)\monodll_helpdlg.obj \ + $(OBJS)\monodll_helpfrm.obj \ + $(OBJS)\monodll_helpwnd.obj \ + $(OBJS)\monodll_htmlcell.obj \ + $(OBJS)\monodll_htmlfilt.obj \ + $(OBJS)\monodll_htmlpars.obj \ + $(OBJS)\monodll_htmltag.obj \ + $(OBJS)\monodll_htmlwin.obj \ + $(OBJS)\monodll_htmprint.obj \ + $(OBJS)\monodll_m_dflist.obj \ + $(OBJS)\monodll_m_fonts.obj \ + $(OBJS)\monodll_m_hline.obj \ + $(OBJS)\monodll_m_image.obj \ + $(OBJS)\monodll_m_layout.obj \ + $(OBJS)\monodll_m_links.obj \ + $(OBJS)\monodll_m_list.obj \ + $(OBJS)\monodll_m_pre.obj \ + $(OBJS)\monodll_m_span.obj \ + $(OBJS)\monodll_m_style.obj \ + $(OBJS)\monodll_m_tables.obj \ + $(OBJS)\monodll_styleparams.obj \ + $(OBJS)\monodll_winpars.obj \ + $(OBJS)\monodll_htmllbox.obj \ + $(OBJS)\monodll_webview_ie.obj \ + $(OBJS)\monodll_webview.obj \ + $(OBJS)\monodll_webviewarchivehandler.obj \ + $(OBJS)\monodll_webviewfshandler.obj \ + $(OBJS)\monodll_debugrpt.obj \ + $(OBJS)\monodll_dbgrptg.obj \ + $(OBJS)\monodll_xh_animatctrl.obj \ + $(OBJS)\monodll_xh_bannerwindow.obj \ + $(OBJS)\monodll_xh_bmp.obj \ + $(OBJS)\monodll_xh_bmpcbox.obj \ + $(OBJS)\monodll_xh_bmpbt.obj \ + $(OBJS)\monodll_xh_bttn.obj \ + $(OBJS)\monodll_xh_cald.obj \ + $(OBJS)\monodll_xh_chckb.obj \ + $(OBJS)\monodll_xh_chckl.obj \ + $(OBJS)\monodll_xh_choic.obj \ + $(OBJS)\monodll_xh_choicbk.obj \ + $(OBJS)\monodll_xh_clrpicker.obj \ + $(OBJS)\monodll_xh_cmdlinkbn.obj \ + $(OBJS)\monodll_xh_collpane.obj \ + $(OBJS)\monodll_xh_combo.obj \ + $(OBJS)\monodll_xh_comboctrl.obj \ + $(OBJS)\monodll_xh_datectrl.obj \ + $(OBJS)\monodll_xh_dirpicker.obj \ + $(OBJS)\monodll_xh_dlg.obj \ + $(OBJS)\monodll_xh_editlbox.obj \ + $(OBJS)\monodll_xh_filectrl.obj \ + $(OBJS)\monodll_xh_filepicker.obj \ + $(OBJS)\monodll_xh_fontpicker.obj \ + $(OBJS)\monodll_xh_frame.obj \ + $(OBJS)\monodll_xh_gauge.obj \ + $(OBJS)\monodll_xh_gdctl.obj \ + $(OBJS)\monodll_xh_grid.obj \ + $(OBJS)\monodll_xh_html.obj \ + $(OBJS)\monodll_xh_hyperlink.obj \ + $(OBJS)\monodll_xh_listb.obj \ + $(OBJS)\monodll_xh_listbk.obj \ + $(OBJS)\monodll_xh_listc.obj \ + $(OBJS)\monodll_xh_mdi.obj \ + $(OBJS)\monodll_xh_menu.obj \ + $(OBJS)\monodll_xh_notbk.obj \ + $(OBJS)\monodll_xh_odcombo.obj \ + $(OBJS)\monodll_xh_panel.obj \ + $(OBJS)\monodll_xh_propdlg.obj \ + $(OBJS)\monodll_xh_radbt.obj \ + $(OBJS)\monodll_xh_radbx.obj \ + $(OBJS)\monodll_xh_scrol.obj \ + $(OBJS)\monodll_xh_scwin.obj \ + $(OBJS)\monodll_xh_htmllbox.obj \ + $(OBJS)\monodll_xh_sizer.obj \ + $(OBJS)\monodll_xh_slidr.obj \ + $(OBJS)\monodll_xh_spin.obj \ + $(OBJS)\monodll_xh_split.obj \ + $(OBJS)\monodll_xh_srchctrl.obj \ + $(OBJS)\monodll_xh_statbar.obj \ + $(OBJS)\monodll_xh_stbmp.obj \ + $(OBJS)\monodll_xh_stbox.obj \ + $(OBJS)\monodll_xh_stlin.obj \ + $(OBJS)\monodll_xh_sttxt.obj \ + $(OBJS)\monodll_xh_text.obj \ + $(OBJS)\monodll_xh_tglbtn.obj \ + $(OBJS)\monodll_xh_timectrl.obj \ + $(OBJS)\monodll_xh_toolb.obj \ + $(OBJS)\monodll_xh_toolbk.obj \ + $(OBJS)\monodll_xh_tree.obj \ + $(OBJS)\monodll_xh_treebk.obj \ + $(OBJS)\monodll_xh_unkwn.obj \ + $(OBJS)\monodll_xh_wizrd.obj \ + $(OBJS)\monodll_xmlres.obj \ + $(OBJS)\monodll_xmladv.obj \ + $(OBJS)\monodll_xmlrsall.obj \ + $(OBJS)\monodll_framemanager.obj \ + $(OBJS)\monodll_dockart.obj \ + $(OBJS)\monodll_floatpane.obj \ + $(OBJS)\monodll_auibook.obj \ + $(OBJS)\monodll_auibar.obj \ + $(OBJS)\monodll_tabmdi.obj \ + $(OBJS)\monodll_tabart.obj \ + $(OBJS)\monodll_xh_auinotbk.obj \ + $(OBJS)\monodll_advprops.obj \ + $(OBJS)\monodll_editors.obj \ + $(OBJS)\monodll_manager.obj \ + $(OBJS)\monodll_property.obj \ + $(OBJS)\monodll_propgrid.obj \ + $(OBJS)\monodll_propgridiface.obj \ + $(OBJS)\monodll_propgridpagestate.obj \ + $(OBJS)\monodll_props.obj \ + $(OBJS)\monodll_art_internal.obj \ + $(OBJS)\monodll_art_msw.obj \ + $(OBJS)\monodll_art_aui.obj \ + $(OBJS)\monodll_bar.obj \ + $(OBJS)\monodll_ribbon_buttonbar.obj \ + $(OBJS)\monodll_ribbon_control.obj \ + $(OBJS)\monodll_gallery.obj \ + $(OBJS)\monodll_page.obj \ + $(OBJS)\monodll_ribbon_panel.obj \ + $(OBJS)\monodll_ribbon_toolbar.obj \ + $(OBJS)\monodll_xh_ribbon.obj \ + $(OBJS)\monodll_richtextbuffer.obj \ + $(OBJS)\monodll_richtextctrl.obj \ + $(OBJS)\monodll_richtextformatdlg.obj \ + $(OBJS)\monodll_richtexthtml.obj \ + $(OBJS)\monodll_richtextimagedlg.obj \ + $(OBJS)\monodll_richtextprint.obj \ + $(OBJS)\monodll_richtextstyledlg.obj \ + $(OBJS)\monodll_richtextstyles.obj \ + $(OBJS)\monodll_richtextsymboldlg.obj \ + $(OBJS)\monodll_richtextxml.obj \ + $(OBJS)\monodll_xh_richtext.obj \ + $(OBJS)\monodll_stc.obj \ + $(OBJS)\monodll_PlatWX.obj \ + $(OBJS)\monodll_ScintillaWX.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "0" +____CORE_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_activex.obj \ + $(OBJS)\monodll_app.obj \ + $(OBJS)\monodll_bitmap.obj \ + $(OBJS)\monodll_brush.obj \ + $(OBJS)\monodll_caret.obj \ + $(OBJS)\monodll_clipbrd.obj \ + $(OBJS)\monodll_colour.obj \ + $(OBJS)\monodll_cursor.obj \ + $(OBJS)\monodll_data.obj \ + $(OBJS)\monodll_dc.obj \ + $(OBJS)\monodll_dcclient.obj \ + $(OBJS)\monodll_dcmemory.obj \ + $(OBJS)\monodll_dcprint.obj \ + $(OBJS)\monodll_dcscreen.obj \ + $(OBJS)\monodll_dialup.obj \ + $(OBJS)\monodll_dib.obj \ + $(OBJS)\monodll_display.obj \ + $(OBJS)\monodll_enhmeta.obj \ + $(OBJS)\monodll_font.obj \ + $(OBJS)\monodll_fontenum.obj \ + $(OBJS)\monodll_fontutil.obj \ + $(OBJS)\monodll_gdiimage.obj \ + $(OBJS)\monodll_gdiobj.obj \ + $(OBJS)\monodll_gdiplus.obj \ + $(OBJS)\monodll_graphics.obj \ + $(OBJS)\monodll_icon.obj \ + $(OBJS)\monodll_imaglist.obj \ + $(OBJS)\monodll_minifram.obj \ + $(OBJS)\monodll_nonownedwnd.obj \ + $(OBJS)\monodll_dataobj.obj \ + $(OBJS)\monodll_dropsrc.obj \ + $(OBJS)\monodll_droptgt.obj \ + $(OBJS)\monodll_oleutils.obj \ + $(OBJS)\monodll_safearray.obj \ + $(OBJS)\monodll_palette.obj \ + $(OBJS)\monodll_pen.obj \ + $(OBJS)\monodll_popupwin.obj \ + $(OBJS)\monodll_printdlg.obj \ + $(OBJS)\monodll_printwin.obj \ + $(OBJS)\monodll_region.obj \ + $(OBJS)\monodll_renderer.obj \ + $(OBJS)\monodll_settings.obj \ + $(OBJS)\monodll_textmeasure.obj \ + $(OBJS)\monodll_tooltip.obj \ + $(OBJS)\monodll_toplevel.obj \ + $(OBJS)\monodll_uiaction.obj \ + $(OBJS)\monodll_utilsgui.obj \ + $(OBJS)\monodll_utilswin.obj \ + $(OBJS)\monodll_uxtheme.obj \ + $(OBJS)\monodll_window.obj \ + $(OBJS)\monodll_helpchm.obj \ + $(OBJS)\monodll_helpwin.obj \ + $(OBJS)\monodll_automtn.obj \ + $(OBJS)\monodll_uuid.obj \ + $(OBJS)\monodll_clrpickerg.obj \ + $(OBJS)\monodll_collpaneg.obj \ + $(OBJS)\monodll_filepickerg.obj \ + $(OBJS)\monodll_fontpickerg.obj \ + $(OBJS)\monodll_generic_statusbr.obj \ + $(OBJS)\monodll_prntdlgg.obj \ + $(OBJS)\monodll_msw_accel.obj \ + $(OBJS)\monodll_anybutton.obj \ + $(OBJS)\monodll_artmsw.obj \ + $(OBJS)\monodll_msw_bmpbuttn.obj \ + $(OBJS)\monodll_msw_button.obj \ + $(OBJS)\monodll_msw_checkbox.obj \ + $(OBJS)\monodll_msw_choice.obj \ + $(OBJS)\monodll_colordlg.obj \ + $(OBJS)\monodll_combo.obj \ + $(OBJS)\monodll_msw_combobox.obj \ + $(OBJS)\monodll_msw_control.obj \ + $(OBJS)\monodll_msw_dialog.obj \ + $(OBJS)\monodll_dirdlg.obj \ + $(OBJS)\monodll_dragimag.obj \ + $(OBJS)\monodll_evtloop.obj \ + $(OBJS)\monodll_filedlg.obj \ + $(OBJS)\monodll_frame.obj \ + $(OBJS)\monodll_msw_gauge.obj \ + $(OBJS)\monodll_headerctrl.obj \ + $(OBJS)\monodll_iniconf.obj \ + $(OBJS)\monodll_msw_listbox.obj \ + $(OBJS)\monodll_msw_listctrl.obj \ + $(OBJS)\monodll_mdi.obj \ + $(OBJS)\monodll_msw_menu.obj \ + $(OBJS)\monodll_menuitem.obj \ + $(OBJS)\monodll_metafile.obj \ + $(OBJS)\monodll_msgdlg.obj \ + $(OBJS)\monodll_nativdlg.obj \ + $(OBJS)\monodll_nativewin.obj \ + $(OBJS)\monodll_msw_notebook.obj \ + $(OBJS)\monodll_access.obj \ + $(OBJS)\monodll_ownerdrw.obj \ + $(OBJS)\monodll_msw_panel.obj \ + $(OBJS)\monodll_progdlg.obj \ + $(OBJS)\monodll_msw_radiobox.obj \ + $(OBJS)\monodll_msw_radiobut.obj \ + $(OBJS)\monodll_richmsgdlg.obj \ + $(OBJS)\monodll_msw_scrolbar.obj \ + $(OBJS)\monodll_msw_slider.obj \ + $(OBJS)\monodll_msw_spinbutt.obj \ + $(OBJS)\monodll_spinctrl.obj \ + $(OBJS)\monodll_msw_statbmp.obj \ + $(OBJS)\monodll_msw_statbox.obj \ + $(OBJS)\monodll_statusbar.obj \ + $(OBJS)\monodll_msw_statline.obj \ + $(OBJS)\monodll_msw_stattext.obj \ + $(OBJS)\monodll_msw_toolbar.obj \ + $(OBJS)\monodll_msw_textctrl.obj \ + $(OBJS)\monodll_textentry.obj \ + $(OBJS)\monodll_msw_tglbtn.obj \ + $(OBJS)\monodll_treectrl.obj \ + $(OBJS)\monodll_msw_checklst.obj \ + $(OBJS)\monodll_msw_fdrepdlg.obj \ + $(OBJS)\monodll_fontdlg.obj \ + $(OBJS)\monodll_accelcmn.obj \ + $(OBJS)\monodll_accesscmn.obj \ + $(OBJS)\monodll_anidecod.obj \ + $(OBJS)\monodll_affinematrix2d.obj \ + $(OBJS)\monodll_appcmn.obj \ + $(OBJS)\monodll_artprov.obj \ + $(OBJS)\monodll_artstd.obj \ + $(OBJS)\monodll_arttango.obj \ + $(OBJS)\monodll_bmpbase.obj \ + $(OBJS)\monodll_bmpbtncmn.obj \ + $(OBJS)\monodll_bookctrl.obj \ + $(OBJS)\monodll_btncmn.obj \ + $(OBJS)\monodll_cairo.obj \ + $(OBJS)\monodll_checkboxcmn.obj \ + $(OBJS)\monodll_checklstcmn.obj \ + $(OBJS)\monodll_choiccmn.obj \ + $(OBJS)\monodll_clipcmn.obj \ + $(OBJS)\monodll_clrpickercmn.obj \ + $(OBJS)\monodll_colourcmn.obj \ + $(OBJS)\monodll_colourdata.obj \ + $(OBJS)\monodll_combocmn.obj \ + $(OBJS)\monodll_cmdproc.obj \ + $(OBJS)\monodll_cmndata.obj \ + $(OBJS)\monodll_containr.obj \ + $(OBJS)\monodll_cshelp.obj \ + $(OBJS)\monodll_ctrlcmn.obj \ + $(OBJS)\monodll_ctrlsub.obj \ + $(OBJS)\monodll_dcbase.obj \ + $(OBJS)\monodll_dcbufcmn.obj \ + $(OBJS)\monodll_dcgraph.obj \ + $(OBJS)\monodll_dcsvg.obj \ + $(OBJS)\monodll_dirctrlcmn.obj \ + $(OBJS)\monodll_dlgcmn.obj \ + $(OBJS)\monodll_dndcmn.obj \ + $(OBJS)\monodll_dobjcmn.obj \ + $(OBJS)\monodll_docmdi.obj \ + $(OBJS)\monodll_docview.obj \ + $(OBJS)\monodll_dpycmn.obj \ + $(OBJS)\monodll_dseldlg.obj \ + $(OBJS)\monodll_effects.obj \ + $(OBJS)\monodll_fddlgcmn.obj \ + $(OBJS)\monodll_filectrlcmn.obj \ + $(OBJS)\monodll_filehistorycmn.obj \ + $(OBJS)\monodll_filepickercmn.obj \ + $(OBJS)\monodll_fontpickercmn.obj \ + $(OBJS)\monodll_fldlgcmn.obj \ + $(OBJS)\monodll_fontcmn.obj \ + $(OBJS)\monodll_fontdata.obj \ + $(OBJS)\monodll_graphicc.obj \ + $(OBJS)\monodll_fontenumcmn.obj \ + $(OBJS)\monodll_fontmap.obj \ + $(OBJS)\monodll_fontutilcmn.obj \ + $(OBJS)\monodll_framecmn.obj \ + $(OBJS)\monodll_gaugecmn.obj \ + $(OBJS)\monodll_gbsizer.obj \ + $(OBJS)\monodll_gdicmn.obj \ + $(OBJS)\monodll_geometry.obj \ + $(OBJS)\monodll_gifdecod.obj \ + $(OBJS)\monodll_graphcmn.obj \ + $(OBJS)\monodll_headercolcmn.obj \ + $(OBJS)\monodll_headerctrlcmn.obj \ + $(OBJS)\monodll_helpbase.obj \ + $(OBJS)\monodll_iconbndl.obj \ + $(OBJS)\monodll_imagall.obj \ + $(OBJS)\monodll_imagbmp.obj \ + $(OBJS)\monodll_image.obj \ + $(OBJS)\monodll_imagfill.obj \ + $(OBJS)\monodll_imaggif.obj \ + $(OBJS)\monodll_imagiff.obj \ + $(OBJS)\monodll_imagjpeg.obj \ + $(OBJS)\monodll_imagpcx.obj \ + $(OBJS)\monodll_imagpng.obj \ + $(OBJS)\monodll_imagpnm.obj \ + $(OBJS)\monodll_imagtga.obj \ + $(OBJS)\monodll_imagtiff.obj \ + $(OBJS)\monodll_imagxpm.obj \ + $(OBJS)\monodll_layout.obj \ + $(OBJS)\monodll_lboxcmn.obj \ + $(OBJS)\monodll_listctrlcmn.obj \ + $(OBJS)\monodll_markupparser.obj \ + $(OBJS)\monodll_matrix.obj \ + $(OBJS)\monodll_menucmn.obj \ + $(OBJS)\monodll_modalhook.obj \ + $(OBJS)\monodll_mousemanager.obj \ + $(OBJS)\monodll_nbkbase.obj \ + $(OBJS)\monodll_overlaycmn.obj \ + $(OBJS)\monodll_ownerdrwcmn.obj \ + $(OBJS)\monodll_paper.obj \ + $(OBJS)\monodll_panelcmn.obj \ + $(OBJS)\monodll_persist.obj \ + $(OBJS)\monodll_pickerbase.obj \ + $(OBJS)\monodll_popupcmn.obj \ + $(OBJS)\monodll_preferencescmn.obj \ + $(OBJS)\monodll_prntbase.obj \ + $(OBJS)\monodll_quantize.obj \ + $(OBJS)\monodll_radiobtncmn.obj \ + $(OBJS)\monodll_radiocmn.obj \ + $(OBJS)\monodll_rearrangectrl.obj \ + $(OBJS)\monodll_rendcmn.obj \ + $(OBJS)\monodll_rgncmn.obj \ + $(OBJS)\monodll_scrolbarcmn.obj \ + $(OBJS)\monodll_settcmn.obj \ + $(OBJS)\monodll_sizer.obj \ + $(OBJS)\monodll_slidercmn.obj \ + $(OBJS)\monodll_spinbtncmn.obj \ + $(OBJS)\monodll_spinctrlcmn.obj \ + $(OBJS)\monodll_srchcmn.obj \ + $(OBJS)\monodll_statbar.obj \ + $(OBJS)\monodll_statbmpcmn.obj \ + $(OBJS)\monodll_statboxcmn.obj \ + $(OBJS)\monodll_statlinecmn.obj \ + $(OBJS)\monodll_stattextcmn.obj \ + $(OBJS)\monodll_stockitem.obj \ + $(OBJS)\monodll_tbarbase.obj \ + $(OBJS)\monodll_textcmn.obj \ + $(OBJS)\monodll_textentrycmn.obj \ + $(OBJS)\monodll_textmeasurecmn.obj \ + $(OBJS)\monodll_toplvcmn.obj \ + $(OBJS)\monodll_treebase.obj \ + $(OBJS)\monodll_uiactioncmn.obj \ + $(OBJS)\monodll_valgen.obj \ + $(OBJS)\monodll_validate.obj \ + $(OBJS)\monodll_valtext.obj \ + $(OBJS)\monodll_valnum.obj \ + $(OBJS)\monodll_wincmn.obj \ + $(OBJS)\monodll_windowid.obj \ + $(OBJS)\monodll_wrapsizer.obj \ + $(OBJS)\monodll_xpmdecod.obj \ + $(OBJS)\monodll_busyinfo.obj \ + $(OBJS)\monodll_generic_buttonbar.obj \ + $(OBJS)\monodll_choicdgg.obj \ + $(OBJS)\monodll_choicbkg.obj \ + $(OBJS)\monodll_combog.obj \ + $(OBJS)\monodll_dcpsg.obj \ + $(OBJS)\monodll_dirctrlg.obj \ + $(OBJS)\monodll_dragimgg.obj \ + $(OBJS)\monodll_filectrlg.obj \ + $(OBJS)\monodll_headerctrlg.obj \ + $(OBJS)\monodll_infobar.obj \ + $(OBJS)\monodll_listbkg.obj \ + $(OBJS)\monodll_logg.obj \ + $(OBJS)\monodll_markuptext.obj \ + $(OBJS)\monodll_msgdlgg.obj \ + $(OBJS)\monodll_numdlgg.obj \ + $(OBJS)\monodll_progdlgg.obj \ + $(OBJS)\monodll_preferencesg.obj \ + $(OBJS)\monodll_printps.obj \ + $(OBJS)\monodll_renderg.obj \ + $(OBJS)\monodll_richmsgdlgg.obj \ + $(OBJS)\monodll_scrlwing.obj \ + $(OBJS)\monodll_selstore.obj \ + $(OBJS)\monodll_spinctlg.obj \ + $(OBJS)\monodll_splitter.obj \ + $(OBJS)\monodll_srchctlg.obj \ + $(OBJS)\monodll_statbmpg.obj \ + $(OBJS)\monodll_stattextg.obj \ + $(OBJS)\monodll_textdlgg.obj \ + $(OBJS)\monodll_tipwin.obj \ + $(OBJS)\monodll_toolbkg.obj \ + $(OBJS)\monodll_treectlg.obj \ + $(OBJS)\monodll_treebkg.obj \ + $(OBJS)\monodll_vlbox.obj \ + $(OBJS)\monodll_vscroll.obj \ + $(OBJS)\monodll_xmlreshandler.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "1" +____CORE_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_activex.obj \ + $(OBJS)\monodll_app.obj \ + $(OBJS)\monodll_bitmap.obj \ + $(OBJS)\monodll_brush.obj \ + $(OBJS)\monodll_caret.obj \ + $(OBJS)\monodll_clipbrd.obj \ + $(OBJS)\monodll_colour.obj \ + $(OBJS)\monodll_cursor.obj \ + $(OBJS)\monodll_data.obj \ + $(OBJS)\monodll_dc.obj \ + $(OBJS)\monodll_dcclient.obj \ + $(OBJS)\monodll_dcmemory.obj \ + $(OBJS)\monodll_dcprint.obj \ + $(OBJS)\monodll_dcscreen.obj \ + $(OBJS)\monodll_dialup.obj \ + $(OBJS)\monodll_dib.obj \ + $(OBJS)\monodll_display.obj \ + $(OBJS)\monodll_enhmeta.obj \ + $(OBJS)\monodll_font.obj \ + $(OBJS)\monodll_fontenum.obj \ + $(OBJS)\monodll_fontutil.obj \ + $(OBJS)\monodll_gdiimage.obj \ + $(OBJS)\monodll_gdiobj.obj \ + $(OBJS)\monodll_gdiplus.obj \ + $(OBJS)\monodll_graphics.obj \ + $(OBJS)\monodll_icon.obj \ + $(OBJS)\monodll_imaglist.obj \ + $(OBJS)\monodll_minifram.obj \ + $(OBJS)\monodll_nonownedwnd.obj \ + $(OBJS)\monodll_dataobj.obj \ + $(OBJS)\monodll_dropsrc.obj \ + $(OBJS)\monodll_droptgt.obj \ + $(OBJS)\monodll_oleutils.obj \ + $(OBJS)\monodll_safearray.obj \ + $(OBJS)\monodll_palette.obj \ + $(OBJS)\monodll_pen.obj \ + $(OBJS)\monodll_popupwin.obj \ + $(OBJS)\monodll_printdlg.obj \ + $(OBJS)\monodll_printwin.obj \ + $(OBJS)\monodll_region.obj \ + $(OBJS)\monodll_renderer.obj \ + $(OBJS)\monodll_settings.obj \ + $(OBJS)\monodll_textmeasure.obj \ + $(OBJS)\monodll_tooltip.obj \ + $(OBJS)\monodll_toplevel.obj \ + $(OBJS)\monodll_uiaction.obj \ + $(OBJS)\monodll_utilsgui.obj \ + $(OBJS)\monodll_utilswin.obj \ + $(OBJS)\monodll_uxtheme.obj \ + $(OBJS)\monodll_window.obj \ + $(OBJS)\monodll_helpchm.obj \ + $(OBJS)\monodll_helpwin.obj \ + $(OBJS)\monodll_automtn.obj \ + $(OBJS)\monodll_uuid.obj \ + $(OBJS)\monodll_evtloop.obj \ + $(OBJS)\monodll_generic_accel.obj \ + $(OBJS)\monodll_clrpickerg.obj \ + $(OBJS)\monodll_collpaneg.obj \ + $(OBJS)\monodll_colrdlgg.obj \ + $(OBJS)\monodll_dirdlgg.obj \ + $(OBJS)\monodll_generic_fdrepdlg.obj \ + $(OBJS)\monodll_filedlgg.obj \ + $(OBJS)\monodll_filepickerg.obj \ + $(OBJS)\monodll_fontdlgg.obj \ + $(OBJS)\monodll_fontpickerg.obj \ + $(OBJS)\monodll_generic_listctrl.obj \ + $(OBJS)\monodll_mdig.obj \ + $(OBJS)\monodll_prntdlgg.obj \ + $(OBJS)\monodll_univ_bmpbuttn.obj \ + $(OBJS)\monodll_univ_button.obj \ + $(OBJS)\monodll_univ_checkbox.obj \ + $(OBJS)\monodll_univ_checklst.obj \ + $(OBJS)\monodll_univ_choice.obj \ + $(OBJS)\monodll_univ_combobox.obj \ + $(OBJS)\monodll_univ_control.obj \ + $(OBJS)\monodll_ctrlrend.obj \ + $(OBJS)\monodll_univ_dialog.obj \ + $(OBJS)\monodll_framuniv.obj \ + $(OBJS)\monodll_univ_gauge.obj \ + $(OBJS)\monodll_inpcons.obj \ + $(OBJS)\monodll_inphand.obj \ + $(OBJS)\monodll_univ_listbox.obj \ + $(OBJS)\monodll_univ_menu.obj \ + $(OBJS)\monodll_univ_notebook.obj \ + $(OBJS)\monodll_univ_radiobox.obj \ + $(OBJS)\monodll_univ_radiobut.obj \ + $(OBJS)\monodll_scrarrow.obj \ + $(OBJS)\monodll_univ_scrolbar.obj \ + $(OBJS)\monodll_scrthumb.obj \ + $(OBJS)\monodll_settingsuniv.obj \ + $(OBJS)\monodll_univ_slider.obj \ + $(OBJS)\monodll_univ_spinbutt.obj \ + $(OBJS)\monodll_univ_statbmp.obj \ + $(OBJS)\monodll_univ_statbox.obj \ + $(OBJS)\monodll_univ_statline.obj \ + $(OBJS)\monodll_univ_stattext.obj \ + $(OBJS)\monodll_univ_statusbr.obj \ + $(OBJS)\monodll_stdrend.obj \ + $(OBJS)\monodll_univ_textctrl.obj \ + $(OBJS)\monodll_univ_tglbtn.obj \ + $(OBJS)\monodll_theme.obj \ + $(OBJS)\monodll_univ_toolbar.obj \ + $(OBJS)\monodll_topluniv.obj \ + $(OBJS)\monodll_winuniv.obj \ + $(OBJS)\monodll_gtk.obj \ + $(OBJS)\monodll_metal.obj \ + $(OBJS)\monodll_mono.obj \ + $(OBJS)\monodll_win32.obj \ + $(OBJS)\monodll_accelcmn.obj \ + $(OBJS)\monodll_accesscmn.obj \ + $(OBJS)\monodll_anidecod.obj \ + $(OBJS)\monodll_affinematrix2d.obj \ + $(OBJS)\monodll_appcmn.obj \ + $(OBJS)\monodll_artprov.obj \ + $(OBJS)\monodll_artstd.obj \ + $(OBJS)\monodll_arttango.obj \ + $(OBJS)\monodll_bmpbase.obj \ + $(OBJS)\monodll_bmpbtncmn.obj \ + $(OBJS)\monodll_bookctrl.obj \ + $(OBJS)\monodll_btncmn.obj \ + $(OBJS)\monodll_cairo.obj \ + $(OBJS)\monodll_checkboxcmn.obj \ + $(OBJS)\monodll_checklstcmn.obj \ + $(OBJS)\monodll_choiccmn.obj \ + $(OBJS)\monodll_clipcmn.obj \ + $(OBJS)\monodll_clrpickercmn.obj \ + $(OBJS)\monodll_colourcmn.obj \ + $(OBJS)\monodll_colourdata.obj \ + $(OBJS)\monodll_combocmn.obj \ + $(OBJS)\monodll_cmdproc.obj \ + $(OBJS)\monodll_cmndata.obj \ + $(OBJS)\monodll_containr.obj \ + $(OBJS)\monodll_cshelp.obj \ + $(OBJS)\monodll_ctrlcmn.obj \ + $(OBJS)\monodll_ctrlsub.obj \ + $(OBJS)\monodll_dcbase.obj \ + $(OBJS)\monodll_dcbufcmn.obj \ + $(OBJS)\monodll_dcgraph.obj \ + $(OBJS)\monodll_dcsvg.obj \ + $(OBJS)\monodll_dirctrlcmn.obj \ + $(OBJS)\monodll_dlgcmn.obj \ + $(OBJS)\monodll_dndcmn.obj \ + $(OBJS)\monodll_dobjcmn.obj \ + $(OBJS)\monodll_docmdi.obj \ + $(OBJS)\monodll_docview.obj \ + $(OBJS)\monodll_dpycmn.obj \ + $(OBJS)\monodll_dseldlg.obj \ + $(OBJS)\monodll_effects.obj \ + $(OBJS)\monodll_fddlgcmn.obj \ + $(OBJS)\monodll_filectrlcmn.obj \ + $(OBJS)\monodll_filehistorycmn.obj \ + $(OBJS)\monodll_filepickercmn.obj \ + $(OBJS)\monodll_fontpickercmn.obj \ + $(OBJS)\monodll_fldlgcmn.obj \ + $(OBJS)\monodll_fontcmn.obj \ + $(OBJS)\monodll_fontdata.obj \ + $(OBJS)\monodll_graphicc.obj \ + $(OBJS)\monodll_fontenumcmn.obj \ + $(OBJS)\monodll_fontmap.obj \ + $(OBJS)\monodll_fontutilcmn.obj \ + $(OBJS)\monodll_framecmn.obj \ + $(OBJS)\monodll_gaugecmn.obj \ + $(OBJS)\monodll_gbsizer.obj \ + $(OBJS)\monodll_gdicmn.obj \ + $(OBJS)\monodll_geometry.obj \ + $(OBJS)\monodll_gifdecod.obj \ + $(OBJS)\monodll_graphcmn.obj \ + $(OBJS)\monodll_headercolcmn.obj \ + $(OBJS)\monodll_headerctrlcmn.obj \ + $(OBJS)\monodll_helpbase.obj \ + $(OBJS)\monodll_iconbndl.obj \ + $(OBJS)\monodll_imagall.obj \ + $(OBJS)\monodll_imagbmp.obj \ + $(OBJS)\monodll_image.obj \ + $(OBJS)\monodll_imagfill.obj \ + $(OBJS)\monodll_imaggif.obj \ + $(OBJS)\monodll_imagiff.obj \ + $(OBJS)\monodll_imagjpeg.obj \ + $(OBJS)\monodll_imagpcx.obj \ + $(OBJS)\monodll_imagpng.obj \ + $(OBJS)\monodll_imagpnm.obj \ + $(OBJS)\monodll_imagtga.obj \ + $(OBJS)\monodll_imagtiff.obj \ + $(OBJS)\monodll_imagxpm.obj \ + $(OBJS)\monodll_layout.obj \ + $(OBJS)\monodll_lboxcmn.obj \ + $(OBJS)\monodll_listctrlcmn.obj \ + $(OBJS)\monodll_markupparser.obj \ + $(OBJS)\monodll_matrix.obj \ + $(OBJS)\monodll_menucmn.obj \ + $(OBJS)\monodll_modalhook.obj \ + $(OBJS)\monodll_mousemanager.obj \ + $(OBJS)\monodll_nbkbase.obj \ + $(OBJS)\monodll_overlaycmn.obj \ + $(OBJS)\monodll_ownerdrwcmn.obj \ + $(OBJS)\monodll_paper.obj \ + $(OBJS)\monodll_panelcmn.obj \ + $(OBJS)\monodll_persist.obj \ + $(OBJS)\monodll_pickerbase.obj \ + $(OBJS)\monodll_popupcmn.obj \ + $(OBJS)\monodll_preferencescmn.obj \ + $(OBJS)\monodll_prntbase.obj \ + $(OBJS)\monodll_quantize.obj \ + $(OBJS)\monodll_radiobtncmn.obj \ + $(OBJS)\monodll_radiocmn.obj \ + $(OBJS)\monodll_rearrangectrl.obj \ + $(OBJS)\monodll_rendcmn.obj \ + $(OBJS)\monodll_rgncmn.obj \ + $(OBJS)\monodll_scrolbarcmn.obj \ + $(OBJS)\monodll_settcmn.obj \ + $(OBJS)\monodll_sizer.obj \ + $(OBJS)\monodll_slidercmn.obj \ + $(OBJS)\monodll_spinbtncmn.obj \ + $(OBJS)\monodll_spinctrlcmn.obj \ + $(OBJS)\monodll_srchcmn.obj \ + $(OBJS)\monodll_statbar.obj \ + $(OBJS)\monodll_statbmpcmn.obj \ + $(OBJS)\monodll_statboxcmn.obj \ + $(OBJS)\monodll_statlinecmn.obj \ + $(OBJS)\monodll_stattextcmn.obj \ + $(OBJS)\monodll_stockitem.obj \ + $(OBJS)\monodll_tbarbase.obj \ + $(OBJS)\monodll_textcmn.obj \ + $(OBJS)\monodll_textentrycmn.obj \ + $(OBJS)\monodll_textmeasurecmn.obj \ + $(OBJS)\monodll_toplvcmn.obj \ + $(OBJS)\monodll_treebase.obj \ + $(OBJS)\monodll_uiactioncmn.obj \ + $(OBJS)\monodll_valgen.obj \ + $(OBJS)\monodll_validate.obj \ + $(OBJS)\monodll_valtext.obj \ + $(OBJS)\monodll_valnum.obj \ + $(OBJS)\monodll_wincmn.obj \ + $(OBJS)\monodll_windowid.obj \ + $(OBJS)\monodll_wrapsizer.obj \ + $(OBJS)\monodll_xpmdecod.obj \ + $(OBJS)\monodll_busyinfo.obj \ + $(OBJS)\monodll_generic_buttonbar.obj \ + $(OBJS)\monodll_choicdgg.obj \ + $(OBJS)\monodll_choicbkg.obj \ + $(OBJS)\monodll_combog.obj \ + $(OBJS)\monodll_dcpsg.obj \ + $(OBJS)\monodll_dirctrlg.obj \ + $(OBJS)\monodll_dragimgg.obj \ + $(OBJS)\monodll_filectrlg.obj \ + $(OBJS)\monodll_headerctrlg.obj \ + $(OBJS)\monodll_infobar.obj \ + $(OBJS)\monodll_listbkg.obj \ + $(OBJS)\monodll_logg.obj \ + $(OBJS)\monodll_markuptext.obj \ + $(OBJS)\monodll_msgdlgg.obj \ + $(OBJS)\monodll_numdlgg.obj \ + $(OBJS)\monodll_progdlgg.obj \ + $(OBJS)\monodll_preferencesg.obj \ + $(OBJS)\monodll_printps.obj \ + $(OBJS)\monodll_renderg.obj \ + $(OBJS)\monodll_richmsgdlgg.obj \ + $(OBJS)\monodll_scrlwing.obj \ + $(OBJS)\monodll_selstore.obj \ + $(OBJS)\monodll_spinctlg.obj \ + $(OBJS)\monodll_splitter.obj \ + $(OBJS)\monodll_srchctlg.obj \ + $(OBJS)\monodll_statbmpg.obj \ + $(OBJS)\monodll_stattextg.obj \ + $(OBJS)\monodll_textdlgg.obj \ + $(OBJS)\monodll_tipwin.obj \ + $(OBJS)\monodll_toolbkg.obj \ + $(OBJS)\monodll_treectlg.obj \ + $(OBJS)\monodll_treebkg.obj \ + $(OBJS)\monodll_vlbox.obj \ + $(OBJS)\monodll_vscroll.obj \ + $(OBJS)\monodll_xmlreshandler.obj +!endif +!if "$(WXUNIV)" == "0" +____ADVANCED_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_animatecmn.obj \ + $(OBJS)\monodll_bmpcboxcmn.obj \ + $(OBJS)\monodll_calctrlcmn.obj \ + $(OBJS)\monodll_datavcmn.obj \ + $(OBJS)\monodll_gridcmn.obj \ + $(OBJS)\monodll_hyperlnkcmn.obj \ + $(OBJS)\monodll_odcombocmn.obj \ + $(OBJS)\monodll_richtooltipcmn.obj \ + $(OBJS)\monodll_aboutdlgg.obj \ + $(OBJS)\monodll_bannerwindow.obj \ + $(OBJS)\monodll_bmpcboxg.obj \ + $(OBJS)\monodll_calctrlg.obj \ + $(OBJS)\monodll_commandlinkbuttong.obj \ + $(OBJS)\monodll_datavgen.obj \ + $(OBJS)\monodll_datectlg.obj \ + $(OBJS)\monodll_editlbox.obj \ + $(OBJS)\monodll_grid.obj \ + $(OBJS)\monodll_gridctrl.obj \ + $(OBJS)\monodll_grideditors.obj \ + $(OBJS)\monodll_gridsel.obj \ + $(OBJS)\monodll_helpext.obj \ + $(OBJS)\monodll_hyperlinkg.obj \ + $(OBJS)\monodll_laywin.obj \ + $(OBJS)\monodll_notifmsgg.obj \ + $(OBJS)\monodll_odcombo.obj \ + $(OBJS)\monodll_propdlg.obj \ + $(OBJS)\monodll_richtooltipg.obj \ + $(OBJS)\monodll_sashwin.obj \ + $(OBJS)\monodll_splash.obj \ + $(OBJS)\monodll_timectrlg.obj \ + $(OBJS)\monodll_tipdlg.obj \ + $(OBJS)\monodll_treelist.obj \ + $(OBJS)\monodll_wizard.obj \ + $(OBJS)\monodll_taskbarcmn.obj \ + $(OBJS)\monodll_aboutdlg.obj \ + $(OBJS)\monodll_notifmsg.obj \ + $(OBJS)\monodll_richtooltip.obj \ + $(OBJS)\monodll_sound.obj \ + $(OBJS)\monodll_taskbar.obj \ + $(OBJS)\monodll_joystick.obj \ + $(OBJS)\monodll_animateg.obj \ + $(OBJS)\monodll_bmpcbox.obj \ + $(OBJS)\monodll_calctrl.obj \ + $(OBJS)\monodll_commandlinkbutton.obj \ + $(OBJS)\monodll_datecontrols.obj \ + $(OBJS)\monodll_datectrl.obj \ + $(OBJS)\monodll_datetimectrl.obj \ + $(OBJS)\monodll_hyperlink.obj \ + $(OBJS)\monodll_timectrl.obj +!endif +!if "$(WXUNIV)" == "1" +____ADVANCED_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_animatecmn.obj \ + $(OBJS)\monodll_bmpcboxcmn.obj \ + $(OBJS)\monodll_calctrlcmn.obj \ + $(OBJS)\monodll_datavcmn.obj \ + $(OBJS)\monodll_gridcmn.obj \ + $(OBJS)\monodll_hyperlnkcmn.obj \ + $(OBJS)\monodll_odcombocmn.obj \ + $(OBJS)\monodll_richtooltipcmn.obj \ + $(OBJS)\monodll_aboutdlgg.obj \ + $(OBJS)\monodll_bannerwindow.obj \ + $(OBJS)\monodll_bmpcboxg.obj \ + $(OBJS)\monodll_calctrlg.obj \ + $(OBJS)\monodll_commandlinkbuttong.obj \ + $(OBJS)\monodll_datavgen.obj \ + $(OBJS)\monodll_datectlg.obj \ + $(OBJS)\monodll_editlbox.obj \ + $(OBJS)\monodll_grid.obj \ + $(OBJS)\monodll_gridctrl.obj \ + $(OBJS)\monodll_grideditors.obj \ + $(OBJS)\monodll_gridsel.obj \ + $(OBJS)\monodll_helpext.obj \ + $(OBJS)\monodll_hyperlinkg.obj \ + $(OBJS)\monodll_laywin.obj \ + $(OBJS)\monodll_notifmsgg.obj \ + $(OBJS)\monodll_odcombo.obj \ + $(OBJS)\monodll_propdlg.obj \ + $(OBJS)\monodll_richtooltipg.obj \ + $(OBJS)\monodll_sashwin.obj \ + $(OBJS)\monodll_splash.obj \ + $(OBJS)\monodll_timectrlg.obj \ + $(OBJS)\monodll_tipdlg.obj \ + $(OBJS)\monodll_treelist.obj \ + $(OBJS)\monodll_wizard.obj \ + $(OBJS)\monodll_taskbarcmn.obj \ + $(OBJS)\monodll_aboutdlg.obj \ + $(OBJS)\monodll_notifmsg.obj \ + $(OBJS)\monodll_richtooltip.obj \ + $(OBJS)\monodll_sound.obj \ + $(OBJS)\monodll_taskbar.obj \ + $(OBJS)\monodll_joystick.obj \ + $(OBJS)\monodll_animateg.obj +!endif +!if "$(USE_STC)" == "1" +__wxscintilla_library_link_DEP = $(__wxscintilla) +!endif +!if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "0" +__monolib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(USE_GUI)" == "1" +____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ + $(____CORE_SRC_FILENAMES_1_OBJECTS) \ + $(____ADVANCED_SRC_FILENAMES_1_OBJECTS) \ + $(OBJS)\monolib_mediactrlcmn.obj \ + $(OBJS)\monolib_mediactrl_am.obj \ + $(OBJS)\monolib_mediactrl_wmp10.obj \ + $(OBJS)\monolib_mediactrl_qt.obj \ + $(OBJS)\monolib_helpbest.obj \ + $(OBJS)\monolib_helpctrl.obj \ + $(OBJS)\monolib_helpdata.obj \ + $(OBJS)\monolib_helpdlg.obj \ + $(OBJS)\monolib_helpfrm.obj \ + $(OBJS)\monolib_helpwnd.obj \ + $(OBJS)\monolib_htmlcell.obj \ + $(OBJS)\monolib_htmlfilt.obj \ + $(OBJS)\monolib_htmlpars.obj \ + $(OBJS)\monolib_htmltag.obj \ + $(OBJS)\monolib_htmlwin.obj \ + $(OBJS)\monolib_htmprint.obj \ + $(OBJS)\monolib_m_dflist.obj \ + $(OBJS)\monolib_m_fonts.obj \ + $(OBJS)\monolib_m_hline.obj \ + $(OBJS)\monolib_m_image.obj \ + $(OBJS)\monolib_m_layout.obj \ + $(OBJS)\monolib_m_links.obj \ + $(OBJS)\monolib_m_list.obj \ + $(OBJS)\monolib_m_pre.obj \ + $(OBJS)\monolib_m_span.obj \ + $(OBJS)\monolib_m_style.obj \ + $(OBJS)\monolib_m_tables.obj \ + $(OBJS)\monolib_styleparams.obj \ + $(OBJS)\monolib_winpars.obj \ + $(OBJS)\monolib_htmllbox.obj \ + $(OBJS)\monolib_webview_ie.obj \ + $(OBJS)\monolib_webview.obj \ + $(OBJS)\monolib_webviewarchivehandler.obj \ + $(OBJS)\monolib_webviewfshandler.obj \ + $(OBJS)\monolib_debugrpt.obj \ + $(OBJS)\monolib_dbgrptg.obj \ + $(OBJS)\monolib_xh_animatctrl.obj \ + $(OBJS)\monolib_xh_bannerwindow.obj \ + $(OBJS)\monolib_xh_bmp.obj \ + $(OBJS)\monolib_xh_bmpcbox.obj \ + $(OBJS)\monolib_xh_bmpbt.obj \ + $(OBJS)\monolib_xh_bttn.obj \ + $(OBJS)\monolib_xh_cald.obj \ + $(OBJS)\monolib_xh_chckb.obj \ + $(OBJS)\monolib_xh_chckl.obj \ + $(OBJS)\monolib_xh_choic.obj \ + $(OBJS)\monolib_xh_choicbk.obj \ + $(OBJS)\monolib_xh_clrpicker.obj \ + $(OBJS)\monolib_xh_cmdlinkbn.obj \ + $(OBJS)\monolib_xh_collpane.obj \ + $(OBJS)\monolib_xh_combo.obj \ + $(OBJS)\monolib_xh_comboctrl.obj \ + $(OBJS)\monolib_xh_datectrl.obj \ + $(OBJS)\monolib_xh_dirpicker.obj \ + $(OBJS)\monolib_xh_dlg.obj \ + $(OBJS)\monolib_xh_editlbox.obj \ + $(OBJS)\monolib_xh_filectrl.obj \ + $(OBJS)\monolib_xh_filepicker.obj \ + $(OBJS)\monolib_xh_fontpicker.obj \ + $(OBJS)\monolib_xh_frame.obj \ + $(OBJS)\monolib_xh_gauge.obj \ + $(OBJS)\monolib_xh_gdctl.obj \ + $(OBJS)\monolib_xh_grid.obj \ + $(OBJS)\monolib_xh_html.obj \ + $(OBJS)\monolib_xh_hyperlink.obj \ + $(OBJS)\monolib_xh_listb.obj \ + $(OBJS)\monolib_xh_listbk.obj \ + $(OBJS)\monolib_xh_listc.obj \ + $(OBJS)\monolib_xh_mdi.obj \ + $(OBJS)\monolib_xh_menu.obj \ + $(OBJS)\monolib_xh_notbk.obj \ + $(OBJS)\monolib_xh_odcombo.obj \ + $(OBJS)\monolib_xh_panel.obj \ + $(OBJS)\monolib_xh_propdlg.obj \ + $(OBJS)\monolib_xh_radbt.obj \ + $(OBJS)\monolib_xh_radbx.obj \ + $(OBJS)\monolib_xh_scrol.obj \ + $(OBJS)\monolib_xh_scwin.obj \ + $(OBJS)\monolib_xh_htmllbox.obj \ + $(OBJS)\monolib_xh_sizer.obj \ + $(OBJS)\monolib_xh_slidr.obj \ + $(OBJS)\monolib_xh_spin.obj \ + $(OBJS)\monolib_xh_split.obj \ + $(OBJS)\monolib_xh_srchctrl.obj \ + $(OBJS)\monolib_xh_statbar.obj \ + $(OBJS)\monolib_xh_stbmp.obj \ + $(OBJS)\monolib_xh_stbox.obj \ + $(OBJS)\monolib_xh_stlin.obj \ + $(OBJS)\monolib_xh_sttxt.obj \ + $(OBJS)\monolib_xh_text.obj \ + $(OBJS)\monolib_xh_tglbtn.obj \ + $(OBJS)\monolib_xh_timectrl.obj \ + $(OBJS)\monolib_xh_toolb.obj \ + $(OBJS)\monolib_xh_toolbk.obj \ + $(OBJS)\monolib_xh_tree.obj \ + $(OBJS)\monolib_xh_treebk.obj \ + $(OBJS)\monolib_xh_unkwn.obj \ + $(OBJS)\monolib_xh_wizrd.obj \ + $(OBJS)\monolib_xmlres.obj \ + $(OBJS)\monolib_xmladv.obj \ + $(OBJS)\monolib_xmlrsall.obj \ + $(OBJS)\monolib_framemanager.obj \ + $(OBJS)\monolib_dockart.obj \ + $(OBJS)\monolib_floatpane.obj \ + $(OBJS)\monolib_auibook.obj \ + $(OBJS)\monolib_auibar.obj \ + $(OBJS)\monolib_tabmdi.obj \ + $(OBJS)\monolib_tabart.obj \ + $(OBJS)\monolib_xh_auinotbk.obj \ + $(OBJS)\monolib_advprops.obj \ + $(OBJS)\monolib_editors.obj \ + $(OBJS)\monolib_manager.obj \ + $(OBJS)\monolib_property.obj \ + $(OBJS)\monolib_propgrid.obj \ + $(OBJS)\monolib_propgridiface.obj \ + $(OBJS)\monolib_propgridpagestate.obj \ + $(OBJS)\monolib_props.obj \ + $(OBJS)\monolib_art_internal.obj \ + $(OBJS)\monolib_art_msw.obj \ + $(OBJS)\monolib_art_aui.obj \ + $(OBJS)\monolib_bar.obj \ + $(OBJS)\monolib_ribbon_buttonbar.obj \ + $(OBJS)\monolib_ribbon_control.obj \ + $(OBJS)\monolib_gallery.obj \ + $(OBJS)\monolib_page.obj \ + $(OBJS)\monolib_ribbon_panel.obj \ + $(OBJS)\monolib_ribbon_toolbar.obj \ + $(OBJS)\monolib_xh_ribbon.obj \ + $(OBJS)\monolib_richtextbuffer.obj \ + $(OBJS)\monolib_richtextctrl.obj \ + $(OBJS)\monolib_richtextformatdlg.obj \ + $(OBJS)\monolib_richtexthtml.obj \ + $(OBJS)\monolib_richtextimagedlg.obj \ + $(OBJS)\monolib_richtextprint.obj \ + $(OBJS)\monolib_richtextstyledlg.obj \ + $(OBJS)\monolib_richtextstyles.obj \ + $(OBJS)\monolib_richtextsymboldlg.obj \ + $(OBJS)\monolib_richtextxml.obj \ + $(OBJS)\monolib_xh_richtext.obj \ + $(OBJS)\monolib_stc.obj \ + $(OBJS)\monolib_PlatWX.obj \ + $(OBJS)\monolib_ScintillaWX.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "0" +____CORE_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_activex.obj \ + $(OBJS)\monolib_app.obj \ + $(OBJS)\monolib_bitmap.obj \ + $(OBJS)\monolib_brush.obj \ + $(OBJS)\monolib_caret.obj \ + $(OBJS)\monolib_clipbrd.obj \ + $(OBJS)\monolib_colour.obj \ + $(OBJS)\monolib_cursor.obj \ + $(OBJS)\monolib_data.obj \ + $(OBJS)\monolib_dc.obj \ + $(OBJS)\monolib_dcclient.obj \ + $(OBJS)\monolib_dcmemory.obj \ + $(OBJS)\monolib_dcprint.obj \ + $(OBJS)\monolib_dcscreen.obj \ + $(OBJS)\monolib_dialup.obj \ + $(OBJS)\monolib_dib.obj \ + $(OBJS)\monolib_display.obj \ + $(OBJS)\monolib_enhmeta.obj \ + $(OBJS)\monolib_font.obj \ + $(OBJS)\monolib_fontenum.obj \ + $(OBJS)\monolib_fontutil.obj \ + $(OBJS)\monolib_gdiimage.obj \ + $(OBJS)\monolib_gdiobj.obj \ + $(OBJS)\monolib_gdiplus.obj \ + $(OBJS)\monolib_graphics.obj \ + $(OBJS)\monolib_icon.obj \ + $(OBJS)\monolib_imaglist.obj \ + $(OBJS)\monolib_minifram.obj \ + $(OBJS)\monolib_nonownedwnd.obj \ + $(OBJS)\monolib_dataobj.obj \ + $(OBJS)\monolib_dropsrc.obj \ + $(OBJS)\monolib_droptgt.obj \ + $(OBJS)\monolib_oleutils.obj \ + $(OBJS)\monolib_safearray.obj \ + $(OBJS)\monolib_palette.obj \ + $(OBJS)\monolib_pen.obj \ + $(OBJS)\monolib_popupwin.obj \ + $(OBJS)\monolib_printdlg.obj \ + $(OBJS)\monolib_printwin.obj \ + $(OBJS)\monolib_region.obj \ + $(OBJS)\monolib_renderer.obj \ + $(OBJS)\monolib_settings.obj \ + $(OBJS)\monolib_textmeasure.obj \ + $(OBJS)\monolib_tooltip.obj \ + $(OBJS)\monolib_toplevel.obj \ + $(OBJS)\monolib_uiaction.obj \ + $(OBJS)\monolib_utilsgui.obj \ + $(OBJS)\monolib_utilswin.obj \ + $(OBJS)\monolib_uxtheme.obj \ + $(OBJS)\monolib_window.obj \ + $(OBJS)\monolib_helpchm.obj \ + $(OBJS)\monolib_helpwin.obj \ + $(OBJS)\monolib_automtn.obj \ + $(OBJS)\monolib_uuid.obj \ + $(OBJS)\monolib_clrpickerg.obj \ + $(OBJS)\monolib_collpaneg.obj \ + $(OBJS)\monolib_filepickerg.obj \ + $(OBJS)\monolib_fontpickerg.obj \ + $(OBJS)\monolib_generic_statusbr.obj \ + $(OBJS)\monolib_prntdlgg.obj \ + $(OBJS)\monolib_msw_accel.obj \ + $(OBJS)\monolib_anybutton.obj \ + $(OBJS)\monolib_artmsw.obj \ + $(OBJS)\monolib_msw_bmpbuttn.obj \ + $(OBJS)\monolib_msw_button.obj \ + $(OBJS)\monolib_msw_checkbox.obj \ + $(OBJS)\monolib_msw_choice.obj \ + $(OBJS)\monolib_colordlg.obj \ + $(OBJS)\monolib_combo.obj \ + $(OBJS)\monolib_msw_combobox.obj \ + $(OBJS)\monolib_msw_control.obj \ + $(OBJS)\monolib_msw_dialog.obj \ + $(OBJS)\monolib_dirdlg.obj \ + $(OBJS)\monolib_dragimag.obj \ + $(OBJS)\monolib_evtloop.obj \ + $(OBJS)\monolib_filedlg.obj \ + $(OBJS)\monolib_frame.obj \ + $(OBJS)\monolib_msw_gauge.obj \ + $(OBJS)\monolib_headerctrl.obj \ + $(OBJS)\monolib_iniconf.obj \ + $(OBJS)\monolib_msw_listbox.obj \ + $(OBJS)\monolib_msw_listctrl.obj \ + $(OBJS)\monolib_mdi.obj \ + $(OBJS)\monolib_msw_menu.obj \ + $(OBJS)\monolib_menuitem.obj \ + $(OBJS)\monolib_metafile.obj \ + $(OBJS)\monolib_msgdlg.obj \ + $(OBJS)\monolib_nativdlg.obj \ + $(OBJS)\monolib_nativewin.obj \ + $(OBJS)\monolib_msw_notebook.obj \ + $(OBJS)\monolib_access.obj \ + $(OBJS)\monolib_ownerdrw.obj \ + $(OBJS)\monolib_msw_panel.obj \ + $(OBJS)\monolib_progdlg.obj \ + $(OBJS)\monolib_msw_radiobox.obj \ + $(OBJS)\monolib_msw_radiobut.obj \ + $(OBJS)\monolib_richmsgdlg.obj \ + $(OBJS)\monolib_msw_scrolbar.obj \ + $(OBJS)\monolib_msw_slider.obj \ + $(OBJS)\monolib_msw_spinbutt.obj \ + $(OBJS)\monolib_spinctrl.obj \ + $(OBJS)\monolib_msw_statbmp.obj \ + $(OBJS)\monolib_msw_statbox.obj \ + $(OBJS)\monolib_statusbar.obj \ + $(OBJS)\monolib_msw_statline.obj \ + $(OBJS)\monolib_msw_stattext.obj \ + $(OBJS)\monolib_msw_toolbar.obj \ + $(OBJS)\monolib_msw_textctrl.obj \ + $(OBJS)\monolib_textentry.obj \ + $(OBJS)\monolib_msw_tglbtn.obj \ + $(OBJS)\monolib_treectrl.obj \ + $(OBJS)\monolib_msw_checklst.obj \ + $(OBJS)\monolib_msw_fdrepdlg.obj \ + $(OBJS)\monolib_fontdlg.obj \ + $(OBJS)\monolib_accelcmn.obj \ + $(OBJS)\monolib_accesscmn.obj \ + $(OBJS)\monolib_anidecod.obj \ + $(OBJS)\monolib_affinematrix2d.obj \ + $(OBJS)\monolib_appcmn.obj \ + $(OBJS)\monolib_artprov.obj \ + $(OBJS)\monolib_artstd.obj \ + $(OBJS)\monolib_arttango.obj \ + $(OBJS)\monolib_bmpbase.obj \ + $(OBJS)\monolib_bmpbtncmn.obj \ + $(OBJS)\monolib_bookctrl.obj \ + $(OBJS)\monolib_btncmn.obj \ + $(OBJS)\monolib_cairo.obj \ + $(OBJS)\monolib_checkboxcmn.obj \ + $(OBJS)\monolib_checklstcmn.obj \ + $(OBJS)\monolib_choiccmn.obj \ + $(OBJS)\monolib_clipcmn.obj \ + $(OBJS)\monolib_clrpickercmn.obj \ + $(OBJS)\monolib_colourcmn.obj \ + $(OBJS)\monolib_colourdata.obj \ + $(OBJS)\monolib_combocmn.obj \ + $(OBJS)\monolib_cmdproc.obj \ + $(OBJS)\monolib_cmndata.obj \ + $(OBJS)\monolib_containr.obj \ + $(OBJS)\monolib_cshelp.obj \ + $(OBJS)\monolib_ctrlcmn.obj \ + $(OBJS)\monolib_ctrlsub.obj \ + $(OBJS)\monolib_dcbase.obj \ + $(OBJS)\monolib_dcbufcmn.obj \ + $(OBJS)\monolib_dcgraph.obj \ + $(OBJS)\monolib_dcsvg.obj \ + $(OBJS)\monolib_dirctrlcmn.obj \ + $(OBJS)\monolib_dlgcmn.obj \ + $(OBJS)\monolib_dndcmn.obj \ + $(OBJS)\monolib_dobjcmn.obj \ + $(OBJS)\monolib_docmdi.obj \ + $(OBJS)\monolib_docview.obj \ + $(OBJS)\monolib_dpycmn.obj \ + $(OBJS)\monolib_dseldlg.obj \ + $(OBJS)\monolib_effects.obj \ + $(OBJS)\monolib_fddlgcmn.obj \ + $(OBJS)\monolib_filectrlcmn.obj \ + $(OBJS)\monolib_filehistorycmn.obj \ + $(OBJS)\monolib_filepickercmn.obj \ + $(OBJS)\monolib_fontpickercmn.obj \ + $(OBJS)\monolib_fldlgcmn.obj \ + $(OBJS)\monolib_fontcmn.obj \ + $(OBJS)\monolib_fontdata.obj \ + $(OBJS)\monolib_graphicc.obj \ + $(OBJS)\monolib_fontenumcmn.obj \ + $(OBJS)\monolib_fontmap.obj \ + $(OBJS)\monolib_fontutilcmn.obj \ + $(OBJS)\monolib_framecmn.obj \ + $(OBJS)\monolib_gaugecmn.obj \ + $(OBJS)\monolib_gbsizer.obj \ + $(OBJS)\monolib_gdicmn.obj \ + $(OBJS)\monolib_geometry.obj \ + $(OBJS)\monolib_gifdecod.obj \ + $(OBJS)\monolib_graphcmn.obj \ + $(OBJS)\monolib_headercolcmn.obj \ + $(OBJS)\monolib_headerctrlcmn.obj \ + $(OBJS)\monolib_helpbase.obj \ + $(OBJS)\monolib_iconbndl.obj \ + $(OBJS)\monolib_imagall.obj \ + $(OBJS)\monolib_imagbmp.obj \ + $(OBJS)\monolib_image.obj \ + $(OBJS)\monolib_imagfill.obj \ + $(OBJS)\monolib_imaggif.obj \ + $(OBJS)\monolib_imagiff.obj \ + $(OBJS)\monolib_imagjpeg.obj \ + $(OBJS)\monolib_imagpcx.obj \ + $(OBJS)\monolib_imagpng.obj \ + $(OBJS)\monolib_imagpnm.obj \ + $(OBJS)\monolib_imagtga.obj \ + $(OBJS)\monolib_imagtiff.obj \ + $(OBJS)\monolib_imagxpm.obj \ + $(OBJS)\monolib_layout.obj \ + $(OBJS)\monolib_lboxcmn.obj \ + $(OBJS)\monolib_listctrlcmn.obj \ + $(OBJS)\monolib_markupparser.obj \ + $(OBJS)\monolib_matrix.obj \ + $(OBJS)\monolib_menucmn.obj \ + $(OBJS)\monolib_modalhook.obj \ + $(OBJS)\monolib_mousemanager.obj \ + $(OBJS)\monolib_nbkbase.obj \ + $(OBJS)\monolib_overlaycmn.obj \ + $(OBJS)\monolib_ownerdrwcmn.obj \ + $(OBJS)\monolib_paper.obj \ + $(OBJS)\monolib_panelcmn.obj \ + $(OBJS)\monolib_persist.obj \ + $(OBJS)\monolib_pickerbase.obj \ + $(OBJS)\monolib_popupcmn.obj \ + $(OBJS)\monolib_preferencescmn.obj \ + $(OBJS)\monolib_prntbase.obj \ + $(OBJS)\monolib_quantize.obj \ + $(OBJS)\monolib_radiobtncmn.obj \ + $(OBJS)\monolib_radiocmn.obj \ + $(OBJS)\monolib_rearrangectrl.obj \ + $(OBJS)\monolib_rendcmn.obj \ + $(OBJS)\monolib_rgncmn.obj \ + $(OBJS)\monolib_scrolbarcmn.obj \ + $(OBJS)\monolib_settcmn.obj \ + $(OBJS)\monolib_sizer.obj \ + $(OBJS)\monolib_slidercmn.obj \ + $(OBJS)\monolib_spinbtncmn.obj \ + $(OBJS)\monolib_spinctrlcmn.obj \ + $(OBJS)\monolib_srchcmn.obj \ + $(OBJS)\monolib_statbar.obj \ + $(OBJS)\monolib_statbmpcmn.obj \ + $(OBJS)\monolib_statboxcmn.obj \ + $(OBJS)\monolib_statlinecmn.obj \ + $(OBJS)\monolib_stattextcmn.obj \ + $(OBJS)\monolib_stockitem.obj \ + $(OBJS)\monolib_tbarbase.obj \ + $(OBJS)\monolib_textcmn.obj \ + $(OBJS)\monolib_textentrycmn.obj \ + $(OBJS)\monolib_textmeasurecmn.obj \ + $(OBJS)\monolib_toplvcmn.obj \ + $(OBJS)\monolib_treebase.obj \ + $(OBJS)\monolib_uiactioncmn.obj \ + $(OBJS)\monolib_valgen.obj \ + $(OBJS)\monolib_validate.obj \ + $(OBJS)\monolib_valtext.obj \ + $(OBJS)\monolib_valnum.obj \ + $(OBJS)\monolib_wincmn.obj \ + $(OBJS)\monolib_windowid.obj \ + $(OBJS)\monolib_wrapsizer.obj \ + $(OBJS)\monolib_xpmdecod.obj \ + $(OBJS)\monolib_busyinfo.obj \ + $(OBJS)\monolib_generic_buttonbar.obj \ + $(OBJS)\monolib_choicdgg.obj \ + $(OBJS)\monolib_choicbkg.obj \ + $(OBJS)\monolib_combog.obj \ + $(OBJS)\monolib_dcpsg.obj \ + $(OBJS)\monolib_dirctrlg.obj \ + $(OBJS)\monolib_dragimgg.obj \ + $(OBJS)\monolib_filectrlg.obj \ + $(OBJS)\monolib_headerctrlg.obj \ + $(OBJS)\monolib_infobar.obj \ + $(OBJS)\monolib_listbkg.obj \ + $(OBJS)\monolib_logg.obj \ + $(OBJS)\monolib_markuptext.obj \ + $(OBJS)\monolib_msgdlgg.obj \ + $(OBJS)\monolib_numdlgg.obj \ + $(OBJS)\monolib_progdlgg.obj \ + $(OBJS)\monolib_preferencesg.obj \ + $(OBJS)\monolib_printps.obj \ + $(OBJS)\monolib_renderg.obj \ + $(OBJS)\monolib_richmsgdlgg.obj \ + $(OBJS)\monolib_scrlwing.obj \ + $(OBJS)\monolib_selstore.obj \ + $(OBJS)\monolib_spinctlg.obj \ + $(OBJS)\monolib_splitter.obj \ + $(OBJS)\monolib_srchctlg.obj \ + $(OBJS)\monolib_statbmpg.obj \ + $(OBJS)\monolib_stattextg.obj \ + $(OBJS)\monolib_textdlgg.obj \ + $(OBJS)\monolib_tipwin.obj \ + $(OBJS)\monolib_toolbkg.obj \ + $(OBJS)\monolib_treectlg.obj \ + $(OBJS)\monolib_treebkg.obj \ + $(OBJS)\monolib_vlbox.obj \ + $(OBJS)\monolib_vscroll.obj \ + $(OBJS)\monolib_xmlreshandler.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "1" +____CORE_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_activex.obj \ + $(OBJS)\monolib_app.obj \ + $(OBJS)\monolib_bitmap.obj \ + $(OBJS)\monolib_brush.obj \ + $(OBJS)\monolib_caret.obj \ + $(OBJS)\monolib_clipbrd.obj \ + $(OBJS)\monolib_colour.obj \ + $(OBJS)\monolib_cursor.obj \ + $(OBJS)\monolib_data.obj \ + $(OBJS)\monolib_dc.obj \ + $(OBJS)\monolib_dcclient.obj \ + $(OBJS)\monolib_dcmemory.obj \ + $(OBJS)\monolib_dcprint.obj \ + $(OBJS)\monolib_dcscreen.obj \ + $(OBJS)\monolib_dialup.obj \ + $(OBJS)\monolib_dib.obj \ + $(OBJS)\monolib_display.obj \ + $(OBJS)\monolib_enhmeta.obj \ + $(OBJS)\monolib_font.obj \ + $(OBJS)\monolib_fontenum.obj \ + $(OBJS)\monolib_fontutil.obj \ + $(OBJS)\monolib_gdiimage.obj \ + $(OBJS)\monolib_gdiobj.obj \ + $(OBJS)\monolib_gdiplus.obj \ + $(OBJS)\monolib_graphics.obj \ + $(OBJS)\monolib_icon.obj \ + $(OBJS)\monolib_imaglist.obj \ + $(OBJS)\monolib_minifram.obj \ + $(OBJS)\monolib_nonownedwnd.obj \ + $(OBJS)\monolib_dataobj.obj \ + $(OBJS)\monolib_dropsrc.obj \ + $(OBJS)\monolib_droptgt.obj \ + $(OBJS)\monolib_oleutils.obj \ + $(OBJS)\monolib_safearray.obj \ + $(OBJS)\monolib_palette.obj \ + $(OBJS)\monolib_pen.obj \ + $(OBJS)\monolib_popupwin.obj \ + $(OBJS)\monolib_printdlg.obj \ + $(OBJS)\monolib_printwin.obj \ + $(OBJS)\monolib_region.obj \ + $(OBJS)\monolib_renderer.obj \ + $(OBJS)\monolib_settings.obj \ + $(OBJS)\monolib_textmeasure.obj \ + $(OBJS)\monolib_tooltip.obj \ + $(OBJS)\monolib_toplevel.obj \ + $(OBJS)\monolib_uiaction.obj \ + $(OBJS)\monolib_utilsgui.obj \ + $(OBJS)\monolib_utilswin.obj \ + $(OBJS)\monolib_uxtheme.obj \ + $(OBJS)\monolib_window.obj \ + $(OBJS)\monolib_helpchm.obj \ + $(OBJS)\monolib_helpwin.obj \ + $(OBJS)\monolib_automtn.obj \ + $(OBJS)\monolib_uuid.obj \ + $(OBJS)\monolib_evtloop.obj \ + $(OBJS)\monolib_generic_accel.obj \ + $(OBJS)\monolib_clrpickerg.obj \ + $(OBJS)\monolib_collpaneg.obj \ + $(OBJS)\monolib_colrdlgg.obj \ + $(OBJS)\monolib_dirdlgg.obj \ + $(OBJS)\monolib_generic_fdrepdlg.obj \ + $(OBJS)\monolib_filedlgg.obj \ + $(OBJS)\monolib_filepickerg.obj \ + $(OBJS)\monolib_fontdlgg.obj \ + $(OBJS)\monolib_fontpickerg.obj \ + $(OBJS)\monolib_generic_listctrl.obj \ + $(OBJS)\monolib_mdig.obj \ + $(OBJS)\monolib_prntdlgg.obj \ + $(OBJS)\monolib_univ_bmpbuttn.obj \ + $(OBJS)\monolib_univ_button.obj \ + $(OBJS)\monolib_univ_checkbox.obj \ + $(OBJS)\monolib_univ_checklst.obj \ + $(OBJS)\monolib_univ_choice.obj \ + $(OBJS)\monolib_univ_combobox.obj \ + $(OBJS)\monolib_univ_control.obj \ + $(OBJS)\monolib_ctrlrend.obj \ + $(OBJS)\monolib_univ_dialog.obj \ + $(OBJS)\monolib_framuniv.obj \ + $(OBJS)\monolib_univ_gauge.obj \ + $(OBJS)\monolib_inpcons.obj \ + $(OBJS)\monolib_inphand.obj \ + $(OBJS)\monolib_univ_listbox.obj \ + $(OBJS)\monolib_univ_menu.obj \ + $(OBJS)\monolib_univ_notebook.obj \ + $(OBJS)\monolib_univ_radiobox.obj \ + $(OBJS)\monolib_univ_radiobut.obj \ + $(OBJS)\monolib_scrarrow.obj \ + $(OBJS)\monolib_univ_scrolbar.obj \ + $(OBJS)\monolib_scrthumb.obj \ + $(OBJS)\monolib_settingsuniv.obj \ + $(OBJS)\monolib_univ_slider.obj \ + $(OBJS)\monolib_univ_spinbutt.obj \ + $(OBJS)\monolib_univ_statbmp.obj \ + $(OBJS)\monolib_univ_statbox.obj \ + $(OBJS)\monolib_univ_statline.obj \ + $(OBJS)\monolib_univ_stattext.obj \ + $(OBJS)\monolib_univ_statusbr.obj \ + $(OBJS)\monolib_stdrend.obj \ + $(OBJS)\monolib_univ_textctrl.obj \ + $(OBJS)\monolib_univ_tglbtn.obj \ + $(OBJS)\monolib_theme.obj \ + $(OBJS)\monolib_univ_toolbar.obj \ + $(OBJS)\monolib_topluniv.obj \ + $(OBJS)\monolib_winuniv.obj \ + $(OBJS)\monolib_gtk.obj \ + $(OBJS)\monolib_metal.obj \ + $(OBJS)\monolib_mono.obj \ + $(OBJS)\monolib_win32.obj \ + $(OBJS)\monolib_accelcmn.obj \ + $(OBJS)\monolib_accesscmn.obj \ + $(OBJS)\monolib_anidecod.obj \ + $(OBJS)\monolib_affinematrix2d.obj \ + $(OBJS)\monolib_appcmn.obj \ + $(OBJS)\monolib_artprov.obj \ + $(OBJS)\monolib_artstd.obj \ + $(OBJS)\monolib_arttango.obj \ + $(OBJS)\monolib_bmpbase.obj \ + $(OBJS)\monolib_bmpbtncmn.obj \ + $(OBJS)\monolib_bookctrl.obj \ + $(OBJS)\monolib_btncmn.obj \ + $(OBJS)\monolib_cairo.obj \ + $(OBJS)\monolib_checkboxcmn.obj \ + $(OBJS)\monolib_checklstcmn.obj \ + $(OBJS)\monolib_choiccmn.obj \ + $(OBJS)\monolib_clipcmn.obj \ + $(OBJS)\monolib_clrpickercmn.obj \ + $(OBJS)\monolib_colourcmn.obj \ + $(OBJS)\monolib_colourdata.obj \ + $(OBJS)\monolib_combocmn.obj \ + $(OBJS)\monolib_cmdproc.obj \ + $(OBJS)\monolib_cmndata.obj \ + $(OBJS)\monolib_containr.obj \ + $(OBJS)\monolib_cshelp.obj \ + $(OBJS)\monolib_ctrlcmn.obj \ + $(OBJS)\monolib_ctrlsub.obj \ + $(OBJS)\monolib_dcbase.obj \ + $(OBJS)\monolib_dcbufcmn.obj \ + $(OBJS)\monolib_dcgraph.obj \ + $(OBJS)\monolib_dcsvg.obj \ + $(OBJS)\monolib_dirctrlcmn.obj \ + $(OBJS)\monolib_dlgcmn.obj \ + $(OBJS)\monolib_dndcmn.obj \ + $(OBJS)\monolib_dobjcmn.obj \ + $(OBJS)\monolib_docmdi.obj \ + $(OBJS)\monolib_docview.obj \ + $(OBJS)\monolib_dpycmn.obj \ + $(OBJS)\monolib_dseldlg.obj \ + $(OBJS)\monolib_effects.obj \ + $(OBJS)\monolib_fddlgcmn.obj \ + $(OBJS)\monolib_filectrlcmn.obj \ + $(OBJS)\monolib_filehistorycmn.obj \ + $(OBJS)\monolib_filepickercmn.obj \ + $(OBJS)\monolib_fontpickercmn.obj \ + $(OBJS)\monolib_fldlgcmn.obj \ + $(OBJS)\monolib_fontcmn.obj \ + $(OBJS)\monolib_fontdata.obj \ + $(OBJS)\monolib_graphicc.obj \ + $(OBJS)\monolib_fontenumcmn.obj \ + $(OBJS)\monolib_fontmap.obj \ + $(OBJS)\monolib_fontutilcmn.obj \ + $(OBJS)\monolib_framecmn.obj \ + $(OBJS)\monolib_gaugecmn.obj \ + $(OBJS)\monolib_gbsizer.obj \ + $(OBJS)\monolib_gdicmn.obj \ + $(OBJS)\monolib_geometry.obj \ + $(OBJS)\monolib_gifdecod.obj \ + $(OBJS)\monolib_graphcmn.obj \ + $(OBJS)\monolib_headercolcmn.obj \ + $(OBJS)\monolib_headerctrlcmn.obj \ + $(OBJS)\monolib_helpbase.obj \ + $(OBJS)\monolib_iconbndl.obj \ + $(OBJS)\monolib_imagall.obj \ + $(OBJS)\monolib_imagbmp.obj \ + $(OBJS)\monolib_image.obj \ + $(OBJS)\monolib_imagfill.obj \ + $(OBJS)\monolib_imaggif.obj \ + $(OBJS)\monolib_imagiff.obj \ + $(OBJS)\monolib_imagjpeg.obj \ + $(OBJS)\monolib_imagpcx.obj \ + $(OBJS)\monolib_imagpng.obj \ + $(OBJS)\monolib_imagpnm.obj \ + $(OBJS)\monolib_imagtga.obj \ + $(OBJS)\monolib_imagtiff.obj \ + $(OBJS)\monolib_imagxpm.obj \ + $(OBJS)\monolib_layout.obj \ + $(OBJS)\monolib_lboxcmn.obj \ + $(OBJS)\monolib_listctrlcmn.obj \ + $(OBJS)\monolib_markupparser.obj \ + $(OBJS)\monolib_matrix.obj \ + $(OBJS)\monolib_menucmn.obj \ + $(OBJS)\monolib_modalhook.obj \ + $(OBJS)\monolib_mousemanager.obj \ + $(OBJS)\monolib_nbkbase.obj \ + $(OBJS)\monolib_overlaycmn.obj \ + $(OBJS)\monolib_ownerdrwcmn.obj \ + $(OBJS)\monolib_paper.obj \ + $(OBJS)\monolib_panelcmn.obj \ + $(OBJS)\monolib_persist.obj \ + $(OBJS)\monolib_pickerbase.obj \ + $(OBJS)\monolib_popupcmn.obj \ + $(OBJS)\monolib_preferencescmn.obj \ + $(OBJS)\monolib_prntbase.obj \ + $(OBJS)\monolib_quantize.obj \ + $(OBJS)\monolib_radiobtncmn.obj \ + $(OBJS)\monolib_radiocmn.obj \ + $(OBJS)\monolib_rearrangectrl.obj \ + $(OBJS)\monolib_rendcmn.obj \ + $(OBJS)\monolib_rgncmn.obj \ + $(OBJS)\monolib_scrolbarcmn.obj \ + $(OBJS)\monolib_settcmn.obj \ + $(OBJS)\monolib_sizer.obj \ + $(OBJS)\monolib_slidercmn.obj \ + $(OBJS)\monolib_spinbtncmn.obj \ + $(OBJS)\monolib_spinctrlcmn.obj \ + $(OBJS)\monolib_srchcmn.obj \ + $(OBJS)\monolib_statbar.obj \ + $(OBJS)\monolib_statbmpcmn.obj \ + $(OBJS)\monolib_statboxcmn.obj \ + $(OBJS)\monolib_statlinecmn.obj \ + $(OBJS)\monolib_stattextcmn.obj \ + $(OBJS)\monolib_stockitem.obj \ + $(OBJS)\monolib_tbarbase.obj \ + $(OBJS)\monolib_textcmn.obj \ + $(OBJS)\monolib_textentrycmn.obj \ + $(OBJS)\monolib_textmeasurecmn.obj \ + $(OBJS)\monolib_toplvcmn.obj \ + $(OBJS)\monolib_treebase.obj \ + $(OBJS)\monolib_uiactioncmn.obj \ + $(OBJS)\monolib_valgen.obj \ + $(OBJS)\monolib_validate.obj \ + $(OBJS)\monolib_valtext.obj \ + $(OBJS)\monolib_valnum.obj \ + $(OBJS)\monolib_wincmn.obj \ + $(OBJS)\monolib_windowid.obj \ + $(OBJS)\monolib_wrapsizer.obj \ + $(OBJS)\monolib_xpmdecod.obj \ + $(OBJS)\monolib_busyinfo.obj \ + $(OBJS)\monolib_generic_buttonbar.obj \ + $(OBJS)\monolib_choicdgg.obj \ + $(OBJS)\monolib_choicbkg.obj \ + $(OBJS)\monolib_combog.obj \ + $(OBJS)\monolib_dcpsg.obj \ + $(OBJS)\monolib_dirctrlg.obj \ + $(OBJS)\monolib_dragimgg.obj \ + $(OBJS)\monolib_filectrlg.obj \ + $(OBJS)\monolib_headerctrlg.obj \ + $(OBJS)\monolib_infobar.obj \ + $(OBJS)\monolib_listbkg.obj \ + $(OBJS)\monolib_logg.obj \ + $(OBJS)\monolib_markuptext.obj \ + $(OBJS)\monolib_msgdlgg.obj \ + $(OBJS)\monolib_numdlgg.obj \ + $(OBJS)\monolib_progdlgg.obj \ + $(OBJS)\monolib_preferencesg.obj \ + $(OBJS)\monolib_printps.obj \ + $(OBJS)\monolib_renderg.obj \ + $(OBJS)\monolib_richmsgdlgg.obj \ + $(OBJS)\monolib_scrlwing.obj \ + $(OBJS)\monolib_selstore.obj \ + $(OBJS)\monolib_spinctlg.obj \ + $(OBJS)\monolib_splitter.obj \ + $(OBJS)\monolib_srchctlg.obj \ + $(OBJS)\monolib_statbmpg.obj \ + $(OBJS)\monolib_stattextg.obj \ + $(OBJS)\monolib_textdlgg.obj \ + $(OBJS)\monolib_tipwin.obj \ + $(OBJS)\monolib_toolbkg.obj \ + $(OBJS)\monolib_treectlg.obj \ + $(OBJS)\monolib_treebkg.obj \ + $(OBJS)\monolib_vlbox.obj \ + $(OBJS)\monolib_vscroll.obj \ + $(OBJS)\monolib_xmlreshandler.obj +!endif +!if "$(WXUNIV)" == "0" +____ADVANCED_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_animatecmn.obj \ + $(OBJS)\monolib_bmpcboxcmn.obj \ + $(OBJS)\monolib_calctrlcmn.obj \ + $(OBJS)\monolib_datavcmn.obj \ + $(OBJS)\monolib_gridcmn.obj \ + $(OBJS)\monolib_hyperlnkcmn.obj \ + $(OBJS)\monolib_odcombocmn.obj \ + $(OBJS)\monolib_richtooltipcmn.obj \ + $(OBJS)\monolib_aboutdlgg.obj \ + $(OBJS)\monolib_bannerwindow.obj \ + $(OBJS)\monolib_bmpcboxg.obj \ + $(OBJS)\monolib_calctrlg.obj \ + $(OBJS)\monolib_commandlinkbuttong.obj \ + $(OBJS)\monolib_datavgen.obj \ + $(OBJS)\monolib_datectlg.obj \ + $(OBJS)\monolib_editlbox.obj \ + $(OBJS)\monolib_grid.obj \ + $(OBJS)\monolib_gridctrl.obj \ + $(OBJS)\monolib_grideditors.obj \ + $(OBJS)\monolib_gridsel.obj \ + $(OBJS)\monolib_helpext.obj \ + $(OBJS)\monolib_hyperlinkg.obj \ + $(OBJS)\monolib_laywin.obj \ + $(OBJS)\monolib_notifmsgg.obj \ + $(OBJS)\monolib_odcombo.obj \ + $(OBJS)\monolib_propdlg.obj \ + $(OBJS)\monolib_richtooltipg.obj \ + $(OBJS)\monolib_sashwin.obj \ + $(OBJS)\monolib_splash.obj \ + $(OBJS)\monolib_timectrlg.obj \ + $(OBJS)\monolib_tipdlg.obj \ + $(OBJS)\monolib_treelist.obj \ + $(OBJS)\monolib_wizard.obj \ + $(OBJS)\monolib_taskbarcmn.obj \ + $(OBJS)\monolib_aboutdlg.obj \ + $(OBJS)\monolib_notifmsg.obj \ + $(OBJS)\monolib_richtooltip.obj \ + $(OBJS)\monolib_sound.obj \ + $(OBJS)\monolib_taskbar.obj \ + $(OBJS)\monolib_joystick.obj \ + $(OBJS)\monolib_animateg.obj \ + $(OBJS)\monolib_bmpcbox.obj \ + $(OBJS)\monolib_calctrl.obj \ + $(OBJS)\monolib_commandlinkbutton.obj \ + $(OBJS)\monolib_datecontrols.obj \ + $(OBJS)\monolib_datectrl.obj \ + $(OBJS)\monolib_datetimectrl.obj \ + $(OBJS)\monolib_hyperlink.obj \ + $(OBJS)\monolib_timectrl.obj +!endif +!if "$(WXUNIV)" == "1" +____ADVANCED_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_animatecmn.obj \ + $(OBJS)\monolib_bmpcboxcmn.obj \ + $(OBJS)\monolib_calctrlcmn.obj \ + $(OBJS)\monolib_datavcmn.obj \ + $(OBJS)\monolib_gridcmn.obj \ + $(OBJS)\monolib_hyperlnkcmn.obj \ + $(OBJS)\monolib_odcombocmn.obj \ + $(OBJS)\monolib_richtooltipcmn.obj \ + $(OBJS)\monolib_aboutdlgg.obj \ + $(OBJS)\monolib_bannerwindow.obj \ + $(OBJS)\monolib_bmpcboxg.obj \ + $(OBJS)\monolib_calctrlg.obj \ + $(OBJS)\monolib_commandlinkbuttong.obj \ + $(OBJS)\monolib_datavgen.obj \ + $(OBJS)\monolib_datectlg.obj \ + $(OBJS)\monolib_editlbox.obj \ + $(OBJS)\monolib_grid.obj \ + $(OBJS)\monolib_gridctrl.obj \ + $(OBJS)\monolib_grideditors.obj \ + $(OBJS)\monolib_gridsel.obj \ + $(OBJS)\monolib_helpext.obj \ + $(OBJS)\monolib_hyperlinkg.obj \ + $(OBJS)\monolib_laywin.obj \ + $(OBJS)\monolib_notifmsgg.obj \ + $(OBJS)\monolib_odcombo.obj \ + $(OBJS)\monolib_propdlg.obj \ + $(OBJS)\monolib_richtooltipg.obj \ + $(OBJS)\monolib_sashwin.obj \ + $(OBJS)\monolib_splash.obj \ + $(OBJS)\monolib_timectrlg.obj \ + $(OBJS)\monolib_tipdlg.obj \ + $(OBJS)\monolib_treelist.obj \ + $(OBJS)\monolib_wizard.obj \ + $(OBJS)\monolib_taskbarcmn.obj \ + $(OBJS)\monolib_aboutdlg.obj \ + $(OBJS)\monolib_notifmsg.obj \ + $(OBJS)\monolib_richtooltip.obj \ + $(OBJS)\monolib_sound.obj \ + $(OBJS)\monolib_taskbar.obj \ + $(OBJS)\monolib_joystick.obj \ + $(OBJS)\monolib_animateg.obj +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +__basedll___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +__baselib___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(SHARED)" == "1" +____wxbase_namedll_DEP = $(__basedll___depname) +!endif +!if "$(SHARED)" == "0" +____wxbase_namelib_DEP = $(__baselib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +__netdll___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +__netlib___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib +!endif +!if "$(SHARED)" == "1" +____wxnet_namedll_DEP = $(__netdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxnet_namelib_DEP = $(__netlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" +__coredll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "0" +____CORE_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\coredll_activex.obj \ + $(OBJS)\coredll_app.obj \ + $(OBJS)\coredll_bitmap.obj \ + $(OBJS)\coredll_brush.obj \ + $(OBJS)\coredll_caret.obj \ + $(OBJS)\coredll_clipbrd.obj \ + $(OBJS)\coredll_colour.obj \ + $(OBJS)\coredll_cursor.obj \ + $(OBJS)\coredll_data.obj \ + $(OBJS)\coredll_dc.obj \ + $(OBJS)\coredll_dcclient.obj \ + $(OBJS)\coredll_dcmemory.obj \ + $(OBJS)\coredll_dcprint.obj \ + $(OBJS)\coredll_dcscreen.obj \ + $(OBJS)\coredll_dialup.obj \ + $(OBJS)\coredll_dib.obj \ + $(OBJS)\coredll_display.obj \ + $(OBJS)\coredll_enhmeta.obj \ + $(OBJS)\coredll_font.obj \ + $(OBJS)\coredll_fontenum.obj \ + $(OBJS)\coredll_fontutil.obj \ + $(OBJS)\coredll_gdiimage.obj \ + $(OBJS)\coredll_gdiobj.obj \ + $(OBJS)\coredll_gdiplus.obj \ + $(OBJS)\coredll_graphics.obj \ + $(OBJS)\coredll_icon.obj \ + $(OBJS)\coredll_imaglist.obj \ + $(OBJS)\coredll_minifram.obj \ + $(OBJS)\coredll_nonownedwnd.obj \ + $(OBJS)\coredll_dataobj.obj \ + $(OBJS)\coredll_dropsrc.obj \ + $(OBJS)\coredll_droptgt.obj \ + $(OBJS)\coredll_oleutils.obj \ + $(OBJS)\coredll_safearray.obj \ + $(OBJS)\coredll_palette.obj \ + $(OBJS)\coredll_pen.obj \ + $(OBJS)\coredll_popupwin.obj \ + $(OBJS)\coredll_printdlg.obj \ + $(OBJS)\coredll_printwin.obj \ + $(OBJS)\coredll_region.obj \ + $(OBJS)\coredll_renderer.obj \ + $(OBJS)\coredll_settings.obj \ + $(OBJS)\coredll_textmeasure.obj \ + $(OBJS)\coredll_tooltip.obj \ + $(OBJS)\coredll_toplevel.obj \ + $(OBJS)\coredll_uiaction.obj \ + $(OBJS)\coredll_utilsgui.obj \ + $(OBJS)\coredll_utilswin.obj \ + $(OBJS)\coredll_uxtheme.obj \ + $(OBJS)\coredll_window.obj \ + $(OBJS)\coredll_helpchm.obj \ + $(OBJS)\coredll_helpwin.obj \ + $(OBJS)\coredll_automtn.obj \ + $(OBJS)\coredll_uuid.obj \ + $(OBJS)\coredll_clrpickerg.obj \ + $(OBJS)\coredll_collpaneg.obj \ + $(OBJS)\coredll_filepickerg.obj \ + $(OBJS)\coredll_fontpickerg.obj \ + $(OBJS)\coredll_generic_statusbr.obj \ + $(OBJS)\coredll_prntdlgg.obj \ + $(OBJS)\coredll_msw_accel.obj \ + $(OBJS)\coredll_anybutton.obj \ + $(OBJS)\coredll_artmsw.obj \ + $(OBJS)\coredll_msw_bmpbuttn.obj \ + $(OBJS)\coredll_msw_button.obj \ + $(OBJS)\coredll_msw_checkbox.obj \ + $(OBJS)\coredll_msw_choice.obj \ + $(OBJS)\coredll_colordlg.obj \ + $(OBJS)\coredll_combo.obj \ + $(OBJS)\coredll_msw_combobox.obj \ + $(OBJS)\coredll_msw_control.obj \ + $(OBJS)\coredll_msw_dialog.obj \ + $(OBJS)\coredll_dirdlg.obj \ + $(OBJS)\coredll_dragimag.obj \ + $(OBJS)\coredll_evtloop.obj \ + $(OBJS)\coredll_filedlg.obj \ + $(OBJS)\coredll_frame.obj \ + $(OBJS)\coredll_msw_gauge.obj \ + $(OBJS)\coredll_headerctrl.obj \ + $(OBJS)\coredll_iniconf.obj \ + $(OBJS)\coredll_msw_listbox.obj \ + $(OBJS)\coredll_msw_listctrl.obj \ + $(OBJS)\coredll_mdi.obj \ + $(OBJS)\coredll_msw_menu.obj \ + $(OBJS)\coredll_menuitem.obj \ + $(OBJS)\coredll_metafile.obj \ + $(OBJS)\coredll_msgdlg.obj \ + $(OBJS)\coredll_nativdlg.obj \ + $(OBJS)\coredll_nativewin.obj \ + $(OBJS)\coredll_msw_notebook.obj \ + $(OBJS)\coredll_access.obj \ + $(OBJS)\coredll_ownerdrw.obj \ + $(OBJS)\coredll_panel.obj \ + $(OBJS)\coredll_progdlg.obj \ + $(OBJS)\coredll_msw_radiobox.obj \ + $(OBJS)\coredll_msw_radiobut.obj \ + $(OBJS)\coredll_richmsgdlg.obj \ + $(OBJS)\coredll_msw_scrolbar.obj \ + $(OBJS)\coredll_msw_slider.obj \ + $(OBJS)\coredll_msw_spinbutt.obj \ + $(OBJS)\coredll_spinctrl.obj \ + $(OBJS)\coredll_msw_statbmp.obj \ + $(OBJS)\coredll_msw_statbox.obj \ + $(OBJS)\coredll_statusbar.obj \ + $(OBJS)\coredll_msw_statline.obj \ + $(OBJS)\coredll_msw_stattext.obj \ + $(OBJS)\coredll_msw_toolbar.obj \ + $(OBJS)\coredll_msw_textctrl.obj \ + $(OBJS)\coredll_textentry.obj \ + $(OBJS)\coredll_msw_tglbtn.obj \ + $(OBJS)\coredll_treectrl.obj \ + $(OBJS)\coredll_msw_checklst.obj \ + $(OBJS)\coredll_msw_fdrepdlg.obj \ + $(OBJS)\coredll_fontdlg.obj \ + $(OBJS)\coredll_accelcmn.obj \ + $(OBJS)\coredll_accesscmn.obj \ + $(OBJS)\coredll_anidecod.obj \ + $(OBJS)\coredll_affinematrix2d.obj \ + $(OBJS)\coredll_appcmn.obj \ + $(OBJS)\coredll_artprov.obj \ + $(OBJS)\coredll_artstd.obj \ + $(OBJS)\coredll_arttango.obj \ + $(OBJS)\coredll_bmpbase.obj \ + $(OBJS)\coredll_bmpbtncmn.obj \ + $(OBJS)\coredll_bookctrl.obj \ + $(OBJS)\coredll_btncmn.obj \ + $(OBJS)\coredll_cairo.obj \ + $(OBJS)\coredll_checkboxcmn.obj \ + $(OBJS)\coredll_checklstcmn.obj \ + $(OBJS)\coredll_choiccmn.obj \ + $(OBJS)\coredll_clipcmn.obj \ + $(OBJS)\coredll_clrpickercmn.obj \ + $(OBJS)\coredll_colourcmn.obj \ + $(OBJS)\coredll_colourdata.obj \ + $(OBJS)\coredll_combocmn.obj \ + $(OBJS)\coredll_cmdproc.obj \ + $(OBJS)\coredll_cmndata.obj \ + $(OBJS)\coredll_containr.obj \ + $(OBJS)\coredll_cshelp.obj \ + $(OBJS)\coredll_ctrlcmn.obj \ + $(OBJS)\coredll_ctrlsub.obj \ + $(OBJS)\coredll_dcbase.obj \ + $(OBJS)\coredll_dcbufcmn.obj \ + $(OBJS)\coredll_dcgraph.obj \ + $(OBJS)\coredll_dcsvg.obj \ + $(OBJS)\coredll_dirctrlcmn.obj \ + $(OBJS)\coredll_dlgcmn.obj \ + $(OBJS)\coredll_dndcmn.obj \ + $(OBJS)\coredll_dobjcmn.obj \ + $(OBJS)\coredll_docmdi.obj \ + $(OBJS)\coredll_docview.obj \ + $(OBJS)\coredll_dpycmn.obj \ + $(OBJS)\coredll_dseldlg.obj \ + $(OBJS)\coredll_effects.obj \ + $(OBJS)\coredll_fddlgcmn.obj \ + $(OBJS)\coredll_filectrlcmn.obj \ + $(OBJS)\coredll_filehistorycmn.obj \ + $(OBJS)\coredll_filepickercmn.obj \ + $(OBJS)\coredll_fontpickercmn.obj \ + $(OBJS)\coredll_fldlgcmn.obj \ + $(OBJS)\coredll_fontcmn.obj \ + $(OBJS)\coredll_fontdata.obj \ + $(OBJS)\coredll_graphicc.obj \ + $(OBJS)\coredll_fontenumcmn.obj \ + $(OBJS)\coredll_fontmap.obj \ + $(OBJS)\coredll_fontutilcmn.obj \ + $(OBJS)\coredll_framecmn.obj \ + $(OBJS)\coredll_gaugecmn.obj \ + $(OBJS)\coredll_gbsizer.obj \ + $(OBJS)\coredll_gdicmn.obj \ + $(OBJS)\coredll_geometry.obj \ + $(OBJS)\coredll_gifdecod.obj \ + $(OBJS)\coredll_graphcmn.obj \ + $(OBJS)\coredll_headercolcmn.obj \ + $(OBJS)\coredll_headerctrlcmn.obj \ + $(OBJS)\coredll_helpbase.obj \ + $(OBJS)\coredll_iconbndl.obj \ + $(OBJS)\coredll_imagall.obj \ + $(OBJS)\coredll_imagbmp.obj \ + $(OBJS)\coredll_image.obj \ + $(OBJS)\coredll_imagfill.obj \ + $(OBJS)\coredll_imaggif.obj \ + $(OBJS)\coredll_imagiff.obj \ + $(OBJS)\coredll_imagjpeg.obj \ + $(OBJS)\coredll_imagpcx.obj \ + $(OBJS)\coredll_imagpng.obj \ + $(OBJS)\coredll_imagpnm.obj \ + $(OBJS)\coredll_imagtga.obj \ + $(OBJS)\coredll_imagtiff.obj \ + $(OBJS)\coredll_imagxpm.obj \ + $(OBJS)\coredll_layout.obj \ + $(OBJS)\coredll_lboxcmn.obj \ + $(OBJS)\coredll_listctrlcmn.obj \ + $(OBJS)\coredll_markupparser.obj \ + $(OBJS)\coredll_matrix.obj \ + $(OBJS)\coredll_menucmn.obj \ + $(OBJS)\coredll_modalhook.obj \ + $(OBJS)\coredll_mousemanager.obj \ + $(OBJS)\coredll_nbkbase.obj \ + $(OBJS)\coredll_overlaycmn.obj \ + $(OBJS)\coredll_ownerdrwcmn.obj \ + $(OBJS)\coredll_paper.obj \ + $(OBJS)\coredll_panelcmn.obj \ + $(OBJS)\coredll_persist.obj \ + $(OBJS)\coredll_pickerbase.obj \ + $(OBJS)\coredll_popupcmn.obj \ + $(OBJS)\coredll_preferencescmn.obj \ + $(OBJS)\coredll_prntbase.obj \ + $(OBJS)\coredll_quantize.obj \ + $(OBJS)\coredll_radiobtncmn.obj \ + $(OBJS)\coredll_radiocmn.obj \ + $(OBJS)\coredll_rearrangectrl.obj \ + $(OBJS)\coredll_rendcmn.obj \ + $(OBJS)\coredll_rgncmn.obj \ + $(OBJS)\coredll_scrolbarcmn.obj \ + $(OBJS)\coredll_settcmn.obj \ + $(OBJS)\coredll_sizer.obj \ + $(OBJS)\coredll_slidercmn.obj \ + $(OBJS)\coredll_spinbtncmn.obj \ + $(OBJS)\coredll_spinctrlcmn.obj \ + $(OBJS)\coredll_srchcmn.obj \ + $(OBJS)\coredll_statbar.obj \ + $(OBJS)\coredll_statbmpcmn.obj \ + $(OBJS)\coredll_statboxcmn.obj \ + $(OBJS)\coredll_statlinecmn.obj \ + $(OBJS)\coredll_stattextcmn.obj \ + $(OBJS)\coredll_stockitem.obj \ + $(OBJS)\coredll_tbarbase.obj \ + $(OBJS)\coredll_textcmn.obj \ + $(OBJS)\coredll_textentrycmn.obj \ + $(OBJS)\coredll_textmeasurecmn.obj \ + $(OBJS)\coredll_toplvcmn.obj \ + $(OBJS)\coredll_treebase.obj \ + $(OBJS)\coredll_uiactioncmn.obj \ + $(OBJS)\coredll_valgen.obj \ + $(OBJS)\coredll_validate.obj \ + $(OBJS)\coredll_valtext.obj \ + $(OBJS)\coredll_valnum.obj \ + $(OBJS)\coredll_wincmn.obj \ + $(OBJS)\coredll_windowid.obj \ + $(OBJS)\coredll_wrapsizer.obj \ + $(OBJS)\coredll_xpmdecod.obj \ + $(OBJS)\coredll_busyinfo.obj \ + $(OBJS)\coredll_buttonbar.obj \ + $(OBJS)\coredll_choicdgg.obj \ + $(OBJS)\coredll_choicbkg.obj \ + $(OBJS)\coredll_combog.obj \ + $(OBJS)\coredll_dcpsg.obj \ + $(OBJS)\coredll_dirctrlg.obj \ + $(OBJS)\coredll_dragimgg.obj \ + $(OBJS)\coredll_filectrlg.obj \ + $(OBJS)\coredll_headerctrlg.obj \ + $(OBJS)\coredll_infobar.obj \ + $(OBJS)\coredll_listbkg.obj \ + $(OBJS)\coredll_logg.obj \ + $(OBJS)\coredll_markuptext.obj \ + $(OBJS)\coredll_msgdlgg.obj \ + $(OBJS)\coredll_numdlgg.obj \ + $(OBJS)\coredll_progdlgg.obj \ + $(OBJS)\coredll_preferencesg.obj \ + $(OBJS)\coredll_printps.obj \ + $(OBJS)\coredll_renderg.obj \ + $(OBJS)\coredll_richmsgdlgg.obj \ + $(OBJS)\coredll_scrlwing.obj \ + $(OBJS)\coredll_selstore.obj \ + $(OBJS)\coredll_spinctlg.obj \ + $(OBJS)\coredll_splitter.obj \ + $(OBJS)\coredll_srchctlg.obj \ + $(OBJS)\coredll_statbmpg.obj \ + $(OBJS)\coredll_stattextg.obj \ + $(OBJS)\coredll_textdlgg.obj \ + $(OBJS)\coredll_tipwin.obj \ + $(OBJS)\coredll_toolbkg.obj \ + $(OBJS)\coredll_treectlg.obj \ + $(OBJS)\coredll_treebkg.obj \ + $(OBJS)\coredll_vlbox.obj \ + $(OBJS)\coredll_vscroll.obj \ + $(OBJS)\coredll_xmlreshandler.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "1" +____CORE_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\coredll_activex.obj \ + $(OBJS)\coredll_app.obj \ + $(OBJS)\coredll_bitmap.obj \ + $(OBJS)\coredll_brush.obj \ + $(OBJS)\coredll_caret.obj \ + $(OBJS)\coredll_clipbrd.obj \ + $(OBJS)\coredll_colour.obj \ + $(OBJS)\coredll_cursor.obj \ + $(OBJS)\coredll_data.obj \ + $(OBJS)\coredll_dc.obj \ + $(OBJS)\coredll_dcclient.obj \ + $(OBJS)\coredll_dcmemory.obj \ + $(OBJS)\coredll_dcprint.obj \ + $(OBJS)\coredll_dcscreen.obj \ + $(OBJS)\coredll_dialup.obj \ + $(OBJS)\coredll_dib.obj \ + $(OBJS)\coredll_display.obj \ + $(OBJS)\coredll_enhmeta.obj \ + $(OBJS)\coredll_font.obj \ + $(OBJS)\coredll_fontenum.obj \ + $(OBJS)\coredll_fontutil.obj \ + $(OBJS)\coredll_gdiimage.obj \ + $(OBJS)\coredll_gdiobj.obj \ + $(OBJS)\coredll_gdiplus.obj \ + $(OBJS)\coredll_graphics.obj \ + $(OBJS)\coredll_icon.obj \ + $(OBJS)\coredll_imaglist.obj \ + $(OBJS)\coredll_minifram.obj \ + $(OBJS)\coredll_nonownedwnd.obj \ + $(OBJS)\coredll_dataobj.obj \ + $(OBJS)\coredll_dropsrc.obj \ + $(OBJS)\coredll_droptgt.obj \ + $(OBJS)\coredll_oleutils.obj \ + $(OBJS)\coredll_safearray.obj \ + $(OBJS)\coredll_palette.obj \ + $(OBJS)\coredll_pen.obj \ + $(OBJS)\coredll_popupwin.obj \ + $(OBJS)\coredll_printdlg.obj \ + $(OBJS)\coredll_printwin.obj \ + $(OBJS)\coredll_region.obj \ + $(OBJS)\coredll_renderer.obj \ + $(OBJS)\coredll_settings.obj \ + $(OBJS)\coredll_textmeasure.obj \ + $(OBJS)\coredll_tooltip.obj \ + $(OBJS)\coredll_toplevel.obj \ + $(OBJS)\coredll_uiaction.obj \ + $(OBJS)\coredll_utilsgui.obj \ + $(OBJS)\coredll_utilswin.obj \ + $(OBJS)\coredll_uxtheme.obj \ + $(OBJS)\coredll_window.obj \ + $(OBJS)\coredll_helpchm.obj \ + $(OBJS)\coredll_helpwin.obj \ + $(OBJS)\coredll_automtn.obj \ + $(OBJS)\coredll_uuid.obj \ + $(OBJS)\coredll_evtloop.obj \ + $(OBJS)\coredll_generic_accel.obj \ + $(OBJS)\coredll_clrpickerg.obj \ + $(OBJS)\coredll_collpaneg.obj \ + $(OBJS)\coredll_colrdlgg.obj \ + $(OBJS)\coredll_dirdlgg.obj \ + $(OBJS)\coredll_generic_fdrepdlg.obj \ + $(OBJS)\coredll_filedlgg.obj \ + $(OBJS)\coredll_filepickerg.obj \ + $(OBJS)\coredll_fontdlgg.obj \ + $(OBJS)\coredll_fontpickerg.obj \ + $(OBJS)\coredll_generic_listctrl.obj \ + $(OBJS)\coredll_mdig.obj \ + $(OBJS)\coredll_prntdlgg.obj \ + $(OBJS)\coredll_univ_bmpbuttn.obj \ + $(OBJS)\coredll_univ_button.obj \ + $(OBJS)\coredll_univ_checkbox.obj \ + $(OBJS)\coredll_univ_checklst.obj \ + $(OBJS)\coredll_univ_choice.obj \ + $(OBJS)\coredll_univ_combobox.obj \ + $(OBJS)\coredll_univ_control.obj \ + $(OBJS)\coredll_ctrlrend.obj \ + $(OBJS)\coredll_univ_dialog.obj \ + $(OBJS)\coredll_framuniv.obj \ + $(OBJS)\coredll_univ_gauge.obj \ + $(OBJS)\coredll_inpcons.obj \ + $(OBJS)\coredll_inphand.obj \ + $(OBJS)\coredll_univ_listbox.obj \ + $(OBJS)\coredll_univ_menu.obj \ + $(OBJS)\coredll_univ_notebook.obj \ + $(OBJS)\coredll_univ_radiobox.obj \ + $(OBJS)\coredll_univ_radiobut.obj \ + $(OBJS)\coredll_scrarrow.obj \ + $(OBJS)\coredll_univ_scrolbar.obj \ + $(OBJS)\coredll_scrthumb.obj \ + $(OBJS)\coredll_settingsuniv.obj \ + $(OBJS)\coredll_univ_slider.obj \ + $(OBJS)\coredll_univ_spinbutt.obj \ + $(OBJS)\coredll_univ_statbmp.obj \ + $(OBJS)\coredll_univ_statbox.obj \ + $(OBJS)\coredll_univ_statline.obj \ + $(OBJS)\coredll_univ_stattext.obj \ + $(OBJS)\coredll_univ_statusbr.obj \ + $(OBJS)\coredll_stdrend.obj \ + $(OBJS)\coredll_univ_textctrl.obj \ + $(OBJS)\coredll_univ_tglbtn.obj \ + $(OBJS)\coredll_theme.obj \ + $(OBJS)\coredll_univ_toolbar.obj \ + $(OBJS)\coredll_topluniv.obj \ + $(OBJS)\coredll_winuniv.obj \ + $(OBJS)\coredll_gtk.obj \ + $(OBJS)\coredll_metal.obj \ + $(OBJS)\coredll_mono.obj \ + $(OBJS)\coredll_win32.obj \ + $(OBJS)\coredll_accelcmn.obj \ + $(OBJS)\coredll_accesscmn.obj \ + $(OBJS)\coredll_anidecod.obj \ + $(OBJS)\coredll_affinematrix2d.obj \ + $(OBJS)\coredll_appcmn.obj \ + $(OBJS)\coredll_artprov.obj \ + $(OBJS)\coredll_artstd.obj \ + $(OBJS)\coredll_arttango.obj \ + $(OBJS)\coredll_bmpbase.obj \ + $(OBJS)\coredll_bmpbtncmn.obj \ + $(OBJS)\coredll_bookctrl.obj \ + $(OBJS)\coredll_btncmn.obj \ + $(OBJS)\coredll_cairo.obj \ + $(OBJS)\coredll_checkboxcmn.obj \ + $(OBJS)\coredll_checklstcmn.obj \ + $(OBJS)\coredll_choiccmn.obj \ + $(OBJS)\coredll_clipcmn.obj \ + $(OBJS)\coredll_clrpickercmn.obj \ + $(OBJS)\coredll_colourcmn.obj \ + $(OBJS)\coredll_colourdata.obj \ + $(OBJS)\coredll_combocmn.obj \ + $(OBJS)\coredll_cmdproc.obj \ + $(OBJS)\coredll_cmndata.obj \ + $(OBJS)\coredll_containr.obj \ + $(OBJS)\coredll_cshelp.obj \ + $(OBJS)\coredll_ctrlcmn.obj \ + $(OBJS)\coredll_ctrlsub.obj \ + $(OBJS)\coredll_dcbase.obj \ + $(OBJS)\coredll_dcbufcmn.obj \ + $(OBJS)\coredll_dcgraph.obj \ + $(OBJS)\coredll_dcsvg.obj \ + $(OBJS)\coredll_dirctrlcmn.obj \ + $(OBJS)\coredll_dlgcmn.obj \ + $(OBJS)\coredll_dndcmn.obj \ + $(OBJS)\coredll_dobjcmn.obj \ + $(OBJS)\coredll_docmdi.obj \ + $(OBJS)\coredll_docview.obj \ + $(OBJS)\coredll_dpycmn.obj \ + $(OBJS)\coredll_dseldlg.obj \ + $(OBJS)\coredll_effects.obj \ + $(OBJS)\coredll_fddlgcmn.obj \ + $(OBJS)\coredll_filectrlcmn.obj \ + $(OBJS)\coredll_filehistorycmn.obj \ + $(OBJS)\coredll_filepickercmn.obj \ + $(OBJS)\coredll_fontpickercmn.obj \ + $(OBJS)\coredll_fldlgcmn.obj \ + $(OBJS)\coredll_fontcmn.obj \ + $(OBJS)\coredll_fontdata.obj \ + $(OBJS)\coredll_graphicc.obj \ + $(OBJS)\coredll_fontenumcmn.obj \ + $(OBJS)\coredll_fontmap.obj \ + $(OBJS)\coredll_fontutilcmn.obj \ + $(OBJS)\coredll_framecmn.obj \ + $(OBJS)\coredll_gaugecmn.obj \ + $(OBJS)\coredll_gbsizer.obj \ + $(OBJS)\coredll_gdicmn.obj \ + $(OBJS)\coredll_geometry.obj \ + $(OBJS)\coredll_gifdecod.obj \ + $(OBJS)\coredll_graphcmn.obj \ + $(OBJS)\coredll_headercolcmn.obj \ + $(OBJS)\coredll_headerctrlcmn.obj \ + $(OBJS)\coredll_helpbase.obj \ + $(OBJS)\coredll_iconbndl.obj \ + $(OBJS)\coredll_imagall.obj \ + $(OBJS)\coredll_imagbmp.obj \ + $(OBJS)\coredll_image.obj \ + $(OBJS)\coredll_imagfill.obj \ + $(OBJS)\coredll_imaggif.obj \ + $(OBJS)\coredll_imagiff.obj \ + $(OBJS)\coredll_imagjpeg.obj \ + $(OBJS)\coredll_imagpcx.obj \ + $(OBJS)\coredll_imagpng.obj \ + $(OBJS)\coredll_imagpnm.obj \ + $(OBJS)\coredll_imagtga.obj \ + $(OBJS)\coredll_imagtiff.obj \ + $(OBJS)\coredll_imagxpm.obj \ + $(OBJS)\coredll_layout.obj \ + $(OBJS)\coredll_lboxcmn.obj \ + $(OBJS)\coredll_listctrlcmn.obj \ + $(OBJS)\coredll_markupparser.obj \ + $(OBJS)\coredll_matrix.obj \ + $(OBJS)\coredll_menucmn.obj \ + $(OBJS)\coredll_modalhook.obj \ + $(OBJS)\coredll_mousemanager.obj \ + $(OBJS)\coredll_nbkbase.obj \ + $(OBJS)\coredll_overlaycmn.obj \ + $(OBJS)\coredll_ownerdrwcmn.obj \ + $(OBJS)\coredll_paper.obj \ + $(OBJS)\coredll_panelcmn.obj \ + $(OBJS)\coredll_persist.obj \ + $(OBJS)\coredll_pickerbase.obj \ + $(OBJS)\coredll_popupcmn.obj \ + $(OBJS)\coredll_preferencescmn.obj \ + $(OBJS)\coredll_prntbase.obj \ + $(OBJS)\coredll_quantize.obj \ + $(OBJS)\coredll_radiobtncmn.obj \ + $(OBJS)\coredll_radiocmn.obj \ + $(OBJS)\coredll_rearrangectrl.obj \ + $(OBJS)\coredll_rendcmn.obj \ + $(OBJS)\coredll_rgncmn.obj \ + $(OBJS)\coredll_scrolbarcmn.obj \ + $(OBJS)\coredll_settcmn.obj \ + $(OBJS)\coredll_sizer.obj \ + $(OBJS)\coredll_slidercmn.obj \ + $(OBJS)\coredll_spinbtncmn.obj \ + $(OBJS)\coredll_spinctrlcmn.obj \ + $(OBJS)\coredll_srchcmn.obj \ + $(OBJS)\coredll_statbar.obj \ + $(OBJS)\coredll_statbmpcmn.obj \ + $(OBJS)\coredll_statboxcmn.obj \ + $(OBJS)\coredll_statlinecmn.obj \ + $(OBJS)\coredll_stattextcmn.obj \ + $(OBJS)\coredll_stockitem.obj \ + $(OBJS)\coredll_tbarbase.obj \ + $(OBJS)\coredll_textcmn.obj \ + $(OBJS)\coredll_textentrycmn.obj \ + $(OBJS)\coredll_textmeasurecmn.obj \ + $(OBJS)\coredll_toplvcmn.obj \ + $(OBJS)\coredll_treebase.obj \ + $(OBJS)\coredll_uiactioncmn.obj \ + $(OBJS)\coredll_valgen.obj \ + $(OBJS)\coredll_validate.obj \ + $(OBJS)\coredll_valtext.obj \ + $(OBJS)\coredll_valnum.obj \ + $(OBJS)\coredll_wincmn.obj \ + $(OBJS)\coredll_windowid.obj \ + $(OBJS)\coredll_wrapsizer.obj \ + $(OBJS)\coredll_xpmdecod.obj \ + $(OBJS)\coredll_busyinfo.obj \ + $(OBJS)\coredll_buttonbar.obj \ + $(OBJS)\coredll_choicdgg.obj \ + $(OBJS)\coredll_choicbkg.obj \ + $(OBJS)\coredll_combog.obj \ + $(OBJS)\coredll_dcpsg.obj \ + $(OBJS)\coredll_dirctrlg.obj \ + $(OBJS)\coredll_dragimgg.obj \ + $(OBJS)\coredll_filectrlg.obj \ + $(OBJS)\coredll_headerctrlg.obj \ + $(OBJS)\coredll_infobar.obj \ + $(OBJS)\coredll_listbkg.obj \ + $(OBJS)\coredll_logg.obj \ + $(OBJS)\coredll_markuptext.obj \ + $(OBJS)\coredll_msgdlgg.obj \ + $(OBJS)\coredll_numdlgg.obj \ + $(OBJS)\coredll_progdlgg.obj \ + $(OBJS)\coredll_preferencesg.obj \ + $(OBJS)\coredll_printps.obj \ + $(OBJS)\coredll_renderg.obj \ + $(OBJS)\coredll_richmsgdlgg.obj \ + $(OBJS)\coredll_scrlwing.obj \ + $(OBJS)\coredll_selstore.obj \ + $(OBJS)\coredll_spinctlg.obj \ + $(OBJS)\coredll_splitter.obj \ + $(OBJS)\coredll_srchctlg.obj \ + $(OBJS)\coredll_statbmpg.obj \ + $(OBJS)\coredll_stattextg.obj \ + $(OBJS)\coredll_textdlgg.obj \ + $(OBJS)\coredll_tipwin.obj \ + $(OBJS)\coredll_toolbkg.obj \ + $(OBJS)\coredll_treectlg.obj \ + $(OBJS)\coredll_treebkg.obj \ + $(OBJS)\coredll_vlbox.obj \ + $(OBJS)\coredll_vscroll.obj \ + $(OBJS)\coredll_xmlreshandler.obj +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" +__corelib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "0" +____CORE_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\corelib_activex.obj \ + $(OBJS)\corelib_app.obj \ + $(OBJS)\corelib_bitmap.obj \ + $(OBJS)\corelib_brush.obj \ + $(OBJS)\corelib_caret.obj \ + $(OBJS)\corelib_clipbrd.obj \ + $(OBJS)\corelib_colour.obj \ + $(OBJS)\corelib_cursor.obj \ + $(OBJS)\corelib_data.obj \ + $(OBJS)\corelib_dc.obj \ + $(OBJS)\corelib_dcclient.obj \ + $(OBJS)\corelib_dcmemory.obj \ + $(OBJS)\corelib_dcprint.obj \ + $(OBJS)\corelib_dcscreen.obj \ + $(OBJS)\corelib_dialup.obj \ + $(OBJS)\corelib_dib.obj \ + $(OBJS)\corelib_display.obj \ + $(OBJS)\corelib_enhmeta.obj \ + $(OBJS)\corelib_font.obj \ + $(OBJS)\corelib_fontenum.obj \ + $(OBJS)\corelib_fontutil.obj \ + $(OBJS)\corelib_gdiimage.obj \ + $(OBJS)\corelib_gdiobj.obj \ + $(OBJS)\corelib_gdiplus.obj \ + $(OBJS)\corelib_graphics.obj \ + $(OBJS)\corelib_icon.obj \ + $(OBJS)\corelib_imaglist.obj \ + $(OBJS)\corelib_minifram.obj \ + $(OBJS)\corelib_nonownedwnd.obj \ + $(OBJS)\corelib_dataobj.obj \ + $(OBJS)\corelib_dropsrc.obj \ + $(OBJS)\corelib_droptgt.obj \ + $(OBJS)\corelib_oleutils.obj \ + $(OBJS)\corelib_safearray.obj \ + $(OBJS)\corelib_palette.obj \ + $(OBJS)\corelib_pen.obj \ + $(OBJS)\corelib_popupwin.obj \ + $(OBJS)\corelib_printdlg.obj \ + $(OBJS)\corelib_printwin.obj \ + $(OBJS)\corelib_region.obj \ + $(OBJS)\corelib_renderer.obj \ + $(OBJS)\corelib_settings.obj \ + $(OBJS)\corelib_textmeasure.obj \ + $(OBJS)\corelib_tooltip.obj \ + $(OBJS)\corelib_toplevel.obj \ + $(OBJS)\corelib_uiaction.obj \ + $(OBJS)\corelib_utilsgui.obj \ + $(OBJS)\corelib_utilswin.obj \ + $(OBJS)\corelib_uxtheme.obj \ + $(OBJS)\corelib_window.obj \ + $(OBJS)\corelib_helpchm.obj \ + $(OBJS)\corelib_helpwin.obj \ + $(OBJS)\corelib_automtn.obj \ + $(OBJS)\corelib_uuid.obj \ + $(OBJS)\corelib_clrpickerg.obj \ + $(OBJS)\corelib_collpaneg.obj \ + $(OBJS)\corelib_filepickerg.obj \ + $(OBJS)\corelib_fontpickerg.obj \ + $(OBJS)\corelib_generic_statusbr.obj \ + $(OBJS)\corelib_prntdlgg.obj \ + $(OBJS)\corelib_msw_accel.obj \ + $(OBJS)\corelib_anybutton.obj \ + $(OBJS)\corelib_artmsw.obj \ + $(OBJS)\corelib_msw_bmpbuttn.obj \ + $(OBJS)\corelib_msw_button.obj \ + $(OBJS)\corelib_msw_checkbox.obj \ + $(OBJS)\corelib_msw_choice.obj \ + $(OBJS)\corelib_colordlg.obj \ + $(OBJS)\corelib_combo.obj \ + $(OBJS)\corelib_msw_combobox.obj \ + $(OBJS)\corelib_msw_control.obj \ + $(OBJS)\corelib_msw_dialog.obj \ + $(OBJS)\corelib_dirdlg.obj \ + $(OBJS)\corelib_dragimag.obj \ + $(OBJS)\corelib_evtloop.obj \ + $(OBJS)\corelib_filedlg.obj \ + $(OBJS)\corelib_frame.obj \ + $(OBJS)\corelib_msw_gauge.obj \ + $(OBJS)\corelib_headerctrl.obj \ + $(OBJS)\corelib_iniconf.obj \ + $(OBJS)\corelib_msw_listbox.obj \ + $(OBJS)\corelib_msw_listctrl.obj \ + $(OBJS)\corelib_mdi.obj \ + $(OBJS)\corelib_msw_menu.obj \ + $(OBJS)\corelib_menuitem.obj \ + $(OBJS)\corelib_metafile.obj \ + $(OBJS)\corelib_msgdlg.obj \ + $(OBJS)\corelib_nativdlg.obj \ + $(OBJS)\corelib_nativewin.obj \ + $(OBJS)\corelib_msw_notebook.obj \ + $(OBJS)\corelib_access.obj \ + $(OBJS)\corelib_ownerdrw.obj \ + $(OBJS)\corelib_panel.obj \ + $(OBJS)\corelib_progdlg.obj \ + $(OBJS)\corelib_msw_radiobox.obj \ + $(OBJS)\corelib_msw_radiobut.obj \ + $(OBJS)\corelib_richmsgdlg.obj \ + $(OBJS)\corelib_msw_scrolbar.obj \ + $(OBJS)\corelib_msw_slider.obj \ + $(OBJS)\corelib_msw_spinbutt.obj \ + $(OBJS)\corelib_spinctrl.obj \ + $(OBJS)\corelib_msw_statbmp.obj \ + $(OBJS)\corelib_msw_statbox.obj \ + $(OBJS)\corelib_statusbar.obj \ + $(OBJS)\corelib_msw_statline.obj \ + $(OBJS)\corelib_msw_stattext.obj \ + $(OBJS)\corelib_msw_toolbar.obj \ + $(OBJS)\corelib_msw_textctrl.obj \ + $(OBJS)\corelib_textentry.obj \ + $(OBJS)\corelib_msw_tglbtn.obj \ + $(OBJS)\corelib_treectrl.obj \ + $(OBJS)\corelib_msw_checklst.obj \ + $(OBJS)\corelib_msw_fdrepdlg.obj \ + $(OBJS)\corelib_fontdlg.obj \ + $(OBJS)\corelib_accelcmn.obj \ + $(OBJS)\corelib_accesscmn.obj \ + $(OBJS)\corelib_anidecod.obj \ + $(OBJS)\corelib_affinematrix2d.obj \ + $(OBJS)\corelib_appcmn.obj \ + $(OBJS)\corelib_artprov.obj \ + $(OBJS)\corelib_artstd.obj \ + $(OBJS)\corelib_arttango.obj \ + $(OBJS)\corelib_bmpbase.obj \ + $(OBJS)\corelib_bmpbtncmn.obj \ + $(OBJS)\corelib_bookctrl.obj \ + $(OBJS)\corelib_btncmn.obj \ + $(OBJS)\corelib_cairo.obj \ + $(OBJS)\corelib_checkboxcmn.obj \ + $(OBJS)\corelib_checklstcmn.obj \ + $(OBJS)\corelib_choiccmn.obj \ + $(OBJS)\corelib_clipcmn.obj \ + $(OBJS)\corelib_clrpickercmn.obj \ + $(OBJS)\corelib_colourcmn.obj \ + $(OBJS)\corelib_colourdata.obj \ + $(OBJS)\corelib_combocmn.obj \ + $(OBJS)\corelib_cmdproc.obj \ + $(OBJS)\corelib_cmndata.obj \ + $(OBJS)\corelib_containr.obj \ + $(OBJS)\corelib_cshelp.obj \ + $(OBJS)\corelib_ctrlcmn.obj \ + $(OBJS)\corelib_ctrlsub.obj \ + $(OBJS)\corelib_dcbase.obj \ + $(OBJS)\corelib_dcbufcmn.obj \ + $(OBJS)\corelib_dcgraph.obj \ + $(OBJS)\corelib_dcsvg.obj \ + $(OBJS)\corelib_dirctrlcmn.obj \ + $(OBJS)\corelib_dlgcmn.obj \ + $(OBJS)\corelib_dndcmn.obj \ + $(OBJS)\corelib_dobjcmn.obj \ + $(OBJS)\corelib_docmdi.obj \ + $(OBJS)\corelib_docview.obj \ + $(OBJS)\corelib_dpycmn.obj \ + $(OBJS)\corelib_dseldlg.obj \ + $(OBJS)\corelib_effects.obj \ + $(OBJS)\corelib_fddlgcmn.obj \ + $(OBJS)\corelib_filectrlcmn.obj \ + $(OBJS)\corelib_filehistorycmn.obj \ + $(OBJS)\corelib_filepickercmn.obj \ + $(OBJS)\corelib_fontpickercmn.obj \ + $(OBJS)\corelib_fldlgcmn.obj \ + $(OBJS)\corelib_fontcmn.obj \ + $(OBJS)\corelib_fontdata.obj \ + $(OBJS)\corelib_graphicc.obj \ + $(OBJS)\corelib_fontenumcmn.obj \ + $(OBJS)\corelib_fontmap.obj \ + $(OBJS)\corelib_fontutilcmn.obj \ + $(OBJS)\corelib_framecmn.obj \ + $(OBJS)\corelib_gaugecmn.obj \ + $(OBJS)\corelib_gbsizer.obj \ + $(OBJS)\corelib_gdicmn.obj \ + $(OBJS)\corelib_geometry.obj \ + $(OBJS)\corelib_gifdecod.obj \ + $(OBJS)\corelib_graphcmn.obj \ + $(OBJS)\corelib_headercolcmn.obj \ + $(OBJS)\corelib_headerctrlcmn.obj \ + $(OBJS)\corelib_helpbase.obj \ + $(OBJS)\corelib_iconbndl.obj \ + $(OBJS)\corelib_imagall.obj \ + $(OBJS)\corelib_imagbmp.obj \ + $(OBJS)\corelib_image.obj \ + $(OBJS)\corelib_imagfill.obj \ + $(OBJS)\corelib_imaggif.obj \ + $(OBJS)\corelib_imagiff.obj \ + $(OBJS)\corelib_imagjpeg.obj \ + $(OBJS)\corelib_imagpcx.obj \ + $(OBJS)\corelib_imagpng.obj \ + $(OBJS)\corelib_imagpnm.obj \ + $(OBJS)\corelib_imagtga.obj \ + $(OBJS)\corelib_imagtiff.obj \ + $(OBJS)\corelib_imagxpm.obj \ + $(OBJS)\corelib_layout.obj \ + $(OBJS)\corelib_lboxcmn.obj \ + $(OBJS)\corelib_listctrlcmn.obj \ + $(OBJS)\corelib_markupparser.obj \ + $(OBJS)\corelib_matrix.obj \ + $(OBJS)\corelib_menucmn.obj \ + $(OBJS)\corelib_modalhook.obj \ + $(OBJS)\corelib_mousemanager.obj \ + $(OBJS)\corelib_nbkbase.obj \ + $(OBJS)\corelib_overlaycmn.obj \ + $(OBJS)\corelib_ownerdrwcmn.obj \ + $(OBJS)\corelib_paper.obj \ + $(OBJS)\corelib_panelcmn.obj \ + $(OBJS)\corelib_persist.obj \ + $(OBJS)\corelib_pickerbase.obj \ + $(OBJS)\corelib_popupcmn.obj \ + $(OBJS)\corelib_preferencescmn.obj \ + $(OBJS)\corelib_prntbase.obj \ + $(OBJS)\corelib_quantize.obj \ + $(OBJS)\corelib_radiobtncmn.obj \ + $(OBJS)\corelib_radiocmn.obj \ + $(OBJS)\corelib_rearrangectrl.obj \ + $(OBJS)\corelib_rendcmn.obj \ + $(OBJS)\corelib_rgncmn.obj \ + $(OBJS)\corelib_scrolbarcmn.obj \ + $(OBJS)\corelib_settcmn.obj \ + $(OBJS)\corelib_sizer.obj \ + $(OBJS)\corelib_slidercmn.obj \ + $(OBJS)\corelib_spinbtncmn.obj \ + $(OBJS)\corelib_spinctrlcmn.obj \ + $(OBJS)\corelib_srchcmn.obj \ + $(OBJS)\corelib_statbar.obj \ + $(OBJS)\corelib_statbmpcmn.obj \ + $(OBJS)\corelib_statboxcmn.obj \ + $(OBJS)\corelib_statlinecmn.obj \ + $(OBJS)\corelib_stattextcmn.obj \ + $(OBJS)\corelib_stockitem.obj \ + $(OBJS)\corelib_tbarbase.obj \ + $(OBJS)\corelib_textcmn.obj \ + $(OBJS)\corelib_textentrycmn.obj \ + $(OBJS)\corelib_textmeasurecmn.obj \ + $(OBJS)\corelib_toplvcmn.obj \ + $(OBJS)\corelib_treebase.obj \ + $(OBJS)\corelib_uiactioncmn.obj \ + $(OBJS)\corelib_valgen.obj \ + $(OBJS)\corelib_validate.obj \ + $(OBJS)\corelib_valtext.obj \ + $(OBJS)\corelib_valnum.obj \ + $(OBJS)\corelib_wincmn.obj \ + $(OBJS)\corelib_windowid.obj \ + $(OBJS)\corelib_wrapsizer.obj \ + $(OBJS)\corelib_xpmdecod.obj \ + $(OBJS)\corelib_busyinfo.obj \ + $(OBJS)\corelib_buttonbar.obj \ + $(OBJS)\corelib_choicdgg.obj \ + $(OBJS)\corelib_choicbkg.obj \ + $(OBJS)\corelib_combog.obj \ + $(OBJS)\corelib_dcpsg.obj \ + $(OBJS)\corelib_dirctrlg.obj \ + $(OBJS)\corelib_dragimgg.obj \ + $(OBJS)\corelib_filectrlg.obj \ + $(OBJS)\corelib_headerctrlg.obj \ + $(OBJS)\corelib_infobar.obj \ + $(OBJS)\corelib_listbkg.obj \ + $(OBJS)\corelib_logg.obj \ + $(OBJS)\corelib_markuptext.obj \ + $(OBJS)\corelib_msgdlgg.obj \ + $(OBJS)\corelib_numdlgg.obj \ + $(OBJS)\corelib_progdlgg.obj \ + $(OBJS)\corelib_preferencesg.obj \ + $(OBJS)\corelib_printps.obj \ + $(OBJS)\corelib_renderg.obj \ + $(OBJS)\corelib_richmsgdlgg.obj \ + $(OBJS)\corelib_scrlwing.obj \ + $(OBJS)\corelib_selstore.obj \ + $(OBJS)\corelib_spinctlg.obj \ + $(OBJS)\corelib_splitter.obj \ + $(OBJS)\corelib_srchctlg.obj \ + $(OBJS)\corelib_statbmpg.obj \ + $(OBJS)\corelib_stattextg.obj \ + $(OBJS)\corelib_textdlgg.obj \ + $(OBJS)\corelib_tipwin.obj \ + $(OBJS)\corelib_toolbkg.obj \ + $(OBJS)\corelib_treectlg.obj \ + $(OBJS)\corelib_treebkg.obj \ + $(OBJS)\corelib_vlbox.obj \ + $(OBJS)\corelib_vscroll.obj \ + $(OBJS)\corelib_xmlreshandler.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "1" +____CORE_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\corelib_activex.obj \ + $(OBJS)\corelib_app.obj \ + $(OBJS)\corelib_bitmap.obj \ + $(OBJS)\corelib_brush.obj \ + $(OBJS)\corelib_caret.obj \ + $(OBJS)\corelib_clipbrd.obj \ + $(OBJS)\corelib_colour.obj \ + $(OBJS)\corelib_cursor.obj \ + $(OBJS)\corelib_data.obj \ + $(OBJS)\corelib_dc.obj \ + $(OBJS)\corelib_dcclient.obj \ + $(OBJS)\corelib_dcmemory.obj \ + $(OBJS)\corelib_dcprint.obj \ + $(OBJS)\corelib_dcscreen.obj \ + $(OBJS)\corelib_dialup.obj \ + $(OBJS)\corelib_dib.obj \ + $(OBJS)\corelib_display.obj \ + $(OBJS)\corelib_enhmeta.obj \ + $(OBJS)\corelib_font.obj \ + $(OBJS)\corelib_fontenum.obj \ + $(OBJS)\corelib_fontutil.obj \ + $(OBJS)\corelib_gdiimage.obj \ + $(OBJS)\corelib_gdiobj.obj \ + $(OBJS)\corelib_gdiplus.obj \ + $(OBJS)\corelib_graphics.obj \ + $(OBJS)\corelib_icon.obj \ + $(OBJS)\corelib_imaglist.obj \ + $(OBJS)\corelib_minifram.obj \ + $(OBJS)\corelib_nonownedwnd.obj \ + $(OBJS)\corelib_dataobj.obj \ + $(OBJS)\corelib_dropsrc.obj \ + $(OBJS)\corelib_droptgt.obj \ + $(OBJS)\corelib_oleutils.obj \ + $(OBJS)\corelib_safearray.obj \ + $(OBJS)\corelib_palette.obj \ + $(OBJS)\corelib_pen.obj \ + $(OBJS)\corelib_popupwin.obj \ + $(OBJS)\corelib_printdlg.obj \ + $(OBJS)\corelib_printwin.obj \ + $(OBJS)\corelib_region.obj \ + $(OBJS)\corelib_renderer.obj \ + $(OBJS)\corelib_settings.obj \ + $(OBJS)\corelib_textmeasure.obj \ + $(OBJS)\corelib_tooltip.obj \ + $(OBJS)\corelib_toplevel.obj \ + $(OBJS)\corelib_uiaction.obj \ + $(OBJS)\corelib_utilsgui.obj \ + $(OBJS)\corelib_utilswin.obj \ + $(OBJS)\corelib_uxtheme.obj \ + $(OBJS)\corelib_window.obj \ + $(OBJS)\corelib_helpchm.obj \ + $(OBJS)\corelib_helpwin.obj \ + $(OBJS)\corelib_automtn.obj \ + $(OBJS)\corelib_uuid.obj \ + $(OBJS)\corelib_evtloop.obj \ + $(OBJS)\corelib_generic_accel.obj \ + $(OBJS)\corelib_clrpickerg.obj \ + $(OBJS)\corelib_collpaneg.obj \ + $(OBJS)\corelib_colrdlgg.obj \ + $(OBJS)\corelib_dirdlgg.obj \ + $(OBJS)\corelib_generic_fdrepdlg.obj \ + $(OBJS)\corelib_filedlgg.obj \ + $(OBJS)\corelib_filepickerg.obj \ + $(OBJS)\corelib_fontdlgg.obj \ + $(OBJS)\corelib_fontpickerg.obj \ + $(OBJS)\corelib_generic_listctrl.obj \ + $(OBJS)\corelib_mdig.obj \ + $(OBJS)\corelib_prntdlgg.obj \ + $(OBJS)\corelib_univ_bmpbuttn.obj \ + $(OBJS)\corelib_univ_button.obj \ + $(OBJS)\corelib_univ_checkbox.obj \ + $(OBJS)\corelib_univ_checklst.obj \ + $(OBJS)\corelib_univ_choice.obj \ + $(OBJS)\corelib_univ_combobox.obj \ + $(OBJS)\corelib_univ_control.obj \ + $(OBJS)\corelib_ctrlrend.obj \ + $(OBJS)\corelib_univ_dialog.obj \ + $(OBJS)\corelib_framuniv.obj \ + $(OBJS)\corelib_univ_gauge.obj \ + $(OBJS)\corelib_inpcons.obj \ + $(OBJS)\corelib_inphand.obj \ + $(OBJS)\corelib_univ_listbox.obj \ + $(OBJS)\corelib_univ_menu.obj \ + $(OBJS)\corelib_univ_notebook.obj \ + $(OBJS)\corelib_univ_radiobox.obj \ + $(OBJS)\corelib_univ_radiobut.obj \ + $(OBJS)\corelib_scrarrow.obj \ + $(OBJS)\corelib_univ_scrolbar.obj \ + $(OBJS)\corelib_scrthumb.obj \ + $(OBJS)\corelib_settingsuniv.obj \ + $(OBJS)\corelib_univ_slider.obj \ + $(OBJS)\corelib_univ_spinbutt.obj \ + $(OBJS)\corelib_univ_statbmp.obj \ + $(OBJS)\corelib_univ_statbox.obj \ + $(OBJS)\corelib_univ_statline.obj \ + $(OBJS)\corelib_univ_stattext.obj \ + $(OBJS)\corelib_univ_statusbr.obj \ + $(OBJS)\corelib_stdrend.obj \ + $(OBJS)\corelib_univ_textctrl.obj \ + $(OBJS)\corelib_univ_tglbtn.obj \ + $(OBJS)\corelib_theme.obj \ + $(OBJS)\corelib_univ_toolbar.obj \ + $(OBJS)\corelib_topluniv.obj \ + $(OBJS)\corelib_winuniv.obj \ + $(OBJS)\corelib_gtk.obj \ + $(OBJS)\corelib_metal.obj \ + $(OBJS)\corelib_mono.obj \ + $(OBJS)\corelib_win32.obj \ + $(OBJS)\corelib_accelcmn.obj \ + $(OBJS)\corelib_accesscmn.obj \ + $(OBJS)\corelib_anidecod.obj \ + $(OBJS)\corelib_affinematrix2d.obj \ + $(OBJS)\corelib_appcmn.obj \ + $(OBJS)\corelib_artprov.obj \ + $(OBJS)\corelib_artstd.obj \ + $(OBJS)\corelib_arttango.obj \ + $(OBJS)\corelib_bmpbase.obj \ + $(OBJS)\corelib_bmpbtncmn.obj \ + $(OBJS)\corelib_bookctrl.obj \ + $(OBJS)\corelib_btncmn.obj \ + $(OBJS)\corelib_cairo.obj \ + $(OBJS)\corelib_checkboxcmn.obj \ + $(OBJS)\corelib_checklstcmn.obj \ + $(OBJS)\corelib_choiccmn.obj \ + $(OBJS)\corelib_clipcmn.obj \ + $(OBJS)\corelib_clrpickercmn.obj \ + $(OBJS)\corelib_colourcmn.obj \ + $(OBJS)\corelib_colourdata.obj \ + $(OBJS)\corelib_combocmn.obj \ + $(OBJS)\corelib_cmdproc.obj \ + $(OBJS)\corelib_cmndata.obj \ + $(OBJS)\corelib_containr.obj \ + $(OBJS)\corelib_cshelp.obj \ + $(OBJS)\corelib_ctrlcmn.obj \ + $(OBJS)\corelib_ctrlsub.obj \ + $(OBJS)\corelib_dcbase.obj \ + $(OBJS)\corelib_dcbufcmn.obj \ + $(OBJS)\corelib_dcgraph.obj \ + $(OBJS)\corelib_dcsvg.obj \ + $(OBJS)\corelib_dirctrlcmn.obj \ + $(OBJS)\corelib_dlgcmn.obj \ + $(OBJS)\corelib_dndcmn.obj \ + $(OBJS)\corelib_dobjcmn.obj \ + $(OBJS)\corelib_docmdi.obj \ + $(OBJS)\corelib_docview.obj \ + $(OBJS)\corelib_dpycmn.obj \ + $(OBJS)\corelib_dseldlg.obj \ + $(OBJS)\corelib_effects.obj \ + $(OBJS)\corelib_fddlgcmn.obj \ + $(OBJS)\corelib_filectrlcmn.obj \ + $(OBJS)\corelib_filehistorycmn.obj \ + $(OBJS)\corelib_filepickercmn.obj \ + $(OBJS)\corelib_fontpickercmn.obj \ + $(OBJS)\corelib_fldlgcmn.obj \ + $(OBJS)\corelib_fontcmn.obj \ + $(OBJS)\corelib_fontdata.obj \ + $(OBJS)\corelib_graphicc.obj \ + $(OBJS)\corelib_fontenumcmn.obj \ + $(OBJS)\corelib_fontmap.obj \ + $(OBJS)\corelib_fontutilcmn.obj \ + $(OBJS)\corelib_framecmn.obj \ + $(OBJS)\corelib_gaugecmn.obj \ + $(OBJS)\corelib_gbsizer.obj \ + $(OBJS)\corelib_gdicmn.obj \ + $(OBJS)\corelib_geometry.obj \ + $(OBJS)\corelib_gifdecod.obj \ + $(OBJS)\corelib_graphcmn.obj \ + $(OBJS)\corelib_headercolcmn.obj \ + $(OBJS)\corelib_headerctrlcmn.obj \ + $(OBJS)\corelib_helpbase.obj \ + $(OBJS)\corelib_iconbndl.obj \ + $(OBJS)\corelib_imagall.obj \ + $(OBJS)\corelib_imagbmp.obj \ + $(OBJS)\corelib_image.obj \ + $(OBJS)\corelib_imagfill.obj \ + $(OBJS)\corelib_imaggif.obj \ + $(OBJS)\corelib_imagiff.obj \ + $(OBJS)\corelib_imagjpeg.obj \ + $(OBJS)\corelib_imagpcx.obj \ + $(OBJS)\corelib_imagpng.obj \ + $(OBJS)\corelib_imagpnm.obj \ + $(OBJS)\corelib_imagtga.obj \ + $(OBJS)\corelib_imagtiff.obj \ + $(OBJS)\corelib_imagxpm.obj \ + $(OBJS)\corelib_layout.obj \ + $(OBJS)\corelib_lboxcmn.obj \ + $(OBJS)\corelib_listctrlcmn.obj \ + $(OBJS)\corelib_markupparser.obj \ + $(OBJS)\corelib_matrix.obj \ + $(OBJS)\corelib_menucmn.obj \ + $(OBJS)\corelib_modalhook.obj \ + $(OBJS)\corelib_mousemanager.obj \ + $(OBJS)\corelib_nbkbase.obj \ + $(OBJS)\corelib_overlaycmn.obj \ + $(OBJS)\corelib_ownerdrwcmn.obj \ + $(OBJS)\corelib_paper.obj \ + $(OBJS)\corelib_panelcmn.obj \ + $(OBJS)\corelib_persist.obj \ + $(OBJS)\corelib_pickerbase.obj \ + $(OBJS)\corelib_popupcmn.obj \ + $(OBJS)\corelib_preferencescmn.obj \ + $(OBJS)\corelib_prntbase.obj \ + $(OBJS)\corelib_quantize.obj \ + $(OBJS)\corelib_radiobtncmn.obj \ + $(OBJS)\corelib_radiocmn.obj \ + $(OBJS)\corelib_rearrangectrl.obj \ + $(OBJS)\corelib_rendcmn.obj \ + $(OBJS)\corelib_rgncmn.obj \ + $(OBJS)\corelib_scrolbarcmn.obj \ + $(OBJS)\corelib_settcmn.obj \ + $(OBJS)\corelib_sizer.obj \ + $(OBJS)\corelib_slidercmn.obj \ + $(OBJS)\corelib_spinbtncmn.obj \ + $(OBJS)\corelib_spinctrlcmn.obj \ + $(OBJS)\corelib_srchcmn.obj \ + $(OBJS)\corelib_statbar.obj \ + $(OBJS)\corelib_statbmpcmn.obj \ + $(OBJS)\corelib_statboxcmn.obj \ + $(OBJS)\corelib_statlinecmn.obj \ + $(OBJS)\corelib_stattextcmn.obj \ + $(OBJS)\corelib_stockitem.obj \ + $(OBJS)\corelib_tbarbase.obj \ + $(OBJS)\corelib_textcmn.obj \ + $(OBJS)\corelib_textentrycmn.obj \ + $(OBJS)\corelib_textmeasurecmn.obj \ + $(OBJS)\corelib_toplvcmn.obj \ + $(OBJS)\corelib_treebase.obj \ + $(OBJS)\corelib_uiactioncmn.obj \ + $(OBJS)\corelib_valgen.obj \ + $(OBJS)\corelib_validate.obj \ + $(OBJS)\corelib_valtext.obj \ + $(OBJS)\corelib_valnum.obj \ + $(OBJS)\corelib_wincmn.obj \ + $(OBJS)\corelib_windowid.obj \ + $(OBJS)\corelib_wrapsizer.obj \ + $(OBJS)\corelib_xpmdecod.obj \ + $(OBJS)\corelib_busyinfo.obj \ + $(OBJS)\corelib_buttonbar.obj \ + $(OBJS)\corelib_choicdgg.obj \ + $(OBJS)\corelib_choicbkg.obj \ + $(OBJS)\corelib_combog.obj \ + $(OBJS)\corelib_dcpsg.obj \ + $(OBJS)\corelib_dirctrlg.obj \ + $(OBJS)\corelib_dragimgg.obj \ + $(OBJS)\corelib_filectrlg.obj \ + $(OBJS)\corelib_headerctrlg.obj \ + $(OBJS)\corelib_infobar.obj \ + $(OBJS)\corelib_listbkg.obj \ + $(OBJS)\corelib_logg.obj \ + $(OBJS)\corelib_markuptext.obj \ + $(OBJS)\corelib_msgdlgg.obj \ + $(OBJS)\corelib_numdlgg.obj \ + $(OBJS)\corelib_progdlgg.obj \ + $(OBJS)\corelib_preferencesg.obj \ + $(OBJS)\corelib_printps.obj \ + $(OBJS)\corelib_renderg.obj \ + $(OBJS)\corelib_richmsgdlgg.obj \ + $(OBJS)\corelib_scrlwing.obj \ + $(OBJS)\corelib_selstore.obj \ + $(OBJS)\corelib_spinctlg.obj \ + $(OBJS)\corelib_splitter.obj \ + $(OBJS)\corelib_srchctlg.obj \ + $(OBJS)\corelib_statbmpg.obj \ + $(OBJS)\corelib_stattextg.obj \ + $(OBJS)\corelib_textdlgg.obj \ + $(OBJS)\corelib_tipwin.obj \ + $(OBJS)\corelib_toolbkg.obj \ + $(OBJS)\corelib_treectlg.obj \ + $(OBJS)\corelib_treebkg.obj \ + $(OBJS)\corelib_vlbox.obj \ + $(OBJS)\corelib_vscroll.obj \ + $(OBJS)\corelib_xmlreshandler.obj +!endif +!if "$(SHARED)" == "1" +____wxcore_namedll_DEP = $(__coredll___depname) +!endif +!if "$(SHARED)" == "0" +____wxcore_namelib_DEP = $(__corelib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" +__advdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(WXUNIV)" == "0" +____ADVANCED_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\advdll_animatecmn.obj \ + $(OBJS)\advdll_bmpcboxcmn.obj \ + $(OBJS)\advdll_calctrlcmn.obj \ + $(OBJS)\advdll_datavcmn.obj \ + $(OBJS)\advdll_gridcmn.obj \ + $(OBJS)\advdll_hyperlnkcmn.obj \ + $(OBJS)\advdll_odcombocmn.obj \ + $(OBJS)\advdll_richtooltipcmn.obj \ + $(OBJS)\advdll_aboutdlgg.obj \ + $(OBJS)\advdll_bannerwindow.obj \ + $(OBJS)\advdll_bmpcboxg.obj \ + $(OBJS)\advdll_calctrlg.obj \ + $(OBJS)\advdll_commandlinkbuttong.obj \ + $(OBJS)\advdll_datavgen.obj \ + $(OBJS)\advdll_datectlg.obj \ + $(OBJS)\advdll_editlbox.obj \ + $(OBJS)\advdll_grid.obj \ + $(OBJS)\advdll_gridctrl.obj \ + $(OBJS)\advdll_grideditors.obj \ + $(OBJS)\advdll_gridsel.obj \ + $(OBJS)\advdll_helpext.obj \ + $(OBJS)\advdll_hyperlinkg.obj \ + $(OBJS)\advdll_laywin.obj \ + $(OBJS)\advdll_notifmsgg.obj \ + $(OBJS)\advdll_odcombo.obj \ + $(OBJS)\advdll_propdlg.obj \ + $(OBJS)\advdll_richtooltipg.obj \ + $(OBJS)\advdll_sashwin.obj \ + $(OBJS)\advdll_splash.obj \ + $(OBJS)\advdll_timectrlg.obj \ + $(OBJS)\advdll_tipdlg.obj \ + $(OBJS)\advdll_treelist.obj \ + $(OBJS)\advdll_wizard.obj \ + $(OBJS)\advdll_taskbarcmn.obj \ + $(OBJS)\advdll_aboutdlg.obj \ + $(OBJS)\advdll_notifmsg.obj \ + $(OBJS)\advdll_richtooltip.obj \ + $(OBJS)\advdll_sound.obj \ + $(OBJS)\advdll_taskbar.obj \ + $(OBJS)\advdll_joystick.obj \ + $(OBJS)\advdll_animateg.obj \ + $(OBJS)\advdll_bmpcbox.obj \ + $(OBJS)\advdll_calctrl.obj \ + $(OBJS)\advdll_commandlinkbutton.obj \ + $(OBJS)\advdll_datecontrols.obj \ + $(OBJS)\advdll_datectrl.obj \ + $(OBJS)\advdll_datetimectrl.obj \ + $(OBJS)\advdll_hyperlink.obj \ + $(OBJS)\advdll_timectrl.obj +!endif +!if "$(WXUNIV)" == "1" +____ADVANCED_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\advdll_animatecmn.obj \ + $(OBJS)\advdll_bmpcboxcmn.obj \ + $(OBJS)\advdll_calctrlcmn.obj \ + $(OBJS)\advdll_datavcmn.obj \ + $(OBJS)\advdll_gridcmn.obj \ + $(OBJS)\advdll_hyperlnkcmn.obj \ + $(OBJS)\advdll_odcombocmn.obj \ + $(OBJS)\advdll_richtooltipcmn.obj \ + $(OBJS)\advdll_aboutdlgg.obj \ + $(OBJS)\advdll_bannerwindow.obj \ + $(OBJS)\advdll_bmpcboxg.obj \ + $(OBJS)\advdll_calctrlg.obj \ + $(OBJS)\advdll_commandlinkbuttong.obj \ + $(OBJS)\advdll_datavgen.obj \ + $(OBJS)\advdll_datectlg.obj \ + $(OBJS)\advdll_editlbox.obj \ + $(OBJS)\advdll_grid.obj \ + $(OBJS)\advdll_gridctrl.obj \ + $(OBJS)\advdll_grideditors.obj \ + $(OBJS)\advdll_gridsel.obj \ + $(OBJS)\advdll_helpext.obj \ + $(OBJS)\advdll_hyperlinkg.obj \ + $(OBJS)\advdll_laywin.obj \ + $(OBJS)\advdll_notifmsgg.obj \ + $(OBJS)\advdll_odcombo.obj \ + $(OBJS)\advdll_propdlg.obj \ + $(OBJS)\advdll_richtooltipg.obj \ + $(OBJS)\advdll_sashwin.obj \ + $(OBJS)\advdll_splash.obj \ + $(OBJS)\advdll_timectrlg.obj \ + $(OBJS)\advdll_tipdlg.obj \ + $(OBJS)\advdll_treelist.obj \ + $(OBJS)\advdll_wizard.obj \ + $(OBJS)\advdll_taskbarcmn.obj \ + $(OBJS)\advdll_aboutdlg.obj \ + $(OBJS)\advdll_notifmsg.obj \ + $(OBJS)\advdll_richtooltip.obj \ + $(OBJS)\advdll_sound.obj \ + $(OBJS)\advdll_taskbar.obj \ + $(OBJS)\advdll_joystick.obj \ + $(OBJS)\advdll_animateg.obj +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" +__advlib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib +!endif +!if "$(WXUNIV)" == "0" +____ADVANCED_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\advlib_animatecmn.obj \ + $(OBJS)\advlib_bmpcboxcmn.obj \ + $(OBJS)\advlib_calctrlcmn.obj \ + $(OBJS)\advlib_datavcmn.obj \ + $(OBJS)\advlib_gridcmn.obj \ + $(OBJS)\advlib_hyperlnkcmn.obj \ + $(OBJS)\advlib_odcombocmn.obj \ + $(OBJS)\advlib_richtooltipcmn.obj \ + $(OBJS)\advlib_aboutdlgg.obj \ + $(OBJS)\advlib_bannerwindow.obj \ + $(OBJS)\advlib_bmpcboxg.obj \ + $(OBJS)\advlib_calctrlg.obj \ + $(OBJS)\advlib_commandlinkbuttong.obj \ + $(OBJS)\advlib_datavgen.obj \ + $(OBJS)\advlib_datectlg.obj \ + $(OBJS)\advlib_editlbox.obj \ + $(OBJS)\advlib_grid.obj \ + $(OBJS)\advlib_gridctrl.obj \ + $(OBJS)\advlib_grideditors.obj \ + $(OBJS)\advlib_gridsel.obj \ + $(OBJS)\advlib_helpext.obj \ + $(OBJS)\advlib_hyperlinkg.obj \ + $(OBJS)\advlib_laywin.obj \ + $(OBJS)\advlib_notifmsgg.obj \ + $(OBJS)\advlib_odcombo.obj \ + $(OBJS)\advlib_propdlg.obj \ + $(OBJS)\advlib_richtooltipg.obj \ + $(OBJS)\advlib_sashwin.obj \ + $(OBJS)\advlib_splash.obj \ + $(OBJS)\advlib_timectrlg.obj \ + $(OBJS)\advlib_tipdlg.obj \ + $(OBJS)\advlib_treelist.obj \ + $(OBJS)\advlib_wizard.obj \ + $(OBJS)\advlib_taskbarcmn.obj \ + $(OBJS)\advlib_aboutdlg.obj \ + $(OBJS)\advlib_notifmsg.obj \ + $(OBJS)\advlib_richtooltip.obj \ + $(OBJS)\advlib_sound.obj \ + $(OBJS)\advlib_taskbar.obj \ + $(OBJS)\advlib_joystick.obj \ + $(OBJS)\advlib_animateg.obj \ + $(OBJS)\advlib_bmpcbox.obj \ + $(OBJS)\advlib_calctrl.obj \ + $(OBJS)\advlib_commandlinkbutton.obj \ + $(OBJS)\advlib_datecontrols.obj \ + $(OBJS)\advlib_datectrl.obj \ + $(OBJS)\advlib_datetimectrl.obj \ + $(OBJS)\advlib_hyperlink.obj \ + $(OBJS)\advlib_timectrl.obj +!endif +!if "$(WXUNIV)" == "1" +____ADVANCED_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\advlib_animatecmn.obj \ + $(OBJS)\advlib_bmpcboxcmn.obj \ + $(OBJS)\advlib_calctrlcmn.obj \ + $(OBJS)\advlib_datavcmn.obj \ + $(OBJS)\advlib_gridcmn.obj \ + $(OBJS)\advlib_hyperlnkcmn.obj \ + $(OBJS)\advlib_odcombocmn.obj \ + $(OBJS)\advlib_richtooltipcmn.obj \ + $(OBJS)\advlib_aboutdlgg.obj \ + $(OBJS)\advlib_bannerwindow.obj \ + $(OBJS)\advlib_bmpcboxg.obj \ + $(OBJS)\advlib_calctrlg.obj \ + $(OBJS)\advlib_commandlinkbuttong.obj \ + $(OBJS)\advlib_datavgen.obj \ + $(OBJS)\advlib_datectlg.obj \ + $(OBJS)\advlib_editlbox.obj \ + $(OBJS)\advlib_grid.obj \ + $(OBJS)\advlib_gridctrl.obj \ + $(OBJS)\advlib_grideditors.obj \ + $(OBJS)\advlib_gridsel.obj \ + $(OBJS)\advlib_helpext.obj \ + $(OBJS)\advlib_hyperlinkg.obj \ + $(OBJS)\advlib_laywin.obj \ + $(OBJS)\advlib_notifmsgg.obj \ + $(OBJS)\advlib_odcombo.obj \ + $(OBJS)\advlib_propdlg.obj \ + $(OBJS)\advlib_richtooltipg.obj \ + $(OBJS)\advlib_sashwin.obj \ + $(OBJS)\advlib_splash.obj \ + $(OBJS)\advlib_timectrlg.obj \ + $(OBJS)\advlib_tipdlg.obj \ + $(OBJS)\advlib_treelist.obj \ + $(OBJS)\advlib_wizard.obj \ + $(OBJS)\advlib_taskbarcmn.obj \ + $(OBJS)\advlib_aboutdlg.obj \ + $(OBJS)\advlib_notifmsg.obj \ + $(OBJS)\advlib_richtooltip.obj \ + $(OBJS)\advlib_sound.obj \ + $(OBJS)\advlib_taskbar.obj \ + $(OBJS)\advlib_joystick.obj \ + $(OBJS)\advlib_animateg.obj +!endif +!if "$(SHARED)" == "1" +____wxadv_namedll_DEP = $(__advdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxadv_namelib_DEP = $(__advlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" +__mediadll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" +__medialib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib +!endif +!if "$(SHARED)" == "1" +____wxmedia_namedll_DEP = $(__mediadll___depname) +!endif +!if "$(SHARED)" == "0" +____wxmedia_namelib_DEP = $(__medialib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +__htmldll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +__htmllib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib +!endif +!if "$(SHARED)" == "1" +____wxhtml_namedll_DEP = $(__htmldll___depname) +!endif +!if "$(SHARED)" == "0" +____wxhtml_namelib_DEP = $(__htmllib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_WEBVIEW)" == "1" +__webviewdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_WEBVIEW)" == "1" +__webviewlib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib +!endif +!if "$(SHARED)" == "1" +____wxwebview_namedll_DEP = $(__webviewdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxwebview_namelib_DEP = $(__webviewlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_QA)" == "1" +__qadll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_QA)" == "1" +__qalib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib +!endif +!if "$(SHARED)" == "1" +____wxqa_namedll_DEP = $(__qadll___depname) +!endif +!if "$(SHARED)" == "0" +____wxqa_namelib_DEP = $(__qalib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +__xmldll___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +__xmllib___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib +!endif +!if "$(SHARED)" == "1" +____wxxml_namedll_DEP = $(__xmldll___depname) +!endif +!if "$(SHARED)" == "0" +____wxxml_namelib_DEP = $(__xmllib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_XRC)" == "1" +__xrcdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_XRC)" == "1" +__xrclib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib +!endif +!if "$(SHARED)" == "1" +____wxxrc_namedll_DEP = $(__xrcdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxxrc_namelib_DEP = $(__xrclib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_AUI)" == "1" +__auidll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_AUI)" == "1" +__auilib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib +!endif +!if "$(SHARED)" == "1" +____wxaui_namedll_DEP = $(__auidll___depname) +!endif +!if "$(SHARED)" == "0" +____wxaui_namelib_DEP = $(__auilib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RIBBON)" == "1" +__ribbondll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_RIBBON)" == "1" +__ribbonlib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib +!endif +!if "$(SHARED)" == "1" +____wxribbon_namedll_DEP = $(__ribbondll___depname) +!endif +!if "$(SHARED)" == "0" +____wxribbon_namelib_DEP = $(__ribbonlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_PROPGRID)" == "1" +__propgriddll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_PROPGRID)" == "1" +__propgridlib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib +!endif +!if "$(SHARED)" == "1" +____wxpropgrid_namedll_DEP = $(__propgriddll___depname) +!endif +!if "$(SHARED)" == "0" +____wxpropgrid_namelib_DEP = $(__propgridlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RICHTEXT)" == "1" +__richtextdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_RICHTEXT)" == "1" +__richtextlib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib +!endif +!if "$(SHARED)" == "1" +____wxrichtext_namedll_DEP = $(__richtextdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxrichtext_namelib_DEP = $(__richtextlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_STC)" == "1" +__stcdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_STC)" == "1" +__stclib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib +!endif +!if "$(SHARED)" == "1" +____wxstc_namedll_DEP = $(__stcdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxstc_namelib_DEP = $(__stclib___depname) +!endif +!if "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" +__gldll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIBGLDEP_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIBGLDEP_BASE_p = \ + wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(MONOLITHIC)" == "1" +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" +__gllib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib +!endif +!if "$(SHARED)" == "1" +____wxgl_namedll_DEP = $(__gldll___depname) +!endif +!if "$(SHARED)" == "0" +____wxgl_namelib_DEP = $(__gllib___depname) +!endif +!if "$(USE_STC)" == "1" +__wxscintilla = $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +__htmldll_library_link_DEP = $(__htmldll___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +__htmldll_library_link_LIBR = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib +!endif +!if "$(USE_THREADS)" == "0" +__THREADSFLAG_14 = +!endif +!if "$(USE_THREADS)" == "1" +__THREADSFLAG_14 = mt +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_5 = i +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_5 = +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p_67 = -d__WXUNIVERSAL__ +!endif +!if "$(DEBUG_FLAG)" == "0" +__DEBUG_DEFINE_p_66 = -dwxDEBUG_LEVEL=0 +!endif +!if "$(BUILD)" == "release" +__NDEBUG_DEFINE_p_65 = -dNDEBUG +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p_65 = -dwxNO_EXCEPTIONS +!endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p_65 = -dwxNO_RTTI +!endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p_65 = -dwxNO_THREADS +!endif +!if "$(UNICODE)" == "0" +__UNICODE_DEFINE_p_67 = -dwxUSE_UNICODE=0 +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p_67 = -d_UNICODE +!endif +!if "$(MSLU)" == "1" +__MSLU_DEFINE_p_65 = -dwxUSE_UNICODE_MSLU=1 +!endif +!if "$(USE_CAIRO)" == "1" +____CAIRO_INCLUDEDIR_FILENAMES_4 = -i$(CAIRO_ROOT)\include\cairo +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(MSLU)" == "1" +__UNICOWS_LIB_p = unicows.lib +!endif +!if "$(USE_CAIRO)" == "1" +__CAIRO_LIB_p = cairo.lib +!endif +!if "$(USE_CAIRO)" == "1" +____CAIRO_LIBDIR_FILENAMES = -L$(CAIRO_ROOT)\lib +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" +__OPTIMIZEFLAG = -Od +!endif +!if "$(BUILD)" == "release" +__OPTIMIZEFLAG = -O2 +!endif +!if "$(USE_THREADS)" == "0" +__THREADSFLAG = +!endif +!if "$(USE_THREADS)" == "1" +__THREADSFLAG = -tWM +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS = -tWR +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS = +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ +!endif +!if "$(DEBUG_FLAG)" == "0" +__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0 +!endif +!if "$(BUILD)" == "release" +__NDEBUG_DEFINE_p = -DNDEBUG +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS +!endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p = -DwxNO_RTTI +!endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p = -DwxNO_THREADS +!endif +!if "$(UNICODE)" == "0" +__UNICODE_DEFINE_p = -DwxUSE_UNICODE=0 +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p = -D_UNICODE +!endif +!if "$(MSLU)" == "1" +__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1 +!endif +!if "$(USE_CAIRO)" == "1" +____CAIRO_INCLUDEDIR_FILENAMES = -I$(CAIRO_ROOT)\include\cairo +!endif +!if "$(WXUNIV)" == "0" +__SETUP_H_SUBDIR_FILENAMES = msw +!endif +!if "$(WXUNIV)" == "1" +__SETUP_H_SUBDIR_FILENAMES = univ +!endif + + +all: $(OBJS) +$(OBJS): + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all: setup_h $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(__wxscintilla) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) build_cfg_file + +clean: + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\*.csm del $(OBJS)\*.csm + -if exist $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib + @echo cd ..\..\samples >$(OBJS)\samples.bat + @echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>$(OBJS)\samples.bat + call $(OBJS)\samples.bat + @del $(OBJS)\samples.bat + +setup_h: $(SETUPHDIR)\wx ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h $(SETUPHDIR)\wx\setup.h $(SETUPHDIR)\wx\msw\rcdefs.h + +$(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib: $(WXREGEX_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(WXREGEX_OBJECTS) +| + +$(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib: $(WXZLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(WXZLIB_OBJECTS) +| + +!if "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib: $(WXPNG_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(WXPNG_OBJECTS) +| +!endif + +!if "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib: $(WXJPEG_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(WXJPEG_OBJECTS) +| +!endif + +!if "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib: $(WXTIFF_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(WXTIFF_OBJECTS) +| +!endif + +$(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib: $(WXEXPAT_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(WXEXPAT_OBJECTS) +| + +!if "$(USE_STC)" == "1" +$(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib: $(WXSCINTILLA_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(WXSCINTILLA_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\monodll_dummy.obj $(MONODLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\monodll_version.res $(__wxscintilla_library_link_DEP) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(MONODLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(__wxscintilla) import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\monodll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR) $@ +!endif + +!if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "0" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib: $(OBJS)\monolib_dummy.obj $(MONOLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(MONOLIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\basedll_dummy.obj $(BASEDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\basedll_version.res + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(BASEDLL_OBJECTS),$@,, wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\basedll_version.res +| + implib -f $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR) $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib: $(OBJS)\baselib_dummy.obj $(BASELIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(BASELIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" +wxbase: $(____wxbase_namedll_DEP) $(____wxbase_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\netdll_dummy.obj $(NETDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\netdll_version.res $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(NETDLL_OBJECTS),$@,, wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\netdll_version.res +| + implib -f $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib: $(OBJS)\netlib_dummy.obj $(NETLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(NETLIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" +wxnet: $(____wxnet_namedll_DEP) $(____wxnet_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\coredll_dummy.obj $(COREDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\coredll_version.res $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(COREDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\coredll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib: $(OBJS)\corelib_dummy.obj $(CORELIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(CORELIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_GUI)" == "1" +wxcore: $(____wxcore_namedll_DEP) $(____wxcore_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\advdll_dummy.obj $(ADVDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\advdll_version.res $(__coredll___depname) $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(ADVDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\advdll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib: $(OBJS)\advlib_dummy.obj $(ADVLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(ADVLIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_GUI)" == "1" +wxadv: $(____wxadv_namedll_DEP) $(____wxadv_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\mediadll_dummy.obj $(MEDIADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\mediadll_version.res $(__coredll___depname) $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(MEDIADLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\mediadll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib: $(OBJS)\medialib_dummy.obj $(MEDIALIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(MEDIALIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" +wxmedia: $(____wxmedia_namedll_DEP) $(____wxmedia_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\htmldll_dummy.obj $(HTMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\htmldll_version.res $(__coredll___depname) $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(HTMLDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\htmldll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib: $(OBJS)\htmllib_dummy.obj $(HTMLLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(HTMLLIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_HTML)" == "1" +wxhtml: $(____wxhtml_namedll_DEP) $(____wxhtml_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_WEBVIEW)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\webviewdll_dummy.obj $(WEBVIEWDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\webviewdll_version.res $(__coredll___depname) $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(WEBVIEWDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\webviewdll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_WEBVIEW)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib: $(OBJS)\webviewlib_dummy.obj $(WEBVIEWLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(WEBVIEWLIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_WEBVIEW)" == "1" +wxwebview: $(____wxwebview_namedll_DEP) $(____wxwebview_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_QA)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\qadll_dummy.obj $(QADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\qadll_version.res $(__coredll___depname) $(__basedll___depname) $(__xmldll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(QADLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\qadll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_QA)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib: $(OBJS)\qalib_dummy.obj $(QALIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(QALIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_QA)" == "1" +wxqa: $(____wxqa_namedll_DEP) $(____wxqa_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xmldll_dummy.obj $(XMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xmldll_version.res $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(XMLDLL_OBJECTS),$@,, wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\xmldll_version.res +| + implib -f $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib: $(OBJS)\xmllib_dummy.obj $(XMLLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(XMLLIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" +wxxml: $(____wxxml_namedll_DEP) $(____wxxml_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_XRC)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xrcdll_dummy.obj $(XRCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xrcdll_version.res $(__htmldll_library_link_DEP) $(__advdll___depname) $(__coredll___depname) $(__xmldll___depname) $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(XRCDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\xrcdll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_XRC)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib: $(OBJS)\xrclib_dummy.obj $(XRCLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(XRCLIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_XRC)" == "1" +wxxrc: $(____wxxrc_namedll_DEP) $(____wxxrc_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_AUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\auidll_dummy.obj $(AUIDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\auidll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(AUIDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\auidll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_AUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib: $(OBJS)\auilib_dummy.obj $(AUILIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(AUILIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_AUI)" == "1" +wxaui: $(____wxaui_namedll_DEP) $(____wxaui_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RIBBON)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\ribbondll_dummy.obj $(RIBBONDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\ribbondll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(RIBBONDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\ribbondll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_RIBBON)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib: $(OBJS)\ribbonlib_dummy.obj $(RIBBONLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(RIBBONLIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_RIBBON)" == "1" +wxribbon: $(____wxribbon_namedll_DEP) $(____wxribbon_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_PROPGRID)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\propgriddll_dummy.obj $(PROPGRIDDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\propgriddll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(PROPGRIDDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\propgriddll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_PROPGRID)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib: $(OBJS)\propgridlib_dummy.obj $(PROPGRIDLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(PROPGRIDLIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_PROPGRID)" == "1" +wxpropgrid: $(____wxpropgrid_namedll_DEP) $(____wxpropgrid_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RICHTEXT)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\richtextdll_dummy.obj $(RICHTEXTDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\richtextdll_version.res $(__advdll___depname) $(__htmldll_library_link_DEP) $(__xmldll___depname) $(__coredll___depname) $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(RICHTEXTDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\richtextdll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_RICHTEXT)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib: $(OBJS)\richtextlib_dummy.obj $(RICHTEXTLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(RICHTEXTLIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_RICHTEXT)" == "1" +wxrichtext: $(____wxrichtext_namedll_DEP) $(____wxrichtext_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_STC)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\stcdll_dummy.obj $(STCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(__wxscintilla) $(OBJS)\stcdll_version.res $(__coredll___depname) $(__basedll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(STCDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\stcdll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc $@ +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_STC)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib: $(OBJS)\stclib_dummy.obj $(STCLIB_OBJECTS) $(__wxscintilla) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(STCLIB_OBJECTS) +| +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_STC)" == "1" +wxstc: $(____wxstc_namedll_DEP) $(____wxstc_namelib_DEP) +!endif + +!if "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\gldll_dummy.obj $(GLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\gldll_version.res $(__basedll___depname) $(__coredll___depname) $(__monodll___depname) + ilink32 -Tpd -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| + c0d32.obj $(GLDLL_OBJECTS),$@,, $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) import32.lib cw32$(__THREADSFLAG_14)$(__RUNTIME_LIBS_5).lib,, $(OBJS)\gldll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl $@ +!endif + +!if "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib: $(OBJS)\gllib_dummy.obj $(GLLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(GLLIB_OBJECTS) +| +!endif + +!if "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" +wxgl: $(____wxgl_namedll_DEP) $(____wxgl_namelib_DEP) +!endif + +samples: + @echo cd ..\..\samples >$(OBJS)\samples.bat + @echo $(MAKE) -f makefile.bcc $(MAKEARGS) all >>$(OBJS)\samples.bat + call $(OBJS)\samples.bat + @del $(OBJS)\samples.bat + +$(LIBDIRNAME): + if not exist $(LIBDIRNAME) mkdir $(LIBDIRNAME) + +$(SETUPHDIR): $(LIBDIRNAME) + if not exist $(SETUPHDIR) mkdir $(SETUPHDIR) + +$(SETUPHDIR)\wx: $(SETUPHDIR) + if not exist $(SETUPHDIR)\wx mkdir $(SETUPHDIR)\wx + +..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h: + if not exist ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h copy ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup0.h ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h + +$(SETUPHDIR)\wx\setup.h: + if not exist $(SETUPHDIR)\wx\setup.h copy ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h $(SETUPHDIR)\wx\setup.h + +$(SETUPHDIR)\wx\msw: $(SETUPHDIR)\wx + if not exist $(SETUPHDIR)\wx\msw mkdir $(SETUPHDIR)\wx\msw + +$(SETUPHDIR)\wx\msw\rcdefs.h: $(SETUPHDIR)\wx\msw ..\..\include\wx\msw\genrcdefs.h + $(CPP) "..\..\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" + +build_cfg_file: $(SETUPHDIR) + @echo WXVER_MAJOR=3 >$(BUILD_CFG_FILE) + @echo WXVER_MINOR=0 >>$(BUILD_CFG_FILE) + @echo WXVER_RELEASE=1 >>$(BUILD_CFG_FILE) + @echo BUILD=$(BUILD) >>$(BUILD_CFG_FILE) + @echo MONOLITHIC=$(MONOLITHIC) >>$(BUILD_CFG_FILE) + @echo SHARED=$(SHARED) >>$(BUILD_CFG_FILE) + @echo UNICODE=$(UNICODE) >>$(BUILD_CFG_FILE) + @echo TOOLKIT=MSW >>$(BUILD_CFG_FILE) + @echo TOOLKIT_VERSION=$(TOOLKIT_VERSION) >>$(BUILD_CFG_FILE) + @echo WXUNIV=$(WXUNIV) >>$(BUILD_CFG_FILE) + @echo CFG=$(CFG) >>$(BUILD_CFG_FILE) + @echo VENDOR=$(VENDOR) >>$(BUILD_CFG_FILE) + @echo OFFICIAL_BUILD=$(OFFICIAL_BUILD) >>$(BUILD_CFG_FILE) + @echo DEBUG_FLAG=$(DEBUG_FLAG) >>$(BUILD_CFG_FILE) + @echo DEBUG_INFO=$(DEBUG_INFO) >>$(BUILD_CFG_FILE) + @echo RUNTIME_LIBS=$(RUNTIME_LIBS) >>$(BUILD_CFG_FILE) + @echo MSLU=$(MSLU) >>$(BUILD_CFG_FILE) + @echo USE_EXCEPTIONS=$(USE_EXCEPTIONS) >>$(BUILD_CFG_FILE) + @echo USE_RTTI=$(USE_RTTI) >>$(BUILD_CFG_FILE) + @echo USE_THREADS=$(USE_THREADS) >>$(BUILD_CFG_FILE) + @echo USE_AUI=$(USE_AUI) >>$(BUILD_CFG_FILE) + @echo USE_GUI=$(USE_GUI) >>$(BUILD_CFG_FILE) + @echo USE_HTML=$(USE_HTML) >>$(BUILD_CFG_FILE) + @echo USE_MEDIA=$(USE_MEDIA) >>$(BUILD_CFG_FILE) + @echo USE_OPENGL=$(USE_OPENGL) >>$(BUILD_CFG_FILE) + @echo USE_QA=$(USE_QA) >>$(BUILD_CFG_FILE) + @echo USE_PROPGRID=$(USE_PROPGRID) >>$(BUILD_CFG_FILE) + @echo USE_RIBBON=$(USE_RIBBON) >>$(BUILD_CFG_FILE) + @echo USE_RICHTEXT=$(USE_RICHTEXT) >>$(BUILD_CFG_FILE) + @echo USE_STC=$(USE_STC) >>$(BUILD_CFG_FILE) + @echo USE_WEBVIEW=$(USE_WEBVIEW) >>$(BUILD_CFG_FILE) + @echo USE_XRC=$(USE_XRC) >>$(BUILD_CFG_FILE) + @echo COMPILER=bcc >>$(BUILD_CFG_FILE) + @echo COMPILER_VERSION=$(COMPILER_VERSION) >>$(BUILD_CFG_FILE) + @echo CC=$(CC) >>$(BUILD_CFG_FILE) + @echo CXX=$(CXX) >>$(BUILD_CFG_FILE) + @echo CFLAGS=$(CFLAGS) >>$(BUILD_CFG_FILE) + @echo CPPFLAGS=$(CPPFLAGS) >>$(BUILD_CFG_FILE) + @echo CXXFLAGS=$(CXXFLAGS) >>$(BUILD_CFG_FILE) + @echo LDFLAGS=$(LDFLAGS) >>$(BUILD_CFG_FILE) + +$(OBJS)\wxregex_regcomp.obj: ..\..\src\regex\regcomp.c + $(CC) -q -c -P- -o$@ $(WXREGEX_CFLAGS) ..\..\src\regex\regcomp.c + +$(OBJS)\wxregex_regexec.obj: ..\..\src\regex\regexec.c + $(CC) -q -c -P- -o$@ $(WXREGEX_CFLAGS) ..\..\src\regex\regexec.c + +$(OBJS)\wxregex_regerror.obj: ..\..\src\regex\regerror.c + $(CC) -q -c -P- -o$@ $(WXREGEX_CFLAGS) ..\..\src\regex\regerror.c + +$(OBJS)\wxregex_regfree.obj: ..\..\src\regex\regfree.c + $(CC) -q -c -P- -o$@ $(WXREGEX_CFLAGS) ..\..\src\regex\regfree.c + +$(OBJS)\wxzlib_adler32.obj: ..\..\src\zlib\adler32.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\adler32.c + +$(OBJS)\wxzlib_compress.obj: ..\..\src\zlib\compress.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\compress.c + +$(OBJS)\wxzlib_crc32.obj: ..\..\src\zlib\crc32.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\crc32.c + +$(OBJS)\wxzlib_deflate.obj: ..\..\src\zlib\deflate.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\deflate.c + +$(OBJS)\wxzlib_gzclose.obj: ..\..\src\zlib\gzclose.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzclose.c + +$(OBJS)\wxzlib_gzlib.obj: ..\..\src\zlib\gzlib.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzlib.c + +$(OBJS)\wxzlib_gzread.obj: ..\..\src\zlib\gzread.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzread.c + +$(OBJS)\wxzlib_gzwrite.obj: ..\..\src\zlib\gzwrite.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzwrite.c + +$(OBJS)\wxzlib_infback.obj: ..\..\src\zlib\infback.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\infback.c + +$(OBJS)\wxzlib_inffast.obj: ..\..\src\zlib\inffast.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inffast.c + +$(OBJS)\wxzlib_inflate.obj: ..\..\src\zlib\inflate.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inflate.c + +$(OBJS)\wxzlib_inftrees.obj: ..\..\src\zlib\inftrees.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inftrees.c + +$(OBJS)\wxzlib_trees.obj: ..\..\src\zlib\trees.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\trees.c + +$(OBJS)\wxzlib_uncompr.obj: ..\..\src\zlib\uncompr.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\uncompr.c + +$(OBJS)\wxzlib_zutil.obj: ..\..\src\zlib\zutil.c + $(CC) -q -c -P- -o$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\zutil.c + +$(OBJS)\wxpng_png.obj: ..\..\src\png\png.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\png.c + +$(OBJS)\wxpng_pngerror.obj: ..\..\src\png\pngerror.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngerror.c + +$(OBJS)\wxpng_pngget.obj: ..\..\src\png\pngget.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngget.c + +$(OBJS)\wxpng_pngmem.obj: ..\..\src\png\pngmem.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngmem.c + +$(OBJS)\wxpng_pngpread.obj: ..\..\src\png\pngpread.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngpread.c + +$(OBJS)\wxpng_pngread.obj: ..\..\src\png\pngread.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngread.c + +$(OBJS)\wxpng_pngrio.obj: ..\..\src\png\pngrio.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrio.c + +$(OBJS)\wxpng_pngrtran.obj: ..\..\src\png\pngrtran.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrtran.c + +$(OBJS)\wxpng_pngrutil.obj: ..\..\src\png\pngrutil.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrutil.c + +$(OBJS)\wxpng_pngset.obj: ..\..\src\png\pngset.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngset.c + +$(OBJS)\wxpng_pngtrans.obj: ..\..\src\png\pngtrans.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngtrans.c + +$(OBJS)\wxpng_pngwio.obj: ..\..\src\png\pngwio.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwio.c + +$(OBJS)\wxpng_pngwrite.obj: ..\..\src\png\pngwrite.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwrite.c + +$(OBJS)\wxpng_pngwtran.obj: ..\..\src\png\pngwtran.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwtran.c + +$(OBJS)\wxpng_pngwutil.obj: ..\..\src\png\pngwutil.c + $(CC) -q -c -P- -o$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwutil.c + +$(OBJS)\wxjpeg_jcomapi.obj: ..\..\src\jpeg\jcomapi.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcomapi.c + +$(OBJS)\wxjpeg_jutils.obj: ..\..\src\jpeg\jutils.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jutils.c + +$(OBJS)\wxjpeg_jerror.obj: ..\..\src\jpeg\jerror.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jerror.c + +$(OBJS)\wxjpeg_jmemmgr.obj: ..\..\src\jpeg\jmemmgr.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jmemmgr.c + +$(OBJS)\wxjpeg_jmemnobs.obj: ..\..\src\jpeg\jmemnobs.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jmemnobs.c + +$(OBJS)\wxjpeg_jcapimin.obj: ..\..\src\jpeg\jcapimin.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcapimin.c + +$(OBJS)\wxjpeg_jcapistd.obj: ..\..\src\jpeg\jcapistd.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcapistd.c + +$(OBJS)\wxjpeg_jctrans.obj: ..\..\src\jpeg\jctrans.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jctrans.c + +$(OBJS)\wxjpeg_jcparam.obj: ..\..\src\jpeg\jcparam.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcparam.c + +$(OBJS)\wxjpeg_jdatadst.obj: ..\..\src\jpeg\jdatadst.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdatadst.c + +$(OBJS)\wxjpeg_jcinit.obj: ..\..\src\jpeg\jcinit.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcinit.c + +$(OBJS)\wxjpeg_jcmaster.obj: ..\..\src\jpeg\jcmaster.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcmaster.c + +$(OBJS)\wxjpeg_jcmarker.obj: ..\..\src\jpeg\jcmarker.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcmarker.c + +$(OBJS)\wxjpeg_jcmainct.obj: ..\..\src\jpeg\jcmainct.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcmainct.c + +$(OBJS)\wxjpeg_jcprepct.obj: ..\..\src\jpeg\jcprepct.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcprepct.c + +$(OBJS)\wxjpeg_jccoefct.obj: ..\..\src\jpeg\jccoefct.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jccoefct.c + +$(OBJS)\wxjpeg_jccolor.obj: ..\..\src\jpeg\jccolor.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jccolor.c + +$(OBJS)\wxjpeg_jcsample.obj: ..\..\src\jpeg\jcsample.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcsample.c + +$(OBJS)\wxjpeg_jchuff.obj: ..\..\src\jpeg\jchuff.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jchuff.c + +$(OBJS)\wxjpeg_jcphuff.obj: ..\..\src\jpeg\jcphuff.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcphuff.c + +$(OBJS)\wxjpeg_jcdctmgr.obj: ..\..\src\jpeg\jcdctmgr.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcdctmgr.c + +$(OBJS)\wxjpeg_jfdctfst.obj: ..\..\src\jpeg\jfdctfst.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jfdctfst.c + +$(OBJS)\wxjpeg_jfdctflt.obj: ..\..\src\jpeg\jfdctflt.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jfdctflt.c + +$(OBJS)\wxjpeg_jfdctint.obj: ..\..\src\jpeg\jfdctint.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jfdctint.c + +$(OBJS)\wxjpeg_jdapimin.obj: ..\..\src\jpeg\jdapimin.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdapimin.c + +$(OBJS)\wxjpeg_jdapistd.obj: ..\..\src\jpeg\jdapistd.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdapistd.c + +$(OBJS)\wxjpeg_jdtrans.obj: ..\..\src\jpeg\jdtrans.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdtrans.c + +$(OBJS)\wxjpeg_jdatasrc.obj: ..\..\src\jpeg\jdatasrc.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdatasrc.c + +$(OBJS)\wxjpeg_jdmaster.obj: ..\..\src\jpeg\jdmaster.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdmaster.c + +$(OBJS)\wxjpeg_jdinput.obj: ..\..\src\jpeg\jdinput.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdinput.c + +$(OBJS)\wxjpeg_jdmarker.obj: ..\..\src\jpeg\jdmarker.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdmarker.c + +$(OBJS)\wxjpeg_jdhuff.obj: ..\..\src\jpeg\jdhuff.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdhuff.c + +$(OBJS)\wxjpeg_jdphuff.obj: ..\..\src\jpeg\jdphuff.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdphuff.c + +$(OBJS)\wxjpeg_jdmainct.obj: ..\..\src\jpeg\jdmainct.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdmainct.c + +$(OBJS)\wxjpeg_jdcoefct.obj: ..\..\src\jpeg\jdcoefct.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdcoefct.c + +$(OBJS)\wxjpeg_jdpostct.obj: ..\..\src\jpeg\jdpostct.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdpostct.c + +$(OBJS)\wxjpeg_jddctmgr.obj: ..\..\src\jpeg\jddctmgr.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jddctmgr.c + +$(OBJS)\wxjpeg_jidctfst.obj: ..\..\src\jpeg\jidctfst.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jidctfst.c + +$(OBJS)\wxjpeg_jidctflt.obj: ..\..\src\jpeg\jidctflt.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jidctflt.c + +$(OBJS)\wxjpeg_jidctint.obj: ..\..\src\jpeg\jidctint.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jidctint.c + +$(OBJS)\wxjpeg_jidctred.obj: ..\..\src\jpeg\jidctred.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jidctred.c + +$(OBJS)\wxjpeg_jdsample.obj: ..\..\src\jpeg\jdsample.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdsample.c + +$(OBJS)\wxjpeg_jdcolor.obj: ..\..\src\jpeg\jdcolor.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdcolor.c + +$(OBJS)\wxjpeg_jquant1.obj: ..\..\src\jpeg\jquant1.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jquant1.c + +$(OBJS)\wxjpeg_jquant2.obj: ..\..\src\jpeg\jquant2.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jquant2.c + +$(OBJS)\wxjpeg_jdmerge.obj: ..\..\src\jpeg\jdmerge.c + $(CC) -q -c -P- -o$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdmerge.c + +$(OBJS)\wxtiff_tif_win32.obj: ..\..\src\tiff\libtiff\tif_win32.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_win32.c + +$(OBJS)\wxtiff_tif_aux.obj: ..\..\src\tiff\libtiff\tif_aux.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_aux.c + +$(OBJS)\wxtiff_tif_close.obj: ..\..\src\tiff\libtiff\tif_close.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_close.c + +$(OBJS)\wxtiff_tif_codec.obj: ..\..\src\tiff\libtiff\tif_codec.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_codec.c + +$(OBJS)\wxtiff_tif_color.obj: ..\..\src\tiff\libtiff\tif_color.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_color.c + +$(OBJS)\wxtiff_tif_compress.obj: ..\..\src\tiff\libtiff\tif_compress.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_compress.c + +$(OBJS)\wxtiff_tif_dir.obj: ..\..\src\tiff\libtiff\tif_dir.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dir.c + +$(OBJS)\wxtiff_tif_dirinfo.obj: ..\..\src\tiff\libtiff\tif_dirinfo.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirinfo.c + +$(OBJS)\wxtiff_tif_dirread.obj: ..\..\src\tiff\libtiff\tif_dirread.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirread.c + +$(OBJS)\wxtiff_tif_dirwrite.obj: ..\..\src\tiff\libtiff\tif_dirwrite.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirwrite.c + +$(OBJS)\wxtiff_tif_dumpmode.obj: ..\..\src\tiff\libtiff\tif_dumpmode.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dumpmode.c + +$(OBJS)\wxtiff_tif_error.obj: ..\..\src\tiff\libtiff\tif_error.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_error.c + +$(OBJS)\wxtiff_tif_extension.obj: ..\..\src\tiff\libtiff\tif_extension.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_extension.c + +$(OBJS)\wxtiff_tif_fax3.obj: ..\..\src\tiff\libtiff\tif_fax3.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_fax3.c + +$(OBJS)\wxtiff_tif_fax3sm.obj: ..\..\src\tiff\libtiff\tif_fax3sm.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_fax3sm.c + +$(OBJS)\wxtiff_tif_flush.obj: ..\..\src\tiff\libtiff\tif_flush.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_flush.c + +$(OBJS)\wxtiff_tif_getimage.obj: ..\..\src\tiff\libtiff\tif_getimage.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_getimage.c + +$(OBJS)\wxtiff_tif_jbig.obj: ..\..\src\tiff\libtiff\tif_jbig.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jbig.c + +$(OBJS)\wxtiff_tif_jpeg.obj: ..\..\src\tiff\libtiff\tif_jpeg.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jpeg.c + +$(OBJS)\wxtiff_tif_jpeg_12.obj: ..\..\src\tiff\libtiff\tif_jpeg_12.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jpeg_12.c + +$(OBJS)\wxtiff_tif_luv.obj: ..\..\src\tiff\libtiff\tif_luv.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_luv.c + +$(OBJS)\wxtiff_tif_lzma.obj: ..\..\src\tiff\libtiff\tif_lzma.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_lzma.c + +$(OBJS)\wxtiff_tif_lzw.obj: ..\..\src\tiff\libtiff\tif_lzw.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_lzw.c + +$(OBJS)\wxtiff_tif_next.obj: ..\..\src\tiff\libtiff\tif_next.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_next.c + +$(OBJS)\wxtiff_tif_ojpeg.obj: ..\..\src\tiff\libtiff\tif_ojpeg.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_ojpeg.c + +$(OBJS)\wxtiff_tif_open.obj: ..\..\src\tiff\libtiff\tif_open.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_open.c + +$(OBJS)\wxtiff_tif_packbits.obj: ..\..\src\tiff\libtiff\tif_packbits.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_packbits.c + +$(OBJS)\wxtiff_tif_pixarlog.obj: ..\..\src\tiff\libtiff\tif_pixarlog.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_pixarlog.c + +$(OBJS)\wxtiff_tif_predict.obj: ..\..\src\tiff\libtiff\tif_predict.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_predict.c + +$(OBJS)\wxtiff_tif_print.obj: ..\..\src\tiff\libtiff\tif_print.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_print.c + +$(OBJS)\wxtiff_tif_read.obj: ..\..\src\tiff\libtiff\tif_read.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_read.c + +$(OBJS)\wxtiff_tif_strip.obj: ..\..\src\tiff\libtiff\tif_strip.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_strip.c + +$(OBJS)\wxtiff_tif_swab.obj: ..\..\src\tiff\libtiff\tif_swab.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_swab.c + +$(OBJS)\wxtiff_tif_thunder.obj: ..\..\src\tiff\libtiff\tif_thunder.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_thunder.c + +$(OBJS)\wxtiff_tif_tile.obj: ..\..\src\tiff\libtiff\tif_tile.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_tile.c + +$(OBJS)\wxtiff_tif_version.obj: ..\..\src\tiff\libtiff\tif_version.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_version.c + +$(OBJS)\wxtiff_tif_warning.obj: ..\..\src\tiff\libtiff\tif_warning.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_warning.c + +$(OBJS)\wxtiff_tif_write.obj: ..\..\src\tiff\libtiff\tif_write.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_write.c + +$(OBJS)\wxtiff_tif_zip.obj: ..\..\src\tiff\libtiff\tif_zip.c + $(CC) -q -c -P- -o$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_zip.c + +$(OBJS)\wxexpat_xmlparse.obj: ..\..\src\expat\lib\xmlparse.c + $(CC) -q -c -P- -o$@ $(WXEXPAT_CFLAGS) ..\..\src\expat\lib\xmlparse.c + +$(OBJS)\wxexpat_xmlrole.obj: ..\..\src\expat\lib\xmlrole.c + $(CC) -q -c -P- -o$@ $(WXEXPAT_CFLAGS) ..\..\src\expat\lib\xmlrole.c + +$(OBJS)\wxexpat_xmltok.obj: ..\..\src\expat\lib\xmltok.c + $(CC) -q -c -P- -o$@ $(WXEXPAT_CFLAGS) ..\..\src\expat\lib\xmltok.c + +$(OBJS)\wxscintilla_LexA68k.obj: ..\..\src\stc\scintilla\lexers\LexA68k.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexA68k.cxx + +$(OBJS)\wxscintilla_LexAbaqus.obj: ..\..\src\stc\scintilla\lexers\LexAbaqus.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAbaqus.cxx + +$(OBJS)\wxscintilla_LexAda.obj: ..\..\src\stc\scintilla\lexers\LexAda.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAda.cxx + +$(OBJS)\wxscintilla_LexAPDL.obj: ..\..\src\stc\scintilla\lexers\LexAPDL.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAPDL.cxx + +$(OBJS)\wxscintilla_LexAsm.obj: ..\..\src\stc\scintilla\lexers\LexAsm.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAsm.cxx + +$(OBJS)\wxscintilla_LexAsn1.obj: ..\..\src\stc\scintilla\lexers\LexAsn1.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAsn1.cxx + +$(OBJS)\wxscintilla_LexASY.obj: ..\..\src\stc\scintilla\lexers\LexASY.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexASY.cxx + +$(OBJS)\wxscintilla_LexAU3.obj: ..\..\src\stc\scintilla\lexers\LexAU3.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAU3.cxx + +$(OBJS)\wxscintilla_LexAVE.obj: ..\..\src\stc\scintilla\lexers\LexAVE.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAVE.cxx + +$(OBJS)\wxscintilla_LexAVS.obj: ..\..\src\stc\scintilla\lexers\LexAVS.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAVS.cxx + +$(OBJS)\wxscintilla_LexBaan.obj: ..\..\src\stc\scintilla\lexers\LexBaan.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexBaan.cxx + +$(OBJS)\wxscintilla_LexBash.obj: ..\..\src\stc\scintilla\lexers\LexBash.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexBash.cxx + +$(OBJS)\wxscintilla_LexBasic.obj: ..\..\src\stc\scintilla\lexers\LexBasic.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexBasic.cxx + +$(OBJS)\wxscintilla_LexBullant.obj: ..\..\src\stc\scintilla\lexers\LexBullant.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexBullant.cxx + +$(OBJS)\wxscintilla_LexCaml.obj: ..\..\src\stc\scintilla\lexers\LexCaml.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCaml.cxx + +$(OBJS)\wxscintilla_LexCLW.obj: ..\..\src\stc\scintilla\lexers\LexCLW.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCLW.cxx + +$(OBJS)\wxscintilla_LexCmake.obj: ..\..\src\stc\scintilla\lexers\LexCmake.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCmake.cxx + +$(OBJS)\wxscintilla_LexCOBOL.obj: ..\..\src\stc\scintilla\lexers\LexCOBOL.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCOBOL.cxx + +$(OBJS)\wxscintilla_LexCoffeeScript.obj: ..\..\src\stc\scintilla\lexers\LexCoffeeScript.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCoffeeScript.cxx + +$(OBJS)\wxscintilla_LexConf.obj: ..\..\src\stc\scintilla\lexers\LexConf.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexConf.cxx + +$(OBJS)\wxscintilla_LexCPP.obj: ..\..\src\stc\scintilla\lexers\LexCPP.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCPP.cxx + +$(OBJS)\wxscintilla_LexCrontab.obj: ..\..\src\stc\scintilla\lexers\LexCrontab.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCrontab.cxx + +$(OBJS)\wxscintilla_LexCsound.obj: ..\..\src\stc\scintilla\lexers\LexCsound.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCsound.cxx + +$(OBJS)\wxscintilla_LexCSS.obj: ..\..\src\stc\scintilla\lexers\LexCSS.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCSS.cxx + +$(OBJS)\wxscintilla_LexD.obj: ..\..\src\stc\scintilla\lexers\LexD.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexD.cxx + +$(OBJS)\wxscintilla_LexECL.obj: ..\..\src\stc\scintilla\lexers\LexECL.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexECL.cxx + +$(OBJS)\wxscintilla_LexEiffel.obj: ..\..\src\stc\scintilla\lexers\LexEiffel.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexEiffel.cxx + +$(OBJS)\wxscintilla_LexErlang.obj: ..\..\src\stc\scintilla\lexers\LexErlang.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexErlang.cxx + +$(OBJS)\wxscintilla_LexEScript.obj: ..\..\src\stc\scintilla\lexers\LexEScript.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexEScript.cxx + +$(OBJS)\wxscintilla_LexFlagship.obj: ..\..\src\stc\scintilla\lexers\LexFlagship.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexFlagship.cxx + +$(OBJS)\wxscintilla_LexForth.obj: ..\..\src\stc\scintilla\lexers\LexForth.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexForth.cxx + +$(OBJS)\wxscintilla_LexFortran.obj: ..\..\src\stc\scintilla\lexers\LexFortran.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexFortran.cxx + +$(OBJS)\wxscintilla_LexGAP.obj: ..\..\src\stc\scintilla\lexers\LexGAP.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexGAP.cxx + +$(OBJS)\wxscintilla_LexGui4Cli.obj: ..\..\src\stc\scintilla\lexers\LexGui4Cli.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexGui4Cli.cxx + +$(OBJS)\wxscintilla_LexHaskell.obj: ..\..\src\stc\scintilla\lexers\LexHaskell.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexHaskell.cxx + +$(OBJS)\wxscintilla_LexHTML.obj: ..\..\src\stc\scintilla\lexers\LexHTML.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexHTML.cxx + +$(OBJS)\wxscintilla_LexInno.obj: ..\..\src\stc\scintilla\lexers\LexInno.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexInno.cxx + +$(OBJS)\wxscintilla_LexKix.obj: ..\..\src\stc\scintilla\lexers\LexKix.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexKix.cxx + +$(OBJS)\wxscintilla_LexLisp.obj: ..\..\src\stc\scintilla\lexers\LexLisp.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexLisp.cxx + +$(OBJS)\wxscintilla_LexLout.obj: ..\..\src\stc\scintilla\lexers\LexLout.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexLout.cxx + +$(OBJS)\wxscintilla_LexLua.obj: ..\..\src\stc\scintilla\lexers\LexLua.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexLua.cxx + +$(OBJS)\wxscintilla_LexMagik.obj: ..\..\src\stc\scintilla\lexers\LexMagik.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMagik.cxx + +$(OBJS)\wxscintilla_LexMarkdown.obj: ..\..\src\stc\scintilla\lexers\LexMarkdown.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMarkdown.cxx + +$(OBJS)\wxscintilla_LexMatlab.obj: ..\..\src\stc\scintilla\lexers\LexMatlab.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMatlab.cxx + +$(OBJS)\wxscintilla_LexMetapost.obj: ..\..\src\stc\scintilla\lexers\LexMetapost.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMetapost.cxx + +$(OBJS)\wxscintilla_LexMMIXAL.obj: ..\..\src\stc\scintilla\lexers\LexMMIXAL.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMMIXAL.cxx + +$(OBJS)\wxscintilla_LexModula.obj: ..\..\src\stc\scintilla\lexers\LexModula.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexModula.cxx + +$(OBJS)\wxscintilla_LexMPT.obj: ..\..\src\stc\scintilla\lexers\LexMPT.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMPT.cxx + +$(OBJS)\wxscintilla_LexMSSQL.obj: ..\..\src\stc\scintilla\lexers\LexMSSQL.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMSSQL.cxx + +$(OBJS)\wxscintilla_LexMySQL.obj: ..\..\src\stc\scintilla\lexers\LexMySQL.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMySQL.cxx + +$(OBJS)\wxscintilla_LexNimrod.obj: ..\..\src\stc\scintilla\lexers\LexNimrod.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexNimrod.cxx + +$(OBJS)\wxscintilla_LexNsis.obj: ..\..\src\stc\scintilla\lexers\LexNsis.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexNsis.cxx + +$(OBJS)\wxscintilla_LexOpal.obj: ..\..\src\stc\scintilla\lexers\LexOpal.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexOpal.cxx + +$(OBJS)\wxscintilla_LexOScript.obj: ..\..\src\stc\scintilla\lexers\LexOScript.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexOScript.cxx + +$(OBJS)\wxscintilla_LexOthers.obj: ..\..\src\stc\scintilla\lexers\LexOthers.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexOthers.cxx + +$(OBJS)\wxscintilla_LexPascal.obj: ..\..\src\stc\scintilla\lexers\LexPascal.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPascal.cxx + +$(OBJS)\wxscintilla_LexPB.obj: ..\..\src\stc\scintilla\lexers\LexPB.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPB.cxx + +$(OBJS)\wxscintilla_LexPerl.obj: ..\..\src\stc\scintilla\lexers\LexPerl.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPerl.cxx + +$(OBJS)\wxscintilla_LexPLM.obj: ..\..\src\stc\scintilla\lexers\LexPLM.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPLM.cxx + +$(OBJS)\wxscintilla_LexPOV.obj: ..\..\src\stc\scintilla\lexers\LexPOV.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPOV.cxx + +$(OBJS)\wxscintilla_LexPowerPro.obj: ..\..\src\stc\scintilla\lexers\LexPowerPro.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPowerPro.cxx + +$(OBJS)\wxscintilla_LexPowerShell.obj: ..\..\src\stc\scintilla\lexers\LexPowerShell.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPowerShell.cxx + +$(OBJS)\wxscintilla_LexProgress.obj: ..\..\src\stc\scintilla\lexers\LexProgress.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexProgress.cxx + +$(OBJS)\wxscintilla_LexPS.obj: ..\..\src\stc\scintilla\lexers\LexPS.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPS.cxx + +$(OBJS)\wxscintilla_LexPython.obj: ..\..\src\stc\scintilla\lexers\LexPython.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPython.cxx + +$(OBJS)\wxscintilla_LexR.obj: ..\..\src\stc\scintilla\lexers\LexR.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexR.cxx + +$(OBJS)\wxscintilla_LexRebol.obj: ..\..\src\stc\scintilla\lexers\LexRebol.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexRebol.cxx + +$(OBJS)\wxscintilla_LexRuby.obj: ..\..\src\stc\scintilla\lexers\LexRuby.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexRuby.cxx + +$(OBJS)\wxscintilla_LexScriptol.obj: ..\..\src\stc\scintilla\lexers\LexScriptol.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexScriptol.cxx + +$(OBJS)\wxscintilla_LexSmalltalk.obj: ..\..\src\stc\scintilla\lexers\LexSmalltalk.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSmalltalk.cxx + +$(OBJS)\wxscintilla_LexSML.obj: ..\..\src\stc\scintilla\lexers\LexSML.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSML.cxx + +$(OBJS)\wxscintilla_LexSorcus.obj: ..\..\src\stc\scintilla\lexers\LexSorcus.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSorcus.cxx + +$(OBJS)\wxscintilla_LexSpecman.obj: ..\..\src\stc\scintilla\lexers\LexSpecman.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSpecman.cxx + +$(OBJS)\wxscintilla_LexSpice.obj: ..\..\src\stc\scintilla\lexers\LexSpice.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSpice.cxx + +$(OBJS)\wxscintilla_LexSQL.obj: ..\..\src\stc\scintilla\lexers\LexSQL.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSQL.cxx + +$(OBJS)\wxscintilla_LexTACL.obj: ..\..\src\stc\scintilla\lexers\LexTACL.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTACL.cxx + +$(OBJS)\wxscintilla_LexTADS3.obj: ..\..\src\stc\scintilla\lexers\LexTADS3.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTADS3.cxx + +$(OBJS)\wxscintilla_LexTAL.obj: ..\..\src\stc\scintilla\lexers\LexTAL.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTAL.cxx + +$(OBJS)\wxscintilla_LexTCL.obj: ..\..\src\stc\scintilla\lexers\LexTCL.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTCL.cxx + +$(OBJS)\wxscintilla_LexTCMD.obj: ..\..\src\stc\scintilla\lexers\LexTCMD.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTCMD.cxx + +$(OBJS)\wxscintilla_LexTeX.obj: ..\..\src\stc\scintilla\lexers\LexTeX.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTeX.cxx + +$(OBJS)\wxscintilla_LexTxt2tags.obj: ..\..\src\stc\scintilla\lexers\LexTxt2tags.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTxt2tags.cxx + +$(OBJS)\wxscintilla_LexVB.obj: ..\..\src\stc\scintilla\lexers\LexVB.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexVB.cxx + +$(OBJS)\wxscintilla_LexVerilog.obj: ..\..\src\stc\scintilla\lexers\LexVerilog.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexVerilog.cxx + +$(OBJS)\wxscintilla_LexVHDL.obj: ..\..\src\stc\scintilla\lexers\LexVHDL.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexVHDL.cxx + +$(OBJS)\wxscintilla_LexVisualProlog.obj: ..\..\src\stc\scintilla\lexers\LexVisualProlog.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexVisualProlog.cxx + +$(OBJS)\wxscintilla_LexYAML.obj: ..\..\src\stc\scintilla\lexers\LexYAML.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexYAML.cxx + +$(OBJS)\wxscintilla_Accessor.obj: ..\..\src\stc\scintilla\lexlib\Accessor.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\Accessor.cxx + +$(OBJS)\wxscintilla_CharacterSet.obj: ..\..\src\stc\scintilla\lexlib\CharacterSet.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\CharacterSet.cxx + +$(OBJS)\wxscintilla_LexerBase.obj: ..\..\src\stc\scintilla\lexlib\LexerBase.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\LexerBase.cxx + +$(OBJS)\wxscintilla_LexerModule.obj: ..\..\src\stc\scintilla\lexlib\LexerModule.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\LexerModule.cxx + +$(OBJS)\wxscintilla_LexerNoExceptions.obj: ..\..\src\stc\scintilla\lexlib\LexerNoExceptions.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\LexerNoExceptions.cxx + +$(OBJS)\wxscintilla_LexerSimple.obj: ..\..\src\stc\scintilla\lexlib\LexerSimple.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\LexerSimple.cxx + +$(OBJS)\wxscintilla_PropSetSimple.obj: ..\..\src\stc\scintilla\lexlib\PropSetSimple.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\PropSetSimple.cxx + +$(OBJS)\wxscintilla_StyleContext.obj: ..\..\src\stc\scintilla\lexlib\StyleContext.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\StyleContext.cxx + +$(OBJS)\wxscintilla_WordList.obj: ..\..\src\stc\scintilla\lexlib\WordList.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\WordList.cxx + +$(OBJS)\wxscintilla_AutoComplete.obj: ..\..\src\stc\scintilla\src\AutoComplete.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\AutoComplete.cxx + +$(OBJS)\wxscintilla_CallTip.obj: ..\..\src\stc\scintilla\src\CallTip.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\CallTip.cxx + +$(OBJS)\wxscintilla_Catalogue.obj: ..\..\src\stc\scintilla\src\Catalogue.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Catalogue.cxx + +$(OBJS)\wxscintilla_CellBuffer.obj: ..\..\src\stc\scintilla\src\CellBuffer.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\CellBuffer.cxx + +$(OBJS)\wxscintilla_CharClassify.obj: ..\..\src\stc\scintilla\src\CharClassify.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\CharClassify.cxx + +$(OBJS)\wxscintilla_ContractionState.obj: ..\..\src\stc\scintilla\src\ContractionState.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\ContractionState.cxx + +$(OBJS)\wxscintilla_Decoration.obj: ..\..\src\stc\scintilla\src\Decoration.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Decoration.cxx + +$(OBJS)\wxscintilla_Document.obj: ..\..\src\stc\scintilla\src\Document.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Document.cxx + +$(OBJS)\wxscintilla_Editor.obj: ..\..\src\stc\scintilla\src\Editor.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Editor.cxx + +$(OBJS)\wxscintilla_ExternalLexer.obj: ..\..\src\stc\scintilla\src\ExternalLexer.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\ExternalLexer.cxx + +$(OBJS)\wxscintilla_Indicator.obj: ..\..\src\stc\scintilla\src\Indicator.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Indicator.cxx + +$(OBJS)\wxscintilla_KeyMap.obj: ..\..\src\stc\scintilla\src\KeyMap.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\KeyMap.cxx + +$(OBJS)\wxscintilla_LineMarker.obj: ..\..\src\stc\scintilla\src\LineMarker.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\LineMarker.cxx + +$(OBJS)\wxscintilla_PerLine.obj: ..\..\src\stc\scintilla\src\PerLine.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\PerLine.cxx + +$(OBJS)\wxscintilla_PositionCache.obj: ..\..\src\stc\scintilla\src\PositionCache.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\PositionCache.cxx + +$(OBJS)\wxscintilla_RESearch.obj: ..\..\src\stc\scintilla\src\RESearch.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\RESearch.cxx + +$(OBJS)\wxscintilla_RunStyles.obj: ..\..\src\stc\scintilla\src\RunStyles.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\RunStyles.cxx + +$(OBJS)\wxscintilla_ScintillaBase.obj: ..\..\src\stc\scintilla\src\ScintillaBase.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\ScintillaBase.cxx + +$(OBJS)\wxscintilla_Selection.obj: ..\..\src\stc\scintilla\src\Selection.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Selection.cxx + +$(OBJS)\wxscintilla_Style.obj: ..\..\src\stc\scintilla\src\Style.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Style.cxx + +$(OBJS)\wxscintilla_UniConversion.obj: ..\..\src\stc\scintilla\src\UniConversion.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\UniConversion.cxx + +$(OBJS)\wxscintilla_ViewStyle.obj: ..\..\src\stc\scintilla\src\ViewStyle.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\ViewStyle.cxx + +$(OBJS)\wxscintilla_XPM.obj: ..\..\src\stc\scintilla\src\XPM.cxx + $(CXX) -q -c -P -o$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\XPM.cxx + +$(OBJS)\monodll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\monodll_any.obj: ..\..\src\common\any.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\any.cpp + +$(OBJS)\monodll_appbase.obj: ..\..\src\common\appbase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\appbase.cpp + +$(OBJS)\monodll_arcall.obj: ..\..\src\common\arcall.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arcall.cpp + +$(OBJS)\monodll_arcfind.obj: ..\..\src\common\arcfind.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arcfind.cpp + +$(OBJS)\monodll_archive.obj: ..\..\src\common\archive.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\archive.cpp + +$(OBJS)\monodll_arrstr.obj: ..\..\src\common\arrstr.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arrstr.cpp + +$(OBJS)\monodll_base64.obj: ..\..\src\common\base64.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\base64.cpp + +$(OBJS)\monodll_clntdata.obj: ..\..\src\common\clntdata.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\clntdata.cpp + +$(OBJS)\monodll_cmdline.obj: ..\..\src\common\cmdline.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\cmdline.cpp + +$(OBJS)\monodll_config.obj: ..\..\src\common\config.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\config.cpp + +$(OBJS)\monodll_convauto.obj: ..\..\src\common\convauto.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\convauto.cpp + +$(OBJS)\monodll_datetime.obj: ..\..\src\common\datetime.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\datetime.cpp + +$(OBJS)\monodll_datetimefmt.obj: ..\..\src\common\datetimefmt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\datetimefmt.cpp + +$(OBJS)\monodll_datstrm.obj: ..\..\src\common\datstrm.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\datstrm.cpp + +$(OBJS)\monodll_dircmn.obj: ..\..\src\common\dircmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dircmn.cpp + +$(OBJS)\monodll_dynarray.obj: ..\..\src\common\dynarray.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dynarray.cpp + +$(OBJS)\monodll_dynlib.obj: ..\..\src\common\dynlib.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dynlib.cpp + +$(OBJS)\monodll_dynload.obj: ..\..\src\common\dynload.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dynload.cpp + +$(OBJS)\monodll_encconv.obj: ..\..\src\common\encconv.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\encconv.cpp + +$(OBJS)\monodll_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\evtloopcmn.cpp + +$(OBJS)\monodll_extended.obj: ..\..\src\common\extended.c + $(CC) -q -c -P- -o$@ $(MONODLL_CFLAGS) ..\..\src\common\extended.c + +$(OBJS)\monodll_ffile.obj: ..\..\src\common\ffile.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ffile.cpp + +$(OBJS)\monodll_file.obj: ..\..\src\common\file.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\file.cpp + +$(OBJS)\monodll_fileback.obj: ..\..\src\common\fileback.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fileback.cpp + +$(OBJS)\monodll_fileconf.obj: ..\..\src\common\fileconf.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fileconf.cpp + +$(OBJS)\monodll_filefn.obj: ..\..\src\common\filefn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filefn.cpp + +$(OBJS)\monodll_filename.obj: ..\..\src\common\filename.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filename.cpp + +$(OBJS)\monodll_filesys.obj: ..\..\src\common\filesys.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filesys.cpp + +$(OBJS)\monodll_filtall.obj: ..\..\src\common\filtall.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filtall.cpp + +$(OBJS)\monodll_filtfind.obj: ..\..\src\common\filtfind.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filtfind.cpp + +$(OBJS)\monodll_fmapbase.obj: ..\..\src\common\fmapbase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fmapbase.cpp + +$(OBJS)\monodll_fs_arc.obj: ..\..\src\common\fs_arc.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fs_arc.cpp + +$(OBJS)\monodll_fs_filter.obj: ..\..\src\common\fs_filter.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fs_filter.cpp + +$(OBJS)\monodll_hash.obj: ..\..\src\common\hash.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\hash.cpp + +$(OBJS)\monodll_hashmap.obj: ..\..\src\common\hashmap.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\hashmap.cpp + +$(OBJS)\monodll_init.obj: ..\..\src\common\init.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\init.cpp + +$(OBJS)\monodll_intl.obj: ..\..\src\common\intl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\intl.cpp + +$(OBJS)\monodll_ipcbase.obj: ..\..\src\common\ipcbase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ipcbase.cpp + +$(OBJS)\monodll_languageinfo.obj: ..\..\src\common\languageinfo.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\languageinfo.cpp + +$(OBJS)\monodll_list.obj: ..\..\src\common\list.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\list.cpp + +$(OBJS)\monodll_log.obj: ..\..\src\common\log.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\log.cpp + +$(OBJS)\monodll_longlong.obj: ..\..\src\common\longlong.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\longlong.cpp + +$(OBJS)\monodll_memory.obj: ..\..\src\common\memory.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\memory.cpp + +$(OBJS)\monodll_mimecmn.obj: ..\..\src\common\mimecmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\mimecmn.cpp + +$(OBJS)\monodll_module.obj: ..\..\src\common\module.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\module.cpp + +$(OBJS)\monodll_mstream.obj: ..\..\src\common\mstream.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\mstream.cpp + +$(OBJS)\monodll_numformatter.obj: ..\..\src\common\numformatter.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\numformatter.cpp + +$(OBJS)\monodll_object.obj: ..\..\src\common\object.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\object.cpp + +$(OBJS)\monodll_platinfo.obj: ..\..\src\common\platinfo.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\platinfo.cpp + +$(OBJS)\monodll_powercmn.obj: ..\..\src\common\powercmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\powercmn.cpp + +$(OBJS)\monodll_process.obj: ..\..\src\common\process.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\process.cpp + +$(OBJS)\monodll_regex.obj: ..\..\src\common\regex.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\regex.cpp + +$(OBJS)\monodll_stdpbase.obj: ..\..\src\common\stdpbase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stdpbase.cpp + +$(OBJS)\monodll_sstream.obj: ..\..\src\common\sstream.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sstream.cpp + +$(OBJS)\monodll_stdstream.obj: ..\..\src\common\stdstream.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stdstream.cpp + +$(OBJS)\monodll_stopwatch.obj: ..\..\src\common\stopwatch.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stopwatch.cpp + +$(OBJS)\monodll_strconv.obj: ..\..\src\common\strconv.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\strconv.cpp + +$(OBJS)\monodll_stream.obj: ..\..\src\common\stream.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stream.cpp + +$(OBJS)\monodll_string.obj: ..\..\src\common\string.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\string.cpp + +$(OBJS)\monodll_stringimpl.obj: ..\..\src\common\stringimpl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stringimpl.cpp + +$(OBJS)\monodll_stringops.obj: ..\..\src\common\stringops.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stringops.cpp + +$(OBJS)\monodll_strvararg.obj: ..\..\src\common\strvararg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\strvararg.cpp + +$(OBJS)\monodll_sysopt.obj: ..\..\src\common\sysopt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sysopt.cpp + +$(OBJS)\monodll_tarstrm.obj: ..\..\src\common\tarstrm.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\tarstrm.cpp + +$(OBJS)\monodll_textbuf.obj: ..\..\src\common\textbuf.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\textbuf.cpp + +$(OBJS)\monodll_textfile.obj: ..\..\src\common\textfile.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\textfile.cpp + +$(OBJS)\monodll_threadinfo.obj: ..\..\src\common\threadinfo.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\threadinfo.cpp + +$(OBJS)\monodll_time.obj: ..\..\src\common\time.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\time.cpp + +$(OBJS)\monodll_timercmn.obj: ..\..\src\common\timercmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\timercmn.cpp + +$(OBJS)\monodll_timerimpl.obj: ..\..\src\common\timerimpl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\timerimpl.cpp + +$(OBJS)\monodll_tokenzr.obj: ..\..\src\common\tokenzr.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\tokenzr.cpp + +$(OBJS)\monodll_translation.obj: ..\..\src\common\translation.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\translation.cpp + +$(OBJS)\monodll_txtstrm.obj: ..\..\src\common\txtstrm.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\txtstrm.cpp + +$(OBJS)\monodll_unichar.obj: ..\..\src\common\unichar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\unichar.cpp + +$(OBJS)\monodll_uri.obj: ..\..\src\common\uri.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\uri.cpp + +$(OBJS)\monodll_ustring.obj: ..\..\src\common\ustring.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ustring.cpp + +$(OBJS)\monodll_variant.obj: ..\..\src\common\variant.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\variant.cpp + +$(OBJS)\monodll_wfstream.obj: ..\..\src\common\wfstream.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\wfstream.cpp + +$(OBJS)\monodll_wxcrt.obj: ..\..\src\common\wxcrt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\wxcrt.cpp + +$(OBJS)\monodll_wxprintf.obj: ..\..\src\common\wxprintf.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\wxprintf.cpp + +$(OBJS)\monodll_xlocale.obj: ..\..\src\common\xlocale.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\xlocale.cpp + +$(OBJS)\monodll_xti.obj: ..\..\src\common\xti.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\xti.cpp + +$(OBJS)\monodll_xtistrm.obj: ..\..\src\common\xtistrm.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\xtistrm.cpp + +$(OBJS)\monodll_zipstrm.obj: ..\..\src\common\zipstrm.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\zipstrm.cpp + +$(OBJS)\monodll_zstream.obj: ..\..\src\common\zstream.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\zstream.cpp + +$(OBJS)\monodll_fswatchercmn.obj: ..\..\src\common\fswatchercmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fswatchercmn.cpp + +$(OBJS)\monodll_fswatcherg.obj: ..\..\src\generic\fswatcherg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\fswatcherg.cpp + +$(OBJS)\monodll_basemsw.obj: ..\..\src\msw\basemsw.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\basemsw.cpp + +$(OBJS)\monodll_crashrpt.obj: ..\..\src\msw\crashrpt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\crashrpt.cpp + +$(OBJS)\monodll_debughlp.obj: ..\..\src\msw\debughlp.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\debughlp.cpp + +$(OBJS)\monodll_dde.obj: ..\..\src\msw\dde.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dde.cpp + +$(OBJS)\monodll_dir.obj: ..\..\src\msw\dir.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dir.cpp + +$(OBJS)\monodll_dlmsw.obj: ..\..\src\msw\dlmsw.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dlmsw.cpp + +$(OBJS)\monodll_evtloopconsole.obj: ..\..\src\msw\evtloopconsole.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\evtloopconsole.cpp + +$(OBJS)\monodll_mimetype.obj: ..\..\src\msw\mimetype.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mimetype.cpp + +$(OBJS)\monodll_power.obj: ..\..\src\msw\power.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\power.cpp + +$(OBJS)\monodll_regconf.obj: ..\..\src\msw\regconf.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\regconf.cpp + +$(OBJS)\monodll_registry.obj: ..\..\src\msw\registry.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\registry.cpp + +$(OBJS)\monodll_snglinst.obj: ..\..\src\msw\snglinst.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\snglinst.cpp + +$(OBJS)\monodll_stackwalk.obj: ..\..\src\msw\stackwalk.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\stackwalk.cpp + +$(OBJS)\monodll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\stdpaths.cpp + +$(OBJS)\monodll_thread.obj: ..\..\src\msw\thread.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\thread.cpp + +$(OBJS)\monodll_timer.obj: ..\..\src\msw\timer.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\timer.cpp + +$(OBJS)\monodll_utils.obj: ..\..\src\msw\utils.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\utils.cpp + +$(OBJS)\monodll_utilsexc.obj: ..\..\src\msw\utilsexc.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\utilsexc.cpp + +$(OBJS)\monodll_fswatcher.obj: ..\..\src\msw\fswatcher.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\fswatcher.cpp + +$(OBJS)\monodll_event.obj: ..\..\src\common\event.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\monodll_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\monodll_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\monodll_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\monodll_main.obj: ..\..\src\msw\main.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\monodll_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\monodll_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\monodll_fs_inet.obj: ..\..\src\common\fs_inet.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fs_inet.cpp + +$(OBJS)\monodll_ftp.obj: ..\..\src\common\ftp.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ftp.cpp + +$(OBJS)\monodll_http.obj: ..\..\src\common\http.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\http.cpp + +$(OBJS)\monodll_protocol.obj: ..\..\src\common\protocol.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\protocol.cpp + +$(OBJS)\monodll_sckaddr.obj: ..\..\src\common\sckaddr.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sckaddr.cpp + +$(OBJS)\monodll_sckfile.obj: ..\..\src\common\sckfile.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sckfile.cpp + +$(OBJS)\monodll_sckipc.obj: ..\..\src\common\sckipc.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sckipc.cpp + +$(OBJS)\monodll_sckstrm.obj: ..\..\src\common\sckstrm.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sckstrm.cpp + +$(OBJS)\monodll_socket.obj: ..\..\src\common\socket.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\socket.cpp + +$(OBJS)\monodll_url.obj: ..\..\src\common\url.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\url.cpp + +$(OBJS)\monodll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp + +$(OBJS)\monodll_urlmsw.obj: ..\..\src\msw\urlmsw.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\urlmsw.cpp + +$(OBJS)\monodll_generic_statusbr.obj: ..\..\src\generic\statusbr.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\statusbr.cpp + +$(OBJS)\monodll_msw_accel.obj: ..\..\src\msw\accel.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\accel.cpp + +$(OBJS)\monodll_anybutton.obj: ..\..\src\msw\anybutton.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\anybutton.cpp + +$(OBJS)\monodll_artmsw.obj: ..\..\src\msw\artmsw.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\artmsw.cpp + +$(OBJS)\monodll_msw_bmpbuttn.obj: ..\..\src\msw\bmpbuttn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\bmpbuttn.cpp + +$(OBJS)\monodll_msw_button.obj: ..\..\src\msw\button.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\button.cpp + +$(OBJS)\monodll_msw_checkbox.obj: ..\..\src\msw\checkbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\checkbox.cpp + +$(OBJS)\monodll_msw_choice.obj: ..\..\src\msw\choice.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\choice.cpp + +$(OBJS)\monodll_colordlg.obj: ..\..\src\msw\colordlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\colordlg.cpp + +$(OBJS)\monodll_combo.obj: ..\..\src\msw\combo.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\combo.cpp + +$(OBJS)\monodll_msw_combobox.obj: ..\..\src\msw\combobox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\combobox.cpp + +$(OBJS)\monodll_msw_control.obj: ..\..\src\msw\control.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\control.cpp + +$(OBJS)\monodll_msw_dialog.obj: ..\..\src\msw\dialog.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dialog.cpp + +$(OBJS)\monodll_dirdlg.obj: ..\..\src\msw\dirdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dirdlg.cpp + +$(OBJS)\monodll_dragimag.obj: ..\..\src\msw\dragimag.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dragimag.cpp + +$(OBJS)\monodll_filedlg.obj: ..\..\src\msw\filedlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\filedlg.cpp + +$(OBJS)\monodll_frame.obj: ..\..\src\msw\frame.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\frame.cpp + +$(OBJS)\monodll_msw_gauge.obj: ..\..\src\msw\gauge.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\gauge.cpp + +$(OBJS)\monodll_headerctrl.obj: ..\..\src\msw\headerctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\headerctrl.cpp + +$(OBJS)\monodll_iniconf.obj: ..\..\src\msw\iniconf.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\iniconf.cpp + +$(OBJS)\monodll_msw_listbox.obj: ..\..\src\msw\listbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\listbox.cpp + +$(OBJS)\monodll_msw_listctrl.obj: ..\..\src\msw\listctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\listctrl.cpp + +$(OBJS)\monodll_mdi.obj: ..\..\src\msw\mdi.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mdi.cpp + +$(OBJS)\monodll_msw_menu.obj: ..\..\src\msw\menu.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\menu.cpp + +$(OBJS)\monodll_menuitem.obj: ..\..\src\msw\menuitem.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\menuitem.cpp + +$(OBJS)\monodll_metafile.obj: ..\..\src\msw\metafile.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\metafile.cpp + +$(OBJS)\monodll_msgdlg.obj: ..\..\src\msw\msgdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\msgdlg.cpp + +$(OBJS)\monodll_nativdlg.obj: ..\..\src\msw\nativdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\nativdlg.cpp + +$(OBJS)\monodll_nativewin.obj: ..\..\src\msw\nativewin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\nativewin.cpp + +$(OBJS)\monodll_msw_notebook.obj: ..\..\src\msw\notebook.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\notebook.cpp + +$(OBJS)\monodll_access.obj: ..\..\src\msw\ole\access.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\access.cpp + +$(OBJS)\monodll_ownerdrw.obj: ..\..\src\msw\ownerdrw.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ownerdrw.cpp + +$(OBJS)\monodll_msw_panel.obj: ..\..\src\msw\panel.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\panel.cpp + +$(OBJS)\monodll_progdlg.obj: ..\..\src\msw\progdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\progdlg.cpp + +$(OBJS)\monodll_msw_radiobox.obj: ..\..\src\msw\radiobox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\radiobox.cpp + +$(OBJS)\monodll_msw_radiobut.obj: ..\..\src\msw\radiobut.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\radiobut.cpp + +$(OBJS)\monodll_richmsgdlg.obj: ..\..\src\msw\richmsgdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\richmsgdlg.cpp + +$(OBJS)\monodll_msw_scrolbar.obj: ..\..\src\msw\scrolbar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\scrolbar.cpp + +$(OBJS)\monodll_msw_slider.obj: ..\..\src\msw\slider.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\slider.cpp + +$(OBJS)\monodll_msw_spinbutt.obj: ..\..\src\msw\spinbutt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\spinbutt.cpp + +$(OBJS)\monodll_spinctrl.obj: ..\..\src\msw\spinctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\spinctrl.cpp + +$(OBJS)\monodll_msw_statbmp.obj: ..\..\src\msw\statbmp.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\statbmp.cpp + +$(OBJS)\monodll_msw_statbox.obj: ..\..\src\msw\statbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\statbox.cpp + +$(OBJS)\monodll_statusbar.obj: ..\..\src\msw\statusbar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\statusbar.cpp + +$(OBJS)\monodll_msw_statline.obj: ..\..\src\msw\statline.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\statline.cpp + +$(OBJS)\monodll_msw_stattext.obj: ..\..\src\msw\stattext.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\stattext.cpp + +$(OBJS)\monodll_msw_toolbar.obj: ..\..\src\msw\toolbar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\toolbar.cpp + +$(OBJS)\monodll_msw_textctrl.obj: ..\..\src\msw\textctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\textctrl.cpp + +$(OBJS)\monodll_textentry.obj: ..\..\src\msw\textentry.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\textentry.cpp + +$(OBJS)\monodll_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\tglbtn.cpp + +$(OBJS)\monodll_treectrl.obj: ..\..\src\msw\treectrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\treectrl.cpp + +$(OBJS)\monodll_msw_checklst.obj: ..\..\src\msw\checklst.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\checklst.cpp + +$(OBJS)\monodll_msw_fdrepdlg.obj: ..\..\src\msw\fdrepdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\fdrepdlg.cpp + +$(OBJS)\monodll_fontdlg.obj: ..\..\src\msw\fontdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\fontdlg.cpp + +$(OBJS)\monodll_generic_accel.obj: ..\..\src\generic\accel.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\accel.cpp + +$(OBJS)\monodll_colrdlgg.obj: ..\..\src\generic\colrdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\colrdlgg.cpp + +$(OBJS)\monodll_dirdlgg.obj: ..\..\src\generic\dirdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\dirdlgg.cpp + +$(OBJS)\monodll_generic_fdrepdlg.obj: ..\..\src\generic\fdrepdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\fdrepdlg.cpp + +$(OBJS)\monodll_filedlgg.obj: ..\..\src\generic\filedlgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\filedlgg.cpp + +$(OBJS)\monodll_fontdlgg.obj: ..\..\src\generic\fontdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\fontdlgg.cpp + +$(OBJS)\monodll_generic_listctrl.obj: ..\..\src\generic\listctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\listctrl.cpp + +$(OBJS)\monodll_mdig.obj: ..\..\src\generic\mdig.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\mdig.cpp + +$(OBJS)\monodll_univ_bmpbuttn.obj: ..\..\src\univ\bmpbuttn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\bmpbuttn.cpp + +$(OBJS)\monodll_univ_button.obj: ..\..\src\univ\button.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\button.cpp + +$(OBJS)\monodll_univ_checkbox.obj: ..\..\src\univ\checkbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\checkbox.cpp + +$(OBJS)\monodll_univ_checklst.obj: ..\..\src\univ\checklst.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\checklst.cpp + +$(OBJS)\monodll_univ_choice.obj: ..\..\src\univ\choice.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\choice.cpp + +$(OBJS)\monodll_univ_combobox.obj: ..\..\src\univ\combobox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\combobox.cpp + +$(OBJS)\monodll_univ_control.obj: ..\..\src\univ\control.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\control.cpp + +$(OBJS)\monodll_ctrlrend.obj: ..\..\src\univ\ctrlrend.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\ctrlrend.cpp + +$(OBJS)\monodll_univ_dialog.obj: ..\..\src\univ\dialog.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\dialog.cpp + +$(OBJS)\monodll_framuniv.obj: ..\..\src\univ\framuniv.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\framuniv.cpp + +$(OBJS)\monodll_univ_gauge.obj: ..\..\src\univ\gauge.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\gauge.cpp + +$(OBJS)\monodll_inpcons.obj: ..\..\src\univ\inpcons.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\inpcons.cpp + +$(OBJS)\monodll_inphand.obj: ..\..\src\univ\inphand.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\inphand.cpp + +$(OBJS)\monodll_univ_listbox.obj: ..\..\src\univ\listbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\listbox.cpp + +$(OBJS)\monodll_univ_menu.obj: ..\..\src\univ\menu.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\menu.cpp + +$(OBJS)\monodll_univ_notebook.obj: ..\..\src\univ\notebook.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\notebook.cpp + +$(OBJS)\monodll_univ_radiobox.obj: ..\..\src\univ\radiobox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\radiobox.cpp + +$(OBJS)\monodll_univ_radiobut.obj: ..\..\src\univ\radiobut.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\radiobut.cpp + +$(OBJS)\monodll_scrarrow.obj: ..\..\src\univ\scrarrow.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\scrarrow.cpp + +$(OBJS)\monodll_univ_scrolbar.obj: ..\..\src\univ\scrolbar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\scrolbar.cpp + +$(OBJS)\monodll_scrthumb.obj: ..\..\src\univ\scrthumb.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\scrthumb.cpp + +$(OBJS)\monodll_settingsuniv.obj: ..\..\src\univ\settingsuniv.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\settingsuniv.cpp + +$(OBJS)\monodll_univ_slider.obj: ..\..\src\univ\slider.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\slider.cpp + +$(OBJS)\monodll_univ_spinbutt.obj: ..\..\src\univ\spinbutt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\spinbutt.cpp + +$(OBJS)\monodll_univ_statbmp.obj: ..\..\src\univ\statbmp.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\statbmp.cpp + +$(OBJS)\monodll_univ_statbox.obj: ..\..\src\univ\statbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\statbox.cpp + +$(OBJS)\monodll_univ_statline.obj: ..\..\src\univ\statline.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\statline.cpp + +$(OBJS)\monodll_univ_stattext.obj: ..\..\src\univ\stattext.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\stattext.cpp + +$(OBJS)\monodll_univ_statusbr.obj: ..\..\src\univ\statusbr.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\statusbr.cpp + +$(OBJS)\monodll_stdrend.obj: ..\..\src\univ\stdrend.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\stdrend.cpp + +$(OBJS)\monodll_univ_textctrl.obj: ..\..\src\univ\textctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\textctrl.cpp + +$(OBJS)\monodll_univ_tglbtn.obj: ..\..\src\univ\tglbtn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\tglbtn.cpp + +$(OBJS)\monodll_theme.obj: ..\..\src\univ\theme.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\theme.cpp + +$(OBJS)\monodll_univ_toolbar.obj: ..\..\src\univ\toolbar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\toolbar.cpp + +$(OBJS)\monodll_topluniv.obj: ..\..\src\univ\topluniv.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\topluniv.cpp + +$(OBJS)\monodll_winuniv.obj: ..\..\src\univ\winuniv.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\winuniv.cpp + +$(OBJS)\monodll_gtk.obj: ..\..\src\univ\themes\gtk.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\themes\gtk.cpp + +$(OBJS)\monodll_metal.obj: ..\..\src\univ\themes\metal.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\themes\metal.cpp + +$(OBJS)\monodll_mono.obj: ..\..\src\univ\themes\mono.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\themes\mono.cpp + +$(OBJS)\monodll_win32.obj: ..\..\src\univ\themes\win32.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\themes\win32.cpp + +$(OBJS)\monodll_bmpcbox.obj: ..\..\src\msw\bmpcbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\bmpcbox.cpp + +$(OBJS)\monodll_calctrl.obj: ..\..\src\msw\calctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\calctrl.cpp + +$(OBJS)\monodll_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp + +$(OBJS)\monodll_datecontrols.obj: ..\..\src\msw\datecontrols.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datecontrols.cpp + +$(OBJS)\monodll_datectrl.obj: ..\..\src\msw\datectrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp + +$(OBJS)\monodll_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp + +$(OBJS)\monodll_hyperlink.obj: ..\..\src\msw\hyperlink.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\hyperlink.cpp + +$(OBJS)\monodll_timectrl.obj: ..\..\src\msw\timectrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\timectrl.cpp + +$(OBJS)\monodll_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\mediactrlcmn.cpp + +$(OBJS)\monodll_mediactrl_am.obj: ..\..\src\msw\mediactrl_am.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mediactrl_am.cpp + +$(OBJS)\monodll_mediactrl_wmp10.obj: ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mediactrl_wmp10.cpp + +$(OBJS)\monodll_mediactrl_qt.obj: ..\..\src\msw\mediactrl_qt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mediactrl_qt.cpp + +$(OBJS)\monodll_helpbest.obj: ..\..\src\msw\helpbest.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\helpbest.cpp + +$(OBJS)\monodll_helpctrl.obj: ..\..\src\html\helpctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\helpctrl.cpp + +$(OBJS)\monodll_helpdata.obj: ..\..\src\html\helpdata.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\helpdata.cpp + +$(OBJS)\monodll_helpdlg.obj: ..\..\src\html\helpdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\helpdlg.cpp + +$(OBJS)\monodll_helpfrm.obj: ..\..\src\html\helpfrm.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\helpfrm.cpp + +$(OBJS)\monodll_helpwnd.obj: ..\..\src\html\helpwnd.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\helpwnd.cpp + +$(OBJS)\monodll_htmlcell.obj: ..\..\src\html\htmlcell.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmlcell.cpp + +$(OBJS)\monodll_htmlfilt.obj: ..\..\src\html\htmlfilt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmlfilt.cpp + +$(OBJS)\monodll_htmlpars.obj: ..\..\src\html\htmlpars.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmlpars.cpp + +$(OBJS)\monodll_htmltag.obj: ..\..\src\html\htmltag.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmltag.cpp + +$(OBJS)\monodll_htmlwin.obj: ..\..\src\html\htmlwin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmlwin.cpp + +$(OBJS)\monodll_htmprint.obj: ..\..\src\html\htmprint.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmprint.cpp + +$(OBJS)\monodll_m_dflist.obj: ..\..\src\html\m_dflist.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_dflist.cpp + +$(OBJS)\monodll_m_fonts.obj: ..\..\src\html\m_fonts.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_fonts.cpp + +$(OBJS)\monodll_m_hline.obj: ..\..\src\html\m_hline.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_hline.cpp + +$(OBJS)\monodll_m_image.obj: ..\..\src\html\m_image.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_image.cpp + +$(OBJS)\monodll_m_layout.obj: ..\..\src\html\m_layout.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_layout.cpp + +$(OBJS)\monodll_m_links.obj: ..\..\src\html\m_links.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_links.cpp + +$(OBJS)\monodll_m_list.obj: ..\..\src\html\m_list.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_list.cpp + +$(OBJS)\monodll_m_pre.obj: ..\..\src\html\m_pre.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_pre.cpp + +$(OBJS)\monodll_m_span.obj: ..\..\src\html\m_span.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_span.cpp + +$(OBJS)\monodll_m_style.obj: ..\..\src\html\m_style.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_style.cpp + +$(OBJS)\monodll_m_tables.obj: ..\..\src\html\m_tables.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_tables.cpp + +$(OBJS)\monodll_styleparams.obj: ..\..\src\html\styleparams.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\styleparams.cpp + +$(OBJS)\monodll_winpars.obj: ..\..\src\html\winpars.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\html\winpars.cpp + +$(OBJS)\monodll_htmllbox.obj: ..\..\src\generic\htmllbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\htmllbox.cpp + +$(OBJS)\monodll_webview_ie.obj: ..\..\src\msw\webview_ie.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\webview_ie.cpp + +$(OBJS)\monodll_webview.obj: ..\..\src\common\webview.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webview.cpp + +$(OBJS)\monodll_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp + +$(OBJS)\monodll_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp + +$(OBJS)\monodll_debugrpt.obj: ..\..\src\common\debugrpt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\debugrpt.cpp + +$(OBJS)\monodll_dbgrptg.obj: ..\..\src\generic\dbgrptg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\dbgrptg.cpp + +$(OBJS)\monodll_xh_animatctrl.obj: ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_animatctrl.cpp + +$(OBJS)\monodll_xh_bannerwindow.obj: ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_bannerwindow.cpp + +$(OBJS)\monodll_xh_bmp.obj: ..\..\src\xrc\xh_bmp.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_bmp.cpp + +$(OBJS)\monodll_xh_bmpcbox.obj: ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_bmpcbox.cpp + +$(OBJS)\monodll_xh_bmpbt.obj: ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_bmpbt.cpp + +$(OBJS)\monodll_xh_bttn.obj: ..\..\src\xrc\xh_bttn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_bttn.cpp + +$(OBJS)\monodll_xh_cald.obj: ..\..\src\xrc\xh_cald.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_cald.cpp + +$(OBJS)\monodll_xh_chckb.obj: ..\..\src\xrc\xh_chckb.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_chckb.cpp + +$(OBJS)\monodll_xh_chckl.obj: ..\..\src\xrc\xh_chckl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_chckl.cpp + +$(OBJS)\monodll_xh_choic.obj: ..\..\src\xrc\xh_choic.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_choic.cpp + +$(OBJS)\monodll_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_choicbk.cpp + +$(OBJS)\monodll_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_clrpicker.cpp + +$(OBJS)\monodll_xh_cmdlinkbn.obj: ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_cmdlinkbn.cpp + +$(OBJS)\monodll_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_collpane.cpp + +$(OBJS)\monodll_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_combo.cpp + +$(OBJS)\monodll_xh_comboctrl.obj: ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_comboctrl.cpp + +$(OBJS)\monodll_xh_datectrl.obj: ..\..\src\xrc\xh_datectrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_datectrl.cpp + +$(OBJS)\monodll_xh_dirpicker.obj: ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_dirpicker.cpp + +$(OBJS)\monodll_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_dlg.cpp + +$(OBJS)\monodll_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp + +$(OBJS)\monodll_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + +$(OBJS)\monodll_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp + +$(OBJS)\monodll_xh_fontpicker.obj: ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_fontpicker.cpp + +$(OBJS)\monodll_xh_frame.obj: ..\..\src\xrc\xh_frame.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_frame.cpp + +$(OBJS)\monodll_xh_gauge.obj: ..\..\src\xrc\xh_gauge.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_gauge.cpp + +$(OBJS)\monodll_xh_gdctl.obj: ..\..\src\xrc\xh_gdctl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_gdctl.cpp + +$(OBJS)\monodll_xh_grid.obj: ..\..\src\xrc\xh_grid.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_grid.cpp + +$(OBJS)\monodll_xh_html.obj: ..\..\src\xrc\xh_html.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_html.cpp + +$(OBJS)\monodll_xh_hyperlink.obj: ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_hyperlink.cpp + +$(OBJS)\monodll_xh_listb.obj: ..\..\src\xrc\xh_listb.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_listb.cpp + +$(OBJS)\monodll_xh_listbk.obj: ..\..\src\xrc\xh_listbk.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_listbk.cpp + +$(OBJS)\monodll_xh_listc.obj: ..\..\src\xrc\xh_listc.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_listc.cpp + +$(OBJS)\monodll_xh_mdi.obj: ..\..\src\xrc\xh_mdi.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_mdi.cpp + +$(OBJS)\monodll_xh_menu.obj: ..\..\src\xrc\xh_menu.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_menu.cpp + +$(OBJS)\monodll_xh_notbk.obj: ..\..\src\xrc\xh_notbk.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_notbk.cpp + +$(OBJS)\monodll_xh_odcombo.obj: ..\..\src\xrc\xh_odcombo.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_odcombo.cpp + +$(OBJS)\monodll_xh_panel.obj: ..\..\src\xrc\xh_panel.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_panel.cpp + +$(OBJS)\monodll_xh_propdlg.obj: ..\..\src\xrc\xh_propdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_propdlg.cpp + +$(OBJS)\monodll_xh_radbt.obj: ..\..\src\xrc\xh_radbt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_radbt.cpp + +$(OBJS)\monodll_xh_radbx.obj: ..\..\src\xrc\xh_radbx.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_radbx.cpp + +$(OBJS)\monodll_xh_scrol.obj: ..\..\src\xrc\xh_scrol.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_scrol.cpp + +$(OBJS)\monodll_xh_scwin.obj: ..\..\src\xrc\xh_scwin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_scwin.cpp + +$(OBJS)\monodll_xh_htmllbox.obj: ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_htmllbox.cpp + +$(OBJS)\monodll_xh_sizer.obj: ..\..\src\xrc\xh_sizer.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_sizer.cpp + +$(OBJS)\monodll_xh_slidr.obj: ..\..\src\xrc\xh_slidr.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_slidr.cpp + +$(OBJS)\monodll_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_spin.cpp + +$(OBJS)\monodll_xh_split.obj: ..\..\src\xrc\xh_split.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_split.cpp + +$(OBJS)\monodll_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_srchctrl.cpp + +$(OBJS)\monodll_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_statbar.cpp + +$(OBJS)\monodll_xh_stbmp.obj: ..\..\src\xrc\xh_stbmp.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_stbmp.cpp + +$(OBJS)\monodll_xh_stbox.obj: ..\..\src\xrc\xh_stbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_stbox.cpp + +$(OBJS)\monodll_xh_stlin.obj: ..\..\src\xrc\xh_stlin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_stlin.cpp + +$(OBJS)\monodll_xh_sttxt.obj: ..\..\src\xrc\xh_sttxt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_sttxt.cpp + +$(OBJS)\monodll_xh_text.obj: ..\..\src\xrc\xh_text.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_text.cpp + +$(OBJS)\monodll_xh_tglbtn.obj: ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_tglbtn.cpp + +$(OBJS)\monodll_xh_timectrl.obj: ..\..\src\xrc\xh_timectrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_timectrl.cpp + +$(OBJS)\monodll_xh_toolb.obj: ..\..\src\xrc\xh_toolb.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_toolb.cpp + +$(OBJS)\monodll_xh_toolbk.obj: ..\..\src\xrc\xh_toolbk.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_toolbk.cpp + +$(OBJS)\monodll_xh_tree.obj: ..\..\src\xrc\xh_tree.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_tree.cpp + +$(OBJS)\monodll_xh_treebk.obj: ..\..\src\xrc\xh_treebk.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_treebk.cpp + +$(OBJS)\monodll_xh_unkwn.obj: ..\..\src\xrc\xh_unkwn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_unkwn.cpp + +$(OBJS)\monodll_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_wizrd.cpp + +$(OBJS)\monodll_xmlres.obj: ..\..\src\xrc\xmlres.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmlres.cpp + +$(OBJS)\monodll_xmladv.obj: ..\..\src\xrc\xmladv.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmladv.cpp + +$(OBJS)\monodll_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp + +$(OBJS)\monodll_framemanager.obj: ..\..\src\aui\framemanager.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\framemanager.cpp + +$(OBJS)\monodll_dockart.obj: ..\..\src\aui\dockart.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\dockart.cpp + +$(OBJS)\monodll_floatpane.obj: ..\..\src\aui\floatpane.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\floatpane.cpp + +$(OBJS)\monodll_auibook.obj: ..\..\src\aui\auibook.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\auibook.cpp + +$(OBJS)\monodll_auibar.obj: ..\..\src\aui\auibar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\auibar.cpp + +$(OBJS)\monodll_tabmdi.obj: ..\..\src\aui\tabmdi.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\tabmdi.cpp + +$(OBJS)\monodll_tabart.obj: ..\..\src\aui\tabart.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\tabart.cpp + +$(OBJS)\monodll_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + +$(OBJS)\monodll_advprops.obj: ..\..\src\propgrid\advprops.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\advprops.cpp + +$(OBJS)\monodll_editors.obj: ..\..\src\propgrid\editors.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\editors.cpp + +$(OBJS)\monodll_manager.obj: ..\..\src\propgrid\manager.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\manager.cpp + +$(OBJS)\monodll_property.obj: ..\..\src\propgrid\property.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\property.cpp + +$(OBJS)\monodll_propgrid.obj: ..\..\src\propgrid\propgrid.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\propgrid.cpp + +$(OBJS)\monodll_propgridiface.obj: ..\..\src\propgrid\propgridiface.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\propgridiface.cpp + +$(OBJS)\monodll_propgridpagestate.obj: ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\propgridpagestate.cpp + +$(OBJS)\monodll_props.obj: ..\..\src\propgrid\props.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\props.cpp + +$(OBJS)\monodll_art_internal.obj: ..\..\src\ribbon\art_internal.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\art_internal.cpp + +$(OBJS)\monodll_art_msw.obj: ..\..\src\ribbon\art_msw.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\art_msw.cpp + +$(OBJS)\monodll_art_aui.obj: ..\..\src\ribbon\art_aui.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\art_aui.cpp + +$(OBJS)\monodll_bar.obj: ..\..\src\ribbon\bar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\bar.cpp + +$(OBJS)\monodll_ribbon_buttonbar.obj: ..\..\src\ribbon\buttonbar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\buttonbar.cpp + +$(OBJS)\monodll_ribbon_control.obj: ..\..\src\ribbon\control.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\control.cpp + +$(OBJS)\monodll_gallery.obj: ..\..\src\ribbon\gallery.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\gallery.cpp + +$(OBJS)\monodll_page.obj: ..\..\src\ribbon\page.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\page.cpp + +$(OBJS)\monodll_ribbon_panel.obj: ..\..\src\ribbon\panel.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\panel.cpp + +$(OBJS)\monodll_ribbon_toolbar.obj: ..\..\src\ribbon\toolbar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\toolbar.cpp + +$(OBJS)\monodll_xh_ribbon.obj: ..\..\src\xrc\xh_ribbon.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_ribbon.cpp + +$(OBJS)\monodll_richtextbuffer.obj: ..\..\src\richtext\richtextbuffer.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextbuffer.cpp + +$(OBJS)\monodll_richtextctrl.obj: ..\..\src\richtext\richtextctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextctrl.cpp + +$(OBJS)\monodll_richtextformatdlg.obj: ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextformatdlg.cpp + +$(OBJS)\monodll_richtexthtml.obj: ..\..\src\richtext\richtexthtml.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtexthtml.cpp + +$(OBJS)\monodll_richtextimagedlg.obj: ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextimagedlg.cpp + +$(OBJS)\monodll_richtextprint.obj: ..\..\src\richtext\richtextprint.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextprint.cpp + +$(OBJS)\monodll_richtextstyledlg.obj: ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextstyledlg.cpp + +$(OBJS)\monodll_richtextstyles.obj: ..\..\src\richtext\richtextstyles.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextstyles.cpp + +$(OBJS)\monodll_richtextsymboldlg.obj: ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextsymboldlg.cpp + +$(OBJS)\monodll_richtextxml.obj: ..\..\src\richtext\richtextxml.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextxml.cpp + +$(OBJS)\monodll_xh_richtext.obj: ..\..\src\xrc\xh_richtext.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_richtext.cpp + +$(OBJS)\monodll_stc.obj: ..\..\src\stc\stc.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\stc\stc.cpp + +$(OBJS)\monodll_PlatWX.obj: ..\..\src\stc\PlatWX.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\stc\PlatWX.cpp + +$(OBJS)\monodll_ScintillaWX.obj: ..\..\src\stc\ScintillaWX.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\stc\ScintillaWX.cpp + +$(OBJS)\monodll_xml.obj: ..\..\src\xml\xml.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xml\xml.cpp + +$(OBJS)\monodll_xtixml.obj: ..\..\src\common\xtixml.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\xtixml.cpp + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_activex.obj: ..\..\src\msw\ole\activex.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\activex.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_app.obj: ..\..\src\msw\app.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\app.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bitmap.obj: ..\..\src\msw\bitmap.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\bitmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_brush.obj: ..\..\src\msw\brush.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\brush.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_caret.obj: ..\..\src\msw\caret.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\caret.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_clipbrd.obj: ..\..\src\msw\clipbrd.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\clipbrd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_colour.obj: ..\..\src\msw\colour.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\colour.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_cursor.obj: ..\..\src\msw\cursor.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\cursor.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_data.obj: ..\..\src\msw\data.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\data.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dc.obj: ..\..\src\msw\dc.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcclient.obj: ..\..\src\msw\dcclient.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dcclient.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcmemory.obj: ..\..\src\msw\dcmemory.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dcmemory.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcprint.obj: ..\..\src\msw\dcprint.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dcprint.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcscreen.obj: ..\..\src\msw\dcscreen.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dcscreen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dialup.obj: ..\..\src\msw\dialup.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dialup.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dib.obj: ..\..\src\msw\dib.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dib.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_display.obj: ..\..\src\msw\display.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\display.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_enhmeta.obj: ..\..\src\msw\enhmeta.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\enhmeta.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_font.obj: ..\..\src\msw\font.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\font.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontenum.obj: ..\..\src\msw\fontenum.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\fontenum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontutil.obj: ..\..\src\msw\fontutil.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\fontutil.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gdiimage.obj: ..\..\src\msw\gdiimage.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\gdiimage.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gdiobj.obj: ..\..\src\msw\gdiobj.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\gdiobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gdiplus.obj: ..\..\src\msw\gdiplus.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\gdiplus.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_graphics.obj: ..\..\src\msw\graphics.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\graphics.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_icon.obj: ..\..\src\msw\icon.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\icon.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imaglist.obj: ..\..\src\msw\imaglist.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\imaglist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_minifram.obj: ..\..\src\msw\minifram.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\minifram.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_nonownedwnd.obj: ..\..\src\msw\nonownedwnd.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\nonownedwnd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dataobj.obj: ..\..\src\msw\ole\dataobj.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\dataobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dropsrc.obj: ..\..\src\msw\ole\dropsrc.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\dropsrc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_droptgt.obj: ..\..\src\msw\ole\droptgt.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\droptgt.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_oleutils.obj: ..\..\src\msw\ole\oleutils.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\oleutils.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_safearray.obj: ..\..\src\msw\ole\safearray.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\safearray.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_palette.obj: ..\..\src\msw\palette.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\palette.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_pen.obj: ..\..\src\msw\pen.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\pen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_popupwin.obj: ..\..\src\msw\popupwin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\popupwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_printdlg.obj: ..\..\src\msw\printdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\printdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_printwin.obj: ..\..\src\msw\printwin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\printwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_region.obj: ..\..\src\msw\region.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\region.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_renderer.obj: ..\..\src\msw\renderer.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\renderer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_settings.obj: ..\..\src\msw\settings.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\settings.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_textmeasure.obj: ..\..\src\msw\textmeasure.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\textmeasure.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_tooltip.obj: ..\..\src\msw\tooltip.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\tooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_toplevel.obj: ..\..\src\msw\toplevel.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\toplevel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_uiaction.obj: ..\..\src\msw\uiaction.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\uiaction.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_utilsgui.obj: ..\..\src\msw\utilsgui.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\utilsgui.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_utilswin.obj: ..\..\src\msw\utilswin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\utilswin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_uxtheme.obj: ..\..\src\msw\uxtheme.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\uxtheme.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_window.obj: ..\..\src\msw\window.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\window.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_helpchm.obj: ..\..\src\msw\helpchm.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\helpchm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_helpwin.obj: ..\..\src\msw\helpwin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\helpwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_automtn.obj: ..\..\src\msw\ole\automtn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\automtn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_uuid.obj: ..\..\src\msw\ole\uuid.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\uuid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_clrpickerg.obj: ..\..\src\generic\clrpickerg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\clrpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_collpaneg.obj: ..\..\src\generic\collpaneg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\collpaneg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_filepickerg.obj: ..\..\src\generic\filepickerg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\filepickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontpickerg.obj: ..\..\src\generic\fontpickerg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\fontpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_prntdlgg.obj: ..\..\src\generic\prntdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\prntdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_evtloop.obj: ..\..\src\msw\evtloop.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\evtloop.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_accelcmn.obj: ..\..\src\common\accelcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\accelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_accesscmn.obj: ..\..\src\common\accesscmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\accesscmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_anidecod.obj: ..\..\src\common\anidecod.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\anidecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_affinematrix2d.obj: ..\..\src\common\affinematrix2d.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\affinematrix2d.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_appcmn.obj: ..\..\src\common\appcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\appcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_artprov.obj: ..\..\src\common\artprov.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\artprov.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_artstd.obj: ..\..\src\common\artstd.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\artstd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bmpbase.obj: ..\..\src\common\bmpbase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\bmpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bmpbtncmn.obj: ..\..\src\common\bmpbtncmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\bmpbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bookctrl.obj: ..\..\src\common\bookctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\bookctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_btncmn.obj: ..\..\src\common\btncmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\btncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_cairo.obj: ..\..\src\common\cairo.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\cairo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_checkboxcmn.obj: ..\..\src\common\checkboxcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\checkboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_checklstcmn.obj: ..\..\src\common\checklstcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\checklstcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_choiccmn.obj: ..\..\src\common\choiccmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\choiccmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_clipcmn.obj: ..\..\src\common\clipcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\clipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_clrpickercmn.obj: ..\..\src\common\clrpickercmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\clrpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_colourcmn.obj: ..\..\src\common\colourcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\colourcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_colourdata.obj: ..\..\src\common\colourdata.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\colourdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_combocmn.obj: ..\..\src\common\combocmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\combocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_cmdproc.obj: ..\..\src\common\cmdproc.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\cmdproc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_cmndata.obj: ..\..\src\common\cmndata.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\cmndata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_containr.obj: ..\..\src\common\containr.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\containr.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_cshelp.obj: ..\..\src\common\cshelp.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\cshelp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_ctrlcmn.obj: ..\..\src\common\ctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_ctrlsub.obj: ..\..\src\common\ctrlsub.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ctrlsub.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcbase.obj: ..\..\src\common\dcbase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dcbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcbufcmn.obj: ..\..\src\common\dcbufcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dcbufcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcgraph.obj: ..\..\src\common\dcgraph.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dcgraph.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcsvg.obj: ..\..\src\common\dcsvg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dcsvg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dirctrlcmn.obj: ..\..\src\common\dirctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dirctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dlgcmn.obj: ..\..\src\common\dlgcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dndcmn.obj: ..\..\src\common\dndcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dndcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dobjcmn.obj: ..\..\src\common\dobjcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dobjcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_docmdi.obj: ..\..\src\common\docmdi.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\docmdi.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_docview.obj: ..\..\src\common\docview.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\docview.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dpycmn.obj: ..\..\src\common\dpycmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dpycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dseldlg.obj: ..\..\src\common\dseldlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dseldlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_effects.obj: ..\..\src\common\effects.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\effects.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fddlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filepickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontpickercmn.obj: ..\..\src\common\fontpickercmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fldlgcmn.obj: ..\..\src\common\fldlgcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fldlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontcmn.obj: ..\..\src\common\fontcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontdata.obj: ..\..\src\common\fontdata.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_graphicc.obj: ..\..\src\generic\graphicc.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\graphicc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontenumcmn.obj: ..\..\src\common\fontenumcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontenumcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontmap.obj: ..\..\src\common\fontmap.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontutilcmn.obj: ..\..\src\common\fontutilcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontutilcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_framecmn.obj: ..\..\src\common\framecmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\framecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gaugecmn.obj: ..\..\src\common\gaugecmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\gaugecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gbsizer.obj: ..\..\src\common\gbsizer.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\gbsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gdicmn.obj: ..\..\src\common\gdicmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\gdicmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_geometry.obj: ..\..\src\common\geometry.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\geometry.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gifdecod.obj: ..\..\src\common\gifdecod.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\gifdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_graphcmn.obj: ..\..\src\common\graphcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\graphcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_headercolcmn.obj: ..\..\src\common\headercolcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\headercolcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_headerctrlcmn.obj: ..\..\src\common\headerctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\headerctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_helpbase.obj: ..\..\src\common\helpbase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\helpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_iconbndl.obj: ..\..\src\common\iconbndl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\iconbndl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagall.obj: ..\..\src\common\imagall.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagall.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagbmp.obj: ..\..\src\common\imagbmp.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagbmp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_image.obj: ..\..\src\common\image.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\image.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagfill.obj: ..\..\src\common\imagfill.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagfill.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imaggif.obj: ..\..\src\common\imaggif.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imaggif.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagiff.obj: ..\..\src\common\imagiff.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagjpeg.obj: ..\..\src\common\imagjpeg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagjpeg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagpcx.obj: ..\..\src\common\imagpcx.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagpcx.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagpng.obj: ..\..\src\common\imagpng.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagpng.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagpnm.obj: ..\..\src\common\imagpnm.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagpnm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagtga.obj: ..\..\src\common\imagtga.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagtga.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagtiff.obj: ..\..\src\common\imagtiff.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagtiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagxpm.obj: ..\..\src\common\imagxpm.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagxpm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_layout.obj: ..\..\src\common\layout.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\layout.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_lboxcmn.obj: ..\..\src\common\lboxcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\lboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_listctrlcmn.obj: ..\..\src\common\listctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\listctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_markupparser.obj: ..\..\src\common\markupparser.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\markupparser.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_matrix.obj: ..\..\src\common\matrix.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\matrix.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_menucmn.obj: ..\..\src\common\menucmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\menucmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_modalhook.obj: ..\..\src\common\modalhook.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\modalhook.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_mousemanager.obj: ..\..\src\common\mousemanager.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\mousemanager.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_nbkbase.obj: ..\..\src\common\nbkbase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\nbkbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\overlaycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_ownerdrwcmn.obj: ..\..\src\common\ownerdrwcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ownerdrwcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_paper.obj: ..\..\src\common\paper.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\paper.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_panelcmn.obj: ..\..\src\common\panelcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\panelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_persist.obj: ..\..\src\common\persist.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\persist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_pickerbase.obj: ..\..\src\common\pickerbase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\pickerbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_popupcmn.obj: ..\..\src\common\popupcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\popupcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_preferencescmn.obj: ..\..\src\common\preferencescmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\preferencescmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_prntbase.obj: ..\..\src\common\prntbase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\prntbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_quantize.obj: ..\..\src\common\quantize.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\quantize.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_radiobtncmn.obj: ..\..\src\common\radiobtncmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\radiobtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_radiocmn.obj: ..\..\src\common\radiocmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\radiocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_rearrangectrl.obj: ..\..\src\common\rearrangectrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\rearrangectrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_rendcmn.obj: ..\..\src\common\rendcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\rendcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_rgncmn.obj: ..\..\src\common\rgncmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\rgncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_scrolbarcmn.obj: ..\..\src\common\scrolbarcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\scrolbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_settcmn.obj: ..\..\src\common\settcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\settcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_sizer.obj: ..\..\src\common\sizer.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_slidercmn.obj: ..\..\src\common\slidercmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\slidercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_spinbtncmn.obj: ..\..\src\common\spinbtncmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\spinbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_spinctrlcmn.obj: ..\..\src\common\spinctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\spinctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_srchcmn.obj: ..\..\src\common\srchcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\srchcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_statbar.obj: ..\..\src\common\statbar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\statbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_statbmpcmn.obj: ..\..\src\common\statbmpcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\statbmpcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_statboxcmn.obj: ..\..\src\common\statboxcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\statboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_statlinecmn.obj: ..\..\src\common\statlinecmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\statlinecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_stattextcmn.obj: ..\..\src\common\stattextcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stattextcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_stockitem.obj: ..\..\src\common\stockitem.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stockitem.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_tbarbase.obj: ..\..\src\common\tbarbase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\tbarbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_textcmn.obj: ..\..\src\common\textcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\textcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_textentrycmn.obj: ..\..\src\common\textentrycmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\textentrycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_textmeasurecmn.obj: ..\..\src\common\textmeasurecmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\textmeasurecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_toplvcmn.obj: ..\..\src\common\toplvcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\toplvcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_treebase.obj: ..\..\src\common\treebase.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\treebase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_uiactioncmn.obj: ..\..\src\common\uiactioncmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\uiactioncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_valgen.obj: ..\..\src\common\valgen.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\valgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_validate.obj: ..\..\src\common\validate.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\validate.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_valtext.obj: ..\..\src\common\valtext.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\valtext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_valnum.obj: ..\..\src\common\valnum.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\valnum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_wincmn.obj: ..\..\src\common\wincmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\wincmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_windowid.obj: ..\..\src\common\windowid.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\windowid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_wrapsizer.obj: ..\..\src\common\wrapsizer.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\wrapsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_xpmdecod.obj: ..\..\src\common\xpmdecod.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\xpmdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_busyinfo.obj: ..\..\src\generic\busyinfo.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\busyinfo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_generic_buttonbar.obj: ..\..\src\generic\buttonbar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\buttonbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_choicdgg.obj: ..\..\src\generic\choicdgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\choicdgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_choicbkg.obj: ..\..\src\generic\choicbkg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\choicbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_combog.obj: ..\..\src\generic\combog.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\combog.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcpsg.obj: ..\..\src\generic\dcpsg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\dcpsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dirctrlg.obj: ..\..\src\generic\dirctrlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\dirctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dragimgg.obj: ..\..\src\generic\dragimgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\dragimgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_filectrlg.obj: ..\..\src\generic\filectrlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\filectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_infobar.obj: ..\..\src\generic\infobar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\infobar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_listbkg.obj: ..\..\src\generic\listbkg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\listbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_logg.obj: ..\..\src\generic\logg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\logg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_markuptext.obj: ..\..\src\generic\markuptext.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\markuptext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_msgdlgg.obj: ..\..\src\generic\msgdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\msgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_numdlgg.obj: ..\..\src\generic\numdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\numdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_progdlgg.obj: ..\..\src\generic\progdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\progdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_preferencesg.obj: ..\..\src\generic\preferencesg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\preferencesg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_printps.obj: ..\..\src\generic\printps.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\printps.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_renderg.obj: ..\..\src\generic\renderg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\renderg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_richmsgdlgg.obj: ..\..\src\generic\richmsgdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\richmsgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_scrlwing.obj: ..\..\src\generic\scrlwing.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\scrlwing.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_selstore.obj: ..\..\src\generic\selstore.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\selstore.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_spinctlg.obj: ..\..\src\generic\spinctlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\spinctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_splitter.obj: ..\..\src\generic\splitter.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\splitter.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_srchctlg.obj: ..\..\src\generic\srchctlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\srchctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_statbmpg.obj: ..\..\src\generic\statbmpg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\statbmpg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_stattextg.obj: ..\..\src\generic\stattextg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\stattextg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_textdlgg.obj: ..\..\src\generic\textdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\textdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_tipwin.obj: ..\..\src\generic\tipwin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\tipwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_toolbkg.obj: ..\..\src\generic\toolbkg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\toolbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_treectlg.obj: ..\..\src\generic\treectlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\treectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_treebkg.obj: ..\..\src\generic\treebkg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\treebkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_vlbox.obj: ..\..\src\generic\vlbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\vlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_vscroll.obj: ..\..\src\generic\vscroll.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\vscroll.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_xmlreshandler.obj: ..\..\src\xrc\xmlreshandler.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmlreshandler.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_animatecmn.obj: ..\..\src\common\animatecmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\animatecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bmpcboxcmn.obj: ..\..\src\common\bmpcboxcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\bmpcboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_datavcmn.obj: ..\..\src\common\datavcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\datavcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gridcmn.obj: ..\..\src\common\gridcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\gridcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_hyperlnkcmn.obj: ..\..\src\common\hyperlnkcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\hyperlnkcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_odcombocmn.obj: ..\..\src\common\odcombocmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\odcombocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_richtooltipcmn.obj: ..\..\src\common\richtooltipcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\richtooltipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\aboutdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bannerwindow.obj: ..\..\src\generic\bannerwindow.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\bannerwindow.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_datavgen.obj: ..\..\src\generic\datavgen.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\datavgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_datectlg.obj: ..\..\src\generic\datectlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\datectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_editlbox.obj: ..\..\src\generic\editlbox.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\editlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_grid.obj: ..\..\src\generic\grid.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\grid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gridctrl.obj: ..\..\src\generic\gridctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\gridctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_grideditors.obj: ..\..\src\generic\grideditors.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\grideditors.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gridsel.obj: ..\..\src\generic\gridsel.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\gridsel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_helpext.obj: ..\..\src\generic\helpext.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\helpext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_hyperlinkg.obj: ..\..\src\generic\hyperlinkg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\hyperlinkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_laywin.obj: ..\..\src\generic\laywin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\laywin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_notifmsgg.obj: ..\..\src\generic\notifmsgg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\notifmsgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_odcombo.obj: ..\..\src\generic\odcombo.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\odcombo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_propdlg.obj: ..\..\src\generic\propdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\propdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_richtooltipg.obj: ..\..\src\generic\richtooltipg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\richtooltipg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_sashwin.obj: ..\..\src\generic\sashwin.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\sashwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_splash.obj: ..\..\src\generic\splash.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\splash.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_timectrlg.obj: ..\..\src\generic\timectrlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\timectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_tipdlg.obj: ..\..\src\generic\tipdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\tipdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_treelist.obj: ..\..\src\generic\treelist.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\treelist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_wizard.obj: ..\..\src\generic\wizard.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\wizard.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\taskbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_notifmsg.obj: ..\..\src\msw\notifmsg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\notifmsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_richtooltip.obj: ..\..\src\msw\richtooltip.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\richtooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_sound.obj: ..\..\src\msw\sound.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\sound.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_taskbar.obj: ..\..\src\msw\taskbar.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\taskbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_joystick.obj: ..\..\src\msw\joystick.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\joystick.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_animateg.obj: ..\..\src\generic\animateg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\animateg.cpp +!endif + +$(OBJS)\monodll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -i..\..\src\stc\scintilla\include -i..\..\src\stc\scintilla\lexlib -i..\..\src\stc\scintilla\src -d__WX__ -dSCI_LEXER -dLINK_LEXERS -dwxUSE_BASE=1 -dWXMAKINGDLL ..\..\src\msw\version.rc + +$(OBJS)\monolib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\monolib_any.obj: ..\..\src\common\any.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\any.cpp + +$(OBJS)\monolib_appbase.obj: ..\..\src\common\appbase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\appbase.cpp + +$(OBJS)\monolib_arcall.obj: ..\..\src\common\arcall.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arcall.cpp + +$(OBJS)\monolib_arcfind.obj: ..\..\src\common\arcfind.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arcfind.cpp + +$(OBJS)\monolib_archive.obj: ..\..\src\common\archive.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\archive.cpp + +$(OBJS)\monolib_arrstr.obj: ..\..\src\common\arrstr.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arrstr.cpp + +$(OBJS)\monolib_base64.obj: ..\..\src\common\base64.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\base64.cpp + +$(OBJS)\monolib_clntdata.obj: ..\..\src\common\clntdata.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\clntdata.cpp + +$(OBJS)\monolib_cmdline.obj: ..\..\src\common\cmdline.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\cmdline.cpp + +$(OBJS)\monolib_config.obj: ..\..\src\common\config.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\config.cpp + +$(OBJS)\monolib_convauto.obj: ..\..\src\common\convauto.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\convauto.cpp + +$(OBJS)\monolib_datetime.obj: ..\..\src\common\datetime.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\datetime.cpp + +$(OBJS)\monolib_datetimefmt.obj: ..\..\src\common\datetimefmt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\datetimefmt.cpp + +$(OBJS)\monolib_datstrm.obj: ..\..\src\common\datstrm.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\datstrm.cpp + +$(OBJS)\monolib_dircmn.obj: ..\..\src\common\dircmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dircmn.cpp + +$(OBJS)\monolib_dynarray.obj: ..\..\src\common\dynarray.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dynarray.cpp + +$(OBJS)\monolib_dynlib.obj: ..\..\src\common\dynlib.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dynlib.cpp + +$(OBJS)\monolib_dynload.obj: ..\..\src\common\dynload.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dynload.cpp + +$(OBJS)\monolib_encconv.obj: ..\..\src\common\encconv.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\encconv.cpp + +$(OBJS)\monolib_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\evtloopcmn.cpp + +$(OBJS)\monolib_extended.obj: ..\..\src\common\extended.c + $(CC) -q -c -P- -o$@ $(MONOLIB_CFLAGS) ..\..\src\common\extended.c + +$(OBJS)\monolib_ffile.obj: ..\..\src\common\ffile.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ffile.cpp + +$(OBJS)\monolib_file.obj: ..\..\src\common\file.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\file.cpp + +$(OBJS)\monolib_fileback.obj: ..\..\src\common\fileback.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fileback.cpp + +$(OBJS)\monolib_fileconf.obj: ..\..\src\common\fileconf.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fileconf.cpp + +$(OBJS)\monolib_filefn.obj: ..\..\src\common\filefn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filefn.cpp + +$(OBJS)\monolib_filename.obj: ..\..\src\common\filename.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filename.cpp + +$(OBJS)\monolib_filesys.obj: ..\..\src\common\filesys.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filesys.cpp + +$(OBJS)\monolib_filtall.obj: ..\..\src\common\filtall.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filtall.cpp + +$(OBJS)\monolib_filtfind.obj: ..\..\src\common\filtfind.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filtfind.cpp + +$(OBJS)\monolib_fmapbase.obj: ..\..\src\common\fmapbase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fmapbase.cpp + +$(OBJS)\monolib_fs_arc.obj: ..\..\src\common\fs_arc.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fs_arc.cpp + +$(OBJS)\monolib_fs_filter.obj: ..\..\src\common\fs_filter.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fs_filter.cpp + +$(OBJS)\monolib_hash.obj: ..\..\src\common\hash.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\hash.cpp + +$(OBJS)\monolib_hashmap.obj: ..\..\src\common\hashmap.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\hashmap.cpp + +$(OBJS)\monolib_init.obj: ..\..\src\common\init.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\init.cpp + +$(OBJS)\monolib_intl.obj: ..\..\src\common\intl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\intl.cpp + +$(OBJS)\monolib_ipcbase.obj: ..\..\src\common\ipcbase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ipcbase.cpp + +$(OBJS)\monolib_languageinfo.obj: ..\..\src\common\languageinfo.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\languageinfo.cpp + +$(OBJS)\monolib_list.obj: ..\..\src\common\list.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\list.cpp + +$(OBJS)\monolib_log.obj: ..\..\src\common\log.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\log.cpp + +$(OBJS)\monolib_longlong.obj: ..\..\src\common\longlong.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\longlong.cpp + +$(OBJS)\monolib_memory.obj: ..\..\src\common\memory.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\memory.cpp + +$(OBJS)\monolib_mimecmn.obj: ..\..\src\common\mimecmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\mimecmn.cpp + +$(OBJS)\monolib_module.obj: ..\..\src\common\module.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\module.cpp + +$(OBJS)\monolib_mstream.obj: ..\..\src\common\mstream.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\mstream.cpp + +$(OBJS)\monolib_numformatter.obj: ..\..\src\common\numformatter.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\numformatter.cpp + +$(OBJS)\monolib_object.obj: ..\..\src\common\object.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\object.cpp + +$(OBJS)\monolib_platinfo.obj: ..\..\src\common\platinfo.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\platinfo.cpp + +$(OBJS)\monolib_powercmn.obj: ..\..\src\common\powercmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\powercmn.cpp + +$(OBJS)\monolib_process.obj: ..\..\src\common\process.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\process.cpp + +$(OBJS)\monolib_regex.obj: ..\..\src\common\regex.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\regex.cpp + +$(OBJS)\monolib_stdpbase.obj: ..\..\src\common\stdpbase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stdpbase.cpp + +$(OBJS)\monolib_sstream.obj: ..\..\src\common\sstream.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sstream.cpp + +$(OBJS)\monolib_stdstream.obj: ..\..\src\common\stdstream.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stdstream.cpp + +$(OBJS)\monolib_stopwatch.obj: ..\..\src\common\stopwatch.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stopwatch.cpp + +$(OBJS)\monolib_strconv.obj: ..\..\src\common\strconv.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\strconv.cpp + +$(OBJS)\monolib_stream.obj: ..\..\src\common\stream.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stream.cpp + +$(OBJS)\monolib_string.obj: ..\..\src\common\string.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\string.cpp + +$(OBJS)\monolib_stringimpl.obj: ..\..\src\common\stringimpl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stringimpl.cpp + +$(OBJS)\monolib_stringops.obj: ..\..\src\common\stringops.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stringops.cpp + +$(OBJS)\monolib_strvararg.obj: ..\..\src\common\strvararg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\strvararg.cpp + +$(OBJS)\monolib_sysopt.obj: ..\..\src\common\sysopt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sysopt.cpp + +$(OBJS)\monolib_tarstrm.obj: ..\..\src\common\tarstrm.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\tarstrm.cpp + +$(OBJS)\monolib_textbuf.obj: ..\..\src\common\textbuf.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\textbuf.cpp + +$(OBJS)\monolib_textfile.obj: ..\..\src\common\textfile.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\textfile.cpp + +$(OBJS)\monolib_threadinfo.obj: ..\..\src\common\threadinfo.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\threadinfo.cpp + +$(OBJS)\monolib_time.obj: ..\..\src\common\time.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\time.cpp + +$(OBJS)\monolib_timercmn.obj: ..\..\src\common\timercmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\timercmn.cpp + +$(OBJS)\monolib_timerimpl.obj: ..\..\src\common\timerimpl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\timerimpl.cpp + +$(OBJS)\monolib_tokenzr.obj: ..\..\src\common\tokenzr.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\tokenzr.cpp + +$(OBJS)\monolib_translation.obj: ..\..\src\common\translation.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\translation.cpp + +$(OBJS)\monolib_txtstrm.obj: ..\..\src\common\txtstrm.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\txtstrm.cpp + +$(OBJS)\monolib_unichar.obj: ..\..\src\common\unichar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\unichar.cpp + +$(OBJS)\monolib_uri.obj: ..\..\src\common\uri.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\uri.cpp + +$(OBJS)\monolib_ustring.obj: ..\..\src\common\ustring.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ustring.cpp + +$(OBJS)\monolib_variant.obj: ..\..\src\common\variant.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\variant.cpp + +$(OBJS)\monolib_wfstream.obj: ..\..\src\common\wfstream.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\wfstream.cpp + +$(OBJS)\monolib_wxcrt.obj: ..\..\src\common\wxcrt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\wxcrt.cpp + +$(OBJS)\monolib_wxprintf.obj: ..\..\src\common\wxprintf.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\wxprintf.cpp + +$(OBJS)\monolib_xlocale.obj: ..\..\src\common\xlocale.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\xlocale.cpp + +$(OBJS)\monolib_xti.obj: ..\..\src\common\xti.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\xti.cpp + +$(OBJS)\monolib_xtistrm.obj: ..\..\src\common\xtistrm.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\xtistrm.cpp + +$(OBJS)\monolib_zipstrm.obj: ..\..\src\common\zipstrm.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\zipstrm.cpp + +$(OBJS)\monolib_zstream.obj: ..\..\src\common\zstream.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\zstream.cpp + +$(OBJS)\monolib_fswatchercmn.obj: ..\..\src\common\fswatchercmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fswatchercmn.cpp + +$(OBJS)\monolib_fswatcherg.obj: ..\..\src\generic\fswatcherg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\fswatcherg.cpp + +$(OBJS)\monolib_basemsw.obj: ..\..\src\msw\basemsw.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\basemsw.cpp + +$(OBJS)\monolib_crashrpt.obj: ..\..\src\msw\crashrpt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\crashrpt.cpp + +$(OBJS)\monolib_debughlp.obj: ..\..\src\msw\debughlp.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\debughlp.cpp + +$(OBJS)\monolib_dde.obj: ..\..\src\msw\dde.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dde.cpp + +$(OBJS)\monolib_dir.obj: ..\..\src\msw\dir.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dir.cpp + +$(OBJS)\monolib_dlmsw.obj: ..\..\src\msw\dlmsw.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dlmsw.cpp + +$(OBJS)\monolib_evtloopconsole.obj: ..\..\src\msw\evtloopconsole.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\evtloopconsole.cpp + +$(OBJS)\monolib_mimetype.obj: ..\..\src\msw\mimetype.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mimetype.cpp + +$(OBJS)\monolib_power.obj: ..\..\src\msw\power.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\power.cpp + +$(OBJS)\monolib_regconf.obj: ..\..\src\msw\regconf.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\regconf.cpp + +$(OBJS)\monolib_registry.obj: ..\..\src\msw\registry.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\registry.cpp + +$(OBJS)\monolib_snglinst.obj: ..\..\src\msw\snglinst.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\snglinst.cpp + +$(OBJS)\monolib_stackwalk.obj: ..\..\src\msw\stackwalk.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\stackwalk.cpp + +$(OBJS)\monolib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\stdpaths.cpp + +$(OBJS)\monolib_thread.obj: ..\..\src\msw\thread.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\thread.cpp + +$(OBJS)\monolib_timer.obj: ..\..\src\msw\timer.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\timer.cpp + +$(OBJS)\monolib_utils.obj: ..\..\src\msw\utils.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\utils.cpp + +$(OBJS)\monolib_utilsexc.obj: ..\..\src\msw\utilsexc.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\utilsexc.cpp + +$(OBJS)\monolib_fswatcher.obj: ..\..\src\msw\fswatcher.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\fswatcher.cpp + +$(OBJS)\monolib_event.obj: ..\..\src\common\event.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\monolib_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\monolib_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\monolib_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\monolib_main.obj: ..\..\src\msw\main.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\monolib_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\monolib_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\monolib_fs_inet.obj: ..\..\src\common\fs_inet.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fs_inet.cpp + +$(OBJS)\monolib_ftp.obj: ..\..\src\common\ftp.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ftp.cpp + +$(OBJS)\monolib_http.obj: ..\..\src\common\http.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\http.cpp + +$(OBJS)\monolib_protocol.obj: ..\..\src\common\protocol.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\protocol.cpp + +$(OBJS)\monolib_sckaddr.obj: ..\..\src\common\sckaddr.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sckaddr.cpp + +$(OBJS)\monolib_sckfile.obj: ..\..\src\common\sckfile.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sckfile.cpp + +$(OBJS)\monolib_sckipc.obj: ..\..\src\common\sckipc.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sckipc.cpp + +$(OBJS)\monolib_sckstrm.obj: ..\..\src\common\sckstrm.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sckstrm.cpp + +$(OBJS)\monolib_socket.obj: ..\..\src\common\socket.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\socket.cpp + +$(OBJS)\monolib_url.obj: ..\..\src\common\url.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\url.cpp + +$(OBJS)\monolib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp + +$(OBJS)\monolib_urlmsw.obj: ..\..\src\msw\urlmsw.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\urlmsw.cpp + +$(OBJS)\monolib_generic_statusbr.obj: ..\..\src\generic\statusbr.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\statusbr.cpp + +$(OBJS)\monolib_msw_accel.obj: ..\..\src\msw\accel.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\accel.cpp + +$(OBJS)\monolib_anybutton.obj: ..\..\src\msw\anybutton.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\anybutton.cpp + +$(OBJS)\monolib_artmsw.obj: ..\..\src\msw\artmsw.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\artmsw.cpp + +$(OBJS)\monolib_msw_bmpbuttn.obj: ..\..\src\msw\bmpbuttn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\bmpbuttn.cpp + +$(OBJS)\monolib_msw_button.obj: ..\..\src\msw\button.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\button.cpp + +$(OBJS)\monolib_msw_checkbox.obj: ..\..\src\msw\checkbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\checkbox.cpp + +$(OBJS)\monolib_msw_choice.obj: ..\..\src\msw\choice.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\choice.cpp + +$(OBJS)\monolib_colordlg.obj: ..\..\src\msw\colordlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\colordlg.cpp + +$(OBJS)\monolib_combo.obj: ..\..\src\msw\combo.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\combo.cpp + +$(OBJS)\monolib_msw_combobox.obj: ..\..\src\msw\combobox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\combobox.cpp + +$(OBJS)\monolib_msw_control.obj: ..\..\src\msw\control.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\control.cpp + +$(OBJS)\monolib_msw_dialog.obj: ..\..\src\msw\dialog.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dialog.cpp + +$(OBJS)\monolib_dirdlg.obj: ..\..\src\msw\dirdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dirdlg.cpp + +$(OBJS)\monolib_dragimag.obj: ..\..\src\msw\dragimag.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dragimag.cpp + +$(OBJS)\monolib_filedlg.obj: ..\..\src\msw\filedlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\filedlg.cpp + +$(OBJS)\monolib_frame.obj: ..\..\src\msw\frame.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\frame.cpp + +$(OBJS)\monolib_msw_gauge.obj: ..\..\src\msw\gauge.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\gauge.cpp + +$(OBJS)\monolib_headerctrl.obj: ..\..\src\msw\headerctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\headerctrl.cpp + +$(OBJS)\monolib_iniconf.obj: ..\..\src\msw\iniconf.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\iniconf.cpp + +$(OBJS)\monolib_msw_listbox.obj: ..\..\src\msw\listbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\listbox.cpp + +$(OBJS)\monolib_msw_listctrl.obj: ..\..\src\msw\listctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\listctrl.cpp + +$(OBJS)\monolib_mdi.obj: ..\..\src\msw\mdi.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mdi.cpp + +$(OBJS)\monolib_msw_menu.obj: ..\..\src\msw\menu.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\menu.cpp + +$(OBJS)\monolib_menuitem.obj: ..\..\src\msw\menuitem.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\menuitem.cpp + +$(OBJS)\monolib_metafile.obj: ..\..\src\msw\metafile.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\metafile.cpp + +$(OBJS)\monolib_msgdlg.obj: ..\..\src\msw\msgdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\msgdlg.cpp + +$(OBJS)\monolib_nativdlg.obj: ..\..\src\msw\nativdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\nativdlg.cpp + +$(OBJS)\monolib_nativewin.obj: ..\..\src\msw\nativewin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\nativewin.cpp + +$(OBJS)\monolib_msw_notebook.obj: ..\..\src\msw\notebook.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\notebook.cpp + +$(OBJS)\monolib_access.obj: ..\..\src\msw\ole\access.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\access.cpp + +$(OBJS)\monolib_ownerdrw.obj: ..\..\src\msw\ownerdrw.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ownerdrw.cpp + +$(OBJS)\monolib_msw_panel.obj: ..\..\src\msw\panel.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\panel.cpp + +$(OBJS)\monolib_progdlg.obj: ..\..\src\msw\progdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\progdlg.cpp + +$(OBJS)\monolib_msw_radiobox.obj: ..\..\src\msw\radiobox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\radiobox.cpp + +$(OBJS)\monolib_msw_radiobut.obj: ..\..\src\msw\radiobut.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\radiobut.cpp + +$(OBJS)\monolib_richmsgdlg.obj: ..\..\src\msw\richmsgdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\richmsgdlg.cpp + +$(OBJS)\monolib_msw_scrolbar.obj: ..\..\src\msw\scrolbar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\scrolbar.cpp + +$(OBJS)\monolib_msw_slider.obj: ..\..\src\msw\slider.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\slider.cpp + +$(OBJS)\monolib_msw_spinbutt.obj: ..\..\src\msw\spinbutt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\spinbutt.cpp + +$(OBJS)\monolib_spinctrl.obj: ..\..\src\msw\spinctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\spinctrl.cpp + +$(OBJS)\monolib_msw_statbmp.obj: ..\..\src\msw\statbmp.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\statbmp.cpp + +$(OBJS)\monolib_msw_statbox.obj: ..\..\src\msw\statbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\statbox.cpp + +$(OBJS)\monolib_statusbar.obj: ..\..\src\msw\statusbar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\statusbar.cpp + +$(OBJS)\monolib_msw_statline.obj: ..\..\src\msw\statline.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\statline.cpp + +$(OBJS)\monolib_msw_stattext.obj: ..\..\src\msw\stattext.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\stattext.cpp + +$(OBJS)\monolib_msw_toolbar.obj: ..\..\src\msw\toolbar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\toolbar.cpp + +$(OBJS)\monolib_msw_textctrl.obj: ..\..\src\msw\textctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\textctrl.cpp + +$(OBJS)\monolib_textentry.obj: ..\..\src\msw\textentry.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\textentry.cpp + +$(OBJS)\monolib_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\tglbtn.cpp + +$(OBJS)\monolib_treectrl.obj: ..\..\src\msw\treectrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\treectrl.cpp + +$(OBJS)\monolib_msw_checklst.obj: ..\..\src\msw\checklst.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\checklst.cpp + +$(OBJS)\monolib_msw_fdrepdlg.obj: ..\..\src\msw\fdrepdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\fdrepdlg.cpp + +$(OBJS)\monolib_fontdlg.obj: ..\..\src\msw\fontdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\fontdlg.cpp + +$(OBJS)\monolib_generic_accel.obj: ..\..\src\generic\accel.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\accel.cpp + +$(OBJS)\monolib_colrdlgg.obj: ..\..\src\generic\colrdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\colrdlgg.cpp + +$(OBJS)\monolib_dirdlgg.obj: ..\..\src\generic\dirdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\dirdlgg.cpp + +$(OBJS)\monolib_generic_fdrepdlg.obj: ..\..\src\generic\fdrepdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\fdrepdlg.cpp + +$(OBJS)\monolib_filedlgg.obj: ..\..\src\generic\filedlgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\filedlgg.cpp + +$(OBJS)\monolib_fontdlgg.obj: ..\..\src\generic\fontdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\fontdlgg.cpp + +$(OBJS)\monolib_generic_listctrl.obj: ..\..\src\generic\listctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\listctrl.cpp + +$(OBJS)\monolib_mdig.obj: ..\..\src\generic\mdig.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\mdig.cpp + +$(OBJS)\monolib_univ_bmpbuttn.obj: ..\..\src\univ\bmpbuttn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\bmpbuttn.cpp + +$(OBJS)\monolib_univ_button.obj: ..\..\src\univ\button.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\button.cpp + +$(OBJS)\monolib_univ_checkbox.obj: ..\..\src\univ\checkbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\checkbox.cpp + +$(OBJS)\monolib_univ_checklst.obj: ..\..\src\univ\checklst.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\checklst.cpp + +$(OBJS)\monolib_univ_choice.obj: ..\..\src\univ\choice.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\choice.cpp + +$(OBJS)\monolib_univ_combobox.obj: ..\..\src\univ\combobox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\combobox.cpp + +$(OBJS)\monolib_univ_control.obj: ..\..\src\univ\control.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\control.cpp + +$(OBJS)\monolib_ctrlrend.obj: ..\..\src\univ\ctrlrend.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\ctrlrend.cpp + +$(OBJS)\monolib_univ_dialog.obj: ..\..\src\univ\dialog.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\dialog.cpp + +$(OBJS)\monolib_framuniv.obj: ..\..\src\univ\framuniv.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\framuniv.cpp + +$(OBJS)\monolib_univ_gauge.obj: ..\..\src\univ\gauge.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\gauge.cpp + +$(OBJS)\monolib_inpcons.obj: ..\..\src\univ\inpcons.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\inpcons.cpp + +$(OBJS)\monolib_inphand.obj: ..\..\src\univ\inphand.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\inphand.cpp + +$(OBJS)\monolib_univ_listbox.obj: ..\..\src\univ\listbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\listbox.cpp + +$(OBJS)\monolib_univ_menu.obj: ..\..\src\univ\menu.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\menu.cpp + +$(OBJS)\monolib_univ_notebook.obj: ..\..\src\univ\notebook.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\notebook.cpp + +$(OBJS)\monolib_univ_radiobox.obj: ..\..\src\univ\radiobox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\radiobox.cpp + +$(OBJS)\monolib_univ_radiobut.obj: ..\..\src\univ\radiobut.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\radiobut.cpp + +$(OBJS)\monolib_scrarrow.obj: ..\..\src\univ\scrarrow.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\scrarrow.cpp + +$(OBJS)\monolib_univ_scrolbar.obj: ..\..\src\univ\scrolbar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\scrolbar.cpp + +$(OBJS)\monolib_scrthumb.obj: ..\..\src\univ\scrthumb.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\scrthumb.cpp + +$(OBJS)\monolib_settingsuniv.obj: ..\..\src\univ\settingsuniv.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\settingsuniv.cpp + +$(OBJS)\monolib_univ_slider.obj: ..\..\src\univ\slider.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\slider.cpp + +$(OBJS)\monolib_univ_spinbutt.obj: ..\..\src\univ\spinbutt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\spinbutt.cpp + +$(OBJS)\monolib_univ_statbmp.obj: ..\..\src\univ\statbmp.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\statbmp.cpp + +$(OBJS)\monolib_univ_statbox.obj: ..\..\src\univ\statbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\statbox.cpp + +$(OBJS)\monolib_univ_statline.obj: ..\..\src\univ\statline.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\statline.cpp + +$(OBJS)\monolib_univ_stattext.obj: ..\..\src\univ\stattext.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\stattext.cpp + +$(OBJS)\monolib_univ_statusbr.obj: ..\..\src\univ\statusbr.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\statusbr.cpp + +$(OBJS)\monolib_stdrend.obj: ..\..\src\univ\stdrend.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\stdrend.cpp + +$(OBJS)\monolib_univ_textctrl.obj: ..\..\src\univ\textctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\textctrl.cpp + +$(OBJS)\monolib_univ_tglbtn.obj: ..\..\src\univ\tglbtn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\tglbtn.cpp + +$(OBJS)\monolib_theme.obj: ..\..\src\univ\theme.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\theme.cpp + +$(OBJS)\monolib_univ_toolbar.obj: ..\..\src\univ\toolbar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\toolbar.cpp + +$(OBJS)\monolib_topluniv.obj: ..\..\src\univ\topluniv.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\topluniv.cpp + +$(OBJS)\monolib_winuniv.obj: ..\..\src\univ\winuniv.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\winuniv.cpp + +$(OBJS)\monolib_gtk.obj: ..\..\src\univ\themes\gtk.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\themes\gtk.cpp + +$(OBJS)\monolib_metal.obj: ..\..\src\univ\themes\metal.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\themes\metal.cpp + +$(OBJS)\monolib_mono.obj: ..\..\src\univ\themes\mono.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\themes\mono.cpp + +$(OBJS)\monolib_win32.obj: ..\..\src\univ\themes\win32.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\themes\win32.cpp + +$(OBJS)\monolib_bmpcbox.obj: ..\..\src\msw\bmpcbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\bmpcbox.cpp + +$(OBJS)\monolib_calctrl.obj: ..\..\src\msw\calctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\calctrl.cpp + +$(OBJS)\monolib_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp + +$(OBJS)\monolib_datecontrols.obj: ..\..\src\msw\datecontrols.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datecontrols.cpp + +$(OBJS)\monolib_datectrl.obj: ..\..\src\msw\datectrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp + +$(OBJS)\monolib_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp + +$(OBJS)\monolib_hyperlink.obj: ..\..\src\msw\hyperlink.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\hyperlink.cpp + +$(OBJS)\monolib_timectrl.obj: ..\..\src\msw\timectrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\timectrl.cpp + +$(OBJS)\monolib_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\mediactrlcmn.cpp + +$(OBJS)\monolib_mediactrl_am.obj: ..\..\src\msw\mediactrl_am.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mediactrl_am.cpp + +$(OBJS)\monolib_mediactrl_wmp10.obj: ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mediactrl_wmp10.cpp + +$(OBJS)\monolib_mediactrl_qt.obj: ..\..\src\msw\mediactrl_qt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mediactrl_qt.cpp + +$(OBJS)\monolib_helpbest.obj: ..\..\src\msw\helpbest.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\helpbest.cpp + +$(OBJS)\monolib_helpctrl.obj: ..\..\src\html\helpctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\helpctrl.cpp + +$(OBJS)\monolib_helpdata.obj: ..\..\src\html\helpdata.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\helpdata.cpp + +$(OBJS)\monolib_helpdlg.obj: ..\..\src\html\helpdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\helpdlg.cpp + +$(OBJS)\monolib_helpfrm.obj: ..\..\src\html\helpfrm.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\helpfrm.cpp + +$(OBJS)\monolib_helpwnd.obj: ..\..\src\html\helpwnd.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\helpwnd.cpp + +$(OBJS)\monolib_htmlcell.obj: ..\..\src\html\htmlcell.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmlcell.cpp + +$(OBJS)\monolib_htmlfilt.obj: ..\..\src\html\htmlfilt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmlfilt.cpp + +$(OBJS)\monolib_htmlpars.obj: ..\..\src\html\htmlpars.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmlpars.cpp + +$(OBJS)\monolib_htmltag.obj: ..\..\src\html\htmltag.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmltag.cpp + +$(OBJS)\monolib_htmlwin.obj: ..\..\src\html\htmlwin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmlwin.cpp + +$(OBJS)\monolib_htmprint.obj: ..\..\src\html\htmprint.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmprint.cpp + +$(OBJS)\monolib_m_dflist.obj: ..\..\src\html\m_dflist.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_dflist.cpp + +$(OBJS)\monolib_m_fonts.obj: ..\..\src\html\m_fonts.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_fonts.cpp + +$(OBJS)\monolib_m_hline.obj: ..\..\src\html\m_hline.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_hline.cpp + +$(OBJS)\monolib_m_image.obj: ..\..\src\html\m_image.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_image.cpp + +$(OBJS)\monolib_m_layout.obj: ..\..\src\html\m_layout.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_layout.cpp + +$(OBJS)\monolib_m_links.obj: ..\..\src\html\m_links.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_links.cpp + +$(OBJS)\monolib_m_list.obj: ..\..\src\html\m_list.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_list.cpp + +$(OBJS)\monolib_m_pre.obj: ..\..\src\html\m_pre.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_pre.cpp + +$(OBJS)\monolib_m_span.obj: ..\..\src\html\m_span.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_span.cpp + +$(OBJS)\monolib_m_style.obj: ..\..\src\html\m_style.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_style.cpp + +$(OBJS)\monolib_m_tables.obj: ..\..\src\html\m_tables.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_tables.cpp + +$(OBJS)\monolib_styleparams.obj: ..\..\src\html\styleparams.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\styleparams.cpp + +$(OBJS)\monolib_winpars.obj: ..\..\src\html\winpars.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\winpars.cpp + +$(OBJS)\monolib_htmllbox.obj: ..\..\src\generic\htmllbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\htmllbox.cpp + +$(OBJS)\monolib_webview_ie.obj: ..\..\src\msw\webview_ie.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\webview_ie.cpp + +$(OBJS)\monolib_webview.obj: ..\..\src\common\webview.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webview.cpp + +$(OBJS)\monolib_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp + +$(OBJS)\monolib_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp + +$(OBJS)\monolib_debugrpt.obj: ..\..\src\common\debugrpt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\debugrpt.cpp + +$(OBJS)\monolib_dbgrptg.obj: ..\..\src\generic\dbgrptg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\dbgrptg.cpp + +$(OBJS)\monolib_xh_animatctrl.obj: ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_animatctrl.cpp + +$(OBJS)\monolib_xh_bannerwindow.obj: ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_bannerwindow.cpp + +$(OBJS)\monolib_xh_bmp.obj: ..\..\src\xrc\xh_bmp.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_bmp.cpp + +$(OBJS)\monolib_xh_bmpcbox.obj: ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_bmpcbox.cpp + +$(OBJS)\monolib_xh_bmpbt.obj: ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_bmpbt.cpp + +$(OBJS)\monolib_xh_bttn.obj: ..\..\src\xrc\xh_bttn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_bttn.cpp + +$(OBJS)\monolib_xh_cald.obj: ..\..\src\xrc\xh_cald.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_cald.cpp + +$(OBJS)\monolib_xh_chckb.obj: ..\..\src\xrc\xh_chckb.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_chckb.cpp + +$(OBJS)\monolib_xh_chckl.obj: ..\..\src\xrc\xh_chckl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_chckl.cpp + +$(OBJS)\monolib_xh_choic.obj: ..\..\src\xrc\xh_choic.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_choic.cpp + +$(OBJS)\monolib_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_choicbk.cpp + +$(OBJS)\monolib_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_clrpicker.cpp + +$(OBJS)\monolib_xh_cmdlinkbn.obj: ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_cmdlinkbn.cpp + +$(OBJS)\monolib_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_collpane.cpp + +$(OBJS)\monolib_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_combo.cpp + +$(OBJS)\monolib_xh_comboctrl.obj: ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_comboctrl.cpp + +$(OBJS)\monolib_xh_datectrl.obj: ..\..\src\xrc\xh_datectrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_datectrl.cpp + +$(OBJS)\monolib_xh_dirpicker.obj: ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_dirpicker.cpp + +$(OBJS)\monolib_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_dlg.cpp + +$(OBJS)\monolib_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp + +$(OBJS)\monolib_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + +$(OBJS)\monolib_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp + +$(OBJS)\monolib_xh_fontpicker.obj: ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_fontpicker.cpp + +$(OBJS)\monolib_xh_frame.obj: ..\..\src\xrc\xh_frame.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_frame.cpp + +$(OBJS)\monolib_xh_gauge.obj: ..\..\src\xrc\xh_gauge.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_gauge.cpp + +$(OBJS)\monolib_xh_gdctl.obj: ..\..\src\xrc\xh_gdctl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_gdctl.cpp + +$(OBJS)\monolib_xh_grid.obj: ..\..\src\xrc\xh_grid.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_grid.cpp + +$(OBJS)\monolib_xh_html.obj: ..\..\src\xrc\xh_html.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_html.cpp + +$(OBJS)\monolib_xh_hyperlink.obj: ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_hyperlink.cpp + +$(OBJS)\monolib_xh_listb.obj: ..\..\src\xrc\xh_listb.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_listb.cpp + +$(OBJS)\monolib_xh_listbk.obj: ..\..\src\xrc\xh_listbk.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_listbk.cpp + +$(OBJS)\monolib_xh_listc.obj: ..\..\src\xrc\xh_listc.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_listc.cpp + +$(OBJS)\monolib_xh_mdi.obj: ..\..\src\xrc\xh_mdi.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_mdi.cpp + +$(OBJS)\monolib_xh_menu.obj: ..\..\src\xrc\xh_menu.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_menu.cpp + +$(OBJS)\monolib_xh_notbk.obj: ..\..\src\xrc\xh_notbk.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_notbk.cpp + +$(OBJS)\monolib_xh_odcombo.obj: ..\..\src\xrc\xh_odcombo.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_odcombo.cpp + +$(OBJS)\monolib_xh_panel.obj: ..\..\src\xrc\xh_panel.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_panel.cpp + +$(OBJS)\monolib_xh_propdlg.obj: ..\..\src\xrc\xh_propdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_propdlg.cpp + +$(OBJS)\monolib_xh_radbt.obj: ..\..\src\xrc\xh_radbt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_radbt.cpp + +$(OBJS)\monolib_xh_radbx.obj: ..\..\src\xrc\xh_radbx.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_radbx.cpp + +$(OBJS)\monolib_xh_scrol.obj: ..\..\src\xrc\xh_scrol.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_scrol.cpp + +$(OBJS)\monolib_xh_scwin.obj: ..\..\src\xrc\xh_scwin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_scwin.cpp + +$(OBJS)\monolib_xh_htmllbox.obj: ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_htmllbox.cpp + +$(OBJS)\monolib_xh_sizer.obj: ..\..\src\xrc\xh_sizer.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_sizer.cpp + +$(OBJS)\monolib_xh_slidr.obj: ..\..\src\xrc\xh_slidr.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_slidr.cpp + +$(OBJS)\monolib_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_spin.cpp + +$(OBJS)\monolib_xh_split.obj: ..\..\src\xrc\xh_split.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_split.cpp + +$(OBJS)\monolib_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_srchctrl.cpp + +$(OBJS)\monolib_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_statbar.cpp + +$(OBJS)\monolib_xh_stbmp.obj: ..\..\src\xrc\xh_stbmp.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_stbmp.cpp + +$(OBJS)\monolib_xh_stbox.obj: ..\..\src\xrc\xh_stbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_stbox.cpp + +$(OBJS)\monolib_xh_stlin.obj: ..\..\src\xrc\xh_stlin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_stlin.cpp + +$(OBJS)\monolib_xh_sttxt.obj: ..\..\src\xrc\xh_sttxt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_sttxt.cpp + +$(OBJS)\monolib_xh_text.obj: ..\..\src\xrc\xh_text.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_text.cpp + +$(OBJS)\monolib_xh_tglbtn.obj: ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_tglbtn.cpp + +$(OBJS)\monolib_xh_timectrl.obj: ..\..\src\xrc\xh_timectrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_timectrl.cpp + +$(OBJS)\monolib_xh_toolb.obj: ..\..\src\xrc\xh_toolb.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_toolb.cpp + +$(OBJS)\monolib_xh_toolbk.obj: ..\..\src\xrc\xh_toolbk.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_toolbk.cpp + +$(OBJS)\monolib_xh_tree.obj: ..\..\src\xrc\xh_tree.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_tree.cpp + +$(OBJS)\monolib_xh_treebk.obj: ..\..\src\xrc\xh_treebk.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_treebk.cpp + +$(OBJS)\monolib_xh_unkwn.obj: ..\..\src\xrc\xh_unkwn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_unkwn.cpp + +$(OBJS)\monolib_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_wizrd.cpp + +$(OBJS)\monolib_xmlres.obj: ..\..\src\xrc\xmlres.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmlres.cpp + +$(OBJS)\monolib_xmladv.obj: ..\..\src\xrc\xmladv.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmladv.cpp + +$(OBJS)\monolib_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp + +$(OBJS)\monolib_framemanager.obj: ..\..\src\aui\framemanager.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\framemanager.cpp + +$(OBJS)\monolib_dockart.obj: ..\..\src\aui\dockart.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\dockart.cpp + +$(OBJS)\monolib_floatpane.obj: ..\..\src\aui\floatpane.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\floatpane.cpp + +$(OBJS)\monolib_auibook.obj: ..\..\src\aui\auibook.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\auibook.cpp + +$(OBJS)\monolib_auibar.obj: ..\..\src\aui\auibar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\auibar.cpp + +$(OBJS)\monolib_tabmdi.obj: ..\..\src\aui\tabmdi.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\tabmdi.cpp + +$(OBJS)\monolib_tabart.obj: ..\..\src\aui\tabart.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\tabart.cpp + +$(OBJS)\monolib_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + +$(OBJS)\monolib_advprops.obj: ..\..\src\propgrid\advprops.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\advprops.cpp + +$(OBJS)\monolib_editors.obj: ..\..\src\propgrid\editors.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\editors.cpp + +$(OBJS)\monolib_manager.obj: ..\..\src\propgrid\manager.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\manager.cpp + +$(OBJS)\monolib_property.obj: ..\..\src\propgrid\property.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\property.cpp + +$(OBJS)\monolib_propgrid.obj: ..\..\src\propgrid\propgrid.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\propgrid.cpp + +$(OBJS)\monolib_propgridiface.obj: ..\..\src\propgrid\propgridiface.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\propgridiface.cpp + +$(OBJS)\monolib_propgridpagestate.obj: ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\propgridpagestate.cpp + +$(OBJS)\monolib_props.obj: ..\..\src\propgrid\props.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\props.cpp + +$(OBJS)\monolib_art_internal.obj: ..\..\src\ribbon\art_internal.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\art_internal.cpp + +$(OBJS)\monolib_art_msw.obj: ..\..\src\ribbon\art_msw.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\art_msw.cpp + +$(OBJS)\monolib_art_aui.obj: ..\..\src\ribbon\art_aui.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\art_aui.cpp + +$(OBJS)\monolib_bar.obj: ..\..\src\ribbon\bar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\bar.cpp + +$(OBJS)\monolib_ribbon_buttonbar.obj: ..\..\src\ribbon\buttonbar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\buttonbar.cpp + +$(OBJS)\monolib_ribbon_control.obj: ..\..\src\ribbon\control.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\control.cpp + +$(OBJS)\monolib_gallery.obj: ..\..\src\ribbon\gallery.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\gallery.cpp + +$(OBJS)\monolib_page.obj: ..\..\src\ribbon\page.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\page.cpp + +$(OBJS)\monolib_ribbon_panel.obj: ..\..\src\ribbon\panel.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\panel.cpp + +$(OBJS)\monolib_ribbon_toolbar.obj: ..\..\src\ribbon\toolbar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\toolbar.cpp + +$(OBJS)\monolib_xh_ribbon.obj: ..\..\src\xrc\xh_ribbon.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_ribbon.cpp + +$(OBJS)\monolib_richtextbuffer.obj: ..\..\src\richtext\richtextbuffer.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextbuffer.cpp + +$(OBJS)\monolib_richtextctrl.obj: ..\..\src\richtext\richtextctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextctrl.cpp + +$(OBJS)\monolib_richtextformatdlg.obj: ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextformatdlg.cpp + +$(OBJS)\monolib_richtexthtml.obj: ..\..\src\richtext\richtexthtml.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtexthtml.cpp + +$(OBJS)\monolib_richtextimagedlg.obj: ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextimagedlg.cpp + +$(OBJS)\monolib_richtextprint.obj: ..\..\src\richtext\richtextprint.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextprint.cpp + +$(OBJS)\monolib_richtextstyledlg.obj: ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextstyledlg.cpp + +$(OBJS)\monolib_richtextstyles.obj: ..\..\src\richtext\richtextstyles.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextstyles.cpp + +$(OBJS)\monolib_richtextsymboldlg.obj: ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextsymboldlg.cpp + +$(OBJS)\monolib_richtextxml.obj: ..\..\src\richtext\richtextxml.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextxml.cpp + +$(OBJS)\monolib_xh_richtext.obj: ..\..\src\xrc\xh_richtext.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_richtext.cpp + +$(OBJS)\monolib_stc.obj: ..\..\src\stc\stc.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\stc\stc.cpp + +$(OBJS)\monolib_PlatWX.obj: ..\..\src\stc\PlatWX.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\stc\PlatWX.cpp + +$(OBJS)\monolib_ScintillaWX.obj: ..\..\src\stc\ScintillaWX.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\stc\ScintillaWX.cpp + +$(OBJS)\monolib_xml.obj: ..\..\src\xml\xml.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xml\xml.cpp + +$(OBJS)\monolib_xtixml.obj: ..\..\src\common\xtixml.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\xtixml.cpp + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_activex.obj: ..\..\src\msw\ole\activex.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\activex.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_app.obj: ..\..\src\msw\app.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\app.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bitmap.obj: ..\..\src\msw\bitmap.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\bitmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_brush.obj: ..\..\src\msw\brush.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\brush.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_caret.obj: ..\..\src\msw\caret.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\caret.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_clipbrd.obj: ..\..\src\msw\clipbrd.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\clipbrd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_colour.obj: ..\..\src\msw\colour.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\colour.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_cursor.obj: ..\..\src\msw\cursor.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\cursor.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_data.obj: ..\..\src\msw\data.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\data.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dc.obj: ..\..\src\msw\dc.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcclient.obj: ..\..\src\msw\dcclient.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dcclient.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcmemory.obj: ..\..\src\msw\dcmemory.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dcmemory.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcprint.obj: ..\..\src\msw\dcprint.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dcprint.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcscreen.obj: ..\..\src\msw\dcscreen.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dcscreen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dialup.obj: ..\..\src\msw\dialup.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dialup.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dib.obj: ..\..\src\msw\dib.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dib.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_display.obj: ..\..\src\msw\display.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\display.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_enhmeta.obj: ..\..\src\msw\enhmeta.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\enhmeta.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_font.obj: ..\..\src\msw\font.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\font.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontenum.obj: ..\..\src\msw\fontenum.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\fontenum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontutil.obj: ..\..\src\msw\fontutil.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\fontutil.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gdiimage.obj: ..\..\src\msw\gdiimage.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\gdiimage.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gdiobj.obj: ..\..\src\msw\gdiobj.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\gdiobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gdiplus.obj: ..\..\src\msw\gdiplus.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\gdiplus.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_graphics.obj: ..\..\src\msw\graphics.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\graphics.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_icon.obj: ..\..\src\msw\icon.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\icon.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imaglist.obj: ..\..\src\msw\imaglist.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\imaglist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_minifram.obj: ..\..\src\msw\minifram.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\minifram.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_nonownedwnd.obj: ..\..\src\msw\nonownedwnd.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\nonownedwnd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dataobj.obj: ..\..\src\msw\ole\dataobj.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\dataobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dropsrc.obj: ..\..\src\msw\ole\dropsrc.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\dropsrc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_droptgt.obj: ..\..\src\msw\ole\droptgt.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\droptgt.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_oleutils.obj: ..\..\src\msw\ole\oleutils.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\oleutils.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_safearray.obj: ..\..\src\msw\ole\safearray.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\safearray.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_palette.obj: ..\..\src\msw\palette.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\palette.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_pen.obj: ..\..\src\msw\pen.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\pen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_popupwin.obj: ..\..\src\msw\popupwin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\popupwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_printdlg.obj: ..\..\src\msw\printdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\printdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_printwin.obj: ..\..\src\msw\printwin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\printwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_region.obj: ..\..\src\msw\region.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\region.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_renderer.obj: ..\..\src\msw\renderer.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\renderer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_settings.obj: ..\..\src\msw\settings.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\settings.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_textmeasure.obj: ..\..\src\msw\textmeasure.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\textmeasure.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_tooltip.obj: ..\..\src\msw\tooltip.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\tooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_toplevel.obj: ..\..\src\msw\toplevel.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\toplevel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_uiaction.obj: ..\..\src\msw\uiaction.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\uiaction.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_utilsgui.obj: ..\..\src\msw\utilsgui.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\utilsgui.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_utilswin.obj: ..\..\src\msw\utilswin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\utilswin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_uxtheme.obj: ..\..\src\msw\uxtheme.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\uxtheme.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_window.obj: ..\..\src\msw\window.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\window.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_helpchm.obj: ..\..\src\msw\helpchm.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\helpchm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_helpwin.obj: ..\..\src\msw\helpwin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\helpwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_automtn.obj: ..\..\src\msw\ole\automtn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\automtn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_uuid.obj: ..\..\src\msw\ole\uuid.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\uuid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_clrpickerg.obj: ..\..\src\generic\clrpickerg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\clrpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_collpaneg.obj: ..\..\src\generic\collpaneg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\collpaneg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_filepickerg.obj: ..\..\src\generic\filepickerg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\filepickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontpickerg.obj: ..\..\src\generic\fontpickerg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\fontpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_prntdlgg.obj: ..\..\src\generic\prntdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\prntdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_evtloop.obj: ..\..\src\msw\evtloop.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\evtloop.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_accelcmn.obj: ..\..\src\common\accelcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\accelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_accesscmn.obj: ..\..\src\common\accesscmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\accesscmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_anidecod.obj: ..\..\src\common\anidecod.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\anidecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_affinematrix2d.obj: ..\..\src\common\affinematrix2d.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\affinematrix2d.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_appcmn.obj: ..\..\src\common\appcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\appcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_artprov.obj: ..\..\src\common\artprov.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\artprov.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_artstd.obj: ..\..\src\common\artstd.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\artstd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bmpbase.obj: ..\..\src\common\bmpbase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\bmpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bmpbtncmn.obj: ..\..\src\common\bmpbtncmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\bmpbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bookctrl.obj: ..\..\src\common\bookctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\bookctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_btncmn.obj: ..\..\src\common\btncmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\btncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_cairo.obj: ..\..\src\common\cairo.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\cairo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_checkboxcmn.obj: ..\..\src\common\checkboxcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\checkboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_checklstcmn.obj: ..\..\src\common\checklstcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\checklstcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_choiccmn.obj: ..\..\src\common\choiccmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\choiccmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_clipcmn.obj: ..\..\src\common\clipcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\clipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_clrpickercmn.obj: ..\..\src\common\clrpickercmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\clrpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_colourcmn.obj: ..\..\src\common\colourcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\colourcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_colourdata.obj: ..\..\src\common\colourdata.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\colourdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_combocmn.obj: ..\..\src\common\combocmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\combocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_cmdproc.obj: ..\..\src\common\cmdproc.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\cmdproc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_cmndata.obj: ..\..\src\common\cmndata.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\cmndata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_containr.obj: ..\..\src\common\containr.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\containr.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_cshelp.obj: ..\..\src\common\cshelp.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\cshelp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_ctrlcmn.obj: ..\..\src\common\ctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_ctrlsub.obj: ..\..\src\common\ctrlsub.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ctrlsub.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcbase.obj: ..\..\src\common\dcbase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dcbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcbufcmn.obj: ..\..\src\common\dcbufcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dcbufcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcgraph.obj: ..\..\src\common\dcgraph.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dcgraph.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcsvg.obj: ..\..\src\common\dcsvg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dcsvg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dirctrlcmn.obj: ..\..\src\common\dirctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dirctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dlgcmn.obj: ..\..\src\common\dlgcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dndcmn.obj: ..\..\src\common\dndcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dndcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dobjcmn.obj: ..\..\src\common\dobjcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dobjcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_docmdi.obj: ..\..\src\common\docmdi.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\docmdi.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_docview.obj: ..\..\src\common\docview.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\docview.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dpycmn.obj: ..\..\src\common\dpycmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dpycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dseldlg.obj: ..\..\src\common\dseldlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dseldlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_effects.obj: ..\..\src\common\effects.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\effects.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fddlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filepickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontpickercmn.obj: ..\..\src\common\fontpickercmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fldlgcmn.obj: ..\..\src\common\fldlgcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fldlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontcmn.obj: ..\..\src\common\fontcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontdata.obj: ..\..\src\common\fontdata.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_graphicc.obj: ..\..\src\generic\graphicc.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\graphicc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontenumcmn.obj: ..\..\src\common\fontenumcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontenumcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontmap.obj: ..\..\src\common\fontmap.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontutilcmn.obj: ..\..\src\common\fontutilcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontutilcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_framecmn.obj: ..\..\src\common\framecmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\framecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gaugecmn.obj: ..\..\src\common\gaugecmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\gaugecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gbsizer.obj: ..\..\src\common\gbsizer.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\gbsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gdicmn.obj: ..\..\src\common\gdicmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\gdicmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_geometry.obj: ..\..\src\common\geometry.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\geometry.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gifdecod.obj: ..\..\src\common\gifdecod.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\gifdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_graphcmn.obj: ..\..\src\common\graphcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\graphcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_headercolcmn.obj: ..\..\src\common\headercolcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\headercolcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_headerctrlcmn.obj: ..\..\src\common\headerctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\headerctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_helpbase.obj: ..\..\src\common\helpbase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\helpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_iconbndl.obj: ..\..\src\common\iconbndl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\iconbndl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagall.obj: ..\..\src\common\imagall.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagall.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagbmp.obj: ..\..\src\common\imagbmp.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagbmp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_image.obj: ..\..\src\common\image.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\image.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagfill.obj: ..\..\src\common\imagfill.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagfill.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imaggif.obj: ..\..\src\common\imaggif.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imaggif.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagiff.obj: ..\..\src\common\imagiff.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagjpeg.obj: ..\..\src\common\imagjpeg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagjpeg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagpcx.obj: ..\..\src\common\imagpcx.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagpcx.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagpng.obj: ..\..\src\common\imagpng.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagpng.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagpnm.obj: ..\..\src\common\imagpnm.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagpnm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagtga.obj: ..\..\src\common\imagtga.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagtga.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagtiff.obj: ..\..\src\common\imagtiff.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagtiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagxpm.obj: ..\..\src\common\imagxpm.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagxpm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_layout.obj: ..\..\src\common\layout.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\layout.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_lboxcmn.obj: ..\..\src\common\lboxcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\lboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_listctrlcmn.obj: ..\..\src\common\listctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\listctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_markupparser.obj: ..\..\src\common\markupparser.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\markupparser.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_matrix.obj: ..\..\src\common\matrix.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\matrix.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_menucmn.obj: ..\..\src\common\menucmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\menucmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_modalhook.obj: ..\..\src\common\modalhook.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\modalhook.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_mousemanager.obj: ..\..\src\common\mousemanager.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\mousemanager.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_nbkbase.obj: ..\..\src\common\nbkbase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\nbkbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\overlaycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_ownerdrwcmn.obj: ..\..\src\common\ownerdrwcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ownerdrwcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_paper.obj: ..\..\src\common\paper.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\paper.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_panelcmn.obj: ..\..\src\common\panelcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\panelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_persist.obj: ..\..\src\common\persist.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\persist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_pickerbase.obj: ..\..\src\common\pickerbase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\pickerbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_popupcmn.obj: ..\..\src\common\popupcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\popupcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_preferencescmn.obj: ..\..\src\common\preferencescmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\preferencescmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_prntbase.obj: ..\..\src\common\prntbase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\prntbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_quantize.obj: ..\..\src\common\quantize.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\quantize.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_radiobtncmn.obj: ..\..\src\common\radiobtncmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\radiobtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_radiocmn.obj: ..\..\src\common\radiocmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\radiocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_rearrangectrl.obj: ..\..\src\common\rearrangectrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\rearrangectrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_rendcmn.obj: ..\..\src\common\rendcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\rendcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_rgncmn.obj: ..\..\src\common\rgncmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\rgncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_scrolbarcmn.obj: ..\..\src\common\scrolbarcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\scrolbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_settcmn.obj: ..\..\src\common\settcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\settcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_sizer.obj: ..\..\src\common\sizer.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_slidercmn.obj: ..\..\src\common\slidercmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\slidercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_spinbtncmn.obj: ..\..\src\common\spinbtncmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\spinbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_spinctrlcmn.obj: ..\..\src\common\spinctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\spinctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_srchcmn.obj: ..\..\src\common\srchcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\srchcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_statbar.obj: ..\..\src\common\statbar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\statbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_statbmpcmn.obj: ..\..\src\common\statbmpcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\statbmpcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_statboxcmn.obj: ..\..\src\common\statboxcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\statboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_statlinecmn.obj: ..\..\src\common\statlinecmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\statlinecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_stattextcmn.obj: ..\..\src\common\stattextcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stattextcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_stockitem.obj: ..\..\src\common\stockitem.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stockitem.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_tbarbase.obj: ..\..\src\common\tbarbase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\tbarbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_textcmn.obj: ..\..\src\common\textcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\textcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_textentrycmn.obj: ..\..\src\common\textentrycmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\textentrycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_textmeasurecmn.obj: ..\..\src\common\textmeasurecmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\textmeasurecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_toplvcmn.obj: ..\..\src\common\toplvcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\toplvcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_treebase.obj: ..\..\src\common\treebase.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\treebase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_uiactioncmn.obj: ..\..\src\common\uiactioncmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\uiactioncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_valgen.obj: ..\..\src\common\valgen.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\valgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_validate.obj: ..\..\src\common\validate.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\validate.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_valtext.obj: ..\..\src\common\valtext.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\valtext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_valnum.obj: ..\..\src\common\valnum.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\valnum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_wincmn.obj: ..\..\src\common\wincmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\wincmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_windowid.obj: ..\..\src\common\windowid.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\windowid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_wrapsizer.obj: ..\..\src\common\wrapsizer.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\wrapsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_xpmdecod.obj: ..\..\src\common\xpmdecod.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\xpmdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_busyinfo.obj: ..\..\src\generic\busyinfo.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\busyinfo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_generic_buttonbar.obj: ..\..\src\generic\buttonbar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\buttonbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_choicdgg.obj: ..\..\src\generic\choicdgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\choicdgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_choicbkg.obj: ..\..\src\generic\choicbkg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\choicbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_combog.obj: ..\..\src\generic\combog.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\combog.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcpsg.obj: ..\..\src\generic\dcpsg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\dcpsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dirctrlg.obj: ..\..\src\generic\dirctrlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\dirctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dragimgg.obj: ..\..\src\generic\dragimgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\dragimgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_filectrlg.obj: ..\..\src\generic\filectrlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\filectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_infobar.obj: ..\..\src\generic\infobar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\infobar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_listbkg.obj: ..\..\src\generic\listbkg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\listbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_logg.obj: ..\..\src\generic\logg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\logg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_markuptext.obj: ..\..\src\generic\markuptext.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\markuptext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_msgdlgg.obj: ..\..\src\generic\msgdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\msgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_numdlgg.obj: ..\..\src\generic\numdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\numdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_progdlgg.obj: ..\..\src\generic\progdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\progdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_preferencesg.obj: ..\..\src\generic\preferencesg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\preferencesg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_printps.obj: ..\..\src\generic\printps.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\printps.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_renderg.obj: ..\..\src\generic\renderg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\renderg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_richmsgdlgg.obj: ..\..\src\generic\richmsgdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\richmsgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_scrlwing.obj: ..\..\src\generic\scrlwing.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\scrlwing.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_selstore.obj: ..\..\src\generic\selstore.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\selstore.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_spinctlg.obj: ..\..\src\generic\spinctlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\spinctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_splitter.obj: ..\..\src\generic\splitter.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\splitter.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_srchctlg.obj: ..\..\src\generic\srchctlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\srchctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_statbmpg.obj: ..\..\src\generic\statbmpg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\statbmpg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_stattextg.obj: ..\..\src\generic\stattextg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\stattextg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_textdlgg.obj: ..\..\src\generic\textdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\textdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_tipwin.obj: ..\..\src\generic\tipwin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\tipwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_toolbkg.obj: ..\..\src\generic\toolbkg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\toolbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_treectlg.obj: ..\..\src\generic\treectlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\treectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_treebkg.obj: ..\..\src\generic\treebkg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\treebkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_vlbox.obj: ..\..\src\generic\vlbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\vlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_vscroll.obj: ..\..\src\generic\vscroll.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\vscroll.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_xmlreshandler.obj: ..\..\src\xrc\xmlreshandler.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmlreshandler.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_animatecmn.obj: ..\..\src\common\animatecmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\animatecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bmpcboxcmn.obj: ..\..\src\common\bmpcboxcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\bmpcboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_datavcmn.obj: ..\..\src\common\datavcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\datavcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gridcmn.obj: ..\..\src\common\gridcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\gridcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_hyperlnkcmn.obj: ..\..\src\common\hyperlnkcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\hyperlnkcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_odcombocmn.obj: ..\..\src\common\odcombocmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\odcombocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_richtooltipcmn.obj: ..\..\src\common\richtooltipcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\richtooltipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\aboutdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bannerwindow.obj: ..\..\src\generic\bannerwindow.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\bannerwindow.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_datavgen.obj: ..\..\src\generic\datavgen.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\datavgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_datectlg.obj: ..\..\src\generic\datectlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\datectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_editlbox.obj: ..\..\src\generic\editlbox.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\editlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_grid.obj: ..\..\src\generic\grid.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\grid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gridctrl.obj: ..\..\src\generic\gridctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\gridctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_grideditors.obj: ..\..\src\generic\grideditors.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\grideditors.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gridsel.obj: ..\..\src\generic\gridsel.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\gridsel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_helpext.obj: ..\..\src\generic\helpext.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\helpext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_hyperlinkg.obj: ..\..\src\generic\hyperlinkg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\hyperlinkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_laywin.obj: ..\..\src\generic\laywin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\laywin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_notifmsgg.obj: ..\..\src\generic\notifmsgg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\notifmsgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_odcombo.obj: ..\..\src\generic\odcombo.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\odcombo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_propdlg.obj: ..\..\src\generic\propdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\propdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_richtooltipg.obj: ..\..\src\generic\richtooltipg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\richtooltipg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_sashwin.obj: ..\..\src\generic\sashwin.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\sashwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_splash.obj: ..\..\src\generic\splash.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\splash.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_timectrlg.obj: ..\..\src\generic\timectrlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\timectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_tipdlg.obj: ..\..\src\generic\tipdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\tipdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_treelist.obj: ..\..\src\generic\treelist.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\treelist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_wizard.obj: ..\..\src\generic\wizard.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\wizard.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\taskbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_notifmsg.obj: ..\..\src\msw\notifmsg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\notifmsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_richtooltip.obj: ..\..\src\msw\richtooltip.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\richtooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_sound.obj: ..\..\src\msw\sound.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\sound.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_taskbar.obj: ..\..\src\msw\taskbar.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\taskbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_joystick.obj: ..\..\src\msw\joystick.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\joystick.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_animateg.obj: ..\..\src\generic\animateg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\animateg.cpp +!endif + +$(OBJS)\basedll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\basedll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dwxUSE_GUI=0 -dWXMAKINGDLL_BASE -dwxUSE_BASE=1 ..\..\src\msw\version.rc + +$(OBJS)\basedll_any.obj: ..\..\src\common\any.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\any.cpp + +$(OBJS)\basedll_appbase.obj: ..\..\src\common\appbase.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\appbase.cpp + +$(OBJS)\basedll_arcall.obj: ..\..\src\common\arcall.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\arcall.cpp + +$(OBJS)\basedll_arcfind.obj: ..\..\src\common\arcfind.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\arcfind.cpp + +$(OBJS)\basedll_archive.obj: ..\..\src\common\archive.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\archive.cpp + +$(OBJS)\basedll_arrstr.obj: ..\..\src\common\arrstr.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\arrstr.cpp + +$(OBJS)\basedll_base64.obj: ..\..\src\common\base64.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\base64.cpp + +$(OBJS)\basedll_clntdata.obj: ..\..\src\common\clntdata.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\clntdata.cpp + +$(OBJS)\basedll_cmdline.obj: ..\..\src\common\cmdline.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\cmdline.cpp + +$(OBJS)\basedll_config.obj: ..\..\src\common\config.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\config.cpp + +$(OBJS)\basedll_convauto.obj: ..\..\src\common\convauto.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\convauto.cpp + +$(OBJS)\basedll_datetime.obj: ..\..\src\common\datetime.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\datetime.cpp + +$(OBJS)\basedll_datetimefmt.obj: ..\..\src\common\datetimefmt.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\datetimefmt.cpp + +$(OBJS)\basedll_datstrm.obj: ..\..\src\common\datstrm.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\datstrm.cpp + +$(OBJS)\basedll_dircmn.obj: ..\..\src\common\dircmn.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\dircmn.cpp + +$(OBJS)\basedll_dynarray.obj: ..\..\src\common\dynarray.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\dynarray.cpp + +$(OBJS)\basedll_dynlib.obj: ..\..\src\common\dynlib.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\dynlib.cpp + +$(OBJS)\basedll_dynload.obj: ..\..\src\common\dynload.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\dynload.cpp + +$(OBJS)\basedll_encconv.obj: ..\..\src\common\encconv.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\encconv.cpp + +$(OBJS)\basedll_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\evtloopcmn.cpp + +$(OBJS)\basedll_extended.obj: ..\..\src\common\extended.c + $(CC) -q -c -P- -o$@ $(BASEDLL_CFLAGS) ..\..\src\common\extended.c + +$(OBJS)\basedll_ffile.obj: ..\..\src\common\ffile.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\ffile.cpp + +$(OBJS)\basedll_file.obj: ..\..\src\common\file.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\file.cpp + +$(OBJS)\basedll_fileback.obj: ..\..\src\common\fileback.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fileback.cpp + +$(OBJS)\basedll_fileconf.obj: ..\..\src\common\fileconf.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fileconf.cpp + +$(OBJS)\basedll_filefn.obj: ..\..\src\common\filefn.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\filefn.cpp + +$(OBJS)\basedll_filename.obj: ..\..\src\common\filename.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\filename.cpp + +$(OBJS)\basedll_filesys.obj: ..\..\src\common\filesys.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\filesys.cpp + +$(OBJS)\basedll_filtall.obj: ..\..\src\common\filtall.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\filtall.cpp + +$(OBJS)\basedll_filtfind.obj: ..\..\src\common\filtfind.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\filtfind.cpp + +$(OBJS)\basedll_fmapbase.obj: ..\..\src\common\fmapbase.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fmapbase.cpp + +$(OBJS)\basedll_fs_arc.obj: ..\..\src\common\fs_arc.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fs_arc.cpp + +$(OBJS)\basedll_fs_filter.obj: ..\..\src\common\fs_filter.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fs_filter.cpp + +$(OBJS)\basedll_hash.obj: ..\..\src\common\hash.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\hash.cpp + +$(OBJS)\basedll_hashmap.obj: ..\..\src\common\hashmap.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\hashmap.cpp + +$(OBJS)\basedll_init.obj: ..\..\src\common\init.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\init.cpp + +$(OBJS)\basedll_intl.obj: ..\..\src\common\intl.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\intl.cpp + +$(OBJS)\basedll_ipcbase.obj: ..\..\src\common\ipcbase.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\ipcbase.cpp + +$(OBJS)\basedll_languageinfo.obj: ..\..\src\common\languageinfo.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\languageinfo.cpp + +$(OBJS)\basedll_list.obj: ..\..\src\common\list.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\list.cpp + +$(OBJS)\basedll_log.obj: ..\..\src\common\log.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\log.cpp + +$(OBJS)\basedll_longlong.obj: ..\..\src\common\longlong.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\longlong.cpp + +$(OBJS)\basedll_memory.obj: ..\..\src\common\memory.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\memory.cpp + +$(OBJS)\basedll_mimecmn.obj: ..\..\src\common\mimecmn.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\mimecmn.cpp + +$(OBJS)\basedll_module.obj: ..\..\src\common\module.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\module.cpp + +$(OBJS)\basedll_mstream.obj: ..\..\src\common\mstream.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\mstream.cpp + +$(OBJS)\basedll_numformatter.obj: ..\..\src\common\numformatter.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\numformatter.cpp + +$(OBJS)\basedll_object.obj: ..\..\src\common\object.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\object.cpp + +$(OBJS)\basedll_platinfo.obj: ..\..\src\common\platinfo.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\platinfo.cpp + +$(OBJS)\basedll_powercmn.obj: ..\..\src\common\powercmn.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\powercmn.cpp + +$(OBJS)\basedll_process.obj: ..\..\src\common\process.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\process.cpp + +$(OBJS)\basedll_regex.obj: ..\..\src\common\regex.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\regex.cpp + +$(OBJS)\basedll_stdpbase.obj: ..\..\src\common\stdpbase.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stdpbase.cpp + +$(OBJS)\basedll_sstream.obj: ..\..\src\common\sstream.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\sstream.cpp + +$(OBJS)\basedll_stdstream.obj: ..\..\src\common\stdstream.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stdstream.cpp + +$(OBJS)\basedll_stopwatch.obj: ..\..\src\common\stopwatch.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stopwatch.cpp + +$(OBJS)\basedll_strconv.obj: ..\..\src\common\strconv.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\strconv.cpp + +$(OBJS)\basedll_stream.obj: ..\..\src\common\stream.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stream.cpp + +$(OBJS)\basedll_string.obj: ..\..\src\common\string.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\string.cpp + +$(OBJS)\basedll_stringimpl.obj: ..\..\src\common\stringimpl.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stringimpl.cpp + +$(OBJS)\basedll_stringops.obj: ..\..\src\common\stringops.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stringops.cpp + +$(OBJS)\basedll_strvararg.obj: ..\..\src\common\strvararg.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\strvararg.cpp + +$(OBJS)\basedll_sysopt.obj: ..\..\src\common\sysopt.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\sysopt.cpp + +$(OBJS)\basedll_tarstrm.obj: ..\..\src\common\tarstrm.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\tarstrm.cpp + +$(OBJS)\basedll_textbuf.obj: ..\..\src\common\textbuf.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\textbuf.cpp + +$(OBJS)\basedll_textfile.obj: ..\..\src\common\textfile.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\textfile.cpp + +$(OBJS)\basedll_threadinfo.obj: ..\..\src\common\threadinfo.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\threadinfo.cpp + +$(OBJS)\basedll_time.obj: ..\..\src\common\time.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\time.cpp + +$(OBJS)\basedll_timercmn.obj: ..\..\src\common\timercmn.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\timercmn.cpp + +$(OBJS)\basedll_timerimpl.obj: ..\..\src\common\timerimpl.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\timerimpl.cpp + +$(OBJS)\basedll_tokenzr.obj: ..\..\src\common\tokenzr.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\tokenzr.cpp + +$(OBJS)\basedll_translation.obj: ..\..\src\common\translation.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\translation.cpp + +$(OBJS)\basedll_txtstrm.obj: ..\..\src\common\txtstrm.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\txtstrm.cpp + +$(OBJS)\basedll_unichar.obj: ..\..\src\common\unichar.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\unichar.cpp + +$(OBJS)\basedll_uri.obj: ..\..\src\common\uri.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\uri.cpp + +$(OBJS)\basedll_ustring.obj: ..\..\src\common\ustring.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\ustring.cpp + +$(OBJS)\basedll_variant.obj: ..\..\src\common\variant.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\variant.cpp + +$(OBJS)\basedll_wfstream.obj: ..\..\src\common\wfstream.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\wfstream.cpp + +$(OBJS)\basedll_wxcrt.obj: ..\..\src\common\wxcrt.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\wxcrt.cpp + +$(OBJS)\basedll_wxprintf.obj: ..\..\src\common\wxprintf.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\wxprintf.cpp + +$(OBJS)\basedll_xlocale.obj: ..\..\src\common\xlocale.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\xlocale.cpp + +$(OBJS)\basedll_xti.obj: ..\..\src\common\xti.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\xti.cpp + +$(OBJS)\basedll_xtistrm.obj: ..\..\src\common\xtistrm.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\xtistrm.cpp + +$(OBJS)\basedll_zipstrm.obj: ..\..\src\common\zipstrm.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\zipstrm.cpp + +$(OBJS)\basedll_zstream.obj: ..\..\src\common\zstream.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\zstream.cpp + +$(OBJS)\basedll_fswatchercmn.obj: ..\..\src\common\fswatchercmn.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fswatchercmn.cpp + +$(OBJS)\basedll_fswatcherg.obj: ..\..\src\generic\fswatcherg.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\generic\fswatcherg.cpp + +$(OBJS)\basedll_basemsw.obj: ..\..\src\msw\basemsw.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\basemsw.cpp + +$(OBJS)\basedll_crashrpt.obj: ..\..\src\msw\crashrpt.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\crashrpt.cpp + +$(OBJS)\basedll_debughlp.obj: ..\..\src\msw\debughlp.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\debughlp.cpp + +$(OBJS)\basedll_dde.obj: ..\..\src\msw\dde.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\dde.cpp + +$(OBJS)\basedll_dir.obj: ..\..\src\msw\dir.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\dir.cpp + +$(OBJS)\basedll_dlmsw.obj: ..\..\src\msw\dlmsw.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\dlmsw.cpp + +$(OBJS)\basedll_evtloopconsole.obj: ..\..\src\msw\evtloopconsole.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\evtloopconsole.cpp + +$(OBJS)\basedll_mimetype.obj: ..\..\src\msw\mimetype.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\mimetype.cpp + +$(OBJS)\basedll_power.obj: ..\..\src\msw\power.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\power.cpp + +$(OBJS)\basedll_regconf.obj: ..\..\src\msw\regconf.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\regconf.cpp + +$(OBJS)\basedll_registry.obj: ..\..\src\msw\registry.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\registry.cpp + +$(OBJS)\basedll_snglinst.obj: ..\..\src\msw\snglinst.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\snglinst.cpp + +$(OBJS)\basedll_stackwalk.obj: ..\..\src\msw\stackwalk.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\stackwalk.cpp + +$(OBJS)\basedll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\stdpaths.cpp + +$(OBJS)\basedll_thread.obj: ..\..\src\msw\thread.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\thread.cpp + +$(OBJS)\basedll_timer.obj: ..\..\src\msw\timer.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\timer.cpp + +$(OBJS)\basedll_utils.obj: ..\..\src\msw\utils.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\utils.cpp + +$(OBJS)\basedll_utilsexc.obj: ..\..\src\msw\utilsexc.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\utilsexc.cpp + +$(OBJS)\basedll_fswatcher.obj: ..\..\src\msw\fswatcher.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\fswatcher.cpp + +$(OBJS)\basedll_event.obj: ..\..\src\common\event.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\basedll_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\basedll_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\basedll_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\basedll_main.obj: ..\..\src\msw\main.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\basedll_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\basedll_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) -q -c -P -o$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\baselib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\baselib_any.obj: ..\..\src\common\any.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\any.cpp + +$(OBJS)\baselib_appbase.obj: ..\..\src\common\appbase.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\appbase.cpp + +$(OBJS)\baselib_arcall.obj: ..\..\src\common\arcall.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\arcall.cpp + +$(OBJS)\baselib_arcfind.obj: ..\..\src\common\arcfind.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\arcfind.cpp + +$(OBJS)\baselib_archive.obj: ..\..\src\common\archive.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\archive.cpp + +$(OBJS)\baselib_arrstr.obj: ..\..\src\common\arrstr.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\arrstr.cpp + +$(OBJS)\baselib_base64.obj: ..\..\src\common\base64.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\base64.cpp + +$(OBJS)\baselib_clntdata.obj: ..\..\src\common\clntdata.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\clntdata.cpp + +$(OBJS)\baselib_cmdline.obj: ..\..\src\common\cmdline.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\cmdline.cpp + +$(OBJS)\baselib_config.obj: ..\..\src\common\config.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\config.cpp + +$(OBJS)\baselib_convauto.obj: ..\..\src\common\convauto.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\convauto.cpp + +$(OBJS)\baselib_datetime.obj: ..\..\src\common\datetime.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\datetime.cpp + +$(OBJS)\baselib_datetimefmt.obj: ..\..\src\common\datetimefmt.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\datetimefmt.cpp + +$(OBJS)\baselib_datstrm.obj: ..\..\src\common\datstrm.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\datstrm.cpp + +$(OBJS)\baselib_dircmn.obj: ..\..\src\common\dircmn.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\dircmn.cpp + +$(OBJS)\baselib_dynarray.obj: ..\..\src\common\dynarray.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\dynarray.cpp + +$(OBJS)\baselib_dynlib.obj: ..\..\src\common\dynlib.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\dynlib.cpp + +$(OBJS)\baselib_dynload.obj: ..\..\src\common\dynload.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\dynload.cpp + +$(OBJS)\baselib_encconv.obj: ..\..\src\common\encconv.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\encconv.cpp + +$(OBJS)\baselib_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\evtloopcmn.cpp + +$(OBJS)\baselib_extended.obj: ..\..\src\common\extended.c + $(CC) -q -c -P- -o$@ $(BASELIB_CFLAGS) ..\..\src\common\extended.c + +$(OBJS)\baselib_ffile.obj: ..\..\src\common\ffile.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\ffile.cpp + +$(OBJS)\baselib_file.obj: ..\..\src\common\file.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\file.cpp + +$(OBJS)\baselib_fileback.obj: ..\..\src\common\fileback.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fileback.cpp + +$(OBJS)\baselib_fileconf.obj: ..\..\src\common\fileconf.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fileconf.cpp + +$(OBJS)\baselib_filefn.obj: ..\..\src\common\filefn.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\filefn.cpp + +$(OBJS)\baselib_filename.obj: ..\..\src\common\filename.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\filename.cpp + +$(OBJS)\baselib_filesys.obj: ..\..\src\common\filesys.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\filesys.cpp + +$(OBJS)\baselib_filtall.obj: ..\..\src\common\filtall.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\filtall.cpp + +$(OBJS)\baselib_filtfind.obj: ..\..\src\common\filtfind.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\filtfind.cpp + +$(OBJS)\baselib_fmapbase.obj: ..\..\src\common\fmapbase.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fmapbase.cpp + +$(OBJS)\baselib_fs_arc.obj: ..\..\src\common\fs_arc.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fs_arc.cpp + +$(OBJS)\baselib_fs_filter.obj: ..\..\src\common\fs_filter.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fs_filter.cpp + +$(OBJS)\baselib_hash.obj: ..\..\src\common\hash.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\hash.cpp + +$(OBJS)\baselib_hashmap.obj: ..\..\src\common\hashmap.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\hashmap.cpp + +$(OBJS)\baselib_init.obj: ..\..\src\common\init.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\init.cpp + +$(OBJS)\baselib_intl.obj: ..\..\src\common\intl.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\intl.cpp + +$(OBJS)\baselib_ipcbase.obj: ..\..\src\common\ipcbase.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\ipcbase.cpp + +$(OBJS)\baselib_languageinfo.obj: ..\..\src\common\languageinfo.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\languageinfo.cpp + +$(OBJS)\baselib_list.obj: ..\..\src\common\list.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\list.cpp + +$(OBJS)\baselib_log.obj: ..\..\src\common\log.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\log.cpp + +$(OBJS)\baselib_longlong.obj: ..\..\src\common\longlong.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\longlong.cpp + +$(OBJS)\baselib_memory.obj: ..\..\src\common\memory.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\memory.cpp + +$(OBJS)\baselib_mimecmn.obj: ..\..\src\common\mimecmn.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\mimecmn.cpp + +$(OBJS)\baselib_module.obj: ..\..\src\common\module.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\module.cpp + +$(OBJS)\baselib_mstream.obj: ..\..\src\common\mstream.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\mstream.cpp + +$(OBJS)\baselib_numformatter.obj: ..\..\src\common\numformatter.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\numformatter.cpp + +$(OBJS)\baselib_object.obj: ..\..\src\common\object.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\object.cpp + +$(OBJS)\baselib_platinfo.obj: ..\..\src\common\platinfo.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\platinfo.cpp + +$(OBJS)\baselib_powercmn.obj: ..\..\src\common\powercmn.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\powercmn.cpp + +$(OBJS)\baselib_process.obj: ..\..\src\common\process.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\process.cpp + +$(OBJS)\baselib_regex.obj: ..\..\src\common\regex.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\regex.cpp + +$(OBJS)\baselib_stdpbase.obj: ..\..\src\common\stdpbase.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stdpbase.cpp + +$(OBJS)\baselib_sstream.obj: ..\..\src\common\sstream.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\sstream.cpp + +$(OBJS)\baselib_stdstream.obj: ..\..\src\common\stdstream.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stdstream.cpp + +$(OBJS)\baselib_stopwatch.obj: ..\..\src\common\stopwatch.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stopwatch.cpp + +$(OBJS)\baselib_strconv.obj: ..\..\src\common\strconv.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\strconv.cpp + +$(OBJS)\baselib_stream.obj: ..\..\src\common\stream.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stream.cpp + +$(OBJS)\baselib_string.obj: ..\..\src\common\string.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\string.cpp + +$(OBJS)\baselib_stringimpl.obj: ..\..\src\common\stringimpl.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stringimpl.cpp + +$(OBJS)\baselib_stringops.obj: ..\..\src\common\stringops.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stringops.cpp + +$(OBJS)\baselib_strvararg.obj: ..\..\src\common\strvararg.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\strvararg.cpp + +$(OBJS)\baselib_sysopt.obj: ..\..\src\common\sysopt.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\sysopt.cpp + +$(OBJS)\baselib_tarstrm.obj: ..\..\src\common\tarstrm.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\tarstrm.cpp + +$(OBJS)\baselib_textbuf.obj: ..\..\src\common\textbuf.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\textbuf.cpp + +$(OBJS)\baselib_textfile.obj: ..\..\src\common\textfile.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\textfile.cpp + +$(OBJS)\baselib_threadinfo.obj: ..\..\src\common\threadinfo.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\threadinfo.cpp + +$(OBJS)\baselib_time.obj: ..\..\src\common\time.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\time.cpp + +$(OBJS)\baselib_timercmn.obj: ..\..\src\common\timercmn.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\timercmn.cpp + +$(OBJS)\baselib_timerimpl.obj: ..\..\src\common\timerimpl.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\timerimpl.cpp + +$(OBJS)\baselib_tokenzr.obj: ..\..\src\common\tokenzr.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\tokenzr.cpp + +$(OBJS)\baselib_translation.obj: ..\..\src\common\translation.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\translation.cpp + +$(OBJS)\baselib_txtstrm.obj: ..\..\src\common\txtstrm.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\txtstrm.cpp + +$(OBJS)\baselib_unichar.obj: ..\..\src\common\unichar.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\unichar.cpp + +$(OBJS)\baselib_uri.obj: ..\..\src\common\uri.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\uri.cpp + +$(OBJS)\baselib_ustring.obj: ..\..\src\common\ustring.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\ustring.cpp + +$(OBJS)\baselib_variant.obj: ..\..\src\common\variant.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\variant.cpp + +$(OBJS)\baselib_wfstream.obj: ..\..\src\common\wfstream.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\wfstream.cpp + +$(OBJS)\baselib_wxcrt.obj: ..\..\src\common\wxcrt.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\wxcrt.cpp + +$(OBJS)\baselib_wxprintf.obj: ..\..\src\common\wxprintf.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\wxprintf.cpp + +$(OBJS)\baselib_xlocale.obj: ..\..\src\common\xlocale.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\xlocale.cpp + +$(OBJS)\baselib_xti.obj: ..\..\src\common\xti.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\xti.cpp + +$(OBJS)\baselib_xtistrm.obj: ..\..\src\common\xtistrm.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\xtistrm.cpp + +$(OBJS)\baselib_zipstrm.obj: ..\..\src\common\zipstrm.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\zipstrm.cpp + +$(OBJS)\baselib_zstream.obj: ..\..\src\common\zstream.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\zstream.cpp + +$(OBJS)\baselib_fswatchercmn.obj: ..\..\src\common\fswatchercmn.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fswatchercmn.cpp + +$(OBJS)\baselib_fswatcherg.obj: ..\..\src\generic\fswatcherg.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\generic\fswatcherg.cpp + +$(OBJS)\baselib_basemsw.obj: ..\..\src\msw\basemsw.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\basemsw.cpp + +$(OBJS)\baselib_crashrpt.obj: ..\..\src\msw\crashrpt.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\crashrpt.cpp + +$(OBJS)\baselib_debughlp.obj: ..\..\src\msw\debughlp.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\debughlp.cpp + +$(OBJS)\baselib_dde.obj: ..\..\src\msw\dde.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\dde.cpp + +$(OBJS)\baselib_dir.obj: ..\..\src\msw\dir.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\dir.cpp + +$(OBJS)\baselib_dlmsw.obj: ..\..\src\msw\dlmsw.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\dlmsw.cpp + +$(OBJS)\baselib_evtloopconsole.obj: ..\..\src\msw\evtloopconsole.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\evtloopconsole.cpp + +$(OBJS)\baselib_mimetype.obj: ..\..\src\msw\mimetype.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\mimetype.cpp + +$(OBJS)\baselib_power.obj: ..\..\src\msw\power.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\power.cpp + +$(OBJS)\baselib_regconf.obj: ..\..\src\msw\regconf.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\regconf.cpp + +$(OBJS)\baselib_registry.obj: ..\..\src\msw\registry.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\registry.cpp + +$(OBJS)\baselib_snglinst.obj: ..\..\src\msw\snglinst.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\snglinst.cpp + +$(OBJS)\baselib_stackwalk.obj: ..\..\src\msw\stackwalk.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\stackwalk.cpp + +$(OBJS)\baselib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\stdpaths.cpp + +$(OBJS)\baselib_thread.obj: ..\..\src\msw\thread.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\thread.cpp + +$(OBJS)\baselib_timer.obj: ..\..\src\msw\timer.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\timer.cpp + +$(OBJS)\baselib_utils.obj: ..\..\src\msw\utils.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\utils.cpp + +$(OBJS)\baselib_utilsexc.obj: ..\..\src\msw\utilsexc.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\utilsexc.cpp + +$(OBJS)\baselib_fswatcher.obj: ..\..\src\msw\fswatcher.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\fswatcher.cpp + +$(OBJS)\baselib_event.obj: ..\..\src\common\event.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\baselib_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\baselib_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\baselib_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\baselib_main.obj: ..\..\src\msw\main.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\baselib_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\baselib_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) -q -c -P -o$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\netdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\netdll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dwxUSE_GUI=0 -dWXUSINGDLL -dWXMAKINGDLL_NET ..\..\src\msw\version.rc + +$(OBJS)\netdll_fs_inet.obj: ..\..\src\common\fs_inet.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\fs_inet.cpp + +$(OBJS)\netdll_ftp.obj: ..\..\src\common\ftp.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\ftp.cpp + +$(OBJS)\netdll_http.obj: ..\..\src\common\http.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\http.cpp + +$(OBJS)\netdll_protocol.obj: ..\..\src\common\protocol.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\protocol.cpp + +$(OBJS)\netdll_sckaddr.obj: ..\..\src\common\sckaddr.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\sckaddr.cpp + +$(OBJS)\netdll_sckfile.obj: ..\..\src\common\sckfile.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\sckfile.cpp + +$(OBJS)\netdll_sckipc.obj: ..\..\src\common\sckipc.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\sckipc.cpp + +$(OBJS)\netdll_sckstrm.obj: ..\..\src\common\sckstrm.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\sckstrm.cpp + +$(OBJS)\netdll_socket.obj: ..\..\src\common\socket.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\socket.cpp + +$(OBJS)\netdll_url.obj: ..\..\src\common\url.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\common\url.cpp + +$(OBJS)\netdll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp + +$(OBJS)\netdll_urlmsw.obj: ..\..\src\msw\urlmsw.cpp + $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) ..\..\src\msw\urlmsw.cpp + +$(OBJS)\netlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\netlib_fs_inet.obj: ..\..\src\common\fs_inet.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\fs_inet.cpp + +$(OBJS)\netlib_ftp.obj: ..\..\src\common\ftp.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\ftp.cpp + +$(OBJS)\netlib_http.obj: ..\..\src\common\http.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\http.cpp + +$(OBJS)\netlib_protocol.obj: ..\..\src\common\protocol.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\protocol.cpp + +$(OBJS)\netlib_sckaddr.obj: ..\..\src\common\sckaddr.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\sckaddr.cpp + +$(OBJS)\netlib_sckfile.obj: ..\..\src\common\sckfile.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\sckfile.cpp + +$(OBJS)\netlib_sckipc.obj: ..\..\src\common\sckipc.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\sckipc.cpp + +$(OBJS)\netlib_sckstrm.obj: ..\..\src\common\sckstrm.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\sckstrm.cpp + +$(OBJS)\netlib_socket.obj: ..\..\src\common\socket.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\socket.cpp + +$(OBJS)\netlib_url.obj: ..\..\src\common\url.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\common\url.cpp + +$(OBJS)\netlib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp + +$(OBJS)\netlib_urlmsw.obj: ..\..\src\msw\urlmsw.cpp + $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) ..\..\src\msw\urlmsw.cpp + +$(OBJS)\coredll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\coredll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_CORE -dwxUSE_BASE=0 ..\..\src\msw\version.rc + +$(OBJS)\coredll_event.obj: ..\..\src\common\event.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\coredll_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\coredll_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\coredll_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\coredll_main.obj: ..\..\src\msw\main.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\coredll_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\coredll_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\coredll_generic_statusbr.obj: ..\..\src\generic\statusbr.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\statusbr.cpp + +$(OBJS)\coredll_msw_accel.obj: ..\..\src\msw\accel.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\accel.cpp + +$(OBJS)\coredll_anybutton.obj: ..\..\src\msw\anybutton.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\anybutton.cpp + +$(OBJS)\coredll_artmsw.obj: ..\..\src\msw\artmsw.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\artmsw.cpp + +$(OBJS)\coredll_msw_bmpbuttn.obj: ..\..\src\msw\bmpbuttn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\bmpbuttn.cpp + +$(OBJS)\coredll_msw_button.obj: ..\..\src\msw\button.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\button.cpp + +$(OBJS)\coredll_msw_checkbox.obj: ..\..\src\msw\checkbox.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\checkbox.cpp + +$(OBJS)\coredll_msw_choice.obj: ..\..\src\msw\choice.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\choice.cpp + +$(OBJS)\coredll_colordlg.obj: ..\..\src\msw\colordlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\colordlg.cpp + +$(OBJS)\coredll_combo.obj: ..\..\src\msw\combo.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\combo.cpp + +$(OBJS)\coredll_msw_combobox.obj: ..\..\src\msw\combobox.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\combobox.cpp + +$(OBJS)\coredll_msw_control.obj: ..\..\src\msw\control.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\control.cpp + +$(OBJS)\coredll_msw_dialog.obj: ..\..\src\msw\dialog.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dialog.cpp + +$(OBJS)\coredll_dirdlg.obj: ..\..\src\msw\dirdlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dirdlg.cpp + +$(OBJS)\coredll_dragimag.obj: ..\..\src\msw\dragimag.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dragimag.cpp + +$(OBJS)\coredll_filedlg.obj: ..\..\src\msw\filedlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\filedlg.cpp + +$(OBJS)\coredll_frame.obj: ..\..\src\msw\frame.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\frame.cpp + +$(OBJS)\coredll_msw_gauge.obj: ..\..\src\msw\gauge.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\gauge.cpp + +$(OBJS)\coredll_headerctrl.obj: ..\..\src\msw\headerctrl.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\headerctrl.cpp + +$(OBJS)\coredll_iniconf.obj: ..\..\src\msw\iniconf.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\iniconf.cpp + +$(OBJS)\coredll_msw_listbox.obj: ..\..\src\msw\listbox.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\listbox.cpp + +$(OBJS)\coredll_msw_listctrl.obj: ..\..\src\msw\listctrl.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\listctrl.cpp + +$(OBJS)\coredll_mdi.obj: ..\..\src\msw\mdi.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\mdi.cpp + +$(OBJS)\coredll_msw_menu.obj: ..\..\src\msw\menu.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\menu.cpp + +$(OBJS)\coredll_menuitem.obj: ..\..\src\msw\menuitem.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\menuitem.cpp + +$(OBJS)\coredll_metafile.obj: ..\..\src\msw\metafile.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\metafile.cpp + +$(OBJS)\coredll_msgdlg.obj: ..\..\src\msw\msgdlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\msgdlg.cpp + +$(OBJS)\coredll_nativdlg.obj: ..\..\src\msw\nativdlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\nativdlg.cpp + +$(OBJS)\coredll_nativewin.obj: ..\..\src\msw\nativewin.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\nativewin.cpp + +$(OBJS)\coredll_msw_notebook.obj: ..\..\src\msw\notebook.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\notebook.cpp + +$(OBJS)\coredll_access.obj: ..\..\src\msw\ole\access.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\access.cpp + +$(OBJS)\coredll_ownerdrw.obj: ..\..\src\msw\ownerdrw.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ownerdrw.cpp + +$(OBJS)\coredll_panel.obj: ..\..\src\msw\panel.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\panel.cpp + +$(OBJS)\coredll_progdlg.obj: ..\..\src\msw\progdlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\progdlg.cpp + +$(OBJS)\coredll_msw_radiobox.obj: ..\..\src\msw\radiobox.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\radiobox.cpp + +$(OBJS)\coredll_msw_radiobut.obj: ..\..\src\msw\radiobut.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\radiobut.cpp + +$(OBJS)\coredll_richmsgdlg.obj: ..\..\src\msw\richmsgdlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\richmsgdlg.cpp + +$(OBJS)\coredll_msw_scrolbar.obj: ..\..\src\msw\scrolbar.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\scrolbar.cpp + +$(OBJS)\coredll_msw_slider.obj: ..\..\src\msw\slider.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\slider.cpp + +$(OBJS)\coredll_msw_spinbutt.obj: ..\..\src\msw\spinbutt.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\spinbutt.cpp + +$(OBJS)\coredll_spinctrl.obj: ..\..\src\msw\spinctrl.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\spinctrl.cpp + +$(OBJS)\coredll_msw_statbmp.obj: ..\..\src\msw\statbmp.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\statbmp.cpp + +$(OBJS)\coredll_msw_statbox.obj: ..\..\src\msw\statbox.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\statbox.cpp + +$(OBJS)\coredll_statusbar.obj: ..\..\src\msw\statusbar.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\statusbar.cpp + +$(OBJS)\coredll_msw_statline.obj: ..\..\src\msw\statline.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\statline.cpp + +$(OBJS)\coredll_msw_stattext.obj: ..\..\src\msw\stattext.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\stattext.cpp + +$(OBJS)\coredll_msw_toolbar.obj: ..\..\src\msw\toolbar.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\toolbar.cpp + +$(OBJS)\coredll_msw_textctrl.obj: ..\..\src\msw\textctrl.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\textctrl.cpp + +$(OBJS)\coredll_textentry.obj: ..\..\src\msw\textentry.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\textentry.cpp + +$(OBJS)\coredll_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\tglbtn.cpp + +$(OBJS)\coredll_treectrl.obj: ..\..\src\msw\treectrl.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\treectrl.cpp + +$(OBJS)\coredll_msw_checklst.obj: ..\..\src\msw\checklst.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\checklst.cpp + +$(OBJS)\coredll_msw_fdrepdlg.obj: ..\..\src\msw\fdrepdlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\fdrepdlg.cpp + +$(OBJS)\coredll_fontdlg.obj: ..\..\src\msw\fontdlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\fontdlg.cpp + +$(OBJS)\coredll_generic_accel.obj: ..\..\src\generic\accel.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\accel.cpp + +$(OBJS)\coredll_colrdlgg.obj: ..\..\src\generic\colrdlgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\colrdlgg.cpp + +$(OBJS)\coredll_dirdlgg.obj: ..\..\src\generic\dirdlgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\dirdlgg.cpp + +$(OBJS)\coredll_generic_fdrepdlg.obj: ..\..\src\generic\fdrepdlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\fdrepdlg.cpp + +$(OBJS)\coredll_filedlgg.obj: ..\..\src\generic\filedlgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\filedlgg.cpp + +$(OBJS)\coredll_fontdlgg.obj: ..\..\src\generic\fontdlgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\fontdlgg.cpp + +$(OBJS)\coredll_generic_listctrl.obj: ..\..\src\generic\listctrl.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\listctrl.cpp + +$(OBJS)\coredll_mdig.obj: ..\..\src\generic\mdig.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\mdig.cpp + +$(OBJS)\coredll_univ_bmpbuttn.obj: ..\..\src\univ\bmpbuttn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\bmpbuttn.cpp + +$(OBJS)\coredll_univ_button.obj: ..\..\src\univ\button.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\button.cpp + +$(OBJS)\coredll_univ_checkbox.obj: ..\..\src\univ\checkbox.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\checkbox.cpp + +$(OBJS)\coredll_univ_checklst.obj: ..\..\src\univ\checklst.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\checklst.cpp + +$(OBJS)\coredll_univ_choice.obj: ..\..\src\univ\choice.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\choice.cpp + +$(OBJS)\coredll_univ_combobox.obj: ..\..\src\univ\combobox.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\combobox.cpp + +$(OBJS)\coredll_univ_control.obj: ..\..\src\univ\control.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\control.cpp + +$(OBJS)\coredll_ctrlrend.obj: ..\..\src\univ\ctrlrend.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\ctrlrend.cpp + +$(OBJS)\coredll_univ_dialog.obj: ..\..\src\univ\dialog.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\dialog.cpp + +$(OBJS)\coredll_framuniv.obj: ..\..\src\univ\framuniv.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\framuniv.cpp + +$(OBJS)\coredll_univ_gauge.obj: ..\..\src\univ\gauge.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\gauge.cpp + +$(OBJS)\coredll_inpcons.obj: ..\..\src\univ\inpcons.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\inpcons.cpp + +$(OBJS)\coredll_inphand.obj: ..\..\src\univ\inphand.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\inphand.cpp + +$(OBJS)\coredll_univ_listbox.obj: ..\..\src\univ\listbox.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\listbox.cpp + +$(OBJS)\coredll_univ_menu.obj: ..\..\src\univ\menu.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\menu.cpp + +$(OBJS)\coredll_univ_notebook.obj: ..\..\src\univ\notebook.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\notebook.cpp + +$(OBJS)\coredll_univ_radiobox.obj: ..\..\src\univ\radiobox.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\radiobox.cpp + +$(OBJS)\coredll_univ_radiobut.obj: ..\..\src\univ\radiobut.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\radiobut.cpp + +$(OBJS)\coredll_scrarrow.obj: ..\..\src\univ\scrarrow.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\scrarrow.cpp + +$(OBJS)\coredll_univ_scrolbar.obj: ..\..\src\univ\scrolbar.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\scrolbar.cpp + +$(OBJS)\coredll_scrthumb.obj: ..\..\src\univ\scrthumb.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\scrthumb.cpp + +$(OBJS)\coredll_settingsuniv.obj: ..\..\src\univ\settingsuniv.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\settingsuniv.cpp + +$(OBJS)\coredll_univ_slider.obj: ..\..\src\univ\slider.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\slider.cpp + +$(OBJS)\coredll_univ_spinbutt.obj: ..\..\src\univ\spinbutt.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\spinbutt.cpp + +$(OBJS)\coredll_univ_statbmp.obj: ..\..\src\univ\statbmp.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\statbmp.cpp + +$(OBJS)\coredll_univ_statbox.obj: ..\..\src\univ\statbox.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\statbox.cpp + +$(OBJS)\coredll_univ_statline.obj: ..\..\src\univ\statline.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\statline.cpp + +$(OBJS)\coredll_univ_stattext.obj: ..\..\src\univ\stattext.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\stattext.cpp + +$(OBJS)\coredll_univ_statusbr.obj: ..\..\src\univ\statusbr.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\statusbr.cpp + +$(OBJS)\coredll_stdrend.obj: ..\..\src\univ\stdrend.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\stdrend.cpp + +$(OBJS)\coredll_univ_textctrl.obj: ..\..\src\univ\textctrl.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\textctrl.cpp + +$(OBJS)\coredll_univ_tglbtn.obj: ..\..\src\univ\tglbtn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\tglbtn.cpp + +$(OBJS)\coredll_theme.obj: ..\..\src\univ\theme.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\theme.cpp + +$(OBJS)\coredll_univ_toolbar.obj: ..\..\src\univ\toolbar.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\toolbar.cpp + +$(OBJS)\coredll_topluniv.obj: ..\..\src\univ\topluniv.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\topluniv.cpp + +$(OBJS)\coredll_winuniv.obj: ..\..\src\univ\winuniv.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\winuniv.cpp + +$(OBJS)\coredll_gtk.obj: ..\..\src\univ\themes\gtk.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\themes\gtk.cpp + +$(OBJS)\coredll_metal.obj: ..\..\src\univ\themes\metal.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\themes\metal.cpp + +$(OBJS)\coredll_mono.obj: ..\..\src\univ\themes\mono.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\themes\mono.cpp + +$(OBJS)\coredll_win32.obj: ..\..\src\univ\themes\win32.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\themes\win32.cpp + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_activex.obj: ..\..\src\msw\ole\activex.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\activex.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_app.obj: ..\..\src\msw\app.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\app.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_bitmap.obj: ..\..\src\msw\bitmap.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\bitmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_brush.obj: ..\..\src\msw\brush.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\brush.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_caret.obj: ..\..\src\msw\caret.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\caret.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_clipbrd.obj: ..\..\src\msw\clipbrd.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\clipbrd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_colour.obj: ..\..\src\msw\colour.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\colour.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_cursor.obj: ..\..\src\msw\cursor.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\cursor.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_data.obj: ..\..\src\msw\data.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\data.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dc.obj: ..\..\src\msw\dc.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcclient.obj: ..\..\src\msw\dcclient.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dcclient.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcmemory.obj: ..\..\src\msw\dcmemory.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dcmemory.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcprint.obj: ..\..\src\msw\dcprint.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dcprint.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcscreen.obj: ..\..\src\msw\dcscreen.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dcscreen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dialup.obj: ..\..\src\msw\dialup.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dialup.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dib.obj: ..\..\src\msw\dib.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dib.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_display.obj: ..\..\src\msw\display.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\display.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_enhmeta.obj: ..\..\src\msw\enhmeta.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\enhmeta.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_font.obj: ..\..\src\msw\font.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\font.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontenum.obj: ..\..\src\msw\fontenum.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\fontenum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontutil.obj: ..\..\src\msw\fontutil.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\fontutil.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gdiimage.obj: ..\..\src\msw\gdiimage.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\gdiimage.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gdiobj.obj: ..\..\src\msw\gdiobj.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\gdiobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gdiplus.obj: ..\..\src\msw\gdiplus.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\gdiplus.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_graphics.obj: ..\..\src\msw\graphics.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\graphics.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_icon.obj: ..\..\src\msw\icon.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\icon.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imaglist.obj: ..\..\src\msw\imaglist.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\imaglist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_minifram.obj: ..\..\src\msw\minifram.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\minifram.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_nonownedwnd.obj: ..\..\src\msw\nonownedwnd.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\nonownedwnd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dataobj.obj: ..\..\src\msw\ole\dataobj.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\dataobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dropsrc.obj: ..\..\src\msw\ole\dropsrc.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\dropsrc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_droptgt.obj: ..\..\src\msw\ole\droptgt.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\droptgt.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_oleutils.obj: ..\..\src\msw\ole\oleutils.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\oleutils.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_safearray.obj: ..\..\src\msw\ole\safearray.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\safearray.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_palette.obj: ..\..\src\msw\palette.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\palette.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_pen.obj: ..\..\src\msw\pen.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\pen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_popupwin.obj: ..\..\src\msw\popupwin.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\popupwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_printdlg.obj: ..\..\src\msw\printdlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\printdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_printwin.obj: ..\..\src\msw\printwin.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\printwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_region.obj: ..\..\src\msw\region.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\region.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_renderer.obj: ..\..\src\msw\renderer.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\renderer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_settings.obj: ..\..\src\msw\settings.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\settings.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_textmeasure.obj: ..\..\src\msw\textmeasure.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\textmeasure.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_tooltip.obj: ..\..\src\msw\tooltip.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\tooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_toplevel.obj: ..\..\src\msw\toplevel.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\toplevel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_uiaction.obj: ..\..\src\msw\uiaction.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\uiaction.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_utilsgui.obj: ..\..\src\msw\utilsgui.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\utilsgui.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_utilswin.obj: ..\..\src\msw\utilswin.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\utilswin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_uxtheme.obj: ..\..\src\msw\uxtheme.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\uxtheme.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_window.obj: ..\..\src\msw\window.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\window.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_helpchm.obj: ..\..\src\msw\helpchm.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\helpchm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_helpwin.obj: ..\..\src\msw\helpwin.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\helpwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_automtn.obj: ..\..\src\msw\ole\automtn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\automtn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_uuid.obj: ..\..\src\msw\ole\uuid.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\uuid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_clrpickerg.obj: ..\..\src\generic\clrpickerg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\clrpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_collpaneg.obj: ..\..\src\generic\collpaneg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\collpaneg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_filepickerg.obj: ..\..\src\generic\filepickerg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\filepickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontpickerg.obj: ..\..\src\generic\fontpickerg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\fontpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_prntdlgg.obj: ..\..\src\generic\prntdlgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\prntdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_evtloop.obj: ..\..\src\msw\evtloop.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\evtloop.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_accelcmn.obj: ..\..\src\common\accelcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\accelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_accesscmn.obj: ..\..\src\common\accesscmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\accesscmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_anidecod.obj: ..\..\src\common\anidecod.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\anidecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_affinematrix2d.obj: ..\..\src\common\affinematrix2d.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\affinematrix2d.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_appcmn.obj: ..\..\src\common\appcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\appcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_artprov.obj: ..\..\src\common\artprov.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\artprov.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_artstd.obj: ..\..\src\common\artstd.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\artstd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_bmpbase.obj: ..\..\src\common\bmpbase.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\bmpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_bmpbtncmn.obj: ..\..\src\common\bmpbtncmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\bmpbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_bookctrl.obj: ..\..\src\common\bookctrl.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\bookctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_btncmn.obj: ..\..\src\common\btncmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\btncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_cairo.obj: ..\..\src\common\cairo.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\cairo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_checkboxcmn.obj: ..\..\src\common\checkboxcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\checkboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_checklstcmn.obj: ..\..\src\common\checklstcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\checklstcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_choiccmn.obj: ..\..\src\common\choiccmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\choiccmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_clipcmn.obj: ..\..\src\common\clipcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\clipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_clrpickercmn.obj: ..\..\src\common\clrpickercmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\clrpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_colourcmn.obj: ..\..\src\common\colourcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\colourcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_colourdata.obj: ..\..\src\common\colourdata.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\colourdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_combocmn.obj: ..\..\src\common\combocmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\combocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_cmdproc.obj: ..\..\src\common\cmdproc.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\cmdproc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_cmndata.obj: ..\..\src\common\cmndata.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\cmndata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_containr.obj: ..\..\src\common\containr.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\containr.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_cshelp.obj: ..\..\src\common\cshelp.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\cshelp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_ctrlcmn.obj: ..\..\src\common\ctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\ctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_ctrlsub.obj: ..\..\src\common\ctrlsub.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\ctrlsub.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcbase.obj: ..\..\src\common\dcbase.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dcbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcbufcmn.obj: ..\..\src\common\dcbufcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dcbufcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcgraph.obj: ..\..\src\common\dcgraph.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dcgraph.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcsvg.obj: ..\..\src\common\dcsvg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dcsvg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dirctrlcmn.obj: ..\..\src\common\dirctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dirctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dlgcmn.obj: ..\..\src\common\dlgcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dndcmn.obj: ..\..\src\common\dndcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dndcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dobjcmn.obj: ..\..\src\common\dobjcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dobjcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_docmdi.obj: ..\..\src\common\docmdi.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\docmdi.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_docview.obj: ..\..\src\common\docview.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\docview.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dpycmn.obj: ..\..\src\common\dpycmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dpycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dseldlg.obj: ..\..\src\common\dseldlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dseldlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_effects.obj: ..\..\src\common\effects.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\effects.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fddlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filepickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontpickercmn.obj: ..\..\src\common\fontpickercmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fldlgcmn.obj: ..\..\src\common\fldlgcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fldlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontcmn.obj: ..\..\src\common\fontcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontdata.obj: ..\..\src\common\fontdata.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_graphicc.obj: ..\..\src\generic\graphicc.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\graphicc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontenumcmn.obj: ..\..\src\common\fontenumcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontenumcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontmap.obj: ..\..\src\common\fontmap.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontutilcmn.obj: ..\..\src\common\fontutilcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontutilcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_framecmn.obj: ..\..\src\common\framecmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\framecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gaugecmn.obj: ..\..\src\common\gaugecmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\gaugecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gbsizer.obj: ..\..\src\common\gbsizer.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\gbsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gdicmn.obj: ..\..\src\common\gdicmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\gdicmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_geometry.obj: ..\..\src\common\geometry.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\geometry.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gifdecod.obj: ..\..\src\common\gifdecod.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\gifdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_graphcmn.obj: ..\..\src\common\graphcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\graphcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_headercolcmn.obj: ..\..\src\common\headercolcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\headercolcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_headerctrlcmn.obj: ..\..\src\common\headerctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\headerctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_helpbase.obj: ..\..\src\common\helpbase.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\helpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_iconbndl.obj: ..\..\src\common\iconbndl.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\iconbndl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagall.obj: ..\..\src\common\imagall.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagall.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagbmp.obj: ..\..\src\common\imagbmp.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagbmp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_image.obj: ..\..\src\common\image.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\image.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagfill.obj: ..\..\src\common\imagfill.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagfill.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imaggif.obj: ..\..\src\common\imaggif.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imaggif.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagiff.obj: ..\..\src\common\imagiff.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagjpeg.obj: ..\..\src\common\imagjpeg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagjpeg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagpcx.obj: ..\..\src\common\imagpcx.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagpcx.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagpng.obj: ..\..\src\common\imagpng.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagpng.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagpnm.obj: ..\..\src\common\imagpnm.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagpnm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagtga.obj: ..\..\src\common\imagtga.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagtga.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagtiff.obj: ..\..\src\common\imagtiff.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagtiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagxpm.obj: ..\..\src\common\imagxpm.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagxpm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_layout.obj: ..\..\src\common\layout.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\layout.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_lboxcmn.obj: ..\..\src\common\lboxcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\lboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_listctrlcmn.obj: ..\..\src\common\listctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\listctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_markupparser.obj: ..\..\src\common\markupparser.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\markupparser.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_matrix.obj: ..\..\src\common\matrix.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\matrix.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_menucmn.obj: ..\..\src\common\menucmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\menucmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_modalhook.obj: ..\..\src\common\modalhook.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\modalhook.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_mousemanager.obj: ..\..\src\common\mousemanager.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\mousemanager.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_nbkbase.obj: ..\..\src\common\nbkbase.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\nbkbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\overlaycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_ownerdrwcmn.obj: ..\..\src\common\ownerdrwcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\ownerdrwcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_paper.obj: ..\..\src\common\paper.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\paper.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_panelcmn.obj: ..\..\src\common\panelcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\panelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_persist.obj: ..\..\src\common\persist.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\persist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_pickerbase.obj: ..\..\src\common\pickerbase.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\pickerbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_popupcmn.obj: ..\..\src\common\popupcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\popupcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_preferencescmn.obj: ..\..\src\common\preferencescmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\preferencescmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_prntbase.obj: ..\..\src\common\prntbase.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\prntbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_quantize.obj: ..\..\src\common\quantize.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\quantize.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_radiobtncmn.obj: ..\..\src\common\radiobtncmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\radiobtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_radiocmn.obj: ..\..\src\common\radiocmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\radiocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_rearrangectrl.obj: ..\..\src\common\rearrangectrl.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\rearrangectrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_rendcmn.obj: ..\..\src\common\rendcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\rendcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_rgncmn.obj: ..\..\src\common\rgncmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\rgncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_scrolbarcmn.obj: ..\..\src\common\scrolbarcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\scrolbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_settcmn.obj: ..\..\src\common\settcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\settcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_sizer.obj: ..\..\src\common\sizer.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\sizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_slidercmn.obj: ..\..\src\common\slidercmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\slidercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_spinbtncmn.obj: ..\..\src\common\spinbtncmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\spinbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_spinctrlcmn.obj: ..\..\src\common\spinctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\spinctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_srchcmn.obj: ..\..\src\common\srchcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\srchcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_statbar.obj: ..\..\src\common\statbar.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\statbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_statbmpcmn.obj: ..\..\src\common\statbmpcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\statbmpcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_statboxcmn.obj: ..\..\src\common\statboxcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\statboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_statlinecmn.obj: ..\..\src\common\statlinecmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\statlinecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_stattextcmn.obj: ..\..\src\common\stattextcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\stattextcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_stockitem.obj: ..\..\src\common\stockitem.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\stockitem.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_tbarbase.obj: ..\..\src\common\tbarbase.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\tbarbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_textcmn.obj: ..\..\src\common\textcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\textcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_textentrycmn.obj: ..\..\src\common\textentrycmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\textentrycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_textmeasurecmn.obj: ..\..\src\common\textmeasurecmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\textmeasurecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_toplvcmn.obj: ..\..\src\common\toplvcmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\toplvcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_treebase.obj: ..\..\src\common\treebase.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\treebase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_uiactioncmn.obj: ..\..\src\common\uiactioncmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\uiactioncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_valgen.obj: ..\..\src\common\valgen.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\valgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_validate.obj: ..\..\src\common\validate.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\validate.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_valtext.obj: ..\..\src\common\valtext.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\valtext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_valnum.obj: ..\..\src\common\valnum.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\valnum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_wincmn.obj: ..\..\src\common\wincmn.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\wincmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_windowid.obj: ..\..\src\common\windowid.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\windowid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_wrapsizer.obj: ..\..\src\common\wrapsizer.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\wrapsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_xpmdecod.obj: ..\..\src\common\xpmdecod.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\xpmdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_busyinfo.obj: ..\..\src\generic\busyinfo.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\busyinfo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_buttonbar.obj: ..\..\src\generic\buttonbar.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\buttonbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_choicdgg.obj: ..\..\src\generic\choicdgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\choicdgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_choicbkg.obj: ..\..\src\generic\choicbkg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\choicbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_combog.obj: ..\..\src\generic\combog.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\combog.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcpsg.obj: ..\..\src\generic\dcpsg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\dcpsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dirctrlg.obj: ..\..\src\generic\dirctrlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\dirctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dragimgg.obj: ..\..\src\generic\dragimgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\dragimgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_filectrlg.obj: ..\..\src\generic\filectrlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\filectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_infobar.obj: ..\..\src\generic\infobar.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\infobar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_listbkg.obj: ..\..\src\generic\listbkg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\listbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_logg.obj: ..\..\src\generic\logg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\logg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_markuptext.obj: ..\..\src\generic\markuptext.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\markuptext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_msgdlgg.obj: ..\..\src\generic\msgdlgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\msgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_numdlgg.obj: ..\..\src\generic\numdlgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\numdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_progdlgg.obj: ..\..\src\generic\progdlgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\progdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_preferencesg.obj: ..\..\src\generic\preferencesg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\preferencesg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_printps.obj: ..\..\src\generic\printps.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\printps.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_renderg.obj: ..\..\src\generic\renderg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\renderg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_richmsgdlgg.obj: ..\..\src\generic\richmsgdlgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\richmsgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_scrlwing.obj: ..\..\src\generic\scrlwing.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\scrlwing.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_selstore.obj: ..\..\src\generic\selstore.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\selstore.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_spinctlg.obj: ..\..\src\generic\spinctlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\spinctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_splitter.obj: ..\..\src\generic\splitter.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\splitter.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_srchctlg.obj: ..\..\src\generic\srchctlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\srchctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_statbmpg.obj: ..\..\src\generic\statbmpg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\statbmpg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_stattextg.obj: ..\..\src\generic\stattextg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\stattextg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_textdlgg.obj: ..\..\src\generic\textdlgg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\textdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_tipwin.obj: ..\..\src\generic\tipwin.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\tipwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_toolbkg.obj: ..\..\src\generic\toolbkg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\toolbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_treectlg.obj: ..\..\src\generic\treectlg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\treectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_treebkg.obj: ..\..\src\generic\treebkg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\treebkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_vlbox.obj: ..\..\src\generic\vlbox.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\vlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_vscroll.obj: ..\..\src\generic\vscroll.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\vscroll.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_xmlreshandler.obj: ..\..\src\xrc\xmlreshandler.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\xrc\xmlreshandler.cpp +!endif + +$(OBJS)\corelib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\corelib_event.obj: ..\..\src\common\event.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\corelib_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\corelib_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\corelib_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\corelib_main.obj: ..\..\src\msw\main.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\corelib_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\corelib_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\corelib_generic_statusbr.obj: ..\..\src\generic\statusbr.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\statusbr.cpp + +$(OBJS)\corelib_msw_accel.obj: ..\..\src\msw\accel.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\accel.cpp + +$(OBJS)\corelib_anybutton.obj: ..\..\src\msw\anybutton.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\anybutton.cpp + +$(OBJS)\corelib_artmsw.obj: ..\..\src\msw\artmsw.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\artmsw.cpp + +$(OBJS)\corelib_msw_bmpbuttn.obj: ..\..\src\msw\bmpbuttn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\bmpbuttn.cpp + +$(OBJS)\corelib_msw_button.obj: ..\..\src\msw\button.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\button.cpp + +$(OBJS)\corelib_msw_checkbox.obj: ..\..\src\msw\checkbox.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\checkbox.cpp + +$(OBJS)\corelib_msw_choice.obj: ..\..\src\msw\choice.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\choice.cpp + +$(OBJS)\corelib_colordlg.obj: ..\..\src\msw\colordlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\colordlg.cpp + +$(OBJS)\corelib_combo.obj: ..\..\src\msw\combo.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\combo.cpp + +$(OBJS)\corelib_msw_combobox.obj: ..\..\src\msw\combobox.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\combobox.cpp + +$(OBJS)\corelib_msw_control.obj: ..\..\src\msw\control.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\control.cpp + +$(OBJS)\corelib_msw_dialog.obj: ..\..\src\msw\dialog.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dialog.cpp + +$(OBJS)\corelib_dirdlg.obj: ..\..\src\msw\dirdlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dirdlg.cpp + +$(OBJS)\corelib_dragimag.obj: ..\..\src\msw\dragimag.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dragimag.cpp + +$(OBJS)\corelib_filedlg.obj: ..\..\src\msw\filedlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\filedlg.cpp + +$(OBJS)\corelib_frame.obj: ..\..\src\msw\frame.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\frame.cpp + +$(OBJS)\corelib_msw_gauge.obj: ..\..\src\msw\gauge.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\gauge.cpp + +$(OBJS)\corelib_headerctrl.obj: ..\..\src\msw\headerctrl.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\headerctrl.cpp + +$(OBJS)\corelib_iniconf.obj: ..\..\src\msw\iniconf.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\iniconf.cpp + +$(OBJS)\corelib_msw_listbox.obj: ..\..\src\msw\listbox.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\listbox.cpp + +$(OBJS)\corelib_msw_listctrl.obj: ..\..\src\msw\listctrl.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\listctrl.cpp + +$(OBJS)\corelib_mdi.obj: ..\..\src\msw\mdi.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\mdi.cpp + +$(OBJS)\corelib_msw_menu.obj: ..\..\src\msw\menu.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\menu.cpp + +$(OBJS)\corelib_menuitem.obj: ..\..\src\msw\menuitem.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\menuitem.cpp + +$(OBJS)\corelib_metafile.obj: ..\..\src\msw\metafile.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\metafile.cpp + +$(OBJS)\corelib_msgdlg.obj: ..\..\src\msw\msgdlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\msgdlg.cpp + +$(OBJS)\corelib_nativdlg.obj: ..\..\src\msw\nativdlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\nativdlg.cpp + +$(OBJS)\corelib_nativewin.obj: ..\..\src\msw\nativewin.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\nativewin.cpp + +$(OBJS)\corelib_msw_notebook.obj: ..\..\src\msw\notebook.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\notebook.cpp + +$(OBJS)\corelib_access.obj: ..\..\src\msw\ole\access.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\access.cpp + +$(OBJS)\corelib_ownerdrw.obj: ..\..\src\msw\ownerdrw.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ownerdrw.cpp + +$(OBJS)\corelib_panel.obj: ..\..\src\msw\panel.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\panel.cpp + +$(OBJS)\corelib_progdlg.obj: ..\..\src\msw\progdlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\progdlg.cpp + +$(OBJS)\corelib_msw_radiobox.obj: ..\..\src\msw\radiobox.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\radiobox.cpp + +$(OBJS)\corelib_msw_radiobut.obj: ..\..\src\msw\radiobut.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\radiobut.cpp + +$(OBJS)\corelib_richmsgdlg.obj: ..\..\src\msw\richmsgdlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\richmsgdlg.cpp + +$(OBJS)\corelib_msw_scrolbar.obj: ..\..\src\msw\scrolbar.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\scrolbar.cpp + +$(OBJS)\corelib_msw_slider.obj: ..\..\src\msw\slider.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\slider.cpp + +$(OBJS)\corelib_msw_spinbutt.obj: ..\..\src\msw\spinbutt.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\spinbutt.cpp + +$(OBJS)\corelib_spinctrl.obj: ..\..\src\msw\spinctrl.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\spinctrl.cpp + +$(OBJS)\corelib_msw_statbmp.obj: ..\..\src\msw\statbmp.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\statbmp.cpp + +$(OBJS)\corelib_msw_statbox.obj: ..\..\src\msw\statbox.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\statbox.cpp + +$(OBJS)\corelib_statusbar.obj: ..\..\src\msw\statusbar.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\statusbar.cpp + +$(OBJS)\corelib_msw_statline.obj: ..\..\src\msw\statline.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\statline.cpp + +$(OBJS)\corelib_msw_stattext.obj: ..\..\src\msw\stattext.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\stattext.cpp + +$(OBJS)\corelib_msw_toolbar.obj: ..\..\src\msw\toolbar.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\toolbar.cpp + +$(OBJS)\corelib_msw_textctrl.obj: ..\..\src\msw\textctrl.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\textctrl.cpp + +$(OBJS)\corelib_textentry.obj: ..\..\src\msw\textentry.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\textentry.cpp + +$(OBJS)\corelib_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\tglbtn.cpp + +$(OBJS)\corelib_treectrl.obj: ..\..\src\msw\treectrl.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\treectrl.cpp + +$(OBJS)\corelib_msw_checklst.obj: ..\..\src\msw\checklst.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\checklst.cpp + +$(OBJS)\corelib_msw_fdrepdlg.obj: ..\..\src\msw\fdrepdlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\fdrepdlg.cpp + +$(OBJS)\corelib_fontdlg.obj: ..\..\src\msw\fontdlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\fontdlg.cpp + +$(OBJS)\corelib_generic_accel.obj: ..\..\src\generic\accel.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\accel.cpp + +$(OBJS)\corelib_colrdlgg.obj: ..\..\src\generic\colrdlgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\colrdlgg.cpp + +$(OBJS)\corelib_dirdlgg.obj: ..\..\src\generic\dirdlgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\dirdlgg.cpp + +$(OBJS)\corelib_generic_fdrepdlg.obj: ..\..\src\generic\fdrepdlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\fdrepdlg.cpp + +$(OBJS)\corelib_filedlgg.obj: ..\..\src\generic\filedlgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\filedlgg.cpp + +$(OBJS)\corelib_fontdlgg.obj: ..\..\src\generic\fontdlgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\fontdlgg.cpp + +$(OBJS)\corelib_generic_listctrl.obj: ..\..\src\generic\listctrl.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\listctrl.cpp + +$(OBJS)\corelib_mdig.obj: ..\..\src\generic\mdig.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\mdig.cpp + +$(OBJS)\corelib_univ_bmpbuttn.obj: ..\..\src\univ\bmpbuttn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\bmpbuttn.cpp + +$(OBJS)\corelib_univ_button.obj: ..\..\src\univ\button.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\button.cpp + +$(OBJS)\corelib_univ_checkbox.obj: ..\..\src\univ\checkbox.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\checkbox.cpp + +$(OBJS)\corelib_univ_checklst.obj: ..\..\src\univ\checklst.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\checklst.cpp + +$(OBJS)\corelib_univ_choice.obj: ..\..\src\univ\choice.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\choice.cpp + +$(OBJS)\corelib_univ_combobox.obj: ..\..\src\univ\combobox.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\combobox.cpp + +$(OBJS)\corelib_univ_control.obj: ..\..\src\univ\control.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\control.cpp + +$(OBJS)\corelib_ctrlrend.obj: ..\..\src\univ\ctrlrend.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\ctrlrend.cpp + +$(OBJS)\corelib_univ_dialog.obj: ..\..\src\univ\dialog.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\dialog.cpp + +$(OBJS)\corelib_framuniv.obj: ..\..\src\univ\framuniv.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\framuniv.cpp + +$(OBJS)\corelib_univ_gauge.obj: ..\..\src\univ\gauge.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\gauge.cpp + +$(OBJS)\corelib_inpcons.obj: ..\..\src\univ\inpcons.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\inpcons.cpp + +$(OBJS)\corelib_inphand.obj: ..\..\src\univ\inphand.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\inphand.cpp + +$(OBJS)\corelib_univ_listbox.obj: ..\..\src\univ\listbox.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\listbox.cpp + +$(OBJS)\corelib_univ_menu.obj: ..\..\src\univ\menu.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\menu.cpp + +$(OBJS)\corelib_univ_notebook.obj: ..\..\src\univ\notebook.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\notebook.cpp + +$(OBJS)\corelib_univ_radiobox.obj: ..\..\src\univ\radiobox.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\radiobox.cpp + +$(OBJS)\corelib_univ_radiobut.obj: ..\..\src\univ\radiobut.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\radiobut.cpp + +$(OBJS)\corelib_scrarrow.obj: ..\..\src\univ\scrarrow.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\scrarrow.cpp + +$(OBJS)\corelib_univ_scrolbar.obj: ..\..\src\univ\scrolbar.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\scrolbar.cpp + +$(OBJS)\corelib_scrthumb.obj: ..\..\src\univ\scrthumb.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\scrthumb.cpp + +$(OBJS)\corelib_settingsuniv.obj: ..\..\src\univ\settingsuniv.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\settingsuniv.cpp + +$(OBJS)\corelib_univ_slider.obj: ..\..\src\univ\slider.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\slider.cpp + +$(OBJS)\corelib_univ_spinbutt.obj: ..\..\src\univ\spinbutt.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\spinbutt.cpp + +$(OBJS)\corelib_univ_statbmp.obj: ..\..\src\univ\statbmp.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\statbmp.cpp + +$(OBJS)\corelib_univ_statbox.obj: ..\..\src\univ\statbox.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\statbox.cpp + +$(OBJS)\corelib_univ_statline.obj: ..\..\src\univ\statline.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\statline.cpp + +$(OBJS)\corelib_univ_stattext.obj: ..\..\src\univ\stattext.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\stattext.cpp + +$(OBJS)\corelib_univ_statusbr.obj: ..\..\src\univ\statusbr.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\statusbr.cpp + +$(OBJS)\corelib_stdrend.obj: ..\..\src\univ\stdrend.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\stdrend.cpp + +$(OBJS)\corelib_univ_textctrl.obj: ..\..\src\univ\textctrl.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\textctrl.cpp + +$(OBJS)\corelib_univ_tglbtn.obj: ..\..\src\univ\tglbtn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\tglbtn.cpp + +$(OBJS)\corelib_theme.obj: ..\..\src\univ\theme.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\theme.cpp + +$(OBJS)\corelib_univ_toolbar.obj: ..\..\src\univ\toolbar.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\toolbar.cpp + +$(OBJS)\corelib_topluniv.obj: ..\..\src\univ\topluniv.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\topluniv.cpp + +$(OBJS)\corelib_winuniv.obj: ..\..\src\univ\winuniv.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\winuniv.cpp + +$(OBJS)\corelib_gtk.obj: ..\..\src\univ\themes\gtk.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\themes\gtk.cpp + +$(OBJS)\corelib_metal.obj: ..\..\src\univ\themes\metal.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\themes\metal.cpp + +$(OBJS)\corelib_mono.obj: ..\..\src\univ\themes\mono.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\themes\mono.cpp + +$(OBJS)\corelib_win32.obj: ..\..\src\univ\themes\win32.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\themes\win32.cpp + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_activex.obj: ..\..\src\msw\ole\activex.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\activex.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_app.obj: ..\..\src\msw\app.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\app.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_bitmap.obj: ..\..\src\msw\bitmap.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\bitmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_brush.obj: ..\..\src\msw\brush.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\brush.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_caret.obj: ..\..\src\msw\caret.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\caret.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_clipbrd.obj: ..\..\src\msw\clipbrd.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\clipbrd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_colour.obj: ..\..\src\msw\colour.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\colour.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_cursor.obj: ..\..\src\msw\cursor.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\cursor.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_data.obj: ..\..\src\msw\data.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\data.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dc.obj: ..\..\src\msw\dc.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcclient.obj: ..\..\src\msw\dcclient.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dcclient.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcmemory.obj: ..\..\src\msw\dcmemory.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dcmemory.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcprint.obj: ..\..\src\msw\dcprint.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dcprint.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcscreen.obj: ..\..\src\msw\dcscreen.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dcscreen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dialup.obj: ..\..\src\msw\dialup.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dialup.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dib.obj: ..\..\src\msw\dib.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dib.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_display.obj: ..\..\src\msw\display.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\display.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_enhmeta.obj: ..\..\src\msw\enhmeta.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\enhmeta.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_font.obj: ..\..\src\msw\font.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\font.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontenum.obj: ..\..\src\msw\fontenum.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\fontenum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontutil.obj: ..\..\src\msw\fontutil.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\fontutil.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gdiimage.obj: ..\..\src\msw\gdiimage.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\gdiimage.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gdiobj.obj: ..\..\src\msw\gdiobj.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\gdiobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gdiplus.obj: ..\..\src\msw\gdiplus.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\gdiplus.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_graphics.obj: ..\..\src\msw\graphics.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\graphics.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_icon.obj: ..\..\src\msw\icon.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\icon.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imaglist.obj: ..\..\src\msw\imaglist.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\imaglist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_minifram.obj: ..\..\src\msw\minifram.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\minifram.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_nonownedwnd.obj: ..\..\src\msw\nonownedwnd.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\nonownedwnd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dataobj.obj: ..\..\src\msw\ole\dataobj.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\dataobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dropsrc.obj: ..\..\src\msw\ole\dropsrc.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\dropsrc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_droptgt.obj: ..\..\src\msw\ole\droptgt.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\droptgt.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_oleutils.obj: ..\..\src\msw\ole\oleutils.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\oleutils.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_safearray.obj: ..\..\src\msw\ole\safearray.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\safearray.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_palette.obj: ..\..\src\msw\palette.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\palette.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_pen.obj: ..\..\src\msw\pen.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\pen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_popupwin.obj: ..\..\src\msw\popupwin.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\popupwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_printdlg.obj: ..\..\src\msw\printdlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\printdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_printwin.obj: ..\..\src\msw\printwin.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\printwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_region.obj: ..\..\src\msw\region.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\region.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_renderer.obj: ..\..\src\msw\renderer.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\renderer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_settings.obj: ..\..\src\msw\settings.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\settings.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_textmeasure.obj: ..\..\src\msw\textmeasure.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\textmeasure.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_tooltip.obj: ..\..\src\msw\tooltip.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\tooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_toplevel.obj: ..\..\src\msw\toplevel.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\toplevel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_uiaction.obj: ..\..\src\msw\uiaction.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\uiaction.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_utilsgui.obj: ..\..\src\msw\utilsgui.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\utilsgui.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_utilswin.obj: ..\..\src\msw\utilswin.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\utilswin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_uxtheme.obj: ..\..\src\msw\uxtheme.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\uxtheme.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_window.obj: ..\..\src\msw\window.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\window.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_helpchm.obj: ..\..\src\msw\helpchm.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\helpchm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_helpwin.obj: ..\..\src\msw\helpwin.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\helpwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_automtn.obj: ..\..\src\msw\ole\automtn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\automtn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_uuid.obj: ..\..\src\msw\ole\uuid.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\uuid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_clrpickerg.obj: ..\..\src\generic\clrpickerg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\clrpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_collpaneg.obj: ..\..\src\generic\collpaneg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\collpaneg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_filepickerg.obj: ..\..\src\generic\filepickerg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\filepickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontpickerg.obj: ..\..\src\generic\fontpickerg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\fontpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_prntdlgg.obj: ..\..\src\generic\prntdlgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\prntdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_evtloop.obj: ..\..\src\msw\evtloop.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\evtloop.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_accelcmn.obj: ..\..\src\common\accelcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\accelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_accesscmn.obj: ..\..\src\common\accesscmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\accesscmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_anidecod.obj: ..\..\src\common\anidecod.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\anidecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_affinematrix2d.obj: ..\..\src\common\affinematrix2d.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\affinematrix2d.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_appcmn.obj: ..\..\src\common\appcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\appcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_artprov.obj: ..\..\src\common\artprov.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\artprov.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_artstd.obj: ..\..\src\common\artstd.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\artstd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_bmpbase.obj: ..\..\src\common\bmpbase.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\bmpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_bmpbtncmn.obj: ..\..\src\common\bmpbtncmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\bmpbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_bookctrl.obj: ..\..\src\common\bookctrl.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\bookctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_btncmn.obj: ..\..\src\common\btncmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\btncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_cairo.obj: ..\..\src\common\cairo.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\cairo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_checkboxcmn.obj: ..\..\src\common\checkboxcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\checkboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_checklstcmn.obj: ..\..\src\common\checklstcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\checklstcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_choiccmn.obj: ..\..\src\common\choiccmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\choiccmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_clipcmn.obj: ..\..\src\common\clipcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\clipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_clrpickercmn.obj: ..\..\src\common\clrpickercmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\clrpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_colourcmn.obj: ..\..\src\common\colourcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\colourcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_colourdata.obj: ..\..\src\common\colourdata.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\colourdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_combocmn.obj: ..\..\src\common\combocmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\combocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_cmdproc.obj: ..\..\src\common\cmdproc.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\cmdproc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_cmndata.obj: ..\..\src\common\cmndata.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\cmndata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_containr.obj: ..\..\src\common\containr.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\containr.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_cshelp.obj: ..\..\src\common\cshelp.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\cshelp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_ctrlcmn.obj: ..\..\src\common\ctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\ctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_ctrlsub.obj: ..\..\src\common\ctrlsub.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\ctrlsub.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcbase.obj: ..\..\src\common\dcbase.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dcbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcbufcmn.obj: ..\..\src\common\dcbufcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dcbufcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcgraph.obj: ..\..\src\common\dcgraph.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dcgraph.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcsvg.obj: ..\..\src\common\dcsvg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dcsvg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dirctrlcmn.obj: ..\..\src\common\dirctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dirctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dlgcmn.obj: ..\..\src\common\dlgcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dndcmn.obj: ..\..\src\common\dndcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dndcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dobjcmn.obj: ..\..\src\common\dobjcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dobjcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_docmdi.obj: ..\..\src\common\docmdi.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\docmdi.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_docview.obj: ..\..\src\common\docview.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\docview.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dpycmn.obj: ..\..\src\common\dpycmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dpycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dseldlg.obj: ..\..\src\common\dseldlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dseldlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_effects.obj: ..\..\src\common\effects.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\effects.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fddlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filepickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontpickercmn.obj: ..\..\src\common\fontpickercmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fldlgcmn.obj: ..\..\src\common\fldlgcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fldlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontcmn.obj: ..\..\src\common\fontcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontdata.obj: ..\..\src\common\fontdata.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_graphicc.obj: ..\..\src\generic\graphicc.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\graphicc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontenumcmn.obj: ..\..\src\common\fontenumcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontenumcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontmap.obj: ..\..\src\common\fontmap.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontutilcmn.obj: ..\..\src\common\fontutilcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontutilcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_framecmn.obj: ..\..\src\common\framecmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\framecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gaugecmn.obj: ..\..\src\common\gaugecmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\gaugecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gbsizer.obj: ..\..\src\common\gbsizer.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\gbsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gdicmn.obj: ..\..\src\common\gdicmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\gdicmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_geometry.obj: ..\..\src\common\geometry.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\geometry.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gifdecod.obj: ..\..\src\common\gifdecod.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\gifdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_graphcmn.obj: ..\..\src\common\graphcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\graphcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_headercolcmn.obj: ..\..\src\common\headercolcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\headercolcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_headerctrlcmn.obj: ..\..\src\common\headerctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\headerctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_helpbase.obj: ..\..\src\common\helpbase.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\helpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_iconbndl.obj: ..\..\src\common\iconbndl.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\iconbndl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagall.obj: ..\..\src\common\imagall.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagall.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagbmp.obj: ..\..\src\common\imagbmp.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagbmp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_image.obj: ..\..\src\common\image.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\image.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagfill.obj: ..\..\src\common\imagfill.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagfill.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imaggif.obj: ..\..\src\common\imaggif.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imaggif.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagiff.obj: ..\..\src\common\imagiff.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagjpeg.obj: ..\..\src\common\imagjpeg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagjpeg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagpcx.obj: ..\..\src\common\imagpcx.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagpcx.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagpng.obj: ..\..\src\common\imagpng.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagpng.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagpnm.obj: ..\..\src\common\imagpnm.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagpnm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagtga.obj: ..\..\src\common\imagtga.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagtga.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagtiff.obj: ..\..\src\common\imagtiff.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagtiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagxpm.obj: ..\..\src\common\imagxpm.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagxpm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_layout.obj: ..\..\src\common\layout.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\layout.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_lboxcmn.obj: ..\..\src\common\lboxcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\lboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_listctrlcmn.obj: ..\..\src\common\listctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\listctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_markupparser.obj: ..\..\src\common\markupparser.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\markupparser.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_matrix.obj: ..\..\src\common\matrix.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\matrix.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_menucmn.obj: ..\..\src\common\menucmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\menucmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_modalhook.obj: ..\..\src\common\modalhook.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\modalhook.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_mousemanager.obj: ..\..\src\common\mousemanager.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\mousemanager.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_nbkbase.obj: ..\..\src\common\nbkbase.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\nbkbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\overlaycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_ownerdrwcmn.obj: ..\..\src\common\ownerdrwcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\ownerdrwcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_paper.obj: ..\..\src\common\paper.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\paper.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_panelcmn.obj: ..\..\src\common\panelcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\panelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_persist.obj: ..\..\src\common\persist.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\persist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_pickerbase.obj: ..\..\src\common\pickerbase.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\pickerbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_popupcmn.obj: ..\..\src\common\popupcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\popupcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_preferencescmn.obj: ..\..\src\common\preferencescmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\preferencescmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_prntbase.obj: ..\..\src\common\prntbase.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\prntbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_quantize.obj: ..\..\src\common\quantize.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\quantize.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_radiobtncmn.obj: ..\..\src\common\radiobtncmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\radiobtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_radiocmn.obj: ..\..\src\common\radiocmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\radiocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_rearrangectrl.obj: ..\..\src\common\rearrangectrl.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\rearrangectrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_rendcmn.obj: ..\..\src\common\rendcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\rendcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_rgncmn.obj: ..\..\src\common\rgncmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\rgncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_scrolbarcmn.obj: ..\..\src\common\scrolbarcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\scrolbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_settcmn.obj: ..\..\src\common\settcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\settcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_sizer.obj: ..\..\src\common\sizer.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\sizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_slidercmn.obj: ..\..\src\common\slidercmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\slidercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_spinbtncmn.obj: ..\..\src\common\spinbtncmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\spinbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_spinctrlcmn.obj: ..\..\src\common\spinctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\spinctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_srchcmn.obj: ..\..\src\common\srchcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\srchcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_statbar.obj: ..\..\src\common\statbar.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\statbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_statbmpcmn.obj: ..\..\src\common\statbmpcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\statbmpcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_statboxcmn.obj: ..\..\src\common\statboxcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\statboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_statlinecmn.obj: ..\..\src\common\statlinecmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\statlinecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_stattextcmn.obj: ..\..\src\common\stattextcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\stattextcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_stockitem.obj: ..\..\src\common\stockitem.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\stockitem.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_tbarbase.obj: ..\..\src\common\tbarbase.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\tbarbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_textcmn.obj: ..\..\src\common\textcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\textcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_textentrycmn.obj: ..\..\src\common\textentrycmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\textentrycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_textmeasurecmn.obj: ..\..\src\common\textmeasurecmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\textmeasurecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_toplvcmn.obj: ..\..\src\common\toplvcmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\toplvcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_treebase.obj: ..\..\src\common\treebase.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\treebase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_uiactioncmn.obj: ..\..\src\common\uiactioncmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\uiactioncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_valgen.obj: ..\..\src\common\valgen.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\valgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_validate.obj: ..\..\src\common\validate.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\validate.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_valtext.obj: ..\..\src\common\valtext.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\valtext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_valnum.obj: ..\..\src\common\valnum.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\valnum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_wincmn.obj: ..\..\src\common\wincmn.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\wincmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_windowid.obj: ..\..\src\common\windowid.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\windowid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_wrapsizer.obj: ..\..\src\common\wrapsizer.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\wrapsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_xpmdecod.obj: ..\..\src\common\xpmdecod.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\xpmdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_busyinfo.obj: ..\..\src\generic\busyinfo.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\busyinfo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_buttonbar.obj: ..\..\src\generic\buttonbar.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\buttonbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_choicdgg.obj: ..\..\src\generic\choicdgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\choicdgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_choicbkg.obj: ..\..\src\generic\choicbkg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\choicbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_combog.obj: ..\..\src\generic\combog.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\combog.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcpsg.obj: ..\..\src\generic\dcpsg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\dcpsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dirctrlg.obj: ..\..\src\generic\dirctrlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\dirctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dragimgg.obj: ..\..\src\generic\dragimgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\dragimgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_filectrlg.obj: ..\..\src\generic\filectrlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\filectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_infobar.obj: ..\..\src\generic\infobar.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\infobar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_listbkg.obj: ..\..\src\generic\listbkg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\listbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_logg.obj: ..\..\src\generic\logg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\logg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_markuptext.obj: ..\..\src\generic\markuptext.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\markuptext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_msgdlgg.obj: ..\..\src\generic\msgdlgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\msgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_numdlgg.obj: ..\..\src\generic\numdlgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\numdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_progdlgg.obj: ..\..\src\generic\progdlgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\progdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_preferencesg.obj: ..\..\src\generic\preferencesg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\preferencesg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_printps.obj: ..\..\src\generic\printps.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\printps.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_renderg.obj: ..\..\src\generic\renderg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\renderg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_richmsgdlgg.obj: ..\..\src\generic\richmsgdlgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\richmsgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_scrlwing.obj: ..\..\src\generic\scrlwing.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\scrlwing.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_selstore.obj: ..\..\src\generic\selstore.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\selstore.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_spinctlg.obj: ..\..\src\generic\spinctlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\spinctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_splitter.obj: ..\..\src\generic\splitter.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\splitter.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_srchctlg.obj: ..\..\src\generic\srchctlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\srchctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_statbmpg.obj: ..\..\src\generic\statbmpg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\statbmpg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_stattextg.obj: ..\..\src\generic\stattextg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\stattextg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_textdlgg.obj: ..\..\src\generic\textdlgg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\textdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_tipwin.obj: ..\..\src\generic\tipwin.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\tipwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_toolbkg.obj: ..\..\src\generic\toolbkg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\toolbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_treectlg.obj: ..\..\src\generic\treectlg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\treectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_treebkg.obj: ..\..\src\generic\treebkg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\treebkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_vlbox.obj: ..\..\src\generic\vlbox.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\vlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_vscroll.obj: ..\..\src\generic\vscroll.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\vscroll.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_xmlreshandler.obj: ..\..\src\xrc\xmlreshandler.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\xrc\xmlreshandler.cpp +!endif + +$(OBJS)\advdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\advdll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_ADV ..\..\src\msw\version.rc + +$(OBJS)\advdll_bmpcbox.obj: ..\..\src\msw\bmpcbox.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\bmpcbox.cpp + +$(OBJS)\advdll_calctrl.obj: ..\..\src\msw\calctrl.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\calctrl.cpp + +$(OBJS)\advdll_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp + +$(OBJS)\advdll_datecontrols.obj: ..\..\src\msw\datecontrols.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datecontrols.cpp + +$(OBJS)\advdll_datectrl.obj: ..\..\src\msw\datectrl.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp + +$(OBJS)\advdll_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp + +$(OBJS)\advdll_hyperlink.obj: ..\..\src\msw\hyperlink.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\hyperlink.cpp + +$(OBJS)\advdll_timectrl.obj: ..\..\src\msw\timectrl.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\timectrl.cpp + +$(OBJS)\advdll_animatecmn.obj: ..\..\src\common\animatecmn.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\animatecmn.cpp + +$(OBJS)\advdll_bmpcboxcmn.obj: ..\..\src\common\bmpcboxcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\bmpcboxcmn.cpp + +$(OBJS)\advdll_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp + +$(OBJS)\advdll_datavcmn.obj: ..\..\src\common\datavcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\datavcmn.cpp + +$(OBJS)\advdll_gridcmn.obj: ..\..\src\common\gridcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\gridcmn.cpp + +$(OBJS)\advdll_hyperlnkcmn.obj: ..\..\src\common\hyperlnkcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\hyperlnkcmn.cpp + +$(OBJS)\advdll_odcombocmn.obj: ..\..\src\common\odcombocmn.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\odcombocmn.cpp + +$(OBJS)\advdll_richtooltipcmn.obj: ..\..\src\common\richtooltipcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\richtooltipcmn.cpp + +$(OBJS)\advdll_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\aboutdlgg.cpp + +$(OBJS)\advdll_bannerwindow.obj: ..\..\src\generic\bannerwindow.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\bannerwindow.cpp + +$(OBJS)\advdll_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp + +$(OBJS)\advdll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp + +$(OBJS)\advdll_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp + +$(OBJS)\advdll_datavgen.obj: ..\..\src\generic\datavgen.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\datavgen.cpp + +$(OBJS)\advdll_datectlg.obj: ..\..\src\generic\datectlg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\datectlg.cpp + +$(OBJS)\advdll_editlbox.obj: ..\..\src\generic\editlbox.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\editlbox.cpp + +$(OBJS)\advdll_grid.obj: ..\..\src\generic\grid.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\grid.cpp + +$(OBJS)\advdll_gridctrl.obj: ..\..\src\generic\gridctrl.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\gridctrl.cpp + +$(OBJS)\advdll_grideditors.obj: ..\..\src\generic\grideditors.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\grideditors.cpp + +$(OBJS)\advdll_gridsel.obj: ..\..\src\generic\gridsel.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\gridsel.cpp + +$(OBJS)\advdll_helpext.obj: ..\..\src\generic\helpext.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\helpext.cpp + +$(OBJS)\advdll_hyperlinkg.obj: ..\..\src\generic\hyperlinkg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\hyperlinkg.cpp + +$(OBJS)\advdll_laywin.obj: ..\..\src\generic\laywin.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\laywin.cpp + +$(OBJS)\advdll_notifmsgg.obj: ..\..\src\generic\notifmsgg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\notifmsgg.cpp + +$(OBJS)\advdll_odcombo.obj: ..\..\src\generic\odcombo.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\odcombo.cpp + +$(OBJS)\advdll_propdlg.obj: ..\..\src\generic\propdlg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\propdlg.cpp + +$(OBJS)\advdll_richtooltipg.obj: ..\..\src\generic\richtooltipg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\richtooltipg.cpp + +$(OBJS)\advdll_sashwin.obj: ..\..\src\generic\sashwin.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\sashwin.cpp + +$(OBJS)\advdll_splash.obj: ..\..\src\generic\splash.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\splash.cpp + +$(OBJS)\advdll_timectrlg.obj: ..\..\src\generic\timectrlg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\timectrlg.cpp + +$(OBJS)\advdll_tipdlg.obj: ..\..\src\generic\tipdlg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\tipdlg.cpp + +$(OBJS)\advdll_treelist.obj: ..\..\src\generic\treelist.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\treelist.cpp + +$(OBJS)\advdll_wizard.obj: ..\..\src\generic\wizard.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\wizard.cpp + +$(OBJS)\advdll_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\taskbarcmn.cpp + +$(OBJS)\advdll_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp + +$(OBJS)\advdll_notifmsg.obj: ..\..\src\msw\notifmsg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\notifmsg.cpp + +$(OBJS)\advdll_richtooltip.obj: ..\..\src\msw\richtooltip.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\richtooltip.cpp + +$(OBJS)\advdll_sound.obj: ..\..\src\msw\sound.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\sound.cpp + +$(OBJS)\advdll_taskbar.obj: ..\..\src\msw\taskbar.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\taskbar.cpp + +$(OBJS)\advdll_joystick.obj: ..\..\src\msw\joystick.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\joystick.cpp + +$(OBJS)\advdll_animateg.obj: ..\..\src\generic\animateg.cpp + $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\animateg.cpp + +$(OBJS)\advlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\advlib_bmpcbox.obj: ..\..\src\msw\bmpcbox.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\bmpcbox.cpp + +$(OBJS)\advlib_calctrl.obj: ..\..\src\msw\calctrl.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\calctrl.cpp + +$(OBJS)\advlib_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp + +$(OBJS)\advlib_datecontrols.obj: ..\..\src\msw\datecontrols.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datecontrols.cpp + +$(OBJS)\advlib_datectrl.obj: ..\..\src\msw\datectrl.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp + +$(OBJS)\advlib_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp + +$(OBJS)\advlib_hyperlink.obj: ..\..\src\msw\hyperlink.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\hyperlink.cpp + +$(OBJS)\advlib_timectrl.obj: ..\..\src\msw\timectrl.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\timectrl.cpp + +$(OBJS)\advlib_animatecmn.obj: ..\..\src\common\animatecmn.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\animatecmn.cpp + +$(OBJS)\advlib_bmpcboxcmn.obj: ..\..\src\common\bmpcboxcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\bmpcboxcmn.cpp + +$(OBJS)\advlib_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp + +$(OBJS)\advlib_datavcmn.obj: ..\..\src\common\datavcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\datavcmn.cpp + +$(OBJS)\advlib_gridcmn.obj: ..\..\src\common\gridcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\gridcmn.cpp + +$(OBJS)\advlib_hyperlnkcmn.obj: ..\..\src\common\hyperlnkcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\hyperlnkcmn.cpp + +$(OBJS)\advlib_odcombocmn.obj: ..\..\src\common\odcombocmn.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\odcombocmn.cpp + +$(OBJS)\advlib_richtooltipcmn.obj: ..\..\src\common\richtooltipcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\richtooltipcmn.cpp + +$(OBJS)\advlib_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\aboutdlgg.cpp + +$(OBJS)\advlib_bannerwindow.obj: ..\..\src\generic\bannerwindow.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\bannerwindow.cpp + +$(OBJS)\advlib_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp + +$(OBJS)\advlib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp + +$(OBJS)\advlib_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp + +$(OBJS)\advlib_datavgen.obj: ..\..\src\generic\datavgen.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\datavgen.cpp + +$(OBJS)\advlib_datectlg.obj: ..\..\src\generic\datectlg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\datectlg.cpp + +$(OBJS)\advlib_editlbox.obj: ..\..\src\generic\editlbox.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\editlbox.cpp + +$(OBJS)\advlib_grid.obj: ..\..\src\generic\grid.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\grid.cpp + +$(OBJS)\advlib_gridctrl.obj: ..\..\src\generic\gridctrl.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\gridctrl.cpp + +$(OBJS)\advlib_grideditors.obj: ..\..\src\generic\grideditors.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\grideditors.cpp + +$(OBJS)\advlib_gridsel.obj: ..\..\src\generic\gridsel.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\gridsel.cpp + +$(OBJS)\advlib_helpext.obj: ..\..\src\generic\helpext.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\helpext.cpp + +$(OBJS)\advlib_hyperlinkg.obj: ..\..\src\generic\hyperlinkg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\hyperlinkg.cpp + +$(OBJS)\advlib_laywin.obj: ..\..\src\generic\laywin.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\laywin.cpp + +$(OBJS)\advlib_notifmsgg.obj: ..\..\src\generic\notifmsgg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\notifmsgg.cpp + +$(OBJS)\advlib_odcombo.obj: ..\..\src\generic\odcombo.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\odcombo.cpp + +$(OBJS)\advlib_propdlg.obj: ..\..\src\generic\propdlg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\propdlg.cpp + +$(OBJS)\advlib_richtooltipg.obj: ..\..\src\generic\richtooltipg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\richtooltipg.cpp + +$(OBJS)\advlib_sashwin.obj: ..\..\src\generic\sashwin.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\sashwin.cpp + +$(OBJS)\advlib_splash.obj: ..\..\src\generic\splash.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\splash.cpp + +$(OBJS)\advlib_timectrlg.obj: ..\..\src\generic\timectrlg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\timectrlg.cpp + +$(OBJS)\advlib_tipdlg.obj: ..\..\src\generic\tipdlg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\tipdlg.cpp + +$(OBJS)\advlib_treelist.obj: ..\..\src\generic\treelist.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\treelist.cpp + +$(OBJS)\advlib_wizard.obj: ..\..\src\generic\wizard.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\wizard.cpp + +$(OBJS)\advlib_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\taskbarcmn.cpp + +$(OBJS)\advlib_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp + +$(OBJS)\advlib_notifmsg.obj: ..\..\src\msw\notifmsg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\notifmsg.cpp + +$(OBJS)\advlib_richtooltip.obj: ..\..\src\msw\richtooltip.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\richtooltip.cpp + +$(OBJS)\advlib_sound.obj: ..\..\src\msw\sound.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\sound.cpp + +$(OBJS)\advlib_taskbar.obj: ..\..\src\msw\taskbar.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\taskbar.cpp + +$(OBJS)\advlib_joystick.obj: ..\..\src\msw\joystick.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\joystick.cpp + +$(OBJS)\advlib_animateg.obj: ..\..\src\generic\animateg.cpp + $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\animateg.cpp + +$(OBJS)\mediadll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(MEDIADLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\mediadll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_MEDIA ..\..\src\msw\version.rc + +$(OBJS)\mediadll_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MEDIADLL_CXXFLAGS) ..\..\src\common\mediactrlcmn.cpp + +$(OBJS)\mediadll_mediactrl_am.obj: ..\..\src\msw\mediactrl_am.cpp + $(CXX) -q -c -P -o$@ $(MEDIADLL_CXXFLAGS) ..\..\src\msw\mediactrl_am.cpp + +$(OBJS)\mediadll_mediactrl_wmp10.obj: ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) -q -c -P -o$@ $(MEDIADLL_CXXFLAGS) ..\..\src\msw\mediactrl_wmp10.cpp + +$(OBJS)\mediadll_mediactrl_qt.obj: ..\..\src\msw\mediactrl_qt.cpp + $(CXX) -q -c -P -o$@ $(MEDIADLL_CXXFLAGS) ..\..\src\msw\mediactrl_qt.cpp + +$(OBJS)\medialib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(MEDIALIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\medialib_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp + $(CXX) -q -c -P -o$@ $(MEDIALIB_CXXFLAGS) ..\..\src\common\mediactrlcmn.cpp + +$(OBJS)\medialib_mediactrl_am.obj: ..\..\src\msw\mediactrl_am.cpp + $(CXX) -q -c -P -o$@ $(MEDIALIB_CXXFLAGS) ..\..\src\msw\mediactrl_am.cpp + +$(OBJS)\medialib_mediactrl_wmp10.obj: ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) -q -c -P -o$@ $(MEDIALIB_CXXFLAGS) ..\..\src\msw\mediactrl_wmp10.cpp + +$(OBJS)\medialib_mediactrl_qt.obj: ..\..\src\msw\mediactrl_qt.cpp + $(CXX) -q -c -P -o$@ $(MEDIALIB_CXXFLAGS) ..\..\src\msw\mediactrl_qt.cpp + +$(OBJS)\htmldll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\htmldll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_HTML ..\..\src\msw\version.rc + +$(OBJS)\htmldll_helpbest.obj: ..\..\src\msw\helpbest.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\msw\helpbest.cpp + +$(OBJS)\htmldll_helpctrl.obj: ..\..\src\html\helpctrl.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\helpctrl.cpp + +$(OBJS)\htmldll_helpdata.obj: ..\..\src\html\helpdata.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\helpdata.cpp + +$(OBJS)\htmldll_helpdlg.obj: ..\..\src\html\helpdlg.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\helpdlg.cpp + +$(OBJS)\htmldll_helpfrm.obj: ..\..\src\html\helpfrm.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\helpfrm.cpp + +$(OBJS)\htmldll_helpwnd.obj: ..\..\src\html\helpwnd.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\helpwnd.cpp + +$(OBJS)\htmldll_htmlcell.obj: ..\..\src\html\htmlcell.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmlcell.cpp + +$(OBJS)\htmldll_htmlfilt.obj: ..\..\src\html\htmlfilt.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmlfilt.cpp + +$(OBJS)\htmldll_htmlpars.obj: ..\..\src\html\htmlpars.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmlpars.cpp + +$(OBJS)\htmldll_htmltag.obj: ..\..\src\html\htmltag.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmltag.cpp + +$(OBJS)\htmldll_htmlwin.obj: ..\..\src\html\htmlwin.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmlwin.cpp + +$(OBJS)\htmldll_htmprint.obj: ..\..\src\html\htmprint.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmprint.cpp + +$(OBJS)\htmldll_m_dflist.obj: ..\..\src\html\m_dflist.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_dflist.cpp + +$(OBJS)\htmldll_m_fonts.obj: ..\..\src\html\m_fonts.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_fonts.cpp + +$(OBJS)\htmldll_m_hline.obj: ..\..\src\html\m_hline.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_hline.cpp + +$(OBJS)\htmldll_m_image.obj: ..\..\src\html\m_image.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_image.cpp + +$(OBJS)\htmldll_m_layout.obj: ..\..\src\html\m_layout.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_layout.cpp + +$(OBJS)\htmldll_m_links.obj: ..\..\src\html\m_links.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_links.cpp + +$(OBJS)\htmldll_m_list.obj: ..\..\src\html\m_list.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_list.cpp + +$(OBJS)\htmldll_m_pre.obj: ..\..\src\html\m_pre.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_pre.cpp + +$(OBJS)\htmldll_m_span.obj: ..\..\src\html\m_span.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_span.cpp + +$(OBJS)\htmldll_m_style.obj: ..\..\src\html\m_style.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_style.cpp + +$(OBJS)\htmldll_m_tables.obj: ..\..\src\html\m_tables.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_tables.cpp + +$(OBJS)\htmldll_styleparams.obj: ..\..\src\html\styleparams.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\styleparams.cpp + +$(OBJS)\htmldll_winpars.obj: ..\..\src\html\winpars.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\winpars.cpp + +$(OBJS)\htmldll_htmllbox.obj: ..\..\src\generic\htmllbox.cpp + $(CXX) -q -c -P -o$@ $(HTMLDLL_CXXFLAGS) ..\..\src\generic\htmllbox.cpp + +$(OBJS)\htmllib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\htmllib_helpbest.obj: ..\..\src\msw\helpbest.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\msw\helpbest.cpp + +$(OBJS)\htmllib_helpctrl.obj: ..\..\src\html\helpctrl.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\helpctrl.cpp + +$(OBJS)\htmllib_helpdata.obj: ..\..\src\html\helpdata.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\helpdata.cpp + +$(OBJS)\htmllib_helpdlg.obj: ..\..\src\html\helpdlg.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\helpdlg.cpp + +$(OBJS)\htmllib_helpfrm.obj: ..\..\src\html\helpfrm.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\helpfrm.cpp + +$(OBJS)\htmllib_helpwnd.obj: ..\..\src\html\helpwnd.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\helpwnd.cpp + +$(OBJS)\htmllib_htmlcell.obj: ..\..\src\html\htmlcell.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmlcell.cpp + +$(OBJS)\htmllib_htmlfilt.obj: ..\..\src\html\htmlfilt.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmlfilt.cpp + +$(OBJS)\htmllib_htmlpars.obj: ..\..\src\html\htmlpars.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmlpars.cpp + +$(OBJS)\htmllib_htmltag.obj: ..\..\src\html\htmltag.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmltag.cpp + +$(OBJS)\htmllib_htmlwin.obj: ..\..\src\html\htmlwin.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmlwin.cpp + +$(OBJS)\htmllib_htmprint.obj: ..\..\src\html\htmprint.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmprint.cpp + +$(OBJS)\htmllib_m_dflist.obj: ..\..\src\html\m_dflist.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_dflist.cpp + +$(OBJS)\htmllib_m_fonts.obj: ..\..\src\html\m_fonts.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_fonts.cpp + +$(OBJS)\htmllib_m_hline.obj: ..\..\src\html\m_hline.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_hline.cpp + +$(OBJS)\htmllib_m_image.obj: ..\..\src\html\m_image.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_image.cpp + +$(OBJS)\htmllib_m_layout.obj: ..\..\src\html\m_layout.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_layout.cpp + +$(OBJS)\htmllib_m_links.obj: ..\..\src\html\m_links.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_links.cpp + +$(OBJS)\htmllib_m_list.obj: ..\..\src\html\m_list.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_list.cpp + +$(OBJS)\htmllib_m_pre.obj: ..\..\src\html\m_pre.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_pre.cpp + +$(OBJS)\htmllib_m_span.obj: ..\..\src\html\m_span.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_span.cpp + +$(OBJS)\htmllib_m_style.obj: ..\..\src\html\m_style.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_style.cpp + +$(OBJS)\htmllib_m_tables.obj: ..\..\src\html\m_tables.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_tables.cpp + +$(OBJS)\htmllib_styleparams.obj: ..\..\src\html\styleparams.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\styleparams.cpp + +$(OBJS)\htmllib_winpars.obj: ..\..\src\html\winpars.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\winpars.cpp + +$(OBJS)\htmllib_htmllbox.obj: ..\..\src\generic\htmllbox.cpp + $(CXX) -q -c -P -o$@ $(HTMLLIB_CXXFLAGS) ..\..\src\generic\htmllbox.cpp + +$(OBJS)\webviewdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(WEBVIEWDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\webviewdll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_WEBVIEW ..\..\src\msw\version.rc + +$(OBJS)\webviewdll_webview_ie.obj: ..\..\src\msw\webview_ie.cpp + $(CXX) -q -c -P -o$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\msw\webview_ie.cpp + +$(OBJS)\webviewdll_webview.obj: ..\..\src\common\webview.cpp + $(CXX) -q -c -P -o$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\common\webview.cpp + +$(OBJS)\webviewdll_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp + $(CXX) -q -c -P -o$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp + +$(OBJS)\webviewdll_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp + $(CXX) -q -c -P -o$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp + +$(OBJS)\webviewlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(WEBVIEWLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\webviewlib_webview_ie.obj: ..\..\src\msw\webview_ie.cpp + $(CXX) -q -c -P -o$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\msw\webview_ie.cpp + +$(OBJS)\webviewlib_webview.obj: ..\..\src\common\webview.cpp + $(CXX) -q -c -P -o$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\common\webview.cpp + +$(OBJS)\webviewlib_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp + $(CXX) -q -c -P -o$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp + +$(OBJS)\webviewlib_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp + $(CXX) -q -c -P -o$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp + +$(OBJS)\qadll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(QADLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\qadll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_QA ..\..\src\msw\version.rc + +$(OBJS)\qadll_debugrpt.obj: ..\..\src\common\debugrpt.cpp + $(CXX) -q -c -P -o$@ $(QADLL_CXXFLAGS) ..\..\src\common\debugrpt.cpp + +$(OBJS)\qadll_dbgrptg.obj: ..\..\src\generic\dbgrptg.cpp + $(CXX) -q -c -P -o$@ $(QADLL_CXXFLAGS) ..\..\src\generic\dbgrptg.cpp + +$(OBJS)\qalib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(QALIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\qalib_debugrpt.obj: ..\..\src\common\debugrpt.cpp + $(CXX) -q -c -P -o$@ $(QALIB_CXXFLAGS) ..\..\src\common\debugrpt.cpp + +$(OBJS)\qalib_dbgrptg.obj: ..\..\src\generic\dbgrptg.cpp + $(CXX) -q -c -P -o$@ $(QALIB_CXXFLAGS) ..\..\src\generic\dbgrptg.cpp + +$(OBJS)\xmldll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(XMLDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\xmldll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dwxUSE_GUI=0 -dWXUSINGDLL -dWXMAKINGDLL_XML ..\..\src\msw\version.rc + +$(OBJS)\xmldll_xml.obj: ..\..\src\xml\xml.cpp + $(CXX) -q -c -P -o$@ $(XMLDLL_CXXFLAGS) ..\..\src\xml\xml.cpp + +$(OBJS)\xmldll_xtixml.obj: ..\..\src\common\xtixml.cpp + $(CXX) -q -c -P -o$@ $(XMLDLL_CXXFLAGS) ..\..\src\common\xtixml.cpp + +$(OBJS)\xmllib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(XMLLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\xmllib_xml.obj: ..\..\src\xml\xml.cpp + $(CXX) -q -c -P -o$@ $(XMLLIB_CXXFLAGS) ..\..\src\xml\xml.cpp + +$(OBJS)\xmllib_xtixml.obj: ..\..\src\common\xtixml.cpp + $(CXX) -q -c -P -o$@ $(XMLLIB_CXXFLAGS) ..\..\src\common\xtixml.cpp + +$(OBJS)\xrcdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\xrcdll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_XRC ..\..\src\msw\version.rc + +$(OBJS)\xrcdll_xh_animatctrl.obj: ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_animatctrl.cpp + +$(OBJS)\xrcdll_xh_bannerwindow.obj: ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_bannerwindow.cpp + +$(OBJS)\xrcdll_xh_bmp.obj: ..\..\src\xrc\xh_bmp.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_bmp.cpp + +$(OBJS)\xrcdll_xh_bmpcbox.obj: ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_bmpcbox.cpp + +$(OBJS)\xrcdll_xh_bmpbt.obj: ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_bmpbt.cpp + +$(OBJS)\xrcdll_xh_bttn.obj: ..\..\src\xrc\xh_bttn.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_bttn.cpp + +$(OBJS)\xrcdll_xh_cald.obj: ..\..\src\xrc\xh_cald.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_cald.cpp + +$(OBJS)\xrcdll_xh_chckb.obj: ..\..\src\xrc\xh_chckb.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_chckb.cpp + +$(OBJS)\xrcdll_xh_chckl.obj: ..\..\src\xrc\xh_chckl.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_chckl.cpp + +$(OBJS)\xrcdll_xh_choic.obj: ..\..\src\xrc\xh_choic.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_choic.cpp + +$(OBJS)\xrcdll_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_choicbk.cpp + +$(OBJS)\xrcdll_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_clrpicker.cpp + +$(OBJS)\xrcdll_xh_cmdlinkbn.obj: ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_cmdlinkbn.cpp + +$(OBJS)\xrcdll_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_collpane.cpp + +$(OBJS)\xrcdll_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_combo.cpp + +$(OBJS)\xrcdll_xh_comboctrl.obj: ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_comboctrl.cpp + +$(OBJS)\xrcdll_xh_datectrl.obj: ..\..\src\xrc\xh_datectrl.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_datectrl.cpp + +$(OBJS)\xrcdll_xh_dirpicker.obj: ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_dirpicker.cpp + +$(OBJS)\xrcdll_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_dlg.cpp + +$(OBJS)\xrcdll_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp + +$(OBJS)\xrcdll_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + +$(OBJS)\xrcdll_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp + +$(OBJS)\xrcdll_xh_fontpicker.obj: ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_fontpicker.cpp + +$(OBJS)\xrcdll_xh_frame.obj: ..\..\src\xrc\xh_frame.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_frame.cpp + +$(OBJS)\xrcdll_xh_gauge.obj: ..\..\src\xrc\xh_gauge.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_gauge.cpp + +$(OBJS)\xrcdll_xh_gdctl.obj: ..\..\src\xrc\xh_gdctl.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_gdctl.cpp + +$(OBJS)\xrcdll_xh_grid.obj: ..\..\src\xrc\xh_grid.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_grid.cpp + +$(OBJS)\xrcdll_xh_html.obj: ..\..\src\xrc\xh_html.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_html.cpp + +$(OBJS)\xrcdll_xh_hyperlink.obj: ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_hyperlink.cpp + +$(OBJS)\xrcdll_xh_listb.obj: ..\..\src\xrc\xh_listb.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_listb.cpp + +$(OBJS)\xrcdll_xh_listbk.obj: ..\..\src\xrc\xh_listbk.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_listbk.cpp + +$(OBJS)\xrcdll_xh_listc.obj: ..\..\src\xrc\xh_listc.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_listc.cpp + +$(OBJS)\xrcdll_xh_mdi.obj: ..\..\src\xrc\xh_mdi.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_mdi.cpp + +$(OBJS)\xrcdll_xh_menu.obj: ..\..\src\xrc\xh_menu.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_menu.cpp + +$(OBJS)\xrcdll_xh_notbk.obj: ..\..\src\xrc\xh_notbk.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_notbk.cpp + +$(OBJS)\xrcdll_xh_odcombo.obj: ..\..\src\xrc\xh_odcombo.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_odcombo.cpp + +$(OBJS)\xrcdll_xh_panel.obj: ..\..\src\xrc\xh_panel.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_panel.cpp + +$(OBJS)\xrcdll_xh_propdlg.obj: ..\..\src\xrc\xh_propdlg.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_propdlg.cpp + +$(OBJS)\xrcdll_xh_radbt.obj: ..\..\src\xrc\xh_radbt.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_radbt.cpp + +$(OBJS)\xrcdll_xh_radbx.obj: ..\..\src\xrc\xh_radbx.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_radbx.cpp + +$(OBJS)\xrcdll_xh_scrol.obj: ..\..\src\xrc\xh_scrol.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_scrol.cpp + +$(OBJS)\xrcdll_xh_scwin.obj: ..\..\src\xrc\xh_scwin.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_scwin.cpp + +$(OBJS)\xrcdll_xh_htmllbox.obj: ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_htmllbox.cpp + +$(OBJS)\xrcdll_xh_sizer.obj: ..\..\src\xrc\xh_sizer.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_sizer.cpp + +$(OBJS)\xrcdll_xh_slidr.obj: ..\..\src\xrc\xh_slidr.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_slidr.cpp + +$(OBJS)\xrcdll_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_spin.cpp + +$(OBJS)\xrcdll_xh_split.obj: ..\..\src\xrc\xh_split.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_split.cpp + +$(OBJS)\xrcdll_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_srchctrl.cpp + +$(OBJS)\xrcdll_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_statbar.cpp + +$(OBJS)\xrcdll_xh_stbmp.obj: ..\..\src\xrc\xh_stbmp.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_stbmp.cpp + +$(OBJS)\xrcdll_xh_stbox.obj: ..\..\src\xrc\xh_stbox.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_stbox.cpp + +$(OBJS)\xrcdll_xh_stlin.obj: ..\..\src\xrc\xh_stlin.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_stlin.cpp + +$(OBJS)\xrcdll_xh_sttxt.obj: ..\..\src\xrc\xh_sttxt.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_sttxt.cpp + +$(OBJS)\xrcdll_xh_text.obj: ..\..\src\xrc\xh_text.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_text.cpp + +$(OBJS)\xrcdll_xh_tglbtn.obj: ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_tglbtn.cpp + +$(OBJS)\xrcdll_xh_timectrl.obj: ..\..\src\xrc\xh_timectrl.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_timectrl.cpp + +$(OBJS)\xrcdll_xh_toolb.obj: ..\..\src\xrc\xh_toolb.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_toolb.cpp + +$(OBJS)\xrcdll_xh_toolbk.obj: ..\..\src\xrc\xh_toolbk.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_toolbk.cpp + +$(OBJS)\xrcdll_xh_tree.obj: ..\..\src\xrc\xh_tree.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_tree.cpp + +$(OBJS)\xrcdll_xh_treebk.obj: ..\..\src\xrc\xh_treebk.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_treebk.cpp + +$(OBJS)\xrcdll_xh_unkwn.obj: ..\..\src\xrc\xh_unkwn.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_unkwn.cpp + +$(OBJS)\xrcdll_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_wizrd.cpp + +$(OBJS)\xrcdll_xmlres.obj: ..\..\src\xrc\xmlres.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmlres.cpp + +$(OBJS)\xrcdll_xmladv.obj: ..\..\src\xrc\xmladv.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmladv.cpp + +$(OBJS)\xrcdll_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp + +$(OBJS)\xrclib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\xrclib_xh_animatctrl.obj: ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_animatctrl.cpp + +$(OBJS)\xrclib_xh_bannerwindow.obj: ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_bannerwindow.cpp + +$(OBJS)\xrclib_xh_bmp.obj: ..\..\src\xrc\xh_bmp.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_bmp.cpp + +$(OBJS)\xrclib_xh_bmpcbox.obj: ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_bmpcbox.cpp + +$(OBJS)\xrclib_xh_bmpbt.obj: ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_bmpbt.cpp + +$(OBJS)\xrclib_xh_bttn.obj: ..\..\src\xrc\xh_bttn.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_bttn.cpp + +$(OBJS)\xrclib_xh_cald.obj: ..\..\src\xrc\xh_cald.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_cald.cpp + +$(OBJS)\xrclib_xh_chckb.obj: ..\..\src\xrc\xh_chckb.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_chckb.cpp + +$(OBJS)\xrclib_xh_chckl.obj: ..\..\src\xrc\xh_chckl.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_chckl.cpp + +$(OBJS)\xrclib_xh_choic.obj: ..\..\src\xrc\xh_choic.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_choic.cpp + +$(OBJS)\xrclib_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_choicbk.cpp + +$(OBJS)\xrclib_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_clrpicker.cpp + +$(OBJS)\xrclib_xh_cmdlinkbn.obj: ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_cmdlinkbn.cpp + +$(OBJS)\xrclib_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_collpane.cpp + +$(OBJS)\xrclib_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_combo.cpp + +$(OBJS)\xrclib_xh_comboctrl.obj: ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_comboctrl.cpp + +$(OBJS)\xrclib_xh_datectrl.obj: ..\..\src\xrc\xh_datectrl.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_datectrl.cpp + +$(OBJS)\xrclib_xh_dirpicker.obj: ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_dirpicker.cpp + +$(OBJS)\xrclib_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_dlg.cpp + +$(OBJS)\xrclib_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp + +$(OBJS)\xrclib_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + +$(OBJS)\xrclib_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp + +$(OBJS)\xrclib_xh_fontpicker.obj: ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_fontpicker.cpp + +$(OBJS)\xrclib_xh_frame.obj: ..\..\src\xrc\xh_frame.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_frame.cpp + +$(OBJS)\xrclib_xh_gauge.obj: ..\..\src\xrc\xh_gauge.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_gauge.cpp + +$(OBJS)\xrclib_xh_gdctl.obj: ..\..\src\xrc\xh_gdctl.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_gdctl.cpp + +$(OBJS)\xrclib_xh_grid.obj: ..\..\src\xrc\xh_grid.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_grid.cpp + +$(OBJS)\xrclib_xh_html.obj: ..\..\src\xrc\xh_html.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_html.cpp + +$(OBJS)\xrclib_xh_hyperlink.obj: ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_hyperlink.cpp + +$(OBJS)\xrclib_xh_listb.obj: ..\..\src\xrc\xh_listb.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_listb.cpp + +$(OBJS)\xrclib_xh_listbk.obj: ..\..\src\xrc\xh_listbk.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_listbk.cpp + +$(OBJS)\xrclib_xh_listc.obj: ..\..\src\xrc\xh_listc.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_listc.cpp + +$(OBJS)\xrclib_xh_mdi.obj: ..\..\src\xrc\xh_mdi.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_mdi.cpp + +$(OBJS)\xrclib_xh_menu.obj: ..\..\src\xrc\xh_menu.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_menu.cpp + +$(OBJS)\xrclib_xh_notbk.obj: ..\..\src\xrc\xh_notbk.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_notbk.cpp + +$(OBJS)\xrclib_xh_odcombo.obj: ..\..\src\xrc\xh_odcombo.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_odcombo.cpp + +$(OBJS)\xrclib_xh_panel.obj: ..\..\src\xrc\xh_panel.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_panel.cpp + +$(OBJS)\xrclib_xh_propdlg.obj: ..\..\src\xrc\xh_propdlg.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_propdlg.cpp + +$(OBJS)\xrclib_xh_radbt.obj: ..\..\src\xrc\xh_radbt.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_radbt.cpp + +$(OBJS)\xrclib_xh_radbx.obj: ..\..\src\xrc\xh_radbx.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_radbx.cpp + +$(OBJS)\xrclib_xh_scrol.obj: ..\..\src\xrc\xh_scrol.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_scrol.cpp + +$(OBJS)\xrclib_xh_scwin.obj: ..\..\src\xrc\xh_scwin.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_scwin.cpp + +$(OBJS)\xrclib_xh_htmllbox.obj: ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_htmllbox.cpp + +$(OBJS)\xrclib_xh_sizer.obj: ..\..\src\xrc\xh_sizer.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_sizer.cpp + +$(OBJS)\xrclib_xh_slidr.obj: ..\..\src\xrc\xh_slidr.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_slidr.cpp + +$(OBJS)\xrclib_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_spin.cpp + +$(OBJS)\xrclib_xh_split.obj: ..\..\src\xrc\xh_split.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_split.cpp + +$(OBJS)\xrclib_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_srchctrl.cpp + +$(OBJS)\xrclib_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_statbar.cpp + +$(OBJS)\xrclib_xh_stbmp.obj: ..\..\src\xrc\xh_stbmp.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_stbmp.cpp + +$(OBJS)\xrclib_xh_stbox.obj: ..\..\src\xrc\xh_stbox.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_stbox.cpp + +$(OBJS)\xrclib_xh_stlin.obj: ..\..\src\xrc\xh_stlin.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_stlin.cpp + +$(OBJS)\xrclib_xh_sttxt.obj: ..\..\src\xrc\xh_sttxt.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_sttxt.cpp + +$(OBJS)\xrclib_xh_text.obj: ..\..\src\xrc\xh_text.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_text.cpp + +$(OBJS)\xrclib_xh_tglbtn.obj: ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_tglbtn.cpp + +$(OBJS)\xrclib_xh_timectrl.obj: ..\..\src\xrc\xh_timectrl.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_timectrl.cpp + +$(OBJS)\xrclib_xh_toolb.obj: ..\..\src\xrc\xh_toolb.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_toolb.cpp + +$(OBJS)\xrclib_xh_toolbk.obj: ..\..\src\xrc\xh_toolbk.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_toolbk.cpp + +$(OBJS)\xrclib_xh_tree.obj: ..\..\src\xrc\xh_tree.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_tree.cpp + +$(OBJS)\xrclib_xh_treebk.obj: ..\..\src\xrc\xh_treebk.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_treebk.cpp + +$(OBJS)\xrclib_xh_unkwn.obj: ..\..\src\xrc\xh_unkwn.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_unkwn.cpp + +$(OBJS)\xrclib_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_wizrd.cpp + +$(OBJS)\xrclib_xmlres.obj: ..\..\src\xrc\xmlres.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmlres.cpp + +$(OBJS)\xrclib_xmladv.obj: ..\..\src\xrc\xmladv.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmladv.cpp + +$(OBJS)\xrclib_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp + +$(OBJS)\auidll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\auidll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_AUI ..\..\src\msw\version.rc + +$(OBJS)\auidll_framemanager.obj: ..\..\src\aui\framemanager.cpp + $(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\framemanager.cpp + +$(OBJS)\auidll_dockart.obj: ..\..\src\aui\dockart.cpp + $(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\dockart.cpp + +$(OBJS)\auidll_floatpane.obj: ..\..\src\aui\floatpane.cpp + $(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\floatpane.cpp + +$(OBJS)\auidll_auibook.obj: ..\..\src\aui\auibook.cpp + $(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\auibook.cpp + +$(OBJS)\auidll_auibar.obj: ..\..\src\aui\auibar.cpp + $(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\auibar.cpp + +$(OBJS)\auidll_tabmdi.obj: ..\..\src\aui\tabmdi.cpp + $(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\tabmdi.cpp + +$(OBJS)\auidll_tabart.obj: ..\..\src\aui\tabart.cpp + $(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\tabart.cpp + +$(OBJS)\auidll_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + +$(OBJS)\auilib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\auilib_framemanager.obj: ..\..\src\aui\framemanager.cpp + $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\framemanager.cpp + +$(OBJS)\auilib_dockart.obj: ..\..\src\aui\dockart.cpp + $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\dockart.cpp + +$(OBJS)\auilib_floatpane.obj: ..\..\src\aui\floatpane.cpp + $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\floatpane.cpp + +$(OBJS)\auilib_auibook.obj: ..\..\src\aui\auibook.cpp + $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\auibook.cpp + +$(OBJS)\auilib_auibar.obj: ..\..\src\aui\auibar.cpp + $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\auibar.cpp + +$(OBJS)\auilib_tabmdi.obj: ..\..\src\aui\tabmdi.cpp + $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\tabmdi.cpp + +$(OBJS)\auilib_tabart.obj: ..\..\src\aui\tabart.cpp + $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\tabart.cpp + +$(OBJS)\auilib_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + +$(OBJS)\ribbondll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\ribbondll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_RIBBON ..\..\src\msw\version.rc + +$(OBJS)\ribbondll_art_internal.obj: ..\..\src\ribbon\art_internal.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\art_internal.cpp + +$(OBJS)\ribbondll_art_msw.obj: ..\..\src\ribbon\art_msw.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\art_msw.cpp + +$(OBJS)\ribbondll_art_aui.obj: ..\..\src\ribbon\art_aui.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\art_aui.cpp + +$(OBJS)\ribbondll_bar.obj: ..\..\src\ribbon\bar.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\bar.cpp + +$(OBJS)\ribbondll_buttonbar.obj: ..\..\src\ribbon\buttonbar.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\buttonbar.cpp + +$(OBJS)\ribbondll_control.obj: ..\..\src\ribbon\control.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\control.cpp + +$(OBJS)\ribbondll_gallery.obj: ..\..\src\ribbon\gallery.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\gallery.cpp + +$(OBJS)\ribbondll_page.obj: ..\..\src\ribbon\page.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\page.cpp + +$(OBJS)\ribbondll_panel.obj: ..\..\src\ribbon\panel.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\panel.cpp + +$(OBJS)\ribbondll_toolbar.obj: ..\..\src\ribbon\toolbar.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\toolbar.cpp + +$(OBJS)\ribbondll_xh_ribbon.obj: ..\..\src\xrc\xh_ribbon.cpp + $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\xrc\xh_ribbon.cpp + +$(OBJS)\ribbonlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\ribbonlib_art_internal.obj: ..\..\src\ribbon\art_internal.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\art_internal.cpp + +$(OBJS)\ribbonlib_art_msw.obj: ..\..\src\ribbon\art_msw.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\art_msw.cpp + +$(OBJS)\ribbonlib_art_aui.obj: ..\..\src\ribbon\art_aui.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\art_aui.cpp + +$(OBJS)\ribbonlib_bar.obj: ..\..\src\ribbon\bar.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\bar.cpp + +$(OBJS)\ribbonlib_buttonbar.obj: ..\..\src\ribbon\buttonbar.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\buttonbar.cpp + +$(OBJS)\ribbonlib_control.obj: ..\..\src\ribbon\control.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\control.cpp + +$(OBJS)\ribbonlib_gallery.obj: ..\..\src\ribbon\gallery.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\gallery.cpp + +$(OBJS)\ribbonlib_page.obj: ..\..\src\ribbon\page.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\page.cpp + +$(OBJS)\ribbonlib_panel.obj: ..\..\src\ribbon\panel.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\panel.cpp + +$(OBJS)\ribbonlib_toolbar.obj: ..\..\src\ribbon\toolbar.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\toolbar.cpp + +$(OBJS)\ribbonlib_xh_ribbon.obj: ..\..\src\xrc\xh_ribbon.cpp + $(CXX) -q -c -P -o$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\xrc\xh_ribbon.cpp + +$(OBJS)\propgriddll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\propgriddll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_PROPGRID ..\..\src\msw\version.rc + +$(OBJS)\propgriddll_advprops.obj: ..\..\src\propgrid\advprops.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\advprops.cpp + +$(OBJS)\propgriddll_editors.obj: ..\..\src\propgrid\editors.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\editors.cpp + +$(OBJS)\propgriddll_manager.obj: ..\..\src\propgrid\manager.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\manager.cpp + +$(OBJS)\propgriddll_property.obj: ..\..\src\propgrid\property.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\property.cpp + +$(OBJS)\propgriddll_propgrid.obj: ..\..\src\propgrid\propgrid.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\propgrid.cpp + +$(OBJS)\propgriddll_propgridiface.obj: ..\..\src\propgrid\propgridiface.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\propgridiface.cpp + +$(OBJS)\propgriddll_propgridpagestate.obj: ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\propgridpagestate.cpp + +$(OBJS)\propgriddll_props.obj: ..\..\src\propgrid\props.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\props.cpp + +$(OBJS)\propgridlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\propgridlib_advprops.obj: ..\..\src\propgrid\advprops.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\advprops.cpp + +$(OBJS)\propgridlib_editors.obj: ..\..\src\propgrid\editors.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\editors.cpp + +$(OBJS)\propgridlib_manager.obj: ..\..\src\propgrid\manager.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\manager.cpp + +$(OBJS)\propgridlib_property.obj: ..\..\src\propgrid\property.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\property.cpp + +$(OBJS)\propgridlib_propgrid.obj: ..\..\src\propgrid\propgrid.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\propgrid.cpp + +$(OBJS)\propgridlib_propgridiface.obj: ..\..\src\propgrid\propgridiface.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\propgridiface.cpp + +$(OBJS)\propgridlib_propgridpagestate.obj: ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\propgridpagestate.cpp + +$(OBJS)\propgridlib_props.obj: ..\..\src\propgrid\props.cpp + $(CXX) -q -c -P -o$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\props.cpp + +$(OBJS)\richtextdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\richtextdll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_RICHTEXT ..\..\src\msw\version.rc + +$(OBJS)\richtextdll_richtextbuffer.obj: ..\..\src\richtext\richtextbuffer.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextbuffer.cpp + +$(OBJS)\richtextdll_richtextctrl.obj: ..\..\src\richtext\richtextctrl.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextctrl.cpp + +$(OBJS)\richtextdll_richtextformatdlg.obj: ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextformatdlg.cpp + +$(OBJS)\richtextdll_richtexthtml.obj: ..\..\src\richtext\richtexthtml.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtexthtml.cpp + +$(OBJS)\richtextdll_richtextimagedlg.obj: ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextimagedlg.cpp + +$(OBJS)\richtextdll_richtextprint.obj: ..\..\src\richtext\richtextprint.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextprint.cpp + +$(OBJS)\richtextdll_richtextstyledlg.obj: ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextstyledlg.cpp + +$(OBJS)\richtextdll_richtextstyles.obj: ..\..\src\richtext\richtextstyles.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextstyles.cpp + +$(OBJS)\richtextdll_richtextsymboldlg.obj: ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextsymboldlg.cpp + +$(OBJS)\richtextdll_richtextxml.obj: ..\..\src\richtext\richtextxml.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextxml.cpp + +$(OBJS)\richtextdll_xh_richtext.obj: ..\..\src\xrc\xh_richtext.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\xrc\xh_richtext.cpp + +$(OBJS)\richtextlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\richtextlib_richtextbuffer.obj: ..\..\src\richtext\richtextbuffer.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextbuffer.cpp + +$(OBJS)\richtextlib_richtextctrl.obj: ..\..\src\richtext\richtextctrl.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextctrl.cpp + +$(OBJS)\richtextlib_richtextformatdlg.obj: ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextformatdlg.cpp + +$(OBJS)\richtextlib_richtexthtml.obj: ..\..\src\richtext\richtexthtml.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtexthtml.cpp + +$(OBJS)\richtextlib_richtextimagedlg.obj: ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextimagedlg.cpp + +$(OBJS)\richtextlib_richtextprint.obj: ..\..\src\richtext\richtextprint.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextprint.cpp + +$(OBJS)\richtextlib_richtextstyledlg.obj: ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextstyledlg.cpp + +$(OBJS)\richtextlib_richtextstyles.obj: ..\..\src\richtext\richtextstyles.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextstyles.cpp + +$(OBJS)\richtextlib_richtextsymboldlg.obj: ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextsymboldlg.cpp + +$(OBJS)\richtextlib_richtextxml.obj: ..\..\src\richtext\richtextxml.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextxml.cpp + +$(OBJS)\richtextlib_xh_richtext.obj: ..\..\src\xrc\xh_richtext.cpp + $(CXX) -q -c -P -o$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\xrc\xh_richtext.cpp + +$(OBJS)\stcdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(STCDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\stcdll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -i..\..\src\stc\scintilla\include -i..\..\src\stc\scintilla\lexlib -i..\..\src\stc\scintilla\src -d__WX__ -dSCI_LEXER -dLINK_LEXERS -dWXUSINGDLL -dWXMAKINGDLL_STC ..\..\src\msw\version.rc + +$(OBJS)\stcdll_stc.obj: ..\..\src\stc\stc.cpp + $(CXX) -q -c -P -o$@ $(STCDLL_CXXFLAGS) ..\..\src\stc\stc.cpp + +$(OBJS)\stcdll_PlatWX.obj: ..\..\src\stc\PlatWX.cpp + $(CXX) -q -c -P -o$@ $(STCDLL_CXXFLAGS) ..\..\src\stc\PlatWX.cpp + +$(OBJS)\stcdll_ScintillaWX.obj: ..\..\src\stc\ScintillaWX.cpp + $(CXX) -q -c -P -o$@ $(STCDLL_CXXFLAGS) ..\..\src\stc\ScintillaWX.cpp + +$(OBJS)\stclib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(STCLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\stclib_stc.obj: ..\..\src\stc\stc.cpp + $(CXX) -q -c -P -o$@ $(STCLIB_CXXFLAGS) ..\..\src\stc\stc.cpp + +$(OBJS)\stclib_PlatWX.obj: ..\..\src\stc\PlatWX.cpp + $(CXX) -q -c -P -o$@ $(STCLIB_CXXFLAGS) ..\..\src\stc\PlatWX.cpp + +$(OBJS)\stclib_ScintillaWX.obj: ..\..\src\stc\ScintillaWX.cpp + $(CXX) -q -c -P -o$@ $(STCLIB_CXXFLAGS) ..\..\src\stc\ScintillaWX.cpp + +$(OBJS)\gldll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(GLDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\gldll_version.res: ..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) -i$(SETUPHDIR) -i..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL ..\..\src\msw\version.rc + +$(OBJS)\gldll_glcmn.obj: ..\..\src\common\glcmn.cpp + $(CXX) -q -c -P -o$@ $(GLDLL_CXXFLAGS) ..\..\src\common\glcmn.cpp + +$(OBJS)\gldll_glcanvas.obj: ..\..\src\msw\glcanvas.cpp + $(CXX) -q -c -P -o$@ $(GLDLL_CXXFLAGS) ..\..\src\msw\glcanvas.cpp + +$(OBJS)\gllib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) -q -c -P -o$@ $(GLLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp + +$(OBJS)\gllib_glcmn.obj: ..\..\src\common\glcmn.cpp + $(CXX) -q -c -P -o$@ $(GLLIB_CXXFLAGS) ..\..\src\common\glcmn.cpp + +$(OBJS)\gllib_glcanvas.obj: ..\..\src\msw\glcanvas.cpp + $(CXX) -q -c -P -o$@ $(GLLIB_CXXFLAGS) ..\..\src\msw\glcanvas.cpp + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.gcc b/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.gcc new file mode 100644 index 0000000000..79202fd5f7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.gcc @@ -0,0 +1,16319 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.2.9 (http://www.bakefile.org) +# Do not modify, all changes will be overwritten! +# ========================================================================= + +include config.gcc + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +### Variables: ### + +MAKEARGS = LINK_DLL_FLAGS="$(LINK_DLL_FLAGS)" \ + LINK_MODULE_FLAGS="$(LINK_MODULE_FLAGS)" CC="$(CC)" CXX="$(CXX)" \ + CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ + LDFLAGS="$(LDFLAGS)" CPP="$(CPP)" SHARED="$(SHARED)" \ + TOOLKIT_VERSION="$(TOOLKIT_VERSION)" WXUNIV="$(WXUNIV)" \ + UNICODE="$(UNICODE)" MSLU="$(MSLU)" BUILD="$(BUILD)" \ + DEBUG_INFO="$(DEBUG_INFO)" DEBUG_FLAG="$(DEBUG_FLAG)" \ + MONOLITHIC="$(MONOLITHIC)" USE_GUI="$(USE_GUI)" USE_HTML="$(USE_HTML)" \ + USE_WEBVIEW="$(USE_WEBVIEW)" USE_MEDIA="$(USE_MEDIA)" USE_XRC="$(USE_XRC)" \ + USE_AUI="$(USE_AUI)" USE_RIBBON="$(USE_RIBBON)" \ + USE_PROPGRID="$(USE_PROPGRID)" USE_RICHTEXT="$(USE_RICHTEXT)" \ + USE_STC="$(USE_STC)" USE_OPENGL="$(USE_OPENGL)" USE_QA="$(USE_QA)" \ + USE_EXCEPTIONS="$(USE_EXCEPTIONS)" USE_RTTI="$(USE_RTTI)" \ + USE_THREADS="$(USE_THREADS)" USE_CAIRO="$(USE_CAIRO)" \ + OFFICIAL_BUILD="$(OFFICIAL_BUILD)" VENDOR="$(VENDOR)" \ + WX_FLAVOUR="$(WX_FLAVOUR)" WX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" CFG="$(CFG)" \ + CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \ + RUNTIME_LIBS="$(RUNTIME_LIBS)" GCC_VERSION="$(GCC_VERSION)" \ + WINDRES="$(WINDRES)" +CPPDEPS = -MT$@ -MF$@.d -MD -MP +WX_RELEASE_NODOT = 30 +COMPILER_PREFIX = gcc +OBJS = \ + $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + ..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG) +SETUPHDIR = \ + $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) +WXREGEX_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -DNDEBUG -I..\..\include -I$(SETUPHDIR) -D__WXMSW__ \ + $(__WXUNIV_DEFINE_p) $(__UNICODE_DEFINE_p) $(CPPFLAGS) $(CFLAGS) +WXREGEX_OBJECTS = \ + $(OBJS)\wxregex_regcomp.o \ + $(OBJS)\wxregex_regexec.o \ + $(OBJS)\wxregex_regerror.o \ + $(OBJS)\wxregex_regfree.o +WXZLIB_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -DNDEBUG $(CPPFLAGS) $(CFLAGS) +WXZLIB_OBJECTS = \ + $(OBJS)\wxzlib_adler32.o \ + $(OBJS)\wxzlib_compress.o \ + $(OBJS)\wxzlib_crc32.o \ + $(OBJS)\wxzlib_deflate.o \ + $(OBJS)\wxzlib_gzclose.o \ + $(OBJS)\wxzlib_gzlib.o \ + $(OBJS)\wxzlib_gzread.o \ + $(OBJS)\wxzlib_gzwrite.o \ + $(OBJS)\wxzlib_infback.o \ + $(OBJS)\wxzlib_inffast.o \ + $(OBJS)\wxzlib_inflate.o \ + $(OBJS)\wxzlib_inftrees.o \ + $(OBJS)\wxzlib_trees.o \ + $(OBJS)\wxzlib_uncompr.o \ + $(OBJS)\wxzlib_zutil.o +WXPNG_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -DNDEBUG -I..\..\src\zlib $(CPPFLAGS) $(CFLAGS) +WXPNG_OBJECTS = \ + $(OBJS)\wxpng_png.o \ + $(OBJS)\wxpng_pngerror.o \ + $(OBJS)\wxpng_pngget.o \ + $(OBJS)\wxpng_pngmem.o \ + $(OBJS)\wxpng_pngpread.o \ + $(OBJS)\wxpng_pngread.o \ + $(OBJS)\wxpng_pngrio.o \ + $(OBJS)\wxpng_pngrtran.o \ + $(OBJS)\wxpng_pngrutil.o \ + $(OBJS)\wxpng_pngset.o \ + $(OBJS)\wxpng_pngtrans.o \ + $(OBJS)\wxpng_pngwio.o \ + $(OBJS)\wxpng_pngwrite.o \ + $(OBJS)\wxpng_pngwtran.o \ + $(OBJS)\wxpng_pngwutil.o +WXJPEG_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -DNDEBUG -I$(SETUPHDIR) $(CPPFLAGS) $(CFLAGS) +WXJPEG_OBJECTS = \ + $(OBJS)\wxjpeg_jcomapi.o \ + $(OBJS)\wxjpeg_jutils.o \ + $(OBJS)\wxjpeg_jerror.o \ + $(OBJS)\wxjpeg_jmemmgr.o \ + $(OBJS)\wxjpeg_jmemnobs.o \ + $(OBJS)\wxjpeg_jcapimin.o \ + $(OBJS)\wxjpeg_jcapistd.o \ + $(OBJS)\wxjpeg_jctrans.o \ + $(OBJS)\wxjpeg_jcparam.o \ + $(OBJS)\wxjpeg_jdatadst.o \ + $(OBJS)\wxjpeg_jcinit.o \ + $(OBJS)\wxjpeg_jcmaster.o \ + $(OBJS)\wxjpeg_jcmarker.o \ + $(OBJS)\wxjpeg_jcmainct.o \ + $(OBJS)\wxjpeg_jcprepct.o \ + $(OBJS)\wxjpeg_jccoefct.o \ + $(OBJS)\wxjpeg_jccolor.o \ + $(OBJS)\wxjpeg_jcsample.o \ + $(OBJS)\wxjpeg_jchuff.o \ + $(OBJS)\wxjpeg_jcphuff.o \ + $(OBJS)\wxjpeg_jcdctmgr.o \ + $(OBJS)\wxjpeg_jfdctfst.o \ + $(OBJS)\wxjpeg_jfdctflt.o \ + $(OBJS)\wxjpeg_jfdctint.o \ + $(OBJS)\wxjpeg_jdapimin.o \ + $(OBJS)\wxjpeg_jdapistd.o \ + $(OBJS)\wxjpeg_jdtrans.o \ + $(OBJS)\wxjpeg_jdatasrc.o \ + $(OBJS)\wxjpeg_jdmaster.o \ + $(OBJS)\wxjpeg_jdinput.o \ + $(OBJS)\wxjpeg_jdmarker.o \ + $(OBJS)\wxjpeg_jdhuff.o \ + $(OBJS)\wxjpeg_jdphuff.o \ + $(OBJS)\wxjpeg_jdmainct.o \ + $(OBJS)\wxjpeg_jdcoefct.o \ + $(OBJS)\wxjpeg_jdpostct.o \ + $(OBJS)\wxjpeg_jddctmgr.o \ + $(OBJS)\wxjpeg_jidctfst.o \ + $(OBJS)\wxjpeg_jidctflt.o \ + $(OBJS)\wxjpeg_jidctint.o \ + $(OBJS)\wxjpeg_jidctred.o \ + $(OBJS)\wxjpeg_jdsample.o \ + $(OBJS)\wxjpeg_jdcolor.o \ + $(OBJS)\wxjpeg_jquant1.o \ + $(OBJS)\wxjpeg_jquant2.o \ + $(OBJS)\wxjpeg_jdmerge.o +WXTIFF_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -DNDEBUG -I..\..\src\zlib -I..\..\src\jpeg \ + -I..\..\src\tiff\libtiff $(CPPFLAGS) $(CFLAGS) +WXTIFF_OBJECTS = \ + $(OBJS)\wxtiff_tif_win32.o \ + $(OBJS)\wxtiff_tif_aux.o \ + $(OBJS)\wxtiff_tif_close.o \ + $(OBJS)\wxtiff_tif_codec.o \ + $(OBJS)\wxtiff_tif_color.o \ + $(OBJS)\wxtiff_tif_compress.o \ + $(OBJS)\wxtiff_tif_dir.o \ + $(OBJS)\wxtiff_tif_dirinfo.o \ + $(OBJS)\wxtiff_tif_dirread.o \ + $(OBJS)\wxtiff_tif_dirwrite.o \ + $(OBJS)\wxtiff_tif_dumpmode.o \ + $(OBJS)\wxtiff_tif_error.o \ + $(OBJS)\wxtiff_tif_extension.o \ + $(OBJS)\wxtiff_tif_fax3.o \ + $(OBJS)\wxtiff_tif_fax3sm.o \ + $(OBJS)\wxtiff_tif_flush.o \ + $(OBJS)\wxtiff_tif_getimage.o \ + $(OBJS)\wxtiff_tif_jbig.o \ + $(OBJS)\wxtiff_tif_jpeg.o \ + $(OBJS)\wxtiff_tif_jpeg_12.o \ + $(OBJS)\wxtiff_tif_luv.o \ + $(OBJS)\wxtiff_tif_lzma.o \ + $(OBJS)\wxtiff_tif_lzw.o \ + $(OBJS)\wxtiff_tif_next.o \ + $(OBJS)\wxtiff_tif_ojpeg.o \ + $(OBJS)\wxtiff_tif_open.o \ + $(OBJS)\wxtiff_tif_packbits.o \ + $(OBJS)\wxtiff_tif_pixarlog.o \ + $(OBJS)\wxtiff_tif_predict.o \ + $(OBJS)\wxtiff_tif_print.o \ + $(OBJS)\wxtiff_tif_read.o \ + $(OBJS)\wxtiff_tif_strip.o \ + $(OBJS)\wxtiff_tif_swab.o \ + $(OBJS)\wxtiff_tif_thunder.o \ + $(OBJS)\wxtiff_tif_tile.o \ + $(OBJS)\wxtiff_tif_version.o \ + $(OBJS)\wxtiff_tif_warning.o \ + $(OBJS)\wxtiff_tif_write.o \ + $(OBJS)\wxtiff_tif_zip.o +WXEXPAT_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -DNDEBUG -I$(LIBDIRNAME) -DCOMPILED_FROM_DSP $(CPPFLAGS) \ + $(CFLAGS) +WXEXPAT_OBJECTS = \ + $(OBJS)\wxexpat_xmlparse.o \ + $(OBJS)\wxexpat_xmlrole.o \ + $(OBJS)\wxexpat_xmltok.o +WXSCINTILLA_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -DNDEBUG -I..\..\src\stc\scintilla\include \ + -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ \ + -DSCI_LEXER -DLINK_LEXERS -I$(SETUPHDIR) -I..\..\include \ + $(__wxscintilla_usingdll_p) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + $(CPPFLAGS) $(CXXFLAGS) +WXSCINTILLA_OBJECTS = \ + $(OBJS)\wxscintilla_LexA68k.o \ + $(OBJS)\wxscintilla_LexAbaqus.o \ + $(OBJS)\wxscintilla_LexAda.o \ + $(OBJS)\wxscintilla_LexAPDL.o \ + $(OBJS)\wxscintilla_LexAsm.o \ + $(OBJS)\wxscintilla_LexAsn1.o \ + $(OBJS)\wxscintilla_LexASY.o \ + $(OBJS)\wxscintilla_LexAU3.o \ + $(OBJS)\wxscintilla_LexAVE.o \ + $(OBJS)\wxscintilla_LexAVS.o \ + $(OBJS)\wxscintilla_LexBaan.o \ + $(OBJS)\wxscintilla_LexBash.o \ + $(OBJS)\wxscintilla_LexBasic.o \ + $(OBJS)\wxscintilla_LexBullant.o \ + $(OBJS)\wxscintilla_LexCaml.o \ + $(OBJS)\wxscintilla_LexCLW.o \ + $(OBJS)\wxscintilla_LexCmake.o \ + $(OBJS)\wxscintilla_LexCOBOL.o \ + $(OBJS)\wxscintilla_LexCoffeeScript.o \ + $(OBJS)\wxscintilla_LexConf.o \ + $(OBJS)\wxscintilla_LexCPP.o \ + $(OBJS)\wxscintilla_LexCrontab.o \ + $(OBJS)\wxscintilla_LexCsound.o \ + $(OBJS)\wxscintilla_LexCSS.o \ + $(OBJS)\wxscintilla_LexD.o \ + $(OBJS)\wxscintilla_LexECL.o \ + $(OBJS)\wxscintilla_LexEiffel.o \ + $(OBJS)\wxscintilla_LexErlang.o \ + $(OBJS)\wxscintilla_LexEScript.o \ + $(OBJS)\wxscintilla_LexFlagship.o \ + $(OBJS)\wxscintilla_LexForth.o \ + $(OBJS)\wxscintilla_LexFortran.o \ + $(OBJS)\wxscintilla_LexGAP.o \ + $(OBJS)\wxscintilla_LexGui4Cli.o \ + $(OBJS)\wxscintilla_LexHaskell.o \ + $(OBJS)\wxscintilla_LexHTML.o \ + $(OBJS)\wxscintilla_LexInno.o \ + $(OBJS)\wxscintilla_LexKix.o \ + $(OBJS)\wxscintilla_LexLisp.o \ + $(OBJS)\wxscintilla_LexLout.o \ + $(OBJS)\wxscintilla_LexLua.o \ + $(OBJS)\wxscintilla_LexMagik.o \ + $(OBJS)\wxscintilla_LexMarkdown.o \ + $(OBJS)\wxscintilla_LexMatlab.o \ + $(OBJS)\wxscintilla_LexMetapost.o \ + $(OBJS)\wxscintilla_LexMMIXAL.o \ + $(OBJS)\wxscintilla_LexModula.o \ + $(OBJS)\wxscintilla_LexMPT.o \ + $(OBJS)\wxscintilla_LexMSSQL.o \ + $(OBJS)\wxscintilla_LexMySQL.o \ + $(OBJS)\wxscintilla_LexNimrod.o \ + $(OBJS)\wxscintilla_LexNsis.o \ + $(OBJS)\wxscintilla_LexOpal.o \ + $(OBJS)\wxscintilla_LexOScript.o \ + $(OBJS)\wxscintilla_LexOthers.o \ + $(OBJS)\wxscintilla_LexPascal.o \ + $(OBJS)\wxscintilla_LexPB.o \ + $(OBJS)\wxscintilla_LexPerl.o \ + $(OBJS)\wxscintilla_LexPLM.o \ + $(OBJS)\wxscintilla_LexPOV.o \ + $(OBJS)\wxscintilla_LexPowerPro.o \ + $(OBJS)\wxscintilla_LexPowerShell.o \ + $(OBJS)\wxscintilla_LexProgress.o \ + $(OBJS)\wxscintilla_LexPS.o \ + $(OBJS)\wxscintilla_LexPython.o \ + $(OBJS)\wxscintilla_LexR.o \ + $(OBJS)\wxscintilla_LexRebol.o \ + $(OBJS)\wxscintilla_LexRuby.o \ + $(OBJS)\wxscintilla_LexScriptol.o \ + $(OBJS)\wxscintilla_LexSmalltalk.o \ + $(OBJS)\wxscintilla_LexSML.o \ + $(OBJS)\wxscintilla_LexSorcus.o \ + $(OBJS)\wxscintilla_LexSpecman.o \ + $(OBJS)\wxscintilla_LexSpice.o \ + $(OBJS)\wxscintilla_LexSQL.o \ + $(OBJS)\wxscintilla_LexTACL.o \ + $(OBJS)\wxscintilla_LexTADS3.o \ + $(OBJS)\wxscintilla_LexTAL.o \ + $(OBJS)\wxscintilla_LexTCL.o \ + $(OBJS)\wxscintilla_LexTCMD.o \ + $(OBJS)\wxscintilla_LexTeX.o \ + $(OBJS)\wxscintilla_LexTxt2tags.o \ + $(OBJS)\wxscintilla_LexVB.o \ + $(OBJS)\wxscintilla_LexVerilog.o \ + $(OBJS)\wxscintilla_LexVHDL.o \ + $(OBJS)\wxscintilla_LexVisualProlog.o \ + $(OBJS)\wxscintilla_LexYAML.o \ + $(OBJS)\wxscintilla_Accessor.o \ + $(OBJS)\wxscintilla_CharacterSet.o \ + $(OBJS)\wxscintilla_LexerBase.o \ + $(OBJS)\wxscintilla_LexerModule.o \ + $(OBJS)\wxscintilla_LexerNoExceptions.o \ + $(OBJS)\wxscintilla_LexerSimple.o \ + $(OBJS)\wxscintilla_PropSetSimple.o \ + $(OBJS)\wxscintilla_StyleContext.o \ + $(OBJS)\wxscintilla_WordList.o \ + $(OBJS)\wxscintilla_AutoComplete.o \ + $(OBJS)\wxscintilla_CallTip.o \ + $(OBJS)\wxscintilla_Catalogue.o \ + $(OBJS)\wxscintilla_CellBuffer.o \ + $(OBJS)\wxscintilla_CharClassify.o \ + $(OBJS)\wxscintilla_ContractionState.o \ + $(OBJS)\wxscintilla_Decoration.o \ + $(OBJS)\wxscintilla_Document.o \ + $(OBJS)\wxscintilla_Editor.o \ + $(OBJS)\wxscintilla_ExternalLexer.o \ + $(OBJS)\wxscintilla_Indicator.o \ + $(OBJS)\wxscintilla_KeyMap.o \ + $(OBJS)\wxscintilla_LineMarker.o \ + $(OBJS)\wxscintilla_PerLine.o \ + $(OBJS)\wxscintilla_PositionCache.o \ + $(OBJS)\wxscintilla_RESearch.o \ + $(OBJS)\wxscintilla_RunStyles.o \ + $(OBJS)\wxscintilla_ScintillaBase.o \ + $(OBJS)\wxscintilla_Selection.o \ + $(OBJS)\wxscintilla_Style.o \ + $(OBJS)\wxscintilla_UniConversion.o \ + $(OBJS)\wxscintilla_ViewStyle.o \ + $(OBJS)\wxscintilla_XPM.o +MONODLL_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib \ + -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib \ + -I..\..\src\stc\scintilla\src -D__WX__ -DSCI_LEXER -DLINK_LEXERS \ + -DwxUSE_BASE=1 -DWXMAKINGDLL $(CPPFLAGS) $(CFLAGS) +MONODLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -I..\..\src\stc\scintilla\include \ + -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ \ + -DSCI_LEXER -DLINK_LEXERS -DwxUSE_BASE=1 -DWXMAKINGDLL $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +MONODLL_OBJECTS = \ + $(OBJS)\monodll_dummy.o \ + $(OBJS)\monodll_any.o \ + $(OBJS)\monodll_appbase.o \ + $(OBJS)\monodll_arcall.o \ + $(OBJS)\monodll_arcfind.o \ + $(OBJS)\monodll_archive.o \ + $(OBJS)\monodll_arrstr.o \ + $(OBJS)\monodll_base64.o \ + $(OBJS)\monodll_clntdata.o \ + $(OBJS)\monodll_cmdline.o \ + $(OBJS)\monodll_config.o \ + $(OBJS)\monodll_convauto.o \ + $(OBJS)\monodll_datetime.o \ + $(OBJS)\monodll_datetimefmt.o \ + $(OBJS)\monodll_datstrm.o \ + $(OBJS)\monodll_dircmn.o \ + $(OBJS)\monodll_dynarray.o \ + $(OBJS)\monodll_dynlib.o \ + $(OBJS)\monodll_dynload.o \ + $(OBJS)\monodll_encconv.o \ + $(OBJS)\monodll_evtloopcmn.o \ + $(OBJS)\monodll_extended.o \ + $(OBJS)\monodll_ffile.o \ + $(OBJS)\monodll_file.o \ + $(OBJS)\monodll_fileback.o \ + $(OBJS)\monodll_fileconf.o \ + $(OBJS)\monodll_filefn.o \ + $(OBJS)\monodll_filename.o \ + $(OBJS)\monodll_filesys.o \ + $(OBJS)\monodll_filtall.o \ + $(OBJS)\monodll_filtfind.o \ + $(OBJS)\monodll_fmapbase.o \ + $(OBJS)\monodll_fs_arc.o \ + $(OBJS)\monodll_fs_filter.o \ + $(OBJS)\monodll_hash.o \ + $(OBJS)\monodll_hashmap.o \ + $(OBJS)\monodll_init.o \ + $(OBJS)\monodll_intl.o \ + $(OBJS)\monodll_ipcbase.o \ + $(OBJS)\monodll_languageinfo.o \ + $(OBJS)\monodll_list.o \ + $(OBJS)\monodll_log.o \ + $(OBJS)\monodll_longlong.o \ + $(OBJS)\monodll_memory.o \ + $(OBJS)\monodll_mimecmn.o \ + $(OBJS)\monodll_module.o \ + $(OBJS)\monodll_mstream.o \ + $(OBJS)\monodll_numformatter.o \ + $(OBJS)\monodll_object.o \ + $(OBJS)\monodll_platinfo.o \ + $(OBJS)\monodll_powercmn.o \ + $(OBJS)\monodll_process.o \ + $(OBJS)\monodll_regex.o \ + $(OBJS)\monodll_stdpbase.o \ + $(OBJS)\monodll_sstream.o \ + $(OBJS)\monodll_stdstream.o \ + $(OBJS)\monodll_stopwatch.o \ + $(OBJS)\monodll_strconv.o \ + $(OBJS)\monodll_stream.o \ + $(OBJS)\monodll_string.o \ + $(OBJS)\monodll_stringimpl.o \ + $(OBJS)\monodll_stringops.o \ + $(OBJS)\monodll_strvararg.o \ + $(OBJS)\monodll_sysopt.o \ + $(OBJS)\monodll_tarstrm.o \ + $(OBJS)\monodll_textbuf.o \ + $(OBJS)\monodll_textfile.o \ + $(OBJS)\monodll_threadinfo.o \ + $(OBJS)\monodll_time.o \ + $(OBJS)\monodll_timercmn.o \ + $(OBJS)\monodll_timerimpl.o \ + $(OBJS)\monodll_tokenzr.o \ + $(OBJS)\monodll_translation.o \ + $(OBJS)\monodll_txtstrm.o \ + $(OBJS)\monodll_unichar.o \ + $(OBJS)\monodll_uri.o \ + $(OBJS)\monodll_ustring.o \ + $(OBJS)\monodll_variant.o \ + $(OBJS)\monodll_wfstream.o \ + $(OBJS)\monodll_wxcrt.o \ + $(OBJS)\monodll_wxprintf.o \ + $(OBJS)\monodll_xlocale.o \ + $(OBJS)\monodll_xti.o \ + $(OBJS)\monodll_xtistrm.o \ + $(OBJS)\monodll_zipstrm.o \ + $(OBJS)\monodll_zstream.o \ + $(OBJS)\monodll_fswatchercmn.o \ + $(OBJS)\monodll_fswatcherg.o \ + $(OBJS)\monodll_basemsw.o \ + $(OBJS)\monodll_crashrpt.o \ + $(OBJS)\monodll_debughlp.o \ + $(OBJS)\monodll_dde.o \ + $(OBJS)\monodll_dir.o \ + $(OBJS)\monodll_dlmsw.o \ + $(OBJS)\monodll_evtloopconsole.o \ + $(OBJS)\monodll_mimetype.o \ + $(OBJS)\monodll_power.o \ + $(OBJS)\monodll_regconf.o \ + $(OBJS)\monodll_registry.o \ + $(OBJS)\monodll_snglinst.o \ + $(OBJS)\monodll_stackwalk.o \ + $(OBJS)\monodll_stdpaths.o \ + $(OBJS)\monodll_thread.o \ + $(OBJS)\monodll_timer.o \ + $(OBJS)\monodll_utils.o \ + $(OBJS)\monodll_utilsexc.o \ + $(OBJS)\monodll_fswatcher.o \ + $(OBJS)\monodll_event.o \ + $(OBJS)\monodll_fs_mem.o \ + $(OBJS)\monodll_msgout.o \ + $(OBJS)\monodll_utilscmn.o \ + $(OBJS)\monodll_main.o \ + $(OBJS)\monodll_mslu.o \ + $(OBJS)\monodll_volume.o \ + $(OBJS)\monodll_fs_inet.o \ + $(OBJS)\monodll_ftp.o \ + $(OBJS)\monodll_http.o \ + $(OBJS)\monodll_protocol.o \ + $(OBJS)\monodll_sckaddr.o \ + $(OBJS)\monodll_sckfile.o \ + $(OBJS)\monodll_sckipc.o \ + $(OBJS)\monodll_sckstrm.o \ + $(OBJS)\monodll_socket.o \ + $(OBJS)\monodll_url.o \ + $(OBJS)\monodll_sockmsw.o \ + $(OBJS)\monodll_urlmsw.o \ + $(____MONOLIB_GUI_SRC_FILENAMES_OBJECTS) \ + $(OBJS)\monodll_xml.o \ + $(OBJS)\monodll_xtixml.o \ + $(OBJS)\monodll_version_rc.o +MONOLIB_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib \ + -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib \ + -I..\..\src\stc\scintilla\src -D__WX__ -DSCI_LEXER -DLINK_LEXERS \ + -DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +MONOLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -I..\..\src\stc\scintilla\include \ + -I..\..\src\stc\scintilla\lexlib -I..\..\src\stc\scintilla\src -D__WX__ \ + -DSCI_LEXER -DLINK_LEXERS -DwxUSE_BASE=1 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +MONOLIB_OBJECTS = \ + $(OBJS)\monolib_dummy.o \ + $(OBJS)\monolib_any.o \ + $(OBJS)\monolib_appbase.o \ + $(OBJS)\monolib_arcall.o \ + $(OBJS)\monolib_arcfind.o \ + $(OBJS)\monolib_archive.o \ + $(OBJS)\monolib_arrstr.o \ + $(OBJS)\monolib_base64.o \ + $(OBJS)\monolib_clntdata.o \ + $(OBJS)\monolib_cmdline.o \ + $(OBJS)\monolib_config.o \ + $(OBJS)\monolib_convauto.o \ + $(OBJS)\monolib_datetime.o \ + $(OBJS)\monolib_datetimefmt.o \ + $(OBJS)\monolib_datstrm.o \ + $(OBJS)\monolib_dircmn.o \ + $(OBJS)\monolib_dynarray.o \ + $(OBJS)\monolib_dynlib.o \ + $(OBJS)\monolib_dynload.o \ + $(OBJS)\monolib_encconv.o \ + $(OBJS)\monolib_evtloopcmn.o \ + $(OBJS)\monolib_extended.o \ + $(OBJS)\monolib_ffile.o \ + $(OBJS)\monolib_file.o \ + $(OBJS)\monolib_fileback.o \ + $(OBJS)\monolib_fileconf.o \ + $(OBJS)\monolib_filefn.o \ + $(OBJS)\monolib_filename.o \ + $(OBJS)\monolib_filesys.o \ + $(OBJS)\monolib_filtall.o \ + $(OBJS)\monolib_filtfind.o \ + $(OBJS)\monolib_fmapbase.o \ + $(OBJS)\monolib_fs_arc.o \ + $(OBJS)\monolib_fs_filter.o \ + $(OBJS)\monolib_hash.o \ + $(OBJS)\monolib_hashmap.o \ + $(OBJS)\monolib_init.o \ + $(OBJS)\monolib_intl.o \ + $(OBJS)\monolib_ipcbase.o \ + $(OBJS)\monolib_languageinfo.o \ + $(OBJS)\monolib_list.o \ + $(OBJS)\monolib_log.o \ + $(OBJS)\monolib_longlong.o \ + $(OBJS)\monolib_memory.o \ + $(OBJS)\monolib_mimecmn.o \ + $(OBJS)\monolib_module.o \ + $(OBJS)\monolib_mstream.o \ + $(OBJS)\monolib_numformatter.o \ + $(OBJS)\monolib_object.o \ + $(OBJS)\monolib_platinfo.o \ + $(OBJS)\monolib_powercmn.o \ + $(OBJS)\monolib_process.o \ + $(OBJS)\monolib_regex.o \ + $(OBJS)\monolib_stdpbase.o \ + $(OBJS)\monolib_sstream.o \ + $(OBJS)\monolib_stdstream.o \ + $(OBJS)\monolib_stopwatch.o \ + $(OBJS)\monolib_strconv.o \ + $(OBJS)\monolib_stream.o \ + $(OBJS)\monolib_string.o \ + $(OBJS)\monolib_stringimpl.o \ + $(OBJS)\monolib_stringops.o \ + $(OBJS)\monolib_strvararg.o \ + $(OBJS)\monolib_sysopt.o \ + $(OBJS)\monolib_tarstrm.o \ + $(OBJS)\monolib_textbuf.o \ + $(OBJS)\monolib_textfile.o \ + $(OBJS)\monolib_threadinfo.o \ + $(OBJS)\monolib_time.o \ + $(OBJS)\monolib_timercmn.o \ + $(OBJS)\monolib_timerimpl.o \ + $(OBJS)\monolib_tokenzr.o \ + $(OBJS)\monolib_translation.o \ + $(OBJS)\monolib_txtstrm.o \ + $(OBJS)\monolib_unichar.o \ + $(OBJS)\monolib_uri.o \ + $(OBJS)\monolib_ustring.o \ + $(OBJS)\monolib_variant.o \ + $(OBJS)\monolib_wfstream.o \ + $(OBJS)\monolib_wxcrt.o \ + $(OBJS)\monolib_wxprintf.o \ + $(OBJS)\monolib_xlocale.o \ + $(OBJS)\monolib_xti.o \ + $(OBJS)\monolib_xtistrm.o \ + $(OBJS)\monolib_zipstrm.o \ + $(OBJS)\monolib_zstream.o \ + $(OBJS)\monolib_fswatchercmn.o \ + $(OBJS)\monolib_fswatcherg.o \ + $(OBJS)\monolib_basemsw.o \ + $(OBJS)\monolib_crashrpt.o \ + $(OBJS)\monolib_debughlp.o \ + $(OBJS)\monolib_dde.o \ + $(OBJS)\monolib_dir.o \ + $(OBJS)\monolib_dlmsw.o \ + $(OBJS)\monolib_evtloopconsole.o \ + $(OBJS)\monolib_mimetype.o \ + $(OBJS)\monolib_power.o \ + $(OBJS)\monolib_regconf.o \ + $(OBJS)\monolib_registry.o \ + $(OBJS)\monolib_snglinst.o \ + $(OBJS)\monolib_stackwalk.o \ + $(OBJS)\monolib_stdpaths.o \ + $(OBJS)\monolib_thread.o \ + $(OBJS)\monolib_timer.o \ + $(OBJS)\monolib_utils.o \ + $(OBJS)\monolib_utilsexc.o \ + $(OBJS)\monolib_fswatcher.o \ + $(OBJS)\monolib_event.o \ + $(OBJS)\monolib_fs_mem.o \ + $(OBJS)\monolib_msgout.o \ + $(OBJS)\monolib_utilscmn.o \ + $(OBJS)\monolib_main.o \ + $(OBJS)\monolib_mslu.o \ + $(OBJS)\monolib_volume.o \ + $(OBJS)\monolib_fs_inet.o \ + $(OBJS)\monolib_ftp.o \ + $(OBJS)\monolib_http.o \ + $(OBJS)\monolib_protocol.o \ + $(OBJS)\monolib_sckaddr.o \ + $(OBJS)\monolib_sckfile.o \ + $(OBJS)\monolib_sckipc.o \ + $(OBJS)\monolib_sckstrm.o \ + $(OBJS)\monolib_socket.o \ + $(OBJS)\monolib_url.o \ + $(OBJS)\monolib_sockmsw.o \ + $(OBJS)\monolib_urlmsw.o \ + $(____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS) \ + $(OBJS)\monolib_xml.o \ + $(OBJS)\monolib_xtixml.o +BASEDLL_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DwxUSE_GUI=0 \ + -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +BASEDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE \ + -DwxUSE_BASE=1 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy \ + $(CPPFLAGS) $(CXXFLAGS) +BASEDLL_OBJECTS = \ + $(OBJS)\basedll_dummy.o \ + $(OBJS)\basedll_version_rc.o \ + $(OBJS)\basedll_any.o \ + $(OBJS)\basedll_appbase.o \ + $(OBJS)\basedll_arcall.o \ + $(OBJS)\basedll_arcfind.o \ + $(OBJS)\basedll_archive.o \ + $(OBJS)\basedll_arrstr.o \ + $(OBJS)\basedll_base64.o \ + $(OBJS)\basedll_clntdata.o \ + $(OBJS)\basedll_cmdline.o \ + $(OBJS)\basedll_config.o \ + $(OBJS)\basedll_convauto.o \ + $(OBJS)\basedll_datetime.o \ + $(OBJS)\basedll_datetimefmt.o \ + $(OBJS)\basedll_datstrm.o \ + $(OBJS)\basedll_dircmn.o \ + $(OBJS)\basedll_dynarray.o \ + $(OBJS)\basedll_dynlib.o \ + $(OBJS)\basedll_dynload.o \ + $(OBJS)\basedll_encconv.o \ + $(OBJS)\basedll_evtloopcmn.o \ + $(OBJS)\basedll_extended.o \ + $(OBJS)\basedll_ffile.o \ + $(OBJS)\basedll_file.o \ + $(OBJS)\basedll_fileback.o \ + $(OBJS)\basedll_fileconf.o \ + $(OBJS)\basedll_filefn.o \ + $(OBJS)\basedll_filename.o \ + $(OBJS)\basedll_filesys.o \ + $(OBJS)\basedll_filtall.o \ + $(OBJS)\basedll_filtfind.o \ + $(OBJS)\basedll_fmapbase.o \ + $(OBJS)\basedll_fs_arc.o \ + $(OBJS)\basedll_fs_filter.o \ + $(OBJS)\basedll_hash.o \ + $(OBJS)\basedll_hashmap.o \ + $(OBJS)\basedll_init.o \ + $(OBJS)\basedll_intl.o \ + $(OBJS)\basedll_ipcbase.o \ + $(OBJS)\basedll_languageinfo.o \ + $(OBJS)\basedll_list.o \ + $(OBJS)\basedll_log.o \ + $(OBJS)\basedll_longlong.o \ + $(OBJS)\basedll_memory.o \ + $(OBJS)\basedll_mimecmn.o \ + $(OBJS)\basedll_module.o \ + $(OBJS)\basedll_mstream.o \ + $(OBJS)\basedll_numformatter.o \ + $(OBJS)\basedll_object.o \ + $(OBJS)\basedll_platinfo.o \ + $(OBJS)\basedll_powercmn.o \ + $(OBJS)\basedll_process.o \ + $(OBJS)\basedll_regex.o \ + $(OBJS)\basedll_stdpbase.o \ + $(OBJS)\basedll_sstream.o \ + $(OBJS)\basedll_stdstream.o \ + $(OBJS)\basedll_stopwatch.o \ + $(OBJS)\basedll_strconv.o \ + $(OBJS)\basedll_stream.o \ + $(OBJS)\basedll_string.o \ + $(OBJS)\basedll_stringimpl.o \ + $(OBJS)\basedll_stringops.o \ + $(OBJS)\basedll_strvararg.o \ + $(OBJS)\basedll_sysopt.o \ + $(OBJS)\basedll_tarstrm.o \ + $(OBJS)\basedll_textbuf.o \ + $(OBJS)\basedll_textfile.o \ + $(OBJS)\basedll_threadinfo.o \ + $(OBJS)\basedll_time.o \ + $(OBJS)\basedll_timercmn.o \ + $(OBJS)\basedll_timerimpl.o \ + $(OBJS)\basedll_tokenzr.o \ + $(OBJS)\basedll_translation.o \ + $(OBJS)\basedll_txtstrm.o \ + $(OBJS)\basedll_unichar.o \ + $(OBJS)\basedll_uri.o \ + $(OBJS)\basedll_ustring.o \ + $(OBJS)\basedll_variant.o \ + $(OBJS)\basedll_wfstream.o \ + $(OBJS)\basedll_wxcrt.o \ + $(OBJS)\basedll_wxprintf.o \ + $(OBJS)\basedll_xlocale.o \ + $(OBJS)\basedll_xti.o \ + $(OBJS)\basedll_xtistrm.o \ + $(OBJS)\basedll_zipstrm.o \ + $(OBJS)\basedll_zstream.o \ + $(OBJS)\basedll_fswatchercmn.o \ + $(OBJS)\basedll_fswatcherg.o \ + $(OBJS)\basedll_basemsw.o \ + $(OBJS)\basedll_crashrpt.o \ + $(OBJS)\basedll_debughlp.o \ + $(OBJS)\basedll_dde.o \ + $(OBJS)\basedll_dir.o \ + $(OBJS)\basedll_dlmsw.o \ + $(OBJS)\basedll_evtloopconsole.o \ + $(OBJS)\basedll_mimetype.o \ + $(OBJS)\basedll_power.o \ + $(OBJS)\basedll_regconf.o \ + $(OBJS)\basedll_registry.o \ + $(OBJS)\basedll_snglinst.o \ + $(OBJS)\basedll_stackwalk.o \ + $(OBJS)\basedll_stdpaths.o \ + $(OBJS)\basedll_thread.o \ + $(OBJS)\basedll_timer.o \ + $(OBJS)\basedll_utils.o \ + $(OBJS)\basedll_utilsexc.o \ + $(OBJS)\basedll_fswatcher.o \ + $(OBJS)\basedll_event.o \ + $(OBJS)\basedll_fs_mem.o \ + $(OBJS)\basedll_msgout.o \ + $(OBJS)\basedll_utilscmn.o \ + $(OBJS)\basedll_main.o \ + $(OBJS)\basedll_mslu.o \ + $(OBJS)\basedll_volume.o +BASELIB_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DwxUSE_GUI=0 \ + -DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +BASELIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -DwxUSE_GUI=0 -DwxUSE_BASE=1 \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) +BASELIB_OBJECTS = \ + $(OBJS)\baselib_dummy.o \ + $(OBJS)\baselib_any.o \ + $(OBJS)\baselib_appbase.o \ + $(OBJS)\baselib_arcall.o \ + $(OBJS)\baselib_arcfind.o \ + $(OBJS)\baselib_archive.o \ + $(OBJS)\baselib_arrstr.o \ + $(OBJS)\baselib_base64.o \ + $(OBJS)\baselib_clntdata.o \ + $(OBJS)\baselib_cmdline.o \ + $(OBJS)\baselib_config.o \ + $(OBJS)\baselib_convauto.o \ + $(OBJS)\baselib_datetime.o \ + $(OBJS)\baselib_datetimefmt.o \ + $(OBJS)\baselib_datstrm.o \ + $(OBJS)\baselib_dircmn.o \ + $(OBJS)\baselib_dynarray.o \ + $(OBJS)\baselib_dynlib.o \ + $(OBJS)\baselib_dynload.o \ + $(OBJS)\baselib_encconv.o \ + $(OBJS)\baselib_evtloopcmn.o \ + $(OBJS)\baselib_extended.o \ + $(OBJS)\baselib_ffile.o \ + $(OBJS)\baselib_file.o \ + $(OBJS)\baselib_fileback.o \ + $(OBJS)\baselib_fileconf.o \ + $(OBJS)\baselib_filefn.o \ + $(OBJS)\baselib_filename.o \ + $(OBJS)\baselib_filesys.o \ + $(OBJS)\baselib_filtall.o \ + $(OBJS)\baselib_filtfind.o \ + $(OBJS)\baselib_fmapbase.o \ + $(OBJS)\baselib_fs_arc.o \ + $(OBJS)\baselib_fs_filter.o \ + $(OBJS)\baselib_hash.o \ + $(OBJS)\baselib_hashmap.o \ + $(OBJS)\baselib_init.o \ + $(OBJS)\baselib_intl.o \ + $(OBJS)\baselib_ipcbase.o \ + $(OBJS)\baselib_languageinfo.o \ + $(OBJS)\baselib_list.o \ + $(OBJS)\baselib_log.o \ + $(OBJS)\baselib_longlong.o \ + $(OBJS)\baselib_memory.o \ + $(OBJS)\baselib_mimecmn.o \ + $(OBJS)\baselib_module.o \ + $(OBJS)\baselib_mstream.o \ + $(OBJS)\baselib_numformatter.o \ + $(OBJS)\baselib_object.o \ + $(OBJS)\baselib_platinfo.o \ + $(OBJS)\baselib_powercmn.o \ + $(OBJS)\baselib_process.o \ + $(OBJS)\baselib_regex.o \ + $(OBJS)\baselib_stdpbase.o \ + $(OBJS)\baselib_sstream.o \ + $(OBJS)\baselib_stdstream.o \ + $(OBJS)\baselib_stopwatch.o \ + $(OBJS)\baselib_strconv.o \ + $(OBJS)\baselib_stream.o \ + $(OBJS)\baselib_string.o \ + $(OBJS)\baselib_stringimpl.o \ + $(OBJS)\baselib_stringops.o \ + $(OBJS)\baselib_strvararg.o \ + $(OBJS)\baselib_sysopt.o \ + $(OBJS)\baselib_tarstrm.o \ + $(OBJS)\baselib_textbuf.o \ + $(OBJS)\baselib_textfile.o \ + $(OBJS)\baselib_threadinfo.o \ + $(OBJS)\baselib_time.o \ + $(OBJS)\baselib_timercmn.o \ + $(OBJS)\baselib_timerimpl.o \ + $(OBJS)\baselib_tokenzr.o \ + $(OBJS)\baselib_translation.o \ + $(OBJS)\baselib_txtstrm.o \ + $(OBJS)\baselib_unichar.o \ + $(OBJS)\baselib_uri.o \ + $(OBJS)\baselib_ustring.o \ + $(OBJS)\baselib_variant.o \ + $(OBJS)\baselib_wfstream.o \ + $(OBJS)\baselib_wxcrt.o \ + $(OBJS)\baselib_wxprintf.o \ + $(OBJS)\baselib_xlocale.o \ + $(OBJS)\baselib_xti.o \ + $(OBJS)\baselib_xtistrm.o \ + $(OBJS)\baselib_zipstrm.o \ + $(OBJS)\baselib_zstream.o \ + $(OBJS)\baselib_fswatchercmn.o \ + $(OBJS)\baselib_fswatcherg.o \ + $(OBJS)\baselib_basemsw.o \ + $(OBJS)\baselib_crashrpt.o \ + $(OBJS)\baselib_debughlp.o \ + $(OBJS)\baselib_dde.o \ + $(OBJS)\baselib_dir.o \ + $(OBJS)\baselib_dlmsw.o \ + $(OBJS)\baselib_evtloopconsole.o \ + $(OBJS)\baselib_mimetype.o \ + $(OBJS)\baselib_power.o \ + $(OBJS)\baselib_regconf.o \ + $(OBJS)\baselib_registry.o \ + $(OBJS)\baselib_snglinst.o \ + $(OBJS)\baselib_stackwalk.o \ + $(OBJS)\baselib_stdpaths.o \ + $(OBJS)\baselib_thread.o \ + $(OBJS)\baselib_timer.o \ + $(OBJS)\baselib_utils.o \ + $(OBJS)\baselib_utilsexc.o \ + $(OBJS)\baselib_fswatcher.o \ + $(OBJS)\baselib_event.o \ + $(OBJS)\baselib_fs_mem.o \ + $(OBJS)\baselib_msgout.o \ + $(OBJS)\baselib_utilscmn.o \ + $(OBJS)\baselib_main.o \ + $(OBJS)\baselib_mslu.o \ + $(OBJS)\baselib_volume.o +NETDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DwxUSE_GUI=0 \ + -DWXUSINGDLL -DWXMAKINGDLL_NET $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +NETDLL_OBJECTS = \ + $(OBJS)\netdll_dummy.o \ + $(OBJS)\netdll_version_rc.o \ + $(OBJS)\netdll_fs_inet.o \ + $(OBJS)\netdll_ftp.o \ + $(OBJS)\netdll_http.o \ + $(OBJS)\netdll_protocol.o \ + $(OBJS)\netdll_sckaddr.o \ + $(OBJS)\netdll_sckfile.o \ + $(OBJS)\netdll_sckipc.o \ + $(OBJS)\netdll_sckstrm.o \ + $(OBJS)\netdll_socket.o \ + $(OBJS)\netdll_url.o \ + $(OBJS)\netdll_sockmsw.o \ + $(OBJS)\netdll_urlmsw.o +NETLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DwxUSE_GUI=0 \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) +NETLIB_OBJECTS = \ + $(OBJS)\netlib_dummy.o \ + $(OBJS)\netlib_fs_inet.o \ + $(OBJS)\netlib_ftp.o \ + $(OBJS)\netlib_http.o \ + $(OBJS)\netlib_protocol.o \ + $(OBJS)\netlib_sckaddr.o \ + $(OBJS)\netlib_sckfile.o \ + $(OBJS)\netlib_sckipc.o \ + $(OBJS)\netlib_sckstrm.o \ + $(OBJS)\netlib_socket.o \ + $(OBJS)\netlib_url.o \ + $(OBJS)\netlib_sockmsw.o \ + $(OBJS)\netlib_urlmsw.o +COREDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_CORE \ + -DwxUSE_BASE=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy \ + $(CPPFLAGS) $(CXXFLAGS) +COREDLL_OBJECTS = \ + $(OBJS)\coredll_dummy.o \ + $(OBJS)\coredll_version_rc.o \ + $(OBJS)\coredll_event.o \ + $(OBJS)\coredll_fs_mem.o \ + $(OBJS)\coredll_msgout.o \ + $(OBJS)\coredll_utilscmn.o \ + $(OBJS)\coredll_main.o \ + $(OBJS)\coredll_mslu.o \ + $(OBJS)\coredll_volume.o \ + $(____CORE_SRC_FILENAMES_2_OBJECTS) +CORELIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -DwxUSE_BASE=0 $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +CORELIB_OBJECTS = \ + $(OBJS)\corelib_dummy.o \ + $(OBJS)\corelib_event.o \ + $(OBJS)\corelib_fs_mem.o \ + $(OBJS)\corelib_msgout.o \ + $(OBJS)\corelib_utilscmn.o \ + $(OBJS)\corelib_main.o \ + $(OBJS)\corelib_mslu.o \ + $(OBJS)\corelib_volume.o \ + $(____CORE_SRC_FILENAMES_3_OBJECTS) +ADVDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL \ + -DWXMAKINGDLL_ADV $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy \ + $(CPPFLAGS) $(CXXFLAGS) +ADVDLL_OBJECTS = \ + $(OBJS)\advdll_dummy.o \ + $(OBJS)\advdll_version_rc.o \ + $(____ADVANCED_SRC_FILENAMES_2_OBJECTS) +ADVLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +ADVLIB_OBJECTS = \ + $(OBJS)\advlib_dummy.o \ + $(____ADVANCED_SRC_FILENAMES_3_OBJECTS) +MEDIADLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_MEDIA \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) +MEDIADLL_OBJECTS = \ + $(OBJS)\mediadll_dummy.o \ + $(OBJS)\mediadll_version_rc.o \ + $(OBJS)\mediadll_mediactrlcmn.o \ + $(OBJS)\mediadll_mediactrl_am.o \ + $(OBJS)\mediadll_mediactrl_wmp10.o \ + $(OBJS)\mediadll_mediactrl_qt.o +MEDIALIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +MEDIALIB_OBJECTS = \ + $(OBJS)\medialib_dummy.o \ + $(OBJS)\medialib_mediactrlcmn.o \ + $(OBJS)\medialib_mediactrl_am.o \ + $(OBJS)\medialib_mediactrl_wmp10.o \ + $(OBJS)\medialib_mediactrl_qt.o +HTMLDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_HTML \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) +HTMLDLL_OBJECTS = \ + $(OBJS)\htmldll_dummy.o \ + $(OBJS)\htmldll_version_rc.o \ + $(OBJS)\htmldll_helpbest.o \ + $(OBJS)\htmldll_helpctrl.o \ + $(OBJS)\htmldll_helpdata.o \ + $(OBJS)\htmldll_helpdlg.o \ + $(OBJS)\htmldll_helpfrm.o \ + $(OBJS)\htmldll_helpwnd.o \ + $(OBJS)\htmldll_htmlcell.o \ + $(OBJS)\htmldll_htmlfilt.o \ + $(OBJS)\htmldll_htmlpars.o \ + $(OBJS)\htmldll_htmltag.o \ + $(OBJS)\htmldll_htmlwin.o \ + $(OBJS)\htmldll_htmprint.o \ + $(OBJS)\htmldll_m_dflist.o \ + $(OBJS)\htmldll_m_fonts.o \ + $(OBJS)\htmldll_m_hline.o \ + $(OBJS)\htmldll_m_image.o \ + $(OBJS)\htmldll_m_layout.o \ + $(OBJS)\htmldll_m_links.o \ + $(OBJS)\htmldll_m_list.o \ + $(OBJS)\htmldll_m_pre.o \ + $(OBJS)\htmldll_m_span.o \ + $(OBJS)\htmldll_m_style.o \ + $(OBJS)\htmldll_m_tables.o \ + $(OBJS)\htmldll_styleparams.o \ + $(OBJS)\htmldll_winpars.o \ + $(OBJS)\htmldll_htmllbox.o +HTMLLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +HTMLLIB_OBJECTS = \ + $(OBJS)\htmllib_dummy.o \ + $(OBJS)\htmllib_helpbest.o \ + $(OBJS)\htmllib_helpctrl.o \ + $(OBJS)\htmllib_helpdata.o \ + $(OBJS)\htmllib_helpdlg.o \ + $(OBJS)\htmllib_helpfrm.o \ + $(OBJS)\htmllib_helpwnd.o \ + $(OBJS)\htmllib_htmlcell.o \ + $(OBJS)\htmllib_htmlfilt.o \ + $(OBJS)\htmllib_htmlpars.o \ + $(OBJS)\htmllib_htmltag.o \ + $(OBJS)\htmllib_htmlwin.o \ + $(OBJS)\htmllib_htmprint.o \ + $(OBJS)\htmllib_m_dflist.o \ + $(OBJS)\htmllib_m_fonts.o \ + $(OBJS)\htmllib_m_hline.o \ + $(OBJS)\htmllib_m_image.o \ + $(OBJS)\htmllib_m_layout.o \ + $(OBJS)\htmllib_m_links.o \ + $(OBJS)\htmllib_m_list.o \ + $(OBJS)\htmllib_m_pre.o \ + $(OBJS)\htmllib_m_span.o \ + $(OBJS)\htmllib_m_style.o \ + $(OBJS)\htmllib_m_tables.o \ + $(OBJS)\htmllib_styleparams.o \ + $(OBJS)\htmllib_winpars.o \ + $(OBJS)\htmllib_htmllbox.o +WEBVIEWDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_WEBVIEW \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) +WEBVIEWDLL_OBJECTS = \ + $(OBJS)\webviewdll_dummy.o \ + $(OBJS)\webviewdll_version_rc.o \ + $(OBJS)\webviewdll_webview_ie.o \ + $(OBJS)\webviewdll_webview.o \ + $(OBJS)\webviewdll_webviewarchivehandler.o \ + $(OBJS)\webviewdll_webviewfshandler.o +WEBVIEWLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +WEBVIEWLIB_OBJECTS = \ + $(OBJS)\webviewlib_dummy.o \ + $(OBJS)\webviewlib_webview_ie.o \ + $(OBJS)\webviewlib_webview.o \ + $(OBJS)\webviewlib_webviewarchivehandler.o \ + $(OBJS)\webviewlib_webviewfshandler.o +QADLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL \ + -DWXMAKINGDLL_QA $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy \ + $(CPPFLAGS) $(CXXFLAGS) +QADLL_OBJECTS = \ + $(OBJS)\qadll_dummy.o \ + $(OBJS)\qadll_version_rc.o \ + $(OBJS)\qadll_debugrpt.o \ + $(OBJS)\qadll_dbgrptg.o +QALIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +QALIB_OBJECTS = \ + $(OBJS)\qalib_dummy.o \ + $(OBJS)\qalib_debugrpt.o \ + $(OBJS)\qalib_dbgrptg.o +XMLDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DwxUSE_GUI=0 \ + -DWXUSINGDLL -DWXMAKINGDLL_XML $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +XMLDLL_OBJECTS = \ + $(OBJS)\xmldll_dummy.o \ + $(OBJS)\xmldll_version_rc.o \ + $(OBJS)\xmldll_xml.o \ + $(OBJS)\xmldll_xtixml.o +XMLLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DwxUSE_GUI=0 \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) +XMLLIB_OBJECTS = \ + $(OBJS)\xmllib_dummy.o \ + $(OBJS)\xmllib_xml.o \ + $(OBJS)\xmllib_xtixml.o +XRCDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL \ + -DWXMAKINGDLL_XRC $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy \ + $(CPPFLAGS) $(CXXFLAGS) +XRCDLL_OBJECTS = \ + $(OBJS)\xrcdll_dummy.o \ + $(OBJS)\xrcdll_version_rc.o \ + $(OBJS)\xrcdll_xh_animatctrl.o \ + $(OBJS)\xrcdll_xh_bannerwindow.o \ + $(OBJS)\xrcdll_xh_bmp.o \ + $(OBJS)\xrcdll_xh_bmpcbox.o \ + $(OBJS)\xrcdll_xh_bmpbt.o \ + $(OBJS)\xrcdll_xh_bttn.o \ + $(OBJS)\xrcdll_xh_cald.o \ + $(OBJS)\xrcdll_xh_chckb.o \ + $(OBJS)\xrcdll_xh_chckl.o \ + $(OBJS)\xrcdll_xh_choic.o \ + $(OBJS)\xrcdll_xh_choicbk.o \ + $(OBJS)\xrcdll_xh_clrpicker.o \ + $(OBJS)\xrcdll_xh_cmdlinkbn.o \ + $(OBJS)\xrcdll_xh_collpane.o \ + $(OBJS)\xrcdll_xh_combo.o \ + $(OBJS)\xrcdll_xh_comboctrl.o \ + $(OBJS)\xrcdll_xh_datectrl.o \ + $(OBJS)\xrcdll_xh_dirpicker.o \ + $(OBJS)\xrcdll_xh_dlg.o \ + $(OBJS)\xrcdll_xh_editlbox.o \ + $(OBJS)\xrcdll_xh_filectrl.o \ + $(OBJS)\xrcdll_xh_filepicker.o \ + $(OBJS)\xrcdll_xh_fontpicker.o \ + $(OBJS)\xrcdll_xh_frame.o \ + $(OBJS)\xrcdll_xh_gauge.o \ + $(OBJS)\xrcdll_xh_gdctl.o \ + $(OBJS)\xrcdll_xh_grid.o \ + $(OBJS)\xrcdll_xh_html.o \ + $(OBJS)\xrcdll_xh_hyperlink.o \ + $(OBJS)\xrcdll_xh_listb.o \ + $(OBJS)\xrcdll_xh_listbk.o \ + $(OBJS)\xrcdll_xh_listc.o \ + $(OBJS)\xrcdll_xh_mdi.o \ + $(OBJS)\xrcdll_xh_menu.o \ + $(OBJS)\xrcdll_xh_notbk.o \ + $(OBJS)\xrcdll_xh_odcombo.o \ + $(OBJS)\xrcdll_xh_panel.o \ + $(OBJS)\xrcdll_xh_propdlg.o \ + $(OBJS)\xrcdll_xh_radbt.o \ + $(OBJS)\xrcdll_xh_radbx.o \ + $(OBJS)\xrcdll_xh_scrol.o \ + $(OBJS)\xrcdll_xh_scwin.o \ + $(OBJS)\xrcdll_xh_htmllbox.o \ + $(OBJS)\xrcdll_xh_sizer.o \ + $(OBJS)\xrcdll_xh_slidr.o \ + $(OBJS)\xrcdll_xh_spin.o \ + $(OBJS)\xrcdll_xh_split.o \ + $(OBJS)\xrcdll_xh_srchctrl.o \ + $(OBJS)\xrcdll_xh_statbar.o \ + $(OBJS)\xrcdll_xh_stbmp.o \ + $(OBJS)\xrcdll_xh_stbox.o \ + $(OBJS)\xrcdll_xh_stlin.o \ + $(OBJS)\xrcdll_xh_sttxt.o \ + $(OBJS)\xrcdll_xh_text.o \ + $(OBJS)\xrcdll_xh_tglbtn.o \ + $(OBJS)\xrcdll_xh_timectrl.o \ + $(OBJS)\xrcdll_xh_toolb.o \ + $(OBJS)\xrcdll_xh_toolbk.o \ + $(OBJS)\xrcdll_xh_tree.o \ + $(OBJS)\xrcdll_xh_treebk.o \ + $(OBJS)\xrcdll_xh_unkwn.o \ + $(OBJS)\xrcdll_xh_wizrd.o \ + $(OBJS)\xrcdll_xmlres.o \ + $(OBJS)\xrcdll_xmladv.o \ + $(OBJS)\xrcdll_xmlrsall.o +XRCLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +XRCLIB_OBJECTS = \ + $(OBJS)\xrclib_dummy.o \ + $(OBJS)\xrclib_xh_animatctrl.o \ + $(OBJS)\xrclib_xh_bannerwindow.o \ + $(OBJS)\xrclib_xh_bmp.o \ + $(OBJS)\xrclib_xh_bmpcbox.o \ + $(OBJS)\xrclib_xh_bmpbt.o \ + $(OBJS)\xrclib_xh_bttn.o \ + $(OBJS)\xrclib_xh_cald.o \ + $(OBJS)\xrclib_xh_chckb.o \ + $(OBJS)\xrclib_xh_chckl.o \ + $(OBJS)\xrclib_xh_choic.o \ + $(OBJS)\xrclib_xh_choicbk.o \ + $(OBJS)\xrclib_xh_clrpicker.o \ + $(OBJS)\xrclib_xh_cmdlinkbn.o \ + $(OBJS)\xrclib_xh_collpane.o \ + $(OBJS)\xrclib_xh_combo.o \ + $(OBJS)\xrclib_xh_comboctrl.o \ + $(OBJS)\xrclib_xh_datectrl.o \ + $(OBJS)\xrclib_xh_dirpicker.o \ + $(OBJS)\xrclib_xh_dlg.o \ + $(OBJS)\xrclib_xh_editlbox.o \ + $(OBJS)\xrclib_xh_filectrl.o \ + $(OBJS)\xrclib_xh_filepicker.o \ + $(OBJS)\xrclib_xh_fontpicker.o \ + $(OBJS)\xrclib_xh_frame.o \ + $(OBJS)\xrclib_xh_gauge.o \ + $(OBJS)\xrclib_xh_gdctl.o \ + $(OBJS)\xrclib_xh_grid.o \ + $(OBJS)\xrclib_xh_html.o \ + $(OBJS)\xrclib_xh_hyperlink.o \ + $(OBJS)\xrclib_xh_listb.o \ + $(OBJS)\xrclib_xh_listbk.o \ + $(OBJS)\xrclib_xh_listc.o \ + $(OBJS)\xrclib_xh_mdi.o \ + $(OBJS)\xrclib_xh_menu.o \ + $(OBJS)\xrclib_xh_notbk.o \ + $(OBJS)\xrclib_xh_odcombo.o \ + $(OBJS)\xrclib_xh_panel.o \ + $(OBJS)\xrclib_xh_propdlg.o \ + $(OBJS)\xrclib_xh_radbt.o \ + $(OBJS)\xrclib_xh_radbx.o \ + $(OBJS)\xrclib_xh_scrol.o \ + $(OBJS)\xrclib_xh_scwin.o \ + $(OBJS)\xrclib_xh_htmllbox.o \ + $(OBJS)\xrclib_xh_sizer.o \ + $(OBJS)\xrclib_xh_slidr.o \ + $(OBJS)\xrclib_xh_spin.o \ + $(OBJS)\xrclib_xh_split.o \ + $(OBJS)\xrclib_xh_srchctrl.o \ + $(OBJS)\xrclib_xh_statbar.o \ + $(OBJS)\xrclib_xh_stbmp.o \ + $(OBJS)\xrclib_xh_stbox.o \ + $(OBJS)\xrclib_xh_stlin.o \ + $(OBJS)\xrclib_xh_sttxt.o \ + $(OBJS)\xrclib_xh_text.o \ + $(OBJS)\xrclib_xh_tglbtn.o \ + $(OBJS)\xrclib_xh_timectrl.o \ + $(OBJS)\xrclib_xh_toolb.o \ + $(OBJS)\xrclib_xh_toolbk.o \ + $(OBJS)\xrclib_xh_tree.o \ + $(OBJS)\xrclib_xh_treebk.o \ + $(OBJS)\xrclib_xh_unkwn.o \ + $(OBJS)\xrclib_xh_wizrd.o \ + $(OBJS)\xrclib_xmlres.o \ + $(OBJS)\xrclib_xmladv.o \ + $(OBJS)\xrclib_xmlrsall.o +AUIDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL \ + -DWXMAKINGDLL_AUI $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy \ + $(CPPFLAGS) $(CXXFLAGS) +AUIDLL_OBJECTS = \ + $(OBJS)\auidll_dummy.o \ + $(OBJS)\auidll_version_rc.o \ + $(OBJS)\auidll_framemanager.o \ + $(OBJS)\auidll_dockart.o \ + $(OBJS)\auidll_floatpane.o \ + $(OBJS)\auidll_auibook.o \ + $(OBJS)\auidll_auibar.o \ + $(OBJS)\auidll_tabmdi.o \ + $(OBJS)\auidll_tabart.o \ + $(OBJS)\auidll_xh_auinotbk.o +AUILIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +AUILIB_OBJECTS = \ + $(OBJS)\auilib_dummy.o \ + $(OBJS)\auilib_framemanager.o \ + $(OBJS)\auilib_dockart.o \ + $(OBJS)\auilib_floatpane.o \ + $(OBJS)\auilib_auibook.o \ + $(OBJS)\auilib_auibar.o \ + $(OBJS)\auilib_tabmdi.o \ + $(OBJS)\auilib_tabart.o \ + $(OBJS)\auilib_xh_auinotbk.o +RIBBONDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_RIBBON \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) +RIBBONDLL_OBJECTS = \ + $(OBJS)\ribbondll_dummy.o \ + $(OBJS)\ribbondll_version_rc.o \ + $(OBJS)\ribbondll_art_internal.o \ + $(OBJS)\ribbondll_art_msw.o \ + $(OBJS)\ribbondll_art_aui.o \ + $(OBJS)\ribbondll_bar.o \ + $(OBJS)\ribbondll_buttonbar.o \ + $(OBJS)\ribbondll_control.o \ + $(OBJS)\ribbondll_gallery.o \ + $(OBJS)\ribbondll_page.o \ + $(OBJS)\ribbondll_panel.o \ + $(OBJS)\ribbondll_toolbar.o \ + $(OBJS)\ribbondll_xh_ribbon.o +RIBBONLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +RIBBONLIB_OBJECTS = \ + $(OBJS)\ribbonlib_dummy.o \ + $(OBJS)\ribbonlib_art_internal.o \ + $(OBJS)\ribbonlib_art_msw.o \ + $(OBJS)\ribbonlib_art_aui.o \ + $(OBJS)\ribbonlib_bar.o \ + $(OBJS)\ribbonlib_buttonbar.o \ + $(OBJS)\ribbonlib_control.o \ + $(OBJS)\ribbonlib_gallery.o \ + $(OBJS)\ribbonlib_page.o \ + $(OBJS)\ribbonlib_panel.o \ + $(OBJS)\ribbonlib_toolbar.o \ + $(OBJS)\ribbonlib_xh_ribbon.o +PROPGRIDDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_PROPGRID \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) +PROPGRIDDLL_OBJECTS = \ + $(OBJS)\propgriddll_dummy.o \ + $(OBJS)\propgriddll_version_rc.o \ + $(OBJS)\propgriddll_advprops.o \ + $(OBJS)\propgriddll_editors.o \ + $(OBJS)\propgriddll_manager.o \ + $(OBJS)\propgriddll_property.o \ + $(OBJS)\propgriddll_propgrid.o \ + $(OBJS)\propgriddll_propgridiface.o \ + $(OBJS)\propgriddll_propgridpagestate.o \ + $(OBJS)\propgriddll_props.o +PROPGRIDLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +PROPGRIDLIB_OBJECTS = \ + $(OBJS)\propgridlib_dummy.o \ + $(OBJS)\propgridlib_advprops.o \ + $(OBJS)\propgridlib_editors.o \ + $(OBJS)\propgridlib_manager.o \ + $(OBJS)\propgridlib_property.o \ + $(OBJS)\propgridlib_propgrid.o \ + $(OBJS)\propgridlib_propgridiface.o \ + $(OBJS)\propgridlib_propgridpagestate.o \ + $(OBJS)\propgridlib_props.o +RICHTEXTDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_RICHTEXT \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) +RICHTEXTDLL_OBJECTS = \ + $(OBJS)\richtextdll_dummy.o \ + $(OBJS)\richtextdll_version_rc.o \ + $(OBJS)\richtextdll_richtextbuffer.o \ + $(OBJS)\richtextdll_richtextctrl.o \ + $(OBJS)\richtextdll_richtextformatdlg.o \ + $(OBJS)\richtextdll_richtexthtml.o \ + $(OBJS)\richtextdll_richtextimagedlg.o \ + $(OBJS)\richtextdll_richtextprint.o \ + $(OBJS)\richtextdll_richtextstyledlg.o \ + $(OBJS)\richtextdll_richtextstyles.o \ + $(OBJS)\richtextdll_richtextsymboldlg.o \ + $(OBJS)\richtextdll_richtextxml.o \ + $(OBJS)\richtextdll_xh_richtext.o +RICHTEXTLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I..\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -DWXBUILDING \ + -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ + -I..\..\src\regex -I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +RICHTEXTLIB_OBJECTS = \ + $(OBJS)\richtextlib_dummy.o \ + $(OBJS)\richtextlib_richtextbuffer.o \ + $(OBJS)\richtextlib_richtextctrl.o \ + $(OBJS)\richtextlib_richtextformatdlg.o \ + $(OBJS)\richtextlib_richtexthtml.o \ + $(OBJS)\richtextlib_richtextimagedlg.o \ + $(OBJS)\richtextlib_richtextprint.o \ + $(OBJS)\richtextlib_richtextstyledlg.o \ + $(OBJS)\richtextlib_richtextstyles.o \ + $(OBJS)\richtextlib_richtextsymboldlg.o \ + $(OBJS)\richtextlib_richtextxml.o \ + $(OBJS)\richtextlib_xh_richtext.o +STCDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib \ + -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib \ + -I..\..\src\stc\scintilla\src -D__WX__ -DSCI_LEXER -DLINK_LEXERS \ + -DWXUSINGDLL -DWXMAKINGDLL_STC $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +STCDLL_OBJECTS = \ + $(OBJS)\stcdll_dummy.o \ + $(OBJS)\stcdll_version_rc.o \ + $(OBJS)\stcdll_stc.o \ + $(OBJS)\stcdll_PlatWX.o \ + $(OBJS)\stcdll_ScintillaWX.o +STCLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib \ + -I..\..\src\stc\scintilla\include -I..\..\src\stc\scintilla\lexlib \ + -I..\..\src\stc\scintilla\src -D__WX__ -DSCI_LEXER -DLINK_LEXERS \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \ + $(CXXFLAGS) +STCLIB_OBJECTS = \ + $(OBJS)\stclib_dummy.o \ + $(OBJS)\stclib_stc.o \ + $(OBJS)\stclib_PlatWX.o \ + $(OBJS)\stclib_ScintillaWX.o +GLDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL \ + -DWXMAKINGDLL_GL $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy \ + $(CPPFLAGS) $(CXXFLAGS) +GLDLL_OBJECTS = \ + $(OBJS)\gldll_dummy.o \ + $(OBJS)\gldll_version_rc.o \ + $(OBJS)\gldll_glcmn.o \ + $(OBJS)\gldll_glcanvas.o +GLLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + -I$(SETUPHDIR) -I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \ + -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ + -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +GLLIB_OBJECTS = \ + $(OBJS)\gllib_dummy.o \ + $(OBJS)\gllib_glcmn.o \ + $(OBJS)\gllib_glcanvas.o +BUILD_CFG_FILE = $(SETUPHDIR)\build.cfg + +### Conditionally set variables: ### + +ifeq ($(GCC_VERSION),2.95) +GCCFLAGS = -fvtable-thunks +endif +ifeq ($(USE_GUI),0) +PORTNAME = base +endif +ifeq ($(USE_GUI),1) +PORTNAME = msw$(TOOLKIT_VERSION) +endif +ifeq ($(OFFICIAL_BUILD),1) +COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD +endif +ifeq ($(OFFICIAL_BUILD),0) +WXCOMPILER = _gcc +endif +ifeq ($(OFFICIAL_BUILD),1) +WXCOMPILER = _gcc$(COMPILER_VERSION) +endif +ifeq ($(OFFICIAL_BUILD),0) +VENDORTAG = _$(VENDOR) +endif +ifeq ($(OFFICIAL_BUILD),1) +VENDORTAG = +endif +ifeq ($(BUILD),debug) +WXDEBUGFLAG = d +endif +ifeq ($(UNICODE),1) +WXUNICODEFLAG = u +endif +ifeq ($(WXUNIV),1) +WXUNIVNAME = univ +endif +ifeq ($(SHARED),1) +WXDLLFLAG = dll +endif +ifeq ($(SHARED),0) +LIBTYPE_SUFFIX = lib +endif +ifeq ($(SHARED),1) +LIBTYPE_SUFFIX = dll +endif +ifeq ($(USE_GUI),1) +__wxpng___depname = $(LIBDIRNAME)\libwxpng$(WXDEBUGFLAG).a +endif +ifeq ($(USE_GUI),1) +__wxjpeg___depname = $(LIBDIRNAME)\libwxjpeg$(WXDEBUGFLAG).a +endif +ifeq ($(USE_GUI),1) +__wxtiff___depname = $(LIBDIRNAME)\libwxtiff$(WXDEBUGFLAG).a +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +__wxscintilla_usingdll_p = -DWXUSINGDLL +endif +endif +ifeq ($(MONOLITHIC),0) +EXTRALIBS_FOR_BASE = +endif +ifeq ($(MONOLITHIC),1) +EXTRALIBS_FOR_BASE = +endif +ifeq ($(MONOLITHIC),1) +ifeq ($(SHARED),1) +__monodll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +ifeq ($(USE_GUI),1) +____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ + $(____CORE_SRC_FILENAMES_OBJECTS) \ + $(____ADVANCED_SRC_FILENAMES_OBJECTS) \ + $(OBJS)\monodll_mediactrlcmn.o \ + $(OBJS)\monodll_mediactrl_am.o \ + $(OBJS)\monodll_mediactrl_wmp10.o \ + $(OBJS)\monodll_mediactrl_qt.o \ + $(OBJS)\monodll_helpbest.o \ + $(OBJS)\monodll_helpctrl.o \ + $(OBJS)\monodll_helpdata.o \ + $(OBJS)\monodll_helpdlg.o \ + $(OBJS)\monodll_helpfrm.o \ + $(OBJS)\monodll_helpwnd.o \ + $(OBJS)\monodll_htmlcell.o \ + $(OBJS)\monodll_htmlfilt.o \ + $(OBJS)\monodll_htmlpars.o \ + $(OBJS)\monodll_htmltag.o \ + $(OBJS)\monodll_htmlwin.o \ + $(OBJS)\monodll_htmprint.o \ + $(OBJS)\monodll_m_dflist.o \ + $(OBJS)\monodll_m_fonts.o \ + $(OBJS)\monodll_m_hline.o \ + $(OBJS)\monodll_m_image.o \ + $(OBJS)\monodll_m_layout.o \ + $(OBJS)\monodll_m_links.o \ + $(OBJS)\monodll_m_list.o \ + $(OBJS)\monodll_m_pre.o \ + $(OBJS)\monodll_m_span.o \ + $(OBJS)\monodll_m_style.o \ + $(OBJS)\monodll_m_tables.o \ + $(OBJS)\monodll_styleparams.o \ + $(OBJS)\monodll_winpars.o \ + $(OBJS)\monodll_htmllbox.o \ + $(OBJS)\monodll_webview_ie.o \ + $(OBJS)\monodll_webview.o \ + $(OBJS)\monodll_webviewarchivehandler.o \ + $(OBJS)\monodll_webviewfshandler.o \ + $(OBJS)\monodll_debugrpt.o \ + $(OBJS)\monodll_dbgrptg.o \ + $(OBJS)\monodll_xh_animatctrl.o \ + $(OBJS)\monodll_xh_bannerwindow.o \ + $(OBJS)\monodll_xh_bmp.o \ + $(OBJS)\monodll_xh_bmpcbox.o \ + $(OBJS)\monodll_xh_bmpbt.o \ + $(OBJS)\monodll_xh_bttn.o \ + $(OBJS)\monodll_xh_cald.o \ + $(OBJS)\monodll_xh_chckb.o \ + $(OBJS)\monodll_xh_chckl.o \ + $(OBJS)\monodll_xh_choic.o \ + $(OBJS)\monodll_xh_choicbk.o \ + $(OBJS)\monodll_xh_clrpicker.o \ + $(OBJS)\monodll_xh_cmdlinkbn.o \ + $(OBJS)\monodll_xh_collpane.o \ + $(OBJS)\monodll_xh_combo.o \ + $(OBJS)\monodll_xh_comboctrl.o \ + $(OBJS)\monodll_xh_datectrl.o \ + $(OBJS)\monodll_xh_dirpicker.o \ + $(OBJS)\monodll_xh_dlg.o \ + $(OBJS)\monodll_xh_editlbox.o \ + $(OBJS)\monodll_xh_filectrl.o \ + $(OBJS)\monodll_xh_filepicker.o \ + $(OBJS)\monodll_xh_fontpicker.o \ + $(OBJS)\monodll_xh_frame.o \ + $(OBJS)\monodll_xh_gauge.o \ + $(OBJS)\monodll_xh_gdctl.o \ + $(OBJS)\monodll_xh_grid.o \ + $(OBJS)\monodll_xh_html.o \ + $(OBJS)\monodll_xh_hyperlink.o \ + $(OBJS)\monodll_xh_listb.o \ + $(OBJS)\monodll_xh_listbk.o \ + $(OBJS)\monodll_xh_listc.o \ + $(OBJS)\monodll_xh_mdi.o \ + $(OBJS)\monodll_xh_menu.o \ + $(OBJS)\monodll_xh_notbk.o \ + $(OBJS)\monodll_xh_odcombo.o \ + $(OBJS)\monodll_xh_panel.o \ + $(OBJS)\monodll_xh_propdlg.o \ + $(OBJS)\monodll_xh_radbt.o \ + $(OBJS)\monodll_xh_radbx.o \ + $(OBJS)\monodll_xh_scrol.o \ + $(OBJS)\monodll_xh_scwin.o \ + $(OBJS)\monodll_xh_htmllbox.o \ + $(OBJS)\monodll_xh_sizer.o \ + $(OBJS)\monodll_xh_slidr.o \ + $(OBJS)\monodll_xh_spin.o \ + $(OBJS)\monodll_xh_split.o \ + $(OBJS)\monodll_xh_srchctrl.o \ + $(OBJS)\monodll_xh_statbar.o \ + $(OBJS)\monodll_xh_stbmp.o \ + $(OBJS)\monodll_xh_stbox.o \ + $(OBJS)\monodll_xh_stlin.o \ + $(OBJS)\monodll_xh_sttxt.o \ + $(OBJS)\monodll_xh_text.o \ + $(OBJS)\monodll_xh_tglbtn.o \ + $(OBJS)\monodll_xh_timectrl.o \ + $(OBJS)\monodll_xh_toolb.o \ + $(OBJS)\monodll_xh_toolbk.o \ + $(OBJS)\monodll_xh_tree.o \ + $(OBJS)\monodll_xh_treebk.o \ + $(OBJS)\monodll_xh_unkwn.o \ + $(OBJS)\monodll_xh_wizrd.o \ + $(OBJS)\monodll_xmlres.o \ + $(OBJS)\monodll_xmladv.o \ + $(OBJS)\monodll_xmlrsall.o \ + $(OBJS)\monodll_framemanager.o \ + $(OBJS)\monodll_dockart.o \ + $(OBJS)\monodll_floatpane.o \ + $(OBJS)\monodll_auibook.o \ + $(OBJS)\monodll_auibar.o \ + $(OBJS)\monodll_tabmdi.o \ + $(OBJS)\monodll_tabart.o \ + $(OBJS)\monodll_xh_auinotbk.o \ + $(OBJS)\monodll_advprops.o \ + $(OBJS)\monodll_editors.o \ + $(OBJS)\monodll_manager.o \ + $(OBJS)\monodll_property.o \ + $(OBJS)\monodll_propgrid.o \ + $(OBJS)\monodll_propgridiface.o \ + $(OBJS)\monodll_propgridpagestate.o \ + $(OBJS)\monodll_props.o \ + $(OBJS)\monodll_art_internal.o \ + $(OBJS)\monodll_art_msw.o \ + $(OBJS)\monodll_art_aui.o \ + $(OBJS)\monodll_bar.o \ + $(OBJS)\monodll_ribbon_buttonbar.o \ + $(OBJS)\monodll_ribbon_control.o \ + $(OBJS)\monodll_gallery.o \ + $(OBJS)\monodll_page.o \ + $(OBJS)\monodll_ribbon_panel.o \ + $(OBJS)\monodll_ribbon_toolbar.o \ + $(OBJS)\monodll_xh_ribbon.o \ + $(OBJS)\monodll_richtextbuffer.o \ + $(OBJS)\monodll_richtextctrl.o \ + $(OBJS)\monodll_richtextformatdlg.o \ + $(OBJS)\monodll_richtexthtml.o \ + $(OBJS)\monodll_richtextimagedlg.o \ + $(OBJS)\monodll_richtextprint.o \ + $(OBJS)\monodll_richtextstyledlg.o \ + $(OBJS)\monodll_richtextstyles.o \ + $(OBJS)\monodll_richtextsymboldlg.o \ + $(OBJS)\monodll_richtextxml.o \ + $(OBJS)\monodll_xh_richtext.o \ + $(OBJS)\monodll_stc.o \ + $(OBJS)\monodll_PlatWX.o \ + $(OBJS)\monodll_ScintillaWX.o +endif +ifeq ($(USE_GUI),1) +ifeq ($(WXUNIV),0) +____CORE_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_activex.o \ + $(OBJS)\monodll_app.o \ + $(OBJS)\monodll_bitmap.o \ + $(OBJS)\monodll_brush.o \ + $(OBJS)\monodll_caret.o \ + $(OBJS)\monodll_clipbrd.o \ + $(OBJS)\monodll_colour.o \ + $(OBJS)\monodll_cursor.o \ + $(OBJS)\monodll_data.o \ + $(OBJS)\monodll_dc.o \ + $(OBJS)\monodll_dcclient.o \ + $(OBJS)\monodll_dcmemory.o \ + $(OBJS)\monodll_dcprint.o \ + $(OBJS)\monodll_dcscreen.o \ + $(OBJS)\monodll_dialup.o \ + $(OBJS)\monodll_dib.o \ + $(OBJS)\monodll_display.o \ + $(OBJS)\monodll_enhmeta.o \ + $(OBJS)\monodll_font.o \ + $(OBJS)\monodll_fontenum.o \ + $(OBJS)\monodll_fontutil.o \ + $(OBJS)\monodll_gdiimage.o \ + $(OBJS)\monodll_gdiobj.o \ + $(OBJS)\monodll_gdiplus.o \ + $(OBJS)\monodll_graphics.o \ + $(OBJS)\monodll_icon.o \ + $(OBJS)\monodll_imaglist.o \ + $(OBJS)\monodll_minifram.o \ + $(OBJS)\monodll_nonownedwnd.o \ + $(OBJS)\monodll_dataobj.o \ + $(OBJS)\monodll_dropsrc.o \ + $(OBJS)\monodll_droptgt.o \ + $(OBJS)\monodll_oleutils.o \ + $(OBJS)\monodll_safearray.o \ + $(OBJS)\monodll_palette.o \ + $(OBJS)\monodll_pen.o \ + $(OBJS)\monodll_popupwin.o \ + $(OBJS)\monodll_printdlg.o \ + $(OBJS)\monodll_printwin.o \ + $(OBJS)\monodll_region.o \ + $(OBJS)\monodll_renderer.o \ + $(OBJS)\monodll_settings.o \ + $(OBJS)\monodll_textmeasure.o \ + $(OBJS)\monodll_tooltip.o \ + $(OBJS)\monodll_toplevel.o \ + $(OBJS)\monodll_uiaction.o \ + $(OBJS)\monodll_utilsgui.o \ + $(OBJS)\monodll_utilswin.o \ + $(OBJS)\monodll_uxtheme.o \ + $(OBJS)\monodll_window.o \ + $(OBJS)\monodll_helpchm.o \ + $(OBJS)\monodll_helpwin.o \ + $(OBJS)\monodll_automtn.o \ + $(OBJS)\monodll_uuid.o \ + $(OBJS)\monodll_clrpickerg.o \ + $(OBJS)\monodll_collpaneg.o \ + $(OBJS)\monodll_filepickerg.o \ + $(OBJS)\monodll_fontpickerg.o \ + $(OBJS)\monodll_generic_statusbr.o \ + $(OBJS)\monodll_prntdlgg.o \ + $(OBJS)\monodll_msw_accel.o \ + $(OBJS)\monodll_anybutton.o \ + $(OBJS)\monodll_artmsw.o \ + $(OBJS)\monodll_msw_bmpbuttn.o \ + $(OBJS)\monodll_msw_button.o \ + $(OBJS)\monodll_msw_checkbox.o \ + $(OBJS)\monodll_msw_choice.o \ + $(OBJS)\monodll_colordlg.o \ + $(OBJS)\monodll_combo.o \ + $(OBJS)\monodll_msw_combobox.o \ + $(OBJS)\monodll_msw_control.o \ + $(OBJS)\monodll_msw_dialog.o \ + $(OBJS)\monodll_dirdlg.o \ + $(OBJS)\monodll_dragimag.o \ + $(OBJS)\monodll_evtloop.o \ + $(OBJS)\monodll_filedlg.o \ + $(OBJS)\monodll_frame.o \ + $(OBJS)\monodll_msw_gauge.o \ + $(OBJS)\monodll_headerctrl.o \ + $(OBJS)\monodll_iniconf.o \ + $(OBJS)\monodll_msw_listbox.o \ + $(OBJS)\monodll_msw_listctrl.o \ + $(OBJS)\monodll_mdi.o \ + $(OBJS)\monodll_msw_menu.o \ + $(OBJS)\monodll_menuitem.o \ + $(OBJS)\monodll_metafile.o \ + $(OBJS)\monodll_msgdlg.o \ + $(OBJS)\monodll_nativdlg.o \ + $(OBJS)\monodll_nativewin.o \ + $(OBJS)\monodll_msw_notebook.o \ + $(OBJS)\monodll_access.o \ + $(OBJS)\monodll_ownerdrw.o \ + $(OBJS)\monodll_msw_panel.o \ + $(OBJS)\monodll_progdlg.o \ + $(OBJS)\monodll_msw_radiobox.o \ + $(OBJS)\monodll_msw_radiobut.o \ + $(OBJS)\monodll_richmsgdlg.o \ + $(OBJS)\monodll_msw_scrolbar.o \ + $(OBJS)\monodll_msw_slider.o \ + $(OBJS)\monodll_msw_spinbutt.o \ + $(OBJS)\monodll_spinctrl.o \ + $(OBJS)\monodll_msw_statbmp.o \ + $(OBJS)\monodll_msw_statbox.o \ + $(OBJS)\monodll_statusbar.o \ + $(OBJS)\monodll_msw_statline.o \ + $(OBJS)\monodll_msw_stattext.o \ + $(OBJS)\monodll_msw_toolbar.o \ + $(OBJS)\monodll_msw_textctrl.o \ + $(OBJS)\monodll_textentry.o \ + $(OBJS)\monodll_msw_tglbtn.o \ + $(OBJS)\monodll_treectrl.o \ + $(OBJS)\monodll_msw_checklst.o \ + $(OBJS)\monodll_msw_fdrepdlg.o \ + $(OBJS)\monodll_fontdlg.o \ + $(OBJS)\monodll_accelcmn.o \ + $(OBJS)\monodll_accesscmn.o \ + $(OBJS)\monodll_anidecod.o \ + $(OBJS)\monodll_affinematrix2d.o \ + $(OBJS)\monodll_appcmn.o \ + $(OBJS)\monodll_artprov.o \ + $(OBJS)\monodll_artstd.o \ + $(OBJS)\monodll_arttango.o \ + $(OBJS)\monodll_bmpbase.o \ + $(OBJS)\monodll_bmpbtncmn.o \ + $(OBJS)\monodll_bookctrl.o \ + $(OBJS)\monodll_btncmn.o \ + $(OBJS)\monodll_cairo.o \ + $(OBJS)\monodll_checkboxcmn.o \ + $(OBJS)\monodll_checklstcmn.o \ + $(OBJS)\monodll_choiccmn.o \ + $(OBJS)\monodll_clipcmn.o \ + $(OBJS)\monodll_clrpickercmn.o \ + $(OBJS)\monodll_colourcmn.o \ + $(OBJS)\monodll_colourdata.o \ + $(OBJS)\monodll_combocmn.o \ + $(OBJS)\monodll_cmdproc.o \ + $(OBJS)\monodll_cmndata.o \ + $(OBJS)\monodll_containr.o \ + $(OBJS)\monodll_cshelp.o \ + $(OBJS)\monodll_ctrlcmn.o \ + $(OBJS)\monodll_ctrlsub.o \ + $(OBJS)\monodll_dcbase.o \ + $(OBJS)\monodll_dcbufcmn.o \ + $(OBJS)\monodll_dcgraph.o \ + $(OBJS)\monodll_dcsvg.o \ + $(OBJS)\monodll_dirctrlcmn.o \ + $(OBJS)\monodll_dlgcmn.o \ + $(OBJS)\monodll_dndcmn.o \ + $(OBJS)\monodll_dobjcmn.o \ + $(OBJS)\monodll_docmdi.o \ + $(OBJS)\monodll_docview.o \ + $(OBJS)\monodll_dpycmn.o \ + $(OBJS)\monodll_dseldlg.o \ + $(OBJS)\monodll_effects.o \ + $(OBJS)\monodll_fddlgcmn.o \ + $(OBJS)\monodll_filectrlcmn.o \ + $(OBJS)\monodll_filehistorycmn.o \ + $(OBJS)\monodll_filepickercmn.o \ + $(OBJS)\monodll_fontpickercmn.o \ + $(OBJS)\monodll_fldlgcmn.o \ + $(OBJS)\monodll_fontcmn.o \ + $(OBJS)\monodll_fontdata.o \ + $(OBJS)\monodll_graphicc.o \ + $(OBJS)\monodll_fontenumcmn.o \ + $(OBJS)\monodll_fontmap.o \ + $(OBJS)\monodll_fontutilcmn.o \ + $(OBJS)\monodll_framecmn.o \ + $(OBJS)\monodll_gaugecmn.o \ + $(OBJS)\monodll_gbsizer.o \ + $(OBJS)\monodll_gdicmn.o \ + $(OBJS)\monodll_geometry.o \ + $(OBJS)\monodll_gifdecod.o \ + $(OBJS)\monodll_graphcmn.o \ + $(OBJS)\monodll_headercolcmn.o \ + $(OBJS)\monodll_headerctrlcmn.o \ + $(OBJS)\monodll_helpbase.o \ + $(OBJS)\monodll_iconbndl.o \ + $(OBJS)\monodll_imagall.o \ + $(OBJS)\monodll_imagbmp.o \ + $(OBJS)\monodll_image.o \ + $(OBJS)\monodll_imagfill.o \ + $(OBJS)\monodll_imaggif.o \ + $(OBJS)\monodll_imagiff.o \ + $(OBJS)\monodll_imagjpeg.o \ + $(OBJS)\monodll_imagpcx.o \ + $(OBJS)\monodll_imagpng.o \ + $(OBJS)\monodll_imagpnm.o \ + $(OBJS)\monodll_imagtga.o \ + $(OBJS)\monodll_imagtiff.o \ + $(OBJS)\monodll_imagxpm.o \ + $(OBJS)\monodll_layout.o \ + $(OBJS)\monodll_lboxcmn.o \ + $(OBJS)\monodll_listctrlcmn.o \ + $(OBJS)\monodll_markupparser.o \ + $(OBJS)\monodll_matrix.o \ + $(OBJS)\monodll_menucmn.o \ + $(OBJS)\monodll_modalhook.o \ + $(OBJS)\monodll_mousemanager.o \ + $(OBJS)\monodll_nbkbase.o \ + $(OBJS)\monodll_overlaycmn.o \ + $(OBJS)\monodll_ownerdrwcmn.o \ + $(OBJS)\monodll_paper.o \ + $(OBJS)\monodll_panelcmn.o \ + $(OBJS)\monodll_persist.o \ + $(OBJS)\monodll_pickerbase.o \ + $(OBJS)\monodll_popupcmn.o \ + $(OBJS)\monodll_preferencescmn.o \ + $(OBJS)\monodll_prntbase.o \ + $(OBJS)\monodll_quantize.o \ + $(OBJS)\monodll_radiobtncmn.o \ + $(OBJS)\monodll_radiocmn.o \ + $(OBJS)\monodll_rearrangectrl.o \ + $(OBJS)\monodll_rendcmn.o \ + $(OBJS)\monodll_rgncmn.o \ + $(OBJS)\monodll_scrolbarcmn.o \ + $(OBJS)\monodll_settcmn.o \ + $(OBJS)\monodll_sizer.o \ + $(OBJS)\monodll_slidercmn.o \ + $(OBJS)\monodll_spinbtncmn.o \ + $(OBJS)\monodll_spinctrlcmn.o \ + $(OBJS)\monodll_srchcmn.o \ + $(OBJS)\monodll_statbar.o \ + $(OBJS)\monodll_statbmpcmn.o \ + $(OBJS)\monodll_statboxcmn.o \ + $(OBJS)\monodll_statlinecmn.o \ + $(OBJS)\monodll_stattextcmn.o \ + $(OBJS)\monodll_stockitem.o \ + $(OBJS)\monodll_tbarbase.o \ + $(OBJS)\monodll_textcmn.o \ + $(OBJS)\monodll_textentrycmn.o \ + $(OBJS)\monodll_textmeasurecmn.o \ + $(OBJS)\monodll_toplvcmn.o \ + $(OBJS)\monodll_treebase.o \ + $(OBJS)\monodll_uiactioncmn.o \ + $(OBJS)\monodll_valgen.o \ + $(OBJS)\monodll_validate.o \ + $(OBJS)\monodll_valtext.o \ + $(OBJS)\monodll_valnum.o \ + $(OBJS)\monodll_wincmn.o \ + $(OBJS)\monodll_windowid.o \ + $(OBJS)\monodll_wrapsizer.o \ + $(OBJS)\monodll_xpmdecod.o \ + $(OBJS)\monodll_busyinfo.o \ + $(OBJS)\monodll_generic_buttonbar.o \ + $(OBJS)\monodll_choicdgg.o \ + $(OBJS)\monodll_choicbkg.o \ + $(OBJS)\monodll_combog.o \ + $(OBJS)\monodll_dcpsg.o \ + $(OBJS)\monodll_dirctrlg.o \ + $(OBJS)\monodll_dragimgg.o \ + $(OBJS)\monodll_filectrlg.o \ + $(OBJS)\monodll_headerctrlg.o \ + $(OBJS)\monodll_infobar.o \ + $(OBJS)\monodll_listbkg.o \ + $(OBJS)\monodll_logg.o \ + $(OBJS)\monodll_markuptext.o \ + $(OBJS)\monodll_msgdlgg.o \ + $(OBJS)\monodll_numdlgg.o \ + $(OBJS)\monodll_progdlgg.o \ + $(OBJS)\monodll_preferencesg.o \ + $(OBJS)\monodll_printps.o \ + $(OBJS)\monodll_renderg.o \ + $(OBJS)\monodll_richmsgdlgg.o \ + $(OBJS)\monodll_scrlwing.o \ + $(OBJS)\monodll_selstore.o \ + $(OBJS)\monodll_spinctlg.o \ + $(OBJS)\monodll_splitter.o \ + $(OBJS)\monodll_srchctlg.o \ + $(OBJS)\monodll_statbmpg.o \ + $(OBJS)\monodll_stattextg.o \ + $(OBJS)\monodll_textdlgg.o \ + $(OBJS)\monodll_tipwin.o \ + $(OBJS)\monodll_toolbkg.o \ + $(OBJS)\monodll_treectlg.o \ + $(OBJS)\monodll_treebkg.o \ + $(OBJS)\monodll_vlbox.o \ + $(OBJS)\monodll_vscroll.o \ + $(OBJS)\monodll_xmlreshandler.o +endif +endif +ifeq ($(USE_GUI),1) +ifeq ($(WXUNIV),1) +____CORE_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_activex.o \ + $(OBJS)\monodll_app.o \ + $(OBJS)\monodll_bitmap.o \ + $(OBJS)\monodll_brush.o \ + $(OBJS)\monodll_caret.o \ + $(OBJS)\monodll_clipbrd.o \ + $(OBJS)\monodll_colour.o \ + $(OBJS)\monodll_cursor.o \ + $(OBJS)\monodll_data.o \ + $(OBJS)\monodll_dc.o \ + $(OBJS)\monodll_dcclient.o \ + $(OBJS)\monodll_dcmemory.o \ + $(OBJS)\monodll_dcprint.o \ + $(OBJS)\monodll_dcscreen.o \ + $(OBJS)\monodll_dialup.o \ + $(OBJS)\monodll_dib.o \ + $(OBJS)\monodll_display.o \ + $(OBJS)\monodll_enhmeta.o \ + $(OBJS)\monodll_font.o \ + $(OBJS)\monodll_fontenum.o \ + $(OBJS)\monodll_fontutil.o \ + $(OBJS)\monodll_gdiimage.o \ + $(OBJS)\monodll_gdiobj.o \ + $(OBJS)\monodll_gdiplus.o \ + $(OBJS)\monodll_graphics.o \ + $(OBJS)\monodll_icon.o \ + $(OBJS)\monodll_imaglist.o \ + $(OBJS)\monodll_minifram.o \ + $(OBJS)\monodll_nonownedwnd.o \ + $(OBJS)\monodll_dataobj.o \ + $(OBJS)\monodll_dropsrc.o \ + $(OBJS)\monodll_droptgt.o \ + $(OBJS)\monodll_oleutils.o \ + $(OBJS)\monodll_safearray.o \ + $(OBJS)\monodll_palette.o \ + $(OBJS)\monodll_pen.o \ + $(OBJS)\monodll_popupwin.o \ + $(OBJS)\monodll_printdlg.o \ + $(OBJS)\monodll_printwin.o \ + $(OBJS)\monodll_region.o \ + $(OBJS)\monodll_renderer.o \ + $(OBJS)\monodll_settings.o \ + $(OBJS)\monodll_textmeasure.o \ + $(OBJS)\monodll_tooltip.o \ + $(OBJS)\monodll_toplevel.o \ + $(OBJS)\monodll_uiaction.o \ + $(OBJS)\monodll_utilsgui.o \ + $(OBJS)\monodll_utilswin.o \ + $(OBJS)\monodll_uxtheme.o \ + $(OBJS)\monodll_window.o \ + $(OBJS)\monodll_helpchm.o \ + $(OBJS)\monodll_helpwin.o \ + $(OBJS)\monodll_automtn.o \ + $(OBJS)\monodll_uuid.o \ + $(OBJS)\monodll_evtloop.o \ + $(OBJS)\monodll_generic_accel.o \ + $(OBJS)\monodll_clrpickerg.o \ + $(OBJS)\monodll_collpaneg.o \ + $(OBJS)\monodll_colrdlgg.o \ + $(OBJS)\monodll_dirdlgg.o \ + $(OBJS)\monodll_generic_fdrepdlg.o \ + $(OBJS)\monodll_filedlgg.o \ + $(OBJS)\monodll_filepickerg.o \ + $(OBJS)\monodll_fontdlgg.o \ + $(OBJS)\monodll_fontpickerg.o \ + $(OBJS)\monodll_generic_listctrl.o \ + $(OBJS)\monodll_mdig.o \ + $(OBJS)\monodll_prntdlgg.o \ + $(OBJS)\monodll_univ_bmpbuttn.o \ + $(OBJS)\monodll_univ_button.o \ + $(OBJS)\monodll_univ_checkbox.o \ + $(OBJS)\monodll_univ_checklst.o \ + $(OBJS)\monodll_univ_choice.o \ + $(OBJS)\monodll_univ_combobox.o \ + $(OBJS)\monodll_univ_control.o \ + $(OBJS)\monodll_ctrlrend.o \ + $(OBJS)\monodll_univ_dialog.o \ + $(OBJS)\monodll_framuniv.o \ + $(OBJS)\monodll_univ_gauge.o \ + $(OBJS)\monodll_inpcons.o \ + $(OBJS)\monodll_inphand.o \ + $(OBJS)\monodll_univ_listbox.o \ + $(OBJS)\monodll_univ_menu.o \ + $(OBJS)\monodll_univ_notebook.o \ + $(OBJS)\monodll_univ_radiobox.o \ + $(OBJS)\monodll_univ_radiobut.o \ + $(OBJS)\monodll_scrarrow.o \ + $(OBJS)\monodll_univ_scrolbar.o \ + $(OBJS)\monodll_scrthumb.o \ + $(OBJS)\monodll_settingsuniv.o \ + $(OBJS)\monodll_univ_slider.o \ + $(OBJS)\monodll_univ_spinbutt.o \ + $(OBJS)\monodll_univ_statbmp.o \ + $(OBJS)\monodll_univ_statbox.o \ + $(OBJS)\monodll_univ_statline.o \ + $(OBJS)\monodll_univ_stattext.o \ + $(OBJS)\monodll_univ_statusbr.o \ + $(OBJS)\monodll_stdrend.o \ + $(OBJS)\monodll_univ_textctrl.o \ + $(OBJS)\monodll_univ_tglbtn.o \ + $(OBJS)\monodll_theme.o \ + $(OBJS)\monodll_univ_toolbar.o \ + $(OBJS)\monodll_topluniv.o \ + $(OBJS)\monodll_winuniv.o \ + $(OBJS)\monodll_gtk.o \ + $(OBJS)\monodll_metal.o \ + $(OBJS)\monodll_mono.o \ + $(OBJS)\monodll_win32.o \ + $(OBJS)\monodll_accelcmn.o \ + $(OBJS)\monodll_accesscmn.o \ + $(OBJS)\monodll_anidecod.o \ + $(OBJS)\monodll_affinematrix2d.o \ + $(OBJS)\monodll_appcmn.o \ + $(OBJS)\monodll_artprov.o \ + $(OBJS)\monodll_artstd.o \ + $(OBJS)\monodll_arttango.o \ + $(OBJS)\monodll_bmpbase.o \ + $(OBJS)\monodll_bmpbtncmn.o \ + $(OBJS)\monodll_bookctrl.o \ + $(OBJS)\monodll_btncmn.o \ + $(OBJS)\monodll_cairo.o \ + $(OBJS)\monodll_checkboxcmn.o \ + $(OBJS)\monodll_checklstcmn.o \ + $(OBJS)\monodll_choiccmn.o \ + $(OBJS)\monodll_clipcmn.o \ + $(OBJS)\monodll_clrpickercmn.o \ + $(OBJS)\monodll_colourcmn.o \ + $(OBJS)\monodll_colourdata.o \ + $(OBJS)\monodll_combocmn.o \ + $(OBJS)\monodll_cmdproc.o \ + $(OBJS)\monodll_cmndata.o \ + $(OBJS)\monodll_containr.o \ + $(OBJS)\monodll_cshelp.o \ + $(OBJS)\monodll_ctrlcmn.o \ + $(OBJS)\monodll_ctrlsub.o \ + $(OBJS)\monodll_dcbase.o \ + $(OBJS)\monodll_dcbufcmn.o \ + $(OBJS)\monodll_dcgraph.o \ + $(OBJS)\monodll_dcsvg.o \ + $(OBJS)\monodll_dirctrlcmn.o \ + $(OBJS)\monodll_dlgcmn.o \ + $(OBJS)\monodll_dndcmn.o \ + $(OBJS)\monodll_dobjcmn.o \ + $(OBJS)\monodll_docmdi.o \ + $(OBJS)\monodll_docview.o \ + $(OBJS)\monodll_dpycmn.o \ + $(OBJS)\monodll_dseldlg.o \ + $(OBJS)\monodll_effects.o \ + $(OBJS)\monodll_fddlgcmn.o \ + $(OBJS)\monodll_filectrlcmn.o \ + $(OBJS)\monodll_filehistorycmn.o \ + $(OBJS)\monodll_filepickercmn.o \ + $(OBJS)\monodll_fontpickercmn.o \ + $(OBJS)\monodll_fldlgcmn.o \ + $(OBJS)\monodll_fontcmn.o \ + $(OBJS)\monodll_fontdata.o \ + $(OBJS)\monodll_graphicc.o \ + $(OBJS)\monodll_fontenumcmn.o \ + $(OBJS)\monodll_fontmap.o \ + $(OBJS)\monodll_fontutilcmn.o \ + $(OBJS)\monodll_framecmn.o \ + $(OBJS)\monodll_gaugecmn.o \ + $(OBJS)\monodll_gbsizer.o \ + $(OBJS)\monodll_gdicmn.o \ + $(OBJS)\monodll_geometry.o \ + $(OBJS)\monodll_gifdecod.o \ + $(OBJS)\monodll_graphcmn.o \ + $(OBJS)\monodll_headercolcmn.o \ + $(OBJS)\monodll_headerctrlcmn.o \ + $(OBJS)\monodll_helpbase.o \ + $(OBJS)\monodll_iconbndl.o \ + $(OBJS)\monodll_imagall.o \ + $(OBJS)\monodll_imagbmp.o \ + $(OBJS)\monodll_image.o \ + $(OBJS)\monodll_imagfill.o \ + $(OBJS)\monodll_imaggif.o \ + $(OBJS)\monodll_imagiff.o \ + $(OBJS)\monodll_imagjpeg.o \ + $(OBJS)\monodll_imagpcx.o \ + $(OBJS)\monodll_imagpng.o \ + $(OBJS)\monodll_imagpnm.o \ + $(OBJS)\monodll_imagtga.o \ + $(OBJS)\monodll_imagtiff.o \ + $(OBJS)\monodll_imagxpm.o \ + $(OBJS)\monodll_layout.o \ + $(OBJS)\monodll_lboxcmn.o \ + $(OBJS)\monodll_listctrlcmn.o \ + $(OBJS)\monodll_markupparser.o \ + $(OBJS)\monodll_matrix.o \ + $(OBJS)\monodll_menucmn.o \ + $(OBJS)\monodll_modalhook.o \ + $(OBJS)\monodll_mousemanager.o \ + $(OBJS)\monodll_nbkbase.o \ + $(OBJS)\monodll_overlaycmn.o \ + $(OBJS)\monodll_ownerdrwcmn.o \ + $(OBJS)\monodll_paper.o \ + $(OBJS)\monodll_panelcmn.o \ + $(OBJS)\monodll_persist.o \ + $(OBJS)\monodll_pickerbase.o \ + $(OBJS)\monodll_popupcmn.o \ + $(OBJS)\monodll_preferencescmn.o \ + $(OBJS)\monodll_prntbase.o \ + $(OBJS)\monodll_quantize.o \ + $(OBJS)\monodll_radiobtncmn.o \ + $(OBJS)\monodll_radiocmn.o \ + $(OBJS)\monodll_rearrangectrl.o \ + $(OBJS)\monodll_rendcmn.o \ + $(OBJS)\monodll_rgncmn.o \ + $(OBJS)\monodll_scrolbarcmn.o \ + $(OBJS)\monodll_settcmn.o \ + $(OBJS)\monodll_sizer.o \ + $(OBJS)\monodll_slidercmn.o \ + $(OBJS)\monodll_spinbtncmn.o \ + $(OBJS)\monodll_spinctrlcmn.o \ + $(OBJS)\monodll_srchcmn.o \ + $(OBJS)\monodll_statbar.o \ + $(OBJS)\monodll_statbmpcmn.o \ + $(OBJS)\monodll_statboxcmn.o \ + $(OBJS)\monodll_statlinecmn.o \ + $(OBJS)\monodll_stattextcmn.o \ + $(OBJS)\monodll_stockitem.o \ + $(OBJS)\monodll_tbarbase.o \ + $(OBJS)\monodll_textcmn.o \ + $(OBJS)\monodll_textentrycmn.o \ + $(OBJS)\monodll_textmeasurecmn.o \ + $(OBJS)\monodll_toplvcmn.o \ + $(OBJS)\monodll_treebase.o \ + $(OBJS)\monodll_uiactioncmn.o \ + $(OBJS)\monodll_valgen.o \ + $(OBJS)\monodll_validate.o \ + $(OBJS)\monodll_valtext.o \ + $(OBJS)\monodll_valnum.o \ + $(OBJS)\monodll_wincmn.o \ + $(OBJS)\monodll_windowid.o \ + $(OBJS)\monodll_wrapsizer.o \ + $(OBJS)\monodll_xpmdecod.o \ + $(OBJS)\monodll_busyinfo.o \ + $(OBJS)\monodll_generic_buttonbar.o \ + $(OBJS)\monodll_choicdgg.o \ + $(OBJS)\monodll_choicbkg.o \ + $(OBJS)\monodll_combog.o \ + $(OBJS)\monodll_dcpsg.o \ + $(OBJS)\monodll_dirctrlg.o \ + $(OBJS)\monodll_dragimgg.o \ + $(OBJS)\monodll_filectrlg.o \ + $(OBJS)\monodll_headerctrlg.o \ + $(OBJS)\monodll_infobar.o \ + $(OBJS)\monodll_listbkg.o \ + $(OBJS)\monodll_logg.o \ + $(OBJS)\monodll_markuptext.o \ + $(OBJS)\monodll_msgdlgg.o \ + $(OBJS)\monodll_numdlgg.o \ + $(OBJS)\monodll_progdlgg.o \ + $(OBJS)\monodll_preferencesg.o \ + $(OBJS)\monodll_printps.o \ + $(OBJS)\monodll_renderg.o \ + $(OBJS)\monodll_richmsgdlgg.o \ + $(OBJS)\monodll_scrlwing.o \ + $(OBJS)\monodll_selstore.o \ + $(OBJS)\monodll_spinctlg.o \ + $(OBJS)\monodll_splitter.o \ + $(OBJS)\monodll_srchctlg.o \ + $(OBJS)\monodll_statbmpg.o \ + $(OBJS)\monodll_stattextg.o \ + $(OBJS)\monodll_textdlgg.o \ + $(OBJS)\monodll_tipwin.o \ + $(OBJS)\monodll_toolbkg.o \ + $(OBJS)\monodll_treectlg.o \ + $(OBJS)\monodll_treebkg.o \ + $(OBJS)\monodll_vlbox.o \ + $(OBJS)\monodll_vscroll.o \ + $(OBJS)\monodll_xmlreshandler.o +endif +endif +ifeq ($(WXUNIV),0) +____ADVANCED_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_animatecmn.o \ + $(OBJS)\monodll_bmpcboxcmn.o \ + $(OBJS)\monodll_calctrlcmn.o \ + $(OBJS)\monodll_datavcmn.o \ + $(OBJS)\monodll_gridcmn.o \ + $(OBJS)\monodll_hyperlnkcmn.o \ + $(OBJS)\monodll_odcombocmn.o \ + $(OBJS)\monodll_richtooltipcmn.o \ + $(OBJS)\monodll_aboutdlgg.o \ + $(OBJS)\monodll_bannerwindow.o \ + $(OBJS)\monodll_bmpcboxg.o \ + $(OBJS)\monodll_calctrlg.o \ + $(OBJS)\monodll_commandlinkbuttong.o \ + $(OBJS)\monodll_datavgen.o \ + $(OBJS)\monodll_datectlg.o \ + $(OBJS)\monodll_editlbox.o \ + $(OBJS)\monodll_grid.o \ + $(OBJS)\monodll_gridctrl.o \ + $(OBJS)\monodll_grideditors.o \ + $(OBJS)\monodll_gridsel.o \ + $(OBJS)\monodll_helpext.o \ + $(OBJS)\monodll_hyperlinkg.o \ + $(OBJS)\monodll_laywin.o \ + $(OBJS)\monodll_notifmsgg.o \ + $(OBJS)\monodll_odcombo.o \ + $(OBJS)\monodll_propdlg.o \ + $(OBJS)\monodll_richtooltipg.o \ + $(OBJS)\monodll_sashwin.o \ + $(OBJS)\monodll_splash.o \ + $(OBJS)\monodll_timectrlg.o \ + $(OBJS)\monodll_tipdlg.o \ + $(OBJS)\monodll_treelist.o \ + $(OBJS)\monodll_wizard.o \ + $(OBJS)\monodll_taskbarcmn.o \ + $(OBJS)\monodll_aboutdlg.o \ + $(OBJS)\monodll_notifmsg.o \ + $(OBJS)\monodll_richtooltip.o \ + $(OBJS)\monodll_sound.o \ + $(OBJS)\monodll_taskbar.o \ + $(OBJS)\monodll_joystick.o \ + $(OBJS)\monodll_animateg.o \ + $(OBJS)\monodll_bmpcbox.o \ + $(OBJS)\monodll_calctrl.o \ + $(OBJS)\monodll_commandlinkbutton.o \ + $(OBJS)\monodll_datecontrols.o \ + $(OBJS)\monodll_datectrl.o \ + $(OBJS)\monodll_datetimectrl.o \ + $(OBJS)\monodll_hyperlink.o \ + $(OBJS)\monodll_timectrl.o +endif +ifeq ($(WXUNIV),1) +____ADVANCED_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_animatecmn.o \ + $(OBJS)\monodll_bmpcboxcmn.o \ + $(OBJS)\monodll_calctrlcmn.o \ + $(OBJS)\monodll_datavcmn.o \ + $(OBJS)\monodll_gridcmn.o \ + $(OBJS)\monodll_hyperlnkcmn.o \ + $(OBJS)\monodll_odcombocmn.o \ + $(OBJS)\monodll_richtooltipcmn.o \ + $(OBJS)\monodll_aboutdlgg.o \ + $(OBJS)\monodll_bannerwindow.o \ + $(OBJS)\monodll_bmpcboxg.o \ + $(OBJS)\monodll_calctrlg.o \ + $(OBJS)\monodll_commandlinkbuttong.o \ + $(OBJS)\monodll_datavgen.o \ + $(OBJS)\monodll_datectlg.o \ + $(OBJS)\monodll_editlbox.o \ + $(OBJS)\monodll_grid.o \ + $(OBJS)\monodll_gridctrl.o \ + $(OBJS)\monodll_grideditors.o \ + $(OBJS)\monodll_gridsel.o \ + $(OBJS)\monodll_helpext.o \ + $(OBJS)\monodll_hyperlinkg.o \ + $(OBJS)\monodll_laywin.o \ + $(OBJS)\monodll_notifmsgg.o \ + $(OBJS)\monodll_odcombo.o \ + $(OBJS)\monodll_propdlg.o \ + $(OBJS)\monodll_richtooltipg.o \ + $(OBJS)\monodll_sashwin.o \ + $(OBJS)\monodll_splash.o \ + $(OBJS)\monodll_timectrlg.o \ + $(OBJS)\monodll_tipdlg.o \ + $(OBJS)\monodll_treelist.o \ + $(OBJS)\monodll_wizard.o \ + $(OBJS)\monodll_taskbarcmn.o \ + $(OBJS)\monodll_aboutdlg.o \ + $(OBJS)\monodll_notifmsg.o \ + $(OBJS)\monodll_richtooltip.o \ + $(OBJS)\monodll_sound.o \ + $(OBJS)\monodll_taskbar.o \ + $(OBJS)\monodll_joystick.o \ + $(OBJS)\monodll_animateg.o +endif +ifeq ($(USE_STC),1) +__wxscintilla_library_link_DEP = $(__wxscintilla) +endif +ifeq ($(MONOLITHIC),1) +ifeq ($(SHARED),0) +__monolib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +ifeq ($(USE_GUI),1) +____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ + $(____CORE_SRC_FILENAMES_1_OBJECTS) \ + $(____ADVANCED_SRC_FILENAMES_1_OBJECTS) \ + $(OBJS)\monolib_mediactrlcmn.o \ + $(OBJS)\monolib_mediactrl_am.o \ + $(OBJS)\monolib_mediactrl_wmp10.o \ + $(OBJS)\monolib_mediactrl_qt.o \ + $(OBJS)\monolib_helpbest.o \ + $(OBJS)\monolib_helpctrl.o \ + $(OBJS)\monolib_helpdata.o \ + $(OBJS)\monolib_helpdlg.o \ + $(OBJS)\monolib_helpfrm.o \ + $(OBJS)\monolib_helpwnd.o \ + $(OBJS)\monolib_htmlcell.o \ + $(OBJS)\monolib_htmlfilt.o \ + $(OBJS)\monolib_htmlpars.o \ + $(OBJS)\monolib_htmltag.o \ + $(OBJS)\monolib_htmlwin.o \ + $(OBJS)\monolib_htmprint.o \ + $(OBJS)\monolib_m_dflist.o \ + $(OBJS)\monolib_m_fonts.o \ + $(OBJS)\monolib_m_hline.o \ + $(OBJS)\monolib_m_image.o \ + $(OBJS)\monolib_m_layout.o \ + $(OBJS)\monolib_m_links.o \ + $(OBJS)\monolib_m_list.o \ + $(OBJS)\monolib_m_pre.o \ + $(OBJS)\monolib_m_span.o \ + $(OBJS)\monolib_m_style.o \ + $(OBJS)\monolib_m_tables.o \ + $(OBJS)\monolib_styleparams.o \ + $(OBJS)\monolib_winpars.o \ + $(OBJS)\monolib_htmllbox.o \ + $(OBJS)\monolib_webview_ie.o \ + $(OBJS)\monolib_webview.o \ + $(OBJS)\monolib_webviewarchivehandler.o \ + $(OBJS)\monolib_webviewfshandler.o \ + $(OBJS)\monolib_debugrpt.o \ + $(OBJS)\monolib_dbgrptg.o \ + $(OBJS)\monolib_xh_animatctrl.o \ + $(OBJS)\monolib_xh_bannerwindow.o \ + $(OBJS)\monolib_xh_bmp.o \ + $(OBJS)\monolib_xh_bmpcbox.o \ + $(OBJS)\monolib_xh_bmpbt.o \ + $(OBJS)\monolib_xh_bttn.o \ + $(OBJS)\monolib_xh_cald.o \ + $(OBJS)\monolib_xh_chckb.o \ + $(OBJS)\monolib_xh_chckl.o \ + $(OBJS)\monolib_xh_choic.o \ + $(OBJS)\monolib_xh_choicbk.o \ + $(OBJS)\monolib_xh_clrpicker.o \ + $(OBJS)\monolib_xh_cmdlinkbn.o \ + $(OBJS)\monolib_xh_collpane.o \ + $(OBJS)\monolib_xh_combo.o \ + $(OBJS)\monolib_xh_comboctrl.o \ + $(OBJS)\monolib_xh_datectrl.o \ + $(OBJS)\monolib_xh_dirpicker.o \ + $(OBJS)\monolib_xh_dlg.o \ + $(OBJS)\monolib_xh_editlbox.o \ + $(OBJS)\monolib_xh_filectrl.o \ + $(OBJS)\monolib_xh_filepicker.o \ + $(OBJS)\monolib_xh_fontpicker.o \ + $(OBJS)\monolib_xh_frame.o \ + $(OBJS)\monolib_xh_gauge.o \ + $(OBJS)\monolib_xh_gdctl.o \ + $(OBJS)\monolib_xh_grid.o \ + $(OBJS)\monolib_xh_html.o \ + $(OBJS)\monolib_xh_hyperlink.o \ + $(OBJS)\monolib_xh_listb.o \ + $(OBJS)\monolib_xh_listbk.o \ + $(OBJS)\monolib_xh_listc.o \ + $(OBJS)\monolib_xh_mdi.o \ + $(OBJS)\monolib_xh_menu.o \ + $(OBJS)\monolib_xh_notbk.o \ + $(OBJS)\monolib_xh_odcombo.o \ + $(OBJS)\monolib_xh_panel.o \ + $(OBJS)\monolib_xh_propdlg.o \ + $(OBJS)\monolib_xh_radbt.o \ + $(OBJS)\monolib_xh_radbx.o \ + $(OBJS)\monolib_xh_scrol.o \ + $(OBJS)\monolib_xh_scwin.o \ + $(OBJS)\monolib_xh_htmllbox.o \ + $(OBJS)\monolib_xh_sizer.o \ + $(OBJS)\monolib_xh_slidr.o \ + $(OBJS)\monolib_xh_spin.o \ + $(OBJS)\monolib_xh_split.o \ + $(OBJS)\monolib_xh_srchctrl.o \ + $(OBJS)\monolib_xh_statbar.o \ + $(OBJS)\monolib_xh_stbmp.o \ + $(OBJS)\monolib_xh_stbox.o \ + $(OBJS)\monolib_xh_stlin.o \ + $(OBJS)\monolib_xh_sttxt.o \ + $(OBJS)\monolib_xh_text.o \ + $(OBJS)\monolib_xh_tglbtn.o \ + $(OBJS)\monolib_xh_timectrl.o \ + $(OBJS)\monolib_xh_toolb.o \ + $(OBJS)\monolib_xh_toolbk.o \ + $(OBJS)\monolib_xh_tree.o \ + $(OBJS)\monolib_xh_treebk.o \ + $(OBJS)\monolib_xh_unkwn.o \ + $(OBJS)\monolib_xh_wizrd.o \ + $(OBJS)\monolib_xmlres.o \ + $(OBJS)\monolib_xmladv.o \ + $(OBJS)\monolib_xmlrsall.o \ + $(OBJS)\monolib_framemanager.o \ + $(OBJS)\monolib_dockart.o \ + $(OBJS)\monolib_floatpane.o \ + $(OBJS)\monolib_auibook.o \ + $(OBJS)\monolib_auibar.o \ + $(OBJS)\monolib_tabmdi.o \ + $(OBJS)\monolib_tabart.o \ + $(OBJS)\monolib_xh_auinotbk.o \ + $(OBJS)\monolib_advprops.o \ + $(OBJS)\monolib_editors.o \ + $(OBJS)\monolib_manager.o \ + $(OBJS)\monolib_property.o \ + $(OBJS)\monolib_propgrid.o \ + $(OBJS)\monolib_propgridiface.o \ + $(OBJS)\monolib_propgridpagestate.o \ + $(OBJS)\monolib_props.o \ + $(OBJS)\monolib_art_internal.o \ + $(OBJS)\monolib_art_msw.o \ + $(OBJS)\monolib_art_aui.o \ + $(OBJS)\monolib_bar.o \ + $(OBJS)\monolib_ribbon_buttonbar.o \ + $(OBJS)\monolib_ribbon_control.o \ + $(OBJS)\monolib_gallery.o \ + $(OBJS)\monolib_page.o \ + $(OBJS)\monolib_ribbon_panel.o \ + $(OBJS)\monolib_ribbon_toolbar.o \ + $(OBJS)\monolib_xh_ribbon.o \ + $(OBJS)\monolib_richtextbuffer.o \ + $(OBJS)\monolib_richtextctrl.o \ + $(OBJS)\monolib_richtextformatdlg.o \ + $(OBJS)\monolib_richtexthtml.o \ + $(OBJS)\monolib_richtextimagedlg.o \ + $(OBJS)\monolib_richtextprint.o \ + $(OBJS)\monolib_richtextstyledlg.o \ + $(OBJS)\monolib_richtextstyles.o \ + $(OBJS)\monolib_richtextsymboldlg.o \ + $(OBJS)\monolib_richtextxml.o \ + $(OBJS)\monolib_xh_richtext.o \ + $(OBJS)\monolib_stc.o \ + $(OBJS)\monolib_PlatWX.o \ + $(OBJS)\monolib_ScintillaWX.o +endif +ifeq ($(USE_GUI),1) +ifeq ($(WXUNIV),0) +____CORE_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_activex.o \ + $(OBJS)\monolib_app.o \ + $(OBJS)\monolib_bitmap.o \ + $(OBJS)\monolib_brush.o \ + $(OBJS)\monolib_caret.o \ + $(OBJS)\monolib_clipbrd.o \ + $(OBJS)\monolib_colour.o \ + $(OBJS)\monolib_cursor.o \ + $(OBJS)\monolib_data.o \ + $(OBJS)\monolib_dc.o \ + $(OBJS)\monolib_dcclient.o \ + $(OBJS)\monolib_dcmemory.o \ + $(OBJS)\monolib_dcprint.o \ + $(OBJS)\monolib_dcscreen.o \ + $(OBJS)\monolib_dialup.o \ + $(OBJS)\monolib_dib.o \ + $(OBJS)\monolib_display.o \ + $(OBJS)\monolib_enhmeta.o \ + $(OBJS)\monolib_font.o \ + $(OBJS)\monolib_fontenum.o \ + $(OBJS)\monolib_fontutil.o \ + $(OBJS)\monolib_gdiimage.o \ + $(OBJS)\monolib_gdiobj.o \ + $(OBJS)\monolib_gdiplus.o \ + $(OBJS)\monolib_graphics.o \ + $(OBJS)\monolib_icon.o \ + $(OBJS)\monolib_imaglist.o \ + $(OBJS)\monolib_minifram.o \ + $(OBJS)\monolib_nonownedwnd.o \ + $(OBJS)\monolib_dataobj.o \ + $(OBJS)\monolib_dropsrc.o \ + $(OBJS)\monolib_droptgt.o \ + $(OBJS)\monolib_oleutils.o \ + $(OBJS)\monolib_safearray.o \ + $(OBJS)\monolib_palette.o \ + $(OBJS)\monolib_pen.o \ + $(OBJS)\monolib_popupwin.o \ + $(OBJS)\monolib_printdlg.o \ + $(OBJS)\monolib_printwin.o \ + $(OBJS)\monolib_region.o \ + $(OBJS)\monolib_renderer.o \ + $(OBJS)\monolib_settings.o \ + $(OBJS)\monolib_textmeasure.o \ + $(OBJS)\monolib_tooltip.o \ + $(OBJS)\monolib_toplevel.o \ + $(OBJS)\monolib_uiaction.o \ + $(OBJS)\monolib_utilsgui.o \ + $(OBJS)\monolib_utilswin.o \ + $(OBJS)\monolib_uxtheme.o \ + $(OBJS)\monolib_window.o \ + $(OBJS)\monolib_helpchm.o \ + $(OBJS)\monolib_helpwin.o \ + $(OBJS)\monolib_automtn.o \ + $(OBJS)\monolib_uuid.o \ + $(OBJS)\monolib_clrpickerg.o \ + $(OBJS)\monolib_collpaneg.o \ + $(OBJS)\monolib_filepickerg.o \ + $(OBJS)\monolib_fontpickerg.o \ + $(OBJS)\monolib_generic_statusbr.o \ + $(OBJS)\monolib_prntdlgg.o \ + $(OBJS)\monolib_msw_accel.o \ + $(OBJS)\monolib_anybutton.o \ + $(OBJS)\monolib_artmsw.o \ + $(OBJS)\monolib_msw_bmpbuttn.o \ + $(OBJS)\monolib_msw_button.o \ + $(OBJS)\monolib_msw_checkbox.o \ + $(OBJS)\monolib_msw_choice.o \ + $(OBJS)\monolib_colordlg.o \ + $(OBJS)\monolib_combo.o \ + $(OBJS)\monolib_msw_combobox.o \ + $(OBJS)\monolib_msw_control.o \ + $(OBJS)\monolib_msw_dialog.o \ + $(OBJS)\monolib_dirdlg.o \ + $(OBJS)\monolib_dragimag.o \ + $(OBJS)\monolib_evtloop.o \ + $(OBJS)\monolib_filedlg.o \ + $(OBJS)\monolib_frame.o \ + $(OBJS)\monolib_msw_gauge.o \ + $(OBJS)\monolib_headerctrl.o \ + $(OBJS)\monolib_iniconf.o \ + $(OBJS)\monolib_msw_listbox.o \ + $(OBJS)\monolib_msw_listctrl.o \ + $(OBJS)\monolib_mdi.o \ + $(OBJS)\monolib_msw_menu.o \ + $(OBJS)\monolib_menuitem.o \ + $(OBJS)\monolib_metafile.o \ + $(OBJS)\monolib_msgdlg.o \ + $(OBJS)\monolib_nativdlg.o \ + $(OBJS)\monolib_nativewin.o \ + $(OBJS)\monolib_msw_notebook.o \ + $(OBJS)\monolib_access.o \ + $(OBJS)\monolib_ownerdrw.o \ + $(OBJS)\monolib_msw_panel.o \ + $(OBJS)\monolib_progdlg.o \ + $(OBJS)\monolib_msw_radiobox.o \ + $(OBJS)\monolib_msw_radiobut.o \ + $(OBJS)\monolib_richmsgdlg.o \ + $(OBJS)\monolib_msw_scrolbar.o \ + $(OBJS)\monolib_msw_slider.o \ + $(OBJS)\monolib_msw_spinbutt.o \ + $(OBJS)\monolib_spinctrl.o \ + $(OBJS)\monolib_msw_statbmp.o \ + $(OBJS)\monolib_msw_statbox.o \ + $(OBJS)\monolib_statusbar.o \ + $(OBJS)\monolib_msw_statline.o \ + $(OBJS)\monolib_msw_stattext.o \ + $(OBJS)\monolib_msw_toolbar.o \ + $(OBJS)\monolib_msw_textctrl.o \ + $(OBJS)\monolib_textentry.o \ + $(OBJS)\monolib_msw_tglbtn.o \ + $(OBJS)\monolib_treectrl.o \ + $(OBJS)\monolib_msw_checklst.o \ + $(OBJS)\monolib_msw_fdrepdlg.o \ + $(OBJS)\monolib_fontdlg.o \ + $(OBJS)\monolib_accelcmn.o \ + $(OBJS)\monolib_accesscmn.o \ + $(OBJS)\monolib_anidecod.o \ + $(OBJS)\monolib_affinematrix2d.o \ + $(OBJS)\monolib_appcmn.o \ + $(OBJS)\monolib_artprov.o \ + $(OBJS)\monolib_artstd.o \ + $(OBJS)\monolib_arttango.o \ + $(OBJS)\monolib_bmpbase.o \ + $(OBJS)\monolib_bmpbtncmn.o \ + $(OBJS)\monolib_bookctrl.o \ + $(OBJS)\monolib_btncmn.o \ + $(OBJS)\monolib_cairo.o \ + $(OBJS)\monolib_checkboxcmn.o \ + $(OBJS)\monolib_checklstcmn.o \ + $(OBJS)\monolib_choiccmn.o \ + $(OBJS)\monolib_clipcmn.o \ + $(OBJS)\monolib_clrpickercmn.o \ + $(OBJS)\monolib_colourcmn.o \ + $(OBJS)\monolib_colourdata.o \ + $(OBJS)\monolib_combocmn.o \ + $(OBJS)\monolib_cmdproc.o \ + $(OBJS)\monolib_cmndata.o \ + $(OBJS)\monolib_containr.o \ + $(OBJS)\monolib_cshelp.o \ + $(OBJS)\monolib_ctrlcmn.o \ + $(OBJS)\monolib_ctrlsub.o \ + $(OBJS)\monolib_dcbase.o \ + $(OBJS)\monolib_dcbufcmn.o \ + $(OBJS)\monolib_dcgraph.o \ + $(OBJS)\monolib_dcsvg.o \ + $(OBJS)\monolib_dirctrlcmn.o \ + $(OBJS)\monolib_dlgcmn.o \ + $(OBJS)\monolib_dndcmn.o \ + $(OBJS)\monolib_dobjcmn.o \ + $(OBJS)\monolib_docmdi.o \ + $(OBJS)\monolib_docview.o \ + $(OBJS)\monolib_dpycmn.o \ + $(OBJS)\monolib_dseldlg.o \ + $(OBJS)\monolib_effects.o \ + $(OBJS)\monolib_fddlgcmn.o \ + $(OBJS)\monolib_filectrlcmn.o \ + $(OBJS)\monolib_filehistorycmn.o \ + $(OBJS)\monolib_filepickercmn.o \ + $(OBJS)\monolib_fontpickercmn.o \ + $(OBJS)\monolib_fldlgcmn.o \ + $(OBJS)\monolib_fontcmn.o \ + $(OBJS)\monolib_fontdata.o \ + $(OBJS)\monolib_graphicc.o \ + $(OBJS)\monolib_fontenumcmn.o \ + $(OBJS)\monolib_fontmap.o \ + $(OBJS)\monolib_fontutilcmn.o \ + $(OBJS)\monolib_framecmn.o \ + $(OBJS)\monolib_gaugecmn.o \ + $(OBJS)\monolib_gbsizer.o \ + $(OBJS)\monolib_gdicmn.o \ + $(OBJS)\monolib_geometry.o \ + $(OBJS)\monolib_gifdecod.o \ + $(OBJS)\monolib_graphcmn.o \ + $(OBJS)\monolib_headercolcmn.o \ + $(OBJS)\monolib_headerctrlcmn.o \ + $(OBJS)\monolib_helpbase.o \ + $(OBJS)\monolib_iconbndl.o \ + $(OBJS)\monolib_imagall.o \ + $(OBJS)\monolib_imagbmp.o \ + $(OBJS)\monolib_image.o \ + $(OBJS)\monolib_imagfill.o \ + $(OBJS)\monolib_imaggif.o \ + $(OBJS)\monolib_imagiff.o \ + $(OBJS)\monolib_imagjpeg.o \ + $(OBJS)\monolib_imagpcx.o \ + $(OBJS)\monolib_imagpng.o \ + $(OBJS)\monolib_imagpnm.o \ + $(OBJS)\monolib_imagtga.o \ + $(OBJS)\monolib_imagtiff.o \ + $(OBJS)\monolib_imagxpm.o \ + $(OBJS)\monolib_layout.o \ + $(OBJS)\monolib_lboxcmn.o \ + $(OBJS)\monolib_listctrlcmn.o \ + $(OBJS)\monolib_markupparser.o \ + $(OBJS)\monolib_matrix.o \ + $(OBJS)\monolib_menucmn.o \ + $(OBJS)\monolib_modalhook.o \ + $(OBJS)\monolib_mousemanager.o \ + $(OBJS)\monolib_nbkbase.o \ + $(OBJS)\monolib_overlaycmn.o \ + $(OBJS)\monolib_ownerdrwcmn.o \ + $(OBJS)\monolib_paper.o \ + $(OBJS)\monolib_panelcmn.o \ + $(OBJS)\monolib_persist.o \ + $(OBJS)\monolib_pickerbase.o \ + $(OBJS)\monolib_popupcmn.o \ + $(OBJS)\monolib_preferencescmn.o \ + $(OBJS)\monolib_prntbase.o \ + $(OBJS)\monolib_quantize.o \ + $(OBJS)\monolib_radiobtncmn.o \ + $(OBJS)\monolib_radiocmn.o \ + $(OBJS)\monolib_rearrangectrl.o \ + $(OBJS)\monolib_rendcmn.o \ + $(OBJS)\monolib_rgncmn.o \ + $(OBJS)\monolib_scrolbarcmn.o \ + $(OBJS)\monolib_settcmn.o \ + $(OBJS)\monolib_sizer.o \ + $(OBJS)\monolib_slidercmn.o \ + $(OBJS)\monolib_spinbtncmn.o \ + $(OBJS)\monolib_spinctrlcmn.o \ + $(OBJS)\monolib_srchcmn.o \ + $(OBJS)\monolib_statbar.o \ + $(OBJS)\monolib_statbmpcmn.o \ + $(OBJS)\monolib_statboxcmn.o \ + $(OBJS)\monolib_statlinecmn.o \ + $(OBJS)\monolib_stattextcmn.o \ + $(OBJS)\monolib_stockitem.o \ + $(OBJS)\monolib_tbarbase.o \ + $(OBJS)\monolib_textcmn.o \ + $(OBJS)\monolib_textentrycmn.o \ + $(OBJS)\monolib_textmeasurecmn.o \ + $(OBJS)\monolib_toplvcmn.o \ + $(OBJS)\monolib_treebase.o \ + $(OBJS)\monolib_uiactioncmn.o \ + $(OBJS)\monolib_valgen.o \ + $(OBJS)\monolib_validate.o \ + $(OBJS)\monolib_valtext.o \ + $(OBJS)\monolib_valnum.o \ + $(OBJS)\monolib_wincmn.o \ + $(OBJS)\monolib_windowid.o \ + $(OBJS)\monolib_wrapsizer.o \ + $(OBJS)\monolib_xpmdecod.o \ + $(OBJS)\monolib_busyinfo.o \ + $(OBJS)\monolib_generic_buttonbar.o \ + $(OBJS)\monolib_choicdgg.o \ + $(OBJS)\monolib_choicbkg.o \ + $(OBJS)\monolib_combog.o \ + $(OBJS)\monolib_dcpsg.o \ + $(OBJS)\monolib_dirctrlg.o \ + $(OBJS)\monolib_dragimgg.o \ + $(OBJS)\monolib_filectrlg.o \ + $(OBJS)\monolib_headerctrlg.o \ + $(OBJS)\monolib_infobar.o \ + $(OBJS)\monolib_listbkg.o \ + $(OBJS)\monolib_logg.o \ + $(OBJS)\monolib_markuptext.o \ + $(OBJS)\monolib_msgdlgg.o \ + $(OBJS)\monolib_numdlgg.o \ + $(OBJS)\monolib_progdlgg.o \ + $(OBJS)\monolib_preferencesg.o \ + $(OBJS)\monolib_printps.o \ + $(OBJS)\monolib_renderg.o \ + $(OBJS)\monolib_richmsgdlgg.o \ + $(OBJS)\monolib_scrlwing.o \ + $(OBJS)\monolib_selstore.o \ + $(OBJS)\monolib_spinctlg.o \ + $(OBJS)\monolib_splitter.o \ + $(OBJS)\monolib_srchctlg.o \ + $(OBJS)\monolib_statbmpg.o \ + $(OBJS)\monolib_stattextg.o \ + $(OBJS)\monolib_textdlgg.o \ + $(OBJS)\monolib_tipwin.o \ + $(OBJS)\monolib_toolbkg.o \ + $(OBJS)\monolib_treectlg.o \ + $(OBJS)\monolib_treebkg.o \ + $(OBJS)\monolib_vlbox.o \ + $(OBJS)\monolib_vscroll.o \ + $(OBJS)\monolib_xmlreshandler.o +endif +endif +ifeq ($(USE_GUI),1) +ifeq ($(WXUNIV),1) +____CORE_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_activex.o \ + $(OBJS)\monolib_app.o \ + $(OBJS)\monolib_bitmap.o \ + $(OBJS)\monolib_brush.o \ + $(OBJS)\monolib_caret.o \ + $(OBJS)\monolib_clipbrd.o \ + $(OBJS)\monolib_colour.o \ + $(OBJS)\monolib_cursor.o \ + $(OBJS)\monolib_data.o \ + $(OBJS)\monolib_dc.o \ + $(OBJS)\monolib_dcclient.o \ + $(OBJS)\monolib_dcmemory.o \ + $(OBJS)\monolib_dcprint.o \ + $(OBJS)\monolib_dcscreen.o \ + $(OBJS)\monolib_dialup.o \ + $(OBJS)\monolib_dib.o \ + $(OBJS)\monolib_display.o \ + $(OBJS)\monolib_enhmeta.o \ + $(OBJS)\monolib_font.o \ + $(OBJS)\monolib_fontenum.o \ + $(OBJS)\monolib_fontutil.o \ + $(OBJS)\monolib_gdiimage.o \ + $(OBJS)\monolib_gdiobj.o \ + $(OBJS)\monolib_gdiplus.o \ + $(OBJS)\monolib_graphics.o \ + $(OBJS)\monolib_icon.o \ + $(OBJS)\monolib_imaglist.o \ + $(OBJS)\monolib_minifram.o \ + $(OBJS)\monolib_nonownedwnd.o \ + $(OBJS)\monolib_dataobj.o \ + $(OBJS)\monolib_dropsrc.o \ + $(OBJS)\monolib_droptgt.o \ + $(OBJS)\monolib_oleutils.o \ + $(OBJS)\monolib_safearray.o \ + $(OBJS)\monolib_palette.o \ + $(OBJS)\monolib_pen.o \ + $(OBJS)\monolib_popupwin.o \ + $(OBJS)\monolib_printdlg.o \ + $(OBJS)\monolib_printwin.o \ + $(OBJS)\monolib_region.o \ + $(OBJS)\monolib_renderer.o \ + $(OBJS)\monolib_settings.o \ + $(OBJS)\monolib_textmeasure.o \ + $(OBJS)\monolib_tooltip.o \ + $(OBJS)\monolib_toplevel.o \ + $(OBJS)\monolib_uiaction.o \ + $(OBJS)\monolib_utilsgui.o \ + $(OBJS)\monolib_utilswin.o \ + $(OBJS)\monolib_uxtheme.o \ + $(OBJS)\monolib_window.o \ + $(OBJS)\monolib_helpchm.o \ + $(OBJS)\monolib_helpwin.o \ + $(OBJS)\monolib_automtn.o \ + $(OBJS)\monolib_uuid.o \ + $(OBJS)\monolib_evtloop.o \ + $(OBJS)\monolib_generic_accel.o \ + $(OBJS)\monolib_clrpickerg.o \ + $(OBJS)\monolib_collpaneg.o \ + $(OBJS)\monolib_colrdlgg.o \ + $(OBJS)\monolib_dirdlgg.o \ + $(OBJS)\monolib_generic_fdrepdlg.o \ + $(OBJS)\monolib_filedlgg.o \ + $(OBJS)\monolib_filepickerg.o \ + $(OBJS)\monolib_fontdlgg.o \ + $(OBJS)\monolib_fontpickerg.o \ + $(OBJS)\monolib_generic_listctrl.o \ + $(OBJS)\monolib_mdig.o \ + $(OBJS)\monolib_prntdlgg.o \ + $(OBJS)\monolib_univ_bmpbuttn.o \ + $(OBJS)\monolib_univ_button.o \ + $(OBJS)\monolib_univ_checkbox.o \ + $(OBJS)\monolib_univ_checklst.o \ + $(OBJS)\monolib_univ_choice.o \ + $(OBJS)\monolib_univ_combobox.o \ + $(OBJS)\monolib_univ_control.o \ + $(OBJS)\monolib_ctrlrend.o \ + $(OBJS)\monolib_univ_dialog.o \ + $(OBJS)\monolib_framuniv.o \ + $(OBJS)\monolib_univ_gauge.o \ + $(OBJS)\monolib_inpcons.o \ + $(OBJS)\monolib_inphand.o \ + $(OBJS)\monolib_univ_listbox.o \ + $(OBJS)\monolib_univ_menu.o \ + $(OBJS)\monolib_univ_notebook.o \ + $(OBJS)\monolib_univ_radiobox.o \ + $(OBJS)\monolib_univ_radiobut.o \ + $(OBJS)\monolib_scrarrow.o \ + $(OBJS)\monolib_univ_scrolbar.o \ + $(OBJS)\monolib_scrthumb.o \ + $(OBJS)\monolib_settingsuniv.o \ + $(OBJS)\monolib_univ_slider.o \ + $(OBJS)\monolib_univ_spinbutt.o \ + $(OBJS)\monolib_univ_statbmp.o \ + $(OBJS)\monolib_univ_statbox.o \ + $(OBJS)\monolib_univ_statline.o \ + $(OBJS)\monolib_univ_stattext.o \ + $(OBJS)\monolib_univ_statusbr.o \ + $(OBJS)\monolib_stdrend.o \ + $(OBJS)\monolib_univ_textctrl.o \ + $(OBJS)\monolib_univ_tglbtn.o \ + $(OBJS)\monolib_theme.o \ + $(OBJS)\monolib_univ_toolbar.o \ + $(OBJS)\monolib_topluniv.o \ + $(OBJS)\monolib_winuniv.o \ + $(OBJS)\monolib_gtk.o \ + $(OBJS)\monolib_metal.o \ + $(OBJS)\monolib_mono.o \ + $(OBJS)\monolib_win32.o \ + $(OBJS)\monolib_accelcmn.o \ + $(OBJS)\monolib_accesscmn.o \ + $(OBJS)\monolib_anidecod.o \ + $(OBJS)\monolib_affinematrix2d.o \ + $(OBJS)\monolib_appcmn.o \ + $(OBJS)\monolib_artprov.o \ + $(OBJS)\monolib_artstd.o \ + $(OBJS)\monolib_arttango.o \ + $(OBJS)\monolib_bmpbase.o \ + $(OBJS)\monolib_bmpbtncmn.o \ + $(OBJS)\monolib_bookctrl.o \ + $(OBJS)\monolib_btncmn.o \ + $(OBJS)\monolib_cairo.o \ + $(OBJS)\monolib_checkboxcmn.o \ + $(OBJS)\monolib_checklstcmn.o \ + $(OBJS)\monolib_choiccmn.o \ + $(OBJS)\monolib_clipcmn.o \ + $(OBJS)\monolib_clrpickercmn.o \ + $(OBJS)\monolib_colourcmn.o \ + $(OBJS)\monolib_colourdata.o \ + $(OBJS)\monolib_combocmn.o \ + $(OBJS)\monolib_cmdproc.o \ + $(OBJS)\monolib_cmndata.o \ + $(OBJS)\monolib_containr.o \ + $(OBJS)\monolib_cshelp.o \ + $(OBJS)\monolib_ctrlcmn.o \ + $(OBJS)\monolib_ctrlsub.o \ + $(OBJS)\monolib_dcbase.o \ + $(OBJS)\monolib_dcbufcmn.o \ + $(OBJS)\monolib_dcgraph.o \ + $(OBJS)\monolib_dcsvg.o \ + $(OBJS)\monolib_dirctrlcmn.o \ + $(OBJS)\monolib_dlgcmn.o \ + $(OBJS)\monolib_dndcmn.o \ + $(OBJS)\monolib_dobjcmn.o \ + $(OBJS)\monolib_docmdi.o \ + $(OBJS)\monolib_docview.o \ + $(OBJS)\monolib_dpycmn.o \ + $(OBJS)\monolib_dseldlg.o \ + $(OBJS)\monolib_effects.o \ + $(OBJS)\monolib_fddlgcmn.o \ + $(OBJS)\monolib_filectrlcmn.o \ + $(OBJS)\monolib_filehistorycmn.o \ + $(OBJS)\monolib_filepickercmn.o \ + $(OBJS)\monolib_fontpickercmn.o \ + $(OBJS)\monolib_fldlgcmn.o \ + $(OBJS)\monolib_fontcmn.o \ + $(OBJS)\monolib_fontdata.o \ + $(OBJS)\monolib_graphicc.o \ + $(OBJS)\monolib_fontenumcmn.o \ + $(OBJS)\monolib_fontmap.o \ + $(OBJS)\monolib_fontutilcmn.o \ + $(OBJS)\monolib_framecmn.o \ + $(OBJS)\monolib_gaugecmn.o \ + $(OBJS)\monolib_gbsizer.o \ + $(OBJS)\monolib_gdicmn.o \ + $(OBJS)\monolib_geometry.o \ + $(OBJS)\monolib_gifdecod.o \ + $(OBJS)\monolib_graphcmn.o \ + $(OBJS)\monolib_headercolcmn.o \ + $(OBJS)\monolib_headerctrlcmn.o \ + $(OBJS)\monolib_helpbase.o \ + $(OBJS)\monolib_iconbndl.o \ + $(OBJS)\monolib_imagall.o \ + $(OBJS)\monolib_imagbmp.o \ + $(OBJS)\monolib_image.o \ + $(OBJS)\monolib_imagfill.o \ + $(OBJS)\monolib_imaggif.o \ + $(OBJS)\monolib_imagiff.o \ + $(OBJS)\monolib_imagjpeg.o \ + $(OBJS)\monolib_imagpcx.o \ + $(OBJS)\monolib_imagpng.o \ + $(OBJS)\monolib_imagpnm.o \ + $(OBJS)\monolib_imagtga.o \ + $(OBJS)\monolib_imagtiff.o \ + $(OBJS)\monolib_imagxpm.o \ + $(OBJS)\monolib_layout.o \ + $(OBJS)\monolib_lboxcmn.o \ + $(OBJS)\monolib_listctrlcmn.o \ + $(OBJS)\monolib_markupparser.o \ + $(OBJS)\monolib_matrix.o \ + $(OBJS)\monolib_menucmn.o \ + $(OBJS)\monolib_modalhook.o \ + $(OBJS)\monolib_mousemanager.o \ + $(OBJS)\monolib_nbkbase.o \ + $(OBJS)\monolib_overlaycmn.o \ + $(OBJS)\monolib_ownerdrwcmn.o \ + $(OBJS)\monolib_paper.o \ + $(OBJS)\monolib_panelcmn.o \ + $(OBJS)\monolib_persist.o \ + $(OBJS)\monolib_pickerbase.o \ + $(OBJS)\monolib_popupcmn.o \ + $(OBJS)\monolib_preferencescmn.o \ + $(OBJS)\monolib_prntbase.o \ + $(OBJS)\monolib_quantize.o \ + $(OBJS)\monolib_radiobtncmn.o \ + $(OBJS)\monolib_radiocmn.o \ + $(OBJS)\monolib_rearrangectrl.o \ + $(OBJS)\monolib_rendcmn.o \ + $(OBJS)\monolib_rgncmn.o \ + $(OBJS)\monolib_scrolbarcmn.o \ + $(OBJS)\monolib_settcmn.o \ + $(OBJS)\monolib_sizer.o \ + $(OBJS)\monolib_slidercmn.o \ + $(OBJS)\monolib_spinbtncmn.o \ + $(OBJS)\monolib_spinctrlcmn.o \ + $(OBJS)\monolib_srchcmn.o \ + $(OBJS)\monolib_statbar.o \ + $(OBJS)\monolib_statbmpcmn.o \ + $(OBJS)\monolib_statboxcmn.o \ + $(OBJS)\monolib_statlinecmn.o \ + $(OBJS)\monolib_stattextcmn.o \ + $(OBJS)\monolib_stockitem.o \ + $(OBJS)\monolib_tbarbase.o \ + $(OBJS)\monolib_textcmn.o \ + $(OBJS)\monolib_textentrycmn.o \ + $(OBJS)\monolib_textmeasurecmn.o \ + $(OBJS)\monolib_toplvcmn.o \ + $(OBJS)\monolib_treebase.o \ + $(OBJS)\monolib_uiactioncmn.o \ + $(OBJS)\monolib_valgen.o \ + $(OBJS)\monolib_validate.o \ + $(OBJS)\monolib_valtext.o \ + $(OBJS)\monolib_valnum.o \ + $(OBJS)\monolib_wincmn.o \ + $(OBJS)\monolib_windowid.o \ + $(OBJS)\monolib_wrapsizer.o \ + $(OBJS)\monolib_xpmdecod.o \ + $(OBJS)\monolib_busyinfo.o \ + $(OBJS)\monolib_generic_buttonbar.o \ + $(OBJS)\monolib_choicdgg.o \ + $(OBJS)\monolib_choicbkg.o \ + $(OBJS)\monolib_combog.o \ + $(OBJS)\monolib_dcpsg.o \ + $(OBJS)\monolib_dirctrlg.o \ + $(OBJS)\monolib_dragimgg.o \ + $(OBJS)\monolib_filectrlg.o \ + $(OBJS)\monolib_headerctrlg.o \ + $(OBJS)\monolib_infobar.o \ + $(OBJS)\monolib_listbkg.o \ + $(OBJS)\monolib_logg.o \ + $(OBJS)\monolib_markuptext.o \ + $(OBJS)\monolib_msgdlgg.o \ + $(OBJS)\monolib_numdlgg.o \ + $(OBJS)\monolib_progdlgg.o \ + $(OBJS)\monolib_preferencesg.o \ + $(OBJS)\monolib_printps.o \ + $(OBJS)\monolib_renderg.o \ + $(OBJS)\monolib_richmsgdlgg.o \ + $(OBJS)\monolib_scrlwing.o \ + $(OBJS)\monolib_selstore.o \ + $(OBJS)\monolib_spinctlg.o \ + $(OBJS)\monolib_splitter.o \ + $(OBJS)\monolib_srchctlg.o \ + $(OBJS)\monolib_statbmpg.o \ + $(OBJS)\monolib_stattextg.o \ + $(OBJS)\monolib_textdlgg.o \ + $(OBJS)\monolib_tipwin.o \ + $(OBJS)\monolib_toolbkg.o \ + $(OBJS)\monolib_treectlg.o \ + $(OBJS)\monolib_treebkg.o \ + $(OBJS)\monolib_vlbox.o \ + $(OBJS)\monolib_vscroll.o \ + $(OBJS)\monolib_xmlreshandler.o +endif +endif +ifeq ($(WXUNIV),0) +____ADVANCED_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_animatecmn.o \ + $(OBJS)\monolib_bmpcboxcmn.o \ + $(OBJS)\monolib_calctrlcmn.o \ + $(OBJS)\monolib_datavcmn.o \ + $(OBJS)\monolib_gridcmn.o \ + $(OBJS)\monolib_hyperlnkcmn.o \ + $(OBJS)\monolib_odcombocmn.o \ + $(OBJS)\monolib_richtooltipcmn.o \ + $(OBJS)\monolib_aboutdlgg.o \ + $(OBJS)\monolib_bannerwindow.o \ + $(OBJS)\monolib_bmpcboxg.o \ + $(OBJS)\monolib_calctrlg.o \ + $(OBJS)\monolib_commandlinkbuttong.o \ + $(OBJS)\monolib_datavgen.o \ + $(OBJS)\monolib_datectlg.o \ + $(OBJS)\monolib_editlbox.o \ + $(OBJS)\monolib_grid.o \ + $(OBJS)\monolib_gridctrl.o \ + $(OBJS)\monolib_grideditors.o \ + $(OBJS)\monolib_gridsel.o \ + $(OBJS)\monolib_helpext.o \ + $(OBJS)\monolib_hyperlinkg.o \ + $(OBJS)\monolib_laywin.o \ + $(OBJS)\monolib_notifmsgg.o \ + $(OBJS)\monolib_odcombo.o \ + $(OBJS)\monolib_propdlg.o \ + $(OBJS)\monolib_richtooltipg.o \ + $(OBJS)\monolib_sashwin.o \ + $(OBJS)\monolib_splash.o \ + $(OBJS)\monolib_timectrlg.o \ + $(OBJS)\monolib_tipdlg.o \ + $(OBJS)\monolib_treelist.o \ + $(OBJS)\monolib_wizard.o \ + $(OBJS)\monolib_taskbarcmn.o \ + $(OBJS)\monolib_aboutdlg.o \ + $(OBJS)\monolib_notifmsg.o \ + $(OBJS)\monolib_richtooltip.o \ + $(OBJS)\monolib_sound.o \ + $(OBJS)\monolib_taskbar.o \ + $(OBJS)\monolib_joystick.o \ + $(OBJS)\monolib_animateg.o \ + $(OBJS)\monolib_bmpcbox.o \ + $(OBJS)\monolib_calctrl.o \ + $(OBJS)\monolib_commandlinkbutton.o \ + $(OBJS)\monolib_datecontrols.o \ + $(OBJS)\monolib_datectrl.o \ + $(OBJS)\monolib_datetimectrl.o \ + $(OBJS)\monolib_hyperlink.o \ + $(OBJS)\monolib_timectrl.o +endif +ifeq ($(WXUNIV),1) +____ADVANCED_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_animatecmn.o \ + $(OBJS)\monolib_bmpcboxcmn.o \ + $(OBJS)\monolib_calctrlcmn.o \ + $(OBJS)\monolib_datavcmn.o \ + $(OBJS)\monolib_gridcmn.o \ + $(OBJS)\monolib_hyperlnkcmn.o \ + $(OBJS)\monolib_odcombocmn.o \ + $(OBJS)\monolib_richtooltipcmn.o \ + $(OBJS)\monolib_aboutdlgg.o \ + $(OBJS)\monolib_bannerwindow.o \ + $(OBJS)\monolib_bmpcboxg.o \ + $(OBJS)\monolib_calctrlg.o \ + $(OBJS)\monolib_commandlinkbuttong.o \ + $(OBJS)\monolib_datavgen.o \ + $(OBJS)\monolib_datectlg.o \ + $(OBJS)\monolib_editlbox.o \ + $(OBJS)\monolib_grid.o \ + $(OBJS)\monolib_gridctrl.o \ + $(OBJS)\monolib_grideditors.o \ + $(OBJS)\monolib_gridsel.o \ + $(OBJS)\monolib_helpext.o \ + $(OBJS)\monolib_hyperlinkg.o \ + $(OBJS)\monolib_laywin.o \ + $(OBJS)\monolib_notifmsgg.o \ + $(OBJS)\monolib_odcombo.o \ + $(OBJS)\monolib_propdlg.o \ + $(OBJS)\monolib_richtooltipg.o \ + $(OBJS)\monolib_sashwin.o \ + $(OBJS)\monolib_splash.o \ + $(OBJS)\monolib_timectrlg.o \ + $(OBJS)\monolib_tipdlg.o \ + $(OBJS)\monolib_treelist.o \ + $(OBJS)\monolib_wizard.o \ + $(OBJS)\monolib_taskbarcmn.o \ + $(OBJS)\monolib_aboutdlg.o \ + $(OBJS)\monolib_notifmsg.o \ + $(OBJS)\monolib_richtooltip.o \ + $(OBJS)\monolib_sound.o \ + $(OBJS)\monolib_taskbar.o \ + $(OBJS)\monolib_joystick.o \ + $(OBJS)\monolib_animateg.o +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +__basedll___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +__baselib___depname = \ + $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +ifeq ($(SHARED),1) +____wxbase_namedll_DEP = $(__basedll___depname) +endif +ifeq ($(SHARED),0) +____wxbase_namelib_DEP = $(__baselib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +__netdll___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +__netlib___depname = \ + $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.a +endif +endif +ifeq ($(SHARED),1) +____wxnet_namedll_DEP = $(__netdll___depname) +endif +ifeq ($(SHARED),0) +____wxnet_namelib_DEP = $(__netlib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +__coredll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +ifeq ($(USE_GUI),1) +ifeq ($(WXUNIV),0) +____CORE_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\coredll_activex.o \ + $(OBJS)\coredll_app.o \ + $(OBJS)\coredll_bitmap.o \ + $(OBJS)\coredll_brush.o \ + $(OBJS)\coredll_caret.o \ + $(OBJS)\coredll_clipbrd.o \ + $(OBJS)\coredll_colour.o \ + $(OBJS)\coredll_cursor.o \ + $(OBJS)\coredll_data.o \ + $(OBJS)\coredll_dc.o \ + $(OBJS)\coredll_dcclient.o \ + $(OBJS)\coredll_dcmemory.o \ + $(OBJS)\coredll_dcprint.o \ + $(OBJS)\coredll_dcscreen.o \ + $(OBJS)\coredll_dialup.o \ + $(OBJS)\coredll_dib.o \ + $(OBJS)\coredll_display.o \ + $(OBJS)\coredll_enhmeta.o \ + $(OBJS)\coredll_font.o \ + $(OBJS)\coredll_fontenum.o \ + $(OBJS)\coredll_fontutil.o \ + $(OBJS)\coredll_gdiimage.o \ + $(OBJS)\coredll_gdiobj.o \ + $(OBJS)\coredll_gdiplus.o \ + $(OBJS)\coredll_graphics.o \ + $(OBJS)\coredll_icon.o \ + $(OBJS)\coredll_imaglist.o \ + $(OBJS)\coredll_minifram.o \ + $(OBJS)\coredll_nonownedwnd.o \ + $(OBJS)\coredll_dataobj.o \ + $(OBJS)\coredll_dropsrc.o \ + $(OBJS)\coredll_droptgt.o \ + $(OBJS)\coredll_oleutils.o \ + $(OBJS)\coredll_safearray.o \ + $(OBJS)\coredll_palette.o \ + $(OBJS)\coredll_pen.o \ + $(OBJS)\coredll_popupwin.o \ + $(OBJS)\coredll_printdlg.o \ + $(OBJS)\coredll_printwin.o \ + $(OBJS)\coredll_region.o \ + $(OBJS)\coredll_renderer.o \ + $(OBJS)\coredll_settings.o \ + $(OBJS)\coredll_textmeasure.o \ + $(OBJS)\coredll_tooltip.o \ + $(OBJS)\coredll_toplevel.o \ + $(OBJS)\coredll_uiaction.o \ + $(OBJS)\coredll_utilsgui.o \ + $(OBJS)\coredll_utilswin.o \ + $(OBJS)\coredll_uxtheme.o \ + $(OBJS)\coredll_window.o \ + $(OBJS)\coredll_helpchm.o \ + $(OBJS)\coredll_helpwin.o \ + $(OBJS)\coredll_automtn.o \ + $(OBJS)\coredll_uuid.o \ + $(OBJS)\coredll_clrpickerg.o \ + $(OBJS)\coredll_collpaneg.o \ + $(OBJS)\coredll_filepickerg.o \ + $(OBJS)\coredll_fontpickerg.o \ + $(OBJS)\coredll_generic_statusbr.o \ + $(OBJS)\coredll_prntdlgg.o \ + $(OBJS)\coredll_msw_accel.o \ + $(OBJS)\coredll_anybutton.o \ + $(OBJS)\coredll_artmsw.o \ + $(OBJS)\coredll_msw_bmpbuttn.o \ + $(OBJS)\coredll_msw_button.o \ + $(OBJS)\coredll_msw_checkbox.o \ + $(OBJS)\coredll_msw_choice.o \ + $(OBJS)\coredll_colordlg.o \ + $(OBJS)\coredll_combo.o \ + $(OBJS)\coredll_msw_combobox.o \ + $(OBJS)\coredll_msw_control.o \ + $(OBJS)\coredll_msw_dialog.o \ + $(OBJS)\coredll_dirdlg.o \ + $(OBJS)\coredll_dragimag.o \ + $(OBJS)\coredll_evtloop.o \ + $(OBJS)\coredll_filedlg.o \ + $(OBJS)\coredll_frame.o \ + $(OBJS)\coredll_msw_gauge.o \ + $(OBJS)\coredll_headerctrl.o \ + $(OBJS)\coredll_iniconf.o \ + $(OBJS)\coredll_msw_listbox.o \ + $(OBJS)\coredll_msw_listctrl.o \ + $(OBJS)\coredll_mdi.o \ + $(OBJS)\coredll_msw_menu.o \ + $(OBJS)\coredll_menuitem.o \ + $(OBJS)\coredll_metafile.o \ + $(OBJS)\coredll_msgdlg.o \ + $(OBJS)\coredll_nativdlg.o \ + $(OBJS)\coredll_nativewin.o \ + $(OBJS)\coredll_msw_notebook.o \ + $(OBJS)\coredll_access.o \ + $(OBJS)\coredll_ownerdrw.o \ + $(OBJS)\coredll_panel.o \ + $(OBJS)\coredll_progdlg.o \ + $(OBJS)\coredll_msw_radiobox.o \ + $(OBJS)\coredll_msw_radiobut.o \ + $(OBJS)\coredll_richmsgdlg.o \ + $(OBJS)\coredll_msw_scrolbar.o \ + $(OBJS)\coredll_msw_slider.o \ + $(OBJS)\coredll_msw_spinbutt.o \ + $(OBJS)\coredll_spinctrl.o \ + $(OBJS)\coredll_msw_statbmp.o \ + $(OBJS)\coredll_msw_statbox.o \ + $(OBJS)\coredll_statusbar.o \ + $(OBJS)\coredll_msw_statline.o \ + $(OBJS)\coredll_msw_stattext.o \ + $(OBJS)\coredll_msw_toolbar.o \ + $(OBJS)\coredll_msw_textctrl.o \ + $(OBJS)\coredll_textentry.o \ + $(OBJS)\coredll_msw_tglbtn.o \ + $(OBJS)\coredll_treectrl.o \ + $(OBJS)\coredll_msw_checklst.o \ + $(OBJS)\coredll_msw_fdrepdlg.o \ + $(OBJS)\coredll_fontdlg.o \ + $(OBJS)\coredll_accelcmn.o \ + $(OBJS)\coredll_accesscmn.o \ + $(OBJS)\coredll_anidecod.o \ + $(OBJS)\coredll_affinematrix2d.o \ + $(OBJS)\coredll_appcmn.o \ + $(OBJS)\coredll_artprov.o \ + $(OBJS)\coredll_artstd.o \ + $(OBJS)\coredll_arttango.o \ + $(OBJS)\coredll_bmpbase.o \ + $(OBJS)\coredll_bmpbtncmn.o \ + $(OBJS)\coredll_bookctrl.o \ + $(OBJS)\coredll_btncmn.o \ + $(OBJS)\coredll_cairo.o \ + $(OBJS)\coredll_checkboxcmn.o \ + $(OBJS)\coredll_checklstcmn.o \ + $(OBJS)\coredll_choiccmn.o \ + $(OBJS)\coredll_clipcmn.o \ + $(OBJS)\coredll_clrpickercmn.o \ + $(OBJS)\coredll_colourcmn.o \ + $(OBJS)\coredll_colourdata.o \ + $(OBJS)\coredll_combocmn.o \ + $(OBJS)\coredll_cmdproc.o \ + $(OBJS)\coredll_cmndata.o \ + $(OBJS)\coredll_containr.o \ + $(OBJS)\coredll_cshelp.o \ + $(OBJS)\coredll_ctrlcmn.o \ + $(OBJS)\coredll_ctrlsub.o \ + $(OBJS)\coredll_dcbase.o \ + $(OBJS)\coredll_dcbufcmn.o \ + $(OBJS)\coredll_dcgraph.o \ + $(OBJS)\coredll_dcsvg.o \ + $(OBJS)\coredll_dirctrlcmn.o \ + $(OBJS)\coredll_dlgcmn.o \ + $(OBJS)\coredll_dndcmn.o \ + $(OBJS)\coredll_dobjcmn.o \ + $(OBJS)\coredll_docmdi.o \ + $(OBJS)\coredll_docview.o \ + $(OBJS)\coredll_dpycmn.o \ + $(OBJS)\coredll_dseldlg.o \ + $(OBJS)\coredll_effects.o \ + $(OBJS)\coredll_fddlgcmn.o \ + $(OBJS)\coredll_filectrlcmn.o \ + $(OBJS)\coredll_filehistorycmn.o \ + $(OBJS)\coredll_filepickercmn.o \ + $(OBJS)\coredll_fontpickercmn.o \ + $(OBJS)\coredll_fldlgcmn.o \ + $(OBJS)\coredll_fontcmn.o \ + $(OBJS)\coredll_fontdata.o \ + $(OBJS)\coredll_graphicc.o \ + $(OBJS)\coredll_fontenumcmn.o \ + $(OBJS)\coredll_fontmap.o \ + $(OBJS)\coredll_fontutilcmn.o \ + $(OBJS)\coredll_framecmn.o \ + $(OBJS)\coredll_gaugecmn.o \ + $(OBJS)\coredll_gbsizer.o \ + $(OBJS)\coredll_gdicmn.o \ + $(OBJS)\coredll_geometry.o \ + $(OBJS)\coredll_gifdecod.o \ + $(OBJS)\coredll_graphcmn.o \ + $(OBJS)\coredll_headercolcmn.o \ + $(OBJS)\coredll_headerctrlcmn.o \ + $(OBJS)\coredll_helpbase.o \ + $(OBJS)\coredll_iconbndl.o \ + $(OBJS)\coredll_imagall.o \ + $(OBJS)\coredll_imagbmp.o \ + $(OBJS)\coredll_image.o \ + $(OBJS)\coredll_imagfill.o \ + $(OBJS)\coredll_imaggif.o \ + $(OBJS)\coredll_imagiff.o \ + $(OBJS)\coredll_imagjpeg.o \ + $(OBJS)\coredll_imagpcx.o \ + $(OBJS)\coredll_imagpng.o \ + $(OBJS)\coredll_imagpnm.o \ + $(OBJS)\coredll_imagtga.o \ + $(OBJS)\coredll_imagtiff.o \ + $(OBJS)\coredll_imagxpm.o \ + $(OBJS)\coredll_layout.o \ + $(OBJS)\coredll_lboxcmn.o \ + $(OBJS)\coredll_listctrlcmn.o \ + $(OBJS)\coredll_markupparser.o \ + $(OBJS)\coredll_matrix.o \ + $(OBJS)\coredll_menucmn.o \ + $(OBJS)\coredll_modalhook.o \ + $(OBJS)\coredll_mousemanager.o \ + $(OBJS)\coredll_nbkbase.o \ + $(OBJS)\coredll_overlaycmn.o \ + $(OBJS)\coredll_ownerdrwcmn.o \ + $(OBJS)\coredll_paper.o \ + $(OBJS)\coredll_panelcmn.o \ + $(OBJS)\coredll_persist.o \ + $(OBJS)\coredll_pickerbase.o \ + $(OBJS)\coredll_popupcmn.o \ + $(OBJS)\coredll_preferencescmn.o \ + $(OBJS)\coredll_prntbase.o \ + $(OBJS)\coredll_quantize.o \ + $(OBJS)\coredll_radiobtncmn.o \ + $(OBJS)\coredll_radiocmn.o \ + $(OBJS)\coredll_rearrangectrl.o \ + $(OBJS)\coredll_rendcmn.o \ + $(OBJS)\coredll_rgncmn.o \ + $(OBJS)\coredll_scrolbarcmn.o \ + $(OBJS)\coredll_settcmn.o \ + $(OBJS)\coredll_sizer.o \ + $(OBJS)\coredll_slidercmn.o \ + $(OBJS)\coredll_spinbtncmn.o \ + $(OBJS)\coredll_spinctrlcmn.o \ + $(OBJS)\coredll_srchcmn.o \ + $(OBJS)\coredll_statbar.o \ + $(OBJS)\coredll_statbmpcmn.o \ + $(OBJS)\coredll_statboxcmn.o \ + $(OBJS)\coredll_statlinecmn.o \ + $(OBJS)\coredll_stattextcmn.o \ + $(OBJS)\coredll_stockitem.o \ + $(OBJS)\coredll_tbarbase.o \ + $(OBJS)\coredll_textcmn.o \ + $(OBJS)\coredll_textentrycmn.o \ + $(OBJS)\coredll_textmeasurecmn.o \ + $(OBJS)\coredll_toplvcmn.o \ + $(OBJS)\coredll_treebase.o \ + $(OBJS)\coredll_uiactioncmn.o \ + $(OBJS)\coredll_valgen.o \ + $(OBJS)\coredll_validate.o \ + $(OBJS)\coredll_valtext.o \ + $(OBJS)\coredll_valnum.o \ + $(OBJS)\coredll_wincmn.o \ + $(OBJS)\coredll_windowid.o \ + $(OBJS)\coredll_wrapsizer.o \ + $(OBJS)\coredll_xpmdecod.o \ + $(OBJS)\coredll_busyinfo.o \ + $(OBJS)\coredll_buttonbar.o \ + $(OBJS)\coredll_choicdgg.o \ + $(OBJS)\coredll_choicbkg.o \ + $(OBJS)\coredll_combog.o \ + $(OBJS)\coredll_dcpsg.o \ + $(OBJS)\coredll_dirctrlg.o \ + $(OBJS)\coredll_dragimgg.o \ + $(OBJS)\coredll_filectrlg.o \ + $(OBJS)\coredll_headerctrlg.o \ + $(OBJS)\coredll_infobar.o \ + $(OBJS)\coredll_listbkg.o \ + $(OBJS)\coredll_logg.o \ + $(OBJS)\coredll_markuptext.o \ + $(OBJS)\coredll_msgdlgg.o \ + $(OBJS)\coredll_numdlgg.o \ + $(OBJS)\coredll_progdlgg.o \ + $(OBJS)\coredll_preferencesg.o \ + $(OBJS)\coredll_printps.o \ + $(OBJS)\coredll_renderg.o \ + $(OBJS)\coredll_richmsgdlgg.o \ + $(OBJS)\coredll_scrlwing.o \ + $(OBJS)\coredll_selstore.o \ + $(OBJS)\coredll_spinctlg.o \ + $(OBJS)\coredll_splitter.o \ + $(OBJS)\coredll_srchctlg.o \ + $(OBJS)\coredll_statbmpg.o \ + $(OBJS)\coredll_stattextg.o \ + $(OBJS)\coredll_textdlgg.o \ + $(OBJS)\coredll_tipwin.o \ + $(OBJS)\coredll_toolbkg.o \ + $(OBJS)\coredll_treectlg.o \ + $(OBJS)\coredll_treebkg.o \ + $(OBJS)\coredll_vlbox.o \ + $(OBJS)\coredll_vscroll.o \ + $(OBJS)\coredll_xmlreshandler.o +endif +endif +ifeq ($(USE_GUI),1) +ifeq ($(WXUNIV),1) +____CORE_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\coredll_activex.o \ + $(OBJS)\coredll_app.o \ + $(OBJS)\coredll_bitmap.o \ + $(OBJS)\coredll_brush.o \ + $(OBJS)\coredll_caret.o \ + $(OBJS)\coredll_clipbrd.o \ + $(OBJS)\coredll_colour.o \ + $(OBJS)\coredll_cursor.o \ + $(OBJS)\coredll_data.o \ + $(OBJS)\coredll_dc.o \ + $(OBJS)\coredll_dcclient.o \ + $(OBJS)\coredll_dcmemory.o \ + $(OBJS)\coredll_dcprint.o \ + $(OBJS)\coredll_dcscreen.o \ + $(OBJS)\coredll_dialup.o \ + $(OBJS)\coredll_dib.o \ + $(OBJS)\coredll_display.o \ + $(OBJS)\coredll_enhmeta.o \ + $(OBJS)\coredll_font.o \ + $(OBJS)\coredll_fontenum.o \ + $(OBJS)\coredll_fontutil.o \ + $(OBJS)\coredll_gdiimage.o \ + $(OBJS)\coredll_gdiobj.o \ + $(OBJS)\coredll_gdiplus.o \ + $(OBJS)\coredll_graphics.o \ + $(OBJS)\coredll_icon.o \ + $(OBJS)\coredll_imaglist.o \ + $(OBJS)\coredll_minifram.o \ + $(OBJS)\coredll_nonownedwnd.o \ + $(OBJS)\coredll_dataobj.o \ + $(OBJS)\coredll_dropsrc.o \ + $(OBJS)\coredll_droptgt.o \ + $(OBJS)\coredll_oleutils.o \ + $(OBJS)\coredll_safearray.o \ + $(OBJS)\coredll_palette.o \ + $(OBJS)\coredll_pen.o \ + $(OBJS)\coredll_popupwin.o \ + $(OBJS)\coredll_printdlg.o \ + $(OBJS)\coredll_printwin.o \ + $(OBJS)\coredll_region.o \ + $(OBJS)\coredll_renderer.o \ + $(OBJS)\coredll_settings.o \ + $(OBJS)\coredll_textmeasure.o \ + $(OBJS)\coredll_tooltip.o \ + $(OBJS)\coredll_toplevel.o \ + $(OBJS)\coredll_uiaction.o \ + $(OBJS)\coredll_utilsgui.o \ + $(OBJS)\coredll_utilswin.o \ + $(OBJS)\coredll_uxtheme.o \ + $(OBJS)\coredll_window.o \ + $(OBJS)\coredll_helpchm.o \ + $(OBJS)\coredll_helpwin.o \ + $(OBJS)\coredll_automtn.o \ + $(OBJS)\coredll_uuid.o \ + $(OBJS)\coredll_evtloop.o \ + $(OBJS)\coredll_generic_accel.o \ + $(OBJS)\coredll_clrpickerg.o \ + $(OBJS)\coredll_collpaneg.o \ + $(OBJS)\coredll_colrdlgg.o \ + $(OBJS)\coredll_dirdlgg.o \ + $(OBJS)\coredll_generic_fdrepdlg.o \ + $(OBJS)\coredll_filedlgg.o \ + $(OBJS)\coredll_filepickerg.o \ + $(OBJS)\coredll_fontdlgg.o \ + $(OBJS)\coredll_fontpickerg.o \ + $(OBJS)\coredll_generic_listctrl.o \ + $(OBJS)\coredll_mdig.o \ + $(OBJS)\coredll_prntdlgg.o \ + $(OBJS)\coredll_univ_bmpbuttn.o \ + $(OBJS)\coredll_univ_button.o \ + $(OBJS)\coredll_univ_checkbox.o \ + $(OBJS)\coredll_univ_checklst.o \ + $(OBJS)\coredll_univ_choice.o \ + $(OBJS)\coredll_univ_combobox.o \ + $(OBJS)\coredll_univ_control.o \ + $(OBJS)\coredll_ctrlrend.o \ + $(OBJS)\coredll_univ_dialog.o \ + $(OBJS)\coredll_framuniv.o \ + $(OBJS)\coredll_univ_gauge.o \ + $(OBJS)\coredll_inpcons.o \ + $(OBJS)\coredll_inphand.o \ + $(OBJS)\coredll_univ_listbox.o \ + $(OBJS)\coredll_univ_menu.o \ + $(OBJS)\coredll_univ_notebook.o \ + $(OBJS)\coredll_univ_radiobox.o \ + $(OBJS)\coredll_univ_radiobut.o \ + $(OBJS)\coredll_scrarrow.o \ + $(OBJS)\coredll_univ_scrolbar.o \ + $(OBJS)\coredll_scrthumb.o \ + $(OBJS)\coredll_settingsuniv.o \ + $(OBJS)\coredll_univ_slider.o \ + $(OBJS)\coredll_univ_spinbutt.o \ + $(OBJS)\coredll_univ_statbmp.o \ + $(OBJS)\coredll_univ_statbox.o \ + $(OBJS)\coredll_univ_statline.o \ + $(OBJS)\coredll_univ_stattext.o \ + $(OBJS)\coredll_univ_statusbr.o \ + $(OBJS)\coredll_stdrend.o \ + $(OBJS)\coredll_univ_textctrl.o \ + $(OBJS)\coredll_univ_tglbtn.o \ + $(OBJS)\coredll_theme.o \ + $(OBJS)\coredll_univ_toolbar.o \ + $(OBJS)\coredll_topluniv.o \ + $(OBJS)\coredll_winuniv.o \ + $(OBJS)\coredll_gtk.o \ + $(OBJS)\coredll_metal.o \ + $(OBJS)\coredll_mono.o \ + $(OBJS)\coredll_win32.o \ + $(OBJS)\coredll_accelcmn.o \ + $(OBJS)\coredll_accesscmn.o \ + $(OBJS)\coredll_anidecod.o \ + $(OBJS)\coredll_affinematrix2d.o \ + $(OBJS)\coredll_appcmn.o \ + $(OBJS)\coredll_artprov.o \ + $(OBJS)\coredll_artstd.o \ + $(OBJS)\coredll_arttango.o \ + $(OBJS)\coredll_bmpbase.o \ + $(OBJS)\coredll_bmpbtncmn.o \ + $(OBJS)\coredll_bookctrl.o \ + $(OBJS)\coredll_btncmn.o \ + $(OBJS)\coredll_cairo.o \ + $(OBJS)\coredll_checkboxcmn.o \ + $(OBJS)\coredll_checklstcmn.o \ + $(OBJS)\coredll_choiccmn.o \ + $(OBJS)\coredll_clipcmn.o \ + $(OBJS)\coredll_clrpickercmn.o \ + $(OBJS)\coredll_colourcmn.o \ + $(OBJS)\coredll_colourdata.o \ + $(OBJS)\coredll_combocmn.o \ + $(OBJS)\coredll_cmdproc.o \ + $(OBJS)\coredll_cmndata.o \ + $(OBJS)\coredll_containr.o \ + $(OBJS)\coredll_cshelp.o \ + $(OBJS)\coredll_ctrlcmn.o \ + $(OBJS)\coredll_ctrlsub.o \ + $(OBJS)\coredll_dcbase.o \ + $(OBJS)\coredll_dcbufcmn.o \ + $(OBJS)\coredll_dcgraph.o \ + $(OBJS)\coredll_dcsvg.o \ + $(OBJS)\coredll_dirctrlcmn.o \ + $(OBJS)\coredll_dlgcmn.o \ + $(OBJS)\coredll_dndcmn.o \ + $(OBJS)\coredll_dobjcmn.o \ + $(OBJS)\coredll_docmdi.o \ + $(OBJS)\coredll_docview.o \ + $(OBJS)\coredll_dpycmn.o \ + $(OBJS)\coredll_dseldlg.o \ + $(OBJS)\coredll_effects.o \ + $(OBJS)\coredll_fddlgcmn.o \ + $(OBJS)\coredll_filectrlcmn.o \ + $(OBJS)\coredll_filehistorycmn.o \ + $(OBJS)\coredll_filepickercmn.o \ + $(OBJS)\coredll_fontpickercmn.o \ + $(OBJS)\coredll_fldlgcmn.o \ + $(OBJS)\coredll_fontcmn.o \ + $(OBJS)\coredll_fontdata.o \ + $(OBJS)\coredll_graphicc.o \ + $(OBJS)\coredll_fontenumcmn.o \ + $(OBJS)\coredll_fontmap.o \ + $(OBJS)\coredll_fontutilcmn.o \ + $(OBJS)\coredll_framecmn.o \ + $(OBJS)\coredll_gaugecmn.o \ + $(OBJS)\coredll_gbsizer.o \ + $(OBJS)\coredll_gdicmn.o \ + $(OBJS)\coredll_geometry.o \ + $(OBJS)\coredll_gifdecod.o \ + $(OBJS)\coredll_graphcmn.o \ + $(OBJS)\coredll_headercolcmn.o \ + $(OBJS)\coredll_headerctrlcmn.o \ + $(OBJS)\coredll_helpbase.o \ + $(OBJS)\coredll_iconbndl.o \ + $(OBJS)\coredll_imagall.o \ + $(OBJS)\coredll_imagbmp.o \ + $(OBJS)\coredll_image.o \ + $(OBJS)\coredll_imagfill.o \ + $(OBJS)\coredll_imaggif.o \ + $(OBJS)\coredll_imagiff.o \ + $(OBJS)\coredll_imagjpeg.o \ + $(OBJS)\coredll_imagpcx.o \ + $(OBJS)\coredll_imagpng.o \ + $(OBJS)\coredll_imagpnm.o \ + $(OBJS)\coredll_imagtga.o \ + $(OBJS)\coredll_imagtiff.o \ + $(OBJS)\coredll_imagxpm.o \ + $(OBJS)\coredll_layout.o \ + $(OBJS)\coredll_lboxcmn.o \ + $(OBJS)\coredll_listctrlcmn.o \ + $(OBJS)\coredll_markupparser.o \ + $(OBJS)\coredll_matrix.o \ + $(OBJS)\coredll_menucmn.o \ + $(OBJS)\coredll_modalhook.o \ + $(OBJS)\coredll_mousemanager.o \ + $(OBJS)\coredll_nbkbase.o \ + $(OBJS)\coredll_overlaycmn.o \ + $(OBJS)\coredll_ownerdrwcmn.o \ + $(OBJS)\coredll_paper.o \ + $(OBJS)\coredll_panelcmn.o \ + $(OBJS)\coredll_persist.o \ + $(OBJS)\coredll_pickerbase.o \ + $(OBJS)\coredll_popupcmn.o \ + $(OBJS)\coredll_preferencescmn.o \ + $(OBJS)\coredll_prntbase.o \ + $(OBJS)\coredll_quantize.o \ + $(OBJS)\coredll_radiobtncmn.o \ + $(OBJS)\coredll_radiocmn.o \ + $(OBJS)\coredll_rearrangectrl.o \ + $(OBJS)\coredll_rendcmn.o \ + $(OBJS)\coredll_rgncmn.o \ + $(OBJS)\coredll_scrolbarcmn.o \ + $(OBJS)\coredll_settcmn.o \ + $(OBJS)\coredll_sizer.o \ + $(OBJS)\coredll_slidercmn.o \ + $(OBJS)\coredll_spinbtncmn.o \ + $(OBJS)\coredll_spinctrlcmn.o \ + $(OBJS)\coredll_srchcmn.o \ + $(OBJS)\coredll_statbar.o \ + $(OBJS)\coredll_statbmpcmn.o \ + $(OBJS)\coredll_statboxcmn.o \ + $(OBJS)\coredll_statlinecmn.o \ + $(OBJS)\coredll_stattextcmn.o \ + $(OBJS)\coredll_stockitem.o \ + $(OBJS)\coredll_tbarbase.o \ + $(OBJS)\coredll_textcmn.o \ + $(OBJS)\coredll_textentrycmn.o \ + $(OBJS)\coredll_textmeasurecmn.o \ + $(OBJS)\coredll_toplvcmn.o \ + $(OBJS)\coredll_treebase.o \ + $(OBJS)\coredll_uiactioncmn.o \ + $(OBJS)\coredll_valgen.o \ + $(OBJS)\coredll_validate.o \ + $(OBJS)\coredll_valtext.o \ + $(OBJS)\coredll_valnum.o \ + $(OBJS)\coredll_wincmn.o \ + $(OBJS)\coredll_windowid.o \ + $(OBJS)\coredll_wrapsizer.o \ + $(OBJS)\coredll_xpmdecod.o \ + $(OBJS)\coredll_busyinfo.o \ + $(OBJS)\coredll_buttonbar.o \ + $(OBJS)\coredll_choicdgg.o \ + $(OBJS)\coredll_choicbkg.o \ + $(OBJS)\coredll_combog.o \ + $(OBJS)\coredll_dcpsg.o \ + $(OBJS)\coredll_dirctrlg.o \ + $(OBJS)\coredll_dragimgg.o \ + $(OBJS)\coredll_filectrlg.o \ + $(OBJS)\coredll_headerctrlg.o \ + $(OBJS)\coredll_infobar.o \ + $(OBJS)\coredll_listbkg.o \ + $(OBJS)\coredll_logg.o \ + $(OBJS)\coredll_markuptext.o \ + $(OBJS)\coredll_msgdlgg.o \ + $(OBJS)\coredll_numdlgg.o \ + $(OBJS)\coredll_progdlgg.o \ + $(OBJS)\coredll_preferencesg.o \ + $(OBJS)\coredll_printps.o \ + $(OBJS)\coredll_renderg.o \ + $(OBJS)\coredll_richmsgdlgg.o \ + $(OBJS)\coredll_scrlwing.o \ + $(OBJS)\coredll_selstore.o \ + $(OBJS)\coredll_spinctlg.o \ + $(OBJS)\coredll_splitter.o \ + $(OBJS)\coredll_srchctlg.o \ + $(OBJS)\coredll_statbmpg.o \ + $(OBJS)\coredll_stattextg.o \ + $(OBJS)\coredll_textdlgg.o \ + $(OBJS)\coredll_tipwin.o \ + $(OBJS)\coredll_toolbkg.o \ + $(OBJS)\coredll_treectlg.o \ + $(OBJS)\coredll_treebkg.o \ + $(OBJS)\coredll_vlbox.o \ + $(OBJS)\coredll_vscroll.o \ + $(OBJS)\coredll_xmlreshandler.o +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +__corelib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a +endif +endif +endif +ifeq ($(USE_GUI),1) +ifeq ($(WXUNIV),0) +____CORE_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\corelib_activex.o \ + $(OBJS)\corelib_app.o \ + $(OBJS)\corelib_bitmap.o \ + $(OBJS)\corelib_brush.o \ + $(OBJS)\corelib_caret.o \ + $(OBJS)\corelib_clipbrd.o \ + $(OBJS)\corelib_colour.o \ + $(OBJS)\corelib_cursor.o \ + $(OBJS)\corelib_data.o \ + $(OBJS)\corelib_dc.o \ + $(OBJS)\corelib_dcclient.o \ + $(OBJS)\corelib_dcmemory.o \ + $(OBJS)\corelib_dcprint.o \ + $(OBJS)\corelib_dcscreen.o \ + $(OBJS)\corelib_dialup.o \ + $(OBJS)\corelib_dib.o \ + $(OBJS)\corelib_display.o \ + $(OBJS)\corelib_enhmeta.o \ + $(OBJS)\corelib_font.o \ + $(OBJS)\corelib_fontenum.o \ + $(OBJS)\corelib_fontutil.o \ + $(OBJS)\corelib_gdiimage.o \ + $(OBJS)\corelib_gdiobj.o \ + $(OBJS)\corelib_gdiplus.o \ + $(OBJS)\corelib_graphics.o \ + $(OBJS)\corelib_icon.o \ + $(OBJS)\corelib_imaglist.o \ + $(OBJS)\corelib_minifram.o \ + $(OBJS)\corelib_nonownedwnd.o \ + $(OBJS)\corelib_dataobj.o \ + $(OBJS)\corelib_dropsrc.o \ + $(OBJS)\corelib_droptgt.o \ + $(OBJS)\corelib_oleutils.o \ + $(OBJS)\corelib_safearray.o \ + $(OBJS)\corelib_palette.o \ + $(OBJS)\corelib_pen.o \ + $(OBJS)\corelib_popupwin.o \ + $(OBJS)\corelib_printdlg.o \ + $(OBJS)\corelib_printwin.o \ + $(OBJS)\corelib_region.o \ + $(OBJS)\corelib_renderer.o \ + $(OBJS)\corelib_settings.o \ + $(OBJS)\corelib_textmeasure.o \ + $(OBJS)\corelib_tooltip.o \ + $(OBJS)\corelib_toplevel.o \ + $(OBJS)\corelib_uiaction.o \ + $(OBJS)\corelib_utilsgui.o \ + $(OBJS)\corelib_utilswin.o \ + $(OBJS)\corelib_uxtheme.o \ + $(OBJS)\corelib_window.o \ + $(OBJS)\corelib_helpchm.o \ + $(OBJS)\corelib_helpwin.o \ + $(OBJS)\corelib_automtn.o \ + $(OBJS)\corelib_uuid.o \ + $(OBJS)\corelib_clrpickerg.o \ + $(OBJS)\corelib_collpaneg.o \ + $(OBJS)\corelib_filepickerg.o \ + $(OBJS)\corelib_fontpickerg.o \ + $(OBJS)\corelib_generic_statusbr.o \ + $(OBJS)\corelib_prntdlgg.o \ + $(OBJS)\corelib_msw_accel.o \ + $(OBJS)\corelib_anybutton.o \ + $(OBJS)\corelib_artmsw.o \ + $(OBJS)\corelib_msw_bmpbuttn.o \ + $(OBJS)\corelib_msw_button.o \ + $(OBJS)\corelib_msw_checkbox.o \ + $(OBJS)\corelib_msw_choice.o \ + $(OBJS)\corelib_colordlg.o \ + $(OBJS)\corelib_combo.o \ + $(OBJS)\corelib_msw_combobox.o \ + $(OBJS)\corelib_msw_control.o \ + $(OBJS)\corelib_msw_dialog.o \ + $(OBJS)\corelib_dirdlg.o \ + $(OBJS)\corelib_dragimag.o \ + $(OBJS)\corelib_evtloop.o \ + $(OBJS)\corelib_filedlg.o \ + $(OBJS)\corelib_frame.o \ + $(OBJS)\corelib_msw_gauge.o \ + $(OBJS)\corelib_headerctrl.o \ + $(OBJS)\corelib_iniconf.o \ + $(OBJS)\corelib_msw_listbox.o \ + $(OBJS)\corelib_msw_listctrl.o \ + $(OBJS)\corelib_mdi.o \ + $(OBJS)\corelib_msw_menu.o \ + $(OBJS)\corelib_menuitem.o \ + $(OBJS)\corelib_metafile.o \ + $(OBJS)\corelib_msgdlg.o \ + $(OBJS)\corelib_nativdlg.o \ + $(OBJS)\corelib_nativewin.o \ + $(OBJS)\corelib_msw_notebook.o \ + $(OBJS)\corelib_access.o \ + $(OBJS)\corelib_ownerdrw.o \ + $(OBJS)\corelib_panel.o \ + $(OBJS)\corelib_progdlg.o \ + $(OBJS)\corelib_msw_radiobox.o \ + $(OBJS)\corelib_msw_radiobut.o \ + $(OBJS)\corelib_richmsgdlg.o \ + $(OBJS)\corelib_msw_scrolbar.o \ + $(OBJS)\corelib_msw_slider.o \ + $(OBJS)\corelib_msw_spinbutt.o \ + $(OBJS)\corelib_spinctrl.o \ + $(OBJS)\corelib_msw_statbmp.o \ + $(OBJS)\corelib_msw_statbox.o \ + $(OBJS)\corelib_statusbar.o \ + $(OBJS)\corelib_msw_statline.o \ + $(OBJS)\corelib_msw_stattext.o \ + $(OBJS)\corelib_msw_toolbar.o \ + $(OBJS)\corelib_msw_textctrl.o \ + $(OBJS)\corelib_textentry.o \ + $(OBJS)\corelib_msw_tglbtn.o \ + $(OBJS)\corelib_treectrl.o \ + $(OBJS)\corelib_msw_checklst.o \ + $(OBJS)\corelib_msw_fdrepdlg.o \ + $(OBJS)\corelib_fontdlg.o \ + $(OBJS)\corelib_accelcmn.o \ + $(OBJS)\corelib_accesscmn.o \ + $(OBJS)\corelib_anidecod.o \ + $(OBJS)\corelib_affinematrix2d.o \ + $(OBJS)\corelib_appcmn.o \ + $(OBJS)\corelib_artprov.o \ + $(OBJS)\corelib_artstd.o \ + $(OBJS)\corelib_arttango.o \ + $(OBJS)\corelib_bmpbase.o \ + $(OBJS)\corelib_bmpbtncmn.o \ + $(OBJS)\corelib_bookctrl.o \ + $(OBJS)\corelib_btncmn.o \ + $(OBJS)\corelib_cairo.o \ + $(OBJS)\corelib_checkboxcmn.o \ + $(OBJS)\corelib_checklstcmn.o \ + $(OBJS)\corelib_choiccmn.o \ + $(OBJS)\corelib_clipcmn.o \ + $(OBJS)\corelib_clrpickercmn.o \ + $(OBJS)\corelib_colourcmn.o \ + $(OBJS)\corelib_colourdata.o \ + $(OBJS)\corelib_combocmn.o \ + $(OBJS)\corelib_cmdproc.o \ + $(OBJS)\corelib_cmndata.o \ + $(OBJS)\corelib_containr.o \ + $(OBJS)\corelib_cshelp.o \ + $(OBJS)\corelib_ctrlcmn.o \ + $(OBJS)\corelib_ctrlsub.o \ + $(OBJS)\corelib_dcbase.o \ + $(OBJS)\corelib_dcbufcmn.o \ + $(OBJS)\corelib_dcgraph.o \ + $(OBJS)\corelib_dcsvg.o \ + $(OBJS)\corelib_dirctrlcmn.o \ + $(OBJS)\corelib_dlgcmn.o \ + $(OBJS)\corelib_dndcmn.o \ + $(OBJS)\corelib_dobjcmn.o \ + $(OBJS)\corelib_docmdi.o \ + $(OBJS)\corelib_docview.o \ + $(OBJS)\corelib_dpycmn.o \ + $(OBJS)\corelib_dseldlg.o \ + $(OBJS)\corelib_effects.o \ + $(OBJS)\corelib_fddlgcmn.o \ + $(OBJS)\corelib_filectrlcmn.o \ + $(OBJS)\corelib_filehistorycmn.o \ + $(OBJS)\corelib_filepickercmn.o \ + $(OBJS)\corelib_fontpickercmn.o \ + $(OBJS)\corelib_fldlgcmn.o \ + $(OBJS)\corelib_fontcmn.o \ + $(OBJS)\corelib_fontdata.o \ + $(OBJS)\corelib_graphicc.o \ + $(OBJS)\corelib_fontenumcmn.o \ + $(OBJS)\corelib_fontmap.o \ + $(OBJS)\corelib_fontutilcmn.o \ + $(OBJS)\corelib_framecmn.o \ + $(OBJS)\corelib_gaugecmn.o \ + $(OBJS)\corelib_gbsizer.o \ + $(OBJS)\corelib_gdicmn.o \ + $(OBJS)\corelib_geometry.o \ + $(OBJS)\corelib_gifdecod.o \ + $(OBJS)\corelib_graphcmn.o \ + $(OBJS)\corelib_headercolcmn.o \ + $(OBJS)\corelib_headerctrlcmn.o \ + $(OBJS)\corelib_helpbase.o \ + $(OBJS)\corelib_iconbndl.o \ + $(OBJS)\corelib_imagall.o \ + $(OBJS)\corelib_imagbmp.o \ + $(OBJS)\corelib_image.o \ + $(OBJS)\corelib_imagfill.o \ + $(OBJS)\corelib_imaggif.o \ + $(OBJS)\corelib_imagiff.o \ + $(OBJS)\corelib_imagjpeg.o \ + $(OBJS)\corelib_imagpcx.o \ + $(OBJS)\corelib_imagpng.o \ + $(OBJS)\corelib_imagpnm.o \ + $(OBJS)\corelib_imagtga.o \ + $(OBJS)\corelib_imagtiff.o \ + $(OBJS)\corelib_imagxpm.o \ + $(OBJS)\corelib_layout.o \ + $(OBJS)\corelib_lboxcmn.o \ + $(OBJS)\corelib_listctrlcmn.o \ + $(OBJS)\corelib_markupparser.o \ + $(OBJS)\corelib_matrix.o \ + $(OBJS)\corelib_menucmn.o \ + $(OBJS)\corelib_modalhook.o \ + $(OBJS)\corelib_mousemanager.o \ + $(OBJS)\corelib_nbkbase.o \ + $(OBJS)\corelib_overlaycmn.o \ + $(OBJS)\corelib_ownerdrwcmn.o \ + $(OBJS)\corelib_paper.o \ + $(OBJS)\corelib_panelcmn.o \ + $(OBJS)\corelib_persist.o \ + $(OBJS)\corelib_pickerbase.o \ + $(OBJS)\corelib_popupcmn.o \ + $(OBJS)\corelib_preferencescmn.o \ + $(OBJS)\corelib_prntbase.o \ + $(OBJS)\corelib_quantize.o \ + $(OBJS)\corelib_radiobtncmn.o \ + $(OBJS)\corelib_radiocmn.o \ + $(OBJS)\corelib_rearrangectrl.o \ + $(OBJS)\corelib_rendcmn.o \ + $(OBJS)\corelib_rgncmn.o \ + $(OBJS)\corelib_scrolbarcmn.o \ + $(OBJS)\corelib_settcmn.o \ + $(OBJS)\corelib_sizer.o \ + $(OBJS)\corelib_slidercmn.o \ + $(OBJS)\corelib_spinbtncmn.o \ + $(OBJS)\corelib_spinctrlcmn.o \ + $(OBJS)\corelib_srchcmn.o \ + $(OBJS)\corelib_statbar.o \ + $(OBJS)\corelib_statbmpcmn.o \ + $(OBJS)\corelib_statboxcmn.o \ + $(OBJS)\corelib_statlinecmn.o \ + $(OBJS)\corelib_stattextcmn.o \ + $(OBJS)\corelib_stockitem.o \ + $(OBJS)\corelib_tbarbase.o \ + $(OBJS)\corelib_textcmn.o \ + $(OBJS)\corelib_textentrycmn.o \ + $(OBJS)\corelib_textmeasurecmn.o \ + $(OBJS)\corelib_toplvcmn.o \ + $(OBJS)\corelib_treebase.o \ + $(OBJS)\corelib_uiactioncmn.o \ + $(OBJS)\corelib_valgen.o \ + $(OBJS)\corelib_validate.o \ + $(OBJS)\corelib_valtext.o \ + $(OBJS)\corelib_valnum.o \ + $(OBJS)\corelib_wincmn.o \ + $(OBJS)\corelib_windowid.o \ + $(OBJS)\corelib_wrapsizer.o \ + $(OBJS)\corelib_xpmdecod.o \ + $(OBJS)\corelib_busyinfo.o \ + $(OBJS)\corelib_buttonbar.o \ + $(OBJS)\corelib_choicdgg.o \ + $(OBJS)\corelib_choicbkg.o \ + $(OBJS)\corelib_combog.o \ + $(OBJS)\corelib_dcpsg.o \ + $(OBJS)\corelib_dirctrlg.o \ + $(OBJS)\corelib_dragimgg.o \ + $(OBJS)\corelib_filectrlg.o \ + $(OBJS)\corelib_headerctrlg.o \ + $(OBJS)\corelib_infobar.o \ + $(OBJS)\corelib_listbkg.o \ + $(OBJS)\corelib_logg.o \ + $(OBJS)\corelib_markuptext.o \ + $(OBJS)\corelib_msgdlgg.o \ + $(OBJS)\corelib_numdlgg.o \ + $(OBJS)\corelib_progdlgg.o \ + $(OBJS)\corelib_preferencesg.o \ + $(OBJS)\corelib_printps.o \ + $(OBJS)\corelib_renderg.o \ + $(OBJS)\corelib_richmsgdlgg.o \ + $(OBJS)\corelib_scrlwing.o \ + $(OBJS)\corelib_selstore.o \ + $(OBJS)\corelib_spinctlg.o \ + $(OBJS)\corelib_splitter.o \ + $(OBJS)\corelib_srchctlg.o \ + $(OBJS)\corelib_statbmpg.o \ + $(OBJS)\corelib_stattextg.o \ + $(OBJS)\corelib_textdlgg.o \ + $(OBJS)\corelib_tipwin.o \ + $(OBJS)\corelib_toolbkg.o \ + $(OBJS)\corelib_treectlg.o \ + $(OBJS)\corelib_treebkg.o \ + $(OBJS)\corelib_vlbox.o \ + $(OBJS)\corelib_vscroll.o \ + $(OBJS)\corelib_xmlreshandler.o +endif +endif +ifeq ($(USE_GUI),1) +ifeq ($(WXUNIV),1) +____CORE_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\corelib_activex.o \ + $(OBJS)\corelib_app.o \ + $(OBJS)\corelib_bitmap.o \ + $(OBJS)\corelib_brush.o \ + $(OBJS)\corelib_caret.o \ + $(OBJS)\corelib_clipbrd.o \ + $(OBJS)\corelib_colour.o \ + $(OBJS)\corelib_cursor.o \ + $(OBJS)\corelib_data.o \ + $(OBJS)\corelib_dc.o \ + $(OBJS)\corelib_dcclient.o \ + $(OBJS)\corelib_dcmemory.o \ + $(OBJS)\corelib_dcprint.o \ + $(OBJS)\corelib_dcscreen.o \ + $(OBJS)\corelib_dialup.o \ + $(OBJS)\corelib_dib.o \ + $(OBJS)\corelib_display.o \ + $(OBJS)\corelib_enhmeta.o \ + $(OBJS)\corelib_font.o \ + $(OBJS)\corelib_fontenum.o \ + $(OBJS)\corelib_fontutil.o \ + $(OBJS)\corelib_gdiimage.o \ + $(OBJS)\corelib_gdiobj.o \ + $(OBJS)\corelib_gdiplus.o \ + $(OBJS)\corelib_graphics.o \ + $(OBJS)\corelib_icon.o \ + $(OBJS)\corelib_imaglist.o \ + $(OBJS)\corelib_minifram.o \ + $(OBJS)\corelib_nonownedwnd.o \ + $(OBJS)\corelib_dataobj.o \ + $(OBJS)\corelib_dropsrc.o \ + $(OBJS)\corelib_droptgt.o \ + $(OBJS)\corelib_oleutils.o \ + $(OBJS)\corelib_safearray.o \ + $(OBJS)\corelib_palette.o \ + $(OBJS)\corelib_pen.o \ + $(OBJS)\corelib_popupwin.o \ + $(OBJS)\corelib_printdlg.o \ + $(OBJS)\corelib_printwin.o \ + $(OBJS)\corelib_region.o \ + $(OBJS)\corelib_renderer.o \ + $(OBJS)\corelib_settings.o \ + $(OBJS)\corelib_textmeasure.o \ + $(OBJS)\corelib_tooltip.o \ + $(OBJS)\corelib_toplevel.o \ + $(OBJS)\corelib_uiaction.o \ + $(OBJS)\corelib_utilsgui.o \ + $(OBJS)\corelib_utilswin.o \ + $(OBJS)\corelib_uxtheme.o \ + $(OBJS)\corelib_window.o \ + $(OBJS)\corelib_helpchm.o \ + $(OBJS)\corelib_helpwin.o \ + $(OBJS)\corelib_automtn.o \ + $(OBJS)\corelib_uuid.o \ + $(OBJS)\corelib_evtloop.o \ + $(OBJS)\corelib_generic_accel.o \ + $(OBJS)\corelib_clrpickerg.o \ + $(OBJS)\corelib_collpaneg.o \ + $(OBJS)\corelib_colrdlgg.o \ + $(OBJS)\corelib_dirdlgg.o \ + $(OBJS)\corelib_generic_fdrepdlg.o \ + $(OBJS)\corelib_filedlgg.o \ + $(OBJS)\corelib_filepickerg.o \ + $(OBJS)\corelib_fontdlgg.o \ + $(OBJS)\corelib_fontpickerg.o \ + $(OBJS)\corelib_generic_listctrl.o \ + $(OBJS)\corelib_mdig.o \ + $(OBJS)\corelib_prntdlgg.o \ + $(OBJS)\corelib_univ_bmpbuttn.o \ + $(OBJS)\corelib_univ_button.o \ + $(OBJS)\corelib_univ_checkbox.o \ + $(OBJS)\corelib_univ_checklst.o \ + $(OBJS)\corelib_univ_choice.o \ + $(OBJS)\corelib_univ_combobox.o \ + $(OBJS)\corelib_univ_control.o \ + $(OBJS)\corelib_ctrlrend.o \ + $(OBJS)\corelib_univ_dialog.o \ + $(OBJS)\corelib_framuniv.o \ + $(OBJS)\corelib_univ_gauge.o \ + $(OBJS)\corelib_inpcons.o \ + $(OBJS)\corelib_inphand.o \ + $(OBJS)\corelib_univ_listbox.o \ + $(OBJS)\corelib_univ_menu.o \ + $(OBJS)\corelib_univ_notebook.o \ + $(OBJS)\corelib_univ_radiobox.o \ + $(OBJS)\corelib_univ_radiobut.o \ + $(OBJS)\corelib_scrarrow.o \ + $(OBJS)\corelib_univ_scrolbar.o \ + $(OBJS)\corelib_scrthumb.o \ + $(OBJS)\corelib_settingsuniv.o \ + $(OBJS)\corelib_univ_slider.o \ + $(OBJS)\corelib_univ_spinbutt.o \ + $(OBJS)\corelib_univ_statbmp.o \ + $(OBJS)\corelib_univ_statbox.o \ + $(OBJS)\corelib_univ_statline.o \ + $(OBJS)\corelib_univ_stattext.o \ + $(OBJS)\corelib_univ_statusbr.o \ + $(OBJS)\corelib_stdrend.o \ + $(OBJS)\corelib_univ_textctrl.o \ + $(OBJS)\corelib_univ_tglbtn.o \ + $(OBJS)\corelib_theme.o \ + $(OBJS)\corelib_univ_toolbar.o \ + $(OBJS)\corelib_topluniv.o \ + $(OBJS)\corelib_winuniv.o \ + $(OBJS)\corelib_gtk.o \ + $(OBJS)\corelib_metal.o \ + $(OBJS)\corelib_mono.o \ + $(OBJS)\corelib_win32.o \ + $(OBJS)\corelib_accelcmn.o \ + $(OBJS)\corelib_accesscmn.o \ + $(OBJS)\corelib_anidecod.o \ + $(OBJS)\corelib_affinematrix2d.o \ + $(OBJS)\corelib_appcmn.o \ + $(OBJS)\corelib_artprov.o \ + $(OBJS)\corelib_artstd.o \ + $(OBJS)\corelib_arttango.o \ + $(OBJS)\corelib_bmpbase.o \ + $(OBJS)\corelib_bmpbtncmn.o \ + $(OBJS)\corelib_bookctrl.o \ + $(OBJS)\corelib_btncmn.o \ + $(OBJS)\corelib_cairo.o \ + $(OBJS)\corelib_checkboxcmn.o \ + $(OBJS)\corelib_checklstcmn.o \ + $(OBJS)\corelib_choiccmn.o \ + $(OBJS)\corelib_clipcmn.o \ + $(OBJS)\corelib_clrpickercmn.o \ + $(OBJS)\corelib_colourcmn.o \ + $(OBJS)\corelib_colourdata.o \ + $(OBJS)\corelib_combocmn.o \ + $(OBJS)\corelib_cmdproc.o \ + $(OBJS)\corelib_cmndata.o \ + $(OBJS)\corelib_containr.o \ + $(OBJS)\corelib_cshelp.o \ + $(OBJS)\corelib_ctrlcmn.o \ + $(OBJS)\corelib_ctrlsub.o \ + $(OBJS)\corelib_dcbase.o \ + $(OBJS)\corelib_dcbufcmn.o \ + $(OBJS)\corelib_dcgraph.o \ + $(OBJS)\corelib_dcsvg.o \ + $(OBJS)\corelib_dirctrlcmn.o \ + $(OBJS)\corelib_dlgcmn.o \ + $(OBJS)\corelib_dndcmn.o \ + $(OBJS)\corelib_dobjcmn.o \ + $(OBJS)\corelib_docmdi.o \ + $(OBJS)\corelib_docview.o \ + $(OBJS)\corelib_dpycmn.o \ + $(OBJS)\corelib_dseldlg.o \ + $(OBJS)\corelib_effects.o \ + $(OBJS)\corelib_fddlgcmn.o \ + $(OBJS)\corelib_filectrlcmn.o \ + $(OBJS)\corelib_filehistorycmn.o \ + $(OBJS)\corelib_filepickercmn.o \ + $(OBJS)\corelib_fontpickercmn.o \ + $(OBJS)\corelib_fldlgcmn.o \ + $(OBJS)\corelib_fontcmn.o \ + $(OBJS)\corelib_fontdata.o \ + $(OBJS)\corelib_graphicc.o \ + $(OBJS)\corelib_fontenumcmn.o \ + $(OBJS)\corelib_fontmap.o \ + $(OBJS)\corelib_fontutilcmn.o \ + $(OBJS)\corelib_framecmn.o \ + $(OBJS)\corelib_gaugecmn.o \ + $(OBJS)\corelib_gbsizer.o \ + $(OBJS)\corelib_gdicmn.o \ + $(OBJS)\corelib_geometry.o \ + $(OBJS)\corelib_gifdecod.o \ + $(OBJS)\corelib_graphcmn.o \ + $(OBJS)\corelib_headercolcmn.o \ + $(OBJS)\corelib_headerctrlcmn.o \ + $(OBJS)\corelib_helpbase.o \ + $(OBJS)\corelib_iconbndl.o \ + $(OBJS)\corelib_imagall.o \ + $(OBJS)\corelib_imagbmp.o \ + $(OBJS)\corelib_image.o \ + $(OBJS)\corelib_imagfill.o \ + $(OBJS)\corelib_imaggif.o \ + $(OBJS)\corelib_imagiff.o \ + $(OBJS)\corelib_imagjpeg.o \ + $(OBJS)\corelib_imagpcx.o \ + $(OBJS)\corelib_imagpng.o \ + $(OBJS)\corelib_imagpnm.o \ + $(OBJS)\corelib_imagtga.o \ + $(OBJS)\corelib_imagtiff.o \ + $(OBJS)\corelib_imagxpm.o \ + $(OBJS)\corelib_layout.o \ + $(OBJS)\corelib_lboxcmn.o \ + $(OBJS)\corelib_listctrlcmn.o \ + $(OBJS)\corelib_markupparser.o \ + $(OBJS)\corelib_matrix.o \ + $(OBJS)\corelib_menucmn.o \ + $(OBJS)\corelib_modalhook.o \ + $(OBJS)\corelib_mousemanager.o \ + $(OBJS)\corelib_nbkbase.o \ + $(OBJS)\corelib_overlaycmn.o \ + $(OBJS)\corelib_ownerdrwcmn.o \ + $(OBJS)\corelib_paper.o \ + $(OBJS)\corelib_panelcmn.o \ + $(OBJS)\corelib_persist.o \ + $(OBJS)\corelib_pickerbase.o \ + $(OBJS)\corelib_popupcmn.o \ + $(OBJS)\corelib_preferencescmn.o \ + $(OBJS)\corelib_prntbase.o \ + $(OBJS)\corelib_quantize.o \ + $(OBJS)\corelib_radiobtncmn.o \ + $(OBJS)\corelib_radiocmn.o \ + $(OBJS)\corelib_rearrangectrl.o \ + $(OBJS)\corelib_rendcmn.o \ + $(OBJS)\corelib_rgncmn.o \ + $(OBJS)\corelib_scrolbarcmn.o \ + $(OBJS)\corelib_settcmn.o \ + $(OBJS)\corelib_sizer.o \ + $(OBJS)\corelib_slidercmn.o \ + $(OBJS)\corelib_spinbtncmn.o \ + $(OBJS)\corelib_spinctrlcmn.o \ + $(OBJS)\corelib_srchcmn.o \ + $(OBJS)\corelib_statbar.o \ + $(OBJS)\corelib_statbmpcmn.o \ + $(OBJS)\corelib_statboxcmn.o \ + $(OBJS)\corelib_statlinecmn.o \ + $(OBJS)\corelib_stattextcmn.o \ + $(OBJS)\corelib_stockitem.o \ + $(OBJS)\corelib_tbarbase.o \ + $(OBJS)\corelib_textcmn.o \ + $(OBJS)\corelib_textentrycmn.o \ + $(OBJS)\corelib_textmeasurecmn.o \ + $(OBJS)\corelib_toplvcmn.o \ + $(OBJS)\corelib_treebase.o \ + $(OBJS)\corelib_uiactioncmn.o \ + $(OBJS)\corelib_valgen.o \ + $(OBJS)\corelib_validate.o \ + $(OBJS)\corelib_valtext.o \ + $(OBJS)\corelib_valnum.o \ + $(OBJS)\corelib_wincmn.o \ + $(OBJS)\corelib_windowid.o \ + $(OBJS)\corelib_wrapsizer.o \ + $(OBJS)\corelib_xpmdecod.o \ + $(OBJS)\corelib_busyinfo.o \ + $(OBJS)\corelib_buttonbar.o \ + $(OBJS)\corelib_choicdgg.o \ + $(OBJS)\corelib_choicbkg.o \ + $(OBJS)\corelib_combog.o \ + $(OBJS)\corelib_dcpsg.o \ + $(OBJS)\corelib_dirctrlg.o \ + $(OBJS)\corelib_dragimgg.o \ + $(OBJS)\corelib_filectrlg.o \ + $(OBJS)\corelib_headerctrlg.o \ + $(OBJS)\corelib_infobar.o \ + $(OBJS)\corelib_listbkg.o \ + $(OBJS)\corelib_logg.o \ + $(OBJS)\corelib_markuptext.o \ + $(OBJS)\corelib_msgdlgg.o \ + $(OBJS)\corelib_numdlgg.o \ + $(OBJS)\corelib_progdlgg.o \ + $(OBJS)\corelib_preferencesg.o \ + $(OBJS)\corelib_printps.o \ + $(OBJS)\corelib_renderg.o \ + $(OBJS)\corelib_richmsgdlgg.o \ + $(OBJS)\corelib_scrlwing.o \ + $(OBJS)\corelib_selstore.o \ + $(OBJS)\corelib_spinctlg.o \ + $(OBJS)\corelib_splitter.o \ + $(OBJS)\corelib_srchctlg.o \ + $(OBJS)\corelib_statbmpg.o \ + $(OBJS)\corelib_stattextg.o \ + $(OBJS)\corelib_textdlgg.o \ + $(OBJS)\corelib_tipwin.o \ + $(OBJS)\corelib_toolbkg.o \ + $(OBJS)\corelib_treectlg.o \ + $(OBJS)\corelib_treebkg.o \ + $(OBJS)\corelib_vlbox.o \ + $(OBJS)\corelib_vscroll.o \ + $(OBJS)\corelib_xmlreshandler.o +endif +endif +ifeq ($(SHARED),1) +____wxcore_namedll_DEP = $(__coredll___depname) +endif +ifeq ($(SHARED),0) +____wxcore_namelib_DEP = $(__corelib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +__advdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +ifeq ($(WXUNIV),0) +____ADVANCED_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\advdll_animatecmn.o \ + $(OBJS)\advdll_bmpcboxcmn.o \ + $(OBJS)\advdll_calctrlcmn.o \ + $(OBJS)\advdll_datavcmn.o \ + $(OBJS)\advdll_gridcmn.o \ + $(OBJS)\advdll_hyperlnkcmn.o \ + $(OBJS)\advdll_odcombocmn.o \ + $(OBJS)\advdll_richtooltipcmn.o \ + $(OBJS)\advdll_aboutdlgg.o \ + $(OBJS)\advdll_bannerwindow.o \ + $(OBJS)\advdll_bmpcboxg.o \ + $(OBJS)\advdll_calctrlg.o \ + $(OBJS)\advdll_commandlinkbuttong.o \ + $(OBJS)\advdll_datavgen.o \ + $(OBJS)\advdll_datectlg.o \ + $(OBJS)\advdll_editlbox.o \ + $(OBJS)\advdll_grid.o \ + $(OBJS)\advdll_gridctrl.o \ + $(OBJS)\advdll_grideditors.o \ + $(OBJS)\advdll_gridsel.o \ + $(OBJS)\advdll_helpext.o \ + $(OBJS)\advdll_hyperlinkg.o \ + $(OBJS)\advdll_laywin.o \ + $(OBJS)\advdll_notifmsgg.o \ + $(OBJS)\advdll_odcombo.o \ + $(OBJS)\advdll_propdlg.o \ + $(OBJS)\advdll_richtooltipg.o \ + $(OBJS)\advdll_sashwin.o \ + $(OBJS)\advdll_splash.o \ + $(OBJS)\advdll_timectrlg.o \ + $(OBJS)\advdll_tipdlg.o \ + $(OBJS)\advdll_treelist.o \ + $(OBJS)\advdll_wizard.o \ + $(OBJS)\advdll_taskbarcmn.o \ + $(OBJS)\advdll_aboutdlg.o \ + $(OBJS)\advdll_notifmsg.o \ + $(OBJS)\advdll_richtooltip.o \ + $(OBJS)\advdll_sound.o \ + $(OBJS)\advdll_taskbar.o \ + $(OBJS)\advdll_joystick.o \ + $(OBJS)\advdll_animateg.o \ + $(OBJS)\advdll_bmpcbox.o \ + $(OBJS)\advdll_calctrl.o \ + $(OBJS)\advdll_commandlinkbutton.o \ + $(OBJS)\advdll_datecontrols.o \ + $(OBJS)\advdll_datectrl.o \ + $(OBJS)\advdll_datetimectrl.o \ + $(OBJS)\advdll_hyperlink.o \ + $(OBJS)\advdll_timectrl.o +endif +ifeq ($(WXUNIV),1) +____ADVANCED_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\advdll_animatecmn.o \ + $(OBJS)\advdll_bmpcboxcmn.o \ + $(OBJS)\advdll_calctrlcmn.o \ + $(OBJS)\advdll_datavcmn.o \ + $(OBJS)\advdll_gridcmn.o \ + $(OBJS)\advdll_hyperlnkcmn.o \ + $(OBJS)\advdll_odcombocmn.o \ + $(OBJS)\advdll_richtooltipcmn.o \ + $(OBJS)\advdll_aboutdlgg.o \ + $(OBJS)\advdll_bannerwindow.o \ + $(OBJS)\advdll_bmpcboxg.o \ + $(OBJS)\advdll_calctrlg.o \ + $(OBJS)\advdll_commandlinkbuttong.o \ + $(OBJS)\advdll_datavgen.o \ + $(OBJS)\advdll_datectlg.o \ + $(OBJS)\advdll_editlbox.o \ + $(OBJS)\advdll_grid.o \ + $(OBJS)\advdll_gridctrl.o \ + $(OBJS)\advdll_grideditors.o \ + $(OBJS)\advdll_gridsel.o \ + $(OBJS)\advdll_helpext.o \ + $(OBJS)\advdll_hyperlinkg.o \ + $(OBJS)\advdll_laywin.o \ + $(OBJS)\advdll_notifmsgg.o \ + $(OBJS)\advdll_odcombo.o \ + $(OBJS)\advdll_propdlg.o \ + $(OBJS)\advdll_richtooltipg.o \ + $(OBJS)\advdll_sashwin.o \ + $(OBJS)\advdll_splash.o \ + $(OBJS)\advdll_timectrlg.o \ + $(OBJS)\advdll_tipdlg.o \ + $(OBJS)\advdll_treelist.o \ + $(OBJS)\advdll_wizard.o \ + $(OBJS)\advdll_taskbarcmn.o \ + $(OBJS)\advdll_aboutdlg.o \ + $(OBJS)\advdll_notifmsg.o \ + $(OBJS)\advdll_richtooltip.o \ + $(OBJS)\advdll_sound.o \ + $(OBJS)\advdll_taskbar.o \ + $(OBJS)\advdll_joystick.o \ + $(OBJS)\advdll_animateg.o +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +__advlib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a +endif +endif +endif +ifeq ($(WXUNIV),0) +____ADVANCED_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\advlib_animatecmn.o \ + $(OBJS)\advlib_bmpcboxcmn.o \ + $(OBJS)\advlib_calctrlcmn.o \ + $(OBJS)\advlib_datavcmn.o \ + $(OBJS)\advlib_gridcmn.o \ + $(OBJS)\advlib_hyperlnkcmn.o \ + $(OBJS)\advlib_odcombocmn.o \ + $(OBJS)\advlib_richtooltipcmn.o \ + $(OBJS)\advlib_aboutdlgg.o \ + $(OBJS)\advlib_bannerwindow.o \ + $(OBJS)\advlib_bmpcboxg.o \ + $(OBJS)\advlib_calctrlg.o \ + $(OBJS)\advlib_commandlinkbuttong.o \ + $(OBJS)\advlib_datavgen.o \ + $(OBJS)\advlib_datectlg.o \ + $(OBJS)\advlib_editlbox.o \ + $(OBJS)\advlib_grid.o \ + $(OBJS)\advlib_gridctrl.o \ + $(OBJS)\advlib_grideditors.o \ + $(OBJS)\advlib_gridsel.o \ + $(OBJS)\advlib_helpext.o \ + $(OBJS)\advlib_hyperlinkg.o \ + $(OBJS)\advlib_laywin.o \ + $(OBJS)\advlib_notifmsgg.o \ + $(OBJS)\advlib_odcombo.o \ + $(OBJS)\advlib_propdlg.o \ + $(OBJS)\advlib_richtooltipg.o \ + $(OBJS)\advlib_sashwin.o \ + $(OBJS)\advlib_splash.o \ + $(OBJS)\advlib_timectrlg.o \ + $(OBJS)\advlib_tipdlg.o \ + $(OBJS)\advlib_treelist.o \ + $(OBJS)\advlib_wizard.o \ + $(OBJS)\advlib_taskbarcmn.o \ + $(OBJS)\advlib_aboutdlg.o \ + $(OBJS)\advlib_notifmsg.o \ + $(OBJS)\advlib_richtooltip.o \ + $(OBJS)\advlib_sound.o \ + $(OBJS)\advlib_taskbar.o \ + $(OBJS)\advlib_joystick.o \ + $(OBJS)\advlib_animateg.o \ + $(OBJS)\advlib_bmpcbox.o \ + $(OBJS)\advlib_calctrl.o \ + $(OBJS)\advlib_commandlinkbutton.o \ + $(OBJS)\advlib_datecontrols.o \ + $(OBJS)\advlib_datectrl.o \ + $(OBJS)\advlib_datetimectrl.o \ + $(OBJS)\advlib_hyperlink.o \ + $(OBJS)\advlib_timectrl.o +endif +ifeq ($(WXUNIV),1) +____ADVANCED_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\advlib_animatecmn.o \ + $(OBJS)\advlib_bmpcboxcmn.o \ + $(OBJS)\advlib_calctrlcmn.o \ + $(OBJS)\advlib_datavcmn.o \ + $(OBJS)\advlib_gridcmn.o \ + $(OBJS)\advlib_hyperlnkcmn.o \ + $(OBJS)\advlib_odcombocmn.o \ + $(OBJS)\advlib_richtooltipcmn.o \ + $(OBJS)\advlib_aboutdlgg.o \ + $(OBJS)\advlib_bannerwindow.o \ + $(OBJS)\advlib_bmpcboxg.o \ + $(OBJS)\advlib_calctrlg.o \ + $(OBJS)\advlib_commandlinkbuttong.o \ + $(OBJS)\advlib_datavgen.o \ + $(OBJS)\advlib_datectlg.o \ + $(OBJS)\advlib_editlbox.o \ + $(OBJS)\advlib_grid.o \ + $(OBJS)\advlib_gridctrl.o \ + $(OBJS)\advlib_grideditors.o \ + $(OBJS)\advlib_gridsel.o \ + $(OBJS)\advlib_helpext.o \ + $(OBJS)\advlib_hyperlinkg.o \ + $(OBJS)\advlib_laywin.o \ + $(OBJS)\advlib_notifmsgg.o \ + $(OBJS)\advlib_odcombo.o \ + $(OBJS)\advlib_propdlg.o \ + $(OBJS)\advlib_richtooltipg.o \ + $(OBJS)\advlib_sashwin.o \ + $(OBJS)\advlib_splash.o \ + $(OBJS)\advlib_timectrlg.o \ + $(OBJS)\advlib_tipdlg.o \ + $(OBJS)\advlib_treelist.o \ + $(OBJS)\advlib_wizard.o \ + $(OBJS)\advlib_taskbarcmn.o \ + $(OBJS)\advlib_aboutdlg.o \ + $(OBJS)\advlib_notifmsg.o \ + $(OBJS)\advlib_richtooltip.o \ + $(OBJS)\advlib_sound.o \ + $(OBJS)\advlib_taskbar.o \ + $(OBJS)\advlib_joystick.o \ + $(OBJS)\advlib_animateg.o +endif +ifeq ($(SHARED),1) +____wxadv_namedll_DEP = $(__advdll___depname) +endif +ifeq ($(SHARED),0) +____wxadv_namelib_DEP = $(__advlib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_MEDIA),1) +__mediadll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +ifeq ($(USE_MEDIA),1) +__medialib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.a +endif +endif +endif +endif +ifeq ($(SHARED),1) +____wxmedia_namedll_DEP = $(__mediadll___depname) +endif +ifeq ($(SHARED),0) +____wxmedia_namelib_DEP = $(__medialib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_HTML),1) +__htmldll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +ifeq ($(USE_HTML),1) +__htmllib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.a +endif +endif +endif +endif +ifeq ($(SHARED),1) +____wxhtml_namedll_DEP = $(__htmldll___depname) +endif +ifeq ($(SHARED),0) +____wxhtml_namelib_DEP = $(__htmllib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_WEBVIEW),1) +__webviewdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +ifeq ($(USE_WEBVIEW),1) +__webviewlib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.a +endif +endif +endif +endif +ifeq ($(SHARED),1) +____wxwebview_namedll_DEP = $(__webviewdll___depname) +endif +ifeq ($(SHARED),0) +____wxwebview_namelib_DEP = $(__webviewlib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_QA),1) +__qadll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +ifeq ($(USE_QA),1) +__qalib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.a +endif +endif +endif +endif +ifeq ($(SHARED),1) +____wxqa_namedll_DEP = $(__qadll___depname) +endif +ifeq ($(SHARED),0) +____wxqa_namelib_DEP = $(__qalib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +__xmldll___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +__xmllib___depname = \ + $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.a +endif +endif +ifeq ($(SHARED),1) +____wxxml_namedll_DEP = $(__xmldll___depname) +endif +ifeq ($(SHARED),0) +____wxxml_namelib_DEP = $(__xmllib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_XRC),1) +__xrcdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_XRC),1) +__xrclib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.a +endif +endif +endif +ifeq ($(SHARED),1) +____wxxrc_namedll_DEP = $(__xrcdll___depname) +endif +ifeq ($(SHARED),0) +____wxxrc_namelib_DEP = $(__xrclib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_AUI),1) +__auidll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_AUI),1) +__auilib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.a +endif +endif +endif +ifeq ($(SHARED),1) +____wxaui_namedll_DEP = $(__auidll___depname) +endif +ifeq ($(SHARED),0) +____wxaui_namelib_DEP = $(__auilib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_RIBBON),1) +__ribbondll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_RIBBON),1) +__ribbonlib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.a +endif +endif +endif +ifeq ($(SHARED),1) +____wxribbon_namedll_DEP = $(__ribbondll___depname) +endif +ifeq ($(SHARED),0) +____wxribbon_namelib_DEP = $(__ribbonlib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_PROPGRID),1) +__propgriddll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_PROPGRID),1) +__propgridlib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.a +endif +endif +endif +ifeq ($(SHARED),1) +____wxpropgrid_namedll_DEP = $(__propgriddll___depname) +endif +ifeq ($(SHARED),0) +____wxpropgrid_namelib_DEP = $(__propgridlib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_RICHTEXT),1) +__richtextdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_RICHTEXT),1) +__richtextlib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.a +endif +endif +endif +ifeq ($(SHARED),1) +____wxrichtext_namedll_DEP = $(__richtextdll___depname) +endif +ifeq ($(SHARED),0) +____wxrichtext_namelib_DEP = $(__richtextlib___depname) +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_STC),1) +__stcdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_STC),1) +__stclib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.a +endif +endif +endif +ifeq ($(SHARED),1) +____wxstc_namedll_DEP = $(__stcdll___depname) +endif +ifeq ($(SHARED),0) +____wxstc_namelib_DEP = $(__stclib___depname) +endif +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_OPENGL),1) +__gldll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll +endif +endif +endif +ifeq ($(MONOLITHIC),0) +__WXLIBGLDEP_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core +endif +ifeq ($(MONOLITHIC),0) +__WXLIBGLDEP_BASE_p = \ + -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR) +endif +ifeq ($(MONOLITHIC),1) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR) +endif +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +ifeq ($(USE_OPENGL),1) +__gllib___depname = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.a +endif +endif +endif +ifeq ($(SHARED),1) +____wxgl_namedll_DEP = $(__gldll___depname) +endif +ifeq ($(SHARED),0) +____wxgl_namelib_DEP = $(__gllib___depname) +endif +ifeq ($(USE_STC),1) +__wxscintilla = $(LIBDIRNAME)\libwxscintilla$(WXDEBUGFLAG).a +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_HTML),1) +__htmldll_library_link_DEP = $(__htmldll___depname) +endif +endif +endif +endif +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_HTML),1) +__htmldll_library_link_LIBR = \ + $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.a +endif +endif +endif +endif +ifeq ($(WXUNIV),1) +__WXUNIV_DEFINE_p_67 = --define __WXUNIVERSAL__ +endif +ifeq ($(DEBUG_FLAG),0) +__DEBUG_DEFINE_p_66 = --define wxDEBUG_LEVEL=0 +endif +ifeq ($(BUILD),release) +__NDEBUG_DEFINE_p_65 = --define NDEBUG +endif +ifeq ($(USE_EXCEPTIONS),0) +__EXCEPTIONS_DEFINE_p_65 = --define wxNO_EXCEPTIONS +endif +ifeq ($(USE_RTTI),0) +__RTTI_DEFINE_p_65 = --define wxNO_RTTI +endif +ifeq ($(USE_THREADS),0) +__THREAD_DEFINE_p_65 = --define wxNO_THREADS +endif +ifeq ($(UNICODE),0) +__UNICODE_DEFINE_p_67 = --define wxUSE_UNICODE=0 +endif +ifeq ($(UNICODE),1) +__UNICODE_DEFINE_p_67 = --define _UNICODE +endif +ifeq ($(MSLU),1) +__MSLU_DEFINE_p_65 = --define wxUSE_UNICODE_MSLU=1 +endif +ifeq ($(USE_CAIRO),1) +__CAIRO_INCLUDEDIR_p = --include-dir $(CAIRO_ROOT)/include/cairo +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(MSLU),1) +__UNICOWS_LIB_p = -lunicows +endif +ifeq ($(USE_CAIRO),1) +__CAIRO_LIB_p = -lcairo +endif +ifeq ($(USE_CAIRO),1) +____CAIRO_LIBDIR_FILENAMES = -L$(CAIRO_ROOT)\lib +endif +ifeq ($(BUILD),debug) +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif +endif +ifeq ($(BUILD),release) +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g +endif +ifeq ($(BUILD),debug) +__OPTIMIZEFLAG = -O0 +endif +ifeq ($(BUILD),release) +__OPTIMIZEFLAG = -O2 +endif +ifeq ($(USE_THREADS),0) +__THREADSFLAG = +endif +ifeq ($(USE_THREADS),1) +__THREADSFLAG = -mthreads +endif +ifeq ($(USE_RTTI),0) +__RTTIFLAG = -fno-rtti +endif +ifeq ($(USE_RTTI),1) +__RTTIFLAG = +endif +ifeq ($(USE_EXCEPTIONS),0) +__EXCEPTIONSFLAG = -fno-exceptions +endif +ifeq ($(USE_EXCEPTIONS),1) +__EXCEPTIONSFLAG = +endif +ifeq ($(WXUNIV),1) +__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ +endif +ifeq ($(DEBUG_FLAG),0) +__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0 +endif +ifeq ($(BUILD),release) +__NDEBUG_DEFINE_p = -DNDEBUG +endif +ifeq ($(USE_EXCEPTIONS),0) +__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS +endif +ifeq ($(USE_RTTI),0) +__RTTI_DEFINE_p = -DwxNO_RTTI +endif +ifeq ($(USE_THREADS),0) +__THREAD_DEFINE_p = -DwxNO_THREADS +endif +ifeq ($(UNICODE),0) +__UNICODE_DEFINE_p = -DwxUSE_UNICODE=0 +endif +ifeq ($(UNICODE),1) +__UNICODE_DEFINE_p = -D_UNICODE +endif +ifeq ($(MSLU),1) +__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1 +endif +ifeq ($(USE_CAIRO),1) +____CAIRO_INCLUDEDIR_FILENAMES = -I$(CAIRO_ROOT)\include\cairo +endif +ifeq ($(WXUNIV),0) +__SETUP_H_SUBDIR_FILENAMES = msw +endif +ifeq ($(WXUNIV),1) +__SETUP_H_SUBDIR_FILENAMES = univ +endif + + +all: $(OBJS) +$(OBJS): + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all: setup_h $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(__wxscintilla) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) build_cfg_file + +clean: + -if exist $(OBJS)\*.o del $(OBJS)\*.o + -if exist $(OBJS)\*.d del $(OBJS)\*.d + -if exist $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a del $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a + -if exist $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a del $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a + -if exist $(LIBDIRNAME)\libwxpng$(WXDEBUGFLAG).a del $(LIBDIRNAME)\libwxpng$(WXDEBUGFLAG).a + -if exist $(LIBDIRNAME)\libwxjpeg$(WXDEBUGFLAG).a del $(LIBDIRNAME)\libwxjpeg$(WXDEBUGFLAG).a + -if exist $(LIBDIRNAME)\libwxtiff$(WXDEBUGFLAG).a del $(LIBDIRNAME)\libwxtiff$(WXDEBUGFLAG).a + -if exist $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a del $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a + -if exist $(LIBDIRNAME)\libwxscintilla$(WXDEBUGFLAG).a del $(LIBDIRNAME)\libwxscintilla$(WXDEBUGFLAG).a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a del $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a + -if exist $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a del $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.a del $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.a + -if exist $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.a del $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.a + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.a del $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.a + -if exist $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.a del $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.a + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.a + -if exist $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.a del $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.a + $(MAKE) -C ..\..\samples -f makefile.gcc $(MAKEARGS) clean + +setup_h: $(SETUPHDIR)\wx ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h $(SETUPHDIR)\wx\setup.h $(SETUPHDIR)\wx\msw\rcdefs.h + +$(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a: $(WXREGEX_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(WXREGEX_OBJECTS) + ranlib $@ + +$(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a: $(WXZLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(WXZLIB_OBJECTS) + ranlib $@ + +ifeq ($(USE_GUI),1) +$(LIBDIRNAME)\libwxpng$(WXDEBUGFLAG).a: $(WXPNG_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(WXPNG_OBJECTS) + ranlib $@ +endif + +ifeq ($(USE_GUI),1) +$(LIBDIRNAME)\libwxjpeg$(WXDEBUGFLAG).a: $(WXJPEG_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(WXJPEG_OBJECTS) + ranlib $@ +endif + +ifeq ($(USE_GUI),1) +$(LIBDIRNAME)\libwxtiff$(WXDEBUGFLAG).a: $(WXTIFF_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(WXTIFF_OBJECTS) + ranlib $@ +endif + +$(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a: $(WXEXPAT_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(WXEXPAT_OBJECTS) + ranlib $@ + +ifeq ($(USE_STC),1) +$(LIBDIRNAME)\libwxscintilla$(WXDEBUGFLAG).a: $(WXSCINTILLA_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(WXSCINTILLA_OBJECTS) + ranlib $@ +endif + +ifeq ($(MONOLITHIC),1) +ifeq ($(SHARED),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(MONODLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\monodll_version_rc.o $(__wxscintilla_library_link_DEP) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(MONODLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(__wxscintilla) +endif +endif + +ifeq ($(MONOLITHIC),1) +ifeq ($(SHARED),0) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a: $(MONOLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(MONOLIB_OBJECTS) + ranlib $@ +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(BASEDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\basedll_version_rc.o + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(BASEDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +$(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a: $(BASELIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(BASELIB_OBJECTS) + ranlib $@ +endif +endif + +ifeq ($(MONOLITHIC),0) +wxbase: $(____wxbase_namedll_DEP) $(____wxbase_namelib_DEP) +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll: $(NETDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\netdll_version_rc.o $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(NETDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +$(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.a: $(NETLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(NETLIB_OBJECTS) + ranlib $@ +endif +endif + +ifeq ($(MONOLITHIC),0) +wxnet: $(____wxnet_namedll_DEP) $(____wxnet_namelib_DEP) +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll: $(COREDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\coredll_version_rc.o $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(COREDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a: $(CORELIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(CORELIB_OBJECTS) + ranlib $@ +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_GUI),1) +wxcore: $(____wxcore_namedll_DEP) $(____wxcore_namelib_DEP) +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll: $(ADVDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\advdll_version_rc.o $(__coredll___depname) $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(ADVDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a: $(ADVLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(ADVLIB_OBJECTS) + ranlib $@ +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_GUI),1) +wxadv: $(____wxadv_namedll_DEP) $(____wxadv_namelib_DEP) +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_MEDIA),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll: $(MEDIADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\mediadll_version_rc.o $(__coredll___depname) $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(MEDIADLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +ifeq ($(USE_MEDIA),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.a: $(MEDIALIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(MEDIALIB_OBJECTS) + ranlib $@ +endif +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_GUI),1) +ifeq ($(USE_MEDIA),1) +wxmedia: $(____wxmedia_namedll_DEP) $(____wxmedia_namelib_DEP) +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_HTML),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll: $(HTMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\htmldll_version_rc.o $(__coredll___depname) $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(HTMLDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +ifeq ($(USE_HTML),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.a: $(HTMLLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(HTMLLIB_OBJECTS) + ranlib $@ +endif +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_HTML),1) +wxhtml: $(____wxhtml_namedll_DEP) $(____wxhtml_namelib_DEP) +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_WEBVIEW),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll: $(WEBVIEWDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\webviewdll_version_rc.o $(__coredll___depname) $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(WEBVIEWDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +ifeq ($(USE_WEBVIEW),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.a: $(WEBVIEWLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(WEBVIEWLIB_OBJECTS) + ranlib $@ +endif +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_WEBVIEW),1) +wxwebview: $(____wxwebview_namedll_DEP) $(____wxwebview_namelib_DEP) +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_QA),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll: $(QADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\qadll_version_rc.o $(__coredll___depname) $(__basedll___depname) $(__xmldll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(QADLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.a +endif +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +ifeq ($(USE_QA),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.a: $(QALIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(QALIB_OBJECTS) + ranlib $@ +endif +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_QA),1) +wxqa: $(____wxqa_namedll_DEP) $(____wxqa_namelib_DEP) +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll: $(XMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\xmldll_version_rc.o $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(XMLDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +$(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.a: $(XMLLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(XMLLIB_OBJECTS) + ranlib $@ +endif +endif + +ifeq ($(MONOLITHIC),0) +wxxml: $(____wxxml_namedll_DEP) $(____wxxml_namelib_DEP) +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_XRC),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll: $(XRCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\xrcdll_version_rc.o $(__htmldll_library_link_DEP) $(__advdll___depname) $(__coredll___depname) $(__xmldll___depname) $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(XRCDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_XRC),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.a: $(XRCLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(XRCLIB_OBJECTS) + ranlib $@ +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_XRC),1) +wxxrc: $(____wxxrc_namedll_DEP) $(____wxxrc_namelib_DEP) +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_AUI),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll: $(AUIDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\auidll_version_rc.o $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(AUIDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_AUI),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.a: $(AUILIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(AUILIB_OBJECTS) + ranlib $@ +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_AUI),1) +wxaui: $(____wxaui_namedll_DEP) $(____wxaui_namelib_DEP) +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_RIBBON),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll: $(RIBBONDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\ribbondll_version_rc.o $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(RIBBONDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_RIBBON),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.a: $(RIBBONLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(RIBBONLIB_OBJECTS) + ranlib $@ +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_RIBBON),1) +wxribbon: $(____wxribbon_namedll_DEP) $(____wxribbon_namelib_DEP) +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_PROPGRID),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll: $(PROPGRIDDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\propgriddll_version_rc.o $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(PROPGRIDDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_PROPGRID),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.a: $(PROPGRIDLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(PROPGRIDLIB_OBJECTS) + ranlib $@ +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_PROPGRID),1) +wxpropgrid: $(____wxpropgrid_namedll_DEP) $(____wxpropgrid_namelib_DEP) +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_RICHTEXT),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll: $(RICHTEXTDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\richtextdll_version_rc.o $(__advdll___depname) $(__htmldll_library_link_DEP) $(__xmldll___depname) $(__coredll___depname) $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(RICHTEXTDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.a $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.a $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_RICHTEXT),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.a: $(RICHTEXTLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(RICHTEXTLIB_OBJECTS) + ranlib $@ +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_RICHTEXT),1) +wxrichtext: $(____wxrichtext_namedll_DEP) $(____wxrichtext_namelib_DEP) +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),1) +ifeq ($(USE_STC),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll: $(STCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(__wxscintilla) $(OBJS)\stcdll_version_rc.o $(__coredll___depname) $(__basedll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(STCDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(LIBDIRNAME)\libwxscintilla$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.a $(LIBDIRNAME)\libwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).a +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(SHARED),0) +ifeq ($(USE_STC),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.a: $(STCLIB_OBJECTS) $(__wxscintilla) + if exist $@ del $@ + ar rcu $@ $(STCLIB_OBJECTS) + ranlib $@ +endif +endif +endif + +ifeq ($(MONOLITHIC),0) +ifeq ($(USE_STC),1) +wxstc: $(____wxstc_namedll_DEP) $(____wxstc_namelib_DEP) +endif +endif + +ifeq ($(SHARED),1) +ifeq ($(USE_GUI),1) +ifeq ($(USE_OPENGL),1) +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll: $(GLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\libwxexpat$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxzlib$(WXDEBUGFLAG).a $(LIBDIRNAME)\libwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).a $(OBJS)\gldll_version_rc.o $(__basedll___depname) $(__coredll___depname) $(__monodll___depname) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(GLDLL_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--out-implib=$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.a $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) -lopengl32 -lglu32 +endif +endif +endif + +ifeq ($(SHARED),0) +ifeq ($(USE_GUI),1) +ifeq ($(USE_OPENGL),1) +$(LIBDIRNAME)\libwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.a: $(GLLIB_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(GLLIB_OBJECTS) + ranlib $@ +endif +endif +endif + +ifeq ($(USE_GUI),1) +ifeq ($(USE_OPENGL),1) +wxgl: $(____wxgl_namedll_DEP) $(____wxgl_namelib_DEP) +endif +endif + +samples: + $(MAKE) -C ..\..\samples -f makefile.gcc $(MAKEARGS) all + +$(LIBDIRNAME): + if not exist $(LIBDIRNAME) mkdir $(LIBDIRNAME) + +$(SETUPHDIR): $(LIBDIRNAME) + if not exist $(SETUPHDIR) mkdir $(SETUPHDIR) + +$(SETUPHDIR)\wx: $(SETUPHDIR) + if not exist $(SETUPHDIR)\wx mkdir $(SETUPHDIR)\wx + +..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h: + if not exist ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h copy ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup0.h ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h + +$(SETUPHDIR)\wx\setup.h: + if not exist $(SETUPHDIR)\wx\setup.h copy ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h $(SETUPHDIR)\wx\setup.h + +$(SETUPHDIR)\wx\msw: $(SETUPHDIR)\wx + if not exist $(SETUPHDIR)\wx\msw mkdir $(SETUPHDIR)\wx\msw + +$(SETUPHDIR)\wx\msw\rcdefs.h: $(SETUPHDIR)\wx\msw ..\..\include\wx\msw\genrcdefs.h + $(CPP) "..\..\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" + +build_cfg_file: $(SETUPHDIR) + @echo WXVER_MAJOR=3 >$(BUILD_CFG_FILE) + @echo WXVER_MINOR=0 >>$(BUILD_CFG_FILE) + @echo WXVER_RELEASE=1 >>$(BUILD_CFG_FILE) + @echo BUILD=$(BUILD) >>$(BUILD_CFG_FILE) + @echo MONOLITHIC=$(MONOLITHIC) >>$(BUILD_CFG_FILE) + @echo SHARED=$(SHARED) >>$(BUILD_CFG_FILE) + @echo UNICODE=$(UNICODE) >>$(BUILD_CFG_FILE) + @echo TOOLKIT=MSW >>$(BUILD_CFG_FILE) + @echo TOOLKIT_VERSION=$(TOOLKIT_VERSION) >>$(BUILD_CFG_FILE) + @echo WXUNIV=$(WXUNIV) >>$(BUILD_CFG_FILE) + @echo CFG=$(CFG) >>$(BUILD_CFG_FILE) + @echo VENDOR=$(VENDOR) >>$(BUILD_CFG_FILE) + @echo OFFICIAL_BUILD=$(OFFICIAL_BUILD) >>$(BUILD_CFG_FILE) + @echo DEBUG_FLAG=$(DEBUG_FLAG) >>$(BUILD_CFG_FILE) + @echo DEBUG_INFO=$(DEBUG_INFO) >>$(BUILD_CFG_FILE) + @echo RUNTIME_LIBS=$(RUNTIME_LIBS) >>$(BUILD_CFG_FILE) + @echo MSLU=$(MSLU) >>$(BUILD_CFG_FILE) + @echo USE_EXCEPTIONS=$(USE_EXCEPTIONS) >>$(BUILD_CFG_FILE) + @echo USE_RTTI=$(USE_RTTI) >>$(BUILD_CFG_FILE) + @echo USE_THREADS=$(USE_THREADS) >>$(BUILD_CFG_FILE) + @echo USE_AUI=$(USE_AUI) >>$(BUILD_CFG_FILE) + @echo USE_GUI=$(USE_GUI) >>$(BUILD_CFG_FILE) + @echo USE_HTML=$(USE_HTML) >>$(BUILD_CFG_FILE) + @echo USE_MEDIA=$(USE_MEDIA) >>$(BUILD_CFG_FILE) + @echo USE_OPENGL=$(USE_OPENGL) >>$(BUILD_CFG_FILE) + @echo USE_QA=$(USE_QA) >>$(BUILD_CFG_FILE) + @echo USE_PROPGRID=$(USE_PROPGRID) >>$(BUILD_CFG_FILE) + @echo USE_RIBBON=$(USE_RIBBON) >>$(BUILD_CFG_FILE) + @echo USE_RICHTEXT=$(USE_RICHTEXT) >>$(BUILD_CFG_FILE) + @echo USE_STC=$(USE_STC) >>$(BUILD_CFG_FILE) + @echo USE_WEBVIEW=$(USE_WEBVIEW) >>$(BUILD_CFG_FILE) + @echo USE_XRC=$(USE_XRC) >>$(BUILD_CFG_FILE) + @echo COMPILER=gcc >>$(BUILD_CFG_FILE) + @echo COMPILER_VERSION=$(COMPILER_VERSION) >>$(BUILD_CFG_FILE) + @echo CC=$(CC) >>$(BUILD_CFG_FILE) + @echo CXX=$(CXX) >>$(BUILD_CFG_FILE) + @echo CFLAGS=$(CFLAGS) >>$(BUILD_CFG_FILE) + @echo CPPFLAGS=$(CPPFLAGS) >>$(BUILD_CFG_FILE) + @echo CXXFLAGS=$(CXXFLAGS) >>$(BUILD_CFG_FILE) + @echo LDFLAGS=$(LDFLAGS) >>$(BUILD_CFG_FILE) + +$(OBJS)\wxregex_regcomp.o: ../../src/regex/regcomp.c + $(CC) -c -o $@ $(WXREGEX_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxregex_regexec.o: ../../src/regex/regexec.c + $(CC) -c -o $@ $(WXREGEX_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxregex_regerror.o: ../../src/regex/regerror.c + $(CC) -c -o $@ $(WXREGEX_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxregex_regfree.o: ../../src/regex/regfree.c + $(CC) -c -o $@ $(WXREGEX_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_adler32.o: ../../src/zlib/adler32.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_compress.o: ../../src/zlib/compress.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_crc32.o: ../../src/zlib/crc32.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_deflate.o: ../../src/zlib/deflate.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_gzclose.o: ../../src/zlib/gzclose.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_gzlib.o: ../../src/zlib/gzlib.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_gzread.o: ../../src/zlib/gzread.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_gzwrite.o: ../../src/zlib/gzwrite.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_infback.o: ../../src/zlib/infback.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_inffast.o: ../../src/zlib/inffast.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_inflate.o: ../../src/zlib/inflate.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_inftrees.o: ../../src/zlib/inftrees.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_trees.o: ../../src/zlib/trees.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_uncompr.o: ../../src/zlib/uncompr.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxzlib_zutil.o: ../../src/zlib/zutil.c + $(CC) -c -o $@ $(WXZLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_png.o: ../../src/png/png.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngerror.o: ../../src/png/pngerror.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngget.o: ../../src/png/pngget.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngmem.o: ../../src/png/pngmem.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngpread.o: ../../src/png/pngpread.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngread.o: ../../src/png/pngread.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngrio.o: ../../src/png/pngrio.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngrtran.o: ../../src/png/pngrtran.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngrutil.o: ../../src/png/pngrutil.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngset.o: ../../src/png/pngset.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngtrans.o: ../../src/png/pngtrans.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngwio.o: ../../src/png/pngwio.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngwrite.o: ../../src/png/pngwrite.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngwtran.o: ../../src/png/pngwtran.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxpng_pngwutil.o: ../../src/png/pngwutil.c + $(CC) -c -o $@ $(WXPNG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcomapi.o: ../../src/jpeg/jcomapi.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jutils.o: ../../src/jpeg/jutils.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jerror.o: ../../src/jpeg/jerror.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jmemmgr.o: ../../src/jpeg/jmemmgr.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jmemnobs.o: ../../src/jpeg/jmemnobs.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcapimin.o: ../../src/jpeg/jcapimin.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcapistd.o: ../../src/jpeg/jcapistd.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jctrans.o: ../../src/jpeg/jctrans.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcparam.o: ../../src/jpeg/jcparam.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdatadst.o: ../../src/jpeg/jdatadst.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcinit.o: ../../src/jpeg/jcinit.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcmaster.o: ../../src/jpeg/jcmaster.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcmarker.o: ../../src/jpeg/jcmarker.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcmainct.o: ../../src/jpeg/jcmainct.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcprepct.o: ../../src/jpeg/jcprepct.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jccoefct.o: ../../src/jpeg/jccoefct.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jccolor.o: ../../src/jpeg/jccolor.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcsample.o: ../../src/jpeg/jcsample.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jchuff.o: ../../src/jpeg/jchuff.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcphuff.o: ../../src/jpeg/jcphuff.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jcdctmgr.o: ../../src/jpeg/jcdctmgr.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jfdctfst.o: ../../src/jpeg/jfdctfst.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jfdctflt.o: ../../src/jpeg/jfdctflt.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jfdctint.o: ../../src/jpeg/jfdctint.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdapimin.o: ../../src/jpeg/jdapimin.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdapistd.o: ../../src/jpeg/jdapistd.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdtrans.o: ../../src/jpeg/jdtrans.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdatasrc.o: ../../src/jpeg/jdatasrc.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdmaster.o: ../../src/jpeg/jdmaster.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdinput.o: ../../src/jpeg/jdinput.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdmarker.o: ../../src/jpeg/jdmarker.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdhuff.o: ../../src/jpeg/jdhuff.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdphuff.o: ../../src/jpeg/jdphuff.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdmainct.o: ../../src/jpeg/jdmainct.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdcoefct.o: ../../src/jpeg/jdcoefct.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdpostct.o: ../../src/jpeg/jdpostct.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jddctmgr.o: ../../src/jpeg/jddctmgr.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jidctfst.o: ../../src/jpeg/jidctfst.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jidctflt.o: ../../src/jpeg/jidctflt.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jidctint.o: ../../src/jpeg/jidctint.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jidctred.o: ../../src/jpeg/jidctred.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdsample.o: ../../src/jpeg/jdsample.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdcolor.o: ../../src/jpeg/jdcolor.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jquant1.o: ../../src/jpeg/jquant1.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jquant2.o: ../../src/jpeg/jquant2.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxjpeg_jdmerge.o: ../../src/jpeg/jdmerge.c + $(CC) -c -o $@ $(WXJPEG_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_win32.o: ../../src/tiff/libtiff/tif_win32.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_aux.o: ../../src/tiff/libtiff/tif_aux.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_close.o: ../../src/tiff/libtiff/tif_close.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_codec.o: ../../src/tiff/libtiff/tif_codec.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_color.o: ../../src/tiff/libtiff/tif_color.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_compress.o: ../../src/tiff/libtiff/tif_compress.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_dir.o: ../../src/tiff/libtiff/tif_dir.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_dirinfo.o: ../../src/tiff/libtiff/tif_dirinfo.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_dirread.o: ../../src/tiff/libtiff/tif_dirread.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_dirwrite.o: ../../src/tiff/libtiff/tif_dirwrite.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_dumpmode.o: ../../src/tiff/libtiff/tif_dumpmode.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_error.o: ../../src/tiff/libtiff/tif_error.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_extension.o: ../../src/tiff/libtiff/tif_extension.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_fax3.o: ../../src/tiff/libtiff/tif_fax3.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_fax3sm.o: ../../src/tiff/libtiff/tif_fax3sm.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_flush.o: ../../src/tiff/libtiff/tif_flush.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_getimage.o: ../../src/tiff/libtiff/tif_getimage.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_jbig.o: ../../src/tiff/libtiff/tif_jbig.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_jpeg.o: ../../src/tiff/libtiff/tif_jpeg.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_jpeg_12.o: ../../src/tiff/libtiff/tif_jpeg_12.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_luv.o: ../../src/tiff/libtiff/tif_luv.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_lzma.o: ../../src/tiff/libtiff/tif_lzma.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_lzw.o: ../../src/tiff/libtiff/tif_lzw.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_next.o: ../../src/tiff/libtiff/tif_next.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_ojpeg.o: ../../src/tiff/libtiff/tif_ojpeg.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_open.o: ../../src/tiff/libtiff/tif_open.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_packbits.o: ../../src/tiff/libtiff/tif_packbits.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_pixarlog.o: ../../src/tiff/libtiff/tif_pixarlog.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_predict.o: ../../src/tiff/libtiff/tif_predict.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_print.o: ../../src/tiff/libtiff/tif_print.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_read.o: ../../src/tiff/libtiff/tif_read.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_strip.o: ../../src/tiff/libtiff/tif_strip.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_swab.o: ../../src/tiff/libtiff/tif_swab.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_thunder.o: ../../src/tiff/libtiff/tif_thunder.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_tile.o: ../../src/tiff/libtiff/tif_tile.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_version.o: ../../src/tiff/libtiff/tif_version.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_warning.o: ../../src/tiff/libtiff/tif_warning.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_write.o: ../../src/tiff/libtiff/tif_write.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxtiff_tif_zip.o: ../../src/tiff/libtiff/tif_zip.c + $(CC) -c -o $@ $(WXTIFF_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxexpat_xmlparse.o: ../../src/expat/lib/xmlparse.c + $(CC) -c -o $@ $(WXEXPAT_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxexpat_xmlrole.o: ../../src/expat/lib/xmlrole.c + $(CC) -c -o $@ $(WXEXPAT_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxexpat_xmltok.o: ../../src/expat/lib/xmltok.c + $(CC) -c -o $@ $(WXEXPAT_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexA68k.o: ../../src/stc/scintilla/lexers/LexA68k.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexAbaqus.o: ../../src/stc/scintilla/lexers/LexAbaqus.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexAda.o: ../../src/stc/scintilla/lexers/LexAda.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexAPDL.o: ../../src/stc/scintilla/lexers/LexAPDL.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexAsm.o: ../../src/stc/scintilla/lexers/LexAsm.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexAsn1.o: ../../src/stc/scintilla/lexers/LexAsn1.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexASY.o: ../../src/stc/scintilla/lexers/LexASY.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexAU3.o: ../../src/stc/scintilla/lexers/LexAU3.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexAVE.o: ../../src/stc/scintilla/lexers/LexAVE.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexAVS.o: ../../src/stc/scintilla/lexers/LexAVS.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexBaan.o: ../../src/stc/scintilla/lexers/LexBaan.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexBash.o: ../../src/stc/scintilla/lexers/LexBash.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexBasic.o: ../../src/stc/scintilla/lexers/LexBasic.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexBullant.o: ../../src/stc/scintilla/lexers/LexBullant.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexCaml.o: ../../src/stc/scintilla/lexers/LexCaml.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexCLW.o: ../../src/stc/scintilla/lexers/LexCLW.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexCmake.o: ../../src/stc/scintilla/lexers/LexCmake.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexCOBOL.o: ../../src/stc/scintilla/lexers/LexCOBOL.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexCoffeeScript.o: ../../src/stc/scintilla/lexers/LexCoffeeScript.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexConf.o: ../../src/stc/scintilla/lexers/LexConf.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexCPP.o: ../../src/stc/scintilla/lexers/LexCPP.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexCrontab.o: ../../src/stc/scintilla/lexers/LexCrontab.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexCsound.o: ../../src/stc/scintilla/lexers/LexCsound.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexCSS.o: ../../src/stc/scintilla/lexers/LexCSS.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexD.o: ../../src/stc/scintilla/lexers/LexD.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexECL.o: ../../src/stc/scintilla/lexers/LexECL.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexEiffel.o: ../../src/stc/scintilla/lexers/LexEiffel.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexErlang.o: ../../src/stc/scintilla/lexers/LexErlang.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexEScript.o: ../../src/stc/scintilla/lexers/LexEScript.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexFlagship.o: ../../src/stc/scintilla/lexers/LexFlagship.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexForth.o: ../../src/stc/scintilla/lexers/LexForth.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexFortran.o: ../../src/stc/scintilla/lexers/LexFortran.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexGAP.o: ../../src/stc/scintilla/lexers/LexGAP.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexGui4Cli.o: ../../src/stc/scintilla/lexers/LexGui4Cli.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexHaskell.o: ../../src/stc/scintilla/lexers/LexHaskell.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexHTML.o: ../../src/stc/scintilla/lexers/LexHTML.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexInno.o: ../../src/stc/scintilla/lexers/LexInno.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexKix.o: ../../src/stc/scintilla/lexers/LexKix.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexLisp.o: ../../src/stc/scintilla/lexers/LexLisp.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexLout.o: ../../src/stc/scintilla/lexers/LexLout.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexLua.o: ../../src/stc/scintilla/lexers/LexLua.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexMagik.o: ../../src/stc/scintilla/lexers/LexMagik.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexMarkdown.o: ../../src/stc/scintilla/lexers/LexMarkdown.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexMatlab.o: ../../src/stc/scintilla/lexers/LexMatlab.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexMetapost.o: ../../src/stc/scintilla/lexers/LexMetapost.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexMMIXAL.o: ../../src/stc/scintilla/lexers/LexMMIXAL.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexModula.o: ../../src/stc/scintilla/lexers/LexModula.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexMPT.o: ../../src/stc/scintilla/lexers/LexMPT.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexMSSQL.o: ../../src/stc/scintilla/lexers/LexMSSQL.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexMySQL.o: ../../src/stc/scintilla/lexers/LexMySQL.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexNimrod.o: ../../src/stc/scintilla/lexers/LexNimrod.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexNsis.o: ../../src/stc/scintilla/lexers/LexNsis.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexOpal.o: ../../src/stc/scintilla/lexers/LexOpal.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexOScript.o: ../../src/stc/scintilla/lexers/LexOScript.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexOthers.o: ../../src/stc/scintilla/lexers/LexOthers.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexPascal.o: ../../src/stc/scintilla/lexers/LexPascal.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexPB.o: ../../src/stc/scintilla/lexers/LexPB.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexPerl.o: ../../src/stc/scintilla/lexers/LexPerl.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexPLM.o: ../../src/stc/scintilla/lexers/LexPLM.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexPOV.o: ../../src/stc/scintilla/lexers/LexPOV.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexPowerPro.o: ../../src/stc/scintilla/lexers/LexPowerPro.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexPowerShell.o: ../../src/stc/scintilla/lexers/LexPowerShell.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexProgress.o: ../../src/stc/scintilla/lexers/LexProgress.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexPS.o: ../../src/stc/scintilla/lexers/LexPS.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexPython.o: ../../src/stc/scintilla/lexers/LexPython.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexR.o: ../../src/stc/scintilla/lexers/LexR.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexRebol.o: ../../src/stc/scintilla/lexers/LexRebol.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexRuby.o: ../../src/stc/scintilla/lexers/LexRuby.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexScriptol.o: ../../src/stc/scintilla/lexers/LexScriptol.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexSmalltalk.o: ../../src/stc/scintilla/lexers/LexSmalltalk.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexSML.o: ../../src/stc/scintilla/lexers/LexSML.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexSorcus.o: ../../src/stc/scintilla/lexers/LexSorcus.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexSpecman.o: ../../src/stc/scintilla/lexers/LexSpecman.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexSpice.o: ../../src/stc/scintilla/lexers/LexSpice.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexSQL.o: ../../src/stc/scintilla/lexers/LexSQL.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexTACL.o: ../../src/stc/scintilla/lexers/LexTACL.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexTADS3.o: ../../src/stc/scintilla/lexers/LexTADS3.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexTAL.o: ../../src/stc/scintilla/lexers/LexTAL.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexTCL.o: ../../src/stc/scintilla/lexers/LexTCL.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexTCMD.o: ../../src/stc/scintilla/lexers/LexTCMD.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexTeX.o: ../../src/stc/scintilla/lexers/LexTeX.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexTxt2tags.o: ../../src/stc/scintilla/lexers/LexTxt2tags.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexVB.o: ../../src/stc/scintilla/lexers/LexVB.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexVerilog.o: ../../src/stc/scintilla/lexers/LexVerilog.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexVHDL.o: ../../src/stc/scintilla/lexers/LexVHDL.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexVisualProlog.o: ../../src/stc/scintilla/lexers/LexVisualProlog.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexYAML.o: ../../src/stc/scintilla/lexers/LexYAML.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_Accessor.o: ../../src/stc/scintilla/lexlib/Accessor.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_CharacterSet.o: ../../src/stc/scintilla/lexlib/CharacterSet.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexerBase.o: ../../src/stc/scintilla/lexlib/LexerBase.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexerModule.o: ../../src/stc/scintilla/lexlib/LexerModule.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexerNoExceptions.o: ../../src/stc/scintilla/lexlib/LexerNoExceptions.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LexerSimple.o: ../../src/stc/scintilla/lexlib/LexerSimple.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_PropSetSimple.o: ../../src/stc/scintilla/lexlib/PropSetSimple.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_StyleContext.o: ../../src/stc/scintilla/lexlib/StyleContext.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_WordList.o: ../../src/stc/scintilla/lexlib/WordList.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_AutoComplete.o: ../../src/stc/scintilla/src/AutoComplete.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_CallTip.o: ../../src/stc/scintilla/src/CallTip.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_Catalogue.o: ../../src/stc/scintilla/src/Catalogue.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_CellBuffer.o: ../../src/stc/scintilla/src/CellBuffer.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_CharClassify.o: ../../src/stc/scintilla/src/CharClassify.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_ContractionState.o: ../../src/stc/scintilla/src/ContractionState.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_Decoration.o: ../../src/stc/scintilla/src/Decoration.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_Document.o: ../../src/stc/scintilla/src/Document.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_Editor.o: ../../src/stc/scintilla/src/Editor.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_ExternalLexer.o: ../../src/stc/scintilla/src/ExternalLexer.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_Indicator.o: ../../src/stc/scintilla/src/Indicator.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_KeyMap.o: ../../src/stc/scintilla/src/KeyMap.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_LineMarker.o: ../../src/stc/scintilla/src/LineMarker.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_PerLine.o: ../../src/stc/scintilla/src/PerLine.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_PositionCache.o: ../../src/stc/scintilla/src/PositionCache.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_RESearch.o: ../../src/stc/scintilla/src/RESearch.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_RunStyles.o: ../../src/stc/scintilla/src/RunStyles.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_ScintillaBase.o: ../../src/stc/scintilla/src/ScintillaBase.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_Selection.o: ../../src/stc/scintilla/src/Selection.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_Style.o: ../../src/stc/scintilla/src/Style.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_UniConversion.o: ../../src/stc/scintilla/src/UniConversion.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_ViewStyle.o: ../../src/stc/scintilla/src/ViewStyle.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\wxscintilla_XPM.o: ../../src/stc/scintilla/src/XPM.cxx + $(CXX) -c -o $@ $(WXSCINTILLA_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_any.o: ../../src/common/any.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_appbase.o: ../../src/common/appbase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_arcall.o: ../../src/common/arcall.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_arcfind.o: ../../src/common/arcfind.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_archive.o: ../../src/common/archive.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_arrstr.o: ../../src/common/arrstr.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_base64.o: ../../src/common/base64.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_clntdata.o: ../../src/common/clntdata.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_cmdline.o: ../../src/common/cmdline.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_config.o: ../../src/common/config.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_convauto.o: ../../src/common/convauto.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_datetime.o: ../../src/common/datetime.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_datetimefmt.o: ../../src/common/datetimefmt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_datstrm.o: ../../src/common/datstrm.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dircmn.o: ../../src/common/dircmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dynarray.o: ../../src/common/dynarray.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dynlib.o: ../../src/common/dynlib.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dynload.o: ../../src/common/dynload.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_encconv.o: ../../src/common/encconv.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_evtloopcmn.o: ../../src/common/evtloopcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_extended.o: ../../src/common/extended.c + $(CC) -c -o $@ $(MONODLL_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_ffile.o: ../../src/common/ffile.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_file.o: ../../src/common/file.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fileback.o: ../../src/common/fileback.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fileconf.o: ../../src/common/fileconf.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_filefn.o: ../../src/common/filefn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_filename.o: ../../src/common/filename.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_filesys.o: ../../src/common/filesys.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_filtall.o: ../../src/common/filtall.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_filtfind.o: ../../src/common/filtfind.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fmapbase.o: ../../src/common/fmapbase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fs_arc.o: ../../src/common/fs_arc.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fs_filter.o: ../../src/common/fs_filter.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_hash.o: ../../src/common/hash.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_hashmap.o: ../../src/common/hashmap.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_init.o: ../../src/common/init.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_intl.o: ../../src/common/intl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_ipcbase.o: ../../src/common/ipcbase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_languageinfo.o: ../../src/common/languageinfo.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_list.o: ../../src/common/list.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_log.o: ../../src/common/log.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_longlong.o: ../../src/common/longlong.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_memory.o: ../../src/common/memory.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_mimecmn.o: ../../src/common/mimecmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_module.o: ../../src/common/module.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_mstream.o: ../../src/common/mstream.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_numformatter.o: ../../src/common/numformatter.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_object.o: ../../src/common/object.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_platinfo.o: ../../src/common/platinfo.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_powercmn.o: ../../src/common/powercmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_process.o: ../../src/common/process.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_regex.o: ../../src/common/regex.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_stdpbase.o: ../../src/common/stdpbase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_sstream.o: ../../src/common/sstream.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_stdstream.o: ../../src/common/stdstream.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_stopwatch.o: ../../src/common/stopwatch.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_strconv.o: ../../src/common/strconv.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_stream.o: ../../src/common/stream.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_string.o: ../../src/common/string.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_stringimpl.o: ../../src/common/stringimpl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_stringops.o: ../../src/common/stringops.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_strvararg.o: ../../src/common/strvararg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_sysopt.o: ../../src/common/sysopt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_tarstrm.o: ../../src/common/tarstrm.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_textbuf.o: ../../src/common/textbuf.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_textfile.o: ../../src/common/textfile.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_threadinfo.o: ../../src/common/threadinfo.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_time.o: ../../src/common/time.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_timercmn.o: ../../src/common/timercmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_timerimpl.o: ../../src/common/timerimpl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_tokenzr.o: ../../src/common/tokenzr.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_translation.o: ../../src/common/translation.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_txtstrm.o: ../../src/common/txtstrm.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_unichar.o: ../../src/common/unichar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_uri.o: ../../src/common/uri.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_ustring.o: ../../src/common/ustring.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_variant.o: ../../src/common/variant.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_wfstream.o: ../../src/common/wfstream.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_wxcrt.o: ../../src/common/wxcrt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_wxprintf.o: ../../src/common/wxprintf.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xlocale.o: ../../src/common/xlocale.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xti.o: ../../src/common/xti.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xtistrm.o: ../../src/common/xtistrm.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_zipstrm.o: ../../src/common/zipstrm.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_zstream.o: ../../src/common/zstream.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fswatchercmn.o: ../../src/common/fswatchercmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fswatcherg.o: ../../src/generic/fswatcherg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_basemsw.o: ../../src/msw/basemsw.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_crashrpt.o: ../../src/msw/crashrpt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_debughlp.o: ../../src/msw/debughlp.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dde.o: ../../src/msw/dde.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dir.o: ../../src/msw/dir.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dlmsw.o: ../../src/msw/dlmsw.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_evtloopconsole.o: ../../src/msw/evtloopconsole.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_mimetype.o: ../../src/msw/mimetype.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_power.o: ../../src/msw/power.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_regconf.o: ../../src/msw/regconf.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_registry.o: ../../src/msw/registry.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_snglinst.o: ../../src/msw/snglinst.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_stackwalk.o: ../../src/msw/stackwalk.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_stdpaths.o: ../../src/msw/stdpaths.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_thread.o: ../../src/msw/thread.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_timer.o: ../../src/msw/timer.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_utils.o: ../../src/msw/utils.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_utilsexc.o: ../../src/msw/utilsexc.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fswatcher.o: ../../src/msw/fswatcher.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_event.o: ../../src/common/event.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fs_mem.o: ../../src/common/fs_mem.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msgout.o: ../../src/common/msgout.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_utilscmn.o: ../../src/common/utilscmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_main.o: ../../src/msw/main.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_mslu.o: ../../src/msw/mslu.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_volume.o: ../../src/msw/volume.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fs_inet.o: ../../src/common/fs_inet.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_ftp.o: ../../src/common/ftp.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_http.o: ../../src/common/http.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_protocol.o: ../../src/common/protocol.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_sckaddr.o: ../../src/common/sckaddr.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_sckfile.o: ../../src/common/sckfile.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_sckipc.o: ../../src/common/sckipc.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_sckstrm.o: ../../src/common/sckstrm.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_socket.o: ../../src/common/socket.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_url.o: ../../src/common/url.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_sockmsw.o: ../../src/msw/sockmsw.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_urlmsw.o: ../../src/msw/urlmsw.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_generic_statusbr.o: ../../src/generic/statusbr.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_accel.o: ../../src/msw/accel.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_anybutton.o: ../../src/msw/anybutton.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_artmsw.o: ../../src/msw/artmsw.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_bmpbuttn.o: ../../src/msw/bmpbuttn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_button.o: ../../src/msw/button.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_checkbox.o: ../../src/msw/checkbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_choice.o: ../../src/msw/choice.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_colordlg.o: ../../src/msw/colordlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_combo.o: ../../src/msw/combo.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_combobox.o: ../../src/msw/combobox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_control.o: ../../src/msw/control.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_dialog.o: ../../src/msw/dialog.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dirdlg.o: ../../src/msw/dirdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dragimag.o: ../../src/msw/dragimag.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_filedlg.o: ../../src/msw/filedlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_frame.o: ../../src/msw/frame.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_gauge.o: ../../src/msw/gauge.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_headerctrl.o: ../../src/msw/headerctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_iniconf.o: ../../src/msw/iniconf.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_listbox.o: ../../src/msw/listbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_listctrl.o: ../../src/msw/listctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_mdi.o: ../../src/msw/mdi.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_menu.o: ../../src/msw/menu.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_menuitem.o: ../../src/msw/menuitem.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_metafile.o: ../../src/msw/metafile.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msgdlg.o: ../../src/msw/msgdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_nativdlg.o: ../../src/msw/nativdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_nativewin.o: ../../src/msw/nativewin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_notebook.o: ../../src/msw/notebook.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_access.o: ../../src/msw/ole/access.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_ownerdrw.o: ../../src/msw/ownerdrw.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_panel.o: ../../src/msw/panel.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_progdlg.o: ../../src/msw/progdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_radiobox.o: ../../src/msw/radiobox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_radiobut.o: ../../src/msw/radiobut.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_richmsgdlg.o: ../../src/msw/richmsgdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_scrolbar.o: ../../src/msw/scrolbar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_slider.o: ../../src/msw/slider.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_spinbutt.o: ../../src/msw/spinbutt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_spinctrl.o: ../../src/msw/spinctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_statbmp.o: ../../src/msw/statbmp.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_statbox.o: ../../src/msw/statbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_statusbar.o: ../../src/msw/statusbar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_statline.o: ../../src/msw/statline.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_stattext.o: ../../src/msw/stattext.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_toolbar.o: ../../src/msw/toolbar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_textctrl.o: ../../src/msw/textctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_textentry.o: ../../src/msw/textentry.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_tglbtn.o: ../../src/msw/tglbtn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_treectrl.o: ../../src/msw/treectrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_checklst.o: ../../src/msw/checklst.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_msw_fdrepdlg.o: ../../src/msw/fdrepdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fontdlg.o: ../../src/msw/fontdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_generic_accel.o: ../../src/generic/accel.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_colrdlgg.o: ../../src/generic/colrdlgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dirdlgg.o: ../../src/generic/dirdlgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_generic_fdrepdlg.o: ../../src/generic/fdrepdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_filedlgg.o: ../../src/generic/filedlgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_fontdlgg.o: ../../src/generic/fontdlgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_generic_listctrl.o: ../../src/generic/listctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_mdig.o: ../../src/generic/mdig.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_bmpbuttn.o: ../../src/univ/bmpbuttn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_button.o: ../../src/univ/button.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_checkbox.o: ../../src/univ/checkbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_checklst.o: ../../src/univ/checklst.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_choice.o: ../../src/univ/choice.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_combobox.o: ../../src/univ/combobox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_control.o: ../../src/univ/control.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_ctrlrend.o: ../../src/univ/ctrlrend.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_dialog.o: ../../src/univ/dialog.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_framuniv.o: ../../src/univ/framuniv.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_gauge.o: ../../src/univ/gauge.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_inpcons.o: ../../src/univ/inpcons.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_inphand.o: ../../src/univ/inphand.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_listbox.o: ../../src/univ/listbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_menu.o: ../../src/univ/menu.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_notebook.o: ../../src/univ/notebook.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_radiobox.o: ../../src/univ/radiobox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_radiobut.o: ../../src/univ/radiobut.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_scrarrow.o: ../../src/univ/scrarrow.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_scrolbar.o: ../../src/univ/scrolbar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_scrthumb.o: ../../src/univ/scrthumb.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_settingsuniv.o: ../../src/univ/settingsuniv.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_slider.o: ../../src/univ/slider.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_spinbutt.o: ../../src/univ/spinbutt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_statbmp.o: ../../src/univ/statbmp.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_statbox.o: ../../src/univ/statbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_statline.o: ../../src/univ/statline.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_stattext.o: ../../src/univ/stattext.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_statusbr.o: ../../src/univ/statusbr.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_stdrend.o: ../../src/univ/stdrend.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_textctrl.o: ../../src/univ/textctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_tglbtn.o: ../../src/univ/tglbtn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_theme.o: ../../src/univ/theme.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_univ_toolbar.o: ../../src/univ/toolbar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_topluniv.o: ../../src/univ/topluniv.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_winuniv.o: ../../src/univ/winuniv.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_gtk.o: ../../src/univ/themes/gtk.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_metal.o: ../../src/univ/themes/metal.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_mono.o: ../../src/univ/themes/mono.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_win32.o: ../../src/univ/themes/win32.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_bmpcbox.o: ../../src/msw/bmpcbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_calctrl.o: ../../src/msw/calctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_commandlinkbutton.o: ../../src/msw/commandlinkbutton.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_datecontrols.o: ../../src/msw/datecontrols.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_datectrl.o: ../../src/msw/datectrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_datetimectrl.o: ../../src/msw/datetimectrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_hyperlink.o: ../../src/msw/hyperlink.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_timectrl.o: ../../src/msw/timectrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_mediactrlcmn.o: ../../src/common/mediactrlcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_mediactrl_am.o: ../../src/msw/mediactrl_am.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_mediactrl_wmp10.o: ../../src/msw/mediactrl_wmp10.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_mediactrl_qt.o: ../../src/msw/mediactrl_qt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_helpbest.o: ../../src/msw/helpbest.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_helpctrl.o: ../../src/html/helpctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_helpdata.o: ../../src/html/helpdata.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_helpdlg.o: ../../src/html/helpdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_helpfrm.o: ../../src/html/helpfrm.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_helpwnd.o: ../../src/html/helpwnd.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_htmlcell.o: ../../src/html/htmlcell.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_htmlfilt.o: ../../src/html/htmlfilt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_htmlpars.o: ../../src/html/htmlpars.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_htmltag.o: ../../src/html/htmltag.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_htmlwin.o: ../../src/html/htmlwin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_htmprint.o: ../../src/html/htmprint.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_m_dflist.o: ../../src/html/m_dflist.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_m_fonts.o: ../../src/html/m_fonts.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_m_hline.o: ../../src/html/m_hline.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_m_image.o: ../../src/html/m_image.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_m_layout.o: ../../src/html/m_layout.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_m_links.o: ../../src/html/m_links.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_m_list.o: ../../src/html/m_list.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_m_pre.o: ../../src/html/m_pre.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_m_span.o: ../../src/html/m_span.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_m_style.o: ../../src/html/m_style.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_m_tables.o: ../../src/html/m_tables.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_styleparams.o: ../../src/html/styleparams.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_winpars.o: ../../src/html/winpars.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_htmllbox.o: ../../src/generic/htmllbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_webview_ie.o: ../../src/msw/webview_ie.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_webview.o: ../../src/common/webview.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_webviewarchivehandler.o: ../../src/common/webviewarchivehandler.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_webviewfshandler.o: ../../src/common/webviewfshandler.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_debugrpt.o: ../../src/common/debugrpt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dbgrptg.o: ../../src/generic/dbgrptg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_animatctrl.o: ../../src/xrc/xh_animatctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_bannerwindow.o: ../../src/xrc/xh_bannerwindow.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_bmp.o: ../../src/xrc/xh_bmp.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_bmpcbox.o: ../../src/xrc/xh_bmpcbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_bmpbt.o: ../../src/xrc/xh_bmpbt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_bttn.o: ../../src/xrc/xh_bttn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_cald.o: ../../src/xrc/xh_cald.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_chckb.o: ../../src/xrc/xh_chckb.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_chckl.o: ../../src/xrc/xh_chckl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_choic.o: ../../src/xrc/xh_choic.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_choicbk.o: ../../src/xrc/xh_choicbk.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_clrpicker.o: ../../src/xrc/xh_clrpicker.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_cmdlinkbn.o: ../../src/xrc/xh_cmdlinkbn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_collpane.o: ../../src/xrc/xh_collpane.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_combo.o: ../../src/xrc/xh_combo.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_comboctrl.o: ../../src/xrc/xh_comboctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_datectrl.o: ../../src/xrc/xh_datectrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_dirpicker.o: ../../src/xrc/xh_dirpicker.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_dlg.o: ../../src/xrc/xh_dlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_editlbox.o: ../../src/xrc/xh_editlbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_filectrl.o: ../../src/xrc/xh_filectrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_filepicker.o: ../../src/xrc/xh_filepicker.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_fontpicker.o: ../../src/xrc/xh_fontpicker.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_frame.o: ../../src/xrc/xh_frame.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_gauge.o: ../../src/xrc/xh_gauge.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_gdctl.o: ../../src/xrc/xh_gdctl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_grid.o: ../../src/xrc/xh_grid.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_html.o: ../../src/xrc/xh_html.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_hyperlink.o: ../../src/xrc/xh_hyperlink.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_listb.o: ../../src/xrc/xh_listb.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_listbk.o: ../../src/xrc/xh_listbk.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_listc.o: ../../src/xrc/xh_listc.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_mdi.o: ../../src/xrc/xh_mdi.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_menu.o: ../../src/xrc/xh_menu.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_notbk.o: ../../src/xrc/xh_notbk.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_odcombo.o: ../../src/xrc/xh_odcombo.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_panel.o: ../../src/xrc/xh_panel.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_propdlg.o: ../../src/xrc/xh_propdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_radbt.o: ../../src/xrc/xh_radbt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_radbx.o: ../../src/xrc/xh_radbx.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_scrol.o: ../../src/xrc/xh_scrol.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_scwin.o: ../../src/xrc/xh_scwin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_htmllbox.o: ../../src/xrc/xh_htmllbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_sizer.o: ../../src/xrc/xh_sizer.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_slidr.o: ../../src/xrc/xh_slidr.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_spin.o: ../../src/xrc/xh_spin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_split.o: ../../src/xrc/xh_split.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_srchctrl.o: ../../src/xrc/xh_srchctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_statbar.o: ../../src/xrc/xh_statbar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_stbmp.o: ../../src/xrc/xh_stbmp.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_stbox.o: ../../src/xrc/xh_stbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_stlin.o: ../../src/xrc/xh_stlin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_sttxt.o: ../../src/xrc/xh_sttxt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_text.o: ../../src/xrc/xh_text.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_tglbtn.o: ../../src/xrc/xh_tglbtn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_timectrl.o: ../../src/xrc/xh_timectrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_toolb.o: ../../src/xrc/xh_toolb.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_toolbk.o: ../../src/xrc/xh_toolbk.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_tree.o: ../../src/xrc/xh_tree.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_treebk.o: ../../src/xrc/xh_treebk.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_unkwn.o: ../../src/xrc/xh_unkwn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_wizrd.o: ../../src/xrc/xh_wizrd.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xmlres.o: ../../src/xrc/xmlres.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xmladv.o: ../../src/xrc/xmladv.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xmlrsall.o: ../../src/xrc/xmlrsall.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_framemanager.o: ../../src/aui/framemanager.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_dockart.o: ../../src/aui/dockart.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_floatpane.o: ../../src/aui/floatpane.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_auibook.o: ../../src/aui/auibook.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_auibar.o: ../../src/aui/auibar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_tabmdi.o: ../../src/aui/tabmdi.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_tabart.o: ../../src/aui/tabart.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_auinotbk.o: ../../src/xrc/xh_auinotbk.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_advprops.o: ../../src/propgrid/advprops.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_editors.o: ../../src/propgrid/editors.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_manager.o: ../../src/propgrid/manager.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_property.o: ../../src/propgrid/property.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_propgrid.o: ../../src/propgrid/propgrid.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_propgridiface.o: ../../src/propgrid/propgridiface.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_propgridpagestate.o: ../../src/propgrid/propgridpagestate.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_props.o: ../../src/propgrid/props.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_art_internal.o: ../../src/ribbon/art_internal.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_art_msw.o: ../../src/ribbon/art_msw.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_art_aui.o: ../../src/ribbon/art_aui.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_bar.o: ../../src/ribbon/bar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_ribbon_buttonbar.o: ../../src/ribbon/buttonbar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_ribbon_control.o: ../../src/ribbon/control.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_gallery.o: ../../src/ribbon/gallery.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_page.o: ../../src/ribbon/page.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_ribbon_panel.o: ../../src/ribbon/panel.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_ribbon_toolbar.o: ../../src/ribbon/toolbar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_ribbon.o: ../../src/xrc/xh_ribbon.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_richtextbuffer.o: ../../src/richtext/richtextbuffer.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_richtextctrl.o: ../../src/richtext/richtextctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_richtextformatdlg.o: ../../src/richtext/richtextformatdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_richtexthtml.o: ../../src/richtext/richtexthtml.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_richtextimagedlg.o: ../../src/richtext/richtextimagedlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_richtextprint.o: ../../src/richtext/richtextprint.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_richtextstyledlg.o: ../../src/richtext/richtextstyledlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_richtextstyles.o: ../../src/richtext/richtextstyles.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_richtextsymboldlg.o: ../../src/richtext/richtextsymboldlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_richtextxml.o: ../../src/richtext/richtextxml.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xh_richtext.o: ../../src/xrc/xh_richtext.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_stc.o: ../../src/stc/stc.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_PlatWX.o: ../../src/stc/PlatWX.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_ScintillaWX.o: ../../src/stc/ScintillaWX.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xml.o: ../../src/xml/xml.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monodll_xtixml.o: ../../src/common/xtixml.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_activex.o: ../../src/msw/ole/activex.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_app.o: ../../src/msw/app.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_bitmap.o: ../../src/msw/bitmap.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_brush.o: ../../src/msw/brush.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_caret.o: ../../src/msw/caret.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_clipbrd.o: ../../src/msw/clipbrd.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_colour.o: ../../src/msw/colour.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_cursor.o: ../../src/msw/cursor.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_data.o: ../../src/msw/data.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dc.o: ../../src/msw/dc.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dcclient.o: ../../src/msw/dcclient.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dcmemory.o: ../../src/msw/dcmemory.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dcprint.o: ../../src/msw/dcprint.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dcscreen.o: ../../src/msw/dcscreen.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dialup.o: ../../src/msw/dialup.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dib.o: ../../src/msw/dib.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_display.o: ../../src/msw/display.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_enhmeta.o: ../../src/msw/enhmeta.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_font.o: ../../src/msw/font.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_fontenum.o: ../../src/msw/fontenum.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_fontutil.o: ../../src/msw/fontutil.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_gdiimage.o: ../../src/msw/gdiimage.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_gdiobj.o: ../../src/msw/gdiobj.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_gdiplus.o: ../../src/msw/gdiplus.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_graphics.o: ../../src/msw/graphics.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_icon.o: ../../src/msw/icon.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imaglist.o: ../../src/msw/imaglist.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_minifram.o: ../../src/msw/minifram.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_nonownedwnd.o: ../../src/msw/nonownedwnd.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dataobj.o: ../../src/msw/ole/dataobj.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dropsrc.o: ../../src/msw/ole/dropsrc.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_droptgt.o: ../../src/msw/ole/droptgt.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_oleutils.o: ../../src/msw/ole/oleutils.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_safearray.o: ../../src/msw/ole/safearray.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_palette.o: ../../src/msw/palette.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_pen.o: ../../src/msw/pen.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_popupwin.o: ../../src/msw/popupwin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_printdlg.o: ../../src/msw/printdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_printwin.o: ../../src/msw/printwin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_region.o: ../../src/msw/region.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_renderer.o: ../../src/msw/renderer.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_settings.o: ../../src/msw/settings.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_textmeasure.o: ../../src/msw/textmeasure.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_tooltip.o: ../../src/msw/tooltip.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_toplevel.o: ../../src/msw/toplevel.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_uiaction.o: ../../src/msw/uiaction.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_utilsgui.o: ../../src/msw/utilsgui.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_utilswin.o: ../../src/msw/utilswin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_uxtheme.o: ../../src/msw/uxtheme.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_window.o: ../../src/msw/window.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_helpchm.o: ../../src/msw/helpchm.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_helpwin.o: ../../src/msw/helpwin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_automtn.o: ../../src/msw/ole/automtn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_uuid.o: ../../src/msw/ole/uuid.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_clrpickerg.o: ../../src/generic/clrpickerg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_collpaneg.o: ../../src/generic/collpaneg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_filepickerg.o: ../../src/generic/filepickerg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_fontpickerg.o: ../../src/generic/fontpickerg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_prntdlgg.o: ../../src/generic/prntdlgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_evtloop.o: ../../src/msw/evtloop.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_accelcmn.o: ../../src/common/accelcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_accesscmn.o: ../../src/common/accesscmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_anidecod.o: ../../src/common/anidecod.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_affinematrix2d.o: ../../src/common/affinematrix2d.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_appcmn.o: ../../src/common/appcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_artprov.o: ../../src/common/artprov.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_artstd.o: ../../src/common/artstd.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_arttango.o: ../../src/common/arttango.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_bmpbase.o: ../../src/common/bmpbase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_bmpbtncmn.o: ../../src/common/bmpbtncmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_bookctrl.o: ../../src/common/bookctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_btncmn.o: ../../src/common/btncmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_cairo.o: ../../src/common/cairo.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_checkboxcmn.o: ../../src/common/checkboxcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_checklstcmn.o: ../../src/common/checklstcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_choiccmn.o: ../../src/common/choiccmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_clipcmn.o: ../../src/common/clipcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_clrpickercmn.o: ../../src/common/clrpickercmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_colourcmn.o: ../../src/common/colourcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_colourdata.o: ../../src/common/colourdata.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_combocmn.o: ../../src/common/combocmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_cmdproc.o: ../../src/common/cmdproc.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_cmndata.o: ../../src/common/cmndata.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_containr.o: ../../src/common/containr.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_cshelp.o: ../../src/common/cshelp.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_ctrlcmn.o: ../../src/common/ctrlcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_ctrlsub.o: ../../src/common/ctrlsub.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dcbase.o: ../../src/common/dcbase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dcbufcmn.o: ../../src/common/dcbufcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dcgraph.o: ../../src/common/dcgraph.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dcsvg.o: ../../src/common/dcsvg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dirctrlcmn.o: ../../src/common/dirctrlcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dlgcmn.o: ../../src/common/dlgcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dndcmn.o: ../../src/common/dndcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dobjcmn.o: ../../src/common/dobjcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_docmdi.o: ../../src/common/docmdi.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_docview.o: ../../src/common/docview.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dpycmn.o: ../../src/common/dpycmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dseldlg.o: ../../src/common/dseldlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_effects.o: ../../src/common/effects.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_fddlgcmn.o: ../../src/common/fddlgcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_filectrlcmn.o: ../../src/common/filectrlcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_filehistorycmn.o: ../../src/common/filehistorycmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_filepickercmn.o: ../../src/common/filepickercmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_fontpickercmn.o: ../../src/common/fontpickercmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_fldlgcmn.o: ../../src/common/fldlgcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_fontcmn.o: ../../src/common/fontcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_fontdata.o: ../../src/common/fontdata.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_graphicc.o: ../../src/generic/graphicc.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_fontenumcmn.o: ../../src/common/fontenumcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_fontmap.o: ../../src/common/fontmap.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_fontutilcmn.o: ../../src/common/fontutilcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_framecmn.o: ../../src/common/framecmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_gaugecmn.o: ../../src/common/gaugecmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_gbsizer.o: ../../src/common/gbsizer.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_gdicmn.o: ../../src/common/gdicmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_geometry.o: ../../src/common/geometry.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_gifdecod.o: ../../src/common/gifdecod.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_graphcmn.o: ../../src/common/graphcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_headercolcmn.o: ../../src/common/headercolcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_headerctrlcmn.o: ../../src/common/headerctrlcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_helpbase.o: ../../src/common/helpbase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_iconbndl.o: ../../src/common/iconbndl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imagall.o: ../../src/common/imagall.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imagbmp.o: ../../src/common/imagbmp.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_image.o: ../../src/common/image.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imagfill.o: ../../src/common/imagfill.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imaggif.o: ../../src/common/imaggif.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imagiff.o: ../../src/common/imagiff.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imagjpeg.o: ../../src/common/imagjpeg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imagpcx.o: ../../src/common/imagpcx.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imagpng.o: ../../src/common/imagpng.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imagpnm.o: ../../src/common/imagpnm.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imagtga.o: ../../src/common/imagtga.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imagtiff.o: ../../src/common/imagtiff.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_imagxpm.o: ../../src/common/imagxpm.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_layout.o: ../../src/common/layout.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_lboxcmn.o: ../../src/common/lboxcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_listctrlcmn.o: ../../src/common/listctrlcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_markupparser.o: ../../src/common/markupparser.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_matrix.o: ../../src/common/matrix.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_menucmn.o: ../../src/common/menucmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_modalhook.o: ../../src/common/modalhook.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_mousemanager.o: ../../src/common/mousemanager.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_nbkbase.o: ../../src/common/nbkbase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_overlaycmn.o: ../../src/common/overlaycmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_ownerdrwcmn.o: ../../src/common/ownerdrwcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_paper.o: ../../src/common/paper.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_panelcmn.o: ../../src/common/panelcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_persist.o: ../../src/common/persist.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_pickerbase.o: ../../src/common/pickerbase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_popupcmn.o: ../../src/common/popupcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_preferencescmn.o: ../../src/common/preferencescmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_prntbase.o: ../../src/common/prntbase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_quantize.o: ../../src/common/quantize.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_radiobtncmn.o: ../../src/common/radiobtncmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_radiocmn.o: ../../src/common/radiocmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_rearrangectrl.o: ../../src/common/rearrangectrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_rendcmn.o: ../../src/common/rendcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_rgncmn.o: ../../src/common/rgncmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_scrolbarcmn.o: ../../src/common/scrolbarcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_settcmn.o: ../../src/common/settcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_sizer.o: ../../src/common/sizer.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_slidercmn.o: ../../src/common/slidercmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_spinbtncmn.o: ../../src/common/spinbtncmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_spinctrlcmn.o: ../../src/common/spinctrlcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_srchcmn.o: ../../src/common/srchcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_statbar.o: ../../src/common/statbar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_statbmpcmn.o: ../../src/common/statbmpcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_statboxcmn.o: ../../src/common/statboxcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_statlinecmn.o: ../../src/common/statlinecmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_stattextcmn.o: ../../src/common/stattextcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_stockitem.o: ../../src/common/stockitem.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_tbarbase.o: ../../src/common/tbarbase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_textcmn.o: ../../src/common/textcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_textentrycmn.o: ../../src/common/textentrycmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_textmeasurecmn.o: ../../src/common/textmeasurecmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_toplvcmn.o: ../../src/common/toplvcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_treebase.o: ../../src/common/treebase.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_uiactioncmn.o: ../../src/common/uiactioncmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_valgen.o: ../../src/common/valgen.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_validate.o: ../../src/common/validate.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_valtext.o: ../../src/common/valtext.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_valnum.o: ../../src/common/valnum.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_wincmn.o: ../../src/common/wincmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_windowid.o: ../../src/common/windowid.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_wrapsizer.o: ../../src/common/wrapsizer.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_xpmdecod.o: ../../src/common/xpmdecod.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_busyinfo.o: ../../src/generic/busyinfo.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_generic_buttonbar.o: ../../src/generic/buttonbar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_choicdgg.o: ../../src/generic/choicdgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_choicbkg.o: ../../src/generic/choicbkg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_combog.o: ../../src/generic/combog.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dcpsg.o: ../../src/generic/dcpsg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dirctrlg.o: ../../src/generic/dirctrlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_dragimgg.o: ../../src/generic/dragimgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_filectrlg.o: ../../src/generic/filectrlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_headerctrlg.o: ../../src/generic/headerctrlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_infobar.o: ../../src/generic/infobar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_listbkg.o: ../../src/generic/listbkg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_logg.o: ../../src/generic/logg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_markuptext.o: ../../src/generic/markuptext.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_msgdlgg.o: ../../src/generic/msgdlgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_numdlgg.o: ../../src/generic/numdlgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_progdlgg.o: ../../src/generic/progdlgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_preferencesg.o: ../../src/generic/preferencesg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_printps.o: ../../src/generic/printps.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_renderg.o: ../../src/generic/renderg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_richmsgdlgg.o: ../../src/generic/richmsgdlgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_scrlwing.o: ../../src/generic/scrlwing.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_selstore.o: ../../src/generic/selstore.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_spinctlg.o: ../../src/generic/spinctlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_splitter.o: ../../src/generic/splitter.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_srchctlg.o: ../../src/generic/srchctlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_statbmpg.o: ../../src/generic/statbmpg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_stattextg.o: ../../src/generic/stattextg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_textdlgg.o: ../../src/generic/textdlgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_tipwin.o: ../../src/generic/tipwin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_toolbkg.o: ../../src/generic/toolbkg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_treectlg.o: ../../src/generic/treectlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_treebkg.o: ../../src/generic/treebkg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_vlbox.o: ../../src/generic/vlbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_vscroll.o: ../../src/generic/vscroll.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_xmlreshandler.o: ../../src/xrc/xmlreshandler.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_animatecmn.o: ../../src/common/animatecmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_bmpcboxcmn.o: ../../src/common/bmpcboxcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_calctrlcmn.o: ../../src/common/calctrlcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_datavcmn.o: ../../src/common/datavcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_gridcmn.o: ../../src/common/gridcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_hyperlnkcmn.o: ../../src/common/hyperlnkcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_odcombocmn.o: ../../src/common/odcombocmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_richtooltipcmn.o: ../../src/common/richtooltipcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_aboutdlgg.o: ../../src/generic/aboutdlgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_bannerwindow.o: ../../src/generic/bannerwindow.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_bmpcboxg.o: ../../src/generic/bmpcboxg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_calctrlg.o: ../../src/generic/calctrlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_commandlinkbuttong.o: ../../src/generic/commandlinkbuttong.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_datavgen.o: ../../src/generic/datavgen.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_datectlg.o: ../../src/generic/datectlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_editlbox.o: ../../src/generic/editlbox.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_grid.o: ../../src/generic/grid.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_gridctrl.o: ../../src/generic/gridctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_grideditors.o: ../../src/generic/grideditors.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_gridsel.o: ../../src/generic/gridsel.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_helpext.o: ../../src/generic/helpext.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_hyperlinkg.o: ../../src/generic/hyperlinkg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_laywin.o: ../../src/generic/laywin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_notifmsgg.o: ../../src/generic/notifmsgg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_odcombo.o: ../../src/generic/odcombo.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_propdlg.o: ../../src/generic/propdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_richtooltipg.o: ../../src/generic/richtooltipg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_sashwin.o: ../../src/generic/sashwin.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_splash.o: ../../src/generic/splash.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_timectrlg.o: ../../src/generic/timectrlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_tipdlg.o: ../../src/generic/tipdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_treelist.o: ../../src/generic/treelist.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_wizard.o: ../../src/generic/wizard.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_taskbarcmn.o: ../../src/common/taskbarcmn.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_aboutdlg.o: ../../src/msw/aboutdlg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_notifmsg.o: ../../src/msw/notifmsg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_richtooltip.o: ../../src/msw/richtooltip.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_sound.o: ../../src/msw/sound.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_taskbar.o: ../../src/msw/taskbar.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_joystick.o: ../../src/msw/joystick.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monodll_animateg.o: ../../src/generic/animateg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +$(OBJS)\monodll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --include-dir ../../src/stc/scintilla/include --include-dir ../../src/stc/scintilla/lexlib --include-dir ../../src/stc/scintilla/src --define __WX__ --define SCI_LEXER --define LINK_LEXERS --define wxUSE_BASE=1 --define WXMAKINGDLL + +$(OBJS)\monolib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_any.o: ../../src/common/any.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_appbase.o: ../../src/common/appbase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_arcall.o: ../../src/common/arcall.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_arcfind.o: ../../src/common/arcfind.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_archive.o: ../../src/common/archive.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_arrstr.o: ../../src/common/arrstr.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_base64.o: ../../src/common/base64.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_clntdata.o: ../../src/common/clntdata.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_cmdline.o: ../../src/common/cmdline.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_config.o: ../../src/common/config.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_convauto.o: ../../src/common/convauto.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_datetime.o: ../../src/common/datetime.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_datetimefmt.o: ../../src/common/datetimefmt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_datstrm.o: ../../src/common/datstrm.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dircmn.o: ../../src/common/dircmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dynarray.o: ../../src/common/dynarray.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dynlib.o: ../../src/common/dynlib.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dynload.o: ../../src/common/dynload.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_encconv.o: ../../src/common/encconv.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_evtloopcmn.o: ../../src/common/evtloopcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_extended.o: ../../src/common/extended.c + $(CC) -c -o $@ $(MONOLIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_ffile.o: ../../src/common/ffile.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_file.o: ../../src/common/file.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fileback.o: ../../src/common/fileback.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fileconf.o: ../../src/common/fileconf.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_filefn.o: ../../src/common/filefn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_filename.o: ../../src/common/filename.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_filesys.o: ../../src/common/filesys.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_filtall.o: ../../src/common/filtall.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_filtfind.o: ../../src/common/filtfind.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fmapbase.o: ../../src/common/fmapbase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fs_arc.o: ../../src/common/fs_arc.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fs_filter.o: ../../src/common/fs_filter.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_hash.o: ../../src/common/hash.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_hashmap.o: ../../src/common/hashmap.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_init.o: ../../src/common/init.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_intl.o: ../../src/common/intl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_ipcbase.o: ../../src/common/ipcbase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_languageinfo.o: ../../src/common/languageinfo.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_list.o: ../../src/common/list.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_log.o: ../../src/common/log.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_longlong.o: ../../src/common/longlong.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_memory.o: ../../src/common/memory.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_mimecmn.o: ../../src/common/mimecmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_module.o: ../../src/common/module.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_mstream.o: ../../src/common/mstream.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_numformatter.o: ../../src/common/numformatter.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_object.o: ../../src/common/object.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_platinfo.o: ../../src/common/platinfo.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_powercmn.o: ../../src/common/powercmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_process.o: ../../src/common/process.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_regex.o: ../../src/common/regex.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_stdpbase.o: ../../src/common/stdpbase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_sstream.o: ../../src/common/sstream.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_stdstream.o: ../../src/common/stdstream.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_stopwatch.o: ../../src/common/stopwatch.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_strconv.o: ../../src/common/strconv.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_stream.o: ../../src/common/stream.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_string.o: ../../src/common/string.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_stringimpl.o: ../../src/common/stringimpl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_stringops.o: ../../src/common/stringops.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_strvararg.o: ../../src/common/strvararg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_sysopt.o: ../../src/common/sysopt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_tarstrm.o: ../../src/common/tarstrm.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_textbuf.o: ../../src/common/textbuf.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_textfile.o: ../../src/common/textfile.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_threadinfo.o: ../../src/common/threadinfo.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_time.o: ../../src/common/time.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_timercmn.o: ../../src/common/timercmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_timerimpl.o: ../../src/common/timerimpl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_tokenzr.o: ../../src/common/tokenzr.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_translation.o: ../../src/common/translation.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_txtstrm.o: ../../src/common/txtstrm.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_unichar.o: ../../src/common/unichar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_uri.o: ../../src/common/uri.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_ustring.o: ../../src/common/ustring.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_variant.o: ../../src/common/variant.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_wfstream.o: ../../src/common/wfstream.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_wxcrt.o: ../../src/common/wxcrt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_wxprintf.o: ../../src/common/wxprintf.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xlocale.o: ../../src/common/xlocale.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xti.o: ../../src/common/xti.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xtistrm.o: ../../src/common/xtistrm.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_zipstrm.o: ../../src/common/zipstrm.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_zstream.o: ../../src/common/zstream.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fswatchercmn.o: ../../src/common/fswatchercmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fswatcherg.o: ../../src/generic/fswatcherg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_basemsw.o: ../../src/msw/basemsw.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_crashrpt.o: ../../src/msw/crashrpt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_debughlp.o: ../../src/msw/debughlp.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dde.o: ../../src/msw/dde.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dir.o: ../../src/msw/dir.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dlmsw.o: ../../src/msw/dlmsw.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_evtloopconsole.o: ../../src/msw/evtloopconsole.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_mimetype.o: ../../src/msw/mimetype.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_power.o: ../../src/msw/power.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_regconf.o: ../../src/msw/regconf.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_registry.o: ../../src/msw/registry.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_snglinst.o: ../../src/msw/snglinst.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_stackwalk.o: ../../src/msw/stackwalk.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_stdpaths.o: ../../src/msw/stdpaths.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_thread.o: ../../src/msw/thread.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_timer.o: ../../src/msw/timer.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_utils.o: ../../src/msw/utils.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_utilsexc.o: ../../src/msw/utilsexc.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fswatcher.o: ../../src/msw/fswatcher.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_event.o: ../../src/common/event.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fs_mem.o: ../../src/common/fs_mem.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msgout.o: ../../src/common/msgout.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_utilscmn.o: ../../src/common/utilscmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_main.o: ../../src/msw/main.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_mslu.o: ../../src/msw/mslu.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_volume.o: ../../src/msw/volume.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fs_inet.o: ../../src/common/fs_inet.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_ftp.o: ../../src/common/ftp.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_http.o: ../../src/common/http.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_protocol.o: ../../src/common/protocol.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_sckaddr.o: ../../src/common/sckaddr.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_sckfile.o: ../../src/common/sckfile.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_sckipc.o: ../../src/common/sckipc.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_sckstrm.o: ../../src/common/sckstrm.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_socket.o: ../../src/common/socket.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_url.o: ../../src/common/url.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_sockmsw.o: ../../src/msw/sockmsw.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_urlmsw.o: ../../src/msw/urlmsw.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_generic_statusbr.o: ../../src/generic/statusbr.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_accel.o: ../../src/msw/accel.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_anybutton.o: ../../src/msw/anybutton.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_artmsw.o: ../../src/msw/artmsw.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_bmpbuttn.o: ../../src/msw/bmpbuttn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_button.o: ../../src/msw/button.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_checkbox.o: ../../src/msw/checkbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_choice.o: ../../src/msw/choice.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_colordlg.o: ../../src/msw/colordlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_combo.o: ../../src/msw/combo.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_combobox.o: ../../src/msw/combobox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_control.o: ../../src/msw/control.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_dialog.o: ../../src/msw/dialog.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dirdlg.o: ../../src/msw/dirdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dragimag.o: ../../src/msw/dragimag.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_filedlg.o: ../../src/msw/filedlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_frame.o: ../../src/msw/frame.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_gauge.o: ../../src/msw/gauge.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_headerctrl.o: ../../src/msw/headerctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_iniconf.o: ../../src/msw/iniconf.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_listbox.o: ../../src/msw/listbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_listctrl.o: ../../src/msw/listctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_mdi.o: ../../src/msw/mdi.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_menu.o: ../../src/msw/menu.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_menuitem.o: ../../src/msw/menuitem.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_metafile.o: ../../src/msw/metafile.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msgdlg.o: ../../src/msw/msgdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_nativdlg.o: ../../src/msw/nativdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_nativewin.o: ../../src/msw/nativewin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_notebook.o: ../../src/msw/notebook.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_access.o: ../../src/msw/ole/access.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_ownerdrw.o: ../../src/msw/ownerdrw.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_panel.o: ../../src/msw/panel.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_progdlg.o: ../../src/msw/progdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_radiobox.o: ../../src/msw/radiobox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_radiobut.o: ../../src/msw/radiobut.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_richmsgdlg.o: ../../src/msw/richmsgdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_scrolbar.o: ../../src/msw/scrolbar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_slider.o: ../../src/msw/slider.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_spinbutt.o: ../../src/msw/spinbutt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_spinctrl.o: ../../src/msw/spinctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_statbmp.o: ../../src/msw/statbmp.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_statbox.o: ../../src/msw/statbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_statusbar.o: ../../src/msw/statusbar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_statline.o: ../../src/msw/statline.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_stattext.o: ../../src/msw/stattext.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_toolbar.o: ../../src/msw/toolbar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_textctrl.o: ../../src/msw/textctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_textentry.o: ../../src/msw/textentry.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_tglbtn.o: ../../src/msw/tglbtn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_treectrl.o: ../../src/msw/treectrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_checklst.o: ../../src/msw/checklst.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_msw_fdrepdlg.o: ../../src/msw/fdrepdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fontdlg.o: ../../src/msw/fontdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_generic_accel.o: ../../src/generic/accel.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_colrdlgg.o: ../../src/generic/colrdlgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dirdlgg.o: ../../src/generic/dirdlgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_generic_fdrepdlg.o: ../../src/generic/fdrepdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_filedlgg.o: ../../src/generic/filedlgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_fontdlgg.o: ../../src/generic/fontdlgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_generic_listctrl.o: ../../src/generic/listctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_mdig.o: ../../src/generic/mdig.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_bmpbuttn.o: ../../src/univ/bmpbuttn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_button.o: ../../src/univ/button.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_checkbox.o: ../../src/univ/checkbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_checklst.o: ../../src/univ/checklst.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_choice.o: ../../src/univ/choice.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_combobox.o: ../../src/univ/combobox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_control.o: ../../src/univ/control.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_ctrlrend.o: ../../src/univ/ctrlrend.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_dialog.o: ../../src/univ/dialog.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_framuniv.o: ../../src/univ/framuniv.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_gauge.o: ../../src/univ/gauge.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_inpcons.o: ../../src/univ/inpcons.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_inphand.o: ../../src/univ/inphand.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_listbox.o: ../../src/univ/listbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_menu.o: ../../src/univ/menu.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_notebook.o: ../../src/univ/notebook.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_radiobox.o: ../../src/univ/radiobox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_radiobut.o: ../../src/univ/radiobut.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_scrarrow.o: ../../src/univ/scrarrow.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_scrolbar.o: ../../src/univ/scrolbar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_scrthumb.o: ../../src/univ/scrthumb.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_settingsuniv.o: ../../src/univ/settingsuniv.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_slider.o: ../../src/univ/slider.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_spinbutt.o: ../../src/univ/spinbutt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_statbmp.o: ../../src/univ/statbmp.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_statbox.o: ../../src/univ/statbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_statline.o: ../../src/univ/statline.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_stattext.o: ../../src/univ/stattext.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_statusbr.o: ../../src/univ/statusbr.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_stdrend.o: ../../src/univ/stdrend.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_textctrl.o: ../../src/univ/textctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_tglbtn.o: ../../src/univ/tglbtn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_theme.o: ../../src/univ/theme.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_univ_toolbar.o: ../../src/univ/toolbar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_topluniv.o: ../../src/univ/topluniv.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_winuniv.o: ../../src/univ/winuniv.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_gtk.o: ../../src/univ/themes/gtk.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_metal.o: ../../src/univ/themes/metal.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_mono.o: ../../src/univ/themes/mono.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_win32.o: ../../src/univ/themes/win32.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_bmpcbox.o: ../../src/msw/bmpcbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_calctrl.o: ../../src/msw/calctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_commandlinkbutton.o: ../../src/msw/commandlinkbutton.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_datecontrols.o: ../../src/msw/datecontrols.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_datectrl.o: ../../src/msw/datectrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_datetimectrl.o: ../../src/msw/datetimectrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_hyperlink.o: ../../src/msw/hyperlink.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_timectrl.o: ../../src/msw/timectrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_mediactrlcmn.o: ../../src/common/mediactrlcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_mediactrl_am.o: ../../src/msw/mediactrl_am.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_mediactrl_wmp10.o: ../../src/msw/mediactrl_wmp10.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_mediactrl_qt.o: ../../src/msw/mediactrl_qt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_helpbest.o: ../../src/msw/helpbest.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_helpctrl.o: ../../src/html/helpctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_helpdata.o: ../../src/html/helpdata.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_helpdlg.o: ../../src/html/helpdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_helpfrm.o: ../../src/html/helpfrm.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_helpwnd.o: ../../src/html/helpwnd.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_htmlcell.o: ../../src/html/htmlcell.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_htmlfilt.o: ../../src/html/htmlfilt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_htmlpars.o: ../../src/html/htmlpars.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_htmltag.o: ../../src/html/htmltag.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_htmlwin.o: ../../src/html/htmlwin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_htmprint.o: ../../src/html/htmprint.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_m_dflist.o: ../../src/html/m_dflist.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_m_fonts.o: ../../src/html/m_fonts.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_m_hline.o: ../../src/html/m_hline.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_m_image.o: ../../src/html/m_image.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_m_layout.o: ../../src/html/m_layout.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_m_links.o: ../../src/html/m_links.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_m_list.o: ../../src/html/m_list.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_m_pre.o: ../../src/html/m_pre.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_m_span.o: ../../src/html/m_span.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_m_style.o: ../../src/html/m_style.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_m_tables.o: ../../src/html/m_tables.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_styleparams.o: ../../src/html/styleparams.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_winpars.o: ../../src/html/winpars.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_htmllbox.o: ../../src/generic/htmllbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_webview_ie.o: ../../src/msw/webview_ie.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_webview.o: ../../src/common/webview.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_webviewarchivehandler.o: ../../src/common/webviewarchivehandler.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_webviewfshandler.o: ../../src/common/webviewfshandler.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_debugrpt.o: ../../src/common/debugrpt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dbgrptg.o: ../../src/generic/dbgrptg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_animatctrl.o: ../../src/xrc/xh_animatctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_bannerwindow.o: ../../src/xrc/xh_bannerwindow.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_bmp.o: ../../src/xrc/xh_bmp.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_bmpcbox.o: ../../src/xrc/xh_bmpcbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_bmpbt.o: ../../src/xrc/xh_bmpbt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_bttn.o: ../../src/xrc/xh_bttn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_cald.o: ../../src/xrc/xh_cald.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_chckb.o: ../../src/xrc/xh_chckb.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_chckl.o: ../../src/xrc/xh_chckl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_choic.o: ../../src/xrc/xh_choic.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_choicbk.o: ../../src/xrc/xh_choicbk.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_clrpicker.o: ../../src/xrc/xh_clrpicker.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_cmdlinkbn.o: ../../src/xrc/xh_cmdlinkbn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_collpane.o: ../../src/xrc/xh_collpane.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_combo.o: ../../src/xrc/xh_combo.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_comboctrl.o: ../../src/xrc/xh_comboctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_datectrl.o: ../../src/xrc/xh_datectrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_dirpicker.o: ../../src/xrc/xh_dirpicker.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_dlg.o: ../../src/xrc/xh_dlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_editlbox.o: ../../src/xrc/xh_editlbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_filectrl.o: ../../src/xrc/xh_filectrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_filepicker.o: ../../src/xrc/xh_filepicker.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_fontpicker.o: ../../src/xrc/xh_fontpicker.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_frame.o: ../../src/xrc/xh_frame.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_gauge.o: ../../src/xrc/xh_gauge.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_gdctl.o: ../../src/xrc/xh_gdctl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_grid.o: ../../src/xrc/xh_grid.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_html.o: ../../src/xrc/xh_html.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_hyperlink.o: ../../src/xrc/xh_hyperlink.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_listb.o: ../../src/xrc/xh_listb.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_listbk.o: ../../src/xrc/xh_listbk.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_listc.o: ../../src/xrc/xh_listc.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_mdi.o: ../../src/xrc/xh_mdi.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_menu.o: ../../src/xrc/xh_menu.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_notbk.o: ../../src/xrc/xh_notbk.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_odcombo.o: ../../src/xrc/xh_odcombo.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_panel.o: ../../src/xrc/xh_panel.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_propdlg.o: ../../src/xrc/xh_propdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_radbt.o: ../../src/xrc/xh_radbt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_radbx.o: ../../src/xrc/xh_radbx.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_scrol.o: ../../src/xrc/xh_scrol.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_scwin.o: ../../src/xrc/xh_scwin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_htmllbox.o: ../../src/xrc/xh_htmllbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_sizer.o: ../../src/xrc/xh_sizer.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_slidr.o: ../../src/xrc/xh_slidr.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_spin.o: ../../src/xrc/xh_spin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_split.o: ../../src/xrc/xh_split.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_srchctrl.o: ../../src/xrc/xh_srchctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_statbar.o: ../../src/xrc/xh_statbar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_stbmp.o: ../../src/xrc/xh_stbmp.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_stbox.o: ../../src/xrc/xh_stbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_stlin.o: ../../src/xrc/xh_stlin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_sttxt.o: ../../src/xrc/xh_sttxt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_text.o: ../../src/xrc/xh_text.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_tglbtn.o: ../../src/xrc/xh_tglbtn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_timectrl.o: ../../src/xrc/xh_timectrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_toolb.o: ../../src/xrc/xh_toolb.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_toolbk.o: ../../src/xrc/xh_toolbk.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_tree.o: ../../src/xrc/xh_tree.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_treebk.o: ../../src/xrc/xh_treebk.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_unkwn.o: ../../src/xrc/xh_unkwn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_wizrd.o: ../../src/xrc/xh_wizrd.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xmlres.o: ../../src/xrc/xmlres.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xmladv.o: ../../src/xrc/xmladv.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xmlrsall.o: ../../src/xrc/xmlrsall.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_framemanager.o: ../../src/aui/framemanager.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_dockart.o: ../../src/aui/dockart.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_floatpane.o: ../../src/aui/floatpane.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_auibook.o: ../../src/aui/auibook.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_auibar.o: ../../src/aui/auibar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_tabmdi.o: ../../src/aui/tabmdi.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_tabart.o: ../../src/aui/tabart.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_auinotbk.o: ../../src/xrc/xh_auinotbk.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_advprops.o: ../../src/propgrid/advprops.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_editors.o: ../../src/propgrid/editors.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_manager.o: ../../src/propgrid/manager.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_property.o: ../../src/propgrid/property.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_propgrid.o: ../../src/propgrid/propgrid.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_propgridiface.o: ../../src/propgrid/propgridiface.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_propgridpagestate.o: ../../src/propgrid/propgridpagestate.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_props.o: ../../src/propgrid/props.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_art_internal.o: ../../src/ribbon/art_internal.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_art_msw.o: ../../src/ribbon/art_msw.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_art_aui.o: ../../src/ribbon/art_aui.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_bar.o: ../../src/ribbon/bar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_ribbon_buttonbar.o: ../../src/ribbon/buttonbar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_ribbon_control.o: ../../src/ribbon/control.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_gallery.o: ../../src/ribbon/gallery.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_page.o: ../../src/ribbon/page.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_ribbon_panel.o: ../../src/ribbon/panel.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_ribbon_toolbar.o: ../../src/ribbon/toolbar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_ribbon.o: ../../src/xrc/xh_ribbon.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_richtextbuffer.o: ../../src/richtext/richtextbuffer.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_richtextctrl.o: ../../src/richtext/richtextctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_richtextformatdlg.o: ../../src/richtext/richtextformatdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_richtexthtml.o: ../../src/richtext/richtexthtml.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_richtextimagedlg.o: ../../src/richtext/richtextimagedlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_richtextprint.o: ../../src/richtext/richtextprint.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_richtextstyledlg.o: ../../src/richtext/richtextstyledlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_richtextstyles.o: ../../src/richtext/richtextstyles.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_richtextsymboldlg.o: ../../src/richtext/richtextsymboldlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_richtextxml.o: ../../src/richtext/richtextxml.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xh_richtext.o: ../../src/xrc/xh_richtext.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_stc.o: ../../src/stc/stc.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_PlatWX.o: ../../src/stc/PlatWX.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_ScintillaWX.o: ../../src/stc/ScintillaWX.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xml.o: ../../src/xml/xml.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\monolib_xtixml.o: ../../src/common/xtixml.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_activex.o: ../../src/msw/ole/activex.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_app.o: ../../src/msw/app.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_bitmap.o: ../../src/msw/bitmap.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_brush.o: ../../src/msw/brush.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_caret.o: ../../src/msw/caret.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_clipbrd.o: ../../src/msw/clipbrd.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_colour.o: ../../src/msw/colour.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_cursor.o: ../../src/msw/cursor.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_data.o: ../../src/msw/data.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dc.o: ../../src/msw/dc.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dcclient.o: ../../src/msw/dcclient.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dcmemory.o: ../../src/msw/dcmemory.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dcprint.o: ../../src/msw/dcprint.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dcscreen.o: ../../src/msw/dcscreen.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dialup.o: ../../src/msw/dialup.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dib.o: ../../src/msw/dib.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_display.o: ../../src/msw/display.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_enhmeta.o: ../../src/msw/enhmeta.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_font.o: ../../src/msw/font.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_fontenum.o: ../../src/msw/fontenum.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_fontutil.o: ../../src/msw/fontutil.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_gdiimage.o: ../../src/msw/gdiimage.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_gdiobj.o: ../../src/msw/gdiobj.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_gdiplus.o: ../../src/msw/gdiplus.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_graphics.o: ../../src/msw/graphics.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_icon.o: ../../src/msw/icon.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imaglist.o: ../../src/msw/imaglist.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_minifram.o: ../../src/msw/minifram.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_nonownedwnd.o: ../../src/msw/nonownedwnd.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dataobj.o: ../../src/msw/ole/dataobj.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dropsrc.o: ../../src/msw/ole/dropsrc.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_droptgt.o: ../../src/msw/ole/droptgt.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_oleutils.o: ../../src/msw/ole/oleutils.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_safearray.o: ../../src/msw/ole/safearray.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_palette.o: ../../src/msw/palette.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_pen.o: ../../src/msw/pen.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_popupwin.o: ../../src/msw/popupwin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_printdlg.o: ../../src/msw/printdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_printwin.o: ../../src/msw/printwin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_region.o: ../../src/msw/region.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_renderer.o: ../../src/msw/renderer.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_settings.o: ../../src/msw/settings.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_textmeasure.o: ../../src/msw/textmeasure.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_tooltip.o: ../../src/msw/tooltip.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_toplevel.o: ../../src/msw/toplevel.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_uiaction.o: ../../src/msw/uiaction.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_utilsgui.o: ../../src/msw/utilsgui.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_utilswin.o: ../../src/msw/utilswin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_uxtheme.o: ../../src/msw/uxtheme.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_window.o: ../../src/msw/window.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_helpchm.o: ../../src/msw/helpchm.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_helpwin.o: ../../src/msw/helpwin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_automtn.o: ../../src/msw/ole/automtn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_uuid.o: ../../src/msw/ole/uuid.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_clrpickerg.o: ../../src/generic/clrpickerg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_collpaneg.o: ../../src/generic/collpaneg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_filepickerg.o: ../../src/generic/filepickerg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_fontpickerg.o: ../../src/generic/fontpickerg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_prntdlgg.o: ../../src/generic/prntdlgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_evtloop.o: ../../src/msw/evtloop.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_accelcmn.o: ../../src/common/accelcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_accesscmn.o: ../../src/common/accesscmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_anidecod.o: ../../src/common/anidecod.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_affinematrix2d.o: ../../src/common/affinematrix2d.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_appcmn.o: ../../src/common/appcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_artprov.o: ../../src/common/artprov.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_artstd.o: ../../src/common/artstd.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_arttango.o: ../../src/common/arttango.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_bmpbase.o: ../../src/common/bmpbase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_bmpbtncmn.o: ../../src/common/bmpbtncmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_bookctrl.o: ../../src/common/bookctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_btncmn.o: ../../src/common/btncmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_cairo.o: ../../src/common/cairo.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_checkboxcmn.o: ../../src/common/checkboxcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_checklstcmn.o: ../../src/common/checklstcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_choiccmn.o: ../../src/common/choiccmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_clipcmn.o: ../../src/common/clipcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_clrpickercmn.o: ../../src/common/clrpickercmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_colourcmn.o: ../../src/common/colourcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_colourdata.o: ../../src/common/colourdata.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_combocmn.o: ../../src/common/combocmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_cmdproc.o: ../../src/common/cmdproc.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_cmndata.o: ../../src/common/cmndata.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_containr.o: ../../src/common/containr.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_cshelp.o: ../../src/common/cshelp.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_ctrlcmn.o: ../../src/common/ctrlcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_ctrlsub.o: ../../src/common/ctrlsub.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dcbase.o: ../../src/common/dcbase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dcbufcmn.o: ../../src/common/dcbufcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dcgraph.o: ../../src/common/dcgraph.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dcsvg.o: ../../src/common/dcsvg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dirctrlcmn.o: ../../src/common/dirctrlcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dlgcmn.o: ../../src/common/dlgcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dndcmn.o: ../../src/common/dndcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dobjcmn.o: ../../src/common/dobjcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_docmdi.o: ../../src/common/docmdi.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_docview.o: ../../src/common/docview.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dpycmn.o: ../../src/common/dpycmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dseldlg.o: ../../src/common/dseldlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_effects.o: ../../src/common/effects.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_fddlgcmn.o: ../../src/common/fddlgcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_filectrlcmn.o: ../../src/common/filectrlcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_filehistorycmn.o: ../../src/common/filehistorycmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_filepickercmn.o: ../../src/common/filepickercmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_fontpickercmn.o: ../../src/common/fontpickercmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_fldlgcmn.o: ../../src/common/fldlgcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_fontcmn.o: ../../src/common/fontcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_fontdata.o: ../../src/common/fontdata.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_graphicc.o: ../../src/generic/graphicc.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_fontenumcmn.o: ../../src/common/fontenumcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_fontmap.o: ../../src/common/fontmap.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_fontutilcmn.o: ../../src/common/fontutilcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_framecmn.o: ../../src/common/framecmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_gaugecmn.o: ../../src/common/gaugecmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_gbsizer.o: ../../src/common/gbsizer.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_gdicmn.o: ../../src/common/gdicmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_geometry.o: ../../src/common/geometry.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_gifdecod.o: ../../src/common/gifdecod.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_graphcmn.o: ../../src/common/graphcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_headercolcmn.o: ../../src/common/headercolcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_headerctrlcmn.o: ../../src/common/headerctrlcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_helpbase.o: ../../src/common/helpbase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_iconbndl.o: ../../src/common/iconbndl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imagall.o: ../../src/common/imagall.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imagbmp.o: ../../src/common/imagbmp.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_image.o: ../../src/common/image.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imagfill.o: ../../src/common/imagfill.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imaggif.o: ../../src/common/imaggif.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imagiff.o: ../../src/common/imagiff.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imagjpeg.o: ../../src/common/imagjpeg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imagpcx.o: ../../src/common/imagpcx.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imagpng.o: ../../src/common/imagpng.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imagpnm.o: ../../src/common/imagpnm.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imagtga.o: ../../src/common/imagtga.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imagtiff.o: ../../src/common/imagtiff.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_imagxpm.o: ../../src/common/imagxpm.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_layout.o: ../../src/common/layout.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_lboxcmn.o: ../../src/common/lboxcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_listctrlcmn.o: ../../src/common/listctrlcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_markupparser.o: ../../src/common/markupparser.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_matrix.o: ../../src/common/matrix.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_menucmn.o: ../../src/common/menucmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_modalhook.o: ../../src/common/modalhook.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_mousemanager.o: ../../src/common/mousemanager.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_nbkbase.o: ../../src/common/nbkbase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_overlaycmn.o: ../../src/common/overlaycmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_ownerdrwcmn.o: ../../src/common/ownerdrwcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_paper.o: ../../src/common/paper.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_panelcmn.o: ../../src/common/panelcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_persist.o: ../../src/common/persist.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_pickerbase.o: ../../src/common/pickerbase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_popupcmn.o: ../../src/common/popupcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_preferencescmn.o: ../../src/common/preferencescmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_prntbase.o: ../../src/common/prntbase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_quantize.o: ../../src/common/quantize.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_radiobtncmn.o: ../../src/common/radiobtncmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_radiocmn.o: ../../src/common/radiocmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_rearrangectrl.o: ../../src/common/rearrangectrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_rendcmn.o: ../../src/common/rendcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_rgncmn.o: ../../src/common/rgncmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_scrolbarcmn.o: ../../src/common/scrolbarcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_settcmn.o: ../../src/common/settcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_sizer.o: ../../src/common/sizer.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_slidercmn.o: ../../src/common/slidercmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_spinbtncmn.o: ../../src/common/spinbtncmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_spinctrlcmn.o: ../../src/common/spinctrlcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_srchcmn.o: ../../src/common/srchcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_statbar.o: ../../src/common/statbar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_statbmpcmn.o: ../../src/common/statbmpcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_statboxcmn.o: ../../src/common/statboxcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_statlinecmn.o: ../../src/common/statlinecmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_stattextcmn.o: ../../src/common/stattextcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_stockitem.o: ../../src/common/stockitem.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_tbarbase.o: ../../src/common/tbarbase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_textcmn.o: ../../src/common/textcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_textentrycmn.o: ../../src/common/textentrycmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_textmeasurecmn.o: ../../src/common/textmeasurecmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_toplvcmn.o: ../../src/common/toplvcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_treebase.o: ../../src/common/treebase.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_uiactioncmn.o: ../../src/common/uiactioncmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_valgen.o: ../../src/common/valgen.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_validate.o: ../../src/common/validate.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_valtext.o: ../../src/common/valtext.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_valnum.o: ../../src/common/valnum.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_wincmn.o: ../../src/common/wincmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_windowid.o: ../../src/common/windowid.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_wrapsizer.o: ../../src/common/wrapsizer.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_xpmdecod.o: ../../src/common/xpmdecod.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_busyinfo.o: ../../src/generic/busyinfo.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_generic_buttonbar.o: ../../src/generic/buttonbar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_choicdgg.o: ../../src/generic/choicdgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_choicbkg.o: ../../src/generic/choicbkg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_combog.o: ../../src/generic/combog.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dcpsg.o: ../../src/generic/dcpsg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dirctrlg.o: ../../src/generic/dirctrlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_dragimgg.o: ../../src/generic/dragimgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_filectrlg.o: ../../src/generic/filectrlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_headerctrlg.o: ../../src/generic/headerctrlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_infobar.o: ../../src/generic/infobar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_listbkg.o: ../../src/generic/listbkg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_logg.o: ../../src/generic/logg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_markuptext.o: ../../src/generic/markuptext.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_msgdlgg.o: ../../src/generic/msgdlgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_numdlgg.o: ../../src/generic/numdlgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_progdlgg.o: ../../src/generic/progdlgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_preferencesg.o: ../../src/generic/preferencesg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_printps.o: ../../src/generic/printps.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_renderg.o: ../../src/generic/renderg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_richmsgdlgg.o: ../../src/generic/richmsgdlgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_scrlwing.o: ../../src/generic/scrlwing.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_selstore.o: ../../src/generic/selstore.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_spinctlg.o: ../../src/generic/spinctlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_splitter.o: ../../src/generic/splitter.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_srchctlg.o: ../../src/generic/srchctlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_statbmpg.o: ../../src/generic/statbmpg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_stattextg.o: ../../src/generic/stattextg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_textdlgg.o: ../../src/generic/textdlgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_tipwin.o: ../../src/generic/tipwin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_toolbkg.o: ../../src/generic/toolbkg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_treectlg.o: ../../src/generic/treectlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_treebkg.o: ../../src/generic/treebkg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_vlbox.o: ../../src/generic/vlbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_vscroll.o: ../../src/generic/vscroll.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_xmlreshandler.o: ../../src/xrc/xmlreshandler.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_animatecmn.o: ../../src/common/animatecmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_bmpcboxcmn.o: ../../src/common/bmpcboxcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_calctrlcmn.o: ../../src/common/calctrlcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_datavcmn.o: ../../src/common/datavcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_gridcmn.o: ../../src/common/gridcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_hyperlnkcmn.o: ../../src/common/hyperlnkcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_odcombocmn.o: ../../src/common/odcombocmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_richtooltipcmn.o: ../../src/common/richtooltipcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_aboutdlgg.o: ../../src/generic/aboutdlgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_bannerwindow.o: ../../src/generic/bannerwindow.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_bmpcboxg.o: ../../src/generic/bmpcboxg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_calctrlg.o: ../../src/generic/calctrlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_commandlinkbuttong.o: ../../src/generic/commandlinkbuttong.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_datavgen.o: ../../src/generic/datavgen.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_datectlg.o: ../../src/generic/datectlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_editlbox.o: ../../src/generic/editlbox.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_grid.o: ../../src/generic/grid.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_gridctrl.o: ../../src/generic/gridctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_grideditors.o: ../../src/generic/grideditors.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_gridsel.o: ../../src/generic/gridsel.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_helpext.o: ../../src/generic/helpext.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_hyperlinkg.o: ../../src/generic/hyperlinkg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_laywin.o: ../../src/generic/laywin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_notifmsgg.o: ../../src/generic/notifmsgg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_odcombo.o: ../../src/generic/odcombo.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_propdlg.o: ../../src/generic/propdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_richtooltipg.o: ../../src/generic/richtooltipg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_sashwin.o: ../../src/generic/sashwin.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_splash.o: ../../src/generic/splash.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_timectrlg.o: ../../src/generic/timectrlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_tipdlg.o: ../../src/generic/tipdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_treelist.o: ../../src/generic/treelist.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_wizard.o: ../../src/generic/wizard.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_taskbarcmn.o: ../../src/common/taskbarcmn.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_aboutdlg.o: ../../src/msw/aboutdlg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_notifmsg.o: ../../src/msw/notifmsg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_richtooltip.o: ../../src/msw/richtooltip.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_sound.o: ../../src/msw/sound.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_taskbar.o: ../../src/msw/taskbar.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_joystick.o: ../../src/msw/joystick.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\monolib_animateg.o: ../../src/generic/animateg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +$(OBJS)\basedll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define wxUSE_GUI=0 --define WXMAKINGDLL_BASE --define wxUSE_BASE=1 + +$(OBJS)\basedll_any.o: ../../src/common/any.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_appbase.o: ../../src/common/appbase.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_arcall.o: ../../src/common/arcall.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_arcfind.o: ../../src/common/arcfind.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_archive.o: ../../src/common/archive.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_arrstr.o: ../../src/common/arrstr.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_base64.o: ../../src/common/base64.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_clntdata.o: ../../src/common/clntdata.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_cmdline.o: ../../src/common/cmdline.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_config.o: ../../src/common/config.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_convauto.o: ../../src/common/convauto.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_datetime.o: ../../src/common/datetime.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_datetimefmt.o: ../../src/common/datetimefmt.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_datstrm.o: ../../src/common/datstrm.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_dircmn.o: ../../src/common/dircmn.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_dynarray.o: ../../src/common/dynarray.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_dynlib.o: ../../src/common/dynlib.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_dynload.o: ../../src/common/dynload.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_encconv.o: ../../src/common/encconv.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_evtloopcmn.o: ../../src/common/evtloopcmn.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_extended.o: ../../src/common/extended.c + $(CC) -c -o $@ $(BASEDLL_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_ffile.o: ../../src/common/ffile.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_file.o: ../../src/common/file.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_fileback.o: ../../src/common/fileback.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_fileconf.o: ../../src/common/fileconf.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_filefn.o: ../../src/common/filefn.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_filename.o: ../../src/common/filename.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_filesys.o: ../../src/common/filesys.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_filtall.o: ../../src/common/filtall.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_filtfind.o: ../../src/common/filtfind.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_fmapbase.o: ../../src/common/fmapbase.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_fs_arc.o: ../../src/common/fs_arc.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_fs_filter.o: ../../src/common/fs_filter.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_hash.o: ../../src/common/hash.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_hashmap.o: ../../src/common/hashmap.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_init.o: ../../src/common/init.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_intl.o: ../../src/common/intl.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_ipcbase.o: ../../src/common/ipcbase.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_languageinfo.o: ../../src/common/languageinfo.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_list.o: ../../src/common/list.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_log.o: ../../src/common/log.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_longlong.o: ../../src/common/longlong.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_memory.o: ../../src/common/memory.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_mimecmn.o: ../../src/common/mimecmn.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_module.o: ../../src/common/module.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_mstream.o: ../../src/common/mstream.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_numformatter.o: ../../src/common/numformatter.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_object.o: ../../src/common/object.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_platinfo.o: ../../src/common/platinfo.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_powercmn.o: ../../src/common/powercmn.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_process.o: ../../src/common/process.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_regex.o: ../../src/common/regex.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_stdpbase.o: ../../src/common/stdpbase.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_sstream.o: ../../src/common/sstream.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_stdstream.o: ../../src/common/stdstream.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_stopwatch.o: ../../src/common/stopwatch.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_strconv.o: ../../src/common/strconv.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_stream.o: ../../src/common/stream.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_string.o: ../../src/common/string.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_stringimpl.o: ../../src/common/stringimpl.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_stringops.o: ../../src/common/stringops.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_strvararg.o: ../../src/common/strvararg.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_sysopt.o: ../../src/common/sysopt.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_tarstrm.o: ../../src/common/tarstrm.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_textbuf.o: ../../src/common/textbuf.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_textfile.o: ../../src/common/textfile.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_threadinfo.o: ../../src/common/threadinfo.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_time.o: ../../src/common/time.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_timercmn.o: ../../src/common/timercmn.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_timerimpl.o: ../../src/common/timerimpl.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_tokenzr.o: ../../src/common/tokenzr.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_translation.o: ../../src/common/translation.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_txtstrm.o: ../../src/common/txtstrm.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_unichar.o: ../../src/common/unichar.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_uri.o: ../../src/common/uri.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_ustring.o: ../../src/common/ustring.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_variant.o: ../../src/common/variant.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_wfstream.o: ../../src/common/wfstream.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_wxcrt.o: ../../src/common/wxcrt.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_wxprintf.o: ../../src/common/wxprintf.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_xlocale.o: ../../src/common/xlocale.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_xti.o: ../../src/common/xti.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_xtistrm.o: ../../src/common/xtistrm.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_zipstrm.o: ../../src/common/zipstrm.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_zstream.o: ../../src/common/zstream.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_fswatchercmn.o: ../../src/common/fswatchercmn.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_fswatcherg.o: ../../src/generic/fswatcherg.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_basemsw.o: ../../src/msw/basemsw.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_crashrpt.o: ../../src/msw/crashrpt.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_debughlp.o: ../../src/msw/debughlp.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_dde.o: ../../src/msw/dde.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_dir.o: ../../src/msw/dir.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_dlmsw.o: ../../src/msw/dlmsw.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_evtloopconsole.o: ../../src/msw/evtloopconsole.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_mimetype.o: ../../src/msw/mimetype.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_power.o: ../../src/msw/power.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_regconf.o: ../../src/msw/regconf.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_registry.o: ../../src/msw/registry.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_snglinst.o: ../../src/msw/snglinst.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_stackwalk.o: ../../src/msw/stackwalk.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_stdpaths.o: ../../src/msw/stdpaths.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_thread.o: ../../src/msw/thread.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_timer.o: ../../src/msw/timer.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_utils.o: ../../src/msw/utils.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_utilsexc.o: ../../src/msw/utilsexc.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_fswatcher.o: ../../src/msw/fswatcher.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_event.o: ../../src/common/event.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_fs_mem.o: ../../src/common/fs_mem.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_msgout.o: ../../src/common/msgout.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_utilscmn.o: ../../src/common/utilscmn.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_main.o: ../../src/msw/main.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_mslu.o: ../../src/msw/mslu.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\basedll_volume.o: ../../src/msw/volume.cpp + $(CXX) -c -o $@ $(BASEDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_any.o: ../../src/common/any.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_appbase.o: ../../src/common/appbase.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_arcall.o: ../../src/common/arcall.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_arcfind.o: ../../src/common/arcfind.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_archive.o: ../../src/common/archive.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_arrstr.o: ../../src/common/arrstr.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_base64.o: ../../src/common/base64.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_clntdata.o: ../../src/common/clntdata.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_cmdline.o: ../../src/common/cmdline.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_config.o: ../../src/common/config.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_convauto.o: ../../src/common/convauto.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_datetime.o: ../../src/common/datetime.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_datetimefmt.o: ../../src/common/datetimefmt.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_datstrm.o: ../../src/common/datstrm.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_dircmn.o: ../../src/common/dircmn.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_dynarray.o: ../../src/common/dynarray.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_dynlib.o: ../../src/common/dynlib.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_dynload.o: ../../src/common/dynload.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_encconv.o: ../../src/common/encconv.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_evtloopcmn.o: ../../src/common/evtloopcmn.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_extended.o: ../../src/common/extended.c + $(CC) -c -o $@ $(BASELIB_CFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_ffile.o: ../../src/common/ffile.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_file.o: ../../src/common/file.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_fileback.o: ../../src/common/fileback.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_fileconf.o: ../../src/common/fileconf.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_filefn.o: ../../src/common/filefn.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_filename.o: ../../src/common/filename.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_filesys.o: ../../src/common/filesys.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_filtall.o: ../../src/common/filtall.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_filtfind.o: ../../src/common/filtfind.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_fmapbase.o: ../../src/common/fmapbase.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_fs_arc.o: ../../src/common/fs_arc.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_fs_filter.o: ../../src/common/fs_filter.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_hash.o: ../../src/common/hash.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_hashmap.o: ../../src/common/hashmap.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_init.o: ../../src/common/init.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_intl.o: ../../src/common/intl.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_ipcbase.o: ../../src/common/ipcbase.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_languageinfo.o: ../../src/common/languageinfo.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_list.o: ../../src/common/list.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_log.o: ../../src/common/log.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_longlong.o: ../../src/common/longlong.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_memory.o: ../../src/common/memory.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_mimecmn.o: ../../src/common/mimecmn.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_module.o: ../../src/common/module.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_mstream.o: ../../src/common/mstream.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_numformatter.o: ../../src/common/numformatter.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_object.o: ../../src/common/object.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_platinfo.o: ../../src/common/platinfo.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_powercmn.o: ../../src/common/powercmn.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_process.o: ../../src/common/process.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_regex.o: ../../src/common/regex.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_stdpbase.o: ../../src/common/stdpbase.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_sstream.o: ../../src/common/sstream.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_stdstream.o: ../../src/common/stdstream.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_stopwatch.o: ../../src/common/stopwatch.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_strconv.o: ../../src/common/strconv.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_stream.o: ../../src/common/stream.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_string.o: ../../src/common/string.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_stringimpl.o: ../../src/common/stringimpl.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_stringops.o: ../../src/common/stringops.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_strvararg.o: ../../src/common/strvararg.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_sysopt.o: ../../src/common/sysopt.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_tarstrm.o: ../../src/common/tarstrm.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_textbuf.o: ../../src/common/textbuf.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_textfile.o: ../../src/common/textfile.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_threadinfo.o: ../../src/common/threadinfo.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_time.o: ../../src/common/time.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_timercmn.o: ../../src/common/timercmn.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_timerimpl.o: ../../src/common/timerimpl.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_tokenzr.o: ../../src/common/tokenzr.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_translation.o: ../../src/common/translation.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_txtstrm.o: ../../src/common/txtstrm.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_unichar.o: ../../src/common/unichar.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_uri.o: ../../src/common/uri.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_ustring.o: ../../src/common/ustring.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_variant.o: ../../src/common/variant.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_wfstream.o: ../../src/common/wfstream.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_wxcrt.o: ../../src/common/wxcrt.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_wxprintf.o: ../../src/common/wxprintf.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_xlocale.o: ../../src/common/xlocale.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_xti.o: ../../src/common/xti.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_xtistrm.o: ../../src/common/xtistrm.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_zipstrm.o: ../../src/common/zipstrm.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_zstream.o: ../../src/common/zstream.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_fswatchercmn.o: ../../src/common/fswatchercmn.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_fswatcherg.o: ../../src/generic/fswatcherg.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_basemsw.o: ../../src/msw/basemsw.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_crashrpt.o: ../../src/msw/crashrpt.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_debughlp.o: ../../src/msw/debughlp.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_dde.o: ../../src/msw/dde.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_dir.o: ../../src/msw/dir.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_dlmsw.o: ../../src/msw/dlmsw.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_evtloopconsole.o: ../../src/msw/evtloopconsole.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_mimetype.o: ../../src/msw/mimetype.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_power.o: ../../src/msw/power.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_regconf.o: ../../src/msw/regconf.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_registry.o: ../../src/msw/registry.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_snglinst.o: ../../src/msw/snglinst.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_stackwalk.o: ../../src/msw/stackwalk.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_stdpaths.o: ../../src/msw/stdpaths.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_thread.o: ../../src/msw/thread.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_timer.o: ../../src/msw/timer.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_utils.o: ../../src/msw/utils.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_utilsexc.o: ../../src/msw/utilsexc.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_fswatcher.o: ../../src/msw/fswatcher.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_event.o: ../../src/common/event.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_fs_mem.o: ../../src/common/fs_mem.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_msgout.o: ../../src/common/msgout.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_utilscmn.o: ../../src/common/utilscmn.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_main.o: ../../src/msw/main.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_mslu.o: ../../src/msw/mslu.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baselib_volume.o: ../../src/msw/volume.cpp + $(CXX) -c -o $@ $(BASELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define wxUSE_GUI=0 --define WXUSINGDLL --define WXMAKINGDLL_NET + +$(OBJS)\netdll_fs_inet.o: ../../src/common/fs_inet.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_ftp.o: ../../src/common/ftp.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_http.o: ../../src/common/http.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_protocol.o: ../../src/common/protocol.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_sckaddr.o: ../../src/common/sckaddr.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_sckfile.o: ../../src/common/sckfile.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_sckipc.o: ../../src/common/sckipc.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_sckstrm.o: ../../src/common/sckstrm.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_socket.o: ../../src/common/socket.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_url.o: ../../src/common/url.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_sockmsw.o: ../../src/msw/sockmsw.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netdll_urlmsw.o: ../../src/msw/urlmsw.cpp + $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_fs_inet.o: ../../src/common/fs_inet.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_ftp.o: ../../src/common/ftp.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_http.o: ../../src/common/http.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_protocol.o: ../../src/common/protocol.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_sckaddr.o: ../../src/common/sckaddr.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_sckfile.o: ../../src/common/sckfile.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_sckipc.o: ../../src/common/sckipc.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_sckstrm.o: ../../src/common/sckstrm.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_socket.o: ../../src/common/socket.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_url.o: ../../src/common/url.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_sockmsw.o: ../../src/msw/sockmsw.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\netlib_urlmsw.o: ../../src/msw/urlmsw.cpp + $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_CORE --define wxUSE_BASE=0 + +$(OBJS)\coredll_event.o: ../../src/common/event.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_fs_mem.o: ../../src/common/fs_mem.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msgout.o: ../../src/common/msgout.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_utilscmn.o: ../../src/common/utilscmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_main.o: ../../src/msw/main.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_mslu.o: ../../src/msw/mslu.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_volume.o: ../../src/msw/volume.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_generic_statusbr.o: ../../src/generic/statusbr.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_accel.o: ../../src/msw/accel.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_anybutton.o: ../../src/msw/anybutton.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_artmsw.o: ../../src/msw/artmsw.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_bmpbuttn.o: ../../src/msw/bmpbuttn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_button.o: ../../src/msw/button.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_checkbox.o: ../../src/msw/checkbox.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_choice.o: ../../src/msw/choice.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_colordlg.o: ../../src/msw/colordlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_combo.o: ../../src/msw/combo.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_combobox.o: ../../src/msw/combobox.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_control.o: ../../src/msw/control.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_dialog.o: ../../src/msw/dialog.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_dirdlg.o: ../../src/msw/dirdlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_dragimag.o: ../../src/msw/dragimag.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_filedlg.o: ../../src/msw/filedlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_frame.o: ../../src/msw/frame.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_gauge.o: ../../src/msw/gauge.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_headerctrl.o: ../../src/msw/headerctrl.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_iniconf.o: ../../src/msw/iniconf.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_listbox.o: ../../src/msw/listbox.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_listctrl.o: ../../src/msw/listctrl.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_mdi.o: ../../src/msw/mdi.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_menu.o: ../../src/msw/menu.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_menuitem.o: ../../src/msw/menuitem.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_metafile.o: ../../src/msw/metafile.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msgdlg.o: ../../src/msw/msgdlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_nativdlg.o: ../../src/msw/nativdlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_nativewin.o: ../../src/msw/nativewin.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_notebook.o: ../../src/msw/notebook.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_access.o: ../../src/msw/ole/access.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_ownerdrw.o: ../../src/msw/ownerdrw.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_panel.o: ../../src/msw/panel.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_progdlg.o: ../../src/msw/progdlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_radiobox.o: ../../src/msw/radiobox.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_radiobut.o: ../../src/msw/radiobut.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_richmsgdlg.o: ../../src/msw/richmsgdlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_scrolbar.o: ../../src/msw/scrolbar.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_slider.o: ../../src/msw/slider.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_spinbutt.o: ../../src/msw/spinbutt.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_spinctrl.o: ../../src/msw/spinctrl.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_statbmp.o: ../../src/msw/statbmp.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_statbox.o: ../../src/msw/statbox.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_statusbar.o: ../../src/msw/statusbar.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_statline.o: ../../src/msw/statline.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_stattext.o: ../../src/msw/stattext.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_toolbar.o: ../../src/msw/toolbar.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_textctrl.o: ../../src/msw/textctrl.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_textentry.o: ../../src/msw/textentry.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_tglbtn.o: ../../src/msw/tglbtn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_treectrl.o: ../../src/msw/treectrl.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_checklst.o: ../../src/msw/checklst.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_msw_fdrepdlg.o: ../../src/msw/fdrepdlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_fontdlg.o: ../../src/msw/fontdlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_generic_accel.o: ../../src/generic/accel.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_colrdlgg.o: ../../src/generic/colrdlgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_dirdlgg.o: ../../src/generic/dirdlgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_generic_fdrepdlg.o: ../../src/generic/fdrepdlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_filedlgg.o: ../../src/generic/filedlgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_fontdlgg.o: ../../src/generic/fontdlgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_generic_listctrl.o: ../../src/generic/listctrl.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_mdig.o: ../../src/generic/mdig.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_bmpbuttn.o: ../../src/univ/bmpbuttn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_button.o: ../../src/univ/button.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_checkbox.o: ../../src/univ/checkbox.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_checklst.o: ../../src/univ/checklst.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_choice.o: ../../src/univ/choice.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_combobox.o: ../../src/univ/combobox.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_control.o: ../../src/univ/control.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_ctrlrend.o: ../../src/univ/ctrlrend.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_dialog.o: ../../src/univ/dialog.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_framuniv.o: ../../src/univ/framuniv.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_gauge.o: ../../src/univ/gauge.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_inpcons.o: ../../src/univ/inpcons.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_inphand.o: ../../src/univ/inphand.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_listbox.o: ../../src/univ/listbox.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_menu.o: ../../src/univ/menu.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_notebook.o: ../../src/univ/notebook.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_radiobox.o: ../../src/univ/radiobox.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_radiobut.o: ../../src/univ/radiobut.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_scrarrow.o: ../../src/univ/scrarrow.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_scrolbar.o: ../../src/univ/scrolbar.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_scrthumb.o: ../../src/univ/scrthumb.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_settingsuniv.o: ../../src/univ/settingsuniv.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_slider.o: ../../src/univ/slider.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_spinbutt.o: ../../src/univ/spinbutt.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_statbmp.o: ../../src/univ/statbmp.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_statbox.o: ../../src/univ/statbox.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_statline.o: ../../src/univ/statline.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_stattext.o: ../../src/univ/stattext.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_statusbr.o: ../../src/univ/statusbr.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_stdrend.o: ../../src/univ/stdrend.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_textctrl.o: ../../src/univ/textctrl.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_tglbtn.o: ../../src/univ/tglbtn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_theme.o: ../../src/univ/theme.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_univ_toolbar.o: ../../src/univ/toolbar.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_topluniv.o: ../../src/univ/topluniv.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_winuniv.o: ../../src/univ/winuniv.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_gtk.o: ../../src/univ/themes/gtk.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_metal.o: ../../src/univ/themes/metal.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_mono.o: ../../src/univ/themes/mono.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\coredll_win32.o: ../../src/univ/themes/win32.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_activex.o: ../../src/msw/ole/activex.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_app.o: ../../src/msw/app.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_bitmap.o: ../../src/msw/bitmap.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_brush.o: ../../src/msw/brush.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_caret.o: ../../src/msw/caret.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_clipbrd.o: ../../src/msw/clipbrd.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_colour.o: ../../src/msw/colour.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_cursor.o: ../../src/msw/cursor.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_data.o: ../../src/msw/data.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dc.o: ../../src/msw/dc.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dcclient.o: ../../src/msw/dcclient.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dcmemory.o: ../../src/msw/dcmemory.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dcprint.o: ../../src/msw/dcprint.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dcscreen.o: ../../src/msw/dcscreen.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dialup.o: ../../src/msw/dialup.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dib.o: ../../src/msw/dib.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_display.o: ../../src/msw/display.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_enhmeta.o: ../../src/msw/enhmeta.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_font.o: ../../src/msw/font.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_fontenum.o: ../../src/msw/fontenum.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_fontutil.o: ../../src/msw/fontutil.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_gdiimage.o: ../../src/msw/gdiimage.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_gdiobj.o: ../../src/msw/gdiobj.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_gdiplus.o: ../../src/msw/gdiplus.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_graphics.o: ../../src/msw/graphics.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_icon.o: ../../src/msw/icon.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imaglist.o: ../../src/msw/imaglist.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_minifram.o: ../../src/msw/minifram.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_nonownedwnd.o: ../../src/msw/nonownedwnd.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dataobj.o: ../../src/msw/ole/dataobj.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dropsrc.o: ../../src/msw/ole/dropsrc.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_droptgt.o: ../../src/msw/ole/droptgt.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_oleutils.o: ../../src/msw/ole/oleutils.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_safearray.o: ../../src/msw/ole/safearray.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_palette.o: ../../src/msw/palette.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_pen.o: ../../src/msw/pen.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_popupwin.o: ../../src/msw/popupwin.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_printdlg.o: ../../src/msw/printdlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_printwin.o: ../../src/msw/printwin.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_region.o: ../../src/msw/region.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_renderer.o: ../../src/msw/renderer.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_settings.o: ../../src/msw/settings.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_textmeasure.o: ../../src/msw/textmeasure.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_tooltip.o: ../../src/msw/tooltip.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_toplevel.o: ../../src/msw/toplevel.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_uiaction.o: ../../src/msw/uiaction.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_utilsgui.o: ../../src/msw/utilsgui.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_utilswin.o: ../../src/msw/utilswin.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_uxtheme.o: ../../src/msw/uxtheme.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_window.o: ../../src/msw/window.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_helpchm.o: ../../src/msw/helpchm.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_helpwin.o: ../../src/msw/helpwin.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_automtn.o: ../../src/msw/ole/automtn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_uuid.o: ../../src/msw/ole/uuid.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_clrpickerg.o: ../../src/generic/clrpickerg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_collpaneg.o: ../../src/generic/collpaneg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_filepickerg.o: ../../src/generic/filepickerg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_fontpickerg.o: ../../src/generic/fontpickerg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_prntdlgg.o: ../../src/generic/prntdlgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_evtloop.o: ../../src/msw/evtloop.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_accelcmn.o: ../../src/common/accelcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_accesscmn.o: ../../src/common/accesscmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_anidecod.o: ../../src/common/anidecod.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_affinematrix2d.o: ../../src/common/affinematrix2d.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_appcmn.o: ../../src/common/appcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_artprov.o: ../../src/common/artprov.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_artstd.o: ../../src/common/artstd.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_arttango.o: ../../src/common/arttango.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_bmpbase.o: ../../src/common/bmpbase.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_bmpbtncmn.o: ../../src/common/bmpbtncmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_bookctrl.o: ../../src/common/bookctrl.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_btncmn.o: ../../src/common/btncmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_cairo.o: ../../src/common/cairo.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_checkboxcmn.o: ../../src/common/checkboxcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_checklstcmn.o: ../../src/common/checklstcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_choiccmn.o: ../../src/common/choiccmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_clipcmn.o: ../../src/common/clipcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_clrpickercmn.o: ../../src/common/clrpickercmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_colourcmn.o: ../../src/common/colourcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_colourdata.o: ../../src/common/colourdata.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_combocmn.o: ../../src/common/combocmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_cmdproc.o: ../../src/common/cmdproc.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_cmndata.o: ../../src/common/cmndata.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_containr.o: ../../src/common/containr.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_cshelp.o: ../../src/common/cshelp.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_ctrlcmn.o: ../../src/common/ctrlcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_ctrlsub.o: ../../src/common/ctrlsub.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dcbase.o: ../../src/common/dcbase.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dcbufcmn.o: ../../src/common/dcbufcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dcgraph.o: ../../src/common/dcgraph.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dcsvg.o: ../../src/common/dcsvg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dirctrlcmn.o: ../../src/common/dirctrlcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dlgcmn.o: ../../src/common/dlgcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dndcmn.o: ../../src/common/dndcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dobjcmn.o: ../../src/common/dobjcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_docmdi.o: ../../src/common/docmdi.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_docview.o: ../../src/common/docview.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dpycmn.o: ../../src/common/dpycmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dseldlg.o: ../../src/common/dseldlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_effects.o: ../../src/common/effects.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_fddlgcmn.o: ../../src/common/fddlgcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_filectrlcmn.o: ../../src/common/filectrlcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_filehistorycmn.o: ../../src/common/filehistorycmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_filepickercmn.o: ../../src/common/filepickercmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_fontpickercmn.o: ../../src/common/fontpickercmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_fldlgcmn.o: ../../src/common/fldlgcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_fontcmn.o: ../../src/common/fontcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_fontdata.o: ../../src/common/fontdata.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_graphicc.o: ../../src/generic/graphicc.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_fontenumcmn.o: ../../src/common/fontenumcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_fontmap.o: ../../src/common/fontmap.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_fontutilcmn.o: ../../src/common/fontutilcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_framecmn.o: ../../src/common/framecmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_gaugecmn.o: ../../src/common/gaugecmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_gbsizer.o: ../../src/common/gbsizer.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_gdicmn.o: ../../src/common/gdicmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_geometry.o: ../../src/common/geometry.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_gifdecod.o: ../../src/common/gifdecod.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_graphcmn.o: ../../src/common/graphcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_headercolcmn.o: ../../src/common/headercolcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_headerctrlcmn.o: ../../src/common/headerctrlcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_helpbase.o: ../../src/common/helpbase.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_iconbndl.o: ../../src/common/iconbndl.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imagall.o: ../../src/common/imagall.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imagbmp.o: ../../src/common/imagbmp.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_image.o: ../../src/common/image.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imagfill.o: ../../src/common/imagfill.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imaggif.o: ../../src/common/imaggif.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imagiff.o: ../../src/common/imagiff.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imagjpeg.o: ../../src/common/imagjpeg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imagpcx.o: ../../src/common/imagpcx.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imagpng.o: ../../src/common/imagpng.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imagpnm.o: ../../src/common/imagpnm.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imagtga.o: ../../src/common/imagtga.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imagtiff.o: ../../src/common/imagtiff.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_imagxpm.o: ../../src/common/imagxpm.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_layout.o: ../../src/common/layout.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_lboxcmn.o: ../../src/common/lboxcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_listctrlcmn.o: ../../src/common/listctrlcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_markupparser.o: ../../src/common/markupparser.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_matrix.o: ../../src/common/matrix.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_menucmn.o: ../../src/common/menucmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_modalhook.o: ../../src/common/modalhook.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_mousemanager.o: ../../src/common/mousemanager.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_nbkbase.o: ../../src/common/nbkbase.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_overlaycmn.o: ../../src/common/overlaycmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_ownerdrwcmn.o: ../../src/common/ownerdrwcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_paper.o: ../../src/common/paper.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_panelcmn.o: ../../src/common/panelcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_persist.o: ../../src/common/persist.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_pickerbase.o: ../../src/common/pickerbase.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_popupcmn.o: ../../src/common/popupcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_preferencescmn.o: ../../src/common/preferencescmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_prntbase.o: ../../src/common/prntbase.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_quantize.o: ../../src/common/quantize.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_radiobtncmn.o: ../../src/common/radiobtncmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_radiocmn.o: ../../src/common/radiocmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_rearrangectrl.o: ../../src/common/rearrangectrl.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_rendcmn.o: ../../src/common/rendcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_rgncmn.o: ../../src/common/rgncmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_scrolbarcmn.o: ../../src/common/scrolbarcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_settcmn.o: ../../src/common/settcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_sizer.o: ../../src/common/sizer.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_slidercmn.o: ../../src/common/slidercmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_spinbtncmn.o: ../../src/common/spinbtncmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_spinctrlcmn.o: ../../src/common/spinctrlcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_srchcmn.o: ../../src/common/srchcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_statbar.o: ../../src/common/statbar.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_statbmpcmn.o: ../../src/common/statbmpcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_statboxcmn.o: ../../src/common/statboxcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_statlinecmn.o: ../../src/common/statlinecmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_stattextcmn.o: ../../src/common/stattextcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_stockitem.o: ../../src/common/stockitem.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_tbarbase.o: ../../src/common/tbarbase.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_textcmn.o: ../../src/common/textcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_textentrycmn.o: ../../src/common/textentrycmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_textmeasurecmn.o: ../../src/common/textmeasurecmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_toplvcmn.o: ../../src/common/toplvcmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_treebase.o: ../../src/common/treebase.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_uiactioncmn.o: ../../src/common/uiactioncmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_valgen.o: ../../src/common/valgen.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_validate.o: ../../src/common/validate.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_valtext.o: ../../src/common/valtext.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_valnum.o: ../../src/common/valnum.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_wincmn.o: ../../src/common/wincmn.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_windowid.o: ../../src/common/windowid.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_wrapsizer.o: ../../src/common/wrapsizer.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_xpmdecod.o: ../../src/common/xpmdecod.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_busyinfo.o: ../../src/generic/busyinfo.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_buttonbar.o: ../../src/generic/buttonbar.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_choicdgg.o: ../../src/generic/choicdgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_choicbkg.o: ../../src/generic/choicbkg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_combog.o: ../../src/generic/combog.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dcpsg.o: ../../src/generic/dcpsg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dirctrlg.o: ../../src/generic/dirctrlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_dragimgg.o: ../../src/generic/dragimgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_filectrlg.o: ../../src/generic/filectrlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_headerctrlg.o: ../../src/generic/headerctrlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_infobar.o: ../../src/generic/infobar.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_listbkg.o: ../../src/generic/listbkg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_logg.o: ../../src/generic/logg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_markuptext.o: ../../src/generic/markuptext.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_msgdlgg.o: ../../src/generic/msgdlgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_numdlgg.o: ../../src/generic/numdlgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_progdlgg.o: ../../src/generic/progdlgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_preferencesg.o: ../../src/generic/preferencesg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_printps.o: ../../src/generic/printps.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_renderg.o: ../../src/generic/renderg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_richmsgdlgg.o: ../../src/generic/richmsgdlgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_scrlwing.o: ../../src/generic/scrlwing.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_selstore.o: ../../src/generic/selstore.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_spinctlg.o: ../../src/generic/spinctlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_splitter.o: ../../src/generic/splitter.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_srchctlg.o: ../../src/generic/srchctlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_statbmpg.o: ../../src/generic/statbmpg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_stattextg.o: ../../src/generic/stattextg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_textdlgg.o: ../../src/generic/textdlgg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_tipwin.o: ../../src/generic/tipwin.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_toolbkg.o: ../../src/generic/toolbkg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_treectlg.o: ../../src/generic/treectlg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_treebkg.o: ../../src/generic/treebkg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_vlbox.o: ../../src/generic/vlbox.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_vscroll.o: ../../src/generic/vscroll.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\coredll_xmlreshandler.o: ../../src/xrc/xmlreshandler.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +$(OBJS)\corelib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_event.o: ../../src/common/event.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_fs_mem.o: ../../src/common/fs_mem.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msgout.o: ../../src/common/msgout.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_utilscmn.o: ../../src/common/utilscmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_main.o: ../../src/msw/main.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_mslu.o: ../../src/msw/mslu.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_volume.o: ../../src/msw/volume.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_generic_statusbr.o: ../../src/generic/statusbr.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_accel.o: ../../src/msw/accel.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_anybutton.o: ../../src/msw/anybutton.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_artmsw.o: ../../src/msw/artmsw.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_bmpbuttn.o: ../../src/msw/bmpbuttn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_button.o: ../../src/msw/button.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_checkbox.o: ../../src/msw/checkbox.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_choice.o: ../../src/msw/choice.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_colordlg.o: ../../src/msw/colordlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_combo.o: ../../src/msw/combo.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_combobox.o: ../../src/msw/combobox.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_control.o: ../../src/msw/control.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_dialog.o: ../../src/msw/dialog.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_dirdlg.o: ../../src/msw/dirdlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_dragimag.o: ../../src/msw/dragimag.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_filedlg.o: ../../src/msw/filedlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_frame.o: ../../src/msw/frame.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_gauge.o: ../../src/msw/gauge.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_headerctrl.o: ../../src/msw/headerctrl.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_iniconf.o: ../../src/msw/iniconf.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_listbox.o: ../../src/msw/listbox.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_listctrl.o: ../../src/msw/listctrl.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_mdi.o: ../../src/msw/mdi.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_menu.o: ../../src/msw/menu.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_menuitem.o: ../../src/msw/menuitem.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_metafile.o: ../../src/msw/metafile.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msgdlg.o: ../../src/msw/msgdlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_nativdlg.o: ../../src/msw/nativdlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_nativewin.o: ../../src/msw/nativewin.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_notebook.o: ../../src/msw/notebook.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_access.o: ../../src/msw/ole/access.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_ownerdrw.o: ../../src/msw/ownerdrw.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_panel.o: ../../src/msw/panel.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_progdlg.o: ../../src/msw/progdlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_radiobox.o: ../../src/msw/radiobox.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_radiobut.o: ../../src/msw/radiobut.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_richmsgdlg.o: ../../src/msw/richmsgdlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_scrolbar.o: ../../src/msw/scrolbar.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_slider.o: ../../src/msw/slider.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_spinbutt.o: ../../src/msw/spinbutt.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_spinctrl.o: ../../src/msw/spinctrl.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_statbmp.o: ../../src/msw/statbmp.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_statbox.o: ../../src/msw/statbox.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_statusbar.o: ../../src/msw/statusbar.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_statline.o: ../../src/msw/statline.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_stattext.o: ../../src/msw/stattext.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_toolbar.o: ../../src/msw/toolbar.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_textctrl.o: ../../src/msw/textctrl.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_textentry.o: ../../src/msw/textentry.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_tglbtn.o: ../../src/msw/tglbtn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_treectrl.o: ../../src/msw/treectrl.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_checklst.o: ../../src/msw/checklst.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_msw_fdrepdlg.o: ../../src/msw/fdrepdlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_fontdlg.o: ../../src/msw/fontdlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_generic_accel.o: ../../src/generic/accel.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_colrdlgg.o: ../../src/generic/colrdlgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_dirdlgg.o: ../../src/generic/dirdlgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_generic_fdrepdlg.o: ../../src/generic/fdrepdlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_filedlgg.o: ../../src/generic/filedlgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_fontdlgg.o: ../../src/generic/fontdlgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_generic_listctrl.o: ../../src/generic/listctrl.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_mdig.o: ../../src/generic/mdig.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_bmpbuttn.o: ../../src/univ/bmpbuttn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_button.o: ../../src/univ/button.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_checkbox.o: ../../src/univ/checkbox.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_checklst.o: ../../src/univ/checklst.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_choice.o: ../../src/univ/choice.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_combobox.o: ../../src/univ/combobox.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_control.o: ../../src/univ/control.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_ctrlrend.o: ../../src/univ/ctrlrend.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_dialog.o: ../../src/univ/dialog.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_framuniv.o: ../../src/univ/framuniv.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_gauge.o: ../../src/univ/gauge.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_inpcons.o: ../../src/univ/inpcons.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_inphand.o: ../../src/univ/inphand.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_listbox.o: ../../src/univ/listbox.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_menu.o: ../../src/univ/menu.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_notebook.o: ../../src/univ/notebook.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_radiobox.o: ../../src/univ/radiobox.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_radiobut.o: ../../src/univ/radiobut.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_scrarrow.o: ../../src/univ/scrarrow.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_scrolbar.o: ../../src/univ/scrolbar.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_scrthumb.o: ../../src/univ/scrthumb.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_settingsuniv.o: ../../src/univ/settingsuniv.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_slider.o: ../../src/univ/slider.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_spinbutt.o: ../../src/univ/spinbutt.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_statbmp.o: ../../src/univ/statbmp.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_statbox.o: ../../src/univ/statbox.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_statline.o: ../../src/univ/statline.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_stattext.o: ../../src/univ/stattext.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_statusbr.o: ../../src/univ/statusbr.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_stdrend.o: ../../src/univ/stdrend.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_textctrl.o: ../../src/univ/textctrl.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_tglbtn.o: ../../src/univ/tglbtn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_theme.o: ../../src/univ/theme.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_univ_toolbar.o: ../../src/univ/toolbar.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_topluniv.o: ../../src/univ/topluniv.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_winuniv.o: ../../src/univ/winuniv.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_gtk.o: ../../src/univ/themes/gtk.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_metal.o: ../../src/univ/themes/metal.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_mono.o: ../../src/univ/themes/mono.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\corelib_win32.o: ../../src/univ/themes/win32.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_activex.o: ../../src/msw/ole/activex.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_app.o: ../../src/msw/app.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_bitmap.o: ../../src/msw/bitmap.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_brush.o: ../../src/msw/brush.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_caret.o: ../../src/msw/caret.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_clipbrd.o: ../../src/msw/clipbrd.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_colour.o: ../../src/msw/colour.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_cursor.o: ../../src/msw/cursor.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_data.o: ../../src/msw/data.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dc.o: ../../src/msw/dc.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dcclient.o: ../../src/msw/dcclient.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dcmemory.o: ../../src/msw/dcmemory.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dcprint.o: ../../src/msw/dcprint.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dcscreen.o: ../../src/msw/dcscreen.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dialup.o: ../../src/msw/dialup.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dib.o: ../../src/msw/dib.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_display.o: ../../src/msw/display.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_enhmeta.o: ../../src/msw/enhmeta.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_font.o: ../../src/msw/font.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_fontenum.o: ../../src/msw/fontenum.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_fontutil.o: ../../src/msw/fontutil.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_gdiimage.o: ../../src/msw/gdiimage.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_gdiobj.o: ../../src/msw/gdiobj.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_gdiplus.o: ../../src/msw/gdiplus.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_graphics.o: ../../src/msw/graphics.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_icon.o: ../../src/msw/icon.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imaglist.o: ../../src/msw/imaglist.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_minifram.o: ../../src/msw/minifram.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_nonownedwnd.o: ../../src/msw/nonownedwnd.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dataobj.o: ../../src/msw/ole/dataobj.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dropsrc.o: ../../src/msw/ole/dropsrc.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_droptgt.o: ../../src/msw/ole/droptgt.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_oleutils.o: ../../src/msw/ole/oleutils.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_safearray.o: ../../src/msw/ole/safearray.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_palette.o: ../../src/msw/palette.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_pen.o: ../../src/msw/pen.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_popupwin.o: ../../src/msw/popupwin.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_printdlg.o: ../../src/msw/printdlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_printwin.o: ../../src/msw/printwin.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_region.o: ../../src/msw/region.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_renderer.o: ../../src/msw/renderer.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_settings.o: ../../src/msw/settings.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_textmeasure.o: ../../src/msw/textmeasure.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_tooltip.o: ../../src/msw/tooltip.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_toplevel.o: ../../src/msw/toplevel.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_uiaction.o: ../../src/msw/uiaction.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_utilsgui.o: ../../src/msw/utilsgui.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_utilswin.o: ../../src/msw/utilswin.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_uxtheme.o: ../../src/msw/uxtheme.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_window.o: ../../src/msw/window.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_helpchm.o: ../../src/msw/helpchm.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_helpwin.o: ../../src/msw/helpwin.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_automtn.o: ../../src/msw/ole/automtn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_uuid.o: ../../src/msw/ole/uuid.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_clrpickerg.o: ../../src/generic/clrpickerg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_collpaneg.o: ../../src/generic/collpaneg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_filepickerg.o: ../../src/generic/filepickerg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_fontpickerg.o: ../../src/generic/fontpickerg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_prntdlgg.o: ../../src/generic/prntdlgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_evtloop.o: ../../src/msw/evtloop.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_accelcmn.o: ../../src/common/accelcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_accesscmn.o: ../../src/common/accesscmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_anidecod.o: ../../src/common/anidecod.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_affinematrix2d.o: ../../src/common/affinematrix2d.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_appcmn.o: ../../src/common/appcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_artprov.o: ../../src/common/artprov.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_artstd.o: ../../src/common/artstd.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_arttango.o: ../../src/common/arttango.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_bmpbase.o: ../../src/common/bmpbase.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_bmpbtncmn.o: ../../src/common/bmpbtncmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_bookctrl.o: ../../src/common/bookctrl.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_btncmn.o: ../../src/common/btncmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_cairo.o: ../../src/common/cairo.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_checkboxcmn.o: ../../src/common/checkboxcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_checklstcmn.o: ../../src/common/checklstcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_choiccmn.o: ../../src/common/choiccmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_clipcmn.o: ../../src/common/clipcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_clrpickercmn.o: ../../src/common/clrpickercmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_colourcmn.o: ../../src/common/colourcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_colourdata.o: ../../src/common/colourdata.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_combocmn.o: ../../src/common/combocmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_cmdproc.o: ../../src/common/cmdproc.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_cmndata.o: ../../src/common/cmndata.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_containr.o: ../../src/common/containr.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_cshelp.o: ../../src/common/cshelp.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_ctrlcmn.o: ../../src/common/ctrlcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_ctrlsub.o: ../../src/common/ctrlsub.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dcbase.o: ../../src/common/dcbase.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dcbufcmn.o: ../../src/common/dcbufcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dcgraph.o: ../../src/common/dcgraph.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dcsvg.o: ../../src/common/dcsvg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dirctrlcmn.o: ../../src/common/dirctrlcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dlgcmn.o: ../../src/common/dlgcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dndcmn.o: ../../src/common/dndcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dobjcmn.o: ../../src/common/dobjcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_docmdi.o: ../../src/common/docmdi.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_docview.o: ../../src/common/docview.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dpycmn.o: ../../src/common/dpycmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dseldlg.o: ../../src/common/dseldlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_effects.o: ../../src/common/effects.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_fddlgcmn.o: ../../src/common/fddlgcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_filectrlcmn.o: ../../src/common/filectrlcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_filehistorycmn.o: ../../src/common/filehistorycmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_filepickercmn.o: ../../src/common/filepickercmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_fontpickercmn.o: ../../src/common/fontpickercmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_fldlgcmn.o: ../../src/common/fldlgcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_fontcmn.o: ../../src/common/fontcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_fontdata.o: ../../src/common/fontdata.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_graphicc.o: ../../src/generic/graphicc.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_fontenumcmn.o: ../../src/common/fontenumcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_fontmap.o: ../../src/common/fontmap.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_fontutilcmn.o: ../../src/common/fontutilcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_framecmn.o: ../../src/common/framecmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_gaugecmn.o: ../../src/common/gaugecmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_gbsizer.o: ../../src/common/gbsizer.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_gdicmn.o: ../../src/common/gdicmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_geometry.o: ../../src/common/geometry.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_gifdecod.o: ../../src/common/gifdecod.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_graphcmn.o: ../../src/common/graphcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_headercolcmn.o: ../../src/common/headercolcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_headerctrlcmn.o: ../../src/common/headerctrlcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_helpbase.o: ../../src/common/helpbase.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_iconbndl.o: ../../src/common/iconbndl.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imagall.o: ../../src/common/imagall.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imagbmp.o: ../../src/common/imagbmp.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_image.o: ../../src/common/image.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imagfill.o: ../../src/common/imagfill.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imaggif.o: ../../src/common/imaggif.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imagiff.o: ../../src/common/imagiff.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imagjpeg.o: ../../src/common/imagjpeg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imagpcx.o: ../../src/common/imagpcx.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imagpng.o: ../../src/common/imagpng.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imagpnm.o: ../../src/common/imagpnm.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imagtga.o: ../../src/common/imagtga.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imagtiff.o: ../../src/common/imagtiff.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_imagxpm.o: ../../src/common/imagxpm.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_layout.o: ../../src/common/layout.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_lboxcmn.o: ../../src/common/lboxcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_listctrlcmn.o: ../../src/common/listctrlcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_markupparser.o: ../../src/common/markupparser.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_matrix.o: ../../src/common/matrix.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_menucmn.o: ../../src/common/menucmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_modalhook.o: ../../src/common/modalhook.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_mousemanager.o: ../../src/common/mousemanager.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_nbkbase.o: ../../src/common/nbkbase.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_overlaycmn.o: ../../src/common/overlaycmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_ownerdrwcmn.o: ../../src/common/ownerdrwcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_paper.o: ../../src/common/paper.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_panelcmn.o: ../../src/common/panelcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_persist.o: ../../src/common/persist.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_pickerbase.o: ../../src/common/pickerbase.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_popupcmn.o: ../../src/common/popupcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_preferencescmn.o: ../../src/common/preferencescmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_prntbase.o: ../../src/common/prntbase.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_quantize.o: ../../src/common/quantize.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_radiobtncmn.o: ../../src/common/radiobtncmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_radiocmn.o: ../../src/common/radiocmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_rearrangectrl.o: ../../src/common/rearrangectrl.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_rendcmn.o: ../../src/common/rendcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_rgncmn.o: ../../src/common/rgncmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_scrolbarcmn.o: ../../src/common/scrolbarcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_settcmn.o: ../../src/common/settcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_sizer.o: ../../src/common/sizer.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_slidercmn.o: ../../src/common/slidercmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_spinbtncmn.o: ../../src/common/spinbtncmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_spinctrlcmn.o: ../../src/common/spinctrlcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_srchcmn.o: ../../src/common/srchcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_statbar.o: ../../src/common/statbar.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_statbmpcmn.o: ../../src/common/statbmpcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_statboxcmn.o: ../../src/common/statboxcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_statlinecmn.o: ../../src/common/statlinecmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_stattextcmn.o: ../../src/common/stattextcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_stockitem.o: ../../src/common/stockitem.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_tbarbase.o: ../../src/common/tbarbase.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_textcmn.o: ../../src/common/textcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_textentrycmn.o: ../../src/common/textentrycmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_textmeasurecmn.o: ../../src/common/textmeasurecmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_toplvcmn.o: ../../src/common/toplvcmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_treebase.o: ../../src/common/treebase.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_uiactioncmn.o: ../../src/common/uiactioncmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_valgen.o: ../../src/common/valgen.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_validate.o: ../../src/common/validate.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_valtext.o: ../../src/common/valtext.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_valnum.o: ../../src/common/valnum.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_wincmn.o: ../../src/common/wincmn.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_windowid.o: ../../src/common/windowid.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_wrapsizer.o: ../../src/common/wrapsizer.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_xpmdecod.o: ../../src/common/xpmdecod.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_busyinfo.o: ../../src/generic/busyinfo.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_buttonbar.o: ../../src/generic/buttonbar.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_choicdgg.o: ../../src/generic/choicdgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_choicbkg.o: ../../src/generic/choicbkg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_combog.o: ../../src/generic/combog.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dcpsg.o: ../../src/generic/dcpsg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dirctrlg.o: ../../src/generic/dirctrlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_dragimgg.o: ../../src/generic/dragimgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_filectrlg.o: ../../src/generic/filectrlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_headerctrlg.o: ../../src/generic/headerctrlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_infobar.o: ../../src/generic/infobar.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_listbkg.o: ../../src/generic/listbkg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_logg.o: ../../src/generic/logg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_markuptext.o: ../../src/generic/markuptext.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_msgdlgg.o: ../../src/generic/msgdlgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_numdlgg.o: ../../src/generic/numdlgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_progdlgg.o: ../../src/generic/progdlgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_preferencesg.o: ../../src/generic/preferencesg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_printps.o: ../../src/generic/printps.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_renderg.o: ../../src/generic/renderg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_richmsgdlgg.o: ../../src/generic/richmsgdlgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_scrlwing.o: ../../src/generic/scrlwing.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_selstore.o: ../../src/generic/selstore.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_spinctlg.o: ../../src/generic/spinctlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_splitter.o: ../../src/generic/splitter.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_srchctlg.o: ../../src/generic/srchctlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_statbmpg.o: ../../src/generic/statbmpg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_stattextg.o: ../../src/generic/stattextg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_textdlgg.o: ../../src/generic/textdlgg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_tipwin.o: ../../src/generic/tipwin.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_toolbkg.o: ../../src/generic/toolbkg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_treectlg.o: ../../src/generic/treectlg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_treebkg.o: ../../src/generic/treebkg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_vlbox.o: ../../src/generic/vlbox.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_vscroll.o: ../../src/generic/vscroll.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) +$(OBJS)\corelib_xmlreshandler.o: ../../src/xrc/xmlreshandler.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +$(OBJS)\advdll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_ADV + +$(OBJS)\advdll_bmpcbox.o: ../../src/msw/bmpcbox.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_calctrl.o: ../../src/msw/calctrl.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_commandlinkbutton.o: ../../src/msw/commandlinkbutton.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_datecontrols.o: ../../src/msw/datecontrols.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_datectrl.o: ../../src/msw/datectrl.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_datetimectrl.o: ../../src/msw/datetimectrl.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_hyperlink.o: ../../src/msw/hyperlink.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_timectrl.o: ../../src/msw/timectrl.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_animatecmn.o: ../../src/common/animatecmn.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_bmpcboxcmn.o: ../../src/common/bmpcboxcmn.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_calctrlcmn.o: ../../src/common/calctrlcmn.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_datavcmn.o: ../../src/common/datavcmn.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_gridcmn.o: ../../src/common/gridcmn.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_hyperlnkcmn.o: ../../src/common/hyperlnkcmn.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_odcombocmn.o: ../../src/common/odcombocmn.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_richtooltipcmn.o: ../../src/common/richtooltipcmn.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_aboutdlgg.o: ../../src/generic/aboutdlgg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_bannerwindow.o: ../../src/generic/bannerwindow.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_bmpcboxg.o: ../../src/generic/bmpcboxg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_calctrlg.o: ../../src/generic/calctrlg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_commandlinkbuttong.o: ../../src/generic/commandlinkbuttong.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_datavgen.o: ../../src/generic/datavgen.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_datectlg.o: ../../src/generic/datectlg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_editlbox.o: ../../src/generic/editlbox.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_grid.o: ../../src/generic/grid.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_gridctrl.o: ../../src/generic/gridctrl.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_grideditors.o: ../../src/generic/grideditors.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_gridsel.o: ../../src/generic/gridsel.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_helpext.o: ../../src/generic/helpext.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_hyperlinkg.o: ../../src/generic/hyperlinkg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_laywin.o: ../../src/generic/laywin.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_notifmsgg.o: ../../src/generic/notifmsgg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_odcombo.o: ../../src/generic/odcombo.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_propdlg.o: ../../src/generic/propdlg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_richtooltipg.o: ../../src/generic/richtooltipg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_sashwin.o: ../../src/generic/sashwin.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_splash.o: ../../src/generic/splash.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_timectrlg.o: ../../src/generic/timectrlg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_tipdlg.o: ../../src/generic/tipdlg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_treelist.o: ../../src/generic/treelist.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_wizard.o: ../../src/generic/wizard.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_taskbarcmn.o: ../../src/common/taskbarcmn.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_aboutdlg.o: ../../src/msw/aboutdlg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_notifmsg.o: ../../src/msw/notifmsg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_richtooltip.o: ../../src/msw/richtooltip.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_sound.o: ../../src/msw/sound.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_taskbar.o: ../../src/msw/taskbar.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_joystick.o: ../../src/msw/joystick.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advdll_animateg.o: ../../src/generic/animateg.cpp + $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_bmpcbox.o: ../../src/msw/bmpcbox.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_calctrl.o: ../../src/msw/calctrl.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_commandlinkbutton.o: ../../src/msw/commandlinkbutton.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_datecontrols.o: ../../src/msw/datecontrols.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_datectrl.o: ../../src/msw/datectrl.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_datetimectrl.o: ../../src/msw/datetimectrl.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_hyperlink.o: ../../src/msw/hyperlink.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_timectrl.o: ../../src/msw/timectrl.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_animatecmn.o: ../../src/common/animatecmn.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_bmpcboxcmn.o: ../../src/common/bmpcboxcmn.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_calctrlcmn.o: ../../src/common/calctrlcmn.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_datavcmn.o: ../../src/common/datavcmn.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_gridcmn.o: ../../src/common/gridcmn.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_hyperlnkcmn.o: ../../src/common/hyperlnkcmn.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_odcombocmn.o: ../../src/common/odcombocmn.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_richtooltipcmn.o: ../../src/common/richtooltipcmn.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_aboutdlgg.o: ../../src/generic/aboutdlgg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_bannerwindow.o: ../../src/generic/bannerwindow.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_bmpcboxg.o: ../../src/generic/bmpcboxg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_calctrlg.o: ../../src/generic/calctrlg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_commandlinkbuttong.o: ../../src/generic/commandlinkbuttong.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_datavgen.o: ../../src/generic/datavgen.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_datectlg.o: ../../src/generic/datectlg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_editlbox.o: ../../src/generic/editlbox.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_grid.o: ../../src/generic/grid.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_gridctrl.o: ../../src/generic/gridctrl.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_grideditors.o: ../../src/generic/grideditors.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_gridsel.o: ../../src/generic/gridsel.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_helpext.o: ../../src/generic/helpext.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_hyperlinkg.o: ../../src/generic/hyperlinkg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_laywin.o: ../../src/generic/laywin.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_notifmsgg.o: ../../src/generic/notifmsgg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_odcombo.o: ../../src/generic/odcombo.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_propdlg.o: ../../src/generic/propdlg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_richtooltipg.o: ../../src/generic/richtooltipg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_sashwin.o: ../../src/generic/sashwin.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_splash.o: ../../src/generic/splash.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_timectrlg.o: ../../src/generic/timectrlg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_tipdlg.o: ../../src/generic/tipdlg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_treelist.o: ../../src/generic/treelist.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_wizard.o: ../../src/generic/wizard.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_taskbarcmn.o: ../../src/common/taskbarcmn.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_aboutdlg.o: ../../src/msw/aboutdlg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_notifmsg.o: ../../src/msw/notifmsg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_richtooltip.o: ../../src/msw/richtooltip.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_sound.o: ../../src/msw/sound.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_taskbar.o: ../../src/msw/taskbar.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_joystick.o: ../../src/msw/joystick.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\advlib_animateg.o: ../../src/generic/animateg.cpp + $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\mediadll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(MEDIADLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\mediadll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_MEDIA + +$(OBJS)\mediadll_mediactrlcmn.o: ../../src/common/mediactrlcmn.cpp + $(CXX) -c -o $@ $(MEDIADLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\mediadll_mediactrl_am.o: ../../src/msw/mediactrl_am.cpp + $(CXX) -c -o $@ $(MEDIADLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\mediadll_mediactrl_wmp10.o: ../../src/msw/mediactrl_wmp10.cpp + $(CXX) -c -o $@ $(MEDIADLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\mediadll_mediactrl_qt.o: ../../src/msw/mediactrl_qt.cpp + $(CXX) -c -o $@ $(MEDIADLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\medialib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(MEDIALIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\medialib_mediactrlcmn.o: ../../src/common/mediactrlcmn.cpp + $(CXX) -c -o $@ $(MEDIALIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\medialib_mediactrl_am.o: ../../src/msw/mediactrl_am.cpp + $(CXX) -c -o $@ $(MEDIALIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\medialib_mediactrl_wmp10.o: ../../src/msw/mediactrl_wmp10.cpp + $(CXX) -c -o $@ $(MEDIALIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\medialib_mediactrl_qt.o: ../../src/msw/mediactrl_qt.cpp + $(CXX) -c -o $@ $(MEDIALIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_HTML + +$(OBJS)\htmldll_helpbest.o: ../../src/msw/helpbest.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_helpctrl.o: ../../src/html/helpctrl.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_helpdata.o: ../../src/html/helpdata.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_helpdlg.o: ../../src/html/helpdlg.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_helpfrm.o: ../../src/html/helpfrm.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_helpwnd.o: ../../src/html/helpwnd.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_htmlcell.o: ../../src/html/htmlcell.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_htmlfilt.o: ../../src/html/htmlfilt.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_htmlpars.o: ../../src/html/htmlpars.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_htmltag.o: ../../src/html/htmltag.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_htmlwin.o: ../../src/html/htmlwin.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_htmprint.o: ../../src/html/htmprint.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_m_dflist.o: ../../src/html/m_dflist.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_m_fonts.o: ../../src/html/m_fonts.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_m_hline.o: ../../src/html/m_hline.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_m_image.o: ../../src/html/m_image.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_m_layout.o: ../../src/html/m_layout.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_m_links.o: ../../src/html/m_links.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_m_list.o: ../../src/html/m_list.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_m_pre.o: ../../src/html/m_pre.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_m_span.o: ../../src/html/m_span.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_m_style.o: ../../src/html/m_style.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_m_tables.o: ../../src/html/m_tables.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_styleparams.o: ../../src/html/styleparams.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_winpars.o: ../../src/html/winpars.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmldll_htmllbox.o: ../../src/generic/htmllbox.cpp + $(CXX) -c -o $@ $(HTMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_helpbest.o: ../../src/msw/helpbest.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_helpctrl.o: ../../src/html/helpctrl.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_helpdata.o: ../../src/html/helpdata.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_helpdlg.o: ../../src/html/helpdlg.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_helpfrm.o: ../../src/html/helpfrm.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_helpwnd.o: ../../src/html/helpwnd.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_htmlcell.o: ../../src/html/htmlcell.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_htmlfilt.o: ../../src/html/htmlfilt.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_htmlpars.o: ../../src/html/htmlpars.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_htmltag.o: ../../src/html/htmltag.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_htmlwin.o: ../../src/html/htmlwin.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_htmprint.o: ../../src/html/htmprint.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_m_dflist.o: ../../src/html/m_dflist.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_m_fonts.o: ../../src/html/m_fonts.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_m_hline.o: ../../src/html/m_hline.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_m_image.o: ../../src/html/m_image.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_m_layout.o: ../../src/html/m_layout.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_m_links.o: ../../src/html/m_links.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_m_list.o: ../../src/html/m_list.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_m_pre.o: ../../src/html/m_pre.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_m_span.o: ../../src/html/m_span.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_m_style.o: ../../src/html/m_style.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_m_tables.o: ../../src/html/m_tables.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_styleparams.o: ../../src/html/styleparams.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_winpars.o: ../../src/html/winpars.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\htmllib_htmllbox.o: ../../src/generic/htmllbox.cpp + $(CXX) -c -o $@ $(HTMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\webviewdll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\webviewdll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_WEBVIEW + +$(OBJS)\webviewdll_webview_ie.o: ../../src/msw/webview_ie.cpp + $(CXX) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\webviewdll_webview.o: ../../src/common/webview.cpp + $(CXX) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\webviewdll_webviewarchivehandler.o: ../../src/common/webviewarchivehandler.cpp + $(CXX) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\webviewdll_webviewfshandler.o: ../../src/common/webviewfshandler.cpp + $(CXX) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\webviewlib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\webviewlib_webview_ie.o: ../../src/msw/webview_ie.cpp + $(CXX) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\webviewlib_webview.o: ../../src/common/webview.cpp + $(CXX) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\webviewlib_webviewarchivehandler.o: ../../src/common/webviewarchivehandler.cpp + $(CXX) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\webviewlib_webviewfshandler.o: ../../src/common/webviewfshandler.cpp + $(CXX) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\qadll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(QADLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\qadll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_QA + +$(OBJS)\qadll_debugrpt.o: ../../src/common/debugrpt.cpp + $(CXX) -c -o $@ $(QADLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\qadll_dbgrptg.o: ../../src/generic/dbgrptg.cpp + $(CXX) -c -o $@ $(QADLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\qalib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(QALIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\qalib_debugrpt.o: ../../src/common/debugrpt.cpp + $(CXX) -c -o $@ $(QALIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\qalib_dbgrptg.o: ../../src/generic/dbgrptg.cpp + $(CXX) -c -o $@ $(QALIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xmldll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(XMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xmldll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define wxUSE_GUI=0 --define WXUSINGDLL --define WXMAKINGDLL_XML + +$(OBJS)\xmldll_xml.o: ../../src/xml/xml.cpp + $(CXX) -c -o $@ $(XMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xmldll_xtixml.o: ../../src/common/xtixml.cpp + $(CXX) -c -o $@ $(XMLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xmllib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(XMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xmllib_xml.o: ../../src/xml/xml.cpp + $(CXX) -c -o $@ $(XMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xmllib_xtixml.o: ../../src/common/xtixml.cpp + $(CXX) -c -o $@ $(XMLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_XRC + +$(OBJS)\xrcdll_xh_animatctrl.o: ../../src/xrc/xh_animatctrl.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_bannerwindow.o: ../../src/xrc/xh_bannerwindow.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_bmp.o: ../../src/xrc/xh_bmp.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_bmpcbox.o: ../../src/xrc/xh_bmpcbox.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_bmpbt.o: ../../src/xrc/xh_bmpbt.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_bttn.o: ../../src/xrc/xh_bttn.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_cald.o: ../../src/xrc/xh_cald.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_chckb.o: ../../src/xrc/xh_chckb.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_chckl.o: ../../src/xrc/xh_chckl.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_choic.o: ../../src/xrc/xh_choic.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_choicbk.o: ../../src/xrc/xh_choicbk.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_clrpicker.o: ../../src/xrc/xh_clrpicker.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_cmdlinkbn.o: ../../src/xrc/xh_cmdlinkbn.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_collpane.o: ../../src/xrc/xh_collpane.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_combo.o: ../../src/xrc/xh_combo.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_comboctrl.o: ../../src/xrc/xh_comboctrl.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_datectrl.o: ../../src/xrc/xh_datectrl.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_dirpicker.o: ../../src/xrc/xh_dirpicker.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_dlg.o: ../../src/xrc/xh_dlg.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_editlbox.o: ../../src/xrc/xh_editlbox.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_filectrl.o: ../../src/xrc/xh_filectrl.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_filepicker.o: ../../src/xrc/xh_filepicker.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_fontpicker.o: ../../src/xrc/xh_fontpicker.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_frame.o: ../../src/xrc/xh_frame.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_gauge.o: ../../src/xrc/xh_gauge.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_gdctl.o: ../../src/xrc/xh_gdctl.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_grid.o: ../../src/xrc/xh_grid.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_html.o: ../../src/xrc/xh_html.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_hyperlink.o: ../../src/xrc/xh_hyperlink.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_listb.o: ../../src/xrc/xh_listb.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_listbk.o: ../../src/xrc/xh_listbk.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_listc.o: ../../src/xrc/xh_listc.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_mdi.o: ../../src/xrc/xh_mdi.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_menu.o: ../../src/xrc/xh_menu.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_notbk.o: ../../src/xrc/xh_notbk.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_odcombo.o: ../../src/xrc/xh_odcombo.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_panel.o: ../../src/xrc/xh_panel.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_propdlg.o: ../../src/xrc/xh_propdlg.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_radbt.o: ../../src/xrc/xh_radbt.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_radbx.o: ../../src/xrc/xh_radbx.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_scrol.o: ../../src/xrc/xh_scrol.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_scwin.o: ../../src/xrc/xh_scwin.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_htmllbox.o: ../../src/xrc/xh_htmllbox.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_sizer.o: ../../src/xrc/xh_sizer.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_slidr.o: ../../src/xrc/xh_slidr.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_spin.o: ../../src/xrc/xh_spin.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_split.o: ../../src/xrc/xh_split.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_srchctrl.o: ../../src/xrc/xh_srchctrl.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_statbar.o: ../../src/xrc/xh_statbar.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_stbmp.o: ../../src/xrc/xh_stbmp.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_stbox.o: ../../src/xrc/xh_stbox.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_stlin.o: ../../src/xrc/xh_stlin.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_sttxt.o: ../../src/xrc/xh_sttxt.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_text.o: ../../src/xrc/xh_text.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_tglbtn.o: ../../src/xrc/xh_tglbtn.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_timectrl.o: ../../src/xrc/xh_timectrl.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_toolb.o: ../../src/xrc/xh_toolb.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_toolbk.o: ../../src/xrc/xh_toolbk.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_tree.o: ../../src/xrc/xh_tree.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_treebk.o: ../../src/xrc/xh_treebk.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_unkwn.o: ../../src/xrc/xh_unkwn.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xh_wizrd.o: ../../src/xrc/xh_wizrd.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xmlres.o: ../../src/xrc/xmlres.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xmladv.o: ../../src/xrc/xmladv.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrcdll_xmlrsall.o: ../../src/xrc/xmlrsall.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_animatctrl.o: ../../src/xrc/xh_animatctrl.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_bannerwindow.o: ../../src/xrc/xh_bannerwindow.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_bmp.o: ../../src/xrc/xh_bmp.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_bmpcbox.o: ../../src/xrc/xh_bmpcbox.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_bmpbt.o: ../../src/xrc/xh_bmpbt.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_bttn.o: ../../src/xrc/xh_bttn.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_cald.o: ../../src/xrc/xh_cald.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_chckb.o: ../../src/xrc/xh_chckb.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_chckl.o: ../../src/xrc/xh_chckl.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_choic.o: ../../src/xrc/xh_choic.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_choicbk.o: ../../src/xrc/xh_choicbk.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_clrpicker.o: ../../src/xrc/xh_clrpicker.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_cmdlinkbn.o: ../../src/xrc/xh_cmdlinkbn.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_collpane.o: ../../src/xrc/xh_collpane.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_combo.o: ../../src/xrc/xh_combo.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_comboctrl.o: ../../src/xrc/xh_comboctrl.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_datectrl.o: ../../src/xrc/xh_datectrl.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_dirpicker.o: ../../src/xrc/xh_dirpicker.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_dlg.o: ../../src/xrc/xh_dlg.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_editlbox.o: ../../src/xrc/xh_editlbox.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_filectrl.o: ../../src/xrc/xh_filectrl.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_filepicker.o: ../../src/xrc/xh_filepicker.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_fontpicker.o: ../../src/xrc/xh_fontpicker.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_frame.o: ../../src/xrc/xh_frame.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_gauge.o: ../../src/xrc/xh_gauge.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_gdctl.o: ../../src/xrc/xh_gdctl.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_grid.o: ../../src/xrc/xh_grid.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_html.o: ../../src/xrc/xh_html.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_hyperlink.o: ../../src/xrc/xh_hyperlink.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_listb.o: ../../src/xrc/xh_listb.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_listbk.o: ../../src/xrc/xh_listbk.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_listc.o: ../../src/xrc/xh_listc.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_mdi.o: ../../src/xrc/xh_mdi.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_menu.o: ../../src/xrc/xh_menu.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_notbk.o: ../../src/xrc/xh_notbk.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_odcombo.o: ../../src/xrc/xh_odcombo.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_panel.o: ../../src/xrc/xh_panel.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_propdlg.o: ../../src/xrc/xh_propdlg.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_radbt.o: ../../src/xrc/xh_radbt.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_radbx.o: ../../src/xrc/xh_radbx.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_scrol.o: ../../src/xrc/xh_scrol.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_scwin.o: ../../src/xrc/xh_scwin.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_htmllbox.o: ../../src/xrc/xh_htmllbox.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_sizer.o: ../../src/xrc/xh_sizer.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_slidr.o: ../../src/xrc/xh_slidr.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_spin.o: ../../src/xrc/xh_spin.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_split.o: ../../src/xrc/xh_split.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_srchctrl.o: ../../src/xrc/xh_srchctrl.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_statbar.o: ../../src/xrc/xh_statbar.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_stbmp.o: ../../src/xrc/xh_stbmp.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_stbox.o: ../../src/xrc/xh_stbox.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_stlin.o: ../../src/xrc/xh_stlin.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_sttxt.o: ../../src/xrc/xh_sttxt.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_text.o: ../../src/xrc/xh_text.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_tglbtn.o: ../../src/xrc/xh_tglbtn.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_timectrl.o: ../../src/xrc/xh_timectrl.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_toolb.o: ../../src/xrc/xh_toolb.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_toolbk.o: ../../src/xrc/xh_toolbk.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_tree.o: ../../src/xrc/xh_tree.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_treebk.o: ../../src/xrc/xh_treebk.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_unkwn.o: ../../src/xrc/xh_unkwn.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xh_wizrd.o: ../../src/xrc/xh_wizrd.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xmlres.o: ../../src/xrc/xmlres.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xmladv.o: ../../src/xrc/xmladv.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\xrclib_xmlrsall.o: ../../src/xrc/xmlrsall.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auidll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auidll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_AUI + +$(OBJS)\auidll_framemanager.o: ../../src/aui/framemanager.cpp + $(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auidll_dockart.o: ../../src/aui/dockart.cpp + $(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auidll_floatpane.o: ../../src/aui/floatpane.cpp + $(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auidll_auibook.o: ../../src/aui/auibook.cpp + $(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auidll_auibar.o: ../../src/aui/auibar.cpp + $(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auidll_tabmdi.o: ../../src/aui/tabmdi.cpp + $(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auidll_tabart.o: ../../src/aui/tabart.cpp + $(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auidll_xh_auinotbk.o: ../../src/xrc/xh_auinotbk.cpp + $(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auilib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auilib_framemanager.o: ../../src/aui/framemanager.cpp + $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auilib_dockart.o: ../../src/aui/dockart.cpp + $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auilib_floatpane.o: ../../src/aui/floatpane.cpp + $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auilib_auibook.o: ../../src/aui/auibook.cpp + $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auilib_auibar.o: ../../src/aui/auibar.cpp + $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auilib_tabmdi.o: ../../src/aui/tabmdi.cpp + $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auilib_tabart.o: ../../src/aui/tabart.cpp + $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\auilib_xh_auinotbk.o: ../../src/xrc/xh_auinotbk.cpp + $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_RIBBON + +$(OBJS)\ribbondll_art_internal.o: ../../src/ribbon/art_internal.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_art_msw.o: ../../src/ribbon/art_msw.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_art_aui.o: ../../src/ribbon/art_aui.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_bar.o: ../../src/ribbon/bar.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_buttonbar.o: ../../src/ribbon/buttonbar.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_control.o: ../../src/ribbon/control.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_gallery.o: ../../src/ribbon/gallery.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_page.o: ../../src/ribbon/page.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_panel.o: ../../src/ribbon/panel.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_toolbar.o: ../../src/ribbon/toolbar.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbondll_xh_ribbon.o: ../../src/xrc/xh_ribbon.cpp + $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_art_internal.o: ../../src/ribbon/art_internal.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_art_msw.o: ../../src/ribbon/art_msw.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_art_aui.o: ../../src/ribbon/art_aui.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_bar.o: ../../src/ribbon/bar.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_buttonbar.o: ../../src/ribbon/buttonbar.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_control.o: ../../src/ribbon/control.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_gallery.o: ../../src/ribbon/gallery.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_page.o: ../../src/ribbon/page.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_panel.o: ../../src/ribbon/panel.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_toolbar.o: ../../src/ribbon/toolbar.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\ribbonlib_xh_ribbon.o: ../../src/xrc/xh_ribbon.cpp + $(CXX) -c -o $@ $(RIBBONLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgriddll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(PROPGRIDDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgriddll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_PROPGRID + +$(OBJS)\propgriddll_advprops.o: ../../src/propgrid/advprops.cpp + $(CXX) -c -o $@ $(PROPGRIDDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgriddll_editors.o: ../../src/propgrid/editors.cpp + $(CXX) -c -o $@ $(PROPGRIDDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgriddll_manager.o: ../../src/propgrid/manager.cpp + $(CXX) -c -o $@ $(PROPGRIDDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgriddll_property.o: ../../src/propgrid/property.cpp + $(CXX) -c -o $@ $(PROPGRIDDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgriddll_propgrid.o: ../../src/propgrid/propgrid.cpp + $(CXX) -c -o $@ $(PROPGRIDDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgriddll_propgridiface.o: ../../src/propgrid/propgridiface.cpp + $(CXX) -c -o $@ $(PROPGRIDDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgriddll_propgridpagestate.o: ../../src/propgrid/propgridpagestate.cpp + $(CXX) -c -o $@ $(PROPGRIDDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgriddll_props.o: ../../src/propgrid/props.cpp + $(CXX) -c -o $@ $(PROPGRIDDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgridlib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(PROPGRIDLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgridlib_advprops.o: ../../src/propgrid/advprops.cpp + $(CXX) -c -o $@ $(PROPGRIDLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgridlib_editors.o: ../../src/propgrid/editors.cpp + $(CXX) -c -o $@ $(PROPGRIDLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgridlib_manager.o: ../../src/propgrid/manager.cpp + $(CXX) -c -o $@ $(PROPGRIDLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgridlib_property.o: ../../src/propgrid/property.cpp + $(CXX) -c -o $@ $(PROPGRIDLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgridlib_propgrid.o: ../../src/propgrid/propgrid.cpp + $(CXX) -c -o $@ $(PROPGRIDLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgridlib_propgridiface.o: ../../src/propgrid/propgridiface.cpp + $(CXX) -c -o $@ $(PROPGRIDLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgridlib_propgridpagestate.o: ../../src/propgrid/propgridpagestate.cpp + $(CXX) -c -o $@ $(PROPGRIDLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\propgridlib_props.o: ../../src/propgrid/props.cpp + $(CXX) -c -o $@ $(PROPGRIDLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_RICHTEXT + +$(OBJS)\richtextdll_richtextbuffer.o: ../../src/richtext/richtextbuffer.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_richtextctrl.o: ../../src/richtext/richtextctrl.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_richtextformatdlg.o: ../../src/richtext/richtextformatdlg.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_richtexthtml.o: ../../src/richtext/richtexthtml.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_richtextimagedlg.o: ../../src/richtext/richtextimagedlg.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_richtextprint.o: ../../src/richtext/richtextprint.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_richtextstyledlg.o: ../../src/richtext/richtextstyledlg.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_richtextstyles.o: ../../src/richtext/richtextstyles.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_richtextsymboldlg.o: ../../src/richtext/richtextsymboldlg.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_richtextxml.o: ../../src/richtext/richtextxml.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextdll_xh_richtext.o: ../../src/xrc/xh_richtext.cpp + $(CXX) -c -o $@ $(RICHTEXTDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_richtextbuffer.o: ../../src/richtext/richtextbuffer.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_richtextctrl.o: ../../src/richtext/richtextctrl.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_richtextformatdlg.o: ../../src/richtext/richtextformatdlg.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_richtexthtml.o: ../../src/richtext/richtexthtml.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_richtextimagedlg.o: ../../src/richtext/richtextimagedlg.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_richtextprint.o: ../../src/richtext/richtextprint.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_richtextstyledlg.o: ../../src/richtext/richtextstyledlg.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_richtextstyles.o: ../../src/richtext/richtextstyles.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_richtextsymboldlg.o: ../../src/richtext/richtextsymboldlg.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_richtextxml.o: ../../src/richtext/richtextxml.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\richtextlib_xh_richtext.o: ../../src/xrc/xh_richtext.cpp + $(CXX) -c -o $@ $(RICHTEXTLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\stcdll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(STCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\stcdll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --include-dir ../../src/stc/scintilla/include --include-dir ../../src/stc/scintilla/lexlib --include-dir ../../src/stc/scintilla/src --define __WX__ --define SCI_LEXER --define LINK_LEXERS --define WXUSINGDLL --define WXMAKINGDLL_STC + +$(OBJS)\stcdll_stc.o: ../../src/stc/stc.cpp + $(CXX) -c -o $@ $(STCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\stcdll_PlatWX.o: ../../src/stc/PlatWX.cpp + $(CXX) -c -o $@ $(STCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\stcdll_ScintillaWX.o: ../../src/stc/ScintillaWX.cpp + $(CXX) -c -o $@ $(STCDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\stclib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(STCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\stclib_stc.o: ../../src/stc/stc.cpp + $(CXX) -c -o $@ $(STCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\stclib_PlatWX.o: ../../src/stc/PlatWX.cpp + $(CXX) -c -o $@ $(STCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\stclib_ScintillaWX.o: ../../src/stc/ScintillaWX.cpp + $(CXX) -c -o $@ $(STCLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\gldll_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(GLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\gldll_version_rc.o: ../../src/msw/version.rc + $(WINDRES) -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) --include-dir $(SETUPHDIR) --include-dir ../../include $(__CAIRO_INCLUDEDIR_p) --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_GL + +$(OBJS)\gldll_glcmn.o: ../../src/common/glcmn.cpp + $(CXX) -c -o $@ $(GLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\gldll_glcanvas.o: ../../src/msw/glcanvas.cpp + $(CXX) -c -o $@ $(GLDLL_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\gllib_dummy.o: ../../src/common/dummy.cpp + $(CXX) -c -o $@ $(GLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\gllib_glcmn.o: ../../src/common/glcmn.cpp + $(CXX) -c -o $@ $(GLLIB_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\gllib_glcanvas.o: ../../src/msw/glcanvas.cpp + $(CXX) -c -o $@ $(GLLIB_CXXFLAGS) $(CPPDEPS) $< + +.PHONY: all clean setup_h wxbase wxnet wxcore wxadv wxmedia wxhtml wxwebview wxqa \ + wxxml wxxrc wxaui wxribbon wxpropgrid wxrichtext wxstc wxgl samples \ + build_cfg_file + + +SHELL := $(COMSPEC) + +# Dependencies tracking: +-include $(OBJS)/*.d diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.vc b/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.vc new file mode 100644 index 0000000000..0ce50ebcf5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.vc @@ -0,0 +1,16825 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.2.9 (http://www.bakefile.org) +# Do not modify, all changes will be overwritten! +# ========================================================================= + +!include + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +### Variables: ### + +MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CPP="$(CPP)" SHARED="$(SHARED)" \ + TOOLKIT_VERSION="$(TOOLKIT_VERSION)" WXUNIV="$(WXUNIV)" \ + UNICODE="$(UNICODE)" MSLU="$(MSLU)" BUILD="$(BUILD)" \ + TARGET_CPU="$(TARGET_CPU)" DEBUG_INFO="$(DEBUG_INFO)" \ + DEBUG_FLAG="$(DEBUG_FLAG)" DEBUG_RUNTIME_LIBS="$(DEBUG_RUNTIME_LIBS)" \ + MONOLITHIC="$(MONOLITHIC)" USE_GUI="$(USE_GUI)" USE_HTML="$(USE_HTML)" \ + USE_WEBVIEW="$(USE_WEBVIEW)" USE_MEDIA="$(USE_MEDIA)" USE_XRC="$(USE_XRC)" \ + USE_AUI="$(USE_AUI)" USE_RIBBON="$(USE_RIBBON)" \ + USE_PROPGRID="$(USE_PROPGRID)" USE_RICHTEXT="$(USE_RICHTEXT)" \ + USE_STC="$(USE_STC)" USE_OPENGL="$(USE_OPENGL)" USE_QA="$(USE_QA)" \ + USE_EXCEPTIONS="$(USE_EXCEPTIONS)" USE_RTTI="$(USE_RTTI)" \ + USE_THREADS="$(USE_THREADS)" USE_CAIRO="$(USE_CAIRO)" \ + OFFICIAL_BUILD="$(OFFICIAL_BUILD)" VENDOR="$(VENDOR)" \ + WX_FLAVOUR="$(WX_FLAVOUR)" WX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" CFG="$(CFG)" \ + CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \ + RUNTIME_LIBS="$(RUNTIME_LIBS)" +WX_RELEASE_NODOT = 30 +COMPILER_PREFIX = vc +OBJS = \ + $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)$(ARCH_SUFFIX) +LIBDIRNAME = \ + ..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(LIBTYPE_SUFFIX)$(CFG) +SETUPHDIR = \ + $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) +WXREGEX_CFLAGS = /M$(__RUNTIME_LIBS_10)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) /Fd$(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I..\..\include \ + /I$(SETUPHDIR) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(CPPFLAGS) $(CFLAGS) +WXREGEX_OBJECTS = \ + $(OBJS)\wxregex_regcomp.obj \ + $(OBJS)\wxregex_regexec.obj \ + $(OBJS)\wxregex_regerror.obj \ + $(OBJS)\wxregex_regfree.obj +WXZLIB_CFLAGS = /M$(__RUNTIME_LIBS_25)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ + $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS \ + /D_CRT_NONSTDC_NO_WARNINGS $(CPPFLAGS) $(CFLAGS) +WXZLIB_OBJECTS = \ + $(OBJS)\wxzlib_adler32.obj \ + $(OBJS)\wxzlib_compress.obj \ + $(OBJS)\wxzlib_crc32.obj \ + $(OBJS)\wxzlib_deflate.obj \ + $(OBJS)\wxzlib_gzclose.obj \ + $(OBJS)\wxzlib_gzlib.obj \ + $(OBJS)\wxzlib_gzread.obj \ + $(OBJS)\wxzlib_gzwrite.obj \ + $(OBJS)\wxzlib_infback.obj \ + $(OBJS)\wxzlib_inffast.obj \ + $(OBJS)\wxzlib_inflate.obj \ + $(OBJS)\wxzlib_inftrees.obj \ + $(OBJS)\wxzlib_trees.obj \ + $(OBJS)\wxzlib_uncompr.obj \ + $(OBJS)\wxzlib_zutil.obj +WXPNG_CFLAGS = /M$(__RUNTIME_LIBS_40)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ + $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I..\..\src\zlib \ + $(CPPFLAGS) $(CFLAGS) +WXPNG_OBJECTS = \ + $(OBJS)\wxpng_png.obj \ + $(OBJS)\wxpng_pngerror.obj \ + $(OBJS)\wxpng_pngget.obj \ + $(OBJS)\wxpng_pngmem.obj \ + $(OBJS)\wxpng_pngpread.obj \ + $(OBJS)\wxpng_pngread.obj \ + $(OBJS)\wxpng_pngrio.obj \ + $(OBJS)\wxpng_pngrtran.obj \ + $(OBJS)\wxpng_pngrutil.obj \ + $(OBJS)\wxpng_pngset.obj \ + $(OBJS)\wxpng_pngtrans.obj \ + $(OBJS)\wxpng_pngwio.obj \ + $(OBJS)\wxpng_pngwrite.obj \ + $(OBJS)\wxpng_pngwtran.obj \ + $(OBJS)\wxpng_pngwutil.obj +WXJPEG_CFLAGS = /M$(__RUNTIME_LIBS_55)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ + $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I$(SETUPHDIR) \ + $(CPPFLAGS) $(CFLAGS) +WXJPEG_OBJECTS = \ + $(OBJS)\wxjpeg_jcomapi.obj \ + $(OBJS)\wxjpeg_jutils.obj \ + $(OBJS)\wxjpeg_jerror.obj \ + $(OBJS)\wxjpeg_jmemmgr.obj \ + $(OBJS)\wxjpeg_jmemnobs.obj \ + $(OBJS)\wxjpeg_jcapimin.obj \ + $(OBJS)\wxjpeg_jcapistd.obj \ + $(OBJS)\wxjpeg_jctrans.obj \ + $(OBJS)\wxjpeg_jcparam.obj \ + $(OBJS)\wxjpeg_jdatadst.obj \ + $(OBJS)\wxjpeg_jcinit.obj \ + $(OBJS)\wxjpeg_jcmaster.obj \ + $(OBJS)\wxjpeg_jcmarker.obj \ + $(OBJS)\wxjpeg_jcmainct.obj \ + $(OBJS)\wxjpeg_jcprepct.obj \ + $(OBJS)\wxjpeg_jccoefct.obj \ + $(OBJS)\wxjpeg_jccolor.obj \ + $(OBJS)\wxjpeg_jcsample.obj \ + $(OBJS)\wxjpeg_jchuff.obj \ + $(OBJS)\wxjpeg_jcphuff.obj \ + $(OBJS)\wxjpeg_jcdctmgr.obj \ + $(OBJS)\wxjpeg_jfdctfst.obj \ + $(OBJS)\wxjpeg_jfdctflt.obj \ + $(OBJS)\wxjpeg_jfdctint.obj \ + $(OBJS)\wxjpeg_jdapimin.obj \ + $(OBJS)\wxjpeg_jdapistd.obj \ + $(OBJS)\wxjpeg_jdtrans.obj \ + $(OBJS)\wxjpeg_jdatasrc.obj \ + $(OBJS)\wxjpeg_jdmaster.obj \ + $(OBJS)\wxjpeg_jdinput.obj \ + $(OBJS)\wxjpeg_jdmarker.obj \ + $(OBJS)\wxjpeg_jdhuff.obj \ + $(OBJS)\wxjpeg_jdphuff.obj \ + $(OBJS)\wxjpeg_jdmainct.obj \ + $(OBJS)\wxjpeg_jdcoefct.obj \ + $(OBJS)\wxjpeg_jdpostct.obj \ + $(OBJS)\wxjpeg_jddctmgr.obj \ + $(OBJS)\wxjpeg_jidctfst.obj \ + $(OBJS)\wxjpeg_jidctflt.obj \ + $(OBJS)\wxjpeg_jidctint.obj \ + $(OBJS)\wxjpeg_jidctred.obj \ + $(OBJS)\wxjpeg_jdsample.obj \ + $(OBJS)\wxjpeg_jdcolor.obj \ + $(OBJS)\wxjpeg_jquant1.obj \ + $(OBJS)\wxjpeg_jquant2.obj \ + $(OBJS)\wxjpeg_jdmerge.obj +WXTIFF_CFLAGS = /M$(__RUNTIME_LIBS_70)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ + $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I..\..\src\zlib \ + /I..\..\src\jpeg /I..\..\src\tiff\libtiff /D_CRT_NONSTDC_NO_WARNINGS \ + $(CPPFLAGS) $(CFLAGS) +WXTIFF_OBJECTS = \ + $(OBJS)\wxtiff_tif_win32.obj \ + $(OBJS)\wxtiff_tif_aux.obj \ + $(OBJS)\wxtiff_tif_close.obj \ + $(OBJS)\wxtiff_tif_codec.obj \ + $(OBJS)\wxtiff_tif_color.obj \ + $(OBJS)\wxtiff_tif_compress.obj \ + $(OBJS)\wxtiff_tif_dir.obj \ + $(OBJS)\wxtiff_tif_dirinfo.obj \ + $(OBJS)\wxtiff_tif_dirread.obj \ + $(OBJS)\wxtiff_tif_dirwrite.obj \ + $(OBJS)\wxtiff_tif_dumpmode.obj \ + $(OBJS)\wxtiff_tif_error.obj \ + $(OBJS)\wxtiff_tif_extension.obj \ + $(OBJS)\wxtiff_tif_fax3.obj \ + $(OBJS)\wxtiff_tif_fax3sm.obj \ + $(OBJS)\wxtiff_tif_flush.obj \ + $(OBJS)\wxtiff_tif_getimage.obj \ + $(OBJS)\wxtiff_tif_jbig.obj \ + $(OBJS)\wxtiff_tif_jpeg.obj \ + $(OBJS)\wxtiff_tif_jpeg_12.obj \ + $(OBJS)\wxtiff_tif_luv.obj \ + $(OBJS)\wxtiff_tif_lzma.obj \ + $(OBJS)\wxtiff_tif_lzw.obj \ + $(OBJS)\wxtiff_tif_next.obj \ + $(OBJS)\wxtiff_tif_ojpeg.obj \ + $(OBJS)\wxtiff_tif_open.obj \ + $(OBJS)\wxtiff_tif_packbits.obj \ + $(OBJS)\wxtiff_tif_pixarlog.obj \ + $(OBJS)\wxtiff_tif_predict.obj \ + $(OBJS)\wxtiff_tif_print.obj \ + $(OBJS)\wxtiff_tif_read.obj \ + $(OBJS)\wxtiff_tif_strip.obj \ + $(OBJS)\wxtiff_tif_swab.obj \ + $(OBJS)\wxtiff_tif_thunder.obj \ + $(OBJS)\wxtiff_tif_tile.obj \ + $(OBJS)\wxtiff_tif_version.obj \ + $(OBJS)\wxtiff_tif_warning.obj \ + $(OBJS)\wxtiff_tif_write.obj \ + $(OBJS)\wxtiff_tif_zip.obj +WXEXPAT_CFLAGS = /M$(__RUNTIME_LIBS_85)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) /Fd$(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I$(LIBDIRNAME) \ + /DCOMPILED_FROM_DSP $(CPPFLAGS) $(CFLAGS) +WXEXPAT_OBJECTS = \ + $(OBJS)\wxexpat_xmlparse.obj \ + $(OBJS)\wxexpat_xmlrole.obj \ + $(OBJS)\wxexpat_xmltok.obj +WXSCINTILLA_CXXFLAGS = /M$(__RUNTIME_LIBS_100)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) /Fd$(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS \ + /I..\..\src\stc\scintilla\include /I..\..\src\stc\scintilla\lexlib \ + /I..\..\src\stc\scintilla\src /D__WX__ /DSCI_LEXER /DLINK_LEXERS \ + /I$(SETUPHDIR) /I..\..\include $(__wxscintilla_usingdll_p) /D__WXMSW__ \ + $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +WXSCINTILLA_OBJECTS = \ + $(OBJS)\wxscintilla_LexA68k.obj \ + $(OBJS)\wxscintilla_LexAbaqus.obj \ + $(OBJS)\wxscintilla_LexAda.obj \ + $(OBJS)\wxscintilla_LexAPDL.obj \ + $(OBJS)\wxscintilla_LexAsm.obj \ + $(OBJS)\wxscintilla_LexAsn1.obj \ + $(OBJS)\wxscintilla_LexASY.obj \ + $(OBJS)\wxscintilla_LexAU3.obj \ + $(OBJS)\wxscintilla_LexAVE.obj \ + $(OBJS)\wxscintilla_LexAVS.obj \ + $(OBJS)\wxscintilla_LexBaan.obj \ + $(OBJS)\wxscintilla_LexBash.obj \ + $(OBJS)\wxscintilla_LexBasic.obj \ + $(OBJS)\wxscintilla_LexBullant.obj \ + $(OBJS)\wxscintilla_LexCaml.obj \ + $(OBJS)\wxscintilla_LexCLW.obj \ + $(OBJS)\wxscintilla_LexCmake.obj \ + $(OBJS)\wxscintilla_LexCOBOL.obj \ + $(OBJS)\wxscintilla_LexCoffeeScript.obj \ + $(OBJS)\wxscintilla_LexConf.obj \ + $(OBJS)\wxscintilla_LexCPP.obj \ + $(OBJS)\wxscintilla_LexCrontab.obj \ + $(OBJS)\wxscintilla_LexCsound.obj \ + $(OBJS)\wxscintilla_LexCSS.obj \ + $(OBJS)\wxscintilla_LexD.obj \ + $(OBJS)\wxscintilla_LexECL.obj \ + $(OBJS)\wxscintilla_LexEiffel.obj \ + $(OBJS)\wxscintilla_LexErlang.obj \ + $(OBJS)\wxscintilla_LexEScript.obj \ + $(OBJS)\wxscintilla_LexFlagship.obj \ + $(OBJS)\wxscintilla_LexForth.obj \ + $(OBJS)\wxscintilla_LexFortran.obj \ + $(OBJS)\wxscintilla_LexGAP.obj \ + $(OBJS)\wxscintilla_LexGui4Cli.obj \ + $(OBJS)\wxscintilla_LexHaskell.obj \ + $(OBJS)\wxscintilla_LexHTML.obj \ + $(OBJS)\wxscintilla_LexInno.obj \ + $(OBJS)\wxscintilla_LexKix.obj \ + $(OBJS)\wxscintilla_LexLisp.obj \ + $(OBJS)\wxscintilla_LexLout.obj \ + $(OBJS)\wxscintilla_LexLua.obj \ + $(OBJS)\wxscintilla_LexMagik.obj \ + $(OBJS)\wxscintilla_LexMarkdown.obj \ + $(OBJS)\wxscintilla_LexMatlab.obj \ + $(OBJS)\wxscintilla_LexMetapost.obj \ + $(OBJS)\wxscintilla_LexMMIXAL.obj \ + $(OBJS)\wxscintilla_LexModula.obj \ + $(OBJS)\wxscintilla_LexMPT.obj \ + $(OBJS)\wxscintilla_LexMSSQL.obj \ + $(OBJS)\wxscintilla_LexMySQL.obj \ + $(OBJS)\wxscintilla_LexNimrod.obj \ + $(OBJS)\wxscintilla_LexNsis.obj \ + $(OBJS)\wxscintilla_LexOpal.obj \ + $(OBJS)\wxscintilla_LexOScript.obj \ + $(OBJS)\wxscintilla_LexOthers.obj \ + $(OBJS)\wxscintilla_LexPascal.obj \ + $(OBJS)\wxscintilla_LexPB.obj \ + $(OBJS)\wxscintilla_LexPerl.obj \ + $(OBJS)\wxscintilla_LexPLM.obj \ + $(OBJS)\wxscintilla_LexPOV.obj \ + $(OBJS)\wxscintilla_LexPowerPro.obj \ + $(OBJS)\wxscintilla_LexPowerShell.obj \ + $(OBJS)\wxscintilla_LexProgress.obj \ + $(OBJS)\wxscintilla_LexPS.obj \ + $(OBJS)\wxscintilla_LexPython.obj \ + $(OBJS)\wxscintilla_LexR.obj \ + $(OBJS)\wxscintilla_LexRebol.obj \ + $(OBJS)\wxscintilla_LexRuby.obj \ + $(OBJS)\wxscintilla_LexScriptol.obj \ + $(OBJS)\wxscintilla_LexSmalltalk.obj \ + $(OBJS)\wxscintilla_LexSML.obj \ + $(OBJS)\wxscintilla_LexSorcus.obj \ + $(OBJS)\wxscintilla_LexSpecman.obj \ + $(OBJS)\wxscintilla_LexSpice.obj \ + $(OBJS)\wxscintilla_LexSQL.obj \ + $(OBJS)\wxscintilla_LexTACL.obj \ + $(OBJS)\wxscintilla_LexTADS3.obj \ + $(OBJS)\wxscintilla_LexTAL.obj \ + $(OBJS)\wxscintilla_LexTCL.obj \ + $(OBJS)\wxscintilla_LexTCMD.obj \ + $(OBJS)\wxscintilla_LexTeX.obj \ + $(OBJS)\wxscintilla_LexTxt2tags.obj \ + $(OBJS)\wxscintilla_LexVB.obj \ + $(OBJS)\wxscintilla_LexVerilog.obj \ + $(OBJS)\wxscintilla_LexVHDL.obj \ + $(OBJS)\wxscintilla_LexVisualProlog.obj \ + $(OBJS)\wxscintilla_LexYAML.obj \ + $(OBJS)\wxscintilla_Accessor.obj \ + $(OBJS)\wxscintilla_CharacterSet.obj \ + $(OBJS)\wxscintilla_LexerBase.obj \ + $(OBJS)\wxscintilla_LexerModule.obj \ + $(OBJS)\wxscintilla_LexerNoExceptions.obj \ + $(OBJS)\wxscintilla_LexerSimple.obj \ + $(OBJS)\wxscintilla_PropSetSimple.obj \ + $(OBJS)\wxscintilla_StyleContext.obj \ + $(OBJS)\wxscintilla_WordList.obj \ + $(OBJS)\wxscintilla_AutoComplete.obj \ + $(OBJS)\wxscintilla_CallTip.obj \ + $(OBJS)\wxscintilla_Catalogue.obj \ + $(OBJS)\wxscintilla_CellBuffer.obj \ + $(OBJS)\wxscintilla_CharClassify.obj \ + $(OBJS)\wxscintilla_ContractionState.obj \ + $(OBJS)\wxscintilla_Decoration.obj \ + $(OBJS)\wxscintilla_Document.obj \ + $(OBJS)\wxscintilla_Editor.obj \ + $(OBJS)\wxscintilla_ExternalLexer.obj \ + $(OBJS)\wxscintilla_Indicator.obj \ + $(OBJS)\wxscintilla_KeyMap.obj \ + $(OBJS)\wxscintilla_LineMarker.obj \ + $(OBJS)\wxscintilla_PerLine.obj \ + $(OBJS)\wxscintilla_PositionCache.obj \ + $(OBJS)\wxscintilla_RESearch.obj \ + $(OBJS)\wxscintilla_RunStyles.obj \ + $(OBJS)\wxscintilla_ScintillaBase.obj \ + $(OBJS)\wxscintilla_Selection.obj \ + $(OBJS)\wxscintilla_Style.obj \ + $(OBJS)\wxscintilla_UniConversion.obj \ + $(OBJS)\wxscintilla_ViewStyle.obj \ + $(OBJS)\wxscintilla_XPM.obj +MONODLL_CFLAGS = /M$(__RUNTIME_LIBS_116)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib \ + /I..\..\src\stc\scintilla\include /I..\..\src\stc\scintilla\lexlib \ + /I..\..\src\stc\scintilla\src /D__WX__ /DSCI_LEXER /DLINK_LEXERS \ + /DwxUSE_BASE=1 /DWXMAKINGDLL $(CPPFLAGS) $(CFLAGS) +MONODLL_CXXFLAGS = /M$(__RUNTIME_LIBS_116)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib \ + /I..\..\src\stc\scintilla\include /I..\..\src\stc\scintilla\lexlib \ + /I..\..\src\stc\scintilla\src /D__WX__ /DSCI_LEXER /DLINK_LEXERS \ + /DwxUSE_BASE=1 /DWXMAKINGDLL $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_monodll.pch" $(CPPFLAGS) $(CXXFLAGS) +MONODLL_OBJECTS = \ + $(OBJS)\monodll_dummy.obj \ + $(OBJS)\monodll_any.obj \ + $(OBJS)\monodll_appbase.obj \ + $(OBJS)\monodll_arcall.obj \ + $(OBJS)\monodll_arcfind.obj \ + $(OBJS)\monodll_archive.obj \ + $(OBJS)\monodll_arrstr.obj \ + $(OBJS)\monodll_base64.obj \ + $(OBJS)\monodll_clntdata.obj \ + $(OBJS)\monodll_cmdline.obj \ + $(OBJS)\monodll_config.obj \ + $(OBJS)\monodll_convauto.obj \ + $(OBJS)\monodll_datetime.obj \ + $(OBJS)\monodll_datetimefmt.obj \ + $(OBJS)\monodll_datstrm.obj \ + $(OBJS)\monodll_dircmn.obj \ + $(OBJS)\monodll_dynarray.obj \ + $(OBJS)\monodll_dynlib.obj \ + $(OBJS)\monodll_dynload.obj \ + $(OBJS)\monodll_encconv.obj \ + $(OBJS)\monodll_evtloopcmn.obj \ + $(OBJS)\monodll_extended.obj \ + $(OBJS)\monodll_ffile.obj \ + $(OBJS)\monodll_file.obj \ + $(OBJS)\monodll_fileback.obj \ + $(OBJS)\monodll_fileconf.obj \ + $(OBJS)\monodll_filefn.obj \ + $(OBJS)\monodll_filename.obj \ + $(OBJS)\monodll_filesys.obj \ + $(OBJS)\monodll_filtall.obj \ + $(OBJS)\monodll_filtfind.obj \ + $(OBJS)\monodll_fmapbase.obj \ + $(OBJS)\monodll_fs_arc.obj \ + $(OBJS)\monodll_fs_filter.obj \ + $(OBJS)\monodll_hash.obj \ + $(OBJS)\monodll_hashmap.obj \ + $(OBJS)\monodll_init.obj \ + $(OBJS)\monodll_intl.obj \ + $(OBJS)\monodll_ipcbase.obj \ + $(OBJS)\monodll_languageinfo.obj \ + $(OBJS)\monodll_list.obj \ + $(OBJS)\monodll_log.obj \ + $(OBJS)\monodll_longlong.obj \ + $(OBJS)\monodll_memory.obj \ + $(OBJS)\monodll_mimecmn.obj \ + $(OBJS)\monodll_module.obj \ + $(OBJS)\monodll_mstream.obj \ + $(OBJS)\monodll_numformatter.obj \ + $(OBJS)\monodll_object.obj \ + $(OBJS)\monodll_platinfo.obj \ + $(OBJS)\monodll_powercmn.obj \ + $(OBJS)\monodll_process.obj \ + $(OBJS)\monodll_regex.obj \ + $(OBJS)\monodll_stdpbase.obj \ + $(OBJS)\monodll_sstream.obj \ + $(OBJS)\monodll_stdstream.obj \ + $(OBJS)\monodll_stopwatch.obj \ + $(OBJS)\monodll_strconv.obj \ + $(OBJS)\monodll_stream.obj \ + $(OBJS)\monodll_string.obj \ + $(OBJS)\monodll_stringimpl.obj \ + $(OBJS)\monodll_stringops.obj \ + $(OBJS)\monodll_strvararg.obj \ + $(OBJS)\monodll_sysopt.obj \ + $(OBJS)\monodll_tarstrm.obj \ + $(OBJS)\monodll_textbuf.obj \ + $(OBJS)\monodll_textfile.obj \ + $(OBJS)\monodll_threadinfo.obj \ + $(OBJS)\monodll_time.obj \ + $(OBJS)\monodll_timercmn.obj \ + $(OBJS)\monodll_timerimpl.obj \ + $(OBJS)\monodll_tokenzr.obj \ + $(OBJS)\monodll_translation.obj \ + $(OBJS)\monodll_txtstrm.obj \ + $(OBJS)\monodll_unichar.obj \ + $(OBJS)\monodll_uri.obj \ + $(OBJS)\monodll_ustring.obj \ + $(OBJS)\monodll_variant.obj \ + $(OBJS)\monodll_wfstream.obj \ + $(OBJS)\monodll_wxcrt.obj \ + $(OBJS)\monodll_wxprintf.obj \ + $(OBJS)\monodll_xlocale.obj \ + $(OBJS)\monodll_xti.obj \ + $(OBJS)\monodll_xtistrm.obj \ + $(OBJS)\monodll_zipstrm.obj \ + $(OBJS)\monodll_zstream.obj \ + $(OBJS)\monodll_fswatchercmn.obj \ + $(OBJS)\monodll_fswatcherg.obj \ + $(OBJS)\monodll_basemsw.obj \ + $(OBJS)\monodll_crashrpt.obj \ + $(OBJS)\monodll_debughlp.obj \ + $(OBJS)\monodll_dde.obj \ + $(OBJS)\monodll_dir.obj \ + $(OBJS)\monodll_dlmsw.obj \ + $(OBJS)\monodll_evtloopconsole.obj \ + $(OBJS)\monodll_mimetype.obj \ + $(OBJS)\monodll_power.obj \ + $(OBJS)\monodll_regconf.obj \ + $(OBJS)\monodll_registry.obj \ + $(OBJS)\monodll_snglinst.obj \ + $(OBJS)\monodll_stackwalk.obj \ + $(OBJS)\monodll_stdpaths.obj \ + $(OBJS)\monodll_thread.obj \ + $(OBJS)\monodll_timer.obj \ + $(OBJS)\monodll_utils.obj \ + $(OBJS)\monodll_utilsexc.obj \ + $(OBJS)\monodll_fswatcher.obj \ + $(OBJS)\monodll_event.obj \ + $(OBJS)\monodll_fs_mem.obj \ + $(OBJS)\monodll_msgout.obj \ + $(OBJS)\monodll_utilscmn.obj \ + $(OBJS)\monodll_main.obj \ + $(OBJS)\monodll_mslu.obj \ + $(OBJS)\monodll_volume.obj \ + $(OBJS)\monodll_fs_inet.obj \ + $(OBJS)\monodll_ftp.obj \ + $(OBJS)\monodll_http.obj \ + $(OBJS)\monodll_protocol.obj \ + $(OBJS)\monodll_sckaddr.obj \ + $(OBJS)\monodll_sckfile.obj \ + $(OBJS)\monodll_sckipc.obj \ + $(OBJS)\monodll_sckstrm.obj \ + $(OBJS)\monodll_socket.obj \ + $(OBJS)\monodll_url.obj \ + $(OBJS)\monodll_sockmsw.obj \ + $(OBJS)\monodll_urlmsw.obj \ + $(____MONOLIB_GUI_SRC_FILENAMES_OBJECTS) \ + $(OBJS)\monodll_xml.obj \ + $(OBJS)\monodll_xtixml.obj +MONODLL_RESOURCES = \ + $(OBJS)\monodll_version.res +MONOLIB_CFLAGS = /M$(__RUNTIME_LIBS_131)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib \ + /I..\..\src\stc\scintilla\include /I..\..\src\stc\scintilla\lexlib \ + /I..\..\src\stc\scintilla\src /D__WX__ /DSCI_LEXER /DLINK_LEXERS \ + /DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +MONOLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_131)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib \ + /I..\..\src\stc\scintilla\include /I..\..\src\stc\scintilla\lexlib \ + /I..\..\src\stc\scintilla\src /D__WX__ /DSCI_LEXER /DLINK_LEXERS \ + /DwxUSE_BASE=1 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_monolib.pch" $(CPPFLAGS) $(CXXFLAGS) +MONOLIB_OBJECTS = \ + $(OBJS)\monolib_dummy.obj \ + $(OBJS)\monolib_any.obj \ + $(OBJS)\monolib_appbase.obj \ + $(OBJS)\monolib_arcall.obj \ + $(OBJS)\monolib_arcfind.obj \ + $(OBJS)\monolib_archive.obj \ + $(OBJS)\monolib_arrstr.obj \ + $(OBJS)\monolib_base64.obj \ + $(OBJS)\monolib_clntdata.obj \ + $(OBJS)\monolib_cmdline.obj \ + $(OBJS)\monolib_config.obj \ + $(OBJS)\monolib_convauto.obj \ + $(OBJS)\monolib_datetime.obj \ + $(OBJS)\monolib_datetimefmt.obj \ + $(OBJS)\monolib_datstrm.obj \ + $(OBJS)\monolib_dircmn.obj \ + $(OBJS)\monolib_dynarray.obj \ + $(OBJS)\monolib_dynlib.obj \ + $(OBJS)\monolib_dynload.obj \ + $(OBJS)\monolib_encconv.obj \ + $(OBJS)\monolib_evtloopcmn.obj \ + $(OBJS)\monolib_extended.obj \ + $(OBJS)\monolib_ffile.obj \ + $(OBJS)\monolib_file.obj \ + $(OBJS)\monolib_fileback.obj \ + $(OBJS)\monolib_fileconf.obj \ + $(OBJS)\monolib_filefn.obj \ + $(OBJS)\monolib_filename.obj \ + $(OBJS)\monolib_filesys.obj \ + $(OBJS)\monolib_filtall.obj \ + $(OBJS)\monolib_filtfind.obj \ + $(OBJS)\monolib_fmapbase.obj \ + $(OBJS)\monolib_fs_arc.obj \ + $(OBJS)\monolib_fs_filter.obj \ + $(OBJS)\monolib_hash.obj \ + $(OBJS)\monolib_hashmap.obj \ + $(OBJS)\monolib_init.obj \ + $(OBJS)\monolib_intl.obj \ + $(OBJS)\monolib_ipcbase.obj \ + $(OBJS)\monolib_languageinfo.obj \ + $(OBJS)\monolib_list.obj \ + $(OBJS)\monolib_log.obj \ + $(OBJS)\monolib_longlong.obj \ + $(OBJS)\monolib_memory.obj \ + $(OBJS)\monolib_mimecmn.obj \ + $(OBJS)\monolib_module.obj \ + $(OBJS)\monolib_mstream.obj \ + $(OBJS)\monolib_numformatter.obj \ + $(OBJS)\monolib_object.obj \ + $(OBJS)\monolib_platinfo.obj \ + $(OBJS)\monolib_powercmn.obj \ + $(OBJS)\monolib_process.obj \ + $(OBJS)\monolib_regex.obj \ + $(OBJS)\monolib_stdpbase.obj \ + $(OBJS)\monolib_sstream.obj \ + $(OBJS)\monolib_stdstream.obj \ + $(OBJS)\monolib_stopwatch.obj \ + $(OBJS)\monolib_strconv.obj \ + $(OBJS)\monolib_stream.obj \ + $(OBJS)\monolib_string.obj \ + $(OBJS)\monolib_stringimpl.obj \ + $(OBJS)\monolib_stringops.obj \ + $(OBJS)\monolib_strvararg.obj \ + $(OBJS)\monolib_sysopt.obj \ + $(OBJS)\monolib_tarstrm.obj \ + $(OBJS)\monolib_textbuf.obj \ + $(OBJS)\monolib_textfile.obj \ + $(OBJS)\monolib_threadinfo.obj \ + $(OBJS)\monolib_time.obj \ + $(OBJS)\monolib_timercmn.obj \ + $(OBJS)\monolib_timerimpl.obj \ + $(OBJS)\monolib_tokenzr.obj \ + $(OBJS)\monolib_translation.obj \ + $(OBJS)\monolib_txtstrm.obj \ + $(OBJS)\monolib_unichar.obj \ + $(OBJS)\monolib_uri.obj \ + $(OBJS)\monolib_ustring.obj \ + $(OBJS)\monolib_variant.obj \ + $(OBJS)\monolib_wfstream.obj \ + $(OBJS)\monolib_wxcrt.obj \ + $(OBJS)\monolib_wxprintf.obj \ + $(OBJS)\monolib_xlocale.obj \ + $(OBJS)\monolib_xti.obj \ + $(OBJS)\monolib_xtistrm.obj \ + $(OBJS)\monolib_zipstrm.obj \ + $(OBJS)\monolib_zstream.obj \ + $(OBJS)\monolib_fswatchercmn.obj \ + $(OBJS)\monolib_fswatcherg.obj \ + $(OBJS)\monolib_basemsw.obj \ + $(OBJS)\monolib_crashrpt.obj \ + $(OBJS)\monolib_debughlp.obj \ + $(OBJS)\monolib_dde.obj \ + $(OBJS)\monolib_dir.obj \ + $(OBJS)\monolib_dlmsw.obj \ + $(OBJS)\monolib_evtloopconsole.obj \ + $(OBJS)\monolib_mimetype.obj \ + $(OBJS)\monolib_power.obj \ + $(OBJS)\monolib_regconf.obj \ + $(OBJS)\monolib_registry.obj \ + $(OBJS)\monolib_snglinst.obj \ + $(OBJS)\monolib_stackwalk.obj \ + $(OBJS)\monolib_stdpaths.obj \ + $(OBJS)\monolib_thread.obj \ + $(OBJS)\monolib_timer.obj \ + $(OBJS)\monolib_utils.obj \ + $(OBJS)\monolib_utilsexc.obj \ + $(OBJS)\monolib_fswatcher.obj \ + $(OBJS)\monolib_event.obj \ + $(OBJS)\monolib_fs_mem.obj \ + $(OBJS)\monolib_msgout.obj \ + $(OBJS)\monolib_utilscmn.obj \ + $(OBJS)\monolib_main.obj \ + $(OBJS)\monolib_mslu.obj \ + $(OBJS)\monolib_volume.obj \ + $(OBJS)\monolib_fs_inet.obj \ + $(OBJS)\monolib_ftp.obj \ + $(OBJS)\monolib_http.obj \ + $(OBJS)\monolib_protocol.obj \ + $(OBJS)\monolib_sckaddr.obj \ + $(OBJS)\monolib_sckfile.obj \ + $(OBJS)\monolib_sckipc.obj \ + $(OBJS)\monolib_sckstrm.obj \ + $(OBJS)\monolib_socket.obj \ + $(OBJS)\monolib_url.obj \ + $(OBJS)\monolib_sockmsw.obj \ + $(OBJS)\monolib_urlmsw.obj \ + $(____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS) \ + $(OBJS)\monolib_xml.obj \ + $(OBJS)\monolib_xtixml.obj +BASEDLL_CFLAGS = /M$(__RUNTIME_LIBS_147)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DwxUSE_GUI=0 \ + /DWXMAKINGDLL_BASE /DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +BASEDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_147)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DwxUSE_GUI=0 \ + /DWXMAKINGDLL_BASE /DwxUSE_BASE=1 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_basedll.pch" $(CPPFLAGS) $(CXXFLAGS) +BASEDLL_OBJECTS = \ + $(OBJS)\basedll_dummy.obj \ + $(OBJS)\basedll_any.obj \ + $(OBJS)\basedll_appbase.obj \ + $(OBJS)\basedll_arcall.obj \ + $(OBJS)\basedll_arcfind.obj \ + $(OBJS)\basedll_archive.obj \ + $(OBJS)\basedll_arrstr.obj \ + $(OBJS)\basedll_base64.obj \ + $(OBJS)\basedll_clntdata.obj \ + $(OBJS)\basedll_cmdline.obj \ + $(OBJS)\basedll_config.obj \ + $(OBJS)\basedll_convauto.obj \ + $(OBJS)\basedll_datetime.obj \ + $(OBJS)\basedll_datetimefmt.obj \ + $(OBJS)\basedll_datstrm.obj \ + $(OBJS)\basedll_dircmn.obj \ + $(OBJS)\basedll_dynarray.obj \ + $(OBJS)\basedll_dynlib.obj \ + $(OBJS)\basedll_dynload.obj \ + $(OBJS)\basedll_encconv.obj \ + $(OBJS)\basedll_evtloopcmn.obj \ + $(OBJS)\basedll_extended.obj \ + $(OBJS)\basedll_ffile.obj \ + $(OBJS)\basedll_file.obj \ + $(OBJS)\basedll_fileback.obj \ + $(OBJS)\basedll_fileconf.obj \ + $(OBJS)\basedll_filefn.obj \ + $(OBJS)\basedll_filename.obj \ + $(OBJS)\basedll_filesys.obj \ + $(OBJS)\basedll_filtall.obj \ + $(OBJS)\basedll_filtfind.obj \ + $(OBJS)\basedll_fmapbase.obj \ + $(OBJS)\basedll_fs_arc.obj \ + $(OBJS)\basedll_fs_filter.obj \ + $(OBJS)\basedll_hash.obj \ + $(OBJS)\basedll_hashmap.obj \ + $(OBJS)\basedll_init.obj \ + $(OBJS)\basedll_intl.obj \ + $(OBJS)\basedll_ipcbase.obj \ + $(OBJS)\basedll_languageinfo.obj \ + $(OBJS)\basedll_list.obj \ + $(OBJS)\basedll_log.obj \ + $(OBJS)\basedll_longlong.obj \ + $(OBJS)\basedll_memory.obj \ + $(OBJS)\basedll_mimecmn.obj \ + $(OBJS)\basedll_module.obj \ + $(OBJS)\basedll_mstream.obj \ + $(OBJS)\basedll_numformatter.obj \ + $(OBJS)\basedll_object.obj \ + $(OBJS)\basedll_platinfo.obj \ + $(OBJS)\basedll_powercmn.obj \ + $(OBJS)\basedll_process.obj \ + $(OBJS)\basedll_regex.obj \ + $(OBJS)\basedll_stdpbase.obj \ + $(OBJS)\basedll_sstream.obj \ + $(OBJS)\basedll_stdstream.obj \ + $(OBJS)\basedll_stopwatch.obj \ + $(OBJS)\basedll_strconv.obj \ + $(OBJS)\basedll_stream.obj \ + $(OBJS)\basedll_string.obj \ + $(OBJS)\basedll_stringimpl.obj \ + $(OBJS)\basedll_stringops.obj \ + $(OBJS)\basedll_strvararg.obj \ + $(OBJS)\basedll_sysopt.obj \ + $(OBJS)\basedll_tarstrm.obj \ + $(OBJS)\basedll_textbuf.obj \ + $(OBJS)\basedll_textfile.obj \ + $(OBJS)\basedll_threadinfo.obj \ + $(OBJS)\basedll_time.obj \ + $(OBJS)\basedll_timercmn.obj \ + $(OBJS)\basedll_timerimpl.obj \ + $(OBJS)\basedll_tokenzr.obj \ + $(OBJS)\basedll_translation.obj \ + $(OBJS)\basedll_txtstrm.obj \ + $(OBJS)\basedll_unichar.obj \ + $(OBJS)\basedll_uri.obj \ + $(OBJS)\basedll_ustring.obj \ + $(OBJS)\basedll_variant.obj \ + $(OBJS)\basedll_wfstream.obj \ + $(OBJS)\basedll_wxcrt.obj \ + $(OBJS)\basedll_wxprintf.obj \ + $(OBJS)\basedll_xlocale.obj \ + $(OBJS)\basedll_xti.obj \ + $(OBJS)\basedll_xtistrm.obj \ + $(OBJS)\basedll_zipstrm.obj \ + $(OBJS)\basedll_zstream.obj \ + $(OBJS)\basedll_fswatchercmn.obj \ + $(OBJS)\basedll_fswatcherg.obj \ + $(OBJS)\basedll_basemsw.obj \ + $(OBJS)\basedll_crashrpt.obj \ + $(OBJS)\basedll_debughlp.obj \ + $(OBJS)\basedll_dde.obj \ + $(OBJS)\basedll_dir.obj \ + $(OBJS)\basedll_dlmsw.obj \ + $(OBJS)\basedll_evtloopconsole.obj \ + $(OBJS)\basedll_mimetype.obj \ + $(OBJS)\basedll_power.obj \ + $(OBJS)\basedll_regconf.obj \ + $(OBJS)\basedll_registry.obj \ + $(OBJS)\basedll_snglinst.obj \ + $(OBJS)\basedll_stackwalk.obj \ + $(OBJS)\basedll_stdpaths.obj \ + $(OBJS)\basedll_thread.obj \ + $(OBJS)\basedll_timer.obj \ + $(OBJS)\basedll_utils.obj \ + $(OBJS)\basedll_utilsexc.obj \ + $(OBJS)\basedll_fswatcher.obj \ + $(OBJS)\basedll_event.obj \ + $(OBJS)\basedll_fs_mem.obj \ + $(OBJS)\basedll_msgout.obj \ + $(OBJS)\basedll_utilscmn.obj \ + $(OBJS)\basedll_main.obj \ + $(OBJS)\basedll_mslu.obj \ + $(OBJS)\basedll_volume.obj +BASEDLL_RESOURCES = \ + $(OBJS)\basedll_version.res +BASELIB_CFLAGS = /M$(__RUNTIME_LIBS_162)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DwxUSE_GUI=0 \ + /DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +BASELIB_CXXFLAGS = /M$(__RUNTIME_LIBS_162)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DwxUSE_GUI=0 \ + /DwxUSE_BASE=1 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_baselib.pch" $(CPPFLAGS) $(CXXFLAGS) +BASELIB_OBJECTS = \ + $(OBJS)\baselib_dummy.obj \ + $(OBJS)\baselib_any.obj \ + $(OBJS)\baselib_appbase.obj \ + $(OBJS)\baselib_arcall.obj \ + $(OBJS)\baselib_arcfind.obj \ + $(OBJS)\baselib_archive.obj \ + $(OBJS)\baselib_arrstr.obj \ + $(OBJS)\baselib_base64.obj \ + $(OBJS)\baselib_clntdata.obj \ + $(OBJS)\baselib_cmdline.obj \ + $(OBJS)\baselib_config.obj \ + $(OBJS)\baselib_convauto.obj \ + $(OBJS)\baselib_datetime.obj \ + $(OBJS)\baselib_datetimefmt.obj \ + $(OBJS)\baselib_datstrm.obj \ + $(OBJS)\baselib_dircmn.obj \ + $(OBJS)\baselib_dynarray.obj \ + $(OBJS)\baselib_dynlib.obj \ + $(OBJS)\baselib_dynload.obj \ + $(OBJS)\baselib_encconv.obj \ + $(OBJS)\baselib_evtloopcmn.obj \ + $(OBJS)\baselib_extended.obj \ + $(OBJS)\baselib_ffile.obj \ + $(OBJS)\baselib_file.obj \ + $(OBJS)\baselib_fileback.obj \ + $(OBJS)\baselib_fileconf.obj \ + $(OBJS)\baselib_filefn.obj \ + $(OBJS)\baselib_filename.obj \ + $(OBJS)\baselib_filesys.obj \ + $(OBJS)\baselib_filtall.obj \ + $(OBJS)\baselib_filtfind.obj \ + $(OBJS)\baselib_fmapbase.obj \ + $(OBJS)\baselib_fs_arc.obj \ + $(OBJS)\baselib_fs_filter.obj \ + $(OBJS)\baselib_hash.obj \ + $(OBJS)\baselib_hashmap.obj \ + $(OBJS)\baselib_init.obj \ + $(OBJS)\baselib_intl.obj \ + $(OBJS)\baselib_ipcbase.obj \ + $(OBJS)\baselib_languageinfo.obj \ + $(OBJS)\baselib_list.obj \ + $(OBJS)\baselib_log.obj \ + $(OBJS)\baselib_longlong.obj \ + $(OBJS)\baselib_memory.obj \ + $(OBJS)\baselib_mimecmn.obj \ + $(OBJS)\baselib_module.obj \ + $(OBJS)\baselib_mstream.obj \ + $(OBJS)\baselib_numformatter.obj \ + $(OBJS)\baselib_object.obj \ + $(OBJS)\baselib_platinfo.obj \ + $(OBJS)\baselib_powercmn.obj \ + $(OBJS)\baselib_process.obj \ + $(OBJS)\baselib_regex.obj \ + $(OBJS)\baselib_stdpbase.obj \ + $(OBJS)\baselib_sstream.obj \ + $(OBJS)\baselib_stdstream.obj \ + $(OBJS)\baselib_stopwatch.obj \ + $(OBJS)\baselib_strconv.obj \ + $(OBJS)\baselib_stream.obj \ + $(OBJS)\baselib_string.obj \ + $(OBJS)\baselib_stringimpl.obj \ + $(OBJS)\baselib_stringops.obj \ + $(OBJS)\baselib_strvararg.obj \ + $(OBJS)\baselib_sysopt.obj \ + $(OBJS)\baselib_tarstrm.obj \ + $(OBJS)\baselib_textbuf.obj \ + $(OBJS)\baselib_textfile.obj \ + $(OBJS)\baselib_threadinfo.obj \ + $(OBJS)\baselib_time.obj \ + $(OBJS)\baselib_timercmn.obj \ + $(OBJS)\baselib_timerimpl.obj \ + $(OBJS)\baselib_tokenzr.obj \ + $(OBJS)\baselib_translation.obj \ + $(OBJS)\baselib_txtstrm.obj \ + $(OBJS)\baselib_unichar.obj \ + $(OBJS)\baselib_uri.obj \ + $(OBJS)\baselib_ustring.obj \ + $(OBJS)\baselib_variant.obj \ + $(OBJS)\baselib_wfstream.obj \ + $(OBJS)\baselib_wxcrt.obj \ + $(OBJS)\baselib_wxprintf.obj \ + $(OBJS)\baselib_xlocale.obj \ + $(OBJS)\baselib_xti.obj \ + $(OBJS)\baselib_xtistrm.obj \ + $(OBJS)\baselib_zipstrm.obj \ + $(OBJS)\baselib_zstream.obj \ + $(OBJS)\baselib_fswatchercmn.obj \ + $(OBJS)\baselib_fswatcherg.obj \ + $(OBJS)\baselib_basemsw.obj \ + $(OBJS)\baselib_crashrpt.obj \ + $(OBJS)\baselib_debughlp.obj \ + $(OBJS)\baselib_dde.obj \ + $(OBJS)\baselib_dir.obj \ + $(OBJS)\baselib_dlmsw.obj \ + $(OBJS)\baselib_evtloopconsole.obj \ + $(OBJS)\baselib_mimetype.obj \ + $(OBJS)\baselib_power.obj \ + $(OBJS)\baselib_regconf.obj \ + $(OBJS)\baselib_registry.obj \ + $(OBJS)\baselib_snglinst.obj \ + $(OBJS)\baselib_stackwalk.obj \ + $(OBJS)\baselib_stdpaths.obj \ + $(OBJS)\baselib_thread.obj \ + $(OBJS)\baselib_timer.obj \ + $(OBJS)\baselib_utils.obj \ + $(OBJS)\baselib_utilsexc.obj \ + $(OBJS)\baselib_fswatcher.obj \ + $(OBJS)\baselib_event.obj \ + $(OBJS)\baselib_fs_mem.obj \ + $(OBJS)\baselib_msgout.obj \ + $(OBJS)\baselib_utilscmn.obj \ + $(OBJS)\baselib_main.obj \ + $(OBJS)\baselib_mslu.obj \ + $(OBJS)\baselib_volume.obj +NETDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_178)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DwxUSE_GUI=0 \ + /DWXUSINGDLL /DWXMAKINGDLL_NET $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_netdll.pch" $(CPPFLAGS) $(CXXFLAGS) +NETDLL_OBJECTS = \ + $(OBJS)\netdll_dummy.obj \ + $(OBJS)\netdll_fs_inet.obj \ + $(OBJS)\netdll_ftp.obj \ + $(OBJS)\netdll_http.obj \ + $(OBJS)\netdll_protocol.obj \ + $(OBJS)\netdll_sckaddr.obj \ + $(OBJS)\netdll_sckfile.obj \ + $(OBJS)\netdll_sckipc.obj \ + $(OBJS)\netdll_sckstrm.obj \ + $(OBJS)\netdll_socket.obj \ + $(OBJS)\netdll_url.obj \ + $(OBJS)\netdll_sockmsw.obj \ + $(OBJS)\netdll_urlmsw.obj +NETDLL_RESOURCES = \ + $(OBJS)\netdll_version.res +NETLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_193)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DwxUSE_GUI=0 \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_netlib.pch" $(CPPFLAGS) $(CXXFLAGS) +NETLIB_OBJECTS = \ + $(OBJS)\netlib_dummy.obj \ + $(OBJS)\netlib_fs_inet.obj \ + $(OBJS)\netlib_ftp.obj \ + $(OBJS)\netlib_http.obj \ + $(OBJS)\netlib_protocol.obj \ + $(OBJS)\netlib_sckaddr.obj \ + $(OBJS)\netlib_sckfile.obj \ + $(OBJS)\netlib_sckipc.obj \ + $(OBJS)\netlib_sckstrm.obj \ + $(OBJS)\netlib_socket.obj \ + $(OBJS)\netlib_url.obj \ + $(OBJS)\netlib_sockmsw.obj \ + $(OBJS)\netlib_urlmsw.obj +COREDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_209)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_CORE /DwxUSE_BASE=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_coredll.pch" $(CPPFLAGS) $(CXXFLAGS) +COREDLL_OBJECTS = \ + $(OBJS)\coredll_dummy.obj \ + $(OBJS)\coredll_event.obj \ + $(OBJS)\coredll_fs_mem.obj \ + $(OBJS)\coredll_msgout.obj \ + $(OBJS)\coredll_utilscmn.obj \ + $(OBJS)\coredll_main.obj \ + $(OBJS)\coredll_mslu.obj \ + $(OBJS)\coredll_volume.obj \ + $(____CORE_SRC_FILENAMES_2_OBJECTS) +COREDLL_RESOURCES = \ + $(OBJS)\coredll_version.res +CORELIB_CXXFLAGS = /M$(__RUNTIME_LIBS_224)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DwxUSE_BASE=0 \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_corelib.pch" $(CPPFLAGS) $(CXXFLAGS) +CORELIB_OBJECTS = \ + $(OBJS)\corelib_dummy.obj \ + $(OBJS)\corelib_event.obj \ + $(OBJS)\corelib_fs_mem.obj \ + $(OBJS)\corelib_msgout.obj \ + $(OBJS)\corelib_utilscmn.obj \ + $(OBJS)\corelib_main.obj \ + $(OBJS)\corelib_mslu.obj \ + $(OBJS)\corelib_volume.obj \ + $(____CORE_SRC_FILENAMES_3_OBJECTS) +ADVDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_240)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_ADV $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_advdll.pch" $(CPPFLAGS) $(CXXFLAGS) +ADVDLL_OBJECTS = \ + $(OBJS)\advdll_dummy.obj \ + $(____ADVANCED_SRC_FILENAMES_2_OBJECTS) +ADVDLL_RESOURCES = \ + $(OBJS)\advdll_version.res +ADVLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_255)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_advlib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +ADVLIB_OBJECTS = \ + $(OBJS)\advlib_dummy.obj \ + $(____ADVANCED_SRC_FILENAMES_3_OBJECTS) +MEDIADLL_CXXFLAGS = /M$(__RUNTIME_LIBS_271)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_MEDIA $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_mediadll.pch" $(CPPFLAGS) $(CXXFLAGS) +MEDIADLL_OBJECTS = \ + $(OBJS)\mediadll_dummy.obj \ + $(OBJS)\mediadll_mediactrlcmn.obj \ + $(OBJS)\mediadll_mediactrl_am.obj \ + $(OBJS)\mediadll_mediactrl_wmp10.obj \ + $(OBJS)\mediadll_mediactrl_qt.obj +MEDIADLL_RESOURCES = \ + $(OBJS)\mediadll_version.res +MEDIALIB_CXXFLAGS = /M$(__RUNTIME_LIBS_286)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_medialib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +MEDIALIB_OBJECTS = \ + $(OBJS)\medialib_dummy.obj \ + $(OBJS)\medialib_mediactrlcmn.obj \ + $(OBJS)\medialib_mediactrl_am.obj \ + $(OBJS)\medialib_mediactrl_wmp10.obj \ + $(OBJS)\medialib_mediactrl_qt.obj +HTMLDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_302)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_HTML $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_htmldll.pch" $(CPPFLAGS) $(CXXFLAGS) +HTMLDLL_OBJECTS = \ + $(OBJS)\htmldll_dummy.obj \ + $(OBJS)\htmldll_helpbest.obj \ + $(OBJS)\htmldll_helpctrl.obj \ + $(OBJS)\htmldll_helpdata.obj \ + $(OBJS)\htmldll_helpdlg.obj \ + $(OBJS)\htmldll_helpfrm.obj \ + $(OBJS)\htmldll_helpwnd.obj \ + $(OBJS)\htmldll_htmlcell.obj \ + $(OBJS)\htmldll_htmlfilt.obj \ + $(OBJS)\htmldll_htmlpars.obj \ + $(OBJS)\htmldll_htmltag.obj \ + $(OBJS)\htmldll_htmlwin.obj \ + $(OBJS)\htmldll_htmprint.obj \ + $(OBJS)\htmldll_m_dflist.obj \ + $(OBJS)\htmldll_m_fonts.obj \ + $(OBJS)\htmldll_m_hline.obj \ + $(OBJS)\htmldll_m_image.obj \ + $(OBJS)\htmldll_m_layout.obj \ + $(OBJS)\htmldll_m_links.obj \ + $(OBJS)\htmldll_m_list.obj \ + $(OBJS)\htmldll_m_pre.obj \ + $(OBJS)\htmldll_m_span.obj \ + $(OBJS)\htmldll_m_style.obj \ + $(OBJS)\htmldll_m_tables.obj \ + $(OBJS)\htmldll_styleparams.obj \ + $(OBJS)\htmldll_winpars.obj \ + $(OBJS)\htmldll_htmllbox.obj +HTMLDLL_RESOURCES = \ + $(OBJS)\htmldll_version.res +HTMLLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_317)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_htmllib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +HTMLLIB_OBJECTS = \ + $(OBJS)\htmllib_dummy.obj \ + $(OBJS)\htmllib_helpbest.obj \ + $(OBJS)\htmllib_helpctrl.obj \ + $(OBJS)\htmllib_helpdata.obj \ + $(OBJS)\htmllib_helpdlg.obj \ + $(OBJS)\htmllib_helpfrm.obj \ + $(OBJS)\htmllib_helpwnd.obj \ + $(OBJS)\htmllib_htmlcell.obj \ + $(OBJS)\htmllib_htmlfilt.obj \ + $(OBJS)\htmllib_htmlpars.obj \ + $(OBJS)\htmllib_htmltag.obj \ + $(OBJS)\htmllib_htmlwin.obj \ + $(OBJS)\htmllib_htmprint.obj \ + $(OBJS)\htmllib_m_dflist.obj \ + $(OBJS)\htmllib_m_fonts.obj \ + $(OBJS)\htmllib_m_hline.obj \ + $(OBJS)\htmllib_m_image.obj \ + $(OBJS)\htmllib_m_layout.obj \ + $(OBJS)\htmllib_m_links.obj \ + $(OBJS)\htmllib_m_list.obj \ + $(OBJS)\htmllib_m_pre.obj \ + $(OBJS)\htmllib_m_span.obj \ + $(OBJS)\htmllib_m_style.obj \ + $(OBJS)\htmllib_m_tables.obj \ + $(OBJS)\htmllib_styleparams.obj \ + $(OBJS)\htmllib_winpars.obj \ + $(OBJS)\htmllib_htmllbox.obj +WEBVIEWDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_333)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_WEBVIEW $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_webviewdll.pch" $(CPPFLAGS) $(CXXFLAGS) +WEBVIEWDLL_OBJECTS = \ + $(OBJS)\webviewdll_dummy.obj \ + $(OBJS)\webviewdll_webview_ie.obj \ + $(OBJS)\webviewdll_webview.obj \ + $(OBJS)\webviewdll_webviewarchivehandler.obj \ + $(OBJS)\webviewdll_webviewfshandler.obj +WEBVIEWDLL_RESOURCES = \ + $(OBJS)\webviewdll_version.res +WEBVIEWLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_348)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_webviewlib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +WEBVIEWLIB_OBJECTS = \ + $(OBJS)\webviewlib_dummy.obj \ + $(OBJS)\webviewlib_webview_ie.obj \ + $(OBJS)\webviewlib_webview.obj \ + $(OBJS)\webviewlib_webviewarchivehandler.obj \ + $(OBJS)\webviewlib_webviewfshandler.obj +QADLL_CXXFLAGS = /M$(__RUNTIME_LIBS_364)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_QA $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_qadll.pch" $(CPPFLAGS) $(CXXFLAGS) +QADLL_OBJECTS = \ + $(OBJS)\qadll_dummy.obj \ + $(OBJS)\qadll_debugrpt.obj \ + $(OBJS)\qadll_dbgrptg.obj +QADLL_RESOURCES = \ + $(OBJS)\qadll_version.res +QALIB_CXXFLAGS = /M$(__RUNTIME_LIBS_379)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_qalib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +QALIB_OBJECTS = \ + $(OBJS)\qalib_dummy.obj \ + $(OBJS)\qalib_debugrpt.obj \ + $(OBJS)\qalib_dbgrptg.obj +XMLDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_395)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DwxUSE_GUI=0 \ + /DWXUSINGDLL /DWXMAKINGDLL_XML $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_xmldll.pch" $(CPPFLAGS) $(CXXFLAGS) +XMLDLL_OBJECTS = \ + $(OBJS)\xmldll_dummy.obj \ + $(OBJS)\xmldll_xml.obj \ + $(OBJS)\xmldll_xtixml.obj +XMLDLL_RESOURCES = \ + $(OBJS)\xmldll_version.res +XMLLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_410)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DwxUSE_GUI=0 \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_xmllib.pch" $(CPPFLAGS) $(CXXFLAGS) +XMLLIB_OBJECTS = \ + $(OBJS)\xmllib_dummy.obj \ + $(OBJS)\xmllib_xml.obj \ + $(OBJS)\xmllib_xtixml.obj +XRCDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_426)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_XRC $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_xrcdll.pch" $(CPPFLAGS) $(CXXFLAGS) +XRCDLL_OBJECTS = \ + $(OBJS)\xrcdll_dummy.obj \ + $(OBJS)\xrcdll_xh_animatctrl.obj \ + $(OBJS)\xrcdll_xh_bannerwindow.obj \ + $(OBJS)\xrcdll_xh_bmp.obj \ + $(OBJS)\xrcdll_xh_bmpcbox.obj \ + $(OBJS)\xrcdll_xh_bmpbt.obj \ + $(OBJS)\xrcdll_xh_bttn.obj \ + $(OBJS)\xrcdll_xh_cald.obj \ + $(OBJS)\xrcdll_xh_chckb.obj \ + $(OBJS)\xrcdll_xh_chckl.obj \ + $(OBJS)\xrcdll_xh_choic.obj \ + $(OBJS)\xrcdll_xh_choicbk.obj \ + $(OBJS)\xrcdll_xh_clrpicker.obj \ + $(OBJS)\xrcdll_xh_cmdlinkbn.obj \ + $(OBJS)\xrcdll_xh_collpane.obj \ + $(OBJS)\xrcdll_xh_combo.obj \ + $(OBJS)\xrcdll_xh_comboctrl.obj \ + $(OBJS)\xrcdll_xh_datectrl.obj \ + $(OBJS)\xrcdll_xh_dirpicker.obj \ + $(OBJS)\xrcdll_xh_dlg.obj \ + $(OBJS)\xrcdll_xh_editlbox.obj \ + $(OBJS)\xrcdll_xh_filectrl.obj \ + $(OBJS)\xrcdll_xh_filepicker.obj \ + $(OBJS)\xrcdll_xh_fontpicker.obj \ + $(OBJS)\xrcdll_xh_frame.obj \ + $(OBJS)\xrcdll_xh_gauge.obj \ + $(OBJS)\xrcdll_xh_gdctl.obj \ + $(OBJS)\xrcdll_xh_grid.obj \ + $(OBJS)\xrcdll_xh_html.obj \ + $(OBJS)\xrcdll_xh_hyperlink.obj \ + $(OBJS)\xrcdll_xh_listb.obj \ + $(OBJS)\xrcdll_xh_listbk.obj \ + $(OBJS)\xrcdll_xh_listc.obj \ + $(OBJS)\xrcdll_xh_mdi.obj \ + $(OBJS)\xrcdll_xh_menu.obj \ + $(OBJS)\xrcdll_xh_notbk.obj \ + $(OBJS)\xrcdll_xh_odcombo.obj \ + $(OBJS)\xrcdll_xh_panel.obj \ + $(OBJS)\xrcdll_xh_propdlg.obj \ + $(OBJS)\xrcdll_xh_radbt.obj \ + $(OBJS)\xrcdll_xh_radbx.obj \ + $(OBJS)\xrcdll_xh_scrol.obj \ + $(OBJS)\xrcdll_xh_scwin.obj \ + $(OBJS)\xrcdll_xh_htmllbox.obj \ + $(OBJS)\xrcdll_xh_sizer.obj \ + $(OBJS)\xrcdll_xh_slidr.obj \ + $(OBJS)\xrcdll_xh_spin.obj \ + $(OBJS)\xrcdll_xh_split.obj \ + $(OBJS)\xrcdll_xh_srchctrl.obj \ + $(OBJS)\xrcdll_xh_statbar.obj \ + $(OBJS)\xrcdll_xh_stbmp.obj \ + $(OBJS)\xrcdll_xh_stbox.obj \ + $(OBJS)\xrcdll_xh_stlin.obj \ + $(OBJS)\xrcdll_xh_sttxt.obj \ + $(OBJS)\xrcdll_xh_text.obj \ + $(OBJS)\xrcdll_xh_tglbtn.obj \ + $(OBJS)\xrcdll_xh_timectrl.obj \ + $(OBJS)\xrcdll_xh_toolb.obj \ + $(OBJS)\xrcdll_xh_toolbk.obj \ + $(OBJS)\xrcdll_xh_tree.obj \ + $(OBJS)\xrcdll_xh_treebk.obj \ + $(OBJS)\xrcdll_xh_unkwn.obj \ + $(OBJS)\xrcdll_xh_wizrd.obj \ + $(OBJS)\xrcdll_xmlres.obj \ + $(OBJS)\xrcdll_xmladv.obj \ + $(OBJS)\xrcdll_xmlrsall.obj +XRCDLL_RESOURCES = \ + $(OBJS)\xrcdll_version.res +XRCLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_441)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_xrclib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +XRCLIB_OBJECTS = \ + $(OBJS)\xrclib_dummy.obj \ + $(OBJS)\xrclib_xh_animatctrl.obj \ + $(OBJS)\xrclib_xh_bannerwindow.obj \ + $(OBJS)\xrclib_xh_bmp.obj \ + $(OBJS)\xrclib_xh_bmpcbox.obj \ + $(OBJS)\xrclib_xh_bmpbt.obj \ + $(OBJS)\xrclib_xh_bttn.obj \ + $(OBJS)\xrclib_xh_cald.obj \ + $(OBJS)\xrclib_xh_chckb.obj \ + $(OBJS)\xrclib_xh_chckl.obj \ + $(OBJS)\xrclib_xh_choic.obj \ + $(OBJS)\xrclib_xh_choicbk.obj \ + $(OBJS)\xrclib_xh_clrpicker.obj \ + $(OBJS)\xrclib_xh_cmdlinkbn.obj \ + $(OBJS)\xrclib_xh_collpane.obj \ + $(OBJS)\xrclib_xh_combo.obj \ + $(OBJS)\xrclib_xh_comboctrl.obj \ + $(OBJS)\xrclib_xh_datectrl.obj \ + $(OBJS)\xrclib_xh_dirpicker.obj \ + $(OBJS)\xrclib_xh_dlg.obj \ + $(OBJS)\xrclib_xh_editlbox.obj \ + $(OBJS)\xrclib_xh_filectrl.obj \ + $(OBJS)\xrclib_xh_filepicker.obj \ + $(OBJS)\xrclib_xh_fontpicker.obj \ + $(OBJS)\xrclib_xh_frame.obj \ + $(OBJS)\xrclib_xh_gauge.obj \ + $(OBJS)\xrclib_xh_gdctl.obj \ + $(OBJS)\xrclib_xh_grid.obj \ + $(OBJS)\xrclib_xh_html.obj \ + $(OBJS)\xrclib_xh_hyperlink.obj \ + $(OBJS)\xrclib_xh_listb.obj \ + $(OBJS)\xrclib_xh_listbk.obj \ + $(OBJS)\xrclib_xh_listc.obj \ + $(OBJS)\xrclib_xh_mdi.obj \ + $(OBJS)\xrclib_xh_menu.obj \ + $(OBJS)\xrclib_xh_notbk.obj \ + $(OBJS)\xrclib_xh_odcombo.obj \ + $(OBJS)\xrclib_xh_panel.obj \ + $(OBJS)\xrclib_xh_propdlg.obj \ + $(OBJS)\xrclib_xh_radbt.obj \ + $(OBJS)\xrclib_xh_radbx.obj \ + $(OBJS)\xrclib_xh_scrol.obj \ + $(OBJS)\xrclib_xh_scwin.obj \ + $(OBJS)\xrclib_xh_htmllbox.obj \ + $(OBJS)\xrclib_xh_sizer.obj \ + $(OBJS)\xrclib_xh_slidr.obj \ + $(OBJS)\xrclib_xh_spin.obj \ + $(OBJS)\xrclib_xh_split.obj \ + $(OBJS)\xrclib_xh_srchctrl.obj \ + $(OBJS)\xrclib_xh_statbar.obj \ + $(OBJS)\xrclib_xh_stbmp.obj \ + $(OBJS)\xrclib_xh_stbox.obj \ + $(OBJS)\xrclib_xh_stlin.obj \ + $(OBJS)\xrclib_xh_sttxt.obj \ + $(OBJS)\xrclib_xh_text.obj \ + $(OBJS)\xrclib_xh_tglbtn.obj \ + $(OBJS)\xrclib_xh_timectrl.obj \ + $(OBJS)\xrclib_xh_toolb.obj \ + $(OBJS)\xrclib_xh_toolbk.obj \ + $(OBJS)\xrclib_xh_tree.obj \ + $(OBJS)\xrclib_xh_treebk.obj \ + $(OBJS)\xrclib_xh_unkwn.obj \ + $(OBJS)\xrclib_xh_wizrd.obj \ + $(OBJS)\xrclib_xmlres.obj \ + $(OBJS)\xrclib_xmladv.obj \ + $(OBJS)\xrclib_xmlrsall.obj +AUIDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_457)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_AUI $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_auidll.pch" $(CPPFLAGS) $(CXXFLAGS) +AUIDLL_OBJECTS = \ + $(OBJS)\auidll_dummy.obj \ + $(OBJS)\auidll_framemanager.obj \ + $(OBJS)\auidll_dockart.obj \ + $(OBJS)\auidll_floatpane.obj \ + $(OBJS)\auidll_auibook.obj \ + $(OBJS)\auidll_auibar.obj \ + $(OBJS)\auidll_tabmdi.obj \ + $(OBJS)\auidll_tabart.obj \ + $(OBJS)\auidll_xh_auinotbk.obj +AUIDLL_RESOURCES = \ + $(OBJS)\auidll_version.res +AUILIB_CXXFLAGS = /M$(__RUNTIME_LIBS_472)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_auilib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +AUILIB_OBJECTS = \ + $(OBJS)\auilib_dummy.obj \ + $(OBJS)\auilib_framemanager.obj \ + $(OBJS)\auilib_dockart.obj \ + $(OBJS)\auilib_floatpane.obj \ + $(OBJS)\auilib_auibook.obj \ + $(OBJS)\auilib_auibar.obj \ + $(OBJS)\auilib_tabmdi.obj \ + $(OBJS)\auilib_tabart.obj \ + $(OBJS)\auilib_xh_auinotbk.obj +RIBBONDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_488)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_RIBBON $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_ribbondll.pch" $(CPPFLAGS) $(CXXFLAGS) +RIBBONDLL_OBJECTS = \ + $(OBJS)\ribbondll_dummy.obj \ + $(OBJS)\ribbondll_art_internal.obj \ + $(OBJS)\ribbondll_art_msw.obj \ + $(OBJS)\ribbondll_art_aui.obj \ + $(OBJS)\ribbondll_bar.obj \ + $(OBJS)\ribbondll_buttonbar.obj \ + $(OBJS)\ribbondll_control.obj \ + $(OBJS)\ribbondll_gallery.obj \ + $(OBJS)\ribbondll_page.obj \ + $(OBJS)\ribbondll_panel.obj \ + $(OBJS)\ribbondll_toolbar.obj \ + $(OBJS)\ribbondll_xh_ribbon.obj +RIBBONDLL_RESOURCES = \ + $(OBJS)\ribbondll_version.res +RIBBONLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_503)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_ribbonlib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +RIBBONLIB_OBJECTS = \ + $(OBJS)\ribbonlib_dummy.obj \ + $(OBJS)\ribbonlib_art_internal.obj \ + $(OBJS)\ribbonlib_art_msw.obj \ + $(OBJS)\ribbonlib_art_aui.obj \ + $(OBJS)\ribbonlib_bar.obj \ + $(OBJS)\ribbonlib_buttonbar.obj \ + $(OBJS)\ribbonlib_control.obj \ + $(OBJS)\ribbonlib_gallery.obj \ + $(OBJS)\ribbonlib_page.obj \ + $(OBJS)\ribbonlib_panel.obj \ + $(OBJS)\ribbonlib_toolbar.obj \ + $(OBJS)\ribbonlib_xh_ribbon.obj +PROPGRIDDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_519)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_PROPGRID $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_propgriddll.pch" $(CPPFLAGS) $(CXXFLAGS) +PROPGRIDDLL_OBJECTS = \ + $(OBJS)\propgriddll_dummy.obj \ + $(OBJS)\propgriddll_advprops.obj \ + $(OBJS)\propgriddll_editors.obj \ + $(OBJS)\propgriddll_manager.obj \ + $(OBJS)\propgriddll_property.obj \ + $(OBJS)\propgriddll_propgrid.obj \ + $(OBJS)\propgriddll_propgridiface.obj \ + $(OBJS)\propgriddll_propgridpagestate.obj \ + $(OBJS)\propgriddll_props.obj +PROPGRIDDLL_RESOURCES = \ + $(OBJS)\propgriddll_version.res +PROPGRIDLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_534)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_propgridlib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +PROPGRIDLIB_OBJECTS = \ + $(OBJS)\propgridlib_dummy.obj \ + $(OBJS)\propgridlib_advprops.obj \ + $(OBJS)\propgridlib_editors.obj \ + $(OBJS)\propgridlib_manager.obj \ + $(OBJS)\propgridlib_property.obj \ + $(OBJS)\propgridlib_propgrid.obj \ + $(OBJS)\propgridlib_propgridiface.obj \ + $(OBJS)\propgridlib_propgridpagestate.obj \ + $(OBJS)\propgridlib_props.obj +RICHTEXTDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_550)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_RICHTEXT $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_richtextdll.pch" $(CPPFLAGS) $(CXXFLAGS) +RICHTEXTDLL_OBJECTS = \ + $(OBJS)\richtextdll_dummy.obj \ + $(OBJS)\richtextdll_richtextbuffer.obj \ + $(OBJS)\richtextdll_richtextctrl.obj \ + $(OBJS)\richtextdll_richtextformatdlg.obj \ + $(OBJS)\richtextdll_richtexthtml.obj \ + $(OBJS)\richtextdll_richtextimagedlg.obj \ + $(OBJS)\richtextdll_richtextprint.obj \ + $(OBJS)\richtextdll_richtextstyledlg.obj \ + $(OBJS)\richtextdll_richtextstyles.obj \ + $(OBJS)\richtextdll_richtextsymboldlg.obj \ + $(OBJS)\richtextdll_richtextxml.obj \ + $(OBJS)\richtextdll_xh_richtext.obj +RICHTEXTDLL_RESOURCES = \ + $(OBJS)\richtextdll_version.res +RICHTEXTLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_565)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_richtextlib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +RICHTEXTLIB_OBJECTS = \ + $(OBJS)\richtextlib_dummy.obj \ + $(OBJS)\richtextlib_richtextbuffer.obj \ + $(OBJS)\richtextlib_richtextctrl.obj \ + $(OBJS)\richtextlib_richtextformatdlg.obj \ + $(OBJS)\richtextlib_richtexthtml.obj \ + $(OBJS)\richtextlib_richtextimagedlg.obj \ + $(OBJS)\richtextlib_richtextprint.obj \ + $(OBJS)\richtextlib_richtextstyledlg.obj \ + $(OBJS)\richtextlib_richtextstyles.obj \ + $(OBJS)\richtextlib_richtextsymboldlg.obj \ + $(OBJS)\richtextlib_richtextxml.obj \ + $(OBJS)\richtextlib_xh_richtext.obj +STCDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_581)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib \ + /I..\..\src\stc\scintilla\include /I..\..\src\stc\scintilla\lexlib \ + /I..\..\src\stc\scintilla\src /D__WX__ /DSCI_LEXER /DLINK_LEXERS \ + /DWXUSINGDLL /DWXMAKINGDLL_STC $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_stcdll.pch" $(CPPFLAGS) $(CXXFLAGS) +STCDLL_OBJECTS = \ + $(OBJS)\stcdll_dummy.obj \ + $(OBJS)\stcdll_stc.obj \ + $(OBJS)\stcdll_PlatWX.obj \ + $(OBJS)\stcdll_ScintillaWX.obj +STCDLL_RESOURCES = \ + $(OBJS)\stcdll_version.res +STCLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_596)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib \ + /I..\..\src\stc\scintilla\include /I..\..\src\stc\scintilla\lexlib \ + /I..\..\src\stc\scintilla\src /D__WX__ /DSCI_LEXER /DLINK_LEXERS \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_stclib.pch" $(CPPFLAGS) $(CXXFLAGS) +STCLIB_OBJECTS = \ + $(OBJS)\stclib_dummy.obj \ + $(OBJS)\stclib_stc.obj \ + $(OBJS)\stclib_PlatWX.obj \ + $(OBJS)\stclib_ScintillaWX.obj +GLDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_612)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib /DWXUSINGDLL \ + /DWXMAKINGDLL_GL $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_gldll.pch" $(CPPFLAGS) $(CXXFLAGS) +GLDLL_OBJECTS = \ + $(OBJS)\gldll_dummy.obj \ + $(OBJS)\gldll_glcmn.obj \ + $(OBJS)\gldll_glcanvas.obj +GLDLL_RESOURCES = \ + $(OBJS)\gldll_version.res +GLLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_627)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ + /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + /I$(SETUPHDIR) /I..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 \ + /DWXBUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png \ + /I..\..\src\zlib /I..\..\src\regex /I..\..\src\expat\lib $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_gllib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +GLLIB_OBJECTS = \ + $(OBJS)\gllib_dummy.obj \ + $(OBJS)\gllib_glcmn.obj \ + $(OBJS)\gllib_glcanvas.obj +BUILD_CFG_FILE = $(SETUPHDIR)\build.cfg + +### Conditionally set variables: ### + +!if "$(TARGET_CPU)" == "AMD64" +ARCH_SUFFIX = _x64 +!endif +!if "$(TARGET_CPU)" == "IA64" +ARCH_SUFFIX = _ia64 +!endif +!if "$(TARGET_CPU)" == "X64" +ARCH_SUFFIX = _x64 +!endif +!if "$(TARGET_CPU)" == "amd64" +ARCH_SUFFIX = _x64 +!endif +!if "$(TARGET_CPU)" == "ia64" +ARCH_SUFFIX = _ia64 +!endif +!if "$(TARGET_CPU)" == "x64" +ARCH_SUFFIX = _x64 +!endif +!if "$(USE_GUI)" == "0" +PORTNAME = base +!endif +!if "$(USE_GUI)" == "1" +PORTNAME = msw$(TOOLKIT_VERSION) +!endif +!if "$(OFFICIAL_BUILD)" == "1" +COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD +!endif +!if "$(OFFICIAL_BUILD)" == "0" +WXCOMPILER = _vc +!endif +!if "$(OFFICIAL_BUILD)" == "1" +WXCOMPILER = _vc$(COMPILER_VERSION)$(ARCH_SUFFIX) +!endif +!if "$(OFFICIAL_BUILD)" == "0" +VENDORTAG = _$(VENDOR) +!endif +!if "$(OFFICIAL_BUILD)" == "1" +VENDORTAG = +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +WXDEBUGFLAG = d +!endif +!if "$(UNICODE)" == "1" +WXUNICODEFLAG = u +!endif +!if "$(WXUNIV)" == "1" +WXUNIVNAME = univ +!endif +!if "$(SHARED)" == "1" +WXDLLFLAG = dll +!endif +!if "$(SHARED)" == "0" +LIBTYPE_SUFFIX = lib +!endif +!if "$(SHARED)" == "1" +LIBTYPE_SUFFIX = dll +!endif +!if "$(TARGET_CPU)" == "AMD64" +LINK_TARGET_CPU = /MACHINE:X64 +!endif +!if "$(TARGET_CPU)" == "IA64" +LINK_TARGET_CPU = /MACHINE:IA64 +!endif +!if "$(TARGET_CPU)" == "X64" +LINK_TARGET_CPU = /MACHINE:X64 +!endif +!if "$(TARGET_CPU)" == "amd64" +LINK_TARGET_CPU = /MACHINE:X64 +!endif +!if "$(TARGET_CPU)" == "ia64" +LINK_TARGET_CPU = /MACHINE:IA64 +!endif +!if "$(TARGET_CPU)" == "x64" +LINK_TARGET_CPU = /MACHINE:X64 +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_10 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_10 = $(__THREADSFLAG) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_25 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_25 = $(__THREADSFLAG) +!endif +!if "$(USE_GUI)" == "1" +__wxpng___depname = $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_40 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_40 = $(__THREADSFLAG) +!endif +!if "$(USE_GUI)" == "1" +__wxjpeg___depname = $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_55 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_55 = $(__THREADSFLAG) +!endif +!if "$(USE_GUI)" == "1" +__wxtiff___depname = $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_70 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_70 = $(__THREADSFLAG) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_85 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_85 = $(__THREADSFLAG) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_100 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_100 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +__wxscintilla_usingdll_p = /DWXUSINGDLL +!endif +!if "$(MONOLITHIC)" == "0" +EXTRALIBS_FOR_BASE = +!endif +!if "$(MONOLITHIC)" == "1" +EXTRALIBS_FOR_BASE = +!endif +!if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "1" +__monodll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_108 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_108 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_108 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_108 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_116 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_116 = $(__THREADSFLAG) +!endif +!if "$(USE_GUI)" == "1" +____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ + $(____CORE_SRC_FILENAMES_OBJECTS) \ + $(____ADVANCED_SRC_FILENAMES_OBJECTS) \ + $(OBJS)\monodll_mediactrlcmn.obj \ + $(OBJS)\monodll_mediactrl_am.obj \ + $(OBJS)\monodll_mediactrl_wmp10.obj \ + $(OBJS)\monodll_mediactrl_qt.obj \ + $(OBJS)\monodll_helpbest.obj \ + $(OBJS)\monodll_helpctrl.obj \ + $(OBJS)\monodll_helpdata.obj \ + $(OBJS)\monodll_helpdlg.obj \ + $(OBJS)\monodll_helpfrm.obj \ + $(OBJS)\monodll_helpwnd.obj \ + $(OBJS)\monodll_htmlcell.obj \ + $(OBJS)\monodll_htmlfilt.obj \ + $(OBJS)\monodll_htmlpars.obj \ + $(OBJS)\monodll_htmltag.obj \ + $(OBJS)\monodll_htmlwin.obj \ + $(OBJS)\monodll_htmprint.obj \ + $(OBJS)\monodll_m_dflist.obj \ + $(OBJS)\monodll_m_fonts.obj \ + $(OBJS)\monodll_m_hline.obj \ + $(OBJS)\monodll_m_image.obj \ + $(OBJS)\monodll_m_layout.obj \ + $(OBJS)\monodll_m_links.obj \ + $(OBJS)\monodll_m_list.obj \ + $(OBJS)\monodll_m_pre.obj \ + $(OBJS)\monodll_m_span.obj \ + $(OBJS)\monodll_m_style.obj \ + $(OBJS)\monodll_m_tables.obj \ + $(OBJS)\monodll_styleparams.obj \ + $(OBJS)\monodll_winpars.obj \ + $(OBJS)\monodll_htmllbox.obj \ + $(OBJS)\monodll_webview_ie.obj \ + $(OBJS)\monodll_webview.obj \ + $(OBJS)\monodll_webviewarchivehandler.obj \ + $(OBJS)\monodll_webviewfshandler.obj \ + $(OBJS)\monodll_debugrpt.obj \ + $(OBJS)\monodll_dbgrptg.obj \ + $(OBJS)\monodll_xh_animatctrl.obj \ + $(OBJS)\monodll_xh_bannerwindow.obj \ + $(OBJS)\monodll_xh_bmp.obj \ + $(OBJS)\monodll_xh_bmpcbox.obj \ + $(OBJS)\monodll_xh_bmpbt.obj \ + $(OBJS)\monodll_xh_bttn.obj \ + $(OBJS)\monodll_xh_cald.obj \ + $(OBJS)\monodll_xh_chckb.obj \ + $(OBJS)\monodll_xh_chckl.obj \ + $(OBJS)\monodll_xh_choic.obj \ + $(OBJS)\monodll_xh_choicbk.obj \ + $(OBJS)\monodll_xh_clrpicker.obj \ + $(OBJS)\monodll_xh_cmdlinkbn.obj \ + $(OBJS)\monodll_xh_collpane.obj \ + $(OBJS)\monodll_xh_combo.obj \ + $(OBJS)\monodll_xh_comboctrl.obj \ + $(OBJS)\monodll_xh_datectrl.obj \ + $(OBJS)\monodll_xh_dirpicker.obj \ + $(OBJS)\monodll_xh_dlg.obj \ + $(OBJS)\monodll_xh_editlbox.obj \ + $(OBJS)\monodll_xh_filectrl.obj \ + $(OBJS)\monodll_xh_filepicker.obj \ + $(OBJS)\monodll_xh_fontpicker.obj \ + $(OBJS)\monodll_xh_frame.obj \ + $(OBJS)\monodll_xh_gauge.obj \ + $(OBJS)\monodll_xh_gdctl.obj \ + $(OBJS)\monodll_xh_grid.obj \ + $(OBJS)\monodll_xh_html.obj \ + $(OBJS)\monodll_xh_hyperlink.obj \ + $(OBJS)\monodll_xh_listb.obj \ + $(OBJS)\monodll_xh_listbk.obj \ + $(OBJS)\monodll_xh_listc.obj \ + $(OBJS)\monodll_xh_mdi.obj \ + $(OBJS)\monodll_xh_menu.obj \ + $(OBJS)\monodll_xh_notbk.obj \ + $(OBJS)\monodll_xh_odcombo.obj \ + $(OBJS)\monodll_xh_panel.obj \ + $(OBJS)\monodll_xh_propdlg.obj \ + $(OBJS)\monodll_xh_radbt.obj \ + $(OBJS)\monodll_xh_radbx.obj \ + $(OBJS)\monodll_xh_scrol.obj \ + $(OBJS)\monodll_xh_scwin.obj \ + $(OBJS)\monodll_xh_htmllbox.obj \ + $(OBJS)\monodll_xh_sizer.obj \ + $(OBJS)\monodll_xh_slidr.obj \ + $(OBJS)\monodll_xh_spin.obj \ + $(OBJS)\monodll_xh_split.obj \ + $(OBJS)\monodll_xh_srchctrl.obj \ + $(OBJS)\monodll_xh_statbar.obj \ + $(OBJS)\monodll_xh_stbmp.obj \ + $(OBJS)\monodll_xh_stbox.obj \ + $(OBJS)\monodll_xh_stlin.obj \ + $(OBJS)\monodll_xh_sttxt.obj \ + $(OBJS)\monodll_xh_text.obj \ + $(OBJS)\monodll_xh_tglbtn.obj \ + $(OBJS)\monodll_xh_timectrl.obj \ + $(OBJS)\monodll_xh_toolb.obj \ + $(OBJS)\monodll_xh_toolbk.obj \ + $(OBJS)\monodll_xh_tree.obj \ + $(OBJS)\monodll_xh_treebk.obj \ + $(OBJS)\monodll_xh_unkwn.obj \ + $(OBJS)\monodll_xh_wizrd.obj \ + $(OBJS)\monodll_xmlres.obj \ + $(OBJS)\monodll_xmladv.obj \ + $(OBJS)\monodll_xmlrsall.obj \ + $(OBJS)\monodll_framemanager.obj \ + $(OBJS)\monodll_dockart.obj \ + $(OBJS)\monodll_floatpane.obj \ + $(OBJS)\monodll_auibook.obj \ + $(OBJS)\monodll_auibar.obj \ + $(OBJS)\monodll_tabmdi.obj \ + $(OBJS)\monodll_tabart.obj \ + $(OBJS)\monodll_xh_auinotbk.obj \ + $(OBJS)\monodll_advprops.obj \ + $(OBJS)\monodll_editors.obj \ + $(OBJS)\monodll_manager.obj \ + $(OBJS)\monodll_property.obj \ + $(OBJS)\monodll_propgrid.obj \ + $(OBJS)\monodll_propgridiface.obj \ + $(OBJS)\monodll_propgridpagestate.obj \ + $(OBJS)\monodll_props.obj \ + $(OBJS)\monodll_art_internal.obj \ + $(OBJS)\monodll_art_msw.obj \ + $(OBJS)\monodll_art_aui.obj \ + $(OBJS)\monodll_bar.obj \ + $(OBJS)\monodll_ribbon_buttonbar.obj \ + $(OBJS)\monodll_ribbon_control.obj \ + $(OBJS)\monodll_gallery.obj \ + $(OBJS)\monodll_page.obj \ + $(OBJS)\monodll_ribbon_panel.obj \ + $(OBJS)\monodll_ribbon_toolbar.obj \ + $(OBJS)\monodll_xh_ribbon.obj \ + $(OBJS)\monodll_richtextbuffer.obj \ + $(OBJS)\monodll_richtextctrl.obj \ + $(OBJS)\monodll_richtextformatdlg.obj \ + $(OBJS)\monodll_richtexthtml.obj \ + $(OBJS)\monodll_richtextimagedlg.obj \ + $(OBJS)\monodll_richtextprint.obj \ + $(OBJS)\monodll_richtextstyledlg.obj \ + $(OBJS)\monodll_richtextstyles.obj \ + $(OBJS)\monodll_richtextsymboldlg.obj \ + $(OBJS)\monodll_richtextxml.obj \ + $(OBJS)\monodll_xh_richtext.obj \ + $(OBJS)\monodll_stc.obj \ + $(OBJS)\monodll_PlatWX.obj \ + $(OBJS)\monodll_ScintillaWX.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "0" +____CORE_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_activex.obj \ + $(OBJS)\monodll_app.obj \ + $(OBJS)\monodll_bitmap.obj \ + $(OBJS)\monodll_brush.obj \ + $(OBJS)\monodll_caret.obj \ + $(OBJS)\monodll_clipbrd.obj \ + $(OBJS)\monodll_colour.obj \ + $(OBJS)\monodll_cursor.obj \ + $(OBJS)\monodll_data.obj \ + $(OBJS)\monodll_dc.obj \ + $(OBJS)\monodll_dcclient.obj \ + $(OBJS)\monodll_dcmemory.obj \ + $(OBJS)\monodll_dcprint.obj \ + $(OBJS)\monodll_dcscreen.obj \ + $(OBJS)\monodll_dialup.obj \ + $(OBJS)\monodll_dib.obj \ + $(OBJS)\monodll_display.obj \ + $(OBJS)\monodll_enhmeta.obj \ + $(OBJS)\monodll_font.obj \ + $(OBJS)\monodll_fontenum.obj \ + $(OBJS)\monodll_fontutil.obj \ + $(OBJS)\monodll_gdiimage.obj \ + $(OBJS)\monodll_gdiobj.obj \ + $(OBJS)\monodll_gdiplus.obj \ + $(OBJS)\monodll_graphics.obj \ + $(OBJS)\monodll_icon.obj \ + $(OBJS)\monodll_imaglist.obj \ + $(OBJS)\monodll_minifram.obj \ + $(OBJS)\monodll_nonownedwnd.obj \ + $(OBJS)\monodll_dataobj.obj \ + $(OBJS)\monodll_dropsrc.obj \ + $(OBJS)\monodll_droptgt.obj \ + $(OBJS)\monodll_oleutils.obj \ + $(OBJS)\monodll_safearray.obj \ + $(OBJS)\monodll_palette.obj \ + $(OBJS)\monodll_pen.obj \ + $(OBJS)\monodll_popupwin.obj \ + $(OBJS)\monodll_printdlg.obj \ + $(OBJS)\monodll_printwin.obj \ + $(OBJS)\monodll_region.obj \ + $(OBJS)\monodll_renderer.obj \ + $(OBJS)\monodll_settings.obj \ + $(OBJS)\monodll_textmeasure.obj \ + $(OBJS)\monodll_tooltip.obj \ + $(OBJS)\monodll_toplevel.obj \ + $(OBJS)\monodll_uiaction.obj \ + $(OBJS)\monodll_utilsgui.obj \ + $(OBJS)\monodll_utilswin.obj \ + $(OBJS)\monodll_uxtheme.obj \ + $(OBJS)\monodll_window.obj \ + $(OBJS)\monodll_helpchm.obj \ + $(OBJS)\monodll_helpwin.obj \ + $(OBJS)\monodll_automtn.obj \ + $(OBJS)\monodll_uuid.obj \ + $(OBJS)\monodll_clrpickerg.obj \ + $(OBJS)\monodll_collpaneg.obj \ + $(OBJS)\monodll_filepickerg.obj \ + $(OBJS)\monodll_fontpickerg.obj \ + $(OBJS)\monodll_generic_statusbr.obj \ + $(OBJS)\monodll_prntdlgg.obj \ + $(OBJS)\monodll_msw_accel.obj \ + $(OBJS)\monodll_anybutton.obj \ + $(OBJS)\monodll_artmsw.obj \ + $(OBJS)\monodll_msw_bmpbuttn.obj \ + $(OBJS)\monodll_msw_button.obj \ + $(OBJS)\monodll_msw_checkbox.obj \ + $(OBJS)\monodll_msw_choice.obj \ + $(OBJS)\monodll_colordlg.obj \ + $(OBJS)\monodll_combo.obj \ + $(OBJS)\monodll_msw_combobox.obj \ + $(OBJS)\monodll_msw_control.obj \ + $(OBJS)\monodll_msw_dialog.obj \ + $(OBJS)\monodll_dirdlg.obj \ + $(OBJS)\monodll_dragimag.obj \ + $(OBJS)\monodll_evtloop.obj \ + $(OBJS)\monodll_filedlg.obj \ + $(OBJS)\monodll_frame.obj \ + $(OBJS)\monodll_msw_gauge.obj \ + $(OBJS)\monodll_headerctrl.obj \ + $(OBJS)\monodll_iniconf.obj \ + $(OBJS)\monodll_msw_listbox.obj \ + $(OBJS)\monodll_msw_listctrl.obj \ + $(OBJS)\monodll_mdi.obj \ + $(OBJS)\monodll_msw_menu.obj \ + $(OBJS)\monodll_menuitem.obj \ + $(OBJS)\monodll_metafile.obj \ + $(OBJS)\monodll_msgdlg.obj \ + $(OBJS)\monodll_nativdlg.obj \ + $(OBJS)\monodll_nativewin.obj \ + $(OBJS)\monodll_msw_notebook.obj \ + $(OBJS)\monodll_access.obj \ + $(OBJS)\monodll_ownerdrw.obj \ + $(OBJS)\monodll_msw_panel.obj \ + $(OBJS)\monodll_progdlg.obj \ + $(OBJS)\monodll_msw_radiobox.obj \ + $(OBJS)\monodll_msw_radiobut.obj \ + $(OBJS)\monodll_richmsgdlg.obj \ + $(OBJS)\monodll_msw_scrolbar.obj \ + $(OBJS)\monodll_msw_slider.obj \ + $(OBJS)\monodll_msw_spinbutt.obj \ + $(OBJS)\monodll_spinctrl.obj \ + $(OBJS)\monodll_msw_statbmp.obj \ + $(OBJS)\monodll_msw_statbox.obj \ + $(OBJS)\monodll_statusbar.obj \ + $(OBJS)\monodll_msw_statline.obj \ + $(OBJS)\monodll_msw_stattext.obj \ + $(OBJS)\monodll_msw_toolbar.obj \ + $(OBJS)\monodll_msw_textctrl.obj \ + $(OBJS)\monodll_textentry.obj \ + $(OBJS)\monodll_msw_tglbtn.obj \ + $(OBJS)\monodll_treectrl.obj \ + $(OBJS)\monodll_msw_checklst.obj \ + $(OBJS)\monodll_msw_fdrepdlg.obj \ + $(OBJS)\monodll_fontdlg.obj \ + $(OBJS)\monodll_accelcmn.obj \ + $(OBJS)\monodll_accesscmn.obj \ + $(OBJS)\monodll_anidecod.obj \ + $(OBJS)\monodll_affinematrix2d.obj \ + $(OBJS)\monodll_appcmn.obj \ + $(OBJS)\monodll_artprov.obj \ + $(OBJS)\monodll_artstd.obj \ + $(OBJS)\monodll_arttango.obj \ + $(OBJS)\monodll_bmpbase.obj \ + $(OBJS)\monodll_bmpbtncmn.obj \ + $(OBJS)\monodll_bookctrl.obj \ + $(OBJS)\monodll_btncmn.obj \ + $(OBJS)\monodll_cairo.obj \ + $(OBJS)\monodll_checkboxcmn.obj \ + $(OBJS)\monodll_checklstcmn.obj \ + $(OBJS)\monodll_choiccmn.obj \ + $(OBJS)\monodll_clipcmn.obj \ + $(OBJS)\monodll_clrpickercmn.obj \ + $(OBJS)\monodll_colourcmn.obj \ + $(OBJS)\monodll_colourdata.obj \ + $(OBJS)\monodll_combocmn.obj \ + $(OBJS)\monodll_cmdproc.obj \ + $(OBJS)\monodll_cmndata.obj \ + $(OBJS)\monodll_containr.obj \ + $(OBJS)\monodll_cshelp.obj \ + $(OBJS)\monodll_ctrlcmn.obj \ + $(OBJS)\monodll_ctrlsub.obj \ + $(OBJS)\monodll_dcbase.obj \ + $(OBJS)\monodll_dcbufcmn.obj \ + $(OBJS)\monodll_dcgraph.obj \ + $(OBJS)\monodll_dcsvg.obj \ + $(OBJS)\monodll_dirctrlcmn.obj \ + $(OBJS)\monodll_dlgcmn.obj \ + $(OBJS)\monodll_dndcmn.obj \ + $(OBJS)\monodll_dobjcmn.obj \ + $(OBJS)\monodll_docmdi.obj \ + $(OBJS)\monodll_docview.obj \ + $(OBJS)\monodll_dpycmn.obj \ + $(OBJS)\monodll_dseldlg.obj \ + $(OBJS)\monodll_effects.obj \ + $(OBJS)\monodll_fddlgcmn.obj \ + $(OBJS)\monodll_filectrlcmn.obj \ + $(OBJS)\monodll_filehistorycmn.obj \ + $(OBJS)\monodll_filepickercmn.obj \ + $(OBJS)\monodll_fontpickercmn.obj \ + $(OBJS)\monodll_fldlgcmn.obj \ + $(OBJS)\monodll_fontcmn.obj \ + $(OBJS)\monodll_fontdata.obj \ + $(OBJS)\monodll_graphicc.obj \ + $(OBJS)\monodll_fontenumcmn.obj \ + $(OBJS)\monodll_fontmap.obj \ + $(OBJS)\monodll_fontutilcmn.obj \ + $(OBJS)\monodll_framecmn.obj \ + $(OBJS)\monodll_gaugecmn.obj \ + $(OBJS)\monodll_gbsizer.obj \ + $(OBJS)\monodll_gdicmn.obj \ + $(OBJS)\monodll_geometry.obj \ + $(OBJS)\monodll_gifdecod.obj \ + $(OBJS)\monodll_graphcmn.obj \ + $(OBJS)\monodll_headercolcmn.obj \ + $(OBJS)\monodll_headerctrlcmn.obj \ + $(OBJS)\monodll_helpbase.obj \ + $(OBJS)\monodll_iconbndl.obj \ + $(OBJS)\monodll_imagall.obj \ + $(OBJS)\monodll_imagbmp.obj \ + $(OBJS)\monodll_image.obj \ + $(OBJS)\monodll_imagfill.obj \ + $(OBJS)\monodll_imaggif.obj \ + $(OBJS)\monodll_imagiff.obj \ + $(OBJS)\monodll_imagjpeg.obj \ + $(OBJS)\monodll_imagpcx.obj \ + $(OBJS)\monodll_imagpng.obj \ + $(OBJS)\monodll_imagpnm.obj \ + $(OBJS)\monodll_imagtga.obj \ + $(OBJS)\monodll_imagtiff.obj \ + $(OBJS)\monodll_imagxpm.obj \ + $(OBJS)\monodll_layout.obj \ + $(OBJS)\monodll_lboxcmn.obj \ + $(OBJS)\monodll_listctrlcmn.obj \ + $(OBJS)\monodll_markupparser.obj \ + $(OBJS)\monodll_matrix.obj \ + $(OBJS)\monodll_menucmn.obj \ + $(OBJS)\monodll_modalhook.obj \ + $(OBJS)\monodll_mousemanager.obj \ + $(OBJS)\monodll_nbkbase.obj \ + $(OBJS)\monodll_overlaycmn.obj \ + $(OBJS)\monodll_ownerdrwcmn.obj \ + $(OBJS)\monodll_paper.obj \ + $(OBJS)\monodll_panelcmn.obj \ + $(OBJS)\monodll_persist.obj \ + $(OBJS)\monodll_pickerbase.obj \ + $(OBJS)\monodll_popupcmn.obj \ + $(OBJS)\monodll_preferencescmn.obj \ + $(OBJS)\monodll_prntbase.obj \ + $(OBJS)\monodll_quantize.obj \ + $(OBJS)\monodll_radiobtncmn.obj \ + $(OBJS)\monodll_radiocmn.obj \ + $(OBJS)\monodll_rearrangectrl.obj \ + $(OBJS)\monodll_rendcmn.obj \ + $(OBJS)\monodll_rgncmn.obj \ + $(OBJS)\monodll_scrolbarcmn.obj \ + $(OBJS)\monodll_settcmn.obj \ + $(OBJS)\monodll_sizer.obj \ + $(OBJS)\monodll_slidercmn.obj \ + $(OBJS)\monodll_spinbtncmn.obj \ + $(OBJS)\monodll_spinctrlcmn.obj \ + $(OBJS)\monodll_srchcmn.obj \ + $(OBJS)\monodll_statbar.obj \ + $(OBJS)\monodll_statbmpcmn.obj \ + $(OBJS)\monodll_statboxcmn.obj \ + $(OBJS)\monodll_statlinecmn.obj \ + $(OBJS)\monodll_stattextcmn.obj \ + $(OBJS)\monodll_stockitem.obj \ + $(OBJS)\monodll_tbarbase.obj \ + $(OBJS)\monodll_textcmn.obj \ + $(OBJS)\monodll_textentrycmn.obj \ + $(OBJS)\monodll_textmeasurecmn.obj \ + $(OBJS)\monodll_toplvcmn.obj \ + $(OBJS)\monodll_treebase.obj \ + $(OBJS)\monodll_uiactioncmn.obj \ + $(OBJS)\monodll_valgen.obj \ + $(OBJS)\monodll_validate.obj \ + $(OBJS)\monodll_valtext.obj \ + $(OBJS)\monodll_valnum.obj \ + $(OBJS)\monodll_wincmn.obj \ + $(OBJS)\monodll_windowid.obj \ + $(OBJS)\monodll_wrapsizer.obj \ + $(OBJS)\monodll_xpmdecod.obj \ + $(OBJS)\monodll_busyinfo.obj \ + $(OBJS)\monodll_generic_buttonbar.obj \ + $(OBJS)\monodll_choicdgg.obj \ + $(OBJS)\monodll_choicbkg.obj \ + $(OBJS)\monodll_combog.obj \ + $(OBJS)\monodll_dcpsg.obj \ + $(OBJS)\monodll_dirctrlg.obj \ + $(OBJS)\monodll_dragimgg.obj \ + $(OBJS)\monodll_filectrlg.obj \ + $(OBJS)\monodll_headerctrlg.obj \ + $(OBJS)\monodll_infobar.obj \ + $(OBJS)\monodll_listbkg.obj \ + $(OBJS)\monodll_logg.obj \ + $(OBJS)\monodll_markuptext.obj \ + $(OBJS)\monodll_msgdlgg.obj \ + $(OBJS)\monodll_numdlgg.obj \ + $(OBJS)\monodll_progdlgg.obj \ + $(OBJS)\monodll_preferencesg.obj \ + $(OBJS)\monodll_printps.obj \ + $(OBJS)\monodll_renderg.obj \ + $(OBJS)\monodll_richmsgdlgg.obj \ + $(OBJS)\monodll_scrlwing.obj \ + $(OBJS)\monodll_selstore.obj \ + $(OBJS)\monodll_spinctlg.obj \ + $(OBJS)\monodll_splitter.obj \ + $(OBJS)\monodll_srchctlg.obj \ + $(OBJS)\monodll_statbmpg.obj \ + $(OBJS)\monodll_stattextg.obj \ + $(OBJS)\monodll_textdlgg.obj \ + $(OBJS)\monodll_tipwin.obj \ + $(OBJS)\monodll_toolbkg.obj \ + $(OBJS)\monodll_treectlg.obj \ + $(OBJS)\monodll_treebkg.obj \ + $(OBJS)\monodll_vlbox.obj \ + $(OBJS)\monodll_vscroll.obj \ + $(OBJS)\monodll_xmlreshandler.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "1" +____CORE_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_activex.obj \ + $(OBJS)\monodll_app.obj \ + $(OBJS)\monodll_bitmap.obj \ + $(OBJS)\monodll_brush.obj \ + $(OBJS)\monodll_caret.obj \ + $(OBJS)\monodll_clipbrd.obj \ + $(OBJS)\monodll_colour.obj \ + $(OBJS)\monodll_cursor.obj \ + $(OBJS)\monodll_data.obj \ + $(OBJS)\monodll_dc.obj \ + $(OBJS)\monodll_dcclient.obj \ + $(OBJS)\monodll_dcmemory.obj \ + $(OBJS)\monodll_dcprint.obj \ + $(OBJS)\monodll_dcscreen.obj \ + $(OBJS)\monodll_dialup.obj \ + $(OBJS)\monodll_dib.obj \ + $(OBJS)\monodll_display.obj \ + $(OBJS)\monodll_enhmeta.obj \ + $(OBJS)\monodll_font.obj \ + $(OBJS)\monodll_fontenum.obj \ + $(OBJS)\monodll_fontutil.obj \ + $(OBJS)\monodll_gdiimage.obj \ + $(OBJS)\monodll_gdiobj.obj \ + $(OBJS)\monodll_gdiplus.obj \ + $(OBJS)\monodll_graphics.obj \ + $(OBJS)\monodll_icon.obj \ + $(OBJS)\monodll_imaglist.obj \ + $(OBJS)\monodll_minifram.obj \ + $(OBJS)\monodll_nonownedwnd.obj \ + $(OBJS)\monodll_dataobj.obj \ + $(OBJS)\monodll_dropsrc.obj \ + $(OBJS)\monodll_droptgt.obj \ + $(OBJS)\monodll_oleutils.obj \ + $(OBJS)\monodll_safearray.obj \ + $(OBJS)\monodll_palette.obj \ + $(OBJS)\monodll_pen.obj \ + $(OBJS)\monodll_popupwin.obj \ + $(OBJS)\monodll_printdlg.obj \ + $(OBJS)\monodll_printwin.obj \ + $(OBJS)\monodll_region.obj \ + $(OBJS)\monodll_renderer.obj \ + $(OBJS)\monodll_settings.obj \ + $(OBJS)\monodll_textmeasure.obj \ + $(OBJS)\monodll_tooltip.obj \ + $(OBJS)\monodll_toplevel.obj \ + $(OBJS)\monodll_uiaction.obj \ + $(OBJS)\monodll_utilsgui.obj \ + $(OBJS)\monodll_utilswin.obj \ + $(OBJS)\monodll_uxtheme.obj \ + $(OBJS)\monodll_window.obj \ + $(OBJS)\monodll_helpchm.obj \ + $(OBJS)\monodll_helpwin.obj \ + $(OBJS)\monodll_automtn.obj \ + $(OBJS)\monodll_uuid.obj \ + $(OBJS)\monodll_evtloop.obj \ + $(OBJS)\monodll_generic_accel.obj \ + $(OBJS)\monodll_clrpickerg.obj \ + $(OBJS)\monodll_collpaneg.obj \ + $(OBJS)\monodll_colrdlgg.obj \ + $(OBJS)\monodll_dirdlgg.obj \ + $(OBJS)\monodll_generic_fdrepdlg.obj \ + $(OBJS)\monodll_filedlgg.obj \ + $(OBJS)\monodll_filepickerg.obj \ + $(OBJS)\monodll_fontdlgg.obj \ + $(OBJS)\monodll_fontpickerg.obj \ + $(OBJS)\monodll_generic_listctrl.obj \ + $(OBJS)\monodll_mdig.obj \ + $(OBJS)\monodll_prntdlgg.obj \ + $(OBJS)\monodll_univ_bmpbuttn.obj \ + $(OBJS)\monodll_univ_button.obj \ + $(OBJS)\monodll_univ_checkbox.obj \ + $(OBJS)\monodll_univ_checklst.obj \ + $(OBJS)\monodll_univ_choice.obj \ + $(OBJS)\monodll_univ_combobox.obj \ + $(OBJS)\monodll_univ_control.obj \ + $(OBJS)\monodll_ctrlrend.obj \ + $(OBJS)\monodll_univ_dialog.obj \ + $(OBJS)\monodll_framuniv.obj \ + $(OBJS)\monodll_univ_gauge.obj \ + $(OBJS)\monodll_inpcons.obj \ + $(OBJS)\monodll_inphand.obj \ + $(OBJS)\monodll_univ_listbox.obj \ + $(OBJS)\monodll_univ_menu.obj \ + $(OBJS)\monodll_univ_notebook.obj \ + $(OBJS)\monodll_univ_radiobox.obj \ + $(OBJS)\monodll_univ_radiobut.obj \ + $(OBJS)\monodll_scrarrow.obj \ + $(OBJS)\monodll_univ_scrolbar.obj \ + $(OBJS)\monodll_scrthumb.obj \ + $(OBJS)\monodll_settingsuniv.obj \ + $(OBJS)\monodll_univ_slider.obj \ + $(OBJS)\monodll_univ_spinbutt.obj \ + $(OBJS)\monodll_univ_statbmp.obj \ + $(OBJS)\monodll_univ_statbox.obj \ + $(OBJS)\monodll_univ_statline.obj \ + $(OBJS)\monodll_univ_stattext.obj \ + $(OBJS)\monodll_univ_statusbr.obj \ + $(OBJS)\monodll_stdrend.obj \ + $(OBJS)\monodll_univ_textctrl.obj \ + $(OBJS)\monodll_univ_tglbtn.obj \ + $(OBJS)\monodll_theme.obj \ + $(OBJS)\monodll_univ_toolbar.obj \ + $(OBJS)\monodll_topluniv.obj \ + $(OBJS)\monodll_winuniv.obj \ + $(OBJS)\monodll_gtk.obj \ + $(OBJS)\monodll_metal.obj \ + $(OBJS)\monodll_mono.obj \ + $(OBJS)\monodll_win32.obj \ + $(OBJS)\monodll_accelcmn.obj \ + $(OBJS)\monodll_accesscmn.obj \ + $(OBJS)\monodll_anidecod.obj \ + $(OBJS)\monodll_affinematrix2d.obj \ + $(OBJS)\monodll_appcmn.obj \ + $(OBJS)\monodll_artprov.obj \ + $(OBJS)\monodll_artstd.obj \ + $(OBJS)\monodll_arttango.obj \ + $(OBJS)\monodll_bmpbase.obj \ + $(OBJS)\monodll_bmpbtncmn.obj \ + $(OBJS)\monodll_bookctrl.obj \ + $(OBJS)\monodll_btncmn.obj \ + $(OBJS)\monodll_cairo.obj \ + $(OBJS)\monodll_checkboxcmn.obj \ + $(OBJS)\monodll_checklstcmn.obj \ + $(OBJS)\monodll_choiccmn.obj \ + $(OBJS)\monodll_clipcmn.obj \ + $(OBJS)\monodll_clrpickercmn.obj \ + $(OBJS)\monodll_colourcmn.obj \ + $(OBJS)\monodll_colourdata.obj \ + $(OBJS)\monodll_combocmn.obj \ + $(OBJS)\monodll_cmdproc.obj \ + $(OBJS)\monodll_cmndata.obj \ + $(OBJS)\monodll_containr.obj \ + $(OBJS)\monodll_cshelp.obj \ + $(OBJS)\monodll_ctrlcmn.obj \ + $(OBJS)\monodll_ctrlsub.obj \ + $(OBJS)\monodll_dcbase.obj \ + $(OBJS)\monodll_dcbufcmn.obj \ + $(OBJS)\monodll_dcgraph.obj \ + $(OBJS)\monodll_dcsvg.obj \ + $(OBJS)\monodll_dirctrlcmn.obj \ + $(OBJS)\monodll_dlgcmn.obj \ + $(OBJS)\monodll_dndcmn.obj \ + $(OBJS)\monodll_dobjcmn.obj \ + $(OBJS)\monodll_docmdi.obj \ + $(OBJS)\monodll_docview.obj \ + $(OBJS)\monodll_dpycmn.obj \ + $(OBJS)\monodll_dseldlg.obj \ + $(OBJS)\monodll_effects.obj \ + $(OBJS)\monodll_fddlgcmn.obj \ + $(OBJS)\monodll_filectrlcmn.obj \ + $(OBJS)\monodll_filehistorycmn.obj \ + $(OBJS)\monodll_filepickercmn.obj \ + $(OBJS)\monodll_fontpickercmn.obj \ + $(OBJS)\monodll_fldlgcmn.obj \ + $(OBJS)\monodll_fontcmn.obj \ + $(OBJS)\monodll_fontdata.obj \ + $(OBJS)\monodll_graphicc.obj \ + $(OBJS)\monodll_fontenumcmn.obj \ + $(OBJS)\monodll_fontmap.obj \ + $(OBJS)\monodll_fontutilcmn.obj \ + $(OBJS)\monodll_framecmn.obj \ + $(OBJS)\monodll_gaugecmn.obj \ + $(OBJS)\monodll_gbsizer.obj \ + $(OBJS)\monodll_gdicmn.obj \ + $(OBJS)\monodll_geometry.obj \ + $(OBJS)\monodll_gifdecod.obj \ + $(OBJS)\monodll_graphcmn.obj \ + $(OBJS)\monodll_headercolcmn.obj \ + $(OBJS)\monodll_headerctrlcmn.obj \ + $(OBJS)\monodll_helpbase.obj \ + $(OBJS)\monodll_iconbndl.obj \ + $(OBJS)\monodll_imagall.obj \ + $(OBJS)\monodll_imagbmp.obj \ + $(OBJS)\monodll_image.obj \ + $(OBJS)\monodll_imagfill.obj \ + $(OBJS)\monodll_imaggif.obj \ + $(OBJS)\monodll_imagiff.obj \ + $(OBJS)\monodll_imagjpeg.obj \ + $(OBJS)\monodll_imagpcx.obj \ + $(OBJS)\monodll_imagpng.obj \ + $(OBJS)\monodll_imagpnm.obj \ + $(OBJS)\monodll_imagtga.obj \ + $(OBJS)\monodll_imagtiff.obj \ + $(OBJS)\monodll_imagxpm.obj \ + $(OBJS)\monodll_layout.obj \ + $(OBJS)\monodll_lboxcmn.obj \ + $(OBJS)\monodll_listctrlcmn.obj \ + $(OBJS)\monodll_markupparser.obj \ + $(OBJS)\monodll_matrix.obj \ + $(OBJS)\monodll_menucmn.obj \ + $(OBJS)\monodll_modalhook.obj \ + $(OBJS)\monodll_mousemanager.obj \ + $(OBJS)\monodll_nbkbase.obj \ + $(OBJS)\monodll_overlaycmn.obj \ + $(OBJS)\monodll_ownerdrwcmn.obj \ + $(OBJS)\monodll_paper.obj \ + $(OBJS)\monodll_panelcmn.obj \ + $(OBJS)\monodll_persist.obj \ + $(OBJS)\monodll_pickerbase.obj \ + $(OBJS)\monodll_popupcmn.obj \ + $(OBJS)\monodll_preferencescmn.obj \ + $(OBJS)\monodll_prntbase.obj \ + $(OBJS)\monodll_quantize.obj \ + $(OBJS)\monodll_radiobtncmn.obj \ + $(OBJS)\monodll_radiocmn.obj \ + $(OBJS)\monodll_rearrangectrl.obj \ + $(OBJS)\monodll_rendcmn.obj \ + $(OBJS)\monodll_rgncmn.obj \ + $(OBJS)\monodll_scrolbarcmn.obj \ + $(OBJS)\monodll_settcmn.obj \ + $(OBJS)\monodll_sizer.obj \ + $(OBJS)\monodll_slidercmn.obj \ + $(OBJS)\monodll_spinbtncmn.obj \ + $(OBJS)\monodll_spinctrlcmn.obj \ + $(OBJS)\monodll_srchcmn.obj \ + $(OBJS)\monodll_statbar.obj \ + $(OBJS)\monodll_statbmpcmn.obj \ + $(OBJS)\monodll_statboxcmn.obj \ + $(OBJS)\monodll_statlinecmn.obj \ + $(OBJS)\monodll_stattextcmn.obj \ + $(OBJS)\monodll_stockitem.obj \ + $(OBJS)\monodll_tbarbase.obj \ + $(OBJS)\monodll_textcmn.obj \ + $(OBJS)\monodll_textentrycmn.obj \ + $(OBJS)\monodll_textmeasurecmn.obj \ + $(OBJS)\monodll_toplvcmn.obj \ + $(OBJS)\monodll_treebase.obj \ + $(OBJS)\monodll_uiactioncmn.obj \ + $(OBJS)\monodll_valgen.obj \ + $(OBJS)\monodll_validate.obj \ + $(OBJS)\monodll_valtext.obj \ + $(OBJS)\monodll_valnum.obj \ + $(OBJS)\monodll_wincmn.obj \ + $(OBJS)\monodll_windowid.obj \ + $(OBJS)\monodll_wrapsizer.obj \ + $(OBJS)\monodll_xpmdecod.obj \ + $(OBJS)\monodll_busyinfo.obj \ + $(OBJS)\monodll_generic_buttonbar.obj \ + $(OBJS)\monodll_choicdgg.obj \ + $(OBJS)\monodll_choicbkg.obj \ + $(OBJS)\monodll_combog.obj \ + $(OBJS)\monodll_dcpsg.obj \ + $(OBJS)\monodll_dirctrlg.obj \ + $(OBJS)\monodll_dragimgg.obj \ + $(OBJS)\monodll_filectrlg.obj \ + $(OBJS)\monodll_headerctrlg.obj \ + $(OBJS)\monodll_infobar.obj \ + $(OBJS)\monodll_listbkg.obj \ + $(OBJS)\monodll_logg.obj \ + $(OBJS)\monodll_markuptext.obj \ + $(OBJS)\monodll_msgdlgg.obj \ + $(OBJS)\monodll_numdlgg.obj \ + $(OBJS)\monodll_progdlgg.obj \ + $(OBJS)\monodll_preferencesg.obj \ + $(OBJS)\monodll_printps.obj \ + $(OBJS)\monodll_renderg.obj \ + $(OBJS)\monodll_richmsgdlgg.obj \ + $(OBJS)\monodll_scrlwing.obj \ + $(OBJS)\monodll_selstore.obj \ + $(OBJS)\monodll_spinctlg.obj \ + $(OBJS)\monodll_splitter.obj \ + $(OBJS)\monodll_srchctlg.obj \ + $(OBJS)\monodll_statbmpg.obj \ + $(OBJS)\monodll_stattextg.obj \ + $(OBJS)\monodll_textdlgg.obj \ + $(OBJS)\monodll_tipwin.obj \ + $(OBJS)\monodll_toolbkg.obj \ + $(OBJS)\monodll_treectlg.obj \ + $(OBJS)\monodll_treebkg.obj \ + $(OBJS)\monodll_vlbox.obj \ + $(OBJS)\monodll_vscroll.obj \ + $(OBJS)\monodll_xmlreshandler.obj +!endif +!if "$(WXUNIV)" == "0" +____ADVANCED_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_animatecmn.obj \ + $(OBJS)\monodll_bmpcboxcmn.obj \ + $(OBJS)\monodll_calctrlcmn.obj \ + $(OBJS)\monodll_datavcmn.obj \ + $(OBJS)\monodll_gridcmn.obj \ + $(OBJS)\monodll_hyperlnkcmn.obj \ + $(OBJS)\monodll_odcombocmn.obj \ + $(OBJS)\monodll_richtooltipcmn.obj \ + $(OBJS)\monodll_aboutdlgg.obj \ + $(OBJS)\monodll_bannerwindow.obj \ + $(OBJS)\monodll_bmpcboxg.obj \ + $(OBJS)\monodll_calctrlg.obj \ + $(OBJS)\monodll_commandlinkbuttong.obj \ + $(OBJS)\monodll_datavgen.obj \ + $(OBJS)\monodll_datectlg.obj \ + $(OBJS)\monodll_editlbox.obj \ + $(OBJS)\monodll_grid.obj \ + $(OBJS)\monodll_gridctrl.obj \ + $(OBJS)\monodll_grideditors.obj \ + $(OBJS)\monodll_gridsel.obj \ + $(OBJS)\monodll_helpext.obj \ + $(OBJS)\monodll_hyperlinkg.obj \ + $(OBJS)\monodll_laywin.obj \ + $(OBJS)\monodll_notifmsgg.obj \ + $(OBJS)\monodll_odcombo.obj \ + $(OBJS)\monodll_propdlg.obj \ + $(OBJS)\monodll_richtooltipg.obj \ + $(OBJS)\monodll_sashwin.obj \ + $(OBJS)\monodll_splash.obj \ + $(OBJS)\monodll_timectrlg.obj \ + $(OBJS)\monodll_tipdlg.obj \ + $(OBJS)\monodll_treelist.obj \ + $(OBJS)\monodll_wizard.obj \ + $(OBJS)\monodll_taskbarcmn.obj \ + $(OBJS)\monodll_aboutdlg.obj \ + $(OBJS)\monodll_notifmsg.obj \ + $(OBJS)\monodll_richtooltip.obj \ + $(OBJS)\monodll_sound.obj \ + $(OBJS)\monodll_taskbar.obj \ + $(OBJS)\monodll_joystick.obj \ + $(OBJS)\monodll_animateg.obj \ + $(OBJS)\monodll_bmpcbox.obj \ + $(OBJS)\monodll_calctrl.obj \ + $(OBJS)\monodll_commandlinkbutton.obj \ + $(OBJS)\monodll_datecontrols.obj \ + $(OBJS)\monodll_datectrl.obj \ + $(OBJS)\monodll_datetimectrl.obj \ + $(OBJS)\monodll_hyperlink.obj \ + $(OBJS)\monodll_timectrl.obj +!endif +!if "$(WXUNIV)" == "1" +____ADVANCED_SRC_FILENAMES_OBJECTS = \ + $(OBJS)\monodll_animatecmn.obj \ + $(OBJS)\monodll_bmpcboxcmn.obj \ + $(OBJS)\monodll_calctrlcmn.obj \ + $(OBJS)\monodll_datavcmn.obj \ + $(OBJS)\monodll_gridcmn.obj \ + $(OBJS)\monodll_hyperlnkcmn.obj \ + $(OBJS)\monodll_odcombocmn.obj \ + $(OBJS)\monodll_richtooltipcmn.obj \ + $(OBJS)\monodll_aboutdlgg.obj \ + $(OBJS)\monodll_bannerwindow.obj \ + $(OBJS)\monodll_bmpcboxg.obj \ + $(OBJS)\monodll_calctrlg.obj \ + $(OBJS)\monodll_commandlinkbuttong.obj \ + $(OBJS)\monodll_datavgen.obj \ + $(OBJS)\monodll_datectlg.obj \ + $(OBJS)\monodll_editlbox.obj \ + $(OBJS)\monodll_grid.obj \ + $(OBJS)\monodll_gridctrl.obj \ + $(OBJS)\monodll_grideditors.obj \ + $(OBJS)\monodll_gridsel.obj \ + $(OBJS)\monodll_helpext.obj \ + $(OBJS)\monodll_hyperlinkg.obj \ + $(OBJS)\monodll_laywin.obj \ + $(OBJS)\monodll_notifmsgg.obj \ + $(OBJS)\monodll_odcombo.obj \ + $(OBJS)\monodll_propdlg.obj \ + $(OBJS)\monodll_richtooltipg.obj \ + $(OBJS)\monodll_sashwin.obj \ + $(OBJS)\monodll_splash.obj \ + $(OBJS)\monodll_timectrlg.obj \ + $(OBJS)\monodll_tipdlg.obj \ + $(OBJS)\monodll_treelist.obj \ + $(OBJS)\monodll_wizard.obj \ + $(OBJS)\monodll_taskbarcmn.obj \ + $(OBJS)\monodll_aboutdlg.obj \ + $(OBJS)\monodll_notifmsg.obj \ + $(OBJS)\monodll_richtooltip.obj \ + $(OBJS)\monodll_sound.obj \ + $(OBJS)\monodll_taskbar.obj \ + $(OBJS)\monodll_joystick.obj \ + $(OBJS)\monodll_animateg.obj +!endif +!if "$(USE_STC)" == "1" +__wxscintilla_library_link_DEP = $(__wxscintilla) +!endif +!if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "0" +__monolib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_131 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_131 = $(__THREADSFLAG) +!endif +!if "$(USE_GUI)" == "1" +____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ + $(____CORE_SRC_FILENAMES_1_OBJECTS) \ + $(____ADVANCED_SRC_FILENAMES_1_OBJECTS) \ + $(OBJS)\monolib_mediactrlcmn.obj \ + $(OBJS)\monolib_mediactrl_am.obj \ + $(OBJS)\monolib_mediactrl_wmp10.obj \ + $(OBJS)\monolib_mediactrl_qt.obj \ + $(OBJS)\monolib_helpbest.obj \ + $(OBJS)\monolib_helpctrl.obj \ + $(OBJS)\monolib_helpdata.obj \ + $(OBJS)\monolib_helpdlg.obj \ + $(OBJS)\monolib_helpfrm.obj \ + $(OBJS)\monolib_helpwnd.obj \ + $(OBJS)\monolib_htmlcell.obj \ + $(OBJS)\monolib_htmlfilt.obj \ + $(OBJS)\monolib_htmlpars.obj \ + $(OBJS)\monolib_htmltag.obj \ + $(OBJS)\monolib_htmlwin.obj \ + $(OBJS)\monolib_htmprint.obj \ + $(OBJS)\monolib_m_dflist.obj \ + $(OBJS)\monolib_m_fonts.obj \ + $(OBJS)\monolib_m_hline.obj \ + $(OBJS)\monolib_m_image.obj \ + $(OBJS)\monolib_m_layout.obj \ + $(OBJS)\monolib_m_links.obj \ + $(OBJS)\monolib_m_list.obj \ + $(OBJS)\monolib_m_pre.obj \ + $(OBJS)\monolib_m_span.obj \ + $(OBJS)\monolib_m_style.obj \ + $(OBJS)\monolib_m_tables.obj \ + $(OBJS)\monolib_styleparams.obj \ + $(OBJS)\monolib_winpars.obj \ + $(OBJS)\monolib_htmllbox.obj \ + $(OBJS)\monolib_webview_ie.obj \ + $(OBJS)\monolib_webview.obj \ + $(OBJS)\monolib_webviewarchivehandler.obj \ + $(OBJS)\monolib_webviewfshandler.obj \ + $(OBJS)\monolib_debugrpt.obj \ + $(OBJS)\monolib_dbgrptg.obj \ + $(OBJS)\monolib_xh_animatctrl.obj \ + $(OBJS)\monolib_xh_bannerwindow.obj \ + $(OBJS)\monolib_xh_bmp.obj \ + $(OBJS)\monolib_xh_bmpcbox.obj \ + $(OBJS)\monolib_xh_bmpbt.obj \ + $(OBJS)\monolib_xh_bttn.obj \ + $(OBJS)\monolib_xh_cald.obj \ + $(OBJS)\monolib_xh_chckb.obj \ + $(OBJS)\monolib_xh_chckl.obj \ + $(OBJS)\monolib_xh_choic.obj \ + $(OBJS)\monolib_xh_choicbk.obj \ + $(OBJS)\monolib_xh_clrpicker.obj \ + $(OBJS)\monolib_xh_cmdlinkbn.obj \ + $(OBJS)\monolib_xh_collpane.obj \ + $(OBJS)\monolib_xh_combo.obj \ + $(OBJS)\monolib_xh_comboctrl.obj \ + $(OBJS)\monolib_xh_datectrl.obj \ + $(OBJS)\monolib_xh_dirpicker.obj \ + $(OBJS)\monolib_xh_dlg.obj \ + $(OBJS)\monolib_xh_editlbox.obj \ + $(OBJS)\monolib_xh_filectrl.obj \ + $(OBJS)\monolib_xh_filepicker.obj \ + $(OBJS)\monolib_xh_fontpicker.obj \ + $(OBJS)\monolib_xh_frame.obj \ + $(OBJS)\monolib_xh_gauge.obj \ + $(OBJS)\monolib_xh_gdctl.obj \ + $(OBJS)\monolib_xh_grid.obj \ + $(OBJS)\monolib_xh_html.obj \ + $(OBJS)\monolib_xh_hyperlink.obj \ + $(OBJS)\monolib_xh_listb.obj \ + $(OBJS)\monolib_xh_listbk.obj \ + $(OBJS)\monolib_xh_listc.obj \ + $(OBJS)\monolib_xh_mdi.obj \ + $(OBJS)\monolib_xh_menu.obj \ + $(OBJS)\monolib_xh_notbk.obj \ + $(OBJS)\monolib_xh_odcombo.obj \ + $(OBJS)\monolib_xh_panel.obj \ + $(OBJS)\monolib_xh_propdlg.obj \ + $(OBJS)\monolib_xh_radbt.obj \ + $(OBJS)\monolib_xh_radbx.obj \ + $(OBJS)\monolib_xh_scrol.obj \ + $(OBJS)\monolib_xh_scwin.obj \ + $(OBJS)\monolib_xh_htmllbox.obj \ + $(OBJS)\monolib_xh_sizer.obj \ + $(OBJS)\monolib_xh_slidr.obj \ + $(OBJS)\monolib_xh_spin.obj \ + $(OBJS)\monolib_xh_split.obj \ + $(OBJS)\monolib_xh_srchctrl.obj \ + $(OBJS)\monolib_xh_statbar.obj \ + $(OBJS)\monolib_xh_stbmp.obj \ + $(OBJS)\monolib_xh_stbox.obj \ + $(OBJS)\monolib_xh_stlin.obj \ + $(OBJS)\monolib_xh_sttxt.obj \ + $(OBJS)\monolib_xh_text.obj \ + $(OBJS)\monolib_xh_tglbtn.obj \ + $(OBJS)\monolib_xh_timectrl.obj \ + $(OBJS)\monolib_xh_toolb.obj \ + $(OBJS)\monolib_xh_toolbk.obj \ + $(OBJS)\monolib_xh_tree.obj \ + $(OBJS)\monolib_xh_treebk.obj \ + $(OBJS)\monolib_xh_unkwn.obj \ + $(OBJS)\monolib_xh_wizrd.obj \ + $(OBJS)\monolib_xmlres.obj \ + $(OBJS)\monolib_xmladv.obj \ + $(OBJS)\monolib_xmlrsall.obj \ + $(OBJS)\monolib_framemanager.obj \ + $(OBJS)\monolib_dockart.obj \ + $(OBJS)\monolib_floatpane.obj \ + $(OBJS)\monolib_auibook.obj \ + $(OBJS)\monolib_auibar.obj \ + $(OBJS)\monolib_tabmdi.obj \ + $(OBJS)\monolib_tabart.obj \ + $(OBJS)\monolib_xh_auinotbk.obj \ + $(OBJS)\monolib_advprops.obj \ + $(OBJS)\monolib_editors.obj \ + $(OBJS)\monolib_manager.obj \ + $(OBJS)\monolib_property.obj \ + $(OBJS)\monolib_propgrid.obj \ + $(OBJS)\monolib_propgridiface.obj \ + $(OBJS)\monolib_propgridpagestate.obj \ + $(OBJS)\monolib_props.obj \ + $(OBJS)\monolib_art_internal.obj \ + $(OBJS)\monolib_art_msw.obj \ + $(OBJS)\monolib_art_aui.obj \ + $(OBJS)\monolib_bar.obj \ + $(OBJS)\monolib_ribbon_buttonbar.obj \ + $(OBJS)\monolib_ribbon_control.obj \ + $(OBJS)\monolib_gallery.obj \ + $(OBJS)\monolib_page.obj \ + $(OBJS)\monolib_ribbon_panel.obj \ + $(OBJS)\monolib_ribbon_toolbar.obj \ + $(OBJS)\monolib_xh_ribbon.obj \ + $(OBJS)\monolib_richtextbuffer.obj \ + $(OBJS)\monolib_richtextctrl.obj \ + $(OBJS)\monolib_richtextformatdlg.obj \ + $(OBJS)\monolib_richtexthtml.obj \ + $(OBJS)\monolib_richtextimagedlg.obj \ + $(OBJS)\monolib_richtextprint.obj \ + $(OBJS)\monolib_richtextstyledlg.obj \ + $(OBJS)\monolib_richtextstyles.obj \ + $(OBJS)\monolib_richtextsymboldlg.obj \ + $(OBJS)\monolib_richtextxml.obj \ + $(OBJS)\monolib_xh_richtext.obj \ + $(OBJS)\monolib_stc.obj \ + $(OBJS)\monolib_PlatWX.obj \ + $(OBJS)\monolib_ScintillaWX.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "0" +____CORE_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_activex.obj \ + $(OBJS)\monolib_app.obj \ + $(OBJS)\monolib_bitmap.obj \ + $(OBJS)\monolib_brush.obj \ + $(OBJS)\monolib_caret.obj \ + $(OBJS)\monolib_clipbrd.obj \ + $(OBJS)\monolib_colour.obj \ + $(OBJS)\monolib_cursor.obj \ + $(OBJS)\monolib_data.obj \ + $(OBJS)\monolib_dc.obj \ + $(OBJS)\monolib_dcclient.obj \ + $(OBJS)\monolib_dcmemory.obj \ + $(OBJS)\monolib_dcprint.obj \ + $(OBJS)\monolib_dcscreen.obj \ + $(OBJS)\monolib_dialup.obj \ + $(OBJS)\monolib_dib.obj \ + $(OBJS)\monolib_display.obj \ + $(OBJS)\monolib_enhmeta.obj \ + $(OBJS)\monolib_font.obj \ + $(OBJS)\monolib_fontenum.obj \ + $(OBJS)\monolib_fontutil.obj \ + $(OBJS)\monolib_gdiimage.obj \ + $(OBJS)\monolib_gdiobj.obj \ + $(OBJS)\monolib_gdiplus.obj \ + $(OBJS)\monolib_graphics.obj \ + $(OBJS)\monolib_icon.obj \ + $(OBJS)\monolib_imaglist.obj \ + $(OBJS)\monolib_minifram.obj \ + $(OBJS)\monolib_nonownedwnd.obj \ + $(OBJS)\monolib_dataobj.obj \ + $(OBJS)\monolib_dropsrc.obj \ + $(OBJS)\monolib_droptgt.obj \ + $(OBJS)\monolib_oleutils.obj \ + $(OBJS)\monolib_safearray.obj \ + $(OBJS)\monolib_palette.obj \ + $(OBJS)\monolib_pen.obj \ + $(OBJS)\monolib_popupwin.obj \ + $(OBJS)\monolib_printdlg.obj \ + $(OBJS)\monolib_printwin.obj \ + $(OBJS)\monolib_region.obj \ + $(OBJS)\monolib_renderer.obj \ + $(OBJS)\monolib_settings.obj \ + $(OBJS)\monolib_textmeasure.obj \ + $(OBJS)\monolib_tooltip.obj \ + $(OBJS)\monolib_toplevel.obj \ + $(OBJS)\monolib_uiaction.obj \ + $(OBJS)\monolib_utilsgui.obj \ + $(OBJS)\monolib_utilswin.obj \ + $(OBJS)\monolib_uxtheme.obj \ + $(OBJS)\monolib_window.obj \ + $(OBJS)\monolib_helpchm.obj \ + $(OBJS)\monolib_helpwin.obj \ + $(OBJS)\monolib_automtn.obj \ + $(OBJS)\monolib_uuid.obj \ + $(OBJS)\monolib_clrpickerg.obj \ + $(OBJS)\monolib_collpaneg.obj \ + $(OBJS)\monolib_filepickerg.obj \ + $(OBJS)\monolib_fontpickerg.obj \ + $(OBJS)\monolib_generic_statusbr.obj \ + $(OBJS)\monolib_prntdlgg.obj \ + $(OBJS)\monolib_msw_accel.obj \ + $(OBJS)\monolib_anybutton.obj \ + $(OBJS)\monolib_artmsw.obj \ + $(OBJS)\monolib_msw_bmpbuttn.obj \ + $(OBJS)\monolib_msw_button.obj \ + $(OBJS)\monolib_msw_checkbox.obj \ + $(OBJS)\monolib_msw_choice.obj \ + $(OBJS)\monolib_colordlg.obj \ + $(OBJS)\monolib_combo.obj \ + $(OBJS)\monolib_msw_combobox.obj \ + $(OBJS)\monolib_msw_control.obj \ + $(OBJS)\monolib_msw_dialog.obj \ + $(OBJS)\monolib_dirdlg.obj \ + $(OBJS)\monolib_dragimag.obj \ + $(OBJS)\monolib_evtloop.obj \ + $(OBJS)\monolib_filedlg.obj \ + $(OBJS)\monolib_frame.obj \ + $(OBJS)\monolib_msw_gauge.obj \ + $(OBJS)\monolib_headerctrl.obj \ + $(OBJS)\monolib_iniconf.obj \ + $(OBJS)\monolib_msw_listbox.obj \ + $(OBJS)\monolib_msw_listctrl.obj \ + $(OBJS)\monolib_mdi.obj \ + $(OBJS)\monolib_msw_menu.obj \ + $(OBJS)\monolib_menuitem.obj \ + $(OBJS)\monolib_metafile.obj \ + $(OBJS)\monolib_msgdlg.obj \ + $(OBJS)\monolib_nativdlg.obj \ + $(OBJS)\monolib_nativewin.obj \ + $(OBJS)\monolib_msw_notebook.obj \ + $(OBJS)\monolib_access.obj \ + $(OBJS)\monolib_ownerdrw.obj \ + $(OBJS)\monolib_msw_panel.obj \ + $(OBJS)\monolib_progdlg.obj \ + $(OBJS)\monolib_msw_radiobox.obj \ + $(OBJS)\monolib_msw_radiobut.obj \ + $(OBJS)\monolib_richmsgdlg.obj \ + $(OBJS)\monolib_msw_scrolbar.obj \ + $(OBJS)\monolib_msw_slider.obj \ + $(OBJS)\monolib_msw_spinbutt.obj \ + $(OBJS)\monolib_spinctrl.obj \ + $(OBJS)\monolib_msw_statbmp.obj \ + $(OBJS)\monolib_msw_statbox.obj \ + $(OBJS)\monolib_statusbar.obj \ + $(OBJS)\monolib_msw_statline.obj \ + $(OBJS)\monolib_msw_stattext.obj \ + $(OBJS)\monolib_msw_toolbar.obj \ + $(OBJS)\monolib_msw_textctrl.obj \ + $(OBJS)\monolib_textentry.obj \ + $(OBJS)\monolib_msw_tglbtn.obj \ + $(OBJS)\monolib_treectrl.obj \ + $(OBJS)\monolib_msw_checklst.obj \ + $(OBJS)\monolib_msw_fdrepdlg.obj \ + $(OBJS)\monolib_fontdlg.obj \ + $(OBJS)\monolib_accelcmn.obj \ + $(OBJS)\monolib_accesscmn.obj \ + $(OBJS)\monolib_anidecod.obj \ + $(OBJS)\monolib_affinematrix2d.obj \ + $(OBJS)\monolib_appcmn.obj \ + $(OBJS)\monolib_artprov.obj \ + $(OBJS)\monolib_artstd.obj \ + $(OBJS)\monolib_arttango.obj \ + $(OBJS)\monolib_bmpbase.obj \ + $(OBJS)\monolib_bmpbtncmn.obj \ + $(OBJS)\monolib_bookctrl.obj \ + $(OBJS)\monolib_btncmn.obj \ + $(OBJS)\monolib_cairo.obj \ + $(OBJS)\monolib_checkboxcmn.obj \ + $(OBJS)\monolib_checklstcmn.obj \ + $(OBJS)\monolib_choiccmn.obj \ + $(OBJS)\monolib_clipcmn.obj \ + $(OBJS)\monolib_clrpickercmn.obj \ + $(OBJS)\monolib_colourcmn.obj \ + $(OBJS)\monolib_colourdata.obj \ + $(OBJS)\monolib_combocmn.obj \ + $(OBJS)\monolib_cmdproc.obj \ + $(OBJS)\monolib_cmndata.obj \ + $(OBJS)\monolib_containr.obj \ + $(OBJS)\monolib_cshelp.obj \ + $(OBJS)\monolib_ctrlcmn.obj \ + $(OBJS)\monolib_ctrlsub.obj \ + $(OBJS)\monolib_dcbase.obj \ + $(OBJS)\monolib_dcbufcmn.obj \ + $(OBJS)\monolib_dcgraph.obj \ + $(OBJS)\monolib_dcsvg.obj \ + $(OBJS)\monolib_dirctrlcmn.obj \ + $(OBJS)\monolib_dlgcmn.obj \ + $(OBJS)\monolib_dndcmn.obj \ + $(OBJS)\monolib_dobjcmn.obj \ + $(OBJS)\monolib_docmdi.obj \ + $(OBJS)\monolib_docview.obj \ + $(OBJS)\monolib_dpycmn.obj \ + $(OBJS)\monolib_dseldlg.obj \ + $(OBJS)\monolib_effects.obj \ + $(OBJS)\monolib_fddlgcmn.obj \ + $(OBJS)\monolib_filectrlcmn.obj \ + $(OBJS)\monolib_filehistorycmn.obj \ + $(OBJS)\monolib_filepickercmn.obj \ + $(OBJS)\monolib_fontpickercmn.obj \ + $(OBJS)\monolib_fldlgcmn.obj \ + $(OBJS)\monolib_fontcmn.obj \ + $(OBJS)\monolib_fontdata.obj \ + $(OBJS)\monolib_graphicc.obj \ + $(OBJS)\monolib_fontenumcmn.obj \ + $(OBJS)\monolib_fontmap.obj \ + $(OBJS)\monolib_fontutilcmn.obj \ + $(OBJS)\monolib_framecmn.obj \ + $(OBJS)\monolib_gaugecmn.obj \ + $(OBJS)\monolib_gbsizer.obj \ + $(OBJS)\monolib_gdicmn.obj \ + $(OBJS)\monolib_geometry.obj \ + $(OBJS)\monolib_gifdecod.obj \ + $(OBJS)\monolib_graphcmn.obj \ + $(OBJS)\monolib_headercolcmn.obj \ + $(OBJS)\monolib_headerctrlcmn.obj \ + $(OBJS)\monolib_helpbase.obj \ + $(OBJS)\monolib_iconbndl.obj \ + $(OBJS)\monolib_imagall.obj \ + $(OBJS)\monolib_imagbmp.obj \ + $(OBJS)\monolib_image.obj \ + $(OBJS)\monolib_imagfill.obj \ + $(OBJS)\monolib_imaggif.obj \ + $(OBJS)\monolib_imagiff.obj \ + $(OBJS)\monolib_imagjpeg.obj \ + $(OBJS)\monolib_imagpcx.obj \ + $(OBJS)\monolib_imagpng.obj \ + $(OBJS)\monolib_imagpnm.obj \ + $(OBJS)\monolib_imagtga.obj \ + $(OBJS)\monolib_imagtiff.obj \ + $(OBJS)\monolib_imagxpm.obj \ + $(OBJS)\monolib_layout.obj \ + $(OBJS)\monolib_lboxcmn.obj \ + $(OBJS)\monolib_listctrlcmn.obj \ + $(OBJS)\monolib_markupparser.obj \ + $(OBJS)\monolib_matrix.obj \ + $(OBJS)\monolib_menucmn.obj \ + $(OBJS)\monolib_modalhook.obj \ + $(OBJS)\monolib_mousemanager.obj \ + $(OBJS)\monolib_nbkbase.obj \ + $(OBJS)\monolib_overlaycmn.obj \ + $(OBJS)\monolib_ownerdrwcmn.obj \ + $(OBJS)\monolib_paper.obj \ + $(OBJS)\monolib_panelcmn.obj \ + $(OBJS)\monolib_persist.obj \ + $(OBJS)\monolib_pickerbase.obj \ + $(OBJS)\monolib_popupcmn.obj \ + $(OBJS)\monolib_preferencescmn.obj \ + $(OBJS)\monolib_prntbase.obj \ + $(OBJS)\monolib_quantize.obj \ + $(OBJS)\monolib_radiobtncmn.obj \ + $(OBJS)\monolib_radiocmn.obj \ + $(OBJS)\monolib_rearrangectrl.obj \ + $(OBJS)\monolib_rendcmn.obj \ + $(OBJS)\monolib_rgncmn.obj \ + $(OBJS)\monolib_scrolbarcmn.obj \ + $(OBJS)\monolib_settcmn.obj \ + $(OBJS)\monolib_sizer.obj \ + $(OBJS)\monolib_slidercmn.obj \ + $(OBJS)\monolib_spinbtncmn.obj \ + $(OBJS)\monolib_spinctrlcmn.obj \ + $(OBJS)\monolib_srchcmn.obj \ + $(OBJS)\monolib_statbar.obj \ + $(OBJS)\monolib_statbmpcmn.obj \ + $(OBJS)\monolib_statboxcmn.obj \ + $(OBJS)\monolib_statlinecmn.obj \ + $(OBJS)\monolib_stattextcmn.obj \ + $(OBJS)\monolib_stockitem.obj \ + $(OBJS)\monolib_tbarbase.obj \ + $(OBJS)\monolib_textcmn.obj \ + $(OBJS)\monolib_textentrycmn.obj \ + $(OBJS)\monolib_textmeasurecmn.obj \ + $(OBJS)\monolib_toplvcmn.obj \ + $(OBJS)\monolib_treebase.obj \ + $(OBJS)\monolib_uiactioncmn.obj \ + $(OBJS)\monolib_valgen.obj \ + $(OBJS)\monolib_validate.obj \ + $(OBJS)\monolib_valtext.obj \ + $(OBJS)\monolib_valnum.obj \ + $(OBJS)\monolib_wincmn.obj \ + $(OBJS)\monolib_windowid.obj \ + $(OBJS)\monolib_wrapsizer.obj \ + $(OBJS)\monolib_xpmdecod.obj \ + $(OBJS)\monolib_busyinfo.obj \ + $(OBJS)\monolib_generic_buttonbar.obj \ + $(OBJS)\monolib_choicdgg.obj \ + $(OBJS)\monolib_choicbkg.obj \ + $(OBJS)\monolib_combog.obj \ + $(OBJS)\monolib_dcpsg.obj \ + $(OBJS)\monolib_dirctrlg.obj \ + $(OBJS)\monolib_dragimgg.obj \ + $(OBJS)\monolib_filectrlg.obj \ + $(OBJS)\monolib_headerctrlg.obj \ + $(OBJS)\monolib_infobar.obj \ + $(OBJS)\monolib_listbkg.obj \ + $(OBJS)\monolib_logg.obj \ + $(OBJS)\monolib_markuptext.obj \ + $(OBJS)\monolib_msgdlgg.obj \ + $(OBJS)\monolib_numdlgg.obj \ + $(OBJS)\monolib_progdlgg.obj \ + $(OBJS)\monolib_preferencesg.obj \ + $(OBJS)\monolib_printps.obj \ + $(OBJS)\monolib_renderg.obj \ + $(OBJS)\monolib_richmsgdlgg.obj \ + $(OBJS)\monolib_scrlwing.obj \ + $(OBJS)\monolib_selstore.obj \ + $(OBJS)\monolib_spinctlg.obj \ + $(OBJS)\monolib_splitter.obj \ + $(OBJS)\monolib_srchctlg.obj \ + $(OBJS)\monolib_statbmpg.obj \ + $(OBJS)\monolib_stattextg.obj \ + $(OBJS)\monolib_textdlgg.obj \ + $(OBJS)\monolib_tipwin.obj \ + $(OBJS)\monolib_toolbkg.obj \ + $(OBJS)\monolib_treectlg.obj \ + $(OBJS)\monolib_treebkg.obj \ + $(OBJS)\monolib_vlbox.obj \ + $(OBJS)\monolib_vscroll.obj \ + $(OBJS)\monolib_xmlreshandler.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "1" +____CORE_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_activex.obj \ + $(OBJS)\monolib_app.obj \ + $(OBJS)\monolib_bitmap.obj \ + $(OBJS)\monolib_brush.obj \ + $(OBJS)\monolib_caret.obj \ + $(OBJS)\monolib_clipbrd.obj \ + $(OBJS)\monolib_colour.obj \ + $(OBJS)\monolib_cursor.obj \ + $(OBJS)\monolib_data.obj \ + $(OBJS)\monolib_dc.obj \ + $(OBJS)\monolib_dcclient.obj \ + $(OBJS)\monolib_dcmemory.obj \ + $(OBJS)\monolib_dcprint.obj \ + $(OBJS)\monolib_dcscreen.obj \ + $(OBJS)\monolib_dialup.obj \ + $(OBJS)\monolib_dib.obj \ + $(OBJS)\monolib_display.obj \ + $(OBJS)\monolib_enhmeta.obj \ + $(OBJS)\monolib_font.obj \ + $(OBJS)\monolib_fontenum.obj \ + $(OBJS)\monolib_fontutil.obj \ + $(OBJS)\monolib_gdiimage.obj \ + $(OBJS)\monolib_gdiobj.obj \ + $(OBJS)\monolib_gdiplus.obj \ + $(OBJS)\monolib_graphics.obj \ + $(OBJS)\monolib_icon.obj \ + $(OBJS)\monolib_imaglist.obj \ + $(OBJS)\monolib_minifram.obj \ + $(OBJS)\monolib_nonownedwnd.obj \ + $(OBJS)\monolib_dataobj.obj \ + $(OBJS)\monolib_dropsrc.obj \ + $(OBJS)\monolib_droptgt.obj \ + $(OBJS)\monolib_oleutils.obj \ + $(OBJS)\monolib_safearray.obj \ + $(OBJS)\monolib_palette.obj \ + $(OBJS)\monolib_pen.obj \ + $(OBJS)\monolib_popupwin.obj \ + $(OBJS)\monolib_printdlg.obj \ + $(OBJS)\monolib_printwin.obj \ + $(OBJS)\monolib_region.obj \ + $(OBJS)\monolib_renderer.obj \ + $(OBJS)\monolib_settings.obj \ + $(OBJS)\monolib_textmeasure.obj \ + $(OBJS)\monolib_tooltip.obj \ + $(OBJS)\monolib_toplevel.obj \ + $(OBJS)\monolib_uiaction.obj \ + $(OBJS)\monolib_utilsgui.obj \ + $(OBJS)\monolib_utilswin.obj \ + $(OBJS)\monolib_uxtheme.obj \ + $(OBJS)\monolib_window.obj \ + $(OBJS)\monolib_helpchm.obj \ + $(OBJS)\monolib_helpwin.obj \ + $(OBJS)\monolib_automtn.obj \ + $(OBJS)\monolib_uuid.obj \ + $(OBJS)\monolib_evtloop.obj \ + $(OBJS)\monolib_generic_accel.obj \ + $(OBJS)\monolib_clrpickerg.obj \ + $(OBJS)\monolib_collpaneg.obj \ + $(OBJS)\monolib_colrdlgg.obj \ + $(OBJS)\monolib_dirdlgg.obj \ + $(OBJS)\monolib_generic_fdrepdlg.obj \ + $(OBJS)\monolib_filedlgg.obj \ + $(OBJS)\monolib_filepickerg.obj \ + $(OBJS)\monolib_fontdlgg.obj \ + $(OBJS)\monolib_fontpickerg.obj \ + $(OBJS)\monolib_generic_listctrl.obj \ + $(OBJS)\monolib_mdig.obj \ + $(OBJS)\monolib_prntdlgg.obj \ + $(OBJS)\monolib_univ_bmpbuttn.obj \ + $(OBJS)\monolib_univ_button.obj \ + $(OBJS)\monolib_univ_checkbox.obj \ + $(OBJS)\monolib_univ_checklst.obj \ + $(OBJS)\monolib_univ_choice.obj \ + $(OBJS)\monolib_univ_combobox.obj \ + $(OBJS)\monolib_univ_control.obj \ + $(OBJS)\monolib_ctrlrend.obj \ + $(OBJS)\monolib_univ_dialog.obj \ + $(OBJS)\monolib_framuniv.obj \ + $(OBJS)\monolib_univ_gauge.obj \ + $(OBJS)\monolib_inpcons.obj \ + $(OBJS)\monolib_inphand.obj \ + $(OBJS)\monolib_univ_listbox.obj \ + $(OBJS)\monolib_univ_menu.obj \ + $(OBJS)\monolib_univ_notebook.obj \ + $(OBJS)\monolib_univ_radiobox.obj \ + $(OBJS)\monolib_univ_radiobut.obj \ + $(OBJS)\monolib_scrarrow.obj \ + $(OBJS)\monolib_univ_scrolbar.obj \ + $(OBJS)\monolib_scrthumb.obj \ + $(OBJS)\monolib_settingsuniv.obj \ + $(OBJS)\monolib_univ_slider.obj \ + $(OBJS)\monolib_univ_spinbutt.obj \ + $(OBJS)\monolib_univ_statbmp.obj \ + $(OBJS)\monolib_univ_statbox.obj \ + $(OBJS)\monolib_univ_statline.obj \ + $(OBJS)\monolib_univ_stattext.obj \ + $(OBJS)\monolib_univ_statusbr.obj \ + $(OBJS)\monolib_stdrend.obj \ + $(OBJS)\monolib_univ_textctrl.obj \ + $(OBJS)\monolib_univ_tglbtn.obj \ + $(OBJS)\monolib_theme.obj \ + $(OBJS)\monolib_univ_toolbar.obj \ + $(OBJS)\monolib_topluniv.obj \ + $(OBJS)\monolib_winuniv.obj \ + $(OBJS)\monolib_gtk.obj \ + $(OBJS)\monolib_metal.obj \ + $(OBJS)\monolib_mono.obj \ + $(OBJS)\monolib_win32.obj \ + $(OBJS)\monolib_accelcmn.obj \ + $(OBJS)\monolib_accesscmn.obj \ + $(OBJS)\monolib_anidecod.obj \ + $(OBJS)\monolib_affinematrix2d.obj \ + $(OBJS)\monolib_appcmn.obj \ + $(OBJS)\monolib_artprov.obj \ + $(OBJS)\monolib_artstd.obj \ + $(OBJS)\monolib_arttango.obj \ + $(OBJS)\monolib_bmpbase.obj \ + $(OBJS)\monolib_bmpbtncmn.obj \ + $(OBJS)\monolib_bookctrl.obj \ + $(OBJS)\monolib_btncmn.obj \ + $(OBJS)\monolib_cairo.obj \ + $(OBJS)\monolib_checkboxcmn.obj \ + $(OBJS)\monolib_checklstcmn.obj \ + $(OBJS)\monolib_choiccmn.obj \ + $(OBJS)\monolib_clipcmn.obj \ + $(OBJS)\monolib_clrpickercmn.obj \ + $(OBJS)\monolib_colourcmn.obj \ + $(OBJS)\monolib_colourdata.obj \ + $(OBJS)\monolib_combocmn.obj \ + $(OBJS)\monolib_cmdproc.obj \ + $(OBJS)\monolib_cmndata.obj \ + $(OBJS)\monolib_containr.obj \ + $(OBJS)\monolib_cshelp.obj \ + $(OBJS)\monolib_ctrlcmn.obj \ + $(OBJS)\monolib_ctrlsub.obj \ + $(OBJS)\monolib_dcbase.obj \ + $(OBJS)\monolib_dcbufcmn.obj \ + $(OBJS)\monolib_dcgraph.obj \ + $(OBJS)\monolib_dcsvg.obj \ + $(OBJS)\monolib_dirctrlcmn.obj \ + $(OBJS)\monolib_dlgcmn.obj \ + $(OBJS)\monolib_dndcmn.obj \ + $(OBJS)\monolib_dobjcmn.obj \ + $(OBJS)\monolib_docmdi.obj \ + $(OBJS)\monolib_docview.obj \ + $(OBJS)\monolib_dpycmn.obj \ + $(OBJS)\monolib_dseldlg.obj \ + $(OBJS)\monolib_effects.obj \ + $(OBJS)\monolib_fddlgcmn.obj \ + $(OBJS)\monolib_filectrlcmn.obj \ + $(OBJS)\monolib_filehistorycmn.obj \ + $(OBJS)\monolib_filepickercmn.obj \ + $(OBJS)\monolib_fontpickercmn.obj \ + $(OBJS)\monolib_fldlgcmn.obj \ + $(OBJS)\monolib_fontcmn.obj \ + $(OBJS)\monolib_fontdata.obj \ + $(OBJS)\monolib_graphicc.obj \ + $(OBJS)\monolib_fontenumcmn.obj \ + $(OBJS)\monolib_fontmap.obj \ + $(OBJS)\monolib_fontutilcmn.obj \ + $(OBJS)\monolib_framecmn.obj \ + $(OBJS)\monolib_gaugecmn.obj \ + $(OBJS)\monolib_gbsizer.obj \ + $(OBJS)\monolib_gdicmn.obj \ + $(OBJS)\monolib_geometry.obj \ + $(OBJS)\monolib_gifdecod.obj \ + $(OBJS)\monolib_graphcmn.obj \ + $(OBJS)\monolib_headercolcmn.obj \ + $(OBJS)\monolib_headerctrlcmn.obj \ + $(OBJS)\monolib_helpbase.obj \ + $(OBJS)\monolib_iconbndl.obj \ + $(OBJS)\monolib_imagall.obj \ + $(OBJS)\monolib_imagbmp.obj \ + $(OBJS)\monolib_image.obj \ + $(OBJS)\monolib_imagfill.obj \ + $(OBJS)\monolib_imaggif.obj \ + $(OBJS)\monolib_imagiff.obj \ + $(OBJS)\monolib_imagjpeg.obj \ + $(OBJS)\monolib_imagpcx.obj \ + $(OBJS)\monolib_imagpng.obj \ + $(OBJS)\monolib_imagpnm.obj \ + $(OBJS)\monolib_imagtga.obj \ + $(OBJS)\monolib_imagtiff.obj \ + $(OBJS)\monolib_imagxpm.obj \ + $(OBJS)\monolib_layout.obj \ + $(OBJS)\monolib_lboxcmn.obj \ + $(OBJS)\monolib_listctrlcmn.obj \ + $(OBJS)\monolib_markupparser.obj \ + $(OBJS)\monolib_matrix.obj \ + $(OBJS)\monolib_menucmn.obj \ + $(OBJS)\monolib_modalhook.obj \ + $(OBJS)\monolib_mousemanager.obj \ + $(OBJS)\monolib_nbkbase.obj \ + $(OBJS)\monolib_overlaycmn.obj \ + $(OBJS)\monolib_ownerdrwcmn.obj \ + $(OBJS)\monolib_paper.obj \ + $(OBJS)\monolib_panelcmn.obj \ + $(OBJS)\monolib_persist.obj \ + $(OBJS)\monolib_pickerbase.obj \ + $(OBJS)\monolib_popupcmn.obj \ + $(OBJS)\monolib_preferencescmn.obj \ + $(OBJS)\monolib_prntbase.obj \ + $(OBJS)\monolib_quantize.obj \ + $(OBJS)\monolib_radiobtncmn.obj \ + $(OBJS)\monolib_radiocmn.obj \ + $(OBJS)\monolib_rearrangectrl.obj \ + $(OBJS)\monolib_rendcmn.obj \ + $(OBJS)\monolib_rgncmn.obj \ + $(OBJS)\monolib_scrolbarcmn.obj \ + $(OBJS)\monolib_settcmn.obj \ + $(OBJS)\monolib_sizer.obj \ + $(OBJS)\monolib_slidercmn.obj \ + $(OBJS)\monolib_spinbtncmn.obj \ + $(OBJS)\monolib_spinctrlcmn.obj \ + $(OBJS)\monolib_srchcmn.obj \ + $(OBJS)\monolib_statbar.obj \ + $(OBJS)\monolib_statbmpcmn.obj \ + $(OBJS)\monolib_statboxcmn.obj \ + $(OBJS)\monolib_statlinecmn.obj \ + $(OBJS)\monolib_stattextcmn.obj \ + $(OBJS)\monolib_stockitem.obj \ + $(OBJS)\monolib_tbarbase.obj \ + $(OBJS)\monolib_textcmn.obj \ + $(OBJS)\monolib_textentrycmn.obj \ + $(OBJS)\monolib_textmeasurecmn.obj \ + $(OBJS)\monolib_toplvcmn.obj \ + $(OBJS)\monolib_treebase.obj \ + $(OBJS)\monolib_uiactioncmn.obj \ + $(OBJS)\monolib_valgen.obj \ + $(OBJS)\monolib_validate.obj \ + $(OBJS)\monolib_valtext.obj \ + $(OBJS)\monolib_valnum.obj \ + $(OBJS)\monolib_wincmn.obj \ + $(OBJS)\monolib_windowid.obj \ + $(OBJS)\monolib_wrapsizer.obj \ + $(OBJS)\monolib_xpmdecod.obj \ + $(OBJS)\monolib_busyinfo.obj \ + $(OBJS)\monolib_generic_buttonbar.obj \ + $(OBJS)\monolib_choicdgg.obj \ + $(OBJS)\monolib_choicbkg.obj \ + $(OBJS)\monolib_combog.obj \ + $(OBJS)\monolib_dcpsg.obj \ + $(OBJS)\monolib_dirctrlg.obj \ + $(OBJS)\monolib_dragimgg.obj \ + $(OBJS)\monolib_filectrlg.obj \ + $(OBJS)\monolib_headerctrlg.obj \ + $(OBJS)\monolib_infobar.obj \ + $(OBJS)\monolib_listbkg.obj \ + $(OBJS)\monolib_logg.obj \ + $(OBJS)\monolib_markuptext.obj \ + $(OBJS)\monolib_msgdlgg.obj \ + $(OBJS)\monolib_numdlgg.obj \ + $(OBJS)\monolib_progdlgg.obj \ + $(OBJS)\monolib_preferencesg.obj \ + $(OBJS)\monolib_printps.obj \ + $(OBJS)\monolib_renderg.obj \ + $(OBJS)\monolib_richmsgdlgg.obj \ + $(OBJS)\monolib_scrlwing.obj \ + $(OBJS)\monolib_selstore.obj \ + $(OBJS)\monolib_spinctlg.obj \ + $(OBJS)\monolib_splitter.obj \ + $(OBJS)\monolib_srchctlg.obj \ + $(OBJS)\monolib_statbmpg.obj \ + $(OBJS)\monolib_stattextg.obj \ + $(OBJS)\monolib_textdlgg.obj \ + $(OBJS)\monolib_tipwin.obj \ + $(OBJS)\monolib_toolbkg.obj \ + $(OBJS)\monolib_treectlg.obj \ + $(OBJS)\monolib_treebkg.obj \ + $(OBJS)\monolib_vlbox.obj \ + $(OBJS)\monolib_vscroll.obj \ + $(OBJS)\monolib_xmlreshandler.obj +!endif +!if "$(WXUNIV)" == "0" +____ADVANCED_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_animatecmn.obj \ + $(OBJS)\monolib_bmpcboxcmn.obj \ + $(OBJS)\monolib_calctrlcmn.obj \ + $(OBJS)\monolib_datavcmn.obj \ + $(OBJS)\monolib_gridcmn.obj \ + $(OBJS)\monolib_hyperlnkcmn.obj \ + $(OBJS)\monolib_odcombocmn.obj \ + $(OBJS)\monolib_richtooltipcmn.obj \ + $(OBJS)\monolib_aboutdlgg.obj \ + $(OBJS)\monolib_bannerwindow.obj \ + $(OBJS)\monolib_bmpcboxg.obj \ + $(OBJS)\monolib_calctrlg.obj \ + $(OBJS)\monolib_commandlinkbuttong.obj \ + $(OBJS)\monolib_datavgen.obj \ + $(OBJS)\monolib_datectlg.obj \ + $(OBJS)\monolib_editlbox.obj \ + $(OBJS)\monolib_grid.obj \ + $(OBJS)\monolib_gridctrl.obj \ + $(OBJS)\monolib_grideditors.obj \ + $(OBJS)\monolib_gridsel.obj \ + $(OBJS)\monolib_helpext.obj \ + $(OBJS)\monolib_hyperlinkg.obj \ + $(OBJS)\monolib_laywin.obj \ + $(OBJS)\monolib_notifmsgg.obj \ + $(OBJS)\monolib_odcombo.obj \ + $(OBJS)\monolib_propdlg.obj \ + $(OBJS)\monolib_richtooltipg.obj \ + $(OBJS)\monolib_sashwin.obj \ + $(OBJS)\monolib_splash.obj \ + $(OBJS)\monolib_timectrlg.obj \ + $(OBJS)\monolib_tipdlg.obj \ + $(OBJS)\monolib_treelist.obj \ + $(OBJS)\monolib_wizard.obj \ + $(OBJS)\monolib_taskbarcmn.obj \ + $(OBJS)\monolib_aboutdlg.obj \ + $(OBJS)\monolib_notifmsg.obj \ + $(OBJS)\monolib_richtooltip.obj \ + $(OBJS)\monolib_sound.obj \ + $(OBJS)\monolib_taskbar.obj \ + $(OBJS)\monolib_joystick.obj \ + $(OBJS)\monolib_animateg.obj \ + $(OBJS)\monolib_bmpcbox.obj \ + $(OBJS)\monolib_calctrl.obj \ + $(OBJS)\monolib_commandlinkbutton.obj \ + $(OBJS)\monolib_datecontrols.obj \ + $(OBJS)\monolib_datectrl.obj \ + $(OBJS)\monolib_datetimectrl.obj \ + $(OBJS)\monolib_hyperlink.obj \ + $(OBJS)\monolib_timectrl.obj +!endif +!if "$(WXUNIV)" == "1" +____ADVANCED_SRC_FILENAMES_1_OBJECTS = \ + $(OBJS)\monolib_animatecmn.obj \ + $(OBJS)\monolib_bmpcboxcmn.obj \ + $(OBJS)\monolib_calctrlcmn.obj \ + $(OBJS)\monolib_datavcmn.obj \ + $(OBJS)\monolib_gridcmn.obj \ + $(OBJS)\monolib_hyperlnkcmn.obj \ + $(OBJS)\monolib_odcombocmn.obj \ + $(OBJS)\monolib_richtooltipcmn.obj \ + $(OBJS)\monolib_aboutdlgg.obj \ + $(OBJS)\monolib_bannerwindow.obj \ + $(OBJS)\monolib_bmpcboxg.obj \ + $(OBJS)\monolib_calctrlg.obj \ + $(OBJS)\monolib_commandlinkbuttong.obj \ + $(OBJS)\monolib_datavgen.obj \ + $(OBJS)\monolib_datectlg.obj \ + $(OBJS)\monolib_editlbox.obj \ + $(OBJS)\monolib_grid.obj \ + $(OBJS)\monolib_gridctrl.obj \ + $(OBJS)\monolib_grideditors.obj \ + $(OBJS)\monolib_gridsel.obj \ + $(OBJS)\monolib_helpext.obj \ + $(OBJS)\monolib_hyperlinkg.obj \ + $(OBJS)\monolib_laywin.obj \ + $(OBJS)\monolib_notifmsgg.obj \ + $(OBJS)\monolib_odcombo.obj \ + $(OBJS)\monolib_propdlg.obj \ + $(OBJS)\monolib_richtooltipg.obj \ + $(OBJS)\monolib_sashwin.obj \ + $(OBJS)\monolib_splash.obj \ + $(OBJS)\monolib_timectrlg.obj \ + $(OBJS)\monolib_tipdlg.obj \ + $(OBJS)\monolib_treelist.obj \ + $(OBJS)\monolib_wizard.obj \ + $(OBJS)\monolib_taskbarcmn.obj \ + $(OBJS)\monolib_aboutdlg.obj \ + $(OBJS)\monolib_notifmsg.obj \ + $(OBJS)\monolib_richtooltip.obj \ + $(OBJS)\monolib_sound.obj \ + $(OBJS)\monolib_taskbar.obj \ + $(OBJS)\monolib_joystick.obj \ + $(OBJS)\monolib_animateg.obj +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +__basedll___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_139 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_139 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_139 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_139 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_147 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_147 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +__baselib___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_162 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_162 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxbase_namedll_DEP = $(__basedll___depname) +!endif +!if "$(SHARED)" == "0" +____wxbase_namelib_DEP = $(__baselib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +__netdll___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_170 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_170 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_170 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_170 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_178 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_178 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +__netlib___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_193 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_193 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxnet_namedll_DEP = $(__netdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxnet_namelib_DEP = $(__netlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" +__coredll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_201 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_201 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_201 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_201 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_209 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_209 = $(__THREADSFLAG) +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "0" +____CORE_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\coredll_activex.obj \ + $(OBJS)\coredll_app.obj \ + $(OBJS)\coredll_bitmap.obj \ + $(OBJS)\coredll_brush.obj \ + $(OBJS)\coredll_caret.obj \ + $(OBJS)\coredll_clipbrd.obj \ + $(OBJS)\coredll_colour.obj \ + $(OBJS)\coredll_cursor.obj \ + $(OBJS)\coredll_data.obj \ + $(OBJS)\coredll_dc.obj \ + $(OBJS)\coredll_dcclient.obj \ + $(OBJS)\coredll_dcmemory.obj \ + $(OBJS)\coredll_dcprint.obj \ + $(OBJS)\coredll_dcscreen.obj \ + $(OBJS)\coredll_dialup.obj \ + $(OBJS)\coredll_dib.obj \ + $(OBJS)\coredll_display.obj \ + $(OBJS)\coredll_enhmeta.obj \ + $(OBJS)\coredll_font.obj \ + $(OBJS)\coredll_fontenum.obj \ + $(OBJS)\coredll_fontutil.obj \ + $(OBJS)\coredll_gdiimage.obj \ + $(OBJS)\coredll_gdiobj.obj \ + $(OBJS)\coredll_gdiplus.obj \ + $(OBJS)\coredll_graphics.obj \ + $(OBJS)\coredll_icon.obj \ + $(OBJS)\coredll_imaglist.obj \ + $(OBJS)\coredll_minifram.obj \ + $(OBJS)\coredll_nonownedwnd.obj \ + $(OBJS)\coredll_dataobj.obj \ + $(OBJS)\coredll_dropsrc.obj \ + $(OBJS)\coredll_droptgt.obj \ + $(OBJS)\coredll_oleutils.obj \ + $(OBJS)\coredll_safearray.obj \ + $(OBJS)\coredll_palette.obj \ + $(OBJS)\coredll_pen.obj \ + $(OBJS)\coredll_popupwin.obj \ + $(OBJS)\coredll_printdlg.obj \ + $(OBJS)\coredll_printwin.obj \ + $(OBJS)\coredll_region.obj \ + $(OBJS)\coredll_renderer.obj \ + $(OBJS)\coredll_settings.obj \ + $(OBJS)\coredll_textmeasure.obj \ + $(OBJS)\coredll_tooltip.obj \ + $(OBJS)\coredll_toplevel.obj \ + $(OBJS)\coredll_uiaction.obj \ + $(OBJS)\coredll_utilsgui.obj \ + $(OBJS)\coredll_utilswin.obj \ + $(OBJS)\coredll_uxtheme.obj \ + $(OBJS)\coredll_window.obj \ + $(OBJS)\coredll_helpchm.obj \ + $(OBJS)\coredll_helpwin.obj \ + $(OBJS)\coredll_automtn.obj \ + $(OBJS)\coredll_uuid.obj \ + $(OBJS)\coredll_clrpickerg.obj \ + $(OBJS)\coredll_collpaneg.obj \ + $(OBJS)\coredll_filepickerg.obj \ + $(OBJS)\coredll_fontpickerg.obj \ + $(OBJS)\coredll_generic_statusbr.obj \ + $(OBJS)\coredll_prntdlgg.obj \ + $(OBJS)\coredll_msw_accel.obj \ + $(OBJS)\coredll_anybutton.obj \ + $(OBJS)\coredll_artmsw.obj \ + $(OBJS)\coredll_msw_bmpbuttn.obj \ + $(OBJS)\coredll_msw_button.obj \ + $(OBJS)\coredll_msw_checkbox.obj \ + $(OBJS)\coredll_msw_choice.obj \ + $(OBJS)\coredll_colordlg.obj \ + $(OBJS)\coredll_combo.obj \ + $(OBJS)\coredll_msw_combobox.obj \ + $(OBJS)\coredll_msw_control.obj \ + $(OBJS)\coredll_msw_dialog.obj \ + $(OBJS)\coredll_dirdlg.obj \ + $(OBJS)\coredll_dragimag.obj \ + $(OBJS)\coredll_evtloop.obj \ + $(OBJS)\coredll_filedlg.obj \ + $(OBJS)\coredll_frame.obj \ + $(OBJS)\coredll_msw_gauge.obj \ + $(OBJS)\coredll_headerctrl.obj \ + $(OBJS)\coredll_iniconf.obj \ + $(OBJS)\coredll_msw_listbox.obj \ + $(OBJS)\coredll_msw_listctrl.obj \ + $(OBJS)\coredll_mdi.obj \ + $(OBJS)\coredll_msw_menu.obj \ + $(OBJS)\coredll_menuitem.obj \ + $(OBJS)\coredll_metafile.obj \ + $(OBJS)\coredll_msgdlg.obj \ + $(OBJS)\coredll_nativdlg.obj \ + $(OBJS)\coredll_nativewin.obj \ + $(OBJS)\coredll_msw_notebook.obj \ + $(OBJS)\coredll_access.obj \ + $(OBJS)\coredll_ownerdrw.obj \ + $(OBJS)\coredll_panel.obj \ + $(OBJS)\coredll_progdlg.obj \ + $(OBJS)\coredll_msw_radiobox.obj \ + $(OBJS)\coredll_msw_radiobut.obj \ + $(OBJS)\coredll_richmsgdlg.obj \ + $(OBJS)\coredll_msw_scrolbar.obj \ + $(OBJS)\coredll_msw_slider.obj \ + $(OBJS)\coredll_msw_spinbutt.obj \ + $(OBJS)\coredll_spinctrl.obj \ + $(OBJS)\coredll_msw_statbmp.obj \ + $(OBJS)\coredll_msw_statbox.obj \ + $(OBJS)\coredll_statusbar.obj \ + $(OBJS)\coredll_msw_statline.obj \ + $(OBJS)\coredll_msw_stattext.obj \ + $(OBJS)\coredll_msw_toolbar.obj \ + $(OBJS)\coredll_msw_textctrl.obj \ + $(OBJS)\coredll_textentry.obj \ + $(OBJS)\coredll_msw_tglbtn.obj \ + $(OBJS)\coredll_treectrl.obj \ + $(OBJS)\coredll_msw_checklst.obj \ + $(OBJS)\coredll_msw_fdrepdlg.obj \ + $(OBJS)\coredll_fontdlg.obj \ + $(OBJS)\coredll_accelcmn.obj \ + $(OBJS)\coredll_accesscmn.obj \ + $(OBJS)\coredll_anidecod.obj \ + $(OBJS)\coredll_affinematrix2d.obj \ + $(OBJS)\coredll_appcmn.obj \ + $(OBJS)\coredll_artprov.obj \ + $(OBJS)\coredll_artstd.obj \ + $(OBJS)\coredll_arttango.obj \ + $(OBJS)\coredll_bmpbase.obj \ + $(OBJS)\coredll_bmpbtncmn.obj \ + $(OBJS)\coredll_bookctrl.obj \ + $(OBJS)\coredll_btncmn.obj \ + $(OBJS)\coredll_cairo.obj \ + $(OBJS)\coredll_checkboxcmn.obj \ + $(OBJS)\coredll_checklstcmn.obj \ + $(OBJS)\coredll_choiccmn.obj \ + $(OBJS)\coredll_clipcmn.obj \ + $(OBJS)\coredll_clrpickercmn.obj \ + $(OBJS)\coredll_colourcmn.obj \ + $(OBJS)\coredll_colourdata.obj \ + $(OBJS)\coredll_combocmn.obj \ + $(OBJS)\coredll_cmdproc.obj \ + $(OBJS)\coredll_cmndata.obj \ + $(OBJS)\coredll_containr.obj \ + $(OBJS)\coredll_cshelp.obj \ + $(OBJS)\coredll_ctrlcmn.obj \ + $(OBJS)\coredll_ctrlsub.obj \ + $(OBJS)\coredll_dcbase.obj \ + $(OBJS)\coredll_dcbufcmn.obj \ + $(OBJS)\coredll_dcgraph.obj \ + $(OBJS)\coredll_dcsvg.obj \ + $(OBJS)\coredll_dirctrlcmn.obj \ + $(OBJS)\coredll_dlgcmn.obj \ + $(OBJS)\coredll_dndcmn.obj \ + $(OBJS)\coredll_dobjcmn.obj \ + $(OBJS)\coredll_docmdi.obj \ + $(OBJS)\coredll_docview.obj \ + $(OBJS)\coredll_dpycmn.obj \ + $(OBJS)\coredll_dseldlg.obj \ + $(OBJS)\coredll_effects.obj \ + $(OBJS)\coredll_fddlgcmn.obj \ + $(OBJS)\coredll_filectrlcmn.obj \ + $(OBJS)\coredll_filehistorycmn.obj \ + $(OBJS)\coredll_filepickercmn.obj \ + $(OBJS)\coredll_fontpickercmn.obj \ + $(OBJS)\coredll_fldlgcmn.obj \ + $(OBJS)\coredll_fontcmn.obj \ + $(OBJS)\coredll_fontdata.obj \ + $(OBJS)\coredll_graphicc.obj \ + $(OBJS)\coredll_fontenumcmn.obj \ + $(OBJS)\coredll_fontmap.obj \ + $(OBJS)\coredll_fontutilcmn.obj \ + $(OBJS)\coredll_framecmn.obj \ + $(OBJS)\coredll_gaugecmn.obj \ + $(OBJS)\coredll_gbsizer.obj \ + $(OBJS)\coredll_gdicmn.obj \ + $(OBJS)\coredll_geometry.obj \ + $(OBJS)\coredll_gifdecod.obj \ + $(OBJS)\coredll_graphcmn.obj \ + $(OBJS)\coredll_headercolcmn.obj \ + $(OBJS)\coredll_headerctrlcmn.obj \ + $(OBJS)\coredll_helpbase.obj \ + $(OBJS)\coredll_iconbndl.obj \ + $(OBJS)\coredll_imagall.obj \ + $(OBJS)\coredll_imagbmp.obj \ + $(OBJS)\coredll_image.obj \ + $(OBJS)\coredll_imagfill.obj \ + $(OBJS)\coredll_imaggif.obj \ + $(OBJS)\coredll_imagiff.obj \ + $(OBJS)\coredll_imagjpeg.obj \ + $(OBJS)\coredll_imagpcx.obj \ + $(OBJS)\coredll_imagpng.obj \ + $(OBJS)\coredll_imagpnm.obj \ + $(OBJS)\coredll_imagtga.obj \ + $(OBJS)\coredll_imagtiff.obj \ + $(OBJS)\coredll_imagxpm.obj \ + $(OBJS)\coredll_layout.obj \ + $(OBJS)\coredll_lboxcmn.obj \ + $(OBJS)\coredll_listctrlcmn.obj \ + $(OBJS)\coredll_markupparser.obj \ + $(OBJS)\coredll_matrix.obj \ + $(OBJS)\coredll_menucmn.obj \ + $(OBJS)\coredll_modalhook.obj \ + $(OBJS)\coredll_mousemanager.obj \ + $(OBJS)\coredll_nbkbase.obj \ + $(OBJS)\coredll_overlaycmn.obj \ + $(OBJS)\coredll_ownerdrwcmn.obj \ + $(OBJS)\coredll_paper.obj \ + $(OBJS)\coredll_panelcmn.obj \ + $(OBJS)\coredll_persist.obj \ + $(OBJS)\coredll_pickerbase.obj \ + $(OBJS)\coredll_popupcmn.obj \ + $(OBJS)\coredll_preferencescmn.obj \ + $(OBJS)\coredll_prntbase.obj \ + $(OBJS)\coredll_quantize.obj \ + $(OBJS)\coredll_radiobtncmn.obj \ + $(OBJS)\coredll_radiocmn.obj \ + $(OBJS)\coredll_rearrangectrl.obj \ + $(OBJS)\coredll_rendcmn.obj \ + $(OBJS)\coredll_rgncmn.obj \ + $(OBJS)\coredll_scrolbarcmn.obj \ + $(OBJS)\coredll_settcmn.obj \ + $(OBJS)\coredll_sizer.obj \ + $(OBJS)\coredll_slidercmn.obj \ + $(OBJS)\coredll_spinbtncmn.obj \ + $(OBJS)\coredll_spinctrlcmn.obj \ + $(OBJS)\coredll_srchcmn.obj \ + $(OBJS)\coredll_statbar.obj \ + $(OBJS)\coredll_statbmpcmn.obj \ + $(OBJS)\coredll_statboxcmn.obj \ + $(OBJS)\coredll_statlinecmn.obj \ + $(OBJS)\coredll_stattextcmn.obj \ + $(OBJS)\coredll_stockitem.obj \ + $(OBJS)\coredll_tbarbase.obj \ + $(OBJS)\coredll_textcmn.obj \ + $(OBJS)\coredll_textentrycmn.obj \ + $(OBJS)\coredll_textmeasurecmn.obj \ + $(OBJS)\coredll_toplvcmn.obj \ + $(OBJS)\coredll_treebase.obj \ + $(OBJS)\coredll_uiactioncmn.obj \ + $(OBJS)\coredll_valgen.obj \ + $(OBJS)\coredll_validate.obj \ + $(OBJS)\coredll_valtext.obj \ + $(OBJS)\coredll_valnum.obj \ + $(OBJS)\coredll_wincmn.obj \ + $(OBJS)\coredll_windowid.obj \ + $(OBJS)\coredll_wrapsizer.obj \ + $(OBJS)\coredll_xpmdecod.obj \ + $(OBJS)\coredll_busyinfo.obj \ + $(OBJS)\coredll_buttonbar.obj \ + $(OBJS)\coredll_choicdgg.obj \ + $(OBJS)\coredll_choicbkg.obj \ + $(OBJS)\coredll_combog.obj \ + $(OBJS)\coredll_dcpsg.obj \ + $(OBJS)\coredll_dirctrlg.obj \ + $(OBJS)\coredll_dragimgg.obj \ + $(OBJS)\coredll_filectrlg.obj \ + $(OBJS)\coredll_headerctrlg.obj \ + $(OBJS)\coredll_infobar.obj \ + $(OBJS)\coredll_listbkg.obj \ + $(OBJS)\coredll_logg.obj \ + $(OBJS)\coredll_markuptext.obj \ + $(OBJS)\coredll_msgdlgg.obj \ + $(OBJS)\coredll_numdlgg.obj \ + $(OBJS)\coredll_progdlgg.obj \ + $(OBJS)\coredll_preferencesg.obj \ + $(OBJS)\coredll_printps.obj \ + $(OBJS)\coredll_renderg.obj \ + $(OBJS)\coredll_richmsgdlgg.obj \ + $(OBJS)\coredll_scrlwing.obj \ + $(OBJS)\coredll_selstore.obj \ + $(OBJS)\coredll_spinctlg.obj \ + $(OBJS)\coredll_splitter.obj \ + $(OBJS)\coredll_srchctlg.obj \ + $(OBJS)\coredll_statbmpg.obj \ + $(OBJS)\coredll_stattextg.obj \ + $(OBJS)\coredll_textdlgg.obj \ + $(OBJS)\coredll_tipwin.obj \ + $(OBJS)\coredll_toolbkg.obj \ + $(OBJS)\coredll_treectlg.obj \ + $(OBJS)\coredll_treebkg.obj \ + $(OBJS)\coredll_vlbox.obj \ + $(OBJS)\coredll_vscroll.obj \ + $(OBJS)\coredll_xmlreshandler.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "1" +____CORE_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\coredll_activex.obj \ + $(OBJS)\coredll_app.obj \ + $(OBJS)\coredll_bitmap.obj \ + $(OBJS)\coredll_brush.obj \ + $(OBJS)\coredll_caret.obj \ + $(OBJS)\coredll_clipbrd.obj \ + $(OBJS)\coredll_colour.obj \ + $(OBJS)\coredll_cursor.obj \ + $(OBJS)\coredll_data.obj \ + $(OBJS)\coredll_dc.obj \ + $(OBJS)\coredll_dcclient.obj \ + $(OBJS)\coredll_dcmemory.obj \ + $(OBJS)\coredll_dcprint.obj \ + $(OBJS)\coredll_dcscreen.obj \ + $(OBJS)\coredll_dialup.obj \ + $(OBJS)\coredll_dib.obj \ + $(OBJS)\coredll_display.obj \ + $(OBJS)\coredll_enhmeta.obj \ + $(OBJS)\coredll_font.obj \ + $(OBJS)\coredll_fontenum.obj \ + $(OBJS)\coredll_fontutil.obj \ + $(OBJS)\coredll_gdiimage.obj \ + $(OBJS)\coredll_gdiobj.obj \ + $(OBJS)\coredll_gdiplus.obj \ + $(OBJS)\coredll_graphics.obj \ + $(OBJS)\coredll_icon.obj \ + $(OBJS)\coredll_imaglist.obj \ + $(OBJS)\coredll_minifram.obj \ + $(OBJS)\coredll_nonownedwnd.obj \ + $(OBJS)\coredll_dataobj.obj \ + $(OBJS)\coredll_dropsrc.obj \ + $(OBJS)\coredll_droptgt.obj \ + $(OBJS)\coredll_oleutils.obj \ + $(OBJS)\coredll_safearray.obj \ + $(OBJS)\coredll_palette.obj \ + $(OBJS)\coredll_pen.obj \ + $(OBJS)\coredll_popupwin.obj \ + $(OBJS)\coredll_printdlg.obj \ + $(OBJS)\coredll_printwin.obj \ + $(OBJS)\coredll_region.obj \ + $(OBJS)\coredll_renderer.obj \ + $(OBJS)\coredll_settings.obj \ + $(OBJS)\coredll_textmeasure.obj \ + $(OBJS)\coredll_tooltip.obj \ + $(OBJS)\coredll_toplevel.obj \ + $(OBJS)\coredll_uiaction.obj \ + $(OBJS)\coredll_utilsgui.obj \ + $(OBJS)\coredll_utilswin.obj \ + $(OBJS)\coredll_uxtheme.obj \ + $(OBJS)\coredll_window.obj \ + $(OBJS)\coredll_helpchm.obj \ + $(OBJS)\coredll_helpwin.obj \ + $(OBJS)\coredll_automtn.obj \ + $(OBJS)\coredll_uuid.obj \ + $(OBJS)\coredll_evtloop.obj \ + $(OBJS)\coredll_generic_accel.obj \ + $(OBJS)\coredll_clrpickerg.obj \ + $(OBJS)\coredll_collpaneg.obj \ + $(OBJS)\coredll_colrdlgg.obj \ + $(OBJS)\coredll_dirdlgg.obj \ + $(OBJS)\coredll_generic_fdrepdlg.obj \ + $(OBJS)\coredll_filedlgg.obj \ + $(OBJS)\coredll_filepickerg.obj \ + $(OBJS)\coredll_fontdlgg.obj \ + $(OBJS)\coredll_fontpickerg.obj \ + $(OBJS)\coredll_generic_listctrl.obj \ + $(OBJS)\coredll_mdig.obj \ + $(OBJS)\coredll_prntdlgg.obj \ + $(OBJS)\coredll_univ_bmpbuttn.obj \ + $(OBJS)\coredll_univ_button.obj \ + $(OBJS)\coredll_univ_checkbox.obj \ + $(OBJS)\coredll_univ_checklst.obj \ + $(OBJS)\coredll_univ_choice.obj \ + $(OBJS)\coredll_univ_combobox.obj \ + $(OBJS)\coredll_univ_control.obj \ + $(OBJS)\coredll_ctrlrend.obj \ + $(OBJS)\coredll_univ_dialog.obj \ + $(OBJS)\coredll_framuniv.obj \ + $(OBJS)\coredll_univ_gauge.obj \ + $(OBJS)\coredll_inpcons.obj \ + $(OBJS)\coredll_inphand.obj \ + $(OBJS)\coredll_univ_listbox.obj \ + $(OBJS)\coredll_univ_menu.obj \ + $(OBJS)\coredll_univ_notebook.obj \ + $(OBJS)\coredll_univ_radiobox.obj \ + $(OBJS)\coredll_univ_radiobut.obj \ + $(OBJS)\coredll_scrarrow.obj \ + $(OBJS)\coredll_univ_scrolbar.obj \ + $(OBJS)\coredll_scrthumb.obj \ + $(OBJS)\coredll_settingsuniv.obj \ + $(OBJS)\coredll_univ_slider.obj \ + $(OBJS)\coredll_univ_spinbutt.obj \ + $(OBJS)\coredll_univ_statbmp.obj \ + $(OBJS)\coredll_univ_statbox.obj \ + $(OBJS)\coredll_univ_statline.obj \ + $(OBJS)\coredll_univ_stattext.obj \ + $(OBJS)\coredll_univ_statusbr.obj \ + $(OBJS)\coredll_stdrend.obj \ + $(OBJS)\coredll_univ_textctrl.obj \ + $(OBJS)\coredll_univ_tglbtn.obj \ + $(OBJS)\coredll_theme.obj \ + $(OBJS)\coredll_univ_toolbar.obj \ + $(OBJS)\coredll_topluniv.obj \ + $(OBJS)\coredll_winuniv.obj \ + $(OBJS)\coredll_gtk.obj \ + $(OBJS)\coredll_metal.obj \ + $(OBJS)\coredll_mono.obj \ + $(OBJS)\coredll_win32.obj \ + $(OBJS)\coredll_accelcmn.obj \ + $(OBJS)\coredll_accesscmn.obj \ + $(OBJS)\coredll_anidecod.obj \ + $(OBJS)\coredll_affinematrix2d.obj \ + $(OBJS)\coredll_appcmn.obj \ + $(OBJS)\coredll_artprov.obj \ + $(OBJS)\coredll_artstd.obj \ + $(OBJS)\coredll_arttango.obj \ + $(OBJS)\coredll_bmpbase.obj \ + $(OBJS)\coredll_bmpbtncmn.obj \ + $(OBJS)\coredll_bookctrl.obj \ + $(OBJS)\coredll_btncmn.obj \ + $(OBJS)\coredll_cairo.obj \ + $(OBJS)\coredll_checkboxcmn.obj \ + $(OBJS)\coredll_checklstcmn.obj \ + $(OBJS)\coredll_choiccmn.obj \ + $(OBJS)\coredll_clipcmn.obj \ + $(OBJS)\coredll_clrpickercmn.obj \ + $(OBJS)\coredll_colourcmn.obj \ + $(OBJS)\coredll_colourdata.obj \ + $(OBJS)\coredll_combocmn.obj \ + $(OBJS)\coredll_cmdproc.obj \ + $(OBJS)\coredll_cmndata.obj \ + $(OBJS)\coredll_containr.obj \ + $(OBJS)\coredll_cshelp.obj \ + $(OBJS)\coredll_ctrlcmn.obj \ + $(OBJS)\coredll_ctrlsub.obj \ + $(OBJS)\coredll_dcbase.obj \ + $(OBJS)\coredll_dcbufcmn.obj \ + $(OBJS)\coredll_dcgraph.obj \ + $(OBJS)\coredll_dcsvg.obj \ + $(OBJS)\coredll_dirctrlcmn.obj \ + $(OBJS)\coredll_dlgcmn.obj \ + $(OBJS)\coredll_dndcmn.obj \ + $(OBJS)\coredll_dobjcmn.obj \ + $(OBJS)\coredll_docmdi.obj \ + $(OBJS)\coredll_docview.obj \ + $(OBJS)\coredll_dpycmn.obj \ + $(OBJS)\coredll_dseldlg.obj \ + $(OBJS)\coredll_effects.obj \ + $(OBJS)\coredll_fddlgcmn.obj \ + $(OBJS)\coredll_filectrlcmn.obj \ + $(OBJS)\coredll_filehistorycmn.obj \ + $(OBJS)\coredll_filepickercmn.obj \ + $(OBJS)\coredll_fontpickercmn.obj \ + $(OBJS)\coredll_fldlgcmn.obj \ + $(OBJS)\coredll_fontcmn.obj \ + $(OBJS)\coredll_fontdata.obj \ + $(OBJS)\coredll_graphicc.obj \ + $(OBJS)\coredll_fontenumcmn.obj \ + $(OBJS)\coredll_fontmap.obj \ + $(OBJS)\coredll_fontutilcmn.obj \ + $(OBJS)\coredll_framecmn.obj \ + $(OBJS)\coredll_gaugecmn.obj \ + $(OBJS)\coredll_gbsizer.obj \ + $(OBJS)\coredll_gdicmn.obj \ + $(OBJS)\coredll_geometry.obj \ + $(OBJS)\coredll_gifdecod.obj \ + $(OBJS)\coredll_graphcmn.obj \ + $(OBJS)\coredll_headercolcmn.obj \ + $(OBJS)\coredll_headerctrlcmn.obj \ + $(OBJS)\coredll_helpbase.obj \ + $(OBJS)\coredll_iconbndl.obj \ + $(OBJS)\coredll_imagall.obj \ + $(OBJS)\coredll_imagbmp.obj \ + $(OBJS)\coredll_image.obj \ + $(OBJS)\coredll_imagfill.obj \ + $(OBJS)\coredll_imaggif.obj \ + $(OBJS)\coredll_imagiff.obj \ + $(OBJS)\coredll_imagjpeg.obj \ + $(OBJS)\coredll_imagpcx.obj \ + $(OBJS)\coredll_imagpng.obj \ + $(OBJS)\coredll_imagpnm.obj \ + $(OBJS)\coredll_imagtga.obj \ + $(OBJS)\coredll_imagtiff.obj \ + $(OBJS)\coredll_imagxpm.obj \ + $(OBJS)\coredll_layout.obj \ + $(OBJS)\coredll_lboxcmn.obj \ + $(OBJS)\coredll_listctrlcmn.obj \ + $(OBJS)\coredll_markupparser.obj \ + $(OBJS)\coredll_matrix.obj \ + $(OBJS)\coredll_menucmn.obj \ + $(OBJS)\coredll_modalhook.obj \ + $(OBJS)\coredll_mousemanager.obj \ + $(OBJS)\coredll_nbkbase.obj \ + $(OBJS)\coredll_overlaycmn.obj \ + $(OBJS)\coredll_ownerdrwcmn.obj \ + $(OBJS)\coredll_paper.obj \ + $(OBJS)\coredll_panelcmn.obj \ + $(OBJS)\coredll_persist.obj \ + $(OBJS)\coredll_pickerbase.obj \ + $(OBJS)\coredll_popupcmn.obj \ + $(OBJS)\coredll_preferencescmn.obj \ + $(OBJS)\coredll_prntbase.obj \ + $(OBJS)\coredll_quantize.obj \ + $(OBJS)\coredll_radiobtncmn.obj \ + $(OBJS)\coredll_radiocmn.obj \ + $(OBJS)\coredll_rearrangectrl.obj \ + $(OBJS)\coredll_rendcmn.obj \ + $(OBJS)\coredll_rgncmn.obj \ + $(OBJS)\coredll_scrolbarcmn.obj \ + $(OBJS)\coredll_settcmn.obj \ + $(OBJS)\coredll_sizer.obj \ + $(OBJS)\coredll_slidercmn.obj \ + $(OBJS)\coredll_spinbtncmn.obj \ + $(OBJS)\coredll_spinctrlcmn.obj \ + $(OBJS)\coredll_srchcmn.obj \ + $(OBJS)\coredll_statbar.obj \ + $(OBJS)\coredll_statbmpcmn.obj \ + $(OBJS)\coredll_statboxcmn.obj \ + $(OBJS)\coredll_statlinecmn.obj \ + $(OBJS)\coredll_stattextcmn.obj \ + $(OBJS)\coredll_stockitem.obj \ + $(OBJS)\coredll_tbarbase.obj \ + $(OBJS)\coredll_textcmn.obj \ + $(OBJS)\coredll_textentrycmn.obj \ + $(OBJS)\coredll_textmeasurecmn.obj \ + $(OBJS)\coredll_toplvcmn.obj \ + $(OBJS)\coredll_treebase.obj \ + $(OBJS)\coredll_uiactioncmn.obj \ + $(OBJS)\coredll_valgen.obj \ + $(OBJS)\coredll_validate.obj \ + $(OBJS)\coredll_valtext.obj \ + $(OBJS)\coredll_valnum.obj \ + $(OBJS)\coredll_wincmn.obj \ + $(OBJS)\coredll_windowid.obj \ + $(OBJS)\coredll_wrapsizer.obj \ + $(OBJS)\coredll_xpmdecod.obj \ + $(OBJS)\coredll_busyinfo.obj \ + $(OBJS)\coredll_buttonbar.obj \ + $(OBJS)\coredll_choicdgg.obj \ + $(OBJS)\coredll_choicbkg.obj \ + $(OBJS)\coredll_combog.obj \ + $(OBJS)\coredll_dcpsg.obj \ + $(OBJS)\coredll_dirctrlg.obj \ + $(OBJS)\coredll_dragimgg.obj \ + $(OBJS)\coredll_filectrlg.obj \ + $(OBJS)\coredll_headerctrlg.obj \ + $(OBJS)\coredll_infobar.obj \ + $(OBJS)\coredll_listbkg.obj \ + $(OBJS)\coredll_logg.obj \ + $(OBJS)\coredll_markuptext.obj \ + $(OBJS)\coredll_msgdlgg.obj \ + $(OBJS)\coredll_numdlgg.obj \ + $(OBJS)\coredll_progdlgg.obj \ + $(OBJS)\coredll_preferencesg.obj \ + $(OBJS)\coredll_printps.obj \ + $(OBJS)\coredll_renderg.obj \ + $(OBJS)\coredll_richmsgdlgg.obj \ + $(OBJS)\coredll_scrlwing.obj \ + $(OBJS)\coredll_selstore.obj \ + $(OBJS)\coredll_spinctlg.obj \ + $(OBJS)\coredll_splitter.obj \ + $(OBJS)\coredll_srchctlg.obj \ + $(OBJS)\coredll_statbmpg.obj \ + $(OBJS)\coredll_stattextg.obj \ + $(OBJS)\coredll_textdlgg.obj \ + $(OBJS)\coredll_tipwin.obj \ + $(OBJS)\coredll_toolbkg.obj \ + $(OBJS)\coredll_treectlg.obj \ + $(OBJS)\coredll_treebkg.obj \ + $(OBJS)\coredll_vlbox.obj \ + $(OBJS)\coredll_vscroll.obj \ + $(OBJS)\coredll_xmlreshandler.obj +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" +__corelib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_224 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_224 = $(__THREADSFLAG) +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "0" +____CORE_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\corelib_activex.obj \ + $(OBJS)\corelib_app.obj \ + $(OBJS)\corelib_bitmap.obj \ + $(OBJS)\corelib_brush.obj \ + $(OBJS)\corelib_caret.obj \ + $(OBJS)\corelib_clipbrd.obj \ + $(OBJS)\corelib_colour.obj \ + $(OBJS)\corelib_cursor.obj \ + $(OBJS)\corelib_data.obj \ + $(OBJS)\corelib_dc.obj \ + $(OBJS)\corelib_dcclient.obj \ + $(OBJS)\corelib_dcmemory.obj \ + $(OBJS)\corelib_dcprint.obj \ + $(OBJS)\corelib_dcscreen.obj \ + $(OBJS)\corelib_dialup.obj \ + $(OBJS)\corelib_dib.obj \ + $(OBJS)\corelib_display.obj \ + $(OBJS)\corelib_enhmeta.obj \ + $(OBJS)\corelib_font.obj \ + $(OBJS)\corelib_fontenum.obj \ + $(OBJS)\corelib_fontutil.obj \ + $(OBJS)\corelib_gdiimage.obj \ + $(OBJS)\corelib_gdiobj.obj \ + $(OBJS)\corelib_gdiplus.obj \ + $(OBJS)\corelib_graphics.obj \ + $(OBJS)\corelib_icon.obj \ + $(OBJS)\corelib_imaglist.obj \ + $(OBJS)\corelib_minifram.obj \ + $(OBJS)\corelib_nonownedwnd.obj \ + $(OBJS)\corelib_dataobj.obj \ + $(OBJS)\corelib_dropsrc.obj \ + $(OBJS)\corelib_droptgt.obj \ + $(OBJS)\corelib_oleutils.obj \ + $(OBJS)\corelib_safearray.obj \ + $(OBJS)\corelib_palette.obj \ + $(OBJS)\corelib_pen.obj \ + $(OBJS)\corelib_popupwin.obj \ + $(OBJS)\corelib_printdlg.obj \ + $(OBJS)\corelib_printwin.obj \ + $(OBJS)\corelib_region.obj \ + $(OBJS)\corelib_renderer.obj \ + $(OBJS)\corelib_settings.obj \ + $(OBJS)\corelib_textmeasure.obj \ + $(OBJS)\corelib_tooltip.obj \ + $(OBJS)\corelib_toplevel.obj \ + $(OBJS)\corelib_uiaction.obj \ + $(OBJS)\corelib_utilsgui.obj \ + $(OBJS)\corelib_utilswin.obj \ + $(OBJS)\corelib_uxtheme.obj \ + $(OBJS)\corelib_window.obj \ + $(OBJS)\corelib_helpchm.obj \ + $(OBJS)\corelib_helpwin.obj \ + $(OBJS)\corelib_automtn.obj \ + $(OBJS)\corelib_uuid.obj \ + $(OBJS)\corelib_clrpickerg.obj \ + $(OBJS)\corelib_collpaneg.obj \ + $(OBJS)\corelib_filepickerg.obj \ + $(OBJS)\corelib_fontpickerg.obj \ + $(OBJS)\corelib_generic_statusbr.obj \ + $(OBJS)\corelib_prntdlgg.obj \ + $(OBJS)\corelib_msw_accel.obj \ + $(OBJS)\corelib_anybutton.obj \ + $(OBJS)\corelib_artmsw.obj \ + $(OBJS)\corelib_msw_bmpbuttn.obj \ + $(OBJS)\corelib_msw_button.obj \ + $(OBJS)\corelib_msw_checkbox.obj \ + $(OBJS)\corelib_msw_choice.obj \ + $(OBJS)\corelib_colordlg.obj \ + $(OBJS)\corelib_combo.obj \ + $(OBJS)\corelib_msw_combobox.obj \ + $(OBJS)\corelib_msw_control.obj \ + $(OBJS)\corelib_msw_dialog.obj \ + $(OBJS)\corelib_dirdlg.obj \ + $(OBJS)\corelib_dragimag.obj \ + $(OBJS)\corelib_evtloop.obj \ + $(OBJS)\corelib_filedlg.obj \ + $(OBJS)\corelib_frame.obj \ + $(OBJS)\corelib_msw_gauge.obj \ + $(OBJS)\corelib_headerctrl.obj \ + $(OBJS)\corelib_iniconf.obj \ + $(OBJS)\corelib_msw_listbox.obj \ + $(OBJS)\corelib_msw_listctrl.obj \ + $(OBJS)\corelib_mdi.obj \ + $(OBJS)\corelib_msw_menu.obj \ + $(OBJS)\corelib_menuitem.obj \ + $(OBJS)\corelib_metafile.obj \ + $(OBJS)\corelib_msgdlg.obj \ + $(OBJS)\corelib_nativdlg.obj \ + $(OBJS)\corelib_nativewin.obj \ + $(OBJS)\corelib_msw_notebook.obj \ + $(OBJS)\corelib_access.obj \ + $(OBJS)\corelib_ownerdrw.obj \ + $(OBJS)\corelib_panel.obj \ + $(OBJS)\corelib_progdlg.obj \ + $(OBJS)\corelib_msw_radiobox.obj \ + $(OBJS)\corelib_msw_radiobut.obj \ + $(OBJS)\corelib_richmsgdlg.obj \ + $(OBJS)\corelib_msw_scrolbar.obj \ + $(OBJS)\corelib_msw_slider.obj \ + $(OBJS)\corelib_msw_spinbutt.obj \ + $(OBJS)\corelib_spinctrl.obj \ + $(OBJS)\corelib_msw_statbmp.obj \ + $(OBJS)\corelib_msw_statbox.obj \ + $(OBJS)\corelib_statusbar.obj \ + $(OBJS)\corelib_msw_statline.obj \ + $(OBJS)\corelib_msw_stattext.obj \ + $(OBJS)\corelib_msw_toolbar.obj \ + $(OBJS)\corelib_msw_textctrl.obj \ + $(OBJS)\corelib_textentry.obj \ + $(OBJS)\corelib_msw_tglbtn.obj \ + $(OBJS)\corelib_treectrl.obj \ + $(OBJS)\corelib_msw_checklst.obj \ + $(OBJS)\corelib_msw_fdrepdlg.obj \ + $(OBJS)\corelib_fontdlg.obj \ + $(OBJS)\corelib_accelcmn.obj \ + $(OBJS)\corelib_accesscmn.obj \ + $(OBJS)\corelib_anidecod.obj \ + $(OBJS)\corelib_affinematrix2d.obj \ + $(OBJS)\corelib_appcmn.obj \ + $(OBJS)\corelib_artprov.obj \ + $(OBJS)\corelib_artstd.obj \ + $(OBJS)\corelib_arttango.obj \ + $(OBJS)\corelib_bmpbase.obj \ + $(OBJS)\corelib_bmpbtncmn.obj \ + $(OBJS)\corelib_bookctrl.obj \ + $(OBJS)\corelib_btncmn.obj \ + $(OBJS)\corelib_cairo.obj \ + $(OBJS)\corelib_checkboxcmn.obj \ + $(OBJS)\corelib_checklstcmn.obj \ + $(OBJS)\corelib_choiccmn.obj \ + $(OBJS)\corelib_clipcmn.obj \ + $(OBJS)\corelib_clrpickercmn.obj \ + $(OBJS)\corelib_colourcmn.obj \ + $(OBJS)\corelib_colourdata.obj \ + $(OBJS)\corelib_combocmn.obj \ + $(OBJS)\corelib_cmdproc.obj \ + $(OBJS)\corelib_cmndata.obj \ + $(OBJS)\corelib_containr.obj \ + $(OBJS)\corelib_cshelp.obj \ + $(OBJS)\corelib_ctrlcmn.obj \ + $(OBJS)\corelib_ctrlsub.obj \ + $(OBJS)\corelib_dcbase.obj \ + $(OBJS)\corelib_dcbufcmn.obj \ + $(OBJS)\corelib_dcgraph.obj \ + $(OBJS)\corelib_dcsvg.obj \ + $(OBJS)\corelib_dirctrlcmn.obj \ + $(OBJS)\corelib_dlgcmn.obj \ + $(OBJS)\corelib_dndcmn.obj \ + $(OBJS)\corelib_dobjcmn.obj \ + $(OBJS)\corelib_docmdi.obj \ + $(OBJS)\corelib_docview.obj \ + $(OBJS)\corelib_dpycmn.obj \ + $(OBJS)\corelib_dseldlg.obj \ + $(OBJS)\corelib_effects.obj \ + $(OBJS)\corelib_fddlgcmn.obj \ + $(OBJS)\corelib_filectrlcmn.obj \ + $(OBJS)\corelib_filehistorycmn.obj \ + $(OBJS)\corelib_filepickercmn.obj \ + $(OBJS)\corelib_fontpickercmn.obj \ + $(OBJS)\corelib_fldlgcmn.obj \ + $(OBJS)\corelib_fontcmn.obj \ + $(OBJS)\corelib_fontdata.obj \ + $(OBJS)\corelib_graphicc.obj \ + $(OBJS)\corelib_fontenumcmn.obj \ + $(OBJS)\corelib_fontmap.obj \ + $(OBJS)\corelib_fontutilcmn.obj \ + $(OBJS)\corelib_framecmn.obj \ + $(OBJS)\corelib_gaugecmn.obj \ + $(OBJS)\corelib_gbsizer.obj \ + $(OBJS)\corelib_gdicmn.obj \ + $(OBJS)\corelib_geometry.obj \ + $(OBJS)\corelib_gifdecod.obj \ + $(OBJS)\corelib_graphcmn.obj \ + $(OBJS)\corelib_headercolcmn.obj \ + $(OBJS)\corelib_headerctrlcmn.obj \ + $(OBJS)\corelib_helpbase.obj \ + $(OBJS)\corelib_iconbndl.obj \ + $(OBJS)\corelib_imagall.obj \ + $(OBJS)\corelib_imagbmp.obj \ + $(OBJS)\corelib_image.obj \ + $(OBJS)\corelib_imagfill.obj \ + $(OBJS)\corelib_imaggif.obj \ + $(OBJS)\corelib_imagiff.obj \ + $(OBJS)\corelib_imagjpeg.obj \ + $(OBJS)\corelib_imagpcx.obj \ + $(OBJS)\corelib_imagpng.obj \ + $(OBJS)\corelib_imagpnm.obj \ + $(OBJS)\corelib_imagtga.obj \ + $(OBJS)\corelib_imagtiff.obj \ + $(OBJS)\corelib_imagxpm.obj \ + $(OBJS)\corelib_layout.obj \ + $(OBJS)\corelib_lboxcmn.obj \ + $(OBJS)\corelib_listctrlcmn.obj \ + $(OBJS)\corelib_markupparser.obj \ + $(OBJS)\corelib_matrix.obj \ + $(OBJS)\corelib_menucmn.obj \ + $(OBJS)\corelib_modalhook.obj \ + $(OBJS)\corelib_mousemanager.obj \ + $(OBJS)\corelib_nbkbase.obj \ + $(OBJS)\corelib_overlaycmn.obj \ + $(OBJS)\corelib_ownerdrwcmn.obj \ + $(OBJS)\corelib_paper.obj \ + $(OBJS)\corelib_panelcmn.obj \ + $(OBJS)\corelib_persist.obj \ + $(OBJS)\corelib_pickerbase.obj \ + $(OBJS)\corelib_popupcmn.obj \ + $(OBJS)\corelib_preferencescmn.obj \ + $(OBJS)\corelib_prntbase.obj \ + $(OBJS)\corelib_quantize.obj \ + $(OBJS)\corelib_radiobtncmn.obj \ + $(OBJS)\corelib_radiocmn.obj \ + $(OBJS)\corelib_rearrangectrl.obj \ + $(OBJS)\corelib_rendcmn.obj \ + $(OBJS)\corelib_rgncmn.obj \ + $(OBJS)\corelib_scrolbarcmn.obj \ + $(OBJS)\corelib_settcmn.obj \ + $(OBJS)\corelib_sizer.obj \ + $(OBJS)\corelib_slidercmn.obj \ + $(OBJS)\corelib_spinbtncmn.obj \ + $(OBJS)\corelib_spinctrlcmn.obj \ + $(OBJS)\corelib_srchcmn.obj \ + $(OBJS)\corelib_statbar.obj \ + $(OBJS)\corelib_statbmpcmn.obj \ + $(OBJS)\corelib_statboxcmn.obj \ + $(OBJS)\corelib_statlinecmn.obj \ + $(OBJS)\corelib_stattextcmn.obj \ + $(OBJS)\corelib_stockitem.obj \ + $(OBJS)\corelib_tbarbase.obj \ + $(OBJS)\corelib_textcmn.obj \ + $(OBJS)\corelib_textentrycmn.obj \ + $(OBJS)\corelib_textmeasurecmn.obj \ + $(OBJS)\corelib_toplvcmn.obj \ + $(OBJS)\corelib_treebase.obj \ + $(OBJS)\corelib_uiactioncmn.obj \ + $(OBJS)\corelib_valgen.obj \ + $(OBJS)\corelib_validate.obj \ + $(OBJS)\corelib_valtext.obj \ + $(OBJS)\corelib_valnum.obj \ + $(OBJS)\corelib_wincmn.obj \ + $(OBJS)\corelib_windowid.obj \ + $(OBJS)\corelib_wrapsizer.obj \ + $(OBJS)\corelib_xpmdecod.obj \ + $(OBJS)\corelib_busyinfo.obj \ + $(OBJS)\corelib_buttonbar.obj \ + $(OBJS)\corelib_choicdgg.obj \ + $(OBJS)\corelib_choicbkg.obj \ + $(OBJS)\corelib_combog.obj \ + $(OBJS)\corelib_dcpsg.obj \ + $(OBJS)\corelib_dirctrlg.obj \ + $(OBJS)\corelib_dragimgg.obj \ + $(OBJS)\corelib_filectrlg.obj \ + $(OBJS)\corelib_headerctrlg.obj \ + $(OBJS)\corelib_infobar.obj \ + $(OBJS)\corelib_listbkg.obj \ + $(OBJS)\corelib_logg.obj \ + $(OBJS)\corelib_markuptext.obj \ + $(OBJS)\corelib_msgdlgg.obj \ + $(OBJS)\corelib_numdlgg.obj \ + $(OBJS)\corelib_progdlgg.obj \ + $(OBJS)\corelib_preferencesg.obj \ + $(OBJS)\corelib_printps.obj \ + $(OBJS)\corelib_renderg.obj \ + $(OBJS)\corelib_richmsgdlgg.obj \ + $(OBJS)\corelib_scrlwing.obj \ + $(OBJS)\corelib_selstore.obj \ + $(OBJS)\corelib_spinctlg.obj \ + $(OBJS)\corelib_splitter.obj \ + $(OBJS)\corelib_srchctlg.obj \ + $(OBJS)\corelib_statbmpg.obj \ + $(OBJS)\corelib_stattextg.obj \ + $(OBJS)\corelib_textdlgg.obj \ + $(OBJS)\corelib_tipwin.obj \ + $(OBJS)\corelib_toolbkg.obj \ + $(OBJS)\corelib_treectlg.obj \ + $(OBJS)\corelib_treebkg.obj \ + $(OBJS)\corelib_vlbox.obj \ + $(OBJS)\corelib_vscroll.obj \ + $(OBJS)\corelib_xmlreshandler.obj +!endif +!if "$(USE_GUI)" == "1" && "$(WXUNIV)" == "1" +____CORE_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\corelib_activex.obj \ + $(OBJS)\corelib_app.obj \ + $(OBJS)\corelib_bitmap.obj \ + $(OBJS)\corelib_brush.obj \ + $(OBJS)\corelib_caret.obj \ + $(OBJS)\corelib_clipbrd.obj \ + $(OBJS)\corelib_colour.obj \ + $(OBJS)\corelib_cursor.obj \ + $(OBJS)\corelib_data.obj \ + $(OBJS)\corelib_dc.obj \ + $(OBJS)\corelib_dcclient.obj \ + $(OBJS)\corelib_dcmemory.obj \ + $(OBJS)\corelib_dcprint.obj \ + $(OBJS)\corelib_dcscreen.obj \ + $(OBJS)\corelib_dialup.obj \ + $(OBJS)\corelib_dib.obj \ + $(OBJS)\corelib_display.obj \ + $(OBJS)\corelib_enhmeta.obj \ + $(OBJS)\corelib_font.obj \ + $(OBJS)\corelib_fontenum.obj \ + $(OBJS)\corelib_fontutil.obj \ + $(OBJS)\corelib_gdiimage.obj \ + $(OBJS)\corelib_gdiobj.obj \ + $(OBJS)\corelib_gdiplus.obj \ + $(OBJS)\corelib_graphics.obj \ + $(OBJS)\corelib_icon.obj \ + $(OBJS)\corelib_imaglist.obj \ + $(OBJS)\corelib_minifram.obj \ + $(OBJS)\corelib_nonownedwnd.obj \ + $(OBJS)\corelib_dataobj.obj \ + $(OBJS)\corelib_dropsrc.obj \ + $(OBJS)\corelib_droptgt.obj \ + $(OBJS)\corelib_oleutils.obj \ + $(OBJS)\corelib_safearray.obj \ + $(OBJS)\corelib_palette.obj \ + $(OBJS)\corelib_pen.obj \ + $(OBJS)\corelib_popupwin.obj \ + $(OBJS)\corelib_printdlg.obj \ + $(OBJS)\corelib_printwin.obj \ + $(OBJS)\corelib_region.obj \ + $(OBJS)\corelib_renderer.obj \ + $(OBJS)\corelib_settings.obj \ + $(OBJS)\corelib_textmeasure.obj \ + $(OBJS)\corelib_tooltip.obj \ + $(OBJS)\corelib_toplevel.obj \ + $(OBJS)\corelib_uiaction.obj \ + $(OBJS)\corelib_utilsgui.obj \ + $(OBJS)\corelib_utilswin.obj \ + $(OBJS)\corelib_uxtheme.obj \ + $(OBJS)\corelib_window.obj \ + $(OBJS)\corelib_helpchm.obj \ + $(OBJS)\corelib_helpwin.obj \ + $(OBJS)\corelib_automtn.obj \ + $(OBJS)\corelib_uuid.obj \ + $(OBJS)\corelib_evtloop.obj \ + $(OBJS)\corelib_generic_accel.obj \ + $(OBJS)\corelib_clrpickerg.obj \ + $(OBJS)\corelib_collpaneg.obj \ + $(OBJS)\corelib_colrdlgg.obj \ + $(OBJS)\corelib_dirdlgg.obj \ + $(OBJS)\corelib_generic_fdrepdlg.obj \ + $(OBJS)\corelib_filedlgg.obj \ + $(OBJS)\corelib_filepickerg.obj \ + $(OBJS)\corelib_fontdlgg.obj \ + $(OBJS)\corelib_fontpickerg.obj \ + $(OBJS)\corelib_generic_listctrl.obj \ + $(OBJS)\corelib_mdig.obj \ + $(OBJS)\corelib_prntdlgg.obj \ + $(OBJS)\corelib_univ_bmpbuttn.obj \ + $(OBJS)\corelib_univ_button.obj \ + $(OBJS)\corelib_univ_checkbox.obj \ + $(OBJS)\corelib_univ_checklst.obj \ + $(OBJS)\corelib_univ_choice.obj \ + $(OBJS)\corelib_univ_combobox.obj \ + $(OBJS)\corelib_univ_control.obj \ + $(OBJS)\corelib_ctrlrend.obj \ + $(OBJS)\corelib_univ_dialog.obj \ + $(OBJS)\corelib_framuniv.obj \ + $(OBJS)\corelib_univ_gauge.obj \ + $(OBJS)\corelib_inpcons.obj \ + $(OBJS)\corelib_inphand.obj \ + $(OBJS)\corelib_univ_listbox.obj \ + $(OBJS)\corelib_univ_menu.obj \ + $(OBJS)\corelib_univ_notebook.obj \ + $(OBJS)\corelib_univ_radiobox.obj \ + $(OBJS)\corelib_univ_radiobut.obj \ + $(OBJS)\corelib_scrarrow.obj \ + $(OBJS)\corelib_univ_scrolbar.obj \ + $(OBJS)\corelib_scrthumb.obj \ + $(OBJS)\corelib_settingsuniv.obj \ + $(OBJS)\corelib_univ_slider.obj \ + $(OBJS)\corelib_univ_spinbutt.obj \ + $(OBJS)\corelib_univ_statbmp.obj \ + $(OBJS)\corelib_univ_statbox.obj \ + $(OBJS)\corelib_univ_statline.obj \ + $(OBJS)\corelib_univ_stattext.obj \ + $(OBJS)\corelib_univ_statusbr.obj \ + $(OBJS)\corelib_stdrend.obj \ + $(OBJS)\corelib_univ_textctrl.obj \ + $(OBJS)\corelib_univ_tglbtn.obj \ + $(OBJS)\corelib_theme.obj \ + $(OBJS)\corelib_univ_toolbar.obj \ + $(OBJS)\corelib_topluniv.obj \ + $(OBJS)\corelib_winuniv.obj \ + $(OBJS)\corelib_gtk.obj \ + $(OBJS)\corelib_metal.obj \ + $(OBJS)\corelib_mono.obj \ + $(OBJS)\corelib_win32.obj \ + $(OBJS)\corelib_accelcmn.obj \ + $(OBJS)\corelib_accesscmn.obj \ + $(OBJS)\corelib_anidecod.obj \ + $(OBJS)\corelib_affinematrix2d.obj \ + $(OBJS)\corelib_appcmn.obj \ + $(OBJS)\corelib_artprov.obj \ + $(OBJS)\corelib_artstd.obj \ + $(OBJS)\corelib_arttango.obj \ + $(OBJS)\corelib_bmpbase.obj \ + $(OBJS)\corelib_bmpbtncmn.obj \ + $(OBJS)\corelib_bookctrl.obj \ + $(OBJS)\corelib_btncmn.obj \ + $(OBJS)\corelib_cairo.obj \ + $(OBJS)\corelib_checkboxcmn.obj \ + $(OBJS)\corelib_checklstcmn.obj \ + $(OBJS)\corelib_choiccmn.obj \ + $(OBJS)\corelib_clipcmn.obj \ + $(OBJS)\corelib_clrpickercmn.obj \ + $(OBJS)\corelib_colourcmn.obj \ + $(OBJS)\corelib_colourdata.obj \ + $(OBJS)\corelib_combocmn.obj \ + $(OBJS)\corelib_cmdproc.obj \ + $(OBJS)\corelib_cmndata.obj \ + $(OBJS)\corelib_containr.obj \ + $(OBJS)\corelib_cshelp.obj \ + $(OBJS)\corelib_ctrlcmn.obj \ + $(OBJS)\corelib_ctrlsub.obj \ + $(OBJS)\corelib_dcbase.obj \ + $(OBJS)\corelib_dcbufcmn.obj \ + $(OBJS)\corelib_dcgraph.obj \ + $(OBJS)\corelib_dcsvg.obj \ + $(OBJS)\corelib_dirctrlcmn.obj \ + $(OBJS)\corelib_dlgcmn.obj \ + $(OBJS)\corelib_dndcmn.obj \ + $(OBJS)\corelib_dobjcmn.obj \ + $(OBJS)\corelib_docmdi.obj \ + $(OBJS)\corelib_docview.obj \ + $(OBJS)\corelib_dpycmn.obj \ + $(OBJS)\corelib_dseldlg.obj \ + $(OBJS)\corelib_effects.obj \ + $(OBJS)\corelib_fddlgcmn.obj \ + $(OBJS)\corelib_filectrlcmn.obj \ + $(OBJS)\corelib_filehistorycmn.obj \ + $(OBJS)\corelib_filepickercmn.obj \ + $(OBJS)\corelib_fontpickercmn.obj \ + $(OBJS)\corelib_fldlgcmn.obj \ + $(OBJS)\corelib_fontcmn.obj \ + $(OBJS)\corelib_fontdata.obj \ + $(OBJS)\corelib_graphicc.obj \ + $(OBJS)\corelib_fontenumcmn.obj \ + $(OBJS)\corelib_fontmap.obj \ + $(OBJS)\corelib_fontutilcmn.obj \ + $(OBJS)\corelib_framecmn.obj \ + $(OBJS)\corelib_gaugecmn.obj \ + $(OBJS)\corelib_gbsizer.obj \ + $(OBJS)\corelib_gdicmn.obj \ + $(OBJS)\corelib_geometry.obj \ + $(OBJS)\corelib_gifdecod.obj \ + $(OBJS)\corelib_graphcmn.obj \ + $(OBJS)\corelib_headercolcmn.obj \ + $(OBJS)\corelib_headerctrlcmn.obj \ + $(OBJS)\corelib_helpbase.obj \ + $(OBJS)\corelib_iconbndl.obj \ + $(OBJS)\corelib_imagall.obj \ + $(OBJS)\corelib_imagbmp.obj \ + $(OBJS)\corelib_image.obj \ + $(OBJS)\corelib_imagfill.obj \ + $(OBJS)\corelib_imaggif.obj \ + $(OBJS)\corelib_imagiff.obj \ + $(OBJS)\corelib_imagjpeg.obj \ + $(OBJS)\corelib_imagpcx.obj \ + $(OBJS)\corelib_imagpng.obj \ + $(OBJS)\corelib_imagpnm.obj \ + $(OBJS)\corelib_imagtga.obj \ + $(OBJS)\corelib_imagtiff.obj \ + $(OBJS)\corelib_imagxpm.obj \ + $(OBJS)\corelib_layout.obj \ + $(OBJS)\corelib_lboxcmn.obj \ + $(OBJS)\corelib_listctrlcmn.obj \ + $(OBJS)\corelib_markupparser.obj \ + $(OBJS)\corelib_matrix.obj \ + $(OBJS)\corelib_menucmn.obj \ + $(OBJS)\corelib_modalhook.obj \ + $(OBJS)\corelib_mousemanager.obj \ + $(OBJS)\corelib_nbkbase.obj \ + $(OBJS)\corelib_overlaycmn.obj \ + $(OBJS)\corelib_ownerdrwcmn.obj \ + $(OBJS)\corelib_paper.obj \ + $(OBJS)\corelib_panelcmn.obj \ + $(OBJS)\corelib_persist.obj \ + $(OBJS)\corelib_pickerbase.obj \ + $(OBJS)\corelib_popupcmn.obj \ + $(OBJS)\corelib_preferencescmn.obj \ + $(OBJS)\corelib_prntbase.obj \ + $(OBJS)\corelib_quantize.obj \ + $(OBJS)\corelib_radiobtncmn.obj \ + $(OBJS)\corelib_radiocmn.obj \ + $(OBJS)\corelib_rearrangectrl.obj \ + $(OBJS)\corelib_rendcmn.obj \ + $(OBJS)\corelib_rgncmn.obj \ + $(OBJS)\corelib_scrolbarcmn.obj \ + $(OBJS)\corelib_settcmn.obj \ + $(OBJS)\corelib_sizer.obj \ + $(OBJS)\corelib_slidercmn.obj \ + $(OBJS)\corelib_spinbtncmn.obj \ + $(OBJS)\corelib_spinctrlcmn.obj \ + $(OBJS)\corelib_srchcmn.obj \ + $(OBJS)\corelib_statbar.obj \ + $(OBJS)\corelib_statbmpcmn.obj \ + $(OBJS)\corelib_statboxcmn.obj \ + $(OBJS)\corelib_statlinecmn.obj \ + $(OBJS)\corelib_stattextcmn.obj \ + $(OBJS)\corelib_stockitem.obj \ + $(OBJS)\corelib_tbarbase.obj \ + $(OBJS)\corelib_textcmn.obj \ + $(OBJS)\corelib_textentrycmn.obj \ + $(OBJS)\corelib_textmeasurecmn.obj \ + $(OBJS)\corelib_toplvcmn.obj \ + $(OBJS)\corelib_treebase.obj \ + $(OBJS)\corelib_uiactioncmn.obj \ + $(OBJS)\corelib_valgen.obj \ + $(OBJS)\corelib_validate.obj \ + $(OBJS)\corelib_valtext.obj \ + $(OBJS)\corelib_valnum.obj \ + $(OBJS)\corelib_wincmn.obj \ + $(OBJS)\corelib_windowid.obj \ + $(OBJS)\corelib_wrapsizer.obj \ + $(OBJS)\corelib_xpmdecod.obj \ + $(OBJS)\corelib_busyinfo.obj \ + $(OBJS)\corelib_buttonbar.obj \ + $(OBJS)\corelib_choicdgg.obj \ + $(OBJS)\corelib_choicbkg.obj \ + $(OBJS)\corelib_combog.obj \ + $(OBJS)\corelib_dcpsg.obj \ + $(OBJS)\corelib_dirctrlg.obj \ + $(OBJS)\corelib_dragimgg.obj \ + $(OBJS)\corelib_filectrlg.obj \ + $(OBJS)\corelib_headerctrlg.obj \ + $(OBJS)\corelib_infobar.obj \ + $(OBJS)\corelib_listbkg.obj \ + $(OBJS)\corelib_logg.obj \ + $(OBJS)\corelib_markuptext.obj \ + $(OBJS)\corelib_msgdlgg.obj \ + $(OBJS)\corelib_numdlgg.obj \ + $(OBJS)\corelib_progdlgg.obj \ + $(OBJS)\corelib_preferencesg.obj \ + $(OBJS)\corelib_printps.obj \ + $(OBJS)\corelib_renderg.obj \ + $(OBJS)\corelib_richmsgdlgg.obj \ + $(OBJS)\corelib_scrlwing.obj \ + $(OBJS)\corelib_selstore.obj \ + $(OBJS)\corelib_spinctlg.obj \ + $(OBJS)\corelib_splitter.obj \ + $(OBJS)\corelib_srchctlg.obj \ + $(OBJS)\corelib_statbmpg.obj \ + $(OBJS)\corelib_stattextg.obj \ + $(OBJS)\corelib_textdlgg.obj \ + $(OBJS)\corelib_tipwin.obj \ + $(OBJS)\corelib_toolbkg.obj \ + $(OBJS)\corelib_treectlg.obj \ + $(OBJS)\corelib_treebkg.obj \ + $(OBJS)\corelib_vlbox.obj \ + $(OBJS)\corelib_vscroll.obj \ + $(OBJS)\corelib_xmlreshandler.obj +!endif +!if "$(SHARED)" == "1" +____wxcore_namedll_DEP = $(__coredll___depname) +!endif +!if "$(SHARED)" == "0" +____wxcore_namelib_DEP = $(__corelib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" +__advdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_232 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_232 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_232 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_232 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_240 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_240 = $(__THREADSFLAG) +!endif +!if "$(WXUNIV)" == "0" +____ADVANCED_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\advdll_animatecmn.obj \ + $(OBJS)\advdll_bmpcboxcmn.obj \ + $(OBJS)\advdll_calctrlcmn.obj \ + $(OBJS)\advdll_datavcmn.obj \ + $(OBJS)\advdll_gridcmn.obj \ + $(OBJS)\advdll_hyperlnkcmn.obj \ + $(OBJS)\advdll_odcombocmn.obj \ + $(OBJS)\advdll_richtooltipcmn.obj \ + $(OBJS)\advdll_aboutdlgg.obj \ + $(OBJS)\advdll_bannerwindow.obj \ + $(OBJS)\advdll_bmpcboxg.obj \ + $(OBJS)\advdll_calctrlg.obj \ + $(OBJS)\advdll_commandlinkbuttong.obj \ + $(OBJS)\advdll_datavgen.obj \ + $(OBJS)\advdll_datectlg.obj \ + $(OBJS)\advdll_editlbox.obj \ + $(OBJS)\advdll_grid.obj \ + $(OBJS)\advdll_gridctrl.obj \ + $(OBJS)\advdll_grideditors.obj \ + $(OBJS)\advdll_gridsel.obj \ + $(OBJS)\advdll_helpext.obj \ + $(OBJS)\advdll_hyperlinkg.obj \ + $(OBJS)\advdll_laywin.obj \ + $(OBJS)\advdll_notifmsgg.obj \ + $(OBJS)\advdll_odcombo.obj \ + $(OBJS)\advdll_propdlg.obj \ + $(OBJS)\advdll_richtooltipg.obj \ + $(OBJS)\advdll_sashwin.obj \ + $(OBJS)\advdll_splash.obj \ + $(OBJS)\advdll_timectrlg.obj \ + $(OBJS)\advdll_tipdlg.obj \ + $(OBJS)\advdll_treelist.obj \ + $(OBJS)\advdll_wizard.obj \ + $(OBJS)\advdll_taskbarcmn.obj \ + $(OBJS)\advdll_aboutdlg.obj \ + $(OBJS)\advdll_notifmsg.obj \ + $(OBJS)\advdll_richtooltip.obj \ + $(OBJS)\advdll_sound.obj \ + $(OBJS)\advdll_taskbar.obj \ + $(OBJS)\advdll_joystick.obj \ + $(OBJS)\advdll_animateg.obj \ + $(OBJS)\advdll_bmpcbox.obj \ + $(OBJS)\advdll_calctrl.obj \ + $(OBJS)\advdll_commandlinkbutton.obj \ + $(OBJS)\advdll_datecontrols.obj \ + $(OBJS)\advdll_datectrl.obj \ + $(OBJS)\advdll_datetimectrl.obj \ + $(OBJS)\advdll_hyperlink.obj \ + $(OBJS)\advdll_timectrl.obj +!endif +!if "$(WXUNIV)" == "1" +____ADVANCED_SRC_FILENAMES_2_OBJECTS = \ + $(OBJS)\advdll_animatecmn.obj \ + $(OBJS)\advdll_bmpcboxcmn.obj \ + $(OBJS)\advdll_calctrlcmn.obj \ + $(OBJS)\advdll_datavcmn.obj \ + $(OBJS)\advdll_gridcmn.obj \ + $(OBJS)\advdll_hyperlnkcmn.obj \ + $(OBJS)\advdll_odcombocmn.obj \ + $(OBJS)\advdll_richtooltipcmn.obj \ + $(OBJS)\advdll_aboutdlgg.obj \ + $(OBJS)\advdll_bannerwindow.obj \ + $(OBJS)\advdll_bmpcboxg.obj \ + $(OBJS)\advdll_calctrlg.obj \ + $(OBJS)\advdll_commandlinkbuttong.obj \ + $(OBJS)\advdll_datavgen.obj \ + $(OBJS)\advdll_datectlg.obj \ + $(OBJS)\advdll_editlbox.obj \ + $(OBJS)\advdll_grid.obj \ + $(OBJS)\advdll_gridctrl.obj \ + $(OBJS)\advdll_grideditors.obj \ + $(OBJS)\advdll_gridsel.obj \ + $(OBJS)\advdll_helpext.obj \ + $(OBJS)\advdll_hyperlinkg.obj \ + $(OBJS)\advdll_laywin.obj \ + $(OBJS)\advdll_notifmsgg.obj \ + $(OBJS)\advdll_odcombo.obj \ + $(OBJS)\advdll_propdlg.obj \ + $(OBJS)\advdll_richtooltipg.obj \ + $(OBJS)\advdll_sashwin.obj \ + $(OBJS)\advdll_splash.obj \ + $(OBJS)\advdll_timectrlg.obj \ + $(OBJS)\advdll_tipdlg.obj \ + $(OBJS)\advdll_treelist.obj \ + $(OBJS)\advdll_wizard.obj \ + $(OBJS)\advdll_taskbarcmn.obj \ + $(OBJS)\advdll_aboutdlg.obj \ + $(OBJS)\advdll_notifmsg.obj \ + $(OBJS)\advdll_richtooltip.obj \ + $(OBJS)\advdll_sound.obj \ + $(OBJS)\advdll_taskbar.obj \ + $(OBJS)\advdll_joystick.obj \ + $(OBJS)\advdll_animateg.obj +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" +__advlib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_255 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_255 = $(__THREADSFLAG) +!endif +!if "$(WXUNIV)" == "0" +____ADVANCED_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\advlib_animatecmn.obj \ + $(OBJS)\advlib_bmpcboxcmn.obj \ + $(OBJS)\advlib_calctrlcmn.obj \ + $(OBJS)\advlib_datavcmn.obj \ + $(OBJS)\advlib_gridcmn.obj \ + $(OBJS)\advlib_hyperlnkcmn.obj \ + $(OBJS)\advlib_odcombocmn.obj \ + $(OBJS)\advlib_richtooltipcmn.obj \ + $(OBJS)\advlib_aboutdlgg.obj \ + $(OBJS)\advlib_bannerwindow.obj \ + $(OBJS)\advlib_bmpcboxg.obj \ + $(OBJS)\advlib_calctrlg.obj \ + $(OBJS)\advlib_commandlinkbuttong.obj \ + $(OBJS)\advlib_datavgen.obj \ + $(OBJS)\advlib_datectlg.obj \ + $(OBJS)\advlib_editlbox.obj \ + $(OBJS)\advlib_grid.obj \ + $(OBJS)\advlib_gridctrl.obj \ + $(OBJS)\advlib_grideditors.obj \ + $(OBJS)\advlib_gridsel.obj \ + $(OBJS)\advlib_helpext.obj \ + $(OBJS)\advlib_hyperlinkg.obj \ + $(OBJS)\advlib_laywin.obj \ + $(OBJS)\advlib_notifmsgg.obj \ + $(OBJS)\advlib_odcombo.obj \ + $(OBJS)\advlib_propdlg.obj \ + $(OBJS)\advlib_richtooltipg.obj \ + $(OBJS)\advlib_sashwin.obj \ + $(OBJS)\advlib_splash.obj \ + $(OBJS)\advlib_timectrlg.obj \ + $(OBJS)\advlib_tipdlg.obj \ + $(OBJS)\advlib_treelist.obj \ + $(OBJS)\advlib_wizard.obj \ + $(OBJS)\advlib_taskbarcmn.obj \ + $(OBJS)\advlib_aboutdlg.obj \ + $(OBJS)\advlib_notifmsg.obj \ + $(OBJS)\advlib_richtooltip.obj \ + $(OBJS)\advlib_sound.obj \ + $(OBJS)\advlib_taskbar.obj \ + $(OBJS)\advlib_joystick.obj \ + $(OBJS)\advlib_animateg.obj \ + $(OBJS)\advlib_bmpcbox.obj \ + $(OBJS)\advlib_calctrl.obj \ + $(OBJS)\advlib_commandlinkbutton.obj \ + $(OBJS)\advlib_datecontrols.obj \ + $(OBJS)\advlib_datectrl.obj \ + $(OBJS)\advlib_datetimectrl.obj \ + $(OBJS)\advlib_hyperlink.obj \ + $(OBJS)\advlib_timectrl.obj +!endif +!if "$(WXUNIV)" == "1" +____ADVANCED_SRC_FILENAMES_3_OBJECTS = \ + $(OBJS)\advlib_animatecmn.obj \ + $(OBJS)\advlib_bmpcboxcmn.obj \ + $(OBJS)\advlib_calctrlcmn.obj \ + $(OBJS)\advlib_datavcmn.obj \ + $(OBJS)\advlib_gridcmn.obj \ + $(OBJS)\advlib_hyperlnkcmn.obj \ + $(OBJS)\advlib_odcombocmn.obj \ + $(OBJS)\advlib_richtooltipcmn.obj \ + $(OBJS)\advlib_aboutdlgg.obj \ + $(OBJS)\advlib_bannerwindow.obj \ + $(OBJS)\advlib_bmpcboxg.obj \ + $(OBJS)\advlib_calctrlg.obj \ + $(OBJS)\advlib_commandlinkbuttong.obj \ + $(OBJS)\advlib_datavgen.obj \ + $(OBJS)\advlib_datectlg.obj \ + $(OBJS)\advlib_editlbox.obj \ + $(OBJS)\advlib_grid.obj \ + $(OBJS)\advlib_gridctrl.obj \ + $(OBJS)\advlib_grideditors.obj \ + $(OBJS)\advlib_gridsel.obj \ + $(OBJS)\advlib_helpext.obj \ + $(OBJS)\advlib_hyperlinkg.obj \ + $(OBJS)\advlib_laywin.obj \ + $(OBJS)\advlib_notifmsgg.obj \ + $(OBJS)\advlib_odcombo.obj \ + $(OBJS)\advlib_propdlg.obj \ + $(OBJS)\advlib_richtooltipg.obj \ + $(OBJS)\advlib_sashwin.obj \ + $(OBJS)\advlib_splash.obj \ + $(OBJS)\advlib_timectrlg.obj \ + $(OBJS)\advlib_tipdlg.obj \ + $(OBJS)\advlib_treelist.obj \ + $(OBJS)\advlib_wizard.obj \ + $(OBJS)\advlib_taskbarcmn.obj \ + $(OBJS)\advlib_aboutdlg.obj \ + $(OBJS)\advlib_notifmsg.obj \ + $(OBJS)\advlib_richtooltip.obj \ + $(OBJS)\advlib_sound.obj \ + $(OBJS)\advlib_taskbar.obj \ + $(OBJS)\advlib_joystick.obj \ + $(OBJS)\advlib_animateg.obj +!endif +!if "$(SHARED)" == "1" +____wxadv_namedll_DEP = $(__advdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxadv_namelib_DEP = $(__advlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" +__mediadll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_263 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_263 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_263 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_263 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_271 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_271 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" +__medialib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_286 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_286 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxmedia_namedll_DEP = $(__mediadll___depname) +!endif +!if "$(SHARED)" == "0" +____wxmedia_namelib_DEP = $(__medialib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +__htmldll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_294 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_294 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_294 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_294 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_302 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_302 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +__htmllib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_317 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_317 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxhtml_namedll_DEP = $(__htmldll___depname) +!endif +!if "$(SHARED)" == "0" +____wxhtml_namelib_DEP = $(__htmllib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_WEBVIEW)" == "1" +__webviewdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_325 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_325 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_325 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_325 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_333 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_333 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_WEBVIEW)" == "1" +__webviewlib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_348 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_348 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxwebview_namedll_DEP = $(__webviewdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxwebview_namelib_DEP = $(__webviewlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_QA)" == "1" +__qadll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_356 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_356 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_356 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_356 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_364 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_364 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_QA)" == "1" +__qalib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_379 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_379 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxqa_namedll_DEP = $(__qadll___depname) +!endif +!if "$(SHARED)" == "0" +____wxqa_namelib_DEP = $(__qalib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +__xmldll___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_387 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_387 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_387 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_387 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_395 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_395 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +__xmllib___depname = \ + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_410 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_410 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxxml_namedll_DEP = $(__xmldll___depname) +!endif +!if "$(SHARED)" == "0" +____wxxml_namelib_DEP = $(__xmllib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_XRC)" == "1" +__xrcdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_418 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_418 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_418 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_418 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_426 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_426 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_XRC)" == "1" +__xrclib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_441 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_441 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxxrc_namedll_DEP = $(__xrcdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxxrc_namelib_DEP = $(__xrclib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_AUI)" == "1" +__auidll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_449 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_449 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_449 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_449 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_457 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_457 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_AUI)" == "1" +__auilib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_472 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_472 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxaui_namedll_DEP = $(__auidll___depname) +!endif +!if "$(SHARED)" == "0" +____wxaui_namelib_DEP = $(__auilib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RIBBON)" == "1" +__ribbondll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_480 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_480 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_480 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_480 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_488 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_488 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_RIBBON)" == "1" +__ribbonlib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_503 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_503 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxribbon_namedll_DEP = $(__ribbondll___depname) +!endif +!if "$(SHARED)" == "0" +____wxribbon_namelib_DEP = $(__ribbonlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_PROPGRID)" == "1" +__propgriddll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_511 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_511 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_511 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_511 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_519 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_519 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_PROPGRID)" == "1" +__propgridlib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_534 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_534 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxpropgrid_namedll_DEP = $(__propgriddll___depname) +!endif +!if "$(SHARED)" == "0" +____wxpropgrid_namelib_DEP = $(__propgridlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RICHTEXT)" == "1" +__richtextdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_542 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_542 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_542 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_542 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_550 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_550 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_RICHTEXT)" == "1" +__richtextlib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_565 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_565 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxrichtext_namedll_DEP = $(__richtextdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxrichtext_namelib_DEP = $(__richtextlib___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_STC)" == "1" +__stcdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_573 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_573 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_573 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_573 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_581 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_581 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_STC)" == "1" +__stclib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_596 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_596 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxstc_namedll_DEP = $(__stcdll___depname) +!endif +!if "$(SHARED)" == "0" +____wxstc_namelib_DEP = $(__stclib___depname) +!endif +!if "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" +__gldll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_604 = $(__DEBUGRUNTIME_11) +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_604 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_604 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_604 = $(__DEBUGRUNTIME_11) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_612 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_612 = $(__THREADSFLAG) +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIBGLDEP_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIBGLDEP_BASE_p = \ + wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(MONOLITHIC)" == "1" +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" +__gllib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_627 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_627 = $(__THREADSFLAG) +!endif +!if "$(SHARED)" == "1" +____wxgl_namedll_DEP = $(__gldll___depname) +!endif +!if "$(SHARED)" == "0" +____wxgl_namelib_DEP = $(__gllib___depname) +!endif +!if "$(USE_STC)" == "1" +__wxscintilla = $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +__htmldll_library_link_DEP = $(__htmldll___depname) +!endif +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +__htmldll_library_link_LIBR = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_6 = /DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_6 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_6 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_6 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_6 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_6 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_6 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_6 = /d _DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_11 = +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_11 = /opt:ref /opt:icf +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_11 = /opt:ref /opt:icf +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_11 = +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0" +__NO_VC_CRTDBG_p_72 = /d __NO_VC_CRTDBG__ +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" +__NO_VC_CRTDBG_p_72 = /d __NO_VC_CRTDBG__ +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p_67 = /d __WXUNIVERSAL__ +!endif +!if "$(DEBUG_FLAG)" == "0" +__DEBUG_DEFINE_p_66 = /d wxDEBUG_LEVEL=0 +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +__NDEBUG_DEFINE_p_65 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__NDEBUG_DEFINE_p_65 = /d NDEBUG +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p_65 = /d wxNO_EXCEPTIONS +!endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p_65 = /d wxNO_RTTI +!endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p_65 = /d wxNO_THREADS +!endif +!if "$(UNICODE)" == "0" +__UNICODE_DEFINE_p_67 = /d wxUSE_UNICODE=0 +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p_67 = /d _UNICODE +!endif +!if "$(MSLU)" == "1" +__MSLU_DEFINE_p_65 = /d wxUSE_UNICODE_MSLU=1 +!endif +!if "$(USE_CAIRO)" == "1" +____CAIRO_INCLUDEDIR_FILENAMES_4 = /i $(CAIRO_ROOT)\include\cairo +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(MSLU)" == "1" +__UNICOWS_LIB_p = unicows.lib +!endif +!if "$(USE_CAIRO)" == "1" +__CAIRO_LIB_p = cairo.lib +!endif +!if "$(USE_CAIRO)" == "1" +____CAIRO_LIBDIR_FILENAMES = /LIBPATH:$(CAIRO_ROOT)\lib +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = /Zi +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = /Zi +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME = /D_DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME = d +!endif +!if "$(BUILD)" == "debug" +__OPTIMIZEFLAG = /Od +!endif +!if "$(BUILD)" == "release" +__OPTIMIZEFLAG = /O2 +!endif +!if "$(USE_THREADS)" == "0" +__THREADSFLAG = L +!endif +!if "$(USE_THREADS)" == "1" +__THREADSFLAG = T +!endif +!if "$(USE_RTTI)" == "0" +__RTTIFLAG = +!endif +!if "$(USE_RTTI)" == "1" +__RTTIFLAG = /GR +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONSFLAG = +!endif +!if "$(USE_EXCEPTIONS)" == "1" +__EXCEPTIONSFLAG = /EHsc +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0" +__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__ +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" +__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__ +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ +!endif +!if "$(DEBUG_FLAG)" == "0" +__DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0 +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +__NDEBUG_DEFINE_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__NDEBUG_DEFINE_p = /DNDEBUG +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS +!endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p = /DwxNO_RTTI +!endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p = /DwxNO_THREADS +!endif +!if "$(UNICODE)" == "0" +__UNICODE_DEFINE_p = /DwxUSE_UNICODE=0 +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p = /D_UNICODE +!endif +!if "$(MSLU)" == "1" +__MSLU_DEFINE_p = /DwxUSE_UNICODE_MSLU=1 +!endif +!if "$(USE_CAIRO)" == "1" +____CAIRO_INCLUDEDIR_FILENAMES = /I$(CAIRO_ROOT)\include\cairo +!endif +!if "$(WXUNIV)" == "0" +__SETUP_H_SUBDIR_FILENAMES = msw +!endif +!if "$(WXUNIV)" == "1" +__SETUP_H_SUBDIR_FILENAMES = univ +!endif + + +all: $(OBJS) +$(OBJS): + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all: setup_h $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(__wxscintilla) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) build_cfg_file + +clean: + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\*.pch del $(OBJS)\*.pch + -if exist $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib + cd ..\..\samples + $(MAKE) -f makefile.vc $(MAKEARGS) clean + cd "$(MAKEDIR)" + +setup_h: $(SETUPHDIR)\wx ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h $(SETUPHDIR)\wx\setup.h $(SETUPHDIR)\wx\msw\rcdefs.h + +$(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib: $(WXREGEX_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(WXREGEX_OBJECTS) +<< + +$(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib: $(WXZLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(WXZLIB_OBJECTS) +<< + +!if "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib: $(WXPNG_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(WXPNG_OBJECTS) +<< +!endif + +!if "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib: $(WXJPEG_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(WXJPEG_OBJECTS) +<< +!endif + +!if "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib: $(WXTIFF_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(WXTIFF_OBJECTS) +<< +!endif + +$(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib: $(WXEXPAT_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(WXEXPAT_OBJECTS) +<< + +!if "$(USE_STC)" == "1" +$(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib: $(WXSCINTILLA_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(WXSCINTILLA_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\monodll_dummy.obj $(MONODLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\monodll_version.res $(__wxscintilla_library_link_DEP) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_108) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(MONODLL_OBJECTS) $(MONODLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(__wxscintilla) /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +<< +!endif + +!if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "0" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib: $(OBJS)\monolib_dummy.obj $(MONOLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(MONOLIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\basedll_dummy.obj $(BASEDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\basedll_version.res + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_139) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(BASEDLL_OBJECTS) $(BASEDLL_RESOURCES) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib: $(OBJS)\baselib_dummy.obj $(BASELIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(BASELIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" +wxbase: $(____wxbase_namedll_DEP) $(____wxbase_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\netdll_dummy.obj $(NETDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\netdll_version.res $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_170) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(NETDLL_OBJECTS) $(NETDLL_RESOURCES) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib: $(OBJS)\netlib_dummy.obj $(NETLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(NETLIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" +wxnet: $(____wxnet_namedll_DEP) $(____wxnet_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\coredll_dummy.obj $(COREDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\coredll_version.res $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_201) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(COREDLL_OBJECTS) $(COREDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib: $(OBJS)\corelib_dummy.obj $(CORELIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(CORELIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_GUI)" == "1" +wxcore: $(____wxcore_namedll_DEP) $(____wxcore_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\advdll_dummy.obj $(ADVDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\advdll_version.res $(__coredll___depname) $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_232) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(ADVDLL_OBJECTS) $(ADVDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib: $(OBJS)\advlib_dummy.obj $(ADVLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(ADVLIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_GUI)" == "1" +wxadv: $(____wxadv_namedll_DEP) $(____wxadv_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\mediadll_dummy.obj $(MEDIADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\mediadll_version.res $(__coredll___depname) $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_263) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(MEDIADLL_OBJECTS) $(MEDIADLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib: $(OBJS)\medialib_dummy.obj $(MEDIALIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(MEDIALIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" +wxmedia: $(____wxmedia_namedll_DEP) $(____wxmedia_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\htmldll_dummy.obj $(HTMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\htmldll_version.res $(__coredll___depname) $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_294) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(HTMLDLL_OBJECTS) $(HTMLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib: $(OBJS)\htmllib_dummy.obj $(HTMLLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(HTMLLIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_HTML)" == "1" +wxhtml: $(____wxhtml_namedll_DEP) $(____wxhtml_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_WEBVIEW)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\webviewdll_dummy.obj $(WEBVIEWDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\webviewdll_version.res $(__coredll___depname) $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_325) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(WEBVIEWDLL_OBJECTS) $(WEBVIEWDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_WEBVIEW)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib: $(OBJS)\webviewlib_dummy.obj $(WEBVIEWLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(WEBVIEWLIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_WEBVIEW)" == "1" +wxwebview: $(____wxwebview_namedll_DEP) $(____wxwebview_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_QA)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\qadll_dummy.obj $(QADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\qadll_version.res $(__coredll___depname) $(__basedll___depname) $(__xmldll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_356) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(QADLL_OBJECTS) $(QADLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_QA)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib: $(OBJS)\qalib_dummy.obj $(QALIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(QALIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_QA)" == "1" +wxqa: $(____wxqa_namedll_DEP) $(____wxqa_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xmldll_dummy.obj $(XMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xmldll_version.res $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_387) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(XMLDLL_OBJECTS) $(XMLDLL_RESOURCES) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib: $(OBJS)\xmllib_dummy.obj $(XMLLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(XMLLIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" +wxxml: $(____wxxml_namedll_DEP) $(____wxxml_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_XRC)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xrcdll_dummy.obj $(XRCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xrcdll_version.res $(__htmldll_library_link_DEP) $(__advdll___depname) $(__coredll___depname) $(__xmldll___depname) $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_418) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(XRCDLL_OBJECTS) $(XRCDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_XRC)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib: $(OBJS)\xrclib_dummy.obj $(XRCLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(XRCLIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_XRC)" == "1" +wxxrc: $(____wxxrc_namedll_DEP) $(____wxxrc_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_AUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\auidll_dummy.obj $(AUIDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\auidll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_449) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(AUIDLL_OBJECTS) $(AUIDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_AUI)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib: $(OBJS)\auilib_dummy.obj $(AUILIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(AUILIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_AUI)" == "1" +wxaui: $(____wxaui_namedll_DEP) $(____wxaui_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RIBBON)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\ribbondll_dummy.obj $(RIBBONDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\ribbondll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_480) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(RIBBONDLL_OBJECTS) $(RIBBONDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_RIBBON)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib: $(OBJS)\ribbonlib_dummy.obj $(RIBBONLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(RIBBONLIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_RIBBON)" == "1" +wxribbon: $(____wxribbon_namedll_DEP) $(____wxribbon_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_PROPGRID)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\propgriddll_dummy.obj $(PROPGRIDDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\propgriddll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_511) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(PROPGRIDDLL_OBJECTS) $(PROPGRIDDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_PROPGRID)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib: $(OBJS)\propgridlib_dummy.obj $(PROPGRIDLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(PROPGRIDLIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_PROPGRID)" == "1" +wxpropgrid: $(____wxpropgrid_namedll_DEP) $(____wxpropgrid_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RICHTEXT)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\richtextdll_dummy.obj $(RICHTEXTDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\richtextdll_version.res $(__advdll___depname) $(__htmldll_library_link_DEP) $(__xmldll___depname) $(__coredll___depname) $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_542) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(RICHTEXTDLL_OBJECTS) $(RICHTEXTDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_RICHTEXT)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib: $(OBJS)\richtextlib_dummy.obj $(RICHTEXTLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(RICHTEXTLIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_RICHTEXT)" == "1" +wxrichtext: $(____wxrichtext_namedll_DEP) $(____wxrichtext_namelib_DEP) +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_STC)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\stcdll_dummy.obj $(STCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(__wxscintilla) $(OBJS)\stcdll_version.res $(__coredll___depname) $(__basedll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_573) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(STCDLL_OBJECTS) $(STCDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "0" && "$(USE_STC)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib: $(OBJS)\stclib_dummy.obj $(STCLIB_OBJECTS) $(__wxscintilla) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(STCLIB_OBJECTS) +<< +!endif + +!if "$(MONOLITHIC)" == "0" && "$(USE_STC)" == "1" +wxstc: $(____wxstc_namedll_DEP) $(____wxstc_namelib_DEP) +!endif + +!if "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\gldll_dummy.obj $(GLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\gldll_version.res $(__basedll___depname) $(__coredll___depname) $(__monodll___depname) + link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_604) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< + $(GLDLL_OBJECTS) $(GLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) opengl32.lib glu32.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib +<< +!endif + +!if "$(SHARED)" == "0" && "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib: $(OBJS)\gllib_dummy.obj $(GLLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(GLLIB_OBJECTS) +<< +!endif + +!if "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" +wxgl: $(____wxgl_namedll_DEP) $(____wxgl_namelib_DEP) +!endif + +sub_samples: + cd ..\..\samples + $(MAKE) -f makefile.vc $(MAKEARGS) all + cd "$(MAKEDIR)" + +$(LIBDIRNAME): + if not exist $(LIBDIRNAME) mkdir $(LIBDIRNAME) + +$(SETUPHDIR): $(LIBDIRNAME) + if not exist $(SETUPHDIR) mkdir $(SETUPHDIR) + +$(SETUPHDIR)\wx: $(SETUPHDIR) + if not exist $(SETUPHDIR)\wx mkdir $(SETUPHDIR)\wx + +..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h: + if not exist ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h copy ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup0.h ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h + +$(SETUPHDIR)\wx\setup.h: + if not exist $(SETUPHDIR)\wx\setup.h copy ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h $(SETUPHDIR)\wx\setup.h + +$(SETUPHDIR)\wx\msw: $(SETUPHDIR)\wx + if not exist $(SETUPHDIR)\wx\msw mkdir $(SETUPHDIR)\wx\msw + +$(SETUPHDIR)\wx\msw\rcdefs.h: $(SETUPHDIR)\wx\msw ..\..\include\wx\msw\genrcdefs.h + $(CPP) "..\..\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" + +build_cfg_file: $(SETUPHDIR) + @echo WXVER_MAJOR=3 >$(BUILD_CFG_FILE) + @echo WXVER_MINOR=0 >>$(BUILD_CFG_FILE) + @echo WXVER_RELEASE=1 >>$(BUILD_CFG_FILE) + @echo BUILD=$(BUILD) >>$(BUILD_CFG_FILE) + @echo MONOLITHIC=$(MONOLITHIC) >>$(BUILD_CFG_FILE) + @echo SHARED=$(SHARED) >>$(BUILD_CFG_FILE) + @echo UNICODE=$(UNICODE) >>$(BUILD_CFG_FILE) + @echo TOOLKIT=MSW >>$(BUILD_CFG_FILE) + @echo TOOLKIT_VERSION=$(TOOLKIT_VERSION) >>$(BUILD_CFG_FILE) + @echo WXUNIV=$(WXUNIV) >>$(BUILD_CFG_FILE) + @echo CFG=$(CFG) >>$(BUILD_CFG_FILE) + @echo VENDOR=$(VENDOR) >>$(BUILD_CFG_FILE) + @echo OFFICIAL_BUILD=$(OFFICIAL_BUILD) >>$(BUILD_CFG_FILE) + @echo DEBUG_FLAG=$(DEBUG_FLAG) >>$(BUILD_CFG_FILE) + @echo DEBUG_INFO=$(DEBUG_INFO) >>$(BUILD_CFG_FILE) + @echo RUNTIME_LIBS=$(RUNTIME_LIBS) >>$(BUILD_CFG_FILE) + @echo MSLU=$(MSLU) >>$(BUILD_CFG_FILE) + @echo USE_EXCEPTIONS=$(USE_EXCEPTIONS) >>$(BUILD_CFG_FILE) + @echo USE_RTTI=$(USE_RTTI) >>$(BUILD_CFG_FILE) + @echo USE_THREADS=$(USE_THREADS) >>$(BUILD_CFG_FILE) + @echo USE_AUI=$(USE_AUI) >>$(BUILD_CFG_FILE) + @echo USE_GUI=$(USE_GUI) >>$(BUILD_CFG_FILE) + @echo USE_HTML=$(USE_HTML) >>$(BUILD_CFG_FILE) + @echo USE_MEDIA=$(USE_MEDIA) >>$(BUILD_CFG_FILE) + @echo USE_OPENGL=$(USE_OPENGL) >>$(BUILD_CFG_FILE) + @echo USE_QA=$(USE_QA) >>$(BUILD_CFG_FILE) + @echo USE_PROPGRID=$(USE_PROPGRID) >>$(BUILD_CFG_FILE) + @echo USE_RIBBON=$(USE_RIBBON) >>$(BUILD_CFG_FILE) + @echo USE_RICHTEXT=$(USE_RICHTEXT) >>$(BUILD_CFG_FILE) + @echo USE_STC=$(USE_STC) >>$(BUILD_CFG_FILE) + @echo USE_WEBVIEW=$(USE_WEBVIEW) >>$(BUILD_CFG_FILE) + @echo USE_XRC=$(USE_XRC) >>$(BUILD_CFG_FILE) + @echo COMPILER=vc >>$(BUILD_CFG_FILE) + @echo COMPILER_VERSION=$(COMPILER_VERSION) >>$(BUILD_CFG_FILE) + @echo CC=$(CC) >>$(BUILD_CFG_FILE) + @echo CXX=$(CXX) >>$(BUILD_CFG_FILE) + @echo CFLAGS=$(CFLAGS) >>$(BUILD_CFG_FILE) + @echo CPPFLAGS=$(CPPFLAGS) >>$(BUILD_CFG_FILE) + @echo CXXFLAGS=$(CXXFLAGS) >>$(BUILD_CFG_FILE) + @echo LDFLAGS=$(LDFLAGS) >>$(BUILD_CFG_FILE) + +$(OBJS)\wxregex_regcomp.obj: ..\..\src\regex\regcomp.c + $(CC) /c /nologo /TC /Fo$@ $(WXREGEX_CFLAGS) ..\..\src\regex\regcomp.c + +$(OBJS)\wxregex_regexec.obj: ..\..\src\regex\regexec.c + $(CC) /c /nologo /TC /Fo$@ $(WXREGEX_CFLAGS) ..\..\src\regex\regexec.c + +$(OBJS)\wxregex_regerror.obj: ..\..\src\regex\regerror.c + $(CC) /c /nologo /TC /Fo$@ $(WXREGEX_CFLAGS) ..\..\src\regex\regerror.c + +$(OBJS)\wxregex_regfree.obj: ..\..\src\regex\regfree.c + $(CC) /c /nologo /TC /Fo$@ $(WXREGEX_CFLAGS) ..\..\src\regex\regfree.c + +$(OBJS)\wxzlib_adler32.obj: ..\..\src\zlib\adler32.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\adler32.c + +$(OBJS)\wxzlib_compress.obj: ..\..\src\zlib\compress.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\compress.c + +$(OBJS)\wxzlib_crc32.obj: ..\..\src\zlib\crc32.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\crc32.c + +$(OBJS)\wxzlib_deflate.obj: ..\..\src\zlib\deflate.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\deflate.c + +$(OBJS)\wxzlib_gzclose.obj: ..\..\src\zlib\gzclose.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzclose.c + +$(OBJS)\wxzlib_gzlib.obj: ..\..\src\zlib\gzlib.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzlib.c + +$(OBJS)\wxzlib_gzread.obj: ..\..\src\zlib\gzread.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzread.c + +$(OBJS)\wxzlib_gzwrite.obj: ..\..\src\zlib\gzwrite.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzwrite.c + +$(OBJS)\wxzlib_infback.obj: ..\..\src\zlib\infback.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\infback.c + +$(OBJS)\wxzlib_inffast.obj: ..\..\src\zlib\inffast.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inffast.c + +$(OBJS)\wxzlib_inflate.obj: ..\..\src\zlib\inflate.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inflate.c + +$(OBJS)\wxzlib_inftrees.obj: ..\..\src\zlib\inftrees.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inftrees.c + +$(OBJS)\wxzlib_trees.obj: ..\..\src\zlib\trees.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\trees.c + +$(OBJS)\wxzlib_uncompr.obj: ..\..\src\zlib\uncompr.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\uncompr.c + +$(OBJS)\wxzlib_zutil.obj: ..\..\src\zlib\zutil.c + $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\zutil.c + +$(OBJS)\wxpng_png.obj: ..\..\src\png\png.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\png.c + +$(OBJS)\wxpng_pngerror.obj: ..\..\src\png\pngerror.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngerror.c + +$(OBJS)\wxpng_pngget.obj: ..\..\src\png\pngget.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngget.c + +$(OBJS)\wxpng_pngmem.obj: ..\..\src\png\pngmem.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngmem.c + +$(OBJS)\wxpng_pngpread.obj: ..\..\src\png\pngpread.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngpread.c + +$(OBJS)\wxpng_pngread.obj: ..\..\src\png\pngread.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngread.c + +$(OBJS)\wxpng_pngrio.obj: ..\..\src\png\pngrio.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrio.c + +$(OBJS)\wxpng_pngrtran.obj: ..\..\src\png\pngrtran.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrtran.c + +$(OBJS)\wxpng_pngrutil.obj: ..\..\src\png\pngrutil.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrutil.c + +$(OBJS)\wxpng_pngset.obj: ..\..\src\png\pngset.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngset.c + +$(OBJS)\wxpng_pngtrans.obj: ..\..\src\png\pngtrans.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngtrans.c + +$(OBJS)\wxpng_pngwio.obj: ..\..\src\png\pngwio.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwio.c + +$(OBJS)\wxpng_pngwrite.obj: ..\..\src\png\pngwrite.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwrite.c + +$(OBJS)\wxpng_pngwtran.obj: ..\..\src\png\pngwtran.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwtran.c + +$(OBJS)\wxpng_pngwutil.obj: ..\..\src\png\pngwutil.c + $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwutil.c + +$(OBJS)\wxjpeg_jcomapi.obj: ..\..\src\jpeg\jcomapi.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcomapi.c + +$(OBJS)\wxjpeg_jutils.obj: ..\..\src\jpeg\jutils.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jutils.c + +$(OBJS)\wxjpeg_jerror.obj: ..\..\src\jpeg\jerror.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jerror.c + +$(OBJS)\wxjpeg_jmemmgr.obj: ..\..\src\jpeg\jmemmgr.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jmemmgr.c + +$(OBJS)\wxjpeg_jmemnobs.obj: ..\..\src\jpeg\jmemnobs.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jmemnobs.c + +$(OBJS)\wxjpeg_jcapimin.obj: ..\..\src\jpeg\jcapimin.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcapimin.c + +$(OBJS)\wxjpeg_jcapistd.obj: ..\..\src\jpeg\jcapistd.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcapistd.c + +$(OBJS)\wxjpeg_jctrans.obj: ..\..\src\jpeg\jctrans.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jctrans.c + +$(OBJS)\wxjpeg_jcparam.obj: ..\..\src\jpeg\jcparam.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcparam.c + +$(OBJS)\wxjpeg_jdatadst.obj: ..\..\src\jpeg\jdatadst.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdatadst.c + +$(OBJS)\wxjpeg_jcinit.obj: ..\..\src\jpeg\jcinit.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcinit.c + +$(OBJS)\wxjpeg_jcmaster.obj: ..\..\src\jpeg\jcmaster.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcmaster.c + +$(OBJS)\wxjpeg_jcmarker.obj: ..\..\src\jpeg\jcmarker.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcmarker.c + +$(OBJS)\wxjpeg_jcmainct.obj: ..\..\src\jpeg\jcmainct.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcmainct.c + +$(OBJS)\wxjpeg_jcprepct.obj: ..\..\src\jpeg\jcprepct.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcprepct.c + +$(OBJS)\wxjpeg_jccoefct.obj: ..\..\src\jpeg\jccoefct.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jccoefct.c + +$(OBJS)\wxjpeg_jccolor.obj: ..\..\src\jpeg\jccolor.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jccolor.c + +$(OBJS)\wxjpeg_jcsample.obj: ..\..\src\jpeg\jcsample.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcsample.c + +$(OBJS)\wxjpeg_jchuff.obj: ..\..\src\jpeg\jchuff.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jchuff.c + +$(OBJS)\wxjpeg_jcphuff.obj: ..\..\src\jpeg\jcphuff.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcphuff.c + +$(OBJS)\wxjpeg_jcdctmgr.obj: ..\..\src\jpeg\jcdctmgr.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcdctmgr.c + +$(OBJS)\wxjpeg_jfdctfst.obj: ..\..\src\jpeg\jfdctfst.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jfdctfst.c + +$(OBJS)\wxjpeg_jfdctflt.obj: ..\..\src\jpeg\jfdctflt.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jfdctflt.c + +$(OBJS)\wxjpeg_jfdctint.obj: ..\..\src\jpeg\jfdctint.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jfdctint.c + +$(OBJS)\wxjpeg_jdapimin.obj: ..\..\src\jpeg\jdapimin.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdapimin.c + +$(OBJS)\wxjpeg_jdapistd.obj: ..\..\src\jpeg\jdapistd.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdapistd.c + +$(OBJS)\wxjpeg_jdtrans.obj: ..\..\src\jpeg\jdtrans.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdtrans.c + +$(OBJS)\wxjpeg_jdatasrc.obj: ..\..\src\jpeg\jdatasrc.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdatasrc.c + +$(OBJS)\wxjpeg_jdmaster.obj: ..\..\src\jpeg\jdmaster.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdmaster.c + +$(OBJS)\wxjpeg_jdinput.obj: ..\..\src\jpeg\jdinput.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdinput.c + +$(OBJS)\wxjpeg_jdmarker.obj: ..\..\src\jpeg\jdmarker.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdmarker.c + +$(OBJS)\wxjpeg_jdhuff.obj: ..\..\src\jpeg\jdhuff.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdhuff.c + +$(OBJS)\wxjpeg_jdphuff.obj: ..\..\src\jpeg\jdphuff.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdphuff.c + +$(OBJS)\wxjpeg_jdmainct.obj: ..\..\src\jpeg\jdmainct.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdmainct.c + +$(OBJS)\wxjpeg_jdcoefct.obj: ..\..\src\jpeg\jdcoefct.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdcoefct.c + +$(OBJS)\wxjpeg_jdpostct.obj: ..\..\src\jpeg\jdpostct.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdpostct.c + +$(OBJS)\wxjpeg_jddctmgr.obj: ..\..\src\jpeg\jddctmgr.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jddctmgr.c + +$(OBJS)\wxjpeg_jidctfst.obj: ..\..\src\jpeg\jidctfst.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jidctfst.c + +$(OBJS)\wxjpeg_jidctflt.obj: ..\..\src\jpeg\jidctflt.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jidctflt.c + +$(OBJS)\wxjpeg_jidctint.obj: ..\..\src\jpeg\jidctint.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jidctint.c + +$(OBJS)\wxjpeg_jidctred.obj: ..\..\src\jpeg\jidctred.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jidctred.c + +$(OBJS)\wxjpeg_jdsample.obj: ..\..\src\jpeg\jdsample.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdsample.c + +$(OBJS)\wxjpeg_jdcolor.obj: ..\..\src\jpeg\jdcolor.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdcolor.c + +$(OBJS)\wxjpeg_jquant1.obj: ..\..\src\jpeg\jquant1.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jquant1.c + +$(OBJS)\wxjpeg_jquant2.obj: ..\..\src\jpeg\jquant2.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jquant2.c + +$(OBJS)\wxjpeg_jdmerge.obj: ..\..\src\jpeg\jdmerge.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdmerge.c + +$(OBJS)\wxtiff_tif_win32.obj: ..\..\src\tiff\libtiff\tif_win32.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_win32.c + +$(OBJS)\wxtiff_tif_aux.obj: ..\..\src\tiff\libtiff\tif_aux.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_aux.c + +$(OBJS)\wxtiff_tif_close.obj: ..\..\src\tiff\libtiff\tif_close.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_close.c + +$(OBJS)\wxtiff_tif_codec.obj: ..\..\src\tiff\libtiff\tif_codec.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_codec.c + +$(OBJS)\wxtiff_tif_color.obj: ..\..\src\tiff\libtiff\tif_color.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_color.c + +$(OBJS)\wxtiff_tif_compress.obj: ..\..\src\tiff\libtiff\tif_compress.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_compress.c + +$(OBJS)\wxtiff_tif_dir.obj: ..\..\src\tiff\libtiff\tif_dir.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dir.c + +$(OBJS)\wxtiff_tif_dirinfo.obj: ..\..\src\tiff\libtiff\tif_dirinfo.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirinfo.c + +$(OBJS)\wxtiff_tif_dirread.obj: ..\..\src\tiff\libtiff\tif_dirread.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirread.c + +$(OBJS)\wxtiff_tif_dirwrite.obj: ..\..\src\tiff\libtiff\tif_dirwrite.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirwrite.c + +$(OBJS)\wxtiff_tif_dumpmode.obj: ..\..\src\tiff\libtiff\tif_dumpmode.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dumpmode.c + +$(OBJS)\wxtiff_tif_error.obj: ..\..\src\tiff\libtiff\tif_error.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_error.c + +$(OBJS)\wxtiff_tif_extension.obj: ..\..\src\tiff\libtiff\tif_extension.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_extension.c + +$(OBJS)\wxtiff_tif_fax3.obj: ..\..\src\tiff\libtiff\tif_fax3.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_fax3.c + +$(OBJS)\wxtiff_tif_fax3sm.obj: ..\..\src\tiff\libtiff\tif_fax3sm.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_fax3sm.c + +$(OBJS)\wxtiff_tif_flush.obj: ..\..\src\tiff\libtiff\tif_flush.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_flush.c + +$(OBJS)\wxtiff_tif_getimage.obj: ..\..\src\tiff\libtiff\tif_getimage.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_getimage.c + +$(OBJS)\wxtiff_tif_jbig.obj: ..\..\src\tiff\libtiff\tif_jbig.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jbig.c + +$(OBJS)\wxtiff_tif_jpeg.obj: ..\..\src\tiff\libtiff\tif_jpeg.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jpeg.c + +$(OBJS)\wxtiff_tif_jpeg_12.obj: ..\..\src\tiff\libtiff\tif_jpeg_12.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jpeg_12.c + +$(OBJS)\wxtiff_tif_luv.obj: ..\..\src\tiff\libtiff\tif_luv.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_luv.c + +$(OBJS)\wxtiff_tif_lzma.obj: ..\..\src\tiff\libtiff\tif_lzma.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_lzma.c + +$(OBJS)\wxtiff_tif_lzw.obj: ..\..\src\tiff\libtiff\tif_lzw.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_lzw.c + +$(OBJS)\wxtiff_tif_next.obj: ..\..\src\tiff\libtiff\tif_next.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_next.c + +$(OBJS)\wxtiff_tif_ojpeg.obj: ..\..\src\tiff\libtiff\tif_ojpeg.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_ojpeg.c + +$(OBJS)\wxtiff_tif_open.obj: ..\..\src\tiff\libtiff\tif_open.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_open.c + +$(OBJS)\wxtiff_tif_packbits.obj: ..\..\src\tiff\libtiff\tif_packbits.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_packbits.c + +$(OBJS)\wxtiff_tif_pixarlog.obj: ..\..\src\tiff\libtiff\tif_pixarlog.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_pixarlog.c + +$(OBJS)\wxtiff_tif_predict.obj: ..\..\src\tiff\libtiff\tif_predict.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_predict.c + +$(OBJS)\wxtiff_tif_print.obj: ..\..\src\tiff\libtiff\tif_print.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_print.c + +$(OBJS)\wxtiff_tif_read.obj: ..\..\src\tiff\libtiff\tif_read.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_read.c + +$(OBJS)\wxtiff_tif_strip.obj: ..\..\src\tiff\libtiff\tif_strip.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_strip.c + +$(OBJS)\wxtiff_tif_swab.obj: ..\..\src\tiff\libtiff\tif_swab.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_swab.c + +$(OBJS)\wxtiff_tif_thunder.obj: ..\..\src\tiff\libtiff\tif_thunder.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_thunder.c + +$(OBJS)\wxtiff_tif_tile.obj: ..\..\src\tiff\libtiff\tif_tile.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_tile.c + +$(OBJS)\wxtiff_tif_version.obj: ..\..\src\tiff\libtiff\tif_version.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_version.c + +$(OBJS)\wxtiff_tif_warning.obj: ..\..\src\tiff\libtiff\tif_warning.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_warning.c + +$(OBJS)\wxtiff_tif_write.obj: ..\..\src\tiff\libtiff\tif_write.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_write.c + +$(OBJS)\wxtiff_tif_zip.obj: ..\..\src\tiff\libtiff\tif_zip.c + $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_zip.c + +$(OBJS)\wxexpat_xmlparse.obj: ..\..\src\expat\lib\xmlparse.c + $(CC) /c /nologo /TC /Fo$@ $(WXEXPAT_CFLAGS) ..\..\src\expat\lib\xmlparse.c + +$(OBJS)\wxexpat_xmlrole.obj: ..\..\src\expat\lib\xmlrole.c + $(CC) /c /nologo /TC /Fo$@ $(WXEXPAT_CFLAGS) ..\..\src\expat\lib\xmlrole.c + +$(OBJS)\wxexpat_xmltok.obj: ..\..\src\expat\lib\xmltok.c + $(CC) /c /nologo /TC /Fo$@ $(WXEXPAT_CFLAGS) ..\..\src\expat\lib\xmltok.c + +$(OBJS)\wxscintilla_LexA68k.obj: ..\..\src\stc\scintilla\lexers\LexA68k.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexA68k.cxx + +$(OBJS)\wxscintilla_LexAbaqus.obj: ..\..\src\stc\scintilla\lexers\LexAbaqus.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAbaqus.cxx + +$(OBJS)\wxscintilla_LexAda.obj: ..\..\src\stc\scintilla\lexers\LexAda.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAda.cxx + +$(OBJS)\wxscintilla_LexAPDL.obj: ..\..\src\stc\scintilla\lexers\LexAPDL.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAPDL.cxx + +$(OBJS)\wxscintilla_LexAsm.obj: ..\..\src\stc\scintilla\lexers\LexAsm.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAsm.cxx + +$(OBJS)\wxscintilla_LexAsn1.obj: ..\..\src\stc\scintilla\lexers\LexAsn1.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAsn1.cxx + +$(OBJS)\wxscintilla_LexASY.obj: ..\..\src\stc\scintilla\lexers\LexASY.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexASY.cxx + +$(OBJS)\wxscintilla_LexAU3.obj: ..\..\src\stc\scintilla\lexers\LexAU3.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAU3.cxx + +$(OBJS)\wxscintilla_LexAVE.obj: ..\..\src\stc\scintilla\lexers\LexAVE.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAVE.cxx + +$(OBJS)\wxscintilla_LexAVS.obj: ..\..\src\stc\scintilla\lexers\LexAVS.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexAVS.cxx + +$(OBJS)\wxscintilla_LexBaan.obj: ..\..\src\stc\scintilla\lexers\LexBaan.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexBaan.cxx + +$(OBJS)\wxscintilla_LexBash.obj: ..\..\src\stc\scintilla\lexers\LexBash.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexBash.cxx + +$(OBJS)\wxscintilla_LexBasic.obj: ..\..\src\stc\scintilla\lexers\LexBasic.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexBasic.cxx + +$(OBJS)\wxscintilla_LexBullant.obj: ..\..\src\stc\scintilla\lexers\LexBullant.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexBullant.cxx + +$(OBJS)\wxscintilla_LexCaml.obj: ..\..\src\stc\scintilla\lexers\LexCaml.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCaml.cxx + +$(OBJS)\wxscintilla_LexCLW.obj: ..\..\src\stc\scintilla\lexers\LexCLW.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCLW.cxx + +$(OBJS)\wxscintilla_LexCmake.obj: ..\..\src\stc\scintilla\lexers\LexCmake.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCmake.cxx + +$(OBJS)\wxscintilla_LexCOBOL.obj: ..\..\src\stc\scintilla\lexers\LexCOBOL.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCOBOL.cxx + +$(OBJS)\wxscintilla_LexCoffeeScript.obj: ..\..\src\stc\scintilla\lexers\LexCoffeeScript.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCoffeeScript.cxx + +$(OBJS)\wxscintilla_LexConf.obj: ..\..\src\stc\scintilla\lexers\LexConf.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexConf.cxx + +$(OBJS)\wxscintilla_LexCPP.obj: ..\..\src\stc\scintilla\lexers\LexCPP.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCPP.cxx + +$(OBJS)\wxscintilla_LexCrontab.obj: ..\..\src\stc\scintilla\lexers\LexCrontab.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCrontab.cxx + +$(OBJS)\wxscintilla_LexCsound.obj: ..\..\src\stc\scintilla\lexers\LexCsound.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCsound.cxx + +$(OBJS)\wxscintilla_LexCSS.obj: ..\..\src\stc\scintilla\lexers\LexCSS.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexCSS.cxx + +$(OBJS)\wxscintilla_LexD.obj: ..\..\src\stc\scintilla\lexers\LexD.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexD.cxx + +$(OBJS)\wxscintilla_LexECL.obj: ..\..\src\stc\scintilla\lexers\LexECL.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexECL.cxx + +$(OBJS)\wxscintilla_LexEiffel.obj: ..\..\src\stc\scintilla\lexers\LexEiffel.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexEiffel.cxx + +$(OBJS)\wxscintilla_LexErlang.obj: ..\..\src\stc\scintilla\lexers\LexErlang.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexErlang.cxx + +$(OBJS)\wxscintilla_LexEScript.obj: ..\..\src\stc\scintilla\lexers\LexEScript.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexEScript.cxx + +$(OBJS)\wxscintilla_LexFlagship.obj: ..\..\src\stc\scintilla\lexers\LexFlagship.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexFlagship.cxx + +$(OBJS)\wxscintilla_LexForth.obj: ..\..\src\stc\scintilla\lexers\LexForth.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexForth.cxx + +$(OBJS)\wxscintilla_LexFortran.obj: ..\..\src\stc\scintilla\lexers\LexFortran.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexFortran.cxx + +$(OBJS)\wxscintilla_LexGAP.obj: ..\..\src\stc\scintilla\lexers\LexGAP.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexGAP.cxx + +$(OBJS)\wxscintilla_LexGui4Cli.obj: ..\..\src\stc\scintilla\lexers\LexGui4Cli.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexGui4Cli.cxx + +$(OBJS)\wxscintilla_LexHaskell.obj: ..\..\src\stc\scintilla\lexers\LexHaskell.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexHaskell.cxx + +$(OBJS)\wxscintilla_LexHTML.obj: ..\..\src\stc\scintilla\lexers\LexHTML.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexHTML.cxx + +$(OBJS)\wxscintilla_LexInno.obj: ..\..\src\stc\scintilla\lexers\LexInno.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexInno.cxx + +$(OBJS)\wxscintilla_LexKix.obj: ..\..\src\stc\scintilla\lexers\LexKix.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexKix.cxx + +$(OBJS)\wxscintilla_LexLisp.obj: ..\..\src\stc\scintilla\lexers\LexLisp.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexLisp.cxx + +$(OBJS)\wxscintilla_LexLout.obj: ..\..\src\stc\scintilla\lexers\LexLout.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexLout.cxx + +$(OBJS)\wxscintilla_LexLua.obj: ..\..\src\stc\scintilla\lexers\LexLua.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexLua.cxx + +$(OBJS)\wxscintilla_LexMagik.obj: ..\..\src\stc\scintilla\lexers\LexMagik.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMagik.cxx + +$(OBJS)\wxscintilla_LexMarkdown.obj: ..\..\src\stc\scintilla\lexers\LexMarkdown.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMarkdown.cxx + +$(OBJS)\wxscintilla_LexMatlab.obj: ..\..\src\stc\scintilla\lexers\LexMatlab.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMatlab.cxx + +$(OBJS)\wxscintilla_LexMetapost.obj: ..\..\src\stc\scintilla\lexers\LexMetapost.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMetapost.cxx + +$(OBJS)\wxscintilla_LexMMIXAL.obj: ..\..\src\stc\scintilla\lexers\LexMMIXAL.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMMIXAL.cxx + +$(OBJS)\wxscintilla_LexModula.obj: ..\..\src\stc\scintilla\lexers\LexModula.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexModula.cxx + +$(OBJS)\wxscintilla_LexMPT.obj: ..\..\src\stc\scintilla\lexers\LexMPT.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMPT.cxx + +$(OBJS)\wxscintilla_LexMSSQL.obj: ..\..\src\stc\scintilla\lexers\LexMSSQL.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMSSQL.cxx + +$(OBJS)\wxscintilla_LexMySQL.obj: ..\..\src\stc\scintilla\lexers\LexMySQL.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexMySQL.cxx + +$(OBJS)\wxscintilla_LexNimrod.obj: ..\..\src\stc\scintilla\lexers\LexNimrod.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexNimrod.cxx + +$(OBJS)\wxscintilla_LexNsis.obj: ..\..\src\stc\scintilla\lexers\LexNsis.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexNsis.cxx + +$(OBJS)\wxscintilla_LexOpal.obj: ..\..\src\stc\scintilla\lexers\LexOpal.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexOpal.cxx + +$(OBJS)\wxscintilla_LexOScript.obj: ..\..\src\stc\scintilla\lexers\LexOScript.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexOScript.cxx + +$(OBJS)\wxscintilla_LexOthers.obj: ..\..\src\stc\scintilla\lexers\LexOthers.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexOthers.cxx + +$(OBJS)\wxscintilla_LexPascal.obj: ..\..\src\stc\scintilla\lexers\LexPascal.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPascal.cxx + +$(OBJS)\wxscintilla_LexPB.obj: ..\..\src\stc\scintilla\lexers\LexPB.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPB.cxx + +$(OBJS)\wxscintilla_LexPerl.obj: ..\..\src\stc\scintilla\lexers\LexPerl.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPerl.cxx + +$(OBJS)\wxscintilla_LexPLM.obj: ..\..\src\stc\scintilla\lexers\LexPLM.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPLM.cxx + +$(OBJS)\wxscintilla_LexPOV.obj: ..\..\src\stc\scintilla\lexers\LexPOV.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPOV.cxx + +$(OBJS)\wxscintilla_LexPowerPro.obj: ..\..\src\stc\scintilla\lexers\LexPowerPro.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPowerPro.cxx + +$(OBJS)\wxscintilla_LexPowerShell.obj: ..\..\src\stc\scintilla\lexers\LexPowerShell.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPowerShell.cxx + +$(OBJS)\wxscintilla_LexProgress.obj: ..\..\src\stc\scintilla\lexers\LexProgress.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexProgress.cxx + +$(OBJS)\wxscintilla_LexPS.obj: ..\..\src\stc\scintilla\lexers\LexPS.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPS.cxx + +$(OBJS)\wxscintilla_LexPython.obj: ..\..\src\stc\scintilla\lexers\LexPython.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexPython.cxx + +$(OBJS)\wxscintilla_LexR.obj: ..\..\src\stc\scintilla\lexers\LexR.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexR.cxx + +$(OBJS)\wxscintilla_LexRebol.obj: ..\..\src\stc\scintilla\lexers\LexRebol.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexRebol.cxx + +$(OBJS)\wxscintilla_LexRuby.obj: ..\..\src\stc\scintilla\lexers\LexRuby.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexRuby.cxx + +$(OBJS)\wxscintilla_LexScriptol.obj: ..\..\src\stc\scintilla\lexers\LexScriptol.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexScriptol.cxx + +$(OBJS)\wxscintilla_LexSmalltalk.obj: ..\..\src\stc\scintilla\lexers\LexSmalltalk.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSmalltalk.cxx + +$(OBJS)\wxscintilla_LexSML.obj: ..\..\src\stc\scintilla\lexers\LexSML.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSML.cxx + +$(OBJS)\wxscintilla_LexSorcus.obj: ..\..\src\stc\scintilla\lexers\LexSorcus.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSorcus.cxx + +$(OBJS)\wxscintilla_LexSpecman.obj: ..\..\src\stc\scintilla\lexers\LexSpecman.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSpecman.cxx + +$(OBJS)\wxscintilla_LexSpice.obj: ..\..\src\stc\scintilla\lexers\LexSpice.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSpice.cxx + +$(OBJS)\wxscintilla_LexSQL.obj: ..\..\src\stc\scintilla\lexers\LexSQL.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexSQL.cxx + +$(OBJS)\wxscintilla_LexTACL.obj: ..\..\src\stc\scintilla\lexers\LexTACL.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTACL.cxx + +$(OBJS)\wxscintilla_LexTADS3.obj: ..\..\src\stc\scintilla\lexers\LexTADS3.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTADS3.cxx + +$(OBJS)\wxscintilla_LexTAL.obj: ..\..\src\stc\scintilla\lexers\LexTAL.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTAL.cxx + +$(OBJS)\wxscintilla_LexTCL.obj: ..\..\src\stc\scintilla\lexers\LexTCL.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTCL.cxx + +$(OBJS)\wxscintilla_LexTCMD.obj: ..\..\src\stc\scintilla\lexers\LexTCMD.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTCMD.cxx + +$(OBJS)\wxscintilla_LexTeX.obj: ..\..\src\stc\scintilla\lexers\LexTeX.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTeX.cxx + +$(OBJS)\wxscintilla_LexTxt2tags.obj: ..\..\src\stc\scintilla\lexers\LexTxt2tags.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexTxt2tags.cxx + +$(OBJS)\wxscintilla_LexVB.obj: ..\..\src\stc\scintilla\lexers\LexVB.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexVB.cxx + +$(OBJS)\wxscintilla_LexVerilog.obj: ..\..\src\stc\scintilla\lexers\LexVerilog.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexVerilog.cxx + +$(OBJS)\wxscintilla_LexVHDL.obj: ..\..\src\stc\scintilla\lexers\LexVHDL.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexVHDL.cxx + +$(OBJS)\wxscintilla_LexVisualProlog.obj: ..\..\src\stc\scintilla\lexers\LexVisualProlog.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexVisualProlog.cxx + +$(OBJS)\wxscintilla_LexYAML.obj: ..\..\src\stc\scintilla\lexers\LexYAML.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexers\LexYAML.cxx + +$(OBJS)\wxscintilla_Accessor.obj: ..\..\src\stc\scintilla\lexlib\Accessor.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\Accessor.cxx + +$(OBJS)\wxscintilla_CharacterSet.obj: ..\..\src\stc\scintilla\lexlib\CharacterSet.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\CharacterSet.cxx + +$(OBJS)\wxscintilla_LexerBase.obj: ..\..\src\stc\scintilla\lexlib\LexerBase.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\LexerBase.cxx + +$(OBJS)\wxscintilla_LexerModule.obj: ..\..\src\stc\scintilla\lexlib\LexerModule.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\LexerModule.cxx + +$(OBJS)\wxscintilla_LexerNoExceptions.obj: ..\..\src\stc\scintilla\lexlib\LexerNoExceptions.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\LexerNoExceptions.cxx + +$(OBJS)\wxscintilla_LexerSimple.obj: ..\..\src\stc\scintilla\lexlib\LexerSimple.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\LexerSimple.cxx + +$(OBJS)\wxscintilla_PropSetSimple.obj: ..\..\src\stc\scintilla\lexlib\PropSetSimple.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\PropSetSimple.cxx + +$(OBJS)\wxscintilla_StyleContext.obj: ..\..\src\stc\scintilla\lexlib\StyleContext.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\StyleContext.cxx + +$(OBJS)\wxscintilla_WordList.obj: ..\..\src\stc\scintilla\lexlib\WordList.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\lexlib\WordList.cxx + +$(OBJS)\wxscintilla_AutoComplete.obj: ..\..\src\stc\scintilla\src\AutoComplete.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\AutoComplete.cxx + +$(OBJS)\wxscintilla_CallTip.obj: ..\..\src\stc\scintilla\src\CallTip.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\CallTip.cxx + +$(OBJS)\wxscintilla_Catalogue.obj: ..\..\src\stc\scintilla\src\Catalogue.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Catalogue.cxx + +$(OBJS)\wxscintilla_CellBuffer.obj: ..\..\src\stc\scintilla\src\CellBuffer.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\CellBuffer.cxx + +$(OBJS)\wxscintilla_CharClassify.obj: ..\..\src\stc\scintilla\src\CharClassify.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\CharClassify.cxx + +$(OBJS)\wxscintilla_ContractionState.obj: ..\..\src\stc\scintilla\src\ContractionState.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\ContractionState.cxx + +$(OBJS)\wxscintilla_Decoration.obj: ..\..\src\stc\scintilla\src\Decoration.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Decoration.cxx + +$(OBJS)\wxscintilla_Document.obj: ..\..\src\stc\scintilla\src\Document.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Document.cxx + +$(OBJS)\wxscintilla_Editor.obj: ..\..\src\stc\scintilla\src\Editor.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Editor.cxx + +$(OBJS)\wxscintilla_ExternalLexer.obj: ..\..\src\stc\scintilla\src\ExternalLexer.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\ExternalLexer.cxx + +$(OBJS)\wxscintilla_Indicator.obj: ..\..\src\stc\scintilla\src\Indicator.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Indicator.cxx + +$(OBJS)\wxscintilla_KeyMap.obj: ..\..\src\stc\scintilla\src\KeyMap.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\KeyMap.cxx + +$(OBJS)\wxscintilla_LineMarker.obj: ..\..\src\stc\scintilla\src\LineMarker.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\LineMarker.cxx + +$(OBJS)\wxscintilla_PerLine.obj: ..\..\src\stc\scintilla\src\PerLine.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\PerLine.cxx + +$(OBJS)\wxscintilla_PositionCache.obj: ..\..\src\stc\scintilla\src\PositionCache.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\PositionCache.cxx + +$(OBJS)\wxscintilla_RESearch.obj: ..\..\src\stc\scintilla\src\RESearch.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\RESearch.cxx + +$(OBJS)\wxscintilla_RunStyles.obj: ..\..\src\stc\scintilla\src\RunStyles.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\RunStyles.cxx + +$(OBJS)\wxscintilla_ScintillaBase.obj: ..\..\src\stc\scintilla\src\ScintillaBase.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\ScintillaBase.cxx + +$(OBJS)\wxscintilla_Selection.obj: ..\..\src\stc\scintilla\src\Selection.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Selection.cxx + +$(OBJS)\wxscintilla_Style.obj: ..\..\src\stc\scintilla\src\Style.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\Style.cxx + +$(OBJS)\wxscintilla_UniConversion.obj: ..\..\src\stc\scintilla\src\UniConversion.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\UniConversion.cxx + +$(OBJS)\wxscintilla_ViewStyle.obj: ..\..\src\stc\scintilla\src\ViewStyle.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\ViewStyle.cxx + +$(OBJS)\wxscintilla_XPM.obj: ..\..\src\stc\scintilla\src\XPM.cxx + $(CXX) /c /nologo /TP /Fo$@ $(WXSCINTILLA_CXXFLAGS) ..\..\src\stc\scintilla\src\XPM.cxx + +$(OBJS)\monodll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\monodll_any.obj: ..\..\src\common\any.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\any.cpp + +$(OBJS)\monodll_appbase.obj: ..\..\src\common\appbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\appbase.cpp + +$(OBJS)\monodll_arcall.obj: ..\..\src\common\arcall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arcall.cpp + +$(OBJS)\monodll_arcfind.obj: ..\..\src\common\arcfind.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arcfind.cpp + +$(OBJS)\monodll_archive.obj: ..\..\src\common\archive.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\archive.cpp + +$(OBJS)\monodll_arrstr.obj: ..\..\src\common\arrstr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arrstr.cpp + +$(OBJS)\monodll_base64.obj: ..\..\src\common\base64.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\base64.cpp + +$(OBJS)\monodll_clntdata.obj: ..\..\src\common\clntdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\clntdata.cpp + +$(OBJS)\monodll_cmdline.obj: ..\..\src\common\cmdline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\cmdline.cpp + +$(OBJS)\monodll_config.obj: ..\..\src\common\config.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\config.cpp + +$(OBJS)\monodll_convauto.obj: ..\..\src\common\convauto.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\convauto.cpp + +$(OBJS)\monodll_datetime.obj: ..\..\src\common\datetime.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\datetime.cpp + +$(OBJS)\monodll_datetimefmt.obj: ..\..\src\common\datetimefmt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\datetimefmt.cpp + +$(OBJS)\monodll_datstrm.obj: ..\..\src\common\datstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\datstrm.cpp + +$(OBJS)\monodll_dircmn.obj: ..\..\src\common\dircmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dircmn.cpp + +$(OBJS)\monodll_dynarray.obj: ..\..\src\common\dynarray.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dynarray.cpp + +$(OBJS)\monodll_dynlib.obj: ..\..\src\common\dynlib.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dynlib.cpp + +$(OBJS)\monodll_dynload.obj: ..\..\src\common\dynload.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dynload.cpp + +$(OBJS)\monodll_encconv.obj: ..\..\src\common\encconv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\encconv.cpp + +$(OBJS)\monodll_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\evtloopcmn.cpp + +$(OBJS)\monodll_extended.obj: ..\..\src\common\extended.c + $(CC) /c /nologo /TC /Fo$@ $(MONODLL_CFLAGS) ..\..\src\common\extended.c + +$(OBJS)\monodll_ffile.obj: ..\..\src\common\ffile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ffile.cpp + +$(OBJS)\monodll_file.obj: ..\..\src\common\file.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\file.cpp + +$(OBJS)\monodll_fileback.obj: ..\..\src\common\fileback.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fileback.cpp + +$(OBJS)\monodll_fileconf.obj: ..\..\src\common\fileconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fileconf.cpp + +$(OBJS)\monodll_filefn.obj: ..\..\src\common\filefn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filefn.cpp + +$(OBJS)\monodll_filename.obj: ..\..\src\common\filename.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filename.cpp + +$(OBJS)\monodll_filesys.obj: ..\..\src\common\filesys.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filesys.cpp + +$(OBJS)\monodll_filtall.obj: ..\..\src\common\filtall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filtall.cpp + +$(OBJS)\monodll_filtfind.obj: ..\..\src\common\filtfind.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filtfind.cpp + +$(OBJS)\monodll_fmapbase.obj: ..\..\src\common\fmapbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fmapbase.cpp + +$(OBJS)\monodll_fs_arc.obj: ..\..\src\common\fs_arc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fs_arc.cpp + +$(OBJS)\monodll_fs_filter.obj: ..\..\src\common\fs_filter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fs_filter.cpp + +$(OBJS)\monodll_hash.obj: ..\..\src\common\hash.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\hash.cpp + +$(OBJS)\monodll_hashmap.obj: ..\..\src\common\hashmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\hashmap.cpp + +$(OBJS)\monodll_init.obj: ..\..\src\common\init.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\init.cpp + +$(OBJS)\monodll_intl.obj: ..\..\src\common\intl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\intl.cpp + +$(OBJS)\monodll_ipcbase.obj: ..\..\src\common\ipcbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ipcbase.cpp + +$(OBJS)\monodll_languageinfo.obj: ..\..\src\common\languageinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\languageinfo.cpp + +$(OBJS)\monodll_list.obj: ..\..\src\common\list.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\list.cpp + +$(OBJS)\monodll_log.obj: ..\..\src\common\log.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\log.cpp + +$(OBJS)\monodll_longlong.obj: ..\..\src\common\longlong.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\longlong.cpp + +$(OBJS)\monodll_memory.obj: ..\..\src\common\memory.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\memory.cpp + +$(OBJS)\monodll_mimecmn.obj: ..\..\src\common\mimecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\mimecmn.cpp + +$(OBJS)\monodll_module.obj: ..\..\src\common\module.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\module.cpp + +$(OBJS)\monodll_mstream.obj: ..\..\src\common\mstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\mstream.cpp + +$(OBJS)\monodll_numformatter.obj: ..\..\src\common\numformatter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\numformatter.cpp + +$(OBJS)\monodll_object.obj: ..\..\src\common\object.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\object.cpp + +$(OBJS)\monodll_platinfo.obj: ..\..\src\common\platinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\platinfo.cpp + +$(OBJS)\monodll_powercmn.obj: ..\..\src\common\powercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\powercmn.cpp + +$(OBJS)\monodll_process.obj: ..\..\src\common\process.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\process.cpp + +$(OBJS)\monodll_regex.obj: ..\..\src\common\regex.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\regex.cpp + +$(OBJS)\monodll_stdpbase.obj: ..\..\src\common\stdpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stdpbase.cpp + +$(OBJS)\monodll_sstream.obj: ..\..\src\common\sstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sstream.cpp + +$(OBJS)\monodll_stdstream.obj: ..\..\src\common\stdstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stdstream.cpp + +$(OBJS)\monodll_stopwatch.obj: ..\..\src\common\stopwatch.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stopwatch.cpp + +$(OBJS)\monodll_strconv.obj: ..\..\src\common\strconv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\strconv.cpp + +$(OBJS)\monodll_stream.obj: ..\..\src\common\stream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stream.cpp + +$(OBJS)\monodll_string.obj: ..\..\src\common\string.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\string.cpp + +$(OBJS)\monodll_stringimpl.obj: ..\..\src\common\stringimpl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stringimpl.cpp + +$(OBJS)\monodll_stringops.obj: ..\..\src\common\stringops.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stringops.cpp + +$(OBJS)\monodll_strvararg.obj: ..\..\src\common\strvararg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\strvararg.cpp + +$(OBJS)\monodll_sysopt.obj: ..\..\src\common\sysopt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sysopt.cpp + +$(OBJS)\monodll_tarstrm.obj: ..\..\src\common\tarstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\tarstrm.cpp + +$(OBJS)\monodll_textbuf.obj: ..\..\src\common\textbuf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\textbuf.cpp + +$(OBJS)\monodll_textfile.obj: ..\..\src\common\textfile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\textfile.cpp + +$(OBJS)\monodll_threadinfo.obj: ..\..\src\common\threadinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\threadinfo.cpp + +$(OBJS)\monodll_time.obj: ..\..\src\common\time.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\time.cpp + +$(OBJS)\monodll_timercmn.obj: ..\..\src\common\timercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\timercmn.cpp + +$(OBJS)\monodll_timerimpl.obj: ..\..\src\common\timerimpl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\timerimpl.cpp + +$(OBJS)\monodll_tokenzr.obj: ..\..\src\common\tokenzr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\tokenzr.cpp + +$(OBJS)\monodll_translation.obj: ..\..\src\common\translation.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\translation.cpp + +$(OBJS)\monodll_txtstrm.obj: ..\..\src\common\txtstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\txtstrm.cpp + +$(OBJS)\monodll_unichar.obj: ..\..\src\common\unichar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\unichar.cpp + +$(OBJS)\monodll_uri.obj: ..\..\src\common\uri.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\uri.cpp + +$(OBJS)\monodll_ustring.obj: ..\..\src\common\ustring.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ustring.cpp + +$(OBJS)\monodll_variant.obj: ..\..\src\common\variant.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\variant.cpp + +$(OBJS)\monodll_wfstream.obj: ..\..\src\common\wfstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\wfstream.cpp + +$(OBJS)\monodll_wxcrt.obj: ..\..\src\common\wxcrt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\wxcrt.cpp + +$(OBJS)\monodll_wxprintf.obj: ..\..\src\common\wxprintf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\wxprintf.cpp + +$(OBJS)\monodll_xlocale.obj: ..\..\src\common\xlocale.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\xlocale.cpp + +$(OBJS)\monodll_xti.obj: ..\..\src\common\xti.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\xti.cpp + +$(OBJS)\monodll_xtistrm.obj: ..\..\src\common\xtistrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\xtistrm.cpp + +$(OBJS)\monodll_zipstrm.obj: ..\..\src\common\zipstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\zipstrm.cpp + +$(OBJS)\monodll_zstream.obj: ..\..\src\common\zstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\zstream.cpp + +$(OBJS)\monodll_fswatchercmn.obj: ..\..\src\common\fswatchercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fswatchercmn.cpp + +$(OBJS)\monodll_fswatcherg.obj: ..\..\src\generic\fswatcherg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\fswatcherg.cpp + +$(OBJS)\monodll_basemsw.obj: ..\..\src\msw\basemsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\basemsw.cpp + +$(OBJS)\monodll_crashrpt.obj: ..\..\src\msw\crashrpt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\crashrpt.cpp + +$(OBJS)\monodll_debughlp.obj: ..\..\src\msw\debughlp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\debughlp.cpp + +$(OBJS)\monodll_dde.obj: ..\..\src\msw\dde.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dde.cpp + +$(OBJS)\monodll_dir.obj: ..\..\src\msw\dir.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dir.cpp + +$(OBJS)\monodll_dlmsw.obj: ..\..\src\msw\dlmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dlmsw.cpp + +$(OBJS)\monodll_evtloopconsole.obj: ..\..\src\msw\evtloopconsole.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\evtloopconsole.cpp + +$(OBJS)\monodll_mimetype.obj: ..\..\src\msw\mimetype.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mimetype.cpp + +$(OBJS)\monodll_power.obj: ..\..\src\msw\power.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\power.cpp + +$(OBJS)\monodll_regconf.obj: ..\..\src\msw\regconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\regconf.cpp + +$(OBJS)\monodll_registry.obj: ..\..\src\msw\registry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\registry.cpp + +$(OBJS)\monodll_snglinst.obj: ..\..\src\msw\snglinst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\snglinst.cpp + +$(OBJS)\monodll_stackwalk.obj: ..\..\src\msw\stackwalk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\stackwalk.cpp + +$(OBJS)\monodll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\stdpaths.cpp + +$(OBJS)\monodll_thread.obj: ..\..\src\msw\thread.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\thread.cpp + +$(OBJS)\monodll_timer.obj: ..\..\src\msw\timer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\timer.cpp + +$(OBJS)\monodll_utils.obj: ..\..\src\msw\utils.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\utils.cpp + +$(OBJS)\monodll_utilsexc.obj: ..\..\src\msw\utilsexc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\utilsexc.cpp + +$(OBJS)\monodll_fswatcher.obj: ..\..\src\msw\fswatcher.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\fswatcher.cpp + +$(OBJS)\monodll_event.obj: ..\..\src\common\event.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\monodll_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\monodll_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\monodll_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\monodll_main.obj: ..\..\src\msw\main.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\monodll_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\monodll_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\monodll_fs_inet.obj: ..\..\src\common\fs_inet.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fs_inet.cpp + +$(OBJS)\monodll_ftp.obj: ..\..\src\common\ftp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ftp.cpp + +$(OBJS)\monodll_http.obj: ..\..\src\common\http.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\http.cpp + +$(OBJS)\monodll_protocol.obj: ..\..\src\common\protocol.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\protocol.cpp + +$(OBJS)\monodll_sckaddr.obj: ..\..\src\common\sckaddr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sckaddr.cpp + +$(OBJS)\monodll_sckfile.obj: ..\..\src\common\sckfile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sckfile.cpp + +$(OBJS)\monodll_sckipc.obj: ..\..\src\common\sckipc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sckipc.cpp + +$(OBJS)\monodll_sckstrm.obj: ..\..\src\common\sckstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sckstrm.cpp + +$(OBJS)\monodll_socket.obj: ..\..\src\common\socket.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\socket.cpp + +$(OBJS)\monodll_url.obj: ..\..\src\common\url.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\url.cpp + +$(OBJS)\monodll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp + +$(OBJS)\monodll_urlmsw.obj: ..\..\src\msw\urlmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\urlmsw.cpp + +$(OBJS)\monodll_generic_statusbr.obj: ..\..\src\generic\statusbr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\statusbr.cpp + +$(OBJS)\monodll_msw_accel.obj: ..\..\src\msw\accel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\accel.cpp + +$(OBJS)\monodll_anybutton.obj: ..\..\src\msw\anybutton.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\anybutton.cpp + +$(OBJS)\monodll_artmsw.obj: ..\..\src\msw\artmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\artmsw.cpp + +$(OBJS)\monodll_msw_bmpbuttn.obj: ..\..\src\msw\bmpbuttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\bmpbuttn.cpp + +$(OBJS)\monodll_msw_button.obj: ..\..\src\msw\button.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\button.cpp + +$(OBJS)\monodll_msw_checkbox.obj: ..\..\src\msw\checkbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\checkbox.cpp + +$(OBJS)\monodll_msw_choice.obj: ..\..\src\msw\choice.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\choice.cpp + +$(OBJS)\monodll_colordlg.obj: ..\..\src\msw\colordlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\colordlg.cpp + +$(OBJS)\monodll_combo.obj: ..\..\src\msw\combo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\combo.cpp + +$(OBJS)\monodll_msw_combobox.obj: ..\..\src\msw\combobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\combobox.cpp + +$(OBJS)\monodll_msw_control.obj: ..\..\src\msw\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\control.cpp + +$(OBJS)\monodll_msw_dialog.obj: ..\..\src\msw\dialog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dialog.cpp + +$(OBJS)\monodll_dirdlg.obj: ..\..\src\msw\dirdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dirdlg.cpp + +$(OBJS)\monodll_dragimag.obj: ..\..\src\msw\dragimag.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dragimag.cpp + +$(OBJS)\monodll_filedlg.obj: ..\..\src\msw\filedlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\filedlg.cpp + +$(OBJS)\monodll_frame.obj: ..\..\src\msw\frame.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\frame.cpp + +$(OBJS)\monodll_msw_gauge.obj: ..\..\src\msw\gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\gauge.cpp + +$(OBJS)\monodll_headerctrl.obj: ..\..\src\msw\headerctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\headerctrl.cpp + +$(OBJS)\monodll_iniconf.obj: ..\..\src\msw\iniconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\iniconf.cpp + +$(OBJS)\monodll_msw_listbox.obj: ..\..\src\msw\listbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\listbox.cpp + +$(OBJS)\monodll_msw_listctrl.obj: ..\..\src\msw\listctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\listctrl.cpp + +$(OBJS)\monodll_mdi.obj: ..\..\src\msw\mdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mdi.cpp + +$(OBJS)\monodll_msw_menu.obj: ..\..\src\msw\menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\menu.cpp + +$(OBJS)\monodll_menuitem.obj: ..\..\src\msw\menuitem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\menuitem.cpp + +$(OBJS)\monodll_metafile.obj: ..\..\src\msw\metafile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\metafile.cpp + +$(OBJS)\monodll_msgdlg.obj: ..\..\src\msw\msgdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\msgdlg.cpp + +$(OBJS)\monodll_nativdlg.obj: ..\..\src\msw\nativdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\nativdlg.cpp + +$(OBJS)\monodll_nativewin.obj: ..\..\src\msw\nativewin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\nativewin.cpp + +$(OBJS)\monodll_msw_notebook.obj: ..\..\src\msw\notebook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\notebook.cpp + +$(OBJS)\monodll_access.obj: ..\..\src\msw\ole\access.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\access.cpp + +$(OBJS)\monodll_ownerdrw.obj: ..\..\src\msw\ownerdrw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ownerdrw.cpp + +$(OBJS)\monodll_msw_panel.obj: ..\..\src\msw\panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\panel.cpp + +$(OBJS)\monodll_progdlg.obj: ..\..\src\msw\progdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\progdlg.cpp + +$(OBJS)\monodll_msw_radiobox.obj: ..\..\src\msw\radiobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\radiobox.cpp + +$(OBJS)\monodll_msw_radiobut.obj: ..\..\src\msw\radiobut.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\radiobut.cpp + +$(OBJS)\monodll_richmsgdlg.obj: ..\..\src\msw\richmsgdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\richmsgdlg.cpp + +$(OBJS)\monodll_msw_scrolbar.obj: ..\..\src\msw\scrolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\scrolbar.cpp + +$(OBJS)\monodll_msw_slider.obj: ..\..\src\msw\slider.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\slider.cpp + +$(OBJS)\monodll_msw_spinbutt.obj: ..\..\src\msw\spinbutt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\spinbutt.cpp + +$(OBJS)\monodll_spinctrl.obj: ..\..\src\msw\spinctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\spinctrl.cpp + +$(OBJS)\monodll_msw_statbmp.obj: ..\..\src\msw\statbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\statbmp.cpp + +$(OBJS)\monodll_msw_statbox.obj: ..\..\src\msw\statbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\statbox.cpp + +$(OBJS)\monodll_statusbar.obj: ..\..\src\msw\statusbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\statusbar.cpp + +$(OBJS)\monodll_msw_statline.obj: ..\..\src\msw\statline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\statline.cpp + +$(OBJS)\monodll_msw_stattext.obj: ..\..\src\msw\stattext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\stattext.cpp + +$(OBJS)\monodll_msw_toolbar.obj: ..\..\src\msw\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\toolbar.cpp + +$(OBJS)\monodll_msw_textctrl.obj: ..\..\src\msw\textctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\textctrl.cpp + +$(OBJS)\monodll_textentry.obj: ..\..\src\msw\textentry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\textentry.cpp + +$(OBJS)\monodll_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\tglbtn.cpp + +$(OBJS)\monodll_treectrl.obj: ..\..\src\msw\treectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\treectrl.cpp + +$(OBJS)\monodll_msw_checklst.obj: ..\..\src\msw\checklst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\checklst.cpp + +$(OBJS)\monodll_msw_fdrepdlg.obj: ..\..\src\msw\fdrepdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\fdrepdlg.cpp + +$(OBJS)\monodll_fontdlg.obj: ..\..\src\msw\fontdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\fontdlg.cpp + +$(OBJS)\monodll_generic_accel.obj: ..\..\src\generic\accel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\accel.cpp + +$(OBJS)\monodll_colrdlgg.obj: ..\..\src\generic\colrdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\colrdlgg.cpp + +$(OBJS)\monodll_dirdlgg.obj: ..\..\src\generic\dirdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\dirdlgg.cpp + +$(OBJS)\monodll_generic_fdrepdlg.obj: ..\..\src\generic\fdrepdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\fdrepdlg.cpp + +$(OBJS)\monodll_filedlgg.obj: ..\..\src\generic\filedlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\filedlgg.cpp + +$(OBJS)\monodll_fontdlgg.obj: ..\..\src\generic\fontdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\fontdlgg.cpp + +$(OBJS)\monodll_generic_listctrl.obj: ..\..\src\generic\listctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\listctrl.cpp + +$(OBJS)\monodll_mdig.obj: ..\..\src\generic\mdig.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\mdig.cpp + +$(OBJS)\monodll_univ_bmpbuttn.obj: ..\..\src\univ\bmpbuttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\bmpbuttn.cpp + +$(OBJS)\monodll_univ_button.obj: ..\..\src\univ\button.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\button.cpp + +$(OBJS)\monodll_univ_checkbox.obj: ..\..\src\univ\checkbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\checkbox.cpp + +$(OBJS)\monodll_univ_checklst.obj: ..\..\src\univ\checklst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\checklst.cpp + +$(OBJS)\monodll_univ_choice.obj: ..\..\src\univ\choice.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\choice.cpp + +$(OBJS)\monodll_univ_combobox.obj: ..\..\src\univ\combobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\combobox.cpp + +$(OBJS)\monodll_univ_control.obj: ..\..\src\univ\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\control.cpp + +$(OBJS)\monodll_ctrlrend.obj: ..\..\src\univ\ctrlrend.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\ctrlrend.cpp + +$(OBJS)\monodll_univ_dialog.obj: ..\..\src\univ\dialog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\dialog.cpp + +$(OBJS)\monodll_framuniv.obj: ..\..\src\univ\framuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\framuniv.cpp + +$(OBJS)\monodll_univ_gauge.obj: ..\..\src\univ\gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\gauge.cpp + +$(OBJS)\monodll_inpcons.obj: ..\..\src\univ\inpcons.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\inpcons.cpp + +$(OBJS)\monodll_inphand.obj: ..\..\src\univ\inphand.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\inphand.cpp + +$(OBJS)\monodll_univ_listbox.obj: ..\..\src\univ\listbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\listbox.cpp + +$(OBJS)\monodll_univ_menu.obj: ..\..\src\univ\menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\menu.cpp + +$(OBJS)\monodll_univ_notebook.obj: ..\..\src\univ\notebook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\notebook.cpp + +$(OBJS)\monodll_univ_radiobox.obj: ..\..\src\univ\radiobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\radiobox.cpp + +$(OBJS)\monodll_univ_radiobut.obj: ..\..\src\univ\radiobut.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\radiobut.cpp + +$(OBJS)\monodll_scrarrow.obj: ..\..\src\univ\scrarrow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\scrarrow.cpp + +$(OBJS)\monodll_univ_scrolbar.obj: ..\..\src\univ\scrolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\scrolbar.cpp + +$(OBJS)\monodll_scrthumb.obj: ..\..\src\univ\scrthumb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\scrthumb.cpp + +$(OBJS)\monodll_settingsuniv.obj: ..\..\src\univ\settingsuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\settingsuniv.cpp + +$(OBJS)\monodll_univ_slider.obj: ..\..\src\univ\slider.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\slider.cpp + +$(OBJS)\monodll_univ_spinbutt.obj: ..\..\src\univ\spinbutt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\spinbutt.cpp + +$(OBJS)\monodll_univ_statbmp.obj: ..\..\src\univ\statbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\statbmp.cpp + +$(OBJS)\monodll_univ_statbox.obj: ..\..\src\univ\statbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\statbox.cpp + +$(OBJS)\monodll_univ_statline.obj: ..\..\src\univ\statline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\statline.cpp + +$(OBJS)\monodll_univ_stattext.obj: ..\..\src\univ\stattext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\stattext.cpp + +$(OBJS)\monodll_univ_statusbr.obj: ..\..\src\univ\statusbr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\statusbr.cpp + +$(OBJS)\monodll_stdrend.obj: ..\..\src\univ\stdrend.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\stdrend.cpp + +$(OBJS)\monodll_univ_textctrl.obj: ..\..\src\univ\textctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\textctrl.cpp + +$(OBJS)\monodll_univ_tglbtn.obj: ..\..\src\univ\tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\tglbtn.cpp + +$(OBJS)\monodll_theme.obj: ..\..\src\univ\theme.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\theme.cpp + +$(OBJS)\monodll_univ_toolbar.obj: ..\..\src\univ\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\toolbar.cpp + +$(OBJS)\monodll_topluniv.obj: ..\..\src\univ\topluniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\topluniv.cpp + +$(OBJS)\monodll_winuniv.obj: ..\..\src\univ\winuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\winuniv.cpp + +$(OBJS)\monodll_gtk.obj: ..\..\src\univ\themes\gtk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\themes\gtk.cpp + +$(OBJS)\monodll_metal.obj: ..\..\src\univ\themes\metal.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\themes\metal.cpp + +$(OBJS)\monodll_mono.obj: ..\..\src\univ\themes\mono.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\themes\mono.cpp + +$(OBJS)\monodll_win32.obj: ..\..\src\univ\themes\win32.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\themes\win32.cpp + +$(OBJS)\monodll_bmpcbox.obj: ..\..\src\msw\bmpcbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\bmpcbox.cpp + +$(OBJS)\monodll_calctrl.obj: ..\..\src\msw\calctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\calctrl.cpp + +$(OBJS)\monodll_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp + +$(OBJS)\monodll_datecontrols.obj: ..\..\src\msw\datecontrols.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datecontrols.cpp + +$(OBJS)\monodll_datectrl.obj: ..\..\src\msw\datectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp + +$(OBJS)\monodll_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp + +$(OBJS)\monodll_hyperlink.obj: ..\..\src\msw\hyperlink.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\hyperlink.cpp + +$(OBJS)\monodll_timectrl.obj: ..\..\src\msw\timectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\timectrl.cpp + +$(OBJS)\monodll_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\mediactrlcmn.cpp + +$(OBJS)\monodll_mediactrl_am.obj: ..\..\src\msw\mediactrl_am.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mediactrl_am.cpp + +$(OBJS)\monodll_mediactrl_wmp10.obj: ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mediactrl_wmp10.cpp + +$(OBJS)\monodll_mediactrl_qt.obj: ..\..\src\msw\mediactrl_qt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\mediactrl_qt.cpp + +$(OBJS)\monodll_helpbest.obj: ..\..\src\msw\helpbest.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\helpbest.cpp + +$(OBJS)\monodll_helpctrl.obj: ..\..\src\html\helpctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\helpctrl.cpp + +$(OBJS)\monodll_helpdata.obj: ..\..\src\html\helpdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\helpdata.cpp + +$(OBJS)\monodll_helpdlg.obj: ..\..\src\html\helpdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\helpdlg.cpp + +$(OBJS)\monodll_helpfrm.obj: ..\..\src\html\helpfrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\helpfrm.cpp + +$(OBJS)\monodll_helpwnd.obj: ..\..\src\html\helpwnd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\helpwnd.cpp + +$(OBJS)\monodll_htmlcell.obj: ..\..\src\html\htmlcell.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmlcell.cpp + +$(OBJS)\monodll_htmlfilt.obj: ..\..\src\html\htmlfilt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmlfilt.cpp + +$(OBJS)\monodll_htmlpars.obj: ..\..\src\html\htmlpars.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmlpars.cpp + +$(OBJS)\monodll_htmltag.obj: ..\..\src\html\htmltag.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmltag.cpp + +$(OBJS)\monodll_htmlwin.obj: ..\..\src\html\htmlwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmlwin.cpp + +$(OBJS)\monodll_htmprint.obj: ..\..\src\html\htmprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\htmprint.cpp + +$(OBJS)\monodll_m_dflist.obj: ..\..\src\html\m_dflist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_dflist.cpp + +$(OBJS)\monodll_m_fonts.obj: ..\..\src\html\m_fonts.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_fonts.cpp + +$(OBJS)\monodll_m_hline.obj: ..\..\src\html\m_hline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_hline.cpp + +$(OBJS)\monodll_m_image.obj: ..\..\src\html\m_image.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_image.cpp + +$(OBJS)\monodll_m_layout.obj: ..\..\src\html\m_layout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_layout.cpp + +$(OBJS)\monodll_m_links.obj: ..\..\src\html\m_links.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_links.cpp + +$(OBJS)\monodll_m_list.obj: ..\..\src\html\m_list.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_list.cpp + +$(OBJS)\monodll_m_pre.obj: ..\..\src\html\m_pre.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_pre.cpp + +$(OBJS)\monodll_m_span.obj: ..\..\src\html\m_span.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_span.cpp + +$(OBJS)\monodll_m_style.obj: ..\..\src\html\m_style.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_style.cpp + +$(OBJS)\monodll_m_tables.obj: ..\..\src\html\m_tables.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\m_tables.cpp + +$(OBJS)\monodll_styleparams.obj: ..\..\src\html\styleparams.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\styleparams.cpp + +$(OBJS)\monodll_winpars.obj: ..\..\src\html\winpars.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\html\winpars.cpp + +$(OBJS)\monodll_htmllbox.obj: ..\..\src\generic\htmllbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\htmllbox.cpp + +$(OBJS)\monodll_webview_ie.obj: ..\..\src\msw\webview_ie.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\webview_ie.cpp + +$(OBJS)\monodll_webview.obj: ..\..\src\common\webview.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webview.cpp + +$(OBJS)\monodll_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp + +$(OBJS)\monodll_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp + +$(OBJS)\monodll_debugrpt.obj: ..\..\src\common\debugrpt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\debugrpt.cpp + +$(OBJS)\monodll_dbgrptg.obj: ..\..\src\generic\dbgrptg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\dbgrptg.cpp + +$(OBJS)\monodll_xh_animatctrl.obj: ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_animatctrl.cpp + +$(OBJS)\monodll_xh_bannerwindow.obj: ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_bannerwindow.cpp + +$(OBJS)\monodll_xh_bmp.obj: ..\..\src\xrc\xh_bmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_bmp.cpp + +$(OBJS)\monodll_xh_bmpcbox.obj: ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_bmpcbox.cpp + +$(OBJS)\monodll_xh_bmpbt.obj: ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_bmpbt.cpp + +$(OBJS)\monodll_xh_bttn.obj: ..\..\src\xrc\xh_bttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_bttn.cpp + +$(OBJS)\monodll_xh_cald.obj: ..\..\src\xrc\xh_cald.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_cald.cpp + +$(OBJS)\monodll_xh_chckb.obj: ..\..\src\xrc\xh_chckb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_chckb.cpp + +$(OBJS)\monodll_xh_chckl.obj: ..\..\src\xrc\xh_chckl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_chckl.cpp + +$(OBJS)\monodll_xh_choic.obj: ..\..\src\xrc\xh_choic.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_choic.cpp + +$(OBJS)\monodll_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_choicbk.cpp + +$(OBJS)\monodll_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_clrpicker.cpp + +$(OBJS)\monodll_xh_cmdlinkbn.obj: ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_cmdlinkbn.cpp + +$(OBJS)\monodll_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_collpane.cpp + +$(OBJS)\monodll_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_combo.cpp + +$(OBJS)\monodll_xh_comboctrl.obj: ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_comboctrl.cpp + +$(OBJS)\monodll_xh_datectrl.obj: ..\..\src\xrc\xh_datectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_datectrl.cpp + +$(OBJS)\monodll_xh_dirpicker.obj: ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_dirpicker.cpp + +$(OBJS)\monodll_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_dlg.cpp + +$(OBJS)\monodll_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp + +$(OBJS)\monodll_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + +$(OBJS)\monodll_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp + +$(OBJS)\monodll_xh_fontpicker.obj: ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_fontpicker.cpp + +$(OBJS)\monodll_xh_frame.obj: ..\..\src\xrc\xh_frame.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_frame.cpp + +$(OBJS)\monodll_xh_gauge.obj: ..\..\src\xrc\xh_gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_gauge.cpp + +$(OBJS)\monodll_xh_gdctl.obj: ..\..\src\xrc\xh_gdctl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_gdctl.cpp + +$(OBJS)\monodll_xh_grid.obj: ..\..\src\xrc\xh_grid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_grid.cpp + +$(OBJS)\monodll_xh_html.obj: ..\..\src\xrc\xh_html.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_html.cpp + +$(OBJS)\monodll_xh_hyperlink.obj: ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_hyperlink.cpp + +$(OBJS)\monodll_xh_listb.obj: ..\..\src\xrc\xh_listb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_listb.cpp + +$(OBJS)\monodll_xh_listbk.obj: ..\..\src\xrc\xh_listbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_listbk.cpp + +$(OBJS)\monodll_xh_listc.obj: ..\..\src\xrc\xh_listc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_listc.cpp + +$(OBJS)\monodll_xh_mdi.obj: ..\..\src\xrc\xh_mdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_mdi.cpp + +$(OBJS)\monodll_xh_menu.obj: ..\..\src\xrc\xh_menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_menu.cpp + +$(OBJS)\monodll_xh_notbk.obj: ..\..\src\xrc\xh_notbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_notbk.cpp + +$(OBJS)\monodll_xh_odcombo.obj: ..\..\src\xrc\xh_odcombo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_odcombo.cpp + +$(OBJS)\monodll_xh_panel.obj: ..\..\src\xrc\xh_panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_panel.cpp + +$(OBJS)\monodll_xh_propdlg.obj: ..\..\src\xrc\xh_propdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_propdlg.cpp + +$(OBJS)\monodll_xh_radbt.obj: ..\..\src\xrc\xh_radbt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_radbt.cpp + +$(OBJS)\monodll_xh_radbx.obj: ..\..\src\xrc\xh_radbx.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_radbx.cpp + +$(OBJS)\monodll_xh_scrol.obj: ..\..\src\xrc\xh_scrol.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_scrol.cpp + +$(OBJS)\monodll_xh_scwin.obj: ..\..\src\xrc\xh_scwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_scwin.cpp + +$(OBJS)\monodll_xh_htmllbox.obj: ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_htmllbox.cpp + +$(OBJS)\monodll_xh_sizer.obj: ..\..\src\xrc\xh_sizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_sizer.cpp + +$(OBJS)\monodll_xh_slidr.obj: ..\..\src\xrc\xh_slidr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_slidr.cpp + +$(OBJS)\monodll_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_spin.cpp + +$(OBJS)\monodll_xh_split.obj: ..\..\src\xrc\xh_split.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_split.cpp + +$(OBJS)\monodll_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_srchctrl.cpp + +$(OBJS)\monodll_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_statbar.cpp + +$(OBJS)\monodll_xh_stbmp.obj: ..\..\src\xrc\xh_stbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_stbmp.cpp + +$(OBJS)\monodll_xh_stbox.obj: ..\..\src\xrc\xh_stbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_stbox.cpp + +$(OBJS)\monodll_xh_stlin.obj: ..\..\src\xrc\xh_stlin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_stlin.cpp + +$(OBJS)\monodll_xh_sttxt.obj: ..\..\src\xrc\xh_sttxt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_sttxt.cpp + +$(OBJS)\monodll_xh_text.obj: ..\..\src\xrc\xh_text.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_text.cpp + +$(OBJS)\monodll_xh_tglbtn.obj: ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_tglbtn.cpp + +$(OBJS)\monodll_xh_timectrl.obj: ..\..\src\xrc\xh_timectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_timectrl.cpp + +$(OBJS)\monodll_xh_toolb.obj: ..\..\src\xrc\xh_toolb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_toolb.cpp + +$(OBJS)\monodll_xh_toolbk.obj: ..\..\src\xrc\xh_toolbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_toolbk.cpp + +$(OBJS)\monodll_xh_tree.obj: ..\..\src\xrc\xh_tree.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_tree.cpp + +$(OBJS)\monodll_xh_treebk.obj: ..\..\src\xrc\xh_treebk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_treebk.cpp + +$(OBJS)\monodll_xh_unkwn.obj: ..\..\src\xrc\xh_unkwn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_unkwn.cpp + +$(OBJS)\monodll_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_wizrd.cpp + +$(OBJS)\monodll_xmlres.obj: ..\..\src\xrc\xmlres.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmlres.cpp + +$(OBJS)\monodll_xmladv.obj: ..\..\src\xrc\xmladv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmladv.cpp + +$(OBJS)\monodll_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp + +$(OBJS)\monodll_framemanager.obj: ..\..\src\aui\framemanager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\framemanager.cpp + +$(OBJS)\monodll_dockart.obj: ..\..\src\aui\dockart.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\dockart.cpp + +$(OBJS)\monodll_floatpane.obj: ..\..\src\aui\floatpane.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\floatpane.cpp + +$(OBJS)\monodll_auibook.obj: ..\..\src\aui\auibook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\auibook.cpp + +$(OBJS)\monodll_auibar.obj: ..\..\src\aui\auibar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\auibar.cpp + +$(OBJS)\monodll_tabmdi.obj: ..\..\src\aui\tabmdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\tabmdi.cpp + +$(OBJS)\monodll_tabart.obj: ..\..\src\aui\tabart.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\tabart.cpp + +$(OBJS)\monodll_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + +$(OBJS)\monodll_advprops.obj: ..\..\src\propgrid\advprops.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\advprops.cpp + +$(OBJS)\monodll_editors.obj: ..\..\src\propgrid\editors.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\editors.cpp + +$(OBJS)\monodll_manager.obj: ..\..\src\propgrid\manager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\manager.cpp + +$(OBJS)\monodll_property.obj: ..\..\src\propgrid\property.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\property.cpp + +$(OBJS)\monodll_propgrid.obj: ..\..\src\propgrid\propgrid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\propgrid.cpp + +$(OBJS)\monodll_propgridiface.obj: ..\..\src\propgrid\propgridiface.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\propgridiface.cpp + +$(OBJS)\monodll_propgridpagestate.obj: ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\propgridpagestate.cpp + +$(OBJS)\monodll_props.obj: ..\..\src\propgrid\props.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\props.cpp + +$(OBJS)\monodll_art_internal.obj: ..\..\src\ribbon\art_internal.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\art_internal.cpp + +$(OBJS)\monodll_art_msw.obj: ..\..\src\ribbon\art_msw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\art_msw.cpp + +$(OBJS)\monodll_art_aui.obj: ..\..\src\ribbon\art_aui.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\art_aui.cpp + +$(OBJS)\monodll_bar.obj: ..\..\src\ribbon\bar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\bar.cpp + +$(OBJS)\monodll_ribbon_buttonbar.obj: ..\..\src\ribbon\buttonbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\buttonbar.cpp + +$(OBJS)\monodll_ribbon_control.obj: ..\..\src\ribbon\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\control.cpp + +$(OBJS)\monodll_gallery.obj: ..\..\src\ribbon\gallery.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\gallery.cpp + +$(OBJS)\monodll_page.obj: ..\..\src\ribbon\page.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\page.cpp + +$(OBJS)\monodll_ribbon_panel.obj: ..\..\src\ribbon\panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\panel.cpp + +$(OBJS)\monodll_ribbon_toolbar.obj: ..\..\src\ribbon\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\ribbon\toolbar.cpp + +$(OBJS)\monodll_xh_ribbon.obj: ..\..\src\xrc\xh_ribbon.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_ribbon.cpp + +$(OBJS)\monodll_richtextbuffer.obj: ..\..\src\richtext\richtextbuffer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextbuffer.cpp + +$(OBJS)\monodll_richtextctrl.obj: ..\..\src\richtext\richtextctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextctrl.cpp + +$(OBJS)\monodll_richtextformatdlg.obj: ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextformatdlg.cpp + +$(OBJS)\monodll_richtexthtml.obj: ..\..\src\richtext\richtexthtml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtexthtml.cpp + +$(OBJS)\monodll_richtextimagedlg.obj: ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextimagedlg.cpp + +$(OBJS)\monodll_richtextprint.obj: ..\..\src\richtext\richtextprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextprint.cpp + +$(OBJS)\monodll_richtextstyledlg.obj: ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextstyledlg.cpp + +$(OBJS)\monodll_richtextstyles.obj: ..\..\src\richtext\richtextstyles.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextstyles.cpp + +$(OBJS)\monodll_richtextsymboldlg.obj: ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextsymboldlg.cpp + +$(OBJS)\monodll_richtextxml.obj: ..\..\src\richtext\richtextxml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\richtext\richtextxml.cpp + +$(OBJS)\monodll_xh_richtext.obj: ..\..\src\xrc\xh_richtext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_richtext.cpp + +$(OBJS)\monodll_stc.obj: ..\..\src\stc\stc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\stc\stc.cpp + +$(OBJS)\monodll_PlatWX.obj: ..\..\src\stc\PlatWX.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\stc\PlatWX.cpp + +$(OBJS)\monodll_ScintillaWX.obj: ..\..\src\stc\ScintillaWX.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\stc\ScintillaWX.cpp + +$(OBJS)\monodll_xml.obj: ..\..\src\xml\xml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xml\xml.cpp + +$(OBJS)\monodll_xtixml.obj: ..\..\src\common\xtixml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\xtixml.cpp + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_activex.obj: ..\..\src\msw\ole\activex.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\activex.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_app.obj: ..\..\src\msw\app.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\app.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bitmap.obj: ..\..\src\msw\bitmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\bitmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_brush.obj: ..\..\src\msw\brush.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\brush.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_caret.obj: ..\..\src\msw\caret.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\caret.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_clipbrd.obj: ..\..\src\msw\clipbrd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\clipbrd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_colour.obj: ..\..\src\msw\colour.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\colour.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_cursor.obj: ..\..\src\msw\cursor.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\cursor.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_data.obj: ..\..\src\msw\data.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\data.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dc.obj: ..\..\src\msw\dc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcclient.obj: ..\..\src\msw\dcclient.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dcclient.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcmemory.obj: ..\..\src\msw\dcmemory.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dcmemory.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcprint.obj: ..\..\src\msw\dcprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dcprint.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcscreen.obj: ..\..\src\msw\dcscreen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dcscreen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dialup.obj: ..\..\src\msw\dialup.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dialup.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dib.obj: ..\..\src\msw\dib.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\dib.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_display.obj: ..\..\src\msw\display.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\display.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_enhmeta.obj: ..\..\src\msw\enhmeta.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\enhmeta.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_font.obj: ..\..\src\msw\font.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\font.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontenum.obj: ..\..\src\msw\fontenum.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\fontenum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontutil.obj: ..\..\src\msw\fontutil.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\fontutil.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gdiimage.obj: ..\..\src\msw\gdiimage.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\gdiimage.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gdiobj.obj: ..\..\src\msw\gdiobj.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\gdiobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gdiplus.obj: ..\..\src\msw\gdiplus.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\gdiplus.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_graphics.obj: ..\..\src\msw\graphics.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\graphics.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_icon.obj: ..\..\src\msw\icon.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\icon.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imaglist.obj: ..\..\src\msw\imaglist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\imaglist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_minifram.obj: ..\..\src\msw\minifram.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\minifram.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_nonownedwnd.obj: ..\..\src\msw\nonownedwnd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\nonownedwnd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dataobj.obj: ..\..\src\msw\ole\dataobj.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\dataobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dropsrc.obj: ..\..\src\msw\ole\dropsrc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\dropsrc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_droptgt.obj: ..\..\src\msw\ole\droptgt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\droptgt.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_oleutils.obj: ..\..\src\msw\ole\oleutils.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\oleutils.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_safearray.obj: ..\..\src\msw\ole\safearray.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\safearray.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_palette.obj: ..\..\src\msw\palette.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\palette.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_pen.obj: ..\..\src\msw\pen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\pen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_popupwin.obj: ..\..\src\msw\popupwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\popupwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_printdlg.obj: ..\..\src\msw\printdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\printdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_printwin.obj: ..\..\src\msw\printwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\printwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_region.obj: ..\..\src\msw\region.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\region.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_renderer.obj: ..\..\src\msw\renderer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\renderer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_settings.obj: ..\..\src\msw\settings.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\settings.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_textmeasure.obj: ..\..\src\msw\textmeasure.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\textmeasure.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_tooltip.obj: ..\..\src\msw\tooltip.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\tooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_toplevel.obj: ..\..\src\msw\toplevel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\toplevel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_uiaction.obj: ..\..\src\msw\uiaction.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\uiaction.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_utilsgui.obj: ..\..\src\msw\utilsgui.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\utilsgui.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_utilswin.obj: ..\..\src\msw\utilswin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\utilswin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_uxtheme.obj: ..\..\src\msw\uxtheme.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\uxtheme.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_window.obj: ..\..\src\msw\window.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\window.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_helpchm.obj: ..\..\src\msw\helpchm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\helpchm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_helpwin.obj: ..\..\src\msw\helpwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\helpwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_automtn.obj: ..\..\src\msw\ole\automtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\automtn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_uuid.obj: ..\..\src\msw\ole\uuid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\ole\uuid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_clrpickerg.obj: ..\..\src\generic\clrpickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\clrpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_collpaneg.obj: ..\..\src\generic\collpaneg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\collpaneg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_filepickerg.obj: ..\..\src\generic\filepickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\filepickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontpickerg.obj: ..\..\src\generic\fontpickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\fontpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_prntdlgg.obj: ..\..\src\generic\prntdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\prntdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_evtloop.obj: ..\..\src\msw\evtloop.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\evtloop.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_accelcmn.obj: ..\..\src\common\accelcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\accelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_accesscmn.obj: ..\..\src\common\accesscmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\accesscmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_anidecod.obj: ..\..\src\common\anidecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\anidecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_affinematrix2d.obj: ..\..\src\common\affinematrix2d.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\affinematrix2d.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_appcmn.obj: ..\..\src\common\appcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\appcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_artprov.obj: ..\..\src\common\artprov.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\artprov.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_artstd.obj: ..\..\src\common\artstd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\artstd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bmpbase.obj: ..\..\src\common\bmpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\bmpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bmpbtncmn.obj: ..\..\src\common\bmpbtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\bmpbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bookctrl.obj: ..\..\src\common\bookctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\bookctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_btncmn.obj: ..\..\src\common\btncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\btncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_cairo.obj: ..\..\src\common\cairo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\cairo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_checkboxcmn.obj: ..\..\src\common\checkboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\checkboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_checklstcmn.obj: ..\..\src\common\checklstcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\checklstcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_choiccmn.obj: ..\..\src\common\choiccmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\choiccmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_clipcmn.obj: ..\..\src\common\clipcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\clipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_clrpickercmn.obj: ..\..\src\common\clrpickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\clrpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_colourcmn.obj: ..\..\src\common\colourcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\colourcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_colourdata.obj: ..\..\src\common\colourdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\colourdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_combocmn.obj: ..\..\src\common\combocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\combocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_cmdproc.obj: ..\..\src\common\cmdproc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\cmdproc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_cmndata.obj: ..\..\src\common\cmndata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\cmndata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_containr.obj: ..\..\src\common\containr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\containr.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_cshelp.obj: ..\..\src\common\cshelp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\cshelp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_ctrlcmn.obj: ..\..\src\common\ctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_ctrlsub.obj: ..\..\src\common\ctrlsub.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ctrlsub.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcbase.obj: ..\..\src\common\dcbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dcbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcbufcmn.obj: ..\..\src\common\dcbufcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dcbufcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcgraph.obj: ..\..\src\common\dcgraph.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dcgraph.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcsvg.obj: ..\..\src\common\dcsvg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dcsvg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dirctrlcmn.obj: ..\..\src\common\dirctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dirctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dlgcmn.obj: ..\..\src\common\dlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dndcmn.obj: ..\..\src\common\dndcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dndcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dobjcmn.obj: ..\..\src\common\dobjcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dobjcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_docmdi.obj: ..\..\src\common\docmdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\docmdi.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_docview.obj: ..\..\src\common\docview.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\docview.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dpycmn.obj: ..\..\src\common\dpycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dpycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dseldlg.obj: ..\..\src\common\dseldlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\dseldlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_effects.obj: ..\..\src\common\effects.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\effects.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fddlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filepickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontpickercmn.obj: ..\..\src\common\fontpickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fldlgcmn.obj: ..\..\src\common\fldlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fldlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontcmn.obj: ..\..\src\common\fontcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontdata.obj: ..\..\src\common\fontdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_graphicc.obj: ..\..\src\generic\graphicc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\graphicc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontenumcmn.obj: ..\..\src\common\fontenumcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontenumcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontmap.obj: ..\..\src\common\fontmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_fontutilcmn.obj: ..\..\src\common\fontutilcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\fontutilcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_framecmn.obj: ..\..\src\common\framecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\framecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gaugecmn.obj: ..\..\src\common\gaugecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\gaugecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gbsizer.obj: ..\..\src\common\gbsizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\gbsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gdicmn.obj: ..\..\src\common\gdicmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\gdicmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_geometry.obj: ..\..\src\common\geometry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\geometry.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gifdecod.obj: ..\..\src\common\gifdecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\gifdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_graphcmn.obj: ..\..\src\common\graphcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\graphcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_headercolcmn.obj: ..\..\src\common\headercolcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\headercolcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_headerctrlcmn.obj: ..\..\src\common\headerctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\headerctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_helpbase.obj: ..\..\src\common\helpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\helpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_iconbndl.obj: ..\..\src\common\iconbndl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\iconbndl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagall.obj: ..\..\src\common\imagall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagall.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagbmp.obj: ..\..\src\common\imagbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagbmp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_image.obj: ..\..\src\common\image.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\image.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagfill.obj: ..\..\src\common\imagfill.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagfill.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imaggif.obj: ..\..\src\common\imaggif.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imaggif.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagiff.obj: ..\..\src\common\imagiff.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagjpeg.obj: ..\..\src\common\imagjpeg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagjpeg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagpcx.obj: ..\..\src\common\imagpcx.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagpcx.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagpng.obj: ..\..\src\common\imagpng.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagpng.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagpnm.obj: ..\..\src\common\imagpnm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagpnm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagtga.obj: ..\..\src\common\imagtga.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagtga.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagtiff.obj: ..\..\src\common\imagtiff.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagtiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_imagxpm.obj: ..\..\src\common\imagxpm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\imagxpm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_layout.obj: ..\..\src\common\layout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\layout.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_lboxcmn.obj: ..\..\src\common\lboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\lboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_listctrlcmn.obj: ..\..\src\common\listctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\listctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_markupparser.obj: ..\..\src\common\markupparser.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\markupparser.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_matrix.obj: ..\..\src\common\matrix.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\matrix.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_menucmn.obj: ..\..\src\common\menucmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\menucmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_modalhook.obj: ..\..\src\common\modalhook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\modalhook.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_mousemanager.obj: ..\..\src\common\mousemanager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\mousemanager.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_nbkbase.obj: ..\..\src\common\nbkbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\nbkbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\overlaycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_ownerdrwcmn.obj: ..\..\src\common\ownerdrwcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\ownerdrwcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_paper.obj: ..\..\src\common\paper.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\paper.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_panelcmn.obj: ..\..\src\common\panelcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\panelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_persist.obj: ..\..\src\common\persist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\persist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_pickerbase.obj: ..\..\src\common\pickerbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\pickerbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_popupcmn.obj: ..\..\src\common\popupcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\popupcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_preferencescmn.obj: ..\..\src\common\preferencescmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\preferencescmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_prntbase.obj: ..\..\src\common\prntbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\prntbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_quantize.obj: ..\..\src\common\quantize.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\quantize.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_radiobtncmn.obj: ..\..\src\common\radiobtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\radiobtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_radiocmn.obj: ..\..\src\common\radiocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\radiocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_rearrangectrl.obj: ..\..\src\common\rearrangectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\rearrangectrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_rendcmn.obj: ..\..\src\common\rendcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\rendcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_rgncmn.obj: ..\..\src\common\rgncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\rgncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_scrolbarcmn.obj: ..\..\src\common\scrolbarcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\scrolbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_settcmn.obj: ..\..\src\common\settcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\settcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_sizer.obj: ..\..\src\common\sizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\sizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_slidercmn.obj: ..\..\src\common\slidercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\slidercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_spinbtncmn.obj: ..\..\src\common\spinbtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\spinbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_spinctrlcmn.obj: ..\..\src\common\spinctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\spinctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_srchcmn.obj: ..\..\src\common\srchcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\srchcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_statbar.obj: ..\..\src\common\statbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\statbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_statbmpcmn.obj: ..\..\src\common\statbmpcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\statbmpcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_statboxcmn.obj: ..\..\src\common\statboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\statboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_statlinecmn.obj: ..\..\src\common\statlinecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\statlinecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_stattextcmn.obj: ..\..\src\common\stattextcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stattextcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_stockitem.obj: ..\..\src\common\stockitem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\stockitem.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_tbarbase.obj: ..\..\src\common\tbarbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\tbarbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_textcmn.obj: ..\..\src\common\textcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\textcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_textentrycmn.obj: ..\..\src\common\textentrycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\textentrycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_textmeasurecmn.obj: ..\..\src\common\textmeasurecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\textmeasurecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_toplvcmn.obj: ..\..\src\common\toplvcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\toplvcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_treebase.obj: ..\..\src\common\treebase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\treebase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_uiactioncmn.obj: ..\..\src\common\uiactioncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\uiactioncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_valgen.obj: ..\..\src\common\valgen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\valgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_validate.obj: ..\..\src\common\validate.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\validate.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_valtext.obj: ..\..\src\common\valtext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\valtext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_valnum.obj: ..\..\src\common\valnum.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\valnum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_wincmn.obj: ..\..\src\common\wincmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\wincmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_windowid.obj: ..\..\src\common\windowid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\windowid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_wrapsizer.obj: ..\..\src\common\wrapsizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\wrapsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_xpmdecod.obj: ..\..\src\common\xpmdecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\xpmdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_busyinfo.obj: ..\..\src\generic\busyinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\busyinfo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_generic_buttonbar.obj: ..\..\src\generic\buttonbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\buttonbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_choicdgg.obj: ..\..\src\generic\choicdgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\choicdgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_choicbkg.obj: ..\..\src\generic\choicbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\choicbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_combog.obj: ..\..\src\generic\combog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\combog.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dcpsg.obj: ..\..\src\generic\dcpsg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\dcpsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dirctrlg.obj: ..\..\src\generic\dirctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\dirctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_dragimgg.obj: ..\..\src\generic\dragimgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\dragimgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_filectrlg.obj: ..\..\src\generic\filectrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\filectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_infobar.obj: ..\..\src\generic\infobar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\infobar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_listbkg.obj: ..\..\src\generic\listbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\listbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_logg.obj: ..\..\src\generic\logg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\logg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_markuptext.obj: ..\..\src\generic\markuptext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\markuptext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_msgdlgg.obj: ..\..\src\generic\msgdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\msgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_numdlgg.obj: ..\..\src\generic\numdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\numdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_progdlgg.obj: ..\..\src\generic\progdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\progdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_preferencesg.obj: ..\..\src\generic\preferencesg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\preferencesg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_printps.obj: ..\..\src\generic\printps.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\printps.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_renderg.obj: ..\..\src\generic\renderg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\renderg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_richmsgdlgg.obj: ..\..\src\generic\richmsgdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\richmsgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_scrlwing.obj: ..\..\src\generic\scrlwing.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\scrlwing.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_selstore.obj: ..\..\src\generic\selstore.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\selstore.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_spinctlg.obj: ..\..\src\generic\spinctlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\spinctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_splitter.obj: ..\..\src\generic\splitter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\splitter.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_srchctlg.obj: ..\..\src\generic\srchctlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\srchctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_statbmpg.obj: ..\..\src\generic\statbmpg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\statbmpg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_stattextg.obj: ..\..\src\generic\stattextg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\stattextg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_textdlgg.obj: ..\..\src\generic\textdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\textdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_tipwin.obj: ..\..\src\generic\tipwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\tipwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_toolbkg.obj: ..\..\src\generic\toolbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\toolbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_treectlg.obj: ..\..\src\generic\treectlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\treectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_treebkg.obj: ..\..\src\generic\treebkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\treebkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_vlbox.obj: ..\..\src\generic\vlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\vlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_vscroll.obj: ..\..\src\generic\vscroll.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\vscroll.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_xmlreshandler.obj: ..\..\src\xrc\xmlreshandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmlreshandler.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_animatecmn.obj: ..\..\src\common\animatecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\animatecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bmpcboxcmn.obj: ..\..\src\common\bmpcboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\bmpcboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_datavcmn.obj: ..\..\src\common\datavcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\datavcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gridcmn.obj: ..\..\src\common\gridcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\gridcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_hyperlnkcmn.obj: ..\..\src\common\hyperlnkcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\hyperlnkcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_odcombocmn.obj: ..\..\src\common\odcombocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\odcombocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_richtooltipcmn.obj: ..\..\src\common\richtooltipcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\richtooltipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\aboutdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bannerwindow.obj: ..\..\src\generic\bannerwindow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\bannerwindow.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_datavgen.obj: ..\..\src\generic\datavgen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\datavgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_datectlg.obj: ..\..\src\generic\datectlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\datectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_editlbox.obj: ..\..\src\generic\editlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\editlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_grid.obj: ..\..\src\generic\grid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\grid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gridctrl.obj: ..\..\src\generic\gridctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\gridctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_grideditors.obj: ..\..\src\generic\grideditors.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\grideditors.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_gridsel.obj: ..\..\src\generic\gridsel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\gridsel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_helpext.obj: ..\..\src\generic\helpext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\helpext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_hyperlinkg.obj: ..\..\src\generic\hyperlinkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\hyperlinkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_laywin.obj: ..\..\src\generic\laywin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\laywin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_notifmsgg.obj: ..\..\src\generic\notifmsgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\notifmsgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_odcombo.obj: ..\..\src\generic\odcombo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\odcombo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_propdlg.obj: ..\..\src\generic\propdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\propdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_richtooltipg.obj: ..\..\src\generic\richtooltipg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\richtooltipg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_sashwin.obj: ..\..\src\generic\sashwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\sashwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_splash.obj: ..\..\src\generic\splash.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\splash.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_timectrlg.obj: ..\..\src\generic\timectrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\timectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_tipdlg.obj: ..\..\src\generic\tipdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\tipdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_treelist.obj: ..\..\src\generic\treelist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\treelist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_wizard.obj: ..\..\src\generic\wizard.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\wizard.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\taskbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_notifmsg.obj: ..\..\src\msw\notifmsg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\notifmsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_richtooltip.obj: ..\..\src\msw\richtooltip.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\richtooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_sound.obj: ..\..\src\msw\sound.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\sound.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_taskbar.obj: ..\..\src\msw\taskbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\taskbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_joystick.obj: ..\..\src\msw\joystick.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\joystick.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_animateg.obj: ..\..\src\generic\animateg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\animateg.cpp +!endif + +$(OBJS)\monodll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /i ..\..\src\stc\scintilla\include /i ..\..\src\stc\scintilla\lexlib /i ..\..\src\stc\scintilla\src /d __WX__ /d SCI_LEXER /d LINK_LEXERS /d wxUSE_BASE=1 /d WXMAKINGDLL ..\..\src\msw\version.rc + +$(OBJS)\monolib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\monolib_any.obj: ..\..\src\common\any.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\any.cpp + +$(OBJS)\monolib_appbase.obj: ..\..\src\common\appbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\appbase.cpp + +$(OBJS)\monolib_arcall.obj: ..\..\src\common\arcall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arcall.cpp + +$(OBJS)\monolib_arcfind.obj: ..\..\src\common\arcfind.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arcfind.cpp + +$(OBJS)\monolib_archive.obj: ..\..\src\common\archive.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\archive.cpp + +$(OBJS)\monolib_arrstr.obj: ..\..\src\common\arrstr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arrstr.cpp + +$(OBJS)\monolib_base64.obj: ..\..\src\common\base64.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\base64.cpp + +$(OBJS)\monolib_clntdata.obj: ..\..\src\common\clntdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\clntdata.cpp + +$(OBJS)\monolib_cmdline.obj: ..\..\src\common\cmdline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\cmdline.cpp + +$(OBJS)\monolib_config.obj: ..\..\src\common\config.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\config.cpp + +$(OBJS)\monolib_convauto.obj: ..\..\src\common\convauto.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\convauto.cpp + +$(OBJS)\monolib_datetime.obj: ..\..\src\common\datetime.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\datetime.cpp + +$(OBJS)\monolib_datetimefmt.obj: ..\..\src\common\datetimefmt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\datetimefmt.cpp + +$(OBJS)\monolib_datstrm.obj: ..\..\src\common\datstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\datstrm.cpp + +$(OBJS)\monolib_dircmn.obj: ..\..\src\common\dircmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dircmn.cpp + +$(OBJS)\monolib_dynarray.obj: ..\..\src\common\dynarray.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dynarray.cpp + +$(OBJS)\monolib_dynlib.obj: ..\..\src\common\dynlib.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dynlib.cpp + +$(OBJS)\monolib_dynload.obj: ..\..\src\common\dynload.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dynload.cpp + +$(OBJS)\monolib_encconv.obj: ..\..\src\common\encconv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\encconv.cpp + +$(OBJS)\monolib_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\evtloopcmn.cpp + +$(OBJS)\monolib_extended.obj: ..\..\src\common\extended.c + $(CC) /c /nologo /TC /Fo$@ $(MONOLIB_CFLAGS) ..\..\src\common\extended.c + +$(OBJS)\monolib_ffile.obj: ..\..\src\common\ffile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ffile.cpp + +$(OBJS)\monolib_file.obj: ..\..\src\common\file.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\file.cpp + +$(OBJS)\monolib_fileback.obj: ..\..\src\common\fileback.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fileback.cpp + +$(OBJS)\monolib_fileconf.obj: ..\..\src\common\fileconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fileconf.cpp + +$(OBJS)\monolib_filefn.obj: ..\..\src\common\filefn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filefn.cpp + +$(OBJS)\monolib_filename.obj: ..\..\src\common\filename.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filename.cpp + +$(OBJS)\monolib_filesys.obj: ..\..\src\common\filesys.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filesys.cpp + +$(OBJS)\monolib_filtall.obj: ..\..\src\common\filtall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filtall.cpp + +$(OBJS)\monolib_filtfind.obj: ..\..\src\common\filtfind.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filtfind.cpp + +$(OBJS)\monolib_fmapbase.obj: ..\..\src\common\fmapbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fmapbase.cpp + +$(OBJS)\monolib_fs_arc.obj: ..\..\src\common\fs_arc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fs_arc.cpp + +$(OBJS)\monolib_fs_filter.obj: ..\..\src\common\fs_filter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fs_filter.cpp + +$(OBJS)\monolib_hash.obj: ..\..\src\common\hash.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\hash.cpp + +$(OBJS)\monolib_hashmap.obj: ..\..\src\common\hashmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\hashmap.cpp + +$(OBJS)\monolib_init.obj: ..\..\src\common\init.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\init.cpp + +$(OBJS)\monolib_intl.obj: ..\..\src\common\intl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\intl.cpp + +$(OBJS)\monolib_ipcbase.obj: ..\..\src\common\ipcbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ipcbase.cpp + +$(OBJS)\monolib_languageinfo.obj: ..\..\src\common\languageinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\languageinfo.cpp + +$(OBJS)\monolib_list.obj: ..\..\src\common\list.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\list.cpp + +$(OBJS)\monolib_log.obj: ..\..\src\common\log.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\log.cpp + +$(OBJS)\monolib_longlong.obj: ..\..\src\common\longlong.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\longlong.cpp + +$(OBJS)\monolib_memory.obj: ..\..\src\common\memory.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\memory.cpp + +$(OBJS)\monolib_mimecmn.obj: ..\..\src\common\mimecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\mimecmn.cpp + +$(OBJS)\monolib_module.obj: ..\..\src\common\module.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\module.cpp + +$(OBJS)\monolib_mstream.obj: ..\..\src\common\mstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\mstream.cpp + +$(OBJS)\monolib_numformatter.obj: ..\..\src\common\numformatter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\numformatter.cpp + +$(OBJS)\monolib_object.obj: ..\..\src\common\object.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\object.cpp + +$(OBJS)\monolib_platinfo.obj: ..\..\src\common\platinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\platinfo.cpp + +$(OBJS)\monolib_powercmn.obj: ..\..\src\common\powercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\powercmn.cpp + +$(OBJS)\monolib_process.obj: ..\..\src\common\process.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\process.cpp + +$(OBJS)\monolib_regex.obj: ..\..\src\common\regex.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\regex.cpp + +$(OBJS)\monolib_stdpbase.obj: ..\..\src\common\stdpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stdpbase.cpp + +$(OBJS)\monolib_sstream.obj: ..\..\src\common\sstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sstream.cpp + +$(OBJS)\monolib_stdstream.obj: ..\..\src\common\stdstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stdstream.cpp + +$(OBJS)\monolib_stopwatch.obj: ..\..\src\common\stopwatch.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stopwatch.cpp + +$(OBJS)\monolib_strconv.obj: ..\..\src\common\strconv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\strconv.cpp + +$(OBJS)\monolib_stream.obj: ..\..\src\common\stream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stream.cpp + +$(OBJS)\monolib_string.obj: ..\..\src\common\string.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\string.cpp + +$(OBJS)\monolib_stringimpl.obj: ..\..\src\common\stringimpl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stringimpl.cpp + +$(OBJS)\monolib_stringops.obj: ..\..\src\common\stringops.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stringops.cpp + +$(OBJS)\monolib_strvararg.obj: ..\..\src\common\strvararg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\strvararg.cpp + +$(OBJS)\monolib_sysopt.obj: ..\..\src\common\sysopt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sysopt.cpp + +$(OBJS)\monolib_tarstrm.obj: ..\..\src\common\tarstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\tarstrm.cpp + +$(OBJS)\monolib_textbuf.obj: ..\..\src\common\textbuf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\textbuf.cpp + +$(OBJS)\monolib_textfile.obj: ..\..\src\common\textfile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\textfile.cpp + +$(OBJS)\monolib_threadinfo.obj: ..\..\src\common\threadinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\threadinfo.cpp + +$(OBJS)\monolib_time.obj: ..\..\src\common\time.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\time.cpp + +$(OBJS)\monolib_timercmn.obj: ..\..\src\common\timercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\timercmn.cpp + +$(OBJS)\monolib_timerimpl.obj: ..\..\src\common\timerimpl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\timerimpl.cpp + +$(OBJS)\monolib_tokenzr.obj: ..\..\src\common\tokenzr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\tokenzr.cpp + +$(OBJS)\monolib_translation.obj: ..\..\src\common\translation.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\translation.cpp + +$(OBJS)\monolib_txtstrm.obj: ..\..\src\common\txtstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\txtstrm.cpp + +$(OBJS)\monolib_unichar.obj: ..\..\src\common\unichar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\unichar.cpp + +$(OBJS)\monolib_uri.obj: ..\..\src\common\uri.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\uri.cpp + +$(OBJS)\monolib_ustring.obj: ..\..\src\common\ustring.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ustring.cpp + +$(OBJS)\monolib_variant.obj: ..\..\src\common\variant.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\variant.cpp + +$(OBJS)\monolib_wfstream.obj: ..\..\src\common\wfstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\wfstream.cpp + +$(OBJS)\monolib_wxcrt.obj: ..\..\src\common\wxcrt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\wxcrt.cpp + +$(OBJS)\monolib_wxprintf.obj: ..\..\src\common\wxprintf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\wxprintf.cpp + +$(OBJS)\monolib_xlocale.obj: ..\..\src\common\xlocale.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\xlocale.cpp + +$(OBJS)\monolib_xti.obj: ..\..\src\common\xti.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\xti.cpp + +$(OBJS)\monolib_xtistrm.obj: ..\..\src\common\xtistrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\xtistrm.cpp + +$(OBJS)\monolib_zipstrm.obj: ..\..\src\common\zipstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\zipstrm.cpp + +$(OBJS)\monolib_zstream.obj: ..\..\src\common\zstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\zstream.cpp + +$(OBJS)\monolib_fswatchercmn.obj: ..\..\src\common\fswatchercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fswatchercmn.cpp + +$(OBJS)\monolib_fswatcherg.obj: ..\..\src\generic\fswatcherg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\fswatcherg.cpp + +$(OBJS)\monolib_basemsw.obj: ..\..\src\msw\basemsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\basemsw.cpp + +$(OBJS)\monolib_crashrpt.obj: ..\..\src\msw\crashrpt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\crashrpt.cpp + +$(OBJS)\monolib_debughlp.obj: ..\..\src\msw\debughlp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\debughlp.cpp + +$(OBJS)\monolib_dde.obj: ..\..\src\msw\dde.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dde.cpp + +$(OBJS)\monolib_dir.obj: ..\..\src\msw\dir.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dir.cpp + +$(OBJS)\monolib_dlmsw.obj: ..\..\src\msw\dlmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dlmsw.cpp + +$(OBJS)\monolib_evtloopconsole.obj: ..\..\src\msw\evtloopconsole.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\evtloopconsole.cpp + +$(OBJS)\monolib_mimetype.obj: ..\..\src\msw\mimetype.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mimetype.cpp + +$(OBJS)\monolib_power.obj: ..\..\src\msw\power.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\power.cpp + +$(OBJS)\monolib_regconf.obj: ..\..\src\msw\regconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\regconf.cpp + +$(OBJS)\monolib_registry.obj: ..\..\src\msw\registry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\registry.cpp + +$(OBJS)\monolib_snglinst.obj: ..\..\src\msw\snglinst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\snglinst.cpp + +$(OBJS)\monolib_stackwalk.obj: ..\..\src\msw\stackwalk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\stackwalk.cpp + +$(OBJS)\monolib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\stdpaths.cpp + +$(OBJS)\monolib_thread.obj: ..\..\src\msw\thread.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\thread.cpp + +$(OBJS)\monolib_timer.obj: ..\..\src\msw\timer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\timer.cpp + +$(OBJS)\monolib_utils.obj: ..\..\src\msw\utils.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\utils.cpp + +$(OBJS)\monolib_utilsexc.obj: ..\..\src\msw\utilsexc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\utilsexc.cpp + +$(OBJS)\monolib_fswatcher.obj: ..\..\src\msw\fswatcher.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\fswatcher.cpp + +$(OBJS)\monolib_event.obj: ..\..\src\common\event.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\monolib_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\monolib_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\monolib_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\monolib_main.obj: ..\..\src\msw\main.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\monolib_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\monolib_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\monolib_fs_inet.obj: ..\..\src\common\fs_inet.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fs_inet.cpp + +$(OBJS)\monolib_ftp.obj: ..\..\src\common\ftp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ftp.cpp + +$(OBJS)\monolib_http.obj: ..\..\src\common\http.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\http.cpp + +$(OBJS)\monolib_protocol.obj: ..\..\src\common\protocol.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\protocol.cpp + +$(OBJS)\monolib_sckaddr.obj: ..\..\src\common\sckaddr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sckaddr.cpp + +$(OBJS)\monolib_sckfile.obj: ..\..\src\common\sckfile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sckfile.cpp + +$(OBJS)\monolib_sckipc.obj: ..\..\src\common\sckipc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sckipc.cpp + +$(OBJS)\monolib_sckstrm.obj: ..\..\src\common\sckstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sckstrm.cpp + +$(OBJS)\monolib_socket.obj: ..\..\src\common\socket.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\socket.cpp + +$(OBJS)\monolib_url.obj: ..\..\src\common\url.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\url.cpp + +$(OBJS)\monolib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp + +$(OBJS)\monolib_urlmsw.obj: ..\..\src\msw\urlmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\urlmsw.cpp + +$(OBJS)\monolib_generic_statusbr.obj: ..\..\src\generic\statusbr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\statusbr.cpp + +$(OBJS)\monolib_msw_accel.obj: ..\..\src\msw\accel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\accel.cpp + +$(OBJS)\monolib_anybutton.obj: ..\..\src\msw\anybutton.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\anybutton.cpp + +$(OBJS)\monolib_artmsw.obj: ..\..\src\msw\artmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\artmsw.cpp + +$(OBJS)\monolib_msw_bmpbuttn.obj: ..\..\src\msw\bmpbuttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\bmpbuttn.cpp + +$(OBJS)\monolib_msw_button.obj: ..\..\src\msw\button.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\button.cpp + +$(OBJS)\monolib_msw_checkbox.obj: ..\..\src\msw\checkbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\checkbox.cpp + +$(OBJS)\monolib_msw_choice.obj: ..\..\src\msw\choice.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\choice.cpp + +$(OBJS)\monolib_colordlg.obj: ..\..\src\msw\colordlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\colordlg.cpp + +$(OBJS)\monolib_combo.obj: ..\..\src\msw\combo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\combo.cpp + +$(OBJS)\monolib_msw_combobox.obj: ..\..\src\msw\combobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\combobox.cpp + +$(OBJS)\monolib_msw_control.obj: ..\..\src\msw\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\control.cpp + +$(OBJS)\monolib_msw_dialog.obj: ..\..\src\msw\dialog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dialog.cpp + +$(OBJS)\monolib_dirdlg.obj: ..\..\src\msw\dirdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dirdlg.cpp + +$(OBJS)\monolib_dragimag.obj: ..\..\src\msw\dragimag.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dragimag.cpp + +$(OBJS)\monolib_filedlg.obj: ..\..\src\msw\filedlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\filedlg.cpp + +$(OBJS)\monolib_frame.obj: ..\..\src\msw\frame.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\frame.cpp + +$(OBJS)\monolib_msw_gauge.obj: ..\..\src\msw\gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\gauge.cpp + +$(OBJS)\monolib_headerctrl.obj: ..\..\src\msw\headerctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\headerctrl.cpp + +$(OBJS)\monolib_iniconf.obj: ..\..\src\msw\iniconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\iniconf.cpp + +$(OBJS)\monolib_msw_listbox.obj: ..\..\src\msw\listbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\listbox.cpp + +$(OBJS)\monolib_msw_listctrl.obj: ..\..\src\msw\listctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\listctrl.cpp + +$(OBJS)\monolib_mdi.obj: ..\..\src\msw\mdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mdi.cpp + +$(OBJS)\monolib_msw_menu.obj: ..\..\src\msw\menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\menu.cpp + +$(OBJS)\monolib_menuitem.obj: ..\..\src\msw\menuitem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\menuitem.cpp + +$(OBJS)\monolib_metafile.obj: ..\..\src\msw\metafile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\metafile.cpp + +$(OBJS)\monolib_msgdlg.obj: ..\..\src\msw\msgdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\msgdlg.cpp + +$(OBJS)\monolib_nativdlg.obj: ..\..\src\msw\nativdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\nativdlg.cpp + +$(OBJS)\monolib_nativewin.obj: ..\..\src\msw\nativewin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\nativewin.cpp + +$(OBJS)\monolib_msw_notebook.obj: ..\..\src\msw\notebook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\notebook.cpp + +$(OBJS)\monolib_access.obj: ..\..\src\msw\ole\access.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\access.cpp + +$(OBJS)\monolib_ownerdrw.obj: ..\..\src\msw\ownerdrw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ownerdrw.cpp + +$(OBJS)\monolib_msw_panel.obj: ..\..\src\msw\panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\panel.cpp + +$(OBJS)\monolib_progdlg.obj: ..\..\src\msw\progdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\progdlg.cpp + +$(OBJS)\monolib_msw_radiobox.obj: ..\..\src\msw\radiobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\radiobox.cpp + +$(OBJS)\monolib_msw_radiobut.obj: ..\..\src\msw\radiobut.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\radiobut.cpp + +$(OBJS)\monolib_richmsgdlg.obj: ..\..\src\msw\richmsgdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\richmsgdlg.cpp + +$(OBJS)\monolib_msw_scrolbar.obj: ..\..\src\msw\scrolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\scrolbar.cpp + +$(OBJS)\monolib_msw_slider.obj: ..\..\src\msw\slider.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\slider.cpp + +$(OBJS)\monolib_msw_spinbutt.obj: ..\..\src\msw\spinbutt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\spinbutt.cpp + +$(OBJS)\monolib_spinctrl.obj: ..\..\src\msw\spinctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\spinctrl.cpp + +$(OBJS)\monolib_msw_statbmp.obj: ..\..\src\msw\statbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\statbmp.cpp + +$(OBJS)\monolib_msw_statbox.obj: ..\..\src\msw\statbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\statbox.cpp + +$(OBJS)\monolib_statusbar.obj: ..\..\src\msw\statusbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\statusbar.cpp + +$(OBJS)\monolib_msw_statline.obj: ..\..\src\msw\statline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\statline.cpp + +$(OBJS)\monolib_msw_stattext.obj: ..\..\src\msw\stattext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\stattext.cpp + +$(OBJS)\monolib_msw_toolbar.obj: ..\..\src\msw\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\toolbar.cpp + +$(OBJS)\monolib_msw_textctrl.obj: ..\..\src\msw\textctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\textctrl.cpp + +$(OBJS)\monolib_textentry.obj: ..\..\src\msw\textentry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\textentry.cpp + +$(OBJS)\monolib_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\tglbtn.cpp + +$(OBJS)\monolib_treectrl.obj: ..\..\src\msw\treectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\treectrl.cpp + +$(OBJS)\monolib_msw_checklst.obj: ..\..\src\msw\checklst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\checklst.cpp + +$(OBJS)\monolib_msw_fdrepdlg.obj: ..\..\src\msw\fdrepdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\fdrepdlg.cpp + +$(OBJS)\monolib_fontdlg.obj: ..\..\src\msw\fontdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\fontdlg.cpp + +$(OBJS)\monolib_generic_accel.obj: ..\..\src\generic\accel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\accel.cpp + +$(OBJS)\monolib_colrdlgg.obj: ..\..\src\generic\colrdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\colrdlgg.cpp + +$(OBJS)\monolib_dirdlgg.obj: ..\..\src\generic\dirdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\dirdlgg.cpp + +$(OBJS)\monolib_generic_fdrepdlg.obj: ..\..\src\generic\fdrepdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\fdrepdlg.cpp + +$(OBJS)\monolib_filedlgg.obj: ..\..\src\generic\filedlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\filedlgg.cpp + +$(OBJS)\monolib_fontdlgg.obj: ..\..\src\generic\fontdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\fontdlgg.cpp + +$(OBJS)\monolib_generic_listctrl.obj: ..\..\src\generic\listctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\listctrl.cpp + +$(OBJS)\monolib_mdig.obj: ..\..\src\generic\mdig.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\mdig.cpp + +$(OBJS)\monolib_univ_bmpbuttn.obj: ..\..\src\univ\bmpbuttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\bmpbuttn.cpp + +$(OBJS)\monolib_univ_button.obj: ..\..\src\univ\button.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\button.cpp + +$(OBJS)\monolib_univ_checkbox.obj: ..\..\src\univ\checkbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\checkbox.cpp + +$(OBJS)\monolib_univ_checklst.obj: ..\..\src\univ\checklst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\checklst.cpp + +$(OBJS)\monolib_univ_choice.obj: ..\..\src\univ\choice.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\choice.cpp + +$(OBJS)\monolib_univ_combobox.obj: ..\..\src\univ\combobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\combobox.cpp + +$(OBJS)\monolib_univ_control.obj: ..\..\src\univ\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\control.cpp + +$(OBJS)\monolib_ctrlrend.obj: ..\..\src\univ\ctrlrend.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\ctrlrend.cpp + +$(OBJS)\monolib_univ_dialog.obj: ..\..\src\univ\dialog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\dialog.cpp + +$(OBJS)\monolib_framuniv.obj: ..\..\src\univ\framuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\framuniv.cpp + +$(OBJS)\monolib_univ_gauge.obj: ..\..\src\univ\gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\gauge.cpp + +$(OBJS)\monolib_inpcons.obj: ..\..\src\univ\inpcons.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\inpcons.cpp + +$(OBJS)\monolib_inphand.obj: ..\..\src\univ\inphand.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\inphand.cpp + +$(OBJS)\monolib_univ_listbox.obj: ..\..\src\univ\listbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\listbox.cpp + +$(OBJS)\monolib_univ_menu.obj: ..\..\src\univ\menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\menu.cpp + +$(OBJS)\monolib_univ_notebook.obj: ..\..\src\univ\notebook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\notebook.cpp + +$(OBJS)\monolib_univ_radiobox.obj: ..\..\src\univ\radiobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\radiobox.cpp + +$(OBJS)\monolib_univ_radiobut.obj: ..\..\src\univ\radiobut.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\radiobut.cpp + +$(OBJS)\monolib_scrarrow.obj: ..\..\src\univ\scrarrow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\scrarrow.cpp + +$(OBJS)\monolib_univ_scrolbar.obj: ..\..\src\univ\scrolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\scrolbar.cpp + +$(OBJS)\monolib_scrthumb.obj: ..\..\src\univ\scrthumb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\scrthumb.cpp + +$(OBJS)\monolib_settingsuniv.obj: ..\..\src\univ\settingsuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\settingsuniv.cpp + +$(OBJS)\monolib_univ_slider.obj: ..\..\src\univ\slider.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\slider.cpp + +$(OBJS)\monolib_univ_spinbutt.obj: ..\..\src\univ\spinbutt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\spinbutt.cpp + +$(OBJS)\monolib_univ_statbmp.obj: ..\..\src\univ\statbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\statbmp.cpp + +$(OBJS)\monolib_univ_statbox.obj: ..\..\src\univ\statbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\statbox.cpp + +$(OBJS)\monolib_univ_statline.obj: ..\..\src\univ\statline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\statline.cpp + +$(OBJS)\monolib_univ_stattext.obj: ..\..\src\univ\stattext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\stattext.cpp + +$(OBJS)\monolib_univ_statusbr.obj: ..\..\src\univ\statusbr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\statusbr.cpp + +$(OBJS)\monolib_stdrend.obj: ..\..\src\univ\stdrend.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\stdrend.cpp + +$(OBJS)\monolib_univ_textctrl.obj: ..\..\src\univ\textctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\textctrl.cpp + +$(OBJS)\monolib_univ_tglbtn.obj: ..\..\src\univ\tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\tglbtn.cpp + +$(OBJS)\monolib_theme.obj: ..\..\src\univ\theme.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\theme.cpp + +$(OBJS)\monolib_univ_toolbar.obj: ..\..\src\univ\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\toolbar.cpp + +$(OBJS)\monolib_topluniv.obj: ..\..\src\univ\topluniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\topluniv.cpp + +$(OBJS)\monolib_winuniv.obj: ..\..\src\univ\winuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\winuniv.cpp + +$(OBJS)\monolib_gtk.obj: ..\..\src\univ\themes\gtk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\themes\gtk.cpp + +$(OBJS)\monolib_metal.obj: ..\..\src\univ\themes\metal.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\themes\metal.cpp + +$(OBJS)\monolib_mono.obj: ..\..\src\univ\themes\mono.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\themes\mono.cpp + +$(OBJS)\monolib_win32.obj: ..\..\src\univ\themes\win32.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\themes\win32.cpp + +$(OBJS)\monolib_bmpcbox.obj: ..\..\src\msw\bmpcbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\bmpcbox.cpp + +$(OBJS)\monolib_calctrl.obj: ..\..\src\msw\calctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\calctrl.cpp + +$(OBJS)\monolib_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp + +$(OBJS)\monolib_datecontrols.obj: ..\..\src\msw\datecontrols.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datecontrols.cpp + +$(OBJS)\monolib_datectrl.obj: ..\..\src\msw\datectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp + +$(OBJS)\monolib_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp + +$(OBJS)\monolib_hyperlink.obj: ..\..\src\msw\hyperlink.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\hyperlink.cpp + +$(OBJS)\monolib_timectrl.obj: ..\..\src\msw\timectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\timectrl.cpp + +$(OBJS)\monolib_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\mediactrlcmn.cpp + +$(OBJS)\monolib_mediactrl_am.obj: ..\..\src\msw\mediactrl_am.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mediactrl_am.cpp + +$(OBJS)\monolib_mediactrl_wmp10.obj: ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mediactrl_wmp10.cpp + +$(OBJS)\monolib_mediactrl_qt.obj: ..\..\src\msw\mediactrl_qt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\mediactrl_qt.cpp + +$(OBJS)\monolib_helpbest.obj: ..\..\src\msw\helpbest.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\helpbest.cpp + +$(OBJS)\monolib_helpctrl.obj: ..\..\src\html\helpctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\helpctrl.cpp + +$(OBJS)\monolib_helpdata.obj: ..\..\src\html\helpdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\helpdata.cpp + +$(OBJS)\monolib_helpdlg.obj: ..\..\src\html\helpdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\helpdlg.cpp + +$(OBJS)\monolib_helpfrm.obj: ..\..\src\html\helpfrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\helpfrm.cpp + +$(OBJS)\monolib_helpwnd.obj: ..\..\src\html\helpwnd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\helpwnd.cpp + +$(OBJS)\monolib_htmlcell.obj: ..\..\src\html\htmlcell.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmlcell.cpp + +$(OBJS)\monolib_htmlfilt.obj: ..\..\src\html\htmlfilt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmlfilt.cpp + +$(OBJS)\monolib_htmlpars.obj: ..\..\src\html\htmlpars.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmlpars.cpp + +$(OBJS)\monolib_htmltag.obj: ..\..\src\html\htmltag.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmltag.cpp + +$(OBJS)\monolib_htmlwin.obj: ..\..\src\html\htmlwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmlwin.cpp + +$(OBJS)\monolib_htmprint.obj: ..\..\src\html\htmprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\htmprint.cpp + +$(OBJS)\monolib_m_dflist.obj: ..\..\src\html\m_dflist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_dflist.cpp + +$(OBJS)\monolib_m_fonts.obj: ..\..\src\html\m_fonts.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_fonts.cpp + +$(OBJS)\monolib_m_hline.obj: ..\..\src\html\m_hline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_hline.cpp + +$(OBJS)\monolib_m_image.obj: ..\..\src\html\m_image.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_image.cpp + +$(OBJS)\monolib_m_layout.obj: ..\..\src\html\m_layout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_layout.cpp + +$(OBJS)\monolib_m_links.obj: ..\..\src\html\m_links.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_links.cpp + +$(OBJS)\monolib_m_list.obj: ..\..\src\html\m_list.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_list.cpp + +$(OBJS)\monolib_m_pre.obj: ..\..\src\html\m_pre.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_pre.cpp + +$(OBJS)\monolib_m_span.obj: ..\..\src\html\m_span.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_span.cpp + +$(OBJS)\monolib_m_style.obj: ..\..\src\html\m_style.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_style.cpp + +$(OBJS)\monolib_m_tables.obj: ..\..\src\html\m_tables.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\m_tables.cpp + +$(OBJS)\monolib_styleparams.obj: ..\..\src\html\styleparams.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\styleparams.cpp + +$(OBJS)\monolib_winpars.obj: ..\..\src\html\winpars.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\html\winpars.cpp + +$(OBJS)\monolib_htmllbox.obj: ..\..\src\generic\htmllbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\htmllbox.cpp + +$(OBJS)\monolib_webview_ie.obj: ..\..\src\msw\webview_ie.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\webview_ie.cpp + +$(OBJS)\monolib_webview.obj: ..\..\src\common\webview.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webview.cpp + +$(OBJS)\monolib_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp + +$(OBJS)\monolib_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp + +$(OBJS)\monolib_debugrpt.obj: ..\..\src\common\debugrpt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\debugrpt.cpp + +$(OBJS)\monolib_dbgrptg.obj: ..\..\src\generic\dbgrptg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\dbgrptg.cpp + +$(OBJS)\monolib_xh_animatctrl.obj: ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_animatctrl.cpp + +$(OBJS)\monolib_xh_bannerwindow.obj: ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_bannerwindow.cpp + +$(OBJS)\monolib_xh_bmp.obj: ..\..\src\xrc\xh_bmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_bmp.cpp + +$(OBJS)\monolib_xh_bmpcbox.obj: ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_bmpcbox.cpp + +$(OBJS)\monolib_xh_bmpbt.obj: ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_bmpbt.cpp + +$(OBJS)\monolib_xh_bttn.obj: ..\..\src\xrc\xh_bttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_bttn.cpp + +$(OBJS)\monolib_xh_cald.obj: ..\..\src\xrc\xh_cald.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_cald.cpp + +$(OBJS)\monolib_xh_chckb.obj: ..\..\src\xrc\xh_chckb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_chckb.cpp + +$(OBJS)\monolib_xh_chckl.obj: ..\..\src\xrc\xh_chckl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_chckl.cpp + +$(OBJS)\monolib_xh_choic.obj: ..\..\src\xrc\xh_choic.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_choic.cpp + +$(OBJS)\monolib_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_choicbk.cpp + +$(OBJS)\monolib_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_clrpicker.cpp + +$(OBJS)\monolib_xh_cmdlinkbn.obj: ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_cmdlinkbn.cpp + +$(OBJS)\monolib_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_collpane.cpp + +$(OBJS)\monolib_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_combo.cpp + +$(OBJS)\monolib_xh_comboctrl.obj: ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_comboctrl.cpp + +$(OBJS)\monolib_xh_datectrl.obj: ..\..\src\xrc\xh_datectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_datectrl.cpp + +$(OBJS)\monolib_xh_dirpicker.obj: ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_dirpicker.cpp + +$(OBJS)\monolib_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_dlg.cpp + +$(OBJS)\monolib_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp + +$(OBJS)\monolib_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + +$(OBJS)\monolib_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp + +$(OBJS)\monolib_xh_fontpicker.obj: ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_fontpicker.cpp + +$(OBJS)\monolib_xh_frame.obj: ..\..\src\xrc\xh_frame.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_frame.cpp + +$(OBJS)\monolib_xh_gauge.obj: ..\..\src\xrc\xh_gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_gauge.cpp + +$(OBJS)\monolib_xh_gdctl.obj: ..\..\src\xrc\xh_gdctl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_gdctl.cpp + +$(OBJS)\monolib_xh_grid.obj: ..\..\src\xrc\xh_grid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_grid.cpp + +$(OBJS)\monolib_xh_html.obj: ..\..\src\xrc\xh_html.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_html.cpp + +$(OBJS)\monolib_xh_hyperlink.obj: ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_hyperlink.cpp + +$(OBJS)\monolib_xh_listb.obj: ..\..\src\xrc\xh_listb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_listb.cpp + +$(OBJS)\monolib_xh_listbk.obj: ..\..\src\xrc\xh_listbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_listbk.cpp + +$(OBJS)\monolib_xh_listc.obj: ..\..\src\xrc\xh_listc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_listc.cpp + +$(OBJS)\monolib_xh_mdi.obj: ..\..\src\xrc\xh_mdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_mdi.cpp + +$(OBJS)\monolib_xh_menu.obj: ..\..\src\xrc\xh_menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_menu.cpp + +$(OBJS)\monolib_xh_notbk.obj: ..\..\src\xrc\xh_notbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_notbk.cpp + +$(OBJS)\monolib_xh_odcombo.obj: ..\..\src\xrc\xh_odcombo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_odcombo.cpp + +$(OBJS)\monolib_xh_panel.obj: ..\..\src\xrc\xh_panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_panel.cpp + +$(OBJS)\monolib_xh_propdlg.obj: ..\..\src\xrc\xh_propdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_propdlg.cpp + +$(OBJS)\monolib_xh_radbt.obj: ..\..\src\xrc\xh_radbt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_radbt.cpp + +$(OBJS)\monolib_xh_radbx.obj: ..\..\src\xrc\xh_radbx.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_radbx.cpp + +$(OBJS)\monolib_xh_scrol.obj: ..\..\src\xrc\xh_scrol.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_scrol.cpp + +$(OBJS)\monolib_xh_scwin.obj: ..\..\src\xrc\xh_scwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_scwin.cpp + +$(OBJS)\monolib_xh_htmllbox.obj: ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_htmllbox.cpp + +$(OBJS)\monolib_xh_sizer.obj: ..\..\src\xrc\xh_sizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_sizer.cpp + +$(OBJS)\monolib_xh_slidr.obj: ..\..\src\xrc\xh_slidr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_slidr.cpp + +$(OBJS)\monolib_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_spin.cpp + +$(OBJS)\monolib_xh_split.obj: ..\..\src\xrc\xh_split.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_split.cpp + +$(OBJS)\monolib_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_srchctrl.cpp + +$(OBJS)\monolib_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_statbar.cpp + +$(OBJS)\monolib_xh_stbmp.obj: ..\..\src\xrc\xh_stbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_stbmp.cpp + +$(OBJS)\monolib_xh_stbox.obj: ..\..\src\xrc\xh_stbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_stbox.cpp + +$(OBJS)\monolib_xh_stlin.obj: ..\..\src\xrc\xh_stlin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_stlin.cpp + +$(OBJS)\monolib_xh_sttxt.obj: ..\..\src\xrc\xh_sttxt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_sttxt.cpp + +$(OBJS)\monolib_xh_text.obj: ..\..\src\xrc\xh_text.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_text.cpp + +$(OBJS)\monolib_xh_tglbtn.obj: ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_tglbtn.cpp + +$(OBJS)\monolib_xh_timectrl.obj: ..\..\src\xrc\xh_timectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_timectrl.cpp + +$(OBJS)\monolib_xh_toolb.obj: ..\..\src\xrc\xh_toolb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_toolb.cpp + +$(OBJS)\monolib_xh_toolbk.obj: ..\..\src\xrc\xh_toolbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_toolbk.cpp + +$(OBJS)\monolib_xh_tree.obj: ..\..\src\xrc\xh_tree.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_tree.cpp + +$(OBJS)\monolib_xh_treebk.obj: ..\..\src\xrc\xh_treebk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_treebk.cpp + +$(OBJS)\monolib_xh_unkwn.obj: ..\..\src\xrc\xh_unkwn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_unkwn.cpp + +$(OBJS)\monolib_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_wizrd.cpp + +$(OBJS)\monolib_xmlres.obj: ..\..\src\xrc\xmlres.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmlres.cpp + +$(OBJS)\monolib_xmladv.obj: ..\..\src\xrc\xmladv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmladv.cpp + +$(OBJS)\monolib_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp + +$(OBJS)\monolib_framemanager.obj: ..\..\src\aui\framemanager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\framemanager.cpp + +$(OBJS)\monolib_dockart.obj: ..\..\src\aui\dockart.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\dockart.cpp + +$(OBJS)\monolib_floatpane.obj: ..\..\src\aui\floatpane.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\floatpane.cpp + +$(OBJS)\monolib_auibook.obj: ..\..\src\aui\auibook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\auibook.cpp + +$(OBJS)\monolib_auibar.obj: ..\..\src\aui\auibar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\auibar.cpp + +$(OBJS)\monolib_tabmdi.obj: ..\..\src\aui\tabmdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\tabmdi.cpp + +$(OBJS)\monolib_tabart.obj: ..\..\src\aui\tabart.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\tabart.cpp + +$(OBJS)\monolib_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + +$(OBJS)\monolib_advprops.obj: ..\..\src\propgrid\advprops.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\advprops.cpp + +$(OBJS)\monolib_editors.obj: ..\..\src\propgrid\editors.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\editors.cpp + +$(OBJS)\monolib_manager.obj: ..\..\src\propgrid\manager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\manager.cpp + +$(OBJS)\monolib_property.obj: ..\..\src\propgrid\property.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\property.cpp + +$(OBJS)\monolib_propgrid.obj: ..\..\src\propgrid\propgrid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\propgrid.cpp + +$(OBJS)\monolib_propgridiface.obj: ..\..\src\propgrid\propgridiface.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\propgridiface.cpp + +$(OBJS)\monolib_propgridpagestate.obj: ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\propgridpagestate.cpp + +$(OBJS)\monolib_props.obj: ..\..\src\propgrid\props.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\props.cpp + +$(OBJS)\monolib_art_internal.obj: ..\..\src\ribbon\art_internal.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\art_internal.cpp + +$(OBJS)\monolib_art_msw.obj: ..\..\src\ribbon\art_msw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\art_msw.cpp + +$(OBJS)\monolib_art_aui.obj: ..\..\src\ribbon\art_aui.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\art_aui.cpp + +$(OBJS)\monolib_bar.obj: ..\..\src\ribbon\bar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\bar.cpp + +$(OBJS)\monolib_ribbon_buttonbar.obj: ..\..\src\ribbon\buttonbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\buttonbar.cpp + +$(OBJS)\monolib_ribbon_control.obj: ..\..\src\ribbon\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\control.cpp + +$(OBJS)\monolib_gallery.obj: ..\..\src\ribbon\gallery.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\gallery.cpp + +$(OBJS)\monolib_page.obj: ..\..\src\ribbon\page.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\page.cpp + +$(OBJS)\monolib_ribbon_panel.obj: ..\..\src\ribbon\panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\panel.cpp + +$(OBJS)\monolib_ribbon_toolbar.obj: ..\..\src\ribbon\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\ribbon\toolbar.cpp + +$(OBJS)\monolib_xh_ribbon.obj: ..\..\src\xrc\xh_ribbon.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_ribbon.cpp + +$(OBJS)\monolib_richtextbuffer.obj: ..\..\src\richtext\richtextbuffer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextbuffer.cpp + +$(OBJS)\monolib_richtextctrl.obj: ..\..\src\richtext\richtextctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextctrl.cpp + +$(OBJS)\monolib_richtextformatdlg.obj: ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextformatdlg.cpp + +$(OBJS)\monolib_richtexthtml.obj: ..\..\src\richtext\richtexthtml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtexthtml.cpp + +$(OBJS)\monolib_richtextimagedlg.obj: ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextimagedlg.cpp + +$(OBJS)\monolib_richtextprint.obj: ..\..\src\richtext\richtextprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextprint.cpp + +$(OBJS)\monolib_richtextstyledlg.obj: ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextstyledlg.cpp + +$(OBJS)\monolib_richtextstyles.obj: ..\..\src\richtext\richtextstyles.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextstyles.cpp + +$(OBJS)\monolib_richtextsymboldlg.obj: ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextsymboldlg.cpp + +$(OBJS)\monolib_richtextxml.obj: ..\..\src\richtext\richtextxml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\richtext\richtextxml.cpp + +$(OBJS)\monolib_xh_richtext.obj: ..\..\src\xrc\xh_richtext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_richtext.cpp + +$(OBJS)\monolib_stc.obj: ..\..\src\stc\stc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\stc\stc.cpp + +$(OBJS)\monolib_PlatWX.obj: ..\..\src\stc\PlatWX.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\stc\PlatWX.cpp + +$(OBJS)\monolib_ScintillaWX.obj: ..\..\src\stc\ScintillaWX.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\stc\ScintillaWX.cpp + +$(OBJS)\monolib_xml.obj: ..\..\src\xml\xml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xml\xml.cpp + +$(OBJS)\monolib_xtixml.obj: ..\..\src\common\xtixml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\xtixml.cpp + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_activex.obj: ..\..\src\msw\ole\activex.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\activex.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_app.obj: ..\..\src\msw\app.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\app.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bitmap.obj: ..\..\src\msw\bitmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\bitmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_brush.obj: ..\..\src\msw\brush.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\brush.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_caret.obj: ..\..\src\msw\caret.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\caret.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_clipbrd.obj: ..\..\src\msw\clipbrd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\clipbrd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_colour.obj: ..\..\src\msw\colour.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\colour.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_cursor.obj: ..\..\src\msw\cursor.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\cursor.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_data.obj: ..\..\src\msw\data.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\data.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dc.obj: ..\..\src\msw\dc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcclient.obj: ..\..\src\msw\dcclient.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dcclient.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcmemory.obj: ..\..\src\msw\dcmemory.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dcmemory.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcprint.obj: ..\..\src\msw\dcprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dcprint.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcscreen.obj: ..\..\src\msw\dcscreen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dcscreen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dialup.obj: ..\..\src\msw\dialup.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dialup.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dib.obj: ..\..\src\msw\dib.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\dib.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_display.obj: ..\..\src\msw\display.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\display.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_enhmeta.obj: ..\..\src\msw\enhmeta.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\enhmeta.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_font.obj: ..\..\src\msw\font.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\font.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontenum.obj: ..\..\src\msw\fontenum.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\fontenum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontutil.obj: ..\..\src\msw\fontutil.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\fontutil.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gdiimage.obj: ..\..\src\msw\gdiimage.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\gdiimage.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gdiobj.obj: ..\..\src\msw\gdiobj.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\gdiobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gdiplus.obj: ..\..\src\msw\gdiplus.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\gdiplus.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_graphics.obj: ..\..\src\msw\graphics.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\graphics.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_icon.obj: ..\..\src\msw\icon.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\icon.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imaglist.obj: ..\..\src\msw\imaglist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\imaglist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_minifram.obj: ..\..\src\msw\minifram.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\minifram.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_nonownedwnd.obj: ..\..\src\msw\nonownedwnd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\nonownedwnd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dataobj.obj: ..\..\src\msw\ole\dataobj.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\dataobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dropsrc.obj: ..\..\src\msw\ole\dropsrc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\dropsrc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_droptgt.obj: ..\..\src\msw\ole\droptgt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\droptgt.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_oleutils.obj: ..\..\src\msw\ole\oleutils.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\oleutils.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_safearray.obj: ..\..\src\msw\ole\safearray.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\safearray.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_palette.obj: ..\..\src\msw\palette.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\palette.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_pen.obj: ..\..\src\msw\pen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\pen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_popupwin.obj: ..\..\src\msw\popupwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\popupwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_printdlg.obj: ..\..\src\msw\printdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\printdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_printwin.obj: ..\..\src\msw\printwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\printwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_region.obj: ..\..\src\msw\region.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\region.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_renderer.obj: ..\..\src\msw\renderer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\renderer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_settings.obj: ..\..\src\msw\settings.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\settings.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_textmeasure.obj: ..\..\src\msw\textmeasure.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\textmeasure.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_tooltip.obj: ..\..\src\msw\tooltip.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\tooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_toplevel.obj: ..\..\src\msw\toplevel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\toplevel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_uiaction.obj: ..\..\src\msw\uiaction.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\uiaction.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_utilsgui.obj: ..\..\src\msw\utilsgui.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\utilsgui.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_utilswin.obj: ..\..\src\msw\utilswin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\utilswin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_uxtheme.obj: ..\..\src\msw\uxtheme.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\uxtheme.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_window.obj: ..\..\src\msw\window.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\window.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_helpchm.obj: ..\..\src\msw\helpchm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\helpchm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_helpwin.obj: ..\..\src\msw\helpwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\helpwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_automtn.obj: ..\..\src\msw\ole\automtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\automtn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_uuid.obj: ..\..\src\msw\ole\uuid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\ole\uuid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_clrpickerg.obj: ..\..\src\generic\clrpickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\clrpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_collpaneg.obj: ..\..\src\generic\collpaneg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\collpaneg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_filepickerg.obj: ..\..\src\generic\filepickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\filepickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontpickerg.obj: ..\..\src\generic\fontpickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\fontpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_prntdlgg.obj: ..\..\src\generic\prntdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\prntdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_evtloop.obj: ..\..\src\msw\evtloop.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\evtloop.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_accelcmn.obj: ..\..\src\common\accelcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\accelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_accesscmn.obj: ..\..\src\common\accesscmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\accesscmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_anidecod.obj: ..\..\src\common\anidecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\anidecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_affinematrix2d.obj: ..\..\src\common\affinematrix2d.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\affinematrix2d.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_appcmn.obj: ..\..\src\common\appcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\appcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_artprov.obj: ..\..\src\common\artprov.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\artprov.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_artstd.obj: ..\..\src\common\artstd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\artstd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bmpbase.obj: ..\..\src\common\bmpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\bmpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bmpbtncmn.obj: ..\..\src\common\bmpbtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\bmpbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bookctrl.obj: ..\..\src\common\bookctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\bookctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_btncmn.obj: ..\..\src\common\btncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\btncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_cairo.obj: ..\..\src\common\cairo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\cairo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_checkboxcmn.obj: ..\..\src\common\checkboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\checkboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_checklstcmn.obj: ..\..\src\common\checklstcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\checklstcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_choiccmn.obj: ..\..\src\common\choiccmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\choiccmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_clipcmn.obj: ..\..\src\common\clipcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\clipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_clrpickercmn.obj: ..\..\src\common\clrpickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\clrpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_colourcmn.obj: ..\..\src\common\colourcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\colourcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_colourdata.obj: ..\..\src\common\colourdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\colourdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_combocmn.obj: ..\..\src\common\combocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\combocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_cmdproc.obj: ..\..\src\common\cmdproc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\cmdproc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_cmndata.obj: ..\..\src\common\cmndata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\cmndata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_containr.obj: ..\..\src\common\containr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\containr.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_cshelp.obj: ..\..\src\common\cshelp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\cshelp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_ctrlcmn.obj: ..\..\src\common\ctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_ctrlsub.obj: ..\..\src\common\ctrlsub.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ctrlsub.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcbase.obj: ..\..\src\common\dcbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dcbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcbufcmn.obj: ..\..\src\common\dcbufcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dcbufcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcgraph.obj: ..\..\src\common\dcgraph.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dcgraph.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcsvg.obj: ..\..\src\common\dcsvg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dcsvg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dirctrlcmn.obj: ..\..\src\common\dirctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dirctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dlgcmn.obj: ..\..\src\common\dlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dndcmn.obj: ..\..\src\common\dndcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dndcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dobjcmn.obj: ..\..\src\common\dobjcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dobjcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_docmdi.obj: ..\..\src\common\docmdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\docmdi.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_docview.obj: ..\..\src\common\docview.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\docview.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dpycmn.obj: ..\..\src\common\dpycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dpycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dseldlg.obj: ..\..\src\common\dseldlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\dseldlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_effects.obj: ..\..\src\common\effects.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\effects.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fddlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filepickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontpickercmn.obj: ..\..\src\common\fontpickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fldlgcmn.obj: ..\..\src\common\fldlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fldlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontcmn.obj: ..\..\src\common\fontcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontdata.obj: ..\..\src\common\fontdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_graphicc.obj: ..\..\src\generic\graphicc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\graphicc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontenumcmn.obj: ..\..\src\common\fontenumcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontenumcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontmap.obj: ..\..\src\common\fontmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_fontutilcmn.obj: ..\..\src\common\fontutilcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\fontutilcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_framecmn.obj: ..\..\src\common\framecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\framecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gaugecmn.obj: ..\..\src\common\gaugecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\gaugecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gbsizer.obj: ..\..\src\common\gbsizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\gbsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gdicmn.obj: ..\..\src\common\gdicmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\gdicmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_geometry.obj: ..\..\src\common\geometry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\geometry.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gifdecod.obj: ..\..\src\common\gifdecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\gifdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_graphcmn.obj: ..\..\src\common\graphcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\graphcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_headercolcmn.obj: ..\..\src\common\headercolcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\headercolcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_headerctrlcmn.obj: ..\..\src\common\headerctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\headerctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_helpbase.obj: ..\..\src\common\helpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\helpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_iconbndl.obj: ..\..\src\common\iconbndl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\iconbndl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagall.obj: ..\..\src\common\imagall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagall.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagbmp.obj: ..\..\src\common\imagbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagbmp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_image.obj: ..\..\src\common\image.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\image.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagfill.obj: ..\..\src\common\imagfill.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagfill.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imaggif.obj: ..\..\src\common\imaggif.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imaggif.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagiff.obj: ..\..\src\common\imagiff.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagjpeg.obj: ..\..\src\common\imagjpeg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagjpeg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagpcx.obj: ..\..\src\common\imagpcx.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagpcx.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagpng.obj: ..\..\src\common\imagpng.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagpng.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagpnm.obj: ..\..\src\common\imagpnm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagpnm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagtga.obj: ..\..\src\common\imagtga.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagtga.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagtiff.obj: ..\..\src\common\imagtiff.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagtiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_imagxpm.obj: ..\..\src\common\imagxpm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\imagxpm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_layout.obj: ..\..\src\common\layout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\layout.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_lboxcmn.obj: ..\..\src\common\lboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\lboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_listctrlcmn.obj: ..\..\src\common\listctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\listctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_markupparser.obj: ..\..\src\common\markupparser.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\markupparser.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_matrix.obj: ..\..\src\common\matrix.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\matrix.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_menucmn.obj: ..\..\src\common\menucmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\menucmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_modalhook.obj: ..\..\src\common\modalhook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\modalhook.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_mousemanager.obj: ..\..\src\common\mousemanager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\mousemanager.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_nbkbase.obj: ..\..\src\common\nbkbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\nbkbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\overlaycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_ownerdrwcmn.obj: ..\..\src\common\ownerdrwcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\ownerdrwcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_paper.obj: ..\..\src\common\paper.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\paper.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_panelcmn.obj: ..\..\src\common\panelcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\panelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_persist.obj: ..\..\src\common\persist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\persist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_pickerbase.obj: ..\..\src\common\pickerbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\pickerbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_popupcmn.obj: ..\..\src\common\popupcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\popupcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_preferencescmn.obj: ..\..\src\common\preferencescmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\preferencescmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_prntbase.obj: ..\..\src\common\prntbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\prntbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_quantize.obj: ..\..\src\common\quantize.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\quantize.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_radiobtncmn.obj: ..\..\src\common\radiobtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\radiobtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_radiocmn.obj: ..\..\src\common\radiocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\radiocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_rearrangectrl.obj: ..\..\src\common\rearrangectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\rearrangectrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_rendcmn.obj: ..\..\src\common\rendcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\rendcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_rgncmn.obj: ..\..\src\common\rgncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\rgncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_scrolbarcmn.obj: ..\..\src\common\scrolbarcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\scrolbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_settcmn.obj: ..\..\src\common\settcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\settcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_sizer.obj: ..\..\src\common\sizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\sizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_slidercmn.obj: ..\..\src\common\slidercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\slidercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_spinbtncmn.obj: ..\..\src\common\spinbtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\spinbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_spinctrlcmn.obj: ..\..\src\common\spinctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\spinctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_srchcmn.obj: ..\..\src\common\srchcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\srchcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_statbar.obj: ..\..\src\common\statbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\statbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_statbmpcmn.obj: ..\..\src\common\statbmpcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\statbmpcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_statboxcmn.obj: ..\..\src\common\statboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\statboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_statlinecmn.obj: ..\..\src\common\statlinecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\statlinecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_stattextcmn.obj: ..\..\src\common\stattextcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stattextcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_stockitem.obj: ..\..\src\common\stockitem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\stockitem.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_tbarbase.obj: ..\..\src\common\tbarbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\tbarbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_textcmn.obj: ..\..\src\common\textcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\textcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_textentrycmn.obj: ..\..\src\common\textentrycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\textentrycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_textmeasurecmn.obj: ..\..\src\common\textmeasurecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\textmeasurecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_toplvcmn.obj: ..\..\src\common\toplvcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\toplvcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_treebase.obj: ..\..\src\common\treebase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\treebase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_uiactioncmn.obj: ..\..\src\common\uiactioncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\uiactioncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_valgen.obj: ..\..\src\common\valgen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\valgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_validate.obj: ..\..\src\common\validate.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\validate.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_valtext.obj: ..\..\src\common\valtext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\valtext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_valnum.obj: ..\..\src\common\valnum.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\valnum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_wincmn.obj: ..\..\src\common\wincmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\wincmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_windowid.obj: ..\..\src\common\windowid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\windowid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_wrapsizer.obj: ..\..\src\common\wrapsizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\wrapsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_xpmdecod.obj: ..\..\src\common\xpmdecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\xpmdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_busyinfo.obj: ..\..\src\generic\busyinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\busyinfo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_generic_buttonbar.obj: ..\..\src\generic\buttonbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\buttonbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_choicdgg.obj: ..\..\src\generic\choicdgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\choicdgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_choicbkg.obj: ..\..\src\generic\choicbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\choicbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_combog.obj: ..\..\src\generic\combog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\combog.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dcpsg.obj: ..\..\src\generic\dcpsg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\dcpsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dirctrlg.obj: ..\..\src\generic\dirctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\dirctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_dragimgg.obj: ..\..\src\generic\dragimgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\dragimgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_filectrlg.obj: ..\..\src\generic\filectrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\filectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_infobar.obj: ..\..\src\generic\infobar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\infobar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_listbkg.obj: ..\..\src\generic\listbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\listbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_logg.obj: ..\..\src\generic\logg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\logg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_markuptext.obj: ..\..\src\generic\markuptext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\markuptext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_msgdlgg.obj: ..\..\src\generic\msgdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\msgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_numdlgg.obj: ..\..\src\generic\numdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\numdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_progdlgg.obj: ..\..\src\generic\progdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\progdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_preferencesg.obj: ..\..\src\generic\preferencesg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\preferencesg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_printps.obj: ..\..\src\generic\printps.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\printps.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_renderg.obj: ..\..\src\generic\renderg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\renderg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_richmsgdlgg.obj: ..\..\src\generic\richmsgdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\richmsgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_scrlwing.obj: ..\..\src\generic\scrlwing.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\scrlwing.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_selstore.obj: ..\..\src\generic\selstore.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\selstore.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_spinctlg.obj: ..\..\src\generic\spinctlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\spinctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_splitter.obj: ..\..\src\generic\splitter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\splitter.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_srchctlg.obj: ..\..\src\generic\srchctlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\srchctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_statbmpg.obj: ..\..\src\generic\statbmpg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\statbmpg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_stattextg.obj: ..\..\src\generic\stattextg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\stattextg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_textdlgg.obj: ..\..\src\generic\textdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\textdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_tipwin.obj: ..\..\src\generic\tipwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\tipwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_toolbkg.obj: ..\..\src\generic\toolbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\toolbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_treectlg.obj: ..\..\src\generic\treectlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\treectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_treebkg.obj: ..\..\src\generic\treebkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\treebkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_vlbox.obj: ..\..\src\generic\vlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\vlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_vscroll.obj: ..\..\src\generic\vscroll.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\vscroll.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_xmlreshandler.obj: ..\..\src\xrc\xmlreshandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmlreshandler.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_animatecmn.obj: ..\..\src\common\animatecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\animatecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bmpcboxcmn.obj: ..\..\src\common\bmpcboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\bmpcboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_datavcmn.obj: ..\..\src\common\datavcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\datavcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gridcmn.obj: ..\..\src\common\gridcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\gridcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_hyperlnkcmn.obj: ..\..\src\common\hyperlnkcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\hyperlnkcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_odcombocmn.obj: ..\..\src\common\odcombocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\odcombocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_richtooltipcmn.obj: ..\..\src\common\richtooltipcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\richtooltipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\aboutdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bannerwindow.obj: ..\..\src\generic\bannerwindow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\bannerwindow.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_datavgen.obj: ..\..\src\generic\datavgen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\datavgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_datectlg.obj: ..\..\src\generic\datectlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\datectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_editlbox.obj: ..\..\src\generic\editlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\editlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_grid.obj: ..\..\src\generic\grid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\grid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gridctrl.obj: ..\..\src\generic\gridctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\gridctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_grideditors.obj: ..\..\src\generic\grideditors.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\grideditors.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_gridsel.obj: ..\..\src\generic\gridsel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\gridsel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_helpext.obj: ..\..\src\generic\helpext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\helpext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_hyperlinkg.obj: ..\..\src\generic\hyperlinkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\hyperlinkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_laywin.obj: ..\..\src\generic\laywin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\laywin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_notifmsgg.obj: ..\..\src\generic\notifmsgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\notifmsgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_odcombo.obj: ..\..\src\generic\odcombo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\odcombo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_propdlg.obj: ..\..\src\generic\propdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\propdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_richtooltipg.obj: ..\..\src\generic\richtooltipg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\richtooltipg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_sashwin.obj: ..\..\src\generic\sashwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\sashwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_splash.obj: ..\..\src\generic\splash.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\splash.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_timectrlg.obj: ..\..\src\generic\timectrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\timectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_tipdlg.obj: ..\..\src\generic\tipdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\tipdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_treelist.obj: ..\..\src\generic\treelist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\treelist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_wizard.obj: ..\..\src\generic\wizard.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\wizard.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\taskbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_notifmsg.obj: ..\..\src\msw\notifmsg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\notifmsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_richtooltip.obj: ..\..\src\msw\richtooltip.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\richtooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_sound.obj: ..\..\src\msw\sound.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\sound.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_taskbar.obj: ..\..\src\msw\taskbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\taskbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_joystick.obj: ..\..\src\msw\joystick.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\joystick.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_animateg.obj: ..\..\src\generic\animateg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\animateg.cpp +!endif + +$(OBJS)\basedll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\basedll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXMAKINGDLL_BASE /d wxUSE_BASE=1 ..\..\src\msw\version.rc + +$(OBJS)\basedll_any.obj: ..\..\src\common\any.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\any.cpp + +$(OBJS)\basedll_appbase.obj: ..\..\src\common\appbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\appbase.cpp + +$(OBJS)\basedll_arcall.obj: ..\..\src\common\arcall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\arcall.cpp + +$(OBJS)\basedll_arcfind.obj: ..\..\src\common\arcfind.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\arcfind.cpp + +$(OBJS)\basedll_archive.obj: ..\..\src\common\archive.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\archive.cpp + +$(OBJS)\basedll_arrstr.obj: ..\..\src\common\arrstr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\arrstr.cpp + +$(OBJS)\basedll_base64.obj: ..\..\src\common\base64.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\base64.cpp + +$(OBJS)\basedll_clntdata.obj: ..\..\src\common\clntdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\clntdata.cpp + +$(OBJS)\basedll_cmdline.obj: ..\..\src\common\cmdline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\cmdline.cpp + +$(OBJS)\basedll_config.obj: ..\..\src\common\config.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\config.cpp + +$(OBJS)\basedll_convauto.obj: ..\..\src\common\convauto.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\convauto.cpp + +$(OBJS)\basedll_datetime.obj: ..\..\src\common\datetime.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\datetime.cpp + +$(OBJS)\basedll_datetimefmt.obj: ..\..\src\common\datetimefmt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\datetimefmt.cpp + +$(OBJS)\basedll_datstrm.obj: ..\..\src\common\datstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\datstrm.cpp + +$(OBJS)\basedll_dircmn.obj: ..\..\src\common\dircmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\dircmn.cpp + +$(OBJS)\basedll_dynarray.obj: ..\..\src\common\dynarray.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\dynarray.cpp + +$(OBJS)\basedll_dynlib.obj: ..\..\src\common\dynlib.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\dynlib.cpp + +$(OBJS)\basedll_dynload.obj: ..\..\src\common\dynload.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\dynload.cpp + +$(OBJS)\basedll_encconv.obj: ..\..\src\common\encconv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\encconv.cpp + +$(OBJS)\basedll_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\evtloopcmn.cpp + +$(OBJS)\basedll_extended.obj: ..\..\src\common\extended.c + $(CC) /c /nologo /TC /Fo$@ $(BASEDLL_CFLAGS) ..\..\src\common\extended.c + +$(OBJS)\basedll_ffile.obj: ..\..\src\common\ffile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\ffile.cpp + +$(OBJS)\basedll_file.obj: ..\..\src\common\file.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\file.cpp + +$(OBJS)\basedll_fileback.obj: ..\..\src\common\fileback.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fileback.cpp + +$(OBJS)\basedll_fileconf.obj: ..\..\src\common\fileconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fileconf.cpp + +$(OBJS)\basedll_filefn.obj: ..\..\src\common\filefn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\filefn.cpp + +$(OBJS)\basedll_filename.obj: ..\..\src\common\filename.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\filename.cpp + +$(OBJS)\basedll_filesys.obj: ..\..\src\common\filesys.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\filesys.cpp + +$(OBJS)\basedll_filtall.obj: ..\..\src\common\filtall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\filtall.cpp + +$(OBJS)\basedll_filtfind.obj: ..\..\src\common\filtfind.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\filtfind.cpp + +$(OBJS)\basedll_fmapbase.obj: ..\..\src\common\fmapbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fmapbase.cpp + +$(OBJS)\basedll_fs_arc.obj: ..\..\src\common\fs_arc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fs_arc.cpp + +$(OBJS)\basedll_fs_filter.obj: ..\..\src\common\fs_filter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fs_filter.cpp + +$(OBJS)\basedll_hash.obj: ..\..\src\common\hash.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\hash.cpp + +$(OBJS)\basedll_hashmap.obj: ..\..\src\common\hashmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\hashmap.cpp + +$(OBJS)\basedll_init.obj: ..\..\src\common\init.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\init.cpp + +$(OBJS)\basedll_intl.obj: ..\..\src\common\intl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\intl.cpp + +$(OBJS)\basedll_ipcbase.obj: ..\..\src\common\ipcbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\ipcbase.cpp + +$(OBJS)\basedll_languageinfo.obj: ..\..\src\common\languageinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\languageinfo.cpp + +$(OBJS)\basedll_list.obj: ..\..\src\common\list.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\list.cpp + +$(OBJS)\basedll_log.obj: ..\..\src\common\log.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\log.cpp + +$(OBJS)\basedll_longlong.obj: ..\..\src\common\longlong.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\longlong.cpp + +$(OBJS)\basedll_memory.obj: ..\..\src\common\memory.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\memory.cpp + +$(OBJS)\basedll_mimecmn.obj: ..\..\src\common\mimecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\mimecmn.cpp + +$(OBJS)\basedll_module.obj: ..\..\src\common\module.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\module.cpp + +$(OBJS)\basedll_mstream.obj: ..\..\src\common\mstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\mstream.cpp + +$(OBJS)\basedll_numformatter.obj: ..\..\src\common\numformatter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\numformatter.cpp + +$(OBJS)\basedll_object.obj: ..\..\src\common\object.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\object.cpp + +$(OBJS)\basedll_platinfo.obj: ..\..\src\common\platinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\platinfo.cpp + +$(OBJS)\basedll_powercmn.obj: ..\..\src\common\powercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\powercmn.cpp + +$(OBJS)\basedll_process.obj: ..\..\src\common\process.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\process.cpp + +$(OBJS)\basedll_regex.obj: ..\..\src\common\regex.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\regex.cpp + +$(OBJS)\basedll_stdpbase.obj: ..\..\src\common\stdpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stdpbase.cpp + +$(OBJS)\basedll_sstream.obj: ..\..\src\common\sstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\sstream.cpp + +$(OBJS)\basedll_stdstream.obj: ..\..\src\common\stdstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stdstream.cpp + +$(OBJS)\basedll_stopwatch.obj: ..\..\src\common\stopwatch.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stopwatch.cpp + +$(OBJS)\basedll_strconv.obj: ..\..\src\common\strconv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\strconv.cpp + +$(OBJS)\basedll_stream.obj: ..\..\src\common\stream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stream.cpp + +$(OBJS)\basedll_string.obj: ..\..\src\common\string.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\string.cpp + +$(OBJS)\basedll_stringimpl.obj: ..\..\src\common\stringimpl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stringimpl.cpp + +$(OBJS)\basedll_stringops.obj: ..\..\src\common\stringops.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\stringops.cpp + +$(OBJS)\basedll_strvararg.obj: ..\..\src\common\strvararg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\strvararg.cpp + +$(OBJS)\basedll_sysopt.obj: ..\..\src\common\sysopt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\sysopt.cpp + +$(OBJS)\basedll_tarstrm.obj: ..\..\src\common\tarstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\tarstrm.cpp + +$(OBJS)\basedll_textbuf.obj: ..\..\src\common\textbuf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\textbuf.cpp + +$(OBJS)\basedll_textfile.obj: ..\..\src\common\textfile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\textfile.cpp + +$(OBJS)\basedll_threadinfo.obj: ..\..\src\common\threadinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\threadinfo.cpp + +$(OBJS)\basedll_time.obj: ..\..\src\common\time.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\time.cpp + +$(OBJS)\basedll_timercmn.obj: ..\..\src\common\timercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\timercmn.cpp + +$(OBJS)\basedll_timerimpl.obj: ..\..\src\common\timerimpl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\timerimpl.cpp + +$(OBJS)\basedll_tokenzr.obj: ..\..\src\common\tokenzr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\tokenzr.cpp + +$(OBJS)\basedll_translation.obj: ..\..\src\common\translation.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\translation.cpp + +$(OBJS)\basedll_txtstrm.obj: ..\..\src\common\txtstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\txtstrm.cpp + +$(OBJS)\basedll_unichar.obj: ..\..\src\common\unichar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\unichar.cpp + +$(OBJS)\basedll_uri.obj: ..\..\src\common\uri.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\uri.cpp + +$(OBJS)\basedll_ustring.obj: ..\..\src\common\ustring.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\ustring.cpp + +$(OBJS)\basedll_variant.obj: ..\..\src\common\variant.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\variant.cpp + +$(OBJS)\basedll_wfstream.obj: ..\..\src\common\wfstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\wfstream.cpp + +$(OBJS)\basedll_wxcrt.obj: ..\..\src\common\wxcrt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\wxcrt.cpp + +$(OBJS)\basedll_wxprintf.obj: ..\..\src\common\wxprintf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\wxprintf.cpp + +$(OBJS)\basedll_xlocale.obj: ..\..\src\common\xlocale.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\xlocale.cpp + +$(OBJS)\basedll_xti.obj: ..\..\src\common\xti.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\xti.cpp + +$(OBJS)\basedll_xtistrm.obj: ..\..\src\common\xtistrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\xtistrm.cpp + +$(OBJS)\basedll_zipstrm.obj: ..\..\src\common\zipstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\zipstrm.cpp + +$(OBJS)\basedll_zstream.obj: ..\..\src\common\zstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\zstream.cpp + +$(OBJS)\basedll_fswatchercmn.obj: ..\..\src\common\fswatchercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fswatchercmn.cpp + +$(OBJS)\basedll_fswatcherg.obj: ..\..\src\generic\fswatcherg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\generic\fswatcherg.cpp + +$(OBJS)\basedll_basemsw.obj: ..\..\src\msw\basemsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\basemsw.cpp + +$(OBJS)\basedll_crashrpt.obj: ..\..\src\msw\crashrpt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\crashrpt.cpp + +$(OBJS)\basedll_debughlp.obj: ..\..\src\msw\debughlp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\debughlp.cpp + +$(OBJS)\basedll_dde.obj: ..\..\src\msw\dde.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\dde.cpp + +$(OBJS)\basedll_dir.obj: ..\..\src\msw\dir.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\dir.cpp + +$(OBJS)\basedll_dlmsw.obj: ..\..\src\msw\dlmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\dlmsw.cpp + +$(OBJS)\basedll_evtloopconsole.obj: ..\..\src\msw\evtloopconsole.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\evtloopconsole.cpp + +$(OBJS)\basedll_mimetype.obj: ..\..\src\msw\mimetype.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\mimetype.cpp + +$(OBJS)\basedll_power.obj: ..\..\src\msw\power.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\power.cpp + +$(OBJS)\basedll_regconf.obj: ..\..\src\msw\regconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\regconf.cpp + +$(OBJS)\basedll_registry.obj: ..\..\src\msw\registry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\registry.cpp + +$(OBJS)\basedll_snglinst.obj: ..\..\src\msw\snglinst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\snglinst.cpp + +$(OBJS)\basedll_stackwalk.obj: ..\..\src\msw\stackwalk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\stackwalk.cpp + +$(OBJS)\basedll_stdpaths.obj: ..\..\src\msw\stdpaths.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\stdpaths.cpp + +$(OBJS)\basedll_thread.obj: ..\..\src\msw\thread.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\thread.cpp + +$(OBJS)\basedll_timer.obj: ..\..\src\msw\timer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\timer.cpp + +$(OBJS)\basedll_utils.obj: ..\..\src\msw\utils.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\utils.cpp + +$(OBJS)\basedll_utilsexc.obj: ..\..\src\msw\utilsexc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\utilsexc.cpp + +$(OBJS)\basedll_fswatcher.obj: ..\..\src\msw\fswatcher.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\fswatcher.cpp + +$(OBJS)\basedll_event.obj: ..\..\src\common\event.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\basedll_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\basedll_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\basedll_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\basedll_main.obj: ..\..\src\msw\main.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\basedll_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\basedll_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\baselib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\baselib_any.obj: ..\..\src\common\any.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\any.cpp + +$(OBJS)\baselib_appbase.obj: ..\..\src\common\appbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\appbase.cpp + +$(OBJS)\baselib_arcall.obj: ..\..\src\common\arcall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\arcall.cpp + +$(OBJS)\baselib_arcfind.obj: ..\..\src\common\arcfind.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\arcfind.cpp + +$(OBJS)\baselib_archive.obj: ..\..\src\common\archive.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\archive.cpp + +$(OBJS)\baselib_arrstr.obj: ..\..\src\common\arrstr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\arrstr.cpp + +$(OBJS)\baselib_base64.obj: ..\..\src\common\base64.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\base64.cpp + +$(OBJS)\baselib_clntdata.obj: ..\..\src\common\clntdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\clntdata.cpp + +$(OBJS)\baselib_cmdline.obj: ..\..\src\common\cmdline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\cmdline.cpp + +$(OBJS)\baselib_config.obj: ..\..\src\common\config.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\config.cpp + +$(OBJS)\baselib_convauto.obj: ..\..\src\common\convauto.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\convauto.cpp + +$(OBJS)\baselib_datetime.obj: ..\..\src\common\datetime.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\datetime.cpp + +$(OBJS)\baselib_datetimefmt.obj: ..\..\src\common\datetimefmt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\datetimefmt.cpp + +$(OBJS)\baselib_datstrm.obj: ..\..\src\common\datstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\datstrm.cpp + +$(OBJS)\baselib_dircmn.obj: ..\..\src\common\dircmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\dircmn.cpp + +$(OBJS)\baselib_dynarray.obj: ..\..\src\common\dynarray.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\dynarray.cpp + +$(OBJS)\baselib_dynlib.obj: ..\..\src\common\dynlib.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\dynlib.cpp + +$(OBJS)\baselib_dynload.obj: ..\..\src\common\dynload.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\dynload.cpp + +$(OBJS)\baselib_encconv.obj: ..\..\src\common\encconv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\encconv.cpp + +$(OBJS)\baselib_evtloopcmn.obj: ..\..\src\common\evtloopcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\evtloopcmn.cpp + +$(OBJS)\baselib_extended.obj: ..\..\src\common\extended.c + $(CC) /c /nologo /TC /Fo$@ $(BASELIB_CFLAGS) ..\..\src\common\extended.c + +$(OBJS)\baselib_ffile.obj: ..\..\src\common\ffile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\ffile.cpp + +$(OBJS)\baselib_file.obj: ..\..\src\common\file.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\file.cpp + +$(OBJS)\baselib_fileback.obj: ..\..\src\common\fileback.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fileback.cpp + +$(OBJS)\baselib_fileconf.obj: ..\..\src\common\fileconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fileconf.cpp + +$(OBJS)\baselib_filefn.obj: ..\..\src\common\filefn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\filefn.cpp + +$(OBJS)\baselib_filename.obj: ..\..\src\common\filename.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\filename.cpp + +$(OBJS)\baselib_filesys.obj: ..\..\src\common\filesys.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\filesys.cpp + +$(OBJS)\baselib_filtall.obj: ..\..\src\common\filtall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\filtall.cpp + +$(OBJS)\baselib_filtfind.obj: ..\..\src\common\filtfind.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\filtfind.cpp + +$(OBJS)\baselib_fmapbase.obj: ..\..\src\common\fmapbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fmapbase.cpp + +$(OBJS)\baselib_fs_arc.obj: ..\..\src\common\fs_arc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fs_arc.cpp + +$(OBJS)\baselib_fs_filter.obj: ..\..\src\common\fs_filter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fs_filter.cpp + +$(OBJS)\baselib_hash.obj: ..\..\src\common\hash.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\hash.cpp + +$(OBJS)\baselib_hashmap.obj: ..\..\src\common\hashmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\hashmap.cpp + +$(OBJS)\baselib_init.obj: ..\..\src\common\init.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\init.cpp + +$(OBJS)\baselib_intl.obj: ..\..\src\common\intl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\intl.cpp + +$(OBJS)\baselib_ipcbase.obj: ..\..\src\common\ipcbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\ipcbase.cpp + +$(OBJS)\baselib_languageinfo.obj: ..\..\src\common\languageinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\languageinfo.cpp + +$(OBJS)\baselib_list.obj: ..\..\src\common\list.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\list.cpp + +$(OBJS)\baselib_log.obj: ..\..\src\common\log.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\log.cpp + +$(OBJS)\baselib_longlong.obj: ..\..\src\common\longlong.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\longlong.cpp + +$(OBJS)\baselib_memory.obj: ..\..\src\common\memory.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\memory.cpp + +$(OBJS)\baselib_mimecmn.obj: ..\..\src\common\mimecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\mimecmn.cpp + +$(OBJS)\baselib_module.obj: ..\..\src\common\module.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\module.cpp + +$(OBJS)\baselib_mstream.obj: ..\..\src\common\mstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\mstream.cpp + +$(OBJS)\baselib_numformatter.obj: ..\..\src\common\numformatter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\numformatter.cpp + +$(OBJS)\baselib_object.obj: ..\..\src\common\object.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\object.cpp + +$(OBJS)\baselib_platinfo.obj: ..\..\src\common\platinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\platinfo.cpp + +$(OBJS)\baselib_powercmn.obj: ..\..\src\common\powercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\powercmn.cpp + +$(OBJS)\baselib_process.obj: ..\..\src\common\process.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\process.cpp + +$(OBJS)\baselib_regex.obj: ..\..\src\common\regex.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\regex.cpp + +$(OBJS)\baselib_stdpbase.obj: ..\..\src\common\stdpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stdpbase.cpp + +$(OBJS)\baselib_sstream.obj: ..\..\src\common\sstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\sstream.cpp + +$(OBJS)\baselib_stdstream.obj: ..\..\src\common\stdstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stdstream.cpp + +$(OBJS)\baselib_stopwatch.obj: ..\..\src\common\stopwatch.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stopwatch.cpp + +$(OBJS)\baselib_strconv.obj: ..\..\src\common\strconv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\strconv.cpp + +$(OBJS)\baselib_stream.obj: ..\..\src\common\stream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stream.cpp + +$(OBJS)\baselib_string.obj: ..\..\src\common\string.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\string.cpp + +$(OBJS)\baselib_stringimpl.obj: ..\..\src\common\stringimpl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stringimpl.cpp + +$(OBJS)\baselib_stringops.obj: ..\..\src\common\stringops.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\stringops.cpp + +$(OBJS)\baselib_strvararg.obj: ..\..\src\common\strvararg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\strvararg.cpp + +$(OBJS)\baselib_sysopt.obj: ..\..\src\common\sysopt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\sysopt.cpp + +$(OBJS)\baselib_tarstrm.obj: ..\..\src\common\tarstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\tarstrm.cpp + +$(OBJS)\baselib_textbuf.obj: ..\..\src\common\textbuf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\textbuf.cpp + +$(OBJS)\baselib_textfile.obj: ..\..\src\common\textfile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\textfile.cpp + +$(OBJS)\baselib_threadinfo.obj: ..\..\src\common\threadinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\threadinfo.cpp + +$(OBJS)\baselib_time.obj: ..\..\src\common\time.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\time.cpp + +$(OBJS)\baselib_timercmn.obj: ..\..\src\common\timercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\timercmn.cpp + +$(OBJS)\baselib_timerimpl.obj: ..\..\src\common\timerimpl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\timerimpl.cpp + +$(OBJS)\baselib_tokenzr.obj: ..\..\src\common\tokenzr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\tokenzr.cpp + +$(OBJS)\baselib_translation.obj: ..\..\src\common\translation.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\translation.cpp + +$(OBJS)\baselib_txtstrm.obj: ..\..\src\common\txtstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\txtstrm.cpp + +$(OBJS)\baselib_unichar.obj: ..\..\src\common\unichar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\unichar.cpp + +$(OBJS)\baselib_uri.obj: ..\..\src\common\uri.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\uri.cpp + +$(OBJS)\baselib_ustring.obj: ..\..\src\common\ustring.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\ustring.cpp + +$(OBJS)\baselib_variant.obj: ..\..\src\common\variant.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\variant.cpp + +$(OBJS)\baselib_wfstream.obj: ..\..\src\common\wfstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\wfstream.cpp + +$(OBJS)\baselib_wxcrt.obj: ..\..\src\common\wxcrt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\wxcrt.cpp + +$(OBJS)\baselib_wxprintf.obj: ..\..\src\common\wxprintf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\wxprintf.cpp + +$(OBJS)\baselib_xlocale.obj: ..\..\src\common\xlocale.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\xlocale.cpp + +$(OBJS)\baselib_xti.obj: ..\..\src\common\xti.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\xti.cpp + +$(OBJS)\baselib_xtistrm.obj: ..\..\src\common\xtistrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\xtistrm.cpp + +$(OBJS)\baselib_zipstrm.obj: ..\..\src\common\zipstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\zipstrm.cpp + +$(OBJS)\baselib_zstream.obj: ..\..\src\common\zstream.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\zstream.cpp + +$(OBJS)\baselib_fswatchercmn.obj: ..\..\src\common\fswatchercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fswatchercmn.cpp + +$(OBJS)\baselib_fswatcherg.obj: ..\..\src\generic\fswatcherg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\generic\fswatcherg.cpp + +$(OBJS)\baselib_basemsw.obj: ..\..\src\msw\basemsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\basemsw.cpp + +$(OBJS)\baselib_crashrpt.obj: ..\..\src\msw\crashrpt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\crashrpt.cpp + +$(OBJS)\baselib_debughlp.obj: ..\..\src\msw\debughlp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\debughlp.cpp + +$(OBJS)\baselib_dde.obj: ..\..\src\msw\dde.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\dde.cpp + +$(OBJS)\baselib_dir.obj: ..\..\src\msw\dir.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\dir.cpp + +$(OBJS)\baselib_dlmsw.obj: ..\..\src\msw\dlmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\dlmsw.cpp + +$(OBJS)\baselib_evtloopconsole.obj: ..\..\src\msw\evtloopconsole.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\evtloopconsole.cpp + +$(OBJS)\baselib_mimetype.obj: ..\..\src\msw\mimetype.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\mimetype.cpp + +$(OBJS)\baselib_power.obj: ..\..\src\msw\power.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\power.cpp + +$(OBJS)\baselib_regconf.obj: ..\..\src\msw\regconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\regconf.cpp + +$(OBJS)\baselib_registry.obj: ..\..\src\msw\registry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\registry.cpp + +$(OBJS)\baselib_snglinst.obj: ..\..\src\msw\snglinst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\snglinst.cpp + +$(OBJS)\baselib_stackwalk.obj: ..\..\src\msw\stackwalk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\stackwalk.cpp + +$(OBJS)\baselib_stdpaths.obj: ..\..\src\msw\stdpaths.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\stdpaths.cpp + +$(OBJS)\baselib_thread.obj: ..\..\src\msw\thread.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\thread.cpp + +$(OBJS)\baselib_timer.obj: ..\..\src\msw\timer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\timer.cpp + +$(OBJS)\baselib_utils.obj: ..\..\src\msw\utils.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\utils.cpp + +$(OBJS)\baselib_utilsexc.obj: ..\..\src\msw\utilsexc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\utilsexc.cpp + +$(OBJS)\baselib_fswatcher.obj: ..\..\src\msw\fswatcher.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\fswatcher.cpp + +$(OBJS)\baselib_event.obj: ..\..\src\common\event.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\baselib_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\baselib_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\baselib_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\baselib_main.obj: ..\..\src\msw\main.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\baselib_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\baselib_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASELIB_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\netdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\netdll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXUSINGDLL /d WXMAKINGDLL_NET ..\..\src\msw\version.rc + +$(OBJS)\netdll_fs_inet.obj: ..\..\src\common\fs_inet.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\fs_inet.cpp + +$(OBJS)\netdll_ftp.obj: ..\..\src\common\ftp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\ftp.cpp + +$(OBJS)\netdll_http.obj: ..\..\src\common\http.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\http.cpp + +$(OBJS)\netdll_protocol.obj: ..\..\src\common\protocol.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\protocol.cpp + +$(OBJS)\netdll_sckaddr.obj: ..\..\src\common\sckaddr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\sckaddr.cpp + +$(OBJS)\netdll_sckfile.obj: ..\..\src\common\sckfile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\sckfile.cpp + +$(OBJS)\netdll_sckipc.obj: ..\..\src\common\sckipc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\sckipc.cpp + +$(OBJS)\netdll_sckstrm.obj: ..\..\src\common\sckstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\sckstrm.cpp + +$(OBJS)\netdll_socket.obj: ..\..\src\common\socket.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\socket.cpp + +$(OBJS)\netdll_url.obj: ..\..\src\common\url.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\url.cpp + +$(OBJS)\netdll_sockmsw.obj: ..\..\src\msw\sockmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\msw\sockmsw.cpp + +$(OBJS)\netdll_urlmsw.obj: ..\..\src\msw\urlmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\msw\urlmsw.cpp + +$(OBJS)\netlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\netlib_fs_inet.obj: ..\..\src\common\fs_inet.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\fs_inet.cpp + +$(OBJS)\netlib_ftp.obj: ..\..\src\common\ftp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\ftp.cpp + +$(OBJS)\netlib_http.obj: ..\..\src\common\http.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\http.cpp + +$(OBJS)\netlib_protocol.obj: ..\..\src\common\protocol.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\protocol.cpp + +$(OBJS)\netlib_sckaddr.obj: ..\..\src\common\sckaddr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\sckaddr.cpp + +$(OBJS)\netlib_sckfile.obj: ..\..\src\common\sckfile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\sckfile.cpp + +$(OBJS)\netlib_sckipc.obj: ..\..\src\common\sckipc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\sckipc.cpp + +$(OBJS)\netlib_sckstrm.obj: ..\..\src\common\sckstrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\sckstrm.cpp + +$(OBJS)\netlib_socket.obj: ..\..\src\common\socket.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\socket.cpp + +$(OBJS)\netlib_url.obj: ..\..\src\common\url.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\common\url.cpp + +$(OBJS)\netlib_sockmsw.obj: ..\..\src\msw\sockmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\msw\sockmsw.cpp + +$(OBJS)\netlib_urlmsw.obj: ..\..\src\msw\urlmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) ..\..\src\msw\urlmsw.cpp + +$(OBJS)\coredll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\coredll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_CORE /d wxUSE_BASE=0 ..\..\src\msw\version.rc + +$(OBJS)\coredll_event.obj: ..\..\src\common\event.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\coredll_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\coredll_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\coredll_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\coredll_main.obj: ..\..\src\msw\main.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\coredll_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\coredll_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\coredll_generic_statusbr.obj: ..\..\src\generic\statusbr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\statusbr.cpp + +$(OBJS)\coredll_msw_accel.obj: ..\..\src\msw\accel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\accel.cpp + +$(OBJS)\coredll_anybutton.obj: ..\..\src\msw\anybutton.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\anybutton.cpp + +$(OBJS)\coredll_artmsw.obj: ..\..\src\msw\artmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\artmsw.cpp + +$(OBJS)\coredll_msw_bmpbuttn.obj: ..\..\src\msw\bmpbuttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\bmpbuttn.cpp + +$(OBJS)\coredll_msw_button.obj: ..\..\src\msw\button.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\button.cpp + +$(OBJS)\coredll_msw_checkbox.obj: ..\..\src\msw\checkbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\checkbox.cpp + +$(OBJS)\coredll_msw_choice.obj: ..\..\src\msw\choice.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\choice.cpp + +$(OBJS)\coredll_colordlg.obj: ..\..\src\msw\colordlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\colordlg.cpp + +$(OBJS)\coredll_combo.obj: ..\..\src\msw\combo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\combo.cpp + +$(OBJS)\coredll_msw_combobox.obj: ..\..\src\msw\combobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\combobox.cpp + +$(OBJS)\coredll_msw_control.obj: ..\..\src\msw\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\control.cpp + +$(OBJS)\coredll_msw_dialog.obj: ..\..\src\msw\dialog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dialog.cpp + +$(OBJS)\coredll_dirdlg.obj: ..\..\src\msw\dirdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dirdlg.cpp + +$(OBJS)\coredll_dragimag.obj: ..\..\src\msw\dragimag.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dragimag.cpp + +$(OBJS)\coredll_filedlg.obj: ..\..\src\msw\filedlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\filedlg.cpp + +$(OBJS)\coredll_frame.obj: ..\..\src\msw\frame.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\frame.cpp + +$(OBJS)\coredll_msw_gauge.obj: ..\..\src\msw\gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\gauge.cpp + +$(OBJS)\coredll_headerctrl.obj: ..\..\src\msw\headerctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\headerctrl.cpp + +$(OBJS)\coredll_iniconf.obj: ..\..\src\msw\iniconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\iniconf.cpp + +$(OBJS)\coredll_msw_listbox.obj: ..\..\src\msw\listbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\listbox.cpp + +$(OBJS)\coredll_msw_listctrl.obj: ..\..\src\msw\listctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\listctrl.cpp + +$(OBJS)\coredll_mdi.obj: ..\..\src\msw\mdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\mdi.cpp + +$(OBJS)\coredll_msw_menu.obj: ..\..\src\msw\menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\menu.cpp + +$(OBJS)\coredll_menuitem.obj: ..\..\src\msw\menuitem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\menuitem.cpp + +$(OBJS)\coredll_metafile.obj: ..\..\src\msw\metafile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\metafile.cpp + +$(OBJS)\coredll_msgdlg.obj: ..\..\src\msw\msgdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\msgdlg.cpp + +$(OBJS)\coredll_nativdlg.obj: ..\..\src\msw\nativdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\nativdlg.cpp + +$(OBJS)\coredll_nativewin.obj: ..\..\src\msw\nativewin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\nativewin.cpp + +$(OBJS)\coredll_msw_notebook.obj: ..\..\src\msw\notebook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\notebook.cpp + +$(OBJS)\coredll_access.obj: ..\..\src\msw\ole\access.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\access.cpp + +$(OBJS)\coredll_ownerdrw.obj: ..\..\src\msw\ownerdrw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ownerdrw.cpp + +$(OBJS)\coredll_panel.obj: ..\..\src\msw\panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\panel.cpp + +$(OBJS)\coredll_progdlg.obj: ..\..\src\msw\progdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\progdlg.cpp + +$(OBJS)\coredll_msw_radiobox.obj: ..\..\src\msw\radiobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\radiobox.cpp + +$(OBJS)\coredll_msw_radiobut.obj: ..\..\src\msw\radiobut.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\radiobut.cpp + +$(OBJS)\coredll_richmsgdlg.obj: ..\..\src\msw\richmsgdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\richmsgdlg.cpp + +$(OBJS)\coredll_msw_scrolbar.obj: ..\..\src\msw\scrolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\scrolbar.cpp + +$(OBJS)\coredll_msw_slider.obj: ..\..\src\msw\slider.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\slider.cpp + +$(OBJS)\coredll_msw_spinbutt.obj: ..\..\src\msw\spinbutt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\spinbutt.cpp + +$(OBJS)\coredll_spinctrl.obj: ..\..\src\msw\spinctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\spinctrl.cpp + +$(OBJS)\coredll_msw_statbmp.obj: ..\..\src\msw\statbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\statbmp.cpp + +$(OBJS)\coredll_msw_statbox.obj: ..\..\src\msw\statbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\statbox.cpp + +$(OBJS)\coredll_statusbar.obj: ..\..\src\msw\statusbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\statusbar.cpp + +$(OBJS)\coredll_msw_statline.obj: ..\..\src\msw\statline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\statline.cpp + +$(OBJS)\coredll_msw_stattext.obj: ..\..\src\msw\stattext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\stattext.cpp + +$(OBJS)\coredll_msw_toolbar.obj: ..\..\src\msw\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\toolbar.cpp + +$(OBJS)\coredll_msw_textctrl.obj: ..\..\src\msw\textctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\textctrl.cpp + +$(OBJS)\coredll_textentry.obj: ..\..\src\msw\textentry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\textentry.cpp + +$(OBJS)\coredll_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\tglbtn.cpp + +$(OBJS)\coredll_treectrl.obj: ..\..\src\msw\treectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\treectrl.cpp + +$(OBJS)\coredll_msw_checklst.obj: ..\..\src\msw\checklst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\checklst.cpp + +$(OBJS)\coredll_msw_fdrepdlg.obj: ..\..\src\msw\fdrepdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\fdrepdlg.cpp + +$(OBJS)\coredll_fontdlg.obj: ..\..\src\msw\fontdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\fontdlg.cpp + +$(OBJS)\coredll_generic_accel.obj: ..\..\src\generic\accel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\accel.cpp + +$(OBJS)\coredll_colrdlgg.obj: ..\..\src\generic\colrdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\colrdlgg.cpp + +$(OBJS)\coredll_dirdlgg.obj: ..\..\src\generic\dirdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\dirdlgg.cpp + +$(OBJS)\coredll_generic_fdrepdlg.obj: ..\..\src\generic\fdrepdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\fdrepdlg.cpp + +$(OBJS)\coredll_filedlgg.obj: ..\..\src\generic\filedlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\filedlgg.cpp + +$(OBJS)\coredll_fontdlgg.obj: ..\..\src\generic\fontdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\fontdlgg.cpp + +$(OBJS)\coredll_generic_listctrl.obj: ..\..\src\generic\listctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\listctrl.cpp + +$(OBJS)\coredll_mdig.obj: ..\..\src\generic\mdig.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\mdig.cpp + +$(OBJS)\coredll_univ_bmpbuttn.obj: ..\..\src\univ\bmpbuttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\bmpbuttn.cpp + +$(OBJS)\coredll_univ_button.obj: ..\..\src\univ\button.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\button.cpp + +$(OBJS)\coredll_univ_checkbox.obj: ..\..\src\univ\checkbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\checkbox.cpp + +$(OBJS)\coredll_univ_checklst.obj: ..\..\src\univ\checklst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\checklst.cpp + +$(OBJS)\coredll_univ_choice.obj: ..\..\src\univ\choice.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\choice.cpp + +$(OBJS)\coredll_univ_combobox.obj: ..\..\src\univ\combobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\combobox.cpp + +$(OBJS)\coredll_univ_control.obj: ..\..\src\univ\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\control.cpp + +$(OBJS)\coredll_ctrlrend.obj: ..\..\src\univ\ctrlrend.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\ctrlrend.cpp + +$(OBJS)\coredll_univ_dialog.obj: ..\..\src\univ\dialog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\dialog.cpp + +$(OBJS)\coredll_framuniv.obj: ..\..\src\univ\framuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\framuniv.cpp + +$(OBJS)\coredll_univ_gauge.obj: ..\..\src\univ\gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\gauge.cpp + +$(OBJS)\coredll_inpcons.obj: ..\..\src\univ\inpcons.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\inpcons.cpp + +$(OBJS)\coredll_inphand.obj: ..\..\src\univ\inphand.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\inphand.cpp + +$(OBJS)\coredll_univ_listbox.obj: ..\..\src\univ\listbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\listbox.cpp + +$(OBJS)\coredll_univ_menu.obj: ..\..\src\univ\menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\menu.cpp + +$(OBJS)\coredll_univ_notebook.obj: ..\..\src\univ\notebook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\notebook.cpp + +$(OBJS)\coredll_univ_radiobox.obj: ..\..\src\univ\radiobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\radiobox.cpp + +$(OBJS)\coredll_univ_radiobut.obj: ..\..\src\univ\radiobut.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\radiobut.cpp + +$(OBJS)\coredll_scrarrow.obj: ..\..\src\univ\scrarrow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\scrarrow.cpp + +$(OBJS)\coredll_univ_scrolbar.obj: ..\..\src\univ\scrolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\scrolbar.cpp + +$(OBJS)\coredll_scrthumb.obj: ..\..\src\univ\scrthumb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\scrthumb.cpp + +$(OBJS)\coredll_settingsuniv.obj: ..\..\src\univ\settingsuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\settingsuniv.cpp + +$(OBJS)\coredll_univ_slider.obj: ..\..\src\univ\slider.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\slider.cpp + +$(OBJS)\coredll_univ_spinbutt.obj: ..\..\src\univ\spinbutt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\spinbutt.cpp + +$(OBJS)\coredll_univ_statbmp.obj: ..\..\src\univ\statbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\statbmp.cpp + +$(OBJS)\coredll_univ_statbox.obj: ..\..\src\univ\statbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\statbox.cpp + +$(OBJS)\coredll_univ_statline.obj: ..\..\src\univ\statline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\statline.cpp + +$(OBJS)\coredll_univ_stattext.obj: ..\..\src\univ\stattext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\stattext.cpp + +$(OBJS)\coredll_univ_statusbr.obj: ..\..\src\univ\statusbr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\statusbr.cpp + +$(OBJS)\coredll_stdrend.obj: ..\..\src\univ\stdrend.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\stdrend.cpp + +$(OBJS)\coredll_univ_textctrl.obj: ..\..\src\univ\textctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\textctrl.cpp + +$(OBJS)\coredll_univ_tglbtn.obj: ..\..\src\univ\tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\tglbtn.cpp + +$(OBJS)\coredll_theme.obj: ..\..\src\univ\theme.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\theme.cpp + +$(OBJS)\coredll_univ_toolbar.obj: ..\..\src\univ\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\toolbar.cpp + +$(OBJS)\coredll_topluniv.obj: ..\..\src\univ\topluniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\topluniv.cpp + +$(OBJS)\coredll_winuniv.obj: ..\..\src\univ\winuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\winuniv.cpp + +$(OBJS)\coredll_gtk.obj: ..\..\src\univ\themes\gtk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\themes\gtk.cpp + +$(OBJS)\coredll_metal.obj: ..\..\src\univ\themes\metal.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\themes\metal.cpp + +$(OBJS)\coredll_mono.obj: ..\..\src\univ\themes\mono.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\themes\mono.cpp + +$(OBJS)\coredll_win32.obj: ..\..\src\univ\themes\win32.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\univ\themes\win32.cpp + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_activex.obj: ..\..\src\msw\ole\activex.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\activex.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_app.obj: ..\..\src\msw\app.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\app.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_bitmap.obj: ..\..\src\msw\bitmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\bitmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_brush.obj: ..\..\src\msw\brush.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\brush.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_caret.obj: ..\..\src\msw\caret.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\caret.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_clipbrd.obj: ..\..\src\msw\clipbrd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\clipbrd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_colour.obj: ..\..\src\msw\colour.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\colour.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_cursor.obj: ..\..\src\msw\cursor.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\cursor.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_data.obj: ..\..\src\msw\data.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\data.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dc.obj: ..\..\src\msw\dc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcclient.obj: ..\..\src\msw\dcclient.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dcclient.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcmemory.obj: ..\..\src\msw\dcmemory.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dcmemory.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcprint.obj: ..\..\src\msw\dcprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dcprint.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcscreen.obj: ..\..\src\msw\dcscreen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dcscreen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dialup.obj: ..\..\src\msw\dialup.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dialup.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dib.obj: ..\..\src\msw\dib.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\dib.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_display.obj: ..\..\src\msw\display.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\display.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_enhmeta.obj: ..\..\src\msw\enhmeta.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\enhmeta.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_font.obj: ..\..\src\msw\font.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\font.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontenum.obj: ..\..\src\msw\fontenum.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\fontenum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontutil.obj: ..\..\src\msw\fontutil.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\fontutil.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gdiimage.obj: ..\..\src\msw\gdiimage.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\gdiimage.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gdiobj.obj: ..\..\src\msw\gdiobj.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\gdiobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gdiplus.obj: ..\..\src\msw\gdiplus.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\gdiplus.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_graphics.obj: ..\..\src\msw\graphics.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\graphics.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_icon.obj: ..\..\src\msw\icon.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\icon.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imaglist.obj: ..\..\src\msw\imaglist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\imaglist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_minifram.obj: ..\..\src\msw\minifram.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\minifram.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_nonownedwnd.obj: ..\..\src\msw\nonownedwnd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\nonownedwnd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dataobj.obj: ..\..\src\msw\ole\dataobj.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\dataobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dropsrc.obj: ..\..\src\msw\ole\dropsrc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\dropsrc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_droptgt.obj: ..\..\src\msw\ole\droptgt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\droptgt.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_oleutils.obj: ..\..\src\msw\ole\oleutils.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\oleutils.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_safearray.obj: ..\..\src\msw\ole\safearray.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\safearray.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_palette.obj: ..\..\src\msw\palette.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\palette.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_pen.obj: ..\..\src\msw\pen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\pen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_popupwin.obj: ..\..\src\msw\popupwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\popupwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_printdlg.obj: ..\..\src\msw\printdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\printdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_printwin.obj: ..\..\src\msw\printwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\printwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_region.obj: ..\..\src\msw\region.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\region.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_renderer.obj: ..\..\src\msw\renderer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\renderer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_settings.obj: ..\..\src\msw\settings.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\settings.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_textmeasure.obj: ..\..\src\msw\textmeasure.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\textmeasure.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_tooltip.obj: ..\..\src\msw\tooltip.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\tooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_toplevel.obj: ..\..\src\msw\toplevel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\toplevel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_uiaction.obj: ..\..\src\msw\uiaction.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\uiaction.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_utilsgui.obj: ..\..\src\msw\utilsgui.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\utilsgui.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_utilswin.obj: ..\..\src\msw\utilswin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\utilswin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_uxtheme.obj: ..\..\src\msw\uxtheme.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\uxtheme.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_window.obj: ..\..\src\msw\window.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\window.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_helpchm.obj: ..\..\src\msw\helpchm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\helpchm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_helpwin.obj: ..\..\src\msw\helpwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\helpwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_automtn.obj: ..\..\src\msw\ole\automtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\automtn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_uuid.obj: ..\..\src\msw\ole\uuid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\ole\uuid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_clrpickerg.obj: ..\..\src\generic\clrpickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\clrpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_collpaneg.obj: ..\..\src\generic\collpaneg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\collpaneg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_filepickerg.obj: ..\..\src\generic\filepickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\filepickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontpickerg.obj: ..\..\src\generic\fontpickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\fontpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_prntdlgg.obj: ..\..\src\generic\prntdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\prntdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_evtloop.obj: ..\..\src\msw\evtloop.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\evtloop.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_accelcmn.obj: ..\..\src\common\accelcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\accelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_accesscmn.obj: ..\..\src\common\accesscmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\accesscmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_anidecod.obj: ..\..\src\common\anidecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\anidecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_affinematrix2d.obj: ..\..\src\common\affinematrix2d.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\affinematrix2d.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_appcmn.obj: ..\..\src\common\appcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\appcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_artprov.obj: ..\..\src\common\artprov.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\artprov.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_artstd.obj: ..\..\src\common\artstd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\artstd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_bmpbase.obj: ..\..\src\common\bmpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\bmpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_bmpbtncmn.obj: ..\..\src\common\bmpbtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\bmpbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_bookctrl.obj: ..\..\src\common\bookctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\bookctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_btncmn.obj: ..\..\src\common\btncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\btncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_cairo.obj: ..\..\src\common\cairo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\cairo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_checkboxcmn.obj: ..\..\src\common\checkboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\checkboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_checklstcmn.obj: ..\..\src\common\checklstcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\checklstcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_choiccmn.obj: ..\..\src\common\choiccmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\choiccmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_clipcmn.obj: ..\..\src\common\clipcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\clipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_clrpickercmn.obj: ..\..\src\common\clrpickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\clrpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_colourcmn.obj: ..\..\src\common\colourcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\colourcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_colourdata.obj: ..\..\src\common\colourdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\colourdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_combocmn.obj: ..\..\src\common\combocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\combocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_cmdproc.obj: ..\..\src\common\cmdproc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\cmdproc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_cmndata.obj: ..\..\src\common\cmndata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\cmndata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_containr.obj: ..\..\src\common\containr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\containr.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_cshelp.obj: ..\..\src\common\cshelp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\cshelp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_ctrlcmn.obj: ..\..\src\common\ctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\ctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_ctrlsub.obj: ..\..\src\common\ctrlsub.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\ctrlsub.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcbase.obj: ..\..\src\common\dcbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dcbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcbufcmn.obj: ..\..\src\common\dcbufcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dcbufcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcgraph.obj: ..\..\src\common\dcgraph.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dcgraph.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcsvg.obj: ..\..\src\common\dcsvg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dcsvg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dirctrlcmn.obj: ..\..\src\common\dirctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dirctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dlgcmn.obj: ..\..\src\common\dlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dndcmn.obj: ..\..\src\common\dndcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dndcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dobjcmn.obj: ..\..\src\common\dobjcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dobjcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_docmdi.obj: ..\..\src\common\docmdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\docmdi.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_docview.obj: ..\..\src\common\docview.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\docview.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dpycmn.obj: ..\..\src\common\dpycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dpycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dseldlg.obj: ..\..\src\common\dseldlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\dseldlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_effects.obj: ..\..\src\common\effects.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\effects.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fddlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filepickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontpickercmn.obj: ..\..\src\common\fontpickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fldlgcmn.obj: ..\..\src\common\fldlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fldlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontcmn.obj: ..\..\src\common\fontcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontdata.obj: ..\..\src\common\fontdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_graphicc.obj: ..\..\src\generic\graphicc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\graphicc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontenumcmn.obj: ..\..\src\common\fontenumcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontenumcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontmap.obj: ..\..\src\common\fontmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_fontutilcmn.obj: ..\..\src\common\fontutilcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\fontutilcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_framecmn.obj: ..\..\src\common\framecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\framecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gaugecmn.obj: ..\..\src\common\gaugecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\gaugecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gbsizer.obj: ..\..\src\common\gbsizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\gbsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gdicmn.obj: ..\..\src\common\gdicmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\gdicmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_geometry.obj: ..\..\src\common\geometry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\geometry.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_gifdecod.obj: ..\..\src\common\gifdecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\gifdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_graphcmn.obj: ..\..\src\common\graphcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\graphcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_headercolcmn.obj: ..\..\src\common\headercolcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\headercolcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_headerctrlcmn.obj: ..\..\src\common\headerctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\headerctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_helpbase.obj: ..\..\src\common\helpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\helpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_iconbndl.obj: ..\..\src\common\iconbndl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\iconbndl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagall.obj: ..\..\src\common\imagall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagall.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagbmp.obj: ..\..\src\common\imagbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagbmp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_image.obj: ..\..\src\common\image.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\image.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagfill.obj: ..\..\src\common\imagfill.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagfill.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imaggif.obj: ..\..\src\common\imaggif.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imaggif.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagiff.obj: ..\..\src\common\imagiff.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagjpeg.obj: ..\..\src\common\imagjpeg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagjpeg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagpcx.obj: ..\..\src\common\imagpcx.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagpcx.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagpng.obj: ..\..\src\common\imagpng.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagpng.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagpnm.obj: ..\..\src\common\imagpnm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagpnm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagtga.obj: ..\..\src\common\imagtga.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagtga.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagtiff.obj: ..\..\src\common\imagtiff.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagtiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_imagxpm.obj: ..\..\src\common\imagxpm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\imagxpm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_layout.obj: ..\..\src\common\layout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\layout.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_lboxcmn.obj: ..\..\src\common\lboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\lboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_listctrlcmn.obj: ..\..\src\common\listctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\listctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_markupparser.obj: ..\..\src\common\markupparser.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\markupparser.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_matrix.obj: ..\..\src\common\matrix.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\matrix.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_menucmn.obj: ..\..\src\common\menucmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\menucmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_modalhook.obj: ..\..\src\common\modalhook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\modalhook.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_mousemanager.obj: ..\..\src\common\mousemanager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\mousemanager.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_nbkbase.obj: ..\..\src\common\nbkbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\nbkbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\overlaycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_ownerdrwcmn.obj: ..\..\src\common\ownerdrwcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\ownerdrwcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_paper.obj: ..\..\src\common\paper.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\paper.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_panelcmn.obj: ..\..\src\common\panelcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\panelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_persist.obj: ..\..\src\common\persist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\persist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_pickerbase.obj: ..\..\src\common\pickerbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\pickerbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_popupcmn.obj: ..\..\src\common\popupcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\popupcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_preferencescmn.obj: ..\..\src\common\preferencescmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\preferencescmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_prntbase.obj: ..\..\src\common\prntbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\prntbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_quantize.obj: ..\..\src\common\quantize.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\quantize.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_radiobtncmn.obj: ..\..\src\common\radiobtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\radiobtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_radiocmn.obj: ..\..\src\common\radiocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\radiocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_rearrangectrl.obj: ..\..\src\common\rearrangectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\rearrangectrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_rendcmn.obj: ..\..\src\common\rendcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\rendcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_rgncmn.obj: ..\..\src\common\rgncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\rgncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_scrolbarcmn.obj: ..\..\src\common\scrolbarcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\scrolbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_settcmn.obj: ..\..\src\common\settcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\settcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_sizer.obj: ..\..\src\common\sizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\sizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_slidercmn.obj: ..\..\src\common\slidercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\slidercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_spinbtncmn.obj: ..\..\src\common\spinbtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\spinbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_spinctrlcmn.obj: ..\..\src\common\spinctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\spinctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_srchcmn.obj: ..\..\src\common\srchcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\srchcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_statbar.obj: ..\..\src\common\statbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\statbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_statbmpcmn.obj: ..\..\src\common\statbmpcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\statbmpcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_statboxcmn.obj: ..\..\src\common\statboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\statboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_statlinecmn.obj: ..\..\src\common\statlinecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\statlinecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_stattextcmn.obj: ..\..\src\common\stattextcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\stattextcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_stockitem.obj: ..\..\src\common\stockitem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\stockitem.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_tbarbase.obj: ..\..\src\common\tbarbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\tbarbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_textcmn.obj: ..\..\src\common\textcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\textcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_textentrycmn.obj: ..\..\src\common\textentrycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\textentrycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_textmeasurecmn.obj: ..\..\src\common\textmeasurecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\textmeasurecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_toplvcmn.obj: ..\..\src\common\toplvcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\toplvcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_treebase.obj: ..\..\src\common\treebase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\treebase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_uiactioncmn.obj: ..\..\src\common\uiactioncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\uiactioncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_valgen.obj: ..\..\src\common\valgen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\valgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_validate.obj: ..\..\src\common\validate.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\validate.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_valtext.obj: ..\..\src\common\valtext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\valtext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_valnum.obj: ..\..\src\common\valnum.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\valnum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_wincmn.obj: ..\..\src\common\wincmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\wincmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_windowid.obj: ..\..\src\common\windowid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\windowid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_wrapsizer.obj: ..\..\src\common\wrapsizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\wrapsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_xpmdecod.obj: ..\..\src\common\xpmdecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\xpmdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_busyinfo.obj: ..\..\src\generic\busyinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\busyinfo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_buttonbar.obj: ..\..\src\generic\buttonbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\buttonbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_choicdgg.obj: ..\..\src\generic\choicdgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\choicdgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_choicbkg.obj: ..\..\src\generic\choicbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\choicbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_combog.obj: ..\..\src\generic\combog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\combog.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dcpsg.obj: ..\..\src\generic\dcpsg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\dcpsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dirctrlg.obj: ..\..\src\generic\dirctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\dirctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_dragimgg.obj: ..\..\src\generic\dragimgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\dragimgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_filectrlg.obj: ..\..\src\generic\filectrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\filectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_infobar.obj: ..\..\src\generic\infobar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\infobar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_listbkg.obj: ..\..\src\generic\listbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\listbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_logg.obj: ..\..\src\generic\logg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\logg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_markuptext.obj: ..\..\src\generic\markuptext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\markuptext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_msgdlgg.obj: ..\..\src\generic\msgdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\msgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_numdlgg.obj: ..\..\src\generic\numdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\numdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_progdlgg.obj: ..\..\src\generic\progdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\progdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_preferencesg.obj: ..\..\src\generic\preferencesg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\preferencesg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_printps.obj: ..\..\src\generic\printps.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\printps.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_renderg.obj: ..\..\src\generic\renderg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\renderg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_richmsgdlgg.obj: ..\..\src\generic\richmsgdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\richmsgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_scrlwing.obj: ..\..\src\generic\scrlwing.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\scrlwing.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_selstore.obj: ..\..\src\generic\selstore.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\selstore.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_spinctlg.obj: ..\..\src\generic\spinctlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\spinctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_splitter.obj: ..\..\src\generic\splitter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\splitter.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_srchctlg.obj: ..\..\src\generic\srchctlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\srchctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_statbmpg.obj: ..\..\src\generic\statbmpg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\statbmpg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_stattextg.obj: ..\..\src\generic\stattextg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\stattextg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_textdlgg.obj: ..\..\src\generic\textdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\textdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_tipwin.obj: ..\..\src\generic\tipwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\tipwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_toolbkg.obj: ..\..\src\generic\toolbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\toolbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_treectlg.obj: ..\..\src\generic\treectlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\treectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_treebkg.obj: ..\..\src\generic\treebkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\treebkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_vlbox.obj: ..\..\src\generic\vlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\vlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_vscroll.obj: ..\..\src\generic\vscroll.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\vscroll.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_xmlreshandler.obj: ..\..\src\xrc\xmlreshandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\xrc\xmlreshandler.cpp +!endif + +$(OBJS)\corelib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\corelib_event.obj: ..\..\src\common\event.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\event.cpp + +$(OBJS)\corelib_fs_mem.obj: ..\..\src\common\fs_mem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fs_mem.cpp + +$(OBJS)\corelib_msgout.obj: ..\..\src\common\msgout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\msgout.cpp + +$(OBJS)\corelib_utilscmn.obj: ..\..\src\common\utilscmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\utilscmn.cpp + +$(OBJS)\corelib_main.obj: ..\..\src\msw\main.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\main.cpp + +$(OBJS)\corelib_mslu.obj: ..\..\src\msw\mslu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\mslu.cpp + +$(OBJS)\corelib_volume.obj: ..\..\src\msw\volume.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\volume.cpp + +$(OBJS)\corelib_generic_statusbr.obj: ..\..\src\generic\statusbr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\statusbr.cpp + +$(OBJS)\corelib_msw_accel.obj: ..\..\src\msw\accel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\accel.cpp + +$(OBJS)\corelib_anybutton.obj: ..\..\src\msw\anybutton.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\anybutton.cpp + +$(OBJS)\corelib_artmsw.obj: ..\..\src\msw\artmsw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\artmsw.cpp + +$(OBJS)\corelib_msw_bmpbuttn.obj: ..\..\src\msw\bmpbuttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\bmpbuttn.cpp + +$(OBJS)\corelib_msw_button.obj: ..\..\src\msw\button.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\button.cpp + +$(OBJS)\corelib_msw_checkbox.obj: ..\..\src\msw\checkbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\checkbox.cpp + +$(OBJS)\corelib_msw_choice.obj: ..\..\src\msw\choice.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\choice.cpp + +$(OBJS)\corelib_colordlg.obj: ..\..\src\msw\colordlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\colordlg.cpp + +$(OBJS)\corelib_combo.obj: ..\..\src\msw\combo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\combo.cpp + +$(OBJS)\corelib_msw_combobox.obj: ..\..\src\msw\combobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\combobox.cpp + +$(OBJS)\corelib_msw_control.obj: ..\..\src\msw\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\control.cpp + +$(OBJS)\corelib_msw_dialog.obj: ..\..\src\msw\dialog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dialog.cpp + +$(OBJS)\corelib_dirdlg.obj: ..\..\src\msw\dirdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dirdlg.cpp + +$(OBJS)\corelib_dragimag.obj: ..\..\src\msw\dragimag.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dragimag.cpp + +$(OBJS)\corelib_filedlg.obj: ..\..\src\msw\filedlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\filedlg.cpp + +$(OBJS)\corelib_frame.obj: ..\..\src\msw\frame.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\frame.cpp + +$(OBJS)\corelib_msw_gauge.obj: ..\..\src\msw\gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\gauge.cpp + +$(OBJS)\corelib_headerctrl.obj: ..\..\src\msw\headerctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\headerctrl.cpp + +$(OBJS)\corelib_iniconf.obj: ..\..\src\msw\iniconf.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\iniconf.cpp + +$(OBJS)\corelib_msw_listbox.obj: ..\..\src\msw\listbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\listbox.cpp + +$(OBJS)\corelib_msw_listctrl.obj: ..\..\src\msw\listctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\listctrl.cpp + +$(OBJS)\corelib_mdi.obj: ..\..\src\msw\mdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\mdi.cpp + +$(OBJS)\corelib_msw_menu.obj: ..\..\src\msw\menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\menu.cpp + +$(OBJS)\corelib_menuitem.obj: ..\..\src\msw\menuitem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\menuitem.cpp + +$(OBJS)\corelib_metafile.obj: ..\..\src\msw\metafile.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\metafile.cpp + +$(OBJS)\corelib_msgdlg.obj: ..\..\src\msw\msgdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\msgdlg.cpp + +$(OBJS)\corelib_nativdlg.obj: ..\..\src\msw\nativdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\nativdlg.cpp + +$(OBJS)\corelib_nativewin.obj: ..\..\src\msw\nativewin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\nativewin.cpp + +$(OBJS)\corelib_msw_notebook.obj: ..\..\src\msw\notebook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\notebook.cpp + +$(OBJS)\corelib_access.obj: ..\..\src\msw\ole\access.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\access.cpp + +$(OBJS)\corelib_ownerdrw.obj: ..\..\src\msw\ownerdrw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ownerdrw.cpp + +$(OBJS)\corelib_panel.obj: ..\..\src\msw\panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\panel.cpp + +$(OBJS)\corelib_progdlg.obj: ..\..\src\msw\progdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\progdlg.cpp + +$(OBJS)\corelib_msw_radiobox.obj: ..\..\src\msw\radiobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\radiobox.cpp + +$(OBJS)\corelib_msw_radiobut.obj: ..\..\src\msw\radiobut.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\radiobut.cpp + +$(OBJS)\corelib_richmsgdlg.obj: ..\..\src\msw\richmsgdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\richmsgdlg.cpp + +$(OBJS)\corelib_msw_scrolbar.obj: ..\..\src\msw\scrolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\scrolbar.cpp + +$(OBJS)\corelib_msw_slider.obj: ..\..\src\msw\slider.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\slider.cpp + +$(OBJS)\corelib_msw_spinbutt.obj: ..\..\src\msw\spinbutt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\spinbutt.cpp + +$(OBJS)\corelib_spinctrl.obj: ..\..\src\msw\spinctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\spinctrl.cpp + +$(OBJS)\corelib_msw_statbmp.obj: ..\..\src\msw\statbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\statbmp.cpp + +$(OBJS)\corelib_msw_statbox.obj: ..\..\src\msw\statbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\statbox.cpp + +$(OBJS)\corelib_statusbar.obj: ..\..\src\msw\statusbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\statusbar.cpp + +$(OBJS)\corelib_msw_statline.obj: ..\..\src\msw\statline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\statline.cpp + +$(OBJS)\corelib_msw_stattext.obj: ..\..\src\msw\stattext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\stattext.cpp + +$(OBJS)\corelib_msw_toolbar.obj: ..\..\src\msw\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\toolbar.cpp + +$(OBJS)\corelib_msw_textctrl.obj: ..\..\src\msw\textctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\textctrl.cpp + +$(OBJS)\corelib_textentry.obj: ..\..\src\msw\textentry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\textentry.cpp + +$(OBJS)\corelib_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\tglbtn.cpp + +$(OBJS)\corelib_treectrl.obj: ..\..\src\msw\treectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\treectrl.cpp + +$(OBJS)\corelib_msw_checklst.obj: ..\..\src\msw\checklst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\checklst.cpp + +$(OBJS)\corelib_msw_fdrepdlg.obj: ..\..\src\msw\fdrepdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\fdrepdlg.cpp + +$(OBJS)\corelib_fontdlg.obj: ..\..\src\msw\fontdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\fontdlg.cpp + +$(OBJS)\corelib_generic_accel.obj: ..\..\src\generic\accel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\accel.cpp + +$(OBJS)\corelib_colrdlgg.obj: ..\..\src\generic\colrdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\colrdlgg.cpp + +$(OBJS)\corelib_dirdlgg.obj: ..\..\src\generic\dirdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\dirdlgg.cpp + +$(OBJS)\corelib_generic_fdrepdlg.obj: ..\..\src\generic\fdrepdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\fdrepdlg.cpp + +$(OBJS)\corelib_filedlgg.obj: ..\..\src\generic\filedlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\filedlgg.cpp + +$(OBJS)\corelib_fontdlgg.obj: ..\..\src\generic\fontdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\fontdlgg.cpp + +$(OBJS)\corelib_generic_listctrl.obj: ..\..\src\generic\listctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\listctrl.cpp + +$(OBJS)\corelib_mdig.obj: ..\..\src\generic\mdig.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\mdig.cpp + +$(OBJS)\corelib_univ_bmpbuttn.obj: ..\..\src\univ\bmpbuttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\bmpbuttn.cpp + +$(OBJS)\corelib_univ_button.obj: ..\..\src\univ\button.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\button.cpp + +$(OBJS)\corelib_univ_checkbox.obj: ..\..\src\univ\checkbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\checkbox.cpp + +$(OBJS)\corelib_univ_checklst.obj: ..\..\src\univ\checklst.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\checklst.cpp + +$(OBJS)\corelib_univ_choice.obj: ..\..\src\univ\choice.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\choice.cpp + +$(OBJS)\corelib_univ_combobox.obj: ..\..\src\univ\combobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\combobox.cpp + +$(OBJS)\corelib_univ_control.obj: ..\..\src\univ\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\control.cpp + +$(OBJS)\corelib_ctrlrend.obj: ..\..\src\univ\ctrlrend.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\ctrlrend.cpp + +$(OBJS)\corelib_univ_dialog.obj: ..\..\src\univ\dialog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\dialog.cpp + +$(OBJS)\corelib_framuniv.obj: ..\..\src\univ\framuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\framuniv.cpp + +$(OBJS)\corelib_univ_gauge.obj: ..\..\src\univ\gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\gauge.cpp + +$(OBJS)\corelib_inpcons.obj: ..\..\src\univ\inpcons.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\inpcons.cpp + +$(OBJS)\corelib_inphand.obj: ..\..\src\univ\inphand.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\inphand.cpp + +$(OBJS)\corelib_univ_listbox.obj: ..\..\src\univ\listbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\listbox.cpp + +$(OBJS)\corelib_univ_menu.obj: ..\..\src\univ\menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\menu.cpp + +$(OBJS)\corelib_univ_notebook.obj: ..\..\src\univ\notebook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\notebook.cpp + +$(OBJS)\corelib_univ_radiobox.obj: ..\..\src\univ\radiobox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\radiobox.cpp + +$(OBJS)\corelib_univ_radiobut.obj: ..\..\src\univ\radiobut.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\radiobut.cpp + +$(OBJS)\corelib_scrarrow.obj: ..\..\src\univ\scrarrow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\scrarrow.cpp + +$(OBJS)\corelib_univ_scrolbar.obj: ..\..\src\univ\scrolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\scrolbar.cpp + +$(OBJS)\corelib_scrthumb.obj: ..\..\src\univ\scrthumb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\scrthumb.cpp + +$(OBJS)\corelib_settingsuniv.obj: ..\..\src\univ\settingsuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\settingsuniv.cpp + +$(OBJS)\corelib_univ_slider.obj: ..\..\src\univ\slider.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\slider.cpp + +$(OBJS)\corelib_univ_spinbutt.obj: ..\..\src\univ\spinbutt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\spinbutt.cpp + +$(OBJS)\corelib_univ_statbmp.obj: ..\..\src\univ\statbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\statbmp.cpp + +$(OBJS)\corelib_univ_statbox.obj: ..\..\src\univ\statbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\statbox.cpp + +$(OBJS)\corelib_univ_statline.obj: ..\..\src\univ\statline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\statline.cpp + +$(OBJS)\corelib_univ_stattext.obj: ..\..\src\univ\stattext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\stattext.cpp + +$(OBJS)\corelib_univ_statusbr.obj: ..\..\src\univ\statusbr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\statusbr.cpp + +$(OBJS)\corelib_stdrend.obj: ..\..\src\univ\stdrend.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\stdrend.cpp + +$(OBJS)\corelib_univ_textctrl.obj: ..\..\src\univ\textctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\textctrl.cpp + +$(OBJS)\corelib_univ_tglbtn.obj: ..\..\src\univ\tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\tglbtn.cpp + +$(OBJS)\corelib_theme.obj: ..\..\src\univ\theme.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\theme.cpp + +$(OBJS)\corelib_univ_toolbar.obj: ..\..\src\univ\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\toolbar.cpp + +$(OBJS)\corelib_topluniv.obj: ..\..\src\univ\topluniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\topluniv.cpp + +$(OBJS)\corelib_winuniv.obj: ..\..\src\univ\winuniv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\winuniv.cpp + +$(OBJS)\corelib_gtk.obj: ..\..\src\univ\themes\gtk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\themes\gtk.cpp + +$(OBJS)\corelib_metal.obj: ..\..\src\univ\themes\metal.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\themes\metal.cpp + +$(OBJS)\corelib_mono.obj: ..\..\src\univ\themes\mono.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\themes\mono.cpp + +$(OBJS)\corelib_win32.obj: ..\..\src\univ\themes\win32.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\univ\themes\win32.cpp + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_activex.obj: ..\..\src\msw\ole\activex.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\activex.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_app.obj: ..\..\src\msw\app.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\app.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_bitmap.obj: ..\..\src\msw\bitmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\bitmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_brush.obj: ..\..\src\msw\brush.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\brush.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_caret.obj: ..\..\src\msw\caret.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\caret.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_clipbrd.obj: ..\..\src\msw\clipbrd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\clipbrd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_colour.obj: ..\..\src\msw\colour.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\colour.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_cursor.obj: ..\..\src\msw\cursor.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\cursor.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_data.obj: ..\..\src\msw\data.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\data.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dc.obj: ..\..\src\msw\dc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcclient.obj: ..\..\src\msw\dcclient.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dcclient.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcmemory.obj: ..\..\src\msw\dcmemory.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dcmemory.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcprint.obj: ..\..\src\msw\dcprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dcprint.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcscreen.obj: ..\..\src\msw\dcscreen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dcscreen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dialup.obj: ..\..\src\msw\dialup.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dialup.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dib.obj: ..\..\src\msw\dib.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\dib.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_display.obj: ..\..\src\msw\display.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\display.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_enhmeta.obj: ..\..\src\msw\enhmeta.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\enhmeta.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_font.obj: ..\..\src\msw\font.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\font.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontenum.obj: ..\..\src\msw\fontenum.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\fontenum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontutil.obj: ..\..\src\msw\fontutil.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\fontutil.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gdiimage.obj: ..\..\src\msw\gdiimage.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\gdiimage.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gdiobj.obj: ..\..\src\msw\gdiobj.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\gdiobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gdiplus.obj: ..\..\src\msw\gdiplus.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\gdiplus.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_graphics.obj: ..\..\src\msw\graphics.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\graphics.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_icon.obj: ..\..\src\msw\icon.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\icon.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imaglist.obj: ..\..\src\msw\imaglist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\imaglist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_minifram.obj: ..\..\src\msw\minifram.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\minifram.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_nonownedwnd.obj: ..\..\src\msw\nonownedwnd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\nonownedwnd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dataobj.obj: ..\..\src\msw\ole\dataobj.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\dataobj.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dropsrc.obj: ..\..\src\msw\ole\dropsrc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\dropsrc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_droptgt.obj: ..\..\src\msw\ole\droptgt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\droptgt.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_oleutils.obj: ..\..\src\msw\ole\oleutils.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\oleutils.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_safearray.obj: ..\..\src\msw\ole\safearray.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\safearray.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_palette.obj: ..\..\src\msw\palette.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\palette.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_pen.obj: ..\..\src\msw\pen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\pen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_popupwin.obj: ..\..\src\msw\popupwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\popupwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_printdlg.obj: ..\..\src\msw\printdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\printdlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_printwin.obj: ..\..\src\msw\printwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\printwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_region.obj: ..\..\src\msw\region.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\region.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_renderer.obj: ..\..\src\msw\renderer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\renderer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_settings.obj: ..\..\src\msw\settings.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\settings.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_textmeasure.obj: ..\..\src\msw\textmeasure.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\textmeasure.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_tooltip.obj: ..\..\src\msw\tooltip.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\tooltip.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_toplevel.obj: ..\..\src\msw\toplevel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\toplevel.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_uiaction.obj: ..\..\src\msw\uiaction.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\uiaction.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_utilsgui.obj: ..\..\src\msw\utilsgui.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\utilsgui.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_utilswin.obj: ..\..\src\msw\utilswin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\utilswin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_uxtheme.obj: ..\..\src\msw\uxtheme.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\uxtheme.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_window.obj: ..\..\src\msw\window.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\window.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_helpchm.obj: ..\..\src\msw\helpchm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\helpchm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_helpwin.obj: ..\..\src\msw\helpwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\helpwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_automtn.obj: ..\..\src\msw\ole\automtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\automtn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_uuid.obj: ..\..\src\msw\ole\uuid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\ole\uuid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_clrpickerg.obj: ..\..\src\generic\clrpickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\clrpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_collpaneg.obj: ..\..\src\generic\collpaneg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\collpaneg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_filepickerg.obj: ..\..\src\generic\filepickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\filepickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontpickerg.obj: ..\..\src\generic\fontpickerg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\fontpickerg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_prntdlgg.obj: ..\..\src\generic\prntdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\prntdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_evtloop.obj: ..\..\src\msw\evtloop.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\evtloop.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_accelcmn.obj: ..\..\src\common\accelcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\accelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_accesscmn.obj: ..\..\src\common\accesscmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\accesscmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_anidecod.obj: ..\..\src\common\anidecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\anidecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_affinematrix2d.obj: ..\..\src\common\affinematrix2d.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\affinematrix2d.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_appcmn.obj: ..\..\src\common\appcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\appcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_artprov.obj: ..\..\src\common\artprov.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\artprov.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_artstd.obj: ..\..\src\common\artstd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\artstd.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_bmpbase.obj: ..\..\src\common\bmpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\bmpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_bmpbtncmn.obj: ..\..\src\common\bmpbtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\bmpbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_bookctrl.obj: ..\..\src\common\bookctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\bookctrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_btncmn.obj: ..\..\src\common\btncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\btncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_cairo.obj: ..\..\src\common\cairo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\cairo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_checkboxcmn.obj: ..\..\src\common\checkboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\checkboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_checklstcmn.obj: ..\..\src\common\checklstcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\checklstcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_choiccmn.obj: ..\..\src\common\choiccmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\choiccmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_clipcmn.obj: ..\..\src\common\clipcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\clipcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_clrpickercmn.obj: ..\..\src\common\clrpickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\clrpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_colourcmn.obj: ..\..\src\common\colourcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\colourcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_colourdata.obj: ..\..\src\common\colourdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\colourdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_combocmn.obj: ..\..\src\common\combocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\combocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_cmdproc.obj: ..\..\src\common\cmdproc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\cmdproc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_cmndata.obj: ..\..\src\common\cmndata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\cmndata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_containr.obj: ..\..\src\common\containr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\containr.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_cshelp.obj: ..\..\src\common\cshelp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\cshelp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_ctrlcmn.obj: ..\..\src\common\ctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\ctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_ctrlsub.obj: ..\..\src\common\ctrlsub.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\ctrlsub.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcbase.obj: ..\..\src\common\dcbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dcbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcbufcmn.obj: ..\..\src\common\dcbufcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dcbufcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcgraph.obj: ..\..\src\common\dcgraph.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dcgraph.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcsvg.obj: ..\..\src\common\dcsvg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dcsvg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dirctrlcmn.obj: ..\..\src\common\dirctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dirctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dlgcmn.obj: ..\..\src\common\dlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dndcmn.obj: ..\..\src\common\dndcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dndcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dobjcmn.obj: ..\..\src\common\dobjcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dobjcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_docmdi.obj: ..\..\src\common\docmdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\docmdi.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_docview.obj: ..\..\src\common\docview.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\docview.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dpycmn.obj: ..\..\src\common\dpycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dpycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dseldlg.obj: ..\..\src\common\dseldlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\dseldlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_effects.obj: ..\..\src\common\effects.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\effects.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fddlgcmn.obj: ..\..\src\common\fddlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fddlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filepickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontpickercmn.obj: ..\..\src\common\fontpickercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontpickercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fldlgcmn.obj: ..\..\src\common\fldlgcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fldlgcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontcmn.obj: ..\..\src\common\fontcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontdata.obj: ..\..\src\common\fontdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontdata.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_graphicc.obj: ..\..\src\generic\graphicc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\graphicc.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontenumcmn.obj: ..\..\src\common\fontenumcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontenumcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontmap.obj: ..\..\src\common\fontmap.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontmap.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_fontutilcmn.obj: ..\..\src\common\fontutilcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\fontutilcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_framecmn.obj: ..\..\src\common\framecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\framecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gaugecmn.obj: ..\..\src\common\gaugecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\gaugecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gbsizer.obj: ..\..\src\common\gbsizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\gbsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gdicmn.obj: ..\..\src\common\gdicmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\gdicmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_geometry.obj: ..\..\src\common\geometry.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\geometry.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_gifdecod.obj: ..\..\src\common\gifdecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\gifdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_graphcmn.obj: ..\..\src\common\graphcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\graphcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_headercolcmn.obj: ..\..\src\common\headercolcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\headercolcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_headerctrlcmn.obj: ..\..\src\common\headerctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\headerctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_helpbase.obj: ..\..\src\common\helpbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\helpbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_iconbndl.obj: ..\..\src\common\iconbndl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\iconbndl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagall.obj: ..\..\src\common\imagall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagall.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagbmp.obj: ..\..\src\common\imagbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagbmp.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_image.obj: ..\..\src\common\image.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\image.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagfill.obj: ..\..\src\common\imagfill.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagfill.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imaggif.obj: ..\..\src\common\imaggif.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imaggif.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagiff.obj: ..\..\src\common\imagiff.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagjpeg.obj: ..\..\src\common\imagjpeg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagjpeg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagpcx.obj: ..\..\src\common\imagpcx.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagpcx.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagpng.obj: ..\..\src\common\imagpng.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagpng.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagpnm.obj: ..\..\src\common\imagpnm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagpnm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagtga.obj: ..\..\src\common\imagtga.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagtga.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagtiff.obj: ..\..\src\common\imagtiff.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagtiff.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_imagxpm.obj: ..\..\src\common\imagxpm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\imagxpm.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_layout.obj: ..\..\src\common\layout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\layout.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_lboxcmn.obj: ..\..\src\common\lboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\lboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_listctrlcmn.obj: ..\..\src\common\listctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\listctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_markupparser.obj: ..\..\src\common\markupparser.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\markupparser.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_matrix.obj: ..\..\src\common\matrix.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\matrix.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_menucmn.obj: ..\..\src\common\menucmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\menucmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_modalhook.obj: ..\..\src\common\modalhook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\modalhook.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_mousemanager.obj: ..\..\src\common\mousemanager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\mousemanager.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_nbkbase.obj: ..\..\src\common\nbkbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\nbkbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\overlaycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_ownerdrwcmn.obj: ..\..\src\common\ownerdrwcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\ownerdrwcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_paper.obj: ..\..\src\common\paper.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\paper.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_panelcmn.obj: ..\..\src\common\panelcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\panelcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_persist.obj: ..\..\src\common\persist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\persist.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_pickerbase.obj: ..\..\src\common\pickerbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\pickerbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_popupcmn.obj: ..\..\src\common\popupcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\popupcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_preferencescmn.obj: ..\..\src\common\preferencescmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\preferencescmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_prntbase.obj: ..\..\src\common\prntbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\prntbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_quantize.obj: ..\..\src\common\quantize.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\quantize.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_radiobtncmn.obj: ..\..\src\common\radiobtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\radiobtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_radiocmn.obj: ..\..\src\common\radiocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\radiocmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_rearrangectrl.obj: ..\..\src\common\rearrangectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\rearrangectrl.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_rendcmn.obj: ..\..\src\common\rendcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\rendcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_rgncmn.obj: ..\..\src\common\rgncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\rgncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_scrolbarcmn.obj: ..\..\src\common\scrolbarcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\scrolbarcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_settcmn.obj: ..\..\src\common\settcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\settcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_sizer.obj: ..\..\src\common\sizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\sizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_slidercmn.obj: ..\..\src\common\slidercmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\slidercmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_spinbtncmn.obj: ..\..\src\common\spinbtncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\spinbtncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_spinctrlcmn.obj: ..\..\src\common\spinctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\spinctrlcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_srchcmn.obj: ..\..\src\common\srchcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\srchcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_statbar.obj: ..\..\src\common\statbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\statbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_statbmpcmn.obj: ..\..\src\common\statbmpcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\statbmpcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_statboxcmn.obj: ..\..\src\common\statboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\statboxcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_statlinecmn.obj: ..\..\src\common\statlinecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\statlinecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_stattextcmn.obj: ..\..\src\common\stattextcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\stattextcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_stockitem.obj: ..\..\src\common\stockitem.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\stockitem.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_tbarbase.obj: ..\..\src\common\tbarbase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\tbarbase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_textcmn.obj: ..\..\src\common\textcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\textcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_textentrycmn.obj: ..\..\src\common\textentrycmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\textentrycmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_textmeasurecmn.obj: ..\..\src\common\textmeasurecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\textmeasurecmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_toplvcmn.obj: ..\..\src\common\toplvcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\toplvcmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_treebase.obj: ..\..\src\common\treebase.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\treebase.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_uiactioncmn.obj: ..\..\src\common\uiactioncmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\uiactioncmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_valgen.obj: ..\..\src\common\valgen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\valgen.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_validate.obj: ..\..\src\common\validate.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\validate.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_valtext.obj: ..\..\src\common\valtext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\valtext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_valnum.obj: ..\..\src\common\valnum.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\valnum.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_wincmn.obj: ..\..\src\common\wincmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\wincmn.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_windowid.obj: ..\..\src\common\windowid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\windowid.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_wrapsizer.obj: ..\..\src\common\wrapsizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\wrapsizer.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_xpmdecod.obj: ..\..\src\common\xpmdecod.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\xpmdecod.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_busyinfo.obj: ..\..\src\generic\busyinfo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\busyinfo.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_buttonbar.obj: ..\..\src\generic\buttonbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\buttonbar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_choicdgg.obj: ..\..\src\generic\choicdgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\choicdgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_choicbkg.obj: ..\..\src\generic\choicbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\choicbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_combog.obj: ..\..\src\generic\combog.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\combog.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dcpsg.obj: ..\..\src\generic\dcpsg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\dcpsg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dirctrlg.obj: ..\..\src\generic\dirctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\dirctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_dragimgg.obj: ..\..\src\generic\dragimgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\dragimgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_filectrlg.obj: ..\..\src\generic\filectrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\filectrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_infobar.obj: ..\..\src\generic\infobar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\infobar.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_listbkg.obj: ..\..\src\generic\listbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\listbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_logg.obj: ..\..\src\generic\logg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\logg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_markuptext.obj: ..\..\src\generic\markuptext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\markuptext.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_msgdlgg.obj: ..\..\src\generic\msgdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\msgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_numdlgg.obj: ..\..\src\generic\numdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\numdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_progdlgg.obj: ..\..\src\generic\progdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\progdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_preferencesg.obj: ..\..\src\generic\preferencesg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\preferencesg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_printps.obj: ..\..\src\generic\printps.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\printps.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_renderg.obj: ..\..\src\generic\renderg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\renderg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_richmsgdlgg.obj: ..\..\src\generic\richmsgdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\richmsgdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_scrlwing.obj: ..\..\src\generic\scrlwing.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\scrlwing.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_selstore.obj: ..\..\src\generic\selstore.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\selstore.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_spinctlg.obj: ..\..\src\generic\spinctlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\spinctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_splitter.obj: ..\..\src\generic\splitter.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\splitter.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_srchctlg.obj: ..\..\src\generic\srchctlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\srchctlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_statbmpg.obj: ..\..\src\generic\statbmpg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\statbmpg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_stattextg.obj: ..\..\src\generic\stattextg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\stattextg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_textdlgg.obj: ..\..\src\generic\textdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\textdlgg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_tipwin.obj: ..\..\src\generic\tipwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\tipwin.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_toolbkg.obj: ..\..\src\generic\toolbkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\toolbkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_treectlg.obj: ..\..\src\generic\treectlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\treectlg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_treebkg.obj: ..\..\src\generic\treebkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\treebkg.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_vlbox.obj: ..\..\src\generic\vlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\vlbox.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_vscroll.obj: ..\..\src\generic\vscroll.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\vscroll.cpp +!endif + +!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_xmlreshandler.obj: ..\..\src\xrc\xmlreshandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\xrc\xmlreshandler.cpp +!endif + +$(OBJS)\advdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\advdll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_ADV ..\..\src\msw\version.rc + +$(OBJS)\advdll_bmpcbox.obj: ..\..\src\msw\bmpcbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\bmpcbox.cpp + +$(OBJS)\advdll_calctrl.obj: ..\..\src\msw\calctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\calctrl.cpp + +$(OBJS)\advdll_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp + +$(OBJS)\advdll_datecontrols.obj: ..\..\src\msw\datecontrols.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datecontrols.cpp + +$(OBJS)\advdll_datectrl.obj: ..\..\src\msw\datectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp + +$(OBJS)\advdll_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp + +$(OBJS)\advdll_hyperlink.obj: ..\..\src\msw\hyperlink.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\hyperlink.cpp + +$(OBJS)\advdll_timectrl.obj: ..\..\src\msw\timectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\timectrl.cpp + +$(OBJS)\advdll_animatecmn.obj: ..\..\src\common\animatecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\animatecmn.cpp + +$(OBJS)\advdll_bmpcboxcmn.obj: ..\..\src\common\bmpcboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\bmpcboxcmn.cpp + +$(OBJS)\advdll_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp + +$(OBJS)\advdll_datavcmn.obj: ..\..\src\common\datavcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\datavcmn.cpp + +$(OBJS)\advdll_gridcmn.obj: ..\..\src\common\gridcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\gridcmn.cpp + +$(OBJS)\advdll_hyperlnkcmn.obj: ..\..\src\common\hyperlnkcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\hyperlnkcmn.cpp + +$(OBJS)\advdll_odcombocmn.obj: ..\..\src\common\odcombocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\odcombocmn.cpp + +$(OBJS)\advdll_richtooltipcmn.obj: ..\..\src\common\richtooltipcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\richtooltipcmn.cpp + +$(OBJS)\advdll_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\aboutdlgg.cpp + +$(OBJS)\advdll_bannerwindow.obj: ..\..\src\generic\bannerwindow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\bannerwindow.cpp + +$(OBJS)\advdll_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp + +$(OBJS)\advdll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp + +$(OBJS)\advdll_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp + +$(OBJS)\advdll_datavgen.obj: ..\..\src\generic\datavgen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\datavgen.cpp + +$(OBJS)\advdll_datectlg.obj: ..\..\src\generic\datectlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\datectlg.cpp + +$(OBJS)\advdll_editlbox.obj: ..\..\src\generic\editlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\editlbox.cpp + +$(OBJS)\advdll_grid.obj: ..\..\src\generic\grid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\grid.cpp + +$(OBJS)\advdll_gridctrl.obj: ..\..\src\generic\gridctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\gridctrl.cpp + +$(OBJS)\advdll_grideditors.obj: ..\..\src\generic\grideditors.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\grideditors.cpp + +$(OBJS)\advdll_gridsel.obj: ..\..\src\generic\gridsel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\gridsel.cpp + +$(OBJS)\advdll_helpext.obj: ..\..\src\generic\helpext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\helpext.cpp + +$(OBJS)\advdll_hyperlinkg.obj: ..\..\src\generic\hyperlinkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\hyperlinkg.cpp + +$(OBJS)\advdll_laywin.obj: ..\..\src\generic\laywin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\laywin.cpp + +$(OBJS)\advdll_notifmsgg.obj: ..\..\src\generic\notifmsgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\notifmsgg.cpp + +$(OBJS)\advdll_odcombo.obj: ..\..\src\generic\odcombo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\odcombo.cpp + +$(OBJS)\advdll_propdlg.obj: ..\..\src\generic\propdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\propdlg.cpp + +$(OBJS)\advdll_richtooltipg.obj: ..\..\src\generic\richtooltipg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\richtooltipg.cpp + +$(OBJS)\advdll_sashwin.obj: ..\..\src\generic\sashwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\sashwin.cpp + +$(OBJS)\advdll_splash.obj: ..\..\src\generic\splash.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\splash.cpp + +$(OBJS)\advdll_timectrlg.obj: ..\..\src\generic\timectrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\timectrlg.cpp + +$(OBJS)\advdll_tipdlg.obj: ..\..\src\generic\tipdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\tipdlg.cpp + +$(OBJS)\advdll_treelist.obj: ..\..\src\generic\treelist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\treelist.cpp + +$(OBJS)\advdll_wizard.obj: ..\..\src\generic\wizard.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\wizard.cpp + +$(OBJS)\advdll_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\taskbarcmn.cpp + +$(OBJS)\advdll_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp + +$(OBJS)\advdll_notifmsg.obj: ..\..\src\msw\notifmsg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\notifmsg.cpp + +$(OBJS)\advdll_richtooltip.obj: ..\..\src\msw\richtooltip.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\richtooltip.cpp + +$(OBJS)\advdll_sound.obj: ..\..\src\msw\sound.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\sound.cpp + +$(OBJS)\advdll_taskbar.obj: ..\..\src\msw\taskbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\taskbar.cpp + +$(OBJS)\advdll_joystick.obj: ..\..\src\msw\joystick.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\joystick.cpp + +$(OBJS)\advdll_animateg.obj: ..\..\src\generic\animateg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\animateg.cpp + +$(OBJS)\advlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\advlib_bmpcbox.obj: ..\..\src\msw\bmpcbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\bmpcbox.cpp + +$(OBJS)\advlib_calctrl.obj: ..\..\src\msw\calctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\calctrl.cpp + +$(OBJS)\advlib_commandlinkbutton.obj: ..\..\src\msw\commandlinkbutton.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\commandlinkbutton.cpp + +$(OBJS)\advlib_datecontrols.obj: ..\..\src\msw\datecontrols.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datecontrols.cpp + +$(OBJS)\advlib_datectrl.obj: ..\..\src\msw\datectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp + +$(OBJS)\advlib_datetimectrl.obj: ..\..\src\msw\datetimectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datetimectrl.cpp + +$(OBJS)\advlib_hyperlink.obj: ..\..\src\msw\hyperlink.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\hyperlink.cpp + +$(OBJS)\advlib_timectrl.obj: ..\..\src\msw\timectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\timectrl.cpp + +$(OBJS)\advlib_animatecmn.obj: ..\..\src\common\animatecmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\animatecmn.cpp + +$(OBJS)\advlib_bmpcboxcmn.obj: ..\..\src\common\bmpcboxcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\bmpcboxcmn.cpp + +$(OBJS)\advlib_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp + +$(OBJS)\advlib_datavcmn.obj: ..\..\src\common\datavcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\datavcmn.cpp + +$(OBJS)\advlib_gridcmn.obj: ..\..\src\common\gridcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\gridcmn.cpp + +$(OBJS)\advlib_hyperlnkcmn.obj: ..\..\src\common\hyperlnkcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\hyperlnkcmn.cpp + +$(OBJS)\advlib_odcombocmn.obj: ..\..\src\common\odcombocmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\odcombocmn.cpp + +$(OBJS)\advlib_richtooltipcmn.obj: ..\..\src\common\richtooltipcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\richtooltipcmn.cpp + +$(OBJS)\advlib_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\aboutdlgg.cpp + +$(OBJS)\advlib_bannerwindow.obj: ..\..\src\generic\bannerwindow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\bannerwindow.cpp + +$(OBJS)\advlib_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp + +$(OBJS)\advlib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp + +$(OBJS)\advlib_commandlinkbuttong.obj: ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\commandlinkbuttong.cpp + +$(OBJS)\advlib_datavgen.obj: ..\..\src\generic\datavgen.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\datavgen.cpp + +$(OBJS)\advlib_datectlg.obj: ..\..\src\generic\datectlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\datectlg.cpp + +$(OBJS)\advlib_editlbox.obj: ..\..\src\generic\editlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\editlbox.cpp + +$(OBJS)\advlib_grid.obj: ..\..\src\generic\grid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\grid.cpp + +$(OBJS)\advlib_gridctrl.obj: ..\..\src\generic\gridctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\gridctrl.cpp + +$(OBJS)\advlib_grideditors.obj: ..\..\src\generic\grideditors.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\grideditors.cpp + +$(OBJS)\advlib_gridsel.obj: ..\..\src\generic\gridsel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\gridsel.cpp + +$(OBJS)\advlib_helpext.obj: ..\..\src\generic\helpext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\helpext.cpp + +$(OBJS)\advlib_hyperlinkg.obj: ..\..\src\generic\hyperlinkg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\hyperlinkg.cpp + +$(OBJS)\advlib_laywin.obj: ..\..\src\generic\laywin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\laywin.cpp + +$(OBJS)\advlib_notifmsgg.obj: ..\..\src\generic\notifmsgg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\notifmsgg.cpp + +$(OBJS)\advlib_odcombo.obj: ..\..\src\generic\odcombo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\odcombo.cpp + +$(OBJS)\advlib_propdlg.obj: ..\..\src\generic\propdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\propdlg.cpp + +$(OBJS)\advlib_richtooltipg.obj: ..\..\src\generic\richtooltipg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\richtooltipg.cpp + +$(OBJS)\advlib_sashwin.obj: ..\..\src\generic\sashwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\sashwin.cpp + +$(OBJS)\advlib_splash.obj: ..\..\src\generic\splash.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\splash.cpp + +$(OBJS)\advlib_timectrlg.obj: ..\..\src\generic\timectrlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\timectrlg.cpp + +$(OBJS)\advlib_tipdlg.obj: ..\..\src\generic\tipdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\tipdlg.cpp + +$(OBJS)\advlib_treelist.obj: ..\..\src\generic\treelist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\treelist.cpp + +$(OBJS)\advlib_wizard.obj: ..\..\src\generic\wizard.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\wizard.cpp + +$(OBJS)\advlib_taskbarcmn.obj: ..\..\src\common\taskbarcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\taskbarcmn.cpp + +$(OBJS)\advlib_aboutdlg.obj: ..\..\src\msw\aboutdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\aboutdlg.cpp + +$(OBJS)\advlib_notifmsg.obj: ..\..\src\msw\notifmsg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\notifmsg.cpp + +$(OBJS)\advlib_richtooltip.obj: ..\..\src\msw\richtooltip.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\richtooltip.cpp + +$(OBJS)\advlib_sound.obj: ..\..\src\msw\sound.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\sound.cpp + +$(OBJS)\advlib_taskbar.obj: ..\..\src\msw\taskbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\taskbar.cpp + +$(OBJS)\advlib_joystick.obj: ..\..\src\msw\joystick.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\joystick.cpp + +$(OBJS)\advlib_animateg.obj: ..\..\src\generic\animateg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\animateg.cpp + +$(OBJS)\mediadll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\mediadll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_MEDIA ..\..\src\msw\version.rc + +$(OBJS)\mediadll_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) ..\..\src\common\mediactrlcmn.cpp + +$(OBJS)\mediadll_mediactrl_am.obj: ..\..\src\msw\mediactrl_am.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) ..\..\src\msw\mediactrl_am.cpp + +$(OBJS)\mediadll_mediactrl_wmp10.obj: ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) ..\..\src\msw\mediactrl_wmp10.cpp + +$(OBJS)\mediadll_mediactrl_qt.obj: ..\..\src\msw\mediactrl_qt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) ..\..\src\msw\mediactrl_qt.cpp + +$(OBJS)\medialib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIALIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\medialib_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIALIB_CXXFLAGS) ..\..\src\common\mediactrlcmn.cpp + +$(OBJS)\medialib_mediactrl_am.obj: ..\..\src\msw\mediactrl_am.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIALIB_CXXFLAGS) ..\..\src\msw\mediactrl_am.cpp + +$(OBJS)\medialib_mediactrl_wmp10.obj: ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIALIB_CXXFLAGS) ..\..\src\msw\mediactrl_wmp10.cpp + +$(OBJS)\medialib_mediactrl_qt.obj: ..\..\src\msw\mediactrl_qt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIALIB_CXXFLAGS) ..\..\src\msw\mediactrl_qt.cpp + +$(OBJS)\htmldll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\htmldll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_HTML ..\..\src\msw\version.rc + +$(OBJS)\htmldll_helpbest.obj: ..\..\src\msw\helpbest.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\msw\helpbest.cpp + +$(OBJS)\htmldll_helpctrl.obj: ..\..\src\html\helpctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\helpctrl.cpp + +$(OBJS)\htmldll_helpdata.obj: ..\..\src\html\helpdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\helpdata.cpp + +$(OBJS)\htmldll_helpdlg.obj: ..\..\src\html\helpdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\helpdlg.cpp + +$(OBJS)\htmldll_helpfrm.obj: ..\..\src\html\helpfrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\helpfrm.cpp + +$(OBJS)\htmldll_helpwnd.obj: ..\..\src\html\helpwnd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\helpwnd.cpp + +$(OBJS)\htmldll_htmlcell.obj: ..\..\src\html\htmlcell.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmlcell.cpp + +$(OBJS)\htmldll_htmlfilt.obj: ..\..\src\html\htmlfilt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmlfilt.cpp + +$(OBJS)\htmldll_htmlpars.obj: ..\..\src\html\htmlpars.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmlpars.cpp + +$(OBJS)\htmldll_htmltag.obj: ..\..\src\html\htmltag.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmltag.cpp + +$(OBJS)\htmldll_htmlwin.obj: ..\..\src\html\htmlwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmlwin.cpp + +$(OBJS)\htmldll_htmprint.obj: ..\..\src\html\htmprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\htmprint.cpp + +$(OBJS)\htmldll_m_dflist.obj: ..\..\src\html\m_dflist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_dflist.cpp + +$(OBJS)\htmldll_m_fonts.obj: ..\..\src\html\m_fonts.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_fonts.cpp + +$(OBJS)\htmldll_m_hline.obj: ..\..\src\html\m_hline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_hline.cpp + +$(OBJS)\htmldll_m_image.obj: ..\..\src\html\m_image.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_image.cpp + +$(OBJS)\htmldll_m_layout.obj: ..\..\src\html\m_layout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_layout.cpp + +$(OBJS)\htmldll_m_links.obj: ..\..\src\html\m_links.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_links.cpp + +$(OBJS)\htmldll_m_list.obj: ..\..\src\html\m_list.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_list.cpp + +$(OBJS)\htmldll_m_pre.obj: ..\..\src\html\m_pre.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_pre.cpp + +$(OBJS)\htmldll_m_span.obj: ..\..\src\html\m_span.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_span.cpp + +$(OBJS)\htmldll_m_style.obj: ..\..\src\html\m_style.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_style.cpp + +$(OBJS)\htmldll_m_tables.obj: ..\..\src\html\m_tables.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\m_tables.cpp + +$(OBJS)\htmldll_styleparams.obj: ..\..\src\html\styleparams.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\styleparams.cpp + +$(OBJS)\htmldll_winpars.obj: ..\..\src\html\winpars.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\html\winpars.cpp + +$(OBJS)\htmldll_htmllbox.obj: ..\..\src\generic\htmllbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\generic\htmllbox.cpp + +$(OBJS)\htmllib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\htmllib_helpbest.obj: ..\..\src\msw\helpbest.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\msw\helpbest.cpp + +$(OBJS)\htmllib_helpctrl.obj: ..\..\src\html\helpctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\helpctrl.cpp + +$(OBJS)\htmllib_helpdata.obj: ..\..\src\html\helpdata.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\helpdata.cpp + +$(OBJS)\htmllib_helpdlg.obj: ..\..\src\html\helpdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\helpdlg.cpp + +$(OBJS)\htmllib_helpfrm.obj: ..\..\src\html\helpfrm.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\helpfrm.cpp + +$(OBJS)\htmllib_helpwnd.obj: ..\..\src\html\helpwnd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\helpwnd.cpp + +$(OBJS)\htmllib_htmlcell.obj: ..\..\src\html\htmlcell.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmlcell.cpp + +$(OBJS)\htmllib_htmlfilt.obj: ..\..\src\html\htmlfilt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmlfilt.cpp + +$(OBJS)\htmllib_htmlpars.obj: ..\..\src\html\htmlpars.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmlpars.cpp + +$(OBJS)\htmllib_htmltag.obj: ..\..\src\html\htmltag.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmltag.cpp + +$(OBJS)\htmllib_htmlwin.obj: ..\..\src\html\htmlwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmlwin.cpp + +$(OBJS)\htmllib_htmprint.obj: ..\..\src\html\htmprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\htmprint.cpp + +$(OBJS)\htmllib_m_dflist.obj: ..\..\src\html\m_dflist.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_dflist.cpp + +$(OBJS)\htmllib_m_fonts.obj: ..\..\src\html\m_fonts.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_fonts.cpp + +$(OBJS)\htmllib_m_hline.obj: ..\..\src\html\m_hline.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_hline.cpp + +$(OBJS)\htmllib_m_image.obj: ..\..\src\html\m_image.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_image.cpp + +$(OBJS)\htmllib_m_layout.obj: ..\..\src\html\m_layout.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_layout.cpp + +$(OBJS)\htmllib_m_links.obj: ..\..\src\html\m_links.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_links.cpp + +$(OBJS)\htmllib_m_list.obj: ..\..\src\html\m_list.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_list.cpp + +$(OBJS)\htmllib_m_pre.obj: ..\..\src\html\m_pre.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_pre.cpp + +$(OBJS)\htmllib_m_span.obj: ..\..\src\html\m_span.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_span.cpp + +$(OBJS)\htmllib_m_style.obj: ..\..\src\html\m_style.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_style.cpp + +$(OBJS)\htmllib_m_tables.obj: ..\..\src\html\m_tables.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\m_tables.cpp + +$(OBJS)\htmllib_styleparams.obj: ..\..\src\html\styleparams.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\styleparams.cpp + +$(OBJS)\htmllib_winpars.obj: ..\..\src\html\winpars.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\html\winpars.cpp + +$(OBJS)\htmllib_htmllbox.obj: ..\..\src\generic\htmllbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLLIB_CXXFLAGS) ..\..\src\generic\htmllbox.cpp + +$(OBJS)\webviewdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\webviewdll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_WEBVIEW ..\..\src\msw\version.rc + +$(OBJS)\webviewdll_webview_ie.obj: ..\..\src\msw\webview_ie.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\msw\webview_ie.cpp + +$(OBJS)\webviewdll_webview.obj: ..\..\src\common\webview.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\common\webview.cpp + +$(OBJS)\webviewdll_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp + +$(OBJS)\webviewdll_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp + +$(OBJS)\webviewlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\webviewlib_webview_ie.obj: ..\..\src\msw\webview_ie.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\msw\webview_ie.cpp + +$(OBJS)\webviewlib_webview.obj: ..\..\src\common\webview.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\common\webview.cpp + +$(OBJS)\webviewlib_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp + +$(OBJS)\webviewlib_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp + +$(OBJS)\qadll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(QADLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\qadll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_QA ..\..\src\msw\version.rc + +$(OBJS)\qadll_debugrpt.obj: ..\..\src\common\debugrpt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(QADLL_CXXFLAGS) ..\..\src\common\debugrpt.cpp + +$(OBJS)\qadll_dbgrptg.obj: ..\..\src\generic\dbgrptg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(QADLL_CXXFLAGS) ..\..\src\generic\dbgrptg.cpp + +$(OBJS)\qalib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(QALIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\qalib_debugrpt.obj: ..\..\src\common\debugrpt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(QALIB_CXXFLAGS) ..\..\src\common\debugrpt.cpp + +$(OBJS)\qalib_dbgrptg.obj: ..\..\src\generic\dbgrptg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(QALIB_CXXFLAGS) ..\..\src\generic\dbgrptg.cpp + +$(OBJS)\xmldll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XMLDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\xmldll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXUSINGDLL /d WXMAKINGDLL_XML ..\..\src\msw\version.rc + +$(OBJS)\xmldll_xml.obj: ..\..\src\xml\xml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XMLDLL_CXXFLAGS) ..\..\src\xml\xml.cpp + +$(OBJS)\xmldll_xtixml.obj: ..\..\src\common\xtixml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XMLDLL_CXXFLAGS) ..\..\src\common\xtixml.cpp + +$(OBJS)\xmllib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XMLLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\xmllib_xml.obj: ..\..\src\xml\xml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XMLLIB_CXXFLAGS) ..\..\src\xml\xml.cpp + +$(OBJS)\xmllib_xtixml.obj: ..\..\src\common\xtixml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XMLLIB_CXXFLAGS) ..\..\src\common\xtixml.cpp + +$(OBJS)\xrcdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\xrcdll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_XRC ..\..\src\msw\version.rc + +$(OBJS)\xrcdll_xh_animatctrl.obj: ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_animatctrl.cpp + +$(OBJS)\xrcdll_xh_bannerwindow.obj: ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_bannerwindow.cpp + +$(OBJS)\xrcdll_xh_bmp.obj: ..\..\src\xrc\xh_bmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_bmp.cpp + +$(OBJS)\xrcdll_xh_bmpcbox.obj: ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_bmpcbox.cpp + +$(OBJS)\xrcdll_xh_bmpbt.obj: ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_bmpbt.cpp + +$(OBJS)\xrcdll_xh_bttn.obj: ..\..\src\xrc\xh_bttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_bttn.cpp + +$(OBJS)\xrcdll_xh_cald.obj: ..\..\src\xrc\xh_cald.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_cald.cpp + +$(OBJS)\xrcdll_xh_chckb.obj: ..\..\src\xrc\xh_chckb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_chckb.cpp + +$(OBJS)\xrcdll_xh_chckl.obj: ..\..\src\xrc\xh_chckl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_chckl.cpp + +$(OBJS)\xrcdll_xh_choic.obj: ..\..\src\xrc\xh_choic.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_choic.cpp + +$(OBJS)\xrcdll_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_choicbk.cpp + +$(OBJS)\xrcdll_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_clrpicker.cpp + +$(OBJS)\xrcdll_xh_cmdlinkbn.obj: ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_cmdlinkbn.cpp + +$(OBJS)\xrcdll_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_collpane.cpp + +$(OBJS)\xrcdll_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_combo.cpp + +$(OBJS)\xrcdll_xh_comboctrl.obj: ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_comboctrl.cpp + +$(OBJS)\xrcdll_xh_datectrl.obj: ..\..\src\xrc\xh_datectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_datectrl.cpp + +$(OBJS)\xrcdll_xh_dirpicker.obj: ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_dirpicker.cpp + +$(OBJS)\xrcdll_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_dlg.cpp + +$(OBJS)\xrcdll_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp + +$(OBJS)\xrcdll_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + +$(OBJS)\xrcdll_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp + +$(OBJS)\xrcdll_xh_fontpicker.obj: ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_fontpicker.cpp + +$(OBJS)\xrcdll_xh_frame.obj: ..\..\src\xrc\xh_frame.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_frame.cpp + +$(OBJS)\xrcdll_xh_gauge.obj: ..\..\src\xrc\xh_gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_gauge.cpp + +$(OBJS)\xrcdll_xh_gdctl.obj: ..\..\src\xrc\xh_gdctl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_gdctl.cpp + +$(OBJS)\xrcdll_xh_grid.obj: ..\..\src\xrc\xh_grid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_grid.cpp + +$(OBJS)\xrcdll_xh_html.obj: ..\..\src\xrc\xh_html.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_html.cpp + +$(OBJS)\xrcdll_xh_hyperlink.obj: ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_hyperlink.cpp + +$(OBJS)\xrcdll_xh_listb.obj: ..\..\src\xrc\xh_listb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_listb.cpp + +$(OBJS)\xrcdll_xh_listbk.obj: ..\..\src\xrc\xh_listbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_listbk.cpp + +$(OBJS)\xrcdll_xh_listc.obj: ..\..\src\xrc\xh_listc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_listc.cpp + +$(OBJS)\xrcdll_xh_mdi.obj: ..\..\src\xrc\xh_mdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_mdi.cpp + +$(OBJS)\xrcdll_xh_menu.obj: ..\..\src\xrc\xh_menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_menu.cpp + +$(OBJS)\xrcdll_xh_notbk.obj: ..\..\src\xrc\xh_notbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_notbk.cpp + +$(OBJS)\xrcdll_xh_odcombo.obj: ..\..\src\xrc\xh_odcombo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_odcombo.cpp + +$(OBJS)\xrcdll_xh_panel.obj: ..\..\src\xrc\xh_panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_panel.cpp + +$(OBJS)\xrcdll_xh_propdlg.obj: ..\..\src\xrc\xh_propdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_propdlg.cpp + +$(OBJS)\xrcdll_xh_radbt.obj: ..\..\src\xrc\xh_radbt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_radbt.cpp + +$(OBJS)\xrcdll_xh_radbx.obj: ..\..\src\xrc\xh_radbx.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_radbx.cpp + +$(OBJS)\xrcdll_xh_scrol.obj: ..\..\src\xrc\xh_scrol.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_scrol.cpp + +$(OBJS)\xrcdll_xh_scwin.obj: ..\..\src\xrc\xh_scwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_scwin.cpp + +$(OBJS)\xrcdll_xh_htmllbox.obj: ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_htmllbox.cpp + +$(OBJS)\xrcdll_xh_sizer.obj: ..\..\src\xrc\xh_sizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_sizer.cpp + +$(OBJS)\xrcdll_xh_slidr.obj: ..\..\src\xrc\xh_slidr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_slidr.cpp + +$(OBJS)\xrcdll_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_spin.cpp + +$(OBJS)\xrcdll_xh_split.obj: ..\..\src\xrc\xh_split.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_split.cpp + +$(OBJS)\xrcdll_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_srchctrl.cpp + +$(OBJS)\xrcdll_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_statbar.cpp + +$(OBJS)\xrcdll_xh_stbmp.obj: ..\..\src\xrc\xh_stbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_stbmp.cpp + +$(OBJS)\xrcdll_xh_stbox.obj: ..\..\src\xrc\xh_stbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_stbox.cpp + +$(OBJS)\xrcdll_xh_stlin.obj: ..\..\src\xrc\xh_stlin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_stlin.cpp + +$(OBJS)\xrcdll_xh_sttxt.obj: ..\..\src\xrc\xh_sttxt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_sttxt.cpp + +$(OBJS)\xrcdll_xh_text.obj: ..\..\src\xrc\xh_text.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_text.cpp + +$(OBJS)\xrcdll_xh_tglbtn.obj: ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_tglbtn.cpp + +$(OBJS)\xrcdll_xh_timectrl.obj: ..\..\src\xrc\xh_timectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_timectrl.cpp + +$(OBJS)\xrcdll_xh_toolb.obj: ..\..\src\xrc\xh_toolb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_toolb.cpp + +$(OBJS)\xrcdll_xh_toolbk.obj: ..\..\src\xrc\xh_toolbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_toolbk.cpp + +$(OBJS)\xrcdll_xh_tree.obj: ..\..\src\xrc\xh_tree.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_tree.cpp + +$(OBJS)\xrcdll_xh_treebk.obj: ..\..\src\xrc\xh_treebk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_treebk.cpp + +$(OBJS)\xrcdll_xh_unkwn.obj: ..\..\src\xrc\xh_unkwn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_unkwn.cpp + +$(OBJS)\xrcdll_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_wizrd.cpp + +$(OBJS)\xrcdll_xmlres.obj: ..\..\src\xrc\xmlres.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmlres.cpp + +$(OBJS)\xrcdll_xmladv.obj: ..\..\src\xrc\xmladv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmladv.cpp + +$(OBJS)\xrcdll_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp + +$(OBJS)\xrclib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\xrclib_xh_animatctrl.obj: ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_animatctrl.cpp + +$(OBJS)\xrclib_xh_bannerwindow.obj: ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_bannerwindow.cpp + +$(OBJS)\xrclib_xh_bmp.obj: ..\..\src\xrc\xh_bmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_bmp.cpp + +$(OBJS)\xrclib_xh_bmpcbox.obj: ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_bmpcbox.cpp + +$(OBJS)\xrclib_xh_bmpbt.obj: ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_bmpbt.cpp + +$(OBJS)\xrclib_xh_bttn.obj: ..\..\src\xrc\xh_bttn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_bttn.cpp + +$(OBJS)\xrclib_xh_cald.obj: ..\..\src\xrc\xh_cald.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_cald.cpp + +$(OBJS)\xrclib_xh_chckb.obj: ..\..\src\xrc\xh_chckb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_chckb.cpp + +$(OBJS)\xrclib_xh_chckl.obj: ..\..\src\xrc\xh_chckl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_chckl.cpp + +$(OBJS)\xrclib_xh_choic.obj: ..\..\src\xrc\xh_choic.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_choic.cpp + +$(OBJS)\xrclib_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_choicbk.cpp + +$(OBJS)\xrclib_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_clrpicker.cpp + +$(OBJS)\xrclib_xh_cmdlinkbn.obj: ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_cmdlinkbn.cpp + +$(OBJS)\xrclib_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_collpane.cpp + +$(OBJS)\xrclib_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_combo.cpp + +$(OBJS)\xrclib_xh_comboctrl.obj: ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_comboctrl.cpp + +$(OBJS)\xrclib_xh_datectrl.obj: ..\..\src\xrc\xh_datectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_datectrl.cpp + +$(OBJS)\xrclib_xh_dirpicker.obj: ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_dirpicker.cpp + +$(OBJS)\xrclib_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_dlg.cpp + +$(OBJS)\xrclib_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp + +$(OBJS)\xrclib_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + +$(OBJS)\xrclib_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp + +$(OBJS)\xrclib_xh_fontpicker.obj: ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_fontpicker.cpp + +$(OBJS)\xrclib_xh_frame.obj: ..\..\src\xrc\xh_frame.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_frame.cpp + +$(OBJS)\xrclib_xh_gauge.obj: ..\..\src\xrc\xh_gauge.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_gauge.cpp + +$(OBJS)\xrclib_xh_gdctl.obj: ..\..\src\xrc\xh_gdctl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_gdctl.cpp + +$(OBJS)\xrclib_xh_grid.obj: ..\..\src\xrc\xh_grid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_grid.cpp + +$(OBJS)\xrclib_xh_html.obj: ..\..\src\xrc\xh_html.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_html.cpp + +$(OBJS)\xrclib_xh_hyperlink.obj: ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_hyperlink.cpp + +$(OBJS)\xrclib_xh_listb.obj: ..\..\src\xrc\xh_listb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_listb.cpp + +$(OBJS)\xrclib_xh_listbk.obj: ..\..\src\xrc\xh_listbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_listbk.cpp + +$(OBJS)\xrclib_xh_listc.obj: ..\..\src\xrc\xh_listc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_listc.cpp + +$(OBJS)\xrclib_xh_mdi.obj: ..\..\src\xrc\xh_mdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_mdi.cpp + +$(OBJS)\xrclib_xh_menu.obj: ..\..\src\xrc\xh_menu.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_menu.cpp + +$(OBJS)\xrclib_xh_notbk.obj: ..\..\src\xrc\xh_notbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_notbk.cpp + +$(OBJS)\xrclib_xh_odcombo.obj: ..\..\src\xrc\xh_odcombo.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_odcombo.cpp + +$(OBJS)\xrclib_xh_panel.obj: ..\..\src\xrc\xh_panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_panel.cpp + +$(OBJS)\xrclib_xh_propdlg.obj: ..\..\src\xrc\xh_propdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_propdlg.cpp + +$(OBJS)\xrclib_xh_radbt.obj: ..\..\src\xrc\xh_radbt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_radbt.cpp + +$(OBJS)\xrclib_xh_radbx.obj: ..\..\src\xrc\xh_radbx.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_radbx.cpp + +$(OBJS)\xrclib_xh_scrol.obj: ..\..\src\xrc\xh_scrol.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_scrol.cpp + +$(OBJS)\xrclib_xh_scwin.obj: ..\..\src\xrc\xh_scwin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_scwin.cpp + +$(OBJS)\xrclib_xh_htmllbox.obj: ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_htmllbox.cpp + +$(OBJS)\xrclib_xh_sizer.obj: ..\..\src\xrc\xh_sizer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_sizer.cpp + +$(OBJS)\xrclib_xh_slidr.obj: ..\..\src\xrc\xh_slidr.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_slidr.cpp + +$(OBJS)\xrclib_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_spin.cpp + +$(OBJS)\xrclib_xh_split.obj: ..\..\src\xrc\xh_split.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_split.cpp + +$(OBJS)\xrclib_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_srchctrl.cpp + +$(OBJS)\xrclib_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_statbar.cpp + +$(OBJS)\xrclib_xh_stbmp.obj: ..\..\src\xrc\xh_stbmp.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_stbmp.cpp + +$(OBJS)\xrclib_xh_stbox.obj: ..\..\src\xrc\xh_stbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_stbox.cpp + +$(OBJS)\xrclib_xh_stlin.obj: ..\..\src\xrc\xh_stlin.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_stlin.cpp + +$(OBJS)\xrclib_xh_sttxt.obj: ..\..\src\xrc\xh_sttxt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_sttxt.cpp + +$(OBJS)\xrclib_xh_text.obj: ..\..\src\xrc\xh_text.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_text.cpp + +$(OBJS)\xrclib_xh_tglbtn.obj: ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_tglbtn.cpp + +$(OBJS)\xrclib_xh_timectrl.obj: ..\..\src\xrc\xh_timectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_timectrl.cpp + +$(OBJS)\xrclib_xh_toolb.obj: ..\..\src\xrc\xh_toolb.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_toolb.cpp + +$(OBJS)\xrclib_xh_toolbk.obj: ..\..\src\xrc\xh_toolbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_toolbk.cpp + +$(OBJS)\xrclib_xh_tree.obj: ..\..\src\xrc\xh_tree.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_tree.cpp + +$(OBJS)\xrclib_xh_treebk.obj: ..\..\src\xrc\xh_treebk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_treebk.cpp + +$(OBJS)\xrclib_xh_unkwn.obj: ..\..\src\xrc\xh_unkwn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_unkwn.cpp + +$(OBJS)\xrclib_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_wizrd.cpp + +$(OBJS)\xrclib_xmlres.obj: ..\..\src\xrc\xmlres.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmlres.cpp + +$(OBJS)\xrclib_xmladv.obj: ..\..\src\xrc\xmladv.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmladv.cpp + +$(OBJS)\xrclib_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp + +$(OBJS)\auidll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\auidll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_AUI ..\..\src\msw\version.rc + +$(OBJS)\auidll_framemanager.obj: ..\..\src\aui\framemanager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\framemanager.cpp + +$(OBJS)\auidll_dockart.obj: ..\..\src\aui\dockart.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\dockart.cpp + +$(OBJS)\auidll_floatpane.obj: ..\..\src\aui\floatpane.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\floatpane.cpp + +$(OBJS)\auidll_auibook.obj: ..\..\src\aui\auibook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\auibook.cpp + +$(OBJS)\auidll_auibar.obj: ..\..\src\aui\auibar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\auibar.cpp + +$(OBJS)\auidll_tabmdi.obj: ..\..\src\aui\tabmdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\tabmdi.cpp + +$(OBJS)\auidll_tabart.obj: ..\..\src\aui\tabart.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\tabart.cpp + +$(OBJS)\auidll_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + +$(OBJS)\auilib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\auilib_framemanager.obj: ..\..\src\aui\framemanager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\framemanager.cpp + +$(OBJS)\auilib_dockart.obj: ..\..\src\aui\dockart.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\dockart.cpp + +$(OBJS)\auilib_floatpane.obj: ..\..\src\aui\floatpane.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\floatpane.cpp + +$(OBJS)\auilib_auibook.obj: ..\..\src\aui\auibook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\auibook.cpp + +$(OBJS)\auilib_auibar.obj: ..\..\src\aui\auibar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\auibar.cpp + +$(OBJS)\auilib_tabmdi.obj: ..\..\src\aui\tabmdi.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\tabmdi.cpp + +$(OBJS)\auilib_tabart.obj: ..\..\src\aui\tabart.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\tabart.cpp + +$(OBJS)\auilib_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + +$(OBJS)\ribbondll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\ribbondll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_RIBBON ..\..\src\msw\version.rc + +$(OBJS)\ribbondll_art_internal.obj: ..\..\src\ribbon\art_internal.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\art_internal.cpp + +$(OBJS)\ribbondll_art_msw.obj: ..\..\src\ribbon\art_msw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\art_msw.cpp + +$(OBJS)\ribbondll_art_aui.obj: ..\..\src\ribbon\art_aui.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\art_aui.cpp + +$(OBJS)\ribbondll_bar.obj: ..\..\src\ribbon\bar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\bar.cpp + +$(OBJS)\ribbondll_buttonbar.obj: ..\..\src\ribbon\buttonbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\buttonbar.cpp + +$(OBJS)\ribbondll_control.obj: ..\..\src\ribbon\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\control.cpp + +$(OBJS)\ribbondll_gallery.obj: ..\..\src\ribbon\gallery.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\gallery.cpp + +$(OBJS)\ribbondll_page.obj: ..\..\src\ribbon\page.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\page.cpp + +$(OBJS)\ribbondll_panel.obj: ..\..\src\ribbon\panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\panel.cpp + +$(OBJS)\ribbondll_toolbar.obj: ..\..\src\ribbon\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\toolbar.cpp + +$(OBJS)\ribbondll_xh_ribbon.obj: ..\..\src\xrc\xh_ribbon.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\xrc\xh_ribbon.cpp + +$(OBJS)\ribbonlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\ribbonlib_art_internal.obj: ..\..\src\ribbon\art_internal.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\art_internal.cpp + +$(OBJS)\ribbonlib_art_msw.obj: ..\..\src\ribbon\art_msw.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\art_msw.cpp + +$(OBJS)\ribbonlib_art_aui.obj: ..\..\src\ribbon\art_aui.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\art_aui.cpp + +$(OBJS)\ribbonlib_bar.obj: ..\..\src\ribbon\bar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\bar.cpp + +$(OBJS)\ribbonlib_buttonbar.obj: ..\..\src\ribbon\buttonbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\buttonbar.cpp + +$(OBJS)\ribbonlib_control.obj: ..\..\src\ribbon\control.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\control.cpp + +$(OBJS)\ribbonlib_gallery.obj: ..\..\src\ribbon\gallery.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\gallery.cpp + +$(OBJS)\ribbonlib_page.obj: ..\..\src\ribbon\page.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\page.cpp + +$(OBJS)\ribbonlib_panel.obj: ..\..\src\ribbon\panel.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\panel.cpp + +$(OBJS)\ribbonlib_toolbar.obj: ..\..\src\ribbon\toolbar.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\ribbon\toolbar.cpp + +$(OBJS)\ribbonlib_xh_ribbon.obj: ..\..\src\xrc\xh_ribbon.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONLIB_CXXFLAGS) ..\..\src\xrc\xh_ribbon.cpp + +$(OBJS)\propgriddll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\propgriddll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_PROPGRID ..\..\src\msw\version.rc + +$(OBJS)\propgriddll_advprops.obj: ..\..\src\propgrid\advprops.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\advprops.cpp + +$(OBJS)\propgriddll_editors.obj: ..\..\src\propgrid\editors.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\editors.cpp + +$(OBJS)\propgriddll_manager.obj: ..\..\src\propgrid\manager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\manager.cpp + +$(OBJS)\propgriddll_property.obj: ..\..\src\propgrid\property.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\property.cpp + +$(OBJS)\propgriddll_propgrid.obj: ..\..\src\propgrid\propgrid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\propgrid.cpp + +$(OBJS)\propgriddll_propgridiface.obj: ..\..\src\propgrid\propgridiface.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\propgridiface.cpp + +$(OBJS)\propgriddll_propgridpagestate.obj: ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\propgridpagestate.cpp + +$(OBJS)\propgriddll_props.obj: ..\..\src\propgrid\props.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\props.cpp + +$(OBJS)\propgridlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\propgridlib_advprops.obj: ..\..\src\propgrid\advprops.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\advprops.cpp + +$(OBJS)\propgridlib_editors.obj: ..\..\src\propgrid\editors.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\editors.cpp + +$(OBJS)\propgridlib_manager.obj: ..\..\src\propgrid\manager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\manager.cpp + +$(OBJS)\propgridlib_property.obj: ..\..\src\propgrid\property.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\property.cpp + +$(OBJS)\propgridlib_propgrid.obj: ..\..\src\propgrid\propgrid.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\propgrid.cpp + +$(OBJS)\propgridlib_propgridiface.obj: ..\..\src\propgrid\propgridiface.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\propgridiface.cpp + +$(OBJS)\propgridlib_propgridpagestate.obj: ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\propgridpagestate.cpp + +$(OBJS)\propgridlib_props.obj: ..\..\src\propgrid\props.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDLIB_CXXFLAGS) ..\..\src\propgrid\props.cpp + +$(OBJS)\richtextdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\richtextdll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_RICHTEXT ..\..\src\msw\version.rc + +$(OBJS)\richtextdll_richtextbuffer.obj: ..\..\src\richtext\richtextbuffer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextbuffer.cpp + +$(OBJS)\richtextdll_richtextctrl.obj: ..\..\src\richtext\richtextctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextctrl.cpp + +$(OBJS)\richtextdll_richtextformatdlg.obj: ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextformatdlg.cpp + +$(OBJS)\richtextdll_richtexthtml.obj: ..\..\src\richtext\richtexthtml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtexthtml.cpp + +$(OBJS)\richtextdll_richtextimagedlg.obj: ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextimagedlg.cpp + +$(OBJS)\richtextdll_richtextprint.obj: ..\..\src\richtext\richtextprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextprint.cpp + +$(OBJS)\richtextdll_richtextstyledlg.obj: ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextstyledlg.cpp + +$(OBJS)\richtextdll_richtextstyles.obj: ..\..\src\richtext\richtextstyles.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextstyles.cpp + +$(OBJS)\richtextdll_richtextsymboldlg.obj: ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextsymboldlg.cpp + +$(OBJS)\richtextdll_richtextxml.obj: ..\..\src\richtext\richtextxml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextxml.cpp + +$(OBJS)\richtextdll_xh_richtext.obj: ..\..\src\xrc\xh_richtext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\xrc\xh_richtext.cpp + +$(OBJS)\richtextlib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\richtextlib_richtextbuffer.obj: ..\..\src\richtext\richtextbuffer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextbuffer.cpp + +$(OBJS)\richtextlib_richtextctrl.obj: ..\..\src\richtext\richtextctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextctrl.cpp + +$(OBJS)\richtextlib_richtextformatdlg.obj: ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextformatdlg.cpp + +$(OBJS)\richtextlib_richtexthtml.obj: ..\..\src\richtext\richtexthtml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtexthtml.cpp + +$(OBJS)\richtextlib_richtextimagedlg.obj: ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextimagedlg.cpp + +$(OBJS)\richtextlib_richtextprint.obj: ..\..\src\richtext\richtextprint.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextprint.cpp + +$(OBJS)\richtextlib_richtextstyledlg.obj: ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextstyledlg.cpp + +$(OBJS)\richtextlib_richtextstyles.obj: ..\..\src\richtext\richtextstyles.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextstyles.cpp + +$(OBJS)\richtextlib_richtextsymboldlg.obj: ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextsymboldlg.cpp + +$(OBJS)\richtextlib_richtextxml.obj: ..\..\src\richtext\richtextxml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\richtext\richtextxml.cpp + +$(OBJS)\richtextlib_xh_richtext.obj: ..\..\src\xrc\xh_richtext.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTLIB_CXXFLAGS) ..\..\src\xrc\xh_richtext.cpp + +$(OBJS)\stcdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(STCDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\stcdll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /i ..\..\src\stc\scintilla\include /i ..\..\src\stc\scintilla\lexlib /i ..\..\src\stc\scintilla\src /d __WX__ /d SCI_LEXER /d LINK_LEXERS /d WXUSINGDLL /d WXMAKINGDLL_STC ..\..\src\msw\version.rc + +$(OBJS)\stcdll_stc.obj: ..\..\src\stc\stc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(STCDLL_CXXFLAGS) ..\..\src\stc\stc.cpp + +$(OBJS)\stcdll_PlatWX.obj: ..\..\src\stc\PlatWX.cpp + $(CXX) /c /nologo /TP /Fo$@ $(STCDLL_CXXFLAGS) ..\..\src\stc\PlatWX.cpp + +$(OBJS)\stcdll_ScintillaWX.obj: ..\..\src\stc\ScintillaWX.cpp + $(CXX) /c /nologo /TP /Fo$@ $(STCDLL_CXXFLAGS) ..\..\src\stc\ScintillaWX.cpp + +$(OBJS)\stclib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(STCLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\stclib_stc.obj: ..\..\src\stc\stc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(STCLIB_CXXFLAGS) ..\..\src\stc\stc.cpp + +$(OBJS)\stclib_PlatWX.obj: ..\..\src\stc\PlatWX.cpp + $(CXX) /c /nologo /TP /Fo$@ $(STCLIB_CXXFLAGS) ..\..\src\stc\PlatWX.cpp + +$(OBJS)\stclib_ScintillaWX.obj: ..\..\src\stc\ScintillaWX.cpp + $(CXX) /c /nologo /TP /Fo$@ $(STCLIB_CXXFLAGS) ..\..\src\stc\ScintillaWX.cpp + +$(OBJS)\gldll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(GLDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\gldll_version.res: ..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) $(__MSLU_DEFINE_p_65) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_GL ..\..\src\msw\version.rc + +$(OBJS)\gldll_glcmn.obj: ..\..\src\common\glcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(GLDLL_CXXFLAGS) ..\..\src\common\glcmn.cpp + +$(OBJS)\gldll_glcanvas.obj: ..\..\src\msw\glcanvas.cpp + $(CXX) /c /nologo /TP /Fo$@ $(GLDLL_CXXFLAGS) ..\..\src\msw\glcanvas.cpp + +$(OBJS)\gllib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(GLLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + +$(OBJS)\gllib_glcmn.obj: ..\..\src\common\glcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(GLLIB_CXXFLAGS) ..\..\src\common\glcmn.cpp + +$(OBJS)\gllib_glcanvas.obj: ..\..\src\msw\glcanvas.cpp + $(CXX) /c /nologo /TP /Fo$@ $(GLLIB_CXXFLAGS) ..\..\src\msw\glcanvas.cpp + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.wat b/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.wat new file mode 100644 index 0000000000..5d8b8b04aa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/makefile.wat @@ -0,0 +1,16582 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.2.9 (http://www.bakefile.org) +# Do not modify, all changes will be overwritten! +# ========================================================================= + +!include config.wat + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +# Speed up compilation a bit: +!ifdef __LOADDLL__ +! loaddll wcc wccd +! loaddll wccaxp wccdaxp +! loaddll wcc386 wccd386 +! loaddll wpp wppdi86 +! loaddll wppaxp wppdaxp +! loaddll wpp386 wppd386 +! if $(__VERSION__) >= 1280 +! loaddll wlink wlinkd +! else +! loaddll wlink wlink +! endif +! loaddll wlib wlibd +!endif + +# We need these variables in some bakefile-made rules: +WATCOM_CWD = $+ $(%cdrive):$(%cwd) $- + +### Conditionally set variables: ### + +PORTNAME = +!ifeq USE_GUI 0 +PORTNAME = base +!endif +!ifeq USE_GUI 1 +PORTNAME = msw$(TOOLKIT_VERSION) +!endif +COMPILER_VERSION = +!ifeq OFFICIAL_BUILD 1 +COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD +!endif +WXCOMPILER = +!ifeq OFFICIAL_BUILD 0 +WXCOMPILER = _wat +!endif +!ifeq OFFICIAL_BUILD 1 +WXCOMPILER = _wat$(COMPILER_VERSION) +!endif +VENDORTAG = +!ifeq OFFICIAL_BUILD 0 +VENDORTAG = _$(VENDOR) +!endif +!ifeq OFFICIAL_BUILD 1 +VENDORTAG = +!endif +WXDEBUGFLAG = +!ifeq BUILD debug +WXDEBUGFLAG = d +!endif +WXUNICODEFLAG = +!ifeq UNICODE 1 +WXUNICODEFLAG = u +!endif +WXUNIVNAME = +!ifeq WXUNIV 1 +WXUNIVNAME = univ +!endif +WXDLLFLAG = +!ifeq SHARED 1 +WXDLLFLAG = dll +!endif +LIBTYPE_SUFFIX = +!ifeq SHARED 0 +LIBTYPE_SUFFIX = lib +!endif +!ifeq SHARED 1 +LIBTYPE_SUFFIX = dll +!endif +__wxpng___depname = +!ifeq USE_GUI 1 +__wxpng___depname = $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib +!endif +__wxjpeg___depname = +!ifeq USE_GUI 1 +__wxjpeg___depname = $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib +!endif +__wxtiff___depname = +!ifeq USE_GUI 1 +__wxtiff___depname = $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib +!endif +__wxscintilla_usingdll_p = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +__wxscintilla_usingdll_p = -dWXUSINGDLL +!endif +!endif +EXTRALIBS_FOR_BASE = +!ifeq MONOLITHIC 0 +EXTRALIBS_FOR_BASE = +!endif +!ifeq MONOLITHIC 1 +EXTRALIBS_FOR_BASE = +!endif +__monodll___depname = +!ifeq MONOLITHIC 1 +!ifeq SHARED 1 +__monodll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = +!ifeq USE_GUI 1 +____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = & + $(____CORE_SRC_FILENAMES_OBJECTS) & + $(____ADVANCED_SRC_FILENAMES_OBJECTS) & + $(OBJS)\monodll_mediactrlcmn.obj & + $(OBJS)\monodll_mediactrl_am.obj & + $(OBJS)\monodll_mediactrl_wmp10.obj & + $(OBJS)\monodll_mediactrl_qt.obj & + $(OBJS)\monodll_helpbest.obj & + $(OBJS)\monodll_helpctrl.obj & + $(OBJS)\monodll_helpdata.obj & + $(OBJS)\monodll_helpdlg.obj & + $(OBJS)\monodll_helpfrm.obj & + $(OBJS)\monodll_helpwnd.obj & + $(OBJS)\monodll_htmlcell.obj & + $(OBJS)\monodll_htmlfilt.obj & + $(OBJS)\monodll_htmlpars.obj & + $(OBJS)\monodll_htmltag.obj & + $(OBJS)\monodll_htmlwin.obj & + $(OBJS)\monodll_htmprint.obj & + $(OBJS)\monodll_m_dflist.obj & + $(OBJS)\monodll_m_fonts.obj & + $(OBJS)\monodll_m_hline.obj & + $(OBJS)\monodll_m_image.obj & + $(OBJS)\monodll_m_layout.obj & + $(OBJS)\monodll_m_links.obj & + $(OBJS)\monodll_m_list.obj & + $(OBJS)\monodll_m_pre.obj & + $(OBJS)\monodll_m_span.obj & + $(OBJS)\monodll_m_style.obj & + $(OBJS)\monodll_m_tables.obj & + $(OBJS)\monodll_styleparams.obj & + $(OBJS)\monodll_winpars.obj & + $(OBJS)\monodll_htmllbox.obj & + $(OBJS)\monodll_webview_ie.obj & + $(OBJS)\monodll_webview.obj & + $(OBJS)\monodll_webviewarchivehandler.obj & + $(OBJS)\monodll_webviewfshandler.obj & + $(OBJS)\monodll_debugrpt.obj & + $(OBJS)\monodll_dbgrptg.obj & + $(OBJS)\monodll_xh_animatctrl.obj & + $(OBJS)\monodll_xh_bannerwindow.obj & + $(OBJS)\monodll_xh_bmp.obj & + $(OBJS)\monodll_xh_bmpcbox.obj & + $(OBJS)\monodll_xh_bmpbt.obj & + $(OBJS)\monodll_xh_bttn.obj & + $(OBJS)\monodll_xh_cald.obj & + $(OBJS)\monodll_xh_chckb.obj & + $(OBJS)\monodll_xh_chckl.obj & + $(OBJS)\monodll_xh_choic.obj & + $(OBJS)\monodll_xh_choicbk.obj & + $(OBJS)\monodll_xh_clrpicker.obj & + $(OBJS)\monodll_xh_cmdlinkbn.obj & + $(OBJS)\monodll_xh_collpane.obj & + $(OBJS)\monodll_xh_combo.obj & + $(OBJS)\monodll_xh_comboctrl.obj & + $(OBJS)\monodll_xh_datectrl.obj & + $(OBJS)\monodll_xh_dirpicker.obj & + $(OBJS)\monodll_xh_dlg.obj & + $(OBJS)\monodll_xh_editlbox.obj & + $(OBJS)\monodll_xh_filectrl.obj & + $(OBJS)\monodll_xh_filepicker.obj & + $(OBJS)\monodll_xh_fontpicker.obj & + $(OBJS)\monodll_xh_frame.obj & + $(OBJS)\monodll_xh_gauge.obj & + $(OBJS)\monodll_xh_gdctl.obj & + $(OBJS)\monodll_xh_grid.obj & + $(OBJS)\monodll_xh_html.obj & + $(OBJS)\monodll_xh_hyperlink.obj & + $(OBJS)\monodll_xh_listb.obj & + $(OBJS)\monodll_xh_listbk.obj & + $(OBJS)\monodll_xh_listc.obj & + $(OBJS)\monodll_xh_mdi.obj & + $(OBJS)\monodll_xh_menu.obj & + $(OBJS)\monodll_xh_notbk.obj & + $(OBJS)\monodll_xh_odcombo.obj & + $(OBJS)\monodll_xh_panel.obj & + $(OBJS)\monodll_xh_propdlg.obj & + $(OBJS)\monodll_xh_radbt.obj & + $(OBJS)\monodll_xh_radbx.obj & + $(OBJS)\monodll_xh_scrol.obj & + $(OBJS)\monodll_xh_scwin.obj & + $(OBJS)\monodll_xh_htmllbox.obj & + $(OBJS)\monodll_xh_sizer.obj & + $(OBJS)\monodll_xh_slidr.obj & + $(OBJS)\monodll_xh_spin.obj & + $(OBJS)\monodll_xh_split.obj & + $(OBJS)\monodll_xh_srchctrl.obj & + $(OBJS)\monodll_xh_statbar.obj & + $(OBJS)\monodll_xh_stbmp.obj & + $(OBJS)\monodll_xh_stbox.obj & + $(OBJS)\monodll_xh_stlin.obj & + $(OBJS)\monodll_xh_sttxt.obj & + $(OBJS)\monodll_xh_text.obj & + $(OBJS)\monodll_xh_tglbtn.obj & + $(OBJS)\monodll_xh_timectrl.obj & + $(OBJS)\monodll_xh_toolb.obj & + $(OBJS)\monodll_xh_toolbk.obj & + $(OBJS)\monodll_xh_tree.obj & + $(OBJS)\monodll_xh_treebk.obj & + $(OBJS)\monodll_xh_unkwn.obj & + $(OBJS)\monodll_xh_wizrd.obj & + $(OBJS)\monodll_xmlres.obj & + $(OBJS)\monodll_xmladv.obj & + $(OBJS)\monodll_xmlrsall.obj & + $(OBJS)\monodll_framemanager.obj & + $(OBJS)\monodll_dockart.obj & + $(OBJS)\monodll_floatpane.obj & + $(OBJS)\monodll_auibook.obj & + $(OBJS)\monodll_auibar.obj & + $(OBJS)\monodll_tabmdi.obj & + $(OBJS)\monodll_tabart.obj & + $(OBJS)\monodll_xh_auinotbk.obj & + $(OBJS)\monodll_advprops.obj & + $(OBJS)\monodll_editors.obj & + $(OBJS)\monodll_manager.obj & + $(OBJS)\monodll_property.obj & + $(OBJS)\monodll_propgrid.obj & + $(OBJS)\monodll_propgridiface.obj & + $(OBJS)\monodll_propgridpagestate.obj & + $(OBJS)\monodll_props.obj & + $(OBJS)\monodll_art_internal.obj & + $(OBJS)\monodll_art_msw.obj & + $(OBJS)\monodll_art_aui.obj & + $(OBJS)\monodll_bar.obj & + $(OBJS)\monodll_ribbon_buttonbar.obj & + $(OBJS)\monodll_ribbon_control.obj & + $(OBJS)\monodll_gallery.obj & + $(OBJS)\monodll_page.obj & + $(OBJS)\monodll_ribbon_panel.obj & + $(OBJS)\monodll_ribbon_toolbar.obj & + $(OBJS)\monodll_xh_ribbon.obj & + $(OBJS)\monodll_richtextbuffer.obj & + $(OBJS)\monodll_richtextctrl.obj & + $(OBJS)\monodll_richtextformatdlg.obj & + $(OBJS)\monodll_richtexthtml.obj & + $(OBJS)\monodll_richtextimagedlg.obj & + $(OBJS)\monodll_richtextprint.obj & + $(OBJS)\monodll_richtextstyledlg.obj & + $(OBJS)\monodll_richtextstyles.obj & + $(OBJS)\monodll_richtextsymboldlg.obj & + $(OBJS)\monodll_richtextxml.obj & + $(OBJS)\monodll_xh_richtext.obj & + $(OBJS)\monodll_stc.obj & + $(OBJS)\monodll_PlatWX.obj & + $(OBJS)\monodll_ScintillaWX.obj +!endif +____CORE_SRC_FILENAMES_OBJECTS = +!ifeq USE_GUI 1 +!ifeq WXUNIV 0 +____CORE_SRC_FILENAMES_OBJECTS = & + $(OBJS)\monodll_activex.obj & + $(OBJS)\monodll_app.obj & + $(OBJS)\monodll_bitmap.obj & + $(OBJS)\monodll_brush.obj & + $(OBJS)\monodll_caret.obj & + $(OBJS)\monodll_clipbrd.obj & + $(OBJS)\monodll_colour.obj & + $(OBJS)\monodll_cursor.obj & + $(OBJS)\monodll_data.obj & + $(OBJS)\monodll_dc.obj & + $(OBJS)\monodll_dcclient.obj & + $(OBJS)\monodll_dcmemory.obj & + $(OBJS)\monodll_dcprint.obj & + $(OBJS)\monodll_dcscreen.obj & + $(OBJS)\monodll_dialup.obj & + $(OBJS)\monodll_dib.obj & + $(OBJS)\monodll_display.obj & + $(OBJS)\monodll_enhmeta.obj & + $(OBJS)\monodll_font.obj & + $(OBJS)\monodll_fontenum.obj & + $(OBJS)\monodll_fontutil.obj & + $(OBJS)\monodll_gdiimage.obj & + $(OBJS)\monodll_gdiobj.obj & + $(OBJS)\monodll_gdiplus.obj & + $(OBJS)\monodll_graphics.obj & + $(OBJS)\monodll_icon.obj & + $(OBJS)\monodll_imaglist.obj & + $(OBJS)\monodll_minifram.obj & + $(OBJS)\monodll_nonownedwnd.obj & + $(OBJS)\monodll_dataobj.obj & + $(OBJS)\monodll_dropsrc.obj & + $(OBJS)\monodll_droptgt.obj & + $(OBJS)\monodll_oleutils.obj & + $(OBJS)\monodll_safearray.obj & + $(OBJS)\monodll_palette.obj & + $(OBJS)\monodll_pen.obj & + $(OBJS)\monodll_popupwin.obj & + $(OBJS)\monodll_printdlg.obj & + $(OBJS)\monodll_printwin.obj & + $(OBJS)\monodll_region.obj & + $(OBJS)\monodll_renderer.obj & + $(OBJS)\monodll_settings.obj & + $(OBJS)\monodll_textmeasure.obj & + $(OBJS)\monodll_tooltip.obj & + $(OBJS)\monodll_toplevel.obj & + $(OBJS)\monodll_uiaction.obj & + $(OBJS)\monodll_utilsgui.obj & + $(OBJS)\monodll_utilswin.obj & + $(OBJS)\monodll_uxtheme.obj & + $(OBJS)\monodll_window.obj & + $(OBJS)\monodll_helpchm.obj & + $(OBJS)\monodll_helpwin.obj & + $(OBJS)\monodll_automtn.obj & + $(OBJS)\monodll_uuid.obj & + $(OBJS)\monodll_clrpickerg.obj & + $(OBJS)\monodll_collpaneg.obj & + $(OBJS)\monodll_filepickerg.obj & + $(OBJS)\monodll_fontpickerg.obj & + $(OBJS)\monodll_generic_statusbr.obj & + $(OBJS)\monodll_prntdlgg.obj & + $(OBJS)\monodll_msw_accel.obj & + $(OBJS)\monodll_anybutton.obj & + $(OBJS)\monodll_artmsw.obj & + $(OBJS)\monodll_msw_bmpbuttn.obj & + $(OBJS)\monodll_msw_button.obj & + $(OBJS)\monodll_msw_checkbox.obj & + $(OBJS)\monodll_msw_choice.obj & + $(OBJS)\monodll_colordlg.obj & + $(OBJS)\monodll_combo.obj & + $(OBJS)\monodll_msw_combobox.obj & + $(OBJS)\monodll_msw_control.obj & + $(OBJS)\monodll_msw_dialog.obj & + $(OBJS)\monodll_dirdlg.obj & + $(OBJS)\monodll_dragimag.obj & + $(OBJS)\monodll_evtloop.obj & + $(OBJS)\monodll_filedlg.obj & + $(OBJS)\monodll_frame.obj & + $(OBJS)\monodll_msw_gauge.obj & + $(OBJS)\monodll_headerctrl.obj & + $(OBJS)\monodll_iniconf.obj & + $(OBJS)\monodll_msw_listbox.obj & + $(OBJS)\monodll_msw_listctrl.obj & + $(OBJS)\monodll_mdi.obj & + $(OBJS)\monodll_msw_menu.obj & + $(OBJS)\monodll_menuitem.obj & + $(OBJS)\monodll_metafile.obj & + $(OBJS)\monodll_msgdlg.obj & + $(OBJS)\monodll_nativdlg.obj & + $(OBJS)\monodll_nativewin.obj & + $(OBJS)\monodll_msw_notebook.obj & + $(OBJS)\monodll_access.obj & + $(OBJS)\monodll_ownerdrw.obj & + $(OBJS)\monodll_msw_panel.obj & + $(OBJS)\monodll_progdlg.obj & + $(OBJS)\monodll_msw_radiobox.obj & + $(OBJS)\monodll_msw_radiobut.obj & + $(OBJS)\monodll_richmsgdlg.obj & + $(OBJS)\monodll_msw_scrolbar.obj & + $(OBJS)\monodll_msw_slider.obj & + $(OBJS)\monodll_msw_spinbutt.obj & + $(OBJS)\monodll_spinctrl.obj & + $(OBJS)\monodll_msw_statbmp.obj & + $(OBJS)\monodll_msw_statbox.obj & + $(OBJS)\monodll_statusbar.obj & + $(OBJS)\monodll_msw_statline.obj & + $(OBJS)\monodll_msw_stattext.obj & + $(OBJS)\monodll_msw_toolbar.obj & + $(OBJS)\monodll_msw_textctrl.obj & + $(OBJS)\monodll_textentry.obj & + $(OBJS)\monodll_msw_tglbtn.obj & + $(OBJS)\monodll_treectrl.obj & + $(OBJS)\monodll_msw_checklst.obj & + $(OBJS)\monodll_msw_fdrepdlg.obj & + $(OBJS)\monodll_fontdlg.obj & + $(OBJS)\monodll_accelcmn.obj & + $(OBJS)\monodll_accesscmn.obj & + $(OBJS)\monodll_anidecod.obj & + $(OBJS)\monodll_affinematrix2d.obj & + $(OBJS)\monodll_appcmn.obj & + $(OBJS)\monodll_artprov.obj & + $(OBJS)\monodll_artstd.obj & + $(OBJS)\monodll_arttango.obj & + $(OBJS)\monodll_bmpbase.obj & + $(OBJS)\monodll_bmpbtncmn.obj & + $(OBJS)\monodll_bookctrl.obj & + $(OBJS)\monodll_btncmn.obj & + $(OBJS)\monodll_cairo.obj & + $(OBJS)\monodll_checkboxcmn.obj & + $(OBJS)\monodll_checklstcmn.obj & + $(OBJS)\monodll_choiccmn.obj & + $(OBJS)\monodll_clipcmn.obj & + $(OBJS)\monodll_clrpickercmn.obj & + $(OBJS)\monodll_colourcmn.obj & + $(OBJS)\monodll_colourdata.obj & + $(OBJS)\monodll_combocmn.obj & + $(OBJS)\monodll_cmdproc.obj & + $(OBJS)\monodll_cmndata.obj & + $(OBJS)\monodll_containr.obj & + $(OBJS)\monodll_cshelp.obj & + $(OBJS)\monodll_ctrlcmn.obj & + $(OBJS)\monodll_ctrlsub.obj & + $(OBJS)\monodll_dcbase.obj & + $(OBJS)\monodll_dcbufcmn.obj & + $(OBJS)\monodll_dcgraph.obj & + $(OBJS)\monodll_dcsvg.obj & + $(OBJS)\monodll_dirctrlcmn.obj & + $(OBJS)\monodll_dlgcmn.obj & + $(OBJS)\monodll_dndcmn.obj & + $(OBJS)\monodll_dobjcmn.obj & + $(OBJS)\monodll_docmdi.obj & + $(OBJS)\monodll_docview.obj & + $(OBJS)\monodll_dpycmn.obj & + $(OBJS)\monodll_dseldlg.obj & + $(OBJS)\monodll_effects.obj & + $(OBJS)\monodll_fddlgcmn.obj & + $(OBJS)\monodll_filectrlcmn.obj & + $(OBJS)\monodll_filehistorycmn.obj & + $(OBJS)\monodll_filepickercmn.obj & + $(OBJS)\monodll_fontpickercmn.obj & + $(OBJS)\monodll_fldlgcmn.obj & + $(OBJS)\monodll_fontcmn.obj & + $(OBJS)\monodll_fontdata.obj & + $(OBJS)\monodll_graphicc.obj & + $(OBJS)\monodll_fontenumcmn.obj & + $(OBJS)\monodll_fontmap.obj & + $(OBJS)\monodll_fontutilcmn.obj & + $(OBJS)\monodll_framecmn.obj & + $(OBJS)\monodll_gaugecmn.obj & + $(OBJS)\monodll_gbsizer.obj & + $(OBJS)\monodll_gdicmn.obj & + $(OBJS)\monodll_geometry.obj & + $(OBJS)\monodll_gifdecod.obj & + $(OBJS)\monodll_graphcmn.obj & + $(OBJS)\monodll_headercolcmn.obj & + $(OBJS)\monodll_headerctrlcmn.obj & + $(OBJS)\monodll_helpbase.obj & + $(OBJS)\monodll_iconbndl.obj & + $(OBJS)\monodll_imagall.obj & + $(OBJS)\monodll_imagbmp.obj & + $(OBJS)\monodll_image.obj & + $(OBJS)\monodll_imagfill.obj & + $(OBJS)\monodll_imaggif.obj & + $(OBJS)\monodll_imagiff.obj & + $(OBJS)\monodll_imagjpeg.obj & + $(OBJS)\monodll_imagpcx.obj & + $(OBJS)\monodll_imagpng.obj & + $(OBJS)\monodll_imagpnm.obj & + $(OBJS)\monodll_imagtga.obj & + $(OBJS)\monodll_imagtiff.obj & + $(OBJS)\monodll_imagxpm.obj & + $(OBJS)\monodll_layout.obj & + $(OBJS)\monodll_lboxcmn.obj & + $(OBJS)\monodll_listctrlcmn.obj & + $(OBJS)\monodll_markupparser.obj & + $(OBJS)\monodll_matrix.obj & + $(OBJS)\monodll_menucmn.obj & + $(OBJS)\monodll_modalhook.obj & + $(OBJS)\monodll_mousemanager.obj & + $(OBJS)\monodll_nbkbase.obj & + $(OBJS)\monodll_overlaycmn.obj & + $(OBJS)\monodll_ownerdrwcmn.obj & + $(OBJS)\monodll_paper.obj & + $(OBJS)\monodll_panelcmn.obj & + $(OBJS)\monodll_persist.obj & + $(OBJS)\monodll_pickerbase.obj & + $(OBJS)\monodll_popupcmn.obj & + $(OBJS)\monodll_preferencescmn.obj & + $(OBJS)\monodll_prntbase.obj & + $(OBJS)\monodll_quantize.obj & + $(OBJS)\monodll_radiobtncmn.obj & + $(OBJS)\monodll_radiocmn.obj & + $(OBJS)\monodll_rearrangectrl.obj & + $(OBJS)\monodll_rendcmn.obj & + $(OBJS)\monodll_rgncmn.obj & + $(OBJS)\monodll_scrolbarcmn.obj & + $(OBJS)\monodll_settcmn.obj & + $(OBJS)\monodll_sizer.obj & + $(OBJS)\monodll_slidercmn.obj & + $(OBJS)\monodll_spinbtncmn.obj & + $(OBJS)\monodll_spinctrlcmn.obj & + $(OBJS)\monodll_srchcmn.obj & + $(OBJS)\monodll_statbar.obj & + $(OBJS)\monodll_statbmpcmn.obj & + $(OBJS)\monodll_statboxcmn.obj & + $(OBJS)\monodll_statlinecmn.obj & + $(OBJS)\monodll_stattextcmn.obj & + $(OBJS)\monodll_stockitem.obj & + $(OBJS)\monodll_tbarbase.obj & + $(OBJS)\monodll_textcmn.obj & + $(OBJS)\monodll_textentrycmn.obj & + $(OBJS)\monodll_textmeasurecmn.obj & + $(OBJS)\monodll_toplvcmn.obj & + $(OBJS)\monodll_treebase.obj & + $(OBJS)\monodll_uiactioncmn.obj & + $(OBJS)\monodll_valgen.obj & + $(OBJS)\monodll_validate.obj & + $(OBJS)\monodll_valtext.obj & + $(OBJS)\monodll_valnum.obj & + $(OBJS)\monodll_wincmn.obj & + $(OBJS)\monodll_windowid.obj & + $(OBJS)\monodll_wrapsizer.obj & + $(OBJS)\monodll_xpmdecod.obj & + $(OBJS)\monodll_busyinfo.obj & + $(OBJS)\monodll_generic_buttonbar.obj & + $(OBJS)\monodll_choicdgg.obj & + $(OBJS)\monodll_choicbkg.obj & + $(OBJS)\monodll_combog.obj & + $(OBJS)\monodll_dcpsg.obj & + $(OBJS)\monodll_dirctrlg.obj & + $(OBJS)\monodll_dragimgg.obj & + $(OBJS)\monodll_filectrlg.obj & + $(OBJS)\monodll_headerctrlg.obj & + $(OBJS)\monodll_infobar.obj & + $(OBJS)\monodll_listbkg.obj & + $(OBJS)\monodll_logg.obj & + $(OBJS)\monodll_markuptext.obj & + $(OBJS)\monodll_msgdlgg.obj & + $(OBJS)\monodll_numdlgg.obj & + $(OBJS)\monodll_progdlgg.obj & + $(OBJS)\monodll_preferencesg.obj & + $(OBJS)\monodll_printps.obj & + $(OBJS)\monodll_renderg.obj & + $(OBJS)\monodll_richmsgdlgg.obj & + $(OBJS)\monodll_scrlwing.obj & + $(OBJS)\monodll_selstore.obj & + $(OBJS)\monodll_spinctlg.obj & + $(OBJS)\monodll_splitter.obj & + $(OBJS)\monodll_srchctlg.obj & + $(OBJS)\monodll_statbmpg.obj & + $(OBJS)\monodll_stattextg.obj & + $(OBJS)\monodll_textdlgg.obj & + $(OBJS)\monodll_tipwin.obj & + $(OBJS)\monodll_toolbkg.obj & + $(OBJS)\monodll_treectlg.obj & + $(OBJS)\monodll_treebkg.obj & + $(OBJS)\monodll_vlbox.obj & + $(OBJS)\monodll_vscroll.obj & + $(OBJS)\monodll_xmlreshandler.obj +!endif +!endif +!ifeq USE_GUI 1 +!ifeq WXUNIV 1 +____CORE_SRC_FILENAMES_OBJECTS = & + $(OBJS)\monodll_activex.obj & + $(OBJS)\monodll_app.obj & + $(OBJS)\monodll_bitmap.obj & + $(OBJS)\monodll_brush.obj & + $(OBJS)\monodll_caret.obj & + $(OBJS)\monodll_clipbrd.obj & + $(OBJS)\monodll_colour.obj & + $(OBJS)\monodll_cursor.obj & + $(OBJS)\monodll_data.obj & + $(OBJS)\monodll_dc.obj & + $(OBJS)\monodll_dcclient.obj & + $(OBJS)\monodll_dcmemory.obj & + $(OBJS)\monodll_dcprint.obj & + $(OBJS)\monodll_dcscreen.obj & + $(OBJS)\monodll_dialup.obj & + $(OBJS)\monodll_dib.obj & + $(OBJS)\monodll_display.obj & + $(OBJS)\monodll_enhmeta.obj & + $(OBJS)\monodll_font.obj & + $(OBJS)\monodll_fontenum.obj & + $(OBJS)\monodll_fontutil.obj & + $(OBJS)\monodll_gdiimage.obj & + $(OBJS)\monodll_gdiobj.obj & + $(OBJS)\monodll_gdiplus.obj & + $(OBJS)\monodll_graphics.obj & + $(OBJS)\monodll_icon.obj & + $(OBJS)\monodll_imaglist.obj & + $(OBJS)\monodll_minifram.obj & + $(OBJS)\monodll_nonownedwnd.obj & + $(OBJS)\monodll_dataobj.obj & + $(OBJS)\monodll_dropsrc.obj & + $(OBJS)\monodll_droptgt.obj & + $(OBJS)\monodll_oleutils.obj & + $(OBJS)\monodll_safearray.obj & + $(OBJS)\monodll_palette.obj & + $(OBJS)\monodll_pen.obj & + $(OBJS)\monodll_popupwin.obj & + $(OBJS)\monodll_printdlg.obj & + $(OBJS)\monodll_printwin.obj & + $(OBJS)\monodll_region.obj & + $(OBJS)\monodll_renderer.obj & + $(OBJS)\monodll_settings.obj & + $(OBJS)\monodll_textmeasure.obj & + $(OBJS)\monodll_tooltip.obj & + $(OBJS)\monodll_toplevel.obj & + $(OBJS)\monodll_uiaction.obj & + $(OBJS)\monodll_utilsgui.obj & + $(OBJS)\monodll_utilswin.obj & + $(OBJS)\monodll_uxtheme.obj & + $(OBJS)\monodll_window.obj & + $(OBJS)\monodll_helpchm.obj & + $(OBJS)\monodll_helpwin.obj & + $(OBJS)\monodll_automtn.obj & + $(OBJS)\monodll_uuid.obj & + $(OBJS)\monodll_evtloop.obj & + $(OBJS)\monodll_generic_accel.obj & + $(OBJS)\monodll_clrpickerg.obj & + $(OBJS)\monodll_collpaneg.obj & + $(OBJS)\monodll_colrdlgg.obj & + $(OBJS)\monodll_dirdlgg.obj & + $(OBJS)\monodll_generic_fdrepdlg.obj & + $(OBJS)\monodll_filedlgg.obj & + $(OBJS)\monodll_filepickerg.obj & + $(OBJS)\monodll_fontdlgg.obj & + $(OBJS)\monodll_fontpickerg.obj & + $(OBJS)\monodll_generic_listctrl.obj & + $(OBJS)\monodll_mdig.obj & + $(OBJS)\monodll_prntdlgg.obj & + $(OBJS)\monodll_univ_bmpbuttn.obj & + $(OBJS)\monodll_univ_button.obj & + $(OBJS)\monodll_univ_checkbox.obj & + $(OBJS)\monodll_univ_checklst.obj & + $(OBJS)\monodll_univ_choice.obj & + $(OBJS)\monodll_univ_combobox.obj & + $(OBJS)\monodll_univ_control.obj & + $(OBJS)\monodll_ctrlrend.obj & + $(OBJS)\monodll_univ_dialog.obj & + $(OBJS)\monodll_framuniv.obj & + $(OBJS)\monodll_univ_gauge.obj & + $(OBJS)\monodll_inpcons.obj & + $(OBJS)\monodll_inphand.obj & + $(OBJS)\monodll_univ_listbox.obj & + $(OBJS)\monodll_univ_menu.obj & + $(OBJS)\monodll_univ_notebook.obj & + $(OBJS)\monodll_univ_radiobox.obj & + $(OBJS)\monodll_univ_radiobut.obj & + $(OBJS)\monodll_scrarrow.obj & + $(OBJS)\monodll_univ_scrolbar.obj & + $(OBJS)\monodll_scrthumb.obj & + $(OBJS)\monodll_settingsuniv.obj & + $(OBJS)\monodll_univ_slider.obj & + $(OBJS)\monodll_univ_spinbutt.obj & + $(OBJS)\monodll_univ_statbmp.obj & + $(OBJS)\monodll_univ_statbox.obj & + $(OBJS)\monodll_univ_statline.obj & + $(OBJS)\monodll_univ_stattext.obj & + $(OBJS)\monodll_univ_statusbr.obj & + $(OBJS)\monodll_stdrend.obj & + $(OBJS)\monodll_univ_textctrl.obj & + $(OBJS)\monodll_univ_tglbtn.obj & + $(OBJS)\monodll_theme.obj & + $(OBJS)\monodll_univ_toolbar.obj & + $(OBJS)\monodll_topluniv.obj & + $(OBJS)\monodll_winuniv.obj & + $(OBJS)\monodll_gtk.obj & + $(OBJS)\monodll_metal.obj & + $(OBJS)\monodll_mono.obj & + $(OBJS)\monodll_win32.obj & + $(OBJS)\monodll_accelcmn.obj & + $(OBJS)\monodll_accesscmn.obj & + $(OBJS)\monodll_anidecod.obj & + $(OBJS)\monodll_affinematrix2d.obj & + $(OBJS)\monodll_appcmn.obj & + $(OBJS)\monodll_artprov.obj & + $(OBJS)\monodll_artstd.obj & + $(OBJS)\monodll_arttango.obj & + $(OBJS)\monodll_bmpbase.obj & + $(OBJS)\monodll_bmpbtncmn.obj & + $(OBJS)\monodll_bookctrl.obj & + $(OBJS)\monodll_btncmn.obj & + $(OBJS)\monodll_cairo.obj & + $(OBJS)\monodll_checkboxcmn.obj & + $(OBJS)\monodll_checklstcmn.obj & + $(OBJS)\monodll_choiccmn.obj & + $(OBJS)\monodll_clipcmn.obj & + $(OBJS)\monodll_clrpickercmn.obj & + $(OBJS)\monodll_colourcmn.obj & + $(OBJS)\monodll_colourdata.obj & + $(OBJS)\monodll_combocmn.obj & + $(OBJS)\monodll_cmdproc.obj & + $(OBJS)\monodll_cmndata.obj & + $(OBJS)\monodll_containr.obj & + $(OBJS)\monodll_cshelp.obj & + $(OBJS)\monodll_ctrlcmn.obj & + $(OBJS)\monodll_ctrlsub.obj & + $(OBJS)\monodll_dcbase.obj & + $(OBJS)\monodll_dcbufcmn.obj & + $(OBJS)\monodll_dcgraph.obj & + $(OBJS)\monodll_dcsvg.obj & + $(OBJS)\monodll_dirctrlcmn.obj & + $(OBJS)\monodll_dlgcmn.obj & + $(OBJS)\monodll_dndcmn.obj & + $(OBJS)\monodll_dobjcmn.obj & + $(OBJS)\monodll_docmdi.obj & + $(OBJS)\monodll_docview.obj & + $(OBJS)\monodll_dpycmn.obj & + $(OBJS)\monodll_dseldlg.obj & + $(OBJS)\monodll_effects.obj & + $(OBJS)\monodll_fddlgcmn.obj & + $(OBJS)\monodll_filectrlcmn.obj & + $(OBJS)\monodll_filehistorycmn.obj & + $(OBJS)\monodll_filepickercmn.obj & + $(OBJS)\monodll_fontpickercmn.obj & + $(OBJS)\monodll_fldlgcmn.obj & + $(OBJS)\monodll_fontcmn.obj & + $(OBJS)\monodll_fontdata.obj & + $(OBJS)\monodll_graphicc.obj & + $(OBJS)\monodll_fontenumcmn.obj & + $(OBJS)\monodll_fontmap.obj & + $(OBJS)\monodll_fontutilcmn.obj & + $(OBJS)\monodll_framecmn.obj & + $(OBJS)\monodll_gaugecmn.obj & + $(OBJS)\monodll_gbsizer.obj & + $(OBJS)\monodll_gdicmn.obj & + $(OBJS)\monodll_geometry.obj & + $(OBJS)\monodll_gifdecod.obj & + $(OBJS)\monodll_graphcmn.obj & + $(OBJS)\monodll_headercolcmn.obj & + $(OBJS)\monodll_headerctrlcmn.obj & + $(OBJS)\monodll_helpbase.obj & + $(OBJS)\monodll_iconbndl.obj & + $(OBJS)\monodll_imagall.obj & + $(OBJS)\monodll_imagbmp.obj & + $(OBJS)\monodll_image.obj & + $(OBJS)\monodll_imagfill.obj & + $(OBJS)\monodll_imaggif.obj & + $(OBJS)\monodll_imagiff.obj & + $(OBJS)\monodll_imagjpeg.obj & + $(OBJS)\monodll_imagpcx.obj & + $(OBJS)\monodll_imagpng.obj & + $(OBJS)\monodll_imagpnm.obj & + $(OBJS)\monodll_imagtga.obj & + $(OBJS)\monodll_imagtiff.obj & + $(OBJS)\monodll_imagxpm.obj & + $(OBJS)\monodll_layout.obj & + $(OBJS)\monodll_lboxcmn.obj & + $(OBJS)\monodll_listctrlcmn.obj & + $(OBJS)\monodll_markupparser.obj & + $(OBJS)\monodll_matrix.obj & + $(OBJS)\monodll_menucmn.obj & + $(OBJS)\monodll_modalhook.obj & + $(OBJS)\monodll_mousemanager.obj & + $(OBJS)\monodll_nbkbase.obj & + $(OBJS)\monodll_overlaycmn.obj & + $(OBJS)\monodll_ownerdrwcmn.obj & + $(OBJS)\monodll_paper.obj & + $(OBJS)\monodll_panelcmn.obj & + $(OBJS)\monodll_persist.obj & + $(OBJS)\monodll_pickerbase.obj & + $(OBJS)\monodll_popupcmn.obj & + $(OBJS)\monodll_preferencescmn.obj & + $(OBJS)\monodll_prntbase.obj & + $(OBJS)\monodll_quantize.obj & + $(OBJS)\monodll_radiobtncmn.obj & + $(OBJS)\monodll_radiocmn.obj & + $(OBJS)\monodll_rearrangectrl.obj & + $(OBJS)\monodll_rendcmn.obj & + $(OBJS)\monodll_rgncmn.obj & + $(OBJS)\monodll_scrolbarcmn.obj & + $(OBJS)\monodll_settcmn.obj & + $(OBJS)\monodll_sizer.obj & + $(OBJS)\monodll_slidercmn.obj & + $(OBJS)\monodll_spinbtncmn.obj & + $(OBJS)\monodll_spinctrlcmn.obj & + $(OBJS)\monodll_srchcmn.obj & + $(OBJS)\monodll_statbar.obj & + $(OBJS)\monodll_statbmpcmn.obj & + $(OBJS)\monodll_statboxcmn.obj & + $(OBJS)\monodll_statlinecmn.obj & + $(OBJS)\monodll_stattextcmn.obj & + $(OBJS)\monodll_stockitem.obj & + $(OBJS)\monodll_tbarbase.obj & + $(OBJS)\monodll_textcmn.obj & + $(OBJS)\monodll_textentrycmn.obj & + $(OBJS)\monodll_textmeasurecmn.obj & + $(OBJS)\monodll_toplvcmn.obj & + $(OBJS)\monodll_treebase.obj & + $(OBJS)\monodll_uiactioncmn.obj & + $(OBJS)\monodll_valgen.obj & + $(OBJS)\monodll_validate.obj & + $(OBJS)\monodll_valtext.obj & + $(OBJS)\monodll_valnum.obj & + $(OBJS)\monodll_wincmn.obj & + $(OBJS)\monodll_windowid.obj & + $(OBJS)\monodll_wrapsizer.obj & + $(OBJS)\monodll_xpmdecod.obj & + $(OBJS)\monodll_busyinfo.obj & + $(OBJS)\monodll_generic_buttonbar.obj & + $(OBJS)\monodll_choicdgg.obj & + $(OBJS)\monodll_choicbkg.obj & + $(OBJS)\monodll_combog.obj & + $(OBJS)\monodll_dcpsg.obj & + $(OBJS)\monodll_dirctrlg.obj & + $(OBJS)\monodll_dragimgg.obj & + $(OBJS)\monodll_filectrlg.obj & + $(OBJS)\monodll_headerctrlg.obj & + $(OBJS)\monodll_infobar.obj & + $(OBJS)\monodll_listbkg.obj & + $(OBJS)\monodll_logg.obj & + $(OBJS)\monodll_markuptext.obj & + $(OBJS)\monodll_msgdlgg.obj & + $(OBJS)\monodll_numdlgg.obj & + $(OBJS)\monodll_progdlgg.obj & + $(OBJS)\monodll_preferencesg.obj & + $(OBJS)\monodll_printps.obj & + $(OBJS)\monodll_renderg.obj & + $(OBJS)\monodll_richmsgdlgg.obj & + $(OBJS)\monodll_scrlwing.obj & + $(OBJS)\monodll_selstore.obj & + $(OBJS)\monodll_spinctlg.obj & + $(OBJS)\monodll_splitter.obj & + $(OBJS)\monodll_srchctlg.obj & + $(OBJS)\monodll_statbmpg.obj & + $(OBJS)\monodll_stattextg.obj & + $(OBJS)\monodll_textdlgg.obj & + $(OBJS)\monodll_tipwin.obj & + $(OBJS)\monodll_toolbkg.obj & + $(OBJS)\monodll_treectlg.obj & + $(OBJS)\monodll_treebkg.obj & + $(OBJS)\monodll_vlbox.obj & + $(OBJS)\monodll_vscroll.obj & + $(OBJS)\monodll_xmlreshandler.obj +!endif +!endif +____ADVANCED_SRC_FILENAMES_OBJECTS = +!ifeq WXUNIV 0 +____ADVANCED_SRC_FILENAMES_OBJECTS = & + $(OBJS)\monodll_animatecmn.obj & + $(OBJS)\monodll_bmpcboxcmn.obj & + $(OBJS)\monodll_calctrlcmn.obj & + $(OBJS)\monodll_datavcmn.obj & + $(OBJS)\monodll_gridcmn.obj & + $(OBJS)\monodll_hyperlnkcmn.obj & + $(OBJS)\monodll_odcombocmn.obj & + $(OBJS)\monodll_richtooltipcmn.obj & + $(OBJS)\monodll_aboutdlgg.obj & + $(OBJS)\monodll_bannerwindow.obj & + $(OBJS)\monodll_bmpcboxg.obj & + $(OBJS)\monodll_calctrlg.obj & + $(OBJS)\monodll_commandlinkbuttong.obj & + $(OBJS)\monodll_datavgen.obj & + $(OBJS)\monodll_datectlg.obj & + $(OBJS)\monodll_editlbox.obj & + $(OBJS)\monodll_grid.obj & + $(OBJS)\monodll_gridctrl.obj & + $(OBJS)\monodll_grideditors.obj & + $(OBJS)\monodll_gridsel.obj & + $(OBJS)\monodll_helpext.obj & + $(OBJS)\monodll_hyperlinkg.obj & + $(OBJS)\monodll_laywin.obj & + $(OBJS)\monodll_notifmsgg.obj & + $(OBJS)\monodll_odcombo.obj & + $(OBJS)\monodll_propdlg.obj & + $(OBJS)\monodll_richtooltipg.obj & + $(OBJS)\monodll_sashwin.obj & + $(OBJS)\monodll_splash.obj & + $(OBJS)\monodll_timectrlg.obj & + $(OBJS)\monodll_tipdlg.obj & + $(OBJS)\monodll_treelist.obj & + $(OBJS)\monodll_wizard.obj & + $(OBJS)\monodll_taskbarcmn.obj & + $(OBJS)\monodll_aboutdlg.obj & + $(OBJS)\monodll_notifmsg.obj & + $(OBJS)\monodll_richtooltip.obj & + $(OBJS)\monodll_sound.obj & + $(OBJS)\monodll_taskbar.obj & + $(OBJS)\monodll_joystick.obj & + $(OBJS)\monodll_animateg.obj & + $(OBJS)\monodll_bmpcbox.obj & + $(OBJS)\monodll_calctrl.obj & + $(OBJS)\monodll_commandlinkbutton.obj & + $(OBJS)\monodll_datecontrols.obj & + $(OBJS)\monodll_datectrl.obj & + $(OBJS)\monodll_datetimectrl.obj & + $(OBJS)\monodll_hyperlink.obj & + $(OBJS)\monodll_timectrl.obj +!endif +!ifeq WXUNIV 1 +____ADVANCED_SRC_FILENAMES_OBJECTS = & + $(OBJS)\monodll_animatecmn.obj & + $(OBJS)\monodll_bmpcboxcmn.obj & + $(OBJS)\monodll_calctrlcmn.obj & + $(OBJS)\monodll_datavcmn.obj & + $(OBJS)\monodll_gridcmn.obj & + $(OBJS)\monodll_hyperlnkcmn.obj & + $(OBJS)\monodll_odcombocmn.obj & + $(OBJS)\monodll_richtooltipcmn.obj & + $(OBJS)\monodll_aboutdlgg.obj & + $(OBJS)\monodll_bannerwindow.obj & + $(OBJS)\monodll_bmpcboxg.obj & + $(OBJS)\monodll_calctrlg.obj & + $(OBJS)\monodll_commandlinkbuttong.obj & + $(OBJS)\monodll_datavgen.obj & + $(OBJS)\monodll_datectlg.obj & + $(OBJS)\monodll_editlbox.obj & + $(OBJS)\monodll_grid.obj & + $(OBJS)\monodll_gridctrl.obj & + $(OBJS)\monodll_grideditors.obj & + $(OBJS)\monodll_gridsel.obj & + $(OBJS)\monodll_helpext.obj & + $(OBJS)\monodll_hyperlinkg.obj & + $(OBJS)\monodll_laywin.obj & + $(OBJS)\monodll_notifmsgg.obj & + $(OBJS)\monodll_odcombo.obj & + $(OBJS)\monodll_propdlg.obj & + $(OBJS)\monodll_richtooltipg.obj & + $(OBJS)\monodll_sashwin.obj & + $(OBJS)\monodll_splash.obj & + $(OBJS)\monodll_timectrlg.obj & + $(OBJS)\monodll_tipdlg.obj & + $(OBJS)\monodll_treelist.obj & + $(OBJS)\monodll_wizard.obj & + $(OBJS)\monodll_taskbarcmn.obj & + $(OBJS)\monodll_aboutdlg.obj & + $(OBJS)\monodll_notifmsg.obj & + $(OBJS)\monodll_richtooltip.obj & + $(OBJS)\monodll_sound.obj & + $(OBJS)\monodll_taskbar.obj & + $(OBJS)\monodll_joystick.obj & + $(OBJS)\monodll_animateg.obj +!endif +__wxscintilla_library_link_DEP = +!ifeq USE_STC 1 +__wxscintilla_library_link_DEP = $(__wxscintilla) +!endif +__monolib___depname = +!ifeq MONOLITHIC 1 +!ifeq SHARED 0 +__monolib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!endif +____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = +!ifeq USE_GUI 1 +____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = & + $(____CORE_SRC_FILENAMES_1_OBJECTS) & + $(____ADVANCED_SRC_FILENAMES_1_OBJECTS) & + $(OBJS)\monolib_mediactrlcmn.obj & + $(OBJS)\monolib_mediactrl_am.obj & + $(OBJS)\monolib_mediactrl_wmp10.obj & + $(OBJS)\monolib_mediactrl_qt.obj & + $(OBJS)\monolib_helpbest.obj & + $(OBJS)\monolib_helpctrl.obj & + $(OBJS)\monolib_helpdata.obj & + $(OBJS)\monolib_helpdlg.obj & + $(OBJS)\monolib_helpfrm.obj & + $(OBJS)\monolib_helpwnd.obj & + $(OBJS)\monolib_htmlcell.obj & + $(OBJS)\monolib_htmlfilt.obj & + $(OBJS)\monolib_htmlpars.obj & + $(OBJS)\monolib_htmltag.obj & + $(OBJS)\monolib_htmlwin.obj & + $(OBJS)\monolib_htmprint.obj & + $(OBJS)\monolib_m_dflist.obj & + $(OBJS)\monolib_m_fonts.obj & + $(OBJS)\monolib_m_hline.obj & + $(OBJS)\monolib_m_image.obj & + $(OBJS)\monolib_m_layout.obj & + $(OBJS)\monolib_m_links.obj & + $(OBJS)\monolib_m_list.obj & + $(OBJS)\monolib_m_pre.obj & + $(OBJS)\monolib_m_span.obj & + $(OBJS)\monolib_m_style.obj & + $(OBJS)\monolib_m_tables.obj & + $(OBJS)\monolib_styleparams.obj & + $(OBJS)\monolib_winpars.obj & + $(OBJS)\monolib_htmllbox.obj & + $(OBJS)\monolib_webview_ie.obj & + $(OBJS)\monolib_webview.obj & + $(OBJS)\monolib_webviewarchivehandler.obj & + $(OBJS)\monolib_webviewfshandler.obj & + $(OBJS)\monolib_debugrpt.obj & + $(OBJS)\monolib_dbgrptg.obj & + $(OBJS)\monolib_xh_animatctrl.obj & + $(OBJS)\monolib_xh_bannerwindow.obj & + $(OBJS)\monolib_xh_bmp.obj & + $(OBJS)\monolib_xh_bmpcbox.obj & + $(OBJS)\monolib_xh_bmpbt.obj & + $(OBJS)\monolib_xh_bttn.obj & + $(OBJS)\monolib_xh_cald.obj & + $(OBJS)\monolib_xh_chckb.obj & + $(OBJS)\monolib_xh_chckl.obj & + $(OBJS)\monolib_xh_choic.obj & + $(OBJS)\monolib_xh_choicbk.obj & + $(OBJS)\monolib_xh_clrpicker.obj & + $(OBJS)\monolib_xh_cmdlinkbn.obj & + $(OBJS)\monolib_xh_collpane.obj & + $(OBJS)\monolib_xh_combo.obj & + $(OBJS)\monolib_xh_comboctrl.obj & + $(OBJS)\monolib_xh_datectrl.obj & + $(OBJS)\monolib_xh_dirpicker.obj & + $(OBJS)\monolib_xh_dlg.obj & + $(OBJS)\monolib_xh_editlbox.obj & + $(OBJS)\monolib_xh_filectrl.obj & + $(OBJS)\monolib_xh_filepicker.obj & + $(OBJS)\monolib_xh_fontpicker.obj & + $(OBJS)\monolib_xh_frame.obj & + $(OBJS)\monolib_xh_gauge.obj & + $(OBJS)\monolib_xh_gdctl.obj & + $(OBJS)\monolib_xh_grid.obj & + $(OBJS)\monolib_xh_html.obj & + $(OBJS)\monolib_xh_hyperlink.obj & + $(OBJS)\monolib_xh_listb.obj & + $(OBJS)\monolib_xh_listbk.obj & + $(OBJS)\monolib_xh_listc.obj & + $(OBJS)\monolib_xh_mdi.obj & + $(OBJS)\monolib_xh_menu.obj & + $(OBJS)\monolib_xh_notbk.obj & + $(OBJS)\monolib_xh_odcombo.obj & + $(OBJS)\monolib_xh_panel.obj & + $(OBJS)\monolib_xh_propdlg.obj & + $(OBJS)\monolib_xh_radbt.obj & + $(OBJS)\monolib_xh_radbx.obj & + $(OBJS)\monolib_xh_scrol.obj & + $(OBJS)\monolib_xh_scwin.obj & + $(OBJS)\monolib_xh_htmllbox.obj & + $(OBJS)\monolib_xh_sizer.obj & + $(OBJS)\monolib_xh_slidr.obj & + $(OBJS)\monolib_xh_spin.obj & + $(OBJS)\monolib_xh_split.obj & + $(OBJS)\monolib_xh_srchctrl.obj & + $(OBJS)\monolib_xh_statbar.obj & + $(OBJS)\monolib_xh_stbmp.obj & + $(OBJS)\monolib_xh_stbox.obj & + $(OBJS)\monolib_xh_stlin.obj & + $(OBJS)\monolib_xh_sttxt.obj & + $(OBJS)\monolib_xh_text.obj & + $(OBJS)\monolib_xh_tglbtn.obj & + $(OBJS)\monolib_xh_timectrl.obj & + $(OBJS)\monolib_xh_toolb.obj & + $(OBJS)\monolib_xh_toolbk.obj & + $(OBJS)\monolib_xh_tree.obj & + $(OBJS)\monolib_xh_treebk.obj & + $(OBJS)\monolib_xh_unkwn.obj & + $(OBJS)\monolib_xh_wizrd.obj & + $(OBJS)\monolib_xmlres.obj & + $(OBJS)\monolib_xmladv.obj & + $(OBJS)\monolib_xmlrsall.obj & + $(OBJS)\monolib_framemanager.obj & + $(OBJS)\monolib_dockart.obj & + $(OBJS)\monolib_floatpane.obj & + $(OBJS)\monolib_auibook.obj & + $(OBJS)\monolib_auibar.obj & + $(OBJS)\monolib_tabmdi.obj & + $(OBJS)\monolib_tabart.obj & + $(OBJS)\monolib_xh_auinotbk.obj & + $(OBJS)\monolib_advprops.obj & + $(OBJS)\monolib_editors.obj & + $(OBJS)\monolib_manager.obj & + $(OBJS)\monolib_property.obj & + $(OBJS)\monolib_propgrid.obj & + $(OBJS)\monolib_propgridiface.obj & + $(OBJS)\monolib_propgridpagestate.obj & + $(OBJS)\monolib_props.obj & + $(OBJS)\monolib_art_internal.obj & + $(OBJS)\monolib_art_msw.obj & + $(OBJS)\monolib_art_aui.obj & + $(OBJS)\monolib_bar.obj & + $(OBJS)\monolib_ribbon_buttonbar.obj & + $(OBJS)\monolib_ribbon_control.obj & + $(OBJS)\monolib_gallery.obj & + $(OBJS)\monolib_page.obj & + $(OBJS)\monolib_ribbon_panel.obj & + $(OBJS)\monolib_ribbon_toolbar.obj & + $(OBJS)\monolib_xh_ribbon.obj & + $(OBJS)\monolib_richtextbuffer.obj & + $(OBJS)\monolib_richtextctrl.obj & + $(OBJS)\monolib_richtextformatdlg.obj & + $(OBJS)\monolib_richtexthtml.obj & + $(OBJS)\monolib_richtextimagedlg.obj & + $(OBJS)\monolib_richtextprint.obj & + $(OBJS)\monolib_richtextstyledlg.obj & + $(OBJS)\monolib_richtextstyles.obj & + $(OBJS)\monolib_richtextsymboldlg.obj & + $(OBJS)\monolib_richtextxml.obj & + $(OBJS)\monolib_xh_richtext.obj & + $(OBJS)\monolib_stc.obj & + $(OBJS)\monolib_PlatWX.obj & + $(OBJS)\monolib_ScintillaWX.obj +!endif +____CORE_SRC_FILENAMES_1_OBJECTS = +!ifeq USE_GUI 1 +!ifeq WXUNIV 0 +____CORE_SRC_FILENAMES_1_OBJECTS = & + $(OBJS)\monolib_activex.obj & + $(OBJS)\monolib_app.obj & + $(OBJS)\monolib_bitmap.obj & + $(OBJS)\monolib_brush.obj & + $(OBJS)\monolib_caret.obj & + $(OBJS)\monolib_clipbrd.obj & + $(OBJS)\monolib_colour.obj & + $(OBJS)\monolib_cursor.obj & + $(OBJS)\monolib_data.obj & + $(OBJS)\monolib_dc.obj & + $(OBJS)\monolib_dcclient.obj & + $(OBJS)\monolib_dcmemory.obj & + $(OBJS)\monolib_dcprint.obj & + $(OBJS)\monolib_dcscreen.obj & + $(OBJS)\monolib_dialup.obj & + $(OBJS)\monolib_dib.obj & + $(OBJS)\monolib_display.obj & + $(OBJS)\monolib_enhmeta.obj & + $(OBJS)\monolib_font.obj & + $(OBJS)\monolib_fontenum.obj & + $(OBJS)\monolib_fontutil.obj & + $(OBJS)\monolib_gdiimage.obj & + $(OBJS)\monolib_gdiobj.obj & + $(OBJS)\monolib_gdiplus.obj & + $(OBJS)\monolib_graphics.obj & + $(OBJS)\monolib_icon.obj & + $(OBJS)\monolib_imaglist.obj & + $(OBJS)\monolib_minifram.obj & + $(OBJS)\monolib_nonownedwnd.obj & + $(OBJS)\monolib_dataobj.obj & + $(OBJS)\monolib_dropsrc.obj & + $(OBJS)\monolib_droptgt.obj & + $(OBJS)\monolib_oleutils.obj & + $(OBJS)\monolib_safearray.obj & + $(OBJS)\monolib_palette.obj & + $(OBJS)\monolib_pen.obj & + $(OBJS)\monolib_popupwin.obj & + $(OBJS)\monolib_printdlg.obj & + $(OBJS)\monolib_printwin.obj & + $(OBJS)\monolib_region.obj & + $(OBJS)\monolib_renderer.obj & + $(OBJS)\monolib_settings.obj & + $(OBJS)\monolib_textmeasure.obj & + $(OBJS)\monolib_tooltip.obj & + $(OBJS)\monolib_toplevel.obj & + $(OBJS)\monolib_uiaction.obj & + $(OBJS)\monolib_utilsgui.obj & + $(OBJS)\monolib_utilswin.obj & + $(OBJS)\monolib_uxtheme.obj & + $(OBJS)\monolib_window.obj & + $(OBJS)\monolib_helpchm.obj & + $(OBJS)\monolib_helpwin.obj & + $(OBJS)\monolib_automtn.obj & + $(OBJS)\monolib_uuid.obj & + $(OBJS)\monolib_clrpickerg.obj & + $(OBJS)\monolib_collpaneg.obj & + $(OBJS)\monolib_filepickerg.obj & + $(OBJS)\monolib_fontpickerg.obj & + $(OBJS)\monolib_generic_statusbr.obj & + $(OBJS)\monolib_prntdlgg.obj & + $(OBJS)\monolib_msw_accel.obj & + $(OBJS)\monolib_anybutton.obj & + $(OBJS)\monolib_artmsw.obj & + $(OBJS)\monolib_msw_bmpbuttn.obj & + $(OBJS)\monolib_msw_button.obj & + $(OBJS)\monolib_msw_checkbox.obj & + $(OBJS)\monolib_msw_choice.obj & + $(OBJS)\monolib_colordlg.obj & + $(OBJS)\monolib_combo.obj & + $(OBJS)\monolib_msw_combobox.obj & + $(OBJS)\monolib_msw_control.obj & + $(OBJS)\monolib_msw_dialog.obj & + $(OBJS)\monolib_dirdlg.obj & + $(OBJS)\monolib_dragimag.obj & + $(OBJS)\monolib_evtloop.obj & + $(OBJS)\monolib_filedlg.obj & + $(OBJS)\monolib_frame.obj & + $(OBJS)\monolib_msw_gauge.obj & + $(OBJS)\monolib_headerctrl.obj & + $(OBJS)\monolib_iniconf.obj & + $(OBJS)\monolib_msw_listbox.obj & + $(OBJS)\monolib_msw_listctrl.obj & + $(OBJS)\monolib_mdi.obj & + $(OBJS)\monolib_msw_menu.obj & + $(OBJS)\monolib_menuitem.obj & + $(OBJS)\monolib_metafile.obj & + $(OBJS)\monolib_msgdlg.obj & + $(OBJS)\monolib_nativdlg.obj & + $(OBJS)\monolib_nativewin.obj & + $(OBJS)\monolib_msw_notebook.obj & + $(OBJS)\monolib_access.obj & + $(OBJS)\monolib_ownerdrw.obj & + $(OBJS)\monolib_msw_panel.obj & + $(OBJS)\monolib_progdlg.obj & + $(OBJS)\monolib_msw_radiobox.obj & + $(OBJS)\monolib_msw_radiobut.obj & + $(OBJS)\monolib_richmsgdlg.obj & + $(OBJS)\monolib_msw_scrolbar.obj & + $(OBJS)\monolib_msw_slider.obj & + $(OBJS)\monolib_msw_spinbutt.obj & + $(OBJS)\monolib_spinctrl.obj & + $(OBJS)\monolib_msw_statbmp.obj & + $(OBJS)\monolib_msw_statbox.obj & + $(OBJS)\monolib_statusbar.obj & + $(OBJS)\monolib_msw_statline.obj & + $(OBJS)\monolib_msw_stattext.obj & + $(OBJS)\monolib_msw_toolbar.obj & + $(OBJS)\monolib_msw_textctrl.obj & + $(OBJS)\monolib_textentry.obj & + $(OBJS)\monolib_msw_tglbtn.obj & + $(OBJS)\monolib_treectrl.obj & + $(OBJS)\monolib_msw_checklst.obj & + $(OBJS)\monolib_msw_fdrepdlg.obj & + $(OBJS)\monolib_fontdlg.obj & + $(OBJS)\monolib_accelcmn.obj & + $(OBJS)\monolib_accesscmn.obj & + $(OBJS)\monolib_anidecod.obj & + $(OBJS)\monolib_affinematrix2d.obj & + $(OBJS)\monolib_appcmn.obj & + $(OBJS)\monolib_artprov.obj & + $(OBJS)\monolib_artstd.obj & + $(OBJS)\monolib_arttango.obj & + $(OBJS)\monolib_bmpbase.obj & + $(OBJS)\monolib_bmpbtncmn.obj & + $(OBJS)\monolib_bookctrl.obj & + $(OBJS)\monolib_btncmn.obj & + $(OBJS)\monolib_cairo.obj & + $(OBJS)\monolib_checkboxcmn.obj & + $(OBJS)\monolib_checklstcmn.obj & + $(OBJS)\monolib_choiccmn.obj & + $(OBJS)\monolib_clipcmn.obj & + $(OBJS)\monolib_clrpickercmn.obj & + $(OBJS)\monolib_colourcmn.obj & + $(OBJS)\monolib_colourdata.obj & + $(OBJS)\monolib_combocmn.obj & + $(OBJS)\monolib_cmdproc.obj & + $(OBJS)\monolib_cmndata.obj & + $(OBJS)\monolib_containr.obj & + $(OBJS)\monolib_cshelp.obj & + $(OBJS)\monolib_ctrlcmn.obj & + $(OBJS)\monolib_ctrlsub.obj & + $(OBJS)\monolib_dcbase.obj & + $(OBJS)\monolib_dcbufcmn.obj & + $(OBJS)\monolib_dcgraph.obj & + $(OBJS)\monolib_dcsvg.obj & + $(OBJS)\monolib_dirctrlcmn.obj & + $(OBJS)\monolib_dlgcmn.obj & + $(OBJS)\monolib_dndcmn.obj & + $(OBJS)\monolib_dobjcmn.obj & + $(OBJS)\monolib_docmdi.obj & + $(OBJS)\monolib_docview.obj & + $(OBJS)\monolib_dpycmn.obj & + $(OBJS)\monolib_dseldlg.obj & + $(OBJS)\monolib_effects.obj & + $(OBJS)\monolib_fddlgcmn.obj & + $(OBJS)\monolib_filectrlcmn.obj & + $(OBJS)\monolib_filehistorycmn.obj & + $(OBJS)\monolib_filepickercmn.obj & + $(OBJS)\monolib_fontpickercmn.obj & + $(OBJS)\monolib_fldlgcmn.obj & + $(OBJS)\monolib_fontcmn.obj & + $(OBJS)\monolib_fontdata.obj & + $(OBJS)\monolib_graphicc.obj & + $(OBJS)\monolib_fontenumcmn.obj & + $(OBJS)\monolib_fontmap.obj & + $(OBJS)\monolib_fontutilcmn.obj & + $(OBJS)\monolib_framecmn.obj & + $(OBJS)\monolib_gaugecmn.obj & + $(OBJS)\monolib_gbsizer.obj & + $(OBJS)\monolib_gdicmn.obj & + $(OBJS)\monolib_geometry.obj & + $(OBJS)\monolib_gifdecod.obj & + $(OBJS)\monolib_graphcmn.obj & + $(OBJS)\monolib_headercolcmn.obj & + $(OBJS)\monolib_headerctrlcmn.obj & + $(OBJS)\monolib_helpbase.obj & + $(OBJS)\monolib_iconbndl.obj & + $(OBJS)\monolib_imagall.obj & + $(OBJS)\monolib_imagbmp.obj & + $(OBJS)\monolib_image.obj & + $(OBJS)\monolib_imagfill.obj & + $(OBJS)\monolib_imaggif.obj & + $(OBJS)\monolib_imagiff.obj & + $(OBJS)\monolib_imagjpeg.obj & + $(OBJS)\monolib_imagpcx.obj & + $(OBJS)\monolib_imagpng.obj & + $(OBJS)\monolib_imagpnm.obj & + $(OBJS)\monolib_imagtga.obj & + $(OBJS)\monolib_imagtiff.obj & + $(OBJS)\monolib_imagxpm.obj & + $(OBJS)\monolib_layout.obj & + $(OBJS)\monolib_lboxcmn.obj & + $(OBJS)\monolib_listctrlcmn.obj & + $(OBJS)\monolib_markupparser.obj & + $(OBJS)\monolib_matrix.obj & + $(OBJS)\monolib_menucmn.obj & + $(OBJS)\monolib_modalhook.obj & + $(OBJS)\monolib_mousemanager.obj & + $(OBJS)\monolib_nbkbase.obj & + $(OBJS)\monolib_overlaycmn.obj & + $(OBJS)\monolib_ownerdrwcmn.obj & + $(OBJS)\monolib_paper.obj & + $(OBJS)\monolib_panelcmn.obj & + $(OBJS)\monolib_persist.obj & + $(OBJS)\monolib_pickerbase.obj & + $(OBJS)\monolib_popupcmn.obj & + $(OBJS)\monolib_preferencescmn.obj & + $(OBJS)\monolib_prntbase.obj & + $(OBJS)\monolib_quantize.obj & + $(OBJS)\monolib_radiobtncmn.obj & + $(OBJS)\monolib_radiocmn.obj & + $(OBJS)\monolib_rearrangectrl.obj & + $(OBJS)\monolib_rendcmn.obj & + $(OBJS)\monolib_rgncmn.obj & + $(OBJS)\monolib_scrolbarcmn.obj & + $(OBJS)\monolib_settcmn.obj & + $(OBJS)\monolib_sizer.obj & + $(OBJS)\monolib_slidercmn.obj & + $(OBJS)\monolib_spinbtncmn.obj & + $(OBJS)\monolib_spinctrlcmn.obj & + $(OBJS)\monolib_srchcmn.obj & + $(OBJS)\monolib_statbar.obj & + $(OBJS)\monolib_statbmpcmn.obj & + $(OBJS)\monolib_statboxcmn.obj & + $(OBJS)\monolib_statlinecmn.obj & + $(OBJS)\monolib_stattextcmn.obj & + $(OBJS)\monolib_stockitem.obj & + $(OBJS)\monolib_tbarbase.obj & + $(OBJS)\monolib_textcmn.obj & + $(OBJS)\monolib_textentrycmn.obj & + $(OBJS)\monolib_textmeasurecmn.obj & + $(OBJS)\monolib_toplvcmn.obj & + $(OBJS)\monolib_treebase.obj & + $(OBJS)\monolib_uiactioncmn.obj & + $(OBJS)\monolib_valgen.obj & + $(OBJS)\monolib_validate.obj & + $(OBJS)\monolib_valtext.obj & + $(OBJS)\monolib_valnum.obj & + $(OBJS)\monolib_wincmn.obj & + $(OBJS)\monolib_windowid.obj & + $(OBJS)\monolib_wrapsizer.obj & + $(OBJS)\monolib_xpmdecod.obj & + $(OBJS)\monolib_busyinfo.obj & + $(OBJS)\monolib_generic_buttonbar.obj & + $(OBJS)\monolib_choicdgg.obj & + $(OBJS)\monolib_choicbkg.obj & + $(OBJS)\monolib_combog.obj & + $(OBJS)\monolib_dcpsg.obj & + $(OBJS)\monolib_dirctrlg.obj & + $(OBJS)\monolib_dragimgg.obj & + $(OBJS)\monolib_filectrlg.obj & + $(OBJS)\monolib_headerctrlg.obj & + $(OBJS)\monolib_infobar.obj & + $(OBJS)\monolib_listbkg.obj & + $(OBJS)\monolib_logg.obj & + $(OBJS)\monolib_markuptext.obj & + $(OBJS)\monolib_msgdlgg.obj & + $(OBJS)\monolib_numdlgg.obj & + $(OBJS)\monolib_progdlgg.obj & + $(OBJS)\monolib_preferencesg.obj & + $(OBJS)\monolib_printps.obj & + $(OBJS)\monolib_renderg.obj & + $(OBJS)\monolib_richmsgdlgg.obj & + $(OBJS)\monolib_scrlwing.obj & + $(OBJS)\monolib_selstore.obj & + $(OBJS)\monolib_spinctlg.obj & + $(OBJS)\monolib_splitter.obj & + $(OBJS)\monolib_srchctlg.obj & + $(OBJS)\monolib_statbmpg.obj & + $(OBJS)\monolib_stattextg.obj & + $(OBJS)\monolib_textdlgg.obj & + $(OBJS)\monolib_tipwin.obj & + $(OBJS)\monolib_toolbkg.obj & + $(OBJS)\monolib_treectlg.obj & + $(OBJS)\monolib_treebkg.obj & + $(OBJS)\monolib_vlbox.obj & + $(OBJS)\monolib_vscroll.obj & + $(OBJS)\monolib_xmlreshandler.obj +!endif +!endif +!ifeq USE_GUI 1 +!ifeq WXUNIV 1 +____CORE_SRC_FILENAMES_1_OBJECTS = & + $(OBJS)\monolib_activex.obj & + $(OBJS)\monolib_app.obj & + $(OBJS)\monolib_bitmap.obj & + $(OBJS)\monolib_brush.obj & + $(OBJS)\monolib_caret.obj & + $(OBJS)\monolib_clipbrd.obj & + $(OBJS)\monolib_colour.obj & + $(OBJS)\monolib_cursor.obj & + $(OBJS)\monolib_data.obj & + $(OBJS)\monolib_dc.obj & + $(OBJS)\monolib_dcclient.obj & + $(OBJS)\monolib_dcmemory.obj & + $(OBJS)\monolib_dcprint.obj & + $(OBJS)\monolib_dcscreen.obj & + $(OBJS)\monolib_dialup.obj & + $(OBJS)\monolib_dib.obj & + $(OBJS)\monolib_display.obj & + $(OBJS)\monolib_enhmeta.obj & + $(OBJS)\monolib_font.obj & + $(OBJS)\monolib_fontenum.obj & + $(OBJS)\monolib_fontutil.obj & + $(OBJS)\monolib_gdiimage.obj & + $(OBJS)\monolib_gdiobj.obj & + $(OBJS)\monolib_gdiplus.obj & + $(OBJS)\monolib_graphics.obj & + $(OBJS)\monolib_icon.obj & + $(OBJS)\monolib_imaglist.obj & + $(OBJS)\monolib_minifram.obj & + $(OBJS)\monolib_nonownedwnd.obj & + $(OBJS)\monolib_dataobj.obj & + $(OBJS)\monolib_dropsrc.obj & + $(OBJS)\monolib_droptgt.obj & + $(OBJS)\monolib_oleutils.obj & + $(OBJS)\monolib_safearray.obj & + $(OBJS)\monolib_palette.obj & + $(OBJS)\monolib_pen.obj & + $(OBJS)\monolib_popupwin.obj & + $(OBJS)\monolib_printdlg.obj & + $(OBJS)\monolib_printwin.obj & + $(OBJS)\monolib_region.obj & + $(OBJS)\monolib_renderer.obj & + $(OBJS)\monolib_settings.obj & + $(OBJS)\monolib_textmeasure.obj & + $(OBJS)\monolib_tooltip.obj & + $(OBJS)\monolib_toplevel.obj & + $(OBJS)\monolib_uiaction.obj & + $(OBJS)\monolib_utilsgui.obj & + $(OBJS)\monolib_utilswin.obj & + $(OBJS)\monolib_uxtheme.obj & + $(OBJS)\monolib_window.obj & + $(OBJS)\monolib_helpchm.obj & + $(OBJS)\monolib_helpwin.obj & + $(OBJS)\monolib_automtn.obj & + $(OBJS)\monolib_uuid.obj & + $(OBJS)\monolib_evtloop.obj & + $(OBJS)\monolib_generic_accel.obj & + $(OBJS)\monolib_clrpickerg.obj & + $(OBJS)\monolib_collpaneg.obj & + $(OBJS)\monolib_colrdlgg.obj & + $(OBJS)\monolib_dirdlgg.obj & + $(OBJS)\monolib_generic_fdrepdlg.obj & + $(OBJS)\monolib_filedlgg.obj & + $(OBJS)\monolib_filepickerg.obj & + $(OBJS)\monolib_fontdlgg.obj & + $(OBJS)\monolib_fontpickerg.obj & + $(OBJS)\monolib_generic_listctrl.obj & + $(OBJS)\monolib_mdig.obj & + $(OBJS)\monolib_prntdlgg.obj & + $(OBJS)\monolib_univ_bmpbuttn.obj & + $(OBJS)\monolib_univ_button.obj & + $(OBJS)\monolib_univ_checkbox.obj & + $(OBJS)\monolib_univ_checklst.obj & + $(OBJS)\monolib_univ_choice.obj & + $(OBJS)\monolib_univ_combobox.obj & + $(OBJS)\monolib_univ_control.obj & + $(OBJS)\monolib_ctrlrend.obj & + $(OBJS)\monolib_univ_dialog.obj & + $(OBJS)\monolib_framuniv.obj & + $(OBJS)\monolib_univ_gauge.obj & + $(OBJS)\monolib_inpcons.obj & + $(OBJS)\monolib_inphand.obj & + $(OBJS)\monolib_univ_listbox.obj & + $(OBJS)\monolib_univ_menu.obj & + $(OBJS)\monolib_univ_notebook.obj & + $(OBJS)\monolib_univ_radiobox.obj & + $(OBJS)\monolib_univ_radiobut.obj & + $(OBJS)\monolib_scrarrow.obj & + $(OBJS)\monolib_univ_scrolbar.obj & + $(OBJS)\monolib_scrthumb.obj & + $(OBJS)\monolib_settingsuniv.obj & + $(OBJS)\monolib_univ_slider.obj & + $(OBJS)\monolib_univ_spinbutt.obj & + $(OBJS)\monolib_univ_statbmp.obj & + $(OBJS)\monolib_univ_statbox.obj & + $(OBJS)\monolib_univ_statline.obj & + $(OBJS)\monolib_univ_stattext.obj & + $(OBJS)\monolib_univ_statusbr.obj & + $(OBJS)\monolib_stdrend.obj & + $(OBJS)\monolib_univ_textctrl.obj & + $(OBJS)\monolib_univ_tglbtn.obj & + $(OBJS)\monolib_theme.obj & + $(OBJS)\monolib_univ_toolbar.obj & + $(OBJS)\monolib_topluniv.obj & + $(OBJS)\monolib_winuniv.obj & + $(OBJS)\monolib_gtk.obj & + $(OBJS)\monolib_metal.obj & + $(OBJS)\monolib_mono.obj & + $(OBJS)\monolib_win32.obj & + $(OBJS)\monolib_accelcmn.obj & + $(OBJS)\monolib_accesscmn.obj & + $(OBJS)\monolib_anidecod.obj & + $(OBJS)\monolib_affinematrix2d.obj & + $(OBJS)\monolib_appcmn.obj & + $(OBJS)\monolib_artprov.obj & + $(OBJS)\monolib_artstd.obj & + $(OBJS)\monolib_arttango.obj & + $(OBJS)\monolib_bmpbase.obj & + $(OBJS)\monolib_bmpbtncmn.obj & + $(OBJS)\monolib_bookctrl.obj & + $(OBJS)\monolib_btncmn.obj & + $(OBJS)\monolib_cairo.obj & + $(OBJS)\monolib_checkboxcmn.obj & + $(OBJS)\monolib_checklstcmn.obj & + $(OBJS)\monolib_choiccmn.obj & + $(OBJS)\monolib_clipcmn.obj & + $(OBJS)\monolib_clrpickercmn.obj & + $(OBJS)\monolib_colourcmn.obj & + $(OBJS)\monolib_colourdata.obj & + $(OBJS)\monolib_combocmn.obj & + $(OBJS)\monolib_cmdproc.obj & + $(OBJS)\monolib_cmndata.obj & + $(OBJS)\monolib_containr.obj & + $(OBJS)\monolib_cshelp.obj & + $(OBJS)\monolib_ctrlcmn.obj & + $(OBJS)\monolib_ctrlsub.obj & + $(OBJS)\monolib_dcbase.obj & + $(OBJS)\monolib_dcbufcmn.obj & + $(OBJS)\monolib_dcgraph.obj & + $(OBJS)\monolib_dcsvg.obj & + $(OBJS)\monolib_dirctrlcmn.obj & + $(OBJS)\monolib_dlgcmn.obj & + $(OBJS)\monolib_dndcmn.obj & + $(OBJS)\monolib_dobjcmn.obj & + $(OBJS)\monolib_docmdi.obj & + $(OBJS)\monolib_docview.obj & + $(OBJS)\monolib_dpycmn.obj & + $(OBJS)\monolib_dseldlg.obj & + $(OBJS)\monolib_effects.obj & + $(OBJS)\monolib_fddlgcmn.obj & + $(OBJS)\monolib_filectrlcmn.obj & + $(OBJS)\monolib_filehistorycmn.obj & + $(OBJS)\monolib_filepickercmn.obj & + $(OBJS)\monolib_fontpickercmn.obj & + $(OBJS)\monolib_fldlgcmn.obj & + $(OBJS)\monolib_fontcmn.obj & + $(OBJS)\monolib_fontdata.obj & + $(OBJS)\monolib_graphicc.obj & + $(OBJS)\monolib_fontenumcmn.obj & + $(OBJS)\monolib_fontmap.obj & + $(OBJS)\monolib_fontutilcmn.obj & + $(OBJS)\monolib_framecmn.obj & + $(OBJS)\monolib_gaugecmn.obj & + $(OBJS)\monolib_gbsizer.obj & + $(OBJS)\monolib_gdicmn.obj & + $(OBJS)\monolib_geometry.obj & + $(OBJS)\monolib_gifdecod.obj & + $(OBJS)\monolib_graphcmn.obj & + $(OBJS)\monolib_headercolcmn.obj & + $(OBJS)\monolib_headerctrlcmn.obj & + $(OBJS)\monolib_helpbase.obj & + $(OBJS)\monolib_iconbndl.obj & + $(OBJS)\monolib_imagall.obj & + $(OBJS)\monolib_imagbmp.obj & + $(OBJS)\monolib_image.obj & + $(OBJS)\monolib_imagfill.obj & + $(OBJS)\monolib_imaggif.obj & + $(OBJS)\monolib_imagiff.obj & + $(OBJS)\monolib_imagjpeg.obj & + $(OBJS)\monolib_imagpcx.obj & + $(OBJS)\monolib_imagpng.obj & + $(OBJS)\monolib_imagpnm.obj & + $(OBJS)\monolib_imagtga.obj & + $(OBJS)\monolib_imagtiff.obj & + $(OBJS)\monolib_imagxpm.obj & + $(OBJS)\monolib_layout.obj & + $(OBJS)\monolib_lboxcmn.obj & + $(OBJS)\monolib_listctrlcmn.obj & + $(OBJS)\monolib_markupparser.obj & + $(OBJS)\monolib_matrix.obj & + $(OBJS)\monolib_menucmn.obj & + $(OBJS)\monolib_modalhook.obj & + $(OBJS)\monolib_mousemanager.obj & + $(OBJS)\monolib_nbkbase.obj & + $(OBJS)\monolib_overlaycmn.obj & + $(OBJS)\monolib_ownerdrwcmn.obj & + $(OBJS)\monolib_paper.obj & + $(OBJS)\monolib_panelcmn.obj & + $(OBJS)\monolib_persist.obj & + $(OBJS)\monolib_pickerbase.obj & + $(OBJS)\monolib_popupcmn.obj & + $(OBJS)\monolib_preferencescmn.obj & + $(OBJS)\monolib_prntbase.obj & + $(OBJS)\monolib_quantize.obj & + $(OBJS)\monolib_radiobtncmn.obj & + $(OBJS)\monolib_radiocmn.obj & + $(OBJS)\monolib_rearrangectrl.obj & + $(OBJS)\monolib_rendcmn.obj & + $(OBJS)\monolib_rgncmn.obj & + $(OBJS)\monolib_scrolbarcmn.obj & + $(OBJS)\monolib_settcmn.obj & + $(OBJS)\monolib_sizer.obj & + $(OBJS)\monolib_slidercmn.obj & + $(OBJS)\monolib_spinbtncmn.obj & + $(OBJS)\monolib_spinctrlcmn.obj & + $(OBJS)\monolib_srchcmn.obj & + $(OBJS)\monolib_statbar.obj & + $(OBJS)\monolib_statbmpcmn.obj & + $(OBJS)\monolib_statboxcmn.obj & + $(OBJS)\monolib_statlinecmn.obj & + $(OBJS)\monolib_stattextcmn.obj & + $(OBJS)\monolib_stockitem.obj & + $(OBJS)\monolib_tbarbase.obj & + $(OBJS)\monolib_textcmn.obj & + $(OBJS)\monolib_textentrycmn.obj & + $(OBJS)\monolib_textmeasurecmn.obj & + $(OBJS)\monolib_toplvcmn.obj & + $(OBJS)\monolib_treebase.obj & + $(OBJS)\monolib_uiactioncmn.obj & + $(OBJS)\monolib_valgen.obj & + $(OBJS)\monolib_validate.obj & + $(OBJS)\monolib_valtext.obj & + $(OBJS)\monolib_valnum.obj & + $(OBJS)\monolib_wincmn.obj & + $(OBJS)\monolib_windowid.obj & + $(OBJS)\monolib_wrapsizer.obj & + $(OBJS)\monolib_xpmdecod.obj & + $(OBJS)\monolib_busyinfo.obj & + $(OBJS)\monolib_generic_buttonbar.obj & + $(OBJS)\monolib_choicdgg.obj & + $(OBJS)\monolib_choicbkg.obj & + $(OBJS)\monolib_combog.obj & + $(OBJS)\monolib_dcpsg.obj & + $(OBJS)\monolib_dirctrlg.obj & + $(OBJS)\monolib_dragimgg.obj & + $(OBJS)\monolib_filectrlg.obj & + $(OBJS)\monolib_headerctrlg.obj & + $(OBJS)\monolib_infobar.obj & + $(OBJS)\monolib_listbkg.obj & + $(OBJS)\monolib_logg.obj & + $(OBJS)\monolib_markuptext.obj & + $(OBJS)\monolib_msgdlgg.obj & + $(OBJS)\monolib_numdlgg.obj & + $(OBJS)\monolib_progdlgg.obj & + $(OBJS)\monolib_preferencesg.obj & + $(OBJS)\monolib_printps.obj & + $(OBJS)\monolib_renderg.obj & + $(OBJS)\monolib_richmsgdlgg.obj & + $(OBJS)\monolib_scrlwing.obj & + $(OBJS)\monolib_selstore.obj & + $(OBJS)\monolib_spinctlg.obj & + $(OBJS)\monolib_splitter.obj & + $(OBJS)\monolib_srchctlg.obj & + $(OBJS)\monolib_statbmpg.obj & + $(OBJS)\monolib_stattextg.obj & + $(OBJS)\monolib_textdlgg.obj & + $(OBJS)\monolib_tipwin.obj & + $(OBJS)\monolib_toolbkg.obj & + $(OBJS)\monolib_treectlg.obj & + $(OBJS)\monolib_treebkg.obj & + $(OBJS)\monolib_vlbox.obj & + $(OBJS)\monolib_vscroll.obj & + $(OBJS)\monolib_xmlreshandler.obj +!endif +!endif +____ADVANCED_SRC_FILENAMES_1_OBJECTS = +!ifeq WXUNIV 0 +____ADVANCED_SRC_FILENAMES_1_OBJECTS = & + $(OBJS)\monolib_animatecmn.obj & + $(OBJS)\monolib_bmpcboxcmn.obj & + $(OBJS)\monolib_calctrlcmn.obj & + $(OBJS)\monolib_datavcmn.obj & + $(OBJS)\monolib_gridcmn.obj & + $(OBJS)\monolib_hyperlnkcmn.obj & + $(OBJS)\monolib_odcombocmn.obj & + $(OBJS)\monolib_richtooltipcmn.obj & + $(OBJS)\monolib_aboutdlgg.obj & + $(OBJS)\monolib_bannerwindow.obj & + $(OBJS)\monolib_bmpcboxg.obj & + $(OBJS)\monolib_calctrlg.obj & + $(OBJS)\monolib_commandlinkbuttong.obj & + $(OBJS)\monolib_datavgen.obj & + $(OBJS)\monolib_datectlg.obj & + $(OBJS)\monolib_editlbox.obj & + $(OBJS)\monolib_grid.obj & + $(OBJS)\monolib_gridctrl.obj & + $(OBJS)\monolib_grideditors.obj & + $(OBJS)\monolib_gridsel.obj & + $(OBJS)\monolib_helpext.obj & + $(OBJS)\monolib_hyperlinkg.obj & + $(OBJS)\monolib_laywin.obj & + $(OBJS)\monolib_notifmsgg.obj & + $(OBJS)\monolib_odcombo.obj & + $(OBJS)\monolib_propdlg.obj & + $(OBJS)\monolib_richtooltipg.obj & + $(OBJS)\monolib_sashwin.obj & + $(OBJS)\monolib_splash.obj & + $(OBJS)\monolib_timectrlg.obj & + $(OBJS)\monolib_tipdlg.obj & + $(OBJS)\monolib_treelist.obj & + $(OBJS)\monolib_wizard.obj & + $(OBJS)\monolib_taskbarcmn.obj & + $(OBJS)\monolib_aboutdlg.obj & + $(OBJS)\monolib_notifmsg.obj & + $(OBJS)\monolib_richtooltip.obj & + $(OBJS)\monolib_sound.obj & + $(OBJS)\monolib_taskbar.obj & + $(OBJS)\monolib_joystick.obj & + $(OBJS)\monolib_animateg.obj & + $(OBJS)\monolib_bmpcbox.obj & + $(OBJS)\monolib_calctrl.obj & + $(OBJS)\monolib_commandlinkbutton.obj & + $(OBJS)\monolib_datecontrols.obj & + $(OBJS)\monolib_datectrl.obj & + $(OBJS)\monolib_datetimectrl.obj & + $(OBJS)\monolib_hyperlink.obj & + $(OBJS)\monolib_timectrl.obj +!endif +!ifeq WXUNIV 1 +____ADVANCED_SRC_FILENAMES_1_OBJECTS = & + $(OBJS)\monolib_animatecmn.obj & + $(OBJS)\monolib_bmpcboxcmn.obj & + $(OBJS)\monolib_calctrlcmn.obj & + $(OBJS)\monolib_datavcmn.obj & + $(OBJS)\monolib_gridcmn.obj & + $(OBJS)\monolib_hyperlnkcmn.obj & + $(OBJS)\monolib_odcombocmn.obj & + $(OBJS)\monolib_richtooltipcmn.obj & + $(OBJS)\monolib_aboutdlgg.obj & + $(OBJS)\monolib_bannerwindow.obj & + $(OBJS)\monolib_bmpcboxg.obj & + $(OBJS)\monolib_calctrlg.obj & + $(OBJS)\monolib_commandlinkbuttong.obj & + $(OBJS)\monolib_datavgen.obj & + $(OBJS)\monolib_datectlg.obj & + $(OBJS)\monolib_editlbox.obj & + $(OBJS)\monolib_grid.obj & + $(OBJS)\monolib_gridctrl.obj & + $(OBJS)\monolib_grideditors.obj & + $(OBJS)\monolib_gridsel.obj & + $(OBJS)\monolib_helpext.obj & + $(OBJS)\monolib_hyperlinkg.obj & + $(OBJS)\monolib_laywin.obj & + $(OBJS)\monolib_notifmsgg.obj & + $(OBJS)\monolib_odcombo.obj & + $(OBJS)\monolib_propdlg.obj & + $(OBJS)\monolib_richtooltipg.obj & + $(OBJS)\monolib_sashwin.obj & + $(OBJS)\monolib_splash.obj & + $(OBJS)\monolib_timectrlg.obj & + $(OBJS)\monolib_tipdlg.obj & + $(OBJS)\monolib_treelist.obj & + $(OBJS)\monolib_wizard.obj & + $(OBJS)\monolib_taskbarcmn.obj & + $(OBJS)\monolib_aboutdlg.obj & + $(OBJS)\monolib_notifmsg.obj & + $(OBJS)\monolib_richtooltip.obj & + $(OBJS)\monolib_sound.obj & + $(OBJS)\monolib_taskbar.obj & + $(OBJS)\monolib_joystick.obj & + $(OBJS)\monolib_animateg.obj +!endif +__basedll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +__basedll___depname = & + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +__baselib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +__baselib___depname = & + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!endif +____wxbase_namedll_DEP = +!ifeq SHARED 1 +____wxbase_namedll_DEP = $(__basedll___depname) +!endif +____wxbase_namelib_DEP = +!ifeq SHARED 0 +____wxbase_namelib_DEP = $(__baselib___depname) +!endif +__netdll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +__netdll___depname = & + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +__netlib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +__netlib___depname = & + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib +!endif +!endif +____wxnet_namedll_DEP = +!ifeq SHARED 1 +____wxnet_namedll_DEP = $(__netdll___depname) +!endif +____wxnet_namelib_DEP = +!ifeq SHARED 0 +____wxnet_namelib_DEP = $(__netlib___depname) +!endif +__coredll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +__coredll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +____CORE_SRC_FILENAMES_2_OBJECTS = +!ifeq USE_GUI 1 +!ifeq WXUNIV 0 +____CORE_SRC_FILENAMES_2_OBJECTS = & + $(OBJS)\coredll_activex.obj & + $(OBJS)\coredll_app.obj & + $(OBJS)\coredll_bitmap.obj & + $(OBJS)\coredll_brush.obj & + $(OBJS)\coredll_caret.obj & + $(OBJS)\coredll_clipbrd.obj & + $(OBJS)\coredll_colour.obj & + $(OBJS)\coredll_cursor.obj & + $(OBJS)\coredll_data.obj & + $(OBJS)\coredll_dc.obj & + $(OBJS)\coredll_dcclient.obj & + $(OBJS)\coredll_dcmemory.obj & + $(OBJS)\coredll_dcprint.obj & + $(OBJS)\coredll_dcscreen.obj & + $(OBJS)\coredll_dialup.obj & + $(OBJS)\coredll_dib.obj & + $(OBJS)\coredll_display.obj & + $(OBJS)\coredll_enhmeta.obj & + $(OBJS)\coredll_font.obj & + $(OBJS)\coredll_fontenum.obj & + $(OBJS)\coredll_fontutil.obj & + $(OBJS)\coredll_gdiimage.obj & + $(OBJS)\coredll_gdiobj.obj & + $(OBJS)\coredll_gdiplus.obj & + $(OBJS)\coredll_graphics.obj & + $(OBJS)\coredll_icon.obj & + $(OBJS)\coredll_imaglist.obj & + $(OBJS)\coredll_minifram.obj & + $(OBJS)\coredll_nonownedwnd.obj & + $(OBJS)\coredll_dataobj.obj & + $(OBJS)\coredll_dropsrc.obj & + $(OBJS)\coredll_droptgt.obj & + $(OBJS)\coredll_oleutils.obj & + $(OBJS)\coredll_safearray.obj & + $(OBJS)\coredll_palette.obj & + $(OBJS)\coredll_pen.obj & + $(OBJS)\coredll_popupwin.obj & + $(OBJS)\coredll_printdlg.obj & + $(OBJS)\coredll_printwin.obj & + $(OBJS)\coredll_region.obj & + $(OBJS)\coredll_renderer.obj & + $(OBJS)\coredll_settings.obj & + $(OBJS)\coredll_textmeasure.obj & + $(OBJS)\coredll_tooltip.obj & + $(OBJS)\coredll_toplevel.obj & + $(OBJS)\coredll_uiaction.obj & + $(OBJS)\coredll_utilsgui.obj & + $(OBJS)\coredll_utilswin.obj & + $(OBJS)\coredll_uxtheme.obj & + $(OBJS)\coredll_window.obj & + $(OBJS)\coredll_helpchm.obj & + $(OBJS)\coredll_helpwin.obj & + $(OBJS)\coredll_automtn.obj & + $(OBJS)\coredll_uuid.obj & + $(OBJS)\coredll_clrpickerg.obj & + $(OBJS)\coredll_collpaneg.obj & + $(OBJS)\coredll_filepickerg.obj & + $(OBJS)\coredll_fontpickerg.obj & + $(OBJS)\coredll_generic_statusbr.obj & + $(OBJS)\coredll_prntdlgg.obj & + $(OBJS)\coredll_msw_accel.obj & + $(OBJS)\coredll_anybutton.obj & + $(OBJS)\coredll_artmsw.obj & + $(OBJS)\coredll_msw_bmpbuttn.obj & + $(OBJS)\coredll_msw_button.obj & + $(OBJS)\coredll_msw_checkbox.obj & + $(OBJS)\coredll_msw_choice.obj & + $(OBJS)\coredll_colordlg.obj & + $(OBJS)\coredll_combo.obj & + $(OBJS)\coredll_msw_combobox.obj & + $(OBJS)\coredll_msw_control.obj & + $(OBJS)\coredll_msw_dialog.obj & + $(OBJS)\coredll_dirdlg.obj & + $(OBJS)\coredll_dragimag.obj & + $(OBJS)\coredll_evtloop.obj & + $(OBJS)\coredll_filedlg.obj & + $(OBJS)\coredll_frame.obj & + $(OBJS)\coredll_msw_gauge.obj & + $(OBJS)\coredll_headerctrl.obj & + $(OBJS)\coredll_iniconf.obj & + $(OBJS)\coredll_msw_listbox.obj & + $(OBJS)\coredll_msw_listctrl.obj & + $(OBJS)\coredll_mdi.obj & + $(OBJS)\coredll_msw_menu.obj & + $(OBJS)\coredll_menuitem.obj & + $(OBJS)\coredll_metafile.obj & + $(OBJS)\coredll_msgdlg.obj & + $(OBJS)\coredll_nativdlg.obj & + $(OBJS)\coredll_nativewin.obj & + $(OBJS)\coredll_msw_notebook.obj & + $(OBJS)\coredll_access.obj & + $(OBJS)\coredll_ownerdrw.obj & + $(OBJS)\coredll_panel.obj & + $(OBJS)\coredll_progdlg.obj & + $(OBJS)\coredll_msw_radiobox.obj & + $(OBJS)\coredll_msw_radiobut.obj & + $(OBJS)\coredll_richmsgdlg.obj & + $(OBJS)\coredll_msw_scrolbar.obj & + $(OBJS)\coredll_msw_slider.obj & + $(OBJS)\coredll_msw_spinbutt.obj & + $(OBJS)\coredll_spinctrl.obj & + $(OBJS)\coredll_msw_statbmp.obj & + $(OBJS)\coredll_msw_statbox.obj & + $(OBJS)\coredll_statusbar.obj & + $(OBJS)\coredll_msw_statline.obj & + $(OBJS)\coredll_msw_stattext.obj & + $(OBJS)\coredll_msw_toolbar.obj & + $(OBJS)\coredll_msw_textctrl.obj & + $(OBJS)\coredll_textentry.obj & + $(OBJS)\coredll_msw_tglbtn.obj & + $(OBJS)\coredll_treectrl.obj & + $(OBJS)\coredll_msw_checklst.obj & + $(OBJS)\coredll_msw_fdrepdlg.obj & + $(OBJS)\coredll_fontdlg.obj & + $(OBJS)\coredll_accelcmn.obj & + $(OBJS)\coredll_accesscmn.obj & + $(OBJS)\coredll_anidecod.obj & + $(OBJS)\coredll_affinematrix2d.obj & + $(OBJS)\coredll_appcmn.obj & + $(OBJS)\coredll_artprov.obj & + $(OBJS)\coredll_artstd.obj & + $(OBJS)\coredll_arttango.obj & + $(OBJS)\coredll_bmpbase.obj & + $(OBJS)\coredll_bmpbtncmn.obj & + $(OBJS)\coredll_bookctrl.obj & + $(OBJS)\coredll_btncmn.obj & + $(OBJS)\coredll_cairo.obj & + $(OBJS)\coredll_checkboxcmn.obj & + $(OBJS)\coredll_checklstcmn.obj & + $(OBJS)\coredll_choiccmn.obj & + $(OBJS)\coredll_clipcmn.obj & + $(OBJS)\coredll_clrpickercmn.obj & + $(OBJS)\coredll_colourcmn.obj & + $(OBJS)\coredll_colourdata.obj & + $(OBJS)\coredll_combocmn.obj & + $(OBJS)\coredll_cmdproc.obj & + $(OBJS)\coredll_cmndata.obj & + $(OBJS)\coredll_containr.obj & + $(OBJS)\coredll_cshelp.obj & + $(OBJS)\coredll_ctrlcmn.obj & + $(OBJS)\coredll_ctrlsub.obj & + $(OBJS)\coredll_dcbase.obj & + $(OBJS)\coredll_dcbufcmn.obj & + $(OBJS)\coredll_dcgraph.obj & + $(OBJS)\coredll_dcsvg.obj & + $(OBJS)\coredll_dirctrlcmn.obj & + $(OBJS)\coredll_dlgcmn.obj & + $(OBJS)\coredll_dndcmn.obj & + $(OBJS)\coredll_dobjcmn.obj & + $(OBJS)\coredll_docmdi.obj & + $(OBJS)\coredll_docview.obj & + $(OBJS)\coredll_dpycmn.obj & + $(OBJS)\coredll_dseldlg.obj & + $(OBJS)\coredll_effects.obj & + $(OBJS)\coredll_fddlgcmn.obj & + $(OBJS)\coredll_filectrlcmn.obj & + $(OBJS)\coredll_filehistorycmn.obj & + $(OBJS)\coredll_filepickercmn.obj & + $(OBJS)\coredll_fontpickercmn.obj & + $(OBJS)\coredll_fldlgcmn.obj & + $(OBJS)\coredll_fontcmn.obj & + $(OBJS)\coredll_fontdata.obj & + $(OBJS)\coredll_graphicc.obj & + $(OBJS)\coredll_fontenumcmn.obj & + $(OBJS)\coredll_fontmap.obj & + $(OBJS)\coredll_fontutilcmn.obj & + $(OBJS)\coredll_framecmn.obj & + $(OBJS)\coredll_gaugecmn.obj & + $(OBJS)\coredll_gbsizer.obj & + $(OBJS)\coredll_gdicmn.obj & + $(OBJS)\coredll_geometry.obj & + $(OBJS)\coredll_gifdecod.obj & + $(OBJS)\coredll_graphcmn.obj & + $(OBJS)\coredll_headercolcmn.obj & + $(OBJS)\coredll_headerctrlcmn.obj & + $(OBJS)\coredll_helpbase.obj & + $(OBJS)\coredll_iconbndl.obj & + $(OBJS)\coredll_imagall.obj & + $(OBJS)\coredll_imagbmp.obj & + $(OBJS)\coredll_image.obj & + $(OBJS)\coredll_imagfill.obj & + $(OBJS)\coredll_imaggif.obj & + $(OBJS)\coredll_imagiff.obj & + $(OBJS)\coredll_imagjpeg.obj & + $(OBJS)\coredll_imagpcx.obj & + $(OBJS)\coredll_imagpng.obj & + $(OBJS)\coredll_imagpnm.obj & + $(OBJS)\coredll_imagtga.obj & + $(OBJS)\coredll_imagtiff.obj & + $(OBJS)\coredll_imagxpm.obj & + $(OBJS)\coredll_layout.obj & + $(OBJS)\coredll_lboxcmn.obj & + $(OBJS)\coredll_listctrlcmn.obj & + $(OBJS)\coredll_markupparser.obj & + $(OBJS)\coredll_matrix.obj & + $(OBJS)\coredll_menucmn.obj & + $(OBJS)\coredll_modalhook.obj & + $(OBJS)\coredll_mousemanager.obj & + $(OBJS)\coredll_nbkbase.obj & + $(OBJS)\coredll_overlaycmn.obj & + $(OBJS)\coredll_ownerdrwcmn.obj & + $(OBJS)\coredll_paper.obj & + $(OBJS)\coredll_panelcmn.obj & + $(OBJS)\coredll_persist.obj & + $(OBJS)\coredll_pickerbase.obj & + $(OBJS)\coredll_popupcmn.obj & + $(OBJS)\coredll_preferencescmn.obj & + $(OBJS)\coredll_prntbase.obj & + $(OBJS)\coredll_quantize.obj & + $(OBJS)\coredll_radiobtncmn.obj & + $(OBJS)\coredll_radiocmn.obj & + $(OBJS)\coredll_rearrangectrl.obj & + $(OBJS)\coredll_rendcmn.obj & + $(OBJS)\coredll_rgncmn.obj & + $(OBJS)\coredll_scrolbarcmn.obj & + $(OBJS)\coredll_settcmn.obj & + $(OBJS)\coredll_sizer.obj & + $(OBJS)\coredll_slidercmn.obj & + $(OBJS)\coredll_spinbtncmn.obj & + $(OBJS)\coredll_spinctrlcmn.obj & + $(OBJS)\coredll_srchcmn.obj & + $(OBJS)\coredll_statbar.obj & + $(OBJS)\coredll_statbmpcmn.obj & + $(OBJS)\coredll_statboxcmn.obj & + $(OBJS)\coredll_statlinecmn.obj & + $(OBJS)\coredll_stattextcmn.obj & + $(OBJS)\coredll_stockitem.obj & + $(OBJS)\coredll_tbarbase.obj & + $(OBJS)\coredll_textcmn.obj & + $(OBJS)\coredll_textentrycmn.obj & + $(OBJS)\coredll_textmeasurecmn.obj & + $(OBJS)\coredll_toplvcmn.obj & + $(OBJS)\coredll_treebase.obj & + $(OBJS)\coredll_uiactioncmn.obj & + $(OBJS)\coredll_valgen.obj & + $(OBJS)\coredll_validate.obj & + $(OBJS)\coredll_valtext.obj & + $(OBJS)\coredll_valnum.obj & + $(OBJS)\coredll_wincmn.obj & + $(OBJS)\coredll_windowid.obj & + $(OBJS)\coredll_wrapsizer.obj & + $(OBJS)\coredll_xpmdecod.obj & + $(OBJS)\coredll_busyinfo.obj & + $(OBJS)\coredll_buttonbar.obj & + $(OBJS)\coredll_choicdgg.obj & + $(OBJS)\coredll_choicbkg.obj & + $(OBJS)\coredll_combog.obj & + $(OBJS)\coredll_dcpsg.obj & + $(OBJS)\coredll_dirctrlg.obj & + $(OBJS)\coredll_dragimgg.obj & + $(OBJS)\coredll_filectrlg.obj & + $(OBJS)\coredll_headerctrlg.obj & + $(OBJS)\coredll_infobar.obj & + $(OBJS)\coredll_listbkg.obj & + $(OBJS)\coredll_logg.obj & + $(OBJS)\coredll_markuptext.obj & + $(OBJS)\coredll_msgdlgg.obj & + $(OBJS)\coredll_numdlgg.obj & + $(OBJS)\coredll_progdlgg.obj & + $(OBJS)\coredll_preferencesg.obj & + $(OBJS)\coredll_printps.obj & + $(OBJS)\coredll_renderg.obj & + $(OBJS)\coredll_richmsgdlgg.obj & + $(OBJS)\coredll_scrlwing.obj & + $(OBJS)\coredll_selstore.obj & + $(OBJS)\coredll_spinctlg.obj & + $(OBJS)\coredll_splitter.obj & + $(OBJS)\coredll_srchctlg.obj & + $(OBJS)\coredll_statbmpg.obj & + $(OBJS)\coredll_stattextg.obj & + $(OBJS)\coredll_textdlgg.obj & + $(OBJS)\coredll_tipwin.obj & + $(OBJS)\coredll_toolbkg.obj & + $(OBJS)\coredll_treectlg.obj & + $(OBJS)\coredll_treebkg.obj & + $(OBJS)\coredll_vlbox.obj & + $(OBJS)\coredll_vscroll.obj & + $(OBJS)\coredll_xmlreshandler.obj +!endif +!endif +!ifeq USE_GUI 1 +!ifeq WXUNIV 1 +____CORE_SRC_FILENAMES_2_OBJECTS = & + $(OBJS)\coredll_activex.obj & + $(OBJS)\coredll_app.obj & + $(OBJS)\coredll_bitmap.obj & + $(OBJS)\coredll_brush.obj & + $(OBJS)\coredll_caret.obj & + $(OBJS)\coredll_clipbrd.obj & + $(OBJS)\coredll_colour.obj & + $(OBJS)\coredll_cursor.obj & + $(OBJS)\coredll_data.obj & + $(OBJS)\coredll_dc.obj & + $(OBJS)\coredll_dcclient.obj & + $(OBJS)\coredll_dcmemory.obj & + $(OBJS)\coredll_dcprint.obj & + $(OBJS)\coredll_dcscreen.obj & + $(OBJS)\coredll_dialup.obj & + $(OBJS)\coredll_dib.obj & + $(OBJS)\coredll_display.obj & + $(OBJS)\coredll_enhmeta.obj & + $(OBJS)\coredll_font.obj & + $(OBJS)\coredll_fontenum.obj & + $(OBJS)\coredll_fontutil.obj & + $(OBJS)\coredll_gdiimage.obj & + $(OBJS)\coredll_gdiobj.obj & + $(OBJS)\coredll_gdiplus.obj & + $(OBJS)\coredll_graphics.obj & + $(OBJS)\coredll_icon.obj & + $(OBJS)\coredll_imaglist.obj & + $(OBJS)\coredll_minifram.obj & + $(OBJS)\coredll_nonownedwnd.obj & + $(OBJS)\coredll_dataobj.obj & + $(OBJS)\coredll_dropsrc.obj & + $(OBJS)\coredll_droptgt.obj & + $(OBJS)\coredll_oleutils.obj & + $(OBJS)\coredll_safearray.obj & + $(OBJS)\coredll_palette.obj & + $(OBJS)\coredll_pen.obj & + $(OBJS)\coredll_popupwin.obj & + $(OBJS)\coredll_printdlg.obj & + $(OBJS)\coredll_printwin.obj & + $(OBJS)\coredll_region.obj & + $(OBJS)\coredll_renderer.obj & + $(OBJS)\coredll_settings.obj & + $(OBJS)\coredll_textmeasure.obj & + $(OBJS)\coredll_tooltip.obj & + $(OBJS)\coredll_toplevel.obj & + $(OBJS)\coredll_uiaction.obj & + $(OBJS)\coredll_utilsgui.obj & + $(OBJS)\coredll_utilswin.obj & + $(OBJS)\coredll_uxtheme.obj & + $(OBJS)\coredll_window.obj & + $(OBJS)\coredll_helpchm.obj & + $(OBJS)\coredll_helpwin.obj & + $(OBJS)\coredll_automtn.obj & + $(OBJS)\coredll_uuid.obj & + $(OBJS)\coredll_evtloop.obj & + $(OBJS)\coredll_generic_accel.obj & + $(OBJS)\coredll_clrpickerg.obj & + $(OBJS)\coredll_collpaneg.obj & + $(OBJS)\coredll_colrdlgg.obj & + $(OBJS)\coredll_dirdlgg.obj & + $(OBJS)\coredll_generic_fdrepdlg.obj & + $(OBJS)\coredll_filedlgg.obj & + $(OBJS)\coredll_filepickerg.obj & + $(OBJS)\coredll_fontdlgg.obj & + $(OBJS)\coredll_fontpickerg.obj & + $(OBJS)\coredll_generic_listctrl.obj & + $(OBJS)\coredll_mdig.obj & + $(OBJS)\coredll_prntdlgg.obj & + $(OBJS)\coredll_univ_bmpbuttn.obj & + $(OBJS)\coredll_univ_button.obj & + $(OBJS)\coredll_univ_checkbox.obj & + $(OBJS)\coredll_univ_checklst.obj & + $(OBJS)\coredll_univ_choice.obj & + $(OBJS)\coredll_univ_combobox.obj & + $(OBJS)\coredll_univ_control.obj & + $(OBJS)\coredll_ctrlrend.obj & + $(OBJS)\coredll_univ_dialog.obj & + $(OBJS)\coredll_framuniv.obj & + $(OBJS)\coredll_univ_gauge.obj & + $(OBJS)\coredll_inpcons.obj & + $(OBJS)\coredll_inphand.obj & + $(OBJS)\coredll_univ_listbox.obj & + $(OBJS)\coredll_univ_menu.obj & + $(OBJS)\coredll_univ_notebook.obj & + $(OBJS)\coredll_univ_radiobox.obj & + $(OBJS)\coredll_univ_radiobut.obj & + $(OBJS)\coredll_scrarrow.obj & + $(OBJS)\coredll_univ_scrolbar.obj & + $(OBJS)\coredll_scrthumb.obj & + $(OBJS)\coredll_settingsuniv.obj & + $(OBJS)\coredll_univ_slider.obj & + $(OBJS)\coredll_univ_spinbutt.obj & + $(OBJS)\coredll_univ_statbmp.obj & + $(OBJS)\coredll_univ_statbox.obj & + $(OBJS)\coredll_univ_statline.obj & + $(OBJS)\coredll_univ_stattext.obj & + $(OBJS)\coredll_univ_statusbr.obj & + $(OBJS)\coredll_stdrend.obj & + $(OBJS)\coredll_univ_textctrl.obj & + $(OBJS)\coredll_univ_tglbtn.obj & + $(OBJS)\coredll_theme.obj & + $(OBJS)\coredll_univ_toolbar.obj & + $(OBJS)\coredll_topluniv.obj & + $(OBJS)\coredll_winuniv.obj & + $(OBJS)\coredll_gtk.obj & + $(OBJS)\coredll_metal.obj & + $(OBJS)\coredll_mono.obj & + $(OBJS)\coredll_win32.obj & + $(OBJS)\coredll_accelcmn.obj & + $(OBJS)\coredll_accesscmn.obj & + $(OBJS)\coredll_anidecod.obj & + $(OBJS)\coredll_affinematrix2d.obj & + $(OBJS)\coredll_appcmn.obj & + $(OBJS)\coredll_artprov.obj & + $(OBJS)\coredll_artstd.obj & + $(OBJS)\coredll_arttango.obj & + $(OBJS)\coredll_bmpbase.obj & + $(OBJS)\coredll_bmpbtncmn.obj & + $(OBJS)\coredll_bookctrl.obj & + $(OBJS)\coredll_btncmn.obj & + $(OBJS)\coredll_cairo.obj & + $(OBJS)\coredll_checkboxcmn.obj & + $(OBJS)\coredll_checklstcmn.obj & + $(OBJS)\coredll_choiccmn.obj & + $(OBJS)\coredll_clipcmn.obj & + $(OBJS)\coredll_clrpickercmn.obj & + $(OBJS)\coredll_colourcmn.obj & + $(OBJS)\coredll_colourdata.obj & + $(OBJS)\coredll_combocmn.obj & + $(OBJS)\coredll_cmdproc.obj & + $(OBJS)\coredll_cmndata.obj & + $(OBJS)\coredll_containr.obj & + $(OBJS)\coredll_cshelp.obj & + $(OBJS)\coredll_ctrlcmn.obj & + $(OBJS)\coredll_ctrlsub.obj & + $(OBJS)\coredll_dcbase.obj & + $(OBJS)\coredll_dcbufcmn.obj & + $(OBJS)\coredll_dcgraph.obj & + $(OBJS)\coredll_dcsvg.obj & + $(OBJS)\coredll_dirctrlcmn.obj & + $(OBJS)\coredll_dlgcmn.obj & + $(OBJS)\coredll_dndcmn.obj & + $(OBJS)\coredll_dobjcmn.obj & + $(OBJS)\coredll_docmdi.obj & + $(OBJS)\coredll_docview.obj & + $(OBJS)\coredll_dpycmn.obj & + $(OBJS)\coredll_dseldlg.obj & + $(OBJS)\coredll_effects.obj & + $(OBJS)\coredll_fddlgcmn.obj & + $(OBJS)\coredll_filectrlcmn.obj & + $(OBJS)\coredll_filehistorycmn.obj & + $(OBJS)\coredll_filepickercmn.obj & + $(OBJS)\coredll_fontpickercmn.obj & + $(OBJS)\coredll_fldlgcmn.obj & + $(OBJS)\coredll_fontcmn.obj & + $(OBJS)\coredll_fontdata.obj & + $(OBJS)\coredll_graphicc.obj & + $(OBJS)\coredll_fontenumcmn.obj & + $(OBJS)\coredll_fontmap.obj & + $(OBJS)\coredll_fontutilcmn.obj & + $(OBJS)\coredll_framecmn.obj & + $(OBJS)\coredll_gaugecmn.obj & + $(OBJS)\coredll_gbsizer.obj & + $(OBJS)\coredll_gdicmn.obj & + $(OBJS)\coredll_geometry.obj & + $(OBJS)\coredll_gifdecod.obj & + $(OBJS)\coredll_graphcmn.obj & + $(OBJS)\coredll_headercolcmn.obj & + $(OBJS)\coredll_headerctrlcmn.obj & + $(OBJS)\coredll_helpbase.obj & + $(OBJS)\coredll_iconbndl.obj & + $(OBJS)\coredll_imagall.obj & + $(OBJS)\coredll_imagbmp.obj & + $(OBJS)\coredll_image.obj & + $(OBJS)\coredll_imagfill.obj & + $(OBJS)\coredll_imaggif.obj & + $(OBJS)\coredll_imagiff.obj & + $(OBJS)\coredll_imagjpeg.obj & + $(OBJS)\coredll_imagpcx.obj & + $(OBJS)\coredll_imagpng.obj & + $(OBJS)\coredll_imagpnm.obj & + $(OBJS)\coredll_imagtga.obj & + $(OBJS)\coredll_imagtiff.obj & + $(OBJS)\coredll_imagxpm.obj & + $(OBJS)\coredll_layout.obj & + $(OBJS)\coredll_lboxcmn.obj & + $(OBJS)\coredll_listctrlcmn.obj & + $(OBJS)\coredll_markupparser.obj & + $(OBJS)\coredll_matrix.obj & + $(OBJS)\coredll_menucmn.obj & + $(OBJS)\coredll_modalhook.obj & + $(OBJS)\coredll_mousemanager.obj & + $(OBJS)\coredll_nbkbase.obj & + $(OBJS)\coredll_overlaycmn.obj & + $(OBJS)\coredll_ownerdrwcmn.obj & + $(OBJS)\coredll_paper.obj & + $(OBJS)\coredll_panelcmn.obj & + $(OBJS)\coredll_persist.obj & + $(OBJS)\coredll_pickerbase.obj & + $(OBJS)\coredll_popupcmn.obj & + $(OBJS)\coredll_preferencescmn.obj & + $(OBJS)\coredll_prntbase.obj & + $(OBJS)\coredll_quantize.obj & + $(OBJS)\coredll_radiobtncmn.obj & + $(OBJS)\coredll_radiocmn.obj & + $(OBJS)\coredll_rearrangectrl.obj & + $(OBJS)\coredll_rendcmn.obj & + $(OBJS)\coredll_rgncmn.obj & + $(OBJS)\coredll_scrolbarcmn.obj & + $(OBJS)\coredll_settcmn.obj & + $(OBJS)\coredll_sizer.obj & + $(OBJS)\coredll_slidercmn.obj & + $(OBJS)\coredll_spinbtncmn.obj & + $(OBJS)\coredll_spinctrlcmn.obj & + $(OBJS)\coredll_srchcmn.obj & + $(OBJS)\coredll_statbar.obj & + $(OBJS)\coredll_statbmpcmn.obj & + $(OBJS)\coredll_statboxcmn.obj & + $(OBJS)\coredll_statlinecmn.obj & + $(OBJS)\coredll_stattextcmn.obj & + $(OBJS)\coredll_stockitem.obj & + $(OBJS)\coredll_tbarbase.obj & + $(OBJS)\coredll_textcmn.obj & + $(OBJS)\coredll_textentrycmn.obj & + $(OBJS)\coredll_textmeasurecmn.obj & + $(OBJS)\coredll_toplvcmn.obj & + $(OBJS)\coredll_treebase.obj & + $(OBJS)\coredll_uiactioncmn.obj & + $(OBJS)\coredll_valgen.obj & + $(OBJS)\coredll_validate.obj & + $(OBJS)\coredll_valtext.obj & + $(OBJS)\coredll_valnum.obj & + $(OBJS)\coredll_wincmn.obj & + $(OBJS)\coredll_windowid.obj & + $(OBJS)\coredll_wrapsizer.obj & + $(OBJS)\coredll_xpmdecod.obj & + $(OBJS)\coredll_busyinfo.obj & + $(OBJS)\coredll_buttonbar.obj & + $(OBJS)\coredll_choicdgg.obj & + $(OBJS)\coredll_choicbkg.obj & + $(OBJS)\coredll_combog.obj & + $(OBJS)\coredll_dcpsg.obj & + $(OBJS)\coredll_dirctrlg.obj & + $(OBJS)\coredll_dragimgg.obj & + $(OBJS)\coredll_filectrlg.obj & + $(OBJS)\coredll_headerctrlg.obj & + $(OBJS)\coredll_infobar.obj & + $(OBJS)\coredll_listbkg.obj & + $(OBJS)\coredll_logg.obj & + $(OBJS)\coredll_markuptext.obj & + $(OBJS)\coredll_msgdlgg.obj & + $(OBJS)\coredll_numdlgg.obj & + $(OBJS)\coredll_progdlgg.obj & + $(OBJS)\coredll_preferencesg.obj & + $(OBJS)\coredll_printps.obj & + $(OBJS)\coredll_renderg.obj & + $(OBJS)\coredll_richmsgdlgg.obj & + $(OBJS)\coredll_scrlwing.obj & + $(OBJS)\coredll_selstore.obj & + $(OBJS)\coredll_spinctlg.obj & + $(OBJS)\coredll_splitter.obj & + $(OBJS)\coredll_srchctlg.obj & + $(OBJS)\coredll_statbmpg.obj & + $(OBJS)\coredll_stattextg.obj & + $(OBJS)\coredll_textdlgg.obj & + $(OBJS)\coredll_tipwin.obj & + $(OBJS)\coredll_toolbkg.obj & + $(OBJS)\coredll_treectlg.obj & + $(OBJS)\coredll_treebkg.obj & + $(OBJS)\coredll_vlbox.obj & + $(OBJS)\coredll_vscroll.obj & + $(OBJS)\coredll_xmlreshandler.obj +!endif +!endif +__corelib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +__corelib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +!endif +!endif +!endif +____CORE_SRC_FILENAMES_3_OBJECTS = +!ifeq USE_GUI 1 +!ifeq WXUNIV 0 +____CORE_SRC_FILENAMES_3_OBJECTS = & + $(OBJS)\corelib_activex.obj & + $(OBJS)\corelib_app.obj & + $(OBJS)\corelib_bitmap.obj & + $(OBJS)\corelib_brush.obj & + $(OBJS)\corelib_caret.obj & + $(OBJS)\corelib_clipbrd.obj & + $(OBJS)\corelib_colour.obj & + $(OBJS)\corelib_cursor.obj & + $(OBJS)\corelib_data.obj & + $(OBJS)\corelib_dc.obj & + $(OBJS)\corelib_dcclient.obj & + $(OBJS)\corelib_dcmemory.obj & + $(OBJS)\corelib_dcprint.obj & + $(OBJS)\corelib_dcscreen.obj & + $(OBJS)\corelib_dialup.obj & + $(OBJS)\corelib_dib.obj & + $(OBJS)\corelib_display.obj & + $(OBJS)\corelib_enhmeta.obj & + $(OBJS)\corelib_font.obj & + $(OBJS)\corelib_fontenum.obj & + $(OBJS)\corelib_fontutil.obj & + $(OBJS)\corelib_gdiimage.obj & + $(OBJS)\corelib_gdiobj.obj & + $(OBJS)\corelib_gdiplus.obj & + $(OBJS)\corelib_graphics.obj & + $(OBJS)\corelib_icon.obj & + $(OBJS)\corelib_imaglist.obj & + $(OBJS)\corelib_minifram.obj & + $(OBJS)\corelib_nonownedwnd.obj & + $(OBJS)\corelib_dataobj.obj & + $(OBJS)\corelib_dropsrc.obj & + $(OBJS)\corelib_droptgt.obj & + $(OBJS)\corelib_oleutils.obj & + $(OBJS)\corelib_safearray.obj & + $(OBJS)\corelib_palette.obj & + $(OBJS)\corelib_pen.obj & + $(OBJS)\corelib_popupwin.obj & + $(OBJS)\corelib_printdlg.obj & + $(OBJS)\corelib_printwin.obj & + $(OBJS)\corelib_region.obj & + $(OBJS)\corelib_renderer.obj & + $(OBJS)\corelib_settings.obj & + $(OBJS)\corelib_textmeasure.obj & + $(OBJS)\corelib_tooltip.obj & + $(OBJS)\corelib_toplevel.obj & + $(OBJS)\corelib_uiaction.obj & + $(OBJS)\corelib_utilsgui.obj & + $(OBJS)\corelib_utilswin.obj & + $(OBJS)\corelib_uxtheme.obj & + $(OBJS)\corelib_window.obj & + $(OBJS)\corelib_helpchm.obj & + $(OBJS)\corelib_helpwin.obj & + $(OBJS)\corelib_automtn.obj & + $(OBJS)\corelib_uuid.obj & + $(OBJS)\corelib_clrpickerg.obj & + $(OBJS)\corelib_collpaneg.obj & + $(OBJS)\corelib_filepickerg.obj & + $(OBJS)\corelib_fontpickerg.obj & + $(OBJS)\corelib_generic_statusbr.obj & + $(OBJS)\corelib_prntdlgg.obj & + $(OBJS)\corelib_msw_accel.obj & + $(OBJS)\corelib_anybutton.obj & + $(OBJS)\corelib_artmsw.obj & + $(OBJS)\corelib_msw_bmpbuttn.obj & + $(OBJS)\corelib_msw_button.obj & + $(OBJS)\corelib_msw_checkbox.obj & + $(OBJS)\corelib_msw_choice.obj & + $(OBJS)\corelib_colordlg.obj & + $(OBJS)\corelib_combo.obj & + $(OBJS)\corelib_msw_combobox.obj & + $(OBJS)\corelib_msw_control.obj & + $(OBJS)\corelib_msw_dialog.obj & + $(OBJS)\corelib_dirdlg.obj & + $(OBJS)\corelib_dragimag.obj & + $(OBJS)\corelib_evtloop.obj & + $(OBJS)\corelib_filedlg.obj & + $(OBJS)\corelib_frame.obj & + $(OBJS)\corelib_msw_gauge.obj & + $(OBJS)\corelib_headerctrl.obj & + $(OBJS)\corelib_iniconf.obj & + $(OBJS)\corelib_msw_listbox.obj & + $(OBJS)\corelib_msw_listctrl.obj & + $(OBJS)\corelib_mdi.obj & + $(OBJS)\corelib_msw_menu.obj & + $(OBJS)\corelib_menuitem.obj & + $(OBJS)\corelib_metafile.obj & + $(OBJS)\corelib_msgdlg.obj & + $(OBJS)\corelib_nativdlg.obj & + $(OBJS)\corelib_nativewin.obj & + $(OBJS)\corelib_msw_notebook.obj & + $(OBJS)\corelib_access.obj & + $(OBJS)\corelib_ownerdrw.obj & + $(OBJS)\corelib_panel.obj & + $(OBJS)\corelib_progdlg.obj & + $(OBJS)\corelib_msw_radiobox.obj & + $(OBJS)\corelib_msw_radiobut.obj & + $(OBJS)\corelib_richmsgdlg.obj & + $(OBJS)\corelib_msw_scrolbar.obj & + $(OBJS)\corelib_msw_slider.obj & + $(OBJS)\corelib_msw_spinbutt.obj & + $(OBJS)\corelib_spinctrl.obj & + $(OBJS)\corelib_msw_statbmp.obj & + $(OBJS)\corelib_msw_statbox.obj & + $(OBJS)\corelib_statusbar.obj & + $(OBJS)\corelib_msw_statline.obj & + $(OBJS)\corelib_msw_stattext.obj & + $(OBJS)\corelib_msw_toolbar.obj & + $(OBJS)\corelib_msw_textctrl.obj & + $(OBJS)\corelib_textentry.obj & + $(OBJS)\corelib_msw_tglbtn.obj & + $(OBJS)\corelib_treectrl.obj & + $(OBJS)\corelib_msw_checklst.obj & + $(OBJS)\corelib_msw_fdrepdlg.obj & + $(OBJS)\corelib_fontdlg.obj & + $(OBJS)\corelib_accelcmn.obj & + $(OBJS)\corelib_accesscmn.obj & + $(OBJS)\corelib_anidecod.obj & + $(OBJS)\corelib_affinematrix2d.obj & + $(OBJS)\corelib_appcmn.obj & + $(OBJS)\corelib_artprov.obj & + $(OBJS)\corelib_artstd.obj & + $(OBJS)\corelib_arttango.obj & + $(OBJS)\corelib_bmpbase.obj & + $(OBJS)\corelib_bmpbtncmn.obj & + $(OBJS)\corelib_bookctrl.obj & + $(OBJS)\corelib_btncmn.obj & + $(OBJS)\corelib_cairo.obj & + $(OBJS)\corelib_checkboxcmn.obj & + $(OBJS)\corelib_checklstcmn.obj & + $(OBJS)\corelib_choiccmn.obj & + $(OBJS)\corelib_clipcmn.obj & + $(OBJS)\corelib_clrpickercmn.obj & + $(OBJS)\corelib_colourcmn.obj & + $(OBJS)\corelib_colourdata.obj & + $(OBJS)\corelib_combocmn.obj & + $(OBJS)\corelib_cmdproc.obj & + $(OBJS)\corelib_cmndata.obj & + $(OBJS)\corelib_containr.obj & + $(OBJS)\corelib_cshelp.obj & + $(OBJS)\corelib_ctrlcmn.obj & + $(OBJS)\corelib_ctrlsub.obj & + $(OBJS)\corelib_dcbase.obj & + $(OBJS)\corelib_dcbufcmn.obj & + $(OBJS)\corelib_dcgraph.obj & + $(OBJS)\corelib_dcsvg.obj & + $(OBJS)\corelib_dirctrlcmn.obj & + $(OBJS)\corelib_dlgcmn.obj & + $(OBJS)\corelib_dndcmn.obj & + $(OBJS)\corelib_dobjcmn.obj & + $(OBJS)\corelib_docmdi.obj & + $(OBJS)\corelib_docview.obj & + $(OBJS)\corelib_dpycmn.obj & + $(OBJS)\corelib_dseldlg.obj & + $(OBJS)\corelib_effects.obj & + $(OBJS)\corelib_fddlgcmn.obj & + $(OBJS)\corelib_filectrlcmn.obj & + $(OBJS)\corelib_filehistorycmn.obj & + $(OBJS)\corelib_filepickercmn.obj & + $(OBJS)\corelib_fontpickercmn.obj & + $(OBJS)\corelib_fldlgcmn.obj & + $(OBJS)\corelib_fontcmn.obj & + $(OBJS)\corelib_fontdata.obj & + $(OBJS)\corelib_graphicc.obj & + $(OBJS)\corelib_fontenumcmn.obj & + $(OBJS)\corelib_fontmap.obj & + $(OBJS)\corelib_fontutilcmn.obj & + $(OBJS)\corelib_framecmn.obj & + $(OBJS)\corelib_gaugecmn.obj & + $(OBJS)\corelib_gbsizer.obj & + $(OBJS)\corelib_gdicmn.obj & + $(OBJS)\corelib_geometry.obj & + $(OBJS)\corelib_gifdecod.obj & + $(OBJS)\corelib_graphcmn.obj & + $(OBJS)\corelib_headercolcmn.obj & + $(OBJS)\corelib_headerctrlcmn.obj & + $(OBJS)\corelib_helpbase.obj & + $(OBJS)\corelib_iconbndl.obj & + $(OBJS)\corelib_imagall.obj & + $(OBJS)\corelib_imagbmp.obj & + $(OBJS)\corelib_image.obj & + $(OBJS)\corelib_imagfill.obj & + $(OBJS)\corelib_imaggif.obj & + $(OBJS)\corelib_imagiff.obj & + $(OBJS)\corelib_imagjpeg.obj & + $(OBJS)\corelib_imagpcx.obj & + $(OBJS)\corelib_imagpng.obj & + $(OBJS)\corelib_imagpnm.obj & + $(OBJS)\corelib_imagtga.obj & + $(OBJS)\corelib_imagtiff.obj & + $(OBJS)\corelib_imagxpm.obj & + $(OBJS)\corelib_layout.obj & + $(OBJS)\corelib_lboxcmn.obj & + $(OBJS)\corelib_listctrlcmn.obj & + $(OBJS)\corelib_markupparser.obj & + $(OBJS)\corelib_matrix.obj & + $(OBJS)\corelib_menucmn.obj & + $(OBJS)\corelib_modalhook.obj & + $(OBJS)\corelib_mousemanager.obj & + $(OBJS)\corelib_nbkbase.obj & + $(OBJS)\corelib_overlaycmn.obj & + $(OBJS)\corelib_ownerdrwcmn.obj & + $(OBJS)\corelib_paper.obj & + $(OBJS)\corelib_panelcmn.obj & + $(OBJS)\corelib_persist.obj & + $(OBJS)\corelib_pickerbase.obj & + $(OBJS)\corelib_popupcmn.obj & + $(OBJS)\corelib_preferencescmn.obj & + $(OBJS)\corelib_prntbase.obj & + $(OBJS)\corelib_quantize.obj & + $(OBJS)\corelib_radiobtncmn.obj & + $(OBJS)\corelib_radiocmn.obj & + $(OBJS)\corelib_rearrangectrl.obj & + $(OBJS)\corelib_rendcmn.obj & + $(OBJS)\corelib_rgncmn.obj & + $(OBJS)\corelib_scrolbarcmn.obj & + $(OBJS)\corelib_settcmn.obj & + $(OBJS)\corelib_sizer.obj & + $(OBJS)\corelib_slidercmn.obj & + $(OBJS)\corelib_spinbtncmn.obj & + $(OBJS)\corelib_spinctrlcmn.obj & + $(OBJS)\corelib_srchcmn.obj & + $(OBJS)\corelib_statbar.obj & + $(OBJS)\corelib_statbmpcmn.obj & + $(OBJS)\corelib_statboxcmn.obj & + $(OBJS)\corelib_statlinecmn.obj & + $(OBJS)\corelib_stattextcmn.obj & + $(OBJS)\corelib_stockitem.obj & + $(OBJS)\corelib_tbarbase.obj & + $(OBJS)\corelib_textcmn.obj & + $(OBJS)\corelib_textentrycmn.obj & + $(OBJS)\corelib_textmeasurecmn.obj & + $(OBJS)\corelib_toplvcmn.obj & + $(OBJS)\corelib_treebase.obj & + $(OBJS)\corelib_uiactioncmn.obj & + $(OBJS)\corelib_valgen.obj & + $(OBJS)\corelib_validate.obj & + $(OBJS)\corelib_valtext.obj & + $(OBJS)\corelib_valnum.obj & + $(OBJS)\corelib_wincmn.obj & + $(OBJS)\corelib_windowid.obj & + $(OBJS)\corelib_wrapsizer.obj & + $(OBJS)\corelib_xpmdecod.obj & + $(OBJS)\corelib_busyinfo.obj & + $(OBJS)\corelib_buttonbar.obj & + $(OBJS)\corelib_choicdgg.obj & + $(OBJS)\corelib_choicbkg.obj & + $(OBJS)\corelib_combog.obj & + $(OBJS)\corelib_dcpsg.obj & + $(OBJS)\corelib_dirctrlg.obj & + $(OBJS)\corelib_dragimgg.obj & + $(OBJS)\corelib_filectrlg.obj & + $(OBJS)\corelib_headerctrlg.obj & + $(OBJS)\corelib_infobar.obj & + $(OBJS)\corelib_listbkg.obj & + $(OBJS)\corelib_logg.obj & + $(OBJS)\corelib_markuptext.obj & + $(OBJS)\corelib_msgdlgg.obj & + $(OBJS)\corelib_numdlgg.obj & + $(OBJS)\corelib_progdlgg.obj & + $(OBJS)\corelib_preferencesg.obj & + $(OBJS)\corelib_printps.obj & + $(OBJS)\corelib_renderg.obj & + $(OBJS)\corelib_richmsgdlgg.obj & + $(OBJS)\corelib_scrlwing.obj & + $(OBJS)\corelib_selstore.obj & + $(OBJS)\corelib_spinctlg.obj & + $(OBJS)\corelib_splitter.obj & + $(OBJS)\corelib_srchctlg.obj & + $(OBJS)\corelib_statbmpg.obj & + $(OBJS)\corelib_stattextg.obj & + $(OBJS)\corelib_textdlgg.obj & + $(OBJS)\corelib_tipwin.obj & + $(OBJS)\corelib_toolbkg.obj & + $(OBJS)\corelib_treectlg.obj & + $(OBJS)\corelib_treebkg.obj & + $(OBJS)\corelib_vlbox.obj & + $(OBJS)\corelib_vscroll.obj & + $(OBJS)\corelib_xmlreshandler.obj +!endif +!endif +!ifeq USE_GUI 1 +!ifeq WXUNIV 1 +____CORE_SRC_FILENAMES_3_OBJECTS = & + $(OBJS)\corelib_activex.obj & + $(OBJS)\corelib_app.obj & + $(OBJS)\corelib_bitmap.obj & + $(OBJS)\corelib_brush.obj & + $(OBJS)\corelib_caret.obj & + $(OBJS)\corelib_clipbrd.obj & + $(OBJS)\corelib_colour.obj & + $(OBJS)\corelib_cursor.obj & + $(OBJS)\corelib_data.obj & + $(OBJS)\corelib_dc.obj & + $(OBJS)\corelib_dcclient.obj & + $(OBJS)\corelib_dcmemory.obj & + $(OBJS)\corelib_dcprint.obj & + $(OBJS)\corelib_dcscreen.obj & + $(OBJS)\corelib_dialup.obj & + $(OBJS)\corelib_dib.obj & + $(OBJS)\corelib_display.obj & + $(OBJS)\corelib_enhmeta.obj & + $(OBJS)\corelib_font.obj & + $(OBJS)\corelib_fontenum.obj & + $(OBJS)\corelib_fontutil.obj & + $(OBJS)\corelib_gdiimage.obj & + $(OBJS)\corelib_gdiobj.obj & + $(OBJS)\corelib_gdiplus.obj & + $(OBJS)\corelib_graphics.obj & + $(OBJS)\corelib_icon.obj & + $(OBJS)\corelib_imaglist.obj & + $(OBJS)\corelib_minifram.obj & + $(OBJS)\corelib_nonownedwnd.obj & + $(OBJS)\corelib_dataobj.obj & + $(OBJS)\corelib_dropsrc.obj & + $(OBJS)\corelib_droptgt.obj & + $(OBJS)\corelib_oleutils.obj & + $(OBJS)\corelib_safearray.obj & + $(OBJS)\corelib_palette.obj & + $(OBJS)\corelib_pen.obj & + $(OBJS)\corelib_popupwin.obj & + $(OBJS)\corelib_printdlg.obj & + $(OBJS)\corelib_printwin.obj & + $(OBJS)\corelib_region.obj & + $(OBJS)\corelib_renderer.obj & + $(OBJS)\corelib_settings.obj & + $(OBJS)\corelib_textmeasure.obj & + $(OBJS)\corelib_tooltip.obj & + $(OBJS)\corelib_toplevel.obj & + $(OBJS)\corelib_uiaction.obj & + $(OBJS)\corelib_utilsgui.obj & + $(OBJS)\corelib_utilswin.obj & + $(OBJS)\corelib_uxtheme.obj & + $(OBJS)\corelib_window.obj & + $(OBJS)\corelib_helpchm.obj & + $(OBJS)\corelib_helpwin.obj & + $(OBJS)\corelib_automtn.obj & + $(OBJS)\corelib_uuid.obj & + $(OBJS)\corelib_evtloop.obj & + $(OBJS)\corelib_generic_accel.obj & + $(OBJS)\corelib_clrpickerg.obj & + $(OBJS)\corelib_collpaneg.obj & + $(OBJS)\corelib_colrdlgg.obj & + $(OBJS)\corelib_dirdlgg.obj & + $(OBJS)\corelib_generic_fdrepdlg.obj & + $(OBJS)\corelib_filedlgg.obj & + $(OBJS)\corelib_filepickerg.obj & + $(OBJS)\corelib_fontdlgg.obj & + $(OBJS)\corelib_fontpickerg.obj & + $(OBJS)\corelib_generic_listctrl.obj & + $(OBJS)\corelib_mdig.obj & + $(OBJS)\corelib_prntdlgg.obj & + $(OBJS)\corelib_univ_bmpbuttn.obj & + $(OBJS)\corelib_univ_button.obj & + $(OBJS)\corelib_univ_checkbox.obj & + $(OBJS)\corelib_univ_checklst.obj & + $(OBJS)\corelib_univ_choice.obj & + $(OBJS)\corelib_univ_combobox.obj & + $(OBJS)\corelib_univ_control.obj & + $(OBJS)\corelib_ctrlrend.obj & + $(OBJS)\corelib_univ_dialog.obj & + $(OBJS)\corelib_framuniv.obj & + $(OBJS)\corelib_univ_gauge.obj & + $(OBJS)\corelib_inpcons.obj & + $(OBJS)\corelib_inphand.obj & + $(OBJS)\corelib_univ_listbox.obj & + $(OBJS)\corelib_univ_menu.obj & + $(OBJS)\corelib_univ_notebook.obj & + $(OBJS)\corelib_univ_radiobox.obj & + $(OBJS)\corelib_univ_radiobut.obj & + $(OBJS)\corelib_scrarrow.obj & + $(OBJS)\corelib_univ_scrolbar.obj & + $(OBJS)\corelib_scrthumb.obj & + $(OBJS)\corelib_settingsuniv.obj & + $(OBJS)\corelib_univ_slider.obj & + $(OBJS)\corelib_univ_spinbutt.obj & + $(OBJS)\corelib_univ_statbmp.obj & + $(OBJS)\corelib_univ_statbox.obj & + $(OBJS)\corelib_univ_statline.obj & + $(OBJS)\corelib_univ_stattext.obj & + $(OBJS)\corelib_univ_statusbr.obj & + $(OBJS)\corelib_stdrend.obj & + $(OBJS)\corelib_univ_textctrl.obj & + $(OBJS)\corelib_univ_tglbtn.obj & + $(OBJS)\corelib_theme.obj & + $(OBJS)\corelib_univ_toolbar.obj & + $(OBJS)\corelib_topluniv.obj & + $(OBJS)\corelib_winuniv.obj & + $(OBJS)\corelib_gtk.obj & + $(OBJS)\corelib_metal.obj & + $(OBJS)\corelib_mono.obj & + $(OBJS)\corelib_win32.obj & + $(OBJS)\corelib_accelcmn.obj & + $(OBJS)\corelib_accesscmn.obj & + $(OBJS)\corelib_anidecod.obj & + $(OBJS)\corelib_affinematrix2d.obj & + $(OBJS)\corelib_appcmn.obj & + $(OBJS)\corelib_artprov.obj & + $(OBJS)\corelib_artstd.obj & + $(OBJS)\corelib_arttango.obj & + $(OBJS)\corelib_bmpbase.obj & + $(OBJS)\corelib_bmpbtncmn.obj & + $(OBJS)\corelib_bookctrl.obj & + $(OBJS)\corelib_btncmn.obj & + $(OBJS)\corelib_cairo.obj & + $(OBJS)\corelib_checkboxcmn.obj & + $(OBJS)\corelib_checklstcmn.obj & + $(OBJS)\corelib_choiccmn.obj & + $(OBJS)\corelib_clipcmn.obj & + $(OBJS)\corelib_clrpickercmn.obj & + $(OBJS)\corelib_colourcmn.obj & + $(OBJS)\corelib_colourdata.obj & + $(OBJS)\corelib_combocmn.obj & + $(OBJS)\corelib_cmdproc.obj & + $(OBJS)\corelib_cmndata.obj & + $(OBJS)\corelib_containr.obj & + $(OBJS)\corelib_cshelp.obj & + $(OBJS)\corelib_ctrlcmn.obj & + $(OBJS)\corelib_ctrlsub.obj & + $(OBJS)\corelib_dcbase.obj & + $(OBJS)\corelib_dcbufcmn.obj & + $(OBJS)\corelib_dcgraph.obj & + $(OBJS)\corelib_dcsvg.obj & + $(OBJS)\corelib_dirctrlcmn.obj & + $(OBJS)\corelib_dlgcmn.obj & + $(OBJS)\corelib_dndcmn.obj & + $(OBJS)\corelib_dobjcmn.obj & + $(OBJS)\corelib_docmdi.obj & + $(OBJS)\corelib_docview.obj & + $(OBJS)\corelib_dpycmn.obj & + $(OBJS)\corelib_dseldlg.obj & + $(OBJS)\corelib_effects.obj & + $(OBJS)\corelib_fddlgcmn.obj & + $(OBJS)\corelib_filectrlcmn.obj & + $(OBJS)\corelib_filehistorycmn.obj & + $(OBJS)\corelib_filepickercmn.obj & + $(OBJS)\corelib_fontpickercmn.obj & + $(OBJS)\corelib_fldlgcmn.obj & + $(OBJS)\corelib_fontcmn.obj & + $(OBJS)\corelib_fontdata.obj & + $(OBJS)\corelib_graphicc.obj & + $(OBJS)\corelib_fontenumcmn.obj & + $(OBJS)\corelib_fontmap.obj & + $(OBJS)\corelib_fontutilcmn.obj & + $(OBJS)\corelib_framecmn.obj & + $(OBJS)\corelib_gaugecmn.obj & + $(OBJS)\corelib_gbsizer.obj & + $(OBJS)\corelib_gdicmn.obj & + $(OBJS)\corelib_geometry.obj & + $(OBJS)\corelib_gifdecod.obj & + $(OBJS)\corelib_graphcmn.obj & + $(OBJS)\corelib_headercolcmn.obj & + $(OBJS)\corelib_headerctrlcmn.obj & + $(OBJS)\corelib_helpbase.obj & + $(OBJS)\corelib_iconbndl.obj & + $(OBJS)\corelib_imagall.obj & + $(OBJS)\corelib_imagbmp.obj & + $(OBJS)\corelib_image.obj & + $(OBJS)\corelib_imagfill.obj & + $(OBJS)\corelib_imaggif.obj & + $(OBJS)\corelib_imagiff.obj & + $(OBJS)\corelib_imagjpeg.obj & + $(OBJS)\corelib_imagpcx.obj & + $(OBJS)\corelib_imagpng.obj & + $(OBJS)\corelib_imagpnm.obj & + $(OBJS)\corelib_imagtga.obj & + $(OBJS)\corelib_imagtiff.obj & + $(OBJS)\corelib_imagxpm.obj & + $(OBJS)\corelib_layout.obj & + $(OBJS)\corelib_lboxcmn.obj & + $(OBJS)\corelib_listctrlcmn.obj & + $(OBJS)\corelib_markupparser.obj & + $(OBJS)\corelib_matrix.obj & + $(OBJS)\corelib_menucmn.obj & + $(OBJS)\corelib_modalhook.obj & + $(OBJS)\corelib_mousemanager.obj & + $(OBJS)\corelib_nbkbase.obj & + $(OBJS)\corelib_overlaycmn.obj & + $(OBJS)\corelib_ownerdrwcmn.obj & + $(OBJS)\corelib_paper.obj & + $(OBJS)\corelib_panelcmn.obj & + $(OBJS)\corelib_persist.obj & + $(OBJS)\corelib_pickerbase.obj & + $(OBJS)\corelib_popupcmn.obj & + $(OBJS)\corelib_preferencescmn.obj & + $(OBJS)\corelib_prntbase.obj & + $(OBJS)\corelib_quantize.obj & + $(OBJS)\corelib_radiobtncmn.obj & + $(OBJS)\corelib_radiocmn.obj & + $(OBJS)\corelib_rearrangectrl.obj & + $(OBJS)\corelib_rendcmn.obj & + $(OBJS)\corelib_rgncmn.obj & + $(OBJS)\corelib_scrolbarcmn.obj & + $(OBJS)\corelib_settcmn.obj & + $(OBJS)\corelib_sizer.obj & + $(OBJS)\corelib_slidercmn.obj & + $(OBJS)\corelib_spinbtncmn.obj & + $(OBJS)\corelib_spinctrlcmn.obj & + $(OBJS)\corelib_srchcmn.obj & + $(OBJS)\corelib_statbar.obj & + $(OBJS)\corelib_statbmpcmn.obj & + $(OBJS)\corelib_statboxcmn.obj & + $(OBJS)\corelib_statlinecmn.obj & + $(OBJS)\corelib_stattextcmn.obj & + $(OBJS)\corelib_stockitem.obj & + $(OBJS)\corelib_tbarbase.obj & + $(OBJS)\corelib_textcmn.obj & + $(OBJS)\corelib_textentrycmn.obj & + $(OBJS)\corelib_textmeasurecmn.obj & + $(OBJS)\corelib_toplvcmn.obj & + $(OBJS)\corelib_treebase.obj & + $(OBJS)\corelib_uiactioncmn.obj & + $(OBJS)\corelib_valgen.obj & + $(OBJS)\corelib_validate.obj & + $(OBJS)\corelib_valtext.obj & + $(OBJS)\corelib_valnum.obj & + $(OBJS)\corelib_wincmn.obj & + $(OBJS)\corelib_windowid.obj & + $(OBJS)\corelib_wrapsizer.obj & + $(OBJS)\corelib_xpmdecod.obj & + $(OBJS)\corelib_busyinfo.obj & + $(OBJS)\corelib_buttonbar.obj & + $(OBJS)\corelib_choicdgg.obj & + $(OBJS)\corelib_choicbkg.obj & + $(OBJS)\corelib_combog.obj & + $(OBJS)\corelib_dcpsg.obj & + $(OBJS)\corelib_dirctrlg.obj & + $(OBJS)\corelib_dragimgg.obj & + $(OBJS)\corelib_filectrlg.obj & + $(OBJS)\corelib_headerctrlg.obj & + $(OBJS)\corelib_infobar.obj & + $(OBJS)\corelib_listbkg.obj & + $(OBJS)\corelib_logg.obj & + $(OBJS)\corelib_markuptext.obj & + $(OBJS)\corelib_msgdlgg.obj & + $(OBJS)\corelib_numdlgg.obj & + $(OBJS)\corelib_progdlgg.obj & + $(OBJS)\corelib_preferencesg.obj & + $(OBJS)\corelib_printps.obj & + $(OBJS)\corelib_renderg.obj & + $(OBJS)\corelib_richmsgdlgg.obj & + $(OBJS)\corelib_scrlwing.obj & + $(OBJS)\corelib_selstore.obj & + $(OBJS)\corelib_spinctlg.obj & + $(OBJS)\corelib_splitter.obj & + $(OBJS)\corelib_srchctlg.obj & + $(OBJS)\corelib_statbmpg.obj & + $(OBJS)\corelib_stattextg.obj & + $(OBJS)\corelib_textdlgg.obj & + $(OBJS)\corelib_tipwin.obj & + $(OBJS)\corelib_toolbkg.obj & + $(OBJS)\corelib_treectlg.obj & + $(OBJS)\corelib_treebkg.obj & + $(OBJS)\corelib_vlbox.obj & + $(OBJS)\corelib_vscroll.obj & + $(OBJS)\corelib_xmlreshandler.obj +!endif +!endif +____wxcore_namedll_DEP = +!ifeq SHARED 1 +____wxcore_namedll_DEP = $(__coredll___depname) +!endif +____wxcore_namelib_DEP = +!ifeq SHARED 0 +____wxcore_namelib_DEP = $(__corelib___depname) +!endif +__advdll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +__advdll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +____ADVANCED_SRC_FILENAMES_2_OBJECTS = +!ifeq WXUNIV 0 +____ADVANCED_SRC_FILENAMES_2_OBJECTS = & + $(OBJS)\advdll_animatecmn.obj & + $(OBJS)\advdll_bmpcboxcmn.obj & + $(OBJS)\advdll_calctrlcmn.obj & + $(OBJS)\advdll_datavcmn.obj & + $(OBJS)\advdll_gridcmn.obj & + $(OBJS)\advdll_hyperlnkcmn.obj & + $(OBJS)\advdll_odcombocmn.obj & + $(OBJS)\advdll_richtooltipcmn.obj & + $(OBJS)\advdll_aboutdlgg.obj & + $(OBJS)\advdll_bannerwindow.obj & + $(OBJS)\advdll_bmpcboxg.obj & + $(OBJS)\advdll_calctrlg.obj & + $(OBJS)\advdll_commandlinkbuttong.obj & + $(OBJS)\advdll_datavgen.obj & + $(OBJS)\advdll_datectlg.obj & + $(OBJS)\advdll_editlbox.obj & + $(OBJS)\advdll_grid.obj & + $(OBJS)\advdll_gridctrl.obj & + $(OBJS)\advdll_grideditors.obj & + $(OBJS)\advdll_gridsel.obj & + $(OBJS)\advdll_helpext.obj & + $(OBJS)\advdll_hyperlinkg.obj & + $(OBJS)\advdll_laywin.obj & + $(OBJS)\advdll_notifmsgg.obj & + $(OBJS)\advdll_odcombo.obj & + $(OBJS)\advdll_propdlg.obj & + $(OBJS)\advdll_richtooltipg.obj & + $(OBJS)\advdll_sashwin.obj & + $(OBJS)\advdll_splash.obj & + $(OBJS)\advdll_timectrlg.obj & + $(OBJS)\advdll_tipdlg.obj & + $(OBJS)\advdll_treelist.obj & + $(OBJS)\advdll_wizard.obj & + $(OBJS)\advdll_taskbarcmn.obj & + $(OBJS)\advdll_aboutdlg.obj & + $(OBJS)\advdll_notifmsg.obj & + $(OBJS)\advdll_richtooltip.obj & + $(OBJS)\advdll_sound.obj & + $(OBJS)\advdll_taskbar.obj & + $(OBJS)\advdll_joystick.obj & + $(OBJS)\advdll_animateg.obj & + $(OBJS)\advdll_bmpcbox.obj & + $(OBJS)\advdll_calctrl.obj & + $(OBJS)\advdll_commandlinkbutton.obj & + $(OBJS)\advdll_datecontrols.obj & + $(OBJS)\advdll_datectrl.obj & + $(OBJS)\advdll_datetimectrl.obj & + $(OBJS)\advdll_hyperlink.obj & + $(OBJS)\advdll_timectrl.obj +!endif +!ifeq WXUNIV 1 +____ADVANCED_SRC_FILENAMES_2_OBJECTS = & + $(OBJS)\advdll_animatecmn.obj & + $(OBJS)\advdll_bmpcboxcmn.obj & + $(OBJS)\advdll_calctrlcmn.obj & + $(OBJS)\advdll_datavcmn.obj & + $(OBJS)\advdll_gridcmn.obj & + $(OBJS)\advdll_hyperlnkcmn.obj & + $(OBJS)\advdll_odcombocmn.obj & + $(OBJS)\advdll_richtooltipcmn.obj & + $(OBJS)\advdll_aboutdlgg.obj & + $(OBJS)\advdll_bannerwindow.obj & + $(OBJS)\advdll_bmpcboxg.obj & + $(OBJS)\advdll_calctrlg.obj & + $(OBJS)\advdll_commandlinkbuttong.obj & + $(OBJS)\advdll_datavgen.obj & + $(OBJS)\advdll_datectlg.obj & + $(OBJS)\advdll_editlbox.obj & + $(OBJS)\advdll_grid.obj & + $(OBJS)\advdll_gridctrl.obj & + $(OBJS)\advdll_grideditors.obj & + $(OBJS)\advdll_gridsel.obj & + $(OBJS)\advdll_helpext.obj & + $(OBJS)\advdll_hyperlinkg.obj & + $(OBJS)\advdll_laywin.obj & + $(OBJS)\advdll_notifmsgg.obj & + $(OBJS)\advdll_odcombo.obj & + $(OBJS)\advdll_propdlg.obj & + $(OBJS)\advdll_richtooltipg.obj & + $(OBJS)\advdll_sashwin.obj & + $(OBJS)\advdll_splash.obj & + $(OBJS)\advdll_timectrlg.obj & + $(OBJS)\advdll_tipdlg.obj & + $(OBJS)\advdll_treelist.obj & + $(OBJS)\advdll_wizard.obj & + $(OBJS)\advdll_taskbarcmn.obj & + $(OBJS)\advdll_aboutdlg.obj & + $(OBJS)\advdll_notifmsg.obj & + $(OBJS)\advdll_richtooltip.obj & + $(OBJS)\advdll_sound.obj & + $(OBJS)\advdll_taskbar.obj & + $(OBJS)\advdll_joystick.obj & + $(OBJS)\advdll_animateg.obj +!endif +__advlib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +__advlib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib +!endif +!endif +!endif +____ADVANCED_SRC_FILENAMES_3_OBJECTS = +!ifeq WXUNIV 0 +____ADVANCED_SRC_FILENAMES_3_OBJECTS = & + $(OBJS)\advlib_animatecmn.obj & + $(OBJS)\advlib_bmpcboxcmn.obj & + $(OBJS)\advlib_calctrlcmn.obj & + $(OBJS)\advlib_datavcmn.obj & + $(OBJS)\advlib_gridcmn.obj & + $(OBJS)\advlib_hyperlnkcmn.obj & + $(OBJS)\advlib_odcombocmn.obj & + $(OBJS)\advlib_richtooltipcmn.obj & + $(OBJS)\advlib_aboutdlgg.obj & + $(OBJS)\advlib_bannerwindow.obj & + $(OBJS)\advlib_bmpcboxg.obj & + $(OBJS)\advlib_calctrlg.obj & + $(OBJS)\advlib_commandlinkbuttong.obj & + $(OBJS)\advlib_datavgen.obj & + $(OBJS)\advlib_datectlg.obj & + $(OBJS)\advlib_editlbox.obj & + $(OBJS)\advlib_grid.obj & + $(OBJS)\advlib_gridctrl.obj & + $(OBJS)\advlib_grideditors.obj & + $(OBJS)\advlib_gridsel.obj & + $(OBJS)\advlib_helpext.obj & + $(OBJS)\advlib_hyperlinkg.obj & + $(OBJS)\advlib_laywin.obj & + $(OBJS)\advlib_notifmsgg.obj & + $(OBJS)\advlib_odcombo.obj & + $(OBJS)\advlib_propdlg.obj & + $(OBJS)\advlib_richtooltipg.obj & + $(OBJS)\advlib_sashwin.obj & + $(OBJS)\advlib_splash.obj & + $(OBJS)\advlib_timectrlg.obj & + $(OBJS)\advlib_tipdlg.obj & + $(OBJS)\advlib_treelist.obj & + $(OBJS)\advlib_wizard.obj & + $(OBJS)\advlib_taskbarcmn.obj & + $(OBJS)\advlib_aboutdlg.obj & + $(OBJS)\advlib_notifmsg.obj & + $(OBJS)\advlib_richtooltip.obj & + $(OBJS)\advlib_sound.obj & + $(OBJS)\advlib_taskbar.obj & + $(OBJS)\advlib_joystick.obj & + $(OBJS)\advlib_animateg.obj & + $(OBJS)\advlib_bmpcbox.obj & + $(OBJS)\advlib_calctrl.obj & + $(OBJS)\advlib_commandlinkbutton.obj & + $(OBJS)\advlib_datecontrols.obj & + $(OBJS)\advlib_datectrl.obj & + $(OBJS)\advlib_datetimectrl.obj & + $(OBJS)\advlib_hyperlink.obj & + $(OBJS)\advlib_timectrl.obj +!endif +!ifeq WXUNIV 1 +____ADVANCED_SRC_FILENAMES_3_OBJECTS = & + $(OBJS)\advlib_animatecmn.obj & + $(OBJS)\advlib_bmpcboxcmn.obj & + $(OBJS)\advlib_calctrlcmn.obj & + $(OBJS)\advlib_datavcmn.obj & + $(OBJS)\advlib_gridcmn.obj & + $(OBJS)\advlib_hyperlnkcmn.obj & + $(OBJS)\advlib_odcombocmn.obj & + $(OBJS)\advlib_richtooltipcmn.obj & + $(OBJS)\advlib_aboutdlgg.obj & + $(OBJS)\advlib_bannerwindow.obj & + $(OBJS)\advlib_bmpcboxg.obj & + $(OBJS)\advlib_calctrlg.obj & + $(OBJS)\advlib_commandlinkbuttong.obj & + $(OBJS)\advlib_datavgen.obj & + $(OBJS)\advlib_datectlg.obj & + $(OBJS)\advlib_editlbox.obj & + $(OBJS)\advlib_grid.obj & + $(OBJS)\advlib_gridctrl.obj & + $(OBJS)\advlib_grideditors.obj & + $(OBJS)\advlib_gridsel.obj & + $(OBJS)\advlib_helpext.obj & + $(OBJS)\advlib_hyperlinkg.obj & + $(OBJS)\advlib_laywin.obj & + $(OBJS)\advlib_notifmsgg.obj & + $(OBJS)\advlib_odcombo.obj & + $(OBJS)\advlib_propdlg.obj & + $(OBJS)\advlib_richtooltipg.obj & + $(OBJS)\advlib_sashwin.obj & + $(OBJS)\advlib_splash.obj & + $(OBJS)\advlib_timectrlg.obj & + $(OBJS)\advlib_tipdlg.obj & + $(OBJS)\advlib_treelist.obj & + $(OBJS)\advlib_wizard.obj & + $(OBJS)\advlib_taskbarcmn.obj & + $(OBJS)\advlib_aboutdlg.obj & + $(OBJS)\advlib_notifmsg.obj & + $(OBJS)\advlib_richtooltip.obj & + $(OBJS)\advlib_sound.obj & + $(OBJS)\advlib_taskbar.obj & + $(OBJS)\advlib_joystick.obj & + $(OBJS)\advlib_animateg.obj +!endif +____wxadv_namedll_DEP = +!ifeq SHARED 1 +____wxadv_namedll_DEP = $(__advdll___depname) +!endif +____wxadv_namelib_DEP = +!ifeq SHARED 0 +____wxadv_namelib_DEP = $(__advlib___depname) +!endif +__mediadll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_MEDIA 1 +__mediadll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +!endif +__medialib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +!ifeq USE_MEDIA 1 +__medialib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib +!endif +!endif +!endif +!endif +____wxmedia_namedll_DEP = +!ifeq SHARED 1 +____wxmedia_namedll_DEP = $(__mediadll___depname) +!endif +____wxmedia_namelib_DEP = +!ifeq SHARED 0 +____wxmedia_namelib_DEP = $(__medialib___depname) +!endif +__htmldll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_HTML 1 +__htmldll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +!endif +__htmllib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +!ifeq USE_HTML 1 +__htmllib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib +!endif +!endif +!endif +!endif +____wxhtml_namedll_DEP = +!ifeq SHARED 1 +____wxhtml_namedll_DEP = $(__htmldll___depname) +!endif +____wxhtml_namelib_DEP = +!ifeq SHARED 0 +____wxhtml_namelib_DEP = $(__htmllib___depname) +!endif +__webviewdll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_WEBVIEW 1 +__webviewdll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +!endif +__webviewlib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +!ifeq USE_WEBVIEW 1 +__webviewlib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib +!endif +!endif +!endif +!endif +____wxwebview_namedll_DEP = +!ifeq SHARED 1 +____wxwebview_namedll_DEP = $(__webviewdll___depname) +!endif +____wxwebview_namelib_DEP = +!ifeq SHARED 0 +____wxwebview_namelib_DEP = $(__webviewlib___depname) +!endif +__qadll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_QA 1 +__qadll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +!endif +__qalib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +!ifeq USE_QA 1 +__qalib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib +!endif +!endif +!endif +!endif +____wxqa_namedll_DEP = +!ifeq SHARED 1 +____wxqa_namedll_DEP = $(__qadll___depname) +!endif +____wxqa_namelib_DEP = +!ifeq SHARED 0 +____wxqa_namelib_DEP = $(__qalib___depname) +!endif +__xmldll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +__xmldll___depname = & + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +__xmllib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +__xmllib___depname = & + $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib +!endif +!endif +____wxxml_namedll_DEP = +!ifeq SHARED 1 +____wxxml_namedll_DEP = $(__xmldll___depname) +!endif +____wxxml_namelib_DEP = +!ifeq SHARED 0 +____wxxml_namelib_DEP = $(__xmllib___depname) +!endif +__xrcdll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_XRC 1 +__xrcdll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +__xrclib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_XRC 1 +__xrclib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib +!endif +!endif +!endif +____wxxrc_namedll_DEP = +!ifeq SHARED 1 +____wxxrc_namedll_DEP = $(__xrcdll___depname) +!endif +____wxxrc_namelib_DEP = +!ifeq SHARED 0 +____wxxrc_namelib_DEP = $(__xrclib___depname) +!endif +__auidll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_AUI 1 +__auidll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +__auilib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_AUI 1 +__auilib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib +!endif +!endif +!endif +____wxaui_namedll_DEP = +!ifeq SHARED 1 +____wxaui_namedll_DEP = $(__auidll___depname) +!endif +____wxaui_namelib_DEP = +!ifeq SHARED 0 +____wxaui_namelib_DEP = $(__auilib___depname) +!endif +__ribbondll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_RIBBON 1 +__ribbondll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +__ribbonlib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_RIBBON 1 +__ribbonlib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib +!endif +!endif +!endif +____wxribbon_namedll_DEP = +!ifeq SHARED 1 +____wxribbon_namedll_DEP = $(__ribbondll___depname) +!endif +____wxribbon_namelib_DEP = +!ifeq SHARED 0 +____wxribbon_namelib_DEP = $(__ribbonlib___depname) +!endif +__propgriddll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_PROPGRID 1 +__propgriddll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +__propgridlib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_PROPGRID 1 +__propgridlib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib +!endif +!endif +!endif +____wxpropgrid_namedll_DEP = +!ifeq SHARED 1 +____wxpropgrid_namedll_DEP = $(__propgriddll___depname) +!endif +____wxpropgrid_namelib_DEP = +!ifeq SHARED 0 +____wxpropgrid_namelib_DEP = $(__propgridlib___depname) +!endif +__richtextdll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_RICHTEXT 1 +__richtextdll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +__richtextlib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_RICHTEXT 1 +__richtextlib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib +!endif +!endif +!endif +____wxrichtext_namedll_DEP = +!ifeq SHARED 1 +____wxrichtext_namedll_DEP = $(__richtextdll___depname) +!endif +____wxrichtext_namelib_DEP = +!ifeq SHARED 0 +____wxrichtext_namelib_DEP = $(__richtextlib___depname) +!endif +__stcdll___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_STC 1 +__stcdll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +__stclib___depname = +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_STC 1 +__stclib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib +!endif +!endif +!endif +____wxstc_namedll_DEP = +!ifeq SHARED 1 +____wxstc_namedll_DEP = $(__stcdll___depname) +!endif +____wxstc_namelib_DEP = +!ifeq SHARED 0 +____wxstc_namelib_DEP = $(__stclib___depname) +!endif +__gldll___depname = +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_OPENGL 1 +__gldll___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll +!endif +!endif +!endif +__WXLIBGLDEP_CORE_p = +!ifeq MONOLITHIC 0 +__WXLIBGLDEP_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +!endif +__WXLIBGLDEP_BASE_p = +!ifeq MONOLITHIC 0 +__WXLIBGLDEP_BASE_p = & + wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +__WXLIB_MONO_p = +!ifeq MONOLITHIC 1 +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +__gllib___depname = +!ifeq SHARED 0 +!ifeq USE_GUI 1 +!ifeq USE_OPENGL 1 +__gllib___depname = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib +!endif +!endif +!endif +____wxgl_namedll_DEP = +!ifeq SHARED 1 +____wxgl_namedll_DEP = $(__gldll___depname) +!endif +____wxgl_namelib_DEP = +!ifeq SHARED 0 +____wxgl_namelib_DEP = $(__gllib___depname) +!endif +__wxscintilla = +!ifeq USE_STC 1 +__wxscintilla = $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib +!endif +__htmldll_library_link_DEP = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_HTML 1 +__htmldll_library_link_DEP = $(__htmldll___depname) +!endif +!endif +!endif +!endif +__htmldll_library_link_LIBR = +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_HTML 1 +__htmldll_library_link_LIBR = & + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib +!endif +!endif +!endif +!endif +__DEBUGINFO_4 = +!ifeq BUILD debug +!ifeq DEBUG_INFO default +__DEBUGINFO_4 = debug all +!endif +!endif +!ifeq BUILD release +!ifeq DEBUG_INFO default +__DEBUGINFO_4 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_4 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_4 = debug all +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__CAIRO_LIB_p = +!ifeq USE_CAIRO 1 +__CAIRO_LIB_p = cairo.lib +!endif +____CAIRO_LIBDIR_FILENAMES = +!ifeq USE_CAIRO 1 +____CAIRO_LIBDIR_FILENAMES = libpath $(CAIRO_ROOT)\lib +!endif +__DEBUGINFO = +!ifeq BUILD debug +!ifeq DEBUG_INFO default +__DEBUGINFO = -d2 +!endif +!endif +!ifeq BUILD release +!ifeq DEBUG_INFO default +__DEBUGINFO = -d0 +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO = -d2 +!endif +__OPTIMIZEFLAG = +!ifeq BUILD debug +__OPTIMIZEFLAG = -od +!endif +!ifeq BUILD release +__OPTIMIZEFLAG = -ot -ox +!endif +__THREADSFLAG = +!ifeq USE_THREADS 0 +__THREADSFLAG = +!endif +!ifeq USE_THREADS 1 +__THREADSFLAG = -bm +!endif +__RUNTIME_LIBS = +!ifeq RUNTIME_LIBS dynamic +__RUNTIME_LIBS = -br +!endif +!ifeq RUNTIME_LIBS static +__RUNTIME_LIBS = +!endif +__RTTIFLAG = +!ifeq USE_RTTI 0 +__RTTIFLAG = +!endif +!ifeq USE_RTTI 1 +__RTTIFLAG = -xr +!endif +__EXCEPTIONSFLAG = +!ifeq USE_EXCEPTIONS 0 +__EXCEPTIONSFLAG = +!endif +!ifeq USE_EXCEPTIONS 1 +__EXCEPTIONSFLAG = -xs +!endif +__WXUNIV_DEFINE_p = +!ifeq WXUNIV 1 +__WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ +!endif +__DEBUG_DEFINE_p = +!ifeq DEBUG_FLAG 0 +__DEBUG_DEFINE_p = -dwxDEBUG_LEVEL=0 +!endif +__NDEBUG_DEFINE_p = +!ifeq BUILD release +__NDEBUG_DEFINE_p = -dNDEBUG +!endif +__EXCEPTIONS_DEFINE_p = +!ifeq USE_EXCEPTIONS 0 +__EXCEPTIONS_DEFINE_p = -dwxNO_EXCEPTIONS +!endif +__RTTI_DEFINE_p = +!ifeq USE_RTTI 0 +__RTTI_DEFINE_p = -dwxNO_RTTI +!endif +__THREAD_DEFINE_p = +!ifeq USE_THREADS 0 +__THREAD_DEFINE_p = -dwxNO_THREADS +!endif +__UNICODE_DEFINE_p = +!ifeq UNICODE 0 +__UNICODE_DEFINE_p = -dwxUSE_UNICODE=0 +!endif +!ifeq UNICODE 1 +__UNICODE_DEFINE_p = -d_UNICODE +!endif +____CAIRO_INCLUDEDIR_FILENAMES = +!ifeq USE_CAIRO 1 +____CAIRO_INCLUDEDIR_FILENAMES = -i=$(CAIRO_ROOT)\include\cairo +!endif +__SETUP_H_SUBDIR_FILENAMES = +!ifeq WXUNIV 0 +__SETUP_H_SUBDIR_FILENAMES = msw +!endif +!ifeq WXUNIV 1 +__SETUP_H_SUBDIR_FILENAMES = univ +!endif + +### Variables: ### + +MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" & + CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" CPP="$(CPP)" SHARED="$(SHARED)" & + TOOLKIT_VERSION="$(TOOLKIT_VERSION)" WXUNIV="$(WXUNIV)" & + UNICODE="$(UNICODE)" BUILD="$(BUILD)" DEBUG_INFO="$(DEBUG_INFO)" & + DEBUG_FLAG="$(DEBUG_FLAG)" MONOLITHIC="$(MONOLITHIC)" USE_GUI="$(USE_GUI)" & + USE_HTML="$(USE_HTML)" USE_WEBVIEW="$(USE_WEBVIEW)" & + USE_MEDIA="$(USE_MEDIA)" USE_XRC="$(USE_XRC)" USE_AUI="$(USE_AUI)" & + USE_RIBBON="$(USE_RIBBON)" USE_PROPGRID="$(USE_PROPGRID)" & + USE_RICHTEXT="$(USE_RICHTEXT)" USE_STC="$(USE_STC)" & + USE_OPENGL="$(USE_OPENGL)" USE_QA="$(USE_QA)" & + USE_EXCEPTIONS="$(USE_EXCEPTIONS)" USE_RTTI="$(USE_RTTI)" & + USE_THREADS="$(USE_THREADS)" USE_CAIRO="$(USE_CAIRO)" & + OFFICIAL_BUILD="$(OFFICIAL_BUILD)" VENDOR="$(VENDOR)" & + WX_FLAVOUR="$(WX_FLAVOUR)" WX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" CFG="$(CFG)" & + CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" & + RUNTIME_LIBS="$(RUNTIME_LIBS)" +WX_RELEASE_NODOT = 30 +COMPILER_PREFIX = wat +OBJS = & + $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + ..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG) +SETUPHDIR = & + $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) +WXREGEX_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -dNDEBUG -i=..\..\include -i=$(SETUPHDIR) -d__WXMSW__ & + $(__WXUNIV_DEFINE_p) $(__UNICODE_DEFINE_p) $(CPPFLAGS) $(CFLAGS) +WXREGEX_OBJECTS = & + $(OBJS)\wxregex_regcomp.obj & + $(OBJS)\wxregex_regexec.obj & + $(OBJS)\wxregex_regerror.obj & + $(OBJS)\wxregex_regfree.obj +WXZLIB_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -dNDEBUG $(CPPFLAGS) $(CFLAGS) +WXZLIB_OBJECTS = & + $(OBJS)\wxzlib_adler32.obj & + $(OBJS)\wxzlib_compress.obj & + $(OBJS)\wxzlib_crc32.obj & + $(OBJS)\wxzlib_deflate.obj & + $(OBJS)\wxzlib_gzclose.obj & + $(OBJS)\wxzlib_gzlib.obj & + $(OBJS)\wxzlib_gzread.obj & + $(OBJS)\wxzlib_gzwrite.obj & + $(OBJS)\wxzlib_infback.obj & + $(OBJS)\wxzlib_inffast.obj & + $(OBJS)\wxzlib_inflate.obj & + $(OBJS)\wxzlib_inftrees.obj & + $(OBJS)\wxzlib_trees.obj & + $(OBJS)\wxzlib_uncompr.obj & + $(OBJS)\wxzlib_zutil.obj +WXPNG_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -dNDEBUG -i=..\..\src\zlib -wcd=124 $(CPPFLAGS) $(CFLAGS) +WXPNG_OBJECTS = & + $(OBJS)\wxpng_png.obj & + $(OBJS)\wxpng_pngerror.obj & + $(OBJS)\wxpng_pngget.obj & + $(OBJS)\wxpng_pngmem.obj & + $(OBJS)\wxpng_pngpread.obj & + $(OBJS)\wxpng_pngread.obj & + $(OBJS)\wxpng_pngrio.obj & + $(OBJS)\wxpng_pngrtran.obj & + $(OBJS)\wxpng_pngrutil.obj & + $(OBJS)\wxpng_pngset.obj & + $(OBJS)\wxpng_pngtrans.obj & + $(OBJS)\wxpng_pngwio.obj & + $(OBJS)\wxpng_pngwrite.obj & + $(OBJS)\wxpng_pngwtran.obj & + $(OBJS)\wxpng_pngwutil.obj +WXJPEG_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -dNDEBUG -i=$(SETUPHDIR) -wcd=136 $(CPPFLAGS) $(CFLAGS) +WXJPEG_OBJECTS = & + $(OBJS)\wxjpeg_jcomapi.obj & + $(OBJS)\wxjpeg_jutils.obj & + $(OBJS)\wxjpeg_jerror.obj & + $(OBJS)\wxjpeg_jmemmgr.obj & + $(OBJS)\wxjpeg_jmemnobs.obj & + $(OBJS)\wxjpeg_jcapimin.obj & + $(OBJS)\wxjpeg_jcapistd.obj & + $(OBJS)\wxjpeg_jctrans.obj & + $(OBJS)\wxjpeg_jcparam.obj & + $(OBJS)\wxjpeg_jdatadst.obj & + $(OBJS)\wxjpeg_jcinit.obj & + $(OBJS)\wxjpeg_jcmaster.obj & + $(OBJS)\wxjpeg_jcmarker.obj & + $(OBJS)\wxjpeg_jcmainct.obj & + $(OBJS)\wxjpeg_jcprepct.obj & + $(OBJS)\wxjpeg_jccoefct.obj & + $(OBJS)\wxjpeg_jccolor.obj & + $(OBJS)\wxjpeg_jcsample.obj & + $(OBJS)\wxjpeg_jchuff.obj & + $(OBJS)\wxjpeg_jcphuff.obj & + $(OBJS)\wxjpeg_jcdctmgr.obj & + $(OBJS)\wxjpeg_jfdctfst.obj & + $(OBJS)\wxjpeg_jfdctflt.obj & + $(OBJS)\wxjpeg_jfdctint.obj & + $(OBJS)\wxjpeg_jdapimin.obj & + $(OBJS)\wxjpeg_jdapistd.obj & + $(OBJS)\wxjpeg_jdtrans.obj & + $(OBJS)\wxjpeg_jdatasrc.obj & + $(OBJS)\wxjpeg_jdmaster.obj & + $(OBJS)\wxjpeg_jdinput.obj & + $(OBJS)\wxjpeg_jdmarker.obj & + $(OBJS)\wxjpeg_jdhuff.obj & + $(OBJS)\wxjpeg_jdphuff.obj & + $(OBJS)\wxjpeg_jdmainct.obj & + $(OBJS)\wxjpeg_jdcoefct.obj & + $(OBJS)\wxjpeg_jdpostct.obj & + $(OBJS)\wxjpeg_jddctmgr.obj & + $(OBJS)\wxjpeg_jidctfst.obj & + $(OBJS)\wxjpeg_jidctflt.obj & + $(OBJS)\wxjpeg_jidctint.obj & + $(OBJS)\wxjpeg_jidctred.obj & + $(OBJS)\wxjpeg_jdsample.obj & + $(OBJS)\wxjpeg_jdcolor.obj & + $(OBJS)\wxjpeg_jquant1.obj & + $(OBJS)\wxjpeg_jquant2.obj & + $(OBJS)\wxjpeg_jdmerge.obj +WXTIFF_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -dNDEBUG -i=..\..\src\zlib -i=..\..\src\jpeg & + -i=..\..\src\tiff\libtiff -wcd=124 $(CPPFLAGS) $(CFLAGS) +WXTIFF_OBJECTS = & + $(OBJS)\wxtiff_tif_win32.obj & + $(OBJS)\wxtiff_tif_aux.obj & + $(OBJS)\wxtiff_tif_close.obj & + $(OBJS)\wxtiff_tif_codec.obj & + $(OBJS)\wxtiff_tif_color.obj & + $(OBJS)\wxtiff_tif_compress.obj & + $(OBJS)\wxtiff_tif_dir.obj & + $(OBJS)\wxtiff_tif_dirinfo.obj & + $(OBJS)\wxtiff_tif_dirread.obj & + $(OBJS)\wxtiff_tif_dirwrite.obj & + $(OBJS)\wxtiff_tif_dumpmode.obj & + $(OBJS)\wxtiff_tif_error.obj & + $(OBJS)\wxtiff_tif_extension.obj & + $(OBJS)\wxtiff_tif_fax3.obj & + $(OBJS)\wxtiff_tif_fax3sm.obj & + $(OBJS)\wxtiff_tif_flush.obj & + $(OBJS)\wxtiff_tif_getimage.obj & + $(OBJS)\wxtiff_tif_jbig.obj & + $(OBJS)\wxtiff_tif_jpeg.obj & + $(OBJS)\wxtiff_tif_jpeg_12.obj & + $(OBJS)\wxtiff_tif_luv.obj & + $(OBJS)\wxtiff_tif_lzma.obj & + $(OBJS)\wxtiff_tif_lzw.obj & + $(OBJS)\wxtiff_tif_next.obj & + $(OBJS)\wxtiff_tif_ojpeg.obj & + $(OBJS)\wxtiff_tif_open.obj & + $(OBJS)\wxtiff_tif_packbits.obj & + $(OBJS)\wxtiff_tif_pixarlog.obj & + $(OBJS)\wxtiff_tif_predict.obj & + $(OBJS)\wxtiff_tif_print.obj & + $(OBJS)\wxtiff_tif_read.obj & + $(OBJS)\wxtiff_tif_strip.obj & + $(OBJS)\wxtiff_tif_swab.obj & + $(OBJS)\wxtiff_tif_thunder.obj & + $(OBJS)\wxtiff_tif_tile.obj & + $(OBJS)\wxtiff_tif_version.obj & + $(OBJS)\wxtiff_tif_warning.obj & + $(OBJS)\wxtiff_tif_write.obj & + $(OBJS)\wxtiff_tif_zip.obj +WXEXPAT_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -dNDEBUG -i=$(LIBDIRNAME) -dCOMPILED_FROM_DSP $(CPPFLAGS) & + $(CFLAGS) +WXEXPAT_OBJECTS = & + $(OBJS)\wxexpat_xmlparse.obj & + $(OBJS)\wxexpat_xmlrole.obj & + $(OBJS)\wxexpat_xmltok.obj +WXSCINTILLA_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -dNDEBUG -i=..\..\src\stc\scintilla\include & + -i=..\..\src\stc\scintilla\lexlib -i=..\..\src\stc\scintilla\src -d__WX__ & + -dSCI_LEXER -dLINK_LEXERS -i=$(SETUPHDIR) -i=..\..\include & + $(__wxscintilla_usingdll_p) -d__WXMSW__ $(__WXUNIV_DEFINE_p) & + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) $(__RTTIFLAG) $(__EXCEPTIONSFLAG) & + $(CPPFLAGS) $(CXXFLAGS) +WXSCINTILLA_OBJECTS = & + $(OBJS)\wxscintilla_LexA68k.obj & + $(OBJS)\wxscintilla_LexAbaqus.obj & + $(OBJS)\wxscintilla_LexAda.obj & + $(OBJS)\wxscintilla_LexAPDL.obj & + $(OBJS)\wxscintilla_LexAsm.obj & + $(OBJS)\wxscintilla_LexAsn1.obj & + $(OBJS)\wxscintilla_LexASY.obj & + $(OBJS)\wxscintilla_LexAU3.obj & + $(OBJS)\wxscintilla_LexAVE.obj & + $(OBJS)\wxscintilla_LexAVS.obj & + $(OBJS)\wxscintilla_LexBaan.obj & + $(OBJS)\wxscintilla_LexBash.obj & + $(OBJS)\wxscintilla_LexBasic.obj & + $(OBJS)\wxscintilla_LexBullant.obj & + $(OBJS)\wxscintilla_LexCaml.obj & + $(OBJS)\wxscintilla_LexCLW.obj & + $(OBJS)\wxscintilla_LexCmake.obj & + $(OBJS)\wxscintilla_LexCOBOL.obj & + $(OBJS)\wxscintilla_LexCoffeeScript.obj & + $(OBJS)\wxscintilla_LexConf.obj & + $(OBJS)\wxscintilla_LexCPP.obj & + $(OBJS)\wxscintilla_LexCrontab.obj & + $(OBJS)\wxscintilla_LexCsound.obj & + $(OBJS)\wxscintilla_LexCSS.obj & + $(OBJS)\wxscintilla_LexD.obj & + $(OBJS)\wxscintilla_LexECL.obj & + $(OBJS)\wxscintilla_LexEiffel.obj & + $(OBJS)\wxscintilla_LexErlang.obj & + $(OBJS)\wxscintilla_LexEScript.obj & + $(OBJS)\wxscintilla_LexFlagship.obj & + $(OBJS)\wxscintilla_LexForth.obj & + $(OBJS)\wxscintilla_LexFortran.obj & + $(OBJS)\wxscintilla_LexGAP.obj & + $(OBJS)\wxscintilla_LexGui4Cli.obj & + $(OBJS)\wxscintilla_LexHaskell.obj & + $(OBJS)\wxscintilla_LexHTML.obj & + $(OBJS)\wxscintilla_LexInno.obj & + $(OBJS)\wxscintilla_LexKix.obj & + $(OBJS)\wxscintilla_LexLisp.obj & + $(OBJS)\wxscintilla_LexLout.obj & + $(OBJS)\wxscintilla_LexLua.obj & + $(OBJS)\wxscintilla_LexMagik.obj & + $(OBJS)\wxscintilla_LexMarkdown.obj & + $(OBJS)\wxscintilla_LexMatlab.obj & + $(OBJS)\wxscintilla_LexMetapost.obj & + $(OBJS)\wxscintilla_LexMMIXAL.obj & + $(OBJS)\wxscintilla_LexModula.obj & + $(OBJS)\wxscintilla_LexMPT.obj & + $(OBJS)\wxscintilla_LexMSSQL.obj & + $(OBJS)\wxscintilla_LexMySQL.obj & + $(OBJS)\wxscintilla_LexNimrod.obj & + $(OBJS)\wxscintilla_LexNsis.obj & + $(OBJS)\wxscintilla_LexOpal.obj & + $(OBJS)\wxscintilla_LexOScript.obj & + $(OBJS)\wxscintilla_LexOthers.obj & + $(OBJS)\wxscintilla_LexPascal.obj & + $(OBJS)\wxscintilla_LexPB.obj & + $(OBJS)\wxscintilla_LexPerl.obj & + $(OBJS)\wxscintilla_LexPLM.obj & + $(OBJS)\wxscintilla_LexPOV.obj & + $(OBJS)\wxscintilla_LexPowerPro.obj & + $(OBJS)\wxscintilla_LexPowerShell.obj & + $(OBJS)\wxscintilla_LexProgress.obj & + $(OBJS)\wxscintilla_LexPS.obj & + $(OBJS)\wxscintilla_LexPython.obj & + $(OBJS)\wxscintilla_LexR.obj & + $(OBJS)\wxscintilla_LexRebol.obj & + $(OBJS)\wxscintilla_LexRuby.obj & + $(OBJS)\wxscintilla_LexScriptol.obj & + $(OBJS)\wxscintilla_LexSmalltalk.obj & + $(OBJS)\wxscintilla_LexSML.obj & + $(OBJS)\wxscintilla_LexSorcus.obj & + $(OBJS)\wxscintilla_LexSpecman.obj & + $(OBJS)\wxscintilla_LexSpice.obj & + $(OBJS)\wxscintilla_LexSQL.obj & + $(OBJS)\wxscintilla_LexTACL.obj & + $(OBJS)\wxscintilla_LexTADS3.obj & + $(OBJS)\wxscintilla_LexTAL.obj & + $(OBJS)\wxscintilla_LexTCL.obj & + $(OBJS)\wxscintilla_LexTCMD.obj & + $(OBJS)\wxscintilla_LexTeX.obj & + $(OBJS)\wxscintilla_LexTxt2tags.obj & + $(OBJS)\wxscintilla_LexVB.obj & + $(OBJS)\wxscintilla_LexVerilog.obj & + $(OBJS)\wxscintilla_LexVHDL.obj & + $(OBJS)\wxscintilla_LexVisualProlog.obj & + $(OBJS)\wxscintilla_LexYAML.obj & + $(OBJS)\wxscintilla_Accessor.obj & + $(OBJS)\wxscintilla_CharacterSet.obj & + $(OBJS)\wxscintilla_LexerBase.obj & + $(OBJS)\wxscintilla_LexerModule.obj & + $(OBJS)\wxscintilla_LexerNoExceptions.obj & + $(OBJS)\wxscintilla_LexerSimple.obj & + $(OBJS)\wxscintilla_PropSetSimple.obj & + $(OBJS)\wxscintilla_StyleContext.obj & + $(OBJS)\wxscintilla_WordList.obj & + $(OBJS)\wxscintilla_AutoComplete.obj & + $(OBJS)\wxscintilla_CallTip.obj & + $(OBJS)\wxscintilla_Catalogue.obj & + $(OBJS)\wxscintilla_CellBuffer.obj & + $(OBJS)\wxscintilla_CharClassify.obj & + $(OBJS)\wxscintilla_ContractionState.obj & + $(OBJS)\wxscintilla_Decoration.obj & + $(OBJS)\wxscintilla_Document.obj & + $(OBJS)\wxscintilla_Editor.obj & + $(OBJS)\wxscintilla_ExternalLexer.obj & + $(OBJS)\wxscintilla_Indicator.obj & + $(OBJS)\wxscintilla_KeyMap.obj & + $(OBJS)\wxscintilla_LineMarker.obj & + $(OBJS)\wxscintilla_PerLine.obj & + $(OBJS)\wxscintilla_PositionCache.obj & + $(OBJS)\wxscintilla_RESearch.obj & + $(OBJS)\wxscintilla_RunStyles.obj & + $(OBJS)\wxscintilla_ScintillaBase.obj & + $(OBJS)\wxscintilla_Selection.obj & + $(OBJS)\wxscintilla_Style.obj & + $(OBJS)\wxscintilla_UniConversion.obj & + $(OBJS)\wxscintilla_ViewStyle.obj & + $(OBJS)\wxscintilla_XPM.obj +MONODLL_CFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + -i=..\..\src\stc\scintilla\include -i=..\..\src\stc\scintilla\lexlib & + -i=..\..\src\stc\scintilla\src -d__WX__ -dSCI_LEXER -dLINK_LEXERS & + -dwxUSE_BASE=1 -dWXMAKINGDLL $(CPPFLAGS) $(CFLAGS) +MONODLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + -i=..\..\src\stc\scintilla\include -i=..\..\src\stc\scintilla\lexlib & + -i=..\..\src\stc\scintilla\src -d__WX__ -dSCI_LEXER -dLINK_LEXERS & + -dwxUSE_BASE=1 -dWXMAKINGDLL /fh=$(OBJS)\wxprec_monodll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +MONODLL_OBJECTS = & + $(OBJS)\monodll_dummy.obj & + $(OBJS)\monodll_any.obj & + $(OBJS)\monodll_appbase.obj & + $(OBJS)\monodll_arcall.obj & + $(OBJS)\monodll_arcfind.obj & + $(OBJS)\monodll_archive.obj & + $(OBJS)\monodll_arrstr.obj & + $(OBJS)\monodll_base64.obj & + $(OBJS)\monodll_clntdata.obj & + $(OBJS)\monodll_cmdline.obj & + $(OBJS)\monodll_config.obj & + $(OBJS)\monodll_convauto.obj & + $(OBJS)\monodll_datetime.obj & + $(OBJS)\monodll_datetimefmt.obj & + $(OBJS)\monodll_datstrm.obj & + $(OBJS)\monodll_dircmn.obj & + $(OBJS)\monodll_dynarray.obj & + $(OBJS)\monodll_dynlib.obj & + $(OBJS)\monodll_dynload.obj & + $(OBJS)\monodll_encconv.obj & + $(OBJS)\monodll_evtloopcmn.obj & + $(OBJS)\monodll_extended.obj & + $(OBJS)\monodll_ffile.obj & + $(OBJS)\monodll_file.obj & + $(OBJS)\monodll_fileback.obj & + $(OBJS)\monodll_fileconf.obj & + $(OBJS)\monodll_filefn.obj & + $(OBJS)\monodll_filename.obj & + $(OBJS)\monodll_filesys.obj & + $(OBJS)\monodll_filtall.obj & + $(OBJS)\monodll_filtfind.obj & + $(OBJS)\monodll_fmapbase.obj & + $(OBJS)\monodll_fs_arc.obj & + $(OBJS)\monodll_fs_filter.obj & + $(OBJS)\monodll_hash.obj & + $(OBJS)\monodll_hashmap.obj & + $(OBJS)\monodll_init.obj & + $(OBJS)\monodll_intl.obj & + $(OBJS)\monodll_ipcbase.obj & + $(OBJS)\monodll_languageinfo.obj & + $(OBJS)\monodll_list.obj & + $(OBJS)\monodll_log.obj & + $(OBJS)\monodll_longlong.obj & + $(OBJS)\monodll_memory.obj & + $(OBJS)\monodll_mimecmn.obj & + $(OBJS)\monodll_module.obj & + $(OBJS)\monodll_mstream.obj & + $(OBJS)\monodll_numformatter.obj & + $(OBJS)\monodll_object.obj & + $(OBJS)\monodll_platinfo.obj & + $(OBJS)\monodll_powercmn.obj & + $(OBJS)\monodll_process.obj & + $(OBJS)\monodll_regex.obj & + $(OBJS)\monodll_stdpbase.obj & + $(OBJS)\monodll_sstream.obj & + $(OBJS)\monodll_stdstream.obj & + $(OBJS)\monodll_stopwatch.obj & + $(OBJS)\monodll_strconv.obj & + $(OBJS)\monodll_stream.obj & + $(OBJS)\monodll_string.obj & + $(OBJS)\monodll_stringimpl.obj & + $(OBJS)\monodll_stringops.obj & + $(OBJS)\monodll_strvararg.obj & + $(OBJS)\monodll_sysopt.obj & + $(OBJS)\monodll_tarstrm.obj & + $(OBJS)\monodll_textbuf.obj & + $(OBJS)\monodll_textfile.obj & + $(OBJS)\monodll_threadinfo.obj & + $(OBJS)\monodll_time.obj & + $(OBJS)\monodll_timercmn.obj & + $(OBJS)\monodll_timerimpl.obj & + $(OBJS)\monodll_tokenzr.obj & + $(OBJS)\monodll_translation.obj & + $(OBJS)\monodll_txtstrm.obj & + $(OBJS)\monodll_unichar.obj & + $(OBJS)\monodll_uri.obj & + $(OBJS)\monodll_ustring.obj & + $(OBJS)\monodll_variant.obj & + $(OBJS)\monodll_wfstream.obj & + $(OBJS)\monodll_wxcrt.obj & + $(OBJS)\monodll_wxprintf.obj & + $(OBJS)\monodll_xlocale.obj & + $(OBJS)\monodll_xti.obj & + $(OBJS)\monodll_xtistrm.obj & + $(OBJS)\monodll_zipstrm.obj & + $(OBJS)\monodll_zstream.obj & + $(OBJS)\monodll_fswatchercmn.obj & + $(OBJS)\monodll_fswatcherg.obj & + $(OBJS)\monodll_basemsw.obj & + $(OBJS)\monodll_crashrpt.obj & + $(OBJS)\monodll_debughlp.obj & + $(OBJS)\monodll_dde.obj & + $(OBJS)\monodll_dir.obj & + $(OBJS)\monodll_dlmsw.obj & + $(OBJS)\monodll_evtloopconsole.obj & + $(OBJS)\monodll_mimetype.obj & + $(OBJS)\monodll_power.obj & + $(OBJS)\monodll_regconf.obj & + $(OBJS)\monodll_registry.obj & + $(OBJS)\monodll_snglinst.obj & + $(OBJS)\monodll_stackwalk.obj & + $(OBJS)\monodll_stdpaths.obj & + $(OBJS)\monodll_thread.obj & + $(OBJS)\monodll_timer.obj & + $(OBJS)\monodll_utils.obj & + $(OBJS)\monodll_utilsexc.obj & + $(OBJS)\monodll_fswatcher.obj & + $(OBJS)\monodll_event.obj & + $(OBJS)\monodll_fs_mem.obj & + $(OBJS)\monodll_msgout.obj & + $(OBJS)\monodll_utilscmn.obj & + $(OBJS)\monodll_main.obj & + $(OBJS)\monodll_mslu.obj & + $(OBJS)\monodll_volume.obj & + $(OBJS)\monodll_fs_inet.obj & + $(OBJS)\monodll_ftp.obj & + $(OBJS)\monodll_http.obj & + $(OBJS)\monodll_protocol.obj & + $(OBJS)\monodll_sckaddr.obj & + $(OBJS)\monodll_sckfile.obj & + $(OBJS)\monodll_sckipc.obj & + $(OBJS)\monodll_sckstrm.obj & + $(OBJS)\monodll_socket.obj & + $(OBJS)\monodll_url.obj & + $(OBJS)\monodll_sockmsw.obj & + $(OBJS)\monodll_urlmsw.obj & + $(____MONOLIB_GUI_SRC_FILENAMES_OBJECTS) & + $(OBJS)\monodll_xml.obj & + $(OBJS)\monodll_xtixml.obj +MONOLIB_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + -i=..\..\src\stc\scintilla\include -i=..\..\src\stc\scintilla\lexlib & + -i=..\..\src\stc\scintilla\src -d__WX__ -dSCI_LEXER -dLINK_LEXERS & + -dwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +MONOLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + -i=..\..\src\stc\scintilla\include -i=..\..\src\stc\scintilla\lexlib & + -i=..\..\src\stc\scintilla\src -d__WX__ -dSCI_LEXER -dLINK_LEXERS & + -dwxUSE_BASE=1 /fh=$(OBJS)\wxprec_monolib.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +MONOLIB_OBJECTS = & + $(OBJS)\monolib_dummy.obj & + $(OBJS)\monolib_any.obj & + $(OBJS)\monolib_appbase.obj & + $(OBJS)\monolib_arcall.obj & + $(OBJS)\monolib_arcfind.obj & + $(OBJS)\monolib_archive.obj & + $(OBJS)\monolib_arrstr.obj & + $(OBJS)\monolib_base64.obj & + $(OBJS)\monolib_clntdata.obj & + $(OBJS)\monolib_cmdline.obj & + $(OBJS)\monolib_config.obj & + $(OBJS)\monolib_convauto.obj & + $(OBJS)\monolib_datetime.obj & + $(OBJS)\monolib_datetimefmt.obj & + $(OBJS)\monolib_datstrm.obj & + $(OBJS)\monolib_dircmn.obj & + $(OBJS)\monolib_dynarray.obj & + $(OBJS)\monolib_dynlib.obj & + $(OBJS)\monolib_dynload.obj & + $(OBJS)\monolib_encconv.obj & + $(OBJS)\monolib_evtloopcmn.obj & + $(OBJS)\monolib_extended.obj & + $(OBJS)\monolib_ffile.obj & + $(OBJS)\monolib_file.obj & + $(OBJS)\monolib_fileback.obj & + $(OBJS)\monolib_fileconf.obj & + $(OBJS)\monolib_filefn.obj & + $(OBJS)\monolib_filename.obj & + $(OBJS)\monolib_filesys.obj & + $(OBJS)\monolib_filtall.obj & + $(OBJS)\monolib_filtfind.obj & + $(OBJS)\monolib_fmapbase.obj & + $(OBJS)\monolib_fs_arc.obj & + $(OBJS)\monolib_fs_filter.obj & + $(OBJS)\monolib_hash.obj & + $(OBJS)\monolib_hashmap.obj & + $(OBJS)\monolib_init.obj & + $(OBJS)\monolib_intl.obj & + $(OBJS)\monolib_ipcbase.obj & + $(OBJS)\monolib_languageinfo.obj & + $(OBJS)\monolib_list.obj & + $(OBJS)\monolib_log.obj & + $(OBJS)\monolib_longlong.obj & + $(OBJS)\monolib_memory.obj & + $(OBJS)\monolib_mimecmn.obj & + $(OBJS)\monolib_module.obj & + $(OBJS)\monolib_mstream.obj & + $(OBJS)\monolib_numformatter.obj & + $(OBJS)\monolib_object.obj & + $(OBJS)\monolib_platinfo.obj & + $(OBJS)\monolib_powercmn.obj & + $(OBJS)\monolib_process.obj & + $(OBJS)\monolib_regex.obj & + $(OBJS)\monolib_stdpbase.obj & + $(OBJS)\monolib_sstream.obj & + $(OBJS)\monolib_stdstream.obj & + $(OBJS)\monolib_stopwatch.obj & + $(OBJS)\monolib_strconv.obj & + $(OBJS)\monolib_stream.obj & + $(OBJS)\monolib_string.obj & + $(OBJS)\monolib_stringimpl.obj & + $(OBJS)\monolib_stringops.obj & + $(OBJS)\monolib_strvararg.obj & + $(OBJS)\monolib_sysopt.obj & + $(OBJS)\monolib_tarstrm.obj & + $(OBJS)\monolib_textbuf.obj & + $(OBJS)\monolib_textfile.obj & + $(OBJS)\monolib_threadinfo.obj & + $(OBJS)\monolib_time.obj & + $(OBJS)\monolib_timercmn.obj & + $(OBJS)\monolib_timerimpl.obj & + $(OBJS)\monolib_tokenzr.obj & + $(OBJS)\monolib_translation.obj & + $(OBJS)\monolib_txtstrm.obj & + $(OBJS)\monolib_unichar.obj & + $(OBJS)\monolib_uri.obj & + $(OBJS)\monolib_ustring.obj & + $(OBJS)\monolib_variant.obj & + $(OBJS)\monolib_wfstream.obj & + $(OBJS)\monolib_wxcrt.obj & + $(OBJS)\monolib_wxprintf.obj & + $(OBJS)\monolib_xlocale.obj & + $(OBJS)\monolib_xti.obj & + $(OBJS)\monolib_xtistrm.obj & + $(OBJS)\monolib_zipstrm.obj & + $(OBJS)\monolib_zstream.obj & + $(OBJS)\monolib_fswatchercmn.obj & + $(OBJS)\monolib_fswatcherg.obj & + $(OBJS)\monolib_basemsw.obj & + $(OBJS)\monolib_crashrpt.obj & + $(OBJS)\monolib_debughlp.obj & + $(OBJS)\monolib_dde.obj & + $(OBJS)\monolib_dir.obj & + $(OBJS)\monolib_dlmsw.obj & + $(OBJS)\monolib_evtloopconsole.obj & + $(OBJS)\monolib_mimetype.obj & + $(OBJS)\monolib_power.obj & + $(OBJS)\monolib_regconf.obj & + $(OBJS)\monolib_registry.obj & + $(OBJS)\monolib_snglinst.obj & + $(OBJS)\monolib_stackwalk.obj & + $(OBJS)\monolib_stdpaths.obj & + $(OBJS)\monolib_thread.obj & + $(OBJS)\monolib_timer.obj & + $(OBJS)\monolib_utils.obj & + $(OBJS)\monolib_utilsexc.obj & + $(OBJS)\monolib_fswatcher.obj & + $(OBJS)\monolib_event.obj & + $(OBJS)\monolib_fs_mem.obj & + $(OBJS)\monolib_msgout.obj & + $(OBJS)\monolib_utilscmn.obj & + $(OBJS)\monolib_main.obj & + $(OBJS)\monolib_mslu.obj & + $(OBJS)\monolib_volume.obj & + $(OBJS)\monolib_fs_inet.obj & + $(OBJS)\monolib_ftp.obj & + $(OBJS)\monolib_http.obj & + $(OBJS)\monolib_protocol.obj & + $(OBJS)\monolib_sckaddr.obj & + $(OBJS)\monolib_sckfile.obj & + $(OBJS)\monolib_sckipc.obj & + $(OBJS)\monolib_sckstrm.obj & + $(OBJS)\monolib_socket.obj & + $(OBJS)\monolib_url.obj & + $(OBJS)\monolib_sockmsw.obj & + $(OBJS)\monolib_urlmsw.obj & + $(____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS) & + $(OBJS)\monolib_xml.obj & + $(OBJS)\monolib_xtixml.obj +BASEDLL_CFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_GUI=0 & + -dWXMAKINGDLL_BASE -dwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +BASEDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_GUI=0 & + -dWXMAKINGDLL_BASE -dwxUSE_BASE=1 /fh=$(OBJS)\wxprec_basedll.pch & + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +BASEDLL_OBJECTS = & + $(OBJS)\basedll_dummy.obj & + $(OBJS)\basedll_any.obj & + $(OBJS)\basedll_appbase.obj & + $(OBJS)\basedll_arcall.obj & + $(OBJS)\basedll_arcfind.obj & + $(OBJS)\basedll_archive.obj & + $(OBJS)\basedll_arrstr.obj & + $(OBJS)\basedll_base64.obj & + $(OBJS)\basedll_clntdata.obj & + $(OBJS)\basedll_cmdline.obj & + $(OBJS)\basedll_config.obj & + $(OBJS)\basedll_convauto.obj & + $(OBJS)\basedll_datetime.obj & + $(OBJS)\basedll_datetimefmt.obj & + $(OBJS)\basedll_datstrm.obj & + $(OBJS)\basedll_dircmn.obj & + $(OBJS)\basedll_dynarray.obj & + $(OBJS)\basedll_dynlib.obj & + $(OBJS)\basedll_dynload.obj & + $(OBJS)\basedll_encconv.obj & + $(OBJS)\basedll_evtloopcmn.obj & + $(OBJS)\basedll_extended.obj & + $(OBJS)\basedll_ffile.obj & + $(OBJS)\basedll_file.obj & + $(OBJS)\basedll_fileback.obj & + $(OBJS)\basedll_fileconf.obj & + $(OBJS)\basedll_filefn.obj & + $(OBJS)\basedll_filename.obj & + $(OBJS)\basedll_filesys.obj & + $(OBJS)\basedll_filtall.obj & + $(OBJS)\basedll_filtfind.obj & + $(OBJS)\basedll_fmapbase.obj & + $(OBJS)\basedll_fs_arc.obj & + $(OBJS)\basedll_fs_filter.obj & + $(OBJS)\basedll_hash.obj & + $(OBJS)\basedll_hashmap.obj & + $(OBJS)\basedll_init.obj & + $(OBJS)\basedll_intl.obj & + $(OBJS)\basedll_ipcbase.obj & + $(OBJS)\basedll_languageinfo.obj & + $(OBJS)\basedll_list.obj & + $(OBJS)\basedll_log.obj & + $(OBJS)\basedll_longlong.obj & + $(OBJS)\basedll_memory.obj & + $(OBJS)\basedll_mimecmn.obj & + $(OBJS)\basedll_module.obj & + $(OBJS)\basedll_mstream.obj & + $(OBJS)\basedll_numformatter.obj & + $(OBJS)\basedll_object.obj & + $(OBJS)\basedll_platinfo.obj & + $(OBJS)\basedll_powercmn.obj & + $(OBJS)\basedll_process.obj & + $(OBJS)\basedll_regex.obj & + $(OBJS)\basedll_stdpbase.obj & + $(OBJS)\basedll_sstream.obj & + $(OBJS)\basedll_stdstream.obj & + $(OBJS)\basedll_stopwatch.obj & + $(OBJS)\basedll_strconv.obj & + $(OBJS)\basedll_stream.obj & + $(OBJS)\basedll_string.obj & + $(OBJS)\basedll_stringimpl.obj & + $(OBJS)\basedll_stringops.obj & + $(OBJS)\basedll_strvararg.obj & + $(OBJS)\basedll_sysopt.obj & + $(OBJS)\basedll_tarstrm.obj & + $(OBJS)\basedll_textbuf.obj & + $(OBJS)\basedll_textfile.obj & + $(OBJS)\basedll_threadinfo.obj & + $(OBJS)\basedll_time.obj & + $(OBJS)\basedll_timercmn.obj & + $(OBJS)\basedll_timerimpl.obj & + $(OBJS)\basedll_tokenzr.obj & + $(OBJS)\basedll_translation.obj & + $(OBJS)\basedll_txtstrm.obj & + $(OBJS)\basedll_unichar.obj & + $(OBJS)\basedll_uri.obj & + $(OBJS)\basedll_ustring.obj & + $(OBJS)\basedll_variant.obj & + $(OBJS)\basedll_wfstream.obj & + $(OBJS)\basedll_wxcrt.obj & + $(OBJS)\basedll_wxprintf.obj & + $(OBJS)\basedll_xlocale.obj & + $(OBJS)\basedll_xti.obj & + $(OBJS)\basedll_xtistrm.obj & + $(OBJS)\basedll_zipstrm.obj & + $(OBJS)\basedll_zstream.obj & + $(OBJS)\basedll_fswatchercmn.obj & + $(OBJS)\basedll_fswatcherg.obj & + $(OBJS)\basedll_basemsw.obj & + $(OBJS)\basedll_crashrpt.obj & + $(OBJS)\basedll_debughlp.obj & + $(OBJS)\basedll_dde.obj & + $(OBJS)\basedll_dir.obj & + $(OBJS)\basedll_dlmsw.obj & + $(OBJS)\basedll_evtloopconsole.obj & + $(OBJS)\basedll_mimetype.obj & + $(OBJS)\basedll_power.obj & + $(OBJS)\basedll_regconf.obj & + $(OBJS)\basedll_registry.obj & + $(OBJS)\basedll_snglinst.obj & + $(OBJS)\basedll_stackwalk.obj & + $(OBJS)\basedll_stdpaths.obj & + $(OBJS)\basedll_thread.obj & + $(OBJS)\basedll_timer.obj & + $(OBJS)\basedll_utils.obj & + $(OBJS)\basedll_utilsexc.obj & + $(OBJS)\basedll_fswatcher.obj & + $(OBJS)\basedll_event.obj & + $(OBJS)\basedll_fs_mem.obj & + $(OBJS)\basedll_msgout.obj & + $(OBJS)\basedll_utilscmn.obj & + $(OBJS)\basedll_main.obj & + $(OBJS)\basedll_mslu.obj & + $(OBJS)\basedll_volume.obj +BASELIB_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_GUI=0 & + -dwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +BASELIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_GUI=0 & + -dwxUSE_BASE=1 /fh=$(OBJS)\wxprec_baselib.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +BASELIB_OBJECTS = & + $(OBJS)\baselib_dummy.obj & + $(OBJS)\baselib_any.obj & + $(OBJS)\baselib_appbase.obj & + $(OBJS)\baselib_arcall.obj & + $(OBJS)\baselib_arcfind.obj & + $(OBJS)\baselib_archive.obj & + $(OBJS)\baselib_arrstr.obj & + $(OBJS)\baselib_base64.obj & + $(OBJS)\baselib_clntdata.obj & + $(OBJS)\baselib_cmdline.obj & + $(OBJS)\baselib_config.obj & + $(OBJS)\baselib_convauto.obj & + $(OBJS)\baselib_datetime.obj & + $(OBJS)\baselib_datetimefmt.obj & + $(OBJS)\baselib_datstrm.obj & + $(OBJS)\baselib_dircmn.obj & + $(OBJS)\baselib_dynarray.obj & + $(OBJS)\baselib_dynlib.obj & + $(OBJS)\baselib_dynload.obj & + $(OBJS)\baselib_encconv.obj & + $(OBJS)\baselib_evtloopcmn.obj & + $(OBJS)\baselib_extended.obj & + $(OBJS)\baselib_ffile.obj & + $(OBJS)\baselib_file.obj & + $(OBJS)\baselib_fileback.obj & + $(OBJS)\baselib_fileconf.obj & + $(OBJS)\baselib_filefn.obj & + $(OBJS)\baselib_filename.obj & + $(OBJS)\baselib_filesys.obj & + $(OBJS)\baselib_filtall.obj & + $(OBJS)\baselib_filtfind.obj & + $(OBJS)\baselib_fmapbase.obj & + $(OBJS)\baselib_fs_arc.obj & + $(OBJS)\baselib_fs_filter.obj & + $(OBJS)\baselib_hash.obj & + $(OBJS)\baselib_hashmap.obj & + $(OBJS)\baselib_init.obj & + $(OBJS)\baselib_intl.obj & + $(OBJS)\baselib_ipcbase.obj & + $(OBJS)\baselib_languageinfo.obj & + $(OBJS)\baselib_list.obj & + $(OBJS)\baselib_log.obj & + $(OBJS)\baselib_longlong.obj & + $(OBJS)\baselib_memory.obj & + $(OBJS)\baselib_mimecmn.obj & + $(OBJS)\baselib_module.obj & + $(OBJS)\baselib_mstream.obj & + $(OBJS)\baselib_numformatter.obj & + $(OBJS)\baselib_object.obj & + $(OBJS)\baselib_platinfo.obj & + $(OBJS)\baselib_powercmn.obj & + $(OBJS)\baselib_process.obj & + $(OBJS)\baselib_regex.obj & + $(OBJS)\baselib_stdpbase.obj & + $(OBJS)\baselib_sstream.obj & + $(OBJS)\baselib_stdstream.obj & + $(OBJS)\baselib_stopwatch.obj & + $(OBJS)\baselib_strconv.obj & + $(OBJS)\baselib_stream.obj & + $(OBJS)\baselib_string.obj & + $(OBJS)\baselib_stringimpl.obj & + $(OBJS)\baselib_stringops.obj & + $(OBJS)\baselib_strvararg.obj & + $(OBJS)\baselib_sysopt.obj & + $(OBJS)\baselib_tarstrm.obj & + $(OBJS)\baselib_textbuf.obj & + $(OBJS)\baselib_textfile.obj & + $(OBJS)\baselib_threadinfo.obj & + $(OBJS)\baselib_time.obj & + $(OBJS)\baselib_timercmn.obj & + $(OBJS)\baselib_timerimpl.obj & + $(OBJS)\baselib_tokenzr.obj & + $(OBJS)\baselib_translation.obj & + $(OBJS)\baselib_txtstrm.obj & + $(OBJS)\baselib_unichar.obj & + $(OBJS)\baselib_uri.obj & + $(OBJS)\baselib_ustring.obj & + $(OBJS)\baselib_variant.obj & + $(OBJS)\baselib_wfstream.obj & + $(OBJS)\baselib_wxcrt.obj & + $(OBJS)\baselib_wxprintf.obj & + $(OBJS)\baselib_xlocale.obj & + $(OBJS)\baselib_xti.obj & + $(OBJS)\baselib_xtistrm.obj & + $(OBJS)\baselib_zipstrm.obj & + $(OBJS)\baselib_zstream.obj & + $(OBJS)\baselib_fswatchercmn.obj & + $(OBJS)\baselib_fswatcherg.obj & + $(OBJS)\baselib_basemsw.obj & + $(OBJS)\baselib_crashrpt.obj & + $(OBJS)\baselib_debughlp.obj & + $(OBJS)\baselib_dde.obj & + $(OBJS)\baselib_dir.obj & + $(OBJS)\baselib_dlmsw.obj & + $(OBJS)\baselib_evtloopconsole.obj & + $(OBJS)\baselib_mimetype.obj & + $(OBJS)\baselib_power.obj & + $(OBJS)\baselib_regconf.obj & + $(OBJS)\baselib_registry.obj & + $(OBJS)\baselib_snglinst.obj & + $(OBJS)\baselib_stackwalk.obj & + $(OBJS)\baselib_stdpaths.obj & + $(OBJS)\baselib_thread.obj & + $(OBJS)\baselib_timer.obj & + $(OBJS)\baselib_utils.obj & + $(OBJS)\baselib_utilsexc.obj & + $(OBJS)\baselib_fswatcher.obj & + $(OBJS)\baselib_event.obj & + $(OBJS)\baselib_fs_mem.obj & + $(OBJS)\baselib_msgout.obj & + $(OBJS)\baselib_utilscmn.obj & + $(OBJS)\baselib_main.obj & + $(OBJS)\baselib_mslu.obj & + $(OBJS)\baselib_volume.obj +NETDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_GUI=0 & + -dWXUSINGDLL -dWXMAKINGDLL_NET /fh=$(OBJS)\wxprec_netdll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +NETDLL_OBJECTS = & + $(OBJS)\netdll_dummy.obj & + $(OBJS)\netdll_fs_inet.obj & + $(OBJS)\netdll_ftp.obj & + $(OBJS)\netdll_http.obj & + $(OBJS)\netdll_protocol.obj & + $(OBJS)\netdll_sckaddr.obj & + $(OBJS)\netdll_sckfile.obj & + $(OBJS)\netdll_sckipc.obj & + $(OBJS)\netdll_sckstrm.obj & + $(OBJS)\netdll_socket.obj & + $(OBJS)\netdll_url.obj & + $(OBJS)\netdll_sockmsw.obj & + $(OBJS)\netdll_urlmsw.obj +NETLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_GUI=0 & + /fh=$(OBJS)\wxprec_netlib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) & + $(CXXFLAGS) +NETLIB_OBJECTS = & + $(OBJS)\netlib_dummy.obj & + $(OBJS)\netlib_fs_inet.obj & + $(OBJS)\netlib_ftp.obj & + $(OBJS)\netlib_http.obj & + $(OBJS)\netlib_protocol.obj & + $(OBJS)\netlib_sckaddr.obj & + $(OBJS)\netlib_sckfile.obj & + $(OBJS)\netlib_sckipc.obj & + $(OBJS)\netlib_sckstrm.obj & + $(OBJS)\netlib_socket.obj & + $(OBJS)\netlib_url.obj & + $(OBJS)\netlib_sockmsw.obj & + $(OBJS)\netlib_urlmsw.obj +COREDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_CORE -dwxUSE_BASE=0 /fh=$(OBJS)\wxprec_coredll.pch & + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +COREDLL_OBJECTS = & + $(OBJS)\coredll_dummy.obj & + $(OBJS)\coredll_event.obj & + $(OBJS)\coredll_fs_mem.obj & + $(OBJS)\coredll_msgout.obj & + $(OBJS)\coredll_utilscmn.obj & + $(OBJS)\coredll_main.obj & + $(OBJS)\coredll_mslu.obj & + $(OBJS)\coredll_volume.obj & + $(____CORE_SRC_FILENAMES_2_OBJECTS) +CORELIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_BASE=0 & + /fh=$(OBJS)\wxprec_corelib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) & + $(CPPFLAGS) $(CXXFLAGS) +CORELIB_OBJECTS = & + $(OBJS)\corelib_dummy.obj & + $(OBJS)\corelib_event.obj & + $(OBJS)\corelib_fs_mem.obj & + $(OBJS)\corelib_msgout.obj & + $(OBJS)\corelib_utilscmn.obj & + $(OBJS)\corelib_main.obj & + $(OBJS)\corelib_mslu.obj & + $(OBJS)\corelib_volume.obj & + $(____CORE_SRC_FILENAMES_3_OBJECTS) +ADVDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_ADV /fh=$(OBJS)\wxprec_advdll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +ADVDLL_OBJECTS = & + $(OBJS)\advdll_dummy.obj & + $(____ADVANCED_SRC_FILENAMES_2_OBJECTS) +ADVLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + /fh=$(OBJS)\wxprec_advlib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) & + $(CXXFLAGS) +ADVLIB_OBJECTS = & + $(OBJS)\advlib_dummy.obj & + $(____ADVANCED_SRC_FILENAMES_3_OBJECTS) +MEDIADLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_MEDIA /fh=$(OBJS)\wxprec_mediadll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +MEDIADLL_OBJECTS = & + $(OBJS)\mediadll_dummy.obj & + $(OBJS)\mediadll_mediactrlcmn.obj & + $(OBJS)\mediadll_mediactrl_am.obj & + $(OBJS)\mediadll_mediactrl_wmp10.obj & + $(OBJS)\mediadll_mediactrl_qt.obj +MEDIALIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + /fh=$(OBJS)\wxprec_medialib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) & + $(CPPFLAGS) $(CXXFLAGS) +MEDIALIB_OBJECTS = & + $(OBJS)\medialib_dummy.obj & + $(OBJS)\medialib_mediactrlcmn.obj & + $(OBJS)\medialib_mediactrl_am.obj & + $(OBJS)\medialib_mediactrl_wmp10.obj & + $(OBJS)\medialib_mediactrl_qt.obj +HTMLDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_HTML /fh=$(OBJS)\wxprec_htmldll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +HTMLDLL_OBJECTS = & + $(OBJS)\htmldll_dummy.obj & + $(OBJS)\htmldll_helpbest.obj & + $(OBJS)\htmldll_helpctrl.obj & + $(OBJS)\htmldll_helpdata.obj & + $(OBJS)\htmldll_helpdlg.obj & + $(OBJS)\htmldll_helpfrm.obj & + $(OBJS)\htmldll_helpwnd.obj & + $(OBJS)\htmldll_htmlcell.obj & + $(OBJS)\htmldll_htmlfilt.obj & + $(OBJS)\htmldll_htmlpars.obj & + $(OBJS)\htmldll_htmltag.obj & + $(OBJS)\htmldll_htmlwin.obj & + $(OBJS)\htmldll_htmprint.obj & + $(OBJS)\htmldll_m_dflist.obj & + $(OBJS)\htmldll_m_fonts.obj & + $(OBJS)\htmldll_m_hline.obj & + $(OBJS)\htmldll_m_image.obj & + $(OBJS)\htmldll_m_layout.obj & + $(OBJS)\htmldll_m_links.obj & + $(OBJS)\htmldll_m_list.obj & + $(OBJS)\htmldll_m_pre.obj & + $(OBJS)\htmldll_m_span.obj & + $(OBJS)\htmldll_m_style.obj & + $(OBJS)\htmldll_m_tables.obj & + $(OBJS)\htmldll_styleparams.obj & + $(OBJS)\htmldll_winpars.obj & + $(OBJS)\htmldll_htmllbox.obj +HTMLLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + /fh=$(OBJS)\wxprec_htmllib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) & + $(CPPFLAGS) $(CXXFLAGS) +HTMLLIB_OBJECTS = & + $(OBJS)\htmllib_dummy.obj & + $(OBJS)\htmllib_helpbest.obj & + $(OBJS)\htmllib_helpctrl.obj & + $(OBJS)\htmllib_helpdata.obj & + $(OBJS)\htmllib_helpdlg.obj & + $(OBJS)\htmllib_helpfrm.obj & + $(OBJS)\htmllib_helpwnd.obj & + $(OBJS)\htmllib_htmlcell.obj & + $(OBJS)\htmllib_htmlfilt.obj & + $(OBJS)\htmllib_htmlpars.obj & + $(OBJS)\htmllib_htmltag.obj & + $(OBJS)\htmllib_htmlwin.obj & + $(OBJS)\htmllib_htmprint.obj & + $(OBJS)\htmllib_m_dflist.obj & + $(OBJS)\htmllib_m_fonts.obj & + $(OBJS)\htmllib_m_hline.obj & + $(OBJS)\htmllib_m_image.obj & + $(OBJS)\htmllib_m_layout.obj & + $(OBJS)\htmllib_m_links.obj & + $(OBJS)\htmllib_m_list.obj & + $(OBJS)\htmllib_m_pre.obj & + $(OBJS)\htmllib_m_span.obj & + $(OBJS)\htmllib_m_style.obj & + $(OBJS)\htmllib_m_tables.obj & + $(OBJS)\htmllib_styleparams.obj & + $(OBJS)\htmllib_winpars.obj & + $(OBJS)\htmllib_htmllbox.obj +WEBVIEWDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_WEBVIEW /fh=$(OBJS)\wxprec_webviewdll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +WEBVIEWDLL_OBJECTS = & + $(OBJS)\webviewdll_dummy.obj & + $(OBJS)\webviewdll_webview_ie.obj & + $(OBJS)\webviewdll_webview.obj & + $(OBJS)\webviewdll_webviewarchivehandler.obj & + $(OBJS)\webviewdll_webviewfshandler.obj +WEBVIEWLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + /fh=$(OBJS)\wxprec_webviewlib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) & + $(CPPFLAGS) $(CXXFLAGS) +WEBVIEWLIB_OBJECTS = & + $(OBJS)\webviewlib_dummy.obj & + $(OBJS)\webviewlib_webview_ie.obj & + $(OBJS)\webviewlib_webview.obj & + $(OBJS)\webviewlib_webviewarchivehandler.obj & + $(OBJS)\webviewlib_webviewfshandler.obj +QADLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_QA /fh=$(OBJS)\wxprec_qadll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +QADLL_OBJECTS = & + $(OBJS)\qadll_dummy.obj & + $(OBJS)\qadll_debugrpt.obj & + $(OBJS)\qadll_dbgrptg.obj +QALIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + /fh=$(OBJS)\wxprec_qalib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) & + $(CXXFLAGS) +QALIB_OBJECTS = & + $(OBJS)\qalib_dummy.obj & + $(OBJS)\qalib_debugrpt.obj & + $(OBJS)\qalib_dbgrptg.obj +XMLDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_GUI=0 & + -dWXUSINGDLL -dWXMAKINGDLL_XML /fh=$(OBJS)\wxprec_xmldll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +XMLDLL_OBJECTS = & + $(OBJS)\xmldll_dummy.obj & + $(OBJS)\xmldll_xml.obj & + $(OBJS)\xmldll_xtixml.obj +XMLLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_GUI=0 & + /fh=$(OBJS)\wxprec_xmllib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) & + $(CXXFLAGS) +XMLLIB_OBJECTS = & + $(OBJS)\xmllib_dummy.obj & + $(OBJS)\xmllib_xml.obj & + $(OBJS)\xmllib_xtixml.obj +XRCDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_XRC /fh=$(OBJS)\wxprec_xrcdll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +XRCDLL_OBJECTS = & + $(OBJS)\xrcdll_dummy.obj & + $(OBJS)\xrcdll_xh_animatctrl.obj & + $(OBJS)\xrcdll_xh_bannerwindow.obj & + $(OBJS)\xrcdll_xh_bmp.obj & + $(OBJS)\xrcdll_xh_bmpcbox.obj & + $(OBJS)\xrcdll_xh_bmpbt.obj & + $(OBJS)\xrcdll_xh_bttn.obj & + $(OBJS)\xrcdll_xh_cald.obj & + $(OBJS)\xrcdll_xh_chckb.obj & + $(OBJS)\xrcdll_xh_chckl.obj & + $(OBJS)\xrcdll_xh_choic.obj & + $(OBJS)\xrcdll_xh_choicbk.obj & + $(OBJS)\xrcdll_xh_clrpicker.obj & + $(OBJS)\xrcdll_xh_cmdlinkbn.obj & + $(OBJS)\xrcdll_xh_collpane.obj & + $(OBJS)\xrcdll_xh_combo.obj & + $(OBJS)\xrcdll_xh_comboctrl.obj & + $(OBJS)\xrcdll_xh_datectrl.obj & + $(OBJS)\xrcdll_xh_dirpicker.obj & + $(OBJS)\xrcdll_xh_dlg.obj & + $(OBJS)\xrcdll_xh_editlbox.obj & + $(OBJS)\xrcdll_xh_filectrl.obj & + $(OBJS)\xrcdll_xh_filepicker.obj & + $(OBJS)\xrcdll_xh_fontpicker.obj & + $(OBJS)\xrcdll_xh_frame.obj & + $(OBJS)\xrcdll_xh_gauge.obj & + $(OBJS)\xrcdll_xh_gdctl.obj & + $(OBJS)\xrcdll_xh_grid.obj & + $(OBJS)\xrcdll_xh_html.obj & + $(OBJS)\xrcdll_xh_hyperlink.obj & + $(OBJS)\xrcdll_xh_listb.obj & + $(OBJS)\xrcdll_xh_listbk.obj & + $(OBJS)\xrcdll_xh_listc.obj & + $(OBJS)\xrcdll_xh_mdi.obj & + $(OBJS)\xrcdll_xh_menu.obj & + $(OBJS)\xrcdll_xh_notbk.obj & + $(OBJS)\xrcdll_xh_odcombo.obj & + $(OBJS)\xrcdll_xh_panel.obj & + $(OBJS)\xrcdll_xh_propdlg.obj & + $(OBJS)\xrcdll_xh_radbt.obj & + $(OBJS)\xrcdll_xh_radbx.obj & + $(OBJS)\xrcdll_xh_scrol.obj & + $(OBJS)\xrcdll_xh_scwin.obj & + $(OBJS)\xrcdll_xh_htmllbox.obj & + $(OBJS)\xrcdll_xh_sizer.obj & + $(OBJS)\xrcdll_xh_slidr.obj & + $(OBJS)\xrcdll_xh_spin.obj & + $(OBJS)\xrcdll_xh_split.obj & + $(OBJS)\xrcdll_xh_srchctrl.obj & + $(OBJS)\xrcdll_xh_statbar.obj & + $(OBJS)\xrcdll_xh_stbmp.obj & + $(OBJS)\xrcdll_xh_stbox.obj & + $(OBJS)\xrcdll_xh_stlin.obj & + $(OBJS)\xrcdll_xh_sttxt.obj & + $(OBJS)\xrcdll_xh_text.obj & + $(OBJS)\xrcdll_xh_tglbtn.obj & + $(OBJS)\xrcdll_xh_timectrl.obj & + $(OBJS)\xrcdll_xh_toolb.obj & + $(OBJS)\xrcdll_xh_toolbk.obj & + $(OBJS)\xrcdll_xh_tree.obj & + $(OBJS)\xrcdll_xh_treebk.obj & + $(OBJS)\xrcdll_xh_unkwn.obj & + $(OBJS)\xrcdll_xh_wizrd.obj & + $(OBJS)\xrcdll_xmlres.obj & + $(OBJS)\xrcdll_xmladv.obj & + $(OBJS)\xrcdll_xmlrsall.obj +XRCLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + /fh=$(OBJS)\wxprec_xrclib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) & + $(CXXFLAGS) +XRCLIB_OBJECTS = & + $(OBJS)\xrclib_dummy.obj & + $(OBJS)\xrclib_xh_animatctrl.obj & + $(OBJS)\xrclib_xh_bannerwindow.obj & + $(OBJS)\xrclib_xh_bmp.obj & + $(OBJS)\xrclib_xh_bmpcbox.obj & + $(OBJS)\xrclib_xh_bmpbt.obj & + $(OBJS)\xrclib_xh_bttn.obj & + $(OBJS)\xrclib_xh_cald.obj & + $(OBJS)\xrclib_xh_chckb.obj & + $(OBJS)\xrclib_xh_chckl.obj & + $(OBJS)\xrclib_xh_choic.obj & + $(OBJS)\xrclib_xh_choicbk.obj & + $(OBJS)\xrclib_xh_clrpicker.obj & + $(OBJS)\xrclib_xh_cmdlinkbn.obj & + $(OBJS)\xrclib_xh_collpane.obj & + $(OBJS)\xrclib_xh_combo.obj & + $(OBJS)\xrclib_xh_comboctrl.obj & + $(OBJS)\xrclib_xh_datectrl.obj & + $(OBJS)\xrclib_xh_dirpicker.obj & + $(OBJS)\xrclib_xh_dlg.obj & + $(OBJS)\xrclib_xh_editlbox.obj & + $(OBJS)\xrclib_xh_filectrl.obj & + $(OBJS)\xrclib_xh_filepicker.obj & + $(OBJS)\xrclib_xh_fontpicker.obj & + $(OBJS)\xrclib_xh_frame.obj & + $(OBJS)\xrclib_xh_gauge.obj & + $(OBJS)\xrclib_xh_gdctl.obj & + $(OBJS)\xrclib_xh_grid.obj & + $(OBJS)\xrclib_xh_html.obj & + $(OBJS)\xrclib_xh_hyperlink.obj & + $(OBJS)\xrclib_xh_listb.obj & + $(OBJS)\xrclib_xh_listbk.obj & + $(OBJS)\xrclib_xh_listc.obj & + $(OBJS)\xrclib_xh_mdi.obj & + $(OBJS)\xrclib_xh_menu.obj & + $(OBJS)\xrclib_xh_notbk.obj & + $(OBJS)\xrclib_xh_odcombo.obj & + $(OBJS)\xrclib_xh_panel.obj & + $(OBJS)\xrclib_xh_propdlg.obj & + $(OBJS)\xrclib_xh_radbt.obj & + $(OBJS)\xrclib_xh_radbx.obj & + $(OBJS)\xrclib_xh_scrol.obj & + $(OBJS)\xrclib_xh_scwin.obj & + $(OBJS)\xrclib_xh_htmllbox.obj & + $(OBJS)\xrclib_xh_sizer.obj & + $(OBJS)\xrclib_xh_slidr.obj & + $(OBJS)\xrclib_xh_spin.obj & + $(OBJS)\xrclib_xh_split.obj & + $(OBJS)\xrclib_xh_srchctrl.obj & + $(OBJS)\xrclib_xh_statbar.obj & + $(OBJS)\xrclib_xh_stbmp.obj & + $(OBJS)\xrclib_xh_stbox.obj & + $(OBJS)\xrclib_xh_stlin.obj & + $(OBJS)\xrclib_xh_sttxt.obj & + $(OBJS)\xrclib_xh_text.obj & + $(OBJS)\xrclib_xh_tglbtn.obj & + $(OBJS)\xrclib_xh_timectrl.obj & + $(OBJS)\xrclib_xh_toolb.obj & + $(OBJS)\xrclib_xh_toolbk.obj & + $(OBJS)\xrclib_xh_tree.obj & + $(OBJS)\xrclib_xh_treebk.obj & + $(OBJS)\xrclib_xh_unkwn.obj & + $(OBJS)\xrclib_xh_wizrd.obj & + $(OBJS)\xrclib_xmlres.obj & + $(OBJS)\xrclib_xmladv.obj & + $(OBJS)\xrclib_xmlrsall.obj +AUIDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_AUI /fh=$(OBJS)\wxprec_auidll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +AUIDLL_OBJECTS = & + $(OBJS)\auidll_dummy.obj & + $(OBJS)\auidll_framemanager.obj & + $(OBJS)\auidll_dockart.obj & + $(OBJS)\auidll_floatpane.obj & + $(OBJS)\auidll_auibook.obj & + $(OBJS)\auidll_auibar.obj & + $(OBJS)\auidll_tabmdi.obj & + $(OBJS)\auidll_tabart.obj & + $(OBJS)\auidll_xh_auinotbk.obj +AUILIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + /fh=$(OBJS)\wxprec_auilib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) & + $(CXXFLAGS) +AUILIB_OBJECTS = & + $(OBJS)\auilib_dummy.obj & + $(OBJS)\auilib_framemanager.obj & + $(OBJS)\auilib_dockart.obj & + $(OBJS)\auilib_floatpane.obj & + $(OBJS)\auilib_auibook.obj & + $(OBJS)\auilib_auibar.obj & + $(OBJS)\auilib_tabmdi.obj & + $(OBJS)\auilib_tabart.obj & + $(OBJS)\auilib_xh_auinotbk.obj +RIBBONDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_RIBBON /fh=$(OBJS)\wxprec_ribbondll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +RIBBONDLL_OBJECTS = & + $(OBJS)\ribbondll_dummy.obj & + $(OBJS)\ribbondll_art_internal.obj & + $(OBJS)\ribbondll_art_msw.obj & + $(OBJS)\ribbondll_art_aui.obj & + $(OBJS)\ribbondll_bar.obj & + $(OBJS)\ribbondll_buttonbar.obj & + $(OBJS)\ribbondll_control.obj & + $(OBJS)\ribbondll_gallery.obj & + $(OBJS)\ribbondll_page.obj & + $(OBJS)\ribbondll_panel.obj & + $(OBJS)\ribbondll_toolbar.obj & + $(OBJS)\ribbondll_xh_ribbon.obj +RIBBONLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + /fh=$(OBJS)\wxprec_ribbonlib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) & + $(CPPFLAGS) $(CXXFLAGS) +RIBBONLIB_OBJECTS = & + $(OBJS)\ribbonlib_dummy.obj & + $(OBJS)\ribbonlib_art_internal.obj & + $(OBJS)\ribbonlib_art_msw.obj & + $(OBJS)\ribbonlib_art_aui.obj & + $(OBJS)\ribbonlib_bar.obj & + $(OBJS)\ribbonlib_buttonbar.obj & + $(OBJS)\ribbonlib_control.obj & + $(OBJS)\ribbonlib_gallery.obj & + $(OBJS)\ribbonlib_page.obj & + $(OBJS)\ribbonlib_panel.obj & + $(OBJS)\ribbonlib_toolbar.obj & + $(OBJS)\ribbonlib_xh_ribbon.obj +PROPGRIDDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_PROPGRID /fh=$(OBJS)\wxprec_propgriddll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +PROPGRIDDLL_OBJECTS = & + $(OBJS)\propgriddll_dummy.obj & + $(OBJS)\propgriddll_advprops.obj & + $(OBJS)\propgriddll_editors.obj & + $(OBJS)\propgriddll_manager.obj & + $(OBJS)\propgriddll_property.obj & + $(OBJS)\propgriddll_propgrid.obj & + $(OBJS)\propgriddll_propgridiface.obj & + $(OBJS)\propgriddll_propgridpagestate.obj & + $(OBJS)\propgriddll_props.obj +PROPGRIDLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + /fh=$(OBJS)\wxprec_propgridlib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) & + $(CPPFLAGS) $(CXXFLAGS) +PROPGRIDLIB_OBJECTS = & + $(OBJS)\propgridlib_dummy.obj & + $(OBJS)\propgridlib_advprops.obj & + $(OBJS)\propgridlib_editors.obj & + $(OBJS)\propgridlib_manager.obj & + $(OBJS)\propgridlib_property.obj & + $(OBJS)\propgridlib_propgrid.obj & + $(OBJS)\propgridlib_propgridiface.obj & + $(OBJS)\propgridlib_propgridpagestate.obj & + $(OBJS)\propgridlib_props.obj +RICHTEXTDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_RICHTEXT /fh=$(OBJS)\wxprec_richtextdll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +RICHTEXTDLL_OBJECTS = & + $(OBJS)\richtextdll_dummy.obj & + $(OBJS)\richtextdll_richtextbuffer.obj & + $(OBJS)\richtextdll_richtextctrl.obj & + $(OBJS)\richtextdll_richtextformatdlg.obj & + $(OBJS)\richtextdll_richtexthtml.obj & + $(OBJS)\richtextdll_richtextimagedlg.obj & + $(OBJS)\richtextdll_richtextprint.obj & + $(OBJS)\richtextdll_richtextstyledlg.obj & + $(OBJS)\richtextdll_richtextstyles.obj & + $(OBJS)\richtextdll_richtextsymboldlg.obj & + $(OBJS)\richtextdll_richtextxml.obj & + $(OBJS)\richtextdll_xh_richtext.obj +RICHTEXTLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + /fh=$(OBJS)\wxprec_richtextlib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) & + $(CPPFLAGS) $(CXXFLAGS) +RICHTEXTLIB_OBJECTS = & + $(OBJS)\richtextlib_dummy.obj & + $(OBJS)\richtextlib_richtextbuffer.obj & + $(OBJS)\richtextlib_richtextctrl.obj & + $(OBJS)\richtextlib_richtextformatdlg.obj & + $(OBJS)\richtextlib_richtexthtml.obj & + $(OBJS)\richtextlib_richtextimagedlg.obj & + $(OBJS)\richtextlib_richtextprint.obj & + $(OBJS)\richtextlib_richtextstyledlg.obj & + $(OBJS)\richtextlib_richtextstyles.obj & + $(OBJS)\richtextlib_richtextsymboldlg.obj & + $(OBJS)\richtextlib_richtextxml.obj & + $(OBJS)\richtextlib_xh_richtext.obj +STCDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + -i=..\..\src\stc\scintilla\include -i=..\..\src\stc\scintilla\lexlib & + -i=..\..\src\stc\scintilla\src -d__WX__ -dSCI_LEXER -dLINK_LEXERS & + -dWXUSINGDLL -dWXMAKINGDLL_STC /fh=$(OBJS)\wxprec_stcdll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +STCDLL_OBJECTS = & + $(OBJS)\stcdll_dummy.obj & + $(OBJS)\stcdll_stc.obj & + $(OBJS)\stcdll_PlatWX.obj & + $(OBJS)\stcdll_ScintillaWX.obj +STCLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + -i=..\..\src\stc\scintilla\include -i=..\..\src\stc\scintilla\lexlib & + -i=..\..\src\stc\scintilla\src -d__WX__ -dSCI_LEXER -dLINK_LEXERS & + /fh=$(OBJS)\wxprec_stclib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) & + $(CXXFLAGS) +STCLIB_OBJECTS = & + $(OBJS)\stclib_dummy.obj & + $(OBJS)\stclib_stc.obj & + $(OBJS)\stclib_PlatWX.obj & + $(OBJS)\stclib_ScintillaWX.obj +GLDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL & + -dWXMAKINGDLL_GL /fh=$(OBJS)\wxprec_gldll.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +GLDLL_OBJECTS = & + $(OBJS)\gldll_dummy.obj & + $(OBJS)\gldll_glcmn.obj & + $(OBJS)\gldll_glcanvas.obj +GLLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include & + $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 & + -dWXBUILDING -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png & + -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib & + /fh=$(OBJS)\wxprec_gllib.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) & + $(CXXFLAGS) +GLLIB_OBJECTS = & + $(OBJS)\gllib_dummy.obj & + $(OBJS)\gllib_glcmn.obj & + $(OBJS)\gllib_glcanvas.obj +BUILD_CFG_FILE = $(SETUPHDIR)\build.cfg + + +all : $(OBJS) +$(OBJS) : + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all : .SYMBOLIC setup_h $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(__wxscintilla) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) build_cfg_file + +clean : .SYMBOLIC + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\*.lbc del $(OBJS)\*.lbc + -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk + -if exist $(OBJS)\*.pch del $(OBJS)\*.pch + -if exist $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib + -if exist $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib del $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib + cd ..\..\samples + wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean + cd $(WATCOM_CWD) + +setup_h : .SYMBOLIC $(SETUPHDIR)\wx ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h $(SETUPHDIR)\wx\setup.h $(SETUPHDIR)\wx\msw\rcdefs.h + +$(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib : $(WXREGEX_OBJECTS) + @%create $(OBJS)\wxregex.lbc + @for %i in ($(WXREGEX_OBJECTS)) do @%append $(OBJS)\wxregex.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\wxregex.lbc + +$(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib : $(WXZLIB_OBJECTS) + @%create $(OBJS)\wxzlib.lbc + @for %i in ($(WXZLIB_OBJECTS)) do @%append $(OBJS)\wxzlib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\wxzlib.lbc + +!ifeq USE_GUI 1 +$(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib : $(WXPNG_OBJECTS) + @%create $(OBJS)\wxpng.lbc + @for %i in ($(WXPNG_OBJECTS)) do @%append $(OBJS)\wxpng.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\wxpng.lbc +!endif + +!ifeq USE_GUI 1 +$(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib : $(WXJPEG_OBJECTS) + @%create $(OBJS)\wxjpeg.lbc + @for %i in ($(WXJPEG_OBJECTS)) do @%append $(OBJS)\wxjpeg.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\wxjpeg.lbc +!endif + +!ifeq USE_GUI 1 +$(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib : $(WXTIFF_OBJECTS) + @%create $(OBJS)\wxtiff.lbc + @for %i in ($(WXTIFF_OBJECTS)) do @%append $(OBJS)\wxtiff.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\wxtiff.lbc +!endif + +$(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib : $(WXEXPAT_OBJECTS) + @%create $(OBJS)\wxexpat.lbc + @for %i in ($(WXEXPAT_OBJECTS)) do @%append $(OBJS)\wxexpat.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\wxexpat.lbc + +!ifeq USE_STC 1 +$(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib : $(WXSCINTILLA_OBJECTS) + @%create $(OBJS)\wxscintilla.lbc + @for %i in ($(WXSCINTILLA_OBJECTS)) do @%append $(OBJS)\wxscintilla.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\wxscintilla.lbc +!endif + +!ifeq MONOLITHIC 1 +!ifeq SHARED 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll : $(MONODLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\monodll_version.res $(__wxscintilla_library_link_DEP) + @%create $(OBJS)\monodll.lbc + @%append $(OBJS)\monodll.lbc option quiet + @%append $(OBJS)\monodll.lbc name $^@ + @%append $(OBJS)\monodll.lbc option caseexact + @%append $(OBJS)\monodll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(MONODLL_OBJECTS)) do @%append $(OBJS)\monodll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(__wxscintilla)) do @%append $(OBJS)\monodll.lbc library %i + @%append $(OBJS)\monodll.lbc option resource=$(OBJS)\monodll_version.res + @%append $(OBJS)\monodll.lbc system nt_dll + wlink @$(OBJS)\monodll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +$^@ +!endif +!endif + +!ifeq MONOLITHIC 1 +!ifeq SHARED 0 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib : $(MONOLIB_OBJECTS) + @%create $(OBJS)\monolib.lbc + @for %i in ($(MONOLIB_OBJECTS)) do @%append $(OBJS)\monolib.lbc +%i + wlib -q -p8192 -n -b $^@ @$(OBJS)\monolib.lbc +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll : $(BASEDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\basedll_version.res + @%create $(OBJS)\basedll.lbc + @%append $(OBJS)\basedll.lbc option quiet + @%append $(OBJS)\basedll.lbc name $^@ + @%append $(OBJS)\basedll.lbc option caseexact + @%append $(OBJS)\basedll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(BASEDLL_OBJECTS)) do @%append $(OBJS)\basedll.lbc file %i + @for %i in ( wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib) do @%append $(OBJS)\basedll.lbc library %i + @%append $(OBJS)\basedll.lbc option resource=$(OBJS)\basedll_version.res + @%append $(OBJS)\basedll.lbc system nt_dll + wlink @$(OBJS)\basedll.lbc + wlib -q -n -b $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +$^@ +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib : $(BASELIB_OBJECTS) + @%create $(OBJS)\baselib.lbc + @for %i in ($(BASELIB_OBJECTS)) do @%append $(OBJS)\baselib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\baselib.lbc +!endif +!endif + +!ifeq MONOLITHIC 0 +wxbase : .SYMBOLIC $(____wxbase_namedll_DEP) $(____wxbase_namelib_DEP) +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll : $(NETDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\netdll_version.res $(__basedll___depname) + @%create $(OBJS)\netdll.lbc + @%append $(OBJS)\netdll.lbc option quiet + @%append $(OBJS)\netdll.lbc name $^@ + @%append $(OBJS)\netdll.lbc option caseexact + @%append $(OBJS)\netdll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(NETDLL_OBJECTS)) do @%append $(OBJS)\netdll.lbc file %i + @for %i in ( wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib) do @%append $(OBJS)\netdll.lbc library %i + @%append $(OBJS)\netdll.lbc option resource=$(OBJS)\netdll_version.res + @%append $(OBJS)\netdll.lbc system nt_dll + wlink @$(OBJS)\netdll.lbc + wlib -q -n -b $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib +$^@ +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib : $(NETLIB_OBJECTS) + @%create $(OBJS)\netlib.lbc + @for %i in ($(NETLIB_OBJECTS)) do @%append $(OBJS)\netlib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\netlib.lbc +!endif +!endif + +!ifeq MONOLITHIC 0 +wxnet : .SYMBOLIC $(____wxnet_namedll_DEP) $(____wxnet_namelib_DEP) +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll : $(COREDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\coredll_version.res $(__basedll___depname) + @%create $(OBJS)\coredll.lbc + @%append $(OBJS)\coredll.lbc option quiet + @%append $(OBJS)\coredll.lbc name $^@ + @%append $(OBJS)\coredll.lbc option caseexact + @%append $(OBJS)\coredll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(COREDLL_OBJECTS)) do @%append $(OBJS)\coredll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib) do @%append $(OBJS)\coredll.lbc library %i + @%append $(OBJS)\coredll.lbc option resource=$(OBJS)\coredll_version.res + @%append $(OBJS)\coredll.lbc system nt_dll + wlink @$(OBJS)\coredll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +$^@ +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib : $(CORELIB_OBJECTS) + @%create $(OBJS)\corelib.lbc + @for %i in ($(CORELIB_OBJECTS)) do @%append $(OBJS)\corelib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\corelib.lbc +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_GUI 1 +wxcore : .SYMBOLIC $(____wxcore_namedll_DEP) $(____wxcore_namelib_DEP) +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll : $(ADVDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\advdll_version.res $(__coredll___depname) $(__basedll___depname) + @%create $(OBJS)\advdll.lbc + @%append $(OBJS)\advdll.lbc option quiet + @%append $(OBJS)\advdll.lbc name $^@ + @%append $(OBJS)\advdll.lbc option caseexact + @%append $(OBJS)\advdll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(ADVDLL_OBJECTS)) do @%append $(OBJS)\advdll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib ) do @%append $(OBJS)\advdll.lbc library %i + @%append $(OBJS)\advdll.lbc option resource=$(OBJS)\advdll_version.res + @%append $(OBJS)\advdll.lbc system nt_dll + wlink @$(OBJS)\advdll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib +$^@ +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib : $(ADVLIB_OBJECTS) + @%create $(OBJS)\advlib.lbc + @for %i in ($(ADVLIB_OBJECTS)) do @%append $(OBJS)\advlib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\advlib.lbc +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_GUI 1 +wxadv : .SYMBOLIC $(____wxadv_namedll_DEP) $(____wxadv_namelib_DEP) +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_MEDIA 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll : $(MEDIADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\mediadll_version.res $(__coredll___depname) $(__basedll___depname) + @%create $(OBJS)\mediadll.lbc + @%append $(OBJS)\mediadll.lbc option quiet + @%append $(OBJS)\mediadll.lbc name $^@ + @%append $(OBJS)\mediadll.lbc option caseexact + @%append $(OBJS)\mediadll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(MEDIADLL_OBJECTS)) do @%append $(OBJS)\mediadll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib ) do @%append $(OBJS)\mediadll.lbc library %i + @%append $(OBJS)\mediadll.lbc option resource=$(OBJS)\mediadll_version.res + @%append $(OBJS)\mediadll.lbc system nt_dll + wlink @$(OBJS)\mediadll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib +$^@ +!endif +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +!ifeq USE_MEDIA 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib : $(MEDIALIB_OBJECTS) + @%create $(OBJS)\medialib.lbc + @for %i in ($(MEDIALIB_OBJECTS)) do @%append $(OBJS)\medialib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\medialib.lbc +!endif +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_GUI 1 +!ifeq USE_MEDIA 1 +wxmedia : .SYMBOLIC $(____wxmedia_namedll_DEP) $(____wxmedia_namelib_DEP) +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_HTML 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll : $(HTMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\htmldll_version.res $(__coredll___depname) $(__basedll___depname) + @%create $(OBJS)\htmldll.lbc + @%append $(OBJS)\htmldll.lbc option quiet + @%append $(OBJS)\htmldll.lbc name $^@ + @%append $(OBJS)\htmldll.lbc option caseexact + @%append $(OBJS)\htmldll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(HTMLDLL_OBJECTS)) do @%append $(OBJS)\htmldll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib ) do @%append $(OBJS)\htmldll.lbc library %i + @%append $(OBJS)\htmldll.lbc option resource=$(OBJS)\htmldll_version.res + @%append $(OBJS)\htmldll.lbc system nt_dll + wlink @$(OBJS)\htmldll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib +$^@ +!endif +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +!ifeq USE_HTML 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib : $(HTMLLIB_OBJECTS) + @%create $(OBJS)\htmllib.lbc + @for %i in ($(HTMLLIB_OBJECTS)) do @%append $(OBJS)\htmllib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\htmllib.lbc +!endif +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_HTML 1 +wxhtml : .SYMBOLIC $(____wxhtml_namedll_DEP) $(____wxhtml_namelib_DEP) +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_WEBVIEW 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll : $(WEBVIEWDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\webviewdll_version.res $(__coredll___depname) $(__basedll___depname) + @%create $(OBJS)\webviewdll.lbc + @%append $(OBJS)\webviewdll.lbc option quiet + @%append $(OBJS)\webviewdll.lbc name $^@ + @%append $(OBJS)\webviewdll.lbc option caseexact + @%append $(OBJS)\webviewdll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(WEBVIEWDLL_OBJECTS)) do @%append $(OBJS)\webviewdll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib) do @%append $(OBJS)\webviewdll.lbc library %i + @%append $(OBJS)\webviewdll.lbc option resource=$(OBJS)\webviewdll_version.res + @%append $(OBJS)\webviewdll.lbc system nt_dll + wlink @$(OBJS)\webviewdll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib +$^@ +!endif +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +!ifeq USE_WEBVIEW 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib : $(WEBVIEWLIB_OBJECTS) + @%create $(OBJS)\webviewlib.lbc + @for %i in ($(WEBVIEWLIB_OBJECTS)) do @%append $(OBJS)\webviewlib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\webviewlib.lbc +!endif +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_WEBVIEW 1 +wxwebview : .SYMBOLIC $(____wxwebview_namedll_DEP) $(____wxwebview_namelib_DEP) +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_QA 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll : $(QADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\qadll_version.res $(__coredll___depname) $(__basedll___depname) $(__xmldll___depname) + @%create $(OBJS)\qadll.lbc + @%append $(OBJS)\qadll.lbc option quiet + @%append $(OBJS)\qadll.lbc name $^@ + @%append $(OBJS)\qadll.lbc option caseexact + @%append $(OBJS)\qadll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(QADLL_OBJECTS)) do @%append $(OBJS)\qadll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib) do @%append $(OBJS)\qadll.lbc library %i + @%append $(OBJS)\qadll.lbc option resource=$(OBJS)\qadll_version.res + @%append $(OBJS)\qadll.lbc system nt_dll + wlink @$(OBJS)\qadll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib +$^@ +!endif +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_GUI 1 +!ifeq USE_QA 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib : $(QALIB_OBJECTS) + @%create $(OBJS)\qalib.lbc + @for %i in ($(QALIB_OBJECTS)) do @%append $(OBJS)\qalib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\qalib.lbc +!endif +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_QA 1 +wxqa : .SYMBOLIC $(____wxqa_namedll_DEP) $(____wxqa_namelib_DEP) +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll : $(XMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xmldll_version.res $(__basedll___depname) + @%create $(OBJS)\xmldll.lbc + @%append $(OBJS)\xmldll.lbc option quiet + @%append $(OBJS)\xmldll.lbc name $^@ + @%append $(OBJS)\xmldll.lbc option caseexact + @%append $(OBJS)\xmldll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(XMLDLL_OBJECTS)) do @%append $(OBJS)\xmldll.lbc file %i + @for %i in ( wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib ) do @%append $(OBJS)\xmldll.lbc library %i + @%append $(OBJS)\xmldll.lbc option resource=$(OBJS)\xmldll_version.res + @%append $(OBJS)\xmldll.lbc system nt_dll + wlink @$(OBJS)\xmldll.lbc + wlib -q -n -b $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib +$^@ +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib : $(XMLLIB_OBJECTS) + @%create $(OBJS)\xmllib.lbc + @for %i in ($(XMLLIB_OBJECTS)) do @%append $(OBJS)\xmllib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\xmllib.lbc +!endif +!endif + +!ifeq MONOLITHIC 0 +wxxml : .SYMBOLIC $(____wxxml_namedll_DEP) $(____wxxml_namelib_DEP) +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_XRC 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll : $(XRCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xrcdll_version.res $(__htmldll_library_link_DEP) $(__advdll___depname) $(__coredll___depname) $(__xmldll___depname) $(__basedll___depname) + @%create $(OBJS)\xrcdll.lbc + @%append $(OBJS)\xrcdll.lbc option quiet + @%append $(OBJS)\xrcdll.lbc name $^@ + @%append $(OBJS)\xrcdll.lbc option caseexact + @%append $(OBJS)\xrcdll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(XRCDLL_OBJECTS)) do @%append $(OBJS)\xrcdll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib) do @%append $(OBJS)\xrcdll.lbc library %i + @%append $(OBJS)\xrcdll.lbc option resource=$(OBJS)\xrcdll_version.res + @%append $(OBJS)\xrcdll.lbc system nt_dll + wlink @$(OBJS)\xrcdll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib +$^@ +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_XRC 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib : $(XRCLIB_OBJECTS) + @%create $(OBJS)\xrclib.lbc + @for %i in ($(XRCLIB_OBJECTS)) do @%append $(OBJS)\xrclib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\xrclib.lbc +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_XRC 1 +wxxrc : .SYMBOLIC $(____wxxrc_namedll_DEP) $(____wxxrc_namelib_DEP) +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_AUI 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll : $(AUIDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\auidll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + @%create $(OBJS)\auidll.lbc + @%append $(OBJS)\auidll.lbc option quiet + @%append $(OBJS)\auidll.lbc name $^@ + @%append $(OBJS)\auidll.lbc option caseexact + @%append $(OBJS)\auidll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(AUIDLL_OBJECTS)) do @%append $(OBJS)\auidll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib) do @%append $(OBJS)\auidll.lbc library %i + @%append $(OBJS)\auidll.lbc option resource=$(OBJS)\auidll_version.res + @%append $(OBJS)\auidll.lbc system nt_dll + wlink @$(OBJS)\auidll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib +$^@ +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_AUI 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib : $(AUILIB_OBJECTS) + @%create $(OBJS)\auilib.lbc + @for %i in ($(AUILIB_OBJECTS)) do @%append $(OBJS)\auilib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\auilib.lbc +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_AUI 1 +wxaui : .SYMBOLIC $(____wxaui_namedll_DEP) $(____wxaui_namelib_DEP) +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_RIBBON 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll : $(RIBBONDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\ribbondll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + @%create $(OBJS)\ribbondll.lbc + @%append $(OBJS)\ribbondll.lbc option quiet + @%append $(OBJS)\ribbondll.lbc name $^@ + @%append $(OBJS)\ribbondll.lbc option caseexact + @%append $(OBJS)\ribbondll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(RIBBONDLL_OBJECTS)) do @%append $(OBJS)\ribbondll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib) do @%append $(OBJS)\ribbondll.lbc library %i + @%append $(OBJS)\ribbondll.lbc option resource=$(OBJS)\ribbondll_version.res + @%append $(OBJS)\ribbondll.lbc system nt_dll + wlink @$(OBJS)\ribbondll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib +$^@ +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_RIBBON 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib : $(RIBBONLIB_OBJECTS) + @%create $(OBJS)\ribbonlib.lbc + @for %i in ($(RIBBONLIB_OBJECTS)) do @%append $(OBJS)\ribbonlib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\ribbonlib.lbc +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_RIBBON 1 +wxribbon : .SYMBOLIC $(____wxribbon_namedll_DEP) $(____wxribbon_namelib_DEP) +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_PROPGRID 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll : $(PROPGRIDDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\propgriddll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) + @%create $(OBJS)\propgriddll.lbc + @%append $(OBJS)\propgriddll.lbc option quiet + @%append $(OBJS)\propgriddll.lbc name $^@ + @%append $(OBJS)\propgriddll.lbc option caseexact + @%append $(OBJS)\propgriddll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(PROPGRIDDLL_OBJECTS)) do @%append $(OBJS)\propgriddll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib) do @%append $(OBJS)\propgriddll.lbc library %i + @%append $(OBJS)\propgriddll.lbc option resource=$(OBJS)\propgriddll_version.res + @%append $(OBJS)\propgriddll.lbc system nt_dll + wlink @$(OBJS)\propgriddll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib +$^@ +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_PROPGRID 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib : $(PROPGRIDLIB_OBJECTS) + @%create $(OBJS)\propgridlib.lbc + @for %i in ($(PROPGRIDLIB_OBJECTS)) do @%append $(OBJS)\propgridlib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\propgridlib.lbc +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_PROPGRID 1 +wxpropgrid : .SYMBOLIC $(____wxpropgrid_namedll_DEP) $(____wxpropgrid_namelib_DEP) +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_RICHTEXT 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll : $(RICHTEXTDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\richtextdll_version.res $(__advdll___depname) $(__htmldll_library_link_DEP) $(__xmldll___depname) $(__coredll___depname) $(__basedll___depname) + @%create $(OBJS)\richtextdll.lbc + @%append $(OBJS)\richtextdll.lbc option quiet + @%append $(OBJS)\richtextdll.lbc name $^@ + @%append $(OBJS)\richtextdll.lbc option caseexact + @%append $(OBJS)\richtextdll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(RICHTEXTDLL_OBJECTS)) do @%append $(OBJS)\richtextdll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib) do @%append $(OBJS)\richtextdll.lbc library %i + @%append $(OBJS)\richtextdll.lbc option resource=$(OBJS)\richtextdll_version.res + @%append $(OBJS)\richtextdll.lbc system nt_dll + wlink @$(OBJS)\richtextdll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib +$^@ +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_RICHTEXT 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib : $(RICHTEXTLIB_OBJECTS) + @%create $(OBJS)\richtextlib.lbc + @for %i in ($(RICHTEXTLIB_OBJECTS)) do @%append $(OBJS)\richtextlib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\richtextlib.lbc +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_RICHTEXT 1 +wxrichtext : .SYMBOLIC $(____wxrichtext_namedll_DEP) $(____wxrichtext_namelib_DEP) +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 1 +!ifeq USE_STC 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll : $(STCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(__wxscintilla) $(OBJS)\stcdll_version.res $(__coredll___depname) $(__basedll___depname) + @%create $(OBJS)\stcdll.lbc + @%append $(OBJS)\stcdll.lbc option quiet + @%append $(OBJS)\stcdll.lbc name $^@ + @%append $(OBJS)\stcdll.lbc option caseexact + @%append $(OBJS)\stcdll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(STCDLL_OBJECTS)) do @%append $(OBJS)\stcdll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib) do @%append $(OBJS)\stcdll.lbc library %i + @%append $(OBJS)\stcdll.lbc option resource=$(OBJS)\stcdll_version.res + @%append $(OBJS)\stcdll.lbc system nt_dll + wlink @$(OBJS)\stcdll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib +$^@ +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq SHARED 0 +!ifeq USE_STC 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib : $(STCLIB_OBJECTS) $(__wxscintilla) + @%create $(OBJS)\stclib.lbc + @for %i in ($(STCLIB_OBJECTS)) do @%append $(OBJS)\stclib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\stclib.lbc +!endif +!endif +!endif + +!ifeq MONOLITHIC 0 +!ifeq USE_STC 1 +wxstc : .SYMBOLIC $(____wxstc_namedll_DEP) $(____wxstc_namelib_DEP) +!endif +!endif + +!ifeq SHARED 1 +!ifeq USE_GUI 1 +!ifeq USE_OPENGL 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll : $(GLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\gldll_version.res $(__basedll___depname) $(__coredll___depname) $(__monodll___depname) + @%create $(OBJS)\gldll.lbc + @%append $(OBJS)\gldll.lbc option quiet + @%append $(OBJS)\gldll.lbc name $^@ + @%append $(OBJS)\gldll.lbc option caseexact + @%append $(OBJS)\gldll.lbc $(__DEBUGINFO_4) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) + @for %i in ($(GLDLL_OBJECTS)) do @%append $(OBJS)\gldll.lbc file %i + @for %i in ( $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) opengl32.lib glu32.lib) do @%append $(OBJS)\gldll.lbc library %i + @%append $(OBJS)\gldll.lbc option resource=$(OBJS)\gldll_version.res + @%append $(OBJS)\gldll.lbc system nt_dll + wlink @$(OBJS)\gldll.lbc + wlib -q -n -b $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib +$^@ +!endif +!endif +!endif + +!ifeq SHARED 0 +!ifeq USE_GUI 1 +!ifeq USE_OPENGL 1 +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib : $(GLLIB_OBJECTS) + @%create $(OBJS)\gllib.lbc + @for %i in ($(GLLIB_OBJECTS)) do @%append $(OBJS)\gllib.lbc +%i + wlib -q -p4096 -n -b $^@ @$(OBJS)\gllib.lbc +!endif +!endif +!endif + +!ifeq USE_GUI 1 +!ifeq USE_OPENGL 1 +wxgl : .SYMBOLIC $(____wxgl_namedll_DEP) $(____wxgl_namelib_DEP) +!endif +!endif + +samples : .SYMBOLIC + cd ..\..\samples + wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) all + cd $(WATCOM_CWD) + +$(LIBDIRNAME) : + if not exist $(LIBDIRNAME) mkdir $(LIBDIRNAME) + +$(SETUPHDIR) : $(LIBDIRNAME) + if not exist $(SETUPHDIR) mkdir $(SETUPHDIR) + +$(SETUPHDIR)\wx : $(SETUPHDIR) + if not exist $(SETUPHDIR)\wx mkdir $(SETUPHDIR)\wx + +..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h : + if not exist ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h copy ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup0.h ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h + +$(SETUPHDIR)\wx\setup.h : + if not exist $(SETUPHDIR)\wx\setup.h copy ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h $(SETUPHDIR)\wx\setup.h + +$(SETUPHDIR)\wx\msw : $(SETUPHDIR)\wx + if not exist $(SETUPHDIR)\wx\msw mkdir $(SETUPHDIR)\wx\msw + +$(SETUPHDIR)\wx\msw\rcdefs.h : $(SETUPHDIR)\wx\msw ..\..\include\wx\msw\genrcdefs.h + $(CPP) "..\..\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h" + +build_cfg_file : .SYMBOLIC $(SETUPHDIR) + @echo WXVER_MAJOR=3 >$(BUILD_CFG_FILE) + @echo WXVER_MINOR=0 >>$(BUILD_CFG_FILE) + @echo WXVER_RELEASE=1 >>$(BUILD_CFG_FILE) + @echo BUILD=$(BUILD) >>$(BUILD_CFG_FILE) + @echo MONOLITHIC=$(MONOLITHIC) >>$(BUILD_CFG_FILE) + @echo SHARED=$(SHARED) >>$(BUILD_CFG_FILE) + @echo UNICODE=$(UNICODE) >>$(BUILD_CFG_FILE) + @echo TOOLKIT=MSW >>$(BUILD_CFG_FILE) + @echo TOOLKIT_VERSION=$(TOOLKIT_VERSION) >>$(BUILD_CFG_FILE) + @echo WXUNIV=$(WXUNIV) >>$(BUILD_CFG_FILE) + @echo CFG=$(CFG) >>$(BUILD_CFG_FILE) + @echo VENDOR=$(VENDOR) >>$(BUILD_CFG_FILE) + @echo OFFICIAL_BUILD=$(OFFICIAL_BUILD) >>$(BUILD_CFG_FILE) + @echo DEBUG_FLAG=$(DEBUG_FLAG) >>$(BUILD_CFG_FILE) + @echo DEBUG_INFO=$(DEBUG_INFO) >>$(BUILD_CFG_FILE) + @echo RUNTIME_LIBS=$(RUNTIME_LIBS) >>$(BUILD_CFG_FILE) + @echo MSLU=0 >>$(BUILD_CFG_FILE) + @echo USE_EXCEPTIONS=$(USE_EXCEPTIONS) >>$(BUILD_CFG_FILE) + @echo USE_RTTI=$(USE_RTTI) >>$(BUILD_CFG_FILE) + @echo USE_THREADS=$(USE_THREADS) >>$(BUILD_CFG_FILE) + @echo USE_AUI=$(USE_AUI) >>$(BUILD_CFG_FILE) + @echo USE_GUI=$(USE_GUI) >>$(BUILD_CFG_FILE) + @echo USE_HTML=$(USE_HTML) >>$(BUILD_CFG_FILE) + @echo USE_MEDIA=$(USE_MEDIA) >>$(BUILD_CFG_FILE) + @echo USE_OPENGL=$(USE_OPENGL) >>$(BUILD_CFG_FILE) + @echo USE_QA=$(USE_QA) >>$(BUILD_CFG_FILE) + @echo USE_PROPGRID=$(USE_PROPGRID) >>$(BUILD_CFG_FILE) + @echo USE_RIBBON=$(USE_RIBBON) >>$(BUILD_CFG_FILE) + @echo USE_RICHTEXT=$(USE_RICHTEXT) >>$(BUILD_CFG_FILE) + @echo USE_STC=$(USE_STC) >>$(BUILD_CFG_FILE) + @echo USE_WEBVIEW=$(USE_WEBVIEW) >>$(BUILD_CFG_FILE) + @echo USE_XRC=$(USE_XRC) >>$(BUILD_CFG_FILE) + @echo COMPILER=wat >>$(BUILD_CFG_FILE) + @echo COMPILER_VERSION=$(COMPILER_VERSION) >>$(BUILD_CFG_FILE) + @echo CC=$(CC) >>$(BUILD_CFG_FILE) + @echo CXX=$(CXX) >>$(BUILD_CFG_FILE) + @echo CFLAGS=$(CFLAGS) >>$(BUILD_CFG_FILE) + @echo CPPFLAGS=$(CPPFLAGS) >>$(BUILD_CFG_FILE) + @echo CXXFLAGS=$(CXXFLAGS) >>$(BUILD_CFG_FILE) + @echo LDFLAGS=$(LDFLAGS) >>$(BUILD_CFG_FILE) + +$(OBJS)\wxregex_regcomp.obj : .AUTODEPEND ..\..\src\regex\regcomp.c + $(CC) -bt=nt -zq -fo=$^@ $(WXREGEX_CFLAGS) $< + +$(OBJS)\wxregex_regexec.obj : .AUTODEPEND ..\..\src\regex\regexec.c + $(CC) -bt=nt -zq -fo=$^@ $(WXREGEX_CFLAGS) $< + +$(OBJS)\wxregex_regerror.obj : .AUTODEPEND ..\..\src\regex\regerror.c + $(CC) -bt=nt -zq -fo=$^@ $(WXREGEX_CFLAGS) $< + +$(OBJS)\wxregex_regfree.obj : .AUTODEPEND ..\..\src\regex\regfree.c + $(CC) -bt=nt -zq -fo=$^@ $(WXREGEX_CFLAGS) $< + +$(OBJS)\wxzlib_adler32.obj : .AUTODEPEND ..\..\src\zlib\adler32.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_compress.obj : .AUTODEPEND ..\..\src\zlib\compress.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_crc32.obj : .AUTODEPEND ..\..\src\zlib\crc32.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_deflate.obj : .AUTODEPEND ..\..\src\zlib\deflate.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_gzclose.obj : .AUTODEPEND ..\..\src\zlib\gzclose.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_gzlib.obj : .AUTODEPEND ..\..\src\zlib\gzlib.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_gzread.obj : .AUTODEPEND ..\..\src\zlib\gzread.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_gzwrite.obj : .AUTODEPEND ..\..\src\zlib\gzwrite.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_infback.obj : .AUTODEPEND ..\..\src\zlib\infback.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_inffast.obj : .AUTODEPEND ..\..\src\zlib\inffast.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_inflate.obj : .AUTODEPEND ..\..\src\zlib\inflate.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_inftrees.obj : .AUTODEPEND ..\..\src\zlib\inftrees.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_trees.obj : .AUTODEPEND ..\..\src\zlib\trees.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_uncompr.obj : .AUTODEPEND ..\..\src\zlib\uncompr.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxzlib_zutil.obj : .AUTODEPEND ..\..\src\zlib\zutil.c + $(CC) -bt=nt -zq -fo=$^@ $(WXZLIB_CFLAGS) $< + +$(OBJS)\wxpng_png.obj : .AUTODEPEND ..\..\src\png\png.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngerror.obj : .AUTODEPEND ..\..\src\png\pngerror.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngget.obj : .AUTODEPEND ..\..\src\png\pngget.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngmem.obj : .AUTODEPEND ..\..\src\png\pngmem.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngpread.obj : .AUTODEPEND ..\..\src\png\pngpread.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngread.obj : .AUTODEPEND ..\..\src\png\pngread.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngrio.obj : .AUTODEPEND ..\..\src\png\pngrio.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngrtran.obj : .AUTODEPEND ..\..\src\png\pngrtran.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngrutil.obj : .AUTODEPEND ..\..\src\png\pngrutil.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngset.obj : .AUTODEPEND ..\..\src\png\pngset.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngtrans.obj : .AUTODEPEND ..\..\src\png\pngtrans.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngwio.obj : .AUTODEPEND ..\..\src\png\pngwio.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngwrite.obj : .AUTODEPEND ..\..\src\png\pngwrite.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngwtran.obj : .AUTODEPEND ..\..\src\png\pngwtran.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxpng_pngwutil.obj : .AUTODEPEND ..\..\src\png\pngwutil.c + $(CC) -bt=nt -zq -fo=$^@ $(WXPNG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcomapi.obj : .AUTODEPEND ..\..\src\jpeg\jcomapi.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jutils.obj : .AUTODEPEND ..\..\src\jpeg\jutils.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jerror.obj : .AUTODEPEND ..\..\src\jpeg\jerror.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jmemmgr.obj : .AUTODEPEND ..\..\src\jpeg\jmemmgr.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jmemnobs.obj : .AUTODEPEND ..\..\src\jpeg\jmemnobs.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcapimin.obj : .AUTODEPEND ..\..\src\jpeg\jcapimin.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcapistd.obj : .AUTODEPEND ..\..\src\jpeg\jcapistd.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jctrans.obj : .AUTODEPEND ..\..\src\jpeg\jctrans.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcparam.obj : .AUTODEPEND ..\..\src\jpeg\jcparam.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdatadst.obj : .AUTODEPEND ..\..\src\jpeg\jdatadst.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcinit.obj : .AUTODEPEND ..\..\src\jpeg\jcinit.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcmaster.obj : .AUTODEPEND ..\..\src\jpeg\jcmaster.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcmarker.obj : .AUTODEPEND ..\..\src\jpeg\jcmarker.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcmainct.obj : .AUTODEPEND ..\..\src\jpeg\jcmainct.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcprepct.obj : .AUTODEPEND ..\..\src\jpeg\jcprepct.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jccoefct.obj : .AUTODEPEND ..\..\src\jpeg\jccoefct.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jccolor.obj : .AUTODEPEND ..\..\src\jpeg\jccolor.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcsample.obj : .AUTODEPEND ..\..\src\jpeg\jcsample.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jchuff.obj : .AUTODEPEND ..\..\src\jpeg\jchuff.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcphuff.obj : .AUTODEPEND ..\..\src\jpeg\jcphuff.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jcdctmgr.obj : .AUTODEPEND ..\..\src\jpeg\jcdctmgr.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jfdctfst.obj : .AUTODEPEND ..\..\src\jpeg\jfdctfst.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jfdctflt.obj : .AUTODEPEND ..\..\src\jpeg\jfdctflt.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jfdctint.obj : .AUTODEPEND ..\..\src\jpeg\jfdctint.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdapimin.obj : .AUTODEPEND ..\..\src\jpeg\jdapimin.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdapistd.obj : .AUTODEPEND ..\..\src\jpeg\jdapistd.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdtrans.obj : .AUTODEPEND ..\..\src\jpeg\jdtrans.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdatasrc.obj : .AUTODEPEND ..\..\src\jpeg\jdatasrc.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdmaster.obj : .AUTODEPEND ..\..\src\jpeg\jdmaster.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdinput.obj : .AUTODEPEND ..\..\src\jpeg\jdinput.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdmarker.obj : .AUTODEPEND ..\..\src\jpeg\jdmarker.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdhuff.obj : .AUTODEPEND ..\..\src\jpeg\jdhuff.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdphuff.obj : .AUTODEPEND ..\..\src\jpeg\jdphuff.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdmainct.obj : .AUTODEPEND ..\..\src\jpeg\jdmainct.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdcoefct.obj : .AUTODEPEND ..\..\src\jpeg\jdcoefct.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdpostct.obj : .AUTODEPEND ..\..\src\jpeg\jdpostct.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jddctmgr.obj : .AUTODEPEND ..\..\src\jpeg\jddctmgr.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jidctfst.obj : .AUTODEPEND ..\..\src\jpeg\jidctfst.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jidctflt.obj : .AUTODEPEND ..\..\src\jpeg\jidctflt.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jidctint.obj : .AUTODEPEND ..\..\src\jpeg\jidctint.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jidctred.obj : .AUTODEPEND ..\..\src\jpeg\jidctred.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdsample.obj : .AUTODEPEND ..\..\src\jpeg\jdsample.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdcolor.obj : .AUTODEPEND ..\..\src\jpeg\jdcolor.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jquant1.obj : .AUTODEPEND ..\..\src\jpeg\jquant1.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jquant2.obj : .AUTODEPEND ..\..\src\jpeg\jquant2.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxjpeg_jdmerge.obj : .AUTODEPEND ..\..\src\jpeg\jdmerge.c + $(CC) -bt=nt -zq -fo=$^@ $(WXJPEG_CFLAGS) $< + +$(OBJS)\wxtiff_tif_win32.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_win32.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_aux.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_aux.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_close.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_close.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_codec.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_codec.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_color.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_color.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_compress.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_compress.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_dir.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_dir.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_dirinfo.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_dirinfo.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_dirread.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_dirread.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_dirwrite.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_dirwrite.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_dumpmode.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_dumpmode.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_error.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_error.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_extension.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_extension.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_fax3.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_fax3.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_fax3sm.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_fax3sm.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_flush.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_flush.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_getimage.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_getimage.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_jbig.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_jbig.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_jpeg.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_jpeg.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_jpeg_12.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_jpeg_12.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_luv.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_luv.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_lzma.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_lzma.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_lzw.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_lzw.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_next.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_next.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_ojpeg.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_ojpeg.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_open.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_open.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_packbits.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_packbits.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_pixarlog.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_pixarlog.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_predict.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_predict.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_print.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_print.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_read.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_read.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_strip.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_strip.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_swab.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_swab.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_thunder.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_thunder.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_tile.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_tile.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_version.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_version.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_warning.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_warning.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_write.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_write.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxtiff_tif_zip.obj : .AUTODEPEND ..\..\src\tiff\libtiff\tif_zip.c + $(CC) -bt=nt -zq -fo=$^@ $(WXTIFF_CFLAGS) $< + +$(OBJS)\wxexpat_xmlparse.obj : .AUTODEPEND ..\..\src\expat\lib\xmlparse.c + $(CC) -bt=nt -zq -fo=$^@ $(WXEXPAT_CFLAGS) $< + +$(OBJS)\wxexpat_xmlrole.obj : .AUTODEPEND ..\..\src\expat\lib\xmlrole.c + $(CC) -bt=nt -zq -fo=$^@ $(WXEXPAT_CFLAGS) $< + +$(OBJS)\wxexpat_xmltok.obj : .AUTODEPEND ..\..\src\expat\lib\xmltok.c + $(CC) -bt=nt -zq -fo=$^@ $(WXEXPAT_CFLAGS) $< + +$(OBJS)\wxscintilla_LexA68k.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexA68k.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexAbaqus.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexAbaqus.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexAda.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexAda.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexAPDL.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexAPDL.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexAsm.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexAsm.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexAsn1.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexAsn1.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexASY.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexASY.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexAU3.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexAU3.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexAVE.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexAVE.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexAVS.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexAVS.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexBaan.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexBaan.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexBash.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexBash.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexBasic.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexBasic.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexBullant.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexBullant.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexCaml.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexCaml.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexCLW.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexCLW.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexCmake.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexCmake.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexCOBOL.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexCOBOL.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexCoffeeScript.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexCoffeeScript.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexConf.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexConf.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexCPP.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexCPP.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexCrontab.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexCrontab.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexCsound.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexCsound.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexCSS.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexCSS.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexD.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexD.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexECL.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexECL.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexEiffel.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexEiffel.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexErlang.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexErlang.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexEScript.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexEScript.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexFlagship.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexFlagship.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexForth.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexForth.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexFortran.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexFortran.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexGAP.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexGAP.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexGui4Cli.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexGui4Cli.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexHaskell.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexHaskell.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexHTML.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexHTML.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexInno.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexInno.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexKix.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexKix.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexLisp.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexLisp.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexLout.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexLout.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexLua.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexLua.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexMagik.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexMagik.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexMarkdown.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexMarkdown.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexMatlab.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexMatlab.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexMetapost.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexMetapost.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexMMIXAL.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexMMIXAL.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexModula.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexModula.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexMPT.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexMPT.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexMSSQL.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexMSSQL.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexMySQL.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexMySQL.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexNimrod.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexNimrod.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexNsis.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexNsis.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexOpal.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexOpal.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexOScript.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexOScript.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexOthers.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexOthers.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexPascal.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexPascal.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexPB.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexPB.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexPerl.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexPerl.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexPLM.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexPLM.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexPOV.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexPOV.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexPowerPro.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexPowerPro.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexPowerShell.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexPowerShell.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexProgress.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexProgress.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexPS.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexPS.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexPython.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexPython.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexR.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexR.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexRebol.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexRebol.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexRuby.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexRuby.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexScriptol.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexScriptol.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexSmalltalk.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexSmalltalk.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexSML.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexSML.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexSorcus.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexSorcus.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexSpecman.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexSpecman.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexSpice.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexSpice.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexSQL.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexSQL.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexTACL.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexTACL.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexTADS3.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexTADS3.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexTAL.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexTAL.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexTCL.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexTCL.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexTCMD.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexTCMD.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexTeX.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexTeX.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexTxt2tags.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexTxt2tags.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexVB.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexVB.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexVerilog.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexVerilog.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexVHDL.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexVHDL.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexVisualProlog.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexVisualProlog.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexYAML.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexers\LexYAML.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_Accessor.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexlib\Accessor.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_CharacterSet.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexlib\CharacterSet.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexerBase.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexlib\LexerBase.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexerModule.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexlib\LexerModule.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexerNoExceptions.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexlib\LexerNoExceptions.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LexerSimple.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexlib\LexerSimple.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_PropSetSimple.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexlib\PropSetSimple.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_StyleContext.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexlib\StyleContext.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_WordList.obj : .AUTODEPEND ..\..\src\stc\scintilla\lexlib\WordList.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_AutoComplete.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\AutoComplete.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_CallTip.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\CallTip.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_Catalogue.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\Catalogue.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_CellBuffer.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\CellBuffer.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_CharClassify.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\CharClassify.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_ContractionState.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\ContractionState.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_Decoration.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\Decoration.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_Document.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\Document.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_Editor.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\Editor.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_ExternalLexer.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\ExternalLexer.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_Indicator.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\Indicator.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_KeyMap.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\KeyMap.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_LineMarker.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\LineMarker.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_PerLine.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\PerLine.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_PositionCache.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\PositionCache.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_RESearch.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\RESearch.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_RunStyles.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\RunStyles.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_ScintillaBase.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\ScintillaBase.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_Selection.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\Selection.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_Style.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\Style.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_UniConversion.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\UniConversion.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_ViewStyle.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\ViewStyle.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\wxscintilla_XPM.obj : .AUTODEPEND ..\..\src\stc\scintilla\src\XPM.cxx + $(CXX) -bt=nt -zq -fo=$^@ $(WXSCINTILLA_CXXFLAGS) $< + +$(OBJS)\monodll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_any.obj : .AUTODEPEND ..\..\src\common\any.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_appbase.obj : .AUTODEPEND ..\..\src\common\appbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_arcall.obj : .AUTODEPEND ..\..\src\common\arcall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_arcfind.obj : .AUTODEPEND ..\..\src\common\arcfind.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_archive.obj : .AUTODEPEND ..\..\src\common\archive.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_arrstr.obj : .AUTODEPEND ..\..\src\common\arrstr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_base64.obj : .AUTODEPEND ..\..\src\common\base64.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_clntdata.obj : .AUTODEPEND ..\..\src\common\clntdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_cmdline.obj : .AUTODEPEND ..\..\src\common\cmdline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_config.obj : .AUTODEPEND ..\..\src\common\config.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_convauto.obj : .AUTODEPEND ..\..\src\common\convauto.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_datetime.obj : .AUTODEPEND ..\..\src\common\datetime.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_datetimefmt.obj : .AUTODEPEND ..\..\src\common\datetimefmt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_datstrm.obj : .AUTODEPEND ..\..\src\common\datstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dircmn.obj : .AUTODEPEND ..\..\src\common\dircmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dynarray.obj : .AUTODEPEND ..\..\src\common\dynarray.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dynlib.obj : .AUTODEPEND ..\..\src\common\dynlib.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dynload.obj : .AUTODEPEND ..\..\src\common\dynload.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_encconv.obj : .AUTODEPEND ..\..\src\common\encconv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_evtloopcmn.obj : .AUTODEPEND ..\..\src\common\evtloopcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_extended.obj : .AUTODEPEND ..\..\src\common\extended.c + $(CC) -bt=nt -zq -fo=$^@ $(MONODLL_CFLAGS) $< + +$(OBJS)\monodll_ffile.obj : .AUTODEPEND ..\..\src\common\ffile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_file.obj : .AUTODEPEND ..\..\src\common\file.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fileback.obj : .AUTODEPEND ..\..\src\common\fileback.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fileconf.obj : .AUTODEPEND ..\..\src\common\fileconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_filefn.obj : .AUTODEPEND ..\..\src\common\filefn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_filename.obj : .AUTODEPEND ..\..\src\common\filename.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_filesys.obj : .AUTODEPEND ..\..\src\common\filesys.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_filtall.obj : .AUTODEPEND ..\..\src\common\filtall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_filtfind.obj : .AUTODEPEND ..\..\src\common\filtfind.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fmapbase.obj : .AUTODEPEND ..\..\src\common\fmapbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fs_arc.obj : .AUTODEPEND ..\..\src\common\fs_arc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fs_filter.obj : .AUTODEPEND ..\..\src\common\fs_filter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_hash.obj : .AUTODEPEND ..\..\src\common\hash.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_hashmap.obj : .AUTODEPEND ..\..\src\common\hashmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_init.obj : .AUTODEPEND ..\..\src\common\init.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_intl.obj : .AUTODEPEND ..\..\src\common\intl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_ipcbase.obj : .AUTODEPEND ..\..\src\common\ipcbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_languageinfo.obj : .AUTODEPEND ..\..\src\common\languageinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_list.obj : .AUTODEPEND ..\..\src\common\list.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_log.obj : .AUTODEPEND ..\..\src\common\log.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_longlong.obj : .AUTODEPEND ..\..\src\common\longlong.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_memory.obj : .AUTODEPEND ..\..\src\common\memory.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_mimecmn.obj : .AUTODEPEND ..\..\src\common\mimecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_module.obj : .AUTODEPEND ..\..\src\common\module.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_mstream.obj : .AUTODEPEND ..\..\src\common\mstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_numformatter.obj : .AUTODEPEND ..\..\src\common\numformatter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_object.obj : .AUTODEPEND ..\..\src\common\object.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_platinfo.obj : .AUTODEPEND ..\..\src\common\platinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_powercmn.obj : .AUTODEPEND ..\..\src\common\powercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_process.obj : .AUTODEPEND ..\..\src\common\process.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_regex.obj : .AUTODEPEND ..\..\src\common\regex.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_stdpbase.obj : .AUTODEPEND ..\..\src\common\stdpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_sstream.obj : .AUTODEPEND ..\..\src\common\sstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_stdstream.obj : .AUTODEPEND ..\..\src\common\stdstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_stopwatch.obj : .AUTODEPEND ..\..\src\common\stopwatch.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_strconv.obj : .AUTODEPEND ..\..\src\common\strconv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_stream.obj : .AUTODEPEND ..\..\src\common\stream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_string.obj : .AUTODEPEND ..\..\src\common\string.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_stringimpl.obj : .AUTODEPEND ..\..\src\common\stringimpl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_stringops.obj : .AUTODEPEND ..\..\src\common\stringops.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_strvararg.obj : .AUTODEPEND ..\..\src\common\strvararg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_sysopt.obj : .AUTODEPEND ..\..\src\common\sysopt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_tarstrm.obj : .AUTODEPEND ..\..\src\common\tarstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_textbuf.obj : .AUTODEPEND ..\..\src\common\textbuf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_textfile.obj : .AUTODEPEND ..\..\src\common\textfile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_threadinfo.obj : .AUTODEPEND ..\..\src\common\threadinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_time.obj : .AUTODEPEND ..\..\src\common\time.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_timercmn.obj : .AUTODEPEND ..\..\src\common\timercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_timerimpl.obj : .AUTODEPEND ..\..\src\common\timerimpl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_tokenzr.obj : .AUTODEPEND ..\..\src\common\tokenzr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_translation.obj : .AUTODEPEND ..\..\src\common\translation.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_txtstrm.obj : .AUTODEPEND ..\..\src\common\txtstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_unichar.obj : .AUTODEPEND ..\..\src\common\unichar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_uri.obj : .AUTODEPEND ..\..\src\common\uri.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_ustring.obj : .AUTODEPEND ..\..\src\common\ustring.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_variant.obj : .AUTODEPEND ..\..\src\common\variant.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_wfstream.obj : .AUTODEPEND ..\..\src\common\wfstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_wxcrt.obj : .AUTODEPEND ..\..\src\common\wxcrt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_wxprintf.obj : .AUTODEPEND ..\..\src\common\wxprintf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xlocale.obj : .AUTODEPEND ..\..\src\common\xlocale.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xti.obj : .AUTODEPEND ..\..\src\common\xti.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xtistrm.obj : .AUTODEPEND ..\..\src\common\xtistrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_zipstrm.obj : .AUTODEPEND ..\..\src\common\zipstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_zstream.obj : .AUTODEPEND ..\..\src\common\zstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fswatchercmn.obj : .AUTODEPEND ..\..\src\common\fswatchercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fswatcherg.obj : .AUTODEPEND ..\..\src\generic\fswatcherg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_basemsw.obj : .AUTODEPEND ..\..\src\msw\basemsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_crashrpt.obj : .AUTODEPEND ..\..\src\msw\crashrpt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_debughlp.obj : .AUTODEPEND ..\..\src\msw\debughlp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dde.obj : .AUTODEPEND ..\..\src\msw\dde.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dir.obj : .AUTODEPEND ..\..\src\msw\dir.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dlmsw.obj : .AUTODEPEND ..\..\src\msw\dlmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_evtloopconsole.obj : .AUTODEPEND ..\..\src\msw\evtloopconsole.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_mimetype.obj : .AUTODEPEND ..\..\src\msw\mimetype.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_power.obj : .AUTODEPEND ..\..\src\msw\power.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_regconf.obj : .AUTODEPEND ..\..\src\msw\regconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_registry.obj : .AUTODEPEND ..\..\src\msw\registry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_snglinst.obj : .AUTODEPEND ..\..\src\msw\snglinst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_stackwalk.obj : .AUTODEPEND ..\..\src\msw\stackwalk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_thread.obj : .AUTODEPEND ..\..\src\msw\thread.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_timer.obj : .AUTODEPEND ..\..\src\msw\timer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_utils.obj : .AUTODEPEND ..\..\src\msw\utils.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_utilsexc.obj : .AUTODEPEND ..\..\src\msw\utilsexc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fswatcher.obj : .AUTODEPEND ..\..\src\msw\fswatcher.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_event.obj : .AUTODEPEND ..\..\src\common\event.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fs_mem.obj : .AUTODEPEND ..\..\src\common\fs_mem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msgout.obj : .AUTODEPEND ..\..\src\common\msgout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_utilscmn.obj : .AUTODEPEND ..\..\src\common\utilscmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_main.obj : .AUTODEPEND ..\..\src\msw\main.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_mslu.obj : .AUTODEPEND ..\..\src\msw\mslu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_volume.obj : .AUTODEPEND ..\..\src\msw\volume.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fs_inet.obj : .AUTODEPEND ..\..\src\common\fs_inet.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_ftp.obj : .AUTODEPEND ..\..\src\common\ftp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_http.obj : .AUTODEPEND ..\..\src\common\http.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_protocol.obj : .AUTODEPEND ..\..\src\common\protocol.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_sckaddr.obj : .AUTODEPEND ..\..\src\common\sckaddr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_sckfile.obj : .AUTODEPEND ..\..\src\common\sckfile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_sckipc.obj : .AUTODEPEND ..\..\src\common\sckipc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_sckstrm.obj : .AUTODEPEND ..\..\src\common\sckstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_socket.obj : .AUTODEPEND ..\..\src\common\socket.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_url.obj : .AUTODEPEND ..\..\src\common\url.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_sockmsw.obj : .AUTODEPEND ..\..\src\msw\sockmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_urlmsw.obj : .AUTODEPEND ..\..\src\msw\urlmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_generic_statusbr.obj : .AUTODEPEND ..\..\src\generic\statusbr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_accel.obj : .AUTODEPEND ..\..\src\msw\accel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_anybutton.obj : .AUTODEPEND ..\..\src\msw\anybutton.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_artmsw.obj : .AUTODEPEND ..\..\src\msw\artmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_bmpbuttn.obj : .AUTODEPEND ..\..\src\msw\bmpbuttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_button.obj : .AUTODEPEND ..\..\src\msw\button.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_checkbox.obj : .AUTODEPEND ..\..\src\msw\checkbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_choice.obj : .AUTODEPEND ..\..\src\msw\choice.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_colordlg.obj : .AUTODEPEND ..\..\src\msw\colordlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_combo.obj : .AUTODEPEND ..\..\src\msw\combo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_combobox.obj : .AUTODEPEND ..\..\src\msw\combobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_control.obj : .AUTODEPEND ..\..\src\msw\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_dialog.obj : .AUTODEPEND ..\..\src\msw\dialog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dirdlg.obj : .AUTODEPEND ..\..\src\msw\dirdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dragimag.obj : .AUTODEPEND ..\..\src\msw\dragimag.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_filedlg.obj : .AUTODEPEND ..\..\src\msw\filedlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_frame.obj : .AUTODEPEND ..\..\src\msw\frame.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_gauge.obj : .AUTODEPEND ..\..\src\msw\gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_headerctrl.obj : .AUTODEPEND ..\..\src\msw\headerctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_iniconf.obj : .AUTODEPEND ..\..\src\msw\iniconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_listbox.obj : .AUTODEPEND ..\..\src\msw\listbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_listctrl.obj : .AUTODEPEND ..\..\src\msw\listctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_mdi.obj : .AUTODEPEND ..\..\src\msw\mdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_menu.obj : .AUTODEPEND ..\..\src\msw\menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_menuitem.obj : .AUTODEPEND ..\..\src\msw\menuitem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_metafile.obj : .AUTODEPEND ..\..\src\msw\metafile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msgdlg.obj : .AUTODEPEND ..\..\src\msw\msgdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_nativdlg.obj : .AUTODEPEND ..\..\src\msw\nativdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_nativewin.obj : .AUTODEPEND ..\..\src\msw\nativewin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_notebook.obj : .AUTODEPEND ..\..\src\msw\notebook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_access.obj : .AUTODEPEND ..\..\src\msw\ole\access.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_ownerdrw.obj : .AUTODEPEND ..\..\src\msw\ownerdrw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_panel.obj : .AUTODEPEND ..\..\src\msw\panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_progdlg.obj : .AUTODEPEND ..\..\src\msw\progdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_radiobox.obj : .AUTODEPEND ..\..\src\msw\radiobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_radiobut.obj : .AUTODEPEND ..\..\src\msw\radiobut.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_richmsgdlg.obj : .AUTODEPEND ..\..\src\msw\richmsgdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_scrolbar.obj : .AUTODEPEND ..\..\src\msw\scrolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_slider.obj : .AUTODEPEND ..\..\src\msw\slider.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_spinbutt.obj : .AUTODEPEND ..\..\src\msw\spinbutt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_spinctrl.obj : .AUTODEPEND ..\..\src\msw\spinctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_statbmp.obj : .AUTODEPEND ..\..\src\msw\statbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_statbox.obj : .AUTODEPEND ..\..\src\msw\statbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_statusbar.obj : .AUTODEPEND ..\..\src\msw\statusbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_statline.obj : .AUTODEPEND ..\..\src\msw\statline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_stattext.obj : .AUTODEPEND ..\..\src\msw\stattext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_toolbar.obj : .AUTODEPEND ..\..\src\msw\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_textctrl.obj : .AUTODEPEND ..\..\src\msw\textctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_textentry.obj : .AUTODEPEND ..\..\src\msw\textentry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_tglbtn.obj : .AUTODEPEND ..\..\src\msw\tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_treectrl.obj : .AUTODEPEND ..\..\src\msw\treectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_checklst.obj : .AUTODEPEND ..\..\src\msw\checklst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_msw_fdrepdlg.obj : .AUTODEPEND ..\..\src\msw\fdrepdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fontdlg.obj : .AUTODEPEND ..\..\src\msw\fontdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_generic_accel.obj : .AUTODEPEND ..\..\src\generic\accel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_colrdlgg.obj : .AUTODEPEND ..\..\src\generic\colrdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dirdlgg.obj : .AUTODEPEND ..\..\src\generic\dirdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_generic_fdrepdlg.obj : .AUTODEPEND ..\..\src\generic\fdrepdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_filedlgg.obj : .AUTODEPEND ..\..\src\generic\filedlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_fontdlgg.obj : .AUTODEPEND ..\..\src\generic\fontdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_generic_listctrl.obj : .AUTODEPEND ..\..\src\generic\listctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_mdig.obj : .AUTODEPEND ..\..\src\generic\mdig.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_bmpbuttn.obj : .AUTODEPEND ..\..\src\univ\bmpbuttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_button.obj : .AUTODEPEND ..\..\src\univ\button.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_checkbox.obj : .AUTODEPEND ..\..\src\univ\checkbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_checklst.obj : .AUTODEPEND ..\..\src\univ\checklst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_choice.obj : .AUTODEPEND ..\..\src\univ\choice.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_combobox.obj : .AUTODEPEND ..\..\src\univ\combobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_control.obj : .AUTODEPEND ..\..\src\univ\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_ctrlrend.obj : .AUTODEPEND ..\..\src\univ\ctrlrend.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_dialog.obj : .AUTODEPEND ..\..\src\univ\dialog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_framuniv.obj : .AUTODEPEND ..\..\src\univ\framuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_gauge.obj : .AUTODEPEND ..\..\src\univ\gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_inpcons.obj : .AUTODEPEND ..\..\src\univ\inpcons.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_inphand.obj : .AUTODEPEND ..\..\src\univ\inphand.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_listbox.obj : .AUTODEPEND ..\..\src\univ\listbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_menu.obj : .AUTODEPEND ..\..\src\univ\menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_notebook.obj : .AUTODEPEND ..\..\src\univ\notebook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_radiobox.obj : .AUTODEPEND ..\..\src\univ\radiobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_radiobut.obj : .AUTODEPEND ..\..\src\univ\radiobut.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_scrarrow.obj : .AUTODEPEND ..\..\src\univ\scrarrow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_scrolbar.obj : .AUTODEPEND ..\..\src\univ\scrolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_scrthumb.obj : .AUTODEPEND ..\..\src\univ\scrthumb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_settingsuniv.obj : .AUTODEPEND ..\..\src\univ\settingsuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_slider.obj : .AUTODEPEND ..\..\src\univ\slider.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_spinbutt.obj : .AUTODEPEND ..\..\src\univ\spinbutt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_statbmp.obj : .AUTODEPEND ..\..\src\univ\statbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_statbox.obj : .AUTODEPEND ..\..\src\univ\statbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_statline.obj : .AUTODEPEND ..\..\src\univ\statline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_stattext.obj : .AUTODEPEND ..\..\src\univ\stattext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_statusbr.obj : .AUTODEPEND ..\..\src\univ\statusbr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_stdrend.obj : .AUTODEPEND ..\..\src\univ\stdrend.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_textctrl.obj : .AUTODEPEND ..\..\src\univ\textctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_tglbtn.obj : .AUTODEPEND ..\..\src\univ\tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_theme.obj : .AUTODEPEND ..\..\src\univ\theme.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_univ_toolbar.obj : .AUTODEPEND ..\..\src\univ\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_topluniv.obj : .AUTODEPEND ..\..\src\univ\topluniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_winuniv.obj : .AUTODEPEND ..\..\src\univ\winuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_gtk.obj : .AUTODEPEND ..\..\src\univ\themes\gtk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_metal.obj : .AUTODEPEND ..\..\src\univ\themes\metal.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_mono.obj : .AUTODEPEND ..\..\src\univ\themes\mono.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_win32.obj : .AUTODEPEND ..\..\src\univ\themes\win32.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_bmpcbox.obj : .AUTODEPEND ..\..\src\msw\bmpcbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_calctrl.obj : .AUTODEPEND ..\..\src\msw\calctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_commandlinkbutton.obj : .AUTODEPEND ..\..\src\msw\commandlinkbutton.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_datecontrols.obj : .AUTODEPEND ..\..\src\msw\datecontrols.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_datectrl.obj : .AUTODEPEND ..\..\src\msw\datectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_datetimectrl.obj : .AUTODEPEND ..\..\src\msw\datetimectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_hyperlink.obj : .AUTODEPEND ..\..\src\msw\hyperlink.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_timectrl.obj : .AUTODEPEND ..\..\src\msw\timectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_mediactrlcmn.obj : .AUTODEPEND ..\..\src\common\mediactrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_mediactrl_am.obj : .AUTODEPEND ..\..\src\msw\mediactrl_am.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_mediactrl_wmp10.obj : .AUTODEPEND ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_mediactrl_qt.obj : .AUTODEPEND ..\..\src\msw\mediactrl_qt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_helpbest.obj : .AUTODEPEND ..\..\src\msw\helpbest.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_helpctrl.obj : .AUTODEPEND ..\..\src\html\helpctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_helpdata.obj : .AUTODEPEND ..\..\src\html\helpdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_helpdlg.obj : .AUTODEPEND ..\..\src\html\helpdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_helpfrm.obj : .AUTODEPEND ..\..\src\html\helpfrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_helpwnd.obj : .AUTODEPEND ..\..\src\html\helpwnd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_htmlcell.obj : .AUTODEPEND ..\..\src\html\htmlcell.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_htmlfilt.obj : .AUTODEPEND ..\..\src\html\htmlfilt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_htmlpars.obj : .AUTODEPEND ..\..\src\html\htmlpars.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_htmltag.obj : .AUTODEPEND ..\..\src\html\htmltag.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_htmlwin.obj : .AUTODEPEND ..\..\src\html\htmlwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_htmprint.obj : .AUTODEPEND ..\..\src\html\htmprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_m_dflist.obj : .AUTODEPEND ..\..\src\html\m_dflist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_m_fonts.obj : .AUTODEPEND ..\..\src\html\m_fonts.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_m_hline.obj : .AUTODEPEND ..\..\src\html\m_hline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_m_image.obj : .AUTODEPEND ..\..\src\html\m_image.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_m_layout.obj : .AUTODEPEND ..\..\src\html\m_layout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_m_links.obj : .AUTODEPEND ..\..\src\html\m_links.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_m_list.obj : .AUTODEPEND ..\..\src\html\m_list.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_m_pre.obj : .AUTODEPEND ..\..\src\html\m_pre.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_m_span.obj : .AUTODEPEND ..\..\src\html\m_span.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_m_style.obj : .AUTODEPEND ..\..\src\html\m_style.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_m_tables.obj : .AUTODEPEND ..\..\src\html\m_tables.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_styleparams.obj : .AUTODEPEND ..\..\src\html\styleparams.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_winpars.obj : .AUTODEPEND ..\..\src\html\winpars.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_htmllbox.obj : .AUTODEPEND ..\..\src\generic\htmllbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_webview_ie.obj : .AUTODEPEND ..\..\src\msw\webview_ie.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_webview.obj : .AUTODEPEND ..\..\src\common\webview.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_webviewarchivehandler.obj : .AUTODEPEND ..\..\src\common\webviewarchivehandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_webviewfshandler.obj : .AUTODEPEND ..\..\src\common\webviewfshandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_debugrpt.obj : .AUTODEPEND ..\..\src\common\debugrpt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dbgrptg.obj : .AUTODEPEND ..\..\src\generic\dbgrptg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_animatctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_bannerwindow.obj : .AUTODEPEND ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_bmp.obj : .AUTODEPEND ..\..\src\xrc\xh_bmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_bmpcbox.obj : .AUTODEPEND ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_bmpbt.obj : .AUTODEPEND ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_bttn.obj : .AUTODEPEND ..\..\src\xrc\xh_bttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_cald.obj : .AUTODEPEND ..\..\src\xrc\xh_cald.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_chckb.obj : .AUTODEPEND ..\..\src\xrc\xh_chckb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_chckl.obj : .AUTODEPEND ..\..\src\xrc\xh_chckl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_choic.obj : .AUTODEPEND ..\..\src\xrc\xh_choic.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_choicbk.obj : .AUTODEPEND ..\..\src\xrc\xh_choicbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_clrpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_cmdlinkbn.obj : .AUTODEPEND ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_collpane.obj : .AUTODEPEND ..\..\src\xrc\xh_collpane.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_combo.obj : .AUTODEPEND ..\..\src\xrc\xh_combo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_comboctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_datectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_datectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_dirpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_dlg.obj : .AUTODEPEND ..\..\src\xrc\xh_dlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_editlbox.obj : .AUTODEPEND ..\..\src\xrc\xh_editlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_filectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_filepicker.obj : .AUTODEPEND ..\..\src\xrc\xh_filepicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_fontpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_frame.obj : .AUTODEPEND ..\..\src\xrc\xh_frame.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_gauge.obj : .AUTODEPEND ..\..\src\xrc\xh_gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_gdctl.obj : .AUTODEPEND ..\..\src\xrc\xh_gdctl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_grid.obj : .AUTODEPEND ..\..\src\xrc\xh_grid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_html.obj : .AUTODEPEND ..\..\src\xrc\xh_html.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_hyperlink.obj : .AUTODEPEND ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_listb.obj : .AUTODEPEND ..\..\src\xrc\xh_listb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_listbk.obj : .AUTODEPEND ..\..\src\xrc\xh_listbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_listc.obj : .AUTODEPEND ..\..\src\xrc\xh_listc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_mdi.obj : .AUTODEPEND ..\..\src\xrc\xh_mdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_menu.obj : .AUTODEPEND ..\..\src\xrc\xh_menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_notbk.obj : .AUTODEPEND ..\..\src\xrc\xh_notbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_odcombo.obj : .AUTODEPEND ..\..\src\xrc\xh_odcombo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_panel.obj : .AUTODEPEND ..\..\src\xrc\xh_panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_propdlg.obj : .AUTODEPEND ..\..\src\xrc\xh_propdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_radbt.obj : .AUTODEPEND ..\..\src\xrc\xh_radbt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_radbx.obj : .AUTODEPEND ..\..\src\xrc\xh_radbx.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_scrol.obj : .AUTODEPEND ..\..\src\xrc\xh_scrol.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_scwin.obj : .AUTODEPEND ..\..\src\xrc\xh_scwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_htmllbox.obj : .AUTODEPEND ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_sizer.obj : .AUTODEPEND ..\..\src\xrc\xh_sizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_slidr.obj : .AUTODEPEND ..\..\src\xrc\xh_slidr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_spin.obj : .AUTODEPEND ..\..\src\xrc\xh_spin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_split.obj : .AUTODEPEND ..\..\src\xrc\xh_split.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_srchctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_statbar.obj : .AUTODEPEND ..\..\src\xrc\xh_statbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_stbmp.obj : .AUTODEPEND ..\..\src\xrc\xh_stbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_stbox.obj : .AUTODEPEND ..\..\src\xrc\xh_stbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_stlin.obj : .AUTODEPEND ..\..\src\xrc\xh_stlin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_sttxt.obj : .AUTODEPEND ..\..\src\xrc\xh_sttxt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_text.obj : .AUTODEPEND ..\..\src\xrc\xh_text.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_tglbtn.obj : .AUTODEPEND ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_timectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_timectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_toolb.obj : .AUTODEPEND ..\..\src\xrc\xh_toolb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_toolbk.obj : .AUTODEPEND ..\..\src\xrc\xh_toolbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_tree.obj : .AUTODEPEND ..\..\src\xrc\xh_tree.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_treebk.obj : .AUTODEPEND ..\..\src\xrc\xh_treebk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_unkwn.obj : .AUTODEPEND ..\..\src\xrc\xh_unkwn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_wizrd.obj : .AUTODEPEND ..\..\src\xrc\xh_wizrd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xmlres.obj : .AUTODEPEND ..\..\src\xrc\xmlres.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xmladv.obj : .AUTODEPEND ..\..\src\xrc\xmladv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xmlrsall.obj : .AUTODEPEND ..\..\src\xrc\xmlrsall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_framemanager.obj : .AUTODEPEND ..\..\src\aui\framemanager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_dockart.obj : .AUTODEPEND ..\..\src\aui\dockart.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_floatpane.obj : .AUTODEPEND ..\..\src\aui\floatpane.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_auibook.obj : .AUTODEPEND ..\..\src\aui\auibook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_auibar.obj : .AUTODEPEND ..\..\src\aui\auibar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_tabmdi.obj : .AUTODEPEND ..\..\src\aui\tabmdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_tabart.obj : .AUTODEPEND ..\..\src\aui\tabart.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_auinotbk.obj : .AUTODEPEND ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_advprops.obj : .AUTODEPEND ..\..\src\propgrid\advprops.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_editors.obj : .AUTODEPEND ..\..\src\propgrid\editors.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_manager.obj : .AUTODEPEND ..\..\src\propgrid\manager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_property.obj : .AUTODEPEND ..\..\src\propgrid\property.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_propgrid.obj : .AUTODEPEND ..\..\src\propgrid\propgrid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_propgridiface.obj : .AUTODEPEND ..\..\src\propgrid\propgridiface.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_propgridpagestate.obj : .AUTODEPEND ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_props.obj : .AUTODEPEND ..\..\src\propgrid\props.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_art_internal.obj : .AUTODEPEND ..\..\src\ribbon\art_internal.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_art_msw.obj : .AUTODEPEND ..\..\src\ribbon\art_msw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_art_aui.obj : .AUTODEPEND ..\..\src\ribbon\art_aui.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_bar.obj : .AUTODEPEND ..\..\src\ribbon\bar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_ribbon_buttonbar.obj : .AUTODEPEND ..\..\src\ribbon\buttonbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_ribbon_control.obj : .AUTODEPEND ..\..\src\ribbon\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_gallery.obj : .AUTODEPEND ..\..\src\ribbon\gallery.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_page.obj : .AUTODEPEND ..\..\src\ribbon\page.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_ribbon_panel.obj : .AUTODEPEND ..\..\src\ribbon\panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_ribbon_toolbar.obj : .AUTODEPEND ..\..\src\ribbon\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_ribbon.obj : .AUTODEPEND ..\..\src\xrc\xh_ribbon.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_richtextbuffer.obj : .AUTODEPEND ..\..\src\richtext\richtextbuffer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_richtextctrl.obj : .AUTODEPEND ..\..\src\richtext\richtextctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_richtextformatdlg.obj : .AUTODEPEND ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_richtexthtml.obj : .AUTODEPEND ..\..\src\richtext\richtexthtml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_richtextimagedlg.obj : .AUTODEPEND ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_richtextprint.obj : .AUTODEPEND ..\..\src\richtext\richtextprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_richtextstyledlg.obj : .AUTODEPEND ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_richtextstyles.obj : .AUTODEPEND ..\..\src\richtext\richtextstyles.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_richtextsymboldlg.obj : .AUTODEPEND ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_richtextxml.obj : .AUTODEPEND ..\..\src\richtext\richtextxml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xh_richtext.obj : .AUTODEPEND ..\..\src\xrc\xh_richtext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_stc.obj : .AUTODEPEND ..\..\src\stc\stc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_PlatWX.obj : .AUTODEPEND ..\..\src\stc\PlatWX.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_ScintillaWX.obj : .AUTODEPEND ..\..\src\stc\ScintillaWX.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xml.obj : .AUTODEPEND ..\..\src\xml\xml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +$(OBJS)\monodll_xtixml.obj : .AUTODEPEND ..\..\src\common\xtixml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + +!ifeq USE_GUI 1 +$(OBJS)\monodll_activex.obj : .AUTODEPEND ..\..\src\msw\ole\activex.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_app.obj : .AUTODEPEND ..\..\src\msw\app.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_bitmap.obj : .AUTODEPEND ..\..\src\msw\bitmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_brush.obj : .AUTODEPEND ..\..\src\msw\brush.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_caret.obj : .AUTODEPEND ..\..\src\msw\caret.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_clipbrd.obj : .AUTODEPEND ..\..\src\msw\clipbrd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_colour.obj : .AUTODEPEND ..\..\src\msw\colour.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_cursor.obj : .AUTODEPEND ..\..\src\msw\cursor.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_data.obj : .AUTODEPEND ..\..\src\msw\data.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dc.obj : .AUTODEPEND ..\..\src\msw\dc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dcclient.obj : .AUTODEPEND ..\..\src\msw\dcclient.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dcmemory.obj : .AUTODEPEND ..\..\src\msw\dcmemory.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dcprint.obj : .AUTODEPEND ..\..\src\msw\dcprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dcscreen.obj : .AUTODEPEND ..\..\src\msw\dcscreen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dialup.obj : .AUTODEPEND ..\..\src\msw\dialup.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dib.obj : .AUTODEPEND ..\..\src\msw\dib.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_display.obj : .AUTODEPEND ..\..\src\msw\display.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_enhmeta.obj : .AUTODEPEND ..\..\src\msw\enhmeta.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_font.obj : .AUTODEPEND ..\..\src\msw\font.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_fontenum.obj : .AUTODEPEND ..\..\src\msw\fontenum.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_fontutil.obj : .AUTODEPEND ..\..\src\msw\fontutil.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_gdiimage.obj : .AUTODEPEND ..\..\src\msw\gdiimage.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_gdiobj.obj : .AUTODEPEND ..\..\src\msw\gdiobj.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_gdiplus.obj : .AUTODEPEND ..\..\src\msw\gdiplus.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_graphics.obj : .AUTODEPEND ..\..\src\msw\graphics.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_icon.obj : .AUTODEPEND ..\..\src\msw\icon.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imaglist.obj : .AUTODEPEND ..\..\src\msw\imaglist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_minifram.obj : .AUTODEPEND ..\..\src\msw\minifram.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_nonownedwnd.obj : .AUTODEPEND ..\..\src\msw\nonownedwnd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dataobj.obj : .AUTODEPEND ..\..\src\msw\ole\dataobj.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dropsrc.obj : .AUTODEPEND ..\..\src\msw\ole\dropsrc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_droptgt.obj : .AUTODEPEND ..\..\src\msw\ole\droptgt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_oleutils.obj : .AUTODEPEND ..\..\src\msw\ole\oleutils.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_safearray.obj : .AUTODEPEND ..\..\src\msw\ole\safearray.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_palette.obj : .AUTODEPEND ..\..\src\msw\palette.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_pen.obj : .AUTODEPEND ..\..\src\msw\pen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_popupwin.obj : .AUTODEPEND ..\..\src\msw\popupwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_printdlg.obj : .AUTODEPEND ..\..\src\msw\printdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_printwin.obj : .AUTODEPEND ..\..\src\msw\printwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_region.obj : .AUTODEPEND ..\..\src\msw\region.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_renderer.obj : .AUTODEPEND ..\..\src\msw\renderer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_settings.obj : .AUTODEPEND ..\..\src\msw\settings.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_textmeasure.obj : .AUTODEPEND ..\..\src\msw\textmeasure.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_tooltip.obj : .AUTODEPEND ..\..\src\msw\tooltip.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_toplevel.obj : .AUTODEPEND ..\..\src\msw\toplevel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_uiaction.obj : .AUTODEPEND ..\..\src\msw\uiaction.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_utilsgui.obj : .AUTODEPEND ..\..\src\msw\utilsgui.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_utilswin.obj : .AUTODEPEND ..\..\src\msw\utilswin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_uxtheme.obj : .AUTODEPEND ..\..\src\msw\uxtheme.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_window.obj : .AUTODEPEND ..\..\src\msw\window.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_helpchm.obj : .AUTODEPEND ..\..\src\msw\helpchm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_helpwin.obj : .AUTODEPEND ..\..\src\msw\helpwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_automtn.obj : .AUTODEPEND ..\..\src\msw\ole\automtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_uuid.obj : .AUTODEPEND ..\..\src\msw\ole\uuid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_clrpickerg.obj : .AUTODEPEND ..\..\src\generic\clrpickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_collpaneg.obj : .AUTODEPEND ..\..\src\generic\collpaneg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_filepickerg.obj : .AUTODEPEND ..\..\src\generic\filepickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_fontpickerg.obj : .AUTODEPEND ..\..\src\generic\fontpickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_prntdlgg.obj : .AUTODEPEND ..\..\src\generic\prntdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_evtloop.obj : .AUTODEPEND ..\..\src\msw\evtloop.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_accelcmn.obj : .AUTODEPEND ..\..\src\common\accelcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_accesscmn.obj : .AUTODEPEND ..\..\src\common\accesscmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_anidecod.obj : .AUTODEPEND ..\..\src\common\anidecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_affinematrix2d.obj : .AUTODEPEND ..\..\src\common\affinematrix2d.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_appcmn.obj : .AUTODEPEND ..\..\src\common\appcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_artprov.obj : .AUTODEPEND ..\..\src\common\artprov.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_artstd.obj : .AUTODEPEND ..\..\src\common\artstd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_bmpbase.obj : .AUTODEPEND ..\..\src\common\bmpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_bmpbtncmn.obj : .AUTODEPEND ..\..\src\common\bmpbtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_bookctrl.obj : .AUTODEPEND ..\..\src\common\bookctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_btncmn.obj : .AUTODEPEND ..\..\src\common\btncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_cairo.obj : .AUTODEPEND ..\..\src\common\cairo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_checkboxcmn.obj : .AUTODEPEND ..\..\src\common\checkboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_checklstcmn.obj : .AUTODEPEND ..\..\src\common\checklstcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_choiccmn.obj : .AUTODEPEND ..\..\src\common\choiccmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_clipcmn.obj : .AUTODEPEND ..\..\src\common\clipcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_clrpickercmn.obj : .AUTODEPEND ..\..\src\common\clrpickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_colourcmn.obj : .AUTODEPEND ..\..\src\common\colourcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_colourdata.obj : .AUTODEPEND ..\..\src\common\colourdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_combocmn.obj : .AUTODEPEND ..\..\src\common\combocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_cmdproc.obj : .AUTODEPEND ..\..\src\common\cmdproc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_cmndata.obj : .AUTODEPEND ..\..\src\common\cmndata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_containr.obj : .AUTODEPEND ..\..\src\common\containr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_cshelp.obj : .AUTODEPEND ..\..\src\common\cshelp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_ctrlcmn.obj : .AUTODEPEND ..\..\src\common\ctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_ctrlsub.obj : .AUTODEPEND ..\..\src\common\ctrlsub.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dcbase.obj : .AUTODEPEND ..\..\src\common\dcbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dcbufcmn.obj : .AUTODEPEND ..\..\src\common\dcbufcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dcgraph.obj : .AUTODEPEND ..\..\src\common\dcgraph.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dcsvg.obj : .AUTODEPEND ..\..\src\common\dcsvg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dirctrlcmn.obj : .AUTODEPEND ..\..\src\common\dirctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dlgcmn.obj : .AUTODEPEND ..\..\src\common\dlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dndcmn.obj : .AUTODEPEND ..\..\src\common\dndcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dobjcmn.obj : .AUTODEPEND ..\..\src\common\dobjcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_docmdi.obj : .AUTODEPEND ..\..\src\common\docmdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_docview.obj : .AUTODEPEND ..\..\src\common\docview.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dpycmn.obj : .AUTODEPEND ..\..\src\common\dpycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dseldlg.obj : .AUTODEPEND ..\..\src\common\dseldlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_effects.obj : .AUTODEPEND ..\..\src\common\effects.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_fddlgcmn.obj : .AUTODEPEND ..\..\src\common\fddlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_filectrlcmn.obj : .AUTODEPEND ..\..\src\common\filectrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_filehistorycmn.obj : .AUTODEPEND ..\..\src\common\filehistorycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_filepickercmn.obj : .AUTODEPEND ..\..\src\common\filepickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_fontpickercmn.obj : .AUTODEPEND ..\..\src\common\fontpickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_fldlgcmn.obj : .AUTODEPEND ..\..\src\common\fldlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_fontcmn.obj : .AUTODEPEND ..\..\src\common\fontcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_fontdata.obj : .AUTODEPEND ..\..\src\common\fontdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_graphicc.obj : .AUTODEPEND ..\..\src\generic\graphicc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_fontenumcmn.obj : .AUTODEPEND ..\..\src\common\fontenumcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_fontmap.obj : .AUTODEPEND ..\..\src\common\fontmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_fontutilcmn.obj : .AUTODEPEND ..\..\src\common\fontutilcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_framecmn.obj : .AUTODEPEND ..\..\src\common\framecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_gaugecmn.obj : .AUTODEPEND ..\..\src\common\gaugecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_gbsizer.obj : .AUTODEPEND ..\..\src\common\gbsizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_gdicmn.obj : .AUTODEPEND ..\..\src\common\gdicmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_geometry.obj : .AUTODEPEND ..\..\src\common\geometry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_gifdecod.obj : .AUTODEPEND ..\..\src\common\gifdecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_graphcmn.obj : .AUTODEPEND ..\..\src\common\graphcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_headercolcmn.obj : .AUTODEPEND ..\..\src\common\headercolcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_headerctrlcmn.obj : .AUTODEPEND ..\..\src\common\headerctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_helpbase.obj : .AUTODEPEND ..\..\src\common\helpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_iconbndl.obj : .AUTODEPEND ..\..\src\common\iconbndl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imagall.obj : .AUTODEPEND ..\..\src\common\imagall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imagbmp.obj : .AUTODEPEND ..\..\src\common\imagbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_image.obj : .AUTODEPEND ..\..\src\common\image.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imagfill.obj : .AUTODEPEND ..\..\src\common\imagfill.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imaggif.obj : .AUTODEPEND ..\..\src\common\imaggif.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imagiff.obj : .AUTODEPEND ..\..\src\common\imagiff.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imagjpeg.obj : .AUTODEPEND ..\..\src\common\imagjpeg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imagpcx.obj : .AUTODEPEND ..\..\src\common\imagpcx.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imagpng.obj : .AUTODEPEND ..\..\src\common\imagpng.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imagpnm.obj : .AUTODEPEND ..\..\src\common\imagpnm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imagtga.obj : .AUTODEPEND ..\..\src\common\imagtga.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imagtiff.obj : .AUTODEPEND ..\..\src\common\imagtiff.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_imagxpm.obj : .AUTODEPEND ..\..\src\common\imagxpm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_layout.obj : .AUTODEPEND ..\..\src\common\layout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_lboxcmn.obj : .AUTODEPEND ..\..\src\common\lboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_listctrlcmn.obj : .AUTODEPEND ..\..\src\common\listctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_markupparser.obj : .AUTODEPEND ..\..\src\common\markupparser.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_matrix.obj : .AUTODEPEND ..\..\src\common\matrix.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_menucmn.obj : .AUTODEPEND ..\..\src\common\menucmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_modalhook.obj : .AUTODEPEND ..\..\src\common\modalhook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_mousemanager.obj : .AUTODEPEND ..\..\src\common\mousemanager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_nbkbase.obj : .AUTODEPEND ..\..\src\common\nbkbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_overlaycmn.obj : .AUTODEPEND ..\..\src\common\overlaycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_ownerdrwcmn.obj : .AUTODEPEND ..\..\src\common\ownerdrwcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_paper.obj : .AUTODEPEND ..\..\src\common\paper.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_panelcmn.obj : .AUTODEPEND ..\..\src\common\panelcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_persist.obj : .AUTODEPEND ..\..\src\common\persist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_pickerbase.obj : .AUTODEPEND ..\..\src\common\pickerbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_popupcmn.obj : .AUTODEPEND ..\..\src\common\popupcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_preferencescmn.obj : .AUTODEPEND ..\..\src\common\preferencescmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_prntbase.obj : .AUTODEPEND ..\..\src\common\prntbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_quantize.obj : .AUTODEPEND ..\..\src\common\quantize.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_radiobtncmn.obj : .AUTODEPEND ..\..\src\common\radiobtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_radiocmn.obj : .AUTODEPEND ..\..\src\common\radiocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_rearrangectrl.obj : .AUTODEPEND ..\..\src\common\rearrangectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_rendcmn.obj : .AUTODEPEND ..\..\src\common\rendcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_rgncmn.obj : .AUTODEPEND ..\..\src\common\rgncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_scrolbarcmn.obj : .AUTODEPEND ..\..\src\common\scrolbarcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_settcmn.obj : .AUTODEPEND ..\..\src\common\settcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_sizer.obj : .AUTODEPEND ..\..\src\common\sizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_slidercmn.obj : .AUTODEPEND ..\..\src\common\slidercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_spinbtncmn.obj : .AUTODEPEND ..\..\src\common\spinbtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_spinctrlcmn.obj : .AUTODEPEND ..\..\src\common\spinctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_srchcmn.obj : .AUTODEPEND ..\..\src\common\srchcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_statbar.obj : .AUTODEPEND ..\..\src\common\statbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_statbmpcmn.obj : .AUTODEPEND ..\..\src\common\statbmpcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_statboxcmn.obj : .AUTODEPEND ..\..\src\common\statboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_statlinecmn.obj : .AUTODEPEND ..\..\src\common\statlinecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_stattextcmn.obj : .AUTODEPEND ..\..\src\common\stattextcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_stockitem.obj : .AUTODEPEND ..\..\src\common\stockitem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_tbarbase.obj : .AUTODEPEND ..\..\src\common\tbarbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_textcmn.obj : .AUTODEPEND ..\..\src\common\textcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_textentrycmn.obj : .AUTODEPEND ..\..\src\common\textentrycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_textmeasurecmn.obj : .AUTODEPEND ..\..\src\common\textmeasurecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_toplvcmn.obj : .AUTODEPEND ..\..\src\common\toplvcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_treebase.obj : .AUTODEPEND ..\..\src\common\treebase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_uiactioncmn.obj : .AUTODEPEND ..\..\src\common\uiactioncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_valgen.obj : .AUTODEPEND ..\..\src\common\valgen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_validate.obj : .AUTODEPEND ..\..\src\common\validate.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_valtext.obj : .AUTODEPEND ..\..\src\common\valtext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_valnum.obj : .AUTODEPEND ..\..\src\common\valnum.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_wincmn.obj : .AUTODEPEND ..\..\src\common\wincmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_windowid.obj : .AUTODEPEND ..\..\src\common\windowid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_wrapsizer.obj : .AUTODEPEND ..\..\src\common\wrapsizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_xpmdecod.obj : .AUTODEPEND ..\..\src\common\xpmdecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_busyinfo.obj : .AUTODEPEND ..\..\src\generic\busyinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_generic_buttonbar.obj : .AUTODEPEND ..\..\src\generic\buttonbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_choicdgg.obj : .AUTODEPEND ..\..\src\generic\choicdgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_choicbkg.obj : .AUTODEPEND ..\..\src\generic\choicbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_combog.obj : .AUTODEPEND ..\..\src\generic\combog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dcpsg.obj : .AUTODEPEND ..\..\src\generic\dcpsg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dirctrlg.obj : .AUTODEPEND ..\..\src\generic\dirctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_dragimgg.obj : .AUTODEPEND ..\..\src\generic\dragimgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_filectrlg.obj : .AUTODEPEND ..\..\src\generic\filectrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_headerctrlg.obj : .AUTODEPEND ..\..\src\generic\headerctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_infobar.obj : .AUTODEPEND ..\..\src\generic\infobar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_listbkg.obj : .AUTODEPEND ..\..\src\generic\listbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_logg.obj : .AUTODEPEND ..\..\src\generic\logg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_markuptext.obj : .AUTODEPEND ..\..\src\generic\markuptext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_msgdlgg.obj : .AUTODEPEND ..\..\src\generic\msgdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_numdlgg.obj : .AUTODEPEND ..\..\src\generic\numdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_progdlgg.obj : .AUTODEPEND ..\..\src\generic\progdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_preferencesg.obj : .AUTODEPEND ..\..\src\generic\preferencesg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_printps.obj : .AUTODEPEND ..\..\src\generic\printps.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_renderg.obj : .AUTODEPEND ..\..\src\generic\renderg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_richmsgdlgg.obj : .AUTODEPEND ..\..\src\generic\richmsgdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_scrlwing.obj : .AUTODEPEND ..\..\src\generic\scrlwing.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_selstore.obj : .AUTODEPEND ..\..\src\generic\selstore.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_spinctlg.obj : .AUTODEPEND ..\..\src\generic\spinctlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_splitter.obj : .AUTODEPEND ..\..\src\generic\splitter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_srchctlg.obj : .AUTODEPEND ..\..\src\generic\srchctlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_statbmpg.obj : .AUTODEPEND ..\..\src\generic\statbmpg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_stattextg.obj : .AUTODEPEND ..\..\src\generic\stattextg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_textdlgg.obj : .AUTODEPEND ..\..\src\generic\textdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_tipwin.obj : .AUTODEPEND ..\..\src\generic\tipwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_toolbkg.obj : .AUTODEPEND ..\..\src\generic\toolbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_treectlg.obj : .AUTODEPEND ..\..\src\generic\treectlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_treebkg.obj : .AUTODEPEND ..\..\src\generic\treebkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_vlbox.obj : .AUTODEPEND ..\..\src\generic\vlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_vscroll.obj : .AUTODEPEND ..\..\src\generic\vscroll.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_xmlreshandler.obj : .AUTODEPEND ..\..\src\xrc\xmlreshandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_animatecmn.obj : .AUTODEPEND ..\..\src\common\animatecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_bmpcboxcmn.obj : .AUTODEPEND ..\..\src\common\bmpcboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_calctrlcmn.obj : .AUTODEPEND ..\..\src\common\calctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_datavcmn.obj : .AUTODEPEND ..\..\src\common\datavcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_gridcmn.obj : .AUTODEPEND ..\..\src\common\gridcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_hyperlnkcmn.obj : .AUTODEPEND ..\..\src\common\hyperlnkcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_odcombocmn.obj : .AUTODEPEND ..\..\src\common\odcombocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_richtooltipcmn.obj : .AUTODEPEND ..\..\src\common\richtooltipcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_aboutdlgg.obj : .AUTODEPEND ..\..\src\generic\aboutdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_bannerwindow.obj : .AUTODEPEND ..\..\src\generic\bannerwindow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_bmpcboxg.obj : .AUTODEPEND ..\..\src\generic\bmpcboxg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_calctrlg.obj : .AUTODEPEND ..\..\src\generic\calctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_commandlinkbuttong.obj : .AUTODEPEND ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_datavgen.obj : .AUTODEPEND ..\..\src\generic\datavgen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_datectlg.obj : .AUTODEPEND ..\..\src\generic\datectlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_editlbox.obj : .AUTODEPEND ..\..\src\generic\editlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_grid.obj : .AUTODEPEND ..\..\src\generic\grid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_gridctrl.obj : .AUTODEPEND ..\..\src\generic\gridctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_grideditors.obj : .AUTODEPEND ..\..\src\generic\grideditors.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_gridsel.obj : .AUTODEPEND ..\..\src\generic\gridsel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_helpext.obj : .AUTODEPEND ..\..\src\generic\helpext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_hyperlinkg.obj : .AUTODEPEND ..\..\src\generic\hyperlinkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_laywin.obj : .AUTODEPEND ..\..\src\generic\laywin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_notifmsgg.obj : .AUTODEPEND ..\..\src\generic\notifmsgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_odcombo.obj : .AUTODEPEND ..\..\src\generic\odcombo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_propdlg.obj : .AUTODEPEND ..\..\src\generic\propdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_richtooltipg.obj : .AUTODEPEND ..\..\src\generic\richtooltipg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_sashwin.obj : .AUTODEPEND ..\..\src\generic\sashwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_splash.obj : .AUTODEPEND ..\..\src\generic\splash.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_timectrlg.obj : .AUTODEPEND ..\..\src\generic\timectrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_tipdlg.obj : .AUTODEPEND ..\..\src\generic\tipdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_treelist.obj : .AUTODEPEND ..\..\src\generic\treelist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_wizard.obj : .AUTODEPEND ..\..\src\generic\wizard.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_taskbarcmn.obj : .AUTODEPEND ..\..\src\common\taskbarcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_aboutdlg.obj : .AUTODEPEND ..\..\src\msw\aboutdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_notifmsg.obj : .AUTODEPEND ..\..\src\msw\notifmsg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_richtooltip.obj : .AUTODEPEND ..\..\src\msw\richtooltip.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_sound.obj : .AUTODEPEND ..\..\src\msw\sound.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_taskbar.obj : .AUTODEPEND ..\..\src\msw\taskbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_joystick.obj : .AUTODEPEND ..\..\src\msw\joystick.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monodll_animateg.obj : .AUTODEPEND ..\..\src\generic\animateg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +$(OBJS)\monodll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -i=..\..\src\stc\scintilla\include -i=..\..\src\stc\scintilla\lexlib -i=..\..\src\stc\scintilla\src -d__WX__ -dSCI_LEXER -dLINK_LEXERS -dwxUSE_BASE=1 -dWXMAKINGDLL $< + +$(OBJS)\monolib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_any.obj : .AUTODEPEND ..\..\src\common\any.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_appbase.obj : .AUTODEPEND ..\..\src\common\appbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_arcall.obj : .AUTODEPEND ..\..\src\common\arcall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_arcfind.obj : .AUTODEPEND ..\..\src\common\arcfind.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_archive.obj : .AUTODEPEND ..\..\src\common\archive.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_arrstr.obj : .AUTODEPEND ..\..\src\common\arrstr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_base64.obj : .AUTODEPEND ..\..\src\common\base64.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_clntdata.obj : .AUTODEPEND ..\..\src\common\clntdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_cmdline.obj : .AUTODEPEND ..\..\src\common\cmdline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_config.obj : .AUTODEPEND ..\..\src\common\config.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_convauto.obj : .AUTODEPEND ..\..\src\common\convauto.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_datetime.obj : .AUTODEPEND ..\..\src\common\datetime.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_datetimefmt.obj : .AUTODEPEND ..\..\src\common\datetimefmt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_datstrm.obj : .AUTODEPEND ..\..\src\common\datstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dircmn.obj : .AUTODEPEND ..\..\src\common\dircmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dynarray.obj : .AUTODEPEND ..\..\src\common\dynarray.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dynlib.obj : .AUTODEPEND ..\..\src\common\dynlib.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dynload.obj : .AUTODEPEND ..\..\src\common\dynload.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_encconv.obj : .AUTODEPEND ..\..\src\common\encconv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_evtloopcmn.obj : .AUTODEPEND ..\..\src\common\evtloopcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_extended.obj : .AUTODEPEND ..\..\src\common\extended.c + $(CC) -bt=nt -zq -fo=$^@ $(MONOLIB_CFLAGS) $< + +$(OBJS)\monolib_ffile.obj : .AUTODEPEND ..\..\src\common\ffile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_file.obj : .AUTODEPEND ..\..\src\common\file.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fileback.obj : .AUTODEPEND ..\..\src\common\fileback.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fileconf.obj : .AUTODEPEND ..\..\src\common\fileconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_filefn.obj : .AUTODEPEND ..\..\src\common\filefn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_filename.obj : .AUTODEPEND ..\..\src\common\filename.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_filesys.obj : .AUTODEPEND ..\..\src\common\filesys.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_filtall.obj : .AUTODEPEND ..\..\src\common\filtall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_filtfind.obj : .AUTODEPEND ..\..\src\common\filtfind.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fmapbase.obj : .AUTODEPEND ..\..\src\common\fmapbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fs_arc.obj : .AUTODEPEND ..\..\src\common\fs_arc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fs_filter.obj : .AUTODEPEND ..\..\src\common\fs_filter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_hash.obj : .AUTODEPEND ..\..\src\common\hash.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_hashmap.obj : .AUTODEPEND ..\..\src\common\hashmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_init.obj : .AUTODEPEND ..\..\src\common\init.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_intl.obj : .AUTODEPEND ..\..\src\common\intl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_ipcbase.obj : .AUTODEPEND ..\..\src\common\ipcbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_languageinfo.obj : .AUTODEPEND ..\..\src\common\languageinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_list.obj : .AUTODEPEND ..\..\src\common\list.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_log.obj : .AUTODEPEND ..\..\src\common\log.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_longlong.obj : .AUTODEPEND ..\..\src\common\longlong.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_memory.obj : .AUTODEPEND ..\..\src\common\memory.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_mimecmn.obj : .AUTODEPEND ..\..\src\common\mimecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_module.obj : .AUTODEPEND ..\..\src\common\module.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_mstream.obj : .AUTODEPEND ..\..\src\common\mstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_numformatter.obj : .AUTODEPEND ..\..\src\common\numformatter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_object.obj : .AUTODEPEND ..\..\src\common\object.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_platinfo.obj : .AUTODEPEND ..\..\src\common\platinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_powercmn.obj : .AUTODEPEND ..\..\src\common\powercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_process.obj : .AUTODEPEND ..\..\src\common\process.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_regex.obj : .AUTODEPEND ..\..\src\common\regex.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_stdpbase.obj : .AUTODEPEND ..\..\src\common\stdpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_sstream.obj : .AUTODEPEND ..\..\src\common\sstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_stdstream.obj : .AUTODEPEND ..\..\src\common\stdstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_stopwatch.obj : .AUTODEPEND ..\..\src\common\stopwatch.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_strconv.obj : .AUTODEPEND ..\..\src\common\strconv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_stream.obj : .AUTODEPEND ..\..\src\common\stream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_string.obj : .AUTODEPEND ..\..\src\common\string.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_stringimpl.obj : .AUTODEPEND ..\..\src\common\stringimpl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_stringops.obj : .AUTODEPEND ..\..\src\common\stringops.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_strvararg.obj : .AUTODEPEND ..\..\src\common\strvararg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_sysopt.obj : .AUTODEPEND ..\..\src\common\sysopt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_tarstrm.obj : .AUTODEPEND ..\..\src\common\tarstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_textbuf.obj : .AUTODEPEND ..\..\src\common\textbuf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_textfile.obj : .AUTODEPEND ..\..\src\common\textfile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_threadinfo.obj : .AUTODEPEND ..\..\src\common\threadinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_time.obj : .AUTODEPEND ..\..\src\common\time.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_timercmn.obj : .AUTODEPEND ..\..\src\common\timercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_timerimpl.obj : .AUTODEPEND ..\..\src\common\timerimpl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_tokenzr.obj : .AUTODEPEND ..\..\src\common\tokenzr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_translation.obj : .AUTODEPEND ..\..\src\common\translation.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_txtstrm.obj : .AUTODEPEND ..\..\src\common\txtstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_unichar.obj : .AUTODEPEND ..\..\src\common\unichar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_uri.obj : .AUTODEPEND ..\..\src\common\uri.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_ustring.obj : .AUTODEPEND ..\..\src\common\ustring.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_variant.obj : .AUTODEPEND ..\..\src\common\variant.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_wfstream.obj : .AUTODEPEND ..\..\src\common\wfstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_wxcrt.obj : .AUTODEPEND ..\..\src\common\wxcrt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_wxprintf.obj : .AUTODEPEND ..\..\src\common\wxprintf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xlocale.obj : .AUTODEPEND ..\..\src\common\xlocale.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xti.obj : .AUTODEPEND ..\..\src\common\xti.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xtistrm.obj : .AUTODEPEND ..\..\src\common\xtistrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_zipstrm.obj : .AUTODEPEND ..\..\src\common\zipstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_zstream.obj : .AUTODEPEND ..\..\src\common\zstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fswatchercmn.obj : .AUTODEPEND ..\..\src\common\fswatchercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fswatcherg.obj : .AUTODEPEND ..\..\src\generic\fswatcherg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_basemsw.obj : .AUTODEPEND ..\..\src\msw\basemsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_crashrpt.obj : .AUTODEPEND ..\..\src\msw\crashrpt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_debughlp.obj : .AUTODEPEND ..\..\src\msw\debughlp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dde.obj : .AUTODEPEND ..\..\src\msw\dde.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dir.obj : .AUTODEPEND ..\..\src\msw\dir.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dlmsw.obj : .AUTODEPEND ..\..\src\msw\dlmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_evtloopconsole.obj : .AUTODEPEND ..\..\src\msw\evtloopconsole.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_mimetype.obj : .AUTODEPEND ..\..\src\msw\mimetype.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_power.obj : .AUTODEPEND ..\..\src\msw\power.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_regconf.obj : .AUTODEPEND ..\..\src\msw\regconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_registry.obj : .AUTODEPEND ..\..\src\msw\registry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_snglinst.obj : .AUTODEPEND ..\..\src\msw\snglinst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_stackwalk.obj : .AUTODEPEND ..\..\src\msw\stackwalk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_thread.obj : .AUTODEPEND ..\..\src\msw\thread.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_timer.obj : .AUTODEPEND ..\..\src\msw\timer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_utils.obj : .AUTODEPEND ..\..\src\msw\utils.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_utilsexc.obj : .AUTODEPEND ..\..\src\msw\utilsexc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fswatcher.obj : .AUTODEPEND ..\..\src\msw\fswatcher.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_event.obj : .AUTODEPEND ..\..\src\common\event.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fs_mem.obj : .AUTODEPEND ..\..\src\common\fs_mem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msgout.obj : .AUTODEPEND ..\..\src\common\msgout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_utilscmn.obj : .AUTODEPEND ..\..\src\common\utilscmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_main.obj : .AUTODEPEND ..\..\src\msw\main.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_mslu.obj : .AUTODEPEND ..\..\src\msw\mslu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_volume.obj : .AUTODEPEND ..\..\src\msw\volume.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fs_inet.obj : .AUTODEPEND ..\..\src\common\fs_inet.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_ftp.obj : .AUTODEPEND ..\..\src\common\ftp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_http.obj : .AUTODEPEND ..\..\src\common\http.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_protocol.obj : .AUTODEPEND ..\..\src\common\protocol.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_sckaddr.obj : .AUTODEPEND ..\..\src\common\sckaddr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_sckfile.obj : .AUTODEPEND ..\..\src\common\sckfile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_sckipc.obj : .AUTODEPEND ..\..\src\common\sckipc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_sckstrm.obj : .AUTODEPEND ..\..\src\common\sckstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_socket.obj : .AUTODEPEND ..\..\src\common\socket.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_url.obj : .AUTODEPEND ..\..\src\common\url.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_sockmsw.obj : .AUTODEPEND ..\..\src\msw\sockmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_urlmsw.obj : .AUTODEPEND ..\..\src\msw\urlmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_generic_statusbr.obj : .AUTODEPEND ..\..\src\generic\statusbr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_accel.obj : .AUTODEPEND ..\..\src\msw\accel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_anybutton.obj : .AUTODEPEND ..\..\src\msw\anybutton.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_artmsw.obj : .AUTODEPEND ..\..\src\msw\artmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_bmpbuttn.obj : .AUTODEPEND ..\..\src\msw\bmpbuttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_button.obj : .AUTODEPEND ..\..\src\msw\button.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_checkbox.obj : .AUTODEPEND ..\..\src\msw\checkbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_choice.obj : .AUTODEPEND ..\..\src\msw\choice.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_colordlg.obj : .AUTODEPEND ..\..\src\msw\colordlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_combo.obj : .AUTODEPEND ..\..\src\msw\combo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_combobox.obj : .AUTODEPEND ..\..\src\msw\combobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_control.obj : .AUTODEPEND ..\..\src\msw\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_dialog.obj : .AUTODEPEND ..\..\src\msw\dialog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dirdlg.obj : .AUTODEPEND ..\..\src\msw\dirdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dragimag.obj : .AUTODEPEND ..\..\src\msw\dragimag.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_filedlg.obj : .AUTODEPEND ..\..\src\msw\filedlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_frame.obj : .AUTODEPEND ..\..\src\msw\frame.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_gauge.obj : .AUTODEPEND ..\..\src\msw\gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_headerctrl.obj : .AUTODEPEND ..\..\src\msw\headerctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_iniconf.obj : .AUTODEPEND ..\..\src\msw\iniconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_listbox.obj : .AUTODEPEND ..\..\src\msw\listbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_listctrl.obj : .AUTODEPEND ..\..\src\msw\listctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_mdi.obj : .AUTODEPEND ..\..\src\msw\mdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_menu.obj : .AUTODEPEND ..\..\src\msw\menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_menuitem.obj : .AUTODEPEND ..\..\src\msw\menuitem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_metafile.obj : .AUTODEPEND ..\..\src\msw\metafile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msgdlg.obj : .AUTODEPEND ..\..\src\msw\msgdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_nativdlg.obj : .AUTODEPEND ..\..\src\msw\nativdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_nativewin.obj : .AUTODEPEND ..\..\src\msw\nativewin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_notebook.obj : .AUTODEPEND ..\..\src\msw\notebook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_access.obj : .AUTODEPEND ..\..\src\msw\ole\access.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_ownerdrw.obj : .AUTODEPEND ..\..\src\msw\ownerdrw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_panel.obj : .AUTODEPEND ..\..\src\msw\panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_progdlg.obj : .AUTODEPEND ..\..\src\msw\progdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_radiobox.obj : .AUTODEPEND ..\..\src\msw\radiobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_radiobut.obj : .AUTODEPEND ..\..\src\msw\radiobut.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_richmsgdlg.obj : .AUTODEPEND ..\..\src\msw\richmsgdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_scrolbar.obj : .AUTODEPEND ..\..\src\msw\scrolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_slider.obj : .AUTODEPEND ..\..\src\msw\slider.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_spinbutt.obj : .AUTODEPEND ..\..\src\msw\spinbutt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_spinctrl.obj : .AUTODEPEND ..\..\src\msw\spinctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_statbmp.obj : .AUTODEPEND ..\..\src\msw\statbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_statbox.obj : .AUTODEPEND ..\..\src\msw\statbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_statusbar.obj : .AUTODEPEND ..\..\src\msw\statusbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_statline.obj : .AUTODEPEND ..\..\src\msw\statline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_stattext.obj : .AUTODEPEND ..\..\src\msw\stattext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_toolbar.obj : .AUTODEPEND ..\..\src\msw\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_textctrl.obj : .AUTODEPEND ..\..\src\msw\textctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_textentry.obj : .AUTODEPEND ..\..\src\msw\textentry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_tglbtn.obj : .AUTODEPEND ..\..\src\msw\tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_treectrl.obj : .AUTODEPEND ..\..\src\msw\treectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_checklst.obj : .AUTODEPEND ..\..\src\msw\checklst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_msw_fdrepdlg.obj : .AUTODEPEND ..\..\src\msw\fdrepdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fontdlg.obj : .AUTODEPEND ..\..\src\msw\fontdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_generic_accel.obj : .AUTODEPEND ..\..\src\generic\accel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_colrdlgg.obj : .AUTODEPEND ..\..\src\generic\colrdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dirdlgg.obj : .AUTODEPEND ..\..\src\generic\dirdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_generic_fdrepdlg.obj : .AUTODEPEND ..\..\src\generic\fdrepdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_filedlgg.obj : .AUTODEPEND ..\..\src\generic\filedlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_fontdlgg.obj : .AUTODEPEND ..\..\src\generic\fontdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_generic_listctrl.obj : .AUTODEPEND ..\..\src\generic\listctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_mdig.obj : .AUTODEPEND ..\..\src\generic\mdig.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_bmpbuttn.obj : .AUTODEPEND ..\..\src\univ\bmpbuttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_button.obj : .AUTODEPEND ..\..\src\univ\button.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_checkbox.obj : .AUTODEPEND ..\..\src\univ\checkbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_checklst.obj : .AUTODEPEND ..\..\src\univ\checklst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_choice.obj : .AUTODEPEND ..\..\src\univ\choice.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_combobox.obj : .AUTODEPEND ..\..\src\univ\combobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_control.obj : .AUTODEPEND ..\..\src\univ\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_ctrlrend.obj : .AUTODEPEND ..\..\src\univ\ctrlrend.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_dialog.obj : .AUTODEPEND ..\..\src\univ\dialog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_framuniv.obj : .AUTODEPEND ..\..\src\univ\framuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_gauge.obj : .AUTODEPEND ..\..\src\univ\gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_inpcons.obj : .AUTODEPEND ..\..\src\univ\inpcons.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_inphand.obj : .AUTODEPEND ..\..\src\univ\inphand.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_listbox.obj : .AUTODEPEND ..\..\src\univ\listbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_menu.obj : .AUTODEPEND ..\..\src\univ\menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_notebook.obj : .AUTODEPEND ..\..\src\univ\notebook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_radiobox.obj : .AUTODEPEND ..\..\src\univ\radiobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_radiobut.obj : .AUTODEPEND ..\..\src\univ\radiobut.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_scrarrow.obj : .AUTODEPEND ..\..\src\univ\scrarrow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_scrolbar.obj : .AUTODEPEND ..\..\src\univ\scrolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_scrthumb.obj : .AUTODEPEND ..\..\src\univ\scrthumb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_settingsuniv.obj : .AUTODEPEND ..\..\src\univ\settingsuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_slider.obj : .AUTODEPEND ..\..\src\univ\slider.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_spinbutt.obj : .AUTODEPEND ..\..\src\univ\spinbutt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_statbmp.obj : .AUTODEPEND ..\..\src\univ\statbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_statbox.obj : .AUTODEPEND ..\..\src\univ\statbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_statline.obj : .AUTODEPEND ..\..\src\univ\statline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_stattext.obj : .AUTODEPEND ..\..\src\univ\stattext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_statusbr.obj : .AUTODEPEND ..\..\src\univ\statusbr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_stdrend.obj : .AUTODEPEND ..\..\src\univ\stdrend.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_textctrl.obj : .AUTODEPEND ..\..\src\univ\textctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_tglbtn.obj : .AUTODEPEND ..\..\src\univ\tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_theme.obj : .AUTODEPEND ..\..\src\univ\theme.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_univ_toolbar.obj : .AUTODEPEND ..\..\src\univ\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_topluniv.obj : .AUTODEPEND ..\..\src\univ\topluniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_winuniv.obj : .AUTODEPEND ..\..\src\univ\winuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_gtk.obj : .AUTODEPEND ..\..\src\univ\themes\gtk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_metal.obj : .AUTODEPEND ..\..\src\univ\themes\metal.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_mono.obj : .AUTODEPEND ..\..\src\univ\themes\mono.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_win32.obj : .AUTODEPEND ..\..\src\univ\themes\win32.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_bmpcbox.obj : .AUTODEPEND ..\..\src\msw\bmpcbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_calctrl.obj : .AUTODEPEND ..\..\src\msw\calctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_commandlinkbutton.obj : .AUTODEPEND ..\..\src\msw\commandlinkbutton.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_datecontrols.obj : .AUTODEPEND ..\..\src\msw\datecontrols.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_datectrl.obj : .AUTODEPEND ..\..\src\msw\datectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_datetimectrl.obj : .AUTODEPEND ..\..\src\msw\datetimectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_hyperlink.obj : .AUTODEPEND ..\..\src\msw\hyperlink.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_timectrl.obj : .AUTODEPEND ..\..\src\msw\timectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_mediactrlcmn.obj : .AUTODEPEND ..\..\src\common\mediactrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_mediactrl_am.obj : .AUTODEPEND ..\..\src\msw\mediactrl_am.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_mediactrl_wmp10.obj : .AUTODEPEND ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_mediactrl_qt.obj : .AUTODEPEND ..\..\src\msw\mediactrl_qt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_helpbest.obj : .AUTODEPEND ..\..\src\msw\helpbest.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_helpctrl.obj : .AUTODEPEND ..\..\src\html\helpctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_helpdata.obj : .AUTODEPEND ..\..\src\html\helpdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_helpdlg.obj : .AUTODEPEND ..\..\src\html\helpdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_helpfrm.obj : .AUTODEPEND ..\..\src\html\helpfrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_helpwnd.obj : .AUTODEPEND ..\..\src\html\helpwnd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_htmlcell.obj : .AUTODEPEND ..\..\src\html\htmlcell.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_htmlfilt.obj : .AUTODEPEND ..\..\src\html\htmlfilt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_htmlpars.obj : .AUTODEPEND ..\..\src\html\htmlpars.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_htmltag.obj : .AUTODEPEND ..\..\src\html\htmltag.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_htmlwin.obj : .AUTODEPEND ..\..\src\html\htmlwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_htmprint.obj : .AUTODEPEND ..\..\src\html\htmprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_m_dflist.obj : .AUTODEPEND ..\..\src\html\m_dflist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_m_fonts.obj : .AUTODEPEND ..\..\src\html\m_fonts.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_m_hline.obj : .AUTODEPEND ..\..\src\html\m_hline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_m_image.obj : .AUTODEPEND ..\..\src\html\m_image.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_m_layout.obj : .AUTODEPEND ..\..\src\html\m_layout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_m_links.obj : .AUTODEPEND ..\..\src\html\m_links.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_m_list.obj : .AUTODEPEND ..\..\src\html\m_list.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_m_pre.obj : .AUTODEPEND ..\..\src\html\m_pre.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_m_span.obj : .AUTODEPEND ..\..\src\html\m_span.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_m_style.obj : .AUTODEPEND ..\..\src\html\m_style.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_m_tables.obj : .AUTODEPEND ..\..\src\html\m_tables.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_styleparams.obj : .AUTODEPEND ..\..\src\html\styleparams.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_winpars.obj : .AUTODEPEND ..\..\src\html\winpars.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_htmllbox.obj : .AUTODEPEND ..\..\src\generic\htmllbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_webview_ie.obj : .AUTODEPEND ..\..\src\msw\webview_ie.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_webview.obj : .AUTODEPEND ..\..\src\common\webview.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_webviewarchivehandler.obj : .AUTODEPEND ..\..\src\common\webviewarchivehandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_webviewfshandler.obj : .AUTODEPEND ..\..\src\common\webviewfshandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_debugrpt.obj : .AUTODEPEND ..\..\src\common\debugrpt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dbgrptg.obj : .AUTODEPEND ..\..\src\generic\dbgrptg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_animatctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_bannerwindow.obj : .AUTODEPEND ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_bmp.obj : .AUTODEPEND ..\..\src\xrc\xh_bmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_bmpcbox.obj : .AUTODEPEND ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_bmpbt.obj : .AUTODEPEND ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_bttn.obj : .AUTODEPEND ..\..\src\xrc\xh_bttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_cald.obj : .AUTODEPEND ..\..\src\xrc\xh_cald.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_chckb.obj : .AUTODEPEND ..\..\src\xrc\xh_chckb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_chckl.obj : .AUTODEPEND ..\..\src\xrc\xh_chckl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_choic.obj : .AUTODEPEND ..\..\src\xrc\xh_choic.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_choicbk.obj : .AUTODEPEND ..\..\src\xrc\xh_choicbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_clrpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_cmdlinkbn.obj : .AUTODEPEND ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_collpane.obj : .AUTODEPEND ..\..\src\xrc\xh_collpane.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_combo.obj : .AUTODEPEND ..\..\src\xrc\xh_combo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_comboctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_datectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_datectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_dirpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_dlg.obj : .AUTODEPEND ..\..\src\xrc\xh_dlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_editlbox.obj : .AUTODEPEND ..\..\src\xrc\xh_editlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_filectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_filepicker.obj : .AUTODEPEND ..\..\src\xrc\xh_filepicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_fontpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_frame.obj : .AUTODEPEND ..\..\src\xrc\xh_frame.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_gauge.obj : .AUTODEPEND ..\..\src\xrc\xh_gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_gdctl.obj : .AUTODEPEND ..\..\src\xrc\xh_gdctl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_grid.obj : .AUTODEPEND ..\..\src\xrc\xh_grid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_html.obj : .AUTODEPEND ..\..\src\xrc\xh_html.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_hyperlink.obj : .AUTODEPEND ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_listb.obj : .AUTODEPEND ..\..\src\xrc\xh_listb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_listbk.obj : .AUTODEPEND ..\..\src\xrc\xh_listbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_listc.obj : .AUTODEPEND ..\..\src\xrc\xh_listc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_mdi.obj : .AUTODEPEND ..\..\src\xrc\xh_mdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_menu.obj : .AUTODEPEND ..\..\src\xrc\xh_menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_notbk.obj : .AUTODEPEND ..\..\src\xrc\xh_notbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_odcombo.obj : .AUTODEPEND ..\..\src\xrc\xh_odcombo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_panel.obj : .AUTODEPEND ..\..\src\xrc\xh_panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_propdlg.obj : .AUTODEPEND ..\..\src\xrc\xh_propdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_radbt.obj : .AUTODEPEND ..\..\src\xrc\xh_radbt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_radbx.obj : .AUTODEPEND ..\..\src\xrc\xh_radbx.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_scrol.obj : .AUTODEPEND ..\..\src\xrc\xh_scrol.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_scwin.obj : .AUTODEPEND ..\..\src\xrc\xh_scwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_htmllbox.obj : .AUTODEPEND ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_sizer.obj : .AUTODEPEND ..\..\src\xrc\xh_sizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_slidr.obj : .AUTODEPEND ..\..\src\xrc\xh_slidr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_spin.obj : .AUTODEPEND ..\..\src\xrc\xh_spin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_split.obj : .AUTODEPEND ..\..\src\xrc\xh_split.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_srchctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_statbar.obj : .AUTODEPEND ..\..\src\xrc\xh_statbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_stbmp.obj : .AUTODEPEND ..\..\src\xrc\xh_stbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_stbox.obj : .AUTODEPEND ..\..\src\xrc\xh_stbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_stlin.obj : .AUTODEPEND ..\..\src\xrc\xh_stlin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_sttxt.obj : .AUTODEPEND ..\..\src\xrc\xh_sttxt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_text.obj : .AUTODEPEND ..\..\src\xrc\xh_text.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_tglbtn.obj : .AUTODEPEND ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_timectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_timectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_toolb.obj : .AUTODEPEND ..\..\src\xrc\xh_toolb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_toolbk.obj : .AUTODEPEND ..\..\src\xrc\xh_toolbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_tree.obj : .AUTODEPEND ..\..\src\xrc\xh_tree.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_treebk.obj : .AUTODEPEND ..\..\src\xrc\xh_treebk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_unkwn.obj : .AUTODEPEND ..\..\src\xrc\xh_unkwn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_wizrd.obj : .AUTODEPEND ..\..\src\xrc\xh_wizrd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xmlres.obj : .AUTODEPEND ..\..\src\xrc\xmlres.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xmladv.obj : .AUTODEPEND ..\..\src\xrc\xmladv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xmlrsall.obj : .AUTODEPEND ..\..\src\xrc\xmlrsall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_framemanager.obj : .AUTODEPEND ..\..\src\aui\framemanager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_dockart.obj : .AUTODEPEND ..\..\src\aui\dockart.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_floatpane.obj : .AUTODEPEND ..\..\src\aui\floatpane.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_auibook.obj : .AUTODEPEND ..\..\src\aui\auibook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_auibar.obj : .AUTODEPEND ..\..\src\aui\auibar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_tabmdi.obj : .AUTODEPEND ..\..\src\aui\tabmdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_tabart.obj : .AUTODEPEND ..\..\src\aui\tabart.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_auinotbk.obj : .AUTODEPEND ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_advprops.obj : .AUTODEPEND ..\..\src\propgrid\advprops.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_editors.obj : .AUTODEPEND ..\..\src\propgrid\editors.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_manager.obj : .AUTODEPEND ..\..\src\propgrid\manager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_property.obj : .AUTODEPEND ..\..\src\propgrid\property.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_propgrid.obj : .AUTODEPEND ..\..\src\propgrid\propgrid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_propgridiface.obj : .AUTODEPEND ..\..\src\propgrid\propgridiface.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_propgridpagestate.obj : .AUTODEPEND ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_props.obj : .AUTODEPEND ..\..\src\propgrid\props.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_art_internal.obj : .AUTODEPEND ..\..\src\ribbon\art_internal.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_art_msw.obj : .AUTODEPEND ..\..\src\ribbon\art_msw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_art_aui.obj : .AUTODEPEND ..\..\src\ribbon\art_aui.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_bar.obj : .AUTODEPEND ..\..\src\ribbon\bar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_ribbon_buttonbar.obj : .AUTODEPEND ..\..\src\ribbon\buttonbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_ribbon_control.obj : .AUTODEPEND ..\..\src\ribbon\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_gallery.obj : .AUTODEPEND ..\..\src\ribbon\gallery.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_page.obj : .AUTODEPEND ..\..\src\ribbon\page.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_ribbon_panel.obj : .AUTODEPEND ..\..\src\ribbon\panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_ribbon_toolbar.obj : .AUTODEPEND ..\..\src\ribbon\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_ribbon.obj : .AUTODEPEND ..\..\src\xrc\xh_ribbon.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_richtextbuffer.obj : .AUTODEPEND ..\..\src\richtext\richtextbuffer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_richtextctrl.obj : .AUTODEPEND ..\..\src\richtext\richtextctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_richtextformatdlg.obj : .AUTODEPEND ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_richtexthtml.obj : .AUTODEPEND ..\..\src\richtext\richtexthtml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_richtextimagedlg.obj : .AUTODEPEND ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_richtextprint.obj : .AUTODEPEND ..\..\src\richtext\richtextprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_richtextstyledlg.obj : .AUTODEPEND ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_richtextstyles.obj : .AUTODEPEND ..\..\src\richtext\richtextstyles.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_richtextsymboldlg.obj : .AUTODEPEND ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_richtextxml.obj : .AUTODEPEND ..\..\src\richtext\richtextxml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xh_richtext.obj : .AUTODEPEND ..\..\src\xrc\xh_richtext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_stc.obj : .AUTODEPEND ..\..\src\stc\stc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_PlatWX.obj : .AUTODEPEND ..\..\src\stc\PlatWX.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_ScintillaWX.obj : .AUTODEPEND ..\..\src\stc\ScintillaWX.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xml.obj : .AUTODEPEND ..\..\src\xml\xml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +$(OBJS)\monolib_xtixml.obj : .AUTODEPEND ..\..\src\common\xtixml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + +!ifeq USE_GUI 1 +$(OBJS)\monolib_activex.obj : .AUTODEPEND ..\..\src\msw\ole\activex.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_app.obj : .AUTODEPEND ..\..\src\msw\app.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_bitmap.obj : .AUTODEPEND ..\..\src\msw\bitmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_brush.obj : .AUTODEPEND ..\..\src\msw\brush.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_caret.obj : .AUTODEPEND ..\..\src\msw\caret.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_clipbrd.obj : .AUTODEPEND ..\..\src\msw\clipbrd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_colour.obj : .AUTODEPEND ..\..\src\msw\colour.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_cursor.obj : .AUTODEPEND ..\..\src\msw\cursor.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_data.obj : .AUTODEPEND ..\..\src\msw\data.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dc.obj : .AUTODEPEND ..\..\src\msw\dc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dcclient.obj : .AUTODEPEND ..\..\src\msw\dcclient.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dcmemory.obj : .AUTODEPEND ..\..\src\msw\dcmemory.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dcprint.obj : .AUTODEPEND ..\..\src\msw\dcprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dcscreen.obj : .AUTODEPEND ..\..\src\msw\dcscreen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dialup.obj : .AUTODEPEND ..\..\src\msw\dialup.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dib.obj : .AUTODEPEND ..\..\src\msw\dib.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_display.obj : .AUTODEPEND ..\..\src\msw\display.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_enhmeta.obj : .AUTODEPEND ..\..\src\msw\enhmeta.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_font.obj : .AUTODEPEND ..\..\src\msw\font.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_fontenum.obj : .AUTODEPEND ..\..\src\msw\fontenum.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_fontutil.obj : .AUTODEPEND ..\..\src\msw\fontutil.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_gdiimage.obj : .AUTODEPEND ..\..\src\msw\gdiimage.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_gdiobj.obj : .AUTODEPEND ..\..\src\msw\gdiobj.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_gdiplus.obj : .AUTODEPEND ..\..\src\msw\gdiplus.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_graphics.obj : .AUTODEPEND ..\..\src\msw\graphics.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_icon.obj : .AUTODEPEND ..\..\src\msw\icon.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imaglist.obj : .AUTODEPEND ..\..\src\msw\imaglist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_minifram.obj : .AUTODEPEND ..\..\src\msw\minifram.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_nonownedwnd.obj : .AUTODEPEND ..\..\src\msw\nonownedwnd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dataobj.obj : .AUTODEPEND ..\..\src\msw\ole\dataobj.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dropsrc.obj : .AUTODEPEND ..\..\src\msw\ole\dropsrc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_droptgt.obj : .AUTODEPEND ..\..\src\msw\ole\droptgt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_oleutils.obj : .AUTODEPEND ..\..\src\msw\ole\oleutils.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_safearray.obj : .AUTODEPEND ..\..\src\msw\ole\safearray.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_palette.obj : .AUTODEPEND ..\..\src\msw\palette.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_pen.obj : .AUTODEPEND ..\..\src\msw\pen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_popupwin.obj : .AUTODEPEND ..\..\src\msw\popupwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_printdlg.obj : .AUTODEPEND ..\..\src\msw\printdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_printwin.obj : .AUTODEPEND ..\..\src\msw\printwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_region.obj : .AUTODEPEND ..\..\src\msw\region.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_renderer.obj : .AUTODEPEND ..\..\src\msw\renderer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_settings.obj : .AUTODEPEND ..\..\src\msw\settings.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_textmeasure.obj : .AUTODEPEND ..\..\src\msw\textmeasure.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_tooltip.obj : .AUTODEPEND ..\..\src\msw\tooltip.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_toplevel.obj : .AUTODEPEND ..\..\src\msw\toplevel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_uiaction.obj : .AUTODEPEND ..\..\src\msw\uiaction.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_utilsgui.obj : .AUTODEPEND ..\..\src\msw\utilsgui.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_utilswin.obj : .AUTODEPEND ..\..\src\msw\utilswin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_uxtheme.obj : .AUTODEPEND ..\..\src\msw\uxtheme.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_window.obj : .AUTODEPEND ..\..\src\msw\window.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_helpchm.obj : .AUTODEPEND ..\..\src\msw\helpchm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_helpwin.obj : .AUTODEPEND ..\..\src\msw\helpwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_automtn.obj : .AUTODEPEND ..\..\src\msw\ole\automtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_uuid.obj : .AUTODEPEND ..\..\src\msw\ole\uuid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_clrpickerg.obj : .AUTODEPEND ..\..\src\generic\clrpickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_collpaneg.obj : .AUTODEPEND ..\..\src\generic\collpaneg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_filepickerg.obj : .AUTODEPEND ..\..\src\generic\filepickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_fontpickerg.obj : .AUTODEPEND ..\..\src\generic\fontpickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_prntdlgg.obj : .AUTODEPEND ..\..\src\generic\prntdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_evtloop.obj : .AUTODEPEND ..\..\src\msw\evtloop.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_accelcmn.obj : .AUTODEPEND ..\..\src\common\accelcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_accesscmn.obj : .AUTODEPEND ..\..\src\common\accesscmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_anidecod.obj : .AUTODEPEND ..\..\src\common\anidecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_affinematrix2d.obj : .AUTODEPEND ..\..\src\common\affinematrix2d.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_appcmn.obj : .AUTODEPEND ..\..\src\common\appcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_artprov.obj : .AUTODEPEND ..\..\src\common\artprov.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_artstd.obj : .AUTODEPEND ..\..\src\common\artstd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_bmpbase.obj : .AUTODEPEND ..\..\src\common\bmpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_bmpbtncmn.obj : .AUTODEPEND ..\..\src\common\bmpbtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_bookctrl.obj : .AUTODEPEND ..\..\src\common\bookctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_btncmn.obj : .AUTODEPEND ..\..\src\common\btncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_cairo.obj : .AUTODEPEND ..\..\src\common\cairo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_checkboxcmn.obj : .AUTODEPEND ..\..\src\common\checkboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_checklstcmn.obj : .AUTODEPEND ..\..\src\common\checklstcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_choiccmn.obj : .AUTODEPEND ..\..\src\common\choiccmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_clipcmn.obj : .AUTODEPEND ..\..\src\common\clipcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_clrpickercmn.obj : .AUTODEPEND ..\..\src\common\clrpickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_colourcmn.obj : .AUTODEPEND ..\..\src\common\colourcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_colourdata.obj : .AUTODEPEND ..\..\src\common\colourdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_combocmn.obj : .AUTODEPEND ..\..\src\common\combocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_cmdproc.obj : .AUTODEPEND ..\..\src\common\cmdproc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_cmndata.obj : .AUTODEPEND ..\..\src\common\cmndata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_containr.obj : .AUTODEPEND ..\..\src\common\containr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_cshelp.obj : .AUTODEPEND ..\..\src\common\cshelp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_ctrlcmn.obj : .AUTODEPEND ..\..\src\common\ctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_ctrlsub.obj : .AUTODEPEND ..\..\src\common\ctrlsub.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dcbase.obj : .AUTODEPEND ..\..\src\common\dcbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dcbufcmn.obj : .AUTODEPEND ..\..\src\common\dcbufcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dcgraph.obj : .AUTODEPEND ..\..\src\common\dcgraph.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dcsvg.obj : .AUTODEPEND ..\..\src\common\dcsvg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dirctrlcmn.obj : .AUTODEPEND ..\..\src\common\dirctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dlgcmn.obj : .AUTODEPEND ..\..\src\common\dlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dndcmn.obj : .AUTODEPEND ..\..\src\common\dndcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dobjcmn.obj : .AUTODEPEND ..\..\src\common\dobjcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_docmdi.obj : .AUTODEPEND ..\..\src\common\docmdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_docview.obj : .AUTODEPEND ..\..\src\common\docview.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dpycmn.obj : .AUTODEPEND ..\..\src\common\dpycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dseldlg.obj : .AUTODEPEND ..\..\src\common\dseldlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_effects.obj : .AUTODEPEND ..\..\src\common\effects.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_fddlgcmn.obj : .AUTODEPEND ..\..\src\common\fddlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_filectrlcmn.obj : .AUTODEPEND ..\..\src\common\filectrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_filehistorycmn.obj : .AUTODEPEND ..\..\src\common\filehistorycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_filepickercmn.obj : .AUTODEPEND ..\..\src\common\filepickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_fontpickercmn.obj : .AUTODEPEND ..\..\src\common\fontpickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_fldlgcmn.obj : .AUTODEPEND ..\..\src\common\fldlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_fontcmn.obj : .AUTODEPEND ..\..\src\common\fontcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_fontdata.obj : .AUTODEPEND ..\..\src\common\fontdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_graphicc.obj : .AUTODEPEND ..\..\src\generic\graphicc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_fontenumcmn.obj : .AUTODEPEND ..\..\src\common\fontenumcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_fontmap.obj : .AUTODEPEND ..\..\src\common\fontmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_fontutilcmn.obj : .AUTODEPEND ..\..\src\common\fontutilcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_framecmn.obj : .AUTODEPEND ..\..\src\common\framecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_gaugecmn.obj : .AUTODEPEND ..\..\src\common\gaugecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_gbsizer.obj : .AUTODEPEND ..\..\src\common\gbsizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_gdicmn.obj : .AUTODEPEND ..\..\src\common\gdicmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_geometry.obj : .AUTODEPEND ..\..\src\common\geometry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_gifdecod.obj : .AUTODEPEND ..\..\src\common\gifdecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_graphcmn.obj : .AUTODEPEND ..\..\src\common\graphcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_headercolcmn.obj : .AUTODEPEND ..\..\src\common\headercolcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_headerctrlcmn.obj : .AUTODEPEND ..\..\src\common\headerctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_helpbase.obj : .AUTODEPEND ..\..\src\common\helpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_iconbndl.obj : .AUTODEPEND ..\..\src\common\iconbndl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imagall.obj : .AUTODEPEND ..\..\src\common\imagall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imagbmp.obj : .AUTODEPEND ..\..\src\common\imagbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_image.obj : .AUTODEPEND ..\..\src\common\image.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imagfill.obj : .AUTODEPEND ..\..\src\common\imagfill.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imaggif.obj : .AUTODEPEND ..\..\src\common\imaggif.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imagiff.obj : .AUTODEPEND ..\..\src\common\imagiff.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imagjpeg.obj : .AUTODEPEND ..\..\src\common\imagjpeg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imagpcx.obj : .AUTODEPEND ..\..\src\common\imagpcx.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imagpng.obj : .AUTODEPEND ..\..\src\common\imagpng.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imagpnm.obj : .AUTODEPEND ..\..\src\common\imagpnm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imagtga.obj : .AUTODEPEND ..\..\src\common\imagtga.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imagtiff.obj : .AUTODEPEND ..\..\src\common\imagtiff.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_imagxpm.obj : .AUTODEPEND ..\..\src\common\imagxpm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_layout.obj : .AUTODEPEND ..\..\src\common\layout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_lboxcmn.obj : .AUTODEPEND ..\..\src\common\lboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_listctrlcmn.obj : .AUTODEPEND ..\..\src\common\listctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_markupparser.obj : .AUTODEPEND ..\..\src\common\markupparser.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_matrix.obj : .AUTODEPEND ..\..\src\common\matrix.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_menucmn.obj : .AUTODEPEND ..\..\src\common\menucmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_modalhook.obj : .AUTODEPEND ..\..\src\common\modalhook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_mousemanager.obj : .AUTODEPEND ..\..\src\common\mousemanager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_nbkbase.obj : .AUTODEPEND ..\..\src\common\nbkbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_overlaycmn.obj : .AUTODEPEND ..\..\src\common\overlaycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_ownerdrwcmn.obj : .AUTODEPEND ..\..\src\common\ownerdrwcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_paper.obj : .AUTODEPEND ..\..\src\common\paper.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_panelcmn.obj : .AUTODEPEND ..\..\src\common\panelcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_persist.obj : .AUTODEPEND ..\..\src\common\persist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_pickerbase.obj : .AUTODEPEND ..\..\src\common\pickerbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_popupcmn.obj : .AUTODEPEND ..\..\src\common\popupcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_preferencescmn.obj : .AUTODEPEND ..\..\src\common\preferencescmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_prntbase.obj : .AUTODEPEND ..\..\src\common\prntbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_quantize.obj : .AUTODEPEND ..\..\src\common\quantize.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_radiobtncmn.obj : .AUTODEPEND ..\..\src\common\radiobtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_radiocmn.obj : .AUTODEPEND ..\..\src\common\radiocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_rearrangectrl.obj : .AUTODEPEND ..\..\src\common\rearrangectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_rendcmn.obj : .AUTODEPEND ..\..\src\common\rendcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_rgncmn.obj : .AUTODEPEND ..\..\src\common\rgncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_scrolbarcmn.obj : .AUTODEPEND ..\..\src\common\scrolbarcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_settcmn.obj : .AUTODEPEND ..\..\src\common\settcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_sizer.obj : .AUTODEPEND ..\..\src\common\sizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_slidercmn.obj : .AUTODEPEND ..\..\src\common\slidercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_spinbtncmn.obj : .AUTODEPEND ..\..\src\common\spinbtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_spinctrlcmn.obj : .AUTODEPEND ..\..\src\common\spinctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_srchcmn.obj : .AUTODEPEND ..\..\src\common\srchcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_statbar.obj : .AUTODEPEND ..\..\src\common\statbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_statbmpcmn.obj : .AUTODEPEND ..\..\src\common\statbmpcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_statboxcmn.obj : .AUTODEPEND ..\..\src\common\statboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_statlinecmn.obj : .AUTODEPEND ..\..\src\common\statlinecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_stattextcmn.obj : .AUTODEPEND ..\..\src\common\stattextcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_stockitem.obj : .AUTODEPEND ..\..\src\common\stockitem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_tbarbase.obj : .AUTODEPEND ..\..\src\common\tbarbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_textcmn.obj : .AUTODEPEND ..\..\src\common\textcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_textentrycmn.obj : .AUTODEPEND ..\..\src\common\textentrycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_textmeasurecmn.obj : .AUTODEPEND ..\..\src\common\textmeasurecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_toplvcmn.obj : .AUTODEPEND ..\..\src\common\toplvcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_treebase.obj : .AUTODEPEND ..\..\src\common\treebase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_uiactioncmn.obj : .AUTODEPEND ..\..\src\common\uiactioncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_valgen.obj : .AUTODEPEND ..\..\src\common\valgen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_validate.obj : .AUTODEPEND ..\..\src\common\validate.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_valtext.obj : .AUTODEPEND ..\..\src\common\valtext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_valnum.obj : .AUTODEPEND ..\..\src\common\valnum.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_wincmn.obj : .AUTODEPEND ..\..\src\common\wincmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_windowid.obj : .AUTODEPEND ..\..\src\common\windowid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_wrapsizer.obj : .AUTODEPEND ..\..\src\common\wrapsizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_xpmdecod.obj : .AUTODEPEND ..\..\src\common\xpmdecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_busyinfo.obj : .AUTODEPEND ..\..\src\generic\busyinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_generic_buttonbar.obj : .AUTODEPEND ..\..\src\generic\buttonbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_choicdgg.obj : .AUTODEPEND ..\..\src\generic\choicdgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_choicbkg.obj : .AUTODEPEND ..\..\src\generic\choicbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_combog.obj : .AUTODEPEND ..\..\src\generic\combog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dcpsg.obj : .AUTODEPEND ..\..\src\generic\dcpsg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dirctrlg.obj : .AUTODEPEND ..\..\src\generic\dirctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_dragimgg.obj : .AUTODEPEND ..\..\src\generic\dragimgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_filectrlg.obj : .AUTODEPEND ..\..\src\generic\filectrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_headerctrlg.obj : .AUTODEPEND ..\..\src\generic\headerctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_infobar.obj : .AUTODEPEND ..\..\src\generic\infobar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_listbkg.obj : .AUTODEPEND ..\..\src\generic\listbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_logg.obj : .AUTODEPEND ..\..\src\generic\logg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_markuptext.obj : .AUTODEPEND ..\..\src\generic\markuptext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_msgdlgg.obj : .AUTODEPEND ..\..\src\generic\msgdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_numdlgg.obj : .AUTODEPEND ..\..\src\generic\numdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_progdlgg.obj : .AUTODEPEND ..\..\src\generic\progdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_preferencesg.obj : .AUTODEPEND ..\..\src\generic\preferencesg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_printps.obj : .AUTODEPEND ..\..\src\generic\printps.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_renderg.obj : .AUTODEPEND ..\..\src\generic\renderg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_richmsgdlgg.obj : .AUTODEPEND ..\..\src\generic\richmsgdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_scrlwing.obj : .AUTODEPEND ..\..\src\generic\scrlwing.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_selstore.obj : .AUTODEPEND ..\..\src\generic\selstore.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_spinctlg.obj : .AUTODEPEND ..\..\src\generic\spinctlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_splitter.obj : .AUTODEPEND ..\..\src\generic\splitter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_srchctlg.obj : .AUTODEPEND ..\..\src\generic\srchctlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_statbmpg.obj : .AUTODEPEND ..\..\src\generic\statbmpg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_stattextg.obj : .AUTODEPEND ..\..\src\generic\stattextg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_textdlgg.obj : .AUTODEPEND ..\..\src\generic\textdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_tipwin.obj : .AUTODEPEND ..\..\src\generic\tipwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_toolbkg.obj : .AUTODEPEND ..\..\src\generic\toolbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_treectlg.obj : .AUTODEPEND ..\..\src\generic\treectlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_treebkg.obj : .AUTODEPEND ..\..\src\generic\treebkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_vlbox.obj : .AUTODEPEND ..\..\src\generic\vlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_vscroll.obj : .AUTODEPEND ..\..\src\generic\vscroll.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_xmlreshandler.obj : .AUTODEPEND ..\..\src\xrc\xmlreshandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_animatecmn.obj : .AUTODEPEND ..\..\src\common\animatecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_bmpcboxcmn.obj : .AUTODEPEND ..\..\src\common\bmpcboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_calctrlcmn.obj : .AUTODEPEND ..\..\src\common\calctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_datavcmn.obj : .AUTODEPEND ..\..\src\common\datavcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_gridcmn.obj : .AUTODEPEND ..\..\src\common\gridcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_hyperlnkcmn.obj : .AUTODEPEND ..\..\src\common\hyperlnkcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_odcombocmn.obj : .AUTODEPEND ..\..\src\common\odcombocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_richtooltipcmn.obj : .AUTODEPEND ..\..\src\common\richtooltipcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_aboutdlgg.obj : .AUTODEPEND ..\..\src\generic\aboutdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_bannerwindow.obj : .AUTODEPEND ..\..\src\generic\bannerwindow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_bmpcboxg.obj : .AUTODEPEND ..\..\src\generic\bmpcboxg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_calctrlg.obj : .AUTODEPEND ..\..\src\generic\calctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_commandlinkbuttong.obj : .AUTODEPEND ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_datavgen.obj : .AUTODEPEND ..\..\src\generic\datavgen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_datectlg.obj : .AUTODEPEND ..\..\src\generic\datectlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_editlbox.obj : .AUTODEPEND ..\..\src\generic\editlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_grid.obj : .AUTODEPEND ..\..\src\generic\grid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_gridctrl.obj : .AUTODEPEND ..\..\src\generic\gridctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_grideditors.obj : .AUTODEPEND ..\..\src\generic\grideditors.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_gridsel.obj : .AUTODEPEND ..\..\src\generic\gridsel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_helpext.obj : .AUTODEPEND ..\..\src\generic\helpext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_hyperlinkg.obj : .AUTODEPEND ..\..\src\generic\hyperlinkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_laywin.obj : .AUTODEPEND ..\..\src\generic\laywin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_notifmsgg.obj : .AUTODEPEND ..\..\src\generic\notifmsgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_odcombo.obj : .AUTODEPEND ..\..\src\generic\odcombo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_propdlg.obj : .AUTODEPEND ..\..\src\generic\propdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_richtooltipg.obj : .AUTODEPEND ..\..\src\generic\richtooltipg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_sashwin.obj : .AUTODEPEND ..\..\src\generic\sashwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_splash.obj : .AUTODEPEND ..\..\src\generic\splash.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_timectrlg.obj : .AUTODEPEND ..\..\src\generic\timectrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_tipdlg.obj : .AUTODEPEND ..\..\src\generic\tipdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_treelist.obj : .AUTODEPEND ..\..\src\generic\treelist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_wizard.obj : .AUTODEPEND ..\..\src\generic\wizard.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_taskbarcmn.obj : .AUTODEPEND ..\..\src\common\taskbarcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_aboutdlg.obj : .AUTODEPEND ..\..\src\msw\aboutdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_notifmsg.obj : .AUTODEPEND ..\..\src\msw\notifmsg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_richtooltip.obj : .AUTODEPEND ..\..\src\msw\richtooltip.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_sound.obj : .AUTODEPEND ..\..\src\msw\sound.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_taskbar.obj : .AUTODEPEND ..\..\src\msw\taskbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_joystick.obj : .AUTODEPEND ..\..\src\msw\joystick.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\monolib_animateg.obj : .AUTODEPEND ..\..\src\generic\animateg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +$(OBJS)\basedll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_GUI=0 -dWXMAKINGDLL_BASE -dwxUSE_BASE=1 $< + +$(OBJS)\basedll_any.obj : .AUTODEPEND ..\..\src\common\any.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_appbase.obj : .AUTODEPEND ..\..\src\common\appbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_arcall.obj : .AUTODEPEND ..\..\src\common\arcall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_arcfind.obj : .AUTODEPEND ..\..\src\common\arcfind.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_archive.obj : .AUTODEPEND ..\..\src\common\archive.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_arrstr.obj : .AUTODEPEND ..\..\src\common\arrstr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_base64.obj : .AUTODEPEND ..\..\src\common\base64.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_clntdata.obj : .AUTODEPEND ..\..\src\common\clntdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_cmdline.obj : .AUTODEPEND ..\..\src\common\cmdline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_config.obj : .AUTODEPEND ..\..\src\common\config.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_convauto.obj : .AUTODEPEND ..\..\src\common\convauto.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_datetime.obj : .AUTODEPEND ..\..\src\common\datetime.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_datetimefmt.obj : .AUTODEPEND ..\..\src\common\datetimefmt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_datstrm.obj : .AUTODEPEND ..\..\src\common\datstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_dircmn.obj : .AUTODEPEND ..\..\src\common\dircmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_dynarray.obj : .AUTODEPEND ..\..\src\common\dynarray.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_dynlib.obj : .AUTODEPEND ..\..\src\common\dynlib.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_dynload.obj : .AUTODEPEND ..\..\src\common\dynload.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_encconv.obj : .AUTODEPEND ..\..\src\common\encconv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_evtloopcmn.obj : .AUTODEPEND ..\..\src\common\evtloopcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_extended.obj : .AUTODEPEND ..\..\src\common\extended.c + $(CC) -bt=nt -zq -fo=$^@ $(BASEDLL_CFLAGS) $< + +$(OBJS)\basedll_ffile.obj : .AUTODEPEND ..\..\src\common\ffile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_file.obj : .AUTODEPEND ..\..\src\common\file.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_fileback.obj : .AUTODEPEND ..\..\src\common\fileback.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_fileconf.obj : .AUTODEPEND ..\..\src\common\fileconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_filefn.obj : .AUTODEPEND ..\..\src\common\filefn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_filename.obj : .AUTODEPEND ..\..\src\common\filename.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_filesys.obj : .AUTODEPEND ..\..\src\common\filesys.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_filtall.obj : .AUTODEPEND ..\..\src\common\filtall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_filtfind.obj : .AUTODEPEND ..\..\src\common\filtfind.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_fmapbase.obj : .AUTODEPEND ..\..\src\common\fmapbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_fs_arc.obj : .AUTODEPEND ..\..\src\common\fs_arc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_fs_filter.obj : .AUTODEPEND ..\..\src\common\fs_filter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_hash.obj : .AUTODEPEND ..\..\src\common\hash.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_hashmap.obj : .AUTODEPEND ..\..\src\common\hashmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_init.obj : .AUTODEPEND ..\..\src\common\init.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_intl.obj : .AUTODEPEND ..\..\src\common\intl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_ipcbase.obj : .AUTODEPEND ..\..\src\common\ipcbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_languageinfo.obj : .AUTODEPEND ..\..\src\common\languageinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_list.obj : .AUTODEPEND ..\..\src\common\list.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_log.obj : .AUTODEPEND ..\..\src\common\log.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_longlong.obj : .AUTODEPEND ..\..\src\common\longlong.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_memory.obj : .AUTODEPEND ..\..\src\common\memory.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_mimecmn.obj : .AUTODEPEND ..\..\src\common\mimecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_module.obj : .AUTODEPEND ..\..\src\common\module.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_mstream.obj : .AUTODEPEND ..\..\src\common\mstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_numformatter.obj : .AUTODEPEND ..\..\src\common\numformatter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_object.obj : .AUTODEPEND ..\..\src\common\object.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_platinfo.obj : .AUTODEPEND ..\..\src\common\platinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_powercmn.obj : .AUTODEPEND ..\..\src\common\powercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_process.obj : .AUTODEPEND ..\..\src\common\process.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_regex.obj : .AUTODEPEND ..\..\src\common\regex.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_stdpbase.obj : .AUTODEPEND ..\..\src\common\stdpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_sstream.obj : .AUTODEPEND ..\..\src\common\sstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_stdstream.obj : .AUTODEPEND ..\..\src\common\stdstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_stopwatch.obj : .AUTODEPEND ..\..\src\common\stopwatch.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_strconv.obj : .AUTODEPEND ..\..\src\common\strconv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_stream.obj : .AUTODEPEND ..\..\src\common\stream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_string.obj : .AUTODEPEND ..\..\src\common\string.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_stringimpl.obj : .AUTODEPEND ..\..\src\common\stringimpl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_stringops.obj : .AUTODEPEND ..\..\src\common\stringops.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_strvararg.obj : .AUTODEPEND ..\..\src\common\strvararg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_sysopt.obj : .AUTODEPEND ..\..\src\common\sysopt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_tarstrm.obj : .AUTODEPEND ..\..\src\common\tarstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_textbuf.obj : .AUTODEPEND ..\..\src\common\textbuf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_textfile.obj : .AUTODEPEND ..\..\src\common\textfile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_threadinfo.obj : .AUTODEPEND ..\..\src\common\threadinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_time.obj : .AUTODEPEND ..\..\src\common\time.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_timercmn.obj : .AUTODEPEND ..\..\src\common\timercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_timerimpl.obj : .AUTODEPEND ..\..\src\common\timerimpl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_tokenzr.obj : .AUTODEPEND ..\..\src\common\tokenzr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_translation.obj : .AUTODEPEND ..\..\src\common\translation.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_txtstrm.obj : .AUTODEPEND ..\..\src\common\txtstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_unichar.obj : .AUTODEPEND ..\..\src\common\unichar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_uri.obj : .AUTODEPEND ..\..\src\common\uri.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_ustring.obj : .AUTODEPEND ..\..\src\common\ustring.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_variant.obj : .AUTODEPEND ..\..\src\common\variant.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_wfstream.obj : .AUTODEPEND ..\..\src\common\wfstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_wxcrt.obj : .AUTODEPEND ..\..\src\common\wxcrt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_wxprintf.obj : .AUTODEPEND ..\..\src\common\wxprintf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_xlocale.obj : .AUTODEPEND ..\..\src\common\xlocale.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_xti.obj : .AUTODEPEND ..\..\src\common\xti.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_xtistrm.obj : .AUTODEPEND ..\..\src\common\xtistrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_zipstrm.obj : .AUTODEPEND ..\..\src\common\zipstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_zstream.obj : .AUTODEPEND ..\..\src\common\zstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_fswatchercmn.obj : .AUTODEPEND ..\..\src\common\fswatchercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_fswatcherg.obj : .AUTODEPEND ..\..\src\generic\fswatcherg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_basemsw.obj : .AUTODEPEND ..\..\src\msw\basemsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_crashrpt.obj : .AUTODEPEND ..\..\src\msw\crashrpt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_debughlp.obj : .AUTODEPEND ..\..\src\msw\debughlp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_dde.obj : .AUTODEPEND ..\..\src\msw\dde.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_dir.obj : .AUTODEPEND ..\..\src\msw\dir.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_dlmsw.obj : .AUTODEPEND ..\..\src\msw\dlmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_evtloopconsole.obj : .AUTODEPEND ..\..\src\msw\evtloopconsole.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_mimetype.obj : .AUTODEPEND ..\..\src\msw\mimetype.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_power.obj : .AUTODEPEND ..\..\src\msw\power.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_regconf.obj : .AUTODEPEND ..\..\src\msw\regconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_registry.obj : .AUTODEPEND ..\..\src\msw\registry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_snglinst.obj : .AUTODEPEND ..\..\src\msw\snglinst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_stackwalk.obj : .AUTODEPEND ..\..\src\msw\stackwalk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_thread.obj : .AUTODEPEND ..\..\src\msw\thread.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_timer.obj : .AUTODEPEND ..\..\src\msw\timer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_utils.obj : .AUTODEPEND ..\..\src\msw\utils.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_utilsexc.obj : .AUTODEPEND ..\..\src\msw\utilsexc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_fswatcher.obj : .AUTODEPEND ..\..\src\msw\fswatcher.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_event.obj : .AUTODEPEND ..\..\src\common\event.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_fs_mem.obj : .AUTODEPEND ..\..\src\common\fs_mem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_msgout.obj : .AUTODEPEND ..\..\src\common\msgout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_utilscmn.obj : .AUTODEPEND ..\..\src\common\utilscmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_main.obj : .AUTODEPEND ..\..\src\msw\main.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_mslu.obj : .AUTODEPEND ..\..\src\msw\mslu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\basedll_volume.obj : .AUTODEPEND ..\..\src\msw\volume.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEDLL_CXXFLAGS) $< + +$(OBJS)\baselib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_any.obj : .AUTODEPEND ..\..\src\common\any.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_appbase.obj : .AUTODEPEND ..\..\src\common\appbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_arcall.obj : .AUTODEPEND ..\..\src\common\arcall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_arcfind.obj : .AUTODEPEND ..\..\src\common\arcfind.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_archive.obj : .AUTODEPEND ..\..\src\common\archive.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_arrstr.obj : .AUTODEPEND ..\..\src\common\arrstr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_base64.obj : .AUTODEPEND ..\..\src\common\base64.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_clntdata.obj : .AUTODEPEND ..\..\src\common\clntdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_cmdline.obj : .AUTODEPEND ..\..\src\common\cmdline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_config.obj : .AUTODEPEND ..\..\src\common\config.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_convauto.obj : .AUTODEPEND ..\..\src\common\convauto.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_datetime.obj : .AUTODEPEND ..\..\src\common\datetime.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_datetimefmt.obj : .AUTODEPEND ..\..\src\common\datetimefmt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_datstrm.obj : .AUTODEPEND ..\..\src\common\datstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_dircmn.obj : .AUTODEPEND ..\..\src\common\dircmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_dynarray.obj : .AUTODEPEND ..\..\src\common\dynarray.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_dynlib.obj : .AUTODEPEND ..\..\src\common\dynlib.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_dynload.obj : .AUTODEPEND ..\..\src\common\dynload.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_encconv.obj : .AUTODEPEND ..\..\src\common\encconv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_evtloopcmn.obj : .AUTODEPEND ..\..\src\common\evtloopcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_extended.obj : .AUTODEPEND ..\..\src\common\extended.c + $(CC) -bt=nt -zq -fo=$^@ $(BASELIB_CFLAGS) $< + +$(OBJS)\baselib_ffile.obj : .AUTODEPEND ..\..\src\common\ffile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_file.obj : .AUTODEPEND ..\..\src\common\file.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_fileback.obj : .AUTODEPEND ..\..\src\common\fileback.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_fileconf.obj : .AUTODEPEND ..\..\src\common\fileconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_filefn.obj : .AUTODEPEND ..\..\src\common\filefn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_filename.obj : .AUTODEPEND ..\..\src\common\filename.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_filesys.obj : .AUTODEPEND ..\..\src\common\filesys.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_filtall.obj : .AUTODEPEND ..\..\src\common\filtall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_filtfind.obj : .AUTODEPEND ..\..\src\common\filtfind.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_fmapbase.obj : .AUTODEPEND ..\..\src\common\fmapbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_fs_arc.obj : .AUTODEPEND ..\..\src\common\fs_arc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_fs_filter.obj : .AUTODEPEND ..\..\src\common\fs_filter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_hash.obj : .AUTODEPEND ..\..\src\common\hash.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_hashmap.obj : .AUTODEPEND ..\..\src\common\hashmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_init.obj : .AUTODEPEND ..\..\src\common\init.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_intl.obj : .AUTODEPEND ..\..\src\common\intl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_ipcbase.obj : .AUTODEPEND ..\..\src\common\ipcbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_languageinfo.obj : .AUTODEPEND ..\..\src\common\languageinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_list.obj : .AUTODEPEND ..\..\src\common\list.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_log.obj : .AUTODEPEND ..\..\src\common\log.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_longlong.obj : .AUTODEPEND ..\..\src\common\longlong.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_memory.obj : .AUTODEPEND ..\..\src\common\memory.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_mimecmn.obj : .AUTODEPEND ..\..\src\common\mimecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_module.obj : .AUTODEPEND ..\..\src\common\module.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_mstream.obj : .AUTODEPEND ..\..\src\common\mstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_numformatter.obj : .AUTODEPEND ..\..\src\common\numformatter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_object.obj : .AUTODEPEND ..\..\src\common\object.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_platinfo.obj : .AUTODEPEND ..\..\src\common\platinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_powercmn.obj : .AUTODEPEND ..\..\src\common\powercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_process.obj : .AUTODEPEND ..\..\src\common\process.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_regex.obj : .AUTODEPEND ..\..\src\common\regex.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_stdpbase.obj : .AUTODEPEND ..\..\src\common\stdpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_sstream.obj : .AUTODEPEND ..\..\src\common\sstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_stdstream.obj : .AUTODEPEND ..\..\src\common\stdstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_stopwatch.obj : .AUTODEPEND ..\..\src\common\stopwatch.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_strconv.obj : .AUTODEPEND ..\..\src\common\strconv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_stream.obj : .AUTODEPEND ..\..\src\common\stream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_string.obj : .AUTODEPEND ..\..\src\common\string.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_stringimpl.obj : .AUTODEPEND ..\..\src\common\stringimpl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_stringops.obj : .AUTODEPEND ..\..\src\common\stringops.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_strvararg.obj : .AUTODEPEND ..\..\src\common\strvararg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_sysopt.obj : .AUTODEPEND ..\..\src\common\sysopt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_tarstrm.obj : .AUTODEPEND ..\..\src\common\tarstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_textbuf.obj : .AUTODEPEND ..\..\src\common\textbuf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_textfile.obj : .AUTODEPEND ..\..\src\common\textfile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_threadinfo.obj : .AUTODEPEND ..\..\src\common\threadinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_time.obj : .AUTODEPEND ..\..\src\common\time.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_timercmn.obj : .AUTODEPEND ..\..\src\common\timercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_timerimpl.obj : .AUTODEPEND ..\..\src\common\timerimpl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_tokenzr.obj : .AUTODEPEND ..\..\src\common\tokenzr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_translation.obj : .AUTODEPEND ..\..\src\common\translation.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_txtstrm.obj : .AUTODEPEND ..\..\src\common\txtstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_unichar.obj : .AUTODEPEND ..\..\src\common\unichar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_uri.obj : .AUTODEPEND ..\..\src\common\uri.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_ustring.obj : .AUTODEPEND ..\..\src\common\ustring.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_variant.obj : .AUTODEPEND ..\..\src\common\variant.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_wfstream.obj : .AUTODEPEND ..\..\src\common\wfstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_wxcrt.obj : .AUTODEPEND ..\..\src\common\wxcrt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_wxprintf.obj : .AUTODEPEND ..\..\src\common\wxprintf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_xlocale.obj : .AUTODEPEND ..\..\src\common\xlocale.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_xti.obj : .AUTODEPEND ..\..\src\common\xti.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_xtistrm.obj : .AUTODEPEND ..\..\src\common\xtistrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_zipstrm.obj : .AUTODEPEND ..\..\src\common\zipstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_zstream.obj : .AUTODEPEND ..\..\src\common\zstream.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_fswatchercmn.obj : .AUTODEPEND ..\..\src\common\fswatchercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_fswatcherg.obj : .AUTODEPEND ..\..\src\generic\fswatcherg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_basemsw.obj : .AUTODEPEND ..\..\src\msw\basemsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_crashrpt.obj : .AUTODEPEND ..\..\src\msw\crashrpt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_debughlp.obj : .AUTODEPEND ..\..\src\msw\debughlp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_dde.obj : .AUTODEPEND ..\..\src\msw\dde.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_dir.obj : .AUTODEPEND ..\..\src\msw\dir.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_dlmsw.obj : .AUTODEPEND ..\..\src\msw\dlmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_evtloopconsole.obj : .AUTODEPEND ..\..\src\msw\evtloopconsole.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_mimetype.obj : .AUTODEPEND ..\..\src\msw\mimetype.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_power.obj : .AUTODEPEND ..\..\src\msw\power.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_regconf.obj : .AUTODEPEND ..\..\src\msw\regconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_registry.obj : .AUTODEPEND ..\..\src\msw\registry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_snglinst.obj : .AUTODEPEND ..\..\src\msw\snglinst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_stackwalk.obj : .AUTODEPEND ..\..\src\msw\stackwalk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_stdpaths.obj : .AUTODEPEND ..\..\src\msw\stdpaths.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_thread.obj : .AUTODEPEND ..\..\src\msw\thread.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_timer.obj : .AUTODEPEND ..\..\src\msw\timer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_utils.obj : .AUTODEPEND ..\..\src\msw\utils.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_utilsexc.obj : .AUTODEPEND ..\..\src\msw\utilsexc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_fswatcher.obj : .AUTODEPEND ..\..\src\msw\fswatcher.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_event.obj : .AUTODEPEND ..\..\src\common\event.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_fs_mem.obj : .AUTODEPEND ..\..\src\common\fs_mem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_msgout.obj : .AUTODEPEND ..\..\src\common\msgout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_utilscmn.obj : .AUTODEPEND ..\..\src\common\utilscmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_main.obj : .AUTODEPEND ..\..\src\msw\main.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_mslu.obj : .AUTODEPEND ..\..\src\msw\mslu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\baselib_volume.obj : .AUTODEPEND ..\..\src\msw\volume.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASELIB_CXXFLAGS) $< + +$(OBJS)\netdll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_GUI=0 -dWXUSINGDLL -dWXMAKINGDLL_NET $< + +$(OBJS)\netdll_fs_inet.obj : .AUTODEPEND ..\..\src\common\fs_inet.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_ftp.obj : .AUTODEPEND ..\..\src\common\ftp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_http.obj : .AUTODEPEND ..\..\src\common\http.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_protocol.obj : .AUTODEPEND ..\..\src\common\protocol.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_sckaddr.obj : .AUTODEPEND ..\..\src\common\sckaddr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_sckfile.obj : .AUTODEPEND ..\..\src\common\sckfile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_sckipc.obj : .AUTODEPEND ..\..\src\common\sckipc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_sckstrm.obj : .AUTODEPEND ..\..\src\common\sckstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_socket.obj : .AUTODEPEND ..\..\src\common\socket.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_url.obj : .AUTODEPEND ..\..\src\common\url.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_sockmsw.obj : .AUTODEPEND ..\..\src\msw\sockmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netdll_urlmsw.obj : .AUTODEPEND ..\..\src\msw\urlmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $< + +$(OBJS)\netlib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_fs_inet.obj : .AUTODEPEND ..\..\src\common\fs_inet.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_ftp.obj : .AUTODEPEND ..\..\src\common\ftp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_http.obj : .AUTODEPEND ..\..\src\common\http.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_protocol.obj : .AUTODEPEND ..\..\src\common\protocol.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_sckaddr.obj : .AUTODEPEND ..\..\src\common\sckaddr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_sckfile.obj : .AUTODEPEND ..\..\src\common\sckfile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_sckipc.obj : .AUTODEPEND ..\..\src\common\sckipc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_sckstrm.obj : .AUTODEPEND ..\..\src\common\sckstrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_socket.obj : .AUTODEPEND ..\..\src\common\socket.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_url.obj : .AUTODEPEND ..\..\src\common\url.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_sockmsw.obj : .AUTODEPEND ..\..\src\msw\sockmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\netlib_urlmsw.obj : .AUTODEPEND ..\..\src\msw\urlmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $< + +$(OBJS)\coredll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_CORE -dwxUSE_BASE=0 $< + +$(OBJS)\coredll_event.obj : .AUTODEPEND ..\..\src\common\event.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_fs_mem.obj : .AUTODEPEND ..\..\src\common\fs_mem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msgout.obj : .AUTODEPEND ..\..\src\common\msgout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_utilscmn.obj : .AUTODEPEND ..\..\src\common\utilscmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_main.obj : .AUTODEPEND ..\..\src\msw\main.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_mslu.obj : .AUTODEPEND ..\..\src\msw\mslu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_volume.obj : .AUTODEPEND ..\..\src\msw\volume.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_generic_statusbr.obj : .AUTODEPEND ..\..\src\generic\statusbr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_accel.obj : .AUTODEPEND ..\..\src\msw\accel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_anybutton.obj : .AUTODEPEND ..\..\src\msw\anybutton.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_artmsw.obj : .AUTODEPEND ..\..\src\msw\artmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_bmpbuttn.obj : .AUTODEPEND ..\..\src\msw\bmpbuttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_button.obj : .AUTODEPEND ..\..\src\msw\button.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_checkbox.obj : .AUTODEPEND ..\..\src\msw\checkbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_choice.obj : .AUTODEPEND ..\..\src\msw\choice.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_colordlg.obj : .AUTODEPEND ..\..\src\msw\colordlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_combo.obj : .AUTODEPEND ..\..\src\msw\combo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_combobox.obj : .AUTODEPEND ..\..\src\msw\combobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_control.obj : .AUTODEPEND ..\..\src\msw\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_dialog.obj : .AUTODEPEND ..\..\src\msw\dialog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_dirdlg.obj : .AUTODEPEND ..\..\src\msw\dirdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_dragimag.obj : .AUTODEPEND ..\..\src\msw\dragimag.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_filedlg.obj : .AUTODEPEND ..\..\src\msw\filedlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_frame.obj : .AUTODEPEND ..\..\src\msw\frame.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_gauge.obj : .AUTODEPEND ..\..\src\msw\gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_headerctrl.obj : .AUTODEPEND ..\..\src\msw\headerctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_iniconf.obj : .AUTODEPEND ..\..\src\msw\iniconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_listbox.obj : .AUTODEPEND ..\..\src\msw\listbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_listctrl.obj : .AUTODEPEND ..\..\src\msw\listctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_mdi.obj : .AUTODEPEND ..\..\src\msw\mdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_menu.obj : .AUTODEPEND ..\..\src\msw\menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_menuitem.obj : .AUTODEPEND ..\..\src\msw\menuitem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_metafile.obj : .AUTODEPEND ..\..\src\msw\metafile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msgdlg.obj : .AUTODEPEND ..\..\src\msw\msgdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_nativdlg.obj : .AUTODEPEND ..\..\src\msw\nativdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_nativewin.obj : .AUTODEPEND ..\..\src\msw\nativewin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_notebook.obj : .AUTODEPEND ..\..\src\msw\notebook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_access.obj : .AUTODEPEND ..\..\src\msw\ole\access.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_ownerdrw.obj : .AUTODEPEND ..\..\src\msw\ownerdrw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_panel.obj : .AUTODEPEND ..\..\src\msw\panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_progdlg.obj : .AUTODEPEND ..\..\src\msw\progdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_radiobox.obj : .AUTODEPEND ..\..\src\msw\radiobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_radiobut.obj : .AUTODEPEND ..\..\src\msw\radiobut.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_richmsgdlg.obj : .AUTODEPEND ..\..\src\msw\richmsgdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_scrolbar.obj : .AUTODEPEND ..\..\src\msw\scrolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_slider.obj : .AUTODEPEND ..\..\src\msw\slider.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_spinbutt.obj : .AUTODEPEND ..\..\src\msw\spinbutt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_spinctrl.obj : .AUTODEPEND ..\..\src\msw\spinctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_statbmp.obj : .AUTODEPEND ..\..\src\msw\statbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_statbox.obj : .AUTODEPEND ..\..\src\msw\statbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_statusbar.obj : .AUTODEPEND ..\..\src\msw\statusbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_statline.obj : .AUTODEPEND ..\..\src\msw\statline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_stattext.obj : .AUTODEPEND ..\..\src\msw\stattext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_toolbar.obj : .AUTODEPEND ..\..\src\msw\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_textctrl.obj : .AUTODEPEND ..\..\src\msw\textctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_textentry.obj : .AUTODEPEND ..\..\src\msw\textentry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_tglbtn.obj : .AUTODEPEND ..\..\src\msw\tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_treectrl.obj : .AUTODEPEND ..\..\src\msw\treectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_checklst.obj : .AUTODEPEND ..\..\src\msw\checklst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_msw_fdrepdlg.obj : .AUTODEPEND ..\..\src\msw\fdrepdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_fontdlg.obj : .AUTODEPEND ..\..\src\msw\fontdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_generic_accel.obj : .AUTODEPEND ..\..\src\generic\accel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_colrdlgg.obj : .AUTODEPEND ..\..\src\generic\colrdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_dirdlgg.obj : .AUTODEPEND ..\..\src\generic\dirdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_generic_fdrepdlg.obj : .AUTODEPEND ..\..\src\generic\fdrepdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_filedlgg.obj : .AUTODEPEND ..\..\src\generic\filedlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_fontdlgg.obj : .AUTODEPEND ..\..\src\generic\fontdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_generic_listctrl.obj : .AUTODEPEND ..\..\src\generic\listctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_mdig.obj : .AUTODEPEND ..\..\src\generic\mdig.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_bmpbuttn.obj : .AUTODEPEND ..\..\src\univ\bmpbuttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_button.obj : .AUTODEPEND ..\..\src\univ\button.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_checkbox.obj : .AUTODEPEND ..\..\src\univ\checkbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_checklst.obj : .AUTODEPEND ..\..\src\univ\checklst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_choice.obj : .AUTODEPEND ..\..\src\univ\choice.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_combobox.obj : .AUTODEPEND ..\..\src\univ\combobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_control.obj : .AUTODEPEND ..\..\src\univ\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_ctrlrend.obj : .AUTODEPEND ..\..\src\univ\ctrlrend.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_dialog.obj : .AUTODEPEND ..\..\src\univ\dialog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_framuniv.obj : .AUTODEPEND ..\..\src\univ\framuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_gauge.obj : .AUTODEPEND ..\..\src\univ\gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_inpcons.obj : .AUTODEPEND ..\..\src\univ\inpcons.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_inphand.obj : .AUTODEPEND ..\..\src\univ\inphand.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_listbox.obj : .AUTODEPEND ..\..\src\univ\listbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_menu.obj : .AUTODEPEND ..\..\src\univ\menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_notebook.obj : .AUTODEPEND ..\..\src\univ\notebook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_radiobox.obj : .AUTODEPEND ..\..\src\univ\radiobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_radiobut.obj : .AUTODEPEND ..\..\src\univ\radiobut.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_scrarrow.obj : .AUTODEPEND ..\..\src\univ\scrarrow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_scrolbar.obj : .AUTODEPEND ..\..\src\univ\scrolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_scrthumb.obj : .AUTODEPEND ..\..\src\univ\scrthumb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_settingsuniv.obj : .AUTODEPEND ..\..\src\univ\settingsuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_slider.obj : .AUTODEPEND ..\..\src\univ\slider.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_spinbutt.obj : .AUTODEPEND ..\..\src\univ\spinbutt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_statbmp.obj : .AUTODEPEND ..\..\src\univ\statbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_statbox.obj : .AUTODEPEND ..\..\src\univ\statbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_statline.obj : .AUTODEPEND ..\..\src\univ\statline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_stattext.obj : .AUTODEPEND ..\..\src\univ\stattext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_statusbr.obj : .AUTODEPEND ..\..\src\univ\statusbr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_stdrend.obj : .AUTODEPEND ..\..\src\univ\stdrend.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_textctrl.obj : .AUTODEPEND ..\..\src\univ\textctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_tglbtn.obj : .AUTODEPEND ..\..\src\univ\tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_theme.obj : .AUTODEPEND ..\..\src\univ\theme.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_univ_toolbar.obj : .AUTODEPEND ..\..\src\univ\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_topluniv.obj : .AUTODEPEND ..\..\src\univ\topluniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_winuniv.obj : .AUTODEPEND ..\..\src\univ\winuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_gtk.obj : .AUTODEPEND ..\..\src\univ\themes\gtk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_metal.obj : .AUTODEPEND ..\..\src\univ\themes\metal.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_mono.obj : .AUTODEPEND ..\..\src\univ\themes\mono.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +$(OBJS)\coredll_win32.obj : .AUTODEPEND ..\..\src\univ\themes\win32.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< + +!ifeq USE_GUI 1 +$(OBJS)\coredll_activex.obj : .AUTODEPEND ..\..\src\msw\ole\activex.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_app.obj : .AUTODEPEND ..\..\src\msw\app.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_bitmap.obj : .AUTODEPEND ..\..\src\msw\bitmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_brush.obj : .AUTODEPEND ..\..\src\msw\brush.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_caret.obj : .AUTODEPEND ..\..\src\msw\caret.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_clipbrd.obj : .AUTODEPEND ..\..\src\msw\clipbrd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_colour.obj : .AUTODEPEND ..\..\src\msw\colour.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_cursor.obj : .AUTODEPEND ..\..\src\msw\cursor.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_data.obj : .AUTODEPEND ..\..\src\msw\data.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dc.obj : .AUTODEPEND ..\..\src\msw\dc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dcclient.obj : .AUTODEPEND ..\..\src\msw\dcclient.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dcmemory.obj : .AUTODEPEND ..\..\src\msw\dcmemory.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dcprint.obj : .AUTODEPEND ..\..\src\msw\dcprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dcscreen.obj : .AUTODEPEND ..\..\src\msw\dcscreen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dialup.obj : .AUTODEPEND ..\..\src\msw\dialup.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dib.obj : .AUTODEPEND ..\..\src\msw\dib.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_display.obj : .AUTODEPEND ..\..\src\msw\display.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_enhmeta.obj : .AUTODEPEND ..\..\src\msw\enhmeta.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_font.obj : .AUTODEPEND ..\..\src\msw\font.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_fontenum.obj : .AUTODEPEND ..\..\src\msw\fontenum.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_fontutil.obj : .AUTODEPEND ..\..\src\msw\fontutil.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_gdiimage.obj : .AUTODEPEND ..\..\src\msw\gdiimage.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_gdiobj.obj : .AUTODEPEND ..\..\src\msw\gdiobj.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_gdiplus.obj : .AUTODEPEND ..\..\src\msw\gdiplus.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_graphics.obj : .AUTODEPEND ..\..\src\msw\graphics.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_icon.obj : .AUTODEPEND ..\..\src\msw\icon.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imaglist.obj : .AUTODEPEND ..\..\src\msw\imaglist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_minifram.obj : .AUTODEPEND ..\..\src\msw\minifram.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_nonownedwnd.obj : .AUTODEPEND ..\..\src\msw\nonownedwnd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dataobj.obj : .AUTODEPEND ..\..\src\msw\ole\dataobj.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dropsrc.obj : .AUTODEPEND ..\..\src\msw\ole\dropsrc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_droptgt.obj : .AUTODEPEND ..\..\src\msw\ole\droptgt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_oleutils.obj : .AUTODEPEND ..\..\src\msw\ole\oleutils.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_safearray.obj : .AUTODEPEND ..\..\src\msw\ole\safearray.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_palette.obj : .AUTODEPEND ..\..\src\msw\palette.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_pen.obj : .AUTODEPEND ..\..\src\msw\pen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_popupwin.obj : .AUTODEPEND ..\..\src\msw\popupwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_printdlg.obj : .AUTODEPEND ..\..\src\msw\printdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_printwin.obj : .AUTODEPEND ..\..\src\msw\printwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_region.obj : .AUTODEPEND ..\..\src\msw\region.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_renderer.obj : .AUTODEPEND ..\..\src\msw\renderer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_settings.obj : .AUTODEPEND ..\..\src\msw\settings.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_textmeasure.obj : .AUTODEPEND ..\..\src\msw\textmeasure.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_tooltip.obj : .AUTODEPEND ..\..\src\msw\tooltip.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_toplevel.obj : .AUTODEPEND ..\..\src\msw\toplevel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_uiaction.obj : .AUTODEPEND ..\..\src\msw\uiaction.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_utilsgui.obj : .AUTODEPEND ..\..\src\msw\utilsgui.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_utilswin.obj : .AUTODEPEND ..\..\src\msw\utilswin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_uxtheme.obj : .AUTODEPEND ..\..\src\msw\uxtheme.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_window.obj : .AUTODEPEND ..\..\src\msw\window.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_helpchm.obj : .AUTODEPEND ..\..\src\msw\helpchm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_helpwin.obj : .AUTODEPEND ..\..\src\msw\helpwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_automtn.obj : .AUTODEPEND ..\..\src\msw\ole\automtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_uuid.obj : .AUTODEPEND ..\..\src\msw\ole\uuid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_clrpickerg.obj : .AUTODEPEND ..\..\src\generic\clrpickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_collpaneg.obj : .AUTODEPEND ..\..\src\generic\collpaneg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_filepickerg.obj : .AUTODEPEND ..\..\src\generic\filepickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_fontpickerg.obj : .AUTODEPEND ..\..\src\generic\fontpickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_prntdlgg.obj : .AUTODEPEND ..\..\src\generic\prntdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_evtloop.obj : .AUTODEPEND ..\..\src\msw\evtloop.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_accelcmn.obj : .AUTODEPEND ..\..\src\common\accelcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_accesscmn.obj : .AUTODEPEND ..\..\src\common\accesscmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_anidecod.obj : .AUTODEPEND ..\..\src\common\anidecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_affinematrix2d.obj : .AUTODEPEND ..\..\src\common\affinematrix2d.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_appcmn.obj : .AUTODEPEND ..\..\src\common\appcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_artprov.obj : .AUTODEPEND ..\..\src\common\artprov.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_artstd.obj : .AUTODEPEND ..\..\src\common\artstd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_bmpbase.obj : .AUTODEPEND ..\..\src\common\bmpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_bmpbtncmn.obj : .AUTODEPEND ..\..\src\common\bmpbtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_bookctrl.obj : .AUTODEPEND ..\..\src\common\bookctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_btncmn.obj : .AUTODEPEND ..\..\src\common\btncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_cairo.obj : .AUTODEPEND ..\..\src\common\cairo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_checkboxcmn.obj : .AUTODEPEND ..\..\src\common\checkboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_checklstcmn.obj : .AUTODEPEND ..\..\src\common\checklstcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_choiccmn.obj : .AUTODEPEND ..\..\src\common\choiccmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_clipcmn.obj : .AUTODEPEND ..\..\src\common\clipcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_clrpickercmn.obj : .AUTODEPEND ..\..\src\common\clrpickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_colourcmn.obj : .AUTODEPEND ..\..\src\common\colourcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_colourdata.obj : .AUTODEPEND ..\..\src\common\colourdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_combocmn.obj : .AUTODEPEND ..\..\src\common\combocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_cmdproc.obj : .AUTODEPEND ..\..\src\common\cmdproc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_cmndata.obj : .AUTODEPEND ..\..\src\common\cmndata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_containr.obj : .AUTODEPEND ..\..\src\common\containr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_cshelp.obj : .AUTODEPEND ..\..\src\common\cshelp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_ctrlcmn.obj : .AUTODEPEND ..\..\src\common\ctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_ctrlsub.obj : .AUTODEPEND ..\..\src\common\ctrlsub.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dcbase.obj : .AUTODEPEND ..\..\src\common\dcbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dcbufcmn.obj : .AUTODEPEND ..\..\src\common\dcbufcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dcgraph.obj : .AUTODEPEND ..\..\src\common\dcgraph.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dcsvg.obj : .AUTODEPEND ..\..\src\common\dcsvg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dirctrlcmn.obj : .AUTODEPEND ..\..\src\common\dirctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dlgcmn.obj : .AUTODEPEND ..\..\src\common\dlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dndcmn.obj : .AUTODEPEND ..\..\src\common\dndcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dobjcmn.obj : .AUTODEPEND ..\..\src\common\dobjcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_docmdi.obj : .AUTODEPEND ..\..\src\common\docmdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_docview.obj : .AUTODEPEND ..\..\src\common\docview.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dpycmn.obj : .AUTODEPEND ..\..\src\common\dpycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dseldlg.obj : .AUTODEPEND ..\..\src\common\dseldlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_effects.obj : .AUTODEPEND ..\..\src\common\effects.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_fddlgcmn.obj : .AUTODEPEND ..\..\src\common\fddlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_filectrlcmn.obj : .AUTODEPEND ..\..\src\common\filectrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_filehistorycmn.obj : .AUTODEPEND ..\..\src\common\filehistorycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_filepickercmn.obj : .AUTODEPEND ..\..\src\common\filepickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_fontpickercmn.obj : .AUTODEPEND ..\..\src\common\fontpickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_fldlgcmn.obj : .AUTODEPEND ..\..\src\common\fldlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_fontcmn.obj : .AUTODEPEND ..\..\src\common\fontcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_fontdata.obj : .AUTODEPEND ..\..\src\common\fontdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_graphicc.obj : .AUTODEPEND ..\..\src\generic\graphicc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_fontenumcmn.obj : .AUTODEPEND ..\..\src\common\fontenumcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_fontmap.obj : .AUTODEPEND ..\..\src\common\fontmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_fontutilcmn.obj : .AUTODEPEND ..\..\src\common\fontutilcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_framecmn.obj : .AUTODEPEND ..\..\src\common\framecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_gaugecmn.obj : .AUTODEPEND ..\..\src\common\gaugecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_gbsizer.obj : .AUTODEPEND ..\..\src\common\gbsizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_gdicmn.obj : .AUTODEPEND ..\..\src\common\gdicmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_geometry.obj : .AUTODEPEND ..\..\src\common\geometry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_gifdecod.obj : .AUTODEPEND ..\..\src\common\gifdecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_graphcmn.obj : .AUTODEPEND ..\..\src\common\graphcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_headercolcmn.obj : .AUTODEPEND ..\..\src\common\headercolcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_headerctrlcmn.obj : .AUTODEPEND ..\..\src\common\headerctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_helpbase.obj : .AUTODEPEND ..\..\src\common\helpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_iconbndl.obj : .AUTODEPEND ..\..\src\common\iconbndl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imagall.obj : .AUTODEPEND ..\..\src\common\imagall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imagbmp.obj : .AUTODEPEND ..\..\src\common\imagbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_image.obj : .AUTODEPEND ..\..\src\common\image.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imagfill.obj : .AUTODEPEND ..\..\src\common\imagfill.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imaggif.obj : .AUTODEPEND ..\..\src\common\imaggif.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imagiff.obj : .AUTODEPEND ..\..\src\common\imagiff.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imagjpeg.obj : .AUTODEPEND ..\..\src\common\imagjpeg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imagpcx.obj : .AUTODEPEND ..\..\src\common\imagpcx.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imagpng.obj : .AUTODEPEND ..\..\src\common\imagpng.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imagpnm.obj : .AUTODEPEND ..\..\src\common\imagpnm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imagtga.obj : .AUTODEPEND ..\..\src\common\imagtga.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imagtiff.obj : .AUTODEPEND ..\..\src\common\imagtiff.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_imagxpm.obj : .AUTODEPEND ..\..\src\common\imagxpm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_layout.obj : .AUTODEPEND ..\..\src\common\layout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_lboxcmn.obj : .AUTODEPEND ..\..\src\common\lboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_listctrlcmn.obj : .AUTODEPEND ..\..\src\common\listctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_markupparser.obj : .AUTODEPEND ..\..\src\common\markupparser.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_matrix.obj : .AUTODEPEND ..\..\src\common\matrix.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_menucmn.obj : .AUTODEPEND ..\..\src\common\menucmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_modalhook.obj : .AUTODEPEND ..\..\src\common\modalhook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_mousemanager.obj : .AUTODEPEND ..\..\src\common\mousemanager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_nbkbase.obj : .AUTODEPEND ..\..\src\common\nbkbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_overlaycmn.obj : .AUTODEPEND ..\..\src\common\overlaycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_ownerdrwcmn.obj : .AUTODEPEND ..\..\src\common\ownerdrwcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_paper.obj : .AUTODEPEND ..\..\src\common\paper.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_panelcmn.obj : .AUTODEPEND ..\..\src\common\panelcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_persist.obj : .AUTODEPEND ..\..\src\common\persist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_pickerbase.obj : .AUTODEPEND ..\..\src\common\pickerbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_popupcmn.obj : .AUTODEPEND ..\..\src\common\popupcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_preferencescmn.obj : .AUTODEPEND ..\..\src\common\preferencescmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_prntbase.obj : .AUTODEPEND ..\..\src\common\prntbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_quantize.obj : .AUTODEPEND ..\..\src\common\quantize.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_radiobtncmn.obj : .AUTODEPEND ..\..\src\common\radiobtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_radiocmn.obj : .AUTODEPEND ..\..\src\common\radiocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_rearrangectrl.obj : .AUTODEPEND ..\..\src\common\rearrangectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_rendcmn.obj : .AUTODEPEND ..\..\src\common\rendcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_rgncmn.obj : .AUTODEPEND ..\..\src\common\rgncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_scrolbarcmn.obj : .AUTODEPEND ..\..\src\common\scrolbarcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_settcmn.obj : .AUTODEPEND ..\..\src\common\settcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_sizer.obj : .AUTODEPEND ..\..\src\common\sizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_slidercmn.obj : .AUTODEPEND ..\..\src\common\slidercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_spinbtncmn.obj : .AUTODEPEND ..\..\src\common\spinbtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_spinctrlcmn.obj : .AUTODEPEND ..\..\src\common\spinctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_srchcmn.obj : .AUTODEPEND ..\..\src\common\srchcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_statbar.obj : .AUTODEPEND ..\..\src\common\statbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_statbmpcmn.obj : .AUTODEPEND ..\..\src\common\statbmpcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_statboxcmn.obj : .AUTODEPEND ..\..\src\common\statboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_statlinecmn.obj : .AUTODEPEND ..\..\src\common\statlinecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_stattextcmn.obj : .AUTODEPEND ..\..\src\common\stattextcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_stockitem.obj : .AUTODEPEND ..\..\src\common\stockitem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_tbarbase.obj : .AUTODEPEND ..\..\src\common\tbarbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_textcmn.obj : .AUTODEPEND ..\..\src\common\textcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_textentrycmn.obj : .AUTODEPEND ..\..\src\common\textentrycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_textmeasurecmn.obj : .AUTODEPEND ..\..\src\common\textmeasurecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_toplvcmn.obj : .AUTODEPEND ..\..\src\common\toplvcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_treebase.obj : .AUTODEPEND ..\..\src\common\treebase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_uiactioncmn.obj : .AUTODEPEND ..\..\src\common\uiactioncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_valgen.obj : .AUTODEPEND ..\..\src\common\valgen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_validate.obj : .AUTODEPEND ..\..\src\common\validate.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_valtext.obj : .AUTODEPEND ..\..\src\common\valtext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_valnum.obj : .AUTODEPEND ..\..\src\common\valnum.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_wincmn.obj : .AUTODEPEND ..\..\src\common\wincmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_windowid.obj : .AUTODEPEND ..\..\src\common\windowid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_wrapsizer.obj : .AUTODEPEND ..\..\src\common\wrapsizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_xpmdecod.obj : .AUTODEPEND ..\..\src\common\xpmdecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_busyinfo.obj : .AUTODEPEND ..\..\src\generic\busyinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_buttonbar.obj : .AUTODEPEND ..\..\src\generic\buttonbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_choicdgg.obj : .AUTODEPEND ..\..\src\generic\choicdgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_choicbkg.obj : .AUTODEPEND ..\..\src\generic\choicbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_combog.obj : .AUTODEPEND ..\..\src\generic\combog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dcpsg.obj : .AUTODEPEND ..\..\src\generic\dcpsg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dirctrlg.obj : .AUTODEPEND ..\..\src\generic\dirctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_dragimgg.obj : .AUTODEPEND ..\..\src\generic\dragimgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_filectrlg.obj : .AUTODEPEND ..\..\src\generic\filectrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_headerctrlg.obj : .AUTODEPEND ..\..\src\generic\headerctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_infobar.obj : .AUTODEPEND ..\..\src\generic\infobar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_listbkg.obj : .AUTODEPEND ..\..\src\generic\listbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_logg.obj : .AUTODEPEND ..\..\src\generic\logg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_markuptext.obj : .AUTODEPEND ..\..\src\generic\markuptext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_msgdlgg.obj : .AUTODEPEND ..\..\src\generic\msgdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_numdlgg.obj : .AUTODEPEND ..\..\src\generic\numdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_progdlgg.obj : .AUTODEPEND ..\..\src\generic\progdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_preferencesg.obj : .AUTODEPEND ..\..\src\generic\preferencesg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_printps.obj : .AUTODEPEND ..\..\src\generic\printps.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_renderg.obj : .AUTODEPEND ..\..\src\generic\renderg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_richmsgdlgg.obj : .AUTODEPEND ..\..\src\generic\richmsgdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_scrlwing.obj : .AUTODEPEND ..\..\src\generic\scrlwing.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_selstore.obj : .AUTODEPEND ..\..\src\generic\selstore.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_spinctlg.obj : .AUTODEPEND ..\..\src\generic\spinctlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_splitter.obj : .AUTODEPEND ..\..\src\generic\splitter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_srchctlg.obj : .AUTODEPEND ..\..\src\generic\srchctlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_statbmpg.obj : .AUTODEPEND ..\..\src\generic\statbmpg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_stattextg.obj : .AUTODEPEND ..\..\src\generic\stattextg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_textdlgg.obj : .AUTODEPEND ..\..\src\generic\textdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_tipwin.obj : .AUTODEPEND ..\..\src\generic\tipwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_toolbkg.obj : .AUTODEPEND ..\..\src\generic\toolbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_treectlg.obj : .AUTODEPEND ..\..\src\generic\treectlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_treebkg.obj : .AUTODEPEND ..\..\src\generic\treebkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_vlbox.obj : .AUTODEPEND ..\..\src\generic\vlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_vscroll.obj : .AUTODEPEND ..\..\src\generic\vscroll.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\coredll_xmlreshandler.obj : .AUTODEPEND ..\..\src\xrc\xmlreshandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +$(OBJS)\corelib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_event.obj : .AUTODEPEND ..\..\src\common\event.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_fs_mem.obj : .AUTODEPEND ..\..\src\common\fs_mem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msgout.obj : .AUTODEPEND ..\..\src\common\msgout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_utilscmn.obj : .AUTODEPEND ..\..\src\common\utilscmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_main.obj : .AUTODEPEND ..\..\src\msw\main.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_mslu.obj : .AUTODEPEND ..\..\src\msw\mslu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_volume.obj : .AUTODEPEND ..\..\src\msw\volume.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_generic_statusbr.obj : .AUTODEPEND ..\..\src\generic\statusbr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_accel.obj : .AUTODEPEND ..\..\src\msw\accel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_anybutton.obj : .AUTODEPEND ..\..\src\msw\anybutton.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_artmsw.obj : .AUTODEPEND ..\..\src\msw\artmsw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_bmpbuttn.obj : .AUTODEPEND ..\..\src\msw\bmpbuttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_button.obj : .AUTODEPEND ..\..\src\msw\button.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_checkbox.obj : .AUTODEPEND ..\..\src\msw\checkbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_choice.obj : .AUTODEPEND ..\..\src\msw\choice.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_colordlg.obj : .AUTODEPEND ..\..\src\msw\colordlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_combo.obj : .AUTODEPEND ..\..\src\msw\combo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_combobox.obj : .AUTODEPEND ..\..\src\msw\combobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_control.obj : .AUTODEPEND ..\..\src\msw\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_dialog.obj : .AUTODEPEND ..\..\src\msw\dialog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_dirdlg.obj : .AUTODEPEND ..\..\src\msw\dirdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_dragimag.obj : .AUTODEPEND ..\..\src\msw\dragimag.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_filedlg.obj : .AUTODEPEND ..\..\src\msw\filedlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_frame.obj : .AUTODEPEND ..\..\src\msw\frame.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_gauge.obj : .AUTODEPEND ..\..\src\msw\gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_headerctrl.obj : .AUTODEPEND ..\..\src\msw\headerctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_iniconf.obj : .AUTODEPEND ..\..\src\msw\iniconf.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_listbox.obj : .AUTODEPEND ..\..\src\msw\listbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_listctrl.obj : .AUTODEPEND ..\..\src\msw\listctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_mdi.obj : .AUTODEPEND ..\..\src\msw\mdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_menu.obj : .AUTODEPEND ..\..\src\msw\menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_menuitem.obj : .AUTODEPEND ..\..\src\msw\menuitem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_metafile.obj : .AUTODEPEND ..\..\src\msw\metafile.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msgdlg.obj : .AUTODEPEND ..\..\src\msw\msgdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_nativdlg.obj : .AUTODEPEND ..\..\src\msw\nativdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_nativewin.obj : .AUTODEPEND ..\..\src\msw\nativewin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_notebook.obj : .AUTODEPEND ..\..\src\msw\notebook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_access.obj : .AUTODEPEND ..\..\src\msw\ole\access.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_ownerdrw.obj : .AUTODEPEND ..\..\src\msw\ownerdrw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_panel.obj : .AUTODEPEND ..\..\src\msw\panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_progdlg.obj : .AUTODEPEND ..\..\src\msw\progdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_radiobox.obj : .AUTODEPEND ..\..\src\msw\radiobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_radiobut.obj : .AUTODEPEND ..\..\src\msw\radiobut.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_richmsgdlg.obj : .AUTODEPEND ..\..\src\msw\richmsgdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_scrolbar.obj : .AUTODEPEND ..\..\src\msw\scrolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_slider.obj : .AUTODEPEND ..\..\src\msw\slider.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_spinbutt.obj : .AUTODEPEND ..\..\src\msw\spinbutt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_spinctrl.obj : .AUTODEPEND ..\..\src\msw\spinctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_statbmp.obj : .AUTODEPEND ..\..\src\msw\statbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_statbox.obj : .AUTODEPEND ..\..\src\msw\statbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_statusbar.obj : .AUTODEPEND ..\..\src\msw\statusbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_statline.obj : .AUTODEPEND ..\..\src\msw\statline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_stattext.obj : .AUTODEPEND ..\..\src\msw\stattext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_toolbar.obj : .AUTODEPEND ..\..\src\msw\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_textctrl.obj : .AUTODEPEND ..\..\src\msw\textctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_textentry.obj : .AUTODEPEND ..\..\src\msw\textentry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_tglbtn.obj : .AUTODEPEND ..\..\src\msw\tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_treectrl.obj : .AUTODEPEND ..\..\src\msw\treectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_checklst.obj : .AUTODEPEND ..\..\src\msw\checklst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_msw_fdrepdlg.obj : .AUTODEPEND ..\..\src\msw\fdrepdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_fontdlg.obj : .AUTODEPEND ..\..\src\msw\fontdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_generic_accel.obj : .AUTODEPEND ..\..\src\generic\accel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_colrdlgg.obj : .AUTODEPEND ..\..\src\generic\colrdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_dirdlgg.obj : .AUTODEPEND ..\..\src\generic\dirdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_generic_fdrepdlg.obj : .AUTODEPEND ..\..\src\generic\fdrepdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_filedlgg.obj : .AUTODEPEND ..\..\src\generic\filedlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_fontdlgg.obj : .AUTODEPEND ..\..\src\generic\fontdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_generic_listctrl.obj : .AUTODEPEND ..\..\src\generic\listctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_mdig.obj : .AUTODEPEND ..\..\src\generic\mdig.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_bmpbuttn.obj : .AUTODEPEND ..\..\src\univ\bmpbuttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_button.obj : .AUTODEPEND ..\..\src\univ\button.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_checkbox.obj : .AUTODEPEND ..\..\src\univ\checkbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_checklst.obj : .AUTODEPEND ..\..\src\univ\checklst.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_choice.obj : .AUTODEPEND ..\..\src\univ\choice.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_combobox.obj : .AUTODEPEND ..\..\src\univ\combobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_control.obj : .AUTODEPEND ..\..\src\univ\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_ctrlrend.obj : .AUTODEPEND ..\..\src\univ\ctrlrend.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_dialog.obj : .AUTODEPEND ..\..\src\univ\dialog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_framuniv.obj : .AUTODEPEND ..\..\src\univ\framuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_gauge.obj : .AUTODEPEND ..\..\src\univ\gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_inpcons.obj : .AUTODEPEND ..\..\src\univ\inpcons.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_inphand.obj : .AUTODEPEND ..\..\src\univ\inphand.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_listbox.obj : .AUTODEPEND ..\..\src\univ\listbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_menu.obj : .AUTODEPEND ..\..\src\univ\menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_notebook.obj : .AUTODEPEND ..\..\src\univ\notebook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_radiobox.obj : .AUTODEPEND ..\..\src\univ\radiobox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_radiobut.obj : .AUTODEPEND ..\..\src\univ\radiobut.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_scrarrow.obj : .AUTODEPEND ..\..\src\univ\scrarrow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_scrolbar.obj : .AUTODEPEND ..\..\src\univ\scrolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_scrthumb.obj : .AUTODEPEND ..\..\src\univ\scrthumb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_settingsuniv.obj : .AUTODEPEND ..\..\src\univ\settingsuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_slider.obj : .AUTODEPEND ..\..\src\univ\slider.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_spinbutt.obj : .AUTODEPEND ..\..\src\univ\spinbutt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_statbmp.obj : .AUTODEPEND ..\..\src\univ\statbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_statbox.obj : .AUTODEPEND ..\..\src\univ\statbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_statline.obj : .AUTODEPEND ..\..\src\univ\statline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_stattext.obj : .AUTODEPEND ..\..\src\univ\stattext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_statusbr.obj : .AUTODEPEND ..\..\src\univ\statusbr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_stdrend.obj : .AUTODEPEND ..\..\src\univ\stdrend.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_textctrl.obj : .AUTODEPEND ..\..\src\univ\textctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_tglbtn.obj : .AUTODEPEND ..\..\src\univ\tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_theme.obj : .AUTODEPEND ..\..\src\univ\theme.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_univ_toolbar.obj : .AUTODEPEND ..\..\src\univ\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_topluniv.obj : .AUTODEPEND ..\..\src\univ\topluniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_winuniv.obj : .AUTODEPEND ..\..\src\univ\winuniv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_gtk.obj : .AUTODEPEND ..\..\src\univ\themes\gtk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_metal.obj : .AUTODEPEND ..\..\src\univ\themes\metal.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_mono.obj : .AUTODEPEND ..\..\src\univ\themes\mono.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +$(OBJS)\corelib_win32.obj : .AUTODEPEND ..\..\src\univ\themes\win32.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< + +!ifeq USE_GUI 1 +$(OBJS)\corelib_activex.obj : .AUTODEPEND ..\..\src\msw\ole\activex.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_app.obj : .AUTODEPEND ..\..\src\msw\app.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_bitmap.obj : .AUTODEPEND ..\..\src\msw\bitmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_brush.obj : .AUTODEPEND ..\..\src\msw\brush.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_caret.obj : .AUTODEPEND ..\..\src\msw\caret.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_clipbrd.obj : .AUTODEPEND ..\..\src\msw\clipbrd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_colour.obj : .AUTODEPEND ..\..\src\msw\colour.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_cursor.obj : .AUTODEPEND ..\..\src\msw\cursor.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_data.obj : .AUTODEPEND ..\..\src\msw\data.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dc.obj : .AUTODEPEND ..\..\src\msw\dc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dcclient.obj : .AUTODEPEND ..\..\src\msw\dcclient.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dcmemory.obj : .AUTODEPEND ..\..\src\msw\dcmemory.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dcprint.obj : .AUTODEPEND ..\..\src\msw\dcprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dcscreen.obj : .AUTODEPEND ..\..\src\msw\dcscreen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dialup.obj : .AUTODEPEND ..\..\src\msw\dialup.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dib.obj : .AUTODEPEND ..\..\src\msw\dib.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_display.obj : .AUTODEPEND ..\..\src\msw\display.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_enhmeta.obj : .AUTODEPEND ..\..\src\msw\enhmeta.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_font.obj : .AUTODEPEND ..\..\src\msw\font.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_fontenum.obj : .AUTODEPEND ..\..\src\msw\fontenum.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_fontutil.obj : .AUTODEPEND ..\..\src\msw\fontutil.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_gdiimage.obj : .AUTODEPEND ..\..\src\msw\gdiimage.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_gdiobj.obj : .AUTODEPEND ..\..\src\msw\gdiobj.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_gdiplus.obj : .AUTODEPEND ..\..\src\msw\gdiplus.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_graphics.obj : .AUTODEPEND ..\..\src\msw\graphics.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_icon.obj : .AUTODEPEND ..\..\src\msw\icon.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imaglist.obj : .AUTODEPEND ..\..\src\msw\imaglist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_minifram.obj : .AUTODEPEND ..\..\src\msw\minifram.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_nonownedwnd.obj : .AUTODEPEND ..\..\src\msw\nonownedwnd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dataobj.obj : .AUTODEPEND ..\..\src\msw\ole\dataobj.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dropsrc.obj : .AUTODEPEND ..\..\src\msw\ole\dropsrc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_droptgt.obj : .AUTODEPEND ..\..\src\msw\ole\droptgt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_oleutils.obj : .AUTODEPEND ..\..\src\msw\ole\oleutils.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_safearray.obj : .AUTODEPEND ..\..\src\msw\ole\safearray.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_palette.obj : .AUTODEPEND ..\..\src\msw\palette.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_pen.obj : .AUTODEPEND ..\..\src\msw\pen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_popupwin.obj : .AUTODEPEND ..\..\src\msw\popupwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_printdlg.obj : .AUTODEPEND ..\..\src\msw\printdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_printwin.obj : .AUTODEPEND ..\..\src\msw\printwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_region.obj : .AUTODEPEND ..\..\src\msw\region.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_renderer.obj : .AUTODEPEND ..\..\src\msw\renderer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_settings.obj : .AUTODEPEND ..\..\src\msw\settings.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_textmeasure.obj : .AUTODEPEND ..\..\src\msw\textmeasure.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_tooltip.obj : .AUTODEPEND ..\..\src\msw\tooltip.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_toplevel.obj : .AUTODEPEND ..\..\src\msw\toplevel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_uiaction.obj : .AUTODEPEND ..\..\src\msw\uiaction.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_utilsgui.obj : .AUTODEPEND ..\..\src\msw\utilsgui.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_utilswin.obj : .AUTODEPEND ..\..\src\msw\utilswin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_uxtheme.obj : .AUTODEPEND ..\..\src\msw\uxtheme.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_window.obj : .AUTODEPEND ..\..\src\msw\window.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_helpchm.obj : .AUTODEPEND ..\..\src\msw\helpchm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_helpwin.obj : .AUTODEPEND ..\..\src\msw\helpwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_automtn.obj : .AUTODEPEND ..\..\src\msw\ole\automtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_uuid.obj : .AUTODEPEND ..\..\src\msw\ole\uuid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_clrpickerg.obj : .AUTODEPEND ..\..\src\generic\clrpickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_collpaneg.obj : .AUTODEPEND ..\..\src\generic\collpaneg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_filepickerg.obj : .AUTODEPEND ..\..\src\generic\filepickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_fontpickerg.obj : .AUTODEPEND ..\..\src\generic\fontpickerg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_prntdlgg.obj : .AUTODEPEND ..\..\src\generic\prntdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_evtloop.obj : .AUTODEPEND ..\..\src\msw\evtloop.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_accelcmn.obj : .AUTODEPEND ..\..\src\common\accelcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_accesscmn.obj : .AUTODEPEND ..\..\src\common\accesscmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_anidecod.obj : .AUTODEPEND ..\..\src\common\anidecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_affinematrix2d.obj : .AUTODEPEND ..\..\src\common\affinematrix2d.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_appcmn.obj : .AUTODEPEND ..\..\src\common\appcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_artprov.obj : .AUTODEPEND ..\..\src\common\artprov.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_artstd.obj : .AUTODEPEND ..\..\src\common\artstd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_bmpbase.obj : .AUTODEPEND ..\..\src\common\bmpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_bmpbtncmn.obj : .AUTODEPEND ..\..\src\common\bmpbtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_bookctrl.obj : .AUTODEPEND ..\..\src\common\bookctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_btncmn.obj : .AUTODEPEND ..\..\src\common\btncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_cairo.obj : .AUTODEPEND ..\..\src\common\cairo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_checkboxcmn.obj : .AUTODEPEND ..\..\src\common\checkboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_checklstcmn.obj : .AUTODEPEND ..\..\src\common\checklstcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_choiccmn.obj : .AUTODEPEND ..\..\src\common\choiccmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_clipcmn.obj : .AUTODEPEND ..\..\src\common\clipcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_clrpickercmn.obj : .AUTODEPEND ..\..\src\common\clrpickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_colourcmn.obj : .AUTODEPEND ..\..\src\common\colourcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_colourdata.obj : .AUTODEPEND ..\..\src\common\colourdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_combocmn.obj : .AUTODEPEND ..\..\src\common\combocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_cmdproc.obj : .AUTODEPEND ..\..\src\common\cmdproc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_cmndata.obj : .AUTODEPEND ..\..\src\common\cmndata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_containr.obj : .AUTODEPEND ..\..\src\common\containr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_cshelp.obj : .AUTODEPEND ..\..\src\common\cshelp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_ctrlcmn.obj : .AUTODEPEND ..\..\src\common\ctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_ctrlsub.obj : .AUTODEPEND ..\..\src\common\ctrlsub.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dcbase.obj : .AUTODEPEND ..\..\src\common\dcbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dcbufcmn.obj : .AUTODEPEND ..\..\src\common\dcbufcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dcgraph.obj : .AUTODEPEND ..\..\src\common\dcgraph.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dcsvg.obj : .AUTODEPEND ..\..\src\common\dcsvg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dirctrlcmn.obj : .AUTODEPEND ..\..\src\common\dirctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dlgcmn.obj : .AUTODEPEND ..\..\src\common\dlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dndcmn.obj : .AUTODEPEND ..\..\src\common\dndcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dobjcmn.obj : .AUTODEPEND ..\..\src\common\dobjcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_docmdi.obj : .AUTODEPEND ..\..\src\common\docmdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_docview.obj : .AUTODEPEND ..\..\src\common\docview.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dpycmn.obj : .AUTODEPEND ..\..\src\common\dpycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dseldlg.obj : .AUTODEPEND ..\..\src\common\dseldlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_effects.obj : .AUTODEPEND ..\..\src\common\effects.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_fddlgcmn.obj : .AUTODEPEND ..\..\src\common\fddlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_filectrlcmn.obj : .AUTODEPEND ..\..\src\common\filectrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_filehistorycmn.obj : .AUTODEPEND ..\..\src\common\filehistorycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_filepickercmn.obj : .AUTODEPEND ..\..\src\common\filepickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_fontpickercmn.obj : .AUTODEPEND ..\..\src\common\fontpickercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_fldlgcmn.obj : .AUTODEPEND ..\..\src\common\fldlgcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_fontcmn.obj : .AUTODEPEND ..\..\src\common\fontcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_fontdata.obj : .AUTODEPEND ..\..\src\common\fontdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_graphicc.obj : .AUTODEPEND ..\..\src\generic\graphicc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_fontenumcmn.obj : .AUTODEPEND ..\..\src\common\fontenumcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_fontmap.obj : .AUTODEPEND ..\..\src\common\fontmap.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_fontutilcmn.obj : .AUTODEPEND ..\..\src\common\fontutilcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_framecmn.obj : .AUTODEPEND ..\..\src\common\framecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_gaugecmn.obj : .AUTODEPEND ..\..\src\common\gaugecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_gbsizer.obj : .AUTODEPEND ..\..\src\common\gbsizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_gdicmn.obj : .AUTODEPEND ..\..\src\common\gdicmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_geometry.obj : .AUTODEPEND ..\..\src\common\geometry.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_gifdecod.obj : .AUTODEPEND ..\..\src\common\gifdecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_graphcmn.obj : .AUTODEPEND ..\..\src\common\graphcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_headercolcmn.obj : .AUTODEPEND ..\..\src\common\headercolcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_headerctrlcmn.obj : .AUTODEPEND ..\..\src\common\headerctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_helpbase.obj : .AUTODEPEND ..\..\src\common\helpbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_iconbndl.obj : .AUTODEPEND ..\..\src\common\iconbndl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imagall.obj : .AUTODEPEND ..\..\src\common\imagall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imagbmp.obj : .AUTODEPEND ..\..\src\common\imagbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_image.obj : .AUTODEPEND ..\..\src\common\image.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imagfill.obj : .AUTODEPEND ..\..\src\common\imagfill.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imaggif.obj : .AUTODEPEND ..\..\src\common\imaggif.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imagiff.obj : .AUTODEPEND ..\..\src\common\imagiff.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imagjpeg.obj : .AUTODEPEND ..\..\src\common\imagjpeg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imagpcx.obj : .AUTODEPEND ..\..\src\common\imagpcx.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imagpng.obj : .AUTODEPEND ..\..\src\common\imagpng.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imagpnm.obj : .AUTODEPEND ..\..\src\common\imagpnm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imagtga.obj : .AUTODEPEND ..\..\src\common\imagtga.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imagtiff.obj : .AUTODEPEND ..\..\src\common\imagtiff.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_imagxpm.obj : .AUTODEPEND ..\..\src\common\imagxpm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_layout.obj : .AUTODEPEND ..\..\src\common\layout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_lboxcmn.obj : .AUTODEPEND ..\..\src\common\lboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_listctrlcmn.obj : .AUTODEPEND ..\..\src\common\listctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_markupparser.obj : .AUTODEPEND ..\..\src\common\markupparser.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_matrix.obj : .AUTODEPEND ..\..\src\common\matrix.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_menucmn.obj : .AUTODEPEND ..\..\src\common\menucmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_modalhook.obj : .AUTODEPEND ..\..\src\common\modalhook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_mousemanager.obj : .AUTODEPEND ..\..\src\common\mousemanager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_nbkbase.obj : .AUTODEPEND ..\..\src\common\nbkbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_overlaycmn.obj : .AUTODEPEND ..\..\src\common\overlaycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_ownerdrwcmn.obj : .AUTODEPEND ..\..\src\common\ownerdrwcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_paper.obj : .AUTODEPEND ..\..\src\common\paper.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_panelcmn.obj : .AUTODEPEND ..\..\src\common\panelcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_persist.obj : .AUTODEPEND ..\..\src\common\persist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_pickerbase.obj : .AUTODEPEND ..\..\src\common\pickerbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_popupcmn.obj : .AUTODEPEND ..\..\src\common\popupcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_preferencescmn.obj : .AUTODEPEND ..\..\src\common\preferencescmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_prntbase.obj : .AUTODEPEND ..\..\src\common\prntbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_quantize.obj : .AUTODEPEND ..\..\src\common\quantize.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_radiobtncmn.obj : .AUTODEPEND ..\..\src\common\radiobtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_radiocmn.obj : .AUTODEPEND ..\..\src\common\radiocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_rearrangectrl.obj : .AUTODEPEND ..\..\src\common\rearrangectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_rendcmn.obj : .AUTODEPEND ..\..\src\common\rendcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_rgncmn.obj : .AUTODEPEND ..\..\src\common\rgncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_scrolbarcmn.obj : .AUTODEPEND ..\..\src\common\scrolbarcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_settcmn.obj : .AUTODEPEND ..\..\src\common\settcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_sizer.obj : .AUTODEPEND ..\..\src\common\sizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_slidercmn.obj : .AUTODEPEND ..\..\src\common\slidercmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_spinbtncmn.obj : .AUTODEPEND ..\..\src\common\spinbtncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_spinctrlcmn.obj : .AUTODEPEND ..\..\src\common\spinctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_srchcmn.obj : .AUTODEPEND ..\..\src\common\srchcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_statbar.obj : .AUTODEPEND ..\..\src\common\statbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_statbmpcmn.obj : .AUTODEPEND ..\..\src\common\statbmpcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_statboxcmn.obj : .AUTODEPEND ..\..\src\common\statboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_statlinecmn.obj : .AUTODEPEND ..\..\src\common\statlinecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_stattextcmn.obj : .AUTODEPEND ..\..\src\common\stattextcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_stockitem.obj : .AUTODEPEND ..\..\src\common\stockitem.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_tbarbase.obj : .AUTODEPEND ..\..\src\common\tbarbase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_textcmn.obj : .AUTODEPEND ..\..\src\common\textcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_textentrycmn.obj : .AUTODEPEND ..\..\src\common\textentrycmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_textmeasurecmn.obj : .AUTODEPEND ..\..\src\common\textmeasurecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_toplvcmn.obj : .AUTODEPEND ..\..\src\common\toplvcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_treebase.obj : .AUTODEPEND ..\..\src\common\treebase.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_uiactioncmn.obj : .AUTODEPEND ..\..\src\common\uiactioncmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_valgen.obj : .AUTODEPEND ..\..\src\common\valgen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_validate.obj : .AUTODEPEND ..\..\src\common\validate.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_valtext.obj : .AUTODEPEND ..\..\src\common\valtext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_valnum.obj : .AUTODEPEND ..\..\src\common\valnum.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_wincmn.obj : .AUTODEPEND ..\..\src\common\wincmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_windowid.obj : .AUTODEPEND ..\..\src\common\windowid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_wrapsizer.obj : .AUTODEPEND ..\..\src\common\wrapsizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_xpmdecod.obj : .AUTODEPEND ..\..\src\common\xpmdecod.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_busyinfo.obj : .AUTODEPEND ..\..\src\generic\busyinfo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_buttonbar.obj : .AUTODEPEND ..\..\src\generic\buttonbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_choicdgg.obj : .AUTODEPEND ..\..\src\generic\choicdgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_choicbkg.obj : .AUTODEPEND ..\..\src\generic\choicbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_combog.obj : .AUTODEPEND ..\..\src\generic\combog.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dcpsg.obj : .AUTODEPEND ..\..\src\generic\dcpsg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dirctrlg.obj : .AUTODEPEND ..\..\src\generic\dirctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_dragimgg.obj : .AUTODEPEND ..\..\src\generic\dragimgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_filectrlg.obj : .AUTODEPEND ..\..\src\generic\filectrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_headerctrlg.obj : .AUTODEPEND ..\..\src\generic\headerctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_infobar.obj : .AUTODEPEND ..\..\src\generic\infobar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_listbkg.obj : .AUTODEPEND ..\..\src\generic\listbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_logg.obj : .AUTODEPEND ..\..\src\generic\logg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_markuptext.obj : .AUTODEPEND ..\..\src\generic\markuptext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_msgdlgg.obj : .AUTODEPEND ..\..\src\generic\msgdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_numdlgg.obj : .AUTODEPEND ..\..\src\generic\numdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_progdlgg.obj : .AUTODEPEND ..\..\src\generic\progdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_preferencesg.obj : .AUTODEPEND ..\..\src\generic\preferencesg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_printps.obj : .AUTODEPEND ..\..\src\generic\printps.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_renderg.obj : .AUTODEPEND ..\..\src\generic\renderg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_richmsgdlgg.obj : .AUTODEPEND ..\..\src\generic\richmsgdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_scrlwing.obj : .AUTODEPEND ..\..\src\generic\scrlwing.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_selstore.obj : .AUTODEPEND ..\..\src\generic\selstore.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_spinctlg.obj : .AUTODEPEND ..\..\src\generic\spinctlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_splitter.obj : .AUTODEPEND ..\..\src\generic\splitter.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_srchctlg.obj : .AUTODEPEND ..\..\src\generic\srchctlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_statbmpg.obj : .AUTODEPEND ..\..\src\generic\statbmpg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_stattextg.obj : .AUTODEPEND ..\..\src\generic\stattextg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_textdlgg.obj : .AUTODEPEND ..\..\src\generic\textdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_tipwin.obj : .AUTODEPEND ..\..\src\generic\tipwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_toolbkg.obj : .AUTODEPEND ..\..\src\generic\toolbkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_treectlg.obj : .AUTODEPEND ..\..\src\generic\treectlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_treebkg.obj : .AUTODEPEND ..\..\src\generic\treebkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_vlbox.obj : .AUTODEPEND ..\..\src\generic\vlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_vscroll.obj : .AUTODEPEND ..\..\src\generic\vscroll.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 +$(OBJS)\corelib_xmlreshandler.obj : .AUTODEPEND ..\..\src\xrc\xmlreshandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +$(OBJS)\advdll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_ADV $< + +$(OBJS)\advdll_bmpcbox.obj : .AUTODEPEND ..\..\src\msw\bmpcbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_calctrl.obj : .AUTODEPEND ..\..\src\msw\calctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_commandlinkbutton.obj : .AUTODEPEND ..\..\src\msw\commandlinkbutton.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_datecontrols.obj : .AUTODEPEND ..\..\src\msw\datecontrols.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_datectrl.obj : .AUTODEPEND ..\..\src\msw\datectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_datetimectrl.obj : .AUTODEPEND ..\..\src\msw\datetimectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_hyperlink.obj : .AUTODEPEND ..\..\src\msw\hyperlink.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_timectrl.obj : .AUTODEPEND ..\..\src\msw\timectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_animatecmn.obj : .AUTODEPEND ..\..\src\common\animatecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_bmpcboxcmn.obj : .AUTODEPEND ..\..\src\common\bmpcboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_calctrlcmn.obj : .AUTODEPEND ..\..\src\common\calctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_datavcmn.obj : .AUTODEPEND ..\..\src\common\datavcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_gridcmn.obj : .AUTODEPEND ..\..\src\common\gridcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_hyperlnkcmn.obj : .AUTODEPEND ..\..\src\common\hyperlnkcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_odcombocmn.obj : .AUTODEPEND ..\..\src\common\odcombocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_richtooltipcmn.obj : .AUTODEPEND ..\..\src\common\richtooltipcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_aboutdlgg.obj : .AUTODEPEND ..\..\src\generic\aboutdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_bannerwindow.obj : .AUTODEPEND ..\..\src\generic\bannerwindow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_bmpcboxg.obj : .AUTODEPEND ..\..\src\generic\bmpcboxg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_calctrlg.obj : .AUTODEPEND ..\..\src\generic\calctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_commandlinkbuttong.obj : .AUTODEPEND ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_datavgen.obj : .AUTODEPEND ..\..\src\generic\datavgen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_datectlg.obj : .AUTODEPEND ..\..\src\generic\datectlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_editlbox.obj : .AUTODEPEND ..\..\src\generic\editlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_grid.obj : .AUTODEPEND ..\..\src\generic\grid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_gridctrl.obj : .AUTODEPEND ..\..\src\generic\gridctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_grideditors.obj : .AUTODEPEND ..\..\src\generic\grideditors.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_gridsel.obj : .AUTODEPEND ..\..\src\generic\gridsel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_helpext.obj : .AUTODEPEND ..\..\src\generic\helpext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_hyperlinkg.obj : .AUTODEPEND ..\..\src\generic\hyperlinkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_laywin.obj : .AUTODEPEND ..\..\src\generic\laywin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_notifmsgg.obj : .AUTODEPEND ..\..\src\generic\notifmsgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_odcombo.obj : .AUTODEPEND ..\..\src\generic\odcombo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_propdlg.obj : .AUTODEPEND ..\..\src\generic\propdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_richtooltipg.obj : .AUTODEPEND ..\..\src\generic\richtooltipg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_sashwin.obj : .AUTODEPEND ..\..\src\generic\sashwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_splash.obj : .AUTODEPEND ..\..\src\generic\splash.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_timectrlg.obj : .AUTODEPEND ..\..\src\generic\timectrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_tipdlg.obj : .AUTODEPEND ..\..\src\generic\tipdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_treelist.obj : .AUTODEPEND ..\..\src\generic\treelist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_wizard.obj : .AUTODEPEND ..\..\src\generic\wizard.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_taskbarcmn.obj : .AUTODEPEND ..\..\src\common\taskbarcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_aboutdlg.obj : .AUTODEPEND ..\..\src\msw\aboutdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_notifmsg.obj : .AUTODEPEND ..\..\src\msw\notifmsg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_richtooltip.obj : .AUTODEPEND ..\..\src\msw\richtooltip.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_sound.obj : .AUTODEPEND ..\..\src\msw\sound.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_taskbar.obj : .AUTODEPEND ..\..\src\msw\taskbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_joystick.obj : .AUTODEPEND ..\..\src\msw\joystick.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advdll_animateg.obj : .AUTODEPEND ..\..\src\generic\animateg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $< + +$(OBJS)\advlib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_bmpcbox.obj : .AUTODEPEND ..\..\src\msw\bmpcbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_calctrl.obj : .AUTODEPEND ..\..\src\msw\calctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_commandlinkbutton.obj : .AUTODEPEND ..\..\src\msw\commandlinkbutton.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_datecontrols.obj : .AUTODEPEND ..\..\src\msw\datecontrols.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_datectrl.obj : .AUTODEPEND ..\..\src\msw\datectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_datetimectrl.obj : .AUTODEPEND ..\..\src\msw\datetimectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_hyperlink.obj : .AUTODEPEND ..\..\src\msw\hyperlink.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_timectrl.obj : .AUTODEPEND ..\..\src\msw\timectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_animatecmn.obj : .AUTODEPEND ..\..\src\common\animatecmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_bmpcboxcmn.obj : .AUTODEPEND ..\..\src\common\bmpcboxcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_calctrlcmn.obj : .AUTODEPEND ..\..\src\common\calctrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_datavcmn.obj : .AUTODEPEND ..\..\src\common\datavcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_gridcmn.obj : .AUTODEPEND ..\..\src\common\gridcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_hyperlnkcmn.obj : .AUTODEPEND ..\..\src\common\hyperlnkcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_odcombocmn.obj : .AUTODEPEND ..\..\src\common\odcombocmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_richtooltipcmn.obj : .AUTODEPEND ..\..\src\common\richtooltipcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_aboutdlgg.obj : .AUTODEPEND ..\..\src\generic\aboutdlgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_bannerwindow.obj : .AUTODEPEND ..\..\src\generic\bannerwindow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_bmpcboxg.obj : .AUTODEPEND ..\..\src\generic\bmpcboxg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_calctrlg.obj : .AUTODEPEND ..\..\src\generic\calctrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_commandlinkbuttong.obj : .AUTODEPEND ..\..\src\generic\commandlinkbuttong.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_datavgen.obj : .AUTODEPEND ..\..\src\generic\datavgen.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_datectlg.obj : .AUTODEPEND ..\..\src\generic\datectlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_editlbox.obj : .AUTODEPEND ..\..\src\generic\editlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_grid.obj : .AUTODEPEND ..\..\src\generic\grid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_gridctrl.obj : .AUTODEPEND ..\..\src\generic\gridctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_grideditors.obj : .AUTODEPEND ..\..\src\generic\grideditors.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_gridsel.obj : .AUTODEPEND ..\..\src\generic\gridsel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_helpext.obj : .AUTODEPEND ..\..\src\generic\helpext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_hyperlinkg.obj : .AUTODEPEND ..\..\src\generic\hyperlinkg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_laywin.obj : .AUTODEPEND ..\..\src\generic\laywin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_notifmsgg.obj : .AUTODEPEND ..\..\src\generic\notifmsgg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_odcombo.obj : .AUTODEPEND ..\..\src\generic\odcombo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_propdlg.obj : .AUTODEPEND ..\..\src\generic\propdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_richtooltipg.obj : .AUTODEPEND ..\..\src\generic\richtooltipg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_sashwin.obj : .AUTODEPEND ..\..\src\generic\sashwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_splash.obj : .AUTODEPEND ..\..\src\generic\splash.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_timectrlg.obj : .AUTODEPEND ..\..\src\generic\timectrlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_tipdlg.obj : .AUTODEPEND ..\..\src\generic\tipdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_treelist.obj : .AUTODEPEND ..\..\src\generic\treelist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_wizard.obj : .AUTODEPEND ..\..\src\generic\wizard.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_taskbarcmn.obj : .AUTODEPEND ..\..\src\common\taskbarcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_aboutdlg.obj : .AUTODEPEND ..\..\src\msw\aboutdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_notifmsg.obj : .AUTODEPEND ..\..\src\msw\notifmsg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_richtooltip.obj : .AUTODEPEND ..\..\src\msw\richtooltip.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_sound.obj : .AUTODEPEND ..\..\src\msw\sound.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_taskbar.obj : .AUTODEPEND ..\..\src\msw\taskbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_joystick.obj : .AUTODEPEND ..\..\src\msw\joystick.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\advlib_animateg.obj : .AUTODEPEND ..\..\src\generic\animateg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $< + +$(OBJS)\mediadll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MEDIADLL_CXXFLAGS) $< + +$(OBJS)\mediadll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_MEDIA $< + +$(OBJS)\mediadll_mediactrlcmn.obj : .AUTODEPEND ..\..\src\common\mediactrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MEDIADLL_CXXFLAGS) $< + +$(OBJS)\mediadll_mediactrl_am.obj : .AUTODEPEND ..\..\src\msw\mediactrl_am.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MEDIADLL_CXXFLAGS) $< + +$(OBJS)\mediadll_mediactrl_wmp10.obj : .AUTODEPEND ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MEDIADLL_CXXFLAGS) $< + +$(OBJS)\mediadll_mediactrl_qt.obj : .AUTODEPEND ..\..\src\msw\mediactrl_qt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MEDIADLL_CXXFLAGS) $< + +$(OBJS)\medialib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MEDIALIB_CXXFLAGS) $< + +$(OBJS)\medialib_mediactrlcmn.obj : .AUTODEPEND ..\..\src\common\mediactrlcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MEDIALIB_CXXFLAGS) $< + +$(OBJS)\medialib_mediactrl_am.obj : .AUTODEPEND ..\..\src\msw\mediactrl_am.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MEDIALIB_CXXFLAGS) $< + +$(OBJS)\medialib_mediactrl_wmp10.obj : .AUTODEPEND ..\..\src\msw\mediactrl_wmp10.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MEDIALIB_CXXFLAGS) $< + +$(OBJS)\medialib_mediactrl_qt.obj : .AUTODEPEND ..\..\src\msw\mediactrl_qt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MEDIALIB_CXXFLAGS) $< + +$(OBJS)\htmldll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_HTML $< + +$(OBJS)\htmldll_helpbest.obj : .AUTODEPEND ..\..\src\msw\helpbest.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_helpctrl.obj : .AUTODEPEND ..\..\src\html\helpctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_helpdata.obj : .AUTODEPEND ..\..\src\html\helpdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_helpdlg.obj : .AUTODEPEND ..\..\src\html\helpdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_helpfrm.obj : .AUTODEPEND ..\..\src\html\helpfrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_helpwnd.obj : .AUTODEPEND ..\..\src\html\helpwnd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_htmlcell.obj : .AUTODEPEND ..\..\src\html\htmlcell.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_htmlfilt.obj : .AUTODEPEND ..\..\src\html\htmlfilt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_htmlpars.obj : .AUTODEPEND ..\..\src\html\htmlpars.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_htmltag.obj : .AUTODEPEND ..\..\src\html\htmltag.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_htmlwin.obj : .AUTODEPEND ..\..\src\html\htmlwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_htmprint.obj : .AUTODEPEND ..\..\src\html\htmprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_m_dflist.obj : .AUTODEPEND ..\..\src\html\m_dflist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_m_fonts.obj : .AUTODEPEND ..\..\src\html\m_fonts.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_m_hline.obj : .AUTODEPEND ..\..\src\html\m_hline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_m_image.obj : .AUTODEPEND ..\..\src\html\m_image.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_m_layout.obj : .AUTODEPEND ..\..\src\html\m_layout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_m_links.obj : .AUTODEPEND ..\..\src\html\m_links.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_m_list.obj : .AUTODEPEND ..\..\src\html\m_list.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_m_pre.obj : .AUTODEPEND ..\..\src\html\m_pre.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_m_span.obj : .AUTODEPEND ..\..\src\html\m_span.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_m_style.obj : .AUTODEPEND ..\..\src\html\m_style.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_m_tables.obj : .AUTODEPEND ..\..\src\html\m_tables.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_styleparams.obj : .AUTODEPEND ..\..\src\html\styleparams.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_winpars.obj : .AUTODEPEND ..\..\src\html\winpars.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmldll_htmllbox.obj : .AUTODEPEND ..\..\src\generic\htmllbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLDLL_CXXFLAGS) $< + +$(OBJS)\htmllib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_helpbest.obj : .AUTODEPEND ..\..\src\msw\helpbest.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_helpctrl.obj : .AUTODEPEND ..\..\src\html\helpctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_helpdata.obj : .AUTODEPEND ..\..\src\html\helpdata.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_helpdlg.obj : .AUTODEPEND ..\..\src\html\helpdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_helpfrm.obj : .AUTODEPEND ..\..\src\html\helpfrm.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_helpwnd.obj : .AUTODEPEND ..\..\src\html\helpwnd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_htmlcell.obj : .AUTODEPEND ..\..\src\html\htmlcell.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_htmlfilt.obj : .AUTODEPEND ..\..\src\html\htmlfilt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_htmlpars.obj : .AUTODEPEND ..\..\src\html\htmlpars.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_htmltag.obj : .AUTODEPEND ..\..\src\html\htmltag.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_htmlwin.obj : .AUTODEPEND ..\..\src\html\htmlwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_htmprint.obj : .AUTODEPEND ..\..\src\html\htmprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_m_dflist.obj : .AUTODEPEND ..\..\src\html\m_dflist.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_m_fonts.obj : .AUTODEPEND ..\..\src\html\m_fonts.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_m_hline.obj : .AUTODEPEND ..\..\src\html\m_hline.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_m_image.obj : .AUTODEPEND ..\..\src\html\m_image.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_m_layout.obj : .AUTODEPEND ..\..\src\html\m_layout.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_m_links.obj : .AUTODEPEND ..\..\src\html\m_links.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_m_list.obj : .AUTODEPEND ..\..\src\html\m_list.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_m_pre.obj : .AUTODEPEND ..\..\src\html\m_pre.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_m_span.obj : .AUTODEPEND ..\..\src\html\m_span.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_m_style.obj : .AUTODEPEND ..\..\src\html\m_style.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_m_tables.obj : .AUTODEPEND ..\..\src\html\m_tables.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_styleparams.obj : .AUTODEPEND ..\..\src\html\styleparams.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_winpars.obj : .AUTODEPEND ..\..\src\html\winpars.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\htmllib_htmllbox.obj : .AUTODEPEND ..\..\src\generic\htmllbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(HTMLLIB_CXXFLAGS) $< + +$(OBJS)\webviewdll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWDLL_CXXFLAGS) $< + +$(OBJS)\webviewdll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_WEBVIEW $< + +$(OBJS)\webviewdll_webview_ie.obj : .AUTODEPEND ..\..\src\msw\webview_ie.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWDLL_CXXFLAGS) $< + +$(OBJS)\webviewdll_webview.obj : .AUTODEPEND ..\..\src\common\webview.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWDLL_CXXFLAGS) $< + +$(OBJS)\webviewdll_webviewarchivehandler.obj : .AUTODEPEND ..\..\src\common\webviewarchivehandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWDLL_CXXFLAGS) $< + +$(OBJS)\webviewdll_webviewfshandler.obj : .AUTODEPEND ..\..\src\common\webviewfshandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWDLL_CXXFLAGS) $< + +$(OBJS)\webviewlib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWLIB_CXXFLAGS) $< + +$(OBJS)\webviewlib_webview_ie.obj : .AUTODEPEND ..\..\src\msw\webview_ie.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWLIB_CXXFLAGS) $< + +$(OBJS)\webviewlib_webview.obj : .AUTODEPEND ..\..\src\common\webview.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWLIB_CXXFLAGS) $< + +$(OBJS)\webviewlib_webviewarchivehandler.obj : .AUTODEPEND ..\..\src\common\webviewarchivehandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWLIB_CXXFLAGS) $< + +$(OBJS)\webviewlib_webviewfshandler.obj : .AUTODEPEND ..\..\src\common\webviewfshandler.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWLIB_CXXFLAGS) $< + +$(OBJS)\qadll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(QADLL_CXXFLAGS) $< + +$(OBJS)\qadll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_QA $< + +$(OBJS)\qadll_debugrpt.obj : .AUTODEPEND ..\..\src\common\debugrpt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(QADLL_CXXFLAGS) $< + +$(OBJS)\qadll_dbgrptg.obj : .AUTODEPEND ..\..\src\generic\dbgrptg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(QADLL_CXXFLAGS) $< + +$(OBJS)\qalib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(QALIB_CXXFLAGS) $< + +$(OBJS)\qalib_debugrpt.obj : .AUTODEPEND ..\..\src\common\debugrpt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(QALIB_CXXFLAGS) $< + +$(OBJS)\qalib_dbgrptg.obj : .AUTODEPEND ..\..\src\generic\dbgrptg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(QALIB_CXXFLAGS) $< + +$(OBJS)\xmldll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XMLDLL_CXXFLAGS) $< + +$(OBJS)\xmldll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dwxUSE_GUI=0 -dWXUSINGDLL -dWXMAKINGDLL_XML $< + +$(OBJS)\xmldll_xml.obj : .AUTODEPEND ..\..\src\xml\xml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XMLDLL_CXXFLAGS) $< + +$(OBJS)\xmldll_xtixml.obj : .AUTODEPEND ..\..\src\common\xtixml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XMLDLL_CXXFLAGS) $< + +$(OBJS)\xmllib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XMLLIB_CXXFLAGS) $< + +$(OBJS)\xmllib_xml.obj : .AUTODEPEND ..\..\src\xml\xml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XMLLIB_CXXFLAGS) $< + +$(OBJS)\xmllib_xtixml.obj : .AUTODEPEND ..\..\src\common\xtixml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XMLLIB_CXXFLAGS) $< + +$(OBJS)\xrcdll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_XRC $< + +$(OBJS)\xrcdll_xh_animatctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_bannerwindow.obj : .AUTODEPEND ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_bmp.obj : .AUTODEPEND ..\..\src\xrc\xh_bmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_bmpcbox.obj : .AUTODEPEND ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_bmpbt.obj : .AUTODEPEND ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_bttn.obj : .AUTODEPEND ..\..\src\xrc\xh_bttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_cald.obj : .AUTODEPEND ..\..\src\xrc\xh_cald.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_chckb.obj : .AUTODEPEND ..\..\src\xrc\xh_chckb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_chckl.obj : .AUTODEPEND ..\..\src\xrc\xh_chckl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_choic.obj : .AUTODEPEND ..\..\src\xrc\xh_choic.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_choicbk.obj : .AUTODEPEND ..\..\src\xrc\xh_choicbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_clrpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_cmdlinkbn.obj : .AUTODEPEND ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_collpane.obj : .AUTODEPEND ..\..\src\xrc\xh_collpane.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_combo.obj : .AUTODEPEND ..\..\src\xrc\xh_combo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_comboctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_datectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_datectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_dirpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_dlg.obj : .AUTODEPEND ..\..\src\xrc\xh_dlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_editlbox.obj : .AUTODEPEND ..\..\src\xrc\xh_editlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_filectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_filepicker.obj : .AUTODEPEND ..\..\src\xrc\xh_filepicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_fontpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_frame.obj : .AUTODEPEND ..\..\src\xrc\xh_frame.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_gauge.obj : .AUTODEPEND ..\..\src\xrc\xh_gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_gdctl.obj : .AUTODEPEND ..\..\src\xrc\xh_gdctl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_grid.obj : .AUTODEPEND ..\..\src\xrc\xh_grid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_html.obj : .AUTODEPEND ..\..\src\xrc\xh_html.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_hyperlink.obj : .AUTODEPEND ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_listb.obj : .AUTODEPEND ..\..\src\xrc\xh_listb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_listbk.obj : .AUTODEPEND ..\..\src\xrc\xh_listbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_listc.obj : .AUTODEPEND ..\..\src\xrc\xh_listc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_mdi.obj : .AUTODEPEND ..\..\src\xrc\xh_mdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_menu.obj : .AUTODEPEND ..\..\src\xrc\xh_menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_notbk.obj : .AUTODEPEND ..\..\src\xrc\xh_notbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_odcombo.obj : .AUTODEPEND ..\..\src\xrc\xh_odcombo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_panel.obj : .AUTODEPEND ..\..\src\xrc\xh_panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_propdlg.obj : .AUTODEPEND ..\..\src\xrc\xh_propdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_radbt.obj : .AUTODEPEND ..\..\src\xrc\xh_radbt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_radbx.obj : .AUTODEPEND ..\..\src\xrc\xh_radbx.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_scrol.obj : .AUTODEPEND ..\..\src\xrc\xh_scrol.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_scwin.obj : .AUTODEPEND ..\..\src\xrc\xh_scwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_htmllbox.obj : .AUTODEPEND ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_sizer.obj : .AUTODEPEND ..\..\src\xrc\xh_sizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_slidr.obj : .AUTODEPEND ..\..\src\xrc\xh_slidr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_spin.obj : .AUTODEPEND ..\..\src\xrc\xh_spin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_split.obj : .AUTODEPEND ..\..\src\xrc\xh_split.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_srchctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_statbar.obj : .AUTODEPEND ..\..\src\xrc\xh_statbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_stbmp.obj : .AUTODEPEND ..\..\src\xrc\xh_stbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_stbox.obj : .AUTODEPEND ..\..\src\xrc\xh_stbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_stlin.obj : .AUTODEPEND ..\..\src\xrc\xh_stlin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_sttxt.obj : .AUTODEPEND ..\..\src\xrc\xh_sttxt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_text.obj : .AUTODEPEND ..\..\src\xrc\xh_text.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_tglbtn.obj : .AUTODEPEND ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_timectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_timectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_toolb.obj : .AUTODEPEND ..\..\src\xrc\xh_toolb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_toolbk.obj : .AUTODEPEND ..\..\src\xrc\xh_toolbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_tree.obj : .AUTODEPEND ..\..\src\xrc\xh_tree.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_treebk.obj : .AUTODEPEND ..\..\src\xrc\xh_treebk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_unkwn.obj : .AUTODEPEND ..\..\src\xrc\xh_unkwn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xh_wizrd.obj : .AUTODEPEND ..\..\src\xrc\xh_wizrd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xmlres.obj : .AUTODEPEND ..\..\src\xrc\xmlres.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xmladv.obj : .AUTODEPEND ..\..\src\xrc\xmladv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrcdll_xmlrsall.obj : .AUTODEPEND ..\..\src\xrc\xmlrsall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + +$(OBJS)\xrclib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_animatctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_animatctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_bannerwindow.obj : .AUTODEPEND ..\..\src\xrc\xh_bannerwindow.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_bmp.obj : .AUTODEPEND ..\..\src\xrc\xh_bmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_bmpcbox.obj : .AUTODEPEND ..\..\src\xrc\xh_bmpcbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_bmpbt.obj : .AUTODEPEND ..\..\src\xrc\xh_bmpbt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_bttn.obj : .AUTODEPEND ..\..\src\xrc\xh_bttn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_cald.obj : .AUTODEPEND ..\..\src\xrc\xh_cald.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_chckb.obj : .AUTODEPEND ..\..\src\xrc\xh_chckb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_chckl.obj : .AUTODEPEND ..\..\src\xrc\xh_chckl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_choic.obj : .AUTODEPEND ..\..\src\xrc\xh_choic.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_choicbk.obj : .AUTODEPEND ..\..\src\xrc\xh_choicbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_clrpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_clrpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_cmdlinkbn.obj : .AUTODEPEND ..\..\src\xrc\xh_cmdlinkbn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_collpane.obj : .AUTODEPEND ..\..\src\xrc\xh_collpane.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_combo.obj : .AUTODEPEND ..\..\src\xrc\xh_combo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_comboctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_comboctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_datectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_datectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_dirpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_dirpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_dlg.obj : .AUTODEPEND ..\..\src\xrc\xh_dlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_editlbox.obj : .AUTODEPEND ..\..\src\xrc\xh_editlbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_filectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_filepicker.obj : .AUTODEPEND ..\..\src\xrc\xh_filepicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_fontpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_fontpicker.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_frame.obj : .AUTODEPEND ..\..\src\xrc\xh_frame.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_gauge.obj : .AUTODEPEND ..\..\src\xrc\xh_gauge.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_gdctl.obj : .AUTODEPEND ..\..\src\xrc\xh_gdctl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_grid.obj : .AUTODEPEND ..\..\src\xrc\xh_grid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_html.obj : .AUTODEPEND ..\..\src\xrc\xh_html.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_hyperlink.obj : .AUTODEPEND ..\..\src\xrc\xh_hyperlink.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_listb.obj : .AUTODEPEND ..\..\src\xrc\xh_listb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_listbk.obj : .AUTODEPEND ..\..\src\xrc\xh_listbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_listc.obj : .AUTODEPEND ..\..\src\xrc\xh_listc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_mdi.obj : .AUTODEPEND ..\..\src\xrc\xh_mdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_menu.obj : .AUTODEPEND ..\..\src\xrc\xh_menu.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_notbk.obj : .AUTODEPEND ..\..\src\xrc\xh_notbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_odcombo.obj : .AUTODEPEND ..\..\src\xrc\xh_odcombo.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_panel.obj : .AUTODEPEND ..\..\src\xrc\xh_panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_propdlg.obj : .AUTODEPEND ..\..\src\xrc\xh_propdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_radbt.obj : .AUTODEPEND ..\..\src\xrc\xh_radbt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_radbx.obj : .AUTODEPEND ..\..\src\xrc\xh_radbx.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_scrol.obj : .AUTODEPEND ..\..\src\xrc\xh_scrol.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_scwin.obj : .AUTODEPEND ..\..\src\xrc\xh_scwin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_htmllbox.obj : .AUTODEPEND ..\..\src\xrc\xh_htmllbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_sizer.obj : .AUTODEPEND ..\..\src\xrc\xh_sizer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_slidr.obj : .AUTODEPEND ..\..\src\xrc\xh_slidr.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_spin.obj : .AUTODEPEND ..\..\src\xrc\xh_spin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_split.obj : .AUTODEPEND ..\..\src\xrc\xh_split.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_srchctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_statbar.obj : .AUTODEPEND ..\..\src\xrc\xh_statbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_stbmp.obj : .AUTODEPEND ..\..\src\xrc\xh_stbmp.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_stbox.obj : .AUTODEPEND ..\..\src\xrc\xh_stbox.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_stlin.obj : .AUTODEPEND ..\..\src\xrc\xh_stlin.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_sttxt.obj : .AUTODEPEND ..\..\src\xrc\xh_sttxt.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_text.obj : .AUTODEPEND ..\..\src\xrc\xh_text.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_tglbtn.obj : .AUTODEPEND ..\..\src\xrc\xh_tglbtn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_timectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_timectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_toolb.obj : .AUTODEPEND ..\..\src\xrc\xh_toolb.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_toolbk.obj : .AUTODEPEND ..\..\src\xrc\xh_toolbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_tree.obj : .AUTODEPEND ..\..\src\xrc\xh_tree.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_treebk.obj : .AUTODEPEND ..\..\src\xrc\xh_treebk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_unkwn.obj : .AUTODEPEND ..\..\src\xrc\xh_unkwn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xh_wizrd.obj : .AUTODEPEND ..\..\src\xrc\xh_wizrd.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xmlres.obj : .AUTODEPEND ..\..\src\xrc\xmlres.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xmladv.obj : .AUTODEPEND ..\..\src\xrc\xmladv.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\xrclib_xmlrsall.obj : .AUTODEPEND ..\..\src\xrc\xmlrsall.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + +$(OBJS)\auidll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUIDLL_CXXFLAGS) $< + +$(OBJS)\auidll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_AUI $< + +$(OBJS)\auidll_framemanager.obj : .AUTODEPEND ..\..\src\aui\framemanager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUIDLL_CXXFLAGS) $< + +$(OBJS)\auidll_dockart.obj : .AUTODEPEND ..\..\src\aui\dockart.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUIDLL_CXXFLAGS) $< + +$(OBJS)\auidll_floatpane.obj : .AUTODEPEND ..\..\src\aui\floatpane.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUIDLL_CXXFLAGS) $< + +$(OBJS)\auidll_auibook.obj : .AUTODEPEND ..\..\src\aui\auibook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUIDLL_CXXFLAGS) $< + +$(OBJS)\auidll_auibar.obj : .AUTODEPEND ..\..\src\aui\auibar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUIDLL_CXXFLAGS) $< + +$(OBJS)\auidll_tabmdi.obj : .AUTODEPEND ..\..\src\aui\tabmdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUIDLL_CXXFLAGS) $< + +$(OBJS)\auidll_tabart.obj : .AUTODEPEND ..\..\src\aui\tabart.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUIDLL_CXXFLAGS) $< + +$(OBJS)\auidll_xh_auinotbk.obj : .AUTODEPEND ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUIDLL_CXXFLAGS) $< + +$(OBJS)\auilib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< + +$(OBJS)\auilib_framemanager.obj : .AUTODEPEND ..\..\src\aui\framemanager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< + +$(OBJS)\auilib_dockart.obj : .AUTODEPEND ..\..\src\aui\dockart.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< + +$(OBJS)\auilib_floatpane.obj : .AUTODEPEND ..\..\src\aui\floatpane.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< + +$(OBJS)\auilib_auibook.obj : .AUTODEPEND ..\..\src\aui\auibook.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< + +$(OBJS)\auilib_auibar.obj : .AUTODEPEND ..\..\src\aui\auibar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< + +$(OBJS)\auilib_tabmdi.obj : .AUTODEPEND ..\..\src\aui\tabmdi.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< + +$(OBJS)\auilib_tabart.obj : .AUTODEPEND ..\..\src\aui\tabart.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< + +$(OBJS)\auilib_xh_auinotbk.obj : .AUTODEPEND ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< + +$(OBJS)\ribbondll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbondll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_RIBBON $< + +$(OBJS)\ribbondll_art_internal.obj : .AUTODEPEND ..\..\src\ribbon\art_internal.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbondll_art_msw.obj : .AUTODEPEND ..\..\src\ribbon\art_msw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbondll_art_aui.obj : .AUTODEPEND ..\..\src\ribbon\art_aui.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbondll_bar.obj : .AUTODEPEND ..\..\src\ribbon\bar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbondll_buttonbar.obj : .AUTODEPEND ..\..\src\ribbon\buttonbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbondll_control.obj : .AUTODEPEND ..\..\src\ribbon\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbondll_gallery.obj : .AUTODEPEND ..\..\src\ribbon\gallery.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbondll_page.obj : .AUTODEPEND ..\..\src\ribbon\page.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbondll_panel.obj : .AUTODEPEND ..\..\src\ribbon\panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbondll_toolbar.obj : .AUTODEPEND ..\..\src\ribbon\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbondll_xh_ribbon.obj : .AUTODEPEND ..\..\src\xrc\xh_ribbon.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< + +$(OBJS)\ribbonlib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\ribbonlib_art_internal.obj : .AUTODEPEND ..\..\src\ribbon\art_internal.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\ribbonlib_art_msw.obj : .AUTODEPEND ..\..\src\ribbon\art_msw.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\ribbonlib_art_aui.obj : .AUTODEPEND ..\..\src\ribbon\art_aui.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\ribbonlib_bar.obj : .AUTODEPEND ..\..\src\ribbon\bar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\ribbonlib_buttonbar.obj : .AUTODEPEND ..\..\src\ribbon\buttonbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\ribbonlib_control.obj : .AUTODEPEND ..\..\src\ribbon\control.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\ribbonlib_gallery.obj : .AUTODEPEND ..\..\src\ribbon\gallery.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\ribbonlib_page.obj : .AUTODEPEND ..\..\src\ribbon\page.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\ribbonlib_panel.obj : .AUTODEPEND ..\..\src\ribbon\panel.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\ribbonlib_toolbar.obj : .AUTODEPEND ..\..\src\ribbon\toolbar.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\ribbonlib_xh_ribbon.obj : .AUTODEPEND ..\..\src\xrc\xh_ribbon.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONLIB_CXXFLAGS) $< + +$(OBJS)\propgriddll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDDLL_CXXFLAGS) $< + +$(OBJS)\propgriddll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_PROPGRID $< + +$(OBJS)\propgriddll_advprops.obj : .AUTODEPEND ..\..\src\propgrid\advprops.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDDLL_CXXFLAGS) $< + +$(OBJS)\propgriddll_editors.obj : .AUTODEPEND ..\..\src\propgrid\editors.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDDLL_CXXFLAGS) $< + +$(OBJS)\propgriddll_manager.obj : .AUTODEPEND ..\..\src\propgrid\manager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDDLL_CXXFLAGS) $< + +$(OBJS)\propgriddll_property.obj : .AUTODEPEND ..\..\src\propgrid\property.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDDLL_CXXFLAGS) $< + +$(OBJS)\propgriddll_propgrid.obj : .AUTODEPEND ..\..\src\propgrid\propgrid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDDLL_CXXFLAGS) $< + +$(OBJS)\propgriddll_propgridiface.obj : .AUTODEPEND ..\..\src\propgrid\propgridiface.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDDLL_CXXFLAGS) $< + +$(OBJS)\propgriddll_propgridpagestate.obj : .AUTODEPEND ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDDLL_CXXFLAGS) $< + +$(OBJS)\propgriddll_props.obj : .AUTODEPEND ..\..\src\propgrid\props.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDDLL_CXXFLAGS) $< + +$(OBJS)\propgridlib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDLIB_CXXFLAGS) $< + +$(OBJS)\propgridlib_advprops.obj : .AUTODEPEND ..\..\src\propgrid\advprops.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDLIB_CXXFLAGS) $< + +$(OBJS)\propgridlib_editors.obj : .AUTODEPEND ..\..\src\propgrid\editors.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDLIB_CXXFLAGS) $< + +$(OBJS)\propgridlib_manager.obj : .AUTODEPEND ..\..\src\propgrid\manager.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDLIB_CXXFLAGS) $< + +$(OBJS)\propgridlib_property.obj : .AUTODEPEND ..\..\src\propgrid\property.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDLIB_CXXFLAGS) $< + +$(OBJS)\propgridlib_propgrid.obj : .AUTODEPEND ..\..\src\propgrid\propgrid.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDLIB_CXXFLAGS) $< + +$(OBJS)\propgridlib_propgridiface.obj : .AUTODEPEND ..\..\src\propgrid\propgridiface.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDLIB_CXXFLAGS) $< + +$(OBJS)\propgridlib_propgridpagestate.obj : .AUTODEPEND ..\..\src\propgrid\propgridpagestate.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDLIB_CXXFLAGS) $< + +$(OBJS)\propgridlib_props.obj : .AUTODEPEND ..\..\src\propgrid\props.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(PROPGRIDLIB_CXXFLAGS) $< + +$(OBJS)\richtextdll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextdll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_RICHTEXT $< + +$(OBJS)\richtextdll_richtextbuffer.obj : .AUTODEPEND ..\..\src\richtext\richtextbuffer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextdll_richtextctrl.obj : .AUTODEPEND ..\..\src\richtext\richtextctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextdll_richtextformatdlg.obj : .AUTODEPEND ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextdll_richtexthtml.obj : .AUTODEPEND ..\..\src\richtext\richtexthtml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextdll_richtextimagedlg.obj : .AUTODEPEND ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextdll_richtextprint.obj : .AUTODEPEND ..\..\src\richtext\richtextprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextdll_richtextstyledlg.obj : .AUTODEPEND ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextdll_richtextstyles.obj : .AUTODEPEND ..\..\src\richtext\richtextstyles.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextdll_richtextsymboldlg.obj : .AUTODEPEND ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextdll_richtextxml.obj : .AUTODEPEND ..\..\src\richtext\richtextxml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextdll_xh_richtext.obj : .AUTODEPEND ..\..\src\xrc\xh_richtext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTDLL_CXXFLAGS) $< + +$(OBJS)\richtextlib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\richtextlib_richtextbuffer.obj : .AUTODEPEND ..\..\src\richtext\richtextbuffer.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\richtextlib_richtextctrl.obj : .AUTODEPEND ..\..\src\richtext\richtextctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\richtextlib_richtextformatdlg.obj : .AUTODEPEND ..\..\src\richtext\richtextformatdlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\richtextlib_richtexthtml.obj : .AUTODEPEND ..\..\src\richtext\richtexthtml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\richtextlib_richtextimagedlg.obj : .AUTODEPEND ..\..\src\richtext\richtextimagedlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\richtextlib_richtextprint.obj : .AUTODEPEND ..\..\src\richtext\richtextprint.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\richtextlib_richtextstyledlg.obj : .AUTODEPEND ..\..\src\richtext\richtextstyledlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\richtextlib_richtextstyles.obj : .AUTODEPEND ..\..\src\richtext\richtextstyles.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\richtextlib_richtextsymboldlg.obj : .AUTODEPEND ..\..\src\richtext\richtextsymboldlg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\richtextlib_richtextxml.obj : .AUTODEPEND ..\..\src\richtext\richtextxml.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\richtextlib_xh_richtext.obj : .AUTODEPEND ..\..\src\xrc\xh_richtext.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(RICHTEXTLIB_CXXFLAGS) $< + +$(OBJS)\stcdll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(STCDLL_CXXFLAGS) $< + +$(OBJS)\stcdll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -i=..\..\src\stc\scintilla\include -i=..\..\src\stc\scintilla\lexlib -i=..\..\src\stc\scintilla\src -d__WX__ -dSCI_LEXER -dLINK_LEXERS -dWXUSINGDLL -dWXMAKINGDLL_STC $< + +$(OBJS)\stcdll_stc.obj : .AUTODEPEND ..\..\src\stc\stc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(STCDLL_CXXFLAGS) $< + +$(OBJS)\stcdll_PlatWX.obj : .AUTODEPEND ..\..\src\stc\PlatWX.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(STCDLL_CXXFLAGS) $< + +$(OBJS)\stcdll_ScintillaWX.obj : .AUTODEPEND ..\..\src\stc\ScintillaWX.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(STCDLL_CXXFLAGS) $< + +$(OBJS)\stclib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(STCLIB_CXXFLAGS) $< + +$(OBJS)\stclib_stc.obj : .AUTODEPEND ..\..\src\stc\stc.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(STCLIB_CXXFLAGS) $< + +$(OBJS)\stclib_PlatWX.obj : .AUTODEPEND ..\..\src\stc\PlatWX.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(STCLIB_CXXFLAGS) $< + +$(OBJS)\stclib_ScintillaWX.obj : .AUTODEPEND ..\..\src\stc\ScintillaWX.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(STCLIB_CXXFLAGS) $< + +$(OBJS)\gldll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(GLDLL_CXXFLAGS) $< + +$(OBJS)\gldll_version.res : .AUTODEPEND ..\..\src\msw\version.rc + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL $< + +$(OBJS)\gldll_glcmn.obj : .AUTODEPEND ..\..\src\common\glcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(GLDLL_CXXFLAGS) $< + +$(OBJS)\gldll_glcanvas.obj : .AUTODEPEND ..\..\src\msw\glcanvas.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(GLDLL_CXXFLAGS) $< + +$(OBJS)\gllib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(GLLIB_CXXFLAGS) $< + +$(OBJS)\gllib_glcmn.obj : .AUTODEPEND ..\..\src\common\glcmn.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(GLLIB_CXXFLAGS) $< + +$(OBJS)\gllib_glcanvas.obj : .AUTODEPEND ..\..\src\msw\glcanvas.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(GLLIB_CXXFLAGS) $< + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10.sln b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10.sln new file mode 100644 index 0000000000..b3975e1d99 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10.sln @@ -0,0 +1,493 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxregex", "wx_vc10_wxregex.vcxproj", "{56A4B526-BB81-5D01-AAA9-16D23BBB169D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "wx_vc10_wxzlib.vcxproj", "{8B867186-A0B5-5479-B824-E176EDD27C40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "wx_vc10_wxpng.vcxproj", "{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "wx_vc10_wxjpeg.vcxproj", "{6053CC38-CDEE-584C-8BC8-4B000D800FC7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxtiff", "wx_vc10_wxtiff.vcxproj", "{75596CE6-5AE7-55C9-B890-C07B0A657A83}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxexpat", "wx_vc10_wxexpat.vcxproj", "{A1A8355B-0988-528E-9CC2-B971D6266669}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "wx_vc10_wxscintilla.vcxproj", "{74827EBD-93DC-5110-BA95-3F2AB029B6B0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "wx_vc10_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}" + ProjectSection(ProjectDependencies) = postProject + {56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {56A4B526-BB81-5D01-AAA9-16D23BBB169D} + {A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669} + {8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "net", "wx_vc10_net.vcxproj", "{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}" + ProjectSection(ProjectDependencies) = postProject + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "wx_vc10_core.vcxproj", "{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}" + ProjectSection(ProjectDependencies) = postProject + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} = {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} + {6053CC38-CDEE-584C-8BC8-4B000D800FC7} = {6053CC38-CDEE-584C-8BC8-4B000D800FC7} + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + {75596CE6-5AE7-55C9-B890-C07B0A657A83} = {75596CE6-5AE7-55C9-B890-C07B0A657A83} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv", "wx_vc10_adv.vcxproj", "{24C45343-FD20-5C92-81C1-35A2AE841E79}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media", "wx_vc10_media.vcxproj", "{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "html", "wx_vc10_html.vcxproj", "{33CC42F9-7756-5587-863C-8D4461B7C5DD}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wx_vc10_webview.vcxproj", "{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wx_vc10_qa.vcxproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}" + ProjectSection(ProjectDependencies) = postProject + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "wx_vc10_xml.vcxproj", "{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}" + ProjectSection(ProjectDependencies) = postProject + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wx_vc10_xrc.vcxproj", "{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}" + ProjectSection(ProjectDependencies) = postProject + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aui", "wx_vc10_aui.vcxproj", "{A16D3832-0F42-57CE-8F48-50E06649ADE8}" + ProjectSection(ProjectDependencies) = postProject + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + {33CC42F9-7756-5587-863C-8D4461B7C5DD} = {33CC42F9-7756-5587-863C-8D4461B7C5DD} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wx_vc10_ribbon.vcxproj", "{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}" + ProjectSection(ProjectDependencies) = postProject + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propgrid", "wx_vc10_propgrid.vcxproj", "{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}" + ProjectSection(ProjectDependencies) = postProject + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "richtext", "wx_vc10_richtext.vcxproj", "{7FB0902D-8579-5DCE-B883-DAF66A885005}" + ProjectSection(ProjectDependencies) = postProject + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stc", "wx_vc10_stc.vcxproj", "{23E1C437-A951-5943-8639-A17F3CF2E606}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gl", "wx_vc10_gl.vcxproj", "{DA8B15EF-6750-5928-BC0E-C748213CF9B2}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Debug|x64 = DLL Debug|x64 + DLL Release|Win32 = DLL Release|Win32 + DLL Release|x64 = DLL Release|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|Win32.ActiveCfg = Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|Win32.Build.0 = Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.ActiveCfg = Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.Build.0 = Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|x64.Build.0 = DLL Release|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|Win32.ActiveCfg = Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|Win32.Build.0 = Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.ActiveCfg = Release|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.Build.0 = Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|Win32.ActiveCfg = Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|Win32.Build.0 = Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.ActiveCfg = Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.Build.0 = Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|x64.Build.0 = DLL Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|Win32.ActiveCfg = Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|Win32.Build.0 = Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.ActiveCfg = Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.Build.0 = Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|Win32.ActiveCfg = Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|Win32.Build.0 = Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.ActiveCfg = Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.Build.0 = Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|x64.Build.0 = DLL Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|Win32.ActiveCfg = Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|Win32.Build.0 = Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.ActiveCfg = Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.Build.0 = Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|Win32.Build.0 = Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.ActiveCfg = Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.Build.0 = Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|x64.Build.0 = DLL Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|Win32.ActiveCfg = Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|Win32.Build.0 = Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.ActiveCfg = Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.Build.0 = Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|Win32.ActiveCfg = Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|Win32.Build.0 = Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.ActiveCfg = Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.Build.0 = Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|x64.Build.0 = DLL Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|Win32.ActiveCfg = Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|Win32.Build.0 = Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.ActiveCfg = Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.Build.0 = Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|Win32.ActiveCfg = Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|Win32.Build.0 = Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.ActiveCfg = Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.Build.0 = Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|x64.Build.0 = DLL Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|Win32.ActiveCfg = Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|Win32.Build.0 = Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.ActiveCfg = Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.Build.0 = Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.ActiveCfg = Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.Build.0 = Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.ActiveCfg = Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.Build.0 = Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|x64.Build.0 = DLL Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.ActiveCfg = Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.Build.0 = Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.ActiveCfg = Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.Build.0 = Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.ActiveCfg = Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.Build.0 = Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.ActiveCfg = Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.Build.0 = Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.Build.0 = DLL Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.ActiveCfg = Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.Build.0 = Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.ActiveCfg = Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.Build.0 = Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|Win32.ActiveCfg = Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|Win32.Build.0 = Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.ActiveCfg = Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.Build.0 = Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|x64.Build.0 = DLL Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|Win32.ActiveCfg = Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|Win32.Build.0 = Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.ActiveCfg = Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.Build.0 = Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|Win32.ActiveCfg = Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|Win32.Build.0 = Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.ActiveCfg = Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.Build.0 = Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|x64.Build.0 = DLL Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|Win32.ActiveCfg = Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|Win32.Build.0 = Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.ActiveCfg = Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.Build.0 = Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|Win32.ActiveCfg = Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|Win32.Build.0 = Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.ActiveCfg = Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.Build.0 = Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|x64.Build.0 = DLL Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|Win32.ActiveCfg = Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|Win32.Build.0 = Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.ActiveCfg = Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.Build.0 = Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|Win32.ActiveCfg = Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|Win32.Build.0 = Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.ActiveCfg = Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.Build.0 = Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|x64.Build.0 = DLL Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|Win32.ActiveCfg = Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|Win32.Build.0 = Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.ActiveCfg = Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.Build.0 = Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|Win32.ActiveCfg = Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|Win32.Build.0 = Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.ActiveCfg = Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.Build.0 = Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|x64.Build.0 = DLL Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|Win32.ActiveCfg = Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|Win32.Build.0 = Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.ActiveCfg = Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.Build.0 = Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|Win32.ActiveCfg = Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|Win32.Build.0 = Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.ActiveCfg = Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.Build.0 = Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|x64.Build.0 = DLL Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|Win32.ActiveCfg = Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|Win32.Build.0 = Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.ActiveCfg = Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.Build.0 = Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|Win32.ActiveCfg = Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|Win32.Build.0 = Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.ActiveCfg = Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.Build.0 = Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|x64.Build.0 = DLL Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|Win32.ActiveCfg = Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|Win32.Build.0 = Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.ActiveCfg = Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.Build.0 = Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.Build.0 = Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.ActiveCfg = Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.Build.0 = Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.Build.0 = DLL Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.ActiveCfg = Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.Build.0 = Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.ActiveCfg = Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.Build.0 = Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|Win32.ActiveCfg = Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|Win32.Build.0 = Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.ActiveCfg = Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.Build.0 = Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|x64.Build.0 = DLL Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|Win32.ActiveCfg = Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|Win32.Build.0 = Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.ActiveCfg = Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.Build.0 = Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|Win32.ActiveCfg = Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|Win32.Build.0 = Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.ActiveCfg = Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.Build.0 = Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|x64.Build.0 = DLL Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|Win32.ActiveCfg = Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|Win32.Build.0 = Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.ActiveCfg = Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.Build.0 = Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.ActiveCfg = Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.Build.0 = Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.ActiveCfg = Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.Build.0 = Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|x64.Build.0 = DLL Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.ActiveCfg = Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.Build.0 = Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.ActiveCfg = Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.Build.0 = Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|Win32.ActiveCfg = Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|Win32.Build.0 = Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.ActiveCfg = Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.Build.0 = Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|x64.Build.0 = DLL Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|Win32.ActiveCfg = Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|Win32.Build.0 = Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.ActiveCfg = Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.Build.0 = Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|Win32.ActiveCfg = Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|Win32.Build.0 = Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.ActiveCfg = Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.Build.0 = Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|x64.Build.0 = DLL Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|Win32.ActiveCfg = Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|Win32.Build.0 = Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.ActiveCfg = Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.Build.0 = Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.ActiveCfg = Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.Build.0 = Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.ActiveCfg = Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.Build.0 = Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|x64.Build.0 = DLL Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.ActiveCfg = Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.Build.0 = Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.ActiveCfg = Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.Build.0 = Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|Win32.Build.0 = Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.ActiveCfg = Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.Build.0 = Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|x64.Build.0 = DLL Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|Win32.ActiveCfg = Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|Win32.Build.0 = Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.ActiveCfg = Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_adv.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_adv.vcxproj new file mode 100644 index 0000000000..76760d4a97 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_adv.vcxproj @@ -0,0 +1,658 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + adv + {24C45343-FD20-5C92-81C1-35A2AE841E79} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\adv\ + vc_x64_mswud\adv\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\adv\ + vc_x64_mswu\adv\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\adv\ + vc_x64_mswuddll\adv\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\adv\ + vc_x64_mswudll\adv\ + false + false + true + true + wxmsw30ud_adv + wxmsw30ud_adv + wxmsw30u_adv + wxmsw30u_adv + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_advlib.pch + $(OutDir)wxmsw30ud_adv.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_adv.lib + true + + + $(OutDir)wx_vc9_adv.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_advlib.pch + $(OutDir)wxmsw30ud_adv.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_adv.lib + true + + + $(OutDir)wx_vc9_adv.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_advlib.pch + $(OutDir)wxmsw30u_adv.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_adv.lib + true + + + $(OutDir)wx_vc9_adv.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_advlib.pch + $(OutDir)wxmsw30u_adv.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_adv.lib + true + + + $(OutDir)wx_vc9_adv.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_advdll.pch + $(OutDir)wxmsw30ud_adv_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_adv_vc_custom;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_adv_vc_custom.dll + $(OutDir)wxmsw30ud_adv.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_adv_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_adv.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_advdll.pch + $(OutDir)wxmsw30ud_adv_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_adv_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_adv_vc_x64_custom.dll + $(OutDir)wxmsw30ud_adv.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_adv_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_adv.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_advdll.pch + $(OutDir)wxmsw30u_adv_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_adv_vc_custom;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_adv_vc_custom.dll + $(OutDir)wxmsw30u_adv.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_adv_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_adv.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_advdll.pch + $(OutDir)wxmsw30u_adv_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_adv_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_adv_vc_x64_custom.dll + $(OutDir)wxmsw30u_adv.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_adv_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_adv.bsc + true + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + + + + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_adv.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_adv.vcxproj.filters new file mode 100644 index 0000000000..c683aa4e44 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_adv.vcxproj.filters @@ -0,0 +1,376 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {61C63C83-EF8C-51CA-A418-51936E7FCD4A} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_aui.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_aui.vcxproj new file mode 100644 index 0000000000..642cef4a98 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_aui.vcxproj @@ -0,0 +1,565 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + aui + {A16D3832-0F42-57CE-8F48-50E06649ADE8} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\aui\ + vc_x64_mswud\aui\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\aui\ + vc_x64_mswu\aui\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\aui\ + vc_x64_mswuddll\aui\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\aui\ + vc_x64_mswudll\aui\ + false + false + true + true + wxmsw30ud_aui + wxmsw30ud_aui + wxmsw30u_aui + wxmsw30u_aui + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_auilib.pch + $(OutDir)wxmsw30ud_aui.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_aui.lib + true + + + $(OutDir)wx_vc9_aui.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_auilib.pch + $(OutDir)wxmsw30ud_aui.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_aui.lib + true + + + $(OutDir)wx_vc9_aui.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_auilib.pch + $(OutDir)wxmsw30u_aui.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_aui.lib + true + + + $(OutDir)wx_vc9_aui.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_auilib.pch + $(OutDir)wxmsw30u_aui.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_aui.lib + true + + + $(OutDir)wx_vc9_aui.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_auidll.pch + $(OutDir)wxmsw30ud_aui_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_aui_vc_custom;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_adv.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_aui_vc_custom.dll + $(OutDir)wxmsw30ud_aui.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_aui_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_aui.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_auidll.pch + $(OutDir)wxmsw30ud_aui_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_aui_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_adv.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_aui_vc_x64_custom.dll + $(OutDir)wxmsw30ud_aui.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_aui_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_aui.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_auidll.pch + $(OutDir)wxmsw30u_aui_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_aui_vc_custom;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_adv.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_aui_vc_custom.dll + $(OutDir)wxmsw30u_aui.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_aui_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_aui.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_auidll.pch + $(OutDir)wxmsw30u_aui_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_aui_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_adv.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_aui_vc_x64_custom.dll + $(OutDir)wxmsw30u_aui.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_aui_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_aui.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_aui.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_aui.vcxproj.filters new file mode 100644 index 0000000000..8ce60aa177 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_aui.vcxproj.filters @@ -0,0 +1,95 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_base.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_base.vcxproj new file mode 100644 index 0000000000..752dc82712 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_base.vcxproj @@ -0,0 +1,859 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + base + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\base\ + vc_x64_mswud\base\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\base\ + vc_x64_mswu\base\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\base\ + vc_x64_mswuddll\base\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\base\ + vc_x64_mswudll\base\ + false + false + true + true + wxbase30ud + wxbase30ud + wx$(ProjectName)30ud_vc_custom + wx$(ProjectName)30ud_vc_x64_custom + wxbase30u + wxbase30u + wx$(ProjectName)30u_vc_custom + wx$(ProjectName)30u_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_baselib.pch + $(OutDir)wxbase30ud.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30ud.lib + true + + + $(OutDir)wx_vc9_base.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_baselib.pch + $(OutDir)wxbase30ud.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30ud.lib + true + + + $(OutDir)wx_vc9_base.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_baselib.pch + $(OutDir)wxbase30u.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30u.lib + true + + + $(OutDir)wx_vc9_base.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_baselib.pch + $(OutDir)wxbase30u.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30u.lib + true + + + $(OutDir)wx_vc9_base.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_basedll.pch + $(OutDir)wxbase30ud_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30ud_vc_custom;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + $(OutDir)wxbase30ud_vc_custom.dll + $(OutDir)wxbase30ud.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30ud_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_base.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_basedll.pch + $(OutDir)wxbase30ud_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30ud_vc_x64_custom;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + $(OutDir)wxbase30ud_vc_x64_custom.dll + $(OutDir)wxbase30ud.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30ud_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_base.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_basedll.pch + $(OutDir)wxbase30u_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30u_vc_custom;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + $(OutDir)wxbase30u_vc_custom.dll + $(OutDir)wxbase30u.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30u_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_base.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_basedll.pch + $(OutDir)wxbase30u_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30u_vc_x64_custom;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + $(OutDir)wxbase30u_vc_x64_custom.dll + $(OutDir)wxbase30u.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30u_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_base.bsc + true + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + + + + + + + + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_base.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_base.vcxproj.filters new file mode 100644 index 0000000000..7dbd959a59 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_base.vcxproj.filters @@ -0,0 +1,931 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {61C63C83-EF8C-51CA-A418-51936E7FCD4A} + + + {B4103426-A5DB-5CF0-A30E-BC9546513AAF} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + Generic Sources + + + Common Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + Generic Headers + + + wxHTML Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_core.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_core.vcxproj new file mode 100644 index 0000000000..edac84fdb3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_core.vcxproj @@ -0,0 +1,1717 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + core + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\core\ + vc_x64_mswud\core\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\core\ + vc_x64_mswu\core\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\core\ + vc_x64_mswuddll\core\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\core\ + vc_x64_mswudll\core\ + false + false + true + true + wxmsw30ud_core + wxmsw30ud_core + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_core + wxmsw30u_core + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_corelib.pch + $(OutDir)wxmsw30ud_core.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_core.lib + true + + + $(OutDir)wx_vc9_core.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_corelib.pch + $(OutDir)wxmsw30ud_core.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_core.lib + true + + + $(OutDir)wx_vc9_core.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_corelib.pch + $(OutDir)wxmsw30u_core.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_core.lib + true + + + $(OutDir)wx_vc9_core.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_corelib.pch + $(OutDir)wxmsw30u_core.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_core.lib + true + + + $(OutDir)wx_vc9_core.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_coredll.pch + $(OutDir)wxmsw30ud_core_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_core_vc_custom;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_core_vc_custom.dll + $(OutDir)wxmsw30ud_core.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_core_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_core.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_coredll.pch + $(OutDir)wxmsw30ud_core_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_core_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_core_vc_x64_custom.dll + $(OutDir)wxmsw30ud_core.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_core_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_core.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_coredll.pch + $(OutDir)wxmsw30u_core_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_core_vc_custom;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_core_vc_custom.dll + $(OutDir)wxmsw30u_core.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_core_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_core.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_coredll.pch + $(OutDir)wxmsw30u_core_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_core_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_core_vc_x64_custom.dll + $(OutDir)wxmsw30u_core.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_core_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_core.bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vc_mswuddll\core\msw_accel.obj + vc_x64_mswuddll\core\msw_accel.obj + vc_mswudll\core\msw_accel.obj + vc_x64_mswudll\core\msw_accel.obj + vc_mswud\core\msw_accel.obj + vc_x64_mswud\core\msw_accel.obj + vc_mswu\core\msw_accel.obj + vc_x64_mswu\core\msw_accel.obj + + + + + + + + + + vc_mswuddll\core\msw_bmpbuttn.obj + vc_x64_mswuddll\core\msw_bmpbuttn.obj + vc_mswudll\core\msw_bmpbuttn.obj + vc_x64_mswudll\core\msw_bmpbuttn.obj + vc_mswud\core\msw_bmpbuttn.obj + vc_x64_mswud\core\msw_bmpbuttn.obj + vc_mswu\core\msw_bmpbuttn.obj + vc_x64_mswu\core\msw_bmpbuttn.obj + + + + vc_mswuddll\core\msw_button.obj + vc_x64_mswuddll\core\msw_button.obj + vc_mswudll\core\msw_button.obj + vc_x64_mswudll\core\msw_button.obj + vc_mswud\core\msw_button.obj + vc_x64_mswud\core\msw_button.obj + vc_mswu\core\msw_button.obj + vc_x64_mswu\core\msw_button.obj + + + + vc_mswuddll\core\msw_checkbox.obj + vc_x64_mswuddll\core\msw_checkbox.obj + vc_mswudll\core\msw_checkbox.obj + vc_x64_mswudll\core\msw_checkbox.obj + vc_mswud\core\msw_checkbox.obj + vc_x64_mswud\core\msw_checkbox.obj + vc_mswu\core\msw_checkbox.obj + vc_x64_mswu\core\msw_checkbox.obj + + + vc_mswuddll\core\msw_checklst.obj + vc_x64_mswuddll\core\msw_checklst.obj + vc_mswudll\core\msw_checklst.obj + vc_x64_mswudll\core\msw_checklst.obj + vc_mswud\core\msw_checklst.obj + vc_x64_mswud\core\msw_checklst.obj + vc_mswu\core\msw_checklst.obj + vc_x64_mswu\core\msw_checklst.obj + + + vc_mswuddll\core\msw_choice.obj + vc_x64_mswuddll\core\msw_choice.obj + vc_mswudll\core\msw_choice.obj + vc_x64_mswudll\core\msw_choice.obj + vc_mswud\core\msw_choice.obj + vc_x64_mswud\core\msw_choice.obj + vc_mswu\core\msw_choice.obj + vc_x64_mswu\core\msw_choice.obj + + + + + + + vc_mswuddll\core\msw_combobox.obj + vc_x64_mswuddll\core\msw_combobox.obj + vc_mswudll\core\msw_combobox.obj + vc_x64_mswudll\core\msw_combobox.obj + vc_mswud\core\msw_combobox.obj + vc_x64_mswud\core\msw_combobox.obj + vc_mswu\core\msw_combobox.obj + vc_x64_mswu\core\msw_combobox.obj + + + vc_mswuddll\core\msw_control.obj + vc_x64_mswuddll\core\msw_control.obj + vc_mswudll\core\msw_control.obj + vc_x64_mswudll\core\msw_control.obj + vc_mswud\core\msw_control.obj + vc_x64_mswud\core\msw_control.obj + vc_mswu\core\msw_control.obj + vc_x64_mswu\core\msw_control.obj + + + + + + + + + + + vc_mswuddll\core\msw_dialog.obj + vc_x64_mswuddll\core\msw_dialog.obj + vc_mswudll\core\msw_dialog.obj + vc_x64_mswudll\core\msw_dialog.obj + vc_mswud\core\msw_dialog.obj + vc_x64_mswud\core\msw_dialog.obj + vc_mswu\core\msw_dialog.obj + vc_x64_mswu\core\msw_dialog.obj + + + + + + + + + + + + vc_mswuddll\core\msw_fdrepdlg.obj + vc_x64_mswuddll\core\msw_fdrepdlg.obj + vc_mswudll\core\msw_fdrepdlg.obj + vc_x64_mswudll\core\msw_fdrepdlg.obj + vc_mswud\core\msw_fdrepdlg.obj + vc_x64_mswud\core\msw_fdrepdlg.obj + vc_mswu\core\msw_fdrepdlg.obj + vc_x64_mswu\core\msw_fdrepdlg.obj + + + + + + + + + vc_mswuddll\core\msw_gauge.obj + vc_x64_mswuddll\core\msw_gauge.obj + vc_mswudll\core\msw_gauge.obj + vc_x64_mswudll\core\msw_gauge.obj + vc_mswud\core\msw_gauge.obj + vc_x64_mswud\core\msw_gauge.obj + vc_mswu\core\msw_gauge.obj + vc_x64_mswu\core\msw_gauge.obj + + + + + + + + + + + + + vc_mswuddll\core\msw_listbox.obj + vc_x64_mswuddll\core\msw_listbox.obj + vc_mswudll\core\msw_listbox.obj + vc_x64_mswudll\core\msw_listbox.obj + vc_mswud\core\msw_listbox.obj + vc_x64_mswud\core\msw_listbox.obj + vc_mswu\core\msw_listbox.obj + vc_x64_mswu\core\msw_listbox.obj + + + vc_mswuddll\core\msw_listctrl.obj + vc_x64_mswuddll\core\msw_listctrl.obj + vc_mswudll\core\msw_listctrl.obj + vc_x64_mswudll\core\msw_listctrl.obj + vc_mswud\core\msw_listctrl.obj + vc_x64_mswud\core\msw_listctrl.obj + vc_mswu\core\msw_listctrl.obj + vc_x64_mswu\core\msw_listctrl.obj + + + + + vc_mswuddll\core\msw_menu.obj + vc_x64_mswuddll\core\msw_menu.obj + vc_mswudll\core\msw_menu.obj + vc_x64_mswudll\core\msw_menu.obj + vc_mswud\core\msw_menu.obj + vc_x64_mswud\core\msw_menu.obj + vc_mswu\core\msw_menu.obj + vc_x64_mswu\core\msw_menu.obj + + + + + + + + + + + vc_mswuddll\core\msw_notebook.obj + vc_x64_mswuddll\core\msw_notebook.obj + vc_mswudll\core\msw_notebook.obj + vc_x64_mswudll\core\msw_notebook.obj + vc_mswud\core\msw_notebook.obj + vc_x64_mswud\core\msw_notebook.obj + vc_mswu\core\msw_notebook.obj + vc_x64_mswu\core\msw_notebook.obj + + + + + + + + + + + + + vc_mswuddll\core\msw_radiobox.obj + vc_x64_mswuddll\core\msw_radiobox.obj + vc_mswudll\core\msw_radiobox.obj + vc_x64_mswudll\core\msw_radiobox.obj + vc_mswud\core\msw_radiobox.obj + vc_x64_mswud\core\msw_radiobox.obj + vc_mswu\core\msw_radiobox.obj + vc_x64_mswu\core\msw_radiobox.obj + + + vc_mswuddll\core\msw_radiobut.obj + vc_x64_mswuddll\core\msw_radiobut.obj + vc_mswudll\core\msw_radiobut.obj + vc_x64_mswudll\core\msw_radiobut.obj + vc_mswud\core\msw_radiobut.obj + vc_x64_mswud\core\msw_radiobut.obj + vc_mswu\core\msw_radiobut.obj + vc_x64_mswu\core\msw_radiobut.obj + + + + + + vc_mswuddll\core\msw_scrolbar.obj + vc_x64_mswuddll\core\msw_scrolbar.obj + vc_mswudll\core\msw_scrolbar.obj + vc_x64_mswudll\core\msw_scrolbar.obj + vc_mswud\core\msw_scrolbar.obj + vc_x64_mswud\core\msw_scrolbar.obj + vc_mswu\core\msw_scrolbar.obj + vc_x64_mswu\core\msw_scrolbar.obj + + + + vc_mswuddll\core\msw_slider.obj + vc_x64_mswuddll\core\msw_slider.obj + vc_mswudll\core\msw_slider.obj + vc_x64_mswudll\core\msw_slider.obj + vc_mswud\core\msw_slider.obj + vc_x64_mswud\core\msw_slider.obj + vc_mswu\core\msw_slider.obj + vc_x64_mswu\core\msw_slider.obj + + + vc_mswuddll\core\msw_spinbutt.obj + vc_x64_mswuddll\core\msw_spinbutt.obj + vc_mswudll\core\msw_spinbutt.obj + vc_x64_mswudll\core\msw_spinbutt.obj + vc_mswud\core\msw_spinbutt.obj + vc_x64_mswud\core\msw_spinbutt.obj + vc_mswu\core\msw_spinbutt.obj + vc_x64_mswu\core\msw_spinbutt.obj + + + + vc_mswuddll\core\msw_statbmp.obj + vc_x64_mswuddll\core\msw_statbmp.obj + vc_mswudll\core\msw_statbmp.obj + vc_x64_mswudll\core\msw_statbmp.obj + vc_mswud\core\msw_statbmp.obj + vc_x64_mswud\core\msw_statbmp.obj + vc_mswu\core\msw_statbmp.obj + vc_x64_mswu\core\msw_statbmp.obj + + + vc_mswuddll\core\msw_statbox.obj + vc_x64_mswuddll\core\msw_statbox.obj + vc_mswudll\core\msw_statbox.obj + vc_x64_mswudll\core\msw_statbox.obj + vc_mswud\core\msw_statbox.obj + vc_x64_mswud\core\msw_statbox.obj + vc_mswu\core\msw_statbox.obj + vc_x64_mswu\core\msw_statbox.obj + + + vc_mswuddll\core\msw_statline.obj + vc_x64_mswuddll\core\msw_statline.obj + vc_mswudll\core\msw_statline.obj + vc_x64_mswudll\core\msw_statline.obj + vc_mswud\core\msw_statline.obj + vc_x64_mswud\core\msw_statline.obj + vc_mswu\core\msw_statline.obj + vc_x64_mswu\core\msw_statline.obj + + + vc_mswuddll\core\msw_stattext.obj + vc_x64_mswuddll\core\msw_stattext.obj + vc_mswudll\core\msw_stattext.obj + vc_x64_mswudll\core\msw_stattext.obj + vc_mswud\core\msw_stattext.obj + vc_x64_mswud\core\msw_stattext.obj + vc_mswu\core\msw_stattext.obj + vc_x64_mswu\core\msw_stattext.obj + + + + vc_mswuddll\core\msw_textctrl.obj + vc_x64_mswuddll\core\msw_textctrl.obj + vc_mswudll\core\msw_textctrl.obj + vc_x64_mswudll\core\msw_textctrl.obj + vc_mswud\core\msw_textctrl.obj + vc_x64_mswud\core\msw_textctrl.obj + vc_mswu\core\msw_textctrl.obj + vc_x64_mswu\core\msw_textctrl.obj + + + + vc_mswuddll\core\msw_textmeasure.obj + vc_x64_mswuddll\core\msw_textmeasure.obj + vc_mswudll\core\msw_textmeasure.obj + vc_x64_mswudll\core\msw_textmeasure.obj + vc_mswud\core\msw_textmeasure.obj + vc_x64_mswud\core\msw_textmeasure.obj + vc_mswu\core\msw_textmeasure.obj + vc_x64_mswu\core\msw_textmeasure.obj + + + vc_mswuddll\core\msw_tglbtn.obj + vc_x64_mswuddll\core\msw_tglbtn.obj + vc_mswudll\core\msw_tglbtn.obj + vc_x64_mswudll\core\msw_tglbtn.obj + vc_mswud\core\msw_tglbtn.obj + vc_x64_mswud\core\msw_tglbtn.obj + vc_mswu\core\msw_tglbtn.obj + vc_x64_mswu\core\msw_tglbtn.obj + + + vc_mswuddll\core\msw_toolbar.obj + vc_x64_mswuddll\core\msw_toolbar.obj + vc_mswudll\core\msw_toolbar.obj + vc_x64_mswudll\core\msw_toolbar.obj + vc_mswud\core\msw_toolbar.obj + vc_x64_mswud\core\msw_toolbar.obj + vc_mswu\core\msw_toolbar.obj + vc_x64_mswu\core\msw_toolbar.obj + + + + + + + + + + + + + true + true + true + true + true + true + true + true + + + + + + + + + true + true + true + true + true + true + true + true + + + + + + true + true + true + true + true + true + true + true + + + + true + true + true + true + true + true + true + true + + + + true + true + true + true + true + true + true + true + + + + true + true + true + true + true + true + true + true + + + + + + + + true + true + true + true + true + true + true + true + + + + + true + true + true + true + true + true + true + true + + + + + + + + + + + + + + + + + vc_mswuddll\core\generic_statusbr.obj + vc_x64_mswuddll\core\generic_statusbr.obj + vc_mswudll\core\generic_statusbr.obj + vc_x64_mswudll\core\generic_statusbr.obj + vc_mswud\core\generic_statusbr.obj + vc_x64_mswud\core\generic_statusbr.obj + vc_mswu\core\generic_statusbr.obj + vc_x64_mswu\core\generic_statusbr.obj + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_core.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_core.vcxproj.filters new file mode 100644 index 0000000000..5f5c1635dd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_core.vcxproj.filters @@ -0,0 +1,2551 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {61C63C83-EF8C-51CA-A418-51936E7FCD4A} + + + {B4103426-A5DB-5CF0-A30E-BC9546513AAF} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + MSW Sources + + + + + + Common Sources + + + Generic Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_gl.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_gl.vcxproj new file mode 100644 index 0000000000..69dcb4a5fa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_gl.vcxproj @@ -0,0 +1,552 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + gl + {DA8B15EF-6750-5928-BC0E-C748213CF9B2} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\gl\ + vc_x64_mswud\gl\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\gl\ + vc_x64_mswu\gl\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\gl\ + vc_x64_mswuddll\gl\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\gl\ + vc_x64_mswudll\gl\ + false + false + true + true + wxmsw30ud_gl + wxmsw30ud_gl + wxmsw30u_gl + wxmsw30u_gl + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_gllib.pch + $(OutDir)wxmsw30ud_gl.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_gl.lib + true + + + $(OutDir)wx_vc9_gl.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_gllib.pch + $(OutDir)wxmsw30ud_gl.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_gl.lib + true + + + $(OutDir)wx_vc9_gl.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_gllib.pch + $(OutDir)wxmsw30u_gl.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_gl.lib + true + + + $(OutDir)wx_vc9_gl.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_gllib.pch + $(OutDir)wxmsw30u_gl.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_gl.lib + true + + + $(OutDir)wx_vc9_gl.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_gldll.pch + $(OutDir)wxmsw30ud_gl_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_gl_vc_custom;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;wxmsw30ud_core.lib;wxbase30ud.lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_gl_vc_custom.dll + $(OutDir)wxmsw30ud_gl.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_gl_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_gl.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_gldll.pch + $(OutDir)wxmsw30ud_gl_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_gl_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;wxmsw30ud_core.lib;wxbase30ud.lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_gl_vc_x64_custom.dll + $(OutDir)wxmsw30ud_gl.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_gl_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_gl.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_gldll.pch + $(OutDir)wxmsw30u_gl_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_gl_vc_custom;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;wxmsw30u_core.lib;wxbase30u.lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_gl_vc_custom.dll + $(OutDir)wxmsw30u_gl.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_gl_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_gl.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_gldll.pch + $(OutDir)wxmsw30u_gl_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_gl_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;wxmsw30u_core.lib;wxbase30u.lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_gl_vc_x64_custom.dll + $(OutDir)wxmsw30u_gl.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_gl_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_gl.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_gl.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_gl.vcxproj.filters new file mode 100644 index 0000000000..7425caae50 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_gl.vcxproj.filters @@ -0,0 +1,52 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + MSW Sources + + + + + MSW Sources + + + + + MSW Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_html.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_html.vcxproj new file mode 100644 index 0000000000..df99bdbaf6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_html.vcxproj @@ -0,0 +1,593 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + html + {33CC42F9-7756-5587-863C-8D4461B7C5DD} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\html\ + vc_x64_mswud\html\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\html\ + vc_x64_mswu\html\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\html\ + vc_x64_mswuddll\html\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\html\ + vc_x64_mswudll\html\ + false + false + true + true + wxmsw30ud_html + wxmsw30ud_html + wxmsw30u_html + wxmsw30u_html + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_htmllib.pch + $(OutDir)wxmsw30ud_html.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_html.lib + true + + + $(OutDir)wx_vc9_html.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_htmllib.pch + $(OutDir)wxmsw30ud_html.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_html.lib + true + + + $(OutDir)wx_vc9_html.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_htmllib.pch + $(OutDir)wxmsw30u_html.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_html.lib + true + + + $(OutDir)wx_vc9_html.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_htmllib.pch + $(OutDir)wxmsw30u_html.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_html.lib + true + + + $(OutDir)wx_vc9_html.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_htmldll.pch + $(OutDir)wxmsw30ud_html_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_html_vc_custom;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_html_vc_custom.dll + $(OutDir)wxmsw30ud_html.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_html_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_html.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_htmldll.pch + $(OutDir)wxmsw30ud_html_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_html_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_html_vc_x64_custom.dll + $(OutDir)wxmsw30ud_html.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_html_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_html.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_htmldll.pch + $(OutDir)wxmsw30u_html_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_html_vc_custom;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_html_vc_custom.dll + $(OutDir)wxmsw30u_html.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_html_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_html.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_htmldll.pch + $(OutDir)wxmsw30u_html_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_html_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_html_vc_x64_custom.dll + $(OutDir)wxmsw30u_html.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_html_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_html.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_html.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_html.vcxproj.filters new file mode 100644 index 0000000000..0ec72a4a42 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_html.vcxproj.filters @@ -0,0 +1,184 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {2F6FA2A9-E2B7-5B50-9F90-38855A21AF00} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {B4103426-A5DB-5CF0-A30E-BC9546513AAF} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + MSW Sources + + + Generic Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + + + MSW Sources + + + + + MSW Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_media.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_media.vcxproj new file mode 100644 index 0000000000..7463063ccf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_media.vcxproj @@ -0,0 +1,553 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + media + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\media\ + vc_x64_mswud\media\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\media\ + vc_x64_mswu\media\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\media\ + vc_x64_mswuddll\media\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\media\ + vc_x64_mswudll\media\ + false + false + true + true + wxmsw30ud_media + wxmsw30ud_media + wxmsw30u_media + wxmsw30u_media + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_medialib.pch + $(OutDir)wxmsw30ud_media.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_media.lib + true + + + $(OutDir)wx_vc9_media.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_medialib.pch + $(OutDir)wxmsw30ud_media.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_media.lib + true + + + $(OutDir)wx_vc9_media.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_medialib.pch + $(OutDir)wxmsw30u_media.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_media.lib + true + + + $(OutDir)wx_vc9_media.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_medialib.pch + $(OutDir)wxmsw30u_media.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_media.lib + true + + + $(OutDir)wx_vc9_media.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_mediadll.pch + $(OutDir)wxmsw30ud_media_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_media_vc_custom;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_media_vc_custom.dll + $(OutDir)wxmsw30ud_media.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_media_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_media.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_mediadll.pch + $(OutDir)wxmsw30ud_media_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_media_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_media_vc_x64_custom.dll + $(OutDir)wxmsw30ud_media.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_media_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_media.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_mediadll.pch + $(OutDir)wxmsw30u_media_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_media_vc_custom;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_media_vc_custom.dll + $(OutDir)wxmsw30u_media.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_media_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_media.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_mediadll.pch + $(OutDir)wxmsw30u_media_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_media_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_media_vc_x64_custom.dll + $(OutDir)wxmsw30u_media.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_media_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_media.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_media.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_media.vcxproj.filters new file mode 100644 index 0000000000..86c8194d48 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_media.vcxproj.filters @@ -0,0 +1,55 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + + + MSW Sources + + + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_net.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_net.vcxproj new file mode 100644 index 0000000000..5d5162f218 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_net.vcxproj @@ -0,0 +1,571 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + net + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\net\ + vc_x64_mswud\net\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\net\ + vc_x64_mswu\net\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\net\ + vc_x64_mswuddll\net\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\net\ + vc_x64_mswudll\net\ + false + false + true + true + wxbase30ud_net + wxbase30ud_net + wxbase30u_net + wxbase30u_net + wxbase30ud_$(ProjectName)_vc_custom + wxbase30ud_$(ProjectName)_vc_x64_custom + wxbase30u_$(ProjectName)_vc_custom + wxbase30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_netlib.pch + $(OutDir)wxbase30ud_net.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30ud_net.lib + true + + + $(OutDir)wx_vc9_net.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_netlib.pch + $(OutDir)wxbase30ud_net.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30ud_net.lib + true + + + $(OutDir)wx_vc9_net.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_netlib.pch + $(OutDir)wxbase30u_net.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30u_net.lib + true + + + $(OutDir)wx_vc9_net.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_netlib.pch + $(OutDir)wxbase30u_net.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30u_net.lib + true + + + $(OutDir)wx_vc9_net.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_netdll.pch + $(OutDir)wxbase30ud_net_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30ud_net_vc_custom;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxbase30ud_net_vc_custom.dll + $(OutDir)wxbase30ud_net.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30ud_net_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_net.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_netdll.pch + $(OutDir)wxbase30ud_net_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30ud_net_vc_x64_custom;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxbase30ud_net_vc_x64_custom.dll + $(OutDir)wxbase30ud_net.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30ud_net_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_net.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_netdll.pch + $(OutDir)wxbase30u_net_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30u_net_vc_custom;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxbase30u_net_vc_custom.dll + $(OutDir)wxbase30u_net.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30u_net_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_net.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_netdll.pch + $(OutDir)wxbase30u_net_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30u_net_vc_x64_custom;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxbase30u_net_vc_x64_custom.dll + $(OutDir)wxbase30u_net.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30u_net_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_net.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_net.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_net.vcxproj.filters new file mode 100644 index 0000000000..a035d90fe4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_net.vcxproj.filters @@ -0,0 +1,109 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_propgrid.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_propgrid.vcxproj new file mode 100644 index 0000000000..83a4c1fd54 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_propgrid.vcxproj @@ -0,0 +1,565 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + propgrid + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\propgrid\ + vc_x64_mswud\propgrid\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\propgrid\ + vc_x64_mswu\propgrid\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\propgrid\ + vc_x64_mswuddll\propgrid\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\propgrid\ + vc_x64_mswudll\propgrid\ + false + false + true + true + wxmsw30ud_propgrid + wxmsw30ud_propgrid + wxmsw30u_propgrid + wxmsw30u_propgrid + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_propgridlib.pch + $(OutDir)wxmsw30ud_propgrid.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_propgrid.lib + true + + + $(OutDir)wx_vc9_propgrid.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_propgridlib.pch + $(OutDir)wxmsw30ud_propgrid.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_propgrid.lib + true + + + $(OutDir)wx_vc9_propgrid.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_propgridlib.pch + $(OutDir)wxmsw30u_propgrid.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_propgrid.lib + true + + + $(OutDir)wx_vc9_propgrid.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_propgridlib.pch + $(OutDir)wxmsw30u_propgrid.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_propgrid.lib + true + + + $(OutDir)wx_vc9_propgrid.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_propgriddll.pch + $(OutDir)wxmsw30ud_propgrid_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_propgrid_vc_custom;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_adv.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_propgrid_vc_custom.dll + $(OutDir)wxmsw30ud_propgrid.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_propgrid_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_propgrid.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_propgriddll.pch + $(OutDir)wxmsw30ud_propgrid_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_propgrid_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_adv.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_propgrid_vc_x64_custom.dll + $(OutDir)wxmsw30ud_propgrid.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_propgrid_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_propgrid.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_propgriddll.pch + $(OutDir)wxmsw30u_propgrid_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_propgrid_vc_custom;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_adv.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_propgrid_vc_custom.dll + $(OutDir)wxmsw30u_propgrid.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_propgrid_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_propgrid.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_propgriddll.pch + $(OutDir)wxmsw30u_propgrid_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_propgrid_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_adv.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_propgrid_vc_x64_custom.dll + $(OutDir)wxmsw30u_propgrid.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_propgrid_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_propgrid.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_propgrid.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_propgrid.vcxproj.filters new file mode 100644 index 0000000000..e5bc5d5bca --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_propgrid.vcxproj.filters @@ -0,0 +1,95 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_qa.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_qa.vcxproj new file mode 100644 index 0000000000..dbe1f7daa6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_qa.vcxproj @@ -0,0 +1,551 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + qa + {E21129E0-7C08-5936-9D8C-0D60B5319BA7} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\qa\ + vc_x64_mswud\qa\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\qa\ + vc_x64_mswu\qa\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\qa\ + vc_x64_mswuddll\qa\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\qa\ + vc_x64_mswudll\qa\ + false + false + true + true + wxmsw30ud_qa + wxmsw30ud_qa + wxmsw30u_qa + wxmsw30u_qa + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_qalib.pch + $(OutDir)wxmsw30ud_qa.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_qa.lib + true + + + $(OutDir)wx_vc9_qa.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_qalib.pch + $(OutDir)wxmsw30ud_qa.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_qa.lib + true + + + $(OutDir)wx_vc9_qa.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_qalib.pch + $(OutDir)wxmsw30u_qa.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_qa.lib + true + + + $(OutDir)wx_vc9_qa.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_qalib.pch + $(OutDir)wxmsw30u_qa.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_qa.lib + true + + + $(OutDir)wx_vc9_qa.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_qadll.pch + $(OutDir)wxmsw30ud_qa_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_qa_vc_custom;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;$(OutDir)wxbase30ud_xml.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_qa_vc_custom.dll + $(OutDir)wxmsw30ud_qa.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_qa_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_qa.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_qadll.pch + $(OutDir)wxmsw30ud_qa_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_qa_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;$(OutDir)wxbase30ud_xml.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_qa_vc_x64_custom.dll + $(OutDir)wxmsw30ud_qa.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_qa_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_qa.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_qadll.pch + $(OutDir)wxmsw30u_qa_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_qa_vc_custom;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;$(OutDir)wxbase30u_xml.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_qa_vc_custom.dll + $(OutDir)wxmsw30u_qa.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_qa_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_qa.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_qadll.pch + $(OutDir)wxmsw30u_qa_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_qa_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;$(OutDir)wxbase30u_xml.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_qa_vc_x64_custom.dll + $(OutDir)wxmsw30u_qa.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_qa_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_qa.bsc + true + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_qa.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_qa.vcxproj.filters new file mode 100644 index 0000000000..6f46761f46 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_qa.vcxproj.filters @@ -0,0 +1,52 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Generic Sources + + + + + MSW Sources + + + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_ribbon.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_ribbon.vcxproj new file mode 100644 index 0000000000..8d937b8132 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_ribbon.vcxproj @@ -0,0 +1,569 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + ribbon + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\ribbon\ + vc_x64_mswud\ribbon\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\ribbon\ + vc_x64_mswu\ribbon\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\ribbon\ + vc_x64_mswuddll\ribbon\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\ribbon\ + vc_x64_mswudll\ribbon\ + false + false + true + true + wxmsw30ud_ribbon + wxmsw30ud_ribbon + wxmsw30u_ribbon + wxmsw30u_ribbon + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_ribbonlib.pch + $(OutDir)wxmsw30ud_ribbon.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_ribbon.lib + true + + + $(OutDir)wx_vc9_ribbon.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_ribbonlib.pch + $(OutDir)wxmsw30ud_ribbon.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_ribbon.lib + true + + + $(OutDir)wx_vc9_ribbon.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_ribbonlib.pch + $(OutDir)wxmsw30u_ribbon.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_ribbon.lib + true + + + $(OutDir)wx_vc9_ribbon.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_ribbonlib.pch + $(OutDir)wxmsw30u_ribbon.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_ribbon.lib + true + + + $(OutDir)wx_vc9_ribbon.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_ribbondll.pch + $(OutDir)wxmsw30ud_ribbon_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_ribbon_vc_custom;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_adv.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_ribbon_vc_custom.dll + $(OutDir)wxmsw30ud_ribbon.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_ribbon_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_ribbon.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_ribbondll.pch + $(OutDir)wxmsw30ud_ribbon_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_ribbon_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_adv.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_ribbon_vc_x64_custom.dll + $(OutDir)wxmsw30ud_ribbon.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_ribbon_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_ribbon.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_ribbondll.pch + $(OutDir)wxmsw30u_ribbon_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_ribbon_vc_custom;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_adv.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_ribbon_vc_custom.dll + $(OutDir)wxmsw30u_ribbon.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_ribbon_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_ribbon.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_ribbondll.pch + $(OutDir)wxmsw30u_ribbon_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_ribbon_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_adv.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_ribbon_vc_x64_custom.dll + $(OutDir)wxmsw30u_ribbon.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_ribbon_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_ribbon.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_ribbon.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_ribbon.vcxproj.filters new file mode 100644 index 0000000000..9395b143f7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_ribbon.vcxproj.filters @@ -0,0 +1,107 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_richtext.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_richtext.vcxproj new file mode 100644 index 0000000000..3df210aa38 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_richtext.vcxproj @@ -0,0 +1,579 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + richtext + {7FB0902D-8579-5DCE-B883-DAF66A885005} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\richtext\ + vc_x64_mswud\richtext\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\richtext\ + vc_x64_mswu\richtext\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\richtext\ + vc_x64_mswuddll\richtext\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\richtext\ + vc_x64_mswudll\richtext\ + false + false + true + true + wxmsw30ud_richtext + wxmsw30ud_richtext + wxmsw30u_richtext + wxmsw30u_richtext + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_richtextlib.pch + $(OutDir)wxmsw30ud_richtext.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_richtext.lib + true + + + $(OutDir)wx_vc9_richtext.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_richtextlib.pch + $(OutDir)wxmsw30ud_richtext.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_richtext.lib + true + + + $(OutDir)wx_vc9_richtext.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_richtextlib.pch + $(OutDir)wxmsw30u_richtext.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_richtext.lib + true + + + $(OutDir)wx_vc9_richtext.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_richtextlib.pch + $(OutDir)wxmsw30u_richtext.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_richtext.lib + true + + + $(OutDir)wx_vc9_richtext.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_richtextdll.pch + $(OutDir)wxmsw30ud_richtext_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_richtext_vc_custom;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_adv.lib;$(OutDir)wxmsw30ud_html.lib;$(OutDir)wxbase30ud_xml.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_richtext_vc_custom.dll + $(OutDir)wxmsw30ud_richtext.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_richtext_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_richtext.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_richtextdll.pch + $(OutDir)wxmsw30ud_richtext_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_richtext_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_adv.lib;$(OutDir)wxmsw30ud_html.lib;$(OutDir)wxbase30ud_xml.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_richtext_vc_x64_custom.dll + $(OutDir)wxmsw30ud_richtext.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_richtext_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_richtext.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_richtextdll.pch + $(OutDir)wxmsw30u_richtext_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_richtext_vc_custom;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_adv.lib;$(OutDir)wxmsw30u_html.lib;$(OutDir)wxbase30u_xml.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_richtext_vc_custom.dll + $(OutDir)wxmsw30u_richtext.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_richtext_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_richtext.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_richtextdll.pch + $(OutDir)wxmsw30u_richtext_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_richtext_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_adv.lib;$(OutDir)wxmsw30u_html.lib;$(OutDir)wxbase30u_xml.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_richtext_vc_x64_custom.dll + $(OutDir)wxmsw30u_richtext.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_richtext_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_richtext.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_richtext.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_richtext.vcxproj.filters new file mode 100644 index 0000000000..0c12699475 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_richtext.vcxproj.filters @@ -0,0 +1,137 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_stc.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_stc.vcxproj new file mode 100644 index 0000000000..c80da2e4f9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_stc.vcxproj @@ -0,0 +1,558 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + stc + {23E1C437-A951-5943-8639-A17F3CF2E606} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\stc\ + vc_x64_mswud\stc\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\stc\ + vc_x64_mswu\stc\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\stc\ + vc_x64_mswuddll\stc\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\stc\ + vc_x64_mswudll\stc\ + false + false + true + true + wxmsw30ud_stc + wxmsw30ud_stc + wxmsw30u_stc + wxmsw30u_stc + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_stclib.pch + $(OutDir)wxmsw30ud_stc.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_stc.lib + true + + + $(OutDir)wx_vc9_stc.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_stclib.pch + $(OutDir)wxmsw30ud_stc.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_stc.lib + true + + + $(OutDir)wx_vc9_stc.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_stclib.pch + $(OutDir)wxmsw30u_stc.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_stc.lib + true + + + $(OutDir)wx_vc9_stc.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_stclib.pch + $(OutDir)wxmsw30u_stc.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_stc.lib + true + + + $(OutDir)wx_vc9_stc.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_stcdll.pch + $(OutDir)wxmsw30ud_stc_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_stc_vc_custom;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxscintillad.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_stc_vc_custom.dll + $(OutDir)wxmsw30ud_stc.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_stc_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_stc.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_stcdll.pch + $(OutDir)wxmsw30ud_stc_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_stc_vc_x64_custom;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxscintillad.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_stc_vc_x64_custom.dll + $(OutDir)wxmsw30ud_stc.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_stc_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_stc.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_stcdll.pch + $(OutDir)wxmsw30u_stc_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_stc_vc_custom;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxscintilla.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_stc_vc_custom.dll + $(OutDir)wxmsw30u_stc.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_stc_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_stc.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_stcdll.pch + $(OutDir)wxmsw30u_stc_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_stc_vc_x64_custom;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxscintilla.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_stc_vc_x64_custom.dll + $(OutDir)wxmsw30u_stc.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_stc_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_stc.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + {74827ebd-93dc-5110-ba95-3f2ab029b6b0} + false + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_stc.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_stc.vcxproj.filters new file mode 100644 index 0000000000..ad555d0c97 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_stc.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_webview.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_webview.vcxproj new file mode 100644 index 0000000000..5ec8e4f2cd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_webview.vcxproj @@ -0,0 +1,557 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + webview + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\webview\ + vc_x64_mswud\webview\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\webview\ + vc_x64_mswu\webview\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\webview\ + vc_x64_mswuddll\webview\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\webview\ + vc_x64_mswudll\webview\ + false + false + true + true + wxmsw30ud_webview + wxmsw30ud_webview + wxmsw30u_webview + wxmsw30u_webview + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_webviewlib.pch + $(OutDir)wxmsw30ud_webview.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_webview.lib + true + + + $(OutDir)wx_vc9_webview.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_webviewlib.pch + $(OutDir)wxmsw30ud_webview.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_webview.lib + true + + + $(OutDir)wx_vc9_webview.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_webviewlib.pch + $(OutDir)wxmsw30u_webview.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_webview.lib + true + + + $(OutDir)wx_vc9_webview.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_webviewlib.pch + $(OutDir)wxmsw30u_webview.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_webview.lib + true + + + $(OutDir)wx_vc9_webview.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_webviewdll.pch + $(OutDir)wxmsw30ud_webview_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_webview_vc_custom;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_webview_vc_custom.dll + $(OutDir)wxmsw30ud_webview.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_webview_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_webview.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_webviewdll.pch + $(OutDir)wxmsw30ud_webview_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_webview_vc_custom;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_webview_vc_x64_custom.dll + $(OutDir)wxmsw30ud_webview.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_webview_vc_custom.pdb + + + $(OutDir)wx_vc9_webview.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_webviewdll.pch + $(OutDir)wxmsw30u_webview_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_webview_vc_custom;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_webview_vc_custom.dll + $(OutDir)wxmsw30u_webview.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_webview_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_webview.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_webviewdll.pch + $(OutDir)wxmsw30u_webview_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_webview_vc_custom;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_webview_vc_x64_custom.dll + $(OutDir)wxmsw30u_webview.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_webview_vc_custom.pdb + true + true + + + $(OutDir)wx_vc9_webview.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_webview.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_webview.vcxproj.filters new file mode 100644 index 0000000000..f720a9de8b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_webview.vcxproj.filters @@ -0,0 +1,67 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxexpat.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxexpat.vcxproj new file mode 100644 index 0000000000..a0d9555346 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxexpat.vcxproj @@ -0,0 +1,397 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxexpat + {A1A8355B-0988-528E-9CC2-B971D6266669} + + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\wxexpat\ + vc_x64_mswud\wxexpat\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\wxexpat\ + vc_x64_mswu\wxexpat\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\wxexpat\ + vc_x64_mswuddll\wxexpat\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\wxexpat\ + vc_x64_mswudll\wxexpat\ + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxexpatd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + $(OutDir)wxexpatd.lib + true + + + $(OutDir)wx_vc9_wxexpat.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxexpatd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + $(OutDir)wxexpatd.lib + true + + + $(OutDir)wx_vc9_wxexpat.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxexpat.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + $(OutDir)wxexpat.lib + true + + + $(OutDir)wx_vc9_wxexpat.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxexpat.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + $(OutDir)wxexpat.lib + true + + + $(OutDir)wx_vc9_wxexpat.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxexpatd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + $(OutDir)wxexpatd.lib + true + + + $(OutDir)wx_vc9_wxexpat.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxexpatd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + $(OutDir)wxexpatd.lib + true + + + $(OutDir)wx_vc9_wxexpat.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxexpat.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + $(OutDir)wxexpat.lib + true + + + $(OutDir)wx_vc9_wxexpat.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxexpat.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + $(OutDir)wxexpat.lib + true + + + $(OutDir)wx_vc9_wxexpat.bsc + true + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxexpat.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxexpat.vcxproj.filters new file mode 100644 index 0000000000..7a4ecc7cce --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxexpat.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxjpeg.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxjpeg.vcxproj new file mode 100644 index 0000000000..da312515d1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxjpeg.vcxproj @@ -0,0 +1,440 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxjpeg + {6053CC38-CDEE-584C-8BC8-4B000D800FC7} + + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\wxjpeg\ + vc_x64_mswud\wxjpeg\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\wxjpeg\ + vc_x64_mswu\wxjpeg\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\wxjpeg\ + vc_x64_mswuddll\wxjpeg\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\wxjpeg\ + vc_x64_mswudll\wxjpeg\ + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)mswud;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxjpegd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;%(AdditionalIncludeDirectories) + + + $(OutDir)wxjpegd.lib + true + + + $(OutDir)wx_vc9_wxjpeg.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)mswud;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxjpegd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;%(AdditionalIncludeDirectories) + + + $(OutDir)wxjpegd.lib + true + + + $(OutDir)wx_vc9_wxjpeg.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)mswu;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxjpeg.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;%(AdditionalIncludeDirectories) + + + $(OutDir)wxjpeg.lib + true + + + $(OutDir)wx_vc9_wxjpeg.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)mswu;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxjpeg.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;%(AdditionalIncludeDirectories) + + + $(OutDir)wxjpeg.lib + true + + + $(OutDir)wx_vc9_wxjpeg.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)mswud;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxjpegd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;%(AdditionalIncludeDirectories) + + + $(OutDir)wxjpegd.lib + true + + + $(OutDir)wx_vc9_wxjpeg.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)mswud;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxjpegd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;%(AdditionalIncludeDirectories) + + + $(OutDir)wxjpegd.lib + true + + + $(OutDir)wx_vc9_wxjpeg.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)mswu;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxjpeg.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;%(AdditionalIncludeDirectories) + + + $(OutDir)wxjpeg.lib + true + + + $(OutDir)wx_vc9_wxjpeg.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)mswu;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxjpeg.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;%(AdditionalIncludeDirectories) + + + $(OutDir)wxjpeg.lib + true + + + $(OutDir)wx_vc9_wxjpeg.bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxjpeg.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxjpeg.vcxproj.filters new file mode 100644 index 0000000000..7ff9dae2ca --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxjpeg.vcxproj.filters @@ -0,0 +1,149 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxpng.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxpng.vcxproj new file mode 100644 index 0000000000..73a087b578 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxpng.vcxproj @@ -0,0 +1,409 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxpng + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} + + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\wxpng\ + vc_x64_mswud\wxpng\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\wxpng\ + vc_x64_mswu\wxpng\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\wxpng\ + vc_x64_mswuddll\wxpng\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\wxpng\ + vc_x64_mswudll\wxpng\ + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxpngd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxpngd.lib + true + + + $(OutDir)wx_vc9_wxpng.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxpngd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxpngd.lib + true + + + $(OutDir)wx_vc9_wxpng.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxpng.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxpng.lib + true + + + $(OutDir)wx_vc9_wxpng.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxpng.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxpng.lib + true + + + $(OutDir)wx_vc9_wxpng.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxpngd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxpngd.lib + true + + + $(OutDir)wx_vc9_wxpng.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxpngd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxpngd.lib + true + + + $(OutDir)wx_vc9_wxpng.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxpng.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxpng.lib + true + + + $(OutDir)wx_vc9_wxpng.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxpng.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxpng.lib + true + + + $(OutDir)wx_vc9_wxpng.bsc + true + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxpng.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxpng.vcxproj.filters new file mode 100644 index 0000000000..2355a6eaf8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxpng.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxregex.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxregex.vcxproj new file mode 100644 index 0000000000..fe66f2259f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxregex.vcxproj @@ -0,0 +1,472 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxregex + {56A4B526-BB81-5D01-AAA9-16D23BBB169D} + + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\wxregex\ + vc_x64_mswud\wxregex\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\wxregex\ + vc_x64_mswu\wxregex\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\wxregex\ + vc_x64_mswuddll\wxregex\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\wxregex\ + vc_x64_mswudll\wxregex\ + $(ProjectName)ud + $(ProjectName)ud + $(ProjectName)ud + $(ProjectName)ud + $(ProjectName)u + $(ProjectName)u + $(ProjectName)u + $(ProjectName)u + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxregexud.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + + + $(OutDir)wxregexud.lib + true + + + $(OutDir)wx_vc9_wxregex.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxregexud.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + + + $(OutDir)wxregexud.lib + true + + + $(OutDir)wx_vc9_wxregex.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxregexu.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + + + $(OutDir)wxregexu.lib + true + + + $(OutDir)wx_vc9_wxregex.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxregexu.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + + + $(OutDir)wxregexu.lib + true + + + $(OutDir)wx_vc9_wxregex.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxregexud.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + + + $(OutDir)wxregexud.lib + true + + + $(OutDir)wx_vc9_wxregex.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxregexud.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)mswud;%(AdditionalIncludeDirectories) + + + $(OutDir)wxregexud.lib + true + + + $(OutDir)wx_vc9_wxregex.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxregexu.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + + + $(OutDir)wxregexu.lib + true + + + $(OutDir)wx_vc9_wxregex.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxregexu.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)mswu;%(AdditionalIncludeDirectories) + + + $(OutDir)wxregexu.lib + true + + + $(OutDir)wx_vc9_wxregex.bsc + true + + + + + + + + + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxregex.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxregex.vcxproj.filters new file mode 100644 index 0000000000..13f1956e2b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxregex.vcxproj.filters @@ -0,0 +1,35 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxscintilla.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxscintilla.vcxproj new file mode 100644 index 0000000000..531777ec72 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxscintilla.vcxproj @@ -0,0 +1,583 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxscintilla + {74827EBD-93DC-5110-BA95-3F2AB029B6B0} + + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\wxscintilla\ + vc_x64_mswud\wxscintilla\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\wxscintilla\ + vc_x64_mswu\wxscintilla\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\wxscintilla\ + vc_x64_mswuddll\wxscintilla\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\wxscintilla\ + vc_x64_mswudll\wxscintilla\ + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxscintillad.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + + + $(OutDir)wxscintillad.lib + true + + + $(OutDir)wx_vc9_wxscintilla.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxscintillad.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + + + $(OutDir)wxscintillad.lib + true + + + $(OutDir)wx_vc9_wxscintilla.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxscintilla.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + + + $(OutDir)wxscintilla.lib + true + + + $(OutDir)wx_vc9_wxscintilla.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxscintilla.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + + + $(OutDir)wxscintilla.lib + true + + + $(OutDir)wx_vc9_wxscintilla.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxscintillad.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + + + $(OutDir)wxscintillad.lib + true + + + $(OutDir)wx_vc9_wxscintilla.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxscintillad.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswud;..\..\include;%(AdditionalIncludeDirectories) + + + $(OutDir)wxscintillad.lib + true + + + $(OutDir)wx_vc9_wxscintilla.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxscintilla.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + + + $(OutDir)wxscintilla.lib + true + + + $(OutDir)wx_vc9_wxscintilla.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxscintilla.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)mswu;..\..\include;%(AdditionalIncludeDirectories) + + + $(OutDir)wxscintilla.lib + true + + + $(OutDir)wx_vc9_wxscintilla.bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxscintilla.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxscintilla.vcxproj.filters new file mode 100644 index 0000000000..81f348d5c1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxscintilla.vcxproj.filters @@ -0,0 +1,380 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxtiff.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxtiff.vcxproj new file mode 100644 index 0000000000..8ec62c3707 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxtiff.vcxproj @@ -0,0 +1,430 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxtiff + {75596CE6-5AE7-55C9-B890-C07B0A657A83} + + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\wxtiff\ + vc_x64_mswud\wxtiff\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\wxtiff\ + vc_x64_mswu\wxtiff\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\wxtiff\ + vc_x64_mswuddll\wxtiff\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\wxtiff\ + vc_x64_mswudll\wxtiff\ + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxtiffd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + $(OutDir)wxtiffd.lib + true + + + $(OutDir)wx_vc9_wxtiff.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxtiffd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + $(OutDir)wxtiffd.lib + true + + + $(OutDir)wx_vc9_wxtiff.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxtiff.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + $(OutDir)wxtiff.lib + true + + + $(OutDir)wx_vc9_wxtiff.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxtiff.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + $(OutDir)wxtiff.lib + true + + + $(OutDir)wx_vc9_wxtiff.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxtiffd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + $(OutDir)wxtiffd.lib + true + + + $(OutDir)wx_vc9_wxtiff.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxtiffd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + $(OutDir)wxtiffd.lib + true + + + $(OutDir)wx_vc9_wxtiff.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxtiff.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + $(OutDir)wxtiff.lib + true + + + $(OutDir)wx_vc9_wxtiff.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxtiff.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + $(OutDir)wxtiff.lib + true + + + $(OutDir)wx_vc9_wxtiff.bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxtiff.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxtiff.vcxproj.filters new file mode 100644 index 0000000000..9294e7c179 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxtiff.vcxproj.filters @@ -0,0 +1,119 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxzlib.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxzlib.vcxproj new file mode 100644 index 0000000000..3aa33bea8e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxzlib.vcxproj @@ -0,0 +1,409 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxzlib + {8B867186-A0B5-5479-B824-E176EDD27C40} + + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\wxzlib\ + vc_x64_mswud\wxzlib\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\wxzlib\ + vc_x64_mswu\wxzlib\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\wxzlib\ + vc_x64_mswuddll\wxzlib\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\wxzlib\ + vc_x64_mswudll\wxzlib\ + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + $(ProjectName)d + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxzlibd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + $(OutDir)wxzlibd.lib + true + + + $(OutDir)wx_vc9_wxzlib.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxzlibd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + $(OutDir)wxzlibd.lib + true + + + $(OutDir)wx_vc9_wxzlib.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxzlib.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + $(OutDir)wxzlib.lib + true + + + $(OutDir)wx_vc9_wxzlib.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxzlib.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + $(OutDir)wxzlib.lib + true + + + $(OutDir)wx_vc9_wxzlib.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxzlibd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + $(OutDir)wxzlibd.lib + true + + + $(OutDir)wx_vc9_wxzlib.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)wxzlibd.pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + $(OutDir)wxzlibd.lib + true + + + $(OutDir)wx_vc9_wxzlib.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxzlib.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + $(OutDir)wxzlib.lib + true + + + $(OutDir)wx_vc9_wxzlib.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)wxzlib.pdb + Level3 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + $(OutDir)wxzlib.lib + true + + + $(OutDir)wx_vc9_wxzlib.bsc + true + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxzlib.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxzlib.vcxproj.filters new file mode 100644 index 0000000000..61fc76f670 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_wxzlib.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xml.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xml.vcxproj new file mode 100644 index 0000000000..c65f94c301 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xml.vcxproj @@ -0,0 +1,552 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + xml + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\xml\ + vc_x64_mswud\xml\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\xml\ + vc_x64_mswu\xml\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\xml\ + vc_x64_mswuddll\xml\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\xml\ + vc_x64_mswudll\xml\ + false + false + true + true + wxbase30ud_xml + wxbase30ud_xml + wxbase30u_xml + wxbase30u_xml + wxbase30ud_$(ProjectName)_vc_custom + wxbase30ud_$(ProjectName)_vc_x64_custom + wxbase30u_$(ProjectName)_vc_custom + wxbase30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_xmllib.pch + $(OutDir)wxbase30ud_xml.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30ud_xml.lib + true + + + $(OutDir)wx_vc9_xml.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_xmllib.pch + $(OutDir)wxbase30ud_xml.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30ud_xml.lib + true + + + $(OutDir)wx_vc9_xml.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_xmllib.pch + $(OutDir)wxbase30u_xml.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30u_xml.lib + true + + + $(OutDir)wx_vc9_xml.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_xmllib.pch + $(OutDir)wxbase30u_xml.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxbase30u_xml.lib + true + + + $(OutDir)wx_vc9_xml.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_xmldll.pch + $(OutDir)wxbase30ud_xml_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30ud_xml_vc_custom;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxbase30ud_xml_vc_custom.dll + $(OutDir)wxbase30ud_xml.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30ud_xml_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_xml.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_xmldll.pch + $(OutDir)wxbase30ud_xml_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30ud_xml_vc_x64_custom;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxbase30ud_xml_vc_x64_custom.dll + $(OutDir)wxbase30ud_xml.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30ud_xml_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_xml.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_xmldll.pch + $(OutDir)wxbase30u_xml_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30u_xml_vc_custom;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxbase30u_xml_vc_custom.dll + $(OutDir)wxbase30u_xml.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30u_xml_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_xml.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_xmldll.pch + $(OutDir)wxbase30u_xml_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxbase30u_xml_vc_x64_custom;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxbase30u_xml_vc_x64_custom.dll + $(OutDir)wxbase30u_xml.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxbase30u_xml_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_xml.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xml.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xml.vcxproj.filters new file mode 100644 index 0000000000..294ba1105e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xml.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Common Sources + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xrc.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xrc.vcxproj new file mode 100644 index 0000000000..f84d3bdb55 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xrc.vcxproj @@ -0,0 +1,677 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + xrc + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} + + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswud\xrc\ + vc_x64_mswud\xrc\ + ..\..\lib\vc_lib\ + ..\..\lib\vc_x64_lib\ + vc_mswu\xrc\ + vc_x64_mswu\xrc\ + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswuddll\xrc\ + vc_x64_mswuddll\xrc\ + true + true + true + true + ..\..\lib\vc_dll\ + ..\..\lib\vc_x64_dll\ + vc_mswudll\xrc\ + vc_x64_mswudll\xrc\ + false + false + true + true + wxmsw30ud_xrc + wxmsw30ud_xrc + wxmsw30u_xrc + wxmsw30u_xrc + wxmsw30ud_$(ProjectName)_vc_custom + wxmsw30ud_$(ProjectName)_vc_x64_custom + wxmsw30u_$(ProjectName)_vc_custom + wxmsw30u_$(ProjectName)_vc_x64_custom + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_xrclib.pch + $(OutDir)wxmsw30ud_xrc.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_xrc.lib + true + + + $(OutDir)wx_vc9_xrc.bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswud\wxprec_xrclib.pch + $(OutDir)wxmsw30ud_xrc.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30ud_xrc.lib + true + + + $(OutDir)wx_vc9_xrc.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_xrclib.pch + $(OutDir)wxmsw30u_xrc.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_xrc.lib + true + + + $(OutDir)wx_vc9_xrc.bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswu\wxprec_xrclib.pch + $(OutDir)wxmsw30u_xrc.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)wxmsw30u_xrc.lib + true + + + $(OutDir)wx_vc9_xrc.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_xrcdll.pch + $(OutDir)wxmsw30ud_xrc_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_xrc_vc_custom;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_html.lib;$(OutDir)wxmsw30ud_adv.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud_xml.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_xrc_vc_custom.dll + $(OutDir)wxmsw30ud_xrc.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_xrc_vc_custom.pdb + MachineX86 + + + $(OutDir)wx_vc9_xrc.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + vc_mswuddll\wxprec_xrcdll.pch + $(OutDir)wxmsw30ud_xrc_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30ud_xrc_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswud;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30ud_html.lib;$(OutDir)wxmsw30ud_adv.lib;$(OutDir)wxmsw30ud_core.lib;$(OutDir)wxbase30ud_xml.lib;$(OutDir)wxbase30ud.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30ud_xrc_vc_x64_custom.dll + $(OutDir)wxmsw30ud_xrc.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30ud_xrc_vc_x64_custom.pdb + + + $(OutDir)wx_vc9_xrc.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_xrcdll.pch + $(OutDir)wxmsw30u_xrc_vc_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_xrc_vc_custom;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_html.lib;$(OutDir)wxmsw30u_adv.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u_xml.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_xrc_vc_custom.dll + $(OutDir)wxmsw30u_xrc.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_xrc_vc_custom.pdb + MachineX86 + true + true + + + $(OutDir)wx_vc9_xrc.bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + vc_mswudll\wxprec_xrcdll.pch + $(OutDir)wxmsw30u_xrc_vc_x64_custom.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=wxmsw30u_xrc_vc_x64_custom;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)mswu;..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;$(OutDir)wxmsw30u_html.lib;$(OutDir)wxmsw30u_adv.lib;$(OutDir)wxmsw30u_core.lib;$(OutDir)wxbase30u_xml.lib;$(OutDir)wxbase30u.lib;%(AdditionalDependencies) + $(OutDir)wxmsw30u_xrc_vc_x64_custom.dll + $(OutDir)wxmsw30u_xrc.lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)wxmsw30u_xrc_vc_x64_custom.pdb + true + true + + + $(OutDir)wx_vc9_xrc.bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + Creating $(OutDir)mswud\wx\setup.h + Creating $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + copy "%(FullPath)" $(OutDir)mswud\wx\setup.h + $(OutDir)mswud\wx\setup.h;%(Outputs) + $(OutDir)mswud\wx\setup.h;%(Outputs) + Creating $(OutDir)mswu\wx\setup.h + Creating $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + copy "%(FullPath)" $(OutDir)mswu\wx\setup.h + $(OutDir)mswu\wx\setup.h;%(Outputs) + $(OutDir)mswu\wx\setup.h;%(Outputs) + + + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswud\wx\msw\rcdefs.h + Creating $(OutDir)mswud\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswud\wx\msw\rcdefs.h" + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + $(OutDir)mswud\wx\msw;%(AdditionalInputs) + Creating $(OutDir)mswu\wx\msw\rcdefs.h + Creating $(OutDir)mswu\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)mswu\wx\msw\rcdefs.h" + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + $(OutDir)mswu\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xrc.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xrc.vcxproj.filters new file mode 100644 index 0000000000..6742e819bf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc10_xrc.vcxproj.filters @@ -0,0 +1,431 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11.sln b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11.sln new file mode 100644 index 0000000000..c12a314d78 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11.sln @@ -0,0 +1,494 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxregex", "wx_vc11_wxregex.vcxproj", "{56A4B526-BB81-5D01-AAA9-16D23BBB169D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "wx_vc11_wxzlib.vcxproj", "{8B867186-A0B5-5479-B824-E176EDD27C40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "wx_vc11_wxpng.vcxproj", "{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "wx_vc11_wxjpeg.vcxproj", "{6053CC38-CDEE-584C-8BC8-4B000D800FC7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxtiff", "wx_vc11_wxtiff.vcxproj", "{75596CE6-5AE7-55C9-B890-C07B0A657A83}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxexpat", "wx_vc11_wxexpat.vcxproj", "{A1A8355B-0988-528E-9CC2-B971D6266669}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "wx_vc11_wxscintilla.vcxproj", "{74827EBD-93DC-5110-BA95-3F2AB029B6B0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "wx_vc11_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}" + ProjectSection(ProjectDependencies) = postProject + {56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {56A4B526-BB81-5D01-AAA9-16D23BBB169D} + {A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669} + {8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "net", "wx_vc11_net.vcxproj", "{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}" + ProjectSection(ProjectDependencies) = postProject + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "wx_vc11_core.vcxproj", "{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}" + ProjectSection(ProjectDependencies) = postProject + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} = {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} + {6053CC38-CDEE-584C-8BC8-4B000D800FC7} = {6053CC38-CDEE-584C-8BC8-4B000D800FC7} + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + {75596CE6-5AE7-55C9-B890-C07B0A657A83} = {75596CE6-5AE7-55C9-B890-C07B0A657A83} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv", "wx_vc11_adv.vcxproj", "{24C45343-FD20-5C92-81C1-35A2AE841E79}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media", "wx_vc11_media.vcxproj", "{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "html", "wx_vc11_html.vcxproj", "{33CC42F9-7756-5587-863C-8D4461B7C5DD}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wx_vc11_webview.vcxproj", "{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wx_vc11_qa.vcxproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}" + ProjectSection(ProjectDependencies) = postProject + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "wx_vc11_xml.vcxproj", "{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}" + ProjectSection(ProjectDependencies) = postProject + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wx_vc11_xrc.vcxproj", "{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}" + ProjectSection(ProjectDependencies) = postProject + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aui", "wx_vc11_aui.vcxproj", "{A16D3832-0F42-57CE-8F48-50E06649ADE8}" + ProjectSection(ProjectDependencies) = postProject + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + {33CC42F9-7756-5587-863C-8D4461B7C5DD} = {33CC42F9-7756-5587-863C-8D4461B7C5DD} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wx_vc11_ribbon.vcxproj", "{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}" + ProjectSection(ProjectDependencies) = postProject + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propgrid", "wx_vc11_propgrid.vcxproj", "{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}" + ProjectSection(ProjectDependencies) = postProject + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "richtext", "wx_vc11_richtext.vcxproj", "{7FB0902D-8579-5DCE-B883-DAF66A885005}" + ProjectSection(ProjectDependencies) = postProject + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stc", "wx_vc11_stc.vcxproj", "{23E1C437-A951-5943-8639-A17F3CF2E606}" + ProjectSection(ProjectDependencies) = postProject + {74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {74827EBD-93DC-5110-BA95-3F2AB029B6B0} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gl", "wx_vc11_gl.vcxproj", "{DA8B15EF-6750-5928-BC0E-C748213CF9B2}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Debug|x64 = DLL Debug|x64 + DLL Release|Win32 = DLL Release|Win32 + DLL Release|x64 = DLL Release|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|Win32.ActiveCfg = Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|Win32.Build.0 = Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.ActiveCfg = Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.Build.0 = Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|x64.Build.0 = DLL Release|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|Win32.ActiveCfg = Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|Win32.Build.0 = Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.ActiveCfg = Release|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.Build.0 = Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|Win32.ActiveCfg = Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|Win32.Build.0 = Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.ActiveCfg = Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.Build.0 = Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|x64.Build.0 = DLL Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|Win32.ActiveCfg = Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|Win32.Build.0 = Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.ActiveCfg = Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.Build.0 = Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|Win32.ActiveCfg = Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|Win32.Build.0 = Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.ActiveCfg = Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.Build.0 = Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|x64.Build.0 = DLL Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|Win32.ActiveCfg = Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|Win32.Build.0 = Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.ActiveCfg = Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.Build.0 = Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|Win32.Build.0 = Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.ActiveCfg = Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.Build.0 = Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|x64.Build.0 = DLL Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|Win32.ActiveCfg = Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|Win32.Build.0 = Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.ActiveCfg = Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.Build.0 = Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|Win32.ActiveCfg = Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|Win32.Build.0 = Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.ActiveCfg = Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.Build.0 = Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|x64.Build.0 = DLL Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|Win32.ActiveCfg = Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|Win32.Build.0 = Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.ActiveCfg = Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.Build.0 = Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|Win32.ActiveCfg = Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|Win32.Build.0 = Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.ActiveCfg = Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.Build.0 = Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|x64.Build.0 = DLL Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|Win32.ActiveCfg = Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|Win32.Build.0 = Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.ActiveCfg = Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.Build.0 = Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.ActiveCfg = Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.Build.0 = Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.ActiveCfg = Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.Build.0 = Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|x64.Build.0 = DLL Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.ActiveCfg = Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.Build.0 = Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.ActiveCfg = Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.Build.0 = Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.ActiveCfg = Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.Build.0 = Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.ActiveCfg = Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.Build.0 = Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.Build.0 = DLL Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.ActiveCfg = Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.Build.0 = Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.ActiveCfg = Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.Build.0 = Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|Win32.ActiveCfg = Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|Win32.Build.0 = Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.ActiveCfg = Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.Build.0 = Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|x64.Build.0 = DLL Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|Win32.ActiveCfg = Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|Win32.Build.0 = Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.ActiveCfg = Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.Build.0 = Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|Win32.ActiveCfg = Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|Win32.Build.0 = Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.ActiveCfg = Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.Build.0 = Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|x64.Build.0 = DLL Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|Win32.ActiveCfg = Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|Win32.Build.0 = Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.ActiveCfg = Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.Build.0 = Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|Win32.ActiveCfg = Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|Win32.Build.0 = Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.ActiveCfg = Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.Build.0 = Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|x64.Build.0 = DLL Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|Win32.ActiveCfg = Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|Win32.Build.0 = Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.ActiveCfg = Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.Build.0 = Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|Win32.ActiveCfg = Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|Win32.Build.0 = Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.ActiveCfg = Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.Build.0 = Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|x64.Build.0 = DLL Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|Win32.ActiveCfg = Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|Win32.Build.0 = Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.ActiveCfg = Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.Build.0 = Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|Win32.ActiveCfg = Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|Win32.Build.0 = Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.ActiveCfg = Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.Build.0 = Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|x64.Build.0 = DLL Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|Win32.ActiveCfg = Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|Win32.Build.0 = Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.ActiveCfg = Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.Build.0 = Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|Win32.ActiveCfg = Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|Win32.Build.0 = Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.ActiveCfg = Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.Build.0 = Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|x64.Build.0 = DLL Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|Win32.ActiveCfg = Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|Win32.Build.0 = Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.ActiveCfg = Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.Build.0 = Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|Win32.ActiveCfg = Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|Win32.Build.0 = Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.ActiveCfg = Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.Build.0 = Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|x64.Build.0 = DLL Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|Win32.ActiveCfg = Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|Win32.Build.0 = Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.ActiveCfg = Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.Build.0 = Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.Build.0 = Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.ActiveCfg = Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.Build.0 = Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.Build.0 = DLL Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.ActiveCfg = Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.Build.0 = Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.ActiveCfg = Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.Build.0 = Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|Win32.ActiveCfg = Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|Win32.Build.0 = Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.ActiveCfg = Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.Build.0 = Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|x64.Build.0 = DLL Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|Win32.ActiveCfg = Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|Win32.Build.0 = Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.ActiveCfg = Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.Build.0 = Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|Win32.ActiveCfg = Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|Win32.Build.0 = Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.ActiveCfg = Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.Build.0 = Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|x64.Build.0 = DLL Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|Win32.ActiveCfg = Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|Win32.Build.0 = Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.ActiveCfg = Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.Build.0 = Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.ActiveCfg = Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.Build.0 = Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.ActiveCfg = Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.Build.0 = Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|x64.Build.0 = DLL Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.ActiveCfg = Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.Build.0 = Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.ActiveCfg = Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.Build.0 = Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|Win32.ActiveCfg = Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|Win32.Build.0 = Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.ActiveCfg = Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.Build.0 = Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|x64.Build.0 = DLL Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|Win32.ActiveCfg = Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|Win32.Build.0 = Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.ActiveCfg = Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.Build.0 = Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|Win32.ActiveCfg = Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|Win32.Build.0 = Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.ActiveCfg = Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.Build.0 = Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|x64.Build.0 = DLL Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|Win32.ActiveCfg = Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|Win32.Build.0 = Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.ActiveCfg = Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.Build.0 = Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.ActiveCfg = Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.Build.0 = Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.ActiveCfg = Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.Build.0 = Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|x64.Build.0 = DLL Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.ActiveCfg = Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.Build.0 = Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.ActiveCfg = Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.Build.0 = Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|Win32.Build.0 = Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.ActiveCfg = Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.Build.0 = Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|x64.Build.0 = DLL Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|Win32.ActiveCfg = Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|Win32.Build.0 = Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.ActiveCfg = Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_adv.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_adv.vcxproj new file mode 100644 index 0000000000..458f2ff8aa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_adv.vcxproj @@ -0,0 +1,673 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + adv + {24C45343-FD20-5C92-81C1-35A2AE841E79} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + AnySuitable + true + Speed + ProgramDatabase + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_adv.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_adv.vcxproj.filters new file mode 100644 index 0000000000..cbc495607d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_adv.vcxproj.filters @@ -0,0 +1,376 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {61C63C83-EF8C-51CA-A418-51936E7FCD4A} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_aui.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_aui.vcxproj new file mode 100644 index 0000000000..3afbee7caa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_aui.vcxproj @@ -0,0 +1,580 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + aui + {A16D3832-0F42-57CE-8F48-50E06649ADE8} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_aui.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_aui.vcxproj.filters new file mode 100644 index 0000000000..741764520f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_aui.vcxproj.filters @@ -0,0 +1,95 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_base.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_base.vcxproj new file mode 100644 index 0000000000..e7ec970349 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_base.vcxproj @@ -0,0 +1,874 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + base + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxBaseLibNamePrefix) + $(wxBaseLibNamePrefix) + $(wxBaseLibNamePrefix)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix) + $(wxBaseLibNamePrefix) + $(wxBaseLibNamePrefix)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + $(OutDir)$(TargetName).pdb + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;%(AdditionalDependencies) + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + $(OutDir)$(wxBaseLibNamePrefix).lib + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;%(AdditionalDependencies) + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)$(wxBaseLibNamePrefix).lib + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;%(AdditionalDependencies) + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + $(OutDir)$(wxBaseLibNamePrefix).lib + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;%(AdditionalDependencies) + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + $(OutDir)$(wxBaseLibNamePrefix).lib + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + + + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_base.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_base.vcxproj.filters new file mode 100644 index 0000000000..adf4571e5d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_base.vcxproj.filters @@ -0,0 +1,931 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {61C63C83-EF8C-51CA-A418-51936E7FCD4A} + + + {B4103426-A5DB-5CF0-A30E-BC9546513AAF} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + Generic Sources + + + Common Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + Generic Headers + + + wxHTML Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_core.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_core.vcxproj new file mode 100644 index 0000000000..71f49e0f27 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_core.vcxproj @@ -0,0 +1,1727 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + core + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + + + true + true + true + true + true + true + true + true + + + + + + + + + true + true + true + true + true + true + true + true + + + + + + true + true + true + true + true + true + true + true + + + + true + true + true + true + true + true + true + true + + + + true + true + true + true + true + true + true + true + + + + true + true + true + true + true + true + true + true + + + + + + + + true + true + true + true + true + true + true + true + + + + + true + true + true + true + true + true + true + true + + + + + + + + + + + + + + + + + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_core.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_core.vcxproj.filters new file mode 100644 index 0000000000..a442858630 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_core.vcxproj.filters @@ -0,0 +1,2536 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {61C63C83-EF8C-51CA-A418-51936E7FCD4A} + + + {B4103426-A5DB-5CF0-A30E-BC9546513AAF} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + MSW Sources + + + + + + Common Sources + + + Generic Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_gl.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_gl.vcxproj new file mode 100644 index 0000000000..76df6fb685 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_gl.vcxproj @@ -0,0 +1,567 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + gl + {DA8B15EF-6750-5928-BC0E-C748213CF9B2} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + Level4 + true + ProgramDatabase + $(OutDir)$(TargetName).pdb + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_gl.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_gl.vcxproj.filters new file mode 100644 index 0000000000..72348ec3c4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_gl.vcxproj.filters @@ -0,0 +1,52 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + MSW Sources + + + + + MSW Sources + + + + + MSW Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_html.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_html.vcxproj new file mode 100644 index 0000000000..acc5c471ec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_html.vcxproj @@ -0,0 +1,608 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + html + {33CC42F9-7756-5587-863C-8D4461B7C5DD} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_html.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_html.vcxproj.filters new file mode 100644 index 0000000000..ffaeba88b4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_html.vcxproj.filters @@ -0,0 +1,184 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {2F6FA2A9-E2B7-5B50-9F90-38855A21AF00} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {B4103426-A5DB-5CF0-A30E-BC9546513AAF} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + MSW Sources + + + Generic Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + + + MSW Sources + + + + + MSW Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_media.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_media.vcxproj new file mode 100644 index 0000000000..7d33927e4f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_media.vcxproj @@ -0,0 +1,568 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + media + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_media.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_media.vcxproj.filters new file mode 100644 index 0000000000..1049af9571 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_media.vcxproj.filters @@ -0,0 +1,55 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + + + MSW Sources + + + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_net.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_net.vcxproj new file mode 100644 index 0000000000..e39c8f2e96 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_net.vcxproj @@ -0,0 +1,586 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + net + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_net.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_net.vcxproj.filters new file mode 100644 index 0000000000..066580bfab --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_net.vcxproj.filters @@ -0,0 +1,109 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_propgrid.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_propgrid.vcxproj new file mode 100644 index 0000000000..9b7c0e0888 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_propgrid.vcxproj @@ -0,0 +1,580 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + propgrid + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_propgrid.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_propgrid.vcxproj.filters new file mode 100644 index 0000000000..066dc00375 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_propgrid.vcxproj.filters @@ -0,0 +1,95 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_qa.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_qa.vcxproj new file mode 100644 index 0000000000..b4c320b767 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_qa.vcxproj @@ -0,0 +1,566 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + qa + {E21129E0-7C08-5936-9D8C-0D60B5319BA7} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_qa.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_qa.vcxproj.filters new file mode 100644 index 0000000000..ab62dbf090 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_qa.vcxproj.filters @@ -0,0 +1,52 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Generic Sources + + + + + MSW Sources + + + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_ribbon.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_ribbon.vcxproj new file mode 100644 index 0000000000..dd939b2e80 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_ribbon.vcxproj @@ -0,0 +1,584 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + ribbon + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_ribbon.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_ribbon.vcxproj.filters new file mode 100644 index 0000000000..74b8db4e2c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_ribbon.vcxproj.filters @@ -0,0 +1,107 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_richtext.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_richtext.vcxproj new file mode 100644 index 0000000000..f39b4c0483 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_richtext.vcxproj @@ -0,0 +1,596 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + richtext + {7FB0902D-8579-5DCE-B883-DAF66A885005} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_richtext.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_richtext.vcxproj.filters new file mode 100644 index 0000000000..bc88ea988c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_richtext.vcxproj.filters @@ -0,0 +1,143 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_stc.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_stc.vcxproj new file mode 100644 index 0000000000..59792ede6d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_stc.vcxproj @@ -0,0 +1,567 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + stc + {23E1C437-A951-5943-8639-A17F3CF2E606} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + true + true + false + false + true + true + true + true + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;wxscintilla$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;wxscintilla$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;wxscintilla$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;wxscintilla$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_stc.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_stc.vcxproj.filters new file mode 100644 index 0000000000..5ee91a464d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_stc.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_webview.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_webview.vcxproj new file mode 100644 index 0000000000..df0372d67d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_webview.vcxproj @@ -0,0 +1,572 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + webview + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_webview.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_webview.vcxproj.filters new file mode 100644 index 0000000000..4496415640 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_webview.vcxproj.filters @@ -0,0 +1,67 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wx_setup.props b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wx_setup.props new file mode 100644 index 0000000000..c5ff213883 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wx_setup.props @@ -0,0 +1,103 @@ + + + + 30 + msw + vc + + + custom + + + + + + + _x64 + + + _ia64 + + + ud + + + d + + + u + + + + + + + d + + + + + + + ..\..\lib\$(wxCompilerPrefix)$(wxArchSuffix)_dll$(wxCfg)\ + + + ..\..\lib\$(wxCompilerPrefix)$(wxArchSuffix)_dll$(wxCfg)\ + + + ..\..\lib\$(wxCompilerPrefix)$(wxArchSuffix)_lib$(wxCfg)\ + + + ..\..\lib\$(wxCompilerPrefix)$(wxArchSuffix)_lib$(wxCfg)\ + + + $(wxCompilerPrefix)$(wxArchSuffix)_$(wxToolkitPrefix)$(wxSuffix)dll\ + + + $(wxCompilerPrefix)$(wxArchSuffix)_$(wxToolkitPrefix)$(wxSuffix)dll\ + + + $(wxCompilerPrefix)$(wxArchSuffix)_$(wxToolkitPrefix)$(wxSuffix)\ + + + $(wxCompilerPrefix)$(wxArchSuffix)_$(wxToolkitPrefix)$(wxSuffix)\ + + + $(wxToolkitPrefix)$(wxSuffix) + wx$(wxToolkitPrefix)$(wxShortVersionString)$(wxSuffix)_ + _$(wxCompilerPrefix)$(wxArchSuffix)_$(wxVendor) + wx$(wxToolkitPrefix)$(wxShortVersionString)$(wxSuffix)_ + wxbase$(wxShortVersionString)$(wxSuffix) + + + + kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;advapi32.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;wininet.lib;winmm.lib;%(AdditionalDependencies) + + + + + $(wxShortVersionString) + + + $(wxArchSuffix) + + + $(wxToolkitPrefix) + + + $(wxCompilerPrefix) + + + $(wxCfg) + + + $(wxVendor) + + + $(wxOutDir) + + + $(wxIntRootDir) + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxexpat.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxexpat.vcxproj new file mode 100644 index 0000000000..896f3d8c7b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxexpat.vcxproj @@ -0,0 +1,442 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxexpat + {A1A8355B-0988-528E-9CC2-B971D6266669} + + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxexpat.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxexpat.vcxproj.filters new file mode 100644 index 0000000000..59e9b80653 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxexpat.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxjpeg.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxjpeg.vcxproj new file mode 100644 index 0000000000..3b9e4f0d89 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxjpeg.vcxproj @@ -0,0 +1,485 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxjpeg + {6053CC38-CDEE-584C-8BC8-4B000D800FC7} + + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxjpeg.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxjpeg.vcxproj.filters new file mode 100644 index 0000000000..f81cbf8abc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxjpeg.vcxproj.filters @@ -0,0 +1,149 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxpng.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxpng.vcxproj new file mode 100644 index 0000000000..a48fcfc218 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxpng.vcxproj @@ -0,0 +1,454 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxpng + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} + + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxpng.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxpng.vcxproj.filters new file mode 100644 index 0000000000..90f43c4e1a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxpng.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxregex.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxregex.vcxproj new file mode 100644 index 0000000000..cc2f42c2b2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxregex.vcxproj @@ -0,0 +1,497 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxregex + {56A4B526-BB81-5D01-AAA9-16D23BBB169D} + + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + Disabled + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxregex.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxregex.vcxproj.filters new file mode 100644 index 0000000000..0e3fbf0511 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxregex.vcxproj.filters @@ -0,0 +1,35 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxscintilla.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxscintilla.vcxproj new file mode 100644 index 0000000000..c1240c4054 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxscintilla.vcxproj @@ -0,0 +1,620 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxscintilla + {74827EBD-93DC-5110-BA95-3F2AB029B6B0} + + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxscintilla.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxscintilla.vcxproj.filters new file mode 100644 index 0000000000..1b75ea62c8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxscintilla.vcxproj.filters @@ -0,0 +1,380 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxtiff.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxtiff.vcxproj new file mode 100644 index 0000000000..10fb445881 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxtiff.vcxproj @@ -0,0 +1,475 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxtiff + {75596CE6-5AE7-55C9-B890-C07B0A657A83} + + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxtiff.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxtiff.vcxproj.filters new file mode 100644 index 0000000000..b3074065e1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxtiff.vcxproj.filters @@ -0,0 +1,119 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxzlib.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxzlib.vcxproj new file mode 100644 index 0000000000..9ee9f52d27 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxzlib.vcxproj @@ -0,0 +1,454 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxzlib + {8B867186-A0B5-5479-B824-E176EDD27C40} + + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + StaticLibrary + false + v110 + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Level3 + true + ProgramDatabase + $(OutDir)$(TargetName).pdb + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Level3 + true + ProgramDatabase + $(OutDir)$(TargetName).pdb + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + $(OutDir)$(TargetName).pdb + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Level3 + true + None + AnySuitable + true + Speed + $(OutDir)$(TargetName).pdb + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Level3 + true + ProgramDatabase + $(OutDir)$(TargetName).pdb + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Level3 + true + ProgramDatabase + $(OutDir)$(TargetName).pdb + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + $(OutDir)$(TargetName).pdb + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Level3 + true + None + AnySuitable + true + Speed + $(OutDir)$(TargetName).pdb + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxzlib.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxzlib.vcxproj.filters new file mode 100644 index 0000000000..76e762f8d9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_wxzlib.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xml.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xml.vcxproj new file mode 100644 index 0000000000..7314f1d98c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xml.vcxproj @@ -0,0 +1,567 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + xml + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xml.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xml.vcxproj.filters new file mode 100644 index 0000000000..18feef67c6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xml.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Common Sources + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xrc.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xrc.vcxproj new file mode 100644 index 0000000000..35df86ddcd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xrc.vcxproj @@ -0,0 +1,692 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + xrc + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} + + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + DynamicLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + StaticLibrary + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix)_xml.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix)_xml.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix)_xml.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix)_xml.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xrc.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xrc.vcxproj.filters new file mode 100644 index 0000000000..775cd3831d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc11_xrc.vcxproj.filters @@ -0,0 +1,431 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12.sln b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12.sln new file mode 100644 index 0000000000..b67323ec12 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12.sln @@ -0,0 +1,494 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxregex", "wx_vc12_wxregex.vcxproj", "{56A4B526-BB81-5D01-AAA9-16D23BBB169D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "wx_vc12_wxzlib.vcxproj", "{8B867186-A0B5-5479-B824-E176EDD27C40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "wx_vc12_wxpng.vcxproj", "{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "wx_vc12_wxjpeg.vcxproj", "{6053CC38-CDEE-584C-8BC8-4B000D800FC7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxtiff", "wx_vc12_wxtiff.vcxproj", "{75596CE6-5AE7-55C9-B890-C07B0A657A83}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxexpat", "wx_vc12_wxexpat.vcxproj", "{A1A8355B-0988-528E-9CC2-B971D6266669}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "wx_vc12_wxscintilla.vcxproj", "{74827EBD-93DC-5110-BA95-3F2AB029B6B0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "wx_vc12_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}" + ProjectSection(ProjectDependencies) = postProject + {56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {56A4B526-BB81-5D01-AAA9-16D23BBB169D} + {A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669} + {8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "net", "wx_vc12_net.vcxproj", "{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}" + ProjectSection(ProjectDependencies) = postProject + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "wx_vc12_core.vcxproj", "{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}" + ProjectSection(ProjectDependencies) = postProject + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} = {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} + {6053CC38-CDEE-584C-8BC8-4B000D800FC7} = {6053CC38-CDEE-584C-8BC8-4B000D800FC7} + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + {75596CE6-5AE7-55C9-B890-C07B0A657A83} = {75596CE6-5AE7-55C9-B890-C07B0A657A83} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv", "wx_vc12_adv.vcxproj", "{24C45343-FD20-5C92-81C1-35A2AE841E79}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media", "wx_vc12_media.vcxproj", "{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "html", "wx_vc12_html.vcxproj", "{33CC42F9-7756-5587-863C-8D4461B7C5DD}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wx_vc12_webview.vcxproj", "{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wx_vc12_qa.vcxproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}" + ProjectSection(ProjectDependencies) = postProject + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "wx_vc12_xml.vcxproj", "{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}" + ProjectSection(ProjectDependencies) = postProject + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wx_vc12_xrc.vcxproj", "{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}" + ProjectSection(ProjectDependencies) = postProject + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aui", "wx_vc12_aui.vcxproj", "{A16D3832-0F42-57CE-8F48-50E06649ADE8}" + ProjectSection(ProjectDependencies) = postProject + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + {33CC42F9-7756-5587-863C-8D4461B7C5DD} = {33CC42F9-7756-5587-863C-8D4461B7C5DD} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wx_vc12_ribbon.vcxproj", "{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}" + ProjectSection(ProjectDependencies) = postProject + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propgrid", "wx_vc12_propgrid.vcxproj", "{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}" + ProjectSection(ProjectDependencies) = postProject + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "richtext", "wx_vc12_richtext.vcxproj", "{7FB0902D-8579-5DCE-B883-DAF66A885005}" + ProjectSection(ProjectDependencies) = postProject + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stc", "wx_vc12_stc.vcxproj", "{23E1C437-A951-5943-8639-A17F3CF2E606}" + ProjectSection(ProjectDependencies) = postProject + {74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {74827EBD-93DC-5110-BA95-3F2AB029B6B0} + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gl", "wx_vc12_gl.vcxproj", "{DA8B15EF-6750-5928-BC0E-C748213CF9B2}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Debug|x64 = DLL Debug|x64 + DLL Release|Win32 = DLL Release|Win32 + DLL Release|x64 = DLL Release|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|Win32.ActiveCfg = Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|Win32.Build.0 = Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.ActiveCfg = Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.Build.0 = Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|x64.Build.0 = DLL Release|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|Win32.ActiveCfg = Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|Win32.Build.0 = Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.ActiveCfg = Release|x64 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.Build.0 = Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|Win32.ActiveCfg = Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|Win32.Build.0 = Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.ActiveCfg = Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.Build.0 = Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|x64.Build.0 = DLL Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|Win32.ActiveCfg = Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|Win32.Build.0 = Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.ActiveCfg = Release|x64 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.Build.0 = Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|Win32.ActiveCfg = Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|Win32.Build.0 = Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.ActiveCfg = Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.Build.0 = Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|x64.Build.0 = DLL Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|Win32.ActiveCfg = Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|Win32.Build.0 = Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.ActiveCfg = Release|x64 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.Build.0 = Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|Win32.Build.0 = Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.ActiveCfg = Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.Build.0 = Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|x64.Build.0 = DLL Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|Win32.ActiveCfg = Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|Win32.Build.0 = Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.ActiveCfg = Release|x64 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.Build.0 = Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|Win32.ActiveCfg = Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|Win32.Build.0 = Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.ActiveCfg = Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.Build.0 = Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|x64.Build.0 = DLL Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|Win32.ActiveCfg = Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|Win32.Build.0 = Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.ActiveCfg = Release|x64 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.Build.0 = Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|Win32.ActiveCfg = Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|Win32.Build.0 = Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.ActiveCfg = Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.Build.0 = Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|x64.Build.0 = DLL Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|Win32.ActiveCfg = Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|Win32.Build.0 = Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.ActiveCfg = Release|x64 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.Build.0 = Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.ActiveCfg = Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.Build.0 = Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.ActiveCfg = Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.Build.0 = Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|x64.Build.0 = DLL Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.ActiveCfg = Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.Build.0 = Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.ActiveCfg = Release|x64 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.Build.0 = Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.ActiveCfg = Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.Build.0 = Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.ActiveCfg = Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.Build.0 = Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|x64.Build.0 = DLL Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.ActiveCfg = Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.Build.0 = Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.ActiveCfg = Release|x64 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.Build.0 = Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|Win32.ActiveCfg = Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|Win32.Build.0 = Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.ActiveCfg = Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.Build.0 = Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|x64.Build.0 = DLL Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|Win32.ActiveCfg = Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|Win32.Build.0 = Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.ActiveCfg = Release|x64 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.Build.0 = Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|Win32.ActiveCfg = Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|Win32.Build.0 = Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.ActiveCfg = Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.Build.0 = Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|x64.Build.0 = DLL Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|Win32.ActiveCfg = Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|Win32.Build.0 = Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.ActiveCfg = Release|x64 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.Build.0 = Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|Win32.ActiveCfg = Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|Win32.Build.0 = Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.ActiveCfg = Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.Build.0 = Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|x64.Build.0 = DLL Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|Win32.ActiveCfg = Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|Win32.Build.0 = Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.ActiveCfg = Release|x64 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.Build.0 = Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|Win32.ActiveCfg = Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|Win32.Build.0 = Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.ActiveCfg = Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.Build.0 = Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|x64.Build.0 = DLL Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|Win32.ActiveCfg = Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|Win32.Build.0 = Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.ActiveCfg = Release|x64 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.Build.0 = Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|Win32.ActiveCfg = Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|Win32.Build.0 = Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.ActiveCfg = Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.Build.0 = Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|x64.Build.0 = DLL Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|Win32.ActiveCfg = Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|Win32.Build.0 = Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.ActiveCfg = Release|x64 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.Build.0 = Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|Win32.ActiveCfg = Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|Win32.Build.0 = Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.ActiveCfg = Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.Build.0 = Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|x64.Build.0 = DLL Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|Win32.ActiveCfg = Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|Win32.Build.0 = Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.ActiveCfg = Release|x64 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.Build.0 = Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|Win32.ActiveCfg = Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|Win32.Build.0 = Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.ActiveCfg = Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.Build.0 = Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|x64.Build.0 = DLL Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|Win32.ActiveCfg = Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|Win32.Build.0 = Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.ActiveCfg = Release|x64 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.Build.0 = Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.Build.0 = Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.ActiveCfg = Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.Build.0 = Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|x64.Build.0 = DLL Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.ActiveCfg = Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.Build.0 = Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.ActiveCfg = Release|x64 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.Build.0 = Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|Win32.ActiveCfg = Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|Win32.Build.0 = Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.ActiveCfg = Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.Build.0 = Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|x64.Build.0 = DLL Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|Win32.ActiveCfg = Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|Win32.Build.0 = Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.ActiveCfg = Release|x64 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.Build.0 = Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|Win32.ActiveCfg = Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|Win32.Build.0 = Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.ActiveCfg = Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.Build.0 = Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|x64.Build.0 = DLL Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|Win32.ActiveCfg = Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|Win32.Build.0 = Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.ActiveCfg = Release|x64 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.Build.0 = Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.ActiveCfg = Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.Build.0 = Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.ActiveCfg = Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.Build.0 = Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|x64.Build.0 = DLL Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.ActiveCfg = Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.Build.0 = Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.ActiveCfg = Release|x64 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.Build.0 = Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|Win32.ActiveCfg = Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|Win32.Build.0 = Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.ActiveCfg = Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.Build.0 = Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|x64.Build.0 = DLL Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|Win32.ActiveCfg = Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|Win32.Build.0 = Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.ActiveCfg = Release|x64 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.Build.0 = Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|Win32.ActiveCfg = Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|Win32.Build.0 = Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.ActiveCfg = Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.Build.0 = Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|x64.Build.0 = DLL Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|Win32.ActiveCfg = Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|Win32.Build.0 = Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.ActiveCfg = Release|x64 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.Build.0 = Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.ActiveCfg = Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.Build.0 = Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.ActiveCfg = Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.Build.0 = Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|x64.Build.0 = DLL Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.ActiveCfg = Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.Build.0 = Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.ActiveCfg = Release|x64 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.Build.0 = Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|Win32.Build.0 = Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.ActiveCfg = Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.Build.0 = Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|x64.Build.0 = DLL Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|Win32.ActiveCfg = Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|Win32.Build.0 = Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.ActiveCfg = Release|x64 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_adv.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_adv.vcxproj new file mode 100644 index 0000000000..6b74f9b766 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_adv.vcxproj @@ -0,0 +1,673 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + adv + {24C45343-FD20-5C92-81C1-35A2AE841E79} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + AnySuitable + true + Speed + ProgramDatabase + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_ADV;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_adv.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_adv.vcxproj.filters new file mode 100644 index 0000000000..cbc495607d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_adv.vcxproj.filters @@ -0,0 +1,376 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {61C63C83-EF8C-51CA-A418-51936E7FCD4A} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_aui.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_aui.vcxproj new file mode 100644 index 0000000000..c7e447168c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_aui.vcxproj @@ -0,0 +1,580 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + aui + {A16D3832-0F42-57CE-8F48-50E06649ADE8} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_AUI;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_aui.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_aui.vcxproj.filters new file mode 100644 index 0000000000..741764520f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_aui.vcxproj.filters @@ -0,0 +1,95 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_base.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_base.vcxproj new file mode 100644 index 0000000000..356fac496e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_base.vcxproj @@ -0,0 +1,874 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + base + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxBaseLibNamePrefix) + $(wxBaseLibNamePrefix) + $(wxBaseLibNamePrefix)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix) + $(wxBaseLibNamePrefix) + $(wxBaseLibNamePrefix)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + $(OutDir)$(TargetName).pdb + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;%(AdditionalDependencies) + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + $(OutDir)$(wxBaseLibNamePrefix).lib + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;%(AdditionalDependencies) + true + $(OutDir);%(AdditionalLibraryDirectories) + true + $(OutDir)$(wxBaseLibNamePrefix).lib + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;%(AdditionalDependencies) + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + $(OutDir)$(wxBaseLibNamePrefix).lib + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXMAKINGDLL_BASE;wxUSE_BASE=1;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;%(AdditionalDependencies) + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + $(OutDir)$(wxBaseLibNamePrefix).lib + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + + + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_base.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_base.vcxproj.filters new file mode 100644 index 0000000000..adf4571e5d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_base.vcxproj.filters @@ -0,0 +1,931 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {61C63C83-EF8C-51CA-A418-51936E7FCD4A} + + + {B4103426-A5DB-5CF0-A30E-BC9546513AAF} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + Generic Sources + + + Common Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + Generic Headers + + + wxHTML Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_core.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_core.vcxproj new file mode 100644 index 0000000000..d513776bf5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_core.vcxproj @@ -0,0 +1,1727 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + core + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_CORE;wxUSE_BASE=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + $(IntDir)msw_%(Filename).obj + + + + + + + + + + + + + true + true + true + true + true + true + true + true + + + + + + + + + true + true + true + true + true + true + true + true + + + + + + true + true + true + true + true + true + true + true + + + + true + true + true + true + true + true + true + true + + + + true + true + true + true + true + true + true + true + + + + true + true + true + true + true + true + true + true + + + + + + + + true + true + true + true + true + true + true + true + + + + + true + true + true + true + true + true + true + true + + + + + + + + + + + + + + + + + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + $(IntDir)generic_%(Filename).obj + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_core.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_core.vcxproj.filters new file mode 100644 index 0000000000..a442858630 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_core.vcxproj.filters @@ -0,0 +1,2536 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {61C63C83-EF8C-51CA-A418-51936E7FCD4A} + + + {B4103426-A5DB-5CF0-A30E-BC9546513AAF} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + Generic Sources + + + MSW Sources + + + + + + Common Sources + + + Generic Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + MSW Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + Generic Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_gl.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_gl.vcxproj new file mode 100644 index 0000000000..a9171801ed --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_gl.vcxproj @@ -0,0 +1,567 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + gl + {DA8B15EF-6750-5928-BC0E-C748213CF9B2} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + Level4 + true + ProgramDatabase + $(OutDir)$(TargetName).pdb + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_GL;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;opengl32.lib;glu32.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_gl.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_gl.vcxproj.filters new file mode 100644 index 0000000000..72348ec3c4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_gl.vcxproj.filters @@ -0,0 +1,52 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + MSW Sources + + + + + MSW Sources + + + + + MSW Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_html.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_html.vcxproj new file mode 100644 index 0000000000..c5637550b2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_html.vcxproj @@ -0,0 +1,608 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + html + {33CC42F9-7756-5587-863C-8D4461B7C5DD} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_HTML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_html.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_html.vcxproj.filters new file mode 100644 index 0000000000..ffaeba88b4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_html.vcxproj.filters @@ -0,0 +1,184 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {2F6FA2A9-E2B7-5B50-9F90-38855A21AF00} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {B4103426-A5DB-5CF0-A30E-BC9546513AAF} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + MSW Sources + + + Generic Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + wxHTML Sources + + + + + MSW Sources + + + + + MSW Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + wxHTML Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_media.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_media.vcxproj new file mode 100644 index 0000000000..8be6b2522e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_media.vcxproj @@ -0,0 +1,568 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + media + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_MEDIA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_media.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_media.vcxproj.filters new file mode 100644 index 0000000000..1049af9571 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_media.vcxproj.filters @@ -0,0 +1,55 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + MSW Sources + + + + + MSW Sources + + + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_net.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_net.vcxproj new file mode 100644 index 0000000000..839ce6d564 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_net.vcxproj @@ -0,0 +1,586 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + net + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_NET;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_net.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_net.vcxproj.filters new file mode 100644 index 0000000000..066580bfab --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_net.vcxproj.filters @@ -0,0 +1,109 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + MSW Sources + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_propgrid.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_propgrid.vcxproj new file mode 100644 index 0000000000..782b720db2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_propgrid.vcxproj @@ -0,0 +1,580 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + propgrid + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_PROPGRID;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_propgrid.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_propgrid.vcxproj.filters new file mode 100644 index 0000000000..066dc00375 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_propgrid.vcxproj.filters @@ -0,0 +1,95 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_qa.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_qa.vcxproj new file mode 100644 index 0000000000..1d54eac949 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_qa.vcxproj @@ -0,0 +1,566 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + qa + {E21129E0-7C08-5936-9D8C-0D60B5319BA7} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_QA;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_qa.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_qa.vcxproj.filters new file mode 100644 index 0000000000..ab62dbf090 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_qa.vcxproj.filters @@ -0,0 +1,52 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {FEA0C02F-F300-53BA-B784-52A5086B8093} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Generic Sources + + + + + MSW Sources + + + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_ribbon.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_ribbon.vcxproj new file mode 100644 index 0000000000..9d2e5fa4d9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_ribbon.vcxproj @@ -0,0 +1,584 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + ribbon + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RIBBON;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_ribbon.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_ribbon.vcxproj.filters new file mode 100644 index 0000000000..74b8db4e2c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_ribbon.vcxproj.filters @@ -0,0 +1,107 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_richtext.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_richtext.vcxproj new file mode 100644 index 0000000000..1c6437d665 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_richtext.vcxproj @@ -0,0 +1,596 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + richtext + {7FB0902D-8579-5DCE-B883-DAF66A885005} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_RICHTEXT;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxBaseLibNamePrefix)_xml.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_richtext.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_richtext.vcxproj.filters new file mode 100644 index 0000000000..bc88ea988c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_richtext.vcxproj.filters @@ -0,0 +1,143 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_stc.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_stc.vcxproj new file mode 100644 index 0000000000..ec6e02854a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_stc.vcxproj @@ -0,0 +1,567 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + stc + {23E1C437-A951-5943-8639-A17F3CF2E606} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + true + true + false + false + true + true + true + true + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;wxscintilla$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;wxscintilla$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;wxscintilla$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;WXMAKINGDLL_STC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;wxscintilla$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_stc.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_stc.vcxproj.filters new file mode 100644 index 0000000000..5ee91a464d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_stc.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_webview.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_webview.vcxproj new file mode 100644 index 0000000000..ac9d5da325 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_webview.vcxproj @@ -0,0 +1,572 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + webview + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_webview.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_webview.vcxproj.filters new file mode 100644 index 0000000000..4496415640 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_webview.vcxproj.filters @@ -0,0 +1,67 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + + + Common Sources + + + Common Sources + + + Common Sources + + + Common Sources + + + MSW Sources + + + + + MSW Sources + + + + + MSW Headers + + + MSW Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wx_setup.props b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wx_setup.props new file mode 100644 index 0000000000..0e617f52d7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wx_setup.props @@ -0,0 +1,103 @@ + + + + 30 + msw + vc + + + custom + + + + + + + _x64 + + + _ia64 + + + ud + + + d + + + u + + + + + + + d + + + + + + + ..\..\lib\$(wxCompilerPrefix)$(wxArchSuffix)_dll$(wxCfg)\ + + + ..\..\lib\$(wxCompilerPrefix)$(wxArchSuffix)_dll$(wxCfg)\ + + + ..\..\lib\$(wxCompilerPrefix)$(wxArchSuffix)_lib$(wxCfg)\ + + + ..\..\lib\$(wxCompilerPrefix)$(wxArchSuffix)_lib$(wxCfg)\ + + + $(wxCompilerPrefix)$(wxArchSuffix)_$(wxToolkitPrefix)$(wxSuffix)dll\ + + + $(wxCompilerPrefix)$(wxArchSuffix)_$(wxToolkitPrefix)$(wxSuffix)dll\ + + + $(wxCompilerPrefix)$(wxArchSuffix)_$(wxToolkitPrefix)$(wxSuffix)\ + + + $(wxCompilerPrefix)$(wxArchSuffix)_$(wxToolkitPrefix)$(wxSuffix)\ + + + $(wxToolkitPrefix)$(wxSuffix) + wx$(wxToolkitPrefix)$(wxShortVersionString)$(wxSuffix)_ + _$(wxCompilerPrefix)$(wxArchSuffix)_$(wxVendor) + wx$(wxToolkitPrefix)$(wxShortVersionString)$(wxSuffix)_ + wxbase$(wxShortVersionString)$(wxSuffix) + + + + kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;advapi32.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;wininet.lib;winmm.lib;%(AdditionalDependencies) + + + + + $(wxShortVersionString) + + + $(wxArchSuffix) + + + $(wxToolkitPrefix) + + + $(wxCompilerPrefix) + + + $(wxCfg) + + + $(wxVendor) + + + $(wxOutDir) + + + $(wxIntRootDir) + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxexpat.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxexpat.vcxproj new file mode 100644 index 0000000000..c8f13c27f7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxexpat.vcxproj @@ -0,0 +1,442 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxexpat + {A1A8355B-0988-528E-9CC2-B971D6266669} + + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + $(OutDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;%(PreprocessorDefinitions) + 0x0409 + $(OutDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxexpat.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxexpat.vcxproj.filters new file mode 100644 index 0000000000..59e9b80653 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxexpat.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxjpeg.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxjpeg.vcxproj new file mode 100644 index 0000000000..8ef71b5531 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxjpeg.vcxproj @@ -0,0 +1,485 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxjpeg + {6053CC38-CDEE-584C-8BC8-4B000D800FC7} + + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxjpeg.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxjpeg.vcxproj.filters new file mode 100644 index 0000000000..f81cbf8abc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxjpeg.vcxproj.filters @@ -0,0 +1,149 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxpng.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxpng.vcxproj new file mode 100644 index 0000000000..1c76de3221 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxpng.vcxproj @@ -0,0 +1,454 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxpng + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} + + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxpng.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxpng.vcxproj.filters new file mode 100644 index 0000000000..90f43c4e1a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxpng.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxregex.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxregex.vcxproj new file mode 100644 index 0000000000..772b709b5b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxregex.vcxproj @@ -0,0 +1,497 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxregex + {56A4B526-BB81-5D01-AAA9-16D23BBB169D} + + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + $(ProjectName)$(wxSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + Disabled + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\include;$(OutDir)$(wxIncSubDir);%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxregex.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxregex.vcxproj.filters new file mode 100644 index 0000000000..0e3fbf0511 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxregex.vcxproj.filters @@ -0,0 +1,35 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxscintilla.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxscintilla.vcxproj new file mode 100644 index 0000000000..07e2cba439 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxscintilla.vcxproj @@ -0,0 +1,620 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxscintilla + {74827EBD-93DC-5110-BA95-3F2AB029B6B0} + + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;__WX__;SCI_LEXER;LINK_LEXERS;WXUSINGDLL;__WXMSW__;_UNICODE;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\stc\scintilla\include;..\..\src\stc\scintilla\lexlib;..\..\src\stc\scintilla\src;$(OutDir)$(wxIncSubDir);..\..\include;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxscintilla.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxscintilla.vcxproj.filters new file mode 100644 index 0000000000..1b75ea62c8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxscintilla.vcxproj.filters @@ -0,0 +1,380 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxtiff.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxtiff.vcxproj new file mode 100644 index 0000000000..3ef1c9ebc0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxtiff.vcxproj @@ -0,0 +1,475 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxtiff + {75596CE6-5AE7-55C9-B890-C07B0A657A83} + + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + $(OutDir)$(TargetName).pdb + Level3 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + ..\..\src\zlib;..\..\src\jpeg;..\..\src\tiff\libtiff;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxtiff.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxtiff.vcxproj.filters new file mode 100644 index 0000000000..b3074065e1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxtiff.vcxproj.filters @@ -0,0 +1,119 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxzlib.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxzlib.vcxproj new file mode 100644 index 0000000000..db18eb5bcc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxzlib.vcxproj @@ -0,0 +1,454 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + wxzlib + {8B867186-A0B5-5479-B824-E176EDD27C40} + + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + $(ProjectName)$(wxSuffixDebug) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Level3 + true + ProgramDatabase + $(OutDir)$(TargetName).pdb + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Level3 + true + ProgramDatabase + $(OutDir)$(TargetName).pdb + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + true + $(OutDir)$(TargetName).pdb + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Level3 + true + None + AnySuitable + true + Speed + $(OutDir)$(TargetName).pdb + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Level3 + true + ProgramDatabase + $(OutDir)$(TargetName).pdb + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + %(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Level3 + true + ProgramDatabase + $(OutDir)$(TargetName).pdb + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Level3 + true + ProgramDatabase + AnySuitable + true + Speed + $(OutDir)$(TargetName).pdb + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + %(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Level3 + true + None + AnySuitable + true + Speed + $(OutDir)$(TargetName).pdb + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions) + 0x0409 + %(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxzlib.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxzlib.vcxproj.filters new file mode 100644 index 0000000000..76e762f8d9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_wxzlib.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xml.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xml.vcxproj new file mode 100644 index 0000000000..a5e88e3933 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xml.vcxproj @@ -0,0 +1,567 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + xml + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxBaseLibNamePrefix)_$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);wxUSE_GUI=0;WXUSINGDLL;WXMAKINGDLL_XML;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxBaseLibNamePrefix)_$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xml.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xml.vcxproj.filters new file mode 100644 index 0000000000..18feef67c6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xml.vcxproj.filters @@ -0,0 +1,56 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Common Sources + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xrc.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xrc.vcxproj new file mode 100644 index 0000000000..85a19e8097 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xrc.vcxproj @@ -0,0 +1,692 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + xrc + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} + + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + DynamicLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + StaticLibrary + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix)_xml.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix)_xml.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + ProgramDatabase + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix)_xml.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + None + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_XRC;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)html.lib;$(wxToolkitLibNamePrefix)adv.lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix)_xml.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + + + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + Creating $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + copy "%(FullPath)" $(OutDir)$(wxIncSubDir)\wx\setup.h + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\setup.h;%(Outputs) + + + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + Creating $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + cl /EP /nologo "%(FullPath)" > "$(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h" + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw\rcdefs.h;%(Outputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + $(OutDir)$(wxIncSubDir)\wx\msw;%(AdditionalInputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xrc.vcxproj.filters b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xrc.vcxproj.filters new file mode 100644 index 0000000000..775cd3831d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc12_xrc.vcxproj.filters @@ -0,0 +1,431 @@ + + + + + {A6A5C30D-BDB6-5050-906D-10A96065136C} + + + {D030D8C2-53EE-5B96-8F89-D78157B06140} + + + {63537534-1833-5C1F-8DBD-359A84F294C8} + + + {5AFFF20E-29F9-512B-B80A-7DC45976CDAC} + + + {8C07E926-65B0-5F00-B0D6-7F40DA69BB25} + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + + + Common Sources + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + MSW Sources + + + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + Common Headers + + + + + Setup Headers + + + MSW Headers + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7.sln b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7.sln new file mode 100644 index 0000000000..ad723b1d82 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7.sln @@ -0,0 +1,248 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxregex", "wx_vc7_wxregex.vcproj", "{7A1A5354-6DB4-53F1-B75C-FE909D796167}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "wx_vc7_wxzlib.vcproj", "{DDD86D36-A4F6-5A54-AE2C-144B3594E1CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "wx_vc7_wxpng.vcproj", "{EE6AD15D-E891-5E03-AB6C-6F98ACE69A3C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "wx_vc7_wxjpeg.vcproj", "{3CA6563C-F480-52D4-AF05-D641E25A5DF2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxtiff", "wx_vc7_wxtiff.vcproj", "{456F9EAD-4A96-59BD-A39A-75DAA25D517B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxexpat", "wx_vc7_wxexpat.vcproj", "{AF27ABC5-1AB2-55D0-8E7D-239C0176530E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "wx_vc7_wxscintilla.vcproj", "{A00328D4-6B01-5DF5-828E-AC2CB8B83CF6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "wx_vc7_base.vcproj", "{79F1691B-08C4-55BB-985E-FDDB0BC8753C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "net", "wx_vc7_net.vcproj", "{48EEE04D-6B25-5A11-8A4A-B84C3C1146EC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "wx_vc7_core.vcproj", "{552E2EB7-F6EA-548D-A6CC-FCB0B246EE7F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv", "wx_vc7_adv.vcproj", "{35F2F245-4EF0-5FFB-AD23-E1D7DAC39F0E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media", "wx_vc7_media.vcproj", "{CD68AE51-BA90-5367-BB7D-F013E8E42AAF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "html", "wx_vc7_html.vcproj", "{C4CBFDA4-B78E-5C7D-A5EC-B20CF69DB256}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wx_vc7_webview.vcproj", "{BF21B19C-6122-566D-8795-8820E033BFA2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wx_vc7_qa.vcproj", "{5ADF90A8-DA5C-55B3-88F1-94C0A0E9C76D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "wx_vc7_xml.vcproj", "{B036100A-CEA0-5466-BE27-7E5B3687CAB8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wx_vc7_xrc.vcproj", "{40DB525F-1EFF-56A4-8301-3AAD661135F3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aui", "wx_vc7_aui.vcproj", "{0937D36F-9EAC-5D3D-B990-44B3F99BFC34}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wx_vc7_ribbon.vcproj", "{7973B6EB-688A-5E14-8175-A32A51A3DFC8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propgrid", "wx_vc7_propgrid.vcproj", "{F7A944F0-250D-57CD-8F71-BC38B2513B28}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "richtext", "wx_vc7_richtext.vcproj", "{52F16F53-E13D-55CA-AD64-ACB0274B0704}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stc", "wx_vc7_stc.vcproj", "{4B498696-42F2-5547-B159-87E4CAF436C1}" + ProjectSection(ProjectDependencies) = postProject + {A00328D4-6B01-5DF5-828E-AC2CB8B83CF6} = {A00328D4-6B01-5DF5-828E-AC2CB8B83CF6} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gl", "wx_vc7_gl.vcproj", "{407F0D6F-2B2D-5774-B9D3-FA972A663072}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Release|Win32 = DLL Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7A1A5354-6DB4-53F1-B75C-FE909D796167}.Debug|Win32.ActiveCfg = Debug|Win32 + {7A1A5354-6DB4-53F1-B75C-FE909D796167}.Debug|Win32.Build.0 = Debug|Win32 + {7A1A5354-6DB4-53F1-B75C-FE909D796167}.Release|Win32.ActiveCfg = Release|Win32 + {7A1A5354-6DB4-53F1-B75C-FE909D796167}.Release|Win32.Build.0 = Release|Win32 + {7A1A5354-6DB4-53F1-B75C-FE909D796167}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {7A1A5354-6DB4-53F1-B75C-FE909D796167}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {7A1A5354-6DB4-53F1-B75C-FE909D796167}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {7A1A5354-6DB4-53F1-B75C-FE909D796167}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {DDD86D36-A4F6-5A54-AE2C-144B3594E1CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {DDD86D36-A4F6-5A54-AE2C-144B3594E1CE}.Debug|Win32.Build.0 = Debug|Win32 + {DDD86D36-A4F6-5A54-AE2C-144B3594E1CE}.Release|Win32.ActiveCfg = Release|Win32 + {DDD86D36-A4F6-5A54-AE2C-144B3594E1CE}.Release|Win32.Build.0 = Release|Win32 + {DDD86D36-A4F6-5A54-AE2C-144B3594E1CE}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {DDD86D36-A4F6-5A54-AE2C-144B3594E1CE}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {DDD86D36-A4F6-5A54-AE2C-144B3594E1CE}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {DDD86D36-A4F6-5A54-AE2C-144B3594E1CE}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {EE6AD15D-E891-5E03-AB6C-6F98ACE69A3C}.Debug|Win32.ActiveCfg = Debug|Win32 + {EE6AD15D-E891-5E03-AB6C-6F98ACE69A3C}.Debug|Win32.Build.0 = Debug|Win32 + {EE6AD15D-E891-5E03-AB6C-6F98ACE69A3C}.Release|Win32.ActiveCfg = Release|Win32 + {EE6AD15D-E891-5E03-AB6C-6F98ACE69A3C}.Release|Win32.Build.0 = Release|Win32 + {EE6AD15D-E891-5E03-AB6C-6F98ACE69A3C}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {EE6AD15D-E891-5E03-AB6C-6F98ACE69A3C}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {EE6AD15D-E891-5E03-AB6C-6F98ACE69A3C}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {EE6AD15D-E891-5E03-AB6C-6F98ACE69A3C}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3CA6563C-F480-52D4-AF05-D641E25A5DF2}.Debug|Win32.ActiveCfg = Debug|Win32 + {3CA6563C-F480-52D4-AF05-D641E25A5DF2}.Debug|Win32.Build.0 = Debug|Win32 + {3CA6563C-F480-52D4-AF05-D641E25A5DF2}.Release|Win32.ActiveCfg = Release|Win32 + {3CA6563C-F480-52D4-AF05-D641E25A5DF2}.Release|Win32.Build.0 = Release|Win32 + {3CA6563C-F480-52D4-AF05-D641E25A5DF2}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3CA6563C-F480-52D4-AF05-D641E25A5DF2}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3CA6563C-F480-52D4-AF05-D641E25A5DF2}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3CA6563C-F480-52D4-AF05-D641E25A5DF2}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {456F9EAD-4A96-59BD-A39A-75DAA25D517B}.Debug|Win32.ActiveCfg = Debug|Win32 + {456F9EAD-4A96-59BD-A39A-75DAA25D517B}.Debug|Win32.Build.0 = Debug|Win32 + {456F9EAD-4A96-59BD-A39A-75DAA25D517B}.Release|Win32.ActiveCfg = Release|Win32 + {456F9EAD-4A96-59BD-A39A-75DAA25D517B}.Release|Win32.Build.0 = Release|Win32 + {456F9EAD-4A96-59BD-A39A-75DAA25D517B}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {456F9EAD-4A96-59BD-A39A-75DAA25D517B}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {456F9EAD-4A96-59BD-A39A-75DAA25D517B}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {456F9EAD-4A96-59BD-A39A-75DAA25D517B}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {AF27ABC5-1AB2-55D0-8E7D-239C0176530E}.Debug|Win32.ActiveCfg = Debug|Win32 + {AF27ABC5-1AB2-55D0-8E7D-239C0176530E}.Debug|Win32.Build.0 = Debug|Win32 + {AF27ABC5-1AB2-55D0-8E7D-239C0176530E}.Release|Win32.ActiveCfg = Release|Win32 + {AF27ABC5-1AB2-55D0-8E7D-239C0176530E}.Release|Win32.Build.0 = Release|Win32 + {AF27ABC5-1AB2-55D0-8E7D-239C0176530E}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {AF27ABC5-1AB2-55D0-8E7D-239C0176530E}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {AF27ABC5-1AB2-55D0-8E7D-239C0176530E}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {AF27ABC5-1AB2-55D0-8E7D-239C0176530E}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A00328D4-6B01-5DF5-828E-AC2CB8B83CF6}.Debug|Win32.ActiveCfg = Debug|Win32 + {A00328D4-6B01-5DF5-828E-AC2CB8B83CF6}.Debug|Win32.Build.0 = Debug|Win32 + {A00328D4-6B01-5DF5-828E-AC2CB8B83CF6}.Release|Win32.ActiveCfg = Release|Win32 + {A00328D4-6B01-5DF5-828E-AC2CB8B83CF6}.Release|Win32.Build.0 = Release|Win32 + {A00328D4-6B01-5DF5-828E-AC2CB8B83CF6}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A00328D4-6B01-5DF5-828E-AC2CB8B83CF6}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A00328D4-6B01-5DF5-828E-AC2CB8B83CF6}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A00328D4-6B01-5DF5-828E-AC2CB8B83CF6}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {79F1691B-08C4-55BB-985E-FDDB0BC8753C}.Debug|Win32.ActiveCfg = Debug|Win32 + {79F1691B-08C4-55BB-985E-FDDB0BC8753C}.Debug|Win32.Build.0 = Debug|Win32 + {79F1691B-08C4-55BB-985E-FDDB0BC8753C}.Release|Win32.ActiveCfg = Release|Win32 + {79F1691B-08C4-55BB-985E-FDDB0BC8753C}.Release|Win32.Build.0 = Release|Win32 + {79F1691B-08C4-55BB-985E-FDDB0BC8753C}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {79F1691B-08C4-55BB-985E-FDDB0BC8753C}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {79F1691B-08C4-55BB-985E-FDDB0BC8753C}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {79F1691B-08C4-55BB-985E-FDDB0BC8753C}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {48EEE04D-6B25-5A11-8A4A-B84C3C1146EC}.Debug|Win32.ActiveCfg = Debug|Win32 + {48EEE04D-6B25-5A11-8A4A-B84C3C1146EC}.Debug|Win32.Build.0 = Debug|Win32 + {48EEE04D-6B25-5A11-8A4A-B84C3C1146EC}.Release|Win32.ActiveCfg = Release|Win32 + {48EEE04D-6B25-5A11-8A4A-B84C3C1146EC}.Release|Win32.Build.0 = Release|Win32 + {48EEE04D-6B25-5A11-8A4A-B84C3C1146EC}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {48EEE04D-6B25-5A11-8A4A-B84C3C1146EC}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {48EEE04D-6B25-5A11-8A4A-B84C3C1146EC}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {48EEE04D-6B25-5A11-8A4A-B84C3C1146EC}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {552E2EB7-F6EA-548D-A6CC-FCB0B246EE7F}.Debug|Win32.ActiveCfg = Debug|Win32 + {552E2EB7-F6EA-548D-A6CC-FCB0B246EE7F}.Debug|Win32.Build.0 = Debug|Win32 + {552E2EB7-F6EA-548D-A6CC-FCB0B246EE7F}.Release|Win32.ActiveCfg = Release|Win32 + {552E2EB7-F6EA-548D-A6CC-FCB0B246EE7F}.Release|Win32.Build.0 = Release|Win32 + {552E2EB7-F6EA-548D-A6CC-FCB0B246EE7F}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {552E2EB7-F6EA-548D-A6CC-FCB0B246EE7F}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {552E2EB7-F6EA-548D-A6CC-FCB0B246EE7F}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {552E2EB7-F6EA-548D-A6CC-FCB0B246EE7F}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {35F2F245-4EF0-5FFB-AD23-E1D7DAC39F0E}.Debug|Win32.ActiveCfg = Debug|Win32 + {35F2F245-4EF0-5FFB-AD23-E1D7DAC39F0E}.Debug|Win32.Build.0 = Debug|Win32 + {35F2F245-4EF0-5FFB-AD23-E1D7DAC39F0E}.Release|Win32.ActiveCfg = Release|Win32 + {35F2F245-4EF0-5FFB-AD23-E1D7DAC39F0E}.Release|Win32.Build.0 = Release|Win32 + {35F2F245-4EF0-5FFB-AD23-E1D7DAC39F0E}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {35F2F245-4EF0-5FFB-AD23-E1D7DAC39F0E}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {35F2F245-4EF0-5FFB-AD23-E1D7DAC39F0E}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {35F2F245-4EF0-5FFB-AD23-E1D7DAC39F0E}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {CD68AE51-BA90-5367-BB7D-F013E8E42AAF}.Debug|Win32.ActiveCfg = Debug|Win32 + {CD68AE51-BA90-5367-BB7D-F013E8E42AAF}.Debug|Win32.Build.0 = Debug|Win32 + {CD68AE51-BA90-5367-BB7D-F013E8E42AAF}.Release|Win32.ActiveCfg = Release|Win32 + {CD68AE51-BA90-5367-BB7D-F013E8E42AAF}.Release|Win32.Build.0 = Release|Win32 + {CD68AE51-BA90-5367-BB7D-F013E8E42AAF}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {CD68AE51-BA90-5367-BB7D-F013E8E42AAF}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {CD68AE51-BA90-5367-BB7D-F013E8E42AAF}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {CD68AE51-BA90-5367-BB7D-F013E8E42AAF}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {C4CBFDA4-B78E-5C7D-A5EC-B20CF69DB256}.Debug|Win32.ActiveCfg = Debug|Win32 + {C4CBFDA4-B78E-5C7D-A5EC-B20CF69DB256}.Debug|Win32.Build.0 = Debug|Win32 + {C4CBFDA4-B78E-5C7D-A5EC-B20CF69DB256}.Release|Win32.ActiveCfg = Release|Win32 + {C4CBFDA4-B78E-5C7D-A5EC-B20CF69DB256}.Release|Win32.Build.0 = Release|Win32 + {C4CBFDA4-B78E-5C7D-A5EC-B20CF69DB256}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {C4CBFDA4-B78E-5C7D-A5EC-B20CF69DB256}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {C4CBFDA4-B78E-5C7D-A5EC-B20CF69DB256}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {C4CBFDA4-B78E-5C7D-A5EC-B20CF69DB256}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {BF21B19C-6122-566D-8795-8820E033BFA2}.Debug|Win32.ActiveCfg = Debug|Win32 + {BF21B19C-6122-566D-8795-8820E033BFA2}.Debug|Win32.Build.0 = Debug|Win32 + {BF21B19C-6122-566D-8795-8820E033BFA2}.Release|Win32.ActiveCfg = Release|Win32 + {BF21B19C-6122-566D-8795-8820E033BFA2}.Release|Win32.Build.0 = Release|Win32 + {BF21B19C-6122-566D-8795-8820E033BFA2}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {BF21B19C-6122-566D-8795-8820E033BFA2}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {BF21B19C-6122-566D-8795-8820E033BFA2}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {BF21B19C-6122-566D-8795-8820E033BFA2}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {5ADF90A8-DA5C-55B3-88F1-94C0A0E9C76D}.Debug|Win32.ActiveCfg = Debug|Win32 + {5ADF90A8-DA5C-55B3-88F1-94C0A0E9C76D}.Debug|Win32.Build.0 = Debug|Win32 + {5ADF90A8-DA5C-55B3-88F1-94C0A0E9C76D}.Release|Win32.ActiveCfg = Release|Win32 + {5ADF90A8-DA5C-55B3-88F1-94C0A0E9C76D}.Release|Win32.Build.0 = Release|Win32 + {5ADF90A8-DA5C-55B3-88F1-94C0A0E9C76D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {5ADF90A8-DA5C-55B3-88F1-94C0A0E9C76D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {5ADF90A8-DA5C-55B3-88F1-94C0A0E9C76D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {5ADF90A8-DA5C-55B3-88F1-94C0A0E9C76D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {B036100A-CEA0-5466-BE27-7E5B3687CAB8}.Debug|Win32.ActiveCfg = Debug|Win32 + {B036100A-CEA0-5466-BE27-7E5B3687CAB8}.Debug|Win32.Build.0 = Debug|Win32 + {B036100A-CEA0-5466-BE27-7E5B3687CAB8}.Release|Win32.ActiveCfg = Release|Win32 + {B036100A-CEA0-5466-BE27-7E5B3687CAB8}.Release|Win32.Build.0 = Release|Win32 + {B036100A-CEA0-5466-BE27-7E5B3687CAB8}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {B036100A-CEA0-5466-BE27-7E5B3687CAB8}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {B036100A-CEA0-5466-BE27-7E5B3687CAB8}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {B036100A-CEA0-5466-BE27-7E5B3687CAB8}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {40DB525F-1EFF-56A4-8301-3AAD661135F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {40DB525F-1EFF-56A4-8301-3AAD661135F3}.Debug|Win32.Build.0 = Debug|Win32 + {40DB525F-1EFF-56A4-8301-3AAD661135F3}.Release|Win32.ActiveCfg = Release|Win32 + {40DB525F-1EFF-56A4-8301-3AAD661135F3}.Release|Win32.Build.0 = Release|Win32 + {40DB525F-1EFF-56A4-8301-3AAD661135F3}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {40DB525F-1EFF-56A4-8301-3AAD661135F3}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {40DB525F-1EFF-56A4-8301-3AAD661135F3}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {40DB525F-1EFF-56A4-8301-3AAD661135F3}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {0937D36F-9EAC-5D3D-B990-44B3F99BFC34}.Debug|Win32.ActiveCfg = Debug|Win32 + {0937D36F-9EAC-5D3D-B990-44B3F99BFC34}.Debug|Win32.Build.0 = Debug|Win32 + {0937D36F-9EAC-5D3D-B990-44B3F99BFC34}.Release|Win32.ActiveCfg = Release|Win32 + {0937D36F-9EAC-5D3D-B990-44B3F99BFC34}.Release|Win32.Build.0 = Release|Win32 + {0937D36F-9EAC-5D3D-B990-44B3F99BFC34}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {0937D36F-9EAC-5D3D-B990-44B3F99BFC34}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {0937D36F-9EAC-5D3D-B990-44B3F99BFC34}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {0937D36F-9EAC-5D3D-B990-44B3F99BFC34}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {7973B6EB-688A-5E14-8175-A32A51A3DFC8}.Debug|Win32.ActiveCfg = Debug|Win32 + {7973B6EB-688A-5E14-8175-A32A51A3DFC8}.Debug|Win32.Build.0 = Debug|Win32 + {7973B6EB-688A-5E14-8175-A32A51A3DFC8}.Release|Win32.ActiveCfg = Release|Win32 + {7973B6EB-688A-5E14-8175-A32A51A3DFC8}.Release|Win32.Build.0 = Release|Win32 + {7973B6EB-688A-5E14-8175-A32A51A3DFC8}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {7973B6EB-688A-5E14-8175-A32A51A3DFC8}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {7973B6EB-688A-5E14-8175-A32A51A3DFC8}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {7973B6EB-688A-5E14-8175-A32A51A3DFC8}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {F7A944F0-250D-57CD-8F71-BC38B2513B28}.Debug|Win32.ActiveCfg = Debug|Win32 + {F7A944F0-250D-57CD-8F71-BC38B2513B28}.Debug|Win32.Build.0 = Debug|Win32 + {F7A944F0-250D-57CD-8F71-BC38B2513B28}.Release|Win32.ActiveCfg = Release|Win32 + {F7A944F0-250D-57CD-8F71-BC38B2513B28}.Release|Win32.Build.0 = Release|Win32 + {F7A944F0-250D-57CD-8F71-BC38B2513B28}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {F7A944F0-250D-57CD-8F71-BC38B2513B28}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {F7A944F0-250D-57CD-8F71-BC38B2513B28}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {F7A944F0-250D-57CD-8F71-BC38B2513B28}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {52F16F53-E13D-55CA-AD64-ACB0274B0704}.Debug|Win32.ActiveCfg = Debug|Win32 + {52F16F53-E13D-55CA-AD64-ACB0274B0704}.Debug|Win32.Build.0 = Debug|Win32 + {52F16F53-E13D-55CA-AD64-ACB0274B0704}.Release|Win32.ActiveCfg = Release|Win32 + {52F16F53-E13D-55CA-AD64-ACB0274B0704}.Release|Win32.Build.0 = Release|Win32 + {52F16F53-E13D-55CA-AD64-ACB0274B0704}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {52F16F53-E13D-55CA-AD64-ACB0274B0704}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {52F16F53-E13D-55CA-AD64-ACB0274B0704}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {52F16F53-E13D-55CA-AD64-ACB0274B0704}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {4B498696-42F2-5547-B159-87E4CAF436C1}.Debug|Win32.ActiveCfg = Debug|Win32 + {4B498696-42F2-5547-B159-87E4CAF436C1}.Debug|Win32.Build.0 = Debug|Win32 + {4B498696-42F2-5547-B159-87E4CAF436C1}.Release|Win32.ActiveCfg = Release|Win32 + {4B498696-42F2-5547-B159-87E4CAF436C1}.Release|Win32.Build.0 = Release|Win32 + {4B498696-42F2-5547-B159-87E4CAF436C1}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {4B498696-42F2-5547-B159-87E4CAF436C1}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {4B498696-42F2-5547-B159-87E4CAF436C1}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {4B498696-42F2-5547-B159-87E4CAF436C1}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {407F0D6F-2B2D-5774-B9D3-FA972A663072}.Debug|Win32.ActiveCfg = Debug|Win32 + {407F0D6F-2B2D-5774-B9D3-FA972A663072}.Debug|Win32.Build.0 = Debug|Win32 + {407F0D6F-2B2D-5774-B9D3-FA972A663072}.Release|Win32.ActiveCfg = Release|Win32 + {407F0D6F-2B2D-5774-B9D3-FA972A663072}.Release|Win32.Build.0 = Release|Win32 + {407F0D6F-2B2D-5774-B9D3-FA972A663072}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {407F0D6F-2B2D-5774-B9D3-FA972A663072}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {407F0D6F-2B2D-5774-B9D3-FA972A663072}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {407F0D6F-2B2D-5774-B9D3-FA972A663072}.DLL Release|Win32.Build.0 = DLL Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_adv.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_adv.vcproj new file mode 100644 index 0000000000..fd63bb094a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_adv.vcproj @@ -0,0 +1,760 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_aui.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_aui.vcproj new file mode 100644 index 0000000000..eb2cdac9ea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_aui.vcproj @@ -0,0 +1,478 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_base.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_base.vcproj new file mode 100644 index 0000000000..d9fbe15892 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_base.vcproj @@ -0,0 +1,1346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_core.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_core.vcproj new file mode 100644 index 0000000000..8bd4f46f96 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_core.vcproj @@ -0,0 +1,2914 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_gl.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_gl.vcproj new file mode 100644 index 0000000000..ac8992a878 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_gl.vcproj @@ -0,0 +1,434 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_html.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_html.vcproj new file mode 100644 index 0000000000..ea2168e8c4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_html.vcproj @@ -0,0 +1,569 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_media.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_media.vcproj new file mode 100644 index 0000000000..860c336428 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_media.vcproj @@ -0,0 +1,437 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_net.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_net.vcproj new file mode 100644 index 0000000000..59ab48a9b3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_net.vcproj @@ -0,0 +1,491 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_propgrid.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_propgrid.vcproj new file mode 100644 index 0000000000..e62dd8acac --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_propgrid.vcproj @@ -0,0 +1,478 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_qa.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_qa.vcproj new file mode 100644 index 0000000000..c368469b2b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_qa.vcproj @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_ribbon.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_ribbon.vcproj new file mode 100644 index 0000000000..9b53a97ce5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_ribbon.vcproj @@ -0,0 +1,490 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_richtext.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_richtext.vcproj new file mode 100644 index 0000000000..afb95d8460 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_richtext.vcproj @@ -0,0 +1,529 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_stc.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_stc.vcproj new file mode 100644 index 0000000000..8227fb7d94 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_stc.vcproj @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_webview.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_webview.vcproj new file mode 100644 index 0000000000..7728cfb3ef --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_webview.vcproj @@ -0,0 +1,452 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxexpat.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxexpat.vcproj new file mode 100644 index 0000000000..ec6216019c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxexpat.vcproj @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxjpeg.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxjpeg.vcproj new file mode 100644 index 0000000000..de882959de --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxjpeg.vcproj @@ -0,0 +1,390 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxpng.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxpng.vcproj new file mode 100644 index 0000000000..f8debfab46 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxpng.vcproj @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxregex.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxregex.vcproj new file mode 100644 index 0000000000..efffd6609f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxregex.vcproj @@ -0,0 +1,358 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxscintilla.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxscintilla.vcproj new file mode 100644 index 0000000000..98b4c15cb5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxscintilla.vcproj @@ -0,0 +1,703 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxtiff.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxtiff.vcproj new file mode 100644 index 0000000000..6cbb2d1776 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxtiff.vcproj @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxzlib.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxzlib.vcproj new file mode 100644 index 0000000000..d0d9edde8b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_wxzlib.vcproj @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_xml.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_xml.vcproj new file mode 100644 index 0000000000..e09b1da34f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_xml.vcproj @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_xrc.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_xrc.vcproj new file mode 100644 index 0000000000..eca30bde61 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc7_xrc.vcproj @@ -0,0 +1,814 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8.sln b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8.sln new file mode 100644 index 0000000000..55f8f624f7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8.sln @@ -0,0 +1,249 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxregex", "wx_vc8_wxregex.vcproj", "{078F4E39-D258-54B5-B1B1-4905D10E06DC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "wx_vc8_wxzlib.vcproj", "{02A5D9F0-B0D3-5AD7-B6BA-9E5C05647992}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "wx_vc8_wxpng.vcproj", "{2E428F55-7263-58A2-80E4-59D2E6BD9E5A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "wx_vc8_wxjpeg.vcproj", "{4BDDC25D-2967-5450-8439-107D28E7B5D7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxtiff", "wx_vc8_wxtiff.vcproj", "{6C6028A1-9741-536A-A4CC-AD9D5A21EFE9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxexpat", "wx_vc8_wxexpat.vcproj", "{3E2CE61B-B4B7-5120-8EE3-65ECC0BE055E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "wx_vc8_wxscintilla.vcproj", "{CC1B3044-403C-53A2-8AA5-821F7A99A29F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "wx_vc8_base.vcproj", "{9B9B8541-3661-5AD8-8DFF-0BE67FBF1A37}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "net", "wx_vc8_net.vcproj", "{C752F044-0E49-5C21-818F-751B327B35AA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "wx_vc8_core.vcproj", "{A92A7D53-52C9-5561-AD62-A3EC4379CC4D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv", "wx_vc8_adv.vcproj", "{2764E632-B514-5EEE-BD94-23BCF6FC2A92}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media", "wx_vc8_media.vcproj", "{3FCADF33-E2F4-5D9C-9300-A5995BDA9378}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "html", "wx_vc8_html.vcproj", "{32B18CFE-19C8-5F72-9759-CE03A314A875}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wx_vc8_webview.vcproj", "{51173FB3-6227-51D7-8807-1FC9CD18781C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wx_vc8_qa.vcproj", "{6EA54780-4728-5F04-A501-3B3F4538874C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "wx_vc8_xml.vcproj", "{CD477539-2983-5490-B8C4-DC72B2760FFF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wx_vc8_xrc.vcproj", "{5802720D-A6B1-5E95-AFF3-B80CFE03431B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aui", "wx_vc8_aui.vcproj", "{B361C000-79E7-5B8A-8F5F-BC0168C7002E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wx_vc8_ribbon.vcproj", "{F751C47E-8534-571F-8E4A-F0E6AC978D63}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propgrid", "wx_vc8_propgrid.vcproj", "{93781718-26B6-5541-84C5-78C6A8226AEC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "richtext", "wx_vc8_richtext.vcproj", "{4928FA3B-C258-5E39-AE05-E4BD709955B3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stc", "wx_vc8_stc.vcproj", "{FA559111-7B08-54E7-BD3B-0B621C819C78}" + ProjectSection(ProjectDependencies) = postProject + {CC1B3044-403C-53A2-8AA5-821F7A99A29F} = {CC1B3044-403C-53A2-8AA5-821F7A99A29F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gl", "wx_vc8_gl.vcproj", "{F2A00E07-A7DC-511E-912E-B3A10B8A93CC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Release|Win32 = DLL Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {078F4E39-D258-54B5-B1B1-4905D10E06DC}.Debug|Win32.ActiveCfg = Debug|Win32 + {078F4E39-D258-54B5-B1B1-4905D10E06DC}.Debug|Win32.Build.0 = Debug|Win32 + {078F4E39-D258-54B5-B1B1-4905D10E06DC}.Release|Win32.ActiveCfg = Release|Win32 + {078F4E39-D258-54B5-B1B1-4905D10E06DC}.Release|Win32.Build.0 = Release|Win32 + {078F4E39-D258-54B5-B1B1-4905D10E06DC}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {078F4E39-D258-54B5-B1B1-4905D10E06DC}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {078F4E39-D258-54B5-B1B1-4905D10E06DC}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {078F4E39-D258-54B5-B1B1-4905D10E06DC}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {02A5D9F0-B0D3-5AD7-B6BA-9E5C05647992}.Debug|Win32.ActiveCfg = Debug|Win32 + {02A5D9F0-B0D3-5AD7-B6BA-9E5C05647992}.Debug|Win32.Build.0 = Debug|Win32 + {02A5D9F0-B0D3-5AD7-B6BA-9E5C05647992}.Release|Win32.ActiveCfg = Release|Win32 + {02A5D9F0-B0D3-5AD7-B6BA-9E5C05647992}.Release|Win32.Build.0 = Release|Win32 + {02A5D9F0-B0D3-5AD7-B6BA-9E5C05647992}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {02A5D9F0-B0D3-5AD7-B6BA-9E5C05647992}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {02A5D9F0-B0D3-5AD7-B6BA-9E5C05647992}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {02A5D9F0-B0D3-5AD7-B6BA-9E5C05647992}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {2E428F55-7263-58A2-80E4-59D2E6BD9E5A}.Debug|Win32.ActiveCfg = Debug|Win32 + {2E428F55-7263-58A2-80E4-59D2E6BD9E5A}.Debug|Win32.Build.0 = Debug|Win32 + {2E428F55-7263-58A2-80E4-59D2E6BD9E5A}.Release|Win32.ActiveCfg = Release|Win32 + {2E428F55-7263-58A2-80E4-59D2E6BD9E5A}.Release|Win32.Build.0 = Release|Win32 + {2E428F55-7263-58A2-80E4-59D2E6BD9E5A}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {2E428F55-7263-58A2-80E4-59D2E6BD9E5A}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {2E428F55-7263-58A2-80E4-59D2E6BD9E5A}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {2E428F55-7263-58A2-80E4-59D2E6BD9E5A}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {4BDDC25D-2967-5450-8439-107D28E7B5D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {4BDDC25D-2967-5450-8439-107D28E7B5D7}.Debug|Win32.Build.0 = Debug|Win32 + {4BDDC25D-2967-5450-8439-107D28E7B5D7}.Release|Win32.ActiveCfg = Release|Win32 + {4BDDC25D-2967-5450-8439-107D28E7B5D7}.Release|Win32.Build.0 = Release|Win32 + {4BDDC25D-2967-5450-8439-107D28E7B5D7}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {4BDDC25D-2967-5450-8439-107D28E7B5D7}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {4BDDC25D-2967-5450-8439-107D28E7B5D7}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {4BDDC25D-2967-5450-8439-107D28E7B5D7}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {6C6028A1-9741-536A-A4CC-AD9D5A21EFE9}.Debug|Win32.ActiveCfg = Debug|Win32 + {6C6028A1-9741-536A-A4CC-AD9D5A21EFE9}.Debug|Win32.Build.0 = Debug|Win32 + {6C6028A1-9741-536A-A4CC-AD9D5A21EFE9}.Release|Win32.ActiveCfg = Release|Win32 + {6C6028A1-9741-536A-A4CC-AD9D5A21EFE9}.Release|Win32.Build.0 = Release|Win32 + {6C6028A1-9741-536A-A4CC-AD9D5A21EFE9}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {6C6028A1-9741-536A-A4CC-AD9D5A21EFE9}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {6C6028A1-9741-536A-A4CC-AD9D5A21EFE9}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {6C6028A1-9741-536A-A4CC-AD9D5A21EFE9}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3E2CE61B-B4B7-5120-8EE3-65ECC0BE055E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E2CE61B-B4B7-5120-8EE3-65ECC0BE055E}.Debug|Win32.Build.0 = Debug|Win32 + {3E2CE61B-B4B7-5120-8EE3-65ECC0BE055E}.Release|Win32.ActiveCfg = Release|Win32 + {3E2CE61B-B4B7-5120-8EE3-65ECC0BE055E}.Release|Win32.Build.0 = Release|Win32 + {3E2CE61B-B4B7-5120-8EE3-65ECC0BE055E}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3E2CE61B-B4B7-5120-8EE3-65ECC0BE055E}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3E2CE61B-B4B7-5120-8EE3-65ECC0BE055E}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3E2CE61B-B4B7-5120-8EE3-65ECC0BE055E}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {CC1B3044-403C-53A2-8AA5-821F7A99A29F}.Debug|Win32.ActiveCfg = Debug|Win32 + {CC1B3044-403C-53A2-8AA5-821F7A99A29F}.Debug|Win32.Build.0 = Debug|Win32 + {CC1B3044-403C-53A2-8AA5-821F7A99A29F}.Release|Win32.ActiveCfg = Release|Win32 + {CC1B3044-403C-53A2-8AA5-821F7A99A29F}.Release|Win32.Build.0 = Release|Win32 + {CC1B3044-403C-53A2-8AA5-821F7A99A29F}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {CC1B3044-403C-53A2-8AA5-821F7A99A29F}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {CC1B3044-403C-53A2-8AA5-821F7A99A29F}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {CC1B3044-403C-53A2-8AA5-821F7A99A29F}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {9B9B8541-3661-5AD8-8DFF-0BE67FBF1A37}.Debug|Win32.ActiveCfg = Debug|Win32 + {9B9B8541-3661-5AD8-8DFF-0BE67FBF1A37}.Debug|Win32.Build.0 = Debug|Win32 + {9B9B8541-3661-5AD8-8DFF-0BE67FBF1A37}.Release|Win32.ActiveCfg = Release|Win32 + {9B9B8541-3661-5AD8-8DFF-0BE67FBF1A37}.Release|Win32.Build.0 = Release|Win32 + {9B9B8541-3661-5AD8-8DFF-0BE67FBF1A37}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {9B9B8541-3661-5AD8-8DFF-0BE67FBF1A37}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {9B9B8541-3661-5AD8-8DFF-0BE67FBF1A37}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {9B9B8541-3661-5AD8-8DFF-0BE67FBF1A37}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {C752F044-0E49-5C21-818F-751B327B35AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {C752F044-0E49-5C21-818F-751B327B35AA}.Debug|Win32.Build.0 = Debug|Win32 + {C752F044-0E49-5C21-818F-751B327B35AA}.Release|Win32.ActiveCfg = Release|Win32 + {C752F044-0E49-5C21-818F-751B327B35AA}.Release|Win32.Build.0 = Release|Win32 + {C752F044-0E49-5C21-818F-751B327B35AA}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {C752F044-0E49-5C21-818F-751B327B35AA}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {C752F044-0E49-5C21-818F-751B327B35AA}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {C752F044-0E49-5C21-818F-751B327B35AA}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A92A7D53-52C9-5561-AD62-A3EC4379CC4D}.Debug|Win32.ActiveCfg = Debug|Win32 + {A92A7D53-52C9-5561-AD62-A3EC4379CC4D}.Debug|Win32.Build.0 = Debug|Win32 + {A92A7D53-52C9-5561-AD62-A3EC4379CC4D}.Release|Win32.ActiveCfg = Release|Win32 + {A92A7D53-52C9-5561-AD62-A3EC4379CC4D}.Release|Win32.Build.0 = Release|Win32 + {A92A7D53-52C9-5561-AD62-A3EC4379CC4D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A92A7D53-52C9-5561-AD62-A3EC4379CC4D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A92A7D53-52C9-5561-AD62-A3EC4379CC4D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A92A7D53-52C9-5561-AD62-A3EC4379CC4D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {2764E632-B514-5EEE-BD94-23BCF6FC2A92}.Debug|Win32.ActiveCfg = Debug|Win32 + {2764E632-B514-5EEE-BD94-23BCF6FC2A92}.Debug|Win32.Build.0 = Debug|Win32 + {2764E632-B514-5EEE-BD94-23BCF6FC2A92}.Release|Win32.ActiveCfg = Release|Win32 + {2764E632-B514-5EEE-BD94-23BCF6FC2A92}.Release|Win32.Build.0 = Release|Win32 + {2764E632-B514-5EEE-BD94-23BCF6FC2A92}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {2764E632-B514-5EEE-BD94-23BCF6FC2A92}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {2764E632-B514-5EEE-BD94-23BCF6FC2A92}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {2764E632-B514-5EEE-BD94-23BCF6FC2A92}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3FCADF33-E2F4-5D9C-9300-A5995BDA9378}.Debug|Win32.ActiveCfg = Debug|Win32 + {3FCADF33-E2F4-5D9C-9300-A5995BDA9378}.Debug|Win32.Build.0 = Debug|Win32 + {3FCADF33-E2F4-5D9C-9300-A5995BDA9378}.Release|Win32.ActiveCfg = Release|Win32 + {3FCADF33-E2F4-5D9C-9300-A5995BDA9378}.Release|Win32.Build.0 = Release|Win32 + {3FCADF33-E2F4-5D9C-9300-A5995BDA9378}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3FCADF33-E2F4-5D9C-9300-A5995BDA9378}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3FCADF33-E2F4-5D9C-9300-A5995BDA9378}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3FCADF33-E2F4-5D9C-9300-A5995BDA9378}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {32B18CFE-19C8-5F72-9759-CE03A314A875}.Debug|Win32.ActiveCfg = Debug|Win32 + {32B18CFE-19C8-5F72-9759-CE03A314A875}.Debug|Win32.Build.0 = Debug|Win32 + {32B18CFE-19C8-5F72-9759-CE03A314A875}.Release|Win32.ActiveCfg = Release|Win32 + {32B18CFE-19C8-5F72-9759-CE03A314A875}.Release|Win32.Build.0 = Release|Win32 + {32B18CFE-19C8-5F72-9759-CE03A314A875}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {32B18CFE-19C8-5F72-9759-CE03A314A875}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {32B18CFE-19C8-5F72-9759-CE03A314A875}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {32B18CFE-19C8-5F72-9759-CE03A314A875}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {51173FB3-6227-51D7-8807-1FC9CD18781C}.Debug|Win32.ActiveCfg = Debug|Win32 + {51173FB3-6227-51D7-8807-1FC9CD18781C}.Debug|Win32.Build.0 = Debug|Win32 + {51173FB3-6227-51D7-8807-1FC9CD18781C}.Release|Win32.ActiveCfg = Release|Win32 + {51173FB3-6227-51D7-8807-1FC9CD18781C}.Release|Win32.Build.0 = Release|Win32 + {51173FB3-6227-51D7-8807-1FC9CD18781C}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {51173FB3-6227-51D7-8807-1FC9CD18781C}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {51173FB3-6227-51D7-8807-1FC9CD18781C}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {51173FB3-6227-51D7-8807-1FC9CD18781C}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {6EA54780-4728-5F04-A501-3B3F4538874C}.Debug|Win32.ActiveCfg = Debug|Win32 + {6EA54780-4728-5F04-A501-3B3F4538874C}.Debug|Win32.Build.0 = Debug|Win32 + {6EA54780-4728-5F04-A501-3B3F4538874C}.Release|Win32.ActiveCfg = Release|Win32 + {6EA54780-4728-5F04-A501-3B3F4538874C}.Release|Win32.Build.0 = Release|Win32 + {6EA54780-4728-5F04-A501-3B3F4538874C}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {6EA54780-4728-5F04-A501-3B3F4538874C}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {6EA54780-4728-5F04-A501-3B3F4538874C}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {6EA54780-4728-5F04-A501-3B3F4538874C}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {CD477539-2983-5490-B8C4-DC72B2760FFF}.Debug|Win32.ActiveCfg = Debug|Win32 + {CD477539-2983-5490-B8C4-DC72B2760FFF}.Debug|Win32.Build.0 = Debug|Win32 + {CD477539-2983-5490-B8C4-DC72B2760FFF}.Release|Win32.ActiveCfg = Release|Win32 + {CD477539-2983-5490-B8C4-DC72B2760FFF}.Release|Win32.Build.0 = Release|Win32 + {CD477539-2983-5490-B8C4-DC72B2760FFF}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {CD477539-2983-5490-B8C4-DC72B2760FFF}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {CD477539-2983-5490-B8C4-DC72B2760FFF}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {CD477539-2983-5490-B8C4-DC72B2760FFF}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {5802720D-A6B1-5E95-AFF3-B80CFE03431B}.Debug|Win32.ActiveCfg = Debug|Win32 + {5802720D-A6B1-5E95-AFF3-B80CFE03431B}.Debug|Win32.Build.0 = Debug|Win32 + {5802720D-A6B1-5E95-AFF3-B80CFE03431B}.Release|Win32.ActiveCfg = Release|Win32 + {5802720D-A6B1-5E95-AFF3-B80CFE03431B}.Release|Win32.Build.0 = Release|Win32 + {5802720D-A6B1-5E95-AFF3-B80CFE03431B}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {5802720D-A6B1-5E95-AFF3-B80CFE03431B}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {5802720D-A6B1-5E95-AFF3-B80CFE03431B}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {5802720D-A6B1-5E95-AFF3-B80CFE03431B}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {B361C000-79E7-5B8A-8F5F-BC0168C7002E}.Debug|Win32.ActiveCfg = Debug|Win32 + {B361C000-79E7-5B8A-8F5F-BC0168C7002E}.Debug|Win32.Build.0 = Debug|Win32 + {B361C000-79E7-5B8A-8F5F-BC0168C7002E}.Release|Win32.ActiveCfg = Release|Win32 + {B361C000-79E7-5B8A-8F5F-BC0168C7002E}.Release|Win32.Build.0 = Release|Win32 + {B361C000-79E7-5B8A-8F5F-BC0168C7002E}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {B361C000-79E7-5B8A-8F5F-BC0168C7002E}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {B361C000-79E7-5B8A-8F5F-BC0168C7002E}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {B361C000-79E7-5B8A-8F5F-BC0168C7002E}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {F751C47E-8534-571F-8E4A-F0E6AC978D63}.Debug|Win32.ActiveCfg = Debug|Win32 + {F751C47E-8534-571F-8E4A-F0E6AC978D63}.Debug|Win32.Build.0 = Debug|Win32 + {F751C47E-8534-571F-8E4A-F0E6AC978D63}.Release|Win32.ActiveCfg = Release|Win32 + {F751C47E-8534-571F-8E4A-F0E6AC978D63}.Release|Win32.Build.0 = Release|Win32 + {F751C47E-8534-571F-8E4A-F0E6AC978D63}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {F751C47E-8534-571F-8E4A-F0E6AC978D63}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {F751C47E-8534-571F-8E4A-F0E6AC978D63}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {F751C47E-8534-571F-8E4A-F0E6AC978D63}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {93781718-26B6-5541-84C5-78C6A8226AEC}.Debug|Win32.ActiveCfg = Debug|Win32 + {93781718-26B6-5541-84C5-78C6A8226AEC}.Debug|Win32.Build.0 = Debug|Win32 + {93781718-26B6-5541-84C5-78C6A8226AEC}.Release|Win32.ActiveCfg = Release|Win32 + {93781718-26B6-5541-84C5-78C6A8226AEC}.Release|Win32.Build.0 = Release|Win32 + {93781718-26B6-5541-84C5-78C6A8226AEC}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {93781718-26B6-5541-84C5-78C6A8226AEC}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {93781718-26B6-5541-84C5-78C6A8226AEC}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {93781718-26B6-5541-84C5-78C6A8226AEC}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {4928FA3B-C258-5E39-AE05-E4BD709955B3}.Debug|Win32.ActiveCfg = Debug|Win32 + {4928FA3B-C258-5E39-AE05-E4BD709955B3}.Debug|Win32.Build.0 = Debug|Win32 + {4928FA3B-C258-5E39-AE05-E4BD709955B3}.Release|Win32.ActiveCfg = Release|Win32 + {4928FA3B-C258-5E39-AE05-E4BD709955B3}.Release|Win32.Build.0 = Release|Win32 + {4928FA3B-C258-5E39-AE05-E4BD709955B3}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {4928FA3B-C258-5E39-AE05-E4BD709955B3}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {4928FA3B-C258-5E39-AE05-E4BD709955B3}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {4928FA3B-C258-5E39-AE05-E4BD709955B3}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {FA559111-7B08-54E7-BD3B-0B621C819C78}.Debug|Win32.ActiveCfg = Debug|Win32 + {FA559111-7B08-54E7-BD3B-0B621C819C78}.Debug|Win32.Build.0 = Debug|Win32 + {FA559111-7B08-54E7-BD3B-0B621C819C78}.Release|Win32.ActiveCfg = Release|Win32 + {FA559111-7B08-54E7-BD3B-0B621C819C78}.Release|Win32.Build.0 = Release|Win32 + {FA559111-7B08-54E7-BD3B-0B621C819C78}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {FA559111-7B08-54E7-BD3B-0B621C819C78}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {FA559111-7B08-54E7-BD3B-0B621C819C78}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {FA559111-7B08-54E7-BD3B-0B621C819C78}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {F2A00E07-A7DC-511E-912E-B3A10B8A93CC}.Debug|Win32.ActiveCfg = Debug|Win32 + {F2A00E07-A7DC-511E-912E-B3A10B8A93CC}.Debug|Win32.Build.0 = Debug|Win32 + {F2A00E07-A7DC-511E-912E-B3A10B8A93CC}.Release|Win32.ActiveCfg = Release|Win32 + {F2A00E07-A7DC-511E-912E-B3A10B8A93CC}.Release|Win32.Build.0 = Release|Win32 + {F2A00E07-A7DC-511E-912E-B3A10B8A93CC}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {F2A00E07-A7DC-511E-912E-B3A10B8A93CC}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {F2A00E07-A7DC-511E-912E-B3A10B8A93CC}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {F2A00E07-A7DC-511E-912E-B3A10B8A93CC}.DLL Release|Win32.Build.0 = DLL Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_adv.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_adv.vcproj new file mode 100644 index 0000000000..b09a5b6567 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_adv.vcproj @@ -0,0 +1,1019 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_aui.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_aui.vcproj new file mode 100644 index 0000000000..fec567146e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_aui.vcproj @@ -0,0 +1,643 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_base.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_base.vcproj new file mode 100644 index 0000000000..2719275fc6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_base.vcproj @@ -0,0 +1,1800 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_core.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_core.vcproj new file mode 100644 index 0000000000..fa9901f2bc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_core.vcproj @@ -0,0 +1,3890 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_gl.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_gl.vcproj new file mode 100644 index 0000000000..898d32bdc4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_gl.vcproj @@ -0,0 +1,585 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_html.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_html.vcproj new file mode 100644 index 0000000000..deea2934d7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_html.vcproj @@ -0,0 +1,764 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_media.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_media.vcproj new file mode 100644 index 0000000000..3ae22be241 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_media.vcproj @@ -0,0 +1,589 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_net.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_net.vcproj new file mode 100644 index 0000000000..19a46f7cbd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_net.vcproj @@ -0,0 +1,661 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_propgrid.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_propgrid.vcproj new file mode 100644 index 0000000000..0af6df8fe5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_propgrid.vcproj @@ -0,0 +1,643 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_qa.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_qa.vcproj new file mode 100644 index 0000000000..f5b04aba08 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_qa.vcproj @@ -0,0 +1,586 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_ribbon.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_ribbon.vcproj new file mode 100644 index 0000000000..ca62286862 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_ribbon.vcproj @@ -0,0 +1,659 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_richtext.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_richtext.vcproj new file mode 100644 index 0000000000..e4b1aaca1e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_richtext.vcproj @@ -0,0 +1,711 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_stc.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_stc.vcproj new file mode 100644 index 0000000000..d0071ff976 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_stc.vcproj @@ -0,0 +1,591 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_webview.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_webview.vcproj new file mode 100644 index 0000000000..f5c049c7cd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_webview.vcproj @@ -0,0 +1,609 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxexpat.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxexpat.vcproj new file mode 100644 index 0000000000..c9ff1563d7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxexpat.vcproj @@ -0,0 +1,370 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxjpeg.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxjpeg.vcproj new file mode 100644 index 0000000000..7aa7e6388f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxjpeg.vcproj @@ -0,0 +1,542 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxpng.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxpng.vcproj new file mode 100644 index 0000000000..5eec3cd8e8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxpng.vcproj @@ -0,0 +1,418 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxregex.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxregex.vcproj new file mode 100644 index 0000000000..f68f2ccdd8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxregex.vcproj @@ -0,0 +1,492 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxscintilla.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxscintilla.vcproj new file mode 100644 index 0000000000..9e150277e8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxscintilla.vcproj @@ -0,0 +1,952 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxtiff.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxtiff.vcproj new file mode 100644 index 0000000000..0a81f69605 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxtiff.vcproj @@ -0,0 +1,514 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxzlib.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxzlib.vcproj new file mode 100644 index 0000000000..6c160c8bc6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_wxzlib.vcproj @@ -0,0 +1,418 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_xml.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_xml.vcproj new file mode 100644 index 0000000000..e1d1e81910 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_xml.vcproj @@ -0,0 +1,591 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_xrc.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_xrc.vcproj new file mode 100644 index 0000000000..731a031109 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc8_xrc.vcproj @@ -0,0 +1,1091 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9.sln b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9.sln new file mode 100644 index 0000000000..fad9021db5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9.sln @@ -0,0 +1,249 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxregex", "wx_vc9_wxregex.vcproj", "{56A4B526-BB81-5D01-AAA9-16D23BBB169D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "wx_vc9_wxzlib.vcproj", "{8B867186-A0B5-5479-B824-E176EDD27C40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "wx_vc9_wxpng.vcproj", "{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "wx_vc9_wxjpeg.vcproj", "{6053CC38-CDEE-584C-8BC8-4B000D800FC7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxtiff", "wx_vc9_wxtiff.vcproj", "{75596CE6-5AE7-55C9-B890-C07B0A657A83}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxexpat", "wx_vc9_wxexpat.vcproj", "{A1A8355B-0988-528E-9CC2-B971D6266669}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "wx_vc9_wxscintilla.vcproj", "{74827EBD-93DC-5110-BA95-3F2AB029B6B0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "wx_vc9_base.vcproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "net", "wx_vc9_net.vcproj", "{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "wx_vc9_core.vcproj", "{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv", "wx_vc9_adv.vcproj", "{24C45343-FD20-5C92-81C1-35A2AE841E79}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media", "wx_vc9_media.vcproj", "{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "html", "wx_vc9_html.vcproj", "{33CC42F9-7756-5587-863C-8D4461B7C5DD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wx_vc9_webview.vcproj", "{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wx_vc9_qa.vcproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "wx_vc9_xml.vcproj", "{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wx_vc9_xrc.vcproj", "{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aui", "wx_vc9_aui.vcproj", "{A16D3832-0F42-57CE-8F48-50E06649ADE8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wx_vc9_ribbon.vcproj", "{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propgrid", "wx_vc9_propgrid.vcproj", "{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "richtext", "wx_vc9_richtext.vcproj", "{7FB0902D-8579-5DCE-B883-DAF66A885005}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stc", "wx_vc9_stc.vcproj", "{23E1C437-A951-5943-8639-A17F3CF2E606}" + ProjectSection(ProjectDependencies) = postProject + {74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {74827EBD-93DC-5110-BA95-3F2AB029B6B0} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gl", "wx_vc9_gl.vcproj", "{DA8B15EF-6750-5928-BC0E-C748213CF9B2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Release|Win32 = DLL Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|Win32.ActiveCfg = Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|Win32.Build.0 = Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|Win32.ActiveCfg = Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|Win32.Build.0 = Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|Win32.ActiveCfg = Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|Win32.Build.0 = Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|Win32.ActiveCfg = Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|Win32.Build.0 = Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8B867186-A0B5-5479-B824-E176EDD27C40}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|Win32.ActiveCfg = Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|Win32.Build.0 = Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|Win32.ActiveCfg = Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|Win32.Build.0 = Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|Win32.ActiveCfg = Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|Win32.Build.0 = Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|Win32.ActiveCfg = Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|Win32.Build.0 = Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|Win32.ActiveCfg = Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|Win32.Build.0 = Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|Win32.ActiveCfg = Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|Win32.Build.0 = Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {75596CE6-5AE7-55C9-B890-C07B0A657A83}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|Win32.ActiveCfg = Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|Win32.Build.0 = Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|Win32.ActiveCfg = Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|Win32.Build.0 = Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A1A8355B-0988-528E-9CC2-B971D6266669}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.ActiveCfg = Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|Win32.Build.0 = Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.ActiveCfg = Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|Win32.Build.0 = Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.ActiveCfg = Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|Win32.Build.0 = Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.ActiveCfg = Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|Win32.Build.0 = Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|Win32.ActiveCfg = Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|Win32.Build.0 = Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|Win32.ActiveCfg = Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|Win32.Build.0 = Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|Win32.ActiveCfg = Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|Win32.Build.0 = Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|Win32.ActiveCfg = Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|Win32.Build.0 = Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|Win32.ActiveCfg = Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|Win32.Build.0 = Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|Win32.ActiveCfg = Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|Win32.Build.0 = Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {24C45343-FD20-5C92-81C1-35A2AE841E79}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|Win32.ActiveCfg = Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|Win32.Build.0 = Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|Win32.ActiveCfg = Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|Win32.Build.0 = Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|Win32.ActiveCfg = Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|Win32.Build.0 = Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|Win32.ActiveCfg = Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|Win32.Build.0 = Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {33CC42F9-7756-5587-863C-8D4461B7C5DD}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|Win32.ActiveCfg = Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|Win32.Build.0 = Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|Win32.ActiveCfg = Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|Win32.Build.0 = Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|Win32.ActiveCfg = Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|Win32.Build.0 = Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|Win32.ActiveCfg = Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|Win32.Build.0 = Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|Win32.Build.0 = Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.ActiveCfg = Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|Win32.Build.0 = Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|Win32.ActiveCfg = Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|Win32.Build.0 = Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|Win32.ActiveCfg = Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|Win32.Build.0 = Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|Win32.ActiveCfg = Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|Win32.Build.0 = Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|Win32.ActiveCfg = Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|Win32.Build.0 = Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A16D3832-0F42-57CE-8F48-50E06649ADE8}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.ActiveCfg = Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|Win32.Build.0 = Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.ActiveCfg = Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|Win32.Build.0 = Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|Win32.ActiveCfg = Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|Win32.Build.0 = Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|Win32.ActiveCfg = Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|Win32.Build.0 = Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|Win32.ActiveCfg = Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|Win32.Build.0 = Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|Win32.ActiveCfg = Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|Win32.Build.0 = Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {7FB0902D-8579-5DCE-B883-DAF66A885005}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.ActiveCfg = Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|Win32.Build.0 = Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.ActiveCfg = Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|Win32.Build.0 = Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {23E1C437-A951-5943-8639-A17F3CF2E606}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|Win32.Build.0 = Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|Win32.ActiveCfg = Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|Win32.Build.0 = Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.DLL Release|Win32.Build.0 = DLL Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_adv.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_adv.vcproj new file mode 100644 index 0000000000..e831f145e0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_adv.vcproj @@ -0,0 +1,1017 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_aui.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_aui.vcproj new file mode 100644 index 0000000000..7662938ccc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_aui.vcproj @@ -0,0 +1,641 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_base.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_base.vcproj new file mode 100644 index 0000000000..29a289a1a3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_base.vcproj @@ -0,0 +1,1798 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_core.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_core.vcproj new file mode 100644 index 0000000000..00eba9502e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_core.vcproj @@ -0,0 +1,3888 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_gl.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_gl.vcproj new file mode 100644 index 0000000000..9a152a5585 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_gl.vcproj @@ -0,0 +1,583 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_html.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_html.vcproj new file mode 100644 index 0000000000..28118b491c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_html.vcproj @@ -0,0 +1,762 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_media.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_media.vcproj new file mode 100644 index 0000000000..01b98855d4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_media.vcproj @@ -0,0 +1,587 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_net.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_net.vcproj new file mode 100644 index 0000000000..d44faeacd6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_net.vcproj @@ -0,0 +1,659 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_propgrid.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_propgrid.vcproj new file mode 100644 index 0000000000..851dbd8cf8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_propgrid.vcproj @@ -0,0 +1,641 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_qa.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_qa.vcproj new file mode 100644 index 0000000000..9d0377f8c5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_qa.vcproj @@ -0,0 +1,584 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_ribbon.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_ribbon.vcproj new file mode 100644 index 0000000000..6540a90ba6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_ribbon.vcproj @@ -0,0 +1,657 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_richtext.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_richtext.vcproj new file mode 100644 index 0000000000..f5970afa63 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_richtext.vcproj @@ -0,0 +1,709 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_stc.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_stc.vcproj new file mode 100644 index 0000000000..2891afc974 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_stc.vcproj @@ -0,0 +1,589 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_webview.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_webview.vcproj new file mode 100644 index 0000000000..700537a486 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_webview.vcproj @@ -0,0 +1,607 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxexpat.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxexpat.vcproj new file mode 100644 index 0000000000..641f545a23 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxexpat.vcproj @@ -0,0 +1,368 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxjpeg.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxjpeg.vcproj new file mode 100644 index 0000000000..46a4f3cddd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxjpeg.vcproj @@ -0,0 +1,540 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxpng.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxpng.vcproj new file mode 100644 index 0000000000..e0b0d9d583 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxpng.vcproj @@ -0,0 +1,416 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxregex.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxregex.vcproj new file mode 100644 index 0000000000..e8b3b14892 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxregex.vcproj @@ -0,0 +1,490 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxscintilla.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxscintilla.vcproj new file mode 100644 index 0000000000..e183cfe553 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxscintilla.vcproj @@ -0,0 +1,950 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxtiff.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxtiff.vcproj new file mode 100644 index 0000000000..3eb5a11e32 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxtiff.vcproj @@ -0,0 +1,512 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxzlib.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxzlib.vcproj new file mode 100644 index 0000000000..d50962e62f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_wxzlib.vcproj @@ -0,0 +1,416 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_xml.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_xml.vcproj new file mode 100644 index 0000000000..3bb76fc939 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_xml.vcproj @@ -0,0 +1,589 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_xrc.vcproj b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_xrc.vcproj new file mode 100644 index 0000000000..53639fa6fe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/build/msw/wx_vc9_xrc.vcproj @@ -0,0 +1,1089 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/msvc/wx/setup.h b/3rdparty/wxwidgets3.0-3.0.1/include/msvc/wx/setup.h new file mode 100644 index 0000000000..0ae5bbd7ff --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/msvc/wx/setup.h @@ -0,0 +1,256 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: msvc/wx/setup.h +// Purpose: wrapper around the real wx/setup.h for Visual C++ +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-12-12 +// Copyright: (c) 2004 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _MSC_VER + #error "This file should only be included when using Microsoft Visual C++" +#endif + +// VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but +// the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined +// explicitly! + +#include "wx/version.h" +#include "wx/cpp.h" + +// notice that wxSUFFIX_DEBUG is a string but wxSUFFIX itself must be an +// identifier as string concatenation is not done inside #include where we +// need it +#ifdef _DEBUG + #define wxSUFFIX_DEBUG "d" + #ifdef _UNICODE + #define wxSUFFIX ud + #else // !_UNICODE + #define wxSUFFIX d + #endif // _UNICODE/!_UNICODE +#else + #define wxSUFFIX_DEBUG "" + #ifdef _UNICODE + #define wxSUFFIX u + #else // !_UNICODE + // don't define wxSUFFIX at all as preprocessor operations don't work + // with empty values so we need to check for this case specially below + #endif // _UNICODE/!_UNICODE +#endif + +// compiler-specific prefix: by default it's always just "vc" for compatibility +// reasons but if you use multiple MSVC versions you probably build them with +// COMPILER_PREFIX=vcXX and in this case you may want to either predefine +// wxMSVC_VERSION as "XX" or define wxMSVC_VERSION_AUTO to use the appropriate +// version depending on the compiler used +#ifdef wxMSVC_VERSION + #define wxCOMPILER_PREFIX wxCONCAT(vc, wxMSVC_VERSION) +#elif defined(wxMSVC_VERSION_AUTO) + #if _MSC_VER == 1200 + #define wxCOMPILER_PREFIX vc60 + #elif _MSC_VER == 1300 + #define wxCOMPILER_PREFIX vc70 + #elif _MSC_VER == 1310 + #define wxCOMPILER_PREFIX vc71 + #elif _MSC_VER == 1400 + #define wxCOMPILER_PREFIX vc80 + #elif _MSC_VER == 1500 + #define wxCOMPILER_PREFIX vc90 + #elif _MSC_VER == 1600 + #define wxCOMPILER_PREFIX vc100 + #elif _MSC_VER == 1700 + #define wxCOMPILER_PREFIX vc110 + #elif _MSC_VER == 1800 + #define wxCOMPILER_PREFIX vc120 + #else + #error "Unknown MSVC compiler version, please report to wx-dev." + #endif +#else + #define wxCOMPILER_PREFIX vc +#endif + +// architecture-specific part: not used (again, for compatibility), for x86 +#if defined(_M_X64) + #define wxARCH_SUFFIX _x64 +#elif defined(_M_IA64) + #define wxARCH_SUFFIX _ia64 +#else // assume _M_IX86 + #define wxARCH_SUFFIX +#endif + +// Ensure the library configuration is defined +#ifndef wxCFG + #define wxCFG +#endif + +// Construct the path for the subdirectory under /lib/ that the included setup.h +// will be used from +#ifdef WXUSINGDLL + #define wxLIB_SUBDIR \ + wxCONCAT4(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _dll, wxCFG) +#else // !DLL + #define wxLIB_SUBDIR \ + wxCONCAT4(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _lib, wxCFG) +#endif // DLL/!DLL + +// The user can predefine a different prefix if not using the default MSW port +// with MSVC. +#ifndef wxTOOLKIT_PREFIX + #if defined(__WXGTK__) + #define wxTOOLKIT_PREFIX gtk2 + #else + #define wxTOOLKIT_PREFIX msw + #endif +#endif // wxTOOLKIT_PREFIX + +// the real setup.h header file we need is in the build-specific directory, +// construct the path to it +#ifdef wxSUFFIX + #define wxSETUPH_PATH \ + wxCONCAT6(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, wxSUFFIX, /wx/setup.h) +#else // suffix is empty + #define wxSETUPH_PATH \ + wxCONCAT5(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, /wx/setup.h) +#endif + +#define wxSETUPH_PATH_STR wxSTRINGIZE(wxSETUPH_PATH) + +#include wxSETUPH_PATH_STR + + +// the library names depend on the build, these macro builds the correct +// library name for the given base name +#ifdef wxSUFFIX + #define wxSUFFIX_STR wxSTRINGIZE(wxSUFFIX) +#else // suffix is empty + #define wxSUFFIX_STR "" +#endif +#define wxSHORT_VERSION_STRING \ + wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION) + +#define wxWX_LIB_NAME(name, subname) \ + "wx" name wxSHORT_VERSION_STRING wxSUFFIX_STR subname + +#define wxBASE_LIB_NAME(name) wxWX_LIB_NAME("base", "_" name) +#define wxTOOLKIT_LIB_NAME(name) wxWX_LIB_NAME(wxSTRINGIZE(wxTOOLKIT_PREFIX), "_" name) + +// This one is for 3rd party libraries: they don't have the version number +// in their names and usually exist in ANSI version only (except for regex) +// +// 3rd party libraries are also are not linked in when using DLLs as they're +// embedded inside our own DLLs and don't need to be linked with the user code. +#define wx3RD_PARTY_LIB_NAME(name) "wx" name wxSUFFIX_DEBUG + +// special version for regex as it does have a Unicode version +#define wx3RD_PARTY_LIB_NAME_U(name) "wx" name wxSUFFIX_STR + +#pragma comment(lib, wxWX_LIB_NAME("base", "")) + +#ifndef wxNO_NET_LIB + #ifndef WXUSINGDLL + #pragma comment(lib, "wsock32") + #endif + #pragma comment(lib, wxBASE_LIB_NAME("net")) +#endif +#if wxUSE_XML && !defined(wxNO_XML_LIB) + #pragma comment(lib, wxBASE_LIB_NAME("xml")) +#endif +#if wxUSE_REGEX && !defined(wxNO_REGEX_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME_U("regex")) +#endif + +#if wxUSE_GUI + #if wxUSE_XML && !defined(wxNO_EXPAT_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat")) + #endif + #if wxUSE_LIBJPEG && !defined(wxNO_JPEG_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("jpeg")) + #endif + #if wxUSE_LIBPNG && !defined(wxNO_PNG_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("png")) + #endif + #if wxUSE_LIBTIFF && !defined(wxNO_TIFF_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("tiff")) + #endif + #if wxUSE_ZLIB && !defined(wxNO_ZLIB_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("zlib")) + #endif + + #pragma comment(lib, wxTOOLKIT_LIB_NAME("core")) + + #ifndef wxNO_ADV_LIB + #pragma comment(lib, wxTOOLKIT_LIB_NAME("adv")) + #endif + + #if wxUSE_HTML && !defined(wxNO_HTML_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("html")) + #endif + #if wxUSE_GLCANVAS && !defined(wxNO_GL_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("gl")) + #endif + #if wxUSE_DEBUGREPORT && !defined(wxNO_QA_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("qa")) + #endif + #if wxUSE_XRC && !defined(wxNO_XRC_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("xrc")) + #endif + #if wxUSE_AUI && !defined(wxNO_AUI_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("aui")) + #endif + #if wxUSE_PROPGRID && !defined(wxNO_PROPGRID_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("propgrid")) + #endif + #if wxUSE_RIBBON && !defined(wxNO_RIBBON_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("ribbon")) + #endif + #if wxUSE_RICHTEXT && !defined(wxNO_RICHTEXT_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("richtext")) + #endif + #if wxUSE_MEDIACTRL && !defined(wxNO_MEDIA_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("media")) + #endif + #if wxUSE_STC && !defined(wxNO_STC_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("stc")) + #ifndef WXUSINGDLL + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("scintilla")) + #endif + #endif + #if wxUSE_WEBVIEW && !defined(wxNO_WEBVIEW_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("webview")) + #endif +#endif // wxUSE_GUI + + +#ifndef WXUSINGDLL + // Make sure all required system libraries are added to the linker too when + // using static libraries. + #pragma comment(lib, "kernel32") + #pragma comment(lib, "user32") + #pragma comment(lib, "gdi32") + #pragma comment(lib, "comdlg32") + #pragma comment(lib, "winspool") + #pragma comment(lib, "winmm") + #pragma comment(lib, "shell32") + #pragma comment(lib, "comctl32") + #pragma comment(lib, "ole32") + #pragma comment(lib, "oleaut32") + #pragma comment(lib, "uuid") + #pragma comment(lib, "rpcrt4") + #pragma comment(lib, "advapi32") + #if wxUSE_URL_NATIVE + #pragma comment(lib, "wininet") + #endif + + #ifdef __WXGTK__ + #pragma comment(lib, "gtk-win32-2.0.lib") + #pragma comment(lib, "gdk-win32-2.0.lib") + #pragma comment(lib, "pangocairo-1.0.lib") + #pragma comment(lib, "gdk_pixbuf-2.0.lib") + #pragma comment(lib, "cairo.lib") + #pragma comment(lib, "pango-1.0.lib") + #pragma comment(lib, "gobject-2.0.lib") + #pragma comment(lib, "gthread-2.0.lib") + #pragma comment(lib, "glib-2.0.lib") + #endif +#endif // !WXUSINGDLL diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/aboutdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aboutdlg.h new file mode 100644 index 0000000000..975b5def27 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aboutdlg.h @@ -0,0 +1,169 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/aboutdlg.h +// Purpose: declaration of wxAboutDialog class +// Author: Vadim Zeitlin +// Created: 2006-10-07 +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ABOUTDLG_H_ +#define _WX_ABOUTDLG_H_ + +#include "wx/defs.h" + +#if wxUSE_ABOUTDLG + +#include "wx/app.h" +#include "wx/icon.h" + +// ---------------------------------------------------------------------------- +// wxAboutDialogInfo: information shown by the standard "About" dialog +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxAboutDialogInfo +{ +public: + // all fields are initially uninitialized + wxAboutDialogInfo() { } + + // accessors for various simply fields + // ----------------------------------- + + // name of the program, if not used defaults to wxApp::GetAppDisplayName() + void SetName(const wxString& name) { m_name = name; } + wxString GetName() const + { return m_name.empty() ? wxTheApp->GetAppDisplayName() : m_name; } + + // version should contain program version without "version" word (e.g., + // "1.2" or "RC2") while longVersion may contain the full version including + // "version" word (e.g., "Version 1.2" or "Release Candidate 2") + // + // if longVersion is empty, it is automatically constructed from version + // + // generic and gtk native: use short version only, as a suffix to the + // program name msw and osx native: use long version + void SetVersion(const wxString& version, + const wxString& longVersion = wxString()); + + bool HasVersion() const { return !m_version.empty(); } + const wxString& GetVersion() const { return m_version; } + const wxString& GetLongVersion() const { return m_longVersion; } + + // brief, but possibly multiline, description of the program + void SetDescription(const wxString& desc) { m_description = desc; } + bool HasDescription() const { return !m_description.empty(); } + const wxString& GetDescription() const { return m_description; } + + // short string containing the program copyright information + void SetCopyright(const wxString& copyright) { m_copyright = copyright; } + bool HasCopyright() const { return !m_copyright.empty(); } + const wxString& GetCopyright() const { return m_copyright; } + + // long, multiline string containing the text of the program licence + void SetLicence(const wxString& licence) { m_licence = licence; } + void SetLicense(const wxString& licence) { m_licence = licence; } + bool HasLicence() const { return !m_licence.empty(); } + const wxString& GetLicence() const { return m_licence; } + + // icon to be shown in the dialog, defaults to the main frame icon + void SetIcon(const wxIcon& icon) { m_icon = icon; } + bool HasIcon() const { return m_icon.IsOk(); } + wxIcon GetIcon() const; + + // web site for the program and its description (defaults to URL itself if + // empty) + void SetWebSite(const wxString& url, const wxString& desc = wxEmptyString) + { + m_url = url; + m_urlDesc = desc.empty() ? url : desc; + } + + bool HasWebSite() const { return !m_url.empty(); } + + const wxString& GetWebSiteURL() const { return m_url; } + const wxString& GetWebSiteDescription() const { return m_urlDesc; } + + // accessors for the arrays + // ------------------------ + + // the list of developers of the program + void SetDevelopers(const wxArrayString& developers) + { m_developers = developers; } + void AddDeveloper(const wxString& developer) + { m_developers.push_back(developer); } + + bool HasDevelopers() const { return !m_developers.empty(); } + const wxArrayString& GetDevelopers() const { return m_developers; } + + // the list of documentation writers + void SetDocWriters(const wxArrayString& docwriters) + { m_docwriters = docwriters; } + void AddDocWriter(const wxString& docwriter) + { m_docwriters.push_back(docwriter); } + + bool HasDocWriters() const { return !m_docwriters.empty(); } + const wxArrayString& GetDocWriters() const { return m_docwriters; } + + // the list of artists for the program art + void SetArtists(const wxArrayString& artists) + { m_artists = artists; } + void AddArtist(const wxString& artist) + { m_artists.push_back(artist); } + + bool HasArtists() const { return !m_artists.empty(); } + const wxArrayString& GetArtists() const { return m_artists; } + + // the list of translators + void SetTranslators(const wxArrayString& translators) + { m_translators = translators; } + void AddTranslator(const wxString& translator) + { m_translators.push_back(translator); } + + bool HasTranslators() const { return !m_translators.empty(); } + const wxArrayString& GetTranslators() const { return m_translators; } + + + // implementation only + // ------------------- + + // "simple" about dialog shows only textual information (with possibly + // default icon but without hyperlink nor any long texts such as the + // licence text) + bool IsSimple() const + { return !HasWebSite() && !HasIcon() && !HasLicence(); } + + // get the description and credits (i.e. all of developers, doc writers, + // artists and translators) as a one long multiline string + wxString GetDescriptionAndCredits() const; + + // returns the copyright with the (C) string substituted by the Unicode + // character U+00A9 + wxString GetCopyrightToDisplay() const; + +private: + wxString m_name, + m_version, + m_longVersion, + m_description, + m_copyright, + m_licence; + + wxIcon m_icon; + + wxString m_url, + m_urlDesc; + + wxArrayString m_developers, + m_docwriters, + m_artists, + m_translators; +}; + +// functions to show the about dialog box +WXDLLIMPEXP_ADV void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent = NULL); + +#endif // wxUSE_ABOUTDLG + +#endif // _WX_ABOUTDLG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/accel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/accel.h new file mode 100644 index 0000000000..5226b8b35a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/accel.h @@ -0,0 +1,178 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/accel.h +// Purpose: wxAcceleratorEntry and wxAcceleratorTable classes +// Author: Julian Smart, Robert Roebling, Vadim Zeitlin +// Modified by: +// Created: 31.05.01 (extracted from other files) +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ACCEL_H_BASE_ +#define _WX_ACCEL_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_ACCEL + +#include "wx/object.h" + +class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable; +class WXDLLIMPEXP_FWD_CORE wxMenuItem; +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// wxAcceleratorEntry flags +enum wxAcceleratorEntryFlags +{ + wxACCEL_NORMAL = 0x0000, // no modifiers + wxACCEL_ALT = 0x0001, // hold Alt key down + wxACCEL_CTRL = 0x0002, // hold Ctrl key down + wxACCEL_SHIFT = 0x0004, // hold Shift key down +#if defined(__WXMAC__) || defined(__WXCOCOA__) + wxACCEL_RAW_CTRL= 0x0008, // +#else + wxACCEL_RAW_CTRL= wxACCEL_CTRL, +#endif + wxACCEL_CMD = wxACCEL_CTRL +}; + +// ---------------------------------------------------------------------------- +// an entry in wxAcceleratorTable corresponds to one accelerator +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxAcceleratorEntry +{ +public: + wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0, + wxMenuItem *item = NULL) + : m_flags(flags) + , m_keyCode(keyCode) + , m_command(cmd) + , m_item(item) + { } + + wxAcceleratorEntry(const wxAcceleratorEntry& entry) + : m_flags(entry.m_flags) + , m_keyCode(entry.m_keyCode) + , m_command(entry.m_command) + , m_item(entry.m_item) + { } + + // create accelerator corresponding to the specified string, return NULL if + // string couldn't be parsed or a pointer to be deleted by the caller + static wxAcceleratorEntry *Create(const wxString& str); + + wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry) + { + if (&entry != this) + Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item); + return *this; + } + + void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL) + { + m_flags = flags; + m_keyCode = keyCode; + m_command = cmd; + m_item = item; + } + + void SetMenuItem(wxMenuItem *item) { m_item = item; } + + int GetFlags() const { return m_flags; } + int GetKeyCode() const { return m_keyCode; } + int GetCommand() const { return m_command; } + + wxMenuItem *GetMenuItem() const { return m_item; } + + bool operator==(const wxAcceleratorEntry& entry) const + { + return m_flags == entry.m_flags && + m_keyCode == entry.m_keyCode && + m_command == entry.m_command && + m_item == entry.m_item; + } + + bool operator!=(const wxAcceleratorEntry& entry) const + { return !(*this == entry); } + +#if defined(__WXMOTIF__) + // Implementation use only + bool MatchesEvent(const wxKeyEvent& event) const; +#endif + + bool IsOk() const + { + return m_keyCode != 0; + } + + + // string <-> wxAcceleratorEntry conversion + // ---------------------------------------- + + // returns a wxString for the this accelerator. + // this function formats it using the - format + // where maybe a hyphen-separated list of "shift|alt|ctrl" + wxString ToString() const { return AsPossiblyLocalizedString(true); } + + // same as above but without translating, useful if the string is meant to + // be stored in a file or otherwise stored, instead of being shown to the + // user + wxString ToRawString() const { return AsPossiblyLocalizedString(false); } + + // returns true if the given string correctly initialized this object + // (i.e. if IsOk() returns true after this call) + bool FromString(const wxString& str); + + +private: + wxString AsPossiblyLocalizedString(bool localized) const; + + // common part of Create() and FromString() + static bool ParseAccel(const wxString& str, int *flags, int *keycode); + + + int m_flags; // combination of wxACCEL_XXX constants + int m_keyCode; // ASCII or virtual keycode + int m_command; // Command id to generate + + // the menu item this entry corresponds to, may be NULL + wxMenuItem *m_item; + + // for compatibility with old code, use accessors now! + friend class WXDLLIMPEXP_FWD_CORE wxMenu; +}; + +// ---------------------------------------------------------------------------- +// include wxAcceleratorTable class declaration, it is only used by the library +// and so doesn't have any published user visible interface +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + #include "wx/generic/accel.h" +#elif defined(__WXMSW__) + #include "wx/msw/accel.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/accel.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/accel.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/accel.h" +#elif defined(__WXMAC__) + #include "wx/osx/accel.h" +#elif defined(__WXCOCOA__) + #include "wx/generic/accel.h" +#elif defined(__WXPM__) + #include "wx/os2/accel.h" +#endif + +extern WXDLLIMPEXP_DATA_CORE(wxAcceleratorTable) wxNullAcceleratorTable; + +#endif // wxUSE_ACCEL + +#endif + // _WX_ACCEL_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/access.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/access.h new file mode 100644 index 0000000000..70cbaf1389 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/access.h @@ -0,0 +1,376 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/access.h +// Purpose: Accessibility classes +// Author: Julian Smart +// Modified by: +// Created: 2003-02-12 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ACCESSBASE_H_ +#define _WX_ACCESSBASE_H_ + +// ---------------------------------------------------------------------------- +// headers we have to include here +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_ACCESSIBILITY + +#include "wx/variant.h" + +typedef enum +{ + wxACC_FAIL, + wxACC_FALSE, + wxACC_OK, + wxACC_NOT_IMPLEMENTED, + wxACC_NOT_SUPPORTED +} wxAccStatus; + +// Child ids are integer identifiers from 1 up. +// So zero represents 'this' object. +#define wxACC_SELF 0 + +// Navigation constants + +typedef enum +{ + wxNAVDIR_DOWN, + wxNAVDIR_FIRSTCHILD, + wxNAVDIR_LASTCHILD, + wxNAVDIR_LEFT, + wxNAVDIR_NEXT, + wxNAVDIR_PREVIOUS, + wxNAVDIR_RIGHT, + wxNAVDIR_UP +} wxNavDir; + +// Role constants + +typedef enum { + wxROLE_NONE, + wxROLE_SYSTEM_ALERT, + wxROLE_SYSTEM_ANIMATION, + wxROLE_SYSTEM_APPLICATION, + wxROLE_SYSTEM_BORDER, + wxROLE_SYSTEM_BUTTONDROPDOWN, + wxROLE_SYSTEM_BUTTONDROPDOWNGRID, + wxROLE_SYSTEM_BUTTONMENU, + wxROLE_SYSTEM_CARET, + wxROLE_SYSTEM_CELL, + wxROLE_SYSTEM_CHARACTER, + wxROLE_SYSTEM_CHART, + wxROLE_SYSTEM_CHECKBUTTON, + wxROLE_SYSTEM_CLIENT, + wxROLE_SYSTEM_CLOCK, + wxROLE_SYSTEM_COLUMN, + wxROLE_SYSTEM_COLUMNHEADER, + wxROLE_SYSTEM_COMBOBOX, + wxROLE_SYSTEM_CURSOR, + wxROLE_SYSTEM_DIAGRAM, + wxROLE_SYSTEM_DIAL, + wxROLE_SYSTEM_DIALOG, + wxROLE_SYSTEM_DOCUMENT, + wxROLE_SYSTEM_DROPLIST, + wxROLE_SYSTEM_EQUATION, + wxROLE_SYSTEM_GRAPHIC, + wxROLE_SYSTEM_GRIP, + wxROLE_SYSTEM_GROUPING, + wxROLE_SYSTEM_HELPBALLOON, + wxROLE_SYSTEM_HOTKEYFIELD, + wxROLE_SYSTEM_INDICATOR, + wxROLE_SYSTEM_LINK, + wxROLE_SYSTEM_LIST, + wxROLE_SYSTEM_LISTITEM, + wxROLE_SYSTEM_MENUBAR, + wxROLE_SYSTEM_MENUITEM, + wxROLE_SYSTEM_MENUPOPUP, + wxROLE_SYSTEM_OUTLINE, + wxROLE_SYSTEM_OUTLINEITEM, + wxROLE_SYSTEM_PAGETAB, + wxROLE_SYSTEM_PAGETABLIST, + wxROLE_SYSTEM_PANE, + wxROLE_SYSTEM_PROGRESSBAR, + wxROLE_SYSTEM_PROPERTYPAGE, + wxROLE_SYSTEM_PUSHBUTTON, + wxROLE_SYSTEM_RADIOBUTTON, + wxROLE_SYSTEM_ROW, + wxROLE_SYSTEM_ROWHEADER, + wxROLE_SYSTEM_SCROLLBAR, + wxROLE_SYSTEM_SEPARATOR, + wxROLE_SYSTEM_SLIDER, + wxROLE_SYSTEM_SOUND, + wxROLE_SYSTEM_SPINBUTTON, + wxROLE_SYSTEM_STATICTEXT, + wxROLE_SYSTEM_STATUSBAR, + wxROLE_SYSTEM_TABLE, + wxROLE_SYSTEM_TEXT, + wxROLE_SYSTEM_TITLEBAR, + wxROLE_SYSTEM_TOOLBAR, + wxROLE_SYSTEM_TOOLTIP, + wxROLE_SYSTEM_WHITESPACE, + wxROLE_SYSTEM_WINDOW +} wxAccRole; + +// Object types + +typedef enum { + wxOBJID_WINDOW = 0x00000000, + wxOBJID_SYSMENU = 0xFFFFFFFF, + wxOBJID_TITLEBAR = 0xFFFFFFFE, + wxOBJID_MENU = 0xFFFFFFFD, + wxOBJID_CLIENT = 0xFFFFFFFC, + wxOBJID_VSCROLL = 0xFFFFFFFB, + wxOBJID_HSCROLL = 0xFFFFFFFA, + wxOBJID_SIZEGRIP = 0xFFFFFFF9, + wxOBJID_CARET = 0xFFFFFFF8, + wxOBJID_CURSOR = 0xFFFFFFF7, + wxOBJID_ALERT = 0xFFFFFFF6, + wxOBJID_SOUND = 0xFFFFFFF5 +} wxAccObject; + +// Accessible states + +#define wxACC_STATE_SYSTEM_ALERT_HIGH 0x00000001 +#define wxACC_STATE_SYSTEM_ALERT_MEDIUM 0x00000002 +#define wxACC_STATE_SYSTEM_ALERT_LOW 0x00000004 +#define wxACC_STATE_SYSTEM_ANIMATED 0x00000008 +#define wxACC_STATE_SYSTEM_BUSY 0x00000010 +#define wxACC_STATE_SYSTEM_CHECKED 0x00000020 +#define wxACC_STATE_SYSTEM_COLLAPSED 0x00000040 +#define wxACC_STATE_SYSTEM_DEFAULT 0x00000080 +#define wxACC_STATE_SYSTEM_EXPANDED 0x00000100 +#define wxACC_STATE_SYSTEM_EXTSELECTABLE 0x00000200 +#define wxACC_STATE_SYSTEM_FLOATING 0x00000400 +#define wxACC_STATE_SYSTEM_FOCUSABLE 0x00000800 +#define wxACC_STATE_SYSTEM_FOCUSED 0x00001000 +#define wxACC_STATE_SYSTEM_HOTTRACKED 0x00002000 +#define wxACC_STATE_SYSTEM_INVISIBLE 0x00004000 +#define wxACC_STATE_SYSTEM_MARQUEED 0x00008000 +#define wxACC_STATE_SYSTEM_MIXED 0x00010000 +#define wxACC_STATE_SYSTEM_MULTISELECTABLE 0x00020000 +#define wxACC_STATE_SYSTEM_OFFSCREEN 0x00040000 +#define wxACC_STATE_SYSTEM_PRESSED 0x00080000 +#define wxACC_STATE_SYSTEM_PROTECTED 0x00100000 +#define wxACC_STATE_SYSTEM_READONLY 0x00200000 +#define wxACC_STATE_SYSTEM_SELECTABLE 0x00400000 +#define wxACC_STATE_SYSTEM_SELECTED 0x00800000 +#define wxACC_STATE_SYSTEM_SELFVOICING 0x01000000 +#define wxACC_STATE_SYSTEM_UNAVAILABLE 0x02000000 + +// Selection flag + +typedef enum +{ + wxACC_SEL_NONE = 0, + wxACC_SEL_TAKEFOCUS = 1, + wxACC_SEL_TAKESELECTION = 2, + wxACC_SEL_EXTENDSELECTION = 4, + wxACC_SEL_ADDSELECTION = 8, + wxACC_SEL_REMOVESELECTION = 16 +} wxAccSelectionFlags; + +// Accessibility event identifiers + +#define wxACC_EVENT_SYSTEM_SOUND 0x0001 +#define wxACC_EVENT_SYSTEM_ALERT 0x0002 +#define wxACC_EVENT_SYSTEM_FOREGROUND 0x0003 +#define wxACC_EVENT_SYSTEM_MENUSTART 0x0004 +#define wxACC_EVENT_SYSTEM_MENUEND 0x0005 +#define wxACC_EVENT_SYSTEM_MENUPOPUPSTART 0x0006 +#define wxACC_EVENT_SYSTEM_MENUPOPUPEND 0x0007 +#define wxACC_EVENT_SYSTEM_CAPTURESTART 0x0008 +#define wxACC_EVENT_SYSTEM_CAPTUREEND 0x0009 +#define wxACC_EVENT_SYSTEM_MOVESIZESTART 0x000A +#define wxACC_EVENT_SYSTEM_MOVESIZEEND 0x000B +#define wxACC_EVENT_SYSTEM_CONTEXTHELPSTART 0x000C +#define wxACC_EVENT_SYSTEM_CONTEXTHELPEND 0x000D +#define wxACC_EVENT_SYSTEM_DRAGDROPSTART 0x000E +#define wxACC_EVENT_SYSTEM_DRAGDROPEND 0x000F +#define wxACC_EVENT_SYSTEM_DIALOGSTART 0x0010 +#define wxACC_EVENT_SYSTEM_DIALOGEND 0x0011 +#define wxACC_EVENT_SYSTEM_SCROLLINGSTART 0x0012 +#define wxACC_EVENT_SYSTEM_SCROLLINGEND 0x0013 +#define wxACC_EVENT_SYSTEM_SWITCHSTART 0x0014 +#define wxACC_EVENT_SYSTEM_SWITCHEND 0x0015 +#define wxACC_EVENT_SYSTEM_MINIMIZESTART 0x0016 +#define wxACC_EVENT_SYSTEM_MINIMIZEEND 0x0017 +#define wxACC_EVENT_OBJECT_CREATE 0x8000 +#define wxACC_EVENT_OBJECT_DESTROY 0x8001 +#define wxACC_EVENT_OBJECT_SHOW 0x8002 +#define wxACC_EVENT_OBJECT_HIDE 0x8003 +#define wxACC_EVENT_OBJECT_REORDER 0x8004 +#define wxACC_EVENT_OBJECT_FOCUS 0x8005 +#define wxACC_EVENT_OBJECT_SELECTION 0x8006 +#define wxACC_EVENT_OBJECT_SELECTIONADD 0x8007 +#define wxACC_EVENT_OBJECT_SELECTIONREMOVE 0x8008 +#define wxACC_EVENT_OBJECT_SELECTIONWITHIN 0x8009 +#define wxACC_EVENT_OBJECT_STATECHANGE 0x800A +#define wxACC_EVENT_OBJECT_LOCATIONCHANGE 0x800B +#define wxACC_EVENT_OBJECT_NAMECHANGE 0x800C +#define wxACC_EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D +#define wxACC_EVENT_OBJECT_VALUECHANGE 0x800E +#define wxACC_EVENT_OBJECT_PARENTCHANGE 0x800F +#define wxACC_EVENT_OBJECT_HELPCHANGE 0x8010 +#define wxACC_EVENT_OBJECT_DEFACTIONCHANGE 0x8011 +#define wxACC_EVENT_OBJECT_ACCELERATORCHANGE 0x8012 + +// ---------------------------------------------------------------------------- +// wxAccessible +// All functions return an indication of success, failure, or not implemented. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxAccessible; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxPoint; +class WXDLLIMPEXP_FWD_CORE wxRect; +class WXDLLIMPEXP_CORE wxAccessibleBase : public wxObject +{ + wxDECLARE_NO_COPY_CLASS(wxAccessibleBase); + +public: + wxAccessibleBase(wxWindow* win): m_window(win) {} + virtual ~wxAccessibleBase() {} + +// Overridables + + // Can return either a child object, or an integer + // representing the child element, starting from 1. + // pt is in screen coordinates. + virtual wxAccStatus HitTest(const wxPoint& WXUNUSED(pt), int* WXUNUSED(childId), wxAccessible** WXUNUSED(childObject)) + { return wxACC_NOT_IMPLEMENTED; } + + // Returns the rectangle for this object (id = 0) or a child element (id > 0). + // rect is in screen coordinates. + virtual wxAccStatus GetLocation(wxRect& WXUNUSED(rect), int WXUNUSED(elementId)) + { return wxACC_NOT_IMPLEMENTED; } + + // Navigates from fromId to toId/toObject. + virtual wxAccStatus Navigate(wxNavDir WXUNUSED(navDir), int WXUNUSED(fromId), + int* WXUNUSED(toId), wxAccessible** WXUNUSED(toObject)) + { return wxACC_NOT_IMPLEMENTED; } + + // Gets the name of the specified object. + virtual wxAccStatus GetName(int WXUNUSED(childId), wxString* WXUNUSED(name)) + { return wxACC_NOT_IMPLEMENTED; } + + // Gets the number of children. + virtual wxAccStatus GetChildCount(int* WXUNUSED(childCount)) + { return wxACC_NOT_IMPLEMENTED; } + + // Gets the specified child (starting from 1). + // If *child is NULL and return value is wxACC_OK, + // this means that the child is a simple element and + // not an accessible object. + virtual wxAccStatus GetChild(int WXUNUSED(childId), wxAccessible** WXUNUSED(child)) + { return wxACC_NOT_IMPLEMENTED; } + + // Gets the parent, or NULL. + virtual wxAccStatus GetParent(wxAccessible** WXUNUSED(parent)) + { return wxACC_NOT_IMPLEMENTED; } + + // Performs the default action. childId is 0 (the action for this object) + // or > 0 (the action for a child). + // Return wxACC_NOT_SUPPORTED if there is no default action for this + // window (e.g. an edit control). + virtual wxAccStatus DoDefaultAction(int WXUNUSED(childId)) + { return wxACC_NOT_IMPLEMENTED; } + + // Gets the default action for this object (0) or > 0 (the action for a child). + // Return wxACC_OK even if there is no action. actionName is the action, or the empty + // string if there is no action. + // The retrieved string describes the action that is performed on an object, + // not what the object does as a result. For example, a toolbar button that prints + // a document has a default action of "Press" rather than "Prints the current document." + virtual wxAccStatus GetDefaultAction(int WXUNUSED(childId), wxString* WXUNUSED(actionName)) + { return wxACC_NOT_IMPLEMENTED; } + + // Returns the description for this object or a child. + virtual wxAccStatus GetDescription(int WXUNUSED(childId), wxString* WXUNUSED(description)) + { return wxACC_NOT_IMPLEMENTED; } + + // Returns help text for this object or a child, similar to tooltip text. + virtual wxAccStatus GetHelpText(int WXUNUSED(childId), wxString* WXUNUSED(helpText)) + { return wxACC_NOT_IMPLEMENTED; } + + // Returns the keyboard shortcut for this object or child. + // Return e.g. ALT+K + virtual wxAccStatus GetKeyboardShortcut(int WXUNUSED(childId), wxString* WXUNUSED(shortcut)) + { return wxACC_NOT_IMPLEMENTED; } + + // Returns a role constant. + virtual wxAccStatus GetRole(int WXUNUSED(childId), wxAccRole* WXUNUSED(role)) + { return wxACC_NOT_IMPLEMENTED; } + + // Returns a state constant. + virtual wxAccStatus GetState(int WXUNUSED(childId), long* WXUNUSED(state)) + { return wxACC_NOT_IMPLEMENTED; } + + // Returns a localized string representing the value for the object + // or child. + virtual wxAccStatus GetValue(int WXUNUSED(childId), wxString* WXUNUSED(strValue)) + { return wxACC_NOT_IMPLEMENTED; } + + // Selects the object or child. + virtual wxAccStatus Select(int WXUNUSED(childId), wxAccSelectionFlags WXUNUSED(selectFlags)) + { return wxACC_NOT_IMPLEMENTED; } + + // Gets the window with the keyboard focus. + // If childId is 0 and child is NULL, no object in + // this subhierarchy has the focus. + // If this object has the focus, child should be 'this'. + virtual wxAccStatus GetFocus(int* WXUNUSED(childId), wxAccessible** WXUNUSED(child)) + { return wxACC_NOT_IMPLEMENTED; } + +#if wxUSE_VARIANT + // Gets a variant representing the selected children + // of this object. + // Acceptable values: + // - a null variant (IsNull() returns TRUE) + // - a list variant (GetType() == wxT("list")) + // - an integer representing the selected child element, + // or 0 if this object is selected (GetType() == wxT("long")) + // - a "void*" pointer to a wxAccessible child object + virtual wxAccStatus GetSelections(wxVariant* WXUNUSED(selections)) + { return wxACC_NOT_IMPLEMENTED; } +#endif // wxUSE_VARIANT + +// Accessors + + // Returns the window associated with this object. + + wxWindow* GetWindow() { return m_window; } + + // Sets the window associated with this object. + + void SetWindow(wxWindow* window) { m_window = window; } + +// Operations + + // Each platform's implementation must define this + // static void NotifyEvent(int eventType, wxWindow* window, wxAccObject objectType, + // int objectId); + +private: + +// Data members + + wxWindow* m_window; +}; + + +// ---------------------------------------------------------------------------- +// now include the declaration of the real class +// ---------------------------------------------------------------------------- + +#if defined(__WXMSW__) + #include "wx/msw/ole/access.h" +#endif + +#endif // wxUSE_ACCESSIBILITY + +#endif // _WX_ACCESSBASE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/affinematrix2d.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/affinematrix2d.h new file mode 100644 index 0000000000..28055f8d35 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/affinematrix2d.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/affinematrix2d.h +// Purpose: wxAffineMatrix2D class. +// Author: Based on wxTransformMatrix by Chris Breeze, Julian Smart +// Created: 2011-04-05 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_AFFINEMATRIX2D_H_ +#define _WX_AFFINEMATRIX2D_H_ + +#include "wx/defs.h" + +#if wxUSE_GEOMETRY + +#include "wx/affinematrix2dbase.h" + +// A simple implementation of wxAffineMatrix2DBase interface done entirely in +// wxWidgets. +class WXDLLIMPEXP_CORE wxAffineMatrix2D : public wxAffineMatrix2DBase +{ +public: + wxAffineMatrix2D() : m_11(1), m_12(0), + m_21(0), m_22(1), + m_tx(0), m_ty(0) + { + } + + // Implement base class pure virtual methods. + virtual void Set(const wxMatrix2D& mat2D, const wxPoint2DDouble& tr); + virtual void Get(wxMatrix2D* mat2D, wxPoint2DDouble* tr) const; + virtual void Concat(const wxAffineMatrix2DBase& t); + virtual bool Invert(); + virtual bool IsIdentity() const; + virtual bool IsEqual(const wxAffineMatrix2DBase& t) const; + virtual void Translate(wxDouble dx, wxDouble dy); + virtual void Scale(wxDouble xScale, wxDouble yScale); + virtual void Rotate(wxDouble cRadians); + +protected: + virtual wxPoint2DDouble DoTransformPoint(const wxPoint2DDouble& p) const; + virtual wxPoint2DDouble DoTransformDistance(const wxPoint2DDouble& p) const; + +private: + wxDouble m_11, m_12, m_21, m_22, m_tx, m_ty; +}; + +#endif // wxUSE_GEOMETRY + +#endif // _WX_AFFINEMATRIX2D_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/affinematrix2dbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/affinematrix2dbase.h new file mode 100644 index 0000000000..94b1955aa3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/affinematrix2dbase.h @@ -0,0 +1,127 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/affinematrix2dbase.h +// Purpose: Common interface for 2D transformation matrices. +// Author: Catalin Raceanu +// Created: 2011-04-06 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_AFFINEMATRIX2DBASE_H_ +#define _WX_AFFINEMATRIX2DBASE_H_ + +#include "wx/defs.h" + +#if wxUSE_GEOMETRY + +#include "wx/geometry.h" + +struct wxMatrix2D +{ + wxMatrix2D(wxDouble v11 = 1, + wxDouble v12 = 0, + wxDouble v21 = 0, + wxDouble v22 = 1) + { + m_11 = v11; m_12 = v12; + m_21 = v21; m_22 = v22; + } + + wxDouble m_11, m_12, m_21, m_22; +}; + +// A 2x3 matrix representing an affine 2D transformation. +// +// This is an abstract base class implemented by wxAffineMatrix2D only so far, +// but in the future we also plan to derive wxGraphicsMatrix from it (it should +// also be documented then as currently only wxAffineMatrix2D itself is). +class WXDLLIMPEXP_CORE wxAffineMatrix2DBase +{ +public: + wxAffineMatrix2DBase() {} + virtual ~wxAffineMatrix2DBase() {} + + // sets the matrix to the respective values + virtual void Set(const wxMatrix2D& mat2D, const wxPoint2DDouble& tr) = 0; + + // gets the component valuess of the matrix + virtual void Get(wxMatrix2D* mat2D, wxPoint2DDouble* tr) const = 0; + + // concatenates the matrix + virtual void Concat(const wxAffineMatrix2DBase& t) = 0; + + // makes this the inverse matrix + virtual bool Invert() = 0; + + // return true if this is the identity matrix + virtual bool IsIdentity() const = 0; + + // returns true if the elements of the transformation matrix are equal ? + virtual bool IsEqual(const wxAffineMatrix2DBase& t) const = 0; + bool operator==(const wxAffineMatrix2DBase& t) const { return IsEqual(t); } + bool operator!=(const wxAffineMatrix2DBase& t) const { return !IsEqual(t); } + + + // + // transformations + // + + // add the translation to this matrix + virtual void Translate(wxDouble dx, wxDouble dy) = 0; + + // add the scale to this matrix + virtual void Scale(wxDouble xScale, wxDouble yScale) = 0; + + // add the rotation to this matrix (counter clockwise, radians) + virtual void Rotate(wxDouble ccRadians) = 0; + + // add mirroring to this matrix + void Mirror(int direction = wxHORIZONTAL) + { + wxDouble x = (direction & wxHORIZONTAL) ? -1 : 1; + wxDouble y = (direction & wxVERTICAL) ? -1 : 1; + Scale(x, y); + } + + + // applies that matrix to the point + wxPoint2DDouble TransformPoint(const wxPoint2DDouble& src) const + { + return DoTransformPoint(src); + } + + void TransformPoint(wxDouble* x, wxDouble* y) const + { + wxCHECK_RET( x && y, "Can't be NULL" ); + + const wxPoint2DDouble dst = DoTransformPoint(wxPoint2DDouble(*x, *y)); + *x = dst.m_x; + *y = dst.m_y; + } + + // applies the matrix except for translations + wxPoint2DDouble TransformDistance(const wxPoint2DDouble& src) const + { + return DoTransformDistance(src); + } + + void TransformDistance(wxDouble* dx, wxDouble* dy) const + { + wxCHECK_RET( dx && dy, "Can't be NULL" ); + + const wxPoint2DDouble + dst = DoTransformDistance(wxPoint2DDouble(*dx, *dy)); + *dx = dst.m_x; + *dy = dst.m_y; + } + +protected: + virtual + wxPoint2DDouble DoTransformPoint(const wxPoint2DDouble& p) const = 0; + virtual + wxPoint2DDouble DoTransformDistance(const wxPoint2DDouble& p) const = 0; +}; + +#endif // wxUSE_GEOMETRY + +#endif // _WX_AFFINEMATRIX2DBASE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/afterstd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/afterstd.h new file mode 100644 index 0000000000..16075fe5d7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/afterstd.h @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/afterstd.h +// Purpose: #include after STL headers +// Author: Vadim Zeitlin +// Modified by: +// Created: 07/07/03 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +/** + See the comments in beforestd.h. + */ + +#if defined(__WINDOWS__) + #include "wx/msw/winundef.h" +#endif + +// undo what we did in wx/beforestd.h +#if defined(__VISUALC__) && __VISUALC__ <= 1201 + // MSVC 5 does not have this + #if _MSC_VER > 1100 + #pragma warning(pop) + #else + // 'expression' : signed/unsigned mismatch + #pragma warning(default:4018) + + // 'identifier' : unreferenced formal parameter + #pragma warning(default:4100) + + // 'conversion' : conversion from 'type1' to 'type2', + // possible loss of data + #pragma warning(default:4244) + + // C++ language change: to explicitly specialize class template + // 'identifier' use the following syntax + #pragma warning(default:4663) + #endif +#endif + +// see beforestd.h for explanation +#if defined(HAVE_VISIBILITY) && defined(HAVE_BROKEN_LIBSTDCXX_VISIBILITY) + #pragma GCC visibility pop +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/android/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/android/chkconf.h new file mode 100644 index 0000000000..73c631b0b3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/android/chkconf.h @@ -0,0 +1,230 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/android/chkconf.h +// Purpose: Android-specific configuration options checks +// Author: Zsolt Bakcsi +// Modified by: +// Created: 2011-12-08 +// RCS-ID: +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ANDROID_CHKCONF_H_ +#define _WX_ANDROID_CHKCONF_H_ + +// ---------------------------------------------------------------------------- +// Disable features which don't work (yet) or don't make sense under Android. +// ---------------------------------------------------------------------------- + +// please keep the list in alphabetic order except for closely related settings +// (e.g. wxUSE_ENH_METAFILE is put immediately after wxUSE_METAFILE) + + +// ---------------------------------------------------------------------------- +// These are disabled because they are TODO. Or to decide whether to do or not. +// ---------------------------------------------------------------------------- + +#undef wxUSE_CONFIG +#define wxUSE_CONFIG 0 + +// This compiles, but not yet tested, so: +#undef wxUSE_CONSOLE_EVENTLOOP +#define wxUSE_CONSOLE_EVENTLOOP 0 + +#undef wxUSE_DEBUGREPORT +#define wxUSE_DEBUGREPORT 0 + +#undef wxUSE_DIALUP_MANAGER +#define wxUSE_DIALUP_MANAGER 0 + +#undef wxUSE_DISPLAY +#define wxUSE_DISPLAY 0 + +#undef wxUSE_DYNAMIC_LOADER +#define wxUSE_DYNAMIC_LOADER 0 + +#undef wxUSE_DYNLIB_CLASS +#define wxUSE_DYNLIB_CLASS 0 + +#undef wxUSE_FSVOLUME +#define wxUSE_FSVOLUME 0 + +// Compile-time errors when last tried (wxHAS_INOTIFY, wxHAS_KQUEUE) +#undef wxUSE_FSWATCHER +#define wxUSE_FSWATCHER 0 + +// Seems like Android lacks locale support. TODO: check! +// Hint: +// http://groups.google.com/group/android-ndk/browse_thread/thread/ffd012a047ec2392?pli=1 +// "Android doesn't provide locale support in its C and C++ runtimes. +// This is handled at a higher-level in the application stack, using ICU +// (which is not exposed by the NDK, since the ABI is very volatile, and the +// set of built-in tables varies from device to device, based on customization +// / size reasons). +// You might want to use a different locale implementation. The STLport and GNU +// libstdc++ do provide then if you're using C++." +#undef wxUSE_INTL +#define wxUSE_INTL 0 +#undef wxUSE_XLOCALE +#define wxUSE_XLOCALE 0 + +#undef wxUSE_IPC +#define wxUSE_IPC 0 + +#undef wxUSE_MEDIACTRL +#define wxUSE_MEDIACTRL 0 + +#undef wxUSE_ON_FATAL_EXCEPTION +#define wxUSE_ON_FATAL_EXCEPTION 0 + +#undef wxUSE_REGEX +#define wxUSE_REGEX 0 + +#undef wxUSE_STDPATHS +#define wxUSE_STDPATHS 0 + +#undef wxUSE_STACKWALKER +#define wxUSE_STACKWALKER 0 + +#undef wxUSE_MIMETYPE +#define wxUSE_MIMETYPE 0 + +#undef wxUSE_REGEX +#define wxUSE_REGEX 0 + +#undef wxUSE_REGKEY +#define wxUSE_REGKEY 0 + +#undef wxUSE_SNGLINST_CHECKER +#define wxUSE_SNGLINST_CHECKER 0 + +#undef wxUSE_SOUND +#define wxUSE_SOUND 0 + +#undef wxUSE_SYSTEM_OPTIONS +#define wxUSE_SYSTEM_OPTIONS 0 + +#undef wxUSE_XRC +#define wxUSE_XRC 0 + + +// ---------------------------------------------------------------------------- +// GUI is completely TODO. +// ---------------------------------------------------------------------------- + +#undef wxUSE_COLOURPICKERCTRL +#define wxUSE_COLOURPICKERCTRL 0 + +#undef wxUSE_COLOURDLG +#define wxUSE_COLOURDLG 0 + +#undef wxUSE_FONTENUM +#define wxUSE_FONTENUM 0 + +#undef wxUSE_FONTMAP +#define wxUSE_FONTMAP 0 + +#undef wxUSE_HELP +#define wxUSE_HELP 0 + +#undef wxUSE_HTML +#define wxUSE_HTML 0 + +#undef wxUSE_LISTBOOK +#define wxUSE_LISTBOOK 0 + +#undef wxUSE_OWNER_DRAWN +#define wxUSE_OWNER_DRAWN 0 + +#undef wxUSE_NOTEBOOK +#define wxUSE_NOTEBOOK 0 + +#undef wxUSE_RICHEDIT +#define wxUSE_RICHEDIT 0 +#undef wxUSE_RICHEDIT2 +#define wxUSE_RICHEDIT2 0 + +#undef wxUSE_STATUSBAR +#define wxUSE_STATUSBAR 0 + +// Are tooltips useful at all on a touch screen? +#undef wxUSE_TOOLTIPS +#define wxUSE_TOOLTIPS 0 + +#undef wxUSE_WXHTML_HELP +#define wxUSE_WXHTML_HELP 0 + + +// ---------------------------------------------------------------------------- +// All image classes are TODO. +// ---------------------------------------------------------------------------- + +#undef wxUSE_IMAGE +#define wxUSE_IMAGE 0 + +#undef wxUSE_LIBPNG +#define wxUSE_LIBPNG 0 + +#undef wxUSE_LIBJPEG +#define wxUSE_LIBJPEG 0 + +#undef wxUSE_LIBTIFF +#define wxUSE_LIBTIFF 0 + +#undef wxUSE_TGA +#define wxUSE_TGA 0 + +#undef wxUSE_GIF +#define wxUSE_GIF 0 + +#undef wxUSE_PNM +#define wxUSE_PNM 0 + +#undef wxUSE_PCX +#define wxUSE_PCX 0 + +#undef wxUSE_IFF +#define wxUSE_IFF 0 + +#undef wxUSE_XPM +#define wxUSE_XPM 0 + +#undef wxUSE_ICO_CUR +#define wxUSE_ICO_CUR 0 + +#undef wxUSE_PALETTE +#define wxUSE_PALETTE 0 + + + +// ---------------------------------------------------------------------------- +// These are disabled because they don't make sense, are not supported, or +// would require too much effort. +// ---------------------------------------------------------------------------- + +// Unnecessary under Android, probably it doesn't even compile. +#undef wxUSE_AUI +#define wxUSE_AUI 0 + +// No command line on Android. +#undef wxUSE_CMDLINE_PARSER +#define wxUSE_CMDLINE_PARSER 0 + +// No joystick on Android devices. +// (What about using the direction sensor or the accelerometer?) +#undef wxUSE_JOYSTICK +#define wxUSE_JOYSTICK 0 + +// No MDI under Android. Well, no GUI at all (yet). +#undef wxUSE_MDI +#define wxUSE_MDI 0 +#undef wxUSE_MDI_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 0 + +// No printing support on Android (2011). +// Although 3rd party SDKs may exist (I know of one payware). +#undef wxUSE_PRINTING_ARCHITECTURE +#define wxUSE_PRINTING_ARCHITECTURE 0 + + +#endif // _WX_ANDROID_CHKCONF_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/android/config_android.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/android/config_android.h new file mode 100644 index 0000000000..e94d09360f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/android/config_android.h @@ -0,0 +1,55 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/android/config_android.h +// Purpose: configurations for Android builds +// Author: Zsolt Bakcsi +// Modified by: +// Created: 2011-12-02 +// RCS-ID: +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// Please note that most of these settings are based on config_xcode.h and +// 'fine-tuned' on a trial-and-error basis. This means, no in-depth analysis +// of Android docs / source was done. + +#define wxUSE_UNIX 1 +#define __UNIX__ 1 + +#define HAVE_NANOSLEEP +#define HAVE_FCNTL 1 +#define HAVE_GCC_ATOMIC_BUILTINS +#define HAVE_GETHOSTBYNAME 1 +#define HAVE_GETSERVBYNAME 1 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_GMTIME_R 1 +#define HAVE_INET_ADDR 1 +#define HAVE_INET_ATON 1 +#define HAVE_LOCALTIME_R 1 +#define HAVE_PTHREAD_MUTEXATTR_T 1 +#define HAVE_PTHREAD_MUTEXATTR_SETTYPE_DECL 1 +#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 +#define HAVE_THREAD_PRIORITY_FUNCTIONS 1 +#define HAVE_SSIZE_T 1 +#define HAVE_WPRINTF 1 + +#define SIZEOF_INT 4 +#define SIZEOF_LONG 4 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_SIZE_T 4 +#define SIZEOF_VOID_P 4 +#define SIZEOF_WCHAR_T 4 + +#define wxHAVE_PTHREAD_CLEANUP 1 +#define wxNO_WOSTREAM +#define wxSIZE_T_IS_UINT 1 +#define wxWCHAR_T_IS_REAL_TYPE 1 + +#define wxTYPE_SA_HANDLER int + +#define wxUSE_SELECT_DISPATCHER 1 + +#ifdef HAVE_PTHREAD_CANCEL +// Android doesn't support pthread_cancel(). +#undef HAVE_PTHREAD_CANCEL +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/android/setup.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/android/setup.h new file mode 100644 index 0000000000..3b9ab293b4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/android/setup.h @@ -0,0 +1,1644 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/setup.h +// Purpose: Configuration for the universal build of the library +// Author: Julian Smart +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SETUP_H_ +#define _WX_SETUP_H_ + +/* --- start common options --- */ +// ---------------------------------------------------------------------------- +// global settings +// ---------------------------------------------------------------------------- + +// define this to 0 when building wxBase library - this can also be done from +// makefile/project file overriding the value here +#ifndef wxUSE_GUI + #define wxUSE_GUI 1 +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// compatibility settings +// ---------------------------------------------------------------------------- + +// This setting determines the compatibility with 2.6 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_6 0 + +// This setting determines the compatibility with 2.8 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_8 1 + +// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when +// default system font is used for wxWindow::GetCharWidth/Height() instead of +// the current font. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxDIALOG_UNIT_COMPATIBILITY 0 + +// ---------------------------------------------------------------------------- +// debugging settings +// ---------------------------------------------------------------------------- + +// wxDEBUG_LEVEL will be defined as 1 in wx/debug.h so normally there is no +// need to define it here. You may do it for two reasons: either completely +// disable/compile out the asserts in release version (then do it inside #ifdef +// NDEBUG) or, on the contrary, enable more asserts, including the usually +// disabled ones, in the debug build (then do it inside #ifndef NDEBUG) +// +// #ifdef NDEBUG +// #define wxDEBUG_LEVEL 0 +// #else +// #define wxDEBUG_LEVEL 2 +// #endif + +// wxHandleFatalExceptions() may be used to catch the program faults at run +// time and, instead of terminating the program with a usual GPF message box, +// call the user-defined wxApp::OnFatalException() function. If you set +// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work. +// +// This setting is for Win32 only and can only be enabled if your compiler +// supports Win32 structured exception handling (currently only VC++ does) +// +// Default is 1 +// +// Recommended setting: 1 if your compiler supports it. +#define wxUSE_ON_FATAL_EXCEPTION 1 + +// Set this to 1 to be able to generate a human-readable (unlike +// machine-readable minidump created by wxCrashReport::Generate()) stack back +// trace when your program crashes using wxStackWalker +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_STACKWALKER 1 + +// Set this to 1 to compile in wxDebugReport class which allows you to create +// and optionally upload to your web site a debug report consisting of back +// trace of the crash (if wxUSE_STACKWALKER == 1) and other information. +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, it is compiled into a separate library so there +// is no overhead if you don't use it +#define wxUSE_DEBUGREPORT 1 + +// Generic comment about debugging settings: they are very useful if you don't +// use any other memory leak detection tools such as Purify/BoundsChecker, but +// are probably redundant otherwise. Also, Visual C++ CRT has the same features +// as wxWidgets memory debugging subsystem built in since version 5.0 and you +// may prefer to use it instead of built in memory debugging code because it is +// faster and more fool proof. +// +// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG +// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0) +// and if __NO_VC_CRTDBG__ is not defined. + +// The rest of the options in this section are obsolete and not supported, +// enable them at your own risk. + +// If 1, enables wxDebugContext, for writing error messages to file, etc. If +// __WXDEBUG__ is not defined, will still use the normal memory operators. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_CONTEXT 0 + +// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF* +// __WXDEBUG__ is also defined. +// +// WARNING: this code may not work with all architectures, especially if +// alignment is an issue. This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 1 if you are not using a memory debugging tool, else 0 +#define wxUSE_MEMORY_TRACING 0 + +// In debug mode, cause new and delete to be redefined globally. +// If this causes problems (e.g. link errors which is a common problem +// especially if you use another library which also redefines the global new +// and delete), set this to 0. +// This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If +// this causes problems (e.g. link errors), set this to 0. You may need to set +// this to 0 if using templates (at least for VC++). This switch is currently +// ignored for MinGW/Cygwin. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_NEW_ALWAYS 0 + + +// ---------------------------------------------------------------------------- +// Unicode support +// ---------------------------------------------------------------------------- + +// These settings are obsolete: the library is always built in Unicode mode +// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if +// absolutely necessary -- updating it is strongly recommended as the ANSI mode +// will disappear completely in future wxWidgets releases. +#ifndef wxUSE_UNICODE + #define wxUSE_UNICODE 1 +#endif + +// wxUSE_WCHAR_T is required by wxWidgets now, don't change. +#define wxUSE_WCHAR_T 1 + +// ---------------------------------------------------------------------------- +// global features +// ---------------------------------------------------------------------------- + +// Compile library in exception-safe mode? If set to 1, the library will try to +// behave correctly in presence of exceptions (even though it still will not +// use the exceptions itself) and notify the user code about any unhandled +// exceptions. If set to 0, propagation of the exceptions through the library +// code will lead to undefined behaviour -- but the code itself will be +// slightly smaller and faster. +// +// Note that like wxUSE_THREADS this option is automatically set to 0 if +// wxNO_EXCEPTIONS is defined. +// +// Default is 1 +// +// Recommended setting: depends on whether you intend to use C++ exceptions +// in your own code (1 if you do, 0 if you don't) +#define wxUSE_EXCEPTIONS 1 + +// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI +// +// Default is 0 +// +// Recommended setting: 0 (this is still work in progress...) +#define wxUSE_EXTENDED_RTTI 0 + +// Support for message/error logging. This includes wxLogXXX() functions and +// wxLog and derived classes. Don't set this to 0 unless you really know what +// you are doing. +// +// Default is 1 +// +// Recommended setting: 1 (always) +#define wxUSE_LOG 1 + +// Recommended setting: 1 +#define wxUSE_LOGWINDOW 1 + +// Recommended setting: 1 +#define wxUSE_LOGGUI 1 + +// Recommended setting: 1 +#define wxUSE_LOG_DIALOG 1 + +// Support for command line parsing using wxCmdLineParser class. +// +// Default is 1 +// +// Recommended setting: 1 (can be set to 0 if you don't use the cmd line) +#define wxUSE_CMDLINE_PARSER 1 + +// Support for multithreaded applications: if 1, compile in thread classes +// (thread.h) and make the library a bit more thread safe. Although thread +// support is quite stable by now, you may still consider recompiling the +// library without it if you have no use for it - this will result in a +// somewhat smaller and faster operation. +// +// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset +// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in +// build/msw/config.* file this value will have no effect. +// +// Default is 1 +// +// Recommended setting: 0 unless you do plan to develop MT applications +#define wxUSE_THREADS 1 + +// If enabled, compiles wxWidgets streams classes +// +// wx stream classes are used for image IO, process IO redirection, network +// protocols implementation and much more and so disabling this results in a +// lot of other functionality being lost. +// +// Default is 1 +// +// Recommended setting: 1 as setting it to 0 disables many other things +#define wxUSE_STREAMS 1 + +// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. +// Note that if the system's implementation does not support positional +// parameters, setting this to 1 forces the use of the wxWidgets implementation +// of wxVsnprintf. The standard vsnprintf() supports positional parameters on +// many Unix systems but usually doesn't under Windows. +// +// Positional parameters are very useful when translating a program since using +// them in formatting strings allow translators to correctly reorder the +// translated sentences. +// +// Default is 1 +// +// Recommended setting: 1 if you want to support multiple languages +#define wxUSE_PRINTF_POS_PARAMS 1 + + +// ---------------------------------------------------------------------------- +// Interoperability with the standard library. +// ---------------------------------------------------------------------------- + +// Set wxUSE_STL to 1 to enable maximal interoperability with the standard +// library, even at the cost of backwards compatibility. +// +// Default is 0 +// +// Recommended setting: 0 as the options below already provide a relatively +// good level of interoperability and changing this option arguably isn't worth +// diverging from the official builds of the library. +#define wxUSE_STL 0 + +// This is not a real option but is used as the default value for +// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library headers, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_DEFAULT 0 +#else + #define wxUSE_STD_DEFAULT 1 +#endif + +// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<> +// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but +// usually more limited) implementations are used which allows to avoid the +// dependency on the C++ run-time library. +// +// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't +// support using standard containers and that VC6 needs non-default options for +// such build to avoid getting "fatal error C1076: compiler limit : internal +// heap limit reached; use /Zm to specify a higher limit" in its own standard +// headers, so you need to ensure you do increase the heap size before enabling +// this option for this compiler. +// +// Default is 0 for compatibility reasons. +// +// Recommended setting: 1 unless compatibility with the official wxWidgets +// build and/or the existing code is a concern. +#define wxUSE_STD_CONTAINERS 0 + +// Use standard C++ streams if 1 instead of wx streams in some places. If +// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the +// standard streams library. +// +// Notice that enabling this does not replace wx streams with std streams +// everywhere, in a lot of places wx streams are used no matter what. +// +// Default is 1 if compiler supports it. +// +// Recommended setting: 1 if you use the standard streams anyhow and so +// dependency on the standard streams library is not a +// problem +#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT + +// Enable minimal interoperability with the standard C++ string class if 1. +// "Minimal" means that wxString can be constructed from std::string or +// std::wstring but can't be implicitly converted to them. You need to enable +// the option below for the latter. +// +// Default is 1 for most compilers. +// +// Recommended setting: 1 unless you want to ensure your program doesn't use +// the standard C++ library at all. +#define wxUSE_STD_STRING wxUSE_STD_DEFAULT + +// Make wxString as much interchangeable with std::[w]string as possible, in +// particular allow implicit conversion of wxString to either of these classes. +// This comes at a price (or a benefit, depending on your point of view) of not +// allowing implicit conversion to "const char *" and "const wchar_t *". +// +// Because a lot of existing code relies on these conversions, this option is +// disabled by default but can be enabled for your build if you don't care +// about compatibility. +// +// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled. +// +// Recommended setting: 0 to remain compatible with the official builds of +// wxWidgets. +#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL + +// VC++ 4.2 and above allows and but you can't mix +// them. Set this option to 1 to use , 0 to use . +// +// Note that newer compilers (including VC++ 7.1 and later) don't support +// wxUSE_IOSTREAMH == 1 and so will be used anyhow. +// +// Default is 0. +// +// Recommended setting: 0, only set to 1 if you use a really old compiler +#define wxUSE_IOSTREAMH 0 + + +// ---------------------------------------------------------------------------- +// non GUI features selection +// ---------------------------------------------------------------------------- + +// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit +// integer which is implemented in terms of native 64 bit integers if any or +// uses emulation otherwise. +// +// This class is required by wxDateTime and so you should enable it if you want +// to use wxDateTime. For most modern platforms, it will use the native 64 bit +// integers in which case (almost) all of its functions are inline and it +// almost does not take any space, so there should be no reason to switch it +// off. +// +// Recommended setting: 1 +#define wxUSE_LONGLONG 1 + +// Set wxUSE_BASE64 to 1, to compile in Base64 support. This is required for +// storing binary data in wxConfig on most platforms. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_BASE64 1 + +// Set this to 1 to be able to use wxEventLoop even in console applications +// (i.e. using base library only, without GUI). This is mostly useful for +// processing socket events but is also necessary to use timers in console +// applications +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_CONSOLE_EVENTLOOP 1 + +// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level +// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions. +// +// Default is 1 +// +// Recommended setting: 1 (wxFile is highly recommended as it is required by +// i18n code, wxFileConfig and others) +#define wxUSE_FILE 1 +#define wxUSE_FFILE 1 + +// Use wxFSVolume class providing access to the configured/active mount points +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely disabled if you don't use it) +#define wxUSE_FSVOLUME 1 + +// Use wxStandardPaths class which allows to retrieve some standard locations +// in the file system +// +// Default is 1 +// +// Recommended setting: 1 (may be disabled to save space, but not much) +#define wxUSE_STDPATHS 1 + +// use wxTextBuffer class: required by wxTextFile +#define wxUSE_TEXTBUFFER 1 + +// use wxTextFile class: requires wxFile and wxTextBuffer, required by +// wxFileConfig +#define wxUSE_TEXTFILE 1 + +// i18n support: _() macro, wxLocale class. Requires wxTextFile. +#define wxUSE_INTL 1 + +// Provide wxFoo_l() functions similar to standard foo() functions but taking +// an extra locale parameter. +// +// Notice that this is fully implemented only for the systems providing POSIX +// xlocale support or Microsoft Visual C++ >= 8 (which provides proprietary +// almost-equivalent of xlocale functions), otherwise wxFoo_l() functions will +// only work for the current user locale and "C" locale. You can use +// wxHAS_XLOCALE_SUPPORT to test whether the full support is available. +// +// Default is 1 +// +// Recommended setting: 1 but may be disabled if you are writing programs +// running only in C locale anyhow +#define wxUSE_XLOCALE 1 + +// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which +// allow to manipulate dates, times and time intervals. wxDateTime replaces the +// old wxTime and wxDate classes which are still provided for backwards +// compatibility (and implemented in terms of wxDateTime). +// +// Note that this class is relatively new and is still officially in alpha +// stage because some features are not yet (fully) implemented. It is already +// quite useful though and should only be disabled if you are aiming at +// absolutely minimal version of the library. +// +// Requires: wxUSE_LONGLONG +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_DATETIME 1 + +// Set wxUSE_TIMER to 1 to compile wxTimer class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_TIMER 1 + +// Use wxStopWatch clas. +// +// Default is 1 +// +// Recommended setting: 1 (needed by wxSocket) +#define wxUSE_STOPWATCH 1 + +// Set wxUSE_FSWATCHER to 1 if you want to enable wxFileSystemWatcher +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FSWATCHER 1 + +// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes +// which allow the application to store its settings in the persistent +// storage. Setting this to 1 will also enable on-demand creation of the +// global config object in wxApp. +// +// See also wxUSE_CONFIG_NATIVE below. +// +// Recommended setting: 1 +#define wxUSE_CONFIG 1 + +// If wxUSE_CONFIG is 1, you may choose to use either the native config +// classes under Windows (using .INI files under Win16 and the registry under +// Win32) or the portable text file format used by the config classes under +// Unix. +// +// Default is 1 to use native classes. Note that you may still use +// wxFileConfig even if you set this to 1 - just the config object created by +// default for the applications needs will be a wxRegConfig or wxIniConfig and +// not wxFileConfig. +// +// Recommended setting: 1 +#define wxUSE_CONFIG_NATIVE 1 + +// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows +// to connect/disconnect from the network and be notified whenever the dial-up +// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DIALUP_MANAGER 1 + +// Compile in classes for run-time DLL loading and function calling. +// Required by wxUSE_DIALUP_MANAGER. +// +// This setting is for Win32 only +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DYNLIB_CLASS 1 + +// experimental, don't use for now +#define wxUSE_DYNAMIC_LOADER 1 + +// Set to 1 to use socket classes +#define wxUSE_SOCKETS 1 + +// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS) +// +// Notice that currently setting this option under Windows will result in +// programs which can only run on recent OS versions (with ws2_32.dll +// installed) which is why it is disabled by default. +// +// Default is 1. +// +// Recommended setting: 1 if you need IPv6 support +#define wxUSE_IPV6 0 + +// Set to 1 to enable virtual file systems (required by wxHTML) +#define wxUSE_FILESYSTEM 1 + +// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ZIP 1 + +// Set to 1 to enable virtual archive filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ARCHIVE 1 + +// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_INET 1 + +// wxArchive classes for accessing archives such as zip and tar +#define wxUSE_ARCHIVE_STREAMS 1 + +// Set to 1 to compile wxZipInput/OutputStream classes. +#define wxUSE_ZIPSTREAM 1 + +// Set to 1 to compile wxTarInput/OutputStream classes. +#define wxUSE_TARSTREAM 1 + +// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by +// wxUSE_LIBPNG +#define wxUSE_ZLIB 1 + +// If enabled, the code written by Apple will be used to write, in a portable +// way, float on the disk. See extended.c for the license which is different +// from wxWidgets one. +// +// Default is 1. +// +// Recommended setting: 1 unless you don't like the license terms (unlikely) +#define wxUSE_APPLE_IEEE 1 + +// Joystick support class +#define wxUSE_JOYSTICK 1 + +// wxFontEnumerator class +#define wxUSE_FONTENUM 1 + +// wxFontMapper class +#define wxUSE_FONTMAP 1 + +// wxMimeTypesManager class +#define wxUSE_MIMETYPE 1 + +// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP +// or wxURL you need to set this to 1. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_PROTOCOL 1 + +// The settings for the individual URL schemes +#define wxUSE_PROTOCOL_FILE 1 +#define wxUSE_PROTOCOL_FTP 1 +#define wxUSE_PROTOCOL_HTTP 1 + +// Define this to use wxURL class. +#define wxUSE_URL 1 + +// Define this to use native platform url and protocol support. +// Currently valid only for MS-Windows. +// Note: if you set this to 1, you can open ftp/http/gopher sites +// and obtain a valid input stream for these sites +// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0. +// Doing so reduces the code size. +// +// This code is experimental and subject to change. +#define wxUSE_URL_NATIVE 0 + +// Support for wxVariant class used in several places throughout the library, +// notably in wxDataViewCtrl API. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size as much as +// possible in which case setting this to 0 can gain up to 100KB. +#define wxUSE_VARIANT 1 + +// Support for wxAny class, the successor for wxVariant. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size by a small amount, +// or your compiler cannot for some reason cope with complexity of templates used. +#define wxUSE_ANY 1 + +// Support for regular expression matching via wxRegEx class: enable this to +// use POSIX regular expressions in your code. You need to compile regex +// library from src/regex to use it under Windows. +// +// Default is 0 +// +// Recommended setting: 1 if your compiler supports it, if it doesn't please +// contribute us a makefile for src/regex for it +#define wxUSE_REGEX 1 + +// wxSystemOptions class +#define wxUSE_SYSTEM_OPTIONS 1 + +// wxSound class +#define wxUSE_SOUND 1 + +// Use wxMediaCtrl +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_MEDIACTRL 1 + +// Use wxWidget's XRC XML-based resource system. Recommended. +// +// Default is 1 +// +// Recommended setting: 1 (requires wxUSE_XML) +#define wxUSE_XRC 1 + +// XML parsing classes. Note that their API will change in the future, so +// using wxXmlDocument and wxXmlNode in your app is not recommended. +// +// Default is the same as wxUSE_XRC, i.e. 1 by default. +// +// Recommended setting: 1 (required by XRC) +#define wxUSE_XML wxUSE_XRC + +// Use wxWidget's AUI docking system +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_AUI 1 + +// Use wxWidget's Ribbon classes for interfaces +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_RIBBON 1 + +// Use wxPropertyGrid. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_PROPGRID 1 + +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + +// Use wxWidget's web viewing classes +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW 1 + +// Use the IE wxWebView backend +// +// Default is 1 on MSW +// +// Recommended setting: 1 +#ifdef __WXMSW__ +#define wxUSE_WEBVIEW_IE 1 +#else +#define wxUSE_WEBVIEW_IE 0 +#endif + +// Use the WebKit wxWebView backend +// +// Default is 1 on GTK and OSX +// +// Recommended setting: 1 +#if defined(__WXGTK__) || defined(__WXOSX__) +#define wxUSE_WEBVIEW_WEBKIT 1 +#else +#define wxUSE_WEBVIEW_WEBKIT 0 +#endif + +// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced +// 2D drawing API. (Still somewhat experimental) +// +// Please note that on Windows gdiplus.dll is loaded dynamically which means +// that nothing special needs to be done as long as you don't use +// wxGraphicsContext at all or only use it on XP and later systems but you +// still do need to distribute it yourself for an application using +// wxGraphicsContext to be runnable on pre-XP systems. +// +// Default is 1 except if you're using a non-Microsoft compiler under Windows +// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. +// mingw32) you may need to install the headers (and just the headers) +// yourself. If you do, change the setting below manually. +// +// Recommended setting: 1 if supported by the compilation environment + +// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is +// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined +#ifdef _MSC_VER +# if _MSC_VER >= 1310 + // MSVC7.1+ comes with new enough Platform SDK, enable + // wxGraphicsContext support for it +# define wxUSE_GRAPHICS_CONTEXT 1 +# else + // MSVC 6 didn't include GDI+ headers so disable by default, enable it + // here if you use MSVC 6 with a newer SDK +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#else + // Disable support for other Windows compilers, enable it if your compiler + // comes with new enough SDK or you installed the headers manually. + // + // Notice that this will be set by configure under non-Windows platforms + // anyhow so the value there is not important. +# define wxUSE_GRAPHICS_CONTEXT 0 +#endif + +// Enable wxGraphicsContext implementation using Cairo library. +// +// This is not needed under Windows and detected automatically by configure +// under other systems, however you may set this to 1 manually if you installed +// Cairo under Windows yourself and prefer to use it instead the native GDI+ +// implementation. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_CAIRO 0 + + +// ---------------------------------------------------------------------------- +// Individual GUI controls +// ---------------------------------------------------------------------------- + +// You must set wxUSE_CONTROLS to 1 if you are using any controls at all +// (without it, wxControl class is not compiled) +// +// Default is 1 +// +// Recommended setting: 1 (don't change except for very special programs) +#define wxUSE_CONTROLS 1 + +// Support markup in control labels, i.e. provide wxControl::SetLabelMarkup(). +// Currently markup is supported only by a few controls and only some ports but +// their number will increase with time. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you want to save on code size) +#define wxUSE_MARKUP 1 + +// wxPopupWindow class is a top level transient window. It is currently used +// to implement wxTipWindow +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW) +#define wxUSE_POPUPWIN 1 + +// wxTipWindow allows to implement the custom tooltips, it is used by the +// context help classes. Requires wxUSE_POPUPWIN. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0) +#define wxUSE_TIPWINDOW 1 + +// Each of the settings below corresponds to one wxWidgets control. They are +// all switched on by default but may be disabled if you are sure that your +// program (including any standard dialogs it can show!) doesn't need them and +// if you desperately want to save some space. If you use any of these you must +// set wxUSE_CONTROLS as well. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl +#define wxUSE_BANNERWINDOW 1 // wxBannerWindow +#define wxUSE_BUTTON 1 // wxButton +#define wxUSE_BMPBUTTON 1 // wxBitmapButton +#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl +#define wxUSE_CHECKBOX 1 // wxCheckBox +#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHOICE 1 // wxChoice +#define wxUSE_COLLPANE 1 // wxCollapsiblePane +#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl +#define wxUSE_COMBOBOX 1 // wxComboBox +#define wxUSE_COMMANDLINKBUTTON 1 // wxCommandLinkButton +#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl +#define wxUSE_DATEPICKCTRL 1 // wxDatePickerCtrl +#define wxUSE_DIRPICKERCTRL 1 // wxDirPickerCtrl +#define wxUSE_EDITABLELISTBOX 1 // wxEditableListBox +#define wxUSE_FILECTRL 1 // wxFileCtrl +#define wxUSE_FILEPICKERCTRL 1 // wxFilePickerCtrl +#define wxUSE_FONTPICKERCTRL 1 // wxFontPickerCtrl +#define wxUSE_GAUGE 1 // wxGauge +#define wxUSE_HEADERCTRL 1 // wxHeaderCtrl +#define wxUSE_HYPERLINKCTRL 1 // wxHyperlinkCtrl +#define wxUSE_LISTBOX 1 // wxListBox +#define wxUSE_LISTCTRL 1 // wxListCtrl +#define wxUSE_RADIOBOX 1 // wxRadioBox +#define wxUSE_RADIOBTN 1 // wxRadioButton +#define wxUSE_RICHMSGDLG 1 // wxRichMessageDialog +#define wxUSE_SCROLLBAR 1 // wxScrollBar +#define wxUSE_SEARCHCTRL 1 // wxSearchCtrl +#define wxUSE_SLIDER 1 // wxSlider +#define wxUSE_SPINBTN 1 // wxSpinButton +#define wxUSE_SPINCTRL 1 // wxSpinCtrl +#define wxUSE_STATBOX 1 // wxStaticBox +#define wxUSE_STATLINE 1 // wxStaticLine +#define wxUSE_STATTEXT 1 // wxStaticText +#define wxUSE_STATBMP 1 // wxStaticBitmap +#define wxUSE_TEXTCTRL 1 // wxTextCtrl +#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl +#define wxUSE_TOGGLEBTN 1 // requires wxButton +#define wxUSE_TREECTRL 1 // wxTreeCtrl +#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl + +// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR +// below either wxStatusBar95 or a generic wxStatusBar will be used. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STATUSBAR 1 + +// Two status bar implementations are available under Win32: the generic one +// or the wrapper around native control. For native look and feel the native +// version should be used. +// +// Default is 1 for the platforms where native status bar is supported. +// +// Recommended setting: 1 (there is no advantage in using the generic one) +#define wxUSE_NATIVE_STATUSBAR 1 + +// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar +// classes at all. Otherwise, use the native toolbar class unless +// wxUSE_TOOLBAR_NATIVE is 0. +// +// Default is 1 for all settings. +// +// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE. +#define wxUSE_TOOLBAR 1 +#define wxUSE_TOOLBAR_NATIVE 1 + +// wxNotebook is a control with several "tabs" located on one of its sides. It +// may be used to logically organise the data presented to the user instead of +// putting everything in one huge dialog. It replaces wxTabControl and related +// classes of wxWin 1.6x. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTEBOOK 1 + +// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_LISTBOOK 1 + +// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CHOICEBOOK 1 + +// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TREEBOOK 1 + +// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of +// tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLBOOK 1 + +// wxTaskBarIcon is a small notification icon shown in the system toolbar or +// dock. +// +// Default is 1. +// +// Recommended setting: 1 (but can be set to 0 if you don't need it) +#define wxUSE_TASKBARICON 1 + +// wxGrid class +// +// Default is 1, set to 0 to cut down compilation time and binaries size if you +// don't use it. +// +// Recommended setting: 1 +// +#define wxUSE_GRID 1 + +// wxMiniFrame class: a frame with narrow title bar +// +// Default is 1. +// +// Recommended setting: 1 (it doesn't cost almost anything) +#define wxUSE_MINIFRAME 1 + +// wxComboCtrl and related classes: combobox with custom popup window and +// not necessarily a listbox. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it +// it used by wxComboBox +#define wxUSE_COMBOCTRL 1 + +// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox +// items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0, except where it is +// needed as a base class for generic wxBitmapComboBox. +#define wxUSE_ODCOMBOBOX 1 + +// wxBitmapComboBox is a combobox that can have images in front of text items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 +#define wxUSE_BITMAPCOMBOBOX 1 + +// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items +// up and down in it. It is also used as part of wxRearrangeDialog. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 (currently used only by +// wxHeaderCtrl) +#define wxUSE_REARRANGECTRL 1 + +// ---------------------------------------------------------------------------- +// Miscellaneous GUI stuff +// ---------------------------------------------------------------------------- + +// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar) +#define wxUSE_ACCEL 1 + +// Use the standard art provider. The icons returned by this provider are +// embedded into the library as XPMs so disabling it reduces the library size +// somewhat but this should only be done if you use your own custom art +// provider returning the icons or never use any icons not provided by the +// native art provider (which might not be implemented at all for some +// platforms) or by the Tango icons provider (if it's not itself disabled +// below). +// +// Default is 1. +// +// Recommended setting: 1 unless you use your own custom art provider. +#define wxUSE_ARTPROVIDER_STD 1 + +// Use art provider providing Tango icons: this art provider has higher quality +// icons than the default ones using smaller size XPM icons without +// transparency but the embedded PNG icons add to the library size. +// +// Default is 1 under non-GTK ports. Under wxGTK the native art provider using +// the GTK+ stock icons replaces it so it is normally not necessary. +// +// Recommended setting: 1 but can be turned off to reduce the library size. +#define wxUSE_ARTPROVIDER_TANGO 1 + +// Hotkey support (currently Windows only) +#define wxUSE_HOTKEY 1 + +// Use wxCaret: a class implementing a "cursor" in a text control (called caret +// under Windows). +// +// Default is 1. +// +// Recommended setting: 1 (can be safely set to 0, not used by the library) +#define wxUSE_CARET 1 + +// Use wxDisplay class: it allows enumerating all displays on a system and +// their geometries as well as finding the display on which the given point or +// window lies. +// +// Default is 1. +// +// Recommended setting: 1 if you need it, can be safely set to 0 otherwise +#define wxUSE_DISPLAY 1 + +// Miscellaneous geometry code: needed for Canvas library +#define wxUSE_GEOMETRY 1 + +// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and +// wxListCtrl. +// +// Default is 1. +// +// Recommended setting: 1 (set it to 0 if you don't use any of the controls +// enumerated above, then this class is mostly useless too) +#define wxUSE_IMAGLIST 1 + +// Use wxInfoBar class. +// +// Default is 1. +// +// Recommended setting: 1 (but can be disabled without problems as nothing +// depends on it) +#define wxUSE_INFOBAR 1 + +// Use wxMenu, wxMenuBar, wxMenuItem. +// +// Default is 1. +// +// Recommended setting: 1 (can't be disabled under MSW) +#define wxUSE_MENUS 1 + +// Use wxNotificationMessage. +// +// wxNotificationMessage allows to show non-intrusive messages to the user +// using balloons, banners, popups or whatever is the appropriate method for +// the current platform. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTIFICATION_MESSAGE 1 + +// wxRichToolTip is a customizable tooltip class which has more functionality +// than the stock (but native, unlike this class) wxToolTip. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely set to 0 if you don't need it) +#define wxUSE_RICHTOOLTIP 1 + +// Use wxSashWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SASH 1 + +// Use wxSplitterWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SPLITTER 1 + +// Use wxToolTip and wxWindow::Set/GetToolTip() methods. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLTIPS 1 + +// wxValidator class and related methods +#define wxUSE_VALIDATORS 1 + +// Use reference counted ID management: this means that wxWidgets will track +// the automatically allocated ids (those used when you use wxID_ANY when +// creating a window, menu or toolbar item &c) instead of just supposing that +// the program never runs out of them. This is mostly useful only under wxMSW +// where the total ids range is limited to SHRT_MIN..SHRT_MAX and where +// long-running programs can run into problems with ids reuse without this. On +// the other platforms, where the ids have the full int range, this shouldn't +// be necessary. +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif + +// ---------------------------------------------------------------------------- +// common dialogs +// ---------------------------------------------------------------------------- + +// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g. +// file selector, printer dialog). Switching this off also switches off the +// printing architecture and interactive wxPrinterDC. +// +// Default is 1 +// +// Recommended setting: 1 (unless it really doesn't work) +#define wxUSE_COMMON_DIALOGS 1 + +// wxBusyInfo displays window with message when app is busy. Works in same way +// as wxBusyCursor +#define wxUSE_BUSYINFO 1 + +// Use single/multiple choice dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_CHOICEDLG 1 + +// Use colour picker dialog +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_COLOURDLG 1 + +// wxDirDlg class for getting a directory name from user +#define wxUSE_DIRDLG 1 + +// TODO: setting to choose the generic or native one + +// Use file open/save dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in many places in the library itself) +#define wxUSE_FILEDLG 1 + +// Use find/replace dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely set to 0) +#define wxUSE_FINDREPLDLG 1 + +// Use font picker dialog +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_FONTDLG 1 + +// Use wxMessageDialog and wxMessageBox. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_MSGDLG 1 + +// progress dialog class for lengthy operations +#define wxUSE_PROGRESSDLG 1 + +// support for startup tips (wxShowTip &c) +#define wxUSE_STARTUP_TIPS 1 + +// text entry dialog and wxGetTextFromUser function +#define wxUSE_TEXTDLG 1 + +// number entry dialog +#define wxUSE_NUMBERDLG 1 + +// splash screen class +#define wxUSE_SPLASH 1 + +// wizards +#define wxUSE_WIZARDDLG 1 + +// Compile in wxAboutBox() function showing the standard "About" dialog. +// +// Default is 1 +// +// Recommended setting: 1 but can be set to 0 to save some space if you don't +// use this function +#define wxUSE_ABOUTDLG 1 + +// wxFileHistory class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FILE_HISTORY 1 + +// ---------------------------------------------------------------------------- +// Metafiles support +// ---------------------------------------------------------------------------- + +// Windows supports the graphics format known as metafile which is, though not +// portable, is widely used under Windows and so is supported by wxWin (under +// Windows only, of course). Win16 (Win3.1) used the so-called "Window +// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in +// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by +// default, WMFs will be used under Win16 and EMFs under Win32. This may be +// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting +// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile +// in any metafile related classes at all. +// +// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS. +// +// Recommended setting: default or 0 for everything for portable programs. +#define wxUSE_METAFILE 1 +#define wxUSE_ENH_METAFILE 1 +#define wxUSE_WIN_METAFILES_ALWAYS 0 + +// ---------------------------------------------------------------------------- +// Big GUI components +// ---------------------------------------------------------------------------- + +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + +// Set to 0 to disable document/view architecture +#define wxUSE_DOC_VIEW_ARCHITECTURE 1 + +// Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 1 + +// Set to 0 to disable print/preview architecture code +#define wxUSE_PRINTING_ARCHITECTURE 1 + +// wxHTML sublibrary allows to display HTML in wxWindow programs and much, +// much more. +// +// Default is 1. +// +// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a +// smaller library. +#define wxUSE_HTML 1 + +// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL +// headers and libraries to be able to compile the library with wxUSE_GLCANVAS +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). +// +// Default is 1 unless the compiler is known to ship without the necessary +// headers (Digital Mars) or the platform doesn't support OpenGL (Windows CE). +// +// Recommended setting: 1 if you intend to use OpenGL, can be safely set to 0 +// otherwise. +#define wxUSE_GLCANVAS 1 + +// wxRichTextCtrl allows editing of styled text. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 if you want compile a +// smaller library. +#define wxUSE_RICHTEXT 1 + +// ---------------------------------------------------------------------------- +// Data transfer +// ---------------------------------------------------------------------------- + +// Use wxClipboard class for clipboard copy/paste. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CLIPBOARD 1 + +// Use wxDataObject and related classes. Needed for clipboard and OLE drag and +// drop +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DATAOBJ 1 + +// Use wxDropTarget and wxDropSource classes for drag and drop (this is +// different from "built in" drag and drop in wxTreeCtrl which is always +// available). Requires wxUSE_DATAOBJ. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DRAG_AND_DROP 1 + +// Use wxAccessible for enhanced and customisable accessibility. +// Depends on wxUSE_OLE. +// +// Default is 0. +// +// Recommended setting (at present): 0 +#define wxUSE_ACCESSIBILITY 0 + +// ---------------------------------------------------------------------------- +// miscellaneous settings +// ---------------------------------------------------------------------------- + +// wxSingleInstanceChecker class allows to verify at startup if another program +// instance is running. +// +// Default is 1 +// +// Recommended setting: 1 (the class is tiny, disabling it won't save much +// space) +#define wxUSE_SNGLINST_CHECKER 1 + +#define wxUSE_DRAGIMAGE 1 + +#define wxUSE_IPC 1 + // 0 for no interprocess comms +#define wxUSE_HELP 0 + // 0 for no help facility + +// Should we use MS HTML help for wxHelpController? If disabled, neither +// wxCHMHelpController nor wxBestHelpController are available. +// +// Default is 1 under MSW, 0 is always used for the other platforms. +// +// Recommended setting: 1, only set to 0 if you have trouble compiling +// wxCHMHelpController (could be a problem with really ancient compilers) +#define wxUSE_MS_HTML_HELP 1 + + +// Use wxHTML-based help controller? +#define wxUSE_WXHTML_HELP 1 + +#define wxUSE_CONSTRAINTS 1 + // 0 for no window layout constraint system + +#define wxUSE_SPLINES 1 + // 0 for no splines + +#define wxUSE_MOUSEWHEEL 1 + // Include mouse wheel support + +// Compile wxUIActionSimulator class? +#define wxUSE_UIACTIONSIMULATOR 1 + +// ---------------------------------------------------------------------------- +// wxDC classes for various output formats +// ---------------------------------------------------------------------------- + +// Set to 1 for PostScript device context. +#define wxUSE_POSTSCRIPT 0 + +// Set to 1 to use font metric files in GetTextExtent +#define wxUSE_AFM_FOR_POSTSCRIPT 1 + +// Set to 1 to compile in support for wxSVGFileDC, a wxDC subclass which allows +// to create files in SVG (Scalable Vector Graphics) format. +#define wxUSE_SVG 1 + +// Should wxDC provide SetTransformMatrix() and related methods? +// +// Default is 1 but can be set to 0 if this functionality is not used. Notice +// that currently only wxMSW supports this so setting this to 0 doesn't change +// much for non-MSW platforms (although it will still save a few bytes +// probably). +// +// Recommended setting: 1. +#define wxUSE_DC_TRANSFORM_MATRIX 1 + +// ---------------------------------------------------------------------------- +// image format support +// ---------------------------------------------------------------------------- + +// wxImage supports many different image formats which can be configured at +// compile-time. BMP is always supported, others are optional and can be safely +// disabled if you don't plan to use images in such format sometimes saving +// substantial amount of code in the final library. +// +// Some formats require an extra library which is included in wxWin sources +// which is mentioned if it is the case. + +// Set to 1 for wxImage support (recommended). +#define wxUSE_IMAGE 1 + +// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB. +#define wxUSE_LIBPNG 1 + +// Set to 1 for JPEG format support (requires libjpeg) +#define wxUSE_LIBJPEG 1 + +// Set to 1 for TIFF format support (requires libtiff) +#define wxUSE_LIBTIFF 1 + +// Set to 1 for TGA format support (loading only) +#define wxUSE_TGA 1 + +// Set to 1 for GIF format support +#define wxUSE_GIF 1 + +// Set to 1 for PNM format support +#define wxUSE_PNM 1 + +// Set to 1 for PCX format support +#define wxUSE_PCX 1 + +// Set to 1 for IFF format support (Amiga format) +#define wxUSE_IFF 0 + +// Set to 1 for XPM format support +#define wxUSE_XPM 1 + +// Set to 1 for MS Icons and Cursors format support +#define wxUSE_ICO_CUR 1 + +// Set to 1 to compile in wxPalette class +#define wxUSE_PALETTE 1 + +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 + + +/* --- end common options --- */ + +/* --- start MSW options --- */ +// ---------------------------------------------------------------------------- +// Windows-only settings +// ---------------------------------------------------------------------------- + +// Set wxUSE_UNICODE_MSLU to 1 if you're compiling wxWidgets in Unicode mode +// and want to run your programs under Windows 9x and not only NT/2000/XP. +// This setting enables use of unicows.dll from MSLU (MS Layer for Unicode, see +// http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx). Note +// that you will have to modify the makefiles to include unicows.lib import +// library as the first library (see installation instructions in install.txt +// to learn how to do it when building the library or samples). +// +// If your compiler doesn't have unicows.lib, you can get a version of it at +// http://libunicows.sourceforge.net +// +// Default is 0 +// +// Recommended setting: 0 (1 if you want to deploy Unicode apps on 9x systems) +#ifndef wxUSE_UNICODE_MSLU + #define wxUSE_UNICODE_MSLU 0 +#endif + +// Set this to 1 if you want to use wxWidgets and MFC in the same program. This +// will override some other settings (see below) +// +// Default is 0. +// +// Recommended setting: 0 unless you really have to use MFC +#define wxUSE_MFC 0 + +// Set this to 1 for generic OLE support: this is required for drag-and-drop, +// clipboard, OLE Automation. Only set it to 0 if your compiler is very old and +// can't compile/doesn't have the OLE headers. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_OLE 1 + +// Set this to 1 to enable wxAutomationObject class. +// +// Default is 1. +// +// Recommended setting: 1 if you need to control other applications via OLE +// Automation, can be safely set to 0 otherwise +#define wxUSE_OLE_AUTOMATION 1 + +// Set this to 1 to enable wxActiveXContainer class allowing to embed OLE +// controls in wx. +// +// Default is 1. +// +// Recommended setting: 1, required by wxMediaCtrl +#define wxUSE_ACTIVEX 1 + +// wxDC caching implementation +#define wxUSE_DC_CACHEING 1 + +// Set this to 1 to enable wxDIB class used internally for manipulating +// wxBitmap data. +// +// Default is 1, set it to 0 only if you don't use wxImage neither +// +// Recommended setting: 1 (without it conversion to/from wxImage won't work) +#define wxUSE_WXDIB 1 + +// Set to 0 to disable PostScript print/preview architecture code under Windows +// (just use Windows printing). +#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1 + +// Set this to 1 to compile in wxRegKey class. +// +// Default is 1 +// +// Recommended setting: 1, this is used internally by wx in a few places +#define wxUSE_REGKEY 1 + +// Set this to 1 to use RICHEDIT controls for wxTextCtrl with style wxTE_RICH +// which allows to put more than ~32Kb of text in it even under Win9x (NT +// doesn't have such limitation). +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1, only set it to 0 if your compiler doesn't have +// or can't compile +#define wxUSE_RICHEDIT 1 + +// Set this to 1 to use extra features of richedit v2 and later controls +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1 +#define wxUSE_RICHEDIT2 1 + +// Set this to 1 to enable support for the owner-drawn menu and listboxes. This +// is required by wxUSE_CHECKLISTBOX. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 for a small library size reduction +#define wxUSE_OWNER_DRAWN 1 + +// Set this to 1 to enable MSW-specific wxTaskBarIcon::ShowBalloon() method. It +// is required by native wxNotificationMessage implementation. +// +// Default is 1 but disabled in wx/msw/chkconf.h if SDK is too old to contain +// the necessary declarations. +// +// Recommended setting: 1, set to 0 for a tiny library size reduction +#define wxUSE_TASKBARICON_BALLOONS 1 + +// Set to 1 to compile MS Windows XP theme engine support +#define wxUSE_UXTHEME 1 + +// Set to 1 to use InkEdit control (Tablet PC), if available +#define wxUSE_INKEDIT 0 + +// Set to 1 to enable .INI files based wxConfig implementation (wxIniConfig) +// +// Default is 0. +// +// Recommended setting: 0, nobody uses .INI files any more +#define wxUSE_INICONF 0 + +// ---------------------------------------------------------------------------- +// Generic versions of native controls +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxDatePickerCtrlGeneric in addition to the +// native wxDatePickerCtrl +// +// Default is 0. +// +// Recommended setting: 0, this is mainly used for testing +#define wxUSE_DATEPICKCTRL_GENERIC 0 + +// ---------------------------------------------------------------------------- +// Crash debugging helpers +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxCrashReport::Generate() to create mini +// dumps of your program when it crashes (or at any other moment) +// +// Default is 1 if supported by the compiler (VC++ and recent BC++ only). +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_CRASHREPORT 1 +/* --- end MSW options --- */ + +/* --- start wxUniv options --- */ +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 +/* --- end wxUniv options --- */ + +#endif // _WX_SETUP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/anidecod.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/anidecod.h new file mode 100644 index 0000000000..2923887b49 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/anidecod.h @@ -0,0 +1,80 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/anidecod.h +// Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation +// Author: Francesco Montorsi +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ANIDECOD_H +#define _WX_ANIDECOD_H + +#include "wx/defs.h" + +#if wxUSE_STREAMS && (wxUSE_ICO_CUR || wxUSE_GIF) + +#include "wx/stream.h" +#include "wx/image.h" +#include "wx/animdecod.h" +#include "wx/dynarray.h" + + +class /*WXDLLIMPEXP_CORE*/ wxANIFrameInfo; // private implementation detail + +WX_DECLARE_EXPORTED_OBJARRAY(wxANIFrameInfo, wxANIFrameInfoArray); +WX_DECLARE_EXPORTED_OBJARRAY(wxImage, wxImageArray); + +// -------------------------------------------------------------------------- +// wxANIDecoder class +// -------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxANIDecoder : public wxAnimationDecoder +{ +public: + // constructor, destructor, etc. + wxANIDecoder(); + ~wxANIDecoder(); + + + virtual wxSize GetFrameSize(unsigned int frame) const; + virtual wxPoint GetFramePosition(unsigned int frame) const; + virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const; + virtual long GetDelay(unsigned int frame) const; + virtual wxColour GetTransparentColour(unsigned int frame) const; + + // implementation of wxAnimationDecoder's pure virtuals + + virtual bool Load( wxInputStream& stream ); + + bool ConvertToImage(unsigned int frame, wxImage *image) const; + + wxAnimationDecoder *Clone() const + { return new wxANIDecoder; } + wxAnimationType GetType() const + { return wxANIMATION_TYPE_ANI; } + +private: + // wxAnimationDecoder pure virtual: + virtual bool DoCanRead( wxInputStream& stream ) const; + // modifies current stream position (see wxAnimationDecoder::CanRead) + + // frames stored as wxImage(s): ANI files are meant to be used mostly for animated + // cursors and thus they do not use any optimization to encode differences between + // two frames: they are just a list of images to display sequentially. + wxImageArray m_images; + + // the info about each image stored in m_images. + // NB: m_info.GetCount() may differ from m_images.GetCount()! + wxANIFrameInfoArray m_info; + + // this is the wxCURHandler used to load the ICON chunk of the ANI files + static wxCURHandler sm_handler; + + + wxDECLARE_NO_COPY_CLASS(wxANIDecoder); +}; + + +#endif // wxUSE_STREAMS && (wxUSE_ICO_CUR || wxUSE_GIF) + +#endif // _WX_ANIDECOD_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/animate.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/animate.h new file mode 100644 index 0000000000..6243fb4568 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/animate.h @@ -0,0 +1,125 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/animate.h +// Purpose: wxAnimation and wxAnimationCtrl +// Author: Julian Smart and Guillermo Rodriguez Garcia +// Modified by: Francesco Montorsi +// Created: 13/8/99 +// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ANIMATE_H_ +#define _WX_ANIMATE_H_ + +#include "wx/defs.h" + +#if wxUSE_ANIMATIONCTRL + +#include "wx/animdecod.h" +#include "wx/control.h" +#include "wx/timer.h" +#include "wx/bitmap.h" + +class WXDLLIMPEXP_FWD_ADV wxAnimation; + +extern WXDLLIMPEXP_DATA_ADV(wxAnimation) wxNullAnimation; +extern WXDLLIMPEXP_DATA_ADV(const char) wxAnimationCtrlNameStr[]; + + +// ---------------------------------------------------------------------------- +// wxAnimationBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxAnimationBase : public wxObject +{ +public: + wxAnimationBase() {} + + virtual bool IsOk() const = 0; + + // can be -1 + virtual int GetDelay(unsigned int frame) const = 0; + + virtual unsigned int GetFrameCount() const = 0; + virtual wxImage GetFrame(unsigned int frame) const = 0; + virtual wxSize GetSize() const = 0; + + virtual bool LoadFile(const wxString& name, + wxAnimationType type = wxANIMATION_TYPE_ANY) = 0; + virtual bool Load(wxInputStream& stream, + wxAnimationType type = wxANIMATION_TYPE_ANY) = 0; + +protected: + DECLARE_ABSTRACT_CLASS(wxAnimationBase) +}; + + + +// ---------------------------------------------------------------------------- +// wxAnimationCtrlBase +// ---------------------------------------------------------------------------- + +// do not autoresize to the animation's size when SetAnimation() is called +#define wxAC_NO_AUTORESIZE (0x0010) + +// default style does not include wxAC_NO_AUTORESIZE, that is, the control +// auto-resizes by default to fit the new animation when SetAnimation() is called +#define wxAC_DEFAULT_STYLE (wxBORDER_NONE) + +class WXDLLIMPEXP_ADV wxAnimationCtrlBase : public wxControl +{ +public: + wxAnimationCtrlBase() { } + + // public API + virtual bool LoadFile(const wxString& filename, + wxAnimationType type = wxANIMATION_TYPE_ANY) = 0; + virtual bool Load(wxInputStream& stream, + wxAnimationType type = wxANIMATION_TYPE_ANY) = 0; + + virtual void SetAnimation(const wxAnimation &anim) = 0; + virtual wxAnimation GetAnimation() const = 0; + + virtual bool Play() = 0; + virtual void Stop() = 0; + + virtual bool IsPlaying() const = 0; + + virtual void SetInactiveBitmap(const wxBitmap &bmp); + + // always return the original bitmap set in this control + wxBitmap GetInactiveBitmap() const + { return m_bmpStatic; } + +protected: + // the inactive bitmap as it was set by the user + wxBitmap m_bmpStatic; + + // the inactive bitmap currently shown in the control + // (may differ in the size from m_bmpStatic) + wxBitmap m_bmpStaticReal; + + // updates m_bmpStaticReal from m_bmpStatic if needed + virtual void UpdateStaticImage(); + + // called by SetInactiveBitmap + virtual void DisplayStaticImage() = 0; + +private: + DECLARE_ABSTRACT_CLASS(wxAnimationCtrlBase) +}; + + +// ---------------------------------------------------------------------------- +// include the platform-specific version of the wxAnimationCtrl class +// ---------------------------------------------------------------------------- + +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) + #include "wx/gtk/animate.h" +#else + #include "wx/generic/animate.h" +#endif + +#endif // wxUSE_ANIMATIONCTRL + +#endif // _WX_ANIMATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/animdecod.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/animdecod.h new file mode 100644 index 0000000000..58177e68fd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/animdecod.h @@ -0,0 +1,170 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/animdecod.h +// Purpose: wxAnimationDecoder +// Author: Francesco Montorsi +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ANIMDECOD_H +#define _WX_ANIMDECOD_H + +#include "wx/defs.h" + +#if wxUSE_STREAMS + +#include "wx/colour.h" +#include "wx/gdicmn.h" +#include "wx/log.h" +#include "wx/stream.h" + +class WXDLLIMPEXP_FWD_CORE wxImage; + +/* + + Differences between a wxAnimationDecoder and a wxImageHandler: + + 1) wxImageHandlers always load an input stream directly into a given wxImage + object converting from the format-specific data representation to the + wxImage native format (RGB24). + wxAnimationDecoders always load an input stream using some optimized format + to store it which is format-depedent. This allows to store a (possibly big) + animation using a format which is a good compromise between required memory + and time required to blit it on the screen. + + 2) wxAnimationDecoders contain the animation data in some internal variable. + That's why they derive from wxObjectRefData: they are data which can be shared. + + 3) wxAnimationDecoders can be used by a wxImageHandler to retrieve a frame + in wxImage format; the viceversa cannot be done. + + 4) wxAnimationDecoders are decoders only, thus they do not support save features. + + 5) wxAnimationDecoders are directly used by wxAnimation (generic implementation) + as wxObjectRefData while they need to be 'wrapped' by a wxImageHandler for + wxImage uses. + +*/ + + +// -------------------------------------------------------------------------- +// Constants +// -------------------------------------------------------------------------- + +// NB: the values of these enum items are not casual but coincide with the +// GIF disposal codes. Do not change them !! +enum wxAnimationDisposal +{ + // No disposal specified. The decoder is not required to take any action. + wxANIM_UNSPECIFIED = -1, + + // Do not dispose. The graphic is to be left in place. + wxANIM_DONOTREMOVE = 0, + + // Restore to background color. The area used by the graphic must be + // restored to the background color. + wxANIM_TOBACKGROUND = 1, + + // Restore to previous. The decoder is required to restore the area + // overwritten by the graphic with what was there prior to rendering the graphic. + wxANIM_TOPREVIOUS = 2 +}; + +enum wxAnimationType +{ + wxANIMATION_TYPE_INVALID, + wxANIMATION_TYPE_GIF, + wxANIMATION_TYPE_ANI, + + wxANIMATION_TYPE_ANY +}; + + +// -------------------------------------------------------------------------- +// wxAnimationDecoder class +// -------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxAnimationDecoder : public wxObjectRefData +{ +public: + wxAnimationDecoder() + { + m_nFrames = 0; + } + + virtual bool Load( wxInputStream& stream ) = 0; + + bool CanRead( wxInputStream& stream ) const + { + // NOTE: this code is the same of wxImageHandler::CallDoCanRead + + if ( !stream.IsSeekable() ) + return false; // can't test unseekable stream + + wxFileOffset posOld = stream.TellI(); + bool ok = DoCanRead(stream); + + // restore the old position to be able to test other formats and so on + if ( stream.SeekI(posOld) == wxInvalidOffset ) + { + wxLogDebug(wxT("Failed to rewind the stream in wxAnimationDecoder!")); + + // reading would fail anyhow as we're not at the right position + return false; + } + + return ok; + } + + virtual wxAnimationDecoder *Clone() const = 0; + virtual wxAnimationType GetType() const = 0; + + // convert given frame to wxImage + virtual bool ConvertToImage(unsigned int frame, wxImage *image) const = 0; + + + // frame specific data getters + + // not all frames may be of the same size; e.g. GIF allows to + // specify that between two frames only a smaller portion of the + // entire animation has changed. + virtual wxSize GetFrameSize(unsigned int frame) const = 0; + + // the position of this frame in case it's not as big as m_szAnimation + // or wxPoint(0,0) otherwise. + virtual wxPoint GetFramePosition(unsigned int frame) const = 0; + + // what should be done after displaying this frame. + virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const = 0; + + // the number of milliseconds this frame should be displayed. + // if returns -1 then the frame must be displayed forever. + virtual long GetDelay(unsigned int frame) const = 0; + + // the transparent colour for this frame if any or wxNullColour. + virtual wxColour GetTransparentColour(unsigned int frame) const = 0; + + // get global data + wxSize GetAnimationSize() const { return m_szAnimation; } + wxColour GetBackgroundColour() const { return m_background; } + unsigned int GetFrameCount() const { return m_nFrames; } + +protected: + // checks the signature of the data in the given stream and returns true if it + // appears to be a valid animation format recognized by the animation decoder; + // this function should modify the stream current position without taking care + // of restoring it since CanRead() will do it. + virtual bool DoCanRead(wxInputStream& stream) const = 0; + + wxSize m_szAnimation; + unsigned int m_nFrames; + + // this is the colour to use for the wxANIM_TOBACKGROUND disposal. + // if not specified by the animation, it's set to wxNullColour + wxColour m_background; +}; + +#endif // wxUSE_STREAMS + +#endif // _WX_ANIMDECOD_H + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/any.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/any.h new file mode 100644 index 0000000000..c2cd7a79f4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/any.h @@ -0,0 +1,1113 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/any.h +// Purpose: wxAny class +// Author: Jaakko Salli +// Modified by: +// Created: 07/05/2009 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ANY_H_ +#define _WX_ANY_H_ + +#include "wx/defs.h" + +#if wxUSE_ANY + +#include // for placement new +#include "wx/string.h" +#include "wx/meta/if.h" +#include "wx/typeinfo.h" +#include "wx/list.h" + +// Size of the wxAny value buffer. +enum +{ + WX_ANY_VALUE_BUFFER_SIZE = 16 +}; + +union wxAnyValueBuffer +{ + union Alignment + { + #if wxHAS_INT64 + wxInt64 m_int64; + #endif + long double m_longDouble; + void ( *m_funcPtr )(void); + void ( wxAnyValueBuffer::*m_mFuncPtr )(void); + } m_alignment; + + void* m_ptr; + wxByte m_buffer[WX_ANY_VALUE_BUFFER_SIZE]; +}; + +// +// wxAnyValueType is base class for value type functionality for C++ data +// types used with wxAny. Usually the default template (wxAnyValueTypeImpl<>) +// will create a satisfactory wxAnyValueType implementation for a data type. +// +class WXDLLIMPEXP_BASE wxAnyValueType +{ + WX_DECLARE_ABSTRACT_TYPEINFO(wxAnyValueType) +public: + /** + Default constructor. + */ + wxAnyValueType() + { + } + + /** + Destructor. + */ + virtual ~wxAnyValueType() + { + } + + /** + This function is used for internal type matching. + */ + virtual bool IsSameType(const wxAnyValueType* otherType) const = 0; + + /** + This function is called every time the data in wxAny + buffer needs to be freed. + */ + virtual void DeleteValue(wxAnyValueBuffer& buf) const = 0; + + /** + Implement this for buffer-to-buffer copy. + + @param src + This is the source data buffer. + + @param dst + This is the destination data buffer that is in either + uninitialized or freed state. + */ + virtual void CopyBuffer(const wxAnyValueBuffer& src, + wxAnyValueBuffer& dst) const = 0; + + /** + Convert value into buffer of different type. Return false if + not possible. + */ + virtual bool ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const = 0; + + /** + Use this template function for checking if wxAnyValueType represents + a specific C++ data type. + + @remarks This template function does not work on some older compilers + (such as Visual C++ 6.0). For full compiler compatibility + please use wxANY_VALUE_TYPE_CHECK_TYPE(valueTypePtr, T) macro + instead. + + @see wxAny::CheckType() + */ + // FIXME-VC6: remove this hack when VC6 is no longer supported + template + bool CheckType(T* reserved = NULL) const; + +#if wxUSE_EXTENDED_RTTI + virtual const wxTypeInfo* GetTypeInfo() const = 0; +#endif +private: +}; + + +// +// We need to allocate wxAnyValueType instances in heap, and need to use +// scoped ptr to properly deallocate them in dynamic library use cases. +// Here we have a minimal specialized scoped ptr implementation to deal +// with various compiler-specific problems with template class' static +// member variable of template type with explicit constructor which +// is initialized in global scope. +// +class wxAnyValueTypeScopedPtr +{ +public: + wxAnyValueTypeScopedPtr(wxAnyValueType* ptr) : m_ptr(ptr) { } + ~wxAnyValueTypeScopedPtr() { delete m_ptr; } + wxAnyValueType* get() const { return m_ptr; } +private: + wxAnyValueType* m_ptr; +}; + + +// +// This method of checking the type is compatible with VC6 +#define wxANY_VALUE_TYPE_CHECK_TYPE(valueTypePtr, T) \ + wxAnyValueTypeImpl::IsSameClass(valueTypePtr) + + +/** + Helper macro for defining user value types. + + Even though C++ RTTI would be fully available to use, we'd have to to + facilitate sub-type system which allows, for instance, wxAny with + signed short '15' to be treated equal to wxAny with signed long long '15'. + Having sm_instance is important here. + + NB: We really need to have wxAnyValueType instances allocated + in heap. They are stored as static template member variables, + and with them we just can't be too careful (eg. not allocating + them in heap broke the type identification in GCC). +*/ +#define WX_DECLARE_ANY_VALUE_TYPE(CLS) \ + friend class wxAny; \ + WX_DECLARE_TYPEINFO_INLINE(CLS) \ +public: \ + static bool IsSameClass(const wxAnyValueType* otherType) \ + { \ + return wxTypeId(*sm_instance.get()) == wxTypeId(*otherType); \ + } \ + virtual bool IsSameType(const wxAnyValueType* otherType) const \ + { \ + return IsSameClass(otherType); \ + } \ +private: \ + static wxAnyValueTypeScopedPtr sm_instance; \ +public: \ + static wxAnyValueType* GetInstance() \ + { \ + return sm_instance.get(); \ + } + + +#define WX_IMPLEMENT_ANY_VALUE_TYPE(CLS) \ +wxAnyValueTypeScopedPtr CLS::sm_instance(new CLS()); + + +#ifdef __VISUALC6__ + // "non dll-interface class 'xxx' used as base interface + #pragma warning (push) + #pragma warning (disable:4275) +#endif + +/** + Following are helper classes for the wxAnyValueTypeImplBase. +*/ +namespace wxPrivate +{ + +template +class wxAnyValueTypeOpsInplace +{ +public: + static void DeleteValue(wxAnyValueBuffer& buf) + { + T* value = reinterpret_cast(&buf.m_buffer[0]); + value->~T(); + + // Some compiler may given 'unused variable' warnings without this + wxUnusedVar(value); + } + + static void SetValue(const T& value, + wxAnyValueBuffer& buf) + { + // Use placement new + void* const place = buf.m_buffer; + ::new(place) T(value); + } + + static const T& GetValue(const wxAnyValueBuffer& buf) + { + // Breaking this code into two lines should suppress + // GCC's 'type-punned pointer will break strict-aliasing rules' + // warning. + const T* value = reinterpret_cast(&buf.m_buffer[0]); + return *value; + } +}; + + +template +class wxAnyValueTypeOpsGeneric +{ +public: + template + class DataHolder + { + public: + DataHolder(const T2& value) + { + m_value = value; + } + virtual ~DataHolder() { } + + T2 m_value; + private: + wxDECLARE_NO_COPY_CLASS(DataHolder); + }; + + static void DeleteValue(wxAnyValueBuffer& buf) + { + DataHolder* holder = static_cast*>(buf.m_ptr); + delete holder; + } + + static void SetValue(const T& value, + wxAnyValueBuffer& buf) + { + DataHolder* holder = new DataHolder(value); + buf.m_ptr = holder; + } + + static const T& GetValue(const wxAnyValueBuffer& buf) + { + DataHolder* holder = static_cast*>(buf.m_ptr); + return holder->m_value; + } +}; + +} // namespace wxPrivate + + +/** + Intermediate template for the generic value type implementation. + We can derive from this same value type for multiple actual types + (for instance, we can have wxAnyValueTypeImplInt for all signed + integer types), and also easily implement specialized templates + with specific dynamic type conversion. +*/ +template +class wxAnyValueTypeImplBase : public wxAnyValueType +{ + typedef typename wxIf< sizeof(T) <= WX_ANY_VALUE_BUFFER_SIZE, + wxPrivate::wxAnyValueTypeOpsInplace, + wxPrivate::wxAnyValueTypeOpsGeneric >::value + Ops; + +public: + wxAnyValueTypeImplBase() : wxAnyValueType() { } + virtual ~wxAnyValueTypeImplBase() { } + + virtual void DeleteValue(wxAnyValueBuffer& buf) const + { + Ops::DeleteValue(buf); + } + + virtual void CopyBuffer(const wxAnyValueBuffer& src, + wxAnyValueBuffer& dst) const + { + Ops::SetValue(Ops::GetValue(src), dst); + } + + /** + It is important to reimplement this in any specialized template + classes that inherit from wxAnyValueTypeImplBase. + */ + static void SetValue(const T& value, + wxAnyValueBuffer& buf) + { + Ops::SetValue(value, buf); + } + + /** + It is important to reimplement this in any specialized template + classes that inherit from wxAnyValueTypeImplBase. + */ + static const T& GetValue(const wxAnyValueBuffer& buf) + { + return Ops::GetValue(buf); + } +#if wxUSE_EXTENDED_RTTI + virtual const wxTypeInfo* GetTypeInfo() const + { + return wxGetTypeInfo((T*)NULL); + } +#endif +}; + + +/* + Generic value type template. Note that bulk of the implementation + resides in wxAnyValueTypeImplBase. +*/ +template +class wxAnyValueTypeImpl : public wxAnyValueTypeImplBase +{ + WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl) +public: + wxAnyValueTypeImpl() : wxAnyValueTypeImplBase() { } + virtual ~wxAnyValueTypeImpl() { } + + virtual bool ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const + { + wxUnusedVar(src); + wxUnusedVar(dstType); + wxUnusedVar(dst); + return false; + } +}; + +template +wxAnyValueTypeScopedPtr wxAnyValueTypeImpl::sm_instance = new wxAnyValueTypeImpl(); + + +// +// Helper macro for using same base value type implementation for multiple +// actual C++ data types. +// +#define _WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE) \ +template<> \ +class wxAnyValueTypeImpl : public wxAnyValueTypeImpl##CLSTYPE \ +{ \ + typedef wxAnyBase##CLSTYPE##Type UseDataType; \ +public: \ + wxAnyValueTypeImpl() : wxAnyValueTypeImpl##CLSTYPE() { } \ + virtual ~wxAnyValueTypeImpl() { } \ + static void SetValue(const T& value, wxAnyValueBuffer& buf) \ + { \ + void* voidPtr = reinterpret_cast(&buf.m_buffer[0]); \ + UseDataType* dptr = reinterpret_cast(voidPtr); \ + *dptr = static_cast(value); \ + } \ + static T GetValue(const wxAnyValueBuffer& buf) \ + { \ + const void* voidPtr = \ + reinterpret_cast(&buf.m_buffer[0]); \ + const UseDataType* sptr = \ + reinterpret_cast(voidPtr); \ + return static_cast(*sptr); \ + } + +#if wxUSE_EXTENDED_RTTI +#define WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE) \ +_WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE)\ + virtual const wxTypeInfo* GetTypeInfo() const \ + { \ + return wxGetTypeInfo((T*)NULL); \ + } \ +}; +#else +#define WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE) \ +_WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE)\ +}; +#endif + +// +// Integer value types +// + +#ifdef wxLongLong_t + typedef wxLongLong_t wxAnyBaseIntType; + typedef wxULongLong_t wxAnyBaseUintType; +#else + typedef long wxAnyBaseIntType; + typedef unsigned long wxAnyBaseUintType; +#endif + + +class WXDLLIMPEXP_BASE wxAnyValueTypeImplInt : + public wxAnyValueTypeImplBase +{ + WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImplInt) +public: + wxAnyValueTypeImplInt() : + wxAnyValueTypeImplBase() { } + virtual ~wxAnyValueTypeImplInt() { } + + virtual bool ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const; +}; + + +class WXDLLIMPEXP_BASE wxAnyValueTypeImplUint : + public wxAnyValueTypeImplBase +{ + WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImplUint) +public: + wxAnyValueTypeImplUint() : + wxAnyValueTypeImplBase() { } + virtual ~wxAnyValueTypeImplUint() { } + + virtual bool ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const; +}; + + +WX_ANY_DEFINE_SUB_TYPE(signed long, Int) +WX_ANY_DEFINE_SUB_TYPE(signed int, Int) +WX_ANY_DEFINE_SUB_TYPE(signed short, Int) +WX_ANY_DEFINE_SUB_TYPE(signed char, Int) +#ifdef wxLongLong_t +WX_ANY_DEFINE_SUB_TYPE(wxLongLong_t, Int) +#endif + +WX_ANY_DEFINE_SUB_TYPE(unsigned long, Uint) +WX_ANY_DEFINE_SUB_TYPE(unsigned int, Uint) +WX_ANY_DEFINE_SUB_TYPE(unsigned short, Uint) +WX_ANY_DEFINE_SUB_TYPE(unsigned char, Uint) +#ifdef wxLongLong_t +WX_ANY_DEFINE_SUB_TYPE(wxULongLong_t, Uint) +#endif + + +// +// This macro is used in header, but then in source file we must have: +// WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl##TYPENAME) +// +#define _WX_ANY_DEFINE_CONVERTIBLE_TYPE(T, TYPENAME, CONVFUNC, GV) \ +class WXDLLIMPEXP_BASE wxAnyValueTypeImpl##TYPENAME : \ + public wxAnyValueTypeImplBase \ +{ \ + WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl##TYPENAME) \ +public: \ + wxAnyValueTypeImpl##TYPENAME() : \ + wxAnyValueTypeImplBase() { } \ + virtual ~wxAnyValueTypeImpl##TYPENAME() { } \ + virtual bool ConvertValue(const wxAnyValueBuffer& src, \ + wxAnyValueType* dstType, \ + wxAnyValueBuffer& dst) const \ + { \ + GV value = GetValue(src); \ + return CONVFUNC(value, dstType, dst); \ + } \ +}; \ +template<> \ +class wxAnyValueTypeImpl : public wxAnyValueTypeImpl##TYPENAME \ +{ \ +public: \ + wxAnyValueTypeImpl() : wxAnyValueTypeImpl##TYPENAME() { } \ + virtual ~wxAnyValueTypeImpl() { } \ +}; + +#define WX_ANY_DEFINE_CONVERTIBLE_TYPE(T, TYPENAME, CONVFUNC, BT) \ +_WX_ANY_DEFINE_CONVERTIBLE_TYPE(T, TYPENAME, CONVFUNC, BT) \ + +#define WX_ANY_DEFINE_CONVERTIBLE_TYPE_BASE(T, TYPENAME, CONVFUNC) \ +_WX_ANY_DEFINE_CONVERTIBLE_TYPE(T, TYPENAME, \ + CONVFUNC, const T&) \ + +// +// String value type +// + +// Convert wxString to destination wxAny value type +extern WXDLLIMPEXP_BASE bool wxAnyConvertString(const wxString& value, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst); + +WX_ANY_DEFINE_CONVERTIBLE_TYPE_BASE(wxString, wxString, wxAnyConvertString) +WX_ANY_DEFINE_CONVERTIBLE_TYPE(const char*, ConstCharPtr, + wxAnyConvertString, wxString) +WX_ANY_DEFINE_CONVERTIBLE_TYPE(const wchar_t*, ConstWchar_tPtr, + wxAnyConvertString, wxString) + +// +// Bool value type +// +template<> +class WXDLLIMPEXP_BASE wxAnyValueTypeImpl : + public wxAnyValueTypeImplBase +{ + WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl) +public: + wxAnyValueTypeImpl() : + wxAnyValueTypeImplBase() { } + virtual ~wxAnyValueTypeImpl() { } + + virtual bool ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const; +}; + +// +// Floating point value type +// +class WXDLLIMPEXP_BASE wxAnyValueTypeImplDouble : + public wxAnyValueTypeImplBase +{ + WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImplDouble) +public: + wxAnyValueTypeImplDouble() : + wxAnyValueTypeImplBase() { } + virtual ~wxAnyValueTypeImplDouble() { } + + virtual bool ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const; +}; + +// WX_ANY_DEFINE_SUB_TYPE requires this +typedef double wxAnyBaseDoubleType; + +WX_ANY_DEFINE_SUB_TYPE(float, Double) +WX_ANY_DEFINE_SUB_TYPE(double, Double) + + +// +// Defines a dummy wxAnyValueTypeImpl<> with given export +// declaration. This is needed if a class is used with +// wxAny in both user shared library and application. +// +#define wxDECLARE_ANY_TYPE(CLS, DECL) \ +template<> \ +class DECL wxAnyValueTypeImpl : \ + public wxAnyValueTypeImplBase \ +{ \ + WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl) \ +public: \ + wxAnyValueTypeImpl() : \ + wxAnyValueTypeImplBase() { } \ + virtual ~wxAnyValueTypeImpl() { } \ + \ + virtual bool ConvertValue(const wxAnyValueBuffer& src, \ + wxAnyValueType* dstType, \ + wxAnyValueBuffer& dst) const \ + { \ + wxUnusedVar(src); \ + wxUnusedVar(dstType); \ + wxUnusedVar(dst); \ + return false; \ + } \ +}; + + +// Make sure some of wx's own types get the right wxAnyValueType export +// (this is needed only for types that are referred to from wxBase. +// currently we may not use any of these types from there, but let's +// use the macro on at least one to make sure it compiles since we can't +// really test it properly in unit tests since a separate DLL would +// be needed). +#if wxUSE_DATETIME + #include "wx/datetime.h" + wxDECLARE_ANY_TYPE(wxDateTime, WXDLLIMPEXP_BASE) +#endif + +//#include "wx/object.h" +//wxDECLARE_ANY_TYPE(wxObject*, WXDLLIMPEXP_BASE) + +//#include "wx/arrstr.h" +//wxDECLARE_ANY_TYPE(wxArrayString, WXDLLIMPEXP_BASE) + + +#if wxUSE_VARIANT + +class WXDLLIMPEXP_FWD_BASE wxAnyToVariantRegistration; + +// Because of header inter-dependencies, cannot include this earlier +#include "wx/variant.h" + +// +// wxVariantData* data type implementation. For cases when appropriate +// wxAny<->wxVariant conversion code is missing. +// + +class WXDLLIMPEXP_BASE wxAnyValueTypeImplVariantData : + public wxAnyValueTypeImplBase +{ + WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImplVariantData) +public: + wxAnyValueTypeImplVariantData() : + wxAnyValueTypeImplBase() { } + virtual ~wxAnyValueTypeImplVariantData() { } + + virtual void DeleteValue(wxAnyValueBuffer& buf) const + { + wxVariantData* data = static_cast(buf.m_ptr); + if ( data ) + data->DecRef(); + } + + virtual void CopyBuffer(const wxAnyValueBuffer& src, + wxAnyValueBuffer& dst) const + { + wxVariantData* data = static_cast(src.m_ptr); + if ( data ) + data->IncRef(); + dst.m_ptr = data; + } + + static void SetValue(wxVariantData* value, + wxAnyValueBuffer& buf) + { + value->IncRef(); + buf.m_ptr = value; + } + + static wxVariantData* GetValue(const wxAnyValueBuffer& buf) + { + return static_cast(buf.m_ptr); + } + + virtual bool ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const + { + wxUnusedVar(src); + wxUnusedVar(dstType); + wxUnusedVar(dst); + return false; + } +}; + +template<> +class wxAnyValueTypeImpl : + public wxAnyValueTypeImplVariantData +{ +public: + wxAnyValueTypeImpl() : wxAnyValueTypeImplVariantData() { } + virtual ~wxAnyValueTypeImpl() { } +}; + +#endif // wxUSE_VARIANT + +#ifdef __VISUALC6__ + // Re-enable useless VC6 warnings + #pragma warning (pop) +#endif + + +/* + Let's define a discrete Null value so we don't have to really + ever check if wxAny.m_type pointer is NULL or not. This is an + optimization, mostly. Implementation of this value type is + "hidden" in the source file. +*/ +extern WXDLLIMPEXP_DATA_BASE(wxAnyValueType*) wxAnyNullValueType; + + +// +// We need to implement custom signed/unsigned int equals operators +// for signed/unsigned (eg. wxAny(128UL) == 128L) comparisons to work. +#define WXANY_IMPLEMENT_INT_EQ_OP(TS, TUS) \ +bool operator==(TS value) const \ +{ \ + if ( wxAnyValueTypeImpl::IsSameClass(m_type) ) \ + return (value == static_cast \ + (wxAnyValueTypeImpl::GetValue(m_buffer))); \ + if ( wxAnyValueTypeImpl::IsSameClass(m_type) ) \ + return (value == static_cast \ + (wxAnyValueTypeImpl::GetValue(m_buffer))); \ + return false; \ +} \ +bool operator==(TUS value) const \ +{ \ + if ( wxAnyValueTypeImpl::IsSameClass(m_type) ) \ + return (value == static_cast \ + (wxAnyValueTypeImpl::GetValue(m_buffer))); \ + if ( wxAnyValueTypeImpl::IsSameClass(m_type) ) \ + return (value == static_cast \ + (wxAnyValueTypeImpl::GetValue(m_buffer))); \ + return false; \ +} + + +#if wxUSE_VARIANT + +// Note that the following functions are implemented outside wxAny class +// so that it can reside entirely in header and lack the export declaration. + +// Helper function used to associate wxAnyValueType with a wxVariantData. +extern WXDLLIMPEXP_BASE void +wxPreRegisterAnyToVariant(wxAnyToVariantRegistration* reg); + +// This function performs main wxAny to wxVariant conversion duties. +extern WXDLLIMPEXP_BASE bool +wxConvertAnyToVariant(const wxAny& any, wxVariant* variant); + +#endif // wxUSE_VARIANT + + +// +// The wxAny class represents a container for any type. A variant's value +// can be changed at run time, possibly to a different type of value. +// +// As standard, wxAny can store value of almost any type, in a fairly +// optimal manner even. +// +class wxAny +{ +public: + /** + Default constructor. + */ + wxAny() + { + m_type = wxAnyNullValueType; + } + + /** + Destructor. + */ + ~wxAny() + { + m_type->DeleteValue(m_buffer); + } + + //@{ + /** + Various constructors. + */ + template + wxAny(const T& value) + { + m_type = wxAnyValueTypeImpl::sm_instance.get(); + wxAnyValueTypeImpl::SetValue(value, m_buffer); + } + + // These two constructors are needed to deal with string literals + wxAny(const char* value) + { + m_type = wxAnyValueTypeImpl::sm_instance.get(); + wxAnyValueTypeImpl::SetValue(value, m_buffer); + } + wxAny(const wchar_t* value) + { + m_type = wxAnyValueTypeImpl::sm_instance.get(); + wxAnyValueTypeImpl::SetValue(value, m_buffer); + } + + wxAny(const wxAny& any) + { + m_type = wxAnyNullValueType; + AssignAny(any); + } + +#if wxUSE_VARIANT + wxAny(const wxVariant& variant) + { + m_type = wxAnyNullValueType; + AssignVariant(variant); + } +#endif + + //@} + + /** + Use this template function for checking if this wxAny holds + a specific C++ data type. + + @remarks This template function does not work on some older compilers + (such as Visual C++ 6.0). For full compiler ccompatibility + please use wxANY_CHECK_TYPE(any, T) macro instead. + + @see wxAnyValueType::CheckType() + */ + // FIXME-VC6: remove this hack when VC6 is no longer supported + template + bool CheckType(T* = NULL) const + { + return m_type->CheckType(); + } + + /** + Returns the value type as wxAnyValueType instance. + + @remarks You cannot reliably test whether two wxAnys are of + same value type by simply comparing return values + of wxAny::GetType(). Instead, use wxAny::HasSameType(). + + @see HasSameType() + */ + const wxAnyValueType* GetType() const + { + return m_type; + } + + /** + Returns @true if this and another wxAny have the same + value type. + */ + bool HasSameType(const wxAny& other) const + { + return GetType()->IsSameType(other.GetType()); + } + + /** + Tests if wxAny is null (that is, whether there is no data). + */ + bool IsNull() const + { + return (m_type == wxAnyNullValueType); + } + + /** + Makes wxAny null (that is, clears it). + */ + void MakeNull() + { + m_type->DeleteValue(m_buffer); + m_type = wxAnyNullValueType; + } + + //@{ + /** + Assignment operators. + */ + template + wxAny& operator=(const T &value) + { + m_type->DeleteValue(m_buffer); + m_type = wxAnyValueTypeImpl::sm_instance.get(); + wxAnyValueTypeImpl::SetValue(value, m_buffer); + return *this; + } + + wxAny& operator=(const wxAny &any) + { + if (this != &any) + AssignAny(any); + return *this; + } + +#if wxUSE_VARIANT + wxAny& operator=(const wxVariant &variant) + { + AssignVariant(variant); + return *this; + } +#endif + + // These two operators are needed to deal with string literals + wxAny& operator=(const char* value) + { + Assign(value); + return *this; + } + wxAny& operator=(const wchar_t* value) + { + Assign(value); + return *this; + } + + //@{ + /** + Equality operators. + */ + bool operator==(const wxString& value) const + { + wxString value2; + if ( !GetAs(&value2) ) + return false; + return value == value2; + } + + bool operator==(const char* value) const + { return (*this) == wxString(value); } + bool operator==(const wchar_t* value) const + { return (*this) == wxString(value); } + + // + // We need to implement custom signed/unsigned int equals operators + // for signed/unsigned (eg. wxAny(128UL) == 128L) comparisons to work. + WXANY_IMPLEMENT_INT_EQ_OP(signed char, unsigned char) + WXANY_IMPLEMENT_INT_EQ_OP(signed short, unsigned short) + WXANY_IMPLEMENT_INT_EQ_OP(signed int, unsigned int) + WXANY_IMPLEMENT_INT_EQ_OP(signed long, unsigned long) +#ifdef wxLongLong_t + WXANY_IMPLEMENT_INT_EQ_OP(wxLongLong_t, wxULongLong_t) +#endif + + wxGCC_WARNING_SUPPRESS(float-equal) + + bool operator==(float value) const + { + if ( !wxAnyValueTypeImpl::IsSameClass(m_type) ) + return false; + + return value == + static_cast + (wxAnyValueTypeImpl::GetValue(m_buffer)); + } + + bool operator==(double value) const + { + if ( !wxAnyValueTypeImpl::IsSameClass(m_type) ) + return false; + + return value == + static_cast + (wxAnyValueTypeImpl::GetValue(m_buffer)); + } + + wxGCC_WARNING_RESTORE(float-equal) + + bool operator==(bool value) const + { + if ( !wxAnyValueTypeImpl::IsSameClass(m_type) ) + return false; + + return value == (wxAnyValueTypeImpl::GetValue(m_buffer)); + } + + //@} + + //@{ + /** + Inequality operators (implement as template). + */ + template + bool operator!=(const T& value) const + { return !((*this) == value); } + //@} + + /** + This template function converts wxAny into given type. In most cases + no type conversion is performed, so if the type is incorrect an + assertion failure will occur. + + @remarks For convenience, conversion is done when T is wxString. This + is useful when a string literal (which are treated as + const char* and const wchar_t*) has been assigned to wxAny. + + This template function may not work properly with Visual C++ + 6. For full compiler compatibility, please use + wxANY_AS(any, T) macro instead. + */ + // FIXME-VC6: remove this hack when VC6 is no longer supported + template + T As(T* = NULL) const + { + if ( !wxAnyValueTypeImpl::IsSameClass(m_type) ) + { + wxFAIL_MSG("Incorrect or non-convertible data type"); + } + + return static_cast(wxAnyValueTypeImpl::GetValue(m_buffer)); + } + + // Allow easy conversion from 'const char *' etc. to wxString + // FIXME-VC6: remove this hack when VC6 is no longer supported + //template<> + wxString As(wxString*) const + { + wxString value; + if ( !GetAs(&value) ) + { + wxFAIL_MSG("Incorrect or non-convertible data type"); + } + return value; + } + +#if wxUSE_EXTENDED_RTTI + const wxTypeInfo* GetTypeInfo() const + { + return m_type->GetTypeInfo(); + } +#endif + /** + Template function that retrieves and converts the value of this + variant to the type that T* value is. + + @return Returns @true if conversion was successful. + */ + template + bool GetAs(T* value) const + { + if ( !wxAnyValueTypeImpl::IsSameClass(m_type) ) + { + wxAnyValueType* otherType = + wxAnyValueTypeImpl::sm_instance.get(); + wxAnyValueBuffer temp_buf; + + if ( !m_type->ConvertValue(m_buffer, otherType, temp_buf) ) + return false; + + *value = + static_cast(wxAnyValueTypeImpl::GetValue(temp_buf)); + otherType->DeleteValue(temp_buf); + + return true; + } + *value = static_cast(wxAnyValueTypeImpl::GetValue(m_buffer)); + return true; + } + +#if wxUSE_VARIANT + // GetAs() wxVariant specialization + bool GetAs(wxVariant* value) const + { + return wxConvertAnyToVariant(*this, value); + } +#endif + +private: + // Assignment functions + void AssignAny(const wxAny& any) + { + // Must delete value - CopyBuffer() never does that + m_type->DeleteValue(m_buffer); + + wxAnyValueType* newType = any.m_type; + + if ( !newType->IsSameType(m_type) ) + m_type = newType; + + newType->CopyBuffer(any.m_buffer, m_buffer); + } + +#if wxUSE_VARIANT + void AssignVariant(const wxVariant& variant) + { + wxVariantData* data = variant.GetData(); + + if ( data && data->GetAsAny(this) ) + return; + + m_type->DeleteValue(m_buffer); + + if ( variant.IsNull() ) + { + // Init as Null + m_type = wxAnyNullValueType; + } + else + { + // If everything else fails, wrap the whole wxVariantData + m_type = wxAnyValueTypeImpl::sm_instance.get(); + wxAnyValueTypeImpl::SetValue(data, m_buffer); + } + } +#endif + + template + void Assign(const T &value) + { + m_type->DeleteValue(m_buffer); + m_type = wxAnyValueTypeImpl::sm_instance.get(); + wxAnyValueTypeImpl::SetValue(value, m_buffer); + } + + // Data + wxAnyValueBuffer m_buffer; + wxAnyValueType* m_type; +}; + + +// +// This method of checking the type is compatible with VC6 +#define wxANY_CHECK_TYPE(any, T) \ + wxANY_VALUE_TYPE_CHECK_TYPE((any).GetType(), T) + + +// +// This method of getting the value is compatible with VC6 +#define wxANY_AS(any, T) \ + (any).As(static_cast(NULL)) + + +template +inline bool wxAnyValueType::CheckType(T* reserved) const +{ + wxUnusedVar(reserved); + return wxAnyValueTypeImpl::IsSameClass(this); +} + +WX_DECLARE_LIST_WITH_DECL(wxAny, wxAnyList, class WXDLLIMPEXP_BASE); + +#endif // wxUSE_ANY + +#endif // _WX_ANY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/anybutton.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/anybutton.h new file mode 100644 index 0000000000..ebeac3b551 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/anybutton.h @@ -0,0 +1,199 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/anybutton.h +// Purpose: wxAnyButtonBase class +// Author: Vadim Zetlin +// Created: 2000-08-15 (extracted from button.h) +// Copyright: (c) Vadim Zetlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ANYBUTTON_H_BASE_ +#define _WX_ANYBUTTON_H_BASE_ + +#include "wx/defs.h" + +#ifdef wxHAS_ANY_BUTTON + +// ---------------------------------------------------------------------------- +// wxAnyButton specific flags +// ---------------------------------------------------------------------------- + +// These flags affect label alignment +#define wxBU_LEFT 0x0040 +#define wxBU_TOP 0x0080 +#define wxBU_RIGHT 0x0100 +#define wxBU_BOTTOM 0x0200 +#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM ) + +// These two flags are obsolete +#define wxBU_NOAUTODRAW 0x0000 +#define wxBU_AUTODRAW 0x0004 + +// by default, the buttons will be created with some (system dependent) +// minimal size to make them look nicer, giving this style will make them as +// small as possible +#define wxBU_EXACTFIT 0x0001 + +// this flag can be used to disable using the text label in the button: it is +// mostly useful when creating buttons showing bitmap and having stock id as +// without it both the standard label corresponding to the stock id and the +// bitmap would be shown +#define wxBU_NOTEXT 0x0002 + + +#include "wx/bitmap.h" +#include "wx/control.h" + +// ---------------------------------------------------------------------------- +// wxAnyButton: common button functionality +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxAnyButtonBase : public wxControl +{ +public: + wxAnyButtonBase() { } + + // show the image in the button in addition to the label: this method is + // supported on all (major) platforms + void SetBitmap(const wxBitmap& bitmap, wxDirection dir = wxLEFT) + { + SetBitmapLabel(bitmap); + SetBitmapPosition(dir); + } + + wxBitmap GetBitmap() const { return DoGetBitmap(State_Normal); } + + // Methods for setting individual images for different states: normal, + // selected (meaning pushed or pressed), focused (meaning normal state for + // a focused button), disabled or hover (a.k.a. hot or current). + // + // Remember that SetBitmap() itself must be called before any other + // SetBitmapXXX() methods (except for SetBitmapLabel() which is a synonym + // for it anyhow) and that all bitmaps passed to these functions should be + // of the same size. + void SetBitmapLabel(const wxBitmap& bitmap) + { DoSetBitmap(bitmap, State_Normal); } + void SetBitmapPressed(const wxBitmap& bitmap) + { DoSetBitmap(bitmap, State_Pressed); } + void SetBitmapDisabled(const wxBitmap& bitmap) + { DoSetBitmap(bitmap, State_Disabled); } + void SetBitmapCurrent(const wxBitmap& bitmap) + { DoSetBitmap(bitmap, State_Current); } + void SetBitmapFocus(const wxBitmap& bitmap) + { DoSetBitmap(bitmap, State_Focused); } + + wxBitmap GetBitmapLabel() const { return DoGetBitmap(State_Normal); } + wxBitmap GetBitmapPressed() const { return DoGetBitmap(State_Pressed); } + wxBitmap GetBitmapDisabled() const { return DoGetBitmap(State_Disabled); } + wxBitmap GetBitmapCurrent() const { return DoGetBitmap(State_Current); } + wxBitmap GetBitmapFocus() const { return DoGetBitmap(State_Focused); } + + + // set the margins around the image + void SetBitmapMargins(wxCoord x, wxCoord y) { DoSetBitmapMargins(x, y); } + void SetBitmapMargins(const wxSize& sz) { DoSetBitmapMargins(sz.x, sz.y); } + wxSize GetBitmapMargins() { return DoGetBitmapMargins(); } + + // set the image position relative to the text, i.e. wxLEFT means that the + // image is to the left of the text (this is the default) + void SetBitmapPosition(wxDirection dir); + + + // Buttons on MSW can look bad if they are not native colours, because + // then they become owner-drawn and not theme-drawn. Disable it here + // in wxAnyButtonBase to make it consistent. + virtual bool ShouldInheritColours() const { return false; } + + // wxUniv-compatible and deprecated equivalents to SetBitmapXXX() +#if WXWIN_COMPATIBILITY_2_8 + void SetImageLabel(const wxBitmap& bitmap) { SetBitmap(bitmap); } + void SetImageMargins(wxCoord x, wxCoord y) { SetBitmapMargins(x, y); } +#endif // WXWIN_COMPATIBILITY_2_8 + + // backwards compatible names for pressed/current bitmaps: they're not + // deprecated as there is nothing really wrong with using them and no real + // advantage to using the new names but the new names are still preferred + wxBitmap GetBitmapSelected() const { return GetBitmapPressed(); } + wxBitmap GetBitmapHover() const { return GetBitmapCurrent(); } + + void SetBitmapSelected(const wxBitmap& bitmap) { SetBitmapPressed(bitmap); } + void SetBitmapHover(const wxBitmap& bitmap) { SetBitmapCurrent(bitmap); } + + + // this enum is not part of wx public API, it is public because it is used + // in non wxAnyButton-derived classes internally + // + // also notice that MSW code relies on the values of the enum elements, do + // not change them without revising src/msw/button.cpp + enum State + { + State_Normal, + State_Current, // a.k.a. hot or "hovering" + State_Pressed, // a.k.a. "selected" in public API for some reason + State_Disabled, + State_Focused, + State_Max + }; + + // return true if this button shouldn't show the text label, either because + // it doesn't have it or because it was explicitly disabled with wxBU_NOTEXT + bool DontShowLabel() const + { + return HasFlag(wxBU_NOTEXT) || GetLabel().empty(); + } + + // return true if we do show the label + bool ShowsLabel() const + { + return !DontShowLabel(); + } + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + virtual wxBitmap DoGetBitmap(State WXUNUSED(which)) const + { return wxBitmap(); } + virtual void DoSetBitmap(const wxBitmap& WXUNUSED(bitmap), + State WXUNUSED(which)) + { } + + virtual wxSize DoGetBitmapMargins() const + { return wxSize(0, 0); } + + virtual void DoSetBitmapMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y)) + { } + + virtual void DoSetBitmapPosition(wxDirection WXUNUSED(dir)) + { } + + virtual bool DoGetAuthNeeded() const { return false; } + virtual void DoSetAuthNeeded(bool WXUNUSED(show)) { } + + + wxDECLARE_NO_COPY_CLASS(wxAnyButtonBase); +}; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/anybutton.h" +#elif defined(__WXMSW__) + #include "wx/msw/anybutton.h" +//#elif defined(__WXMOTIF__) +// #include "wx/motif/anybutton.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/anybutton.h" +//#elif defined(__WXGTK__) +// #include "wx/gtk1/anybutton.h" +#elif defined(__WXMAC__) + #include "wx/osx/anybutton.h" +//#elif defined(__WXCOCOA__) +// #include "wx/cocoa/anybutton.h" +//#elif defined(__WXPM__) +// #include "wx/os2/anybutton.h" +#else + typedef wxAnyButtonBase wxAnyButton; +#endif + +#endif // wxHAS_ANY_BUTTON + +#endif // _WX_ANYBUTTON_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/anystr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/anystr.h new file mode 100644 index 0000000000..8eebaf9b03 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/anystr.h @@ -0,0 +1,139 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/anystr.h +// Purpose: wxAnyStrPtr class declaration +// Author: Vadim Zeitlin +// Created: 2009-03-23 +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ANYSTR_H_ +#define _WX_ANYSTR_H_ + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// wxAnyStrPtr +// +// Notice that this is an internal and intentionally not documented class. It +// is only used by wxWidgets itself to ensure compatibility with previous +// versions and shouldn't be used by user code. When you see a function +// returning it you should just know that you can treat it as a string pointer. +// ---------------------------------------------------------------------------- + +// This is a helper class convertible to either narrow or wide string pointer. +// It is similar to wxCStrData but, unlike it, can be NULL which is required to +// represent the return value of wxDateTime::ParseXXX() methods for example. +// +// NB: this class is fully inline and so doesn't need to be DLL-exported +class wxAnyStrPtr +{ +public: + // ctors: this class must be created from the associated string or using + // its default ctor for an invalid NULL-like object; notice that it is + // immutable after creation. + + // ctor for invalid pointer + wxAnyStrPtr() + : m_str(NULL) + { + } + + // ctor for valid pointer into the given string (whose lifetime must be + // greater than ours and which should remain constant while we're used) + wxAnyStrPtr(const wxString& str, const wxString::const_iterator& iter) + : m_str(&str), + m_iter(iter) + { + } + + // default copy ctor is ok and so is default dtor, in particular we do not + // free the string + + + // various operators meant to make this class look like a superposition of + // char* and wchar_t* + + // this one is needed to allow boolean expressions involving these objects, + // e.g. "if ( FuncReturningAnyStrPtr() && ... )" (unfortunately using + // unspecified_bool_type here wouldn't help with ambiguity between all the + // different conversions to pointers) + operator bool() const { return m_str != NULL; } + + // at least VC6 and VC7 also need this one or they complain about ambiguity + // for !anystr expressions + bool operator!() const { return !((bool)*this); } + + + // and these are the conversions operator which allow to assign the result + // of FuncReturningAnyStrPtr() to either char* or wxChar* (i.e. wchar_t*) + operator const char *() const + { + if ( !m_str ) + return NULL; + + // check if the string is convertible to char at all + // + // notice that this pointer points into wxString internal buffer + // containing its char* representation and so it can be kept for as + // long as wxString is not modified -- which is long enough for our + // needs + const char *p = m_str->c_str().AsChar(); + if ( *p ) + { + // find the offset of the character corresponding to this iterator + // position in bytes: we don't have any direct way to do it so we + // need to redo the conversion again for the part of the string + // before the iterator to find its length in bytes in current + // locale + // + // NB: conversion won't fail as it succeeded for the entire string + p += strlen(wxString(m_str->begin(), m_iter).mb_str()); + } + //else: conversion failed, return "" as we can't do anything else + + return p; + } + + operator const wchar_t *() const + { + if ( !m_str ) + return NULL; + + // no complications with wide strings (as long as we discount + // surrogates as we do for now) + // + // just remember that this works as long as wxString keeps an internal + // buffer with its wide wide char representation, just as with AsChar() + // above + return m_str->c_str().AsWChar() + (m_iter - m_str->begin()); + } + + // Because the objects of this class are only used as return type for + // functions which can return NULL we can skip providing dereferencing + // operators: the code using this class must test it for NULL first and if + // it does anything else with it it has to assign it to either char* or + // wchar_t* itself, before dereferencing. + // + // IOW this + // + // if ( *FuncReturningAnyStrPtr() ) + // + // is invalid because it could crash. And this + // + // const char *p = FuncReturningAnyStrPtr(); + // if ( p && *p ) + // + // already works fine. + +private: + // the original string and the position in it we correspond to, if the + // string is NULL this object is NULL pointer-like + const wxString * const m_str; + const wxString::const_iterator m_iter; + + wxDECLARE_NO_ASSIGN_CLASS(wxAnyStrPtr); +}; + +#endif // _WX_ANYSTR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/app.h new file mode 100644 index 0000000000..60e02b35cc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/app.h @@ -0,0 +1,889 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/app.h +// Purpose: wxAppBase class and macros used for declaration of wxApp +// derived class in the user code +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_APP_H_BASE_ +#define _WX_APP_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers we have to include here +// ---------------------------------------------------------------------------- + +#include "wx/event.h" // for the base class +#include "wx/eventfilter.h" // (and another one) +#include "wx/build.h" +#include "wx/cmdargs.h" // for wxCmdLineArgsArray used by wxApp::argv +#include "wx/init.h" // we must declare wxEntry() +#include "wx/intl.h" // for wxLayoutDirection +#include "wx/log.h" // for wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD() + +class WXDLLIMPEXP_FWD_BASE wxAppConsole; +class WXDLLIMPEXP_FWD_BASE wxAppTraits; +class WXDLLIMPEXP_FWD_BASE wxCmdLineParser; +class WXDLLIMPEXP_FWD_BASE wxEventLoopBase; +class WXDLLIMPEXP_FWD_BASE wxMessageOutput; + +#if wxUSE_GUI + struct WXDLLIMPEXP_FWD_CORE wxVideoMode; + class WXDLLIMPEXP_FWD_CORE wxWindow; +#endif + +// this macro should be used in any main() or equivalent functions defined in wx +#define wxDISABLE_DEBUG_SUPPORT() \ + wxDISABLE_ASSERTS_IN_RELEASE_BUILD(); \ + wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD() + +// ---------------------------------------------------------------------------- +// typedefs +// ---------------------------------------------------------------------------- + +// the type of the function used to create a wxApp object on program start up +typedef wxAppConsole* (*wxAppInitializerFunction)(); + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +enum +{ + wxPRINT_WINDOWS = 1, + wxPRINT_POSTSCRIPT = 2 +}; + +// ---------------------------------------------------------------------------- +// global variables +// ---------------------------------------------------------------------------- + +// use of this list is strongly deprecated, use wxApp ScheduleForDestruction() +// and IsScheduledForDestruction() methods instead of this list directly, it +// is here for compatibility purposes only +extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete; + +// ---------------------------------------------------------------------------- +// wxAppConsoleBase: wxApp for non-GUI applications +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxAppConsoleBase : public wxEvtHandler, + public wxEventFilter +{ +public: + // ctor and dtor + wxAppConsoleBase(); + virtual ~wxAppConsoleBase(); + + + // the virtual functions which may/must be overridden in the derived class + // ----------------------------------------------------------------------- + + // This is the very first function called for a newly created wxApp object, + // it is used by the library to do the global initialization. If, for some + // reason, you must override it (instead of just overriding OnInit(), as + // usual, for app-specific initializations), do not forget to call the base + // class version! + virtual bool Initialize(int& argc, wxChar **argv); + + // This gives wxCocoa a chance to call OnInit() with a memory pool in place + virtual bool CallOnInit() { return OnInit(); } + + // Called before OnRun(), this is a good place to do initialization -- if + // anything fails, return false from here to prevent the program from + // continuing. The command line is normally parsed here, call the base + // class OnInit() to do it. + virtual bool OnInit(); + + // This is the replacement for the normal main(): all program work should + // be done here. When OnRun() returns, the programs starts shutting down. + virtual int OnRun(); + + // Called before the first events are handled, called from within MainLoop() + virtual void OnLaunched(); + + // This is called by wxEventLoopBase::SetActive(): you should put the code + // which needs an active event loop here. + // Note that this function is called whenever an event loop is activated; + // you may want to use wxEventLoopBase::IsMain() to perform initialization + // specific for the app's main event loop. + virtual void OnEventLoopEnter(wxEventLoopBase* WXUNUSED(loop)) {} + + // This is only called if OnInit() returned true so it's a good place to do + // any cleanup matching the initializations done there. + virtual int OnExit(); + + // This is called by wxEventLoopBase::OnExit() for each event loop which + // is exited. + virtual void OnEventLoopExit(wxEventLoopBase* WXUNUSED(loop)) {} + + // This is the very last function called on wxApp object before it is + // destroyed. If you override it (instead of overriding OnExit() as usual) + // do not forget to call the base class version! + virtual void CleanUp(); + + // Called when a fatal exception occurs, this function should take care not + // to do anything which might provoke a nested exception! It may be + // overridden if you wish to react somehow in non-default way (core dump + // under Unix, application crash under Windows) to fatal program errors, + // however extreme care should be taken if you don't want this function to + // crash. + virtual void OnFatalException() { } + + // Called from wxExit() function, should terminate the application a.s.a.p. + virtual void Exit(); + + + // application info: name, description, vendor + // ------------------------------------------- + + // NB: all these should be set by the application itself, there are no + // reasonable default except for the application name which is taken to + // be argv[0] + + // set/get the application name + wxString GetAppName() const; + void SetAppName(const wxString& name) { m_appName = name; } + + // set/get the application display name: the display name is the name + // shown to the user in titles, reports, etc while the app name is + // used for paths, config, and other places the user doesn't see + // + // by default the display name is the same as app name or a capitalized + // version of the program if app name was not set neither but it's + // usually better to set it explicitly to something nicer + wxString GetAppDisplayName() const; + + void SetAppDisplayName(const wxString& name) { m_appDisplayName = name; } + + // set/get the app class name + wxString GetClassName() const { return m_className; } + void SetClassName(const wxString& name) { m_className = name; } + + // set/get the vendor name + const wxString& GetVendorName() const { return m_vendorName; } + void SetVendorName(const wxString& name) { m_vendorName = name; } + + // set/get the vendor display name: the display name is shown + // in titles/reports/dialogs to the user, while the vendor name + // is used in some areas such as wxConfig, wxStandardPaths, etc + const wxString& GetVendorDisplayName() const + { + return m_vendorDisplayName.empty() ? GetVendorName() + : m_vendorDisplayName; + } + void SetVendorDisplayName(const wxString& name) + { + m_vendorDisplayName = name; + } + + + // cmd line parsing stuff + // ---------------------- + + // all of these methods may be overridden in the derived class to + // customize the command line parsing (by default only a few standard + // options are handled) + // + // you also need to call wxApp::OnInit() from YourApp::OnInit() for all + // this to work + +#if wxUSE_CMDLINE_PARSER + // this one is called from OnInit() to add all supported options + // to the given parser (don't forget to call the base class version if you + // override it!) + virtual void OnInitCmdLine(wxCmdLineParser& parser); + + // called after successfully parsing the command line, return true + // to continue and false to exit (don't forget to call the base class + // version if you override it!) + virtual bool OnCmdLineParsed(wxCmdLineParser& parser); + + // called if "--help" option was specified, return true to continue + // and false to exit + virtual bool OnCmdLineHelp(wxCmdLineParser& parser); + + // called if incorrect command line options were given, return + // false to abort and true to continue + virtual bool OnCmdLineError(wxCmdLineParser& parser); +#endif // wxUSE_CMDLINE_PARSER + + + // miscellaneous customization functions + // ------------------------------------- + + // create the app traits object to which we delegate for everything which + // either should be configurable by the user (then he can change the + // default behaviour simply by overriding CreateTraits() and returning his + // own traits object) or which is GUI/console dependent as then wxAppTraits + // allows us to abstract the differences behind the common facade + wxAppTraits *GetTraits(); + + // this function provides safer access to traits object than + // wxTheApp->GetTraits() during startup or termination when the global + // application object itself may be unavailable + // + // of course, it still returns NULL in this case and the caller must check + // for it + static wxAppTraits *GetTraitsIfExists(); + + // Return some valid traits object. + // + // This method checks if we have wxTheApp and returns its traits if it does + // exist and the traits are non-NULL, similarly to GetTraitsIfExists(), but + // falls back to wxConsoleAppTraits to ensure that it always returns + // something valid. + static wxAppTraits& GetValidTraits(); + + // returns the main event loop instance, i.e. the event loop which is started + // by OnRun() and which dispatches all events sent from the native toolkit + // to the application (except when new event loops are temporarily set-up). + // The returned value maybe NULL. Put initialization code which needs a + // non-NULL main event loop into OnEventLoopEnter(). + wxEventLoopBase* GetMainLoop() const + { return m_mainLoop; } + + // This function sets the C locale to the default locale for the current + // environment. It is advised to call this to ensure that the underlying + // toolkit uses the locale in which the numbers and monetary amounts are + // shown in the format expected by user and so on. + // + // Notice that this does _not_ change the global C++ locale, you need to do + // it explicitly if you want. + // + // Finally, notice that while this function is virtual, it is not supposed + // to be overridden outside of the library itself. + virtual void SetCLocale(); + + + // event processing functions + // -------------------------- + + // Implement the inherited wxEventFilter method but just return -1 from it + // to indicate that default processing should take place. + virtual int FilterEvent(wxEvent& event); + + // return true if we're running event loop, i.e. if the events can + // (already) be dispatched + static bool IsMainLoopRunning(); + +#if wxUSE_EXCEPTIONS + // execute the functor to handle the given event + // + // this is a generalization of HandleEvent() below and the base class + // implementation of CallEventHandler() still calls HandleEvent() for + // compatibility for functors which are just wxEventFunctions (i.e. methods + // of wxEvtHandler) + virtual void CallEventHandler(wxEvtHandler *handler, + wxEventFunctor& functor, + wxEvent& event) const; + + // call the specified handler on the given object with the given event + // + // this method only exists to allow catching the exceptions thrown by any + // event handler, it would lead to an extra (useless) virtual function call + // if the exceptions were not used, so it doesn't even exist in that case + virtual void HandleEvent(wxEvtHandler *handler, + wxEventFunction func, + wxEvent& event) const; + + // Called when an unhandled C++ exception occurs inside OnRun(): note that + // the main event loop has already terminated by now and the program will + // exit, if you need to really handle the exceptions you need to override + // OnExceptionInMainLoop() + virtual void OnUnhandledException(); + + // Function called if an uncaught exception is caught inside the main + // event loop: it may return true to continue running the event loop or + // false to stop it (in the latter case it may rethrow the exception as + // well) + virtual bool OnExceptionInMainLoop(); + +#endif // wxUSE_EXCEPTIONS + + + // pending events + // -------------- + + // IMPORTANT: all these methods conceptually belong to wxEventLoopBase + // but for many reasons we need to allow queuing of events + // even when there's no event loop (e.g. in wxApp::OnInit); + // this feature is used e.g. to queue events on secondary threads + // or in wxPython to use wx.CallAfter before the GUI is initialized + + // process all events in the m_handlersWithPendingEvents list -- it is necessary + // to call this function to process posted events. This happens during each + // event loop iteration in GUI mode but if there is no main loop, it may be + // also called directly. + virtual void ProcessPendingEvents(); + + // check if there are pending events on global pending event list + bool HasPendingEvents() const; + + // temporary suspends processing of the pending events + void SuspendProcessingOfPendingEvents(); + + // resume processing of the pending events previously stopped because of a + // call to SuspendProcessingOfPendingEvents() + void ResumeProcessingOfPendingEvents(); + + // called by ~wxEvtHandler to (eventually) remove the handler from the list of + // the handlers with pending events + void RemovePendingEventHandler(wxEvtHandler* toRemove); + + // adds an event handler to the list of the handlers with pending events + void AppendPendingEventHandler(wxEvtHandler* toAppend); + + // moves the event handler from the list of the handlers with pending events + //to the list of the handlers with _delayed_ pending events + void DelayPendingEventHandler(wxEvtHandler* toDelay); + + // deletes the current pending events + void DeletePendingEvents(); + + + // delayed destruction + // ------------------- + + // If an object may have pending events for it, it shouldn't be deleted + // immediately as this would result in a crash when trying to handle these + // events: instead, it should be scheduled for destruction and really + // destroyed only after processing all pending events. + // + // Notice that this is only possible if we have a running event loop, + // otherwise the object is just deleted directly by ScheduleForDestruction() + // and IsScheduledForDestruction() always returns false. + + // schedule the object for destruction in the near future + void ScheduleForDestruction(wxObject *object); + + // return true if the object is scheduled for destruction + bool IsScheduledForDestruction(wxObject *object) const; + + + // wxEventLoop-related methods + // --------------------------- + + // all these functions are forwarded to the corresponding methods of the + // currently active event loop -- and do nothing if there is none + virtual bool Pending(); + virtual bool Dispatch(); + + virtual int MainLoop(); + virtual void ExitMainLoop(); + + bool Yield(bool onlyIfNeeded = false); + + virtual void WakeUpIdle(); + + // this method is called by the active event loop when there are no events + // to process + // + // by default it generates the idle events and if you override it in your + // derived class you should call the base class version to ensure that idle + // events are still sent out + virtual bool ProcessIdle(); + + // this virtual function is overridden in GUI wxApp to always return true + // as GUI applications always have an event loop -- but console ones may + // have it or not, so it simply returns true if already have an event loop + // running but false otherwise + virtual bool UsesEventLoop() const; + + + // debugging support + // ----------------- + + // this function is called when an assert failure occurs, the base class + // version does the normal processing (i.e. shows the usual assert failure + // dialog box) + // + // the arguments are the location of the failed assert (func may be empty + // if the compiler doesn't support C99 __FUNCTION__), the text of the + // assert itself and the user-specified message + virtual void OnAssertFailure(const wxChar *file, + int line, + const wxChar *func, + const wxChar *cond, + const wxChar *msg); + + // old version of the function without func parameter, for compatibility + // only, override OnAssertFailure() in the new code + virtual void OnAssert(const wxChar *file, + int line, + const wxChar *cond, + const wxChar *msg); + + // check that the wxBuildOptions object (constructed in the application + // itself, usually the one from wxIMPLEMENT_APP() macro) matches the build + // options of the library and abort if it doesn't + static bool CheckBuildOptions(const char *optionsSignature, + const char *componentName); + + // implementation only from now on + // ------------------------------- + + // helpers for dynamic wxApp construction + static void SetInitializerFunction(wxAppInitializerFunction fn) + { ms_appInitFn = fn; } + static wxAppInitializerFunction GetInitializerFunction() + { return ms_appInitFn; } + + // accessors for ms_appInstance field (external code might wish to modify + // it, this is why we provide a setter here as well, but you should really + // know what you're doing if you call it), wxTheApp is usually used instead + // of GetInstance() + static wxAppConsole *GetInstance() { return ms_appInstance; } + static void SetInstance(wxAppConsole *app) { ms_appInstance = app; } + + + // command line arguments (public for backwards compatibility) + int argc; + + // this object is implicitly convertible to either "char**" (traditional + // type of argv parameter of main()) or to "wchar_t **" (for compatibility + // with Unicode build in previous wx versions and because the command line + // can, in pr +#if wxUSE_UNICODE + wxCmdLineArgsArray argv; +#else + char **argv; +#endif + +protected: + // delete all objects in wxPendingDelete list + // + // called from ProcessPendingEvents() + void DeletePendingObjects(); + + // the function which creates the traits object when GetTraits() needs it + // for the first time + virtual wxAppTraits *CreateTraits(); + + // function used for dynamic wxApp creation + static wxAppInitializerFunction ms_appInitFn; + + // the one and only global application object + static wxAppConsole *ms_appInstance; + + // create main loop from AppTraits or return NULL if + // there is no main loop implementation + wxEventLoopBase *CreateMainLoop(); + + // application info (must be set from the user code) + wxString m_vendorName, // vendor name ("acme") + m_vendorDisplayName, // vendor display name (e.g. "ACME Inc") + m_appName, // app name ("myapp") + m_appDisplayName, // app display name ("My Application") + m_className; // class name + + // the class defining the application behaviour, NULL initially and created + // by GetTraits() when first needed + wxAppTraits *m_traits; + + // the main event loop of the application (may be NULL if the loop hasn't + // been started yet or has already terminated) + wxEventLoopBase *m_mainLoop; + + + // pending events management vars: + + // the array of the handlers with pending events which needs to be processed + // inside ProcessPendingEvents() + wxEvtHandlerArray m_handlersWithPendingEvents; + + // helper array used by ProcessPendingEvents() to store the event handlers + // which have pending events but of these events none can be processed right now + // (because of a call to wxEventLoop::YieldFor() which asked to selectively process + // pending events) + wxEvtHandlerArray m_handlersWithPendingDelayedEvents; + +#if wxUSE_THREADS + // this critical section protects both the lists above + wxCriticalSection m_handlersWithPendingEventsLocker; +#endif + + // flag modified by Suspend/ResumeProcessingOfPendingEvents() + bool m_bDoPendingEventProcessing; + + friend class WXDLLIMPEXP_FWD_BASE wxEvtHandler; + + // the application object is a singleton anyhow, there is no sense in + // copying it + wxDECLARE_NO_COPY_CLASS(wxAppConsoleBase); +}; + +#if defined(__UNIX__) && !defined(__WXMSW__) + #include "wx/unix/app.h" +#else + // this has to be a class and not a typedef as we forward declare it + class wxAppConsole : public wxAppConsoleBase { }; +#endif + +// ---------------------------------------------------------------------------- +// wxAppBase: the common part of wxApp implementations for all platforms +// ---------------------------------------------------------------------------- + +#if wxUSE_GUI + +class WXDLLIMPEXP_CORE wxAppBase : public wxAppConsole +{ +public: + wxAppBase(); + virtual ~wxAppBase(); + + // the virtual functions which may/must be overridden in the derived class + // ----------------------------------------------------------------------- + + // very first initialization function + // + // Override: very rarely + virtual bool Initialize(int& argc, wxChar **argv); + + // a platform-dependent version of OnInit(): the code here is likely to + // depend on the toolkit. default version does nothing. + // + // Override: rarely. + virtual bool OnInitGui(); + + // called to start program execution - the default version just enters + // the main GUI loop in which events are received and processed until + // the last window is not deleted (if GetExitOnFrameDelete) or + // ExitMainLoop() is called. In console mode programs, the execution + // of the program really starts here + // + // Override: rarely in GUI applications, always in console ones. + virtual int OnRun(); + + // a matching function for OnInit() + virtual int OnExit(); + + // very last clean up function + // + // Override: very rarely + virtual void CleanUp(); + + + // the worker functions - usually not used directly by the user code + // ----------------------------------------------------------------- + + // safer alternatives to Yield(), using wxWindowDisabler + virtual bool SafeYield(wxWindow *win, bool onlyIfNeeded); + virtual bool SafeYieldFor(wxWindow *win, long eventsToProcess); + + // this virtual function is called in the GUI mode when the application + // becomes idle and normally just sends wxIdleEvent to all interested + // parties + // + // it should return true if more idle events are needed, false if not + virtual bool ProcessIdle(); + + // override base class version: GUI apps always use an event loop + virtual bool UsesEventLoop() const { return true; } + + + // top level window functions + // -------------------------- + + // return true if our app has focus + virtual bool IsActive() const { return m_isActive; } + + // set the "main" top level window + void SetTopWindow(wxWindow *win) { m_topWindow = win; } + + // return the "main" top level window (if it hadn't been set previously + // with SetTopWindow(), will return just some top level window and, if + // there are none, will return NULL) + virtual wxWindow *GetTopWindow() const; + + // control the exit behaviour: by default, the program will exit the + // main loop (and so, usually, terminate) when the last top-level + // program window is deleted. Beware that if you disable this behaviour + // (with SetExitOnFrameDelete(false)), you'll have to call + // ExitMainLoop() explicitly from somewhere. + void SetExitOnFrameDelete(bool flag) + { m_exitOnFrameDelete = flag ? Yes : No; } + bool GetExitOnFrameDelete() const + { return m_exitOnFrameDelete == Yes; } + + + // display mode, visual, printing mode, ... + // ------------------------------------------------------------------------ + + // Get display mode that is used use. This is only used in framebuffer + // wxWin ports such as wxDFB. + virtual wxVideoMode GetDisplayMode() const; + // Set display mode to use. This is only used in framebuffer wxWin + // ports such as wxDFB. This method should be called from + // wxApp::OnInitGui + virtual bool SetDisplayMode(const wxVideoMode& WXUNUSED(info)) { return true; } + + // set use of best visual flag (see below) + void SetUseBestVisual( bool flag, bool forceTrueColour = false ) + { m_useBestVisual = flag; m_forceTrueColour = forceTrueColour; } + bool GetUseBestVisual() const { return m_useBestVisual; } + + // set/get printing mode: see wxPRINT_XXX constants. + // + // default behaviour is the normal one for Unix: always use PostScript + // printing. + virtual void SetPrintMode(int WXUNUSED(mode)) { } + int GetPrintMode() const { return wxPRINT_POSTSCRIPT; } + + // Return the layout direction for the current locale or wxLayout_Default + // if it's unknown + virtual wxLayoutDirection GetLayoutDirection() const; + + // Change the theme used by the application, return true on success. + virtual bool SetNativeTheme(const wxString& WXUNUSED(theme)) { return false; } + + + // command line parsing (GUI-specific) + // ------------------------------------------------------------------------ + +#if wxUSE_CMDLINE_PARSER + virtual bool OnCmdLineParsed(wxCmdLineParser& parser); + virtual void OnInitCmdLine(wxCmdLineParser& parser); +#endif + + // miscellaneous other stuff + // ------------------------------------------------------------------------ + + // called by toolkit-specific code to set the app status: active (we have + // focus) or not and also the last window which had focus before we were + // deactivated + virtual void SetActive(bool isActive, wxWindow *lastFocus); + +#if WXWIN_COMPATIBILITY_2_6 + // returns true if the program is successfully initialized + wxDEPRECATED_MSG("always returns true now, don't call") + bool Initialized(); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + // override base class method to use GUI traits + virtual wxAppTraits *CreateTraits(); + + + // the main top level window (may be NULL) + wxWindow *m_topWindow; + + // if Yes, exit the main loop when the last top level window is deleted, if + // No don't do it and if Later -- only do it once we reach our OnRun() + // + // the explanation for using this strange scheme is given in appcmn.cpp + enum + { + Later = -1, + No, + Yes + } m_exitOnFrameDelete; + + // true if the app wants to use the best visual on systems where + // more than one are available (Sun, SGI, XFree86 4.0 ?) + bool m_useBestVisual; + // force TrueColour just in case "best" isn't TrueColour + bool m_forceTrueColour; + + // does any of our windows have focus? + bool m_isActive; + + wxDECLARE_NO_COPY_CLASS(wxAppBase); +}; + +#if WXWIN_COMPATIBILITY_2_6 + inline bool wxAppBase::Initialized() { return true; } +#endif // WXWIN_COMPATIBILITY_2_6 + +// ---------------------------------------------------------------------------- +// now include the declaration of the real class +// ---------------------------------------------------------------------------- + +#if defined(__WXMSW__) + #include "wx/msw/app.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/app.h" +#elif defined(__WXDFB__) + #include "wx/dfb/app.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/app.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/app.h" +#elif defined(__WXX11__) + #include "wx/x11/app.h" +#elif defined(__WXMAC__) + #include "wx/osx/app.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/app.h" +#elif defined(__WXPM__) + #include "wx/os2/app.h" +#endif + +#else // !GUI + +// wxApp is defined in core and we cannot define another one in wxBase, +// so use the preprocessor to allow using wxApp in console programs too +#define wxApp wxAppConsole + +#endif // GUI/!GUI + +// ---------------------------------------------------------------------------- +// the global data +// ---------------------------------------------------------------------------- + +// for compatibility, we define this macro to access the global application +// object of type wxApp +// +// note that instead of using of wxTheApp in application code you should +// consider using wxDECLARE_APP() after which you may call wxGetApp() which will +// return the object of the correct type (i.e. MyApp and not wxApp) +// +// the cast is safe as in GUI build we only use wxApp, not wxAppConsole, and in +// console mode it does nothing at all +#define wxTheApp static_cast(wxApp::GetInstance()) + +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +// event loop related functions only work in GUI programs +// ------------------------------------------------------ + +// Force an exit from main loop +WXDLLIMPEXP_BASE void wxExit(); + +// avoid redeclaring this function here if it had been already declared by +// wx/utils.h, this results in warnings from g++ with -Wredundant-decls +#ifndef wx_YIELD_DECLARED +#define wx_YIELD_DECLARED + +// Yield to other apps/messages +WXDLLIMPEXP_CORE bool wxYield(); + +#endif // wx_YIELD_DECLARED + +// Yield to other apps/messages +WXDLLIMPEXP_BASE void wxWakeUpIdle(); + +// ---------------------------------------------------------------------------- +// macros for dynamic creation of the application object +// ---------------------------------------------------------------------------- + +// Having a global instance of this class allows wxApp to be aware of the app +// creator function. wxApp can then call this function to create a new app +// object. Convoluted, but necessary. + +class WXDLLIMPEXP_BASE wxAppInitializer +{ +public: + wxAppInitializer(wxAppInitializerFunction fn) + { wxApp::SetInitializerFunction(fn); } +}; + +// the code below defines a wxIMPLEMENT_WXWIN_MAIN macro which you can use if +// your compiler really, really wants main() to be in your main program (e.g. +// hello.cpp). Now wxIMPLEMENT_APP should add this code if required. + +// For compilers that support it, prefer to use wmain() as this ensures any +// Unicode strings can be passed as command line parameters and not just those +// representable in the current locale. +#if wxUSE_UNICODE && defined(__VISUALC__) + #define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \ + int wmain(int argc, wchar_t **argv) \ + { \ + wxDISABLE_DEBUG_SUPPORT(); \ + \ + return wxEntry(argc, argv); \ + } +#else // Use standard main() + #define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \ + int main(int argc, char **argv) \ + { \ + wxDISABLE_DEBUG_SUPPORT(); \ + \ + return wxEntry(argc, argv); \ + } +#endif + +// port-specific header could have defined it already in some special way +#ifndef wxIMPLEMENT_WXWIN_MAIN + #define wxIMPLEMENT_WXWIN_MAIN wxIMPLEMENT_WXWIN_MAIN_CONSOLE +#endif // defined(wxIMPLEMENT_WXWIN_MAIN) + +#ifdef __WXUNIVERSAL__ + #include "wx/univ/theme.h" + + #ifdef wxUNIV_DEFAULT_THEME + #define wxIMPLEMENT_WX_THEME_SUPPORT \ + WX_USE_THEME(wxUNIV_DEFAULT_THEME); + #else + #define wxIMPLEMENT_WX_THEME_SUPPORT + #endif +#else + #define wxIMPLEMENT_WX_THEME_SUPPORT +#endif + +// Use this macro if you want to define your own main() or WinMain() function +// and call wxEntry() from there. +#define wxIMPLEMENT_APP_NO_MAIN(appname) \ + appname& wxGetApp() { return *static_cast(wxApp::GetInstance()); } \ + wxAppConsole *wxCreateApp() \ + { \ + wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \ + "your program"); \ + return new appname; \ + } \ + wxAppInitializer \ + wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp) + +// Same as wxIMPLEMENT_APP() normally but doesn't include themes support in +// wxUniversal builds +#define wxIMPLEMENT_APP_NO_THEMES(appname) \ + wxIMPLEMENT_WXWIN_MAIN \ + wxIMPLEMENT_APP_NO_MAIN(appname) + +// Use this macro exactly once, the argument is the name of the wxApp-derived +// class which is the class of your application. +#define wxIMPLEMENT_APP(appname) \ + wxIMPLEMENT_WX_THEME_SUPPORT \ + wxIMPLEMENT_APP_NO_THEMES(appname) + +// Same as IMPLEMENT_APP(), but for console applications. +#define wxIMPLEMENT_APP_CONSOLE(appname) \ + wxIMPLEMENT_WXWIN_MAIN_CONSOLE \ + wxIMPLEMENT_APP_NO_MAIN(appname) + +// this macro can be used multiple times and just allows you to use wxGetApp() +// function +#define wxDECLARE_APP(appname) \ + extern appname& wxGetApp() + + +// declare the stuff defined by wxIMPLEMENT_APP() macro, it's not really needed +// anywhere else but at the very least it suppresses icc warnings about +// defining extern symbols without prior declaration, and it shouldn't do any +// harm +extern wxAppConsole *wxCreateApp(); +extern wxAppInitializer wxTheAppInitializer; + +// ---------------------------------------------------------------------------- +// Compatibility macro aliases +// ---------------------------------------------------------------------------- + +// deprecated variants _not_ requiring a semicolon after them +// (note that also some wx-prefixed macro do _not_ require a semicolon because +// it's not always possible to force the compire to require it) + +#define IMPLEMENT_WXWIN_MAIN_CONSOLE wxIMPLEMENT_WXWIN_MAIN_CONSOLE +#define IMPLEMENT_WXWIN_MAIN wxIMPLEMENT_WXWIN_MAIN +#define IMPLEMENT_WX_THEME_SUPPORT wxIMPLEMENT_WX_THEME_SUPPORT +#define IMPLEMENT_APP_NO_MAIN(app) wxIMPLEMENT_APP_NO_MAIN(app); +#define IMPLEMENT_APP_NO_THEMES(app) wxIMPLEMENT_APP_NO_THEMES(app); +#define IMPLEMENT_APP(app) wxIMPLEMENT_APP(app); +#define IMPLEMENT_APP_CONSOLE(app) wxIMPLEMENT_APP_CONSOLE(app); +#define DECLARE_APP(app) wxDECLARE_APP(app); + +#endif // _WX_APP_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/apptrait.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/apptrait.h new file mode 100644 index 0000000000..da1b39b1d3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/apptrait.h @@ -0,0 +1,288 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/apptrait.h +// Purpose: declaration of wxAppTraits and derived classes +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.06.2003 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_APPTRAIT_H_ +#define _WX_APPTRAIT_H_ + +#include "wx/string.h" +#include "wx/platinfo.h" + +class WXDLLIMPEXP_FWD_BASE wxArrayString; +class WXDLLIMPEXP_FWD_BASE wxConfigBase; +class WXDLLIMPEXP_FWD_BASE wxEventLoopBase; +#if wxUSE_FONTMAP + class WXDLLIMPEXP_FWD_CORE wxFontMapper; +#endif // wxUSE_FONTMAP +class WXDLLIMPEXP_FWD_BASE wxLog; +class WXDLLIMPEXP_FWD_BASE wxMessageOutput; +class WXDLLIMPEXP_FWD_BASE wxObject; +class WXDLLIMPEXP_FWD_CORE wxRendererNative; +class WXDLLIMPEXP_FWD_BASE wxStandardPaths; +class WXDLLIMPEXP_FWD_BASE wxString; +class WXDLLIMPEXP_FWD_BASE wxTimer; +class WXDLLIMPEXP_FWD_BASE wxTimerImpl; + +class wxSocketManager; + + +// ---------------------------------------------------------------------------- +// wxAppTraits: this class defines various configurable aspects of wxApp +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxAppTraitsBase +{ +public: + // needed since this class declares virtual members + virtual ~wxAppTraitsBase() { } + + // hooks for working with the global objects, may be overridden by the user + // ------------------------------------------------------------------------ + +#if wxUSE_CONFIG + // create the default configuration object (base class version is + // implemented in config.cpp and creates wxRegConfig for wxMSW and + // wxFileConfig for all the other platforms) + virtual wxConfigBase *CreateConfig(); +#endif // wxUSE_CONFIG + +#if wxUSE_LOG + // create the default log target + virtual wxLog *CreateLogTarget() = 0; +#endif // wxUSE_LOG + + // create the global object used for printing out messages + virtual wxMessageOutput *CreateMessageOutput() = 0; + +#if wxUSE_FONTMAP + // create the global font mapper object used for encodings/charset mapping + virtual wxFontMapper *CreateFontMapper() = 0; +#endif // wxUSE_FONTMAP + + // get the renderer to use for drawing the generic controls (return value + // may be NULL in which case the default renderer for the current platform + // is used); this is used in GUI only and always returns NULL in console + // + // NB: returned pointer will be deleted by the caller + virtual wxRendererNative *CreateRenderer() = 0; + + // wxStandardPaths object is normally the same for wxBase and wxGUI + // except in the case of wxMac and wxCocoa + virtual wxStandardPaths& GetStandardPaths(); + + + // functions abstracting differences between GUI and console modes + // ------------------------------------------------------------------------ + + // show the assert dialog with the specified message in GUI or just print + // the string to stderr in console mode + // + // base class version has an implementation (in spite of being pure + // virtual) in base/appbase.cpp which can be called as last resort. + // + // return true to suppress subsequent asserts, false to continue as before + virtual bool ShowAssertDialog(const wxString& msg) = 0; + + // return true if fprintf(stderr) goes somewhere, false otherwise + virtual bool HasStderr() = 0; + +#if wxUSE_SOCKETS + // this function is used by wxNet library to set the default socket manager + // to use: doing it like this allows us to keep all socket-related code in + // wxNet instead of having to pull it in wxBase itself as we'd have to do + // if we really implemented wxSocketManager here + // + // we don't take ownership of this pointer, it should have a lifetime + // greater than that of any socket (e.g. be a pointer to a static object) + static void SetDefaultSocketManager(wxSocketManager *manager) + { + ms_manager = manager; + } + + // return socket manager: this is usually different for console and GUI + // applications (although some ports use the same implementation for both) + virtual wxSocketManager *GetSocketManager() { return ms_manager; } +#endif + + // create a new, port specific, instance of the event loop used by wxApp + virtual wxEventLoopBase *CreateEventLoop() = 0; + +#if wxUSE_TIMER + // return platform and toolkit dependent wxTimer implementation + virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer) = 0; +#endif + +#if wxUSE_THREADS + virtual void MutexGuiEnter(); + virtual void MutexGuiLeave(); +#endif + + // functions returning port-specific information + // ------------------------------------------------------------------------ + + // return information about the (native) toolkit currently used and its + // runtime (not compile-time) version. + // returns wxPORT_BASE for console applications and one of the remaining + // wxPORT_* values for GUI applications. + virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const = 0; + + // return true if the port is using wxUniversal for the GUI, false if not + virtual bool IsUsingUniversalWidgets() const = 0; + + // return the name of the Desktop Environment such as + // "KDE" or "GNOME". May return an empty string. + virtual wxString GetDesktopEnvironment() const = 0; + + // returns a short string to identify the block of the standard command + // line options parsed automatically by current port: if this string is + // empty, there are no such options, otherwise the function also fills + // passed arrays with the names and the descriptions of those options. + virtual wxString GetStandardCmdLineOptions(wxArrayString& names, + wxArrayString& desc) const + { + wxUnusedVar(names); + wxUnusedVar(desc); + + return wxEmptyString; + } + + +protected: +#if wxUSE_STACKWALKER + // utility function: returns the stack frame as a plain wxString + virtual wxString GetAssertStackTrace(); +#endif + +private: + static wxSocketManager *ms_manager; +}; + +// ---------------------------------------------------------------------------- +// include the platform-specific version of the class +// ---------------------------------------------------------------------------- + +// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the +// Unix code (and otherwise __UNIX__ wouldn't be defined) +// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port +#if defined(__WIN32__) + #include "wx/msw/apptbase.h" +#elif defined(__UNIX__) && !defined(__EMX__) + #include "wx/unix/apptbase.h" +#elif defined(__OS2__) + #include "wx/os2/apptbase.h" +#else // no platform-specific methods to add to wxAppTraits + // wxAppTraits must be a class because it was forward declared as class + class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase + { + }; +#endif // platform + +// ============================================================================ +// standard traits for console and GUI applications +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxConsoleAppTraitsBase: wxAppTraits implementation for the console apps +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxConsoleAppTraitsBase : public wxAppTraits +{ +public: +#if !wxUSE_CONSOLE_EVENTLOOP + virtual wxEventLoopBase *CreateEventLoop() { return NULL; } +#endif // !wxUSE_CONSOLE_EVENTLOOP + +#if wxUSE_LOG + virtual wxLog *CreateLogTarget(); +#endif // wxUSE_LOG + virtual wxMessageOutput *CreateMessageOutput(); +#if wxUSE_FONTMAP + virtual wxFontMapper *CreateFontMapper(); +#endif // wxUSE_FONTMAP + virtual wxRendererNative *CreateRenderer(); + + virtual bool ShowAssertDialog(const wxString& msg); + virtual bool HasStderr(); + + // the GetToolkitVersion for console application is always the same + virtual wxPortId GetToolkitVersion(int *verMaj = NULL, int *verMin = NULL) const + { + // no toolkits (wxBase is for console applications without GUI support) + // NB: zero means "no toolkit", -1 means "not initialized yet" + // so we must use zero here! + if (verMaj) *verMaj = 0; + if (verMin) *verMin = 0; + return wxPORT_BASE; + } + + virtual bool IsUsingUniversalWidgets() const { return false; } + virtual wxString GetDesktopEnvironment() const { return wxEmptyString; } +}; + +// ---------------------------------------------------------------------------- +// wxGUIAppTraitsBase: wxAppTraits implementation for the GUI apps +// ---------------------------------------------------------------------------- + +#if wxUSE_GUI + +class WXDLLIMPEXP_CORE wxGUIAppTraitsBase : public wxAppTraits +{ +public: +#if wxUSE_LOG + virtual wxLog *CreateLogTarget(); +#endif // wxUSE_LOG + virtual wxMessageOutput *CreateMessageOutput(); +#if wxUSE_FONTMAP + virtual wxFontMapper *CreateFontMapper(); +#endif // wxUSE_FONTMAP + virtual wxRendererNative *CreateRenderer(); + + virtual bool ShowAssertDialog(const wxString& msg); + virtual bool HasStderr(); + + virtual bool IsUsingUniversalWidgets() const + { + #ifdef __WXUNIVERSAL__ + return true; + #else + return false; + #endif + } + + virtual wxString GetDesktopEnvironment() const { return wxEmptyString; } +}; + +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// include the platform-specific version of the classes above +// ---------------------------------------------------------------------------- + +// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port +#if defined(__WIN32__) + #include "wx/msw/apptrait.h" +#elif defined(__OS2__) + #include "wx/os2/apptrait.h" +#elif defined(__UNIX__) + #include "wx/unix/apptrait.h" +#elif defined(__DOS__) + #include "wx/msdos/apptrait.h" +#else + #if wxUSE_GUI + class wxGUIAppTraits : public wxGUIAppTraitsBase + { + }; + #endif // wxUSE_GUI + class wxConsoleAppTraits: public wxConsoleAppTraitsBase + { + }; +#endif // platform + +#endif // _WX_APPTRAIT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/archive.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/archive.h new file mode 100644 index 0000000000..9f284668dd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/archive.h @@ -0,0 +1,382 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/archive.h +// Purpose: Streams for archive formats +// Author: Mike Wetherell +// Copyright: (c) 2004 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ARCHIVE_H__ +#define _WX_ARCHIVE_H__ + +#include "wx/defs.h" + +#if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS + +#include "wx/stream.h" +#include "wx/filename.h" + + +///////////////////////////////////////////////////////////////////////////// +// wxArchiveNotifier + +class WXDLLIMPEXP_BASE wxArchiveNotifier +{ +public: + virtual ~wxArchiveNotifier() { } + + virtual void OnEntryUpdated(class wxArchiveEntry& entry) = 0; +}; + + +///////////////////////////////////////////////////////////////////////////// +// wxArchiveEntry +// +// Holds an entry's meta data, such as filename and timestamp. + +class WXDLLIMPEXP_BASE wxArchiveEntry : public wxObject +{ +public: + virtual ~wxArchiveEntry() { } + + virtual wxDateTime GetDateTime() const = 0; + virtual wxFileOffset GetSize() const = 0; + virtual wxFileOffset GetOffset() const = 0; + virtual bool IsDir() const = 0; + virtual bool IsReadOnly() const = 0; + virtual wxString GetInternalName() const = 0; + virtual wxPathFormat GetInternalFormat() const = 0; + virtual wxString GetName(wxPathFormat format = wxPATH_NATIVE) const = 0; + + virtual void SetDateTime(const wxDateTime& dt) = 0; + virtual void SetSize(wxFileOffset size) = 0; + virtual void SetIsDir(bool isDir = true) = 0; + virtual void SetIsReadOnly(bool isReadOnly = true) = 0; + virtual void SetName(const wxString& name, + wxPathFormat format = wxPATH_NATIVE) = 0; + + wxArchiveEntry *Clone() const { return DoClone(); } + + void SetNotifier(wxArchiveNotifier& notifier); + virtual void UnsetNotifier() { m_notifier = NULL; } + +protected: + wxArchiveEntry() : m_notifier(NULL) { } + wxArchiveEntry(const wxArchiveEntry& e) : wxObject(e), m_notifier(NULL) { } + + virtual void SetOffset(wxFileOffset offset) = 0; + virtual wxArchiveEntry* DoClone() const = 0; + + wxArchiveNotifier *GetNotifier() const { return m_notifier; } + wxArchiveEntry& operator=(const wxArchiveEntry& entry); + +private: + wxArchiveNotifier *m_notifier; + + DECLARE_ABSTRACT_CLASS(wxArchiveEntry) +}; + + +///////////////////////////////////////////////////////////////////////////// +// wxArchiveInputStream +// +// GetNextEntry() returns an wxArchiveEntry object containing the meta-data +// for the next entry in the archive (and gives away ownership). Reading from +// the wxArchiveInputStream then returns the entry's data. Eof() becomes true +// after an attempt has been made to read past the end of the entry's data. +// +// When there are no more entries, GetNextEntry() returns NULL and sets Eof(). + +class WXDLLIMPEXP_BASE wxArchiveInputStream : public wxFilterInputStream +{ +public: + typedef wxArchiveEntry entry_type; + + virtual ~wxArchiveInputStream() { } + + virtual bool OpenEntry(wxArchiveEntry& entry) = 0; + virtual bool CloseEntry() = 0; + + wxArchiveEntry *GetNextEntry() { return DoGetNextEntry(); } + + virtual char Peek() { return wxInputStream::Peek(); } + +protected: + wxArchiveInputStream(wxInputStream& stream, wxMBConv& conv); + wxArchiveInputStream(wxInputStream *stream, wxMBConv& conv); + + virtual wxArchiveEntry *DoGetNextEntry() = 0; + + wxMBConv& GetConv() const { return m_conv; } + +private: + wxMBConv& m_conv; +}; + + +///////////////////////////////////////////////////////////////////////////// +// wxArchiveOutputStream +// +// PutNextEntry is used to create a new entry in the output archive, then +// the entry's data is written to the wxArchiveOutputStream. +// +// Only one entry can be open for output at a time; another call to +// PutNextEntry closes the current entry and begins the next. +// +// The overload 'bool PutNextEntry(wxArchiveEntry *entry)' takes ownership +// of the entry object. + +class WXDLLIMPEXP_BASE wxArchiveOutputStream : public wxFilterOutputStream +{ +public: + virtual ~wxArchiveOutputStream() { } + + virtual bool PutNextEntry(wxArchiveEntry *entry) = 0; + + virtual bool PutNextEntry(const wxString& name, + const wxDateTime& dt = wxDateTime::Now(), + wxFileOffset size = wxInvalidOffset) = 0; + + virtual bool PutNextDirEntry(const wxString& name, + const wxDateTime& dt = wxDateTime::Now()) = 0; + + virtual bool CopyEntry(wxArchiveEntry *entry, + wxArchiveInputStream& stream) = 0; + + virtual bool CopyArchiveMetaData(wxArchiveInputStream& stream) = 0; + + virtual bool CloseEntry() = 0; + +protected: + wxArchiveOutputStream(wxOutputStream& stream, wxMBConv& conv); + wxArchiveOutputStream(wxOutputStream *stream, wxMBConv& conv); + + wxMBConv& GetConv() const { return m_conv; } + +private: + wxMBConv& m_conv; +}; + + +///////////////////////////////////////////////////////////////////////////// +// wxArchiveIterator +// +// An input iterator that can be used to transfer an archive's catalog to +// a container. + +#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR +#include +#include + +template inline +void _wxSetArchiveIteratorValue( + X& val, Y entry, void *WXUNUSED(d)) +{ + val = X(entry); +} +template inline +void _wxSetArchiveIteratorValue( + std::pair& val, Z entry, Z WXUNUSED(d)) +{ + val = std::make_pair(X(entry->GetInternalName()), Y(entry)); +} + +#if defined _MSC_VER && _MSC_VER < 1300 +template +#else +template +#endif +class wxArchiveIterator +{ +public: + typedef std::input_iterator_tag iterator_category; + typedef T value_type; + typedef ptrdiff_t difference_type; + typedef T* pointer; + typedef T& reference; + + wxArchiveIterator() : m_rep(NULL) { } + + wxArchiveIterator(Arc& arc) { + typename Arc::entry_type* entry = arc.GetNextEntry(); + m_rep = entry ? new Rep(arc, entry) : NULL; + } + + wxArchiveIterator(const wxArchiveIterator& it) : m_rep(it.m_rep) { + if (m_rep) + m_rep->AddRef(); + } + + ~wxArchiveIterator() { + if (m_rep) + m_rep->UnRef(); + } + + const T& operator *() const { + return m_rep->GetValue(); + } + + const T* operator ->() const { + return &**this; + } + + wxArchiveIterator& operator =(const wxArchiveIterator& it) { + if (it.m_rep) + it.m_rep.AddRef(); + if (m_rep) + this->m_rep.UnRef(); + m_rep = it.m_rep; + return *this; + } + + wxArchiveIterator& operator ++() { + m_rep = m_rep->Next(); + return *this; + } + + wxArchiveIterator operator ++(int) { + wxArchiveIterator it(*this); + ++(*this); + return it; + } + + bool operator ==(const wxArchiveIterator& j) const { + return m_rep == j.m_rep; + } + + bool operator !=(const wxArchiveIterator& j) const { + return !(*this == j); + } + +private: + class Rep { + Arc& m_arc; + typename Arc::entry_type* m_entry; + T m_value; + int m_ref; + + public: + Rep(Arc& arc, typename Arc::entry_type* entry) + : m_arc(arc), m_entry(entry), m_value(), m_ref(1) { } + ~Rep() + { delete m_entry; } + + void AddRef() { + m_ref++; + } + + void UnRef() { + if (--m_ref == 0) + delete this; + } + + Rep *Next() { + typename Arc::entry_type* entry = m_arc.GetNextEntry(); + if (!entry) { + UnRef(); + return NULL; + } + if (m_ref > 1) { + m_ref--; + return new Rep(m_arc, entry); + } + delete m_entry; + m_entry = entry; + m_value = T(); + return this; + } + + const T& GetValue() { + if (m_entry) { + _wxSetArchiveIteratorValue(m_value, m_entry, m_entry); + m_entry = NULL; + } + return m_value; + } + } *m_rep; +}; + +typedef wxArchiveIterator wxArchiveIter; +typedef wxArchiveIterator > wxArchivePairIter; + +#endif // wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR + + +///////////////////////////////////////////////////////////////////////////// +// wxArchiveClassFactory +// +// A wxArchiveClassFactory instance for a particular archive type allows +// the creation of the other classes that may be needed. + +void WXDLLIMPEXP_BASE wxUseArchiveClasses(); + +class WXDLLIMPEXP_BASE wxArchiveClassFactory : public wxFilterClassFactoryBase +{ +public: + typedef wxArchiveEntry entry_type; + typedef wxArchiveInputStream instream_type; + typedef wxArchiveOutputStream outstream_type; + typedef wxArchiveNotifier notifier_type; +#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR + typedef wxArchiveIter iter_type; + typedef wxArchivePairIter pairiter_type; +#endif + + virtual ~wxArchiveClassFactory() { } + + wxArchiveEntry *NewEntry() const + { return DoNewEntry(); } + wxArchiveInputStream *NewStream(wxInputStream& stream) const + { return DoNewStream(stream); } + wxArchiveOutputStream *NewStream(wxOutputStream& stream) const + { return DoNewStream(stream); } + wxArchiveInputStream *NewStream(wxInputStream *stream) const + { return DoNewStream(stream); } + wxArchiveOutputStream *NewStream(wxOutputStream *stream) const + { return DoNewStream(stream); } + + virtual wxString GetInternalName( + const wxString& name, + wxPathFormat format = wxPATH_NATIVE) const = 0; + + // FIXME-UTF8: remove these from this file, they are used for ANSI + // build only + void SetConv(wxMBConv& conv) { m_pConv = &conv; } + wxMBConv& GetConv() const + { if (m_pConv) return *m_pConv; else return wxConvLocal; } + + static const wxArchiveClassFactory *Find(const wxString& protocol, + wxStreamProtocolType type + = wxSTREAM_PROTOCOL); + + static const wxArchiveClassFactory *GetFirst(); + const wxArchiveClassFactory *GetNext() const { return m_next; } + + void PushFront() { Remove(); m_next = sm_first; sm_first = this; } + void Remove(); + +protected: + // old compilers don't support covarient returns, so 'Do' methods are + // used to simulate them + virtual wxArchiveEntry *DoNewEntry() const = 0; + virtual wxArchiveInputStream *DoNewStream(wxInputStream& stream) const = 0; + virtual wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const = 0; + virtual wxArchiveInputStream *DoNewStream(wxInputStream *stream) const = 0; + virtual wxArchiveOutputStream *DoNewStream(wxOutputStream *stream) const = 0; + + wxArchiveClassFactory() : m_pConv(NULL), m_next(this) { } + wxArchiveClassFactory& operator=(const wxArchiveClassFactory& WXUNUSED(f)) + { return *this; } + +private: + wxMBConv *m_pConv; + static wxArchiveClassFactory *sm_first; + wxArchiveClassFactory *m_next; + + DECLARE_ABSTRACT_CLASS(wxArchiveClassFactory) +}; + +#endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS + +#endif // _WX_ARCHIVE_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/arrimpl.cpp b/3rdparty/wxwidgets3.0-3.0.1/include/wx/arrimpl.cpp new file mode 100644 index 0000000000..0ef9e74890 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/arrimpl.cpp @@ -0,0 +1,119 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/arrimpl.cpp +// Purpose: helper file for implementation of dynamic lists +// Author: Vadim Zeitlin +// Modified by: +// Created: 16.10.97 +// Copyright: (c) 1997 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +/***************************************************************************** + * Purpose: implements methods of "template" class declared in * + * DECLARE_OBJARRAY macro and which couldn't be implemented inline * + * (because they need the full definition of type T in scope) * + * * + * Usage: 1) #include dynarray.h * + * 2) WX_DECLARE_OBJARRAY * + * 3) #include arrimpl.cpp * + * 4) WX_DEFINE_OBJARRAY * + *****************************************************************************/ + +// needed to resolve the conflict between global T and macro parameter T + +#define _WX_ERROR_REMOVE2(x) wxT("bad index in ") wxT(#x) wxT("::RemoveAt()") + +// macro implements remaining (not inline) methods of template list +// (it's private to this file) +#undef _DEFINE_OBJARRAY +#define _DEFINE_OBJARRAY(T, name) \ +name::~name() \ +{ \ + Empty(); \ +} \ + \ +void name::DoCopy(const name& src) \ +{ \ + for ( size_t ui = 0; ui < src.size(); ui++ ) \ + Add(src[ui]); \ +} \ + \ +name& name::operator=(const name& src) \ +{ \ + Empty(); \ + DoCopy(src); \ + \ + return *this; \ +} \ + \ +name::name(const name& src) : wxArrayPtrVoid() \ +{ \ + DoCopy(src); \ +} \ + \ +void name::DoEmpty() \ +{ \ + for ( size_t ui = 0; ui < size(); ui++ ) \ + delete (T*)base_array::operator[](ui); \ +} \ + \ +void name::RemoveAt(size_t uiIndex, size_t nRemove) \ +{ \ + wxCHECK_RET( uiIndex < size(), _WX_ERROR_REMOVE2(name) ); \ + \ + for (size_t i = 0; i < nRemove; i++ ) \ + delete (T*)base_array::operator[](uiIndex + i); \ + \ + base_array::erase(begin() + uiIndex, begin() + uiIndex + nRemove); \ +} \ + \ +void name::Add(const T& item, size_t nInsert) \ +{ \ + if (nInsert == 0) \ + return; \ + T* pItem = new T(item); \ + size_t nOldSize = size(); \ + if ( pItem != NULL ) \ + base_array::insert(end(), nInsert, pItem); \ + for (size_t i = 1; i < nInsert; i++) \ + base_array::operator[](nOldSize + i) = new T(item); \ +} \ + \ +void name::Insert(const T& item, size_t uiIndex, size_t nInsert) \ +{ \ + if (nInsert == 0) \ + return; \ + T* pItem = new T(item); \ + if ( pItem != NULL ) \ + base_array::insert(begin() + uiIndex, nInsert, pItem); \ + for (size_t i = 1; i < nInsert; i++) \ + base_array::operator[](uiIndex + i) = new T(item); \ +} \ + \ +int name::Index(const T& item, bool bFromEnd) const \ +{ \ + if ( bFromEnd ) { \ + if ( size() > 0 ) { \ + size_t ui = size() - 1; \ + do { \ + if ( (T*)base_array::operator[](ui) == &item ) \ + return static_cast(ui); \ + ui--; \ + } \ + while ( ui != 0 ); \ + } \ + } \ + else { \ + for( size_t ui = 0; ui < size(); ui++ ) { \ + if( (T*)base_array::operator[](ui) == &item ) \ + return static_cast(ui); \ + } \ + } \ + \ + return wxNOT_FOUND; \ +} + +// redefine the macro so that now it will generate the class implementation +// old value would provoke a compile-time error if this file is not included +#undef WX_DEFINE_OBJARRAY +#define WX_DEFINE_OBJARRAY(name) _DEFINE_OBJARRAY(_wxObjArray##name, name) diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/arrstr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/arrstr.h new file mode 100644 index 0000000000..db67c8ef08 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/arrstr.h @@ -0,0 +1,515 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/arrstr.h +// Purpose: wxArrayString class +// Author: Mattia Barbon and Vadim Zeitlin +// Modified by: +// Created: 07/07/03 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ARRSTR_H +#define _WX_ARRSTR_H + +#include "wx/defs.h" +#include "wx/string.h" + +// these functions are only used in STL build now but we define them in any +// case for compatibility with the existing code outside of the library which +// could be using them +inline int wxCMPFUNC_CONV wxStringSortAscending(wxString* s1, wxString* s2) +{ + return s1->Cmp(*s2); +} + +inline int wxCMPFUNC_CONV wxStringSortDescending(wxString* s1, wxString* s2) +{ + return wxStringSortAscending(s2, s1); +} + +#if wxUSE_STD_CONTAINERS + +#include "wx/dynarray.h" + +typedef int (wxCMPFUNC_CONV *CMPFUNCwxString)(wxString*, wxString*); +typedef wxString _wxArraywxBaseArrayStringBase; +_WX_DECLARE_BASEARRAY_2(_wxArraywxBaseArrayStringBase, wxBaseArrayStringBase, + wxArray_SortFunction, + class WXDLLIMPEXP_BASE); +WX_DEFINE_USER_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase, + wxBaseArrayStringBase, WXDLLIMPEXP_BASE); +_WX_DEFINE_SORTED_TYPEARRAY_2(wxString, wxSortedArrayStringBase, + wxBaseArrayStringBase, = wxStringSortAscending, + class WXDLLIMPEXP_BASE, CMPFUNCwxString); + +class WXDLLIMPEXP_BASE wxArrayString : public wxArrayStringBase +{ +public: + // type of function used by wxArrayString::Sort() + typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first, + const wxString& second); + + wxArrayString() { } + wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { } + wxArrayString(size_t sz, const char** a); + wxArrayString(size_t sz, const wchar_t** a); + wxArrayString(size_t sz, const wxString* a); + + int Index(const wxString& str, bool bCase = true, bool bFromEnd = false) const; + + void Sort(bool reverseOrder = false); + void Sort(CompareFunction function); + void Sort(CMPFUNCwxString function) { wxArrayStringBase::Sort(function); } + + size_t Add(const wxString& string, size_t copies = 1) + { + wxArrayStringBase::Add(string, copies); + return size() - copies; + } +}; + +class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase +{ +public: + wxSortedArrayString() : wxSortedArrayStringBase(wxStringSortAscending) + { } + wxSortedArrayString(const wxSortedArrayString& array) + : wxSortedArrayStringBase(array) + { } + wxSortedArrayString(const wxArrayString& src) + : wxSortedArrayStringBase(wxStringSortAscending) + { + reserve(src.size()); + + for ( size_t n = 0; n < src.size(); n++ ) + Add(src[n]); + } + + int Index(const wxString& str, bool bCase = true, bool bFromEnd = false) const; + +private: + void Insert() + { + wxFAIL_MSG( "wxSortedArrayString::Insert() is not to be used" ); + } + + void Sort() + { + wxFAIL_MSG( "wxSortedArrayString::Sort() is not to be used" ); + } +}; + +#else // if !wxUSE_STD_CONTAINERS + +// this shouldn't be defined for compilers not supporting template methods or +// without std::distance() +// +// FIXME-VC6: currently it's only not defined for VC6 in DLL build as it +// doesn't export template methods from DLL correctly so even though +// it compiles them fine, we get link errors when using wxArrayString +#if !defined(__VISUALC6__) || !(defined(WXMAKINGDLL) || defined(WXUSINGDLL)) + #define wxHAS_VECTOR_TEMPLATE_ASSIGN +#endif + +#ifdef wxHAS_VECTOR_TEMPLATE_ASSIGN + #include "wx/beforestd.h" + #include + #include "wx/afterstd.h" +#endif // wxHAS_VECTOR_TEMPLATE_ASSIGN + +class WXDLLIMPEXP_BASE wxArrayString +{ +public: + // type of function used by wxArrayString::Sort() + typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first, + const wxString& second); + // type of function used by wxArrayString::Sort(), for compatibility with + // wxArray + typedef int (wxCMPFUNC_CONV *CompareFunction2)(wxString* first, + wxString* second); + + // constructors and destructor + // default ctor + wxArrayString() { Init(false); } + // if autoSort is true, the array is always sorted (in alphabetical order) + // + // NB: the reason for using int and not bool is that like this we can avoid + // using this ctor for implicit conversions from "const char *" (which + // we'd like to be implicitly converted to wxString instead!). This + // wouldn't be needed if the 'explicit' keyword was supported by all + // compilers, or if this was protected ctor for wxSortedArrayString, + // but we're stuck with it now. + wxEXPLICIT wxArrayString(int autoSort) { Init(autoSort != 0); } + // C string array ctor + wxArrayString(size_t sz, const char** a); + wxArrayString(size_t sz, const wchar_t** a); + // wxString string array ctor + wxArrayString(size_t sz, const wxString* a); + // copy ctor + wxArrayString(const wxArrayString& array); + // assignment operator + wxArrayString& operator=(const wxArrayString& src); + // not virtual, this class should not be derived from + ~wxArrayString(); + + // memory management + // empties the list, but doesn't release memory + void Empty(); + // empties the list and releases memory + void Clear(); + // preallocates memory for given number of items + void Alloc(size_t nCount); + // minimzes the memory usage (by freeing all extra memory) + void Shrink(); + + // simple accessors + // number of elements in the array + size_t GetCount() const { return m_nCount; } + // is it empty? + bool IsEmpty() const { return m_nCount == 0; } + // number of elements in the array (GetCount is preferred API) + size_t Count() const { return m_nCount; } + + // items access (range checking is done in debug version) + // get item at position uiIndex + wxString& Item(size_t nIndex) + { + wxASSERT_MSG( nIndex < m_nCount, + wxT("wxArrayString: index out of bounds") ); + + return m_pItems[nIndex]; + } + const wxString& Item(size_t nIndex) const { return const_cast(this)->Item(nIndex); } + + // same as Item() + wxString& operator[](size_t nIndex) { return Item(nIndex); } + const wxString& operator[](size_t nIndex) const { return Item(nIndex); } + // get last item + wxString& Last() + { + wxASSERT_MSG( !IsEmpty(), + wxT("wxArrayString: index out of bounds") ); + return Item(GetCount() - 1); + } + const wxString& Last() const { return const_cast(this)->Last(); } + + + // item management + // Search the element in the array, starting from the beginning if + // bFromEnd is false or from end otherwise. If bCase, comparison is case + // sensitive (default). Returns index of the first item matched or + // wxNOT_FOUND + int Index (const wxString& str, bool bCase = true, bool bFromEnd = false) const; + // add new element at the end (if the array is not sorted), return its + // index + size_t Add(const wxString& str, size_t nInsert = 1); + // add new element at given position + void Insert(const wxString& str, size_t uiIndex, size_t nInsert = 1); + // expand the array to have count elements + void SetCount(size_t count); + // remove first item matching this value + void Remove(const wxString& sz); + // remove item by index + void RemoveAt(size_t nIndex, size_t nRemove = 1); + + // sorting + // sort array elements in alphabetical order (or reversed alphabetical + // order if reverseOrder parameter is true) + void Sort(bool reverseOrder = false); + // sort array elements using specified comparison function + void Sort(CompareFunction compareFunction); + void Sort(CompareFunction2 compareFunction); + + // comparison + // compare two arrays case sensitively + bool operator==(const wxArrayString& a) const; + // compare two arrays case sensitively + bool operator!=(const wxArrayString& a) const { return !(*this == a); } + + // STL-like interface + typedef wxString value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type* iterator; + typedef const value_type* const_iterator; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef int difference_type; + typedef size_t size_type; + + // TODO: this code duplicates the one in dynarray.h + class reverse_iterator + { + typedef wxString value_type; + typedef value_type* pointer; + typedef value_type& reference; + typedef reverse_iterator itor; + friend itor operator+(int o, const itor& it); + friend itor operator+(const itor& it, int o); + friend itor operator-(const itor& it, int o); + friend difference_type operator -(const itor& i1, const itor& i2); + public: + pointer m_ptr; + reverse_iterator() : m_ptr(NULL) { } + wxEXPLICIT reverse_iterator(pointer ptr) : m_ptr(ptr) { } + reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } + reference operator*() const { return *m_ptr; } + pointer operator->() const { return m_ptr; } + itor& operator++() { --m_ptr; return *this; } + const itor operator++(int) + { reverse_iterator tmp = *this; --m_ptr; return tmp; } + itor& operator--() { ++m_ptr; return *this; } + const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } + bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; } + bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; } + }; + + class const_reverse_iterator + { + typedef wxString value_type; + typedef const value_type* pointer; + typedef const value_type& reference; + typedef const_reverse_iterator itor; + friend itor operator+(int o, const itor& it); + friend itor operator+(const itor& it, int o); + friend itor operator-(const itor& it, int o); + friend difference_type operator -(const itor& i1, const itor& i2); + public: + pointer m_ptr; + const_reverse_iterator() : m_ptr(NULL) { } + wxEXPLICIT const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } + const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } + const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } + reference operator*() const { return *m_ptr; } + pointer operator->() const { return m_ptr; } + itor& operator++() { --m_ptr; return *this; } + const itor operator++(int) + { itor tmp = *this; --m_ptr; return tmp; } + itor& operator--() { ++m_ptr; return *this; } + const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } + bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; } + bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; } + }; + + wxArrayString(const_iterator first, const_iterator last) + { Init(false); assign(first, last); } + wxArrayString(size_type n, const_reference v) { Init(false); assign(n, v); } + +#ifdef wxHAS_VECTOR_TEMPLATE_ASSIGN + template + void assign(Iterator first, Iterator last) + { + clear(); + reserve(std::distance(first, last)); + for(; first != last; ++first) + push_back(*first); + } +#else // !wxHAS_VECTOR_TEMPLATE_ASSIGN + void assign(const_iterator first, const_iterator last) + { + clear(); + reserve(last - first); + for(; first != last; ++first) + push_back(*first); + } +#endif // wxHAS_VECTOR_TEMPLATE_ASSIGN/!wxHAS_VECTOR_TEMPLATE_ASSIGN + + void assign(size_type n, const_reference v) + { clear(); Add(v, n); } + reference back() { return *(end() - 1); } + const_reference back() const { return *(end() - 1); } + iterator begin() { return m_pItems; } + const_iterator begin() const { return m_pItems; } + size_type capacity() const { return m_nSize; } + void clear() { Clear(); } + bool empty() const { return IsEmpty(); } + iterator end() { return begin() + GetCount(); } + const_iterator end() const { return begin() + GetCount(); } + iterator erase(iterator first, iterator last) + { + size_t idx = first - begin(); + RemoveAt(idx, last - first); + return begin() + idx; + } + iterator erase(iterator it) { return erase(it, it + 1); } + reference front() { return *begin(); } + const_reference front() const { return *begin(); } + void insert(iterator it, size_type n, const_reference v) + { Insert(v, it - begin(), n); } + iterator insert(iterator it, const_reference v = value_type()) + { size_t idx = it - begin(); Insert(v, idx); return begin() + idx; } + void insert(iterator it, const_iterator first, const_iterator last); + size_type max_size() const { return INT_MAX; } + void pop_back() { RemoveAt(GetCount() - 1); } + void push_back(const_reference v) { Add(v); } + reverse_iterator rbegin() { return reverse_iterator(end() - 1); } + const_reverse_iterator rbegin() const + { return const_reverse_iterator(end() - 1); } + reverse_iterator rend() { return reverse_iterator(begin() - 1); } + const_reverse_iterator rend() const + { return const_reverse_iterator(begin() - 1); } + void reserve(size_type n) /* base::reserve*/; + void resize(size_type n, value_type v = value_type()); + size_type size() const { return GetCount(); } + void swap(wxArrayString& other) + { + wxSwap(m_nSize, other.m_nSize); + wxSwap(m_nCount, other.m_nCount); + wxSwap(m_pItems, other.m_pItems); + wxSwap(m_autoSort, other.m_autoSort); + } + +protected: + void Init(bool autoSort); // common part of all ctors + void Copy(const wxArrayString& src); // copies the contents of another array + +private: + void Grow(size_t nIncrement = 0); // makes array bigger if needed + + size_t m_nSize, // current size of the array + m_nCount; // current number of elements + + wxString *m_pItems; // pointer to data + + bool m_autoSort; // if true, keep the array always sorted +}; + +class WXDLLIMPEXP_BASE wxSortedArrayString : public wxArrayString +{ +public: + wxSortedArrayString() : wxArrayString(true) + { } + wxSortedArrayString(const wxArrayString& array) : wxArrayString(true) + { Copy(array); } +}; + +#endif // !wxUSE_STD_CONTAINERS + +// this class provides a temporary wxString* from a +// wxArrayString +class WXDLLIMPEXP_BASE wxCArrayString +{ +public: + wxCArrayString( const wxArrayString& array ) + : m_array( array ), m_strings( NULL ) + { } + ~wxCArrayString() { delete[] m_strings; } + + size_t GetCount() const { return m_array.GetCount(); } + wxString* GetStrings() + { + if( m_strings ) return m_strings; + size_t count = m_array.GetCount(); + m_strings = new wxString[count]; + for( size_t i = 0; i < count; ++i ) + m_strings[i] = m_array[i]; + return m_strings; + } + + wxString* Release() + { + wxString *r = GetStrings(); + m_strings = NULL; + return r; + } + +private: + const wxArrayString& m_array; + wxString* m_strings; +}; + + +// ---------------------------------------------------------------------------- +// helper functions for working with arrays +// ---------------------------------------------------------------------------- + +// by default, these functions use the escape character to escape the +// separators occurring inside the string to be joined, this can be disabled by +// passing '\0' as escape + +WXDLLIMPEXP_BASE wxString wxJoin(const wxArrayString& arr, + const wxChar sep, + const wxChar escape = wxT('\\')); + +WXDLLIMPEXP_BASE wxArrayString wxSplit(const wxString& str, + const wxChar sep, + const wxChar escape = wxT('\\')); + + +// ---------------------------------------------------------------------------- +// This helper class allows to pass both C array of wxStrings or wxArrayString +// using the same interface. +// +// Use it when you have two methods taking wxArrayString or (int, wxString[]), +// that do the same thing. This class lets you iterate over input data in the +// same way whether it is a raw array of strings or wxArrayString. +// +// The object does not take ownership of the data -- internally it keeps +// pointers to the data, therefore the data must be disposed of by user +// and only after this object is destroyed. Usually it is not a problem as +// only temporary objects of this class are used. +// ---------------------------------------------------------------------------- + +class wxArrayStringsAdapter +{ +public: + // construct an adapter from a wxArrayString + wxArrayStringsAdapter(const wxArrayString& strings) + : m_type(wxSTRING_ARRAY), m_size(strings.size()) + { + m_data.array = &strings; + } + + // construct an adapter from a wxString[] + wxArrayStringsAdapter(unsigned int n, const wxString *strings) + : m_type(wxSTRING_POINTER), m_size(n) + { + m_data.ptr = strings; + } + + // construct an adapter from a single wxString + wxArrayStringsAdapter(const wxString& s) + : m_type(wxSTRING_POINTER), m_size(1) + { + m_data.ptr = &s; + } + + // default copy constructor is ok + + // iteration interface + size_t GetCount() const { return m_size; } + bool IsEmpty() const { return GetCount() == 0; } + const wxString& operator[] (unsigned int i) const + { + wxASSERT_MSG( i < GetCount(), wxT("index out of bounds") ); + if(m_type == wxSTRING_POINTER) + return m_data.ptr[i]; + return m_data.array->Item(i); + } + wxArrayString AsArrayString() const + { + if(m_type == wxSTRING_ARRAY) + return *m_data.array; + return wxArrayString(GetCount(), m_data.ptr); + } + +private: + // type of the data being held + enum wxStringContainerType + { + wxSTRING_ARRAY, // wxArrayString + wxSTRING_POINTER // wxString[] + }; + + wxStringContainerType m_type; + size_t m_size; + union + { + const wxString * ptr; + const wxArrayString * array; + } m_data; + + wxDECLARE_NO_ASSIGN_CLASS(wxArrayStringsAdapter); +}; + +#endif // _WX_ARRSTR_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/artprov.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/artprov.h new file mode 100644 index 0000000000..3e95ed98fe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/artprov.h @@ -0,0 +1,261 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/artprov.h +// Purpose: wxArtProvider class +// Author: Vaclav Slavik +// Modified by: +// Created: 18/03/2002 +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ARTPROV_H_ +#define _WX_ARTPROV_H_ + +#include "wx/string.h" +#include "wx/bitmap.h" +#include "wx/icon.h" +#include "wx/iconbndl.h" + +class WXDLLIMPEXP_FWD_CORE wxArtProvidersList; +class WXDLLIMPEXP_FWD_CORE wxArtProviderCache; +class wxArtProviderModule; + +// ---------------------------------------------------------------------------- +// Types +// ---------------------------------------------------------------------------- + +typedef wxString wxArtClient; +typedef wxString wxArtID; + +#define wxART_MAKE_CLIENT_ID_FROM_STR(id) ((id) + "_C") +#define wxART_MAKE_CLIENT_ID(id) (#id "_C") +#define wxART_MAKE_ART_ID_FROM_STR(id) (id) +#define wxART_MAKE_ART_ID(id) (#id) + +// ---------------------------------------------------------------------------- +// Art clients +// ---------------------------------------------------------------------------- + +#define wxART_TOOLBAR wxART_MAKE_CLIENT_ID(wxART_TOOLBAR) +#define wxART_MENU wxART_MAKE_CLIENT_ID(wxART_MENU) +#define wxART_FRAME_ICON wxART_MAKE_CLIENT_ID(wxART_FRAME_ICON) + +#define wxART_CMN_DIALOG wxART_MAKE_CLIENT_ID(wxART_CMN_DIALOG) +#define wxART_HELP_BROWSER wxART_MAKE_CLIENT_ID(wxART_HELP_BROWSER) +#define wxART_MESSAGE_BOX wxART_MAKE_CLIENT_ID(wxART_MESSAGE_BOX) +#define wxART_BUTTON wxART_MAKE_CLIENT_ID(wxART_BUTTON) +#define wxART_LIST wxART_MAKE_CLIENT_ID(wxART_LIST) + +#define wxART_OTHER wxART_MAKE_CLIENT_ID(wxART_OTHER) + +// ---------------------------------------------------------------------------- +// Art IDs +// ---------------------------------------------------------------------------- + +#define wxART_ADD_BOOKMARK wxART_MAKE_ART_ID(wxART_ADD_BOOKMARK) +#define wxART_DEL_BOOKMARK wxART_MAKE_ART_ID(wxART_DEL_BOOKMARK) +#define wxART_HELP_SIDE_PANEL wxART_MAKE_ART_ID(wxART_HELP_SIDE_PANEL) +#define wxART_HELP_SETTINGS wxART_MAKE_ART_ID(wxART_HELP_SETTINGS) +#define wxART_HELP_BOOK wxART_MAKE_ART_ID(wxART_HELP_BOOK) +#define wxART_HELP_FOLDER wxART_MAKE_ART_ID(wxART_HELP_FOLDER) +#define wxART_HELP_PAGE wxART_MAKE_ART_ID(wxART_HELP_PAGE) +#define wxART_GO_BACK wxART_MAKE_ART_ID(wxART_GO_BACK) +#define wxART_GO_FORWARD wxART_MAKE_ART_ID(wxART_GO_FORWARD) +#define wxART_GO_UP wxART_MAKE_ART_ID(wxART_GO_UP) +#define wxART_GO_DOWN wxART_MAKE_ART_ID(wxART_GO_DOWN) +#define wxART_GO_TO_PARENT wxART_MAKE_ART_ID(wxART_GO_TO_PARENT) +#define wxART_GO_HOME wxART_MAKE_ART_ID(wxART_GO_HOME) +#define wxART_GOTO_FIRST wxART_MAKE_ART_ID(wxART_GOTO_FIRST) +#define wxART_GOTO_LAST wxART_MAKE_ART_ID(wxART_GOTO_LAST) +#define wxART_FILE_OPEN wxART_MAKE_ART_ID(wxART_FILE_OPEN) +#define wxART_FILE_SAVE wxART_MAKE_ART_ID(wxART_FILE_SAVE) +#define wxART_FILE_SAVE_AS wxART_MAKE_ART_ID(wxART_FILE_SAVE_AS) +#define wxART_PRINT wxART_MAKE_ART_ID(wxART_PRINT) +#define wxART_HELP wxART_MAKE_ART_ID(wxART_HELP) +#define wxART_TIP wxART_MAKE_ART_ID(wxART_TIP) +#define wxART_REPORT_VIEW wxART_MAKE_ART_ID(wxART_REPORT_VIEW) +#define wxART_LIST_VIEW wxART_MAKE_ART_ID(wxART_LIST_VIEW) +#define wxART_NEW_DIR wxART_MAKE_ART_ID(wxART_NEW_DIR) +#define wxART_HARDDISK wxART_MAKE_ART_ID(wxART_HARDDISK) +#define wxART_FLOPPY wxART_MAKE_ART_ID(wxART_FLOPPY) +#define wxART_CDROM wxART_MAKE_ART_ID(wxART_CDROM) +#define wxART_REMOVABLE wxART_MAKE_ART_ID(wxART_REMOVABLE) +#define wxART_FOLDER wxART_MAKE_ART_ID(wxART_FOLDER) +#define wxART_FOLDER_OPEN wxART_MAKE_ART_ID(wxART_FOLDER_OPEN) +#define wxART_GO_DIR_UP wxART_MAKE_ART_ID(wxART_GO_DIR_UP) +#define wxART_EXECUTABLE_FILE wxART_MAKE_ART_ID(wxART_EXECUTABLE_FILE) +#define wxART_NORMAL_FILE wxART_MAKE_ART_ID(wxART_NORMAL_FILE) +#define wxART_TICK_MARK wxART_MAKE_ART_ID(wxART_TICK_MARK) +#define wxART_CROSS_MARK wxART_MAKE_ART_ID(wxART_CROSS_MARK) +#define wxART_ERROR wxART_MAKE_ART_ID(wxART_ERROR) +#define wxART_QUESTION wxART_MAKE_ART_ID(wxART_QUESTION) +#define wxART_WARNING wxART_MAKE_ART_ID(wxART_WARNING) +#define wxART_INFORMATION wxART_MAKE_ART_ID(wxART_INFORMATION) +#define wxART_MISSING_IMAGE wxART_MAKE_ART_ID(wxART_MISSING_IMAGE) + +#define wxART_COPY wxART_MAKE_ART_ID(wxART_COPY) +#define wxART_CUT wxART_MAKE_ART_ID(wxART_CUT) +#define wxART_PASTE wxART_MAKE_ART_ID(wxART_PASTE) +#define wxART_DELETE wxART_MAKE_ART_ID(wxART_DELETE) +#define wxART_NEW wxART_MAKE_ART_ID(wxART_NEW) + +#define wxART_UNDO wxART_MAKE_ART_ID(wxART_UNDO) +#define wxART_REDO wxART_MAKE_ART_ID(wxART_REDO) + +#define wxART_PLUS wxART_MAKE_ART_ID(wxART_PLUS) +#define wxART_MINUS wxART_MAKE_ART_ID(wxART_MINUS) + +#define wxART_CLOSE wxART_MAKE_ART_ID(wxART_CLOSE) +#define wxART_QUIT wxART_MAKE_ART_ID(wxART_QUIT) + +#define wxART_FIND wxART_MAKE_ART_ID(wxART_FIND) +#define wxART_FIND_AND_REPLACE wxART_MAKE_ART_ID(wxART_FIND_AND_REPLACE) + + +// ---------------------------------------------------------------------------- +// wxArtProvider class +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxArtProvider : public wxObject +{ +public: + // Dtor removes the provider from providers stack if it's still on it + virtual ~wxArtProvider(); + + // Does this platform implement native icons theme? + static bool HasNativeProvider(); + + // Add new provider to the top of providers stack (i.e. the provider will + // be queried first of all). + static void Push(wxArtProvider *provider); + + // Add new provider to the bottom of providers stack (i.e. the provider + // will be queried as the last one). + static void PushBack(wxArtProvider *provider); + +#if WXWIN_COMPATIBILITY_2_8 + // use PushBack(), it's the same thing + static wxDEPRECATED( void Insert(wxArtProvider *provider) ); +#endif + + // Remove latest added provider and delete it. + static bool Pop(); + + // Remove provider from providers stack but don't delete it. + static bool Remove(wxArtProvider *provider); + + // Delete the given provider and remove it from the providers stack. + static bool Delete(wxArtProvider *provider); + + + // Query the providers for bitmap with given ID and return it. Return + // wxNullBitmap if no provider provides it. + static wxBitmap GetBitmap(const wxArtID& id, + const wxArtClient& client = wxART_OTHER, + const wxSize& size = wxDefaultSize); + + // Query the providers for icon with given ID and return it. Return + // wxNullIcon if no provider provides it. + static wxIcon GetIcon(const wxArtID& id, + const wxArtClient& client = wxART_OTHER, + const wxSize& size = wxDefaultSize); + + // Helper used by GetMessageBoxIcon(): return the art id corresponding to + // the standard wxICON_INFORMATION/WARNING/ERROR/QUESTION flags (only one + // can be set) + static wxArtID GetMessageBoxIconId(int flags); + + // Helper used by several generic classes: return the icon corresponding to + // the standard wxICON_INFORMATION/WARNING/ERROR/QUESTION flags (only one + // can be set) + static wxIcon GetMessageBoxIcon(int flags) + { + return GetIcon(GetMessageBoxIconId(flags), wxART_MESSAGE_BOX); + } + + // Query the providers for iconbundle with given ID and return it. Return + // wxNullIconBundle if no provider provides it. + static wxIconBundle GetIconBundle(const wxArtID& id, + const wxArtClient& client = wxART_OTHER); + + // Gets native size for given 'client' or wxDefaultSize if it doesn't + // have native equivalent + static wxSize GetNativeSizeHint(const wxArtClient& client); + + // Get the size hint of an icon from a specific wxArtClient, queries + // the topmost provider if platform_dependent = false + static wxSize GetSizeHint(const wxArtClient& client, bool platform_dependent = false); + +#if WXWIN_COMPATIBILITY_2_6 + // use the corresponding methods without redundant "Provider" suffix + static wxDEPRECATED( void PushProvider(wxArtProvider *provider) ); + static wxDEPRECATED( void InsertProvider(wxArtProvider *provider) ); + static wxDEPRECATED( bool PopProvider() ); + + // use Delete() if this is what you really need, or just delete the + // provider pointer, do not use Remove() as it does not delete the pointer + // unlike RemoveProvider() which does + static wxDEPRECATED( bool RemoveProvider(wxArtProvider *provider) ); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + friend class wxArtProviderModule; +#if wxUSE_ARTPROVIDER_STD + // Initializes default provider + static void InitStdProvider(); +#endif // wxUSE_ARTPROVIDER_STD + // Initializes Tango-based icon provider +#if wxUSE_ARTPROVIDER_TANGO + static void InitTangoProvider(); +#endif // wxUSE_ARTPROVIDER_TANGO + // Initializes platform's native provider, if available (e.g. GTK2) + static void InitNativeProvider(); + // Destroy caches & all providers + static void CleanUpProviders(); + + // Get the default size of an icon for a specific client + virtual wxSize DoGetSizeHint(const wxArtClient& client) + { + return GetSizeHint(client, true); + } + + // Derived classes must override CreateBitmap or CreateIconBundle + // (or both) to create requested art resource. This method is called + // only once per instance's lifetime for each requested wxArtID. + virtual wxBitmap CreateBitmap(const wxArtID& WXUNUSED(id), + const wxArtClient& WXUNUSED(client), + const wxSize& WXUNUSED(size)) + { + return wxNullBitmap; + } + + virtual wxIconBundle CreateIconBundle(const wxArtID& WXUNUSED(id), + const wxArtClient& WXUNUSED(client)) + { + return wxNullIconBundle; + } + +private: + static void CommonAddingProvider(); + static wxIconBundle DoGetIconBundle(const wxArtID& id, + const wxArtClient& client); + +private: + // list of providers: + static wxArtProvidersList *sm_providers; + // art resources cache (so that CreateXXX is not called that often): + static wxArtProviderCache *sm_cache; + + DECLARE_ABSTRACT_CLASS(wxArtProvider) +}; + + +#if !defined(__WXUNIVERSAL__) && \ + ((defined(__WXGTK__) && defined(__WXGTK20__)) || defined(__WXMSW__) || \ + defined(__WXMAC__)) + // *some* (partial) native implementation of wxArtProvider exists; this is + // not the same as wxArtProvider::HasNativeProvider()! + #define wxHAS_NATIVE_ART_PROVIDER_IMPL +#endif + +#endif // _WX_ARTPROV_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/atomic.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/atomic.h new file mode 100644 index 0000000000..1439d29484 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/atomic.h @@ -0,0 +1,159 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/atomic.h +// Purpose: functions to manipulate atomically integers and pointers +// Author: Armel Asselin +// Created: 12/13/2006 +// Copyright: (c) Armel Asselin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ATOMIC_H_ +#define _WX_ATOMIC_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// get the value of wxUSE_THREADS configuration flag +#include "wx/defs.h" + +// constraints on the various functions: +// - wxAtomicDec must return a zero value if the value is zero once +// decremented else it must return any non-zero value (the true value is OK +// but not necessary). + +#if wxUSE_THREADS + +#if defined(HAVE_GCC_ATOMIC_BUILTINS) + +// NB: we intentionally don't use Linux's asm/atomic.h header, because it's +// an internal kernel header that doesn't always work in userspace: +// http://bugs.mysql.com/bug.php?id=28456 +// http://golubenco.org/blog/atomic-operations/ + +inline void wxAtomicInc (wxUint32 &value) +{ + __sync_fetch_and_add(&value, 1); +} + +inline wxUint32 wxAtomicDec (wxUint32 &value) +{ + return __sync_sub_and_fetch(&value, 1); +} + + +#elif defined(__WINDOWS__) + +// include standard Windows headers +#include "wx/msw/wrapwin.h" + +inline void wxAtomicInc (wxUint32 &value) +{ + InterlockedIncrement ((LONG*)&value); +} + +inline wxUint32 wxAtomicDec (wxUint32 &value) +{ + return InterlockedDecrement ((LONG*)&value); +} + +#elif defined(__WXMAC__) || defined(__DARWIN__) + +#include "libkern/OSAtomic.h" +inline void wxAtomicInc (wxUint32 &value) +{ + OSAtomicIncrement32 ((int32_t*)&value); +} + +inline wxUint32 wxAtomicDec (wxUint32 &value) +{ + return OSAtomicDecrement32 ((int32_t*)&value); +} + +#elif defined (__SOLARIS__) + +#include + +inline void wxAtomicInc (wxUint32 &value) +{ + atomic_add_32 ((uint32_t*)&value, 1); +} + +inline wxUint32 wxAtomicDec (wxUint32 &value) +{ + return atomic_add_32_nv ((uint32_t*)&value, (uint32_t)-1); +} + +#else // unknown platform + +// it will result in inclusion if the generic implementation code a bit later in this page +#define wxNEEDS_GENERIC_ATOMIC_OPS + +#endif // unknown platform + +#else // else of wxUSE_THREADS +// if no threads are used we can safely use simple ++/-- + +inline void wxAtomicInc (wxUint32 &value) { ++value; } +inline wxUint32 wxAtomicDec (wxUint32 &value) { return --value; } + +#endif // !wxUSE_THREADS + +// ---------------------------------------------------------------------------- +// proxies to actual implementations, but for various other types with same +// behaviour +// ---------------------------------------------------------------------------- + +#ifdef wxNEEDS_GENERIC_ATOMIC_OPS + +#include "wx/thread.h" // for wxCriticalSection + +class wxAtomicInt32 +{ +public: + wxAtomicInt32() { } // non initialized for consistency with basic int type + wxAtomicInt32(wxInt32 v) : m_value(v) { } + wxAtomicInt32(const wxAtomicInt32& a) : m_value(a.m_value) {} + + operator wxInt32() const { return m_value; } + operator volatile wxInt32&() { return m_value; } + + wxAtomicInt32& operator=(wxInt32 v) { m_value = v; return *this; } + + void Inc() + { + wxCriticalSectionLocker lock(m_locker); + ++m_value; + } + + wxInt32 Dec() + { + wxCriticalSectionLocker lock(m_locker); + return --m_value; + } + +private: + volatile wxInt32 m_value; + wxCriticalSection m_locker; +}; + +inline void wxAtomicInc(wxAtomicInt32 &value) { value.Inc(); } +inline wxInt32 wxAtomicDec(wxAtomicInt32 &value) { return value.Dec(); } + +#else // !wxNEEDS_GENERIC_ATOMIC_OPS + +#define wxHAS_ATOMIC_OPS + +inline void wxAtomicInc(wxInt32 &value) { wxAtomicInc((wxUint32&)value); } +inline wxInt32 wxAtomicDec(wxInt32 &value) { return wxAtomicDec((wxUint32&)value); } + +typedef wxInt32 wxAtomicInt32; + +#endif // wxNEEDS_GENERIC_ATOMIC_OPS + +// all the native implementations use 32 bits currently +// for a 64 bits implementation we could use (a future) wxAtomicInt64 as +// default type +typedef wxAtomicInt32 wxAtomicInt; + +#endif // _WX_ATOMIC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/aui.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/aui.h new file mode 100644 index 0000000000..df3a9166a1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/aui.h @@ -0,0 +1,22 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/aui/aui.h +// Purpose: wxaui: wx advanced user interface - docking window manager +// Author: Benjamin I. Williams +// Modified by: +// Created: 2005-05-17 +// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. +// Licence: wxWindows Library Licence, Version 3.1 +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_AUI_H_ +#define _WX_AUI_H_ + +#include "wx/aui/framemanager.h" +#include "wx/aui/dockart.h" +#include "wx/aui/floatpane.h" +#include "wx/aui/auibar.h" +#include "wx/aui/auibook.h" +#include "wx/aui/tabmdi.h" + +#endif // _WX_AUI_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/auibar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/auibar.h new file mode 100644 index 0000000000..52e2525215 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/auibar.h @@ -0,0 +1,755 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/aui/toolbar.h +// Purpose: wxaui: wx advanced user interface - docking window manager +// Author: Benjamin I. Williams +// Modified by: +// Created: 2008-08-04 +// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. +// Licence: wxWindows Library Licence, Version 3.1 +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_AUIBAR_H_ +#define _WX_AUIBAR_H_ + +#include "wx/defs.h" + +#if wxUSE_AUI + +#include "wx/control.h" +#include "wx/sizer.h" +#include "wx/pen.h" + +class WXDLLIMPEXP_FWD_CORE wxClientDC; +class WXDLLIMPEXP_FWD_AUI wxAuiPaneInfo; + +enum wxAuiToolBarStyle +{ + wxAUI_TB_TEXT = 1 << 0, + wxAUI_TB_NO_TOOLTIPS = 1 << 1, + wxAUI_TB_NO_AUTORESIZE = 1 << 2, + wxAUI_TB_GRIPPER = 1 << 3, + wxAUI_TB_OVERFLOW = 1 << 4, + // using this style forces the toolbar to be vertical and + // be only dockable to the left or right sides of the window + // whereas by default it can be horizontal or vertical and + // be docked anywhere + wxAUI_TB_VERTICAL = 1 << 5, + wxAUI_TB_HORZ_LAYOUT = 1 << 6, + // analogous to wxAUI_TB_VERTICAL, but forces the toolbar + // to be horizontal + wxAUI_TB_HORIZONTAL = 1 << 7, + wxAUI_TB_PLAIN_BACKGROUND = 1 << 8, + wxAUI_TB_HORZ_TEXT = (wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT), + wxAUI_ORIENTATION_MASK = (wxAUI_TB_VERTICAL | wxAUI_TB_HORIZONTAL), + wxAUI_TB_DEFAULT_STYLE = 0 +}; + +enum wxAuiToolBarArtSetting +{ + wxAUI_TBART_SEPARATOR_SIZE = 0, + wxAUI_TBART_GRIPPER_SIZE = 1, + wxAUI_TBART_OVERFLOW_SIZE = 2 +}; + +enum wxAuiToolBarToolTextOrientation +{ + wxAUI_TBTOOL_TEXT_LEFT = 0, // unused/unimplemented + wxAUI_TBTOOL_TEXT_RIGHT = 1, + wxAUI_TBTOOL_TEXT_TOP = 2, // unused/unimplemented + wxAUI_TBTOOL_TEXT_BOTTOM = 3 +}; + + +// aui toolbar event class + +class WXDLLIMPEXP_AUI wxAuiToolBarEvent : public wxNotifyEvent +{ +public: + wxAuiToolBarEvent(wxEventType commandType = wxEVT_NULL, + int winId = 0) + : wxNotifyEvent(commandType, winId) + { + m_isDropdownClicked = false; + m_clickPt = wxPoint(-1, -1); + m_rect = wxRect(-1,-1, 0, 0); + m_toolId = -1; + } +#ifndef SWIG + wxAuiToolBarEvent(const wxAuiToolBarEvent& c) : wxNotifyEvent(c) + { + m_isDropdownClicked = c.m_isDropdownClicked; + m_clickPt = c.m_clickPt; + m_rect = c.m_rect; + m_toolId = c.m_toolId; + } +#endif + wxEvent *Clone() const { return new wxAuiToolBarEvent(*this); } + + bool IsDropDownClicked() const { return m_isDropdownClicked; } + void SetDropDownClicked(bool c) { m_isDropdownClicked = c; } + + wxPoint GetClickPoint() const { return m_clickPt; } + void SetClickPoint(const wxPoint& p) { m_clickPt = p; } + + wxRect GetItemRect() const { return m_rect; } + void SetItemRect(const wxRect& r) { m_rect = r; } + + int GetToolId() const { return m_toolId; } + void SetToolId(int toolId) { m_toolId = toolId; } + +private: + + bool m_isDropdownClicked; + wxPoint m_clickPt; + wxRect m_rect; + int m_toolId; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent) +}; + + +class WXDLLIMPEXP_AUI wxAuiToolBarItem +{ + friend class wxAuiToolBar; + +public: + + wxAuiToolBarItem() + { + m_window = NULL; + m_sizerItem = NULL; + m_spacerPixels = 0; + m_toolId = 0; + m_kind = wxITEM_NORMAL; + m_state = 0; // normal, enabled + m_proportion = 0; + m_active = true; + m_dropDown = true; + m_sticky = true; + m_userData = 0; + m_alignment = wxALIGN_CENTER; + } + + wxAuiToolBarItem(const wxAuiToolBarItem& c) + { + Assign(c); + } + + wxAuiToolBarItem& operator=(const wxAuiToolBarItem& c) + { + Assign(c); + return *this; + } + + void Assign(const wxAuiToolBarItem& c) + { + m_window = c.m_window; + m_label = c.m_label; + m_bitmap = c.m_bitmap; + m_disabledBitmap = c.m_disabledBitmap; + m_hoverBitmap = c.m_hoverBitmap; + m_shortHelp = c.m_shortHelp; + m_longHelp = c.m_longHelp; + m_sizerItem = c.m_sizerItem; + m_minSize = c.m_minSize; + m_spacerPixels = c.m_spacerPixels; + m_toolId = c.m_toolId; + m_kind = c.m_kind; + m_state = c.m_state; + m_proportion = c.m_proportion; + m_active = c.m_active; + m_dropDown = c.m_dropDown; + m_sticky = c.m_sticky; + m_userData = c.m_userData; + m_alignment = c.m_alignment; + } + + + void SetWindow(wxWindow* w) { m_window = w; } + wxWindow* GetWindow() { return m_window; } + + void SetId(int newId) { m_toolId = newId; } + int GetId() const { return m_toolId; } + + void SetKind(int newKind) { m_kind = newKind; } + int GetKind() const { return m_kind; } + + void SetState(int newState) { m_state = newState; } + int GetState() const { return m_state; } + + void SetSizerItem(wxSizerItem* s) { m_sizerItem = s; } + wxSizerItem* GetSizerItem() const { return m_sizerItem; } + + void SetLabel(const wxString& s) { m_label = s; } + const wxString& GetLabel() const { return m_label; } + + void SetBitmap(const wxBitmap& bmp) { m_bitmap = bmp; } + const wxBitmap& GetBitmap() const { return m_bitmap; } + + void SetDisabledBitmap(const wxBitmap& bmp) { m_disabledBitmap = bmp; } + const wxBitmap& GetDisabledBitmap() const { return m_disabledBitmap; } + + void SetHoverBitmap(const wxBitmap& bmp) { m_hoverBitmap = bmp; } + const wxBitmap& GetHoverBitmap() const { return m_hoverBitmap; } + + void SetShortHelp(const wxString& s) { m_shortHelp = s; } + const wxString& GetShortHelp() const { return m_shortHelp; } + + void SetLongHelp(const wxString& s) { m_longHelp = s; } + const wxString& GetLongHelp() const { return m_longHelp; } + + void SetMinSize(const wxSize& s) { m_minSize = s; } + const wxSize& GetMinSize() const { return m_minSize; } + + void SetSpacerPixels(int s) { m_spacerPixels = s; } + int GetSpacerPixels() const { return m_spacerPixels; } + + void SetProportion(int p) { m_proportion = p; } + int GetProportion() const { return m_proportion; } + + void SetActive(bool b) { m_active = b; } + bool IsActive() const { return m_active; } + + void SetHasDropDown(bool b) + { + wxCHECK_RET( !b || m_kind == wxITEM_NORMAL, + wxS("Only normal tools can have drop downs") ); + + m_dropDown = b; + } + + bool HasDropDown() const { return m_dropDown; } + + void SetSticky(bool b) { m_sticky = b; } + bool IsSticky() const { return m_sticky; } + + void SetUserData(long l) { m_userData = l; } + long GetUserData() const { return m_userData; } + + void SetAlignment(int l) { m_alignment = l; } + int GetAlignment() const { return m_alignment; } + +private: + + wxWindow* m_window; // item's associated window + wxString m_label; // label displayed on the item + wxBitmap m_bitmap; // item's bitmap + wxBitmap m_disabledBitmap; // item's disabled bitmap + wxBitmap m_hoverBitmap; // item's hover bitmap + wxString m_shortHelp; // short help (for tooltip) + wxString m_longHelp; // long help (for status bar) + wxSizerItem* m_sizerItem; // sizer item + wxSize m_minSize; // item's minimum size + int m_spacerPixels; // size of a spacer + int m_toolId; // item's id + int m_kind; // item's kind + int m_state; // state + int m_proportion; // proportion + bool m_active; // true if the item is currently active + bool m_dropDown; // true if the item has a dropdown button + bool m_sticky; // overrides button states if true (always active) + long m_userData; // user-specified data + int m_alignment; // sizer alignment flag, defaults to wxCENTER, may be wxEXPAND or any other +}; + +#ifndef SWIG +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiToolBarItem, wxAuiToolBarItemArray, WXDLLIMPEXP_AUI); +#endif + + + + +// tab art class + +class WXDLLIMPEXP_AUI wxAuiToolBarArt +{ +public: + + wxAuiToolBarArt() { } + virtual ~wxAuiToolBarArt() { } + + virtual wxAuiToolBarArt* Clone() = 0; + virtual void SetFlags(unsigned int flags) = 0; + virtual unsigned int GetFlags() = 0; + virtual void SetFont(const wxFont& font) = 0; + virtual wxFont GetFont() = 0; + virtual void SetTextOrientation(int orientation) = 0; + virtual int GetTextOrientation() = 0; + + virtual void DrawBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawPlainBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawLabel( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item, + const wxRect& rect) = 0; + + virtual void DrawButton( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item, + const wxRect& rect) = 0; + + virtual void DrawDropDownButton( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item, + const wxRect& rect) = 0; + + virtual void DrawControlLabel( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item, + const wxRect& rect) = 0; + + virtual void DrawSeparator( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawGripper( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawOverflowButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + int state) = 0; + + virtual wxSize GetLabelSize( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item) = 0; + + virtual wxSize GetToolSize( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item) = 0; + + virtual int GetElementSize(int elementId) = 0; + virtual void SetElementSize(int elementId, int size) = 0; + + virtual int ShowDropDown( + wxWindow* wnd, + const wxAuiToolBarItemArray& items) = 0; +}; + + + +class WXDLLIMPEXP_AUI wxAuiDefaultToolBarArt : public wxAuiToolBarArt +{ + +public: + + wxAuiDefaultToolBarArt(); + virtual ~wxAuiDefaultToolBarArt(); + + virtual wxAuiToolBarArt* Clone(); + virtual void SetFlags(unsigned int flags); + virtual unsigned int GetFlags(); + virtual void SetFont(const wxFont& font); + virtual wxFont GetFont(); + virtual void SetTextOrientation(int orientation); + virtual int GetTextOrientation(); + + virtual void DrawBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + virtual void DrawPlainBackground(wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + virtual void DrawLabel( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item, + const wxRect& rect); + + virtual void DrawButton( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item, + const wxRect& rect); + + virtual void DrawDropDownButton( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item, + const wxRect& rect); + + virtual void DrawControlLabel( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item, + const wxRect& rect); + + virtual void DrawSeparator( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + virtual void DrawGripper( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + virtual void DrawOverflowButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + int state); + + virtual wxSize GetLabelSize( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item); + + virtual wxSize GetToolSize( + wxDC& dc, + wxWindow* wnd, + const wxAuiToolBarItem& item); + + virtual int GetElementSize(int element); + virtual void SetElementSize(int elementId, int size); + + virtual int ShowDropDown(wxWindow* wnd, + const wxAuiToolBarItemArray& items); + +protected: + + wxBitmap m_buttonDropDownBmp; + wxBitmap m_disabledButtonDropDownBmp; + wxBitmap m_overflowBmp; + wxBitmap m_disabledOverflowBmp; + wxColour m_baseColour; + wxColour m_highlightColour; + wxFont m_font; + unsigned int m_flags; + int m_textOrientation; + + wxPen m_gripperPen1; + wxPen m_gripperPen2; + wxPen m_gripperPen3; + + int m_separatorSize; + int m_gripperSize; + int m_overflowSize; +}; + + + + +class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl +{ +public: + wxAuiToolBar() { Init(); } + + wxAuiToolBar(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxAUI_TB_DEFAULT_STYLE) + { + Init(); + Create(parent, id, pos, size, style); + } + + virtual ~wxAuiToolBar(); + + bool Create(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxAUI_TB_DEFAULT_STYLE); + + virtual void SetWindowStyleFlag(long style); + + void SetArtProvider(wxAuiToolBarArt* art); + wxAuiToolBarArt* GetArtProvider() const; + + bool SetFont(const wxFont& font); + + + wxAuiToolBarItem* AddTool(int toolId, + const wxString& label, + const wxBitmap& bitmap, + const wxString& shortHelpString = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL); + + wxAuiToolBarItem* AddTool(int toolId, + const wxString& label, + const wxBitmap& bitmap, + const wxBitmap& disabledBitmap, + wxItemKind kind, + const wxString& shortHelpString, + const wxString& longHelpString, + wxObject* clientData); + + wxAuiToolBarItem* AddTool(int toolId, + const wxBitmap& bitmap, + const wxBitmap& disabledBitmap, + bool toggle = false, + wxObject* clientData = NULL, + const wxString& shortHelpString = wxEmptyString, + const wxString& longHelpString = wxEmptyString) + { + return AddTool(toolId, + wxEmptyString, + bitmap, + disabledBitmap, + toggle ? wxITEM_CHECK : wxITEM_NORMAL, + shortHelpString, + longHelpString, + clientData); + } + + wxAuiToolBarItem* AddLabel(int toolId, + const wxString& label = wxEmptyString, + const int width = -1); + wxAuiToolBarItem* AddControl(wxControl* control, + const wxString& label = wxEmptyString); + wxAuiToolBarItem* AddSeparator(); + wxAuiToolBarItem* AddSpacer(int pixels); + wxAuiToolBarItem* AddStretchSpacer(int proportion = 1); + + bool Realize(); + + wxControl* FindControl(int windowId); + wxAuiToolBarItem* FindToolByPosition(wxCoord x, wxCoord y) const; + wxAuiToolBarItem* FindToolByIndex(int idx) const; + wxAuiToolBarItem* FindTool(int toolId) const; + + void ClearTools() { Clear() ; } + void Clear(); + bool DeleteTool(int toolId); + bool DeleteByIndex(int toolId); + + size_t GetToolCount() const; + int GetToolPos(int toolId) const { return GetToolIndex(toolId); } + int GetToolIndex(int toolId) const; + bool GetToolFits(int toolId) const; + wxRect GetToolRect(int toolId) const; + bool GetToolFitsByIndex(int toolId) const; + bool GetToolBarFits() const; + + void SetMargins(const wxSize& size) { SetMargins(size.x, size.x, size.y, size.y); } + void SetMargins(int x, int y) { SetMargins(x, x, y, y); } + void SetMargins(int left, int right, int top, int bottom); + + void SetToolBitmapSize(const wxSize& size); + wxSize GetToolBitmapSize() const; + + bool GetOverflowVisible() const; + void SetOverflowVisible(bool visible); + + bool GetGripperVisible() const; + void SetGripperVisible(bool visible); + + void ToggleTool(int toolId, bool state); + bool GetToolToggled(int toolId) const; + + void EnableTool(int toolId, bool state); + bool GetToolEnabled(int toolId) const; + + void SetToolDropDown(int toolId, bool dropdown); + bool GetToolDropDown(int toolId) const; + + void SetToolBorderPadding(int padding); + int GetToolBorderPadding() const; + + void SetToolTextOrientation(int orientation); + int GetToolTextOrientation() const; + + void SetToolPacking(int packing); + int GetToolPacking() const; + + void SetToolProportion(int toolId, int proportion); + int GetToolProportion(int toolId) const; + + void SetToolSeparation(int separation); + int GetToolSeparation() const; + + void SetToolSticky(int toolId, bool sticky); + bool GetToolSticky(int toolId) const; + + wxString GetToolLabel(int toolId) const; + void SetToolLabel(int toolId, const wxString& label); + + wxBitmap GetToolBitmap(int toolId) const; + void SetToolBitmap(int toolId, const wxBitmap& bitmap); + + wxString GetToolShortHelp(int toolId) const; + void SetToolShortHelp(int toolId, const wxString& helpString); + + wxString GetToolLongHelp(int toolId) const; + void SetToolLongHelp(int toolId, const wxString& helpString); + + void SetCustomOverflowItems(const wxAuiToolBarItemArray& prepend, + const wxAuiToolBarItemArray& append); + + // get size of hint rectangle for a particular dock location + wxSize GetHintSize(int dockDirection) const; + bool IsPaneValid(const wxAuiPaneInfo& pane) const; + + // Override to call DoIdleUpdate(). + virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE); + +protected: + void Init(); + + virtual void OnCustomRender(wxDC& WXUNUSED(dc), + const wxAuiToolBarItem& WXUNUSED(item), + const wxRect& WXUNUSED(rect)) { } + +protected: + + void DoIdleUpdate(); + void SetOrientation(int orientation); + void SetHoverItem(wxAuiToolBarItem* item); + void SetPressedItem(wxAuiToolBarItem* item); + void RefreshOverflowState(); + + int GetOverflowState() const; + wxRect GetOverflowRect() const; + wxSize GetLabelSize(const wxString& label); + wxAuiToolBarItem* FindToolByPositionWithPacking(wxCoord x, wxCoord y) const; + + void DoSetSize(int x, + int y, + int width, + int height, + int sizeFlags = wxSIZE_AUTO); + +protected: // handlers + + void OnSize(wxSizeEvent& evt); + void OnIdle(wxIdleEvent& evt); + void OnPaint(wxPaintEvent& evt); + void OnEraseBackground(wxEraseEvent& evt); + void OnLeftDown(wxMouseEvent& evt); + void OnLeftUp(wxMouseEvent& evt); + void OnRightDown(wxMouseEvent& evt); + void OnRightUp(wxMouseEvent& evt); + void OnMiddleDown(wxMouseEvent& evt); + void OnMiddleUp(wxMouseEvent& evt); + void OnMotion(wxMouseEvent& evt); + void OnLeaveWindow(wxMouseEvent& evt); + void OnCaptureLost(wxMouseCaptureLostEvent& evt); + void OnSetCursor(wxSetCursorEvent& evt); + +protected: + + wxAuiToolBarItemArray m_items; // array of toolbar items + wxAuiToolBarArt* m_art; // art provider + wxBoxSizer* m_sizer; // main sizer for toolbar + wxAuiToolBarItem* m_actionItem; // item that's being acted upon (pressed) + wxAuiToolBarItem* m_tipItem; // item that has its tooltip shown + wxBitmap m_bitmap; // double-buffer bitmap + wxSizerItem* m_gripperSizerItem; + wxSizerItem* m_overflowSizerItem; + wxSize m_absoluteMinSize; + wxPoint m_actionPos; // position of left-mouse down + wxAuiToolBarItemArray m_customOverflowPrepend; + wxAuiToolBarItemArray m_customOverflowAppend; + + int m_buttonWidth; + int m_buttonHeight; + int m_sizerElementCount; + int m_leftPadding; + int m_rightPadding; + int m_topPadding; + int m_bottomPadding; + int m_toolPacking; + int m_toolBorderPadding; + int m_toolTextOrientation; + int m_overflowState; + bool m_dragging; + bool m_gripperVisible; + bool m_overflowVisible; + + bool RealizeHelper(wxClientDC& dc, bool horizontal); + static bool IsPaneValid(long style, const wxAuiPaneInfo& pane); + bool IsPaneValid(long style) const; + void SetArtFlags() const; + wxOrientation m_orientation; + wxSize m_horzHintSize; + wxSize m_vertHintSize; + +private: + // Common part of OnLeaveWindow() and OnCaptureLost(). + void DoResetMouseState(); + + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxAuiToolBar) +}; + + + + +// wx event machinery + +#ifndef SWIG + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent ); + +typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&); + +#define wxAuiToolBarEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxAuiToolBarEventFunction, func) + +#define EVT_AUITOOLBAR_TOOL_DROPDOWN(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, winid, wxAuiToolBarEventHandler(fn)) +#define EVT_AUITOOLBAR_OVERFLOW_CLICK(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_OVERFLOW_CLICK, winid, wxAuiToolBarEventHandler(fn)) +#define EVT_AUITOOLBAR_RIGHT_CLICK(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_RIGHT_CLICK, winid, wxAuiToolBarEventHandler(fn)) +#define EVT_AUITOOLBAR_MIDDLE_CLICK(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_MIDDLE_CLICK, winid, wxAuiToolBarEventHandler(fn)) +#define EVT_AUITOOLBAR_BEGIN_DRAG(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_BEGIN_DRAG, winid, wxAuiToolBarEventHandler(fn)) + +#else + +// wxpython/swig event work +%constant wxEventType wxEVT_AUITOOLBAR_TOOL_DROPDOWN; +%constant wxEventType wxEVT_AUITOOLBAR_OVERFLOW_CLICK; +%constant wxEventType wxEVT_AUITOOLBAR_RIGHT_CLICK; +%constant wxEventType wxEVT_AUITOOLBAR_MIDDLE_CLICK; +%constant wxEventType wxEVT_AUITOOLBAR_BEGIN_DRAG; + +%pythoncode { + EVT_AUITOOLBAR_TOOL_DROPDOWN = wx.PyEventBinder( wxEVT_AUITOOLBAR_TOOL_DROPDOWN, 1 ) + EVT_AUITOOLBAR_OVERFLOW_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_OVERFLOW_CLICK, 1 ) + EVT_AUITOOLBAR_RIGHT_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_RIGHT_CLICK, 1 ) + EVT_AUITOOLBAR_MIDDLE_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_MIDDLE_CLICK, 1 ) + EVT_AUITOOLBAR_BEGIN_DRAG = wx.PyEventBinder( wxEVT_AUITOOLBAR_BEGIN_DRAG, 1 ) +} +#endif // SWIG + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN wxEVT_AUITOOLBAR_TOOL_DROPDOWN +#define wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK wxEVT_AUITOOLBAR_OVERFLOW_CLICK +#define wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK wxEVT_AUITOOLBAR_RIGHT_CLICK +#define wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK wxEVT_AUITOOLBAR_MIDDLE_CLICK +#define wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG wxEVT_AUITOOLBAR_BEGIN_DRAG + +#endif // wxUSE_AUI +#endif // _WX_AUIBAR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/auibook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/auibook.h new file mode 100644 index 0000000000..17b3fdae9f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/auibook.h @@ -0,0 +1,556 @@ +////////////////////////////////////////////////////////////////////////////// +// Name: wx/aui/auibook.h +// Purpose: wxaui: wx advanced user interface - notebook +// Author: Benjamin I. Williams +// Modified by: Jens Lody +// Created: 2006-06-28 +// Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved. +// Licence: wxWindows Library Licence, Version 3.1 +/////////////////////////////////////////////////////////////////////////////// + + + +#ifndef _WX_AUINOTEBOOK_H_ +#define _WX_AUINOTEBOOK_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_AUI + +#include "wx/aui/tabart.h" +#include "wx/aui/framemanager.h" +#include "wx/bookctrl.h" +#include "wx/containr.h" + + +class wxAuiNotebook; + + +enum wxAuiNotebookOption +{ + wxAUI_NB_TOP = 1 << 0, + wxAUI_NB_LEFT = 1 << 1, // not implemented yet + wxAUI_NB_RIGHT = 1 << 2, // not implemented yet + wxAUI_NB_BOTTOM = 1 << 3, + wxAUI_NB_TAB_SPLIT = 1 << 4, + wxAUI_NB_TAB_MOVE = 1 << 5, + wxAUI_NB_TAB_EXTERNAL_MOVE = 1 << 6, + wxAUI_NB_TAB_FIXED_WIDTH = 1 << 7, + wxAUI_NB_SCROLL_BUTTONS = 1 << 8, + wxAUI_NB_WINDOWLIST_BUTTON = 1 << 9, + wxAUI_NB_CLOSE_BUTTON = 1 << 10, + wxAUI_NB_CLOSE_ON_ACTIVE_TAB = 1 << 11, + wxAUI_NB_CLOSE_ON_ALL_TABS = 1 << 12, + wxAUI_NB_MIDDLE_CLICK_CLOSE = 1 << 13, + + wxAUI_NB_DEFAULT_STYLE = wxAUI_NB_TOP | + wxAUI_NB_TAB_SPLIT | + wxAUI_NB_TAB_MOVE | + wxAUI_NB_SCROLL_BUTTONS | + wxAUI_NB_CLOSE_ON_ACTIVE_TAB | + wxAUI_NB_MIDDLE_CLICK_CLOSE +}; + + + + +// aui notebook event class + +class WXDLLIMPEXP_AUI wxAuiNotebookEvent : public wxBookCtrlEvent +{ +public: + wxAuiNotebookEvent(wxEventType commandType = wxEVT_NULL, + int winId = 0) + : wxBookCtrlEvent(commandType, winId) + { + m_dragSource = NULL; + } +#ifndef SWIG + wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxBookCtrlEvent(c) + { + m_dragSource = c.m_dragSource; + } +#endif + wxEvent *Clone() const { return new wxAuiNotebookEvent(*this); } + + void SetDragSource(wxAuiNotebook* s) { m_dragSource = s; } + wxAuiNotebook* GetDragSource() const { return m_dragSource; } + +private: + wxAuiNotebook* m_dragSource; + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiNotebookEvent) +#endif +}; + + +class WXDLLIMPEXP_AUI wxAuiNotebookPage +{ +public: + wxWindow* window; // page's associated window + wxString caption; // caption displayed on the tab + wxString tooltip; // tooltip displayed when hovering over tab title + wxBitmap bitmap; // tab's bitmap + wxRect rect; // tab's hit rectangle + bool active; // true if the page is currently active +}; + +class WXDLLIMPEXP_AUI wxAuiTabContainerButton +{ +public: + + int id; // button's id + int curState; // current state (normal, hover, pressed, etc.) + int location; // buttons location (wxLEFT, wxRIGHT, or wxCENTER) + wxBitmap bitmap; // button's hover bitmap + wxBitmap disBitmap; // button's disabled bitmap + wxRect rect; // button's hit rectangle +}; + + +#ifndef SWIG +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiNotebookPage, wxAuiNotebookPageArray, WXDLLIMPEXP_AUI); +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiTabContainerButton, wxAuiTabContainerButtonArray, WXDLLIMPEXP_AUI); +#endif + + +class WXDLLIMPEXP_AUI wxAuiTabContainer +{ +public: + + wxAuiTabContainer(); + virtual ~wxAuiTabContainer(); + + void SetArtProvider(wxAuiTabArt* art); + wxAuiTabArt* GetArtProvider() const; + + void SetFlags(unsigned int flags); + unsigned int GetFlags() const; + + bool AddPage(wxWindow* page, const wxAuiNotebookPage& info); + bool InsertPage(wxWindow* page, const wxAuiNotebookPage& info, size_t idx); + bool MovePage(wxWindow* page, size_t newIdx); + bool RemovePage(wxWindow* page); + bool SetActivePage(wxWindow* page); + bool SetActivePage(size_t page); + void SetNoneActive(); + int GetActivePage() const; + bool TabHitTest(int x, int y, wxWindow** hit) const; + bool ButtonHitTest(int x, int y, wxAuiTabContainerButton** hit) const; + wxWindow* GetWindowFromIdx(size_t idx) const; + int GetIdxFromWindow(wxWindow* page) const; + size_t GetPageCount() const; + wxAuiNotebookPage& GetPage(size_t idx); + const wxAuiNotebookPage& GetPage(size_t idx) const; + wxAuiNotebookPageArray& GetPages(); + void SetNormalFont(const wxFont& normalFont); + void SetSelectedFont(const wxFont& selectedFont); + void SetMeasuringFont(const wxFont& measuringFont); + void SetColour(const wxColour& colour); + void SetActiveColour(const wxColour& colour); + void DoShowHide(); + void SetRect(const wxRect& rect); + + void RemoveButton(int id); + void AddButton(int id, + int location, + const wxBitmap& normalBitmap = wxNullBitmap, + const wxBitmap& disabledBitmap = wxNullBitmap); + + size_t GetTabOffset() const; + void SetTabOffset(size_t offset); + + // Is the tab visible? + bool IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWindow* wnd); + + // Make the tab visible if it wasn't already + void MakeTabVisible(int tabPage, wxWindow* win); + +protected: + + virtual void Render(wxDC* dc, wxWindow* wnd); + +protected: + + wxAuiTabArt* m_art; + wxAuiNotebookPageArray m_pages; + wxAuiTabContainerButtonArray m_buttons; + wxAuiTabContainerButtonArray m_tabCloseButtons; + wxRect m_rect; + size_t m_tabOffset; + unsigned int m_flags; +}; + + + +class WXDLLIMPEXP_AUI wxAuiTabCtrl : public wxControl, + public wxAuiTabContainer +{ +public: + + wxAuiTabCtrl(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + + ~wxAuiTabCtrl(); + + bool IsDragging() const { return m_isDragging; } + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + void OnPaint(wxPaintEvent& evt); + void OnEraseBackground(wxEraseEvent& evt); + void OnSize(wxSizeEvent& evt); + void OnLeftDown(wxMouseEvent& evt); + void OnLeftDClick(wxMouseEvent& evt); + void OnLeftUp(wxMouseEvent& evt); + void OnMiddleDown(wxMouseEvent& evt); + void OnMiddleUp(wxMouseEvent& evt); + void OnRightDown(wxMouseEvent& evt); + void OnRightUp(wxMouseEvent& evt); + void OnMotion(wxMouseEvent& evt); + void OnLeaveWindow(wxMouseEvent& evt); + void OnButton(wxAuiNotebookEvent& evt); + void OnSetFocus(wxFocusEvent& event); + void OnKillFocus(wxFocusEvent& event); + void OnChar(wxKeyEvent& event); + void OnCaptureLost(wxMouseCaptureLostEvent& evt); + +protected: + + wxPoint m_clickPt; + wxWindow* m_clickTab; + bool m_isDragging; + wxAuiTabContainerButton* m_hoverButton; + wxAuiTabContainerButton* m_pressedButton; + +#ifndef SWIG + DECLARE_CLASS(wxAuiTabCtrl) + DECLARE_EVENT_TABLE() +#endif +}; + + + + +class WXDLLIMPEXP_AUI wxAuiNotebook : public wxNavigationEnabled +{ + +public: + + wxAuiNotebook() { Init(); } + + wxAuiNotebook(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxAUI_NB_DEFAULT_STYLE) + { + Init(); + Create(parent, id, pos, size, style); + } + + virtual ~wxAuiNotebook(); + + bool Create(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + + void SetWindowStyleFlag(long style); + void SetArtProvider(wxAuiTabArt* art); + wxAuiTabArt* GetArtProvider() const; + + virtual void SetUniformBitmapSize(const wxSize& size); + virtual void SetTabCtrlHeight(int height); + + bool AddPage(wxWindow* page, + const wxString& caption, + bool select = false, + const wxBitmap& bitmap = wxNullBitmap); + + bool InsertPage(size_t pageIdx, + wxWindow* page, + const wxString& caption, + bool select = false, + const wxBitmap& bitmap = wxNullBitmap); + + bool DeletePage(size_t page); + bool RemovePage(size_t page); + + virtual size_t GetPageCount() const; + virtual wxWindow* GetPage(size_t pageIdx) const; + int GetPageIndex(wxWindow* pageWnd) const; + + bool SetPageText(size_t page, const wxString& text); + wxString GetPageText(size_t pageIdx) const; + + bool SetPageToolTip(size_t page, const wxString& text); + wxString GetPageToolTip(size_t pageIdx) const; + + bool SetPageBitmap(size_t page, const wxBitmap& bitmap); + wxBitmap GetPageBitmap(size_t pageIdx) const; + + int SetSelection(size_t newPage); + int GetSelection() const; + + virtual void Split(size_t page, int direction); + + const wxAuiManager& GetAuiManager() const { return m_mgr; } + + // Sets the normal font + void SetNormalFont(const wxFont& font); + + // Sets the selected tab font + void SetSelectedFont(const wxFont& font); + + // Sets the measuring font + void SetMeasuringFont(const wxFont& font); + + // Sets the tab font + virtual bool SetFont(const wxFont& font); + + // Gets the tab control height + int GetTabCtrlHeight() const; + + // Gets the height of the notebook for a given page height + int GetHeightForPageHeight(int pageHeight); + + // Shows the window menu + bool ShowWindowMenu(); + + // we do have multiple pages + virtual bool HasMultiplePages() const { return true; } + + // we don't want focus for ourselves + // virtual bool AcceptsFocus() const { return false; } + + //wxBookCtrlBase functions + + virtual void SetPageSize (const wxSize &size); + virtual int HitTest (const wxPoint &pt, long *flags=NULL) const; + + virtual int GetPageImage(size_t n) const; + virtual bool SetPageImage(size_t n, int imageId); + + virtual int ChangeSelection(size_t n); + + virtual bool AddPage(wxWindow *page, const wxString &text, bool select, + int imageId); + virtual bool DeleteAllPages(); + virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text, + bool select, int imageId); + +protected: + // Common part of all ctors. + void Init(); + + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // Redo sizing after thawing + virtual void DoThaw(); + + // these can be overridden + + // update the height, return true if it was done or false if the new height + // calculated by CalculateTabCtrlHeight() is the same as the old one + virtual bool UpdateTabCtrlHeight(); + + virtual int CalculateTabCtrlHeight(); + virtual wxSize CalculateNewSplitSize(); + + // remove the page and return a pointer to it + virtual wxWindow *DoRemovePage(size_t WXUNUSED(page)) { return NULL; } + + //A general selection function + virtual int DoModifySelection(size_t n, bool events); + +protected: + + void DoSizing(); + void InitNotebook(long style); + wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt); + wxWindow* GetTabFrameFromTabCtrl(wxWindow* tabCtrl); + wxAuiTabCtrl* GetActiveTabCtrl(); + bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx); + void RemoveEmptyTabFrames(); + void UpdateHintWindowSize(); + +protected: + + void OnChildFocusNotebook(wxChildFocusEvent& evt); + void OnRender(wxAuiManagerEvent& evt); + void OnSize(wxSizeEvent& evt); + void OnTabClicked(wxAuiNotebookEvent& evt); + void OnTabBeginDrag(wxAuiNotebookEvent& evt); + void OnTabDragMotion(wxAuiNotebookEvent& evt); + void OnTabEndDrag(wxAuiNotebookEvent& evt); + void OnTabCancelDrag(wxAuiNotebookEvent& evt); + void OnTabButton(wxAuiNotebookEvent& evt); + void OnTabMiddleDown(wxAuiNotebookEvent& evt); + void OnTabMiddleUp(wxAuiNotebookEvent& evt); + void OnTabRightDown(wxAuiNotebookEvent& evt); + void OnTabRightUp(wxAuiNotebookEvent& evt); + void OnTabBgDClick(wxAuiNotebookEvent& evt); + void OnNavigationKeyNotebook(wxNavigationKeyEvent& event); + + // set selection to the given window (which must be non-NULL and be one of + // our pages, otherwise an assert is raised) + void SetSelectionToWindow(wxWindow *win); + void SetSelectionToPage(const wxAuiNotebookPage& page) + { + SetSelectionToWindow(page.window); + } + +protected: + + wxAuiManager m_mgr; + wxAuiTabContainer m_tabs; + int m_curPage; + int m_tabIdCounter; + wxWindow* m_dummyWnd; + + wxSize m_requestedBmpSize; + int m_requestedTabCtrlHeight; + wxFont m_selectedFont; + wxFont m_normalFont; + int m_tabCtrlHeight; + + int m_lastDragX; + unsigned int m_flags; + +#ifndef SWIG + DECLARE_CLASS(wxAuiNotebook) + DECLARE_EVENT_TABLE() +#endif +}; + + + + +// wx event machinery + +#ifndef SWIG + +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_BUTTON, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_END_DRAG, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_ALLOW_DND, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_DRAG_DONE, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEvent); + +typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&); + +#define wxAuiNotebookEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxAuiNotebookEventFunction, func) + +#define EVT_AUINOTEBOOK_PAGE_CLOSE(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CLOSED, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_PAGE_CHANGED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CHANGED, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_PAGE_CHANGING(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CHANGING, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_BUTTON(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_BUTTON, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_BEGIN_DRAG(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_BEGIN_DRAG, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_END_DRAG(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_END_DRAG, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_DRAG_MOTION(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_DRAG_MOTION, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_DRAG_DONE(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_DRAG_DONE, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn)) +#define EVT_AUINOTEBOOK_BG_DCLICK(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_BG_DCLICK, winid, wxAuiNotebookEventHandler(fn)) +#else + +// wxpython/swig event work +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSE; +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSED; +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGED; +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGING; +%constant wxEventType wxEVT_AUINOTEBOOK_BUTTON; +%constant wxEventType wxEVT_AUINOTEBOOK_BEGIN_DRAG; +%constant wxEventType wxEVT_AUINOTEBOOK_END_DRAG; +%constant wxEventType wxEVT_AUINOTEBOOK_DRAG_MOTION; +%constant wxEventType wxEVT_AUINOTEBOOK_ALLOW_DND; +%constant wxEventType wxEVT_AUINOTEBOOK_DRAG_DONE; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_UP; +%constant wxEventType wxEVT_AUINOTEBOOK_BG_DCLICK; + +%pythoncode { + EVT_AUINOTEBOOK_PAGE_CLOSE = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CLOSE, 1 ) + EVT_AUINOTEBOOK_PAGE_CLOSED = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CLOSED, 1 ) + EVT_AUINOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CHANGED, 1 ) + EVT_AUINOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CHANGING, 1 ) + EVT_AUINOTEBOOK_BUTTON = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BUTTON, 1 ) + EVT_AUINOTEBOOK_BEGIN_DRAG = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BEGIN_DRAG, 1 ) + EVT_AUINOTEBOOK_END_DRAG = wx.PyEventBinder( wxEVT_AUINOTEBOOK_END_DRAG, 1 ) + EVT_AUINOTEBOOK_DRAG_MOTION = wx.PyEventBinder( wxEVT_AUINOTEBOOK_DRAG_MOTION, 1 ) + EVT_AUINOTEBOOK_ALLOW_DND = wx.PyEventBinder( wxEVT_AUINOTEBOOK_ALLOW_DND, 1 ) + EVT_AUINOTEBOOK_DRAG_DONE = wx.PyEventBinder( wxEVT_AUINOTEBOOK_DRAG_DONE, 1 ) + EVT__AUINOTEBOOK_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, 1 ) + EVT__AUINOTEBOOK_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, 1 ) + EVT__AUINOTEBOOK_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, 1 ) + EVT__AUINOTEBOOK_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, 1 ) + EVT_AUINOTEBOOK_BG_DCLICK = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BG_DCLICK, 1 ) +} +#endif + + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE wxEVT_AUINOTEBOOK_PAGE_CLOSE +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED wxEVT_AUINOTEBOOK_PAGE_CLOSED +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED wxEVT_AUINOTEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING wxEVT_AUINOTEBOOK_PAGE_CHANGING +#define wxEVT_COMMAND_AUINOTEBOOK_BUTTON wxEVT_AUINOTEBOOK_BUTTON +#define wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG wxEVT_AUINOTEBOOK_BEGIN_DRAG +#define wxEVT_COMMAND_AUINOTEBOOK_END_DRAG wxEVT_AUINOTEBOOK_END_DRAG +#define wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION wxEVT_AUINOTEBOOK_DRAG_MOTION +#define wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND wxEVT_AUINOTEBOOK_ALLOW_DND +#define wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE wxEVT_AUINOTEBOOK_DRAG_DONE +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP wxEVT_AUINOTEBOOK_TAB_RIGHT_UP +#define wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK wxEVT_AUINOTEBOOK_BG_DCLICK +#define wxEVT_COMMAND_AUINOTEBOOK_CANCEL_DRAG wxEVT_AUINOTEBOOK_CANCEL_DRAG + +#endif // wxUSE_AUI +#endif // _WX_AUINOTEBOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/dockart.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/dockart.h new file mode 100644 index 0000000000..744cad56c4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/dockart.h @@ -0,0 +1,178 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/aui/dockart.h +// Purpose: wxaui: wx advanced user interface - docking window manager +// Author: Benjamin I. Williams +// Modified by: +// Created: 2005-05-17 +// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. +// Licence: wxWindows Library Licence, Version 3.1 +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DOCKART_H_ +#define _WX_DOCKART_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_AUI + +#include "wx/pen.h" +#include "wx/brush.h" +#include "wx/bitmap.h" +#include "wx/colour.h" + +// dock art provider code - a dock provider provides all drawing +// functionality to the wxAui dock manager. This allows the dock +// manager to have plugable look-and-feels + +class WXDLLIMPEXP_AUI wxAuiDockArt +{ +public: + + wxAuiDockArt() { } + virtual ~wxAuiDockArt() { } + + virtual int GetMetric(int id) = 0; + virtual void SetMetric(int id, int newVal) = 0; + virtual void SetFont(int id, const wxFont& font) = 0; + virtual wxFont GetFont(int id) = 0; + virtual wxColour GetColour(int id) = 0; + virtual void SetColour(int id, const wxColor& colour) = 0; + wxColour GetColor(int id) { return GetColour(id); } + void SetColor(int id, const wxColour& color) { SetColour(id, color); } + + virtual void DrawSash(wxDC& dc, + wxWindow* window, + int orientation, + const wxRect& rect) = 0; + + virtual void DrawBackground(wxDC& dc, + wxWindow* window, + int orientation, + const wxRect& rect) = 0; + + virtual void DrawCaption(wxDC& dc, + wxWindow* window, + const wxString& text, + const wxRect& rect, + wxAuiPaneInfo& pane) = 0; + + virtual void DrawGripper(wxDC& dc, + wxWindow* window, + const wxRect& rect, + wxAuiPaneInfo& pane) = 0; + + virtual void DrawBorder(wxDC& dc, + wxWindow* window, + const wxRect& rect, + wxAuiPaneInfo& pane) = 0; + + virtual void DrawPaneButton(wxDC& dc, + wxWindow* window, + int button, + int buttonState, + const wxRect& rect, + wxAuiPaneInfo& pane) = 0; +}; + + +// this is the default art provider for wxAuiManager. Dock art +// can be customized by creating a class derived from this one, +// or replacing this class entirely + +class WXDLLIMPEXP_AUI wxAuiDefaultDockArt : public wxAuiDockArt +{ +public: + + wxAuiDefaultDockArt(); + + int GetMetric(int metricId); + void SetMetric(int metricId, int newVal); + wxColour GetColour(int id); + void SetColour(int id, const wxColor& colour); + void SetFont(int id, const wxFont& font); + wxFont GetFont(int id); + + void DrawSash(wxDC& dc, + wxWindow *window, + int orientation, + const wxRect& rect); + + void DrawBackground(wxDC& dc, + wxWindow *window, + int orientation, + const wxRect& rect); + + void DrawCaption(wxDC& dc, + wxWindow *window, + const wxString& text, + const wxRect& rect, + wxAuiPaneInfo& pane); + + void DrawGripper(wxDC& dc, + wxWindow *window, + const wxRect& rect, + wxAuiPaneInfo& pane); + + void DrawBorder(wxDC& dc, + wxWindow *window, + const wxRect& rect, + wxAuiPaneInfo& pane); + + void DrawPaneButton(wxDC& dc, + wxWindow *window, + int button, + int buttonState, + const wxRect& rect, + wxAuiPaneInfo& pane); + + void DrawIcon(wxDC& dc, + const wxRect& rect, + wxAuiPaneInfo& pane); + +protected: + + void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active); + + void InitBitmaps(); + +protected: + + wxPen m_borderPen; + wxBrush m_sashBrush; + wxBrush m_backgroundBrush; + wxBrush m_gripperBrush; + wxFont m_captionFont; + wxBitmap m_inactiveCloseBitmap; + wxBitmap m_inactivePinBitmap; + wxBitmap m_inactiveMaximizeBitmap; + wxBitmap m_inactiveRestoreBitmap; + wxBitmap m_activeCloseBitmap; + wxBitmap m_activePinBitmap; + wxBitmap m_activeMaximizeBitmap; + wxBitmap m_activeRestoreBitmap; + wxPen m_gripperPen1; + wxPen m_gripperPen2; + wxPen m_gripperPen3; + wxColour m_baseColour; + wxColour m_activeCaptionColour; + wxColour m_activeCaptionGradientColour; + wxColour m_activeCaptionTextColour; + wxColour m_inactiveCaptionColour; + wxColour m_inactiveCaptionGradientColour; + wxColour m_inactiveCaptionTextColour; + int m_borderSize; + int m_captionSize; + int m_sashSize; + int m_buttonSize; + int m_gripperSize; + int m_gradientType; +}; + + + +#endif // wxUSE_AUI +#endif //_WX_DOCKART_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/floatpane.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/floatpane.h new file mode 100644 index 0000000000..bf158933b8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/floatpane.h @@ -0,0 +1,80 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/aui/floatpane.h +// Purpose: wxaui: wx advanced user interface - docking window manager +// Author: Benjamin I. Williams +// Modified by: +// Created: 2005-05-17 +// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. +// Licence: wxWindows Library Licence, Version 3.1 +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FLOATPANE_H_ +#define _WX_FLOATPANE_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" +#include "wx/weakref.h" + +#if wxUSE_AUI + +#if wxUSE_MINIFRAME + #include "wx/minifram.h" + #define wxAuiFloatingFrameBaseClass wxMiniFrame +#else + #include "wx/frame.h" + #define wxAuiFloatingFrameBaseClass wxFrame +#endif + +class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass +{ +public: + wxAuiFloatingFrame(wxWindow* parent, + wxAuiManager* ownerMgr, + const wxAuiPaneInfo& pane, + wxWindowID id = wxID_ANY, + long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | + wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | + wxCLIP_CHILDREN + ); + virtual ~wxAuiFloatingFrame(); + void SetPaneWindow(const wxAuiPaneInfo& pane); + wxAuiManager* GetOwnerManager() const; + +protected: + virtual void OnMoveStart(); + virtual void OnMoving(const wxRect& windowRect, wxDirection dir); + virtual void OnMoveFinished(); + +private: + void OnSize(wxSizeEvent& event); + void OnClose(wxCloseEvent& event); + void OnMoveEvent(wxMoveEvent& event); + void OnIdle(wxIdleEvent& event); + void OnActivate(wxActivateEvent& event); + static bool isMouseDown(); + +private: + wxWindow* m_paneWindow; // pane window being managed + bool m_solidDrag; // true if system uses solid window drag + bool m_moving; + wxRect m_lastRect; + wxRect m_last2Rect; + wxRect m_last3Rect; + wxSize m_lastSize; + wxDirection m_lastDirection; + + wxWeakRef m_ownerMgr; + wxAuiManager m_mgr; + +#ifndef SWIG + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxAuiFloatingFrame) +#endif // SWIG +}; + +#endif // wxUSE_AUI +#endif //_WX_FLOATPANE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/framemanager.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/framemanager.h new file mode 100644 index 0000000000..4f6b4641b1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/framemanager.h @@ -0,0 +1,890 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/aui/framemanager.h +// Purpose: wxaui: wx advanced user interface - docking window manager +// Author: Benjamin I. Williams +// Modified by: +// Created: 2005-05-17 +// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. +// Licence: wxWindows Library Licence, Version 3.1 +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FRAMEMANAGER_H_ +#define _WX_FRAMEMANAGER_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_AUI + +#include "wx/dynarray.h" +#include "wx/gdicmn.h" +#include "wx/window.h" +#include "wx/timer.h" +#include "wx/sizer.h" +#include "wx/bitmap.h" + +enum wxAuiManagerDock +{ + wxAUI_DOCK_NONE = 0, + wxAUI_DOCK_TOP = 1, + wxAUI_DOCK_RIGHT = 2, + wxAUI_DOCK_BOTTOM = 3, + wxAUI_DOCK_LEFT = 4, + wxAUI_DOCK_CENTER = 5, + wxAUI_DOCK_CENTRE = wxAUI_DOCK_CENTER +}; + +enum wxAuiManagerOption +{ + wxAUI_MGR_ALLOW_FLOATING = 1 << 0, + wxAUI_MGR_ALLOW_ACTIVE_PANE = 1 << 1, + wxAUI_MGR_TRANSPARENT_DRAG = 1 << 2, + wxAUI_MGR_TRANSPARENT_HINT = 1 << 3, + wxAUI_MGR_VENETIAN_BLINDS_HINT = 1 << 4, + wxAUI_MGR_RECTANGLE_HINT = 1 << 5, + wxAUI_MGR_HINT_FADE = 1 << 6, + wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 1 << 7, + wxAUI_MGR_LIVE_RESIZE = 1 << 8, + + wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING | + wxAUI_MGR_TRANSPARENT_HINT | + wxAUI_MGR_HINT_FADE | + wxAUI_MGR_NO_VENETIAN_BLINDS_FADE +}; + + +enum wxAuiPaneDockArtSetting +{ + wxAUI_DOCKART_SASH_SIZE = 0, + wxAUI_DOCKART_CAPTION_SIZE = 1, + wxAUI_DOCKART_GRIPPER_SIZE = 2, + wxAUI_DOCKART_PANE_BORDER_SIZE = 3, + wxAUI_DOCKART_PANE_BUTTON_SIZE = 4, + wxAUI_DOCKART_BACKGROUND_COLOUR = 5, + wxAUI_DOCKART_SASH_COLOUR = 6, + wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR = 7, + wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR = 8, + wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR = 9, + wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR = 10, + wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR = 11, + wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR = 12, + wxAUI_DOCKART_BORDER_COLOUR = 13, + wxAUI_DOCKART_GRIPPER_COLOUR = 14, + wxAUI_DOCKART_CAPTION_FONT = 15, + wxAUI_DOCKART_GRADIENT_TYPE = 16 +}; + +enum wxAuiPaneDockArtGradients +{ + wxAUI_GRADIENT_NONE = 0, + wxAUI_GRADIENT_VERTICAL = 1, + wxAUI_GRADIENT_HORIZONTAL = 2 +}; + +enum wxAuiPaneButtonState +{ + wxAUI_BUTTON_STATE_NORMAL = 0, + wxAUI_BUTTON_STATE_HOVER = 1 << 1, + wxAUI_BUTTON_STATE_PRESSED = 1 << 2, + wxAUI_BUTTON_STATE_DISABLED = 1 << 3, + wxAUI_BUTTON_STATE_HIDDEN = 1 << 4, + wxAUI_BUTTON_STATE_CHECKED = 1 << 5 +}; + +enum wxAuiButtonId +{ + wxAUI_BUTTON_CLOSE = 101, + wxAUI_BUTTON_MAXIMIZE_RESTORE = 102, + wxAUI_BUTTON_MINIMIZE = 103, + wxAUI_BUTTON_PIN = 104, + wxAUI_BUTTON_OPTIONS = 105, + wxAUI_BUTTON_WINDOWLIST = 106, + wxAUI_BUTTON_LEFT = 107, + wxAUI_BUTTON_RIGHT = 108, + wxAUI_BUTTON_UP = 109, + wxAUI_BUTTON_DOWN = 110, + wxAUI_BUTTON_CUSTOM1 = 201, + wxAUI_BUTTON_CUSTOM2 = 202, + wxAUI_BUTTON_CUSTOM3 = 203 +}; + +enum wxAuiPaneInsertLevel +{ + wxAUI_INSERT_PANE = 0, + wxAUI_INSERT_ROW = 1, + wxAUI_INSERT_DOCK = 2 +}; + + + + +// forwards and array declarations +class wxAuiDockUIPart; +class wxAuiPaneButton; +class wxAuiPaneInfo; +class wxAuiDockInfo; +class wxAuiDockArt; +class wxAuiManagerEvent; + +#ifndef SWIG +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiDockInfo, wxAuiDockInfoArray, WXDLLIMPEXP_AUI); +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiDockUIPart, wxAuiDockUIPartArray, WXDLLIMPEXP_AUI); +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiPaneButton, wxAuiPaneButtonArray, WXDLLIMPEXP_AUI); +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiPaneInfo, wxAuiPaneInfoArray, WXDLLIMPEXP_AUI); +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxAuiPaneInfo*, wxAuiPaneInfoPtrArray, class WXDLLIMPEXP_AUI); +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxAuiDockInfo*, wxAuiDockInfoPtrArray, class WXDLLIMPEXP_AUI); +#endif // SWIG + +extern WXDLLIMPEXP_AUI wxAuiDockInfo wxAuiNullDockInfo; +extern WXDLLIMPEXP_AUI wxAuiPaneInfo wxAuiNullPaneInfo; + + + +class WXDLLIMPEXP_AUI wxAuiPaneInfo +{ +public: + + wxAuiPaneInfo() + { + window = NULL; + frame = NULL; + state = 0; + dock_direction = wxAUI_DOCK_LEFT; + dock_layer = 0; + dock_row = 0; + dock_pos = 0; + floating_pos = wxDefaultPosition; + floating_size = wxDefaultSize; + best_size = wxDefaultSize; + min_size = wxDefaultSize; + max_size = wxDefaultSize; + dock_proportion = 0; + + DefaultPane(); + } + + ~wxAuiPaneInfo() {} + +#ifndef SWIG + wxAuiPaneInfo(const wxAuiPaneInfo& c) + { + name = c.name; + caption = c.caption; + icon = c.icon; + window = c.window; + frame = c.frame; + state = c.state; + dock_direction = c.dock_direction; + dock_layer = c.dock_layer; + dock_row = c.dock_row; + dock_pos = c.dock_pos; + best_size = c.best_size; + min_size = c.min_size; + max_size = c.max_size; + floating_pos = c.floating_pos; + floating_size = c.floating_size; + dock_proportion = c.dock_proportion; + buttons = c.buttons; + rect = c.rect; + } + + wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c) + { + name = c.name; + caption = c.caption; + window = c.window; + frame = c.frame; + state = c.state; + dock_direction = c.dock_direction; + dock_layer = c.dock_layer; + dock_row = c.dock_row; + dock_pos = c.dock_pos; + best_size = c.best_size; + min_size = c.min_size; + max_size = c.max_size; + floating_pos = c.floating_pos; + floating_size = c.floating_size; + dock_proportion = c.dock_proportion; + buttons = c.buttons; + rect = c.rect; + return *this; + } +#endif // SWIG + + // Write the safe parts of a newly loaded PaneInfo structure "source" into "this" + // used on loading perspectives etc. + void SafeSet(wxAuiPaneInfo source) + { + // note source is not passed by reference so we can overwrite, to keep the + // unsafe bits of "dest" + source.window = window; + source.frame = frame; + source.buttons = buttons; + wxCHECK_RET(source.IsValid(), + "window settings and pane settings are incompatible"); + // now assign + *this = source; + } + + bool IsOk() const { return window != NULL; } + bool IsFixed() const { return !HasFlag(optionResizable); } + bool IsResizable() const { return HasFlag(optionResizable); } + bool IsShown() const { return !HasFlag(optionHidden); } + bool IsFloating() const { return HasFlag(optionFloating); } + bool IsDocked() const { return !HasFlag(optionFloating); } + bool IsToolbar() const { return HasFlag(optionToolbar); } + bool IsTopDockable() const { return HasFlag(optionTopDockable); } + bool IsBottomDockable() const { return HasFlag(optionBottomDockable); } + bool IsLeftDockable() const { return HasFlag(optionLeftDockable); } + bool IsRightDockable() const { return HasFlag(optionRightDockable); } + bool IsDockable() const + { + return HasFlag(optionTopDockable | optionBottomDockable | + optionLeftDockable | optionRightDockable); + } + bool IsFloatable() const { return HasFlag(optionFloatable); } + bool IsMovable() const { return HasFlag(optionMovable); } + bool IsDestroyOnClose() const { return HasFlag(optionDestroyOnClose); } + bool IsMaximized() const { return HasFlag(optionMaximized); } + bool HasCaption() const { return HasFlag(optionCaption); } + bool HasGripper() const { return HasFlag(optionGripper); } + bool HasBorder() const { return HasFlag(optionPaneBorder); } + bool HasCloseButton() const { return HasFlag(buttonClose); } + bool HasMaximizeButton() const { return HasFlag(buttonMaximize); } + bool HasMinimizeButton() const { return HasFlag(buttonMinimize); } + bool HasPinButton() const { return HasFlag(buttonPin); } + bool HasGripperTop() const { return HasFlag(optionGripperTop); } + +#ifdef SWIG + %typemap(out) wxAuiPaneInfo& { $result = $self; Py_INCREF($result); } +#endif + wxAuiPaneInfo& Window(wxWindow* w) + { + wxAuiPaneInfo test(*this); + test.window = w; + wxCHECK_MSG(test.IsValid(), *this, + "window settings and pane settings are incompatible"); + *this = test; + return *this; + } + wxAuiPaneInfo& Name(const wxString& n) { name = n; return *this; } + wxAuiPaneInfo& Caption(const wxString& c) { caption = c; return *this; } + wxAuiPaneInfo& Icon(const wxBitmap& b) { icon = b; return *this; } + wxAuiPaneInfo& Left() { dock_direction = wxAUI_DOCK_LEFT; return *this; } + wxAuiPaneInfo& Right() { dock_direction = wxAUI_DOCK_RIGHT; return *this; } + wxAuiPaneInfo& Top() { dock_direction = wxAUI_DOCK_TOP; return *this; } + wxAuiPaneInfo& Bottom() { dock_direction = wxAUI_DOCK_BOTTOM; return *this; } + wxAuiPaneInfo& Center() { dock_direction = wxAUI_DOCK_CENTER; return *this; } + wxAuiPaneInfo& Centre() { dock_direction = wxAUI_DOCK_CENTRE; return *this; } + wxAuiPaneInfo& Direction(int direction) { dock_direction = direction; return *this; } + wxAuiPaneInfo& Layer(int layer) { dock_layer = layer; return *this; } + wxAuiPaneInfo& Row(int row) { dock_row = row; return *this; } + wxAuiPaneInfo& Position(int pos) { dock_pos = pos; return *this; } + wxAuiPaneInfo& BestSize(const wxSize& size) { best_size = size; return *this; } + wxAuiPaneInfo& MinSize(const wxSize& size) { min_size = size; return *this; } + wxAuiPaneInfo& MaxSize(const wxSize& size) { max_size = size; return *this; } + wxAuiPaneInfo& BestSize(int x, int y) { best_size.Set(x,y); return *this; } + wxAuiPaneInfo& MinSize(int x, int y) { min_size.Set(x,y); return *this; } + wxAuiPaneInfo& MaxSize(int x, int y) { max_size.Set(x,y); return *this; } + wxAuiPaneInfo& FloatingPosition(const wxPoint& pos) { floating_pos = pos; return *this; } + wxAuiPaneInfo& FloatingPosition(int x, int y) { floating_pos.x = x; floating_pos.y = y; return *this; } + wxAuiPaneInfo& FloatingSize(const wxSize& size) { floating_size = size; return *this; } + wxAuiPaneInfo& FloatingSize(int x, int y) { floating_size.Set(x,y); return *this; } + wxAuiPaneInfo& Fixed() { return SetFlag(optionResizable, false); } + wxAuiPaneInfo& Resizable(bool resizable = true) { return SetFlag(optionResizable, resizable); } + wxAuiPaneInfo& Dock() { return SetFlag(optionFloating, false); } + wxAuiPaneInfo& Float() { return SetFlag(optionFloating, true); } + wxAuiPaneInfo& Hide() { return SetFlag(optionHidden, true); } + wxAuiPaneInfo& Show(bool show = true) { return SetFlag(optionHidden, !show); } + wxAuiPaneInfo& CaptionVisible(bool visible = true) { return SetFlag(optionCaption, visible); } + wxAuiPaneInfo& Maximize() { return SetFlag(optionMaximized, true); } + wxAuiPaneInfo& Restore() { return SetFlag(optionMaximized, false); } + wxAuiPaneInfo& PaneBorder(bool visible = true) { return SetFlag(optionPaneBorder, visible); } + wxAuiPaneInfo& Gripper(bool visible = true) { return SetFlag(optionGripper, visible); } + wxAuiPaneInfo& GripperTop(bool attop = true) { return SetFlag(optionGripperTop, attop); } + wxAuiPaneInfo& CloseButton(bool visible = true) { return SetFlag(buttonClose, visible); } + wxAuiPaneInfo& MaximizeButton(bool visible = true) { return SetFlag(buttonMaximize, visible); } + wxAuiPaneInfo& MinimizeButton(bool visible = true) { return SetFlag(buttonMinimize, visible); } + wxAuiPaneInfo& PinButton(bool visible = true) { return SetFlag(buttonPin, visible); } + wxAuiPaneInfo& DestroyOnClose(bool b = true) { return SetFlag(optionDestroyOnClose, b); } + wxAuiPaneInfo& TopDockable(bool b = true) { return SetFlag(optionTopDockable, b); } + wxAuiPaneInfo& BottomDockable(bool b = true) { return SetFlag(optionBottomDockable, b); } + wxAuiPaneInfo& LeftDockable(bool b = true) { return SetFlag(optionLeftDockable, b); } + wxAuiPaneInfo& RightDockable(bool b = true) { return SetFlag(optionRightDockable, b); } + wxAuiPaneInfo& Floatable(bool b = true) { return SetFlag(optionFloatable, b); } + wxAuiPaneInfo& Movable(bool b = true) { return SetFlag(optionMovable, b); } + wxAuiPaneInfo& DockFixed(bool b = true) { return SetFlag(optionDockFixed, b); } + + wxAuiPaneInfo& Dockable(bool b = true) + { + return TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b); + } + + wxAuiPaneInfo& DefaultPane() + { + wxAuiPaneInfo test(*this); + test.state |= optionTopDockable | optionBottomDockable | + optionLeftDockable | optionRightDockable | + optionFloatable | optionMovable | optionResizable | + optionCaption | optionPaneBorder | buttonClose; + wxCHECK_MSG(test.IsValid(), *this, + "window settings and pane settings are incompatible"); + *this = test; + return *this; + } + + wxAuiPaneInfo& CentrePane() { return CenterPane(); } + wxAuiPaneInfo& CenterPane() + { + state = 0; + return Center().PaneBorder().Resizable(); + } + + wxAuiPaneInfo& ToolbarPane() + { + DefaultPane(); + state |= (optionToolbar | optionGripper); + state &= ~(optionResizable | optionCaption); + if (dock_layer == 0) + dock_layer = 10; + return *this; + } + + wxAuiPaneInfo& SetFlag(int flag, bool option_state) + { + wxAuiPaneInfo test(*this); + if (option_state) + test.state |= flag; + else + test.state &= ~flag; + wxCHECK_MSG(test.IsValid(), *this, + "window settings and pane settings are incompatible"); + *this = test; + return *this; + } + + bool HasFlag(int flag) const + { + return (state & flag) != 0; + } + +#ifdef SWIG + %typemap(out) wxAuiPaneInfo& ; +#endif + +public: + + // NOTE: You can add and subtract flags from this list, + // but do not change the values of the flags, because + // they are stored in a binary integer format in the + // perspective string. If you really need to change the + // values around, you'll have to ensure backwards-compatibility + // in the perspective loading code. + enum wxAuiPaneState + { + optionFloating = 1 << 0, + optionHidden = 1 << 1, + optionLeftDockable = 1 << 2, + optionRightDockable = 1 << 3, + optionTopDockable = 1 << 4, + optionBottomDockable = 1 << 5, + optionFloatable = 1 << 6, + optionMovable = 1 << 7, + optionResizable = 1 << 8, + optionPaneBorder = 1 << 9, + optionCaption = 1 << 10, + optionGripper = 1 << 11, + optionDestroyOnClose = 1 << 12, + optionToolbar = 1 << 13, + optionActive = 1 << 14, + optionGripperTop = 1 << 15, + optionMaximized = 1 << 16, + optionDockFixed = 1 << 17, + + buttonClose = 1 << 21, + buttonMaximize = 1 << 22, + buttonMinimize = 1 << 23, + buttonPin = 1 << 24, + + buttonCustom1 = 1 << 26, + buttonCustom2 = 1 << 27, + buttonCustom3 = 1 << 28, + + savedHiddenState = 1 << 30, // used internally + actionPane = 1 << 31 // used internally + }; + +public: + wxString name; // name of the pane + wxString caption; // caption displayed on the window + wxBitmap icon; // icon of the pane, may be invalid + + wxWindow* window; // window that is in this pane + wxFrame* frame; // floating frame window that holds the pane + unsigned int state; // a combination of wxPaneState values + + int dock_direction; // dock direction (top, bottom, left, right, center) + int dock_layer; // layer number (0 = innermost layer) + int dock_row; // row number on the docking bar (0 = first row) + int dock_pos; // position inside the row (0 = first position) + + wxSize best_size; // size that the layout engine will prefer + wxSize min_size; // minimum size the pane window can tolerate + wxSize max_size; // maximum size the pane window can tolerate + + wxPoint floating_pos; // position while floating + wxSize floating_size; // size while floating + int dock_proportion; // proportion while docked + + wxAuiPaneButtonArray buttons; // buttons on the pane + + + wxRect rect; // current rectangle (populated by wxAUI) + + bool IsValid() const; +}; + + + +class WXDLLIMPEXP_FWD_AUI wxAuiFloatingFrame; + +class WXDLLIMPEXP_AUI wxAuiManager : public wxEvtHandler +{ + friend class wxAuiFloatingFrame; + +public: + + wxAuiManager(wxWindow* managedWnd = NULL, + unsigned int flags = wxAUI_MGR_DEFAULT); + virtual ~wxAuiManager(); + void UnInit(); + + void SetFlags(unsigned int flags); + unsigned int GetFlags() const; + + void SetManagedWindow(wxWindow* managedWnd); + wxWindow* GetManagedWindow() const; + + static wxAuiManager* GetManager(wxWindow* window); + + void SetArtProvider(wxAuiDockArt* artProvider); + wxAuiDockArt* GetArtProvider() const; + + wxAuiPaneInfo& GetPane(wxWindow* window); + wxAuiPaneInfo& GetPane(const wxString& name); + wxAuiPaneInfoArray& GetAllPanes(); + + bool AddPane(wxWindow* window, + const wxAuiPaneInfo& paneInfo); + + bool AddPane(wxWindow* window, + const wxAuiPaneInfo& paneInfo, + const wxPoint& dropPos); + + bool AddPane(wxWindow* window, + int direction = wxLEFT, + const wxString& caption = wxEmptyString); + + bool InsertPane(wxWindow* window, + const wxAuiPaneInfo& insertLocation, + int insertLevel = wxAUI_INSERT_PANE); + + bool DetachPane(wxWindow* window); + + void Update(); + + wxString SavePaneInfo(wxAuiPaneInfo& pane); + void LoadPaneInfo(wxString panePart, wxAuiPaneInfo &pane); + wxString SavePerspective(); + bool LoadPerspective(const wxString& perspective, bool update = true); + + void SetDockSizeConstraint(double widthPct, double heightPct); + void GetDockSizeConstraint(double* widthPct, double* heightPct) const; + + void ClosePane(wxAuiPaneInfo& paneInfo); + void MaximizePane(wxAuiPaneInfo& paneInfo); + void RestorePane(wxAuiPaneInfo& paneInfo); + void RestoreMaximizedPane(); + +public: + + virtual wxAuiFloatingFrame* CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p); + virtual bool CanDockPanel(const wxAuiPaneInfo & p); + + void StartPaneDrag( + wxWindow* paneWindow, + const wxPoint& offset); + + wxRect CalculateHintRect( + wxWindow* paneWindow, + const wxPoint& pt, + const wxPoint& offset); + + void DrawHintRect( + wxWindow* paneWindow, + const wxPoint& pt, + const wxPoint& offset); + + virtual void ShowHint(const wxRect& rect); + virtual void HideHint(); + + void OnHintActivate(wxActivateEvent& event); + +public: + + // deprecated -- please use SetManagedWindow() and + // and GetManagedWindow() instead + + wxDEPRECATED( void SetFrame(wxFrame* frame) ); + wxDEPRECATED( wxFrame* GetFrame() const ); + +protected: + + void UpdateHintWindowConfig(); + + void DoFrameLayout(); + + void LayoutAddPane(wxSizer* container, + wxAuiDockInfo& dock, + wxAuiPaneInfo& pane, + wxAuiDockUIPartArray& uiparts, + bool spacerOnly); + + void LayoutAddDock(wxSizer* container, + wxAuiDockInfo& dock, + wxAuiDockUIPartArray& uiParts, + bool spacerOnly); + + wxSizer* LayoutAll(wxAuiPaneInfoArray& panes, + wxAuiDockInfoArray& docks, + wxAuiDockUIPartArray & uiParts, + bool spacerOnly = false); + + virtual bool ProcessDockResult(wxAuiPaneInfo& target, + const wxAuiPaneInfo& newPos); + + bool DoDrop(wxAuiDockInfoArray& docks, + wxAuiPaneInfoArray& panes, + wxAuiPaneInfo& drop, + const wxPoint& pt, + const wxPoint& actionOffset = wxPoint(0,0)); + + wxAuiDockUIPart* HitTest(int x, int y); + wxAuiDockUIPart* GetPanePart(wxWindow* pane); + int GetDockPixelOffset(wxAuiPaneInfo& test); + void OnFloatingPaneMoveStart(wxWindow* window); + void OnFloatingPaneMoving(wxWindow* window, wxDirection dir ); + void OnFloatingPaneMoved(wxWindow* window, wxDirection dir); + void OnFloatingPaneActivated(wxWindow* window); + void OnFloatingPaneClosed(wxWindow* window, wxCloseEvent& evt); + void OnFloatingPaneResized(wxWindow* window, const wxRect& rect); + void Render(wxDC* dc); + void Repaint(wxDC* dc = NULL); + void ProcessMgrEvent(wxAuiManagerEvent& event); + void UpdateButtonOnScreen(wxAuiDockUIPart* buttonUiPart, + const wxMouseEvent& event); + void GetPanePositionsAndSizes(wxAuiDockInfo& dock, + wxArrayInt& positions, + wxArrayInt& sizes); + + /// Ends a resize action, or for live update, resizes the sash + bool DoEndResizeAction(wxMouseEvent& event); + + void SetActivePane(wxWindow* active_pane); + +public: + + // public events (which can be invoked externally) + void OnRender(wxAuiManagerEvent& evt); + void OnPaneButton(wxAuiManagerEvent& evt); + +protected: + + // protected events + void OnPaint(wxPaintEvent& evt); + void OnEraseBackground(wxEraseEvent& evt); + void OnSize(wxSizeEvent& evt); + void OnSetCursor(wxSetCursorEvent& evt); + void OnLeftDown(wxMouseEvent& evt); + void OnLeftUp(wxMouseEvent& evt); + void OnMotion(wxMouseEvent& evt); + void OnCaptureLost(wxMouseCaptureLostEvent& evt); + void OnLeaveWindow(wxMouseEvent& evt); + void OnChildFocus(wxChildFocusEvent& evt); + void OnHintFadeTimer(wxTimerEvent& evt); + void OnFindManager(wxAuiManagerEvent& evt); + +protected: + + enum + { + actionNone = 0, + actionResize, + actionClickButton, + actionClickCaption, + actionDragToolbarPane, + actionDragFloatingPane + }; + +protected: + + wxWindow* m_frame; // the window being managed + wxAuiDockArt* m_art; // dock art object which does all drawing + unsigned int m_flags; // manager flags wxAUI_MGR_* + + wxAuiPaneInfoArray m_panes; // array of panes structures + wxAuiDockInfoArray m_docks; // array of docks structures + wxAuiDockUIPartArray m_uiParts; // array of UI parts (captions, buttons, etc) + + int m_action; // current mouse action + wxPoint m_actionStart; // position where the action click started + wxPoint m_actionOffset; // offset from upper left of the item clicked + wxAuiDockUIPart* m_actionPart; // ptr to the part the action happened to + wxWindow* m_actionWindow; // action frame or window (NULL if none) + wxRect m_actionHintRect; // hint rectangle for the action + wxRect m_lastRect; + wxAuiDockUIPart* m_hoverButton;// button uipart being hovered over + wxRect m_lastHint; // last hint rectangle + wxPoint m_lastMouseMove; // last mouse move position (see OnMotion) + int m_currentDragItem; + bool m_skipping; + bool m_hasMaximized; + + double m_dockConstraintX; // 0.0 .. 1.0; max pct of window width a dock can consume + double m_dockConstraintY; // 0.0 .. 1.0; max pct of window height a dock can consume + + wxFrame* m_hintWnd; // transparent hint window, if supported by platform + wxTimer m_hintFadeTimer; // transparent fade timer + wxByte m_hintFadeAmt; // transparent fade amount + wxByte m_hintFadeMax; // maximum value of hint fade + + void* m_reserved; + +#ifndef SWIG + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxAuiManager) +#endif // SWIG +}; + + + +// event declarations/classes + +class WXDLLIMPEXP_AUI wxAuiManagerEvent : public wxEvent +{ +public: + wxAuiManagerEvent(wxEventType type=wxEVT_NULL) : wxEvent(0, type) + { + manager = NULL; + pane = NULL; + button = 0; + veto_flag = false; + canveto_flag = true; + dc = NULL; + } +#ifndef SWIG + wxAuiManagerEvent(const wxAuiManagerEvent& c) : wxEvent(c) + { + manager = c.manager; + pane = c.pane; + button = c.button; + veto_flag = c.veto_flag; + canveto_flag = c.canveto_flag; + dc = c.dc; + } +#endif + wxEvent *Clone() const { return new wxAuiManagerEvent(*this); } + + void SetManager(wxAuiManager* mgr) { manager = mgr; } + void SetPane(wxAuiPaneInfo* p) { pane = p; } + void SetButton(int b) { button = b; } + void SetDC(wxDC* pdc) { dc = pdc; } + + wxAuiManager* GetManager() const { return manager; } + wxAuiPaneInfo* GetPane() const { return pane; } + int GetButton() const { return button; } + wxDC* GetDC() const { return dc; } + + void Veto(bool veto = true) { veto_flag = veto; } + bool GetVeto() const { return veto_flag; } + void SetCanVeto(bool can_veto) { canveto_flag = can_veto; } + bool CanVeto() const { return canveto_flag && veto_flag; } + +public: + wxAuiManager* manager; + wxAuiPaneInfo* pane; + int button; + bool veto_flag; + bool canveto_flag; + wxDC* dc; + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiManagerEvent) +#endif +}; + + +class WXDLLIMPEXP_AUI wxAuiDockInfo +{ +public: + wxAuiDockInfo() + { + dock_direction = 0; + dock_layer = 0; + dock_row = 0; + size = 0; + min_size = 0; + resizable = true; + fixed = false; + toolbar = false; + reserved1 = false; + } + +#ifndef SWIG + wxAuiDockInfo(const wxAuiDockInfo& c) + { + dock_direction = c.dock_direction; + dock_layer = c.dock_layer; + dock_row = c.dock_row; + size = c.size; + min_size = c.min_size; + resizable = c.resizable; + fixed = c.fixed; + toolbar = c.toolbar; + panes = c.panes; + rect = c.rect; + reserved1 = c.reserved1; + } + + wxAuiDockInfo& operator=(const wxAuiDockInfo& c) + { + dock_direction = c.dock_direction; + dock_layer = c.dock_layer; + dock_row = c.dock_row; + size = c.size; + min_size = c.min_size; + resizable = c.resizable; + fixed = c.fixed; + toolbar = c.toolbar; + panes = c.panes; + rect = c.rect; + reserved1 = c.reserved1; + return *this; + } +#endif // SWIG + + bool IsOk() const { return dock_direction != 0; } + bool IsHorizontal() const { return dock_direction == wxAUI_DOCK_TOP || + dock_direction == wxAUI_DOCK_BOTTOM; } + bool IsVertical() const { return dock_direction == wxAUI_DOCK_LEFT || + dock_direction == wxAUI_DOCK_RIGHT || + dock_direction == wxAUI_DOCK_CENTER; } +public: + wxAuiPaneInfoPtrArray panes; // array of panes + wxRect rect; // current rectangle + int dock_direction; // dock direction (top, bottom, left, right, center) + int dock_layer; // layer number (0 = innermost layer) + int dock_row; // row number on the docking bar (0 = first row) + int size; // size of the dock + int min_size; // minimum size of a dock (0 if there is no min) + bool resizable; // flag indicating whether the dock is resizable + bool toolbar; // flag indicating dock contains only toolbars + bool fixed; // flag indicating that the dock operates on + // absolute coordinates as opposed to proportional + bool reserved1; +}; + + +class WXDLLIMPEXP_AUI wxAuiDockUIPart +{ +public: + enum + { + typeCaption, + typeGripper, + typeDock, + typeDockSizer, + typePane, + typePaneSizer, + typeBackground, + typePaneBorder, + typePaneButton + }; + + int type; // ui part type (see enum above) + int orientation; // orientation (either wxHORIZONTAL or wxVERTICAL) + wxAuiDockInfo* dock; // which dock the item is associated with + wxAuiPaneInfo* pane; // which pane the item is associated with + wxAuiPaneButton* button; // which pane button the item is associated with + wxSizer* cont_sizer; // the part's containing sizer + wxSizerItem* sizer_item; // the sizer item of the part + wxRect rect; // client coord rectangle of the part itself +}; + + +class WXDLLIMPEXP_AUI wxAuiPaneButton +{ +public: + int button_id; // id of the button (e.g. buttonClose) +}; + + + +#ifndef SWIG + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_BUTTON, wxAuiManagerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_CLOSE, wxAuiManagerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_MAXIMIZE, wxAuiManagerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_RESTORE, wxAuiManagerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_ACTIVATED, wxAuiManagerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, wxAuiManagerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_FIND_MANAGER, wxAuiManagerEvent ); + +typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&); + +#define wxAuiManagerEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxAuiManagerEventFunction, func) + +#define EVT_AUI_PANE_BUTTON(func) \ + wx__DECLARE_EVT0(wxEVT_AUI_PANE_BUTTON, wxAuiManagerEventHandler(func)) +#define EVT_AUI_PANE_CLOSE(func) \ + wx__DECLARE_EVT0(wxEVT_AUI_PANE_CLOSE, wxAuiManagerEventHandler(func)) +#define EVT_AUI_PANE_MAXIMIZE(func) \ + wx__DECLARE_EVT0(wxEVT_AUI_PANE_MAXIMIZE, wxAuiManagerEventHandler(func)) +#define EVT_AUI_PANE_RESTORE(func) \ + wx__DECLARE_EVT0(wxEVT_AUI_PANE_RESTORE, wxAuiManagerEventHandler(func)) +#define EVT_AUI_PANE_ACTIVATED(func) \ + wx__DECLARE_EVT0(wxEVT_AUI_PANE_ACTIVATED, wxAuiManagerEventHandler(func)) +#define EVT_AUI_RENDER(func) \ + wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxAuiManagerEventHandler(func)) +#define EVT_AUI_FIND_MANAGER(func) \ + wx__DECLARE_EVT0(wxEVT_AUI_FIND_MANAGER, wxAuiManagerEventHandler(func)) + +#else + +%constant wxEventType wxEVT_AUI_PANE_BUTTON; +%constant wxEventType wxEVT_AUI_PANE_CLOSE; +%constant wxEventType wxEVT_AUI_PANE_MAXIMIZE; +%constant wxEventType wxEVT_AUI_PANE_RESTORE; +%constant wxEventType wxEVT_AUI_PANE_ACTIVATED; +%constant wxEventType wxEVT_AUI_RENDER; +%constant wxEventType wxEVT_AUI_FIND_MANAGER; + +%pythoncode { + EVT_AUI_PANE_BUTTON = wx.PyEventBinder( wxEVT_AUI_PANE_BUTTON ) + EVT_AUI_PANE_CLOSE = wx.PyEventBinder( wxEVT_AUI_PANE_CLOSE ) + EVT_AUI_PANE_MAXIMIZE = wx.PyEventBinder( wxEVT_AUI_PANE_MAXIMIZE ) + EVT_AUI_PANE_RESTORE = wx.PyEventBinder( wxEVT_AUI_PANE_RESTORE ) + EVT_AUI_PANE_ACTIVATED = wx.PyEventBinder( wxEVT_AUI_PANE_ACTIVATED ) + EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER ) + EVT_AUI_FIND_MANAGER = wx.PyEventBinder( wxEVT_AUI_FIND_MANAGER ) +} +#endif // SWIG + +#endif // wxUSE_AUI +#endif //_WX_FRAMEMANAGER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/tabart.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/tabart.h new file mode 100644 index 0000000000..3de076c9e3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/tabart.h @@ -0,0 +1,324 @@ +////////////////////////////////////////////////////////////////////////////// +// Name: wx/aui/tabart.h +// Purpose: wxaui: wx advanced user interface - notebook +// Author: Benjamin I. Williams +// Modified by: Jens Lody (extracted from wx/aui/auibook.h) +// Created: 2012-03-21 +// Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved. +// Licence: wxWindows Library Licence, Version 3.1 +/////////////////////////////////////////////////////////////////////////////// + + +#ifndef _WX_AUI_TABART_H_ +#define _WX_AUI_TABART_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_AUI + +#include "wx/colour.h" +#include "wx/gdicmn.h" +#include "wx/font.h" +#include "wx/pen.h" +#include "wx/brush.h" +#include "wx/bitmap.h" + + +class wxAuiNotebookPage; +class wxAuiNotebookPageArray; +class wxWindow; +class wxDC; + + +// tab art class + +class WXDLLIMPEXP_AUI wxAuiTabArt +{ +public: + + wxAuiTabArt() { } + virtual ~wxAuiTabArt() { } + + virtual wxAuiTabArt* Clone() = 0; + virtual void SetFlags(unsigned int flags) = 0; + + virtual void SetSizingInfo(const wxSize& tabCtrlSize, + size_t tabCount) = 0; + + virtual void SetNormalFont(const wxFont& font) = 0; + virtual void SetSelectedFont(const wxFont& font) = 0; + virtual void SetMeasuringFont(const wxFont& font) = 0; + virtual void SetColour(const wxColour& colour) = 0; + virtual void SetActiveColour(const wxColour& colour) = 0; + + virtual void DrawBorder( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawTab(wxDC& dc, + wxWindow* wnd, + const wxAuiNotebookPage& pane, + const wxRect& inRect, + int closeButtonState, + wxRect* outTabRect, + wxRect* outButtonRect, + int* xExtent) = 0; + + virtual void DrawButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& inRect, + int bitmapId, + int buttonState, + int orientation, + wxRect* outRect) = 0; + + virtual wxSize GetTabSize( + wxDC& dc, + wxWindow* wnd, + const wxString& caption, + const wxBitmap& bitmap, + bool active, + int closeButtonState, + int* xExtent) = 0; + + virtual int ShowDropDown( + wxWindow* wnd, + const wxAuiNotebookPageArray& items, + int activeIdx) = 0; + + virtual int GetIndentSize() = 0; + + virtual int GetBorderWidth( + wxWindow* wnd) = 0; + + virtual int GetAdditionalBorderSpace( + wxWindow* wnd) = 0; + + virtual int GetBestTabCtrlSize( + wxWindow* wnd, + const wxAuiNotebookPageArray& pages, + const wxSize& requiredBmpSize) = 0; +}; + + +class WXDLLIMPEXP_AUI wxAuiGenericTabArt : public wxAuiTabArt +{ + +public: + + wxAuiGenericTabArt(); + virtual ~wxAuiGenericTabArt(); + + wxAuiTabArt* Clone(); + void SetFlags(unsigned int flags); + void SetSizingInfo(const wxSize& tabCtrlSize, + size_t tabCount); + + void SetNormalFont(const wxFont& font); + void SetSelectedFont(const wxFont& font); + void SetMeasuringFont(const wxFont& font); + void SetColour(const wxColour& colour); + void SetActiveColour(const wxColour& colour); + + void DrawBorder( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawTab(wxDC& dc, + wxWindow* wnd, + const wxAuiNotebookPage& pane, + const wxRect& inRect, + int closeButtonState, + wxRect* outTabRect, + wxRect* outButtonRect, + int* xExtent); + + void DrawButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& inRect, + int bitmapId, + int buttonState, + int orientation, + wxRect* outRect); + + int GetIndentSize(); + + int GetBorderWidth( + wxWindow* wnd); + + int GetAdditionalBorderSpace( + wxWindow* wnd); + + wxSize GetTabSize( + wxDC& dc, + wxWindow* wnd, + const wxString& caption, + const wxBitmap& bitmap, + bool active, + int closeButtonState, + int* xExtent); + + int ShowDropDown( + wxWindow* wnd, + const wxAuiNotebookPageArray& items, + int activeIdx); + + int GetBestTabCtrlSize(wxWindow* wnd, + const wxAuiNotebookPageArray& pages, + const wxSize& requiredBmpSize); + +protected: + + wxFont m_normalFont; + wxFont m_selectedFont; + wxFont m_measuringFont; + wxColour m_baseColour; + wxPen m_baseColourPen; + wxPen m_borderPen; + wxBrush m_baseColourBrush; + wxColour m_activeColour; + wxBitmap m_activeCloseBmp; + wxBitmap m_disabledCloseBmp; + wxBitmap m_activeLeftBmp; + wxBitmap m_disabledLeftBmp; + wxBitmap m_activeRightBmp; + wxBitmap m_disabledRightBmp; + wxBitmap m_activeWindowListBmp; + wxBitmap m_disabledWindowListBmp; + + int m_fixedTabWidth; + int m_tabCtrlHeight; + unsigned int m_flags; +}; + + +class WXDLLIMPEXP_AUI wxAuiSimpleTabArt : public wxAuiTabArt +{ + +public: + + wxAuiSimpleTabArt(); + virtual ~wxAuiSimpleTabArt(); + + wxAuiTabArt* Clone(); + void SetFlags(unsigned int flags); + + void SetSizingInfo(const wxSize& tabCtrlSize, + size_t tabCount); + + void SetNormalFont(const wxFont& font); + void SetSelectedFont(const wxFont& font); + void SetMeasuringFont(const wxFont& font); + void SetColour(const wxColour& colour); + void SetActiveColour(const wxColour& colour); + + void DrawBorder( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawTab(wxDC& dc, + wxWindow* wnd, + const wxAuiNotebookPage& pane, + const wxRect& inRect, + int closeButtonState, + wxRect* outTabRect, + wxRect* outButtonRect, + int* xExtent); + + void DrawButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& inRect, + int bitmapId, + int buttonState, + int orientation, + wxRect* outRect); + + int GetIndentSize(); + + int GetBorderWidth( + wxWindow* wnd); + + int GetAdditionalBorderSpace( + wxWindow* wnd); + + wxSize GetTabSize( + wxDC& dc, + wxWindow* wnd, + const wxString& caption, + const wxBitmap& bitmap, + bool active, + int closeButtonState, + int* xExtent); + + int ShowDropDown( + wxWindow* wnd, + const wxAuiNotebookPageArray& items, + int activeIdx); + + int GetBestTabCtrlSize(wxWindow* wnd, + const wxAuiNotebookPageArray& pages, + const wxSize& requiredBmpSize); + +protected: + + wxFont m_normalFont; + wxFont m_selectedFont; + wxFont m_measuringFont; + wxPen m_normalBkPen; + wxPen m_selectedBkPen; + wxBrush m_normalBkBrush; + wxBrush m_selectedBkBrush; + wxBrush m_bkBrush; + wxBitmap m_activeCloseBmp; + wxBitmap m_disabledCloseBmp; + wxBitmap m_activeLeftBmp; + wxBitmap m_disabledLeftBmp; + wxBitmap m_activeRightBmp; + wxBitmap m_disabledRightBmp; + wxBitmap m_activeWindowListBmp; + wxBitmap m_disabledWindowListBmp; + + int m_fixedTabWidth; + unsigned int m_flags; +}; + +#ifndef __WXUNIVERSAL__ + #if defined(__WXGTK20__) && !defined(__WXGTK3__) + #define wxHAS_NATIVE_TABART + #include "wx/aui/tabartgtk.h" + #define wxAuiDefaultTabArt wxAuiGtkTabArt + #endif +#endif // !__WXUNIVERSAL__ + +#ifndef wxHAS_NATIVE_TABART + #define wxAuiDefaultTabArt wxAuiGenericTabArt +#endif + +#endif // wxUSE_AUI + +#endif // _WX_AUI_TABART_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/tabartgtk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/tabartgtk.h new file mode 100644 index 0000000000..85fe9e2a50 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/tabartgtk.h @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/aui/tabartgtk.h +// Purpose: declaration of the wxAuiGTKTabArt +// Author: Jens Lody and Teodor Petrov +// Modified by: +// Created: 2012-03-23 +// Copyright: (c) 2012 Jens Lody +// and Teodor Petrov +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_AUI_TABARTGTK_H_ +#define _WX_AUI_TABARTGTK_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_AUI + +#include "wx/aui/tabart.h" +#include "wx/gdicmn.h" + +class wxWindow; +class wxDC; + +class WXDLLIMPEXP_AUI wxAuiGtkTabArt : public wxAuiGenericTabArt +{ +public: + wxAuiGtkTabArt(); + + virtual wxAuiTabArt* Clone(); + virtual void DrawBorder(wxDC& dc, wxWindow* wnd, const wxRect& rect); + virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect); + virtual void DrawTab(wxDC& dc, + wxWindow* wnd, + const wxAuiNotebookPage& page, + const wxRect& in_rect, + int close_button_state, + wxRect* out_tab_rect, + wxRect* out_button_rect, + int* x_extent); + void DrawButton(wxDC& dc, wxWindow* wnd, const wxRect& in_rect, int bitmap_id, + int button_state, int orientation, wxRect* out_rect); + int GetBestTabCtrlSize(wxWindow* wnd, const wxAuiNotebookPageArray& pages, + const wxSize& required_bmp_size); + int GetBorderWidth(wxWindow* wnd); + int GetAdditionalBorderSpace(wxWindow* wnd); + virtual wxSize GetTabSize(wxDC& dc, wxWindow* wnd, const wxString& caption, + const wxBitmap& bitmap, bool active, + int close_button_state, int* x_extent); +}; + +#endif // wxUSE_AUI + +#endif // _WX_AUI_TABARTGTK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/tabmdi.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/tabmdi.h new file mode 100644 index 0000000000..8750831747 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/aui/tabmdi.h @@ -0,0 +1,270 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/aui/tabmdi.h +// Purpose: Generic MDI (Multiple Document Interface) classes +// Author: Hans Van Leemputten +// Modified by: Benjamin I. Williams / Kirix Corporation +// Created: 29/07/2002 +// Copyright: (c) Hans Van Leemputten +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_AUITABMDI_H_ +#define _WX_AUITABMDI_H_ + +#if wxUSE_AUI + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/frame.h" +#include "wx/panel.h" +#include "wx/notebook.h" +#include "wx/icon.h" +#include "wx/aui/auibook.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_AUI wxAuiMDIParentFrame; +class WXDLLIMPEXP_FWD_AUI wxAuiMDIClientWindow; +class WXDLLIMPEXP_FWD_AUI wxAuiMDIChildFrame; + +//----------------------------------------------------------------------------- +// wxAuiMDIParentFrame +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_AUI wxAuiMDIParentFrame : public wxFrame +{ +public: + wxAuiMDIParentFrame(); + wxAuiMDIParentFrame(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr); + + ~wxAuiMDIParentFrame(); + + bool Create(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr ); + + void SetArtProvider(wxAuiTabArt* provider); + wxAuiTabArt* GetArtProvider(); + wxAuiNotebook* GetNotebook() const; + +#if wxUSE_MENUS + wxMenu* GetWindowMenu() const { return m_pWindowMenu; } + void SetWindowMenu(wxMenu* pMenu); + + virtual void SetMenuBar(wxMenuBar *pMenuBar); +#endif // wxUSE_MENUS + + void SetChildMenuBar(wxAuiMDIChildFrame *pChild); + + wxAuiMDIChildFrame *GetActiveChild() const; + void SetActiveChild(wxAuiMDIChildFrame* pChildFrame); + + wxAuiMDIClientWindow *GetClientWindow() const; + virtual wxAuiMDIClientWindow *OnCreateClient(); + + virtual void Cascade() { /* Has no effect */ } + virtual void Tile(wxOrientation orient = wxHORIZONTAL); + virtual void ArrangeIcons() { /* Has no effect */ } + virtual void ActivateNext(); + virtual void ActivatePrevious(); + +protected: + wxAuiMDIClientWindow* m_pClientWindow; + wxEvent* m_pLastEvt; + +#if wxUSE_MENUS + wxMenu *m_pWindowMenu; + wxMenuBar *m_pMyMenuBar; +#endif // wxUSE_MENUS + +protected: + void Init(); + +#if wxUSE_MENUS + void RemoveWindowMenu(wxMenuBar *pMenuBar); + void AddWindowMenu(wxMenuBar *pMenuBar); + + void DoHandleMenu(wxCommandEvent &event); + void DoHandleUpdateUI(wxUpdateUIEvent &event); +#endif // wxUSE_MENUS + + virtual bool ProcessEvent(wxEvent& event); + + virtual void DoGetClientSize(int *width, int *height) const; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxAuiMDIParentFrame) +}; + +//----------------------------------------------------------------------------- +// wxAuiMDIChildFrame +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_AUI wxAuiMDIChildFrame : public wxPanel +{ +public: + wxAuiMDIChildFrame(); + wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxAuiMDIChildFrame(); + bool Create(wxAuiMDIParentFrame *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + +#if wxUSE_MENUS + virtual void SetMenuBar(wxMenuBar *menuBar); + virtual wxMenuBar *GetMenuBar() const; +#endif // wxUSE_MENUS + + virtual void SetTitle(const wxString& title); + virtual wxString GetTitle() const; + + virtual void SetIcons(const wxIconBundle& icons); + virtual const wxIconBundle& GetIcons() const; + + virtual void SetIcon(const wxIcon& icon); + virtual const wxIcon& GetIcon() const; + + virtual void Activate(); + virtual bool Destroy(); + + virtual bool Show(bool show = true); + +#if wxUSE_STATUSBAR + // no status bars + virtual wxStatusBar* CreateStatusBar(int WXUNUSED(number) = 1, + long WXUNUSED(style) = 1, + wxWindowID WXUNUSED(winid) = 1, + const wxString& WXUNUSED(name) = wxEmptyString) + { return NULL; } + + virtual wxStatusBar *GetStatusBar() const { return NULL; } + virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {} + virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {} +#endif + +#if wxUSE_TOOLBAR + // no toolbar bars + virtual wxToolBar* CreateToolBar(long WXUNUSED(style), + wxWindowID WXUNUSED(winid), + const wxString& WXUNUSED(name)) + { return NULL; } + virtual wxToolBar *GetToolBar() const { return NULL; } +#endif + + + // no maximize etc + virtual void Maximize(bool WXUNUSED(maximize) = true) { /* Has no effect */ } + virtual void Restore() { /* Has no effect */ } + virtual void Iconize(bool WXUNUSED(iconize) = true) { /* Has no effect */ } + virtual bool IsMaximized() const { return true; } + virtual bool IsIconized() const { return false; } + virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style)) { return false; } + virtual bool IsFullScreen() const { return false; } + + virtual bool IsTopLevel() const { return false; } + + void OnMenuHighlight(wxMenuEvent& evt); + void OnActivate(wxActivateEvent& evt); + void OnCloseWindow(wxCloseEvent& evt); + + void SetMDIParentFrame(wxAuiMDIParentFrame* parent); + wxAuiMDIParentFrame* GetMDIParentFrame() const; + +protected: + void Init(); + virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); + virtual void DoMoveWindow(int x, int y, int width, int height); + + // no size hints + virtual void DoSetSizeHints(int WXUNUSED(minW), int WXUNUSED(minH), + int WXUNUSED(maxW), int WXUNUSED(maxH), + int WXUNUSED(incW), int WXUNUSED(incH)) {} +public: + // This function needs to be called when a size change is confirmed, + // we needed this function to prevent anybody from the outside + // changing the panel... it messes the UI layout when we would allow it. + void ApplyMDIChildFrameRect(); + void DoShow(bool show); + +protected: + wxAuiMDIParentFrame* m_pMDIParentFrame; + wxRect m_mdiNewRect; + wxRect m_mdiCurRect; + wxString m_title; + wxIcon m_icon; + wxIconBundle m_iconBundle; + bool m_activateOnCreate; + +#if wxUSE_MENUS + wxMenuBar* m_pMenuBar; +#endif // wxUSE_MENUS + + + +private: + DECLARE_DYNAMIC_CLASS(wxAuiMDIChildFrame) + DECLARE_EVENT_TABLE() + + friend class wxAuiMDIClientWindow; +}; + +//----------------------------------------------------------------------------- +// wxAuiMDIClientWindow +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_AUI wxAuiMDIClientWindow : public wxAuiNotebook +{ +public: + wxAuiMDIClientWindow(); + wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0); + + virtual bool CreateClient(wxAuiMDIParentFrame *parent, + long style = wxVSCROLL | wxHSCROLL); + + virtual int SetSelection(size_t page); + virtual wxAuiMDIChildFrame* GetActiveChild(); + virtual void SetActiveChild(wxAuiMDIChildFrame* pChildFrame) + { + SetSelection(GetPageIndex(pChildFrame)); + } + +protected: + + void PageChanged(int oldSelection, int newSelection); + void OnPageClose(wxAuiNotebookEvent& evt); + void OnPageChanged(wxAuiNotebookEvent& evt); + void OnSize(wxSizeEvent& evt); + +private: + DECLARE_DYNAMIC_CLASS(wxAuiMDIClientWindow) + DECLARE_EVENT_TABLE() +}; +#endif // wxUSE_AUI + +#endif // _WX_AUITABMDI_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/bannerwindow.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/bannerwindow.h new file mode 100644 index 0000000000..1f1fb24611 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/bannerwindow.h @@ -0,0 +1,144 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/bannerwindow.h +// Purpose: wxBannerWindow class declaration +// Author: Vadim Zeitlin +// Created: 2011-08-16 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BANNERWINDOW_H_ +#define _WX_BANNERWINDOW_H_ + +#include "wx/defs.h" + +#if wxUSE_BANNERWINDOW + +#include "wx/bitmap.h" +#include "wx/event.h" +#include "wx/window.h" + +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxColour; +class WXDLLIMPEXP_FWD_CORE wxDC; + +extern WXDLLIMPEXP_DATA_ADV(const char) wxBannerWindowNameStr[]; + +// ---------------------------------------------------------------------------- +// A simple banner window showing either a bitmap or text. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxBannerWindow : public wxWindow +{ +public: + // Default constructor, use Create() later. + wxBannerWindow() { Init(); } + + // Convenient constructor that should be used in the majority of cases. + // + // The banner orientation changes how the text in it is displayed and also + // defines where is the bitmap truncated if it's too big to fit but doesn't + // do anything for the banner position, this is supposed to be taken care + // of in the usual way, e.g. using sizers. + wxBannerWindow(wxWindow* parent, wxDirection dir = wxLEFT) + { + Init(); + + Create(parent, wxID_ANY, dir); + } + + // Full constructor provided for consistency with the other classes only. + wxBannerWindow(wxWindow* parent, + wxWindowID winid, + wxDirection dir = wxLEFT, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxBannerWindowNameStr) + { + Init(); + + Create(parent, winid, dir, pos, size, style, name); + } + + // Can be only called on objects created with the default constructor. + bool Create(wxWindow* parent, + wxWindowID winid, + wxDirection dir = wxLEFT, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxBannerWindowNameStr); + + + // Provide an existing bitmap to show. For wxLEFT orientation the bitmap is + // truncated from the top, for wxTOP and wxBOTTOM -- from the right and for + // wxRIGHT -- from the bottom, so put the most important part of the bitmap + // information in the opposite direction. + void SetBitmap(const wxBitmap& bmp); + + // Set the text to display. This is mutually exclusive with SetBitmap(). + // Title is rendered in bold and should be single line, message can have + // multiple lines but is not wrapped automatically. + void SetText(const wxString& title, const wxString& message); + + // Set the colours between which the gradient runs. This can be combined + // with SetText() but not SetBitmap(). + void SetGradient(const wxColour& start, const wxColour& end); + +protected: + virtual wxSize DoGetBestClientSize() const; + +private: + // Common part of all constructors. + void Init(); + + // Fully invalidates the window. + void OnSize(wxSizeEvent& event); + + // Redraws the window using either m_bitmap or m_title/m_message. + void OnPaint(wxPaintEvent& event); + + // Helper of OnPaint(): draw the bitmap at the correct position depending + // on our orientation. + void DrawBitmapBackground(wxDC& dc); + + // Helper of OnPaint(): draw the text in the appropriate direction. + void DrawBannerTextLine(wxDC& dc, const wxString& str, const wxPoint& pos); + + // Return the font to use for the title. Currently this is hardcoded as a + // larger bold version of the standard window font but could be made + // configurable in the future. + wxFont GetTitleFont() const; + + // Return the colour to use for extending the bitmap. Non-const as it + // updates m_colBitmapBg if needed. + wxColour GetBitmapBg(); + + + // The window side along which the banner is laid out. + wxDirection m_direction; + + // If valid, this bitmap is drawn as is. + wxBitmap m_bitmap; + + // If bitmap is valid, this is the colour we use to extend it if the bitmap + // is smaller than this window. It is computed on demand by GetBitmapBg(). + wxColour m_colBitmapBg; + + // The title and main message to draw, used if m_bitmap is invalid. + wxString m_title, + m_message; + + // Start and stop gradient colours, only used when drawing text. + wxColour m_colStart, + m_colEnd; + + wxDECLARE_EVENT_TABLE(); + + wxDECLARE_NO_COPY_CLASS(wxBannerWindow); +}; + +#endif // wxUSE_BANNERWINDOW + +#endif // _WX_BANNERWINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/base64.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/base64.h new file mode 100644 index 0000000000..96c6dd80ef --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/base64.h @@ -0,0 +1,121 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/base64.h +// Purpose: declaration of BASE64 encoding/decoding functionality +// Author: Charles Reimers, Vadim Zeitlin +// Created: 2007-06-18 +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BASE64_H_ +#define _WX_BASE64_H_ + +#if wxUSE_BASE64 + +#include "wx/string.h" +#include "wx/buffer.h" + +// ---------------------------------------------------------------------------- +// encoding functions +// ---------------------------------------------------------------------------- + +// return the size needed for the buffer containing the encoded representation +// of a buffer of given length +inline size_t wxBase64EncodedSize(size_t len) { return 4*((len+2)/3); } + +// raw base64 encoding function which encodes the contents of a buffer of the +// specified length into the buffer of the specified size +// +// returns the length of the encoded data or wxCONV_FAILED if the buffer is not +// large enough; to determine the needed size you can either allocate a buffer +// of wxBase64EncodedSize(srcLen) size or call the function with NULL buffer in +// which case the required size will be returned +WXDLLIMPEXP_BASE size_t +wxBase64Encode(char *dst, size_t dstLen, const void *src, size_t srcLen); + +// encode the contents of the given buffer using base64 and return as string +// (there is no error return) +inline wxString wxBase64Encode(const void *src, size_t srcLen) +{ + const size_t dstLen = wxBase64EncodedSize(srcLen); + wxCharBuffer dst(dstLen); + wxBase64Encode(dst.data(), dstLen, src, srcLen); + + return dst; +} + +inline wxString wxBase64Encode(const wxMemoryBuffer& buf) +{ + return wxBase64Encode(buf.GetData(), buf.GetDataLen()); +} + +// ---------------------------------------------------------------------------- +// decoding functions +// ---------------------------------------------------------------------------- + +// elements of this enum specify the possible behaviours of wxBase64Decode() +// when an invalid character is encountered +enum wxBase64DecodeMode +{ + // normal behaviour: stop at any invalid characters + wxBase64DecodeMode_Strict, + + // skip whitespace characters + wxBase64DecodeMode_SkipWS, + + // the most lenient behaviour: simply ignore all invalid characters + wxBase64DecodeMode_Relaxed +}; + +// return the buffer size necessary for decoding a base64 string of the given +// length +inline size_t wxBase64DecodedSize(size_t srcLen) { return 3*srcLen/4; } + +// raw decoding function which decodes the contents of the string of specified +// length (or NUL-terminated by default) into the provided buffer of the given +// size +// +// the function normally stops at any character invalid inside a base64-encoded +// string (i.e. not alphanumeric nor '+' nor '/') but can be made to skip the +// whitespace or all invalid characters using its mode argument +// +// returns the length of the decoded data or wxCONV_FAILED if an error occurs +// such as the buffer is too small or the encoded string is invalid; in the +// latter case the posErr is filled with the position where the decoding +// stopped if it is not NULL +WXDLLIMPEXP_BASE size_t +wxBase64Decode(void *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN, + wxBase64DecodeMode mode = wxBase64DecodeMode_Strict, + size_t *posErr = NULL); + +inline size_t +wxBase64Decode(void *dst, size_t dstLen, + const wxString& src, + wxBase64DecodeMode mode = wxBase64DecodeMode_Strict, + size_t *posErr = NULL) +{ + // don't use str.length() here as the ASCII buffer is shorter than it for + // strings with embedded NULs + return wxBase64Decode(dst, dstLen, src.ToAscii(), wxNO_LEN, mode, posErr); +} + +// decode the contents of the given string; the returned buffer is empty if an +// error occurs during decoding +WXDLLIMPEXP_BASE wxMemoryBuffer +wxBase64Decode(const char *src, size_t srcLen = wxNO_LEN, + wxBase64DecodeMode mode = wxBase64DecodeMode_Strict, + size_t *posErr = NULL); + +inline wxMemoryBuffer +wxBase64Decode(const wxString& src, + wxBase64DecodeMode mode = wxBase64DecodeMode_Strict, + size_t *posErr = NULL) +{ + // don't use str.length() here as the ASCII buffer is shorter than it for + // strings with embedded NULs + return wxBase64Decode(src.ToAscii(), wxNO_LEN, mode, posErr); +} + +#endif // wxUSE_BASE64 + +#endif // _WX_BASE64_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/beforestd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/beforestd.h new file mode 100644 index 0000000000..cc335d317b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/beforestd.h @@ -0,0 +1,75 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/beforestd.h +// Purpose: #include before STL headers +// Author: Vadim Zeitlin +// Modified by: +// Created: 07/07/03 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +/** + Unfortunately, when compiling at maximum warning level, the standard + headers themselves may generate warnings -- and really lots of them. So + before including them, this header should be included to temporarily + suppress the warnings and after this the header afterstd.h should be + included to enable them back again. + + Note that there are intentionally no inclusion guards in this file, because + it can be included several times. + */ + +// VC 7.x isn't as bad as VC6 and doesn't give these warnings but eVC (which +// defines _MSC_VER as 1201) does need to be included as it's VC6-like +#if defined(__VISUALC__) && __VISUALC__ <= 1201 + // these warning have to be disabled and not just temporarily disabled + // because they will be given at the end of the compilation of the + // current source and there is absolutely nothing we can do about them so + // disable them before warning(push) below + + // 'foo': unreferenced inline function has been removed + #pragma warning(disable:4514) + + // 'function' : function not inlined + #pragma warning(disable:4710) + + // 'id': identifier was truncated to 'num' characters in the debug info + #pragma warning(disable:4786) + + // MSVC 5 does not have this + #if __VISUALC__ > 1100 + // we have to disable (and reenable in afterstd.h) this one because, + // even though it is of level 4, it is not disabled by warning(push, 1) + // below for VC7.1! + + // unreachable code + #pragma warning(disable:4702) + + #pragma warning(push, 1) + #else // VC 5 + // 'expression' : signed/unsigned mismatch + #pragma warning(disable:4018) + + // 'identifier' : unreferenced formal parameter + #pragma warning(disable:4100) + + // 'conversion' : conversion from 'type1' to 'type2', + // possible loss of data + #pragma warning(disable:4244) + + // C++ language change: to explicitly specialize class template + // 'identifier' use the following syntax + #pragma warning(disable:4663) + #endif +#endif // VC++ < 7 + +/** + GCC's visibility support is broken for libstdc++ in some older versions + (namely Debian/Ubuntu's GCC 4.1, see + https://bugs.launchpad.net/ubuntu/+source/gcc-4.1/+bug/109262). We fix it + here by mimicking newer versions' behaviour of using default visibility + for libstdc++ code. + */ +#if defined(HAVE_VISIBILITY) && defined(HAVE_BROKEN_LIBSTDCXX_VISIBILITY) + #pragma GCC visibility push(default) +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/bitmap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/bitmap.h new file mode 100644 index 0000000000..6d9ffe71b7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/bitmap.h @@ -0,0 +1,323 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/bitmap.h +// Purpose: wxBitmap class interface +// Author: Vaclav Slavik +// Modified by: +// Created: 22.04.01 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BITMAP_H_BASE_ +#define _WX_BITMAP_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/string.h" +#include "wx/gdicmn.h" // for wxBitmapType +#include "wx/colour.h" +#include "wx/image.h" + +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxBitmapHandler; +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxMask; +class WXDLLIMPEXP_FWD_CORE wxPalette; +class WXDLLIMPEXP_FWD_CORE wxDC; + +// ---------------------------------------------------------------------------- +// wxVariant support +// ---------------------------------------------------------------------------- + +#if wxUSE_VARIANT +#include "wx/variant.h" +DECLARE_VARIANT_OBJECT_EXPORTED(wxBitmap,WXDLLIMPEXP_CORE) +#endif + +// ---------------------------------------------------------------------------- +// wxMask represents the transparent area of the bitmap +// ---------------------------------------------------------------------------- + +// TODO: all implementation of wxMask, except the generic one, +// do not derive from wxMaskBase,,, they should +class WXDLLIMPEXP_CORE wxMaskBase : public wxObject +{ +public: + // create the mask from bitmap pixels of the given colour + bool Create(const wxBitmap& bitmap, const wxColour& colour); + +#if wxUSE_PALETTE + // create the mask from bitmap pixels with the given palette index + bool Create(const wxBitmap& bitmap, int paletteIndex); +#endif // wxUSE_PALETTE + + // create the mask from the given mono bitmap + bool Create(const wxBitmap& bitmap); + +protected: + // this function is called from Create() to free the existing mask data + virtual void FreeData() = 0; + + // these functions must be overridden to implement the corresponding public + // Create() methods, they shouldn't call FreeData() as it's already called + // by the public wrappers + virtual bool InitFromColour(const wxBitmap& bitmap, + const wxColour& colour) = 0; + virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0; +}; + +#if defined(__WXDFB__) || \ + defined(__WXMAC__) || \ + defined(__WXGTK__) || \ + defined(__WXCOCOA__) || \ + defined(__WXMOTIF__) || \ + defined(__WXX11__) + #define wxUSE_BITMAP_BASE 1 +#else + #define wxUSE_BITMAP_BASE 0 +#endif + +// a more readable way to tell +#define wxBITMAP_SCREEN_DEPTH (-1) + + +// ---------------------------------------------------------------------------- +// wxBitmapHelpers: container for various bitmap methods common to all ports. +// ---------------------------------------------------------------------------- + +// Unfortunately, currently wxBitmap does not inherit from wxBitmapBase on all +// platforms and this is not easy to fix. So we extract at least some common +// methods into this class from which both wxBitmapBase (and hence wxBitmap on +// all platforms where it does inherit from it) and wxBitmap in wxMSW and other +// exceptional ports (only wxPM and old wxCocoa) inherit. +class WXDLLIMPEXP_CORE wxBitmapHelpers +{ +public: + // Create a new wxBitmap from the PNG data in the given buffer. + static wxBitmap NewFromPNGData(const void* data, size_t size); +}; + + +// All ports except wxMSW and wxOS2 use wxBitmapHandler and wxBitmapBase as +// base class for wxBitmapHandler; wxMSW and wxOS2 use wxGDIImageHandler as +// base class since it allows some code reuse there. +#if wxUSE_BITMAP_BASE + +// ---------------------------------------------------------------------------- +// wxBitmapHandler: class which knows how to create/load/save bitmaps in +// different formats +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapHandler : public wxObject +{ +public: + wxBitmapHandler() { m_type = wxBITMAP_TYPE_INVALID; } + virtual ~wxBitmapHandler() { } + + // NOTE: the following functions should be pure virtuals, but they aren't + // because otherwise almost all ports would have to implement + // them as "return false"... + + virtual bool Create(wxBitmap *WXUNUSED(bitmap), const void* WXUNUSED(data), + wxBitmapType WXUNUSED(type), int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(depth) = 1) + { return false; } + + virtual bool LoadFile(wxBitmap *WXUNUSED(bitmap), const wxString& WXUNUSED(name), + wxBitmapType WXUNUSED(type), int WXUNUSED(desiredWidth), + int WXUNUSED(desiredHeight)) + { return false; } + + virtual bool SaveFile(const wxBitmap *WXUNUSED(bitmap), const wxString& WXUNUSED(name), + wxBitmapType WXUNUSED(type), const wxPalette *WXUNUSED(palette) = NULL) const + { return false; } + + void SetName(const wxString& name) { m_name = name; } + void SetExtension(const wxString& ext) { m_extension = ext; } + void SetType(wxBitmapType type) { m_type = type; } + const wxString& GetName() const { return m_name; } + const wxString& GetExtension() const { return m_extension; } + wxBitmapType GetType() const { return m_type; } + +private: + wxString m_name; + wxString m_extension; + wxBitmapType m_type; + + DECLARE_ABSTRACT_CLASS(wxBitmapHandler) +}; + +// ---------------------------------------------------------------------------- +// wxBitmap: class which represents platform-dependent bitmap (unlike wxImage) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapBase : public wxGDIObject, + public wxBitmapHelpers +{ +public: + /* + Derived class must implement these: + + wxBitmap(); + wxBitmap(const wxBitmap& bmp); + wxBitmap(const char bits[], int width, int height, int depth = 1); + wxBitmap(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); + wxBitmap(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH); + wxBitmap(const char* const* bits); + wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM); + wxBitmap(const wxImage& image, int depth = wxBITMAP_SCREEN_DEPTH); + + static void InitStandardHandlers(); + */ + + virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH) = 0; + virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) = 0; + virtual bool CreateScaled(int w, int h, int d, double logicalScale) + { return Create(w*logicalScale,h*logicalScale,d); } + + virtual int GetHeight() const = 0; + virtual int GetWidth() const = 0; + virtual int GetDepth() const = 0; + + wxSize GetSize() const + { return wxSize(GetWidth(), GetHeight()); } + + // support for scaled bitmaps + virtual double GetScaleFactor() const { return 1.0; } + virtual double GetScaledWidth() const { return GetWidth() / GetScaleFactor(); } + virtual double GetScaledHeight() const { return GetHeight() / GetScaleFactor(); } + virtual wxSize GetScaledSize() const + { return wxSize(GetScaledWidth(), GetScaledHeight()); } + +#if wxUSE_IMAGE + virtual wxImage ConvertToImage() const = 0; + + // Convert to disabled (dimmed) bitmap. + wxBitmap ConvertToDisabled(unsigned char brightness = 255) const; +#endif // wxUSE_IMAGE + + virtual wxMask *GetMask() const = 0; + virtual void SetMask(wxMask *mask) = 0; + + virtual wxBitmap GetSubBitmap(const wxRect& rect) const = 0; + + virtual bool SaveFile(const wxString &name, wxBitmapType type, + const wxPalette *palette = NULL) const = 0; + virtual bool LoadFile(const wxString &name, wxBitmapType type) = 0; + + /* + If raw bitmap access is supported (see wx/rawbmp.h), the following + methods should be implemented: + + virtual bool GetRawData(wxRawBitmapData *data) = 0; + virtual void UngetRawData(wxRawBitmapData *data) = 0; + */ + +#if wxUSE_PALETTE + virtual wxPalette *GetPalette() const = 0; + virtual void SetPalette(const wxPalette& palette) = 0; +#endif // wxUSE_PALETTE + + // copies the contents and mask of the given (colour) icon to the bitmap + virtual bool CopyFromIcon(const wxIcon& icon) = 0; + + // implementation: + virtual void SetHeight(int height) = 0; + virtual void SetWidth(int width) = 0; + virtual void SetDepth(int depth) = 0; + + // Format handling + static inline wxList& GetHandlers() { return sm_handlers; } + static void AddHandler(wxBitmapHandler *handler); + static void InsertHandler(wxBitmapHandler *handler); + static bool RemoveHandler(const wxString& name); + static wxBitmapHandler *FindHandler(const wxString& name); + static wxBitmapHandler *FindHandler(const wxString& extension, wxBitmapType bitmapType); + static wxBitmapHandler *FindHandler(wxBitmapType bitmapType); + + //static void InitStandardHandlers(); + // (wxBitmap must implement this one) + + static void CleanUpHandlers(); + + // this method is only used by the generic implementation of wxMask + // currently but could be useful elsewhere in the future: it can be + // overridden to quantize the colour to correspond to bitmap colour depth + // if necessary; default implementation simply returns the colour as is + virtual wxColour QuantizeColour(const wxColour& colour) const + { + return colour; + } + +protected: + static wxList sm_handlers; + + DECLARE_ABSTRACT_CLASS(wxBitmapBase) +}; + +#endif // wxUSE_BITMAP_BASE + + +// the wxBITMAP_DEFAULT_TYPE constant defines the default argument value +// for wxBitmap's ctor and wxBitmap::LoadFile() functions. +#if defined(__WXMSW__) + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE + #include "wx/msw/bitmap.h" +#elif defined(__WXMOTIF__) + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #include "wx/x11/bitmap.h" +#elif defined(__WXGTK20__) + #ifdef __WINDOWS__ + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE + #else + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #endif + #include "wx/gtk/bitmap.h" +#elif defined(__WXGTK__) + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #include "wx/gtk1/bitmap.h" +#elif defined(__WXX11__) + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #include "wx/x11/bitmap.h" +#elif defined(__WXDFB__) + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE + #include "wx/dfb/bitmap.h" +#elif defined(__WXMAC__) + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_PICT_RESOURCE + #include "wx/osx/bitmap.h" +#elif defined(__WXCOCOA__) + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE + #include "wx/cocoa/bitmap.h" +#elif defined(__WXPM__) + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE + #include "wx/os2/bitmap.h" +#endif + +#if wxUSE_IMAGE +inline +wxBitmap +#if wxUSE_BITMAP_BASE +wxBitmapBase:: +#else +wxBitmap:: +#endif +ConvertToDisabled(unsigned char brightness) const +{ + return ConvertToImage().ConvertToDisabled(brightness); +} +#endif // wxUSE_IMAGE + +// we must include generic mask.h after wxBitmap definition +#if defined(__WXDFB__) + #define wxUSE_GENERIC_MASK 1 +#else + #define wxUSE_GENERIC_MASK 0 +#endif + +#if wxUSE_GENERIC_MASK + #include "wx/generic/mask.h" +#endif + +#endif // _WX_BITMAP_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/bmpbuttn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/bmpbuttn.h new file mode 100644 index 0000000000..ead0ba81ec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/bmpbuttn.h @@ -0,0 +1,144 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/bmpbuttn.h +// Purpose: wxBitmapButton class interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 25.08.00 +// Copyright: (c) 2000 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BMPBUTTON_H_BASE_ +#define _WX_BMPBUTTON_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_BMPBUTTON + +#include "wx/button.h" + +// FIXME: right now only wxMSW, wxGTK and wxOSX implement bitmap support in wxButton +// itself, this shouldn't be used for the other platforms neither +// when all of them do it +#if (defined(__WXMSW__) || defined(__WXGTK20__) || defined(__WXOSX__)) && !defined(__WXUNIVERSAL__) + #define wxHAS_BUTTON_BITMAP +#endif + +class WXDLLIMPEXP_FWD_CORE wxBitmapButton; + +// ---------------------------------------------------------------------------- +// wxBitmapButton: a button which shows bitmaps instead of the usual string. +// It has different bitmaps for different states (focused/disabled/pressed) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapButtonBase : public wxButton +{ +public: + wxBitmapButtonBase() + { +#ifndef wxHAS_BUTTON_BITMAP + m_marginX = + m_marginY = 0; +#endif // wxHAS_BUTTON_BITMAP + } + + bool Create(wxWindow *parent, + wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) + { + // We use wxBU_NOTEXT to let the base class Create() know that we are + // not going to show the label: this is a hack needed for wxGTK where + // we can show both label and bitmap only with GTK 2.6+ but we always + // can show just one of them and this style allows us to choose which + // one we need. + // + // And we also use wxBU_EXACTFIT to avoid being resized up to the + // standard button size as this doesn't make sense for bitmap buttons + // which are not standard anyhow and should fit their bitmap size. + return wxButton::Create(parent, winid, "", + pos, size, + style | wxBU_NOTEXT | wxBU_EXACTFIT, + validator, name); + } + + // Special creation function for a standard "Close" bitmap. It allows to + // simply create a close button with the image appropriate for the common + // platform. + static wxBitmapButton* NewCloseButton(wxWindow* parent, wxWindowID winid); + + + // set/get the margins around the button + virtual void SetMargins(int x, int y) + { + DoSetBitmapMargins(x, y); + } + + int GetMarginX() const { return DoGetBitmapMargins().x; } + int GetMarginY() const { return DoGetBitmapMargins().y; } + + // deprecated synonym for SetBitmapLabel() +#if WXWIN_COMPATIBILITY_2_6 + wxDEPRECATED_INLINE( void SetLabel(const wxBitmap& bitmap), + SetBitmapLabel(bitmap); ) + + // prevent virtual function hiding + virtual void SetLabel(const wxString& label) + { wxWindow::SetLabel(label); } +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: +#ifndef wxHAS_BUTTON_BITMAP + // function called when any of the bitmaps changes + virtual void OnSetBitmap() { InvalidateBestSize(); Refresh(); } + + virtual wxBitmap DoGetBitmap(State which) const { return m_bitmaps[which]; } + virtual void DoSetBitmap(const wxBitmap& bitmap, State which) + { m_bitmaps[which] = bitmap; OnSetBitmap(); } + + virtual wxSize DoGetBitmapMargins() const + { + return wxSize(m_marginX, m_marginY); + } + + virtual void DoSetBitmapMargins(int x, int y) + { + m_marginX = x; + m_marginY = y; + } + + // the bitmaps for various states + wxBitmap m_bitmaps[State_Max]; + + // the margins around the bitmap + int m_marginX, + m_marginY; +#endif // !wxHAS_BUTTON_BITMAP + + wxDECLARE_NO_COPY_CLASS(wxBitmapButtonBase); +}; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/bmpbuttn.h" +#elif defined(__WXMSW__) + #include "wx/msw/bmpbuttn.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/bmpbuttn.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/bmpbuttn.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/bmpbuttn.h" +#elif defined(__WXMAC__) + #include "wx/osx/bmpbuttn.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/bmpbuttn.h" +#elif defined(__WXPM__) + #include "wx/os2/bmpbuttn.h" +#endif + +#endif // wxUSE_BMPBUTTON + +#endif // _WX_BMPBUTTON_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/bmpcbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/bmpcbox.h new file mode 100644 index 0000000000..dd69525741 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/bmpcbox.h @@ -0,0 +1,124 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/bmpcbox.h +// Purpose: wxBitmapComboBox base header +// Author: Jaakko Salli +// Modified by: +// Created: Aug-31-2006 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BMPCBOX_H_BASE_ +#define _WX_BMPCBOX_H_BASE_ + + +#include "wx/defs.h" + +#if wxUSE_BITMAPCOMBOBOX + +#include "wx/bitmap.h" + +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxItemContainer; + +// Define wxBITMAPCOMBOBOX_OWNERDRAWN_BASED for platforms which +// wxBitmapComboBox implementation utilizes ownerdrawn combobox +// (either native or generic). +#if !defined(__WXGTK20__) || defined(__WXUNIVERSAL__) + #define wxBITMAPCOMBOBOX_OWNERDRAWN_BASED + +class WXDLLIMPEXP_FWD_CORE wxDC; +#endif + +extern WXDLLIMPEXP_DATA_ADV(const char) wxBitmapComboBoxNameStr[]; + + +class WXDLLIMPEXP_ADV wxBitmapComboBoxBase +{ +public: + // ctors and such + wxBitmapComboBoxBase() { Init(); } + + virtual ~wxBitmapComboBoxBase() { } + + // Sets the image for the given item. + virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) = 0; + +#if !defined(wxBITMAPCOMBOBOX_OWNERDRAWN_BASED) + + // Returns the image of the item with the given index. + virtual wxBitmap GetItemBitmap(unsigned int n) const = 0; + + // Returns size of the image used in list + virtual wxSize GetBitmapSize() const = 0; + +private: + void Init() {} + +#else // wxBITMAPCOMBOBOX_OWNERDRAWN_BASED + + // Returns the image of the item with the given index. + virtual wxBitmap GetItemBitmap(unsigned int n) const; + + // Returns size of the image used in list + virtual wxSize GetBitmapSize() const + { + return m_usedImgSize; + } + +protected: + + // Returns pointer to the combobox item container + virtual wxItemContainer* GetItemContainer() = 0; + + // Return pointer to the owner-drawn combobox control + virtual wxWindow* GetControl() = 0; + + // wxItemContainer functions + void BCBDoClear(); + void BCBDoDeleteOneItem(unsigned int n); + + void DoSetItemBitmap(unsigned int n, const wxBitmap& bitmap); + + void DrawBackground(wxDC& dc, const wxRect& rect, int item, int flags) const; + void DrawItem(wxDC& dc, const wxRect& rect, int item, const wxString& text, + int flags) const; + wxCoord MeasureItem(size_t item) const; + + // Returns true if image size was affected + virtual bool OnAddBitmap(const wxBitmap& bitmap); + + // Recalculates amount of empty space needed in front of text + // in control itself. Returns number that can be passed to + // wxOwnerDrawnComboBox::SetCustomPaintWidth() and similar + // functions. + virtual int DetermineIndent(); + + void UpdateInternals(); + + wxArrayPtrVoid m_bitmaps; // Images associated with items + wxSize m_usedImgSize; // Size of bitmaps + + int m_imgAreaWidth; // Width and height of area next to text field + int m_fontHeight; + int m_indent; + +private: + void Init(); +#endif // !wxBITMAPCOMBOBOX_OWNERDRAWN_BASED/wxBITMAPCOMBOBOX_OWNERDRAWN_BASED +}; + + +#if defined(__WXUNIVERSAL__) + #include "wx/generic/bmpcbox.h" +#elif defined(__WXMSW__) + #include "wx/msw/bmpcbox.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/bmpcbox.h" +#else + #include "wx/generic/bmpcbox.h" +#endif + +#endif // wxUSE_BITMAPCOMBOBOX + +#endif // _WX_BMPCBOX_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/bookctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/bookctrl.h new file mode 100644 index 0000000000..8b4fbb2fce --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/bookctrl.h @@ -0,0 +1,445 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/bookctrl.h +// Purpose: wxBookCtrlBase: common base class for wxList/Tree/Notebook +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.08.03 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BOOKCTRL_H_ +#define _WX_BOOKCTRL_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_BOOKCTRL + +#include "wx/control.h" +#include "wx/dynarray.h" +#include "wx/withimages.h" + +WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages); + +class WXDLLIMPEXP_FWD_CORE wxImageList; +class WXDLLIMPEXP_FWD_CORE wxBookCtrlEvent; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// wxBookCtrl hit results +enum +{ + wxBK_HITTEST_NOWHERE = 1, // not on tab + wxBK_HITTEST_ONICON = 2, // on icon + wxBK_HITTEST_ONLABEL = 4, // on label + wxBK_HITTEST_ONITEM = wxBK_HITTEST_ONICON | wxBK_HITTEST_ONLABEL, + wxBK_HITTEST_ONPAGE = 8 // not on tab control, but over the selected page +}; + +// wxBookCtrl flags (common for wxNotebook, wxListbook, wxChoicebook, wxTreebook) +#define wxBK_DEFAULT 0x0000 +#define wxBK_TOP 0x0010 +#define wxBK_BOTTOM 0x0020 +#define wxBK_LEFT 0x0040 +#define wxBK_RIGHT 0x0080 +#define wxBK_ALIGN_MASK (wxBK_TOP | wxBK_BOTTOM | wxBK_LEFT | wxBK_RIGHT) + +// ---------------------------------------------------------------------------- +// wxBookCtrlBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBookCtrlBase : public wxControl, + public wxWithImages +{ +public: + // construction + // ------------ + + wxBookCtrlBase() + { + Init(); + } + + wxBookCtrlBase(wxWindow *parent, + wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxEmptyString) + { + Init(); + + (void)Create(parent, winid, pos, size, style, name); + } + + // quasi ctor + bool Create(wxWindow *parent, + wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxEmptyString); + + + // accessors + // --------- + + // get number of pages in the dialog + virtual size_t GetPageCount() const { return m_pages.size(); } + + // get the panel which represents the given page + virtual wxWindow *GetPage(size_t n) const { return m_pages[n]; } + + // get the current page or NULL if none + wxWindow *GetCurrentPage() const + { + const int n = GetSelection(); + return n == wxNOT_FOUND ? NULL : GetPage(n); + } + + // get the currently selected page or wxNOT_FOUND if none + virtual int GetSelection() const { return m_selection; } + + // set/get the title of a page + virtual bool SetPageText(size_t n, const wxString& strText) = 0; + virtual wxString GetPageText(size_t n) const = 0; + + + // image list stuff: each page may have an image associated with it (all + // images belong to the same image list) + // --------------------------------------------------------------------- + + // sets/returns item's image index in the current image list + virtual int GetPageImage(size_t n) const = 0; + virtual bool SetPageImage(size_t n, int imageId) = 0; + + + // geometry + // -------- + + // resize the notebook so that all pages will have the specified size + virtual void SetPageSize(const wxSize& size); + + // return the size of the area needed to accommodate the controller + wxSize GetControllerSize() const; + + // calculate the size of the control from the size of its page + // + // by default this simply returns size enough to fit both the page and the + // controller + virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; + + // get/set size of area between book control area and page area + unsigned int GetInternalBorder() const { return m_internalBorder; } + void SetInternalBorder(unsigned int border) { m_internalBorder = border; } + + // Sets/gets the margin around the controller + void SetControlMargin(int margin) { m_controlMargin = margin; } + int GetControlMargin() const { return m_controlMargin; } + + // returns true if we have wxBK_TOP or wxBK_BOTTOM style + bool IsVertical() const { return HasFlag(wxBK_BOTTOM | wxBK_TOP); } + + // set/get option to shrink to fit current page + void SetFitToCurrentPage(bool fit) { m_fitToCurrentPage = fit; } + bool GetFitToCurrentPage() const { return m_fitToCurrentPage; } + + // returns the sizer containing the control, if any + wxSizer* GetControlSizer() const { return m_controlSizer; } + + + // operations + // ---------- + + // remove one page from the control and delete it + virtual bool DeletePage(size_t n); + + // remove one page from the notebook, without deleting it + virtual bool RemovePage(size_t n) + { + DoInvalidateBestSize(); + return DoRemovePage(n) != NULL; + } + + // remove all pages and delete them + virtual bool DeleteAllPages() + { + m_selection = wxNOT_FOUND; + DoInvalidateBestSize(); + WX_CLEAR_ARRAY(m_pages); + return true; + } + + // adds a new page to the control + virtual bool AddPage(wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE) + { + DoInvalidateBestSize(); + return InsertPage(GetPageCount(), page, text, bSelect, imageId); + } + + // the same as AddPage(), but adds the page at the specified position + virtual bool InsertPage(size_t n, + wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE) = 0; + + // set the currently selected page, return the index of the previously + // selected one (or wxNOT_FOUND on error) + // + // NB: this function will generate PAGE_CHANGING/ED events + virtual int SetSelection(size_t n) = 0; + + // acts as SetSelection but does not generate events + virtual int ChangeSelection(size_t n) = 0; + + + // cycle thru the pages + void AdvanceSelection(bool forward = true) + { + int nPage = GetNextPage(forward); + if ( nPage != wxNOT_FOUND ) + { + // cast is safe because of the check above + SetSelection((size_t)nPage); + } + } + + // return the index of the given page or wxNOT_FOUND + int FindPage(const wxWindow* page) const; + + // hit test: returns which page is hit and, optionally, where (icon, label) + virtual int HitTest(const wxPoint& WXUNUSED(pt), + long * WXUNUSED(flags) = NULL) const + { + return wxNOT_FOUND; + } + + + // we do have multiple pages + virtual bool HasMultiplePages() const { return true; } + + // we don't want focus for ourselves + virtual bool AcceptsFocus() const { return false; } + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +protected: + // flags for DoSetSelection() + enum + { + SetSelection_SendEvent = 1 + }; + + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // After the insertion of the page in the method InsertPage, calling this + // method sets the selection to the given page or the first one if there is + // still no selection. The "selection changed" event is sent only if + // bSelect is true, so when it is false, no event is sent even if the + // selection changed from wxNOT_FOUND to 0 when inserting the first page. + // + // Returns true if the selection was set to the specified page (explicitly + // because of bSelect == true or implicitly because it's the first page) or + // false otherwise. + bool DoSetSelectionAfterInsertion(size_t n, bool bSelect); + + // Update the selection after removing the page at the given index, + // typically called from the derived class overridden DoRemovePage(). + void DoSetSelectionAfterRemoval(size_t n); + + // set the selection to the given page, sending the events (which can + // possibly prevent the page change from taking place) if SendEvent flag is + // included + virtual int DoSetSelection(size_t nPage, int flags = 0); + + // if the derived class uses DoSetSelection() for implementing + // [Set|Change]Selection, it must override UpdateSelectedPage(), + // CreatePageChangingEvent() and MakeChangedEvent(), but as it might not + // use it, these functions are not pure virtual + + // called to notify the control about a new current page + virtual void UpdateSelectedPage(size_t WXUNUSED(newsel)) + { wxFAIL_MSG(wxT("Override this function!")); } + + // create a new "page changing" event + virtual wxBookCtrlEvent* CreatePageChangingEvent() const + { wxFAIL_MSG(wxT("Override this function!")); return NULL; } + + // modify the event created by CreatePageChangingEvent() to "page changed" + // event, usually by just calling SetEventType() on it + virtual void MakeChangedEvent(wxBookCtrlEvent& WXUNUSED(event)) + { wxFAIL_MSG(wxT("Override this function!")); } + + + // The derived class also may override the following method, also called + // from DoSetSelection(), to show/hide pages differently. + virtual void DoShowPage(wxWindow* page, bool show) { page->Show(show); } + + + // Should we accept NULL page pointers in Add/InsertPage()? + // + // Default is no but derived classes may override it if they can treat NULL + // pages in some sensible way (e.g. wxTreebook overrides this to allow + // having nodes without any associated page) + virtual bool AllowNullPage() const { return false; } + + // Remove the page and return a pointer to it. + // + // It also needs to update the current selection if necessary, i.e. if the + // page being removed comes before the selected one and the helper method + // DoSetSelectionAfterRemoval() can be used for this. + virtual wxWindow *DoRemovePage(size_t page) = 0; + + // our best size is the size which fits all our pages + virtual wxSize DoGetBestSize() const; + + // helper: get the next page wrapping if we reached the end + int GetNextPage(bool forward) const; + + // Lay out controls + virtual void DoSize(); + + // This method also invalidates the size of the controller and should be + // called instead of just InvalidateBestSize() whenever pages are added or + // removed as this also affects the controller + void DoInvalidateBestSize(); + +#if wxUSE_HELP + // Show the help for the corresponding page + void OnHelp(wxHelpEvent& event); +#endif // wxUSE_HELP + + + // the array of all pages of this control + wxArrayPages m_pages; + + // get the page area + virtual wxRect GetPageRect() const; + + // event handlers + void OnSize(wxSizeEvent& event); + + // controller buddy if available, NULL otherwise (usually for native book controls like wxNotebook) + wxControl *m_bookctrl; + + // Whether to shrink to fit current page + bool m_fitToCurrentPage; + + // the sizer containing the choice control + wxSizer *m_controlSizer; + + // the margin around the choice control + int m_controlMargin; + + // The currently selected page (in range 0..m_pages.size()-1 inclusive) or + // wxNOT_FOUND if none (this can normally only be the case for an empty + // control without any pages). + int m_selection; + +private: + + // common part of all ctors + void Init(); + + // internal border + unsigned int m_internalBorder; + + DECLARE_ABSTRACT_CLASS(wxBookCtrlBase) + wxDECLARE_NO_COPY_CLASS(wxBookCtrlBase); + + DECLARE_EVENT_TABLE() +}; + +// ---------------------------------------------------------------------------- +// wxBookCtrlEvent: page changing events generated by book classes +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBookCtrlEvent : public wxNotifyEvent +{ +public: + wxBookCtrlEvent(wxEventType commandType = wxEVT_NULL, int winid = 0, + int nSel = wxNOT_FOUND, int nOldSel = wxNOT_FOUND) + : wxNotifyEvent(commandType, winid) + { + m_nSel = nSel; + m_nOldSel = nOldSel; + } + + wxBookCtrlEvent(const wxBookCtrlEvent& event) + : wxNotifyEvent(event) + { + m_nSel = event.m_nSel; + m_nOldSel = event.m_nOldSel; + } + + virtual wxEvent *Clone() const { return new wxBookCtrlEvent(*this); } + + // accessors + // the currently selected page (wxNOT_FOUND if none) + int GetSelection() const { return m_nSel; } + void SetSelection(int nSel) { m_nSel = nSel; } + // the page that was selected before the change (wxNOT_FOUND if none) + int GetOldSelection() const { return m_nOldSel; } + void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; } + +private: + int m_nSel, // currently selected page + m_nOldSel; // previously selected page + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxBookCtrlEvent) +}; + +typedef void (wxEvtHandler::*wxBookCtrlEventFunction)(wxBookCtrlEvent&); + +#define wxBookCtrlEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxBookCtrlEventFunction, func) + +// obsolete name, defined for compatibility only +#define wxBookCtrlBaseEvent wxBookCtrlEvent + +// make a default book control for given platform +#if wxUSE_NOTEBOOK + // dedicated to majority of desktops + #include "wx/notebook.h" + #define wxBookCtrl wxNotebook + #define wxEVT_BOOKCTRL_PAGE_CHANGED wxEVT_NOTEBOOK_PAGE_CHANGED + #define wxEVT_BOOKCTRL_PAGE_CHANGING wxEVT_NOTEBOOK_PAGE_CHANGING + #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_NOTEBOOK_PAGE_CHANGED(id, fn) + #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_NOTEBOOK_PAGE_CHANGING(id, fn) +#else + // dedicated to Smartphones + #include "wx/choicebk.h" + #define wxBookCtrl wxChoicebook + #define wxEVT_BOOKCTRL_PAGE_CHANGED wxEVT_CHOICEBOOK_PAGE_CHANGED + #define wxEVT_BOOKCTRL_PAGE_CHANGING wxEVT_CHOICEBOOK_PAGE_CHANGING + #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_CHOICEBOOK_PAGE_CHANGED(id, fn) + #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_CHOICEBOOK_PAGE_CHANGING(id, fn) +#endif + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_BOOKCTRL_PAGE_CHANGED +#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_BOOKCTRL_PAGE_CHANGING + +#if WXWIN_COMPATIBILITY_2_6 + #define wxBC_TOP wxBK_TOP + #define wxBC_BOTTOM wxBK_BOTTOM + #define wxBC_LEFT wxBK_LEFT + #define wxBC_RIGHT wxBK_RIGHT + #define wxBC_DEFAULT wxBK_DEFAULT +#endif + +#endif // wxUSE_BOOKCTRL + +#endif // _WX_BOOKCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/brush.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/brush.h new file mode 100644 index 0000000000..1bf2c3005c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/brush.h @@ -0,0 +1,136 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/brush.h +// Purpose: Includes platform-specific wxBrush file +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BRUSH_H_BASE_ +#define _WX_BRUSH_H_BASE_ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" // for wxGDIObjListBase + +// NOTE: these values cannot be combined together! +enum wxBrushStyle +{ + wxBRUSHSTYLE_INVALID = -1, + + wxBRUSHSTYLE_SOLID = wxSOLID, + wxBRUSHSTYLE_TRANSPARENT = wxTRANSPARENT, + wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE, + wxBRUSHSTYLE_STIPPLE_MASK = wxSTIPPLE_MASK, + wxBRUSHSTYLE_STIPPLE = wxSTIPPLE, + wxBRUSHSTYLE_BDIAGONAL_HATCH = wxHATCHSTYLE_BDIAGONAL, + wxBRUSHSTYLE_CROSSDIAG_HATCH = wxHATCHSTYLE_CROSSDIAG, + wxBRUSHSTYLE_FDIAGONAL_HATCH = wxHATCHSTYLE_FDIAGONAL, + wxBRUSHSTYLE_CROSS_HATCH = wxHATCHSTYLE_CROSS, + wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL, + wxBRUSHSTYLE_VERTICAL_HATCH = wxHATCHSTYLE_VERTICAL, + wxBRUSHSTYLE_FIRST_HATCH = wxHATCHSTYLE_FIRST, + wxBRUSHSTYLE_LAST_HATCH = wxHATCHSTYLE_LAST +}; + + +// wxBrushBase +class WXDLLIMPEXP_CORE wxBrushBase: public wxGDIObject +{ +public: + virtual ~wxBrushBase() { } + + virtual void SetColour(const wxColour& col) = 0; + virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) = 0; + virtual void SetStyle(wxBrushStyle style) = 0; + virtual void SetStipple(const wxBitmap& stipple) = 0; + + virtual wxColour GetColour() const = 0; + virtual wxBrushStyle GetStyle() const = 0; + virtual wxBitmap *GetStipple() const = 0; + + virtual bool IsHatch() const + { return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); } + + // Convenient helpers for testing whether the brush is a transparent one: + // unlike GetStyle() == wxBRUSHSTYLE_TRANSPARENT, they work correctly even + // if the brush is invalid (they both return false in this case). + bool IsTransparent() const + { + return IsOk() && GetStyle() == wxBRUSHSTYLE_TRANSPARENT; + } + + bool IsNonTransparent() const + { + return IsOk() && GetStyle() != wxBRUSHSTYLE_TRANSPARENT; + } +}; + +#if defined(__WXMSW__) + #include "wx/msw/brush.h" +#elif defined(__WXMOTIF__) || defined(__WXX11__) + #include "wx/x11/brush.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/brush.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/brush.h" +#elif defined(__WXDFB__) + #include "wx/dfb/brush.h" +#elif defined(__WXMAC__) + #include "wx/osx/brush.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/brush.h" +#elif defined(__WXPM__) + #include "wx/os2/brush.h" +#endif + +class WXDLLIMPEXP_CORE wxBrushList: public wxGDIObjListBase +{ +public: + wxBrush *FindOrCreateBrush(const wxColour& colour, + wxBrushStyle style = wxBRUSHSTYLE_SOLID); + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxBrush *FindOrCreateBrush(const wxColour& colour, int style) + { return FindOrCreateBrush(colour, (wxBrushStyle)style); } +#endif + +#if WXWIN_COMPATIBILITY_2_6 + wxDEPRECATED( void AddBrush(wxBrush*) ); + wxDEPRECATED( void RemoveBrush(wxBrush*) ); +#endif +}; + +extern WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList; + +// provide comparison operators to allow code such as +// +// if ( brush.GetStyle() == wxTRANSPARENT ) +// +// to compile without warnings which it would otherwise provoke from some +// compilers as it compares elements of different enums +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + +// Unfortunately some compilers have ambiguity issues when enum comparisons are +// overloaded so we have to disable the overloads in this case, see +// wxCOMPILER_NO_OVERLOAD_ON_ENUM definition in wx/platform.h for more details. +#ifndef wxCOMPILER_NO_OVERLOAD_ON_ENUM + +inline bool operator==(wxBrushStyle s, wxDeprecatedGUIConstants t) +{ + return static_cast(s) == static_cast(t); +} + +inline bool operator!=(wxBrushStyle s, wxDeprecatedGUIConstants t) +{ + return !(s == t); +} + +#endif // wxCOMPILER_NO_OVERLOAD_ON_ENUM + +#endif // FUTURE_WXWIN_COMPATIBILITY_3_0 + +#endif // _WX_BRUSH_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/buffer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/buffer.h new file mode 100644 index 0000000000..9891494d97 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/buffer.h @@ -0,0 +1,624 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/buffer.h +// Purpose: auto buffer classes: buffers which automatically free memory +// Author: Vadim Zeitlin +// Modified by: +// Created: 12.04.99 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BUFFER_H +#define _WX_BUFFER_H + +#include "wx/chartype.h" +#include "wx/wxcrtbase.h" + +#include // malloc() and free() + +class WXDLLIMPEXP_FWD_BASE wxCStrData; + +// ---------------------------------------------------------------------------- +// Special classes for (wide) character strings: they use malloc/free instead +// of new/delete +// ---------------------------------------------------------------------------- + +// helpers used by wxCharTypeBuffer +namespace wxPrivate +{ + +struct UntypedBufferData +{ + enum Kind + { + Owned, + NonOwned + }; + + UntypedBufferData(void *str, size_t len, Kind kind = Owned) + : m_str(str), m_length(len), m_ref(1), m_owned(kind == Owned) {} + + ~UntypedBufferData() + { + if ( m_owned ) + free(m_str); + } + + void *m_str; + size_t m_length; + + // "short" to have sizeof(Data)=12 on 32bit archs + unsigned short m_ref; + + bool m_owned; +}; + +// NB: this is defined in string.cpp and not the (non-existent) buffer.cpp +WXDLLIMPEXP_BASE UntypedBufferData * GetUntypedNullData(); + +} // namespace wxPrivate + + +// Reference-counted character buffer for storing string data. The buffer +// is only valid for as long as the "parent" object that provided the data +// is valid; see wxCharTypeBuffer for persistent variant. +template +class wxScopedCharTypeBuffer +{ +public: + typedef T CharType; + + wxScopedCharTypeBuffer() + { + m_data = GetNullData(); + } + + // Creates "non-owned" buffer, i.e. 'str' is not owned by the buffer + // and doesn't get freed by dtor. Used e.g. to point to wxString's internal + // storage. + static + const wxScopedCharTypeBuffer CreateNonOwned(const CharType *str, + size_t len = wxNO_LEN) + { + if ( len == wxNO_LEN ) + len = wxStrlen(str); + + wxScopedCharTypeBuffer buf; + if ( str ) + buf.m_data = new Data(const_cast(str), len, Data::NonOwned); + return buf; + } + + // Creates "owned" buffer, i.e. takes over ownership of 'str' and frees it + // in dtor (if ref.count reaches 0). + static + const wxScopedCharTypeBuffer CreateOwned(CharType *str, + size_t len = wxNO_LEN ) + { + if ( len == wxNO_LEN ) + len = wxStrlen(str); + + wxScopedCharTypeBuffer buf; + if ( str ) + buf.m_data = new Data(str, len); + return buf; + } + + wxScopedCharTypeBuffer(const wxScopedCharTypeBuffer& src) + { + m_data = src.m_data; + IncRef(); + } + + wxScopedCharTypeBuffer& operator=(const wxScopedCharTypeBuffer& src) + { + if ( &src == this ) + return *this; + + DecRef(); + m_data = src.m_data; + IncRef(); + + return *this; + } + + ~wxScopedCharTypeBuffer() + { + DecRef(); + } + + // NB: this method is only const for backward compatibility. It used to + // be needed for auto_ptr-like semantics of the copy ctor, but now + // that ref-counting is used, it's not really needed. + CharType *release() const + { + if ( m_data == GetNullData() ) + return NULL; + + wxASSERT_MSG( m_data->m_owned, wxT("can't release non-owned buffer") ); + wxASSERT_MSG( m_data->m_ref == 1, wxT("can't release shared buffer") ); + + CharType * const p = m_data->Get(); + + wxScopedCharTypeBuffer *self = const_cast(this); + self->m_data->Set(NULL, 0); + self->DecRef(); + + return p; + } + + void reset() + { + DecRef(); + } + + CharType *data() { return m_data->Get(); } + const CharType *data() const { return m_data->Get(); } + operator const CharType *() const { return data(); } + CharType operator[](size_t n) const { return data()[n]; } + + size_t length() const { return m_data->m_length; } + +protected: + // reference-counted data + struct Data : public wxPrivate::UntypedBufferData + { + Data(CharType *str, size_t len, Kind kind = Owned) + : wxPrivate::UntypedBufferData(str, len, kind) + { + } + + CharType *Get() const { return static_cast(m_str); } + void Set(CharType *str, size_t len) + { + m_str = str; + m_length = len; + } + }; + + // placeholder for NULL string, to simplify this code + static Data *GetNullData() + { + return static_cast(wxPrivate::GetUntypedNullData()); + } + + void IncRef() + { + if ( m_data == GetNullData() ) // exception, not ref-counted + return; + m_data->m_ref++; + } + + void DecRef() + { + if ( m_data == GetNullData() ) // exception, not ref-counted + return; + if ( --m_data->m_ref == 0 ) + delete m_data; + m_data = GetNullData(); + } + + // sets this object to a be copy of 'other'; if 'src' is non-owned, + // a deep copy is made and 'this' will contain new instance of the data + void MakeOwnedCopyOf(const wxScopedCharTypeBuffer& src) + { + this->DecRef(); + + if ( src.m_data == this->GetNullData() ) + { + this->m_data = this->GetNullData(); + } + else if ( src.m_data->m_owned ) + { + this->m_data = src.m_data; + this->IncRef(); + } + else + { + // if the scoped buffer had non-owned data, we have to make + // a copy here, because src.m_data->m_str is valid only for as long + // as 'src' exists + this->m_data = new Data + ( + StrCopy(src.data(), src.length()), + src.length() + ); + } + } + + static CharType *StrCopy(const CharType *src, size_t len) + { + CharType *dst = (CharType*)malloc(sizeof(CharType) * (len + 1)); + if ( dst ) + memcpy(dst, src, sizeof(CharType) * (len + 1)); + return dst; + } + +protected: + Data *m_data; +}; + +typedef wxScopedCharTypeBuffer wxScopedCharBuffer; +typedef wxScopedCharTypeBuffer wxScopedWCharBuffer; + + +// this buffer class always stores data in "owned" (persistent) manner +template +class wxCharTypeBuffer : public wxScopedCharTypeBuffer +{ +protected: + typedef typename wxScopedCharTypeBuffer::Data Data; + +public: + typedef T CharType; + + wxCharTypeBuffer(const CharType *str = NULL, size_t len = wxNO_LEN) + { + if ( str ) + { + if ( len == wxNO_LEN ) + len = wxStrlen(str); + this->m_data = new Data(this->StrCopy(str, len), len); + } + else + { + this->m_data = this->GetNullData(); + } + } + + wxCharTypeBuffer(size_t len) + { + CharType* const str = (CharType *)malloc((len + 1)*sizeof(CharType)); + if ( str ) + { + str[len] = (CharType)0; + + // There is a potential memory leak here if new throws because it + // fails to allocate Data, we ought to use new(nothrow) here, but + // this might fail to compile under some platforms so until this + // can be fully tested, just live with this (rather unlikely, as + // Data is a small object) potential leak. + this->m_data = new Data(str, len); + } + else + { + this->m_data = this->GetNullData(); + } + } + + wxCharTypeBuffer(const wxCharTypeBuffer& src) + : wxScopedCharTypeBuffer(src) {} + + wxCharTypeBuffer& operator=(const CharType *str) + { + this->DecRef(); + + if ( str ) + this->m_data = new Data(wxStrdup(str), wxStrlen(str)); + return *this; + } + + wxCharTypeBuffer& operator=(const wxCharTypeBuffer& src) + { + wxScopedCharTypeBuffer::operator=(src); + return *this; + } + + wxCharTypeBuffer(const wxScopedCharTypeBuffer& src) + { + this->MakeOwnedCopyOf(src); + } + + wxCharTypeBuffer& operator=(const wxScopedCharTypeBuffer& src) + { + MakeOwnedCopyOf(src); + return *this; + } + + bool extend(size_t len) + { + wxASSERT_MSG( this->m_data->m_owned, "cannot extend non-owned buffer" ); + wxASSERT_MSG( this->m_data->m_ref == 1, "can't extend shared buffer" ); + + CharType *str = + (CharType *)realloc(this->data(), (len + 1) * sizeof(CharType)); + if ( !str ) + return false; + + // For consistency with the ctor taking just the length, NUL-terminate + // the buffer. + str[len] = (CharType)0; + + if ( this->m_data == this->GetNullData() ) + { + this->m_data = new Data(str, len); + } + else + { + this->m_data->Set(str, len); + this->m_data->m_owned = true; + } + + return true; + } + + void shrink(size_t len) + { + wxASSERT_MSG( this->m_data->m_owned, "cannot shrink non-owned buffer" ); + wxASSERT_MSG( this->m_data->m_ref == 1, "can't shrink shared buffer" ); + + wxASSERT( len <= this->length() ); + + this->m_data->m_length = len; + this->data()[len] = 0; + } +}; + +WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxScopedCharTypeBuffer ) +WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxCharTypeBuffer ) + +class wxCharBuffer : public wxCharTypeBuffer +{ +public: + typedef wxCharTypeBuffer wxCharTypeBufferBase; + typedef wxScopedCharTypeBuffer wxScopedCharTypeBufferBase; + + wxCharBuffer(const wxCharTypeBufferBase& buf) + : wxCharTypeBufferBase(buf) {} + wxCharBuffer(const wxScopedCharTypeBufferBase& buf) + : wxCharTypeBufferBase(buf) {} + + wxCharBuffer(const CharType *str = NULL) : wxCharTypeBufferBase(str) {} + wxCharBuffer(size_t len) : wxCharTypeBufferBase(len) {} + + wxCharBuffer(const wxCStrData& cstr); +}; + +WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxScopedCharTypeBuffer ) +WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxCharTypeBuffer ) + +class wxWCharBuffer : public wxCharTypeBuffer +{ +public: + typedef wxCharTypeBuffer wxCharTypeBufferBase; + typedef wxScopedCharTypeBuffer wxScopedCharTypeBufferBase; + + wxWCharBuffer(const wxCharTypeBufferBase& buf) + : wxCharTypeBufferBase(buf) {} + wxWCharBuffer(const wxScopedCharTypeBufferBase& buf) + : wxCharTypeBufferBase(buf) {} + + wxWCharBuffer(const CharType *str = NULL) : wxCharTypeBufferBase(str) {} + wxWCharBuffer(size_t len) : wxCharTypeBufferBase(len) {} + + wxWCharBuffer(const wxCStrData& cstr); +}; + +// wxCharTypeBuffer implicitly convertible to T* +template +class wxWritableCharTypeBuffer : public wxCharTypeBuffer +{ +public: + typedef typename wxScopedCharTypeBuffer::CharType CharType; + + wxWritableCharTypeBuffer(const wxScopedCharTypeBuffer& src) + : wxCharTypeBuffer(src) {} + // FIXME-UTF8: this won't be needed after converting mb_str()/wc_str() to + // always return a buffer + // + we should derive this class from wxScopedCharTypeBuffer + // then + wxWritableCharTypeBuffer(const CharType *str = NULL) + : wxCharTypeBuffer(str) {} + + operator CharType*() { return this->data(); } +}; + +typedef wxWritableCharTypeBuffer wxWritableCharBuffer; +typedef wxWritableCharTypeBuffer wxWritableWCharBuffer; + + +#if wxUSE_UNICODE + #define wxWxCharBuffer wxWCharBuffer + + #define wxMB2WXbuf wxWCharBuffer + #define wxWX2MBbuf wxCharBuffer + #if wxUSE_UNICODE_WCHAR + #define wxWC2WXbuf wxChar* + #define wxWX2WCbuf wxChar* + #elif wxUSE_UNICODE_UTF8 + #define wxWC2WXbuf wxWCharBuffer + #define wxWX2WCbuf wxWCharBuffer + #endif +#else // ANSI + #define wxWxCharBuffer wxCharBuffer + + #define wxMB2WXbuf wxChar* + #define wxWX2MBbuf wxChar* + #define wxWC2WXbuf wxCharBuffer + #define wxWX2WCbuf wxWCharBuffer +#endif // Unicode/ANSI + +// ---------------------------------------------------------------------------- +// A class for holding growable data buffers (not necessarily strings) +// ---------------------------------------------------------------------------- + +// This class manages the actual data buffer pointer and is ref-counted. +class wxMemoryBufferData +{ +public: + // the initial size and also the size added by ResizeIfNeeded() + enum { DefBufSize = 1024 }; + + friend class wxMemoryBuffer; + + // everything is private as it can only be used by wxMemoryBuffer +private: + wxMemoryBufferData(size_t size = wxMemoryBufferData::DefBufSize) + : m_data(size ? malloc(size) : NULL), m_size(size), m_len(0), m_ref(0) + { + } + ~wxMemoryBufferData() { free(m_data); } + + + void ResizeIfNeeded(size_t newSize) + { + if (newSize > m_size) + { + void *dataOld = m_data; + m_data = realloc(m_data, newSize + wxMemoryBufferData::DefBufSize); + if ( !m_data ) + { + free(dataOld); + } + + m_size = newSize + wxMemoryBufferData::DefBufSize; + } + } + + void IncRef() { m_ref += 1; } + void DecRef() + { + m_ref -= 1; + if (m_ref == 0) // are there no more references? + delete this; + } + + void *release() + { + if ( m_data == NULL ) + return NULL; + + wxASSERT_MSG( m_ref == 1, "can't release shared buffer" ); + + void *p = m_data; + m_data = NULL; + m_len = + m_size = 0; + + return p; + } + + + // the buffer containing the data + void *m_data; + + // the size of the buffer + size_t m_size; + + // the amount of data currently in the buffer + size_t m_len; + + // the reference count + size_t m_ref; + + wxDECLARE_NO_COPY_CLASS(wxMemoryBufferData); +}; + + +class wxMemoryBuffer +{ +public: + // ctor and dtor + wxMemoryBuffer(size_t size = wxMemoryBufferData::DefBufSize) + { + m_bufdata = new wxMemoryBufferData(size); + m_bufdata->IncRef(); + } + + ~wxMemoryBuffer() { m_bufdata->DecRef(); } + + + // copy and assignment + wxMemoryBuffer(const wxMemoryBuffer& src) + : m_bufdata(src.m_bufdata) + { + m_bufdata->IncRef(); + } + + wxMemoryBuffer& operator=(const wxMemoryBuffer& src) + { + if (&src != this) + { + m_bufdata->DecRef(); + m_bufdata = src.m_bufdata; + m_bufdata->IncRef(); + } + return *this; + } + + + // Accessors + void *GetData() const { return m_bufdata->m_data; } + size_t GetBufSize() const { return m_bufdata->m_size; } + size_t GetDataLen() const { return m_bufdata->m_len; } + + bool IsEmpty() const { return GetDataLen() == 0; } + + void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); } + void SetDataLen(size_t len) + { + wxASSERT(len <= m_bufdata->m_size); + m_bufdata->m_len = len; + } + + void Clear() { SetDataLen(0); } + + // Ensure the buffer is big enough and return a pointer to it + void *GetWriteBuf(size_t sizeNeeded) + { + m_bufdata->ResizeIfNeeded(sizeNeeded); + return m_bufdata->m_data; + } + + // Update the length after the write + void UngetWriteBuf(size_t sizeUsed) { SetDataLen(sizeUsed); } + + // Like the above, but appends to the buffer + void *GetAppendBuf(size_t sizeNeeded) + { + m_bufdata->ResizeIfNeeded(m_bufdata->m_len + sizeNeeded); + return (char*)m_bufdata->m_data + m_bufdata->m_len; + } + + // Update the length after the append + void UngetAppendBuf(size_t sizeUsed) + { + SetDataLen(m_bufdata->m_len + sizeUsed); + } + + // Other ways to append to the buffer + void AppendByte(char data) + { + wxCHECK_RET( m_bufdata->m_data, wxT("invalid wxMemoryBuffer") ); + + m_bufdata->ResizeIfNeeded(m_bufdata->m_len + 1); + *(((char*)m_bufdata->m_data) + m_bufdata->m_len) = data; + m_bufdata->m_len += 1; + } + + void AppendData(const void *data, size_t len) + { + memcpy(GetAppendBuf(len), data, len); + UngetAppendBuf(len); + } + + operator const char *() const { return (const char*)GetData(); } + + // gives up ownership of data, returns the pointer; after this call, + // data isn't freed by the buffer and its content is resent to empty + void *release() + { + return m_bufdata->release(); + } + +private: + wxMemoryBufferData* m_bufdata; +}; + +// ---------------------------------------------------------------------------- +// template class for any kind of data +// ---------------------------------------------------------------------------- + +// TODO + +#endif // _WX_BUFFER_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/build.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/build.h new file mode 100644 index 0000000000..0959a29782 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/build.h @@ -0,0 +1,120 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/build.h +// Purpose: Runtime build options checking +// Author: Vadim Zeitlin, Vaclav Slavik +// Modified by: +// Created: 07.05.02 +// Copyright: (c) 2002 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BUILD_H_ +#define _WX_BUILD_H_ + +#include "wx/version.h" + +// NB: This file contains macros for checking binary compatibility of libraries +// in multilib builds, plugins and user components. +// The WX_BUILD_OPTIONS_SIGNATURE macro expands into string that should +// uniquely identify binary compatible builds: i.e. if two builds of the +// library are binary compatible, their signature string should be the +// same; if two builds are binary incompatible, their signatures should +// be different. +// +// Therefore, wxUSE_XXX flags that affect binary compatibility (vtables, +// function signatures) should be accounted for here. So should compilers +// and compiler versions (but note that binary compatible compiler versions +// such as gcc-2.95.2 and gcc-2.95.3 should have same signature!). + +// ---------------------------------------------------------------------------- +// WX_BUILD_OPTIONS_SIGNATURE +// ---------------------------------------------------------------------------- + +#define __WX_BO_STRINGIZE(x) __WX_BO_STRINGIZE0(x) +#define __WX_BO_STRINGIZE0(x) #x + +#if (wxMINOR_VERSION % 2) == 0 + #define __WX_BO_VERSION(x,y,z) \ + __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) +#else + #define __WX_BO_VERSION(x,y,z) \ + __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) "." __WX_BO_STRINGIZE(z) +#endif + +#if wxUSE_UNICODE_UTF8 + #define __WX_BO_UNICODE "UTF-8" +#elif wxUSE_UNICODE_WCHAR + #define __WX_BO_UNICODE "wchar_t" +#else + #define __WX_BO_UNICODE "ANSI" +#endif + +// GCC and Intel C++ share same C++ ABI (and possibly others in the future), +// check if compiler versions are compatible: +#if defined(__GXX_ABI_VERSION) + #define __WX_BO_COMPILER \ + ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION) +#elif defined(__INTEL_COMPILER) + #define __WX_BO_COMPILER ",Intel C++" +#elif defined(__GNUG__) + #define __WX_BO_COMPILER ",GCC " \ + __WX_BO_STRINGIZE(__GNUC__) "." __WX_BO_STRINGIZE(__GNUC_MINOR__) +#elif defined(__VISUALC__) + #define __WX_BO_COMPILER ",Visual C++ " __WX_BO_STRINGIZE(_MSC_VER) +#elif defined(__BORLANDC__) + #define __WX_BO_COMPILER ",Borland C++" +#elif defined(__DIGITALMARS__) + #define __WX_BO_COMPILER ",DigitalMars" +#elif defined(__WATCOMC__) + #define __WX_BO_COMPILER ",Watcom C++" +#else + #define __WX_BO_COMPILER +#endif + +// WXWIN_COMPATIBILITY macros affect presence of virtual functions +#if WXWIN_COMPATIBILITY_2_6 + #define __WX_BO_WXWIN_COMPAT_2_6 ",compatible with 2.6" +#else + #define __WX_BO_WXWIN_COMPAT_2_6 +#endif +#if WXWIN_COMPATIBILITY_2_8 + #define __WX_BO_WXWIN_COMPAT_2_8 ",compatible with 2.8" +#else + #define __WX_BO_WXWIN_COMPAT_2_8 +#endif + +// deriving wxWin containers from STL ones changes them completely: +#if wxUSE_STD_CONTAINERS + #define __WX_BO_STL ",STL containers" +#else + #define __WX_BO_STL ",wx containers" +#endif + +// This macro is passed as argument to wxConsoleApp::CheckBuildOptions() +#define WX_BUILD_OPTIONS_SIGNATURE \ + __WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \ + " (" __WX_BO_UNICODE \ + __WX_BO_COMPILER \ + __WX_BO_STL \ + __WX_BO_WXWIN_COMPAT_2_6 __WX_BO_WXWIN_COMPAT_2_8 \ + ")" + + +// ---------------------------------------------------------------------------- +// WX_CHECK_BUILD_OPTIONS +// ---------------------------------------------------------------------------- + +// Use this macro to check build options. Adding it to a file in DLL will +// ensure that the DLL checks build options in same way wxIMPLEMENT_APP() does. +#define WX_CHECK_BUILD_OPTIONS(libName) \ + static struct wxBuildOptionsChecker \ + { \ + wxBuildOptionsChecker() \ + { \ + wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \ + libName); \ + } \ + } gs_buildOptionsCheck; + + +#endif // _WX_BUILD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/busyinfo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/busyinfo.h new file mode 100644 index 0000000000..600c86c634 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/busyinfo.h @@ -0,0 +1,20 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/busyinfo.h +// Purpose: Information window (when app is busy) +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __BUSYINFO_H_BASE__ +#define __BUSYINFO_H_BASE__ + +#include "wx/defs.h" + +#if wxUSE_BUSYINFO + +#include "wx/generic/busyinfo.h" + +#endif // wxUSE_BUSYINFO + +#endif // __BUSYINFO_H_BASE__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/button.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/button.h new file mode 100644 index 0000000000..71dbee41de --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/button.h @@ -0,0 +1,69 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/button.h +// Purpose: wxButtonBase class +// Author: Vadim Zetlin +// Modified by: +// Created: 15.08.00 +// Copyright: (c) Vadim Zetlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BUTTON_H_BASE_ +#define _WX_BUTTON_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_BUTTON + +#include "wx/anybutton.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[]; + +// ---------------------------------------------------------------------------- +// wxButton: a push button +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxButtonBase : public wxAnyButton +{ +public: + wxButtonBase() { } + + // show the authentication needed symbol on the button: this is currently + // only implemented on Windows Vista and newer (on which it shows the UAC + // shield symbol) + void SetAuthNeeded(bool show = true) { DoSetAuthNeeded(show); } + bool GetAuthNeeded() const { return DoGetAuthNeeded(); } + + // make this button the default button in its top level window + // + // returns the old default item (possibly NULL) + virtual wxWindow *SetDefault(); + + // returns the default button size for this platform + static wxSize GetDefaultSize(); + +protected: + wxDECLARE_NO_COPY_CLASS(wxButtonBase); +}; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/button.h" +#elif defined(__WXMSW__) + #include "wx/msw/button.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/button.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/button.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/button.h" +#elif defined(__WXMAC__) + #include "wx/osx/button.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/button.h" +#elif defined(__WXPM__) + #include "wx/os2/button.h" +#endif + +#endif // wxUSE_BUTTON + +#endif // _WX_BUTTON_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/calctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/calctrl.h new file mode 100644 index 0000000000..16a84748d2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/calctrl.h @@ -0,0 +1,396 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/calctrl.h +// Purpose: date-picker control +// Author: Vadim Zeitlin +// Modified by: +// Created: 29.12.99 +// Copyright: (c) 1999 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CALCTRL_H_ +#define _WX_CALCTRL_H_ + +#include "wx/defs.h" + +#if wxUSE_CALENDARCTRL + +#include "wx/dateevt.h" +#include "wx/colour.h" +#include "wx/font.h" +#include "wx/control.h" + +// ---------------------------------------------------------------------------- +// wxCalendarCtrl flags +// ---------------------------------------------------------------------------- + +enum +{ + // show Sunday as the first day of the week (default) + wxCAL_SUNDAY_FIRST = 0x0000, + + // show Monday as the first day of the week + wxCAL_MONDAY_FIRST = 0x0001, + + // highlight holidays + wxCAL_SHOW_HOLIDAYS = 0x0002, + + // disable the year change control, show only the month change one + // deprecated + wxCAL_NO_YEAR_CHANGE = 0x0004, + + // don't allow changing neither month nor year (implies + // wxCAL_NO_YEAR_CHANGE) + wxCAL_NO_MONTH_CHANGE = 0x000c, + + // use MS-style month-selection instead of combo-spin combination + wxCAL_SEQUENTIAL_MONTH_SELECTION = 0x0010, + + // show the neighbouring weeks in the previous and next month + wxCAL_SHOW_SURROUNDING_WEEKS = 0x0020, + + // show week numbers on the left side of the calendar. + wxCAL_SHOW_WEEK_NUMBERS = 0x0040 +}; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// return values for the HitTest() method +enum wxCalendarHitTestResult +{ + wxCAL_HITTEST_NOWHERE, // outside of anything + wxCAL_HITTEST_HEADER, // on the header (weekdays) + wxCAL_HITTEST_DAY, // on a day in the calendar + wxCAL_HITTEST_INCMONTH, + wxCAL_HITTEST_DECMONTH, + wxCAL_HITTEST_SURROUNDING_WEEK, + wxCAL_HITTEST_WEEK +}; + +// border types for a date +enum wxCalendarDateBorder +{ + wxCAL_BORDER_NONE, // no border (default) + wxCAL_BORDER_SQUARE, // a rectangular border + wxCAL_BORDER_ROUND // a round border +}; + +// ---------------------------------------------------------------------------- +// wxCalendarDateAttr: custom attributes for a calendar date +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxCalendarDateAttr +{ +public: + // ctors + wxCalendarDateAttr(const wxColour& colText = wxNullColour, + const wxColour& colBack = wxNullColour, + const wxColour& colBorder = wxNullColour, + const wxFont& font = wxNullFont, + wxCalendarDateBorder border = wxCAL_BORDER_NONE) + : m_colText(colText), m_colBack(colBack), + m_colBorder(colBorder), m_font(font) + { + Init(border); + } + wxCalendarDateAttr(wxCalendarDateBorder border, + const wxColour& colBorder = wxNullColour) + : m_colBorder(colBorder) + { + Init(border); + } + + // setters + void SetTextColour(const wxColour& colText) { m_colText = colText; } + void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; } + void SetBorderColour(const wxColour& col) { m_colBorder = col; } + void SetFont(const wxFont& font) { m_font = font; } + void SetBorder(wxCalendarDateBorder border) { m_border = border; } + void SetHoliday(bool holiday) { m_holiday = holiday; } + + // accessors + bool HasTextColour() const { return m_colText.IsOk(); } + bool HasBackgroundColour() const { return m_colBack.IsOk(); } + bool HasBorderColour() const { return m_colBorder.IsOk(); } + bool HasFont() const { return m_font.IsOk(); } + bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; } + + bool IsHoliday() const { return m_holiday; } + + const wxColour& GetTextColour() const { return m_colText; } + const wxColour& GetBackgroundColour() const { return m_colBack; } + const wxColour& GetBorderColour() const { return m_colBorder; } + const wxFont& GetFont() const { return m_font; } + wxCalendarDateBorder GetBorder() const { return m_border; } + + // get or change the "mark" attribute, i.e. the one used for the items + // marked with wxCalendarCtrl::Mark() + static const wxCalendarDateAttr& GetMark() { return m_mark; } + static void SetMark(wxCalendarDateAttr const& m) { m_mark = m; } + +protected: + void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE) + { + m_border = border; + m_holiday = false; + } + +private: + static wxCalendarDateAttr m_mark; + + wxColour m_colText, + m_colBack, + m_colBorder; + wxFont m_font; + wxCalendarDateBorder m_border; + bool m_holiday; +}; + +// ---------------------------------------------------------------------------- +// wxCalendarCtrl events +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl; + +class WXDLLIMPEXP_ADV wxCalendarEvent : public wxDateEvent +{ +public: + wxCalendarEvent() : m_wday(wxDateTime::Inv_WeekDay) { } + wxCalendarEvent(wxWindow *win, const wxDateTime& dt, wxEventType type) + : wxDateEvent(win, dt, type), + m_wday(wxDateTime::Inv_WeekDay) { } + wxCalendarEvent(const wxCalendarEvent& event) + : wxDateEvent(event), m_wday(event.m_wday) { } + + void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; } + wxDateTime::WeekDay GetWeekDay() const { return m_wday; } + + virtual wxEvent *Clone() const { return new wxCalendarEvent(*this); } + +private: + wxDateTime::WeekDay m_wday; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCalendarEvent) +}; + +// ---------------------------------------------------------------------------- +// wxCalendarCtrlBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxCalendarCtrlBase : public wxControl +{ +public: + // do we allow changing the month/year? + bool AllowMonthChange() const { return !HasFlag(wxCAL_NO_MONTH_CHANGE); } + + // get/set the current date + virtual wxDateTime GetDate() const = 0; + virtual bool SetDate(const wxDateTime& date) = 0; + + + // restricting the dates shown by the control to the specified range: only + // implemented in the generic and MSW versions for now + + // if either date is set, the corresponding limit will be enforced and true + // returned; if none are set, the existing restrictions are removed and + // false is returned + virtual bool + SetDateRange(const wxDateTime& WXUNUSED(lowerdate) = wxDefaultDateTime, + const wxDateTime& WXUNUSED(upperdate) = wxDefaultDateTime) + { + return false; + } + + // retrieves the limits currently in use (wxDefaultDateTime if none) in the + // provided pointers (which may be NULL) and returns true if there are any + // limits or false if none + virtual bool + GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const + { + if ( lowerdate ) + *lowerdate = wxDefaultDateTime; + if ( upperdate ) + *upperdate = wxDefaultDateTime; + return false; + } + + // returns one of wxCAL_HITTEST_XXX constants and fills either date or wd + // with the corresponding value (none for NOWHERE, the date for DAY and wd + // for HEADER) + // + // notice that this is not implemented in all versions + virtual wxCalendarHitTestResult + HitTest(const wxPoint& WXUNUSED(pos), + wxDateTime* WXUNUSED(date) = NULL, + wxDateTime::WeekDay* WXUNUSED(wd) = NULL) + { + return wxCAL_HITTEST_NOWHERE; + } + + // allow or disable changing the current month (and year), return true if + // the value of this option really changed or false if it was already set + // to the required value + // + // NB: we provide implementation for this pure virtual function, derived + // classes should call it + virtual bool EnableMonthChange(bool enable = true) = 0; + + + // an item without custom attributes is drawn with the default colours and + // font and without border, setting custom attributes allows to modify this + // + // the day parameter should be in 1..31 range, for days 29, 30, 31 the + // corresponding attribute is just unused if there is no such day in the + // current month + // + // notice that currently arbitrary attributes are supported only in the + // generic version, the native controls only support Mark() which assigns + // some special appearance (which can be customized using SetMark() for the + // generic version) to the given day + + virtual void Mark(size_t day, bool mark) = 0; + + virtual wxCalendarDateAttr *GetAttr(size_t WXUNUSED(day)) const + { return NULL; } + virtual void SetAttr(size_t WXUNUSED(day), wxCalendarDateAttr *attr) + { delete attr; } + virtual void ResetAttr(size_t WXUNUSED(day)) { } + + + // holidays support + // + // currently only the generic version implements all functions in this + // section; wxMSW implements simple support for holidays (they can be + // just enabled or disabled) and wxGTK doesn't support them at all + + // equivalent to changing wxCAL_SHOW_HOLIDAYS flag but should be called + // instead of just changing it + virtual void EnableHolidayDisplay(bool display = true); + + // set/get the colours to use for holidays (if they're enabled) + virtual void SetHolidayColours(const wxColour& WXUNUSED(colFg), + const wxColour& WXUNUSED(colBg)) { } + + virtual const wxColour& GetHolidayColourFg() const { return wxNullColour; } + virtual const wxColour& GetHolidayColourBg() const { return wxNullColour; } + + // mark the given day of the current month as being a holiday + virtual void SetHoliday(size_t WXUNUSED(day)) { } + + + // customizing the colours of the controls + // + // most of the methods in this section are only implemented by the native + // version of the control and do nothing in the native ones + + // set/get the colours to use for the display of the week day names at the + // top of the controls + virtual void SetHeaderColours(const wxColour& WXUNUSED(colFg), + const wxColour& WXUNUSED(colBg)) { } + + virtual const wxColour& GetHeaderColourFg() const { return wxNullColour; } + virtual const wxColour& GetHeaderColourBg() const { return wxNullColour; } + + // set/get the colours used for the currently selected date + virtual void SetHighlightColours(const wxColour& WXUNUSED(colFg), + const wxColour& WXUNUSED(colBg)) { } + + virtual const wxColour& GetHighlightColourFg() const { return wxNullColour; } + virtual const wxColour& GetHighlightColourBg() const { return wxNullColour; } + + + // implementation only from now on + + // generate the given calendar event, return true if it was processed + // + // NB: this is public because it's used from GTK+ callbacks + bool GenerateEvent(wxEventType type) + { + wxCalendarEvent event(this, GetDate(), type); + return HandleWindowEvent(event); + } + +protected: + // generate all the events for the selection change from dateOld to current + // date: SEL_CHANGED, PAGE_CHANGED if necessary and also one of (deprecated) + // YEAR/MONTH/DAY_CHANGED ones + // + // returns true if page changed event was generated, false if the new date + // is still in the same month as before + bool GenerateAllChangeEvents(const wxDateTime& dateOld); + + // call SetHoliday() for all holidays in the current month + // + // should be called on month change, does nothing if wxCAL_SHOW_HOLIDAYS is + // not set and returns false in this case, true if we do show them + bool SetHolidayAttrs(); + + // called by SetHolidayAttrs() to forget the previously set holidays + virtual void ResetHolidayAttrs() { } + + // called by EnableHolidayDisplay() + virtual void RefreshHolidays() { } +}; + +// ---------------------------------------------------------------------------- +// wxCalendarCtrl +// ---------------------------------------------------------------------------- + +#define wxCalendarNameStr "CalendarCtrl" + +#ifndef __WXUNIVERSAL__ + #if defined(__WXGTK20__) + #define wxHAS_NATIVE_CALENDARCTRL + #include "wx/gtk/calctrl.h" + #define wxCalendarCtrl wxGtkCalendarCtrl + #elif defined(__WXMSW__) + #define wxHAS_NATIVE_CALENDARCTRL + #include "wx/msw/calctrl.h" + #endif +#endif // !__WXUNIVERSAL__ + +#ifndef wxHAS_NATIVE_CALENDARCTRL + #include "wx/generic/calctrlg.h" + #define wxCalendarCtrl wxGenericCalendarCtrl +#endif + +// ---------------------------------------------------------------------------- +// calendar event types and macros for handling them +// ---------------------------------------------------------------------------- + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_PAGE_CHANGED, wxCalendarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DOUBLECLICKED, wxCalendarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_WEEKDAY_CLICKED, wxCalendarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_WEEK_CLICKED, wxCalendarEvent ); + +// deprecated events +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DAY_CHANGED, wxCalendarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_MONTH_CHANGED, wxCalendarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALENDAR_YEAR_CHANGED, wxCalendarEvent ); + +typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&); + +#define wxCalendarEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxCalendarEventFunction, func) + +#define wx__DECLARE_CALEVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_CALENDAR_ ## evt, id, wxCalendarEventHandler(fn)) + +#define EVT_CALENDAR(id, fn) wx__DECLARE_CALEVT(DOUBLECLICKED, id, fn) +#define EVT_CALENDAR_SEL_CHANGED(id, fn) wx__DECLARE_CALEVT(SEL_CHANGED, id, fn) +#define EVT_CALENDAR_PAGE_CHANGED(id, fn) wx__DECLARE_CALEVT(PAGE_CHANGED, id, fn) +#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEKDAY_CLICKED, id, fn) +#define EVT_CALENDAR_WEEK_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEK_CLICKED, id, fn) + +// deprecated events +#define EVT_CALENDAR_DAY(id, fn) wx__DECLARE_CALEVT(DAY_CHANGED, id, fn) +#define EVT_CALENDAR_MONTH(id, fn) wx__DECLARE_CALEVT(MONTH_CHANGED, id, fn) +#define EVT_CALENDAR_YEAR(id, fn) wx__DECLARE_CALEVT(YEAR_CHANGED, id, fn) + +#endif // wxUSE_CALENDARCTRL + +#endif // _WX_CALCTRL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/caret.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/caret.h new file mode 100644 index 0000000000..e6e9728ff8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/caret.h @@ -0,0 +1,251 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/caret.h +// Purpose: wxCaretBase class - the interface of wxCaret +// Author: Vadim Zeitlin +// Modified by: +// Created: 23.05.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CARET_H_BASE_ +#define _WX_CARET_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_CARET + +// --------------------------------------------------------------------------- +// forward declarations +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxWindowBase; + +// ---------------------------------------------------------------------------- +// headers we have to include +// ---------------------------------------------------------------------------- + +#include "wx/gdicmn.h" // for wxPoint, wxSize + +// ---------------------------------------------------------------------------- +// A caret is a blinking cursor showing the position where the typed text will +// appear. It can be either a solid block or a custom bitmap (TODO) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCaretBase +{ +public: + // ctors + // ----- + // default - use Create + wxCaretBase() { Init(); } + // create the caret of given (in pixels) width and height and associate + // with the given window + wxCaretBase(wxWindowBase *window, int width, int height) + { + Init(); + + (void)Create(window, width, height); + } + // same as above + wxCaretBase(wxWindowBase *window, const wxSize& size) + { + Init(); + + (void)Create(window, size); + } + + // a virtual dtor has been provided since this class has virtual members + virtual ~wxCaretBase() { } + + // Create() functions - same as ctor but returns the success code + // -------------------------------------------------------------- + + // same as ctor + bool Create(wxWindowBase *window, int width, int height) + { return DoCreate(window, width, height); } + // same as ctor + bool Create(wxWindowBase *window, const wxSize& size) + { return DoCreate(window, size.x, size.y); } + + // accessors + // --------- + + // is the caret valid? + bool IsOk() const { return m_width != 0 && m_height != 0; } + + // is the caret currently shown? + bool IsVisible() const { return m_countVisible > 0; } + + // get the caret position + void GetPosition(int *x, int *y) const + { + if ( x ) *x = m_x; + if ( y ) *y = m_y; + } + wxPoint GetPosition() const { return wxPoint(m_x, m_y); } + + // get the caret size + void GetSize(int *width, int *height) const + { + if ( width ) *width = m_width; + if ( height ) *height = m_height; + } + wxSize GetSize() const { return wxSize(m_width, m_height); } + + // get the window we're associated with + wxWindow *GetWindow() const { return (wxWindow *)m_window; } + + // change the size of the caret + void SetSize(int width, int height) { + m_width = width; + m_height = height; + DoSize(); + } + void SetSize(const wxSize& size) { SetSize(size.x, size.y); } + + + // operations + // ---------- + + // move the caret to given position (in logical coords) + void Move(int x, int y) { m_x = x; m_y = y; DoMove(); } + void Move(const wxPoint& pt) { m_x = pt.x; m_y = pt.y; DoMove(); } + + // show/hide the caret (should be called by wxWindow when needed): + // Show() must be called as many times as Hide() + 1 to make the caret + // visible + virtual void Show(bool show = true) + { + if ( show ) + { + if ( m_countVisible++ == 0 ) + DoShow(); + } + else + { + if ( --m_countVisible == 0 ) + DoHide(); + } + } + virtual void Hide() { Show(false); } + + // blink time is measured in milliseconds and is the time elapsed + // between 2 inversions of the caret (blink time of the caret is common + // to all carets in the Universe, so these functions are static) + static int GetBlinkTime(); + static void SetBlinkTime(int milliseconds); + + // implementation from now on + // -------------------------- + + // these functions should be called by wxWindow when the window gets/loses + // the focus - we create/show and hide/destroy the caret here + virtual void OnSetFocus() { } + virtual void OnKillFocus() { } + +protected: + // these functions may be overridden in the derived classes, but they + // should call the base class version first + virtual bool DoCreate(wxWindowBase *window, int width, int height) + { + m_window = window; + m_width = width; + m_height = height; + + return true; + } + + // pure virtuals to implement in the derived class + virtual void DoShow() = 0; + virtual void DoHide() = 0; + virtual void DoMove() = 0; + virtual void DoSize() { } + + // the common initialization + void Init() + { + m_window = NULL; + m_x = m_y = 0; + m_width = m_height = 0; + m_countVisible = 0; + } + + // the size of the caret + int m_width, m_height; + + // the position of the caret + int m_x, m_y; + + // the window we're associated with + wxWindowBase *m_window; + + // visibility count: the caret is visible only if it's positive + int m_countVisible; + +private: + wxDECLARE_NO_COPY_CLASS(wxCaretBase); +}; + +// --------------------------------------------------------------------------- +// now include the real thing +// --------------------------------------------------------------------------- + +#if defined(__WXMSW__) + #include "wx/msw/caret.h" +#else + #include "wx/generic/caret.h" +#endif // platform + +// ---------------------------------------------------------------------------- +// wxCaretSuspend: a simple class which hides the caret in its ctor and +// restores it in the dtor, this should be used when drawing on the screen to +// avoid overdrawing the caret +// ---------------------------------------------------------------------------- + +#ifdef wxHAS_CARET_USING_OVERLAYS + +// we don't need to hide the caret if it's rendered using overlays +class WXDLLIMPEXP_CORE wxCaretSuspend +{ +public: + wxCaretSuspend(wxWindow *WXUNUSED(win)) {} + + wxDECLARE_NO_COPY_CLASS(wxCaretSuspend); +}; + +#else // !wxHAS_CARET_USING_OVERLAYS + +class WXDLLIMPEXP_CORE wxCaretSuspend +{ +public: + wxCaretSuspend(wxWindow *win) + { + m_caret = win->GetCaret(); + m_show = false; + if ( m_caret && m_caret->IsVisible() ) + { + m_caret->Hide(); + m_show = true; + } + } + + ~wxCaretSuspend() + { + if ( m_caret && m_show ) + m_caret->Show(); + } + +private: + wxCaret *m_caret; + bool m_show; + + wxDECLARE_NO_COPY_CLASS(wxCaretSuspend); +}; + +#endif // wxHAS_CARET_USING_OVERLAYS/!wxHAS_CARET_USING_OVERLAYS + +#endif // wxUSE_CARET + +#endif // _WX_CARET_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/chartype.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/chartype.h new file mode 100644 index 0000000000..5217258d1b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/chartype.h @@ -0,0 +1,304 @@ +/* + * Name: wx/chartype.h + * Purpose: Declarations of wxChar and related types + * Author: Joel Farley, Ove Kåven + * Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee + * Created: 1998/06/12 + * Copyright: (c) 1998-2006 wxWidgets dev team + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_WXCHARTYPE_H_ +#define _WX_WXCHARTYPE_H_ + +/* defs.h indirectly includes this file, so don't include it here */ +#include "wx/platform.h" + +/* check whether we have wchar_t and which size it is if we do */ +#if !defined(wxUSE_WCHAR_T) + #if defined(__UNIX__) + #if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__) || defined(__DARWIN__) + #define wxUSE_WCHAR_T 1 + #else + #define wxUSE_WCHAR_T 0 + #endif + #elif defined(__GNUWIN32__) && !defined(__MINGW32__) + #define wxUSE_WCHAR_T 0 + #elif defined(__WATCOMC__) + #define wxUSE_WCHAR_T 0 + #elif defined(__VISAGECPP__) && (__IBMCPP__ < 400) + #define wxUSE_WCHAR_T 0 + #else + /* add additional compiler checks if this fails */ + #define wxUSE_WCHAR_T 1 + #endif +#endif /* !defined(wxUSE_WCHAR_T) */ + +/* Unicode support requires wchar_t */ +#if !wxUSE_WCHAR_T + #error "wchar_t must be available" +#endif /* Unicode */ + +/* + non Unix compilers which do have wchar.h (but not tchar.h which is included + below and which includes wchar.h anyhow). + + Actually MinGW has tchar.h, but it does not include wchar.h + */ +#if defined(__VISAGECPP__) || defined(__MINGW32__) || defined(__WATCOMC__) + #ifndef HAVE_WCHAR_H + #define HAVE_WCHAR_H + #endif +#endif + +#ifdef HAVE_WCHAR_H + /* the current (as of Nov 2002) version of cygwin has a bug in its */ + /* wchar.h -- there is no extern "C" around the declarations in it */ + /* and this results in linking errors later; also, at least on some */ + /* Cygwin versions, wchar.h requires sys/types.h */ + #ifdef __CYGWIN__ + #include + #ifdef __cplusplus + extern "C" { + #endif + #endif /* Cygwin */ + + #include + + #if defined(__CYGWIN__) && defined(__cplusplus) + } + #endif /* Cygwin and C++ */ + +#elif defined(HAVE_WCSTR_H) + /* old compilers have relevant declarations here */ + #include +#elif defined(__FreeBSD__) || defined(__DARWIN__) || defined(__EMX__) + /* include stdlib.h for wchar_t */ + #include +#endif /* HAVE_WCHAR_H */ + +#ifdef HAVE_WIDEC_H + #include +#endif + +/* -------------------------------------------------------------------------- */ +/* define wxHAVE_TCHAR_SUPPORT for the compilers which support the TCHAR type */ +/* mapped to either char or wchar_t depending on the ASCII/Unicode mode and */ +/* have the function mapping _tfoo() -> foo() or wfoo() */ +/* -------------------------------------------------------------------------- */ + +/* VC++ and BC++ starting with 5.2 have TCHAR support */ +#ifdef __VISUALC__ + #define wxHAVE_TCHAR_SUPPORT +#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520) + #define wxHAVE_TCHAR_SUPPORT + #include +#elif defined(__WATCOMC__) + #define wxHAVE_TCHAR_SUPPORT +#elif defined(__DMC__) + #define wxHAVE_TCHAR_SUPPORT +#elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 ) + #define wxHAVE_TCHAR_SUPPORT + #include + #include + #include +#elif 0 && defined(__VISAGECPP__) && (__IBMCPP__ >= 400) + /* VZ: the old VisualAge definitions were completely wrong and had no */ + /* chance at all to work in Unicode build anyhow so let's pretend */ + /* that VisualAge does _not_ support TCHAR for the moment (as */ + /* indicated by "0 &&" above) until someone really has time to delve */ + /* into Unicode issues under OS/2 */ + + /* VisualAge 4.0+ supports TCHAR */ + #define wxHAVE_TCHAR_SUPPORT +#endif /* compilers with (good) TCHAR support */ + +#ifdef wxHAVE_TCHAR_SUPPORT + /* get TCHAR definition if we've got it */ + #include + + /* we surely do have wchar_t if we have TCHAR */ + #ifndef wxUSE_WCHAR_T + #define wxUSE_WCHAR_T 1 + #endif /* !defined(wxUSE_WCHAR_T) */ +#endif /* wxHAVE_TCHAR_SUPPORT */ + +/* ------------------------------------------------------------------------- */ +/* define wxChar type */ +/* ------------------------------------------------------------------------- */ + +/* TODO: define wxCharInt to be equal to either int or wint_t? */ + +#if !wxUSE_UNICODE + typedef char wxChar; + typedef signed char wxSChar; + typedef unsigned char wxUChar; +#else + /* VZ: note that VC++ defines _T[SU]CHAR simply as wchar_t and not as */ + /* signed/unsigned version of it which (a) makes sense to me (unlike */ + /* char wchar_t is always unsigned) and (b) was how the previous */ + /* definitions worked so keep it like this */ + + /* Sun's SunPro compiler supports the wchar_t type and wide character */ + /* functions, but does not define __WCHAR_TYPE__. Define it here to */ + /* allow unicode enabled builds. */ + #if (defined(__SUNPRO_CC) || defined(__SUNPRO_C)) && !defined(__WCHAR_TYPE__) + #define __WCHAR_TYPE__ wxchar_t + #endif + + /* GNU libc has __WCHAR_TYPE__ which requires special treatment, see */ + /* comment below */ + #if !defined(__WCHAR_TYPE__) || \ + (!defined(__GNUC__) || wxCHECK_GCC_VERSION(2, 96)) + /* standard case */ + typedef wchar_t wxChar; + typedef wchar_t wxSChar; + typedef wchar_t wxUChar; + #else /* __WCHAR_TYPE__ and gcc < 2.96 */ + /* VS: wxWidgets used to define wxChar as __WCHAR_TYPE__ here. */ + /* However, this doesn't work with new GCC 3.x compilers because */ + /* wchar_t is C++'s builtin type in the new standard. OTOH, old */ + /* compilers (GCC 2.x) won't accept new definition of */ + /* wx{S,U}CharType, so we have to define wxChar */ + /* conditionally depending on detected compiler & compiler */ + /* version. */ + + /* with old definition of wxChar. */ + #define wchar_t __WCHAR_TYPE__ + typedef __WCHAR_TYPE__ wxChar; + typedef __WCHAR_TYPE__ wxSChar; + typedef __WCHAR_TYPE__ wxUChar; + #endif /* __WCHAR_TYPE__ */ +#endif /* ASCII/Unicode */ + +/* ------------------------------------------------------------------------- */ +/* define wxStringCharType */ +/* ------------------------------------------------------------------------- */ + +/* depending on the platform, Unicode build can either store wxStrings as + wchar_t* or UTF-8 encoded char*: */ +#if wxUSE_UNICODE + /* FIXME-UTF8: what would be better place for this? */ + #if defined(wxUSE_UTF8_LOCALE_ONLY) && !defined(wxUSE_UNICODE_UTF8) + #error "wxUSE_UTF8_LOCALE_ONLY only makes sense with wxUSE_UNICODE_UTF8" + #endif + #ifndef wxUSE_UTF8_LOCALE_ONLY + #define wxUSE_UTF8_LOCALE_ONLY 0 + #endif + + #ifndef wxUSE_UNICODE_UTF8 + #define wxUSE_UNICODE_UTF8 0 + #endif + + #if wxUSE_UNICODE_UTF8 + #define wxUSE_UNICODE_WCHAR 0 + #else + #define wxUSE_UNICODE_WCHAR 1 + #endif +#else + #define wxUSE_UNICODE_WCHAR 0 + #define wxUSE_UNICODE_UTF8 0 + #define wxUSE_UTF8_LOCALE_ONLY 0 +#endif + +/* define char type used by wxString internal representation: */ +#if wxUSE_UNICODE_WCHAR + typedef wchar_t wxStringCharType; +#else /* wxUSE_UNICODE_UTF8 || ANSI */ + typedef char wxStringCharType; +#endif + + +/* ------------------------------------------------------------------------- */ +/* define wxT() and related macros */ +/* ------------------------------------------------------------------------- */ + +/* BSD systems define _T() to be something different in ctype.h, override it */ +#if defined(__FreeBSD__) || defined(__DARWIN__) + #include + #undef _T +#endif + +/* + wxT ("wx text") macro turns a literal string constant into a wide char + constant. It is mostly unnecessary with wx 2.9 but defined for + compatibility. + */ +#ifndef wxT + #if !wxUSE_UNICODE + #define wxT(x) x + #else /* Unicode */ + /* + Notice that we use an intermediate macro to allow x to be expanded + if it's a macro itself. + */ + #ifndef wxCOMPILER_BROKEN_CONCAT_OPER + #define wxT(x) wxCONCAT_HELPER(L, x) + #else + #define wxT(x) wxPREPEND_L(x) + #endif + #endif /* ASCII/Unicode */ +#endif /* !defined(wxT) */ + +/* + wxT_2 exists only for compatibility with wx 2.x and is the same as wxT() in + that version but nothing in the newer ones. + */ +#define wxT_2(x) x + +/* + wxS ("wx string") macro can be used to create literals using the same + representation as wxString does internally, i.e. wchar_t in Unicode build + under Windows or char in UTF-8-based Unicode builds and (deprecated) ANSI + builds everywhere (see wxStringCharType definition above). + */ +#if wxUSE_UNICODE_WCHAR + /* + As above with wxT(), wxS() argument is expanded if it's a macro. + */ + #ifndef wxCOMPILER_BROKEN_CONCAT_OPER + #define wxS(x) wxCONCAT_HELPER(L, x) + #else + #define wxS(x) wxPREPEND_L(x) + #endif +#else /* wxUSE_UNICODE_UTF8 || ANSI */ + #define wxS(x) x +#endif + +/* + _T() is a synonym for wxT() familiar to Windows programmers. As this macro + has even higher risk of conflicting with system headers, its use is + discouraged and you may predefine wxNO__T to disable it. Additionally, we + do it ourselves for Sun CC which is known to use it in its standard headers + (see #10660). + */ +#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) + #ifndef wxNO__T + #define wxNO__T + #endif +#endif + +#if !defined(_T) && !defined(wxNO__T) + #define _T(x) wxT(x) +#endif + +/* a helper macro allowing to make another macro Unicode-friendly, see below */ +#define wxAPPLY_T(x) wxT(x) + +/* Unicode-friendly __FILE__, __DATE__ and __TIME__ analogs */ +#ifndef __TFILE__ + #define __TFILE__ wxAPPLY_T(__FILE__) +#endif + +#ifndef __TDATE__ + #define __TDATE__ wxAPPLY_T(__DATE__) +#endif + +#ifndef __TTIME__ + #define __TTIME__ wxAPPLY_T(__TIME__) +#endif + +#endif /* _WX_WXCHARTYPE_H_ */ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/checkbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/checkbox.h new file mode 100644 index 0000000000..e0978a0d13 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/checkbox.h @@ -0,0 +1,190 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/checkbox.h +// Purpose: wxCheckBox class interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 07.09.00 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHECKBOX_H_BASE_ +#define _WX_CHECKBOX_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_CHECKBOX + +#include "wx/control.h" + + +/* + * wxCheckBox style flags + * (Using wxCHK_* because wxCB_* is used by wxComboBox). + * Determine whether to use a 3-state or 2-state + * checkbox. 3-state enables to differentiate + * between 'unchecked', 'checked' and 'undetermined'. + * + * In addition to the styles here it is also possible to specify just 0 which + * is treated the same as wxCHK_2STATE for compatibility (but using explicit + * flag is preferred). + */ +#define wxCHK_2STATE 0x4000 +#define wxCHK_3STATE 0x1000 + +/* + * If this style is set the user can set the checkbox to the + * undetermined state. If not set the undetermined set can only + * be set programmatically. + * This style can only be used with 3 state checkboxes. + */ +#define wxCHK_ALLOW_3RD_STATE_FOR_USER 0x2000 + +extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[]; + +// ---------------------------------------------------------------------------- +// wxCheckBox: a control which shows a label and a box which may be checked +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCheckBoxBase : public wxControl +{ +public: + wxCheckBoxBase() { } + + // set/get the checked status of the listbox + virtual void SetValue(bool value) = 0; + virtual bool GetValue() const = 0; + + bool IsChecked() const + { + wxASSERT_MSG( !Is3State(), wxT("Calling IsChecked() doesn't make sense for") + wxT(" a three state checkbox, Use Get3StateValue() instead") ); + + return GetValue(); + } + + wxCheckBoxState Get3StateValue() const + { + wxCheckBoxState state = DoGet3StateValue(); + + if ( state == wxCHK_UNDETERMINED && !Is3State() ) + { + // Undetermined state with a 2-state checkbox?? + wxFAIL_MSG( wxT("DoGet3StateValue() says the 2-state checkbox is ") + wxT("in an undetermined/third state") ); + + state = wxCHK_UNCHECKED; + } + + return state; + } + + void Set3StateValue(wxCheckBoxState state) + { + if ( state == wxCHK_UNDETERMINED && !Is3State() ) + { + wxFAIL_MSG(wxT("Setting a 2-state checkbox to undetermined state")); + state = wxCHK_UNCHECKED; + } + + DoSet3StateValue(state); + } + + bool Is3State() const { return HasFlag(wxCHK_3STATE); } + + bool Is3rdStateAllowedForUser() const + { + return HasFlag(wxCHK_ALLOW_3RD_STATE_FOR_USER); + } + + virtual bool HasTransparentBackground() { return true; } + + // wxCheckBox-specific processing after processing the update event + virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) + { + wxControl::DoUpdateWindowUI(event); + + if ( event.GetSetChecked() ) + SetValue(event.GetChecked()); + } + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + virtual void DoSet3StateValue(wxCheckBoxState WXUNUSED(state)) { wxFAIL; } + + virtual wxCheckBoxState DoGet3StateValue() const + { + wxFAIL; + return wxCHK_UNCHECKED; + } + + // Helper function to be called from derived classes Create() + // implementations: it checks that the style doesn't contain any + // incompatible bits and modifies it to be sane if it does. + static void WXValidateStyle(long *stylePtr) + { + long& style = *stylePtr; + + if ( !(style & (wxCHK_2STATE | wxCHK_3STATE)) ) + { + // For compatibility we use absence of style flags as wxCHK_2STATE + // because wxCHK_2STATE used to have the value of 0 and some + // existing code uses 0 instead of it. Moreover, some code even + // uses some non-0 style, e.g. wxBORDER_XXX, but doesn't specify + // neither wxCHK_2STATE nor wxCHK_3STATE -- to avoid breaking it, + // assume (much more common) 2 state checkbox by default. + style |= wxCHK_2STATE; + } + + if ( style & wxCHK_3STATE ) + { + if ( style & wxCHK_2STATE ) + { + wxFAIL_MSG( "wxCHK_2STATE and wxCHK_3STATE can't be used " + "together" ); + style &= ~wxCHK_3STATE; + } + } + else // No wxCHK_3STATE + { + if ( style & wxCHK_ALLOW_3RD_STATE_FOR_USER ) + { + wxFAIL_MSG( "wxCHK_ALLOW_3RD_STATE_FOR_USER doesn't make sense " + "without wxCHK_3STATE" ); + style &= ~wxCHK_ALLOW_3RD_STATE_FOR_USER; + } + } + } + +private: + wxDECLARE_NO_COPY_CLASS(wxCheckBoxBase); +}; + +// Most ports support 3 state checkboxes so define this by default. +#define wxHAS_3STATE_CHECKBOX + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/checkbox.h" +#elif defined(__WXMSW__) + #include "wx/msw/checkbox.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/checkbox.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/checkbox.h" +#elif defined(__WXGTK__) + #undef wxHAS_3STATE_CHECKBOX + #include "wx/gtk1/checkbox.h" +#elif defined(__WXMAC__) + #include "wx/osx/checkbox.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/checkbox.h" +#elif defined(__WXPM__) + #undef wxHAS_3STATE_CHECKBOX + #include "wx/os2/checkbox.h" +#endif + +#endif // wxUSE_CHECKBOX + +#endif // _WX_CHECKBOX_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/checkeddelete.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/checkeddelete.h new file mode 100644 index 0000000000..fd295faf8b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/checkeddelete.h @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/checkeddelete.h +// Purpose: wxCHECKED_DELETE() macro +// Author: Vadim Zeitlin +// Created: 2009-02-03 +// Copyright: (c) 2002-2009 wxWidgets dev team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHECKEDDELETE_H_ +#define _WX_CHECKEDDELETE_H_ + +#include "wx/cpp.h" + +// TODO: provide wxCheckedDelete[Array]() template functions too + +// ---------------------------------------------------------------------------- +// wxCHECKED_DELETE and wxCHECKED_DELETE_ARRAY macros +// ---------------------------------------------------------------------------- + +/* + checked deleters are used to make sure that the type being deleted is really + a complete type.: otherwise sizeof() would result in a compile-time error + + do { ... } while ( 0 ) construct is used to have an anonymous scope + (otherwise we could have name clashes between different "complete"s) but + still force a semicolon after the macro +*/ + +#define wxCHECKED_DELETE(ptr) \ + wxSTATEMENT_MACRO_BEGIN \ + typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \ + delete ptr; \ + wxSTATEMENT_MACRO_END + +#define wxCHECKED_DELETE_ARRAY(ptr) \ + wxSTATEMENT_MACRO_BEGIN \ + typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \ + delete [] ptr; \ + wxSTATEMENT_MACRO_END + + +#endif // _WX_CHECKEDDELETE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/checklst.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/checklst.h new file mode 100644 index 0000000000..3c54304d0e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/checklst.h @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/checklst.h +// Purpose: wxCheckListBox class interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 12.09.00 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHECKLST_H_BASE_ +#define _WX_CHECKLST_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_CHECKLISTBOX + +#include "wx/listbox.h" + +// ---------------------------------------------------------------------------- +// wxCheckListBox: a listbox whose items may be checked +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCheckListBoxBase : public + #ifdef __WXWINCE__ + // keep virtuals synchronised + wxListBoxBase + #else + wxListBox + #endif +{ +public: + wxCheckListBoxBase() { } + + // check list box specific methods + virtual bool IsChecked(unsigned int item) const = 0; + virtual void Check(unsigned int item, bool check = true) = 0; + + virtual unsigned int GetCheckedItems(wxArrayInt& checkedItems) const; + + wxDECLARE_NO_COPY_CLASS(wxCheckListBoxBase); +}; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/checklst.h" +#elif defined(__WXWINCE__) + #include "wx/msw/wince/checklst.h" +#elif defined(__WXMSW__) + #include "wx/msw/checklst.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/checklst.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/checklst.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/checklst.h" +#elif defined(__WXMAC__) + #include "wx/osx/checklst.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/checklst.h" +#elif defined(__WXPM__) + #include "wx/os2/checklst.h" +#endif + +#endif // wxUSE_CHECKLISTBOX + +#endif + // _WX_CHECKLST_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/chkconf.h new file mode 100644 index 0000000000..47fa8ee467 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/chkconf.h @@ -0,0 +1,2231 @@ +/* + * Name: wx/chkconf.h + * Purpose: check the config settings for consistency + * Author: Vadim Zeitlin + * Modified by: + * Created: 09.08.00 + * Copyright: (c) 2000 Vadim Zeitlin + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ +#ifndef _WX_CHKCONF_H_ +#define _WX_CHKCONF_H_ + +/* + ************************************************** + PLEASE READ THIS IF YOU GET AN ERROR IN THIS FILE! + ************************************************** + + If you get an error saying "wxUSE_FOO must be defined", it means that you + are not using the correct up-to-date version of setup.h. This happens most + often when using svn or daily snapshots and a new symbol was added to + setup0.h and you haven't updated your local setup.h to reflect it. If + this is the case, you need to propagate the changes from setup0.h to your + setup.h and, if using makefiles under MSW, also remove setup.h under the + build directory (lib/$(COMPILER)_{lib,dll}/msw[u][d][dll]/wx) so that + the new setup.h is copied there. + + If you get an error of the form "wxFoo requires wxBar", then the settings + in your setup.h are inconsistent. You have the choice between correcting + them manually or commenting out #define wxABORT_ON_CONFIG_ERROR below to + try to correct the problems automatically (not really recommended but + might work). + */ + +/* + This file has the following sections: + 1. checks that all wxUSE_XXX symbols we use are defined + a) first the non-GUI ones + b) then the GUI-only ones + 2. platform-specific checks done in the platform headers + 3. generic consistency checks + a) first the non-GUI ones + b) then the GUI-only ones + */ + +/* + this global setting determines what should we do if the setting FOO + requires BAR and BAR is not set: we can either silently unset FOO as well + (do this if you're trying to build the smallest possible library) or give an + error and abort (default as leads to least surprising behaviour) + */ +#define wxABORT_ON_CONFIG_ERROR + +/* + global features + */ + +/* + If we're compiling without support for threads/exceptions we have to + disable the corresponding features. + */ +#ifdef wxNO_THREADS +# undef wxUSE_THREADS +# define wxUSE_THREADS 0 +#endif /* wxNO_THREADS */ + +#ifdef wxNO_EXCEPTIONS +# undef wxUSE_EXCEPTIONS +# define wxUSE_EXCEPTIONS 0 +#endif /* wxNO_EXCEPTIONS */ + +/* we also must disable exceptions if compiler doesn't support them */ +#if defined(_MSC_VER) && !defined(_CPPUNWIND) +# undef wxUSE_EXCEPTIONS +# define wxUSE_EXCEPTIONS 0 +#endif /* VC++ without exceptions support */ + + +/* + Section 1a: tests for non GUI features. + + please keep the options in alphabetical order! + */ + +#ifndef wxUSE_ANY +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ANY must be defined, please read comment near the top of this file." +# else +# define wxUSE_ANY 0 +# endif +#endif /* wxUSE_ANY */ + +#ifndef wxUSE_COMPILER_TLS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_COMPILER_TLS must be defined, please read comment near the top of this file." +# else +# define wxUSE_COMPILER_TLS 0 +# endif +#endif /* !defined(wxUSE_COMPILER_TLS) */ + +#ifndef wxUSE_CONSOLE_EVENTLOOP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CONSOLE_EVENTLOOP must be defined, please read comment near the top of this file." +# else +# define wxUSE_CONSOLE_EVENTLOOP 0 +# endif +#endif /* !defined(wxUSE_CONSOLE_EVENTLOOP) */ + +#ifndef wxUSE_DYNLIB_CLASS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DYNLIB_CLASS must be defined, please read comment near the top of this file." +# else +# define wxUSE_DYNLIB_CLASS 0 +# endif +#endif /* !defined(wxUSE_DYNLIB_CLASS) */ + +#ifndef wxUSE_EXCEPTIONS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_EXCEPTIONS must be defined, please read comment near the top of this file." +# else +# define wxUSE_EXCEPTIONS 0 +# endif +#endif /* !defined(wxUSE_EXCEPTIONS) */ + +#ifndef wxUSE_FILE_HISTORY +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FILE_HISTORY must be defined, please read comment near the top of this file." +# else +# define wxUSE_FILE_HISTORY 0 +# endif +#endif /* !defined(wxUSE_FILE_HISTORY) */ + +#ifndef wxUSE_FILESYSTEM +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FILESYSTEM must be defined, please read comment near the top of this file." +# else +# define wxUSE_FILESYSTEM 0 +# endif +#endif /* !defined(wxUSE_FILESYSTEM) */ + +#ifndef wxUSE_FS_ARCHIVE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FS_ARCHIVE must be defined, please read comment near the top of this file." +# else +# define wxUSE_FS_ARCHIVE 0 +# endif +#endif /* !defined(wxUSE_FS_ARCHIVE) */ + +#ifndef wxUSE_FSVOLUME +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FSVOLUME must be defined, please read comment near the top of this file." +# else +# define wxUSE_FSVOLUME 0 +# endif +#endif /* !defined(wxUSE_FSVOLUME) */ + +#ifndef wxUSE_FSWATCHER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FSWATCHER must be defined, please read comment near the top of this file." +# else +# define wxUSE_FSWATCHER 0 +# endif +#endif /* !defined(wxUSE_FSWATCHER) */ + +#ifndef wxUSE_DYNAMIC_LOADER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DYNAMIC_LOADER must be defined, please read comment near the top of this file." +# else +# define wxUSE_DYNAMIC_LOADER 0 +# endif +#endif /* !defined(wxUSE_DYNAMIC_LOADER) */ + +#ifndef wxUSE_INTL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_INTL must be defined, please read comment near the top of this file." +# else +# define wxUSE_INTL 0 +# endif +#endif /* !defined(wxUSE_INTL) */ + +#ifndef wxUSE_IPV6 +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_IPV6 must be defined, please read comment near the top of this file." +# else +# define wxUSE_IPV6 0 +# endif +#endif /* !defined(wxUSE_IPV6) */ + +#ifndef wxUSE_LOG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LOG must be defined, please read comment near the top of this file." +# else +# define wxUSE_LOG 0 +# endif +#endif /* !defined(wxUSE_LOG) */ + +#ifndef wxUSE_LONGLONG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LONGLONG must be defined, please read comment near the top of this file." +# else +# define wxUSE_LONGLONG 0 +# endif +#endif /* !defined(wxUSE_LONGLONG) */ + +#ifndef wxUSE_MIMETYPE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MIMETYPE must be defined, please read comment near the top of this file." +# else +# define wxUSE_MIMETYPE 0 +# endif +#endif /* !defined(wxUSE_MIMETYPE) */ + +#ifndef wxUSE_ON_FATAL_EXCEPTION +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ON_FATAL_EXCEPTION must be defined, please read comment near the top of this file." +# else +# define wxUSE_ON_FATAL_EXCEPTION 0 +# endif +#endif /* !defined(wxUSE_ON_FATAL_EXCEPTION) */ + +#ifndef wxUSE_PRINTF_POS_PARAMS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PRINTF_POS_PARAMS must be defined, please read comment near the top of this file." +# else +# define wxUSE_PRINTF_POS_PARAMS 0 +# endif +#endif /* !defined(wxUSE_PRINTF_POS_PARAMS) */ + +#ifndef wxUSE_PROTOCOL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PROTOCOL must be defined, please read comment near the top of this file." +# else +# define wxUSE_PROTOCOL 0 +# endif +#endif /* !defined(wxUSE_PROTOCOL) */ + +/* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */ +#if !wxUSE_PROTOCOL +# undef wxUSE_PROTOCOL_HTTP +# undef wxUSE_PROTOCOL_FTP +# undef wxUSE_PROTOCOL_FILE +# define wxUSE_PROTOCOL_HTTP 0 +# define wxUSE_PROTOCOL_FTP 0 +# define wxUSE_PROTOCOL_FILE 0 +#endif /* wxUSE_PROTOCOL */ + +#ifndef wxUSE_PROTOCOL_HTTP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PROTOCOL_HTTP must be defined, please read comment near the top of this file." +# else +# define wxUSE_PROTOCOL_HTTP 0 +# endif +#endif /* !defined(wxUSE_PROTOCOL_HTTP) */ + +#ifndef wxUSE_PROTOCOL_FTP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PROTOCOL_FTP must be defined, please read comment near the top of this file." +# else +# define wxUSE_PROTOCOL_FTP 0 +# endif +#endif /* !defined(wxUSE_PROTOCOL_FTP) */ + +#ifndef wxUSE_PROTOCOL_FILE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PROTOCOL_FILE must be defined, please read comment near the top of this file." +# else +# define wxUSE_PROTOCOL_FILE 0 +# endif +#endif /* !defined(wxUSE_PROTOCOL_FILE) */ + +#ifndef wxUSE_REGEX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_REGEX must be defined, please read comment near the top of this file." +# else +# define wxUSE_REGEX 0 +# endif +#endif /* !defined(wxUSE_REGEX) */ + +#ifndef wxUSE_STDPATHS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_STDPATHS must be defined, please read comment near the top of this file." +# else +# define wxUSE_STDPATHS 1 +# endif +#endif /* !defined(wxUSE_STDPATHS) */ + +#ifndef wxUSE_XML +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_XML must be defined, please read comment near the top of this file." +# else +# define wxUSE_XML 0 +# endif +#endif /* !defined(wxUSE_XML) */ + +#ifndef wxUSE_SOCKETS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SOCKETS must be defined, please read comment near the top of this file." +# else +# define wxUSE_SOCKETS 0 +# endif +#endif /* !defined(wxUSE_SOCKETS) */ + +#ifndef wxUSE_STD_CONTAINERS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_STD_CONTAINERS must be defined, please read comment near the top of this file." +# else +# define wxUSE_STD_CONTAINERS 0 +# endif +#endif /* !defined(wxUSE_STD_CONTAINERS) */ + +#ifndef wxUSE_STD_STRING_CONV_IN_WXSTRING +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_STD_STRING_CONV_IN_WXSTRING must be defined, please read comment near the top of this file." +# else +# define wxUSE_STD_STRING_CONV_IN_WXSTRING 0 +# endif +#endif /* !defined(wxUSE_STD_STRING_CONV_IN_WXSTRING) */ + +#ifndef wxUSE_STREAMS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_STREAMS must be defined, please read comment near the top of this file." +# else +# define wxUSE_STREAMS 0 +# endif +#endif /* !defined(wxUSE_STREAMS) */ + +#ifndef wxUSE_STOPWATCH +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_STOPWATCH must be defined, please read comment near the top of this file." +# else +# define wxUSE_STOPWATCH 0 +# endif +#endif /* !defined(wxUSE_STOPWATCH) */ + +#ifndef wxUSE_TEXTBUFFER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TEXTBUFFER must be defined, please read comment near the top of this file." +# else +# define wxUSE_TEXTBUFFER 0 +# endif +#endif /* !defined(wxUSE_TEXTBUFFER) */ + +#ifndef wxUSE_TEXTFILE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TEXTFILE must be defined, please read comment near the top of this file." +# else +# define wxUSE_TEXTFILE 0 +# endif +#endif /* !defined(wxUSE_TEXTFILE) */ + +#ifndef wxUSE_UNICODE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_UNICODE must be defined, please read comment near the top of this file." +# else +# define wxUSE_UNICODE 0 +# endif +#endif /* !defined(wxUSE_UNICODE) */ + +#ifndef wxUSE_URL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_URL must be defined, please read comment near the top of this file." +# else +# define wxUSE_URL 0 +# endif +#endif /* !defined(wxUSE_URL) */ + +#ifndef wxUSE_VARIANT +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_VARIANT must be defined, please read comment near the top of this file." +# else +# define wxUSE_VARIANT 0 +# endif +#endif /* wxUSE_VARIANT */ + +#ifndef wxUSE_XLOCALE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_XLOCALE must be defined, please read comment near the top of this file." +# else +# define wxUSE_XLOCALE 0 +# endif +#endif /* !defined(wxUSE_XLOCALE) */ + +/* + Section 1b: all these tests are for GUI only. + + please keep the options in alphabetical order! + */ +#if wxUSE_GUI + +/* + all of the settings tested below must be defined or we'd get an error from + preprocessor about invalid integer expression + */ + +#ifndef wxUSE_ABOUTDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ABOUTDLG must be defined, please read comment near the top of this file." +# else +# define wxUSE_ABOUTDLG 0 +# endif +#endif /* !defined(wxUSE_ABOUTDLG) */ + +#ifndef wxUSE_ACCEL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ACCEL must be defined, please read comment near the top of this file." +# else +# define wxUSE_ACCEL 0 +# endif +#endif /* !defined(wxUSE_ACCEL) */ + +#ifndef wxUSE_ACCESSIBILITY +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ACCESSIBILITY must be defined, please read comment near the top of this file." +# else +# define wxUSE_ACCESSIBILITY 0 +# endif +#endif /* !defined(wxUSE_ACCESSIBILITY) */ + +#ifndef wxUSE_ANIMATIONCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ANIMATIONCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_ANIMATIONCTRL 0 +# endif +#endif /* !defined(wxUSE_ANIMATIONCTRL) */ + +#ifndef wxUSE_ARTPROVIDER_STD +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ARTPROVIDER_STD must be defined, please read comment near the top of this file." +# else +# define wxUSE_ARTPROVIDER_STD 0 +# endif +#endif /* !defined(wxUSE_ARTPROVIDER_STD) */ + +#ifndef wxUSE_ARTPROVIDER_TANGO +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ARTPROVIDER_TANGO must be defined, please read comment near the top of this file." +# else +# define wxUSE_ARTPROVIDER_TANGO 0 +# endif +#endif /* !defined(wxUSE_ARTPROVIDER_TANGO) */ + +#ifndef wxUSE_AUTOID_MANAGEMENT +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_AUTOID_MANAGEMENT must be defined, please read comment near the top of this file." +# else +# define wxUSE_AUTOID_MANAGEMENT 0 +# endif +#endif /* !defined(wxUSE_AUTOID_MANAGEMENT) */ + +#ifndef wxUSE_BITMAPCOMBOBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_BITMAPCOMBOBOX must be defined, please read comment near the top of this file." +# else +# define wxUSE_BITMAPCOMBOBOX 0 +# endif +#endif /* !defined(wxUSE_BITMAPCOMBOBOX) */ + +#ifndef wxUSE_BMPBUTTON +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_BMPBUTTON must be defined, please read comment near the top of this file." +# else +# define wxUSE_BMPBUTTON 0 +# endif +#endif /* !defined(wxUSE_BMPBUTTON) */ + +#ifndef wxUSE_BUTTON +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_BUTTON must be defined, please read comment near the top of this file." +# else +# define wxUSE_BUTTON 0 +# endif +#endif /* !defined(wxUSE_BUTTON) */ + +#ifndef wxUSE_CAIRO +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CAIRO must be defined, please read comment near the top of this file." +# else +# define wxUSE_CAIRO 0 +# endif +#endif /* !defined(wxUSE_CAIRO) */ + +#ifndef wxUSE_CALENDARCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CALENDARCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_CALENDARCTRL 0 +# endif +#endif /* !defined(wxUSE_CALENDARCTRL) */ + +#ifndef wxUSE_CARET +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CARET must be defined, please read comment near the top of this file." +# else +# define wxUSE_CARET 0 +# endif +#endif /* !defined(wxUSE_CARET) */ + +#ifndef wxUSE_CHECKBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CHECKBOX must be defined, please read comment near the top of this file." +# else +# define wxUSE_CHECKBOX 0 +# endif +#endif /* !defined(wxUSE_CHECKBOX) */ + +#ifndef wxUSE_CHECKLISTBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CHECKLISTBOX must be defined, please read comment near the top of this file." +# else +# define wxUSE_CHECKLISTBOX 0 +# endif +#endif /* !defined(wxUSE_CHECKLISTBOX) */ + +#ifndef wxUSE_CHOICE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CHOICE must be defined, please read comment near the top of this file." +# else +# define wxUSE_CHOICE 0 +# endif +#endif /* !defined(wxUSE_CHOICE) */ + +#ifndef wxUSE_CHOICEBOOK +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CHOICEBOOK must be defined, please read comment near the top of this file." +# else +# define wxUSE_CHOICEBOOK 0 +# endif +#endif /* !defined(wxUSE_CHOICEBOOK) */ + +#ifndef wxUSE_CHOICEDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CHOICEDLG must be defined, please read comment near the top of this file." +# else +# define wxUSE_CHOICEDLG 0 +# endif +#endif /* !defined(wxUSE_CHOICEDLG) */ + +#ifndef wxUSE_CLIPBOARD +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CLIPBOARD must be defined, please read comment near the top of this file." +# else +# define wxUSE_CLIPBOARD 0 +# endif +#endif /* !defined(wxUSE_CLIPBOARD) */ + +#ifndef wxUSE_COLLPANE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_COLLPANE must be defined, please read comment near the top of this file." +# else +# define wxUSE_COLLPANE 0 +# endif +#endif /* !defined(wxUSE_COLLPANE) */ + +#ifndef wxUSE_COLOURDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_COLOURDLG must be defined, please read comment near the top of this file." +# else +# define wxUSE_COLOURDLG 0 +# endif +#endif /* !defined(wxUSE_COLOURDLG) */ + +#ifndef wxUSE_COLOURPICKERCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_COLOURPICKERCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_COLOURPICKERCTRL 0 +# endif +#endif /* !defined(wxUSE_COLOURPICKERCTRL) */ + +#ifndef wxUSE_COMBOBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_COMBOBOX must be defined, please read comment near the top of this file." +# else +# define wxUSE_COMBOBOX 0 +# endif +#endif /* !defined(wxUSE_COMBOBOX) */ + +#ifndef wxUSE_COMMANDLINKBUTTON +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_COMMANDLINKBUTTON must be defined, please read comment near the top of this file." +# else +# define wxUSE_COMMANDLINKBUTTON 0 +# endif +#endif /* !defined(wxUSE_COMMANDLINKBUTTON) */ + +#ifndef wxUSE_COMBOCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_COMBOCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_COMBOCTRL 0 +# endif +#endif /* !defined(wxUSE_COMBOCTRL) */ + +#ifndef wxUSE_DATAOBJ +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DATAOBJ must be defined, please read comment near the top of this file." +# else +# define wxUSE_DATAOBJ 0 +# endif +#endif /* !defined(wxUSE_DATAOBJ) */ + +#ifndef wxUSE_DATAVIEWCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DATAVIEWCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_DATAVIEWCTRL 0 +# endif +#endif /* !defined(wxUSE_DATAVIEWCTRL) */ + +#ifndef wxUSE_DATEPICKCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DATEPICKCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_DATEPICKCTRL 0 +# endif +#endif /* !defined(wxUSE_DATEPICKCTRL) */ + +#ifndef wxUSE_DC_TRANSFORM_MATRIX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DC_TRANSFORM_MATRIX must be defined, please read comment near the top of this file." +# else +# define wxUSE_DC_TRANSFORM_MATRIX 1 +# endif +#endif /* wxUSE_DC_TRANSFORM_MATRIX */ + +#ifndef wxUSE_DIRPICKERCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DIRPICKERCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_DIRPICKERCTRL 0 +# endif +#endif /* !defined(wxUSE_DIRPICKERCTRL) */ + +#ifndef wxUSE_DISPLAY +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DISPLAY must be defined, please read comment near the top of this file." +# else +# define wxUSE_DISPLAY 0 +# endif +#endif /* !defined(wxUSE_DISPLAY) */ + +#ifndef wxUSE_DOC_VIEW_ARCHITECTURE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined, please read comment near the top of this file." +# else +# define wxUSE_DOC_VIEW_ARCHITECTURE 0 +# endif +#endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */ + +#ifndef wxUSE_FILECTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FILECTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_FILECTRL 0 +# endif +#endif /* !defined(wxUSE_FILECTRL) */ + +#ifndef wxUSE_FILEDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FILEDLG must be defined, please read comment near the top of this file." +# else +# define wxUSE_FILEDLG 0 +# endif +#endif /* !defined(wxUSE_FILEDLG) */ + +#ifndef wxUSE_FILEPICKERCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FILEPICKERCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_FILEPICKERCTRL 0 +# endif +#endif /* !defined(wxUSE_FILEPICKERCTRL) */ + +#ifndef wxUSE_FONTDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FONTDLG must be defined, please read comment near the top of this file." +# else +# define wxUSE_FONTDLG 0 +# endif +#endif /* !defined(wxUSE_FONTDLG) */ + +#ifndef wxUSE_FONTMAP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FONTMAP must be defined, please read comment near the top of this file." +# else +# define wxUSE_FONTMAP 0 +# endif +#endif /* !defined(wxUSE_FONTMAP) */ + +#ifndef wxUSE_FONTPICKERCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FONTPICKERCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_FONTPICKERCTRL 0 +# endif +#endif /* !defined(wxUSE_FONTPICKERCTRL) */ + +#ifndef wxUSE_GAUGE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_GAUGE must be defined, please read comment near the top of this file." +# else +# define wxUSE_GAUGE 0 +# endif +#endif /* !defined(wxUSE_GAUGE) */ + +#ifndef wxUSE_GRAPHICS_CONTEXT +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_GRAPHICS_CONTEXT must be defined, please read comment near the top of this file." +# else +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#endif /* !defined(wxUSE_GRAPHICS_CONTEXT) */ + + +#ifndef wxUSE_GRID +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_GRID must be defined, please read comment near the top of this file." +# else +# define wxUSE_GRID 0 +# endif +#endif /* !defined(wxUSE_GRID) */ + +#ifndef wxUSE_HEADERCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_HEADERCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_HEADERCTRL 0 +# endif +#endif /* !defined(wxUSE_HEADERCTRL) */ + +#ifndef wxUSE_HELP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_HELP must be defined, please read comment near the top of this file." +# else +# define wxUSE_HELP 0 +# endif +#endif /* !defined(wxUSE_HELP) */ + +#ifndef wxUSE_HYPERLINKCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_HYPERLINKCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_HYPERLINKCTRL 0 +# endif +#endif /* !defined(wxUSE_HYPERLINKCTRL) */ + +#ifndef wxUSE_HTML +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_HTML must be defined, please read comment near the top of this file." +# else +# define wxUSE_HTML 0 +# endif +#endif /* !defined(wxUSE_HTML) */ + +#ifndef wxUSE_LIBMSPACK +# if !defined(__UNIX__) + /* set to 0 on platforms that don't have libmspack */ +# define wxUSE_LIBMSPACK 0 +# else +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LIBMSPACK must be defined, please read comment near the top of this file." +# else +# define wxUSE_LIBMSPACK 0 +# endif +# endif +#endif /* !defined(wxUSE_LIBMSPACK) */ + +#ifndef wxUSE_ICO_CUR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ICO_CUR must be defined, please read comment near the top of this file." +# else +# define wxUSE_ICO_CUR 0 +# endif +#endif /* !defined(wxUSE_ICO_CUR) */ + +#ifndef wxUSE_IFF +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_IFF must be defined, please read comment near the top of this file." +# else +# define wxUSE_IFF 0 +# endif +#endif /* !defined(wxUSE_IFF) */ + +#ifndef wxUSE_IMAGLIST +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_IMAGLIST must be defined, please read comment near the top of this file." +# else +# define wxUSE_IMAGLIST 0 +# endif +#endif /* !defined(wxUSE_IMAGLIST) */ + +#ifndef wxUSE_INFOBAR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_INFOBAR must be defined, please read comment near the top of this file." +# else +# define wxUSE_INFOBAR 0 +# endif +#endif /* !defined(wxUSE_INFOBAR) */ + +#ifndef wxUSE_JOYSTICK +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_JOYSTICK must be defined, please read comment near the top of this file." +# else +# define wxUSE_JOYSTICK 0 +# endif +#endif /* !defined(wxUSE_JOYSTICK) */ + +#ifndef wxUSE_LISTBOOK +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LISTBOOK must be defined, please read comment near the top of this file." +# else +# define wxUSE_LISTBOOK 0 +# endif +#endif /* !defined(wxUSE_LISTBOOK) */ + +#ifndef wxUSE_LISTBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LISTBOX must be defined, please read comment near the top of this file." +# else +# define wxUSE_LISTBOX 0 +# endif +#endif /* !defined(wxUSE_LISTBOX) */ + +#ifndef wxUSE_LISTCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LISTCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_LISTCTRL 0 +# endif +#endif /* !defined(wxUSE_LISTCTRL) */ + +#ifndef wxUSE_LOGGUI +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LOGGUI must be defined, please read comment near the top of this file." +# else +# define wxUSE_LOGGUI 0 +# endif +#endif /* !defined(wxUSE_LOGGUI) */ + +#ifndef wxUSE_LOGWINDOW +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LOGWINDOW must be defined, please read comment near the top of this file." +# else +# define wxUSE_LOGWINDOW 0 +# endif +#endif /* !defined(wxUSE_LOGWINDOW) */ + +#ifndef wxUSE_LOG_DIALOG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LOG_DIALOG must be defined, please read comment near the top of this file." +# else +# define wxUSE_LOG_DIALOG 0 +# endif +#endif /* !defined(wxUSE_LOG_DIALOG) */ + +#ifndef wxUSE_MARKUP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MARKUP must be defined, please read comment near the top of this file." +# else +# define wxUSE_MARKUP 0 +# endif +#endif /* !defined(wxUSE_MARKUP) */ + +#ifndef wxUSE_MDI +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MDI must be defined, please read comment near the top of this file." +# else +# define wxUSE_MDI 0 +# endif +#endif /* !defined(wxUSE_MDI) */ + +#ifndef wxUSE_MDI_ARCHITECTURE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MDI_ARCHITECTURE must be defined, please read comment near the top of this file." +# else +# define wxUSE_MDI_ARCHITECTURE 0 +# endif +#endif /* !defined(wxUSE_MDI_ARCHITECTURE) */ + +#ifndef wxUSE_MENUS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MENUS must be defined, please read comment near the top of this file." +# else +# define wxUSE_MENUS 0 +# endif +#endif /* !defined(wxUSE_MENUS) */ + +#ifndef wxUSE_MSGDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MSGDLG must be defined, please read comment near the top of this file." +# else +# define wxUSE_MSGDLG 0 +# endif +#endif /* !defined(wxUSE_MSGDLG) */ + +#ifndef wxUSE_NOTEBOOK +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_NOTEBOOK must be defined, please read comment near the top of this file." +# else +# define wxUSE_NOTEBOOK 0 +# endif +#endif /* !defined(wxUSE_NOTEBOOK) */ + +#ifndef wxUSE_NOTIFICATION_MESSAGE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_NOTIFICATION_MESSAGE must be defined, please read comment near the top of this file." +# else +# define wxUSE_NOTIFICATION_MESSAGE 0 +# endif +#endif /* !defined(wxUSE_NOTIFICATION_MESSAGE) */ + +#ifndef wxUSE_ODCOMBOBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ODCOMBOBOX must be defined, please read comment near the top of this file." +# else +# define wxUSE_ODCOMBOBOX 0 +# endif +#endif /* !defined(wxUSE_ODCOMBOBOX) */ + +#ifndef wxUSE_PALETTE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PALETTE must be defined, please read comment near the top of this file." +# else +# define wxUSE_PALETTE 0 +# endif +#endif /* !defined(wxUSE_PALETTE) */ + +#ifndef wxUSE_POPUPWIN +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_POPUPWIN must be defined, please read comment near the top of this file." +# else +# define wxUSE_POPUPWIN 0 +# endif +#endif /* !defined(wxUSE_POPUPWIN) */ + +#ifndef wxUSE_PREFERENCES_EDITOR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PREFERENCES_EDITOR must be defined, please read comment near the top of this file." +# else +# define wxUSE_PREFERENCES_EDITOR 0 +# endif +#endif /* !defined(wxUSE_PREFERENCES_EDITOR) */ + +#ifndef wxUSE_PRINTING_ARCHITECTURE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PRINTING_ARCHITECTURE must be defined, please read comment near the top of this file." +# else +# define wxUSE_PRINTING_ARCHITECTURE 0 +# endif +#endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */ + +#ifndef wxUSE_RADIOBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_RADIOBOX must be defined, please read comment near the top of this file." +# else +# define wxUSE_RADIOBOX 0 +# endif +#endif /* !defined(wxUSE_RADIOBOX) */ + +#ifndef wxUSE_RADIOBTN +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_RADIOBTN must be defined, please read comment near the top of this file." +# else +# define wxUSE_RADIOBTN 0 +# endif +#endif /* !defined(wxUSE_RADIOBTN) */ + +#ifndef wxUSE_REARRANGECTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_REARRANGECTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_REARRANGECTRL 0 +# endif +#endif /* !defined(wxUSE_REARRANGECTRL) */ + +#ifndef wxUSE_RIBBON +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_RIBBON must be defined, please read comment near the top of this file." +# else +# define wxUSE_RIBBON 0 +# endif +#endif /* !defined(wxUSE_RIBBON) */ + +#ifndef wxUSE_RICHMSGDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_RICHMSGDLG must be defined, please read comment near the top of this file." +# else +# define wxUSE_RICHMSGDLG 0 +# endif +#endif /* !defined(wxUSE_RICHMSGDLG) */ + +#ifndef wxUSE_RICHTOOLTIP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_RICHTOOLTIP must be defined, please read comment near the top of this file." +# else +# define wxUSE_RICHTOOLTIP 0 +# endif +#endif /* !defined(wxUSE_RICHTOOLTIP) */ + +#ifndef wxUSE_SASH +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SASH must be defined, please read comment near the top of this file." +# else +# define wxUSE_SASH 0 +# endif +#endif /* !defined(wxUSE_SASH) */ + +#ifndef wxUSE_SCROLLBAR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SCROLLBAR must be defined, please read comment near the top of this file." +# else +# define wxUSE_SCROLLBAR 0 +# endif +#endif /* !defined(wxUSE_SCROLLBAR) */ + +#ifndef wxUSE_SLIDER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SLIDER must be defined, please read comment near the top of this file." +# else +# define wxUSE_SLIDER 0 +# endif +#endif /* !defined(wxUSE_SLIDER) */ + +#ifndef wxUSE_SOUND +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SOUND must be defined, please read comment near the top of this file." +# else +# define wxUSE_SOUND 0 +# endif +#endif /* !defined(wxUSE_SOUND) */ + +#ifndef wxUSE_SPINBTN +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SPINBTN must be defined, please read comment near the top of this file." +# else +# define wxUSE_SPINBTN 0 +# endif +#endif /* !defined(wxUSE_SPINBTN) */ + +#ifndef wxUSE_SPINCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SPINCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_SPINCTRL 0 +# endif +#endif /* !defined(wxUSE_SPINCTRL) */ + +#ifndef wxUSE_SPLASH +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SPLASH must be defined, please read comment near the top of this file." +# else +# define wxUSE_SPLASH 0 +# endif +#endif /* !defined(wxUSE_SPLASH) */ + +#ifndef wxUSE_SPLITTER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SPLITTER must be defined, please read comment near the top of this file." +# else +# define wxUSE_SPLITTER 0 +# endif +#endif /* !defined(wxUSE_SPLITTER) */ + +#ifndef wxUSE_STATBMP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_STATBMP must be defined, please read comment near the top of this file." +# else +# define wxUSE_STATBMP 0 +# endif +#endif /* !defined(wxUSE_STATBMP) */ + +#ifndef wxUSE_STATBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_STATBOX must be defined, please read comment near the top of this file." +# else +# define wxUSE_STATBOX 0 +# endif +#endif /* !defined(wxUSE_STATBOX) */ + +#ifndef wxUSE_STATLINE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_STATLINE must be defined, please read comment near the top of this file." +# else +# define wxUSE_STATLINE 0 +# endif +#endif /* !defined(wxUSE_STATLINE) */ + +#ifndef wxUSE_STATTEXT +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_STATTEXT must be defined, please read comment near the top of this file." +# else +# define wxUSE_STATTEXT 0 +# endif +#endif /* !defined(wxUSE_STATTEXT) */ + +#ifndef wxUSE_STATUSBAR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_STATUSBAR must be defined, please read comment near the top of this file." +# else +# define wxUSE_STATUSBAR 0 +# endif +#endif /* !defined(wxUSE_STATUSBAR) */ + +#ifndef wxUSE_TASKBARICON +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TASKBARICON must be defined, please read comment near the top of this file." +# else +# define wxUSE_TASKBARICON 0 +# endif +#endif /* !defined(wxUSE_TASKBARICON) */ + +#ifndef wxUSE_TEXTCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TEXTCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_TEXTCTRL 0 +# endif +#endif /* !defined(wxUSE_TEXTCTRL) */ + +#ifndef wxUSE_TIMEPICKCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TIMEPICKCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_TIMEPICKCTRL 0 +# endif +#endif /* !defined(wxUSE_TIMEPICKCTRL) */ + +#ifndef wxUSE_TIPWINDOW +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TIPWINDOW must be defined, please read comment near the top of this file." +# else +# define wxUSE_TIPWINDOW 0 +# endif +#endif /* !defined(wxUSE_TIPWINDOW) */ + +#ifndef wxUSE_TOOLBAR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TOOLBAR must be defined, please read comment near the top of this file." +# else +# define wxUSE_TOOLBAR 0 +# endif +#endif /* !defined(wxUSE_TOOLBAR) */ + +#ifndef wxUSE_TOOLTIPS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TOOLTIPS must be defined, please read comment near the top of this file." +# else +# define wxUSE_TOOLTIPS 0 +# endif +#endif /* !defined(wxUSE_TOOLTIPS) */ + +#ifndef wxUSE_TREECTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TREECTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_TREECTRL 0 +# endif +#endif /* !defined(wxUSE_TREECTRL) */ + +#ifndef wxUSE_TREELISTCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TREELISTCTRL must be defined, please read comment near the top of this file." +# else +# define wxUSE_TREELISTCTRL 0 +# endif +#endif /* !defined(wxUSE_TREELISTCTRL) */ + +#ifndef wxUSE_UIACTIONSIMULATOR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_UIACTIONSIMULATOR must be defined, please read comment near the top of this file." +# else +# define wxUSE_UIACTIONSIMULATOR 0 +# endif +#endif /* !defined(wxUSE_UIACTIONSIMULATOR) */ + +#ifndef wxUSE_VALIDATORS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_VALIDATORS must be defined, please read comment near the top of this file." +# else +# define wxUSE_VALIDATORS 0 +# endif +#endif /* !defined(wxUSE_VALIDATORS) */ + +#ifndef wxUSE_WEBVIEW +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_WEBVIEW must be defined, please read comment near the top of this file." +# else +# define wxUSE_WEBVIEW 0 +# endif +#endif /* !defined(wxUSE_WEBVIEW) */ + +#ifndef wxUSE_WXHTML_HELP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_WXHTML_HELP must be defined, please read comment near the top of this file." +# else +# define wxUSE_WXHTML_HELP 0 +# endif +#endif /* !defined(wxUSE_WXHTML_HELP) */ + +#ifndef wxUSE_XRC +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_XRC must be defined, please read comment near the top of this file." +# else +# define wxUSE_XRC 0 +# endif +#endif /* !defined(wxUSE_XRC) */ + +#endif /* wxUSE_GUI */ + +/* + Section 2: platform-specific checks. + + This must be done after checking that everything is defined as the platform + checks use wxUSE_XXX symbols in #if tests. + */ + +#if defined(__WXWINCE__) +# include "wx/msw/wince/chkconf.h" +#elif defined(__WINDOWS__) +# include "wx/msw/chkconf.h" +# if defined(__WXGTK__) +# include "wx/gtk/chkconf.h" +# endif +#elif defined(__WXGTK__) +# include "wx/gtk/chkconf.h" +#elif defined(__WXCOCOA__) +# include "wx/cocoa/chkconf.h" +#elif defined(__WXMAC__) +# include "wx/osx/chkconf.h" +#elif defined(__OS2__) +# include "wx/os2/chkconf.h" +#elif defined(__WXDFB__) +# include "wx/dfb/chkconf.h" +#elif defined(__WXMOTIF__) +# include "wx/motif/chkconf.h" +#elif defined(__WXX11__) +# include "wx/x11/chkconf.h" +#elif defined(__WXANDROID__) +# include "wx/android/chkconf.h" +#endif + +/* + __UNIX__ is also defined under Cygwin but we shouldn't perform these checks + there if we're building Windows ports. + */ +#if defined(__UNIX__) && !defined(__WINDOWS__) +# include "wx/unix/chkconf.h" +#endif + +#ifdef __WXUNIVERSAL__ +# include "wx/univ/chkconf.h" +#endif + +/* + Section 3a: check consistency of the non-GUI settings. + */ + +#if WXWIN_COMPATIBILITY_2_6 +# if !WXWIN_COMPATIBILITY_2_8 +# ifdef wxABORT_ON_CONFIG_ERROR +# error "2.6.X compatibility requires 2.8.X compatibility" +# else +# undef WXWIN_COMPATIBILITY_2_8 +# define WXWIN_COMPATIBILITY_2_8 1 +# endif +# endif +#endif /* WXWIN_COMPATIBILITY_2_6 */ + +#if wxUSE_ARCHIVE_STREAMS +# if !wxUSE_DATETIME +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxArchive requires wxUSE_DATETIME" +# else +# undef wxUSE_ARCHIVE_STREAMS +# define wxUSE_ARCHIVE_STREAMS 0 +# endif +# endif +#endif /* wxUSE_ARCHIVE_STREAMS */ + +#if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP +# if !wxUSE_PROTOCOL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL" +# else +# undef wxUSE_PROTOCOL +# define wxUSE_PROTOCOL 1 +# endif +# endif +#endif /* wxUSE_PROTOCOL_XXX */ + +#if wxUSE_URL +# if !wxUSE_PROTOCOL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_URL requires wxUSE_PROTOCOL" +# else +# undef wxUSE_PROTOCOL +# define wxUSE_PROTOCOL 1 +# endif +# endif +#endif /* wxUSE_URL */ + +#if wxUSE_PROTOCOL +# if !wxUSE_SOCKETS +# if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS" +# else +# undef wxUSE_SOCKETS +# define wxUSE_SOCKETS 1 +# endif +# endif +# endif + +# if !wxUSE_STREAMS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PROTOCOL requires wxUSE_STREAMS" +# else +# undef wxUSE_STREAMS +# define wxUSE_STREAMS 1 +# endif +# endif +#endif /* wxUSE_PROTOCOL */ + +/* have to test for wxUSE_HTML before wxUSE_FILESYSTEM */ +#if wxUSE_HTML +# if !wxUSE_FILESYSTEM +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxHTML requires wxFileSystem" +# else +# undef wxUSE_FILESYSTEM +# define wxUSE_FILESYSTEM 1 +# endif +# endif +#endif /* wxUSE_HTML */ + +#if wxUSE_FS_ARCHIVE +# if !wxUSE_FILESYSTEM +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxArchiveFSHandler requires wxFileSystem" +# else +# undef wxUSE_FILESYSTEM +# define wxUSE_FILESYSTEM 1 +# endif +# endif +# if !wxUSE_ARCHIVE_STREAMS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxArchiveFSHandler requires wxArchive" +# else +# undef wxUSE_ARCHIVE_STREAMS +# define wxUSE_ARCHIVE_STREAMS 1 +# endif +# endif +#endif /* wxUSE_FS_ARCHIVE */ + +#if wxUSE_FILESYSTEM +# if !wxUSE_STREAMS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FILESYSTEM requires wxUSE_STREAMS" +# else +# undef wxUSE_STREAMS +# define wxUSE_STREAMS 1 +# endif +# endif +# if !wxUSE_FILE && !wxUSE_FFILE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FILESYSTEM requires either wxUSE_FILE or wxUSE_FFILE" +# else +# undef wxUSE_FILE +# define wxUSE_FILE 1 +# undef wxUSE_FFILE +# define wxUSE_FFILE 1 +# endif +# endif +#endif /* wxUSE_FILESYSTEM */ + +#if wxUSE_FS_INET +# if !wxUSE_PROTOCOL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FS_INET requires wxUSE_PROTOCOL" +# else +# undef wxUSE_PROTOCOL +# define wxUSE_PROTOCOL 1 +# endif +# endif +#endif /* wxUSE_FS_INET */ + +#if wxUSE_STOPWATCH || wxUSE_DATETIME +# if !wxUSE_LONGLONG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_STOPWATCH and wxUSE_DATETIME require wxUSE_LONGLONG" +# else +# undef wxUSE_LONGLONG +# define wxUSE_LONGLONG 1 +# endif +# endif +#endif /* wxUSE_STOPWATCH */ + +#if wxUSE_MIMETYPE && !wxUSE_TEXTFILE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE" +# else +# undef wxUSE_TEXTFILE +# define wxUSE_TEXTFILE 1 +# endif +#endif /* wxUSE_MIMETYPE */ + +#if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER" +# else +# undef wxUSE_TEXTBUFFER +# define wxUSE_TEXTBUFFER 1 +# endif +#endif /* wxUSE_TEXTFILE */ + +#if wxUSE_TEXTFILE && !wxUSE_FILE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TEXTFILE requires wxUSE_FILE" +# else +# undef wxUSE_FILE +# define wxUSE_FILE 1 +# endif +#endif /* wxUSE_TEXTFILE */ + +#if !wxUSE_DYNLIB_CLASS +# if wxUSE_DYNAMIC_LOADER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DYNAMIC_LOADER requires wxUSE_DYNLIB_CLASS." +# else +# define wxUSE_DYNLIB_CLASS 1 +# endif +# endif +#endif /* wxUSE_DYNLIB_CLASS */ + +#if wxUSE_ZIPSTREAM +# if !wxUSE_ZLIB +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxZip requires wxZlib" +# else +# undef wxUSE_ZLIB +# define wxUSE_ZLIB 1 +# endif +# endif +# if !wxUSE_ARCHIVE_STREAMS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxZip requires wxArchive" +# else +# undef wxUSE_ARCHIVE_STREAMS +# define wxUSE_ARCHIVE_STREAMS 1 +# endif +# endif +#endif /* wxUSE_ZIPSTREAM */ + +#if wxUSE_TARSTREAM +# if !wxUSE_ARCHIVE_STREAMS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxTar requires wxArchive" +# else +# undef wxUSE_ARCHIVE_STREAMS +# define wxUSE_ARCHIVE_STREAMS 1 +# endif +# endif +#endif /* wxUSE_TARSTREAM */ + +/* + Section 3b: the tests for the GUI settings only. + */ +#if wxUSE_GUI + +#if wxUSE_ACCESSIBILITY && !defined(__WXMSW__) +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ACCESSIBILITY is currently only supported under wxMSW" +# else +# undef wxUSE_ACCESSIBILITY +# define wxUSE_ACCESSIBILITY 0 +# endif +#endif /* wxUSE_ACCESSIBILITY */ + +#if wxUSE_BUTTON || \ + wxUSE_CALENDARCTRL || \ + wxUSE_CARET || \ + wxUSE_COMBOBOX || \ + wxUSE_BMPBUTTON || \ + wxUSE_CHECKBOX || \ + wxUSE_CHECKLISTBOX || \ + wxUSE_CHOICE || \ + wxUSE_GAUGE || \ + wxUSE_GRID || \ + wxUSE_HEADERCTRL || \ + wxUSE_LISTBOX || \ + wxUSE_LISTCTRL || \ + wxUSE_NOTEBOOK || \ + wxUSE_RADIOBOX || \ + wxUSE_RADIOBTN || \ + wxUSE_REARRANGECTRL || \ + wxUSE_SCROLLBAR || \ + wxUSE_SLIDER || \ + wxUSE_SPINBTN || \ + wxUSE_SPINCTRL || \ + wxUSE_STATBMP || \ + wxUSE_STATBOX || \ + wxUSE_STATLINE || \ + wxUSE_STATTEXT || \ + wxUSE_STATUSBAR || \ + wxUSE_TEXTCTRL || \ + wxUSE_TOOLBAR || \ + wxUSE_TREECTRL || \ + wxUSE_TREELISTCTRL +# if !wxUSE_CONTROLS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CONTROLS unset but some controls used" +# else +# undef wxUSE_CONTROLS +# define wxUSE_CONTROLS 1 +# endif +# endif +#endif /* controls */ + +#if wxUSE_BMPBUTTON +# if !wxUSE_BUTTON +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_BMPBUTTON requires wxUSE_BUTTON" +# else +# undef wxUSE_BUTTON +# define wxUSE_BUTTON 1 +# endif +# endif +#endif /* wxUSE_BMPBUTTON */ + +#if wxUSE_COMMANDLINKBUTTON +# if !wxUSE_BUTTON +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_COMMANDLINKBUTTON requires wxUSE_BUTTON" +# else +# undef wxUSE_BUTTON +# define wxUSE_BUTTON 1 +# endif +# endif +#endif /* wxUSE_COMMANDLINKBUTTON */ + +/* + wxUSE_BOOKCTRL should be only used if any of the controls deriving from it + are used + */ +#ifdef wxUSE_BOOKCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_BOOKCTRL is defined automatically, don't define it" +# else +# undef wxUSE_BOOKCTRL +# endif +#endif + +#define wxUSE_BOOKCTRL (wxUSE_NOTEBOOK || \ + wxUSE_LISTBOOK || \ + wxUSE_CHOICEBOOK || \ + wxUSE_TOOLBOOK || \ + wxUSE_TREEBOOK) + +#if wxUSE_COLLPANE +# if !wxUSE_BUTTON || !wxUSE_STATLINE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_COLLPANE requires wxUSE_BUTTON and wxUSE_STATLINE" +# else +# undef wxUSE_COLLPANE +# define wxUSE_COLLPANE 0 +# endif +# endif +#endif /* wxUSE_COLLPANE */ + +#if wxUSE_LISTBOOK +# if !wxUSE_LISTCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxListbook requires wxListCtrl" +# else +# undef wxUSE_LISTCTRL +# define wxUSE_LISTCTRL 1 +# endif +# endif +#endif /* wxUSE_LISTBOOK */ + +#if wxUSE_CHOICEBOOK +# if !wxUSE_CHOICE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxChoicebook requires wxChoice" +# else +# undef wxUSE_CHOICE +# define wxUSE_CHOICE 1 +# endif +# endif +#endif /* wxUSE_CHOICEBOOK */ + +#if wxUSE_TOOLBOOK +# if !wxUSE_TOOLBAR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxToolbook requires wxToolBar" +# else +# undef wxUSE_TOOLBAR +# define wxUSE_TOOLBAR 1 +# endif +# endif +#endif /* wxUSE_TOOLBOOK */ + +#if !wxUSE_ODCOMBOBOX +# if wxUSE_BITMAPCOMBOBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxBitmapComboBox requires wxOwnerDrawnComboBox" +# else +# undef wxUSE_BITMAPCOMBOBOX +# define wxUSE_BITMAPCOMBOBOX 0 +# endif +# endif +#endif /* !wxUSE_ODCOMBOBOX */ + +#if !wxUSE_HEADERCTRL +# if wxUSE_DATAVIEWCTRL || wxUSE_GRID +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxDataViewCtrl and wxGrid require wxHeaderCtrl" +# else +# undef wxUSE_HEADERCTRL +# define wxUSE_HEADERCTRL 1 +# endif +# endif +#endif /* !wxUSE_HEADERCTRL */ + +#if wxUSE_REARRANGECTRL +# if !wxUSE_CHECKLISTBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxRearrangeCtrl requires wxCheckListBox" +# else +# undef wxUSE_REARRANGECTRL +# define wxUSE_REARRANGECTRL 0 +# endif +# endif +#endif /* wxUSE_REARRANGECTRL */ + +#if wxUSE_RICHMSGDLG +# if !wxUSE_MSGDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_RICHMSGDLG requires wxUSE_MSGDLG" +# else +# undef wxUSE_MSGDLG +# define wxUSE_MSGDLG 1 +# endif +# endif +#endif /* wxUSE_RICHMSGDLG */ + +/* don't attempt to use native status bar on the platforms not having it */ +#ifndef wxUSE_NATIVE_STATUSBAR +# define wxUSE_NATIVE_STATUSBAR 0 +#elif wxUSE_NATIVE_STATUSBAR +# if defined(__WXUNIVERSAL__) || !(defined(__WXMSW__) || defined(__WXMAC__)) +# undef wxUSE_NATIVE_STATUSBAR +# define wxUSE_NATIVE_STATUSBAR 0 +# endif +#endif + +#if wxUSE_GRAPHICS_CONTEXT && !wxUSE_GEOMETRY +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_GRAPHICS_CONTEXT requires wxUSE_GEOMETRY" +# else +# undef wxUSE_GRAPHICS_CONTEXT +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#endif /* wxUSE_GRAPHICS_CONTEXT */ + + +/* generic controls dependencies */ +#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__) +# if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG + /* all common controls are needed by these dialogs */ +# if !defined(wxUSE_CHOICE) || \ + !defined(wxUSE_TEXTCTRL) || \ + !defined(wxUSE_BUTTON) || \ + !defined(wxUSE_CHECKBOX) || \ + !defined(wxUSE_STATTEXT) +# ifdef wxABORT_ON_CONFIG_ERROR +# error "These common controls are needed by common dialogs" +# else +# undef wxUSE_CHOICE +# define wxUSE_CHOICE 1 +# undef wxUSE_TEXTCTRL +# define wxUSE_TEXTCTRL 1 +# undef wxUSE_BUTTON +# define wxUSE_BUTTON 1 +# undef wxUSE_CHECKBOX +# define wxUSE_CHECKBOX 1 +# undef wxUSE_STATTEXT +# define wxUSE_STATTEXT 1 +# endif +# endif +# endif +#endif /* !wxMSW || wxUniv */ + +/* generic file dialog depends on (generic) file control */ +#if wxUSE_FILEDLG && !wxUSE_FILECTRL && \ + (defined(__WXUNIVERSAL__) || defined(__WXGTK__)) +# ifdef wxABORT_ON_CONFIG_ERROR +# error "Generic wxFileDialog requires wxFileCtrl" +# else +# undef wxUSE_FILECTRL +# define wxUSE_FILECTRL 1 +# endif +#endif /* wxUSE_FILEDLG */ + +/* common dependencies */ +#if wxUSE_ARTPROVIDER_TANGO +# if !(wxUSE_STREAMS && wxUSE_IMAGE && wxUSE_LIBPNG) +# ifdef wxABORT_ON_CONFIG_ERROR +# error "Tango art provider requires wxImage with streams and PNG support" +# else +# undef wxUSE_ARTPROVIDER_TANGO +# define wxUSE_ARTPROVIDER_TANGO 0 +# endif +# endif +#endif /* wxUSE_ARTPROVIDER_TANGO */ + +#if wxUSE_CALENDARCTRL +# if !(wxUSE_SPINBTN && wxUSE_COMBOBOX) +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxCalendarCtrl requires wxSpinButton and wxComboBox" +# else +# undef wxUSE_SPINBTN +# undef wxUSE_COMBOBOX +# define wxUSE_SPINBTN 1 +# define wxUSE_COMBOBOX 1 +# endif +# endif + +# if !wxUSE_DATETIME +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxCalendarCtrl requires wxUSE_DATETIME" +# else +# undef wxUSE_DATETIME +# define wxUSE_DATETIME 1 +# endif +# endif +#endif /* wxUSE_CALENDARCTRL */ + +#if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL +# if !wxUSE_DATETIME +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxDatePickerCtrl and wxTimePickerCtrl requires wxUSE_DATETIME" +# else +# undef wxUSE_DATETIME +# define wxUSE_DATETIME 1 +# endif +# endif +#endif /* wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL */ + +#if wxUSE_CHECKLISTBOX +# if !wxUSE_LISTBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxCheckListBox requires wxListBox" +# else +# undef wxUSE_LISTBOX +# define wxUSE_LISTBOX 1 +# endif +# endif +#endif /* wxUSE_CHECKLISTBOX */ + +#if wxUSE_CHOICEDLG +# if !wxUSE_LISTBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "Choice dialogs requires wxListBox" +# else +# undef wxUSE_LISTBOX +# define wxUSE_LISTBOX 1 +# endif +# endif +#endif /* wxUSE_CHOICEDLG */ + +#if wxUSE_FILECTRL +# if !wxUSE_DATETIME +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxFileCtrl requires wxDateTime" +# else +# undef wxUSE_DATETIME +# define wxUSE_DATETIME 1 +# endif +# endif +#endif /* wxUSE_FILECTRL */ + +#if wxUSE_HELP +# if !wxUSE_BMPBUTTON +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_HELP requires wxUSE_BMPBUTTON" +# else +# undef wxUSE_BMPBUTTON +# define wxUSE_BMPBUTTON 1 +# endif +# endif + +# if !wxUSE_CHOICEDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_HELP requires wxUSE_CHOICEDLG" +# else +# undef wxUSE_CHOICEDLG +# define wxUSE_CHOICEDLG 1 +# endif +# endif +#endif /* wxUSE_HELP */ + +#if wxUSE_MS_HTML_HELP + /* + this doesn't make sense for platforms other than MSW but we still + define it in wx/setup_inc.h so don't complain if it happens to be + defined under another platform but just silently fix it. + */ +# ifndef __WXMSW__ +# undef wxUSE_MS_HTML_HELP +# define wxUSE_MS_HTML_HELP 0 +# endif +#endif /* wxUSE_MS_HTML_HELP */ + +#if wxUSE_WXHTML_HELP +# if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX || !wxUSE_NOTEBOOK || !wxUSE_SPINCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "Built in help controller can't be compiled" +# else +# undef wxUSE_HELP +# define wxUSE_HELP 1 +# undef wxUSE_HTML +# define wxUSE_HTML 1 +# undef wxUSE_COMBOBOX +# define wxUSE_COMBOBOX 1 +# undef wxUSE_NOTEBOOK +# define wxUSE_NOTEBOOK 1 +# undef wxUSE_SPINCTRL +# define wxUSE_SPINCTRL 1 +# endif +# endif +#endif /* wxUSE_WXHTML_HELP */ + +#if !wxUSE_IMAGE +/* + The default wxUSE_IMAGE setting is 1, so if it's set to 0 we assume the + user explicitly wants this and disable all other features that require + wxUSE_IMAGE. + */ +# if wxUSE_DRAGIMAGE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DRAGIMAGE requires wxUSE_IMAGE" +# else +# undef wxUSE_DRAGIMAGE +# define wxUSE_DRAGIMAGE 0 +# endif +# endif + +# if wxUSE_LIBPNG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LIBPNG requires wxUSE_IMAGE" +# else +# undef wxUSE_LIBPNG +# define wxUSE_LIBPNG 0 +# endif +# endif + +# if wxUSE_LIBJPEG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LIBJPEG requires wxUSE_IMAGE" +# else +# undef wxUSE_LIBJPEG +# define wxUSE_LIBJPEG 0 +# endif +# endif + +# if wxUSE_LIBTIFF +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LIBTIFF requires wxUSE_IMAGE" +# else +# undef wxUSE_LIBTIFF +# define wxUSE_LIBTIFF 0 +# endif +# endif + +# if wxUSE_GIF +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_GIF requires wxUSE_IMAGE" +# else +# undef wxUSE_GIF +# define wxUSE_GIF 0 +# endif +# endif + +# if wxUSE_PNM +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PNM requires wxUSE_IMAGE" +# else +# undef wxUSE_PNM +# define wxUSE_PNM 0 +# endif +# endif + +# if wxUSE_PCX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PCX requires wxUSE_IMAGE" +# else +# undef wxUSE_PCX +# define wxUSE_PCX 0 +# endif +# endif + +# if wxUSE_IFF +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_IFF requires wxUSE_IMAGE" +# else +# undef wxUSE_IFF +# define wxUSE_IFF 0 +# endif +# endif + +# if wxUSE_TOOLBAR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TOOLBAR requires wxUSE_IMAGE" +# else +# undef wxUSE_TOOLBAR +# define wxUSE_TOOLBAR 0 +# endif +# endif + +# if wxUSE_XPM +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_XPM requires wxUSE_IMAGE" +# else +# undef wxUSE_XPM +# define wxUSE_XPM 0 +# endif +# endif + +#endif /* !wxUSE_IMAGE */ + +#if wxUSE_DOC_VIEW_ARCHITECTURE +# if !wxUSE_MENUS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "DocView requires wxUSE_MENUS" +# else +# undef wxUSE_MENUS +# define wxUSE_MENUS 1 +# endif +# endif + +# if !wxUSE_CHOICEDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "DocView requires wxUSE_CHOICEDLG" +# else +# undef wxUSE_CHOICEDLG +# define wxUSE_CHOICEDLG 1 +# endif +# endif + +# if !wxUSE_STREAMS && !wxUSE_STD_IOSTREAM +# ifdef wxABORT_ON_CONFIG_ERROR +# error "DocView requires wxUSE_STREAMS or wxUSE_STD_IOSTREAM" +# else +# undef wxUSE_STREAMS +# define wxUSE_STREAMS 1 +# endif +# endif + +# if !wxUSE_FILE_HISTORY +# ifdef wxABORT_ON_CONFIG_ERROR +# error "DocView requires wxUSE_FILE_HISTORY" +# else +# undef wxUSE_FILE_HISTORY +# define wxUSE_FILE_HISTORY 1 +# endif +# endif +#endif /* wxUSE_DOC_VIEW_ARCHITECTURE */ + +#if wxUSE_PRINTING_ARCHITECTURE +# if !wxUSE_COMBOBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "Print dialog requires wxUSE_COMBOBOX" +# else +# undef wxUSE_COMBOBOX +# define wxUSE_COMBOBOX 1 +# endif +# endif +#endif /* wxUSE_PRINTING_ARCHITECTURE */ + +#if wxUSE_MDI_ARCHITECTURE +# if !wxUSE_MDI +# ifdef wxABORT_ON_CONFIG_ERROR +# error "MDI requires wxUSE_MDI" +# else +# undef wxUSE_MDI +# define wxUSE_MDI 1 +# endif +# endif + +# if !wxUSE_DOC_VIEW_ARCHITECTURE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MDI_ARCHITECTURE requires wxUSE_DOC_VIEW_ARCHITECTURE" +# else +# undef wxUSE_DOC_VIEW_ARCHITECTURE +# define wxUSE_DOC_VIEW_ARCHITECTURE 1 +# endif +# endif +#endif /* wxUSE_MDI_ARCHITECTURE */ + +#if !wxUSE_FILEDLG +# if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FILEDLG is required by wxUSE_DOC_VIEW_ARCHITECTURE and wxUSE_WXHTML_HELP!" +# else +# undef wxUSE_FILEDLG +# define wxUSE_FILEDLG 1 +# endif +# endif +#endif /* wxUSE_FILEDLG */ + +#if !wxUSE_GAUGE || !wxUSE_BUTTON +# if wxUSE_PROGRESSDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "Generic progress dialog requires wxUSE_GAUGE and wxUSE_BUTTON" +# else +# undef wxUSE_GAUGE +# undef wxUSE_BUTTON +# define wxUSE_GAUGE 1 +# define wxUSE_BUTTON 1 +# endif +# endif +#endif /* !wxUSE_GAUGE */ + +#if !wxUSE_BUTTON +# if wxUSE_FONTDLG || \ + wxUSE_FILEDLG || \ + wxUSE_CHOICEDLG || \ + wxUSE_NUMBERDLG || \ + wxUSE_TEXTDLG || \ + wxUSE_DIRDLG || \ + wxUSE_STARTUP_TIPS || \ + wxUSE_WIZARDDLG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "Common and generic dialogs require wxUSE_BUTTON" +# else +# undef wxUSE_BUTTON +# define wxUSE_BUTTON 1 +# endif +# endif +#endif /* !wxUSE_BUTTON */ + +#if !wxUSE_TOOLBAR +# if wxUSE_TOOLBAR_NATIVE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_NATIVE is set to 1" +# else +# undef wxUSE_TOOLBAR_NATIVE +# define wxUSE_TOOLBAR_NATIVE 0 +# endif +# endif +#endif + +#if !wxUSE_IMAGLIST +# if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL || wxUSE_TREELISTCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxImageList must be compiled as well" +# else +# undef wxUSE_IMAGLIST +# define wxUSE_IMAGLIST 1 +# endif +# endif +#endif /* !wxUSE_IMAGLIST */ + +#if wxUSE_RADIOBOX +# if !wxUSE_RADIOBTN +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN" +# else +# undef wxUSE_RADIOBTN +# define wxUSE_RADIOBTN 1 +# endif +# endif +# if !wxUSE_STATBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_RADIOBOX requires wxUSE_STATBOX" +# else +# undef wxUSE_STATBOX +# define wxUSE_STATBOX 1 +# endif +# endif +#endif /* wxUSE_RADIOBOX */ + +#if wxUSE_LOGWINDOW +# if !wxUSE_TEXTCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL" +# else +# undef wxUSE_TEXTCTRL +# define wxUSE_TEXTCTRL 1 +# endif +# endif +#endif /* wxUSE_LOGWINDOW */ + +#if wxUSE_LOG_DIALOG +# if !wxUSE_LISTCTRL || !wxUSE_BUTTON +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL and wxUSE_BUTTON" +# else +# undef wxUSE_LISTCTRL +# define wxUSE_LISTCTRL 1 +# undef wxUSE_BUTTON +# define wxUSE_BUTTON 1 +# endif +# endif +#endif /* wxUSE_LOG_DIALOG */ + +#if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxClipboard requires wxDataObject" +# else +# undef wxUSE_DATAOBJ +# define wxUSE_DATAOBJ 1 +# endif +#endif /* wxUSE_CLIPBOARD */ + +#if wxUSE_XRC && !wxUSE_XML +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_XRC requires wxUSE_XML" +# else +# undef wxUSE_XRC +# define wxUSE_XRC 0 +# endif +#endif /* wxUSE_XRC */ + +#if wxUSE_SOCKETS && !wxUSE_STOPWATCH +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SOCKETS requires wxUSE_STOPWATCH" +# else +# undef wxUSE_SOCKETS +# define wxUSE_SOCKETS 0 +# endif +#endif /* wxUSE_SOCKETS */ + +#if wxUSE_SVG && !wxUSE_STREAMS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SVG requires wxUSE_STREAMS" +# else +# undef wxUSE_SVG +# define wxUSE_SVG 0 +# endif +#endif /* wxUSE_SVG */ + +#if wxUSE_SVG && !wxUSE_IMAGE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SVG requires wxUSE_IMAGE" +# else +# undef wxUSE_SVG +# define wxUSE_SVG 0 +# endif +#endif /* wxUSE_SVG */ + +#if wxUSE_SVG && !wxUSE_LIBPNG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_SVG requires wxUSE_LIBPNG" +# else +# undef wxUSE_SVG +# define wxUSE_SVG 0 +# endif +#endif /* wxUSE_SVG */ + +#if wxUSE_TASKBARICON && !wxUSE_MENUS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TASKBARICON requires wxUSE_MENUS" +# else +# undef wxUSE_TASKBARICON +# define wxUSE_TASKBARICON 0 +# endif +#endif /* wxUSE_TASKBARICON */ + +#if !wxUSE_VARIANT +# if wxUSE_DATAVIEWCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxDataViewCtrl requires wxVariant" +# else +# undef wxUSE_DATAVIEWCTRL +# define wxUSE_DATAVIEWCTRL 0 +# endif +# endif +#endif /* wxUSE_VARIANT */ + +#if wxUSE_TREELISTCTRL && !wxUSE_DATAVIEWCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TREELISTCTRL requires wxDataViewCtrl" +# else +# undef wxUSE_TREELISTCTRL +# define wxUSE_TREELISTCTRL 0 +# endif +#endif /* wxUSE_TREELISTCTRL */ + +#if wxUSE_WEBVIEW && !(wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_IE) +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_WEBVIEW requires at least one backend" +# else +# undef wxUSE_WEBVIEW +# define wxUSE_WEBVIEW 0 +# endif +#endif /* wxUSE_WEBVIEW && !any web view backend */ + +#if wxUSE_PREFERENCES_EDITOR + /* + We can use either a generic implementation, using wxNotebook, or a + native one under wxOSX/Cocoa but then we must be using the native + toolbar. + */ +# if !wxUSE_NOTEBOOK +# ifdef __WXOSX_COCOA__ +# if !wxUSE_TOOLBAR || !wxOSX_USE_NATIVE_TOOLBAR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PREFERENCES_EDITOR requires native toolbar in wxOSX" +# else +# undef wxUSE_PREFERENCES_EDITOR +# define wxUSE_PREFERENCES_EDITOR 0 +# endif +# endif +# else +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PREFERENCES_EDITOR requires wxNotebook" +# else +# undef wxUSE_PREFERENCES_EDITOR +# define wxUSE_PREFERENCES_EDITOR 0 +# endif +# endif +# endif +#endif /* wxUSE_PREFERENCES_EDITOR */ + +#endif /* wxUSE_GUI */ + +#endif /* _WX_CHKCONF_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/choicdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/choicdlg.h new file mode 100644 index 0000000000..0ab4c076d6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/choicdlg.h @@ -0,0 +1,22 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/choicdlg.h +// Purpose: Includes generic choice dialog file +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHOICDLG_H_BASE_ +#define _WX_CHOICDLG_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_CHOICEDLG + +#include "wx/generic/choicdgg.h" + +#endif + +#endif // _WX_CHOICDLG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/choice.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/choice.h new file mode 100644 index 0000000000..3a848f9f3c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/choice.h @@ -0,0 +1,97 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/choice.h +// Purpose: wxChoice class interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 26.07.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHOICE_H_BASE_ +#define _WX_CHOICE_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_CHOICE + +#include "wx/ctrlsub.h" // the base class + +// ---------------------------------------------------------------------------- +// global data +// ---------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_CORE(const char) wxChoiceNameStr[]; + +// ---------------------------------------------------------------------------- +// wxChoice allows to select one of a non-modifiable list of strings +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxChoiceBase : public wxControlWithItems +{ +public: + wxChoiceBase() { } + virtual ~wxChoiceBase(); + + // all generic methods are in wxControlWithItems + + // get the current selection: this can only be different from the normal + // selection if the popup items list is currently opened and the user + // selected some item in it but didn't close the list yet; otherwise (and + // currently always on platforms other than MSW) this is the same as + // GetSelection() + virtual int GetCurrentSelection() const { return GetSelection(); } + + // set/get the number of columns in the control (as they're not supported on + // most platforms, they do nothing by default) + virtual void SetColumns(int WXUNUSED(n) = 1 ) { } + virtual int GetColumns() const { return 1 ; } + + // emulate selecting the item event.GetInt() + void Command(wxCommandEvent& event); + + // override wxItemContainer::IsSorted + virtual bool IsSorted() const { return HasFlag(wxCB_SORT); } + +protected: + // The generic implementation doesn't determine the height correctly and + // doesn't account for the width of the arrow but does take into account + // the string widths, so the derived classes should override it and set the + // height and add the arrow width to the size returned by this version. + virtual wxSize DoGetBestSize() const; + +private: + wxDECLARE_NO_COPY_CLASS(wxChoiceBase); +}; + +// ---------------------------------------------------------------------------- +// include the platform-dependent class definition +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/choice.h" +#elif defined(__SMARTPHONE__) && defined(__WXWINCE__) + #include "wx/msw/wince/choicece.h" +#elif defined(__WXMSW__) + #include "wx/msw/choice.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/choice.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/choice.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/choice.h" +#elif defined(__WXMAC__) + #include "wx/osx/choice.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/choice.h" +#elif defined(__WXPM__) + #include "wx/os2/choice.h" +#endif + +#endif // wxUSE_CHOICE + +#endif // _WX_CHOICE_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/choicebk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/choicebk.h new file mode 100644 index 0000000000..335ede165e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/choicebk.h @@ -0,0 +1,130 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/choicebk.h +// Purpose: wxChoicebook: wxChoice and wxNotebook combination +// Author: Vadim Zeitlin +// Modified by: Wlodzimierz ABX Skiba from wx/listbook.h +// Created: 15.09.04 +// Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHOICEBOOK_H_ +#define _WX_CHOICEBOOK_H_ + +#include "wx/defs.h" + +#if wxUSE_CHOICEBOOK + +#include "wx/bookctrl.h" +#include "wx/choice.h" +#include "wx/containr.h" + +class WXDLLIMPEXP_FWD_CORE wxChoice; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CHOICEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); + +// wxChoicebook flags +#define wxCHB_DEFAULT wxBK_DEFAULT +#define wxCHB_TOP wxBK_TOP +#define wxCHB_BOTTOM wxBK_BOTTOM +#define wxCHB_LEFT wxBK_LEFT +#define wxCHB_RIGHT wxBK_RIGHT +#define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK + +// ---------------------------------------------------------------------------- +// wxChoicebook +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxChoicebook : public wxNavigationEnabled +{ +public: + wxChoicebook() { } + + wxChoicebook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxEmptyString) + { + (void)Create(parent, id, pos, size, style, name); + } + + // quasi ctor + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxEmptyString); + + + virtual bool SetPageText(size_t n, const wxString& strText); + virtual wxString GetPageText(size_t n) const; + virtual int GetPageImage(size_t n) const; + virtual bool SetPageImage(size_t n, int imageId); + virtual bool InsertPage(size_t n, + wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE); + virtual int SetSelection(size_t n) + { return DoSetSelection(n, SetSelection_SendEvent); } + virtual int ChangeSelection(size_t n) { return DoSetSelection(n); } + virtual void SetImageList(wxImageList *imageList); + + virtual bool DeleteAllPages(); + + // returns the choice control + wxChoice* GetChoiceCtrl() const { return (wxChoice*)m_bookctrl; } + + // Override this to return true because the part of parent window + // background between our controlling wxChoice and the page area should + // show through. + virtual bool HasTransparentBackground() { return true; } + +protected: + virtual void DoSetWindowVariant(wxWindowVariant variant); + + virtual wxWindow *DoRemovePage(size_t page); + + void UpdateSelectedPage(size_t newsel) + { + m_selection = static_cast(newsel); + GetChoiceCtrl()->Select(m_selection); + } + + wxBookCtrlEvent* CreatePageChangingEvent() const; + void MakeChangedEvent(wxBookCtrlEvent &event); + + // event handlers + void OnChoiceSelected(wxCommandEvent& event); + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoicebook) +}; + +// ---------------------------------------------------------------------------- +// choicebook event class and related stuff +// ---------------------------------------------------------------------------- + +// wxChoicebookEvent is obsolete and defined for compatibility only +#define wxChoicebookEvent wxBookCtrlEvent +typedef wxBookCtrlEventFunction wxChoicebookEventFunction; +#define wxChoicebookEventHandler(func) wxBookCtrlEventHandler(func) + +#define EVT_CHOICEBOOK_PAGE_CHANGED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_CHOICEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + +#define EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_CHOICEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED wxEVT_CHOICEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING wxEVT_CHOICEBOOK_PAGE_CHANGING + +#endif // wxUSE_CHOICEBOOK + +#endif // _WX_CHOICEBOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/clipbrd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/clipbrd.h new file mode 100644 index 0000000000..5399be27d5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/clipbrd.h @@ -0,0 +1,204 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/clipbrd.h +// Purpose: wxClipboad class and clipboard functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.10.99 +// Copyright: (c) wxWidgets Team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CLIPBRD_H_BASE_ +#define _WX_CLIPBRD_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_CLIPBOARD + + +#include "wx/event.h" +#include "wx/chartype.h" +#include "wx/dataobj.h" // for wxDataFormat +#include "wx/vector.h" + +class WXDLLIMPEXP_FWD_CORE wxClipboard; + +// ---------------------------------------------------------------------------- +// wxClipboard represents the system clipboard. Normally, you should use +// wxTheClipboard which is a global pointer to the (unique) clipboard. +// +// Clipboard can be used to copy data to/paste data from. It works together +// with wxDataObject. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClipboardBase : public wxObject +{ +public: + wxClipboardBase() { m_usePrimary = false; } + + // open the clipboard before Add/SetData() and GetData() + virtual bool Open() = 0; + + // close the clipboard after Add/SetData() and GetData() + virtual void Close() = 0; + + // query whether the clipboard is opened + virtual bool IsOpened() const = 0; + + // add to the clipboard data + // + // NB: the clipboard owns the pointer and will delete it, so data must be + // allocated on the heap + virtual bool AddData( wxDataObject *data ) = 0; + + // set the clipboard data, this is the same as Clear() followed by + // AddData() + virtual bool SetData( wxDataObject *data ) = 0; + + // ask if data in correct format is available + virtual bool IsSupported( const wxDataFormat& format ) = 0; + + // ask if data in correct format is available + virtual bool IsSupportedAsync( wxEvtHandler *sink ); + + // fill data with data on the clipboard (if available) + virtual bool GetData( wxDataObject& data ) = 0; + + // clears wxTheClipboard and the system's clipboard if possible + virtual void Clear() = 0; + + // flushes the clipboard: this means that the data which is currently on + // clipboard will stay available even after the application exits (possibly + // eating memory), otherwise the clipboard will be emptied on exit + virtual bool Flush() { return false; } + + // this allows to choose whether we work with CLIPBOARD (default) or + // PRIMARY selection on X11-based systems + // + // on the other ones, working with primary selection does nothing: this + // allows to write code which sets the primary selection when something is + // selected without any ill effects (i.e. without overwriting the + // clipboard which would be wrong on the platforms without X11 PRIMARY) + virtual void UsePrimarySelection(bool usePrimary = false) + { + m_usePrimary = usePrimary; + } + + // return true if we're using primary selection + bool IsUsingPrimarySelection() const { return m_usePrimary; } + + // Returns global instance (wxTheClipboard) of the object: + static wxClipboard *Get(); + + + // don't use this directly, it is public for compatibility with some ports + // (wxX11, wxMotif, ...) only + bool m_usePrimary; +}; + +// ---------------------------------------------------------------------------- +// asynchronous clipboard event +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClipboardEvent : public wxEvent +{ +public: + wxClipboardEvent(wxEventType evtType = wxEVT_NULL) + : wxEvent(0, evtType) + { + } + + wxClipboardEvent(const wxClipboardEvent& event) + : wxEvent(event), + m_formats(event.m_formats) + { + } + + bool SupportsFormat(const wxDataFormat& format) const; + void AddFormat(const wxDataFormat& format); + + virtual wxEvent *Clone() const + { + return new wxClipboardEvent(*this); + } + + +protected: + wxVector m_formats; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxClipboardEvent) +}; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CLIPBOARD_CHANGED, wxClipboardEvent ); + +typedef void (wxEvtHandler::*wxClipboardEventFunction)(wxClipboardEvent&); + +#define wxClipboardEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxClipboardEventFunction, func) + +#define EVT_CLIPBOARD_CHANGED(func) wx__DECLARE_EVT0(wxEVT_CLIPBOARD_CHANGED, wxClipboardEventHandler(func)) + +// ---------------------------------------------------------------------------- +// globals +// ---------------------------------------------------------------------------- + +// The global clipboard object - backward compatible access macro: +#define wxTheClipboard (wxClipboard::Get()) + +// ---------------------------------------------------------------------------- +// include platform-specific class declaration +// ---------------------------------------------------------------------------- + +#if defined(__WXMSW__) + #include "wx/msw/clipbrd.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/clipbrd.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/clipbrd.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/clipbrd.h" +#elif defined(__WXX11__) + #include "wx/x11/clipbrd.h" +#elif defined(__WXMAC__) + #include "wx/osx/clipbrd.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/clipbrd.h" +#elif defined(__WXPM__) + #include "wx/os2/clipbrd.h" +#endif + +// ---------------------------------------------------------------------------- +// helpful class for opening the clipboard and automatically closing it +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClipboardLocker +{ +public: + wxClipboardLocker(wxClipboard *clipboard = NULL) + { + m_clipboard = clipboard ? clipboard : wxTheClipboard; + if ( m_clipboard ) + { + m_clipboard->Open(); + } + } + + bool operator!() const { return !m_clipboard->IsOpened(); } + + ~wxClipboardLocker() + { + if ( m_clipboard ) + { + m_clipboard->Close(); + } + } + +private: + wxClipboard *m_clipboard; + + wxDECLARE_NO_COPY_CLASS(wxClipboardLocker); +}; + +#endif // wxUSE_CLIPBOARD + +#endif // _WX_CLIPBRD_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/clntdata.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/clntdata.h new file mode 100644 index 0000000000..a41ccc0ea9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/clntdata.h @@ -0,0 +1,162 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/clntdata.h +// Purpose: A mixin class for holding a wxClientData or void pointer +// Author: Robin Dunn +// Modified by: +// Created: 9-Oct-2001 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CLNTDATAH__ +#define _WX_CLNTDATAH__ + +#include "wx/defs.h" +#include "wx/string.h" +#include "wx/hashmap.h" + +typedef int (*wxShadowObjectMethod)(void*, void*); +WX_DECLARE_STRING_HASH_MAP_WITH_DECL( + wxShadowObjectMethod, + wxShadowObjectMethods, + class WXDLLIMPEXP_BASE +); +WX_DECLARE_STRING_HASH_MAP_WITH_DECL( + void *, + wxShadowObjectFields, + class WXDLLIMPEXP_BASE +); + +class WXDLLIMPEXP_BASE wxShadowObject +{ +public: + wxShadowObject() { } + + void AddMethod( const wxString &name, wxShadowObjectMethod method ) + { + wxShadowObjectMethods::iterator it = m_methods.find( name ); + if (it == m_methods.end()) + m_methods[ name ] = method; + else + it->second = method; + } + + bool InvokeMethod( const wxString &name, void* window, void* param, int* returnValue ) + { + wxShadowObjectMethods::iterator it = m_methods.find( name ); + if (it == m_methods.end()) + return false; + wxShadowObjectMethod method = it->second; + int ret = (*method)(window, param); + if (returnValue) + *returnValue = ret; + return true; + } + + void AddField( const wxString &name, void* initialValue = NULL ) + { + wxShadowObjectFields::iterator it = m_fields.find( name ); + if (it == m_fields.end()) + m_fields[ name ] = initialValue; + else + it->second = initialValue; + } + + void SetField( const wxString &name, void* value ) + { + wxShadowObjectFields::iterator it = m_fields.find( name ); + if (it == m_fields.end()) + return; + it->second = value; + } + + void* GetField( const wxString &name, void *defaultValue = NULL ) + { + wxShadowObjectFields::iterator it = m_fields.find( name ); + if (it == m_fields.end()) + return defaultValue; + return it->second; + } + +private: + wxShadowObjectMethods m_methods; + wxShadowObjectFields m_fields; +}; + + +// ---------------------------------------------------------------------------- + +// what kind of client data do we have? +enum wxClientDataType +{ + wxClientData_None, // we don't know yet because we don't have it at all + wxClientData_Object, // our client data is typed and we own it + wxClientData_Void // client data is untyped and we don't own it +}; + +class WXDLLIMPEXP_BASE wxClientData +{ +public: + wxClientData() { } + virtual ~wxClientData() { } +}; + +class WXDLLIMPEXP_BASE wxStringClientData : public wxClientData +{ +public: + wxStringClientData() : m_data() { } + wxStringClientData( const wxString &data ) : m_data(data) { } + void SetData( const wxString &data ) { m_data = data; } + const wxString& GetData() const { return m_data; } + +private: + wxString m_data; +}; + +// This class is a mixin that provides storage and management of "client +// data." The client data stored can either be a pointer to a wxClientData +// object in which case it is managed by the container (i.e. it will delete +// the data when it's destroyed) or an untyped pointer which won't be deleted +// by the container - but not both of them +// +// NOTE: This functionality is currently duplicated in wxEvtHandler in order +// to avoid having more than one vtable in that class hierarchy. + +class WXDLLIMPEXP_BASE wxClientDataContainer +{ +public: + wxClientDataContainer(); + virtual ~wxClientDataContainer(); + + void SetClientObject( wxClientData *data ) { DoSetClientObject(data); } + wxClientData *GetClientObject() const { return DoGetClientObject(); } + + void SetClientData( void *data ) { DoSetClientData(data); } + void *GetClientData() const { return DoGetClientData(); } + +protected: + // The user data: either an object which will be deleted by the container + // when it's deleted or some raw pointer which we do nothing with. Only + // one type of data can be used with the given window, i.e. you cannot set + // the void data and then associate the container with wxClientData or vice + // versa. + union + { + wxClientData *m_clientObject; + void *m_clientData; + }; + + // client data accessors + virtual void DoSetClientObject( wxClientData *data ); + virtual wxClientData *DoGetClientObject() const; + + virtual void DoSetClientData( void *data ); + virtual void *DoGetClientData() const; + + // what kind of data do we have? + wxClientDataType m_clientDataType; + +}; + +#endif // _WX_CLNTDATAH__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/clrpicker.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/clrpicker.h new file mode 100644 index 0000000000..1794ee68c9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/clrpicker.h @@ -0,0 +1,203 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/clrpicker.h +// Purpose: wxColourPickerCtrl base header +// Author: Francesco Montorsi (based on Vadim Zeitlin's code) +// Modified by: +// Created: 14/4/2006 +// Copyright: (c) Vadim Zeitlin, Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CLRPICKER_H_BASE_ +#define _WX_CLRPICKER_H_BASE_ + +#include "wx/defs.h" + + +#if wxUSE_COLOURPICKERCTRL + +#include "wx/pickerbase.h" + + +class WXDLLIMPEXP_FWD_CORE wxColourPickerEvent; + +extern WXDLLIMPEXP_DATA_CORE(const char) wxColourPickerWidgetNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxColourPickerCtrlNameStr[]; + +// show the colour in HTML form (#AABBCC) as colour button label +#define wxCLRBTN_SHOW_LABEL 100 + +// the default style +#define wxCLRBTN_DEFAULT_STYLE (wxCLRBTN_SHOW_LABEL) + + + +// ---------------------------------------------------------------------------- +// wxColourPickerWidgetBase: a generic abstract interface which must be +// implemented by controls used by wxColourPickerCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxColourPickerWidgetBase +{ +public: + wxColourPickerWidgetBase() { m_colour = *wxBLACK; } + virtual ~wxColourPickerWidgetBase() {} + + wxColour GetColour() const + { return m_colour; } + virtual void SetColour(const wxColour &col) + { m_colour = col; UpdateColour(); } + virtual void SetColour(const wxString &col) + { m_colour.Set(col); UpdateColour(); } + +protected: + + virtual void UpdateColour() = 0; + + // the current colour (may be invalid if none) + wxColour m_colour; +}; + + +// Styles which must be supported by all controls implementing wxColourPickerWidgetBase +// NB: these styles must be defined to carefully-chosen values to +// avoid conflicts with wxButton's styles + +// show the colour in HTML form (#AABBCC) as colour button label +// (instead of no label at all) +// NOTE: this style is supported just by wxColourButtonGeneric and +// thus is not exposed in wxColourPickerCtrl +#define wxCLRP_SHOW_LABEL 0x0008 + +// map platform-dependent controls which implement the wxColourPickerWidgetBase +// under the name "wxColourPickerWidget". +// NOTE: wxColourPickerCtrl allocates a wxColourPickerWidget and relies on the +// fact that all classes being mapped as wxColourPickerWidget have the +// same prototype for their contructor (and also explains why we use +// define instead of a typedef) +// since GTK > 2.4, there is GtkColorButton +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) + #include "wx/gtk/clrpicker.h" + #define wxColourPickerWidget wxColourButton +#else + #include "wx/generic/clrpickerg.h" + #define wxColourPickerWidget wxGenericColourButton +#endif + + +// ---------------------------------------------------------------------------- +// wxColourPickerCtrl: platform-independent class which embeds a +// platform-dependent wxColourPickerWidget and, if wxCLRP_USE_TEXTCTRL style is +// used, a textctrl next to it. +// ---------------------------------------------------------------------------- + +#define wxCLRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL) +#define wxCLRP_DEFAULT_STYLE 0 + +class WXDLLIMPEXP_CORE wxColourPickerCtrl : public wxPickerBase +{ +public: + wxColourPickerCtrl() {} + virtual ~wxColourPickerCtrl() {} + + + wxColourPickerCtrl(wxWindow *parent, wxWindowID id, + const wxColour& col = *wxBLACK, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxColourPickerCtrlNameStr) + { Create(parent, id, col, pos, size, style, validator, name); } + + bool Create(wxWindow *parent, wxWindowID id, + const wxColour& col = *wxBLACK, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCLRP_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxColourPickerCtrlNameStr); + + +public: // public API + + // get the colour chosen + wxColour GetColour() const + { return ((wxColourPickerWidget *)m_picker)->GetColour(); } + + // set currently displayed color + void SetColour(const wxColour& col); + + // set colour using RGB(r,g,b) syntax or considering given text as a colour name; + // returns true if the given text was successfully recognized. + bool SetColour(const wxString& text); + + +public: // internal functions + + // update the button colour to match the text control contents + void UpdatePickerFromTextCtrl(); + + // update the text control to match the button's colour + void UpdateTextCtrlFromPicker(); + + // event handler for our picker + void OnColourChange(wxColourPickerEvent &); + +protected: + virtual long GetPickerStyle(long style) const + { return (style & wxCLRP_SHOW_LABEL); } + +private: + DECLARE_DYNAMIC_CLASS(wxColourPickerCtrl) +}; + + +// ---------------------------------------------------------------------------- +// wxColourPickerEvent: used by wxColourPickerCtrl only +// ---------------------------------------------------------------------------- + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COLOURPICKER_CHANGED, wxColourPickerEvent ); + +class WXDLLIMPEXP_CORE wxColourPickerEvent : public wxCommandEvent +{ +public: + wxColourPickerEvent() {} + wxColourPickerEvent(wxObject *generator, int id, const wxColour &col) + : wxCommandEvent(wxEVT_COLOURPICKER_CHANGED, id), + m_colour(col) + { + SetEventObject(generator); + } + + wxColour GetColour() const { return m_colour; } + void SetColour(const wxColour &c) { m_colour = c; } + + + // default copy ctor, assignment operator and dtor are ok + virtual wxEvent *Clone() const { return new wxColourPickerEvent(*this); } + +private: + wxColour m_colour; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxColourPickerEvent) +}; + +// ---------------------------------------------------------------------------- +// event types and macros +// ---------------------------------------------------------------------------- + +typedef void (wxEvtHandler::*wxColourPickerEventFunction)(wxColourPickerEvent&); + +#define wxColourPickerEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxColourPickerEventFunction, func) + +#define EVT_COLOURPICKER_CHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn)) + + +// old wxEVT_COMMAND_* constant +#define wxEVT_COMMAND_COLOURPICKER_CHANGED wxEVT_COLOURPICKER_CHANGED + +#endif // wxUSE_COLOURPICKERCTRL + +#endif // _WX_CLRPICKER_H_BASE_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmdargs.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmdargs.h new file mode 100644 index 0000000000..e4167f0fd6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmdargs.h @@ -0,0 +1,151 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cmdargs.h +// Purpose: declaration of wxCmdLineArgsArray helper class +// Author: Vadim Zeitlin +// Created: 2007-11-12 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CMDARGS_H_ +#define _WX_CMDARGS_H_ + +#include "wx/arrstr.h" + +// ---------------------------------------------------------------------------- +// wxCmdLineArgsArray: helper class used by wxApp::argv +// ---------------------------------------------------------------------------- + +#if wxUSE_UNICODE + +// this class is used instead of either "char **" or "wchar_t **" (neither of +// which would be backwards compatible with all the existing code) for argv +// field of wxApp +// +// as it's used for compatibility, it tries to look as much as traditional +// (char **) argv as possible, in particular it provides implicit conversions +// to "char **" and also array-like operator[] +class WXDLLIMPEXP_BASE wxCmdLineArgsArray +{ +public: + wxCmdLineArgsArray() { m_argsA = NULL; m_argsW = NULL; } + + template + wxCmdLineArgsArray& operator=(T **argv) + { + FreeArgs(); + + m_args.clear(); + + if ( argv ) + { + while ( *argv ) + m_args.push_back(*argv++); + } + + return *this; + } + + operator char**() const + { + if ( !m_argsA ) + { + const size_t count = m_args.size(); + m_argsA = new char *[count]; + for ( size_t n = 0; n < count; n++ ) + m_argsA[n] = wxStrdup(m_args[n].ToAscii()); + } + + return m_argsA; + } + + operator wchar_t**() const + { + if ( !m_argsW ) + { + const size_t count = m_args.size(); + m_argsW = new wchar_t *[count]; + for ( size_t n = 0; n < count; n++ ) + m_argsW[n] = wxStrdup(m_args[n].wc_str()); + } + + return m_argsW; + } + + // existing code does checks like "if ( argv )" and we want it to continue + // to compile, so provide this conversion even if it is pretty dangerous + operator bool() const + { + return !m_args.empty(); + } + + // and the same for "if ( !argv )" checks + bool operator!() const + { + return m_args.empty(); + } + + wxString operator[](size_t n) const + { + return m_args[n]; + } + + // we must provide this overload for g++ 3.4 which can't choose between + // our operator[](size_t) and ::operator[](char**, int) otherwise + wxString operator[](int n) const + { + return m_args[n]; + } + + + // convenience methods, i.e. not existing only for backwards compatibility + + // do we have any arguments at all? + bool IsEmpty() const { return m_args.empty(); } + + // access the arguments as a convenient array of wxStrings + const wxArrayString& GetArguments() const { return m_args; } + + ~wxCmdLineArgsArray() + { + FreeArgs(); + } + +private: + template + void Free(T **args) + { + if ( !args ) + return; + + const size_t count = m_args.size(); + for ( size_t n = 0; n < count; n++ ) + free(args[n]); + + delete [] args; + } + + void FreeArgs() + { + Free(m_argsA); + Free(m_argsW); + } + + wxArrayString m_args; + mutable char **m_argsA; + mutable wchar_t **m_argsW; + + wxDECLARE_NO_COPY_CLASS(wxCmdLineArgsArray); +}; + +// provide global operator overload for compatibility with the existing code +// doing things like "if ( condition && argv )" +inline bool operator&&(bool cond, const wxCmdLineArgsArray& array) +{ + return cond && !array.IsEmpty(); +} + +#endif // wxUSE_UNICODE + +#endif // _WX_CMDARGS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmdline.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmdline.h new file mode 100644 index 0000000000..3dd41b9fe4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmdline.h @@ -0,0 +1,297 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cmdline.h +// Purpose: wxCmdLineParser and related classes for parsing the command +// line options +// Author: Vadim Zeitlin +// Modified by: +// Created: 04.01.00 +// Copyright: (c) 2000 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CMDLINE_H_ +#define _WX_CMDLINE_H_ + +#include "wx/defs.h" + +#include "wx/string.h" +#include "wx/arrstr.h" +#include "wx/cmdargs.h" + +// determines ConvertStringToArgs() behaviour +enum wxCmdLineSplitType +{ + wxCMD_LINE_SPLIT_DOS, + wxCMD_LINE_SPLIT_UNIX +}; + +#if wxUSE_CMDLINE_PARSER + +class WXDLLIMPEXP_FWD_BASE wxDateTime; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// by default, options are optional (sic) and each call to AddParam() allows +// one more parameter - this may be changed by giving non-default flags to it +enum wxCmdLineEntryFlags +{ + wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given + wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted + wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated + wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request + wxCMD_LINE_NEEDS_SEPARATOR = 0x10, // must have sep before the value + wxCMD_LINE_SWITCH_NEGATABLE = 0x20 // this switch can be negated (e.g. /S-) +}; + +// an option value or parameter may be a string (the most common case), a +// number or a date +enum wxCmdLineParamType +{ + wxCMD_LINE_VAL_STRING, // should be 0 (default) + wxCMD_LINE_VAL_NUMBER, + wxCMD_LINE_VAL_DATE, + wxCMD_LINE_VAL_DOUBLE, + wxCMD_LINE_VAL_NONE +}; + +// for constructing the cmd line description using Init() +enum wxCmdLineEntryType +{ + wxCMD_LINE_SWITCH, + wxCMD_LINE_OPTION, + wxCMD_LINE_PARAM, + wxCMD_LINE_USAGE_TEXT, + wxCMD_LINE_NONE // to terminate the list +}; + +// Possible return values of wxCmdLineParser::FoundSwitch() +enum wxCmdLineSwitchState +{ + wxCMD_SWITCH_OFF = -1, // Found but turned off/negated. + wxCMD_SWITCH_NOT_FOUND, // Not found at all. + wxCMD_SWITCH_ON // Found in normal state. +}; + +// ---------------------------------------------------------------------------- +// wxCmdLineEntryDesc is a description of one command line +// switch/option/parameter +// ---------------------------------------------------------------------------- + +struct wxCmdLineEntryDesc +{ + wxCmdLineEntryType kind; + const char *shortName; + const char *longName; + const char *description; + wxCmdLineParamType type; + int flags; +}; + +// the list of wxCmdLineEntryDesc objects should be terminated with this one +#define wxCMD_LINE_DESC_END \ + { wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0x0 } + +// ---------------------------------------------------------------------------- +// wxCmdLineParser is a class for parsing command line. +// +// It has the following features: +// +// 1. distinguishes options, switches and parameters; allows option grouping +// 2. allows both short and long options +// 3. automatically generates the usage message from the cmd line description +// 4. does type checks on the options values (number, date, ...) +// +// To use it you should: +// +// 1. construct it giving it the cmd line to parse and optionally its desc +// 2. construct the cmd line description using AddXXX() if not done in (1) +// 3. call Parse() +// 4. use GetXXX() to retrieve the parsed info +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxCmdLineParser +{ +public: + // ctors and initializers + // ---------------------- + + // default ctor or ctor giving the cmd line in either Unix or Win form + wxCmdLineParser() { Init(); } + wxCmdLineParser(int argc, char **argv) { Init(); SetCmdLine(argc, argv); } +#if wxUSE_UNICODE + wxCmdLineParser(int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); } + wxCmdLineParser(int argc, const wxCmdLineArgsArray& argv) + { Init(); SetCmdLine(argc, argv); } +#endif // wxUSE_UNICODE + wxCmdLineParser(const wxString& cmdline) { Init(); SetCmdLine(cmdline); } + + // the same as above, but also gives the cmd line description - otherwise, + // use AddXXX() later + wxCmdLineParser(const wxCmdLineEntryDesc *desc) + { Init(); SetDesc(desc); } + wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, char **argv) + { Init(); SetCmdLine(argc, argv); SetDesc(desc); } +#if wxUSE_UNICODE + wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, wxChar **argv) + { Init(); SetCmdLine(argc, argv); SetDesc(desc); } + wxCmdLineParser(const wxCmdLineEntryDesc *desc, + int argc, + const wxCmdLineArgsArray& argv) + { Init(); SetCmdLine(argc, argv); SetDesc(desc); } +#endif // wxUSE_UNICODE + wxCmdLineParser(const wxCmdLineEntryDesc *desc, const wxString& cmdline) + { Init(); SetCmdLine(cmdline); SetDesc(desc); } + + // set cmd line to parse after using one of the ctors which don't do it + void SetCmdLine(int argc, char **argv); +#if wxUSE_UNICODE + void SetCmdLine(int argc, wxChar **argv); + void SetCmdLine(int argc, const wxCmdLineArgsArray& argv); +#endif // wxUSE_UNICODE + void SetCmdLine(const wxString& cmdline); + + // not virtual, don't use this class polymorphically + ~wxCmdLineParser(); + + // set different parser options + // ---------------------------- + + // by default, '-' is switch char under Unix, '-' or '/' under Win: + // switchChars contains all characters with which an option or switch may + // start + void SetSwitchChars(const wxString& switchChars); + + // long options are not POSIX-compliant, this option allows to disable them + void EnableLongOptions(bool enable = true); + void DisableLongOptions() { EnableLongOptions(false); } + + bool AreLongOptionsEnabled() const; + + // extra text may be shown by Usage() method if set by this function + void SetLogo(const wxString& logo); + + // construct the cmd line description + // ---------------------------------- + + // take the cmd line description from the wxCMD_LINE_NONE terminated table + void SetDesc(const wxCmdLineEntryDesc *desc); + + // a switch: i.e. an option without value + void AddSwitch(const wxString& name, const wxString& lng = wxEmptyString, + const wxString& desc = wxEmptyString, + int flags = 0); + void AddLongSwitch(const wxString& lng, + const wxString& desc = wxEmptyString, + int flags = 0) + { + AddSwitch(wxString(), lng, desc, flags); + } + + // an option taking a value of the given type + void AddOption(const wxString& name, const wxString& lng = wxEmptyString, + const wxString& desc = wxEmptyString, + wxCmdLineParamType type = wxCMD_LINE_VAL_STRING, + int flags = 0); + void AddLongOption(const wxString& lng, + const wxString& desc = wxEmptyString, + wxCmdLineParamType type = wxCMD_LINE_VAL_STRING, + int flags = 0) + { + AddOption(wxString(), lng, desc, type, flags); + } + + // a parameter + void AddParam(const wxString& desc = wxEmptyString, + wxCmdLineParamType type = wxCMD_LINE_VAL_STRING, + int flags = 0); + + // add an explanatory text to be shown to the user in help + void AddUsageText(const wxString& text); + + // actions + // ------- + + // parse the command line, return 0 if ok, -1 if "-h" or "--help" option + // was encountered and the help message was given or a positive value if a + // syntax error occurred + // + // if showUsage is true, Usage() is called in case of syntax error or if + // help was requested + int Parse(bool showUsage = true); + + // give the usage message describing all program options + void Usage() const; + + // return the usage string, call Usage() to directly show it to the user + wxString GetUsageString() const; + + // get the command line arguments + // ------------------------------ + + // returns true if the given switch was found + bool Found(const wxString& name) const; + + // Returns wxCMD_SWITCH_NOT_FOUND if the switch was not found at all, + // wxCMD_SWITCH_ON if it was found in normal state and wxCMD_SWITCH_OFF if + // it was found but negated (i.e. followed by "-", this can only happen for + // the switches with wxCMD_LINE_SWITCH_NEGATABLE flag). + wxCmdLineSwitchState FoundSwitch(const wxString& name) const; + + // returns true if an option taking a string value was found and stores the + // value in the provided pointer + bool Found(const wxString& name, wxString *value) const; + + // returns true if an option taking an integer value was found and stores + // the value in the provided pointer + bool Found(const wxString& name, long *value) const; + + // returns true if an option taking a double value was found and stores + // the value in the provided pointer + bool Found(const wxString& name, double *value) const; + +#if wxUSE_DATETIME + // returns true if an option taking a date value was found and stores the + // value in the provided pointer + bool Found(const wxString& name, wxDateTime *value) const; +#endif // wxUSE_DATETIME + + // gets the number of parameters found + size_t GetParamCount() const; + + // gets the value of Nth parameter (as string only for now) + wxString GetParam(size_t n = 0u) const; + + // Resets switches and options + void Reset(); + + // break down the command line in arguments + static wxArrayString + ConvertStringToArgs(const wxString& cmdline, + wxCmdLineSplitType type = wxCMD_LINE_SPLIT_DOS); + +private: + // common part of all ctors + void Init(); + + struct wxCmdLineParserData *m_data; + + wxDECLARE_NO_COPY_CLASS(wxCmdLineParser); +}; + +#else // !wxUSE_CMDLINE_PARSER + +// this function is always available (even if !wxUSE_CMDLINE_PARSER) because it +// is used by wxWin itself under Windows +class WXDLLIMPEXP_BASE wxCmdLineParser +{ +public: + static wxArrayString + ConvertStringToArgs(const wxString& cmdline, + wxCmdLineSplitType type = wxCMD_LINE_SPLIT_DOS); +}; + +#endif // wxUSE_CMDLINE_PARSER/!wxUSE_CMDLINE_PARSER + +#endif // _WX_CMDLINE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmdproc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmdproc.h new file mode 100644 index 0000000000..c6125096a0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmdproc.h @@ -0,0 +1,140 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cmdproc.h +// Purpose: undo/redo capable command processing framework +// Author: Julian Smart (extracted from docview.h by VZ) +// Modified by: +// Created: 05.11.00 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CMDPROC_H_ +#define _WX_CMDPROC_H_ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/list.h" + +class WXDLLIMPEXP_FWD_CORE wxMenu; + +// ---------------------------------------------------------------------------- +// wxCommand: a single command capable of performing itself +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCommand : public wxObject +{ +public: + wxCommand(bool canUndoIt = false, const wxString& name = wxEmptyString); + virtual ~wxCommand(){} + + // Override this to perform a command + virtual bool Do() = 0; + + // Override this to undo a command + virtual bool Undo() = 0; + + virtual bool CanUndo() const { return m_canUndo; } + virtual wxString GetName() const { return m_commandName; } + +protected: + bool m_canUndo; + wxString m_commandName; + +private: + DECLARE_CLASS(wxCommand) +}; + +// ---------------------------------------------------------------------------- +// wxCommandProcessor: wxCommand manager +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCommandProcessor : public wxObject +{ +public: + // if max number of commands is -1, it is unlimited + wxCommandProcessor(int maxCommands = -1); + virtual ~wxCommandProcessor(); + + // Pass a command to the processor. The processor calls Do(); if + // successful, is appended to the command history unless storeIt is false. + virtual bool Submit(wxCommand *command, bool storeIt = true); + + // just store the command without executing it + virtual void Store(wxCommand *command); + + virtual bool Undo(); + virtual bool Redo(); + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + // Initialises the current command and menu strings. + virtual void Initialize(); + + // Sets the Undo/Redo menu strings for the current menu. + virtual void SetMenuStrings(); + + // Gets the current Undo menu label. + wxString GetUndoMenuLabel() const; + + // Gets the current Undo menu label. + wxString GetRedoMenuLabel() const; + +#if wxUSE_MENUS + // Call this to manage an edit menu. + void SetEditMenu(wxMenu *menu) { m_commandEditMenu = menu; } + wxMenu *GetEditMenu() const { return m_commandEditMenu; } +#endif // wxUSE_MENUS + + // command list access + wxList& GetCommands() { return m_commands; } + const wxList& GetCommands() const { return m_commands; } + wxCommand *GetCurrentCommand() const + { + return (wxCommand *)(m_currentCommand ? m_currentCommand->GetData() : NULL); + } + int GetMaxCommands() const { return m_maxNoCommands; } + virtual void ClearCommands(); + + // Has the current project been changed? + virtual bool IsDirty() const; + + // Mark the current command as the one where the last save took place + void MarkAsSaved() + { + m_lastSavedCommand = m_currentCommand; + } + + + // By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y" + const wxString& GetUndoAccelerator() const { return m_undoAccelerator; } + const wxString& GetRedoAccelerator() const { return m_redoAccelerator; } + + void SetUndoAccelerator(const wxString& accel) { m_undoAccelerator = accel; } + void SetRedoAccelerator(const wxString& accel) { m_redoAccelerator = accel; } + +protected: + // for further flexibility, command processor doesn't call wxCommand::Do() + // and Undo() directly but uses these functions which can be overridden in + // the derived class + virtual bool DoCommand(wxCommand& cmd); + virtual bool UndoCommand(wxCommand& cmd); + + int m_maxNoCommands; + wxList m_commands; + wxList::compatibility_iterator m_currentCommand, + m_lastSavedCommand; + +#if wxUSE_MENUS + wxMenu* m_commandEditMenu; +#endif // wxUSE_MENUS + + wxString m_undoAccelerator; + wxString m_redoAccelerator; + +private: + DECLARE_DYNAMIC_CLASS(wxCommandProcessor) + wxDECLARE_NO_COPY_CLASS(wxCommandProcessor); +}; + +#endif // _WX_CMDPROC_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmndata.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmndata.h new file mode 100644 index 0000000000..c8e345af56 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cmndata.h @@ -0,0 +1,311 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cmndata.h +// Purpose: Common GDI data classes +// Author: Julian Smart and others +// Modified by: +// Created: 01/02/97 +// Copyright: (c) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CMNDATA_H_BASE_ +#define _WX_CMNDATA_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/gdicmn.h" + +#if wxUSE_STREAMS +#include "wx/stream.h" +#endif + +class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase; + +/* + * wxPrintData + * Encapsulates printer information (not printer dialog information) + */ + +enum wxPrintBin +{ + wxPRINTBIN_DEFAULT, + + wxPRINTBIN_ONLYONE, + wxPRINTBIN_LOWER, + wxPRINTBIN_MIDDLE, + wxPRINTBIN_MANUAL, + wxPRINTBIN_ENVELOPE, + wxPRINTBIN_ENVMANUAL, + wxPRINTBIN_AUTO, + wxPRINTBIN_TRACTOR, + wxPRINTBIN_SMALLFMT, + wxPRINTBIN_LARGEFMT, + wxPRINTBIN_LARGECAPACITY, + wxPRINTBIN_CASSETTE, + wxPRINTBIN_FORMSOURCE, + + wxPRINTBIN_USER +}; + +const int wxPRINTMEDIA_DEFAULT = 0; + +class WXDLLIMPEXP_CORE wxPrintData: public wxObject +{ +public: + wxPrintData(); + wxPrintData(const wxPrintData& printData); + virtual ~wxPrintData(); + + int GetNoCopies() const { return m_printNoCopies; } + bool GetCollate() const { return m_printCollate; } + wxPrintOrientation GetOrientation() const { return m_printOrientation; } + bool IsOrientationReversed() const { return m_printOrientationReversed; } + + // Is this data OK for showing the print dialog? + bool Ok() const { return IsOk(); } + bool IsOk() const ; + + const wxString& GetPrinterName() const { return m_printerName; } + bool GetColour() const { return m_colour; } + wxDuplexMode GetDuplex() const { return m_duplexMode; } + wxPaperSize GetPaperId() const { return m_paperId; } + const wxSize& GetPaperSize() const { return m_paperSize; } // Not used yet: confusable with paper size + // in wxPageSetupDialogData + wxPrintQuality GetQuality() const { return m_printQuality; } + wxPrintBin GetBin() const { return m_bin; } + wxPrintMode GetPrintMode() const { return m_printMode; } + int GetMedia() const { return m_media; } + + void SetNoCopies(int v) { m_printNoCopies = v; } + void SetCollate(bool flag) { m_printCollate = flag; } + + // Please use the overloaded method below + wxDEPRECATED_INLINE(void SetOrientation(int orient), + m_printOrientation = (wxPrintOrientation)orient; ) + void SetOrientation(wxPrintOrientation orient) { m_printOrientation = orient; } + void SetOrientationReversed(bool reversed) { m_printOrientationReversed = reversed; } + + void SetPrinterName(const wxString& name) { m_printerName = name; } + void SetColour(bool colour) { m_colour = colour; } + void SetDuplex(wxDuplexMode duplex) { m_duplexMode = duplex; } + void SetPaperId(wxPaperSize sizeId) { m_paperId = sizeId; } + void SetPaperSize(const wxSize& sz) { m_paperSize = sz; } + void SetQuality(wxPrintQuality quality) { m_printQuality = quality; } + void SetBin(wxPrintBin bin) { m_bin = bin; } + void SetMedia(int media) { m_media = media; } + void SetPrintMode(wxPrintMode printMode) { m_printMode = printMode; } + + wxString GetFilename() const { return m_filename; } + void SetFilename( const wxString &filename ) { m_filename = filename; } + + wxPrintData& operator=(const wxPrintData& data); + + char* GetPrivData() const { return m_privData; } + int GetPrivDataLen() const { return m_privDataLen; } + void SetPrivData( char *privData, int len ); + + + // Convert between wxPrintData and native data + void ConvertToNative(); + void ConvertFromNative(); + // Holds the native print data + wxPrintNativeDataBase *GetNativeData() const { return m_nativeData; } + +private: + wxPrintBin m_bin; + int m_media; + wxPrintMode m_printMode; + + int m_printNoCopies; + wxPrintOrientation m_printOrientation; + bool m_printOrientationReversed; + bool m_printCollate; + + wxString m_printerName; + bool m_colour; + wxDuplexMode m_duplexMode; + wxPrintQuality m_printQuality; + wxPaperSize m_paperId; + wxSize m_paperSize; + + wxString m_filename; + + char* m_privData; + int m_privDataLen; + + wxPrintNativeDataBase *m_nativeData; + +private: + DECLARE_DYNAMIC_CLASS(wxPrintData) +}; + +/* + * wxPrintDialogData + * Encapsulates information displayed and edited in the printer dialog box. + * Contains a wxPrintData object which is filled in according to the values retrieved + * from the dialog. + */ + +class WXDLLIMPEXP_CORE wxPrintDialogData: public wxObject +{ +public: + wxPrintDialogData(); + wxPrintDialogData(const wxPrintDialogData& dialogData); + wxPrintDialogData(const wxPrintData& printData); + virtual ~wxPrintDialogData(); + + int GetFromPage() const { return m_printFromPage; } + int GetToPage() const { return m_printToPage; } + int GetMinPage() const { return m_printMinPage; } + int GetMaxPage() const { return m_printMaxPage; } + int GetNoCopies() const { return m_printNoCopies; } + bool GetAllPages() const { return m_printAllPages; } + bool GetSelection() const { return m_printSelection; } + bool GetCollate() const { return m_printCollate; } + bool GetPrintToFile() const { return m_printToFile; } + + void SetFromPage(int v) { m_printFromPage = v; } + void SetToPage(int v) { m_printToPage = v; } + void SetMinPage(int v) { m_printMinPage = v; } + void SetMaxPage(int v) { m_printMaxPage = v; } + void SetNoCopies(int v) { m_printNoCopies = v; } + void SetAllPages(bool flag) { m_printAllPages = flag; } + void SetSelection(bool flag) { m_printSelection = flag; } + void SetCollate(bool flag) { m_printCollate = flag; } + void SetPrintToFile(bool flag) { m_printToFile = flag; } + + void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; } + void EnableSelection(bool flag) { m_printEnableSelection = flag; } + void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; } + void EnableHelp(bool flag) { m_printEnableHelp = flag; } + + bool GetEnablePrintToFile() const { return m_printEnablePrintToFile; } + bool GetEnableSelection() const { return m_printEnableSelection; } + bool GetEnablePageNumbers() const { return m_printEnablePageNumbers; } + bool GetEnableHelp() const { return m_printEnableHelp; } + + // Is this data OK for showing the print dialog? + bool Ok() const { return IsOk(); } + bool IsOk() const { return m_printData.IsOk() ; } + + wxPrintData& GetPrintData() { return m_printData; } + void SetPrintData(const wxPrintData& printData) { m_printData = printData; } + + void operator=(const wxPrintDialogData& data); + void operator=(const wxPrintData& data); // Sets internal m_printData member + +private: + int m_printFromPage; + int m_printToPage; + int m_printMinPage; + int m_printMaxPage; + int m_printNoCopies; + bool m_printAllPages; + bool m_printCollate; + bool m_printToFile; + bool m_printSelection; + bool m_printEnableSelection; + bool m_printEnablePageNumbers; + bool m_printEnableHelp; + bool m_printEnablePrintToFile; + wxPrintData m_printData; + +private: + DECLARE_DYNAMIC_CLASS(wxPrintDialogData) +}; + +/* +* This is the data used (and returned) by the wxPageSetupDialog. +*/ + +// Compatibility with old name +#define wxPageSetupData wxPageSetupDialogData + +class WXDLLIMPEXP_CORE wxPageSetupDialogData: public wxObject +{ +public: + wxPageSetupDialogData(); + wxPageSetupDialogData(const wxPageSetupDialogData& dialogData); + wxPageSetupDialogData(const wxPrintData& printData); + virtual ~wxPageSetupDialogData(); + + wxSize GetPaperSize() const { return m_paperSize; } + wxPaperSize GetPaperId() const { return m_printData.GetPaperId(); } + wxPoint GetMinMarginTopLeft() const { return m_minMarginTopLeft; } + wxPoint GetMinMarginBottomRight() const { return m_minMarginBottomRight; } + wxPoint GetMarginTopLeft() const { return m_marginTopLeft; } + wxPoint GetMarginBottomRight() const { return m_marginBottomRight; } + + bool GetDefaultMinMargins() const { return m_defaultMinMargins; } + bool GetEnableMargins() const { return m_enableMargins; } + bool GetEnableOrientation() const { return m_enableOrientation; } + bool GetEnablePaper() const { return m_enablePaper; } + bool GetEnablePrinter() const { return m_enablePrinter; } + bool GetDefaultInfo() const { return m_getDefaultInfo; } + bool GetEnableHelp() const { return m_enableHelp; } + + // Is this data OK for showing the page setup dialog? + bool Ok() const { return IsOk(); } + bool IsOk() const { return m_printData.IsOk() ; } + + // If a corresponding paper type is found in the paper database, will set the m_printData + // paper size id member as well. + void SetPaperSize(const wxSize& sz); + + void SetPaperId(wxPaperSize id) { m_printData.SetPaperId(id); } + + // Sets the wxPrintData id, plus the paper width/height if found in the paper database. + void SetPaperSize(wxPaperSize id); + + void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; } + void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; } + void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; } + void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; } + void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; } + void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; } + + void EnableMargins(bool flag) { m_enableMargins = flag; } + void EnableOrientation(bool flag) { m_enableOrientation = flag; } + void EnablePaper(bool flag) { m_enablePaper = flag; } + void EnablePrinter(bool flag) { m_enablePrinter = flag; } + void EnableHelp(bool flag) { m_enableHelp = flag; } + + // Use paper size defined in this object to set the wxPrintData + // paper id + void CalculateIdFromPaperSize(); + + // Use paper id in wxPrintData to set this object's paper size + void CalculatePaperSizeFromId(); + + wxPageSetupDialogData& operator=(const wxPageSetupDialogData& data); + wxPageSetupDialogData& operator=(const wxPrintData& data); + + wxPrintData& GetPrintData() { return m_printData; } + const wxPrintData& GetPrintData() const { return m_printData; } + void SetPrintData(const wxPrintData& printData); + +private: + wxSize m_paperSize; // The dimensions selected by the user (on return, same as in wxPrintData?) + wxPoint m_minMarginTopLeft; + wxPoint m_minMarginBottomRight; + wxPoint m_marginTopLeft; + wxPoint m_marginBottomRight; + bool m_defaultMinMargins; + bool m_enableMargins; + bool m_enableOrientation; + bool m_enablePaper; + bool m_enablePrinter; + bool m_getDefaultInfo; // Equiv. to PSD_RETURNDEFAULT + bool m_enableHelp; + wxPrintData m_printData; + +private: + DECLARE_DYNAMIC_CLASS(wxPageSetupDialogData) +}; + +#endif // wxUSE_PRINTING_ARCHITECTURE + +#endif +// _WX_CMNDATA_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSApplication.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSApplication.h new file mode 100644 index 0000000000..192d282782 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSApplication.h @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSApplication.h +// Purpose: wxNSApplicationDelegate definition +// Author: David Elliott +// Modified by: +// Created: 2004/01/26 +// Copyright: (c) 2003,2004 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_NSAPPLICATION_H__ +#define _WX_COCOA_NSAPPLICATION_H__ + +#include "wx/cocoa/objc/objc_uniquifying.h" + +// ======================================================================== +// wxNSApplicationDelegate +// ======================================================================== +/*! + @class wxNSApplicationDelegate + @discussion Implements an NSApplication delegate which can respond to messages sent by Cocoa to change Cocoa's behaviour. + + wxCocoa will set a singleton instance of this class as the NSApplication delegate upon startup unless wxWidgets is running + in a "plugin" manner in which case it would not be appropriate to do this. + + Although Cocoa will send notifications to the delegate it is also possible to register a different object to listen for + them. Because we want to support the plugin case, we use a separate notification observer object when we can. +*/ +@interface wxNSApplicationDelegate : NSObject +{ +} + +// Delegate methods +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication; +@end // interface wxNSApplicationDelegate : NSObject +WX_DECLARE_GET_OBJC_CLASS(wxNSApplicationDelegate,NSObject) + +// ======================================================================== +// wxNSApplicationObserver +// ======================================================================== +/*! + @class wxNSApplicationObserver + @discussion Observes most notifications sent by the NSApplication singleton. + + wxCocoa will create a singleton instance of this class upon startup and register it with the default notification center to + listen for several events sent by the NSApplication singleton. + + Because there can be any number of notification observers, this method allows wxCocoa to function properly even when it is + running as a plugin of some other (most likely not wxWidgets) application. +*/ +@interface wxNSApplicationObserver : NSObject +{ +} + +// Methods defined as (but not used here) as NSApplication delegate methods. +- (void)applicationWillBecomeActive:(NSNotification *)notification; +- (void)applicationDidBecomeActive:(NSNotification *)notification; +- (void)applicationWillResignActive:(NSNotification *)notification; +- (void)applicationDidResignActive:(NSNotification *)notification; +- (void)applicationWillUpdate:(NSNotification *)notification; + +// Other notifications +- (void)controlTintChanged:(NSNotification *)notification; +@end // interface wxNSApplicationObserver : NSObject +WX_DECLARE_GET_OBJC_CLASS(wxNSApplicationObserver,NSObject) + +#endif //ndef _WX_COCOA_NSAPPLICATION_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSBox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSBox.h new file mode 100644 index 0000000000..39cbe3de5f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSBox.h @@ -0,0 +1,25 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSBox.h +// Purpose: wxCocoaNSBox class +// Author: David Elliott +// Modified by: +// Created: 2003/03/19 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_NSBOX_H__ +#define __WX_COCOA_NSBOX_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" + +WX_DECLARE_OBJC_HASHMAP(NSBox); +class wxCocoaNSBox +{ + WX_DECLARE_OBJC_INTERFACE(NSBox) +protected: +// virtual void Cocoa_didChangeText(void) = 0; +}; + +#endif // _WX_COCOA_NSBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSButton.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSButton.h new file mode 100644 index 0000000000..7e32aac07d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSButton.h @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSButton.h +// Purpose: wxCocoaNSButton class +// Author: David Elliott +// Modified by: +// Created: 2002/12/09 +// Copyright: (c) 2002-2004 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_NSBUTTON_H__ +#define _WX_COCOA_NSBUTTON_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" +#include "wx/cocoa/ObjcRef.h" + +WX_DECLARE_OBJC_HASHMAP(NSButton); + +class wxCocoaNSButton +{ + WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSButton); +public: + void AssociateNSButton(WX_NSButton cocoaNSButton); + void DisassociateNSButton(WX_NSButton cocoaNSButton) + { + if(cocoaNSButton) + sm_cocoaHash.erase(cocoaNSButton); + } + + virtual void Cocoa_wxNSButtonAction(void) = 0; + virtual ~wxCocoaNSButton() { } + +protected: + static const wxObjcAutoRefFromAlloc sm_cocoaTarget; +}; + +#endif // _WX_COCOA_NSBUTTON_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSControl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSControl.h new file mode 100644 index 0000000000..f921c337d1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSControl.h @@ -0,0 +1,31 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSControl.h +// Purpose: wxCocoaNSControl class +// Author: David Elliott +// Modified by: +// Created: 2003/02/15 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_NSCONTROL_H__ +#define __WX_COCOA_NSCONTROL_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" + +WX_DECLARE_OBJC_HASHMAP(NSControl); +class wxCocoaNSControl +{ + WX_DECLARE_OBJC_INTERFACE(NSControl) +public: + virtual void CocoaTarget_action() {} +// virtual void Cocoa_didChangeText(void) = 0; + + virtual ~wxCocoaNSControl() { } + +protected: + static struct objc_object *sm_cocoaTarget; +}; + +#endif // _WX_COCOA_NSCONTROL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSMenu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSMenu.h new file mode 100644 index 0000000000..a413ad45a6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSMenu.h @@ -0,0 +1,48 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSMenu.h +// Purpose: wxCocoaNSMenu class +// Author: David Elliott +// Modified by: +// Created: 2002/12/09 +// Copyright: (c) 2002 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_NSMENU_H__ +#define __WX_COCOA_NSMENU_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" + +WX_DECLARE_OBJC_HASHMAP(NSMenu); + +// ======================================================================== +// wxCocoaNSMenu +// ======================================================================== + +class wxCocoaNSMenu +{ + WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSMenu) +public: + void AssociateNSMenu(WX_NSMenu cocoaNSMenu, unsigned int flags = 0); + void DisassociateNSMenu(WX_NSMenu cocoaNSMenu); + enum + { OBSERVE_DidAddItem = 0x01 + , OBSERVE_DidChangeItem = 0x02 + , OBSERVE_DidRemoveItem = 0x04 + , OBSERVE_DidSendAction = 0x08 + , OBSERVE_WillSendAction = 0x10 + }; + virtual void Cocoa_dealloc() {} + virtual void CocoaNotification_menuDidAddItem(WX_NSNotification WXUNUSED(notification)) {} + virtual void CocoaNotification_menuDidChangeItem(WX_NSNotification WXUNUSED(notification)) {} + virtual void CocoaNotification_menuDidRemoveItem(WX_NSNotification WXUNUSED(notification)) {} + virtual void CocoaNotification_menuDidSendAction(WX_NSNotification WXUNUSED(notification)) {} + virtual void CocoaNotification_menuWillSendAction(WX_NSNotification WXUNUSED(notification)) {} + virtual ~wxCocoaNSMenu() { } + +protected: + static struct objc_object *sm_cocoaObserver; +}; + +#endif // _WX_COCOA_NSMENU_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSPanel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSPanel.h new file mode 100644 index 0000000000..25acf54c42 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSPanel.h @@ -0,0 +1,24 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSPanel.h +// Purpose: wxCocoaNSPanel class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_NSPANEL_H__ +#define __WX_COCOA_NSPANEL_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" + +WX_DECLARE_OBJC_HASHMAP(NSPanel); + +class wxCocoaNSPanel +{ + WX_DECLARE_OBJC_INTERFACE(NSPanel) +}; + +#endif // _WX_COCOA_NSPANEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSScroller.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSScroller.h new file mode 100644 index 0000000000..3cafc5815a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSScroller.h @@ -0,0 +1,40 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSScroller.h +// Purpose: wxCocoaNSScroller class +// Author: David Elliott +// Modified by: +// Created: 2004/04/27 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_NSSCROLLER_H__ +#define _WX_COCOA_NSSCROLLER_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" +#include "wx/cocoa/ObjcRef.h" + +DECLARE_WXCOCOA_OBJC_CLASS(NSScroller); + +WX_DECLARE_OBJC_HASHMAP(NSScroller); + +class wxCocoaNSScroller +{ + WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSScroller); +public: + void AssociateNSScroller(WX_NSScroller cocoaNSScroller); + void DisassociateNSScroller(WX_NSScroller cocoaNSScroller) + { + if(cocoaNSScroller) + sm_cocoaHash.erase(cocoaNSScroller); + } + + virtual void Cocoa_wxNSScrollerAction(void) = 0; + virtual ~wxCocoaNSScroller() { } + +protected: + static const wxObjcAutoRefFromAlloc sm_cocoaTarget; +}; + +#endif // _WX_COCOA_NSSCROLLER_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSSlider.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSSlider.h new file mode 100644 index 0000000000..0f278984ee --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSSlider.h @@ -0,0 +1,46 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSSlider.h +// Purpose: wxCocoaNSSlider class +// Author: Mark Oxenham +// Modified by: David Elliott +// Created: 2007/08/10 +// Copyright: (c) 2007 Software 2000 Ltd. All rights reserved. +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WXNSSLIDER_H_ +#define _WXNSSLIDER_H_ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" +#include "wx/cocoa/ObjcRef.h" + +DECLARE_WXCOCOA_OBJC_CLASS(NSSlider); + +WX_DECLARE_OBJC_HASHMAP(NSSlider); + +// For when we're not in Objective-C mode: +typedef struct objc_selector *SEL; + +class wxCocoaNSSliderLastSelectorChanger; + +class wxCocoaNSSlider +{ + friend class wxCocoaNSSliderLastSelectorChanger; + WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSSlider); +public: + void AssociateNSSlider(WX_NSSlider cocoaNSSlider); + void DisassociateNSSlider(WX_NSSlider cocoaNSSlider); + + virtual void CocoaNotification_startTracking(WX_NSNotification notification) = 0; + virtual void CocoaNotification_continueTracking(WX_NSNotification notification) = 0; + virtual void CocoaNotification_stopTracking(WX_NSNotification notification) = 0; + + static SEL GetLastResponderSelector() + { return sm_lastResponderSelector; } +protected: + virtual ~wxCocoaNSSlider() { } + static SEL sm_lastResponderSelector; +}; + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTabView.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTabView.h new file mode 100644 index 0000000000..8c4320d0ae --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTabView.h @@ -0,0 +1,35 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSTabView.h +// Purpose: wxCocoaNSTabView class +// Author: David Elliott +// Modified by: +// Created: 2004/04/08 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_NSTABVIEW_H__ +#define _WX_COCOA_NSTABVIEW_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" +#include "wx/cocoa/ObjcRef.h" + +DECLARE_WXCOCOA_OBJC_CLASS(NSTabView); +DECLARE_WXCOCOA_OBJC_CLASS(NSTabViewItem); +WX_DECLARE_OBJC_HASHMAP(NSTabView); +class wxCocoaNSTabView +{ + WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSTabView) +public: + void AssociateNSTabView(WX_NSTabView cocoaNSTabView); + void DisassociateNSTabView(WX_NSTabView ocoaNSTabView); + virtual void CocoaDelegate_tabView_didSelectTabViewItem(WX_NSTabViewItem tabviewItem) = 0; + virtual bool CocoaDelegate_tabView_shouldSelectTabViewItem(WX_NSTabViewItem tabviewItem) = 0; + virtual ~wxCocoaNSTabView() { } + +protected: + static wxObjcAutoRefFromAlloc sm_cocoaDelegate; +}; + +#endif // _WX_COCOA_NSTABVIEW_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTableDataSource.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTableDataSource.h new file mode 100644 index 0000000000..39e96a8343 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTableDataSource.h @@ -0,0 +1,34 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSTableDataSource.h +// Purpose: wxCocoaNSTableDataSource Objective-C class +// Author: David Elliott +// Modified by: +// Created: 2003/08/05 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_NSTABLEDATASOURCE_H__ +#define __WX_COCOA_NSTABLEDATASOURCE_H__ + +#include "wx/cocoa/objc/objc_uniquifying.h" + +#import + +// ============================================================================ +// @class wxCocoaNSTableDataSource +// ============================================================================ +@interface wxCocoaNSTableDataSource : NSObject +{ +} + +// NSTableDataSource is a loosely defined protocol consisting of the +// following two message implementations +- (int)numberOfRowsInTableView: (NSTableView *)tableView; +- (id)tableView:(NSTableView *)tableView + objectValueForTableColumn: (NSTableColumn *)tableColumn + row: (int)rowIndex; +@end // wxCocoaNSTableDataSource +WX_DECLARE_GET_OBJC_CLASS(wxCocoaNSTableDataSource,NSObject) + +#endif // _WX_COCOA_NSTABLEDATASOURCE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTableView.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTableView.h new file mode 100644 index 0000000000..749a844d03 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTableView.h @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSTableView.h +// Purpose: wxCocoaNSTableView class +// Author: David Elliott +// Modified by: +// Created: 2003/08/05 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_NSTABLEVIEW_H__ +#define __WX_COCOA_NSTABLEVIEW_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" + +WX_DECLARE_OBJC_HASHMAP(NSTableView); + +class wxCocoaNSTableView +{ + WX_DECLARE_OBJC_INTERFACE(NSTableView) +public: + virtual int CocoaDataSource_numberOfRows() = 0; + virtual struct objc_object* CocoaDataSource_objectForTableColumn( + WX_NSTableColumn tableColumn, int rowIndex) = 0; + virtual ~wxCocoaNSTableView() { } +}; + +#endif // _WX_COCOA_NSTABLEVIEW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTextField.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTextField.h new file mode 100644 index 0000000000..5632318677 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSTextField.h @@ -0,0 +1,26 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSTextField.h +// Purpose: wxCocoaNSTextField class +// Author: David Elliott +// Modified by: +// Created: 2002/12/09 +// Copyright: (c) 2002 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_NSTEXTFIELD_H__ +#define __WX_COCOA_NSTEXTFIELD_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" + +WX_DECLARE_OBJC_HASHMAP(NSTextField); +class wxCocoaNSTextField +{ + WX_DECLARE_OBJC_INTERFACE(NSTextField) +protected: + virtual void Cocoa_didChangeText(void) = 0; + virtual ~wxCocoaNSTextField() { } +}; + +#endif // _WX_COCOA_NSTEXTFIELD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSView.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSView.h new file mode 100644 index 0000000000..3095fb1738 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSView.h @@ -0,0 +1,80 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSView.h +// Purpose: wxCocoaNSView class +// Author: David Elliott +// Modified by: +// Created: 2003/02/15 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_NSVIEW_H__ +#define __WX_COCOA_NSVIEW_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" + +#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) +typedef struct CGRect NSRect; +#else +typedef struct _NSRect NSRect; +#endif + +struct objc_object; + +class wxWindow; + +WX_DECLARE_OBJC_HASHMAP(NSView); +class wxCocoaNSView +{ +/* NSView is a rather special case and requires some extra attention */ + WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSView) +public: + void AssociateNSView(WX_NSView cocoaNSView); + void DisassociateNSView(WX_NSView cocoaNSView); +protected: + static struct objc_object *sm_cocoaObserver; +public: + virtual wxWindow* GetWxWindow() const + { return NULL; } + virtual void Cocoa_FrameChanged(void) = 0; + virtual void Cocoa_synthesizeMouseMoved(void) = 0; + virtual bool Cocoa_acceptsFirstMouse(bool &WXUNUSED(acceptsFirstMouse), WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_drawRect(const NSRect &WXUNUSED(rect)) + { return false; } + virtual bool Cocoa_mouseDown(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_mouseDragged(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_mouseUp(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_mouseMoved(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_mouseEntered(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_mouseExited(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_rightMouseDown(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_rightMouseDragged(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_rightMouseUp(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_otherMouseDown(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_otherMouseDragged(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_otherMouseUp(WX_NSEvent WXUNUSED(theEvent)) + { return false; } + virtual bool Cocoa_resetCursorRects() + { return false; } + virtual bool Cocoa_viewDidMoveToWindow() + { return false; } + virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow WXUNUSED(newWindow)) + { return false; } + virtual ~wxCocoaNSView() { } +}; + +#endif + // __WX_COCOA_NSVIEW_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSWindow.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSWindow.h new file mode 100644 index 0000000000..228ffe3ed0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/NSWindow.h @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/NSWindow.h +// Purpose: wxCocoaNSWindow class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_NSWINDOW_H__ +#define __WX_COCOA_NSWINDOW_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" + +WX_DECLARE_OBJC_HASHMAP(NSWindow); + +class WXDLLIMPEXP_FWD_CORE wxMenuBar; +class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowCocoa; + +DECLARE_WXCOCOA_OBJC_CLASS(NSMenuItem); +DECLARE_WXCOCOA_OBJC_CLASS(wxNSWindowDelegate); + +class WXDLLIMPEXP_CORE wxCocoaNSWindow +{ +/* NSWindow is a rather special case and requires some extra attention */ + WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSWindow) +public: + void AssociateNSWindow(WX_NSWindow cocoaNSWindow); + void DisassociateNSWindow(WX_NSWindow cocoaNSWindow); + virtual bool Cocoa_canBecomeKeyWindow(bool &WXUNUSED(canBecome)) + { return false; } + virtual bool Cocoa_canBecomeMainWindow(bool &WXUNUSED(canBecome)) + { return false; } + virtual bool CocoaDelegate_windowShouldClose(void) = 0; + virtual void CocoaDelegate_windowWillClose(void) = 0; + virtual void CocoaDelegate_windowDidBecomeKey(void) { } + virtual void CocoaDelegate_windowDidResignKey(void) { } + virtual void CocoaDelegate_windowDidBecomeMain(void) { } + virtual void CocoaDelegate_windowDidResignMain(void) { } + virtual void CocoaDelegate_wxMenuItemAction(WX_NSMenuItem menuItem) = 0; + virtual bool CocoaDelegate_validateMenuItem(WX_NSMenuItem menuItem) = 0; + virtual wxMenuBar* GetAppMenuBar(wxCocoaNSWindow *win); + inline wxTopLevelWindowCocoa* GetWxTopLevelWindowCocoa() + { return m_wxTopLevelWindowCocoa; } +protected: + wxCocoaNSWindow(wxTopLevelWindowCocoa *tlw = NULL); + virtual ~wxCocoaNSWindow(); + WX_wxNSWindowDelegate m_cocoaDelegate; + wxTopLevelWindowCocoa *m_wxTopLevelWindowCocoa; +}; + +#endif // _WX_COCOA_NSWINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/ObjcAssociate.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/ObjcAssociate.h new file mode 100644 index 0000000000..a6bf6e2ce4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/ObjcAssociate.h @@ -0,0 +1,77 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/ObjcAssociate.h +// Purpose: Associates an Objective-C class with a C++ class +// Author: David Elliott +// Modified by: +// Created: 2002/12/03 +// Copyright: (c) 2002 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_OBJC_ASSOCIATE_H__ +#define __WX_COCOA_OBJC_ASSOCIATE_H__ + +/*------------------------------------------------------------------------- +Basic hashmap stuff, used by everything +-------------------------------------------------------------------------*/ +#define WX_DECLARE_OBJC_HASHMAP(ObjcClass) \ +class wxCocoa##ObjcClass; \ +WX_DECLARE_HASH_MAP(WX_##ObjcClass,wxCocoa##ObjcClass*,wxPointerHash,wxPointerEqual,wxCocoa##ObjcClass##Hash) + +#define WX_DECLARE_OBJC_INTERFACE_HASHMAP(ObjcClass) \ +public: \ + static inline wxCocoa##ObjcClass* GetFromCocoa(WX_##ObjcClass cocoaObjcClass) \ + { \ + wxCocoa##ObjcClass##Hash::iterator iter = sm_cocoaHash.find(cocoaObjcClass); \ + if(iter!=sm_cocoaHash.end()) \ + { \ + return iter->second; \ + } \ + return NULL; \ + } \ +protected: \ + static wxCocoa##ObjcClass##Hash sm_cocoaHash; + +#define WX_IMPLEMENT_OBJC_INTERFACE_HASHMAP(ObjcClass) \ +wxCocoa##ObjcClass##Hash wxCocoa##ObjcClass::sm_cocoaHash; + + +/*------------------------------------------------------------------------- +The entire interface, including some boilerplate stuff +-------------------------------------------------------------------------*/ +#define WX_DECLARE_OBJC_INTERFACE(ObjcClass) \ +WX_DECLARE_OBJC_INTERFACE_HASHMAP(ObjcClass) \ +public: \ + inline void Associate##ObjcClass(WX_##ObjcClass cocoaObjcClass) \ + { \ + if(cocoaObjcClass) \ + sm_cocoaHash.insert(wxCocoa##ObjcClass##Hash::value_type(cocoaObjcClass,this)); \ + } \ + inline void Disassociate##ObjcClass(WX_##ObjcClass cocoaObjcClass) \ + { \ + if(cocoaObjcClass) \ + sm_cocoaHash.erase(cocoaObjcClass); \ + } + +#define WX_IMPLEMENT_OBJC_INTERFACE(ObjcClass) \ +WX_IMPLEMENT_OBJC_INTERFACE_HASHMAP(ObjcClass) + +/*------------------------------------------------------------------------- +Stuff to be used by the wxWidgets class (not the Cocoa interface) +-------------------------------------------------------------------------*/ +#define WX_DECLARE_COCOA_OWNER(ObjcClass,ObjcBase,ObjcRoot) \ +public: \ + inline WX_##ObjcClass Get##ObjcClass() { return (WX_##ObjcClass)m_cocoa##ObjcRoot; } \ + inline const WX_##ObjcClass Get##ObjcClass() const { return (WX_##ObjcClass)m_cocoa##ObjcRoot; } \ +protected: \ + void Set##ObjcClass(WX_##ObjcClass cocoaObjcClass); + +#define WX_IMPLEMENT_COCOA_OWNER(wxClass,ObjcClass,ObjcBase,ObjcRoot) \ +void wxClass::Set##ObjcClass(WX_##ObjcClass cocoaObjcClass) \ +{ \ + Disassociate##ObjcClass((WX_##ObjcClass)m_cocoa##ObjcRoot); \ + Set##ObjcBase(cocoaObjcClass); \ + Associate##ObjcClass((WX_##ObjcClass)m_cocoa##ObjcRoot); \ +} + +#endif // __WX_COCOA_OBJC_ASSOCIATE_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/ObjcRef.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/ObjcRef.h new file mode 100644 index 0000000000..d4aa6d91ec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/ObjcRef.h @@ -0,0 +1,235 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/ObjcRef.h +// Purpose: wxObjcAutoRef template class +// Author: David Elliott +// Modified by: +// Created: 2004/03/28 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_OBJCREF_H__ +#define _WX_COCOA_OBJCREF_H__ + +// Reuse wxCFRef-related code (e.g. wxCFRetain/wxCFRelease) +#include "wx/osx/core/cfref.h" + +// NOTE WELL: We can only know whether or not GC can be used when compiling Objective-C. +// Therefore we cannot implement these functions except when compiling Objective-C. +#ifdef __OBJC__ +/*! @function wxGCSafeRetain + @templatefield Type (implicit) An Objective-C class type + @arg r Pointer to Objective-C object. May be null. + @abstract Retains the Objective-C object, even when using Apple's garbage collector + @discussion + When Apple's garbage collector is enabled, the usual [obj retain] and [obj release] messages + are ignored. Instead the collector with help from compiler-generated write-barriers tracks + reachable objects. The write-barriers are generated when setting i-vars of C++ classes but + they are ignored by the garbage collector unless the C++ object is in GC-managed memory. + + The simple solution is to use CFRetain on the Objective-C object which has been enhanced in + GC mode to forcibly retain the object. In Retain/Release (RR) mode the CFRetain function has + the same effect as [obj retain]. Note that GC vs. RR is selected at runtime. + + Take care that wxGCSafeRetain must be balanced with wxGCSafeRelease and that conversely + wxGCSafeRelease must only be called on objects to balance wxGCSafeRetain. In particular when + receiving an Objective-C object from an alloc or copy method take care that you must retain + it with wxGCSafeRetain and balance the initial alloc with a standard release. + + Example: + wxGCSafeRelease(m_obj); // release current object (if any) + NSObject *obj = [[NSObject alloc] init]; + m_obj = wxGCSafeRetain(obj); + [obj release]; + + Alternatively (same effect, perhaps less clear): + wxGCSafeRelease(m_obj); // release current object (if any) + m_obj = wxGCSafeRetain([[NSObject alloc] init]); + [m_obj release]; // balance alloc + + Consider the effect on the retain count from each statement (alloc, CFRetain, release) + In RR mode: retainCount = 1, +1, -1 + In GC mode: strongRetainCount = 0, +1, -0 + + This is a template function to ensure it is used on raw pointers and never on pointer-holder + objects via implicit conversion operators. +*/ +template +inline Type * wxGCSafeRetain(Type *r) +{ +#ifdef __OBJC_GC__ + return static_cast(wxCFRetain(r)); +#else + return [r retain]; +#endif +} + +/*! @function wxGCSafeRelease + @templatefield Type (implicit) An Objective-C class type + @arg r Pointer to Objective-C object. May be null. + @abstract Balances wxGCSafeRetain. Particularly useful with the Apple Garbage Collector. + @discussion + See the wxGCSafeRetain documentation for more details. + + Example (from wxGCSafeRetain documentation): + wxGCSafeRelease(m_obj); // release current object (if any) + m_obj = wxGCSafeRetain([[NSObject alloc] init]); + [m_obj release]; // balance alloc + + When viewed from the start, m_obj ought to start as nil. However, the second time through + the wxGCSafeRelease call becomes critical as it releases the retain from the first time + through. + + In the destructor for this C++ object with the m_obj i-var you ought to do the following: + wxGCSafeRelease(m_obj); + m_obj = nil; // Not strictly needed, but safer. + + Under no circumstances should you balance an alloc or copy with a wxGCSafeRelease. +*/ +template +inline void wxGCSafeRelease(Type *r) +{ +#ifdef __OBJC_GC__ + wxCFRelease(r); +#else + [r release]; +#endif +} +#else +// NOTE: When not compiling Objective-C, declare these functions such that they can be +// used by other inline-implemented methods. Since those methods in turn will not actually +// be used from non-ObjC code the compiler ought not emit them. If it emits an out of +// line copy of those methods then presumably it will have also emitted at least one +// out of line copy of these functions from at least one Objective-C++ translation unit. +// That means the out of line implementation will be available at link time. + +template +inline Type * wxGCSafeRetain(Type *r); + +template +inline void wxGCSafeRelease(Type *r); + +#endif //def __OBJC__ + +/* +wxObjcAutoRefFromAlloc: construct a reference to an object that was +[NSObject -alloc]'ed and thus does not need a retain +wxObjcAutoRef: construct a reference to an object that was +either autoreleased or is retained by something else. +*/ + +struct objc_object; + +// We must do any calls to Objective-C from an Objective-C++ source file +class wxObjcAutoRefBase +{ +protected: + /*! @function ObjcRetain + @abstract Simply does [p retain]. + */ + static struct objc_object* ObjcRetain(struct objc_object*); + + /*! @function ObjcRelease + @abstract Simply does [p release]. + */ + static void ObjcRelease(struct objc_object*); +}; + +/*! @class wxObjcAutoRefFromAlloc + @templatefield T The type of _pointer_ (e.g. NSString*, NSRunLoop*) + @abstract Pointer-holder for Objective-C objects + @discussion + When constructing this object from a raw pointer, the pointer is assumed to have + come from an alloc-style method. That is, once you construct this object from + the pointer you must not balance your alloc with a call to release. + + This class has been carefully designed to work with both the traditional Retain/Release + and the new Garbage Collected modes. In RR-mode it will prevent the object from being + released by managing the reference count using the retain/release semantics. In GC-mode + it will use a method (currently CFRetain/CFRelease) to ensure the object will never be + finalized until this object is destroyed. + */ + +template +class wxObjcAutoRefFromAlloc: wxObjcAutoRefBase +{ +public: + wxObjcAutoRefFromAlloc(T p = 0) + : m_ptr(p) + // NOTE: this is from alloc. Do NOT retain + { + // CFRetain + // GC: Object is strongly retained and prevented from being collected + // non-GC: Simply realizes it's an Objective-C object and calls [p retain] + wxGCSafeRetain(p); + // ObjcRelease (e.g. [p release]) + // GC: Objective-C retain/release mean nothing in GC mode + // non-GC: This is a normal release call, balancing the retain + ObjcRelease(static_cast(p)); + // The overall result: + // GC: Object is strongly retained + // non-GC: Retain count is the same as it was (retain then release) + } + wxObjcAutoRefFromAlloc(const wxObjcAutoRefFromAlloc& otherRef) + : m_ptr(otherRef.m_ptr) + { wxGCSafeRetain(m_ptr); } + ~wxObjcAutoRefFromAlloc() + { wxGCSafeRelease(m_ptr); } + wxObjcAutoRefFromAlloc& operator=(const wxObjcAutoRefFromAlloc& otherRef) + { wxGCSafeRetain(otherRef.m_ptr); + wxGCSafeRelease(m_ptr); + m_ptr = otherRef.m_ptr; + return *this; + } + operator T() const + { return static_cast(m_ptr); } + T operator->() const + { return static_cast(m_ptr); } +protected: + /*! @field m_ptr The pointer to the Objective-C object + @discussion + The pointer to the Objective-C object is typed as void* to avoid compiler-generated write + barriers as would be used for implicitly __strong object pointers and to avoid the similar + read barriers as would be used for an explicitly __weak object pointer. The write barriers + are useless unless this object is located in GC-managed heap which is highly unlikely. + + Since we guarantee strong reference via CFRetain/CFRelease the write-barriers are not needed + at all, even if this object does happen to be allocated in GC-managed heap. + */ + void *m_ptr; +}; + +/*! + @class wxObjcAutoRef + @description + A pointer holder that does retain its argument. + NOTE: It is suggest that you instead use wxObjcAutoRefFromAlloc foo([aRawPointer retain]) + */ +template +class wxObjcAutoRef: public wxObjcAutoRefFromAlloc +{ +public: + /*! @method wxObjcAutoRef + @description + Uses the underlying wxObjcAutoRefFromAlloc and simply does a typical [p retain] such that + in RR-mode the object is in effectively the same retain-count state as it would have been + coming straight from an alloc method. + */ + wxObjcAutoRef(T p = 0) + : wxObjcAutoRefFromAlloc(p) + { // NOTE: ObjcRetain is correct because in GC-mode it balances ObjcRelease in our superclass constructor + // In RR mode it does retain and the superclass does retain/release thus resulting in an overall retain. + ObjcRetain(static_cast(wxObjcAutoRefFromAlloc::m_ptr)); + } + ~wxObjcAutoRef() {} + wxObjcAutoRef(const wxObjcAutoRef& otherRef) + : wxObjcAutoRefFromAlloc(otherRef) + {} + wxObjcAutoRef(const wxObjcAutoRefFromAlloc& otherRef) + : wxObjcAutoRefFromAlloc(otherRef) + {} + wxObjcAutoRef& operator=(const wxObjcAutoRef& otherRef) + { return wxObjcAutoRefFromAlloc::operator=(otherRef); } +}; + +#endif //ndef _WX_COCOA_OBJCREF_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/app.h new file mode 100644 index 0000000000..dffb0cae63 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/app.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/app.h +// Purpose: wxApp class +// Author: David Elliott +// Modified by: +// Created: 2002/11/27 +// Copyright: (c) 2002 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_APP_H_ +#define _WX_COCOA_APP_H_ + +typedef struct __CFRunLoopObserver * CFRunLoopObserverRef; +typedef const struct __CFString * CFStringRef; + +#include "wx/osx/core/cfref.h" + +// ======================================================================== +// wxApp +// ======================================================================== +// Represents the application. Derive OnInit and declare +// a new App object to start application +class WXDLLIMPEXP_CORE wxApp: public wxAppBase +{ + DECLARE_DYNAMIC_CLASS(wxApp) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxApp(); + virtual ~wxApp(); + +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +public: + inline WX_NSApplication GetNSApplication() { return m_cocoaApp; } + virtual void CocoaDelegate_applicationWillBecomeActive(); + virtual void CocoaDelegate_applicationDidBecomeActive(); + virtual void CocoaDelegate_applicationWillResignActive(); + virtual void CocoaDelegate_applicationDidResignActive(); + virtual void CocoaDelegate_applicationWillUpdate(); + virtual void CF_ObserveMainRunLoopBeforeWaiting(CFRunLoopObserverRef observer, int activity); +protected: + WX_NSApplication m_cocoaApp; + struct objc_object *m_cocoaAppDelegate; + WX_NSThread m_cocoaMainThread; + wxCFRef m_cfRunLoopIdleObserver; + wxCFRef m_cfObservedRunLoopMode; + +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // Implement wxAppBase pure virtuals + virtual void Exit(); + + virtual void WakeUpIdle(); + + virtual bool Initialize(int& argc, wxChar **argv); + virtual void CleanUp(); + virtual bool CallOnInit(); + + + virtual bool OnInit(); + virtual bool OnInitGui(); + + // Set true _before_ initializing wx to force embedded mode (no app delegate, etc.) + static bool sm_isEmbedded; +}; + +#endif // _WX_COCOA_APP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/autorelease.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/autorelease.h new file mode 100644 index 0000000000..cd5f6b3e26 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/autorelease.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/autorelease.h +// Purpose: Automatic NSAutoreleasePool functionality +// Author: David Elliott +// Modified by: +// Created: 2003/07/11 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_AUTORELEASE_H__ +#define __WX_COCOA_AUTORELEASE_H__ + +#import + +class wxAutoNSAutoreleasePool +{ +public: + wxAutoNSAutoreleasePool() + { + m_pool = [[NSAutoreleasePool alloc] init]; + } + ~wxAutoNSAutoreleasePool() + { + [m_pool release]; + } +protected: + NSAutoreleasePool *m_pool; +}; + +#endif //__WX_COCOA_AUTORELEASE_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/bitmap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/bitmap.h new file mode 100644 index 0000000000..392b50b5b9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/bitmap.h @@ -0,0 +1,164 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/bitmap.h +// Purpose: wxBitmap class +// Author: David Elliott +// Modified by: +// Created: 2003/07/19 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_BITMAP_H__ +#define __WX_COCOA_BITMAP_H__ + +#include "wx/palette.h" + +// Bitmap +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxCursor; +class WXDLLIMPEXP_FWD_CORE wxImage; +class WXDLLIMPEXP_FWD_CORE wxPixelDataBase; + +// ======================================================================== +// wxMask +// ======================================================================== + +// A mask is a 1-bit alpha bitmap used for drawing bitmaps transparently. +class WXDLLIMPEXP_CORE wxMask: public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxMask) +public: + wxMask(); + + // Construct a mask from a bitmap and a colour indicating + // the transparent area + wxMask(const wxBitmap& bitmap, const wxColour& colour); + + // Construct a mask from a bitmap and a palette index indicating + // the transparent area + wxMask(const wxBitmap& bitmap, int paletteIndex); + + // Construct a mask from a mono bitmap (copies the bitmap). + wxMask(const wxBitmap& bitmap); + + // Copy constructor + wxMask(const wxMask& src); + + virtual ~wxMask(); + + bool Create(const wxBitmap& bitmap, const wxColour& colour); + bool Create(const wxBitmap& bitmap, int paletteIndex); + bool Create(const wxBitmap& bitmap); + + // wxCocoa + inline WX_NSBitmapImageRep GetNSBitmapImageRep() + { return m_cocoaNSBitmapImageRep; } +protected: + WX_NSBitmapImageRep m_cocoaNSBitmapImageRep; +}; + + +// ======================================================================== +// wxBitmap +// ======================================================================== + +class WXDLLIMPEXP_CORE wxBitmap: public wxGDIObject, + public wxBitmapHelpers +{ +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + // Platform-specific default constructor + wxBitmap(); + // Initialize with raw data. + wxBitmap(const char bits[], int width, int height, int depth = 1); + // Initialize with XPM data + wxBitmap(const char* const* bits); + // Load a file or resource + wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); + // Construct from Cocoa's NSImage + wxBitmap(NSImage* cocoaNSImage); + // Construct from Cocoa's NSBitmapImageRep + wxBitmap(NSBitmapImageRep* cocoaNSBitmapImageRep); + // Constructor for generalised creation from data + wxBitmap(const void* data, wxBitmapType type, int width, int height, int depth = 1); + // If depth is omitted, will create a bitmap compatible with the display + wxBitmap(int width, int height, int depth = -1) + { (void)Create(width, height, depth); } + wxBitmap(const wxSize& sz, int depth = -1) + { (void)Create(sz, depth); } + // Convert from wxImage: + wxBitmap(const wxImage& image, int depth = -1) + { CreateFromImage(image, depth); } + // Convert from wxIcon + wxBitmap(const wxIcon& icon) { CopyFromIcon(icon); } + + // destructor + virtual ~wxBitmap(); + +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // Initialize from wxImage + bool CreateFromImage(const wxImage& image, int depth=-1); + + virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); + virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) + { return Create(sz.GetWidth(), sz.GetHeight(), depth); } + + bool Create(NSImage* cocoaNSImage); + bool Create(NSBitmapImageRep* cocoaNSBitmapImageRep); + virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1); + virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); + virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = NULL) const; + + // copies the contents and mask of the given (colour) icon to the bitmap + virtual bool CopyFromIcon(const wxIcon& icon); + + wxImage ConvertToImage() const; + + // get the given part of bitmap + wxBitmap GetSubBitmap( const wxRect& rect ) const; + + int GetWidth() const; + int GetHeight() const; + int GetDepth() const; + int GetQuality() const; + void SetWidth(int w); + void SetHeight(int h); + void SetDepth(int d); + void SetQuality(int q); + void SetOk(bool isOk); + + // raw bitmap access support functions + void *GetRawData(wxPixelDataBase& data, int bpp); + void UngetRawData(wxPixelDataBase& data); + + wxPalette* GetPalette() const; + void SetPalette(const wxPalette& palette); + + wxMask *GetMask() const; + void SetMask(wxMask *mask) ; + + wxBitmapType GetBitmapType() const; + + // wxCocoa + WX_NSBitmapImageRep GetNSBitmapImageRep(); + void SetNSBitmapImageRep(WX_NSBitmapImageRep bitmapImageRep); + WX_NSImage GetNSImage(bool useMask) const; + + static void InitStandardHandlers() { } + static void CleanUpHandlers() { } + +protected: + wxGDIRefData *CreateGDIRefData() const; + wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxBitmap) +}; + + +#endif // __WX_COCOA_BITMAP_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/bmpbuttn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/bmpbuttn.h new file mode 100644 index 0000000000..10a1394872 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/bmpbuttn.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/bmpbuttn.h +// Purpose: wxBitmapButton class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_BMPBUTTN_H__ +#define __WX_COCOA_BMPBUTTN_H__ + +#include "wx/cocoa/NSButton.h" + +// ======================================================================== +// wxBitmapButton +// ======================================================================== +class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase +{ + DECLARE_DYNAMIC_CLASS(wxBitmapButton) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxBitmapButton() { } + wxBitmapButton(wxWindow *parent, wxWindowID winid, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Create(parent, winid, bitmap, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + virtual ~wxBitmapButton(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + virtual void Cocoa_wxNSButtonAction(void); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // The wxButton::DoGetBestSize is not correct for bitmap buttons + wxSize DoGetBestSize() const + { return wxButtonBase::DoGetBestSize(); } +}; + +#endif // __WX_COCOA_BMPBUTTN_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/brush.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/brush.h new file mode 100644 index 0000000000..d67294beac --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/brush.h @@ -0,0 +1,70 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/brush.h +// Purpose: wxBrush class +// Author: David Elliott +// Modified by: +// Created: 2003/07/03 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_BRUSH_H__ +#define __WX_COCOA_BRUSH_H__ + +#include "wx/gdicmn.h" +#include "wx/gdiobj.h" +#include "wx/bitmap.h" + +class WXDLLIMPEXP_FWD_CORE wxBrush; + +// ======================================================================== +// wxBrush +// ======================================================================== +class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase +{ + DECLARE_DYNAMIC_CLASS(wxBrush) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxBrush(); + wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) ); +#endif + wxBrush(const wxBitmap& stipple); + virtual ~wxBrush(); + +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ + virtual void SetColour(const wxColour& col) ; + virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ; + virtual void SetStyle(wxBrushStyle style) ; + virtual void SetStipple(const wxBitmap& stipple) ; + + // comparison + bool operator == (const wxBrush& brush) const + { return m_refData == brush.m_refData; } + bool operator != (const wxBrush& brush) const + { return m_refData != brush.m_refData; } + + // accessors + wxColour GetColour() const; + virtual wxBrushStyle GetStyle() const; + wxBitmap *GetStipple() const; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxBrushStyle)style); } +#endif + + // wxCocoa + WX_NSColor GetNSColor(); + +protected: + wxGDIRefData *CreateGDIRefData() const; + wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; +}; + +#endif // __WX_COCOA_BRUSH_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/button.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/button.h new file mode 100644 index 0000000000..d58d0fb6bd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/button.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/button.h +// Purpose: wxButton class +// Author: David Elliott +// Modified by: +// Created: 2002/12/29 +// Copyright: (c) 2002 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_BUTTON_H__ +#define __WX_COCOA_BUTTON_H__ + +#include "wx/cocoa/NSButton.h" + +// ======================================================================== +// wxButton +// ======================================================================== +class WXDLLIMPEXP_CORE wxButton : public wxButtonBase, protected wxCocoaNSButton +{ + DECLARE_DYNAMIC_CLASS(wxButton) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxButton() { } + wxButton(wxWindow *parent, wxWindowID winid, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Create(parent, winid, label, pos, size, style, validator, name); + } + + + bool Create(wxWindow *parent, wxWindowID winid, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + virtual ~wxButton(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + virtual void Cocoa_wxNSButtonAction(void); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + wxString GetLabel() const; + void SetLabel(const wxString& label); + wxSize DoGetBestSize() const; +}; + +#endif + // __WX_COCOA_BUTTON_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/checkbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/checkbox.h new file mode 100644 index 0000000000..ba811c54e8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/checkbox.h @@ -0,0 +1,68 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/checkbox.h +// Purpose: wxCheckBox class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_CHECKBOX_H__ +#define __WX_COCOA_CHECKBOX_H__ + +#include "wx/cocoa/NSButton.h" + +// ======================================================================== +// wxCheckBox +// ======================================================================== +class WXDLLIMPEXP_CORE wxCheckBox: public wxCheckBoxBase , protected wxCocoaNSButton +{ + DECLARE_DYNAMIC_CLASS(wxCheckBox) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxCheckBox() { } + wxCheckBox(wxWindow *parent, wxWindowID winid, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, winid, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + virtual ~wxCheckBox(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + virtual void Cocoa_wxNSButtonAction(void); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual void SetValue(bool); + virtual bool GetValue() const; + virtual void SetLabel(const wxString& label); + virtual wxString GetLabel() const; + +protected: + virtual void DoSet3StateValue(wxCheckBoxState state); + virtual wxCheckBoxState DoGet3StateValue() const; +}; + +#endif // __WX_COCOA_CHECKBOX_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/checklst.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/checklst.h new file mode 100644 index 0000000000..8f07894342 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/checklst.h @@ -0,0 +1,79 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/checklst.h +// Purpose: wxCheckListBox class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_CHECKLST_H__ +#define __WX_COCOA_CHECKLST_H__ + +//#include "wx/cocoa/NSTableView.h" + +// ======================================================================== +// wxCheckListBox +// ======================================================================== +class WXDLLIMPEXP_CORE wxCheckListBox: public wxCheckListBoxBase //, protected wxCocoaNSTableView +{ + DECLARE_DYNAMIC_CLASS(wxCheckListBox) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSTableView,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxCheckListBox() { } + wxCheckListBox(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Create(parent, winid, pos, size, n, choices, style, validator, name); + } + wxCheckListBox(wxWindow *parent, wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Create(parent, winid, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + virtual ~wxCheckListBox(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // check list box specific methods + virtual bool IsChecked(unsigned int item) const; + virtual void Check(unsigned int item, bool check = true); +}; + +#endif // __WX_COCOA_CHECKLST_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/chkconf.h new file mode 100644 index 0000000000..77ccadfe68 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/chkconf.h @@ -0,0 +1,21 @@ +/* + * Name: wx/cocoa/chkconf.h + * Purpose: wxCocoa-specific config settings checks + * Author: Vadim Zeitlin + * Created: 2008-09-11 + * Copyright: (c) 2008 Vadim Zeitlin + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_COCOA_CHKCONF_H_ +#define _WX_COCOA_CHKCONF_H_ + +/* + wxLogDialog doesn't currently work correctly in wxCocoa. + */ +#undef wxUSE_LOG_DIALOG +#define wxUSE_LOG_DIALOG 0 + +#endif /* _WX_COCOA_CHKCONF_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/choice.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/choice.h new file mode 100644 index 0000000000..7fe2c06e8d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/choice.h @@ -0,0 +1,100 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/choice.h +// Purpose: wxChoice class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_CHOICE_H__ +#define __WX_COCOA_CHOICE_H__ + +//#include "wx/cocoa/NSPopUpButton.h" +#include "wx/cocoa/NSMenu.h" + +class WXDLLIMPEXP_FWD_BASE wxSortedArrayString; + +// ======================================================================== +// wxChoice +// ======================================================================== +class WXDLLIMPEXP_CORE wxChoice: public wxChoiceBase /*, protected wxCocoaNSPopUpButton */, protected wxCocoaNSMenu +{ + DECLARE_DYNAMIC_CLASS(wxChoice) + DECLARE_EVENT_TABLE() +// WX_DECLARE_COCOA_OWNER(NSTableView,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxChoice() { Init(); } + wxChoice(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Init(); + Create(parent, winid, pos, size, n, choices, style, validator, name); + } + wxChoice(wxWindow *parent, wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Init(); + Create(parent, winid, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + bool Create(wxWindow *parent, wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + virtual ~wxChoice(); +protected: + void Init(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + void CocoaNotification_menuDidSendAction(WX_NSNotification notification); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual void DoClear(); + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int) const; + virtual void SetString(unsigned int pos, const wxString&); + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual int GetSelection() const; + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + virtual void DoDeleteOneItem(unsigned int pos); + virtual void DoSetItemClientData(unsigned int, void*); + virtual void* DoGetItemClientData(unsigned int) const; + virtual void SetSelection(int pos); +protected: + wxSortedArrayString *m_sortedStrings; + wxArrayPtrVoid m_itemsClientData; +}; + +#endif // __WX_COCOA_CHOICE_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/clipbrd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/clipbrd.h new file mode 100644 index 0000000000..8571f8f56d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/clipbrd.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/clipbrd.h +// Purpose: wxClipboard +// Author: David Elliott +// Modified by: +// Created: 2003/07/23 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_CLIPBRD_H__ +#define __WX_COCOA_CLIPBRD_H__ + +#include "wx/dataobj.h" + +//========================================================================= +// wxClipboard +//========================================================================= +class wxClipboard : public wxClipboardBase +{ + DECLARE_DYNAMIC_CLASS(wxClipboard) +public: + wxClipboard(); + virtual ~wxClipboard(); + + // open the clipboard before SetData() and GetData() + virtual bool Open(); + + // close the clipboard after SetData() and GetData() + virtual void Close(); + + // query whether the clipboard is opened + virtual bool IsOpened() const; + + // set the clipboard data. all other formats will be deleted. + virtual bool SetData( wxDataObject *data ); + + // add to the clipboard data. + virtual bool AddData( wxDataObject *data ); + + // ask if data in correct format is available + virtual bool IsSupported( const wxDataFormat& format ); + + // fill data with data on the clipboard (if available) + virtual bool GetData( wxDataObject& data ); + + // clears wxTheClipboard and the system's clipboard if possible + virtual void Clear(); +}; + +#endif //__WX_COCOA_CLIPBRD_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/colordlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/colordlg.h new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/colordlg.h @@ -0,0 +1 @@ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/colour.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/colour.h new file mode 100644 index 0000000000..97593a3e3f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/colour.h @@ -0,0 +1,92 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/colour.h +// Purpose: wxColour class +// Author: David Elliott +// Modified by: +// Created: 2003/06/17 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_COLOUR_H__ +#define __WX_COCOA_COLOUR_H__ + +#include "wx/object.h" +#include "wx/string.h" + +// ======================================================================== +// wxColour +// ======================================================================== + +class WXDLLIMPEXP_CORE wxColour : public wxColourBase +{ +public: + // constructors + // ------------ + DEFINE_STD_WXCOLOUR_CONSTRUCTORS + + // initialization using existing NSColor + wxColour( WX_NSColor aColor ); + + // copy ctors and assignment operators + wxColour( const wxColour& col ); + wxColour& operator = ( const wxColour& col ); + + virtual ~wxColour(); + + // accessors + virtual bool IsOk() const { return m_cocoaNSColor; } + WX_NSColor GetNSColor() { return m_cocoaNSColor; } + WX_NSColor GetNSColor() const { return m_cocoaNSColor; } + + unsigned char Red() const { return m_red; } + unsigned char Green() const { return m_green; } + unsigned char Blue() const { return m_blue; } + unsigned char Alpha() const { return m_alpha; } + + // comparison + bool operator == (const wxColour& colour) const + { + return m_cocoaNSColor == colour.m_cocoaNSColor || + (m_red == colour.m_red && + m_green == colour.m_green && + m_blue == colour.m_blue && + m_alpha == colour.m_alpha); + } + bool operator != (const wxColour& colour) const + { return !(*this == colour); } + + // Set() functions + void Set( WX_NSColor aColor ); + + // reroute the inherited ones + void Set(unsigned char red, + unsigned char green, + unsigned char blue, + unsigned char alpha = wxALPHA_OPAQUE) + { wxColourBase::Set(red, green, blue, alpha); } + + bool Set(const wxString &str) + { return wxColourBase::Set(str); } + + void Set(unsigned long colRGB) + { wxColourBase::Set(colRGB); } + +protected: + // puts the object in an invalid, uninitialized state + void Init(); + + virtual void + InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); + +private: + WX_NSColor m_cocoaNSColor; + unsigned char m_red; + unsigned char m_green; + unsigned char m_blue; + unsigned char m_alpha; + + DECLARE_DYNAMIC_CLASS(wxColour) +}; + +#endif // __WX_COCOA_COLOUR_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/combobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/combobox.h new file mode 100644 index 0000000000..dc09cf216c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/combobox.h @@ -0,0 +1,157 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/combobox.h +// Purpose: wxComboBox class +// Author: Ryan Norton +// Modified by: +// Created: 2005/02/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_COMBOBOX_H__ +#define __WX_COCOA_COMBOBOX_H__ + +//Begin NSComboBox.h + +#include "wx/hashmap.h" +#include "wx/cocoa/ObjcAssociate.h" + +#include "wx/textctrl.h" + +DECLARE_WXCOCOA_OBJC_CLASS(NSComboBox); + +WX_DECLARE_OBJC_HASHMAP(NSComboBox); +class wxCocoaNSComboBox +{ + WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSComboBox) +public: + void AssociateNSComboBox(WX_NSComboBox cocoaNSComboBox); + void DisassociateNSComboBox(WX_NSComboBox cocoaNSComboBox); + + virtual void doWxEvent(int nEvent) = 0; + virtual ~wxCocoaNSComboBox() { } +}; + +//begin combobox.h + +#include "wx/dynarray.h" + +// ======================================================================== +// wxComboBox +// ======================================================================== +class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase, protected wxCocoaNSComboBox, protected wxCocoaNSTextField +{ + DECLARE_DYNAMIC_CLASS(wxComboBox) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSComboBox,NSTextField,NSView) + WX_DECLARE_COCOA_OWNER(NSTextField,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxComboBox() { } + wxComboBox(wxWindow *parent, wxWindowID winid, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + Create(parent, winid, value, pos, size, n, choices, style, validator, name); + } + wxComboBox(wxWindow *parent, wxWindowID winid, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + Create(parent, winid, value, pos, size, choices, style, + validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + bool Create(wxWindow *parent, wxWindowID winid, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + virtual ~wxComboBox(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + wxArrayPtrVoid m_Datas; + virtual void doWxEvent(int nEvent); + + virtual void Cocoa_didChangeText() + {} +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + void Clear() // HACK + { wxComboBoxBase::Clear(); } + + // wxCombobox methods + virtual void SetSelection(int pos); + // Overlapping methods + virtual wxString GetStringSelection(); + // wxItemContainer + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int) const; + virtual void SetString(unsigned int pos, const wxString&); + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual int GetSelection() const; + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + virtual void DoSetItemClientData(unsigned int, void*); + virtual void* DoGetItemClientData(unsigned int) const; + virtual bool IsSorted() const { return HasFlag(wxCB_SORT); } + +// ------------------------------------------------------------------------ +// wxTextEntryBase virtual implementations: +// ------------------------------------------------------------------------ + // FIXME: This needs to be moved to some sort of common code. + virtual void WriteText(const wxString&); + virtual wxString GetValue() const; + virtual void Remove(long, long); + virtual void Cut(); + virtual void Copy(); + virtual void Paste(); + virtual void Undo(); + virtual void Redo(); + virtual bool CanUndo() const; + virtual bool CanRedo() const; + virtual void SetInsertionPoint(long pos); + virtual long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + virtual void SetSelection(long from, long to); + virtual void GetSelection(long *from, long *to) const; + virtual bool IsEditable() const; + virtual void SetEditable(bool editable); + +private: + // implement wxTextEntry pure virtual method + virtual wxWindow *GetEditableWindow() { return this; } +}; + +#endif // __WX_COCOA_COMBOBOX_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/control.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/control.h new file mode 100644 index 0000000000..cb493202a6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/control.h @@ -0,0 +1,77 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/control.h +// Purpose: wxControl class +// Author: David Elliott +// Modified by: +// Created: 2003/02/15 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_CONTROL_H__ +#define __WX_COCOA_CONTROL_H__ + +#include "wx/cocoa/NSControl.h" + +// ======================================================================== +// wxControl +// ======================================================================== + +class WXDLLIMPEXP_CORE wxControl : public wxControlBase, public wxCocoaNSControl +{ + DECLARE_ABSTRACT_CLASS(wxControl) + WX_DECLARE_COCOA_OWNER(NSControl,NSView,NSView) + DECLARE_EVENT_TABLE() +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxControl() {} + wxControl(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr) + { + Create(parent, winid, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); + virtual ~wxControl(); + +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + + // implementation from now on + // -------------------------- + + void OnEraseBackground(wxEraseEvent& event); + + virtual void Command(wxCommandEvent& event) { ProcessCommand(event); } + + // Calls the callback and appropriate event handlers + bool ProcessCommand(wxCommandEvent& event); + + // Enables the control + virtual void CocoaSetEnabled(bool enable); +protected: + virtual wxSize DoGetBestSize() const; + + // Provides a common implementation of title setting which strips mnemonics + // and then calls setTitle: with the stripped string. May be implemented + // to call setTitleWithMnemonic: on OpenStep-compatible systems. Only + // intended for use by views or cells which implement at least setTitle: + // and possibly setTitleWithMnemonic: such as NSBox and NSButton or NSCell + // classes, for example as used by wxRadioBox. Not usable with classes like + // NSTextField which expect setStringValue:. + static void CocoaSetLabelForObject(const wxString& labelWithWxMnemonic, struct objc_object *anObject); +}; + +#endif + // __WX_COCOA_CONTROL_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/cursor.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/cursor.h new file mode 100644 index 0000000000..54209f0b19 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/cursor.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/cursor.h +// Purpose: wxCursor class +// Author: David Elliott +// Modified by: +// Created: 2002/11/27 +// Copyright: (c) David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_CURSOR_H_ +#define _WX_COCOA_CURSOR_H_ + +#include "wx/bitmap.h" + +class WXDLLIMPEXP_CORE wxCursorRefData : public wxGDIRefData +{ +public: + wxCursorRefData(); + virtual ~wxCursorRefData(); + +protected: + int m_width, m_height; + WX_NSCursor m_hCursor; + + friend class WXDLLIMPEXP_FWD_CORE wxBitmap; + friend class WXDLLIMPEXP_FWD_CORE wxCursor; + + wxDECLARE_NO_COPY_CLASS(wxCursorRefData); +}; + +#define M_CURSORDATA ((wxCursorRefData *)m_refData) +#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData) + +// Cursor +class WXDLLIMPEXP_CORE wxCursor: public wxBitmap +{ +public: + wxCursor(); + + wxCursor(const wxString& name, wxBitmapType type = wxCURSOR_DEFAULT_TYPE, + int hotSpotX = 0, int hotSpotY = 0); + + wxCursor(wxStockCursor id) { InitFromStock(id); } +#if WXWIN_COMPATIBILITY_2_8 + wxCursor(int id) { InitFromStock((wxStockCursor)id); } +#endif + virtual ~wxCursor(); + + // FIXME: operator==() is wrong! + bool operator==(const wxCursor& cursor) const { return m_refData == cursor.m_refData; } + bool operator!=(const wxCursor& cursor) const { return !(*this == cursor); } + + WX_NSCursor GetNSCursor() const { return M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0; } + +private: + void InitFromStock(wxStockCursor); + DECLARE_DYNAMIC_CLASS(wxCursor) +}; + +extern WXDLLIMPEXP_CORE void wxSetCursor(const wxCursor& cursor); + +#endif + // _WX_COCOA_CURSOR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dataform.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dataform.h new file mode 100644 index 0000000000..870ddb0470 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dataform.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/dataform.h +// Purpose: declaration of the wxDataFormat class +// Author: David Elliott +// Modified by: +// Created: 2003/07/23 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_DATAFORM_H__ +#define __WX_COCOA_DATAFORM_H__ + +class wxDataFormat +{ +public: + wxDataFormat(unsigned int uFormat = wxDF_INVALID) { m_uFormat = uFormat; } + wxDataFormat(const wxString& zFormat) { SetId(zFormat); } + + wxDataFormat& operator=(unsigned int uFormat) { m_uFormat = uFormat; return(*this); } + wxDataFormat& operator=(const wxDataFormat& rFormat) {m_uFormat = rFormat.m_uFormat; return(*this); } + + // + // Comparison (must have both versions) + // + bool operator==(wxDataFormatId eFormat) const { return (m_uFormat == (unsigned int)eFormat); } + bool operator!=(wxDataFormatId eFormat) const { return (m_uFormat != (unsigned int)eFormat); } + bool operator==(const wxDataFormat& rFormat) const { return (m_uFormat == rFormat.m_uFormat); } + bool operator!=(const wxDataFormat& rFormat) const { return (m_uFormat != rFormat.m_uFormat); } + operator unsigned int(void) const { return m_uFormat; } + + unsigned int GetFormatId(void) const { return (unsigned int)m_uFormat; } + unsigned int GetType(void) const { return (unsigned int)m_uFormat; } + + bool IsStandard(void) const; + + void SetType(unsigned int uType){ m_uFormat = uType; } + + // + // String ids are used for custom types - this SetId() must be used for + // application-specific formats + // + wxString GetId(void) const; + void SetId(const wxString& WXUNUSED(pId)) { /* TODO */ } + +private: + unsigned int m_uFormat; +}; // end of CLASS wxDataFormat + +#endif // __WX_COCOA_DATAFORM_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dataobj.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dataobj.h new file mode 100644 index 0000000000..d525029f9c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dataobj.h @@ -0,0 +1,23 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/dataobj.h +// Purpose: declaration of the wxDataObject +// Author: David Elliott +// Modified by: +// Created: 2003/07/23 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_DATAOBJ_H__ +#define __WX_COCOA_DATAOBJ_H__ + +class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase +{ +public: + wxDataObject(); + virtual ~wxDataObject(); + virtual bool IsSupportedFormat(const wxDataFormat& format, + Direction dir = Get) const; +}; + +#endif // __WX_COCOA_DATAOBJ_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dataobj2.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dataobj2.h new file mode 100644 index 0000000000..b824fe933e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dataobj2.h @@ -0,0 +1,83 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/dataobj2.h +// Purpose: declaration of standard wxDataObjectSimple-derived classes +// Author: David Elliott +// Modified by: +// Created: 2003/07/23 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_DATAOBJ2_H__ +#define __WX_COCOA_DATAOBJ2_H__ + +//========================================================================= +// wxBitmapDataObject is a specialization of wxDataObject for bitmaps +//========================================================================= +class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase +{ +public: + // ctors + wxBitmapDataObject(); + wxBitmapDataObject(const wxBitmap& bitmap); + + // destr + virtual ~wxBitmapDataObject(); + + // override base class virtual to update PNG data too + virtual void SetBitmap(const wxBitmap& bitmap); + + // implement base class pure virtuals + // ---------------------------------- + + virtual size_t GetDataSize() const { return m_pngSize; } + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + +protected: + void Init() { m_pngData = NULL; m_pngSize = 0; } + void Clear() { free(m_pngData); } + void ClearAll() { Clear(); Init(); } + + size_t m_pngSize; + void *m_pngData; + + void DoConvertToPng(); + +private: + // virtual function hiding supression + size_t GetDataSize(const wxDataFormat& format) const + { return(wxDataObjectSimple::GetDataSize(format)); } + bool GetDataHere(const wxDataFormat& format, void* pBuf) const + { return(wxDataObjectSimple::GetDataHere(format, pBuf)); } + bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf) + { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); } +}; + +//========================================================================= +// wxFileDataObject is a specialization of wxDataObject for file names +//========================================================================= + +class WXDLLIMPEXP_CORE wxFileDataObject : public wxFileDataObjectBase +{ +public: + // implement base class pure virtuals + // ---------------------------------- + + void AddFile( const wxString &filename ); + + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + +private: + // virtual function hiding supression + size_t GetDataSize(const wxDataFormat& format) const + { return(wxDataObjectSimple::GetDataSize(format)); } + bool GetDataHere(const wxDataFormat& format, void* pBuf) const + { return(wxDataObjectSimple::GetDataHere(format, pBuf)); } + bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf) + { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); } +}; + +#endif //__WX_COCOA_DATAOBJ2_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dc.h new file mode 100644 index 0000000000..0d4fec2065 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dc.h @@ -0,0 +1,174 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/dc.h +// Purpose: wxDC +// Author: David Elliott +// Modified by: +// Created: 2003/04/01 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_DC_H__ +#define __WX_COCOA_DC_H__ + +DECLARE_WXCOCOA_OBJC_CLASS(NSAffineTransform); + +#include "wx/dc.h" + +class WXDLLIMPEXP_FWD_CORE wxCocoaDCImpl; +WX_DECLARE_LIST(wxCocoaDCImpl, wxCocoaDCStack); + +//========================================================================= +// wxDC +//========================================================================= +class WXDLLIMPEXP_CORE wxCocoaDCImpl: public wxDCImpl +{ + DECLARE_ABSTRACT_CLASS(wxCocoaDCImpl) + wxDECLARE_NO_COPY_CLASS(wxCocoaDCImpl); +//------------------------------------------------------------------------- +// Initialization +//------------------------------------------------------------------------- +public: + wxCocoaDCImpl(wxDC *owner); + virtual ~wxCocoaDCImpl(); + +//------------------------------------------------------------------------- +// wxCocoa specifics +//------------------------------------------------------------------------- +public: + static void CocoaInitializeTextSystem(); + static void CocoaShutdownTextSystem(); + static WX_NSTextStorage sm_cocoaNSTextStorage; + static WX_NSLayoutManager sm_cocoaNSLayoutManager; + static WX_NSTextContainer sm_cocoaNSTextContainer; + // Create a simple Wx to Bounds transform (just flip the coordinate system) + static WX_NSAffineTransform CocoaGetWxToBoundsTransform(bool isFlipped, float height); +protected: +// DC stack + static wxCocoaDCStack sm_cocoaDCStack; + virtual bool CocoaLockFocus(); + virtual bool CocoaUnlockFocus(); + bool CocoaUnwindStackAndTakeFocus(); + inline bool CocoaTakeFocus() + { + wxCocoaDCStack::compatibility_iterator node = sm_cocoaDCStack.GetFirst(); + if(node && (node->GetData() == this)) + return true; + return CocoaUnwindStackAndTakeFocus(); + } + void CocoaUnwindStackAndLoseFocus(); +// DC flipping/transformation + void CocoaApplyTransformations(); + void CocoaUnapplyTransformations(); + WX_NSAffineTransform m_cocoaWxToBoundsTransform; +// Get bounds rect (for Clear()) + // note: we use void * to mean NSRect * so that we can avoid + // putting NSRect in the headers. + virtual bool CocoaGetBounds(void *rectData); +// Blitting + virtual bool CocoaDoBlitOnFocusedDC(wxCoord xdest, wxCoord ydest, + wxCoord width, wxCoord height, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode logicalFunc, bool useMask, wxCoord xsrcMask, wxCoord ysrcMask); +//------------------------------------------------------------------------- +// Implementation +//------------------------------------------------------------------------- +public: + // implement base class pure virtuals + // ---------------------------------- + + virtual void Clear(); + + virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; } + virtual void EndDoc(void) {} + + virtual void StartPage(void) {} + virtual void EndPage(void) {} + + virtual void SetFont(const wxFont& font); + virtual void SetPen(const wxPen& pen); + virtual void SetBrush(const wxBrush& brush); + virtual void SetBackground(const wxBrush& brush); + virtual void SetBackgroundMode(int mode) { m_backgroundMode = mode; } + virtual void SetPalette(const wxPalette& palette); + + virtual void DestroyClippingRegion(); + + virtual wxCoord GetCharHeight() const; + virtual wxCoord GetCharWidth() const; + virtual void DoGetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; + + virtual bool CanDrawBitmap() const; + virtual bool CanGetTextExtent() const; + virtual int GetDepth() const; + virtual wxSize GetPPI() const; + + virtual void SetMapMode(wxMappingMode mode); + virtual void SetUserScale(double x, double y); + + virtual void SetLogicalScale(double x, double y); + virtual void SetLogicalOrigin(wxCoord x, wxCoord y); + virtual void SetDeviceOrigin(wxCoord x, wxCoord y); + virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp); + virtual void SetLogicalFunction(wxRasterOperationMode function); + + virtual void SetTextForeground(const wxColour& colour) ; + virtual void SetTextBackground(const wxColour& colour) ; + + virtual void ComputeScaleAndOrigin(); +protected: + virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, + wxFloodFillStyle style = wxFLOOD_SURFACE); + + virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const; + + virtual void DoDrawPoint(wxCoord x, wxCoord y); + virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); + + virtual void DoDrawArc(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc); + + virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, + double sa, double ea); + + virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, + wxCoord width, wxCoord height, + double radius); + virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + + virtual void DoCrossHair(wxCoord x, wxCoord y); + + virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); + virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, + bool useMask = false); + + virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); + virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, + double angle); + + virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); + + // this is gnarly - we can't even call this function DoSetClippingRegion() + // because of virtual function hiding + virtual void DoSetDeviceClippingRegion(const wxRegion& region); + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); + + virtual void DoGetSize(int *width, int *height) const; + virtual void DoGetSizeMM(int* width, int* height) const; + + virtual void DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset); + virtual void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE); +}; + +#endif // __WX_COCOA_DC_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dcclient.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dcclient.h new file mode 100644 index 0000000000..631c6ffd33 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dcclient.h @@ -0,0 +1,69 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/dcclient.h +// Purpose: wxClientDCImpl, wxPaintDCImpl and wxWindowDCImpl classes +// Author: David Elliott +// Modified by: +// Created: 2003/04/01 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_DCCLIENT_H__ +#define __WX_COCOA_DCCLIENT_H__ + +#include "wx/cocoa/dc.h" + +// DFE: A while ago I stumbled upon the fact that retrieving the parent +// NSView of the content view seems to return the entire window rectangle +// (including decorations). Of course, that is not at all part of the +// Cocoa or OpenStep APIs, but it might be a neat hack. +class WXDLLIMPEXP_CORE wxWindowDCImpl: public wxCocoaDCImpl +{ + DECLARE_DYNAMIC_CLASS(wxWindowDCImpl) +public: + wxWindowDCImpl(wxDC *owner); + // Create a DC corresponding to a window + wxWindowDCImpl(wxDC *owner, wxWindow *win); + virtual ~wxWindowDCImpl(void); + +protected: + wxWindow *m_window; + WX_NSView m_lockedNSView; +// DC stack + virtual bool CocoaLockFocus(); + virtual bool CocoaUnlockFocus(); + bool CocoaLockFocusOnNSView(WX_NSView nsview); + bool CocoaUnlockFocusOnNSView(); + virtual bool CocoaGetBounds(void *rectData); +}; + +class WXDLLIMPEXP_CORE wxClientDCImpl: public wxWindowDCImpl +{ + DECLARE_DYNAMIC_CLASS(wxClientDCImpl) +public: + wxClientDCImpl(wxDC *owner); + // Create a DC corresponding to a window + wxClientDCImpl(wxDC *owner, wxWindow *win); + virtual ~wxClientDCImpl(void); +protected: +// DC stack + virtual bool CocoaLockFocus(); + virtual bool CocoaUnlockFocus(); +}; + +class WXDLLIMPEXP_CORE wxPaintDCImpl: public wxWindowDCImpl +{ + DECLARE_DYNAMIC_CLASS(wxPaintDCImpl) +public: + wxPaintDCImpl(wxDC *owner); + // Create a DC corresponding to a window + wxPaintDCImpl(wxDC *owner, wxWindow *win); + virtual ~wxPaintDCImpl(void); +protected: +// DC stack + virtual bool CocoaLockFocus(); + virtual bool CocoaUnlockFocus(); +}; + +#endif + // __WX_COCOA_DCCLIENT_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dcmemory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dcmemory.h new file mode 100644 index 0000000000..33846293c3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dcmemory.h @@ -0,0 +1,54 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/dcmemory.h +// Purpose: wxMemoryDCImpl class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_DCMEMORY_H__ +#define __WX_COCOA_DCMEMORY_H__ + +#include "wx/cocoa/dc.h" + +#include "wx/dcmemory.h" + +class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxCocoaDCImpl +{ + DECLARE_DYNAMIC_CLASS(wxMemoryDCImpl) + +public: + wxMemoryDCImpl(wxMemoryDC *owner) + : wxCocoaDCImpl(owner) + { Init(); } + wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap) + : wxCocoaDCImpl(owner) + { Init(); + owner->SelectObject(bitmap); + } + wxMemoryDCImpl(wxMemoryDC *owner, wxDC *dc ); // Create compatible DC + virtual ~wxMemoryDCImpl(void); + + virtual void DoGetSize(int *width, int *height) const; + virtual void DoSelect(const wxBitmap& bitmap); + +protected: + wxBitmap m_selectedBitmap; + WX_NSImage m_cocoaNSImage; +// DC stack + virtual bool CocoaLockFocus(); + virtual bool CocoaUnlockFocus(); + virtual bool CocoaGetBounds(void *rectData); +// Blitting + virtual bool CocoaDoBlitOnFocusedDC(wxCoord xdest, wxCoord ydest, + wxCoord width, wxCoord height, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode logicalFunc, bool useMask, wxCoord xsrcMask, wxCoord ysrcMask); + +private: + void Init(); +}; + +#endif + // __WX_COCOA_DCMEMORY_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dcscreen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dcscreen.h new file mode 100644 index 0000000000..af7d4ee54e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dcscreen.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/dcscreen.h +// Purpose: wxScreenDCImpl class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_DCSCREEN_H__ +#define __WX_COCOA_DCSCREEN_H__ + +#include "wx/dcscreen.h" +#include "wx/cocoa/dc.h" + +class WXDLLIMPEXP_CORE wxScreenDCImpl: public wxCocoaDCImpl +{ + DECLARE_DYNAMIC_CLASS(wxScreenDCImpl) +public: + wxScreenDCImpl(wxScreenDC *owner); + wxScreenDCImpl(wxScreenDC *owner, wxDC *dc ); // Create compatible DC + virtual ~wxScreenDCImpl(void); + + // Compatibility with X's requirements for drawing on top of all windows + static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return true; } + static bool StartDrawingOnTop(wxRect* WXUNUSED(rect) = NULL) { return true; } + static bool EndDrawingOnTop() { return true; } +}; + +#endif // __WX_COCOA_DCSCREEN_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dialog.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dialog.h new file mode 100644 index 0000000000..632df8f1bb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dialog.h @@ -0,0 +1,94 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/dialog.h +// Purpose: wxDialog class +// Author: David Elliott +// Modified by: +// Created: 2002/12/15 +// Copyright: David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_DIALOG_H_ +#define _WX_COCOA_DIALOG_H_ + +#include "wx/defs.h" +// NOTE: we don't need panel.h, but other things expect it to be included +#include "wx/panel.h" +#include "wx/cocoa/NSPanel.h" + +// ======================================================================== +// wxDialog +// ======================================================================== +class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase, protected wxCocoaNSPanel +{ + DECLARE_DYNAMIC_CLASS(wxDialog) + WX_DECLARE_COCOA_OWNER(NSPanel,NSWindow,NSWindow) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxDialog() { Init(); } + +#if WXWIN_COMPATIBILITY_2_6 + // Constructor with a modal flag, but no window id - the old convention + wxDialog(wxWindow *parent, + const wxString& title, bool WXUNUSED(modal), + int x = wxDefaultCoord, int y= wxDefaultCoord, int width = 500, int height = 500, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr) + { + Init(); + Create(parent, wxID_ANY, title, wxPoint(x, y), wxSize(width, height), + style, name); + } +#endif // WXWIN_COMPATIBILITY_2_6 + + // Constructor with no modal flag - the new convention. + wxDialog(wxWindow *parent, wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr) + { + Init(); + Create(parent, winid, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr); + + virtual ~wxDialog(); +protected: + void Init(); + +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +protected: + virtual void CocoaDelegate_windowWillClose(void); + virtual bool Cocoa_canBecomeMainWindow(bool &canBecome) + { canBecome = true; return true; } + +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual bool Show(bool show = true); + + void SetModal(bool flag); + virtual bool IsModal() const { return m_isModal; } + bool m_isModal; + + // For now, same as Show(true) but returns return code + virtual int ShowModal(); + + // may be called to terminate the dialog with the given return code + virtual void EndModal(int retCode); +}; + +#endif // _WX_COCOA_DIALOG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dirdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dirdlg.h new file mode 100644 index 0000000000..207f79baac --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/dirdlg.h @@ -0,0 +1,50 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/dirdlg.h +// Purpose: wxDirDialog class +// Author: Ryan Norton +// Modified by: Hiroyuki Nakamura(maloninc) +// Created: 2006-01-10 +// Copyright: (c) Ryan Norton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_DIRDLG_H_ +#define _WX_COCOA_DIRDLG_H_ + +DECLARE_WXCOCOA_OBJC_CLASS(NSSavePanel); + +#define wxDirDialog wxCocoaDirDialog +//------------------------------------------------------------------------- +// wxDirDialog +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDirDialog: public wxDirDialogBase +{ + DECLARE_DYNAMIC_CLASS(wxDirDialog) + wxDECLARE_NO_COPY_CLASS(wxDirDialog); +public: + wxDirDialog(wxWindow *parent, + const wxString& message = wxDirSelectorPromptStr, + const wxString& defaultPath = wxT(""), + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& name = wxDirDialogNameStr); + virtual ~wxDirDialog(); + + virtual int ShowModal(); + + inline WX_NSSavePanel GetNSSavePanel() + { return (WX_NSSavePanel)m_cocoaNSWindow; } + +protected: + wxString m_dir; + wxWindow * m_parent; + wxString m_fileName; + +private: + wxArrayString m_fileNames; +}; + +#endif // _WX_DIRDLG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/drawer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/drawer.h new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/drawer.h @@ -0,0 +1 @@ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/evtloop.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/evtloop.h new file mode 100644 index 0000000000..366e46cb1b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/evtloop.h @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/evtloop.h +// Purpose: declaration of wxGUIEventLoop for wxCocoa +// Author: Vadim Zeitlin +// Created: 2008-12-28 +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_EVTLOOP_H_ +#define _WX_COCOA_EVTLOOP_H_ + +// ---------------------------------------------------------------------------- +// wxGUIEventLoop for wxCocoa +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopBase +{ +public: + wxGUIEventLoop() { m_exitcode = 0; } + + virtual void ScheduleExit(int rc = 0); + virtual bool Pending() const; + virtual bool Dispatch(); + virtual int DispatchTimeout(unsigned long timeout); + virtual void WakeUp() { } + virtual bool YieldFor(long eventsToProcess); + +protected: + virtual int DoRun(); + + int m_exitcode; + + wxDECLARE_NO_COPY_CLASS(wxGUIEventLoop); +}; + +#endif // _WX_COCOA_EVTLOOP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/filedlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/filedlg.h new file mode 100644 index 0000000000..b888be18e7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/filedlg.h @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/filedlg.h +// Purpose: wxFileDialog class +// Author: Ryan Norton +// Modified by: +// Created: 2004-10-02 +// Copyright: (c) Ryan Norton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_FILEDLG_H_ +#define _WX_COCOA_FILEDLG_H_ + +DECLARE_WXCOCOA_OBJC_CLASS(NSSavePanel); + +#define wxFileDialog wxCocoaFileDialog +//------------------------------------------------------------------------- +// wxFileDialog +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase +{ + DECLARE_DYNAMIC_CLASS(wxFileDialog) + wxDECLARE_NO_COPY_CLASS(wxFileDialog); +public: + wxFileDialog(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr); + virtual ~wxFileDialog(); + + virtual void SetPath(const wxString& path); + virtual void GetPaths(wxArrayString& paths) const; + virtual void GetFilenames(wxArrayString& files) const; + + virtual int ShowModal(); + + inline WX_NSSavePanel GetNSSavePanel() + { return (WX_NSSavePanel)m_cocoaNSWindow; } + +private: + WX_NSMutableArray m_wildcards; + wxArrayString m_fileNames; +}; + +#endif // _WX_FILEDLG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/font.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/font.h new file mode 100644 index 0000000000..c9c245f9e1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/font.h @@ -0,0 +1,171 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/font.h +// Purpose: wxFont class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONT_H_ +#define _WX_FONT_H_ + +// ---------------------------------------------------------------------------- +// wxFont +// ---------------------------------------------------------------------------- + +DECLARE_WXCOCOA_OBJC_CLASS(NSFont); + +// Internal class that bridges us with code like wxSystemSettings +class wxCocoaFontFactory; +// We have c-tors/methods taking pointers of these +class wxFontRefData; + +/*! @discussion + wxCocoa's implementation of wxFont is very incomplete. In particular, + a lot of work needs to be done on wxNativeFontInfo which is currently + using the totally generic implementation. + + See the documentation in src/cocoa/font.mm for more implementatoin details. + */ +class WXDLLIMPEXP_CORE wxFont : public wxFontBase +{ + friend class wxCocoaFontFactory; +public: + /*! @abstract Default construction of invalid font for 2-step construct then Create process. + */ + wxFont() { } + + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + + /*! @abstract Platform-independent construction with individual properties + */ +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxFont(int size, + int family, + int style, + int weight, + bool underlined = FALSE, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding); + } +#endif + wxFont(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = FALSE, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(size, family, style, weight, underlined, face, encoding); + } + + wxFont(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(10, family, style, weight, underlined, face, encoding); + SetPixelSize(pixelSize); + } + + /*! @abstract Construction with opaque wxNativeFontInfo + */ + wxFont(const wxNativeFontInfo& info) + { + (void)Create(info); + } + + /*! @abstract Construction with platform-dependent font descriptor string. + @param fontDesc Usually the result of wxNativeFontInfo::ToUserString() + */ + wxFont(const wxString& fontDesc); + + // NOTE: Copy c-tor and assignment from wxObject is fine + + bool Create(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = FALSE, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + + bool Create(const wxNativeFontInfo& info); + + virtual ~wxFont(); + + // implement base class pure virtuals + virtual int GetPointSize() const; + virtual wxFontStyle GetStyle() const; + virtual wxFontWeight GetWeight() const; + virtual bool GetUnderlined() const; + virtual wxString GetFaceName() const; + virtual wxFontEncoding GetEncoding() const; + virtual const wxNativeFontInfo *GetNativeFontInfo() const; + + virtual void SetPointSize(int pointSize); + virtual void SetFamily(wxFontFamily family); + virtual void SetStyle(wxFontStyle style); + virtual void SetWeight(wxFontWeight weight); + virtual bool SetFaceName(const wxString& faceName); + virtual void SetUnderlined(bool underlined); + virtual void SetEncoding(wxFontEncoding encoding); + + wxDECLARE_COMMON_FONT_METHODS(); + + // implementation only from now on + // ------------------------------- + + /*! @abstract Defined on some ports (not including this one) in wxGDIObject + @discussion + The intention here I suppose is to allow one to create a wxFont without yet + creating the underlying native object. There's no point not to create the + NSFont immediately in wxCocoa so this is useless. + This method came from the stub code copied in the early days of wxCocoa. + FIXME(1): Remove this in trunk. FIXME(2): Is it really a good idea for this to + be part of the public API for wxGDIObject? + */ + virtual bool RealizeResource(); + +protected: + /*! @abstract Internal constructor with ref data + @discussion + Takes ownership of @a refData. That is, it is assumed that refData has either just been + created using new (which initializes its m_refCount to 1) or if you are sharing a ref that + you have called IncRef on it before passing it to this method. + */ + explicit wxFont(wxFontRefData *refData) + { Create(refData); } + bool Create(wxFontRefData *refData); + + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + virtual wxFontFamily DoGetFamily() const; + +private: + DECLARE_DYNAMIC_CLASS(wxFont) +}; + +#endif + // _WX_FONT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/fontdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/fontdlg.h new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/fontdlg.h @@ -0,0 +1 @@ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/frame.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/frame.h new file mode 100644 index 0000000000..ebdb56ed34 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/frame.h @@ -0,0 +1,106 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/frame.h +// Purpose: wxFrame class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_FRAME_H_ +#define _WX_COCOA_FRAME_H_ + +class WXDLLIMPEXP_FWD_CORE wxMenuBar; +class WXDLLIMPEXP_FWD_CORE wxStatusBar; + +class WXDLLIMPEXP_CORE wxFrame: public wxFrameBase +{ + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxFrame) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxFrame() { Init(); } + wxFrame(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + Create(parent, winid, title, pos, size, style, name); + } + + virtual ~wxFrame(); + + bool Create(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); +protected: + void Init(); +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +public: + virtual wxMenuBar* GetAppMenuBar(wxCocoaNSWindow *win); + // Returns the NSView for non-client drawing + virtual WX_NSView GetNonClientNSView(); + + // Helper function to position status/tool bars + // Also called by native toolbar to force a size update + void UpdateFrameNSView(); + + virtual void CocoaDelegate_wxMenuItemAction(WX_NSMenuItem menuItem); + virtual bool CocoaDelegate_validateMenuItem(WX_NSMenuItem menuItem); +protected: + virtual void CocoaSetWxWindowSize(int width, int height); + + virtual void CocoaReplaceView(WX_NSView oldView, WX_NSView newView); + // frameNSView is used whenever a statusbar/generic toolbar are present + WX_NSView m_frameNSView; +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual void AttachMenuBar(wxMenuBar *mbar); + virtual void DetachMenuBar(); + virtual void SetMenuBar(wxMenuBar *menubar); + + // implementation only from now on + // ------------------------------- + + // override some more virtuals + + // get the origin of the client area (which may be different from (0, 0) + // if the frame has a toolbar) in client coordinates + virtual wxPoint GetClientAreaOrigin() const; + + // create the main status bar by calling OnCreateStatusBar() + virtual wxStatusBar* CreateStatusBar(int number = 1, + long style = wxSTB_DEFAULT_STYLE, + wxWindowID winid = 0, + const wxString& name = + wxStatusLineNameStr); + // sets the main status bar + void SetStatusBar(wxStatusBar *statBar); +#if wxUSE_TOOLBAR + // create main toolbar bycalling OnCreateToolBar() + virtual wxToolBar* CreateToolBar(long style = -1, + wxWindowID winid = wxID_ANY, + const wxString& name = wxToolBarNameStr); + // sets the main tool bar + virtual void SetToolBar(wxToolBar *toolbar); +#endif //wxUSE_TOOLBAR +protected: + void PositionStatusBar(); +}; + +#endif // _WX_COCOA_FRAME_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/gauge.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/gauge.h new file mode 100644 index 0000000000..ffadb1c27b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/gauge.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/gauge.h +// Purpose: wxGauge class +// Author: David Elliott +// Modified by: +// Created: 2003/07/15 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_GAUGE_H__ +#define __WX_COCOA_GAUGE_H__ + +// #include "wx/cocoa/NSProgressIndicator.h" + +DECLARE_WXCOCOA_OBJC_CLASS(NSProgressIndicator); + +// ======================================================================== +// wxGauge +// ======================================================================== +class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase// , protected wxCocoaNSProgressIndicator +{ + DECLARE_DYNAMIC_CLASS(wxGauge) + DECLARE_EVENT_TABLE() +// WX_DECLARE_COCOA_OWNER(NSProgressIndicator,NSView,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxGauge() { } + wxGauge(wxWindow *parent, wxWindowID winid, int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr) + { + Create(parent, winid, range, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr); + virtual ~wxGauge(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +public: + inline WX_NSProgressIndicator GetNSProgressIndicator() const { return (WX_NSProgressIndicator)m_cocoaNSView; } +protected: + // NSProgressIndicator cannot be enabled/disabled + virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { } +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // Pure Virtuals + virtual int GetValue() const; + virtual void SetValue(int value); + + // retrieve/change the range + virtual void SetRange(int maxValue); + int GetRange(void) const; +protected: + virtual wxSize DoGetBestSize() const; +}; + +#endif + // __WX_COCOA_GAUGE_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/glcanvas.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/glcanvas.h new file mode 100644 index 0000000000..927c3e05ee --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/glcanvas.h @@ -0,0 +1,97 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/glcanvas.h +// Purpose: wxGLCanvas class +// Author: David Elliott +// Modified by: +// Created: 2004/09/29 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_GLCANVAS_H__ +#define _WX_COCOA_GLCANVAS_H__ + +#include "wx/window.h" + +// #include "wx/cocoa/NSOpenGLView.h" +// Include gl.h from the OpenGL framework +#include + +class WXDLLIMPEXP_FWD_GL wxGLCanvas; +DECLARE_WXCOCOA_OBJC_CLASS(NSOpenGLContext); +DECLARE_WXCOCOA_OBJC_CLASS(NSOpenGLView); + +// ======================================================================== +// wxGLContext +// ======================================================================== + +class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase +{ +public: + wxGLContext(wxGLCanvas *win, const wxGLContext *other = NULL); + + virtual ~wxGLContext(); + + virtual void SetCurrent(const wxGLCanvas& win) const; + + WX_NSOpenGLContext GetNSOpenGLContext() const + { return m_cocoaNSOpenGLContext; } + +private: + WX_NSOpenGLContext m_cocoaNSOpenGLContext; +}; + +// ======================================================================== +// wxGLCanvas +// ======================================================================== + +class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasBase + // , protected wxCocoaNSOpenGLView +{ + DECLARE_DYNAMIC_CLASS(wxGLCanvas) +// WX_DECLARE_COCOA_OWNER(NSOpenGLView,NSView,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxGLCanvas(wxWindow *parent, + wxWindowID id = wxID_ANY, + const int *attribList = NULL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const wxPalette& palette = wxNullPalette) + { + Create(parent, id, pos, size, style, name, attribList, palette); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette); + + virtual ~wxGLCanvas(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + // NSOpenGLView cannot be enabled/disabled + virtual void CocoaSetEnabled(bool enable) { } +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual void SwapBuffers(); + + + NSOpenGLView *GetNSOpenGLView() const + { return (NSOpenGLView *)m_cocoaNSView; } +}; + +#endif //ndef _WX_COCOA_GLCANVAS_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/icon.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/icon.h new file mode 100644 index 0000000000..ac041ba354 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/icon.h @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/icon.h +// Purpose: wxIcon class +// Author: David Elliott +// Modified by: +// Created: 2003/08/11 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_ICON_H__ +#define _WX_COCOA_ICON_H__ + +#include "wx/gdicmn.h" +#include "wx/gdiobj.h" + +// ======================================================================== +// wxIcon +// ======================================================================== +class WXDLLIMPEXP_CORE wxIcon : public wxGDIObject +{ +public: + wxIcon(); + + wxIcon(const char* const* data) { CreateFromXpm(data); } + wxIcon(const char bits[], int width , int height ); + wxIcon(const wxString& name, int flags = wxICON_DEFAULT_TYPE, + int desiredWidth = -1, int desiredHeight = -1); + wxIcon(const wxIconLocation& loc) + { + LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ICON); + } + virtual ~wxIcon(); + + bool LoadFile(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE, + int desiredWidth=-1, int desiredHeight=-1); + + bool operator==(const wxIcon& icon) const + { return m_refData == icon.m_refData; } + bool operator!=(const wxIcon& icon) const { return !(*this == icon); } + + // create from bitmap (which should have a mask unless it's monochrome): + // there shouldn't be any implicit bitmap -> icon conversion (i.e. no + // ctors, assignment operators...), but it's ok to have such function + void CopyFromBitmap(const wxBitmap& bmp); + + int GetWidth() const; + int GetHeight() const; + + wxSize GetSize() const { return wxSize(GetWidth(), GetHeight()); } + + WX_NSImage GetNSImage() const; + bool CreateFromXpm(const char* const* bits); + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxIcon) +}; + +#endif // _WX_COCOA_ICON_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/listbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/listbox.h new file mode 100644 index 0000000000..a9f233aa8a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/listbox.h @@ -0,0 +1,114 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/listbox.h +// Purpose: wxListBox class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_LISTBOX_H__ +#define __WX_COCOA_LISTBOX_H__ + +#include "wx/cocoa/NSTableView.h" + +#include "wx/dynarray.h" + +// ======================================================================== +// wxListBox +// ======================================================================== +class WXDLLIMPEXP_CORE wxListBox: public wxListBoxBase, protected wxCocoaNSTableView +{ + DECLARE_DYNAMIC_CLASS(wxListBox) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSTableView,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxListBox() { m_cocoaItems = NULL; m_cocoaDataSource = NULL; } + wxListBox(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Create(parent, winid, pos, size, n, choices, style, validator, name); + } + wxListBox(wxWindow *parent, wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Create(parent, winid, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + virtual ~wxListBox(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + virtual int CocoaDataSource_numberOfRows(); + virtual struct objc_object* CocoaDataSource_objectForTableColumn( + WX_NSTableColumn tableColumn, int rowIndex); + WX_NSMutableArray m_cocoaItems; + wxArrayPtrVoid m_itemClientData; + struct objc_object *m_cocoaDataSource; + bool m_needsUpdate; + inline bool _WxCocoa_GetNeedsUpdate(); + inline void _WxCocoa_SetNeedsUpdate(bool needsUpdate); + virtual void OnInternalIdle(); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual wxSize DoGetBestSize() const; +// pure virtuals from wxListBoxBase + virtual bool IsSelected(int n) const; + virtual int GetSelections(wxArrayInt& aSelections) const; +protected: + virtual void DoSetFirstItem(int n); + virtual void DoSetSelection(int n, bool select); + +// pure virtuals from wxItemContainer +public: + // deleting items + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + // accessing strings + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + virtual int FindString(const wxString& s, bool bCase = false) const; + // selection + virtual int GetSelection() const; +protected: + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; +}; + +#endif // __WX_COCOA_LISTBOX_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/log.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/log.h new file mode 100644 index 0000000000..82f9319a48 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/log.h @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/log.h +// Purpose: Declare wxCocoa-specific trace masks +// Author: David Elliott +// Modified by: +// Created: 2004/02/07 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_LOG_H__ +#define _WX_COCOA_LOG_H__ + +// General tracing (in lieu of wxLogDebug) +#define wxTRACE_COCOA wxT("COCOA") +// Specific tracing +#define wxTRACE_COCOA_RetainRelease wxT("COCOA_RetainRelease") +#define wxTRACE_COCOA_TopLevelWindow_Size wxT("COCOA_TopLevelWindow_Size") +#define wxTRACE_COCOA_Window_Size wxT("COCOA_Window_Size") + +#endif //ndef _WX_COCOA_LOG_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/mbarman.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/mbarman.h new file mode 100644 index 0000000000..0223cb5c74 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/mbarman.h @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/mbarman.h +// Purpose: wxMenuBarManager class +// Author: David Elliott +// Modified by: +// Created: 2003/09/04 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_MBARMAN_H__ +#define __WX_COCOA_MBARMAN_H__ + +#if wxUSE_MENUS + +#include "wx/toplevel.h" + +DECLARE_WXCOCOA_OBJC_CLASS(wxMenuBarManagerObserver); + +// ======================================================================== +// wxMenuBarManager +// ======================================================================== +class WXDLLIMPEXP_CORE wxMenuBarManager : public wxObject +{ +// ------------------------------------------------------------------------ +// initialization/destruction +// ------------------------------------------------------------------------ +public: + wxMenuBarManager(); + virtual ~wxMenuBarManager(); +// ------------------------------------------------------------------------ +// Single instance +// ------------------------------------------------------------------------ +public: + static wxMenuBarManager *GetInstance() { return sm_mbarmanInstance; } + static void CreateInstance(); + static void DestroyInstance(); +protected: + static wxMenuBarManager *sm_mbarmanInstance; +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + void SetMainMenuBar(wxMenuBar* menubar); + void WindowDidBecomeKey(NSNotification *notification); +#if 0 + void WindowDidResignKey(NSNotification *notification); + void WindowDidBecomeMain(NSNotification *notification); + void WindowDidResignMain(NSNotification *notification); + void WindowWillClose(NSNotification *notification); +#endif // 0 + void UpdateMenuBar(); +protected: + void SetMenuBar(wxMenuBar* menubar); + void InstallMenuBarForWindow(wxCocoaNSWindow *win); + void InstallMainMenu(); + WX_NSMenu m_menuApp; + WX_NSMenu m_menuServices; + WX_NSMenu m_menuWindows; + WX_NSMenu m_menuMain; + // Is main menu bar the current one + bool m_mainMenuBarInstalled; + // Main menu (if app provides one) + wxMenuBar *m_mainMenuBar; + wxMenuBarManagerObserver *m_observer; + WX_NSWindow m_currentNSWindow; +}; + +#endif // wxUSE_MENUS +#endif // _WX_COCOA_MBARMAN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/mdi.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/mdi.h new file mode 100644 index 0000000000..6cef55caf2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/mdi.h @@ -0,0 +1,163 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/mdi.h +// Purpose: wxMDIParentFrame, wxMDIChildFrame, wxMDIClientWindow +// Author: David Elliott +// Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes +// Created: 2003/09/08 +// Copyright: (c) 2003 David Elliott +// (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_MDI_H__ +#define __WX_COCOA_MDI_H__ + +#include "wx/frame.h" + +DECLARE_WXCOCOA_OBJC_CLASS(wxMDIParentFrameObserver); + +class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame; +class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow; + +WX_DECLARE_EXPORTED_LIST(wxMDIChildFrame, wxCocoaMDIChildFrameList); + +// ======================================================================== +// wxMDIParentFrame +// ======================================================================== +class WXDLLIMPEXP_CORE wxMDIParentFrame : public wxMDIParentFrameBase +{ + friend class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame; + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxMDIParentFrame() { Init(); } + wxMDIParentFrame(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + Create(parent, winid, title, pos, size, style, name); + } + + virtual ~wxMDIParentFrame(); + + bool Create(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); +protected: + void Init(); +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +public: + void WindowDidBecomeMain(NSNotification *notification); +protected: + virtual void CocoaDelegate_windowDidBecomeKey(void); + virtual void CocoaDelegate_windowDidResignKey(void); + virtual bool Cocoa_canBecomeMainWindow(bool &canBecome); + virtual wxMenuBar* GetAppMenuBar(wxCocoaNSWindow *win); + + void AddMDIChild(wxMDIChildFrame *child); + void RemoveMDIChild(wxMDIChildFrame *child); + + wxMDIParentFrameObserver *m_observer; +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + void SetActiveChild(wxMDIChildFrame *child); + + // implement base class pure virtuals + // ---------------------------------- + + static bool IsTDI() { return false; } + + virtual void ActivateNext() { /* TODO */ } + virtual void ActivatePrevious() { /* TODO */ } + +protected: + wxMDIClientWindow *m_clientWindow; + wxMDIChildFrame *m_currentChild; + wxCocoaMDIChildFrameList m_mdiChildren; +}; + +// ======================================================================== +// wxMDIChildFrame +// ======================================================================== +class WXDLLIMPEXP_CORE wxMDIChildFrame: public wxFrame +{ + friend class WXDLLIMPEXP_FWD_CORE wxMDIParentFrame; + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxMDIChildFrame() { Init(); } + wxMDIChildFrame(wxMDIParentFrame *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + Create(parent, winid, title, pos, size, style, name); + } + + virtual ~wxMDIChildFrame(); + + bool Create(wxMDIParentFrame *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); +protected: + void Init(); +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +public: +protected: + virtual void CocoaDelegate_windowDidBecomeKey(void); + virtual void CocoaDelegate_windowDidBecomeMain(void); + virtual void CocoaDelegate_windowDidResignKey(void); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual void Activate(); + virtual bool Destroy(); +protected: + wxMDIParentFrame *m_mdiParent; +}; + +// ======================================================================== +// wxMDIClientWindow +// ======================================================================== +class wxMDIClientWindow : public wxMDIClientWindowBase +{ +public: + wxMDIClientWindow() { } + + virtual bool CreateClient(wxMDIParentFrame *parent, + long style = wxHSCROLL | wxVSCROLL); + + DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) +}; + +#endif // __WX_COCOA_MDI_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/menu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/menu.h new file mode 100644 index 0000000000..0cb304126f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/menu.h @@ -0,0 +1,185 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/menu.h +// Purpose: wxMenu and wxMenuBar classes +// Author: David Elliott +// Modified by: +// Created: 2002/12/09 +// Copyright: (c) 2002 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_MENU_H__ +#define __WX_COCOA_MENU_H__ + +#include "wx/cocoa/NSMenu.h" + +#if wxUSE_ACCEL + #include "wx/accel.h" +#endif // wxUSE_ACCEL + +// ======================================================================== +// wxMenu +// ======================================================================== + +class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase, public wxCocoaNSMenu +{ +public: + // ctors and dtor + wxMenu(const wxString& title, long style = 0) + : wxMenuBase(title, style) + , m_cocoaDeletes(false) + { Create(title,style); } + bool Create(const wxString& title, long style = 0); + + wxMenu(long style = 0) : wxMenuBase(style) { Create(wxEmptyString, style); } + + virtual ~wxMenu(); + +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +public: + inline WX_NSMenu GetNSMenu() { return m_cocoaNSMenu; } + void SetCocoaDeletes(bool cocoaDeletes); + virtual void Cocoa_dealloc(); +protected: + WX_NSMenu m_cocoaNSMenu; + bool m_cocoaDeletes; +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +protected: + // implement base class virtuals + virtual wxMenuItem* DoAppend(wxMenuItem *item); + virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); + virtual wxMenuItem* DoRemove(wxMenuItem *item); + +#if wxUSE_ACCEL + // add/remove accel for the given menu item + void AddAccelFor(wxMenuItem *item); + void RemoveAccelFor(wxMenuItem *item); +#endif // wxUSE_ACCEL + +private: +#if wxUSE_ACCEL + // the accel table for this menu + wxAcceleratorTable m_accelTable; +#endif // wxUSE_ACCEL + + DECLARE_DYNAMIC_CLASS(wxMenu) +}; + +// ======================================================================== +// wxMenuBar +// ======================================================================== +class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase +{ +public: + // ctors and dtor + wxMenuBar(long style = 0) { Create(style); } + wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); + bool Create(long style = 0); + virtual ~wxMenuBar(); + +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +public: + inline WX_NSMenu GetNSMenu() { return m_cocoaNSMenu; } +protected: + WX_NSMenu m_cocoaNSMenu; +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // implement base class virtuals + virtual bool Append(wxMenu *menu, const wxString &title); + virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Remove(size_t pos); + + virtual void EnableTop(size_t pos, bool enable); + virtual bool IsEnabledTop(size_t pos) const; + + virtual void SetMenuLabel(size_t pos, const wxString& label); + virtual wxString GetMenuLabel(size_t pos) const; + + virtual void Attach(wxFrame *frame); + virtual void Detach(); + + // get the next item for the givan accel letter (used by wxFrame), return + // -1 if none + // + // if unique is not NULL, filled with TRUE if there is only one item with + // this accel, FALSE if two or more + int FindNextItemForAccel(int idxStart, + int keycode, + bool *unique = NULL) const; + + // called by wxFrame to set focus to or open the given menu + void SelectMenu(size_t pos); + +#if wxUSE_ACCEL + // find the item for the given accel and generate an event if found + bool ProcessAccelEvent(const wxKeyEvent& event); +#endif // wxUSE_ACCEL + +protected: + // event handlers + void OnLeftDown(wxMouseEvent& event); + void OnMouseMove(wxMouseEvent& event); + void OnKeyDown(wxKeyEvent& event); + void OnKillFocus(wxFocusEvent& event); + + // process the mouse move event, return TRUE if we did, FALSE to continue + // processing as usual + // + // the coordinates are client coordinates of menubar, convert if necessary + bool ProcessMouseEvent(const wxPoint& pt); + + // menubar geometry + virtual wxSize DoGetBestClientSize() const; + + // has the menubar been created already? + bool IsCreated() const { return m_frameLast != NULL; } + + // get the (total) width of the specified menu + wxCoord GetItemWidth(size_t pos) const; + + // get the rect of the item + wxRect GetItemRect(size_t pos) const; + + // get the menu from the given point or -1 if none + int GetMenuFromPoint(const wxPoint& pos) const; + + // refresh the given item + void RefreshItem(size_t pos); + + // refresh all items after this one (including it) + void RefreshAllItemsAfter(size_t pos); + + // do we show a menu currently? + bool IsShowingMenu() const { return m_menuShown != 0; } + + // we don't want to have focus except while selecting from menu + void GiveAwayFocus(); + + // the current item (only used when menubar has focus) + int m_current; + +private: + // the last frame to which we were attached, NULL initially + wxFrame *m_frameLast; + + // the currently shown menu or NULL + wxMenu *m_menuShown; + + // should be showing the menu? this is subtly different from m_menuShown != + // NULL as the menu which should be shown may be disabled in which case we + // don't show it - but will do as soon as the focus shifts to another menu + bool m_shouldShowMenu; + + DECLARE_DYNAMIC_CLASS(wxMenuBar) +}; + +#endif // _WX_COCOA_MENU_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/menuitem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/menuitem.h new file mode 100644 index 0000000000..23983171bb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/menuitem.h @@ -0,0 +1,99 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/menuitem.h +// Purpose: wxMenuItem class +// Author: David Elliott +// Modified by: +// Created: 2002/12/13 +// Copyright: (c) 2002 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_MENUITEM_H_ +#define _WX_COCOA_MENUITEM_H_ + +#include "wx/hashmap.h" +#include "wx/bitmap.h" + +#include "wx/cocoa/ObjcRef.h" + +// ======================================================================== +// wxMenuItem +// ======================================================================== + +#define wxMenuItemCocoa wxMenuItem +class wxMenuItemCocoa; +WX_DECLARE_HASH_MAP(WX_NSMenuItem,wxMenuItem*,wxPointerHash,wxPointerEqual,wxMenuItemCocoaHash); + +class WXDLLIMPEXP_CORE wxMenuItemCocoa : public wxMenuItemBase +{ +public: +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ + wxMenuItemCocoa(wxMenu *parentMenu = NULL, + int id = wxID_SEPARATOR, + const wxString& name = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL, + wxMenu *subMenu = NULL); + virtual ~wxMenuItemCocoa(); + +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +public: + inline WX_NSMenuItem GetNSMenuItem() { return m_cocoaNSMenuItem; } + static inline wxMenuItem* GetFromCocoa(WX_NSMenuItem cocoaNSMenuItem) + { + wxMenuItemCocoaHash::iterator iter=sm_cocoaHash.find(cocoaNSMenuItem); + if(iter!=sm_cocoaHash.end()) + return iter->second; + return NULL; + } + void CocoaItemSelected(); + bool Cocoa_validateMenuItem(); +protected: + void CocoaSetKeyEquivalent(); + WX_NSMenuItem m_cocoaNSMenuItem; + static wxMenuItemCocoaHash sm_cocoaHash; + static wxObjcAutoRefFromAlloc sm_cocoaTarget; +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // override base class virtuals to update the item appearance on screen + virtual void SetItemLabel(const wxString& text); + virtual void SetCheckable(bool checkable); + + virtual void Enable(bool enable = TRUE); + virtual void Check(bool check = TRUE); + + // we add some extra functions which are also available under MSW from + // wxOwnerDrawn class - they will be moved to wxMenuItemBase later + // hopefully + void SetBitmaps(const wxBitmap& bmpChecked, + const wxBitmap& bmpUnchecked = wxNullBitmap); + void SetBitmap(const wxBitmap& bmp) { SetBitmaps(bmp); } + const wxBitmap& GetBitmap(bool checked = TRUE) const + { return checked ? m_bmpChecked : m_bmpUnchecked; } + +protected: + // notify the menu about the change in this item + inline void NotifyMenu(); + + // set the accel index and string from text + void UpdateAccelInfo(); + + // the bitmaps (may be invalid, then they're not used) + wxBitmap m_bmpChecked, + m_bmpUnchecked; + + // the accel string (i.e. "Ctrl-Q" or "Alt-F1") + wxString m_strAccel; + +private: + DECLARE_DYNAMIC_CLASS(wxMenuItem) +}; + +#endif // _WX_COCOA_MENUITEM_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/msgdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/msgdlg.h new file mode 100644 index 0000000000..4a313c44af --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/msgdlg.h @@ -0,0 +1,70 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/msgdlg.h +// Purpose: wxMessageDialog class +// Author: Gareth Simpson +// Created: 2007-10-29 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_MSGDLG_H_ +#define _WX_COCOA_MSGDLG_H_ + +#include "wx/msgdlg.h" + +DECLARE_WXCOCOA_OBJC_CLASS(NSAlert); + +#ifndef wxUSE_COCOA_NATIVE_MSGDLG +// trunk: Always use Cocoa dialog +// 2.8: Only use Cocoa dialog if ABI incompatible features is on +// Build both on both branches (there was no wxCocoaMessageDialog class so it's not an ABI issue) + #if 1/* wxUSE_ABI_INCOMPATIBLE_FEATURES */ + #define wxUSE_COCOA_NATIVE_MSGDLG 1 + #else + #define wxUSE_COCOA_NATIVE_MSGDLG 0 + #endif +#endif + +#if wxUSE_COCOA_NATIVE_MSGDLG + #define wxMessageDialog wxCocoaMessageDialog +#else + #include "wx/generic/msgdlgg.h" + + #define wxMessageDialog wxGenericMessageDialog +#endif + +// ---------------------------------------------------------------------------- +// wxCocoaMessageDialog +// ---------------------------------------------------------------------------- + + +class WXDLLIMPEXP_CORE wxCocoaMessageDialog + : public wxMessageDialogWithCustomLabels +{ +public: + wxCocoaMessageDialog(wxWindow *parent, + const wxString& message, + const wxString& caption = wxMessageBoxCaptionStr, + long style = wxOK|wxCENTRE, + const wxPoint& pos = wxDefaultPosition); + + virtual int ShowModal(); + +protected: + // not supported for message dialog + virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} + + // override wxMessageDialogWithCustomLabels method to get rid of + // accelerators in the custom label strings + // + // VZ: I have no idea _why_ do we do this but the old version did and + // I didn't want to change the existing behaviour + virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label); + + DECLARE_DYNAMIC_CLASS(wxCocoaMessageDialog) + wxDECLARE_NO_COPY_CLASS(wxCocoaMessageDialog); +}; + +#endif // _WX_MSGDLG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/notebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/notebook.h new file mode 100644 index 0000000000..0fe99e91a1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/notebook.h @@ -0,0 +1,104 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/notebook.h +// Purpose: wxNotebook class +// Author: David Elliott +// Modified by: +// Created: 2004/04/08 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_NOTEBOOK_H__ +#define _WX_COCOA_NOTEBOOK_H__ + +#include "wx/cocoa/NSTabView.h" + +// ======================================================================== +// wxNotebook +// ======================================================================== +class WXDLLIMPEXP_CORE wxNotebook: public wxNotebookBase, protected wxCocoaNSTabView +{ + DECLARE_DYNAMIC_CLASS(wxNotebook) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSTabView,NSView,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxNotebook() { } + wxNotebook(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr) + { + Create(parent, winid, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr); + virtual ~wxNotebook(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + // Notebooks cannot be enabled/disabled + virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { } + virtual void CocoaDelegate_tabView_didSelectTabViewItem(WX_NSTabViewItem tabviewItem); + virtual bool CocoaDelegate_tabView_shouldSelectTabViewItem(WX_NSTabViewItem tabviewItem); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // set the currently selected page, return the index of the previously + // selected one (or wxNOT_FOUND on error) + int SetSelection(size_t nPage); + // get the currently selected page + int GetSelection() const; + + // changes selected page without sending events + int ChangeSelection(size_t nPage); + + // set/get the title of a page + bool SetPageText(size_t nPage, const wxString& strText); + wxString GetPageText(size_t nPage) const; + + // sets/returns item's image index in the current image list + int GetPageImage(size_t nPage) const; + bool SetPageImage(size_t nPage, int nImage); + + // set the size (the same for all pages) + void SetPageSize(const wxSize& size); + + // SetPadding and SetTabSize aren't possible to implement + void SetPadding(const wxSize& padding); + void SetTabSize(const wxSize& sz); + + //----------------------- + // adding/removing pages + + // remove one page from the notebook, without deleting + virtual wxNotebookPage *DoRemovePage(size_t nPage); + + // remove one page from the notebook + bool DeletePage(size_t nPage); + // remove all pages + bool DeleteAllPages(); + + // adds a new page to the notebook (it will be deleted ny the notebook, + // don't delete it yourself). If bSelect, this page becomes active. + // the same as AddPage(), but adds it at the specified position + bool InsertPage( size_t position, + wxNotebookPage *win, + const wxString& strText, + bool bSelect = false, + int imageId = NO_IMAGE ); + +protected: +}; + +#endif //ndef _WX_COCOA_NOTEBOOK_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSMenu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSMenu.h new file mode 100644 index 0000000000..780d306058 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSMenu.h @@ -0,0 +1,30 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/objc/NSMenu.h +// Purpose: WXNSMenu class +// Author: David Elliott +// Modified by: +// Created: 2007/04/20 (move from NSMenu.mm) +// Copyright: (c) 2002 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_OBJC_NSMENU_H__ +#define __WX_COCOA_OBJC_NSMENU_H__ + +#include "wx/cocoa/objc/objc_uniquifying.h" + +#import + +// ============================================================================ +// @class WXNSMenu +// ============================================================================ +@interface WXNSMenu : NSMenu +{ +} + +- (void)dealloc; + +@end // WXNSMenu +WX_DECLARE_GET_OBJC_CLASS(WXNSMenu,NSMenu) + +#endif //ndef __WX_COCOA_OBJC_NSMENU_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSSlider.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSSlider.h new file mode 100644 index 0000000000..3534d8576f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSSlider.h @@ -0,0 +1,36 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/objc/NSSlider.h +// Purpose: WXNSSlider class +// Author: David Elliott +// Modified by: +// Created: 2007/08/10 (move from NSSlider.mm) +// Copyright: (c) 2007 Software 2000 Ltd. +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_OBJC_NSSLIDER_H__ +#define __WX_COCOA_OBJC_NSSLIDER_H__ + +#include "wx/cocoa/objc/objc_uniquifying.h" + +#import + +// ============================================================================ +// @class WXNSSlider +// ============================================================================ + +@interface WXNSSlider : NSSlider +@end + +WX_DECLARE_GET_OBJC_CLASS(WXNSSlider,NSSlider) + +// ============================================================================ +// @class WXNSSliderCell +// ============================================================================ + +@interface WXNSSliderCell : NSSliderCell +@end + +WX_DECLARE_GET_OBJC_CLASS(WXNSSliderCell,NSSliderCell) + +#endif //ndef __WX_COCOA_OBJC_NSSLIDER_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSView.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSView.h new file mode 100644 index 0000000000..f4c5f04ebf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSView.h @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/objc/NSView.h +// Purpose: WXNSView class +// Author: David Elliott +// Modified by: +// Created: 2007/04/20 (move from NSView.mm) +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_OBJC_NSVIEW_H__ +#define __WX_COCOA_OBJC_NSVIEW_H__ + +#include "wx/cocoa/objc/objc_uniquifying.h" + +#import + +// ============================================================================ +// @class WXNSView +// ============================================================================ +@interface WXNSView : NSView +{ +} + +- (void)drawRect: (NSRect)rect; +- (void)mouseDown:(NSEvent *)theEvent; +- (void)mouseDragged:(NSEvent *)theEvent; +- (void)mouseUp:(NSEvent *)theEvent; +- (void)mouseMoved:(NSEvent *)theEvent; +- (void)mouseEntered:(NSEvent *)theEvent; +- (void)mouseExited:(NSEvent *)theEvent; +- (void)rightMouseDown:(NSEvent *)theEvent; +- (void)rightMouseDragged:(NSEvent *)theEvent; +- (void)rightMouseUp:(NSEvent *)theEvent; +- (void)otherMouseDown:(NSEvent *)theEvent; +- (void)otherMouseDragged:(NSEvent *)theEvent; +- (void)otherMouseUp:(NSEvent *)theEvent; +- (void)resetCursorRects; +- (void)viewDidMoveToWindow; +- (void)viewWillMoveToWindow:(NSWindow *)newWindow; +@end // WXNSView +WX_DECLARE_GET_OBJC_CLASS(WXNSView,NSView) + +#endif //ndef __WX_COCOA_OBJC_NSVIEW_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSWindow.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSWindow.h new file mode 100644 index 0000000000..bed9e59838 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/NSWindow.h @@ -0,0 +1,39 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/objc/NSWindow.h +// Purpose: WXNSWindow class +// Author: David Elliott +// Modified by: +// Created: 2007/04/20 (move from NSWindow.mm) +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#import +#import + +#include "wx/cocoa/objc/objc_uniquifying.h" + +// ============================================================================ +// @class WXNSWindow +// ============================================================================ +@interface WXNSWindow : NSWindow +{ +} + +- (BOOL)canBecomeKeyWindow; +- (BOOL)canBecomeMainWindow; +@end // WXNSWindow +WX_DECLARE_GET_OBJC_CLASS(WXNSWindow,NSWindow) + +// ============================================================================ +// @class WXNSPanel +// ============================================================================ +@interface WXNSPanel : NSPanel +{ +} + +- (BOOL)canBecomeKeyWindow; +- (BOOL)canBecomeMainWindow; +@end // WXNSPanel +WX_DECLARE_GET_OBJC_CLASS(WXNSPanel,NSPanel) + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/objc_uniquifying.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/objc_uniquifying.h new file mode 100644 index 0000000000..bedbf44677 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/objc/objc_uniquifying.h @@ -0,0 +1,364 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/objc/objc_uniquifying.h +// Purpose: Allows wxWidgets code to get a direct pointer to a compiled +// Objective-C class and provides a method to fix up the +// name to include a unique identifier (currently the address +// of the objc_class structure). +// Author: David Elliott +// Modified by: +// Created: 2007/05/15 +// Copyright: (c) 2007 Software 2000 Ltd. +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_OBJC_CLASS_H__ +#define __WX_COCOA_OBJC_CLASS_H__ + +/* A note about this header: +Nothing in here is guaranteed to exist in future versions of wxCocoa. There +are other ways of adding Objective-C classes at runtime and a future wxCocoa +might use these instead of this ugly hack. You may use this header file in +your own wxCocoa code if you need your own Objective-C classes to be +unqiuified. + +You cannot turn this on for 64-bit mode. It will not compile due to opaque +Objective-C data structures and it is not needed because it is a workaround +for a bug that does not exist in the 64-bit runtime. + +You should not use this when wxCocoa is built as a dynamic library. This has +only been tested for the case when wxCocoa is built as a static library and +statically linked to user code to form a loadable bundle (e.g. a Cocoa plugin). +It forces each plugin (when multiple wxCocoa-using plugins are used) to use +its own internal Objective-C classes which is desirable when wxCocoa is +statically linked to the rest of the code. + +Do not use uniquifying on your principal class. That one should be named +differently for different bundles. + */ + +#if wxUSE_OBJC_UNIQUIFYING + +// objc_getClass and stuff +#include + +////////////// Objective-C uniquifying implementation ////////////// + +template +class wxObjcClassInitializer; + +template +class UniquifiedName; + +template +class wxObjcCompilerInformation +{ + friend class wxObjcClassInitializer; + friend class UniquifiedName; +private: + // GetCompiledClass must be partially specialized for an ObjcType + // If you're not using it, implement an inline returning NULL + inline static struct objc_class * GetCompiledClass(); + + // sm_theClassName must be partially specialized for each type + static const char sm_theClassName[]; + + // GetSuperclass must be specialized. Typically one of two ways: + // 1. objc_getClass("SomeRealClassName") + // 2. wxGetObjcClass_SomeWxClassName(); + inline static struct objc_class *GetSuperclass(); +}; + + +template +struct UniquifiedName +{ + // We're going for OriginalClassName@ClassStructureAddress + // Therefore our size is the sizeof the original class name constant string (which includes the terminating NULL) + // plus the sizeof a pointer to struct objc_class times two (two hex digits for each byte) plus 3 for "@0x" + typedef char Type[sizeof(wxObjcCompilerInformation::sm_theClassName) + (sizeof(struct objc_class*)<<1) + 3]; + static void Init(Type m_theString, const objc_class *aClass) + { + snprintf(const_cast(m_theString), sizeof(Type), "%s@%p", wxObjcCompilerInformation::sm_theClassName, aClass); + } +}; + +/*! @function HidePointerFromGC + @abstract Returns an l-value whose location the compiler cannot know. + @discussion + The compiler-generated Objective-C class structures are located in the static data area. + They are by design Objective-C objects in their own right which makes the compiler issue + write barriers as if they were located in the GC-managed heap as most Objective-C objects. + + By accepting and returning a reference to any pointer type we can set any i-var of an + Objective-C object that is a pointer to another Objective-C object without the compiler + generating an objc_assign_ivar write barrier. It will instad generate an + objc_assign_strongCast write barrier which is the appropriate write-barrier when assigning + pointers to Objective-C objects located in unknown memory. + + For instance: + Class *someClass = ...; + HidePointerFromGC(someClass->isa) = ...; + */ +template +inline ObjcType * & HidePointerFromGC(ObjcType * &p) __attribute__((always_inline)); + +template +inline ObjcType * & HidePointerFromGC(ObjcType * &p) +{ + return p; +} + +template +class wxObjcClassInitializer +{ +public: + static struct objc_class* Get() + { + static wxObjcClassInitializer s_theInstance; + s_theInstance.noop(); // Make the compiler think we need this instance + return wxObjcCompilerInformation::GetCompiledClass(); + } +private: + void noop() + {} + // This "constructor" operates solely on static data + // It exists so that we can take advantage of a function-static + // "instance" of this class to do the static data initialization. + wxObjcClassInitializer() + { + // Objective-C class initialization occurs before C++ static initialization because the + // libobjc.dylib gets notified directly by dyld on Tiger. + // Therefore, even though we change the name, the class is still registered with the + // original name. We unfortunately can't change that. + + // The first time the class is loaded, Objective-C will already have fixed up the super_class + // and isa->isa and isa->super_class variables so much of this won't do anything. But + // the next time the class is loaded, Objective-C will ignore it and thus we need to + // initialize the data structures appropriately. + + // Ideally we'd have some sort of lock here, but we depend on the fact that we get called + // just before the first time someone wants to send a class message so it should be + // reasonably safe to do this without any locks. + + struct objc_class &theClassData = *wxObjcCompilerInformation::GetCompiledClass(); + // Initialize the uniquified class name + UniquifiedName::Init(sm_theUniquifiedClassName, &theClassData); + + //////// Class Initialization //////// + // Use objc_getClass to fix up the superclass pointer + theClassData.super_class = wxObjcCompilerInformation::GetSuperclass(); + // Fix up the compiler generated class struct to use the new name + theClassData.name = sm_theUniquifiedClassName; + + //////// Meta-Class Initialization //////// + // theClassData.isa is the metaclass pointer + // Globals on Darwin use PC-relative access (slow) so it's quicker to use theClassData.isa + + // In any object hierarchy a metaclass's metaclass is always the root class's metaclass + // Therefore, our superclass's metaclass's metaclass should already be the root class's metaclass + HidePointerFromGC(theClassData.isa->isa) = theClassData.super_class->isa->isa; + // A metaclass's superclass is always the superclass's metaclass. + HidePointerFromGC(theClassData.isa->super_class) = theClassData.super_class->isa; + // Fix up the compiler generated metaclass struct to use the new name + theClassData.isa->name = sm_theUniquifiedClassName; + + // We need to set the initialized flag because after we change the name, Objective-C can't + // look us up by name because we're only registered with the original name. + theClassData.isa->info |= CLS_INITIALIZED; + } + wxObjcClassInitializer(const wxObjcClassInitializer&); // NO COPY + wxObjcClassInitializer& operator =(const wxObjcClassInitializer&); // NO ASSIGN + static typename UniquifiedName::Type sm_theUniquifiedClassName; +}; + +template +typename UniquifiedName::Type wxObjcClassInitializer::sm_theUniquifiedClassName; + +// WX_DECLARE_GET_OBJC_CLASS +// Declares a function to get a direct pointer to an objective-C class. +// The class is guaranteed to be usable. +// When wxCocoa is built into a Mach-O bundle this function allows the wxCocoa +// code to get a reference to the Objective-C class structure located in the +// same bundle. This allows a static wxCocoa library to be built into +// two different Mach-O bundles without having one bundle's Objective-C +// classes trample on the other's. +// Right now we toss the ObjcSuperClass parameter, but we might use it later. +#define WX_DECLARE_GET_OBJC_CLASS(ObjcClass,ObjcSuperClass) \ +struct objc_class* wx_GetObjcClass_ ## ObjcClass(); + +// WX_IMPLEMENT_OBJC_GET_COMPILED_CLASS(ObjcClass) +// Provides an architecture-dependent way to get the direct pointer to the +// objc_class structure in the __OBJC segment. +// This takes advantage of the fact that the Objective-C compiler uses guessable +// local assembler labels for the class structures. +// Those class structures are only available on the Objective-C file containing the +// @implementation block. + +#if 1 +// Generic implementation - Tested on i386 and PPC. Should work in all cases. +// This is a hack that depends on GCC asm symbol names. +// The static variable winds up being initialized with a direct reference to the appropriate +// L_OBJC_CLASS and no global symbol reference is generated because nothing uses the global symbol +// except for the static initializer which does it directly. +// The generated assembler for s_objc_class_ptr is basically like this: +// _s_objc_class_ptr_ObjcClass: +// .long L_OBJC_CLASS_ObjcClass +// Once that static symbol is defined, the function implementation is easy for GCC to generate. +// Do note that return &s_objc_class_data_ObjcClass won't work. The code is wrong in this case. +#define WX_IMPLEMENT_OBJC_GET_COMPILED_CLASS(ObjcClass) \ +extern "C" objc_class s_objc_class_data_ ## ObjcClass asm("L_OBJC_CLASS_" #ObjcClass); \ +static objc_class * s_objc_class_ptr_ ## ObjcClass = &s_objc_class_data_ ## ObjcClass; \ +template<> \ +inline objc_class * wxObjcCompilerInformation::GetCompiledClass() \ +{ \ + return s_objc_class_ptr_## ObjcClass; \ +} + +#elif defined(__i386__) +// Not used because the generic implementation seems to work fine. +// But this is here since it was written beforehand and it also works. + +// This is based on the code GCC generates for accessing file-static data on i386. +// The i386 PC-relative addressing happens in this manner +// 1. The program counter is placed into ecx using the code that GCC should have +// already generated. +// 2. A label is placed directly after the call to get the program counter. +// 3. The Load Effective Address instruction is used to add the offset of the +// local assembler label we're interested in minus the local assembler label +// from step 2 to the program counter register in ecx and place the result +// into the result register (typically eax if not inlined). +#define WX_IMPLEMENT_OBJC_GET_COMPILED_CLASS(ObjcClass) \ +template<> \ +inline objc_class * wxObjcCompilerInformation::GetCompiledClass() \ +{ \ + register struct objc_class *retval; \ + asm \ + ( "call ___i686.get_pc_thunk.cx\n" \ + "\"LPC_FOR_GET_CLASS_" #ObjcClass "\":\n\t" \ + "leal L_OBJC_CLASS_" #ObjcClass "-\"LPC_FOR_GET_CLASS_" #ObjcClass "\"(%%ecx), %0" \ + : "=r"(retval) \ + : \ + : "ecx" \ + ); \ + return retval; \ +} + +#elif defined(__ppc__) +// Not used because the generic implementation seems to work fine. +// But this is here since it was written beforehand and it also works. + +// This is based on the code GCC generates for accessing file-static data on PPC. +// The PowerPC PC-relative addressing happens in this manner +// 1. The link register is saved (mflr) to a temporary (we re-use the output register for this) +// 2. An unconditional branch instruction (bcl) "branches" to the following address (labeled) +// 3. The link register (filled in by bcl) is saved to r10 (a temporary) +// 4. The previous link register is restored (mtlr) (from the output register we were using as a temporary) +// 5. The address of the LPC label as executed is added to the high 16 bits of the offset between that label and the static data we want +// and stored in a temporary register (r2) +// 6. That temporary register plus the low 16 bits of the offset are stored into the result register. +#define WX_IMPLEMENT_OBJC_GET_COMPILED_CLASS(ObjcClass) \ +template<> \ +inline objc_class * wxObjcCompilerInformation::GetCompiledClass() \ +{ \ + register struct objc_class *retval; \ + asm \ + ( "mflr %0" \ + "\n\tbcl 20, 31, \"LPC_FOR_GET_CLASS_" #ObjcClass "\"" \ + "\n\"LPC_FOR_GET_CLASS_" #ObjcClass "\":" \ + "\n\tmflr r10" \ + "\n\tmtlr %0" \ + "\n\taddis r2,r10,ha16(L_OBJC_CLASS_" #ObjcClass "-\"LPC_FOR_GET_CLASS_" #ObjcClass "\")" \ + "\n\tla %0,lo16(L_OBJC_CLASS_" #ObjcClass "-\"LPC_FOR_GET_CLASS_" #ObjcClass "\")(r2)" \ + : "=r" (retval) \ + : \ + : "r10","r2" \ + ); \ + return retval; \ +} + +// TODO: __x86_64__, __ppc64__ +#else // Can't write inline asm to bust into __OBJC segment +// This won't be used since the generic implementation takes precedence. + +#warning "Don't know how to implement wxObjcCompilerInformation::GetCompiledClass on this platform" + +#endif // platforms + +// The WX_IMPLEMENT_OBJC_GET_SUPERCLASS macro implements the template specialization +// to get the superclass. This only works if it's a real superclass. If you are +// deriving from a class that's already being uniquified then you'd need to +// implement the specialization to call the appropriate get method instead. +#define WX_IMPLEMENT_OBJC_GET_SUPERCLASS(ObjcClass,ObjcSuperClass) \ + template <> \ + inline objc_class* wxObjcCompilerInformation::GetSuperclass() \ + { \ + return objc_getClass(#ObjcSuperClass); \ + } + +// The WX_IMPLEMENT_OBJC_GET_UNIQUIFIED_SUPERCLASS macro implements the template +// specialization to get the superclass when the superclass is another uniquified +// Objective-C class. +#define WX_IMPLEMENT_OBJC_GET_UNIQUIFIED_SUPERCLASS(ObjcClass,ObjcSuperClass) \ + template <> \ + inline objc_class* wxObjcCompilerInformation::GetSuperclass() \ + { \ + return wx_GetObjcClass_ ## ObjcSuperClass(); \ + } + +// The WX_IMPLEMENT_OBJC_CLASS_NAME macro implements the template specialization +// of the sm_theClassName constant. As soon as this specialization is in place +// sizeof(sm_theClassName) will return the number of bytes at compile time. +#define WX_IMPLEMENT_OBJC_CLASS_NAME(ObjcClass) \ + template <> \ + const char wxObjcCompilerInformation::sm_theClassName[] = #ObjcClass; + +// The WX_IMPLEMENT_OBJC_GET_OBJC_CLASS macro is the final one that actually provides +// the wx_GetObjcClass_XXX function that will be called in lieu of asking the Objective-C +// runtime for the class. All the others are really machinery to make this happen. +#define WX_IMPLEMENT_OBJC_GET_OBJC_CLASS(ObjcClass) \ + objc_class* wx_GetObjcClass_ ## ObjcClass() \ + { \ + return wxObjcClassInitializer::Get(); \ + } + +// The WX_IMPLEMENT_GET_OBJC_CLASS macro combines all of these together +// for the case when the superclass is a non-uniquified class. +#define WX_IMPLEMENT_GET_OBJC_CLASS(ObjcClass,ObjcSuperClass) \ + WX_IMPLEMENT_OBJC_GET_COMPILED_CLASS(ObjcClass) \ + WX_IMPLEMENT_OBJC_GET_SUPERCLASS(ObjcClass,ObjcSuperClass) \ + WX_IMPLEMENT_OBJC_CLASS_NAME(ObjcClass) \ + WX_IMPLEMENT_OBJC_GET_OBJC_CLASS(ObjcClass) + +// The WX_IMPLEMENT_GET_OBJC_CLASS_WITH_UNIQUIFIED_SUPERCLASS macro combines all +// of these together for the case when the superclass is another uniquified class. +#define WX_IMPLEMENT_GET_OBJC_CLASS_WITH_UNIQUIFIED_SUPERCLASS(ObjcClass,ObjcSuperClass) \ + WX_IMPLEMENT_OBJC_GET_COMPILED_CLASS(ObjcClass) \ + WX_IMPLEMENT_OBJC_GET_UNIQUIFIED_SUPERCLASS(ObjcClass,ObjcSuperClass) \ + WX_IMPLEMENT_OBJC_CLASS_NAME(ObjcClass) \ + WX_IMPLEMENT_OBJC_GET_OBJC_CLASS(ObjcClass) + +// The WX_GET_OBJC_CLASS macro is intended to wrap the class name when the class +// is used as a message receiver (e.g. for calling class methods). When +// class name uniquifying is used, this calls the global function implemented +// in the Objective-C file containing the class @implementation. +#define WX_GET_OBJC_CLASS(ObjcClass) wx_GetObjcClass_ ## ObjcClass() + +#else // wxUSE_OBJC_UNIQUIFYING + +// Define WX_DECLARE_GET_OBJC_CLASS as nothing +#define WX_DECLARE_GET_OBJC_CLASS(ObjcClass,ObjcSuperClass) +// Define WX_IMPLEMENT_GET_OBJC_CLASS as nothing +#define WX_IMPLEMENT_GET_OBJC_CLASS(ObjcClass,ObjcSuperClass) +// Define WX_IMPLEMENT_GET_OBJC_CLASS_WITH_UNIQUIFIED_SUPERCLASS as nothing +#define WX_IMPLEMENT_GET_OBJC_CLASS_WITH_UNIQUIFIED_SUPERCLASS(ObjcClass,ObjcSuperClass) + +// Define WX_GET_OBJC_CLASS macro to output the class name and let the compiler do the normal thing +// The WX_GET_OBJC_CLASS macro is intended to wrap the class name when the class +// is used as a message receiver (e.g. for calling class methods). When +// class name uniquifying is not used, this is simply defined to be the class +// name which will allow the compiler to do the normal thing. +#define WX_GET_OBJC_CLASS(ObjcClass) ObjcClass + +#endif // wxUSE_OBJC_UNIQUIFYING + +#endif //ndef __WX_COCOA_OBJC_CLASS_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/pen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/pen.h new file mode 100644 index 0000000000..66a0c7f367 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/pen.h @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/pen.h +// Purpose: wxPen class +// Author: David Elliott +// Modified by: +// Created: 2003/08/02 (stubs from 22.03.2003) +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_PEN_H__ +#define __WX_COCOA_PEN_H__ + +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +class WXDLLIMPEXP_FWD_CORE wxColour; +class WXDLLIMPEXP_FWD_CORE wxBitmap; + +// ======================================================================== +// wxPen +// ======================================================================== +class WXDLLIMPEXP_CORE wxPen: public wxGDIObject +{ +public: + wxPen(); + wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); +#endif + wxPen(const wxBitmap& stipple, int width); + virtual ~wxPen(); + + // FIXME: operator==() is wrong + bool operator==(const wxPen& pen) const { return m_refData == pen.m_refData; } + bool operator!=(const wxPen& pen) const { return !(*this == pen); } + + void SetColour(const wxColour& col) ; + void SetColour(unsigned char r, unsigned char g, unsigned char b) ; + + void SetWidth(int width); + void SetStyle(wxPenStyle style); + void SetStipple(const wxBitmap& stipple); + void SetDashes(int nb_dashes, const wxDash *dash); + void SetJoin(wxPenJoin join); + void SetCap(wxPenCap cap); + + wxColour GetColour() const; + int GetWidth() const; + wxPenStyle GetStyle() const; + wxPenJoin GetJoin() const; + wxPenCap GetCap() const; + int GetDashes(wxDash **ptr) const; + wxBitmap *GetStipple() const; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxPenStyle)style); } +#endif + + // Cocoa-specific + WX_NSColor GetNSColor(); + int GetCocoaLineDash(const CGFloat **pattern); + +protected: + wxGDIRefData *CreateGDIRefData() const; + wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxPen) +}; + +#endif // __WX_COCOA_PEN_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/private/fontfactory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/private/fontfactory.h new file mode 100644 index 0000000000..7cbfcfe0d1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/private/fontfactory.h @@ -0,0 +1,27 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/private/fontfactory.h +// Purpose: wxFontFactory class +// Author: David Elliott +// Modified by: +// Created: 2007-10-13 +// Copyright: 2007 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_FONTFACTORY_H_ +#define _WX_COCOA_FONTFACTORY_H_ + +/*! @discussion + This class exists so that wxFont need not know about wxSettings + The implementation, however, is in the font.mm file because the + implementation needs to have knowledge of wxFontRefData. + */ +class wxCocoaFontFactory +{ +public: + /*! @abstract Create an instance with the specified NSFont and underline flag. + */ + static wxFont InstanceForNSFont(WX_NSFont cocoaFont, bool underlined = false); +}; + +#endif //_WX_COCOA_FONTFACTORY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/private/scrollview.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/private/scrollview.h new file mode 100644 index 0000000000..fe07ff9fa1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/private/scrollview.h @@ -0,0 +1,128 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/private/scrollview.h +// Purpose: wxWindowCocoaScrollView +// Author: David Elliott +// Modified by: +// Created: 2008/02/14 +// Copyright: (c) 2003- David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_SCROLLVIEW_H__ +#define _WX_COCOA_SCROLLVIEW_H__ + +@class NSScroller; + +// ======================================================================== +// wxWindowCocoaScrollView +// ======================================================================== +class wxWindowCocoaScrollView: protected wxCocoaNSView +{ + wxDECLARE_NO_COPY_CLASS(wxWindowCocoaScrollView); +public: + wxWindowCocoaScrollView(wxWindow *owner); + virtual ~wxWindowCocoaScrollView(); + inline WX_NSScrollView GetNSScrollView() { return m_cocoaNSScrollView; } + void ClientSizeToSize(int &width, int &height); + void DoGetClientSize(int *x, int *y) const; + void Encapsulate(); + void Unencapsulate(); + + // wxWindow calls this to do the work. Note that we don't have the refresh parameter + // because wxWindow handles that itself. + void SetScrollbar(int orientation, int position, int thumbSize, int range); + int GetScrollPos(wxOrientation orient); + void SetScrollPos(wxOrientation orient, int position); + int GetScrollRange(wxOrientation orient); + int GetScrollThumb(wxOrientation orient); + void ScrollWindow(int dx, int dy, const wxRect*); + void UpdateSizes(); + + void _wx_doScroller(NSScroller *sender); + +protected: + wxWindowCocoa *m_owner; + WX_NSScrollView m_cocoaNSScrollView; + virtual void Cocoa_FrameChanged(void); + virtual void Cocoa_synthesizeMouseMoved(void) {} + /*! + Flag as to whether we're scrolling for a native view or a custom + wxWindow. This controls the scrolling behaviour. When providing + scrolling for a native view we don't catch scroller action messages + and thus don't send scroll events and we don't actually scroll the + window when the application calls ScrollWindow. + + When providing scrolling for a custom wxWindow, we make the NSScroller + send their action messages to us which we in turn package as wx window + scrolling events. At this point, the window will not physically be + scrolled. The application will most likely handle the event by calling + ScrollWindow which will do the real scrolling. On the other hand, + the application may instead not call ScrollWindow until some threshold + is reached. This causes the window to only scroll in steps which is + what, for instance, wxScrolledWindow does. + */ + bool m_isNativeView; + /*! + The range as the application code wishes to see it. That is, the + range from the last SetScrollbar call for the appropriate dimension. + The horizontal dimension is the first [0] element and the vertical + dimension the second [1] element. + + In wxMSW, a SCROLLINFO with nMin=0 and nMax=range-1 is used which + gives exactly range possible positions so long as nPage (which is + the thumb size) is less than or equal to 1. + */ + int m_scrollRange[2]; + /*! + The thumb size is intended to reflect the size of the visible portion + of the scrolled document. As the document size increases, the thumb + visible thumb size decreases. As document size decreases, the visible + thumb size increases. However, the thumb size on wx is defined in + terms of scroll units (which are effectively defined by the scroll + range) and so increasing the number of scroll units to reflect increased + document size will have the effect of decreasing the visible thumb + size even though the number doesn't change. + + It's also important to note that subtracting the thumb size from the + full range gives you the real range that can be used. Microsoft + defines nPos (the current scrolling position) to be within the range + from nMin to nMax - max(nPage - 1, 0). We know that wxMSW code always + sets nMin = 0 and nMax = range -1. So let's algebraically reduce the + definition of the maximum allowed position: + + Begin: + = nMax - max(nPage - 1, 0) + Substitute (range - 1) for nMax and thumbSize for nPage: + = range - 1 - max(thumbSize - 1, 0) + Add one inside the max conditional and subtract one outside of it: + = range - 1 - (max(thumbSize - 1 + 1, 1) - 1) + Reduce some constants: + = range - 1 - (max(thumbSize, 1) - 1) + Distribute the negative across the parenthesis: + = range - 1 - max(thumbSize, 1) + 1 + Reduce the constants: + = range - max(thumbSize, 1) + + Also keep in mind that thumbSize may never be greater than range but + can be equal to it. Thus for the smallest possible thumbSize there + are exactly range possible scroll positions (numbered from 0 to + range - 1) and for the largest possible thumbSize there is exactly + one possible scroll position (numbered 0). + */ + int m_scrollThumb[2]; + + /*! + The origin of the virtual coordinate space expressed in terms of client + coordinates. Starts at (0,0) and each call to ScrollWindow accumulates + into it. Thus if the user scrolls the window right (thus causing the + contents to move left with respect to the client origin, the + application code (typically wxScrolledWindow) will be called with + dx of -something, for example -20. This is added to m_virtualOrigin + and thus m_virtualOrigin will be (-20,0) in this example. + */ + wxPoint m_virtualOrigin; +private: + wxWindowCocoaScrollView(); +}; + +#endif //ndef _WX_COCOA_SCROLLVIEW_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/private/timer.h new file mode 100644 index 0000000000..1dec2cf7fb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/private/timer.h @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/private/timer.h +// Purpose: Cocoa wxTimer class +// Author: Ryan Norton +// Copyright: (c) Ryan Norton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_PRIVATE_TIMER_H_ +#define _WX_COCOA_PRIVATE_TIMER_H_ + +#include "wx/private/timer.h" + +#include "wx/cocoa/ObjcRef.h" + +//----------------------------------------------------------------------------- +// wxTimer +//----------------------------------------------------------------------------- + +DECLARE_WXCOCOA_OBJC_CLASS(NSTimer); + +class WXDLLIMPEXP_CORE wxCocoaTimerImpl : public wxTimerImpl +{ +public: + wxCocoaTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { Init(); } + virtual ~wxCocoaTimerImpl(); + + virtual bool Start(int millisecs = -1, bool oneShot = false); + virtual void Stop(); + + virtual bool IsRunning() const; + + WX_NSTimer GetNSTimer() { return m_cocoaNSTimer; } + +protected: + void Init(); + +private: + WX_NSTimer m_cocoaNSTimer; +}; + +#endif // _WX_COCOA_PRIVATE_TIMER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/radiobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/radiobox.h new file mode 100644 index 0000000000..a56a0c654b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/radiobox.h @@ -0,0 +1,137 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/radiobox.h +// Purpose: wxRadioBox class +// Author: David Elliott +// Modified by: +// Created: 2003/03/18 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_RADIOBOX_H__ +#define __WX_COCOA_RADIOBOX_H__ + +// #include "wx/cocoa/NSButton.h" +DECLARE_WXCOCOA_OBJC_CLASS(NSMatrix); + +// ======================================================================== +// wxRadioBox +// ======================================================================== +class WXDLLIMPEXP_CORE wxRadioBox: public wxControl, public wxRadioBoxBase// , protected wxCocoaNSButton +{ + DECLARE_DYNAMIC_CLASS(wxRadioBox) + DECLARE_EVENT_TABLE() + // NOTE: We explicitly skip NSControl because our primary cocoa view is + // the NSBox but we want to receive action messages from the NSMatrix. + WX_DECLARE_COCOA_OWNER(NSBox,NSView,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxRadioBox() { } + wxRadioBox(wxWindow *parent, wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, + long style = 0, const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Create(parent, winid, title, pos, size, n, choices, majorDim, style, validator, name); + } + wxRadioBox(wxWindow *parent, wxWindowID winid, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, + long style = 0, const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Create(parent, winid, title, pos, size, choices, majorDim, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + bool Create(wxWindow *parent, wxWindowID winid, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + virtual ~wxRadioBox(); + + // Enabling + virtual bool Enable(unsigned int n, bool enable = true); + virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + // Showing + virtual bool Show(unsigned int n, bool show = true); + virtual bool IsItemShown(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + // Radio boxes cannot be enabled/disabled + virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { } + virtual void CocoaTarget_action(void); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: +// Pure virtuals + // selection + virtual void SetSelection(int n); + virtual int GetSelection() const; + // string access + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& label); + // change the individual radio button state +protected: + // We don't want the typical wxCocoaNSBox behaviour because our real + // implementation is by using an NSMatrix as the NSBox's contentView. + WX_NSMatrix GetNSMatrix() const; + void AssociateNSBox(WX_NSBox theBox); + void DisassociateNSBox(WX_NSBox theBox); + + virtual wxSize DoGetBestSize() const; + + int GetRowForIndex(int n) const + { + if(m_windowStyle & wxRA_SPECIFY_COLS) + return n / GetMajorDim(); + else + return n % GetMajorDim(); + } + + int GetColumnForIndex(int n) const + { + if(m_windowStyle & wxRA_SPECIFY_COLS) + return n % GetMajorDim(); + else + return n / GetMajorDim(); + } +}; + +#endif // __WX_COCOA_RADIOBOX_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/radiobut.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/radiobut.h new file mode 100644 index 0000000000..4a78b617c2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/radiobut.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/radiobut.h +// Purpose: wxRadioButton class +// Author: David Elliott +// Modified by: +// Created: 2003/03/18 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_RADIOBUT_H__ +#define __WX_COCOA_RADIOBUT_H__ + +#include "wx/cocoa/NSButton.h" + +class WXDLLIMPEXP_FWD_CORE wxRadioButton; + +WX_DECLARE_EXPORTED_LIST(wxRadioButton, wxRadioButtonList); + +// ======================================================================== +// wxRadioButton +// ======================================================================== +class WXDLLIMPEXP_CORE wxRadioButton: public wxControl, protected wxCocoaNSButton +{ + DECLARE_DYNAMIC_CLASS(wxRadioButton) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxRadioButton() { m_radioMaster = NULL; } + wxRadioButton(wxWindow *parent, wxWindowID winid, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr) + { + Create(parent, winid, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr); + virtual ~wxRadioButton(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + virtual void Cocoa_wxNSButtonAction(void); +private: + void Cocoa_DeselectOtherButtonsInTheGroup(void); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual void SetValue(bool); + virtual bool GetValue() const; + virtual void SetLabel(const wxString& label); + virtual wxString GetLabel() const; +protected: + wxRadioButtonList m_radioSlaves; + wxRadioButton *m_radioMaster; +}; + +#endif // __WX_COCOA_RADIOBUT_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/region.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/region.h new file mode 100644 index 0000000000..c9aed9592d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/region.h @@ -0,0 +1,75 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/region.h +// Purpose: wxRegion class +// Author: David Elliott +// Modified by: +// Created: 2004/04/12 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_REGION_H__ +#define _WX_COCOA_REGION_H__ + +#include "wx/generic/region.h" + +#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) +typedef struct CGRect NSRect; +#else +typedef struct _NSRect NSRect; +#endif + +class WXDLLIMPEXP_CORE wxRegion : public wxRegionGeneric +{ +public: + wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h) + : wxRegionGeneric(x,y,w,h) + {} + wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight) + : wxRegionGeneric(topLeft, bottomRight) + {} + wxRegion(const wxRect& rect) + : wxRegionGeneric(rect) + {} + wxRegion() {} + wxRegion(const wxBitmap& bmp) + : wxRegionGeneric() + { Union(bmp); } + wxRegion(const wxBitmap& bmp, + const wxColour& transColour, int tolerance = 0) + : wxRegionGeneric() + { Union(bmp, transColour, tolerance); } + virtual ~wxRegion() {} + wxRegion(const wxRegion& r) + : wxRegionGeneric(r) + {} + wxRegion& operator= (const wxRegion& r) + { return *(wxRegion*)&(this->wxRegionGeneric::operator=(r)); } + + // Cocoa-specific creation + wxRegion(const NSRect& rect); + wxRegion(const NSRect *rects, int count); + +private: + DECLARE_DYNAMIC_CLASS(wxRegion); +}; + +class WXDLLIMPEXP_CORE wxRegionIterator : public wxRegionIteratorGeneric +{ +// DECLARE_DYNAMIC_CLASS(wxRegionIteratorGeneric); +public: + wxRegionIterator() {} + wxRegionIterator(const wxRegion& region) + : wxRegionIteratorGeneric(region) + {} + wxRegionIterator(const wxRegionIterator& iterator) + : wxRegionIteratorGeneric(iterator) + {} + virtual ~wxRegionIterator() {} + + wxRegionIterator& operator=(const wxRegionIterator& iter) + { return *(wxRegionIterator*)&(this->wxRegionIteratorGeneric::operator=(iter)); } +}; + +#endif + //ndef _WX_COCOA_REGION_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/scrolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/scrolbar.h new file mode 100644 index 0000000000..a051896ef7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/scrolbar.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/scrolbar.h +// Purpose: wxScrollBar class +// Author: David Elliott +// Modified by: +// Created: 2004/04/25 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_SCROLBAR_H__ +#define _WX_COCOA_SCROLBAR_H__ + +#include "wx/cocoa/NSScroller.h" + +// ======================================================================== +// wxScrollBar +// ======================================================================== +class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase, protected wxCocoaNSScroller +{ + DECLARE_DYNAMIC_CLASS(wxScrollBar) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSScroller,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxScrollBar() { } + wxScrollBar(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr) + { + Create(parent, winid, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr); + virtual ~wxScrollBar(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + virtual void Cocoa_wxNSScrollerAction(void); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // accessors + virtual int GetThumbPosition() const; + virtual int GetThumbSize() const { return m_thumbSize; } + virtual int GetPageSize() const { return m_pageSize; } + virtual int GetRange() const { return m_range; } + + // operations + virtual void SetThumbPosition(int viewStart); + virtual void SetScrollbar(int position, int thumbSize, + int range, int pageSize, + bool refresh = TRUE); +protected: + int m_range; + int m_thumbSize; + int m_pageSize; +}; + +#endif + // _WX_COCOA_SCROLBAR_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/slider.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/slider.h new file mode 100644 index 0000000000..5e73aa1796 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/slider.h @@ -0,0 +1,107 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/slider.h +// Purpose: wxSlider class +// Author: David Elliott +// Mark Oxenham +// Modified by: +// Created: 2003/06/19 +// Copyright: (c) 2003 David Elliott +// (c) 2007 Software 2000 Ltd. +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_SLIDER_H__ +#define __WX_COCOA_SLIDER_H__ + +#include "wx/cocoa/NSSlider.h" + +// ======================================================================== +// wxSlider +// ======================================================================== +class WXDLLIMPEXP_CORE wxSlider: public wxSliderBase, protected wxCocoaNSSlider +{ + DECLARE_DYNAMIC_CLASS(wxSlider) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSSlider,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxSlider() { } + wxSlider(wxWindow *parent, wxWindowID winid, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr) + { + Create(parent, winid, value, minValue, maxValue, + pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr); + virtual ~wxSlider(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + // Override this so we can use wxCocoaNSControl's target + void AssociateNSSlider(WX_NSSlider theSlider); + + // Helper method to do the real work + virtual void ProcessEventType(wxEventType commandType); + + // from wxCocoaNSControl: + virtual void CocoaTarget_action(); + + // from wxCocoaNSSlider: + virtual void CocoaNotification_startTracking(WX_NSNotification notification); + virtual void CocoaNotification_continueTracking(WX_NSNotification notification); + virtual void CocoaNotification_stopTracking(WX_NSNotification notification); + +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // Pure Virtuals + virtual int GetValue() const; + virtual void SetValue(int value); + + // retrieve/change the range + virtual void SetRange(int minValue, int maxValue); + virtual int GetMin() const; + virtual int GetMax() const; + + // the line/page size is the increment by which the slider moves when + // cursor arrow key/page up or down are pressed (clicking the mouse is like + // pressing PageUp/Down) and are by default set to 1 and 1/10 of the range + virtual void SetLineSize(int lineSize); + virtual void SetPageSize(int pageSize); + virtual int GetLineSize() const; + virtual int GetPageSize() const; + + // these methods get/set the length of the slider pointer in pixels + virtual void SetThumbLength(int lenPixels); + virtual int GetThumbLength() const; + + // copied from (wxSliderCocoa.h) + virtual int GetTickFreq() const; + virtual void ClearTicks() { SetTickFreq(0); } + + virtual void SetTickPos(int pos); + +protected: + // Platform-specific implementation of SetTickFreq + virtual void DoSetTickFreq(int freq); +}; + +#endif + // __WX_COCOA_SLIDER_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/sound.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/sound.h new file mode 100644 index 0000000000..362e2e288d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/sound.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/sound.h +// Purpose: wxSound class (loads and plays short Windows .wav files). +// Optional on non-Windows platforms. +// Authors: David Elliott, Ryan Norton +// Modified by: +// Created: 2004-10-02 +// Copyright: (c) 2004 David Elliott, Ryan Norton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_SOUND_H_ +#define _WX_COCOA_SOUND_H_ + +#include "wx/object.h" +#include "wx/cocoa/ObjcRef.h" + +class WXDLLIMPEXP_ADV wxSound : public wxSoundBase +{ +public: + wxSound() + : m_cocoaNSSound(NULL) + {} + wxSound(const wxString& fileName, bool isResource = false) + : m_cocoaNSSound(NULL) + { Create(fileName, isResource); } + wxSound(size_t size, const void* data) + : m_cocoaNSSound(NULL) + { LoadWAV(data,size,true); } + wxSound(const wxSound& sound); // why not? + virtual ~wxSound(); + +public: + bool Create(const wxString& fileName, bool isResource = false); + bool IsOk() const + { return m_cocoaNSSound; } + static void Stop(); + static bool IsPlaying(); + + void SetNSSound(WX_NSSound cocoaNSSound); + inline WX_NSSound GetNSSound() + { return m_cocoaNSSound; } +protected: + bool DoPlay(unsigned flags) const; + bool LoadWAV(const void* data, size_t length, bool copyData); +private: + WX_NSSound m_cocoaNSSound; + static const wxObjcAutoRefFromAlloc sm_cocoaDelegate; +}; + +#endif //ndef _WX_COCOA_SOUND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/spinbutt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/spinbutt.h new file mode 100644 index 0000000000..d4dc80dfc0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/spinbutt.h @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/spinbutt.h +// Purpose: wxSpinButton class +// Author: David Elliott +// Modified by: +// Created: 2003/07/14 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_SPINBUTT_H__ +#define __WX_COCOA_SPINBUTT_H__ + +// #include "wx/cocoa/NSStepper.h" + +// ======================================================================== +// wxSpinButton +// ======================================================================== +class WXDLLIMPEXP_CORE wxSpinButton: public wxSpinButtonBase// , protected wxCocoaNSStepper +{ + DECLARE_DYNAMIC_CLASS(wxSpinButton) + DECLARE_EVENT_TABLE() +// WX_DECLARE_COCOA_OWNER(NSStepper,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxSpinButton() { } + wxSpinButton(wxWindow *parent, wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, + const wxString& name = wxSPIN_BUTTON_NAME) + { + Create(parent, winid, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_HORIZONTAL, + const wxString& name = wxSPIN_BUTTON_NAME); + virtual ~wxSpinButton(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + virtual void CocoaTarget_action(); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // Pure Virtuals + virtual int GetValue() const; + virtual void SetValue(int value); + + // retrieve/change the range + virtual void SetRange(int minValue, int maxValue); +}; + +#endif + // __WX_COCOA_SPINBUTT_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/statbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/statbmp.h new file mode 100644 index 0000000000..f06b129d9f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/statbmp.h @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/statbmp.h +// Purpose: wxStaticBitmap class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_STATBMP_H__ +#define __WX_COCOA_STATBMP_H__ + +DECLARE_WXCOCOA_OBJC_CLASS(NSImageView); + +// ======================================================================== +// wxStaticBitmap +// ======================================================================== +class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase //, protected wxCocoaNSxxx +{ + DECLARE_DYNAMIC_CLASS(wxStaticBitmap) + DECLARE_EVENT_TABLE() +// WX_DECLARE_COCOA_OWNER(NSxxx,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxStaticBitmap() {} + wxStaticBitmap(wxWindow *parent, wxWindowID winid, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxStaticBitmapNameStr) + { + Create(parent, winid, bitmap, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxStaticBitmapNameStr); + virtual ~wxStaticBitmap(); + +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ + WX_NSImageView GetNSImageView() { return (WX_NSImageView)m_cocoaNSView; } + wxBitmap m_bitmap; + +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ + virtual void SetIcon(const wxIcon& icon); + virtual void SetBitmap(const wxBitmap& bitmap); + virtual wxBitmap GetBitmap() const; +}; + +#endif // __WX_COCOA_STATBMP_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/statbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/statbox.h new file mode 100644 index 0000000000..f19579850c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/statbox.h @@ -0,0 +1,60 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/statbox.h +// Purpose: wxStaticBox class +// Author: David Elliott +// Modified by: +// Created: 2003/03/18 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_STATBOX_H__ +#define __WX_COCOA_STATBOX_H__ + +#include "wx/cocoa/NSBox.h" + +// ======================================================================== +// wxStaticBox +// ======================================================================== +class WXDLLIMPEXP_CORE wxStaticBox: public wxStaticBoxBase, protected wxCocoaNSBox +{ + DECLARE_DYNAMIC_CLASS(wxStaticBox) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSBox,NSView,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxStaticBox() { } + wxStaticBox(wxWindow *parent, wxWindowID winid, const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, const wxString& name = wxStaticBoxNameStr) + { + Create(parent, winid, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, const wxString& name = wxStaticBoxNameStr); + virtual ~wxStaticBox(); + + virtual void SetLabel(const wxString& label); + virtual wxString GetLabel() const; + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + // Static boxes cannot be enabled/disabled + virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { } +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; +protected: +}; + +#endif // __WX_COCOA_STATBOX_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/statline.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/statline.h new file mode 100644 index 0000000000..3834a37637 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/statline.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/statline.h +// Purpose: wxStaticLine class +// Author: David Elliott +// Modified by: +// Created: 2003/03/18 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_STATLINE_H__ +#define __WX_COCOA_STATLINE_H__ + +// #include "wx/cocoa/NSButton.h" + +// ======================================================================== +// wxStaticLine +// ======================================================================== +class WXDLLIMPEXP_CORE wxStaticLine: public wxStaticLineBase// , protected wxCocoaNSButton +{ + DECLARE_DYNAMIC_CLASS(wxStaticLine) + DECLARE_EVENT_TABLE() +// WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxStaticLine() { } + wxStaticLine(wxWindow *parent, wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, const wxString& name = wxStaticLineNameStr) + { + Create(parent, winid, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, const wxString& name = wxStaticLineNameStr); + virtual ~wxStaticLine(); + +// ------------------------------------------------------------------------ +// Cocoa callbacks +// ------------------------------------------------------------------------ +protected: + // Static lines cannot be enabled/disabled + virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { } +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: +}; + +#endif // __WX_COCOA_STATLINE_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/stattext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/stattext.h new file mode 100644 index 0000000000..176d53a0be --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/stattext.h @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/stattext.h +// Purpose: wxStaticText class +// Author: David Elliott +// Modified by: +// Created: 2003/02/15 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_STATTEXT_H__ +#define __WX_COCOA_STATTEXT_H__ + +#include "wx/cocoa/NSTextField.h" + +// ======================================================================== +// wxStaticText +// ======================================================================== +class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase, protected wxCocoaNSTextField +{ + DECLARE_DYNAMIC_CLASS(wxStaticText) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSTextField,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxStaticText() {} + wxStaticText(wxWindow *parent, wxWindowID winid, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxStaticTextNameStr) + { + Create(parent, winid, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxStaticTextNameStr); + virtual ~wxStaticText(); + +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +protected: + virtual void Cocoa_didChangeText(void); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual void SetLabel(const wxString& label); + virtual wxString GetLabel() const; +}; + +#endif // __WX_COCOA_STATTEXT_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/string.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/string.h new file mode 100644 index 0000000000..65112a053a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/string.h @@ -0,0 +1,52 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/string.h +// Purpose: String conversion methods +// Author: David Elliott +// Modified by: +// Created: 2003/04/13 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_STRING_H__ +#define __WX_COCOA_STRING_H__ + +#import +#include "wx/string.h" + +// FIXME: In unicode mode we are doing the conversion twice. wxString +// converts to UTF-8 and NSString converts from UTF-8. +// One possible optimization is to convert to the wxString internal +// representation which is an unsigned short (unichar) but unfortunately +// there is little documentation on which encoding it uses by default. + +// Return an autoreleased NSString +inline NSString* wxNSStringWithWxString(const wxString &wxstring) +{ +#if wxUSE_UNICODE + return [NSString stringWithUTF8String: wxstring.utf8_str()]; +#else + return [NSString stringWithCString: wxstring.c_str() length:wxstring.Len()]; +#endif // wxUSE_UNICODE +} + +// Intialize an NSString which has already been allocated +inline NSString* wxInitNSStringWithWxString(NSString *nsstring, const wxString &wxstring) +{ +#if wxUSE_UNICODE + return [nsstring initWithUTF8String: wxstring.utf8_str()]; +#else + return [nsstring initWithCString: wxstring.c_str() length:wxstring.Len()]; +#endif // wxUSE_UNICODE +} + +inline wxString wxStringWithNSString(NSString *nsstring) +{ +#if wxUSE_UNICODE + return wxString::FromUTF8Unchecked([nsstring UTF8String]); +#else + return wxString([nsstring lossyCString]); +#endif // wxUSE_UNICODE +} + +#endif // __WX_COCOA_STRING_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/taskbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/taskbar.h new file mode 100644 index 0000000000..9c52bfc6c8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/taskbar.h @@ -0,0 +1,47 @@ +///////////////////////////////////////////////////////////////////////// +// File: wx/cocoa/taskbar.h +// Purpose: Defines wxTaskBarIcon class +// Author: David Elliott +// Modified by: +// Created: 2004/01/24 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_TASKBAR_H__ +#define _WX_COCOA_TASKBAR_H__ + +#include "wx/icon.h" + +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxMenu; + +class wxTaskBarIconCocoaImpl; + +class WXDLLIMPEXP_ADV wxTaskBarIcon : public wxTaskBarIconBase +{ + friend class wxTaskBarIconCocoaImpl; + DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon) +public: + //type of taskbar item to create (currently only DOCK is implemented) + enum wxTaskBarIconType + { DOCK + , CUSTOM_STATUSITEM +// , STATUSITEM // TODO: Implement using NSStatusItem w/o custom NSView +// , MENUEXTRA // Menu extras require undocumented hacks + , DEFAULT_TYPE = CUSTOM_STATUSITEM + }; + + // Only one wxTaskBarIcon can be of the Dock type so by default + // create NSStatusItem for maximum source compatibility. + wxTaskBarIcon(wxTaskBarIconType iconType = DEFAULT_TYPE); + virtual ~wxTaskBarIcon(); + + bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString); + bool RemoveIcon(); + bool PopupMenu(wxMenu *menu); //, int x, int y); +protected: + wxTaskBarIconCocoaImpl *m_impl; +}; + +#endif // _WX_COCOA_TASKBAR_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/textctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/textctrl.h new file mode 100644 index 0000000000..d7b8c0aa7c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/textctrl.h @@ -0,0 +1,122 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/textctrl.h +// Purpose: wxTextCtrl class +// Author: David Elliott +// Modified by: +// Created: 2003/03/16 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_TEXTCTRL_H__ +#define __WX_COCOA_TEXTCTRL_H__ + +#include "wx/cocoa/NSTextField.h" + +// ======================================================================== +// wxTextCtrl +// ======================================================================== +class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase, protected wxCocoaNSTextField +{ + DECLARE_DYNAMIC_CLASS(wxTextCtrl) + DECLARE_EVENT_TABLE() + WX_DECLARE_COCOA_OWNER(NSTextField,NSControl,NSView) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxTextCtrl() {} + wxTextCtrl(wxWindow *parent, wxWindowID winid, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr) + { + Create(parent, winid, value, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr); + virtual ~wxTextCtrl(); + +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +protected: + virtual void Cocoa_didChangeText(void); + virtual void CocoaTarget_action(void); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual wxString GetValue() const; + + virtual int GetLineLength(long lineNo) const; + virtual wxString GetLineText(long lineNo) const; + virtual int GetNumberOfLines() const; + + virtual bool IsModified() const; + virtual bool IsEditable() const; + + // If the return values from and to are the same, there is no selection. + virtual void GetSelection(long* from, long* to) const; + + // operations + // ---------- + + // editing + virtual void Clear(); + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to); + + // clears the dirty flag + virtual void MarkDirty(); + virtual void DiscardEdits(); + + // writing text inserts it at the current position, appending always + // inserts it at the end + virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text); + + // translate between the position (which is just an index in the text ctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent column and line. + virtual long XYToPosition(long x, long y) const; + virtual bool PositionToXY(long pos, long *x, long *y) const; + + virtual void ShowPosition(long pos); + + // Clipboard operations + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + // Undo/redo + virtual void Undo(); + virtual void Redo(); + + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + // Insertion point + virtual void SetInsertionPoint(long pos); + virtual void SetInsertionPointEnd(); + virtual long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + + virtual void SetSelection(long from, long to); +// virtual void SelectAll(); + virtual void SetEditable(bool editable); + +protected: + virtual wxSize DoGetBestSize() const; + + virtual void DoSetValue(const wxString& value, int flags = 0); +}; + +#endif // __WX_COCOA_TEXTCTRL_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/toolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/toolbar.h new file mode 100644 index 0000000000..ce57dee03f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/toolbar.h @@ -0,0 +1,120 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/toolbar.h +// Purpose: wxToolBar +// Author: David Elliott +// Modified by: +// Created: 2003/08/17 +// Copyright: (c) 2003 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_TOOLBAR_H__ +#define __WX_COCOA_TOOLBAR_H__ + +#if wxUSE_TOOLBAR + +// ======================================================================== +// wxToolBar +// ======================================================================== +#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) +typedef struct CGPoint NSPoint; +#else +typedef struct _NSPoint NSPoint; +#endif + +class wxToolBarTool; + +class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase +{ + DECLARE_DYNAMIC_CLASS(wxToolBar) +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxToolBar() { Init(); } + wxToolBar( wxWindow *parent, + wxWindowID toolid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxToolBarNameStr ) + { + Init(); + + Create(parent, toolid, pos, size, style, name); + } + + bool Create( wxWindow *parent, + wxWindowID toolid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxToolBarNameStr ); + + virtual ~wxToolBar(); + +protected: + // common part of all ctors + void Init(); + +// ------------------------------------------------------------------------ +// Cocoa +// ------------------------------------------------------------------------ +protected: + virtual bool Cocoa_acceptsFirstMouse(bool &acceptsFirstMouse, WX_NSEvent theEvent); + virtual bool Cocoa_drawRect(const NSRect &rect); + virtual bool Cocoa_mouseDown(WX_NSEvent theEvent); + virtual bool Cocoa_mouseDragged(WX_NSEvent theEvent); + wxToolBarTool *CocoaFindToolForPosition(const NSPoint& pos) const; + void CocoaToolClickEnded(); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + // override base class virtuals + virtual void SetMargins(int x, int y); + virtual void SetToolSeparation(int separation); + + virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const; + + virtual void SetToolShortHelp(int toolid, const wxString& helpString); + + virtual void SetWindowStyleFlag( long style ); + + // implementation from now on + // -------------------------- + + void OnInternalIdle(); + virtual bool Realize(); + virtual wxSize DoGetBestSize() const; + + void SetOwningFrame(wxFrame *owningFrame) + { m_owningFrame = owningFrame; } +protected: + // implement base class pure virtuals + virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); + virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); + + virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable); + virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle); + virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); + + virtual wxToolBarToolBase *CreateTool(int toolid, + const wxString& label, + const wxBitmap& bitmap1, + const wxBitmap& bitmap2, + wxItemKind kind, + wxObject *clientData, + const wxString& shortHelpString, + const wxString& longHelpString); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); + + wxSize m_bestSize; + wxFrame *m_owningFrame; + wxToolBarTool *m_mouseDownTool; +}; + +#endif // wxUSE_TOOLBAR + +#endif // __WX_COCOA_TOOLBAR_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/tooltip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/tooltip.h new file mode 100644 index 0000000000..a096a54236 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/tooltip.h @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/tooltip.h +// Purpose: wxToolTip class - tooltip control +// Author: Ryan Norton +// Modified by: +// Created: 31.01.99 +// Copyright: (c) Ryan Norton +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COCOA_TOOLTIP_H_ +#define _WX_COCOA_TOOLTIP_H_ + +#include "wx/object.h" + +class wxWindow; + +class wxToolTip : public wxObject +{ +public: + // ctor & dtor + wxToolTip(const wxString &tip); + virtual ~wxToolTip(); + + // accessors + // tip text + void SetTip(const wxString& tip); + const wxString& GetTip() const; + + // the window we're associated with + wxWindow *GetWindow() const; + + // controlling tooltip behaviour: globally change tooltip parameters + // enable or disable the tooltips globally + static void Enable(bool flag); + // set the delay after which the tooltip appears + static void SetDelay(long milliseconds); + // set the delay after which the tooltip disappears or how long the tooltip remains visible + static void SetAutoPop(long milliseconds); + // set the delay between subsequent tooltips to appear + static void SetReshow(long milliseconds); + +private: + void SetWindow(wxWindow* window); + + friend class wxWindow; + + wxString m_text; // tooltip text + wxWindow *m_window; // window we're associated with + + DECLARE_ABSTRACT_CLASS(wxToolTip) +}; + +#endif // _WX_COCOA_TOOLTIP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/toplevel.h new file mode 100644 index 0000000000..d0768294d3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/toplevel.h @@ -0,0 +1,130 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/toplevel.h +// Purpose: wxTopLevelWindowCocoa is the Cocoa implementation of wxTLW +// Author: David Elliott +// Modified by: +// Created: 2002/12/08 +// Copyright: (c) 2002 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_TOPLEVEL_H__ +#define __WX_COCOA_TOPLEVEL_H__ + +#include "wx/hashmap.h" +#include "wx/cocoa/NSWindow.h" + +class WXDLLIMPEXP_FWD_CORE wxMenuBar; + +// ======================================================================== +// wxTopLevelWindowCocoa +// ======================================================================== +class WXDLLIMPEXP_CORE wxTopLevelWindowCocoa : public wxTopLevelWindowBase, protected wxCocoaNSWindow +{ + DECLARE_EVENT_TABLE(); + DECLARE_NO_COPY_CLASS(wxTopLevelWindowCocoa); +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + inline wxTopLevelWindowCocoa() + : wxCocoaNSWindow(this) + { Init(); } + + inline wxTopLevelWindowCocoa(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + : wxCocoaNSWindow(this) + { + Init(); + Create(parent, winid, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxTopLevelWindowCocoa(); + +protected: + // common part of all ctors + void Init(); + +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +public: + inline WX_NSWindow GetNSWindow() { return m_cocoaNSWindow; } + virtual void CocoaDelegate_windowWillClose(void); + virtual bool CocoaDelegate_windowShouldClose(void); + virtual void CocoaDelegate_windowDidBecomeKey(void); + virtual void CocoaDelegate_windowDidResignKey(void); + virtual void CocoaDelegate_windowDidBecomeMain(void); + virtual void CocoaDelegate_windowDidResignMain(void); + virtual void CocoaDelegate_wxMenuItemAction(WX_NSMenuItem sender); + virtual bool CocoaDelegate_validateMenuItem(WX_NSMenuItem sender); + virtual wxMenuBar* GetAppMenuBar(wxCocoaNSWindow *win); + static void DeactivatePendingWindow(); +protected: + void SetNSWindow(WX_NSWindow cocoaNSWindow); + WX_NSWindow m_cocoaNSWindow; + static wxCocoaNSWindowHash sm_cocoaHash; + virtual void CocoaReplaceView(WX_NSView oldView, WX_NSView newView); + static unsigned int NSWindowStyleForWxStyle(long style); + static NSRect MakeInitialNSWindowContentRect(const wxPoint& pos, const wxSize& size, unsigned int cocoaStyleMask); + + static wxTopLevelWindowCocoa *sm_cocoaDeactivateWindow; +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + virtual bool Destroy(); + // Pure virtuals + virtual void Maximize(bool maximize = true); + virtual bool IsMaximized() const; + virtual void Iconize(bool iconize = true); + virtual bool IsIconized() const; + virtual void Restore(); + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); + virtual bool IsFullScreen() const; + // other + virtual bool Show( bool show = true ); + virtual bool Close( bool force = false ); + virtual void OnCloseWindow(wxCloseEvent& event); + virtual void CocoaSetWxWindowSize(int width, int height); + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual void DoGetSize(int *width, int *height) const; + virtual void DoGetPosition(int *x, int *y) const; + virtual void SetTitle( const wxString& title); + virtual wxString GetTitle() const; + + // Default button (item) + wxWindow *SetDefaultItem(wxWindow *win); + +// Things I may/may not do +// virtual void SetIcons(const wxIconBundle& icons); +// virtual void Clear() ; +// virtual void Raise(); +// virtual void Lower(); +protected: + // is the frame currently iconized? + bool m_iconized; + // has the frame been closed + bool m_closed; + // should the frame be maximized when it will be shown? set by Maximize() + // when it is called while the frame is hidden + bool m_maximizeOnShow; +}; + +// list of all frames and modeless dialogs +extern WXDLLIMPEXP_DATA_CORE(wxWindowList) wxModelessWindows; + +#endif // __WX_COCOA_TOPLEVEL_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/trackingrectmanager.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/trackingrectmanager.h new file mode 100644 index 0000000000..eac59b07b4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/trackingrectmanager.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/trackingrectmanager.h +// Purpose: wxCocoaTrackingRectManager +// Notes: Source in window.mm +// Author: David Elliott +// Modified by: +// Created: 2007/05/02 +// Copyright: (c) 2007 Software 2000 Ltd. +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// +#ifndef __WX_COCOA_TRACKINGRECTMANAGER_H__ +#define __WX_COCOA_TRACKINGRECTMANAGER_H__ + +#include + +#define wxTRACE_COCOA_TrackingRect wxT("COCOA_TrackingRect") + +class wxCocoaTrackingRectManager +{ + wxDECLARE_NO_COPY_CLASS(wxCocoaTrackingRectManager); +public: + wxCocoaTrackingRectManager(wxWindow *window); + void ClearTrackingRect(); + void BuildTrackingRect(); + void RebuildTrackingRectIfNeeded(); + void RebuildTrackingRect(); + bool IsOwnerOfEvent(NSEvent *anEvent); + ~wxCocoaTrackingRectManager(); + void BeginSynthesizingEvents(); + void StopSynthesizingEvents(); +protected: + wxWindow *m_window; + bool m_isTrackingRectActive; + NSInteger m_trackingRectTag; + NSRect m_trackingRectInWindowCoordinates; +private: + wxCocoaTrackingRectManager(); +}; + +#endif // ndef __WX_COCOA_TRACKINGRECTMANAGER_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/window.h new file mode 100644 index 0000000000..a060f37892 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cocoa/window.h @@ -0,0 +1,226 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cocoa/window.h +// Purpose: wxWindowCocoa +// Author: David Elliott +// Modified by: +// Created: 2002/12/26 +// Copyright: (c) 2002 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_COCOA_WINDOW_H__ +#define __WX_COCOA_WINDOW_H__ + +#include "wx/cocoa/NSView.h" + +#ifdef __OBJC__ + #import +#endif //def __OBJC__ + +// We can only import Foundation/NSGeometry.h from Objective-C code but it's +// nice to be able to use NSPoint and NSRect in the declarations of helper +// methods so we must define them as opaque structs identically to the way +// they are defined by the real header. +// NOTE: We specifically use these regardless of C++ or Objective-C++ mode so +// the compiler will complain if we got the definitions wrong. In regular +// C++ mode there is no way to know if we got the definitons right so +// we depend on at least one Objective-C++ file including this header. +#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) +typedef struct CGPoint NSPoint; +typedef struct CGRect NSRect; +#else +typedef struct _NSPoint NSPoint; +typedef struct _NSRect NSRect; +#endif + +DECLARE_WXCOCOA_OBJC_CLASS(NSAffineTransform); + +class wxWindowCocoaHider; +class wxWindowCocoaScrollView; +class wxCocoaTrackingRectManager; + +// ======================================================================== +// wxWindowCocoa +// ======================================================================== +class WXDLLIMPEXP_CORE wxWindowCocoa: public wxWindowBase, protected wxCocoaNSView +{ + DECLARE_DYNAMIC_CLASS(wxWindowCocoa) + wxDECLARE_NO_COPY_CLASS(wxWindowCocoa); + DECLARE_EVENT_TABLE() + friend wxWindow *wxWindowBase::GetCapture(); + friend class wxWindowCocoaScrollView; + friend class wxCocoaTrackingRectManager; +// ------------------------------------------------------------------------ +// initialization +// ------------------------------------------------------------------------ +public: + wxWindowCocoa() { Init(); } + inline wxWindowCocoa(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + { + Init(); + Create(parent, winid, pos, size, style, name); + } + + virtual ~wxWindowCocoa(); + + bool Create(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); +protected: + void Init(); +// ------------------------------------------------------------------------ +// Cocoa specifics +// ------------------------------------------------------------------------ +public: + // Returns the content NSView (where children are added, drawing performed) + inline WX_NSView GetNSView() { return m_cocoaNSView; } + // Returns the NSView suitable for use as a subview + WX_NSView GetNSViewForSuperview() const; + // Returns the NSView that may be hidden/is being hidden + WX_NSView GetNSViewForHiding() const; + // Returns the NSView for non-client drawing + virtual WX_NSView GetNonClientNSView() { return GetNSViewForSuperview(); } + // Add/remove children + void CocoaAddChild(wxWindowCocoa *child); + void CocoaRemoveFromParent(void); +#ifdef __OBJC__ + // Returns an autoreleased NSAffineTransform which can be applied + // to a graphics context currently using the view's coordinate system + // (such as the one locked when drawRect is called or after a call + // to [NSView lockFocus]) such that further drawing is done using + // the wxWidgets coordinate system. + WX_NSAffineTransform CocoaGetWxToBoundsTransform(); +#endif //def __OBJC__ +protected: + // actually enable/disable the cocoa control, overridden by subclasses + virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { } + + void CocoaCreateNSScrollView(); + void InitMouseEvent(wxMouseEvent &event, WX_NSEvent cocoaEvent); + virtual wxWindow* GetWxWindow() const; + virtual void Cocoa_FrameChanged(void); + virtual void Cocoa_synthesizeMouseMoved(void); + virtual bool Cocoa_drawRect(const NSRect &rect); + virtual bool Cocoa_mouseDown(WX_NSEvent theEvent); + virtual bool Cocoa_mouseDragged(WX_NSEvent theEvent); + virtual bool Cocoa_mouseUp(WX_NSEvent theEvent); + virtual bool Cocoa_mouseMoved(WX_NSEvent theEvent); + virtual bool Cocoa_mouseEntered(WX_NSEvent theEvent); + virtual bool Cocoa_mouseExited(WX_NSEvent theEvent); + virtual bool Cocoa_rightMouseDown(WX_NSEvent theEvent); + virtual bool Cocoa_rightMouseDragged(WX_NSEvent theEvent); + virtual bool Cocoa_rightMouseUp(WX_NSEvent theEvent); + virtual bool Cocoa_otherMouseDown(WX_NSEvent theEvent); + virtual bool Cocoa_otherMouseDragged(WX_NSEvent theEvent); + virtual bool Cocoa_otherMouseUp(WX_NSEvent theEvent); + virtual bool Cocoa_resetCursorRects(); + virtual bool Cocoa_viewDidMoveToWindow(); + virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow newWindow); + void SetNSView(WX_NSView cocoaNSView); + WX_NSView m_cocoaNSView; + wxWindowCocoaHider *m_cocoaHider; + wxWindowCocoaScrollView *m_wxCocoaScrollView; + bool m_isInPaint; + wxCocoaTrackingRectManager *m_visibleTrackingRectManager; + static wxWindow *sm_capturedWindow; + virtual void CocoaReplaceView(WX_NSView oldView, WX_NSView newView); + void SetInitialFrameRect(const wxPoint& pos, const wxSize& size); +#ifdef __OBJC__ + inline NSRect MakeDefaultNSRect(const wxSize& size) + { + // NOTE: position is 10,10 to make it "obvious" that it's out of place + return NSMakeRect(10.0,10.0,WidthDefault(size.x),HeightDefault(size.y)); + } + // These functions translate NSPoint or NSRect between the coordinate + // system of Cocoa's boudns rect and wx's coordinate system. + NSPoint CocoaTransformBoundsToWx(NSPoint pointBounds); + NSRect CocoaTransformBoundsToWx(NSRect rectBounds); + NSPoint CocoaTransformWxToBounds(NSPoint pointWx); + NSRect CocoaTransformWxToBounds(NSRect rectWx); +#endif //def __OBJC__ + static wxPoint OriginInWxDisplayCoordinatesForRectInCocoaScreenCoordinates(NSRect windowFrame); + static NSPoint OriginInCocoaScreenCoordinatesForRectInWxDisplayCoordinates(wxCoord x, wxCoord y, wxCoord width, wxCoord height, bool keepOriginVisible); +// ------------------------------------------------------------------------ +// Implementation +// ------------------------------------------------------------------------ +public: + /* Pure Virtuals */ + // Raise the window to the top of the Z order + virtual void Raise(); + // Lower the window to the bottom of the Z order + virtual void Lower(); + // Set the focus to this window + virtual void SetFocus(); + // Warp the pointer the given position + virtual void WarpPointer(int x_pos, int y_pos) ; + // Change the window's cursor + virtual bool SetCursor( const wxCursor &cursor ); + // Send the window a refresh event + virtual void Refresh(bool eraseBack = true, const wxRect *rect = NULL); + // Set/get the window's font + virtual bool SetFont(const wxFont& f); +// inline virtual wxFont& GetFont() const; + virtual void SetLabel(const wxString& label); + virtual wxString GetLabel() const; + // label handling + // Get character size + virtual int GetCharHeight() const; + virtual int GetCharWidth() const; + virtual void DoGetTextExtent(const wxString& string, int *x, int *y, + int *descent = NULL, + int *externalLeading = NULL, + const wxFont *theFont = NULL) const; + // Scroll stuff + virtual void SetScrollbar(int orient, int pos, int thumbVisible, + int range, bool refresh = true); + virtual void SetScrollPos(int orient, int pos, bool refresh = true); + virtual int GetScrollPos(int orient) const; + virtual int GetScrollThumb(int orient) const; + virtual int GetScrollRange(int orient) const; + virtual void ScrollWindow(int dx, int dy, const wxRect *rect = NULL); + virtual void DoSetVirtualSize(int x, int y); + // Get the private handle (platform-dependent) + virtual WXWidget GetHandle() const; + // Convert client to screen coordinates + virtual void DoClientToScreen(int *x, int *y) const; + // Convert screen to client coordinates + virtual void DoScreenToClient(int *x, int *y) const; + // Capture/release mouse + virtual void DoCaptureMouse(); + virtual void DoReleaseMouse(); + // Get window position, relative to parent (or screen if no parent) + virtual void DoGetPosition(int *x, int *y) const; + // Get overall window size + virtual void DoGetSize(int *width, int *height) const; + // Get/set client (application-useable) size + virtual void DoGetClientSize(int *width, int *height) const; + virtual void DoSetClientSize(int width, int size); + // Set this window's tooltip + virtual void DoSetToolTip( wxToolTip *tip ); + // Set the size of the wxWindow (the contentView of an NSWindow) + // wxTopLevelWindow will override this and set the NSWindow size + // such that the contentView will be this size + virtual void CocoaSetWxWindowSize(int width, int height); + // Set overall size and position + virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); + virtual void DoMoveWindow(int x, int y, int width, int height); + // Popup a menu + virtual bool DoPopupMenu(wxMenu *menu, int x, int y); + + /* Other implementation */ + + // NOTE: typically Close() is not virtual, but we want this for Cocoa + virtual bool Close( bool force = false ); + virtual bool Show( bool show = true ); + virtual void DoEnable( bool enable ); + + virtual bool IsDoubleBuffered() const { return true; } +}; + +#endif // __WX_COCOA_WINDOW_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/collpane.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/collpane.h new file mode 100644 index 0000000000..40c8939b01 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/collpane.h @@ -0,0 +1,108 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/collpane.h +// Purpose: wxCollapsiblePane +// Author: Francesco Montorsi +// Modified by: +// Created: 8/10/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLLAPSABLE_PANE_H_BASE_ +#define _WX_COLLAPSABLE_PANE_H_BASE_ + +#include "wx/defs.h" + + +#if wxUSE_COLLPANE + +#include "wx/control.h" + +// class name +extern WXDLLIMPEXP_DATA_CORE(const char) wxCollapsiblePaneNameStr[]; + +// ---------------------------------------------------------------------------- +// wxCollapsiblePaneBase: interface for wxCollapsiblePane +// ---------------------------------------------------------------------------- + +#define wxCP_DEFAULT_STYLE (wxTAB_TRAVERSAL | wxNO_BORDER) +#define wxCP_NO_TLW_RESIZE (0x0002) + +class WXDLLIMPEXP_CORE wxCollapsiblePaneBase : public wxControl +{ +public: + wxCollapsiblePaneBase() {} + + virtual void Collapse(bool collapse = true) = 0; + void Expand() { Collapse(false); } + + virtual bool IsCollapsed() const = 0; + bool IsExpanded() const { return !IsCollapsed(); } + + virtual wxWindow *GetPane() const = 0; + + virtual wxString GetLabel() const = 0; + virtual void SetLabel(const wxString& label) = 0; +}; + + +// ---------------------------------------------------------------------------- +// event types and macros +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxCollapsiblePaneEvent; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEvent ); + +class WXDLLIMPEXP_CORE wxCollapsiblePaneEvent : public wxCommandEvent +{ +public: + wxCollapsiblePaneEvent() {} + wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed) + : wxCommandEvent(wxEVT_COLLAPSIBLEPANE_CHANGED, id), + m_bCollapsed(collapsed) + { + SetEventObject(generator); + } + + bool GetCollapsed() const { return m_bCollapsed; } + void SetCollapsed(bool c) { m_bCollapsed = c; } + + + // default copy ctor, assignment operator and dtor are ok + virtual wxEvent *Clone() const { return new wxCollapsiblePaneEvent(*this); } + +private: + bool m_bCollapsed; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCollapsiblePaneEvent) +}; + +// ---------------------------------------------------------------------------- +// event types and macros +// ---------------------------------------------------------------------------- + +typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEvent&); + +#define wxCollapsiblePaneEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxCollapsiblePaneEventFunction, func) + +#define EVT_COLLAPSIBLEPANE_CHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_COLLAPSIBLEPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn)) + + +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) + #include "wx/gtk/collpane.h" +#else + #include "wx/generic/collpaneg.h" + + // use #define and not a typedef to allow forward declaring the class + #define wxCollapsiblePane wxGenericCollapsiblePane +#endif + +// old wxEVT_COMMAND_* constant +#define wxEVT_COMMAND_COLLPANE_CHANGED wxEVT_COLLAPSIBLEPANE_CHANGED + +#endif // wxUSE_COLLPANE + +#endif // _WX_COLLAPSABLE_PANE_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/colordlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/colordlg.h new file mode 100644 index 0000000000..b4156d1460 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/colordlg.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/colordlg.h +// Purpose: wxColourDialog +// Author: Vadim Zeitiln +// Modified by: +// Created: 01/02/97 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLORDLG_H_BASE_ +#define _WX_COLORDLG_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_COLOURDLG + +#include "wx/colourdata.h" + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + #include "wx/msw/colordlg.h" +#elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__) + #include "wx/osx/colordlg.h" +#elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) + #include "wx/gtk/colordlg.h" +#else + #include "wx/generic/colrdlgg.h" + + #define wxColourDialog wxGenericColourDialog +#endif + +// get the colour from user and return it +WXDLLIMPEXP_CORE wxColour wxGetColourFromUser(wxWindow *parent = NULL, + const wxColour& colInit = wxNullColour, + const wxString& caption = wxEmptyString, + wxColourData *data = NULL); + +#endif // wxUSE_COLOURDLG + +#endif + // _WX_COLORDLG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/colour.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/colour.h new file mode 100644 index 0000000000..eec5542803 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/colour.h @@ -0,0 +1,238 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/colour.h +// Purpose: wxColourBase definition +// Author: Julian Smart +// Modified by: Francesco Montorsi +// Created: +// Copyright: Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLOUR_H_BASE_ +#define _WX_COLOUR_H_BASE_ + +#include "wx/defs.h" +#include "wx/gdiobj.h" + +class WXDLLIMPEXP_FWD_CORE wxColour; + +// A macro to define the standard wxColour constructors: +// +// It avoids the need to repeat these lines across all colour.h files, since +// Set() is a virtual function and thus cannot be called by wxColourBase ctors +#define DEFINE_STD_WXCOLOUR_CONSTRUCTORS \ + wxColour() { Init(); } \ + wxColour(ChannelType red, \ + ChannelType green, \ + ChannelType blue, \ + ChannelType alpha = wxALPHA_OPAQUE) \ + { Init(); Set(red, green, blue, alpha); } \ + wxColour(unsigned long colRGB) { Init(); Set(colRGB ); } \ + wxColour(const wxString& colourName) { Init(); Set(colourName); } \ + wxColour(const char *colourName) { Init(); Set(colourName); } \ + wxColour(const wchar_t *colourName) { Init(); Set(colourName); } + + +// flags for wxColour -> wxString conversion (see wxColour::GetAsString) +enum { + wxC2S_NAME = 1, // return colour name, when possible + wxC2S_CSS_SYNTAX = 2, // return colour in rgb(r,g,b) syntax + wxC2S_HTML_SYNTAX = 4 // return colour in #rrggbb syntax +}; + +const unsigned char wxALPHA_TRANSPARENT = 0; +const unsigned char wxALPHA_OPAQUE = 0xff; + +// a valid but fully transparent colour +#define wxTransparentColour wxColour(0, 0, 0, wxALPHA_TRANSPARENT) +#define wxTransparentColor wxTransparentColour + +// ---------------------------------------------------------------------------- +// wxVariant support +// ---------------------------------------------------------------------------- + +#if wxUSE_VARIANT +#include "wx/variant.h" +DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLIMPEXP_CORE) +#endif + +//----------------------------------------------------------------------------- +// wxColourBase: this class has no data members, just some functions to avoid +// code redundancy in all native wxColour implementations +//----------------------------------------------------------------------------- + +/* Transition from wxGDIObject to wxObject is incomplete. If your port does + not need the wxGDIObject machinery to handle colors, please add it to the + list of ports which do not need it. + */ +#if defined( __WXMAC__ ) || defined( __WXMSW__ ) || defined( __WXPM__ ) || defined( __WXCOCOA__ ) +#define wxCOLOUR_IS_GDIOBJECT 0 +#else +#define wxCOLOUR_IS_GDIOBJECT 1 +#endif + +class WXDLLIMPEXP_CORE wxColourBase : public +#if wxCOLOUR_IS_GDIOBJECT + wxGDIObject +#else + wxObject +#endif +{ +public: + // type of a single colour component + typedef unsigned char ChannelType; + + wxColourBase() {} + virtual ~wxColourBase() {} + + + // Set() functions + // --------------- + + void Set(ChannelType red, + ChannelType green, + ChannelType blue, + ChannelType alpha = wxALPHA_OPAQUE) + { InitRGBA(red, green, blue, alpha); } + + // implemented in colourcmn.cpp + bool Set(const wxString &str) + { return FromString(str); } + + void Set(unsigned long colRGB) + { + // we don't need to know sizeof(long) here because we assume that the three + // least significant bytes contain the R, G and B values + Set((ChannelType)(0xFF & colRGB), + (ChannelType)(0xFF & (colRGB >> 8)), + (ChannelType)(0xFF & (colRGB >> 16))); + } + + + + // accessors + // --------- + + virtual ChannelType Red() const = 0; + virtual ChannelType Green() const = 0; + virtual ChannelType Blue() const = 0; + virtual ChannelType Alpha() const + { return wxALPHA_OPAQUE ; } + + // implemented in colourcmn.cpp + virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const; + + void SetRGB(wxUint32 colRGB) + { + Set((ChannelType)(0xFF & colRGB), + (ChannelType)(0xFF & (colRGB >> 8)), + (ChannelType)(0xFF & (colRGB >> 16))); + } + + void SetRGBA(wxUint32 colRGBA) + { + Set((ChannelType)(0xFF & colRGBA), + (ChannelType)(0xFF & (colRGBA >> 8)), + (ChannelType)(0xFF & (colRGBA >> 16)), + (ChannelType)(0xFF & (colRGBA >> 24))); + } + + wxUint32 GetRGB() const + { return Red() | (Green() << 8) | (Blue() << 16); } + + wxUint32 GetRGBA() const + { return Red() | (Green() << 8) | (Blue() << 16) | (Alpha() << 24); } + +#if !wxCOLOUR_IS_GDIOBJECT + virtual bool IsOk() const= 0; + + // older version, for backwards compatibility only (but not deprecated + // because it's still widely used) + bool Ok() const { return IsOk(); } +#endif + + // manipulation + // ------------ + + // These methods are static because they are mostly used + // within tight loops (where we don't want to instantiate wxColour's) + + static void MakeMono (unsigned char* r, unsigned char* g, unsigned char* b, bool on); + static void MakeDisabled(unsigned char* r, unsigned char* g, unsigned char* b, unsigned char brightness = 255); + static void MakeGrey (unsigned char* r, unsigned char* g, unsigned char* b); // integer version + static void MakeGrey (unsigned char* r, unsigned char* g, unsigned char* b, + double weight_r, double weight_g, double weight_b); // floating point version + static unsigned char AlphaBlend (unsigned char fg, unsigned char bg, double alpha); + static void ChangeLightness(unsigned char* r, unsigned char* g, unsigned char* b, int ialpha); + + wxColour ChangeLightness(int ialpha) const; + wxColour& MakeDisabled(unsigned char brightness = 255); + + // old, deprecated + // --------------- + +#if WXWIN_COMPATIBILITY_2_6 + static wxDEPRECATED( wxColour CreateByName(const wxString& name) ); + wxDEPRECATED( void InitFromName(const wxString& col) ); +#endif + +protected: + // Some ports need Init() and while we don't, provide a stub so that the + // ports which don't need it are not forced to define it + void Init() { } + + virtual void + InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) = 0; + + virtual bool FromString(const wxString& s); + +#if wxCOLOUR_IS_GDIOBJECT + // wxColour doesn't use reference counted data (at least not in all ports) + // so provide stubs for the functions which need to be defined if we do use + // them + virtual wxGDIRefData *CreateGDIRefData() const + { + wxFAIL_MSG( "must be overridden if used" ); + + return NULL; + } + + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const + { + wxFAIL_MSG( "must be overridden if used" ); + + return NULL; + } +#endif +}; + + +// wxColour <-> wxString utilities, used by wxConfig, defined in colourcmn.cpp +WXDLLIMPEXP_CORE wxString wxToString(const wxColourBase& col); +WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxColourBase* col); + + + +#if defined(__WXMSW__) + #include "wx/msw/colour.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/colour.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/colour.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/colour.h" +#elif defined(__WXDFB__) + #include "wx/generic/colour.h" +#elif defined(__WXX11__) + #include "wx/x11/colour.h" +#elif defined(__WXMAC__) + #include "wx/osx/colour.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/colour.h" +#elif defined(__WXPM__) + #include "wx/os2/colour.h" +#endif + +#define wxColor wxColour + +#endif // _WX_COLOUR_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/colourdata.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/colourdata.h new file mode 100644 index 0000000000..5a755ae078 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/colourdata.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/colourdata.h +// Author: Julian Smart +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLOURDATA_H_ +#define _WX_COLOURDATA_H_ + +#include "wx/colour.h" + +class WXDLLIMPEXP_CORE wxColourData : public wxObject +{ +public: + // number of custom colours we store + enum + { + NUM_CUSTOM = 16 + }; + + wxColourData(); + wxColourData(const wxColourData& data); + wxColourData& operator=(const wxColourData& data); + virtual ~wxColourData(); + + void SetChooseFull(bool flag) { m_chooseFull = flag; } + bool GetChooseFull() const { return m_chooseFull; } + void SetColour(const wxColour& colour) { m_dataColour = colour; } + const wxColour& GetColour() const { return m_dataColour; } + wxColour& GetColour() { return m_dataColour; } + + // SetCustomColour() modifies colours in an internal array of NUM_CUSTOM + // custom colours; + void SetCustomColour(int i, const wxColour& colour); + wxColour GetCustomColour(int i) const; + + // Serialize the object to a string and restore it from it + wxString ToString() const; + bool FromString(const wxString& str); + + + // public for backwards compatibility only: don't use directly + wxColour m_dataColour; + wxColour m_custColours[NUM_CUSTOM]; + bool m_chooseFull; + + DECLARE_DYNAMIC_CLASS(wxColourData) +}; + +#endif // _WX_COLOURDATA_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/combo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/combo.h new file mode 100644 index 0000000000..6a040b3d22 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/combo.h @@ -0,0 +1,882 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/combo.h +// Purpose: wxComboCtrl declaration +// Author: Jaakko Salli +// Modified by: +// Created: Apr-30-2006 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COMBOCONTROL_H_BASE_ +#define _WX_COMBOCONTROL_H_BASE_ + + +/* + A few words about all the classes defined in this file are probably in + order: why do we need extra wxComboCtrl and wxComboPopup classes? + + This is because a traditional combobox is a combination of a text control + (with a button allowing to open the pop down list) with a listbox and + wxComboBox class is exactly such control, however we want to also have other + combinations - in fact, we want to allow anything at all to be used as pop + down list, not just a wxListBox. + + So we define a base wxComboCtrl which can use any control as pop down + list and wxComboBox deriving from it which implements the standard wxWidgets + combobox API. wxComboCtrl needs to be told somehow which control to use + and this is done by SetPopupControl(). However, we need something more than + just a wxControl in this method as, for example, we need to call + SetSelection("initial text value") and wxControl doesn't have such method. + So we also need a wxComboPopup which is just a very simple interface which + must be implemented by a control to be usable as a popup. + + We couldn't derive wxComboPopup from wxControl as this would make it + impossible to have a class deriving from both wxListBx and from it, so + instead it is just a mix-in. + */ + + +#include "wx/defs.h" + +#if wxUSE_COMBOCTRL + +#include "wx/control.h" +#include "wx/renderer.h" // this is needed for wxCONTROL_XXX flags +#include "wx/bitmap.h" // wxBitmap used by-value +#include "wx/textentry.h" + +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxComboPopup; + +// +// New window styles for wxComboCtrlBase +// +enum +{ + // Double-clicking a read-only combo triggers call to popup's OnComboPopup. + // In wxOwnerDrawnComboBox, for instance, it cycles item. + wxCC_SPECIAL_DCLICK = 0x0100, + + // Dropbutton acts like standard push button. + wxCC_STD_BUTTON = 0x0200 +}; + + +// wxComboCtrl internal flags +enum +{ + // First those that can be passed to Customize. + // It is Windows style for all flags to be clear. + + // Button is preferred outside the border (GTK style) + wxCC_BUTTON_OUTSIDE_BORDER = 0x0001, + // Show popup on mouse up instead of mouse down (which is the Windows style) + wxCC_POPUP_ON_MOUSE_UP = 0x0002, + // All text is not automatically selected on click + wxCC_NO_TEXT_AUTO_SELECT = 0x0004, + // Drop-button stays down as long as popup is displayed. + wxCC_BUTTON_STAYS_DOWN = 0x0008, + // Drop-button covers the entire control. + wxCC_FULL_BUTTON = 0x0010, + // Drop-button goes over the custom-border (used under WinVista). + wxCC_BUTTON_COVERS_BORDER = 0x0020, + + // Internal use: signals creation is complete + wxCC_IFLAG_CREATED = 0x0100, + // Internal use: really put button outside + wxCC_IFLAG_BUTTON_OUTSIDE = 0x0200, + // Internal use: SetMargins has been successfully called + wxCC_IFLAG_LEFT_MARGIN_SET = 0x0400, + // Internal use: Set wxTAB_TRAVERSAL to parent when popup is dismissed + wxCC_IFLAG_PARENT_TAB_TRAVERSAL = 0x0800, + // Internal use: Secondary popup window type should be used (if available). + wxCC_IFLAG_USE_ALT_POPUP = 0x1000, + // Internal use: Skip popup animation. + wxCC_IFLAG_DISABLE_POPUP_ANIM = 0x2000, + // Internal use: Drop-button is a bitmap button or has non-default size + // (but can still be on either side of the control), regardless whether + // specified by the platform or the application. + wxCC_IFLAG_HAS_NONSTANDARD_BUTTON = 0x4000 +}; + + +// Flags used by PreprocessMouseEvent and HandleButtonMouseEvent +enum +{ + wxCC_MF_ON_BUTTON = 0x0001, // cursor is on dropbutton area + wxCC_MF_ON_CLICK_AREA = 0x0002 // cursor is on dropbutton or other area + // that can be clicked to show the popup. +}; + + +// Namespace for wxComboCtrl feature flags +struct wxComboCtrlFeatures +{ + enum + { + MovableButton = 0x0001, // Button can be on either side of control + BitmapButton = 0x0002, // Button may be replaced with bitmap + ButtonSpacing = 0x0004, // Button can have spacing from the edge + // of the control + TextIndent = 0x0008, // SetMargins can be used to control + // left margin. + PaintControl = 0x0010, // Combo control itself can be custom painted + PaintWritable = 0x0020, // A variable-width area in front of writable + // combo control's textctrl can be custom + // painted + Borderless = 0x0040, // wxNO_BORDER window style works + + // There are no feature flags for... + // PushButtonBitmapBackground - if its in wxRendererNative, then it should be + // not an issue to have it automatically under the bitmap. + + All = MovableButton|BitmapButton| + ButtonSpacing|TextIndent| + PaintControl|PaintWritable| + Borderless + }; +}; + + +class WXDLLIMPEXP_CORE wxComboCtrlBase : public wxControl, + public wxTextEntry +{ + friend class wxComboPopup; + friend class wxComboPopupEvtHandler; +public: + // ctors and such + wxComboCtrlBase() : wxControl(), wxTextEntry() { Init(); } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name); + + virtual ~wxComboCtrlBase(); + + // Show/hide popup window (wxComboBox-compatible methods) + virtual void Popup(); + virtual void Dismiss() + { + HidePopup(true); + } + + // Show/hide popup window. + // TODO: Maybe deprecate in favor of Popup()/Dismiss(). + // However, these functions are still called internally + // so it is not straightforward. + virtual void ShowPopup(); + virtual void HidePopup(bool generateEvent=false); + + // Override for totally custom combo action + virtual void OnButtonClick(); + + // return true if the popup is currently shown + bool IsPopupShown() const { return m_popupWinState == Visible; } + + // set interface class instance derived from wxComboPopup + // NULL popup can be used to indicate default in a derived class + void SetPopupControl( wxComboPopup* popup ) + { + DoSetPopupControl(popup); + } + + // get interface class instance derived from wxComboPopup + wxComboPopup* GetPopupControl() + { + EnsurePopupControl(); + return m_popupInterface; + } + + // get the popup window containing the popup control + wxWindow *GetPopupWindow() const { return m_winPopup; } + + // Get the text control which is part of the combobox. + wxTextCtrl *GetTextCtrl() const { return m_text; } + + // get the dropdown button which is part of the combobox + // note: its not necessarily a wxButton or wxBitmapButton + wxWindow *GetButton() const { return m_btn; } + + // forward these methods to all subcontrols + virtual bool Enable(bool enable = true); + virtual bool Show(bool show = true); + virtual bool SetFont(const wxFont& font); + + // + // wxTextEntry methods + // + // NB: We basically need to override all of them because there is + // no guarantee how platform-specific wxTextEntry is implemented. + // + virtual void SetValue(const wxString& value) + { wxTextEntryBase::SetValue(value); } + virtual void ChangeValue(const wxString& value) + { wxTextEntryBase::ChangeValue(value); } + + virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text) + { wxTextEntryBase::AppendText(text); } + + virtual wxString GetValue() const + { return wxTextEntryBase::GetValue(); } + + virtual wxString GetRange(long from, long to) const + { return wxTextEntryBase::GetRange(from, to); } + + // Replace() and DoSetValue() need to be fully re-implemented since + // EventSuppressor utility class does not work with the way + // wxComboCtrl is implemented. + virtual void Replace(long from, long to, const wxString& value); + + virtual void Remove(long from, long to); + + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + virtual void Undo(); + virtual void Redo(); + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + virtual void SetInsertionPoint(long pos); + virtual long GetInsertionPoint() const; + virtual long GetLastPosition() const; + + virtual void SetSelection(long from, long to); + virtual void GetSelection(long *from, long *to) const; + + virtual bool IsEditable() const; + virtual void SetEditable(bool editable); + + virtual bool SetHint(const wxString& hint); + virtual wxString GetHint() const; + + // This method sets the text without affecting list selection + // (ie. wxComboPopup::SetStringValue doesn't get called). + void SetText(const wxString& value); + + // This method sets value and also optionally sends EVT_TEXT + // (needed by combo popups) + wxDEPRECATED( void SetValueWithEvent(const wxString& value, + bool withEvent = true) ); + + // Changes value of the control as if user had done it by selecting an + // item from a combo box drop-down list. Needs to be public so that + // derived popup classes can call it. + void SetValueByUser(const wxString& value); + + // + // Popup customization methods + // + + // Sets minimum width of the popup. If wider than combo control, it will extend to the left. + // Remarks: + // * Value -1 indicates the default. + // * Custom popup may choose to ignore this (wxOwnerDrawnComboBox does not). + void SetPopupMinWidth( int width ) + { + m_widthMinPopup = width; + } + + // Sets preferred maximum height of the popup. + // Remarks: + // * Value -1 indicates the default. + // * Custom popup may choose to ignore this (wxOwnerDrawnComboBox does not). + void SetPopupMaxHeight( int height ) + { + m_heightPopup = height; + } + + // Extends popup size horizontally, relative to the edges of the combo control. + // Remarks: + // * Popup minimum width may override extLeft (ie. it has higher precedence). + // * Values 0 indicate default. + // * Custom popup may not take this fully into account (wxOwnerDrawnComboBox takes). + void SetPopupExtents( int extLeft, int extRight ) + { + m_extLeft = extLeft; + m_extRight = extRight; + } + + // Set width, in pixels, of custom paint area in writable combo. + // In read-only, used to indicate area that is not covered by the + // focus rectangle (which may or may not be drawn, depending on the + // popup type). + void SetCustomPaintWidth( int width ); + int GetCustomPaintWidth() const { return m_widthCustomPaint; } + + // Set side of the control to which the popup will align itself. + // Valid values are wxLEFT, wxRIGHT and 0. The default value 0 wmeans + // that the side of the button will be used. + void SetPopupAnchor( int anchorSide ) + { + m_anchorSide = anchorSide; + } + + // Set position of dropdown button. + // width: button width. <= 0 for default. + // height: button height. <= 0 for default. + // side: wxLEFT or wxRIGHT, indicates on which side the button will be placed. + // spacingX: empty space on sides of the button. Default is 0. + // Remarks: + // There is no spacingY - the button will be centered vertically. + void SetButtonPosition( int width = -1, + int height = -1, + int side = wxRIGHT, + int spacingX = 0 ); + + // Returns current size of the dropdown button. + wxSize GetButtonSize(); + + // + // Sets dropbutton to be drawn with custom bitmaps. + // + // bmpNormal: drawn when cursor is not on button + // pushButtonBg: Draw push button background below the image. + // NOTE! This is usually only properly supported on platforms with appropriate + // method in wxRendererNative. + // bmpPressed: drawn when button is depressed + // bmpHover: drawn when cursor hovers on button. This is ignored on platforms + // that do not generally display hover differently. + // bmpDisabled: drawn when combobox is disabled. + void SetButtonBitmaps( const wxBitmap& bmpNormal, + bool pushButtonBg = false, + const wxBitmap& bmpPressed = wxNullBitmap, + const wxBitmap& bmpHover = wxNullBitmap, + const wxBitmap& bmpDisabled = wxNullBitmap ); + +#if WXWIN_COMPATIBILITY_2_8 + // + // This will set the space in pixels between left edge of the control and the + // text, regardless whether control is read-only (ie. no wxTextCtrl) or not. + // Platform-specific default can be set with value-1. + // Remarks + // * This method may do nothing on some native implementations. + wxDEPRECATED( void SetTextIndent( int indent ) ); + + // Returns actual indentation in pixels. + wxDEPRECATED( wxCoord GetTextIndent() const ); +#endif + + // Returns area covered by the text field. + const wxRect& GetTextRect() const + { + return m_tcArea; + } + + // Call with enable as true to use a type of popup window that guarantees ability + // to focus the popup control, and normal function of common native controls. + // This alternative popup window is usually a wxDialog, and as such it's parent + // frame will appear as if the focus has been lost from it. + void UseAltPopupWindow( bool enable = true ) + { + wxASSERT_MSG( !m_winPopup, + wxT("call this only before SetPopupControl") ); + + if ( enable ) + m_iFlags |= wxCC_IFLAG_USE_ALT_POPUP; + else + m_iFlags &= ~wxCC_IFLAG_USE_ALT_POPUP; + } + + // Call with false to disable popup animation, if any. + void EnablePopupAnimation( bool enable = true ) + { + if ( enable ) + m_iFlags &= ~wxCC_IFLAG_DISABLE_POPUP_ANIM; + else + m_iFlags |= wxCC_IFLAG_DISABLE_POPUP_ANIM; + } + + // + // Utilies needed by the popups or native implementations + // + + // Returns true if given key combination should toggle the popup. + // NB: This is a separate from other keyboard handling because: + // 1) Replaceability. + // 2) Centralized code (otherwise it'd be split up between + // wxComboCtrl key handler and wxVListBoxComboPopup's + // key handler). + virtual bool IsKeyPopupToggle(const wxKeyEvent& event) const = 0; + + // Prepare background of combo control or an item in a dropdown list + // in a way typical on platform. This includes painting the focus/disabled + // background and setting the clipping region. + // Unless you plan to paint your own focus indicator, you should always call this + // in your wxComboPopup::PaintComboControl implementation. + // In addition, it sets pen and text colour to what looks good and proper + // against the background. + // flags: wxRendererNative flags: wxCONTROL_ISSUBMENU: is drawing a list item instead of combo control + // wxCONTROL_SELECTED: list item is selected + // wxCONTROL_DISABLED: control/item is disabled + virtual void PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const; + + // Returns true if focus indicator should be drawn in the control. + bool ShouldDrawFocus() const + { + const wxWindow* curFocus = FindFocus(); + return ( IsPopupWindowState(Hidden) && + (curFocus == m_mainCtrlWnd || (m_btn && curFocus == m_btn)) && + (m_windowStyle & wxCB_READONLY) ); + } + + // These methods return references to appropriate dropbutton bitmaps + const wxBitmap& GetBitmapNormal() const { return m_bmpNormal; } + const wxBitmap& GetBitmapPressed() const { return m_bmpPressed; } + const wxBitmap& GetBitmapHover() const { return m_bmpHover; } + const wxBitmap& GetBitmapDisabled() const { return m_bmpDisabled; } + + // Set custom style flags for embedded wxTextCtrl. Usually must be used + // with two-step creation, before Create() call. + void SetTextCtrlStyle( int style ); + + // Return internal flags + wxUint32 GetInternalFlags() const { return m_iFlags; } + + // Return true if Create has finished + bool IsCreated() const { return m_iFlags & wxCC_IFLAG_CREATED ? true : false; } + + // Need to override to return text area background colour + wxColour GetBackgroundColour() const; + + // common code to be called on popup hide/dismiss + void OnPopupDismiss(bool generateEvent); + + // PopupShown states + enum + { + Hidden = 0, + //Closing = 1, + Animating = 2, + Visible = 3 + }; + + bool IsPopupWindowState( int state ) const { return (state == m_popupWinState) ? true : false; } + + wxByte GetPopupWindowState() const { return m_popupWinState; } + + // Set value returned by GetMainWindowOfCompositeControl + void SetCtrlMainWnd( wxWindow* wnd ) { m_mainCtrlWnd = wnd; } + + // This is public so we can access it from wxComboCtrlTextCtrl + virtual wxWindow *GetMainWindowOfCompositeControl() + { return m_mainCtrlWnd; } + + // also set the embedded wxTextCtrl colours + virtual bool SetForegroundColour(const wxColour& colour); + virtual bool SetBackgroundColour(const wxColour& colour); + +protected: + + // Returns true if hint text should be drawn in the control + bool ShouldUseHintText(int flags = 0) const + { + return ( !m_text && + !(flags & wxCONTROL_ISSUBMENU) && + !m_valueString.length() && + m_hintText.length() && + !ShouldDrawFocus() ); + } + + // + // Override these for customization purposes + // + + // called from wxSizeEvent handler + virtual void OnResize() = 0; + + // Return native text identation + // (i.e. text margin, for pure text, not textctrl) + virtual wxCoord GetNativeTextIndent() const; + + // Called in syscolourchanged handler and base create + virtual void OnThemeChange(); + + // Creates wxTextCtrl. + // extraStyle: Extra style parameters + void CreateTextCtrl( int extraStyle ); + + // Called when text was changed programmatically + // (e.g. from WriteText()) + void OnSetValue(const wxString& value); + + // Installs standard input handler to combo (and optionally to the textctrl) + void InstallInputHandlers(); + + // Flags for DrawButton + enum + { + Button_PaintBackground = 0x0001, // Paints control background below the button + Button_BitmapOnly = 0x0002 // Only paints the bitmap + }; + + // Draws dropbutton. Using wxRenderer or bitmaps, as appropriate. + // Flags are defined above. + virtual void DrawButton( wxDC& dc, const wxRect& rect, int flags = Button_PaintBackground ); + + // Call if cursor is on button area or mouse is captured for the button. + //bool HandleButtonMouseEvent( wxMouseEvent& event, bool isInside ); + bool HandleButtonMouseEvent( wxMouseEvent& event, int flags ); + + // returns true if event was consumed or filtered (event type is also set to 0 in this case) + bool PreprocessMouseEvent( wxMouseEvent& event, int flags ); + + // + // This will handle left_down and left_dclick events outside button in a Windows-like manner. + // If you need alternate behaviour, it is recommended you manipulate and filter events to it + // instead of building your own handling routine (for reference, on wxEVT_LEFT_DOWN it will + // toggle popup and on wxEVT_LEFT_DCLICK it will do the same or run the popup's dclick method, + // if defined - you should pass events of other types of it for common processing). + void HandleNormalMouseEvent( wxMouseEvent& event ); + + // Creates popup window, calls interface->Create(), etc + void CreatePopup(); + + // Destroy popup window and all related constructs + void DestroyPopup(); + + // override the base class virtuals involved in geometry calculations + // The common version only sets a default width, so the derived classes + // should override it and set the height and change the width as needed. + virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + + // NULL popup can be used to indicate default in a derived class + virtual void DoSetPopupControl(wxComboPopup* popup); + + // ensures there is atleast the default popup + void EnsurePopupControl(); + + // Recalculates button and textctrl areas. Called when size or button setup change. + // btnWidth: default/calculated width of the dropbutton. 0 means unchanged, + // just recalculate. + void CalculateAreas( int btnWidth = 0 ); + + // Standard textctrl positioning routine. Just give it platform-dependent + // textctrl coordinate adjustment. + virtual void PositionTextCtrl( int textCtrlXAdjust = 0, + int textCtrlYAdjust = 0); + + // event handlers + void OnSizeEvent( wxSizeEvent& event ); + void OnFocusEvent(wxFocusEvent& event); + void OnIdleEvent(wxIdleEvent& event); + void OnTextCtrlEvent(wxCommandEvent& event); + void OnSysColourChanged(wxSysColourChangedEvent& event); + void OnKeyEvent(wxKeyEvent& event); + void OnCharEvent(wxKeyEvent& event); + + // Set customization flags (directs how wxComboCtrlBase helpers behave) + void Customize( wxUint32 flags ) { m_iFlags |= flags; } + + // Dispatches size event and refreshes + void RecalcAndRefresh(); + + // Flags for DoShowPopup and AnimateShow + enum + { + ShowBelow = 0x0000, // Showing popup below the control + ShowAbove = 0x0001, // Showing popup above the control + CanDeferShow = 0x0002 // Can only return true from AnimateShow if this is set + }; + + // Shows and positions the popup. + virtual void DoShowPopup( const wxRect& rect, int flags ); + + // Implement in derived class to create a drop-down animation. + // Return true if finished immediately. Otherwise popup is only + // shown when the derived class call DoShowPopup. + // Flags are same as for DoShowPopup. + virtual bool AnimateShow( const wxRect& rect, int flags ); + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip( wxToolTip *tip ); +#endif + + // protected wxTextEntry methods + virtual void DoSetValue(const wxString& value, int flags); + virtual wxString DoGetValue() const; + virtual wxWindow *GetEditableWindow() { return this; } + + // margins functions + virtual bool DoSetMargins(const wxPoint& pt); + virtual wxPoint DoGetMargins() const; + + // This is used when m_text is hidden (readonly). + wxString m_valueString; + + // This is used when control is unfocused and m_valueString is empty + wxString m_hintText; + + // the text control and button we show all the time + wxTextCtrl* m_text; + wxWindow* m_btn; + + // wxPopupWindow or similar containing the window managed by the interface. + wxWindow* m_winPopup; + + // the popup control/panel + wxWindow* m_popup; + + // popup interface + wxComboPopup* m_popupInterface; + + // this is input etc. handler for the text control + wxEvtHandler* m_textEvtHandler; + + // this is for the top level window + wxEvtHandler* m_toplevEvtHandler; + + // this is for the control in popup + wxEvtHandler* m_popupEvtHandler; + + // this is for the popup window + wxEvtHandler* m_popupWinEvtHandler; + + // main (ie. topmost) window of a composite control (default = this) + wxWindow* m_mainCtrlWnd; + + // used to prevent immediate re-popupping in case closed popup + // by clicking on the combo control (needed because of inconsistent + // transient implementation across platforms). + wxLongLong m_timeCanAcceptClick; + + // how much popup should expand to the left/right of the control + wxCoord m_extLeft; + wxCoord m_extRight; + + // minimum popup width + wxCoord m_widthMinPopup; + + // preferred popup height + wxCoord m_heightPopup; + + // how much of writable combo is custom-paint by callback? + // also used to indicate area that is not covered by "blue" + // selection indicator. + wxCoord m_widthCustomPaint; + + // left margin, in pixels + wxCoord m_marginLeft; + + // side on which the popup is aligned + int m_anchorSide; + + // Width of the "fake" border + wxCoord m_widthCustomBorder; + + // The button and textctrl click/paint areas + wxRect m_tcArea; + wxRect m_btnArea; + + // Colour of the text area, in case m_text is NULL + wxColour m_tcBgCol; + + // current button state (uses renderer flags) + int m_btnState; + + // button position + int m_btnWid; + int m_btnHei; + int m_btnSide; + int m_btnSpacingX; + + // last default button width + int m_btnWidDefault; + + // custom dropbutton bitmaps + wxBitmap m_bmpNormal; + wxBitmap m_bmpPressed; + wxBitmap m_bmpHover; + wxBitmap m_bmpDisabled; + + // area used by the button + wxSize m_btnSize; + + // platform-dependent customization and other flags + wxUint32 m_iFlags; + + // custom style for m_text + int m_textCtrlStyle; + + // draw blank button background under bitmap? + bool m_blankButtonBg; + + // is the popup window currenty shown? + wxByte m_popupWinState; + + // should the focus be reset to the textctrl in idle time? + bool m_resetFocus; + + // is the text-area background colour overridden? + bool m_hasTcBgCol; + +private: + void Init(); + + wxByte m_ignoreEvtText; // Number of next EVT_TEXTs to ignore + + // Is popup window wxPopupTransientWindow, wxPopupWindow or wxDialog? + wxByte m_popupWinType; + + DECLARE_EVENT_TABLE() + + DECLARE_ABSTRACT_CLASS(wxComboCtrlBase) +}; + + +// ---------------------------------------------------------------------------- +// wxComboPopup is the interface which must be implemented by a control to be +// used as a popup by wxComboCtrl +// ---------------------------------------------------------------------------- + + +// wxComboPopup internal flags +enum +{ + wxCP_IFLAG_CREATED = 0x0001 // Set by wxComboCtrlBase after Create is called +}; + +class WXDLLIMPEXP_FWD_CORE wxComboCtrl; + + +class WXDLLIMPEXP_CORE wxComboPopup +{ + friend class wxComboCtrlBase; +public: + wxComboPopup() + { + m_combo = NULL; + m_iFlags = 0; + } + + // This is called immediately after construction finishes. m_combo member + // variable has been initialized before the call. + // NOTE: It is not in constructor so the derived class doesn't need to redefine + // a default constructor of its own. + virtual void Init() { } + + virtual ~wxComboPopup(); + + // Create the popup child control. + // Return true for success. + virtual bool Create(wxWindow* parent) = 0; + + // Calls Destroy() for the popup control (i.e. one returned by + // GetControl()) and makes sure that 'this' is deleted at the end. + // Default implementation works for both cases where popup control + // class is multiple inherited or created on heap as a separate + // object. + virtual void DestroyPopup(); + + // We must have an associated control which is subclassed by the combobox. + virtual wxWindow *GetControl() = 0; + + // Called immediately after the popup is shown + virtual void OnPopup(); + + // Called when popup is dismissed + virtual void OnDismiss(); + + // Called just prior to displaying popup. + // Default implementation does nothing. + virtual void SetStringValue( const wxString& value ); + + // Gets displayed string representation of the value. + virtual wxString GetStringValue() const = 0; + + // Called to check if the popup - when an item container - actually + // has matching item. Case-sensitivity checking etc. is up to the + // implementation. If the found item matched the string, but is + // different, it should be written back to pItem. Default implementation + // always return true and does not alter trueItem. + virtual bool FindItem(const wxString& item, wxString* trueItem=NULL); + + // This is called to custom paint in the combo control itself (ie. not the popup). + // Default implementation draws value as string. + virtual void PaintComboControl( wxDC& dc, const wxRect& rect ); + + // Receives wxEVT_KEY_DOWN key events from the parent wxComboCtrl. + // Events not handled should be skipped, as usual. + virtual void OnComboKeyEvent( wxKeyEvent& event ); + + // Receives wxEVT_CHAR key events from the parent wxComboCtrl. + // Events not handled should be skipped, as usual. + virtual void OnComboCharEvent( wxKeyEvent& event ); + + // Implement if you need to support special action when user + // double-clicks on the parent wxComboCtrl. + virtual void OnComboDoubleClick(); + + // Return final size of popup. Called on every popup, just prior to OnShow. + // minWidth = preferred minimum width for window + // prefHeight = preferred height. Only applies if > 0, + // maxHeight = max height for window, as limited by screen size + // and should only be rounded down, if necessary. + virtual wxSize GetAdjustedSize( int minWidth, int prefHeight, int maxHeight ); + + // Return true if you want delay call to Create until the popup is shown + // for the first time. It is more efficient, but note that it is often + // more convenient to have the control created immediately. + // Default returns false. + virtual bool LazyCreate(); + + // + // Utilies + // + + // Hides the popup + void Dismiss(); + + // Returns true if Create has been called. + bool IsCreated() const + { + return (m_iFlags & wxCP_IFLAG_CREATED) ? true : false; + } + + // Returns pointer to the associated parent wxComboCtrl. + wxComboCtrl* GetComboCtrl() const; + + // Default PaintComboControl behaviour + static void DefaultPaintComboControl( wxComboCtrlBase* combo, + wxDC& dc, + const wxRect& rect ); + +protected: + wxComboCtrlBase* m_combo; + wxUint32 m_iFlags; + +private: + // Called in wxComboCtrlBase::SetPopupControl + void InitBase(wxComboCtrlBase *combo) + { + m_combo = combo; + } +}; + + +// ---------------------------------------------------------------------------- +// include the platform-dependent header defining the real class +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + // No native universal (but it must still be first in the list) +#elif defined(__WXMSW__) + #include "wx/msw/combo.h" +#endif + +// Any ports may need generic as an alternative +#include "wx/generic/combo.h" + +#endif // wxUSE_COMBOCTRL + +#endif + // _WX_COMBOCONTROL_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/combobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/combobox.h new file mode 100644 index 0000000000..93b3699553 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/combobox.h @@ -0,0 +1,92 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/combobox.h +// Purpose: wxComboBox declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 24.12.00 +// Copyright: (c) 1996-2000 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COMBOBOX_H_BASE_ +#define _WX_COMBOBOX_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_COMBOBOX + +// For compatibility with 2.8 include this header to allow using wxTE_XXX +// styles with wxComboBox without explicitly including it in the user code. +#include "wx/textctrl.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr[]; + +// ---------------------------------------------------------------------------- +// wxComboBoxBase: this interface defines the methods wxComboBox must implement +// ---------------------------------------------------------------------------- + +#include "wx/ctrlsub.h" +#include "wx/textentry.h" + +class WXDLLIMPEXP_CORE wxComboBoxBase : public wxItemContainer, + public wxTextEntry +{ +public: + // override these methods to disambiguate between two base classes versions + virtual void Clear() + { + wxTextEntry::Clear(); + wxItemContainer::Clear(); + } + + // IsEmpty() is ambiguous because we inherit it from both wxItemContainer + // and wxTextEntry, and even if defined it here to help the compiler with + // choosing one of them, it would still be confusing for the human users of + // this class. So instead define the clearly named methods below and leave + // IsEmpty() ambiguous to trigger a compilation error if it's used. + bool IsListEmpty() const { return wxItemContainer::IsEmpty(); } + bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); } + + // also bring in GetSelection() versions of both base classes in scope + // + // NB: GetSelection(from, to) could be already implemented in wxTextEntry + // but still make it pure virtual because for some platforms it's not + // implemented there and also because the derived class has to override + // it anyhow to avoid ambiguity with the other GetSelection() + virtual int GetSelection() const = 0; + virtual void GetSelection(long *from, long *to) const = 0; + + virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); } + virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); } + + // may return value different from GetSelection() when the combobox + // dropdown is shown and the user selected, but not yet accepted, a value + // different from the old one in it + virtual int GetCurrentSelection() const { return GetSelection(); } +}; + +// ---------------------------------------------------------------------------- +// include the platform-dependent header defining the real class +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/combobox.h" +#elif defined(__WXMSW__) + #include "wx/msw/combobox.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/combobox.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/combobox.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/combobox.h" +#elif defined(__WXMAC__) + #include "wx/osx/combobox.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/combobox.h" +#elif defined(__WXPM__) + #include "wx/os2/combobox.h" +#endif + +#endif // wxUSE_COMBOBOX + +#endif // _WX_COMBOBOX_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/commandlinkbutton.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/commandlinkbutton.h new file mode 100644 index 0000000000..0aaa0ec65a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/commandlinkbutton.h @@ -0,0 +1,169 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/commandlinkbutton.h +// Purpose: wxCommandLinkButtonBase and wxGenericCommandLinkButton classes +// Author: Rickard Westerlund +// Created: 2010-06-11 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COMMANDLINKBUTTON_H_ +#define _WX_COMMANDLINKBUTTON_H_ + +#include "wx/defs.h" + +#if wxUSE_COMMANDLINKBUTTON + +#include "wx/button.h" + +// ---------------------------------------------------------------------------- +// Command link button common base class +// ---------------------------------------------------------------------------- + +// This class has separate "main label" (title-like string) and (possibly +// multiline) "note" which can be set and queried separately but can also be +// set both at once by joining them with a new line and setting them as a +// label and queried by breaking the label into the parts before the first new +// line and after it. + +class WXDLLIMPEXP_ADV wxCommandLinkButtonBase : public wxButton +{ +public: + wxCommandLinkButtonBase() : wxButton() { } + + wxCommandLinkButtonBase(wxWindow *parent, + wxWindowID id, + const wxString& mainLabel = wxEmptyString, + const wxString& note = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = + wxDefaultValidator, + const wxString& name = wxButtonNameStr) + : wxButton(parent, + id, + mainLabel + '\n' + note, + pos, + size, + style, + validator, + name) + { } + + virtual void SetMainLabelAndNote(const wxString& mainLabel, + const wxString& note) = 0; + + virtual void SetMainLabel(const wxString& mainLabel) + { + SetMainLabelAndNote(mainLabel, GetNote()); + } + + virtual void SetNote(const wxString& note) + { + SetMainLabelAndNote(GetMainLabel(), note); + } + + virtual wxString GetMainLabel() const + { + return GetLabel().BeforeFirst('\n'); + } + + virtual wxString GetNote() const + { + return GetLabel().AfterFirst('\n'); + } + +protected: + virtual bool HasNativeBitmap() const { return false; } + +private: + wxDECLARE_NO_COPY_CLASS(wxCommandLinkButtonBase); +}; + +// ---------------------------------------------------------------------------- +// Generic command link button +// ---------------------------------------------------------------------------- + +// Trivial generic implementation simply using a multiline label to show both +// the main label and the note. + +class WXDLLIMPEXP_ADV wxGenericCommandLinkButton + : public wxCommandLinkButtonBase +{ +public: + wxGenericCommandLinkButton() : wxCommandLinkButtonBase() { } + + + wxGenericCommandLinkButton(wxWindow *parent, + wxWindowID id, + const wxString& mainLabel = wxEmptyString, + const wxString& note = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + : wxCommandLinkButtonBase() + { + Create(parent, id, mainLabel, note, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& mainLabel = wxEmptyString, + const wxString& note = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + virtual void SetMainLabelAndNote(const wxString& mainLabel, + const wxString& note) + { + wxButton::SetLabel(mainLabel + '\n' + note); + } + +private: + void SetDefaultBitmap(); + + wxDECLARE_NO_COPY_CLASS(wxGenericCommandLinkButton); +}; + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + #include "wx/msw/commandlinkbutton.h" +#else + class WXDLLIMPEXP_ADV wxCommandLinkButton : public wxGenericCommandLinkButton + { + public: + wxCommandLinkButton() : wxGenericCommandLinkButton() { } + + wxCommandLinkButton(wxWindow *parent, + wxWindowID id, + const wxString& mainLabel = wxEmptyString, + const wxString& note = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + : wxGenericCommandLinkButton(parent, + id, + mainLabel, + note, + pos, + size, + style, + validator, + name) + { } + + private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxCommandLinkButton); + }; +#endif // __WXMSW__/!__WXMSW__ + +#endif // wxUSE_COMMANDLINKBUTTON + +#endif // _WX_COMMANDLINKBUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/compiler.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/compiler.h new file mode 100644 index 0000000000..de67477f84 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/compiler.h @@ -0,0 +1,170 @@ +/* + * Name: wx/compiler.h + * Purpose: Compiler-specific macro definitions. + * Author: Vadim Zeitlin + * Created: 2013-07-13 (extracted from wx/platform.h) + * Copyright: (c) 1997-2013 Vadim Zeitlin + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_COMPILER_H_ +#define _WX_COMPILER_H_ + +/* + Compiler detection and related helpers. + */ + +/* + Notice that Intel compiler can be used as Microsoft Visual C++ add-on and + so we should define both __INTELC__ and __VISUALC__ for it. +*/ +#ifdef __INTEL_COMPILER +# define __INTELC__ +#endif + +#if defined(_MSC_VER) + /* + define another standard symbol for Microsoft Visual C++: the standard + one (_MSC_VER) is also defined by some other compilers. + */ +# define __VISUALC__ _MSC_VER + + /* + define special symbols for different VC version instead of writing tests + for magic numbers such as 1200, 1300 &c repeatedly + */ +#if __VISUALC__ < 1100 +# error "This Visual C++ version is too old and not supported any longer." +#elif __VISUALC__ < 1200 +# define __VISUALC5__ +#elif __VISUALC__ < 1300 +# define __VISUALC6__ +#elif __VISUALC__ < 1400 +# define __VISUALC7__ +#elif __VISUALC__ < 1500 +# define __VISUALC8__ +#elif __VISUALC__ < 1600 +# define __VISUALC9__ +#elif __VISUALC__ < 1700 +# define __VISUALC10__ +#elif __VISUALC__ < 1800 +# define __VISUALC11__ +#elif __VISUALC__ < 1900 +# define __VISUALC12__ +#else +# pragma message("Please update wx/compiler.h to recognize this VC++ version") +#endif + +#elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__) +# define __BORLANDC__ +#elif defined(__WATCOMC__) +#elif defined(__SC__) +# define __SYMANTECC__ +#elif defined(__SUNPRO_CC) +# ifndef __SUNCC__ +# define __SUNCC__ __SUNPRO_CC +# endif /* Sun CC */ +#elif defined(__SC__) +# ifdef __DMC__ +# define __DIGITALMARS__ +# else +# define __SYMANTEC__ +# endif +#endif /* compiler */ + +/* + Macros for checking compiler version. +*/ + +/* + This macro can be used to test the gcc version and can be used like this: + +# if wxCHECK_GCC_VERSION(3, 1) + ... we have gcc 3.1 or later ... +# else + ... no gcc at all or gcc < 3.1 ... +# endif +*/ +#if defined(__GNUC__) && defined(__GNUC_MINOR__) + #define wxCHECK_GCC_VERSION( major, minor ) \ + ( ( __GNUC__ > (major) ) \ + || ( __GNUC__ == (major) && __GNUC_MINOR__ >= (minor) ) ) +#else + #define wxCHECK_GCC_VERSION( major, minor ) 0 +#endif + +/* + This macro can be used to test the Visual C++ version. +*/ +#ifndef __VISUALC__ +# define wxVISUALC_VERSION(major) 0 +# define wxCHECK_VISUALC_VERSION(major) 0 +#else +# define wxVISUALC_VERSION(major) ( (6 + major) * 100 ) +# define wxCHECK_VISUALC_VERSION(major) ( __VISUALC__ >= wxVISUALC_VERSION(major) ) +#endif + +/** + This is similar to wxCHECK_GCC_VERSION but for Sun CC compiler. + */ +#ifdef __SUNCC__ + /* + __SUNCC__ is 0xVRP where V is major version, R release and P patch level + */ + #define wxCHECK_SUNCC_VERSION(maj, min) (__SUNCC__ >= (((maj)<<8) | ((min)<<4))) +#else + #define wxCHECK_SUNCC_VERSION(maj, min) (0) +#endif + +#ifndef __WATCOMC__ +# define wxWATCOM_VERSION(major,minor) 0 +# define wxCHECK_WATCOM_VERSION(major,minor) 0 +# define wxONLY_WATCOM_EARLIER_THAN(major,minor) 0 +# define WX_WATCOM_ONLY_CODE( x ) +#else +# if __WATCOMC__ < 1200 +# error "Only Open Watcom is supported in this release" +# endif + +# define wxWATCOM_VERSION(major,minor) ( major * 100 + minor * 10 + 1100 ) +# define wxCHECK_WATCOM_VERSION(major,minor) ( __WATCOMC__ >= wxWATCOM_VERSION(major,minor) ) +# define wxONLY_WATCOM_EARLIER_THAN(major,minor) ( __WATCOMC__ < wxWATCOM_VERSION(major,minor) ) +# define WX_WATCOM_ONLY_CODE( x ) x +#endif + +/* + This macro can be used to check that the version of mingw32 CRT is at least + maj.min + */ + +/* + Define Mingw identification symbols, wxCHECK_MINGW32_VERSION() is defined in + wx/msw/gccpriv.h which is included later, see comments there. + */ +#ifdef __MINGW32__ +/* + MinGW-w64 project provides compilers for both Win32 and Win64 but only + defines the same __MINGW32__ symbol for the former as MinGW32 toolchain + which is quite different (notably doesn't provide many SDK headers that + MinGW-w64 does include). So we define a separate symbol which, unlike the + predefined __MINGW64__, can be used to detect this toolchain in both 32 and + 64 bit builds. + + And define __MINGW32_TOOLCHAIN__ for consistency and also because it's + convenient as we often want to have some workarounds only for the (old) + MinGW32 but not (newer) MinGW-w64, which still predefines __MINGW32__. + */ +# ifdef __MINGW64_VERSION_MAJOR +# ifndef __MINGW64_TOOLCHAIN__ +# define __MINGW64_TOOLCHAIN__ +# endif +# else +# ifndef __MINGW32_TOOLCHAIN__ +# define __MINGW32_TOOLCHAIN__ +# endif +# endif +#endif + +#endif // _WX_COMPILER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/compositewin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/compositewin.h new file mode 100644 index 0000000000..a46c257708 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/compositewin.h @@ -0,0 +1,229 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/compositewin.h +// Purpose: wxCompositeWindow<> declaration +// Author: Vadim Zeitlin +// Created: 2011-01-02 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COMPOSITEWIN_H_ +#define _WX_COMPOSITEWIN_H_ + +#include "wx/window.h" +#include "wx/containr.h" + +class WXDLLIMPEXP_FWD_CORE wxToolTip; + +// NB: This is an experimental and, as for now, undocumented class used only by +// wxWidgets itself internally. Don't use it in your code until its API is +// officially stabilized unless you are ready to change it with the next +// wxWidgets release. + +// ---------------------------------------------------------------------------- +// wxCompositeWindow is a helper for implementing composite windows: to define +// a class using subwindows, simply inherit from it specialized with the real +// base class name and implement GetCompositeWindowParts() pure virtual method. +// ---------------------------------------------------------------------------- + +// The template parameter W must be a wxWindow-derived class. +template +class wxCompositeWindow : public W +{ +public: + typedef W BaseWindowClass; + + // Default ctor doesn't do anything. + wxCompositeWindow() + { + this->Connect + ( + wxEVT_CREATE, + wxWindowCreateEventHandler(wxCompositeWindow::OnWindowCreate) + ); + + } + +#ifndef __VISUALC6__ + // FIXME-VC6: This compiler can't compile DoSetForAllParts() template function, + // it can't determine whether the deduced type should be "T" or "const T&". And + // without this function wxCompositeWindow is pretty useless so simply disable + // this code for it, this does mean that setting colours/fonts/... for + // composite controls won't work in the library compiled with it but so far + // this only affects the generic wxDatePickerCtrl which is not used by default + // under MSW anyhow so it doesn't seem to be worth it to spend time and uglify + // the code to fix it. + + // Override all wxWindow methods which must be forwarded to the composite + // window parts. + + // Attribute setters group. + // + // NB: Unfortunately we can't factor out the call for the setter itself + // into DoSetForAllParts() because we can't call the function passed to + // it non-virtually and we need to do this to avoid infinite recursion, + // so we work around this by calling the method of this object itself + // manually in each function. + virtual bool SetForegroundColour(const wxColour& colour) + { + if ( !BaseWindowClass::SetForegroundColour(colour) ) + return false; + + SetForAllParts(&wxWindowBase::SetForegroundColour, colour); + + return true; + } + + virtual bool SetBackgroundColour(const wxColour& colour) + { + if ( !BaseWindowClass::SetBackgroundColour(colour) ) + return false; + + SetForAllParts(&wxWindowBase::SetBackgroundColour, colour); + + return true; + } + + virtual bool SetFont(const wxFont& font) + { + if ( !BaseWindowClass::SetFont(font) ) + return false; + + SetForAllParts(&wxWindowBase::SetFont, font); + + return true; + } + + virtual bool SetCursor(const wxCursor& cursor) + { + if ( !BaseWindowClass::SetCursor(cursor) ) + return false; + + SetForAllParts(&wxWindowBase::SetCursor, cursor); + + return true; + } + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip(wxToolTip *tip) + { + BaseWindowClass::DoSetToolTip(tip); + + SetForAllParts(&wxWindowBase::CopyToolTip, tip); + } +#endif // wxUSE_TOOLTIPS + +#endif // !__VISUALC6__ + + virtual void SetFocus() + { + wxSetFocusToChild(this, NULL); + } + +private: + // Must be implemented by the derived class to return all children to which + // the public methods we override should forward to. + virtual wxWindowList GetCompositeWindowParts() const = 0; + + void OnWindowCreate(wxWindowCreateEvent& event) + { + event.Skip(); + + // Attach a few event handlers to all parts of the composite window. + // This makes the composite window behave more like a simple control + // and allows other code (such as wxDataViewCtrl's inline editing + // support) to hook into its event processing. + + wxWindow *child = event.GetWindow(); + if ( child == this ) + return; // not a child, we don't want to Connect() to ourselves + + // Always capture wxEVT_KILL_FOCUS: + child->Connect(wxEVT_KILL_FOCUS, + wxFocusEventHandler(wxCompositeWindow::OnKillFocus), + NULL, this); + + // Some events should be only handled for non-toplevel children. For + // example, we want to close the control in wxDataViewCtrl when Enter + // is pressed in the inline editor, but not when it's pressed in a + // popup dialog it opens. + wxWindow *win = child; + while ( win && win != this ) + { + if ( win->IsTopLevel() ) + return; + win = win->GetParent(); + } + + child->Connect(wxEVT_CHAR, + wxKeyEventHandler(wxCompositeWindow::OnChar), + NULL, this); + } + + void OnChar(wxKeyEvent& event) + { + if ( !this->ProcessWindowEvent(event) ) + event.Skip(); + } + + void OnKillFocus(wxFocusEvent& event) + { + // Ignore focus changes within the composite control: + wxWindow *win = event.GetWindow(); + while ( win ) + { + if ( win == this ) + { + event.Skip(); + return; + } + + // Note that we don't use IsTopLevel() check here, because we do + // want to ignore focus changes going to toplevel window that have + // the composite control as its parent; these would typically be + // some kind of control's popup window. + win = win->GetParent(); + } + + // The event shouldn't be ignored, forward it to the main control: + if ( !this->ProcessWindowEvent(event) ) + event.Skip(); + } + +#ifndef __VISUALC6__ + template + void SetForAllParts(bool (wxWindowBase::*func)(const T&), const T& arg) + { + DoSetForAllParts(func, arg); + } + + template + void SetForAllParts(bool (wxWindowBase::*func)(T*), T* arg) + { + DoSetForAllParts(func, arg); + } + + template + void DoSetForAllParts(bool (wxWindowBase::*func)(T), T arg) + { + // Simply call the setters for all parts of this composite window. + const wxWindowList parts = GetCompositeWindowParts(); + for ( wxWindowList::const_iterator i = parts.begin(); + i != parts.end(); + ++i ) + { + wxWindow * const child = *i; + + // Allow NULL elements in the list, this makes the code of derived + // composite controls which may have optionally shown children + // simpler and it doesn't cost us much here. + if ( child ) + (child->*func)(arg); + } + } +#endif // !__VISUALC6__ + + wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCompositeWindow, W); +}; + +#endif // _WX_COMPOSITEWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/confbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/confbase.h new file mode 100644 index 0000000000..9fd9df782a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/confbase.h @@ -0,0 +1,458 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/confbase.h +// Purpose: declaration of the base class of all config implementations +// (see also: fileconf.h and msw/regconf.h and iniconf.h) +// Author: Karsten Ballueder & Vadim Zeitlin +// Modified by: +// Created: 07.04.98 (adapted from appconf.h) +// Copyright: (c) 1997 Karsten Ballueder Ballueder@usa.net +// Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CONFBASE_H_ +#define _WX_CONFBASE_H_ + +#include "wx/defs.h" +#include "wx/string.h" +#include "wx/object.h" +#include "wx/base64.h" + +class WXDLLIMPEXP_FWD_BASE wxArrayString; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +/// shall we be case sensitive in parsing variable names? +#ifndef wxCONFIG_CASE_SENSITIVE + #define wxCONFIG_CASE_SENSITIVE 0 +#endif + +/// separates group and entry names (probably shouldn't be changed) +#ifndef wxCONFIG_PATH_SEPARATOR + #define wxCONFIG_PATH_SEPARATOR wxT('/') +#endif + +/// introduces immutable entries +// (i.e. the ones which can't be changed from the local config file) +#ifndef wxCONFIG_IMMUTABLE_PREFIX + #define wxCONFIG_IMMUTABLE_PREFIX wxT('!') +#endif + +#if wxUSE_CONFIG + +/// should we use registry instead of configuration files under Windows? +// (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's +// false) or wxRegConfig (if it's true and we're under Win32)) +#ifndef wxUSE_CONFIG_NATIVE + #define wxUSE_CONFIG_NATIVE 1 +#endif + +// not all compilers can deal with template Read/Write() methods, define this +// symbol if the template functions are available +#if (!defined(__VISUALC__) || __VISUALC__ > 1200) && \ + !defined( __VMS ) && \ + !(defined(__HP_aCC) && defined(__hppa)) && \ + !defined (__DMC__) + #define wxHAS_CONFIG_TEMPLATE_RW +#endif + +// Style flags for constructor style parameter +enum +{ + wxCONFIG_USE_LOCAL_FILE = 1, + wxCONFIG_USE_GLOBAL_FILE = 2, + wxCONFIG_USE_RELATIVE_PATH = 4, + wxCONFIG_USE_NO_ESCAPE_CHARACTERS = 8, + wxCONFIG_USE_SUBDIR = 16 +}; + +// ---------------------------------------------------------------------------- +// abstract base class wxConfigBase which defines the interface for derived +// classes +// +// wxConfig organizes the items in a tree-like structure (modelled after the +// Unix/Dos filesystem). There are groups (directories) and keys (files). +// There is always one current group given by the current path. +// +// Keys are pairs "key_name = value" where value may be of string or integer +// (long) type (TODO doubles and other types such as wxDate coming soon). +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxConfigBase : public wxObject +{ +public: + // constants + // the type of an entry + enum EntryType + { + Type_Unknown, + Type_String, + Type_Boolean, + Type_Integer, // use Read(long *) + Type_Float // use Read(double *) + }; + + // static functions + // sets the config object, returns the previous pointer + static wxConfigBase *Set(wxConfigBase *pConfig); + // get the config object, creates it on demand unless DontCreateOnDemand + // was called + static wxConfigBase *Get(bool createOnDemand = true) + { if ( createOnDemand && (!ms_pConfig) ) Create(); return ms_pConfig; } + // create a new config object: this function will create the "best" + // implementation of wxConfig available for the current platform, see + // comments near definition wxUSE_CONFIG_NATIVE for details. It returns + // the created object and also sets it as ms_pConfig. + static wxConfigBase *Create(); + // should Get() try to create a new log object if the current one is NULL? + static void DontCreateOnDemand() { ms_bAutoCreate = false; } + + // ctor & virtual dtor + // ctor (can be used as default ctor too) + // + // Not all args will always be used by derived classes, but including + // them all in each class ensures compatibility. If appName is empty, + // uses wxApp name + wxConfigBase(const wxString& appName = wxEmptyString, + const wxString& vendorName = wxEmptyString, + const wxString& localFilename = wxEmptyString, + const wxString& globalFilename = wxEmptyString, + long style = 0); + + // empty but ensures that dtor of all derived classes is virtual + virtual ~wxConfigBase(); + + // path management + // set current path: if the first character is '/', it's the absolute path, + // otherwise it's a relative path. '..' is supported. If the strPath + // doesn't exist it is created. + virtual void SetPath(const wxString& strPath) = 0; + // retrieve the current path (always as absolute path) + virtual const wxString& GetPath() const = 0; + + // enumeration: all functions here return false when there are no more items. + // you must pass the same lIndex to GetNext and GetFirst (don't modify it) + // enumerate subgroups + virtual bool GetFirstGroup(wxString& str, long& lIndex) const = 0; + virtual bool GetNextGroup (wxString& str, long& lIndex) const = 0; + // enumerate entries + virtual bool GetFirstEntry(wxString& str, long& lIndex) const = 0; + virtual bool GetNextEntry (wxString& str, long& lIndex) const = 0; + // get number of entries/subgroups in the current group, with or without + // it's subgroups + virtual size_t GetNumberOfEntries(bool bRecursive = false) const = 0; + virtual size_t GetNumberOfGroups(bool bRecursive = false) const = 0; + + // tests of existence + // returns true if the group by this name exists + virtual bool HasGroup(const wxString& strName) const = 0; + // same as above, but for an entry + virtual bool HasEntry(const wxString& strName) const = 0; + // returns true if either a group or an entry with a given name exist + bool Exists(const wxString& strName) const + { return HasGroup(strName) || HasEntry(strName); } + + // get the entry type + virtual EntryType GetEntryType(const wxString& name) const + { + // by default all entries are strings + return HasEntry(name) ? Type_String : Type_Unknown; + } + + // key access: returns true if value was really read, false if default used + // (and if the key is not found the default value is returned.) + + // read a string from the key + bool Read(const wxString& key, wxString *pStr) const; + bool Read(const wxString& key, wxString *pStr, const wxString& defVal) const; + + // read a number (long) + bool Read(const wxString& key, long *pl) const; + bool Read(const wxString& key, long *pl, long defVal) const; + + // read an int (wrapper around `long' version) + bool Read(const wxString& key, int *pi) const; + bool Read(const wxString& key, int *pi, int defVal) const; + + // read a double + bool Read(const wxString& key, double* val) const; + bool Read(const wxString& key, double* val, double defVal) const; + + // read a float + bool Read(const wxString& key, float* val) const; + bool Read(const wxString& key, float* val, float defVal) const; + + // read a bool + bool Read(const wxString& key, bool* val) const; + bool Read(const wxString& key, bool* val, bool defVal) const; + +#if wxUSE_BASE64 + // read a binary data block + bool Read(const wxString& key, wxMemoryBuffer* data) const + { return DoReadBinary(key, data); } + // no default version since it does not make sense for binary data +#endif // wxUSE_BASE64 + +#ifdef wxHAS_CONFIG_TEMPLATE_RW + // read other types, for which wxFromString is defined + template + bool Read(const wxString& key, T* value) const + { + wxString s; + if ( !Read(key, &s) ) + return false; + return wxFromString(s, value); + } + + template + bool Read(const wxString& key, T* value, const T& defVal) const + { + const bool found = Read(key, value); + if ( !found ) + { + if (IsRecordingDefaults()) + ((wxConfigBase *)this)->Write(key, defVal); + *value = defVal; + } + return found; + } +#endif // wxHAS_CONFIG_TEMPLATE_RW + + // convenience functions returning directly the value + wxString Read(const wxString& key, + const wxString& defVal = wxEmptyString) const + { wxString s; (void)Read(key, &s, defVal); return s; } + + // we have to provide a separate version for C strings as otherwise the + // template Read() would be used + wxString Read(const wxString& key, const char* defVal) const + { return Read(key, wxString(defVal)); } + wxString Read(const wxString& key, const wchar_t* defVal) const + { return Read(key, wxString(defVal)); } + + long ReadLong(const wxString& key, long defVal) const + { long l; (void)Read(key, &l, defVal); return l; } + + double ReadDouble(const wxString& key, double defVal) const + { double d; (void)Read(key, &d, defVal); return d; } + + bool ReadBool(const wxString& key, bool defVal) const + { bool b; (void)Read(key, &b, defVal); return b; } + + template + T ReadObject(const wxString& key, T const& defVal) const + { T t; (void)Read(key, &t, defVal); return t; } + + // for compatibility with wx 2.8 + long Read(const wxString& key, long defVal) const + { return ReadLong(key, defVal); } + + + // write the value (return true on success) + bool Write(const wxString& key, const wxString& value) + { return DoWriteString(key, value); } + + bool Write(const wxString& key, long value) + { return DoWriteLong(key, value); } + + bool Write(const wxString& key, double value) + { return DoWriteDouble(key, value); } + + bool Write(const wxString& key, bool value) + { return DoWriteBool(key, value); } + +#if wxUSE_BASE64 + bool Write(const wxString& key, const wxMemoryBuffer& buf) + { return DoWriteBinary(key, buf); } +#endif // wxUSE_BASE64 + + // we have to provide a separate version for C strings as otherwise they + // would be converted to bool and not to wxString as expected! + bool Write(const wxString& key, const char *value) + { return Write(key, wxString(value)); } + bool Write(const wxString& key, const unsigned char *value) + { return Write(key, wxString(value)); } + bool Write(const wxString& key, const wchar_t *value) + { return Write(key, wxString(value)); } + + + // we also have to provide specializations for other types which we want to + // handle using the specialized DoWriteXXX() instead of the generic template + // version below + bool Write(const wxString& key, char value) + { return DoWriteLong(key, value); } + + bool Write(const wxString& key, unsigned char value) + { return DoWriteLong(key, value); } + + bool Write(const wxString& key, short value) + { return DoWriteLong(key, value); } + + bool Write(const wxString& key, unsigned short value) + { return DoWriteLong(key, value); } + + bool Write(const wxString& key, unsigned int value) + { return DoWriteLong(key, value); } + + bool Write(const wxString& key, int value) + { return DoWriteLong(key, value); } + + bool Write(const wxString& key, unsigned long value) + { return DoWriteLong(key, value); } + + bool Write(const wxString& key, float value) + { return DoWriteDouble(key, value); } + + // Causes ambiguities in VC++ 6 and OpenVMS (at least) +#if ( (!defined(__VISUALC__) || __VISUALC__ > 1200) && !defined( __VMS ) && !defined (__DMC__)) + // for other types, use wxToString() + template + bool Write(const wxString& key, T const& value) + { return Write(key, wxToString(value)); } +#endif + + // permanently writes all changes + virtual bool Flush(bool bCurrentOnly = false) = 0; + + // renaming, all functions return false on failure (probably because the new + // name is already taken by an existing entry) + // rename an entry + virtual bool RenameEntry(const wxString& oldName, + const wxString& newName) = 0; + // rename a group + virtual bool RenameGroup(const wxString& oldName, + const wxString& newName) = 0; + + // delete entries/groups + // deletes the specified entry and the group it belongs to if + // it was the last key in it and the second parameter is true + virtual bool DeleteEntry(const wxString& key, + bool bDeleteGroupIfEmpty = true) = 0; + // delete the group (with all subgroups) + virtual bool DeleteGroup(const wxString& key) = 0; + // delete the whole underlying object (disk file, registry key, ...) + // primarily for use by uninstallation routine. + virtual bool DeleteAll() = 0; + + // options + // we can automatically expand environment variables in the config entries + // (this option is on by default, you can turn it on/off at any time) + bool IsExpandingEnvVars() const { return m_bExpandEnvVars; } + void SetExpandEnvVars(bool bDoIt = true) { m_bExpandEnvVars = bDoIt; } + // recording of default values + void SetRecordDefaults(bool bDoIt = true) { m_bRecordDefaults = bDoIt; } + bool IsRecordingDefaults() const { return m_bRecordDefaults; } + // does expansion only if needed + wxString ExpandEnvVars(const wxString& str) const; + + // misc accessors + wxString GetAppName() const { return m_appName; } + wxString GetVendorName() const { return m_vendorName; } + + // Used wxIniConfig to set members in constructor + void SetAppName(const wxString& appName) { m_appName = appName; } + void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; } + + void SetStyle(long style) { m_style = style; } + long GetStyle() const { return m_style; } + +protected: + static bool IsImmutable(const wxString& key) + { return !key.IsEmpty() && key[0] == wxCONFIG_IMMUTABLE_PREFIX; } + + // return the path without trailing separator, if any: this should be called + // to sanitize paths referring to the group names before passing them to + // wxConfigPathChanger as "/foo/bar/" should be the same as "/foo/bar" and it + // isn't interpreted in the same way by it (and this can't be changed there + // as it's not the same for the entries names) + static wxString RemoveTrailingSeparator(const wxString& key); + + // do read/write the values of different types + virtual bool DoReadString(const wxString& key, wxString *pStr) const = 0; + virtual bool DoReadLong(const wxString& key, long *pl) const = 0; + virtual bool DoReadDouble(const wxString& key, double* val) const; + virtual bool DoReadBool(const wxString& key, bool* val) const; +#if wxUSE_BASE64 + virtual bool DoReadBinary(const wxString& key, wxMemoryBuffer* buf) const = 0; +#endif // wxUSE_BASE64 + + virtual bool DoWriteString(const wxString& key, const wxString& value) = 0; + virtual bool DoWriteLong(const wxString& key, long value) = 0; + virtual bool DoWriteDouble(const wxString& key, double value); + virtual bool DoWriteBool(const wxString& key, bool value); +#if wxUSE_BASE64 + virtual bool DoWriteBinary(const wxString& key, const wxMemoryBuffer& buf) = 0; +#endif // wxUSE_BASE64 + +private: + // are we doing automatic environment variable expansion? + bool m_bExpandEnvVars; + // do we record default values? + bool m_bRecordDefaults; + + // static variables + static wxConfigBase *ms_pConfig; + static bool ms_bAutoCreate; + + // Application name and organisation name + wxString m_appName; + wxString m_vendorName; + + // Style flag + long m_style; + + DECLARE_ABSTRACT_CLASS(wxConfigBase) +}; + +// a handy little class which changes current path to the path of given entry +// and restores it in dtor: so if you declare a local variable of this type, +// you work in the entry directory and the path is automatically restored +// when the function returns +// Taken out of wxConfig since not all compilers can cope with nested classes. +class WXDLLIMPEXP_BASE wxConfigPathChanger +{ +public: + // ctor/dtor do path changing/restoring of the path + wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry); + ~wxConfigPathChanger(); + + // get the key name + const wxString& Name() const { return m_strName; } + + // this method must be called if the original path (i.e. the current path at + // the moment of creation of this object) could have been deleted to prevent + // us from restoring the not existing (any more) path + // + // if the original path doesn't exist any more, the path will be restored to + // the deepest still existing component of the old path + void UpdateIfDeleted(); + +private: + wxConfigBase *m_pContainer; // object we live in + wxString m_strName, // name of entry (i.e. name only) + m_strOldPath; // saved path + bool m_bChanged; // was the path changed? + + wxDECLARE_NO_COPY_CLASS(wxConfigPathChanger); +}; + + +#endif // wxUSE_CONFIG + +/* + Replace environment variables ($SOMETHING) with their values. The format is + $VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and + '_' only. '$' must be escaped ('\$') in order to be taken literally. +*/ + +WXDLLIMPEXP_BASE wxString wxExpandEnvVars(const wxString &sz); + +/* + Split path into parts removing '..' in progress + */ +WXDLLIMPEXP_BASE void wxSplitPath(wxArrayString& aParts, const wxString& path); + +#endif // _WX_CONFBASE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/config.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/config.h new file mode 100644 index 0000000000..4df4b8dd08 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/config.h @@ -0,0 +1,37 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/config.h +// Purpose: wxConfig base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CONFIG_H_BASE_ +#define _WX_CONFIG_H_BASE_ + +#include "wx/confbase.h" + +#if wxUSE_CONFIG + +// ---------------------------------------------------------------------------- +// define the native wxConfigBase implementation +// ---------------------------------------------------------------------------- + +// under Windows we prefer to use the native implementation but can be forced +// to use the file-based one +#if defined(__WINDOWS__) && wxUSE_CONFIG_NATIVE + #include "wx/msw/regconf.h" + #define wxConfig wxRegConfig +#elif defined(__WXOS2__) && wxUSE_CONFIG_NATIVE + #include "wx/os2/iniconf.h" + #define wxConfig wxIniConfig +#else // either we're under Unix or wish to always use config files + #include "wx/fileconf.h" + #define wxConfig wxFileConfig +#endif + +#endif // wxUSE_CONFIG + +#endif // _WX_CONFIG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/containr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/containr.h new file mode 100644 index 0000000000..277909e559 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/containr.h @@ -0,0 +1,414 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/containr.h +// Purpose: wxControlContainer and wxNavigationEnabled declarations +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.08.01 +// Copyright: (c) 2001, 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CONTAINR_H_ +#define _WX_CONTAINR_H_ + +#include "wx/defs.h" + +#ifndef wxHAS_NATIVE_TAB_TRAVERSAL + // We need wxEVT_XXX declarations in this case. + #include "wx/event.h" +#endif + +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxWindowBase; + +/* + This header declares wxControlContainer class however it's not a real + container of controls but rather just a helper used to implement TAB + navigation among the window children. You should rarely need to use it + directly, derive from the documented public wxNavigationEnabled<> class to + implement TAB navigation in a custom composite window. + */ + +// ---------------------------------------------------------------------------- +// wxControlContainerBase: common part used in both native and generic cases +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxControlContainerBase +{ +public: + // default ctor, SetContainerWindow() must be called later + wxControlContainerBase() + { + m_winParent = NULL; + + // By default, we accept focus ourselves. + m_acceptsFocusSelf = true; + + // But we don't have any children accepting it yet. + m_acceptsFocusChildren = false; + + m_inSetFocus = false; + m_winLastFocused = NULL; + } + virtual ~wxControlContainerBase() {} + + void SetContainerWindow(wxWindow *winParent) + { + wxASSERT_MSG( !m_winParent, wxT("shouldn't be called twice") ); + + m_winParent = winParent; + } + + // This can be called by the window to indicate that it never wants to have + // the focus for itself. + void DisableSelfFocus() + { m_acceptsFocusSelf = false; UpdateParentCanFocus(); } + + // This can be called to undo the effect of a previous DisableSelfFocus() + // (otherwise calling it is not necessary as the window does accept focus + // by default). + void EnableSelfFocus() + { m_acceptsFocusSelf = true; UpdateParentCanFocus(); } + + // should be called from SetFocus(), returns false if we did nothing with + // the focus and the default processing should take place + bool DoSetFocus(); + + // returns whether we should accept focus ourselves or not + bool AcceptsFocus() const; + + // Returns whether we or one of our children accepts focus. + bool AcceptsFocusRecursively() const + { return AcceptsFocus() || + (m_acceptsFocusChildren && HasAnyChildrenAcceptingFocus()); } + + // We accept focus from keyboard if we accept it at all. + bool AcceptsFocusFromKeyboard() const { return AcceptsFocusRecursively(); } + + // Call this when the number of children of the window changes. + // + // Returns true if we have any focusable children, false otherwise. + bool UpdateCanFocusChildren(); + +protected: + // set the focus to the child which had it the last time + virtual bool SetFocusToChild(); + + // return true if we have any children accepting focus + bool HasAnyFocusableChildren() const; + + // return true if we have any children that do accept focus right now + bool HasAnyChildrenAcceptingFocus() const; + + + // the parent window we manage the children for + wxWindow *m_winParent; + + // the child which had the focus last time this panel was activated + wxWindow *m_winLastFocused; + +private: + // Update the window status to reflect whether it is getting focus or not. + void UpdateParentCanFocus(); + + // Indicates whether the associated window can ever have focus itself. + // + // Usually this is the case, e.g. a wxPanel can be used either as a + // container for its children or just as a normal window which can be + // focused. But sometimes, e.g. for wxStaticBox, we can never have focus + // ourselves and can only get it if we have any focusable children. + bool m_acceptsFocusSelf; + + // Cached value remembering whether we have any children accepting focus. + bool m_acceptsFocusChildren; + + // a guard against infinite recursion + bool m_inSetFocus; +}; + +#ifdef wxHAS_NATIVE_TAB_TRAVERSAL + +// ---------------------------------------------------------------------------- +// wxControlContainer for native TAB navigation +// ---------------------------------------------------------------------------- + +// this must be a real class as we forward-declare it elsewhere +class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase +{ +protected: + // set the focus to the child which had it the last time + virtual bool SetFocusToChild(); +}; + +#else // !wxHAS_NATIVE_TAB_TRAVERSAL + +// ---------------------------------------------------------------------------- +// wxControlContainer for TAB navigation implemented in wx itself +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase +{ +public: + // default ctor, SetContainerWindow() must be called later + wxControlContainer(); + + // the methods to be called from the window event handlers + void HandleOnNavigationKey(wxNavigationKeyEvent& event); + void HandleOnFocus(wxFocusEvent& event); + void HandleOnWindowDestroy(wxWindowBase *child); + + // called from OnChildFocus() handler, i.e. when one of our (grand) + // children gets the focus + void SetLastFocus(wxWindow *win); + +protected: + + wxDECLARE_NO_COPY_CLASS(wxControlContainer); +}; + +#endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL + +// this function is for wxWidgets internal use only +extern WXDLLIMPEXP_CORE bool wxSetFocusToChild(wxWindow *win, wxWindow **child); + +// ---------------------------------------------------------------------------- +// wxNavigationEnabled: Derive from this class to support keyboard navigation +// among window children in a wxWindow-derived class. The details of this class +// don't matter, you just need to derive from it to make navigation work. +// ---------------------------------------------------------------------------- + +// The template parameter W must be a wxWindow-derived class. +template +class wxNavigationEnabled : public W +{ +public: + typedef W BaseWindowClass; + + wxNavigationEnabled() + { + m_container.SetContainerWindow(this); + +#ifndef wxHAS_NATIVE_TAB_TRAVERSAL + BaseWindowClass::Connect(wxEVT_NAVIGATION_KEY, + wxNavigationKeyEventHandler(wxNavigationEnabled::OnNavigationKey)); + + BaseWindowClass::Connect(wxEVT_SET_FOCUS, + wxFocusEventHandler(wxNavigationEnabled::OnFocus)); + + BaseWindowClass::Connect(wxEVT_CHILD_FOCUS, + wxChildFocusEventHandler(wxNavigationEnabled::OnChildFocus)); +#endif // !wxHAS_NATIVE_TAB_TRAVERSAL + } + + WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocus() const + { + return m_container.AcceptsFocus(); + } + + WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocusRecursively() const + { + return m_container.AcceptsFocusRecursively(); + } + + WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocusFromKeyboard() const + { + return m_container.AcceptsFocusFromKeyboard(); + } + + WXDLLIMPEXP_INLINE_CORE virtual void AddChild(wxWindowBase *child) + { + BaseWindowClass::AddChild(child); + + if ( m_container.UpdateCanFocusChildren() ) + { + // Under MSW we must have wxTAB_TRAVERSAL style for TAB navigation + // to work. + if ( !BaseWindowClass::HasFlag(wxTAB_TRAVERSAL) ) + BaseWindowClass::ToggleWindowStyle(wxTAB_TRAVERSAL); + } + } + + WXDLLIMPEXP_INLINE_CORE virtual void RemoveChild(wxWindowBase *child) + { +#ifndef wxHAS_NATIVE_TAB_TRAVERSAL + m_container.HandleOnWindowDestroy(child); +#endif // !wxHAS_NATIVE_TAB_TRAVERSAL + + BaseWindowClass::RemoveChild(child); + + // We could reset wxTAB_TRAVERSAL here but it doesn't seem to do any + // harm to keep it. + m_container.UpdateCanFocusChildren(); + } + + WXDLLIMPEXP_INLINE_CORE virtual void SetFocus() + { + if ( !m_container.DoSetFocus() ) + BaseWindowClass::SetFocus(); + } + + void SetFocusIgnoringChildren() + { + BaseWindowClass::SetFocus(); + } + +protected: +#ifndef wxHAS_NATIVE_TAB_TRAVERSAL + void OnNavigationKey(wxNavigationKeyEvent& event) + { + m_container.HandleOnNavigationKey(event); + } + + void OnFocus(wxFocusEvent& event) + { + m_container.HandleOnFocus(event); + } + + void OnChildFocus(wxChildFocusEvent& event) + { + m_container.SetLastFocus(event.GetWindow()); + event.Skip(); + } +#endif // !wxHAS_NATIVE_TAB_TRAVERSAL + + wxControlContainer m_container; + + + wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxNavigationEnabled, W); +}; + +// ---------------------------------------------------------------------------- +// Compatibility macros from now on, do NOT use them and preferably do not even +// look at them. +// ---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_8 + +// common part of WX_DECLARE_CONTROL_CONTAINER in the native and generic cases, +// it should be used in the wxWindow-derived class declaration +#define WX_DECLARE_CONTROL_CONTAINER_BASE() \ +public: \ + virtual bool AcceptsFocus() const; \ + virtual bool AcceptsFocusRecursively() const; \ + virtual bool AcceptsFocusFromKeyboard() const; \ + virtual void AddChild(wxWindowBase *child); \ + virtual void RemoveChild(wxWindowBase *child); \ + virtual void SetFocus(); \ + void SetFocusIgnoringChildren(); \ + \ +protected: \ + wxControlContainer m_container + +// this macro must be used in the derived class ctor +#define WX_INIT_CONTROL_CONTAINER() \ + m_container.SetContainerWindow(this) + +// common part of WX_DELEGATE_TO_CONTROL_CONTAINER in the native and generic +// cases, must be used in the wxWindow-derived class implementation +#define WX_DELEGATE_TO_CONTROL_CONTAINER_BASE(classname, basename) \ + void classname::AddChild(wxWindowBase *child) \ + { \ + basename::AddChild(child); \ + \ + m_container.UpdateCanFocusChildren(); \ + } \ + \ + bool classname::AcceptsFocusRecursively() const \ + { \ + return m_container.AcceptsFocusRecursively(); \ + } \ + \ + void classname::SetFocus() \ + { \ + if ( !m_container.DoSetFocus() ) \ + basename::SetFocus(); \ + } \ + \ + bool classname::AcceptsFocus() const \ + { \ + return m_container.AcceptsFocus(); \ + } \ + \ + bool classname::AcceptsFocusFromKeyboard() const \ + { \ + return m_container.AcceptsFocusFromKeyboard(); \ + } + + +#ifdef wxHAS_NATIVE_TAB_TRAVERSAL + +#define WX_EVENT_TABLE_CONTROL_CONTAINER(classname) + +#define WX_DECLARE_CONTROL_CONTAINER WX_DECLARE_CONTROL_CONTAINER_BASE + +#define WX_DELEGATE_TO_CONTROL_CONTAINER(classname, basename) \ + WX_DELEGATE_TO_CONTROL_CONTAINER_BASE(classname, basename) \ + \ + void classname::RemoveChild(wxWindowBase *child) \ + { \ + basename::RemoveChild(child); \ + \ + m_container.UpdateCanFocusChildren(); \ + } \ + \ + void classname::SetFocusIgnoringChildren() \ + { \ + basename::SetFocus(); \ + } + +#else // !wxHAS_NATIVE_TAB_TRAVERSAL + +// declare the methods to be forwarded +#define WX_DECLARE_CONTROL_CONTAINER() \ + WX_DECLARE_CONTROL_CONTAINER_BASE(); \ + \ +public: \ + void OnNavigationKey(wxNavigationKeyEvent& event); \ + void OnFocus(wxFocusEvent& event); \ + virtual void OnChildFocus(wxChildFocusEvent& event) + +// implement the event table entries for wxControlContainer +#define WX_EVENT_TABLE_CONTROL_CONTAINER(classname) \ + EVT_SET_FOCUS(classname::OnFocus) \ + EVT_CHILD_FOCUS(classname::OnChildFocus) \ + EVT_NAVIGATION_KEY(classname::OnNavigationKey) + +// implement the methods forwarding to the wxControlContainer +#define WX_DELEGATE_TO_CONTROL_CONTAINER(classname, basename) \ + WX_DELEGATE_TO_CONTROL_CONTAINER_BASE(classname, basename) \ + \ + void classname::RemoveChild(wxWindowBase *child) \ + { \ + m_container.HandleOnWindowDestroy(child); \ + \ + basename::RemoveChild(child); \ + \ + m_container.UpdateCanFocusChildren(); \ + } \ + \ + void classname::OnNavigationKey( wxNavigationKeyEvent& event ) \ + { \ + m_container.HandleOnNavigationKey(event); \ + } \ + \ + void classname::SetFocusIgnoringChildren() \ + { \ + basename::SetFocus(); \ + } \ + \ + void classname::OnChildFocus(wxChildFocusEvent& event) \ + { \ + m_container.SetLastFocus(event.GetWindow()); \ + event.Skip(); \ + } \ + \ + void classname::OnFocus(wxFocusEvent& event) \ + { \ + m_container.HandleOnFocus(event); \ + } + +#endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL + +#endif // WXWIN_COMPATIBILITY_2_8 + +#endif // _WX_CONTAINR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/control.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/control.h new file mode 100644 index 0000000000..cd7bc9e268 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/control.h @@ -0,0 +1,248 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/control.h +// Purpose: wxControl common interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 26.07.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CONTROL_H_BASE_ +#define _WX_CONTROL_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_CONTROLS + +#include "wx/window.h" // base class + +extern WXDLLIMPEXP_DATA_CORE(const char) wxControlNameStr[]; + + +// ---------------------------------------------------------------------------- +// Ellipsize() constants +// ---------------------------------------------------------------------------- + +enum wxEllipsizeFlags +{ + wxELLIPSIZE_FLAGS_NONE = 0, + wxELLIPSIZE_FLAGS_PROCESS_MNEMONICS = 1, + wxELLIPSIZE_FLAGS_EXPAND_TABS = 2, + + wxELLIPSIZE_FLAGS_DEFAULT = wxELLIPSIZE_FLAGS_PROCESS_MNEMONICS | + wxELLIPSIZE_FLAGS_EXPAND_TABS +}; + +// NB: Don't change the order of these values, they're the same as in +// PangoEllipsizeMode enum. +enum wxEllipsizeMode +{ + wxELLIPSIZE_NONE, + wxELLIPSIZE_START, + wxELLIPSIZE_MIDDLE, + wxELLIPSIZE_END +}; + +// ---------------------------------------------------------------------------- +// wxControl is the base class for all controls +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxControlBase : public wxWindow +{ +public: + wxControlBase() { } + + virtual ~wxControlBase(); + + // Create() function adds the validator parameter + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); + + // get the control alignment (left/right/centre, top/bottom/centre) + int GetAlignment() const { return m_windowStyle & wxALIGN_MASK; } + + // set label with mnemonics + virtual void SetLabel(const wxString& label) + { + m_labelOrig = label; + + InvalidateBestSize(); + + wxWindow::SetLabel(label); + } + + // return the original string, as it was passed to SetLabel() + // (i.e. with wx-style mnemonics) + virtual wxString GetLabel() const { return m_labelOrig; } + + // set label text (mnemonics will be escaped) + virtual void SetLabelText(const wxString& text) + { + SetLabel(EscapeMnemonics(text)); + } + + // get just the text of the label, without mnemonic characters ('&') + virtual wxString GetLabelText() const { return GetLabelText(GetLabel()); } + + +#if wxUSE_MARKUP + // Set the label with markup (and mnemonics). Markup is a simple subset of + // HTML with tags such as , and . By default it is not + // supported i.e. all the markup is simply stripped and SetLabel() is + // called but some controls in some ports do support this already and in + // the future most of them should. + // + // Notice that, being HTML-like, markup also supports XML entities so '<' + // should be encoded as "<" and so on, a bare '<' in the input will + // likely result in an error. As an exception, a bare '&' is allowed and + // indicates that the next character is a mnemonic. To insert a literal '&' + // in the control you need to use "&" in the input string. + // + // Returns true if the label was set, even if the markup in it was ignored. + // False is only returned if we failed to parse the label. + bool SetLabelMarkup(const wxString& markup) + { + return DoSetLabelMarkup(markup); + } +#endif // wxUSE_MARKUP + + + // controls by default inherit the colours of their parents, if a + // particular control class doesn't want to do it, it can override + // ShouldInheritColours() to return false + virtual bool ShouldInheritColours() const { return true; } + + + // WARNING: this doesn't work for all controls nor all platforms! + // + // simulates the event of given type (i.e. wxButton::Command() is just as + // if the button was clicked) + virtual void Command(wxCommandEvent &event); + + virtual bool SetFont(const wxFont& font); + + // wxControl-specific processing after processing the update event + virtual void DoUpdateWindowUI(wxUpdateUIEvent& event); + + wxSize GetSizeFromTextSize(int xlen, int ylen = -1) const + { return DoGetSizeFromTextSize(xlen, ylen); } + wxSize GetSizeFromTextSize(const wxSize& tsize) const + { return DoGetSizeFromTextSize(tsize.x, tsize.y); } + + + // static utilities for mnemonics char (&) handling + // ------------------------------------------------ + + // returns the given string without mnemonic characters ('&') + static wxString GetLabelText(const wxString& label); + + // returns the given string without mnemonic characters ('&') + // this function is identic to GetLabelText() and is provided for clarity + // and for symmetry with the wxStaticText::RemoveMarkup() function. + static wxString RemoveMnemonics(const wxString& str); + + // escapes (by doubling them) the mnemonics + static wxString EscapeMnemonics(const wxString& str); + + + // miscellaneous static utilities + // ------------------------------ + + // replaces parts of the given (multiline) string with an ellipsis if needed + static wxString Ellipsize(const wxString& label, const wxDC& dc, + wxEllipsizeMode mode, int maxWidth, + int flags = wxELLIPSIZE_FLAGS_DEFAULT); + + // return the accel index in the string or -1 if none and puts the modified + // string into second parameter if non NULL + static int FindAccelIndex(const wxString& label, + wxString *labelOnly = NULL); + + // this is a helper for the derived class GetClassDefaultAttributes() + // implementation: it returns the right colours for the classes which + // contain something else (e.g. wxListBox, wxTextCtrl, ...) instead of + // being simple controls (such as wxButton, wxCheckBox, ...) + static wxVisualAttributes + GetCompositeControlsDefaultAttributes(wxWindowVariant variant); + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const; + + // creates the control (calls wxWindowBase::CreateBase inside) and adds it + // to the list of parents children + bool CreateControl(wxWindowBase *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name); + +#if wxUSE_MARKUP + // This function may be overridden in the derived classes to implement + // support for labels with markup. The base class version simply strips the + // markup and calls SetLabel() with the remaining text. + virtual bool DoSetLabelMarkup(const wxString& markup); +#endif // wxUSE_MARKUP + + // override this to return the total control's size from a string size + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + + // initialize the common fields of wxCommandEvent + void InitCommandEvent(wxCommandEvent& event) const; + + // Ellipsize() helper: + static wxString DoEllipsizeSingleLine(const wxString& label, const wxDC& dc, + wxEllipsizeMode mode, int maxWidth, + int replacementWidth); + +#if wxUSE_MARKUP + // Remove markup from the given string, returns empty string on error i.e. + // if markup was syntactically invalid. + static wxString RemoveMarkup(const wxString& markup); +#endif // wxUSE_MARKUP + + + // this field contains the label in wx format, i.e. with '&' mnemonics, + // as it was passed to the last SetLabel() call + wxString m_labelOrig; + + wxDECLARE_NO_COPY_CLASS(wxControlBase); +}; + +// ---------------------------------------------------------------------------- +// include platform-dependent wxControl declarations +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/control.h" +#elif defined(__WXMSW__) + #include "wx/msw/control.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/control.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/control.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/control.h" +#elif defined(__WXMAC__) + #include "wx/osx/control.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/control.h" +#elif defined(__WXPM__) + #include "wx/os2/control.h" +#endif + +#endif // wxUSE_CONTROLS + +#endif + // _WX_CONTROL_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/convauto.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/convauto.h new file mode 100644 index 0000000000..0912368f64 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/convauto.h @@ -0,0 +1,155 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/convauto.h +// Purpose: wxConvAuto class declaration +// Author: Vadim Zeitlin +// Created: 2006-04-03 +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CONVAUTO_H_ +#define _WX_CONVAUTO_H_ + +#include "wx/strconv.h" +#include "wx/fontenc.h" + +// ---------------------------------------------------------------------------- +// wxConvAuto: uses BOM to automatically detect input encoding +// ---------------------------------------------------------------------------- + +// All currently recognized BOM values. +enum wxBOM +{ + wxBOM_Unknown = -1, + wxBOM_None, + wxBOM_UTF32BE, + wxBOM_UTF32LE, + wxBOM_UTF16BE, + wxBOM_UTF16LE, + wxBOM_UTF8 +}; + +class WXDLLIMPEXP_BASE wxConvAuto : public wxMBConv +{ +public: + // default ctor, the real conversion will be created on demand + wxConvAuto(wxFontEncoding enc = wxFONTENCODING_DEFAULT) + { + Init(); + + m_encDefault = enc; + } + + // copy ctor doesn't initialize anything neither as conversion can only be + // deduced on first use + wxConvAuto(const wxConvAuto& other) : wxMBConv() + { + Init(); + + m_encDefault = other.m_encDefault; + } + + virtual ~wxConvAuto() + { + if ( m_ownsConv ) + delete m_conv; + } + + // get/set the fall-back encoding used when the input text doesn't have BOM + // and isn't UTF-8 + // + // special values are wxFONTENCODING_MAX meaning not to use any fall back + // at all (but just fail to convert in this case) and wxFONTENCODING_SYSTEM + // meaning to use the encoding of the system locale + static wxFontEncoding GetFallbackEncoding() { return ms_defaultMBEncoding; } + static void SetFallbackEncoding(wxFontEncoding enc); + static void DisableFallbackEncoding() + { + SetFallbackEncoding(wxFONTENCODING_MAX); + } + + + // override the base class virtual function(s) to use our m_conv + virtual size_t ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN) const; + + virtual size_t FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen = wxNO_LEN) const; + + virtual size_t GetMBNulLen() const { return m_conv->GetMBNulLen(); } + + virtual wxMBConv *Clone() const { return new wxConvAuto(*this); } + + // return the BOM type of this buffer + static wxBOM DetectBOM(const char *src, size_t srcLen); + + // return the characters composing the given BOM. + static const char* GetBOMChars(wxBOM bomType, size_t* count); + + wxBOM GetBOM() const + { + return m_bomType; + } + +private: + // common part of all ctors + void Init() + { + // We don't initialize m_encDefault here as different ctors do it + // differently. + m_conv = NULL; + m_bomType = wxBOM_Unknown; + m_ownsConv = false; + m_consumedBOM = false; + } + + // initialize m_conv with the UTF-8 conversion + void InitWithUTF8() + { + m_conv = &wxConvUTF8; + m_ownsConv = false; + } + + // create the correct conversion object for the given BOM type + void InitFromBOM(wxBOM bomType); + + // create the correct conversion object for the BOM present in the + // beginning of the buffer + // + // return false if the buffer is too short to allow us to determine if we + // have BOM or not + bool InitFromInput(const char *src, size_t len); + + // adjust src and len to skip over the BOM (identified by m_bomType) at the + // start of the buffer + void SkipBOM(const char **src, size_t *len) const; + + + // fall-back multibyte encoding to use, may be wxFONTENCODING_SYSTEM or + // wxFONTENCODING_MAX but not wxFONTENCODING_DEFAULT + static wxFontEncoding ms_defaultMBEncoding; + + // conversion object which we really use, NULL until the first call to + // either ToWChar() or FromWChar() + wxMBConv *m_conv; + + // the multibyte encoding to use by default if input isn't Unicode + wxFontEncoding m_encDefault; + + // our BOM type + wxBOM m_bomType; + + // true if we allocated m_conv ourselves, false if we just use an existing + // global conversion + bool m_ownsConv; + + // true if we already skipped BOM when converting (and not just calculating + // the size) + bool m_consumedBOM; + + + wxDECLARE_NO_ASSIGN_CLASS(wxConvAuto); +}; + +#endif // _WX_CONVAUTO_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cpp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cpp.h new file mode 100644 index 0000000000..b5ce014e4d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cpp.h @@ -0,0 +1,187 @@ +/* + * Name: wx/cpp.h + * Purpose: Various preprocessor helpers + * Author: Vadim Zeitlin + * Created: 2006-09-30 + * Copyright: (c) 2006 Vadim Zeitlin + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_CPP_H_ +#define _WX_CPP_H_ + +#include "wx/compiler.h" /* wxCHECK_XXX_VERSION() macros */ + +/* wxCONCAT works like preprocessor ## operator but also works with macros */ +#define wxCONCAT_HELPER(text, line) text ## line + +#define wxCONCAT(x1, x2) \ + wxCONCAT_HELPER(x1, x2) +#define wxCONCAT3(x1, x2, x3) \ + wxCONCAT(wxCONCAT(x1, x2), x3) +#define wxCONCAT4(x1, x2, x3, x4) \ + wxCONCAT(wxCONCAT3(x1, x2, x3), x4) +#define wxCONCAT5(x1, x2, x3, x4, x5) \ + wxCONCAT(wxCONCAT4(x1, x2, x3, x4), x5) +#define wxCONCAT6(x1, x2, x3, x4, x5, x6) \ + wxCONCAT(wxCONCAT5(x1, x2, x3, x4, x5), x6) +#define wxCONCAT7(x1, x2, x3, x4, x5, x6, x7) \ + wxCONCAT(wxCONCAT6(x1, x2, x3, x4, x5, x6), x7) +#define wxCONCAT8(x1, x2, x3, x4, x5, x6, x7, x8) \ + wxCONCAT(wxCONCAT7(x1, x2, x3, x4, x5, x6, x7), x8) +#define wxCONCAT9(x1, x2, x3, x4, x5, x6, x7, x8, x9) \ + wxCONCAT(wxCONCAT8(x1, x2, x3, x4, x5, x6, x7, x8), x9) + +/* wxSTRINGIZE works as the preprocessor # operator but also works with macros */ +#define wxSTRINGIZE_HELPER(x) #x +#define wxSTRINGIZE(x) wxSTRINGIZE_HELPER(x) + +/* a Unicode-friendly version of wxSTRINGIZE_T */ +#define wxSTRINGIZE_T(x) wxAPPLY_T(wxSTRINGIZE(x)) + +/* + Special workarounds for compilers with broken "##" operator. For all the + other ones we can just use it directly. + */ +#ifdef wxCOMPILER_BROKEN_CONCAT_OPER + #define wxPREPEND_L(x) L ## x + #define wxAPPEND_i64(x) x ## i64 + #define wxAPPEND_ui64(x) x ## ui64 +#endif /* wxCOMPILER_BROKEN_CONCAT_OPER */ + +/* + Helper macros for wxMAKE_UNIQUE_NAME: normally this works by appending the + current line number to the given identifier to reduce the probability of the + conflict (it may still happen if this is used in the headers, hence you + should avoid doing it or provide unique prefixes then) but we have to do it + differently for VC++ + */ +#if defined(__VISUALC__) && (__VISUALC__ >= 1300) + /* + __LINE__ handling is completely broken in VC++ when using "Edit and + Continue" (/ZI option) and results in preprocessor errors if we use it + inside the macros. Luckily VC7 has another standard macro which can be + used like this and is even better than __LINE__ because it is globally + unique. + */ +# define wxCONCAT_LINE(text) wxCONCAT(text, __COUNTER__) +#else /* normal compilers */ +# define wxCONCAT_LINE(text) wxCONCAT(text, __LINE__) +#endif + +/* Create a "unique" name with the given prefix */ +#define wxMAKE_UNIQUE_NAME(text) wxCONCAT_LINE(text) + +/* + This macro can be passed as argument to another macro when you don't have + anything to pass in fact. + */ +#define wxEMPTY_PARAMETER_VALUE /* Fake macro parameter value */ + +/* + Helpers for defining macros that expand into a single statement. + + The standatd solution is to use "do { ... } while (0)" statement but MSVC + generates a C4127 "condition expression is constant" warning for it so we + use something which is just complicated enough to not be recognized as a + constant but still simple enough to be optimized away. + + Another solution would be to use __pragma() to temporarily disable C4127. + + Notice that wxASSERT_ARG_TYPE in wx/strvargarg.h relies on these macros + creating some kind of a loop because it uses "break". + */ +#ifdef __WATCOMC__ + #define wxFOR_ONCE(name) for(int name=0; name<1; name++) + #define wxSTATEMENT_MACRO_BEGIN wxFOR_ONCE(wxMAKE_UNIQUE_NAME(wxmacro)) { + #define wxSTATEMENT_MACRO_END } +#else + #define wxSTATEMENT_MACRO_BEGIN do { + #define wxSTATEMENT_MACRO_END } while ( (void)0, 0 ) +#endif + +/* + Define __WXFUNCTION__ which is like standard __FUNCTION__ but defined as + NULL for the compilers which don't support the latter. + */ +#ifndef __WXFUNCTION__ + /* TODO: add more compilers supporting __FUNCTION__ */ + #if defined(__DMC__) + /* + __FUNCTION__ happens to be not defined within class members + http://www.digitalmars.com/drn-bin/wwwnews?c%2B%2B.beta/485 + */ + #define __WXFUNCTION__ (NULL) + #elif defined(__GNUC__) || \ + (defined(_MSC_VER) && _MSC_VER >= 1300) || \ + defined(__FUNCTION__) + #define __WXFUNCTION__ __FUNCTION__ + #else + /* still define __WXFUNCTION__ to avoid #ifdefs elsewhere */ + #define __WXFUNCTION__ (NULL) + #endif +#endif /* __WXFUNCTION__ already defined */ + + +/* Auto-detect variadic macros support unless explicitly disabled. */ +#if !defined(HAVE_VARIADIC_MACROS) && !defined(wxNO_VARIADIC_MACROS) + /* Any C99 or C++11 compiler should have them. */ + #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ + (defined(__cplusplus) && __cplusplus >= 201103L) + #define HAVE_VARIADIC_MACROS + #elif wxCHECK_GCC_VERSION(3,0) + #define HAVE_VARIADIC_MACROS + #elif wxCHECK_VISUALC_VERSION(8) + #define HAVE_VARIADIC_MACROS + #elif wxCHECK_WATCOM_VERSION(1,2) + #define HAVE_VARIADIC_MACROS + #endif +#endif /* !HAVE_VARIADIC_MACROS */ + + + +#ifdef HAVE_VARIADIC_MACROS +/* + wxCALL_FOR_EACH(what, ...) calls the macro from its first argument, what(pos, x), + for every remaining argument 'x', with 'pos' being its 1-based index in + *reverse* order (with the last argument being numbered 1). + + For example, wxCALL_FOR_EACH(test, a, b, c) expands into this: + + test(3, a) \ + test(2, b) \ + test(1, c) + + Up to eight arguments are supported. + + (With thanks to https://groups.google.com/d/topic/comp.std.c/d-6Mj5Lko_s/discussion + and http://stackoverflow.com/questions/1872220/is-it-possible-to-iterate-over-arguments-in-variadic-macros) +*/ +#define wxCALL_FOR_EACH_NARG(...) wxCALL_FOR_EACH_NARG_((__VA_ARGS__, wxCALL_FOR_EACH_RSEQ_N())) +#define wxCALL_FOR_EACH_NARG_(args) wxCALL_FOR_EACH_ARG_N args +#define wxCALL_FOR_EACH_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N +#define wxCALL_FOR_EACH_RSEQ_N() 8, 7, 6, 5, 4, 3, 2, 1, 0 + +#define wxCALL_FOR_EACH_1(what, x) what(1, x) +#define wxCALL_FOR_EACH_2(what, x, ...) what(2, x) wxCALL_FOR_EACH_1(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_3(what, x, ...) what(3, x) wxCALL_FOR_EACH_2(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_4(what, x, ...) what(4, x) wxCALL_FOR_EACH_3(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_5(what, x, ...) what(5, x) wxCALL_FOR_EACH_4(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_6(what, x, ...) what(6, x) wxCALL_FOR_EACH_5(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_7(what, x, ...) what(7, x) wxCALL_FOR_EACH_6(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_8(what, x, ...) what(8, x) wxCALL_FOR_EACH_7(what, __VA_ARGS__) + +#define wxCALL_FOR_EACH_(N, args) \ + wxCONCAT(wxCALL_FOR_EACH_, N) args + +#define wxCALL_FOR_EACH(what, ...) \ + wxCALL_FOR_EACH_(wxCALL_FOR_EACH_NARG(__VA_ARGS__), (what, __VA_ARGS__)) + +#else + #define wxCALL_FOR_EACH Error_wx_CALL_FOR_EACH_requires_variadic_macros_support +#endif /* HAVE_VARIADIC_MACROS */ + +#endif /* _WX_CPP_H_ */ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cppunit.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cppunit.h new file mode 100644 index 0000000000..89edd9165f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cppunit.h @@ -0,0 +1,301 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cppunit.h +// Purpose: wrapper header for CppUnit headers +// Author: Vadim Zeitlin +// Created: 15.02.04 +// Copyright: (c) 2004 Vadim Zeitlin +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CPPUNIT_H_ +#define _WX_CPPUNIT_H_ + +/////////////////////////////////////////////////////////////////////////////// +// using CPPUNIT_TEST() macro results in this warning, disable it as there is +// no other way to get rid of it and it's not very useful anyhow +#ifdef __VISUALC__ + // typedef-name 'foo' used as synonym for class-name 'bar' + #pragma warning(disable:4097) + + // unreachable code: we don't care about warnings in CppUnit headers + #pragma warning(disable:4702) + + // 'id': identifier was truncated to 'num' characters in the debug info + #pragma warning(disable:4786) +#endif // __VISUALC__ + +#ifdef __BORLANDC__ + #pragma warn -8022 +#endif + +#ifndef CPPUNIT_STD_NEED_ALLOCATOR + #define CPPUNIT_STD_NEED_ALLOCATOR 0 +#endif + +/////////////////////////////////////////////////////////////////////////////// +// Set the default format for the errors, which can be used by an IDE to jump +// to the error location. This default gets overridden by the cppunit headers +// for some compilers (e.g. VC++). + +#ifndef CPPUNIT_COMPILER_LOCATION_FORMAT + #define CPPUNIT_COMPILER_LOCATION_FORMAT "%p:%l:" +#endif + + +/////////////////////////////////////////////////////////////////////////////// +// Include all needed cppunit headers. +// + +#include "wx/beforestd.h" +#ifdef __VISUALC__ + #pragma warning(push) + + // with cppunit 1.12 we get many bogus warnings 4701 (local variable may be + // used without having been initialized) in TestAssert.h + #pragma warning(disable:4701) + + // and also 4100 (unreferenced formal parameter) in extensions/ + // ExceptionTestCaseDecorator.h + #pragma warning(disable:4100) +#endif + +#include +#include +#include +#include +#include + +#ifdef __VISUALC__ + #pragma warning(pop) +#endif +#include "wx/afterstd.h" + +#include "wx/string.h" + + +/////////////////////////////////////////////////////////////////////////////// +// Set of helpful test macros. +// + +// Base macro for wrapping CPPUNIT_TEST macros and so making them conditional +// tests, meaning that the test only get registered and thus run when a given +// runtime condition is true. +// In case the condition is evaluated as false a skip message is logged +// (the message will only be shown in verbose mode). +#define WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, anyTest) \ + if (Condition) \ + { anyTest; } \ + else \ + wxLogInfo(wxString::Format(wxT("skipping: %s.%s\n reason: %s equals false\n"), \ + wxString(suiteName, wxConvUTF8).c_str(), \ + wxString(#testMethod, wxConvUTF8).c_str(), \ + wxString(#Condition, wxConvUTF8).c_str())) + +// Conditional CPPUNIT_TEST macro. +#define WXTEST_WITH_CONDITION(suiteName, Condition, testMethod) \ + WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, CPPUNIT_TEST(testMethod)) +// Conditional CPPUNIT_TEST_FAIL macro. +#define WXTEST_FAIL_WITH_CONDITION(suiteName, Condition, testMethod) \ + WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, CPPUNIT_TEST_FAIL(testMethod)) + +CPPUNIT_NS_BEGIN + +// provide an overload of cppunit assertEquals(T, T) which can be used to +// compare wxStrings directly with C strings +inline void +assertEquals(const char *expected, + const char *actual, + CppUnit::SourceLine sourceLine, + const std::string& message) +{ + assertEquals(wxString(expected), wxString(actual), sourceLine, message); +} + +inline void +assertEquals(const char *expected, + const wxString& actual, + CppUnit::SourceLine sourceLine, + const std::string& message) +{ + assertEquals(wxString(expected), actual, sourceLine, message); +} + +inline void +assertEquals(const wxString& expected, + const char *actual, + CppUnit::SourceLine sourceLine, + const std::string& message) +{ + assertEquals(expected, wxString(actual), sourceLine, message); +} + +inline void +assertEquals(const wchar_t *expected, + const wxString& actual, + CppUnit::SourceLine sourceLine, + const std::string& message) +{ + assertEquals(wxString(expected), actual, sourceLine, message); +} + +inline void +assertEquals(const wxString& expected, + const wchar_t *actual, + CppUnit::SourceLine sourceLine, + const std::string& message) +{ + assertEquals(expected, wxString(actual), sourceLine, message); +} + +CPPUNIT_NS_END + +// define an assertEquals() overload for the given types, this is a helper and +// shouldn't be used directly because of VC6 complications, see below +#define WX_CPPUNIT_ASSERT_EQUALS(T1, T2) \ + inline void \ + assertEquals(T1 expected, \ + T2 actual, \ + CppUnit::SourceLine sourceLine, \ + const std::string& message) \ + { \ + if ( !assertion_traits::equal(expected,actual) ) \ + { \ + Asserter::failNotEqual( assertion_traits::toString(expected), \ + assertion_traits::toString(actual), \ + sourceLine, \ + message ); \ + } \ + } + +// this macro allows us to specify (usually literal) ints as expected values +// for functions returning integral types different from "int" +// +// FIXME-VC6: due to incorrect resolution of overloaded/template functions in +// this compiler (it basically doesn't use the template version at +// all if any overloaded function matches partially even if none of +// them matches fully) we also need to provide extra overloads + +#ifdef __VISUALC6__ + #define WX_CPPUNIT_ALLOW_EQUALS_TO_INT(T) \ + CPPUNIT_NS_BEGIN \ + WX_CPPUNIT_ASSERT_EQUALS(int, T) \ + WX_CPPUNIT_ASSERT_EQUALS(T, int) \ + WX_CPPUNIT_ASSERT_EQUALS(T, T) \ + CPPUNIT_NS_END + + CPPUNIT_NS_BEGIN + WX_CPPUNIT_ASSERT_EQUALS(int, int) + CPPUNIT_NS_END +#else // !VC6 + #define WX_CPPUNIT_ALLOW_EQUALS_TO_INT(T) \ + CPPUNIT_NS_BEGIN \ + WX_CPPUNIT_ASSERT_EQUALS(int, T) \ + WX_CPPUNIT_ASSERT_EQUALS(T, int) \ + CPPUNIT_NS_END +#endif // VC6/!VC6 + +WX_CPPUNIT_ALLOW_EQUALS_TO_INT(long) +WX_CPPUNIT_ALLOW_EQUALS_TO_INT(short) +WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned) +WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned long) + +#if defined( __VMS ) && defined( __ia64 ) +WX_CPPUNIT_ALLOW_EQUALS_TO_INT(std::basic_streambuf::pos_type); +#endif + +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG +WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxLongLong_t) +WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned wxLongLong_t) +#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + +// Use this macro to compare a wxArrayString with the pipe-separated elements +// of the given string +// +// NB: it's a macro and not a function to have the correct line numbers in the +// test failure messages +#define WX_ASSERT_STRARRAY_EQUAL(s, a) \ + { \ + wxArrayString expected(wxSplit(s, '|', '\0')); \ + \ + CPPUNIT_ASSERT_EQUAL( expected.size(), a.size() ); \ + \ + for ( size_t n = 0; n < a.size(); n++ ) \ + { \ + CPPUNIT_ASSERT_EQUAL( expected[n], a[n] ); \ + } \ + } + +// Use this macro to assert with the given formatted message (it should contain +// the format string and arguments in a separate pair of parentheses) +#define WX_ASSERT_MESSAGE(msg, cond) \ + CPPUNIT_ASSERT_MESSAGE(std::string(wxString::Format msg .mb_str()), (cond)) + +#define WX_ASSERT_EQUAL_MESSAGE(msg, expected, actual) \ + CPPUNIT_ASSERT_EQUAL_MESSAGE(std::string(wxString::Format msg .mb_str()), \ + (expected), (actual)) + +/////////////////////////////////////////////////////////////////////////////// +// define stream inserter for wxString if it's not defined in the main library, +// we need it to output the test failures involving wxString +#if !wxUSE_STD_IOSTREAM + +#include "wx/string.h" + +#include + +inline std::ostream& operator<<(std::ostream& o, const wxString& s) +{ +#if wxUSE_UNICODE + return o << (const char *)wxSafeConvertWX2MB(s.wc_str()); +#else + return o << s.c_str(); +#endif +} + +#endif // !wxUSE_STD_IOSTREAM + +// VC6 doesn't provide overloads for operator<<(__int64) in its stream classes +// so do it ourselves +#if defined(__VISUALC6__) && defined(wxLongLong_t) + +#include "wx/longlong.h" + +inline std::ostream& operator<<(std::ostream& ostr, wxLongLong_t ll) +{ + ostr << wxLongLong(ll).ToString(); + + return ostr; +} + +inline std::ostream& operator<<(std::ostream& ostr, unsigned wxLongLong_t llu) +{ + ostr << wxULongLong(llu).ToString(); + + return ostr; +} + +#endif // VC6 && wxLongLong_t + +/////////////////////////////////////////////////////////////////////////////// +// Some more compiler warning tweaking and auto linking. +// + +#ifdef __BORLANDC__ + #pragma warn .8022 +#endif + +#ifdef _MSC_VER + #pragma warning(default:4702) +#endif // _MSC_VER + +// for VC++ automatically link in cppunit library +#ifdef __VISUALC__ + #ifdef NDEBUG + #pragma comment(lib, "cppunit.lib") + #else // Debug + #pragma comment(lib, "cppunitd.lib") + #endif // Release/Debug +#endif + +#endif // _WX_CPPUNIT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/crt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/crt.h new file mode 100644 index 0000000000..9b939fd0f9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/crt.h @@ -0,0 +1,22 @@ +////////////////////////////////////////////////////////////////////////////// +// Name: wx/crt.h +// Purpose: Header to include all headers with wrappers for CRT functions +// Author: Robert Roebling +// Created: 2007-05-30 +// Copyright: (c) 2007 wxWidgets dev team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CRT_H_ +#define _WX_CRT_H_ + +#include "wx/defs.h" + +// include wxChar type definition: +#include "wx/chartype.h" + +// and wrappers for CRT functions: +#include "wx/wxcrt.h" +#include "wx/wxcrtvararg.h" + +#endif // _WX_CRT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cshelp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cshelp.h new file mode 100644 index 0000000000..723ac14e0a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cshelp.h @@ -0,0 +1,243 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cshelp.h +// Purpose: Context-sensitive help support classes +// Author: Julian Smart, Vadim Zeitlin +// Modified by: +// Created: 08/09/2000 +// Copyright: (c) 2000 Julian Smart, Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CSHELP_H_ +#define _WX_CSHELP_H_ + +#include "wx/defs.h" + +#if wxUSE_HELP + +#include "wx/help.h" + +#include "wx/hashmap.h" +#if wxUSE_BMPBUTTON +#include "wx/bmpbuttn.h" +#endif + +#include "wx/event.h" + +// ---------------------------------------------------------------------------- +// classes used to implement context help UI +// ---------------------------------------------------------------------------- + +/* + * wxContextHelp + * Invokes context-sensitive help. When the user + * clicks on a window, a wxEVT_HELP event will be sent to that + * window for the application to display help for. + */ + +class WXDLLIMPEXP_CORE wxContextHelp : public wxObject +{ +public: + wxContextHelp(wxWindow* win = NULL, bool beginHelp = true); + virtual ~wxContextHelp(); + + bool BeginContextHelp(wxWindow* win); + bool EndContextHelp(); + + bool EventLoop(); + bool DispatchEvent(wxWindow* win, const wxPoint& pt); + + void SetStatus(bool status) { m_status = status; } + +protected: + bool m_inHelp; + bool m_status; // true if the user left-clicked + +private: + DECLARE_DYNAMIC_CLASS(wxContextHelp) +}; + +#if wxUSE_BMPBUTTON +/* + * wxContextHelpButton + * You can add this to your dialogs (especially on non-Windows platforms) + * to put the application into context help mode. + */ + +class WXDLLIMPEXP_CORE wxContextHelpButton : public wxBitmapButton +{ +public: + wxContextHelpButton(wxWindow* parent, + wxWindowID id = wxID_CONTEXT_HELP, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxBU_AUTODRAW); + + void OnContextHelp(wxCommandEvent& event); + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxContextHelpButton) + DECLARE_EVENT_TABLE() +}; + +#endif + +// ---------------------------------------------------------------------------- +// classes used to implement context help support +// ---------------------------------------------------------------------------- + +// wxHelpProvider is an abstract class used by the program implementing context help to +// show the help text (or whatever: it may be HTML page or anything else) for +// the given window. +// +// The current help provider must be explicitly set by the application using +// wxHelpProvider::Set(). +// +// Special note about ShowHelpAtPoint() and ShowHelp(): we want to be able to +// override ShowHelpAtPoint() when we need to use different help messages for +// different parts of the window, but it should also be possible to override +// just ShowHelp() both for backwards compatibility and just because most +// often the help does not, in fact, depend on the position and so +// implementing just ShowHelp() is simpler and more natural, so by default +// ShowHelpAtPoint() forwards to ShowHelp(). But this means that +// wxSimpleHelpProvider has to override ShowHelp() and not ShowHelpAtPoint() +// for backwards compatibility as otherwise the existing code deriving from it +// and overriding ShowHelp() but calling the base class version wouldn't work +// any more, which forces us to use a rather ugly hack and pass the extra +// parameters of ShowHelpAtPoint() to ShowHelp() via member variables. +class WXDLLIMPEXP_CORE wxHelpProvider +{ +public: + // get/set the current (application-global) help provider (Set() returns + // the previous one) + static wxHelpProvider *Set(wxHelpProvider *helpProvider) + { + wxHelpProvider *helpProviderOld = ms_helpProvider; + ms_helpProvider = helpProvider; + return helpProviderOld; + } + + // unlike some other class, the help provider is not created on demand, + // this must be explicitly done by the application + static wxHelpProvider *Get() { return ms_helpProvider; } + + // get the help string (whose interpretation is help provider dependent + // except that empty string always means that no help is associated with + // the window) for this window + virtual wxString GetHelp(const wxWindowBase *window) = 0; + + // do show help for the given window (uses window->GetHelpAtPoint() + // internally if applicable), return true if it was done or false + // if no help available for this window + virtual bool ShowHelpAtPoint(wxWindowBase *window, + const wxPoint& pt, + wxHelpEvent::Origin origin) + { + wxCHECK_MSG( window, false, wxT("window must not be NULL") ); + + m_helptextAtPoint = pt; + m_helptextOrigin = origin; + + return ShowHelp(window); + } + + // show help for the given window, see ShowHelpAtPoint() above + virtual bool ShowHelp(wxWindowBase * WXUNUSED(window)) { return false; } + + // associate the text with the given window or id: although all help + // providers have these functions to allow making wxWindow::SetHelpText() + // work, not all of them implement them + virtual void AddHelp(wxWindowBase *window, const wxString& text); + + // this version associates the given text with all window with this id + // (may be used to set the same help string for all [Cancel] buttons in + // the application, for example) + virtual void AddHelp(wxWindowID id, const wxString& text); + + // removes the association + virtual void RemoveHelp(wxWindowBase* window); + + // virtual dtor for any base class + virtual ~wxHelpProvider(); + +protected: + wxHelpProvider() + : m_helptextAtPoint(wxDefaultPosition), + m_helptextOrigin(wxHelpEvent::Origin_Unknown) + { + } + + // helper method used by ShowHelp(): returns the help string to use by + // using m_helptextAtPoint/m_helptextOrigin if they're set or just GetHelp + // otherwise + wxString GetHelpTextMaybeAtPoint(wxWindowBase *window); + + + // parameters of the last ShowHelpAtPoint() call, used by ShowHelp() + wxPoint m_helptextAtPoint; + wxHelpEvent::Origin m_helptextOrigin; + +private: + static wxHelpProvider *ms_helpProvider; +}; + +WX_DECLARE_EXPORTED_HASH_MAP( wxUIntPtr, wxString, wxIntegerHash, + wxIntegerEqual, wxSimpleHelpProviderHashMap ); + +// wxSimpleHelpProvider is an implementation of wxHelpProvider which supports +// only plain text help strings and shows the string associated with the +// control (if any) in a tooltip +class WXDLLIMPEXP_CORE wxSimpleHelpProvider : public wxHelpProvider +{ +public: + // implement wxHelpProvider methods + virtual wxString GetHelp(const wxWindowBase *window); + + // override ShowHelp() and not ShowHelpAtPoint() as explained above + virtual bool ShowHelp(wxWindowBase *window); + + virtual void AddHelp(wxWindowBase *window, const wxString& text); + virtual void AddHelp(wxWindowID id, const wxString& text); + virtual void RemoveHelp(wxWindowBase* window); + +protected: + // we use 2 hashes for storing the help strings associated with windows + // and the ids + wxSimpleHelpProviderHashMap m_hashWindows, + m_hashIds; +}; + +// wxHelpControllerHelpProvider is an implementation of wxHelpProvider which supports +// both context identifiers and plain text help strings. If the help text is an integer, +// it is passed to wxHelpController::DisplayContextPopup. Otherwise, it shows the string +// in a tooltip as per wxSimpleHelpProvider. +class WXDLLIMPEXP_CORE wxHelpControllerHelpProvider : public wxSimpleHelpProvider +{ +public: + // Note that it doesn't own the help controller. The help controller + // should be deleted separately. + wxHelpControllerHelpProvider(wxHelpControllerBase* hc = NULL); + + // implement wxHelpProvider methods + + // again (see above): this should be ShowHelpAtPoint() but we need to + // override ShowHelp() to avoid breaking existing code + virtual bool ShowHelp(wxWindowBase *window); + + // Other accessors + void SetHelpController(wxHelpControllerBase* hc) { m_helpController = hc; } + wxHelpControllerBase* GetHelpController() const { return m_helpController; } + +protected: + wxHelpControllerBase* m_helpController; + + wxDECLARE_NO_COPY_CLASS(wxHelpControllerHelpProvider); +}; + +// Convenience function for turning context id into wxString +WXDLLIMPEXP_CORE wxString wxContextId(int id); + +#endif // wxUSE_HELP + +#endif // _WX_CSHELP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ctrlsub.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ctrlsub.h new file mode 100644 index 0000000000..88832e5b75 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ctrlsub.h @@ -0,0 +1,479 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/ctrlsub.h (read: "wxConTRoL with SUBitems") +// Purpose: wxControlWithItems interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 22.10.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CTRLSUB_H_BASE_ +#define _WX_CTRLSUB_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_CONTROLS + +#include "wx/arrstr.h" +#include "wx/control.h" // base class + +// ---------------------------------------------------------------------------- +// wxItemContainer defines an interface which is implemented by all controls +// which have string subitems each of which may be selected. +// +// It is decomposed in wxItemContainerImmutable which omits all methods +// adding/removing items and is used by wxRadioBox and wxItemContainer itself. +// +// Examples: wxListBox, wxCheckListBox, wxChoice and wxComboBox (which +// implements an extended interface deriving from this one) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxItemContainerImmutable +{ +public: + wxItemContainerImmutable() { } + virtual ~wxItemContainerImmutable(); + + // accessing strings + // ----------------- + + virtual unsigned int GetCount() const = 0; + bool IsEmpty() const { return GetCount() == 0; } + + virtual wxString GetString(unsigned int n) const = 0; + wxArrayString GetStrings() const; + virtual void SetString(unsigned int n, const wxString& s) = 0; + + // finding string natively is either case sensitive or insensitive + // but never both so fall back to this base version for not + // supported search type + virtual int FindString(const wxString& s, bool bCase = false) const + { + unsigned int count = GetCount(); + + for ( unsigned int i = 0; i < count ; ++i ) + { + if (GetString(i).IsSameAs( s , bCase )) + return (int)i; + } + + return wxNOT_FOUND; + } + + + // selection + // --------- + + virtual void SetSelection(int n) = 0; + virtual int GetSelection() const = 0; + + // set selection to the specified string, return false if not found + bool SetStringSelection(const wxString& s); + + // return the selected string or empty string if none + virtual wxString GetStringSelection() const; + + // this is the same as SetSelection( for single-selection controls but + // reads better for multi-selection ones + void Select(int n) { SetSelection(n); } + + +protected: + // check that the index is valid + bool IsValid(unsigned int n) const { return n < GetCount(); } + bool IsValidInsert(unsigned int n) const { return n <= GetCount(); } +}; + +// ---------------------------------------------------------------------------- +// wxItemContainer extends wxItemContainerImmutable interface with methods +// for adding/removing items. +// +// Classes deriving from this one must override DoInsertItems() to implement +// adding items to the control. This can often be implemented more efficiently +// than simply looping over the elements and inserting them but if this is not +// the case, the generic DoInsertItemsInLoop can be used in implementation, but +// in this case DoInsertItem() needs to be overridden. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxItemContainer : public wxItemContainerImmutable +{ +private: + // AppendItems() and InsertItems() helpers just call DoAppend/InsertItems() + // after doing some checks + // + // NB: they're defined here so that they're inlined when used in public part + int AppendItems(const wxArrayStringsAdapter& items, + void **clientData, + wxClientDataType type) + { + if ( items.IsEmpty() ) + return wxNOT_FOUND; + + return DoAppendItems(items, clientData, type); + } + + int AppendItems(const wxArrayStringsAdapter& items) + { + return AppendItems(items, NULL, wxClientData_None); + } + + int AppendItems(const wxArrayStringsAdapter& items, void **clientData) + { + wxASSERT_MSG( GetClientDataType() != wxClientData_Object, + wxT("can't mix different types of client data") ); + + return AppendItems(items, clientData, wxClientData_Void); + } + + int AppendItems(const wxArrayStringsAdapter& items, + wxClientData **clientData) + { + wxASSERT_MSG( GetClientDataType() != wxClientData_Void, + wxT("can't mix different types of client data") ); + + return AppendItems(items, reinterpret_cast(clientData), + wxClientData_Object); + } + + int InsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, + wxClientDataType type) + { + wxASSERT_MSG( !IsSorted(), wxT("can't insert items in sorted control") ); + + wxCHECK_MSG( pos <= GetCount(), wxNOT_FOUND, + wxT("position out of range") ); + + // not all derived classes handle empty arrays correctly in + // DoInsertItems() and besides it really doesn't make much sense to do + // this (for append it could correspond to creating an initially empty + // control but why would anybody need to insert 0 items?) + wxCHECK_MSG( !items.IsEmpty(), wxNOT_FOUND, + wxT("need something to insert") ); + + return DoInsertItems(items, pos, clientData, type); + } + + int InsertItems(const wxArrayStringsAdapter& items, unsigned int pos) + { + return InsertItems(items, pos, NULL, wxClientData_None); + } + + int InsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData) + { + wxASSERT_MSG( GetClientDataType() != wxClientData_Object, + wxT("can't mix different types of client data") ); + + return InsertItems(items, pos, clientData, wxClientData_Void); + } + + int InsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + wxClientData **clientData) + { + wxASSERT_MSG( GetClientDataType() != wxClientData_Void, + wxT("can't mix different types of client data") ); + + return InsertItems(items, pos, + reinterpret_cast(clientData), + wxClientData_Object); + } + +public: + wxItemContainer() { m_clientDataItemsType = wxClientData_None; } + virtual ~wxItemContainer(); + + // adding items + // ------------ + + // append single item, return its position in the control (which can be + // different from the last one if the control is sorted) + int Append(const wxString& item) + { return AppendItems(item); } + int Append(const wxString& item, void *clientData) + { return AppendItems(item, &clientData); } + int Append(const wxString& item, wxClientData *clientData) + { return AppendItems(item, &clientData); } + + // append several items at once to the control, return the position of the + // last item appended + int Append(const wxArrayString& items) + { return AppendItems(items); } + int Append(const wxArrayString& items, void **clientData) + { return AppendItems(items, clientData); } + int Append(const wxArrayString& items, wxClientData **clientData) + { return AppendItems(items, clientData); } + int Append(unsigned int n, const wxString *items) + { return AppendItems(wxArrayStringsAdapter(n, items)); } + int Append(unsigned int n, const wxString *items, void **clientData) + { return AppendItems(wxArrayStringsAdapter(n, items), clientData); } + int Append(unsigned int n, + const wxString *items, + wxClientData **clientData) + { return AppendItems(wxArrayStringsAdapter(n, items), clientData); } + + // only for RTTI needs (separate name) + void AppendString(const wxString& item) + { Append(item); } + + + // inserting items: not for sorted controls! + // ----------------------------------------- + + // insert single item at the given position, return its effective position + int Insert(const wxString& item, unsigned int pos) + { return InsertItems(item, pos); } + int Insert(const wxString& item, unsigned int pos, void *clientData) + { return InsertItems(item, pos, &clientData); } + int Insert(const wxString& item, unsigned int pos, wxClientData *clientData) + { return InsertItems(item, pos, &clientData); } + + // insert several items at once into the control, return the index of the + // last item inserted + int Insert(const wxArrayString& items, unsigned int pos) + { return InsertItems(items, pos); } + int Insert(const wxArrayString& items, unsigned int pos, void **clientData) + { return InsertItems(items, pos, clientData); } + int Insert(const wxArrayString& items, + unsigned int pos, + wxClientData **clientData) + { return InsertItems(items, pos, clientData); } + int Insert(unsigned int n, const wxString *items, unsigned int pos) + { return InsertItems(wxArrayStringsAdapter(n, items), pos); } + int Insert(unsigned int n, + const wxString *items, + unsigned int pos, + void **clientData) + { return InsertItems(wxArrayStringsAdapter(n, items), pos, clientData); } + int Insert(unsigned int n, + const wxString *items, + unsigned int pos, + wxClientData **clientData) + { return InsertItems(wxArrayStringsAdapter(n, items), pos, clientData); } + + + // replacing items + // --------------- + + void Set(const wxArrayString& items) + { Clear(); Append(items); } + void Set(const wxArrayString& items, void **clientData) + { Clear(); Append(items, clientData); } + void Set(const wxArrayString& items, wxClientData **clientData) + { Clear(); Append(items, clientData); } + void Set(unsigned int n, const wxString *items) + { Clear(); Append(n, items); } + void Set(unsigned int n, const wxString *items, void **clientData) + { Clear(); Append(n, items, clientData); } + void Set(unsigned int n, const wxString *items, wxClientData **clientData) + { Clear(); Append(n, items, clientData); } + + // deleting items + // -------------- + + void Clear(); + void Delete(unsigned int pos); + + + // various accessors + // ----------------- + + // The control may maintain its items in a sorted order in which case + // items are automatically inserted at the right position when they are + // inserted or appended. Derived classes have to override this method if + // they implement sorting, typically by returning HasFlag(wxXX_SORT) + virtual bool IsSorted() const { return false; } + + + // client data stuff + // ----------------- + + void SetClientData(unsigned int n, void* clientData); + void* GetClientData(unsigned int n) const; + + // SetClientObject() takes ownership of the pointer, GetClientObject() + // returns it but keeps the ownership while DetachClientObject() expects + // the caller to delete the pointer and also resets the internally stored + // one to NULL for this item + void SetClientObject(unsigned int n, wxClientData* clientData); + wxClientData* GetClientObject(unsigned int n) const; + wxClientData* DetachClientObject(unsigned int n); + + // return the type of client data stored in this control: usually it just + // returns m_clientDataItemsType but must be overridden in the controls + // which delegate their client data storage to another one (e.g. wxChoice + // in wxUniv which stores data in wxListBox which it uses anyhow); don't + // forget to override SetClientDataType() if you override this one + // + // NB: for this to work no code should ever access m_clientDataItemsType + // directly but only via this function! + virtual wxClientDataType GetClientDataType() const + { return m_clientDataItemsType; } + + bool HasClientData() const + { return GetClientDataType() != wxClientData_None; } + bool HasClientObjectData() const + { return GetClientDataType() == wxClientData_Object; } + bool HasClientUntypedData() const + { return GetClientDataType() == wxClientData_Void; } + +protected: + // there is usually no need to override this method but you can do it if it + // is more convenient to only do "real" insertions in DoInsertItems() and + // to implement items appending here (in which case DoInsertItems() should + // call this method if pos == GetCount() as it can still be called in this + // case if public Insert() is called with such position) + virtual int DoAppendItems(const wxArrayStringsAdapter& items, + void **clientData, + wxClientDataType type) + { + return DoInsertItems(items, GetCount(), clientData, type); + } + + // this method must be implemented to insert the items into the control at + // position pos which can be GetCount() meaning that the items should be + // appended; for the sorted controls the position can be ignored + // + // the derived classes typically use AssignNewItemClientData() to + // associate the data with the items as they're being inserted + // + // the method should return the index of the position the last item was + // inserted into or wxNOT_FOUND if an error occurred + virtual int DoInsertItems(const wxArrayStringsAdapter & items, + unsigned int pos, + void **clientData, + wxClientDataType type) = 0; + + // before the client data is set for the first time for the control which + // hadn't had it before, DoInitItemClientData() is called which gives the + // derived class the possibility to initialize its client data storage only + // when client data is really used + virtual void DoInitItemClientData() { } + virtual void DoSetItemClientData(unsigned int n, void *clientData) = 0; + virtual void *DoGetItemClientData(unsigned int n) const = 0; + + virtual void DoClear() = 0; + virtual void DoDeleteOneItem(unsigned int pos) = 0; + + + // methods useful for the derived classes which don't have any better way + // of adding multiple items to the control than doing it one by one: such + // classes should call DoInsertItemsInLoop() from their DoInsert() and + // override DoInsertOneItem() to perform the real insertion + virtual int DoInsertOneItem(const wxString& item, unsigned int pos); + int DoInsertItemsInLoop(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, + wxClientDataType type); + + + // helper for DoInsertItems(): n is the index into clientData, pos is the + // position of the item in the control + void AssignNewItemClientData(unsigned int pos, + void **clientData, + unsigned int n, + wxClientDataType type); + + // free the client object associated with the item at given position and + // set it to NULL (must only be called if HasClientObjectData()) + void ResetItemClientObject(unsigned int n); + + // set the type of the client data stored in this control: override this if + // you override GetClientDataType() + virtual void SetClientDataType(wxClientDataType clientDataItemsType) + { + m_clientDataItemsType = clientDataItemsType; + } + +private: + // the type of the client data for the items + wxClientDataType m_clientDataItemsType; +}; + +// Inheriting directly from a wxWindow-derived class and wxItemContainer +// unfortunately introduces an ambiguity for all GetClientXXX() methods as they +// are inherited twice: the "global" versions from wxWindow and the per-item +// versions taking the index from wxItemContainer. +// +// So we need to explicitly resolve them and this helper template class is +// provided to do it. To use it, simply inherit from wxWindowWithItems instead of Window and Container interface directly. +template +class wxWindowWithItems : public W, public C +{ +public: + typedef W BaseWindowClass; + typedef C BaseContainerInterface; + + wxWindowWithItems() { } + + void SetClientData(void *data) + { BaseWindowClass::SetClientData(data); } + void *GetClientData() const + { return BaseWindowClass::GetClientData(); } + void SetClientObject(wxClientData *data) + { BaseWindowClass::SetClientObject(data); } + wxClientData *GetClientObject() const + { return BaseWindowClass::GetClientObject(); } + + void SetClientData(unsigned int n, void* clientData) + { wxItemContainer::SetClientData(n, clientData); } + void* GetClientData(unsigned int n) const + { return wxItemContainer::GetClientData(n); } + void SetClientObject(unsigned int n, wxClientData* clientData) + { wxItemContainer::SetClientObject(n, clientData); } + wxClientData* GetClientObject(unsigned int n) const + { return wxItemContainer::GetClientObject(n); } +}; + +class WXDLLIMPEXP_CORE wxControlWithItemsBase : + public wxWindowWithItems +{ +public: + wxControlWithItemsBase() { } + + // usually the controls like list/combo boxes have their own background + // colour + virtual bool ShouldInheritColours() const { return false; } + + + // Implementation only from now on. + + // Generate an event of the given type for the selection change. + void SendSelectionChangedEvent(wxEventType eventType); + +protected: + // fill in the client object or data field of the event as appropriate + // + // calls InitCommandEvent() and, if n != wxNOT_FOUND, also sets the per + // item client data + void InitCommandEventWithItems(wxCommandEvent& event, int n); + +private: + wxDECLARE_NO_COPY_CLASS(wxControlWithItemsBase); +}; + +// define the platform-specific wxControlWithItems class +#if defined(__WXMSW__) + #include "wx/msw/ctrlsub.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/ctrlsub.h" +#else + class WXDLLIMPEXP_CORE wxControlWithItems : public wxControlWithItemsBase + { + public: + wxControlWithItems() { } + + private: + DECLARE_ABSTRACT_CLASS(wxControlWithItems) + wxDECLARE_NO_COPY_CLASS(wxControlWithItems); + }; +#endif + +#endif // wxUSE_CONTROLS + +#endif // _WX_CTRLSUB_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/cursor.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cursor.h new file mode 100644 index 0000000000..bdde8cdf66 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/cursor.h @@ -0,0 +1,107 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/cursor.h +// Purpose: wxCursor base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CURSOR_H_BASE_ +#define _WX_CURSOR_H_BASE_ + +#include "wx/defs.h" + +/* + wxCursor classes should have the following public API: + +class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject +{ +public: + wxCursor(); + wxCursor(const wxImage& image); + wxCursor(const wxString& name, + wxBitmapType type = wxCURSOR_DEFAULT_TYPE, + int hotSpotX = 0, int hotSpotY = 0); + wxCursor(wxStockCursor id) { InitFromStock(id); } +#if WXWIN_COMPATIBILITY_2_8 + wxCursor(int id) { InitFromStock((wxStockCursor)id); } +#endif + virtual ~wxCursor(); +}; + +*/ + +#if defined(__WXMSW__) + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE + #include "wx/msw/cursor.h" +#elif defined(__WXMOTIF__) + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XBM + #include "wx/motif/cursor.h" +#elif defined(__WXGTK20__) + #ifdef __WINDOWS__ + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE + #else + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #endif + #include "wx/gtk/cursor.h" +#elif defined(__WXGTK__) + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #include "wx/gtk1/cursor.h" +#elif defined(__WXX11__) + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #include "wx/x11/cursor.h" +#elif defined(__WXDFB__) + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE + #include "wx/dfb/cursor.h" +#elif defined(__WXMAC__) + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_MACCURSOR_RESOURCE + #include "wx/osx/cursor.h" +#elif defined(__WXCOCOA__) + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_MACCURSOR_RESOURCE + #include "wx/cocoa/cursor.h" +#elif defined(__WXPM__) + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE + #include "wx/os2/cursor.h" +#endif + +#include "wx/utils.h" + +/* This is a small class which can be used by all ports + to temporarily suspend the busy cursor. Useful in modal + dialogs. + + Actually that is not (any longer) quite true.. currently it is + only used in wxGTK Dialog::ShowModal() and now uses static + wxBusyCursor methods that are only implemented for wxGTK so far. + The BusyCursor handling code should probably be implemented in + common code somewhere instead of the separate implementations we + currently have. Also the name BusyCursorSuspender is a little + misleading since it doesn't actually suspend the BusyCursor, just + masks one that is already showing. + If another call to wxBeginBusyCursor is made while this is active + the Busy Cursor will again be shown. But at least now it doesn't + interfere with the state of wxIsBusy() -- RL + +*/ +class wxBusyCursorSuspender +{ +public: + wxBusyCursorSuspender() + { + if( wxIsBusy() ) + { + wxSetCursor( wxBusyCursor::GetStoredCursor() ); + } + } + ~wxBusyCursorSuspender() + { + if( wxIsBusy() ) + { + wxSetCursor( wxBusyCursor::GetBusyCursor() ); + } + } +}; +#endif + // _WX_CURSOR_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/custombgwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/custombgwin.h new file mode 100644 index 0000000000..73890a4654 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/custombgwin.h @@ -0,0 +1,52 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/custombgwin.h +// Purpose: Class adding support for custom window backgrounds. +// Author: Vadim Zeitlin +// Created: 2011-10-10 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CUSTOMBGWIN_H_ +#define _WX_CUSTOMBGWIN_H_ + +// ---------------------------------------------------------------------------- +// wxCustomBackgroundWindow: Adds support for custom backgrounds to any +// wxWindow-derived class. +// ---------------------------------------------------------------------------- + +class wxCustomBackgroundWindowBase +{ +public: + // Trivial default ctor. + wxCustomBackgroundWindowBase() { } + + // Also a trivial but virtual -- to suppress g++ warnings -- dtor. + virtual ~wxCustomBackgroundWindowBase() { } + + // Use the given bitmap to tile the background of this window. This bitmap + // will show through any transparent children. + // + // Notice that you must not prevent the base class EVT_ERASE_BACKGROUND + // handler from running (i.e. not to handle this event yourself) for this + // to work. + void SetBackgroundBitmap(const wxBitmap& bmp) + { + DoSetBackgroundBitmap(bmp); + } + +protected: + virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) = 0; + + wxDECLARE_NO_COPY_CLASS(wxCustomBackgroundWindowBase); +}; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/custombgwin.h" +#elif defined(__WXMSW__) + #include "wx/msw/custombgwin.h" +#else + #include "wx/generic/custombgwin.h" +#endif + +#endif // _WX_CUSTOMBGWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dataobj.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dataobj.h new file mode 100644 index 0000000000..d099f4b6b1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dataobj.h @@ -0,0 +1,589 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/dataobj.h +// Purpose: common data object classes +// Author: Vadim Zeitlin, Robert Roebling +// Modified by: +// Created: 26.05.99 +// Copyright: (c) wxWidgets Team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DATAOBJ_H_BASE_ +#define _WX_DATAOBJ_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- +#include "wx/defs.h" + +#if wxUSE_DATAOBJ + +#include "wx/string.h" +#include "wx/bitmap.h" +#include "wx/list.h" +#include "wx/arrstr.h" + +// ============================================================================ +/* + Generic data transfer related classes. The class hierarchy is as follows: + + - wxDataObject- + / \ + / \ + wxDataObjectSimple wxDataObjectComposite + / | \ + / | \ + wxTextDataObject | wxBitmapDataObject + | + wxCustomDataObject + +*/ +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxDataFormat class is declared in platform-specific headers: it represents +// a format for data which may be either one of the standard ones (text, +// bitmap, ...) or a custom one which is then identified by a unique string. +// ---------------------------------------------------------------------------- + +/* the class interface looks like this (pseudo code): + +class wxDataFormat +{ +public: + typedef NativeFormat; + + wxDataFormat(NativeFormat format = wxDF_INVALID); + wxDataFormat(const wxString& format); + + wxDataFormat& operator=(NativeFormat format); + wxDataFormat& operator=(const wxDataFormat& format); + + bool operator==(NativeFormat format) const; + bool operator!=(NativeFormat format) const; + + void SetType(NativeFormat format); + NativeFormat GetType() const; + + wxString GetId() const; + void SetId(const wxString& format); +}; + +*/ + +#if defined(__WXMSW__) + #include "wx/msw/ole/dataform.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/dataform.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/dataform.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/dataform.h" +#elif defined(__WXX11__) + #include "wx/x11/dataform.h" +#elif defined(__WXMAC__) + #include "wx/osx/dataform.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/dataform.h" +#elif defined(__WXPM__) + #include "wx/os2/dataform.h" +#endif + +// the value for default argument to some functions (corresponds to +// wxDF_INVALID) +extern WXDLLIMPEXP_CORE const wxDataFormat& wxFormatInvalid; + +// ---------------------------------------------------------------------------- +// wxDataObject represents a piece of data which knows which formats it +// supports and knows how to render itself in each of them - GetDataHere(), +// and how to restore data from the buffer (SetData()). +// +// Although this class may be used directly (i.e. custom classes may be +// derived from it), in many cases it might be simpler to use either +// wxDataObjectSimple or wxDataObjectComposite classes. +// +// A data object may be "read only", i.e. support only GetData() functions or +// "read-write", i.e. support both GetData() and SetData() (in principle, it +// might be "write only" too, but this is rare). Moreover, it doesn't have to +// support the same formats in Get() and Set() directions: for example, a data +// object containing JPEG image might accept BMPs in GetData() because JPEG +// image may be easily transformed into BMP but not in SetData(). Accordingly, +// all methods dealing with formats take an additional "direction" argument +// which is either SET or GET and which tells the function if the format needs +// to be supported by SetData() or GetDataHere(). +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDataObjectBase +{ +public: + enum Direction + { + Get = 0x01, // format is supported by GetDataHere() + Set = 0x02, // format is supported by SetData() + Both = 0x03 // format is supported by both (unused currently) + }; + + // this class is polymorphic, hence it needs a virtual dtor + virtual ~wxDataObjectBase(); + + // get the best suited format for rendering our data + virtual wxDataFormat GetPreferredFormat(Direction dir = Get) const = 0; + + // get the number of formats we support + virtual size_t GetFormatCount(Direction dir = Get) const = 0; + + // return all formats in the provided array (of size GetFormatCount()) + virtual void GetAllFormats(wxDataFormat *formats, + Direction dir = Get) const = 0; + + // get the (total) size of data for the given format + virtual size_t GetDataSize(const wxDataFormat& format) const = 0; + + // copy raw data (in the specified format) to the provided buffer, return + // true if data copied successfully, false otherwise + virtual bool GetDataHere(const wxDataFormat& format, void *buf) const = 0; + + // get data from the buffer of specified length (in the given format), + // return true if the data was read successfully, false otherwise + virtual bool SetData(const wxDataFormat& WXUNUSED(format), + size_t WXUNUSED(len), const void * WXUNUSED(buf)) + { + return false; + } + + // returns true if this format is supported + bool IsSupported(const wxDataFormat& format, Direction dir = Get) const; +}; + +// ---------------------------------------------------------------------------- +// include the platform-specific declarations of wxDataObject +// ---------------------------------------------------------------------------- + +#if defined(__WXMSW__) + #include "wx/msw/ole/dataobj.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/dataobj.h" +#elif defined(__WXX11__) + #include "wx/x11/dataobj.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/dataobj.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/dataobj.h" +#elif defined(__WXMAC__) + #include "wx/osx/dataobj.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/dataobj.h" +#elif defined(__WXPM__) + #include "wx/os2/dataobj.h" +#endif + +// ---------------------------------------------------------------------------- +// wxDataObjectSimple is a wxDataObject which only supports one format (in +// both Get and Set directions, but you may return false from GetDataHere() or +// SetData() if one of them is not supported). This is the simplest possible +// wxDataObject implementation. +// +// This is still an "abstract base class" (although it doesn't have any pure +// virtual functions), to use it you should derive from it and implement +// GetDataSize(), GetDataHere() and SetData() functions because the base class +// versions don't do anything - they just return "not implemented". +// +// This class should be used when you provide data in only one format (no +// conversion to/from other formats), either a standard or a custom one. +// Otherwise, you should use wxDataObjectComposite or wxDataObject directly. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDataObjectSimple : public wxDataObject +{ +public: + // ctor takes the format we support, but it can also be set later with + // SetFormat() + wxDataObjectSimple(const wxDataFormat& format = wxFormatInvalid) + : m_format(format) + { + } + + // get/set the format we support + const wxDataFormat& GetFormat() const { return m_format; } + void SetFormat(const wxDataFormat& format) { m_format = format; } + + // virtual functions to override in derived class (the base class versions + // just return "not implemented") + // ----------------------------------------------------------------------- + + // get the size of our data + virtual size_t GetDataSize() const + { return 0; } + + // copy our data to the buffer + virtual bool GetDataHere(void *WXUNUSED(buf)) const + { return false; } + + // copy data from buffer to our data + virtual bool SetData(size_t WXUNUSED(len), const void *WXUNUSED(buf)) + { return false; } + + // implement base class pure virtuals + // ---------------------------------- + virtual wxDataFormat GetPreferredFormat(wxDataObjectBase::Direction WXUNUSED(dir) = Get) const + { return m_format; } + virtual size_t GetFormatCount(wxDataObjectBase::Direction WXUNUSED(dir) = Get) const + { return 1; } + virtual void GetAllFormats(wxDataFormat *formats, + wxDataObjectBase::Direction WXUNUSED(dir) = Get) const + { *formats = m_format; } + virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const + { return GetDataSize(); } + virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format), + void *buf) const + { return GetDataHere(buf); } + virtual bool SetData(const wxDataFormat& WXUNUSED(format), + size_t len, const void *buf) + { return SetData(len, buf); } + +private: + // the one and only format we support + wxDataFormat m_format; + + wxDECLARE_NO_COPY_CLASS(wxDataObjectSimple); +}; + +// ---------------------------------------------------------------------------- +// wxDataObjectComposite is the simplest way to implement wxDataObject +// supporting multiple formats. It contains several wxDataObjectSimple and +// supports all formats supported by any of them. +// +// This class shouldn't be (normally) derived from, but may be used directly. +// If you need more flexibility than what it provides, you should probably use +// wxDataObject directly. +// ---------------------------------------------------------------------------- + +WX_DECLARE_EXPORTED_LIST(wxDataObjectSimple, wxSimpleDataObjectList); + +class WXDLLIMPEXP_CORE wxDataObjectComposite : public wxDataObject +{ +public: + // ctor + wxDataObjectComposite(); + virtual ~wxDataObjectComposite(); + + // add data object (it will be deleted by wxDataObjectComposite, hence it + // must be allocated on the heap) whose format will become the preferred + // one if preferred == true + void Add(wxDataObjectSimple *dataObject, bool preferred = false); + + // Report the format passed to the SetData method. This should be the + // format of the data object within the composite that received data from + // the clipboard or the DnD operation. You can use this method to find + // out what kind of data object was received. + wxDataFormat GetReceivedFormat() const; + + // Returns the pointer to the object which supports this format or NULL. + // The returned pointer is owned by wxDataObjectComposite and must + // therefore not be destroyed by the caller. + wxDataObjectSimple *GetObject(const wxDataFormat& format, + wxDataObjectBase::Direction dir = Get) const; + + // implement base class pure virtuals + // ---------------------------------- + virtual wxDataFormat GetPreferredFormat(wxDataObjectBase::Direction dir = Get) const; + virtual size_t GetFormatCount(wxDataObjectBase::Direction dir = Get) const; + virtual void GetAllFormats(wxDataFormat *formats, wxDataObjectBase::Direction dir = Get) const; + virtual size_t GetDataSize(const wxDataFormat& format) const; + virtual bool GetDataHere(const wxDataFormat& format, void *buf) const; + virtual bool SetData(const wxDataFormat& format, size_t len, const void *buf); +#if defined(__WXMSW__) + virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size, + const wxDataFormat& format ); + virtual void* SetSizeInBuffer( void* buffer, size_t size, + const wxDataFormat& format ); + virtual size_t GetBufferOffset( const wxDataFormat& format ); +#endif + +private: + // the list of all (simple) data objects whose formats we support + wxSimpleDataObjectList m_dataObjects; + + // the index of the preferred one (0 initially, so by default the first + // one is the preferred) + size_t m_preferred; + + wxDataFormat m_receivedFormat; + + wxDECLARE_NO_COPY_CLASS(wxDataObjectComposite); +}; + +// ============================================================================ +// Standard implementations of wxDataObjectSimple which can be used directly +// (i.e. without having to derive from them) for standard data type transfers. +// +// Note that although all of them can work with provided data, you can also +// override their virtual GetXXX() functions to only provide data on demand. +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxTextDataObject contains text data +// ---------------------------------------------------------------------------- + +#if wxUSE_UNICODE + #if defined(__WXGTK20__) + #define wxNEEDS_UTF8_FOR_TEXT_DATAOBJ + #elif defined(__WXMAC__) + #define wxNEEDS_UTF16_FOR_TEXT_DATAOBJ + #endif +#endif // wxUSE_UNICODE + +class WXDLLIMPEXP_CORE wxHTMLDataObject : public wxDataObjectSimple +{ +public: + // ctor: you can specify the text here or in SetText(), or override + // GetText() + wxHTMLDataObject(const wxString& html = wxEmptyString) + : wxDataObjectSimple(wxDF_HTML), + m_html(html) + { + } + + // virtual functions which you may override if you want to provide text on + // demand only - otherwise, the trivial default versions will be used + virtual size_t GetLength() const { return m_html.Len() + 1; } + virtual wxString GetHTML() const { return m_html; } + virtual void SetHTML(const wxString& html) { m_html = html; } + + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + + // Must provide overloads to avoid hiding them (and warnings about it) + virtual size_t GetDataSize(const wxDataFormat&) const + { + return GetDataSize(); + } + virtual bool GetDataHere(const wxDataFormat&, void *buf) const + { + return GetDataHere(buf); + } + virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) + { + return SetData(len, buf); + } + +private: + wxString m_html; +}; + +class WXDLLIMPEXP_CORE wxTextDataObject : public wxDataObjectSimple +{ +public: + // ctor: you can specify the text here or in SetText(), or override + // GetText() + wxTextDataObject(const wxString& text = wxEmptyString) + : wxDataObjectSimple( +#if wxUSE_UNICODE + wxDF_UNICODETEXT +#else + wxDF_TEXT +#endif + ), + m_text(text) + { + } + + // virtual functions which you may override if you want to provide text on + // demand only - otherwise, the trivial default versions will be used + virtual size_t GetTextLength() const { return m_text.Len() + 1; } + virtual wxString GetText() const { return m_text; } + virtual void SetText(const wxString& text) { m_text = text; } + + // implement base class pure virtuals + // ---------------------------------- + + // some platforms have 2 and not 1 format for text data +#if defined(wxNEEDS_UTF8_FOR_TEXT_DATAOBJ) || defined(wxNEEDS_UTF16_FOR_TEXT_DATAOBJ) + virtual size_t GetFormatCount(Direction WXUNUSED(dir) = Get) const { return 2; } + virtual void GetAllFormats(wxDataFormat *formats, + wxDataObjectBase::Direction WXUNUSED(dir) = Get) const; + + virtual size_t GetDataSize() const { return GetDataSize(GetPreferredFormat()); } + virtual bool GetDataHere(void *buf) const { return GetDataHere(GetPreferredFormat(), buf); } + virtual bool SetData(size_t len, const void *buf) { return SetData(GetPreferredFormat(), len, buf); } + + size_t GetDataSize(const wxDataFormat& format) const; + bool GetDataHere(const wxDataFormat& format, void *pBuf) const; + bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf); +#else // !wxNEEDS_UTF{8,16}_FOR_TEXT_DATAOBJ + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + // Must provide overloads to avoid hiding them (and warnings about it) + virtual size_t GetDataSize(const wxDataFormat&) const + { + return GetDataSize(); + } + virtual bool GetDataHere(const wxDataFormat&, void *buf) const + { + return GetDataHere(buf); + } + virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) + { + return SetData(len, buf); + } +#endif // different wxTextDataObject implementations + +private: + wxString m_text; + + wxDECLARE_NO_COPY_CLASS(wxTextDataObject); +}; + +// ---------------------------------------------------------------------------- +// wxBitmapDataObject contains a bitmap +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapDataObjectBase : public wxDataObjectSimple +{ +public: + // ctor: you can specify the bitmap here or in SetBitmap(), or override + // GetBitmap() + wxBitmapDataObjectBase(const wxBitmap& bitmap = wxNullBitmap) + : wxDataObjectSimple(wxDF_BITMAP), m_bitmap(bitmap) + { + } + + // virtual functions which you may override if you want to provide data on + // demand only - otherwise, the trivial default versions will be used + virtual wxBitmap GetBitmap() const { return m_bitmap; } + virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } + +protected: + wxBitmap m_bitmap; + + wxDECLARE_NO_COPY_CLASS(wxBitmapDataObjectBase); +}; + +// ---------------------------------------------------------------------------- +// wxFileDataObject contains a list of filenames +// +// NB: notice that this is a "write only" object, it can only be filled with +// data from drag and drop operation. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDataObjectBase : public wxDataObjectSimple +{ +public: + // ctor: use AddFile() later to fill the array + wxFileDataObjectBase() : wxDataObjectSimple(wxDF_FILENAME) { } + + // get a reference to our array + const wxArrayString& GetFilenames() const { return m_filenames; } + +protected: + wxArrayString m_filenames; + + wxDECLARE_NO_COPY_CLASS(wxFileDataObjectBase); +}; + +// ---------------------------------------------------------------------------- +// wxCustomDataObject contains arbitrary untyped user data. +// +// It is understood that this data can be copied bitwise. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCustomDataObject : public wxDataObjectSimple +{ +public: + // if you don't specify the format in the ctor, you can still use + // SetFormat() later + wxCustomDataObject(const wxDataFormat& format = wxFormatInvalid); + + // the dtor calls Free() + virtual ~wxCustomDataObject(); + + // you can call SetData() to set m_data: it will make a copy of the data + // you pass - or you can use TakeData() which won't copy anything, but + // will take ownership of data (i.e. will call Free() on it later) + void TakeData(size_t size, void *data); + + // this function is called to allocate "size" bytes of memory from + // SetData(). The default version uses operator new[]. + virtual void *Alloc(size_t size); + + // this function is called when the data is freed, you may override it to + // anything you want (or may be nothing at all). The default version calls + // operator delete[] on m_data + virtual void Free(); + + // get data: you may override these functions if you wish to provide data + // only when it's requested + virtual size_t GetSize() const { return m_size; } + virtual void *GetData() const { return m_data; } + + // implement base class pure virtuals + // ---------------------------------- + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t size, const void *buf); + // Must provide overloads to avoid hiding them (and warnings about it) + virtual size_t GetDataSize(const wxDataFormat&) const + { + return GetDataSize(); + } + virtual bool GetDataHere(const wxDataFormat&, void *buf) const + { + return GetDataHere(buf); + } + virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) + { + return SetData(len, buf); + } + +private: + size_t m_size; + void *m_data; + + wxDECLARE_NO_COPY_CLASS(wxCustomDataObject); +}; + +// ---------------------------------------------------------------------------- +// include platform-specific declarations of wxXXXBase classes +// ---------------------------------------------------------------------------- + +#if defined(__WXMSW__) + #include "wx/msw/ole/dataobj2.h" + // wxURLDataObject defined in msw/ole/dataobj2.h +#elif defined(__WXGTK20__) + #include "wx/gtk/dataobj2.h" + // wxURLDataObject defined in msw/ole/dataobj2.h + +#else + #if defined(__WXGTK__) + #include "wx/gtk1/dataobj2.h" + #elif defined(__WXX11__) + #include "wx/x11/dataobj2.h" + #elif defined(__WXMOTIF__) + #include "wx/motif/dataobj2.h" + #elif defined(__WXMAC__) + #include "wx/osx/dataobj2.h" + #elif defined(__WXCOCOA__) + #include "wx/cocoa/dataobj2.h" + #elif defined(__WXPM__) + #include "wx/os2/dataobj2.h" + #endif + + // wxURLDataObject is simply wxTextDataObject with a different name + class WXDLLIMPEXP_CORE wxURLDataObject : public wxTextDataObject + { + public: + wxURLDataObject(const wxString& url = wxEmptyString) + : wxTextDataObject(url) + { + } + + wxString GetURL() const { return GetText(); } + void SetURL(const wxString& url) { SetText(url); } + }; +#endif + +#endif // wxUSE_DATAOBJ + +#endif // _WX_DATAOBJ_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dataview.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dataview.h new file mode 100644 index 0000000000..ba0cafa3bb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dataview.h @@ -0,0 +1,1356 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dataview.h +// Purpose: wxDataViewCtrl base classes +// Author: Robert Roebling +// Modified by: Bo Yang +// Created: 08.01.06 +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DATAVIEW_H_BASE_ +#define _WX_DATAVIEW_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_DATAVIEWCTRL + +#include "wx/textctrl.h" +#include "wx/headercol.h" +#include "wx/variant.h" +#include "wx/dnd.h" // For wxDragResult declaration only. +#include "wx/dynarray.h" +#include "wx/icon.h" +#include "wx/itemid.h" +#include "wx/weakref.h" +#include "wx/vector.h" +#include "wx/dataobj.h" +#include "wx/withimages.h" + +class WXDLLIMPEXP_FWD_CORE wxImageList; + +#if !(defined(__WXGTK20__) || defined(__WXOSX__)) || defined(__WXUNIVERSAL__) +// #if !(defined(__WXOSX__)) || defined(__WXUNIVERSAL__) + #define wxHAS_GENERIC_DATAVIEWCTRL +#endif + +#ifdef wxHAS_GENERIC_DATAVIEWCTRL + // this symbol doesn't follow the convention for wxUSE_XXX symbols which + // are normally always defined as either 0 or 1, so its use is deprecated + // and it only exists for backwards compatibility, don't use it any more + // and use wxHAS_GENERIC_DATAVIEWCTRL instead + #define wxUSE_GENERICDATAVIEWCTRL +#endif + +// ---------------------------------------------------------------------------- +// wxDataViewCtrl globals +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_ADV wxDataViewModel; +class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl; +class WXDLLIMPEXP_FWD_ADV wxDataViewColumn; +class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer; +class WXDLLIMPEXP_FWD_ADV wxDataViewModelNotifier; + +extern WXDLLIMPEXP_DATA_ADV(const char) wxDataViewCtrlNameStr[]; + +// ---------------------------------------------------------------------------- +// wxDataViewCtrl flags +// ---------------------------------------------------------------------------- + +// size of a wxDataViewRenderer without contents: +#define wxDVC_DEFAULT_RENDERER_SIZE 20 + +// the default width of new (text) columns: +#define wxDVC_DEFAULT_WIDTH 80 + +// the default width of new toggle columns: +#define wxDVC_TOGGLE_DEFAULT_WIDTH 30 + +// the default minimal width of the columns: +#define wxDVC_DEFAULT_MINWIDTH 30 + +// The default alignment of wxDataViewRenderers is to take +// the alignment from the column it owns. +#define wxDVR_DEFAULT_ALIGNMENT -1 + + +// --------------------------------------------------------- +// wxDataViewItem +// --------------------------------------------------------- + +// Make it a class and not a typedef to allow forward declaring it. +class wxDataViewItem : public wxItemId +{ +public: + wxDataViewItem() : wxItemId() { } + wxEXPLICIT wxDataViewItem(void* pItem) : wxItemId(pItem) { } +}; + +WX_DEFINE_ARRAY(wxDataViewItem, wxDataViewItemArray); + +// --------------------------------------------------------- +// wxDataViewModelNotifier +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewModelNotifier +{ +public: + wxDataViewModelNotifier() { m_owner = NULL; } + virtual ~wxDataViewModelNotifier() { m_owner = NULL; } + + virtual bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item ) = 0; + virtual bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item ) = 0; + virtual bool ItemChanged( const wxDataViewItem &item ) = 0; + virtual bool ItemsAdded( const wxDataViewItem &parent, const wxDataViewItemArray &items ); + virtual bool ItemsDeleted( const wxDataViewItem &parent, const wxDataViewItemArray &items ); + virtual bool ItemsChanged( const wxDataViewItemArray &items ); + virtual bool ValueChanged( const wxDataViewItem &item, unsigned int col ) = 0; + virtual bool Cleared() = 0; + + // some platforms, such as GTK+, may need a two step procedure for ::Reset() + virtual bool BeforeReset() { return true; } + virtual bool AfterReset() { return Cleared(); } + + virtual void Resort() = 0; + + void SetOwner( wxDataViewModel *owner ) { m_owner = owner; } + wxDataViewModel *GetOwner() const { return m_owner; } + +private: + wxDataViewModel *m_owner; +}; + + + +// ---------------------------------------------------------------------------- +// wxDataViewItemAttr: a structure containing the visual attributes of an item +// ---------------------------------------------------------------------------- + +// TODO: this should be renamed to wxItemAttr or something general like this + +class WXDLLIMPEXP_ADV wxDataViewItemAttr +{ +public: + // ctors + wxDataViewItemAttr() + { + m_bold = false; + m_italic = false; + } + + // setters + void SetColour(const wxColour& colour) { m_colour = colour; } + void SetBold( bool set ) { m_bold = set; } + void SetItalic( bool set ) { m_italic = set; } + void SetBackgroundColour(const wxColour& colour) { m_bgColour = colour; } + + // accessors + bool HasColour() const { return m_colour.IsOk(); } + const wxColour& GetColour() const { return m_colour; } + + bool HasFont() const { return m_bold || m_italic; } + bool GetBold() const { return m_bold; } + bool GetItalic() const { return m_italic; } + + bool HasBackgroundColour() const { return m_bgColour.IsOk(); } + const wxColour& GetBackgroundColour() const { return m_bgColour; } + + bool IsDefault() const { return !(HasColour() || HasFont() || HasBackgroundColour()); } + + // Return the font based on the given one with this attribute applied to it. + wxFont GetEffectiveFont(const wxFont& font) const; + +private: + wxColour m_colour; + bool m_bold; + bool m_italic; + wxColour m_bgColour; +}; + + +// --------------------------------------------------------- +// wxDataViewModel +// --------------------------------------------------------- + +WX_DECLARE_LIST_WITH_DECL(wxDataViewModelNotifier, wxDataViewModelNotifiers, + class WXDLLIMPEXP_ADV); + +class WXDLLIMPEXP_ADV wxDataViewModel: public wxRefCounter +{ +public: + wxDataViewModel(); + + virtual unsigned int GetColumnCount() const = 0; + + // return type as reported by wxVariant + virtual wxString GetColumnType( unsigned int col ) const = 0; + + // get value into a wxVariant + virtual void GetValue( wxVariant &variant, + const wxDataViewItem &item, unsigned int col ) const = 0; + + // return true if the given item has a value to display in the given + // column: this is always true except for container items which by default + // only show their label in the first column (but see HasContainerColumns()) + bool HasValue(const wxDataViewItem& item, unsigned col) const + { + return col == 0 || !IsContainer(item) || HasContainerColumns(item); + } + + // usually ValueChanged() should be called after changing the value in the + // model to update the control, ChangeValue() does it on its own while + // SetValue() does not -- so while you will override SetValue(), you should + // be usually calling ChangeValue() + virtual bool SetValue(const wxVariant &variant, + const wxDataViewItem &item, + unsigned int col) = 0; + + bool ChangeValue(const wxVariant& variant, + const wxDataViewItem& item, + unsigned int col) + { + return SetValue(variant, item, col) && ValueChanged(item, col); + } + + // Get text attribute, return false of default attributes should be used + virtual bool GetAttr(const wxDataViewItem &WXUNUSED(item), + unsigned int WXUNUSED(col), + wxDataViewItemAttr &WXUNUSED(attr)) const + { + return false; + } + + // Override this if you want to disable specific items + virtual bool IsEnabled(const wxDataViewItem &WXUNUSED(item), + unsigned int WXUNUSED(col)) const + { + return true; + } + + // define hierarchy + virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const = 0; + virtual bool IsContainer( const wxDataViewItem &item ) const = 0; + // Is the container just a header or an item with all columns + virtual bool HasContainerColumns(const wxDataViewItem& WXUNUSED(item)) const + { return false; } + virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const = 0; + + // delegated notifiers + bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item ); + bool ItemsAdded( const wxDataViewItem &parent, const wxDataViewItemArray &items ); + bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item ); + bool ItemsDeleted( const wxDataViewItem &parent, const wxDataViewItemArray &items ); + bool ItemChanged( const wxDataViewItem &item ); + bool ItemsChanged( const wxDataViewItemArray &items ); + bool ValueChanged( const wxDataViewItem &item, unsigned int col ); + bool Cleared(); + + // some platforms, such as GTK+, may need a two step procedure for ::Reset() + bool BeforeReset(); + bool AfterReset(); + + + // delegated action + virtual void Resort(); + + void AddNotifier( wxDataViewModelNotifier *notifier ); + void RemoveNotifier( wxDataViewModelNotifier *notifier ); + + // default compare function + virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2, + unsigned int column, bool ascending ) const; + virtual bool HasDefaultCompare() const { return false; } + + // internal + virtual bool IsListModel() const { return false; } + virtual bool IsVirtualListModel() const { return false; } + +protected: + // the user should not delete this class directly: he should use DecRef() instead! + virtual ~wxDataViewModel() { } + + wxDataViewModelNotifiers m_notifiers; +}; + +// ---------------------------------------------------------------------------- +// wxDataViewListModel: a model of a list, i.e. flat data structure without any +// branches/containers, used as base class by wxDataViewIndexListModel and +// wxDataViewVirtualListModel +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewListModel : public wxDataViewModel +{ +public: + // derived classes should override these methods instead of + // {Get,Set}Value() and GetAttr() inherited from the base class + + virtual void GetValueByRow(wxVariant &variant, + unsigned row, unsigned col) const = 0; + + virtual bool SetValueByRow(const wxVariant &variant, + unsigned row, unsigned col) = 0; + + virtual bool + GetAttrByRow(unsigned WXUNUSED(row), unsigned WXUNUSED(col), + wxDataViewItemAttr &WXUNUSED(attr)) const + { + return false; + } + + virtual bool IsEnabledByRow(unsigned int WXUNUSED(row), + unsigned int WXUNUSED(col)) const + { + return true; + } + + + // helper methods provided by list models only + virtual unsigned GetRow( const wxDataViewItem &item ) const = 0; + + // returns the number of rows + virtual unsigned int GetCount() const = 0; + + // implement some base class pure virtual directly + virtual wxDataViewItem + GetParent( const wxDataViewItem & WXUNUSED(item) ) const + { + // items never have valid parent in this model + return wxDataViewItem(); + } + + virtual bool IsContainer( const wxDataViewItem &item ) const + { + // only the invisible (and invalid) root item has children + return !item.IsOk(); + } + + // and implement some others by forwarding them to our own ones + virtual void GetValue( wxVariant &variant, + const wxDataViewItem &item, unsigned int col ) const + { + GetValueByRow(variant, GetRow(item), col); + } + + virtual bool SetValue( const wxVariant &variant, + const wxDataViewItem &item, unsigned int col ) + { + return SetValueByRow( variant, GetRow(item), col ); + } + + virtual bool GetAttr(const wxDataViewItem &item, unsigned int col, + wxDataViewItemAttr &attr) const + { + return GetAttrByRow( GetRow(item), col, attr ); + } + + virtual bool IsEnabled(const wxDataViewItem &item, unsigned int col) const + { + return IsEnabledByRow( GetRow(item), col ); + } + + + virtual bool IsListModel() const { return true; } +}; + +// --------------------------------------------------------- +// wxDataViewIndexListModel +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewIndexListModel: public wxDataViewListModel +{ +public: + wxDataViewIndexListModel( unsigned int initial_size = 0 ); + + void RowPrepended(); + void RowInserted( unsigned int before ); + void RowAppended(); + void RowDeleted( unsigned int row ); + void RowsDeleted( const wxArrayInt &rows ); + void RowChanged( unsigned int row ); + void RowValueChanged( unsigned int row, unsigned int col ); + void Reset( unsigned int new_size ); + + // convert to/from row/wxDataViewItem + + virtual unsigned GetRow( const wxDataViewItem &item ) const; + wxDataViewItem GetItem( unsigned int row ) const; + + // implement base methods + virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const; + + unsigned int GetCount() const { return m_hash.GetCount(); } + +private: + wxDataViewItemArray m_hash; + unsigned int m_nextFreeID; + bool m_ordered; +}; + +// --------------------------------------------------------- +// wxDataViewVirtualListModel +// --------------------------------------------------------- + +#ifdef __WXMAC__ +// better than nothing +typedef wxDataViewIndexListModel wxDataViewVirtualListModel; +#else + +class WXDLLIMPEXP_ADV wxDataViewVirtualListModel: public wxDataViewListModel +{ +public: + wxDataViewVirtualListModel( unsigned int initial_size = 0 ); + + void RowPrepended(); + void RowInserted( unsigned int before ); + void RowAppended(); + void RowDeleted( unsigned int row ); + void RowsDeleted( const wxArrayInt &rows ); + void RowChanged( unsigned int row ); + void RowValueChanged( unsigned int row, unsigned int col ); + void Reset( unsigned int new_size ); + + // convert to/from row/wxDataViewItem + + virtual unsigned GetRow( const wxDataViewItem &item ) const; + wxDataViewItem GetItem( unsigned int row ) const; + + // compare based on index + + virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2, + unsigned int column, bool ascending ) const; + virtual bool HasDefaultCompare() const; + + // implement base methods + virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const; + + unsigned int GetCount() const { return m_size; } + + // internal + virtual bool IsVirtualListModel() const { return true; } + +private: + unsigned int m_size; +}; +#endif + +// ---------------------------------------------------------------------------- +// wxDataViewRenderer and related classes +// ---------------------------------------------------------------------------- + +#include "wx/dvrenderers.h" + +// --------------------------------------------------------- +// wxDataViewColumnBase +// --------------------------------------------------------- + +// for compatibility only, do not use +enum wxDataViewColumnFlags +{ + wxDATAVIEW_COL_RESIZABLE = wxCOL_RESIZABLE, + wxDATAVIEW_COL_SORTABLE = wxCOL_SORTABLE, + wxDATAVIEW_COL_REORDERABLE = wxCOL_REORDERABLE, + wxDATAVIEW_COL_HIDDEN = wxCOL_HIDDEN +}; + +class WXDLLIMPEXP_ADV wxDataViewColumnBase : public wxSettableHeaderColumn +{ +public: + // ctor for the text columns: takes ownership of renderer + wxDataViewColumnBase(wxDataViewRenderer *renderer, + unsigned int model_column) + { + Init(renderer, model_column); + } + + // ctor for the bitmap columns + wxDataViewColumnBase(const wxBitmap& bitmap, + wxDataViewRenderer *renderer, + unsigned int model_column) + : m_bitmap(bitmap) + { + Init(renderer, model_column); + } + + virtual ~wxDataViewColumnBase(); + + // setters: + virtual void SetOwner( wxDataViewCtrl *owner ) + { m_owner = owner; } + + // getters: + unsigned int GetModelColumn() const { return static_cast(m_model_column); } + wxDataViewCtrl *GetOwner() const { return m_owner; } + wxDataViewRenderer* GetRenderer() const { return m_renderer; } + + // implement some of base class pure virtuals (the rest is port-dependent + // and done differently in generic and native versions) + virtual void SetBitmap( const wxBitmap& bitmap ) { m_bitmap = bitmap; } + virtual wxBitmap GetBitmap() const { return m_bitmap; } + +protected: + wxDataViewRenderer *m_renderer; + int m_model_column; + wxBitmap m_bitmap; + wxDataViewCtrl *m_owner; + +private: + // common part of all ctors + void Init(wxDataViewRenderer *renderer, unsigned int model_column); +}; + +// --------------------------------------------------------- +// wxDataViewCtrlBase +// --------------------------------------------------------- + +#define wxDV_SINGLE 0x0000 // for convenience +#define wxDV_MULTIPLE 0x0001 // can select multiple items + +#define wxDV_NO_HEADER 0x0002 // column titles not visible +#define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows +#define wxDV_VERT_RULES 0x0008 // light vertical rules between columns + +#define wxDV_ROW_LINES 0x0010 // alternating colour in rows +#define wxDV_VARIABLE_LINE_HEIGHT 0x0020 // variable line height + +class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl +{ +public: + wxDataViewCtrlBase(); + virtual ~wxDataViewCtrlBase(); + + // model + // ----- + + virtual bool AssociateModel( wxDataViewModel *model ); + wxDataViewModel* GetModel(); + const wxDataViewModel* GetModel() const; + + + // column management + // ----------------- + + wxDataViewColumn *PrependTextColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *PrependIconTextColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *PrependToggleColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *PrependProgressColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *PrependDateColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *PrependBitmapColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *PrependTextColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *PrependIconTextColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *PrependToggleColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *PrependProgressColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *PrependDateColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *PrependBitmapColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + + wxDataViewColumn *AppendTextColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendIconTextColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendToggleColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendProgressColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendDateColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendBitmapColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendTextColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendIconTextColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendToggleColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendProgressColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendDateColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1, + wxAlignment align = wxALIGN_NOT, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendBitmapColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + + virtual bool PrependColumn( wxDataViewColumn *col ); + virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col ); + virtual bool AppendColumn( wxDataViewColumn *col ); + + virtual unsigned int GetColumnCount() const = 0; + virtual wxDataViewColumn* GetColumn( unsigned int pos ) const = 0; + virtual int GetColumnPosition( const wxDataViewColumn *column ) const = 0; + + virtual bool DeleteColumn( wxDataViewColumn *column ) = 0; + virtual bool ClearColumns() = 0; + + void SetExpanderColumn( wxDataViewColumn *col ) + { m_expander_column = col ; DoSetExpanderColumn(); } + wxDataViewColumn *GetExpanderColumn() const + { return m_expander_column; } + + virtual wxDataViewColumn *GetSortingColumn() const = 0; + + + // items management + // ---------------- + + void SetIndent( int indent ) + { m_indent = indent ; DoSetIndent(); } + int GetIndent() const + { return m_indent; } + + // Current item is the one used by the keyboard navigation, it is the same + // as the (unique) selected item in single selection mode so these + // functions are mostly useful for controls with wxDV_MULTIPLE style. + wxDataViewItem GetCurrentItem() const; + void SetCurrentItem(const wxDataViewItem& item); + + // Currently focused column of the current item or NULL if no column has focus + virtual wxDataViewColumn *GetCurrentColumn() const = 0; + + // Selection: both GetSelection() and GetSelections() can be used for the + // controls both with and without wxDV_MULTIPLE style. For single selection + // controls GetSelections() is not very useful however. And for multi + // selection controls GetSelection() returns an invalid item if more than + // one item is selected. Use GetSelectedItemsCount() or HasSelection() to + // check if any items are selected at all. + virtual int GetSelectedItemsCount() const = 0; + bool HasSelection() const { return GetSelectedItemsCount() != 0; } + wxDataViewItem GetSelection() const; + virtual int GetSelections( wxDataViewItemArray & sel ) const = 0; + virtual void SetSelections( const wxDataViewItemArray & sel ) = 0; + virtual void Select( const wxDataViewItem & item ) = 0; + virtual void Unselect( const wxDataViewItem & item ) = 0; + virtual bool IsSelected( const wxDataViewItem & item ) const = 0; + + virtual void SelectAll() = 0; + virtual void UnselectAll() = 0; + + virtual void Expand( const wxDataViewItem & item ) = 0; + virtual void ExpandAncestors( const wxDataViewItem & item ); + virtual void Collapse( const wxDataViewItem & item ) = 0; + virtual bool IsExpanded( const wxDataViewItem & item ) const = 0; + + virtual void EnsureVisible( const wxDataViewItem & item, + const wxDataViewColumn *column = NULL ) = 0; + virtual void HitTest( const wxPoint & point, wxDataViewItem &item, wxDataViewColumn* &column ) const = 0; + virtual wxRect GetItemRect( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ) const = 0; + + virtual bool SetRowHeight( int WXUNUSED(rowHeight) ) { return false; } + + virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column) = 0; + + // Use EditItem() instead + wxDEPRECATED( void StartEditor(const wxDataViewItem& item, unsigned int column) ); + +#if wxUSE_DRAG_AND_DROP + virtual bool EnableDragSource(const wxDataFormat& WXUNUSED(format)) + { return false; } + virtual bool EnableDropTarget(const wxDataFormat& WXUNUSED(format)) + { return false; } +#endif // wxUSE_DRAG_AND_DROP + + // define control visual attributes + // -------------------------------- + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL) + { + return wxControl::GetCompositeControlsDefaultAttributes(variant); + } + +protected: + virtual void DoSetExpanderColumn() = 0 ; + virtual void DoSetIndent() = 0; + +private: + // Implementation of the public Set/GetCurrentItem() methods which are only + // called in multi selection case (for single selection controls their + // implementation is trivial and is done in the base class itself). + virtual wxDataViewItem DoGetCurrentItem() const = 0; + virtual void DoSetCurrentItem(const wxDataViewItem& item) = 0; + + wxDataViewModel *m_model; + wxDataViewColumn *m_expander_column; + int m_indent ; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCtrlBase) +}; + +// ---------------------------------------------------------------------------- +// wxDataViewEvent - the event class for the wxDataViewCtrl notifications +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewEvent : public wxNotifyEvent +{ +public: + wxDataViewEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) + : wxNotifyEvent(commandType, winid), + m_item(0), + m_col(-1), + m_model(NULL), + m_value(wxNullVariant), + m_column(NULL), + m_pos(-1,-1), + m_cacheFrom(0), + m_cacheTo(0), + m_editCancelled(false) +#if wxUSE_DRAG_AND_DROP + , m_dataObject(NULL), + m_dataBuffer(NULL), + m_dataSize(0), + m_dragFlags(0), + m_dropEffect(wxDragNone) +#endif + { } + + wxDataViewEvent(const wxDataViewEvent& event) + : wxNotifyEvent(event), + m_item(event.m_item), + m_col(event.m_col), + m_model(event.m_model), + m_value(event.m_value), + m_column(event.m_column), + m_pos(event.m_pos), + m_cacheFrom(event.m_cacheFrom), + m_cacheTo(event.m_cacheTo), + m_editCancelled(event.m_editCancelled) +#if wxUSE_DRAG_AND_DROP + , m_dataObject(event.m_dataObject), + m_dataFormat(event.m_dataFormat), + m_dataBuffer(event.m_dataBuffer), + m_dataSize(event.m_dataSize), + m_dragFlags(event.m_dragFlags), + m_dropEffect(event.m_dropEffect) +#endif + { } + + wxDataViewItem GetItem() const { return m_item; } + void SetItem( const wxDataViewItem &item ) { m_item = item; } + + int GetColumn() const { return m_col; } + void SetColumn( int col ) { m_col = col; } + + wxDataViewModel* GetModel() const { return m_model; } + void SetModel( wxDataViewModel *model ) { m_model = model; } + + const wxVariant &GetValue() const { return m_value; } + void SetValue( const wxVariant &value ) { m_value = value; } + + // for wxEVT_DATAVIEW_ITEM_EDITING_DONE only + bool IsEditCancelled() const { return m_editCancelled; } + void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; } + + // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only + void SetDataViewColumn( wxDataViewColumn *col ) { m_column = col; } + wxDataViewColumn *GetDataViewColumn() const { return m_column; } + + // for wxEVT_DATAVIEW_CONTEXT_MENU only + wxPoint GetPosition() const { return m_pos; } + void SetPosition( int x, int y ) { m_pos.x = x; m_pos.y = y; } + + // For wxEVT_DATAVIEW_CACHE_HINT + int GetCacheFrom() const { return m_cacheFrom; } + int GetCacheTo() const { return m_cacheTo; } + void SetCache(int from, int to) { m_cacheFrom = from; m_cacheTo = to; } + + +#if wxUSE_DRAG_AND_DROP + // For drag operations + void SetDataObject( wxDataObject *obj ) { m_dataObject = obj; } + wxDataObject *GetDataObject() const { return m_dataObject; } + + // For drop operations + void SetDataFormat( const wxDataFormat &format ) { m_dataFormat = format; } + wxDataFormat GetDataFormat() const { return m_dataFormat; } + void SetDataSize( size_t size ) { m_dataSize = size; } + size_t GetDataSize() const { return m_dataSize; } + void SetDataBuffer( void* buf ) { m_dataBuffer = buf;} + void *GetDataBuffer() const { return m_dataBuffer; } + void SetDragFlags( int flags ) { m_dragFlags = flags; } + int GetDragFlags() const { return m_dragFlags; } + void SetDropEffect( wxDragResult effect ) { m_dropEffect = effect; } + wxDragResult GetDropEffect() const { return m_dropEffect; } +#endif // wxUSE_DRAG_AND_DROP + + virtual wxEvent *Clone() const { return new wxDataViewEvent(*this); } + +protected: + wxDataViewItem m_item; + int m_col; + wxDataViewModel *m_model; + wxVariant m_value; + wxDataViewColumn *m_column; + wxPoint m_pos; + int m_cacheFrom; + int m_cacheTo; + bool m_editCancelled; + +#if wxUSE_DRAG_AND_DROP + wxDataObject *m_dataObject; + + wxDataFormat m_dataFormat; + void* m_dataBuffer; + size_t m_dataSize; + + int m_dragFlags; + wxDragResult m_dropEffect; +#endif // wxUSE_DRAG_AND_DROP + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent) +}; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_SORTED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_CACHE_HINT, wxDataViewEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_DROP, wxDataViewEvent ); + +typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&); + +#define wxDataViewEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxDataViewEventFunction, func) + +#define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn)) + +#define EVT_DATAVIEW_SELECTION_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(SELECTION_CHANGED, id, fn) + +#define EVT_DATAVIEW_ITEM_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_ACTIVATED, id, fn) +#define EVT_DATAVIEW_ITEM_COLLAPSING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_COLLAPSING, id, fn) +#define EVT_DATAVIEW_ITEM_COLLAPSED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_COLLAPSED, id, fn) +#define EVT_DATAVIEW_ITEM_EXPANDING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EXPANDING, id, fn) +#define EVT_DATAVIEW_ITEM_EXPANDED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EXPANDED, id, fn) +#define EVT_DATAVIEW_ITEM_START_EDITING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_START_EDITING, id, fn) +#define EVT_DATAVIEW_ITEM_EDITING_STARTED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EDITING_STARTED, id, fn) +#define EVT_DATAVIEW_ITEM_EDITING_DONE(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EDITING_DONE, id, fn) +#define EVT_DATAVIEW_ITEM_VALUE_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_VALUE_CHANGED, id, fn) + +#define EVT_DATAVIEW_ITEM_CONTEXT_MENU(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_CONTEXT_MENU, id, fn) + +#define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn) +#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn) +#define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn) +#define EVT_DATAVIEW_COLUMN_REORDERED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_REORDERED, id, fn) +#define EVT_DATAVIEW_CACHE_HINT(id, fn) wx__DECLARE_DATAVIEWEVT(CACHE_HINT, id, fn) + +#define EVT_DATAVIEW_ITEM_BEGIN_DRAG(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_BEGIN_DRAG, id, fn) +#define EVT_DATAVIEW_ITEM_DROP_POSSIBLE(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP_POSSIBLE, id, fn) +#define EVT_DATAVIEW_ITEM_DROP(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP, id, fn) + +// Old and not documented synonym, don't use. +#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(id, fn) + +#ifdef wxHAS_GENERIC_DATAVIEWCTRL + #include "wx/generic/dataview.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/dataview.h" +#elif defined(__WXMAC__) + #include "wx/osx/dataview.h" +#else + #error "unknown native wxDataViewCtrl implementation" +#endif + +//----------------------------------------------------------------------------- +// wxDataViewListStore +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewListStoreLine +{ +public: + wxDataViewListStoreLine( wxUIntPtr data = 0 ) + { + m_data = data; + } + + void SetData( wxUIntPtr data ) + { m_data = data; } + wxUIntPtr GetData() const + { return m_data; } + + wxVector m_values; + +private: + wxUIntPtr m_data; +}; + + +class WXDLLIMPEXP_ADV wxDataViewListStore: public wxDataViewIndexListModel +{ +public: + wxDataViewListStore(); + ~wxDataViewListStore(); + + void PrependColumn( const wxString &varianttype ); + void InsertColumn( unsigned int pos, const wxString &varianttype ); + void AppendColumn( const wxString &varianttype ); + + void AppendItem( const wxVector &values, wxUIntPtr data = 0 ); + void PrependItem( const wxVector &values, wxUIntPtr data = 0 ); + void InsertItem( unsigned int row, const wxVector &values, wxUIntPtr data = 0 ); + void DeleteItem( unsigned int pos ); + void DeleteAllItems(); +#if wxABI_VERSION >= 30001 + void ClearColumns(); +#endif + + unsigned int GetItemCount() const; + + void SetItemData( const wxDataViewItem& item, wxUIntPtr data ); + wxUIntPtr GetItemData( const wxDataViewItem& item ) const; + + // override base virtuals + + virtual unsigned int GetColumnCount() const; + + virtual wxString GetColumnType( unsigned int col ) const; + + virtual void GetValueByRow( wxVariant &value, + unsigned int row, unsigned int col ) const; + + virtual bool SetValueByRow( const wxVariant &value, + unsigned int row, unsigned int col ); + + +public: + wxVector m_data; + wxArrayString m_cols; +}; + +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewListCtrl: public wxDataViewCtrl +{ +public: + wxDataViewListCtrl(); + wxDataViewListCtrl( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDV_ROW_LINES, + const wxValidator& validator = wxDefaultValidator ); + ~wxDataViewListCtrl(); + + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxDV_ROW_LINES, + const wxValidator& validator = wxDefaultValidator ); + + wxDataViewListStore *GetStore() + { return (wxDataViewListStore*) GetModel(); } + const wxDataViewListStore *GetStore() const + { return (const wxDataViewListStore*) GetModel(); } + + int ItemToRow(const wxDataViewItem &item) const + { return item.IsOk() ? (int)GetStore()->GetRow(item) : wxNOT_FOUND; } + wxDataViewItem RowToItem(int row) const + { return row == wxNOT_FOUND ? wxDataViewItem() : GetStore()->GetItem(row); } + + int GetSelectedRow() const + { return ItemToRow(GetSelection()); } + void SelectRow(unsigned row) + { Select(RowToItem(row)); } + void UnselectRow(unsigned row) + { Unselect(RowToItem(row)); } + bool IsRowSelected(unsigned row) const + { return IsSelected(RowToItem(row)); } + + bool AppendColumn( wxDataViewColumn *column, const wxString &varianttype ); + bool PrependColumn( wxDataViewColumn *column, const wxString &varianttype ); + bool InsertColumn( unsigned int pos, wxDataViewColumn *column, const wxString &varianttype ); + + // overridden from base class + virtual bool PrependColumn( wxDataViewColumn *col ); + virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col ); + virtual bool AppendColumn( wxDataViewColumn *col ); +#if wxABI_VERSION >= 30001 + virtual bool ClearColumns(); +#endif + + wxDataViewColumn *AppendTextColumn( const wxString &label, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendToggleColumn( const wxString &label, + wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, + int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendProgressColumn( const wxString &label, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn *AppendIconTextColumn( const wxString &label, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE ); + + void AppendItem( const wxVector &values, wxUIntPtr data = 0 ) + { GetStore()->AppendItem( values, data ); } + void PrependItem( const wxVector &values, wxUIntPtr data = 0 ) + { GetStore()->PrependItem( values, data ); } + void InsertItem( unsigned int row, const wxVector &values, wxUIntPtr data = 0 ) + { GetStore()->InsertItem( row, values, data ); } + void DeleteItem( unsigned row ) + { GetStore()->DeleteItem( row ); } + void DeleteAllItems() + { GetStore()->DeleteAllItems(); } + + void SetValue( const wxVariant &value, unsigned int row, unsigned int col ) + { GetStore()->SetValueByRow( value, row, col ); + GetStore()->RowValueChanged( row, col); } + void GetValue( wxVariant &value, unsigned int row, unsigned int col ) + { GetStore()->GetValueByRow( value, row, col ); } + + void SetTextValue( const wxString &value, unsigned int row, unsigned int col ) + { GetStore()->SetValueByRow( value, row, col ); + GetStore()->RowValueChanged( row, col); } + wxString GetTextValue( unsigned int row, unsigned int col ) const + { wxVariant value; GetStore()->GetValueByRow( value, row, col ); return value.GetString(); } + + void SetToggleValue( bool value, unsigned int row, unsigned int col ) + { GetStore()->SetValueByRow( value, row, col ); + GetStore()->RowValueChanged( row, col); } + bool GetToggleValue( unsigned int row, unsigned int col ) const + { wxVariant value; GetStore()->GetValueByRow( value, row, col ); return value.GetBool(); } + + void SetItemData( const wxDataViewItem& item, wxUIntPtr data ) + { GetStore()->SetItemData( item, data ); } + wxUIntPtr GetItemData( const wxDataViewItem& item ) const + { return GetStore()->GetItemData( item ); } + + int GetItemCount() const + { return GetStore()->GetItemCount(); } + + void OnSize( wxSizeEvent &event ); + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewListCtrl) +}; + +//----------------------------------------------------------------------------- +// wxDataViewTreeStore +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewTreeStoreNode +{ +public: + wxDataViewTreeStoreNode( wxDataViewTreeStoreNode *parent, + const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL ); + virtual ~wxDataViewTreeStoreNode(); + + void SetText( const wxString &text ) + { m_text = text; } + wxString GetText() const + { return m_text; } + void SetIcon( const wxIcon &icon ) + { m_icon = icon; } + const wxIcon &GetIcon() const + { return m_icon; } + void SetData( wxClientData *data ) + { if (m_data) delete m_data; m_data = data; } + wxClientData *GetData() const + { return m_data; } + + wxDataViewItem GetItem() const + { return wxDataViewItem( (void*) this ); } + + virtual bool IsContainer() + { return false; } + + wxDataViewTreeStoreNode *GetParent() + { return m_parent; } + +private: + wxDataViewTreeStoreNode *m_parent; + wxString m_text; + wxIcon m_icon; + wxClientData *m_data; +}; + +WX_DECLARE_LIST_WITH_DECL(wxDataViewTreeStoreNode, wxDataViewTreeStoreNodeList, + class WXDLLIMPEXP_ADV); + +class WXDLLIMPEXP_ADV wxDataViewTreeStoreContainerNode: public wxDataViewTreeStoreNode +{ +public: + wxDataViewTreeStoreContainerNode( wxDataViewTreeStoreNode *parent, + const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon, + wxClientData *data = NULL ); + virtual ~wxDataViewTreeStoreContainerNode(); + + const wxDataViewTreeStoreNodeList &GetChildren() const + { return m_children; } + wxDataViewTreeStoreNodeList &GetChildren() + { return m_children; } + + void SetExpandedIcon( const wxIcon &icon ) + { m_iconExpanded = icon; } + const wxIcon &GetExpandedIcon() const + { return m_iconExpanded; } + + void SetExpanded( bool expanded = true ) + { m_isExpanded = expanded; } + bool IsExpanded() const + { return m_isExpanded; } + + virtual bool IsContainer() + { return true; } + +private: + wxDataViewTreeStoreNodeList m_children; + wxIcon m_iconExpanded; + bool m_isExpanded; +}; + +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewTreeStore: public wxDataViewModel +{ +public: + wxDataViewTreeStore(); + ~wxDataViewTreeStore(); + + wxDataViewItem AppendItem( const wxDataViewItem& parent, + const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL ); + wxDataViewItem PrependItem( const wxDataViewItem& parent, + const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL ); + wxDataViewItem InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous, + const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL ); + + wxDataViewItem PrependContainer( const wxDataViewItem& parent, + const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon, + wxClientData *data = NULL ); + wxDataViewItem AppendContainer( const wxDataViewItem& parent, + const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon, + wxClientData *data = NULL ); + wxDataViewItem InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous, + const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon, + wxClientData *data = NULL ); + + wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const; + int GetChildCount( const wxDataViewItem& parent ) const; + + void SetItemText( const wxDataViewItem& item, const wxString &text ); + wxString GetItemText( const wxDataViewItem& item ) const; + void SetItemIcon( const wxDataViewItem& item, const wxIcon &icon ); + const wxIcon &GetItemIcon( const wxDataViewItem& item ) const; + void SetItemExpandedIcon( const wxDataViewItem& item, const wxIcon &icon ); + const wxIcon &GetItemExpandedIcon( const wxDataViewItem& item ) const; + void SetItemData( const wxDataViewItem& item, wxClientData *data ); + wxClientData *GetItemData( const wxDataViewItem& item ) const; + + void DeleteItem( const wxDataViewItem& item ); + void DeleteChildren( const wxDataViewItem& item ); + void DeleteAllItems(); + + // implement base methods + + virtual void GetValue( wxVariant &variant, + const wxDataViewItem &item, unsigned int col ) const; + virtual bool SetValue( const wxVariant &variant, + const wxDataViewItem &item, unsigned int col ); + virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const; + virtual bool IsContainer( const wxDataViewItem &item ) const; + virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const; + + virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2, + unsigned int column, bool ascending ) const; + + virtual bool HasDefaultCompare() const + { return true; } + virtual unsigned int GetColumnCount() const + { return 1; } + virtual wxString GetColumnType( unsigned int WXUNUSED(col) ) const + { return wxT("wxDataViewIconText"); } + + wxDataViewTreeStoreNode *FindNode( const wxDataViewItem &item ) const; + wxDataViewTreeStoreContainerNode *FindContainerNode( const wxDataViewItem &item ) const; + wxDataViewTreeStoreNode *GetRoot() const { return m_root; } + +public: + wxDataViewTreeStoreNode *m_root; +}; + +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewTreeCtrl: public wxDataViewCtrl, + public wxWithImages +{ +public: + wxDataViewTreeCtrl() { } + wxDataViewTreeCtrl(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDV_NO_HEADER | wxDV_ROW_LINES, + const wxValidator& validator = wxDefaultValidator) + { + Create(parent, id, pos, size, style, validator); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDV_NO_HEADER | wxDV_ROW_LINES, + const wxValidator& validator = wxDefaultValidator); + + wxDataViewTreeStore *GetStore() + { return (wxDataViewTreeStore*) GetModel(); } + const wxDataViewTreeStore *GetStore() const + { return (const wxDataViewTreeStore*) GetModel(); } + + bool IsContainer( const wxDataViewItem& item ) const + { return GetStore()->IsContainer(item); } + + wxDataViewItem AppendItem( const wxDataViewItem& parent, + const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL ); + wxDataViewItem PrependItem( const wxDataViewItem& parent, + const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL ); + wxDataViewItem InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous, + const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL ); + + wxDataViewItem PrependContainer( const wxDataViewItem& parent, + const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE, + wxClientData *data = NULL ); + wxDataViewItem AppendContainer( const wxDataViewItem& parent, + const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE, + wxClientData *data = NULL ); + wxDataViewItem InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous, + const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE, + wxClientData *data = NULL ); + + wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const + { return GetStore()->GetNthChild(parent, pos); } + int GetChildCount( const wxDataViewItem& parent ) const + { return GetStore()->GetChildCount(parent); } + + void SetItemText( const wxDataViewItem& item, const wxString &text ); + wxString GetItemText( const wxDataViewItem& item ) const + { return GetStore()->GetItemText(item); } + void SetItemIcon( const wxDataViewItem& item, const wxIcon &icon ); + const wxIcon &GetItemIcon( const wxDataViewItem& item ) const + { return GetStore()->GetItemIcon(item); } + void SetItemExpandedIcon( const wxDataViewItem& item, const wxIcon &icon ); + const wxIcon &GetItemExpandedIcon( const wxDataViewItem& item ) const + { return GetStore()->GetItemExpandedIcon(item); } + void SetItemData( const wxDataViewItem& item, wxClientData *data ) + { GetStore()->SetItemData(item,data); } + wxClientData *GetItemData( const wxDataViewItem& item ) const + { return GetStore()->GetItemData(item); } + + void DeleteItem( const wxDataViewItem& item ); + void DeleteChildren( const wxDataViewItem& item ); + void DeleteAllItems(); + + void OnExpanded( wxDataViewEvent &event ); + void OnCollapsed( wxDataViewEvent &event ); + void OnSize( wxSizeEvent &event ); + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewTreeCtrl) +}; + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED wxEVT_DATAVIEW_SELECTION_CHANGED +#define wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED wxEVT_DATAVIEW_ITEM_ACTIVATED +#define wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED wxEVT_DATAVIEW_ITEM_COLLAPSED +#define wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED wxEVT_DATAVIEW_ITEM_EXPANDED +#define wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING wxEVT_DATAVIEW_ITEM_COLLAPSING +#define wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING wxEVT_DATAVIEW_ITEM_EXPANDING +#define wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING wxEVT_DATAVIEW_ITEM_START_EDITING +#define wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED wxEVT_DATAVIEW_ITEM_EDITING_STARTED +#define wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE wxEVT_DATAVIEW_ITEM_EDITING_DONE +#define wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED wxEVT_DATAVIEW_ITEM_VALUE_CHANGED +#define wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU wxEVT_DATAVIEW_ITEM_CONTEXT_MENU +#define wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK wxEVT_DATAVIEW_COLUMN_HEADER_CLICK +#define wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK +#define wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED wxEVT_DATAVIEW_COLUMN_SORTED +#define wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED wxEVT_DATAVIEW_COLUMN_REORDERED +#define wxEVT_COMMAND_DATAVIEW_CACHE_HINT wxEVT_DATAVIEW_CACHE_HINT +#define wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG wxEVT_DATAVIEW_ITEM_BEGIN_DRAG +#define wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE +#define wxEVT_COMMAND_DATAVIEW_ITEM_DROP wxEVT_DATAVIEW_ITEM_DROP + +#endif // wxUSE_DATAVIEWCTRL + +#endif + // _WX_DATAVIEW_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/datectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/datectrl.h new file mode 100644 index 0000000000..6fa4367c0a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/datectrl.h @@ -0,0 +1,113 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/datectrl.h +// Purpose: implements wxDatePickerCtrl +// Author: Vadim Zeitlin +// Modified by: +// Created: 2005-01-09 +// Copyright: (c) 2005 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DATECTRL_H_ +#define _WX_DATECTRL_H_ + +#include "wx/defs.h" + +#if wxUSE_DATEPICKCTRL + +#include "wx/datetimectrl.h" // the base class + +#define wxDatePickerCtrlNameStr wxT("datectrl") + +// wxDatePickerCtrl styles +enum +{ + // default style on this platform, either wxDP_SPIN or wxDP_DROPDOWN + wxDP_DEFAULT = 0, + + // a spin control-like date picker (not supported in generic version) + wxDP_SPIN = 1, + + // a combobox-like date picker (not supported in mac version) + wxDP_DROPDOWN = 2, + + // always show century in the default date display (otherwise it depends on + // the system date format which may include the century or not) + wxDP_SHOWCENTURY = 4, + + // allow not having any valid date in the control (by default it always has + // some date, today initially if no valid date specified in ctor) + wxDP_ALLOWNONE = 8 +}; + +// ---------------------------------------------------------------------------- +// wxDatePickerCtrl: allow the user to enter the date +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDatePickerCtrlBase : public wxDateTimePickerCtrl +{ +public: + /* + The derived classes should implement ctor and Create() method with the + following signature: + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDatePickerCtrlNameStr); + */ + + /* + We inherit the methods to set/get the date from the base class. + + virtual void SetValue(const wxDateTime& dt) = 0; + virtual wxDateTime GetValue() const = 0; + */ + + // And add methods to set/get the allowed valid range for the dates. If + // either/both of them are invalid, there is no corresponding limit and if + // neither is set, GetRange() returns false. + virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2) = 0; + virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const = 0; +}; + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + #include "wx/msw/datectrl.h" + + #define wxHAS_NATIVE_DATEPICKCTRL +#elif defined(__WXOSX_COCOA__) && !defined(__WXUNIVERSAL__) + #include "wx/osx/datectrl.h" + + #define wxHAS_NATIVE_DATEPICKCTRL +#else + #include "wx/generic/datectrl.h" + + class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlGeneric + { + public: + wxDatePickerCtrl() { } + wxDatePickerCtrl(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDatePickerCtrlNameStr) + : wxDatePickerCtrlGeneric(parent, id, date, pos, size, style, validator, name) + { + } + + private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl) + }; +#endif + +#endif // wxUSE_DATEPICKCTRL + +#endif // _WX_DATECTRL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dateevt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dateevt.h new file mode 100644 index 0000000000..4131ab383e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dateevt.h @@ -0,0 +1,64 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/dateevt.h +// Purpose: declares wxDateEvent class +// Author: Vadim Zeitlin +// Modified by: +// Created: 2005-01-10 +// Copyright: (c) 2005 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DATEEVT_H_ +#define _WX_DATEEVT_H_ + +#include "wx/event.h" +#include "wx/datetime.h" +#include "wx/window.h" + +// ---------------------------------------------------------------------------- +// wxDateEvent: used by wxCalendarCtrl, wxDatePickerCtrl and wxTimePickerCtrl. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDateEvent : public wxCommandEvent +{ +public: + wxDateEvent() { } + wxDateEvent(wxWindow *win, const wxDateTime& dt, wxEventType type) + : wxCommandEvent(type, win->GetId()), + m_date(dt) + { + SetEventObject(win); + } + + const wxDateTime& GetDate() const { return m_date; } + void SetDate(const wxDateTime &date) { m_date = date; } + + // default copy ctor, assignment operator and dtor are ok + virtual wxEvent *Clone() const { return new wxDateEvent(*this); } + +private: + wxDateTime m_date; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDateEvent) +}; + +// ---------------------------------------------------------------------------- +// event types and macros for handling them +// ---------------------------------------------------------------------------- + +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_DATE_CHANGED, wxDateEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_TIME_CHANGED, wxDateEvent); + +typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&); + +#define wxDateEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxDateEventFunction, func) + +#define EVT_DATE_CHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_DATE_CHANGED, id, wxDateEventHandler(fn)) + +#define EVT_TIME_CHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_TIME_CHANGED, id, wxDateEventHandler(fn)) + +#endif // _WX_DATEEVT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/datetime.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/datetime.h new file mode 100644 index 0000000000..f500985f28 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/datetime.h @@ -0,0 +1,2194 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/datetime.h +// Purpose: declarations of time/date related classes (wxDateTime, +// wxTimeSpan) +// Author: Vadim Zeitlin +// Modified by: +// Created: 10.02.99 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DATETIME_H +#define _WX_DATETIME_H + +#include "wx/defs.h" + +#if wxUSE_DATETIME + +#ifdef __WXWINCE__ + #include "wx/msw/wince/time.h" +#else + #include +#endif // OS + +#include // for INT_MIN + +#include "wx/longlong.h" +#include "wx/anystr.h" + +class WXDLLIMPEXP_FWD_BASE wxDateTime; +class WXDLLIMPEXP_FWD_BASE wxTimeSpan; +class WXDLLIMPEXP_FWD_BASE wxDateSpan; +#ifdef __WINDOWS__ +struct _SYSTEMTIME; +#endif + +#include "wx/dynarray.h" + +// not all c-runtimes are based on 1/1/1970 being (time_t) 0 +// set this to the corresponding value in seconds 1/1/1970 has on your +// systems c-runtime + +#define WX_TIME_BASE_OFFSET 0 + +/* + * TODO + * + * + 1. Time zones with minutes (make TimeZone a class) + * ? 2. getdate() function like under Solaris + * + 3. text conversion for wxDateSpan + * + 4. pluggable modules for the workdays calculations + * 5. wxDateTimeHolidayAuthority for Easter and other christian feasts + */ + +/* + The three (main) classes declared in this header represent: + + 1. An absolute moment in the time (wxDateTime) + 2. A difference between two moments in the time, positive or negative + (wxTimeSpan) + 3. A logical difference between two dates expressed in + years/months/weeks/days (wxDateSpan) + + The following arithmetic operations are permitted (all others are not): + + addition + -------- + + wxDateTime + wxTimeSpan = wxDateTime + wxDateTime + wxDateSpan = wxDateTime + wxTimeSpan + wxTimeSpan = wxTimeSpan + wxDateSpan + wxDateSpan = wxDateSpan + + subtraction + ------------ + wxDateTime - wxDateTime = wxTimeSpan + wxDateTime - wxTimeSpan = wxDateTime + wxDateTime - wxDateSpan = wxDateTime + wxTimeSpan - wxTimeSpan = wxTimeSpan + wxDateSpan - wxDateSpan = wxDateSpan + + multiplication + -------------- + wxTimeSpan * number = wxTimeSpan + number * wxTimeSpan = wxTimeSpan + wxDateSpan * number = wxDateSpan + number * wxDateSpan = wxDateSpan + + unitary minus + ------------- + -wxTimeSpan = wxTimeSpan + -wxDateSpan = wxDateSpan + + For each binary operation OP (+, -, *) we have the following operatorOP=() as + a method and the method with a symbolic name OPER (Add, Subtract, Multiply) + as a synonym for it and another const method with the same name which returns + the changed copy of the object and operatorOP() as a global function which is + implemented in terms of the const version of OPEN. For the unary - we have + operator-() as a method, Neg() as synonym for it and Negate() which returns + the copy of the object with the changed sign. +*/ + +// an invalid/default date time object which may be used as the default +// argument for arguments of type wxDateTime; it is also returned by all +// functions returning wxDateTime on failure (this is why it is also called +// wxInvalidDateTime) +class WXDLLIMPEXP_FWD_BASE wxDateTime; + +extern WXDLLIMPEXP_DATA_BASE(const char) wxDefaultDateTimeFormat[]; +extern WXDLLIMPEXP_DATA_BASE(const char) wxDefaultTimeSpanFormat[]; +extern WXDLLIMPEXP_DATA_BASE(const wxDateTime) wxDefaultDateTime; + +#define wxInvalidDateTime wxDefaultDateTime + + +// ---------------------------------------------------------------------------- +// conditional compilation +// ---------------------------------------------------------------------------- + +// if configure detected strftime(), we have it too +#ifdef HAVE_STRFTIME + #define wxHAS_STRFTIME +// suppose everyone else has strftime except Win CE unless VC8 is used +#elif !defined(__WXWINCE__) || defined(__VISUALC8__) + #define wxHAS_STRFTIME +#endif + +// ---------------------------------------------------------------------------- +// wxDateTime represents an absolute moment in the time +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxDateTime +{ +public: + // types + // ------------------------------------------------------------------------ + + // a small unsigned integer type for storing things like minutes, + // seconds &c. It should be at least short (i.e. not char) to contain + // the number of milliseconds - it may also be 'int' because there is + // no size penalty associated with it in our code, we don't store any + // data in this format + typedef unsigned short wxDateTime_t; + + // constants + // ------------------------------------------------------------------------ + + // the timezones + enum TZ + { + // the time in the current time zone + Local, + + // zones from GMT (= Greenwich Mean Time): they're guaranteed to be + // consequent numbers, so writing something like `GMT0 + offset' is + // safe if abs(offset) <= 12 + + // underscore stands for minus + GMT_12, GMT_11, GMT_10, GMT_9, GMT_8, GMT_7, + GMT_6, GMT_5, GMT_4, GMT_3, GMT_2, GMT_1, + GMT0, + GMT1, GMT2, GMT3, GMT4, GMT5, GMT6, + GMT7, GMT8, GMT9, GMT10, GMT11, GMT12, GMT13, + // Note that GMT12 and GMT_12 are not the same: there is a difference + // of exactly one day between them + + // some symbolic names for TZ + + // Europe + WET = GMT0, // Western Europe Time + WEST = GMT1, // Western Europe Summer Time + CET = GMT1, // Central Europe Time + CEST = GMT2, // Central Europe Summer Time + EET = GMT2, // Eastern Europe Time + EEST = GMT3, // Eastern Europe Summer Time + MSK = GMT3, // Moscow Time + MSD = GMT4, // Moscow Summer Time + + // US and Canada + AST = GMT_4, // Atlantic Standard Time + ADT = GMT_3, // Atlantic Daylight Time + EST = GMT_5, // Eastern Standard Time + EDT = GMT_4, // Eastern Daylight Saving Time + CST = GMT_6, // Central Standard Time + CDT = GMT_5, // Central Daylight Saving Time + MST = GMT_7, // Mountain Standard Time + MDT = GMT_6, // Mountain Daylight Saving Time + PST = GMT_8, // Pacific Standard Time + PDT = GMT_7, // Pacific Daylight Saving Time + HST = GMT_10, // Hawaiian Standard Time + AKST = GMT_9, // Alaska Standard Time + AKDT = GMT_8, // Alaska Daylight Saving Time + + // Australia + + A_WST = GMT8, // Western Standard Time + A_CST = GMT13 + 1, // Central Standard Time (+9.5) + A_EST = GMT10, // Eastern Standard Time + A_ESST = GMT11, // Eastern Summer Time + + // New Zealand + NZST = GMT12, // Standard Time + NZDT = GMT13, // Daylight Saving Time + + // TODO add more symbolic timezone names here + + // Universal Coordinated Time = the new and politically correct name + // for GMT + UTC = GMT0 + }; + + // the calendar systems we know about: notice that it's valid (for + // this classes purpose anyhow) to work with any of these calendars + // even with the dates before the historical appearance of the + // calendar + enum Calendar + { + Gregorian, // current calendar + Julian // calendar in use since -45 until the 1582 (or later) + + // TODO Hebrew, Chinese, Maya, ... (just kidding) (or then may be not?) + }; + + // the country parameter is used so far for calculating the start and + // the end of DST period and for deciding whether the date is a work + // day or not + // + // TODO move this to intl.h + +// Required for WinCE +#ifdef USA +#undef USA +#endif + + enum Country + { + Country_Unknown, // no special information for this country + Country_Default, // set the default country with SetCountry() method + // or use the default country with any other + + // TODO add more countries (for this we must know about DST and/or + // holidays for this country) + + // Western European countries: we assume that they all follow the same + // DST rules (true or false?) + Country_WesternEurope_Start, + Country_EEC = Country_WesternEurope_Start, + France, + Germany, + UK, + Country_WesternEurope_End = UK, + + Russia, + USA + }; + // symbolic names for the months + enum Month + { + Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, Inv_Month + }; + + // symbolic names for the weekdays + enum WeekDay + { + Sun, Mon, Tue, Wed, Thu, Fri, Sat, Inv_WeekDay + }; + + // invalid value for the year + enum Year + { + Inv_Year = SHRT_MIN // should hold in wxDateTime_t + }; + + // flags for GetWeekDayName and GetMonthName + enum NameFlags + { + Name_Full = 0x01, // return full name + Name_Abbr = 0x02 // return abbreviated name + }; + + // flags for GetWeekOfYear and GetWeekOfMonth + enum WeekFlags + { + Default_First, // Sunday_First for US, Monday_First for the rest + Monday_First, // week starts with a Monday + Sunday_First // week starts with a Sunday + }; + + // helper classes + // ------------------------------------------------------------------------ + + // a class representing a time zone: basically, this is just an offset + // (in seconds) from GMT + class WXDLLIMPEXP_BASE TimeZone + { + public: + TimeZone(TZ tz); + + // create time zone object with the given offset + TimeZone(long offset = 0) { m_offset = offset; } + + static TimeZone Make(long offset) + { + TimeZone tz; + tz.m_offset = offset; + return tz; + } + + long GetOffset() const { return m_offset; } + + private: + // offset for this timezone from GMT in seconds + long m_offset; + }; + + // standard struct tm is limited to the years from 1900 (because + // tm_year field is the offset from 1900), so we use our own struct + // instead to represent broken down time + // + // NB: this struct should always be kept normalized (i.e. mon should + // be < 12, 1 <= day <= 31 &c), so use AddMonths(), AddDays() + // instead of modifying the member fields directly! + struct WXDLLIMPEXP_BASE Tm + { + wxDateTime_t msec, sec, min, hour, + mday, // Day of the month in 1..31 range. + yday; // Day of the year in 0..365 range. + Month mon; + int year; + + // default ctor inits the object to an invalid value + Tm(); + + // ctor from struct tm and the timezone + Tm(const struct tm& tm, const TimeZone& tz); + + // check that the given date/time is valid (in Gregorian calendar) + bool IsValid() const; + + // get the week day + WeekDay GetWeekDay() // not const because wday may be changed + { + if ( wday == Inv_WeekDay ) + ComputeWeekDay(); + + return (WeekDay)wday; + } + + // add the given number of months to the date keeping it normalized + void AddMonths(int monDiff); + + // add the given number of months to the date keeping it normalized + void AddDays(int dayDiff); + + private: + // compute the weekday from other fields + void ComputeWeekDay(); + + // the timezone we correspond to + TimeZone m_tz; + + // This value can only be accessed via GetWeekDay() and not directly + // because it's not always computed when creating this object and may + // need to be calculated on demand. + wxDateTime_t wday; + }; + + // static methods + // ------------------------------------------------------------------------ + + // set the current country + static void SetCountry(Country country); + // get the current country + static Country GetCountry(); + + // return true if the country is a West European one (in practice, + // this means that the same DST rules as for EEC apply) + static bool IsWestEuropeanCountry(Country country = Country_Default); + + // return the current year + static int GetCurrentYear(Calendar cal = Gregorian); + + // convert the year as returned by wxDateTime::GetYear() to a year + // suitable for BC/AD notation. The difference is that BC year 1 + // corresponds to the year 0 (while BC year 0 didn't exist) and AD + // year N is just year N. + static int ConvertYearToBC(int year); + + // return the current month + static Month GetCurrentMonth(Calendar cal = Gregorian); + + // returns true if the given year is a leap year in the given calendar + static bool IsLeapYear(int year = Inv_Year, Calendar cal = Gregorian); + + // get the century (19 for 1999, 20 for 2000 and -5 for 492 BC) + static int GetCentury(int year); + + // returns the number of days in this year (356 or 355 for Gregorian + // calendar usually :-) + static wxDateTime_t GetNumberOfDays(int year, Calendar cal = Gregorian); + + // get the number of the days in the given month (default value for + // the year means the current one) + static wxDateTime_t GetNumberOfDays(Month month, + int year = Inv_Year, + Calendar cal = Gregorian); + + + // get the full (default) or abbreviated month name in the current + // locale, returns empty string on error + static wxString GetMonthName(Month month, + NameFlags flags = Name_Full); + + // get the standard English full (default) or abbreviated month name + static wxString GetEnglishMonthName(Month month, + NameFlags flags = Name_Full); + + // get the full (default) or abbreviated weekday name in the current + // locale, returns empty string on error + static wxString GetWeekDayName(WeekDay weekday, + NameFlags flags = Name_Full); + + // get the standard English full (default) or abbreviated weekday name + static wxString GetEnglishWeekDayName(WeekDay weekday, + NameFlags flags = Name_Full); + + // get the AM and PM strings in the current locale (may be empty) + static void GetAmPmStrings(wxString *am, wxString *pm); + + // return true if the given country uses DST for this year + static bool IsDSTApplicable(int year = Inv_Year, + Country country = Country_Default); + + // get the beginning of DST for this year, will return invalid object + // if no DST applicable in this year. The default value of the + // parameter means to take the current year. + static wxDateTime GetBeginDST(int year = Inv_Year, + Country country = Country_Default); + // get the end of DST for this year, will return invalid object + // if no DST applicable in this year. The default value of the + // parameter means to take the current year. + static wxDateTime GetEndDST(int year = Inv_Year, + Country country = Country_Default); + + // return the wxDateTime object for the current time + static inline wxDateTime Now(); + + // return the wxDateTime object for the current time with millisecond + // precision (if available on this platform) + static wxDateTime UNow(); + + // return the wxDateTime object for today midnight: i.e. as Now() but + // with time set to 0 + static inline wxDateTime Today(); + + // constructors: you should test whether the constructor succeeded with + // IsValid() function. The values Inv_Month and Inv_Year for the + // parameters mean take current month and/or year values. + // ------------------------------------------------------------------------ + + // default ctor does not initialize the object, use Set()! + wxDateTime() { m_time = wxLongLong(wxINT32_MIN, 0); } + + // from time_t: seconds since the Epoch 00:00:00 UTC, Jan 1, 1970) +#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) +// VA C++ confuses this with wxDateTime(double jdn) thinking it is a duplicate declaration + inline wxDateTime(time_t timet); +#endif + // from broken down time/date (only for standard Unix range) + inline wxDateTime(const struct tm& tm); + // from broken down time/date (any range) + inline wxDateTime(const Tm& tm); + + // from JDN (beware of rounding errors) + inline wxDateTime(double jdn); + + // from separate values for each component, date set to today + inline wxDateTime(wxDateTime_t hour, + wxDateTime_t minute = 0, + wxDateTime_t second = 0, + wxDateTime_t millisec = 0); + // from separate values for each component with explicit date + inline wxDateTime(wxDateTime_t day, // day of the month + Month month, + int year = Inv_Year, // 1999, not 99 please! + wxDateTime_t hour = 0, + wxDateTime_t minute = 0, + wxDateTime_t second = 0, + wxDateTime_t millisec = 0); +#ifdef __WINDOWS__ + wxDateTime(const struct _SYSTEMTIME& st) + { + SetFromMSWSysTime(st); + } +#endif + + // default copy ctor ok + + // no dtor + + // assignment operators and Set() functions: all non const methods return + // the reference to this object. IsValid() should be used to test whether + // the function succeeded. + // ------------------------------------------------------------------------ + + // set to the current time + inline wxDateTime& SetToCurrent(); + +#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) +// VA C++ confuses this with wxDateTime(double jdn) thinking it is a duplicate declaration + // set to given time_t value + inline wxDateTime& Set(time_t timet); +#endif + + // set to given broken down time/date + wxDateTime& Set(const struct tm& tm); + + // set to given broken down time/date + inline wxDateTime& Set(const Tm& tm); + + // set to given JDN (beware of rounding errors) + wxDateTime& Set(double jdn); + + // set to given time, date = today + wxDateTime& Set(wxDateTime_t hour, + wxDateTime_t minute = 0, + wxDateTime_t second = 0, + wxDateTime_t millisec = 0); + + // from separate values for each component with explicit date + // (defaults for month and year are the current values) + wxDateTime& Set(wxDateTime_t day, + Month month, + int year = Inv_Year, // 1999, not 99 please! + wxDateTime_t hour = 0, + wxDateTime_t minute = 0, + wxDateTime_t second = 0, + wxDateTime_t millisec = 0); + + // resets time to 00:00:00, doesn't change the date + wxDateTime& ResetTime(); + + // get the date part of this object only, i.e. the object which has the + // same date as this one but time of 00:00:00 + wxDateTime GetDateOnly() const; + + // the following functions don't change the values of the other + // fields, i.e. SetMinute() won't change either hour or seconds value + + // set the year + wxDateTime& SetYear(int year); + // set the month + wxDateTime& SetMonth(Month month); + // set the day of the month + wxDateTime& SetDay(wxDateTime_t day); + // set hour + wxDateTime& SetHour(wxDateTime_t hour); + // set minute + wxDateTime& SetMinute(wxDateTime_t minute); + // set second + wxDateTime& SetSecond(wxDateTime_t second); + // set millisecond + wxDateTime& SetMillisecond(wxDateTime_t millisecond); + + // assignment operator from time_t + wxDateTime& operator=(time_t timet) { return Set(timet); } + + // assignment operator from broken down time/date + wxDateTime& operator=(const struct tm& tm) { return Set(tm); } + + // assignment operator from broken down time/date + wxDateTime& operator=(const Tm& tm) { return Set(tm); } + + // default assignment operator is ok + + // calendar calculations (functions which set the date only leave the time + // unchanged, e.g. don't explicitly zero it): SetXXX() functions modify the + // object itself, GetXXX() ones return a new object. + // ------------------------------------------------------------------------ + + // set to the given week day in the same week as this one + wxDateTime& SetToWeekDayInSameWeek(WeekDay weekday, + WeekFlags flags = Monday_First); + inline wxDateTime GetWeekDayInSameWeek(WeekDay weekday, + WeekFlags flags = Monday_First) const; + + // set to the next week day following this one + wxDateTime& SetToNextWeekDay(WeekDay weekday); + inline wxDateTime GetNextWeekDay(WeekDay weekday) const; + + // set to the previous week day before this one + wxDateTime& SetToPrevWeekDay(WeekDay weekday); + inline wxDateTime GetPrevWeekDay(WeekDay weekday) const; + + // set to Nth occurrence of given weekday in the given month of the + // given year (time is set to 0), return true on success and false on + // failure. n may be positive (1..5) or negative to count from the end + // of the month (see helper function SetToLastWeekDay()) + bool SetToWeekDay(WeekDay weekday, + int n = 1, + Month month = Inv_Month, + int year = Inv_Year); + inline wxDateTime GetWeekDay(WeekDay weekday, + int n = 1, + Month month = Inv_Month, + int year = Inv_Year) const; + + // sets to the last weekday in the given month, year + inline bool SetToLastWeekDay(WeekDay weekday, + Month month = Inv_Month, + int year = Inv_Year); + inline wxDateTime GetLastWeekDay(WeekDay weekday, + Month month = Inv_Month, + int year = Inv_Year); + +#if WXWIN_COMPATIBILITY_2_6 + // sets the date to the given day of the given week in the year, + // returns true on success and false if given date doesn't exist (e.g. + // numWeek is > 53) + // + // these functions are badly defined as they're not the reverse of + // GetWeekOfYear(), use SetToTheWeekOfYear() instead + wxDEPRECATED( bool SetToTheWeek(wxDateTime_t numWeek, + WeekDay weekday = Mon, + WeekFlags flags = Monday_First) ); + wxDEPRECATED( wxDateTime GetWeek(wxDateTime_t numWeek, + WeekDay weekday = Mon, + WeekFlags flags = Monday_First) const ); +#endif // WXWIN_COMPATIBILITY_2_6 + + // returns the date corresponding to the given week day of the given + // week (in ISO notation) of the specified year + static wxDateTime SetToWeekOfYear(int year, + wxDateTime_t numWeek, + WeekDay weekday = Mon); + + // sets the date to the last day of the given (or current) month or the + // given (or current) year + wxDateTime& SetToLastMonthDay(Month month = Inv_Month, + int year = Inv_Year); + inline wxDateTime GetLastMonthDay(Month month = Inv_Month, + int year = Inv_Year) const; + + // sets to the given year day (1..365 or 366) + wxDateTime& SetToYearDay(wxDateTime_t yday); + inline wxDateTime GetYearDay(wxDateTime_t yday) const; + + // The definitions below were taken verbatim from + // + // http://www.capecod.net/~pbaum/date/date0.htm + // + // (Peter Baum's home page) + // + // definition: The Julian Day Number, Julian Day, or JD of a + // particular instant of time is the number of days and fractions of a + // day since 12 hours Universal Time (Greenwich mean noon) on January + // 1 of the year -4712, where the year is given in the Julian + // proleptic calendar. The idea of using this reference date was + // originally proposed by Joseph Scalizer in 1582 to count years but + // it was modified by 19th century astronomers to count days. One + // could have equivalently defined the reference time to be noon of + // November 24, -4713 if were understood that Gregorian calendar rules + // were applied. Julian days are Julian Day Numbers and are not to be + // confused with Julian dates. + // + // definition: The Rata Die number is a date specified as the number + // of days relative to a base date of December 31 of the year 0. Thus + // January 1 of the year 1 is Rata Die day 1. + + // get the Julian Day number (the fractional part specifies the time of + // the day, related to noon - beware of rounding errors!) + double GetJulianDayNumber() const; + double GetJDN() const { return GetJulianDayNumber(); } + + // get the Modified Julian Day number: it is equal to JDN - 2400000.5 + // and so integral MJDs correspond to the midnights (and not noons). + // MJD 0 is Nov 17, 1858 + double GetModifiedJulianDayNumber() const { return GetJDN() - 2400000.5; } + double GetMJD() const { return GetModifiedJulianDayNumber(); } + + // get the Rata Die number + double GetRataDie() const; + + // TODO algorithms for calculating some important dates, such as + // religious holidays (Easter...) or moon/solar eclipses? Some + // algorithms can be found in the calendar FAQ + + + // Timezone stuff: a wxDateTime object constructed using given + // day/month/year/hour/min/sec values is interpreted as this moment in + // local time. Using the functions below, it may be converted to another + // time zone (e.g., the Unix epoch is wxDateTime(1, Jan, 1970).ToGMT()). + // + // These functions try to handle DST internally, but there is no magical + // way to know all rules for it in all countries in the world, so if the + // program can handle it itself (or doesn't want to handle it at all for + // whatever reason), the DST handling can be disabled with noDST. + // ------------------------------------------------------------------------ + + // transform to any given timezone + inline wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false) const; + wxDateTime& MakeTimezone(const TimeZone& tz, bool noDST = false); + + // interpret current value as being in another timezone and transform + // it to local one + inline wxDateTime FromTimezone(const TimeZone& tz, bool noDST = false) const; + wxDateTime& MakeFromTimezone(const TimeZone& tz, bool noDST = false); + + // transform to/from GMT/UTC + wxDateTime ToUTC(bool noDST = false) const { return ToTimezone(UTC, noDST); } + wxDateTime& MakeUTC(bool noDST = false) { return MakeTimezone(UTC, noDST); } + + wxDateTime ToGMT(bool noDST = false) const { return ToUTC(noDST); } + wxDateTime& MakeGMT(bool noDST = false) { return MakeUTC(noDST); } + + wxDateTime FromUTC(bool noDST = false) const + { return FromTimezone(UTC, noDST); } + wxDateTime& MakeFromUTC(bool noDST = false) + { return MakeFromTimezone(UTC, noDST); } + + // is daylight savings time in effect at this moment according to the + // rules of the specified country? + // + // Return value is > 0 if DST is in effect, 0 if it is not and -1 if + // the information is not available (this is compatible with ANSI C) + int IsDST(Country country = Country_Default) const; + + + // accessors: many of them take the timezone parameter which indicates the + // timezone for which to make the calculations and the default value means + // to do it for the current timezone of this machine (even if the function + // only operates with the date it's necessary because a date may wrap as + // result of timezone shift) + // ------------------------------------------------------------------------ + + // is the date valid? + inline bool IsValid() const { return m_time != wxInvalidDateTime.m_time; } + + // get the broken down date/time representation in the given timezone + // + // If you wish to get several time components (day, month and year), + // consider getting the whole Tm strcuture first and retrieving the + // value from it - this is much more efficient + Tm GetTm(const TimeZone& tz = Local) const; + + // get the number of seconds since the Unix epoch - returns (time_t)-1 + // if the value is out of range + inline time_t GetTicks() const; + + // get the century, same as GetCentury(GetYear()) + int GetCentury(const TimeZone& tz = Local) const + { return GetCentury(GetYear(tz)); } + // get the year (returns Inv_Year if date is invalid) + int GetYear(const TimeZone& tz = Local) const + { return GetTm(tz).year; } + // get the month (Inv_Month if date is invalid) + Month GetMonth(const TimeZone& tz = Local) const + { return (Month)GetTm(tz).mon; } + // get the month day (in 1..31 range, 0 if date is invalid) + wxDateTime_t GetDay(const TimeZone& tz = Local) const + { return GetTm(tz).mday; } + // get the day of the week (Inv_WeekDay if date is invalid) + WeekDay GetWeekDay(const TimeZone& tz = Local) const + { return GetTm(tz).GetWeekDay(); } + // get the hour of the day + wxDateTime_t GetHour(const TimeZone& tz = Local) const + { return GetTm(tz).hour; } + // get the minute + wxDateTime_t GetMinute(const TimeZone& tz = Local) const + { return GetTm(tz).min; } + // get the second + wxDateTime_t GetSecond(const TimeZone& tz = Local) const + { return GetTm(tz).sec; } + // get milliseconds + wxDateTime_t GetMillisecond(const TimeZone& tz = Local) const + { return GetTm(tz).msec; } + + // get the day since the year start (1..366, 0 if date is invalid) + wxDateTime_t GetDayOfYear(const TimeZone& tz = Local) const; + // get the week number since the year start (1..52 or 53, 0 if date is + // invalid) + wxDateTime_t GetWeekOfYear(WeekFlags flags = Monday_First, + const TimeZone& tz = Local) const; + // get the week number since the month start (1..5, 0 if date is + // invalid) + wxDateTime_t GetWeekOfMonth(WeekFlags flags = Monday_First, + const TimeZone& tz = Local) const; + + // is this date a work day? This depends on a country, of course, + // because the holidays are different in different countries + bool IsWorkDay(Country country = Country_Default) const; + + // dos date and time format + // ------------------------------------------------------------------------ + + // set from the DOS packed format + wxDateTime& SetFromDOS(unsigned long ddt); + + // pack the date in DOS format + unsigned long GetAsDOS() const; + + // SYSTEMTIME format + // ------------------------------------------------------------------------ +#ifdef __WINDOWS__ + // convert SYSTEMTIME to wxDateTime + wxDateTime& SetFromMSWSysTime(const struct _SYSTEMTIME& st); + + // convert wxDateTime to SYSTEMTIME + void GetAsMSWSysTime(struct _SYSTEMTIME* st) const; + + // same as above but only take date part into account, time is always zero + wxDateTime& SetFromMSWSysDate(const struct _SYSTEMTIME& st); + void GetAsMSWSysDate(struct _SYSTEMTIME* st) const; +#endif // __WINDOWS__ + + // comparison (see also functions below for operator versions) + // ------------------------------------------------------------------------ + + // returns true if the two moments are strictly identical + inline bool IsEqualTo(const wxDateTime& datetime) const; + + // returns true if the date is strictly earlier than the given one + inline bool IsEarlierThan(const wxDateTime& datetime) const; + + // returns true if the date is strictly later than the given one + inline bool IsLaterThan(const wxDateTime& datetime) const; + + // returns true if the date is strictly in the given range + inline bool IsStrictlyBetween(const wxDateTime& t1, + const wxDateTime& t2) const; + + // returns true if the date is in the given range + inline bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const; + + // do these two objects refer to the same date? + inline bool IsSameDate(const wxDateTime& dt) const; + + // do these two objects have the same time? + inline bool IsSameTime(const wxDateTime& dt) const; + + // are these two objects equal up to given timespan? + inline bool IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const; + + inline bool operator<(const wxDateTime& dt) const + { + wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") ); + return GetValue() < dt.GetValue(); + } + + inline bool operator<=(const wxDateTime& dt) const + { + wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") ); + return GetValue() <= dt.GetValue(); + } + + inline bool operator>(const wxDateTime& dt) const + { + wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") ); + return GetValue() > dt.GetValue(); + } + + inline bool operator>=(const wxDateTime& dt) const + { + wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") ); + return GetValue() >= dt.GetValue(); + } + + inline bool operator==(const wxDateTime& dt) const + { + wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") ); + return GetValue() == dt.GetValue(); + } + + inline bool operator!=(const wxDateTime& dt) const + { + wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") ); + return GetValue() != dt.GetValue(); + } + + // arithmetics with dates (see also below for more operators) + // ------------------------------------------------------------------------ + + // return the sum of the date with a time span (positive or negative) + inline wxDateTime Add(const wxTimeSpan& diff) const; + // add a time span (positive or negative) + inline wxDateTime& Add(const wxTimeSpan& diff); + // add a time span (positive or negative) + inline wxDateTime& operator+=(const wxTimeSpan& diff); + inline wxDateTime operator+(const wxTimeSpan& ts) const + { + wxDateTime dt(*this); + dt.Add(ts); + return dt; + } + + // return the difference of the date with a time span + inline wxDateTime Subtract(const wxTimeSpan& diff) const; + // subtract a time span (positive or negative) + inline wxDateTime& Subtract(const wxTimeSpan& diff); + // subtract a time span (positive or negative) + inline wxDateTime& operator-=(const wxTimeSpan& diff); + inline wxDateTime operator-(const wxTimeSpan& ts) const + { + wxDateTime dt(*this); + dt.Subtract(ts); + return dt; + } + + // return the sum of the date with a date span + inline wxDateTime Add(const wxDateSpan& diff) const; + // add a date span (positive or negative) + wxDateTime& Add(const wxDateSpan& diff); + // add a date span (positive or negative) + inline wxDateTime& operator+=(const wxDateSpan& diff); + inline wxDateTime operator+(const wxDateSpan& ds) const + { + wxDateTime dt(*this); + dt.Add(ds); + return dt; + } + + // return the difference of the date with a date span + inline wxDateTime Subtract(const wxDateSpan& diff) const; + // subtract a date span (positive or negative) + inline wxDateTime& Subtract(const wxDateSpan& diff); + // subtract a date span (positive or negative) + inline wxDateTime& operator-=(const wxDateSpan& diff); + inline wxDateTime operator-(const wxDateSpan& ds) const + { + wxDateTime dt(*this); + dt.Subtract(ds); + return dt; + } + + // return the difference between two dates + inline wxTimeSpan Subtract(const wxDateTime& dt) const; + inline wxTimeSpan operator-(const wxDateTime& dt2) const; + + wxDateSpan DiffAsDateSpan(const wxDateTime& dt) const; + + // conversion to/from text + // ------------------------------------------------------------------------ + + // all conversions functions return true to indicate whether parsing + // succeeded or failed and fill in the provided end iterator, which must + // not be NULL, with the location of the character where the parsing + // stopped (this will be end() of the passed string if everything was + // parsed) + + // parse a string in RFC 822 format (found e.g. in mail headers and + // having the form "Wed, 10 Feb 1999 19:07:07 +0100") + bool ParseRfc822Date(const wxString& date, + wxString::const_iterator *end); + + // parse a date/time in the given format (see strptime(3)), fill in + // the missing (in the string) fields with the values of dateDef (by + // default, they will not change if they had valid values or will + // default to Today() otherwise) + bool ParseFormat(const wxString& date, + const wxString& format, + const wxDateTime& dateDef, + wxString::const_iterator *end); + + bool ParseFormat(const wxString& date, + const wxString& format, + wxString::const_iterator *end) + { + return ParseFormat(date, format, wxDefaultDateTime, end); + } + + bool ParseFormat(const wxString& date, + wxString::const_iterator *end) + { + return ParseFormat(date, wxDefaultDateTimeFormat, wxDefaultDateTime, end); + } + + // parse a string containing date, time or both in ISO 8601 format + // + // notice that these functions are new in wx 3.0 and so we don't + // provide compatibility overloads for them + bool ParseISODate(const wxString& date) + { + wxString::const_iterator end; + return ParseFormat(date, wxS("%Y-%m-%d"), &end) && end == date.end(); + } + + bool ParseISOTime(const wxString& time) + { + wxString::const_iterator end; + return ParseFormat(time, wxS("%H:%M:%S"), &end) && end == time.end(); + } + + bool ParseISOCombined(const wxString& datetime, char sep = 'T') + { + wxString::const_iterator end; + const wxString fmt = wxS("%Y-%m-%d") + wxString(sep) + wxS("%H:%M:%S"); + return ParseFormat(datetime, fmt, &end) && end == datetime.end(); + } + + // parse a string containing the date/time in "free" format, this + // function will try to make an educated guess at the string contents + bool ParseDateTime(const wxString& datetime, + wxString::const_iterator *end); + + // parse a string containing the date only in "free" format (less + // flexible than ParseDateTime) + bool ParseDate(const wxString& date, + wxString::const_iterator *end); + + // parse a string containing the time only in "free" format + bool ParseTime(const wxString& time, + wxString::const_iterator *end); + + + // this function accepts strftime()-like format string (default + // argument corresponds to the preferred date and time representation + // for the current locale) and returns the string containing the + // resulting text representation + wxString Format(const wxString& format = wxDefaultDateTimeFormat, + const TimeZone& tz = Local) const; + // preferred date representation for the current locale + wxString FormatDate() const { return Format(wxS("%x")); } + // preferred time representation for the current locale + wxString FormatTime() const { return Format(wxS("%X")); } + // returns the string representing the date in ISO 8601 format + // (YYYY-MM-DD) + wxString FormatISODate() const { return Format(wxS("%Y-%m-%d")); } + // returns the string representing the time in ISO 8601 format + // (HH:MM:SS) + wxString FormatISOTime() const { return Format(wxS("%H:%M:%S")); } + // return the combined date time representation in ISO 8601 format; the + // separator character should be 'T' according to the standard but it + // can also be useful to set it to ' ' + wxString FormatISOCombined(char sep = 'T') const + { return FormatISODate() + sep + FormatISOTime(); } + + + // backwards compatible versions of the parsing functions: they return an + // object representing the next character following the date specification + // (i.e. the one where the scan had to stop) or a special NULL-like object + // on failure + // + // they're not deprecated because a lot of existing code uses them and + // there is no particular harm in keeping them but you should still prefer + // the versions above in the new code + wxAnyStrPtr ParseRfc822Date(const wxString& date) + { + wxString::const_iterator end; + return ParseRfc822Date(date, &end) ? wxAnyStrPtr(date, end) + : wxAnyStrPtr(); + } + + wxAnyStrPtr ParseFormat(const wxString& date, + const wxString& format = wxDefaultDateTimeFormat, + const wxDateTime& dateDef = wxDefaultDateTime) + { + wxString::const_iterator end; + return ParseFormat(date, format, dateDef, &end) ? wxAnyStrPtr(date, end) + : wxAnyStrPtr(); + } + + wxAnyStrPtr ParseDateTime(const wxString& datetime) + { + wxString::const_iterator end; + return ParseDateTime(datetime, &end) ? wxAnyStrPtr(datetime, end) + : wxAnyStrPtr(); + } + + wxAnyStrPtr ParseDate(const wxString& date) + { + wxString::const_iterator end; + return ParseDate(date, &end) ? wxAnyStrPtr(date, end) + : wxAnyStrPtr(); + } + + wxAnyStrPtr ParseTime(const wxString& time) + { + wxString::const_iterator end; + return ParseTime(time, &end) ? wxAnyStrPtr(time, end) + : wxAnyStrPtr(); + } + + // In addition to wxAnyStrPtr versions above we also must provide the + // overloads for C strings as we must return a pointer into the original + // string and not inside a temporary wxString which would have been created + // if the overloads above were used. + // + // And then we also have to provide the overloads for wxCStrData, as usual. + // Unfortunately those ones can't return anything as we don't have any + // sufficiently long-lived wxAnyStrPtr to return from them: any temporary + // strings it would point to would be destroyed when this function returns + // making it impossible to dereference the return value. So we just don't + // return anything from here which at least allows to keep compatibility + // with the code not testing the return value. Other uses of this method + // need to be converted to use one of the new bool-returning overloads + // above. + void ParseRfc822Date(const wxCStrData& date) + { ParseRfc822Date(wxString(date)); } + const char* ParseRfc822Date(const char* date); + const wchar_t* ParseRfc822Date(const wchar_t* date); + + void ParseFormat(const wxCStrData& date, + const wxString& format = wxDefaultDateTimeFormat, + const wxDateTime& dateDef = wxDefaultDateTime) + { ParseFormat(wxString(date), format, dateDef); } + const char* ParseFormat(const char* date, + const wxString& format = wxDefaultDateTimeFormat, + const wxDateTime& dateDef = wxDefaultDateTime); + const wchar_t* ParseFormat(const wchar_t* date, + const wxString& format = wxDefaultDateTimeFormat, + const wxDateTime& dateDef = wxDefaultDateTime); + + void ParseDateTime(const wxCStrData& datetime) + { ParseDateTime(wxString(datetime)); } + const char* ParseDateTime(const char* datetime); + const wchar_t* ParseDateTime(const wchar_t* datetime); + + void ParseDate(const wxCStrData& date) + { ParseDate(wxString(date)); } + const char* ParseDate(const char* date); + const wchar_t* ParseDate(const wchar_t* date); + + void ParseTime(const wxCStrData& time) + { ParseTime(wxString(time)); } + const char* ParseTime(const char* time); + const wchar_t* ParseTime(const wchar_t* time); + + + // implementation + // ------------------------------------------------------------------------ + + // construct from internal representation + wxDateTime(const wxLongLong& time) { m_time = time; } + + // get the internal representation + inline wxLongLong GetValue() const; + + // a helper function to get the current time_t + static time_t GetTimeNow() { return time(NULL); } + + // another one to get the current time broken down + static struct tm *GetTmNow() + { + static struct tm l_CurrentTime; + return GetTmNow(&l_CurrentTime); + } + + // get current time using thread-safe function + static struct tm *GetTmNow(struct tm *tmstruct); + +private: + // the current country - as it's the same for all program objects (unless + // it runs on a _really_ big cluster system :-), this is a static member: + // see SetCountry() and GetCountry() + static Country ms_country; + + // this constant is used to transform a time_t value to the internal + // representation, as time_t is in seconds and we use milliseconds it's + // fixed to 1000 + static const long TIME_T_FACTOR; + + // returns true if we fall in range in which we can use standard ANSI C + // functions + inline bool IsInStdRange() const; + + // the internal representation of the time is the amount of milliseconds + // elapsed since the origin which is set by convention to the UNIX/C epoch + // value: the midnight of January 1, 1970 (UTC) + wxLongLong m_time; +}; + +// ---------------------------------------------------------------------------- +// This class contains a difference between 2 wxDateTime values, so it makes +// sense to add it to wxDateTime and it is the result of subtraction of 2 +// objects of that class. See also wxDateSpan. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxTimeSpan +{ +public: + // constructors + // ------------------------------------------------------------------------ + + // return the timespan for the given number of milliseconds + static wxTimeSpan Milliseconds(wxLongLong ms) { return wxTimeSpan(0, 0, 0, ms); } + static wxTimeSpan Millisecond() { return Milliseconds(1); } + + // return the timespan for the given number of seconds + static wxTimeSpan Seconds(wxLongLong sec) { return wxTimeSpan(0, 0, sec); } + static wxTimeSpan Second() { return Seconds(1); } + + // return the timespan for the given number of minutes + static wxTimeSpan Minutes(long min) { return wxTimeSpan(0, min, 0 ); } + static wxTimeSpan Minute() { return Minutes(1); } + + // return the timespan for the given number of hours + static wxTimeSpan Hours(long hours) { return wxTimeSpan(hours, 0, 0); } + static wxTimeSpan Hour() { return Hours(1); } + + // return the timespan for the given number of days + static wxTimeSpan Days(long days) { return Hours(24 * days); } + static wxTimeSpan Day() { return Days(1); } + + // return the timespan for the given number of weeks + static wxTimeSpan Weeks(long days) { return Days(7 * days); } + static wxTimeSpan Week() { return Weeks(1); } + + // default ctor constructs the 0 time span + wxTimeSpan() { } + + // from separate values for each component, date set to 0 (hours are + // not restricted to 0..24 range, neither are minutes, seconds or + // milliseconds) + inline wxTimeSpan(long hours, + long minutes = 0, + wxLongLong seconds = 0, + wxLongLong milliseconds = 0); + + // default copy ctor is ok + + // no dtor + + // arithmetics with time spans (see also below for more operators) + // ------------------------------------------------------------------------ + + // return the sum of two timespans + inline wxTimeSpan Add(const wxTimeSpan& diff) const; + // add two timespans together + inline wxTimeSpan& Add(const wxTimeSpan& diff); + // add two timespans together + wxTimeSpan& operator+=(const wxTimeSpan& diff) { return Add(diff); } + inline wxTimeSpan operator+(const wxTimeSpan& ts) const + { + return wxTimeSpan(GetValue() + ts.GetValue()); + } + + // return the difference of two timespans + inline wxTimeSpan Subtract(const wxTimeSpan& diff) const; + // subtract another timespan + inline wxTimeSpan& Subtract(const wxTimeSpan& diff); + // subtract another timespan + wxTimeSpan& operator-=(const wxTimeSpan& diff) { return Subtract(diff); } + inline wxTimeSpan operator-(const wxTimeSpan& ts) + { + return wxTimeSpan(GetValue() - ts.GetValue()); + } + + // multiply timespan by a scalar + inline wxTimeSpan Multiply(int n) const; + // multiply timespan by a scalar + inline wxTimeSpan& Multiply(int n); + // multiply timespan by a scalar + wxTimeSpan& operator*=(int n) { return Multiply(n); } + inline wxTimeSpan operator*(int n) const + { + return wxTimeSpan(*this).Multiply(n); + } + + // return this timespan with opposite sign + wxTimeSpan Negate() const { return wxTimeSpan(-GetValue()); } + // negate the value of the timespan + wxTimeSpan& Neg() { m_diff = -GetValue(); return *this; } + // negate the value of the timespan + wxTimeSpan& operator-() { return Neg(); } + + // return the absolute value of the timespan: does _not_ modify the + // object + inline wxTimeSpan Abs() const; + + // there is intentionally no division because we don't want to + // introduce rounding errors in time calculations + + // comparaison (see also operator versions below) + // ------------------------------------------------------------------------ + + // is the timespan null? + bool IsNull() const { return m_diff == 0l; } + // returns true if the timespan is null + bool operator!() const { return !IsNull(); } + + // is the timespan positive? + bool IsPositive() const { return m_diff > 0l; } + + // is the timespan negative? + bool IsNegative() const { return m_diff < 0l; } + + // are two timespans equal? + inline bool IsEqualTo(const wxTimeSpan& ts) const; + // compare two timestamps: works with the absolute values, i.e. -2 + // hours is longer than 1 hour. Also, it will return false if the + // timespans are equal in absolute value. + inline bool IsLongerThan(const wxTimeSpan& ts) const; + // compare two timestamps: works with the absolute values, i.e. 1 + // hour is shorter than -2 hours. Also, it will return false if the + // timespans are equal in absolute value. + bool IsShorterThan(const wxTimeSpan& t) const; + + inline bool operator<(const wxTimeSpan &ts) const + { + return GetValue() < ts.GetValue(); + } + + inline bool operator<=(const wxTimeSpan &ts) const + { + return GetValue() <= ts.GetValue(); + } + + inline bool operator>(const wxTimeSpan &ts) const + { + return GetValue() > ts.GetValue(); + } + + inline bool operator>=(const wxTimeSpan &ts) const + { + return GetValue() >= ts.GetValue(); + } + + inline bool operator==(const wxTimeSpan &ts) const + { + return GetValue() == ts.GetValue(); + } + + inline bool operator!=(const wxTimeSpan &ts) const + { + return GetValue() != ts.GetValue(); + } + + // breaking into days, hours, minutes and seconds + // ------------------------------------------------------------------------ + + // get the max number of weeks in this timespan + inline int GetWeeks() const; + // get the max number of days in this timespan + inline int GetDays() const; + // get the max number of hours in this timespan + inline int GetHours() const; + // get the max number of minutes in this timespan + inline int GetMinutes() const; + // get the max number of seconds in this timespan + inline wxLongLong GetSeconds() const; + // get the number of milliseconds in this timespan + wxLongLong GetMilliseconds() const { return m_diff; } + + // conversion to text + // ------------------------------------------------------------------------ + + // this function accepts strftime()-like format string (default + // argument corresponds to the preferred date and time representation + // for the current locale) and returns the string containing the + // resulting text representation. Notice that only some of format + // specifiers valid for wxDateTime are valid for wxTimeSpan: hours, + // minutes and seconds make sense, but not "PM/AM" string for example. + wxString Format(const wxString& format = wxDefaultTimeSpanFormat) const; + + // implementation + // ------------------------------------------------------------------------ + + // construct from internal representation + wxTimeSpan(const wxLongLong& diff) { m_diff = diff; } + + // get the internal representation + wxLongLong GetValue() const { return m_diff; } + +private: + // the (signed) time span in milliseconds + wxLongLong m_diff; +}; + +// ---------------------------------------------------------------------------- +// This class is a "logical time span" and is useful for implementing program +// logic for such things as "add one month to the date" which, in general, +// doesn't mean to add 60*60*24*31 seconds to it, but to take the same date +// the next month (to understand that this is indeed different consider adding +// one month to Feb, 15 - we want to get Mar, 15, of course). +// +// When adding a month to the date, all lesser components (days, hours, ...) +// won't be changed unless the resulting date would be invalid: for example, +// Jan 31 + 1 month will be Feb 28, not (non existing) Feb 31. +// +// Because of this feature, adding and subtracting back again the same +// wxDateSpan will *not*, in general give back the original date: Feb 28 - 1 +// month will be Jan 28, not Jan 31! +// +// wxDateSpan can be either positive or negative. They may be +// multiplied by scalars which multiply all deltas by the scalar: i.e. 2*(1 +// month and 1 day) is 2 months and 2 days. They can be added together and +// with wxDateTime or wxTimeSpan, but the type of result is different for each +// case. +// +// Beware about weeks: if you specify both weeks and days, the total number of +// days added will be 7*weeks + days! See also GetTotalDays() function. +// +// Equality operators are defined for wxDateSpans. Two datespans are equal if +// they both give the same target date when added to *every* source date. +// Thus wxDateSpan::Months(1) is not equal to wxDateSpan::Days(30), because +// they not give the same date when added to 1 Feb. But wxDateSpan::Days(14) is +// equal to wxDateSpan::Weeks(2) +// +// Finally, notice that for adding hours, minutes &c you don't need this +// class: wxTimeSpan will do the job because there are no subtleties +// associated with those. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxDateSpan +{ +public: + // constructors + // ------------------------------------------------------------------------ + + // this many years/months/weeks/days + wxDateSpan(int years = 0, int months = 0, int weeks = 0, int days = 0) + { + m_years = years; + m_months = months; + m_weeks = weeks; + m_days = days; + } + + // get an object for the given number of days + static wxDateSpan Days(int days) { return wxDateSpan(0, 0, 0, days); } + static wxDateSpan Day() { return Days(1); } + + // get an object for the given number of weeks + static wxDateSpan Weeks(int weeks) { return wxDateSpan(0, 0, weeks, 0); } + static wxDateSpan Week() { return Weeks(1); } + + // get an object for the given number of months + static wxDateSpan Months(int mon) { return wxDateSpan(0, mon, 0, 0); } + static wxDateSpan Month() { return Months(1); } + + // get an object for the given number of years + static wxDateSpan Years(int years) { return wxDateSpan(years, 0, 0, 0); } + static wxDateSpan Year() { return Years(1); } + + // default copy ctor is ok + + // no dtor + + // accessors (all SetXXX() return the (modified) wxDateSpan object) + // ------------------------------------------------------------------------ + + // set number of years + wxDateSpan& SetYears(int n) { m_years = n; return *this; } + // set number of months + wxDateSpan& SetMonths(int n) { m_months = n; return *this; } + // set number of weeks + wxDateSpan& SetWeeks(int n) { m_weeks = n; return *this; } + // set number of days + wxDateSpan& SetDays(int n) { m_days = n; return *this; } + + // get number of years + int GetYears() const { return m_years; } + // get number of months + int GetMonths() const { return m_months; } + // returns 12*GetYears() + GetMonths() + int GetTotalMonths() const { return 12*m_years + m_months; } + // get number of weeks + int GetWeeks() const { return m_weeks; } + // get number of days + int GetDays() const { return m_days; } + // returns 7*GetWeeks() + GetDays() + int GetTotalDays() const { return 7*m_weeks + m_days; } + + // arithmetics with date spans (see also below for more operators) + // ------------------------------------------------------------------------ + + // return sum of two date spans + inline wxDateSpan Add(const wxDateSpan& other) const; + // add another wxDateSpan to us + inline wxDateSpan& Add(const wxDateSpan& other); + // add another wxDateSpan to us + inline wxDateSpan& operator+=(const wxDateSpan& other); + inline wxDateSpan operator+(const wxDateSpan& ds) const + { + return wxDateSpan(GetYears() + ds.GetYears(), + GetMonths() + ds.GetMonths(), + GetWeeks() + ds.GetWeeks(), + GetDays() + ds.GetDays()); + } + + // return difference of two date spans + inline wxDateSpan Subtract(const wxDateSpan& other) const; + // subtract another wxDateSpan from us + inline wxDateSpan& Subtract(const wxDateSpan& other); + // subtract another wxDateSpan from us + inline wxDateSpan& operator-=(const wxDateSpan& other); + inline wxDateSpan operator-(const wxDateSpan& ds) const + { + return wxDateSpan(GetYears() - ds.GetYears(), + GetMonths() - ds.GetMonths(), + GetWeeks() - ds.GetWeeks(), + GetDays() - ds.GetDays()); + } + + // return a copy of this time span with changed sign + inline wxDateSpan Negate() const; + // inverse the sign of this timespan + inline wxDateSpan& Neg(); + // inverse the sign of this timespan + wxDateSpan& operator-() { return Neg(); } + + // return the date span proportional to this one with given factor + inline wxDateSpan Multiply(int factor) const; + // multiply all components by a (signed) number + inline wxDateSpan& Multiply(int factor); + // multiply all components by a (signed) number + inline wxDateSpan& operator*=(int factor) { return Multiply(factor); } + inline wxDateSpan operator*(int n) const + { + return wxDateSpan(*this).Multiply(n); + } + + // ds1 == d2 if and only if for every wxDateTime t t + ds1 == t + ds2 + inline bool operator==(const wxDateSpan& ds) const + { + return GetYears() == ds.GetYears() && + GetMonths() == ds.GetMonths() && + GetTotalDays() == ds.GetTotalDays(); + } + + inline bool operator!=(const wxDateSpan& ds) const + { + return !(*this == ds); + } + +private: + int m_years, + m_months, + m_weeks, + m_days; +}; + +// ---------------------------------------------------------------------------- +// wxDateTimeArray: array of dates. +// ---------------------------------------------------------------------------- + +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDateTime, wxDateTimeArray, WXDLLIMPEXP_BASE); + +// ---------------------------------------------------------------------------- +// wxDateTimeHolidayAuthority: an object of this class will decide whether a +// given date is a holiday and is used by all functions working with "work +// days". +// +// NB: the base class is an ABC, derived classes must implement the pure +// virtual methods to work with the holidays they correspond to. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxDateTimeHolidayAuthority; +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxDateTimeHolidayAuthority *, + wxHolidayAuthoritiesArray, + class WXDLLIMPEXP_BASE); + +class wxDateTimeHolidaysModule; +class WXDLLIMPEXP_BASE wxDateTimeHolidayAuthority +{ +friend class wxDateTimeHolidaysModule; +public: + // returns true if the given date is a holiday + static bool IsHoliday(const wxDateTime& dt); + + // fills the provided array with all holidays in the given range, returns + // the number of them + static size_t GetHolidaysInRange(const wxDateTime& dtStart, + const wxDateTime& dtEnd, + wxDateTimeArray& holidays); + + // clear the list of holiday authorities + static void ClearAllAuthorities(); + + // add a new holiday authority (the pointer will be deleted by + // wxDateTimeHolidayAuthority) + static void AddAuthority(wxDateTimeHolidayAuthority *auth); + + // the base class must have a virtual dtor + virtual ~wxDateTimeHolidayAuthority(); + +protected: + // this function is called to determine whether a given day is a holiday + virtual bool DoIsHoliday(const wxDateTime& dt) const = 0; + + // this function should fill the array with all holidays between the two + // given dates - it is implemented in the base class, but in a very + // inefficient way (it just iterates over all days and uses IsHoliday() for + // each of them), so it must be overridden in the derived class where the + // base class version may be explicitly used if needed + // + // returns the number of holidays in the given range and fills holidays + // array + virtual size_t DoGetHolidaysInRange(const wxDateTime& dtStart, + const wxDateTime& dtEnd, + wxDateTimeArray& holidays) const = 0; + +private: + // all holiday authorities + static wxHolidayAuthoritiesArray ms_authorities; +}; + +// the holidays for this class are all Saturdays and Sundays +class WXDLLIMPEXP_BASE wxDateTimeWorkDays : public wxDateTimeHolidayAuthority +{ +protected: + virtual bool DoIsHoliday(const wxDateTime& dt) const; + virtual size_t DoGetHolidaysInRange(const wxDateTime& dtStart, + const wxDateTime& dtEnd, + wxDateTimeArray& holidays) const; +}; + +// ============================================================================ +// inline functions implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// private macros +// ---------------------------------------------------------------------------- + +#define MILLISECONDS_PER_DAY 86400000l + +// some broken compilers (HP-UX CC) refuse to compile the "normal" version, but +// using a temp variable always might prevent other compilers from optimising +// it away - hence use of this ugly macro +#ifndef __HPUX__ + #define MODIFY_AND_RETURN(op) return wxDateTime(*this).op +#else + #define MODIFY_AND_RETURN(op) wxDateTime dt(*this); dt.op; return dt +#endif + +// ---------------------------------------------------------------------------- +// wxDateTime construction +// ---------------------------------------------------------------------------- + +inline bool wxDateTime::IsInStdRange() const +{ + // currently we don't know what is the real type of time_t so prefer to err + // on the safe side and limit it to 32 bit values which is safe everywhere + return m_time >= 0l && (m_time / TIME_T_FACTOR) < wxINT32_MAX; +} + +/* static */ +inline wxDateTime wxDateTime::Now() +{ + struct tm tmstruct; + return wxDateTime(*GetTmNow(&tmstruct)); +} + +/* static */ +inline wxDateTime wxDateTime::Today() +{ + wxDateTime dt(Now()); + dt.ResetTime(); + + return dt; +} + +#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) +inline wxDateTime& wxDateTime::Set(time_t timet) +{ + if ( timet == (time_t)-1 ) + { + m_time = wxInvalidDateTime.m_time; + } + else + { + // assign first to avoid long multiplication overflow! + m_time = timet - WX_TIME_BASE_OFFSET; + m_time *= TIME_T_FACTOR; + } + + return *this; +} +#endif + +inline wxDateTime& wxDateTime::SetToCurrent() +{ + *this = Now(); + return *this; +} + +#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) +inline wxDateTime::wxDateTime(time_t timet) +{ + Set(timet); +} +#endif + +inline wxDateTime::wxDateTime(const struct tm& tm) +{ + Set(tm); +} + +inline wxDateTime::wxDateTime(const Tm& tm) +{ + Set(tm); +} + +inline wxDateTime::wxDateTime(double jdn) +{ + Set(jdn); +} + +inline wxDateTime& wxDateTime::Set(const Tm& tm) +{ + wxASSERT_MSG( tm.IsValid(), wxT("invalid broken down date/time") ); + + return Set(tm.mday, (Month)tm.mon, tm.year, + tm.hour, tm.min, tm.sec, tm.msec); +} + +inline wxDateTime::wxDateTime(wxDateTime_t hour, + wxDateTime_t minute, + wxDateTime_t second, + wxDateTime_t millisec) +{ + Set(hour, minute, second, millisec); +} + +inline wxDateTime::wxDateTime(wxDateTime_t day, + Month month, + int year, + wxDateTime_t hour, + wxDateTime_t minute, + wxDateTime_t second, + wxDateTime_t millisec) +{ + Set(day, month, year, hour, minute, second, millisec); +} + +// ---------------------------------------------------------------------------- +// wxDateTime accessors +// ---------------------------------------------------------------------------- + +inline wxLongLong wxDateTime::GetValue() const +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime")); + + return m_time; +} + +inline time_t wxDateTime::GetTicks() const +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime")); + if ( !IsInStdRange() ) + { + return (time_t)-1; + } + + return (time_t)((m_time / (long)TIME_T_FACTOR).ToLong()) + WX_TIME_BASE_OFFSET; +} + +inline bool wxDateTime::SetToLastWeekDay(WeekDay weekday, + Month month, + int year) +{ + return SetToWeekDay(weekday, -1, month, year); +} + +inline wxDateTime +wxDateTime::GetWeekDayInSameWeek(WeekDay weekday, + WeekFlags WXUNUSED(flags)) const +{ + MODIFY_AND_RETURN( SetToWeekDayInSameWeek(weekday) ); +} + +inline wxDateTime wxDateTime::GetNextWeekDay(WeekDay weekday) const +{ + MODIFY_AND_RETURN( SetToNextWeekDay(weekday) ); +} + +inline wxDateTime wxDateTime::GetPrevWeekDay(WeekDay weekday) const +{ + MODIFY_AND_RETURN( SetToPrevWeekDay(weekday) ); +} + +inline wxDateTime wxDateTime::GetWeekDay(WeekDay weekday, + int n, + Month month, + int year) const +{ + wxDateTime dt(*this); + + return dt.SetToWeekDay(weekday, n, month, year) ? dt : wxInvalidDateTime; +} + +inline wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday, + Month month, + int year) +{ + wxDateTime dt(*this); + + return dt.SetToLastWeekDay(weekday, month, year) ? dt : wxInvalidDateTime; +} + +inline wxDateTime wxDateTime::GetLastMonthDay(Month month, int year) const +{ + MODIFY_AND_RETURN( SetToLastMonthDay(month, year) ); +} + +inline wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const +{ + MODIFY_AND_RETURN( SetToYearDay(yday) ); +} + +// ---------------------------------------------------------------------------- +// wxDateTime comparison +// ---------------------------------------------------------------------------- + +inline bool wxDateTime::IsEqualTo(const wxDateTime& datetime) const +{ + wxASSERT_MSG( IsValid() && datetime.IsValid(), wxT("invalid wxDateTime")); + + return m_time == datetime.m_time; +} + +inline bool wxDateTime::IsEarlierThan(const wxDateTime& datetime) const +{ + wxASSERT_MSG( IsValid() && datetime.IsValid(), wxT("invalid wxDateTime")); + + return m_time < datetime.m_time; +} + +inline bool wxDateTime::IsLaterThan(const wxDateTime& datetime) const +{ + wxASSERT_MSG( IsValid() && datetime.IsValid(), wxT("invalid wxDateTime")); + + return m_time > datetime.m_time; +} + +inline bool wxDateTime::IsStrictlyBetween(const wxDateTime& t1, + const wxDateTime& t2) const +{ + // no need for assert, will be checked by the functions we call + return IsLaterThan(t1) && IsEarlierThan(t2); +} + +inline bool wxDateTime::IsBetween(const wxDateTime& t1, + const wxDateTime& t2) const +{ + // no need for assert, will be checked by the functions we call + return IsEqualTo(t1) || IsEqualTo(t2) || IsStrictlyBetween(t1, t2); +} + +inline bool wxDateTime::IsSameDate(const wxDateTime& dt) const +{ + Tm tm1 = GetTm(), + tm2 = dt.GetTm(); + + return tm1.year == tm2.year && + tm1.mon == tm2.mon && + tm1.mday == tm2.mday; +} + +inline bool wxDateTime::IsSameTime(const wxDateTime& dt) const +{ + // notice that we can't do something like this: + // + // m_time % MILLISECONDS_PER_DAY == dt.m_time % MILLISECONDS_PER_DAY + // + // because we have also to deal with (possibly) different DST settings! + Tm tm1 = GetTm(), + tm2 = dt.GetTm(); + + return tm1.hour == tm2.hour && + tm1.min == tm2.min && + tm1.sec == tm2.sec && + tm1.msec == tm2.msec; +} + +inline bool wxDateTime::IsEqualUpTo(const wxDateTime& dt, + const wxTimeSpan& ts) const +{ + return IsBetween(dt.Subtract(ts), dt.Add(ts)); +} + +// ---------------------------------------------------------------------------- +// wxDateTime arithmetics +// ---------------------------------------------------------------------------- + +inline wxDateTime wxDateTime::Add(const wxTimeSpan& diff) const +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime")); + + return wxDateTime(m_time + diff.GetValue()); +} + +inline wxDateTime& wxDateTime::Add(const wxTimeSpan& diff) +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime")); + + m_time += diff.GetValue(); + + return *this; +} + +inline wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff) +{ + return Add(diff); +} + +inline wxDateTime wxDateTime::Subtract(const wxTimeSpan& diff) const +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime")); + + return wxDateTime(m_time - diff.GetValue()); +} + +inline wxDateTime& wxDateTime::Subtract(const wxTimeSpan& diff) +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime")); + + m_time -= diff.GetValue(); + + return *this; +} + +inline wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff) +{ + return Subtract(diff); +} + +inline wxTimeSpan wxDateTime::Subtract(const wxDateTime& datetime) const +{ + wxASSERT_MSG( IsValid() && datetime.IsValid(), wxT("invalid wxDateTime")); + + return wxTimeSpan(GetValue() - datetime.GetValue()); +} + +inline wxTimeSpan wxDateTime::operator-(const wxDateTime& dt2) const +{ + return this->Subtract(dt2); +} + +inline wxDateTime wxDateTime::Add(const wxDateSpan& diff) const +{ + return wxDateTime(*this).Add(diff); +} + +inline wxDateTime& wxDateTime::Subtract(const wxDateSpan& diff) +{ + return Add(diff.Negate()); +} + +inline wxDateTime wxDateTime::Subtract(const wxDateSpan& diff) const +{ + return wxDateTime(*this).Subtract(diff); +} + +inline wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff) +{ + return Subtract(diff); +} + +inline wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff) +{ + return Add(diff); +} + +// ---------------------------------------------------------------------------- +// wxDateTime and timezones +// ---------------------------------------------------------------------------- + +inline wxDateTime +wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz, bool noDST) const +{ + MODIFY_AND_RETURN( MakeTimezone(tz, noDST) ); +} + +inline wxDateTime +wxDateTime::FromTimezone(const wxDateTime::TimeZone& tz, bool noDST) const +{ + MODIFY_AND_RETURN( MakeFromTimezone(tz, noDST) ); +} + +// ---------------------------------------------------------------------------- +// wxTimeSpan construction +// ---------------------------------------------------------------------------- + +inline wxTimeSpan::wxTimeSpan(long hours, + long minutes, + wxLongLong seconds, + wxLongLong milliseconds) +{ + // assign first to avoid precision loss + m_diff = hours; + m_diff *= 60l; + m_diff += minutes; + m_diff *= 60l; + m_diff += seconds; + m_diff *= 1000l; + m_diff += milliseconds; +} + +// ---------------------------------------------------------------------------- +// wxTimeSpan accessors +// ---------------------------------------------------------------------------- + +inline wxLongLong wxTimeSpan::GetSeconds() const +{ + return m_diff / 1000l; +} + +inline int wxTimeSpan::GetMinutes() const +{ + // For compatibility, this method (and the other accessors) return int, + // even though GetLo() actually returns unsigned long with greater range. + return static_cast((GetSeconds() / 60l).GetLo()); +} + +inline int wxTimeSpan::GetHours() const +{ + return GetMinutes() / 60; +} + +inline int wxTimeSpan::GetDays() const +{ + return GetHours() / 24; +} + +inline int wxTimeSpan::GetWeeks() const +{ + return GetDays() / 7; +} + +// ---------------------------------------------------------------------------- +// wxTimeSpan arithmetics +// ---------------------------------------------------------------------------- + +inline wxTimeSpan wxTimeSpan::Add(const wxTimeSpan& diff) const +{ + return wxTimeSpan(m_diff + diff.GetValue()); +} + +inline wxTimeSpan& wxTimeSpan::Add(const wxTimeSpan& diff) +{ + m_diff += diff.GetValue(); + + return *this; +} + +inline wxTimeSpan wxTimeSpan::Subtract(const wxTimeSpan& diff) const +{ + return wxTimeSpan(m_diff - diff.GetValue()); +} + +inline wxTimeSpan& wxTimeSpan::Subtract(const wxTimeSpan& diff) +{ + m_diff -= diff.GetValue(); + + return *this; +} + +inline wxTimeSpan& wxTimeSpan::Multiply(int n) +{ + m_diff *= (long)n; + + return *this; +} + +inline wxTimeSpan wxTimeSpan::Multiply(int n) const +{ + return wxTimeSpan(m_diff * (long)n); +} + +inline wxTimeSpan wxTimeSpan::Abs() const +{ + return wxTimeSpan(GetValue().Abs()); +} + +inline bool wxTimeSpan::IsEqualTo(const wxTimeSpan& ts) const +{ + return GetValue() == ts.GetValue(); +} + +inline bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const +{ + return GetValue().Abs() > ts.GetValue().Abs(); +} + +inline bool wxTimeSpan::IsShorterThan(const wxTimeSpan& ts) const +{ + return GetValue().Abs() < ts.GetValue().Abs(); +} + +// ---------------------------------------------------------------------------- +// wxDateSpan +// ---------------------------------------------------------------------------- + +inline wxDateSpan& wxDateSpan::operator+=(const wxDateSpan& other) +{ + m_years += other.m_years; + m_months += other.m_months; + m_weeks += other.m_weeks; + m_days += other.m_days; + + return *this; +} + +inline wxDateSpan& wxDateSpan::Add(const wxDateSpan& other) +{ + return *this += other; +} + +inline wxDateSpan wxDateSpan::Add(const wxDateSpan& other) const +{ + wxDateSpan ds(*this); + ds.Add(other); + return ds; +} + +inline wxDateSpan& wxDateSpan::Multiply(int factor) +{ + m_years *= factor; + m_months *= factor; + m_weeks *= factor; + m_days *= factor; + + return *this; +} + +inline wxDateSpan wxDateSpan::Multiply(int factor) const +{ + wxDateSpan ds(*this); + ds.Multiply(factor); + return ds; +} + +inline wxDateSpan wxDateSpan::Negate() const +{ + return wxDateSpan(-m_years, -m_months, -m_weeks, -m_days); +} + +inline wxDateSpan& wxDateSpan::Neg() +{ + m_years = -m_years; + m_months = -m_months; + m_weeks = -m_weeks; + m_days = -m_days; + + return *this; +} + +inline wxDateSpan& wxDateSpan::operator-=(const wxDateSpan& other) +{ + return *this += other.Negate(); +} + +inline wxDateSpan& wxDateSpan::Subtract(const wxDateSpan& other) +{ + return *this -= other; +} + +inline wxDateSpan wxDateSpan::Subtract(const wxDateSpan& other) const +{ + wxDateSpan ds(*this); + ds.Subtract(other); + return ds; +} + +#undef MILLISECONDS_PER_DAY + +#undef MODIFY_AND_RETURN + +// ============================================================================ +// binary operators +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxTimeSpan operators +// ---------------------------------------------------------------------------- + +wxTimeSpan WXDLLIMPEXP_BASE operator*(int n, const wxTimeSpan& ts); + +// ---------------------------------------------------------------------------- +// wxDateSpan +// ---------------------------------------------------------------------------- + +wxDateSpan WXDLLIMPEXP_BASE operator*(int n, const wxDateSpan& ds); + +// ============================================================================ +// other helper functions +// ============================================================================ + +// ---------------------------------------------------------------------------- +// iteration helpers: can be used to write a for loop over enum variable like +// this: +// for ( m = wxDateTime::Jan; m < wxDateTime::Inv_Month; wxNextMonth(m) ) +// ---------------------------------------------------------------------------- + +WXDLLIMPEXP_BASE void wxNextMonth(wxDateTime::Month& m); +WXDLLIMPEXP_BASE void wxPrevMonth(wxDateTime::Month& m); +WXDLLIMPEXP_BASE void wxNextWDay(wxDateTime::WeekDay& wd); +WXDLLIMPEXP_BASE void wxPrevWDay(wxDateTime::WeekDay& wd); + +#endif // wxUSE_DATETIME + +#endif // _WX_DATETIME_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/datetimectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/datetimectrl.h new file mode 100644 index 0000000000..30f23dfffe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/datetimectrl.h @@ -0,0 +1,47 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/timectrl.h +// Purpose: Declaration of wxDateTimePickerCtrl class. +// Author: Vadim Zeitlin +// Created: 2011-09-22 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DATETIME_CTRL_H_ +#define _WX_DATETIME_CTRL_H_ + +#include "wx/defs.h" + +#if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL + +#define wxNEEDS_DATETIMEPICKCTRL + +#include "wx/control.h" // the base class + +#include "wx/datetime.h" + +// ---------------------------------------------------------------------------- +// wxDateTimePickerCtrl: Private common base class of wx{Date,Time}PickerCtrl. +// ---------------------------------------------------------------------------- + +// This class is an implementation detail and should not be used directly, only +// use the documented API of wxDateTimePickerCtrl and wxTimePickerCtrl. +class WXDLLIMPEXP_ADV wxDateTimePickerCtrlBase : public wxControl +{ +public: + // Set/get the date or time (in the latter case, time part is ignored). + virtual void SetValue(const wxDateTime& dt) = 0; + virtual wxDateTime GetValue() const = 0; +}; + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + #include "wx/msw/datetimectrl.h" +#elif defined(__WXOSX_COCOA__) && !defined(__WXUNIVERSAL__) + #include "wx/osx/datetimectrl.h" +#else + typedef wxDateTimePickerCtrlBase wxDateTimePickerCtrl; +#endif + +#endif // wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL + +#endif // _WX_DATETIME_CTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/datstrm.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/datstrm.h new file mode 100644 index 0000000000..477da30ec6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/datstrm.h @@ -0,0 +1,204 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/datstrm.h +// Purpose: Data stream classes +// Author: Guilhem Lavaux +// Modified by: Mickael Gilabert +// Created: 28/06/1998 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DATSTREAM_H_ +#define _WX_DATSTREAM_H_ + +#include "wx/stream.h" +#include "wx/longlong.h" +#include "wx/convauto.h" + +#if wxUSE_STREAMS + +// Common wxDataInputStream and wxDataOutputStream parameters. +class WXDLLIMPEXP_BASE wxDataStreamBase +{ +public: + void BigEndianOrdered(bool be_order) { m_be_order = be_order; } + + // By default we use extended precision (80 bit) format for both float and + // doubles. Call this function to switch to alternative representation in + // which IEEE 754 single precision (32 bits) is used for floats and double + // precision (64 bits) is used for doubles. + void UseBasicPrecisions() + { +#if wxUSE_APPLE_IEEE + m_useExtendedPrecision = false; +#endif // wxUSE_APPLE_IEEE + } + + // UseExtendedPrecision() is not very useful as it corresponds to the + // default value, only call it in your code if you want the compilation + // fail with the error when using wxWidgets library compiled without + // extended precision support. +#if wxUSE_APPLE_IEEE + void UseExtendedPrecision() + { + m_useExtendedPrecision = true; + } +#endif // wxUSE_APPLE_IEEE + +#if wxUSE_UNICODE + void SetConv( const wxMBConv &conv ); + wxMBConv *GetConv() const { return m_conv; } +#endif + +protected: + // Ctor and dtor are both protected, this class is never used directly but + // only by its derived classes. + wxDataStreamBase(const wxMBConv& conv); + ~wxDataStreamBase(); + + + bool m_be_order; + +#if wxUSE_APPLE_IEEE + bool m_useExtendedPrecision; +#endif // wxUSE_APPLE_IEEE + +#if wxUSE_UNICODE + wxMBConv *m_conv; +#endif + + wxDECLARE_NO_COPY_CLASS(wxDataStreamBase); +}; + + +class WXDLLIMPEXP_BASE wxDataInputStream : public wxDataStreamBase +{ +public: + wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvUTF8); + + bool IsOk() { return m_input->IsOk(); } + +#if wxHAS_INT64 + wxUint64 Read64(); +#endif +#if wxUSE_LONGLONG + wxLongLong ReadLL(); +#endif + wxUint32 Read32(); + wxUint16 Read16(); + wxUint8 Read8(); + double ReadDouble(); + float ReadFloat(); + wxString ReadString(); + +#if wxHAS_INT64 + void Read64(wxUint64 *buffer, size_t size); + void Read64(wxInt64 *buffer, size_t size); +#endif +#if defined(wxLongLong_t) && wxUSE_LONGLONG + void Read64(wxULongLong *buffer, size_t size); + void Read64(wxLongLong *buffer, size_t size); +#endif +#if wxUSE_LONGLONG + void ReadLL(wxULongLong *buffer, size_t size); + void ReadLL(wxLongLong *buffer, size_t size); +#endif + void Read32(wxUint32 *buffer, size_t size); + void Read16(wxUint16 *buffer, size_t size); + void Read8(wxUint8 *buffer, size_t size); + void ReadDouble(double *buffer, size_t size); + void ReadFloat(float *buffer, size_t size); + + wxDataInputStream& operator>>(wxString& s); + wxDataInputStream& operator>>(wxInt8& c); + wxDataInputStream& operator>>(wxInt16& i); + wxDataInputStream& operator>>(wxInt32& i); + wxDataInputStream& operator>>(wxUint8& c); + wxDataInputStream& operator>>(wxUint16& i); + wxDataInputStream& operator>>(wxUint32& i); +#if wxHAS_INT64 + wxDataInputStream& operator>>(wxUint64& i); + wxDataInputStream& operator>>(wxInt64& i); +#endif +#if defined(wxLongLong_t) && wxUSE_LONGLONG + wxDataInputStream& operator>>(wxULongLong& i); + wxDataInputStream& operator>>(wxLongLong& i); +#endif + wxDataInputStream& operator>>(double& d); + wxDataInputStream& operator>>(float& f); + +protected: + wxInputStream *m_input; + + wxDECLARE_NO_COPY_CLASS(wxDataInputStream); +}; + +class WXDLLIMPEXP_BASE wxDataOutputStream : public wxDataStreamBase +{ +public: + wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvUTF8); + + bool IsOk() { return m_output->IsOk(); } + +#if wxHAS_INT64 + void Write64(wxUint64 i); + void Write64(wxInt64 i); +#endif +#if wxUSE_LONGLONG + void WriteLL(const wxLongLong &ll); + void WriteLL(const wxULongLong &ll); +#endif + void Write32(wxUint32 i); + void Write16(wxUint16 i); + void Write8(wxUint8 i); + void WriteDouble(double d); + void WriteFloat(float f); + void WriteString(const wxString& string); + +#if wxHAS_INT64 + void Write64(const wxUint64 *buffer, size_t size); + void Write64(const wxInt64 *buffer, size_t size); +#endif +#if defined(wxLongLong_t) && wxUSE_LONGLONG + void Write64(const wxULongLong *buffer, size_t size); + void Write64(const wxLongLong *buffer, size_t size); +#endif +#if wxUSE_LONGLONG + void WriteLL(const wxULongLong *buffer, size_t size); + void WriteLL(const wxLongLong *buffer, size_t size); +#endif + void Write32(const wxUint32 *buffer, size_t size); + void Write16(const wxUint16 *buffer, size_t size); + void Write8(const wxUint8 *buffer, size_t size); + void WriteDouble(const double *buffer, size_t size); + void WriteFloat(const float *buffer, size_t size); + + wxDataOutputStream& operator<<(const wxString& string); + wxDataOutputStream& operator<<(wxInt8 c); + wxDataOutputStream& operator<<(wxInt16 i); + wxDataOutputStream& operator<<(wxInt32 i); + wxDataOutputStream& operator<<(wxUint8 c); + wxDataOutputStream& operator<<(wxUint16 i); + wxDataOutputStream& operator<<(wxUint32 i); +#if wxHAS_INT64 + wxDataOutputStream& operator<<(wxUint64 i); + wxDataOutputStream& operator<<(wxInt64 i); +#endif +#if defined(wxLongLong_t) && wxUSE_LONGLONG + wxDataOutputStream& operator<<(const wxULongLong &i); + wxDataOutputStream& operator<<(const wxLongLong &i); +#endif + wxDataOutputStream& operator<<(double d); + wxDataOutputStream& operator<<(float f); + +protected: + wxOutputStream *m_output; + + wxDECLARE_NO_COPY_CLASS(wxDataOutputStream); +}; + +#endif + // wxUSE_STREAMS + +#endif + // _WX_DATSTREAM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dc.h new file mode 100644 index 0000000000..d13720500b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dc.h @@ -0,0 +1,1534 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dc.h +// Purpose: wxDC class +// Author: Vadim Zeitlin +// Modified by: +// Created: 05/25/99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DC_H_BASE_ +#define _WX_DC_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers which we must include here +// ---------------------------------------------------------------------------- + +#include "wx/object.h" // the base class + +#include "wx/intl.h" // for wxLayoutDirection +#include "wx/cursor.h" // we have member variables of these classes +#include "wx/font.h" // so we can't do without them +#include "wx/colour.h" +#include "wx/bitmap.h" // for wxNullBitmap +#include "wx/brush.h" +#include "wx/pen.h" +#include "wx/palette.h" +#include "wx/dynarray.h" +#include "wx/math.h" +#include "wx/image.h" +#include "wx/region.h" +#include "wx/affinematrix2d.h" + +#define wxUSE_NEW_DC 1 + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxClientDC; +class WXDLLIMPEXP_FWD_CORE wxPaintDC; +class WXDLLIMPEXP_FWD_CORE wxWindowDC; +class WXDLLIMPEXP_FWD_CORE wxScreenDC; +class WXDLLIMPEXP_FWD_CORE wxMemoryDC; +class WXDLLIMPEXP_FWD_CORE wxPrinterDC; +class WXDLLIMPEXP_FWD_CORE wxPrintData; + +#if wxUSE_GRAPHICS_CONTEXT +class WXDLLIMPEXP_FWD_CORE wxGraphicsContext; +#endif + +// Logical ops +enum wxRasterOperationMode +{ + wxCLEAR, // 0 + wxXOR, // src XOR dst + wxINVERT, // NOT dst + wxOR_REVERSE, // src OR (NOT dst) + wxAND_REVERSE, // src AND (NOT dst) + wxCOPY, // src + wxAND, // src AND dst + wxAND_INVERT, // (NOT src) AND dst + wxNO_OP, // dst + wxNOR, // (NOT src) AND (NOT dst) + wxEQUIV, // (NOT src) XOR dst + wxSRC_INVERT, // (NOT src) + wxOR_INVERT, // (NOT src) OR dst + wxNAND, // (NOT src) OR (NOT dst) + wxOR, // src OR dst + wxSET // 1 +#if WXWIN_COMPATIBILITY_2_8 + ,wxROP_BLACK = wxCLEAR, + wxBLIT_BLACKNESS = wxCLEAR, + wxROP_XORPEN = wxXOR, + wxBLIT_SRCINVERT = wxXOR, + wxROP_NOT = wxINVERT, + wxBLIT_DSTINVERT = wxINVERT, + wxROP_MERGEPENNOT = wxOR_REVERSE, + wxBLIT_00DD0228 = wxOR_REVERSE, + wxROP_MASKPENNOT = wxAND_REVERSE, + wxBLIT_SRCERASE = wxAND_REVERSE, + wxROP_COPYPEN = wxCOPY, + wxBLIT_SRCCOPY = wxCOPY, + wxROP_MASKPEN = wxAND, + wxBLIT_SRCAND = wxAND, + wxROP_MASKNOTPEN = wxAND_INVERT, + wxBLIT_00220326 = wxAND_INVERT, + wxROP_NOP = wxNO_OP, + wxBLIT_00AA0029 = wxNO_OP, + wxROP_NOTMERGEPEN = wxNOR, + wxBLIT_NOTSRCERASE = wxNOR, + wxROP_NOTXORPEN = wxEQUIV, + wxBLIT_00990066 = wxEQUIV, + wxROP_NOTCOPYPEN = wxSRC_INVERT, + wxBLIT_NOTSCRCOPY = wxSRC_INVERT, + wxROP_MERGENOTPEN = wxOR_INVERT, + wxBLIT_MERGEPAINT = wxOR_INVERT, + wxROP_NOTMASKPEN = wxNAND, + wxBLIT_007700E6 = wxNAND, + wxROP_MERGEPEN = wxOR, + wxBLIT_SRCPAINT = wxOR, + wxROP_WHITE = wxSET, + wxBLIT_WHITENESS = wxSET +#endif //WXWIN_COMPATIBILITY_2_8 +}; + +// Flood styles +enum wxFloodFillStyle +{ + wxFLOOD_SURFACE = 1, + wxFLOOD_BORDER +}; + +// Mapping modes +enum wxMappingMode +{ + wxMM_TEXT = 1, + wxMM_METRIC, + wxMM_LOMETRIC, + wxMM_TWIPS, + wxMM_POINTS +}; + +// Description of text characteristics. +struct wxFontMetrics +{ + wxFontMetrics() + { + height = + ascent = + descent = + internalLeading = + externalLeading = + averageWidth = 0; + } + + int height, // Total character height. + ascent, // Part of the height above the baseline. + descent, // Part of the height below the baseline. + internalLeading, // Intra-line spacing. + externalLeading, // Inter-line spacing. + averageWidth; // Average font width, a.k.a. "x-width". +}; + +#if WXWIN_COMPATIBILITY_2_8 + +//----------------------------------------------------------------------------- +// wxDrawObject helper class +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDrawObject +{ +public: + wxDEPRECATED_CONSTRUCTOR(wxDrawObject)() + : m_isBBoxValid(false) + , m_minX(0), m_minY(0), m_maxX(0), m_maxY(0) + { } + + virtual ~wxDrawObject() { } + + virtual void Draw(wxDC&) const { } + + virtual void CalcBoundingBox(wxCoord x, wxCoord y) + { + if ( m_isBBoxValid ) + { + if ( x < m_minX ) m_minX = x; + if ( y < m_minY ) m_minY = y; + if ( x > m_maxX ) m_maxX = x; + if ( y > m_maxY ) m_maxY = y; + } + else + { + m_isBBoxValid = true; + + m_minX = x; + m_minY = y; + m_maxX = x; + m_maxY = y; + } + } + + void ResetBoundingBox() + { + m_isBBoxValid = false; + + m_minX = m_maxX = m_minY = m_maxY = 0; + } + + // Get the final bounding box of the PostScript or Metafile picture. + + wxCoord MinX() const { return m_minX; } + wxCoord MaxX() const { return m_maxX; } + wxCoord MinY() const { return m_minY; } + wxCoord MaxY() const { return m_maxY; } + + //to define the type of object for derived objects + virtual int GetType()=0; + +protected: + //for boundingbox calculation + bool m_isBBoxValid:1; + //for boundingbox calculation + wxCoord m_minX, m_minY, m_maxX, m_maxY; +}; + +#endif // WXWIN_COMPATIBILITY_2_8 + + +//----------------------------------------------------------------------------- +// wxDCFactory +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxDCImpl; + +class WXDLLIMPEXP_CORE wxDCFactory +{ +public: + wxDCFactory() {} + virtual ~wxDCFactory() {} + + virtual wxDCImpl* CreateWindowDC( wxWindowDC *owner, wxWindow *window ) = 0; + virtual wxDCImpl* CreateClientDC( wxClientDC *owner, wxWindow *window ) = 0; + virtual wxDCImpl* CreatePaintDC( wxPaintDC *owner, wxWindow *window ) = 0; + virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner ) = 0; + virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner, wxBitmap &bitmap ) = 0; + virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner, wxDC *dc ) = 0; + virtual wxDCImpl* CreateScreenDC( wxScreenDC *owner ) = 0; +#if wxUSE_PRINTING_ARCHITECTURE + virtual wxDCImpl* CreatePrinterDC( wxPrinterDC *owner, const wxPrintData &data ) = 0; +#endif + + static void Set(wxDCFactory *factory); + static wxDCFactory *Get(); + +private: + static wxDCFactory *m_factory; +}; + +//----------------------------------------------------------------------------- +// wxNativeDCFactory +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNativeDCFactory: public wxDCFactory +{ +public: + wxNativeDCFactory() {} + + virtual wxDCImpl* CreateWindowDC( wxWindowDC *owner, wxWindow *window ); + virtual wxDCImpl* CreateClientDC( wxClientDC *owner, wxWindow *window ); + virtual wxDCImpl* CreatePaintDC( wxPaintDC *owner, wxWindow *window ); + virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner ); + virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner, wxBitmap &bitmap ); + virtual wxDCImpl* CreateMemoryDC( wxMemoryDC *owner, wxDC *dc ); + virtual wxDCImpl* CreateScreenDC( wxScreenDC *owner ); +#if wxUSE_PRINTING_ARCHITECTURE + virtual wxDCImpl* CreatePrinterDC( wxPrinterDC *owner, const wxPrintData &data ); +#endif +}; + +//----------------------------------------------------------------------------- +// wxDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDCImpl: public wxObject +{ +public: + wxDCImpl( wxDC *owner ); + virtual ~wxDCImpl(); + + wxDC *GetOwner() const { return m_owner; } + + wxWindow* GetWindow() const { return m_window; } + + virtual bool IsOk() const { return m_ok; } + + // query capabilities + + virtual bool CanDrawBitmap() const = 0; + virtual bool CanGetTextExtent() const = 0; + + // get Cairo context + virtual void* GetCairoContext() const + { + return NULL; + } + + virtual void* GetHandle() const { return NULL; } + + // query dimension, colour deps, resolution + + virtual void DoGetSize(int *width, int *height) const = 0; + void GetSize(int *width, int *height) const + { + DoGetSize(width, height); + return ; + } + + wxSize GetSize() const + { + int w, h; + DoGetSize(&w, &h); + return wxSize(w, h); + } + + virtual void DoGetSizeMM(int* width, int* height) const = 0; + + virtual int GetDepth() const = 0; + virtual wxSize GetPPI() const = 0; + + // Right-To-Left (RTL) modes + + virtual void SetLayoutDirection(wxLayoutDirection WXUNUSED(dir)) { } + virtual wxLayoutDirection GetLayoutDirection() const { return wxLayout_Default; } + + // page and document + + virtual bool StartDoc(const wxString& WXUNUSED(message)) { return true; } + virtual void EndDoc() { } + + virtual void StartPage() { } + virtual void EndPage() { } + + // flushing the content of this dc immediately eg onto screen + virtual void Flush() { } + + // bounding box + + virtual void CalcBoundingBox(wxCoord x, wxCoord y) + { + if ( m_isBBoxValid ) + { + if ( x < m_minX ) m_minX = x; + if ( y < m_minY ) m_minY = y; + if ( x > m_maxX ) m_maxX = x; + if ( y > m_maxY ) m_maxY = y; + } + else + { + m_isBBoxValid = true; + + m_minX = x; + m_minY = y; + m_maxX = x; + m_maxY = y; + } + } + void ResetBoundingBox() + { + m_isBBoxValid = false; + + m_minX = m_maxX = m_minY = m_maxY = 0; + } + + wxCoord MinX() const { return m_minX; } + wxCoord MaxX() const { return m_maxX; } + wxCoord MinY() const { return m_minY; } + wxCoord MaxY() const { return m_maxY; } + + // setters and getters + + virtual void SetFont(const wxFont& font) = 0; + virtual const wxFont& GetFont() const { return m_font; } + + virtual void SetPen(const wxPen& pen) = 0; + virtual const wxPen& GetPen() const { return m_pen; } + + virtual void SetBrush(const wxBrush& brush) = 0; + virtual const wxBrush& GetBrush() const { return m_brush; } + + virtual void SetBackground(const wxBrush& brush) = 0; + virtual const wxBrush& GetBackground() const { return m_backgroundBrush; } + + virtual void SetBackgroundMode(int mode) = 0; + virtual int GetBackgroundMode() const { return m_backgroundMode; } + + virtual void SetTextForeground(const wxColour& colour) + { m_textForegroundColour = colour; } + virtual const wxColour& GetTextForeground() const + { return m_textForegroundColour; } + + virtual void SetTextBackground(const wxColour& colour) + { m_textBackgroundColour = colour; } + virtual const wxColour& GetTextBackground() const + { return m_textBackgroundColour; } + +#if wxUSE_PALETTE + virtual void SetPalette(const wxPalette& palette) = 0; +#endif // wxUSE_PALETTE + + // inherit the DC attributes (font and colours) from the given window + // + // this is called automatically when a window, client or paint DC is + // created + virtual void InheritAttributes(wxWindow *win); + + + // logical functions + + virtual void SetLogicalFunction(wxRasterOperationMode function) = 0; + virtual wxRasterOperationMode GetLogicalFunction() const + { return m_logicalFunction; } + + // text measurement + + virtual wxCoord GetCharHeight() const = 0; + virtual wxCoord GetCharWidth() const = 0; + + // The derived classes should really override DoGetFontMetrics() to return + // the correct values in the future but for now provide a default + // implementation in terms of DoGetTextExtent() to avoid breaking the + // compilation of all other ports as wxMSW is the only one to implement it. + virtual void DoGetFontMetrics(int *height, + int *ascent, + int *descent, + int *internalLeading, + int *externalLeading, + int *averageWidth) const; + + virtual void DoGetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const = 0; + virtual void GetMultiLineTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *heightLine = NULL, + const wxFont *font = NULL) const; + virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const; + + // clearing + + virtual void Clear() = 0; + + // clipping + + // Note that this pure virtual method has an implementation that updates + // the values returned by DoGetClippingBox() and so can be called from the + // derived class overridden version if it makes sense (i.e. if the clipping + // box coordinates are not already updated in some other way). + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, + wxCoord w, wxCoord h) = 0; + + // NB: this function works with device coordinates, not the logical ones! + virtual void DoSetDeviceClippingRegion(const wxRegion& region) = 0; + + virtual void DoGetClippingBox(wxCoord *x, wxCoord *y, + wxCoord *w, wxCoord *h) const + { + if ( x ) + *x = m_clipX1; + if ( y ) + *y = m_clipY1; + if ( w ) + *w = m_clipX2 - m_clipX1; + if ( h ) + *h = m_clipY2 - m_clipY1; + } + + virtual void DestroyClippingRegion() { ResetClipping(); } + + + // coordinates conversions and transforms + + virtual wxCoord DeviceToLogicalX(wxCoord x) const; + virtual wxCoord DeviceToLogicalY(wxCoord y) const; + virtual wxCoord DeviceToLogicalXRel(wxCoord x) const; + virtual wxCoord DeviceToLogicalYRel(wxCoord y) const; + virtual wxCoord LogicalToDeviceX(wxCoord x) const; + virtual wxCoord LogicalToDeviceY(wxCoord y) const; + virtual wxCoord LogicalToDeviceXRel(wxCoord x) const; + virtual wxCoord LogicalToDeviceYRel(wxCoord y) const; + + virtual void SetMapMode(wxMappingMode mode); + virtual wxMappingMode GetMapMode() const { return m_mappingMode; } + + virtual void SetUserScale(double x, double y); + virtual void GetUserScale(double *x, double *y) const + { + if ( x ) *x = m_userScaleX; + if ( y ) *y = m_userScaleY; + } + + virtual void SetLogicalScale(double x, double y); + virtual void GetLogicalScale(double *x, double *y) const + { + if ( x ) *x = m_logicalScaleX; + if ( y ) *y = m_logicalScaleY; + } + + virtual void SetLogicalOrigin(wxCoord x, wxCoord y); + virtual void DoGetLogicalOrigin(wxCoord *x, wxCoord *y) const + { + if ( x ) *x = m_logicalOriginX; + if ( y ) *y = m_logicalOriginY; + } + + virtual void SetDeviceOrigin(wxCoord x, wxCoord y); + virtual void DoGetDeviceOrigin(wxCoord *x, wxCoord *y) const + { + if ( x ) *x = m_deviceOriginX; + if ( y ) *y = m_deviceOriginY; + } + +#if wxUSE_DC_TRANSFORM_MATRIX + // Transform matrix support is not available in most ports right now + // (currently only wxMSW provides it) so do nothing in these methods by + // default. + virtual bool CanUseTransformMatrix() const + { return false; } + virtual bool SetTransformMatrix(const wxAffineMatrix2D& WXUNUSED(matrix)) + { return false; } + virtual wxAffineMatrix2D GetTransformMatrix() const + { return wxAffineMatrix2D(); } + virtual void ResetTransformMatrix() + { } +#endif // wxUSE_DC_TRANSFORM_MATRIX + + virtual void SetDeviceLocalOrigin( wxCoord x, wxCoord y ); + + virtual void ComputeScaleAndOrigin(); + + // this needs to overidden if the axis is inverted + virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp); + + virtual double GetContentScaleFactor() const { return m_contentScaleFactor; } + +#ifdef __WXMSW__ + // Native Windows functions using the underlying HDC don't honour GDI+ + // transformations which may be applied to it. Using this function we can + // transform the coordinates manually before passing them to such functions + // (as in e.g. wxRendererMSW code). It doesn't do anything if this is not a + // wxGCDC. + virtual wxRect MSWApplyGDIPlusTransform(const wxRect& r) const + { + return r; + } +#endif // __WXMSW__ + + + // --------------------------------------------------------- + // the actual drawing API + + virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, + wxFloodFillStyle style = wxFLOOD_SURFACE) = 0; + + virtual void DoGradientFillLinear(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour, + wxDirection nDirection = wxEAST); + + virtual void DoGradientFillConcentric(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour, + const wxPoint& circleCenter); + + virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const = 0; + + virtual void DoDrawPoint(wxCoord x, wxCoord y) = 0; + virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) = 0; + + virtual void DoDrawArc(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc) = 0; + virtual void DoDrawCheckMark(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); + virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, + double sa, double ea) = 0; + + virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) = 0; + virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, + wxCoord width, wxCoord height, + double radius) = 0; + virtual void DoDrawEllipse(wxCoord x, wxCoord y, + wxCoord width, wxCoord height) = 0; + + virtual void DoCrossHair(wxCoord x, wxCoord y) = 0; + + virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) = 0; + virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, + bool useMask = false) = 0; + + virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y) = 0; + virtual void DoDrawRotatedText(const wxString& text, + wxCoord x, wxCoord y, double angle) = 0; + + virtual bool DoBlit(wxCoord xdest, wxCoord ydest, + wxCoord width, wxCoord height, + wxDC *source, + wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop = wxCOPY, + bool useMask = false, + wxCoord xsrcMask = wxDefaultCoord, + wxCoord ysrcMask = wxDefaultCoord) = 0; + + virtual bool DoStretchBlit(wxCoord xdest, wxCoord ydest, + wxCoord dstWidth, wxCoord dstHeight, + wxDC *source, + wxCoord xsrc, wxCoord ysrc, + wxCoord srcWidth, wxCoord srcHeight, + wxRasterOperationMode rop = wxCOPY, + bool useMask = false, + wxCoord xsrcMask = wxDefaultCoord, + wxCoord ysrcMask = wxDefaultCoord); + + virtual wxBitmap DoGetAsBitmap(const wxRect *WXUNUSED(subrect)) const + { return wxNullBitmap; } + + + virtual void DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset ) = 0; + virtual void DrawLines(const wxPointList *list, + wxCoord xoffset, wxCoord yoffset ); + + virtual void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE) = 0; + virtual void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle); + void DrawPolygon(const wxPointList *list, + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle ); + + +#if wxUSE_SPLINES + void DrawSpline(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord x3, wxCoord y3); + void DrawSpline(int n, const wxPoint points[]); + void DrawSpline(const wxPointList *points) { DoDrawSpline(points); } + + virtual void DoDrawSpline(const wxPointList *points); +#endif + + // --------------------------------------------------------- + // wxMemoryDC Impl API + + virtual void DoSelect(const wxBitmap& WXUNUSED(bmp)) + { } + + virtual const wxBitmap& GetSelectedBitmap() const + { return wxNullBitmap; } + virtual wxBitmap& GetSelectedBitmap() + { return wxNullBitmap; } + + // --------------------------------------------------------- + // wxPrinterDC Impl API + + virtual wxRect GetPaperRect() const + { int w = 0; int h = 0; DoGetSize( &w, &h ); return wxRect(0,0,w,h); } + + virtual int GetResolution() const + { return -1; } + +#if wxUSE_GRAPHICS_CONTEXT + virtual wxGraphicsContext* GetGraphicsContext() const + { return NULL; } + virtual void SetGraphicsContext( wxGraphicsContext* WXUNUSED(ctx) ) + {} +#endif + +private: + wxDC *m_owner; + +protected: + // unset clipping variables (after clipping region was destroyed) + void ResetClipping() + { + m_clipping = false; + + m_clipX1 = m_clipX2 = m_clipY1 = m_clipY2 = 0; + } + +#ifdef __WXWINCE__ + //! Generic method to draw ellipses, circles and arcs with current pen and brush. + /*! \param x Upper left corner of bounding box. + * \param y Upper left corner of bounding box. + * \param w Width of bounding box. + * \param h Height of bounding box. + * \param sa Starting angle of arc + * (counterclockwise, start at 3 o'clock, 360 is full circle). + * \param ea Ending angle of arc. + * \param angle Rotation angle, the Arc will be rotated after + * calculating begin and end. + */ + void DrawEllipticArcRot( wxCoord x, wxCoord y, + wxCoord width, wxCoord height, + double sa = 0, double ea = 0, double angle = 0 ) + { DoDrawEllipticArcRot( x, y, width, height, sa, ea, angle ); } + + void DrawEllipticArcRot( const wxPoint& pt, + const wxSize& sz, + double sa = 0, double ea = 0, double angle = 0 ) + { DoDrawEllipticArcRot( pt.x, pt.y, sz.x, sz.y, sa, ea, angle ); } + + void DrawEllipticArcRot( const wxRect& rect, + double sa = 0, double ea = 0, double angle = 0 ) + { DoDrawEllipticArcRot( rect.x, rect.y, rect.width, rect.height, sa, ea, angle ); } + + virtual void DoDrawEllipticArcRot( wxCoord x, wxCoord y, + wxCoord w, wxCoord h, + double sa = 0, double ea = 0, double angle = 0 ); + + //! Rotates points around center. + /*! This is a quite straight method, it calculates in pixels + * and so it produces rounding errors. + * \param points The points inside will be rotated. + * \param angle Rotating angle (counterclockwise, start at 3 o'clock, 360 is full circle). + * \param center Center of rotation. + */ + void Rotate( wxPointList* points, double angle, wxPoint center = wxPoint(0,0) ); + + // used by DrawEllipticArcRot + // Careful: wxList gets filled with points you have to delete later. + void CalculateEllipticPoints( wxPointList* points, + wxCoord xStart, wxCoord yStart, + wxCoord w, wxCoord h, + double sa, double ea ); +#endif // __WXWINCE__ + + // returns adjustment factor for converting wxFont "point size"; in wx + // it is point size on screen and needs to be multiplied by this value + // for rendering on higher-resolution DCs such as printer ones + static float GetFontPointSizeAdjustment(float dpi); + + // window on which the DC draws or NULL + wxWindow *m_window; + + // flags + bool m_colour:1; + bool m_ok:1; + bool m_clipping:1; + bool m_isInteractive:1; + bool m_isBBoxValid:1; + + // coordinate system variables + + wxCoord m_logicalOriginX, m_logicalOriginY; + wxCoord m_deviceOriginX, m_deviceOriginY; // Usually 0,0, can be change by user + + wxCoord m_deviceLocalOriginX, m_deviceLocalOriginY; // non-zero if native top-left corner + // is not at 0,0. This was the case under + // Mac's GrafPorts (coordinate system + // used toplevel window's origin) and + // e.g. for Postscript, where the native + // origin in the bottom left corner. + double m_logicalScaleX, m_logicalScaleY; + double m_userScaleX, m_userScaleY; + double m_scaleX, m_scaleY; // calculated from logical scale and user scale + + int m_signX, m_signY; // Used by SetAxisOrientation() to invert the axes + + double m_contentScaleFactor; // used by high resolution displays (retina) + + // what is a mm on a screen you don't know the size of? + double m_mm_to_pix_x, + m_mm_to_pix_y; + + // bounding and clipping boxes + wxCoord m_minX, m_minY, m_maxX, m_maxY; + wxCoord m_clipX1, m_clipY1, m_clipX2, m_clipY2; + + wxRasterOperationMode m_logicalFunction; + int m_backgroundMode; + wxMappingMode m_mappingMode; + + wxPen m_pen; + wxBrush m_brush; + wxBrush m_backgroundBrush; + wxColour m_textForegroundColour; + wxColour m_textBackgroundColour; + wxFont m_font; + +#if wxUSE_PALETTE + wxPalette m_palette; + bool m_hasCustomPalette; +#endif // wxUSE_PALETTE + +private: + DECLARE_ABSTRACT_CLASS(wxDCImpl) +}; + + +class WXDLLIMPEXP_CORE wxDC : public wxObject +{ +public: + // copy attributes (font, colours and writing direction) from another DC + void CopyAttributes(const wxDC& dc); + + virtual ~wxDC() { delete m_pimpl; } + + wxDCImpl *GetImpl() + { return m_pimpl; } + const wxDCImpl *GetImpl() const + { return m_pimpl; } + + wxWindow *GetWindow() const + { return m_pimpl->GetWindow(); } + + void *GetHandle() const + { return m_pimpl->GetHandle(); } + + bool IsOk() const + { return m_pimpl && m_pimpl->IsOk(); } + + // query capabilities + + bool CanDrawBitmap() const + { return m_pimpl->CanDrawBitmap(); } + bool CanGetTextExtent() const + { return m_pimpl->CanGetTextExtent(); } + + // query dimension, colour deps, resolution + + void GetSize(int *width, int *height) const + { m_pimpl->DoGetSize(width, height); } + wxSize GetSize() const + { return m_pimpl->GetSize(); } + + void GetSizeMM(int* width, int* height) const + { m_pimpl->DoGetSizeMM(width, height); } + wxSize GetSizeMM() const + { + int w, h; + m_pimpl->DoGetSizeMM(&w, &h); + return wxSize(w, h); + } + + int GetDepth() const + { return m_pimpl->GetDepth(); } + wxSize GetPPI() const + { return m_pimpl->GetPPI(); } + + virtual int GetResolution() const + { return m_pimpl->GetResolution(); } + + double GetContentScaleFactor() const + { return m_pimpl->GetContentScaleFactor(); } + + // Right-To-Left (RTL) modes + + void SetLayoutDirection(wxLayoutDirection dir) + { m_pimpl->SetLayoutDirection( dir ); } + wxLayoutDirection GetLayoutDirection() const + { return m_pimpl->GetLayoutDirection(); } + + // page and document + + bool StartDoc(const wxString& message) + { return m_pimpl->StartDoc(message); } + void EndDoc() + { m_pimpl->EndDoc(); } + + void StartPage() + { m_pimpl->StartPage(); } + void EndPage() + { m_pimpl->EndPage(); } + + // bounding box + + void CalcBoundingBox(wxCoord x, wxCoord y) + { m_pimpl->CalcBoundingBox(x,y); } + void ResetBoundingBox() + { m_pimpl->ResetBoundingBox(); } + + wxCoord MinX() const + { return m_pimpl->MinX(); } + wxCoord MaxX() const + { return m_pimpl->MaxX(); } + wxCoord MinY() const + { return m_pimpl->MinY(); } + wxCoord MaxY() const + { return m_pimpl->MaxY(); } + + // setters and getters + + void SetFont(const wxFont& font) + { m_pimpl->SetFont( font ); } + const wxFont& GetFont() const + { return m_pimpl->GetFont(); } + + void SetPen(const wxPen& pen) + { m_pimpl->SetPen( pen ); } + const wxPen& GetPen() const + { return m_pimpl->GetPen(); } + + void SetBrush(const wxBrush& brush) + { m_pimpl->SetBrush( brush ); } + const wxBrush& GetBrush() const + { return m_pimpl->GetBrush(); } + + void SetBackground(const wxBrush& brush) + { m_pimpl->SetBackground( brush ); } + const wxBrush& GetBackground() const + { return m_pimpl->GetBackground(); } + + void SetBackgroundMode(int mode) + { m_pimpl->SetBackgroundMode( mode ); } + int GetBackgroundMode() const + { return m_pimpl->GetBackgroundMode(); } + + void SetTextForeground(const wxColour& colour) + { m_pimpl->SetTextForeground(colour); } + const wxColour& GetTextForeground() const + { return m_pimpl->GetTextForeground(); } + + void SetTextBackground(const wxColour& colour) + { m_pimpl->SetTextBackground(colour); } + const wxColour& GetTextBackground() const + { return m_pimpl->GetTextBackground(); } + +#if wxUSE_PALETTE + void SetPalette(const wxPalette& palette) + { m_pimpl->SetPalette(palette); } +#endif // wxUSE_PALETTE + + // logical functions + + void SetLogicalFunction(wxRasterOperationMode function) + { m_pimpl->SetLogicalFunction(function); } + wxRasterOperationMode GetLogicalFunction() const + { return m_pimpl->GetLogicalFunction(); } + + // text measurement + + wxCoord GetCharHeight() const + { return m_pimpl->GetCharHeight(); } + wxCoord GetCharWidth() const + { return m_pimpl->GetCharWidth(); } + + wxFontMetrics GetFontMetrics() const + { + wxFontMetrics fm; + m_pimpl->DoGetFontMetrics(&fm.height, &fm.ascent, &fm.descent, + &fm.internalLeading, &fm.externalLeading, + &fm.averageWidth); + return fm; + } + + void GetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const + { m_pimpl->DoGetTextExtent(string, x, y, descent, externalLeading, theFont); } + + wxSize GetTextExtent(const wxString& string) const + { + wxCoord w, h; + m_pimpl->DoGetTextExtent(string, &w, &h); + return wxSize(w, h); + } + + void GetMultiLineTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *heightLine = NULL, + const wxFont *font = NULL) const + { m_pimpl->GetMultiLineTextExtent( string, width, height, heightLine, font ); } + + wxSize GetMultiLineTextExtent(const wxString& string) const + { + wxCoord w, h; + m_pimpl->GetMultiLineTextExtent(string, &w, &h); + return wxSize(w, h); + } + + bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const + { return m_pimpl->DoGetPartialTextExtents(text, widths); } + + // clearing + + void Clear() + { m_pimpl->Clear(); } + + // clipping + + void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height) + { m_pimpl->DoSetClippingRegion(x, y, width, height); } + void SetClippingRegion(const wxPoint& pt, const wxSize& sz) + { m_pimpl->DoSetClippingRegion(pt.x, pt.y, sz.x, sz.y); } + void SetClippingRegion(const wxRect& rect) + { m_pimpl->DoSetClippingRegion(rect.x, rect.y, rect.width, rect.height); } + + // unlike the functions above, the coordinates of the region used in this + // one are in device coordinates, not the logical ones + void SetDeviceClippingRegion(const wxRegion& region) + { m_pimpl->DoSetDeviceClippingRegion(region); } + + // this function is deprecated because its name is confusing: you may + // expect it to work with logical coordinates but, in fact, it does exactly + // the same thing as SetDeviceClippingRegion() + // + // please review the code using it and either replace it with calls to + // SetDeviceClippingRegion() or correct it if it was [wrongly] passing + // logical coordinates to this function + wxDEPRECATED_INLINE(void SetClippingRegion(const wxRegion& region), + SetDeviceClippingRegion(region); ) + + void DestroyClippingRegion() + { m_pimpl->DestroyClippingRegion(); } + + void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) const + { m_pimpl->DoGetClippingBox(x, y, w, h); } + void GetClippingBox(wxRect& rect) const + { m_pimpl->DoGetClippingBox(&rect.x, &rect.y, &rect.width, &rect.height); } + + // coordinates conversions and transforms + + wxCoord DeviceToLogicalX(wxCoord x) const + { return m_pimpl->DeviceToLogicalX(x); } + wxCoord DeviceToLogicalY(wxCoord y) const + { return m_pimpl->DeviceToLogicalY(y); } + wxCoord DeviceToLogicalXRel(wxCoord x) const + { return m_pimpl->DeviceToLogicalXRel(x); } + wxCoord DeviceToLogicalYRel(wxCoord y) const + { return m_pimpl->DeviceToLogicalYRel(y); } + wxCoord LogicalToDeviceX(wxCoord x) const + { return m_pimpl->LogicalToDeviceX(x); } + wxCoord LogicalToDeviceY(wxCoord y) const + { return m_pimpl->LogicalToDeviceY(y); } + wxCoord LogicalToDeviceXRel(wxCoord x) const + { return m_pimpl->LogicalToDeviceXRel(x); } + wxCoord LogicalToDeviceYRel(wxCoord y) const + { return m_pimpl->LogicalToDeviceYRel(y); } + + void SetMapMode(wxMappingMode mode) + { m_pimpl->SetMapMode(mode); } + wxMappingMode GetMapMode() const + { return m_pimpl->GetMapMode(); } + + void SetUserScale(double x, double y) + { m_pimpl->SetUserScale(x,y); } + void GetUserScale(double *x, double *y) const + { m_pimpl->GetUserScale( x, y ); } + + void SetLogicalScale(double x, double y) + { m_pimpl->SetLogicalScale( x, y ); } + void GetLogicalScale(double *x, double *y) const + { m_pimpl->GetLogicalScale( x, y ); } + + void SetLogicalOrigin(wxCoord x, wxCoord y) + { m_pimpl->SetLogicalOrigin(x,y); } + void GetLogicalOrigin(wxCoord *x, wxCoord *y) const + { m_pimpl->DoGetLogicalOrigin(x, y); } + wxPoint GetLogicalOrigin() const + { wxCoord x, y; m_pimpl->DoGetLogicalOrigin(&x, &y); return wxPoint(x, y); } + + void SetDeviceOrigin(wxCoord x, wxCoord y) + { m_pimpl->SetDeviceOrigin( x, y); } + void GetDeviceOrigin(wxCoord *x, wxCoord *y) const + { m_pimpl->DoGetDeviceOrigin(x, y); } + wxPoint GetDeviceOrigin() const + { wxCoord x, y; m_pimpl->DoGetDeviceOrigin(&x, &y); return wxPoint(x, y); } + + void SetAxisOrientation(bool xLeftRight, bool yBottomUp) + { m_pimpl->SetAxisOrientation(xLeftRight, yBottomUp); } + +#if wxUSE_DC_TRANSFORM_MATRIX + bool CanUseTransformMatrix() const + { return m_pimpl->CanUseTransformMatrix(); } + + bool SetTransformMatrix(const wxAffineMatrix2D &matrix) + { return m_pimpl->SetTransformMatrix(matrix); } + + wxAffineMatrix2D GetTransformMatrix() const + { return m_pimpl->GetTransformMatrix(); } + + void ResetTransformMatrix() + { m_pimpl->ResetTransformMatrix(); } +#endif // wxUSE_DC_TRANSFORM_MATRIX + + // mostly internal + void SetDeviceLocalOrigin( wxCoord x, wxCoord y ) + { m_pimpl->SetDeviceLocalOrigin( x, y ); } + + + // ----------------------------------------------- + // the actual drawing API + + bool FloodFill(wxCoord x, wxCoord y, const wxColour& col, + wxFloodFillStyle style = wxFLOOD_SURFACE) + { return m_pimpl->DoFloodFill(x, y, col, style); } + bool FloodFill(const wxPoint& pt, const wxColour& col, + wxFloodFillStyle style = wxFLOOD_SURFACE) + { return m_pimpl->DoFloodFill(pt.x, pt.y, col, style); } + + // fill the area specified by rect with a radial gradient, starting from + // initialColour in the centre of the cercle and fading to destColour. + void GradientFillConcentric(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour) + { m_pimpl->DoGradientFillConcentric( rect, initialColour, destColour, + wxPoint(rect.GetWidth() / 2, + rect.GetHeight() / 2)); } + + void GradientFillConcentric(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour, + const wxPoint& circleCenter) + { m_pimpl->DoGradientFillConcentric(rect, initialColour, destColour, circleCenter); } + + // fill the area specified by rect with a linear gradient + void GradientFillLinear(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour, + wxDirection nDirection = wxEAST) + { m_pimpl->DoGradientFillLinear(rect, initialColour, destColour, nDirection); } + + bool GetPixel(wxCoord x, wxCoord y, wxColour *col) const + { return m_pimpl->DoGetPixel(x, y, col); } + bool GetPixel(const wxPoint& pt, wxColour *col) const + { return m_pimpl->DoGetPixel(pt.x, pt.y, col); } + + void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) + { m_pimpl->DoDrawLine(x1, y1, x2, y2); } + void DrawLine(const wxPoint& pt1, const wxPoint& pt2) + { m_pimpl->DoDrawLine(pt1.x, pt1.y, pt2.x, pt2.y); } + + void CrossHair(wxCoord x, wxCoord y) + { m_pimpl->DoCrossHair(x, y); } + void CrossHair(const wxPoint& pt) + { m_pimpl->DoCrossHair(pt.x, pt.y); } + + void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc) + { m_pimpl->DoDrawArc(x1, y1, x2, y2, xc, yc); } + void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& centre) + { m_pimpl->DoDrawArc(pt1.x, pt1.y, pt2.x, pt2.y, centre.x, centre.y); } + + void DrawCheckMark(wxCoord x, wxCoord y, + wxCoord width, wxCoord height) + { m_pimpl->DoDrawCheckMark(x, y, width, height); } + void DrawCheckMark(const wxRect& rect) + { m_pimpl->DoDrawCheckMark(rect.x, rect.y, rect.width, rect.height); } + + void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, + double sa, double ea) + { m_pimpl->DoDrawEllipticArc(x, y, w, h, sa, ea); } + void DrawEllipticArc(const wxPoint& pt, const wxSize& sz, + double sa, double ea) + { m_pimpl->DoDrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea); } + + void DrawPoint(wxCoord x, wxCoord y) + { m_pimpl->DoDrawPoint(x, y); } + void DrawPoint(const wxPoint& pt) + { m_pimpl->DoDrawPoint(pt.x, pt.y); } + + void DrawLines(int n, const wxPoint points[], + wxCoord xoffset = 0, wxCoord yoffset = 0) + { m_pimpl->DoDrawLines(n, points, xoffset, yoffset); } + void DrawLines(const wxPointList *list, + wxCoord xoffset = 0, wxCoord yoffset = 0) + { m_pimpl->DrawLines( list, xoffset, yoffset ); } +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( void DrawLines(const wxList *list, + wxCoord xoffset = 0, wxCoord yoffset = 0) ); +#endif // WXWIN_COMPATIBILITY_2_8 + + void DrawPolygon(int n, const wxPoint points[], + wxCoord xoffset = 0, wxCoord yoffset = 0, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE) + { m_pimpl->DoDrawPolygon(n, points, xoffset, yoffset, fillStyle); } + void DrawPolygon(const wxPointList *list, + wxCoord xoffset = 0, wxCoord yoffset = 0, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE) + { m_pimpl->DrawPolygon( list, xoffset, yoffset, fillStyle ); } + void DrawPolyPolygon(int n, const int count[], const wxPoint points[], + wxCoord xoffset = 0, wxCoord yoffset = 0, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE) + { m_pimpl->DoDrawPolyPolygon(n, count, points, xoffset, yoffset, fillStyle); } +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( void DrawPolygon(const wxList *list, + wxCoord xoffset = 0, wxCoord yoffset = 0, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE) ); +#endif // WXWIN_COMPATIBILITY_2_8 + + void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) + { m_pimpl->DoDrawRectangle(x, y, width, height); } + void DrawRectangle(const wxPoint& pt, const wxSize& sz) + { m_pimpl->DoDrawRectangle(pt.x, pt.y, sz.x, sz.y); } + void DrawRectangle(const wxRect& rect) + { m_pimpl->DoDrawRectangle(rect.x, rect.y, rect.width, rect.height); } + + void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, + double radius) + { m_pimpl->DoDrawRoundedRectangle(x, y, width, height, radius); } + void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, + double radius) + { m_pimpl->DoDrawRoundedRectangle(pt.x, pt.y, sz.x, sz.y, radius); } + void DrawRoundedRectangle(const wxRect& r, double radius) + { m_pimpl->DoDrawRoundedRectangle(r.x, r.y, r.width, r.height, radius); } + + void DrawCircle(wxCoord x, wxCoord y, wxCoord radius) + { m_pimpl->DoDrawEllipse(x - radius, y - radius, 2*radius, 2*radius); } + void DrawCircle(const wxPoint& pt, wxCoord radius) + { m_pimpl->DoDrawEllipse(pt.x - radius, pt.y - radius, 2*radius, 2*radius); } + + void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) + { m_pimpl->DoDrawEllipse(x, y, width, height); } + void DrawEllipse(const wxPoint& pt, const wxSize& sz) + { m_pimpl->DoDrawEllipse(pt.x, pt.y, sz.x, sz.y); } + void DrawEllipse(const wxRect& rect) + { m_pimpl->DoDrawEllipse(rect.x, rect.y, rect.width, rect.height); } + + void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) + { m_pimpl->DoDrawIcon(icon, x, y); } + void DrawIcon(const wxIcon& icon, const wxPoint& pt) + { m_pimpl->DoDrawIcon(icon, pt.x, pt.y); } + + void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, + bool useMask = false) + { m_pimpl->DoDrawBitmap(bmp, x, y, useMask); } + void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, + bool useMask = false) + { m_pimpl->DoDrawBitmap(bmp, pt.x, pt.y, useMask); } + + void DrawText(const wxString& text, wxCoord x, wxCoord y) + { m_pimpl->DoDrawText(text, x, y); } + void DrawText(const wxString& text, const wxPoint& pt) + { m_pimpl->DoDrawText(text, pt.x, pt.y); } + + void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle) + { m_pimpl->DoDrawRotatedText(text, x, y, angle); } + void DrawRotatedText(const wxString& text, const wxPoint& pt, double angle) + { m_pimpl->DoDrawRotatedText(text, pt.x, pt.y, angle); } + + // this version puts both optional bitmap and the text into the given + // rectangle and aligns is as specified by alignment parameter; it also + // will emphasize the character with the given index if it is != -1 and + // return the bounding rectangle if required + void DrawLabel(const wxString& text, + const wxBitmap& image, + const wxRect& rect, + int alignment = wxALIGN_LEFT | wxALIGN_TOP, + int indexAccel = -1, + wxRect *rectBounding = NULL); + + void DrawLabel(const wxString& text, const wxRect& rect, + int alignment = wxALIGN_LEFT | wxALIGN_TOP, + int indexAccel = -1) + { DrawLabel(text, wxNullBitmap, rect, alignment, indexAccel); } + + bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) + { + return m_pimpl->DoBlit(xdest, ydest, width, height, + source, xsrc, ysrc, rop, useMask, xsrcMask, ysrcMask); + } + bool Blit(const wxPoint& destPt, const wxSize& sz, + wxDC *source, const wxPoint& srcPt, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + const wxPoint& srcPtMask = wxDefaultPosition) + { + return m_pimpl->DoBlit(destPt.x, destPt.y, sz.x, sz.y, + source, srcPt.x, srcPt.y, rop, useMask, srcPtMask.x, srcPtMask.y); + } + + bool StretchBlit(wxCoord dstX, wxCoord dstY, + wxCoord dstWidth, wxCoord dstHeight, + wxDC *source, + wxCoord srcX, wxCoord srcY, + wxCoord srcWidth, wxCoord srcHeight, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxCoord srcMaskX = wxDefaultCoord, wxCoord srcMaskY = wxDefaultCoord) + { + return m_pimpl->DoStretchBlit(dstX, dstY, dstWidth, dstHeight, + source, srcX, srcY, srcWidth, srcHeight, rop, useMask, srcMaskX, srcMaskY); + } + bool StretchBlit(const wxPoint& dstPt, const wxSize& dstSize, + wxDC *source, const wxPoint& srcPt, const wxSize& srcSize, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + const wxPoint& srcMaskPt = wxDefaultPosition) + { + return m_pimpl->DoStretchBlit(dstPt.x, dstPt.y, dstSize.x, dstSize.y, + source, srcPt.x, srcPt.y, srcSize.x, srcSize.y, rop, useMask, srcMaskPt.x, srcMaskPt.y); + } + + wxBitmap GetAsBitmap(const wxRect *subrect = (const wxRect *) NULL) const + { + return m_pimpl->DoGetAsBitmap(subrect); + } + +#if wxUSE_SPLINES + void DrawSpline(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord x3, wxCoord y3) + { m_pimpl->DrawSpline(x1,y1,x2,y2,x3,y3); } + void DrawSpline(int n, const wxPoint points[]) + { m_pimpl->DrawSpline(n,points); } + void DrawSpline(const wxPointList *points) + { m_pimpl->DrawSpline(points); } +#endif // wxUSE_SPLINES + + +#if WXWIN_COMPATIBILITY_2_8 + // for compatibility with the old code when wxCoord was long everywhere + wxDEPRECATED( void GetTextExtent(const wxString& string, + long *x, long *y, + long *descent = NULL, + long *externalLeading = NULL, + const wxFont *theFont = NULL) const ); + wxDEPRECATED( void GetLogicalOrigin(long *x, long *y) const ); + wxDEPRECATED( void GetDeviceOrigin(long *x, long *y) const ); + wxDEPRECATED( void GetClippingBox(long *x, long *y, long *w, long *h) const ); + + wxDEPRECATED( void DrawObject(wxDrawObject* drawobject) ); +#endif // WXWIN_COMPATIBILITY_2_8 + +#ifdef __WXMSW__ + // GetHDC() is the simplest way to retrieve an HDC From a wxDC but only + // works if this wxDC is GDI-based and fails for GDI+ contexts (and + // anything else without HDC, e.g. wxPostScriptDC) + WXHDC GetHDC() const; + + // don't use these methods manually, use GetTempHDC() instead + virtual WXHDC AcquireHDC() { return GetHDC(); } + virtual void ReleaseHDC(WXHDC WXUNUSED(hdc)) { } + + // helper class holding the result of GetTempHDC() with std::auto_ptr<>-like + // semantics, i.e. it is moved when copied + class TempHDC + { + public: + TempHDC(wxDC& dc) + : m_dc(dc), + m_hdc(dc.AcquireHDC()) + { + } + + TempHDC(const TempHDC& thdc) + : m_dc(thdc.m_dc), + m_hdc(thdc.m_hdc) + { + const_cast(thdc).m_hdc = 0; + } + + ~TempHDC() + { + if ( m_hdc ) + m_dc.ReleaseHDC(m_hdc); + } + + WXHDC GetHDC() const { return m_hdc; } + + private: + wxDC& m_dc; + WXHDC m_hdc; + + wxDECLARE_NO_ASSIGN_CLASS(TempHDC); + }; + + // GetTempHDC() also works for wxGCDC (but still not for wxPostScriptDC &c) + TempHDC GetTempHDC() { return TempHDC(*this); } +#endif // __WXMSW__ + +#if wxUSE_GRAPHICS_CONTEXT + virtual wxGraphicsContext* GetGraphicsContext() const + { + return m_pimpl->GetGraphicsContext(); + } + virtual void SetGraphicsContext( wxGraphicsContext* ctx ) + { + m_pimpl->SetGraphicsContext(ctx); + } +#endif + +protected: + // ctor takes ownership of the pointer + wxDC(wxDCImpl *pimpl) : m_pimpl(pimpl) { } + + wxDCImpl * const m_pimpl; + +private: + DECLARE_ABSTRACT_CLASS(wxDC) + wxDECLARE_NO_COPY_CLASS(wxDC); +}; + +// ---------------------------------------------------------------------------- +// helper class: you can use it to temporarily change the DC text colour and +// restore it automatically when the object goes out of scope +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDCTextColourChanger +{ +public: + wxDCTextColourChanger(wxDC& dc) : m_dc(dc), m_colFgOld() { } + + wxDCTextColourChanger(wxDC& dc, const wxColour& col) : m_dc(dc) + { + Set(col); + } + + ~wxDCTextColourChanger() + { + if ( m_colFgOld.IsOk() ) + m_dc.SetTextForeground(m_colFgOld); + } + + void Set(const wxColour& col) + { + if ( !m_colFgOld.IsOk() ) + m_colFgOld = m_dc.GetTextForeground(); + m_dc.SetTextForeground(col); + } + +private: + wxDC& m_dc; + + wxColour m_colFgOld; + + wxDECLARE_NO_COPY_CLASS(wxDCTextColourChanger); +}; + +// ---------------------------------------------------------------------------- +// helper class: you can use it to temporarily change the DC pen and +// restore it automatically when the object goes out of scope +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDCPenChanger +{ +public: + wxDCPenChanger(wxDC& dc, const wxPen& pen) : m_dc(dc), m_penOld(dc.GetPen()) + { + m_dc.SetPen(pen); + } + + ~wxDCPenChanger() + { + if ( m_penOld.IsOk() ) + m_dc.SetPen(m_penOld); + } + +private: + wxDC& m_dc; + + wxPen m_penOld; + + wxDECLARE_NO_COPY_CLASS(wxDCPenChanger); +}; + +// ---------------------------------------------------------------------------- +// helper class: you can use it to temporarily change the DC brush and +// restore it automatically when the object goes out of scope +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDCBrushChanger +{ +public: + wxDCBrushChanger(wxDC& dc, const wxBrush& brush) : m_dc(dc), m_brushOld(dc.GetBrush()) + { + m_dc.SetBrush(brush); + } + + ~wxDCBrushChanger() + { + if ( m_brushOld.IsOk() ) + m_dc.SetBrush(m_brushOld); + } + +private: + wxDC& m_dc; + + wxBrush m_brushOld; + + wxDECLARE_NO_COPY_CLASS(wxDCBrushChanger); +}; + +// ---------------------------------------------------------------------------- +// another small helper class: sets the clipping region in its ctor and +// destroys it in the dtor +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDCClipper +{ +public: + wxDCClipper(wxDC& dc, const wxRegion& r) : m_dc(dc) + { dc.SetClippingRegion(r.GetBox()); } + wxDCClipper(wxDC& dc, const wxRect& r) : m_dc(dc) + { dc.SetClippingRegion(r.x, r.y, r.width, r.height); } + wxDCClipper(wxDC& dc, wxCoord x, wxCoord y, wxCoord w, wxCoord h) : m_dc(dc) + { dc.SetClippingRegion(x, y, w, h); } + + ~wxDCClipper() { m_dc.DestroyClippingRegion(); } + +private: + wxDC& m_dc; + + wxDECLARE_NO_COPY_CLASS(wxDCClipper); +}; + +// ---------------------------------------------------------------------------- +// helper class: you can use it to temporarily change the DC font and +// restore it automatically when the object goes out of scope +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDCFontChanger +{ +public: + wxDCFontChanger(wxDC& dc) + : m_dc(dc), m_fontOld() + { + } + + wxDCFontChanger(wxDC& dc, const wxFont& font) + : m_dc(dc), m_fontOld(dc.GetFont()) + { + m_dc.SetFont(font); + } + + void Set(const wxFont& font) + { + if ( !m_fontOld.IsOk() ) + m_fontOld = m_dc.GetFont(); + m_dc.SetFont(font); + } + + ~wxDCFontChanger() + { + if ( m_fontOld.IsOk() ) + m_dc.SetFont(m_fontOld); + } + +private: + wxDC& m_dc; + + wxFont m_fontOld; + + wxDECLARE_NO_COPY_CLASS(wxDCFontChanger); +}; + + +#endif // _WX_DC_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcbuffer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcbuffer.h new file mode 100644 index 0000000000..f4d27c7fb8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcbuffer.h @@ -0,0 +1,248 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dcbuffer.h +// Purpose: wxBufferedDC class +// Author: Ron Lee +// Modified by: Vadim Zeitlin (refactored, added bg preservation) +// Created: 16/03/02 +// Copyright: (c) Ron Lee +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCBUFFER_H_ +#define _WX_DCBUFFER_H_ + +#include "wx/dcmemory.h" +#include "wx/dcclient.h" +#include "wx/window.h" + +// Split platforms into two groups - those which have well-working +// double-buffering by default, and those which do not. +#if defined(__WXMAC__) || defined(__WXGTK20__) || defined(__WXDFB__) + #define wxALWAYS_NATIVE_DOUBLE_BUFFER 1 +#else + #define wxALWAYS_NATIVE_DOUBLE_BUFFER 0 +#endif + + +// ---------------------------------------------------------------------------- +// Double buffering helper. +// ---------------------------------------------------------------------------- + +// Assumes the buffer bitmap covers the entire scrolled window, +// and prepares the window DC accordingly +#define wxBUFFER_VIRTUAL_AREA 0x01 + +// Assumes the buffer bitmap only covers the client area; +// does not prepare the window DC +#define wxBUFFER_CLIENT_AREA 0x02 + +// Set when not using specific buffer bitmap. Note that this +// is private style and not returned by GetStyle. +#define wxBUFFER_USES_SHARED_BUFFER 0x04 + +class WXDLLIMPEXP_CORE wxBufferedDC : public wxMemoryDC +{ +public: + // Default ctor, must subsequently call Init for two stage construction. + wxBufferedDC() + : m_dc(NULL), + m_buffer(NULL), + m_style(0) + { + } + + // Construct a wxBufferedDC using a user supplied buffer. + wxBufferedDC(wxDC *dc, + wxBitmap& buffer = wxNullBitmap, + int style = wxBUFFER_CLIENT_AREA) + : m_dc(NULL), m_buffer(NULL) + { + Init(dc, buffer, style); + } + + // Construct a wxBufferedDC with an internal buffer of 'area' + // (where area is usually something like the size of the window + // being buffered) + wxBufferedDC(wxDC *dc, const wxSize& area, int style = wxBUFFER_CLIENT_AREA) + : m_dc(NULL), m_buffer(NULL) + { + Init(dc, area, style); + } + + // The usually desired action in the dtor is to blit the buffer. + virtual ~wxBufferedDC() + { + if ( m_dc ) + UnMask(); + } + + // These reimplement the actions of the ctors for two stage creation + void Init(wxDC *dc, + wxBitmap& buffer = wxNullBitmap, + int style = wxBUFFER_CLIENT_AREA) + { + InitCommon(dc, style); + + m_buffer = &buffer; + + UseBuffer(); + } + + void Init(wxDC *dc, const wxSize &area, int style = wxBUFFER_CLIENT_AREA) + { + InitCommon(dc, style); + + UseBuffer(area.x, area.y); + } + + // Blits the buffer to the dc, and detaches the dc from the buffer (so it + // can be effectively used once only). + // + // Usually called in the dtor or by the dtor of derived classes if the + // BufferedDC must blit before the derived class (which may own the dc it's + // blitting to) is destroyed. + void UnMask(); + + // Set and get the style + void SetStyle(int style) { m_style = style; } + int GetStyle() const { return m_style & ~wxBUFFER_USES_SHARED_BUFFER; } + +private: + // common part of Init()s + void InitCommon(wxDC *dc, int style) + { + wxASSERT_MSG( !m_dc, wxT("wxBufferedDC already initialised") ); + + m_dc = dc; + m_style = style; + } + + // check that the bitmap is valid and use it + void UseBuffer(wxCoord w = -1, wxCoord h = -1); + + // the underlying DC to which we copy everything drawn on this one in + // UnMask() + // + // NB: Without the existence of a wxNullDC, this must be a pointer, else it + // could probably be a reference. + wxDC *m_dc; + + // the buffer (selected in this DC), initially invalid + wxBitmap *m_buffer; + + // the buffering style + int m_style; + + wxSize m_area; + + DECLARE_DYNAMIC_CLASS(wxBufferedDC) + wxDECLARE_NO_COPY_CLASS(wxBufferedDC); +}; + + +// ---------------------------------------------------------------------------- +// Double buffered PaintDC. +// ---------------------------------------------------------------------------- + +// Creates a double buffered wxPaintDC, optionally allowing the +// user to specify their own buffer to use. +class WXDLLIMPEXP_CORE wxBufferedPaintDC : public wxBufferedDC +{ +public: + // If no bitmap is supplied by the user, a temporary one will be created. + wxBufferedPaintDC(wxWindow *window, wxBitmap& buffer, int style = wxBUFFER_CLIENT_AREA) + : m_paintdc(window) + { + // If we're buffering the virtual window, scale the paint DC as well + if (style & wxBUFFER_VIRTUAL_AREA) + window->PrepareDC( m_paintdc ); + + if( buffer.IsOk() ) + Init(&m_paintdc, buffer, style); + else + Init(&m_paintdc, GetBufferedSize(window, style), style); + } + + // If no bitmap is supplied by the user, a temporary one will be created. + wxBufferedPaintDC(wxWindow *window, int style = wxBUFFER_CLIENT_AREA) + : m_paintdc(window) + { + // If we're using the virtual window, scale the paint DC as well + if (style & wxBUFFER_VIRTUAL_AREA) + window->PrepareDC( m_paintdc ); + + Init(&m_paintdc, GetBufferedSize(window, style), style); + } + + // default copy ctor ok. + + virtual ~wxBufferedPaintDC() + { + // We must UnMask here, else by the time the base class + // does it, the PaintDC will have already been destroyed. + UnMask(); + } + +protected: + // return the size needed by the buffer: this depends on whether we're + // buffering just the currently shown part or the total (scrolled) window + static wxSize GetBufferedSize(wxWindow *window, int style) + { + return style & wxBUFFER_VIRTUAL_AREA ? window->GetVirtualSize() + : window->GetClientSize(); + } + +private: + wxPaintDC m_paintdc; + + DECLARE_ABSTRACT_CLASS(wxBufferedPaintDC) + wxDECLARE_NO_COPY_CLASS(wxBufferedPaintDC); +}; + + + +// +// wxAutoBufferedPaintDC is a wxPaintDC in toolkits which have double- +// buffering by default. Otherwise it is a wxBufferedPaintDC. Thus, +// you can only expect it work with a simple constructor that +// accepts single wxWindow* argument. +// +#if wxALWAYS_NATIVE_DOUBLE_BUFFER + #define wxAutoBufferedPaintDCBase wxPaintDC +#else + #define wxAutoBufferedPaintDCBase wxBufferedPaintDC +#endif + +class WXDLLIMPEXP_CORE wxAutoBufferedPaintDC : public wxAutoBufferedPaintDCBase +{ +public: + + wxAutoBufferedPaintDC(wxWindow* win) + : wxAutoBufferedPaintDCBase(win) + { + wxASSERT_MSG( win->GetBackgroundStyle() == wxBG_STYLE_PAINT, + "You need to call SetBackgroundStyle(wxBG_STYLE_PAINT) in ctor, " + "and also, if needed, paint the background in wxEVT_PAINT handler." + ); + } + + virtual ~wxAutoBufferedPaintDC() { } + +private: + wxDECLARE_NO_COPY_CLASS(wxAutoBufferedPaintDC); +}; + + + +// Check if the window is natively double buffered and will return a wxPaintDC +// if it is, a wxBufferedPaintDC otherwise. It is the caller's responsibility +// to delete the wxDC pointer when finished with it. +inline wxDC* wxAutoBufferedPaintDCFactory(wxWindow* window) +{ + if ( window->IsDoubleBuffered() ) + return new wxPaintDC(window); + else + return new wxBufferedPaintDC(window); +} + +#endif // _WX_DCBUFFER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcclient.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcclient.h new file mode 100644 index 0000000000..f4bf74f75f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcclient.h @@ -0,0 +1,62 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dcclient.h +// Purpose: wxClientDC base header +// Author: Julian Smart +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCCLIENT_H_BASE_ +#define _WX_DCCLIENT_H_BASE_ + +#include "wx/dc.h" + +//----------------------------------------------------------------------------- +// wxWindowDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowDC : public wxDC +{ +public: + wxWindowDC(wxWindow *win); + +protected: + wxWindowDC(wxDCImpl *impl) : wxDC(impl) { } + +private: + DECLARE_ABSTRACT_CLASS(wxWindowDC) +}; + +//----------------------------------------------------------------------------- +// wxClientDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClientDC : public wxWindowDC +{ +public: + wxClientDC(wxWindow *win); + +protected: + wxClientDC(wxDCImpl *impl) : wxWindowDC(impl) { } + +private: + DECLARE_ABSTRACT_CLASS(wxClientDC) +}; + +//----------------------------------------------------------------------------- +// wxPaintDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPaintDC : public wxClientDC +{ +public: + wxPaintDC(wxWindow *win); + +protected: + wxPaintDC(wxDCImpl *impl) : wxClientDC(impl) { } + +private: + DECLARE_ABSTRACT_CLASS(wxPaintDC) +}; + +#endif // _WX_DCCLIENT_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcgraph.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcgraph.h new file mode 100644 index 0000000000..06cca91298 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcgraph.h @@ -0,0 +1,226 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dcgraph.h +// Purpose: graphics context device bridge header +// Author: Stefan Csomor +// Modified by: +// Created: +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GRAPHICS_DC_H_ +#define _WX_GRAPHICS_DC_H_ + +#if wxUSE_GRAPHICS_CONTEXT + +#include "wx/dc.h" +#include "wx/geometry.h" +#include "wx/graphics.h" + +class WXDLLIMPEXP_FWD_CORE wxWindowDC; + + +class WXDLLIMPEXP_CORE wxGCDC: public wxDC +{ +public: + wxGCDC( const wxWindowDC& dc ); + wxGCDC( const wxMemoryDC& dc ); +#if wxUSE_PRINTING_ARCHITECTURE + wxGCDC( const wxPrinterDC& dc ); +#endif +#if defined(__WXMSW__) && wxUSE_ENH_METAFILE + wxGCDC( const wxEnhMetaFileDC& dc ); +#endif + wxGCDC(wxGraphicsContext* context); + + wxGCDC(); + virtual ~wxGCDC(); + + wxGraphicsContext* GetGraphicsContext() const; + void SetGraphicsContext( wxGraphicsContext* ctx ); + +#ifdef __WXMSW__ + // override wxDC virtual functions to provide access to HDC associated with + // this Graphics object (implemented in src/msw/graphics.cpp) + virtual WXHDC AcquireHDC(); + virtual void ReleaseHDC(WXHDC hdc); +#endif // __WXMSW__ + +private: + DECLARE_DYNAMIC_CLASS(wxGCDC) + wxDECLARE_NO_COPY_CLASS(wxGCDC); +}; + + +class WXDLLIMPEXP_CORE wxGCDCImpl: public wxDCImpl +{ +public: + wxGCDCImpl( wxDC *owner, const wxWindowDC& dc ); + wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc ); +#if wxUSE_PRINTING_ARCHITECTURE + wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc ); +#endif +#if defined(__WXMSW__) && wxUSE_ENH_METAFILE + wxGCDCImpl( wxDC *owner, const wxEnhMetaFileDC& dc ); +#endif + wxGCDCImpl( wxDC *owner ); + + virtual ~wxGCDCImpl(); + + // implement base class pure virtuals + // ---------------------------------- + + virtual void Clear(); + + virtual bool StartDoc( const wxString& message ); + virtual void EndDoc(); + + virtual void StartPage(); + virtual void EndPage(); + + // flushing the content of this dc immediately onto screen + virtual void Flush(); + + virtual void SetFont(const wxFont& font); + virtual void SetPen(const wxPen& pen); + virtual void SetBrush(const wxBrush& brush); + virtual void SetBackground(const wxBrush& brush); + virtual void SetBackgroundMode(int mode); + virtual void SetPalette(const wxPalette& palette); + + virtual void DestroyClippingRegion(); + + virtual wxCoord GetCharHeight() const; + virtual wxCoord GetCharWidth() const; + + virtual bool CanDrawBitmap() const; + virtual bool CanGetTextExtent() const; + virtual int GetDepth() const; + virtual wxSize GetPPI() const; + + virtual void SetLogicalFunction(wxRasterOperationMode function); + + virtual void SetTextForeground(const wxColour& colour); + virtual void SetTextBackground(const wxColour& colour); + + virtual void ComputeScaleAndOrigin(); + + wxGraphicsContext* GetGraphicsContext() const { return m_graphicContext; } + virtual void SetGraphicsContext( wxGraphicsContext* ctx ); + + virtual void* GetHandle() const; + + // the true implementations + virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, + wxFloodFillStyle style = wxFLOOD_SURFACE); + + virtual void DoGradientFillLinear(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour, + wxDirection nDirection = wxEAST); + + virtual void DoGradientFillConcentric(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour, + const wxPoint& circleCenter); + + virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const; + + virtual void DoDrawPoint(wxCoord x, wxCoord y); + +#if wxUSE_SPLINES + virtual void DoDrawSpline(const wxPointList *points); +#endif + + virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); + + virtual void DoDrawArc(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc); + + virtual void DoDrawCheckMark(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); + + virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, + double sa, double ea); + + virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, + wxCoord width, wxCoord height, + double radius); + virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + + virtual void DoCrossHair(wxCoord x, wxCoord y); + + virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); + virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, + bool useMask = false); + + virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); + virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, + double angle); + + virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); + + virtual bool DoStretchBlit(wxCoord xdest, wxCoord ydest, + wxCoord dstWidth, wxCoord dstHeight, + wxDC *source, + wxCoord xsrc, wxCoord ysrc, + wxCoord srcWidth, wxCoord srcHeight, + wxRasterOperationMode = wxCOPY, bool useMask = false, + wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); + + virtual void DoGetSize(int *,int *) const; + virtual void DoGetSizeMM(int* width, int* height) const; + + virtual void DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset); + virtual void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + virtual void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle); + + virtual void DoSetDeviceClippingRegion(const wxRegion& region); + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); + + virtual void DoGetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; + + virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const; + +#ifdef __WXMSW__ + virtual wxRect MSWApplyGDIPlusTransform(const wxRect& r) const; +#endif // __WXMSW__ + +protected: + // unused int parameter distinguishes this version, which does not create a + // wxGraphicsContext, in the expectation that the derived class will do it + wxGCDCImpl(wxDC* owner, int); + + // scaling variables + bool m_logicalFunctionSupported; + wxGraphicsMatrix m_matrixOriginal; + wxGraphicsMatrix m_matrixCurrent; + + double m_formerScaleX, m_formerScaleY; + + wxGraphicsContext* m_graphicContext; + +private: + void Init(wxGraphicsContext*); + + DECLARE_CLASS(wxGCDCImpl) + wxDECLARE_NO_COPY_CLASS(wxGCDCImpl); +}; + +#endif // wxUSE_GRAPHICS_CONTEXT +#endif // _WX_GRAPHICS_DC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcmemory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcmemory.h new file mode 100644 index 0000000000..d5f301c942 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcmemory.h @@ -0,0 +1,44 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dcmemory.h +// Purpose: wxMemoryDC base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCMEMORY_H_BASE_ +#define _WX_DCMEMORY_H_BASE_ + +#include "wx/dc.h" +#include "wx/bitmap.h" + +//----------------------------------------------------------------------------- +// wxMemoryDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMemoryDC: public wxDC +{ +public: + wxMemoryDC(); + wxMemoryDC( wxBitmap& bitmap ); + wxMemoryDC( wxDC *dc ); + + // select the given bitmap to draw on it + void SelectObject(wxBitmap& bmp); + + // select the given bitmap for read-only + void SelectObjectAsSource(const wxBitmap& bmp); + + // get selected bitmap + const wxBitmap& GetSelectedBitmap() const; + wxBitmap& GetSelectedBitmap(); + +private: + DECLARE_DYNAMIC_CLASS(wxMemoryDC) +}; + + +#endif + // _WX_DCMEMORY_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcmirror.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcmirror.h new file mode 100644 index 0000000000..42deb9771c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcmirror.h @@ -0,0 +1,299 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/dcmirror.h +// Purpose: wxMirrorDC class +// Author: Vadim Zeitlin +// Modified by: +// Created: 21.07.2003 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCMIRROR_H_ +#define _WX_DCMIRROR_H_ + +#include "wx/dc.h" + +// ---------------------------------------------------------------------------- +// wxMirrorDC allows to write the same code for horz/vertical layout +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMirrorDCImpl : public wxDCImpl +{ +public: + // constructs a mirror DC associated with the given real DC + // + // if mirror parameter is true, all vertical and horizontal coordinates are + // exchanged, otherwise this class behaves in exactly the same way as a + // plain DC + wxMirrorDCImpl(wxDC *owner, wxDCImpl& dc, bool mirror) + : wxDCImpl(owner), + m_dc(dc) + { + m_mirror = mirror; + } + + // wxDCBase operations + virtual void Clear() { m_dc.Clear(); } + virtual void SetFont(const wxFont& font) { m_dc.SetFont(font); } + virtual void SetPen(const wxPen& pen) { m_dc.SetPen(pen); } + virtual void SetBrush(const wxBrush& brush) { m_dc.SetBrush(brush); } + virtual void SetBackground(const wxBrush& brush) + { m_dc.SetBackground(brush); } + virtual void SetBackgroundMode(int mode) { m_dc.SetBackgroundMode(mode); } +#if wxUSE_PALETTE + virtual void SetPalette(const wxPalette& palette) + { m_dc.SetPalette(palette); } +#endif // wxUSE_PALETTE + virtual void DestroyClippingRegion() { m_dc.DestroyClippingRegion(); } + virtual wxCoord GetCharHeight() const { return m_dc.GetCharHeight(); } + virtual wxCoord GetCharWidth() const { return m_dc.GetCharWidth(); } + virtual bool CanDrawBitmap() const { return m_dc.CanDrawBitmap(); } + virtual bool CanGetTextExtent() const { return m_dc.CanGetTextExtent(); } + virtual int GetDepth() const { return m_dc.GetDepth(); } + virtual wxSize GetPPI() const { return m_dc.GetPPI(); } + virtual bool IsOk() const { return m_dc.IsOk(); } + virtual void SetMapMode(wxMappingMode mode) { m_dc.SetMapMode(mode); } + virtual void SetUserScale(double x, double y) + { m_dc.SetUserScale(GetX(x, y), GetY(x, y)); } + virtual void SetLogicalOrigin(wxCoord x, wxCoord y) + { m_dc.SetLogicalOrigin(GetX(x, y), GetY(x, y)); } + virtual void SetDeviceOrigin(wxCoord x, wxCoord y) + { m_dc.SetDeviceOrigin(GetX(x, y), GetY(x, y)); } + virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp) + { m_dc.SetAxisOrientation(GetX(xLeftRight, yBottomUp), + GetY(xLeftRight, yBottomUp)); } + virtual void SetLogicalFunction(wxRasterOperationMode function) + { m_dc.SetLogicalFunction(function); } + + virtual void* GetHandle() const + { return m_dc.GetHandle(); } + +protected: + // returns x and y if not mirroring or y and x if mirroring + wxCoord GetX(wxCoord x, wxCoord y) const { return m_mirror ? y : x; } + wxCoord GetY(wxCoord x, wxCoord y) const { return m_mirror ? x : y; } + double GetX(double x, double y) const { return m_mirror ? y : x; } + double GetY(double x, double y) const { return m_mirror ? x : y; } + bool GetX(bool x, bool y) const { return m_mirror ? y : x; } + bool GetY(bool x, bool y) const { return m_mirror ? x : y; } + + // same thing but for pointers + wxCoord *GetX(wxCoord *x, wxCoord *y) const { return m_mirror ? y : x; } + wxCoord *GetY(wxCoord *x, wxCoord *y) const { return m_mirror ? x : y; } + + // exchange x and y components of all points in the array if necessary + wxPoint* Mirror(int n, const wxPoint*& points) const + { + wxPoint* points_alloc = NULL; + if ( m_mirror ) + { + points_alloc = new wxPoint[n]; + for ( int i = 0; i < n; i++ ) + { + points_alloc[i].x = points[i].y; + points_alloc[i].y = points[i].x; + } + points = points_alloc; + } + return points_alloc; + } + + // wxDCBase functions + virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, + wxFloodFillStyle style = wxFLOOD_SURFACE) + { + return m_dc.DoFloodFill(GetX(x, y), GetY(x, y), col, style); + } + + virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const + { + return m_dc.DoGetPixel(GetX(x, y), GetY(x, y), col); + } + + + virtual void DoDrawPoint(wxCoord x, wxCoord y) + { + m_dc.DoDrawPoint(GetX(x, y), GetY(x, y)); + } + + virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) + { + m_dc.DoDrawLine(GetX(x1, y1), GetY(x1, y1), GetX(x2, y2), GetY(x2, y2)); + } + + virtual void DoDrawArc(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc) + { + wxFAIL_MSG( wxT("this is probably wrong") ); + + m_dc.DoDrawArc(GetX(x1, y1), GetY(x1, y1), + GetX(x2, y2), GetY(x2, y2), + xc, yc); + } + + virtual void DoDrawCheckMark(wxCoord x, wxCoord y, + wxCoord w, wxCoord h) + { + m_dc.DoDrawCheckMark(GetX(x, y), GetY(x, y), + GetX(w, h), GetY(w, h)); + } + + virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, + double sa, double ea) + { + wxFAIL_MSG( wxT("this is probably wrong") ); + + m_dc.DoDrawEllipticArc(GetX(x, y), GetY(x, y), + GetX(w, h), GetY(w, h), + sa, ea); + } + + virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h) + { + m_dc.DoDrawRectangle(GetX(x, y), GetY(x, y), GetX(w, h), GetY(w, h)); + } + + virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, + wxCoord w, wxCoord h, + double radius) + { + m_dc.DoDrawRoundedRectangle(GetX(x, y), GetY(x, y), + GetX(w, h), GetY(w, h), + radius); + } + + virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord w, wxCoord h) + { + m_dc.DoDrawEllipse(GetX(x, y), GetY(x, y), GetX(w, h), GetY(w, h)); + } + + virtual void DoCrossHair(wxCoord x, wxCoord y) + { + m_dc.DoCrossHair(GetX(x, y), GetY(x, y)); + } + + virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) + { + m_dc.DoDrawIcon(icon, GetX(x, y), GetY(x, y)); + } + + virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, + bool useMask = false) + { + m_dc.DoDrawBitmap(bmp, GetX(x, y), GetY(x, y), useMask); + } + + virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y) + { + // this is never mirrored + m_dc.DoDrawText(text, x, y); + } + + virtual void DoDrawRotatedText(const wxString& text, + wxCoord x, wxCoord y, double angle) + { + // this is never mirrored + m_dc.DoDrawRotatedText(text, x, y, angle); + } + + virtual bool DoBlit(wxCoord xdest, wxCoord ydest, + wxCoord w, wxCoord h, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop = wxCOPY, + bool useMask = false, + wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) + { + return m_dc.DoBlit(GetX(xdest, ydest), GetY(xdest, ydest), + GetX(w, h), GetY(w, h), + source, GetX(xsrc, ysrc), GetY(xsrc, ysrc), + rop, useMask, + GetX(xsrcMask, ysrcMask), GetX(xsrcMask, ysrcMask)); + } + + virtual void DoGetSize(int *w, int *h) const + { + m_dc.DoGetSize(GetX(w, h), GetY(w, h)); + } + + virtual void DoGetSizeMM(int *w, int *h) const + { + m_dc.DoGetSizeMM(GetX(w, h), GetY(w, h)); + } + + virtual void DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset) + { + wxPoint* points_alloc = Mirror(n, points); + + m_dc.DoDrawLines(n, points, + GetX(xoffset, yoffset), GetY(xoffset, yoffset)); + + delete[] points_alloc; + } + + virtual void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE) + { + wxPoint* points_alloc = Mirror(n, points); + + m_dc.DoDrawPolygon(n, points, + GetX(xoffset, yoffset), GetY(xoffset, yoffset), + fillStyle); + + delete[] points_alloc; + } + + virtual void DoSetDeviceClippingRegion(const wxRegion& WXUNUSED(region)) + { + wxFAIL_MSG( wxT("not implemented") ); + } + + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, + wxCoord w, wxCoord h) + { + m_dc.DoSetClippingRegion(GetX(x, y), GetY(x, y), GetX(w, h), GetY(w, h)); + } + + virtual void DoGetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const + { + // never mirrored + m_dc.DoGetTextExtent(string, x, y, descent, externalLeading, theFont); + } + +private: + wxDCImpl& m_dc; + + bool m_mirror; + + wxDECLARE_NO_COPY_CLASS(wxMirrorDCImpl); +}; + +class WXDLLIMPEXP_CORE wxMirrorDC : public wxDC +{ +public: + wxMirrorDC(wxDC& dc, bool mirror) + : wxDC(new wxMirrorDCImpl(this, *dc.GetImpl(), mirror)) + { + m_mirror = mirror; + } + + // helper functions which may be useful for the users of this class + wxSize Reflect(const wxSize& sizeOrig) + { + return m_mirror ? wxSize(sizeOrig.y, sizeOrig.x) : sizeOrig; + } + +private: + bool m_mirror; + + wxDECLARE_NO_COPY_CLASS(wxMirrorDC); +}; + +#endif // _WX_DCMIRROR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcprint.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcprint.h new file mode 100644 index 0000000000..6d84731116 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcprint.h @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dcprint.h +// Purpose: wxPrinterDC base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCPRINT_H_BASE_ +#define _WX_DCPRINT_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/dc.h" + +//----------------------------------------------------------------------------- +// wxPrinterDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPrinterDC : public wxDC +{ +public: + wxPrinterDC(); + wxPrinterDC(const wxPrintData& data); + + wxRect GetPaperRect() const; + int GetResolution() const; + +protected: + wxPrinterDC(wxDCImpl *impl) : wxDC(impl) { } + +private: + DECLARE_DYNAMIC_CLASS(wxPrinterDC) +}; + +#endif // wxUSE_PRINTING_ARCHITECTURE + +#endif // _WX_DCPRINT_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcps.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcps.h new file mode 100644 index 0000000000..659eb595f1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcps.h @@ -0,0 +1,17 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dcps.h +// Purpose: wxPostScriptDC base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCPS_H_BASE_ +#define _WX_DCPS_H_BASE_ + +#include "wx/generic/dcpsg.h" + +#endif + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcscreen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcscreen.h new file mode 100644 index 0000000000..391e91aacf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcscreen.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dcscreen.h +// Purpose: wxScreenDC base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCSCREEN_H_BASE_ +#define _WX_DCSCREEN_H_BASE_ + +#include "wx/defs.h" +#include "wx/dc.h" + +class WXDLLIMPEXP_CORE wxScreenDC : public wxDC +{ +public: + wxScreenDC(); + + static bool StartDrawingOnTop(wxWindow * WXUNUSED(window)) + { return true; } + static bool StartDrawingOnTop(wxRect * WXUNUSED(rect) = NULL) + { return true; } + static bool EndDrawingOnTop() + { return true; } + +private: + DECLARE_DYNAMIC_CLASS(wxScreenDC) +}; + + +#endif + // _WX_DCSCREEN_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcsvg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcsvg.h new file mode 100644 index 0000000000..c6485ff131 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dcsvg.h @@ -0,0 +1,227 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dcsvg.h +// Purpose: wxSVGFileDC +// Author: Chris Elliott +// Modified by: +// Created: +// Copyright: (c) Chris Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCSVG_H_ +#define _WX_DCSVG_H_ + +#include "wx/string.h" +#include "wx/dc.h" + +#if wxUSE_SVG + +#define wxSVGVersion wxT("v0100") + +#ifdef __BORLANDC__ +#pragma warn -8008 +#pragma warn -8066 +#endif + +class WXDLLIMPEXP_FWD_BASE wxFileOutputStream; + + + +class WXDLLIMPEXP_FWD_CORE wxSVGFileDC; + +class WXDLLIMPEXP_CORE wxSVGFileDCImpl : public wxDCImpl +{ +public: + wxSVGFileDCImpl( wxSVGFileDC *owner, const wxString &filename, + int width=320, int height=240, double dpi=72.0 ); + + virtual ~wxSVGFileDCImpl(); + + bool IsOk() const { return m_OK; } + + virtual bool CanDrawBitmap() const { return true; } + virtual bool CanGetTextExtent() const { return true; } + + virtual int GetDepth() const + { + wxFAIL_MSG(wxT("wxSVGFILEDC::GetDepth Call not implemented")); + return -1; + } + + virtual void Clear() + { + wxFAIL_MSG(wxT("wxSVGFILEDC::Clear() Call not implemented \nNot sensible for an output file?")); + } + + virtual void DestroyClippingRegion(); + + virtual wxCoord GetCharHeight() const; + virtual wxCoord GetCharWidth() const; + + virtual void SetClippingRegion(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), + wxCoord WXUNUSED(w), wxCoord WXUNUSED(h)) + { + wxFAIL_MSG(wxT("wxSVGFILEDC::SetClippingRegion not implemented")); + } + + virtual void SetPalette(const wxPalette& WXUNUSED(palette)) + { + wxFAIL_MSG(wxT("wxSVGFILEDC::SetPalette not implemented")); + } + + virtual void GetClippingBox(wxCoord *WXUNUSED(x), wxCoord *WXUNUSED(y), + wxCoord *WXUNUSED(w), wxCoord *WXUNUSED(h)) + { + wxFAIL_MSG(wxT("wxSVGFILEDC::GetClippingBox not implemented")); + } + + virtual void SetLogicalFunction(wxRasterOperationMode WXUNUSED(function)) + { + wxFAIL_MSG(wxT("wxSVGFILEDC::SetLogicalFunction Call not implemented")); + } + + virtual wxRasterOperationMode GetLogicalFunction() const + { + wxFAIL_MSG(wxT("wxSVGFILEDC::GetLogicalFunction() not implemented")); + return wxCOPY; + } + + virtual void SetBackground( const wxBrush &brush ); + virtual void SetBackgroundMode( int mode ); + virtual void SetBrush(const wxBrush& brush); + virtual void SetFont(const wxFont& font); + virtual void SetPen(const wxPen& pen); + + virtual void* GetHandle() const { return NULL; } + +private: + virtual bool DoGetPixel(wxCoord, wxCoord, wxColour *) const + { + wxFAIL_MSG(wxT("wxSVGFILEDC::DoGetPixel Call not implemented")); + return true; + } + + virtual bool DoBlit(wxCoord, wxCoord, wxCoord, wxCoord, wxDC *, + wxCoord, wxCoord, wxRasterOperationMode = wxCOPY, + bool = 0, int = -1, int = -1); + + virtual void DoCrossHair(wxCoord, wxCoord) + { + wxFAIL_MSG(wxT("wxSVGFILEDC::CrossHair Call not implemented")); + } + + virtual void DoDrawArc(wxCoord, wxCoord, wxCoord, wxCoord, wxCoord, wxCoord); + + virtual void DoDrawBitmap(const wxBitmap &, wxCoord, wxCoord, bool = false); + + virtual void DoDrawCheckMark(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + + virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + + virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, + double sa, double ea); + + virtual void DoDrawIcon(const wxIcon &, wxCoord, wxCoord); + + virtual void DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); + + virtual void DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset = 0, wxCoord yoffset = 0); + + virtual void DoDrawPoint(wxCoord, wxCoord); + + virtual void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle); + + virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + + virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, + double angle); + + virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, + wxCoord w, wxCoord h, + double radius = 20) ; + + virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); + + virtual bool DoFloodFill(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), + const wxColour& WXUNUSED(col), + wxFloodFillStyle WXUNUSED(style) = wxFLOOD_SURFACE) + { + wxFAIL_MSG(wxT("wxSVGFILEDC::DoFloodFill Call not implemented")); + return false; + } + + virtual void DoGetSize(int * x, int *y) const + { + if ( x ) + *x = m_width; + if ( y ) + *y = m_height; + } + + virtual void DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *font = NULL) const; + + virtual void DoSetDeviceClippingRegion(const wxRegion& WXUNUSED(region)) + { + wxFAIL_MSG(wxT("wxSVGFILEDC::DoSetDeviceClippingRegion not yet implemented")); + } + + virtual void DoSetClippingRegion(int x, int y, int width, int height); + + virtual void DoGetSizeMM( int *width, int *height ) const; + + virtual wxSize GetPPI() const; + + void Init (const wxString &filename, int width, int height, double dpi); + + void write( const wxString &s ); + +private: + // If m_graphics_changed is true, close the current element and start a + // new one for the last pen/brush change. + void NewGraphicsIfNeeded(); + + // Open a new graphics group setting up all the attributes according to + // their current values in wxDC. + void DoStartNewGraphics(); + + wxFileOutputStream *m_outfile; + wxString m_filename; + int m_sub_images; // number of png format images we have + bool m_OK; + bool m_graphics_changed; // set by Set{Brush,Pen}() + int m_width, m_height; + double m_dpi; + + // The clipping nesting level is incremented by every call to + // SetClippingRegion() and reset when DestroyClippingRegion() is called. + size_t m_clipNestingLevel; + + // Unique ID for every clipping graphics group: this is simply always + // incremented in each SetClippingRegion() call. + size_t m_clipUniqueId; + + DECLARE_ABSTRACT_CLASS(wxSVGFileDCImpl) +}; + + +class WXDLLIMPEXP_CORE wxSVGFileDC : public wxDC +{ +public: + wxSVGFileDC(const wxString& filename, + int width = 320, + int height = 240, + double dpi = 72.0) + : wxDC(new wxSVGFileDCImpl(this, filename, width, height, dpi)) + { + } +}; + +#endif // wxUSE_SVG + +#endif // _WX_DCSVG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dde.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dde.h new file mode 100644 index 0000000000..d6524e1ff6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dde.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dde.h +// Purpose: DDE base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DDE_H_BASE_ +#define _WX_DDE_H_BASE_ + +#include "wx/list.h" + +class WXDLLIMPEXP_FWD_BASE wxDDEClient; +class WXDLLIMPEXP_FWD_BASE wxDDEServer; +class WXDLLIMPEXP_FWD_BASE wxDDEConnection; + +WX_DECLARE_USER_EXPORTED_LIST(wxDDEClient, wxDDEClientList, WXDLLIMPEXP_BASE); +WX_DECLARE_USER_EXPORTED_LIST(wxDDEServer, wxDDEServerList, WXDLLIMPEXP_BASE); +WX_DECLARE_USER_EXPORTED_LIST(wxDDEConnection, wxDDEConnectionList, WXDLLIMPEXP_BASE); + +#if defined(__WINDOWS__) + #include "wx/msw/dde.h" +#else + #error DDE is only supported under Windows +#endif + +#endif + // _WX_DDE_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/debug.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/debug.h new file mode 100644 index 0000000000..f80f7be680 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/debug.h @@ -0,0 +1,496 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/debug.h +// Purpose: Misc debug functions and macros +// Author: Vadim Zeitlin +// Created: 29/01/98 +// Copyright: (c) 1998-2009 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DEBUG_H_ +#define _WX_DEBUG_H_ + +#if !defined(__WXWINCE__) + #include +#endif // systems without assert.h + +#include // for CHAR_BIT used below + +#include "wx/chartype.h" // for __TFILE__ and wxChar +#include "wx/cpp.h" // for __WXFUNCTION__ +#include "wx/dlimpexp.h" // for WXDLLIMPEXP_FWD_BASE + +class WXDLLIMPEXP_FWD_BASE wxString; +class WXDLLIMPEXP_FWD_BASE wxCStrData; + +// ---------------------------------------------------------------------------- +// Defines controlling the debugging macros +// ---------------------------------------------------------------------------- + +/* + wxWidgets can be built with several different levels of debug support + specified by the value of wxDEBUG_LEVEL constant: + + 0: No assertion macros at all, this should only be used when optimizing + for resource-constrained systems (typically embedded ones). + 1: Default level, most of the assertions are enabled. + 2: Maximal (at least for now): asserts which are "expensive" + (performance-wise) or only make sense for finding errors in wxWidgets + itself, as opposed to bugs in applications using it, are also enabled. + */ + +// unless wxDEBUG_LEVEL is predefined (by configure or via wx/setup.h under +// Windows), use the default +#if !defined(wxDEBUG_LEVEL) + #define wxDEBUG_LEVEL 1 +#endif // !defined(wxDEBUG_LEVEL) + +/* + __WXDEBUG__ is defined when wxDEBUG_LEVEL != 0. This is done mostly for + compatibility but it also provides a simpler way to check if asserts and + debug logging is enabled at all. + */ +#if wxDEBUG_LEVEL > 0 + #ifndef __WXDEBUG__ + #define __WXDEBUG__ + #endif +#else + #undef __WXDEBUG__ +#endif + +// Finally there is also a very old WXDEBUG macro not used anywhere at all, it +// is only defined for compatibility. +#ifdef __WXDEBUG__ + #if !defined(WXDEBUG) || !WXDEBUG + #undef WXDEBUG + #define WXDEBUG 1 + #endif // !WXDEBUG +#endif // __WXDEBUG__ + +// ---------------------------------------------------------------------------- +// Handling assertion failures +// ---------------------------------------------------------------------------- + +/* + Type for the function called in case of assert failure, see + wxSetAssertHandler(). + */ +typedef void (*wxAssertHandler_t)(const wxString& file, + int line, + const wxString& func, + const wxString& cond, + const wxString& msg); + +#if wxDEBUG_LEVEL + +// the global assert handler function, if it is NULL asserts don't check their +// conditions +extern WXDLLIMPEXP_DATA_BASE(wxAssertHandler_t) wxTheAssertHandler; + +/* + Sets the function to be called in case of assertion failure. + + The default assert handler forwards to wxApp::OnAssertFailure() whose + default behaviour is, in turn, to show the standard assertion failure + dialog if a wxApp object exists or shows the same dialog itself directly + otherwise. + + While usually it is enough -- and more convenient -- to just override + OnAssertFailure(), to handle all assertion failures, including those + occurring even before wxApp object creation or after its destruction you + need to provide your assertion handler function. + + This function also provides a simple way to disable all asserts: simply + pass NULL pointer to it. Doing this will result in not even evaluating + assert conditions at all, avoiding almost all run-time cost of asserts. + + Notice that this function is not MT-safe, so you should call it before + starting any other threads. + + The return value of this function is the previous assertion handler. It can + be called after any pre-processing by your handler and can also be restored + later if you uninstall your handler. + */ +inline wxAssertHandler_t wxSetAssertHandler(wxAssertHandler_t handler) +{ + const wxAssertHandler_t old = wxTheAssertHandler; + wxTheAssertHandler = handler; + return old; +} + +/* + Reset the default assert handler. + + This may be used to enable asserts, which are disabled by default in this + case, for programs built in release build (NDEBUG defined). + */ +extern void WXDLLIMPEXP_BASE wxSetDefaultAssertHandler(); + +#else // !wxDEBUG_LEVEL + +// provide empty stubs in case assertions are completely disabled +// +// NB: can't use WXUNUSED() here as we're included from wx/defs.h before it is +// defined +inline wxAssertHandler_t wxSetAssertHandler(wxAssertHandler_t /* handler */) +{ + return NULL; +} + +inline void wxSetDefaultAssertHandler() { } + +#endif // wxDEBUG_LEVEL/!wxDEBUG_LEVEL + +// simply a synonym for wxSetAssertHandler(NULL) +inline void wxDisableAsserts() { wxSetAssertHandler(NULL); } + +/* + A macro which disables asserts for applications compiled in release build. + + By default, wxIMPLEMENT_APP (or rather wxIMPLEMENT_WXWIN_MAIN) disable the + asserts in the applications compiled in the release build by calling this. + It does nothing if NDEBUG is not defined. + */ +#ifdef NDEBUG + #define wxDISABLE_ASSERTS_IN_RELEASE_BUILD() wxDisableAsserts() +#else + #define wxDISABLE_ASSERTS_IN_RELEASE_BUILD() +#endif + +#if wxDEBUG_LEVEL + +/* + wxOnAssert() is used by the debugging macros defined below. Different + overloads are needed because these macros can be used with or without wxT(). + + All of them are implemented in src/common/appcmn.cpp and unconditionally + call wxTheAssertHandler so the caller must check that it is non-NULL + (assert macros do it). + */ + +#if wxUSE_UNICODE + +// these overloads are the ones typically used by debugging macros: we have to +// provide wxChar* msg version because it's common to use wxT() in the macros +// and finally, we can't use const wx(char)* msg = NULL, because that would +// be ambiguous +// +// also notice that these functions can't be inline as wxString is not defined +// yet (and can't be as wxString code itself may use assertions) +extern WXDLLIMPEXP_BASE void wxOnAssert(const char *file, + int line, + const char *func, + const char *cond); + +extern WXDLLIMPEXP_BASE void wxOnAssert(const char *file, + int line, + const char *func, + const char *cond, + const char *msg); + +extern WXDLLIMPEXP_BASE void wxOnAssert(const char *file, + int line, + const char *func, + const char *cond, + const wxChar *msg) ; +#endif /* wxUSE_UNICODE */ + +// this version is for compatibility with wx 2.8 Unicode build only, we don't +// use it ourselves any more except in ANSI-only build in which case it is all +// we need +extern WXDLLIMPEXP_BASE void wxOnAssert(const wxChar *file, + int line, + const char *func, + const wxChar *cond, + const wxChar *msg = NULL); + +// these overloads work when msg passed to debug macro is a string and we +// also have to provide wxCStrData overload to resolve ambiguity which would +// otherwise arise from wxASSERT( s.c_str() ) +extern WXDLLIMPEXP_BASE void wxOnAssert(const wxString& file, + int line, + const wxString& func, + const wxString& cond, + const wxString& msg); + +extern WXDLLIMPEXP_BASE void wxOnAssert(const wxString& file, + int line, + const wxString& func, + const wxString& cond); + +extern WXDLLIMPEXP_BASE void wxOnAssert(const char *file, + int line, + const char *func, + const char *cond, + const wxCStrData& msg); + +extern WXDLLIMPEXP_BASE void wxOnAssert(const char *file, + int line, + const char *func, + const char *cond, + const wxString& msg); + +#endif // wxDEBUG_LEVEL + + +// ---------------------------------------------------------------------------- +// Debugging macros +// ---------------------------------------------------------------------------- + +/* + Assertion macros: check if the condition is true and call assert handler + (which will by default notify the user about failure) if it isn't. + + wxASSERT and wxFAIL macros as well as wxTrap() function do nothing at all + if wxDEBUG_LEVEL is 0 however they do check their conditions at default + debug level 1, unlike the previous wxWidgets versions. + + wxASSERT_LEVEL_2 is meant to be used for "expensive" asserts which should + normally be disabled because they have a big impact on performance and so + this macro only does anything if wxDEBUG_LEVEL >= 2. + */ +#if wxDEBUG_LEVEL + // wxTrap() can be used to break into the debugger unconditionally + // (assuming the program is running under debugger, of course). + // + // If possible, we prefer to define it as a macro rather than as a function + // to open the debugger at the position where we trapped and not inside the + // trap function itself which is not very useful. + #if wxCHECK_VISUALC_VERSION(7) + #define wxTrap() __debugbreak() + #else + extern WXDLLIMPEXP_BASE void wxTrap(); + #endif // Win VisualC + + // Global flag used to indicate that assert macros should call wxTrap(): it + // is set by the default assert handler if the user answers yes to the + // question of whether to trap. + extern WXDLLIMPEXP_DATA_BASE(bool) wxTrapInAssert; + + // This macro checks if the condition is true and calls the assert handler + // with the provided message if it isn't and finally traps if the special + // flag indicating that it should do it was set by the handler. + // + // Notice that we don't use the handler return value for compatibility + // reasons (if we changed its return type, we'd need to change wxApp:: + // OnAssertFailure() too which would break user code overriding it), hence + // the need for the ugly global flag. + #define wxASSERT_MSG(cond, msg) \ + wxSTATEMENT_MACRO_BEGIN \ + if ( wxTheAssertHandler && !(cond) && \ + (wxOnAssert(__FILE__, __LINE__, __WXFUNCTION__, \ + #cond, msg), wxTrapInAssert) ) \ + { \ + wxTrapInAssert = false; \ + wxTrap(); \ + } \ + wxSTATEMENT_MACRO_END + + // a version without any additional message, don't use unless condition + // itself is fully self-explanatory + #define wxASSERT(cond) wxASSERT_MSG(cond, (const char*)NULL) + + // wxFAIL is a special form of assert: it always triggers (and so is + // usually used in normally unreachable code) + #define wxFAIL_COND_MSG(cond, msg) \ + wxSTATEMENT_MACRO_BEGIN \ + if ( wxTheAssertHandler && \ + (wxOnAssert(__FILE__, __LINE__, __WXFUNCTION__, \ + cond, msg), wxTrapInAssert) ) \ + { \ + wxTrapInAssert = false; \ + wxTrap(); \ + } \ + wxSTATEMENT_MACRO_END + + #define wxFAIL_MSG(msg) wxFAIL_COND_MSG("Assert failure", msg) + #define wxFAIL wxFAIL_MSG((const char*)NULL) +#else // !wxDEBUG_LEVEL + #define wxTrap() + + #define wxASSERT(cond) + #define wxASSERT_MSG(cond, msg) + #define wxFAIL + #define wxFAIL_MSG(msg) + #define wxFAIL_COND_MSG(cond, msg) +#endif // wxDEBUG_LEVEL + +#if wxDEBUG_LEVEL >= 2 + #define wxASSERT_LEVEL_2_MSG(cond, msg) wxASSERT_MSG(cond, msg) + #define wxASSERT_LEVEL_2(cond) wxASSERT(cond) +#else // wxDEBUG_LEVEL < 2 + #define wxASSERT_LEVEL_2_MSG(cond, msg) + #define wxASSERT_LEVEL_2(cond) +#endif + +// This is simply a wrapper for the standard abort() which is not available +// under all platforms. +// +// It isn't really debug-related but there doesn't seem to be any better place +// for it, so declare it here and define it in appbase.cpp, together with +// wxTrap(). +extern void WXDLLIMPEXP_BASE wxAbort(); + +/* + wxCHECK macros always check their conditions, setting debug level to 0 only + makes them silent in case of failure, otherwise -- including at default + debug level 1 -- they call the assert handler if the condition is false + + They are supposed to be used only in invalid situation: for example, an + invalid parameter (e.g. a NULL pointer) is passed to a function. Instead of + dereferencing it and causing core dump the function might use + + wxCHECK_RET( p != NULL, "pointer can't be NULL" ) +*/ + +// the generic macro: takes the condition to check, the statement to be executed +// in case the condition is false and the message to pass to the assert handler +#define wxCHECK2_MSG(cond, op, msg) \ + if ( cond ) \ + {} \ + else \ + { \ + wxFAIL_COND_MSG(#cond, msg); \ + op; \ + } \ + struct wxDummyCheckStruct /* just to force a semicolon */ + +// check which returns with the specified return code if the condition fails +#define wxCHECK_MSG(cond, rc, msg) wxCHECK2_MSG(cond, return rc, msg) + +// check that expression is true, "return" if not (also FAILs in debug mode) +#define wxCHECK(cond, rc) wxCHECK_MSG(cond, rc, (const char*)NULL) + +// check that expression is true, perform op if not +#define wxCHECK2(cond, op) wxCHECK2_MSG(cond, op, (const char*)NULL) + +// special form of wxCHECK2: as wxCHECK, but for use in void functions +// +// NB: there is only one form (with msg parameter) and it's intentional: +// there is no other way to tell the caller what exactly went wrong +// from the void function (of course, the function shouldn't be void +// to begin with...) +#define wxCHECK_RET(cond, msg) wxCHECK2_MSG(cond, return, msg) + + +// ---------------------------------------------------------------------------- +// Compile time asserts +// +// Unlike the normal assert and related macros above which are checked during +// the program run-time the macros below will result in a compilation error if +// the condition they check is false. This is usually used to check the +// expressions containing sizeof()s which cannot be tested with the +// preprocessor. If you can use the #if's, do use them as you can give a more +// detailed error message then. +// ---------------------------------------------------------------------------- + +/* + How this works (you don't have to understand it to be able to use the + macros): we rely on the fact that it is invalid to define a named bit field + in a struct of width 0. All the rest are just the hacks to minimize the + possibility of the compiler warnings when compiling this macro: in + particular, this is why we define a struct and not an object (which would + result in a warning about unused variable) and a named struct (otherwise we'd + get a warning about an unnamed struct not used to define an object!). + */ + +#define wxMAKE_UNIQUE_ASSERT_NAME wxMAKE_UNIQUE_NAME(wxAssert_) + +/* + The second argument of this macro must be a valid C++ identifier and not a + string. I.e. you should use it like this: + + wxCOMPILE_TIME_ASSERT( sizeof(int) >= 2, YourIntsAreTooSmall ); + + It may be used both within a function and in the global scope. +*/ +#if defined(__WATCOMC__) + /* avoid "unused symbol" warning */ + #define wxCOMPILE_TIME_ASSERT(expr, msg) \ + class wxMAKE_UNIQUE_ASSERT_NAME { \ + unsigned int msg: expr; \ + wxMAKE_UNIQUE_ASSERT_NAME() { wxUnusedVar(msg); } \ + } +#elif defined( __VMS ) +namespace wxdebug{ + +// HP aCC cannot deal with missing names for template value parameters +template struct STATIC_ASSERTION_FAILURE; + +template <> struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; + +// HP aCC cannot deal with missing names for template value parameters +template struct static_assert_test{}; + +} + #define WX_JOIN( X, Y ) X##Y + #define WX_STATIC_ASSERT_BOOL_CAST(x) (bool)(x) + #define wxCOMPILE_TIME_ASSERT(expr, msg) \ + typedef ::wxdebug::static_assert_test<\ + sizeof(::wxdebug::STATIC_ASSERTION_FAILURE< WX_STATIC_ASSERT_BOOL_CAST( expr ) >)>\ + WX_JOIN(wx_static_assert_typedef_, __LINE__) +#else + #define wxCOMPILE_TIME_ASSERT(expr, msg) \ + struct wxMAKE_UNIQUE_ASSERT_NAME { unsigned int msg: expr; } +#endif + +/* + When using VC++ 6 with "Edit and Continue" on, the compiler completely + mishandles __LINE__ and so wxCOMPILE_TIME_ASSERT() doesn't work, provide a + way to make "unique" assert names by specifying a unique prefix explicitly + */ +#define wxMAKE_UNIQUE_ASSERT_NAME2(text) wxCONCAT(wxAssert_, text) + +#define wxCOMPILE_TIME_ASSERT2(expr, msg, text) \ + struct wxMAKE_UNIQUE_ASSERT_NAME2(text) { unsigned int msg: expr; } + +// helpers for wxCOMPILE_TIME_ASSERT below, for private use only +#define wxMAKE_BITSIZE_MSG(type, size) type ## SmallerThan ## size ## Bits + +// a special case of compile time assert: check that the size of the given type +// is at least the given number of bits +#define wxASSERT_MIN_BITSIZE(type, size) \ + wxCOMPILE_TIME_ASSERT(sizeof(type) * CHAR_BIT >= size, \ + wxMAKE_BITSIZE_MSG(type, size)) + + +// ---------------------------------------------------------------------------- +// other miscellaneous debugger-related functions +// ---------------------------------------------------------------------------- + +/* + Return true if we're running under debugger. + + Currently only really works under Win32 and just returns false elsewhere. + */ +#if defined(__WIN32__) + extern bool WXDLLIMPEXP_BASE wxIsDebuggerRunning(); +#else // !Mac + inline bool wxIsDebuggerRunning() { return false; } +#endif // Mac/!Mac + +// An assert helper used to avoid warning when testing constant expressions, +// i.e. wxASSERT( sizeof(int) == 4 ) can generate a compiler warning about +// expression being always true, but not using +// wxASSERT( wxAssertIsEqual(sizeof(int), 4) ) +// +// NB: this is made obsolete by wxCOMPILE_TIME_ASSERT() and should no +// longer be used. +extern bool WXDLLIMPEXP_BASE wxAssertIsEqual(int x, int y); + +// Use of wxFalse instead of false suppresses compiler warnings about testing +// constant expression +extern WXDLLIMPEXP_DATA_BASE(const bool) wxFalse; + +#define wxAssertFailure wxFalse + +// This is similar to WXUNUSED() and useful for parameters which are only used +// in assertions. +#if wxDEBUG_LEVEL + #define WXUNUSED_UNLESS_DEBUG(param) param +#else + #define WXUNUSED_UNLESS_DEBUG(param) WXUNUSED(param) +#endif + + +#endif // _WX_DEBUG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/debugrpt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/debugrpt.h new file mode 100644 index 0000000000..421bede975 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/debugrpt.h @@ -0,0 +1,247 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/debugrpt.h +// Purpose: declaration of wxDebugReport class +// Author: Vadim Zeitlin +// Created: 2005-01-17 +// Copyright: (c) 2005 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DEBUGRPT_H_ +#define _WX_DEBUGRPT_H_ + +#include "wx/defs.h" + +#if wxUSE_DEBUGREPORT && wxUSE_XML + +#include "wx/string.h" +#include "wx/arrstr.h" + +class WXDLLIMPEXP_FWD_XML wxXmlNode; + +// ---------------------------------------------------------------------------- +// wxDebugReport: generate a debug report, processing is done in derived class +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_QA wxDebugReport +{ +public: + // this is used for the functions which may report either the current state + // or the state during the last (fatal) exception + enum Context { Context_Current, Context_Exception }; + + + // ctor creates a temporary directory where we create the files which will + // be included in the report, use IsOk() to check for errors + wxDebugReport(); + + // dtor normally destroys the temporary directory created in the ctor (with + // all the files it contains), call Reset() to prevent this from happening + virtual ~wxDebugReport(); + + // return the name of the directory used for this report + const wxString& GetDirectory() const { return m_dir; } + + // return true if the object was successfully initialized + bool IsOk() const { return !GetDirectory().empty(); } + + // reset the directory name we use, the object can't be used any more after + // this as it becomes invalid/uninitialized + void Reset() { m_dir.clear(); } + + + // add another file to the report: the file must already exist, its name + // can be either absolute in which case it is copied to the debug report + // directory or relative to GetDirectory() + // + // description is shown to the user in the report summary + virtual void AddFile(const wxString& filename, const wxString& description); + + // convenience function: write the given text to a file with the given name + // and then add it to the report (the difference with AddFile() is that the + // file will be created by this function and doesn't have to already exist) + bool AddText(const wxString& filename, + const wxString& text, + const wxString& description); + +#if wxUSE_STACKWALKER + // add an XML file containing the current or exception context and the + // stack trace + bool AddCurrentContext() { return AddContext(Context_Current); } + bool AddExceptionContext() { return AddContext(Context_Exception); } + virtual bool AddContext(Context ctx); +#endif + +#if wxUSE_CRASHREPORT + // add a file with crash report + bool AddCurrentDump() { return AddDump(Context_Current); } + bool AddExceptionDump() { return AddDump(Context_Exception); } + virtual bool AddDump(Context ctx); +#endif // wxUSE_CRASHREPORT + + // add all available information to the report + void AddAll(Context context = Context_Exception); + + + // process this report: the base class simply notifies the user that the + // report has been generated, this is usually not enough -- instead you + // should override this method to do something more useful to you + bool Process(); + + // get the name used as base name for various files, by default + // wxApp::GetName() + virtual wxString GetReportName() const; + + // get the files in this report + size_t GetFilesCount() const { return m_files.GetCount(); } + bool GetFile(size_t n, wxString *name, wxString *desc) const; + + // remove the file from report: this is used by wxDebugReportPreview to + // allow the user to remove files potentially containing private + // information from the report + void RemoveFile(const wxString& name); + +protected: +#if wxUSE_STACKWALKER + // used by AddContext() + virtual bool DoAddSystemInfo(wxXmlNode *nodeSystemInfo); + virtual bool DoAddLoadedModules(wxXmlNode *nodeModules); + virtual bool DoAddExceptionInfo(wxXmlNode *nodeContext); + virtual void DoAddCustomContext(wxXmlNode * WXUNUSED(nodeRoot)) { } +#endif + + // used by Process() + virtual bool DoProcess(); + +private: + // name of the report directory + wxString m_dir; + + // the arrays of files in this report and their descriptions + wxArrayString m_files, + m_descriptions; +}; + +#if wxUSE_ZIPSTREAM + +// ---------------------------------------------------------------------------- +// wxDebugReportCompress: compress all files of this debug report in a .ZIP +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_QA wxDebugReportCompress : public wxDebugReport +{ +public: + wxDebugReportCompress() { } + + // you can optionally specify the directory and/or name of the file where + // the debug report should be generated, a default location under the + // directory containing temporary files will be used if you don't + // + // both of these functions should be called before Process()ing the report + // if they're called at all + void SetCompressedFileDirectory(const wxString& dir); + void SetCompressedFileBaseName(const wxString& name); + + // returns the full path of the compressed file (empty if creation failed) + const wxString& GetCompressedFileName() const { return m_zipfile; } + +protected: + virtual bool DoProcess(); + +private: + // user-specified file directory/base name, use defaults if empty + wxString m_zipDir, + m_zipName; + + // full path to the ZIP file we created + wxString m_zipfile; +}; + +// ---------------------------------------------------------------------------- +// wxDebugReportUploader: uploads compressed file using HTTP POST request +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_QA wxDebugReportUpload : public wxDebugReportCompress +{ +public: + // this class will upload the compressed file created by its base class to + // an HTML multipart/form-data form at the specified address + // + // the URL is the base address, input is the name of the "type=file" + // control on the form used for the file name and action is the value of + // the form action field + wxDebugReportUpload(const wxString& url, + const wxString& input, + const wxString& action, + const wxString& curl = wxT("curl")); + +protected: + virtual bool DoProcess(); + + // this function may be overridden in a derived class to show the output + // from curl: this may be an HTML page or anything else that the server + // returned + // + // return value becomes the return value of Process() + virtual bool OnServerReply(const wxArrayString& WXUNUSED(reply)) + { + return true; + } + +private: + // the full URL to use with HTTP POST request + wxString m_uploadURL; + + // the name of the input field containing the file name in the form at + // above URL + wxString m_inputField; + + // the curl command (by default it is just "curl" but could be full path to + // curl or a wrapper script with curl-compatible syntax) + wxString m_curlCmd; +}; + +#endif // wxUSE_ZIPSTREAM + + +// ---------------------------------------------------------------------------- +// wxDebugReportPreview: presents the debug report to the user and allows him +// to veto report entirely or remove some parts of it +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_QA wxDebugReportPreview +{ +public: + // ctor is trivial + wxDebugReportPreview() { } + + // present the report to the user and allow him to modify it by removing + // some or all of the files and, potentially, adding some notes + // + // return true if the report should be processed or false if the user chose + // to cancel report generation or removed all files from it + virtual bool Show(wxDebugReport& dbgrpt) const = 0; + + // dtor is trivial as well but should be virtual for a base class + virtual ~wxDebugReportPreview() { } +}; + +#if wxUSE_GUI + +// ---------------------------------------------------------------------------- +// wxDebugReportPreviewStd: standard debug report preview window +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_QA wxDebugReportPreviewStd : public wxDebugReportPreview +{ +public: + wxDebugReportPreviewStd() { } + + virtual bool Show(wxDebugReport& dbgrpt) const; +}; + +#endif // wxUSE_GUI + +#endif // wxUSE_DEBUGREPORT && wxUSE_XML + +#endif // _WX_DEBUGRPT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/defs.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/defs.h new file mode 100644 index 0000000000..6dc716a696 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/defs.h @@ -0,0 +1,3544 @@ +/* + * Name: wx/defs.h + * Purpose: Declarations/definitions common to all wx source files + * Author: Julian Smart and others + * Modified by: Ryan Norton (Converted to C) + * Created: 01/02/97 + * Copyright: (c) Julian Smart + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_DEFS_H_ +#define _WX_DEFS_H_ + +/* + NOTE: this symbol will be replaced with "WXWIN_COMPATIBILITY_3_0" as soon + as the development branch for 3.1 is created + */ +#define FUTURE_WXWIN_COMPATIBILITY_3_0 1 +#define wxDEPRECATED_FUTURE( x ) x + +/* ---------------------------------------------------------------------------- */ +/* compiler and OS identification */ +/* ---------------------------------------------------------------------------- */ + +#include "wx/platform.h" + +#ifdef __cplusplus +/* Make sure the environment is set correctly */ +# if defined(__WXMSW__) && defined(__X__) +# error "Target can't be both X and MSW" +# elif !defined(__WXMOTIF__) && \ + !defined(__WXMSW__) && \ + !defined(__WXGTK__) && \ + !defined(__WXPM__) && \ + !defined(__WXOSX_CARBON__) && \ + !defined(__WXOSX_COCOA__) && \ + !defined(__WXOSX_IPHONE__) && \ + !defined(__WXCOCOA__) && \ + !defined(__X__) && \ + !defined(__WXDFB__) && \ + !defined(__WXX11__) && \ + wxUSE_GUI +# ifdef __UNIX__ +# error "No Target! You should use wx-config program for compilation flags!" +# else /* !Unix */ +# error "No Target! You should use supplied makefiles for compilation!" +# endif /* Unix/!Unix */ +# endif +#endif /*__cplusplus*/ + +#ifndef __WXWINDOWS__ + #define __WXWINDOWS__ 1 +#endif + +#ifndef wxUSE_BASE + /* by default consider that this is a monolithic build */ + #define wxUSE_BASE 1 +#endif + +#if !wxUSE_GUI && !defined(__WXBASE__) + #define __WXBASE__ +#endif + +/* suppress some Visual C++ warnings */ +#ifdef __VISUALC__ + /* the only "real" warning here is 4244 but there are just too many of them */ + /* in our code... one day someone should go and fix them but until then... */ +# pragma warning(disable:4097) /* typedef used as class */ +# pragma warning(disable:4201) /* nonstandard extension used: nameless struct/union */ +# pragma warning(disable:4244) /* conversion from double to float */ +# pragma warning(disable:4355) /* 'this' used in base member initializer list */ +# pragma warning(disable:4511) /* copy ctor couldn't be generated */ +# pragma warning(disable:4512) /* operator=() couldn't be generated */ +# pragma warning(disable:4514) /* unreferenced inline func has been removed */ +# pragma warning(disable:4710) /* function not inlined */ + + /* + TODO: this warning should really be enabled as it can be genuinely + useful, check where does it occur in wxWidgets + */ + #pragma warning(disable: 4127) /* conditional expression is constant */ + + /* There are too many false positivies for this one, particularly when + using templates like wxVector */ + /* class 'foo' needs to have dll-interface to be used by clients of + class 'bar'" */ +# pragma warning(disable:4251) + + /* + This is a similar warning which occurs when deriving from standard + containers. MSDN even mentions that it can be ignored in this case + (albeit only in debug build while the warning is the same in release + too and seems equally harmless). + */ +#if wxUSE_STD_CONTAINERS +# pragma warning(disable:4275) +#endif /* wxUSE_STD_CONTAINERS */ + +# ifdef __VISUALC5__ + /* For VC++ 5.0 for release mode, the warning 'C4702: unreachable code */ + /* is buggy, and occurs for code that does actually get executed */ +# ifndef __WXDEBUG__ +# pragma warning(disable:4702) /* unreachable code */ +# endif + + /* The VC++ 5.0 warning 'C4003: not enough actual parameters for macro' + * is incompatible with the wxWidgets headers since it is given when + * parameters are empty but not missing. */ +# pragma warning(disable:4003) /* not enough actual parameters for macro */ +# endif + + /* + VC6 insists on complaining about + + return type for 'wxVector::reverse_iterator::operator ->' is 'T **' + (ie; not a UDT or reference to a UDT. Will produce errors if applied + using infix notation) + + which is perfectly fine because template classes do routinely define + operators which don't make sense for all template parameter values + (besides this warning was removed in subsequent versions). + */ + #ifdef __VISUALC6__ + #pragma warning(disable: 4284) + #endif /* VC6 */ + + /* + When compiling with VC++ 7 /Wp64 option we get thousands of warnings for + conversion from size_t to int or long. Some precious few of them might + be worth looking into but unfortunately it seems infeasible to fix all + the other, harmless ones (e.g. inserting static_cast(s.length()) + everywhere this method is used though we are quite sure that using >4GB + strings is a bad idea anyhow) so just disable it globally for now. + */ + #if wxCHECK_VISUALC_VERSION(7) + /* conversion from 'size_t' to 'unsigned long', possible loss of data */ + #pragma warning(disable:4267) + #endif /* VC++ 7 or later */ + + /* + VC++ 8 gives a warning when using standard functions such as sprintf, + localtime, ... -- stop this madness, unless the user had already done it + */ + #if wxCHECK_VISUALC_VERSION(8) + #ifndef _CRT_SECURE_NO_DEPRECATE + #define _CRT_SECURE_NO_DEPRECATE 1 + #endif + #ifndef _CRT_NON_CONFORMING_SWPRINTFS + #define _CRT_NON_CONFORMING_SWPRINTFS 1 + #endif + #ifndef _SCL_SECURE_NO_WARNINGS + #define _SCL_SECURE_NO_WARNINGS 1 + #endif + #endif /* VC++ 8 */ +#endif /* __VISUALC__ */ + +/* suppress some Borland C++ warnings */ +#ifdef __BORLANDC__ +# pragma warn -inl /* Functions containing reserved words and certain constructs are not expanded inline */ +#endif /* __BORLANDC__ */ + +/* + g++ gives a warning when a class has private dtor if it has no friends but + this is a perfectly valid situation for a ref-counted class which destroys + itself when its ref count drops to 0, so provide a macro to suppress this + warning + */ +#ifdef __GNUG__ +# define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) \ + friend class wxDummyFriendFor ## name; +#else /* !g++ */ +# define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) +#endif + +/* + Clang Support + */ + +#ifndef WX_HAS_CLANG_FEATURE +# ifndef __has_feature +# define WX_HAS_CLANG_FEATURE(x) 0 +# else +# define WX_HAS_CLANG_FEATURE(x) __has_feature(x) +# endif +#endif + +/* ---------------------------------------------------------------------------- */ +/* wxWidgets version and compatibility defines */ +/* ---------------------------------------------------------------------------- */ + +#include "wx/version.h" + +/* ============================================================================ */ +/* non portable C++ features */ +/* ============================================================================ */ + +/* ---------------------------------------------------------------------------- */ +/* compiler defects workarounds */ +/* ---------------------------------------------------------------------------- */ + +/* + Digital Unix C++ compiler only defines this symbol for .cxx and .hxx files, + so define it ourselves (newer versions do it for all files, though, and + don't allow it to be redefined) + */ +#if defined(__DECCXX) && !defined(__VMS) && !defined(__cplusplus) +#define __cplusplus +#endif /* __DECCXX */ + +/* Resolves linking problems under HP-UX when compiling with gcc/g++ */ +#if defined(__HPUX__) && defined(__GNUG__) +#define va_list __gnuc_va_list +#endif /* HP-UX */ + +/* Prevents conflicts between sys/types.h and winsock.h with Cygwin, */ +/* when using Windows sockets. */ +#if defined(__CYGWIN__) && defined(__WXMSW__) +#define __USE_W32_SOCKETS +#endif + +/* ---------------------------------------------------------------------------- */ +/* check for native bool type and TRUE/FALSE constants */ +/* ---------------------------------------------------------------------------- */ + +/* for backwards compatibility, also define TRUE and FALSE */ +/* */ +/* note that these definitions should work both in C++ and C code, so don't */ +/* use true/false below */ +#ifndef TRUE + #define TRUE 1 +#endif + +#ifndef FALSE + #define FALSE 0 +#endif + +typedef short int WXTYPE; + + +/* ---------------------------------------------------------------------------- */ +/* other feature tests */ +/* ---------------------------------------------------------------------------- */ + +/* Every ride down a slippery slope begins with a single step.. */ +/* */ +/* Yes, using nested classes is indeed against our coding standards in */ +/* general, but there are places where you can use them to advantage */ +/* without totally breaking ports that cannot use them. If you do, then */ +/* wrap it in this guard, but such cases should still be relatively rare. */ +#define wxUSE_NESTED_CLASSES 1 + +/* check for explicit keyword support */ +#ifndef HAVE_EXPLICIT + #if defined(__VISUALC__) && (__VISUALC__ >= 1100) + /* VC++ 6.0 and 5.0 have explicit (what about earlier versions?) */ + #define HAVE_EXPLICIT + #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \ + && wxCHECK_GCC_VERSION(2, 95) + /* GCC 2.95 has explicit, what about earlier versions? */ + #define HAVE_EXPLICIT + #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520) + /* BC++ 4.52 doesn't support explicit, CBuilder 1 does */ + #define HAVE_EXPLICIT + #elif defined(__DIGITALMARS__) + #define HAVE_EXPLICIT + #elif defined(__WATCOMC__) + #define HAVE_EXPLICIT + #endif +#endif /* !HAVE_EXPLICIT */ + +#ifdef HAVE_EXPLICIT + #define wxEXPLICIT explicit +#else /* !HAVE_EXPLICIT */ + #define wxEXPLICIT +#endif /* HAVE_EXPLICIT/!HAVE_EXPLICIT */ + +/* these macros are obsolete, use the standard C++ casts directly now */ +#define wx_static_cast(t, x) static_cast(x) +#define wx_const_cast(t, x) const_cast(x) +#define wx_reinterpret_cast(t, x) reinterpret_cast(x) + +/* + This one is a wx invention: like static cast but used when we intentionally + truncate from a larger to smaller type, static_cast<> can't be used for it + as it results in warnings when using some compilers (SGI mipspro for example) + */ +#if defined(__INTELC__) && defined(__cplusplus) + template + inline T wx_truncate_cast_impl(X x) + { + #pragma warning(push) + /* implicit conversion of a 64-bit integral type to a smaller integral type */ + #pragma warning(disable: 1682) + /* conversion from "X" to "T" may lose significant bits */ + #pragma warning(disable: 810) + /* non-pointer conversion from "foo" to "bar" may lose significant bits */ + #pragma warning(disable: 2259) + + return x; + + #pragma warning(pop) + } + + #define wx_truncate_cast(t, x) wx_truncate_cast_impl(x) + +#elif defined(__cplusplus) && defined(__VISUALC__) && __VISUALC__ >= 1310 + template + inline T wx_truncate_cast_impl(X x) + { + #pragma warning(push) + /* conversion from 'size_t' to 'type', possible loss of data */ + #pragma warning(disable: 4267) + /* conversion from 'type1' to 'type2', possible loss of data */ + #pragma warning(disable: 4242) + + return x; + + #pragma warning(pop) + } + + #define wx_truncate_cast(t, x) wx_truncate_cast_impl(x) +#else + #define wx_truncate_cast(t, x) ((t)(x)) +#endif + +/* for consistency with wxStatic/DynamicCast defined in wx/object.h */ +#define wxConstCast(obj, className) wx_const_cast(className *, obj) + +#ifndef HAVE_STD_WSTRING + #if defined(__VISUALC__) && (__VISUALC__ >= 1100) + /* VC++ 6.0 and 5.0 have std::wstring (what about earlier versions?) */ + #define HAVE_STD_WSTRING + #elif defined(__MINGW32__) && wxCHECK_GCC_VERSION(3, 3) + /* GCC 3.1 has std::wstring; 3.0 never was in MinGW, 2.95 hasn't it */ + #define HAVE_STD_WSTRING + #endif +#endif + +#ifndef HAVE_STD_STRING_COMPARE + #if defined(__VISUALC__) && (__VISUALC__ >= 1100) + /* VC++ 6.0 and 5.0 have std::string::compare */ + /* (what about earlier versions?) */ + #define HAVE_STD_STRING_COMPARE + #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \ + && wxCHECK_GCC_VERSION(3, 1) + /* GCC 3.1 has std::string::compare; */ + /* 3.0 never was in MinGW, 2.95 hasn't it */ + #define HAVE_STD_STRING_COMPARE + #endif +#endif + +#ifndef HAVE_TR1_TYPE_TRAITS + #if defined(__VISUALC__) && (_MSC_FULL_VER >= 150030729) + #define HAVE_TR1_TYPE_TRAITS + #endif +#endif + +#if defined(__has_include) + /* + Notice that we trust our configure tests more than __has_include(), + notably the latter can return true even if the header exists but isn't + actually usable, as it happens with in non C++11 mode. + So if configure already detected at least one working alternative, + just use it. + */ + #if !defined(HAVE_TYPE_TRAITS) && !defined(HAVE_TR1_TYPE_TRAITS) + #if __has_include() + #define HAVE_TYPE_TRAITS + #elif __has_include() + #define HAVE_TR1_TYPE_TRAITS + #endif + #endif + + #if !defined(HAVE_STD_UNORDERED_MAP) && !defined(HAVE_TR1_UNORDERED_MAP) + #if __has_include() + #define HAVE_STD_UNORDERED_MAP + #elif __has_include() + #define HAVE_TR1_UNORDERED_MAP + #endif + #endif + + #if !defined(HAVE_STD_UNORDERED_SET) && !defined(HAVE_TR1_UNORDERED_SET) + #if __has_include() + #define HAVE_STD_UNORDERED_SET + #elif __has_include() + #define HAVE_TR1_UNORDERED_SET + #endif + #endif +#endif /* defined(__has_include) */ + +/* provide replacement for C99 va_copy() if the compiler doesn't have it */ + +/* could be already defined by configure or the user */ +#ifndef wxVaCopy + /* if va_copy is a macro or configure detected that we have it, use it */ + #if defined(va_copy) || defined(HAVE_VA_COPY) + #define wxVaCopy va_copy + #else /* no va_copy, try to provide a replacement */ + /* + configure tries to determine whether va_list is an array or struct + type, but it may not be used under Windows, so deal with a few + special cases. + */ + + #ifdef __WATCOMC__ + /* Watcom uses array type for va_list except for PPC and Alpha */ + #if !defined(__PPC__) && !defined(__AXP__) + #define VA_LIST_IS_ARRAY + #endif + #endif /* __WATCOMC__ */ + + #if defined(__PPC__) && (defined(_CALL_SYSV) || defined (_WIN32)) + /* + PPC using SysV ABI and NT/PPC are special in that they use an + extra level of indirection. + */ + #define VA_LIST_IS_POINTER + #endif /* SysV or Win32 on __PPC__ */ + + /* + note that we use memmove(), not memcpy(), in case anybody tries + to do wxVaCopy(ap, ap) + */ + #if defined(VA_LIST_IS_POINTER) + #define wxVaCopy(d, s) memmove(*(d), *(s), sizeof(va_list)) + #elif defined(VA_LIST_IS_ARRAY) + #define wxVaCopy(d, s) memmove((d), (s), sizeof(va_list)) + #else /* we can only hope that va_lists are simple lvalues */ + #define wxVaCopy(d, s) ((d) = (s)) + #endif + #endif /* va_copy/!va_copy */ +#endif /* wxVaCopy */ + +#ifndef HAVE_WOSTREAM + /* + Mingw <= 3.4 and all versions of Cygwin don't have std::wostream + */ + #if (defined(__MINGW32__) && !wxCHECK_GCC_VERSION(4, 0)) || \ + defined(__CYGWIN__) + #define wxNO_WOSTREAM + #endif + + /* VC++ doesn't have it in the old iostream library */ + #if defined(__VISUALC__) && wxUSE_IOSTREAMH + #define wxNO_WOSTREAM + #endif + + #ifndef wxNO_WOSTREAM + #define HAVE_WOSTREAM + #endif + + #undef wxNO_WOSTREAM +#endif /* HAVE_WOSTREAM */ + +/* ---------------------------------------------------------------------------- */ +/* other C++ features */ +/* ---------------------------------------------------------------------------- */ + +#ifndef HAVE_PARTIAL_SPECIALIZATION + /* be optimistic by default */ + #define HAVE_PARTIAL_SPECIALIZATION +#endif + +#ifdef __VISUALC__ + #if __VISUALC__ < 1310 + #undef HAVE_PARTIAL_SPECIALIZATION + #endif +#endif /* __VISUALC__ */ + + +#ifndef HAVE_TEMPLATE_OVERLOAD_RESOLUTION + /* assume the compiler can use type or const expressions as template + arguments if it supports partial specialization -- except if it's a + Borland one which can't */ + #if defined(HAVE_PARTIAL_SPECIALIZATION) && !defined(__BORLANDC__) + #define HAVE_TEMPLATE_OVERLOAD_RESOLUTION + #endif /* (HAVE_PARTIAL_SPECIALIZATION) && !defined(__BORLANDC__) */ +#endif /* !defined(HAVE_TEMPLATE_OVERLOAD_RESOLUTION) */ + +/* ---------------------------------------------------------------------------- */ +/* portable calling conventions macros */ +/* ---------------------------------------------------------------------------- */ + +/* stdcall is used for all functions called by Windows under Windows */ +#if defined(__WINDOWS__) + #if defined(__GNUWIN32__) + #define wxSTDCALL __attribute__((stdcall)) + #else + /* both VC++ and Borland understand this */ + #define wxSTDCALL _stdcall + #endif + +#else /* Win */ + /* no such stupidness under Unix */ + #define wxSTDCALL +#endif /* platform */ + +/* LINKAGEMODE mode is empty for everything except OS/2 */ +#ifndef LINKAGEMODE + #define LINKAGEMODE +#endif /* LINKAGEMODE */ + +/* wxCALLBACK should be used for the functions which are called back by */ +/* Windows (such as compare function for wxListCtrl) */ +#if defined(__WIN32__) && !defined(__WXMICROWIN__) + #define wxCALLBACK wxSTDCALL +#else + /* no stdcall under Unix nor Win16 */ + #define wxCALLBACK +#endif /* platform */ + +/* generic calling convention for the extern "C" functions */ + +#if defined(__VISUALC__) + #define wxC_CALLING_CONV _cdecl +#elif defined(__VISAGECPP__) + #define wxC_CALLING_CONV _Optlink +#else /* !Visual C++ */ + #define wxC_CALLING_CONV +#endif /* compiler */ + +/* callling convention for the qsort(3) callback */ +#define wxCMPFUNC_CONV wxC_CALLING_CONV + +/* compatibility :-( */ +#define CMPFUNC_CONV wxCMPFUNC_CONV + +/* DLL import/export declarations */ +#include "wx/dlimpexp.h" + +/* ---------------------------------------------------------------------------- */ +/* Very common macros */ +/* ---------------------------------------------------------------------------- */ + +/* Printf-like attribute definitions to obtain warnings with GNU C/C++ */ +#ifndef WX_ATTRIBUTE_PRINTF +# if defined(__GNUC__) && !wxUSE_UNICODE +# define WX_ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) +# else +# define WX_ATTRIBUTE_PRINTF(m, n) +# endif + +# define WX_ATTRIBUTE_PRINTF_1 WX_ATTRIBUTE_PRINTF(1, 2) +# define WX_ATTRIBUTE_PRINTF_2 WX_ATTRIBUTE_PRINTF(2, 3) +# define WX_ATTRIBUTE_PRINTF_3 WX_ATTRIBUTE_PRINTF(3, 4) +# define WX_ATTRIBUTE_PRINTF_4 WX_ATTRIBUTE_PRINTF(4, 5) +# define WX_ATTRIBUTE_PRINTF_5 WX_ATTRIBUTE_PRINTF(5, 6) +#endif /* !defined(WX_ATTRIBUTE_PRINTF) */ + +#ifndef WX_ATTRIBUTE_NORETURN +# if WX_HAS_CLANG_FEATURE(attribute_analyzer_noreturn) +# define WX_ATTRIBUTE_NORETURN __attribute__((analyzer_noreturn)) +# elif defined( __GNUC__ ) +# define WX_ATTRIBUTE_NORETURN __attribute__ ((noreturn)) +# elif wxCHECK_VISUALC_VERSION(7) +# define WX_ATTRIBUTE_NORETURN __declspec(noreturn) +# else +# define WX_ATTRIBUTE_NORETURN +# endif +#endif + +#if defined(__GNUC__) + #define WX_ATTRIBUTE_UNUSED __attribute__ ((unused)) +#else + #define WX_ATTRIBUTE_UNUSED +#endif + +/* + Macros for marking functions as being deprecated. + + The preferred macro in the new code is wxDEPRECATED_MSG() which allows to + explain why is the function deprecated. Almost all the existing code uses + the older wxDEPRECATED() or its variants currently, but this will hopefully + change in the future. + */ + +/* The basic compiler-specific construct to generate a deprecation warning. */ +#ifdef __clang__ + #define wxDEPRECATED_DECL __attribute__((deprecated)) +#elif wxCHECK_GCC_VERSION(3, 1) + #define wxDEPRECATED_DECL __attribute__((deprecated)) +#elif defined(__VISUALC__) && (__VISUALC__ >= 1300) + #define wxDEPRECATED_DECL __declspec(deprecated) +#else + #define wxDEPRECATED_DECL +#endif + +/* + Macro taking the deprecation message. It applies to the next declaration. + + If the compiler doesn't support showing the message, this degrades to a + simple wxDEPRECATED(), i.e. at least gives a warning, if possible. + */ +#if defined(__clang__) && defined(__has_extension) + #if __has_extension(attribute_deprecated_with_message) + #define wxDEPRECATED_MSG(msg) __attribute__((deprecated(msg))) + #else + #define wxDEPRECATED_MSG(msg) __attribute__((deprecated)) + #endif +#elif wxCHECK_GCC_VERSION(4, 5) + #define wxDEPRECATED_MSG(msg) __attribute__((deprecated(msg))) +#elif wxCHECK_VISUALC_VERSION(8) + #define wxDEPRECATED_MSG(msg) __declspec(deprecated("deprecated: " msg)) +#else + #define wxDEPRECATED_MSG(msg) wxDEPRECATED_DECL +#endif + +/* + Macro taking the declaration that it deprecates. Prefer to use + wxDEPRECATED_MSG() instead as it's simpler (wrapping the entire declaration + makes the code unclear) and allows to specify the explanation. + */ +#define wxDEPRECATED(x) wxDEPRECATED_DECL x + +#if defined(__GNUC__) && !wxCHECK_GCC_VERSION(3, 4) + /* + We need to add dummy "inline" to allow gcc < 3.4 to handle the + deprecation attribute on the constructors. + */ + #define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED( inline x) +#else + #define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED(x) +#endif + +/* + Macro which marks the function as being deprecated but also defines it + inline. + + Currently it's defined in the same trivial way in all cases but it could + need a special definition with some other compilers in the future which + explains why do we have it. + */ +#define wxDEPRECATED_INLINE(func, body) wxDEPRECATED(func) { body } + +/* + A macro to define a simple deprecated accessor. + */ +#define wxDEPRECATED_ACCESSOR(func, what) wxDEPRECATED_INLINE(func, return what;) + +/* + Special variant of the macro above which should be used for the functions + which are deprecated but called by wx itself: this often happens with + deprecated virtual functions which are called by the library. + */ +#ifdef WXBUILDING +# define wxDEPRECATED_BUT_USED_INTERNALLY(x) x +#else +# define wxDEPRECATED_BUT_USED_INTERNALLY(x) wxDEPRECATED(x) +#endif + +/* + Macros to suppress and restore gcc warnings, requires g++ >= 4.6 and don't + do anything otherwise. + + Example of use: + + wxGCC_WARNING_SUPPRESS(float-equal) + inline bool wxIsSameDouble(double x, double y) { return x == y; } + wxGCC_WARNING_RESTORE(float-equal) + */ +#if wxCHECK_GCC_VERSION(4, 6) +# define wxGCC_WARNING_SUPPRESS(x) \ + _Pragma (wxSTRINGIZE(GCC diagnostic push)) \ + _Pragma (wxSTRINGIZE(GCC diagnostic ignored wxSTRINGIZE(wxCONCAT(-W,x)))) +# define wxGCC_WARNING_RESTORE(x) \ + _Pragma (wxSTRINGIZE(GCC diagnostic pop)) +#else /* gcc < 4.6 or not gcc at all */ +# define wxGCC_WARNING_SUPPRESS(x) +# define wxGCC_WARNING_RESTORE(x) +#endif + +/* + Combination of the two variants above: should be used for deprecated + functions which are defined inline and are used by wxWidgets itself. + */ +#ifdef WXBUILDING +# define wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(func, body) func { body } +#else +# define wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(func, body) \ + wxDEPRECATED(func) { body } +#endif + +/* NULL declaration: it must be defined as 0 for C++ programs (in particular, */ +/* it must not be defined as "(void *)0" which is standard for C but completely */ +/* breaks C++ code) */ +#if !defined(__HANDHELDPC__) +#include +#endif + +#ifdef __cplusplus + +// everybody gets the assert and other debug macros +#include "wx/debug.h" + + // delete pointer if it is not NULL and NULL it afterwards + template + inline void wxDELETE(T*& ptr) + { + typedef char TypeIsCompleteCheck[sizeof(T)] WX_ATTRIBUTE_UNUSED; + + if ( ptr != NULL ) + { + delete ptr; + ptr = NULL; + } + } + + // delete an array and NULL it (see comments above) + template + inline void wxDELETEA(T*& ptr) + { + typedef char TypeIsCompleteCheck[sizeof(T)] WX_ATTRIBUTE_UNUSED; + + if ( ptr != NULL ) + { + delete [] ptr; + ptr = NULL; + } + } + + // trivial implementation of std::swap() for primitive types + template + inline void wxSwap(T& first, T& second) + { + T tmp(first); + first = second; + second = tmp; + } +#endif /*__cplusplus*/ + +/* size of statically declared array */ +#define WXSIZEOF(array) (sizeof(array)/sizeof(array[0])) + +/* symbolic constant used by all Find()-like functions returning positive */ +/* integer on success as failure indicator */ +#define wxNOT_FOUND (-1) + +/* the default value for some length parameters meaning that the string is */ +/* NUL-terminated */ +#define wxNO_LEN ((size_t)-1) + +/* ---------------------------------------------------------------------------- */ +/* macros dealing with comparison operators */ +/* ---------------------------------------------------------------------------- */ + +/* + Expands into m(op, args...) for each op in the set { ==, !=, <, <=, >, >= }. + */ +#define wxFOR_ALL_COMPARISONS(m) \ + m(==) m(!=) m(>=) m(<=) m(>) m(<) + +#define wxFOR_ALL_COMPARISONS_1(m, x) \ + m(==,x) m(!=,x) m(>=,x) m(<=,x) m(>,x) m(<,x) + +#define wxFOR_ALL_COMPARISONS_2(m, x, y) \ + m(==,x,y) m(!=,x,y) m(>=,x,y) m(<=,x,y) m(>,x,y) m(<,x,y) + +#define wxFOR_ALL_COMPARISONS_3(m, x, y, z) \ + m(==,x,y,z) m(!=,x,y,z) m(>=,x,y,z) m(<=,x,y,z) m(>,x,y,z) m(<,x,y,z) + +/* + These are only used with wxDEFINE_COMPARISON_[BY_]REV: they pass both the + normal and the reversed comparison operators to the macro. + */ +#define wxFOR_ALL_COMPARISONS_2_REV(m, x, y) \ + m(==,x,y,==) m(!=,x,y,!=) m(>=,x,y,<=) \ + m(<=,x,y,>=) m(>,x,y,<) m(<,x,y,>) + +#define wxFOR_ALL_COMPARISONS_3_REV(m, x, y, z) \ + m(==,x,y,z,==) m(!=,x,y,z,!=) m(>=,x,y,z,<=) \ + m(<=,x,y,z,>=) m(>,x,y,z,<) m(<,x,y,z,>) + + +#define wxDEFINE_COMPARISON(op, T1, T2, cmp) \ + inline bool operator op(T1 x, T2 y) { return cmp(x, y, op); } + +#define wxDEFINE_COMPARISON_REV(op, T1, T2, cmp, oprev) \ + inline bool operator op(T2 y, T1 x) { return cmp(x, y, oprev); } + +#define wxDEFINE_COMPARISON_BY_REV(op, T1, T2, oprev) \ + inline bool operator op(T1 x, T2 y) { return y oprev x; } + +/* + Define all 6 comparison operators (==, !=, <, <=, >, >=) for the given + types in the specified order. The implementation is provided by the cmp + macro. Normally wxDEFINE_ALL_COMPARISONS should be used as comparison + operators are usually symmetric. + */ +#define wxDEFINE_COMPARISONS(T1, T2, cmp) \ + wxFOR_ALL_COMPARISONS_3(wxDEFINE_COMPARISON, T1, T2, cmp) + +/* + Define all 6 comparison operators (==, !=, <, <=, >, >=) for the given + types in the specified order, implemented in terms of existing operators + for the reverse order. + */ +#define wxDEFINE_COMPARISONS_BY_REV(T1, T2) \ + wxFOR_ALL_COMPARISONS_2_REV(wxDEFINE_COMPARISON_BY_REV, T1, T2) + +/* + This macro allows to define all 12 comparison operators (6 operators for + both orders of arguments) for the given types using the provided "cmp" + macro to implement the actual comparison: the macro is called with the 2 + arguments names, the first of type T1 and the second of type T2, and the + comparison operator being implemented. + */ +#define wxDEFINE_ALL_COMPARISONS(T1, T2, cmp) \ + wxFOR_ALL_COMPARISONS_3(wxDEFINE_COMPARISON, T1, T2, cmp) \ + wxFOR_ALL_COMPARISONS_3_REV(wxDEFINE_COMPARISON_REV, T1, T2, cmp) + +/* ---------------------------------------------------------------------------- */ +/* macros to avoid compiler warnings */ +/* ---------------------------------------------------------------------------- */ + +/* Macro to cut down on compiler warnings. */ +#if 1 /* there should be no more any compilers needing the "#else" version */ + #define WXUNUSED(identifier) /* identifier */ +#else /* stupid, broken compiler */ + #define WXUNUSED(identifier) identifier +#endif + +/* some arguments are not used in unicode mode */ +#if wxUSE_UNICODE + #define WXUNUSED_IN_UNICODE(param) WXUNUSED(param) +#else + #define WXUNUSED_IN_UNICODE(param) param +#endif + +/* some arguments are not used in WinCE build */ +#ifdef __WXWINCE__ + #define WXUNUSED_IN_WINCE(param) WXUNUSED(param) +#else + #define WXUNUSED_IN_WINCE(param) param +#endif + +/* unused parameters in non stream builds */ +#if wxUSE_STREAMS + #define WXUNUSED_UNLESS_STREAMS(param) param +#else + #define WXUNUSED_UNLESS_STREAMS(param) WXUNUSED(param) +#endif + +/* some compilers give warning about a possibly unused variable if it is */ +/* initialized in both branches of if/else and shut up if it is initialized */ +/* when declared, but other compilers then give warnings about unused variable */ +/* value -- this should satisfy both of them */ +#if defined(__VISUALC__) + #define wxDUMMY_INITIALIZE(val) = val +#else + #define wxDUMMY_INITIALIZE(val) +#endif + +/* sometimes the value of a variable is *really* not used, to suppress the */ +/* resulting warning you may pass it to this function */ +#ifdef __cplusplus +# ifdef __BORLANDC__ +# define wxUnusedVar(identifier) identifier +# else + template + inline void wxUnusedVar(const T& WXUNUSED(t)) { } +# endif +#endif + +/* ---------------------------------------------------------------------------- */ +/* compiler specific settings */ +/* ---------------------------------------------------------------------------- */ + +#if wxONLY_WATCOM_EARLIER_THAN(1,4) + typedef short mode_t; +#endif + +/* where should i put this? we need to make sure of this as it breaks */ +/* the code. */ +#if !wxUSE_IOSTREAMH && defined(__WXDEBUG__) +# ifdef wxUSE_DEBUG_NEW_ALWAYS +# undef wxUSE_DEBUG_NEW_ALWAYS +# define wxUSE_DEBUG_NEW_ALWAYS 0 +# endif +#endif + +/* ---------------------------------------------------------------------------- */ +/* standard wxWidgets types */ +/* ---------------------------------------------------------------------------- */ + +/* the type for screen and DC coordinates */ +typedef int wxCoord; + +enum { wxDefaultCoord = -1 }; + +/* ---------------------------------------------------------------------------- */ +/* define fixed length types */ +/* ---------------------------------------------------------------------------- */ + +#if defined(__MINGW32__) + #include +#endif + +/* chars are always one byte (by definition), shorts are always two (in */ +/* practice) */ + +/* 8bit */ +typedef signed char wxInt8; +typedef unsigned char wxUint8; +typedef wxUint8 wxByte; + + +/* 16bit */ +#ifdef SIZEOF_SHORT + #if SIZEOF_SHORT != 2 + #error "wxWidgets assumes sizeof(short) == 2, please fix the code" + #endif +#else + #define SIZEOF_SHORT 2 +#endif + +typedef signed short wxInt16; +typedef unsigned short wxUint16; + +typedef wxUint16 wxWord; + +/* + things are getting more interesting with ints, longs and pointers + + there are several different standard data models described by this table: + + +-----------+----------------------------+ + |type\model | LP64 ILP64 LLP64 ILP32 LP32| + +-----------+----------------------------+ + |char | 8 8 8 8 8 | + |short | 16 16 16 16 16 | + |int | 32 64 32 32 16 | + |long | 64 64 32 32 32 | + |long long | 64 64 64 -- -- | + |void * | 64 64 64 32 32 | + +-----------+----------------------------+ + + Win16 used LP32 (but we don't support it any longer), Win32 obviously used + ILP32 and Win64 uses LLP64 (a.k.a. P64) + + Under Unix LP64 is the most widely used (the only I've ever seen, in fact) + */ + +/* 32bit */ +#if defined(__WINDOWS__) + #if defined(__WIN32__) + typedef int wxInt32; + typedef unsigned int wxUint32; + + /* + Win64 uses LLP64 model and so ints and longs have the same size as + in Win32. + */ + #ifndef SIZEOF_INT + #define SIZEOF_INT 4 + #endif + + #ifndef SIZEOF_LONG + #define SIZEOF_LONG 4 + #endif + + #ifndef SIZEOF_LONG_LONG + #define SIZEOF_LONG_LONG 8 + #endif + + #ifndef SIZEOF_WCHAR_T + /* Windows uses UTF-16 */ + #define SIZEOF_WCHAR_T 2 + #endif + + #ifndef SIZEOF_SIZE_T + /* + Under Win64 sizeof(size_t) == 8 and so it is neither unsigned + int nor unsigned long! + */ + #ifdef __WIN64__ + #define SIZEOF_SIZE_T 8 + + #undef wxSIZE_T_IS_UINT + #else /* Win32 */ + #define SIZEOF_SIZE_T 4 + + #define wxSIZE_T_IS_UINT + #endif + #undef wxSIZE_T_IS_ULONG + #endif + + #ifndef SIZEOF_VOID_P + #ifdef __WIN64__ + #define SIZEOF_VOID_P 8 + #else /* Win32 */ + #define SIZEOF_VOID_P 4 + #endif /* Win64/32 */ + #endif + #else + #error "Unsupported Windows version" + #endif +#else /* !Windows */ + /* SIZEOF_XXX are normally defined by configure */ + #ifdef SIZEOF_INT + #if SIZEOF_INT == 8 + /* must be ILP64 data model, there is normally a special 32 bit */ + /* type in it but we don't know what it is... */ + #error "No 32bit int type on this platform" + #elif SIZEOF_INT == 4 + typedef int wxInt32; + typedef unsigned int wxUint32; + #elif SIZEOF_INT == 2 + /* must be LP32 */ + #if SIZEOF_LONG != 4 + #error "No 32bit int type on this platform" + #endif + + typedef long wxInt32; + typedef unsigned long wxUint32; + #else + /* wxWidgets is not ready for 128bit systems yet... */ + #error "Unknown sizeof(int) value, what are you compiling for?" + #endif + #else /* !defined(SIZEOF_INT) */ + /* assume default 32bit machine -- what else can we do? */ + wxCOMPILE_TIME_ASSERT( sizeof(int) == 4, IntMustBeExactly4Bytes); + wxCOMPILE_TIME_ASSERT( sizeof(size_t) == 4, SizeTMustBeExactly4Bytes); + wxCOMPILE_TIME_ASSERT( sizeof(void *) == 4, PtrMustBeExactly4Bytes); + + #define SIZEOF_INT 4 + #define SIZEOF_SIZE_T 4 + #define SIZEOF_VOID_P 4 + + typedef int wxInt32; + typedef unsigned int wxUint32; + + #if defined(__MACH__) && !defined(SIZEOF_WCHAR_T) + #define SIZEOF_WCHAR_T 4 + #endif + #if !defined(SIZEOF_WCHAR_T) + /* also assume that sizeof(wchar_t) == 2 (under Unix the most */ + /* common case is 4 but there configure would have defined */ + /* SIZEOF_WCHAR_T for us) */ + /* the most common case */ + wxCOMPILE_TIME_ASSERT( sizeof(wchar_t) == 2, + Wchar_tMustBeExactly2Bytes); + + #define SIZEOF_WCHAR_T 2 + #endif /* !defined(SIZEOF_WCHAR_T) */ + #endif +#endif /* Win/!Win */ + +#ifndef SIZEOF_WCHAR_T + #error "SIZEOF_WCHAR_T must be defined, but isn't" +#endif + +/* also define C99-like sized MIN/MAX constants */ +#define wxINT8_MIN CHAR_MIN +#define wxINT8_MAX CHAR_MAX +#define wxUINT8_MAX UCHAR_MAX + +#define wxINT16_MIN SHRT_MIN +#define wxINT16_MAX SHRT_MAX +#define wxUINT16_MAX USHRT_MAX + +#if SIZEOF_INT == 4 + #define wxINT32_MIN INT_MIN + #define wxINT32_MAX INT_MAX + #define wxUINT32_MAX UINT_MAX +#elif SIZEOF_LONG == 4 + #define wxINT32_MIN LONG_MIN + #define wxINT32_MAX LONG_MAX + #define wxUINT32_MAX ULONG_MAX +#else + #error "Unknown 32 bit type" +#endif + +typedef wxUint32 wxDword; + +#ifdef LLONG_MAX + #define wxINT64_MIN LLONG_MIN + #define wxINT64_MAX LLONG_MAX + #define wxUINT64_MAX ULLONG_MAX +#else + #define wxINT64_MIN (wxLL(-9223372036854775807)-1) + #define wxINT64_MAX wxLL(9223372036854775807) + #define wxUINT64_MAX wxULL(0xFFFFFFFFFFFFFFFF) +#endif + +/* 64 bit */ + +/* NB: we #define and not typedef wxLongLong_t because we use "#ifdef */ +/* wxLongLong_t" in wx/longlong.h */ + +/* wxULongLong_t is set later (usually to unsigned wxLongLong_t) */ + +/* to avoid compilation problems on 64bit machines with ambiguous method calls */ +/* we will need to define this */ +#undef wxLongLongIsLong + +/* + First check for specific compilers which have known 64 bit integer types, + this avoids clashes with SIZEOF_LONG[_LONG] being defined incorrectly for + e.g. MSVC builds (Python.h defines it as 8 even for MSVC). + + Also notice that we check for "long long" before checking for 64 bit long as + we still want to use "long long" and not "long" for wxLongLong_t on 64 bit + architectures to be able to pass wxLongLong_t to the standard functions + prototyped as taking "long long" such as strtoll(). + */ +#if (defined(__VISUALC__) || defined(__INTELC__)) && defined(__WIN32__) + #define wxLongLong_t __int64 + #define wxLongLongSuffix i64 + #define wxLongLongFmtSpec "I64" +#elif defined(__BORLANDC__) && defined(__WIN32__) && (__BORLANDC__ >= 0x520) + #define wxLongLong_t __int64 + #define wxLongLongSuffix i64 + #define wxLongLongFmtSpec "L" +#elif (defined(__WATCOMC__) && (defined(__WIN32__) || defined(__DOS__) || defined(__OS2__))) + #define wxLongLong_t __int64 + #define wxLongLongSuffix i64 + #define wxLongLongFmtSpec "L" +#elif defined(__DIGITALMARS__) + #define wxLongLong_t __int64 + #define wxLongLongSuffix LL + #define wxLongLongFmtSpec "ll" +#elif defined(__MINGW32__) + #define wxLongLong_t long long + #define wxLongLongSuffix ll + #define wxLongLongFmtSpec "I64" +#elif defined(__VISAGECPP__) && __IBMCPP__ >= 400 + #define wxLongLong_t long long +#elif (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8) || \ + defined(__GNUC__) || \ + defined(__CYGWIN__) || \ + defined(__WXMICROWIN__) || \ + (defined(__DJGPP__) && __DJGPP__ >= 2) + #define wxLongLong_t long long + #define wxLongLongSuffix ll + #define wxLongLongFmtSpec "ll" +#elif defined(SIZEOF_LONG) && (SIZEOF_LONG == 8) + #define wxLongLong_t long + #define wxLongLongSuffix l + #define wxLongLongFmtSpec "l" + #define wxLongLongIsLong +#endif + + +#ifdef wxLongLong_t + #define wxULongLong_t unsigned wxLongLong_t + + /* + wxLL() and wxULL() macros allow to define 64 bit constants in a + portable way. + */ + #ifndef wxCOMPILER_BROKEN_CONCAT_OPER + #define wxLL(x) wxCONCAT(x, wxLongLongSuffix) + #define wxULL(x) wxCONCAT(x, wxCONCAT(u, wxLongLongSuffix)) + #else + /* + Currently only Borland compiler has broken concatenation operator + and this compiler is known to use [u]i64 suffix. + */ + #define wxLL(x) wxAPPEND_i64(x) + #define wxULL(x) wxAPPEND_ui64(x) + #endif + + typedef wxLongLong_t wxInt64; + typedef wxULongLong_t wxUint64; + + #define wxHAS_INT64 1 + + #ifndef wxLongLongIsLong + #define wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + #endif +#elif wxUSE_LONGLONG + /* these macros allow to define 64 bit constants in a portable way */ + #define wxLL(x) wxLongLong(x) + #define wxULL(x) wxULongLong(x) + + #define wxInt64 wxLongLong + #define wxUint64 wxULongLong + + #define wxHAS_INT64 1 + +#else /* !wxUSE_LONGLONG */ + + #define wxHAS_INT64 0 + +#endif + +/* + Helper macro for conditionally compiling some code only if wxLongLong_t is + available and is a type different from the other integer types (i.e. not + long). + */ +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + #define wxIF_LONG_LONG_TYPE(x) x +#else + #define wxIF_LONG_LONG_TYPE(x) +#endif + + +/* Make sure ssize_t is defined (a signed type the same size as size_t). */ +/* (HAVE_SSIZE_T is not already defined by configure) */ +#ifndef HAVE_SSIZE_T +#ifdef __MINGW32__ + #if defined(_SSIZE_T_) || defined(_SSIZE_T_DEFINED) + #define HAVE_SSIZE_T + #endif +#elif wxCHECK_WATCOM_VERSION(1,4) + #define HAVE_SSIZE_T +#endif +#endif /* !HAVE_SSIZE_T */ + +/* If we really don't have ssize_t, provide our own version. */ +#ifdef HAVE_SSIZE_T + #ifdef __UNIX__ + #include + #endif +#else /* !HAVE_SSIZE_T */ + #if SIZEOF_SIZE_T == 4 + typedef wxInt32 ssize_t; + #elif SIZEOF_SIZE_T == 8 + typedef wxInt64 ssize_t; + #else + #error "error defining ssize_t, size_t is not 4 or 8 bytes" + #endif + + /* prevent ssize_t redefinitions in other libraries */ + #define HAVE_SSIZE_T +#endif + +/* + We can't rely on Windows _W64 being defined as windows.h may not be + included so define our own equivalent: this should be used with types + like WXLPARAM or WXWPARAM which are 64 bit under Win64 to avoid warnings + each time we cast it to a pointer or a handle (which results in hundreds + of warnings as Win32 API often passes pointers in them) + */ +#if wxCHECK_VISUALC_VERSION(7) + #define wxW64 __w64 +#else + #define wxW64 +#endif + +/* + Define signed and unsigned integral types big enough to contain all of long, + size_t and void *. + */ +#if SIZEOF_LONG >= SIZEOF_VOID_P + /* + Normal case when long is the largest integral type. + */ + typedef long wxIntPtr; + typedef unsigned long wxUIntPtr; +#elif SIZEOF_SIZE_T >= SIZEOF_VOID_P + /* + Win64 case: size_t is the only integral type big enough for "void *". + + Notice that we must use __w64 to avoid warnings about casting pointers + to wxIntPtr (which we do often as this is what it is defined for) in 32 + bit build with MSVC. + */ + typedef wxW64 ssize_t wxIntPtr; + typedef size_t wxUIntPtr; +#else + /* + This should never happen for the current architectures but if you're + using one where it does, please contact wx-dev@lists.wxwidgets.org. + */ + #error "Pointers can't be stored inside integer types." +#endif + +#ifdef __cplusplus +/* And also define a couple of simple functions to cast pointer to/from it. */ +inline wxUIntPtr wxPtrToUInt(const void *p) +{ + /* + VC++ 7.1 gives warnings about casts such as below even when they're + explicit with /Wp64 option, suppress them as we really know what we're + doing here. Same thing with icc with -Wall. + */ +#ifdef __VISUALC__ + #if __VISUALC__ >= 1200 + #pragma warning(push) + #endif + /* pointer truncation from '' to '' */ + #pragma warning(disable: 4311) +#elif defined(__INTELC__) + #pragma warning(push) + /* conversion from pointer to same-sized integral type */ + #pragma warning(disable: 1684) +#endif + + return wx_reinterpret_cast(wxUIntPtr, p); + +#if (defined(__VISUALC__) && __VISUALC__ >= 1200) || defined(__INTELC__) + #pragma warning(pop) +#endif +} + +inline void *wxUIntToPtr(wxUIntPtr p) +{ +#ifdef __VISUALC__ + #if __VISUALC__ >= 1200 + #pragma warning(push) + #endif + /* conversion to type of greater size */ + #pragma warning(disable: 4312) +#elif defined(__INTELC__) + #pragma warning(push) + /* invalid type conversion: "wxUIntPtr={unsigned long}" to "void *" */ + #pragma warning(disable: 171) +#endif + + return wx_reinterpret_cast(void *, p); + +#if (defined(__VISUALC__) && __VISUALC__ >= 1200) || defined(__INTELC__) + #pragma warning(pop) +#endif +} +#endif /*__cplusplus*/ + + + +/* base floating point types */ +/* wxFloat32: 32 bit IEEE float ( 1 sign, 8 exponent bits, 23 fraction bits ) */ +/* wxFloat64: 64 bit IEEE float ( 1 sign, 11 exponent bits, 52 fraction bits ) */ +/* wxDouble: native fastest representation that has at least wxFloat64 */ +/* precision, so use the IEEE types for storage, and this for */ +/* calculations */ + +typedef float wxFloat32; +typedef double wxFloat64; + +typedef double wxDouble; + +/* + Some (non standard) compilers typedef wchar_t as an existing type instead + of treating it as a real fundamental type, set wxWCHAR_T_IS_REAL_TYPE to 0 + for them and to 1 for all the others. + */ +#ifndef wxWCHAR_T_IS_REAL_TYPE + /* + VC++ typedefs wchar_t as unsigned short by default until VC8, that is + unless /Za or /Zc:wchar_t option is used in which case _WCHAR_T_DEFINED + is defined. + */ +# if defined(__VISUALC__) && !defined(_NATIVE_WCHAR_T_DEFINED) +# define wxWCHAR_T_IS_REAL_TYPE 0 +# else /* compiler having standard-conforming wchar_t */ +# define wxWCHAR_T_IS_REAL_TYPE 1 +# endif +#endif /* !defined(wxWCHAR_T_IS_REAL_TYPE) */ + +/* Helper macro for doing something dependent on whether wchar_t is or isn't a + typedef inside another macro. */ +#if wxWCHAR_T_IS_REAL_TYPE + #define wxIF_WCHAR_T_TYPE(x) x +#else /* !wxWCHAR_T_IS_REAL_TYPE */ + #define wxIF_WCHAR_T_TYPE(x) +#endif /* wxWCHAR_T_IS_REAL_TYPE/!wxWCHAR_T_IS_REAL_TYPE */ + +/* + This constant should be used instead of NULL in vararg functions taking + wxChar* arguments: passing NULL (which is the same as 0, unless the compiler + defines it specially, e.g. like gcc does with its __null built-in) doesn't + work in this case as va_arg() wouldn't interpret the integer 0 correctly + when trying to convert it to a pointer on architectures where sizeof(int) is + strictly less than sizeof(void *). + + Examples of places where this must be used include wxFileTypeInfo ctor. + */ +#define wxNullPtr ((void *)NULL) + + +/* Define wxChar16 and wxChar32 */ + +#if SIZEOF_WCHAR_T == 2 + #define wxWCHAR_T_IS_WXCHAR16 + typedef wchar_t wxChar16; +#else + typedef wxUint16 wxChar16; +#endif + +#if SIZEOF_WCHAR_T == 4 + #define wxWCHAR_T_IS_WXCHAR32 + typedef wchar_t wxChar32; +#else + typedef wxUint32 wxChar32; +#endif + + +/* + Helper macro expanding into the given "m" macro invoked with each of the + integer types as parameter (notice that this does not include char/unsigned + char and bool but does include wchar_t). + */ +#define wxDO_FOR_INT_TYPES(m) \ + m(short) \ + m(unsigned short) \ + m(int) \ + m(unsigned int) \ + m(long) \ + m(unsigned long) \ + wxIF_LONG_LONG_TYPE( m(wxLongLong_t) ) \ + wxIF_LONG_LONG_TYPE( m(wxULongLong_t) ) \ + wxIF_WCHAR_T_TYPE( m(wchar_t) ) + +/* + Same as wxDO_FOR_INT_TYPES() but does include char and unsigned char. + + Notice that we use "char" and "unsigned char" here but not "signed char" + which would be more correct as "char" could be unsigned by default. But + wxWidgets code currently supposes that char is signed and we'd need to + clean up assumptions about it, notably in wx/unichar.h, to be able to use + "signed char" here. + */ +#define wxDO_FOR_CHAR_INT_TYPES(m) \ + m(char) \ + m(unsigned char) \ + wxDO_FOR_INT_TYPES(m) + +/* + Same as wxDO_FOR_INT_TYPES() above except that m macro takes the + type as the first argument and some extra argument, passed from this macro + itself, as the second one. + */ +#define wxDO_FOR_INT_TYPES_1(m, arg) \ + m(short, arg) \ + m(unsigned short, arg) \ + m(int, arg) \ + m(unsigned int, arg) \ + m(long, arg) \ + m(unsigned long, arg) \ + wxIF_LONG_LONG_TYPE( m(wxLongLong_t, arg) ) \ + wxIF_LONG_LONG_TYPE( m(wxULongLong_t, arg) ) \ + wxIF_WCHAR_T_TYPE( m(wchar_t, arg) ) + +/* + Combination of wxDO_FOR_CHAR_INT_TYPES() and wxDO_FOR_INT_TYPES_1(): + invokes the given macro with the specified argument as its second parameter + for all char and int types. + */ +#define wxDO_FOR_CHAR_INT_TYPES_1(m, arg) \ + m(char, arg) \ + m(unsigned char, arg) \ + wxDO_FOR_INT_TYPES_1(m, arg) + + +/* ---------------------------------------------------------------------------- */ +/* byte ordering related definition and macros */ +/* ---------------------------------------------------------------------------- */ + +/* byte sex */ + +#define wxBIG_ENDIAN 4321 +#define wxLITTLE_ENDIAN 1234 +#define wxPDP_ENDIAN 3412 + +#ifdef WORDS_BIGENDIAN +#define wxBYTE_ORDER wxBIG_ENDIAN +#else +#define wxBYTE_ORDER wxLITTLE_ENDIAN +#endif + +/* byte swapping */ + +#define wxUINT16_SWAP_ALWAYS(val) \ + ((wxUint16) ( \ + (((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \ + (((wxUint16) (val) & (wxUint16) 0xff00U) >> 8))) + +#define wxINT16_SWAP_ALWAYS(val) \ + ((wxInt16) ( \ + (((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \ + (((wxUint16) (val) & (wxUint16) 0xff00U) >> 8))) + +#define wxUINT32_SWAP_ALWAYS(val) \ + ((wxUint32) ( \ + (((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \ + (((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \ + (((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \ + (((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24))) + +#define wxINT32_SWAP_ALWAYS(val) \ + ((wxInt32) ( \ + (((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \ + (((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \ + (((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \ + (((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24))) +/* machine specific byte swapping */ + +#ifdef wxLongLong_t + #define wxUINT64_SWAP_ALWAYS(val) \ + ((wxUint64) ( \ + (((wxUint64) (val) & (wxUint64) wxULL(0x00000000000000ff)) << 56) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x000000000000ff00)) << 40) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x0000000000ff0000)) << 24) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x00000000ff000000)) << 8) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x000000ff00000000)) >> 8) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x0000ff0000000000)) >> 24) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x00ff000000000000)) >> 40) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0xff00000000000000)) >> 56))) + + #define wxINT64_SWAP_ALWAYS(val) \ + ((wxInt64) ( \ + (((wxUint64) (val) & (wxUint64) wxULL(0x00000000000000ff)) << 56) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x000000000000ff00)) << 40) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x0000000000ff0000)) << 24) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x00000000ff000000)) << 8) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x000000ff00000000)) >> 8) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x0000ff0000000000)) >> 24) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0x00ff000000000000)) >> 40) | \ + (((wxUint64) (val) & (wxUint64) wxULL(0xff00000000000000)) >> 56))) +#elif wxUSE_LONGLONG /* !wxLongLong_t */ + #define wxUINT64_SWAP_ALWAYS(val) \ + ((wxUint64) ( \ + ((wxULongLong(val) & wxULongLong(0L, 0x000000ffU)) << 56) | \ + ((wxULongLong(val) & wxULongLong(0L, 0x0000ff00U)) << 40) | \ + ((wxULongLong(val) & wxULongLong(0L, 0x00ff0000U)) << 24) | \ + ((wxULongLong(val) & wxULongLong(0L, 0xff000000U)) << 8) | \ + ((wxULongLong(val) & wxULongLong(0x000000ffL, 0U)) >> 8) | \ + ((wxULongLong(val) & wxULongLong(0x0000ff00L, 0U)) >> 24) | \ + ((wxULongLong(val) & wxULongLong(0x00ff0000L, 0U)) >> 40) | \ + ((wxULongLong(val) & wxULongLong(0xff000000L, 0U)) >> 56))) + + #define wxINT64_SWAP_ALWAYS(val) \ + ((wxInt64) ( \ + ((wxLongLong(val) & wxLongLong(0L, 0x000000ffU)) << 56) | \ + ((wxLongLong(val) & wxLongLong(0L, 0x0000ff00U)) << 40) | \ + ((wxLongLong(val) & wxLongLong(0L, 0x00ff0000U)) << 24) | \ + ((wxLongLong(val) & wxLongLong(0L, 0xff000000U)) << 8) | \ + ((wxLongLong(val) & wxLongLong(0x000000ffL, 0U)) >> 8) | \ + ((wxLongLong(val) & wxLongLong(0x0000ff00L, 0U)) >> 24) | \ + ((wxLongLong(val) & wxLongLong(0x00ff0000L, 0U)) >> 40) | \ + ((wxLongLong(val) & wxLongLong(0xff000000L, 0U)) >> 56))) +#endif /* wxLongLong_t/!wxLongLong_t */ + +#ifdef WORDS_BIGENDIAN + #define wxUINT16_SWAP_ON_BE(val) wxUINT16_SWAP_ALWAYS(val) + #define wxINT16_SWAP_ON_BE(val) wxINT16_SWAP_ALWAYS(val) + #define wxUINT16_SWAP_ON_LE(val) (val) + #define wxINT16_SWAP_ON_LE(val) (val) + #define wxUINT32_SWAP_ON_BE(val) wxUINT32_SWAP_ALWAYS(val) + #define wxINT32_SWAP_ON_BE(val) wxINT32_SWAP_ALWAYS(val) + #define wxUINT32_SWAP_ON_LE(val) (val) + #define wxINT32_SWAP_ON_LE(val) (val) + #if wxHAS_INT64 + #define wxUINT64_SWAP_ON_BE(val) wxUINT64_SWAP_ALWAYS(val) + #define wxUINT64_SWAP_ON_LE(val) (val) + #define wxINT64_SWAP_ON_BE(val) wxINT64_SWAP_ALWAYS(val) + #define wxINT64_SWAP_ON_LE(val) (val) + #endif +#else + #define wxUINT16_SWAP_ON_LE(val) wxUINT16_SWAP_ALWAYS(val) + #define wxINT16_SWAP_ON_LE(val) wxINT16_SWAP_ALWAYS(val) + #define wxUINT16_SWAP_ON_BE(val) (val) + #define wxINT16_SWAP_ON_BE(val) (val) + #define wxUINT32_SWAP_ON_LE(val) wxUINT32_SWAP_ALWAYS(val) + #define wxINT32_SWAP_ON_LE(val) wxINT32_SWAP_ALWAYS(val) + #define wxUINT32_SWAP_ON_BE(val) (val) + #define wxINT32_SWAP_ON_BE(val) (val) + #if wxHAS_INT64 + #define wxUINT64_SWAP_ON_LE(val) wxUINT64_SWAP_ALWAYS(val) + #define wxUINT64_SWAP_ON_BE(val) (val) + #define wxINT64_SWAP_ON_LE(val) wxINT64_SWAP_ALWAYS(val) + #define wxINT64_SWAP_ON_BE(val) (val) + #endif +#endif + +/* ---------------------------------------------------------------------------- */ +/* template workarounds for buggy compilers */ +/* ---------------------------------------------------------------------------- */ + +#if defined(__GNUC__) && !wxCHECK_GCC_VERSION( 3, 4 ) + /* GCC <= 3.4 has buggy template support */ +# define wxUSE_MEMBER_TEMPLATES 0 +#endif + +#if defined(_MSC_VER) && _MSC_VER <= 1200 + /* MSVC <= 6.0 has buggy template support */ +# define wxUSE_MEMBER_TEMPLATES 0 +# define wxUSE_FUNC_TEMPLATE_POINTER 0 +#endif + +#ifndef wxUSE_MEMBER_TEMPLATES +# define wxUSE_MEMBER_TEMPLATES 1 +#endif + +#ifndef wxUSE_FUNC_TEMPLATE_POINTER +# define wxUSE_FUNC_TEMPLATE_POINTER 1 +#endif + +#if wxUSE_MEMBER_TEMPLATES +# define wxTEMPLATED_MEMBER_CALL( method, type ) method() +# define wxTEMPLATED_MEMBER_FIX( type ) +#else +# define wxTEMPLATED_MEMBER_CALL( method, type ) method((type*)NULL) +# define wxTEMPLATED_MEMBER_FIX( type ) type* =NULL +#endif + +#if defined(_MSC_VER) && _MSC_VER <= 1200 +# define wxTEMPLATED_FUNCTION_FIX( type ), wxTEMPLATED_MEMBER_FIX(type) +# define wxINFUNC_CLASS_TYPE_FIX( type ) typedef type type; +#else +# define wxTEMPLATED_FUNCTION_FIX( type ) +# define wxINFUNC_CLASS_TYPE_FIX( type ) +#endif + +/* ---------------------------------------------------------------------------- */ +/* Geometric flags */ +/* ---------------------------------------------------------------------------- */ + +enum wxGeometryCentre +{ + wxCENTRE = 0x0001, + wxCENTER = wxCENTRE +}; + +/* centering into frame rather than screen (obsolete) */ +#define wxCENTER_FRAME 0x0000 +/* centre on screen rather than parent */ +#define wxCENTRE_ON_SCREEN 0x0002 +#define wxCENTER_ON_SCREEN wxCENTRE_ON_SCREEN + +enum wxOrientation +{ + /* don't change the values of these elements, they are used elsewhere */ + wxHORIZONTAL = 0x0004, + wxVERTICAL = 0x0008, + + wxBOTH = wxVERTICAL | wxHORIZONTAL, + + /* a mask to extract orientation from the combination of flags */ + wxORIENTATION_MASK = wxBOTH +}; + +enum wxDirection +{ + wxLEFT = 0x0010, + wxRIGHT = 0x0020, + wxUP = 0x0040, + wxDOWN = 0x0080, + + wxTOP = wxUP, + wxBOTTOM = wxDOWN, + + wxNORTH = wxUP, + wxSOUTH = wxDOWN, + wxWEST = wxLEFT, + wxEAST = wxRIGHT, + + wxALL = (wxUP | wxDOWN | wxRIGHT | wxLEFT), + + /* a mask to extract direction from the combination of flags */ + wxDIRECTION_MASK = wxALL +}; + +enum wxAlignment +{ + /* + 0 is a valid wxAlignment value (both wxALIGN_LEFT and wxALIGN_TOP + use it) so define a symbolic name for an invalid alignment value + which can be assumed to be different from anything else + */ + wxALIGN_INVALID = -1, + + wxALIGN_NOT = 0x0000, + wxALIGN_CENTER_HORIZONTAL = 0x0100, + wxALIGN_CENTRE_HORIZONTAL = wxALIGN_CENTER_HORIZONTAL, + wxALIGN_LEFT = wxALIGN_NOT, + wxALIGN_TOP = wxALIGN_NOT, + wxALIGN_RIGHT = 0x0200, + wxALIGN_BOTTOM = 0x0400, + wxALIGN_CENTER_VERTICAL = 0x0800, + wxALIGN_CENTRE_VERTICAL = wxALIGN_CENTER_VERTICAL, + + wxALIGN_CENTER = (wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL), + wxALIGN_CENTRE = wxALIGN_CENTER, + + /* a mask to extract alignment from the combination of flags */ + wxALIGN_MASK = 0x0f00 +}; + +/* misc. flags for wxSizer items */ +enum wxSizerFlagBits +{ + /* + wxADJUST_MINSIZE doesn't do anything any more but we still define + it for compatibility. Notice that it may be also predefined (as 0, + hopefully) in the user code in order to use it even in + !WXWIN_COMPATIBILITY_2_8 builds so don't redefine it in such case. + */ +#if WXWIN_COMPATIBILITY_2_8 && !defined(wxADJUST_MINSIZE) + wxADJUST_MINSIZE = 0, +#endif + wxFIXED_MINSIZE = 0x8000, + wxRESERVE_SPACE_EVEN_IF_HIDDEN = 0x0002, + + /* a mask to extract wxSizerFlagBits from combination of flags */ + wxSIZER_FLAG_BITS_MASK = 0x8002 +}; + +enum wxStretch +{ + wxSTRETCH_NOT = 0x0000, + wxSHRINK = 0x1000, + wxGROW = 0x2000, + wxEXPAND = wxGROW, + wxSHAPED = 0x4000, + wxTILE = wxSHAPED | wxFIXED_MINSIZE, + + /* a mask to extract stretch from the combination of flags */ + wxSTRETCH_MASK = 0x7000 /* sans wxTILE */ +}; + +/* border flags: the values are chosen for backwards compatibility */ +enum wxBorder +{ + /* this is different from wxBORDER_NONE as by default the controls do have */ + /* border */ + wxBORDER_DEFAULT = 0, + + wxBORDER_NONE = 0x00200000, + wxBORDER_STATIC = 0x01000000, + wxBORDER_SIMPLE = 0x02000000, + wxBORDER_RAISED = 0x04000000, + wxBORDER_SUNKEN = 0x08000000, + wxBORDER_DOUBLE = 0x10000000, /* deprecated */ + wxBORDER_THEME = wxBORDER_DOUBLE, + + /* a mask to extract border style from the combination of flags */ + wxBORDER_MASK = 0x1f200000 +}; + +/* This makes it easier to specify a 'normal' border for a control */ +#if defined(__SMARTPHONE__) || defined(__POCKETPC__) +#define wxDEFAULT_CONTROL_BORDER wxBORDER_SIMPLE +#else +#define wxDEFAULT_CONTROL_BORDER wxBORDER_SUNKEN +#endif + +/* ---------------------------------------------------------------------------- */ +/* Window style flags */ +/* ---------------------------------------------------------------------------- */ + +/* + * Values are chosen so they can be |'ed in a bit list. + * Some styles are used across more than one group, + * so the values mustn't clash with others in the group. + * Otherwise, numbers can be reused across groups. + */ + +/* + Summary of the bits used by various styles. + + High word, containing styles which can be used with many windows: + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16| + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | \_ wxFULL_REPAINT_ON_RESIZE + | | | | | | | | | | | | | | \____ wxPOPUP_WINDOW + | | | | | | | | | | | | | \_______ wxWANTS_CHARS + | | | | | | | | | | | | \__________ wxTAB_TRAVERSAL + | | | | | | | | | | | \_____________ wxTRANSPARENT_WINDOW + | | | | | | | | | | \________________ wxBORDER_NONE + | | | | | | | | | \___________________ wxCLIP_CHILDREN + | | | | | | | | \______________________ wxALWAYS_SHOW_SB + | | | | | | | \_________________________ wxBORDER_STATIC + | | | | | | \____________________________ wxBORDER_SIMPLE + | | | | | \_______________________________ wxBORDER_RAISED + | | | | \__________________________________ wxBORDER_SUNKEN + | | | \_____________________________________ wxBORDER_{DOUBLE,THEME} + | | \________________________________________ wxCAPTION/wxCLIP_SIBLINGS + | \___________________________________________ wxHSCROLL + \______________________________________________ wxVSCROLL + + + Low word style bits is class-specific meaning that the same bit can have + different meanings for different controls (e.g. 0x10 is wxCB_READONLY + meaning that the control can't be modified for wxComboBox but wxLB_SORT + meaning that the control should be kept sorted for wxListBox, while + wxLB_SORT has a different value -- and this is just fine). + */ + +/* + * Window (Frame/dialog/subwindow/panel item) style flags + */ +#define wxVSCROLL 0x80000000 +#define wxHSCROLL 0x40000000 +#define wxCAPTION 0x20000000 + +/* New styles (border styles are now in their own enum) */ +#define wxDOUBLE_BORDER wxBORDER_DOUBLE +#define wxSUNKEN_BORDER wxBORDER_SUNKEN +#define wxRAISED_BORDER wxBORDER_RAISED +#define wxBORDER wxBORDER_SIMPLE +#define wxSIMPLE_BORDER wxBORDER_SIMPLE +#define wxSTATIC_BORDER wxBORDER_STATIC +#define wxNO_BORDER wxBORDER_NONE + +/* wxALWAYS_SHOW_SB: instead of hiding the scrollbar when it is not needed, */ +/* disable it - but still show (see also wxLB_ALWAYS_SB style) */ +/* */ +/* NB: as this style is only supported by wxUniversal and wxMSW so far */ +#define wxALWAYS_SHOW_SB 0x00800000 + +/* Clip children when painting, which reduces flicker in e.g. frames and */ +/* splitter windows, but can't be used in a panel where a static box must be */ +/* 'transparent' (panel paints the background for it) */ +#define wxCLIP_CHILDREN 0x00400000 + +/* Note we're reusing the wxCAPTION style because we won't need captions */ +/* for subwindows/controls */ +#define wxCLIP_SIBLINGS 0x20000000 + +#define wxTRANSPARENT_WINDOW 0x00100000 + +/* Add this style to a panel to get tab traversal working outside of dialogs */ +/* (on by default for wxPanel, wxDialog, wxScrolledWindow) */ +#define wxTAB_TRAVERSAL 0x00080000 + +/* Add this style if the control wants to get all keyboard messages (under */ +/* Windows, it won't normally get the dialog navigation key events) */ +#define wxWANTS_CHARS 0x00040000 + +/* Make window retained (Motif only, see src/generic/scrolwing.cpp) + * This is non-zero only under wxMotif, to avoid a clash with wxPOPUP_WINDOW + * on other platforms + */ + +#ifdef __WXMOTIF__ +#define wxRETAINED 0x00020000 +#else +#define wxRETAINED 0x00000000 +#endif +#define wxBACKINGSTORE wxRETAINED + +/* set this flag to create a special popup window: it will be always shown on */ +/* top of other windows, will capture the mouse and will be dismissed when the */ +/* mouse is clicked outside of it or if it loses focus in any other way */ +#define wxPOPUP_WINDOW 0x00020000 + +/* force a full repaint when the window is resized (instead of repainting just */ +/* the invalidated area) */ +#define wxFULL_REPAINT_ON_RESIZE 0x00010000 + +/* obsolete: now this is the default behaviour */ +/* */ +/* don't invalidate the whole window (resulting in a PAINT event) when the */ +/* window is resized (currently, makes sense for wxMSW only) */ +#define wxNO_FULL_REPAINT_ON_RESIZE 0 + +/* A mask which can be used to filter (out) all wxWindow-specific styles. + */ +#define wxWINDOW_STYLE_MASK \ + (wxVSCROLL|wxHSCROLL|wxBORDER_MASK|wxALWAYS_SHOW_SB|wxCLIP_CHILDREN| \ + wxCLIP_SIBLINGS|wxTRANSPARENT_WINDOW|wxTAB_TRAVERSAL|wxWANTS_CHARS| \ + wxRETAINED|wxPOPUP_WINDOW|wxFULL_REPAINT_ON_RESIZE) + +/* + * Extra window style flags (use wxWS_EX prefix to make it clear that they + * should be passed to wxWindow::SetExtraStyle(), not SetWindowStyle()) + */ + +/* by default, TransferDataTo/FromWindow() only work on direct children of the */ +/* window (compatible behaviour), set this flag to make them recursively */ +/* descend into all subwindows */ +#define wxWS_EX_VALIDATE_RECURSIVELY 0x00000001 + +/* wxCommandEvents and the objects of the derived classes are forwarded to the */ +/* parent window and so on recursively by default. Using this flag for the */ +/* given window allows to block this propagation at this window, i.e. prevent */ +/* the events from being propagated further upwards. The dialogs have this */ +/* flag on by default. */ +#define wxWS_EX_BLOCK_EVENTS 0x00000002 + +/* don't use this window as an implicit parent for the other windows: this must */ +/* be used with transient windows as otherwise there is the risk of creating a */ +/* dialog/frame with this window as a parent which would lead to a crash if the */ +/* parent is destroyed before the child */ +#define wxWS_EX_TRANSIENT 0x00000004 + +/* don't paint the window background, we'll assume it will */ +/* be done by a theming engine. This is not yet used but could */ +/* possibly be made to work in the future, at least on Windows */ +#define wxWS_EX_THEMED_BACKGROUND 0x00000008 + +/* this window should always process idle events */ +#define wxWS_EX_PROCESS_IDLE 0x00000010 + +/* this window should always process UI update events */ +#define wxWS_EX_PROCESS_UI_UPDATES 0x00000020 + +/* Draw the window in a metal theme on Mac */ +#define wxFRAME_EX_METAL 0x00000040 +#define wxDIALOG_EX_METAL 0x00000040 + +/* Use this style to add a context-sensitive help to the window (currently for */ +/* Win32 only and it doesn't work if wxMINIMIZE_BOX or wxMAXIMIZE_BOX are used) */ +#define wxWS_EX_CONTEXTHELP 0x00000080 + +/* synonyms for wxWS_EX_CONTEXTHELP for compatibility */ +#define wxFRAME_EX_CONTEXTHELP wxWS_EX_CONTEXTHELP +#define wxDIALOG_EX_CONTEXTHELP wxWS_EX_CONTEXTHELP + +/* Create a window which is attachable to another top level window */ +#define wxFRAME_DRAWER 0x0020 + +/* + * MDI parent frame style flags + * Can overlap with some of the above. + */ + +#define wxFRAME_NO_WINDOW_MENU 0x0100 + +/* + * wxMenuBar style flags + */ +/* use native docking */ +#define wxMB_DOCKABLE 0x0001 + +/* + * wxMenu style flags + */ +#define wxMENU_TEAROFF 0x0001 + +/* + * Apply to all panel items + */ +#define wxCOLOURED 0x0800 +#define wxFIXED_LENGTH 0x0400 + +/* + * Styles for wxListBox + */ +#define wxLB_SORT 0x0010 +#define wxLB_SINGLE 0x0020 +#define wxLB_MULTIPLE 0x0040 +#define wxLB_EXTENDED 0x0080 +/* wxLB_OWNERDRAW is Windows-only */ +#define wxLB_NEEDED_SB 0x0000 +#define wxLB_OWNERDRAW 0x0100 +#define wxLB_ALWAYS_SB 0x0200 +#define wxLB_NO_SB 0x0400 +#define wxLB_HSCROLL wxHSCROLL +/* always show an entire number of rows */ +#define wxLB_INT_HEIGHT 0x0800 + +#if WXWIN_COMPATIBILITY_2_6 + /* deprecated synonyms */ + #define wxPROCESS_ENTER 0x0400 /* wxTE_PROCESS_ENTER */ + #define wxPASSWORD 0x0800 /* wxTE_PASSWORD */ +#endif + +/* + * wxComboBox style flags + */ +#define wxCB_SIMPLE 0x0004 +#define wxCB_SORT 0x0008 +#define wxCB_READONLY 0x0010 +#define wxCB_DROPDOWN 0x0020 + +/* + * wxRadioBox style flags + */ +/* should we number the items from left to right or from top to bottom in a 2d */ +/* radiobox? */ +#define wxRA_LEFTTORIGHT 0x0001 +#define wxRA_TOPTOBOTTOM 0x0002 + +/* New, more intuitive names to specify majorDim argument */ +#define wxRA_SPECIFY_COLS wxHORIZONTAL +#define wxRA_SPECIFY_ROWS wxVERTICAL + +/* Old names for compatibility */ +#define wxRA_HORIZONTAL wxHORIZONTAL +#define wxRA_VERTICAL wxVERTICAL + +/* + * wxRadioButton style flag + */ +#define wxRB_GROUP 0x0004 +#define wxRB_SINGLE 0x0008 + +/* + * wxScrollBar flags + */ +#define wxSB_HORIZONTAL wxHORIZONTAL +#define wxSB_VERTICAL wxVERTICAL + +/* + * wxSpinButton flags. + * Note that a wxSpinCtrl is sometimes defined as a wxTextCtrl, and so the + * flags shouldn't overlap with wxTextCtrl flags that can be used for a single + * line controls (currently we reuse wxTE_CHARWRAP and wxTE_RICH2 neither of + * which makes sense for them). + */ +#define wxSP_HORIZONTAL wxHORIZONTAL /* 4 */ +#define wxSP_VERTICAL wxVERTICAL /* 8 */ +#define wxSP_ARROW_KEYS 0x4000 +#define wxSP_WRAP 0x8000 + +/* + * wxTabCtrl flags + */ +#define wxTC_RIGHTJUSTIFY 0x0010 +#define wxTC_FIXEDWIDTH 0x0020 +#define wxTC_TOP 0x0000 /* default */ +#define wxTC_LEFT 0x0020 +#define wxTC_RIGHT 0x0040 +#define wxTC_BOTTOM 0x0080 +#define wxTC_MULTILINE 0x0200 /* == wxNB_MULTILINE */ +#define wxTC_OWNERDRAW 0x0400 + +/* + * wxStaticBitmap flags + */ +#define wxBI_EXPAND wxEXPAND + +/* + * wxStaticLine flags + */ +#define wxLI_HORIZONTAL wxHORIZONTAL +#define wxLI_VERTICAL wxVERTICAL + + +/* + * extended dialog specifiers. these values are stored in a different + * flag and thus do not overlap with other style flags. note that these + * values do not correspond to the return values of the dialogs (for + * those values, look at the wxID_XXX defines). + */ + +/* wxCENTRE already defined as 0x00000001 */ +#define wxYES 0x00000002 +#define wxOK 0x00000004 +#define wxNO 0x00000008 +#define wxYES_NO (wxYES | wxNO) +#define wxCANCEL 0x00000010 +#define wxAPPLY 0x00000020 +#define wxCLOSE 0x00000040 + +#define wxOK_DEFAULT 0x00000000 /* has no effect (default) */ +#define wxYES_DEFAULT 0x00000000 /* has no effect (default) */ +#define wxNO_DEFAULT 0x00000080 /* only valid with wxYES_NO */ +#define wxCANCEL_DEFAULT 0x80000000 /* only valid with wxCANCEL */ + +#define wxICON_EXCLAMATION 0x00000100 +#define wxICON_HAND 0x00000200 +#define wxICON_WARNING wxICON_EXCLAMATION +#define wxICON_ERROR wxICON_HAND +#define wxICON_QUESTION 0x00000400 +#define wxICON_INFORMATION 0x00000800 +#define wxICON_STOP wxICON_HAND +#define wxICON_ASTERISK wxICON_INFORMATION + +#define wxHELP 0x00001000 +#define wxFORWARD 0x00002000 +#define wxBACKWARD 0x00004000 +#define wxRESET 0x00008000 +#define wxMORE 0x00010000 +#define wxSETUP 0x00020000 +#define wxICON_NONE 0x00040000 +#define wxICON_AUTH_NEEDED 0x00080000 + +#define wxICON_MASK \ + (wxICON_EXCLAMATION|wxICON_HAND|wxICON_QUESTION|wxICON_INFORMATION|wxICON_NONE|wxICON_AUTH_NEEDED) + +/* + * Background styles. See wxWindow::SetBackgroundStyle + */ +enum wxBackgroundStyle +{ + /* + background is erased in the EVT_ERASE_BACKGROUND handler or using + the system default background if no such handler is defined (this + is the default style) + */ + wxBG_STYLE_ERASE, + + /* + background is erased by the system, no EVT_ERASE_BACKGROUND event + is generated at all + */ + wxBG_STYLE_SYSTEM, + + /* + background is erased in EVT_PAINT handler and not erased at all + before it, this should be used if the paint handler paints over + the entire window to avoid flicker + */ + wxBG_STYLE_PAINT, + + /* + Indicates that the window background is not erased, letting the parent + window show through. + */ + wxBG_STYLE_TRANSPARENT, + + /* this style is deprecated and doesn't do anything, don't use */ + wxBG_STYLE_COLOUR, + + /* + this style is deprecated and is synonymous with + wxBG_STYLE_PAINT, use the new name + */ + wxBG_STYLE_CUSTOM = wxBG_STYLE_PAINT +}; + +/* + * Key types used by (old style) lists and hashes. + */ +enum wxKeyType +{ + wxKEY_NONE, + wxKEY_INTEGER, + wxKEY_STRING +}; + +/* ---------------------------------------------------------------------------- */ +/* standard IDs */ +/* ---------------------------------------------------------------------------- */ + +/* Standard menu IDs */ +enum wxStandardID +{ + /* + These ids delimit the range used by automatically-generated ids + (i.e. those used when wxID_ANY is specified during construction). + */ +#if defined(__WXMSW__) || wxUSE_AUTOID_MANAGEMENT + /* + On MSW the range is always restricted no matter if id management + is used or not because the native window ids are limited to short + range. On other platforms the range is only restricted if id + management is used so the reference count buffer won't be so big. + */ + wxID_AUTO_LOWEST = -32000, + wxID_AUTO_HIGHEST = -2000, +#else + wxID_AUTO_LOWEST = -1000000, + wxID_AUTO_HIGHEST = -2000, +#endif + + /* no id matches this one when compared to it */ + wxID_NONE = -3, + + /* id for a separator line in the menu (invalid for normal item) */ + wxID_SEPARATOR = -2, + + /* any id: means that we don't care about the id, whether when installing + * an event handler or when creating a new window */ + wxID_ANY = -1, + + + /* all predefined ids are between wxID_LOWEST and wxID_HIGHEST */ + wxID_LOWEST = 4999, + + wxID_OPEN, + wxID_CLOSE, + wxID_NEW, + wxID_SAVE, + wxID_SAVEAS, + wxID_REVERT, + wxID_EXIT, + wxID_UNDO, + wxID_REDO, + wxID_HELP, + wxID_PRINT, + wxID_PRINT_SETUP, + wxID_PAGE_SETUP, + wxID_PREVIEW, + wxID_ABOUT, + wxID_HELP_CONTENTS, + wxID_HELP_INDEX, + wxID_HELP_SEARCH, + wxID_HELP_COMMANDS, + wxID_HELP_PROCEDURES, + wxID_HELP_CONTEXT, + wxID_CLOSE_ALL, + wxID_PREFERENCES, + + wxID_EDIT = 5030, + wxID_CUT, + wxID_COPY, + wxID_PASTE, + wxID_CLEAR, + wxID_FIND, + wxID_DUPLICATE, + wxID_SELECTALL, + wxID_DELETE, + wxID_REPLACE, + wxID_REPLACE_ALL, + wxID_PROPERTIES, + + wxID_VIEW_DETAILS, + wxID_VIEW_LARGEICONS, + wxID_VIEW_SMALLICONS, + wxID_VIEW_LIST, + wxID_VIEW_SORTDATE, + wxID_VIEW_SORTNAME, + wxID_VIEW_SORTSIZE, + wxID_VIEW_SORTTYPE, + + wxID_FILE = 5050, + wxID_FILE1, + wxID_FILE2, + wxID_FILE3, + wxID_FILE4, + wxID_FILE5, + wxID_FILE6, + wxID_FILE7, + wxID_FILE8, + wxID_FILE9, + + /* Standard button and menu IDs */ + wxID_OK = 5100, + wxID_CANCEL, + wxID_APPLY, + wxID_YES, + wxID_NO, + wxID_STATIC, + wxID_FORWARD, + wxID_BACKWARD, + wxID_DEFAULT, + wxID_MORE, + wxID_SETUP, + wxID_RESET, + wxID_CONTEXT_HELP, + wxID_YESTOALL, + wxID_NOTOALL, + wxID_ABORT, + wxID_RETRY, + wxID_IGNORE, + wxID_ADD, + wxID_REMOVE, + + wxID_UP, + wxID_DOWN, + wxID_HOME, + wxID_REFRESH, + wxID_STOP, + wxID_INDEX, + + wxID_BOLD, + wxID_ITALIC, + wxID_JUSTIFY_CENTER, + wxID_JUSTIFY_FILL, + wxID_JUSTIFY_RIGHT, + wxID_JUSTIFY_LEFT, + wxID_UNDERLINE, + wxID_INDENT, + wxID_UNINDENT, + wxID_ZOOM_100, + wxID_ZOOM_FIT, + wxID_ZOOM_IN, + wxID_ZOOM_OUT, + wxID_UNDELETE, + wxID_REVERT_TO_SAVED, + wxID_CDROM, + wxID_CONVERT, + wxID_EXECUTE, + wxID_FLOPPY, + wxID_HARDDISK, + wxID_BOTTOM, + wxID_FIRST, + wxID_LAST, + wxID_TOP, + wxID_INFO, + wxID_JUMP_TO, + wxID_NETWORK, + wxID_SELECT_COLOR, + wxID_SELECT_FONT, + wxID_SORT_ASCENDING, + wxID_SORT_DESCENDING, + wxID_SPELL_CHECK, + wxID_STRIKETHROUGH, + + /* System menu IDs (used by wxUniv): */ + wxID_SYSTEM_MENU = 5200, + wxID_CLOSE_FRAME, + wxID_MOVE_FRAME, + wxID_RESIZE_FRAME, + wxID_MAXIMIZE_FRAME, + wxID_ICONIZE_FRAME, + wxID_RESTORE_FRAME, + + /* MDI window menu ids */ + wxID_MDI_WINDOW_FIRST = 5230, + wxID_MDI_WINDOW_CASCADE = wxID_MDI_WINDOW_FIRST, + wxID_MDI_WINDOW_TILE_HORZ, + wxID_MDI_WINDOW_TILE_VERT, + wxID_MDI_WINDOW_ARRANGE_ICONS, + wxID_MDI_WINDOW_PREV, + wxID_MDI_WINDOW_NEXT, + wxID_MDI_WINDOW_LAST = wxID_MDI_WINDOW_NEXT, + + /* OS X system menu ids */ + wxID_OSX_MENU_FIRST = 5250, + wxID_OSX_HIDE = wxID_OSX_MENU_FIRST, + wxID_OSX_HIDEOTHERS, + wxID_OSX_SHOWALL, +#if wxABI_VERSION >= 30001 + wxID_OSX_SERVICES, + wxID_OSX_MENU_LAST = wxID_OSX_SERVICES, +#else + wxID_OSX_MENU_LAST = wxID_OSX_SHOWALL, +#endif + + /* IDs used by generic file dialog (13 consecutive starting from this value) */ + wxID_FILEDLGG = 5900, + + /* IDs used by generic file ctrl (4 consecutive starting from this value) */ + wxID_FILECTRL = 5950, + + wxID_HIGHEST = 5999 +}; + +/* ---------------------------------------------------------------------------- */ +/* wxWindowID type (after wxID_XYZ enum, platform detection, and dlimpexp.h) */ +/* ---------------------------------------------------------------------------- */ + +/* special care should be taken with this type under Windows where the real */ +/* window id is unsigned, so we must always do the cast before comparing them */ +/* (or else they would be always different!). Using wxGetWindowId() which does */ +/* the cast itself is recommended. Note that this type can't be unsigned */ +/* because wxID_ANY == -1 is a valid (and largely used) value for window id. */ +#if defined(__cplusplus) && wxUSE_GUI + #include "wx/windowid.h" +#endif + +/* ---------------------------------------------------------------------------- */ +/* other constants */ +/* ---------------------------------------------------------------------------- */ + +/* menu and toolbar item kinds */ +enum wxItemKind +{ + wxITEM_SEPARATOR = -1, + wxITEM_NORMAL, + wxITEM_CHECK, + wxITEM_RADIO, + wxITEM_DROPDOWN, + wxITEM_MAX +}; + +/* + * The possible states of a 3-state checkbox (Compatible + * with the 2-state checkbox). + */ +enum wxCheckBoxState +{ + wxCHK_UNCHECKED, + wxCHK_CHECKED, + wxCHK_UNDETERMINED /* 3-state checkbox only */ +}; + + +/* hit test results */ +enum wxHitTest +{ + wxHT_NOWHERE, + + /* scrollbar */ + wxHT_SCROLLBAR_FIRST = wxHT_NOWHERE, + wxHT_SCROLLBAR_ARROW_LINE_1, /* left or upper arrow to scroll by line */ + wxHT_SCROLLBAR_ARROW_LINE_2, /* right or down */ + wxHT_SCROLLBAR_ARROW_PAGE_1, /* left or upper arrow to scroll by page */ + wxHT_SCROLLBAR_ARROW_PAGE_2, /* right or down */ + wxHT_SCROLLBAR_THUMB, /* on the thumb */ + wxHT_SCROLLBAR_BAR_1, /* bar to the left/above the thumb */ + wxHT_SCROLLBAR_BAR_2, /* bar to the right/below the thumb */ + wxHT_SCROLLBAR_LAST, + + /* window */ + wxHT_WINDOW_OUTSIDE, /* not in this window at all */ + wxHT_WINDOW_INSIDE, /* in the client area */ + wxHT_WINDOW_VERT_SCROLLBAR, /* on the vertical scrollbar */ + wxHT_WINDOW_HORZ_SCROLLBAR, /* on the horizontal scrollbar */ + wxHT_WINDOW_CORNER, /* on the corner between 2 scrollbars */ + + wxHT_MAX +}; + +/* ---------------------------------------------------------------------------- */ +/* Possible SetSize flags */ +/* ---------------------------------------------------------------------------- */ + +/* Use internally-calculated width if -1 */ +#define wxSIZE_AUTO_WIDTH 0x0001 +/* Use internally-calculated height if -1 */ +#define wxSIZE_AUTO_HEIGHT 0x0002 +/* Use internally-calculated width and height if each is -1 */ +#define wxSIZE_AUTO (wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT) +/* Ignore missing (-1) dimensions (use existing). */ +/* For readability only: test for wxSIZE_AUTO_WIDTH/HEIGHT in code. */ +#define wxSIZE_USE_EXISTING 0x0000 +/* Allow -1 as a valid position */ +#define wxSIZE_ALLOW_MINUS_ONE 0x0004 +/* Don't do parent client adjustments (for implementation only) */ +#define wxSIZE_NO_ADJUSTMENTS 0x0008 +/* Change the window position even if it seems to be already correct */ +#define wxSIZE_FORCE 0x0010 +/* Emit size event even if size didn't change */ +#define wxSIZE_FORCE_EVENT 0x0020 + +/* ---------------------------------------------------------------------------- */ +/* GDI descriptions */ +/* ---------------------------------------------------------------------------- */ + +// Hatch styles used by both pen and brush styles. +// +// NB: Do not use these constants directly, they're for internal use only, use +// wxBRUSHSTYLE_XXX_HATCH and wxPENSTYLE_XXX_HATCH instead. +enum wxHatchStyle +{ + wxHATCHSTYLE_INVALID = -1, + + /* + The value of the first style is chosen to fit with + wxDeprecatedGUIConstants values below, don't change it. + */ + wxHATCHSTYLE_FIRST = 111, + wxHATCHSTYLE_BDIAGONAL = wxHATCHSTYLE_FIRST, + wxHATCHSTYLE_CROSSDIAG, + wxHATCHSTYLE_FDIAGONAL, + wxHATCHSTYLE_CROSS, + wxHATCHSTYLE_HORIZONTAL, + wxHATCHSTYLE_VERTICAL, + wxHATCHSTYLE_LAST = wxHATCHSTYLE_VERTICAL +}; + +/* + WARNING: the following styles are deprecated; use the + wxFontFamily, wxFontStyle, wxFontWeight, wxBrushStyle, + wxPenStyle, wxPenCap, wxPenJoin enum values instead! +*/ + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + +/* don't use any elements of this enum in the new code */ +enum wxDeprecatedGUIConstants +{ + /* Text font families */ + wxDEFAULT = 70, + wxDECORATIVE, + wxROMAN, + wxSCRIPT, + wxSWISS, + wxMODERN, + wxTELETYPE, /* @@@@ */ + + /* Proportional or Fixed width fonts (not yet used) */ + wxVARIABLE = 80, + wxFIXED, + + wxNORMAL = 90, + wxLIGHT, + wxBOLD, + /* Also wxNORMAL for normal (non-italic text) */ + wxITALIC, + wxSLANT, + + /* Pen styles */ + wxSOLID = 100, + wxDOT, + wxLONG_DASH, + wxSHORT_DASH, + wxDOT_DASH, + wxUSER_DASH, + + wxTRANSPARENT, + + /* Brush & Pen Stippling. Note that a stippled pen cannot be dashed!! */ + /* Note also that stippling a Pen IS meaningful, because a Line is */ + wxSTIPPLE_MASK_OPAQUE, /* mask is used for blitting monochrome using text fore and back ground colors */ + wxSTIPPLE_MASK, /* mask is used for masking areas in the stipple bitmap (TO DO) */ + /* drawn with a Pen, and without any Brush -- and it can be stippled. */ + wxSTIPPLE = 110, + + wxBDIAGONAL_HATCH = wxHATCHSTYLE_BDIAGONAL, + wxCROSSDIAG_HATCH = wxHATCHSTYLE_CROSSDIAG, + wxFDIAGONAL_HATCH = wxHATCHSTYLE_FDIAGONAL, + wxCROSS_HATCH = wxHATCHSTYLE_CROSS, + wxHORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL, + wxVERTICAL_HATCH = wxHATCHSTYLE_VERTICAL, + wxFIRST_HATCH = wxHATCHSTYLE_FIRST, + wxLAST_HATCH = wxHATCHSTYLE_LAST +}; +#endif + +/* ToolPanel in wxFrame (VZ: unused?) */ +enum +{ + wxTOOL_TOP = 1, + wxTOOL_BOTTOM, + wxTOOL_LEFT, + wxTOOL_RIGHT +}; + +/* the values of the format constants should be the same as corresponding */ +/* CF_XXX constants in Windows API */ +enum wxDataFormatId +{ + wxDF_INVALID = 0, + wxDF_TEXT = 1, /* CF_TEXT */ + wxDF_BITMAP = 2, /* CF_BITMAP */ + wxDF_METAFILE = 3, /* CF_METAFILEPICT */ + wxDF_SYLK = 4, + wxDF_DIF = 5, + wxDF_TIFF = 6, + wxDF_OEMTEXT = 7, /* CF_OEMTEXT */ + wxDF_DIB = 8, /* CF_DIB */ + wxDF_PALETTE = 9, + wxDF_PENDATA = 10, + wxDF_RIFF = 11, + wxDF_WAVE = 12, + wxDF_UNICODETEXT = 13, + wxDF_ENHMETAFILE = 14, + wxDF_FILENAME = 15, /* CF_HDROP */ + wxDF_LOCALE = 16, + wxDF_PRIVATE = 20, + wxDF_HTML = 30, /* Note: does not correspond to CF_ constant */ + wxDF_MAX +}; + +/* Key codes */ +enum wxKeyCode +{ + WXK_NONE = 0, + + WXK_CONTROL_A = 1, + WXK_CONTROL_B, + WXK_CONTROL_C, + WXK_CONTROL_D, + WXK_CONTROL_E, + WXK_CONTROL_F, + WXK_CONTROL_G, + WXK_CONTROL_H, + WXK_CONTROL_I, + WXK_CONTROL_J, + WXK_CONTROL_K, + WXK_CONTROL_L, + WXK_CONTROL_M, + WXK_CONTROL_N, + WXK_CONTROL_O, + WXK_CONTROL_P, + WXK_CONTROL_Q, + WXK_CONTROL_R, + WXK_CONTROL_S, + WXK_CONTROL_T, + WXK_CONTROL_U, + WXK_CONTROL_V, + WXK_CONTROL_W, + WXK_CONTROL_X, + WXK_CONTROL_Y, + WXK_CONTROL_Z, + + WXK_BACK = 8, /* backspace */ + WXK_TAB = 9, + WXK_RETURN = 13, + WXK_ESCAPE = 27, + + /* values from 33 to 126 are reserved for the standard ASCII characters */ + + WXK_SPACE = 32, + WXK_DELETE = 127, + + /* values from 128 to 255 are reserved for ASCII extended characters + (note that there isn't a single fixed standard for the meaning + of these values; avoid them in portable apps!) */ + + /* These are not compatible with unicode characters. + If you want to get a unicode character from a key event, use + wxKeyEvent::GetUnicodeKey */ + WXK_START = 300, + WXK_LBUTTON, + WXK_RBUTTON, + WXK_CANCEL, + WXK_MBUTTON, + WXK_CLEAR, + WXK_SHIFT, + WXK_ALT, + WXK_CONTROL, + WXK_MENU, + WXK_PAUSE, + WXK_CAPITAL, + WXK_END, + WXK_HOME, + WXK_LEFT, + WXK_UP, + WXK_RIGHT, + WXK_DOWN, + WXK_SELECT, + WXK_PRINT, + WXK_EXECUTE, + WXK_SNAPSHOT, + WXK_INSERT, + WXK_HELP, + WXK_NUMPAD0, + WXK_NUMPAD1, + WXK_NUMPAD2, + WXK_NUMPAD3, + WXK_NUMPAD4, + WXK_NUMPAD5, + WXK_NUMPAD6, + WXK_NUMPAD7, + WXK_NUMPAD8, + WXK_NUMPAD9, + WXK_MULTIPLY, + WXK_ADD, + WXK_SEPARATOR, + WXK_SUBTRACT, + WXK_DECIMAL, + WXK_DIVIDE, + WXK_F1, + WXK_F2, + WXK_F3, + WXK_F4, + WXK_F5, + WXK_F6, + WXK_F7, + WXK_F8, + WXK_F9, + WXK_F10, + WXK_F11, + WXK_F12, + WXK_F13, + WXK_F14, + WXK_F15, + WXK_F16, + WXK_F17, + WXK_F18, + WXK_F19, + WXK_F20, + WXK_F21, + WXK_F22, + WXK_F23, + WXK_F24, + WXK_NUMLOCK, + WXK_SCROLL, + WXK_PAGEUP, + WXK_PAGEDOWN, +#if WXWIN_COMPATIBILITY_2_6 + WXK_PRIOR = WXK_PAGEUP, + WXK_NEXT = WXK_PAGEDOWN, +#endif + + WXK_NUMPAD_SPACE, + WXK_NUMPAD_TAB, + WXK_NUMPAD_ENTER, + WXK_NUMPAD_F1, + WXK_NUMPAD_F2, + WXK_NUMPAD_F3, + WXK_NUMPAD_F4, + WXK_NUMPAD_HOME, + WXK_NUMPAD_LEFT, + WXK_NUMPAD_UP, + WXK_NUMPAD_RIGHT, + WXK_NUMPAD_DOWN, + WXK_NUMPAD_PAGEUP, + WXK_NUMPAD_PAGEDOWN, +#if WXWIN_COMPATIBILITY_2_6 + WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP, + WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN, +#endif + WXK_NUMPAD_END, + WXK_NUMPAD_BEGIN, + WXK_NUMPAD_INSERT, + WXK_NUMPAD_DELETE, + WXK_NUMPAD_EQUAL, + WXK_NUMPAD_MULTIPLY, + WXK_NUMPAD_ADD, + WXK_NUMPAD_SEPARATOR, + WXK_NUMPAD_SUBTRACT, + WXK_NUMPAD_DECIMAL, + WXK_NUMPAD_DIVIDE, + + WXK_WINDOWS_LEFT, + WXK_WINDOWS_RIGHT, + WXK_WINDOWS_MENU , +#ifdef __WXOSX__ + WXK_RAW_CONTROL, +#else + WXK_RAW_CONTROL = WXK_CONTROL, +#endif + WXK_COMMAND = WXK_CONTROL, + + /* Hardware-specific buttons */ + WXK_SPECIAL1 = 193, + WXK_SPECIAL2, + WXK_SPECIAL3, + WXK_SPECIAL4, + WXK_SPECIAL5, + WXK_SPECIAL6, + WXK_SPECIAL7, + WXK_SPECIAL8, + WXK_SPECIAL9, + WXK_SPECIAL10, + WXK_SPECIAL11, + WXK_SPECIAL12, + WXK_SPECIAL13, + WXK_SPECIAL14, + WXK_SPECIAL15, + WXK_SPECIAL16, + WXK_SPECIAL17, + WXK_SPECIAL18, + WXK_SPECIAL19, + WXK_SPECIAL20 +}; + +/* This enum contains bit mask constants used in wxKeyEvent */ +enum wxKeyModifier +{ + wxMOD_NONE = 0x0000, + wxMOD_ALT = 0x0001, + wxMOD_CONTROL = 0x0002, + wxMOD_ALTGR = wxMOD_ALT | wxMOD_CONTROL, + wxMOD_SHIFT = 0x0004, + wxMOD_META = 0x0008, + wxMOD_WIN = wxMOD_META, +#if defined(__WXMAC__) || defined(__WXCOCOA__) + wxMOD_RAW_CONTROL = 0x0010, +#else + wxMOD_RAW_CONTROL = wxMOD_CONTROL, +#endif + wxMOD_CMD = wxMOD_CONTROL, + wxMOD_ALL = 0xffff +}; + +/* Shortcut for easier dialog-unit-to-pixel conversion */ +#define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt) + +/* Paper types */ +typedef enum +{ + wxPAPER_NONE, /* Use specific dimensions */ + wxPAPER_LETTER, /* Letter, 8 1/2 by 11 inches */ + wxPAPER_LEGAL, /* Legal, 8 1/2 by 14 inches */ + wxPAPER_A4, /* A4 Sheet, 210 by 297 millimeters */ + wxPAPER_CSHEET, /* C Sheet, 17 by 22 inches */ + wxPAPER_DSHEET, /* D Sheet, 22 by 34 inches */ + wxPAPER_ESHEET, /* E Sheet, 34 by 44 inches */ + wxPAPER_LETTERSMALL, /* Letter Small, 8 1/2 by 11 inches */ + wxPAPER_TABLOID, /* Tabloid, 11 by 17 inches */ + wxPAPER_LEDGER, /* Ledger, 17 by 11 inches */ + wxPAPER_STATEMENT, /* Statement, 5 1/2 by 8 1/2 inches */ + wxPAPER_EXECUTIVE, /* Executive, 7 1/4 by 10 1/2 inches */ + wxPAPER_A3, /* A3 sheet, 297 by 420 millimeters */ + wxPAPER_A4SMALL, /* A4 small sheet, 210 by 297 millimeters */ + wxPAPER_A5, /* A5 sheet, 148 by 210 millimeters */ + wxPAPER_B4, /* B4 sheet, 250 by 354 millimeters */ + wxPAPER_B5, /* B5 sheet, 182-by-257-millimeter paper */ + wxPAPER_FOLIO, /* Folio, 8-1/2-by-13-inch paper */ + wxPAPER_QUARTO, /* Quarto, 215-by-275-millimeter paper */ + wxPAPER_10X14, /* 10-by-14-inch sheet */ + wxPAPER_11X17, /* 11-by-17-inch sheet */ + wxPAPER_NOTE, /* Note, 8 1/2 by 11 inches */ + wxPAPER_ENV_9, /* #9 Envelope, 3 7/8 by 8 7/8 inches */ + wxPAPER_ENV_10, /* #10 Envelope, 4 1/8 by 9 1/2 inches */ + wxPAPER_ENV_11, /* #11 Envelope, 4 1/2 by 10 3/8 inches */ + wxPAPER_ENV_12, /* #12 Envelope, 4 3/4 by 11 inches */ + wxPAPER_ENV_14, /* #14 Envelope, 5 by 11 1/2 inches */ + wxPAPER_ENV_DL, /* DL Envelope, 110 by 220 millimeters */ + wxPAPER_ENV_C5, /* C5 Envelope, 162 by 229 millimeters */ + wxPAPER_ENV_C3, /* C3 Envelope, 324 by 458 millimeters */ + wxPAPER_ENV_C4, /* C4 Envelope, 229 by 324 millimeters */ + wxPAPER_ENV_C6, /* C6 Envelope, 114 by 162 millimeters */ + wxPAPER_ENV_C65, /* C65 Envelope, 114 by 229 millimeters */ + wxPAPER_ENV_B4, /* B4 Envelope, 250 by 353 millimeters */ + wxPAPER_ENV_B5, /* B5 Envelope, 176 by 250 millimeters */ + wxPAPER_ENV_B6, /* B6 Envelope, 176 by 125 millimeters */ + wxPAPER_ENV_ITALY, /* Italy Envelope, 110 by 230 millimeters */ + wxPAPER_ENV_MONARCH, /* Monarch Envelope, 3 7/8 by 7 1/2 inches */ + wxPAPER_ENV_PERSONAL, /* 6 3/4 Envelope, 3 5/8 by 6 1/2 inches */ + wxPAPER_FANFOLD_US, /* US Std Fanfold, 14 7/8 by 11 inches */ + wxPAPER_FANFOLD_STD_GERMAN, /* German Std Fanfold, 8 1/2 by 12 inches */ + wxPAPER_FANFOLD_LGL_GERMAN, /* German Legal Fanfold, 8 1/2 by 13 inches */ + + wxPAPER_ISO_B4, /* B4 (ISO) 250 x 353 mm */ + wxPAPER_JAPANESE_POSTCARD, /* Japanese Postcard 100 x 148 mm */ + wxPAPER_9X11, /* 9 x 11 in */ + wxPAPER_10X11, /* 10 x 11 in */ + wxPAPER_15X11, /* 15 x 11 in */ + wxPAPER_ENV_INVITE, /* Envelope Invite 220 x 220 mm */ + wxPAPER_LETTER_EXTRA, /* Letter Extra 9 \275 x 12 in */ + wxPAPER_LEGAL_EXTRA, /* Legal Extra 9 \275 x 15 in */ + wxPAPER_TABLOID_EXTRA, /* Tabloid Extra 11.69 x 18 in */ + wxPAPER_A4_EXTRA, /* A4 Extra 9.27 x 12.69 in */ + wxPAPER_LETTER_TRANSVERSE, /* Letter Transverse 8 \275 x 11 in */ + wxPAPER_A4_TRANSVERSE, /* A4 Transverse 210 x 297 mm */ + wxPAPER_LETTER_EXTRA_TRANSVERSE, /* Letter Extra Transverse 9\275 x 12 in */ + wxPAPER_A_PLUS, /* SuperA/SuperA/A4 227 x 356 mm */ + wxPAPER_B_PLUS, /* SuperB/SuperB/A3 305 x 487 mm */ + wxPAPER_LETTER_PLUS, /* Letter Plus 8.5 x 12.69 in */ + wxPAPER_A4_PLUS, /* A4 Plus 210 x 330 mm */ + wxPAPER_A5_TRANSVERSE, /* A5 Transverse 148 x 210 mm */ + wxPAPER_B5_TRANSVERSE, /* B5 (JIS) Transverse 182 x 257 mm */ + wxPAPER_A3_EXTRA, /* A3 Extra 322 x 445 mm */ + wxPAPER_A5_EXTRA, /* A5 Extra 174 x 235 mm */ + wxPAPER_B5_EXTRA, /* B5 (ISO) Extra 201 x 276 mm */ + wxPAPER_A2, /* A2 420 x 594 mm */ + wxPAPER_A3_TRANSVERSE, /* A3 Transverse 297 x 420 mm */ + wxPAPER_A3_EXTRA_TRANSVERSE, /* A3 Extra Transverse 322 x 445 mm */ + + wxPAPER_DBL_JAPANESE_POSTCARD,/* Japanese Double Postcard 200 x 148 mm */ + wxPAPER_A6, /* A6 105 x 148 mm */ + wxPAPER_JENV_KAKU2, /* Japanese Envelope Kaku #2 */ + wxPAPER_JENV_KAKU3, /* Japanese Envelope Kaku #3 */ + wxPAPER_JENV_CHOU3, /* Japanese Envelope Chou #3 */ + wxPAPER_JENV_CHOU4, /* Japanese Envelope Chou #4 */ + wxPAPER_LETTER_ROTATED, /* Letter Rotated 11 x 8 1/2 in */ + wxPAPER_A3_ROTATED, /* A3 Rotated 420 x 297 mm */ + wxPAPER_A4_ROTATED, /* A4 Rotated 297 x 210 mm */ + wxPAPER_A5_ROTATED, /* A5 Rotated 210 x 148 mm */ + wxPAPER_B4_JIS_ROTATED, /* B4 (JIS) Rotated 364 x 257 mm */ + wxPAPER_B5_JIS_ROTATED, /* B5 (JIS) Rotated 257 x 182 mm */ + wxPAPER_JAPANESE_POSTCARD_ROTATED,/* Japanese Postcard Rotated 148 x 100 mm */ + wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED,/* Double Japanese Postcard Rotated 148 x 200 mm */ + wxPAPER_A6_ROTATED, /* A6 Rotated 148 x 105 mm */ + wxPAPER_JENV_KAKU2_ROTATED, /* Japanese Envelope Kaku #2 Rotated */ + wxPAPER_JENV_KAKU3_ROTATED, /* Japanese Envelope Kaku #3 Rotated */ + wxPAPER_JENV_CHOU3_ROTATED, /* Japanese Envelope Chou #3 Rotated */ + wxPAPER_JENV_CHOU4_ROTATED, /* Japanese Envelope Chou #4 Rotated */ + wxPAPER_B6_JIS, /* B6 (JIS) 128 x 182 mm */ + wxPAPER_B6_JIS_ROTATED, /* B6 (JIS) Rotated 182 x 128 mm */ + wxPAPER_12X11, /* 12 x 11 in */ + wxPAPER_JENV_YOU4, /* Japanese Envelope You #4 */ + wxPAPER_JENV_YOU4_ROTATED, /* Japanese Envelope You #4 Rotated */ + wxPAPER_P16K, /* PRC 16K 146 x 215 mm */ + wxPAPER_P32K, /* PRC 32K 97 x 151 mm */ + wxPAPER_P32KBIG, /* PRC 32K(Big) 97 x 151 mm */ + wxPAPER_PENV_1, /* PRC Envelope #1 102 x 165 mm */ + wxPAPER_PENV_2, /* PRC Envelope #2 102 x 176 mm */ + wxPAPER_PENV_3, /* PRC Envelope #3 125 x 176 mm */ + wxPAPER_PENV_4, /* PRC Envelope #4 110 x 208 mm */ + wxPAPER_PENV_5, /* PRC Envelope #5 110 x 220 mm */ + wxPAPER_PENV_6, /* PRC Envelope #6 120 x 230 mm */ + wxPAPER_PENV_7, /* PRC Envelope #7 160 x 230 mm */ + wxPAPER_PENV_8, /* PRC Envelope #8 120 x 309 mm */ + wxPAPER_PENV_9, /* PRC Envelope #9 229 x 324 mm */ + wxPAPER_PENV_10, /* PRC Envelope #10 324 x 458 mm */ + wxPAPER_P16K_ROTATED, /* PRC 16K Rotated */ + wxPAPER_P32K_ROTATED, /* PRC 32K Rotated */ + wxPAPER_P32KBIG_ROTATED, /* PRC 32K(Big) Rotated */ + wxPAPER_PENV_1_ROTATED, /* PRC Envelope #1 Rotated 165 x 102 mm */ + wxPAPER_PENV_2_ROTATED, /* PRC Envelope #2 Rotated 176 x 102 mm */ + wxPAPER_PENV_3_ROTATED, /* PRC Envelope #3 Rotated 176 x 125 mm */ + wxPAPER_PENV_4_ROTATED, /* PRC Envelope #4 Rotated 208 x 110 mm */ + wxPAPER_PENV_5_ROTATED, /* PRC Envelope #5 Rotated 220 x 110 mm */ + wxPAPER_PENV_6_ROTATED, /* PRC Envelope #6 Rotated 230 x 120 mm */ + wxPAPER_PENV_7_ROTATED, /* PRC Envelope #7 Rotated 230 x 160 mm */ + wxPAPER_PENV_8_ROTATED, /* PRC Envelope #8 Rotated 309 x 120 mm */ + wxPAPER_PENV_9_ROTATED, /* PRC Envelope #9 Rotated 324 x 229 mm */ + wxPAPER_PENV_10_ROTATED, /* PRC Envelope #10 Rotated 458 x 324 m */ + wxPAPER_A0, /* A0 Sheet 841 x 1189 mm */ + wxPAPER_A1 /* A1 Sheet 594 x 841 mm */ +} wxPaperSize; + +/* Printing orientation */ +enum wxPrintOrientation +{ + wxPORTRAIT = 1, + wxLANDSCAPE +}; + +/* Duplex printing modes + */ + +enum wxDuplexMode +{ + wxDUPLEX_SIMPLEX, /* Non-duplex */ + wxDUPLEX_HORIZONTAL, + wxDUPLEX_VERTICAL +}; + +/* Print quality. + */ + +#define wxPRINT_QUALITY_HIGH -1 +#define wxPRINT_QUALITY_MEDIUM -2 +#define wxPRINT_QUALITY_LOW -3 +#define wxPRINT_QUALITY_DRAFT -4 + +typedef int wxPrintQuality; + +/* Print mode (currently PostScript only) + */ + +enum wxPrintMode +{ + wxPRINT_MODE_NONE = 0, + wxPRINT_MODE_PREVIEW = 1, /* Preview in external application */ + wxPRINT_MODE_FILE = 2, /* Print to file */ + wxPRINT_MODE_PRINTER = 3, /* Send to printer */ + wxPRINT_MODE_STREAM = 4 /* Send postscript data into a stream */ +}; + +/* ---------------------------------------------------------------------------- */ +/* UpdateWindowUI flags */ +/* ---------------------------------------------------------------------------- */ + +enum wxUpdateUI +{ + wxUPDATE_UI_NONE = 0x0000, + wxUPDATE_UI_RECURSE = 0x0001, + wxUPDATE_UI_FROMIDLE = 0x0002 /* Invoked from On(Internal)Idle */ +}; + + +/* ---------------------------------------------------------------------------- */ +/* wxList types */ +/* ---------------------------------------------------------------------------- */ + +/* type of compare function for list sort operation (as in 'qsort'): it should + return a negative value, 0 or positive value if the first element is less + than, equal or greater than the second */ + +typedef int (* LINKAGEMODE wxSortCompareFunction)(const void *elem1, const void *elem2); + +/* wxList iterator function */ +typedef int (* LINKAGEMODE wxListIterateFunction)(void *current); + + +/* ---------------------------------------------------------------------------- */ +/* miscellaneous */ +/* ---------------------------------------------------------------------------- */ + +/* define this macro if font handling is done using the X font names */ +#if (defined(__WXGTK__) && !defined(__WXGTK20__)) || defined(__X__) + #define _WX_X_FONTLIKE +#endif + +/* macro to specify "All Files" on different platforms */ +#if defined(__WXMSW__) || defined(__WXPM__) +# define wxALL_FILES_PATTERN wxT("*.*") +# define wxALL_FILES gettext_noop("All files (*.*)|*.*") +#else +# define wxALL_FILES_PATTERN wxT("*") +# define wxALL_FILES gettext_noop("All files (*)|*") +#endif + +#if defined(__CYGWIN__) && defined(__WXMSW__) +# if wxUSE_STD_CONTAINERS || defined(wxUSE_STD_STRING) + /* + NASTY HACK because the gethostname in sys/unistd.h which the gnu + stl includes and wx builds with by default clash with each other + (windows version 2nd param is int, sys/unistd.h version is unsigned + int). + */ +# define gethostname gethostnameHACK +# include +# undef gethostname +# endif +#endif + +/* --------------------------------------------------------------------------- */ +/* macros that enable wxWidgets apps to be compiled in absence of the */ +/* system headers, although some platform specific types are used in the */ +/* platform specific (implementation) parts of the headers */ +/* --------------------------------------------------------------------------- */ + +#ifdef __DARWIN__ +#define DECLARE_WXOSX_OPAQUE_CFREF( name ) typedef struct __##name* name##Ref; +#define DECLARE_WXOSX_OPAQUE_CONST_CFREF( name ) typedef const struct __##name* name##Ref; +#endif + +#ifdef __WXMAC__ + +#define WX_OPAQUE_TYPE( name ) struct wxOpaque##name + +typedef void* WXHBITMAP; +typedef void* WXHCURSOR; +typedef void* WXRECTPTR; +typedef void* WXPOINTPTR; +typedef void* WXHWND; +typedef void* WXEVENTREF; +typedef void* WXEVENTHANDLERREF; +typedef void* WXEVENTHANDLERCALLREF; +typedef void* WXAPPLEEVENTREF; + +typedef unsigned int WXUINT; +typedef unsigned long WXDWORD; +typedef unsigned short WXWORD; + +typedef WX_OPAQUE_TYPE(PicHandle ) * WXHMETAFILE ; +#if wxOSX_USE_CARBON +typedef struct OpaqueControlRef* WXWidget ; +typedef struct OpaqueWindowPtr* WXWindow ; +typedef struct __AGLPixelFormatRec *WXGLPixelFormat; +typedef struct __AGLContextRec *WXGLContext; +#endif + +typedef void* WXDisplay; + +/* + * core frameworks + */ + +typedef const void * CFTypeRef; + +/* typedef const struct __CFString * CFStringRef; */ + +DECLARE_WXOSX_OPAQUE_CONST_CFREF( CFString ) +typedef struct __CFString * CFMutableStringRef; + +DECLARE_WXOSX_OPAQUE_CFREF( CFRunLoopSource ) +DECLARE_WXOSX_OPAQUE_CONST_CFREF( CTFont ) +DECLARE_WXOSX_OPAQUE_CONST_CFREF( CTFontDescriptor ) + +#define DECLARE_WXOSX_OPAQUE_CGREF( name ) typedef struct name* name##Ref; + +DECLARE_WXOSX_OPAQUE_CGREF( CGColor ) +DECLARE_WXOSX_OPAQUE_CGREF( CGImage ) +DECLARE_WXOSX_OPAQUE_CGREF( CGContext ) +DECLARE_WXOSX_OPAQUE_CGREF( CGFont ) + +typedef CGColorRef WXCOLORREF; +typedef CGImageRef WXCGIMAGEREF; +typedef CGContextRef WXHDC; + +/* + * carbon + */ + +typedef const struct __HIShape * HIShapeRef; +typedef struct __HIShape * HIMutableShapeRef; + +#define DECLARE_WXMAC_OPAQUE_REF( name ) typedef struct Opaque##name* name; + +DECLARE_WXMAC_OPAQUE_REF( PasteboardRef ) +DECLARE_WXMAC_OPAQUE_REF( IconRef ) +DECLARE_WXMAC_OPAQUE_REF( MenuRef ) + +typedef IconRef WXHICON ; +typedef HIShapeRef WXHRGN; +#if wxOSX_USE_CARBON +typedef MenuRef WXHMENU; +#endif + +#endif + +#if defined( __WXCOCOA__ ) || defined(__WXMAC__) + +/* Definitions of 32-bit/64-bit types + * These are typedef'd exactly the same way in newer OS X headers so + * redefinition when real headers are included should not be a problem. If + * it is, the types are being defined wrongly here. + * The purpose of these types is so they can be used from public wx headers. + * and also because the older (pre-Leopard) headers don't define them. + */ + +/* NOTE: We don't pollute namespace with CGFLOAT_MIN/MAX/IS_DOUBLE macros + * since they are unlikely to be needed in a public header. + */ +#if defined(__LP64__) && __LP64__ + typedef double CGFloat; +#else + typedef float CGFloat; +#endif + +#if (defined(__LP64__) && __LP64__) || (defined(NS_BUILD_32_LIKE_64) && NS_BUILD_32_LIKE_64) +typedef long NSInteger; +typedef unsigned long NSUInteger; +#else +typedef int NSInteger; +typedef unsigned int NSUInteger; +#endif + +/* Objective-C type declarations. + * These are to be used in public headers in lieu of NSSomething* because + * Objective-C class names are not available in C/C++ code. + */ + +/* NOTE: This ought to work with other compilers too, but I'm being cautious */ +#if (defined(__GNUC__) && defined(__APPLE__)) +/* It's desirable to have type safety for Objective-C(++) code as it does +at least catch typos of method names among other things. However, it +is not possible to declare an Objective-C class from plain old C or C++ +code. Furthermore, because of C++ name mangling, the type name must +be the same for both C++ and Objective-C++ code. Therefore, we define +what should be a pointer to an Objective-C class as a pointer to a plain +old C struct with the same name. Unfortunately, because the compiler +does not see a struct as an Objective-C class we cannot declare it +as a struct in Objective-C(++) mode. +*/ +#if defined(__OBJC__) +#define DECLARE_WXCOCOA_OBJC_CLASS(klass) \ +@class klass; \ +typedef klass *WX_##klass +#else /* not defined(__OBJC__) */ +#define DECLARE_WXCOCOA_OBJC_CLASS(klass) \ +typedef struct klass *WX_##klass +#endif /* defined(__OBJC__) */ + +#else /* not Apple's gcc */ +#warning "Objective-C types will not be checked by the compiler." +/* NOTE: typedef struct objc_object *id; */ +/* IOW, we're declaring these using the id type without using that name, */ +/* since "id" is used extensively not only within wxWidgets itself, but */ +/* also in wxWidgets application code. The following works fine when */ +/* compiling C(++) code, and works without typesafety for Obj-C(++) code */ +#define DECLARE_WXCOCOA_OBJC_CLASS(klass) \ +typedef struct objc_object *WX_##klass + +#endif /* (defined(__GNUC__) && defined(__APPLE__)) */ + +DECLARE_WXCOCOA_OBJC_CLASS(NSApplication); +DECLARE_WXCOCOA_OBJC_CLASS(NSBitmapImageRep); +DECLARE_WXCOCOA_OBJC_CLASS(NSBox); +DECLARE_WXCOCOA_OBJC_CLASS(NSButton); +DECLARE_WXCOCOA_OBJC_CLASS(NSColor); +DECLARE_WXCOCOA_OBJC_CLASS(NSColorPanel); +DECLARE_WXCOCOA_OBJC_CLASS(NSControl); +DECLARE_WXCOCOA_OBJC_CLASS(NSCursor); +DECLARE_WXCOCOA_OBJC_CLASS(NSEvent); +DECLARE_WXCOCOA_OBJC_CLASS(NSFont); +DECLARE_WXCOCOA_OBJC_CLASS(NSFontDescriptor); +DECLARE_WXCOCOA_OBJC_CLASS(NSFontPanel); +DECLARE_WXCOCOA_OBJC_CLASS(NSImage); +DECLARE_WXCOCOA_OBJC_CLASS(NSLayoutManager); +DECLARE_WXCOCOA_OBJC_CLASS(NSMenu); +DECLARE_WXCOCOA_OBJC_CLASS(NSMenuExtra); +DECLARE_WXCOCOA_OBJC_CLASS(NSMenuItem); +DECLARE_WXCOCOA_OBJC_CLASS(NSMutableArray); +DECLARE_WXCOCOA_OBJC_CLASS(NSNotification); +DECLARE_WXCOCOA_OBJC_CLASS(NSObject); +DECLARE_WXCOCOA_OBJC_CLASS(NSPanel); +DECLARE_WXCOCOA_OBJC_CLASS(NSResponder); +DECLARE_WXCOCOA_OBJC_CLASS(NSScrollView); +DECLARE_WXCOCOA_OBJC_CLASS(NSSound); +DECLARE_WXCOCOA_OBJC_CLASS(NSStatusItem); +DECLARE_WXCOCOA_OBJC_CLASS(NSTableColumn); +DECLARE_WXCOCOA_OBJC_CLASS(NSTableView); +DECLARE_WXCOCOA_OBJC_CLASS(NSTextContainer); +DECLARE_WXCOCOA_OBJC_CLASS(NSTextField); +DECLARE_WXCOCOA_OBJC_CLASS(NSTextStorage); +DECLARE_WXCOCOA_OBJC_CLASS(NSThread); +DECLARE_WXCOCOA_OBJC_CLASS(NSWindow); +DECLARE_WXCOCOA_OBJC_CLASS(NSView); +DECLARE_WXCOCOA_OBJC_CLASS(NSOpenGLContext); +DECLARE_WXCOCOA_OBJC_CLASS(NSOpenGLPixelFormat); +DECLARE_WXCOCOA_OBJC_CLASS( NSPrintInfo ); +#ifndef __WXMAC__ +typedef WX_NSView WXWidget; /* wxWidgets BASE definition */ +#endif +#endif /* __WXCOCOA__ || ( __WXMAC__ &__DARWIN__)*/ + +#ifdef __WXMAC__ + +DECLARE_WXCOCOA_OBJC_CLASS(NSString); + +#if wxOSX_USE_COCOA + +typedef WX_NSWindow WXWindow; +typedef WX_NSView WXWidget; +typedef WX_NSMenu WXHMENU; +typedef WX_NSOpenGLPixelFormat WXGLPixelFormat; +typedef WX_NSOpenGLContext WXGLContext; + +#elif wxOSX_USE_IPHONE + +DECLARE_WXCOCOA_OBJC_CLASS(UIWindow); +DECLARE_WXCOCOA_OBJC_CLASS(UIView); +DECLARE_WXCOCOA_OBJC_CLASS(UIFont); +DECLARE_WXCOCOA_OBJC_CLASS(UIImage); +DECLARE_WXCOCOA_OBJC_CLASS(UIEvent); +DECLARE_WXCOCOA_OBJC_CLASS(NSSet); +DECLARE_WXCOCOA_OBJC_CLASS(EAGLContext); + +typedef WX_UIWindow WXWindow; +typedef WX_UIView WXWidget; +typedef WX_EAGLContext WXGLContext; +typedef WX_NSString* WXGLPixelFormat; + +#endif + +#endif /* __WXMAC__ */ + +/* ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port */ +#if defined(__WIN32__) + +/* Stand-ins for Windows types to avoid #including all of windows.h */ + +#ifndef NO_STRICT + #define WX_MSW_DECLARE_HANDLE(type) typedef struct type##__ * WX##type +#else + #define WX_MSW_DECLARE_HANDLE(type) typedef void * WX##type +#endif + +typedef void* WXHANDLE; +WX_MSW_DECLARE_HANDLE(HWND); +WX_MSW_DECLARE_HANDLE(HICON); +WX_MSW_DECLARE_HANDLE(HFONT); +WX_MSW_DECLARE_HANDLE(HMENU); +WX_MSW_DECLARE_HANDLE(HPEN); +WX_MSW_DECLARE_HANDLE(HBRUSH); +WX_MSW_DECLARE_HANDLE(HPALETTE); +WX_MSW_DECLARE_HANDLE(HCURSOR); +WX_MSW_DECLARE_HANDLE(HRGN); +WX_MSW_DECLARE_HANDLE(RECTPTR); +WX_MSW_DECLARE_HANDLE(HACCEL); +WX_MSW_DECLARE_HANDLE(HINSTANCE); +WX_MSW_DECLARE_HANDLE(HBITMAP); +WX_MSW_DECLARE_HANDLE(HIMAGELIST); +WX_MSW_DECLARE_HANDLE(HGLOBAL); +WX_MSW_DECLARE_HANDLE(HDC); +typedef WXHINSTANCE WXHMODULE; + +#undef WX_MSW_DECLARE_HANDLE + +typedef unsigned int WXUINT; +typedef unsigned long WXDWORD; +typedef unsigned short WXWORD; + +typedef unsigned long WXCOLORREF; +typedef void * WXRGNDATA; +typedef struct tagMSG WXMSG; +typedef void * WXHCONV; +typedef void * WXHKEY; +typedef void * WXHTREEITEM; + +typedef void * WXDRAWITEMSTRUCT; +typedef void * WXMEASUREITEMSTRUCT; +typedef void * WXLPCREATESTRUCT; + +#ifdef __WXMSW__ +typedef WXHWND WXWidget; +#endif + +#ifdef __WIN64__ +typedef wxUint64 WXWPARAM; +typedef wxInt64 WXLPARAM; +typedef wxInt64 WXLRESULT; +#else +typedef wxW64 unsigned int WXWPARAM; +typedef wxW64 long WXLPARAM; +typedef wxW64 long WXLRESULT; +#endif + +#if defined(__GNUWIN32__) || defined(__WXMICROWIN__) +typedef int (*WXFARPROC)(); +#else +typedef int (__stdcall *WXFARPROC)(); +#endif +#endif /* __WIN32__ */ + + +#if defined(__OS2__) +typedef unsigned long DWORD; +typedef unsigned short WORD; +#endif + +#if defined(__WXPM__) || defined(__EMX__) +#ifdef __WXPM__ +/* Stand-ins for OS/2 types, to avoid #including all of os2.h */ +typedef unsigned long WXHWND; +typedef unsigned long WXHANDLE; +typedef unsigned long WXHICON; +typedef unsigned long WXHFONT; +typedef unsigned long WXHMENU; +typedef unsigned long WXHPEN; +typedef unsigned long WXHBRUSH; +typedef unsigned long WXHPALETTE; +typedef unsigned long WXHCURSOR; +typedef unsigned long WXHRGN; +typedef unsigned long WXHACCEL; +typedef unsigned long WXHINSTANCE; +typedef unsigned long WXHMODULE; +typedef unsigned long WXHBITMAP; +typedef unsigned long WXHDC; +typedef unsigned int WXUINT; +typedef unsigned long WXDWORD; +typedef unsigned short WXWORD; + +typedef unsigned long WXCOLORREF; +typedef void * WXMSG; +typedef unsigned long WXHTREEITEM; + +typedef void * WXDRAWITEMSTRUCT; +typedef void * WXMEASUREITEMSTRUCT; +typedef void * WXLPCREATESTRUCT; + +typedef WXHWND WXWidget; +#endif +#ifdef __EMX__ +/* Need a well-known type for WXFARPROC + below. MPARAM is typedef'ed too late. */ +#define WXWPARAM void * +#define WXLPARAM void * +#else +#define WXWPARAM MPARAM +#define WXLPARAM MPARAM +#endif +#define RECT RECTL +#define LOGFONT FATTRS +#define LOWORD SHORT1FROMMP +#define HIWORD SHORT2FROMMP + +typedef unsigned long WXMPARAM; +typedef unsigned long WXMSGID; +typedef void* WXRESULT; +/* typedef int (*WXFARPROC)(); */ +/* some windows handles not defined by PM */ +typedef unsigned long HANDLE; +typedef unsigned long HICON; +typedef unsigned long HFONT; +typedef unsigned long HMENU; +typedef unsigned long HPEN; +typedef unsigned long HBRUSH; +typedef unsigned long HPALETTE; +typedef unsigned long HCURSOR; +typedef unsigned long HINSTANCE; +typedef unsigned long HIMAGELIST; +typedef unsigned long HGLOBAL; +#endif /* WXPM || EMX */ + +#if defined (__WXPM__) +/* WIN32 graphics types for OS/2 GPI */ + +/* RGB under OS2 is more like a PALETTEENTRY struct under Windows so we need a real RGB def */ +#define OS2RGB(r,g,b) ((DWORD)((unsigned char)(b) | ((unsigned char)(g) << 8)) | ((unsigned char)(r) << 16)) + +typedef unsigned long COLORREF; +#define GetRValue(rgb) ((unsigned char)((rgb) >> 16)) +#define GetGValue(rgb) ((unsigned char)(((unsigned short)(rgb)) >> 8)) +#define GetBValue(rgb) ((unsigned char)(rgb)) +#define PALETTEINDEX(i) ((COLORREF)(0x01000000 | (DWORD)(WORD)(i))) +#define PALETTERGB(r,g,b) (0x02000000 | OS2RGB(r,g,b)) +/* OS2's RGB/RGB2 is backwards from this */ +typedef struct tagPALETTEENTRY +{ + char bRed; + char bGreen; + char bBlue; + char bFlags; +} PALETTEENTRY; +typedef struct tagLOGPALETTE +{ + WORD palVersion; + WORD palNumentries; + WORD PALETTEENTRY[1]; +} LOGPALETTE; + +#if (defined(__VISAGECPP__) && (__IBMCPP__ < 400)) || defined (__WATCOMC__) + /* VA 3.0 for some reason needs base data types when typedefing a proc proto??? */ +typedef void* (_System *WXFARPROC)(unsigned long, unsigned long, void*, void*); +#else +#if defined(__EMX__) && !defined(_System) +#define _System +#endif +typedef WXRESULT (_System *WXFARPROC)(WXHWND, WXMSGID, WXWPARAM, WXLPARAM); +#endif + +#endif /* __WXPM__ */ + + +#if defined(__WXMOTIF__) || defined(__WXX11__) +/* Stand-ins for X/Xt/Motif types */ +typedef void* WXWindow; +typedef void* WXWidget; +typedef void* WXAppContext; +typedef void* WXColormap; +typedef void* WXColor; +typedef void WXDisplay; +typedef void WXEvent; +typedef void* WXCursor; +typedef void* WXPixmap; +typedef void* WXFontStructPtr; +typedef void* WXGC; +typedef void* WXRegion; +typedef void* WXFont; +typedef void* WXImage; +typedef void* WXFontList; +typedef void* WXFontSet; +typedef void* WXRendition; +typedef void* WXRenderTable; +typedef void* WXFontType; /* either a XmFontList or XmRenderTable */ +typedef void* WXString; + +typedef unsigned long Atom; /* this might fail on a few architectures */ +typedef long WXPixel; /* safety catch in src/motif/colour.cpp */ + +#endif /* Motif */ + +#ifdef __WXGTK__ + +/* Stand-ins for GLIB types */ +typedef struct _GSList GSList; + +/* Stand-ins for GDK types */ +typedef struct _GdkColor GdkColor; +typedef struct _GdkCursor GdkCursor; +typedef struct _GdkDragContext GdkDragContext; + +#if defined(__WXGTK20__) + typedef struct _GdkAtom* GdkAtom; +#else + typedef unsigned long GdkAtom; +#endif + +#if !defined(__WXGTK3__) + typedef struct _GdkColormap GdkColormap; + typedef struct _GdkFont GdkFont; + typedef struct _GdkGC GdkGC; + typedef struct _GdkRegion GdkRegion; +#endif + +#if defined(__WXGTK3__) + typedef struct _GdkWindow GdkWindow; +#elif defined(__WXGTK20__) + typedef struct _GdkDrawable GdkWindow; + typedef struct _GdkDrawable GdkPixmap; +#else + typedef struct _GdkWindow GdkWindow; + typedef struct _GdkWindow GdkBitmap; + typedef struct _GdkWindow GdkPixmap; +#endif + +/* Stand-ins for GTK types */ +typedef struct _GtkWidget GtkWidget; +typedef struct _GtkRcStyle GtkRcStyle; +typedef struct _GtkAdjustment GtkAdjustment; +typedef struct _GtkToolbar GtkToolbar; +typedef struct _GtkNotebook GtkNotebook; +typedef struct _GtkNotebookPage GtkNotebookPage; +typedef struct _GtkAccelGroup GtkAccelGroup; +typedef struct _GtkSelectionData GtkSelectionData; +typedef struct _GtkTextBuffer GtkTextBuffer; +typedef struct _GtkRange GtkRange; +typedef struct _GtkCellRenderer GtkCellRenderer; + +typedef GtkWidget *WXWidget; + +#ifndef __WXGTK20__ +#define GTK_OBJECT_GET_CLASS(object) (GTK_OBJECT(object)->klass) +#define GTK_CLASS_TYPE(klass) ((klass)->type) +#endif + +#endif /* __WXGTK__ */ + +#if defined(__WXGTK20__) || (defined(__WXX11__) && wxUSE_UNICODE) +#define wxUSE_PANGO 1 +#else +#define wxUSE_PANGO 0 +#endif + +#if wxUSE_PANGO +/* Stand-ins for Pango types */ +typedef struct _PangoContext PangoContext; +typedef struct _PangoLayout PangoLayout; +typedef struct _PangoFontDescription PangoFontDescription; +#endif + +#ifdef __WXDFB__ +/* DirectFB doesn't have the concept of non-TLW window, so use + something arbitrary */ +typedef const void* WXWidget; +#endif /* DFB */ + +/* This is required because of clashing macros in windows.h, which may be */ +/* included before or after wxWidgets classes, and therefore must be */ +/* disabled here before any significant wxWidgets headers are included. */ +#ifdef __cplusplus +#ifdef __WINDOWS__ +#include "wx/msw/winundef.h" +#endif /* __WINDOWS__ */ +#endif /* __cplusplus */ + + +/* include the feature test macros */ +#include "wx/features.h" + +/* --------------------------------------------------------------------------- */ +/* macros to define a class without copy ctor nor assignment operator */ +/* --------------------------------------------------------------------------- */ + +#define wxDECLARE_NO_COPY_CLASS(classname) \ + private: \ + classname(const classname&); \ + classname& operator=(const classname&) + +#define wxDECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg) \ + private: \ + classname(const classname&); \ + classname& operator=(const classname&) + +#define wxDECLARE_NO_COPY_TEMPLATE_CLASS_2(classname, arg1, arg2) \ + private: \ + classname(const classname&); \ + classname& operator=(const classname&) + +#define wxDECLARE_NO_ASSIGN_CLASS(classname) \ + private: \ + classname& operator=(const classname&) + +/* deprecated variants _not_ requiring a semicolon after them */ +#define DECLARE_NO_COPY_CLASS(classname) \ + wxDECLARE_NO_COPY_CLASS(classname); +#define DECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg) \ + wxDECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg); +#define DECLARE_NO_ASSIGN_CLASS(classname) \ + wxDECLARE_NO_ASSIGN_CLASS(classname); + +/* --------------------------------------------------------------------------- */ +/* If a manifest is being automatically generated, add common controls 6 to it */ +/* --------------------------------------------------------------------------- */ + +#if wxUSE_GUI && \ + (!defined wxUSE_NO_MANIFEST || wxUSE_NO_MANIFEST == 0 ) && \ + ( defined _MSC_FULL_VER && _MSC_FULL_VER >= 140040130 ) + +#define WX_CC_MANIFEST(cpu) \ + "/manifestdependency:\"type='win32' \ + name='Microsoft.Windows.Common-Controls' \ + version='6.0.0.0' \ + processorArchitecture='" cpu "' \ + publicKeyToken='6595b64144ccf1df' \ + language='*'\"" + +#if defined _M_IX86 + #pragma comment(linker, WX_CC_MANIFEST("x86")) +#elif defined _M_X64 + #pragma comment(linker, WX_CC_MANIFEST("amd64")) +#elif defined _M_IA64 + #pragma comment(linker, WX_CC_MANIFEST("ia64")) +#else + #pragma comment(linker, WX_CC_MANIFEST("*")) +#endif + +#endif /* !wxUSE_NO_MANIFEST && _MSC_FULL_VER >= 140040130 */ + +/* wxThread and wxProcess priorities */ +enum +{ + wxPRIORITY_MIN = 0u, /* lowest possible priority */ + wxPRIORITY_DEFAULT = 50u, /* normal priority */ + wxPRIORITY_MAX = 100u /* highest possible priority */ +}; + +#endif + /* _WX_DEFS_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/app.h new file mode 100644 index 0000000000..4807dd6a4a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/app.h @@ -0,0 +1,44 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/app.h +// Purpose: wxApp class +// Author: Vaclav Slavik +// Created: 2006-08-10 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_APP_H_ +#define _WX_DFB_APP_H_ + +#include "wx/dfb/dfbptr.h" + +#include "wx/vidmode.h" + +wxDFB_DECLARE_INTERFACE(IDirectFB); + +//----------------------------------------------------------------------------- +// wxApp +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxApp: public wxAppBase +{ +public: + wxApp(); + ~wxApp(); + + // override base class (pure) virtuals + virtual bool Initialize(int& argc, wxChar **argv); + virtual void CleanUp(); + + virtual void WakeUpIdle(); + + virtual wxVideoMode GetDisplayMode() const; + virtual bool SetDisplayMode(const wxVideoMode& mode); + +private: + wxVideoMode m_videoMode; + + DECLARE_DYNAMIC_CLASS(wxApp) +}; + +#endif // _WX_DFB_APP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/bitmap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/bitmap.h new file mode 100644 index 0000000000..391a8e06fd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/bitmap.h @@ -0,0 +1,94 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/bitmap.h +// Purpose: wxBitmap class +// Author: Vaclav Slavik +// Created: 2006-08-04 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_BITMAP_H_ +#define _WX_DFB_BITMAP_H_ + +#include "wx/dfb/dfbptr.h" + +class WXDLLIMPEXP_FWD_CORE wxPixelDataBase; + +wxDFB_DECLARE_INTERFACE(IDirectFBSurface); + +//----------------------------------------------------------------------------- +// wxBitmap +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmap : public wxBitmapBase +{ +public: + wxBitmap() {} + wxBitmap(const wxIDirectFBSurfacePtr& surface) { Create(surface); } + wxBitmap(int width, int height, int depth = -1) { Create(width, height, depth); } + wxBitmap(const wxSize& sz, int depth = -1) { Create(sz, depth); } + wxBitmap(const char bits[], int width, int height, int depth = 1); + wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); + wxBitmap(const char* const* bits); +#if wxUSE_IMAGE + wxBitmap(const wxImage& image, int depth = -1); +#endif + + bool Create(const wxIDirectFBSurfacePtr& surface); + bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); + bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) + { return Create(sz.GetWidth(), sz.GetHeight(), depth); } + bool Create(int width, int height, const wxDC& WXUNUSED(dc)) + { return Create(width,height); } + + virtual int GetHeight() const; + virtual int GetWidth() const; + virtual int GetDepth() const; + +#if wxUSE_IMAGE + virtual wxImage ConvertToImage() const; +#endif + + virtual wxMask *GetMask() const; + virtual void SetMask(wxMask *mask); + + virtual wxBitmap GetSubBitmap(const wxRect& rect) const; + + virtual bool SaveFile(const wxString &name, wxBitmapType type, + const wxPalette *palette = NULL) const; + virtual bool LoadFile(const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); + +#if wxUSE_PALETTE + virtual wxPalette *GetPalette() const; + virtual void SetPalette(const wxPalette& palette); +#endif + + // copies the contents and mask of the given (colour) icon to the bitmap + virtual bool CopyFromIcon(const wxIcon& icon); + + static void InitStandardHandlers(); + + // raw bitmap access support functions + void *GetRawData(wxPixelDataBase& data, int bpp); + void UngetRawData(wxPixelDataBase& data); + + bool HasAlpha() const; + + // implementation: + virtual void SetHeight(int height); + virtual void SetWidth(int width); + virtual void SetDepth(int depth); + + // get underlying native representation: + wxIDirectFBSurfacePtr GetDirectFBSurface() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + bool CreateWithFormat(int width, int height, int dfbFormat); + + DECLARE_DYNAMIC_CLASS(wxBitmap) +}; + +#endif // _WX_DFB_BITMAP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/brush.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/brush.h new file mode 100644 index 0000000000..50c1968dd8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/brush.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/brush.h +// Purpose: wxBrush class declaration +// Author: Vaclav Slavik +// Created: 2006-08-04 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_BRUSH_H_ +#define _WX_DFB_BRUSH_H_ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" +#include "wx/gdiobj.h" +#include "wx/bitmap.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxBrush; + +//----------------------------------------------------------------------------- +// wxBrush +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase +{ +public: + wxBrush() {} + wxBrush(const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) ); +#endif + wxBrush(const wxBitmap &stippleBitmap); + + bool operator==(const wxBrush& brush) const; + bool operator!=(const wxBrush& brush) const { return !(*this == brush); } + + wxBrushStyle GetStyle() const; + wxColour GetColour() const; + wxBitmap *GetStipple() const; + + void SetColour(const wxColour& col); + void SetColour(unsigned char r, unsigned char g, unsigned char b); + void SetStyle(wxBrushStyle style); + void SetStipple(const wxBitmap& stipple); + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxBrushStyle)style); } +#endif + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxBrush) +}; + +#endif // _WX_DFB_BRUSH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/chkconf.h new file mode 100644 index 0000000000..89f35ed42c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/chkconf.h @@ -0,0 +1,41 @@ +/* + * Name: wx/dfb/chkconf.h + * Author: Vaclav Slavik + * Purpose: Compiler-specific configuration checking + * Created: 2006-08-10 + * Copyright: (c) 2006 REA Elektronik GmbH + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_DFB_CHKCONF_H_ +#define _WX_DFB_CHKCONF_H_ + +#ifndef __WXUNIVERSAL__ +# error "wxDirectFB cannot be built without wxUniversal" +#endif + +#if !wxUSE_CONFIG +# error "wxFileConfig is required by wxDFB port" +#endif + +#if wxUSE_SOCKETS && !wxUSE_CONSOLE_EVENTLOOP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxSocket requires wxSelectDispatcher in wxDFB" +# else +# undef wxUSE_CONSOLE_EVENTLOOP +# define wxUSE_CONSOLE_EVENTLOOP 1 +# endif +#endif + +#if wxUSE_DATAOBJ +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxDataObject not supported in wxDFB" +# else +# undef wxUSE_DATAOBJ +# define wxUSE_DATAOBJ 0 +# endif +#endif + +#endif /* _WX_DFB_CHKCONF_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/cursor.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/cursor.h new file mode 100644 index 0000000000..32e102e8f3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/cursor.h @@ -0,0 +1,47 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/cursor.h +// Purpose: wxCursor declaration +// Author: Vaclav Slavik +// Created: 2006-08-08 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_CURSOR_H_ +#define _WX_DFB_CURSOR_H_ + +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +class WXDLLIMPEXP_FWD_CORE wxBitmap; + +//----------------------------------------------------------------------------- +// wxCursor +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject +{ +public: + wxCursor() {} + wxCursor(wxStockCursor id) { InitFromStock(id); } +#if WXWIN_COMPATIBILITY_2_8 + wxCursor(int id) { InitFromStock((wxStockCursor)id); } +#endif + wxCursor(const wxString& name, + wxBitmapType type = wxCURSOR_DEFAULT_TYPE, + int hotSpotX = 0, int hotSpotY = 0); + + // implementation + wxBitmap GetBitmap() const; + +protected: + void InitFromStock(wxStockCursor); + + // ref counting code + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxCursor) +}; + +#endif // _WX_DFB_CURSOR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dc.h new file mode 100644 index 0000000000..ea6b8a0010 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dc.h @@ -0,0 +1,167 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/dc.h +// Purpose: wxDC class +// Author: Vaclav Slavik +// Created: 2006-08-07 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_DC_H_ +#define _WX_DFB_DC_H_ + +#include "wx/defs.h" +#include "wx/region.h" +#include "wx/dc.h" +#include "wx/dfb/dfbptr.h" + +wxDFB_DECLARE_INTERFACE(IDirectFBSurface); + +//----------------------------------------------------------------------------- +// wxDFBDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDFBDCImpl : public wxDCImpl +{ +public: + // ctors + wxDFBDCImpl(wxDC *owner) : wxDCImpl(owner) { m_surface = NULL; } + wxDFBDCImpl(wxDC *owner, const wxIDirectFBSurfacePtr& surface) + : wxDCImpl(owner) + { + DFBInit(surface); + } + + bool IsOk() const { return m_surface != NULL; } + + // implement base class pure virtuals + // ---------------------------------- + + virtual void Clear(); + + virtual bool StartDoc(const wxString& message); + virtual void EndDoc(); + + virtual void StartPage(); + virtual void EndPage(); + + virtual void SetFont(const wxFont& font); + virtual void SetPen(const wxPen& pen); + virtual void SetBrush(const wxBrush& brush); + virtual void SetBackground(const wxBrush& brush); + virtual void SetBackgroundMode(int mode); +#if wxUSE_PALETTE + virtual void SetPalette(const wxPalette& palette); +#endif + + virtual void SetLogicalFunction(wxRasterOperationMode function); + + virtual void DestroyClippingRegion(); + + virtual wxCoord GetCharHeight() const; + virtual wxCoord GetCharWidth() const; + virtual void DoGetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; + + virtual bool CanDrawBitmap() const { return true; } + virtual bool CanGetTextExtent() const { return true; } + virtual int GetDepth() const; + virtual wxSize GetPPI() const; + + // Returns the surface (and increases its ref count) + wxIDirectFBSurfacePtr GetDirectFBSurface() const { return m_surface; } + +protected: + // implementation + wxCoord XDEV2LOG(wxCoord x) const { return DeviceToLogicalX(x); } + wxCoord XDEV2LOGREL(wxCoord x) const { return DeviceToLogicalXRel(x); } + wxCoord YDEV2LOG(wxCoord y) const { return DeviceToLogicalY(y); } + wxCoord YDEV2LOGREL(wxCoord y) const { return DeviceToLogicalYRel(y); } + wxCoord XLOG2DEV(wxCoord x) const { return LogicalToDeviceX(x); } + wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); } + wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); } + wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); } + + // initializes the DC from a surface, must be called if default ctor + // was used + void DFBInit(const wxIDirectFBSurfacePtr& surface); + + virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, + wxFloodFillStyle style = wxFLOOD_SURFACE); + + virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const; + + virtual void DoDrawPoint(wxCoord x, wxCoord y); + virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); + + virtual void DoDrawArc(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc); + virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, + double sa, double ea); + + virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, + wxCoord width, wxCoord height, + double radius); + virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + + virtual void DoCrossHair(wxCoord x, wxCoord y); + + virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); + virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, + bool useMask = false); + + virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); + virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, + double angle); + + virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); + + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); + virtual void DoSetDeviceClippingRegion(const wxRegion& region); + + virtual void DoGetSize(int *width, int *height) const; + virtual void DoGetSizeMM(int* width, int* height) const; + + virtual void DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset); + virtual void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + + // implementation from now on: +protected: + wxIDirectFBFontPtr GetCurrentFont() const; + +private: + // Unified implementation of DrawIcon, DrawBitmap and Blit: + void DoDrawSubBitmap(const wxBitmap &bmp, + wxCoord x, wxCoord y, wxCoord w, wxCoord h, + wxCoord destx, wxCoord desty, int rop, bool useMask); + bool DoBlitFromSurface(const wxIDirectFBSurfacePtr& src, + wxCoord srcx, wxCoord srcy, + wxCoord w, wxCoord h, + wxCoord dstx, wxCoord dsty); + + // selects colour into surface's state + void SelectColour(const wxColour& clr); + +protected: + wxIDirectFBSurfacePtr m_surface; + + double m_mm_to_pix_x, m_mm_to_pix_y; + + friend class WXDLLIMPEXP_FWD_CORE wxOverlayImpl; // for Init + + DECLARE_ABSTRACT_CLASS(wxDFBDCImpl) +}; + +#endif // _WX_DFB_DC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dcclient.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dcclient.h new file mode 100644 index 0000000000..29ed91b273 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dcclient.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/dcclient.h +// Purpose: wxWindowDCImpl, wxClientDCImpl and wxPaintDCImpl +// Author: Vaclav Slavik +// Created: 2006-08-10 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_DCCLIENT_H_ +#define _WX_DFB_DCCLIENT_H_ + +#include "wx/dfb/dc.h" + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +//----------------------------------------------------------------------------- +// wxWindowDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxDFBDCImpl +{ +public: + wxWindowDCImpl(wxDC *owner) : wxDFBDCImpl(owner), m_shouldFlip(false) { } + wxWindowDCImpl(wxDC *owner, wxWindow *win); + virtual ~wxWindowDCImpl(); + +protected: + // initializes the DC for painting on given window; if rect!=NULL, then + // for painting only on the given region of the window + void InitForWin(wxWindow *win, const wxRect *rect); + +private: + wxRect m_winRect; // rectangle of the window being painted + + bool m_shouldFlip; // flip the surface when done? + + friend class wxOverlayImpl; // for m_shouldFlip; + + DECLARE_DYNAMIC_CLASS(wxWindowDCImpl) + wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl); +}; + +//----------------------------------------------------------------------------- +// wxClientDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl +{ +public: + wxClientDCImpl(wxDC *owner) : wxWindowDCImpl(owner) { } + wxClientDCImpl(wxDC *owner, wxWindow *win); + + DECLARE_DYNAMIC_CLASS(wxClientDCImpl) + wxDECLARE_NO_COPY_CLASS(wxClientDCImpl); +}; + + +//----------------------------------------------------------------------------- +// wxPaintDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl +{ +public: + wxPaintDCImpl(wxDC *owner) : wxClientDCImpl(owner) { } + wxPaintDCImpl(wxDC *owner, wxWindow *win) : wxClientDCImpl(owner, win) { } + + DECLARE_DYNAMIC_CLASS(wxPaintDCImpl) + wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl); +}; + +#endif // _WX_DFB_DCCLIENT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dcmemory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dcmemory.h new file mode 100644 index 0000000000..a02a7faefc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dcmemory.h @@ -0,0 +1,37 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/dcmemory.h +// Purpose: wxMemoryDC class declaration +// Created: 2006-08-10 +// Author: Vaclav Slavik +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_DCMEMORY_H_ +#define _WX_DFB_DCMEMORY_H_ + +#include "wx/dfb/dc.h" +#include "wx/bitmap.h" + +class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxDFBDCImpl +{ +public: + wxMemoryDCImpl(wxMemoryDC *owner); + wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap); + wxMemoryDCImpl(wxMemoryDC *owner, wxDC *dc); // create compatible DC + + // override wxMemoryDC-specific base class virtual methods + virtual const wxBitmap& GetSelectedBitmap() const { return m_bmp; } + virtual wxBitmap& GetSelectedBitmap() { return m_bmp; } + virtual void DoSelect(const wxBitmap& bitmap); + +private: + void Init(); + + wxBitmap m_bmp; + + DECLARE_DYNAMIC_CLASS(wxMemoryDCImpl) +}; + +#endif // _WX_DFB_DCMEMORY_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dcscreen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dcscreen.h new file mode 100644 index 0000000000..37e44d69b7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dcscreen.h @@ -0,0 +1,23 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/dcscreen.h +// Purpose: wxScreenDCImpl declaration +// Author: Vaclav Slavik +// Created: 2006-08-10 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_DCSCREEN_H_ +#define _WX_DFB_DCSCREEN_H_ + +#include "wx/dfb/dc.h" + +class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxDFBDCImpl +{ +public: + wxScreenDCImpl(wxScreenDC *owner); + + DECLARE_DYNAMIC_CLASS(wxScreenDCImpl) +}; + +#endif // _WX_DFB_DCSCREEN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dfbptr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dfbptr.h new file mode 100644 index 0000000000..e34e3dc268 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/dfbptr.h @@ -0,0 +1,109 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/dfbptr.h +// Purpose: wxDfbPtr for holding objects declared in wrapdfb.h +// Author: Vaclav Slavik +// Created: 2006-08-09 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_DFBPTR_H_ +#define _WX_DFB_DFBPTR_H_ + +//----------------------------------------------------------------------------- +// wxDFB_DECLARE_INTERFACE +//----------------------------------------------------------------------------- + +/** + Forward declares wx wrapper around DirectFB interface @a name. + + Also declares wx##name##Ptr typedef for wxDfbPtr pointer. + + @param name name of the DirectFB interface + */ +#define wxDFB_DECLARE_INTERFACE(name) \ + class wx##name; \ + typedef wxDfbPtr wx##name##Ptr; + + +//----------------------------------------------------------------------------- +// wxDfbPtr +//----------------------------------------------------------------------------- + +class wxDfbWrapperBase; + +class WXDLLIMPEXP_CORE wxDfbPtrBase +{ +protected: + static void DoAddRef(wxDfbWrapperBase *ptr); + static void DoRelease(wxDfbWrapperBase *ptr); +}; + +/** + This template implements smart pointer for keeping pointers to DirectFB + wrappers (i.e. wxIFoo classes derived from wxDfbWrapper). Interface's + reference count is increased on copying and the interface is released when + the pointer is deleted. + */ +template +class wxDfbPtr : private wxDfbPtrBase +{ +public: + /** + Creates the pointer from raw pointer to the wrapper. + + Takes ownership of @a ptr, i.e. AddRef() is @em not called on it. + */ + wxDfbPtr(T *ptr = NULL) : m_ptr(ptr) {} + + /// Copy ctor + wxDfbPtr(const wxDfbPtr& ptr) { InitFrom(ptr); } + + /// Dtor. Releases the interface + ~wxDfbPtr() { Reset(); } + + /// Resets the pointer to NULL, decreasing reference count of the interface. + void Reset() + { + if ( m_ptr ) + { + this->DoRelease((wxDfbWrapperBase*)m_ptr); + m_ptr = NULL; + } + } + + /// Cast to the wrapper pointer + operator T*() const { return m_ptr; } + + // standard operators: + + wxDfbPtr& operator=(T *ptr) + { + Reset(); + m_ptr = ptr; + return *this; + } + + wxDfbPtr& operator=(const wxDfbPtr& ptr) + { + Reset(); + InitFrom(ptr); + return *this; + } + + T& operator*() const { return *m_ptr; } + T* operator->() const { return m_ptr; } + +private: + void InitFrom(const wxDfbPtr& ptr) + { + m_ptr = ptr.m_ptr; + if ( m_ptr ) + this->DoAddRef((wxDfbWrapperBase*)m_ptr); + } + +private: + T *m_ptr; +}; + +#endif // _WX_DFB_DFBPTR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/evtloop.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/evtloop.h new file mode 100644 index 0000000000..7a0dd0e056 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/evtloop.h @@ -0,0 +1,45 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/evtloop.h +// Purpose: declares wxEventLoop class +// Author: Vaclav Slavik +// Created: 2006-08-16 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_EVTLOOP_H_ +#define _WX_DFB_EVTLOOP_H_ + +#include "wx/dfb/dfbptr.h" +#include "wx/unix/evtloop.h" + +wxDFB_DECLARE_INTERFACE(IDirectFBEventBuffer); + +// ---------------------------------------------------------------------------- +// wxEventLoop +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxConsoleEventLoop +{ +public: + wxGUIEventLoop(); + + virtual bool YieldFor(long eventsToProcess); + + // returns DirectFB event buffer used by wx + static wxIDirectFBEventBufferPtr GetDirectFBEventBuffer(); + +private: + static void InitBuffer(); + static void CleanUp(); + + friend class wxApp; // calls CleanUp() + +private: + static wxIDirectFBEventBufferPtr ms_buffer; + static int ms_bufferFd; + + wxDECLARE_NO_COPY_CLASS(wxGUIEventLoop); +}; + +#endif // _WX_DFB_EVTLOOP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/font.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/font.h new file mode 100644 index 0000000000..afeee6e993 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/font.h @@ -0,0 +1,119 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/font.h +// Author: Vaclav Slavik +// Purpose: wxFont declaration +// Created: 2006-08-08 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_FONT_H_ +#define _WX_DFB_FONT_H_ + +#include "wx/dfb/dfbptr.h" + +wxDFB_DECLARE_INTERFACE(IDirectFBFont); + +// ---------------------------------------------------------------------------- +// wxFont +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFont : public wxFontBase +{ +public: + wxFont() {} + + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + + wxFont(const wxNativeFontInfo& info) { Create(info); } +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxFont(int size, + int family, + int style, + int weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding); + } +#endif + + wxFont(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(size, family, style, weight, underlined, face, encoding); + } + + wxFont(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(10, family, style, weight, underlined, face, encoding); + SetPixelSize(pixelSize); + } + + bool Create(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + bool Create(const wxNativeFontInfo& fontinfo); + + // implement base class pure virtuals + virtual int GetPointSize() const; + virtual wxFontStyle GetStyle() const; + virtual wxFontWeight GetWeight() const; + virtual wxString GetFaceName() const; + virtual bool GetUnderlined() const; + virtual wxFontEncoding GetEncoding() const; + virtual bool IsFixedWidth() const; + virtual const wxNativeFontInfo *GetNativeFontInfo() const; + + virtual void SetPointSize(int pointSize); + virtual void SetFamily(wxFontFamily family); + virtual void SetStyle(wxFontStyle style); + virtual void SetWeight(wxFontWeight weight); + virtual bool SetFaceName(const wxString& faceName); + virtual void SetUnderlined(bool underlined); + virtual void SetEncoding(wxFontEncoding encoding); + + wxDECLARE_COMMON_FONT_METHODS(); + + // implementation from now on: + wxIDirectFBFontPtr GetDirectFBFont(bool antialiased) const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + virtual wxFontFamily DoGetFamily() const; + +private: + DECLARE_DYNAMIC_CLASS(wxFont) +}; + +#endif // _WX_DFB_FONT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/nonownedwnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/nonownedwnd.h new file mode 100644 index 0000000000..a4e8dcc7bc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/nonownedwnd.h @@ -0,0 +1,125 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/nonownedwnd.h +// Purpose: declares wxNonOwnedWindow class +// Author: Vaclav Slavik +// Modified by: +// Created: 2006-12-24 +// Copyright: (c) 2006 TT-Solutions +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_NONOWNEDWND_H_ +#define _WX_DFB_NONOWNEDWND_H_ + +#include "wx/window.h" +#include "wx/dfb/dfbptr.h" + +wxDFB_DECLARE_INTERFACE(IDirectFBWindow); +class wxDfbQueuedPaintRequests; +struct wxDFBWindowEvent; +class wxDFBEventsHandler; + +//----------------------------------------------------------------------------- +// wxNonOwnedWindow +//----------------------------------------------------------------------------- + +// This class represents "non-owned" window. A window is owned by another +// window if it has a parent and is positioned within the parent. For example, +// wxFrame is non-owned, because even though it can have a parent, it's +// location is independent of it. This class is for internal use only, it's +// the base class for wxTopLevelWindow and wxPopupWindow. +class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase +{ +public: + // construction + wxNonOwnedWindow() { Init(); } + wxNonOwnedWindow(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + { + Init(); + + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + + virtual ~wxNonOwnedWindow(); + + // implement base class pure virtuals + virtual bool Show(bool show = true); + + virtual void Update(); + + virtual void Raise(); + virtual void Lower(); + + // implementation from now on + // -------------------------- + + void OnInternalIdle(); + + wxIDirectFBWindowPtr GetDirectFBWindow() const { return m_dfbwin; } + + // Returns true if some invalidated area of the TLW is currently being + // painted + bool IsPainting() const { return m_isPainting; } + +protected: + // common part of all ctors + void Init(); + + virtual wxIDirectFBSurfacePtr ObtainDfbSurface() const; + + // overridden wxWindow methods + virtual void DoGetPosition(int *x, int *y) const; + virtual void DoGetSize(int *width, int *height) const; + virtual void DoMoveWindow(int x, int y, int width, int height); + + virtual void DoRefreshRect(const wxRect& rect); + + // sets DirectFB keyboard focus to this toplevel window (note that DFB + // focus is different from wx: only shown TLWs can have it and not any + // wxWindows as in wx + void SetDfbFocus(); + + // overridden in wxTopLevelWindowDFB, there's no common handling for wxTLW + // and wxPopupWindow to be done here + virtual void HandleFocusEvent(const wxDFBWindowEvent& WXUNUSED(event_)) {} + +private: + // do queued painting in idle time + void HandleQueuedPaintRequests(); + + // DirectFB events handling + static void HandleDFBWindowEvent(const wxDFBWindowEvent& event_); + +protected: + // did we sent wxSizeEvent at least once? + bool m_sizeSet:1; + + // window's opacity (0: transparent, 255: opaque) + wxByte m_opacity; + + // interface to the underlying DirectFB window + wxIDirectFBWindowPtr m_dfbwin; + +private: + // invalidated areas of the TLW that need repainting + wxDfbQueuedPaintRequests *m_toPaint; + // are we currently painting some area of this TLW? + bool m_isPainting; + + friend class wxDFBEventsHandler; // for HandleDFBWindowEvent + friend class wxWindowDFB; // for SetDfbFocus +}; + +#endif // _WX_DFB_NONOWNEDWND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/pen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/pen.h new file mode 100644 index 0000000000..d81907e08b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/pen.h @@ -0,0 +1,75 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/pen.h +// Purpose: wxPen class declaration +// Author: Vaclav Slavik +// Created: 2006-08-04 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_PEN_H_ +#define _WX_DFB_PEN_H_ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxPen; + +//----------------------------------------------------------------------------- +// wxPen +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPen: public wxPenBase +{ +public: + wxPen() {} + wxPen(const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); +#endif + + wxPen(const wxBitmap& stipple, int width); + + bool operator==(const wxPen& pen) const; + bool operator!=(const wxPen& pen) const { return !(*this == pen); } + + void SetColour(const wxColour &colour); + void SetColour(unsigned char red, unsigned char green, unsigned char blue); + void SetCap(wxPenCap capStyle); + void SetJoin(wxPenJoin joinStyle); + void SetStyle(wxPenStyle style); + void SetWidth(int width); + void SetDashes(int number_of_dashes, const wxDash *dash); + void SetStipple(const wxBitmap& stipple); + + wxColour GetColour() const; + wxPenCap GetCap() const; + wxPenJoin GetJoin() const; + wxPenStyle GetStyle() const; + int GetWidth() const; + int GetDashes(wxDash **ptr) const; + int GetDashCount() const; + wxDash* GetDash() const; + wxBitmap *GetStipple() const; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxPenStyle)style); } +#endif + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxPen) +}; + +#endif // _WX_DFB_PEN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/popupwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/popupwin.h new file mode 100644 index 0000000000..00a8f80a05 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/popupwin.h @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/popupwin.h +// Purpose: wxPopupWindow class for wxDFB +// Author: Vaclav Slavik +// Created: 2006-12-24 +// Copyright: (c) 2006 TT-Solutions +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_POPUPWIN_H_ +#define _WX_DFB_POPUPWIN_H_ + +// ---------------------------------------------------------------------------- +// wxPopupWindow +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPopupWindow : public wxPopupWindowBase +{ +public: + wxPopupWindow() {} + + wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE) + { Create(parent, flags); } + + bool Create(wxWindow *parent, int flags = wxBORDER_NONE) + { + if ( !wxPopupWindowBase::Create(parent) ) + return false; + + return wxNonOwnedWindow::Create + ( + parent, + -1, + // DFB windows must have valid pos & size: + wxPoint(0, 0), wxSize(1, 1), + (flags & wxBORDER_MASK) | wxPOPUP_WINDOW + ); + } + + DECLARE_DYNAMIC_CLASS(wxPopupWindow) +}; + +#endif // _WX_DFB_POPUPWIN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/private.h new file mode 100644 index 0000000000..d8c0b8613d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/private.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/private.h +// Purpose: private helpers for wxDFB implementation +// Author: Vaclav Slavik +// Created: 2006-08-09 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_PRIVATE_H_ +#define _WX_DFB_PRIVATE_H_ + +#include "wx/intl.h" +#include "wx/log.h" + +#include "wx/dfb/wrapdfb.h" +#include + +//----------------------------------------------------------------------------- +// misc helpers +//----------------------------------------------------------------------------- + +/// Convert DirectFB timestamp to wxEvent one: +#define wxDFB_EVENT_TIMESTAMP(event) \ + ((event).timestamp.tv_sec * 1000 + (event).timestamp.tv_usec / 1000) + +/** + Check if DirectFB library version is at least @a major.@a minor.@a release. + + @see wxCHECK_VERSION + */ +#define wxCHECK_DFB_VERSION(major,minor,release) \ + (DIRECTFB_MAJOR_VERSION > (major) || \ + (DIRECTFB_MAJOR_VERSION == (major) && \ + DIRECTFB_MINOR_VERSION > (minor)) || \ + (DIRECTFB_MAJOR_VERSION == (major) && \ + DIRECTFB_MINOR_VERSION == (minor) && \ + DIRECTFB_MICRO_VERSION >= (release))) + +#endif // _WX_DFB_PRIVATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/private/fontmgr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/private/fontmgr.h new file mode 100644 index 0000000000..bec290a352 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/private/fontmgr.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/private/fontmgr.h +// Purpose: font management for wxDFB +// Author: Vaclav Slavik +// Created: 2006-11-18 +// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) +// (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_PRIVATE_FONTMGR_H_ +#define _WX_DFB_PRIVATE_FONTMGR_H_ + +#include "wx/dfb/wrapdfb.h" + +class wxFileConfig; + +class wxFontInstance : public wxFontInstanceBase +{ +public: + wxFontInstance(float ptSize, bool aa, const wxString& filename); + + wxIDirectFBFontPtr GetDirectFBFont() const { return m_font; } + +private: + wxIDirectFBFontPtr m_font; +}; + +class wxFontFace : public wxFontFaceBase +{ +public: + wxFontFace(const wxString& filename) : m_fileName(filename) {} + +protected: + wxFontInstance *CreateFontInstance(float ptSize, bool aa); + +private: + wxString m_fileName; +}; + +class wxFontBundle : public wxFontBundleBase +{ +public: + wxFontBundle(const wxString& name, + const wxString& fileRegular, + const wxString& fileBold, + const wxString& fileItalic, + const wxString& fileBoldItalic, + bool isFixed); + + /// Returns name of the family + virtual wxString GetName() const { return m_name; } + + virtual bool IsFixed() const { return m_isFixed; } + +private: + wxString m_name; + bool m_isFixed; +}; + +class wxFontsManager : public wxFontsManagerBase +{ +public: + wxFontsManager() { AddAllFonts(); } + + virtual wxString GetDefaultFacename(wxFontFamily family) const + { + return m_defaultFacenames[family]; + } + +private: + // adds all fonts using AddBundle() + void AddAllFonts(); + void AddFontsFromDir(const wxString& indexFile); + void AddFont(const wxString& dir, const wxString& name, wxFileConfig& cfg); + void SetDefaultFonts(wxFileConfig& cfg); + +private: + // default facenames + wxString m_defaultFacenames[wxFONTFAMILY_MAX]; +}; + +#endif // _WX_DFB_PRIVATE_FONTMGR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/private/overlay.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/private/overlay.h new file mode 100644 index 0000000000..dcebe0d653 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/private/overlay.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/private/overlay.h +// Purpose: wxOverlayImpl declaration +// Author: Vaclav Slavik +// Created: 2006-10-20 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_PRIVATE_OVERLAY_H_ +#define _WX_DFB_PRIVATE_OVERLAY_H_ + +#include "wx/dfb/dfbptr.h" +#include "wx/gdicmn.h" + +wxDFB_DECLARE_INTERFACE(IDirectFBSurface); + +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxDC; + +class wxOverlayImpl +{ +public: + wxOverlayImpl(); + ~wxOverlayImpl(); + + void Reset(); + bool IsOk(); + void Init(wxDC* dc, int x , int y , int width , int height); + void BeginDrawing(wxDC* dc); + void EndDrawing(wxDC* dc); + void Clear(wxDC* dc); + + // wxDFB specific methods: + bool IsEmpty() const { return m_isEmpty; } + wxRect GetRect() const { return m_rect; } + wxIDirectFBSurfacePtr GetDirectFBSurface() const { return m_surface; } + +public: + // window the overlay is associated with + wxWindow *m_window; + // rectangle covered by the overlay, in m_window's window coordinates + wxRect m_rect; + // surface of the overlay, same size as m_rect + wxIDirectFBSurfacePtr m_surface; + // this flag is set to true if nothing was drawn on the overlay (either + // initially or Clear() was called) + bool m_isEmpty; +}; + +#endif // _WX_DFB_PRIVATE_OVERLAY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/region.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/region.h new file mode 100644 index 0000000000..8a62291c04 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/region.h @@ -0,0 +1,94 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/region.h +// Purpose: wxRegion class +// Author: Vaclav Slavik +// Created: 2006-08-08 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_REGION_H_ +#define _WX_DFB_REGION_H_ + +class WXDLLIMPEXP_CORE wxRegion : public wxRegionBase +{ +public: + wxRegion(); + wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight); + wxRegion(const wxRect& rect); + wxRegion(const wxBitmap& bmp) + { + Union(bmp); + } + wxRegion(const wxBitmap& bmp, + const wxColour& transColour, int tolerance = 0) + { + Union(bmp, transColour, tolerance); + } + + virtual ~wxRegion(); + + // wxRegionBase methods + virtual void Clear(); + virtual bool IsEmpty() const; + + // NB: implementation detail of DirectFB, should be removed if full + // (i.e. not rect-only version is implemented) so that all code that + // assumes region==rect breaks + wxRect AsRect() const { return GetBox(); } + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + // wxRegionBase pure virtuals + virtual bool DoIsEqual(const wxRegion& region) const; + virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const; + virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const; + virtual wxRegionContain DoContainsRect(const wxRect& rect) const; + + virtual bool DoOffset(wxCoord x, wxCoord y); + virtual bool DoUnionWithRect(const wxRect& rect); + virtual bool DoUnionWithRegion(const wxRegion& region); + virtual bool DoIntersect(const wxRegion& region); + virtual bool DoSubtract(const wxRegion& region); + virtual bool DoXor(const wxRegion& region); + + + friend class WXDLLIMPEXP_FWD_CORE wxRegionIterator; + + DECLARE_DYNAMIC_CLASS(wxRegion); +}; + + +class WXDLLIMPEXP_CORE wxRegionIterator : public wxObject +{ +public: + wxRegionIterator() {} + wxRegionIterator(const wxRegion& region) { Reset(region); } + + void Reset() { m_rect = wxRect(); } + void Reset(const wxRegion& region); + + bool HaveRects() const { return !m_rect.IsEmpty(); } + operator bool() const { return HaveRects(); } + + wxRegionIterator& operator++(); + wxRegionIterator operator++(int); + + wxCoord GetX() const { return m_rect.GetX(); } + wxCoord GetY() const { return m_rect.GetY(); } + wxCoord GetW() const { return m_rect.GetWidth(); } + wxCoord GetWidth() const { return GetW(); } + wxCoord GetH() const { return m_rect.GetHeight(); } + wxCoord GetHeight() const { return GetH(); } + wxRect GetRect() const { return m_rect; } + +private: + wxRect m_rect; + + DECLARE_DYNAMIC_CLASS(wxRegionIterator); +}; + +#endif // _WX_DFB_REGION_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/toplevel.h new file mode 100644 index 0000000000..abf06e449e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/toplevel.h @@ -0,0 +1,78 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/toplevel.h +// Purpose: Top level window, abstraction of wxFrame and wxDialog +// Author: Vaclav Slavik +// Created: 2006-08-10 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_TOPLEVEL_H_ +#define _WX_DFB_TOPLEVEL_H_ + +//----------------------------------------------------------------------------- +// wxTopLevelWindowDFB +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTopLevelWindowDFB : public wxTopLevelWindowBase +{ +public: + // construction + wxTopLevelWindowDFB() { Init(); } + wxTopLevelWindowDFB(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + // implement base class pure virtuals + virtual void Maximize(bool maximize = true); + virtual bool IsMaximized() const; + virtual void Iconize(bool iconize = true); + virtual bool IsIconized() const; + virtual void Restore(); + + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); + virtual bool IsFullScreen() const { return m_fsIsShowing; } + + virtual bool CanSetTransparent() { return true; } + virtual bool SetTransparent(wxByte alpha); + + virtual void SetTitle(const wxString &title) { m_title = title; } + virtual wxString GetTitle() const { return m_title; } + +protected: + // common part of all ctors + void Init(); + + virtual void HandleFocusEvent(const wxDFBWindowEvent& event_); + +protected: + wxString m_title; + + bool m_fsIsShowing:1; /* full screen */ + long m_fsSaveStyle; + long m_fsSaveFlag; + wxRect m_fsSaveFrame; + + // is the frame currently maximized? + bool m_isMaximized:1; + wxRect m_savedFrame; +}; + +#endif // _WX_DFB_TOPLEVEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/window.h new file mode 100644 index 0000000000..f67cce2268 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/window.h @@ -0,0 +1,193 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/window.h +// Purpose: wxWindow class +// Author: Vaclav Slavik +// Created: 2006-08-10 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_WINDOW_H_ +#define _WX_DFB_WINDOW_H_ + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +#include "wx/dfb/dfbptr.h" + +wxDFB_DECLARE_INTERFACE(IDirectFBSurface); +struct wxDFBWindowEvent; + +class WXDLLIMPEXP_FWD_CORE wxFont; +class WXDLLIMPEXP_FWD_CORE wxNonOwnedWindow; + +class wxOverlayImpl; +class wxDfbOverlaysList; + +// --------------------------------------------------------------------------- +// wxWindow +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowDFB : public wxWindowBase +{ +public: + wxWindowDFB() { Init(); } + + wxWindowDFB(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + { + Init(); + Create(parent, id, pos, size, style, name); + } + + virtual ~wxWindowDFB(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + + // implement base class (pure) virtual methods + // ------------------------------------------- + + virtual void SetLabel( const wxString &WXUNUSED(label) ) {} + virtual wxString GetLabel() const { return wxEmptyString; } + + virtual void Raise(); + virtual void Lower(); + + virtual bool Show(bool show = true); + + virtual void SetFocus(); + + virtual bool Reparent(wxWindowBase *newParent); + + virtual void WarpPointer(int x, int y); + + virtual void Refresh(bool eraseBackground = true, + const wxRect *rect = (const wxRect *) NULL); + virtual void Update(); + + virtual bool SetCursor(const wxCursor &cursor); + virtual bool SetFont(const wxFont &font) { m_font = font; return true; } + + virtual int GetCharHeight() const; + virtual int GetCharWidth() const; + +#if wxUSE_DRAG_AND_DROP + virtual void SetDropTarget(wxDropTarget *dropTarget); + + // Accept files for dragging + virtual void DragAcceptFiles(bool accept); +#endif // wxUSE_DRAG_AND_DROP + + virtual WXWidget GetHandle() const { return this; } + + // implementation from now on + // -------------------------- + + // Returns DirectFB surface used for rendering of this window + wxIDirectFBSurfacePtr GetDfbSurface(); + + // returns toplevel window the window belongs to + wxNonOwnedWindow *GetTLW() const { return m_tlw; } + + virtual bool IsDoubleBuffered() const { return true; } + +protected: + // implement the base class pure virtuals + virtual void DoGetTextExtent(const wxString& string, + int *x, int *y, + int *descent = NULL, + int *externalLeading = NULL, + const wxFont *theFont = NULL) const; + virtual void DoClientToScreen(int *x, int *y) const; + virtual void DoScreenToClient(int *x, int *y) const; + virtual void DoGetPosition(int *x, int *y) const; + virtual void DoGetSize(int *width, int *height) const; + virtual void DoGetClientSize(int *width, int *height) const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoSetClientSize(int width, int height); + + virtual void DoCaptureMouse(); + virtual void DoReleaseMouse(); + + virtual void DoThaw(); + + // move the window to the specified location and resize it: this is called + // from both DoSetSize() and DoSetClientSize() and would usually just call + // ::MoveWindow() except for composite controls which will want to arrange + // themselves inside the given rectangle + virtual void DoMoveWindow(int x, int y, int width, int height); + + // return DFB surface used to render this window (will be assigned to + // m_surface if the window is visible) + virtual wxIDirectFBSurfacePtr ObtainDfbSurface() const; + + // this method must be called when window's position, size or visibility + // changes; it resets m_surface so that ObtainDfbSurface has to be called + // next time GetDfbSurface is called + void InvalidateDfbSurface(); + + // called by parent to render (part of) the window + void PaintWindow(const wxRect& rect); + + // paint window's overlays (if any) on top of window's surface + void PaintOverlays(const wxRect& rect); + + // refreshes the entire window (including non-client areas) + void DoRefreshWindow(); + // refreshes given rectangle of the window (in window, _not_ client coords) + virtual void DoRefreshRect(const wxRect& rect); + // refreshes given rectangle; unlike RefreshRect(), the argument is in + // window, not client, coords and unlike DoRefreshRect() and like Refresh(), + // does nothing if the window is hidden or frozen + void RefreshWindowRect(const wxRect& rect); + + // add/remove overlay for this window + void AddOverlay(wxOverlayImpl *overlay); + void RemoveOverlay(wxOverlayImpl *overlay); + + // DirectFB events handling + void HandleKeyEvent(const wxDFBWindowEvent& event_); + +private: + // common part of all ctors + void Init(); + // counterpart to SetFocus + void DFBKillFocus(); + +protected: + // toplevel window (i.e. DirectFB window) this window belongs to + wxNonOwnedWindow *m_tlw; + +private: + // subsurface of TLW's surface covered by this window + wxIDirectFBSurfacePtr m_surface; + + // position of the window (relative to the parent, not used by wxTLW, so + // don't access it directly) + wxRect m_rect; + + // overlays for this window (or NULL if it doesn't have any) + wxDfbOverlaysList *m_overlays; + + friend class wxNonOwnedWindow; // for HandleXXXEvent + friend class wxOverlayImpl; // for Add/RemoveOverlay + friend class wxWindowDCImpl; // for PaintOverlays + + DECLARE_DYNAMIC_CLASS(wxWindowDFB) + wxDECLARE_NO_COPY_CLASS(wxWindowDFB); + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_DFB_WINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/wrapdfb.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/wrapdfb.h new file mode 100644 index 0000000000..14d8b02c87 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dfb/wrapdfb.h @@ -0,0 +1,536 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dfb/wrapdfb.h +// Purpose: wx wrappers for DirectFB interfaces +// Author: Vaclav Slavik +// Created: 2006-08-23 +// Copyright: (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DFB_WRAPDFB_H_ +#define _WX_DFB_WRAPDFB_H_ + +#include "wx/dfb/dfbptr.h" +#include "wx/gdicmn.h" +#include "wx/vidmode.h" + +#include +#include + +// DFB < 1.0 didn't have u8 type, only __u8 +#if DIRECTFB_MAJOR_VERSION == 0 +typedef __u8 u8; +#endif + + +wxDFB_DECLARE_INTERFACE(IDirectFB); +wxDFB_DECLARE_INTERFACE(IDirectFBDisplayLayer); +wxDFB_DECLARE_INTERFACE(IDirectFBFont); +wxDFB_DECLARE_INTERFACE(IDirectFBWindow); +wxDFB_DECLARE_INTERFACE(IDirectFBSurface); +wxDFB_DECLARE_INTERFACE(IDirectFBPalette); +wxDFB_DECLARE_INTERFACE(IDirectFBEventBuffer); + + +/** + Checks the @a code of a DirectFB call and returns true if it was + successful and false if it failed, logging the errors as appropriate + (asserts for programming errors, wxLogError for runtime failures). + */ +bool wxDfbCheckReturn(DFBResult code); + +//----------------------------------------------------------------------------- +// wxDfbEvent +//----------------------------------------------------------------------------- + +/** + The struct defined by this macro is a thin wrapper around DFB*Event type. + It is needed because DFB*Event are typedefs and so we can't forward declare + them, but we need to pass them to methods declared in public headers where + cannot be included. So this struct just holds the event value, + it's sole purpose is that it can be forward declared. + */ +#define WXDFB_DEFINE_EVENT_WRAPPER(T) \ + struct wx##T \ + { \ + wx##T() {} \ + wx##T(const T& event) : m_event(event) {} \ + \ + operator T&() { return m_event; } \ + operator const T&() const { return m_event; } \ + T* operator&() { return &m_event; } \ + \ + DFBEventClass GetClass() const { return m_event.clazz; } \ + \ + private: \ + T m_event; \ + }; + +WXDFB_DEFINE_EVENT_WRAPPER(DFBEvent) +WXDFB_DEFINE_EVENT_WRAPPER(DFBWindowEvent) + + +//----------------------------------------------------------------------------- +// wxDfbWrapper +//----------------------------------------------------------------------------- + +/// Base class for wxDfbWrapper +class wxDfbWrapperBase +{ +public: + /// Increases reference count of the object + void AddRef() + { + m_refCnt++; + } + + /// Decreases reference count and if it reaches zero, deletes the object + void Release() + { + if ( --m_refCnt == 0 ) + delete this; + } + + /// Returns result code of the last call + DFBResult GetLastResult() const { return m_lastResult; } + +protected: + wxDfbWrapperBase() : m_refCnt(1), m_lastResult(DFB_OK) {} + + /// Dtor may only be called from Release() + virtual ~wxDfbWrapperBase() {} + + /** + Checks the @a result of a DirectFB call and returns true if it was + successful and false if it failed. Also stores result of the call + so that it can be obtained by calling GetLastResult(). + */ + bool Check(DFBResult result) + { + m_lastResult = result; + return wxDfbCheckReturn(result); + } + +protected: + /// Reference count + unsigned m_refCnt; + + /// Result of the last DirectFB call + DFBResult m_lastResult; +}; + +/** + This template is base class for friendly C++ wrapper around DirectFB + interface T. + + The wrapper provides same API as DirectFB, with a few exceptions: + - methods return true/false instead of error code + - methods that return or create another interface return pointer to the + interface (or NULL on failure) instead of storing it in the last + argument + - interface arguments use wxFooPtr type instead of raw DirectFB pointer + - methods taking flags use int type instead of an enum when the flags + can be or-combination of enum elements (this is workaround for + C++-unfriendly DirectFB API) + */ +template +class wxDfbWrapper : public wxDfbWrapperBase +{ +public: + /// "Raw" DirectFB interface type + typedef T DirectFBIface; + + /// Returns raw DirectFB pointer + T *GetRaw() const { return m_ptr; } + +protected: + /// To be called from ctor. Takes ownership of raw object. + void Init(T *ptr) { m_ptr = ptr; } + + /// Dtor may only be used from Release + ~wxDfbWrapper() + { + if ( m_ptr ) + m_ptr->Release(m_ptr); + } + +protected: + // pointer to DirectFB object + T *m_ptr; +}; + + +//----------------------------------------------------------------------------- +// wxIDirectFBFont +//----------------------------------------------------------------------------- + +struct wxIDirectFBFont : public wxDfbWrapper +{ + wxIDirectFBFont(IDirectFBFont *s) { Init(s); } + + bool GetStringWidth(const char *text, int bytes, int *w) + { return Check(m_ptr->GetStringWidth(m_ptr, text, bytes, w)); } + + bool GetStringExtents(const char *text, int bytes, + DFBRectangle *logicalRect, DFBRectangle *inkRect) + { + return Check(m_ptr->GetStringExtents(m_ptr, text, bytes, + logicalRect, inkRect)); + } + + bool GetHeight(int *h) + { return Check(m_ptr->GetHeight(m_ptr, h)); } + + bool GetDescender(int *descender) + { return Check(m_ptr->GetDescender(m_ptr, descender)); } +}; + + +//----------------------------------------------------------------------------- +// wxIDirectFBPalette +//----------------------------------------------------------------------------- + +struct wxIDirectFBPalette : public wxDfbWrapper +{ + wxIDirectFBPalette(IDirectFBPalette *s) { Init(s); } +}; + + +//----------------------------------------------------------------------------- +// wxIDirectFBSurface +//----------------------------------------------------------------------------- + +struct wxIDirectFBSurface : public wxDfbWrapper +{ + wxIDirectFBSurface(IDirectFBSurface *s) { Init(s); } + + bool GetSize(int *w, int *h) + { return Check(m_ptr->GetSize(m_ptr, w, h)); } + + bool GetCapabilities(DFBSurfaceCapabilities *caps) + { return Check(m_ptr->GetCapabilities(m_ptr, caps)); } + + bool GetPixelFormat(DFBSurfacePixelFormat *caps) + { return Check(m_ptr->GetPixelFormat(m_ptr, caps)); } + + // convenience version of GetPixelFormat, returns DSPF_UNKNOWN if fails + DFBSurfacePixelFormat GetPixelFormat(); + + bool SetClip(const DFBRegion *clip) + { return Check(m_ptr->SetClip(m_ptr, clip)); } + + bool SetColor(u8 r, u8 g, u8 b, u8 a) + { return Check(m_ptr->SetColor(m_ptr, r, g, b, a)); } + + bool Clear(u8 r, u8 g, u8 b, u8 a) + { return Check(m_ptr->Clear(m_ptr, r, g, b, a)); } + + bool DrawLine(int x1, int y1, int x2, int y2) + { return Check(m_ptr->DrawLine(m_ptr, x1, y1, x2, y2)); } + + bool DrawRectangle(int x, int y, int w, int h) + { return Check(m_ptr->DrawRectangle(m_ptr, x, y, w, h)); } + + bool FillRectangle(int x, int y, int w, int h) + { return Check(m_ptr->FillRectangle(m_ptr, x, y, w, h)); } + + bool SetFont(const wxIDirectFBFontPtr& font) + { return Check(m_ptr->SetFont(m_ptr, font->GetRaw())); } + + bool DrawString(const char *text, int bytes, int x, int y, int flags) + { + return Check(m_ptr->DrawString(m_ptr, text, bytes, x, y, + (DFBSurfaceTextFlags)flags)); + } + + /** + Updates the front buffer from the back buffer. If @a region is not + NULL, only given rectangle is updated. + */ + bool FlipToFront(const DFBRegion *region = NULL); + + wxIDirectFBSurfacePtr GetSubSurface(const DFBRectangle *rect) + { + IDirectFBSurface *s; + if ( Check(m_ptr->GetSubSurface(m_ptr, rect, &s)) ) + return new wxIDirectFBSurface(s); + else + return NULL; + } + + wxIDirectFBPalettePtr GetPalette() + { + IDirectFBPalette *s; + if ( Check(m_ptr->GetPalette(m_ptr, &s)) ) + return new wxIDirectFBPalette(s); + else + return NULL; + } + + bool SetPalette(const wxIDirectFBPalettePtr& pal) + { return Check(m_ptr->SetPalette(m_ptr, pal->GetRaw())); } + + bool SetBlittingFlags(int flags) + { + return Check( + m_ptr->SetBlittingFlags(m_ptr, (DFBSurfaceBlittingFlags)flags)); + } + + bool Blit(const wxIDirectFBSurfacePtr& source, + const DFBRectangle *source_rect, + int x, int y) + { return Blit(source->GetRaw(), source_rect, x, y); } + + bool Blit(IDirectFBSurface *source, + const DFBRectangle *source_rect, + int x, int y) + { return Check(m_ptr->Blit(m_ptr, source, source_rect, x, y)); } + + bool StretchBlit(const wxIDirectFBSurfacePtr& source, + const DFBRectangle *source_rect, + const DFBRectangle *dest_rect) + { + return Check(m_ptr->StretchBlit(m_ptr, source->GetRaw(), + source_rect, dest_rect)); + } + + /// Returns bit depth used by the surface or -1 on error + int GetDepth(); + + /** + Creates a new surface by cloning this one. New surface will have same + capabilities, pixel format and pixel data as the existing one. + + @see CreateCompatible + */ + wxIDirectFBSurfacePtr Clone(); + + /// Flags for CreateCompatible() + enum CreateCompatibleFlags + { + /// Don't create double-buffered surface + CreateCompatible_NoBackBuffer = 1 + }; + + /** + Creates a surface compatible with this one, i.e. surface with the same + capabilities and pixel format, but with different and size. + + @param size Size of the surface to create. If wxDefaultSize, use the + size of this surface. + @param flags Or-combination of CreateCompatibleFlags values + */ + wxIDirectFBSurfacePtr CreateCompatible(const wxSize& size = wxDefaultSize, + int flags = 0); + + bool Lock(DFBSurfaceLockFlags flags, void **ret_ptr, int *ret_pitch) + { return Check(m_ptr->Lock(m_ptr, flags, ret_ptr, ret_pitch)); } + + bool Unlock() + { return Check(m_ptr->Unlock(m_ptr)); } + + /// Helper struct for safe locking & unlocking of surfaces + struct Locked + { + Locked(const wxIDirectFBSurfacePtr& surface, DFBSurfaceLockFlags flags) + : m_surface(surface) + { + if ( !surface->Lock(flags, &ptr, &pitch) ) + ptr = NULL; + } + + ~Locked() + { + if ( ptr ) + m_surface->Unlock(); + } + + void *ptr; + int pitch; + + private: + wxIDirectFBSurfacePtr m_surface; + }; + + +private: + // this is private because we want user code to use FlipToFront() + bool Flip(const DFBRegion *region, int flags); +}; + + +//----------------------------------------------------------------------------- +// wxIDirectFBEventBuffer +//----------------------------------------------------------------------------- + +struct wxIDirectFBEventBuffer : public wxDfbWrapper +{ + wxIDirectFBEventBuffer(IDirectFBEventBuffer *s) { Init(s); } + + bool CreateFileDescriptor(int *ret_fd) + { + return Check(m_ptr->CreateFileDescriptor(m_ptr, ret_fd)); + } +}; + + +//----------------------------------------------------------------------------- +// wxIDirectFBWindow +//----------------------------------------------------------------------------- + +struct wxIDirectFBWindow : public wxDfbWrapper +{ + wxIDirectFBWindow(IDirectFBWindow *s) { Init(s); } + + bool GetID(DFBWindowID *id) + { return Check(m_ptr->GetID(m_ptr, id)); } + + bool GetPosition(int *x, int *y) + { return Check(m_ptr->GetPosition(m_ptr, x, y)); } + + bool GetSize(int *w, int *h) + { return Check(m_ptr->GetSize(m_ptr, w, h)); } + + bool MoveTo(int x, int y) + { return Check(m_ptr->MoveTo(m_ptr, x, y)); } + + bool Resize(int w, int h) + { return Check(m_ptr->Resize(m_ptr, w, h)); } + + bool SetOpacity(u8 opacity) + { return Check(m_ptr->SetOpacity(m_ptr, opacity)); } + + bool SetStackingClass(DFBWindowStackingClass klass) + { return Check(m_ptr->SetStackingClass(m_ptr, klass)); } + + bool RaiseToTop() + { return Check(m_ptr->RaiseToTop(m_ptr)); } + + bool LowerToBottom() + { return Check(m_ptr->LowerToBottom(m_ptr)); } + + wxIDirectFBSurfacePtr GetSurface() + { + IDirectFBSurface *s; + if ( Check(m_ptr->GetSurface(m_ptr, &s)) ) + return new wxIDirectFBSurface(s); + else + return NULL; + } + + bool AttachEventBuffer(const wxIDirectFBEventBufferPtr& buffer) + { return Check(m_ptr->AttachEventBuffer(m_ptr, buffer->GetRaw())); } + + bool RequestFocus() + { return Check(m_ptr->RequestFocus(m_ptr)); } + + bool Destroy() + { return Check(m_ptr->Destroy(m_ptr)); } +}; + + +//----------------------------------------------------------------------------- +// wxIDirectFBDisplayLayer +//----------------------------------------------------------------------------- + +struct wxIDirectFBDisplayLayer : public wxDfbWrapper +{ + wxIDirectFBDisplayLayer(IDirectFBDisplayLayer *s) { Init(s); } + + wxIDirectFBWindowPtr CreateWindow(const DFBWindowDescription *desc) + { + IDirectFBWindow *w; + if ( Check(m_ptr->CreateWindow(m_ptr, desc, &w)) ) + return new wxIDirectFBWindow(w); + else + return NULL; + } + + bool GetConfiguration(DFBDisplayLayerConfig *config) + { return Check(m_ptr->GetConfiguration(m_ptr, config)); } + + wxVideoMode GetVideoMode(); + + bool GetCursorPosition(int *x, int *y) + { return Check(m_ptr->GetCursorPosition(m_ptr, x, y)); } + + bool WarpCursor(int x, int y) + { return Check(m_ptr->WarpCursor(m_ptr, x, y)); } +}; + + +//----------------------------------------------------------------------------- +// wxIDirectFB +//----------------------------------------------------------------------------- + +struct wxIDirectFB : public wxDfbWrapper +{ + /** + Returns pointer to DirectFB singleton object, it never returns NULL + after wxApp was initialized. The object is cached, so calling this + method is cheap. + */ + static wxIDirectFBPtr Get() + { + if ( !ms_ptr ) CreateDirectFB(); + return ms_ptr; + } + + bool SetVideoMode(int w, int h, int bpp) + { return Check(m_ptr->SetVideoMode(m_ptr, w, h, bpp)); } + + wxIDirectFBSurfacePtr CreateSurface(const DFBSurfaceDescription *desc) + { + IDirectFBSurface *s; + if ( Check(m_ptr->CreateSurface(m_ptr, desc, &s)) ) + return new wxIDirectFBSurface(s); + else + return NULL; + } + + wxIDirectFBEventBufferPtr CreateEventBuffer() + { + IDirectFBEventBuffer *b; + if ( Check(m_ptr->CreateEventBuffer(m_ptr, &b)) ) + return new wxIDirectFBEventBuffer(b); + else + return NULL; + } + + wxIDirectFBFontPtr CreateFont(const char *filename, + const DFBFontDescription *desc) + { + IDirectFBFont *f; + if ( Check(m_ptr->CreateFont(m_ptr, filename, desc, &f)) ) + return new wxIDirectFBFont(f); + else + return NULL; + } + + wxIDirectFBDisplayLayerPtr + GetDisplayLayer(DFBDisplayLayerID id = DLID_PRIMARY) + { + IDirectFBDisplayLayer *l; + if ( Check(m_ptr->GetDisplayLayer(m_ptr, id, &l)) ) + return new wxIDirectFBDisplayLayer(l); + else + return NULL; + } + + /// Returns primary surface + wxIDirectFBSurfacePtr GetPrimarySurface(); + +private: + wxIDirectFB(IDirectFB *ptr) { Init(ptr); } + + // creates ms_ptr instance + static void CreateDirectFB(); + + static void CleanUp(); + friend class wxApp; // calls CleanUp + + // pointer to the singleton IDirectFB object + static wxIDirectFBPtr ms_ptr; +}; + +#endif // _WX_DFB_WRAPDFB_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dialog.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dialog.h new file mode 100644 index 0000000000..7110151356 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dialog.h @@ -0,0 +1,441 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dialog.h +// Purpose: wxDialogBase class +// Author: Vadim Zeitlin +// Modified by: +// Created: 29.06.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIALOG_H_BASE_ +#define _WX_DIALOG_H_BASE_ + +#include "wx/toplevel.h" +#include "wx/containr.h" +#include "wx/sharedptr.h" + +class WXDLLIMPEXP_FWD_CORE wxSizer; +class WXDLLIMPEXP_FWD_CORE wxStdDialogButtonSizer; +class WXDLLIMPEXP_FWD_CORE wxBoxSizer; +class WXDLLIMPEXP_FWD_CORE wxDialogLayoutAdapter; +class WXDLLIMPEXP_FWD_CORE wxDialog; +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxScrolledWindow; +class wxTextSizerWrapper; + +// Also see the bit summary table in wx/toplevel.h. + +#define wxDIALOG_NO_PARENT 0x00000020 // Don't make owned by apps top window + +#ifdef __WXWINCE__ +#define wxDEFAULT_DIALOG_STYLE (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxNO_BORDER) +#else +#define wxDEFAULT_DIALOG_STYLE (wxCAPTION | wxSYSTEM_MENU | wxCLOSE_BOX) +#endif + +// Layout adaptation levels, for SetLayoutAdaptationLevel + +// Don't do any layout adaptation +#define wxDIALOG_ADAPTATION_NONE 0 + +// Only look for wxStdDialogButtonSizer for non-scrolling part +#define wxDIALOG_ADAPTATION_STANDARD_SIZER 1 + +// Also look for any suitable sizer for non-scrolling part +#define wxDIALOG_ADAPTATION_ANY_SIZER 2 + +// Also look for 'loose' standard buttons for non-scrolling part +#define wxDIALOG_ADAPTATION_LOOSE_BUTTONS 3 + +// Layout adaptation mode, for SetLayoutAdaptationMode +enum wxDialogLayoutAdaptationMode +{ + wxDIALOG_ADAPTATION_MODE_DEFAULT = 0, // use global adaptation enabled status + wxDIALOG_ADAPTATION_MODE_ENABLED = 1, // enable this dialog overriding global status + wxDIALOG_ADAPTATION_MODE_DISABLED = 2 // disable this dialog overriding global status +}; + +enum wxDialogModality +{ + wxDIALOG_MODALITY_NONE = 0, + wxDIALOG_MODALITY_WINDOW_MODAL = 1, + wxDIALOG_MODALITY_APP_MODAL = 2 +}; + +extern WXDLLIMPEXP_DATA_CORE(const char) wxDialogNameStr[]; + +class WXDLLIMPEXP_CORE wxDialogBase : public wxNavigationEnabled +{ +public: + wxDialogBase(); + virtual ~wxDialogBase() { } + + // define public wxDialog methods to be implemented by the derived classes + virtual int ShowModal() = 0; + virtual void EndModal(int retCode) = 0; + virtual bool IsModal() const = 0; + // show the dialog frame-modally (needs a parent), using app-modal + // dialogs on platforms that don't support it + virtual void ShowWindowModal () ; + virtual void SendWindowModalDialogEvent ( wxEventType type ); + +#ifdef wxHAS_EVENT_BIND + template + void ShowWindowModalThenDo(const Functor& onEndModal); +#endif // wxHAS_EVENT_BIND + + // Modal dialogs have a return code - usually the id of the last + // pressed button + void SetReturnCode(int returnCode) { m_returnCode = returnCode; } + int GetReturnCode() const { return m_returnCode; } + + // Set the identifier for the affirmative button: this button will close + // the dialog after validating data and calling TransferDataFromWindow() + void SetAffirmativeId(int affirmativeId); + int GetAffirmativeId() const { return m_affirmativeId; } + + // Set identifier for Esc key translation: the button with this id will + // close the dialog without doing anything else; special value wxID_NONE + // means to not handle Esc at all while wxID_ANY means to map Esc to + // wxID_CANCEL if present and GetAffirmativeId() otherwise + void SetEscapeId(int escapeId); + int GetEscapeId() const { return m_escapeId; } + + // Find the parent to use for modal dialog: try to use the specified parent + // but fall back to the current active window or main application window as + // last resort if it is unsuitable. + // + // As this function is often called from the ctor, the window style may be + // not set yet and hence must be passed explicitly to it so that we could + // check whether it contains wxDIALOG_NO_PARENT bit. + // + // This function always returns a valid top level window or NULL. + wxWindow *GetParentForModalDialog(wxWindow *parent, long style) const; + + // This overload can only be used for already initialized windows, i.e. not + // from the ctor. It uses the current window parent and style. + wxWindow *GetParentForModalDialog() const + { + return GetParentForModalDialog(GetParent(), GetWindowStyle()); + } + +#if wxUSE_STATTEXT // && wxUSE_TEXTCTRL + // splits text up at newlines and places the lines into a vertical + // wxBoxSizer + wxSizer *CreateTextSizer( const wxString& message ); + + // same as above but uses a customized wxTextSizerWrapper to create + // non-standard controls for the lines + wxSizer *CreateTextSizer( const wxString& message, + wxTextSizerWrapper& wrapper ); +#endif // wxUSE_STATTEXT // && wxUSE_TEXTCTRL + + // returns a horizontal wxBoxSizer containing the given buttons + // + // notice that the returned sizer can be NULL if no buttons are put in the + // sizer (this mostly happens under smart phones and other atypical + // platforms which have hardware buttons replacing OK/Cancel and such) + wxSizer *CreateButtonSizer(long flags); + + // returns a sizer containing the given one and a static line separating it + // from the preceding elements if it's appropriate for the current platform + wxSizer *CreateSeparatedSizer(wxSizer *sizer); + + // returns the sizer containing CreateButtonSizer() below a separating + // static line for the platforms which use static lines for items + // separation (i.e. not Mac) + // + // this is just a combination of CreateButtonSizer() and + // CreateSeparatedSizer() + wxSizer *CreateSeparatedButtonSizer(long flags); + +#if wxUSE_BUTTON + wxStdDialogButtonSizer *CreateStdDialogButtonSizer( long flags ); +#endif // wxUSE_BUTTON + + // Do layout adaptation + virtual bool DoLayoutAdaptation(); + + // Can we do layout adaptation? + virtual bool CanDoLayoutAdaptation(); + + // Returns a content window if there is one. This can be used by the layout adapter, for + // example to make the pages of a book control into scrolling windows + virtual wxWindow* GetContentWindow() const { return NULL; } + + // Add an id to the list of main button identifiers that should be in the button sizer + void AddMainButtonId(wxWindowID id) { m_mainButtonIds.Add((int) id); } + wxArrayInt& GetMainButtonIds() { return m_mainButtonIds; } + + // Is this id in the main button id array? + bool IsMainButtonId(wxWindowID id) const { return (m_mainButtonIds.Index((int) id) != wxNOT_FOUND); } + + // Level of adaptation, from none (Level 0) to full (Level 3). To disable adaptation, + // set level 0, for example in your dialog constructor. You might + // do this if you know that you are displaying on a large screen and you don't want the + // dialog changed. + void SetLayoutAdaptationLevel(int level) { m_layoutAdaptationLevel = level; } + int GetLayoutAdaptationLevel() const { return m_layoutAdaptationLevel; } + + /// Override global adaptation enabled/disabled status + void SetLayoutAdaptationMode(wxDialogLayoutAdaptationMode mode) { m_layoutAdaptationMode = mode; } + wxDialogLayoutAdaptationMode GetLayoutAdaptationMode() const { return m_layoutAdaptationMode; } + + // Returns true if the adaptation has been done + void SetLayoutAdaptationDone(bool adaptationDone) { m_layoutAdaptationDone = adaptationDone; } + bool GetLayoutAdaptationDone() const { return m_layoutAdaptationDone; } + + // Set layout adapter class, returning old adapter + static wxDialogLayoutAdapter* SetLayoutAdapter(wxDialogLayoutAdapter* adapter); + static wxDialogLayoutAdapter* GetLayoutAdapter() { return sm_layoutAdapter; } + + // Global switch for layout adaptation + static bool IsLayoutAdaptationEnabled() { return sm_layoutAdaptation; } + static void EnableLayoutAdaptation(bool enable) { sm_layoutAdaptation = enable; } + + // modality kind + virtual wxDialogModality GetModality() const; +protected: + // emulate click of a button with the given id if it's present in the dialog + // + // return true if button was "clicked" or false if we don't have it + bool EmulateButtonClickIfPresent(int id); + + // this function is used by OnCharHook() to decide whether the given key + // should close the dialog + // + // for most platforms the default implementation (which just checks for + // Esc) is sufficient, but Mac port also adds Cmd-. here and other ports + // could do something different if needed + virtual bool IsEscapeKey(const wxKeyEvent& event); + + // end either modal or modeless dialog, for the modal dialog rc is used as + // the dialog return code + void EndDialog(int rc); + + // call Validate() and TransferDataFromWindow() and close dialog with + // wxID_OK return code + void AcceptAndClose(); + + // The return code from modal dialog + int m_returnCode; + + // The identifier for the affirmative button (usually wxID_OK) + int m_affirmativeId; + + // The identifier for cancel button (usually wxID_CANCEL) + int m_escapeId; + + // Flags whether layout adaptation has been done for this dialog + bool m_layoutAdaptationDone; + + // Extra button identifiers to be taken as 'main' button identifiers + // to be placed in the non-scrolling area + wxArrayInt m_mainButtonIds; + + // Adaptation level + int m_layoutAdaptationLevel; + + // Local override for global adaptation enabled status + wxDialogLayoutAdaptationMode m_layoutAdaptationMode; + + // Global layout adapter + static wxDialogLayoutAdapter* sm_layoutAdapter; + + // Global adaptation switch + static bool sm_layoutAdaptation; + +private: + // helper of GetParentForModalDialog(): returns the passed in window if it + // can be used as our parent or NULL if it can't + wxWindow *CheckIfCanBeUsedAsParent(wxWindow *parent) const; + + // Helper of OnCharHook() and OnCloseWindow(): find the appropriate button + // for closing the dialog and send a click event for it. + // + // Return true if we found a button to close the dialog and "clicked" it or + // false otherwise. + bool SendCloseButtonClickEvent(); + + // handle Esc key presses + void OnCharHook(wxKeyEvent& event); + + // handle closing the dialog window + void OnCloseWindow(wxCloseEvent& event); + + // handle the standard buttons + void OnButton(wxCommandEvent& event); + + // update the background colour + void OnSysColourChanged(wxSysColourChangedEvent& event); + + + wxDECLARE_NO_COPY_CLASS(wxDialogBase); + DECLARE_EVENT_TABLE() +}; + +/*! + * Base class for layout adapters - code that, for example, turns a dialog into a + * scrolling dialog if there isn't enough screen space. You can derive further + * adapter classes to do any other kind of adaptation, such as applying a watermark, or adding + * a help mechanism. + */ + +class WXDLLIMPEXP_CORE wxDialogLayoutAdapter: public wxObject +{ + DECLARE_CLASS(wxDialogLayoutAdapter) +public: + wxDialogLayoutAdapter() {} + + // Override this function to indicate that adaptation should be done + virtual bool CanDoLayoutAdaptation(wxDialog* dialog) = 0; + + // Override this function to do the adaptation + virtual bool DoLayoutAdaptation(wxDialog* dialog) = 0; +}; + +/*! + * Standard adapter. Does scrolling adaptation for paged and regular dialogs. + * + */ + +class WXDLLIMPEXP_CORE wxStandardDialogLayoutAdapter: public wxDialogLayoutAdapter +{ + DECLARE_CLASS(wxStandardDialogLayoutAdapter) +public: + wxStandardDialogLayoutAdapter() {} + +// Overrides + + // Indicate that adaptation should be done + virtual bool CanDoLayoutAdaptation(wxDialog* dialog); + + // Do layout adaptation + virtual bool DoLayoutAdaptation(wxDialog* dialog); + +// Implementation + + // Create the scrolled window + virtual wxScrolledWindow* CreateScrolledWindow(wxWindow* parent); + +#if wxUSE_BUTTON + // Find a standard or horizontal box sizer + virtual wxSizer* FindButtonSizer(bool stdButtonSizer, wxDialog* dialog, wxSizer* sizer, int& retBorder, int accumlatedBorder = 0); + + // Check if this sizer contains standard buttons, and so can be repositioned in the dialog + virtual bool IsOrdinaryButtonSizer(wxDialog* dialog, wxBoxSizer* sizer); + + // Check if this is a standard button + virtual bool IsStandardButton(wxDialog* dialog, wxButton* button); + + // Find 'loose' main buttons in the existing layout and add them to the standard dialog sizer + virtual bool FindLooseButtons(wxDialog* dialog, wxStdDialogButtonSizer* buttonSizer, wxSizer* sizer, int& count); +#endif // wxUSE_BUTTON + + // Reparent the controls to the scrolled window, except those in buttonSizer + virtual void ReparentControls(wxWindow* parent, wxWindow* reparentTo, wxSizer* buttonSizer = NULL); + static void DoReparentControls(wxWindow* parent, wxWindow* reparentTo, wxSizer* buttonSizer = NULL); + + // A function to fit the dialog around its contents, and then adjust for screen size. + // If scrolled windows are passed, scrolling is enabled in the required orientation(s). + virtual bool FitWithScrolling(wxDialog* dialog, wxScrolledWindow* scrolledWindow); + virtual bool FitWithScrolling(wxDialog* dialog, wxWindowList& windows); + static bool DoFitWithScrolling(wxDialog* dialog, wxScrolledWindow* scrolledWindow); + static bool DoFitWithScrolling(wxDialog* dialog, wxWindowList& windows); + + // Find whether scrolling will be necessary for the dialog, returning wxVERTICAL, wxHORIZONTAL or both + virtual int MustScroll(wxDialog* dialog, wxSize& windowSize, wxSize& displaySize); + static int DoMustScroll(wxDialog* dialog, wxSize& windowSize, wxSize& displaySize); +}; + +#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__) + #include "wx/univ/dialog.h" +#else + #if defined(__WXMSW__) + #include "wx/msw/dialog.h" + #elif defined(__WXMOTIF__) + #include "wx/motif/dialog.h" + #elif defined(__WXGTK20__) + #include "wx/gtk/dialog.h" + #elif defined(__WXGTK__) + #include "wx/gtk1/dialog.h" + #elif defined(__WXMAC__) + #include "wx/osx/dialog.h" + #elif defined(__WXCOCOA__) + #include "wx/cocoa/dialog.h" + #elif defined(__WXPM__) + #include "wx/os2/dialog.h" + #endif +#endif + +class WXDLLIMPEXP_CORE wxWindowModalDialogEvent : public wxCommandEvent +{ +public: + wxWindowModalDialogEvent (wxEventType commandType = wxEVT_NULL, int id = 0) + : wxCommandEvent(commandType, id) { } + + wxDialog *GetDialog() const + { return wxStaticCast(GetEventObject(), wxDialog); } + + int GetReturnCode() const + { return GetDialog()->GetReturnCode(); } + + virtual wxEvent *Clone() const { return new wxWindowModalDialogEvent (*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWindowModalDialogEvent ) +}; + +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_WINDOW_MODAL_DIALOG_CLOSED , wxWindowModalDialogEvent ); + +typedef void (wxEvtHandler::*wxWindowModalDialogEventFunction)(wxWindowModalDialogEvent &); + +#define wxWindowModalDialogEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxWindowModalDialogEventFunction, func) + +#define EVT_WINDOW_MODAL_DIALOG_CLOSED(winid, func) \ + wx__DECLARE_EVT1(wxEVT_WINDOW_MODAL_DIALOG_CLOSED, winid, wxWindowModalDialogEventHandler(func)) + +#ifdef wxHAS_EVENT_BIND +template +class wxWindowModalDialogEventFunctor +{ +public: + wxWindowModalDialogEventFunctor(const Functor& f) + : m_f(new Functor(f)) + {} + + void operator()(wxWindowModalDialogEvent& event) + { + if ( m_f ) + { + // We only want to call this handler once. Also, by deleting + // the functor here, its data (such as wxWindowPtr pointing to + // the dialog) are freed immediately after exiting this operator(). + wxSharedPtr functor(m_f); + m_f.reset(); + + (*functor)(event.GetReturnCode()); + } + else // was already called once + { + event.Skip(); + } + } + +private: + wxSharedPtr m_f; +}; + +template +void wxDialogBase::ShowWindowModalThenDo(const Functor& onEndModal) +{ + Bind(wxEVT_WINDOW_MODAL_DIALOG_CLOSED, + wxWindowModalDialogEventFunctor(onEndModal)); + ShowWindowModal(); +} +#endif // wxHAS_EVENT_BIND + +#endif + // _WX_DIALOG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dialup.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dialup.h new file mode 100644 index 0000000000..7688d4a1f8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dialup.h @@ -0,0 +1,200 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dialup.h +// Purpose: Network related wxWidgets classes and functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 07.07.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIALUP_H +#define _WX_DIALUP_H + +#if wxUSE_DIALUP_MANAGER + +#include "wx/event.h" + +// ---------------------------------------------------------------------------- +// misc +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxArrayString; + +#define WXDIALUP_MANAGER_DEFAULT_BEACONHOST wxT("www.yahoo.com") + +// ---------------------------------------------------------------------------- +// A class which groups functions dealing with connecting to the network from a +// workstation using dial-up access to the net. There is at most one instance +// of this class in the program accessed via GetDialUpManager(). +// ---------------------------------------------------------------------------- + +/* TODO + * + * 1. more configurability for Unix: i.e. how to initiate the connection, how + * to check for online status, &c. + * 2. a function to enumerate all connections (ISPs) and show a dialog in + * Dial() allowing to choose between them if no ISP given + * 3. add an async version of dialing functions which notify the caller about + * the progress (or may be even start another thread to monitor it) + * 4. the static creation/accessor functions are not MT-safe - but is this + * really crucial? I think we may suppose they're always called from the + * main thread? + */ + +class WXDLLIMPEXP_CORE wxDialUpManager +{ +public: + // this function should create and return the object of the + // platform-specific class derived from wxDialUpManager. It's implemented + // in the platform-specific source files. + static wxDialUpManager *Create(); + + // could the dialup manager be initialized correctly? If this function + // returns false, no other functions will work neither, so it's a good idea + // to call this function and check its result before calling any other + // wxDialUpManager methods + virtual bool IsOk() const = 0; + + // virtual dtor for any base class + virtual ~wxDialUpManager() { } + + // operations + // ---------- + + // fills the array with the names of all possible values for the first + // parameter to Dial() on this machine and returns their number (may be 0) + virtual size_t GetISPNames(wxArrayString& names) const = 0; + + // dial the given ISP, use username and password to authentificate + // + // if no nameOfISP is given, the function will select the default one + // + // if no username/password are given, the function will try to do without + // them, but will ask the user if really needed + // + // if async parameter is false, the function waits until the end of dialing + // and returns true upon successful completion. + // if async is true, the function only initiates the connection and returns + // immediately - the result is reported via events (an event is sent + // anyhow, but if dialing failed it will be a DISCONNECTED one) + virtual bool Dial(const wxString& nameOfISP = wxEmptyString, + const wxString& username = wxEmptyString, + const wxString& password = wxEmptyString, + bool async = true) = 0; + + // returns true if (async) dialing is in progress + virtual bool IsDialing() const = 0; + + // cancel dialing the number initiated with Dial(async = true) + // NB: this won't result in DISCONNECTED event being sent + virtual bool CancelDialing() = 0; + + // hang up the currently active dial up connection + virtual bool HangUp() = 0; + + // online status + // ------------- + + // returns true if the computer has a permanent network connection (i.e. is + // on a LAN) and so there is no need to use Dial() function to go online + // + // NB: this functions tries to guess the result and it is not always + // guaranteed to be correct, so it's better to ask user for + // confirmation or give him a possibility to override it + virtual bool IsAlwaysOnline() const = 0; + + // returns true if the computer is connected to the network: under Windows, + // this just means that a RAS connection exists, under Unix we check that + // the "well-known host" (as specified by SetWellKnownHost) is reachable + virtual bool IsOnline() const = 0; + + // sometimes the built-in logic for determining the online status may fail, + // so, in general, the user should be allowed to override it. This function + // allows to forcefully set the online status - whatever our internal + // algorithm may think about it. + virtual void SetOnlineStatus(bool isOnline = true) = 0; + + // set misc wxDialUpManager options + // -------------------------------- + + // enable automatical checks for the connection status and sending of + // wxEVT_DIALUP_CONNECTED/wxEVT_DIALUP_DISCONNECTED events. The interval + // parameter is only for Unix where we do the check manually: under + // Windows, the notification about the change of connection status is + // instantenous. + // + // Returns false if couldn't set up automatic check for online status. + virtual bool EnableAutoCheckOnlineStatus(size_t nSeconds = 60) = 0; + + // disable automatic check for connection status change - notice that the + // wxEVT_DIALUP_XXX events won't be sent any more neither. + virtual void DisableAutoCheckOnlineStatus() = 0; + + // additional Unix-only configuration + // ---------------------------------- + + // under Unix, the value of well-known host is used to check whether we're + // connected to the internet. It's unused under Windows, but this function + // is always safe to call. The default value is www.yahoo.com. + virtual void SetWellKnownHost(const wxString& hostname, + int portno = 80) = 0; + + // Sets the commands to start up the network and to hang up again. Used by + // the Unix implementations only. + virtual void + SetConnectCommand(const wxString& commandDial = wxT("/usr/bin/pon"), + const wxString& commandHangup = wxT("/usr/bin/poff")) = 0; +}; + +// ---------------------------------------------------------------------------- +// wxDialUpManager events +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxDialUpEvent; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIALUP_CONNECTED, wxDialUpEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent ); + +// the event class for the dialup events +class WXDLLIMPEXP_CORE wxDialUpEvent : public wxEvent +{ +public: + wxDialUpEvent(bool isConnected, bool isOwnEvent) : wxEvent(isOwnEvent) + { + SetEventType(isConnected ? wxEVT_DIALUP_CONNECTED + : wxEVT_DIALUP_DISCONNECTED); + } + + // is this a CONNECTED or DISCONNECTED event? + bool IsConnectedEvent() const + { return GetEventType() == wxEVT_DIALUP_CONNECTED; } + + // does this event come from wxDialUpManager::Dial() or from some external + // process (i.e. does it result from our own attempt to establish the + // connection)? + bool IsOwnEvent() const { return m_id != 0; } + + // implement the base class pure virtual + virtual wxEvent *Clone() const { return new wxDialUpEvent(*this); } + +private: + wxDECLARE_NO_ASSIGN_CLASS(wxDialUpEvent); +}; + +// the type of dialup event handler function +typedef void (wxEvtHandler::*wxDialUpEventFunction)(wxDialUpEvent&); + +#define wxDialUpEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxDialUpEventFunction, func) + +// macros to catch dialup events +#define EVT_DIALUP_CONNECTED(func) \ + wx__DECLARE_EVT0(wxEVT_DIALUP_CONNECTED, wxDialUpEventHandler(func)) +#define EVT_DIALUP_DISCONNECTED(func) \ + wx__DECLARE_EVT0(wxEVT_DIALUP_DISCONNECTED, wxDialUpEventHandler(func)) + + +#endif // wxUSE_DIALUP_MANAGER + +#endif // _WX_DIALUP_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dir.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dir.h new file mode 100644 index 0000000000..f23862e0a9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dir.h @@ -0,0 +1,186 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dir.h +// Purpose: wxDir is a class for enumerating the files in a directory +// Author: Vadim Zeitlin +// Modified by: +// Created: 08.12.99 +// Copyright: (c) 1999 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIR_H_ +#define _WX_DIR_H_ + +#include "wx/longlong.h" +#include "wx/string.h" +#include "wx/filefn.h" // for wxS_DIR_DEFAULT + +class WXDLLIMPEXP_FWD_BASE wxArrayString; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// These flags affect the behaviour of GetFirst/GetNext() and Traverse(). +// They define what types are included in the list of items they produce. +// Note that wxDIR_NO_FOLLOW is relevant only on Unix and ignored under systems +// not supporting symbolic links. +enum wxDirFlags +{ + wxDIR_FILES = 0x0001, // include files + wxDIR_DIRS = 0x0002, // include directories + wxDIR_HIDDEN = 0x0004, // include hidden files + wxDIR_DOTDOT = 0x0008, // include '.' and '..' + wxDIR_NO_FOLLOW = 0x0010, // don't dereference any symlink + + // by default, enumerate everything except '.' and '..' + wxDIR_DEFAULT = wxDIR_FILES | wxDIR_DIRS | wxDIR_HIDDEN +}; + +// these constants are possible return value of wxDirTraverser::OnDir() +enum wxDirTraverseResult +{ + wxDIR_IGNORE = -1, // ignore this directory but continue with others + wxDIR_STOP, // stop traversing + wxDIR_CONTINUE // continue into this directory +}; + +// ---------------------------------------------------------------------------- +// wxDirTraverser: helper class for wxDir::Traverse() +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxDirTraverser +{ +public: + /// a virtual dtor has been provided since this class has virtual members + virtual ~wxDirTraverser() { } + // called for each file found by wxDir::Traverse() + // + // return wxDIR_STOP or wxDIR_CONTINUE from here (wxDIR_IGNORE doesn't + // make sense) + virtual wxDirTraverseResult OnFile(const wxString& filename) = 0; + + // called for each directory found by wxDir::Traverse() + // + // return one of the enum elements defined above + virtual wxDirTraverseResult OnDir(const wxString& dirname) = 0; + + // called for each directory which we couldn't open during our traversal + // of the directory tree + // + // this method can also return either wxDIR_STOP, wxDIR_IGNORE or + // wxDIR_CONTINUE but the latter is treated specially: it means to retry + // opening the directory and so may lead to infinite loop if it is + // returned unconditionally, be careful with this! + // + // the base class version always returns wxDIR_IGNORE + virtual wxDirTraverseResult OnOpenError(const wxString& dirname); +}; + +// ---------------------------------------------------------------------------- +// wxDir: portable equivalent of {open/read/close}dir functions +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxDirData; + +class WXDLLIMPEXP_BASE wxDir +{ +public: + + // ctors + // ----- + + // default, use Open() + wxDir() { m_data = NULL; } + + // opens the directory for enumeration, use IsOpened() to test success + wxDir(const wxString& dir); + + // dtor calls Close() automatically + ~wxDir() { Close(); } + + // open the directory for enumerating + bool Open(const wxString& dir); + + // close the directory, Open() can be called again later + void Close(); + + // returns true if the directory was successfully opened + bool IsOpened() const; + + // get the full name of the directory (without '/' at the end) + wxString GetName() const; + + // Same as GetName() but does include the trailing separator, unless the + // string is empty (only for invalid directories). + wxString GetNameWithSep() const; + + + // file enumeration routines + // ------------------------- + + // start enumerating all files matching filespec (or all files if it is + // empty) and flags, return true on success + bool GetFirst(wxString *filename, + const wxString& filespec = wxEmptyString, + int flags = wxDIR_DEFAULT) const; + + // get next file in the enumeration started with GetFirst() + bool GetNext(wxString *filename) const; + + // return true if this directory has any files in it + bool HasFiles(const wxString& spec = wxEmptyString) const; + + // return true if this directory has any subdirectories + bool HasSubDirs(const wxString& spec = wxEmptyString) const; + + // enumerate all files in this directory and its subdirectories + // + // return the number of files found + size_t Traverse(wxDirTraverser& sink, + const wxString& filespec = wxEmptyString, + int flags = wxDIR_DEFAULT) const; + + // simplest version of Traverse(): get the names of all files under this + // directory into filenames array, return the number of files + static size_t GetAllFiles(const wxString& dirname, + wxArrayString *files, + const wxString& filespec = wxEmptyString, + int flags = wxDIR_DEFAULT); + + // check if there any files matching the given filespec under the given + // directory (i.e. searches recursively), return the file path if found or + // empty string otherwise + static wxString FindFirst(const wxString& dirname, + const wxString& filespec, + int flags = wxDIR_DEFAULT); + +#if wxUSE_LONGLONG + // returns the size of all directories recursively found in given path + static wxULongLong GetTotalSize(const wxString &dir, wxArrayString *filesSkipped = NULL); +#endif // wxUSE_LONGLONG + + + // static utilities for directory management + // (alias to wxFileName's functions for dirs) + // ----------------------------------------- + + // test for existence of a directory with the given name + static bool Exists(const wxString& dir); + + static bool Make(const wxString &dir, int perm = wxS_DIR_DEFAULT, + int flags = 0); + + static bool Remove(const wxString &dir, int flags = 0); + + +private: + friend class wxDirData; + + wxDirData *m_data; + + wxDECLARE_NO_COPY_CLASS(wxDir); +}; + +#endif // _WX_DIR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dirctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dirctrl.h new file mode 100644 index 0000000000..1d9d1ba186 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dirctrl.h @@ -0,0 +1,17 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dirctrl.h +// Purpose: Directory control base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIRCTRL_H_BASE_ +#define _WX_DIRCTRL_H_BASE_ + +#include "wx/generic/dirctrlg.h" + +#endif + // _WX_DIRCTRL_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dirdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dirdlg.h new file mode 100644 index 0000000000..b7b7474ab5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dirdlg.h @@ -0,0 +1,138 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dirdlg.h +// Purpose: wxDirDialog base class +// Author: Robert Roebling +// Modified by: +// Created: +// Copyright: (c) Robert Roebling +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIRDLG_H_BASE_ +#define _WX_DIRDLG_H_BASE_ + +#if wxUSE_DIRDLG + +#include "wx/dialog.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_CORE(const char) wxDirDialogNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxDirDialogDefaultFolderStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxDirSelectorPromptStr[]; + +#define wxDD_CHANGE_DIR 0x0100 +#define wxDD_DIR_MUST_EXIST 0x0200 + +// deprecated, on by default now, use wxDD_DIR_MUST_EXIST to disable it +#define wxDD_NEW_DIR_BUTTON 0 + +#ifdef __WXWINCE__ + #define wxDD_DEFAULT_STYLE wxDEFAULT_DIALOG_STYLE +#else + #define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) +#endif + +//------------------------------------------------------------------------- +// wxDirDialogBase +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDirDialogBase : public wxDialog +{ +public: + wxDirDialogBase() {} + wxDirDialogBase(wxWindow *parent, + const wxString& title = wxDirSelectorPromptStr, + const wxString& defaultPath = wxEmptyString, + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxDirDialogNameStr) + { + Create(parent, title, defaultPath, style, pos, sz, name); + } + + virtual ~wxDirDialogBase() {} + + + bool Create(wxWindow *parent, + const wxString& title = wxDirSelectorPromptStr, + const wxString& defaultPath = wxEmptyString, + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxDirDialogNameStr) + { + if (!wxDialog::Create(parent, wxID_ANY, title, pos, sz, style, name)) + return false; + m_path = defaultPath; + m_message = title; + return true; + } + +#if WXWIN_COMPATIBILITY_2_6 + + wxDEPRECATED( long GetStyle() const ); + wxDEPRECATED( void SetStyle(long style) ); + +#endif // WXWIN_COMPATIBILITY_2_6 + + virtual void SetMessage(const wxString& message) { m_message = message; } + virtual void SetPath(const wxString& path) { m_path = path; } + + virtual wxString GetMessage() const { return m_message; } + virtual wxString GetPath() const { return m_path; } + +protected: + wxString m_message; + wxString m_path; +}; + + +// Universal and non-port related switches with need for generic implementation +#if defined(__WXUNIVERSAL__) + #include "wx/generic/dirdlgg.h" + #define wxDirDialog wxGenericDirDialog +#elif defined(__WXMSW__) && (!wxUSE_OLE || \ + (defined (__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)) + #include "wx/generic/dirdlgg.h" + #define wxDirDialog wxGenericDirDialog +#elif defined(__WXMSW__) && defined(__WXWINCE__) && !defined(__HANDHELDPC__) + #include "wx/generic/dirdlgg.h" // MS PocketPC or MS Smartphone + #define wxDirDialog wxGenericDirDialog +#elif defined(__WXMSW__) + #include "wx/msw/dirdlg.h" // Native MSW +#elif defined(__WXGTK20__) + #include "wx/gtk/dirdlg.h" // Native GTK for gtk2.4 +#elif defined(__WXGTK__) + #include "wx/generic/dirdlgg.h" + #define wxDirDialog wxGenericDirDialog +#elif defined(__WXMAC__) + #include "wx/osx/dirdlg.h" // Native Mac +#elif defined(__WXCOCOA__) + #include "wx/cocoa/dirdlg.h" // Native Cocoa +#elif defined(__WXMOTIF__) || \ + defined(__WXX11__) || \ + defined(__WXCOCOA__) || \ + defined(__WXPM__) + #include "wx/generic/dirdlgg.h" // Other ports use generic implementation + #define wxDirDialog wxGenericDirDialog +#endif + +// ---------------------------------------------------------------------------- +// common ::wxDirSelector() function +// ---------------------------------------------------------------------------- + +WXDLLIMPEXP_CORE wxString +wxDirSelector(const wxString& message = wxDirSelectorPromptStr, + const wxString& defaultPath = wxEmptyString, + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + wxWindow *parent = NULL); + +#endif // wxUSE_DIRDLG + +#endif + // _WX_DIRDLG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/display.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/display.h new file mode 100644 index 0000000000..4678672138 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/display.h @@ -0,0 +1,127 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/display.h +// Purpose: wxDisplay class +// Author: Royce Mitchell III, Vadim Zeitlin +// Created: 06/21/02 +// Copyright: (c) 2002-2006 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DISPLAY_H_BASE_ +#define _WX_DISPLAY_H_BASE_ + +// NB: no #if wxUSE_DISPLAY here, the display geometry part of this class (but +// not the video mode stuff) is always available but if wxUSE_DISPLAY == 0 +// it becomes just a trivial wrapper around the old wxDisplayXXX() functions + +#if wxUSE_DISPLAY + #include "wx/dynarray.h" + #include "wx/vidmode.h" + + WX_DECLARE_EXPORTED_OBJARRAY(wxVideoMode, wxArrayVideoModes); + + // default, uninitialized, video mode object + extern WXDLLIMPEXP_DATA_CORE(const wxVideoMode) wxDefaultVideoMode; +#endif // wxUSE_DISPLAY + +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxPoint; +class WXDLLIMPEXP_FWD_CORE wxRect; +class WXDLLIMPEXP_FWD_BASE wxString; + +class WXDLLIMPEXP_FWD_CORE wxDisplayFactory; +class WXDLLIMPEXP_FWD_CORE wxDisplayImpl; + +// ---------------------------------------------------------------------------- +// wxDisplay: represents a display/monitor attached to the system +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDisplay +{ +public: + // initialize the object containing all information about the given + // display + // + // the displays are numbered from 0 to GetCount() - 1, 0 is always the + // primary display and the only one which is always supported + wxDisplay(unsigned n = 0); + + // dtor is not virtual as this is a concrete class not meant to be derived + // from + ~wxDisplay(); + + + // return the number of available displays, valid parameters to + // wxDisplay ctor are from 0 up to this number + static unsigned GetCount(); + + // find the display where the given point lies, return wxNOT_FOUND if + // it doesn't belong to any display + static int GetFromPoint(const wxPoint& pt); + + // find the display where the given window lies, return wxNOT_FOUND if it + // is not shown at all + static int GetFromWindow(const wxWindow *window); + + + // return true if the object was initialized successfully + bool IsOk() const { return m_impl != NULL; } + + // get the full display size + wxRect GetGeometry() const; + + // get the client area of the display, i.e. without taskbars and such + wxRect GetClientArea() const; + + // name may be empty + wxString GetName() const; + + // display 0 is usually the primary display + bool IsPrimary() const; + + +#if wxUSE_DISPLAY + // enumerate all video modes supported by this display matching the given + // one (in the sense of wxVideoMode::Match()) + // + // as any mode matches the default value of the argument and there is + // always at least one video mode supported by display, the returned array + // is only empty for the default value of the argument if this function is + // not supported at all on this platform + wxArrayVideoModes + GetModes(const wxVideoMode& mode = wxDefaultVideoMode) const; + + // get current video mode + wxVideoMode GetCurrentMode() const; + + // change current mode, return true if succeeded, false otherwise + // + // for the default value of the argument restores the video mode to default + bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode); + + // restore the default video mode (just a more readable synonym) + void ResetMode() { (void)ChangeMode(); } +#endif // wxUSE_DISPLAY + +private: + // returns the factory used to implement our static methods and create new + // displays + static wxDisplayFactory& Factory(); + + // creates the factory object, called by Factory() when it is called for + // the first time and should return a pointer allocated with new (the + // caller will delete it) + // + // this method must be implemented in platform-specific code if + // wxUSE_DISPLAY == 1 (if it is 0 we provide the stub in common code) + static wxDisplayFactory *CreateFactory(); + + + // the real implementation + wxDisplayImpl *m_impl; + + + wxDECLARE_NO_COPY_CLASS(wxDisplay); +}; + +#endif // _WX_DISPLAY_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/display_impl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/display_impl.h new file mode 100644 index 0000000000..b6674ebfad --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/display_impl.h @@ -0,0 +1,109 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/display_impl.h +// Purpose: wxDisplayImpl class declaration +// Author: Vadim Zeitlin +// Created: 2006-03-15 +// Copyright: (c) 2002-2006 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DISPLAY_IMPL_H_BASE_ +#define _WX_DISPLAY_IMPL_H_BASE_ + +#include "wx/gdicmn.h" // for wxRect + +// ---------------------------------------------------------------------------- +// wxDisplayFactory: allows to create wxDisplay objects +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDisplayFactory +{ +public: + wxDisplayFactory() { } + virtual ~wxDisplayFactory() { } + + // create a new display object + // + // it can return a NULL pointer if the display creation failed + virtual wxDisplayImpl *CreateDisplay(unsigned n) = 0; + + // get the total number of displays + virtual unsigned GetCount() = 0; + + // return the display for the given point or wxNOT_FOUND + virtual int GetFromPoint(const wxPoint& pt) = 0; + + // return the display for the given window or wxNOT_FOUND + // + // the window pointer must not be NULL (i.e. caller should check it) + virtual int GetFromWindow(const wxWindow *window); +}; + +// ---------------------------------------------------------------------------- +// wxDisplayImpl: base class for all wxDisplay implementations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDisplayImpl +{ +public: + // virtual dtor for this base class + virtual ~wxDisplayImpl() { } + + + // return the full area of this display + virtual wxRect GetGeometry() const = 0; + + // return the area of the display available for normal windows + virtual wxRect GetClientArea() const { return GetGeometry(); } + + // return the name (may be empty) + virtual wxString GetName() const = 0; + + // return the index of this display + unsigned GetIndex() const { return m_index; } + + // return true if this is the primary monitor (usually one with index 0) + virtual bool IsPrimary() const { return GetIndex() == 0; } + + +#if wxUSE_DISPLAY + // implements wxDisplay::GetModes() + virtual wxArrayVideoModes GetModes(const wxVideoMode& mode) const = 0; + + // get current video mode + virtual wxVideoMode GetCurrentMode() const = 0; + + // change current mode, return true if succeeded, false otherwise + virtual bool ChangeMode(const wxVideoMode& mode) = 0; +#endif // wxUSE_DISPLAY + +protected: + // create the object providing access to the display with the given index + wxDisplayImpl(unsigned n) : m_index(n) { } + + + // the index of this display (0 is always the primary one) + const unsigned m_index; + + + friend class wxDisplayFactory; + + wxDECLARE_NO_COPY_CLASS(wxDisplayImpl); +}; + +// ---------------------------------------------------------------------------- +// wxDisplayFactorySingle +// ---------------------------------------------------------------------------- + +// this is a stub implementation using single/main display only, it is +// available even if wxUSE_DISPLAY == 0 +class WXDLLIMPEXP_CORE wxDisplayFactorySingle : public wxDisplayFactory +{ +public: + virtual wxDisplayImpl *CreateDisplay(unsigned n); + virtual unsigned GetCount() { return 1; } + virtual int GetFromPoint(const wxPoint& pt); +}; + +#endif // _WX_DISPLAY_IMPL_H_BASE_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dlimpexp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dlimpexp.h new file mode 100644 index 0000000000..800b745fa6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dlimpexp.h @@ -0,0 +1,364 @@ +/* + * Name: wx/dlimpexp.h + * Purpose: Macros for declaring DLL-imported/exported functions + * Author: Vadim Zeitlin + * Modified by: + * Created: 16.10.2003 (extracted from wx/defs.h) + * Copyright: (c) 2003 Vadim Zeitlin + * Licence: wxWindows licence + */ + +/* + This is a C file, not C++ one, do not use C++ comments here! + */ + +#ifndef _WX_DLIMPEXP_H_ +#define _WX_DLIMPEXP_H_ + +#if defined(HAVE_VISIBILITY) +# define WXEXPORT __attribute__ ((visibility("default"))) +# define WXIMPORT __attribute__ ((visibility("default"))) +#elif defined(__WINDOWS__) + /* + __declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well + as VC++. + */ +# if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__) +# define WXEXPORT __declspec(dllexport) +# define WXIMPORT __declspec(dllimport) + /* + While gcc also supports __declspec(dllexport), it creates unusably huge + DLL files since gcc 4.5 (while taking horribly long amounts of time), + see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601. Because of this + we rely on binutils auto export/import support which seems to work + quite well for 4.5+. + */ +# elif defined(__GNUC__) && !wxCHECK_GCC_VERSION(4, 5) + /* + __declspec could be used here too but let's use the native + __attribute__ instead for clarity. + */ +# define WXEXPORT __attribute__((dllexport)) +# define WXIMPORT __attribute__((dllimport)) +# endif +#elif defined(__WXPM__) +# if defined (__WATCOMC__) +# define WXEXPORT __declspec(dllexport) + /* + __declspec(dllimport) prepends __imp to imported symbols. We do NOT + want that! + */ +# define WXIMPORT +# elif defined(__EMX__) +# define WXEXPORT +# define WXIMPORT +# elif (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) +# define WXEXPORT _Export +# define WXIMPORT _Export +# endif +#elif defined(__CYGWIN__) +# define WXEXPORT __declspec(dllexport) +# define WXIMPORT __declspec(dllimport) +#endif + +/* for other platforms/compilers we don't anything */ +#ifndef WXEXPORT +# define WXEXPORT +# define WXIMPORT +#endif + +/* + We support building wxWidgets as a set of several libraries but we don't + support arbitrary combinations of libs/DLLs: either we build all of them as + DLLs (in which case WXMAKINGDLL is defined) or none (it isn't). + + However we have a problem because we need separate WXDLLIMPEXP versions for + different libraries as, for example, wxString class should be dllexported + when compiled in wxBase and dllimported otherwise, so we do define separate + WXMAKING/USINGDLL_XYZ constants for each component XYZ. + */ +#ifdef WXMAKINGDLL +# if wxUSE_BASE +# define WXMAKINGDLL_BASE +# endif + +# define WXMAKINGDLL_NET +# define WXMAKINGDLL_CORE +# define WXMAKINGDLL_ADV +# define WXMAKINGDLL_QA +# define WXMAKINGDLL_HTML +# define WXMAKINGDLL_GL +# define WXMAKINGDLL_XML +# define WXMAKINGDLL_XRC +# define WXMAKINGDLL_AUI +# define WXMAKINGDLL_PROPGRID +# define WXMAKINGDLL_RIBBON +# define WXMAKINGDLL_RICHTEXT +# define WXMAKINGDLL_MEDIA +# define WXMAKINGDLL_STC +# define WXMAKINGDLL_WEBVIEW +#endif /* WXMAKINGDLL */ + +/* + WXDLLIMPEXP_CORE maps to export declaration when building the DLL, to import + declaration if using it or to nothing at all if we don't use wxWin as DLL + */ +#ifdef WXMAKINGDLL_BASE +# define WXDLLIMPEXP_BASE WXEXPORT +# define WXDLLIMPEXP_DATA_BASE(type) WXEXPORT type +# if defined(HAVE_VISIBILITY) +# define WXDLLIMPEXP_INLINE_BASE WXEXPORT +# else +# define WXDLLIMPEXP_INLINE_BASE +# endif +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_BASE WXIMPORT +# define WXDLLIMPEXP_DATA_BASE(type) WXIMPORT type +# if defined(HAVE_VISIBILITY) +# define WXDLLIMPEXP_INLINE_BASE WXIMPORT +# else +# define WXDLLIMPEXP_INLINE_BASE +# endif +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_BASE +# define WXDLLIMPEXP_DATA_BASE(type) type +# define WXDLLIMPEXP_INLINE_BASE +#endif + +#ifdef WXMAKINGDLL_NET +# define WXDLLIMPEXP_NET WXEXPORT +# define WXDLLIMPEXP_DATA_NET(type) WXEXPORT type +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_NET WXIMPORT +# define WXDLLIMPEXP_DATA_NET(type) WXIMPORT type +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_NET +# define WXDLLIMPEXP_DATA_NET(type) type +#endif + +#ifdef WXMAKINGDLL_CORE +# define WXDLLIMPEXP_CORE WXEXPORT +# define WXDLLIMPEXP_DATA_CORE(type) WXEXPORT type +# if defined(HAVE_VISIBILITY) +# define WXDLLIMPEXP_INLINE_CORE WXEXPORT +# else +# define WXDLLIMPEXP_INLINE_CORE +# endif +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_CORE WXIMPORT +# define WXDLLIMPEXP_DATA_CORE(type) WXIMPORT type +# if defined(HAVE_VISIBILITY) +# define WXDLLIMPEXP_INLINE_CORE WXIMPORT +# else +# define WXDLLIMPEXP_INLINE_CORE +# endif +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_CORE +# define WXDLLIMPEXP_DATA_CORE(type) type +# define WXDLLIMPEXP_INLINE_CORE +#endif + +#ifdef WXMAKINGDLL_ADV +# define WXDLLIMPEXP_ADV WXEXPORT +# define WXDLLIMPEXP_DATA_ADV(type) WXEXPORT type +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_ADV WXIMPORT +# define WXDLLIMPEXP_DATA_ADV(type) WXIMPORT type +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_ADV +# define WXDLLIMPEXP_DATA_ADV(type) type +#endif + +#ifdef WXMAKINGDLL_QA +# define WXDLLIMPEXP_QA WXEXPORT +# define WXDLLIMPEXP_DATA_QA(type) WXEXPORT type +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_QA WXIMPORT +# define WXDLLIMPEXP_DATA_QA(type) WXIMPORT type +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_QA +# define WXDLLIMPEXP_DATA_QA(type) type +#endif + +#ifdef WXMAKINGDLL_HTML +# define WXDLLIMPEXP_HTML WXEXPORT +# define WXDLLIMPEXP_DATA_HTML(type) WXEXPORT type +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_HTML WXIMPORT +# define WXDLLIMPEXP_DATA_HTML(type) WXIMPORT type +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_HTML +# define WXDLLIMPEXP_DATA_HTML(type) type +#endif + +#ifdef WXMAKINGDLL_GL +# define WXDLLIMPEXP_GL WXEXPORT +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_GL WXIMPORT +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_GL +#endif + +#ifdef WXMAKINGDLL_XML +# define WXDLLIMPEXP_XML WXEXPORT +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_XML WXIMPORT +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_XML +#endif + +#ifdef WXMAKINGDLL_XRC +# define WXDLLIMPEXP_XRC WXEXPORT +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_XRC WXIMPORT +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_XRC +#endif + +#ifdef WXMAKINGDLL_AUI +# define WXDLLIMPEXP_AUI WXEXPORT +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_AUI WXIMPORT +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_AUI +#endif + +#ifdef WXMAKINGDLL_PROPGRID +# define WXDLLIMPEXP_PROPGRID WXEXPORT +# define WXDLLIMPEXP_DATA_PROPGRID(type) WXEXPORT type +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_PROPGRID WXIMPORT +# define WXDLLIMPEXP_DATA_PROPGRID(type) WXIMPORT type +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_PROPGRID +# define WXDLLIMPEXP_DATA_PROPGRID(type) type +#endif + +#ifdef WXMAKINGDLL_RIBBON +# define WXDLLIMPEXP_RIBBON WXEXPORT +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_RIBBON WXIMPORT +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_RIBBON +#endif + +#ifdef WXMAKINGDLL_RICHTEXT +# define WXDLLIMPEXP_RICHTEXT WXEXPORT +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_RICHTEXT WXIMPORT +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_RICHTEXT +#endif + +#ifdef WXMAKINGDLL_MEDIA +# define WXDLLIMPEXP_MEDIA WXEXPORT +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_MEDIA WXIMPORT +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_MEDIA +#endif + +#ifdef WXMAKINGDLL_STC +# define WXDLLIMPEXP_STC WXEXPORT +# define WXDLLIMPEXP_DATA_STC(type) WXEXPORT type +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_STC WXIMPORT +# define WXDLLIMPEXP_DATA_STC(type) WXIMPORT type +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_STC +# define WXDLLIMPEXP_DATA_STC(type) type +#endif + +#ifdef WXMAKINGDLL_WEBVIEW +# define WXDLLIMPEXP_WEBVIEW WXEXPORT +# define WXDLLIMPEXP_DATA_WEBVIEW(type) WXEXPORT type +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_WEBVIEW WXIMPORT +# define WXDLLIMPEXP_DATA_WEBVIEW(type) WXIMPORT type +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_WEBVIEW +# define WXDLLIMPEXP_DATA_WEBVIEW(type) type +#endif + +/* + GCC warns about using __attribute__ (and also __declspec in mingw32 case) on + forward declarations while MSVC complains about forward declarations without + __declspec for the classes later declared with it, so we need a separate set + of macros for forward declarations to hide this difference: + */ +#if defined(HAVE_VISIBILITY) || (defined(__WINDOWS__) && defined(__GNUC__)) + #define WXDLLIMPEXP_FWD_BASE + #define WXDLLIMPEXP_FWD_NET + #define WXDLLIMPEXP_FWD_CORE + #define WXDLLIMPEXP_FWD_ADV + #define WXDLLIMPEXP_FWD_QA + #define WXDLLIMPEXP_FWD_HTML + #define WXDLLIMPEXP_FWD_GL + #define WXDLLIMPEXP_FWD_XML + #define WXDLLIMPEXP_FWD_XRC + #define WXDLLIMPEXP_FWD_AUI + #define WXDLLIMPEXP_FWD_PROPGRID + #define WXDLLIMPEXP_FWD_RIBBON + #define WXDLLIMPEXP_FWD_RICHTEXT + #define WXDLLIMPEXP_FWD_MEDIA + #define WXDLLIMPEXP_FWD_STC + #define WXDLLIMPEXP_FWD_WEBVIEW +#else + #define WXDLLIMPEXP_FWD_BASE WXDLLIMPEXP_BASE + #define WXDLLIMPEXP_FWD_NET WXDLLIMPEXP_NET + #define WXDLLIMPEXP_FWD_CORE WXDLLIMPEXP_CORE + #define WXDLLIMPEXP_FWD_ADV WXDLLIMPEXP_ADV + #define WXDLLIMPEXP_FWD_QA WXDLLIMPEXP_QA + #define WXDLLIMPEXP_FWD_HTML WXDLLIMPEXP_HTML + #define WXDLLIMPEXP_FWD_GL WXDLLIMPEXP_GL + #define WXDLLIMPEXP_FWD_XML WXDLLIMPEXP_XML + #define WXDLLIMPEXP_FWD_XRC WXDLLIMPEXP_XRC + #define WXDLLIMPEXP_FWD_AUI WXDLLIMPEXP_AUI + #define WXDLLIMPEXP_FWD_PROPGRID WXDLLIMPEXP_PROPGRID + #define WXDLLIMPEXP_FWD_RIBBON WXDLLIMPEXP_RIBBON + #define WXDLLIMPEXP_FWD_RICHTEXT WXDLLIMPEXP_RICHTEXT + #define WXDLLIMPEXP_FWD_MEDIA WXDLLIMPEXP_MEDIA + #define WXDLLIMPEXP_FWD_STC WXDLLIMPEXP_STC + #define WXDLLIMPEXP_FWD_WEBVIEW WXDLLIMPEXP_WEBVIEW +#endif + +/* for backwards compatibility, define suffix-less versions too */ +#define WXDLLEXPORT WXDLLIMPEXP_CORE +#define WXDLLEXPORT_DATA WXDLLIMPEXP_DATA_CORE + +/* + MSVC up to 6.0 needs to be explicitly told to export template instantiations + used by the DLL clients, use this macro to do it like this: + + template class Foo { ... }; + WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( Foo ) + + (notice that currently we only need this for wxBase and wxCore libraries) + */ +#if defined(__VISUALC__) && (__VISUALC__ <= 1200) + #ifdef WXMAKINGDLL_BASE + #define WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE(decl) \ + template class WXDLLIMPEXP_BASE decl; + #define WXDLLIMPEXP_TEMPLATE_INSTANCE_CORE(decl) \ + template class WXDLLIMPEXP_CORE decl; + #else + /* + We need to disable this warning when using this macro, as + recommended by Microsoft itself: + + http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b168958 + */ + #pragma warning(disable:4231) + + #define WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE(decl) \ + extern template class WXDLLIMPEXP_BASE decl; + #define WXDLLIMPEXP_TEMPLATE_INSTANCE_CORE(decl) \ + extern template class WXDLLIMPEXP_CORE decl; + #endif +#else /* not VC <= 6 */ + #define WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE(decl) + #define WXDLLIMPEXP_TEMPLATE_INSTANCE_CORE(decl) +#endif /* VC6/others */ + +#endif /* _WX_DLIMPEXP_H_ */ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dlist.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dlist.h new file mode 100644 index 0000000000..b69f617d9b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dlist.h @@ -0,0 +1,850 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/dlist.h +// Purpose: wxDList which is a template version of wxList +// Author: Robert Roebling +// Created: 18.09.2008 +// Copyright: (c) 2008 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DLIST_H_ +#define _WX_DLIST_H_ + +#include "wx/defs.h" +#include "wx/utils.h" + +#if wxUSE_STD_CONTAINERS + +#include "wx/beforestd.h" +#include +#include +#include +#include "wx/afterstd.h" + +template +class wxDList: public std::list +{ +private: + bool m_destroy; + typedef std::list BaseListType; + typedef wxDList ListType; + +public: + typedef typename BaseListType::iterator iterator; + + class compatibility_iterator + { + private: + /* Workaround for broken VC6 nested class name resolution */ + typedef typename BaseListType::iterator iterator; + friend class wxDList; + + iterator m_iter; + ListType *m_list; + + public: + compatibility_iterator() + : m_iter(), m_list( NULL ) {} + compatibility_iterator( ListType* li, iterator i ) + : m_iter( i ), m_list( li ) {} + compatibility_iterator( const ListType* li, iterator i ) + : m_iter( i ), m_list( const_cast(li) ) {} + + compatibility_iterator* operator->() { return this; } + const compatibility_iterator* operator->() const { return this; } + + bool operator==(const compatibility_iterator& i) const + { + wxASSERT_MSG( m_list && i.m_list, + "comparing invalid iterators is illegal" ); + return (m_list == i.m_list) && (m_iter == i.m_iter); + } + bool operator!=(const compatibility_iterator& i) const + { return !( operator==( i ) ); } + operator bool() const + { return m_list ? m_iter != m_list->end() : false; } + bool operator !() const + { return !( operator bool() ); } + + T* GetData() const { return *m_iter; } + void SetData( T* e ) { *m_iter = e; } + + compatibility_iterator GetNext() const + { + iterator i = m_iter; + return compatibility_iterator( m_list, ++i ); + } + + compatibility_iterator GetPrevious() const + { + if ( m_iter == m_list->begin() ) + return compatibility_iterator(); + + iterator i = m_iter; + return compatibility_iterator( m_list, --i ); + } + + int IndexOf() const + { + return *this ? std::distance( m_list->begin(), m_iter ) + : wxNOT_FOUND; + } + }; + +public: + wxDList() : m_destroy( false ) {} + + ~wxDList() { Clear(); } + + compatibility_iterator Find( const T* e ) const + { + return compatibility_iterator( this, + std::find( const_cast(this)->begin(), + const_cast(this)->end(), e ) ); + } + + bool IsEmpty() const + { return this->empty(); } + size_t GetCount() const + { return this->size(); } + + compatibility_iterator Item( size_t idx ) const + { + iterator i = const_cast(this)->begin(); + std::advance( i, idx ); + return compatibility_iterator( this, i ); + } + + T* operator[](size_t idx) const + { + return Item(idx).GetData(); + } + + compatibility_iterator GetFirst() const + { + return compatibility_iterator( this, const_cast(this)->begin() ); + } + compatibility_iterator GetLast() const + { + iterator i = const_cast(this)->end(); + return compatibility_iterator( this, !(this->empty()) ? --i : i ); + } + compatibility_iterator Member( T* e ) const + { return Find( e ); } + compatibility_iterator Nth( int n ) const + { return Item( n ); } + int IndexOf( T* e ) const + { return Find( e ).IndexOf(); } + + compatibility_iterator Append( T* e ) + { + this->push_back( e ); + return GetLast(); + } + + compatibility_iterator Insert( T* e ) + { + this->push_front( e ); + return compatibility_iterator( this, this->begin() ); + } + + compatibility_iterator Insert( compatibility_iterator & i, T* e ) + { + return compatibility_iterator( this, this->insert( i.m_iter, e ) ); + } + + compatibility_iterator Insert( size_t idx, T* e ) + { + return compatibility_iterator( this, + this->insert( Item( idx ).m_iter, e ) ); + } + + void DeleteContents( bool destroy ) + { m_destroy = destroy; } + + bool GetDeleteContents() const + { return m_destroy; } + + void Erase( const compatibility_iterator& i ) + { + if ( m_destroy ) + delete i->GetData(); + this->erase( i.m_iter ); + } + + bool DeleteNode( const compatibility_iterator& i ) + { + if( i ) + { + Erase( i ); + return true; + } + return false; + } + + bool DeleteObject( T* e ) + { + return DeleteNode( Find( e ) ); + } + + void Clear() + { + if ( m_destroy ) + { + iterator it, en; + for ( it = this->begin(), en = this->end(); it != en; ++it ) + delete *it; + } + this->clear(); + } +}; + +#else // !wxUSE_STD_CONTAINERS + +template +class wxDList +{ +public: + class Node + { + public: + Node(wxDList *list = NULL, + Node *previous = NULL, + Node *next = NULL, + T *data = NULL) + { + m_list = list; + m_previous = previous; + m_next = next; + m_data = data; + if (previous) + previous->m_next = this; + if (next) + next->m_previous = this; + } + + ~Node() + { + // handle the case when we're being deleted from the list by + // the user (i.e. not by the list itself from DeleteNode) - + // we must do it for compatibility with old code + if (m_list != NULL) + m_list->DetachNode(this); + } + + void DeleteData() + { + delete m_data; + } + + Node *GetNext() const { return m_next; } + Node *GetPrevious() const { return m_previous; } + T *GetData() const { return m_data; } + T **GetDataPtr() const { return &(wx_const_cast(nodetype*,this)->m_data); } + void SetData( T *data ) { m_data = data; } + + int IndexOf() const + { + wxCHECK_MSG( m_list, wxNOT_FOUND, + "node doesn't belong to a list in IndexOf" ); + + int i; + Node *prev = m_previous; + for( i = 0; prev; i++ ) + prev = prev->m_previous; + return i; + } + + private: + T *m_data; // user data + Node *m_next, // next and previous nodes in the list + *m_previous; + wxDList *m_list; // list we belong to + + friend class wxDList; + }; + + typedef Node nodetype; + + class compatibility_iterator + { + public: + compatibility_iterator(nodetype *ptr = NULL) : m_ptr(ptr) { } + nodetype *operator->() const { return m_ptr; } + operator nodetype *() const { return m_ptr; } + + private: + nodetype *m_ptr; + }; + +private: + void Init() + { + m_nodeFirst = + m_nodeLast = NULL; + m_count = 0; + m_destroy = false; + } + + void DoDeleteNode( nodetype *node ) + { + if ( m_destroy ) + node->DeleteData(); + // so that the node knows that it's being deleted by the list + node->m_list = NULL; + delete node; + } + + size_t m_count; // number of elements in the list + bool m_destroy; // destroy user data when deleting list items? + nodetype *m_nodeFirst, // pointers to the head and tail of the list + *m_nodeLast; + +public: + wxDList() + { + Init(); + } + + wxDList( const wxDList& list ) + { + Init(); + Assign(list); + } + + wxDList( size_t count, T *elements[] ) + { + Init(); + size_t n; + for (n = 0; n < count; n++) + Append( elements[n] ); + } + + wxDList& operator=( const wxDList& list ) + { + if (&list != this) + Assign(list); + return *this; + } + + ~wxDList() + { + nodetype *each = m_nodeFirst; + while ( each != NULL ) + { + nodetype *next = each->GetNext(); + DoDeleteNode(each); + each = next; + } + } + + void Assign(const wxDList &list) + { + wxASSERT_MSG( !list.m_destroy, + "copying list which owns it's elements is a bad idea" ); + Clear(); + m_destroy = list.m_destroy; + m_nodeFirst = NULL; + m_nodeLast = NULL; + nodetype* node; + for (node = list.GetFirst(); node; node = node->GetNext() ) + Append(node->GetData()); + wxASSERT_MSG( m_count == list.m_count, "logic error in Assign()" ); + } + + nodetype *Append( T *object ) + { + nodetype *node = new nodetype( this, m_nodeLast, NULL, object ); + + if ( !m_nodeFirst ) + { + m_nodeFirst = node; + m_nodeLast = m_nodeFirst; + } + else + { + m_nodeLast->m_next = node; + m_nodeLast = node; + } + m_count++; + return node; + } + + nodetype *Insert( T* object ) + { + return Insert( NULL, object ); + } + + nodetype *Insert( size_t pos, T* object ) + { + if (pos == m_count) + return Append( object ); + else + return Insert( Item(pos), object ); + } + + nodetype *Insert( nodetype *position, T* object ) + { + wxCHECK_MSG( !position || position->m_list == this, NULL, + "can't insert before a node from another list" ); + + // previous and next node for the node being inserted + nodetype *prev, *next; + if ( position ) + { + prev = position->GetPrevious(); + next = position; + } + else + { + // inserting in the beginning of the list + prev = NULL; + next = m_nodeFirst; + } + nodetype *node = new nodetype( this, prev, next, object ); + if ( !m_nodeFirst ) + m_nodeLast = node; + if ( prev == NULL ) + m_nodeFirst = node; + m_count++; + return node; + } + + nodetype *GetFirst() const { return m_nodeFirst; } + nodetype *GetLast() const { return m_nodeLast; } + size_t GetCount() const { return m_count; } + bool IsEmpty() const { return m_count == 0; } + + void DeleteContents(bool destroy) { m_destroy = destroy; } + bool GetDeleteContents() const { return m_destroy; } + + nodetype *Item(size_t index) const + { + for ( nodetype *current = GetFirst(); current; current = current->GetNext() ) + { + if ( index-- == 0 ) + return current; + } + wxFAIL_MSG( "invalid index in Item()" ); + return NULL; + } + + T *operator[](size_t index) const + { + nodetype *node = Item(index); + return node ? node->GetData() : NULL; + } + + nodetype *DetachNode( nodetype *node ) + { + wxCHECK_MSG( node, NULL, "detaching NULL wxNodeBase" ); + wxCHECK_MSG( node->m_list == this, NULL, + "detaching node which is not from this list" ); + // update the list + nodetype **prevNext = node->GetPrevious() ? &node->GetPrevious()->m_next + : &m_nodeFirst; + nodetype **nextPrev = node->GetNext() ? &node->GetNext()->m_previous + : &m_nodeLast; + *prevNext = node->GetNext(); + *nextPrev = node->GetPrevious(); + m_count--; + // mark the node as not belonging to this list any more + node->m_list = NULL; + return node; + } + + void Erase( nodetype *node ) + { + DeleteNode(node); + } + + bool DeleteNode( nodetype *node ) + { + if ( !DetachNode(node) ) + return false; + DoDeleteNode(node); + return true; + } + + bool DeleteObject( T *object ) + { + for ( nodetype *current = GetFirst(); current; current = current->GetNext() ) + { + if ( current->GetData() == object ) + { + DeleteNode(current); + return true; + } + } + // not found + return false; + } + + nodetype *Find(const T *object) const + { + for ( nodetype *current = GetFirst(); current; current = current->GetNext() ) + { + if ( current->GetData() == object ) + return current; + } + // not found + return NULL; + } + + int IndexOf(const T *object) const + { + int n = 0; + for ( nodetype *current = GetFirst(); current; current = current->GetNext() ) + { + if ( current->GetData() == object ) + return n; + n++; + } + return wxNOT_FOUND; + } + + void Clear() + { + nodetype *current = m_nodeFirst; + while ( current ) + { + nodetype *next = current->GetNext(); + DoDeleteNode(current); + current = next; + } + m_nodeFirst = + m_nodeLast = NULL; + m_count = 0; + } + + void Reverse() + { + nodetype * node = m_nodeFirst; + nodetype* tmp; + while (node) + { + // swap prev and next pointers + tmp = node->m_next; + node->m_next = node->m_previous; + node->m_previous = tmp; + // this is the node that was next before swapping + node = tmp; + } + // swap first and last node + tmp = m_nodeFirst; m_nodeFirst = m_nodeLast; m_nodeLast = tmp; + } + + void DeleteNodes(nodetype* first, nodetype* last) + { + nodetype * node = first; + while (node != last) + { + nodetype* next = node->GetNext(); + DeleteNode(node); + node = next; + } + } + + void ForEach(wxListIterateFunction F) + { + for ( nodetype *current = GetFirst(); current; current = current->GetNext() ) + (*F)(current->GetData()); + } + + T *FirstThat(wxListIterateFunction F) + { + for ( nodetype *current = GetFirst(); current; current = current->GetNext() ) + { + if ( (*F)(current->GetData()) ) + return current->GetData(); + } + return NULL; + } + + T *LastThat(wxListIterateFunction F) + { + for ( nodetype *current = GetLast(); current; current = current->GetPrevious() ) + { + if ( (*F)(current->GetData()) ) + return current->GetData(); + } + return NULL; + } + + /* STL interface */ +public: + typedef size_t size_type; + typedef int difference_type; + typedef T* value_type; + typedef value_type& reference; + typedef const value_type& const_reference; + + class iterator + { + public: + typedef nodetype Node; + typedef iterator itor; + typedef T* value_type; + typedef value_type* ptr_type; + typedef value_type& reference; + + Node* m_node; + Node* m_init; + public: + typedef reference reference_type; + typedef ptr_type pointer_type; + + iterator(Node* node, Node* init) : m_node(node), m_init(init) {} + iterator() : m_node(NULL), m_init(NULL) { } + reference_type operator*() const + { return *m_node->GetDataPtr(); } + // ptrop + itor& operator++() { m_node = m_node->GetNext(); return *this; } + const itor operator++(int) + { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } + itor& operator--() + { + m_node = m_node ? m_node->GetPrevious() : m_init; + return *this; + } + const itor operator--(int) + { + itor tmp = *this; + m_node = m_node ? m_node->GetPrevious() : m_init; + return tmp; + } + bool operator!=(const itor& it) const + { return it.m_node != m_node; } + bool operator==(const itor& it) const + { return it.m_node == m_node; } + }; + class const_iterator + { + public: + typedef nodetype Node; + typedef T* value_type; + typedef const value_type& const_reference; + typedef const_iterator itor; + typedef value_type* ptr_type; + + Node* m_node; + Node* m_init; + public: + typedef const_reference reference_type; + typedef const ptr_type pointer_type; + + const_iterator(Node* node, Node* init) + : m_node(node), m_init(init) { } + const_iterator() : m_node(NULL), m_init(NULL) { } + const_iterator(const iterator& it) + : m_node(it.m_node), m_init(it.m_init) { } + reference_type operator*() const + { return *m_node->GetDataPtr(); } + // ptrop + itor& operator++() { m_node = m_node->GetNext(); return *this; } + const itor operator++(int) + { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } + itor& operator--() + { + m_node = m_node ? m_node->GetPrevious() : m_init; + return *this; + } + const itor operator--(int) + { + itor tmp = *this; + m_node = m_node ? m_node->GetPrevious() : m_init; + return tmp; + } + bool operator!=(const itor& it) const + { return it.m_node != m_node; } + bool operator==(const itor& it) const + { return it.m_node == m_node; } + }; + + class reverse_iterator + { + public: + typedef nodetype Node; + typedef T* value_type; + typedef reverse_iterator itor; + typedef value_type* ptr_type; + typedef value_type& reference; + + Node* m_node; + Node* m_init; + public: + typedef reference reference_type; + typedef ptr_type pointer_type; + + reverse_iterator(Node* node, Node* init) + : m_node(node), m_init(init) { } + reverse_iterator() : m_node(NULL), m_init(NULL) { } + reference_type operator*() const + { return *m_node->GetDataPtr(); } + // ptrop + itor& operator++() + { m_node = m_node->GetPrevious(); return *this; } + const itor operator++(int) + { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } + itor& operator--() + { m_node = m_node ? m_node->GetNext() : m_init; return *this; } + const itor operator--(int) + { + itor tmp = *this; + m_node = m_node ? m_node->GetNext() : m_init; + return tmp; + } + bool operator!=(const itor& it) const + { return it.m_node != m_node; } + bool operator==(const itor& it) const + { return it.m_node == m_node; } + }; + + class const_reverse_iterator + { + public: + typedef nodetype Node; + typedef T* value_type; + typedef const_reverse_iterator itor; + typedef value_type* ptr_type; + typedef const value_type& const_reference; + + Node* m_node; + Node* m_init; + public: + typedef const_reference reference_type; + typedef const ptr_type pointer_type; + + const_reverse_iterator(Node* node, Node* init) + : m_node(node), m_init(init) { } + const_reverse_iterator() : m_node(NULL), m_init(NULL) { } + const_reverse_iterator(const reverse_iterator& it) + : m_node(it.m_node), m_init(it.m_init) { } + reference_type operator*() const + { return *m_node->GetDataPtr(); } + // ptrop + itor& operator++() + { m_node = m_node->GetPrevious(); return *this; } + const itor operator++(int) + { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } + itor& operator--() + { m_node = m_node ? m_node->GetNext() : m_init; return *this;} + const itor operator--(int) + { + itor tmp = *this; + m_node = m_node ? m_node->GetNext() : m_init; + return tmp; + } + bool operator!=(const itor& it) const + { return it.m_node != m_node; } + bool operator==(const itor& it) const + { return it.m_node == m_node; } + }; + + wxEXPLICIT wxDList(size_type n, const_reference v = value_type()) + { assign(n, v); } + wxDList(const const_iterator& first, const const_iterator& last) + { assign(first, last); } + iterator begin() { return iterator(GetFirst(), GetLast()); } + const_iterator begin() const + { return const_iterator(GetFirst(), GetLast()); } + iterator end() { return iterator(NULL, GetLast()); } + const_iterator end() const { return const_iterator(NULL, GetLast()); } + reverse_iterator rbegin() + { return reverse_iterator(GetLast(), GetFirst()); } + const_reverse_iterator rbegin() const + { return const_reverse_iterator(GetLast(), GetFirst()); } + reverse_iterator rend() { return reverse_iterator(NULL, GetFirst()); } + const_reverse_iterator rend() const + { return const_reverse_iterator(NULL, GetFirst()); } + void resize(size_type n, value_type v = value_type()) + { + while (n < size()) + pop_back(); + while (n > size()) + push_back(v); + } + size_type size() const { return GetCount(); } + size_type max_size() const { return INT_MAX; } + bool empty() const { return IsEmpty(); } + reference front() { return *begin(); } + const_reference front() const { return *begin(); } + reference back() { iterator tmp = end(); return *--tmp; } + const_reference back() const { const_iterator tmp = end(); return *--tmp; } + void push_front(const_reference v = value_type()) + { Insert(GetFirst(), v); } + void pop_front() { DeleteNode(GetFirst()); } + void push_back(const_reference v = value_type()) + { Append( v ); } + void pop_back() { DeleteNode(GetLast()); } + void assign(const_iterator first, const const_iterator& last) + { + clear(); + for(; first != last; ++first) + Append(*first); + } + void assign(size_type n, const_reference v = value_type()) + { + clear(); + for(size_type i = 0; i < n; ++i) + Append(v); + } + iterator insert(const iterator& it, const_reference v) + { + if (it == end()) + Append( v ); + else + Insert(it.m_node,v); + iterator itprev(it); + return itprev--; + } + void insert(const iterator& it, size_type n, const_reference v) + { + for(size_type i = 0; i < n; ++i) + Insert(it.m_node, v); + } + void insert(const iterator& it, const_iterator first, const const_iterator& last) + { + for(; first != last; ++first) + Insert(it.m_node, *first); + } + iterator erase(const iterator& it) + { + iterator next = iterator(it.m_node->GetNext(), GetLast()); + DeleteNode(it.m_node); return next; + } + iterator erase(const iterator& first, const iterator& last) + { + iterator next = last; ++next; + DeleteNodes(first.m_node, last.m_node); + return next; + } + void clear() { Clear(); } + void splice(const iterator& it, wxDList& l, const iterator& first, const iterator& last) + { insert(it, first, last); l.erase(first, last); } + void splice(const iterator& it, wxDList& l) + { splice(it, l, l.begin(), l.end() ); } + void splice(const iterator& it, wxDList& l, const iterator& first) + { + iterator tmp = first; ++tmp; + if(it == first || it == tmp) return; + insert(it, *first); + l.erase(first); + } + void remove(const_reference v) + { DeleteObject(v); } + void reverse() + { Reverse(); } + /* void swap(list& l) + { + { size_t t = m_count; m_count = l.m_count; l.m_count = t; } + { bool t = m_destroy; m_destroy = l.m_destroy; l.m_destroy = t; } + { wxNodeBase* t = m_nodeFirst; m_nodeFirst = l.m_nodeFirst; l.m_nodeFirst = t; } + { wxNodeBase* t = m_nodeLast; m_nodeLast = l.m_nodeLast; l.m_nodeLast = t; } + { wxKeyType t = m_keyType; m_keyType = l.m_keyType; l.m_keyType = t; } + } */ +}; + +#endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS + +#endif // _WX_DLIST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dnd.h new file mode 100644 index 0000000000..9d9f2e25ca --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dnd.h @@ -0,0 +1,266 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/dnd.h +// Purpose: Drag and drop classes declarations +// Author: Vadim Zeitlin, Robert Roebling +// Modified by: +// Created: 26.05.99 +// Copyright: (c) wxWidgets Team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DND_H_BASE_ +#define _WX_DND_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_DRAG_AND_DROP + +#include "wx/dataobj.h" +#include "wx/cursor.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// flags for wxDropSource::DoDragDrop() +// +// NB: wxDrag_CopyOnly must be 0 (== FALSE) and wxDrag_AllowMove must be 1 +// (== TRUE) for compatibility with the old DoDragDrop(bool) method! +enum +{ + wxDrag_CopyOnly = 0, // allow only copying + wxDrag_AllowMove = 1, // allow moving (copying is always allowed) + wxDrag_DefaultMove = 3 // the default operation is move, not copy +}; + +// result of wxDropSource::DoDragDrop() call +enum wxDragResult +{ + wxDragError, // error prevented the d&d operation from completing + wxDragNone, // drag target didn't accept the data + wxDragCopy, // the data was successfully copied + wxDragMove, // the data was successfully moved (MSW only) + wxDragLink, // operation is a drag-link + wxDragCancel // the operation was cancelled by user (not an error) +}; + +// return true if res indicates that something was done during a dnd operation, +// i.e. is neither error nor none nor cancel +WXDLLIMPEXP_CORE bool wxIsDragResultOk(wxDragResult res); + +// ---------------------------------------------------------------------------- +// wxDropSource is the object you need to create (and call DoDragDrop on it) +// to initiate a drag-and-drop operation +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropSourceBase +{ +public: + wxDropSourceBase(const wxCursor &cursorCopy = wxNullCursor, + const wxCursor &cursorMove = wxNullCursor, + const wxCursor &cursorStop = wxNullCursor) + : m_cursorCopy(cursorCopy), + m_cursorMove(cursorMove), + m_cursorStop(cursorStop) + { m_data = NULL; } + virtual ~wxDropSourceBase() { } + + // set the data which is transferred by drag and drop + void SetData(wxDataObject& data) + { m_data = &data; } + + wxDataObject *GetDataObject() + { return m_data; } + + // set the icon corresponding to given drag result + void SetCursor(wxDragResult res, const wxCursor& cursor) + { + if ( res == wxDragCopy ) + m_cursorCopy = cursor; + else if ( res == wxDragMove ) + m_cursorMove = cursor; + else + m_cursorStop = cursor; + } + + // start drag action, see enum wxDragResult for return value description + // + // if flags contains wxDrag_AllowMove, moving (and only copying) data is + // allowed, if it contains wxDrag_DefaultMove (which includes the previous + // flag), it is even the default operation + virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly) = 0; + + // override to give feedback depending on the current operation result + // "effect" and return true if you did something, false to let the library + // give the default feedback + virtual bool GiveFeedback(wxDragResult WXUNUSED(effect)) { return false; } + +protected: + const wxCursor& GetCursor(wxDragResult res) const + { + if ( res == wxDragCopy ) + return m_cursorCopy; + else if ( res == wxDragMove ) + return m_cursorMove; + else + return m_cursorStop; + } + + // the data we're dragging + wxDataObject *m_data; + + // the cursors to use for feedback + wxCursor m_cursorCopy, + m_cursorMove, + m_cursorStop; + + wxDECLARE_NO_COPY_CLASS(wxDropSourceBase); +}; + +// ---------------------------------------------------------------------------- +// wxDropTarget should be associated with a window if it wants to be able to +// receive data via drag and drop. +// +// To use this class, you should derive from wxDropTarget and implement +// OnData() pure virtual method. You may also wish to override OnDrop() if you +// want to accept the data only inside some region of the window (this may +// avoid having to copy the data to this application which happens only when +// OnData() is called) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropTargetBase +{ +public: + // ctor takes a pointer to heap-allocated wxDataObject which will be owned + // by wxDropTarget and deleted by it automatically. If you don't give it + // here, you can use SetDataObject() later. + wxDropTargetBase(wxDataObject *dataObject = NULL) + { m_dataObject = dataObject; m_defaultAction = wxDragNone; } + // dtor deletes our data object + virtual ~wxDropTargetBase() + { delete m_dataObject; } + + // get/set the associated wxDataObject + wxDataObject *GetDataObject() const + { return m_dataObject; } + void SetDataObject(wxDataObject *dataObject) + { if (m_dataObject) delete m_dataObject; + m_dataObject = dataObject; } + + // these functions are called when data is moved over position (x, y) and + // may return either wxDragCopy, wxDragMove or wxDragNone depending on + // what would happen if the data were dropped here. + // + // the last parameter is what would happen by default and is determined by + // the platform-specific logic (for example, under Windows it's wxDragCopy + // if Ctrl key is pressed and wxDragMove otherwise) except that it will + // always be wxDragNone if the carried data is in an unsupported format. + + // called when the mouse enters the window (only once until OnLeave()) + virtual wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def) + { return OnDragOver(x, y, def); } + + // called when the mouse moves in the window - shouldn't take long to + // execute or otherwise mouse movement would be too slow + virtual wxDragResult OnDragOver(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), + wxDragResult def) + { return def; } + + // called when mouse leaves the window: might be used to remove the + // feedback which was given in OnEnter() + virtual void OnLeave() { } + + // this function is called when data is dropped at position (x, y) - if it + // returns true, OnData() will be called immediately afterwards which will + // allow to retrieve the data dropped. + virtual bool OnDrop(wxCoord x, wxCoord y) = 0; + + // called after OnDrop() returns TRUE: you will usually just call + // GetData() from here and, probably, also refresh something to update the + // new data and, finally, return the code indicating how did the operation + // complete (returning default value in case of success and wxDragError on + // failure is usually ok) + virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def) = 0; + + // may be called *only* from inside OnData() and will fill m_dataObject + // with the data from the drop source if it returns true + virtual bool GetData() = 0; + + // sets the default action for drag and drop: + // use wxDragMove or wxDragCopy to set deafult action to move or copy + // and use wxDragNone (default) to set default action specified by + // initialization of draging (see wxDropSourceBase::DoDragDrop()) + void SetDefaultAction(wxDragResult action) + { m_defaultAction = action; } + + // returns default action for drag and drop or + // wxDragNone if this not specified + wxDragResult GetDefaultAction() + { return m_defaultAction; } + +protected: + wxDataObject *m_dataObject; + wxDragResult m_defaultAction; + + wxDECLARE_NO_COPY_CLASS(wxDropTargetBase); +}; + +// ---------------------------------------------------------------------------- +// include platform dependent class declarations +// ---------------------------------------------------------------------------- + +#if defined(__WXMSW__) + #include "wx/msw/ole/dropsrc.h" + #include "wx/msw/ole/droptgt.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/dnd.h" +#elif defined(__WXX11__) + #include "wx/x11/dnd.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/dnd.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/dnd.h" +#elif defined(__WXMAC__) + #include "wx/osx/dnd.h" +#elif defined(__WXPM__) + #include "wx/os2/dnd.h" +#endif + +// ---------------------------------------------------------------------------- +// standard wxDropTarget implementations (implemented in common/dobjcmn.cpp) +// ---------------------------------------------------------------------------- + +// A simple wxDropTarget derived class for text data: you only need to +// override OnDropText() to get something working +class WXDLLIMPEXP_CORE wxTextDropTarget : public wxDropTarget +{ +public: + wxTextDropTarget(); + + virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& text) = 0; + + virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def); + +private: + wxDECLARE_NO_COPY_CLASS(wxTextDropTarget); +}; + +// A drop target which accepts files (dragged from File Manager or Explorer) +class WXDLLIMPEXP_CORE wxFileDropTarget : public wxDropTarget +{ +public: + wxFileDropTarget(); + + // parameters are the number of files and the array of file names + virtual bool OnDropFiles(wxCoord x, wxCoord y, + const wxArrayString& filenames) = 0; + + virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def); + +private: + wxDECLARE_NO_COPY_CLASS(wxFileDropTarget); +}; + +#endif // wxUSE_DRAG_AND_DROP + +#endif // _WX_DND_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/docmdi.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/docmdi.h new file mode 100644 index 0000000000..e7dcb7ad02 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/docmdi.h @@ -0,0 +1,100 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/docmdi.h +// Purpose: Frame classes for MDI document/view applications +// Author: Julian Smart +// Created: 01/02/97 +// Copyright: (c) 1997 Julian Smart +// (c) 2010 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DOCMDI_H_ +#define _WX_DOCMDI_H_ + +#include "wx/defs.h" + +#if wxUSE_MDI_ARCHITECTURE + +#include "wx/docview.h" +#include "wx/mdi.h" + +#ifdef __VISUALC6__ + // "non dll-interface class 'wxDocXXXFrameAny<>' used as base interface for + // dll-interface class 'wxDocMDIXXXFrame'" -- this is bogus as the template + // will be DLL-exported but only once it is used as base class here! + #pragma warning (push) + #pragma warning (disable:4275) +#endif + +// Define MDI versions of the doc-view frame classes. Note that we need to +// define them as classes for wxRTTI, otherwise we could simply define them as +// typedefs. + +// ---------------------------------------------------------------------------- +// An MDI document parent frame +// ---------------------------------------------------------------------------- + +typedef + wxDocParentFrameAny wxDocMDIParentFrameBase; + +class WXDLLIMPEXP_CORE wxDocMDIParentFrame : public wxDocMDIParentFrameBase +{ +public: + wxDocMDIParentFrame() : wxDocMDIParentFrameBase() { } + + wxDocMDIParentFrame(wxDocManager *manager, + wxFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + : wxDocMDIParentFrameBase(manager, + parent, id, title, pos, size, style, name) + { + } + +private: + DECLARE_CLASS(wxDocMDIParentFrame) + wxDECLARE_NO_COPY_CLASS(wxDocMDIParentFrame); +}; + +// ---------------------------------------------------------------------------- +// An MDI document child frame +// ---------------------------------------------------------------------------- + +typedef + wxDocChildFrameAny wxDocMDIChildFrameBase; + +class WXDLLIMPEXP_CORE wxDocMDIChildFrame : public wxDocMDIChildFrameBase +{ +public: + wxDocMDIChildFrame() { } + + wxDocMDIChildFrame(wxDocument *doc, + wxView *view, + wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + : wxDocMDIChildFrameBase(doc, view, + parent, id, title, pos, size, style, name) + { + } + +private: + DECLARE_CLASS(wxDocMDIChildFrame) + wxDECLARE_NO_COPY_CLASS(wxDocMDIChildFrame); +}; + +#ifdef __VISUALC6__ + #pragma warning (pop) +#endif + +#endif // wxUSE_MDI_ARCHITECTURE + +#endif // _WX_DOCMDI_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/docview.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/docview.h new file mode 100644 index 0000000000..78bf44d4b4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/docview.h @@ -0,0 +1,1061 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/docview.h +// Purpose: Doc/View classes +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DOCH__ +#define _WX_DOCH__ + +#include "wx/defs.h" + +#if wxUSE_DOC_VIEW_ARCHITECTURE + +#include "wx/list.h" +#include "wx/dlist.h" +#include "wx/string.h" +#include "wx/frame.h" +#include "wx/filehistory.h" +#include "wx/vector.h" + +#if wxUSE_PRINTING_ARCHITECTURE + #include "wx/print.h" +#endif + +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxDocument; +class WXDLLIMPEXP_FWD_CORE wxView; +class WXDLLIMPEXP_FWD_CORE wxDocTemplate; +class WXDLLIMPEXP_FWD_CORE wxDocManager; +class WXDLLIMPEXP_FWD_CORE wxPrintInfo; +class WXDLLIMPEXP_FWD_CORE wxCommandProcessor; +class WXDLLIMPEXP_FWD_BASE wxConfigBase; + +class wxDocChildFrameAnyBase; + +#if wxUSE_STD_IOSTREAM + #include "wx/iosfwrap.h" +#else + #include "wx/stream.h" +#endif + +// Flags for wxDocManager (can be combined). +enum +{ + wxDOC_NEW = 1, + wxDOC_SILENT = 2 +}; + +// Document template flags +enum +{ + wxTEMPLATE_VISIBLE = 1, + wxTEMPLATE_INVISIBLE = 2, + wxDEFAULT_TEMPLATE_FLAGS = wxTEMPLATE_VISIBLE +}; + +#define wxMAX_FILE_HISTORY 9 + +typedef wxVector wxDocVector; +typedef wxVector wxViewVector; +typedef wxVector wxDocTemplateVector; + +class WXDLLIMPEXP_CORE wxDocument : public wxEvtHandler +{ +public: + wxDocument(wxDocument *parent = NULL); + virtual ~wxDocument(); + + // accessors + void SetFilename(const wxString& filename, bool notifyViews = false); + wxString GetFilename() const { return m_documentFile; } + + void SetTitle(const wxString& title) { m_documentTitle = title; } + wxString GetTitle() const { return m_documentTitle; } + + void SetDocumentName(const wxString& name) { m_documentTypeName = name; } + wxString GetDocumentName() const { return m_documentTypeName; } + + // access the flag indicating whether this document had been already saved, + // SetDocumentSaved() is only used internally, don't call it + bool GetDocumentSaved() const { return m_savedYet; } + void SetDocumentSaved(bool saved = true) { m_savedYet = saved; } + + // activate the first view of the document if any + void Activate(); + + // return true if the document hasn't been modified since the last time it + // was saved (implying that it returns false if it was never saved, even if + // the document is not modified) + bool AlreadySaved() const { return !IsModified() && GetDocumentSaved(); } + + virtual bool Close(); + virtual bool Save(); + virtual bool SaveAs(); + virtual bool Revert(); + +#if wxUSE_STD_IOSTREAM + virtual wxSTD ostream& SaveObject(wxSTD ostream& stream); + virtual wxSTD istream& LoadObject(wxSTD istream& stream); +#else + virtual wxOutputStream& SaveObject(wxOutputStream& stream); + virtual wxInputStream& LoadObject(wxInputStream& stream); +#endif + + // Called by wxWidgets + virtual bool OnSaveDocument(const wxString& filename); + virtual bool OnOpenDocument(const wxString& filename); + virtual bool OnNewDocument(); + virtual bool OnCloseDocument(); + + // Prompts for saving if about to close a modified document. Returns true + // if ok to close the document (may have saved in the meantime, or set + // modified to false) + virtual bool OnSaveModified(); + + // if you override, remember to call the default + // implementation (wxDocument::OnChangeFilename) + virtual void OnChangeFilename(bool notifyViews); + + // Called by framework if created automatically by the default document + // manager: gives document a chance to initialise and (usually) create a + // view + virtual bool OnCreate(const wxString& path, long flags); + + // By default, creates a base wxCommandProcessor. + virtual wxCommandProcessor *OnCreateCommandProcessor(); + virtual wxCommandProcessor *GetCommandProcessor() const + { return m_commandProcessor; } + virtual void SetCommandProcessor(wxCommandProcessor *proc) + { m_commandProcessor = proc; } + + // Called after a view is added or removed. The default implementation + // deletes the document if this is there are no more views. + virtual void OnChangedViewList(); + + // Called from OnCloseDocument(), does nothing by default but may be + // overridden. Return value is ignored. + virtual bool DeleteContents(); + + virtual bool Draw(wxDC&); + virtual bool IsModified() const { return m_documentModified; } + virtual void Modify(bool mod); + + virtual bool AddView(wxView *view); + virtual bool RemoveView(wxView *view); + +#ifndef __VISUALC6__ + wxViewVector GetViewsVector() const; +#endif // !__VISUALC6__ + + wxList& GetViews() { return m_documentViews; } + const wxList& GetViews() const { return m_documentViews; } + + wxView *GetFirstView() const; + + virtual void UpdateAllViews(wxView *sender = NULL, wxObject *hint = NULL); + virtual void NotifyClosing(); + + // Remove all views (because we're closing the document) + virtual bool DeleteAllViews(); + + // Other stuff + virtual wxDocManager *GetDocumentManager() const; + virtual wxDocTemplate *GetDocumentTemplate() const + { return m_documentTemplate; } + virtual void SetDocumentTemplate(wxDocTemplate *temp) + { m_documentTemplate = temp; } + + // Get the document name to be shown to the user: the title if there is + // any, otherwise the filename if the document was saved and, finally, + // "unnamed" otherwise + virtual wxString GetUserReadableName() const; + +#if WXWIN_COMPATIBILITY_2_8 + // use GetUserReadableName() instead + wxDEPRECATED_BUT_USED_INTERNALLY( + virtual bool GetPrintableName(wxString& buf) const + ); +#endif // WXWIN_COMPATIBILITY_2_8 + + // Returns a window that can be used as a parent for document-related + // dialogs. Override if necessary. + virtual wxWindow *GetDocumentWindow() const; + + // Returns true if this document is a child document corresponding to a + // part of the parent document and not a disk file as usual. + bool IsChildDocument() const { return m_documentParent != NULL; } + +protected: + wxList m_documentViews; + wxString m_documentFile; + wxString m_documentTitle; + wxString m_documentTypeName; + wxDocTemplate* m_documentTemplate; + bool m_documentModified; + + // if the document parent is non-NULL, it's a pseudo-document corresponding + // to a part of the parent document which can't be saved or loaded + // independently of its parent and is always closed when its parent is + wxDocument* m_documentParent; + + wxCommandProcessor* m_commandProcessor; + bool m_savedYet; + + // Called by OnSaveDocument and OnOpenDocument to implement standard + // Save/Load behaviour. Re-implement in derived class for custom + // behaviour. + virtual bool DoSaveDocument(const wxString& file); + virtual bool DoOpenDocument(const wxString& file); + + // the default implementation of GetUserReadableName() + wxString DoGetUserReadableName() const; + +private: + // list of all documents whose m_documentParent is this one + typedef wxDList DocsList; + DocsList m_childDocuments; + + DECLARE_ABSTRACT_CLASS(wxDocument) + wxDECLARE_NO_COPY_CLASS(wxDocument); +}; + +class WXDLLIMPEXP_CORE wxView: public wxEvtHandler +{ +public: + wxView(); + virtual ~wxView(); + + wxDocument *GetDocument() const { return m_viewDocument; } + virtual void SetDocument(wxDocument *doc); + + wxString GetViewName() const { return m_viewTypeName; } + void SetViewName(const wxString& name) { m_viewTypeName = name; } + + wxWindow *GetFrame() const { return m_viewFrame ; } + void SetFrame(wxWindow *frame) { m_viewFrame = frame; } + + virtual void OnActivateView(bool activate, + wxView *activeView, + wxView *deactiveView); + virtual void OnDraw(wxDC *dc) = 0; + virtual void OnPrint(wxDC *dc, wxObject *info); + virtual void OnUpdate(wxView *sender, wxObject *hint = NULL); + virtual void OnClosingDocument() {} + virtual void OnChangeFilename(); + + // Called by framework if created automatically by the default document + // manager class: gives view a chance to initialise + virtual bool OnCreate(wxDocument *WXUNUSED(doc), long WXUNUSED(flags)) + { return true; } + + // Checks if the view is the last one for the document; if so, asks user + // to confirm save data (if modified). If ok, deletes itself and returns + // true. + virtual bool Close(bool deleteWindow = true); + + // Override to do cleanup/veto close + virtual bool OnClose(bool deleteWindow); + + // A view's window can call this to notify the view it is (in)active. + // The function then notifies the document manager. + virtual void Activate(bool activate); + + wxDocManager *GetDocumentManager() const + { return m_viewDocument->GetDocumentManager(); } + +#if wxUSE_PRINTING_ARCHITECTURE + virtual wxPrintout *OnCreatePrintout(); +#endif + + // implementation only + // ------------------- + + // set the associated frame, it is used to reset its view when we're + // destroyed + void SetDocChildFrame(wxDocChildFrameAnyBase *docChildFrame); + + // get the associated frame, may be NULL during destruction + wxDocChildFrameAnyBase* GetDocChildFrame() const { return m_docChildFrame; } + +protected: + // hook the document into event handlers chain here + virtual bool TryBefore(wxEvent& event); + + wxDocument* m_viewDocument; + wxString m_viewTypeName; + wxWindow* m_viewFrame; + + wxDocChildFrameAnyBase *m_docChildFrame; + +private: + DECLARE_ABSTRACT_CLASS(wxView) + wxDECLARE_NO_COPY_CLASS(wxView); +}; + +// Represents user interface (and other) properties of documents and views +class WXDLLIMPEXP_CORE wxDocTemplate: public wxObject +{ + +friend class WXDLLIMPEXP_FWD_CORE wxDocManager; + +public: + // Associate document and view types. They're for identifying what view is + // associated with what template/document type + wxDocTemplate(wxDocManager *manager, + const wxString& descr, + const wxString& filter, + const wxString& dir, + const wxString& ext, + const wxString& docTypeName, + const wxString& viewTypeName, + wxClassInfo *docClassInfo = NULL, + wxClassInfo *viewClassInfo = NULL, + long flags = wxDEFAULT_TEMPLATE_FLAGS); + + virtual ~wxDocTemplate(); + + // By default, these two member functions dynamically creates document and + // view using dynamic instance construction. Override these if you need a + // different method of construction. + virtual wxDocument *CreateDocument(const wxString& path, long flags = 0); + virtual wxView *CreateView(wxDocument *doc, long flags = 0); + + // Helper method for CreateDocument; also allows you to do your own document + // creation + virtual bool InitDocument(wxDocument* doc, + const wxString& path, + long flags = 0); + + wxString GetDefaultExtension() const { return m_defaultExt; } + wxString GetDescription() const { return m_description; } + wxString GetDirectory() const { return m_directory; } + wxDocManager *GetDocumentManager() const { return m_documentManager; } + void SetDocumentManager(wxDocManager *manager) + { m_documentManager = manager; } + wxString GetFileFilter() const { return m_fileFilter; } + long GetFlags() const { return m_flags; } + virtual wxString GetViewName() const { return m_viewTypeName; } + virtual wxString GetDocumentName() const { return m_docTypeName; } + + void SetFileFilter(const wxString& filter) { m_fileFilter = filter; } + void SetDirectory(const wxString& dir) { m_directory = dir; } + void SetDescription(const wxString& descr) { m_description = descr; } + void SetDefaultExtension(const wxString& ext) { m_defaultExt = ext; } + void SetFlags(long flags) { m_flags = flags; } + + bool IsVisible() const { return (m_flags & wxTEMPLATE_VISIBLE) != 0; } + + wxClassInfo* GetDocClassInfo() const { return m_docClassInfo; } + wxClassInfo* GetViewClassInfo() const { return m_viewClassInfo; } + + virtual bool FileMatchesTemplate(const wxString& path); + +protected: + long m_flags; + wxString m_fileFilter; + wxString m_directory; + wxString m_description; + wxString m_defaultExt; + wxString m_docTypeName; + wxString m_viewTypeName; + wxDocManager* m_documentManager; + + // For dynamic creation of appropriate instances. + wxClassInfo* m_docClassInfo; + wxClassInfo* m_viewClassInfo; + + // Called by CreateDocument and CreateView to create the actual + // document/view object. + // + // By default uses the ClassInfo provided to the constructor. Override + // these functions to provide a different method of creation. + virtual wxDocument *DoCreateDocument(); + virtual wxView *DoCreateView(); + +private: + DECLARE_CLASS(wxDocTemplate) + wxDECLARE_NO_COPY_CLASS(wxDocTemplate); +}; + +// One object of this class may be created in an application, to manage all +// the templates and documents. +class WXDLLIMPEXP_CORE wxDocManager: public wxEvtHandler +{ +public: + // NB: flags are unused, don't pass wxDOC_XXX to this ctor + wxDocManager(long flags = 0, bool initialize = true); + virtual ~wxDocManager(); + + virtual bool Initialize(); + + // Handlers for common user commands + void OnFileClose(wxCommandEvent& event); + void OnFileCloseAll(wxCommandEvent& event); + void OnFileNew(wxCommandEvent& event); + void OnFileOpen(wxCommandEvent& event); + void OnFileRevert(wxCommandEvent& event); + void OnFileSave(wxCommandEvent& event); + void OnFileSaveAs(wxCommandEvent& event); + void OnMRUFile(wxCommandEvent& event); +#if wxUSE_PRINTING_ARCHITECTURE + void OnPrint(wxCommandEvent& event); + void OnPreview(wxCommandEvent& event); + void OnPageSetup(wxCommandEvent& event); +#endif // wxUSE_PRINTING_ARCHITECTURE + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + + // Handlers for UI update commands + void OnUpdateFileOpen(wxUpdateUIEvent& event); + void OnUpdateDisableIfNoDoc(wxUpdateUIEvent& event); + void OnUpdateFileRevert(wxUpdateUIEvent& event); + void OnUpdateFileNew(wxUpdateUIEvent& event); + void OnUpdateFileSave(wxUpdateUIEvent& event); + void OnUpdateFileSaveAs(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + + // called when file format detection didn't work, can be overridden to do + // something in this case + virtual void OnOpenFileFailure() { } + + virtual wxDocument *CreateDocument(const wxString& path, long flags = 0); + + // wrapper around CreateDocument() with a more clear name + wxDocument *CreateNewDocument() + { return CreateDocument(wxString(), wxDOC_NEW); } + + virtual wxView *CreateView(wxDocument *doc, long flags = 0); + virtual void DeleteTemplate(wxDocTemplate *temp, long flags = 0); + virtual bool FlushDoc(wxDocument *doc); + virtual wxDocTemplate *MatchTemplate(const wxString& path); + virtual wxDocTemplate *SelectDocumentPath(wxDocTemplate **templates, + int noTemplates, wxString& path, long flags, bool save = false); + virtual wxDocTemplate *SelectDocumentType(wxDocTemplate **templates, + int noTemplates, bool sort = false); + virtual wxDocTemplate *SelectViewType(wxDocTemplate **templates, + int noTemplates, bool sort = false); + virtual wxDocTemplate *FindTemplateForPath(const wxString& path); + + void AssociateTemplate(wxDocTemplate *temp); + void DisassociateTemplate(wxDocTemplate *temp); + + // Find template from document class info, may return NULL. + wxDocTemplate* FindTemplate(const wxClassInfo* documentClassInfo); + + // Find document from file name, may return NULL. + wxDocument* FindDocumentByPath(const wxString& path) const; + + wxDocument *GetCurrentDocument() const; + + void SetMaxDocsOpen(int n) { m_maxDocsOpen = n; } + int GetMaxDocsOpen() const { return m_maxDocsOpen; } + + // Add and remove a document from the manager's list + void AddDocument(wxDocument *doc); + void RemoveDocument(wxDocument *doc); + + // closes all currently open documents + bool CloseDocuments(bool force = true); + + // closes the specified document + bool CloseDocument(wxDocument* doc, bool force = false); + + // Clear remaining documents and templates + bool Clear(bool force = true); + + // Views or windows should inform the document manager + // when a view is going in or out of focus + virtual void ActivateView(wxView *view, bool activate = true); + virtual wxView *GetCurrentView() const { return m_currentView; } + + // This method tries to find an active view harder than GetCurrentView(): + // if the latter is NULL, it also checks if we don't have just a single + // view and returns it then. + wxView *GetAnyUsableView() const; + + +#ifndef __VISUALC6__ + wxDocVector GetDocumentsVector() const; + wxDocTemplateVector GetTemplatesVector() const; +#endif // !__VISUALC6__ + + wxList& GetDocuments() { return m_docs; } + wxList& GetTemplates() { return m_templates; } + + // Return the default name for a new document (by default returns strings + // in the form "unnamed " but can be overridden) + virtual wxString MakeNewDocumentName(); + + // Make a frame title (override this to do something different) + virtual wxString MakeFrameTitle(wxDocument* doc); + + virtual wxFileHistory *OnCreateFileHistory(); + virtual wxFileHistory *GetFileHistory() const { return m_fileHistory; } + + // File history management + virtual void AddFileToHistory(const wxString& file); + virtual void RemoveFileFromHistory(size_t i); + virtual size_t GetHistoryFilesCount() const; + virtual wxString GetHistoryFile(size_t i) const; + virtual void FileHistoryUseMenu(wxMenu *menu); + virtual void FileHistoryRemoveMenu(wxMenu *menu); +#if wxUSE_CONFIG + virtual void FileHistoryLoad(const wxConfigBase& config); + virtual void FileHistorySave(wxConfigBase& config); +#endif // wxUSE_CONFIG + + virtual void FileHistoryAddFilesToMenu(); + virtual void FileHistoryAddFilesToMenu(wxMenu* menu); + + wxString GetLastDirectory() const; + void SetLastDirectory(const wxString& dir) { m_lastDirectory = dir; } + + // Get the current document manager + static wxDocManager* GetDocumentManager() { return sm_docManager; } + +#if wxUSE_PRINTING_ARCHITECTURE + wxPageSetupDialogData& GetPageSetupDialogData() + { return m_pageSetupDialogData; } + const wxPageSetupDialogData& GetPageSetupDialogData() const + { return m_pageSetupDialogData; } +#endif // wxUSE_PRINTING_ARCHITECTURE + +#if WXWIN_COMPATIBILITY_2_8 + // deprecated, override GetDefaultName() instead + wxDEPRECATED_BUT_USED_INTERNALLY( + virtual bool MakeDefaultName(wxString& buf) + ); +#endif + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated, use GetHistoryFilesCount() instead + wxDEPRECATED( size_t GetNoHistoryFiles() const ); +#endif // WXWIN_COMPATIBILITY_2_6 + + +protected: + // Called when a file selected from the MRU list doesn't exist any more. + // The default behaviour is to remove the file from the MRU and notify the + // user about it but this method can be overridden to customize it. + virtual void OnMRUFileNotExist(unsigned n, const wxString& filename); + + // Open the MRU file with the given index in our associated file history. + void DoOpenMRUFile(unsigned n); +#if wxUSE_PRINTING_ARCHITECTURE + virtual wxPreviewFrame* CreatePreviewFrame(wxPrintPreviewBase* preview, + wxWindow *parent, + const wxString& title); +#endif // wxUSE_PRINTING_ARCHITECTURE + + // hook the currently active view into event handlers chain here + virtual bool TryBefore(wxEvent& event); + + // return the command processor for the current document, if any + wxCommandProcessor *GetCurrentCommandProcessor() const; + + int m_defaultDocumentNameCounter; + int m_maxDocsOpen; + wxList m_docs; + wxList m_templates; + wxView* m_currentView; + wxFileHistory* m_fileHistory; + wxString m_lastDirectory; + static wxDocManager* sm_docManager; + +#if wxUSE_PRINTING_ARCHITECTURE + wxPageSetupDialogData m_pageSetupDialogData; +#endif // wxUSE_PRINTING_ARCHITECTURE + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxDocManager) + wxDECLARE_NO_COPY_CLASS(wxDocManager); +}; + +#if WXWIN_COMPATIBILITY_2_6 +inline size_t wxDocManager::GetNoHistoryFiles() const +{ + return GetHistoryFilesCount(); +} +#endif // WXWIN_COMPATIBILITY_2_6 + +// ---------------------------------------------------------------------------- +// Base class for child frames -- this is what wxView renders itself into +// +// Notice that this is a mix-in class so it doesn't derive from wxWindow, only +// wxDocChildFrameAny does +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDocChildFrameAnyBase +{ +public: + // default ctor, use Create() after it + wxDocChildFrameAnyBase() + { + m_childDocument = NULL; + m_childView = NULL; + m_win = NULL; + m_lastEvent = NULL; + } + + // full ctor equivalent to using the default one and Create() + wxDocChildFrameAnyBase(wxDocument *doc, wxView *view, wxWindow *win) + { + Create(doc, view, win); + } + + // method which must be called for an object created using the default ctor + // + // note that it returns bool just for consistency with Create() methods in + // other classes, we never return false from here + bool Create(wxDocument *doc, wxView *view, wxWindow *win) + { + m_childDocument = doc; + m_childView = view; + m_win = win; + + if ( view ) + view->SetDocChildFrame(this); + + return true; + } + + // dtor doesn't need to be virtual, an object should never be destroyed via + // a pointer to this class + ~wxDocChildFrameAnyBase() + { + // prevent the view from deleting us if we're being deleted directly + // (and not via Close() + Destroy()) + if ( m_childView ) + m_childView->SetDocChildFrame(NULL); + } + + wxDocument *GetDocument() const { return m_childDocument; } + wxView *GetView() const { return m_childView; } + void SetDocument(wxDocument *doc) { m_childDocument = doc; } + void SetView(wxView *view) { m_childView = view; } + + wxWindow *GetWindow() const { return m_win; } + + // implementation only + + // Check if this event had been just processed in this frame. + bool HasAlreadyProcessed(wxEvent& event) const + { + return m_lastEvent == &event; + } + +protected: + // we're not a wxEvtHandler but we provide this wxEvtHandler-like function + // which is called from TryBefore() of the derived classes to give our view + // a chance to process the message before the frame event handlers are used + bool TryProcessEvent(wxEvent& event); + + // called from EVT_CLOSE handler in the frame: check if we can close and do + // cleanup if so; veto the event otherwise + bool CloseView(wxCloseEvent& event); + + + wxDocument* m_childDocument; + wxView* m_childView; + + // the associated window: having it here is not terribly elegant but it + // allows us to avoid having any virtual functions in this class + wxWindow* m_win; + +private: + // Pointer to the last processed event used to avoid sending the same event + // twice to wxDocManager, from here and from wxDocParentFrameAnyBase. + wxEvent* m_lastEvent; + + wxDECLARE_NO_COPY_CLASS(wxDocChildFrameAnyBase); +}; + +// ---------------------------------------------------------------------------- +// Template implementing child frame concept using the given wxFrame-like class +// +// This is used to define wxDocChildFrame and wxDocMDIChildFrame: ChildFrame is +// a wxFrame or wxMDIChildFrame (although in theory it could be any wxWindow- +// derived class as long as it provided a ctor with the same signature as +// wxFrame and OnActivate() method) and ParentFrame is either wxFrame or +// wxMDIParentFrame. +// ---------------------------------------------------------------------------- + +template +class WXDLLIMPEXP_CORE wxDocChildFrameAny : public ChildFrame, + public wxDocChildFrameAnyBase +{ +public: + typedef ChildFrame BaseClass; + + // default ctor, use Create after it + wxDocChildFrameAny() { } + + // ctor for a frame showing the given view of the specified document + wxDocChildFrameAny(wxDocument *doc, + wxView *view, + ParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Create(doc, view, parent, id, title, pos, size, style, name); + } + + bool Create(wxDocument *doc, + wxView *view, + ParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + if ( !wxDocChildFrameAnyBase::Create(doc, view, this) ) + return false; + + if ( !BaseClass::Create(parent, id, title, pos, size, style, name) ) + return false; + + this->Connect(wxEVT_ACTIVATE, + wxActivateEventHandler(wxDocChildFrameAny::OnActivate)); + this->Connect(wxEVT_CLOSE_WINDOW, + wxCloseEventHandler(wxDocChildFrameAny::OnCloseWindow)); + + return true; + } + + virtual bool Destroy() + { + // FIXME: why exactly do we do this? to avoid activation events during + // destructions maybe? + m_childView = NULL; + return BaseClass::Destroy(); + } + +protected: + // hook the child view into event handlers chain here + virtual bool TryBefore(wxEvent& event) + { + return TryProcessEvent(event) || BaseClass::TryBefore(event); + } + +private: + void OnActivate(wxActivateEvent& event) + { + BaseClass::OnActivate(event); + + if ( m_childView ) + m_childView->Activate(event.GetActive()); + } + + void OnCloseWindow(wxCloseEvent& event) + { + if ( CloseView(event) ) + Destroy(); + //else: vetoed + } + + wxDECLARE_NO_COPY_TEMPLATE_CLASS_2(wxDocChildFrameAny, + ChildFrame, ParentFrame); +}; + +// ---------------------------------------------------------------------------- +// A default child frame: we need to define it as a class just for wxRTTI, +// otherwise we could simply typedef it +// ---------------------------------------------------------------------------- + +#ifdef __VISUALC6__ + // "non dll-interface class 'wxDocChildFrameAny<>' used as base interface + // for dll-interface class 'wxDocChildFrame'" -- this is bogus as the + // template will be DLL-exported but only once it is used as base class + // here! + #pragma warning (push) + #pragma warning (disable:4275) +#endif + +typedef wxDocChildFrameAny wxDocChildFrameBase; + +class WXDLLIMPEXP_CORE wxDocChildFrame : public wxDocChildFrameBase +{ +public: + wxDocChildFrame() + { + } + + wxDocChildFrame(wxDocument *doc, + wxView *view, + wxFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + : wxDocChildFrameBase(doc, view, + parent, id, title, pos, size, style, name) + { + } + + bool Create(wxDocument *doc, + wxView *view, + wxFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + return wxDocChildFrameBase::Create + ( + doc, view, + parent, id, title, pos, size, style, name + ); + } + +private: + DECLARE_CLASS(wxDocChildFrame) + wxDECLARE_NO_COPY_CLASS(wxDocChildFrame); +}; + +// ---------------------------------------------------------------------------- +// wxDocParentFrame and related classes. +// +// As with wxDocChildFrame we define a template base class used by both normal +// and MDI versions +// ---------------------------------------------------------------------------- + +// Base class containing type-independent code of wxDocParentFrameAny +// +// Similarly to wxDocChildFrameAnyBase, this class is a mix-in and doesn't +// derive from wxWindow. +class WXDLLIMPEXP_CORE wxDocParentFrameAnyBase +{ +public: + wxDocParentFrameAnyBase(wxWindow* frame) + : m_frame(frame) + { + m_docManager = NULL; + } + + wxDocManager *GetDocumentManager() const { return m_docManager; } + +protected: + // This is similar to wxDocChildFrameAnyBase method with the same name: + // while we're not an event handler ourselves and so can't override + // TryBefore(), we provide a helper that the derived template class can use + // from its TryBefore() implementation. + bool TryProcessEvent(wxEvent& event); + + wxWindow* const m_frame; + wxDocManager *m_docManager; + + wxDECLARE_NO_COPY_CLASS(wxDocParentFrameAnyBase); +}; + +// This is similar to wxDocChildFrameAny and is used to provide common +// implementation for both wxDocParentFrame and wxDocMDIParentFrame +template +class WXDLLIMPEXP_CORE wxDocParentFrameAny : public BaseFrame, + public wxDocParentFrameAnyBase +{ +public: + wxDocParentFrameAny() : wxDocParentFrameAnyBase(this) { } + wxDocParentFrameAny(wxDocManager *manager, + wxFrame *frame, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + : wxDocParentFrameAnyBase(this) + { + Create(manager, frame, id, title, pos, size, style, name); + } + + bool Create(wxDocManager *manager, + wxFrame *frame, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + m_docManager = manager; + + if ( !BaseFrame::Create(frame, id, title, pos, size, style, name) ) + return false; + + this->Connect(wxID_EXIT, wxEVT_MENU, + wxCommandEventHandler(wxDocParentFrameAny::OnExit)); + this->Connect(wxEVT_CLOSE_WINDOW, + wxCloseEventHandler(wxDocParentFrameAny::OnCloseWindow)); + + return true; + } + +protected: + // hook the document manager into event handling chain here + virtual bool TryBefore(wxEvent& event) + { + // It is important to send the event to the base class first as + // wxMDIParentFrame overrides its TryBefore() to send the menu events + // to the currently active child frame and the child must get them + // before our own TryProcessEvent() is executed, not afterwards. + return BaseFrame::TryBefore(event) || TryProcessEvent(event); + } + +private: + void OnExit(wxCommandEvent& WXUNUSED(event)) + { + this->Close(); + } + + void OnCloseWindow(wxCloseEvent& event) + { + if ( m_docManager && !m_docManager->Clear(!event.CanVeto()) ) + { + // The user decided not to close finally, abort. + event.Veto(); + } + else + { + // Just skip the event, base class handler will destroy the window. + event.Skip(); + } + } + + + wxDECLARE_NO_COPY_CLASS(wxDocParentFrameAny); +}; + +typedef wxDocParentFrameAny wxDocParentFrameBase; + +class WXDLLIMPEXP_CORE wxDocParentFrame : public wxDocParentFrameBase +{ +public: + wxDocParentFrame() : wxDocParentFrameBase() { } + + wxDocParentFrame(wxDocManager *manager, + wxFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + : wxDocParentFrameBase(manager, + parent, id, title, pos, size, style, name) + { + } + + bool Create(wxDocManager *manager, + wxFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + return wxDocParentFrameBase::Create(manager, + parent, id, title, + pos, size, style, name); + } + +private: + DECLARE_CLASS(wxDocParentFrame) + wxDECLARE_NO_COPY_CLASS(wxDocParentFrame); +}; + +#ifdef __VISUALC6__ + // reenable warning 4275 + #pragma warning (pop) +#endif + +// ---------------------------------------------------------------------------- +// Provide simple default printing facilities +// ---------------------------------------------------------------------------- + +#if wxUSE_PRINTING_ARCHITECTURE +class WXDLLIMPEXP_CORE wxDocPrintout : public wxPrintout +{ +public: + wxDocPrintout(wxView *view = NULL, const wxString& title = wxString()); + + // implement wxPrintout methods + virtual bool OnPrintPage(int page); + virtual bool HasPage(int page); + virtual bool OnBeginDocument(int startPage, int endPage); + virtual void GetPageInfo(int *minPage, int *maxPage, + int *selPageFrom, int *selPageTo); + + virtual wxView *GetView() { return m_printoutView; } + +protected: + wxView* m_printoutView; + +private: + DECLARE_DYNAMIC_CLASS(wxDocPrintout) + wxDECLARE_NO_COPY_CLASS(wxDocPrintout); +}; +#endif // wxUSE_PRINTING_ARCHITECTURE + +// For compatibility with existing file formats: +// converts from/to a stream to/from a temporary file. +#if wxUSE_STD_IOSTREAM +bool WXDLLIMPEXP_CORE +wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream); +bool WXDLLIMPEXP_CORE +wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename); +#else +bool WXDLLIMPEXP_CORE +wxTransferFileToStream(const wxString& filename, wxOutputStream& stream); +bool WXDLLIMPEXP_CORE +wxTransferStreamToFile(wxInputStream& stream, const wxString& filename); +#endif // wxUSE_STD_IOSTREAM + + +// these flags are not used anywhere by wxWidgets and kept only for an unlikely +// case of existing user code using them for its own purposes +#if WXWIN_COMPATIBILITY_2_8 +enum +{ + wxDOC_SDI = 1, + wxDOC_MDI, + wxDEFAULT_DOCMAN_FLAGS = wxDOC_SDI +}; +#endif // WXWIN_COMPATIBILITY_2_8 + +#ifndef __VISUALC6__ +inline wxViewVector wxDocument::GetViewsVector() const +{ + return m_documentViews.AsVector(); +} + +inline wxDocVector wxDocManager::GetDocumentsVector() const +{ + return m_docs.AsVector(); +} + +inline wxDocTemplateVector wxDocManager::GetTemplatesVector() const +{ + return m_templates.AsVector(); +} +#endif // !__VISUALC6__ + +#endif // wxUSE_DOC_VIEW_ARCHITECTURE + +#endif // _WX_DOCH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dragimag.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dragimag.h new file mode 100644 index 0000000000..4143ca8898 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dragimag.h @@ -0,0 +1,53 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dragimag.h +// Purpose: wxDragImage base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DRAGIMAG_H_BASE_ +#define _WX_DRAGIMAG_H_BASE_ + +#if wxUSE_DRAGIMAGE + +class WXDLLIMPEXP_FWD_CORE wxRect; +class WXDLLIMPEXP_FWD_CORE wxMemoryDC; +class WXDLLIMPEXP_FWD_CORE wxDC; + +#if defined(__WXMSW__) +# if defined(__WXUNIVERSAL__) +# include "wx/generic/dragimgg.h" +# define wxDragImage wxGenericDragImage +# else +# include "wx/msw/dragimag.h" +# endif + +#elif defined(__WXMOTIF__) +# include "wx/generic/dragimgg.h" +# define wxDragImage wxGenericDragImage + +#elif defined(__WXGTK__) +# include "wx/generic/dragimgg.h" +# define wxDragImage wxGenericDragImage + +#elif defined(__WXX11__) +# include "wx/generic/dragimgg.h" +# define wxDragImage wxGenericDragImage + +#elif defined(__WXMAC__) +# include "wx/generic/dragimgg.h" +# define wxDragImage wxGenericDragImage + +#elif defined(__WXPM__) +# include "wx/generic/dragimgg.h" +# define wxDragImage wxGenericDragImage + +#endif + +#endif // wxUSE_DRAGIMAGE + +#endif + // _WX_DRAGIMAG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dvrenderers.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dvrenderers.h new file mode 100644 index 0000000000..3f623cf6a6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dvrenderers.h @@ -0,0 +1,445 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/dvrenderers.h +// Purpose: Declare all wxDataViewCtrl classes +// Author: Robert Roebling, Vadim Zeitlin +// Created: 2009-11-08 (extracted from wx/dataview.h) +// Copyright: (c) 2006 Robert Roebling +// (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DVRENDERERS_H_ +#define _WX_DVRENDERERS_H_ + +/* + Note about the structure of various headers: they're organized in a more + complicated way than usual because of the various dependencies which are + different for different ports. In any case the only public header, i.e. the + one which can be included directly is wx/dataview.h. It, in turn, includes + this one to define all the renderer classes. + + We define the base wxDataViewRendererBase class first and then include a + port-dependent wx/xxx/dvrenderer.h which defines wxDataViewRenderer itself. + After this we can define wxDataViewRendererCustomBase (and maybe in the + future base classes for other renderers if the need arises, i.e. if there + is any non-trivial code or API which it makes sense to keep in common code) + and include wx/xxx/dvrenderers.h (notice the plural) which defines all the + rest of the renderer classes. + */ + +class WXDLLIMPEXP_FWD_ADV wxDataViewCustomRenderer; + +// ---------------------------------------------------------------------------- +// wxDataViewIconText: helper class used by wxDataViewIconTextRenderer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewIconText : public wxObject +{ +public: + wxDataViewIconText( const wxString &text = wxEmptyString, + const wxIcon& icon = wxNullIcon ) + : m_text(text), + m_icon(icon) + { } + + wxDataViewIconText( const wxDataViewIconText &other ) + : wxObject(), + m_text(other.m_text), + m_icon(other.m_icon) + { } + + void SetText( const wxString &text ) { m_text = text; } + wxString GetText() const { return m_text; } + void SetIcon( const wxIcon &icon ) { m_icon = icon; } + const wxIcon &GetIcon() const { return m_icon; } + + bool IsSameAs(const wxDataViewIconText& other) const + { + return m_text == other.m_text && m_icon.IsSameAs(other.m_icon); + } + + bool operator==(const wxDataViewIconText& other) const + { + return IsSameAs(other); + } + + bool operator!=(const wxDataViewIconText& other) const + { + return !IsSameAs(other); + } + +private: + wxString m_text; + wxIcon m_icon; + + DECLARE_DYNAMIC_CLASS(wxDataViewIconText) +}; + +DECLARE_VARIANT_OBJECT_EXPORTED(wxDataViewIconText, WXDLLIMPEXP_ADV) + +// ---------------------------------------------------------------------------- +// wxDataViewRendererBase +// ---------------------------------------------------------------------------- + +enum wxDataViewCellMode +{ + wxDATAVIEW_CELL_INERT, + wxDATAVIEW_CELL_ACTIVATABLE, + wxDATAVIEW_CELL_EDITABLE +}; + +enum wxDataViewCellRenderState +{ + wxDATAVIEW_CELL_SELECTED = 1, + wxDATAVIEW_CELL_PRELIT = 2, + wxDATAVIEW_CELL_INSENSITIVE = 4, + wxDATAVIEW_CELL_FOCUSED = 8 +}; + +class WXDLLIMPEXP_ADV wxDataViewRendererBase: public wxObject +{ +public: + wxDataViewRendererBase( const wxString &varianttype, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int alignment = wxDVR_DEFAULT_ALIGNMENT ); + virtual ~wxDataViewRendererBase(); + + virtual bool Validate( wxVariant& WXUNUSED(value) ) + { return true; } + + void SetOwner( wxDataViewColumn *owner ) { m_owner = owner; } + wxDataViewColumn* GetOwner() const { return m_owner; } + + // renderer value and attributes: SetValue() and SetAttr() are called + // before a cell is rendered using this renderer + virtual bool SetValue(const wxVariant& value) = 0; + virtual bool GetValue(wxVariant& value) const = 0; + + virtual void SetAttr(const wxDataViewItemAttr& WXUNUSED(attr)) { } + + virtual void SetEnabled(bool WXUNUSED(enabled)) { } + + wxString GetVariantType() const { return m_variantType; } + + // helper that calls SetValue and SetAttr: + void PrepareForItem(const wxDataViewModel *model, + const wxDataViewItem& item, unsigned column); + + // renderer properties: + virtual void SetMode( wxDataViewCellMode mode ) = 0; + virtual wxDataViewCellMode GetMode() const = 0; + + // NOTE: Set/GetAlignment do not take/return a wxAlignment enum but + // rather an "int"; that's because for rendering cells it's allowed + // to combine alignment flags (e.g. wxALIGN_LEFT|wxALIGN_BOTTOM) + virtual void SetAlignment( int align ) = 0; + virtual int GetAlignment() const = 0; + + // enable or disable (if called with wxELLIPSIZE_NONE) replacing parts of + // the item text (hence this only makes sense for renderers showing + // text...) with ellipsis in order to make it fit the column width + virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE) = 0; + void DisableEllipsize() { EnableEllipsize(wxELLIPSIZE_NONE); } + + virtual wxEllipsizeMode GetEllipsizeMode() const = 0; + + // in-place editing + virtual bool HasEditorCtrl() const + { return false; } + virtual wxWindow* CreateEditorCtrl(wxWindow * WXUNUSED(parent), + wxRect WXUNUSED(labelRect), + const wxVariant& WXUNUSED(value)) + { return NULL; } + virtual bool GetValueFromEditorCtrl(wxWindow * WXUNUSED(editor), + wxVariant& WXUNUSED(value)) + { return false; } + + virtual bool StartEditing( const wxDataViewItem &item, wxRect labelRect ); + virtual void CancelEditing(); + virtual bool FinishEditing(); + + wxWindow *GetEditorCtrl() { return m_editorCtrl; } + + virtual bool IsCustomRenderer() const { return false; } + + +protected: + // Called from {Cancel,Finish}Editing() to cleanup m_editorCtrl + void DestroyEditControl(); + + // Return the alignment of this renderer if it's specified (i.e. has value + // different from the default wxDVR_DEFAULT_ALIGNMENT) or the alignment of + // the column it is used for otherwise. + // + // Unlike GetAlignment(), this always returns a valid combination of + // wxALIGN_XXX flags (although possibly wxALIGN_NOT) and never returns + // wxDVR_DEFAULT_ALIGNMENT. + int GetEffectiveAlignment() const; + + wxString m_variantType; + wxDataViewColumn *m_owner; + wxWeakRef m_editorCtrl; + wxDataViewItem m_item; // for m_editorCtrl + + // internal utility, may be used anywhere the window associated with the + // renderer is required + wxDataViewCtrl* GetView() const; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase) +}; + +// include the real wxDataViewRenderer declaration for the native ports +#ifdef wxHAS_GENERIC_DATAVIEWCTRL + // in the generic implementation there is no real wxDataViewRenderer, all + // renderers are custom so it's the same as wxDataViewCustomRenderer and + // wxDataViewCustomRendererBase derives from wxDataViewRendererBase directly + // + // this is a rather ugly hack but unfortunately it just doesn't seem to be + // possible to have the same class hierarchy in all ports and avoid + // duplicating the entire wxDataViewCustomRendererBase in the generic + // wxDataViewRenderer class (well, we could use a mix-in but this would + // make classes hierarchy non linear and arguably even more complex) + #define wxDataViewCustomRendererRealBase wxDataViewRendererBase +#else + #if defined(__WXGTK20__) + #include "wx/gtk/dvrenderer.h" + #elif defined(__WXMAC__) + #include "wx/osx/dvrenderer.h" + #else + #error "unknown native wxDataViewCtrl implementation" + #endif + #define wxDataViewCustomRendererRealBase wxDataViewRenderer +#endif + +// ---------------------------------------------------------------------------- +// wxDataViewCustomRendererBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewCustomRendererBase + : public wxDataViewCustomRendererRealBase +{ +public: + // Constructor must specify the usual renderer parameters which we simply + // pass to the base class + wxDataViewCustomRendererBase(const wxString& varianttype = "string", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT) + : wxDataViewCustomRendererRealBase(varianttype, mode, align) + { + } + + + // Render the item using the current value (returned by GetValue()). + virtual bool Render(wxRect cell, wxDC *dc, int state) = 0; + + // Return the size of the item appropriate to its current value. + virtual wxSize GetSize() const = 0; + + // Define virtual function which are called when a key is pressed on the + // item, clicked or the user starts to drag it: by default they all simply + // return false indicating that the events are not handled + + virtual bool ActivateCell(const wxRect& cell, + wxDataViewModel *model, + const wxDataViewItem & item, + unsigned int col, + const wxMouseEvent* mouseEvent); + + // Deprecated, use (and override) ActivateCell() instead + wxDEPRECATED_BUT_USED_INTERNALLY_INLINE( + virtual bool Activate(wxRect WXUNUSED(cell), + wxDataViewModel *WXUNUSED(model), + const wxDataViewItem & WXUNUSED(item), + unsigned int WXUNUSED(col)), + return false; ) + + // Deprecated, use (and override) ActivateCell() instead + wxDEPRECATED_BUT_USED_INTERNALLY_INLINE( + virtual bool LeftClick(wxPoint WXUNUSED(cursor), + wxRect WXUNUSED(cell), + wxDataViewModel *WXUNUSED(model), + const wxDataViewItem & WXUNUSED(item), + unsigned int WXUNUSED(col)), + return false; ) + + virtual bool StartDrag(const wxPoint& WXUNUSED(cursor), + const wxRect& WXUNUSED(cell), + wxDataViewModel *WXUNUSED(model), + const wxDataViewItem & WXUNUSED(item), + unsigned int WXUNUSED(col) ) + { return false; } + + + // Helper which can be used by Render() implementation in the derived + // classes: it will draw the text in the same manner as the standard + // renderers do. + virtual void RenderText(const wxString& text, + int xoffset, + wxRect cell, + wxDC *dc, + int state); + + + // Override the base class virtual method to simply store the attribute so + // that it can be accessed using GetAttr() from Render() if needed. + virtual void SetAttr(const wxDataViewItemAttr& attr) { m_attr = attr; } + const wxDataViewItemAttr& GetAttr() const { return m_attr; } + + // Store the enabled state of the item so that it can be accessed from + // Render() via GetEnabled() if needed. + virtual void SetEnabled(bool enabled) { m_enabled = enabled; } + bool GetEnabled() const { return m_enabled; } + + + // Implementation only from now on + + // Retrieve the DC to use for drawing. This is implemented in derived + // platform-specific classes. + virtual wxDC *GetDC() = 0; + + // To draw background use the background colour in wxDataViewItemAttr + virtual void RenderBackground(wxDC* dc, const wxRect& rect); + + // Prepare DC to use attributes and call Render(). + void WXCallRender(wxRect rect, wxDC *dc, int state); + + virtual bool IsCustomRenderer() const { return true; } + +protected: + // helper for GetSize() implementations, respects attributes + wxSize GetTextExtent(const wxString& str) const; + +private: + wxDataViewItemAttr m_attr; + bool m_enabled; + + wxDECLARE_NO_COPY_CLASS(wxDataViewCustomRendererBase); +}; + +// include the declaration of all the other renderers to get the real +// wxDataViewCustomRenderer from which we need to inherit below +#ifdef wxHAS_GENERIC_DATAVIEWCTRL + // because of the different renderer classes hierarchy in the generic + // version, as explained above, we can include the header defining + // wxDataViewRenderer only here and not before wxDataViewCustomRendererBase + // declaration as for the native ports + #include "wx/generic/dvrenderer.h" + #include "wx/generic/dvrenderers.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/dvrenderers.h" +#elif defined(__WXMAC__) + #include "wx/osx/dvrenderers.h" +#else + #error "unknown native wxDataViewCtrl implementation" +#endif + +// ---------------------------------------------------------------------------- +// wxDataViewSpinRenderer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewSpinRenderer: public wxDataViewCustomRenderer +{ +public: + wxDataViewSpinRenderer( int min, int max, + wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, + int alignment = wxDVR_DEFAULT_ALIGNMENT ); + virtual bool HasEditorCtrl() const { return true; } + virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); + virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ); + virtual bool Render( wxRect rect, wxDC *dc, int state ); + virtual wxSize GetSize() const; + virtual bool SetValue( const wxVariant &value ); + virtual bool GetValue( wxVariant &value ) const; + +private: + long m_data; + long m_min,m_max; +}; + +#if defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(__WXOSX_CARBON__) + +// ---------------------------------------------------------------------------- +// wxDataViewChoiceRenderer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewChoiceRenderer: public wxDataViewCustomRenderer +{ +public: + wxDataViewChoiceRenderer( const wxArrayString &choices, + wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, + int alignment = wxDVR_DEFAULT_ALIGNMENT ); + virtual bool HasEditorCtrl() const { return true; } + virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); + virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ); + virtual bool Render( wxRect rect, wxDC *dc, int state ); + virtual wxSize GetSize() const; + virtual bool SetValue( const wxVariant &value ); + virtual bool GetValue( wxVariant &value ) const; + + wxString GetChoice(size_t index) const { return m_choices[index]; } + const wxArrayString& GetChoices() const { return m_choices; } + +private: + wxArrayString m_choices; + wxString m_data; +}; + +// ---------------------------------------------------------------------------- +// wxDataViewChoiceByIndexRenderer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewChoiceByIndexRenderer: public wxDataViewChoiceRenderer +{ +public: + wxDataViewChoiceByIndexRenderer( const wxArrayString &choices, + wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, + int alignment = wxDVR_DEFAULT_ALIGNMENT ); + + virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); + virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ); + + virtual bool SetValue( const wxVariant &value ); + virtual bool GetValue( wxVariant &value ) const; +}; + + +#endif // generic or Carbon versions + +#if defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(__WXGTK__) + +// ---------------------------------------------------------------------------- +// wxDataViewDateRenderer +// ---------------------------------------------------------------------------- + +#if wxUSE_DATEPICKCTRL +class WXDLLIMPEXP_ADV wxDataViewDateRenderer: public wxDataViewCustomRenderer +{ +public: + wxDataViewDateRenderer(const wxString &varianttype = wxT("datetime"), + wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, + int align = wxDVR_DEFAULT_ALIGNMENT); + + virtual bool HasEditorCtrl() const { return true; } + virtual wxWindow *CreateEditorCtrl(wxWindow *parent, wxRect labelRect, const wxVariant &value); + virtual bool GetValueFromEditorCtrl(wxWindow* editor, wxVariant &value); + virtual bool SetValue(const wxVariant &value); + virtual bool GetValue(wxVariant& value) const; + virtual bool Render( wxRect cell, wxDC *dc, int state ); + virtual wxSize GetSize() const; + +private: + wxDateTime m_date; +}; +#else // !wxUSE_DATEPICKCTRL +typedef wxDataViewTextRenderer wxDataViewDateRenderer; +#endif + +#endif // generic or GTK+ versions + +// this class is obsolete, its functionality was merged in +// wxDataViewTextRenderer itself now, don't use it any more +#define wxDataViewTextRendererAttr wxDataViewTextRenderer + +#endif // _WX_DVRENDERERS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dynarray.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dynarray.h new file mode 100644 index 0000000000..6495030f0c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dynarray.h @@ -0,0 +1,1072 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/dynarray.h +// Purpose: auto-resizable (i.e. dynamic) array support +// Author: Vadim Zeitlin +// Modified by: +// Created: 12.09.97 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _DYNARRAY_H +#define _DYNARRAY_H + +#include "wx/defs.h" + +#if wxUSE_STD_CONTAINERS + #include "wx/beforestd.h" + #include + #include + #include "wx/afterstd.h" +#endif + +/* + This header defines the dynamic arrays and object arrays (i.e. arrays which + own their elements). Dynamic means that the arrays grow automatically as + needed. + + These macros are ugly (especially if you look in the sources ;-), but they + allow us to define "template" classes without actually using templates and so + this works with all compilers (and may be also much faster to compile even + with a compiler which does support templates). The arrays defined with these + macros are type-safe. + + Range checking is performed in debug build for both arrays and objarrays but + not in release build - so using an invalid index will just lead to a crash + then. + + Note about memory usage: arrays never shrink automatically (although you may + use Shrink() function explicitly), they only grow, so loading 10 millions in + an array only to delete them 2 lines below might be a bad idea if the array + object is not going to be destroyed soon. However, as it does free memory + when destroyed, it is ok if the array is a local variable. + */ + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +/* + The initial size by which an array grows when an element is added default + value avoids allocate one or two bytes when the array is created which is + rather inefficient +*/ +#define WX_ARRAY_DEFAULT_INITIAL_SIZE (16) + +#define _WX_ERROR_REMOVE "removing inexistent element in wxArray::Remove" + +// ---------------------------------------------------------------------------- +// types +// ---------------------------------------------------------------------------- + +/* + Callback compare function for quick sort. + + It must return negative value, 0 or positive value if the first item is + less than, equal to or greater than the second one. + */ +extern "C" +{ +typedef int (wxCMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2); +} + +// ---------------------------------------------------------------------------- +// Base class managing data having size of type 'long' (not used directly) +// +// NB: for efficiency this often used class has no virtual functions (hence no +// virtual table), even dtor is *not* virtual. If used as expected it +// won't create any problems because ARRAYs from DEFINE_ARRAY have no dtor +// at all, so it's not too important if it's not called (this happens when +// you cast "SomeArray *" as "BaseArray *" and then delete it) +// ---------------------------------------------------------------------------- + +#if wxUSE_STD_CONTAINERS + +template +class wxArray_SortFunction +{ +public: + typedef int (wxCMPFUNC_CONV *CMPFUNC)(T* pItem1, T* pItem2); + + wxArray_SortFunction(CMPFUNC f) : m_f(f) { } + bool operator()(const T& i1, const T& i2) + { return m_f((T*)&i1, (T*)&i2) < 0; } +private: + CMPFUNC m_f; +}; + +template +class wxSortedArray_SortFunction +{ +public: + typedef F CMPFUNC; + + wxSortedArray_SortFunction(CMPFUNC f) : m_f(f) { } + bool operator()(const T& i1, const T& i2) + { return m_f(i1, i2) < 0; } +private: + CMPFUNC m_f; +}; + +#define _WX_DECLARE_BASEARRAY(T, name, classexp) \ + typedef int (wxCMPFUNC_CONV *CMPFUN##name)(T pItem1, T pItem2); \ + typedef wxSortedArray_SortFunction name##_Predicate; \ + _WX_DECLARE_BASEARRAY_2(T, name, name##_Predicate, classexp) + +#define _WX_DECLARE_BASEARRAY_2(T, name, predicate, classexp) \ +classexp name : public std::vector \ +{ \ + typedef predicate Predicate; \ + typedef predicate::CMPFUNC SCMPFUNC; \ +public: \ + typedef wxArray_SortFunction::CMPFUNC CMPFUNC; \ + \ +public: \ + typedef T base_type; \ + \ + name() : std::vector() { } \ + name(size_type n) : std::vector(n) { } \ + name(size_type n, const_reference v) : std::vector(n, v) { } \ + template \ + name(InputIterator first, InputIterator last) : std::vector(first, last) { } \ + \ + void Empty() { clear(); } \ + void Clear() { clear(); } \ + void Alloc(size_t uiSize) { reserve(uiSize); } \ + void Shrink() { name tmp(*this); swap(tmp); } \ + \ + size_t GetCount() const { return size(); } \ + void SetCount(size_t n, T v = T()) { resize(n, v); } \ + bool IsEmpty() const { return empty(); } \ + size_t Count() const { return size(); } \ + \ + T& Item(size_t uiIndex) const \ + { wxASSERT( uiIndex < size() ); return (T&)operator[](uiIndex); } \ + T& Last() const { return Item(size() - 1); } \ + \ + int Index(T item, bool bFromEnd = false) const \ + { \ + if ( bFromEnd ) \ + { \ + const const_reverse_iterator b = rbegin(), \ + e = rend(); \ + for ( const_reverse_iterator i = b; i != e; ++i ) \ + if ( *i == item ) \ + return (int)(e - i - 1); \ + } \ + else \ + { \ + const const_iterator b = begin(), \ + e = end(); \ + for ( const_iterator i = b; i != e; ++i ) \ + if ( *i == item ) \ + return (int)(i - b); \ + } \ + \ + return wxNOT_FOUND; \ + } \ + int Index(T lItem, CMPFUNC fnCompare) const \ + { \ + Predicate p((SCMPFUNC)fnCompare); \ + const_iterator i = std::lower_bound(begin(), end(), lItem, p);\ + return i != end() && !p(lItem, *i) ? (int)(i - begin()) \ + : wxNOT_FOUND; \ + } \ + size_t IndexForInsert(T lItem, CMPFUNC fnCompare) const \ + { \ + Predicate p((SCMPFUNC)fnCompare); \ + const_iterator i = std::lower_bound(begin(), end(), lItem, p);\ + return i - begin(); \ + } \ + void Add(T lItem, size_t nInsert = 1) \ + { insert(end(), nInsert, lItem); } \ + size_t Add(T lItem, CMPFUNC fnCompare) \ + { \ + size_t n = IndexForInsert(lItem, fnCompare); \ + Insert(lItem, n); \ + return n; \ + } \ + void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \ + { insert(begin() + uiIndex, nInsert, lItem); } \ + void Remove(T lItem) \ + { \ + int n = Index(lItem); \ + wxCHECK_RET( n != wxNOT_FOUND, _WX_ERROR_REMOVE ); \ + RemoveAt((size_t)n); \ + } \ + void RemoveAt(size_t uiIndex, size_t nRemove = 1) \ + { erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \ + \ + void Sort(CMPFUNC fCmp) \ + { \ + wxArray_SortFunction p(fCmp); \ + std::sort(begin(), end(), p); \ + } \ +} + +#else // if !wxUSE_STD_CONTAINERS + +#define _WX_DECLARE_BASEARRAY(T, name, classexp) \ +classexp name \ +{ \ + typedef CMPFUNC SCMPFUNC; /* for compatibility wuth wxUSE_STD_CONTAINERS */ \ +public: \ + name(); \ + name(const name& array); \ + name& operator=(const name& src); \ + ~name(); \ + \ + void Empty() { m_nCount = 0; } \ + void Clear(); \ + void Alloc(size_t n) { if ( n > m_nSize ) Realloc(n); } \ + void Shrink(); \ + \ + size_t GetCount() const { return m_nCount; } \ + void SetCount(size_t n, T defval = T()); \ + bool IsEmpty() const { return m_nCount == 0; } \ + size_t Count() const { return m_nCount; } \ + \ + typedef T base_type; \ + \ +protected: \ + T& Item(size_t uiIndex) const \ + { wxASSERT( uiIndex < m_nCount ); return m_pItems[uiIndex]; } \ + T& operator[](size_t uiIndex) const { return Item(uiIndex); } \ + \ + int Index(T lItem, bool bFromEnd = false) const; \ + int Index(T lItem, CMPFUNC fnCompare) const; \ + size_t IndexForInsert(T lItem, CMPFUNC fnCompare) const; \ + void Add(T lItem, size_t nInsert = 1); \ + size_t Add(T lItem, CMPFUNC fnCompare); \ + void Insert(T lItem, size_t uiIndex, size_t nInsert = 1); \ + void Remove(T lItem); \ + void RemoveAt(size_t uiIndex, size_t nRemove = 1); \ + \ + void Sort(CMPFUNC fnCompare); \ + \ + /* *minimal* STL-ish interface, for derived classes */ \ + typedef T value_type; \ + typedef value_type* iterator; \ + typedef const value_type* const_iterator; \ + typedef value_type& reference; \ + typedef const value_type& const_reference; \ + typedef ptrdiff_t difference_type; \ + typedef size_t size_type; \ + \ + void assign(const_iterator first, const_iterator last); \ + void assign(size_type n, const_reference v); \ + size_type capacity() const { return m_nSize; } \ + iterator erase(iterator first, iterator last) \ + { \ + size_type idx = first - begin(); \ + RemoveAt(idx, last - first); \ + return begin() + idx; \ + } \ + iterator erase(iterator it) { return erase(it, it + 1); } \ + void insert(iterator it, size_type n, const value_type& v) \ + { Insert(v, it - begin(), n); } \ + iterator insert(iterator it, const value_type& v = value_type()) \ + { \ + size_type idx = it - begin(); \ + Insert(v, idx); \ + return begin() + idx; \ + } \ + void insert(iterator it, const_iterator first, const_iterator last);\ + void pop_back() { RemoveAt(size() - 1); } \ + void push_back(const value_type& v) { Add(v); } \ + void reserve(size_type n) { Alloc(n); } \ + void resize(size_type count, value_type defval = value_type()) \ + { \ + if ( count < m_nCount ) \ + m_nCount = count; \ + else \ + SetCount(count, defval); \ + } \ + \ + iterator begin() { return m_pItems; } \ + iterator end() { return m_pItems + m_nCount; } \ + const_iterator begin() const { return m_pItems; } \ + const_iterator end() const { return m_pItems + m_nCount; } \ + \ + void swap(name& other) \ + { \ + wxSwap(m_nSize, other.m_nSize); \ + wxSwap(m_nCount, other.m_nCount); \ + wxSwap(m_pItems, other.m_pItems); \ + } \ + \ + /* the following functions may be made directly public because */ \ + /* they don't use the type of the elements at all */ \ +public: \ + void clear() { Clear(); } \ + bool empty() const { return IsEmpty(); } \ + size_type max_size() const { return INT_MAX; } \ + size_type size() const { return GetCount(); } \ + \ +private: \ + void Grow(size_t nIncrement = 0); \ + bool Realloc(size_t nSize); \ + \ + size_t m_nSize, \ + m_nCount; \ + \ + T *m_pItems; \ +} + +#endif // !wxUSE_STD_CONTAINERS + +// ============================================================================ +// The private helper macros containing the core of the array classes +// ============================================================================ + +// Implementation notes: +// +// JACS: Salford C++ doesn't like 'var->operator=' syntax, as in: +// { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src); +// so using a temporary variable instead. +// +// The classes need a (even trivial) ~name() to link under Mac X + +// ---------------------------------------------------------------------------- +// _WX_DEFINE_TYPEARRAY: array for simple types +// ---------------------------------------------------------------------------- + +#if wxUSE_STD_CONTAINERS + +// in STL case we don't need the entire base arrays hack as standard container +// don't suffer from alignment/storage problems as our home-grown do +#define _WX_DEFINE_TYPEARRAY(T, name, base, classexp) \ + _WX_DECLARE_BASEARRAY(T, name, classexp) + +#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \ + _WX_DEFINE_TYPEARRAY(T, name, base, classexp) + +#else // if !wxUSE_STD_CONTAINERS + +// common declaration used by both _WX_DEFINE_TYPEARRAY and +// _WX_DEFINE_TYPEARRAY_PTR +#define _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, ptrop) \ +wxCOMPILE_TIME_ASSERT2(sizeof(T) <= sizeof(base::base_type), \ + TypeTooBigToBeStoredIn##base, \ + name); \ +typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \ +classexp name : public base \ +{ \ +public: \ + name() { } \ + ~name() { } \ + \ + T& operator[](size_t uiIndex) const \ + { return (T&)(base::operator[](uiIndex)); } \ + T& Item(size_t uiIndex) const \ + { return (T&)(base::operator[](uiIndex)); } \ + T& Last() const \ + { return (T&)(base::operator[](GetCount() - 1)); } \ + \ + int Index(T lItem, bool bFromEnd = false) const \ + { return base::Index((base_type)lItem, bFromEnd); } \ + \ + void Add(T lItem, size_t nInsert = 1) \ + { base::Add((base_type)lItem, nInsert); } \ + void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \ + { base::Insert((base_type)lItem, uiIndex, nInsert) ; } \ + \ + void RemoveAt(size_t uiIndex, size_t nRemove = 1) \ + { base::RemoveAt(uiIndex, nRemove); } \ + void Remove(T lItem) \ + { int iIndex = Index(lItem); \ + wxCHECK_RET( iIndex != wxNOT_FOUND, _WX_ERROR_REMOVE); \ + base::RemoveAt((size_t)iIndex); } \ + \ + void Sort(CMPFUNC##T fCmp) { base::Sort((CMPFUNC)fCmp); } \ + \ + /* STL-like interface */ \ +private: \ + typedef base::iterator biterator; \ + typedef base::const_iterator bconst_iterator; \ + typedef base::value_type bvalue_type; \ + typedef base::const_reference bconst_reference; \ +public: \ + typedef T value_type; \ + typedef value_type* pointer; \ + typedef const value_type* const_pointer; \ + typedef value_type* iterator; \ + typedef const value_type* const_iterator; \ + typedef value_type& reference; \ + typedef const value_type& const_reference; \ + typedef base::difference_type difference_type; \ + typedef base::size_type size_type; \ + \ + class reverse_iterator \ + { \ + typedef T value_type; \ + typedef value_type& reference; \ + typedef value_type* pointer; \ + typedef reverse_iterator itor; \ + friend inline itor operator+(int o, const itor& it) \ + { return it.m_ptr - o; } \ + friend inline itor operator+(const itor& it, int o) \ + { return it.m_ptr - o; } \ + friend inline itor operator-(const itor& it, int o) \ + { return it.m_ptr + o; } \ + friend inline difference_type operator-(const itor& i1, \ + const itor& i2) \ + { return i1.m_ptr - i2.m_ptr; } \ + \ + public: \ + pointer m_ptr; \ + reverse_iterator() : m_ptr(NULL) { } \ + reverse_iterator(pointer ptr) : m_ptr(ptr) { } \ + reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } \ + reference operator*() const { return *m_ptr; } \ + ptrop \ + itor& operator++() { --m_ptr; return *this; } \ + const itor operator++(int) \ + { reverse_iterator tmp = *this; --m_ptr; return tmp; } \ + itor& operator--() { ++m_ptr; return *this; } \ + const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\ + bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }\ + bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }\ + }; \ + \ + class const_reverse_iterator \ + { \ + typedef T value_type; \ + typedef const value_type& reference; \ + typedef const value_type* pointer; \ + typedef const_reverse_iterator itor; \ + friend inline itor operator+(int o, const itor& it) \ + { return it.m_ptr - o; } \ + friend inline itor operator+(const itor& it, int o) \ + { return it.m_ptr - o; } \ + friend inline itor operator-(const itor& it, int o) \ + { return it.m_ptr + o; } \ + friend inline difference_type operator-(const itor& i1, \ + const itor& i2) \ + { return i1.m_ptr - i2.m_ptr; } \ + \ + public: \ + pointer m_ptr; \ + const_reverse_iterator() : m_ptr(NULL) { } \ + const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } \ + const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } \ + const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { }\ + reference operator*() const { return *m_ptr; } \ + ptrop \ + itor& operator++() { --m_ptr; return *this; } \ + const itor operator++(int) \ + { itor tmp = *this; --m_ptr; return tmp; } \ + itor& operator--() { ++m_ptr; return *this; } \ + const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\ + bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }\ + bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }\ + }; \ + \ + name(size_type n) { assign(n, value_type()); } \ + name(size_type n, const_reference v) { assign(n, v); } \ + name(const_iterator first, const_iterator last) \ + { assign(first, last); } \ + void assign(const_iterator first, const_iterator last) \ + { base::assign((bconst_iterator)first, (bconst_iterator)last); } \ + void assign(size_type n, const_reference v) \ + { base::assign(n, (bconst_reference)v); } \ + reference back() { return *(end() - 1); } \ + const_reference back() const { return *(end() - 1); } \ + iterator begin() { return (iterator)base::begin(); } \ + const_iterator begin() const { return (const_iterator)base::begin(); }\ + size_type capacity() const { return base::capacity(); } \ + iterator end() { return (iterator)base::end(); } \ + const_iterator end() const { return (const_iterator)base::end(); } \ + iterator erase(iterator first, iterator last) \ + { return (iterator)base::erase((biterator)first, (biterator)last); }\ + iterator erase(iterator it) \ + { return (iterator)base::erase((biterator)it); } \ + reference front() { return *begin(); } \ + const_reference front() const { return *begin(); } \ + void insert(iterator it, size_type n, const_reference v) \ + { base::insert((biterator)it, n, (bconst_reference)v); } \ + iterator insert(iterator it, const_reference v = value_type()) \ + { return (iterator)base::insert((biterator)it, (bconst_reference)v); }\ + void insert(iterator it, const_iterator first, const_iterator last) \ + { base::insert((biterator)it, (bconst_iterator)first, \ + (bconst_iterator)last); } \ + void pop_back() { base::pop_back(); } \ + void push_back(const_reference v) \ + { base::push_back((bconst_reference)v); } \ + reverse_iterator rbegin() { return reverse_iterator(end() - 1); } \ + const_reverse_iterator rbegin() const; \ + reverse_iterator rend() { return reverse_iterator(begin() - 1); } \ + const_reverse_iterator rend() const; \ + void reserve(size_type n) { base::reserve(n); } \ + void resize(size_type n, value_type v = value_type()) \ + { base::resize(n, v); } \ + void swap(name& other) { base::swap(other); } \ +} + +#define _WX_PTROP pointer operator->() const { return m_ptr; } +#define _WX_PTROP_NONE + +#define _WX_DEFINE_TYPEARRAY(T, name, base, classexp) \ + _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, _WX_PTROP) +#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \ + _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, _WX_PTROP_NONE) + +#endif // !wxUSE_STD_CONTAINERS + +// ---------------------------------------------------------------------------- +// _WX_DEFINE_SORTED_TYPEARRAY: sorted array for simple data types +// cannot handle types with size greater than pointer because of sorting +// ---------------------------------------------------------------------------- + +#define _WX_DEFINE_SORTED_TYPEARRAY_2(T, name, base, defcomp, classexp, comptype)\ +wxCOMPILE_TIME_ASSERT2(sizeof(T) <= sizeof(base::base_type), \ + TypeTooBigToBeStoredInSorted##base, \ + name); \ +classexp name : public base \ +{ \ + typedef comptype SCMPFUNC; \ +public: \ + name(comptype fn defcomp) { m_fnCompare = fn; } \ + \ + name& operator=(const name& src) \ + { base* temp = (base*) this; \ + (*temp) = ((const base&)src); \ + m_fnCompare = src.m_fnCompare; \ + return *this; } \ + \ + T& operator[](size_t uiIndex) const \ + { return (T&)(base::operator[](uiIndex)); } \ + T& Item(size_t uiIndex) const \ + { return (T&)(base::operator[](uiIndex)); } \ + T& Last() const \ + { return (T&)(base::operator[](size() - 1)); } \ + \ + int Index(T lItem) const \ + { return base::Index(lItem, (CMPFUNC)m_fnCompare); } \ + \ + size_t IndexForInsert(T lItem) const \ + { return base::IndexForInsert(lItem, (CMPFUNC)m_fnCompare); } \ + \ + void AddAt(T item, size_t index) \ + { base::insert(begin() + index, item); } \ + \ + size_t Add(T lItem) \ + { return base::Add(lItem, (CMPFUNC)m_fnCompare); } \ + void push_back(T lItem) \ + { Add(lItem); } \ + \ + void RemoveAt(size_t uiIndex, size_t nRemove = 1) \ + { base::erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \ + void Remove(T lItem) \ + { int iIndex = Index(lItem); \ + wxCHECK_RET( iIndex != wxNOT_FOUND, _WX_ERROR_REMOVE ); \ + base::erase(begin() + iIndex); } \ + \ +private: \ + comptype m_fnCompare; \ +} + + +// ---------------------------------------------------------------------------- +// _WX_DECLARE_OBJARRAY: an array for pointers to type T with owning semantics +// ---------------------------------------------------------------------------- + +#define _WX_DECLARE_OBJARRAY(T, name, base, classexp) \ +typedef int (CMPFUNC_CONV *CMPFUNC##T)(T **pItem1, T **pItem2); \ +classexp name : protected base \ +{ \ +typedef int (CMPFUNC_CONV *CMPFUNC##base)(void **pItem1, void **pItem2); \ +typedef base base_array; \ +public: \ + name() { } \ + name(const name& src); \ + name& operator=(const name& src); \ + \ + ~name(); \ + \ + void Alloc(size_t count) { base::reserve(count); } \ + void reserve(size_t count) { base::reserve(count); } \ + size_t GetCount() const { return base_array::size(); } \ + size_t size() const { return base_array::size(); } \ + bool IsEmpty() const { return base_array::empty(); } \ + bool empty() const { return base_array::empty(); } \ + size_t Count() const { return base_array::size(); } \ + void Shrink() { base::Shrink(); } \ + \ + T& operator[](size_t uiIndex) const \ + { return *(T*)base::operator[](uiIndex); } \ + T& Item(size_t uiIndex) const \ + { return *(T*)base::operator[](uiIndex); } \ + T& Last() const \ + { return *(T*)(base::operator[](size() - 1)); } \ + \ + int Index(const T& lItem, bool bFromEnd = false) const; \ + \ + void Add(const T& lItem, size_t nInsert = 1); \ + void Add(const T* pItem) \ + { base::push_back((T*)pItem); } \ + void push_back(const T* pItem) \ + { base::push_back((T*)pItem); } \ + void push_back(const T& lItem) \ + { Add(lItem); } \ + \ + void Insert(const T& lItem, size_t uiIndex, size_t nInsert = 1); \ + void Insert(const T* pItem, size_t uiIndex) \ + { base::insert(begin() + uiIndex, (T*)pItem); } \ + \ + void Empty() { DoEmpty(); base::clear(); } \ + void Clear() { DoEmpty(); base::clear(); } \ + \ + T* Detach(size_t uiIndex) \ + { T* p = (T*)base::operator[](uiIndex); \ + base::erase(begin() + uiIndex); return p; } \ + void RemoveAt(size_t uiIndex, size_t nRemove = 1); \ + \ + void Sort(CMPFUNC##T fCmp) { base::Sort((CMPFUNC##base)fCmp); } \ + \ +private: \ + void DoEmpty(); \ + void DoCopy(const name& src); \ +} + +// ============================================================================ +// The public macros for declaration and definition of the dynamic arrays +// ============================================================================ + +// Please note that for each macro WX_FOO_ARRAY we also have +// WX_FOO_EXPORTED_ARRAY and WX_FOO_USER_EXPORTED_ARRAY which are exactly the +// same except that they use an additional __declspec(dllexport) or equivalent +// under Windows if needed. +// +// The first (just EXPORTED) macros do it if wxWidgets was compiled as a DLL +// and so must be used used inside the library. The second kind (USER_EXPORTED) +// allow the user code to do it when it wants. This is needed if you have a dll +// that wants to export a wxArray daubed with your own import/export goo. +// +// Finally, you can define the macro below as something special to modify the +// arrays defined by a simple WX_FOO_ARRAY as well. By default is empty. +#define wxARRAY_DEFAULT_EXPORT + +// ---------------------------------------------------------------------------- +// WX_DECLARE_BASEARRAY(T, name) declare an array class named "name" containing +// the elements of type T +// ---------------------------------------------------------------------------- + +#define WX_DECLARE_BASEARRAY(T, name) \ + WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, wxARRAY_DEFAULT_EXPORT) + +#define WX_DECLARE_EXPORTED_BASEARRAY(T, name) \ + WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, WXDLLIMPEXP_CORE) + +#define WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, expmode) \ + typedef T _wxArray##name; \ + _WX_DECLARE_BASEARRAY(_wxArray##name, name, class expmode) + +// ---------------------------------------------------------------------------- +// WX_DEFINE_TYPEARRAY(T, name, base) define an array class named "name" deriving +// from class "base" containing the elements of type T +// +// Note that the class defined has only inline function and doesn't take any +// space at all so there is no size penalty for defining multiple array classes +// ---------------------------------------------------------------------------- + +#define WX_DEFINE_TYPEARRAY(T, name, base) \ + WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class wxARRAY_DEFAULT_EXPORT) + +#define WX_DEFINE_TYPEARRAY_PTR(T, name, base) \ + WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class wxARRAY_DEFAULT_EXPORT) + +#define WX_DEFINE_EXPORTED_TYPEARRAY(T, name, base) \ + WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class WXDLLIMPEXP_CORE) + +#define WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, base) \ + WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class WXDLLIMPEXP_CORE) + +#define WX_DEFINE_USER_EXPORTED_TYPEARRAY(T, name, base, expdecl) \ + WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class expdecl) + +#define WX_DEFINE_USER_EXPORTED_TYPEARRAY_PTR(T, name, base, expdecl) \ + WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class expdecl) + +#define WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, classdecl) \ + typedef T _wxArray##name; \ + _WX_DEFINE_TYPEARRAY(_wxArray##name, name, base, classdecl) + +#define WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, classdecl) \ + typedef T _wxArray##name; \ + _WX_DEFINE_TYPEARRAY_PTR(_wxArray##name, name, base, classdecl) + +// ---------------------------------------------------------------------------- +// WX_DEFINE_SORTED_TYPEARRAY: this is the same as the previous macro, but it +// defines a sorted array. +// +// Differences: +// 1) it must be given a COMPARE function in ctor which takes 2 items of type +// T* and should return -1, 0 or +1 if the first one is less/greater +// than/equal to the second one. +// 2) the Add() method inserts the item in such was that the array is always +// sorted (it uses the COMPARE function) +// 3) it has no Sort() method because it's always sorted +// 4) Index() method is much faster (the sorted arrays use binary search +// instead of linear one), but Add() is slower. +// 5) there is no Insert() method because you can't insert an item into the +// given position in a sorted array but there is IndexForInsert()/AddAt() +// pair which may be used to optimize a common operation of "insert only if +// not found" +// +// Note that you have to specify the comparison function when creating the +// objects of this array type. If, as in 99% of cases, the comparison function +// is the same for all objects of a class, WX_DEFINE_SORTED_TYPEARRAY_CMP below +// is more convenient. +// +// Summary: use this class when the speed of Index() function is important, use +// the normal arrays otherwise. +// ---------------------------------------------------------------------------- + +// we need a macro which expands to nothing to pass correct number of +// parameters to a nested macro invocation even when we don't have anything to +// pass it +#define wxARRAY_EMPTY + +#define WX_DEFINE_SORTED_TYPEARRAY(T, name, base) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, \ + wxARRAY_DEFAULT_EXPORT) + +#define WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, base) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, WXDLLIMPEXP_CORE) + +#define WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, expmode) \ + typedef T _wxArray##name; \ + typedef int (CMPFUNC_CONV *SCMPFUNC##name)(T pItem1, T pItem2); \ + _WX_DEFINE_SORTED_TYPEARRAY_2(_wxArray##name, name, base, \ + wxARRAY_EMPTY, class expmode, SCMPFUNC##name) + +// ---------------------------------------------------------------------------- +// WX_DEFINE_SORTED_TYPEARRAY_CMP: exactly the same as above but the comparison +// function is provided by this macro and the objects of this class have a +// default constructor which just uses it. +// +// The arguments are: the element type, the comparison function and the array +// name +// +// NB: this is, of course, how WX_DEFINE_SORTED_TYPEARRAY() should have worked +// from the very beginning - unfortunately I didn't think about this earlier +// ---------------------------------------------------------------------------- + +#define WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, base) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base, \ + wxARRAY_DEFAULT_EXPORT) + +#define WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base, \ + WXDLLIMPEXP_CORE) + +#define WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base, \ + expmode) \ + typedef T _wxArray##name; \ + typedef int (CMPFUNC_CONV *SCMPFUNC##name)(T pItem1, T pItem2); \ + _WX_DEFINE_SORTED_TYPEARRAY_2(_wxArray##name, name, base, = cmpfunc, \ + class expmode, SCMPFUNC##name) + +// ---------------------------------------------------------------------------- +// WX_DECLARE_OBJARRAY(T, name): this macro generates a new array class +// named "name" which owns the objects of type T it contains, i.e. it will +// delete them when it is destroyed. +// +// An element is of type T*, but arguments of type T& are taken (see below!) +// and T& is returned. +// +// Don't use this for simple types such as "int" or "long"! +// +// Note on Add/Insert functions: +// 1) function(T*) gives the object to the array, i.e. it will delete the +// object when it's removed or in the array's dtor +// 2) function(T&) will create a copy of the object and work with it +// +// Also: +// 1) Remove() will delete the object after removing it from the array +// 2) Detach() just removes the object from the array (returning pointer to it) +// +// NB1: Base type T should have an accessible copy ctor if Add(T&) is used +// NB2: Never ever cast a array to it's base type: as dtor is not virtual +// and so you risk having at least the memory leaks and probably worse +// +// Some functions of this class are not inline, so it takes some space to +// define new class from this template even if you don't use it - which is not +// the case for the simple (non-object) array classes +// +// To use an objarray class you must +// #include "dynarray.h" +// WX_DECLARE_OBJARRAY(element_type, list_class_name) +// #include "arrimpl.cpp" +// WX_DEFINE_OBJARRAY(list_class_name) // name must be the same as above! +// +// This is necessary because at the moment of DEFINE_OBJARRAY class parsing the +// element_type must be fully defined (i.e. forward declaration is not +// enough), while WX_DECLARE_OBJARRAY may be done anywhere. The separation of +// two allows to break cicrcular dependencies with classes which have member +// variables of objarray type. +// ---------------------------------------------------------------------------- + +#define WX_DECLARE_OBJARRAY(T, name) \ + WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, wxARRAY_DEFAULT_EXPORT) + +#define WX_DECLARE_EXPORTED_OBJARRAY(T, name) \ + WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, WXDLLIMPEXP_CORE) + +#define WX_DECLARE_OBJARRAY_WITH_DECL(T, name, decl) \ + typedef T _wxObjArray##name; \ + _WX_DECLARE_OBJARRAY(_wxObjArray##name, name, wxArrayPtrVoid, decl) + +#define WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, expmode) \ + WX_DECLARE_OBJARRAY_WITH_DECL(T, name, class expmode) + +// WX_DEFINE_OBJARRAY is going to be redefined when arrimpl.cpp is included, +// try to provoke a human-understandable error if it used incorrectly. +// +// there is no real need for 3 different macros in the DEFINE case but do it +// anyhow for consistency +#define WX_DEFINE_OBJARRAY(name) DidYouIncludeArrimplCpp +#define WX_DEFINE_EXPORTED_OBJARRAY(name) WX_DEFINE_OBJARRAY(name) +#define WX_DEFINE_USER_EXPORTED_OBJARRAY(name) WX_DEFINE_OBJARRAY(name) + +// ---------------------------------------------------------------------------- +// Some commonly used predefined base arrays +// ---------------------------------------------------------------------------- + +WX_DECLARE_USER_EXPORTED_BASEARRAY(const void *, wxBaseArrayPtrVoid, + WXDLLIMPEXP_BASE); +WX_DECLARE_USER_EXPORTED_BASEARRAY(char, wxBaseArrayChar, WXDLLIMPEXP_BASE); +WX_DECLARE_USER_EXPORTED_BASEARRAY(short, wxBaseArrayShort, WXDLLIMPEXP_BASE); +WX_DECLARE_USER_EXPORTED_BASEARRAY(int, wxBaseArrayInt, WXDLLIMPEXP_BASE); +WX_DECLARE_USER_EXPORTED_BASEARRAY(long, wxBaseArrayLong, WXDLLIMPEXP_BASE); +WX_DECLARE_USER_EXPORTED_BASEARRAY(size_t, wxBaseArraySizeT, WXDLLIMPEXP_BASE); +WX_DECLARE_USER_EXPORTED_BASEARRAY(double, wxBaseArrayDouble, WXDLLIMPEXP_BASE); + +// ---------------------------------------------------------------------------- +// Convenience macros to define arrays from base arrays +// ---------------------------------------------------------------------------- + +#define WX_DEFINE_ARRAY(T, name) \ + WX_DEFINE_TYPEARRAY(T, name, wxBaseArrayPtrVoid) +#define WX_DEFINE_ARRAY_PTR(T, name) \ + WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayPtrVoid) +#define WX_DEFINE_EXPORTED_ARRAY(T, name) \ + WX_DEFINE_EXPORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid) +#define WX_DEFINE_EXPORTED_ARRAY_PTR(T, name) \ + WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayPtrVoid) +#define WX_DEFINE_ARRAY_WITH_DECL_PTR(T, name, decl) \ + WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayPtrVoid, decl) +#define WX_DEFINE_USER_EXPORTED_ARRAY(T, name, expmode) \ + WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, wxBaseArrayPtrVoid, wxARRAY_EMPTY expmode) +#define WX_DEFINE_USER_EXPORTED_ARRAY_PTR(T, name, expmode) \ + WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayPtrVoid, wxARRAY_EMPTY expmode) + +#define WX_DEFINE_ARRAY_CHAR(T, name) \ + WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayChar) +#define WX_DEFINE_EXPORTED_ARRAY_CHAR(T, name) \ + WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayChar) +#define WX_DEFINE_USER_EXPORTED_ARRAY_CHAR(T, name, expmode) \ + WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayChar, wxARRAY_EMPTY expmode) + +#define WX_DEFINE_ARRAY_SHORT(T, name) \ + WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayShort) +#define WX_DEFINE_EXPORTED_ARRAY_SHORT(T, name) \ + WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayShort) +#define WX_DEFINE_USER_EXPORTED_ARRAY_SHORT(T, name, expmode) \ + WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayShort, wxARRAY_EMPTY expmode) + +#define WX_DEFINE_ARRAY_INT(T, name) \ + WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayInt) +#define WX_DEFINE_EXPORTED_ARRAY_INT(T, name) \ + WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayInt) +#define WX_DEFINE_USER_EXPORTED_ARRAY_INT(T, name, expmode) \ + WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayInt, wxARRAY_EMPTY expmode) + +#define WX_DEFINE_ARRAY_LONG(T, name) \ + WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayLong) +#define WX_DEFINE_EXPORTED_ARRAY_LONG(T, name) \ + WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayLong) +#define WX_DEFINE_USER_EXPORTED_ARRAY_LONG(T, name, expmode) \ + WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayLong, wxARRAY_EMPTY expmode) + +#define WX_DEFINE_ARRAY_SIZE_T(T, name) \ + WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArraySizeT) +#define WX_DEFINE_EXPORTED_ARRAY_SIZE_T(T, name) \ + WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArraySizeT) +#define WX_DEFINE_USER_EXPORTED_ARRAY_SIZE_T(T, name, expmode) \ + WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArraySizeT, wxARRAY_EMPTY expmode) + +#define WX_DEFINE_ARRAY_DOUBLE(T, name) \ + WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayDouble) +#define WX_DEFINE_EXPORTED_ARRAY_DOUBLE(T, name) \ + WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayDouble) +#define WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE(T, name, expmode) \ + WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayDouble, wxARRAY_EMPTY expmode) + +// ---------------------------------------------------------------------------- +// Convenience macros to define sorted arrays from base arrays +// ---------------------------------------------------------------------------- + +#define WX_DEFINE_SORTED_ARRAY(T, name) \ + WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY(T, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY(T, name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid, wxARRAY_EMPTY expmode) + +#define WX_DEFINE_SORTED_ARRAY_CHAR(T, name) \ + WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayChar) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CHAR(T, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayChar) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CHAR(T, name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayChar, wxARRAY_EMPTY expmode) + +#define WX_DEFINE_SORTED_ARRAY_SHORT(T, name) \ + WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayShort) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY_SHORT(T, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayShort) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SHORT(T, name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayShort, wxARRAY_EMPTY expmode) + +#define WX_DEFINE_SORTED_ARRAY_INT(T, name) \ + WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayInt) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY_INT(T, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayInt) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_INT(T, name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayInt, expmode) + +#define WX_DEFINE_SORTED_ARRAY_LONG(T, name) \ + WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayLong) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY_LONG(T, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayLong) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_LONG(T, name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayLong, expmode) + +#define WX_DEFINE_SORTED_ARRAY_SIZE_T(T, name) \ + WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArraySizeT) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY_SIZE_T(T, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArraySizeT) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SIZE_T(T, name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArraySizeT, wxARRAY_EMPTY expmode) + +// ---------------------------------------------------------------------------- +// Convenience macros to define sorted arrays from base arrays +// ---------------------------------------------------------------------------- + +#define WX_DEFINE_SORTED_ARRAY_CMP(T, cmpfunc, name) \ + WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayPtrVoid) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP(T, cmpfunc, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayPtrVoid) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP(T, cmpfunc, \ + name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \ + wxBaseArrayPtrVoid, \ + wxARRAY_EMPTY expmode) + +#define WX_DEFINE_SORTED_ARRAY_CMP_CHAR(T, cmpfunc, name) \ + WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayChar) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_CHAR(T, cmpfunc, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayChar) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_CHAR(T, cmpfunc, \ + name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \ + wxBaseArrayChar, \ + wxARRAY_EMPTY expmode) + +#define WX_DEFINE_SORTED_ARRAY_CMP_SHORT(T, cmpfunc, name) \ + WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayShort) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_SHORT(T, cmpfunc, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayShort) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_SHORT(T, cmpfunc, \ + name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \ + wxBaseArrayShort, \ + wxARRAY_EMPTY expmode) + +#define WX_DEFINE_SORTED_ARRAY_CMP_INT(T, cmpfunc, name) \ + WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayInt) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_INT(T, cmpfunc, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayInt) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_INT(T, cmpfunc, \ + name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \ + wxBaseArrayInt, \ + wxARRAY_EMPTY expmode) + +#define WX_DEFINE_SORTED_ARRAY_CMP_LONG(T, cmpfunc, name) \ + WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayLong) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_LONG(T, cmpfunc, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayLong) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_LONG(T, cmpfunc, \ + name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \ + wxBaseArrayLong, \ + wxARRAY_EMPTY expmode) + +#define WX_DEFINE_SORTED_ARRAY_CMP_SIZE_T(T, cmpfunc, name) \ + WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArraySizeT) +#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_SIZE_T(T, cmpfunc, name) \ + WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArraySizeT) +#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_SIZE_T(T, cmpfunc, \ + name, expmode) \ + WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \ + wxBaseArraySizeT, \ + wxARRAY_EMPTY expmode) + +// ---------------------------------------------------------------------------- +// Some commonly used predefined arrays +// ---------------------------------------------------------------------------- + +WX_DEFINE_USER_EXPORTED_ARRAY_SHORT(short, wxArrayShort, class WXDLLIMPEXP_BASE); +WX_DEFINE_USER_EXPORTED_ARRAY_INT(int, wxArrayInt, class WXDLLIMPEXP_BASE); +WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE(double, wxArrayDouble, class WXDLLIMPEXP_BASE); +WX_DEFINE_USER_EXPORTED_ARRAY_LONG(long, wxArrayLong, class WXDLLIMPEXP_BASE); +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(void *, wxArrayPtrVoid, class WXDLLIMPEXP_BASE); + +// ----------------------------------------------------------------------------- +// convenience macros +// ----------------------------------------------------------------------------- + +// prepend all element of one array to another one; e.g. if first array contains +// elements X,Y,Z and the second contains A,B,C (in those orders), then the +// first array will be result as A,B,C,X,Y,Z +#define WX_PREPEND_ARRAY(array, other) \ + { \ + size_t wxAAcnt = (other).size(); \ + (array).reserve(wxAAcnt); \ + for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \ + { \ + (array).Insert((other)[wxAAn], wxAAn); \ + } \ + } + +// append all element of one array to another one +#define WX_APPEND_ARRAY(array, other) \ + { \ + size_t wxAAcnt = (other).size(); \ + (array).reserve(wxAAcnt); \ + for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \ + { \ + (array).push_back((other)[wxAAn]); \ + } \ + } + +// delete all array elements +// +// NB: the class declaration of the array elements must be visible from the +// place where you use this macro, otherwise the proper destructor may not +// be called (a decent compiler should give a warning about it, but don't +// count on it)! +#define WX_CLEAR_ARRAY(array) \ + { \ + size_t wxAAcnt = (array).size(); \ + for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \ + { \ + delete (array)[wxAAn]; \ + } \ + \ + (array).clear(); \ + } + +#endif // _DYNARRAY_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dynlib.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dynlib.h new file mode 100644 index 0000000000..5487ccc949 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dynlib.h @@ -0,0 +1,417 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dynlib.h +// Purpose: Dynamic library loading classes +// Author: Guilhem Lavaux, Vadim Zeitlin, Vaclav Slavik +// Modified by: +// Created: 20/07/98 +// Copyright: (c) 1998 Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DYNLIB_H__ +#define _WX_DYNLIB_H__ + +#include "wx/defs.h" + +#if wxUSE_DYNLIB_CLASS + +#include "wx/string.h" +#include "wx/dynarray.h" + +// note that we have our own dlerror() implementation under Darwin +#if (defined(HAVE_DLERROR) && !defined(__EMX__)) || defined(__DARWIN__) + #define wxHAVE_DYNLIB_ERROR +#endif + +class WXDLLIMPEXP_FWD_BASE wxDynamicLibraryDetailsCreator; + +// ---------------------------------------------------------------------------- +// conditional compilation +// ---------------------------------------------------------------------------- + +// Note: __OS2__/EMX has to be tested first, since we want to use +// native version, even if configure detected presence of DLOPEN. +#if defined(__OS2__) || defined(__EMX__) || defined(__WINDOWS__) + typedef WXHMODULE wxDllType; +#elif defined(__DARWIN__) + // Don't include dlfcn.h on Darwin, we may be using our own replacements. + typedef void *wxDllType; +#elif defined(HAVE_DLOPEN) + #include + typedef void *wxDllType; +#elif defined(HAVE_SHL_LOAD) + #include + typedef shl_t wxDllType; +#elif defined(__WXMAC__) + #include + typedef CFragConnectionID wxDllType; +#else + #error "Dynamic Loading classes can't be compiled on this platform, sorry." +#endif + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +enum wxDLFlags +{ + wxDL_LAZY = 0x00000001, // resolve undefined symbols at first use + // (only works on some Unix versions) + wxDL_NOW = 0x00000002, // resolve undefined symbols on load + // (default, always the case under Win32) + wxDL_GLOBAL = 0x00000004, // export extern symbols to subsequently + // loaded libs. + wxDL_VERBATIM = 0x00000008, // attempt to load the supplied library + // name without appending the usual dll + // filename extension. + + // this flag is obsolete, don't use + wxDL_NOSHARE = 0x00000010, // load new DLL, don't reuse already loaded + // (only for wxPluginManager) + + wxDL_QUIET = 0x00000020, // don't log an error if failed to load + + // this flag is dangerous, for internal use of wxMSW only, don't use at all + // and especially don't use directly, use wxLoadedDLL instead if you really + // do need it + wxDL_GET_LOADED = 0x00000040, // Win32 only: return handle of already + // loaded DLL or NULL otherwise; Unload() + // should not be called so don't forget to + // Detach() if you use this function + + wxDL_DEFAULT = wxDL_NOW // default flags correspond to Win32 +}; + +enum wxDynamicLibraryCategory +{ + wxDL_LIBRARY, // standard library + wxDL_MODULE // loadable module/plugin +}; + +enum wxPluginCategory +{ + wxDL_PLUGIN_GUI, // plugin that uses GUI classes + wxDL_PLUGIN_BASE // wxBase-only plugin +}; + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// when loading a function from a DLL you always have to cast the returned +// "void *" pointer to the correct type and, even more annoyingly, you have to +// repeat this type twice if you want to declare and define a function pointer +// all in one line +// +// this macro makes this slightly less painful by allowing you to specify the +// type only once, as the first parameter, and creating a variable of this type +// called "pfn" initialized with the "name" from the "dynlib" +#define wxDYNLIB_FUNCTION(type, name, dynlib) \ + type pfn ## name = (type)(dynlib).GetSymbol(wxT(#name)) + + +// a more convenient function replacing wxDYNLIB_FUNCTION above +// +// it uses the convention that the type of the function is its name suffixed +// with "_t" but it doesn't define a variable but just assigns the loaded value +// to it and also allows to pass it the prefix to be used instead of hardcoding +// "pfn" (the prefix can be "m_" or "gs_pfn" or whatever) +// +// notice that this function doesn't generate error messages if the symbol +// couldn't be loaded, the caller should generate the appropriate message +#define wxDL_INIT_FUNC(pfx, name, dynlib) \ + pfx ## name = (name ## _t)(dynlib).RawGetSymbol(#name) + +#ifdef __WINDOWS__ + +// same as wxDL_INIT_FUNC() but appends 'A' or 'W' to the function name, see +// wxDynamicLibrary::GetSymbolAorW() +#define wxDL_INIT_FUNC_AW(pfx, name, dynlib) \ + pfx ## name = (name ## _t)(dynlib).GetSymbolAorW(#name) + +#endif // __WINDOWS__ + +// the following macros can be used to redirect a whole library to a class and +// check at run-time if the library is present and contains all required +// methods +// +// notice that they are supposed to be used inside a class which has "m_ok" +// member variable indicating if the library had been successfully loaded + +// helper macros constructing the name of the variable storing the function +// pointer and the name of its type from the function name +#define wxDL_METHOD_NAME(name) m_pfn ## name +#define wxDL_METHOD_TYPE(name) name ## _t + +// parameters are: +// - rettype: return type of the function, e.g. "int" +// - name: name of the function, e.g. "foo" +// - args: function signature in parentheses, e.g. "(int x, int y)" +// - argnames: the names of the parameters in parentheses, e.g. "(x, y)" +// - defret: the value to return if the library wasn't successfully loaded +#define wxDL_METHOD_DEFINE( rettype, name, args, argnames, defret ) \ + typedef rettype (* wxDL_METHOD_TYPE(name)) args ; \ + wxDL_METHOD_TYPE(name) wxDL_METHOD_NAME(name); \ + rettype name args \ + { return m_ok ? wxDL_METHOD_NAME(name) argnames : defret; } + +#define wxDL_VOIDMETHOD_DEFINE( name, args, argnames ) \ + typedef void (* wxDL_METHOD_TYPE(name)) args ; \ + wxDL_METHOD_TYPE(name) wxDL_METHOD_NAME(name); \ + void name args \ + { if ( m_ok ) wxDL_METHOD_NAME(name) argnames ; } + +#define wxDL_METHOD_LOAD(lib, name) \ + wxDL_METHOD_NAME(name) = \ + (wxDL_METHOD_TYPE(name)) lib.GetSymbol(#name, &m_ok); \ + if ( !m_ok ) return false + +// ---------------------------------------------------------------------------- +// wxDynamicLibraryDetails: contains details about a loaded wxDynamicLibrary +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxDynamicLibraryDetails +{ +public: + // ctor, normally never used as these objects are only created by + // wxDynamicLibrary::ListLoaded() + wxDynamicLibraryDetails() { m_address = NULL; m_length = 0; } + + // get the (base) name + wxString GetName() const { return m_name; } + + // get the full path of this object + wxString GetPath() const { return m_path; } + + // get the load address and the extent, return true if this information is + // available + bool GetAddress(void **addr, size_t *len) const + { + if ( !m_address ) + return false; + + if ( addr ) + *addr = m_address; + if ( len ) + *len = m_length; + + return true; + } + + // return the version of the DLL (may be empty if no version info) + wxString GetVersion() const + { + return m_version; + } + +private: + wxString m_name, + m_path, + m_version; + + void *m_address; + size_t m_length; + + friend class wxDynamicLibraryDetailsCreator; +}; + +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDynamicLibraryDetails, + wxDynamicLibraryDetailsArray, + WXDLLIMPEXP_BASE); + +// ---------------------------------------------------------------------------- +// wxDynamicLibrary: represents a handle to a DLL/shared object +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxDynamicLibrary +{ +public: + // return a valid handle for the main program itself or NULL if back + // linking is not supported by the current platform (e.g. Win32) + static wxDllType GetProgramHandle(); + + // return the platform standard DLL extension (with leading dot) + static wxString GetDllExt(wxDynamicLibraryCategory cat = wxDL_LIBRARY); + + wxDynamicLibrary() : m_handle(0) { } + wxDynamicLibrary(const wxString& libname, int flags = wxDL_DEFAULT) + : m_handle(0) + { + Load(libname, flags); + } + + // NOTE: this class is (deliberately) not virtual, do not attempt + // to use it polymorphically. + ~wxDynamicLibrary() { Unload(); } + + // return true if the library was loaded successfully + bool IsLoaded() const { return m_handle != 0; } + + // load the library with the given name (full or not), return true if ok + bool Load(const wxString& libname, int flags = wxDL_DEFAULT); + + // raw function for loading dynamic libs: always behaves as if + // wxDL_VERBATIM were specified and doesn't log error message if the + // library couldn't be loaded but simply returns NULL + static wxDllType RawLoad(const wxString& libname, int flags = wxDL_DEFAULT); + + // detach the library object from its handle, i.e. prevent the object from + // unloading the library in its dtor -- the caller is now responsible for + // doing this + wxDllType Detach() { wxDllType h = m_handle; m_handle = 0; return h; } + + // unload the given library handle (presumably returned by Detach() before) + static void Unload(wxDllType handle); + + // unload the library, also done automatically in dtor + void Unload() { if ( IsLoaded() ) { Unload(m_handle); m_handle = 0; } } + + // Return the raw handle from dlopen and friends. + wxDllType GetLibHandle() const { return m_handle; } + + // check if the given symbol is present in the library, useful to verify if + // a loadable module is our plugin, for example, without provoking error + // messages from GetSymbol() + bool HasSymbol(const wxString& name) const + { + bool ok; + DoGetSymbol(name, &ok); + return ok; + } + + // resolve a symbol in a loaded DLL, such as a variable or function name. + // 'name' is the (possibly mangled) name of the symbol. (use extern "C" to + // export unmangled names) + // + // Since it is perfectly valid for the returned symbol to actually be NULL, + // that is not always indication of an error. Pass and test the parameter + // 'success' for a true indication of success or failure to load the + // symbol. + // + // Returns a pointer to the symbol on success, or NULL if an error occurred + // or the symbol wasn't found. + void *GetSymbol(const wxString& name, bool *success = NULL) const; + + // low-level version of GetSymbol() + static void *RawGetSymbol(wxDllType handle, const wxString& name); + void *RawGetSymbol(const wxString& name) const + { +#if defined (__WXPM__) || defined(__EMX__) + return GetSymbol(name); +#else + return RawGetSymbol(m_handle, name); +#endif + } + +#ifdef __WINDOWS__ + // this function is useful for loading functions from the standard Windows + // DLLs: such functions have an 'A' (in ANSI build) or 'W' (in Unicode, or + // wide character build) suffix if they take string parameters + static void *RawGetSymbolAorW(wxDllType handle, const wxString& name) + { + return RawGetSymbol + ( + handle, + name + +#if wxUSE_UNICODE + L'W' +#else + 'A' +#endif + ); + } + + void *GetSymbolAorW(const wxString& name) const + { + return RawGetSymbolAorW(m_handle, name); + } +#endif // __WINDOWS__ + + // return all modules/shared libraries in the address space of this process + // + // returns an empty array if not implemented or an error occurred + static wxDynamicLibraryDetailsArray ListLoaded(); + + // return platform-specific name of dynamic library with proper extension + // and prefix (e.g. "foo.dll" on Windows or "libfoo.so" on Linux) + static wxString CanonicalizeName(const wxString& name, + wxDynamicLibraryCategory cat = wxDL_LIBRARY); + + // return name of wxWidgets plugin (adds compiler and version info + // to the filename): + static wxString + CanonicalizePluginName(const wxString& name, + wxPluginCategory cat = wxDL_PLUGIN_GUI); + + // return plugin directory on platforms where it makes sense and empty + // string on others: + static wxString GetPluginsDirectory(); + + +#ifdef __WINDOWS__ + // return the handle (HMODULE/HINSTANCE) of the DLL with the given name + // and/or containing the specified address: for XP and later systems only + // the address is used and the name is ignored but for the previous systems + // only the name (which may be either a full path to the DLL or just its + // base name, possibly even without extension) is used + // + // the returned handle reference count is not incremented so it doesn't + // need to be freed using FreeLibrary() but it also means that it can + // become invalid if the DLL is unloaded + static WXHMODULE MSWGetModuleHandle(const wxString& name, void *addr); +#endif // __WINDOWS__ + +protected: + // common part of GetSymbol() and HasSymbol() + void *DoGetSymbol(const wxString& name, bool *success = 0) const; + +#ifdef wxHAVE_DYNLIB_ERROR + // log the error after a dlxxx() function failure + static void Error(); +#endif // wxHAVE_DYNLIB_ERROR + + + // the handle to DLL or NULL + wxDllType m_handle; + + // no copy ctor/assignment operators (or we'd try to unload the library + // twice) + wxDECLARE_NO_COPY_CLASS(wxDynamicLibrary); +}; + +#ifdef __WINDOWS__ + +// ---------------------------------------------------------------------------- +// wxLoadedDLL is a MSW-only internal helper class allowing to dynamically bind +// to a DLL already loaded into the project address space +// ---------------------------------------------------------------------------- + +class wxLoadedDLL : public wxDynamicLibrary +{ +public: + wxLoadedDLL(const wxString& dllname) + : wxDynamicLibrary(dllname, wxDL_GET_LOADED | wxDL_VERBATIM | wxDL_QUIET) + { + } + + ~wxLoadedDLL() + { + Detach(); + } +}; + +#endif // __WINDOWS__ + +// ---------------------------------------------------------------------------- +// Interesting defines +// ---------------------------------------------------------------------------- + +#define WXDLL_ENTRY_FUNCTION() \ +extern "C" WXEXPORT const wxClassInfo *wxGetClassFirst(); \ +const wxClassInfo *wxGetClassFirst() { \ + return wxClassInfo::GetFirst(); \ +} + +#endif // wxUSE_DYNLIB_CLASS + +#endif // _WX_DYNLIB_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/dynload.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dynload.h new file mode 100644 index 0000000000..7cb4d25bac --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/dynload.h @@ -0,0 +1,155 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/dynload.h +// Purpose: Dynamic loading framework +// Author: Ron Lee, David Falkinder, Vadim Zeitlin and a cast of 1000's +// (derived in part from dynlib.cpp (c) 1998 Guilhem Lavaux) +// Modified by: +// Created: 03/12/01 +// Copyright: (c) 2001 Ron Lee +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DYNAMICLOADER_H__ +#define _WX_DYNAMICLOADER_H__ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_DYNAMIC_LOADER + +#include "wx/dynlib.h" +#include "wx/hashmap.h" +#include "wx/module.h" + +class WXDLLIMPEXP_FWD_BASE wxPluginLibrary; + + +WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxPluginLibrary *, wxDLManifest, + class WXDLLIMPEXP_BASE); +typedef wxDLManifest wxDLImports; + +// --------------------------------------------------------------------------- +// wxPluginLibrary +// --------------------------------------------------------------------------- + +// NOTE: Do not attempt to use a base class pointer to this class. +// wxDL is not virtual and we deliberately hide some of it's +// methods here. +// +// Unless you know exacty why you need to, you probably shouldn't +// instantiate this class directly anyway, use wxPluginManager +// instead. + +class WXDLLIMPEXP_BASE wxPluginLibrary : public wxDynamicLibrary +{ +public: + + static wxDLImports* ms_classes; // Static hash of all imported classes. + + wxPluginLibrary( const wxString &libname, int flags = wxDL_DEFAULT ); + ~wxPluginLibrary(); + + wxPluginLibrary *RefLib(); + bool UnrefLib(); + + // These two are called by the PluginSentinel on (PLUGGABLE) object + // creation/destruction. There is usually no reason for the user to + // call them directly. We have to separate this from the link count, + // since the two are not interchangeable. + + // FIXME: for even better debugging PluginSentinel should register + // the name of the class created too, then we can state + // exactly which object was not destroyed which may be + // difficult to find otherwise. Also this code should + // probably only be active in DEBUG mode, but let's just + // get it right first. + + void RefObj() { ++m_objcount; } + void UnrefObj() + { + wxASSERT_MSG( m_objcount > 0, wxT("Too many objects deleted??") ); + --m_objcount; + } + + // Override/hide some base class methods + + bool IsLoaded() const { return m_linkcount > 0; } + void Unload() { UnrefLib(); } + +private: + + // These pointers may be NULL but if they are not, then m_ourLast follows + // m_ourFirst in the linked list, i.e. can be found by calling GetNext() a + // sufficient number of times. + const wxClassInfo *m_ourFirst; // first class info in this plugin + const wxClassInfo *m_ourLast; // ..and the last one + + size_t m_linkcount; // Ref count of library link calls + size_t m_objcount; // ..and (pluggable) object instantiations. + wxModuleList m_wxmodules; // any wxModules that we initialised. + + void UpdateClasses(); // Update ms_classes + void RestoreClasses(); // Removes this library from ms_classes + void RegisterModules(); // Init any wxModules in the lib. + void UnregisterModules(); // Cleanup any wxModules we installed. + + wxDECLARE_NO_COPY_CLASS(wxPluginLibrary); +}; + + +class WXDLLIMPEXP_BASE wxPluginManager +{ +public: + + // Static accessors. + + static wxPluginLibrary *LoadLibrary( const wxString &libname, + int flags = wxDL_DEFAULT ); + static bool UnloadLibrary(const wxString &libname); + + // Instance methods. + + wxPluginManager() : m_entry(NULL) {} + wxPluginManager(const wxString &libname, int flags = wxDL_DEFAULT) + { + Load(libname, flags); + } + ~wxPluginManager() { if ( IsLoaded() ) Unload(); } + + bool Load(const wxString &libname, int flags = wxDL_DEFAULT); + void Unload(); + + bool IsLoaded() const { return m_entry && m_entry->IsLoaded(); } + void *GetSymbol(const wxString &symbol, bool *success = 0) + { + return m_entry->GetSymbol( symbol, success ); + } + + static void CreateManifest() { ms_manifest = new wxDLManifest(wxKEY_STRING); } + static void ClearManifest() { delete ms_manifest; ms_manifest = NULL; } + +private: + // return the pointer to the entry for the library with given name in + // ms_manifest or NULL if none + static wxPluginLibrary *FindByName(const wxString& name) + { + const wxDLManifest::iterator i = ms_manifest->find(name); + + return i == ms_manifest->end() ? NULL : i->second; + } + + static wxDLManifest* ms_manifest; // Static hash of loaded libs. + wxPluginLibrary* m_entry; // Cache our entry in the manifest. + + // We could allow this class to be copied if we really + // wanted to, but not without modification. + wxDECLARE_NO_COPY_CLASS(wxPluginManager); +}; + + +#endif // wxUSE_DYNAMIC_LOADER +#endif // _WX_DYNAMICLOADER_H__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/editlbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/editlbox.h new file mode 100644 index 0000000000..7aad2ac205 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/editlbox.h @@ -0,0 +1,99 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/editlbox.h +// Purpose: ListBox with editable items +// Author: Vaclav Slavik +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __WX_EDITLBOX_H__ +#define __WX_EDITLBOX_H__ + +#include "wx/defs.h" + +#if wxUSE_EDITABLELISTBOX + +#include "wx/panel.h" + +class WXDLLIMPEXP_FWD_CORE wxBitmapButton; +class WXDLLIMPEXP_FWD_CORE wxListCtrl; +class WXDLLIMPEXP_FWD_CORE wxListEvent; + +#define wxEL_ALLOW_NEW 0x0100 +#define wxEL_ALLOW_EDIT 0x0200 +#define wxEL_ALLOW_DELETE 0x0400 +#define wxEL_NO_REORDER 0x0800 +#define wxEL_DEFAULT_STYLE (wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE) + +extern WXDLLIMPEXP_DATA_ADV(const char) wxEditableListBoxNameStr[]; + +// This class provides a composite control that lets the +// user easily enter list of strings + +class WXDLLIMPEXP_ADV wxEditableListBox : public wxPanel +{ +public: + wxEditableListBox() { Init(); } + + wxEditableListBox(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxEL_DEFAULT_STYLE, + const wxString& name = wxEditableListBoxNameStr) + { + Init(); + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxEL_DEFAULT_STYLE, + const wxString& name = wxEditableListBoxNameStr); + + void SetStrings(const wxArrayString& strings); + void GetStrings(wxArrayString& strings) const; + + wxListCtrl* GetListCtrl() { return m_listCtrl; } + wxBitmapButton* GetDelButton() { return m_bDel; } + wxBitmapButton* GetNewButton() { return m_bNew; } + wxBitmapButton* GetUpButton() { return m_bUp; } + wxBitmapButton* GetDownButton() { return m_bDown; } + wxBitmapButton* GetEditButton() { return m_bEdit; } + +protected: + wxBitmapButton *m_bDel, *m_bNew, *m_bUp, *m_bDown, *m_bEdit; + wxListCtrl *m_listCtrl; + int m_selection; + long m_style; + + void Init() + { + m_style = 0; + m_selection = 0; + m_bEdit = m_bNew = m_bDel = m_bUp = m_bDown = NULL; + m_listCtrl = NULL; + } + + void OnItemSelected(wxListEvent& event); + void OnEndLabelEdit(wxListEvent& event); + void OnNewItem(wxCommandEvent& event); + void OnDelItem(wxCommandEvent& event); + void OnEditItem(wxCommandEvent& event); + void OnUpItem(wxCommandEvent& event); + void OnDownItem(wxCommandEvent& event); + + DECLARE_CLASS(wxEditableListBox) + DECLARE_EVENT_TABLE() + +private: + void SwapItems(long i1, long i2); + +}; + +#endif // wxUSE_EDITABLELISTBOX + +#endif // __WX_EDITLBOX_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/effects.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/effects.h new file mode 100644 index 0000000000..adaf951c10 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/effects.h @@ -0,0 +1,90 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/effects.h +// Purpose: wxEffects class +// Draws 3D effects. +// Author: Julian Smart et al +// Modified by: +// Created: 25/4/2000 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_EFFECTS_H_ +#define _WX_EFFECTS_H_ + +// this class is deprecated and will be removed in the next wx version +// +// please use wxRenderer::DrawBorder() instead of DrawSunkenEdge(); there is no +// replacement for TileBitmap() but it doesn't seem to be very useful anyhow +#if WXWIN_COMPATIBILITY_2_8 + +/* + * wxEffects: various 3D effects + */ + +#include "wx/object.h" +#include "wx/colour.h" +#include "wx/gdicmn.h" +#include "wx/dc.h" + +class WXDLLIMPEXP_CORE wxEffectsImpl: public wxObject +{ +public: + // Assume system colours + wxEffectsImpl() ; + // Going from lightest to darkest + wxEffectsImpl(const wxColour& highlightColour, const wxColour& lightShadow, + const wxColour& faceColour, const wxColour& mediumShadow, + const wxColour& darkShadow) ; + + // Accessors + wxColour GetHighlightColour() const { return m_highlightColour; } + wxColour GetLightShadow() const { return m_lightShadow; } + wxColour GetFaceColour() const { return m_faceColour; } + wxColour GetMediumShadow() const { return m_mediumShadow; } + wxColour GetDarkShadow() const { return m_darkShadow; } + + void SetHighlightColour(const wxColour& c) { m_highlightColour = c; } + void SetLightShadow(const wxColour& c) { m_lightShadow = c; } + void SetFaceColour(const wxColour& c) { m_faceColour = c; } + void SetMediumShadow(const wxColour& c) { m_mediumShadow = c; } + void SetDarkShadow(const wxColour& c) { m_darkShadow = c; } + + void Set(const wxColour& highlightColour, const wxColour& lightShadow, + const wxColour& faceColour, const wxColour& mediumShadow, + const wxColour& darkShadow) + { + SetHighlightColour(highlightColour); + SetLightShadow(lightShadow); + SetFaceColour(faceColour); + SetMediumShadow(mediumShadow); + SetDarkShadow(darkShadow); + } + + // Draw a sunken edge + void DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize = 1); + + // Tile a bitmap + bool TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap); + +protected: + wxColour m_highlightColour; // Usually white + wxColour m_lightShadow; // Usually light grey + wxColour m_faceColour; // Usually grey + wxColour m_mediumShadow; // Usually dark grey + wxColour m_darkShadow; // Usually black + + DECLARE_CLASS(wxEffectsImpl) +}; + +// current versions of g++ don't generate deprecation warnings for classes +// declared deprecated, so define wxEffects as a typedef instead: this does +// generate warnings with both g++ and VC (which also has no troubles with +// directly deprecating the classes...) +// +// note that this g++ bug (16370) is supposed to be fixed in g++ 4.3.0 +typedef wxEffectsImpl wxDEPRECATED(wxEffects); + +#endif // WXWIN_COMPATIBILITY_2_8 + +#endif // _WX_EFFECTS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/encconv.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/encconv.h new file mode 100644 index 0000000000..bc464785c8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/encconv.h @@ -0,0 +1,153 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/encconv.h +// Purpose: wxEncodingConverter class for converting between different +// font encodings +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ENCCONV_H_ +#define _WX_ENCCONV_H_ + +#include "wx/defs.h" + +#include "wx/object.h" +#include "wx/fontenc.h" +#include "wx/dynarray.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +enum +{ + wxCONVERT_STRICT, + wxCONVERT_SUBSTITUTE +}; + + +enum +{ + wxPLATFORM_CURRENT = -1, + + wxPLATFORM_UNIX = 0, + wxPLATFORM_WINDOWS, + wxPLATFORM_OS2, + wxPLATFORM_MAC +}; + +// ---------------------------------------------------------------------------- +// types +// ---------------------------------------------------------------------------- + +WX_DEFINE_ARRAY_INT(wxFontEncoding, wxFontEncodingArray); + +//-------------------------------------------------------------------------------- +// wxEncodingConverter +// This class is capable of converting strings between any two +// 8bit encodings/charsets. It can also convert from/to Unicode +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxEncodingConverter : public wxObject +{ + public: + + wxEncodingConverter(); + virtual ~wxEncodingConverter() { if (m_Table) delete[] m_Table; } + + // Initialize conversion. Both output or input encoding may + // be wxFONTENCODING_UNICODE. + // + // All subsequent calls to Convert() will interpret it's argument + // as a string in input_enc encoding and will output string in + // output_enc encoding. + // + // You must call this method before calling Convert. You may call + // it more than once in order to switch to another conversion + // + // Method affects behaviour of Convert() in case input character + // cannot be converted because it does not exist in output encoding: + // wxCONVERT_STRICT -- + // follow behaviour of GNU Recode - just copy unconvertable + // characters to output and don't change them (it's integer + // value will stay the same) + // wxCONVERT_SUBSTITUTE -- + // try some (lossy) substitutions - e.g. replace + // unconvertable latin capitals with acute by ordinary + // capitals, replace en-dash or em-dash by '-' etc. + // both modes guarantee that output string will have same length + // as input string + // + // Returns false if given conversion is impossible, true otherwise + // (conversion may be impossible either if you try to convert + // to Unicode with non-Unicode build of wxWidgets or if input + // or output encoding is not supported.) + bool Init(wxFontEncoding input_enc, wxFontEncoding output_enc, int method = wxCONVERT_STRICT); + + // Convert input string according to settings passed to Init. + // Note that you must call Init before using Convert! + bool Convert(const char* input, char* output) const; + bool Convert(char* str) const { return Convert(str, str); } + wxString Convert(const wxString& input) const; + + bool Convert(const char* input, wchar_t* output) const; + bool Convert(const wchar_t* input, char* output) const; + bool Convert(const wchar_t* input, wchar_t* output) const; + bool Convert(wchar_t* str) const { return Convert(str, str); } + + // Return equivalent(s) for given font that are used + // under given platform. wxPLATFORM_CURRENT means the plaform + // this binary was compiled for + // + // Examples: + // current platform enc returned value + // ----------------------------------------------------- + // unix CP1250 {ISO8859_2} + // unix ISO8859_2 {} + // windows ISO8859_2 {CP1250} + // + // Equivalence is defined in terms of convertibility: + // 2 encodings are equivalent if you can convert text between + // then without losing information (it may - and will - happen + // that you lose special chars like quotation marks or em-dashes + // but you shouldn't lose any diacritics and language-specific + // characters when converting between equivalent encodings). + // + // Convert() method is not limited to converting between + // equivalent encodings, it can convert between arbitrary + // two encodings! + // + // Remember that this function does _NOT_ check for presence of + // fonts in system. It only tells you what are most suitable + // encodings. (It usually returns only one encoding) + // + // Note that argument enc itself may be present in returned array! + // (so that you can -- as a side effect -- detect whether the + // encoding is native for this platform or not) + static wxFontEncodingArray GetPlatformEquivalents(wxFontEncoding enc, int platform = wxPLATFORM_CURRENT); + + // Similar to GetPlatformEquivalent, but this one will return ALL + // equivalent encodings, regardless the platform, including itself. + static wxFontEncodingArray GetAllEquivalents(wxFontEncoding enc); + + // Return true if [any text in] one multibyte encoding can be + // converted to another one losslessly. + // + // Do not call this with wxFONTENCODING_UNICODE, it doesn't make + // sense (always works in one sense and always depends on the text + // to convert in the other) + static bool CanConvert(wxFontEncoding encIn, wxFontEncoding encOut) + { + return GetAllEquivalents(encIn).Index(encOut) != wxNOT_FOUND; + } + + private: + wchar_t *m_Table; + bool m_UnicodeInput, m_UnicodeOutput; + bool m_JustCopy; + + wxDECLARE_NO_COPY_CLASS(wxEncodingConverter); +}; + +#endif // _WX_ENCCONV_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/encinfo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/encinfo.h new file mode 100644 index 0000000000..27b1453847 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/encinfo.h @@ -0,0 +1,66 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/encinfo.h +// Purpose: declares wxNativeEncodingInfo struct +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.09.2003 (extracted from wx/fontenc.h) +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ENCINFO_H_ +#define _WX_ENCINFO_H_ + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// wxNativeEncodingInfo contains all encoding parameters for this platform +// ---------------------------------------------------------------------------- + +// This private structure specifies all the parameters needed to create a font +// with the given encoding on this platform. +// +// Under X, it contains the last 2 elements of the font specifications +// (registry and encoding). +// +// Under Windows, it contains a number which is one of predefined CHARSET_XXX +// values. +// +// Under all platforms it also contains a facename string which should be +// used, if not empty, to create fonts in this encoding (this is the only way +// to create a font of non-standard encoding (like KOI8) under Windows - the +// facename specifies the encoding then) + +struct WXDLLIMPEXP_CORE wxNativeEncodingInfo +{ + wxString facename; // may be empty meaning "any" + wxFontEncoding encoding; // so that we know what this struct represents + +#if defined(__WXMSW__) || \ + defined(__WXPM__) || \ + defined(__WXMAC__) || \ + defined(__WXCOCOA__) // FIXME: __WXCOCOA__ + + wxNativeEncodingInfo() + : facename() + , encoding(wxFONTENCODING_SYSTEM) + , charset(0) /* ANSI_CHARSET */ + { } + + int charset; +#elif defined(_WX_X_FONTLIKE) + wxString xregistry, + xencoding; +#elif defined(wxHAS_UTF8_FONTS) + // ports using UTF-8 for text don't need encoding information for fonts +#else + #error "Unsupported toolkit" +#endif + // this struct is saved in config by wxFontMapper, so it should know to + // serialise itself (implemented in platform-specific code) + bool FromString(const wxString& s); + wxString ToString() const; +}; + +#endif // _WX_ENCINFO_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/event.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/event.h new file mode 100644 index 0000000000..5ec79071ca --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/event.h @@ -0,0 +1,4554 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/event.h +// Purpose: Event classes +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_EVENT_H_ +#define _WX_EVENT_H_ + +#include "wx/defs.h" +#include "wx/cpp.h" +#include "wx/object.h" +#include "wx/clntdata.h" + +#if wxUSE_GUI + #include "wx/gdicmn.h" + #include "wx/cursor.h" + #include "wx/mousestate.h" +#endif + +#include "wx/dynarray.h" +#include "wx/thread.h" +#include "wx/tracker.h" +#include "wx/typeinfo.h" +#include "wx/any.h" + +#ifdef wxHAS_EVENT_BIND + #include "wx/meta/convertible.h" +#endif + +// Currently VC6 and VC7 are known to not be able to compile CallAfter() code, +// so disable it for them. +#if !defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(8) + #include "wx/meta/removeref.h" + + #define wxHAS_CALL_AFTER +#endif + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxList; +class WXDLLIMPEXP_FWD_BASE wxEvent; +class WXDLLIMPEXP_FWD_BASE wxEventFilter; +#if wxUSE_GUI + class WXDLLIMPEXP_FWD_CORE wxDC; + class WXDLLIMPEXP_FWD_CORE wxMenu; + class WXDLLIMPEXP_FWD_CORE wxWindow; + class WXDLLIMPEXP_FWD_CORE wxWindowBase; +#endif // wxUSE_GUI + +// We operate with pointer to members of wxEvtHandler (such functions are used +// as event handlers in the event tables or as arguments to Connect()) but by +// default MSVC uses a restricted (but more efficient) representation of +// pointers to members which can't deal with multiple base classes. To avoid +// mysterious (as the compiler is not good enough to detect this and give a +// sensible error message) errors in the user code as soon as it defines +// classes inheriting from both wxEvtHandler (possibly indirectly, e.g. via +// wxWindow) and something else (including our own wxTrackable but not limited +// to it), we use the special MSVC keyword telling the compiler to use a more +// general pointer to member representation for the classes inheriting from +// wxEvtHandler. +#ifdef __VISUALC__ + #define wxMSVC_FWD_MULTIPLE_BASES __multiple_inheritance +#else + #define wxMSVC_FWD_MULTIPLE_BASES +#endif + +class WXDLLIMPEXP_FWD_BASE wxMSVC_FWD_MULTIPLE_BASES wxEvtHandler; +class wxEventConnectionRef; + +// ---------------------------------------------------------------------------- +// Event types +// ---------------------------------------------------------------------------- + +typedef int wxEventType; + +#define wxEVT_ANY ((wxEventType)-1) + +// this is used to make the event table entry type safe, so that for an event +// handler only a function with proper parameter list can be given. See also +// the wxEVENT_HANDLER_CAST-macro. +#define wxStaticCastEvent(type, val) static_cast(val) + +#define wxDECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \ + wxEventTableEntry(type, winid, idLast, wxNewEventTableFunctor(type, fn), obj) + +#define wxDECLARE_EVENT_TABLE_TERMINATOR() \ + wxEventTableEntry(wxEVT_NULL, 0, 0, 0, 0) + +// generate a new unique event type +extern WXDLLIMPEXP_BASE wxEventType wxNewEventType(); + +// define macros to create new event types: +#ifdef wxHAS_EVENT_BIND + // events are represented by an instance of wxEventTypeTag and the + // corresponding type must be specified for type-safety checks + + // define a new custom event type, can be used alone or after event + // declaration in the header using one of the macros below + #define wxDEFINE_EVENT( name, type ) \ + const wxEventTypeTag< type > name( wxNewEventType() ) + + // the general version allowing exporting the event type from DLL, used by + // wxWidgets itself + #define wxDECLARE_EXPORTED_EVENT( expdecl, name, type ) \ + extern const expdecl wxEventTypeTag< type > name + + // this is the version which will normally be used in the user code + #define wxDECLARE_EVENT( name, type ) \ + wxDECLARE_EXPORTED_EVENT( wxEMPTY_PARAMETER_VALUE, name, type ) + + + // these macros are only used internally for backwards compatibility and + // allow to define an alias for an existing event type (this is used by + // wxEVT_SPIN_XXX) + #define wxDEFINE_EVENT_ALIAS( name, type, value ) \ + const wxEventTypeTag< type > name( value ) + + #define wxDECLARE_EXPORTED_EVENT_ALIAS( expdecl, name, type ) \ + extern const expdecl wxEventTypeTag< type > name +#else // !wxHAS_EVENT_BIND + // the macros are the same ones as above but defined differently as we only + // use the integer event type values to identify events in this case + + #define wxDEFINE_EVENT( name, type ) \ + const wxEventType name( wxNewEventType() ) + + #define wxDECLARE_EXPORTED_EVENT( expdecl, name, type ) \ + extern const expdecl wxEventType name + #define wxDECLARE_EVENT( name, type ) \ + wxDECLARE_EXPORTED_EVENT( wxEMPTY_PARAMETER_VALUE, name, type ) + + #define wxDEFINE_EVENT_ALIAS( name, type, value ) \ + const wxEventType name = value + #define wxDECLARE_EXPORTED_EVENT_ALIAS( expdecl, name, type ) \ + extern const expdecl wxEventType name +#endif // wxHAS_EVENT_BIND/!wxHAS_EVENT_BIND + +// Try to cast the given event handler to the correct handler type: + +#define wxEVENT_HANDLER_CAST( functype, func ) \ + ( wxObjectEventFunction )( wxEventFunction )wxStaticCastEvent( functype, &func ) + + +#ifdef wxHAS_EVENT_BIND + +// The tag is a type associated to the event type (which is an integer itself, +// in spite of its name) value. It exists in order to be used as a template +// parameter and provide a mapping between the event type values and their +// corresponding wxEvent-derived classes. +template +class wxEventTypeTag +{ +public: + // The class of wxEvent-derived class carried by the events of this type. + typedef T EventClass; + + wxEventTypeTag(wxEventType type) { m_type = type; } + + // Return a wxEventType reference for the initialization of the static + // event tables. See wxEventTableEntry::m_eventType for a more thorough + // explanation. + operator const wxEventType&() const { return m_type; } + +private: + wxEventType m_type; +}; + +#endif // wxHAS_EVENT_BIND + +// These are needed for the functor definitions +typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&); + +// We had some trouble (specifically with eVC for ARM WinCE build) with using +// wxEventFunction in the past so we had introduced wxObjectEventFunction which +// used to be a typedef for a member of wxObject and not wxEvtHandler to work +// around this but as eVC is not really supported any longer we now only keep +// this for backwards compatibility and, despite its name, this is a typedef +// for wxEvtHandler member now -- but if we have the same problem with another +// compiler we can restore its old definition for it. +typedef wxEventFunction wxObjectEventFunction; + +// The event functor which is stored in the static and dynamic event tables: +class WXDLLIMPEXP_BASE wxEventFunctor +{ +public: + virtual ~wxEventFunctor(); + + // Invoke the actual event handler: + virtual void operator()(wxEvtHandler *, wxEvent&) = 0; + + // this function tests whether this functor is matched, for the purpose of + // finding it in an event table in Unbind(), by the given functor: + virtual bool IsMatching(const wxEventFunctor& functor) const = 0; + + // If the functor holds an wxEvtHandler, then get access to it and track + // its lifetime with wxEventConnectionRef: + virtual wxEvtHandler *GetEvtHandler() const + { return NULL; } + + // This is only used to maintain backward compatibility in + // wxAppConsoleBase::CallEventHandler and ensures that an overwritten + // wxAppConsoleBase::HandleEvent is still called for functors which hold an + // wxEventFunction: + virtual wxEventFunction GetEvtMethod() const + { return NULL; } + +private: + WX_DECLARE_ABSTRACT_TYPEINFO(wxEventFunctor) +}; + +// A plain method functor for the untyped legacy event types: +class WXDLLIMPEXP_BASE wxObjectEventFunctor : public wxEventFunctor +{ +public: + wxObjectEventFunctor(wxObjectEventFunction method, wxEvtHandler *handler) + : m_handler( handler ), m_method( method ) + { } + + virtual void operator()(wxEvtHandler *handler, wxEvent& event); + + virtual bool IsMatching(const wxEventFunctor& functor) const + { + if ( wxTypeId(functor) == wxTypeId(*this) ) + { + const wxObjectEventFunctor &other = + static_cast< const wxObjectEventFunctor & >( functor ); + + // FIXME-VC6: amazing but true: replacing "m_method == 0" here + // with "!m_method" makes VC6 crash with an ICE in DLL build (only!) + // Also notice that using "NULL" instead of "0" results in warnings + // about "using NULL in arithmetics" from arm-linux-androideabi-g++ + // 4.4.3 used for wxAndroid build. + + return ( m_method == other.m_method || other.m_method == 0 ) && + ( m_handler == other.m_handler || other.m_handler == NULL ); + } + else + return false; + } + + virtual wxEvtHandler *GetEvtHandler() const + { return m_handler; } + + virtual wxEventFunction GetEvtMethod() const + { return m_method; } + +private: + wxEvtHandler *m_handler; + wxEventFunction m_method; + + // Provide a dummy default ctor for type info purposes + wxObjectEventFunctor() { } + + WX_DECLARE_TYPEINFO_INLINE(wxObjectEventFunctor) +}; + +// Create a functor for the legacy events: used by Connect() +inline wxObjectEventFunctor * +wxNewEventFunctor(const wxEventType& WXUNUSED(evtType), + wxObjectEventFunction method, + wxEvtHandler *handler) +{ + return new wxObjectEventFunctor(method, handler); +} + +// This version is used by wxDECLARE_EVENT_TABLE_ENTRY() +inline wxObjectEventFunctor * +wxNewEventTableFunctor(const wxEventType& WXUNUSED(evtType), + wxObjectEventFunction method) +{ + return new wxObjectEventFunctor(method, NULL); +} + +inline wxObjectEventFunctor +wxMakeEventFunctor(const wxEventType& WXUNUSED(evtType), + wxObjectEventFunction method, + wxEvtHandler *handler) +{ + return wxObjectEventFunctor(method, handler); +} + +#ifdef wxHAS_EVENT_BIND + +namespace wxPrivate +{ + +// helper template defining nested "type" typedef as the event class +// corresponding to the given event type +template struct EventClassOf; + +// the typed events provide the information about the class of the events they +// carry themselves: +template +struct EventClassOf< wxEventTypeTag > +{ + typedef typename wxEventTypeTag::EventClass type; +}; + +// for the old untyped events we don't have information about the exact event +// class carried by them +template <> +struct EventClassOf +{ + typedef wxEvent type; +}; + + +// helper class defining operations different for method functors using an +// object of wxEvtHandler-derived class as handler and the others +template struct HandlerImpl; + +// specialization for handlers deriving from wxEvtHandler +template +struct HandlerImpl +{ + static bool IsEvtHandler() + { return true; } + static T *ConvertFromEvtHandler(wxEvtHandler *p) + { return static_cast(p); } + static wxEvtHandler *ConvertToEvtHandler(T *p) + { return p; } + static wxEventFunction ConvertToEvtMethod(void (T::*f)(A&)) + { return static_cast( + reinterpret_cast(f)); } +}; + +// specialization for handlers not deriving from wxEvtHandler +template +struct HandlerImpl +{ + static bool IsEvtHandler() + { return false; } + static T *ConvertFromEvtHandler(wxEvtHandler *) + { return NULL; } + static wxEvtHandler *ConvertToEvtHandler(T *) + { return NULL; } + static wxEventFunction ConvertToEvtMethod(void (T::*)(A&)) + { return NULL; } +}; + +} // namespace wxPrivate + +// functor forwarding the event to a method of the given object +// +// notice that the object class may be different from the class in which the +// method is defined but it must be convertible to this class +// +// also, the type of the handler parameter doesn't need to be exactly the same +// as EventTag::EventClass but it must be its base class -- this is explicitly +// allowed to handle different events in the same handler taking wxEvent&, for +// example +template + +class wxEventFunctorMethod + : public wxEventFunctor, + private wxPrivate::HandlerImpl + < + Class, + EventArg, + wxConvertibleTo::value != 0 + > +{ +private: + static void CheckHandlerArgument(EventArg *) { } + +public: + // the event class associated with the given event tag + typedef typename wxPrivate::EventClassOf::type EventClass; + + + wxEventFunctorMethod(void (Class::*method)(EventArg&), EventHandler *handler) + : m_handler( handler ), m_method( method ) + { + wxASSERT_MSG( handler || this->IsEvtHandler(), + "handlers defined in non-wxEvtHandler-derived classes " + "must be connected with a valid sink object" ); + + // if you get an error here it means that the signature of the handler + // you're trying to use is not compatible with (i.e. is not the same as + // or a base class of) the real event class used for this event type + CheckHandlerArgument(static_cast(NULL)); + } + + virtual void operator()(wxEvtHandler *handler, wxEvent& event) + { + Class * realHandler = m_handler; + if ( !realHandler ) + { + realHandler = this->ConvertFromEvtHandler(handler); + + // this is not supposed to happen but check for it nevertheless + wxCHECK_RET( realHandler, "invalid event handler" ); + } + + // the real (run-time) type of event is EventClass and we checked in + // the ctor that EventClass can be converted to EventArg, so this cast + // is always valid + (realHandler->*m_method)(static_cast(event)); + } + + virtual bool IsMatching(const wxEventFunctor& functor) const + { + if ( wxTypeId(functor) != wxTypeId(*this) ) + return false; + + typedef wxEventFunctorMethod + ThisFunctor; + + // the cast is valid because wxTypeId()s matched above + const ThisFunctor& other = static_cast(functor); + + return (m_method == other.m_method || other.m_method == NULL) && + (m_handler == other.m_handler || other.m_handler == NULL); + } + + virtual wxEvtHandler *GetEvtHandler() const + { return this->ConvertToEvtHandler(m_handler); } + + virtual wxEventFunction GetEvtMethod() const + { return this->ConvertToEvtMethod(m_method); } + +private: + EventHandler *m_handler; + void (Class::*m_method)(EventArg&); + + // Provide a dummy default ctor for type info purposes + wxEventFunctorMethod() { } + + typedef wxEventFunctorMethod thisClass; + WX_DECLARE_TYPEINFO_INLINE(thisClass) +}; + + +// functor forwarding the event to function (function, static method) +template +class wxEventFunctorFunction : public wxEventFunctor +{ +private: + static void CheckHandlerArgument(EventArg *) { } + +public: + // the event class associated with the given event tag + typedef typename wxPrivate::EventClassOf::type EventClass; + + wxEventFunctorFunction( void ( *handler )( EventArg & )) + : m_handler( handler ) + { + // if you get an error here it means that the signature of the handler + // you're trying to use is not compatible with (i.e. is not the same as + // or a base class of) the real event class used for this event type + CheckHandlerArgument(static_cast(NULL)); + } + + virtual void operator()(wxEvtHandler *WXUNUSED(handler), wxEvent& event) + { + // If you get an error here like "must use .* or ->* to call + // pointer-to-member function" then you probably tried to call + // Bind/Unbind with a method pointer but without a handler pointer or + // NULL as a handler e.g.: + // Unbind( wxEVT_XXX, &EventHandler::method ); + // or + // Unbind( wxEVT_XXX, &EventHandler::method, NULL ) + m_handler(static_cast(event)); + } + + virtual bool IsMatching(const wxEventFunctor &functor) const + { + if ( wxTypeId(functor) != wxTypeId(*this) ) + return false; + + typedef wxEventFunctorFunction ThisFunctor; + + const ThisFunctor& other = static_cast( functor ); + + return m_handler == other.m_handler; + } + +private: + void (*m_handler)(EventArg&); + + // Provide a dummy default ctor for type info purposes + wxEventFunctorFunction() { } + + typedef wxEventFunctorFunction thisClass; + WX_DECLARE_TYPEINFO_INLINE(thisClass) +}; + + +template +class wxEventFunctorFunctor : public wxEventFunctor +{ +public: + typedef typename EventTag::EventClass EventArg; + + wxEventFunctorFunctor(const Functor& handler) + : m_handler(handler), m_handlerAddr(&handler) + { } + + virtual void operator()(wxEvtHandler *WXUNUSED(handler), wxEvent& event) + { + // If you get an error here like "must use '.*' or '->*' to call + // pointer-to-member function" then you probably tried to call + // Bind/Unbind with a method pointer but without a handler pointer or + // NULL as a handler e.g.: + // Unbind( wxEVT_XXX, &EventHandler::method ); + // or + // Unbind( wxEVT_XXX, &EventHandler::method, NULL ) + m_handler(static_cast(event)); + } + + virtual bool IsMatching(const wxEventFunctor &functor) const + { + if ( wxTypeId(functor) != wxTypeId(*this) ) + return false; + + typedef wxEventFunctorFunctor FunctorThis; + + const FunctorThis& other = static_cast(functor); + + // The only reliable/portable way to compare two functors is by + // identity: + return m_handlerAddr == other.m_handlerAddr; + } + +private: + // Store a copy of the functor to prevent using/calling an already + // destroyed instance: + Functor m_handler; + + // Use the address of the original functor for comparison in IsMatching: + const void *m_handlerAddr; + + // Provide a dummy default ctor for type info purposes + wxEventFunctorFunctor() { } + + typedef wxEventFunctorFunctor thisClass; + WX_DECLARE_TYPEINFO_INLINE(thisClass) +}; + +// Create functors for the templatized events, either allocated on the heap for +// wxNewXXX() variants (this is needed in wxEvtHandler::Bind<>() to store them +// in dynamic event table) or just by returning them as temporary objects (this +// is enough for Unbind<>() and we avoid unnecessary heap allocation like this). + + +// Create functors wrapping functions: +template +inline wxEventFunctorFunction * +wxNewEventFunctor(const EventTag&, void (*func)(EventArg &)) +{ + return new wxEventFunctorFunction(func); +} + +template +inline wxEventFunctorFunction +wxMakeEventFunctor(const EventTag&, void (*func)(EventArg &)) +{ + return wxEventFunctorFunction(func); +} + +// Create functors wrapping other functors: +template +inline wxEventFunctorFunctor * +wxNewEventFunctor(const EventTag&, const Functor &func) +{ + return new wxEventFunctorFunctor(func); +} + +template +inline wxEventFunctorFunctor +wxMakeEventFunctor(const EventTag&, const Functor &func) +{ + return wxEventFunctorFunctor(func); +} + +// Create functors wrapping methods: +template + +inline wxEventFunctorMethod * +wxNewEventFunctor(const EventTag&, + void (Class::*method)(EventArg&), + EventHandler *handler) +{ + return new wxEventFunctorMethod( + method, handler); +} + +template + +inline wxEventFunctorMethod +wxMakeEventFunctor(const EventTag&, + void (Class::*method)(EventArg&), + EventHandler *handler) +{ + return wxEventFunctorMethod( + method, handler); +} + +// Create an event functor for the event table via wxDECLARE_EVENT_TABLE_ENTRY: +// in this case we don't have the handler (as it's always the same as the +// object which generated the event) so we must use Class as its type +template +inline wxEventFunctorMethod * +wxNewEventTableFunctor(const EventTag&, void (Class::*method)(EventArg&)) +{ + return new wxEventFunctorMethod( + method, NULL); +} + +#endif // wxHAS_EVENT_BIND + + +// many, but not all, standard event types + + // some generic events +extern WXDLLIMPEXP_BASE const wxEventType wxEVT_NULL; +extern WXDLLIMPEXP_BASE const wxEventType wxEVT_FIRST; +extern WXDLLIMPEXP_BASE const wxEventType wxEVT_USER_FIRST; + + // Need events declared to do this +class WXDLLIMPEXP_FWD_BASE wxIdleEvent; +class WXDLLIMPEXP_FWD_BASE wxThreadEvent; +class WXDLLIMPEXP_FWD_BASE wxAsyncMethodCallEvent; +class WXDLLIMPEXP_FWD_CORE wxCommandEvent; +class WXDLLIMPEXP_FWD_CORE wxMouseEvent; +class WXDLLIMPEXP_FWD_CORE wxFocusEvent; +class WXDLLIMPEXP_FWD_CORE wxChildFocusEvent; +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; +class WXDLLIMPEXP_FWD_CORE wxNavigationKeyEvent; +class WXDLLIMPEXP_FWD_CORE wxSetCursorEvent; +class WXDLLIMPEXP_FWD_CORE wxScrollEvent; +class WXDLLIMPEXP_FWD_CORE wxSpinEvent; +class WXDLLIMPEXP_FWD_CORE wxScrollWinEvent; +class WXDLLIMPEXP_FWD_CORE wxSizeEvent; +class WXDLLIMPEXP_FWD_CORE wxMoveEvent; +class WXDLLIMPEXP_FWD_CORE wxCloseEvent; +class WXDLLIMPEXP_FWD_CORE wxActivateEvent; +class WXDLLIMPEXP_FWD_CORE wxWindowCreateEvent; +class WXDLLIMPEXP_FWD_CORE wxWindowDestroyEvent; +class WXDLLIMPEXP_FWD_CORE wxShowEvent; +class WXDLLIMPEXP_FWD_CORE wxIconizeEvent; +class WXDLLIMPEXP_FWD_CORE wxMaximizeEvent; +class WXDLLIMPEXP_FWD_CORE wxMouseCaptureChangedEvent; +class WXDLLIMPEXP_FWD_CORE wxMouseCaptureLostEvent; +class WXDLLIMPEXP_FWD_CORE wxPaintEvent; +class WXDLLIMPEXP_FWD_CORE wxEraseEvent; +class WXDLLIMPEXP_FWD_CORE wxNcPaintEvent; +class WXDLLIMPEXP_FWD_CORE wxMenuEvent; +class WXDLLIMPEXP_FWD_CORE wxContextMenuEvent; +class WXDLLIMPEXP_FWD_CORE wxSysColourChangedEvent; +class WXDLLIMPEXP_FWD_CORE wxDisplayChangedEvent; +class WXDLLIMPEXP_FWD_CORE wxQueryNewPaletteEvent; +class WXDLLIMPEXP_FWD_CORE wxPaletteChangedEvent; +class WXDLLIMPEXP_FWD_CORE wxJoystickEvent; +class WXDLLIMPEXP_FWD_CORE wxDropFilesEvent; +class WXDLLIMPEXP_FWD_CORE wxInitDialogEvent; +class WXDLLIMPEXP_FWD_CORE wxUpdateUIEvent; +class WXDLLIMPEXP_FWD_CORE wxClipboardTextEvent; +class WXDLLIMPEXP_FWD_CORE wxHelpEvent; + + + // Command events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_BUTTON, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHECKBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHOICE, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LISTBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LISTBOX_DCLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHECKLISTBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SLIDER, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RADIOBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RADIOBUTTON, wxCommandEvent); + +// wxEVT_SCROLLBAR is deprecated, use wxEVT_SCROLL... events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLBAR, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_VLBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_RCLICKED, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_DROPDOWN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_ENTER, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX_DROPDOWN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX_CLOSEUP, wxCommandEvent); + + // Thread and asynchronous method call events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_THREAD, wxThreadEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_ASYNC_METHOD_CALL, wxAsyncMethodCallEvent); + + // Mouse event types +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_DOWN, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_UP, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MIDDLE_DOWN, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MIDDLE_UP, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RIGHT_DOWN, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RIGHT_UP, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOTION, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ENTER_WINDOW, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEAVE_WINDOW, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_DCLICK, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MIDDLE_DCLICK, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RIGHT_DCLICK, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SET_FOCUS, wxFocusEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_KILL_FOCUS, wxFocusEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHILD_FOCUS, wxChildFocusEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOUSEWHEEL, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX1_DOWN, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX1_UP, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX1_DCLICK, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_DOWN, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_UP, wxMouseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_DCLICK, wxMouseEvent); + + // Character input event type +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHAR, wxKeyEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHAR_HOOK, wxKeyEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_NAVIGATION_KEY, wxNavigationKeyEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_KEY_DOWN, wxKeyEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_KEY_UP, wxKeyEvent); +#if wxUSE_HOTKEY +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HOTKEY, wxKeyEvent); +#endif +// This is a private event used by wxMSW code only and subject to change or +// disappear in the future. Don't use. +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AFTER_CHAR, wxKeyEvent); + + // Set cursor event +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SET_CURSOR, wxSetCursorEvent); + + // wxScrollBar and wxSlider event identifiers +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_TOP, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_BOTTOM, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_LINEUP, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_LINEDOWN, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_PAGEUP, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_PAGEDOWN, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_THUMBTRACK, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_THUMBRELEASE, wxScrollEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_CHANGED, wxScrollEvent); + +// Due to a bug in older wx versions, wxSpinEvents were being sent with type of +// wxEVT_SCROLL_LINEUP, wxEVT_SCROLL_LINEDOWN and wxEVT_SCROLL_THUMBTRACK. But +// with the type-safe events in place, these event types are associated with +// wxScrollEvent. To allow handling of spin events, new event types have been +// defined in spinbutt.h/spinnbuttcmn.cpp. To maintain backward compatibility +// the spin event types are being initialized with the scroll event types. + +#if wxUSE_SPINBTN + +wxDECLARE_EXPORTED_EVENT_ALIAS( WXDLLIMPEXP_CORE, wxEVT_SPIN_UP, wxSpinEvent ); +wxDECLARE_EXPORTED_EVENT_ALIAS( WXDLLIMPEXP_CORE, wxEVT_SPIN_DOWN, wxSpinEvent ); +wxDECLARE_EXPORTED_EVENT_ALIAS( WXDLLIMPEXP_CORE, wxEVT_SPIN, wxSpinEvent ); + +#endif + + // Scroll events from wxWindow +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_TOP, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_BOTTOM, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_LINEUP, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_LINEDOWN, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_PAGEUP, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_PAGEDOWN, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_THUMBTRACK, wxScrollWinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_THUMBRELEASE, wxScrollWinEvent); + + // System events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SIZE, wxSizeEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVE, wxMoveEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CLOSE_WINDOW, wxCloseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_END_SESSION, wxCloseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_QUERY_END_SESSION, wxCloseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ACTIVATE_APP, wxActivateEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ACTIVATE, wxActivateEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CREATE, wxWindowCreateEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DESTROY, wxWindowDestroyEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SHOW, wxShowEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ICONIZE, wxIconizeEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MAXIMIZE, wxMaximizeEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOUSE_CAPTURE_CHANGED, wxMouseCaptureChangedEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_PAINT, wxPaintEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ERASE_BACKGROUND, wxEraseEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_NC_PAINT, wxNcPaintEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU_OPEN, wxMenuEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU_CLOSE, wxMenuEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU_HIGHLIGHT, wxMenuEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CONTEXT_MENU, wxContextMenuEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SYS_COLOUR_CHANGED, wxSysColourChangedEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DISPLAY_CHANGED, wxDisplayChangedEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_QUERY_NEW_PALETTE, wxQueryNewPaletteEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_PALETTE_CHANGED, wxPaletteChangedEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_BUTTON_DOWN, wxJoystickEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_BUTTON_UP, wxJoystickEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_MOVE, wxJoystickEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_ZMOVE, wxJoystickEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DROP_FILES, wxDropFilesEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_INIT_DIALOG, wxInitDialogEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_IDLE, wxIdleEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_UPDATE_UI, wxUpdateUIEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SIZING, wxSizeEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVING, wxMoveEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVE_START, wxMoveEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVE_END, wxMoveEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HIBERNATE, wxActivateEvent); + + // Clipboard events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_COPY, wxClipboardTextEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_CUT, wxClipboardTextEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_PASTE, wxClipboardTextEvent); + + // Generic command events + // Note: a click is a higher-level event than button down/up +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LEFT_CLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LEFT_DCLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RIGHT_CLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RIGHT_DCLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SET_FOCUS, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_KILL_FOCUS, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_ENTER, wxCommandEvent); + + // Help events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HELP, wxHelpEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DETAILED_HELP, wxHelpEvent); + +// these 2 events are the same +#define wxEVT_TOOL wxEVT_MENU + +// ---------------------------------------------------------------------------- +// Compatibility +// ---------------------------------------------------------------------------- + +// this event is also used by wxComboBox and wxSpinCtrl which don't include +// wx/textctrl.h in all ports [yet], so declare it here as well +// +// still, any new code using it should include wx/textctrl.h explicitly +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT, wxCommandEvent); + + +// ---------------------------------------------------------------------------- +// wxEvent(-derived) classes +// ---------------------------------------------------------------------------- + +// the predefined constants for the number of times we propagate event +// upwards window child-parent chain +enum wxEventPropagation +{ + // don't propagate it at all + wxEVENT_PROPAGATE_NONE = 0, + + // propagate it until it is processed + wxEVENT_PROPAGATE_MAX = INT_MAX +}; + +// The different categories for a wxEvent; see wxEvent::GetEventCategory. +// NOTE: they are used as OR-combinable flags by wxEventLoopBase::YieldFor +enum wxEventCategory +{ + // this is the category for those events which are generated to update + // the appearance of the GUI but which (usually) do not comport data + // processing, i.e. which do not provide input or output data + // (e.g. size events, scroll events, etc). + // They are events NOT directly generated by the user's input devices. + wxEVT_CATEGORY_UI = 1, + + // this category groups those events which are generated directly from the + // user through input devices like mouse and keyboard and usually result in + // data to be processed from the application. + // (e.g. mouse clicks, key presses, etc) + wxEVT_CATEGORY_USER_INPUT = 2, + + // this category is for wxSocketEvent + wxEVT_CATEGORY_SOCKET = 4, + + // this category is for wxTimerEvent + wxEVT_CATEGORY_TIMER = 8, + + // this category is for any event used to send notifications from the + // secondary threads to the main one or in general for notifications among + // different threads (which may or may not be user-generated) + wxEVT_CATEGORY_THREAD = 16, + + + // implementation only + + // used in the implementations of wxEventLoopBase::YieldFor + wxEVT_CATEGORY_UNKNOWN = 32, + + // a special category used as an argument to wxEventLoopBase::YieldFor to indicate that + // Yield() should leave all wxEvents on the queue while emptying the native event queue + // (native events will be processed but the wxEvents they generate will be queued) + wxEVT_CATEGORY_CLIPBOARD = 64, + + + // shortcut masks + + // this category groups those events which are emitted in response to + // events of the native toolkit and which typically are not-"delayable". + wxEVT_CATEGORY_NATIVE_EVENTS = wxEVT_CATEGORY_UI|wxEVT_CATEGORY_USER_INPUT, + + // used in wxEventLoopBase::YieldFor to specify all event categories should be processed: + wxEVT_CATEGORY_ALL = + wxEVT_CATEGORY_UI|wxEVT_CATEGORY_USER_INPUT|wxEVT_CATEGORY_SOCKET| \ + wxEVT_CATEGORY_TIMER|wxEVT_CATEGORY_THREAD|wxEVT_CATEGORY_UNKNOWN| \ + wxEVT_CATEGORY_CLIPBOARD +}; + +/* + * wxWidgets events, covering all interesting things that might happen + * (button clicking, resizing, setting text in widgets, etc.). + * + * For each completely new event type, derive a new event class. + * An event CLASS represents a C++ class defining a range of similar event TYPES; + * examples are canvas events, panel item command events. + * An event TYPE is a unique identifier for a particular system event, + * such as a button press or a listbox deselection. + * + */ + +class WXDLLIMPEXP_BASE wxEvent : public wxObject +{ +public: + wxEvent(int winid = 0, wxEventType commandType = wxEVT_NULL ); + + void SetEventType(wxEventType typ) { m_eventType = typ; } + wxEventType GetEventType() const { return m_eventType; } + + wxObject *GetEventObject() const { return m_eventObject; } + void SetEventObject(wxObject *obj) { m_eventObject = obj; } + + long GetTimestamp() const { return m_timeStamp; } + void SetTimestamp(long ts = 0) { m_timeStamp = ts; } + + int GetId() const { return m_id; } + void SetId(int Id) { m_id = Id; } + + // Returns the user data optionally associated with the event handler when + // using Connect() or Bind(). + wxObject *GetEventUserData() const { return m_callbackUserData; } + + // Can instruct event processor that we wish to ignore this event + // (treat as if the event table entry had not been found): this must be done + // to allow the event processing by the base classes (calling event.Skip() + // is the analog of calling the base class version of a virtual function) + void Skip(bool skip = true) { m_skipped = skip; } + bool GetSkipped() const { return m_skipped; } + + // This function is used to create a copy of the event polymorphically and + // all derived classes must implement it because otherwise wxPostEvent() + // for them wouldn't work (it needs to do a copy of the event) + virtual wxEvent *Clone() const = 0; + + // this function is used to selectively process events in wxEventLoopBase::YieldFor + // NOTE: by default it returns wxEVT_CATEGORY_UI just because the major + // part of wxWidgets events belong to that category. + virtual wxEventCategory GetEventCategory() const + { return wxEVT_CATEGORY_UI; } + + // Implementation only: this test is explicitly anti OO and this function + // exists only for optimization purposes. + bool IsCommandEvent() const { return m_isCommandEvent; } + + // Determine if this event should be propagating to the parent window. + bool ShouldPropagate() const + { return m_propagationLevel != wxEVENT_PROPAGATE_NONE; } + + // Stop an event from propagating to its parent window, returns the old + // propagation level value + int StopPropagation() + { + int propagationLevel = m_propagationLevel; + m_propagationLevel = wxEVENT_PROPAGATE_NONE; + return propagationLevel; + } + + // Resume the event propagation by restoring the propagation level + // (returned by StopPropagation()) + void ResumePropagation(int propagationLevel) + { + m_propagationLevel = propagationLevel; + } + + // This method is for internal use only and allows to get the object that + // is propagating this event upwards the window hierarchy, if any. + wxEvtHandler* GetPropagatedFrom() const { return m_propagatedFrom; } + + // This is for internal use only and is only called by + // wxEvtHandler::ProcessEvent() to check whether it's the first time this + // event is being processed + bool WasProcessed() + { + if ( m_wasProcessed ) + return true; + + m_wasProcessed = true; + + return false; + } + + // This is for internal use only and is used for setting, testing and + // resetting of m_willBeProcessedAgain flag. + void SetWillBeProcessedAgain() + { + m_willBeProcessedAgain = true; + } + + bool WillBeProcessedAgain() + { + if ( m_willBeProcessedAgain ) + { + m_willBeProcessedAgain = false; + return true; + } + + return false; + } + + // This is also used only internally by ProcessEvent() to check if it + // should process the event normally or only restrict the search for the + // event handler to this object itself. + bool ShouldProcessOnlyIn(wxEvtHandler *h) const + { + return h == m_handlerToProcessOnlyIn; + } + + // Called to indicate that the result of ShouldProcessOnlyIn() wasn't taken + // into account. The existence of this function may seem counterintuitive + // but unfortunately it's needed by wxScrollHelperEvtHandler, see comments + // there. Don't even think of using this in your own code, this is a gross + // hack and is only needed because of wx complicated history and should + // never be used anywhere else. + void DidntHonourProcessOnlyIn() + { + m_handlerToProcessOnlyIn = NULL; + } + +protected: + wxObject* m_eventObject; + wxEventType m_eventType; + long m_timeStamp; + int m_id; + +public: + // m_callbackUserData is for internal usage only + wxObject* m_callbackUserData; + +private: + // If this handler + wxEvtHandler *m_handlerToProcessOnlyIn; + +protected: + // the propagation level: while it is positive, we propagate the event to + // the parent window (if any) + int m_propagationLevel; + + // The object that the event is being propagated from, initially NULL and + // only set by wxPropagateOnce. + wxEvtHandler* m_propagatedFrom; + + bool m_skipped; + bool m_isCommandEvent; + + // initially false but becomes true as soon as WasProcessed() is called for + // the first time, as this is done only by ProcessEvent() it explains the + // variable name: it becomes true after ProcessEvent() was called at least + // once for this event + bool m_wasProcessed; + + // This one is initially false too, but can be set to true to indicate that + // the event will be passed to another handler if it's not processed in + // this one. + bool m_willBeProcessedAgain; + +protected: + wxEvent(const wxEvent&); // for implementing Clone() + wxEvent& operator=(const wxEvent&); // for derived classes operator=() + +private: + // It needs to access our m_propagationLevel and m_propagatedFrom fields. + friend class WXDLLIMPEXP_FWD_BASE wxPropagateOnce; + + // and this one needs to access our m_handlerToProcessOnlyIn + friend class WXDLLIMPEXP_FWD_BASE wxEventProcessInHandlerOnly; + + + DECLARE_ABSTRACT_CLASS(wxEvent) +}; + +/* + * Helper class to temporarily change an event not to propagate. + */ +class WXDLLIMPEXP_BASE wxPropagationDisabler +{ +public: + wxPropagationDisabler(wxEvent& event) : m_event(event) + { + m_propagationLevelOld = m_event.StopPropagation(); + } + + ~wxPropagationDisabler() + { + m_event.ResumePropagation(m_propagationLevelOld); + } + +private: + wxEvent& m_event; + int m_propagationLevelOld; + + wxDECLARE_NO_COPY_CLASS(wxPropagationDisabler); +}; + +/* + * Helper used to indicate that an event is propagated upwards the window + * hierarchy by the given window. + */ +class WXDLLIMPEXP_BASE wxPropagateOnce +{ +public: + // The handler argument should normally be non-NULL to allow the parent + // event handler to know that it's being used to process an event coming + // from the child, it's only NULL by default for backwards compatibility. + wxPropagateOnce(wxEvent& event, wxEvtHandler* handler = NULL) + : m_event(event), + m_propagatedFromOld(event.m_propagatedFrom) + { + wxASSERT_MSG( m_event.m_propagationLevel > 0, + wxT("shouldn't be used unless ShouldPropagate()!") ); + + m_event.m_propagationLevel--; + m_event.m_propagatedFrom = handler; + } + + ~wxPropagateOnce() + { + m_event.m_propagatedFrom = m_propagatedFromOld; + m_event.m_propagationLevel++; + } + +private: + wxEvent& m_event; + wxEvtHandler* const m_propagatedFromOld; + + wxDECLARE_NO_COPY_CLASS(wxPropagateOnce); +}; + +// A helper object used to temporarily make wxEvent::ShouldProcessOnlyIn() +// return true for the handler passed to its ctor. +class wxEventProcessInHandlerOnly +{ +public: + wxEventProcessInHandlerOnly(wxEvent& event, wxEvtHandler *handler) + : m_event(event), + m_handlerToProcessOnlyInOld(event.m_handlerToProcessOnlyIn) + { + m_event.m_handlerToProcessOnlyIn = handler; + } + + ~wxEventProcessInHandlerOnly() + { + m_event.m_handlerToProcessOnlyIn = m_handlerToProcessOnlyInOld; + } + +private: + wxEvent& m_event; + wxEvtHandler * const m_handlerToProcessOnlyInOld; + + wxDECLARE_NO_COPY_CLASS(wxEventProcessInHandlerOnly); +}; + + +class WXDLLIMPEXP_BASE wxEventBasicPayloadMixin +{ +public: + wxEventBasicPayloadMixin() + : m_commandInt(0), + m_extraLong(0) + { + } + + void SetString(const wxString& s) { m_cmdString = s; } + const wxString& GetString() const { return m_cmdString; } + + void SetInt(int i) { m_commandInt = i; } + int GetInt() const { return m_commandInt; } + + void SetExtraLong(long extraLong) { m_extraLong = extraLong; } + long GetExtraLong() const { return m_extraLong; } + +protected: + // Note: these variables have "cmd" or "command" in their name for backward compatibility: + // they used to be part of wxCommandEvent, not this mixin. + wxString m_cmdString; // String event argument + int m_commandInt; + long m_extraLong; // Additional information (e.g. select/deselect) + + wxDECLARE_NO_ASSIGN_CLASS(wxEventBasicPayloadMixin); +}; + +class WXDLLIMPEXP_BASE wxEventAnyPayloadMixin : public wxEventBasicPayloadMixin +{ +public: + wxEventAnyPayloadMixin() : wxEventBasicPayloadMixin() {} + +#if wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7)) + template + void SetPayload(const T& payload) + { + m_payload = payload; + } + + template + T GetPayload() const + { + return m_payload.As(); + } + +protected: + wxAny m_payload; +#endif // wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7)) + + wxDECLARE_NO_ASSIGN_CLASS(wxEventBasicPayloadMixin); +}; + + +// Idle event +/* + wxEVT_IDLE + */ + +// Whether to always send idle events to windows, or +// to only send update events to those with the +// wxWS_EX_PROCESS_IDLE style. + +enum wxIdleMode +{ + // Send idle events to all windows + wxIDLE_PROCESS_ALL, + + // Send idle events to windows that have + // the wxWS_EX_PROCESS_IDLE flag specified + wxIDLE_PROCESS_SPECIFIED +}; + +class WXDLLIMPEXP_BASE wxIdleEvent : public wxEvent +{ +public: + wxIdleEvent() + : wxEvent(0, wxEVT_IDLE), + m_requestMore(false) + { } + wxIdleEvent(const wxIdleEvent& event) + : wxEvent(event), + m_requestMore(event.m_requestMore) + { } + + void RequestMore(bool needMore = true) { m_requestMore = needMore; } + bool MoreRequested() const { return m_requestMore; } + + virtual wxEvent *Clone() const { return new wxIdleEvent(*this); } + + // Specify how wxWidgets will send idle events: to + // all windows, or only to those which specify that they + // will process the events. + static void SetMode(wxIdleMode mode) { sm_idleMode = mode; } + + // Returns the idle event mode + static wxIdleMode GetMode() { return sm_idleMode; } + +protected: + bool m_requestMore; + static wxIdleMode sm_idleMode; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIdleEvent) +}; + + +// Thread event + +class WXDLLIMPEXP_BASE wxThreadEvent : public wxEvent, + public wxEventAnyPayloadMixin +{ +public: + wxThreadEvent(wxEventType eventType = wxEVT_THREAD, int id = wxID_ANY) + : wxEvent(id, eventType) + { } + + wxThreadEvent(const wxThreadEvent& event) + : wxEvent(event), + wxEventAnyPayloadMixin(event) + { + // make sure our string member (which uses COW, aka refcounting) is not + // shared by other wxString instances: + SetString(GetString().Clone()); + } + + virtual wxEvent *Clone() const + { + return new wxThreadEvent(*this); + } + + // this is important to avoid that calling wxEventLoopBase::YieldFor thread events + // gets processed when this is unwanted: + virtual wxEventCategory GetEventCategory() const + { return wxEVT_CATEGORY_THREAD; } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxThreadEvent) +}; + + +// Asynchronous method call events: these event are processed by wxEvtHandler +// itself and result in a call to its Execute() method which simply calls the +// specified method. The difference with a simple method call is that this is +// done asynchronously, i.e. at some later time, instead of immediately when +// the event object is constructed. + +#ifdef wxHAS_CALL_AFTER + +// This is a base class used to process all method calls. +class wxAsyncMethodCallEvent : public wxEvent +{ +public: + wxAsyncMethodCallEvent(wxObject* object) + : wxEvent(wxID_ANY, wxEVT_ASYNC_METHOD_CALL) + { + SetEventObject(object); + } + + wxAsyncMethodCallEvent(const wxAsyncMethodCallEvent& other) + : wxEvent(other) + { + } + + virtual void Execute() = 0; +}; + +// This is a version for calling methods without parameters. +template +class wxAsyncMethodCallEvent0 : public wxAsyncMethodCallEvent +{ +public: + typedef T ObjectType; + typedef void (ObjectType::*MethodType)(); + + wxAsyncMethodCallEvent0(ObjectType* object, + MethodType method) + : wxAsyncMethodCallEvent(object), + m_object(object), + m_method(method) + { + } + + wxAsyncMethodCallEvent0(const wxAsyncMethodCallEvent0& other) + : wxAsyncMethodCallEvent(other), + m_object(other.m_object), + m_method(other.m_method) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEvent0(*this); + } + + virtual void Execute() + { + (m_object->*m_method)(); + } + +private: + ObjectType* const m_object; + const MethodType m_method; +}; + +// This is a version for calling methods with a single parameter. +template +class wxAsyncMethodCallEvent1 : public wxAsyncMethodCallEvent +{ +public: + typedef T ObjectType; + typedef void (ObjectType::*MethodType)(T1 x1); + typedef typename wxRemoveRef::type ParamType1; + + wxAsyncMethodCallEvent1(ObjectType* object, + MethodType method, + const ParamType1& x1) + : wxAsyncMethodCallEvent(object), + m_object(object), + m_method(method), + m_param1(x1) + { + } + + wxAsyncMethodCallEvent1(const wxAsyncMethodCallEvent1& other) + : wxAsyncMethodCallEvent(other), + m_object(other.m_object), + m_method(other.m_method), + m_param1(other.m_param1) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEvent1(*this); + } + + virtual void Execute() + { + (m_object->*m_method)(m_param1); + } + +private: + ObjectType* const m_object; + const MethodType m_method; + const ParamType1 m_param1; +}; + +// This is a version for calling methods with two parameters. +template +class wxAsyncMethodCallEvent2 : public wxAsyncMethodCallEvent +{ +public: + typedef T ObjectType; + typedef void (ObjectType::*MethodType)(T1 x1, T2 x2); + typedef typename wxRemoveRef::type ParamType1; + typedef typename wxRemoveRef::type ParamType2; + + wxAsyncMethodCallEvent2(ObjectType* object, + MethodType method, + const ParamType1& x1, + const ParamType2& x2) + : wxAsyncMethodCallEvent(object), + m_object(object), + m_method(method), + m_param1(x1), + m_param2(x2) + { + } + + wxAsyncMethodCallEvent2(const wxAsyncMethodCallEvent2& other) + : wxAsyncMethodCallEvent(other), + m_object(other.m_object), + m_method(other.m_method), + m_param1(other.m_param1), + m_param2(other.m_param2) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEvent2(*this); + } + + virtual void Execute() + { + (m_object->*m_method)(m_param1, m_param2); + } + +private: + ObjectType* const m_object; + const MethodType m_method; + const ParamType1 m_param1; + const ParamType2 m_param2; +}; + +// This is a version for calling any functors +template +class wxAsyncMethodCallEventFunctor : public wxAsyncMethodCallEvent +{ +public: + typedef T FunctorType; + + wxAsyncMethodCallEventFunctor(wxObject *object, const FunctorType& fn) + : wxAsyncMethodCallEvent(object), + m_fn(fn) + { + } + + wxAsyncMethodCallEventFunctor(const wxAsyncMethodCallEventFunctor& other) + : wxAsyncMethodCallEvent(other), + m_fn(other.m_fn) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEventFunctor(*this); + } + + virtual void Execute() + { + m_fn(); + } + +private: + FunctorType m_fn; +}; + +#endif // wxHAS_CALL_AFTER + + +#if wxUSE_GUI + + +// Item or menu event class +/* + wxEVT_BUTTON + wxEVT_CHECKBOX + wxEVT_CHOICE + wxEVT_LISTBOX + wxEVT_LISTBOX_DCLICK + wxEVT_TEXT + wxEVT_TEXT_ENTER + wxEVT_MENU + wxEVT_SLIDER + wxEVT_RADIOBOX + wxEVT_RADIOBUTTON + wxEVT_SCROLLBAR + wxEVT_VLBOX + wxEVT_COMBOBOX + wxEVT_TOGGLEBUTTON +*/ + +class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent, + public wxEventBasicPayloadMixin +{ +public: + wxCommandEvent(wxEventType commandType = wxEVT_NULL, int winid = 0); + + wxCommandEvent(const wxCommandEvent& event) + : wxEvent(event), + wxEventBasicPayloadMixin(event), + m_clientData(event.m_clientData), + m_clientObject(event.m_clientObject) + { + // Because GetString() can retrieve the string text only on demand, we + // need to copy it explicitly. + if ( m_cmdString.empty() ) + m_cmdString = event.GetString(); + } + + // Set/Get client data from controls + void SetClientData(void* clientData) { m_clientData = clientData; } + void *GetClientData() const { return m_clientData; } + + // Set/Get client object from controls + void SetClientObject(wxClientData* clientObject) { m_clientObject = clientObject; } + wxClientData *GetClientObject() const { return m_clientObject; } + + // Note: this shadows wxEventBasicPayloadMixin::GetString(), because it does some + // GUI-specific hacks + wxString GetString() const; + + // Get listbox selection if single-choice + int GetSelection() const { return m_commandInt; } + + // Get checkbox value + bool IsChecked() const { return m_commandInt != 0; } + + // true if the listbox event was a selection. + bool IsSelection() const { return (m_extraLong != 0); } + + virtual wxEvent *Clone() const { return new wxCommandEvent(*this); } + virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_USER_INPUT; } + +protected: + void* m_clientData; // Arbitrary client data + wxClientData* m_clientObject; // Arbitrary client object + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCommandEvent) +}; + +// this class adds a possibility to react (from the user) code to a control +// notification: allow or veto the operation being reported. +class WXDLLIMPEXP_CORE wxNotifyEvent : public wxCommandEvent +{ +public: + wxNotifyEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) + : wxCommandEvent(commandType, winid) + { m_bAllow = true; } + + wxNotifyEvent(const wxNotifyEvent& event) + : wxCommandEvent(event) + { m_bAllow = event.m_bAllow; } + + // veto the operation (usually it's allowed by default) + void Veto() { m_bAllow = false; } + + // allow the operation if it was disabled by default + void Allow() { m_bAllow = true; } + + // for implementation code only: is the operation allowed? + bool IsAllowed() const { return m_bAllow; } + + virtual wxEvent *Clone() const { return new wxNotifyEvent(*this); } + +private: + bool m_bAllow; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNotifyEvent) +}; + + +// Scroll event class, derived form wxCommandEvent. wxScrollEvents are +// sent by wxSlider and wxScrollBar. +/* + wxEVT_SCROLL_TOP + wxEVT_SCROLL_BOTTOM + wxEVT_SCROLL_LINEUP + wxEVT_SCROLL_LINEDOWN + wxEVT_SCROLL_PAGEUP + wxEVT_SCROLL_PAGEDOWN + wxEVT_SCROLL_THUMBTRACK + wxEVT_SCROLL_THUMBRELEASE + wxEVT_SCROLL_CHANGED +*/ + +class WXDLLIMPEXP_CORE wxScrollEvent : public wxCommandEvent +{ +public: + wxScrollEvent(wxEventType commandType = wxEVT_NULL, + int winid = 0, int pos = 0, int orient = 0); + + int GetOrientation() const { return (int) m_extraLong; } + int GetPosition() const { return m_commandInt; } + void SetOrientation(int orient) { m_extraLong = (long) orient; } + void SetPosition(int pos) { m_commandInt = pos; } + + virtual wxEvent *Clone() const { return new wxScrollEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxScrollEvent) +}; + +// ScrollWin event class, derived fom wxEvent. wxScrollWinEvents +// are sent by wxWindow. +/* + wxEVT_SCROLLWIN_TOP + wxEVT_SCROLLWIN_BOTTOM + wxEVT_SCROLLWIN_LINEUP + wxEVT_SCROLLWIN_LINEDOWN + wxEVT_SCROLLWIN_PAGEUP + wxEVT_SCROLLWIN_PAGEDOWN + wxEVT_SCROLLWIN_THUMBTRACK + wxEVT_SCROLLWIN_THUMBRELEASE +*/ + +class WXDLLIMPEXP_CORE wxScrollWinEvent : public wxEvent +{ +public: + wxScrollWinEvent(wxEventType commandType = wxEVT_NULL, + int pos = 0, int orient = 0); + wxScrollWinEvent(const wxScrollWinEvent& event) : wxEvent(event) + { m_commandInt = event.m_commandInt; + m_extraLong = event.m_extraLong; } + + int GetOrientation() const { return (int) m_extraLong; } + int GetPosition() const { return m_commandInt; } + void SetOrientation(int orient) { m_extraLong = (long) orient; } + void SetPosition(int pos) { m_commandInt = pos; } + + virtual wxEvent *Clone() const { return new wxScrollWinEvent(*this); } + +protected: + int m_commandInt; + long m_extraLong; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxScrollWinEvent) +}; + + + +// Mouse event class + +/* + wxEVT_LEFT_DOWN + wxEVT_LEFT_UP + wxEVT_MIDDLE_DOWN + wxEVT_MIDDLE_UP + wxEVT_RIGHT_DOWN + wxEVT_RIGHT_UP + wxEVT_MOTION + wxEVT_ENTER_WINDOW + wxEVT_LEAVE_WINDOW + wxEVT_LEFT_DCLICK + wxEVT_MIDDLE_DCLICK + wxEVT_RIGHT_DCLICK +*/ + +enum wxMouseWheelAxis +{ + wxMOUSE_WHEEL_VERTICAL, + wxMOUSE_WHEEL_HORIZONTAL +}; + +class WXDLLIMPEXP_CORE wxMouseEvent : public wxEvent, + public wxMouseState +{ +public: + wxMouseEvent(wxEventType mouseType = wxEVT_NULL); + wxMouseEvent(const wxMouseEvent& event) + : wxEvent(event), + wxMouseState(event) + { + Assign(event); + } + + // Was it a button event? (*doesn't* mean: is any button *down*?) + bool IsButton() const { return Button(wxMOUSE_BTN_ANY); } + + // Was it a down event from this (or any) button? + bool ButtonDown(int but = wxMOUSE_BTN_ANY) const; + + // Was it a dclick event from this (or any) button? + bool ButtonDClick(int but = wxMOUSE_BTN_ANY) const; + + // Was it a up event from this (or any) button? + bool ButtonUp(int but = wxMOUSE_BTN_ANY) const; + + // Was this event generated by the given button? + bool Button(int but) const; + + // Get the button which is changing state (wxMOUSE_BTN_NONE if none) + int GetButton() const; + + // Find which event was just generated + bool LeftDown() const { return (m_eventType == wxEVT_LEFT_DOWN); } + bool MiddleDown() const { return (m_eventType == wxEVT_MIDDLE_DOWN); } + bool RightDown() const { return (m_eventType == wxEVT_RIGHT_DOWN); } + bool Aux1Down() const { return (m_eventType == wxEVT_AUX1_DOWN); } + bool Aux2Down() const { return (m_eventType == wxEVT_AUX2_DOWN); } + + bool LeftUp() const { return (m_eventType == wxEVT_LEFT_UP); } + bool MiddleUp() const { return (m_eventType == wxEVT_MIDDLE_UP); } + bool RightUp() const { return (m_eventType == wxEVT_RIGHT_UP); } + bool Aux1Up() const { return (m_eventType == wxEVT_AUX1_UP); } + bool Aux2Up() const { return (m_eventType == wxEVT_AUX2_UP); } + + bool LeftDClick() const { return (m_eventType == wxEVT_LEFT_DCLICK); } + bool MiddleDClick() const { return (m_eventType == wxEVT_MIDDLE_DCLICK); } + bool RightDClick() const { return (m_eventType == wxEVT_RIGHT_DCLICK); } + bool Aux1DClick() const { return (m_eventType == wxEVT_AUX1_DCLICK); } + bool Aux2DClick() const { return (m_eventType == wxEVT_AUX2_DCLICK); } + + // True if a button is down and the mouse is moving + bool Dragging() const + { + return (m_eventType == wxEVT_MOTION) && ButtonIsDown(wxMOUSE_BTN_ANY); + } + + // True if the mouse is moving, and no button is down + bool Moving() const + { + return (m_eventType == wxEVT_MOTION) && !ButtonIsDown(wxMOUSE_BTN_ANY); + } + + // True if the mouse is just entering the window + bool Entering() const { return (m_eventType == wxEVT_ENTER_WINDOW); } + + // True if the mouse is just leaving the window + bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); } + + // Returns the number of mouse clicks associated with this event. + int GetClickCount() const { return m_clickCount; } + + // Find the logical position of the event given the DC + wxPoint GetLogicalPosition(const wxDC& dc) const; + + // Get wheel rotation, positive or negative indicates direction of + // rotation. Current devices all send an event when rotation is equal to + // +/-WheelDelta, but this allows for finer resolution devices to be + // created in the future. Because of this you shouldn't assume that one + // event is equal to 1 line or whatever, but you should be able to either + // do partial line scrolling or wait until +/-WheelDelta rotation values + // have been accumulated before scrolling. + int GetWheelRotation() const { return m_wheelRotation; } + + // Get wheel delta, normally 120. This is the threshold for action to be + // taken, and one such action (for example, scrolling one increment) + // should occur for each delta. + int GetWheelDelta() const { return m_wheelDelta; } + + // Gets the axis the wheel operation concerns; wxMOUSE_WHEEL_VERTICAL + // (most common case) or wxMOUSE_WHEEL_HORIZONTAL (for horizontal scrolling + // using e.g. a trackpad). + wxMouseWheelAxis GetWheelAxis() const { return m_wheelAxis; } + + // Returns the configured number of lines (or whatever) to be scrolled per + // wheel action. Defaults to three. + int GetLinesPerAction() const { return m_linesPerAction; } + + // Returns the configured number of columns (or whatever) to be scrolled per + // wheel action. Defaults to three. + int GetColumnsPerAction() const { return m_columnsPerAction; } + + // Is the system set to do page scrolling? + bool IsPageScroll() const { return ((unsigned int)m_linesPerAction == UINT_MAX); } + + virtual wxEvent *Clone() const { return new wxMouseEvent(*this); } + virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_USER_INPUT; } + + wxMouseEvent& operator=(const wxMouseEvent& event) + { + if (&event != this) + Assign(event); + return *this; + } + +public: + int m_clickCount; + + wxMouseWheelAxis m_wheelAxis; + int m_wheelRotation; + int m_wheelDelta; + int m_linesPerAction; + int m_columnsPerAction; + +protected: + void Assign(const wxMouseEvent& evt); + +private: + DECLARE_DYNAMIC_CLASS(wxMouseEvent) +}; + +// Cursor set event + +/* + wxEVT_SET_CURSOR + */ + +class WXDLLIMPEXP_CORE wxSetCursorEvent : public wxEvent +{ +public: + wxSetCursorEvent(wxCoord x = 0, wxCoord y = 0) + : wxEvent(0, wxEVT_SET_CURSOR), + m_x(x), m_y(y), m_cursor() + { } + + wxSetCursorEvent(const wxSetCursorEvent& event) + : wxEvent(event), + m_x(event.m_x), + m_y(event.m_y), + m_cursor(event.m_cursor) + { } + + wxCoord GetX() const { return m_x; } + wxCoord GetY() const { return m_y; } + + void SetCursor(const wxCursor& cursor) { m_cursor = cursor; } + const wxCursor& GetCursor() const { return m_cursor; } + bool HasCursor() const { return m_cursor.IsOk(); } + + virtual wxEvent *Clone() const { return new wxSetCursorEvent(*this); } + +private: + wxCoord m_x, m_y; + wxCursor m_cursor; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSetCursorEvent) +}; + +// Keyboard input event class + +/* + wxEVT_CHAR + wxEVT_CHAR_HOOK + wxEVT_KEY_DOWN + wxEVT_KEY_UP + wxEVT_HOTKEY + */ + +// key categories: the bit flags for IsKeyInCategory() function +// +// the enum values used may change in future version of wx +// use the named constants only, or bitwise combinations thereof +enum wxKeyCategoryFlags +{ + // arrow keys, on and off numeric keypads + WXK_CATEGORY_ARROW = 1, + + // page up and page down keys, on and off numeric keypads + WXK_CATEGORY_PAGING = 2, + + // home and end keys, on and off numeric keypads + WXK_CATEGORY_JUMP = 4, + + // tab key, on and off numeric keypads + WXK_CATEGORY_TAB = 8, + + // backspace and delete keys, on and off numeric keypads + WXK_CATEGORY_CUT = 16, + + // all keys usually used for navigation + WXK_CATEGORY_NAVIGATION = WXK_CATEGORY_ARROW | + WXK_CATEGORY_PAGING | + WXK_CATEGORY_JUMP +}; + +class WXDLLIMPEXP_CORE wxKeyEvent : public wxEvent, + public wxKeyboardState +{ +public: + wxKeyEvent(wxEventType keyType = wxEVT_NULL); + + // Normal copy ctor and a ctor creating a new event for the same key as the + // given one but a different event type (this is used in implementation + // code only, do not use outside of the library). + wxKeyEvent(const wxKeyEvent& evt); + wxKeyEvent(wxEventType eventType, const wxKeyEvent& evt); + + // get the key code: an ASCII7 char or an element of wxKeyCode enum + int GetKeyCode() const { return (int)m_keyCode; } + + // returns true iff this event's key code is of a certain type + bool IsKeyInCategory(int category) const; + +#if wxUSE_UNICODE + // get the Unicode character corresponding to this key + wxChar GetUnicodeKey() const { return m_uniChar; } +#endif // wxUSE_UNICODE + + // get the raw key code (platform-dependent) + wxUint32 GetRawKeyCode() const { return m_rawCode; } + + // get the raw key flags (platform-dependent) + wxUint32 GetRawKeyFlags() const { return m_rawFlags; } + + // Find the position of the event + void GetPosition(wxCoord *xpos, wxCoord *ypos) const + { + if (xpos) + *xpos = GetX(); + if (ypos) + *ypos = GetY(); + } + + // This version if provided only for backwards compatiblity, don't use. + void GetPosition(long *xpos, long *ypos) const + { + if (xpos) + *xpos = GetX(); + if (ypos) + *ypos = GetY(); + } + + wxPoint GetPosition() const + { return wxPoint(GetX(), GetY()); } + + // Get X position + wxCoord GetX() const; + + // Get Y position + wxCoord GetY() const; + + // Can be called from wxEVT_CHAR_HOOK handler to allow generation of normal + // key events even though the event had been handled (by default they would + // not be generated in this case). + void DoAllowNextEvent() { m_allowNext = true; } + + // Return the value of the "allow next" flag, for internal use only. + bool IsNextEventAllowed() const { return m_allowNext; } + + + virtual wxEvent *Clone() const { return new wxKeyEvent(*this); } + virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_USER_INPUT; } + + // we do need to copy wxKeyEvent sometimes (in wxTreeCtrl code, for + // example) + wxKeyEvent& operator=(const wxKeyEvent& evt) + { + if ( &evt != this ) + { + wxEvent::operator=(evt); + + // Borland C++ 5.82 doesn't compile an explicit call to an + // implicitly defined operator=() so need to do it this way: + *static_cast(this) = evt; + + DoAssignMembers(evt); + } + return *this; + } + +public: + // Do not use these fields directly, they are initialized on demand, so + // call GetX() and GetY() or GetPosition() instead. + wxCoord m_x, m_y; + + long m_keyCode; + +#if wxUSE_UNICODE + // This contains the full Unicode character + // in a character events in Unicode mode + wxChar m_uniChar; +#endif + + // these fields contain the platform-specific information about + // key that was pressed + wxUint32 m_rawCode; + wxUint32 m_rawFlags; + +private: + // Set the event to propagate if necessary, i.e. if it's of wxEVT_CHAR_HOOK + // type. This is used by all ctors. + void InitPropagation() + { + if ( m_eventType == wxEVT_CHAR_HOOK ) + m_propagationLevel = wxEVENT_PROPAGATE_MAX; + + m_allowNext = false; + } + + // Copy only the event data present in this class, this is used by + // AssignKeyData() and copy ctor. + void DoAssignMembers(const wxKeyEvent& evt) + { + m_x = evt.m_x; + m_y = evt.m_y; + m_hasPosition = evt.m_hasPosition; + + m_keyCode = evt.m_keyCode; + + m_rawCode = evt.m_rawCode; + m_rawFlags = evt.m_rawFlags; +#if wxUSE_UNICODE + m_uniChar = evt.m_uniChar; +#endif + } + + // Initialize m_x and m_y using the current mouse cursor position if + // necessary. + void InitPositionIfNecessary() const; + + // If this flag is true, the normal key events should still be generated + // even if wxEVT_CHAR_HOOK had been handled. By default it is false as + // handling wxEVT_CHAR_HOOK suppresses all the subsequent events. + bool m_allowNext; + + // If true, m_x and m_y were already initialized. If false, try to get them + // when they're requested. + bool m_hasPosition; + + DECLARE_DYNAMIC_CLASS(wxKeyEvent) +}; + +// Size event class +/* + wxEVT_SIZE + */ + +class WXDLLIMPEXP_CORE wxSizeEvent : public wxEvent +{ +public: + wxSizeEvent() : wxEvent(0, wxEVT_SIZE) + { } + wxSizeEvent(const wxSize& sz, int winid = 0) + : wxEvent(winid, wxEVT_SIZE), + m_size(sz) + { } + wxSizeEvent(const wxSizeEvent& event) + : wxEvent(event), + m_size(event.m_size), m_rect(event.m_rect) + { } + wxSizeEvent(const wxRect& rect, int id = 0) + : m_size(rect.GetSize()), m_rect(rect) + { m_eventType = wxEVT_SIZING; m_id = id; } + + wxSize GetSize() const { return m_size; } + void SetSize(wxSize size) { m_size = size; } + wxRect GetRect() const { return m_rect; } + void SetRect(const wxRect& rect) { m_rect = rect; } + + virtual wxEvent *Clone() const { return new wxSizeEvent(*this); } + +public: + // For internal usage only. Will be converted to protected members. + wxSize m_size; + wxRect m_rect; // Used for wxEVT_SIZING + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSizeEvent) +}; + +// Move event class + +/* + wxEVT_MOVE + */ + +class WXDLLIMPEXP_CORE wxMoveEvent : public wxEvent +{ +public: + wxMoveEvent() + : wxEvent(0, wxEVT_MOVE) + { } + wxMoveEvent(const wxPoint& pos, int winid = 0) + : wxEvent(winid, wxEVT_MOVE), + m_pos(pos) + { } + wxMoveEvent(const wxMoveEvent& event) + : wxEvent(event), + m_pos(event.m_pos) + { } + wxMoveEvent(const wxRect& rect, int id = 0) + : m_pos(rect.GetPosition()), m_rect(rect) + { m_eventType = wxEVT_MOVING; m_id = id; } + + wxPoint GetPosition() const { return m_pos; } + void SetPosition(const wxPoint& pos) { m_pos = pos; } + wxRect GetRect() const { return m_rect; } + void SetRect(const wxRect& rect) { m_rect = rect; } + + virtual wxEvent *Clone() const { return new wxMoveEvent(*this); } + +protected: + wxPoint m_pos; + wxRect m_rect; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMoveEvent) +}; + +// Paint event class +/* + wxEVT_PAINT + wxEVT_NC_PAINT + */ + +#if wxDEBUG_LEVEL && (defined(__WXMSW__) || defined(__WXPM__)) + #define wxHAS_PAINT_DEBUG + + // see comments in src/msw|os2/dcclient.cpp where g_isPainting is defined + extern WXDLLIMPEXP_CORE int g_isPainting; +#endif // debug + +class WXDLLIMPEXP_CORE wxPaintEvent : public wxEvent +{ +public: + wxPaintEvent(int Id = 0) + : wxEvent(Id, wxEVT_PAINT) + { +#ifdef wxHAS_PAINT_DEBUG + // set the internal flag for the duration of redrawing + g_isPainting++; +#endif // debug + } + + // default copy ctor and dtor are normally fine, we only need them to keep + // g_isPainting updated in debug build +#ifdef wxHAS_PAINT_DEBUG + wxPaintEvent(const wxPaintEvent& event) + : wxEvent(event) + { + g_isPainting++; + } + + virtual ~wxPaintEvent() + { + g_isPainting--; + } +#endif // debug + + virtual wxEvent *Clone() const { return new wxPaintEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPaintEvent) +}; + +class WXDLLIMPEXP_CORE wxNcPaintEvent : public wxEvent +{ +public: + wxNcPaintEvent(int winid = 0) + : wxEvent(winid, wxEVT_NC_PAINT) + { } + + virtual wxEvent *Clone() const { return new wxNcPaintEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNcPaintEvent) +}; + +// Erase background event class +/* + wxEVT_ERASE_BACKGROUND + */ + +class WXDLLIMPEXP_CORE wxEraseEvent : public wxEvent +{ +public: + wxEraseEvent(int Id = 0, wxDC *dc = NULL) + : wxEvent(Id, wxEVT_ERASE_BACKGROUND), + m_dc(dc) + { } + + wxEraseEvent(const wxEraseEvent& event) + : wxEvent(event), + m_dc(event.m_dc) + { } + + wxDC *GetDC() const { return m_dc; } + + virtual wxEvent *Clone() const { return new wxEraseEvent(*this); } + +protected: + wxDC *m_dc; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxEraseEvent) +}; + +// Focus event class +/* + wxEVT_SET_FOCUS + wxEVT_KILL_FOCUS + */ + +class WXDLLIMPEXP_CORE wxFocusEvent : public wxEvent +{ +public: + wxFocusEvent(wxEventType type = wxEVT_NULL, int winid = 0) + : wxEvent(winid, type) + { m_win = NULL; } + + wxFocusEvent(const wxFocusEvent& event) + : wxEvent(event) + { m_win = event.m_win; } + + // The window associated with this event is the window which had focus + // before for SET event and the window which will have focus for the KILL + // one. NB: it may be NULL in both cases! + wxWindow *GetWindow() const { return m_win; } + void SetWindow(wxWindow *win) { m_win = win; } + + virtual wxEvent *Clone() const { return new wxFocusEvent(*this); } + +private: + wxWindow *m_win; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFocusEvent) +}; + +// wxChildFocusEvent notifies the parent that a child has got the focus: unlike +// wxFocusEvent it is propagated upwards the window chain +class WXDLLIMPEXP_CORE wxChildFocusEvent : public wxCommandEvent +{ +public: + wxChildFocusEvent(wxWindow *win = NULL); + + wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } + + virtual wxEvent *Clone() const { return new wxChildFocusEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxChildFocusEvent) +}; + +// Activate event class +/* + wxEVT_ACTIVATE + wxEVT_ACTIVATE_APP + wxEVT_HIBERNATE + */ + +class WXDLLIMPEXP_CORE wxActivateEvent : public wxEvent +{ +public: + // Type of activation. For now we can only detect if it was by mouse or by + // some other method and even this is only available under wxMSW. + enum Reason + { + Reason_Mouse, + Reason_Unknown + }; + + wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true, + int Id = 0, Reason activationReason = Reason_Unknown) + : wxEvent(Id, type), + m_activationReason(activationReason) + { + m_active = active; + } + wxActivateEvent(const wxActivateEvent& event) + : wxEvent(event) + { + m_active = event.m_active; + m_activationReason = event.m_activationReason; + } + + bool GetActive() const { return m_active; } + Reason GetActivationReason() const { return m_activationReason;} + + virtual wxEvent *Clone() const { return new wxActivateEvent(*this); } + +private: + bool m_active; + Reason m_activationReason; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxActivateEvent) +}; + +// InitDialog event class +/* + wxEVT_INIT_DIALOG + */ + +class WXDLLIMPEXP_CORE wxInitDialogEvent : public wxEvent +{ +public: + wxInitDialogEvent(int Id = 0) + : wxEvent(Id, wxEVT_INIT_DIALOG) + { } + + virtual wxEvent *Clone() const { return new wxInitDialogEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxInitDialogEvent) +}; + +// Miscellaneous menu event class +/* + wxEVT_MENU_OPEN, + wxEVT_MENU_CLOSE, + wxEVT_MENU_HIGHLIGHT, +*/ + +class WXDLLIMPEXP_CORE wxMenuEvent : public wxEvent +{ +public: + wxMenuEvent(wxEventType type = wxEVT_NULL, int winid = 0, wxMenu* menu = NULL) + : wxEvent(winid, type) + { m_menuId = winid; m_menu = menu; } + wxMenuEvent(const wxMenuEvent& event) + : wxEvent(event) + { m_menuId = event.m_menuId; m_menu = event.m_menu; } + + // only for wxEVT_MENU_HIGHLIGHT + int GetMenuId() const { return m_menuId; } + + // only for wxEVT_MENU_OPEN/CLOSE + bool IsPopup() const { return m_menuId == wxID_ANY; } + + // only for wxEVT_MENU_OPEN/CLOSE + wxMenu* GetMenu() const { return m_menu; } + + virtual wxEvent *Clone() const { return new wxMenuEvent(*this); } + +private: + int m_menuId; + wxMenu* m_menu; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMenuEvent) +}; + +// Window close or session close event class +/* + wxEVT_CLOSE_WINDOW, + wxEVT_END_SESSION, + wxEVT_QUERY_END_SESSION + */ + +class WXDLLIMPEXP_CORE wxCloseEvent : public wxEvent +{ +public: + wxCloseEvent(wxEventType type = wxEVT_NULL, int winid = 0) + : wxEvent(winid, type), + m_loggingOff(true), + m_veto(false), // should be false by default + m_canVeto(true) {} + + wxCloseEvent(const wxCloseEvent& event) + : wxEvent(event), + m_loggingOff(event.m_loggingOff), + m_veto(event.m_veto), + m_canVeto(event.m_canVeto) {} + + void SetLoggingOff(bool logOff) { m_loggingOff = logOff; } + bool GetLoggingOff() const + { + // m_loggingOff flag is only used by wxEVT_[QUERY_]END_SESSION, it + // doesn't make sense for wxEVT_CLOSE_WINDOW + wxASSERT_MSG( m_eventType != wxEVT_CLOSE_WINDOW, + wxT("this flag is for end session events only") ); + + return m_loggingOff; + } + + void Veto(bool veto = true) + { + // GetVeto() will return false anyhow... + wxCHECK_RET( m_canVeto, + wxT("call to Veto() ignored (can't veto this event)") ); + + m_veto = veto; + } + void SetCanVeto(bool canVeto) { m_canVeto = canVeto; } + bool CanVeto() const { return m_canVeto; } + bool GetVeto() const { return m_canVeto && m_veto; } + + virtual wxEvent *Clone() const { return new wxCloseEvent(*this); } + +protected: + bool m_loggingOff, + m_veto, + m_canVeto; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCloseEvent) +}; + +/* + wxEVT_SHOW + */ + +class WXDLLIMPEXP_CORE wxShowEvent : public wxEvent +{ +public: + wxShowEvent(int winid = 0, bool show = false) + : wxEvent(winid, wxEVT_SHOW) + { m_show = show; } + wxShowEvent(const wxShowEvent& event) + : wxEvent(event) + { m_show = event.m_show; } + + void SetShow(bool show) { m_show = show; } + + // return true if the window was shown, false if hidden + bool IsShown() const { return m_show; } + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( bool GetShow() const { return IsShown(); } ) +#endif + + virtual wxEvent *Clone() const { return new wxShowEvent(*this); } + +protected: + bool m_show; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxShowEvent) +}; + +/* + wxEVT_ICONIZE + */ + +class WXDLLIMPEXP_CORE wxIconizeEvent : public wxEvent +{ +public: + wxIconizeEvent(int winid = 0, bool iconized = true) + : wxEvent(winid, wxEVT_ICONIZE) + { m_iconized = iconized; } + wxIconizeEvent(const wxIconizeEvent& event) + : wxEvent(event) + { m_iconized = event.m_iconized; } + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( bool Iconized() const { return IsIconized(); } ) +#endif + // return true if the frame was iconized, false if restored + bool IsIconized() const { return m_iconized; } + + virtual wxEvent *Clone() const { return new wxIconizeEvent(*this); } + +protected: + bool m_iconized; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIconizeEvent) +}; +/* + wxEVT_MAXIMIZE + */ + +class WXDLLIMPEXP_CORE wxMaximizeEvent : public wxEvent +{ +public: + wxMaximizeEvent(int winid = 0) + : wxEvent(winid, wxEVT_MAXIMIZE) + { } + + virtual wxEvent *Clone() const { return new wxMaximizeEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMaximizeEvent) +}; + +// Joystick event class +/* + wxEVT_JOY_BUTTON_DOWN, + wxEVT_JOY_BUTTON_UP, + wxEVT_JOY_MOVE, + wxEVT_JOY_ZMOVE +*/ + +// Which joystick? Same as Windows ids so no conversion necessary. +enum +{ + wxJOYSTICK1, + wxJOYSTICK2 +}; + +// Which button is down? +enum +{ + wxJOY_BUTTON_ANY = -1, + wxJOY_BUTTON1 = 1, + wxJOY_BUTTON2 = 2, + wxJOY_BUTTON3 = 4, + wxJOY_BUTTON4 = 8 +}; + +class WXDLLIMPEXP_CORE wxJoystickEvent : public wxEvent +{ +protected: + wxPoint m_pos; + int m_zPosition; + int m_buttonChange; // Which button changed? + int m_buttonState; // Which buttons are down? + int m_joyStick; // Which joystick? + +public: + wxJoystickEvent(wxEventType type = wxEVT_NULL, + int state = 0, + int joystick = wxJOYSTICK1, + int change = 0) + : wxEvent(0, type), + m_pos(), + m_zPosition(0), + m_buttonChange(change), + m_buttonState(state), + m_joyStick(joystick) + { + } + wxJoystickEvent(const wxJoystickEvent& event) + : wxEvent(event), + m_pos(event.m_pos), + m_zPosition(event.m_zPosition), + m_buttonChange(event.m_buttonChange), + m_buttonState(event.m_buttonState), + m_joyStick(event.m_joyStick) + { } + + wxPoint GetPosition() const { return m_pos; } + int GetZPosition() const { return m_zPosition; } + int GetButtonState() const { return m_buttonState; } + int GetButtonChange() const { return m_buttonChange; } + int GetJoystick() const { return m_joyStick; } + + void SetJoystick(int stick) { m_joyStick = stick; } + void SetButtonState(int state) { m_buttonState = state; } + void SetButtonChange(int change) { m_buttonChange = change; } + void SetPosition(const wxPoint& pos) { m_pos = pos; } + void SetZPosition(int zPos) { m_zPosition = zPos; } + + // Was it a button event? (*doesn't* mean: is any button *down*?) + bool IsButton() const { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) || + (GetEventType() == wxEVT_JOY_BUTTON_UP)); } + + // Was it a move event? + bool IsMove() const { return (GetEventType() == wxEVT_JOY_MOVE); } + + // Was it a zmove event? + bool IsZMove() const { return (GetEventType() == wxEVT_JOY_ZMOVE); } + + // Was it a down event from button 1, 2, 3, 4 or any? + bool ButtonDown(int but = wxJOY_BUTTON_ANY) const + { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) && + ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); } + + // Was it a up event from button 1, 2, 3 or any? + bool ButtonUp(int but = wxJOY_BUTTON_ANY) const + { return ((GetEventType() == wxEVT_JOY_BUTTON_UP) && + ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); } + + // Was the given button 1,2,3,4 or any in Down state? + bool ButtonIsDown(int but = wxJOY_BUTTON_ANY) const + { return (((but == wxJOY_BUTTON_ANY) && (m_buttonState != 0)) || + ((m_buttonState & but) == but)); } + + virtual wxEvent *Clone() const { return new wxJoystickEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxJoystickEvent) +}; + +// Drop files event class +/* + wxEVT_DROP_FILES + */ + +class WXDLLIMPEXP_CORE wxDropFilesEvent : public wxEvent +{ +public: + int m_noFiles; + wxPoint m_pos; + wxString* m_files; + + wxDropFilesEvent(wxEventType type = wxEVT_NULL, + int noFiles = 0, + wxString *files = NULL) + : wxEvent(0, type), + m_noFiles(noFiles), + m_pos(), + m_files(files) + { } + + // we need a copy ctor to avoid deleting m_files pointer twice + wxDropFilesEvent(const wxDropFilesEvent& other) + : wxEvent(other), + m_noFiles(other.m_noFiles), + m_pos(other.m_pos), + m_files(NULL) + { + m_files = new wxString[m_noFiles]; + for ( int n = 0; n < m_noFiles; n++ ) + { + m_files[n] = other.m_files[n]; + } + } + + virtual ~wxDropFilesEvent() + { + delete [] m_files; + } + + wxPoint GetPosition() const { return m_pos; } + int GetNumberOfFiles() const { return m_noFiles; } + wxString *GetFiles() const { return m_files; } + + virtual wxEvent *Clone() const { return new wxDropFilesEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDropFilesEvent) +}; + +// Update UI event +/* + wxEVT_UPDATE_UI + */ + +// Whether to always send update events to windows, or +// to only send update events to those with the +// wxWS_EX_PROCESS_UI_UPDATES style. + +enum wxUpdateUIMode +{ + // Send UI update events to all windows + wxUPDATE_UI_PROCESS_ALL, + + // Send UI update events to windows that have + // the wxWS_EX_PROCESS_UI_UPDATES flag specified + wxUPDATE_UI_PROCESS_SPECIFIED +}; + +class WXDLLIMPEXP_CORE wxUpdateUIEvent : public wxCommandEvent +{ +public: + wxUpdateUIEvent(wxWindowID commandId = 0) + : wxCommandEvent(wxEVT_UPDATE_UI, commandId) + { + m_checked = + m_enabled = + m_shown = + m_setEnabled = + m_setShown = + m_setText = + m_setChecked = false; + } + wxUpdateUIEvent(const wxUpdateUIEvent& event) + : wxCommandEvent(event), + m_checked(event.m_checked), + m_enabled(event.m_enabled), + m_shown(event.m_shown), + m_setEnabled(event.m_setEnabled), + m_setShown(event.m_setShown), + m_setText(event.m_setText), + m_setChecked(event.m_setChecked), + m_text(event.m_text) + { } + + bool GetChecked() const { return m_checked; } + bool GetEnabled() const { return m_enabled; } + bool GetShown() const { return m_shown; } + wxString GetText() const { return m_text; } + bool GetSetText() const { return m_setText; } + bool GetSetChecked() const { return m_setChecked; } + bool GetSetEnabled() const { return m_setEnabled; } + bool GetSetShown() const { return m_setShown; } + + void Check(bool check) { m_checked = check; m_setChecked = true; } + void Enable(bool enable) { m_enabled = enable; m_setEnabled = true; } + void Show(bool show) { m_shown = show; m_setShown = true; } + void SetText(const wxString& text) { m_text = text; m_setText = true; } + + // Sets the interval between updates in milliseconds. + // Set to -1 to disable updates, or to 0 to update as frequently as possible. + static void SetUpdateInterval(long updateInterval) { sm_updateInterval = updateInterval; } + + // Returns the current interval between updates in milliseconds + static long GetUpdateInterval() { return sm_updateInterval; } + + // Can we update this window? + static bool CanUpdate(wxWindowBase *win); + + // Reset the update time to provide a delay until the next + // time we should update + static void ResetUpdateTime(); + + // Specify how wxWidgets will send update events: to + // all windows, or only to those which specify that they + // will process the events. + static void SetMode(wxUpdateUIMode mode) { sm_updateMode = mode; } + + // Returns the UI update mode + static wxUpdateUIMode GetMode() { return sm_updateMode; } + + virtual wxEvent *Clone() const { return new wxUpdateUIEvent(*this); } + +protected: + bool m_checked; + bool m_enabled; + bool m_shown; + bool m_setEnabled; + bool m_setShown; + bool m_setText; + bool m_setChecked; + wxString m_text; +#if wxUSE_LONGLONG + static wxLongLong sm_lastUpdate; +#endif + static long sm_updateInterval; + static wxUpdateUIMode sm_updateMode; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxUpdateUIEvent) +}; + +/* + wxEVT_SYS_COLOUR_CHANGED + */ + +// TODO: shouldn't all events record the window ID? +class WXDLLIMPEXP_CORE wxSysColourChangedEvent : public wxEvent +{ +public: + wxSysColourChangedEvent() + : wxEvent(0, wxEVT_SYS_COLOUR_CHANGED) + { } + + virtual wxEvent *Clone() const { return new wxSysColourChangedEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSysColourChangedEvent) +}; + +/* + wxEVT_MOUSE_CAPTURE_CHANGED + The window losing the capture receives this message + (even if it released the capture itself). + */ + +class WXDLLIMPEXP_CORE wxMouseCaptureChangedEvent : public wxEvent +{ +public: + wxMouseCaptureChangedEvent(wxWindowID winid = 0, wxWindow* gainedCapture = NULL) + : wxEvent(winid, wxEVT_MOUSE_CAPTURE_CHANGED), + m_gainedCapture(gainedCapture) + { } + + wxMouseCaptureChangedEvent(const wxMouseCaptureChangedEvent& event) + : wxEvent(event), + m_gainedCapture(event.m_gainedCapture) + { } + + virtual wxEvent *Clone() const { return new wxMouseCaptureChangedEvent(*this); } + + wxWindow* GetCapturedWindow() const { return m_gainedCapture; } + +private: + wxWindow* m_gainedCapture; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMouseCaptureChangedEvent) +}; + +/* + wxEVT_MOUSE_CAPTURE_LOST + The window losing the capture receives this message, unless it released it + it itself or unless wxWindow::CaptureMouse was called on another window + (and so capture will be restored when the new capturer releases it). + */ + +class WXDLLIMPEXP_CORE wxMouseCaptureLostEvent : public wxEvent +{ +public: + wxMouseCaptureLostEvent(wxWindowID winid = 0) + : wxEvent(winid, wxEVT_MOUSE_CAPTURE_LOST) + {} + + wxMouseCaptureLostEvent(const wxMouseCaptureLostEvent& event) + : wxEvent(event) + {} + + virtual wxEvent *Clone() const { return new wxMouseCaptureLostEvent(*this); } + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMouseCaptureLostEvent) +}; + +/* + wxEVT_DISPLAY_CHANGED + */ +class WXDLLIMPEXP_CORE wxDisplayChangedEvent : public wxEvent +{ +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDisplayChangedEvent) + +public: + wxDisplayChangedEvent() + : wxEvent(0, wxEVT_DISPLAY_CHANGED) + { } + + virtual wxEvent *Clone() const { return new wxDisplayChangedEvent(*this); } +}; + +/* + wxEVT_PALETTE_CHANGED + */ + +class WXDLLIMPEXP_CORE wxPaletteChangedEvent : public wxEvent +{ +public: + wxPaletteChangedEvent(wxWindowID winid = 0) + : wxEvent(winid, wxEVT_PALETTE_CHANGED), + m_changedWindow(NULL) + { } + + wxPaletteChangedEvent(const wxPaletteChangedEvent& event) + : wxEvent(event), + m_changedWindow(event.m_changedWindow) + { } + + void SetChangedWindow(wxWindow* win) { m_changedWindow = win; } + wxWindow* GetChangedWindow() const { return m_changedWindow; } + + virtual wxEvent *Clone() const { return new wxPaletteChangedEvent(*this); } + +protected: + wxWindow* m_changedWindow; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPaletteChangedEvent) +}; + +/* + wxEVT_QUERY_NEW_PALETTE + Indicates the window is getting keyboard focus and should re-do its palette. + */ + +class WXDLLIMPEXP_CORE wxQueryNewPaletteEvent : public wxEvent +{ +public: + wxQueryNewPaletteEvent(wxWindowID winid = 0) + : wxEvent(winid, wxEVT_QUERY_NEW_PALETTE), + m_paletteRealized(false) + { } + wxQueryNewPaletteEvent(const wxQueryNewPaletteEvent& event) + : wxEvent(event), + m_paletteRealized(event.m_paletteRealized) + { } + + // App sets this if it changes the palette. + void SetPaletteRealized(bool realized) { m_paletteRealized = realized; } + bool GetPaletteRealized() const { return m_paletteRealized; } + + virtual wxEvent *Clone() const { return new wxQueryNewPaletteEvent(*this); } + +protected: + bool m_paletteRealized; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxQueryNewPaletteEvent) +}; + +/* + Event generated by dialog navigation keys + wxEVT_NAVIGATION_KEY + */ +// NB: don't derive from command event to avoid being propagated to the parent +class WXDLLIMPEXP_CORE wxNavigationKeyEvent : public wxEvent +{ +public: + wxNavigationKeyEvent() + : wxEvent(0, wxEVT_NAVIGATION_KEY), + m_flags(IsForward | FromTab), // defaults are for TAB + m_focus(NULL) + { + m_propagationLevel = wxEVENT_PROPAGATE_NONE; + } + + wxNavigationKeyEvent(const wxNavigationKeyEvent& event) + : wxEvent(event), + m_flags(event.m_flags), + m_focus(event.m_focus) + { } + + // direction: forward (true) or backward (false) + bool GetDirection() const + { return (m_flags & IsForward) != 0; } + void SetDirection(bool bForward) + { if ( bForward ) m_flags |= IsForward; else m_flags &= ~IsForward; } + + // it may be a window change event (MDI, notebook pages...) or a control + // change event + bool IsWindowChange() const + { return (m_flags & WinChange) != 0; } + void SetWindowChange(bool bIs) + { if ( bIs ) m_flags |= WinChange; else m_flags &= ~WinChange; } + + // Set to true under MSW if the event was generated using the tab key. + // This is required for proper navogation over radio buttons + bool IsFromTab() const + { return (m_flags & FromTab) != 0; } + void SetFromTab(bool bIs) + { if ( bIs ) m_flags |= FromTab; else m_flags &= ~FromTab; } + + // the child which has the focus currently (may be NULL - use + // wxWindow::FindFocus then) + wxWindow* GetCurrentFocus() const { return m_focus; } + void SetCurrentFocus(wxWindow *win) { m_focus = win; } + + // Set flags + void SetFlags(long flags) { m_flags = flags; } + + virtual wxEvent *Clone() const { return new wxNavigationKeyEvent(*this); } + + enum wxNavigationKeyEventFlags + { + IsBackward = 0x0000, + IsForward = 0x0001, + WinChange = 0x0002, + FromTab = 0x0004 + }; + + long m_flags; + wxWindow *m_focus; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNavigationKeyEvent) +}; + +// Window creation/destruction events: the first is sent as soon as window is +// created (i.e. the underlying GUI object exists), but when the C++ object is +// fully initialized (so virtual functions may be called). The second, +// wxEVT_DESTROY, is sent right before the window is destroyed - again, it's +// still safe to call virtual functions at this moment +/* + wxEVT_CREATE + wxEVT_DESTROY + */ + +class WXDLLIMPEXP_CORE wxWindowCreateEvent : public wxCommandEvent +{ +public: + wxWindowCreateEvent(wxWindow *win = NULL); + + wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } + + virtual wxEvent *Clone() const { return new wxWindowCreateEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWindowCreateEvent) +}; + +class WXDLLIMPEXP_CORE wxWindowDestroyEvent : public wxCommandEvent +{ +public: + wxWindowDestroyEvent(wxWindow *win = NULL); + + wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } + + virtual wxEvent *Clone() const { return new wxWindowDestroyEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWindowDestroyEvent) +}; + +// A help event is sent when the user clicks on a window in context-help mode. +/* + wxEVT_HELP + wxEVT_DETAILED_HELP +*/ + +class WXDLLIMPEXP_CORE wxHelpEvent : public wxCommandEvent +{ +public: + // how was this help event generated? + enum Origin + { + Origin_Unknown, // unrecognized event source + Origin_Keyboard, // event generated from F1 key press + Origin_HelpButton // event from [?] button on the title bar (Windows) + }; + + wxHelpEvent(wxEventType type = wxEVT_NULL, + wxWindowID winid = 0, + const wxPoint& pt = wxDefaultPosition, + Origin origin = Origin_Unknown) + : wxCommandEvent(type, winid), + m_pos(pt), + m_origin(GuessOrigin(origin)) + { } + wxHelpEvent(const wxHelpEvent& event) + : wxCommandEvent(event), + m_pos(event.m_pos), + m_target(event.m_target), + m_link(event.m_link), + m_origin(event.m_origin) + { } + + // Position of event (in screen coordinates) + const wxPoint& GetPosition() const { return m_pos; } + void SetPosition(const wxPoint& pos) { m_pos = pos; } + + // Optional link to further help + const wxString& GetLink() const { return m_link; } + void SetLink(const wxString& link) { m_link = link; } + + // Optional target to display help in. E.g. a window specification + const wxString& GetTarget() const { return m_target; } + void SetTarget(const wxString& target) { m_target = target; } + + virtual wxEvent *Clone() const { return new wxHelpEvent(*this); } + + // optional indication of the event source + Origin GetOrigin() const { return m_origin; } + void SetOrigin(Origin origin) { m_origin = origin; } + +protected: + wxPoint m_pos; + wxString m_target; + wxString m_link; + Origin m_origin; + + // we can try to guess the event origin ourselves, even if none is + // specified in the ctor + static Origin GuessOrigin(Origin origin); + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxHelpEvent) +}; + +// A Clipboard Text event is sent when a window intercepts text copy/cut/paste +// message, i.e. the user has cut/copied/pasted data from/into a text control +// via ctrl-C/X/V, ctrl/shift-del/insert, a popup menu command, etc. +// NOTE : under windows these events are *NOT* generated automatically +// for a Rich Edit text control. +/* +wxEVT_TEXT_COPY +wxEVT_TEXT_CUT +wxEVT_TEXT_PASTE +*/ + +class WXDLLIMPEXP_CORE wxClipboardTextEvent : public wxCommandEvent +{ +public: + wxClipboardTextEvent(wxEventType type = wxEVT_NULL, + wxWindowID winid = 0) + : wxCommandEvent(type, winid) + { } + wxClipboardTextEvent(const wxClipboardTextEvent& event) + : wxCommandEvent(event) + { } + + virtual wxEvent *Clone() const { return new wxClipboardTextEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxClipboardTextEvent) +}; + +// A Context event is sent when the user right clicks on a window or +// presses Shift-F10 +// NOTE : Under windows this is a repackaged WM_CONTETXMENU message +// Under other systems it may have to be generated from a right click event +/* + wxEVT_CONTEXT_MENU +*/ + +class WXDLLIMPEXP_CORE wxContextMenuEvent : public wxCommandEvent +{ +public: + wxContextMenuEvent(wxEventType type = wxEVT_NULL, + wxWindowID winid = 0, + const wxPoint& pt = wxDefaultPosition) + : wxCommandEvent(type, winid), + m_pos(pt) + { } + wxContextMenuEvent(const wxContextMenuEvent& event) + : wxCommandEvent(event), + m_pos(event.m_pos) + { } + + // Position of event (in screen coordinates) + const wxPoint& GetPosition() const { return m_pos; } + void SetPosition(const wxPoint& pos) { m_pos = pos; } + + virtual wxEvent *Clone() const { return new wxContextMenuEvent(*this); } + +protected: + wxPoint m_pos; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxContextMenuEvent) +}; + + +/* TODO + wxEVT_MOUSE_CAPTURE_CHANGED, + wxEVT_SETTING_CHANGED, // WM_WININICHANGE (NT) / WM_SETTINGCHANGE (Win95) +// wxEVT_FONT_CHANGED, // WM_FONTCHANGE: roll into wxEVT_SETTING_CHANGED, but remember to propagate + // wxEVT_FONT_CHANGED to all other windows (maybe). + wxEVT_DRAW_ITEM, // Leave these three as virtual functions in wxControl?? Platform-specific. + wxEVT_MEASURE_ITEM, + wxEVT_COMPARE_ITEM +*/ + +#endif // wxUSE_GUI + + +// ============================================================================ +// event handler and related classes +// ============================================================================ + + +// struct containing the members common to static and dynamic event tables +// entries +struct WXDLLIMPEXP_BASE wxEventTableEntryBase +{ + wxEventTableEntryBase(int winid, int idLast, + wxEventFunctor* fn, wxObject *data) + : m_id(winid), + m_lastId(idLast), + m_fn(fn), + m_callbackUserData(data) + { + wxASSERT_MSG( idLast == wxID_ANY || winid <= idLast, + "invalid IDs range: lower bound > upper bound" ); + } + + wxEventTableEntryBase( const wxEventTableEntryBase &entry ) + : m_id( entry.m_id ), + m_lastId( entry.m_lastId ), + m_fn( entry.m_fn ), + m_callbackUserData( entry.m_callbackUserData ) + { + // This is a 'hack' to ensure that only one instance tries to delete + // the functor pointer. It is safe as long as the only place where the + // copy constructor is being called is when the static event tables are + // being initialized (a temporary instance is created and then this + // constructor is called). + + const_cast( entry ).m_fn = NULL; + } + + ~wxEventTableEntryBase() + { + delete m_fn; + } + + // the range of ids for this entry: if m_lastId == wxID_ANY, the range + // consists only of m_id, otherwise it is m_id..m_lastId inclusive + int m_id, + m_lastId; + + // function/method/functor to call + wxEventFunctor* m_fn; + + // arbitrary user data associated with the callback + wxObject* m_callbackUserData; + +private: + wxDECLARE_NO_ASSIGN_CLASS(wxEventTableEntryBase); +}; + +// an entry from a static event table +struct WXDLLIMPEXP_BASE wxEventTableEntry : public wxEventTableEntryBase +{ + wxEventTableEntry(const int& evType, int winid, int idLast, + wxEventFunctor* fn, wxObject *data) + : wxEventTableEntryBase(winid, idLast, fn, data), + m_eventType(evType) + { } + + // the reference to event type: this allows us to not care about the + // (undefined) order in which the event table entries and the event types + // are initialized: initially the value of this reference might be + // invalid, but by the time it is used for the first time, all global + // objects will have been initialized (including the event type constants) + // and so it will have the correct value when it is needed + const int& m_eventType; + +private: + wxDECLARE_NO_ASSIGN_CLASS(wxEventTableEntry); +}; + +// an entry used in dynamic event table managed by wxEvtHandler::Connect() +struct WXDLLIMPEXP_BASE wxDynamicEventTableEntry : public wxEventTableEntryBase +{ + wxDynamicEventTableEntry(int evType, int winid, int idLast, + wxEventFunctor* fn, wxObject *data) + : wxEventTableEntryBase(winid, idLast, fn, data), + m_eventType(evType) + { } + + // not a reference here as we can't keep a reference to a temporary int + // created to wrap the constant value typically passed to Connect() - nor + // do we need it + int m_eventType; + +private: + wxDECLARE_NO_ASSIGN_CLASS(wxDynamicEventTableEntry); +}; + +// ---------------------------------------------------------------------------- +// wxEventTable: an array of event entries terminated with {0, 0, 0, 0, 0} +// ---------------------------------------------------------------------------- + +struct WXDLLIMPEXP_BASE wxEventTable +{ + const wxEventTable *baseTable; // base event table (next in chain) + const wxEventTableEntry *entries; // bottom of entry array +}; + +// ---------------------------------------------------------------------------- +// wxEventHashTable: a helper of wxEvtHandler to speed up wxEventTable lookups. +// ---------------------------------------------------------------------------- + +WX_DEFINE_ARRAY_PTR(const wxEventTableEntry*, wxEventTableEntryPointerArray); + +class WXDLLIMPEXP_BASE wxEventHashTable +{ +private: + // Internal data structs + struct EventTypeTable + { + wxEventType eventType; + wxEventTableEntryPointerArray eventEntryTable; + }; + typedef EventTypeTable* EventTypeTablePointer; + +public: + // Constructor, needs the event table it needs to hash later on. + // Note: hashing of the event table is not done in the constructor as it + // can be that the event table is not yet full initialize, the hash + // will gets initialized when handling the first event look-up request. + wxEventHashTable(const wxEventTable &table); + // Destructor. + ~wxEventHashTable(); + + // Handle the given event, in other words search the event table hash + // and call self->ProcessEvent() if a match was found. + bool HandleEvent(wxEvent& event, wxEvtHandler *self); + + // Clear table + void Clear(); + +#if wxUSE_MEMORY_TRACING + // Clear all tables: only used to work around problems in memory tracing + // code + static void ClearAll(); +#endif // wxUSE_MEMORY_TRACING + +protected: + // Init the hash table with the entries of the static event table. + void InitHashTable(); + // Helper function of InitHashTable() to insert 1 entry into the hash table. + void AddEntry(const wxEventTableEntry &entry); + // Allocate and init with null pointers the base hash table. + void AllocEventTypeTable(size_t size); + // Grow the hash table in size and transfer all items currently + // in the table to the correct location in the new table. + void GrowEventTypeTable(); + +protected: + const wxEventTable &m_table; + bool m_rebuildHash; + + size_t m_size; + EventTypeTablePointer *m_eventTypeTable; + + static wxEventHashTable* sm_first; + wxEventHashTable* m_previous; + wxEventHashTable* m_next; + + wxDECLARE_NO_COPY_CLASS(wxEventHashTable); +}; + +// ---------------------------------------------------------------------------- +// wxEvtHandler: the base class for all objects handling wxWidgets events +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxEvtHandler : public wxObject + , public wxTrackable +{ +public: + wxEvtHandler(); + virtual ~wxEvtHandler(); + + + // Event handler chain + // ------------------- + + wxEvtHandler *GetNextHandler() const { return m_nextHandler; } + wxEvtHandler *GetPreviousHandler() const { return m_previousHandler; } + virtual void SetNextHandler(wxEvtHandler *handler) { m_nextHandler = handler; } + virtual void SetPreviousHandler(wxEvtHandler *handler) { m_previousHandler = handler; } + + void SetEvtHandlerEnabled(bool enabled) { m_enabled = enabled; } + bool GetEvtHandlerEnabled() const { return m_enabled; } + + void Unlink(); + bool IsUnlinked() const; + + + // Global event filters + // -------------------- + + // Add an event filter whose FilterEvent() method will be called for each + // and every event processed by wxWidgets. The filters are called in LIFO + // order and wxApp is registered as an event filter by default. The pointer + // must remain valid until it's removed with RemoveFilter() and is not + // deleted by wxEvtHandler. + static void AddFilter(wxEventFilter* filter); + + // Remove a filter previously installed with AddFilter(). + static void RemoveFilter(wxEventFilter* filter); + + + // Event queuing and processing + // ---------------------------- + + // Process an event right now: this can only be called from the main + // thread, use QueueEvent() for scheduling the events for + // processing from other threads. + virtual bool ProcessEvent(wxEvent& event); + + // Process an event by calling ProcessEvent and handling any exceptions + // thrown by event handlers. It's mostly useful when processing wx events + // when called from C code (e.g. in GTK+ callback) when the exception + // wouldn't correctly propagate to wxEventLoop. + bool SafelyProcessEvent(wxEvent& event); + // NOTE: uses ProcessEvent() + + // This method tries to process the event in this event handler, including + // any preprocessing done by TryBefore() and all the handlers chained to + // it, but excluding the post-processing done in TryAfter(). + // + // It is meant to be called from ProcessEvent() only and is not virtual, + // additional event handlers can be hooked into the normal event processing + // logic using TryBefore() and TryAfter() hooks. + // + // You can also call it yourself to forward an event to another handler but + // without propagating it upwards if it's unhandled (this is usually + // unwanted when forwarding as the original handler would already do it if + // needed normally). + bool ProcessEventLocally(wxEvent& event); + + // Schedule the given event to be processed later. It takes ownership of + // the event pointer, i.e. it will be deleted later. This is safe to call + // from multiple threads although you still need to ensure that wxString + // fields of the event object are deep copies and not use the same string + // buffer as other wxString objects in this thread. + virtual void QueueEvent(wxEvent *event); + + // Add an event to be processed later: notice that this function is not + // safe to call from threads other than main, use QueueEvent() + virtual void AddPendingEvent(const wxEvent& event) + { + // notice that the thread-safety problem comes from the fact that + // Clone() doesn't make deep copies of wxString fields of wxEvent + // object and so the same wxString could be used from both threads when + // the event object is destroyed in this one -- QueueEvent() avoids + // this problem as the event pointer is not used any more in this + // thread at all after it is called. + QueueEvent(event.Clone()); + } + + void ProcessPendingEvents(); + // NOTE: uses ProcessEvent() + + void DeletePendingEvents(); + +#if wxUSE_THREADS + bool ProcessThreadEvent(const wxEvent& event); + // NOTE: uses AddPendingEvent(); call only from secondary threads +#endif + +#ifdef wxHAS_CALL_AFTER + // Asynchronous method calls: these methods schedule the given method + // pointer for a later call (during the next idle event loop iteration). + // + // Notice that the method is called on this object itself, so the object + // CallAfter() is called on must have the correct dynamic type. + // + // These method can be used from another thread. + + template + void CallAfter(void (T::*method)()) + { + QueueEvent( + new wxAsyncMethodCallEvent0(static_cast(this), method) + ); + } + + // Notice that we use P1 and not T1 for the parameter to allow passing + // parameters that are convertible to the type taken by the method + // instead of being exactly the same, to be closer to the usual method call + // semantics. + template + void CallAfter(void (T::*method)(T1 x1), P1 x1) + { + QueueEvent( + new wxAsyncMethodCallEvent1( + static_cast(this), method, x1) + ); + } + + template + void CallAfter(void (T::*method)(T1 x1, T2 x2), P1 x1, P2 x2) + { + QueueEvent( + new wxAsyncMethodCallEvent2( + static_cast(this), method, x1, x2) + ); + } + + template + void CallAfter(const T& fn) + { + QueueEvent(new wxAsyncMethodCallEventFunctor(this, fn)); + } +#endif // wxHAS_CALL_AFTER + + + // Connecting and disconnecting + // ---------------------------- + + // These functions are used for old, untyped, event handlers and don't + // check that the type of the function passed to them actually matches the + // type of the event. They also only allow connecting events to methods of + // wxEvtHandler-derived classes. + // + // The template Connect() methods below are safer and allow connecting + // events to arbitrary functions or functors -- but require compiler + // support for templates. + + // Dynamic association of a member function handler with the event handler, + // winid and event type + void Connect(int winid, + int lastId, + wxEventType eventType, + wxObjectEventFunction func, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { + DoBind(winid, lastId, eventType, + wxNewEventFunctor(eventType, func, eventSink), + userData); + } + + // Convenience function: take just one id + void Connect(int winid, + wxEventType eventType, + wxObjectEventFunction func, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { Connect(winid, wxID_ANY, eventType, func, userData, eventSink); } + + // Even more convenient: without id (same as using id of wxID_ANY) + void Connect(wxEventType eventType, + wxObjectEventFunction func, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { Connect(wxID_ANY, wxID_ANY, eventType, func, userData, eventSink); } + + bool Disconnect(int winid, + int lastId, + wxEventType eventType, + wxObjectEventFunction func = NULL, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { + return DoUnbind(winid, lastId, eventType, + wxMakeEventFunctor(eventType, func, eventSink), + userData ); + } + + bool Disconnect(int winid = wxID_ANY, + wxEventType eventType = wxEVT_NULL, + wxObjectEventFunction func = NULL, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { return Disconnect(winid, wxID_ANY, eventType, func, userData, eventSink); } + + bool Disconnect(wxEventType eventType, + wxObjectEventFunction func, + wxObject *userData = NULL, + wxEvtHandler *eventSink = NULL) + { return Disconnect(wxID_ANY, eventType, func, userData, eventSink); } + +#ifdef wxHAS_EVENT_BIND + // Bind functions to an event: + template + void Bind(const EventTag& eventType, + void (*function)(EventArg &), + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL) + { + DoBind(winid, lastId, eventType, + wxNewEventFunctor(eventType, function), + userData); + } + + + template + bool Unbind(const EventTag& eventType, + void (*function)(EventArg &), + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL) + { + return DoUnbind(winid, lastId, eventType, + wxMakeEventFunctor(eventType, function), + userData); + } + + // Bind functors to an event: + template + void Bind(const EventTag& eventType, + const Functor &functor, + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL) + { + DoBind(winid, lastId, eventType, + wxNewEventFunctor(eventType, functor), + userData); + } + + + template + bool Unbind(const EventTag& eventType, + const Functor &functor, + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL) + { + return DoUnbind(winid, lastId, eventType, + wxMakeEventFunctor(eventType, functor), + userData); + } + + + // Bind a method of a class (called on the specified handler which must + // be convertible to this class) object to an event: + + template + void Bind(const EventTag &eventType, + void (Class::*method)(EventArg &), + EventHandler *handler, + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL) + { + DoBind(winid, lastId, eventType, + wxNewEventFunctor(eventType, method, handler), + userData); + } + + template + bool Unbind(const EventTag &eventType, + void (Class::*method)(EventArg&), + EventHandler *handler, + int winid = wxID_ANY, + int lastId = wxID_ANY, + wxObject *userData = NULL ) + { + return DoUnbind(winid, lastId, eventType, + wxMakeEventFunctor(eventType, method, handler), + userData); + } +#endif // wxHAS_EVENT_BIND + + wxList* GetDynamicEventTable() const { return m_dynamicEvents ; } + + // User data can be associated with each wxEvtHandler + void SetClientObject( wxClientData *data ) { DoSetClientObject(data); } + wxClientData *GetClientObject() const { return DoGetClientObject(); } + + void SetClientData( void *data ) { DoSetClientData(data); } + void *GetClientData() const { return DoGetClientData(); } + + + // implementation from now on + // -------------------------- + + // check if the given event table entry matches this event by id (the check + // for the event type should be done by caller) and call the handler if it + // does + // + // return true if the event was processed, false otherwise (no match or the + // handler decided to skip the event) + static bool ProcessEventIfMatchesId(const wxEventTableEntryBase& tableEntry, + wxEvtHandler *handler, + wxEvent& event); + + virtual bool SearchEventTable(wxEventTable& table, wxEvent& event); + bool SearchDynamicEventTable( wxEvent& event ); + + // Avoid problems at exit by cleaning up static hash table gracefully + void ClearEventHashTable() { GetEventHashTable().Clear(); } + void OnSinkDestroyed( wxEvtHandler *sink ); + + +private: + void DoBind(int winid, + int lastId, + wxEventType eventType, + wxEventFunctor *func, + wxObject* userData = NULL); + + bool DoUnbind(int winid, + int lastId, + wxEventType eventType, + const wxEventFunctor& func, + wxObject *userData = NULL); + + static const wxEventTableEntry sm_eventTableEntries[]; + +protected: + // hooks for wxWindow used by ProcessEvent() + // ----------------------------------------- + + // this one is called before trying our own event table to allow plugging + // in the event handlers overriding the default logic, this is used by e.g. + // validators. + virtual bool TryBefore(wxEvent& event); + + // This one is not a hook but just a helper which looks up the handler in + // this object itself. + // + // It is called from ProcessEventLocally() and normally shouldn't be called + // directly as doing it would ignore any chained event handlers + bool TryHereOnly(wxEvent& event); + + // Another helper which simply calls pre-processing hook and then tries to + // handle the event at this handler level. + bool TryBeforeAndHere(wxEvent& event) + { + return TryBefore(event) || TryHereOnly(event); + } + + // this one is called after failing to find the event handle in our own + // table to give a chance to the other windows to process it + // + // base class implementation passes the event to wxTheApp + virtual bool TryAfter(wxEvent& event); + +#if WXWIN_COMPATIBILITY_2_8 + // deprecated method: override TryBefore() instead of this one + wxDEPRECATED_BUT_USED_INTERNALLY_INLINE( + virtual bool TryValidator(wxEvent& WXUNUSED(event)), return false; ) + + wxDEPRECATED_BUT_USED_INTERNALLY_INLINE( + virtual bool TryParent(wxEvent& event), return DoTryApp(event); ) +#endif // WXWIN_COMPATIBILITY_2_8 + + + static const wxEventTable sm_eventTable; + virtual const wxEventTable *GetEventTable() const; + + static wxEventHashTable sm_eventHashTable; + virtual wxEventHashTable& GetEventHashTable() const; + + wxEvtHandler* m_nextHandler; + wxEvtHandler* m_previousHandler; + wxList* m_dynamicEvents; + wxList* m_pendingEvents; + +#if wxUSE_THREADS + // critical section protecting m_pendingEvents + wxCriticalSection m_pendingEventsLock; +#endif // wxUSE_THREADS + + // Is event handler enabled? + bool m_enabled; + + + // The user data: either an object which will be deleted by the container + // when it's deleted or some raw pointer which we do nothing with - only + // one type of data can be used with the given window (i.e. you cannot set + // the void data and then associate the container with wxClientData or vice + // versa) + union + { + wxClientData *m_clientObject; + void *m_clientData; + }; + + // what kind of data do we have? + wxClientDataType m_clientDataType; + + // client data accessors + virtual void DoSetClientObject( wxClientData *data ); + virtual wxClientData *DoGetClientObject() const; + + virtual void DoSetClientData( void *data ); + virtual void *DoGetClientData() const; + + // Search tracker objects for event connection with this sink + wxEventConnectionRef *FindRefInTrackerList(wxEvtHandler *handler); + +private: + // pass the event to wxTheApp instance, called from TryAfter() + bool DoTryApp(wxEvent& event); + + // try to process events in all handlers chained to this one + bool DoTryChain(wxEvent& event); + + // Head of the event filter linked list. + static wxEventFilter* ms_filterList; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxEvtHandler) +}; + +WX_DEFINE_ARRAY_WITH_DECL_PTR(wxEvtHandler *, wxEvtHandlerArray, class WXDLLIMPEXP_BASE); + + +// Define an inline method of wxObjectEventFunctor which couldn't be defined +// before wxEvtHandler declaration: at least Sun CC refuses to compile function +// calls through pointer to member for forward-declared classes (see #12452). +inline void wxObjectEventFunctor::operator()(wxEvtHandler *handler, wxEvent& event) +{ + wxEvtHandler * const realHandler = m_handler ? m_handler : handler; + + (realHandler->*m_method)(event); +} + +// ---------------------------------------------------------------------------- +// wxEventConnectionRef represents all connections between two event handlers +// and enables automatic disconnect when an event handler sink goes out of +// scope. Each connection/disconnect increases/decreases ref count, and +// when it reaches zero the node goes out of scope. +// ---------------------------------------------------------------------------- + +class wxEventConnectionRef : public wxTrackerNode +{ +public: + wxEventConnectionRef() : m_src(NULL), m_sink(NULL), m_refCount(0) { } + wxEventConnectionRef(wxEvtHandler *src, wxEvtHandler *sink) + : m_src(src), m_sink(sink), m_refCount(1) + { + m_sink->AddNode(this); + } + + // The sink is being destroyed + virtual void OnObjectDestroy( ) + { + if ( m_src ) + m_src->OnSinkDestroyed( m_sink ); + delete this; + } + + virtual wxEventConnectionRef *ToEventConnection() { return this; } + + void IncRef() { m_refCount++; } + void DecRef() + { + if ( !--m_refCount ) + { + // The sink holds the only external pointer to this object + if ( m_sink ) + m_sink->RemoveNode(this); + delete this; + } + } + +private: + wxEvtHandler *m_src, + *m_sink; + int m_refCount; + + friend class wxEvtHandler; + + wxDECLARE_NO_ASSIGN_CLASS(wxEventConnectionRef); +}; + +// Post a message to the given event handler which will be processed during the +// next event loop iteration. +// +// Notice that this one is not thread-safe, use wxQueueEvent() +inline void wxPostEvent(wxEvtHandler *dest, const wxEvent& event) +{ + wxCHECK_RET( dest, "need an object to post event to" ); + + dest->AddPendingEvent(event); +} + +// Wrapper around wxEvtHandler::QueueEvent(): adds an event for later +// processing, unlike wxPostEvent it is safe to use from different thread even +// for events with wxString members +inline void wxQueueEvent(wxEvtHandler *dest, wxEvent *event) +{ + wxCHECK_RET( dest, "need an object to queue event for" ); + + dest->QueueEvent(event); +} + +typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&); +typedef void (wxEvtHandler::*wxIdleEventFunction)(wxIdleEvent&); +typedef void (wxEvtHandler::*wxThreadEventFunction)(wxThreadEvent&); + +#define wxEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxEventFunction, func) +#define wxIdleEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxIdleEventFunction, func) +#define wxThreadEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxThreadEventFunction, func) + +#if wxUSE_GUI + +// ---------------------------------------------------------------------------- +// wxEventBlocker: helper class to temporarily disable event handling for a window +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxEventBlocker : public wxEvtHandler +{ +public: + wxEventBlocker(wxWindow *win, wxEventType type = wxEVT_ANY); + virtual ~wxEventBlocker(); + + void Block(wxEventType type) + { + m_eventsToBlock.push_back(type); + } + + virtual bool ProcessEvent(wxEvent& event); + +protected: + wxArrayInt m_eventsToBlock; + wxWindow *m_window; + + wxDECLARE_NO_COPY_CLASS(wxEventBlocker); +}; + +typedef void (wxEvtHandler::*wxCommandEventFunction)(wxCommandEvent&); +typedef void (wxEvtHandler::*wxScrollEventFunction)(wxScrollEvent&); +typedef void (wxEvtHandler::*wxScrollWinEventFunction)(wxScrollWinEvent&); +typedef void (wxEvtHandler::*wxSizeEventFunction)(wxSizeEvent&); +typedef void (wxEvtHandler::*wxMoveEventFunction)(wxMoveEvent&); +typedef void (wxEvtHandler::*wxPaintEventFunction)(wxPaintEvent&); +typedef void (wxEvtHandler::*wxNcPaintEventFunction)(wxNcPaintEvent&); +typedef void (wxEvtHandler::*wxEraseEventFunction)(wxEraseEvent&); +typedef void (wxEvtHandler::*wxMouseEventFunction)(wxMouseEvent&); +typedef void (wxEvtHandler::*wxCharEventFunction)(wxKeyEvent&); +typedef void (wxEvtHandler::*wxFocusEventFunction)(wxFocusEvent&); +typedef void (wxEvtHandler::*wxChildFocusEventFunction)(wxChildFocusEvent&); +typedef void (wxEvtHandler::*wxActivateEventFunction)(wxActivateEvent&); +typedef void (wxEvtHandler::*wxMenuEventFunction)(wxMenuEvent&); +typedef void (wxEvtHandler::*wxJoystickEventFunction)(wxJoystickEvent&); +typedef void (wxEvtHandler::*wxDropFilesEventFunction)(wxDropFilesEvent&); +typedef void (wxEvtHandler::*wxInitDialogEventFunction)(wxInitDialogEvent&); +typedef void (wxEvtHandler::*wxSysColourChangedEventFunction)(wxSysColourChangedEvent&); +typedef void (wxEvtHandler::*wxDisplayChangedEventFunction)(wxDisplayChangedEvent&); +typedef void (wxEvtHandler::*wxUpdateUIEventFunction)(wxUpdateUIEvent&); +typedef void (wxEvtHandler::*wxCloseEventFunction)(wxCloseEvent&); +typedef void (wxEvtHandler::*wxShowEventFunction)(wxShowEvent&); +typedef void (wxEvtHandler::*wxIconizeEventFunction)(wxIconizeEvent&); +typedef void (wxEvtHandler::*wxMaximizeEventFunction)(wxMaximizeEvent&); +typedef void (wxEvtHandler::*wxNavigationKeyEventFunction)(wxNavigationKeyEvent&); +typedef void (wxEvtHandler::*wxPaletteChangedEventFunction)(wxPaletteChangedEvent&); +typedef void (wxEvtHandler::*wxQueryNewPaletteEventFunction)(wxQueryNewPaletteEvent&); +typedef void (wxEvtHandler::*wxWindowCreateEventFunction)(wxWindowCreateEvent&); +typedef void (wxEvtHandler::*wxWindowDestroyEventFunction)(wxWindowDestroyEvent&); +typedef void (wxEvtHandler::*wxSetCursorEventFunction)(wxSetCursorEvent&); +typedef void (wxEvtHandler::*wxNotifyEventFunction)(wxNotifyEvent&); +typedef void (wxEvtHandler::*wxHelpEventFunction)(wxHelpEvent&); +typedef void (wxEvtHandler::*wxContextMenuEventFunction)(wxContextMenuEvent&); +typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureChangedEvent&); +typedef void (wxEvtHandler::*wxMouseCaptureLostEventFunction)(wxMouseCaptureLostEvent&); +typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&); + + +#define wxCommandEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxCommandEventFunction, func) +#define wxScrollEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxScrollEventFunction, func) +#define wxScrollWinEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxScrollWinEventFunction, func) +#define wxSizeEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxSizeEventFunction, func) +#define wxMoveEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMoveEventFunction, func) +#define wxPaintEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxPaintEventFunction, func) +#define wxNcPaintEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxNcPaintEventFunction, func) +#define wxEraseEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxEraseEventFunction, func) +#define wxMouseEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMouseEventFunction, func) +#define wxCharEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxCharEventFunction, func) +#define wxKeyEventHandler(func) wxCharEventHandler(func) +#define wxFocusEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxFocusEventFunction, func) +#define wxChildFocusEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxChildFocusEventFunction, func) +#define wxActivateEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxActivateEventFunction, func) +#define wxMenuEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMenuEventFunction, func) +#define wxJoystickEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxJoystickEventFunction, func) +#define wxDropFilesEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxDropFilesEventFunction, func) +#define wxInitDialogEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxInitDialogEventFunction, func) +#define wxSysColourChangedEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxSysColourChangedEventFunction, func) +#define wxDisplayChangedEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxDisplayChangedEventFunction, func) +#define wxUpdateUIEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxUpdateUIEventFunction, func) +#define wxCloseEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxCloseEventFunction, func) +#define wxShowEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxShowEventFunction, func) +#define wxIconizeEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxIconizeEventFunction, func) +#define wxMaximizeEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMaximizeEventFunction, func) +#define wxNavigationKeyEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxNavigationKeyEventFunction, func) +#define wxPaletteChangedEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxPaletteChangedEventFunction, func) +#define wxQueryNewPaletteEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxQueryNewPaletteEventFunction, func) +#define wxWindowCreateEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxWindowCreateEventFunction, func) +#define wxWindowDestroyEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxWindowDestroyEventFunction, func) +#define wxSetCursorEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxSetCursorEventFunction, func) +#define wxNotifyEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxNotifyEventFunction, func) +#define wxHelpEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxHelpEventFunction, func) +#define wxContextMenuEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxContextMenuEventFunction, func) +#define wxMouseCaptureChangedEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMouseCaptureChangedEventFunction, func) +#define wxMouseCaptureLostEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMouseCaptureLostEventFunction, func) +#define wxClipboardTextEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxClipboardTextEventFunction, func) + +#endif // wxUSE_GUI + +// N.B. In GNU-WIN32, you *have* to take the address of a member function +// (use &) or the compiler crashes... + +#define wxDECLARE_EVENT_TABLE() \ + private: \ + static const wxEventTableEntry sm_eventTableEntries[]; \ + protected: \ + static const wxEventTable sm_eventTable; \ + virtual const wxEventTable* GetEventTable() const; \ + static wxEventHashTable sm_eventHashTable; \ + virtual wxEventHashTable& GetEventHashTable() const + +// N.B.: when building DLL with Borland C++ 5.5 compiler, you must initialize +// sm_eventTable before using it in GetEventTable() or the compiler gives +// E2233 (see http://groups.google.com/groups?selm=397dcc8a%241_2%40dnews) + +#define wxBEGIN_EVENT_TABLE(theClass, baseClass) \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE1(theClass, baseClass, T1) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE2(theClass, baseClass, T1, T2) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE3(theClass, baseClass, T1, T2, T3) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE4(theClass, baseClass, T1, T2, T3, T4) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE5(theClass, baseClass, T1, T2, T3, T4, T5) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE7(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxBEGIN_EVENT_TABLE_TEMPLATE8(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7, T8) \ + template \ + const wxEventTable theClass::sm_eventTable = \ + { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \ + template \ + const wxEventTable *theClass::GetEventTable() const \ + { return &theClass::sm_eventTable; } \ + template \ + wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \ + template \ + wxEventHashTable &theClass::GetEventHashTable() const \ + { return theClass::sm_eventHashTable; } \ + template \ + const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ + +#define wxEND_EVENT_TABLE() \ + wxDECLARE_EVENT_TABLE_TERMINATOR() }; + +/* + * Event table macros + */ + +// helpers for writing shorter code below: declare an event macro taking 2, 1 +// or none ids (the missing ids default to wxID_ANY) +// +// macro arguments: +// - evt one of wxEVT_XXX constants +// - id1, id2 ids of the first/last id +// - fn the function (should be cast to the right type) +#define wx__DECLARE_EVT2(evt, id1, id2, fn) \ + wxDECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL), +#define wx__DECLARE_EVT1(evt, id, fn) \ + wx__DECLARE_EVT2(evt, id, wxID_ANY, fn) +#define wx__DECLARE_EVT0(evt, fn) \ + wx__DECLARE_EVT1(evt, wxID_ANY, fn) + + +// Generic events +#define EVT_CUSTOM(event, winid, func) \ + wx__DECLARE_EVT1(event, winid, wxEventHandler(func)) +#define EVT_CUSTOM_RANGE(event, id1, id2, func) \ + wx__DECLARE_EVT2(event, id1, id2, wxEventHandler(func)) + +// EVT_COMMAND +#define EVT_COMMAND(winid, event, func) \ + wx__DECLARE_EVT1(event, winid, wxCommandEventHandler(func)) + +#define EVT_COMMAND_RANGE(id1, id2, event, func) \ + wx__DECLARE_EVT2(event, id1, id2, wxCommandEventHandler(func)) + +#define EVT_NOTIFY(event, winid, func) \ + wx__DECLARE_EVT1(event, winid, wxNotifyEventHandler(func)) + +#define EVT_NOTIFY_RANGE(event, id1, id2, func) \ + wx__DECLARE_EVT2(event, id1, id2, wxNotifyEventHandler(func)) + +// Miscellaneous +#define EVT_SIZE(func) wx__DECLARE_EVT0(wxEVT_SIZE, wxSizeEventHandler(func)) +#define EVT_SIZING(func) wx__DECLARE_EVT0(wxEVT_SIZING, wxSizeEventHandler(func)) +#define EVT_MOVE(func) wx__DECLARE_EVT0(wxEVT_MOVE, wxMoveEventHandler(func)) +#define EVT_MOVING(func) wx__DECLARE_EVT0(wxEVT_MOVING, wxMoveEventHandler(func)) +#define EVT_MOVE_START(func) wx__DECLARE_EVT0(wxEVT_MOVE_START, wxMoveEventHandler(func)) +#define EVT_MOVE_END(func) wx__DECLARE_EVT0(wxEVT_MOVE_END, wxMoveEventHandler(func)) +#define EVT_CLOSE(func) wx__DECLARE_EVT0(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(func)) +#define EVT_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_END_SESSION, wxCloseEventHandler(func)) +#define EVT_QUERY_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_QUERY_END_SESSION, wxCloseEventHandler(func)) +#define EVT_PAINT(func) wx__DECLARE_EVT0(wxEVT_PAINT, wxPaintEventHandler(func)) +#define EVT_NC_PAINT(func) wx__DECLARE_EVT0(wxEVT_NC_PAINT, wxNcPaintEventHandler(func)) +#define EVT_ERASE_BACKGROUND(func) wx__DECLARE_EVT0(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(func)) +#define EVT_CHAR(func) wx__DECLARE_EVT0(wxEVT_CHAR, wxCharEventHandler(func)) +#define EVT_KEY_DOWN(func) wx__DECLARE_EVT0(wxEVT_KEY_DOWN, wxKeyEventHandler(func)) +#define EVT_KEY_UP(func) wx__DECLARE_EVT0(wxEVT_KEY_UP, wxKeyEventHandler(func)) +#if wxUSE_HOTKEY +#define EVT_HOTKEY(winid, func) wx__DECLARE_EVT1(wxEVT_HOTKEY, winid, wxCharEventHandler(func)) +#endif +#define EVT_CHAR_HOOK(func) wx__DECLARE_EVT0(wxEVT_CHAR_HOOK, wxCharEventHandler(func)) +#define EVT_MENU_OPEN(func) wx__DECLARE_EVT0(wxEVT_MENU_OPEN, wxMenuEventHandler(func)) +#define EVT_MENU_CLOSE(func) wx__DECLARE_EVT0(wxEVT_MENU_CLOSE, wxMenuEventHandler(func)) +#define EVT_MENU_HIGHLIGHT(winid, func) wx__DECLARE_EVT1(wxEVT_MENU_HIGHLIGHT, winid, wxMenuEventHandler(func)) +#define EVT_MENU_HIGHLIGHT_ALL(func) wx__DECLARE_EVT0(wxEVT_MENU_HIGHLIGHT, wxMenuEventHandler(func)) +#define EVT_SET_FOCUS(func) wx__DECLARE_EVT0(wxEVT_SET_FOCUS, wxFocusEventHandler(func)) +#define EVT_KILL_FOCUS(func) wx__DECLARE_EVT0(wxEVT_KILL_FOCUS, wxFocusEventHandler(func)) +#define EVT_CHILD_FOCUS(func) wx__DECLARE_EVT0(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(func)) +#define EVT_ACTIVATE(func) wx__DECLARE_EVT0(wxEVT_ACTIVATE, wxActivateEventHandler(func)) +#define EVT_ACTIVATE_APP(func) wx__DECLARE_EVT0(wxEVT_ACTIVATE_APP, wxActivateEventHandler(func)) +#define EVT_HIBERNATE(func) wx__DECLARE_EVT0(wxEVT_HIBERNATE, wxActivateEventHandler(func)) +#define EVT_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_END_SESSION, wxCloseEventHandler(func)) +#define EVT_QUERY_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_QUERY_END_SESSION, wxCloseEventHandler(func)) +#define EVT_DROP_FILES(func) wx__DECLARE_EVT0(wxEVT_DROP_FILES, wxDropFilesEventHandler(func)) +#define EVT_INIT_DIALOG(func) wx__DECLARE_EVT0(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(func)) +#define EVT_SYS_COLOUR_CHANGED(func) wx__DECLARE_EVT0(wxEVT_SYS_COLOUR_CHANGED, wxSysColourChangedEventHandler(func)) +#define EVT_DISPLAY_CHANGED(func) wx__DECLARE_EVT0(wxEVT_DISPLAY_CHANGED, wxDisplayChangedEventHandler(func)) +#define EVT_SHOW(func) wx__DECLARE_EVT0(wxEVT_SHOW, wxShowEventHandler(func)) +#define EVT_MAXIMIZE(func) wx__DECLARE_EVT0(wxEVT_MAXIMIZE, wxMaximizeEventHandler(func)) +#define EVT_ICONIZE(func) wx__DECLARE_EVT0(wxEVT_ICONIZE, wxIconizeEventHandler(func)) +#define EVT_NAVIGATION_KEY(func) wx__DECLARE_EVT0(wxEVT_NAVIGATION_KEY, wxNavigationKeyEventHandler(func)) +#define EVT_PALETTE_CHANGED(func) wx__DECLARE_EVT0(wxEVT_PALETTE_CHANGED, wxPaletteChangedEventHandler(func)) +#define EVT_QUERY_NEW_PALETTE(func) wx__DECLARE_EVT0(wxEVT_QUERY_NEW_PALETTE, wxQueryNewPaletteEventHandler(func)) +#define EVT_WINDOW_CREATE(func) wx__DECLARE_EVT0(wxEVT_CREATE, wxWindowCreateEventHandler(func)) +#define EVT_WINDOW_DESTROY(func) wx__DECLARE_EVT0(wxEVT_DESTROY, wxWindowDestroyEventHandler(func)) +#define EVT_SET_CURSOR(func) wx__DECLARE_EVT0(wxEVT_SET_CURSOR, wxSetCursorEventHandler(func)) +#define EVT_MOUSE_CAPTURE_CHANGED(func) wx__DECLARE_EVT0(wxEVT_MOUSE_CAPTURE_CHANGED, wxMouseCaptureChangedEventHandler(func)) +#define EVT_MOUSE_CAPTURE_LOST(func) wx__DECLARE_EVT0(wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEventHandler(func)) + +// Mouse events +#define EVT_LEFT_DOWN(func) wx__DECLARE_EVT0(wxEVT_LEFT_DOWN, wxMouseEventHandler(func)) +#define EVT_LEFT_UP(func) wx__DECLARE_EVT0(wxEVT_LEFT_UP, wxMouseEventHandler(func)) +#define EVT_MIDDLE_DOWN(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(func)) +#define EVT_MIDDLE_UP(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_UP, wxMouseEventHandler(func)) +#define EVT_RIGHT_DOWN(func) wx__DECLARE_EVT0(wxEVT_RIGHT_DOWN, wxMouseEventHandler(func)) +#define EVT_RIGHT_UP(func) wx__DECLARE_EVT0(wxEVT_RIGHT_UP, wxMouseEventHandler(func)) +#define EVT_MOTION(func) wx__DECLARE_EVT0(wxEVT_MOTION, wxMouseEventHandler(func)) +#define EVT_LEFT_DCLICK(func) wx__DECLARE_EVT0(wxEVT_LEFT_DCLICK, wxMouseEventHandler(func)) +#define EVT_MIDDLE_DCLICK(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(func)) +#define EVT_RIGHT_DCLICK(func) wx__DECLARE_EVT0(wxEVT_RIGHT_DCLICK, wxMouseEventHandler(func)) +#define EVT_LEAVE_WINDOW(func) wx__DECLARE_EVT0(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(func)) +#define EVT_ENTER_WINDOW(func) wx__DECLARE_EVT0(wxEVT_ENTER_WINDOW, wxMouseEventHandler(func)) +#define EVT_MOUSEWHEEL(func) wx__DECLARE_EVT0(wxEVT_MOUSEWHEEL, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX1_DOWN(func) wx__DECLARE_EVT0(wxEVT_AUX1_DOWN, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX1_UP(func) wx__DECLARE_EVT0(wxEVT_AUX1_UP, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX1_DCLICK(func) wx__DECLARE_EVT0(wxEVT_AUX1_DCLICK, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX2_DOWN(func) wx__DECLARE_EVT0(wxEVT_AUX2_DOWN, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX2_UP(func) wx__DECLARE_EVT0(wxEVT_AUX2_UP, wxMouseEventHandler(func)) +#define EVT_MOUSE_AUX2_DCLICK(func) wx__DECLARE_EVT0(wxEVT_AUX2_DCLICK, wxMouseEventHandler(func)) + +// All mouse events +#define EVT_MOUSE_EVENTS(func) \ + EVT_LEFT_DOWN(func) \ + EVT_LEFT_UP(func) \ + EVT_LEFT_DCLICK(func) \ + EVT_MIDDLE_DOWN(func) \ + EVT_MIDDLE_UP(func) \ + EVT_MIDDLE_DCLICK(func) \ + EVT_RIGHT_DOWN(func) \ + EVT_RIGHT_UP(func) \ + EVT_RIGHT_DCLICK(func) \ + EVT_MOUSE_AUX1_DOWN(func) \ + EVT_MOUSE_AUX1_UP(func) \ + EVT_MOUSE_AUX1_DCLICK(func) \ + EVT_MOUSE_AUX2_DOWN(func) \ + EVT_MOUSE_AUX2_UP(func) \ + EVT_MOUSE_AUX2_DCLICK(func) \ + EVT_MOTION(func) \ + EVT_LEAVE_WINDOW(func) \ + EVT_ENTER_WINDOW(func) \ + EVT_MOUSEWHEEL(func) + +// Scrolling from wxWindow (sent to wxScrolledWindow) +#define EVT_SCROLLWIN_TOP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_TOP, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_BOTTOM(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_BOTTOM, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_LINEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_LINEUP, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_LINEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_LINEDOWN, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_PAGEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_PAGEUP, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_PAGEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_PAGEDOWN, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_THUMBTRACK(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_THUMBTRACK, wxScrollWinEventHandler(func)) +#define EVT_SCROLLWIN_THUMBRELEASE(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_THUMBRELEASE, wxScrollWinEventHandler(func)) + +#define EVT_SCROLLWIN(func) \ + EVT_SCROLLWIN_TOP(func) \ + EVT_SCROLLWIN_BOTTOM(func) \ + EVT_SCROLLWIN_LINEUP(func) \ + EVT_SCROLLWIN_LINEDOWN(func) \ + EVT_SCROLLWIN_PAGEUP(func) \ + EVT_SCROLLWIN_PAGEDOWN(func) \ + EVT_SCROLLWIN_THUMBTRACK(func) \ + EVT_SCROLLWIN_THUMBRELEASE(func) + +// Scrolling from wxSlider and wxScrollBar +#define EVT_SCROLL_TOP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_TOP, wxScrollEventHandler(func)) +#define EVT_SCROLL_BOTTOM(func) wx__DECLARE_EVT0(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(func)) +#define EVT_SCROLL_LINEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(func)) +#define EVT_SCROLL_LINEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(func)) +#define EVT_SCROLL_PAGEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(func)) +#define EVT_SCROLL_PAGEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(func)) +#define EVT_SCROLL_THUMBTRACK(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(func)) +#define EVT_SCROLL_THUMBRELEASE(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(func)) +#define EVT_SCROLL_CHANGED(func) wx__DECLARE_EVT0(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(func)) + +#define EVT_SCROLL(func) \ + EVT_SCROLL_TOP(func) \ + EVT_SCROLL_BOTTOM(func) \ + EVT_SCROLL_LINEUP(func) \ + EVT_SCROLL_LINEDOWN(func) \ + EVT_SCROLL_PAGEUP(func) \ + EVT_SCROLL_PAGEDOWN(func) \ + EVT_SCROLL_THUMBTRACK(func) \ + EVT_SCROLL_THUMBRELEASE(func) \ + EVT_SCROLL_CHANGED(func) + +// Scrolling from wxSlider and wxScrollBar, with an id +#define EVT_COMMAND_SCROLL_TOP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_TOP, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_BOTTOM(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_BOTTOM, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_LINEUP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_LINEUP, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_LINEDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_LINEDOWN, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_PAGEUP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_PAGEUP, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_PAGEDOWN, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBTRACK, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBRELEASE, winid, wxScrollEventHandler(func)) +#define EVT_COMMAND_SCROLL_CHANGED(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_CHANGED, winid, wxScrollEventHandler(func)) + +#define EVT_COMMAND_SCROLL(winid, func) \ + EVT_COMMAND_SCROLL_TOP(winid, func) \ + EVT_COMMAND_SCROLL_BOTTOM(winid, func) \ + EVT_COMMAND_SCROLL_LINEUP(winid, func) \ + EVT_COMMAND_SCROLL_LINEDOWN(winid, func) \ + EVT_COMMAND_SCROLL_PAGEUP(winid, func) \ + EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) \ + EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) \ + EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) \ + EVT_COMMAND_SCROLL_CHANGED(winid, func) + +#if WXWIN_COMPATIBILITY_2_6 + // compatibility macros for the old name, deprecated in 2.8 + #define wxEVT_SCROLL_ENDSCROLL wxEVT_SCROLL_CHANGED + #define EVT_COMMAND_SCROLL_ENDSCROLL EVT_COMMAND_SCROLL_CHANGED + #define EVT_SCROLL_ENDSCROLL EVT_SCROLL_CHANGED +#endif // WXWIN_COMPATIBILITY_2_6 + +// Convenience macros for commonly-used commands +#define EVT_CHECKBOX(winid, func) wx__DECLARE_EVT1(wxEVT_CHECKBOX, winid, wxCommandEventHandler(func)) +#define EVT_CHOICE(winid, func) wx__DECLARE_EVT1(wxEVT_CHOICE, winid, wxCommandEventHandler(func)) +#define EVT_LISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_LISTBOX, winid, wxCommandEventHandler(func)) +#define EVT_LISTBOX_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_LISTBOX_DCLICK, winid, wxCommandEventHandler(func)) +#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_MENU, winid, wxCommandEventHandler(func)) +#define EVT_MENU_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_MENU, id1, id2, wxCommandEventHandler(func)) +#if defined(__SMARTPHONE__) +# define EVT_BUTTON(winid, func) EVT_MENU(winid, func) +#else +# define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_BUTTON, winid, wxCommandEventHandler(func)) +#endif +#define EVT_SLIDER(winid, func) wx__DECLARE_EVT1(wxEVT_SLIDER, winid, wxCommandEventHandler(func)) +#define EVT_RADIOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_RADIOBOX, winid, wxCommandEventHandler(func)) +#define EVT_RADIOBUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_RADIOBUTTON, winid, wxCommandEventHandler(func)) +// EVT_SCROLLBAR is now obsolete since we use EVT_COMMAND_SCROLL... events +#define EVT_SCROLLBAR(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLLBAR, winid, wxCommandEventHandler(func)) +#define EVT_VLBOX(winid, func) wx__DECLARE_EVT1(wxEVT_VLBOX, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX, winid, wxCommandEventHandler(func)) +#define EVT_TOOL(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_DROPDOWN, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_TOOL, id1, id2, wxCommandEventHandler(func)) +#define EVT_TOOL_RCLICKED(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_RCLICKED, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_RCLICKED_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_TOOL_RCLICKED, id1, id2, wxCommandEventHandler(func)) +#define EVT_TOOL_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_ENTER, winid, wxCommandEventHandler(func)) +#define EVT_CHECKLISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_CHECKLISTBOX, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX_DROPDOWN, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX_CLOSEUP(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX_CLOSEUP, winid, wxCommandEventHandler(func)) + +// Generic command events +#define EVT_COMMAND_LEFT_CLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LEFT_CLICK, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_LEFT_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LEFT_DCLICK, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_RIGHT_CLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RIGHT_CLICK, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_RIGHT_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RIGHT_DCLICK, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_SET_FOCUS(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SET_FOCUS, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_KILL_FOCUS(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_KILL_FOCUS, winid, wxCommandEventHandler(func)) +#define EVT_COMMAND_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_ENTER, winid, wxCommandEventHandler(func)) + +// Joystick events + +#define EVT_JOY_BUTTON_DOWN(func) wx__DECLARE_EVT0(wxEVT_JOY_BUTTON_DOWN, wxJoystickEventHandler(func)) +#define EVT_JOY_BUTTON_UP(func) wx__DECLARE_EVT0(wxEVT_JOY_BUTTON_UP, wxJoystickEventHandler(func)) +#define EVT_JOY_MOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_MOVE, wxJoystickEventHandler(func)) +#define EVT_JOY_ZMOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_ZMOVE, wxJoystickEventHandler(func)) + +// All joystick events +#define EVT_JOYSTICK_EVENTS(func) \ + EVT_JOY_BUTTON_DOWN(func) \ + EVT_JOY_BUTTON_UP(func) \ + EVT_JOY_MOVE(func) \ + EVT_JOY_ZMOVE(func) + +// Idle event +#define EVT_IDLE(func) wx__DECLARE_EVT0(wxEVT_IDLE, wxIdleEventHandler(func)) + +// Update UI event +#define EVT_UPDATE_UI(winid, func) wx__DECLARE_EVT1(wxEVT_UPDATE_UI, winid, wxUpdateUIEventHandler(func)) +#define EVT_UPDATE_UI_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_UPDATE_UI, id1, id2, wxUpdateUIEventHandler(func)) + +// Help events +#define EVT_HELP(winid, func) wx__DECLARE_EVT1(wxEVT_HELP, winid, wxHelpEventHandler(func)) +#define EVT_HELP_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_HELP, id1, id2, wxHelpEventHandler(func)) +#define EVT_DETAILED_HELP(winid, func) wx__DECLARE_EVT1(wxEVT_DETAILED_HELP, winid, wxHelpEventHandler(func)) +#define EVT_DETAILED_HELP_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_DETAILED_HELP, id1, id2, wxHelpEventHandler(func)) + +// Context Menu Events +#define EVT_CONTEXT_MENU(func) wx__DECLARE_EVT0(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(func)) +#define EVT_COMMAND_CONTEXT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_CONTEXT_MENU, winid, wxContextMenuEventHandler(func)) + +// Clipboard text Events +#define EVT_TEXT_CUT(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_CUT, winid, wxClipboardTextEventHandler(func)) +#define EVT_TEXT_COPY(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_COPY, winid, wxClipboardTextEventHandler(func)) +#define EVT_TEXT_PASTE(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_PASTE, winid, wxClipboardTextEventHandler(func)) + +// Thread events +#define EVT_THREAD(id, func) wx__DECLARE_EVT1(wxEVT_THREAD, id, wxThreadEventHandler(func)) + +// ---------------------------------------------------------------------------- +// Helper functions +// ---------------------------------------------------------------------------- + +// This is an ugly hack to allow the use of Bind() instead of Connect() inside +// the library code if the library was built with support for it, here is how +// it is used: +// +// class SomeEventHandlingClass : wxBIND_OR_CONNECT_HACK_BASE_CLASS +// public SomeBaseClass +// { +// public: +// SomeEventHandlingClass(wxWindow *win) +// { +// // connect to the event for the given window +// wxBIND_OR_CONNECT_HACK(win, wxEVT_SOMETHING, wxSomeEventHandler, +// SomeEventHandlingClass::OnSomeEvent, this); +// } +// +// private: +// void OnSomeEvent(wxSomeEvent&) { ... } +// }; +// +// This is *not* meant to be used by library users, it is only defined here +// (and not in a private header) because the base class must be visible from +// other public headers, please do NOT use this in your code, it will be +// removed from future wx versions without warning. +#ifdef wxHAS_EVENT_BIND + #define wxBIND_OR_CONNECT_HACK_BASE_CLASS + #define wxBIND_OR_CONNECT_HACK_ONLY_BASE_CLASS + #define wxBIND_OR_CONNECT_HACK(win, evt, handler, func, obj) \ + win->Bind(evt, &func, obj) +#else // wxHAS_EVENT_BIND + #define wxBIND_OR_CONNECT_HACK_BASE_CLASS public wxEvtHandler, + #define wxBIND_OR_CONNECT_HACK_ONLY_BASE_CLASS : public wxEvtHandler + #define wxBIND_OR_CONNECT_HACK(win, evt, handler, func, obj) \ + win->Connect(evt, handler(func), NULL, obj) +#endif // wxHAS_EVENT_BIND + +#if wxUSE_GUI + +// Find a window with the focus, that is also a descendant of the given window. +// This is used to determine the window to initially send commands to. +WXDLLIMPEXP_CORE wxWindow* wxFindFocusDescendant(wxWindow* ancestor); + +#endif // wxUSE_GUI + + +// ---------------------------------------------------------------------------- +// Compatibility macro aliases +// ---------------------------------------------------------------------------- + +// deprecated variants _not_ requiring a semicolon after them and without wx prefix +// (note that also some wx-prefixed macro do _not_ require a semicolon because +// it's not always possible to force the compire to require it) + +#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \ + wxDECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) +#define DECLARE_EVENT_TABLE_TERMINATOR() wxDECLARE_EVENT_TABLE_TERMINATOR() +#define DECLARE_EVENT_TABLE() wxDECLARE_EVENT_TABLE(); +#define BEGIN_EVENT_TABLE(a,b) wxBEGIN_EVENT_TABLE(a,b) +#define BEGIN_EVENT_TABLE_TEMPLATE1(a,b,c) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c) +#define BEGIN_EVENT_TABLE_TEMPLATE2(a,b,c,d) wxBEGIN_EVENT_TABLE_TEMPLATE2(a,b,c,d) +#define BEGIN_EVENT_TABLE_TEMPLATE3(a,b,c,d,e) wxBEGIN_EVENT_TABLE_TEMPLATE3(a,b,c,d,e) +#define BEGIN_EVENT_TABLE_TEMPLATE4(a,b,c,d,e,f) wxBEGIN_EVENT_TABLE_TEMPLATE4(a,b,c,d,e,f) +#define BEGIN_EVENT_TABLE_TEMPLATE5(a,b,c,d,e,f,g) wxBEGIN_EVENT_TABLE_TEMPLATE5(a,b,c,d,e,f,g) +#define BEGIN_EVENT_TABLE_TEMPLATE6(a,b,c,d,e,f,g,h) wxBEGIN_EVENT_TABLE_TEMPLATE6(a,b,c,d,e,f,g,h) +#define END_EVENT_TABLE() wxEND_EVENT_TABLE() + +// other obsolete event declaration/definition macros; we don't need them any longer +// but we keep them for compatibility as it doesn't cost us anything anyhow +#define BEGIN_DECLARE_EVENT_TYPES() +#define END_DECLARE_EVENT_TYPES() +#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \ + extern expdecl const wxEventType name; +#define DECLARE_EVENT_TYPE(name, value) \ + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, name, value) +#define DECLARE_LOCAL_EVENT_TYPE(name, value) \ + DECLARE_EXPORTED_EVENT_TYPE(wxEMPTY_PARAMETER_VALUE, name, value) +#define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType(); +#define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name) + +// alias for backward compatibility with 2.9.0: +#define wxEVT_COMMAND_THREAD wxEVT_THREAD +// other old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_BUTTON_CLICKED wxEVT_BUTTON +#define wxEVT_COMMAND_CHECKBOX_CLICKED wxEVT_CHECKBOX +#define wxEVT_COMMAND_CHOICE_SELECTED wxEVT_CHOICE +#define wxEVT_COMMAND_LISTBOX_SELECTED wxEVT_LISTBOX +#define wxEVT_COMMAND_LISTBOX_DOUBLECLICKED wxEVT_LISTBOX_DCLICK +#define wxEVT_COMMAND_CHECKLISTBOX_TOGGLED wxEVT_CHECKLISTBOX +#define wxEVT_COMMAND_MENU_SELECTED wxEVT_MENU +#define wxEVT_COMMAND_TOOL_CLICKED wxEVT_TOOL +#define wxEVT_COMMAND_SLIDER_UPDATED wxEVT_SLIDER +#define wxEVT_COMMAND_RADIOBOX_SELECTED wxEVT_RADIOBOX +#define wxEVT_COMMAND_RADIOBUTTON_SELECTED wxEVT_RADIOBUTTON +#define wxEVT_COMMAND_SCROLLBAR_UPDATED wxEVT_SCROLLBAR +#define wxEVT_COMMAND_VLBOX_SELECTED wxEVT_VLBOX +#define wxEVT_COMMAND_COMBOBOX_SELECTED wxEVT_COMBOBOX +#define wxEVT_COMMAND_TOOL_RCLICKED wxEVT_TOOL_RCLICKED +#define wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED wxEVT_TOOL_DROPDOWN +#define wxEVT_COMMAND_TOOL_ENTER wxEVT_TOOL_ENTER +#define wxEVT_COMMAND_COMBOBOX_DROPDOWN wxEVT_COMBOBOX_DROPDOWN +#define wxEVT_COMMAND_COMBOBOX_CLOSEUP wxEVT_COMBOBOX_CLOSEUP +#define wxEVT_COMMAND_TEXT_COPY wxEVT_TEXT_COPY +#define wxEVT_COMMAND_TEXT_CUT wxEVT_TEXT_CUT +#define wxEVT_COMMAND_TEXT_PASTE wxEVT_TEXT_PASTE +#define wxEVT_COMMAND_TEXT_UPDATED wxEVT_TEXT + +#if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 9 +#if !defined NO_WX3_GCC49_VIRTUAL_HACK && !defined WXBUILDING +// Ugly work-around for GCC 4.9 bug: https://bugs.debian.org/752733 +#define WX3_GCC49_VIRTUAL_HACK(C) wxEvent* (C::*debian_wx3_gcc49_pr61214_##C##_hack)() const __attribute__((unused)) = &C::Clone + +namespace { + +WX3_GCC49_VIRTUAL_HACK(wxIdleEvent); +WX3_GCC49_VIRTUAL_HACK(wxThreadEvent); + +#if wxUSE_GUI +WX3_GCC49_VIRTUAL_HACK(wxActivateEvent); +WX3_GCC49_VIRTUAL_HACK(wxChildFocusEvent); +WX3_GCC49_VIRTUAL_HACK(wxClipboardTextEvent); +WX3_GCC49_VIRTUAL_HACK(wxCloseEvent); +WX3_GCC49_VIRTUAL_HACK(wxCommandEvent); +WX3_GCC49_VIRTUAL_HACK(wxContextMenuEvent); +WX3_GCC49_VIRTUAL_HACK(wxDisplayChangedEvent); +WX3_GCC49_VIRTUAL_HACK(wxDropFilesEvent); +WX3_GCC49_VIRTUAL_HACK(wxEraseEvent); +WX3_GCC49_VIRTUAL_HACK(wxFocusEvent); +WX3_GCC49_VIRTUAL_HACK(wxHelpEvent); +WX3_GCC49_VIRTUAL_HACK(wxIconizeEvent); +WX3_GCC49_VIRTUAL_HACK(wxInitDialogEvent); +WX3_GCC49_VIRTUAL_HACK(wxJoystickEvent); +WX3_GCC49_VIRTUAL_HACK(wxKeyEvent); +WX3_GCC49_VIRTUAL_HACK(wxMaximizeEvent); +WX3_GCC49_VIRTUAL_HACK(wxMenuEvent); +WX3_GCC49_VIRTUAL_HACK(wxMouseCaptureChangedEvent); +WX3_GCC49_VIRTUAL_HACK(wxMouseCaptureLostEvent); +WX3_GCC49_VIRTUAL_HACK(wxMouseEvent); +WX3_GCC49_VIRTUAL_HACK(wxMoveEvent); +WX3_GCC49_VIRTUAL_HACK(wxNavigationKeyEvent); +WX3_GCC49_VIRTUAL_HACK(wxNcPaintEvent); +WX3_GCC49_VIRTUAL_HACK(wxNotifyEvent); +WX3_GCC49_VIRTUAL_HACK(wxPaintEvent); +WX3_GCC49_VIRTUAL_HACK(wxPaletteChangedEvent); +WX3_GCC49_VIRTUAL_HACK(wxQueryNewPaletteEvent); +WX3_GCC49_VIRTUAL_HACK(wxScrollEvent); +WX3_GCC49_VIRTUAL_HACK(wxScrollWinEvent); +WX3_GCC49_VIRTUAL_HACK(wxSetCursorEvent); +WX3_GCC49_VIRTUAL_HACK(wxShowEvent); +WX3_GCC49_VIRTUAL_HACK(wxSizeEvent); +WX3_GCC49_VIRTUAL_HACK(wxSysColourChangedEvent); +WX3_GCC49_VIRTUAL_HACK(wxUpdateUIEvent); +WX3_GCC49_VIRTUAL_HACK(wxWindowCreateEvent); +WX3_GCC49_VIRTUAL_HACK(wxWindowDestroyEvent); +#endif + +} +#endif +#endif + +#endif // _WX_EVENT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/eventfilter.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/eventfilter.h new file mode 100644 index 0000000000..30eac4d363 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/eventfilter.h @@ -0,0 +1,71 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/eventfilter.h +// Purpose: wxEventFilter class declaration. +// Author: Vadim Zeitlin +// Created: 2011-11-21 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_EVENTFILTER_H_ +#define _WX_EVENTFILTER_H_ + +#include "wx/defs.h" + +class WXDLLIMPEXP_FWD_BASE wxEvent; +class WXDLLIMPEXP_FWD_BASE wxEvtHandler; + +// ---------------------------------------------------------------------------- +// wxEventFilter is used with wxEvtHandler::AddFilter() and ProcessEvent(). +// ---------------------------------------------------------------------------- + +class wxEventFilter +{ +public: + // Possible return values for FilterEvent(). + // + // Notice that the values of these enum elements are fixed due to backwards + // compatibility constraints. + enum + { + // Process event as usual. + Event_Skip = -1, + + // Don't process the event normally at all. + Event_Ignore = 0, + + // Event was already handled, don't process it normally. + Event_Processed = 1 + }; + + wxEventFilter() + { + m_next = NULL; + } + + virtual ~wxEventFilter() + { + wxASSERT_MSG( !m_next, "Forgot to call wxEvtHandler::RemoveFilter()?" ); + } + + // This method allows to filter all the events processed by the program, so + // you should try to return quickly from it to avoid slowing down the + // program to a crawl. + // + // Return value should be -1 to continue with the normal event processing, + // or true or false to stop further processing and pretend that the event + // had been already processed or won't be processed at all, respectively. + virtual int FilterEvent(wxEvent& event) = 0; + +private: + // Objects of this class are made to be stored in a linked list in + // wxEvtHandler so put the next node ponter directly in the class itself. + wxEventFilter* m_next; + + // And provide access to it for wxEvtHandler [only]. + friend class wxEvtHandler; + + wxDECLARE_NO_COPY_CLASS(wxEventFilter); +}; + +#endif // _WX_EVENTFILTER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/evtloop.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/evtloop.h new file mode 100644 index 0000000000..1133473a02 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/evtloop.h @@ -0,0 +1,435 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/evtloop.h +// Purpose: declares wxEventLoop class +// Author: Vadim Zeitlin +// Modified by: +// Created: 01.06.01 +// Copyright: (c) 2001 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_EVTLOOP_H_ +#define _WX_EVTLOOP_H_ + +#include "wx/event.h" +#include "wx/utils.h" + +// TODO: implement wxEventLoopSource for MSW (it should wrap a HANDLE and be +// monitored using MsgWaitForMultipleObjects()) +#if defined(__WXOSX__) || (defined(__UNIX__) && !defined(__WINDOWS__)) + #define wxUSE_EVENTLOOP_SOURCE 1 +#else + #define wxUSE_EVENTLOOP_SOURCE 0 +#endif + +#if wxUSE_EVENTLOOP_SOURCE + class wxEventLoopSource; + class wxEventLoopSourceHandler; +#endif + +/* + NOTE ABOUT wxEventLoopBase::YieldFor LOGIC + ------------------------------------------ + + The YieldFor() function helps to avoid re-entrancy problems and problems + caused by out-of-order event processing + (see "wxYield-like problems" and "wxProgressDialog+threading BUG" wx-dev threads). + + The logic behind YieldFor() is simple: it analyzes the queue of the native + events generated by the underlying GUI toolkit and picks out and processes + only those matching the given mask. + + It's important to note that YieldFor() is used to selectively process the + events generated by the NATIVE toolkit. + Events syntethized by wxWidgets code or by user code are instead selectively + processed thanks to the logic built into wxEvtHandler::ProcessPendingEvents(). + In fact, when wxEvtHandler::ProcessPendingEvents gets called from inside a + YieldFor() call, wxEventLoopBase::IsEventAllowedInsideYield is used to decide + if the pending events for that event handler can be processed. + If all the pending events associated with that event handler result as "not processable", + the event handler "delays" itself calling wxEventLoopBase::DelayPendingEventHandler + (so it's moved: m_handlersWithPendingEvents => m_handlersWithPendingDelayedEvents). + Last, wxEventLoopBase::ProcessPendingEvents() before exiting moves the delayed + event handlers back into the list of handlers with pending events + (m_handlersWithPendingDelayedEvents => m_handlersWithPendingEvents) so that + a later call to ProcessPendingEvents() (possibly outside the YieldFor() call) + will process all pending events as usual. +*/ + +// ---------------------------------------------------------------------------- +// wxEventLoopBase: interface for wxEventLoop +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxEventLoopBase +{ +public: + // trivial, but needed (because of wxEventLoopBase) ctor + wxEventLoopBase(); + + // dtor + virtual ~wxEventLoopBase() { } + + // use this to check whether the event loop was successfully created before + // using it + virtual bool IsOk() const { return true; } + + // returns true if this is the main loop + bool IsMain() const; + +#if wxUSE_EVENTLOOP_SOURCE + // create a new event loop source wrapping the given file descriptor and + // monitor it for events occurring on this descriptor in all event loops + static wxEventLoopSource * + AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags); +#endif // wxUSE_EVENTLOOP_SOURCE + + // dispatch&processing + // ------------------- + + // start the event loop, return the exit code when it is finished + // + // notice that wx ports should override DoRun(), this method is virtual + // only to allow overriding it in the user code for custom event loops + virtual int Run(); + + // is this event loop running now? + // + // notice that even if this event loop hasn't terminated yet but has just + // spawned a nested (e.g. modal) event loop, this would return false + bool IsRunning() const; + + // exit from the loop with the given exit code + // + // this can be only used to exit the currently running loop, use + // ScheduleExit() if this might not be the case + virtual void Exit(int rc = 0); + + // ask the event loop to exit with the given exit code, can be used even if + // this loop is not running right now but the loop must have been started, + // i.e. Run() should have been already called + virtual void ScheduleExit(int rc = 0) = 0; + + // return true if any events are available + virtual bool Pending() const = 0; + + // dispatch a single event, return false if we should exit from the loop + virtual bool Dispatch() = 0; + + // same as Dispatch() but doesn't wait for longer than the specified (in + // ms) timeout, return true if an event was processed, false if we should + // exit the loop or -1 if timeout expired + virtual int DispatchTimeout(unsigned long timeout) = 0; + + // implement this to wake up the loop: usually done by posting a dummy event + // to it (can be called from non main thread) + virtual void WakeUp() = 0; + + + // idle handling + // ------------- + + // make sure that idle events are sent again + virtual void WakeUpIdle(); + + // this virtual function is called when the application + // becomes idle and by default it forwards to wxApp::ProcessIdle() and + // while it can be overridden in a custom event loop, you must call the + // base class version to ensure that idle events are still generated + // + // it should return true if more idle events are needed, false if not + virtual bool ProcessIdle(); + + + // Yield-related hooks + // ------------------- + + // process all currently pending events right now + // + // it is an error to call Yield() recursively unless the value of + // onlyIfNeeded is true + // + // WARNING: this function is dangerous as it can lead to unexpected + // reentrancies (i.e. when called from an event handler it + // may result in calling the same event handler again), use + // with _extreme_ care or, better, don't use at all! + bool Yield(bool onlyIfNeeded = false); + virtual bool YieldFor(long eventsToProcess) = 0; + + // returns true if the main thread is inside a Yield() call + virtual bool IsYielding() const + { return m_isInsideYield; } + + // returns true if events of the given event category should be immediately + // processed inside a wxApp::Yield() call or rather should be queued for + // later processing by the main event loop + virtual bool IsEventAllowedInsideYield(wxEventCategory cat) const + { return (m_eventsToProcessInsideYield & cat) != 0; } + + // no SafeYield hooks since it uses wxWindow which is not available when wxUSE_GUI=0 + + + // active loop + // ----------- + + // return currently active (running) event loop, may be NULL + static wxEventLoopBase *GetActive() { return ms_activeLoop; } + + // set currently active (running) event loop + static void SetActive(wxEventLoopBase* loop); + + +protected: + // real implementation of Run() + virtual int DoRun() = 0; + + // this function should be called before the event loop terminates, whether + // this happens normally (because of Exit() call) or abnormally (because of + // an exception thrown from inside the loop) + virtual void OnExit(); + + // Return true if we're currently inside our Run(), even if another nested + // event loop is currently running, unlike IsRunning() (which should have + // been really called IsActive() but it's too late to change this now). + bool IsInsideRun() const { return m_isInsideRun; } + + + // the pointer to currently active loop + static wxEventLoopBase *ms_activeLoop; + + // should we exit the loop? + bool m_shouldExit; + + // YieldFor() helpers: + bool m_isInsideYield; + long m_eventsToProcessInsideYield; + +private: + // this flag is set on entry into Run() and reset before leaving it + bool m_isInsideRun; + + wxDECLARE_NO_COPY_CLASS(wxEventLoopBase); +}; + +#if defined(__WINDOWS__) || defined(__WXMAC__) || defined(__WXDFB__) || (defined(__UNIX__) && !defined(__WXOSX__)) + +// this class can be used to implement a standard event loop logic using +// Pending() and Dispatch() +// +// it also handles idle processing automatically +class WXDLLIMPEXP_BASE wxEventLoopManual : public wxEventLoopBase +{ +public: + wxEventLoopManual(); + + // sets the "should exit" flag and wakes up the loop so that it terminates + // soon + virtual void ScheduleExit(int rc = 0); + +protected: + // enters a loop calling OnNextIteration(), Pending() and Dispatch() and + // terminating when Exit() is called + virtual int DoRun(); + + // may be overridden to perform some action at the start of each new event + // loop iteration + virtual void OnNextIteration() { } + + + // the loop exit code + int m_exitcode; + +private: + // process all already pending events and dispatch a new one (blocking + // until it appears in the event queue if necessary) + // + // returns the return value of Dispatch() + bool ProcessEvents(); + + wxDECLARE_NO_COPY_CLASS(wxEventLoopManual); +}; + +#endif // platforms using "manual" loop + +// we're moving away from old m_impl wxEventLoop model as otherwise the user +// code doesn't have access to platform-specific wxEventLoop methods and this +// can sometimes be very useful (e.g. under MSW this is necessary for +// integration with MFC) but currently this is not done for all ports yet (e.g. +// wxX11) so fall back to the old wxGUIEventLoop definition below for them + +#if defined(__DARWIN__) + // CoreFoundation-based event loop is currently in wxBase so include it in + // any case too (although maybe it actually shouldn't be there at all) + #include "wx/osx/core/evtloop.h" +#endif + +// include the header defining wxConsoleEventLoop +#if defined(__UNIX__) && !defined(__WINDOWS__) + #include "wx/unix/evtloop.h" +#elif defined(__WINDOWS__) + #include "wx/msw/evtloopconsole.h" +#endif + +#if wxUSE_GUI + +// include the appropriate header defining wxGUIEventLoop + +#if defined(__WXMSW__) + #include "wx/msw/evtloop.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/evtloop.h" +#elif defined(__WXOSX__) + #include "wx/osx/evtloop.h" +#elif defined(__WXDFB__) + #include "wx/dfb/evtloop.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/evtloop.h" +#else // other platform + +#include "wx/stopwatch.h" // for wxMilliClock_t + +class WXDLLIMPEXP_FWD_CORE wxEventLoopImpl; + +class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopBase +{ +public: + wxGUIEventLoop() { m_impl = NULL; } + virtual ~wxGUIEventLoop(); + + virtual void ScheduleExit(int rc = 0); + virtual bool Pending() const; + virtual bool Dispatch(); + virtual int DispatchTimeout(unsigned long timeout) + { + // TODO: this is, of course, horribly inefficient and a proper wait with + // timeout should be implemented for all ports natively... + const wxMilliClock_t timeEnd = wxGetLocalTimeMillis() + timeout; + for ( ;; ) + { + if ( Pending() ) + return Dispatch(); + + if ( wxGetLocalTimeMillis() >= timeEnd ) + return -1; + } + } + virtual void WakeUp() { } + virtual bool YieldFor(long eventsToProcess); + +protected: + virtual int DoRun(); + + // the pointer to the port specific implementation class + wxEventLoopImpl *m_impl; + + wxDECLARE_NO_COPY_CLASS(wxGUIEventLoop); +}; + +#endif // platforms + +#endif // wxUSE_GUI + +#if wxUSE_GUI + // we use a class rather than a typedef because wxEventLoop is + // forward-declared in many places + class wxEventLoop : public wxGUIEventLoop { }; +#else // !wxUSE_GUI + // we can't define wxEventLoop differently in GUI and base libraries so use + // a #define to still allow writing wxEventLoop in the user code + #if wxUSE_CONSOLE_EVENTLOOP && (defined(__WINDOWS__) || defined(__UNIX__)) + #define wxEventLoop wxConsoleEventLoop + #else // we still must define it somehow for the code below... + #define wxEventLoop wxEventLoopBase + #endif +#endif + +inline bool wxEventLoopBase::IsRunning() const { return GetActive() == this; } + +#if wxUSE_GUI && !defined(__WXOSX__) +// ---------------------------------------------------------------------------- +// wxModalEventLoop +// ---------------------------------------------------------------------------- + +// this is a naive generic implementation which uses wxWindowDisabler to +// implement modality, we will surely need platform-specific implementations +// too, this generic implementation is here only temporarily to see how it +// works +class WXDLLIMPEXP_CORE wxModalEventLoop : public wxGUIEventLoop +{ +public: + wxModalEventLoop(wxWindow *winModal) + { + m_windowDisabler = new wxWindowDisabler(winModal); + } + +protected: + virtual void OnExit() + { + delete m_windowDisabler; + m_windowDisabler = NULL; + + wxGUIEventLoop::OnExit(); + } + +private: + wxWindowDisabler *m_windowDisabler; +}; + +#endif //wxUSE_GUI + +// ---------------------------------------------------------------------------- +// wxEventLoopActivator: helper class for wxEventLoop implementations +// ---------------------------------------------------------------------------- + +// this object sets the wxEventLoop given to the ctor as the currently active +// one and unsets it in its dtor, this is especially useful in presence of +// exceptions but is more tidy even when we don't use them +class wxEventLoopActivator +{ +public: + wxEventLoopActivator(wxEventLoopBase *evtLoop) + { + m_evtLoopOld = wxEventLoopBase::GetActive(); + wxEventLoopBase::SetActive(evtLoop); + } + + ~wxEventLoopActivator() + { + // restore the previously active event loop + wxEventLoopBase::SetActive(m_evtLoopOld); + } + +private: + wxEventLoopBase *m_evtLoopOld; +}; + +#if wxUSE_GUI || wxUSE_CONSOLE_EVENTLOOP + +class wxEventLoopGuarantor +{ +public: + wxEventLoopGuarantor() + { + m_evtLoopNew = NULL; + if (!wxEventLoop::GetActive()) + { + m_evtLoopNew = new wxEventLoop; + wxEventLoop::SetActive(m_evtLoopNew); + } + } + + ~wxEventLoopGuarantor() + { + if (m_evtLoopNew) + { + wxEventLoop::SetActive(NULL); + delete m_evtLoopNew; + } + } + +private: + wxEventLoop *m_evtLoopNew; +}; + +#endif // wxUSE_GUI || wxUSE_CONSOLE_EVENTLOOP + +#endif // _WX_EVTLOOP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/evtloopsrc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/evtloopsrc.h new file mode 100644 index 0000000000..cb3e5c6a90 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/evtloopsrc.h @@ -0,0 +1,103 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/evtloopsrc.h +// Purpose: declaration of wxEventLoopSource class +// Author: Vadim Zeitlin +// Created: 2009-10-21 +// Copyright: (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_EVTLOOPSRC_H_ +#define _WX_EVTLOOPSRC_H_ + +// Include the header to get wxUSE_EVENTLOOP_SOURCE definition from it. +#include "wx/evtloop.h" + +// ---------------------------------------------------------------------------- +// wxEventLoopSource: a source of events which may be added to wxEventLoop +// ---------------------------------------------------------------------------- + +// TODO: refactor wxSocket under Unix to reuse wxEventLoopSource instead of +// duplicating much of its logic +// +// TODO: freeze the API and document it + +#if wxUSE_EVENTLOOP_SOURCE + +#define wxTRACE_EVT_SOURCE "EventSource" + +// handler used to process events on event loop sources +class wxEventLoopSourceHandler +{ +public: + // called when descriptor is available for non-blocking read + virtual void OnReadWaiting() = 0; + + // called when descriptor is available for non-blocking write + virtual void OnWriteWaiting() = 0; + + // called when there is exception on descriptor + virtual void OnExceptionWaiting() = 0; + + // virtual dtor for the base class + virtual ~wxEventLoopSourceHandler() { } +}; + +// flags describing which kind of IO events we're interested in +enum +{ + wxEVENT_SOURCE_INPUT = 0x01, + wxEVENT_SOURCE_OUTPUT = 0x02, + wxEVENT_SOURCE_EXCEPTION = 0x04, + wxEVENT_SOURCE_ALL = wxEVENT_SOURCE_INPUT | + wxEVENT_SOURCE_OUTPUT | + wxEVENT_SOURCE_EXCEPTION +}; + +// wxEventLoopSource itself is an ABC and can't be created directly, currently +// the only way to create it is by using wxEventLoop::AddSourceForFD(). +class wxEventLoopSource +{ +public: + // dtor is pure virtual because it must be overridden to remove the source + // from the event loop monitoring it + virtual ~wxEventLoopSource() = 0; + + void SetHandler(wxEventLoopSourceHandler* handler) { m_handler = handler; } + wxEventLoopSourceHandler* GetHandler() const { return m_handler; } + + void SetFlags(int flags) { m_flags = flags; } + int GetFlags() const { return m_flags; } + +protected: + // ctor is only used by the derived classes + wxEventLoopSource(wxEventLoopSourceHandler *handler, int flags) + : m_handler(handler), + m_flags(flags) + { + } + + wxEventLoopSourceHandler* m_handler; + int m_flags; + + wxDECLARE_NO_COPY_CLASS(wxEventLoopSource); +}; + +inline wxEventLoopSource::~wxEventLoopSource() { } + +#if defined(__UNIX__) + #include "wx/unix/evtloopsrc.h" +#endif // __UNIX__ + +#if defined(__WXGTK20__) + #include "wx/gtk/evtloopsrc.h" +#endif + +#if defined(__DARWIN__) + #include "wx/osx/evtloopsrc.h" +#endif + +#endif // wxUSE_EVENTLOOP_SOURCE + +#endif // _WX_EVTLOOPSRC_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/except.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/except.h new file mode 100644 index 0000000000..75589163e3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/except.h @@ -0,0 +1,40 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/except.h +// Purpose: C++ exception related stuff +// Author: Vadim Zeitlin +// Modified by: +// Created: 17.09.2003 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_EXCEPT_H_ +#define _WX_EXCEPT_H_ + +#include "wx/defs.h" + +// ---------------------------------------------------------------------------- +// macros working whether wxUSE_EXCEPTIONS is 0 or 1 +// ---------------------------------------------------------------------------- + +// even if the library itself was compiled with exceptions support, the user +// code using it might be compiling with a compiler switch disabling them in +// which cases we shouldn't use try/catch in the headers -- this results in +// compilation errors in e.g. wx/scopeguard.h with at least g++ 4 +#if !wxUSE_EXCEPTIONS || \ + (defined(__GNUG__) && !defined(__EXCEPTIONS)) + #ifndef wxNO_EXCEPTIONS + #define wxNO_EXCEPTIONS + #endif +#endif + +#ifdef wxNO_EXCEPTIONS + #define wxTRY + #define wxCATCH_ALL(code) +#else // do use exceptions + #define wxTRY try + #define wxCATCH_ALL(code) catch ( ... ) { code } +#endif // wxNO_EXCEPTIONS/!wxNO_EXCEPTIONS + +#endif // _WX_EXCEPT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fdrepdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fdrepdlg.h new file mode 100644 index 0000000000..709dcb156b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fdrepdlg.h @@ -0,0 +1,203 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fdrepdlg.h +// Purpose: wxFindReplaceDialog class +// Author: Markus Greither and Vadim Zeitlin +// Modified by: +// Created: 23/03/2001 +// Copyright: (c) Markus Greither +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FINDREPLACEDLG_H_ +#define _WX_FINDREPLACEDLG_H_ + +#include "wx/defs.h" + +#if wxUSE_FINDREPLDLG + +#include "wx/dialog.h" + +class WXDLLIMPEXP_FWD_CORE wxFindDialogEvent; +class WXDLLIMPEXP_FWD_CORE wxFindReplaceDialog; +class WXDLLIMPEXP_FWD_CORE wxFindReplaceData; +class WXDLLIMPEXP_FWD_CORE wxFindReplaceDialogImpl; + +// ---------------------------------------------------------------------------- +// Flags for wxFindReplaceData.Flags +// ---------------------------------------------------------------------------- + +// flages used by wxFindDialogEvent::GetFlags() +enum wxFindReplaceFlags +{ + // downward search/replace selected (otherwise - upwards) + wxFR_DOWN = 1, + + // whole word search/replace selected + wxFR_WHOLEWORD = 2, + + // case sensitive search/replace selected (otherwise - case insensitive) + wxFR_MATCHCASE = 4 +}; + +// these flags can be specified in wxFindReplaceDialog ctor or Create() +enum wxFindReplaceDialogStyles +{ + // replace dialog (otherwise find dialog) + wxFR_REPLACEDIALOG = 1, + + // don't allow changing the search direction + wxFR_NOUPDOWN = 2, + + // don't allow case sensitive searching + wxFR_NOMATCHCASE = 4, + + // don't allow whole word searching + wxFR_NOWHOLEWORD = 8 +}; + +// ---------------------------------------------------------------------------- +// wxFindReplaceData: holds Setup Data/Feedback Data for wxFindReplaceDialog +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFindReplaceData : public wxObject +{ +public: + wxFindReplaceData() { Init(); } + wxFindReplaceData(wxUint32 flags) { Init(); SetFlags(flags); } + + // accessors + const wxString& GetFindString() const { return m_FindWhat; } + const wxString& GetReplaceString() const { return m_ReplaceWith; } + + int GetFlags() const { return m_Flags; } + + // setters: may only be called before showing the dialog, no effect later + void SetFlags(wxUint32 flags) { m_Flags = flags; } + + void SetFindString(const wxString& str) { m_FindWhat = str; } + void SetReplaceString(const wxString& str) { m_ReplaceWith = str; } + +protected: + void Init(); + +private: + wxUint32 m_Flags; + wxString m_FindWhat, + m_ReplaceWith; + + friend class wxFindReplaceDialogBase; +}; + +// ---------------------------------------------------------------------------- +// wxFindReplaceDialogBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFindReplaceDialogBase : public wxDialog +{ +public: + // ctors and such + wxFindReplaceDialogBase() { m_FindReplaceData = NULL; } + wxFindReplaceDialogBase(wxWindow * WXUNUSED(parent), + wxFindReplaceData *data, + const wxString& WXUNUSED(title), + int WXUNUSED(style) = 0) + { + m_FindReplaceData = data; + } + + virtual ~wxFindReplaceDialogBase(); + + // find dialog data access + const wxFindReplaceData *GetData() const { return m_FindReplaceData; } + void SetData(wxFindReplaceData *data) { m_FindReplaceData = data; } + + // implementation only, don't use + void Send(wxFindDialogEvent& event); + +protected: + wxFindReplaceData *m_FindReplaceData; + + // the last string we searched for + wxString m_lastSearch; + + wxDECLARE_NO_COPY_CLASS(wxFindReplaceDialogBase); +}; + +// include wxFindReplaceDialog declaration +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) && !defined(__WXWINCE__) + #include "wx/msw/fdrepdlg.h" +#else + #define wxGenericFindReplaceDialog wxFindReplaceDialog + + #include "wx/generic/fdrepdlg.h" +#endif + +// ---------------------------------------------------------------------------- +// wxFindReplaceDialog events +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFindDialogEvent : public wxCommandEvent +{ +public: + wxFindDialogEvent(wxEventType commandType = wxEVT_NULL, int id = 0) + : wxCommandEvent(commandType, id) { } + wxFindDialogEvent(const wxFindDialogEvent& event) + : wxCommandEvent(event), m_strReplace(event.m_strReplace) { } + + int GetFlags() const { return GetInt(); } + wxString GetFindString() const { return GetString(); } + const wxString& GetReplaceString() const { return m_strReplace; } + + wxFindReplaceDialog *GetDialog() const + { return wxStaticCast(GetEventObject(), wxFindReplaceDialog); } + + // implementation only + void SetFlags(int flags) { SetInt(flags); } + void SetFindString(const wxString& str) { SetString(str); } + void SetReplaceString(const wxString& str) { m_strReplace = str; } + + virtual wxEvent *Clone() const { return new wxFindDialogEvent(*this); } + +private: + wxString m_strReplace; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFindDialogEvent) +}; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_NEXT, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_REPLACE, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_REPLACE_ALL, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_CLOSE, wxFindDialogEvent ); + +typedef void (wxEvtHandler::*wxFindDialogEventFunction)(wxFindDialogEvent&); + +#define wxFindDialogEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxFindDialogEventFunction, func) + +#define EVT_FIND(id, fn) \ + wx__DECLARE_EVT1(wxEVT_FIND, id, wxFindDialogEventHandler(fn)) + +#define EVT_FIND_NEXT(id, fn) \ + wx__DECLARE_EVT1(wxEVT_FIND_NEXT, id, wxFindDialogEventHandler(fn)) + +#define EVT_FIND_REPLACE(id, fn) \ + wx__DECLARE_EVT1(wxEVT_FIND_REPLACE, id, wxFindDialogEventHandler(fn)) + +#define EVT_FIND_REPLACE_ALL(id, fn) \ + wx__DECLARE_EVT1(wxEVT_FIND_REPLACE_ALL, id, wxFindDialogEventHandler(fn)) + +#define EVT_FIND_CLOSE(id, fn) \ + wx__DECLARE_EVT1(wxEVT_FIND_CLOSE, id, wxFindDialogEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_FIND wxEVT_FIND +#define wxEVT_COMMAND_FIND_NEXT wxEVT_FIND_NEXT +#define wxEVT_COMMAND_FIND_REPLACE wxEVT_FIND_REPLACE +#define wxEVT_COMMAND_FIND_REPLACE_ALL wxEVT_FIND_REPLACE_ALL +#define wxEVT_COMMAND_FIND_CLOSE wxEVT_FIND_CLOSE + +#endif // wxUSE_FINDREPLDLG + +#endif + // _WX_FDREPDLG_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/features.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/features.h new file mode 100644 index 0000000000..765f0f7f1f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/features.h @@ -0,0 +1,126 @@ +/** +* Name: wx/features.h +* Purpose: test macros for the features which might be available in some +* wxWidgets ports but not others +* Author: Vadim Zeitlin +* Modified by: Ryan Norton (Converted to C) +* Created: 18.03.02 +* Copyright: (c) 2002 Vadim Zeitlin +* Licence: wxWindows licence +*/ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_FEATURES_H_ +#define _WX_FEATURES_H_ + +/* radio menu items are currently not implemented in wxMotif, use this + symbol (kept for compatibility from the time when they were not implemented + under other platforms as well) to test for this */ +#if !defined(__WXMOTIF__) + #define wxHAS_RADIO_MENU_ITEMS +#else + #undef wxHAS_RADIO_MENU_ITEMS +#endif + +/* the raw keyboard codes are generated under wxGTK and wxMSW only */ +#if defined(__WXGTK__) || defined(__WXMSW__) || defined(__WXMAC__) \ + || defined(__WXDFB__) + #define wxHAS_RAW_KEY_CODES +#else + #undef wxHAS_RAW_KEY_CODES +#endif + +/* taskbar is implemented in the major ports */ +#if defined(__WXMSW__) || defined(__WXCOCOA__) \ + || defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) \ + || defined(__WXOSX_MAC__) || defined(__WXCOCOA__) + #define wxHAS_TASK_BAR_ICON +#else + #undef wxUSE_TASKBARICON + #define wxUSE_TASKBARICON 0 + #undef wxHAS_TASK_BAR_ICON +#endif + +/* wxIconLocation appeared in the middle of 2.5.0 so it's handy to have a */ +/* separate define for it */ +#define wxHAS_ICON_LOCATION + +/* same for wxCrashReport */ +#ifdef __WXMSW__ + #define wxHAS_CRASH_REPORT +#else + #undef wxHAS_CRASH_REPORT +#endif + +/* wxRE_ADVANCED is not always available, depending on regex library used + * (it's unavailable only if compiling via configure against system library) */ +#ifndef WX_NO_REGEX_ADVANCED + #define wxHAS_REGEX_ADVANCED +#else + #undef wxHAS_REGEX_ADVANCED +#endif + +/* Pango-based ports and wxDFB use UTF-8 for text and font encodings + * internally and so their fonts can handle any encodings: */ +#if wxUSE_PANGO || defined(__WXDFB__) + #define wxHAS_UTF8_FONTS +#endif + +/* This is defined when the underlying toolkit handles tab traversal natively. + Otherwise we implement it ourselves in wxControlContainer. */ +#ifdef __WXGTK20__ + #define wxHAS_NATIVE_TAB_TRAVERSAL +#endif + +/* This is defined when the compiler provides some type of extended locale + functions. Otherwise, we implement them ourselves to only support the + 'C' locale */ +#if defined(HAVE_LOCALE_T) || \ + (wxCHECK_VISUALC_VERSION(8) && !defined(__WXWINCE__)) + #define wxHAS_XLOCALE_SUPPORT +#else + #undef wxHAS_XLOCALE_SUPPORT +#endif + +/* Direct access to bitmap data is not implemented in all ports yet */ +#if defined(__WXGTK20__) || defined(__WXMAC__) || defined(__WXDFB__) || \ + defined(__WXMSW__) + + /* + These compilers can't deal with templates in wx/rawbmp.h: + - HP aCC for PA-RISC + - Watcom < 1.8 + */ + #if !wxONLY_WATCOM_EARLIER_THAN(1, 8) && \ + !(defined(__HP_aCC) && defined(__hppa)) + #define wxHAS_RAW_BITMAP + #endif +#endif + +/* also define deprecated synonym which exists for compatibility only */ +#ifdef wxHAS_RAW_BITMAP + #define wxHAVE_RAW_BITMAP +#endif + +/* + If this is defined, wxEvtHandler::Bind<>() is available (not all compilers + have the required template support for this and in particular under Windows + where only g++ and MSVC >= 7 currently support it. + + Recent Sun CC versions support this but perhaps older ones can compile this + code too, adjust the version check if this is the case (unfortunately we + can't easily test for the things used in wx/event.h in configure so we have + to maintain these checks manually). The same applies to xlC 7: perhaps + earlier versions can compile this code too but they were not tested. + */ +#if wxCHECK_GCC_VERSION(3, 2) || wxCHECK_VISUALC_VERSION(7) \ + || (defined(__SUNCC__) && __SUNCC__ >= 0x5100) \ + || (defined(__xlC__) && __xlC__ >= 0x700) \ + || defined(__INTELC__) + #define wxHAS_EVENT_BIND +#endif + + +#endif /* _WX_FEATURES_H_ */ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ffile.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ffile.h new file mode 100644 index 0000000000..91a7c28ed4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ffile.h @@ -0,0 +1,109 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/ffile.h +// Purpose: wxFFile - encapsulates "FILE *" stream +// Author: Vadim Zeitlin +// Modified by: +// Created: 14.07.99 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FFILE_H_ +#define _WX_FFILE_H_ + +#include "wx/defs.h" // for wxUSE_FFILE + +#if wxUSE_FFILE + +#include "wx/string.h" +#include "wx/filefn.h" +#include "wx/convauto.h" + +#include + +// ---------------------------------------------------------------------------- +// class wxFFile: standard C stream library IO +// +// NB: for space efficiency this class has no virtual functions, including +// dtor which is _not_ virtual, so it shouldn't be used as a base class. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFFile +{ +public: + // ctors + // ----- + // def ctor + wxFFile() { m_fp = NULL; } + // open specified file (may fail, use IsOpened()) + wxFFile(const wxString& filename, const wxString& mode = wxT("r")); + // attach to (already opened) file + wxFFile(FILE *lfp) { m_fp = lfp; } + + // open/close + // open a file (existing or not - the mode controls what happens) + bool Open(const wxString& filename, const wxString& mode = wxT("r")); + // closes the opened file (this is a NOP if not opened) + bool Close(); + + // assign an existing file descriptor and get it back from wxFFile object + void Attach(FILE *lfp, const wxString& name = wxEmptyString) + { Close(); m_fp = lfp; m_name = name; } + FILE* Detach() { FILE* fpOld = m_fp; m_fp = NULL; return fpOld; } + FILE *fp() const { return m_fp; } + + // read/write (unbuffered) + // read all data from the file into a string (useful for text files) + bool ReadAll(wxString *str, const wxMBConv& conv = wxConvAuto()); + // returns number of bytes read - use Eof() and Error() to see if an error + // occurred or not + size_t Read(void *pBuf, size_t nCount); + // returns the number of bytes written + size_t Write(const void *pBuf, size_t nCount); + // returns true on success + bool Write(const wxString& s, const wxMBConv& conv = wxConvAuto()); + // flush data not yet written + bool Flush(); + + // file pointer operations (return ofsInvalid on failure) + // move ptr ofs bytes related to start/current pos/end of file + bool Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart); + // move ptr to ofs bytes before the end + bool SeekEnd(wxFileOffset ofs = 0) { return Seek(ofs, wxFromEnd); } + // get current position in the file + wxFileOffset Tell() const; + // get current file length + wxFileOffset Length() const; + + // simple accessors: note that Eof() and Error() may only be called if + // IsOpened()! + // is file opened? + bool IsOpened() const { return m_fp != NULL; } + // is end of file reached? + bool Eof() const { return feof(m_fp) != 0; } + // has an error occurred? + bool Error() const { return ferror(m_fp) != 0; } + // get the file name + const wxString& GetName() const { return m_name; } + // type such as disk or pipe + wxFileKind GetKind() const { return wxGetFileKind(m_fp); } + + // dtor closes the file if opened + ~wxFFile() { Close(); } + +private: + // copy ctor and assignment operator are private because it doesn't make + // sense to copy files this way: attempt to do it will provoke a compile-time + // error. + wxFFile(const wxFFile&); + wxFFile& operator=(const wxFFile&); + + FILE *m_fp; // IO stream or NULL if not opened + + wxString m_name; // the name of the file (for diagnostic messages) +}; + +#endif // wxUSE_FFILE + +#endif // _WX_FFILE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/file.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/file.h new file mode 100644 index 0000000000..00ac471abf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/file.h @@ -0,0 +1,190 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/file.h +// Purpose: wxFile - encapsulates low-level "file descriptor" +// wxTempFile - safely replace the old file +// Author: Vadim Zeitlin +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILEH__ +#define _WX_FILEH__ + +#include "wx/defs.h" + +#if wxUSE_FILE + +#include "wx/string.h" +#include "wx/filefn.h" +#include "wx/convauto.h" + +// ---------------------------------------------------------------------------- +// class wxFile: raw file IO +// +// NB: for space efficiency this class has no virtual functions, including +// dtor which is _not_ virtual, so it shouldn't be used as a base class. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFile +{ +public: + // more file constants + // ------------------- + // opening mode + enum OpenMode { read, write, read_write, write_append, write_excl }; + // standard values for file descriptor + enum { fd_invalid = -1, fd_stdin, fd_stdout, fd_stderr }; + + // static functions + // ---------------- + // check whether a regular file by this name exists + static bool Exists(const wxString& name); + // check whether we can access the given file in given mode + // (only read and write make sense here) + static bool Access(const wxString& name, OpenMode mode); + + // ctors + // ----- + // def ctor + wxFile() { m_fd = fd_invalid; m_lasterror = 0; } + // open specified file (may fail, use IsOpened()) + wxFile(const wxString& fileName, OpenMode mode = read); + // attach to (already opened) file + wxFile(int lfd) { m_fd = lfd; m_lasterror = 0; } + + // open/close + // create a new file (with the default value of bOverwrite, it will fail if + // the file already exists, otherwise it will overwrite it and succeed) + bool Create(const wxString& fileName, bool bOverwrite = false, + int access = wxS_DEFAULT); + bool Open(const wxString& fileName, OpenMode mode = read, + int access = wxS_DEFAULT); + bool Close(); // Close is a NOP if not opened + + // assign an existing file descriptor and get it back from wxFile object + void Attach(int lfd) { Close(); m_fd = lfd; m_lasterror = 0; } + int Detach() { int fdOld = m_fd; m_fd = fd_invalid; return fdOld; } + int fd() const { return m_fd; } + + // read/write (unbuffered) + // read all data from the file into a string (useful for text files) + bool ReadAll(wxString *str, const wxMBConv& conv = wxConvAuto()); + // returns number of bytes read or wxInvalidOffset on error + ssize_t Read(void *pBuf, size_t nCount); + // returns the number of bytes written + size_t Write(const void *pBuf, size_t nCount); + // returns true on success + bool Write(const wxString& s, const wxMBConv& conv = wxConvAuto()); + // flush data not yet written + bool Flush(); + + // file pointer operations (return wxInvalidOffset on failure) + // move ptr ofs bytes related to start/current offset/end of file + wxFileOffset Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart); + // move ptr to ofs bytes before the end + wxFileOffset SeekEnd(wxFileOffset ofs = 0) { return Seek(ofs, wxFromEnd); } + // get current offset + wxFileOffset Tell() const; + // get current file length + wxFileOffset Length() const; + + // simple accessors + // is file opened? + bool IsOpened() const { return m_fd != fd_invalid; } + // is end of file reached? + bool Eof() const; + // has an error occurred? + bool Error() const { return m_lasterror != 0; } + // get last errno + int GetLastError() const { return m_lasterror; } + // reset error state + void ClearLastError() { m_lasterror = 0; } + // type such as disk or pipe + wxFileKind GetKind() const { return wxGetFileKind(m_fd); } + + + // dtor closes the file if opened + ~wxFile() { Close(); } + +private: + // copy ctor and assignment operator are private because + // it doesn't make sense to copy files this way: + // attempt to do it will provoke a compile-time error. + wxFile(const wxFile&); + wxFile& operator=(const wxFile&); + + // Copy the value of errno into m_lasterror if rc == -1 and return true in + // this case (indicating that we've got an error). Otherwise return false. + // + // Notice that we use the possibly 64 bit wxFileOffset instead of int here so + // that it works for checking the result of functions such as tell() too. + bool CheckForError(wxFileOffset rc) const; + + + int m_fd; // file descriptor or INVALID_FD if not opened + int m_lasterror; // errno value of last error +}; + +// ---------------------------------------------------------------------------- +// class wxTempFile: if you want to replace another file, create an instance +// of wxTempFile passing the name of the file to be replaced to the ctor. Then +// you can write to wxTempFile and call Commit() function to replace the old +// file (and close this one) or call Discard() to cancel the modification. If +// you call neither of them, dtor will call Discard(). +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxTempFile +{ +public: + // ctors + // default + wxTempFile() { } + // associates the temp file with the file to be replaced and opens it + wxTempFile(const wxString& strName); + + // open the temp file (strName is the name of file to be replaced) + bool Open(const wxString& strName); + + // is the file opened? + bool IsOpened() const { return m_file.IsOpened(); } + // get current file length + wxFileOffset Length() const { return m_file.Length(); } + // move ptr ofs bytes related to start/current offset/end of file + wxFileOffset Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart) + { return m_file.Seek(ofs, mode); } + // get current offset + wxFileOffset Tell() const { return m_file.Tell(); } + + // I/O (both functions return true on success, false on failure) + bool Write(const void *p, size_t n) { return m_file.Write(p, n) == n; } + bool Write(const wxString& str, const wxMBConv& conv = wxMBConvUTF8()) + { return m_file.Write(str, conv); } + + // flush data: can be called before closing file to ensure that data was + // correctly written out + bool Flush() { return m_file.Flush(); } + + // different ways to close the file + // validate changes and delete the old file of name m_strName + bool Commit(); + // discard changes + void Discard(); + + // dtor calls Discard() if file is still opened + ~wxTempFile(); + +private: + // no copy ctor/assignment operator + wxTempFile(const wxTempFile&); + wxTempFile& operator=(const wxTempFile&); + + wxString m_strName, // name of the file to replace in Commit() + m_strTemp; // temporary file name + wxFile m_file; // the temporary file +}; + +#endif // wxUSE_FILE + +#endif // _WX_FILEH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fileconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fileconf.h new file mode 100644 index 0000000000..c16129a5b1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fileconf.h @@ -0,0 +1,263 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/fileconf.h +// Purpose: wxFileConfig derivation of wxConfigBase +// Author: Vadim Zeitlin +// Modified by: +// Created: 07.04.98 (adapted from appconf.cpp) +// Copyright: (c) 1997 Karsten Ballueder & Vadim Zeitlin +// Ballueder@usa.net +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _FILECONF_H +#define _FILECONF_H + +#include "wx/defs.h" + +#if wxUSE_CONFIG + +#include "wx/textfile.h" +#include "wx/string.h" +#include "wx/confbase.h" +#include "wx/filename.h" + +// ---------------------------------------------------------------------------- +// wxFileConfig +// ---------------------------------------------------------------------------- + +/* + wxFileConfig derives from base Config and implements file based config class, + i.e. it uses ASCII disk files to store the information. These files are + alternatively called INI, .conf or .rc in the documentation. They are + organized in groups or sections, which can nest (i.e. a group contains + subgroups, which contain their own subgroups &c). Each group has some + number of entries, which are "key = value" pairs. More precisely, the format + is: + + # comments are allowed after either ';' or '#' (Win/UNIX standard) + + # blank lines (as above) are ignored + + # global entries are members of special (no name) top group + written_for = Windows + platform = Linux + + # the start of the group 'Foo' + [Foo] # may put comments like this also + # following 3 lines are entries + key = value + another_key = " strings with spaces in the beginning should be quoted, \ + otherwise the spaces are lost" + last_key = but you don't have to put " normally (nor quote them, like here) + + # subgroup of the group 'Foo' + # (order is not important, only the name is: separator is '/', as in paths) + [Foo/Bar] + # entries prefixed with "!" are immutable, i.e. can't be changed if they are + # set in the system-wide config file + !special_key = value + bar_entry = whatever + + [Foo/Bar/Fubar] # depth is (theoretically :-) unlimited + # may have the same name as key in another section + bar_entry = whatever not + + You have {read/write/delete}Entry functions (guess what they do) and also + setCurrentPath to select current group. enum{Subgroups/Entries} allow you + to get all entries in the config file (in the current group). Finally, + flush() writes immediately all changed entries to disk (otherwise it would + be done automatically in dtor) + + wxFileConfig manages not less than 2 config files for each program: global + and local (or system and user if you prefer). Entries are read from both of + them and the local entries override the global ones unless the latter is + immutable (prefixed with '!') in which case a warning message is generated + and local value is ignored. Of course, the changes are always written to local + file only. + + The names of these files can be specified in a number of ways. First of all, + you can use the standard convention: using the ctor which takes 'strAppName' + parameter will probably be sufficient for 90% of cases. If, for whatever + reason you wish to use the files with some other names, you can always use the + second ctor. + + wxFileConfig also may automatically expand the values of environment variables + in the entries it reads: for example, if you have an entry + score_file = $HOME/.score + a call to Read(&str, "score_file") will return a complete path to .score file + unless the expansion was previously disabled with SetExpandEnvVars(false) call + (it's on by default, the current status can be retrieved with + IsExpandingEnvVars function). +*/ +class WXDLLIMPEXP_FWD_BASE wxFileConfigGroup; +class WXDLLIMPEXP_FWD_BASE wxFileConfigEntry; +class WXDLLIMPEXP_FWD_BASE wxFileConfigLineList; + +#if wxUSE_STREAMS +class WXDLLIMPEXP_FWD_BASE wxInputStream; +class WXDLLIMPEXP_FWD_BASE wxOutputStream; +#endif // wxUSE_STREAMS + +class WXDLLIMPEXP_BASE wxFileConfig : public wxConfigBase +{ +public: + // construct the "standard" full name for global (system-wide) and + // local (user-specific) config files from the base file name. + // + // the following are the filenames returned by this functions: + // global local + // Unix /etc/file.ext ~/.file + // Win %windir%\file.ext %USERPROFILE%\file.ext + // + // where file is the basename of szFile, ext is its extension + // or .conf (Unix) or .ini (Win) if it has none + static wxFileName GetGlobalFile(const wxString& szFile); + static wxFileName GetLocalFile(const wxString& szFile, int style = 0); + + static wxString GetGlobalFileName(const wxString& szFile) + { + return GetGlobalFile(szFile).GetFullPath(); + } + + static wxString GetLocalFileName(const wxString& szFile, int style = 0) + { + return GetLocalFile(szFile, style).GetFullPath(); + } + + // ctor & dtor + // New constructor: one size fits all. Specify wxCONFIG_USE_LOCAL_FILE or + // wxCONFIG_USE_GLOBAL_FILE to say which files should be used. + wxFileConfig(const wxString& appName = wxEmptyString, + const wxString& vendorName = wxEmptyString, + const wxString& localFilename = wxEmptyString, + const wxString& globalFilename = wxEmptyString, + long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE, + const wxMBConv& conv = wxConvAuto()); + +#if wxUSE_STREAMS + // ctor that takes an input stream. + wxFileConfig(wxInputStream &inStream, const wxMBConv& conv = wxConvAuto()); +#endif // wxUSE_STREAMS + + // dtor will save unsaved data + virtual ~wxFileConfig(); + + // under Unix, set the umask to be used for the file creation, do nothing + // under other systems +#ifdef __UNIX__ + void SetUmask(int mode) { m_umask = mode; } +#else // !__UNIX__ + void SetUmask(int WXUNUSED(mode)) { } +#endif // __UNIX__/!__UNIX__ + + // implement inherited pure virtual functions + virtual void SetPath(const wxString& strPath); + virtual const wxString& GetPath() const; + + virtual bool GetFirstGroup(wxString& str, long& lIndex) const; + virtual bool GetNextGroup (wxString& str, long& lIndex) const; + virtual bool GetFirstEntry(wxString& str, long& lIndex) const; + virtual bool GetNextEntry (wxString& str, long& lIndex) const; + + virtual size_t GetNumberOfEntries(bool bRecursive = false) const; + virtual size_t GetNumberOfGroups(bool bRecursive = false) const; + + virtual bool HasGroup(const wxString& strName) const; + virtual bool HasEntry(const wxString& strName) const; + + virtual bool Flush(bool bCurrentOnly = false); + + virtual bool RenameEntry(const wxString& oldName, const wxString& newName); + virtual bool RenameGroup(const wxString& oldName, const wxString& newName); + + virtual bool DeleteEntry(const wxString& key, bool bGroupIfEmptyAlso = true); + virtual bool DeleteGroup(const wxString& szKey); + virtual bool DeleteAll(); + + // additional, wxFileConfig-specific, functionality +#if wxUSE_STREAMS + // save the entire config file text to the given stream, note that the text + // won't be saved again in dtor when Flush() is called if you use this method + // as it won't be "changed" any more + virtual bool Save(wxOutputStream& os, const wxMBConv& conv = wxConvAuto()); +#endif // wxUSE_STREAMS + +public: + // functions to work with this list + wxFileConfigLineList *LineListAppend(const wxString& str); + wxFileConfigLineList *LineListInsert(const wxString& str, + wxFileConfigLineList *pLine); // NULL => Prepend() + void LineListRemove(wxFileConfigLineList *pLine); + bool LineListIsEmpty(); + +protected: + virtual bool DoReadString(const wxString& key, wxString *pStr) const; + virtual bool DoReadLong(const wxString& key, long *pl) const; +#if wxUSE_BASE64 + virtual bool DoReadBinary(const wxString& key, wxMemoryBuffer* buf) const; +#endif // wxUSE_BASE64 + + virtual bool DoWriteString(const wxString& key, const wxString& szValue); + virtual bool DoWriteLong(const wxString& key, long lValue); +#if wxUSE_BASE64 + virtual bool DoWriteBinary(const wxString& key, const wxMemoryBuffer& buf); +#endif // wxUSE_BASE64 + +private: + // GetXXXFileName helpers: return ('/' terminated) directory names + static wxString GetGlobalDir(); + static wxString GetLocalDir(int style = 0); + + // common part of all ctors (assumes that m_str{Local|Global}File are already + // initialized + void Init(); + + // common part of from dtor and DeleteAll + void CleanUp(); + + // parse the whole file + void Parse(const wxTextBuffer& buffer, bool bLocal); + + // the same as SetPath("/") + void SetRootPath(); + + // real SetPath() implementation, returns true if path could be set or false + // if path doesn't exist and createMissingComponents == false + bool DoSetPath(const wxString& strPath, bool createMissingComponents); + + // set/test the dirty flag + void SetDirty() { m_isDirty = true; } + void ResetDirty() { m_isDirty = false; } + bool IsDirty() const { return m_isDirty; } + + + // member variables + // ---------------- + wxFileConfigLineList *m_linesHead, // head of the linked list + *m_linesTail; // tail + + wxFileName m_fnLocalFile, // local file name passed to ctor + m_fnGlobalFile; // global + wxString m_strPath; // current path (not '/' terminated) + + wxFileConfigGroup *m_pRootGroup, // the top (unnamed) group + *m_pCurrentGroup; // the current group + + wxMBConv *m_conv; + +#ifdef __UNIX__ + int m_umask; // the umask to use for file creation +#endif // __UNIX__ + + bool m_isDirty; // if true, we have unsaved changes + + wxDECLARE_NO_COPY_CLASS(wxFileConfig); + DECLARE_ABSTRACT_CLASS(wxFileConfig) +}; + +#endif + // wxUSE_CONFIG + +#endif + //_FILECONF_H + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/filectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filectrl.h new file mode 100644 index 0000000000..e4c302f7d5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filectrl.h @@ -0,0 +1,145 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/filectrl.h +// Purpose: Header for wxFileCtrlBase and other common functions used by +// platform-specific wxFileCtrl's +// Author: Diaa M. Sami +// Modified by: +// Created: Jul-07-2007 +// Copyright: (c) Diaa M. Sami +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILECTRL_H_BASE_ +#define _WX_FILECTRL_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_FILECTRL + +#include "wx/string.h" +#include "wx/event.h" + +enum +{ + wxFC_OPEN = 0x0001, + wxFC_SAVE = 0x0002, + wxFC_MULTIPLE = 0x0004, + wxFC_NOSHOWHIDDEN = 0x0008 +}; + +#define wxFC_DEFAULT_STYLE wxFC_OPEN +extern WXDLLIMPEXP_DATA_CORE(const char) wxFileCtrlNameStr[]; // in filectrlcmn.cpp + +class WXDLLIMPEXP_CORE wxFileCtrlBase +{ +public: + virtual ~wxFileCtrlBase() {} + + virtual void SetWildcard( const wxString& wildCard ) = 0; + virtual void SetFilterIndex( int filterindex ) = 0; + virtual bool SetDirectory( const wxString& dir ) = 0; + + // Selects a certain file. + // In case the filename specified isn't found/couldn't be shown with + // currently selected filter, false is returned and nothing happens + virtual bool SetFilename( const wxString& name ) = 0; + + // chdirs to a certain directory and selects a certain file. + // In case the filename specified isn't found/couldn't be shown with + // currently selected filter, false is returned and if directory exists + // it's chdir'ed to + virtual bool SetPath( const wxString& path ) = 0; + + virtual wxString GetFilename() const = 0; + virtual wxString GetDirectory() const = 0; + virtual wxString GetWildcard() const = 0; + virtual wxString GetPath() const = 0; + virtual void GetPaths( wxArrayString& paths ) const = 0; + virtual void GetFilenames( wxArrayString& files ) const = 0; + virtual int GetFilterIndex() const = 0; + + virtual bool HasMultipleFileSelection() const = 0; + virtual void ShowHidden(bool show) = 0; +}; + +void GenerateFilterChangedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd ); +void GenerateFolderChangedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd ); +void GenerateSelectionChangedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd ); +void GenerateFileActivatedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd, const wxString filename = wxEmptyString ); + +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) + #define wxFileCtrl wxGtkFileCtrl + #include "wx/gtk/filectrl.h" +#else + #define wxFileCtrl wxGenericFileCtrl + #include "wx/generic/filectrlg.h" +#endif + +// Some documentation +// On wxEVT_FILECTRL_FILTERCHANGED, only the value returned by GetFilterIndex is +// valid and it represents the (new) current filter index for the wxFileCtrl. +// On wxEVT_FILECTRL_FOLDERCHANGED, only the value returned by GetDirectory is +// valid and it represents the (new) current directory for the wxFileCtrl. +// On wxEVT_FILECTRL_FILEACTIVATED, GetDirectory returns the current directory +// for the wxFileCtrl and GetFiles returns the names of the file(s) activated. +// On wxEVT_FILECTRL_SELECTIONCHANGED, GetDirectory returns the current directory +// for the wxFileCtrl and GetFiles returns the names of the currently selected +// file(s). +// In wxGTK, after each wxEVT_FILECTRL_FOLDERCHANGED, wxEVT_FILECTRL_SELECTIONCHANGED +// is fired automatically once or more with 0 files. +class WXDLLIMPEXP_CORE wxFileCtrlEvent : public wxCommandEvent +{ +public: + wxFileCtrlEvent() {} + wxFileCtrlEvent( wxEventType type, wxObject *evtObject, int id ) + : wxCommandEvent( type, id ) + { + SetEventObject( evtObject ); + } + + // no need for the copy constructor as the default one will be fine. + virtual wxEvent *Clone() const { return new wxFileCtrlEvent( *this ); } + + void SetFiles( const wxArrayString &files ) { m_files = files; } + void SetDirectory( const wxString &directory ) { m_directory = directory; } + void SetFilterIndex( int filterIndex ) { m_filterIndex = filterIndex; } + + wxArrayString GetFiles() const { return m_files; } + wxString GetDirectory() const { return m_directory; } + int GetFilterIndex() const { return m_filterIndex; } + + wxString GetFile() const; + +protected: + int m_filterIndex; + wxString m_directory; + wxArrayString m_files; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN( wxFileCtrlEvent ) +}; + +typedef void ( wxEvtHandler::*wxFileCtrlEventFunction )( wxFileCtrlEvent& ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILECTRL_SELECTIONCHANGED, wxFileCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILECTRL_FILEACTIVATED, wxFileCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILECTRL_FOLDERCHANGED, wxFileCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILECTRL_FILTERCHANGED, wxFileCtrlEvent ); + +#define wxFileCtrlEventHandler(func) \ + wxEVENT_HANDLER_CAST( wxFileCtrlEventFunction, func ) + +#define EVT_FILECTRL_FILEACTIVATED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_FILECTRL_FILEACTIVATED, id, wxFileCtrlEventHandler(fn)) + +#define EVT_FILECTRL_SELECTIONCHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_FILECTRL_SELECTIONCHANGED, id, wxFileCtrlEventHandler(fn)) + +#define EVT_FILECTRL_FOLDERCHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_FILECTRL_FOLDERCHANGED, id, wxFileCtrlEventHandler(fn)) + +#define EVT_FILECTRL_FILTERCHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_FILECTRL_FILTERCHANGED, id, wxFileCtrlEventHandler(fn)) + +#endif // wxUSE_FILECTRL + +#endif // _WX_FILECTRL_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/filedlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filedlg.h new file mode 100644 index 0000000000..d105493cc2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filedlg.h @@ -0,0 +1,248 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/filedlg.h +// Purpose: wxFileDialog base header +// Author: Robert Roebling +// Modified by: +// Created: 8/17/99 +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILEDLG_H_BASE_ +#define _WX_FILEDLG_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_FILEDLG + +#include "wx/dialog.h" +#include "wx/arrstr.h" + +// this symbol is defined for the platforms which support multiple +// ('|'-separated) filters in the file dialog +#if defined(__WXMSW__) || defined(__WXGTK__) || defined(__WXMAC__) + #define wxHAS_MULTIPLE_FILEDLG_FILTERS +#endif + +//---------------------------------------------------------------------------- +// wxFileDialog data +//---------------------------------------------------------------------------- + +/* + The flags below must coexist with the following flags in m_windowStyle + #define wxCAPTION 0x20000000 + #define wxMAXIMIZE 0x00002000 + #define wxCLOSE_BOX 0x00001000 + #define wxSYSTEM_MENU 0x00000800 + wxBORDER_NONE = 0x00200000 + #define wxRESIZE_BORDER 0x00000040 +*/ + +enum +{ + wxFD_OPEN = 0x0001, + wxFD_SAVE = 0x0002, + wxFD_OVERWRITE_PROMPT = 0x0004, + wxFD_FILE_MUST_EXIST = 0x0010, + wxFD_MULTIPLE = 0x0020, + wxFD_CHANGE_DIR = 0x0080, + wxFD_PREVIEW = 0x0100 +}; + +#if WXWIN_COMPATIBILITY_2_6 +enum +{ + wxOPEN = wxFD_OPEN, + wxSAVE = wxFD_SAVE, + wxOVERWRITE_PROMPT = wxFD_OVERWRITE_PROMPT, + wxFILE_MUST_EXIST = wxFD_FILE_MUST_EXIST, + wxMULTIPLE = wxFD_MULTIPLE, + wxCHANGE_DIR = wxFD_CHANGE_DIR +}; +#endif + +#define wxFD_DEFAULT_STYLE wxFD_OPEN + +extern WXDLLIMPEXP_DATA_CORE(const char) wxFileDialogNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxFileSelectorPromptStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxFileSelectorDefaultWildcardStr[]; + +//---------------------------------------------------------------------------- +// wxFileDialogBase +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDialogBase: public wxDialog +{ +public: + wxFileDialogBase () { Init(); } + + wxFileDialogBase(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr) + { + Init(); + Create(parent, message, defaultDir, defaultFile, wildCard, style, pos, sz, name); + } + + virtual ~wxFileDialogBase() {} + + + bool Create(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr); + + bool HasFdFlag(int flag) const { return HasFlag(flag); } + + virtual void SetMessage(const wxString& message) { m_message = message; } + virtual void SetPath(const wxString& path); + virtual void SetDirectory(const wxString& dir); + virtual void SetFilename(const wxString& name); + virtual void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; } + virtual void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; } + + virtual wxString GetMessage() const { return m_message; } + virtual wxString GetPath() const { return m_path; } + virtual void GetPaths(wxArrayString& paths) const { paths.Empty(); paths.Add(m_path); } + virtual wxString GetDirectory() const { return m_dir; } + virtual wxString GetFilename() const { return m_fileName; } + virtual void GetFilenames(wxArrayString& files) const { files.Empty(); files.Add(m_fileName); } + virtual wxString GetWildcard() const { return m_wildCard; } + virtual int GetFilterIndex() const { return m_filterIndex; } + + virtual wxString GetCurrentlySelectedFilename() const + { return m_currentlySelectedFilename; } + + // this function is called with wxFileDialog as parameter and should + // create the window containing the extra controls we want to show in it + typedef wxWindow *(*ExtraControlCreatorFunction)(wxWindow*); + + virtual bool SupportsExtraControl() const { return false; } + + bool SetExtraControlCreator(ExtraControlCreatorFunction creator); + wxWindow *GetExtraControl() const { return m_extraControl; } + + // Utility functions + +#if WXWIN_COMPATIBILITY_2_6 + + wxDEPRECATED( long GetStyle() const ); + wxDEPRECATED( void SetStyle(long style) ); + +#endif // WXWIN_COMPATIBILITY_2_6 + + + // Append first extension to filePath from a ';' separated extensionList + // if filePath = "path/foo.bar" just return it as is + // if filePath = "foo[.]" and extensionList = "*.jpg;*.png" return "foo.jpg" + // if the extension is "*.j?g" (has wildcards) or "jpg" then return filePath + static wxString AppendExtension(const wxString &filePath, + const wxString &extensionList); + +protected: + wxString m_message; + wxString m_dir; + wxString m_path; // Full path + wxString m_fileName; + wxString m_wildCard; + int m_filterIndex; + + // Currently selected, but not yet necessarily accepted by the user, file. + // This should be updated whenever the selection in the control changes by + // the platform-specific code to provide a useful implementation of + // GetCurrentlySelectedFilename(). + wxString m_currentlySelectedFilename; + + wxWindow* m_extraControl; + + // returns true if control is created (if it already exists returns false) + bool CreateExtraControl(); + // return true if SetExtraControlCreator() was called + bool HasExtraControlCreator() const + { return m_extraControlCreator != NULL; } + // get the size of the extra control by creating and deleting it + wxSize GetExtraControlSize(); + +private: + ExtraControlCreatorFunction m_extraControlCreator; + + void Init(); + DECLARE_DYNAMIC_CLASS(wxFileDialogBase) + wxDECLARE_NO_COPY_CLASS(wxFileDialogBase); +}; + + +//---------------------------------------------------------------------------- +// wxFileDialog convenience functions +//---------------------------------------------------------------------------- + +// File selector - backward compatibility +WXDLLIMPEXP_CORE wxString +wxFileSelector(const wxString& message = wxFileSelectorPromptStr, + const wxString& default_path = wxEmptyString, + const wxString& default_filename = wxEmptyString, + const wxString& default_extension = wxEmptyString, + const wxString& wildcard = wxFileSelectorDefaultWildcardStr, + int flags = 0, + wxWindow *parent = NULL, + int x = wxDefaultCoord, int y = wxDefaultCoord); + +// An extended version of wxFileSelector +WXDLLIMPEXP_CORE wxString +wxFileSelectorEx(const wxString& message = wxFileSelectorPromptStr, + const wxString& default_path = wxEmptyString, + const wxString& default_filename = wxEmptyString, + int *indexDefaultExtension = NULL, + const wxString& wildcard = wxFileSelectorDefaultWildcardStr, + int flags = 0, + wxWindow *parent = NULL, + int x = wxDefaultCoord, int y = wxDefaultCoord); + +// Ask for filename to load +WXDLLIMPEXP_CORE wxString +wxLoadFileSelector(const wxString& what, + const wxString& extension, + const wxString& default_name = wxEmptyString, + wxWindow *parent = NULL); + +// Ask for filename to save +WXDLLIMPEXP_CORE wxString +wxSaveFileSelector(const wxString& what, + const wxString& extension, + const wxString& default_name = wxEmptyString, + wxWindow *parent = NULL); + + +#if defined (__WXUNIVERSAL__) + #define wxHAS_GENERIC_FILEDIALOG + #include "wx/generic/filedlgg.h" +#elif defined(__WXMSW__) + #include "wx/msw/filedlg.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/filedlg.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/filedlg.h" // GTK+ > 2.4 has native version +#elif defined(__WXGTK__) + #include "wx/gtk1/filedlg.h" +#elif defined(__WXMAC__) + #include "wx/osx/filedlg.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/filedlg.h" +#elif defined(__WXPM__) + #include "wx/os2/filedlg.h" +#endif + +#endif // wxUSE_FILEDLG + +#endif // _WX_FILEDLG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/filefn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filefn.h new file mode 100644 index 0000000000..95b3051c05 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filefn.h @@ -0,0 +1,842 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/filefn.h +// Purpose: File- and directory-related functions +// Author: Julian Smart +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _FILEFN_H_ +#define _FILEFN_H_ + +#include "wx/list.h" +#include "wx/arrstr.h" + +#ifdef __WXWINCE__ + #include "wx/msw/wince/time.h" + #include "wx/msw/private.h" +#else + #include +#endif + +#ifndef __WXWINCE__ + #include + #include +#endif + +#ifdef __OS2__ +// need to check for __OS2__ first since currently both +// __OS2__ and __UNIX__ are defined. + #include + #include "wx/os2/private.h" + #ifdef __WATCOMC__ + #include + #endif + #include + #ifdef __EMX__ + #include + #endif +#elif defined(__UNIX__) + #include + #include +#endif + +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) +#if !defined( __GNUWIN32__ ) && !defined(__WXWINCE__) && !defined(__CYGWIN__) + #include + #include + #include +#endif // __WINDOWS__ +#endif // native Win compiler + +#if defined(__DOS__) + #ifdef __WATCOMC__ + #include + #include + #include + #endif + #ifdef __DJGPP__ + #include + #include + #endif +#endif + +#ifdef __BORLANDC__ // Please someone tell me which version of Borland needs + // this (3.1 I believe) and how to test for it. + // If this works for Borland 4.0 as well, then no worries. + #include +#endif + +#ifndef __WXWINCE__ + #include // O_RDONLY &c +#endif + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +#if defined(__VISUALC__) || defined(__DIGITALMARS__) + typedef int mode_t; +#endif + +#ifdef __WXWINCE__ + typedef long off_t; +#else + // define off_t + #if !defined(__WXMAC__) || defined(__UNIX__) || defined(__MACH__) + #include + #else + typedef long off_t; + #endif +#endif + +#if defined(__VISUALC__) && !defined(__WXWINCE__) + typedef _off_t off_t; +#elif defined(__SYMANTEC__) + typedef long off_t; +#endif + +enum wxSeekMode +{ + wxFromStart, + wxFromCurrent, + wxFromEnd +}; + +enum wxFileKind +{ + wxFILE_KIND_UNKNOWN, + wxFILE_KIND_DISK, // a file supporting seeking to arbitrary offsets + wxFILE_KIND_TERMINAL, // a tty + wxFILE_KIND_PIPE // a pipe +}; + +// we redefine these constants here because S_IREAD &c are _not_ standard +// however, we do assume that the values correspond to the Unix umask bits +enum wxPosixPermissions +{ + // standard Posix names for these permission flags: + wxS_IRUSR = 00400, + wxS_IWUSR = 00200, + wxS_IXUSR = 00100, + + wxS_IRGRP = 00040, + wxS_IWGRP = 00020, + wxS_IXGRP = 00010, + + wxS_IROTH = 00004, + wxS_IWOTH = 00002, + wxS_IXOTH = 00001, + + // longer but more readable synonyms for the constants above: + wxPOSIX_USER_READ = wxS_IRUSR, + wxPOSIX_USER_WRITE = wxS_IWUSR, + wxPOSIX_USER_EXECUTE = wxS_IXUSR, + + wxPOSIX_GROUP_READ = wxS_IRGRP, + wxPOSIX_GROUP_WRITE = wxS_IWGRP, + wxPOSIX_GROUP_EXECUTE = wxS_IXGRP, + + wxPOSIX_OTHERS_READ = wxS_IROTH, + wxPOSIX_OTHERS_WRITE = wxS_IWOTH, + wxPOSIX_OTHERS_EXECUTE = wxS_IXOTH, + + // default mode for the new files: allow reading/writing them to everybody but + // the effective file mode will be set after anding this value with umask and + // so won't include wxS_IW{GRP,OTH} for the default 022 umask value + wxS_DEFAULT = (wxPOSIX_USER_READ | wxPOSIX_USER_WRITE | \ + wxPOSIX_GROUP_READ | wxPOSIX_GROUP_WRITE | \ + wxPOSIX_OTHERS_READ | wxPOSIX_OTHERS_WRITE), + + // default mode for the new directories (see wxFileName::Mkdir): allow + // reading/writing/executing them to everybody, but just like wxS_DEFAULT + // the effective directory mode will be set after anding this value with umask + wxS_DIR_DEFAULT = (wxPOSIX_USER_READ | wxPOSIX_USER_WRITE | wxPOSIX_USER_EXECUTE | \ + wxPOSIX_GROUP_READ | wxPOSIX_GROUP_WRITE | wxPOSIX_GROUP_EXECUTE | \ + wxPOSIX_OTHERS_READ | wxPOSIX_OTHERS_WRITE | wxPOSIX_OTHERS_EXECUTE) +}; + +// ---------------------------------------------------------------------------- +// declare our versions of low level file functions: some compilers prepend +// underscores to the usual names, some also have Unicode versions of them +// ---------------------------------------------------------------------------- + +// Wrappers around Win32 api functions like CreateFile, ReadFile and such +// Implemented in filefnwce.cpp +#if defined( __WXWINCE__) + typedef __int64 wxFileOffset; + #define wxFileOffsetFmtSpec wxT("I64") + WXDLLIMPEXP_BASE int wxCRT_Open(const wxChar *filename, int oflag, int WXUNUSED(pmode)); + WXDLLIMPEXP_BASE int wxCRT_Access(const wxChar *name, int WXUNUSED(how)); + WXDLLIMPEXP_BASE int wxCRT_Chmod(const wxChar *name, int WXUNUSED(how)); + WXDLLIMPEXP_BASE int wxClose(int fd); + WXDLLIMPEXP_BASE int wxFsync(int WXUNUSED(fd)); + WXDLLIMPEXP_BASE int wxRead(int fd, void *buf, unsigned int count); + WXDLLIMPEXP_BASE int wxWrite(int fd, const void *buf, unsigned int count); + WXDLLIMPEXP_BASE int wxEof(int fd); + WXDLLIMPEXP_BASE wxFileOffset wxSeek(int fd, wxFileOffset offset, int origin); + #define wxLSeek wxSeek + WXDLLIMPEXP_BASE wxFileOffset wxTell(int fd); + + // always Unicode under WinCE + #define wxCRT_MkDir _wmkdir + #define wxCRT_RmDir _wrmdir + #define wxCRT_Stat _wstat + #define wxStructStat struct _stat +#elif (defined(__WINDOWS__) || defined(__OS2__)) && \ + ( \ + defined(__VISUALC__) || \ + defined(__MINGW64__) || \ + (defined(__MINGW32__) && !defined(__WINE__) && \ + wxCHECK_W32API_VERSION(0, 5)) || \ + defined(__DMC__) || \ + defined(__WATCOMC__) || \ + defined(__BORLANDC__) \ + ) + + // temporary defines just used immediately below + #undef wxHAS_HUGE_FILES + #undef wxHAS_HUGE_STDIO_FILES + + // detect compilers which have support for huge files + #if defined(__VISUALC__) + #define wxHAS_HUGE_FILES 1 + #elif defined(__MINGW32__) || defined(__MINGW64__) + #define wxHAS_HUGE_FILES 1f + #elif defined(_LARGE_FILES) + #define wxHAS_HUGE_FILES 1 + #endif + + // detect compilers which have support for huge stdio files + #if wxCHECK_VISUALC_VERSION(8) + #define wxHAS_HUGE_STDIO_FILES + #define wxFseek _fseeki64 + #define wxFtell _ftelli64 + #elif wxCHECK_MINGW32_VERSION(3, 5) // mingw-runtime version (not gcc) + #define wxHAS_HUGE_STDIO_FILES + #define wxFseek fseeko64 + #define wxFtell ftello64 + #endif + + // other Windows compilers (DMC, Watcom, and Borland) don't have huge file + // support (or at least not all functions needed for it by wx) currently + + // types + + #ifdef wxHAS_HUGE_FILES + typedef wxLongLong_t wxFileOffset; + #define wxFileOffsetFmtSpec wxLongLongFmtSpec + #else + typedef off_t wxFileOffset; + #endif + + // at least Borland 5.5 doesn't like "struct ::stat" so don't use the scope + // resolution operator present in wxPOSIX_IDENT for it + #ifdef __BORLANDC__ + #define wxPOSIX_STRUCT(s) struct s + #else + #define wxPOSIX_STRUCT(s) struct wxPOSIX_IDENT(s) + #endif + + // Notice that Watcom is the only compiler to have a wide char + // version of struct stat as well as a wide char stat function variant. + // This was dropped since OW 1.4 "for consistency across platforms". + // + // Borland is also special in that it uses _stat with Unicode functions + // (for MSVC compatibility?) but stat with ANSI ones + #ifdef __BORLANDC__ + #if wxHAS_HUGE_FILES + #define wxStructStat struct stati64 + #else + #if wxUSE_UNICODE + #define wxStructStat struct _stat + #else + #define wxStructStat struct stat + #endif + #endif + #else // !__BORLANDC__ + #ifdef wxHAS_HUGE_FILES + #if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4) + #define wxStructStat struct _wstati64 + #else + #define wxStructStat struct _stati64 + #endif + #else + #if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4) + #define wxStructStat struct _wstat + #else + #define wxStructStat struct _stat + #endif + #endif + #endif // __BORLANDC__/!__BORLANDC__ + + + // functions + + // MSVC and compatible compilers prepend underscores to the POSIX function + // names, other compilers don't and even if their later versions usually do + // define the versions with underscores for MSVC compatibility, it's better + // to avoid using them as they're not present in earlier versions and + // always using the native functions spelling is easier than testing for + // the versions + #if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__MINGW64__) + #define wxPOSIX_IDENT(func) ::func + #else // by default assume MSVC-compatible names + #define wxPOSIX_IDENT(func) _ ## func + #define wxHAS_UNDERSCORES_IN_POSIX_IDENTS + #endif + + // first functions not working with strings, i.e. without ANSI/Unicode + // complications + #define wxClose wxPOSIX_IDENT(close) + + #define wxRead wxPOSIX_IDENT(read) + #define wxWrite wxPOSIX_IDENT(write) + + #ifdef wxHAS_HUGE_FILES + #ifndef __MINGW64__ + #define wxSeek wxPOSIX_IDENT(lseeki64) + #define wxLseek wxPOSIX_IDENT(lseeki64) + #define wxTell wxPOSIX_IDENT(telli64) + #else + // unfortunately, mingw-W64 is somewhat inconsistent... + #define wxSeek _lseeki64 + #define wxLseek _lseeki64 + #define wxTell _telli64 + #endif + #else // !wxHAS_HUGE_FILES + #define wxSeek wxPOSIX_IDENT(lseek) + #define wxLseek wxPOSIX_IDENT(lseek) + #define wxTell wxPOSIX_IDENT(tell) + #endif // wxHAS_HUGE_FILES/!wxHAS_HUGE_FILES + + #ifndef __WATCOMC__ + #if !defined(__BORLANDC__) || (__BORLANDC__ > 0x540) + // NB: this one is not POSIX and always has the underscore + #define wxFsync _commit + + // could be already defined by configure (Cygwin) + #ifndef HAVE_FSYNC + #define HAVE_FSYNC + #endif + #endif // BORLANDC + #endif + + #define wxEof wxPOSIX_IDENT(eof) + + // then the functions taking strings + + // first the ANSI versions + #define wxCRT_OpenA wxPOSIX_IDENT(open) + #define wxCRT_AccessA wxPOSIX_IDENT(access) + #define wxCRT_ChmodA wxPOSIX_IDENT(chmod) + #define wxCRT_MkDirA wxPOSIX_IDENT(mkdir) + #define wxCRT_RmDirA wxPOSIX_IDENT(rmdir) + #ifdef wxHAS_HUGE_FILES + // MinGW-64 provides underscore-less versions of all file functions + // except for this one. + #ifdef __MINGW64__ + #define wxCRT_StatA _stati64 + #else + #define wxCRT_StatA wxPOSIX_IDENT(stati64) + #endif + #else + // Unfortunately Watcom is not consistent + #if defined(__OS2__) && defined(__WATCOMC__) + #define wxCRT_StatA _stat + #else + #define wxCRT_StatA wxPOSIX_IDENT(stat) + #endif + #endif + + // then wide char ones + #if wxUSE_UNICODE + // special workaround for buggy wopen() in bcc 5.5 + #if defined(__BORLANDC__) && \ + (__BORLANDC__ >= 0x550 && __BORLANDC__ <= 0x551) + WXDLLIMPEXP_BASE int wxCRT_OpenW(const wxChar *pathname, + int flags, mode_t mode); + #else + #define wxCRT_OpenW _wopen + #endif + + #define wxCRT_AccessW _waccess + #define wxCRT_ChmodW _wchmod + #define wxCRT_MkDirW _wmkdir + #define wxCRT_RmDirW _wrmdir + #ifdef wxHAS_HUGE_FILES + #define wxCRT_StatW _wstati64 + #else + #define wxCRT_StatW _wstat + #endif + #endif // wxUSE_UNICODE + + + // finally the default char-type versions + #if wxUSE_UNICODE + #if wxUSE_UNICODE_MSLU || defined(__WX_STRICT_ANSI_GCC__) + // implement the missing file functions in Win9x ourselves + WXDLLIMPEXP_BASE int wxMSLU__wopen(const wxChar *name, + int flags, int mode); + WXDLLIMPEXP_BASE int wxMSLU__waccess(const wxChar *name, + int mode); + WXDLLIMPEXP_BASE int wxMSLU__wchmod(const wxChar *name, + int mode); + WXDLLIMPEXP_BASE int wxMSLU__wmkdir(const wxChar *name); + WXDLLIMPEXP_BASE int wxMSLU__wrmdir(const wxChar *name); + + WXDLLIMPEXP_BASE int + wxMSLU__wstat(const wxChar *name, wxStructStat *buffer); + + #define wxCRT_Open wxMSLU__wopen + + #define wxCRT_Access wxMSLU__waccess + #define wxCRT_Chmod wxMSLU__wchmod + #define wxCRT_MkDir wxMSLU__wmkdir + #define wxCRT_RmDir wxMSLU__wrmdir + #define wxCRT_Stat wxMSLU__wstat + #else // !wxUSE_UNICODE_MSLU + #define wxCRT_Open wxCRT_OpenW + #define wxCRT_Access wxCRT_AccessW + #define wxCRT_Chmod wxCRT_ChmodW + #define wxCRT_MkDir wxCRT_MkDirW + #define wxCRT_RmDir wxCRT_RmDirW + #define wxCRT_Stat wxCRT_StatW + #endif // wxUSE_UNICODE_MSLU/!wxUSE_UNICODE_MSLU + #else // !wxUSE_UNICODE + #define wxCRT_Open wxCRT_OpenA + #define wxCRT_Access wxCRT_AccessA + #define wxCRT_Chmod wxCRT_ChmodA + #define wxCRT_MkDir wxCRT_MkDirA + #define wxCRT_RmDir wxCRT_RmDirA + #define wxCRT_Stat wxCRT_StatA + #endif // wxUSE_UNICODE/!wxUSE_UNICODE + + + // constants (unless already defined by the user code) + #ifdef wxHAS_UNDERSCORES_IN_POSIX_IDENTS + #ifndef O_RDONLY + #define O_RDONLY _O_RDONLY + #define O_WRONLY _O_WRONLY + #define O_RDWR _O_RDWR + #define O_EXCL _O_EXCL + #define O_CREAT _O_CREAT + #define O_BINARY _O_BINARY + #endif + + #ifndef S_IFMT + #define S_IFMT _S_IFMT + #define S_IFDIR _S_IFDIR + #define S_IFREG _S_IFREG + #endif + #endif // wxHAS_UNDERSCORES_IN_POSIX_IDENTS + + #ifdef wxHAS_HUGE_FILES + // wxFile is present and supports large files. + #if wxUSE_FILE + #define wxHAS_LARGE_FILES + #endif + // wxFFile is present and supports large files + #if wxUSE_FFILE && defined wxHAS_HUGE_STDIO_FILES + #define wxHAS_LARGE_FFILES + #endif + #endif + + // private defines, undefine so that nobody gets tempted to use + #undef wxHAS_HUGE_FILES + #undef wxHAS_HUGE_STDIO_FILES +#else // Unix or Windows using unknown compiler, assume POSIX supported + typedef off_t wxFileOffset; + #ifdef HAVE_LARGEFILE_SUPPORT + #define wxFileOffsetFmtSpec wxLongLongFmtSpec + wxCOMPILE_TIME_ASSERT( sizeof(off_t) == sizeof(wxLongLong_t), + BadFileSizeType ); + // wxFile is present and supports large files + #if wxUSE_FILE + #define wxHAS_LARGE_FILES + #endif + // wxFFile is present and supports large files + #if wxUSE_FFILE && (SIZEOF_LONG == 8 || defined HAVE_FSEEKO) + #define wxHAS_LARGE_FFILES + #endif + #ifdef HAVE_FSEEKO + #define wxFseek fseeko + #define wxFtell ftello + #endif + #else + #define wxFileOffsetFmtSpec wxT("") + #endif + // functions + #define wxClose close + #define wxRead ::read + #define wxWrite ::write + #define wxLseek lseek + #define wxSeek lseek + #define wxFsync fsync + #define wxEof eof + #define wxCRT_MkDir mkdir + #define wxCRT_RmDir rmdir + + #define wxTell(fd) lseek(fd, 0, SEEK_CUR) + + #define wxStructStat struct stat + + #define wxCRT_Open open + #define wxCRT_Stat stat + #define wxCRT_Lstat lstat + #define wxCRT_Access access + #define wxCRT_Chmod chmod + + #define wxHAS_NATIVE_LSTAT +#endif // platforms + +// if the platform doesn't have symlinks, define wxCRT_Lstat to be the same as +// wxCRT_Stat to avoid #ifdefs in the code using it +#ifndef wxHAS_NATIVE_LSTAT + #define wxCRT_Lstat wxCRT_Stat +#endif + +// define wxFseek/wxFtell to large file versions if available (done above) or +// to fseek/ftell if not, to save ifdefs in using code +#ifndef wxFseek + #define wxFseek fseek +#endif +#ifndef wxFtell + #define wxFtell ftell +#endif + +inline int wxAccess(const wxString& path, mode_t mode) + { return wxCRT_Access(path.fn_str(), mode); } +inline int wxChmod(const wxString& path, mode_t mode) + { return wxCRT_Chmod(path.fn_str(), mode); } +inline int wxOpen(const wxString& path, int flags, mode_t mode) + { return wxCRT_Open(path.fn_str(), flags, mode); } + +// FIXME-CE: provide our own implementations of the missing CRT functions +#ifndef __WXWINCE__ +inline int wxStat(const wxString& path, wxStructStat *buf) + { return wxCRT_Stat(path.fn_str(), buf); } +inline int wxLstat(const wxString& path, wxStructStat *buf) + { return wxCRT_Lstat(path.fn_str(), buf); } +inline int wxRmDir(const wxString& path) + { return wxCRT_RmDir(path.fn_str()); } +#if (defined(__WINDOWS__) && !defined(__CYGWIN__)) \ + || (defined(__OS2__) && defined(__WATCOMC__)) +inline int wxMkDir(const wxString& path, mode_t WXUNUSED(mode) = 0) + { return wxCRT_MkDir(path.fn_str()); } +#else +inline int wxMkDir(const wxString& path, mode_t mode) + { return wxCRT_MkDir(path.fn_str(), mode); } +#endif +#endif // !__WXWINCE__ + +#ifdef O_BINARY + #define wxO_BINARY O_BINARY +#else + #define wxO_BINARY 0 +#endif + +#if defined(__VISAGECPP__) && __IBMCPP__ >= 400 +// +// VisualAge C++ V4.0 cannot have any external linkage const decs +// in headers included by more than one primary source +// +extern const int wxInvalidOffset; +#else +const int wxInvalidOffset = -1; +#endif + +// ---------------------------------------------------------------------------- +// functions +// ---------------------------------------------------------------------------- +WXDLLIMPEXP_BASE bool wxFileExists(const wxString& filename); + +// does the path exist? (may have or not '/' or '\\' at the end) +WXDLLIMPEXP_BASE bool wxDirExists(const wxString& pathName); + +WXDLLIMPEXP_BASE bool wxIsAbsolutePath(const wxString& filename); + +// Get filename +WXDLLIMPEXP_BASE wxChar* wxFileNameFromPath(wxChar *path); +WXDLLIMPEXP_BASE wxString wxFileNameFromPath(const wxString& path); + +// Get directory +WXDLLIMPEXP_BASE wxString wxPathOnly(const wxString& path); + +// all deprecated functions below are deprecated in favour of wxFileName's methods +#if WXWIN_COMPATIBILITY_2_8 + +wxDEPRECATED( WXDLLIMPEXP_BASE void wxDos2UnixFilename(char *s) ); +wxDEPRECATED( WXDLLIMPEXP_BASE void wxDos2UnixFilename(wchar_t *s) ); + +wxDEPRECATED_BUT_USED_INTERNALLY( + WXDLLIMPEXP_BASE void wxUnix2DosFilename(char *s) ); +wxDEPRECATED_BUT_USED_INTERNALLY( + WXDLLIMPEXP_BASE void wxUnix2DosFilename(wchar_t *s) ); + +// Strip the extension, in situ +// Deprecated in favour of wxFileName::StripExtension() but notice that their +// behaviour is slightly different, see the manual +wxDEPRECATED( WXDLLIMPEXP_BASE void wxStripExtension(char *buffer) ); +wxDEPRECATED( WXDLLIMPEXP_BASE void wxStripExtension(wchar_t *buffer) ); +wxDEPRECATED( WXDLLIMPEXP_BASE void wxStripExtension(wxString& buffer) ); + +// Get a temporary filename +wxDEPRECATED_BUT_USED_INTERNALLY( WXDLLIMPEXP_BASE wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = NULL) ); +wxDEPRECATED_BUT_USED_INTERNALLY( WXDLLIMPEXP_BASE bool wxGetTempFileName(const wxString& prefix, wxString& buf) ); + +// Expand file name (~/ and ${OPENWINHOME}/ stuff) +wxDEPRECATED_BUT_USED_INTERNALLY( WXDLLIMPEXP_BASE char* wxExpandPath(char *dest, const wxString& path) ); +wxDEPRECATED_BUT_USED_INTERNALLY( WXDLLIMPEXP_BASE wchar_t* wxExpandPath(wchar_t *dest, const wxString& path) ); + // DEPRECATED: use wxFileName::Normalize(wxPATH_NORM_ENV_VARS) + +// Contract w.r.t environment ( -> ${OPENWINHOME}/lib) +// and make (if under the home tree) relative to home +// [caller must copy-- volatile] +wxDEPRECATED( +WXDLLIMPEXP_BASE wxChar* wxContractPath(const wxString& filename, + const wxString& envname = wxEmptyString, + const wxString& user = wxEmptyString) ); + // DEPRECATED: use wxFileName::ReplaceEnvVariable and wxFileName::ReplaceHomeDir + +// Destructive removal of /./ and /../ stuff +wxDEPRECATED_BUT_USED_INTERNALLY( WXDLLIMPEXP_BASE char* wxRealPath(char *path) ); +wxDEPRECATED_BUT_USED_INTERNALLY( WXDLLIMPEXP_BASE wchar_t* wxRealPath(wchar_t *path) ); +wxDEPRECATED_BUT_USED_INTERNALLY( WXDLLIMPEXP_BASE wxString wxRealPath(const wxString& path) ); + // DEPRECATED: use wxFileName::Normalize instead + +// Allocate a copy of the full absolute path +wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* wxCopyAbsolutePath(const wxString& path) ); + // DEPRECATED: use wxFileName::MakeAbsolute instead +#endif + +// Get first file name matching given wild card. +// Flags are reserved for future use. +#define wxFILE 1 +#define wxDIR 2 +WXDLLIMPEXP_BASE wxString wxFindFirstFile(const wxString& spec, int flags = wxFILE); +WXDLLIMPEXP_BASE wxString wxFindNextFile(); + +// Does the pattern contain wildcards? +WXDLLIMPEXP_BASE bool wxIsWild(const wxString& pattern); + +// Does the pattern match the text (usually a filename)? +// If dot_special is true, doesn't match * against . (eliminating +// `hidden' dot files) +WXDLLIMPEXP_BASE bool wxMatchWild(const wxString& pattern, const wxString& text, bool dot_special = true); + +// Concatenate two files to form third +WXDLLIMPEXP_BASE bool wxConcatFiles(const wxString& file1, const wxString& file2, const wxString& file3); + +// Copy file1 to file2 +WXDLLIMPEXP_BASE bool wxCopyFile(const wxString& file1, const wxString& file2, + bool overwrite = true); + +// Remove file +WXDLLIMPEXP_BASE bool wxRemoveFile(const wxString& file); + +// Rename file +WXDLLIMPEXP_BASE bool wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite = true); + +// Get current working directory. +#if WXWIN_COMPATIBILITY_2_6 +// If buf is NULL, allocates space using new, else +// copies into buf. +// IMPORTANT NOTE getcwd is know not to work under some releases +// of Win32s 1.3, according to MS release notes! +wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* wxGetWorkingDirectory(wxChar *buf = NULL, int sz = 1000) ); +// new and preferred version of wxGetWorkingDirectory +// NB: can't have the same name because of overloading ambiguity +#endif // WXWIN_COMPATIBILITY_2_6 +WXDLLIMPEXP_BASE wxString wxGetCwd(); + +// Set working directory +WXDLLIMPEXP_BASE bool wxSetWorkingDirectory(const wxString& d); + +// Make directory +WXDLLIMPEXP_BASE bool wxMkdir(const wxString& dir, int perm = wxS_DIR_DEFAULT); + +// Remove directory. Flags reserved for future use. +WXDLLIMPEXP_BASE bool wxRmdir(const wxString& dir, int flags = 0); + +// Return the type of an open file +WXDLLIMPEXP_BASE wxFileKind wxGetFileKind(int fd); +WXDLLIMPEXP_BASE wxFileKind wxGetFileKind(FILE *fp); + +#if WXWIN_COMPATIBILITY_2_6 +// compatibility defines, don't use in new code +wxDEPRECATED( inline bool wxPathExists(const wxChar *pszPathName) ); +inline bool wxPathExists(const wxChar *pszPathName) +{ + return wxDirExists(pszPathName); +} +#endif //WXWIN_COMPATIBILITY_2_6 + +// permissions; these functions work both on files and directories: +WXDLLIMPEXP_BASE bool wxIsWritable(const wxString &path); +WXDLLIMPEXP_BASE bool wxIsReadable(const wxString &path); +WXDLLIMPEXP_BASE bool wxIsExecutable(const wxString &path); + +// ---------------------------------------------------------------------------- +// separators in file names +// ---------------------------------------------------------------------------- + +// between file name and extension +#define wxFILE_SEP_EXT wxT('.') + +// between drive/volume name and the path +#define wxFILE_SEP_DSK wxT(':') + +// between the path components +#define wxFILE_SEP_PATH_DOS wxT('\\') +#define wxFILE_SEP_PATH_UNIX wxT('/') +#define wxFILE_SEP_PATH_MAC wxT(':') +#define wxFILE_SEP_PATH_VMS wxT('.') // VMS also uses '[' and ']' + +// separator in the path list (as in PATH environment variable) +// there is no PATH variable in Classic Mac OS so just use the +// semicolon (it must be different from the file name separator) +// NB: these are strings and not characters on purpose! +#define wxPATH_SEP_DOS wxT(";") +#define wxPATH_SEP_UNIX wxT(":") +#define wxPATH_SEP_MAC wxT(";") + +// platform independent versions +#if defined(__UNIX__) && !defined(__OS2__) + // CYGWIN also uses UNIX settings + #define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX + #define wxPATH_SEP wxPATH_SEP_UNIX +#elif defined(__MAC__) + #define wxFILE_SEP_PATH wxFILE_SEP_PATH_MAC + #define wxPATH_SEP wxPATH_SEP_MAC +#else // Windows and OS/2 + #define wxFILE_SEP_PATH wxFILE_SEP_PATH_DOS + #define wxPATH_SEP wxPATH_SEP_DOS +#endif // Unix/Windows + +// this is useful for wxString::IsSameAs(): to compare two file names use +// filename1.IsSameAs(filename2, wxARE_FILENAMES_CASE_SENSITIVE) +#if defined(__UNIX__) && !defined(__DARWIN__) && !defined(__OS2__) + #define wxARE_FILENAMES_CASE_SENSITIVE true +#else // Windows, Mac OS and OS/2 + #define wxARE_FILENAMES_CASE_SENSITIVE false +#endif // Unix/Windows + +// is the char a path separator? +inline bool wxIsPathSeparator(wxChar c) +{ + // under DOS/Windows we should understand both Unix and DOS file separators +#if ( defined(__UNIX__) && !defined(__OS2__) )|| defined(__MAC__) + return c == wxFILE_SEP_PATH; +#else + return c == wxFILE_SEP_PATH_DOS || c == wxFILE_SEP_PATH_UNIX; +#endif +} + +// does the string ends with path separator? +WXDLLIMPEXP_BASE bool wxEndsWithPathSeparator(const wxString& filename); + +#if WXWIN_COMPATIBILITY_2_8 +// split the full path into path (including drive for DOS), name and extension +// (understands both '/' and '\\') +// Deprecated in favour of wxFileName::SplitPath +wxDEPRECATED( WXDLLIMPEXP_BASE void wxSplitPath(const wxString& fileName, + wxString *pstrPath, + wxString *pstrName, + wxString *pstrExt) ); +#endif + +// find a file in a list of directories, returns false if not found +WXDLLIMPEXP_BASE bool wxFindFileInPath(wxString *pStr, const wxString& szPath, const wxString& szFile); + +// Get the OS directory if appropriate (such as the Windows directory). +// On non-Windows platform, probably just return the empty string. +WXDLLIMPEXP_BASE wxString wxGetOSDirectory(); + +#if wxUSE_DATETIME + +// Get file modification time +WXDLLIMPEXP_BASE time_t wxFileModificationTime(const wxString& filename); + +#endif // wxUSE_DATETIME + +// Parses the wildCard, returning the number of filters. +// Returns 0 if none or if there's a problem, +// The arrays will contain an equal number of items found before the error. +// wildCard is in the form: +// "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png" +WXDLLIMPEXP_BASE int wxParseCommonDialogsFilter(const wxString& wildCard, wxArrayString& descriptions, wxArrayString& filters); + +// ---------------------------------------------------------------------------- +// classes +// ---------------------------------------------------------------------------- + +#ifdef __UNIX__ + +// set umask to the given value in ctor and reset it to the old one in dtor +class WXDLLIMPEXP_BASE wxUmaskChanger +{ +public: + // change the umask to the given one if it is not -1: this allows to write + // the same code whether you really want to change umask or not, as is in + // wxFileConfig::Flush() for example + wxUmaskChanger(int umaskNew) + { + m_umaskOld = umaskNew == -1 ? -1 : (int)umask((mode_t)umaskNew); + } + + ~wxUmaskChanger() + { + if ( m_umaskOld != -1 ) + umask((mode_t)m_umaskOld); + } + +private: + int m_umaskOld; +}; + +// this macro expands to an "anonymous" wxUmaskChanger object under Unix and +// nothing elsewhere +#define wxCHANGE_UMASK(m) wxUmaskChanger wxMAKE_UNIQUE_NAME(umaskChanger_)(m) + +#else // !__UNIX__ + +#define wxCHANGE_UMASK(m) + +#endif // __UNIX__/!__UNIX__ + + +// Path searching +class WXDLLIMPEXP_BASE wxPathList : public wxArrayString +{ +public: + wxPathList() {} + wxPathList(const wxArrayString &arr) + { Add(arr); } + + // Adds all paths in environment variable + void AddEnvList(const wxString& envVariable); + + // Adds given path to this list + bool Add(const wxString& path); + void Add(const wxArrayString &paths); + + // Find the first full path for which the file exists + wxString FindValidPath(const wxString& filename) const; + + // Find the first full path for which the file exists; ensure it's an + // absolute path that gets returned. + wxString FindAbsoluteValidPath(const wxString& filename) const; + + // Given full path and filename, add path to list + bool EnsureFileAccessible(const wxString& path); + +#if WXWIN_COMPATIBILITY_2_6 + // Returns true if the path is in the list + wxDEPRECATED( bool Member(const wxString& path) const ); +#endif +}; + +#endif // _WX_FILEFN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/filehistory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filehistory.h new file mode 100644 index 0000000000..b6cb1cb501 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filehistory.h @@ -0,0 +1,113 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/filehistory.h +// Purpose: wxFileHistory class +// Author: Julian Smart, Vaclav Slavik +// Created: 2010-05-03 +// Copyright: (c) Julian Smart, Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILEHISTORY_H_ +#define _WX_FILEHISTORY_H_ + +#include "wx/defs.h" + +#if wxUSE_FILE_HISTORY + +#include "wx/windowid.h" +#include "wx/object.h" +#include "wx/list.h" +#include "wx/string.h" +#include "wx/arrstr.h" + +class WXDLLIMPEXP_FWD_CORE wxMenu; +class WXDLLIMPEXP_FWD_BASE wxConfigBase; +class WXDLLIMPEXP_FWD_BASE wxFileName; + +// ---------------------------------------------------------------------------- +// File history management +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileHistoryBase : public wxObject +{ +public: + wxFileHistoryBase(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1); + + // Operations + virtual void AddFileToHistory(const wxString& file); + virtual void RemoveFileFromHistory(size_t i); + virtual int GetMaxFiles() const { return (int)m_fileMaxFiles; } + virtual void UseMenu(wxMenu *menu); + + // Remove menu from the list (MDI child may be closing) + virtual void RemoveMenu(wxMenu *menu); + +#if wxUSE_CONFIG + virtual void Load(const wxConfigBase& config); + virtual void Save(wxConfigBase& config); +#endif // wxUSE_CONFIG + + virtual void AddFilesToMenu(); + virtual void AddFilesToMenu(wxMenu* menu); // Single menu + + // Accessors + virtual wxString GetHistoryFile(size_t i) const { return m_fileHistory[i]; } + virtual size_t GetCount() const { return m_fileHistory.GetCount(); } + + const wxList& GetMenus() const { return m_fileMenus; } + + // Set/get base id + void SetBaseId(wxWindowID baseId) { m_idBase = baseId; } + wxWindowID GetBaseId() const { return m_idBase; } + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated, use GetCount() instead + wxDEPRECATED( size_t GetNoHistoryFiles() const ); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + // Last n files + wxArrayString m_fileHistory; + + // Menus to maintain (may need several for an MDI app) + wxList m_fileMenus; + + // Max files to maintain + size_t m_fileMaxFiles; + +private: + // The ID of the first history menu item (Doesn't have to be wxID_FILE1) + wxWindowID m_idBase; + + // Normalize a file name to canonical form. We have a special function for + // this to ensure the same normalization is used everywhere. + static wxString NormalizeFileName(const wxFileName& filename); + + wxDECLARE_NO_COPY_CLASS(wxFileHistoryBase); +}; + +#if WXWIN_COMPATIBILITY_2_6 +inline size_t wxFileHistoryBase::GetNoHistoryFiles() const +{ + return m_fileHistory.GetCount(); +} +#endif // WXWIN_COMPATIBILITY_2_6 + + +#if defined(__WXGTK20__) + #include "wx/gtk/filehistory.h" +#else + // no platform-specific implementation of wxFileHistory yet + class WXDLLIMPEXP_CORE wxFileHistory : public wxFileHistoryBase + { + public: + wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1) + : wxFileHistoryBase(maxFiles, idBase) {} + + DECLARE_DYNAMIC_CLASS(wxFileHistory) + }; +#endif + +#endif // wxUSE_FILE_HISTORY + +#endif // _WX_FILEHISTORY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/filename.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filename.h new file mode 100644 index 0000000000..1a16e14050 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filename.h @@ -0,0 +1,645 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/filename.h +// Purpose: wxFileName - encapsulates a file path +// Author: Robert Roebling, Vadim Zeitlin +// Modified by: +// Created: 28.12.00 +// Copyright: (c) 2000 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILENAME_H_ +#define _WX_FILENAME_H_ + +#include "wx/arrstr.h" +#include "wx/filefn.h" +#include "wx/datetime.h" +#include "wx/intl.h" +#include "wx/longlong.h" +#include "wx/file.h" + +#if wxUSE_FILE +class WXDLLIMPEXP_FWD_BASE wxFile; +#endif + +#if wxUSE_FFILE +class WXDLLIMPEXP_FWD_BASE wxFFile; +#endif + +// this symbol is defined for the platforms where file systems use volumes in +// paths +#if defined(__WINDOWS__) || defined(__DOS__) || defined(__OS2__) + #define wxHAS_FILESYSTEM_VOLUMES +#endif + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// the various values for the path format: this mainly affects the path +// separator but also whether or not the path has the drive part (as under +// Windows) +enum wxPathFormat +{ + wxPATH_NATIVE = 0, // the path format for the current platform + wxPATH_UNIX, + wxPATH_BEOS = wxPATH_UNIX, + wxPATH_MAC, + wxPATH_DOS, + wxPATH_WIN = wxPATH_DOS, + wxPATH_OS2 = wxPATH_DOS, + wxPATH_VMS, + + wxPATH_MAX // Not a valid value for specifying path format +}; + +// different conventions that may be used with GetHumanReadableSize() +enum wxSizeConvention +{ + wxSIZE_CONV_TRADITIONAL, // 1024 bytes = 1 KB + wxSIZE_CONV_IEC, // 1024 bytes = 1 KiB + wxSIZE_CONV_SI // 1000 bytes = 1 KB +}; + +// the kind of normalization to do with the file name: these values can be +// or'd together to perform several operations at once +enum wxPathNormalize +{ + wxPATH_NORM_ENV_VARS = 0x0001, // replace env vars with their values + wxPATH_NORM_DOTS = 0x0002, // squeeze all .. and . + wxPATH_NORM_TILDE = 0x0004, // Unix only: replace ~ and ~user + wxPATH_NORM_CASE = 0x0008, // if case insensitive => tolower + wxPATH_NORM_ABSOLUTE = 0x0010, // make the path absolute + wxPATH_NORM_LONG = 0x0020, // make the path the long form + wxPATH_NORM_SHORTCUT = 0x0040, // resolve the shortcut, if it is a shortcut + wxPATH_NORM_ALL = 0x00ff & ~wxPATH_NORM_CASE +}; + +// what exactly should GetPath() return? +enum +{ + wxPATH_NO_SEPARATOR = 0x0000, // for symmetry with wxPATH_GET_SEPARATOR + wxPATH_GET_VOLUME = 0x0001, // include the volume if applicable + wxPATH_GET_SEPARATOR = 0x0002 // terminate the path with the separator +}; + +// Mkdir flags +enum +{ + wxPATH_MKDIR_FULL = 0x0001 // create directories recursively +}; + +// Rmdir flags +enum +{ + wxPATH_RMDIR_FULL = 0x0001, // delete with subdirectories if empty + wxPATH_RMDIR_RECURSIVE = 0x0002 // delete all recursively (dangerous!) +}; + +// FileExists flags +enum +{ + wxFILE_EXISTS_REGULAR = 0x0001, // check for existence of a regular file + wxFILE_EXISTS_DIR = 0x0002, // check for existence of a directory + wxFILE_EXISTS_SYMLINK = 0x1004, // check for existence of a symbolic link; + // also sets wxFILE_EXISTS_NO_FOLLOW as + // it would never be satisfied otherwise + wxFILE_EXISTS_DEVICE = 0x0008, // check for existence of a device + wxFILE_EXISTS_FIFO = 0x0016, // check for existence of a FIFO + wxFILE_EXISTS_SOCKET = 0x0032, // check for existence of a socket + // gap for future types + wxFILE_EXISTS_NO_FOLLOW = 0x1000, // don't dereference a contained symlink + wxFILE_EXISTS_ANY = 0x1FFF // check for existence of anything +}; + +#if wxUSE_LONGLONG +// error code of wxFileName::GetSize() +extern WXDLLIMPEXP_DATA_BASE(const wxULongLong) wxInvalidSize; +#endif // wxUSE_LONGLONG + + + +// ---------------------------------------------------------------------------- +// wxFileName: encapsulates a file path +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFileName +{ +public: + // constructors and assignment + + // the usual stuff + wxFileName() { Clear(); } + wxFileName(const wxFileName& filepath) { Assign(filepath); } + + // from a full filename: if it terminates with a '/', a directory path + // is contructed (the name will be empty), otherwise a file name and + // extension are extracted from it + wxFileName( const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE ) + { Assign( fullpath, format ); m_dontFollowLinks = false; } + + // from a directory name and a file name + wxFileName(const wxString& path, + const wxString& name, + wxPathFormat format = wxPATH_NATIVE) + { Assign(path, name, format); m_dontFollowLinks = false; } + + // from a volume, directory name, file base name and extension + wxFileName(const wxString& volume, + const wxString& path, + const wxString& name, + const wxString& ext, + wxPathFormat format = wxPATH_NATIVE) + { Assign(volume, path, name, ext, format); m_dontFollowLinks = false; } + + // from a directory name, file base name and extension + wxFileName(const wxString& path, + const wxString& name, + const wxString& ext, + wxPathFormat format = wxPATH_NATIVE) + { Assign(path, name, ext, format); m_dontFollowLinks = false; } + + // the same for delayed initialization + + void Assign(const wxFileName& filepath); + + void Assign(const wxString& fullpath, + wxPathFormat format = wxPATH_NATIVE); + + void Assign(const wxString& volume, + const wxString& path, + const wxString& name, + const wxString& ext, + bool hasExt, + wxPathFormat format = wxPATH_NATIVE); + + void Assign(const wxString& volume, + const wxString& path, + const wxString& name, + const wxString& ext, + wxPathFormat format = wxPATH_NATIVE) + { Assign(volume, path, name, ext, !ext.empty(), format); } + + void Assign(const wxString& path, + const wxString& name, + wxPathFormat format = wxPATH_NATIVE); + + void Assign(const wxString& path, + const wxString& name, + const wxString& ext, + wxPathFormat format = wxPATH_NATIVE); + + void AssignDir(const wxString& dir, wxPathFormat format = wxPATH_NATIVE); + + // assorted assignment operators + + wxFileName& operator=(const wxFileName& filename) + { if (this != &filename) Assign(filename); return *this; } + + wxFileName& operator=(const wxString& filename) + { Assign(filename); return *this; } + + // reset all components to default, uninitialized state + void Clear(); + + // static pseudo constructors + static wxFileName FileName(const wxString& file, + wxPathFormat format = wxPATH_NATIVE); + static wxFileName DirName(const wxString& dir, + wxPathFormat format = wxPATH_NATIVE); + + // file tests + + // is the filename valid at all? + bool IsOk() const + { + // we're fine if we have the path or the name or if we're a root dir + return m_dirs.size() != 0 || !m_name.empty() || !m_relative || + !m_ext.empty() || m_hasExt; + } + + // does the file with this name exist? + bool FileExists() const; + static bool FileExists( const wxString &file ); + + // does the directory with this name exist? + bool DirExists() const; + static bool DirExists( const wxString &dir ); + + // does anything at all with this name (i.e. file, directory or some + // other file system object such as a device, socket, ...) exist? + bool Exists(int flags = wxFILE_EXISTS_ANY) const; + static bool Exists(const wxString& path, int flags = wxFILE_EXISTS_ANY); + + + // checks on most common flags for files/directories; + // more platform-specific features (like e.g. Unix permissions) are not + // available in wxFileName + + bool IsDirWritable() const { return wxIsWritable(GetPath()); } + static bool IsDirWritable(const wxString &path) { return wxDirExists(path) && wxIsWritable(path); } + + bool IsDirReadable() const { return wxIsReadable(GetPath()); } + static bool IsDirReadable(const wxString &path) { return wxDirExists(path) && wxIsReadable(path); } + + // NOTE: IsDirExecutable() is not present because the meaning of "executable" + // directory is very platform-dependent and also not so useful + + bool IsFileWritable() const { return wxIsWritable(GetFullPath()); } + static bool IsFileWritable(const wxString &path) { return wxFileExists(path) && wxIsWritable(path); } + + bool IsFileReadable() const { return wxIsReadable(GetFullPath()); } + static bool IsFileReadable(const wxString &path) { return wxFileExists(path) && wxIsReadable(path); } + + bool IsFileExecutable() const { return wxIsExecutable(GetFullPath()); } + static bool IsFileExecutable(const wxString &path) { return wxFileExists(path) && wxIsExecutable(path); } + + // set the file permissions to a combination of wxPosixPermissions enum + // values + bool SetPermissions(int permissions); + + + // time functions +#if wxUSE_DATETIME + // set the file last access/mod and creation times + // (any of the pointers may be NULL) + bool SetTimes(const wxDateTime *dtAccess, + const wxDateTime *dtMod, + const wxDateTime *dtCreate) const; + + // set the access and modification times to the current moment + bool Touch() const; + + // return the last access, last modification and create times + // (any of the pointers may be NULL) + bool GetTimes(wxDateTime *dtAccess, + wxDateTime *dtMod, + wxDateTime *dtCreate) const; + + // convenience wrapper: get just the last mod time of the file + wxDateTime GetModificationTime() const + { + wxDateTime dtMod; + (void)GetTimes(NULL, &dtMod, NULL); + return dtMod; + } +#endif // wxUSE_DATETIME + +#if defined( __WXOSX_MAC__ ) && wxOSX_USE_CARBON + bool MacSetTypeAndCreator( wxUint32 type , wxUint32 creator ) ; + bool MacGetTypeAndCreator( wxUint32 *type , wxUint32 *creator ) const; + // gets the 'common' type and creator for a certain extension + static bool MacFindDefaultTypeAndCreator( const wxString& ext , wxUint32 *type , wxUint32 *creator ) ; + // registers application defined extensions and their default type and creator + static void MacRegisterDefaultTypeAndCreator( const wxString& ext , wxUint32 type , wxUint32 creator ) ; + // looks up the appropriate type and creator from the registration and then sets + bool MacSetDefaultTypeAndCreator() ; +#endif + + // various file/dir operations + + // retrieve the value of the current working directory + void AssignCwd(const wxString& volume = wxEmptyString); + static wxString GetCwd(const wxString& volume = wxEmptyString); + + // change the current working directory + bool SetCwd() const; + static bool SetCwd( const wxString &cwd ); + + // get the value of user home (Unix only mainly) + void AssignHomeDir(); + static wxString GetHomeDir(); + + // get the system temporary directory + static wxString GetTempDir(); + +#if wxUSE_FILE || wxUSE_FFILE + // get a temp file name starting with the specified prefix + void AssignTempFileName(const wxString& prefix); + static wxString CreateTempFileName(const wxString& prefix); +#endif // wxUSE_FILE + +#if wxUSE_FILE + // get a temp file name starting with the specified prefix and open the + // file passed to us using this name for writing (atomically if + // possible) + void AssignTempFileName(const wxString& prefix, wxFile *fileTemp); + static wxString CreateTempFileName(const wxString& prefix, + wxFile *fileTemp); +#endif // wxUSE_FILE + +#if wxUSE_FFILE + // get a temp file name starting with the specified prefix and open the + // file passed to us using this name for writing (atomically if + // possible) + void AssignTempFileName(const wxString& prefix, wxFFile *fileTemp); + static wxString CreateTempFileName(const wxString& prefix, + wxFFile *fileTemp); +#endif // wxUSE_FFILE + + // directory creation and removal. + bool Mkdir(int perm = wxS_DIR_DEFAULT, int flags = 0) const; + static bool Mkdir(const wxString &dir, int perm = wxS_DIR_DEFAULT, + int flags = 0); + + bool Rmdir(int flags = 0) const; + static bool Rmdir(const wxString &dir, int flags = 0); + + // operations on the path + + // normalize the path: with the default flags value, the path will be + // made absolute, without any ".." and "." and all environment + // variables will be expanded in it + // + // this may be done using another (than current) value of cwd + bool Normalize(int flags = wxPATH_NORM_ALL, + const wxString& cwd = wxEmptyString, + wxPathFormat format = wxPATH_NATIVE); + + // get a path path relative to the given base directory, i.e. opposite + // of Normalize + // + // pass an empty string to get a path relative to the working directory + // + // returns true if the file name was modified, false if we failed to do + // anything with it (happens when the file is on a different volume, + // for example) + bool MakeRelativeTo(const wxString& pathBase = wxEmptyString, + wxPathFormat format = wxPATH_NATIVE); + + // make the path absolute + // + // this may be done using another (than current) value of cwd + bool MakeAbsolute(const wxString& cwd = wxEmptyString, + wxPathFormat format = wxPATH_NATIVE) + { return Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_ABSOLUTE | + wxPATH_NORM_TILDE, cwd, format); } + + + // If the path is a symbolic link (Unix-only), indicate that all + // filesystem operations on this path should be performed on the link + // itself and not on the file it points to, as is the case by default. + // + // No effect if this is not a symbolic link. + void DontFollowLink() + { + m_dontFollowLinks = true; + } + + // If the path is a symbolic link (Unix-only), returns whether various + // file operations should act on the link itself, or on its target. + // + // This does not test if the path is really a symlink or not. + bool ShouldFollowLink() const + { + return !m_dontFollowLinks; + } + +#if defined(__WIN32__) && !defined(__WXWINCE__) && wxUSE_OLE + // if the path is a shortcut, return the target and optionally, + // the arguments + bool GetShortcutTarget(const wxString& shortcutPath, + wxString& targetFilename, + wxString* arguments = NULL) const; +#endif + +#ifndef __WXWINCE__ + // if the path contains the value of the environment variable named envname + // then this function replaces it with the string obtained from + // wxString::Format(replacementFmtString, value_of_envname_variable) + // + // Example: + // wxFileName fn("/usr/openwin/lib/someFile"); + // fn.ReplaceEnvVariable("OPENWINHOME"); + // // now fn.GetFullPath() == "$OPENWINHOME/lib/someFile" + bool ReplaceEnvVariable(const wxString& envname, + const wxString& replacementFmtString = "$%s", + wxPathFormat format = wxPATH_NATIVE); +#endif + + // replaces, if present in the path, the home directory for the given user + // (see wxGetHomeDir) with a tilde + bool ReplaceHomeDir(wxPathFormat format = wxPATH_NATIVE); + + + // Comparison + + // compares with the rules of the given platforms format + bool SameAs(const wxFileName& filepath, + wxPathFormat format = wxPATH_NATIVE) const; + + // compare with another filename object + bool operator==(const wxFileName& filename) const + { return SameAs(filename); } + bool operator!=(const wxFileName& filename) const + { return !SameAs(filename); } + + // compare with a filename string interpreted as a native file name + bool operator==(const wxString& filename) const + { return SameAs(wxFileName(filename)); } + bool operator!=(const wxString& filename) const + { return !SameAs(wxFileName(filename)); } + + // are the file names of this type cases sensitive? + static bool IsCaseSensitive( wxPathFormat format = wxPATH_NATIVE ); + + // is this filename absolute? + bool IsAbsolute(wxPathFormat format = wxPATH_NATIVE) const; + + // is this filename relative? + bool IsRelative(wxPathFormat format = wxPATH_NATIVE) const + { return !IsAbsolute(format); } + + // Returns the characters that aren't allowed in filenames + // on the specified platform. + static wxString GetForbiddenChars(wxPathFormat format = wxPATH_NATIVE); + + // Information about path format + + // get the string separating the volume from the path for this format, + // return an empty string if this format doesn't support the notion of + // volumes at all + static wxString GetVolumeSeparator(wxPathFormat format = wxPATH_NATIVE); + + // get the string of path separators for this format + static wxString GetPathSeparators(wxPathFormat format = wxPATH_NATIVE); + + // get the string of path terminators, i.e. characters which terminate the + // path + static wxString GetPathTerminators(wxPathFormat format = wxPATH_NATIVE); + + // get the canonical path separator for this format + static wxUniChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE) + { return GetPathSeparators(format)[0u]; } + + // is the char a path separator for this format? + static bool IsPathSeparator(wxChar ch, wxPathFormat format = wxPATH_NATIVE); + + // is this is a DOS path which beings with a windows unique volume name + // ('\\?\Volume{guid}\')? + static bool IsMSWUniqueVolumeNamePath(const wxString& path, + wxPathFormat format = wxPATH_NATIVE); + + // Dir accessors + size_t GetDirCount() const { return m_dirs.size(); } + bool AppendDir(const wxString& dir); + void PrependDir(const wxString& dir); + bool InsertDir(size_t before, const wxString& dir); + void RemoveDir(size_t pos); + void RemoveLastDir() { RemoveDir(GetDirCount() - 1); } + + // Other accessors + void SetExt( const wxString &ext ) { m_ext = ext; m_hasExt = !m_ext.empty(); } + void ClearExt() { m_ext.clear(); m_hasExt = false; } + void SetEmptyExt() { m_ext.clear(); m_hasExt = true; } + wxString GetExt() const { return m_ext; } + bool HasExt() const { return m_hasExt; } + + void SetName( const wxString &name ) { m_name = name; } + wxString GetName() const { return m_name; } + bool HasName() const { return !m_name.empty(); } + + void SetVolume( const wxString &volume ) { m_volume = volume; } + wxString GetVolume() const { return m_volume; } + bool HasVolume() const { return !m_volume.empty(); } + + // full name is the file name + extension (but without the path) + void SetFullName(const wxString& fullname); + wxString GetFullName() const; + + const wxArrayString& GetDirs() const { return m_dirs; } + + // flags are combination of wxPATH_GET_XXX flags + wxString GetPath(int flags = wxPATH_GET_VOLUME, + wxPathFormat format = wxPATH_NATIVE) const; + + // Replace current path with this one + void SetPath( const wxString &path, wxPathFormat format = wxPATH_NATIVE ); + + // Construct full path with name and ext + wxString GetFullPath( wxPathFormat format = wxPATH_NATIVE ) const; + + // Return the short form of the path (returns identity on non-Windows platforms) + wxString GetShortPath() const; + + // Return the long form of the path (returns identity on non-Windows platforms) + wxString GetLongPath() const; + + // Is this a file or directory (not necessarily an existing one) + bool IsDir() const { return m_name.empty() && m_ext.empty(); } + + // various helpers + + // get the canonical path format for this platform + static wxPathFormat GetFormat( wxPathFormat format = wxPATH_NATIVE ); + + // split a fullpath into the volume, path, (base) name and extension + // (all of the pointers can be NULL) + static void SplitPath(const wxString& fullpath, + wxString *volume, + wxString *path, + wxString *name, + wxString *ext, + bool *hasExt = NULL, + wxPathFormat format = wxPATH_NATIVE); + + static void SplitPath(const wxString& fullpath, + wxString *volume, + wxString *path, + wxString *name, + wxString *ext, + wxPathFormat format) + { + SplitPath(fullpath, volume, path, name, ext, NULL, format); + } + + // compatibility version: volume is part of path + static void SplitPath(const wxString& fullpath, + wxString *path, + wxString *name, + wxString *ext, + wxPathFormat format = wxPATH_NATIVE); + + // split a path into volume and pure path part + static void SplitVolume(const wxString& fullpathWithVolume, + wxString *volume, + wxString *path, + wxPathFormat format = wxPATH_NATIVE); + + // strip the file extension: "foo.bar" => "foo" (but ".baz" => ".baz") + static wxString StripExtension(const wxString& fullpath); + +#ifdef wxHAS_FILESYSTEM_VOLUMES + // return the string representing a file system volume, or drive + static wxString GetVolumeString(char drive, int flags = wxPATH_GET_SEPARATOR); +#endif // wxHAS_FILESYSTEM_VOLUMES + + // File size + +#if wxUSE_LONGLONG + // returns the size of the given filename + wxULongLong GetSize() const; + static wxULongLong GetSize(const wxString &file); + + // returns the size in a human readable form + wxString + GetHumanReadableSize(const wxString& nullsize = wxGetTranslation("Not available"), + int precision = 1, + wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL) const; + static wxString + GetHumanReadableSize(const wxULongLong& sz, + const wxString& nullsize = wxGetTranslation("Not available"), + int precision = 1, + wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL); +#endif // wxUSE_LONGLONG + + + // deprecated methods, don't use any more + // -------------------------------------- + +#ifndef __DIGITALMARS__ + wxString GetPath( bool withSep, wxPathFormat format = wxPATH_NATIVE ) const + { return GetPath(withSep ? wxPATH_GET_SEPARATOR : 0, format); } +#endif + wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE ) const + { return GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR, format); } + +private: + // check whether this dir is valid for Append/Prepend/InsertDir() + static bool IsValidDirComponent(const wxString& dir); + + // the drive/volume/device specification (always empty for Unix) + wxString m_volume; + + // the path components of the file + wxArrayString m_dirs; + + // the file name and extension (empty for directories) + wxString m_name, + m_ext; + + // when m_dirs is empty it may mean either that we have no path at all or + // that our path is '/', i.e. the root directory + // + // we use m_relative to distinguish between these two cases, it will be + // true in the former and false in the latter + // + // NB: the path is not absolute just because m_relative is false, it still + // needs the drive (i.e. volume) in some formats (Windows) + bool m_relative; + + // when m_ext is empty, it may be because we don't have any extension or + // because we have an empty extension + // + // the difference is important as file with name "foo" and without + // extension has full name "foo" while with empty extension it is "foo." + bool m_hasExt; + + // by default, symlinks are dereferenced but this flag can be set with + // DontFollowLink() to change this and make different operations work on + // this file path itself instead of the target of the symlink + bool m_dontFollowLinks; +}; + +#endif // _WX_FILENAME_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/filepicker.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filepicker.h new file mode 100644 index 0000000000..5264ddb3ea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filepicker.h @@ -0,0 +1,420 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/filepicker.h +// Purpose: wxFilePickerCtrl, wxDirPickerCtrl base header +// Author: Francesco Montorsi +// Modified by: +// Created: 14/4/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILEDIRPICKER_H_BASE_ +#define _WX_FILEDIRPICKER_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL + +#include "wx/pickerbase.h" +#include "wx/filename.h" + +class WXDLLIMPEXP_FWD_CORE wxDialog; +class WXDLLIMPEXP_FWD_CORE wxFileDirPickerEvent; + +extern WXDLLIMPEXP_DATA_CORE(const char) wxFilePickerWidgetLabel[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxFilePickerWidgetNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxFilePickerCtrlNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxFileSelectorPromptStr[]; + +extern WXDLLIMPEXP_DATA_CORE(const char) wxDirPickerWidgetLabel[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxDirPickerWidgetNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxDirPickerCtrlNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxDirSelectorPromptStr[]; + +// ---------------------------------------------------------------------------- +// wxFileDirPickerEvent: used by wxFilePickerCtrl and wxDirPickerCtrl only +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDirPickerEvent : public wxCommandEvent +{ +public: + wxFileDirPickerEvent() {} + wxFileDirPickerEvent(wxEventType type, wxObject *generator, int id, const wxString &path) + : wxCommandEvent(type, id), + m_path(path) + { + SetEventObject(generator); + } + + wxString GetPath() const { return m_path; } + void SetPath(const wxString &p) { m_path = p; } + + // default copy ctor, assignment operator and dtor are ok + virtual wxEvent *Clone() const { return new wxFileDirPickerEvent(*this); } + +private: + wxString m_path; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFileDirPickerEvent) +}; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRPICKER_CHANGED, wxFileDirPickerEvent ); + +// ---------------------------------------------------------------------------- +// event types and macros +// ---------------------------------------------------------------------------- + +typedef void (wxEvtHandler::*wxFileDirPickerEventFunction)(wxFileDirPickerEvent&); + +#define wxFileDirPickerEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxFileDirPickerEventFunction, func) + +#define EVT_FILEPICKER_CHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_FILEPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn)) +#define EVT_DIRPICKER_CHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_DIRPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn)) + +// ---------------------------------------------------------------------------- +// wxFileDirPickerWidgetBase: a generic abstract interface which must be +// implemented by controls used by wxFileDirPickerCtrlBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDirPickerWidgetBase +{ +public: + wxFileDirPickerWidgetBase() { } + virtual ~wxFileDirPickerWidgetBase() { } + + // Path here is the name of the selected file or directory. + wxString GetPath() const { return m_path; } + virtual void SetPath(const wxString &str) { m_path=str; } + + // Set the directory to open the file browse dialog at initially. + virtual void SetInitialDirectory(const wxString& dir) = 0; + + // returns the picker widget cast to wxControl + virtual wxControl *AsControl() = 0; + +protected: + virtual void UpdateDialogPath(wxDialog *) = 0; + virtual void UpdatePathFromDialog(wxDialog *) = 0; + + wxString m_path; +}; + +// Styles which must be supported by all controls implementing wxFileDirPickerWidgetBase +// NB: these styles must be defined to carefully-chosen values to +// avoid conflicts with wxButton's styles + +#define wxFLP_OPEN 0x0400 +#define wxFLP_SAVE 0x0800 +#define wxFLP_OVERWRITE_PROMPT 0x1000 +#define wxFLP_FILE_MUST_EXIST 0x2000 +#define wxFLP_CHANGE_DIR 0x4000 +#define wxFLP_SMALL wxPB_SMALL + +// NOTE: wxMULTIPLE is not supported ! + + +#define wxDIRP_DIR_MUST_EXIST 0x0008 +#define wxDIRP_CHANGE_DIR 0x0010 +#define wxDIRP_SMALL wxPB_SMALL + + +// map platform-dependent controls which implement the wxFileDirPickerWidgetBase +// under the name "wxFilePickerWidget" and "wxDirPickerWidget". +// NOTE: wxFileDirPickerCtrlBase will allocate a wx{File|Dir}PickerWidget and this +// requires that all classes being mapped as wx{File|Dir}PickerWidget have the +// same prototype for the contructor... +// since GTK >= 2.6, there is GtkFileButton +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) + #include "wx/gtk/filepicker.h" + #define wxFilePickerWidget wxFileButton + #define wxDirPickerWidget wxDirButton +#else + #include "wx/generic/filepickerg.h" + #define wxFilePickerWidget wxGenericFileButton + #define wxDirPickerWidget wxGenericDirButton +#endif + + + +// ---------------------------------------------------------------------------- +// wxFileDirPickerCtrlBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDirPickerCtrlBase : public wxPickerBase +{ +public: + wxFileDirPickerCtrlBase() {} + +protected: + // NB: no default values since this function will never be used + // directly by the user and derived classes wouldn't use them + bool CreateBase(wxWindow *parent, + wxWindowID id, + const wxString& path, + const wxString &message, + const wxString &wildcard, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name); + +public: // public API + + wxString GetPath() const; + void SetPath(const wxString &str); + + // Set the directory to open the file browse dialog at initially. + void SetInitialDirectory(const wxString& dir) + { + m_pickerIface->SetInitialDirectory(dir); + } + +public: // internal functions + + void UpdatePickerFromTextCtrl(); + void UpdateTextCtrlFromPicker(); + + // event handler for our picker + void OnFileDirChange(wxFileDirPickerEvent &); + + // TRUE if any textctrl change should update the current working directory + virtual bool IsCwdToUpdate() const = 0; + + // Returns the event type sent by this picker + virtual wxEventType GetEventType() const = 0; + + virtual void DoConnect( wxControl *sender, wxFileDirPickerCtrlBase *eventSink ) = 0; + + // Returns the filtered value currently placed in the text control (if present). + virtual wxString GetTextCtrlValue() const = 0; + +protected: + // creates the picker control + virtual + wxFileDirPickerWidgetBase *CreatePicker(wxWindow *parent, + const wxString& path, + const wxString& message, + const wxString& wildcard) = 0; + +protected: + + // m_picker object as wxFileDirPickerWidgetBase interface + wxFileDirPickerWidgetBase *m_pickerIface; +}; + +#endif // wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL + + +#if wxUSE_FILEPICKERCTRL + +// ---------------------------------------------------------------------------- +// wxFilePickerCtrl: platform-independent class which embeds the +// platform-dependent wxFilePickerWidget and, if wxFLP_USE_TEXTCTRL style is +// used, a textctrl next to it. +// ---------------------------------------------------------------------------- + +#define wxFLP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL) + +#ifdef __WXGTK__ + // GTK apps usually don't have a textctrl next to the picker + #define wxFLP_DEFAULT_STYLE (wxFLP_OPEN|wxFLP_FILE_MUST_EXIST) +#else + #define wxFLP_DEFAULT_STYLE (wxFLP_USE_TEXTCTRL|wxFLP_OPEN|wxFLP_FILE_MUST_EXIST) +#endif + +class WXDLLIMPEXP_CORE wxFilePickerCtrl : public wxFileDirPickerCtrlBase +{ +public: + wxFilePickerCtrl() {} + + wxFilePickerCtrl(wxWindow *parent, + wxWindowID id, + const wxString& path = wxEmptyString, + const wxString& message = wxFileSelectorPromptStr, + const wxString& wildcard = wxFileSelectorDefaultWildcardStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxFLP_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFilePickerCtrlNameStr) + { + Create(parent, id, path, message, wildcard, pos, size, style, + validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& path = wxEmptyString, + const wxString& message = wxFileSelectorPromptStr, + const wxString& wildcard = wxFileSelectorDefaultWildcardStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxFLP_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFilePickerCtrlNameStr); + + void SetFileName(const wxFileName &filename) + { SetPath(filename.GetFullPath()); } + + wxFileName GetFileName() const + { return wxFileName(GetPath()); } + +public: // overrides + + // return the text control value in canonical form + wxString GetTextCtrlValue() const; + + bool IsCwdToUpdate() const + { return HasFlag(wxFLP_CHANGE_DIR); } + + wxEventType GetEventType() const + { return wxEVT_FILEPICKER_CHANGED; } + + virtual void DoConnect( wxControl *sender, wxFileDirPickerCtrlBase *eventSink ) + { + sender->Connect( wxEVT_FILEPICKER_CHANGED, + wxFileDirPickerEventHandler( wxFileDirPickerCtrlBase::OnFileDirChange ), + NULL, eventSink ); + } + + +protected: + virtual + wxFileDirPickerWidgetBase *CreatePicker(wxWindow *parent, + const wxString& path, + const wxString& message, + const wxString& wildcard) + { + return new wxFilePickerWidget(parent, wxID_ANY, + wxGetTranslation(wxFilePickerWidgetLabel), + path, message, wildcard, + wxDefaultPosition, wxDefaultSize, + GetPickerStyle(GetWindowStyle())); + } + + // extracts the style for our picker from wxFileDirPickerCtrlBase's style + long GetPickerStyle(long style) const + { + return style & (wxFLP_OPEN | + wxFLP_SAVE | + wxFLP_OVERWRITE_PROMPT | + wxFLP_FILE_MUST_EXIST | + wxFLP_CHANGE_DIR | + wxFLP_USE_TEXTCTRL | + wxFLP_SMALL); + } + +private: + DECLARE_DYNAMIC_CLASS(wxFilePickerCtrl) +}; + +#endif // wxUSE_FILEPICKERCTRL + + +#if wxUSE_DIRPICKERCTRL + +// ---------------------------------------------------------------------------- +// wxDirPickerCtrl: platform-independent class which embeds the +// platform-dependent wxDirPickerWidget and eventually a textctrl +// (see wxDIRP_USE_TEXTCTRL) next to it. +// ---------------------------------------------------------------------------- + +#define wxDIRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL) + +#ifdef __WXGTK__ + // GTK apps usually don't have a textctrl next to the picker + #define wxDIRP_DEFAULT_STYLE (wxDIRP_DIR_MUST_EXIST) +#else + #define wxDIRP_DEFAULT_STYLE (wxDIRP_USE_TEXTCTRL|wxDIRP_DIR_MUST_EXIST) +#endif + +class WXDLLIMPEXP_CORE wxDirPickerCtrl : public wxFileDirPickerCtrlBase +{ +public: + wxDirPickerCtrl() {} + + wxDirPickerCtrl(wxWindow *parent, wxWindowID id, + const wxString& path = wxEmptyString, + const wxString& message = wxDirSelectorPromptStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDIRP_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDirPickerCtrlNameStr) + { + Create(parent, id, path, message, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& path = wxEmptyString, + const wxString& message = wxDirSelectorPromptStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDIRP_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDirPickerCtrlNameStr); + + void SetDirName(const wxFileName &dirname) + { SetPath(dirname.GetPath()); } + + wxFileName GetDirName() const + { return wxFileName::DirName(GetPath()); } + +public: // overrides + + wxString GetTextCtrlValue() const; + + bool IsCwdToUpdate() const + { return HasFlag(wxDIRP_CHANGE_DIR); } + + wxEventType GetEventType() const + { return wxEVT_DIRPICKER_CHANGED; } + + virtual void DoConnect( wxControl *sender, wxFileDirPickerCtrlBase *eventSink ) + { + sender->Connect( wxEVT_DIRPICKER_CHANGED, + wxFileDirPickerEventHandler( wxFileDirPickerCtrlBase::OnFileDirChange ), + NULL, eventSink ); + } + + +protected: + virtual + wxFileDirPickerWidgetBase *CreatePicker(wxWindow *parent, + const wxString& path, + const wxString& message, + const wxString& WXUNUSED(wildcard)) + { + return new wxDirPickerWidget(parent, wxID_ANY, + wxGetTranslation(wxDirPickerWidgetLabel), + path, message, + wxDefaultPosition, wxDefaultSize, + GetPickerStyle(GetWindowStyle())); + } + + // extracts the style for our picker from wxFileDirPickerCtrlBase's style + long GetPickerStyle(long style) const + { + return style & (wxDIRP_DIR_MUST_EXIST | + wxDIRP_CHANGE_DIR | + wxDIRP_USE_TEXTCTRL | + wxDIRP_SMALL); + } + +private: + DECLARE_DYNAMIC_CLASS(wxDirPickerCtrl) +}; + +#endif // wxUSE_DIRPICKERCTRL + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_FILEPICKER_CHANGED wxEVT_FILEPICKER_CHANGED +#define wxEVT_COMMAND_DIRPICKER_CHANGED wxEVT_DIRPICKER_CHANGED + +#endif // _WX_FILEDIRPICKER_H_BASE_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/filesys.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filesys.h new file mode 100644 index 0000000000..3bd6e426c7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/filesys.h @@ -0,0 +1,314 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/filesys.h +// Purpose: class for opening files - virtual file system +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __FILESYS_H__ +#define __FILESYS_H__ + +#include "wx/defs.h" + +#if wxUSE_FILESYSTEM + +#if !wxUSE_STREAMS +#error You cannot compile virtual file systems without wxUSE_STREAMS +#endif + +#if wxUSE_HTML && !wxUSE_FILESYSTEM +#error You cannot compile wxHTML without virtual file systems +#endif + +#include "wx/stream.h" +#include "wx/datetime.h" +#include "wx/filename.h" +#include "wx/hashmap.h" + +class WXDLLIMPEXP_FWD_BASE wxFSFile; +class WXDLLIMPEXP_FWD_BASE wxFileSystemHandler; +class WXDLLIMPEXP_FWD_BASE wxFileSystem; + +//-------------------------------------------------------------------------------- +// wxFSFile +// This class is a file opened using wxFileSystem. It consists of +// input stream, location, mime type & optional anchor +// (in 'index.htm#chapter2', 'chapter2' is anchor) +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFSFile : public wxObject +{ +public: + wxFSFile(wxInputStream *stream, const wxString& loc, + const wxString& mimetype, const wxString& anchor +#if wxUSE_DATETIME + , wxDateTime modif +#endif // wxUSE_DATETIME + ) + { + m_Stream = stream; + m_Location = loc; + m_MimeType = mimetype.Lower(); + m_Anchor = anchor; +#if wxUSE_DATETIME + m_Modif = modif; +#endif // wxUSE_DATETIME + } + + virtual ~wxFSFile() { delete m_Stream; } + + // returns stream. This doesn't give away ownership of the stream object. + wxInputStream *GetStream() const { return m_Stream; } + + // gives away the ownership of the current stream. + wxInputStream *DetachStream() + { + wxInputStream *stream = m_Stream; + m_Stream = NULL; + return stream; + } + + // deletes the current stream and takes ownership of another. + void SetStream(wxInputStream *stream) + { + delete m_Stream; + m_Stream = stream; + } + + // returns file's mime type + const wxString& GetMimeType() const; + + // returns the original location (aka filename) of the file + const wxString& GetLocation() const { return m_Location; } + + const wxString& GetAnchor() const { return m_Anchor; } + +#if wxUSE_DATETIME + wxDateTime GetModificationTime() const { return m_Modif; } +#endif // wxUSE_DATETIME + +private: + wxInputStream *m_Stream; + wxString m_Location; + wxString m_MimeType; + wxString m_Anchor; +#if wxUSE_DATETIME + wxDateTime m_Modif; +#endif // wxUSE_DATETIME + + DECLARE_ABSTRACT_CLASS(wxFSFile) + wxDECLARE_NO_COPY_CLASS(wxFSFile); +}; + + + + + +//-------------------------------------------------------------------------------- +// wxFileSystemHandler +// This class is FS handler for wxFileSystem. It provides +// interface to access certain +// kinds of files (HTPP, FTP, local, tar.gz etc..) +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFileSystemHandler : public wxObject +{ +public: + wxFileSystemHandler() : wxObject() {} + + // returns true if this handler is able to open given location + virtual bool CanOpen(const wxString& location) = 0; + + // opens given file and returns pointer to input stream. + // Returns NULL if opening failed. + // The location is always absolute path. + virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location) = 0; + + // Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting + // the query to directories or wxFILE for files only or 0 for either. + // Returns filename or empty string if no more matching file exists + virtual wxString FindFirst(const wxString& spec, int flags = 0); + virtual wxString FindNext(); + + // Returns MIME type of the file - w/o need to open it + // (default behaviour is that it returns type based on extension) + static wxString GetMimeTypeFromExt(const wxString& location); + +protected: + // returns protocol ("file", "http", "tar" etc.) The last (most right) + // protocol is used: + // {it returns "tar" for "file:subdir/archive.tar.gz#tar:/README.txt"} + static wxString GetProtocol(const wxString& location); + + // returns left part of address: + // {it returns "file:subdir/archive.tar.gz" for "file:subdir/archive.tar.gz#tar:/README.txt"} + static wxString GetLeftLocation(const wxString& location); + + // returns anchor part of address: + // {it returns "anchor" for "file:subdir/archive.tar.gz#tar:/README.txt#anchor"} + // NOTE: anchor is NOT a part of GetLeftLocation()'s return value + static wxString GetAnchor(const wxString& location); + + // returns right part of address: + // {it returns "/README.txt" for "file:subdir/archive.tar.gz#tar:/README.txt"} + static wxString GetRightLocation(const wxString& location); + + DECLARE_ABSTRACT_CLASS(wxFileSystemHandler) +}; + + + + +//-------------------------------------------------------------------------------- +// wxFileSystem +// This class provides simple interface for opening various +// kinds of files (HTPP, FTP, local, tar.gz etc..) +//-------------------------------------------------------------------------------- + +// Open Bit Flags +enum wxFileSystemOpenFlags +{ + wxFS_READ = 1, // Open for reading + wxFS_SEEKABLE = 4 // Returned stream will be seekable +}; + +WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL(wxFileSystemHandler*, wxFSHandlerHash, class WXDLLIMPEXP_BASE); + +class WXDLLIMPEXP_BASE wxFileSystem : public wxObject +{ +public: + wxFileSystem() : wxObject() { m_FindFileHandler = NULL;} + virtual ~wxFileSystem(); + + // sets the current location. Every call to OpenFile is + // relative to this location. + // NOTE !! + // unless is_dir = true 'location' is *not* the directory but + // file contained in this directory + // (so ChangePathTo("dir/subdir/xh.htm") sets m_Path to "dir/subdir/") + void ChangePathTo(const wxString& location, bool is_dir = false); + + wxString GetPath() const {return m_Path;} + + // opens given file and returns pointer to input stream. + // Returns NULL if opening failed. + // It first tries to open the file in relative scope + // (based on ChangePathTo()'s value) and then as an absolute + // path. + wxFSFile* OpenFile(const wxString& location, int flags = wxFS_READ); + + // Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting + // the query to directories or wxFILE for files only or 0 for either. + // Returns filename or empty string if no more matching file exists + wxString FindFirst(const wxString& spec, int flags = 0); + wxString FindNext(); + + // find a file in a list of directories, returns false if not found + bool FindFileInPath(wxString *pStr, + const wxString& path, const wxString& file); + + // Adds FS handler. + // In fact, this class is only front-end to the FS handlers :-) + static void AddHandler(wxFileSystemHandler *handler); + + // Removes FS handler + static wxFileSystemHandler* RemoveHandler(wxFileSystemHandler *handler); + + // Returns true if there is a handler which can open the given location. + static bool HasHandlerForPath(const wxString& location); + + // remove all items from the m_Handlers list + static void CleanUpHandlers(); + + // Returns the native path for a file URL + static wxFileName URLToFileName(const wxString& url); + + // Returns the file URL for a native path + static wxString FileNameToURL(const wxFileName& filename); + + +protected: + wxFileSystemHandler *MakeLocal(wxFileSystemHandler *h); + + wxString m_Path; + // the path (location) we are currently in + // this is path, not file! + // (so if you opened test/demo.htm, it is + // "test/", not "test/demo.htm") + wxString m_LastName; + // name of last opened file (full path) + static wxList m_Handlers; + // list of FS handlers + wxFileSystemHandler *m_FindFileHandler; + // handler that succeed in FindFirst query + wxFSHandlerHash m_LocalHandlers; + // Handlers local to this instance + + DECLARE_DYNAMIC_CLASS(wxFileSystem) + wxDECLARE_NO_COPY_CLASS(wxFileSystem); +}; + + +/* + +'location' syntax: + +To determine FS type, we're using standard KDE notation: +file:/absolute/path/file.htm +file:relative_path/xxxxx.html +/some/path/x.file ('file:' is default) +http://www.gnome.org +file:subdir/archive.tar.gz#tar:/README.txt + +special characters : + ':' - FS identificator is before this char + '#' - separator. It can be either HTML anchor ("index.html#news") + (in case there is no ':' in the string to the right from it) + or FS separator + (example : http://www.wxhtml.org/wxhtml-0.1.tar.gz#tar:/include/wxhtml/filesys.h" + this would access tgz archive stored on web) + '/' - directory (path) separator. It is used to determine upper-level path. + HEY! Don't use \ even if you're on Windows! + +*/ + + +class WXDLLIMPEXP_BASE wxLocalFSHandler : public wxFileSystemHandler +{ +public: + virtual bool CanOpen(const wxString& location); + virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); + virtual wxString FindFirst(const wxString& spec, int flags = 0); + virtual wxString FindNext(); + + // wxLocalFSHandler will prefix all filenames with 'root' before accessing + // files on disk. This effectively makes 'root' the top-level directory + // and prevents access to files outside this directory. + // (This is similar to Unix command 'chroot'.) + static void Chroot(const wxString& root) { ms_root = root; } + +protected: + static wxString ms_root; +}; + +// Stream reading data from wxFSFile: this allows to use virtual files with any +// wx functions accepting streams. +class WXDLLIMPEXP_BASE wxFSInputStream : public wxWrapperInputStream +{ +public: + // Notice that wxFS_READ is implied in flags. + wxFSInputStream(const wxString& filename, int flags = 0); + virtual ~wxFSInputStream(); + +private: + wxFSFile* m_file; + + wxDECLARE_NO_COPY_CLASS(wxFSInputStream); +}; + +#endif + // wxUSE_FILESYSTEM + +#endif + // __FILESYS_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/flags.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/flags.h new file mode 100644 index 0000000000..c45bafabdc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/flags.h @@ -0,0 +1,176 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/flags.h +// Purpose: a bitset suited for replacing the current style flags +// Author: Stefan Csomor +// Modified by: +// Created: 27/07/03 +// Copyright: (c) 2003 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SETH__ +#define _WX_SETH__ + +// wxBitset should be applied to an enum, then this can be used like +// bitwise operators but keeps the type safety and information, the +// enums must be in a sequence , their value determines the bit position +// that they represent +// The api is made as close as possible to + +template class wxBitset +{ + friend class wxEnumData ; +public: + // creates a wxBitset<> object with all flags initialized to 0 + wxBitset() { m_data = 0; } + + // created a wxBitset<> object initialized according to the bits of the + // integral value val + wxBitset(unsigned long val) { m_data = val ; } + + // copies the content in the new wxBitset<> object from another one + wxBitset(const wxBitset &src) { m_data = src.m_data; } + + // creates a wxBitset<> object that has the specific flag set + wxBitset(const T el) { m_data |= 1 << el; } + + // returns the integral value that the bits of this object represent + unsigned long to_ulong() const { return m_data ; } + + // assignment + wxBitset &operator =(const wxBitset &rhs) + { + m_data = rhs.m_data; + return *this; + } + + // bitwise or operator, sets all bits that are in rhs and leaves + // the rest unchanged + wxBitset &operator |=(const wxBitset &rhs) + { + m_data |= rhs.m_data; + return *this; + } + + // bitwsie exclusive-or operator, toggles the value of all bits + // that are set in bits and leaves all others unchanged + wxBitset &operator ^=(const wxBitset &rhs) // difference + { + m_data ^= rhs.m_data; + return *this; + } + + // bitwise and operator, resets all bits that are not in rhs and leaves + // all others unchanged + wxBitset &operator &=(const wxBitset &rhs) // intersection + { + m_data &= rhs.m_data; + return *this; + } + + // bitwise or operator, returns a new bitset that has all bits set that set are in + // bitset2 or in this bitset + wxBitset operator |(const wxBitset &bitset2) const // union + { + wxBitset s; + s.m_data = m_data | bitset2.m_data; + return s; + } + + // bitwise exclusive-or operator, returns a new bitset that has all bits set that are set either in + // bitset2 or in this bitset but not in both + wxBitset operator ^(const wxBitset &bitset2) const // difference + { + wxBitset s; + s.m_data = m_data ^ bitset2.m_data; + return s; + } + + // bitwise and operator, returns a new bitset that has all bits set that are set both in + // bitset2 and in this bitset + wxBitset operator &(const wxBitset &bitset2) const // intersection + { + wxBitset s; + s.m_data = m_data & bitset2.m_data; + return s; + } + + // sets appropriate the bit to true + wxBitset& set(const T el) //Add element + { + m_data |= 1 << el; + return *this; + } + + // clears the appropriate flag to false + wxBitset& reset(const T el) //remove element + { + m_data &= ~(1 << el); + return *this; + } + + // clear all flags + wxBitset& reset() + { + m_data = 0; + return *this; + } + + // true if this flag is set + bool test(const T el) const + { + return (m_data & (1 << el)) ? true : false; + } + + // true if no flag is set + bool none() const + { + return m_data == 0; + } + + // true if any flag is set + bool any() const + { + return m_data != 0; + } + + // true if both have the same flags + bool operator ==(const wxBitset &rhs) const + { + return m_data == rhs.m_data; + } + + // true if both differ in their flags set + bool operator !=(const wxBitset &rhs) const + { + return !operator==(rhs); + } + + bool operator[] (const T el) const { return test(el) ; } + +private : + unsigned long m_data; +}; + +#if wxUSE_EXTENDED_RTTI + +#define wxDEFINE_FLAGS( flags ) \ + class WXDLLIMPEXP_BASE flags \ + {\ + public : \ + flags(long data=0) :m_data(data) {} \ + long m_data ;\ + bool operator ==(const flags &rhs) const { return m_data == rhs.m_data; }\ + } ; + +#else + +#define wxDEFINE_FLAGS( flags ) + +#endif + +#if WXWIN_COMPATIBILITY_2_8 + #define WX_DEFINE_FLAGS wxDEFINE_FLAGS +#endif + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fmappriv.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fmappriv.h new file mode 100644 index 0000000000..6637088626 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fmappriv.h @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/fmappriv.h +// Purpose: private wxFontMapper stuff, not to be used by the library users +// Author: Vadim Zeitlin +// Modified by: +// Created: 21.06.2003 (extracted from common/fontmap.cpp) +// Copyright: (c) 1999-2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FMAPPRIV_H_ +#define _WX_FMAPPRIV_H_ + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// a special pseudo encoding which means "don't ask me about this charset +// any more" -- we need it to avoid driving the user crazy with asking him +// time after time about the same charset which he [presumably] doesn't +// have the fonts for +enum { wxFONTENCODING_UNKNOWN = -2 }; + +// the config paths we use +#if wxUSE_CONFIG + +#define FONTMAPPER_ROOT_PATH wxT("/wxWindows/FontMapper") +#define FONTMAPPER_CHARSET_PATH wxT("Charsets") +#define FONTMAPPER_CHARSET_ALIAS_PATH wxT("Aliases") + +#endif // wxUSE_CONFIG + +// ---------------------------------------------------------------------------- +// wxFontMapperPathChanger: change the config path during our lifetime +// ---------------------------------------------------------------------------- + +#if wxUSE_CONFIG && wxUSE_FILECONFIG + +class wxFontMapperPathChanger +{ +public: + wxFontMapperPathChanger(wxFontMapperBase *fontMapper, const wxString& path) + { + m_fontMapper = fontMapper; + m_ok = m_fontMapper->ChangePath(path, &m_pathOld); + } + + bool IsOk() const { return m_ok; } + + ~wxFontMapperPathChanger() + { + if ( IsOk() ) + m_fontMapper->RestorePath(m_pathOld); + } + +private: + // the fontmapper object we're working with + wxFontMapperBase *m_fontMapper; + + // the old path to be restored if m_ok + wxString m_pathOld; + + // have we changed the path successfully? + bool m_ok; + + + wxDECLARE_NO_COPY_CLASS(wxFontMapperPathChanger); +}; + +#endif // wxUSE_CONFIG + +#endif // _WX_FMAPPRIV_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/font.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/font.h new file mode 100644 index 0000000000..5c359cce64 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/font.h @@ -0,0 +1,598 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/font.h +// Purpose: wxFontBase class: the interface of wxFont +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.09.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONT_H_BASE_ +#define _WX_FONT_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" // for wxDEFAULT &c +#include "wx/fontenc.h" // the font encoding constants +#include "wx/gdiobj.h" // the base class +#include "wx/gdicmn.h" // for wxGDIObjListBase + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxFont; + +// ---------------------------------------------------------------------------- +// font constants +// ---------------------------------------------------------------------------- + +// standard font families: these may be used only for the font creation, it +// doesn't make sense to query an existing font for its font family as, +// especially if the font had been created from a native font description, it +// may be unknown +enum wxFontFamily +{ + wxFONTFAMILY_DEFAULT = wxDEFAULT, + wxFONTFAMILY_DECORATIVE = wxDECORATIVE, + wxFONTFAMILY_ROMAN = wxROMAN, + wxFONTFAMILY_SCRIPT = wxSCRIPT, + wxFONTFAMILY_SWISS = wxSWISS, + wxFONTFAMILY_MODERN = wxMODERN, + wxFONTFAMILY_TELETYPE = wxTELETYPE, + wxFONTFAMILY_MAX, + wxFONTFAMILY_UNKNOWN = wxFONTFAMILY_MAX +}; + +// font styles +enum wxFontStyle +{ + wxFONTSTYLE_NORMAL = wxNORMAL, + wxFONTSTYLE_ITALIC = wxITALIC, + wxFONTSTYLE_SLANT = wxSLANT, + wxFONTSTYLE_MAX +}; + +// font weights +enum wxFontWeight +{ + wxFONTWEIGHT_NORMAL = wxNORMAL, + wxFONTWEIGHT_LIGHT = wxLIGHT, + wxFONTWEIGHT_BOLD = wxBOLD, + wxFONTWEIGHT_MAX +}; + +// Symbolic font sizes as defined in CSS specification. +enum wxFontSymbolicSize +{ + wxFONTSIZE_XX_SMALL = -3, + wxFONTSIZE_X_SMALL, + wxFONTSIZE_SMALL, + wxFONTSIZE_MEDIUM, + wxFONTSIZE_LARGE, + wxFONTSIZE_X_LARGE, + wxFONTSIZE_XX_LARGE +}; + +// the font flag bits for the new font ctor accepting one combined flags word +enum wxFontFlag +{ + // no special flags: font with default weight/slant/anti-aliasing + wxFONTFLAG_DEFAULT = 0, + + // slant flags (default: no slant) + wxFONTFLAG_ITALIC = 1 << 0, + wxFONTFLAG_SLANT = 1 << 1, + + // weight flags (default: medium) + wxFONTFLAG_LIGHT = 1 << 2, + wxFONTFLAG_BOLD = 1 << 3, + + // anti-aliasing flag: force on or off (default: the current system default) + wxFONTFLAG_ANTIALIASED = 1 << 4, + wxFONTFLAG_NOT_ANTIALIASED = 1 << 5, + + // underlined/strikethrough flags (default: no lines) + wxFONTFLAG_UNDERLINED = 1 << 6, + wxFONTFLAG_STRIKETHROUGH = 1 << 7, + + // the mask of all currently used flags + wxFONTFLAG_MASK = wxFONTFLAG_ITALIC | + wxFONTFLAG_SLANT | + wxFONTFLAG_LIGHT | + wxFONTFLAG_BOLD | + wxFONTFLAG_ANTIALIASED | + wxFONTFLAG_NOT_ANTIALIASED | + wxFONTFLAG_UNDERLINED | + wxFONTFLAG_STRIKETHROUGH +}; + +// ---------------------------------------------------------------------------- +// wxFontInfo describes a wxFont +// ---------------------------------------------------------------------------- + +class wxFontInfo +{ +public: + // Default ctor uses the default font size appropriate for the current + // platform. + wxFontInfo() + { InitPointSize(-1); } + + // These ctors specify the font size, either in points or in pixels. + wxEXPLICIT wxFontInfo(int pointSize) + { InitPointSize(pointSize); } + wxEXPLICIT wxFontInfo(const wxSize& pixelSize) : m_pixelSize(pixelSize) + { Init(); } + + // Setters for the various attributes. All of them return the object itself + // so that the calls to them could be chained. + wxFontInfo& Family(wxFontFamily family) + { m_family = family; return *this; } + wxFontInfo& FaceName(const wxString& faceName) + { m_faceName = faceName; return *this; } + + wxFontInfo& Bold(bool bold = true) + { SetFlag(wxFONTFLAG_BOLD, bold); return *this; } + wxFontInfo& Light(bool light = true) + { SetFlag(wxFONTFLAG_LIGHT, light); return *this; } + + wxFontInfo& Italic(bool italic = true) + { SetFlag(wxFONTFLAG_ITALIC, italic); return *this; } + wxFontInfo& Slant(bool slant = true) + { SetFlag(wxFONTFLAG_SLANT, slant); return *this; } + + wxFontInfo& AntiAliased(bool antiAliased = true) + { SetFlag(wxFONTFLAG_ANTIALIASED, antiAliased); return *this; } + wxFontInfo& Underlined(bool underlined = true) + { SetFlag(wxFONTFLAG_UNDERLINED, underlined); return *this; } + wxFontInfo& Strikethrough(bool strikethrough = true) + { SetFlag(wxFONTFLAG_STRIKETHROUGH, strikethrough); return *this; } + + wxFontInfo& Encoding(wxFontEncoding encoding) + { m_encoding = encoding; return *this; } + + + // Set all flags at once. + wxFontInfo& AllFlags(int flags) + { m_flags = flags; return *this; } + + + // Accessors are mostly meant to be used by wxFont itself to extract the + // various pieces of the font description. + + bool IsUsingSizeInPixels() const { return m_pixelSize != wxDefaultSize; } + int GetPointSize() const { return m_pointSize; } + wxSize GetPixelSize() const { return m_pixelSize; } + wxFontFamily GetFamily() const { return m_family; } + const wxString& GetFaceName() const { return m_faceName; } + + wxFontStyle GetStyle() const + { + return m_flags & wxFONTFLAG_ITALIC + ? wxFONTSTYLE_ITALIC + : m_flags & wxFONTFLAG_SLANT + ? wxFONTSTYLE_SLANT + : wxFONTSTYLE_NORMAL; + } + + wxFontWeight GetWeight() const + { + return m_flags & wxFONTFLAG_LIGHT + ? wxFONTWEIGHT_LIGHT + : m_flags & wxFONTFLAG_BOLD + ? wxFONTWEIGHT_BOLD + : wxFONTWEIGHT_NORMAL; + } + + bool IsAntiAliased() const + { + return (m_flags & wxFONTFLAG_ANTIALIASED) != 0; + } + + bool IsUnderlined() const + { + return (m_flags & wxFONTFLAG_UNDERLINED) != 0; + } + + bool IsStrikethrough() const + { + return (m_flags & wxFONTFLAG_STRIKETHROUGH) != 0; + } + + wxFontEncoding GetEncoding() const { return m_encoding; } + + + // Default copy ctor, assignment operator and dtor are OK. + +private: + // Common part of all ctor, initializing everything except the size (which + // is initialized by the ctors themselves). + void Init() + { + m_family = wxFONTFAMILY_DEFAULT; + m_flags = wxFONTFLAG_DEFAULT; + m_encoding = wxFONTENCODING_DEFAULT; + } + + void InitPointSize(int pointSize) + { + Init(); + + m_pointSize = pointSize; + m_pixelSize = wxDefaultSize; + } + + // Turn on or off the given bit in m_flags depending on the value of the + // boolean argument. + void SetFlag(int flag, bool on) + { + if ( on ) + m_flags |= flag; + else + m_flags &= ~flag; + } + + // The size information: if m_pixelSize is valid (!= wxDefaultSize), then + // it is used. Otherwise m_pointSize is used, taking into account that if + // it is == -1, it means that the platform dependent font size should be + // used. + int m_pointSize; + wxSize m_pixelSize; + + wxFontFamily m_family; + wxString m_faceName; + int m_flags; + wxFontEncoding m_encoding; +}; + +// ---------------------------------------------------------------------------- +// wxFontBase represents a font object +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxNativeFontInfo; + +class WXDLLIMPEXP_CORE wxFontBase : public wxGDIObject +{ +public: + /* + derived classes should provide the following ctors: + + wxFont(); + wxFont(const wxFontInfo& info); + wxFont(const wxString& nativeFontInfoString); + wxFont(const wxNativeFontInfo& info); + wxFont(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + wxFont(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + */ + + // creator function + virtual ~wxFontBase(); + + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + // from the font components + static wxFont *New( + int pointSize, // size of the font in points + int family, // see wxFontFamily enum + int style, // see wxFontStyle enum + int weight, // see wxFontWeight enum + bool underlined = false, // not underlined by default + const wxString& face = wxEmptyString, // facename + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) // ISO8859-X, ... + { return New(pointSize, (wxFontFamily)family, (wxFontStyle)style, + (wxFontWeight)weight, underlined, face, encoding); } + + // from the font components + static wxFont *New( + const wxSize& pixelSize, // size of the font in pixels + int family, // see wxFontFamily enum + int style, // see wxFontStyle enum + int weight, // see wxFontWeight enum + bool underlined = false, // not underlined by default + const wxString& face = wxEmptyString, // facename + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) // ISO8859-X, ... + { return New(pixelSize, (wxFontFamily)family, (wxFontStyle)style, + (wxFontWeight)weight, underlined, face, encoding); } +#endif + + // from the font components + static wxFont *New( + int pointSize, // size of the font in points + wxFontFamily family, // see wxFontFamily enum + wxFontStyle style, // see wxFontStyle enum + wxFontWeight weight, // see wxFontWeight enum + bool underlined = false, // not underlined by default + const wxString& face = wxEmptyString, // facename + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); // ISO8859-X, ... + + // from the font components + static wxFont *New( + const wxSize& pixelSize, // size of the font in pixels + wxFontFamily family, // see wxFontFamily enum + wxFontStyle style, // see wxFontStyle enum + wxFontWeight weight, // see wxFontWeight enum + bool underlined = false, // not underlined by default + const wxString& face = wxEmptyString, // facename + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); // ISO8859-X, ... + + // from the font components but using the font flags instead of separate + // parameters for each flag + static wxFont *New(int pointSize, + wxFontFamily family, + int flags = wxFONTFLAG_DEFAULT, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + + + // from the font components but using the font flags instead of separate + // parameters for each flag + static wxFont *New(const wxSize& pixelSize, + wxFontFamily family, + int flags = wxFONTFLAG_DEFAULT, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + + // from the (opaque) native font description object + static wxFont *New(const wxNativeFontInfo& nativeFontDesc); + + // from the string representation of wxNativeFontInfo + static wxFont *New(const wxString& strNativeFontDesc); + + // comparison + bool operator==(const wxFont& font) const; + bool operator!=(const wxFont& font) const { return !(*this == font); } + + // accessors: get the font characteristics + virtual int GetPointSize() const = 0; + virtual wxSize GetPixelSize() const; + virtual bool IsUsingSizeInPixels() const; + wxFontFamily GetFamily() const; + virtual wxFontStyle GetStyle() const = 0; + virtual wxFontWeight GetWeight() const = 0; + virtual bool GetUnderlined() const = 0; + virtual bool GetStrikethrough() const { return false; } + virtual wxString GetFaceName() const = 0; + virtual wxFontEncoding GetEncoding() const = 0; + virtual const wxNativeFontInfo *GetNativeFontInfo() const = 0; + + virtual bool IsFixedWidth() const; + + wxString GetNativeFontInfoDesc() const; + wxString GetNativeFontInfoUserDesc() const; + + // change the font characteristics + virtual void SetPointSize( int pointSize ) = 0; + virtual void SetPixelSize( const wxSize& pixelSize ); + virtual void SetFamily( wxFontFamily family ) = 0; + virtual void SetStyle( wxFontStyle style ) = 0; + virtual void SetWeight( wxFontWeight weight ) = 0; + + virtual void SetUnderlined( bool underlined ) = 0; + virtual void SetStrikethrough( bool WXUNUSED(strikethrough) ) {} + virtual void SetEncoding(wxFontEncoding encoding) = 0; + virtual bool SetFaceName( const wxString& faceName ); + void SetNativeFontInfo(const wxNativeFontInfo& info) + { DoSetNativeFontInfo(info); } + + bool SetNativeFontInfo(const wxString& info); + bool SetNativeFontInfoUserDesc(const wxString& info); + + // Symbolic font sizes support: set the font size to "large" or "very + // small" either absolutely (i.e. compared to the default font size) or + // relatively to the given font size. + void SetSymbolicSize(wxFontSymbolicSize size); + void SetSymbolicSizeRelativeTo(wxFontSymbolicSize size, int base) + { + SetPointSize(AdjustToSymbolicSize(size, base)); + } + + // Adjust the base size in points according to symbolic size. + static int AdjustToSymbolicSize(wxFontSymbolicSize size, int base); + + + // translate the fonts into human-readable string (i.e. GetStyleString() + // will return "wxITALIC" for an italic font, ...) + wxString GetFamilyString() const; + wxString GetStyleString() const; + wxString GetWeightString() const; + + // the default encoding is used for creating all fonts with default + // encoding parameter + static wxFontEncoding GetDefaultEncoding() { return ms_encodingDefault; } + static void SetDefaultEncoding(wxFontEncoding encoding); + + // this doesn't do anything and is kept for compatibility only +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_INLINE(void SetNoAntiAliasing(bool no = true), wxUnusedVar(no);) + wxDEPRECATED_INLINE(bool GetNoAntiAliasing() const, return false;) +#endif // WXWIN_COMPATIBILITY_2_8 + +protected: + // the function called by both overloads of SetNativeFontInfo() + virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info); + + // The function called by public GetFamily(): it can return + // wxFONTFAMILY_UNKNOWN unlike the public method (see comment there). + virtual wxFontFamily DoGetFamily() const = 0; + + + // Helper functions to recover wxFONTSTYLE/wxFONTWEIGHT and underlined flag + // values from flags containing a combination of wxFONTFLAG_XXX. + static wxFontStyle GetStyleFromFlags(int flags) + { + return flags & wxFONTFLAG_ITALIC + ? wxFONTSTYLE_ITALIC + : flags & wxFONTFLAG_SLANT + ? wxFONTSTYLE_SLANT + : wxFONTSTYLE_NORMAL; + } + + static wxFontWeight GetWeightFromFlags(int flags) + { + return flags & wxFONTFLAG_LIGHT + ? wxFONTWEIGHT_LIGHT + : flags & wxFONTFLAG_BOLD + ? wxFONTWEIGHT_BOLD + : wxFONTWEIGHT_NORMAL; + } + + static bool GetUnderlinedFromFlags(int flags) + { + return (flags & wxFONTFLAG_UNDERLINED) != 0; + } + + static bool GetStrikethroughFromFlags(int flags) + { + return (flags & wxFONTFLAG_STRIKETHROUGH) != 0; + } + +private: + // the currently default encoding: by default, it's the default system + // encoding, but may be changed by the application using + // SetDefaultEncoding() to make all subsequent fonts created without + // specifying encoding parameter using this encoding + static wxFontEncoding ms_encodingDefault; +}; + +// wxFontBase <-> wxString utilities, used by wxConfig +WXDLLIMPEXP_CORE wxString wxToString(const wxFontBase& font); +WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxFontBase* font); + + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 +#define wxDECLARE_FONT_COMPAT_SETTER \ + wxDEPRECATED_FUTURE( void SetFamily(int family) ) \ + { SetFamily((wxFontFamily)family); } \ + wxDEPRECATED_FUTURE( void SetStyle(int style) ) \ + { SetStyle((wxFontStyle)style); } \ + wxDEPRECATED_FUTURE( void SetWeight(int weight) ) \ + { SetWeight((wxFontWeight)weight); } \ + wxDEPRECATED_FUTURE( void SetFamily(wxDeprecatedGUIConstants family) ) \ + { SetFamily((wxFontFamily)family); } \ + wxDEPRECATED_FUTURE( void SetStyle(wxDeprecatedGUIConstants style) ) \ + { SetStyle((wxFontStyle)style); } \ + wxDEPRECATED_FUTURE( void SetWeight(wxDeprecatedGUIConstants weight) ) \ + { SetWeight((wxFontWeight)weight); } +#else +#define wxDECLARE_FONT_COMPAT_SETTER /*empty*/ +#endif + +// this macro must be used in all derived wxFont classes declarations +#define wxDECLARE_COMMON_FONT_METHODS() \ + wxDECLARE_FONT_COMPAT_SETTER \ + \ + /* functions for modifying font in place */ \ + wxFont& MakeBold(); \ + wxFont& MakeItalic(); \ + wxFont& MakeUnderlined(); \ + wxFont& MakeStrikethrough(); \ + wxFont& MakeLarger() { return Scale(1.2f); } \ + wxFont& MakeSmaller() { return Scale(1/1.2f); } \ + wxFont& Scale(float x); \ + /* functions for creating fonts based on this one */ \ + wxFont Bold() const; \ + wxFont Italic() const; \ + wxFont Underlined() const; \ + wxFont Strikethrough() const; \ + wxFont Larger() const { return Scaled(1.2f); } \ + wxFont Smaller() const { return Scaled(1/1.2f); } \ + wxFont Scaled(float x) const + +// include the real class declaration +#if defined(__WXMSW__) + #include "wx/msw/font.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/font.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/font.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/font.h" +#elif defined(__WXX11__) + #include "wx/x11/font.h" +#elif defined(__WXDFB__) + #include "wx/dfb/font.h" +#elif defined(__WXMAC__) + #include "wx/osx/font.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/font.h" +#elif defined(__WXPM__) + #include "wx/os2/font.h" +#endif + +class WXDLLIMPEXP_CORE wxFontList: public wxGDIObjListBase +{ +public: + wxFont *FindOrCreateFont(int pointSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underline = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight, + bool underline = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { return FindOrCreateFont(pointSize, (wxFontFamily)family, (wxFontStyle)style, + (wxFontWeight)weight, underline, face, encoding); } +#endif + +#if WXWIN_COMPATIBILITY_2_6 + wxDEPRECATED( void AddFont(wxFont*) ); + wxDEPRECATED( void RemoveFont(wxFont*) ); +#endif +}; + +extern WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList; + + +// provide comparison operators to allow code such as +// +// if ( font.GetStyle() == wxFONTSTYLE_SLANT ) +// +// to compile without warnings which it would otherwise provoke from some +// compilers as it compares elements of different enums +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + +// Unfortunately some compilers have ambiguity issues when enum comparisons are +// overloaded so we have to disable the overloads in this case, see +// wxCOMPILER_NO_OVERLOAD_ON_ENUM definition in wx/platform.h for more details. +#ifndef wxCOMPILER_NO_OVERLOAD_ON_ENUM + +inline bool operator==(wxFontFamily s, wxDeprecatedGUIConstants t) +{ return static_cast(s) == static_cast(t); } +inline bool operator!=(wxFontFamily s, wxDeprecatedGUIConstants t) +{ return !(s == t); } +inline bool operator==(wxFontStyle s, wxDeprecatedGUIConstants t) +{ return static_cast(s) == static_cast(t); } +inline bool operator!=(wxFontStyle s, wxDeprecatedGUIConstants t) +{ return !(s == t); } +inline bool operator==(wxFontWeight s, wxDeprecatedGUIConstants t) +{ return static_cast(s) == static_cast(t); } +inline bool operator!=(wxFontWeight s, wxDeprecatedGUIConstants t) +{ return !(s == t); } + +#endif // // wxCOMPILER_NO_OVERLOAD_ON_ENUM + +#endif // FUTURE_WXWIN_COMPATIBILITY_3_0 + +#endif + // _WX_FONT_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontdata.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontdata.h new file mode 100644 index 0000000000..87571ce940 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontdata.h @@ -0,0 +1,70 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fontdata.h +// Author: Julian Smart +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONTDATA_H_ +#define _WX_FONTDATA_H_ + +#include "wx/font.h" +#include "wx/colour.h" +#include "wx/encinfo.h" + +class WXDLLIMPEXP_CORE wxFontData : public wxObject +{ +public: + wxFontData(); + virtual ~wxFontData(); + + wxFontData(const wxFontData& data); + wxFontData& operator=(const wxFontData& data); + + void SetAllowSymbols(bool flag) { m_allowSymbols = flag; } + bool GetAllowSymbols() const { return m_allowSymbols; } + + void SetColour(const wxColour& colour) { m_fontColour = colour; } + const wxColour& GetColour() const { return m_fontColour; } + + void SetShowHelp(bool flag) { m_showHelp = flag; } + bool GetShowHelp() const { return m_showHelp; } + + void EnableEffects(bool flag) { m_enableEffects = flag; } + bool GetEnableEffects() const { return m_enableEffects; } + + void SetInitialFont(const wxFont& font) { m_initialFont = font; } + wxFont GetInitialFont() const { return m_initialFont; } + + void SetChosenFont(const wxFont& font) { m_chosenFont = font; } + wxFont GetChosenFont() const { return m_chosenFont; } + + void SetRange(int minRange, int maxRange) { m_minSize = minRange; m_maxSize = maxRange; } + + // encoding info is split into 2 parts: the logical wxWin encoding + // (wxFontEncoding) and a structure containing the native parameters for + // it (wxNativeEncodingInfo) + wxFontEncoding GetEncoding() const { return m_encoding; } + void SetEncoding(wxFontEncoding encoding) { m_encoding = encoding; } + + wxNativeEncodingInfo& EncodingInfo() { return m_encodingInfo; } + + + // public for backwards compatibility only: don't use directly + wxColour m_fontColour; + bool m_showHelp; + bool m_allowSymbols; + bool m_enableEffects; + wxFont m_initialFont; + wxFont m_chosenFont; + int m_minSize; + int m_maxSize; + +private: + wxFontEncoding m_encoding; + wxNativeEncodingInfo m_encodingInfo; + + DECLARE_DYNAMIC_CLASS(wxFontData) +}; + +#endif // _WX_FONTDATA_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontdlg.h new file mode 100644 index 0000000000..74a6e6fccf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontdlg.h @@ -0,0 +1,115 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/fontdlg.h +// Purpose: common interface for different wxFontDialog classes +// Author: Vadim Zeitlin +// Modified by: +// Created: 12.05.02 +// Copyright: (c) 1997-2002 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONTDLG_H_BASE_ +#define _WX_FONTDLG_H_BASE_ + +#include "wx/defs.h" // for wxUSE_FONTDLG + +#if wxUSE_FONTDLG + +#include "wx/dialog.h" // the base class +#include "wx/fontdata.h" + +// ---------------------------------------------------------------------------- +// wxFontDialog interface +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFontDialogBase : public wxDialog +{ +public: + // create the font dialog + wxFontDialogBase() { } + wxFontDialogBase(wxWindow *parent) { m_parent = parent; } + wxFontDialogBase(wxWindow *parent, const wxFontData& data) + { m_parent = parent; InitFontData(&data); } + + bool Create(wxWindow *parent) + { return DoCreate(parent); } + bool Create(wxWindow *parent, const wxFontData& data) + { InitFontData(&data); return Create(parent); } + + // retrieve the font data + const wxFontData& GetFontData() const { return m_fontData; } + wxFontData& GetFontData() { return m_fontData; } + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated interface, for compatibility only, don't use + wxDEPRECATED( wxFontDialogBase(wxWindow *parent, const wxFontData *data) ); + + wxDEPRECATED( bool Create(wxWindow *parent, const wxFontData *data) ); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + virtual bool DoCreate(wxWindow *parent) { m_parent = parent; return true; } + + void InitFontData(const wxFontData *data = NULL) + { if ( data ) m_fontData = *data; } + + wxFontData m_fontData; + + wxDECLARE_NO_COPY_CLASS(wxFontDialogBase); +}; + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated interface, for compatibility only, don't use +inline wxFontDialogBase::wxFontDialogBase(wxWindow *parent, const wxFontData *data) +{ m_parent = parent; InitFontData(data); } + +inline bool wxFontDialogBase::Create(wxWindow *parent, const wxFontData *data) +{ InitFontData(data); return Create(parent); } +#endif // WXWIN_COMPATIBILITY_2_6 + +// ---------------------------------------------------------------------------- +// platform-specific wxFontDialog implementation +// ---------------------------------------------------------------------------- + +#if defined( __WXOSX_MAC__ ) +//set to 1 to use native mac font and color dialogs +#define USE_NATIVE_FONT_DIALOG_FOR_MACOSX 1 +#else +//not supported on these platforms, leave 0 +#define USE_NATIVE_FONT_DIALOG_FOR_MACOSX 0 +#endif + +#if defined(__WXUNIVERSAL__) || \ + defined(__WXMOTIF__) || \ + defined(__WXCOCOA__) || \ + defined(__WXWINCE__) || \ + defined(__WXGPE__) + + #include "wx/generic/fontdlgg.h" + #define wxFontDialog wxGenericFontDialog +#elif defined(__WXMSW__) + #include "wx/msw/fontdlg.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/fontdlg.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/fontdlg.h" +#elif defined(__WXPM__) + #include "wx/os2/fontdlg.h" +#elif defined(__WXMAC__) + #include "wx/osx/fontdlg.h" +#endif + +// ---------------------------------------------------------------------------- +// global public functions +// ---------------------------------------------------------------------------- + +// get the font from user and return it, returns wxNullFont if the dialog was +// cancelled +WXDLLIMPEXP_CORE wxFont wxGetFontFromUser(wxWindow *parent = NULL, + const wxFont& fontInit = wxNullFont, + const wxString& caption = wxEmptyString); + +#endif // wxUSE_FONTDLG + +#endif + // _WX_FONTDLG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontenc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontenc.h new file mode 100644 index 0000000000..5263997ae9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontenc.h @@ -0,0 +1,163 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fontenc.h +// Purpose: wxFontEncoding constants +// Author: Vadim Zeitlin +// Modified by: +// Created: 29.03.00 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONTENC_H_ +#define _WX_FONTENC_H_ + +// font encodings +enum wxFontEncoding +{ + wxFONTENCODING_SYSTEM = -1, // system default + wxFONTENCODING_DEFAULT, // current default encoding + + // ISO8859 standard defines a number of single-byte charsets + wxFONTENCODING_ISO8859_1, // West European (Latin1) + wxFONTENCODING_ISO8859_2, // Central and East European (Latin2) + wxFONTENCODING_ISO8859_3, // Esperanto (Latin3) + wxFONTENCODING_ISO8859_4, // Baltic (old) (Latin4) + wxFONTENCODING_ISO8859_5, // Cyrillic + wxFONTENCODING_ISO8859_6, // Arabic + wxFONTENCODING_ISO8859_7, // Greek + wxFONTENCODING_ISO8859_8, // Hebrew + wxFONTENCODING_ISO8859_9, // Turkish (Latin5) + wxFONTENCODING_ISO8859_10, // Variation of Latin4 (Latin6) + wxFONTENCODING_ISO8859_11, // Thai + wxFONTENCODING_ISO8859_12, // doesn't exist currently, but put it + // here anyhow to make all ISO8859 + // consecutive numbers + wxFONTENCODING_ISO8859_13, // Baltic (Latin7) + wxFONTENCODING_ISO8859_14, // Latin8 + wxFONTENCODING_ISO8859_15, // Latin9 (a.k.a. Latin0, includes euro) + wxFONTENCODING_ISO8859_MAX, + + // Cyrillic charset soup (see http://czyborra.com/charsets/cyrillic.html) + wxFONTENCODING_KOI8, // KOI8 Russian + wxFONTENCODING_KOI8_U, // KOI8 Ukrainian + wxFONTENCODING_ALTERNATIVE, // same as MS-DOS CP866 + wxFONTENCODING_BULGARIAN, // used under Linux in Bulgaria + + // what would we do without Microsoft? They have their own encodings + // for DOS + wxFONTENCODING_CP437, // original MS-DOS codepage + wxFONTENCODING_CP850, // CP437 merged with Latin1 + wxFONTENCODING_CP852, // CP437 merged with Latin2 + wxFONTENCODING_CP855, // another cyrillic encoding + wxFONTENCODING_CP866, // and another one + // and for Windows + wxFONTENCODING_CP874, // WinThai + wxFONTENCODING_CP932, // Japanese (shift-JIS) + wxFONTENCODING_CP936, // Chinese simplified (GB) + wxFONTENCODING_CP949, // Korean (Hangul charset, a.k.a. EUC-KR) + wxFONTENCODING_CP950, // Chinese (traditional - Big5) + wxFONTENCODING_CP1250, // WinLatin2 + wxFONTENCODING_CP1251, // WinCyrillic + wxFONTENCODING_CP1252, // WinLatin1 + wxFONTENCODING_CP1253, // WinGreek (8859-7) + wxFONTENCODING_CP1254, // WinTurkish + wxFONTENCODING_CP1255, // WinHebrew + wxFONTENCODING_CP1256, // WinArabic + wxFONTENCODING_CP1257, // WinBaltic (same as Latin 7) + wxFONTENCODING_CP1258, // WinVietnamese + wxFONTENCODING_CP1361, // Johab Korean character set. + wxFONTENCODING_CP12_MAX, + + wxFONTENCODING_UTF7, // UTF-7 Unicode encoding + wxFONTENCODING_UTF8, // UTF-8 Unicode encoding + wxFONTENCODING_EUC_JP, // Extended Unix Codepage for Japanese + wxFONTENCODING_UTF16BE, // UTF-16 Big Endian Unicode encoding + wxFONTENCODING_UTF16LE, // UTF-16 Little Endian Unicode encoding + wxFONTENCODING_UTF32BE, // UTF-32 Big Endian Unicode encoding + wxFONTENCODING_UTF32LE, // UTF-32 Little Endian Unicode encoding + + wxFONTENCODING_MACROMAN, // the standard mac encodings + wxFONTENCODING_MACJAPANESE, + wxFONTENCODING_MACCHINESETRAD, + wxFONTENCODING_MACKOREAN, + wxFONTENCODING_MACARABIC, + wxFONTENCODING_MACHEBREW, + wxFONTENCODING_MACGREEK, + wxFONTENCODING_MACCYRILLIC, + wxFONTENCODING_MACDEVANAGARI, + wxFONTENCODING_MACGURMUKHI, + wxFONTENCODING_MACGUJARATI, + wxFONTENCODING_MACORIYA, + wxFONTENCODING_MACBENGALI, + wxFONTENCODING_MACTAMIL, + wxFONTENCODING_MACTELUGU, + wxFONTENCODING_MACKANNADA, + wxFONTENCODING_MACMALAJALAM, + wxFONTENCODING_MACSINHALESE, + wxFONTENCODING_MACBURMESE, + wxFONTENCODING_MACKHMER, + wxFONTENCODING_MACTHAI, + wxFONTENCODING_MACLAOTIAN, + wxFONTENCODING_MACGEORGIAN, + wxFONTENCODING_MACARMENIAN, + wxFONTENCODING_MACCHINESESIMP, + wxFONTENCODING_MACTIBETAN, + wxFONTENCODING_MACMONGOLIAN, + wxFONTENCODING_MACETHIOPIC, + wxFONTENCODING_MACCENTRALEUR, + wxFONTENCODING_MACVIATNAMESE, + wxFONTENCODING_MACARABICEXT, + wxFONTENCODING_MACSYMBOL, + wxFONTENCODING_MACDINGBATS, + wxFONTENCODING_MACTURKISH, + wxFONTENCODING_MACCROATIAN, + wxFONTENCODING_MACICELANDIC, + wxFONTENCODING_MACROMANIAN, + wxFONTENCODING_MACCELTIC, + wxFONTENCODING_MACGAELIC, + wxFONTENCODING_MACKEYBOARD, + + // more CJK encodings (for historical reasons some are already declared + // above) + wxFONTENCODING_ISO2022_JP, // ISO-2022-JP JIS encoding + + wxFONTENCODING_MAX, // highest enumerated encoding value + + wxFONTENCODING_MACMIN = wxFONTENCODING_MACROMAN , + wxFONTENCODING_MACMAX = wxFONTENCODING_MACKEYBOARD , + + // aliases for endian-dependent UTF encodings +#ifdef WORDS_BIGENDIAN + wxFONTENCODING_UTF16 = wxFONTENCODING_UTF16BE, // native UTF-16 + wxFONTENCODING_UTF32 = wxFONTENCODING_UTF32BE, // native UTF-32 +#else // WORDS_BIGENDIAN + wxFONTENCODING_UTF16 = wxFONTENCODING_UTF16LE, // native UTF-16 + wxFONTENCODING_UTF32 = wxFONTENCODING_UTF32LE, // native UTF-32 +#endif // WORDS_BIGENDIAN + + // alias for the native Unicode encoding on this platform + // (this is used by wxEncodingConverter and wxUTFFile only for now) +#if SIZEOF_WCHAR_T == 2 + wxFONTENCODING_UNICODE = wxFONTENCODING_UTF16, +#else // SIZEOF_WCHAR_T == 4 + wxFONTENCODING_UNICODE = wxFONTENCODING_UTF32, +#endif + + // alternative names for Far Eastern encodings + // Chinese + wxFONTENCODING_GB2312 = wxFONTENCODING_CP936, // Simplified Chinese + wxFONTENCODING_BIG5 = wxFONTENCODING_CP950, // Traditional Chinese + + // Japanese (see http://zsigri.tripod.com/fontboard/cjk/jis.html) + wxFONTENCODING_SHIFT_JIS = wxFONTENCODING_CP932, // Shift JIS + + // Korean (CP 949 not actually the same but close enough) + wxFONTENCODING_EUC_KR = wxFONTENCODING_CP949, + wxFONTENCODING_JOHAB = wxFONTENCODING_CP1361, + + // Vietnamese + wxFONTENCODING_VIETNAMESE = wxFONTENCODING_CP1258 +}; + +#endif // _WX_FONTENC_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontenum.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontenum.h new file mode 100644 index 0000000000..782dc7fd9e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontenum.h @@ -0,0 +1,88 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fontenum.h +// Purpose: wxFontEnumerator class for getting available fonts +// Author: Julian Smart, Vadim Zeitlin +// Modified by: extended to enumerate more than just font facenames and works +// not only on Windows now (VZ) +// Created: 04/01/98 +// Copyright: (c) Julian Smart, Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONTENUM_H_ +#define _WX_FONTENUM_H_ + +#include "wx/defs.h" + +#if wxUSE_FONTENUM + +#include "wx/fontenc.h" +#include "wx/arrstr.h" + +// ---------------------------------------------------------------------------- +// wxFontEnumerator enumerates all available fonts on the system or only the +// fonts with given attributes +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFontEnumerator +{ +public: + wxFontEnumerator() {} + + // virtual dtor for the base class + virtual ~wxFontEnumerator() {} + + // start enumerating font facenames (either all of them or those which + // support the given encoding) - will result in OnFacename() being + // called for each available facename (until they are exhausted or + // OnFacename returns false) + virtual bool EnumerateFacenames + ( + wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all + bool fixedWidthOnly = false + ); + + // enumerate the different encodings either for given font facename or for + // all facenames - will result in OnFontEncoding() being called for each + // available (facename, encoding) couple + virtual bool EnumerateEncodings(const wxString& facename = wxEmptyString); + + // callbacks which are called after one of EnumerateXXX() functions from + // above is invoked - all of them may return false to stop enumeration or + // true to continue with it + + // called by EnumerateFacenames + virtual bool OnFacename(const wxString& WXUNUSED(facename)) + { return true; } + + // called by EnumerateEncodings + virtual bool OnFontEncoding(const wxString& WXUNUSED(facename), + const wxString& WXUNUSED(encoding)) + { return true; } + + + + // convenience function that returns array of facenames. + static wxArrayString + GetFacenames(wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all + bool fixedWidthOnly = false); + + // convenience function that returns array of all available encodings. + static wxArrayString GetEncodings(const wxString& facename = wxEmptyString); + + // convenience function that returns true if the given face name exist + // in the user's system + static bool IsValidFacename(const wxString &str); + +private: +#ifdef wxHAS_UTF8_FONTS + // helper for ports that only use UTF-8 encoding natively + bool EnumerateEncodingsUTF8(const wxString& facename); +#endif + + wxDECLARE_NO_COPY_CLASS(wxFontEnumerator); +}; + +#endif // wxUSE_FONTENUM + +#endif // _WX_FONTENUM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontmap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontmap.h new file mode 100644 index 0000000000..c640daa83f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontmap.h @@ -0,0 +1,289 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fontmap.h +// Purpose: wxFontMapper class +// Author: Vadim Zeitlin +// Modified by: +// Created: 04.11.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONTMAPPER_H_ +#define _WX_FONTMAPPER_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#if wxUSE_FONTMAP + +#include "wx/fontenc.h" // for wxFontEncoding + +#if wxUSE_GUI + #include "wx/fontutil.h" // for wxNativeEncodingInfo +#endif // wxUSE_GUI + +#if wxUSE_CONFIG && wxUSE_FILECONFIG + class WXDLLIMPEXP_FWD_BASE wxConfigBase; +#endif // wxUSE_CONFIG + +class WXDLLIMPEXP_FWD_CORE wxFontMapper; + +#if wxUSE_GUI + class WXDLLIMPEXP_FWD_CORE wxWindow; +#endif // wxUSE_GUI + +// ============================================================================ +// wxFontMapper manages user-definable correspondence between wxWidgets font +// encodings and the fonts present on the machine. +// +// This is a singleton class, font mapper objects can only be accessed using +// wxFontMapper::Get(). +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxFontMapperBase: this is a non-interactive class which just uses its built +// in knowledge of the encodings equivalence +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFontMapperBase +{ +public: + // constructor and such + // --------------------- + + // default ctor + wxFontMapperBase(); + + // virtual dtor for any base class + virtual ~wxFontMapperBase(); + + // return instance of the wxFontMapper singleton + // wxBase code only cares that it's a wxFontMapperBase + // In wxBase, wxFontMapper is only forward declared + // so one cannot implicitly cast from it to wxFontMapperBase. + static wxFontMapperBase *Get(); + + // set the singleton to 'mapper' instance and return previous one + static wxFontMapper *Set(wxFontMapper *mapper); + + // delete the existing font mapper if any + static void Reset(); + + + // translates charset strings to encoding + // -------------------------------------- + + // returns the encoding for the given charset (in the form of RFC 2046) or + // wxFONTENCODING_SYSTEM if couldn't decode it + // + // interactive parameter is ignored in the base class, we behave as if it + // were always false + virtual wxFontEncoding CharsetToEncoding(const wxString& charset, + bool interactive = true); + + // information about supported encodings + // ------------------------------------- + + // get the number of font encodings we know about + static size_t GetSupportedEncodingsCount(); + + // get the n-th supported encoding + static wxFontEncoding GetEncoding(size_t n); + + // return canonical name of this encoding (this is a short string, + // GetEncodingDescription() returns a longer one) + static wxString GetEncodingName(wxFontEncoding encoding); + + // return a list of all names of this encoding (see GetEncodingName) + static const wxChar** GetAllEncodingNames(wxFontEncoding encoding); + + // return user-readable string describing the given encoding + // + // NB: hard-coded now, but might change later (read it from config?) + static wxString GetEncodingDescription(wxFontEncoding encoding); + + // find the encoding corresponding to the given name, inverse of + // GetEncodingName() and less general than CharsetToEncoding() + // + // returns wxFONTENCODING_MAX if the name is not a supported encoding + static wxFontEncoding GetEncodingFromName(const wxString& name); + + + // functions which allow to configure the config object used: by default, + // the global one (from wxConfigBase::Get() will be used) and the default + // root path for the config settings is the string returned by + // GetDefaultConfigPath() + // ---------------------------------------------------------------------- + +#if wxUSE_CONFIG && wxUSE_FILECONFIG + // set the root config path to use (should be an absolute path) + void SetConfigPath(const wxString& prefix); + + // return default config path + static const wxString& GetDefaultConfigPath(); +#endif // wxUSE_CONFIG + + + // returns true for the base class and false for a "real" font mapper object + // (implementation-only) + virtual bool IsDummy() { return true; } + +protected: +#if wxUSE_CONFIG && wxUSE_FILECONFIG + // get the config object we're using -- either the global config object + // or a wxMemoryConfig object created by this class otherwise + wxConfigBase *GetConfig(); + + // gets the root path for our settings -- if it wasn't set explicitly, use + // GetDefaultConfigPath() + const wxString& GetConfigPath(); + + // change to the given (relative) path in the config, return true if ok + // (then GetConfig() will return something !NULL), false if no config + // object + // + // caller should provide a pointer to the string variable which should be + // later passed to RestorePath() + bool ChangePath(const wxString& pathNew, wxString *pathOld); + + // restore the config path after use + void RestorePath(const wxString& pathOld); + + // config object and path (in it) to use + wxConfigBase *m_configDummy; + + wxString m_configRootPath; +#endif // wxUSE_CONFIG + + // the real implementation of the base class version of CharsetToEncoding() + // + // returns wxFONTENCODING_UNKNOWN if encoding is unknown and we shouldn't + // ask the user about it, wxFONTENCODING_SYSTEM if it is unknown but we + // should/could ask the user + int NonInteractiveCharsetToEncoding(const wxString& charset); + +private: + // the global fontmapper object or NULL + static wxFontMapper *sm_instance; + + friend class wxFontMapperPathChanger; + + wxDECLARE_NO_COPY_CLASS(wxFontMapperBase); +}; + +// ---------------------------------------------------------------------------- +// wxFontMapper: interactive extension of wxFontMapperBase +// +// The default implementations of all functions will ask the user if they are +// not capable of finding the answer themselves and store the answer in a +// config file (configurable via SetConfigXXX functions). This behaviour may +// be disabled by giving the value of false to "interactive" parameter. +// However, the functions will always consult the config file to allow the +// user-defined values override the default logic and there is no way to +// disable this -- which shouldn't be ever needed because if "interactive" was +// never true, the config file is never created anyhow. +// ---------------------------------------------------------------------------- + +#if wxUSE_GUI + +class WXDLLIMPEXP_CORE wxFontMapper : public wxFontMapperBase +{ +public: + // default ctor + wxFontMapper(); + + // virtual dtor for a base class + virtual ~wxFontMapper(); + + // working with the encodings + // -------------------------- + + // returns the encoding for the given charset (in the form of RFC 2046) or + // wxFONTENCODING_SYSTEM if couldn't decode it + virtual wxFontEncoding CharsetToEncoding(const wxString& charset, + bool interactive = true); + + // find an alternative for the given encoding (which is supposed to not be + // available on this system). If successful, return true and fill info + // structure with the parameters required to create the font, otherwise + // return false + virtual bool GetAltForEncoding(wxFontEncoding encoding, + wxNativeEncodingInfo *info, + const wxString& facename = wxEmptyString, + bool interactive = true); + + // version better suitable for 'public' use. Returns wxFontEcoding + // that can be used it wxFont ctor + bool GetAltForEncoding(wxFontEncoding encoding, + wxFontEncoding *alt_encoding, + const wxString& facename = wxEmptyString, + bool interactive = true); + + // checks whether given encoding is available in given face or not. + // + // if no facename is given (default), return true if it's available in any + // facename at alll. + virtual bool IsEncodingAvailable(wxFontEncoding encoding, + const wxString& facename = wxEmptyString); + + + // configure the appearance of the dialogs we may popup + // ---------------------------------------------------- + + // the parent window for modal dialogs + void SetDialogParent(wxWindow *parent) { m_windowParent = parent; } + + // the title for the dialogs (note that default is quite reasonable) + void SetDialogTitle(const wxString& title) { m_titleDialog = title; } + + // GUI code needs to know it's a wxFontMapper because there + // are additional methods in the subclass. + static wxFontMapper *Get(); + + // pseudo-RTTI since we aren't a wxObject. + virtual bool IsDummy() { return false; } + +protected: + // GetAltForEncoding() helper: tests for the existence of the given + // encoding and saves the result in config if ok - this results in the + // following (desired) behaviour: when an unknown/unavailable encoding is + // requested for the first time, the user is asked about a replacement, + // but if he doesn't choose any and the default logic finds one, it will + // be saved in the config so that the user won't be asked about it any + // more + bool TestAltEncoding(const wxString& configEntry, + wxFontEncoding encReplacement, + wxNativeEncodingInfo *info); + + // the title for our dialogs + wxString m_titleDialog; + + // the parent window for our dialogs + wxWindow *m_windowParent; + +private: + wxDECLARE_NO_COPY_CLASS(wxFontMapper); +}; + +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// global variables +// ---------------------------------------------------------------------------- + +// the default font mapper for wxWidgets programs do NOT use! This is for +// backward compatibility, use wxFontMapper::Get() instead +#define wxTheFontMapper (wxFontMapper::Get()) + +#else // !wxUSE_FONTMAP + +#if wxUSE_GUI + // wxEncodingToCodepage (utils.cpp) needs wxGetNativeFontEncoding + #include "wx/fontutil.h" +#endif + +#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP + +#endif // _WX_FONTMAPPER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontpicker.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontpicker.h new file mode 100644 index 0000000000..1bacc3a4a0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontpicker.h @@ -0,0 +1,221 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fontpicker.h +// Purpose: wxFontPickerCtrl base header +// Author: Francesco Montorsi +// Modified by: +// Created: 14/4/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONTPICKER_H_BASE_ +#define _WX_FONTPICKER_H_BASE_ + +#include "wx/defs.h" + + +#if wxUSE_FONTPICKERCTRL + +#include "wx/pickerbase.h" + + +class WXDLLIMPEXP_FWD_CORE wxFontPickerEvent; + +extern WXDLLIMPEXP_DATA_CORE(const char) wxFontPickerWidgetNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxFontPickerCtrlNameStr[]; + + +// ---------------------------------------------------------------------------- +// wxFontPickerWidgetBase: a generic abstract interface which must be +// implemented by controls used by wxFontPickerCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFontPickerWidgetBase +{ +public: + wxFontPickerWidgetBase() { m_selectedFont = *wxNORMAL_FONT; } + virtual ~wxFontPickerWidgetBase() {} + + wxFont GetSelectedFont() const + { return m_selectedFont; } + virtual void SetSelectedFont(const wxFont &f) + { m_selectedFont = f; UpdateFont(); } + +protected: + + virtual void UpdateFont() = 0; + + // the current font (may be invalid if none) + // NOTE: don't call this m_font as wxWindow::m_font already exists + wxFont m_selectedFont; +}; + +// Styles which must be supported by all controls implementing wxFontPickerWidgetBase +// NB: these styles must be defined to carefully-chosen values to +// avoid conflicts with wxButton's styles + + +// keeps the label of the button updated with the fontface name + font size +// E.g. choosing "Times New Roman bold, italic with size 10" from the fontdialog, +// updates the wxFontButtonGeneric's label (overwriting any previous label) +// with the "Times New Roman, 10" text (only fontface + fontsize is displayed +// to avoid extralong labels). +#define wxFNTP_FONTDESC_AS_LABEL 0x0008 + +// uses the currently selected font to draw the label of the button +#define wxFNTP_USEFONT_FOR_LABEL 0x0010 + +#define wxFONTBTN_DEFAULT_STYLE \ + (wxFNTP_FONTDESC_AS_LABEL | wxFNTP_USEFONT_FOR_LABEL) + +// native version currently only exists in wxGTK2 +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) + #include "wx/gtk/fontpicker.h" + #define wxFontPickerWidget wxFontButton +#else + #include "wx/generic/fontpickerg.h" + #define wxFontPickerWidget wxGenericFontButton +#endif + + +// ---------------------------------------------------------------------------- +// wxFontPickerCtrl specific flags +// ---------------------------------------------------------------------------- + +#define wxFNTP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL) +#define wxFNTP_DEFAULT_STYLE (wxFNTP_FONTDESC_AS_LABEL|wxFNTP_USEFONT_FOR_LABEL) + +// not a style but rather the default value of the maximum pointsize allowed +#define wxFNTP_MAXPOINT_SIZE 100 + + +// ---------------------------------------------------------------------------- +// wxFontPickerCtrl: platform-independent class which embeds the +// platform-dependent wxFontPickerWidget andm if wxFNTP_USE_TEXTCTRL style is +// used, a textctrl next to it. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFontPickerCtrl : public wxPickerBase +{ +public: + wxFontPickerCtrl() + : m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE) + { + } + + virtual ~wxFontPickerCtrl() {} + + + wxFontPickerCtrl(wxWindow *parent, + wxWindowID id, + const wxFont& initial = wxNullFont, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxFNTP_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFontPickerCtrlNameStr) + : m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE) + { + Create(parent, id, initial, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxFont& initial = wxNullFont, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxFNTP_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFontPickerCtrlNameStr); + + +public: // public API + + // get the font chosen + wxFont GetSelectedFont() const + { return ((wxFontPickerWidget *)m_picker)->GetSelectedFont(); } + + // sets currently displayed font + void SetSelectedFont(const wxFont& f); + + // set/get the max pointsize + void SetMaxPointSize(unsigned int max) + { m_nMaxPointSize=max; } + unsigned int GetMaxPointSize() const + { return m_nMaxPointSize; } + +public: // internal functions + + void UpdatePickerFromTextCtrl(); + void UpdateTextCtrlFromPicker(); + + // event handler for our picker + void OnFontChange(wxFontPickerEvent &); + + // used to convert wxString <-> wxFont + virtual wxString Font2String(const wxFont &font); + virtual wxFont String2Font(const wxString &font); + +protected: + + // extracts the style for our picker from wxFontPickerCtrl's style + long GetPickerStyle(long style) const + { return (style & (wxFNTP_FONTDESC_AS_LABEL|wxFNTP_USEFONT_FOR_LABEL)); } + + // the maximum pointsize allowed to the user + unsigned int m_nMaxPointSize; + +private: + DECLARE_DYNAMIC_CLASS(wxFontPickerCtrl) +}; + + +// ---------------------------------------------------------------------------- +// wxFontPickerEvent: used by wxFontPickerCtrl only +// ---------------------------------------------------------------------------- + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FONTPICKER_CHANGED, wxFontPickerEvent ); + +class WXDLLIMPEXP_CORE wxFontPickerEvent : public wxCommandEvent +{ +public: + wxFontPickerEvent() {} + wxFontPickerEvent(wxObject *generator, int id, const wxFont &f) + : wxCommandEvent(wxEVT_FONTPICKER_CHANGED, id), + m_font(f) + { + SetEventObject(generator); + } + + wxFont GetFont() const { return m_font; } + void SetFont(const wxFont &c) { m_font = c; } + + // default copy ctor, assignment operator and dtor are ok + virtual wxEvent *Clone() const { return new wxFontPickerEvent(*this); } + +private: + wxFont m_font; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFontPickerEvent) +}; + +// ---------------------------------------------------------------------------- +// event types and macros +// ---------------------------------------------------------------------------- + +typedef void (wxEvtHandler::*wxFontPickerEventFunction)(wxFontPickerEvent&); + +#define wxFontPickerEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxFontPickerEventFunction, func) + +#define EVT_FONTPICKER_CHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_FONTPICKER_CHANGED, id, wxFontPickerEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_FONTPICKER_CHANGED wxEVT_FONTPICKER_CHANGED + + +#endif // wxUSE_FONTPICKERCTRL + +#endif + // _WX_FONTPICKER_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontutil.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontutil.h new file mode 100644 index 0000000000..60bb874640 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fontutil.h @@ -0,0 +1,319 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fontutil.h +// Purpose: font-related helper functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 05.11.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// General note: this header is private to wxWidgets and is not supposed to be +// included by user code. The functions declared here are implemented in +// msw/fontutil.cpp for Windows, unix/fontutil.cpp for GTK/Motif &c. + +#ifndef _WX_FONTUTIL_H_ +#define _WX_FONTUTIL_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/font.h" // for wxFont and wxFontEncoding + +#if defined(__WXMSW__) + #include "wx/msw/wrapwin.h" +#endif + +class WXDLLIMPEXP_FWD_BASE wxArrayString; +struct WXDLLIMPEXP_FWD_CORE wxNativeEncodingInfo; + +#if defined(_WX_X_FONTLIKE) + +// the symbolic names for the XLFD fields (with examples for their value) +// +// NB: we suppose that the font always starts with the empty token (font name +// registry field) as we never use nor generate it anyhow +enum wxXLFDField +{ + wxXLFD_FOUNDRY, // adobe + wxXLFD_FAMILY, // courier, times, ... + wxXLFD_WEIGHT, // black, bold, demibold, medium, regular, light + wxXLFD_SLANT, // r/i/o (roman/italique/oblique) + wxXLFD_SETWIDTH, // condensed, expanded, ... + wxXLFD_ADDSTYLE, // whatever - usually nothing + wxXLFD_PIXELSIZE, // size in pixels + wxXLFD_POINTSIZE, // size in points + wxXLFD_RESX, // 72, 75, 100, ... + wxXLFD_RESY, + wxXLFD_SPACING, // m/p/c (monospaced/proportional/character cell) + wxXLFD_AVGWIDTH, // average width in 1/10 pixels + wxXLFD_REGISTRY, // iso8859, rawin, koi8, ... + wxXLFD_ENCODING, // 1, r, r, ... + wxXLFD_MAX +}; + +#endif // _WX_X_FONTLIKE + +// ---------------------------------------------------------------------------- +// types +// ---------------------------------------------------------------------------- + +// wxNativeFontInfo is platform-specific font representation: this struct +// should be considered as opaque font description only used by the native +// functions, the user code can only get the objects of this type from +// somewhere and pass it somewhere else (possibly save them somewhere using +// ToString() and restore them using FromString()) + +class WXDLLIMPEXP_CORE wxNativeFontInfo +{ +public: +#if wxUSE_PANGO + PangoFontDescription *description; + + // Pango font description doesn't have these attributes, so we store them + // separately and handle them ourselves in {To,From}String() methods. + bool m_underlined; + bool m_strikethrough; +#elif defined(_WX_X_FONTLIKE) + // the members can't be accessed directly as we only parse the + // xFontName on demand +private: + // the components of the XLFD + wxString fontElements[wxXLFD_MAX]; + + // the full XLFD + wxString xFontName; + + // true until SetXFontName() is called + bool m_isDefault; + + // return true if we have already initialized fontElements + inline bool HasElements() const; + +public: + // init the elements from an XLFD, return true if ok + bool FromXFontName(const wxString& xFontName); + + // return false if we were never initialized with a valid XLFD + bool IsDefault() const { return m_isDefault; } + + // return the XLFD (using the fontElements if necessary) + wxString GetXFontName() const; + + // get the given XFLD component + wxString GetXFontComponent(wxXLFDField field) const; + + // change the font component + void SetXFontComponent(wxXLFDField field, const wxString& value); + + // set the XFLD + void SetXFontName(const wxString& xFontName); +#elif defined(__WXMSW__) + wxNativeFontInfo(const LOGFONT& lf_) : lf(lf_) { } + + LOGFONT lf; +#elif defined(__WXPM__) + // OS/2 native structures that define a font + FATTRS fa; + FONTMETRICS fm; + FACENAMEDESC fn; +#elif defined(__WXOSX__) +public: + wxNativeFontInfo(const wxNativeFontInfo& info) { Init(info); } + wxNativeFontInfo( int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined, + const wxString& faceName, + wxFontEncoding encoding) + { Init(size,family,style,weight,underlined,faceName,encoding); } + + ~wxNativeFontInfo() { Free(); } + + wxNativeFontInfo& operator=(const wxNativeFontInfo& info) + { + if (this != &info) + { + Free(); + Init(info); + } + return *this; + } + + void Init(CTFontDescriptorRef descr); + void Init(const wxNativeFontInfo& info); + void Init(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined, + const wxString& faceName , + wxFontEncoding encoding); + + void Free(); + void EnsureValid(); + + static void UpdateNamesMap(const wxString& familyname, CTFontDescriptorRef descr); + static void UpdateNamesMap(const wxString& familyname, CTFontRef font); + + bool m_descriptorValid; + +#if wxOSX_USE_ATSU_TEXT + bool m_atsuFontValid; + // the atsu font ID + wxUint32 m_atsuFontID; + // the qd styles that are not intrinsic to the font above + wxInt16 m_atsuAdditionalQDStyles; +#if wxOSX_USE_CARBON + wxInt16 m_qdFontFamily; + wxInt16 m_qdFontStyle; +#endif +#endif + + int m_pointSize; + wxFontFamily m_family; + wxFontStyle m_style; + wxFontWeight m_weight; + bool m_underlined; + bool m_strikethrough; + wxString m_faceName; + wxFontEncoding m_encoding; +public : +#else // other platforms + // + // This is a generic implementation that should work on all ports + // without specific support by the port. + // + #define wxNO_NATIVE_FONTINFO + + int pointSize; + wxFontFamily family; + wxFontStyle style; + wxFontWeight weight; + bool underlined; + bool strikethrough; + wxString faceName; + wxFontEncoding encoding; +#endif // platforms + + // default ctor (default copy ctor is ok) + wxNativeFontInfo() { Init(); } + +#if wxUSE_PANGO +private: + void Init(const wxNativeFontInfo& info); + void Free(); + +public: + wxNativeFontInfo(const wxNativeFontInfo& info) { Init(info); } + ~wxNativeFontInfo() { Free(); } + + wxNativeFontInfo& operator=(const wxNativeFontInfo& info) + { + if (this != &info) + { + Free(); + Init(info); + } + return *this; + } +#endif // wxUSE_PANGO + + // reset to the default state + void Init(); + + // init with the parameters of the given font + void InitFromFont(const wxFont& font) + { + // translate all font parameters + SetStyle((wxFontStyle)font.GetStyle()); + SetWeight((wxFontWeight)font.GetWeight()); + SetUnderlined(font.GetUnderlined()); + SetStrikethrough(font.GetStrikethrough()); +#if defined(__WXMSW__) + if ( font.IsUsingSizeInPixels() ) + SetPixelSize(font.GetPixelSize()); + else + SetPointSize(font.GetPointSize()); +#else + SetPointSize(font.GetPointSize()); +#endif + + // set the family/facename + SetFamily((wxFontFamily)font.GetFamily()); + const wxString& facename = font.GetFaceName(); + if ( !facename.empty() ) + { + SetFaceName(facename); + } + + // deal with encoding now (it may override the font family and facename + // so do it after setting them) + SetEncoding(font.GetEncoding()); + } + + // accessors and modifiers for the font elements + int GetPointSize() const; + wxSize GetPixelSize() const; + wxFontStyle GetStyle() const; + wxFontWeight GetWeight() const; + bool GetUnderlined() const; + bool GetStrikethrough() const; + wxString GetFaceName() const; + wxFontFamily GetFamily() const; + wxFontEncoding GetEncoding() const; + + void SetPointSize(int pointsize); + void SetPixelSize(const wxSize& pixelSize); + void SetStyle(wxFontStyle style); + void SetWeight(wxFontWeight weight); + void SetUnderlined(bool underlined); + void SetStrikethrough(bool strikethrough); + bool SetFaceName(const wxString& facename); + void SetFamily(wxFontFamily family); + void SetEncoding(wxFontEncoding encoding); + + // sets the first facename in the given array which is found + // to be valid. If no valid facename is given, sets the + // first valid facename returned by wxFontEnumerator::GetFacenames(). + // Does not return a bool since it cannot fail. + void SetFaceName(const wxArrayString &facenames); + + + // it is important to be able to serialize wxNativeFontInfo objects to be + // able to store them (in config file, for example) + bool FromString(const wxString& s); + wxString ToString() const; + + // we also want to present the native font descriptions to the user in some + // human-readable form (it is not platform independent neither, but can + // hopefully be understood by the user) + bool FromUserString(const wxString& s); + wxString ToUserString() const; +}; + +// ---------------------------------------------------------------------------- +// font-related functions (common) +// ---------------------------------------------------------------------------- + +// translate a wxFontEncoding into native encoding parameter (defined above), +// returning true if an (exact) macth could be found, false otherwise (without +// attempting any substitutions) +WXDLLIMPEXP_CORE bool wxGetNativeFontEncoding(wxFontEncoding encoding, + wxNativeEncodingInfo *info); + +// test for the existence of the font described by this facename/encoding, +// return true if such font(s) exist, false otherwise +WXDLLIMPEXP_CORE bool wxTestFontEncoding(const wxNativeEncodingInfo& info); + +// ---------------------------------------------------------------------------- +// font-related functions (X and GTK) +// ---------------------------------------------------------------------------- + +#ifdef _WX_X_FONTLIKE + #include "wx/unix/fontutil.h" +#endif // X || GDK + +#endif // _WX_FONTUTIL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/frame.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/frame.h new file mode 100644 index 0000000000..41927f775a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/frame.h @@ -0,0 +1,275 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/frame.h +// Purpose: wxFrame class interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 15.11.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FRAME_H_BASE_ +#define _WX_FRAME_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/toplevel.h" // the base class +#include "wx/statusbr.h" + +// the default names for various classs +extern WXDLLIMPEXP_DATA_CORE(const char) wxStatusLineNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxToolBarNameStr[]; + +class WXDLLIMPEXP_FWD_CORE wxFrame; +class WXDLLIMPEXP_FWD_CORE wxMenuBar; +class WXDLLIMPEXP_FWD_CORE wxMenuItem; +class WXDLLIMPEXP_FWD_CORE wxStatusBar; +class WXDLLIMPEXP_FWD_CORE wxToolBar; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// wxFrame-specific (i.e. not for wxDialog) styles +// +// Also see the bit summary table in wx/toplevel.h. +#define wxFRAME_NO_TASKBAR 0x0002 // No taskbar button (MSW only) +#define wxFRAME_TOOL_WINDOW 0x0004 // No taskbar button, no system menu +#define wxFRAME_FLOAT_ON_PARENT 0x0008 // Always above its parent + +// ---------------------------------------------------------------------------- +// wxFrame is a top-level window with optional menubar, statusbar and toolbar +// +// For each of *bars, a frame may have several of them, but only one is +// managed by the frame, i.e. resized/moved when the frame is and whose size +// is accounted for in client size calculations - all others should be taken +// care of manually. The CreateXXXBar() functions create this, main, XXXBar, +// but the actual creation is done in OnCreateXXXBar() functions which may be +// overridden to create custom objects instead of standard ones when +// CreateXXXBar() is called. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFrameBase : public wxTopLevelWindow +{ +public: + // construction + wxFrameBase(); + virtual ~wxFrameBase(); + + wxFrame *New(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + // frame state + // ----------- + + // get the origin of the client area (which may be different from (0, 0) + // if the frame has a toolbar) in client coordinates + virtual wxPoint GetClientAreaOrigin() const; + + + // menu bar functions + // ------------------ + +#if wxUSE_MENUS + virtual void SetMenuBar(wxMenuBar *menubar); + virtual wxMenuBar *GetMenuBar() const { return m_frameMenuBar; } + + // find the item by id in the frame menu bar: this is an internal function + // and exists mainly in order to be overridden in the MDI parent frame + // which also looks at its active child menu bar + virtual wxMenuItem *FindItemInMenuBar(int menuId) const; + + // generate menu command corresponding to the given menu item + // + // returns true if processed + bool ProcessCommand(wxMenuItem *item); + + // generate menu command corresponding to the given menu command id + // + // returns true if processed + bool ProcessCommand(int winid); +#else + bool ProcessCommand(int WXUNUSED(winid)) { return false; } +#endif // wxUSE_MENUS + + // status bar functions + // -------------------- +#if wxUSE_STATUSBAR + // create the main status bar by calling OnCreateStatusBar() + virtual wxStatusBar* CreateStatusBar(int number = 1, + long style = wxSTB_DEFAULT_STYLE, + wxWindowID winid = 0, + const wxString& name = wxStatusLineNameStr); + // return a new status bar + virtual wxStatusBar *OnCreateStatusBar(int number, + long style, + wxWindowID winid, + const wxString& name); + // get the main status bar + virtual wxStatusBar *GetStatusBar() const { return m_frameStatusBar; } + + // sets the main status bar + virtual void SetStatusBar(wxStatusBar *statBar); + + // forward these to status bar + virtual void SetStatusText(const wxString &text, int number = 0); + virtual void SetStatusWidths(int n, const int widths_field[]); + void PushStatusText(const wxString &text, int number = 0); + void PopStatusText(int number = 0); + + // set the status bar pane the help will be shown in + void SetStatusBarPane(int n) { m_statusBarPane = n; } + int GetStatusBarPane() const { return m_statusBarPane; } +#endif // wxUSE_STATUSBAR + + // toolbar functions + // ----------------- + +#if wxUSE_TOOLBAR + // create main toolbar bycalling OnCreateToolBar() + virtual wxToolBar* CreateToolBar(long style = -1, + wxWindowID winid = wxID_ANY, + const wxString& name = wxToolBarNameStr); + // return a new toolbar + virtual wxToolBar *OnCreateToolBar(long style, + wxWindowID winid, + const wxString& name ); + + // get/set the main toolbar + virtual wxToolBar *GetToolBar() const { return m_frameToolBar; } + virtual void SetToolBar(wxToolBar *toolbar); +#endif // wxUSE_TOOLBAR + + // implementation only from now on + // ------------------------------- + + // event handlers +#if wxUSE_MENUS +#if wxUSE_STATUSBAR + void OnMenuOpen(wxMenuEvent& event); + void OnMenuClose(wxMenuEvent& event); + void OnMenuHighlight(wxMenuEvent& event); +#endif // wxUSE_STATUSBAR + + // send wxUpdateUIEvents for all menu items in the menubar, + // or just for menu if non-NULL + virtual void DoMenuUpdates(wxMenu* menu = NULL); +#endif // wxUSE_MENUS + + // do the UI update processing for this window + virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE); + + // Implement internal behaviour (menu updating on some platforms) + virtual void OnInternalIdle(); + +#if wxUSE_MENUS || wxUSE_TOOLBAR + // show help text for the currently selected menu or toolbar item + // (typically in the status bar) or hide it and restore the status bar text + // originally shown before the menu was opened if show == false + virtual void DoGiveHelp(const wxString& text, bool show); +#endif + + virtual bool IsClientAreaChild(const wxWindow *child) const + { + return !IsOneOfBars(child) && wxTopLevelWindow::IsClientAreaChild(child); + } + +protected: + // the frame main menu/status/tool bars + // ------------------------------------ + + // this (non virtual!) function should be called from dtor to delete the + // main menubar, statusbar and toolbar (if any) + void DeleteAllBars(); + + // test whether this window makes part of the frame + virtual bool IsOneOfBars(const wxWindow *win) const; + +#if wxUSE_MENUS + // override to update menu bar position when the frame size changes + virtual void PositionMenuBar() { } + + // override to do something special when the menu bar is being removed + // from the frame + virtual void DetachMenuBar(); + + // override to do something special when the menu bar is attached to the + // frame + virtual void AttachMenuBar(wxMenuBar *menubar); + + // Return true if we should update the menu item state from idle event + // handler or false if we should delay it until the menu is opened. + static bool ShouldUpdateMenuFromIdle(); + + wxMenuBar *m_frameMenuBar; +#endif // wxUSE_MENUS + +#if wxUSE_STATUSBAR && (wxUSE_MENUS || wxUSE_TOOLBAR) + // the saved status bar text overwritten by DoGiveHelp() + wxString m_oldStatusText; + + // the last help string we have shown in the status bar + wxString m_lastHelpShown; +#endif + +#if wxUSE_STATUSBAR + // override to update status bar position (or anything else) when + // something changes + virtual void PositionStatusBar() { } + + // show the help string for the given menu item using DoGiveHelp() if the + // given item does have a help string (as determined by FindInMenuBar()), + // return false if there is no help for such item + bool ShowMenuHelp(int helpid); + + wxStatusBar *m_frameStatusBar; +#endif // wxUSE_STATUSBAR + + + int m_statusBarPane; + +#if wxUSE_TOOLBAR + // override to update status bar position (or anything else) when + // something changes + virtual void PositionToolBar() { } + + wxToolBar *m_frameToolBar; +#endif // wxUSE_TOOLBAR + +#if wxUSE_MENUS && wxUSE_STATUSBAR + DECLARE_EVENT_TABLE() +#endif // wxUSE_MENUS && wxUSE_STATUSBAR + + wxDECLARE_NO_COPY_CLASS(wxFrameBase); +}; + +// include the real class declaration +#if defined(__WXUNIVERSAL__) // && !defined(__WXMICROWIN__) + #include "wx/univ/frame.h" +#else // !__WXUNIVERSAL__ + #if defined(__WXMSW__) + #include "wx/msw/frame.h" + #elif defined(__WXGTK20__) + #include "wx/gtk/frame.h" + #elif defined(__WXGTK__) + #include "wx/gtk1/frame.h" + #elif defined(__WXMOTIF__) + #include "wx/motif/frame.h" + #elif defined(__WXMAC__) + #include "wx/osx/frame.h" + #elif defined(__WXCOCOA__) + #include "wx/cocoa/frame.h" + #elif defined(__WXPM__) + #include "wx/os2/frame.h" + #endif +#endif + +#endif + // _WX_FRAME_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_arc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_arc.h new file mode 100644 index 0000000000..e65b8fc7b6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_arc.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fs_arc.h +// Purpose: Archive file system +// Author: Vaclav Slavik, Mike Wetherell +// Copyright: (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FS_ARC_H_ +#define _WX_FS_ARC_H_ + +#include "wx/defs.h" + +#if wxUSE_FS_ARCHIVE + +#include "wx/filesys.h" +#include "wx/hashmap.h" + +WX_DECLARE_STRING_HASH_MAP(int, wxArchiveFilenameHashMap); + +//--------------------------------------------------------------------------- +// wxArchiveFSHandler +//--------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxArchiveFSHandler : public wxFileSystemHandler +{ +public: + wxArchiveFSHandler(); + virtual bool CanOpen(const wxString& location); + virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); + virtual wxString FindFirst(const wxString& spec, int flags = 0); + virtual wxString FindNext(); + void Cleanup(); + virtual ~wxArchiveFSHandler(); + +private: + class wxArchiveFSCache *m_cache; + wxFileSystem m_fs; + + // these vars are used by FindFirst/Next: + class wxArchiveFSCacheData *m_Archive; + struct wxArchiveFSEntry *m_FindEntry; + wxString m_Pattern, m_BaseDir, m_ZipFile; + bool m_AllowDirs, m_AllowFiles; + wxArchiveFilenameHashMap *m_DirsFound; + + wxString DoFind(); + + wxDECLARE_NO_COPY_CLASS(wxArchiveFSHandler); + DECLARE_DYNAMIC_CLASS(wxArchiveFSHandler) +}; + +#endif // wxUSE_FS_ARCHIVE + +#endif // _WX_FS_ARC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_filter.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_filter.h new file mode 100644 index 0000000000..8e8afda4e2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_filter.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fs_filter.h +// Purpose: Filter file system handler +// Author: Mike Wetherell +// Copyright: (c) 2006 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FS_FILTER_H_ +#define _WX_FS_FILTER_H_ + +#include "wx/defs.h" + +#if wxUSE_FILESYSTEM + +#include "wx/filesys.h" + +//--------------------------------------------------------------------------- +// wxFilterFSHandler +//--------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFilterFSHandler : public wxFileSystemHandler +{ +public: + wxFilterFSHandler() : wxFileSystemHandler() { } + virtual ~wxFilterFSHandler() { } + + virtual bool CanOpen(const wxString& location); + virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); + + virtual wxString FindFirst(const wxString& spec, int flags = 0); + virtual wxString FindNext(); + +private: + wxDECLARE_NO_COPY_CLASS(wxFilterFSHandler); +}; + +#endif // wxUSE_FILESYSTEM + +#endif // _WX_FS_FILTER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_inet.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_inet.h new file mode 100644 index 0000000000..bde0c69546 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_inet.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fs_inet.h +// Purpose: HTTP and FTP file system +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FS_INET_H_ +#define _WX_FS_INET_H_ + +#include "wx/defs.h" + +#if wxUSE_FILESYSTEM && wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS + +#include "wx/filesys.h" + +// ---------------------------------------------------------------------------- +// wxInternetFSHandler +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_NET wxInternetFSHandler : public wxFileSystemHandler +{ + public: + virtual bool CanOpen(const wxString& location); + virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); +}; + +#endif + // wxUSE_FILESYSTEM && wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS + +#endif // _WX_FS_INET_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_mem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_mem.h new file mode 100644 index 0000000000..6688537ca5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_mem.h @@ -0,0 +1,140 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fs_mem.h +// Purpose: in-memory file system +// Author: Vaclav Slavik +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FS_MEM_H_ +#define _WX_FS_MEM_H_ + +#include "wx/defs.h" + +#if wxUSE_FILESYSTEM + +#include "wx/filesys.h" + +#include "wx/hashmap.h" + +class wxMemoryFSFile; +WX_DECLARE_STRING_HASH_MAP(wxMemoryFSFile *, wxMemoryFSHash); + +#if wxUSE_GUI + #include "wx/bitmap.h" +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// wxMemoryFSHandlerBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMemoryFSHandlerBase : public wxFileSystemHandler +{ +public: + wxMemoryFSHandlerBase(); + virtual ~wxMemoryFSHandlerBase(); + + // Add file to list of files stored in memory. Stored data (bitmap, text or + // raw data) will be copied into private memory stream and available under + // name "memory:" + filename + static void AddFile(const wxString& filename, const wxString& textdata); + static void AddFile(const wxString& filename, const void *binarydata, size_t size); + static void AddFileWithMimeType(const wxString& filename, + const wxString& textdata, + const wxString& mimetype); + static void AddFileWithMimeType(const wxString& filename, + const void *binarydata, size_t size, + const wxString& mimetype); + + // Remove file from memory FS and free occupied memory + static void RemoveFile(const wxString& filename); + + virtual bool CanOpen(const wxString& location); + virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); + virtual wxString FindFirst(const wxString& spec, int flags = 0); + virtual wxString FindNext(); + +protected: + // check that the given file is not already present in m_Hash; logs an + // error and returns false if it does exist + static bool CheckDoesntExist(const wxString& filename); + + // the hash map indexed by the names of the files stored in the memory FS + static wxMemoryFSHash m_Hash; + + // the file name currently being searched for, i.e. the argument of the + // last FindFirst() call or empty string if FindFirst() hasn't been called + // yet or FindNext() didn't find anything + wxString m_findArgument; + + // iterator into m_Hash used by FindFirst/Next(), possibly m_Hash.end() or + // even invalid (can only be used when m_findArgument is not empty) + wxMemoryFSHash::const_iterator m_findIter; +}; + +// ---------------------------------------------------------------------------- +// wxMemoryFSHandler +// ---------------------------------------------------------------------------- + +#if wxUSE_GUI + +// add GUI-only operations to the base class +class WXDLLIMPEXP_CORE wxMemoryFSHandler : public wxMemoryFSHandlerBase +{ +public: + // bring the base class versions into the scope, otherwise they would be + // inaccessible in wxMemoryFSHandler + // (unfortunately "using" can't be used as gcc 2.95 doesn't have it...) + static void AddFile(const wxString& filename, const wxString& textdata) + { + wxMemoryFSHandlerBase::AddFile(filename, textdata); + } + + static void AddFile(const wxString& filename, + const void *binarydata, + size_t size) + { + wxMemoryFSHandlerBase::AddFile(filename, binarydata, size); + } + static void AddFileWithMimeType(const wxString& filename, + const wxString& textdata, + const wxString& mimetype) + { + wxMemoryFSHandlerBase::AddFileWithMimeType(filename, + textdata, + mimetype); + } + static void AddFileWithMimeType(const wxString& filename, + const void *binarydata, size_t size, + const wxString& mimetype) + { + wxMemoryFSHandlerBase::AddFileWithMimeType(filename, + binarydata, size, + mimetype); + } + +#if wxUSE_IMAGE + static void AddFile(const wxString& filename, + const wxImage& image, + wxBitmapType type); + + static void AddFile(const wxString& filename, + const wxBitmap& bitmap, + wxBitmapType type); +#endif // wxUSE_IMAGE + +}; + +#else // !wxUSE_GUI + +// just the same thing as the base class in wxBase +class WXDLLIMPEXP_BASE wxMemoryFSHandler : public wxMemoryFSHandlerBase +{ +}; + +#endif // wxUSE_GUI/!wxUSE_GUI + +#endif // wxUSE_FILESYSTEM + +#endif // _WX_FS_MEM_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_zip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_zip.h new file mode 100644 index 0000000000..197a46a5ef --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fs_zip.h @@ -0,0 +1,22 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fs_zip.h +// Purpose: wxZipFSHandler typedef for compatibility +// Author: Mike Wetherell +// Copyright: (c) 2006 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FS_ZIP_H_ +#define _WX_FS_ZIP_H_ + +#include "wx/defs.h" + +#if wxUSE_FS_ZIP + +#include "wx/fs_arc.h" + +typedef wxArchiveFSHandler wxZipFSHandler; + +#endif // wxUSE_FS_ZIP + +#endif // _WX_FS_ZIP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/fswatcher.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fswatcher.h new file mode 100644 index 0000000000..056780d348 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/fswatcher.h @@ -0,0 +1,411 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/fswatcher.h +// Purpose: wxFileSystemWatcherBase +// Author: Bartosz Bekier +// Created: 2009-05-23 +// Copyright: (c) 2009 Bartosz Bekier +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FSWATCHER_BASE_H_ +#define _WX_FSWATCHER_BASE_H_ + +#include "wx/defs.h" + +#if wxUSE_FSWATCHER + +#include "wx/log.h" +#include "wx/event.h" +#include "wx/evtloop.h" +#include "wx/filename.h" +#include "wx/dir.h" +#include "wx/hashmap.h" + +#define wxTRACE_FSWATCHER "fswatcher" + +// ---------------------------------------------------------------------------- +// wxFileSystemWatcherEventType & wxFileSystemWatcherEvent +// ---------------------------------------------------------------------------- + +/** + * Possible types of file system events. + * This is a subset that will work fine an all platforms (actually, we will + * see how it works on Mac). + * + * We got 2 types of error events: + * - warning: these are not fatal and further events can still be generated + * - error: indicates fatal error and causes that no more events will happen + */ +enum +{ + wxFSW_EVENT_CREATE = 0x01, + wxFSW_EVENT_DELETE = 0x02, + wxFSW_EVENT_RENAME = 0x04, + wxFSW_EVENT_MODIFY = 0x08, + wxFSW_EVENT_ACCESS = 0x10, + wxFSW_EVENT_ATTRIB = 0x20, // Currently this is wxGTK-only + + // error events + wxFSW_EVENT_WARNING = 0x40, + wxFSW_EVENT_ERROR = 0x80, + wxFSW_EVENT_ALL = wxFSW_EVENT_CREATE | wxFSW_EVENT_DELETE | + wxFSW_EVENT_RENAME | wxFSW_EVENT_MODIFY | + wxFSW_EVENT_ACCESS | wxFSW_EVENT_ATTRIB | + wxFSW_EVENT_WARNING | wxFSW_EVENT_ERROR +#ifdef wxHAS_INOTIFY + ,wxFSW_EVENT_UNMOUNT = 0x2000 +#endif +}; + +// Type of the path watched, used only internally for now. +enum wxFSWPathType +{ + wxFSWPath_None, // Invalid value for an initialized watch. + wxFSWPath_File, // Plain file. + wxFSWPath_Dir, // Watch a directory and the files in it. + wxFSWPath_Tree // Watch a directory and all its children recursively. +}; + +// Type of the warning for the events notifying about them. +enum wxFSWWarningType +{ + wxFSW_WARNING_NONE, + wxFSW_WARNING_GENERAL, + wxFSW_WARNING_OVERFLOW +}; + +/** + * Event containing information about file system change. + */ +class WXDLLIMPEXP_FWD_BASE wxFileSystemWatcherEvent; +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_FSWATCHER, + wxFileSystemWatcherEvent); + +class WXDLLIMPEXP_BASE wxFileSystemWatcherEvent: public wxEvent +{ +public: + // Constructor for any kind of events, also used as default ctor. + wxFileSystemWatcherEvent(int changeType = 0, int watchid = wxID_ANY) : + wxEvent(watchid, wxEVT_FSWATCHER), + m_changeType(changeType), + m_warningType(wxFSW_WARNING_NONE) + { + } + + // Constructor for the error or warning events. + wxFileSystemWatcherEvent(int changeType, + wxFSWWarningType warningType, + const wxString& errorMsg = wxString(), + int watchid = wxID_ANY) : + wxEvent(watchid, wxEVT_FSWATCHER), + m_changeType(changeType), + m_warningType(warningType), + m_errorMsg(errorMsg) + { + } + + // Constructor for the normal events carrying information about the changes. + wxFileSystemWatcherEvent(int changeType, + const wxFileName& path, const wxFileName& newPath, + int watchid = wxID_ANY) : + wxEvent(watchid, wxEVT_FSWATCHER), + m_changeType(changeType), + m_warningType(wxFSW_WARNING_NONE), + m_path(path), + m_newPath(newPath) + + { + } + + /** + * Returns the path at which the event occurred. + */ + const wxFileName& GetPath() const + { + return m_path; + } + + /** + * Sets the path at which the event occurred + */ + void SetPath(const wxFileName& path) + { + m_path = path; + } + + /** + * In case of rename(move?) events, returns the new path related to the + * event. The "new" means newer in the sense of time. In case of other + * events it returns the same path as GetPath(). + */ + const wxFileName& GetNewPath() const + { + return m_newPath; + } + + /** + * Sets the new path related to the event. See above. + */ + void SetNewPath(const wxFileName& path) + { + m_newPath = path; + } + + /** + * Returns the type of file system event that occurred. + */ + int GetChangeType() const + { + return m_changeType; + } + + virtual wxEvent* Clone() const + { + wxFileSystemWatcherEvent* evt = new wxFileSystemWatcherEvent(*this); + evt->m_errorMsg = m_errorMsg.Clone(); + evt->m_path = wxFileName(m_path.GetFullPath().Clone()); + evt->m_newPath = wxFileName(m_newPath.GetFullPath().Clone()); + evt->m_warningType = m_warningType; + return evt; + } + + virtual wxEventCategory GetEventCategory() const + { + // TODO this has to be merged with "similar" categories and changed + return wxEVT_CATEGORY_UNKNOWN; + } + + /** + * Returns if this error is an error event + */ + bool IsError() const + { + return (m_changeType & (wxFSW_EVENT_ERROR | wxFSW_EVENT_WARNING)) != 0; + } + + wxString GetErrorDescription() const + { + return m_errorMsg; + } + + wxFSWWarningType GetWarningType() const + { + return m_warningType; + } + + /** + * Returns a wxString describing an event useful for debugging or testing + */ + wxString ToString() const; + +protected: + int m_changeType; + wxFSWWarningType m_warningType; + wxFileName m_path; + wxFileName m_newPath; + wxString m_errorMsg; +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFileSystemWatcherEvent) +}; + +typedef void (wxEvtHandler::*wxFileSystemWatcherEventFunction) + (wxFileSystemWatcherEvent&); + +#define wxFileSystemWatcherEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxFileSystemWatcherEventFunction, func) + +#define EVT_FSWATCHER(winid, func) \ + wx__DECLARE_EVT1(wxEVT_FSWATCHER, winid, wxFileSystemWatcherEventHandler(func)) + +// ---------------------------------------------------------------------------- +// wxFileSystemWatcherBase: interface for wxFileSystemWatcher +// ---------------------------------------------------------------------------- + +// Simple container to store information about one watched path. +class wxFSWatchInfo +{ +public: + wxFSWatchInfo() : + m_events(-1), m_type(wxFSWPath_None), m_refcount(-1) + { + } + + wxFSWatchInfo(const wxString& path, + int events, + wxFSWPathType type, + const wxString& filespec = wxString()) : + m_path(path), m_filespec(filespec), m_events(events), m_type(type), + m_refcount(1) + { + } + + const wxString& GetPath() const + { + return m_path; + } + + const wxString& GetFilespec() const { return m_filespec; } + + int GetFlags() const + { + return m_events; + } + + wxFSWPathType GetType() const + { + return m_type; + } + + // Reference counting of watch entries is used to avoid watching the same + // file system path multiple times (this can happen even accidentally, e.g. + // when you have a recursive watch and then decide to watch some file or + // directory under it separately). + int IncRef() + { + return ++m_refcount; + } + + int DecRef() + { + wxASSERT_MSG( m_refcount > 0, wxS("Trying to decrement a zero count") ); + return --m_refcount; + } + +protected: + wxString m_path; + wxString m_filespec; // For tree watches, holds any filespec to apply + int m_events; + wxFSWPathType m_type; + int m_refcount; +}; + +WX_DECLARE_STRING_HASH_MAP(wxFSWatchInfo, wxFSWatchInfoMap); + +/** + * Encapsulation of platform-specific file system event mechanism + */ +class wxFSWatcherImpl; + +/** + * Main entry point for clients interested in file system events. + * Defines interface that can be used to receive that kind of events. + */ +class WXDLLIMPEXP_BASE wxFileSystemWatcherBase: public wxEvtHandler +{ +public: + wxFileSystemWatcherBase(); + + virtual ~wxFileSystemWatcherBase(); + + /** + * Adds path to currently watched files. Any events concerning this + * particular path will be sent to handler. Optionally a filter can be + * specified to receive only events of particular type. + * + * Please note that when adding a dir, immediate children will be watched + * as well. + */ + virtual bool Add(const wxFileName& path, int events = wxFSW_EVENT_ALL); + + /** + * Like above, but recursively adds every file/dir in the tree rooted in + * path. Additionally a file mask can be specified to include only files + * of particular type. + */ + virtual bool AddTree(const wxFileName& path, int events = wxFSW_EVENT_ALL, + const wxString& filespec = wxEmptyString); + + /** + * Removes path from the list of watched paths. + */ + virtual bool Remove(const wxFileName& path); + + /** + * Same as above, but also removes every file belonging to the tree rooted + * at path. + */ + virtual bool RemoveTree(const wxFileName& path); + + /** + * Clears the list of currently watched paths. + */ + virtual bool RemoveAll(); + + /** + * Returns the number of watched paths + */ + int GetWatchedPathsCount() const; + + /** + * Retrevies all watched paths and places them in wxArrayString. Returns + * the number of paths. + * + * TODO think about API here: we need to return more information (like is + * the path watched recursively) + */ + int GetWatchedPaths(wxArrayString* paths) const; + + wxEvtHandler* GetOwner() const + { + return m_owner; + } + + void SetOwner(wxEvtHandler* handler) + { + if (!handler) + m_owner = this; + else + m_owner = handler; + } + + + // This is a semi-private function used by wxWidgets itself only. + // + // Delegates the real work of adding the path to wxFSWatcherImpl::Add() and + // updates m_watches if the new path was successfully added. + bool AddAny(const wxFileName& path, int events, wxFSWPathType type, + const wxString& filespec = wxString()); + +protected: + + static wxString GetCanonicalPath(const wxFileName& path) + { + wxFileName path_copy = wxFileName(path); + if ( !path_copy.Normalize() ) + { + wxFAIL_MSG(wxString::Format("Unable to normalize path '%s'", + path.GetFullPath())); + return wxEmptyString; + } + + return path_copy.GetFullPath(); + } + + + wxFSWatchInfoMap m_watches; // path=>wxFSWatchInfo map + wxFSWatcherImpl* m_service; // file system events service + wxEvtHandler* m_owner; // handler for file system events + + friend class wxFSWatcherImpl; +}; + +// include the platform specific file defining wxFileSystemWatcher +// inheriting from wxFileSystemWatcherBase + +#ifdef wxHAS_INOTIFY + #include "wx/unix/fswatcher_inotify.h" + #define wxFileSystemWatcher wxInotifyFileSystemWatcher +#elif defined(wxHAS_KQUEUE) + #include "wx/unix/fswatcher_kqueue.h" + #define wxFileSystemWatcher wxKqueueFileSystemWatcher +#elif defined(__WINDOWS__) + #include "wx/msw/fswatcher.h" + #define wxFileSystemWatcher wxMSWFileSystemWatcher +#else + #include "wx/generic/fswatcher.h" + #define wxFileSystemWatcher wxPollingFileSystemWatcher +#endif + +#endif // wxUSE_FSWATCHER + +#endif /* _WX_FSWATCHER_BASE_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gauge.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gauge.h new file mode 100644 index 0000000000..93ae86fcc4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gauge.h @@ -0,0 +1,126 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gauge.h +// Purpose: wxGauge interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.02.01 +// Copyright: (c) 1996-2001 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GAUGE_H_BASE_ +#define _WX_GAUGE_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_GAUGE + +#include "wx/control.h" + +// ---------------------------------------------------------------------------- +// wxGauge style flags +// ---------------------------------------------------------------------------- + +#define wxGA_HORIZONTAL wxHORIZONTAL +#define wxGA_VERTICAL wxVERTICAL + +// Win32 only, is default (and only) on some other platforms +#define wxGA_SMOOTH 0x0020 + +#if WXWIN_COMPATIBILITY_2_6 + // obsolete style + #define wxGA_PROGRESSBAR 0 +#endif // WXWIN_COMPATIBILITY_2_6 + +// GTK and Mac always have native implementation of the indeterminate mode +// wxMSW has native implementation only if comctl32.dll >= 6.00 +#if !defined(__WXGTK20__) && !defined(__WXMAC__) && !defined(__WXCOCOA__) + #define wxGAUGE_EMULATE_INDETERMINATE_MODE 1 +#else + #define wxGAUGE_EMULATE_INDETERMINATE_MODE 0 +#endif + +extern WXDLLIMPEXP_DATA_CORE(const char) wxGaugeNameStr[]; + +// ---------------------------------------------------------------------------- +// wxGauge: a progress bar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGaugeBase : public wxControl +{ +public: + wxGaugeBase() { m_rangeMax = m_gaugePos = 0; } + virtual ~wxGaugeBase(); + + bool Create(wxWindow *parent, + wxWindowID id, + int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr); + + // determinate mode API + + // set/get the control range + virtual void SetRange(int range); + virtual int GetRange() const; + + virtual void SetValue(int pos); + virtual int GetValue() const; + + // indeterminate mode API + virtual void Pulse(); + + // simple accessors + bool IsVertical() const { return HasFlag(wxGA_VERTICAL); } + + // appearance params (not implemented for most ports) + virtual void SetShadowWidth(int w); + virtual int GetShadowWidth() const; + + virtual void SetBezelFace(int w); + virtual int GetBezelFace() const; + + // overridden base class virtuals + virtual bool AcceptsFocus() const { return false; } + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // the max position + int m_rangeMax; + + // the current position + int m_gaugePos; + +#if wxGAUGE_EMULATE_INDETERMINATE_MODE + int m_nDirection; // can be wxRIGHT or wxLEFT +#endif + + wxDECLARE_NO_COPY_CLASS(wxGaugeBase); +}; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/gauge.h" +#elif defined(__WXMSW__) + #include "wx/msw/gauge.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/gauge.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/gauge.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/gauge.h" +#elif defined(__WXMAC__) + #include "wx/osx/gauge.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/gauge.h" +#elif defined(__WXPM__) + #include "wx/os2/gauge.h" +#endif + +#endif // wxUSE_GAUGE + +#endif + // _WX_GAUGE_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gbsizer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gbsizer.h new file mode 100644 index 0000000000..dea46c15ab --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gbsizer.h @@ -0,0 +1,341 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gbsizer.h +// Purpose: wxGridBagSizer: A sizer that can lay out items in a grid, +// with items at specified cells, and with the option of row +// and/or column spanning +// +// Author: Robin Dunn +// Created: 03-Nov-2003 +// Copyright: (c) Robin Dunn +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WXGBSIZER_H__ +#define __WXGBSIZER_H__ + +#include "wx/sizer.h" + + +//--------------------------------------------------------------------------- +// Classes to represent a position in the grid and a size of an item in the +// grid, IOW, the number of rows and columns it occupies. I chose to use these +// instead of wxPoint and wxSize because they are (x,y) and usually pixel +// oriented while grids and tables are usually thought of as (row,col) so some +// confusion would definitely result in using wxPoint... +// +// NOTE: This should probably be refactored to a common RowCol data type which +// is used for this and also for wxGridCellCoords. +//--------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGBPosition +{ +public: + wxGBPosition() : m_row(0), m_col(0) {} + wxGBPosition(int row, int col) : m_row(row), m_col(col) {} + + // default copy ctor and assignment operator are okay. + + int GetRow() const { return m_row; } + int GetCol() const { return m_col; } + void SetRow(int row) { m_row = row; } + void SetCol(int col) { m_col = col; } + + bool operator==(const wxGBPosition& p) const { return m_row == p.m_row && m_col == p.m_col; } + bool operator!=(const wxGBPosition& p) const { return !(*this == p); } + +private: + int m_row; + int m_col; +}; + + +class WXDLLIMPEXP_CORE wxGBSpan +{ +public: + wxGBSpan() { Init(); } + wxGBSpan(int rowspan, int colspan) + { + // Initialize the members to valid values as not doing it may result in + // infinite loop in wxGBSizer code if the user passed 0 for any of + // them, see #12934. + Init(); + + SetRowspan(rowspan); + SetColspan(colspan); + } + + // default copy ctor and assignment operator are okay. + + // Factor constructor creating an invalid wxGBSpan: this is mostly supposed + // to be used as return value for functions returning wxGBSpan in case of + // errors. + static wxGBSpan Invalid() + { + return wxGBSpan(NULL); + } + + int GetRowspan() const { return m_rowspan; } + int GetColspan() const { return m_colspan; } + void SetRowspan(int rowspan) + { + wxCHECK_RET( rowspan > 0, "Row span should be strictly positive" ); + + m_rowspan = rowspan; + } + + void SetColspan(int colspan) + { + wxCHECK_RET( colspan > 0, "Column span should be strictly positive" ); + + m_colspan = colspan; + } + + bool operator==(const wxGBSpan& o) const { return m_rowspan == o.m_rowspan && m_colspan == o.m_colspan; } + bool operator!=(const wxGBSpan& o) const { return !(*this == o); } + +private: + // This private ctor is used by Invalid() only. + wxGBSpan(struct InvalidCtorTag*) + { + m_rowspan = + m_colspan = -1; + } + + void Init() + { + m_rowspan = + m_colspan = 1; + } + + int m_rowspan; + int m_colspan; +}; + + +extern WXDLLIMPEXP_DATA_CORE(const wxGBSpan) wxDefaultSpan; + + +//--------------------------------------------------------------------------- +// wxGBSizerItem +//--------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxGridBagSizer; + + +class WXDLLIMPEXP_CORE wxGBSizerItem : public wxSizerItem +{ +public: + // spacer + wxGBSizerItem( int width, + int height, + const wxGBPosition& pos, + const wxGBSpan& span=wxDefaultSpan, + int flag=0, + int border=0, + wxObject* userData=NULL); + + // window + wxGBSizerItem( wxWindow *window, + const wxGBPosition& pos, + const wxGBSpan& span=wxDefaultSpan, + int flag=0, + int border=0, + wxObject* userData=NULL ); + + // subsizer + wxGBSizerItem( wxSizer *sizer, + const wxGBPosition& pos, + const wxGBSpan& span=wxDefaultSpan, + int flag=0, + int border=0, + wxObject* userData=NULL ); + + // default ctor + wxGBSizerItem(); + + + // Get the grid position of the item + wxGBPosition GetPos() const { return m_pos; } + void GetPos(int& row, int& col) const; + + // Get the row and column spanning of the item + wxGBSpan GetSpan() const { return m_span; } + void GetSpan(int& rowspan, int& colspan) const; + + // If the item is already a member of a sizer then first ensure that there + // is no other item that would intersect with this one at the new + // position, then set the new position. Returns true if the change is + // successful and after the next Layout the item will be moved. + bool SetPos( const wxGBPosition& pos ); + + // If the item is already a member of a sizer then first ensure that there + // is no other item that would intersect with this one with its new + // spanning size, then set the new spanning. Returns true if the change + // is successful and after the next Layout the item will be resized. + bool SetSpan( const wxGBSpan& span ); + + // Returns true if this item and the other item intersect + bool Intersects(const wxGBSizerItem& other); + + // Returns true if the given pos/span would intersect with this item. + bool Intersects(const wxGBPosition& pos, const wxGBSpan& span); + + // Get the row and column of the endpoint of this item + void GetEndPos(int& row, int& col); + + + wxGridBagSizer* GetGBSizer() const { return m_gbsizer; } + void SetGBSizer(wxGridBagSizer* sizer) { m_gbsizer = sizer; } + + +protected: + wxGBPosition m_pos; + wxGBSpan m_span; + wxGridBagSizer* m_gbsizer; // so SetPos/SetSpan can check for intersects + + +private: + DECLARE_DYNAMIC_CLASS(wxGBSizerItem) + wxDECLARE_NO_COPY_CLASS(wxGBSizerItem); +}; + + +//--------------------------------------------------------------------------- +// wxGridBagSizer +//--------------------------------------------------------------------------- + + +class WXDLLIMPEXP_CORE wxGridBagSizer : public wxFlexGridSizer +{ +public: + wxGridBagSizer(int vgap = 0, int hgap = 0 ); + + // The Add methods return true if the item was successfully placed at the + // given position, false if something was already there. + wxSizerItem* Add( wxWindow *window, + const wxGBPosition& pos, + const wxGBSpan& span = wxDefaultSpan, + int flag = 0, + int border = 0, + wxObject* userData = NULL ); + wxSizerItem* Add( wxSizer *sizer, + const wxGBPosition& pos, + const wxGBSpan& span = wxDefaultSpan, + int flag = 0, + int border = 0, + wxObject* userData = NULL ); + wxSizerItem* Add( int width, + int height, + const wxGBPosition& pos, + const wxGBSpan& span = wxDefaultSpan, + int flag = 0, + int border = 0, + wxObject* userData = NULL ); + wxSizerItem* Add( wxGBSizerItem *item ); + + + // Get/Set the size used for cells in the grid with no item. + wxSize GetEmptyCellSize() const { return m_emptyCellSize; } + void SetEmptyCellSize(const wxSize& sz) { m_emptyCellSize = sz; } + + // Get the size of the specified cell, including hgap and vgap. Only + // valid after a Layout. + wxSize GetCellSize(int row, int col) const; + + // Get the grid position of the specified item (non-recursive) + wxGBPosition GetItemPosition(wxWindow *window); + wxGBPosition GetItemPosition(wxSizer *sizer); + wxGBPosition GetItemPosition(size_t index); + + // Set the grid position of the specified item. Returns true on success. + // If the move is not allowed (because an item is already there) then + // false is returned. (non-recursive) + bool SetItemPosition(wxWindow *window, const wxGBPosition& pos); + bool SetItemPosition(wxSizer *sizer, const wxGBPosition& pos); + bool SetItemPosition(size_t index, const wxGBPosition& pos); + + // Get the row/col spanning of the specified item (non-recursive) + wxGBSpan GetItemSpan(wxWindow *window); + wxGBSpan GetItemSpan(wxSizer *sizer); + wxGBSpan GetItemSpan(size_t index); + + // Set the row/col spanning of the specified item. Returns true on + // success. If the move is not allowed (because an item is already there) + // then false is returned. (non-recursive) + bool SetItemSpan(wxWindow *window, const wxGBSpan& span); + bool SetItemSpan(wxSizer *sizer, const wxGBSpan& span); + bool SetItemSpan(size_t index, const wxGBSpan& span); + + + // Find the sizer item for the given window or subsizer, returns NULL if + // not found. (non-recursive) + wxGBSizerItem* FindItem(wxWindow* window); + wxGBSizerItem* FindItem(wxSizer* sizer); + + + // Return the sizer item for the given grid cell, or NULL if there is no + // item at that position. (non-recursive) + wxGBSizerItem* FindItemAtPosition(const wxGBPosition& pos); + + + // Return the sizer item located at the point given in pt, or NULL if + // there is no item at that point. The (x,y) coordinates in pt correspond + // to the client coordinates of the window using the sizer for + // layout. (non-recursive) + wxGBSizerItem* FindItemAtPoint(const wxPoint& pt); + + + // Return the sizer item that has a matching user data (it only compares + // pointer values) or NULL if not found. (non-recursive) + wxGBSizerItem* FindItemWithData(const wxObject* userData); + + + // These are what make the sizer do size calculations and layout + virtual void RecalcSizes(); + virtual wxSize CalcMin(); + + + // Look at all items and see if any intersect (or would overlap) the given + // item. Returns true if so, false if there would be no overlap. If an + // excludeItem is given then it will not be checked for intersection, for + // example it may be the item we are checking the position of. + bool CheckForIntersection(wxGBSizerItem* item, wxGBSizerItem* excludeItem = NULL); + bool CheckForIntersection(const wxGBPosition& pos, const wxGBSpan& span, wxGBSizerItem* excludeItem = NULL); + + + // The Add base class virtuals should not be used with this class, but + // we'll try to make them automatically select a location for the item + // anyway. + virtual wxSizerItem* Add( wxWindow *window, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual wxSizerItem* Add( wxSizer *sizer, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual wxSizerItem* Add( int width, int height, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + + // The Insert and Prepend base class virtuals that are not appropriate for + // this class and should not be used. Their implementation in this class + // simply fails. + virtual wxSizerItem* Add( wxSizerItem *item ); + virtual wxSizerItem* Insert( size_t index, wxWindow *window, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual wxSizerItem* Insert( size_t index, wxSizer *sizer, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual wxSizerItem* Insert( size_t index, int width, int height, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual wxSizerItem* Insert( size_t index, wxSizerItem *item ); + virtual wxSizerItem* Prepend( wxWindow *window, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual wxSizerItem* Prepend( wxSizer *sizer, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual wxSizerItem* Prepend( int width, int height, int proportion = 0, int flag = 0, int border = 0, wxObject* userData = NULL ); + virtual wxSizerItem* Prepend( wxSizerItem *item ); + + +protected: + wxGBPosition FindEmptyCell(); + void AdjustForOverflow(); + + wxSize m_emptyCellSize; + + +private: + + DECLARE_CLASS(wxGridBagSizer) + wxDECLARE_NO_COPY_CLASS(wxGridBagSizer); +}; + +//--------------------------------------------------------------------------- +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gdicmn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gdicmn.h new file mode 100644 index 0000000000..6ce652d49f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gdicmn.h @@ -0,0 +1,1111 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gdicmn.h +// Purpose: Common GDI classes, types and declarations +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GDICMNH__ +#define _WX_GDICMNH__ + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +#include "wx/defs.h" +#include "wx/list.h" +#include "wx/string.h" +#include "wx/fontenc.h" +#include "wx/hashmap.h" +#include "wx/math.h" + +// --------------------------------------------------------------------------- +// forward declarations +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxBrush; +class WXDLLIMPEXP_FWD_CORE wxColour; +class WXDLLIMPEXP_FWD_CORE wxCursor; +class WXDLLIMPEXP_FWD_CORE wxFont; +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxPalette; +class WXDLLIMPEXP_FWD_CORE wxPen; +class WXDLLIMPEXP_FWD_CORE wxRegion; +class WXDLLIMPEXP_FWD_BASE wxString; +class WXDLLIMPEXP_FWD_CORE wxIconBundle; +class WXDLLIMPEXP_FWD_CORE wxPoint; + +// --------------------------------------------------------------------------- +// constants +// --------------------------------------------------------------------------- + +// Bitmap flags +enum wxBitmapType +{ + wxBITMAP_TYPE_INVALID, // should be == 0 for compatibility! + wxBITMAP_TYPE_BMP, + wxBITMAP_TYPE_BMP_RESOURCE, + wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE, + wxBITMAP_TYPE_ICO, + wxBITMAP_TYPE_ICO_RESOURCE, + wxBITMAP_TYPE_CUR, + wxBITMAP_TYPE_CUR_RESOURCE, + wxBITMAP_TYPE_XBM, + wxBITMAP_TYPE_XBM_DATA, + wxBITMAP_TYPE_XPM, + wxBITMAP_TYPE_XPM_DATA, + wxBITMAP_TYPE_TIFF, + wxBITMAP_TYPE_TIF = wxBITMAP_TYPE_TIFF, + wxBITMAP_TYPE_TIFF_RESOURCE, + wxBITMAP_TYPE_TIF_RESOURCE = wxBITMAP_TYPE_TIFF_RESOURCE, + wxBITMAP_TYPE_GIF, + wxBITMAP_TYPE_GIF_RESOURCE, + wxBITMAP_TYPE_PNG, + wxBITMAP_TYPE_PNG_RESOURCE, + wxBITMAP_TYPE_JPEG, + wxBITMAP_TYPE_JPEG_RESOURCE, + wxBITMAP_TYPE_PNM, + wxBITMAP_TYPE_PNM_RESOURCE, + wxBITMAP_TYPE_PCX, + wxBITMAP_TYPE_PCX_RESOURCE, + wxBITMAP_TYPE_PICT, + wxBITMAP_TYPE_PICT_RESOURCE, + wxBITMAP_TYPE_ICON, + wxBITMAP_TYPE_ICON_RESOURCE, + wxBITMAP_TYPE_ANI, + wxBITMAP_TYPE_IFF, + wxBITMAP_TYPE_TGA, + wxBITMAP_TYPE_MACCURSOR, + wxBITMAP_TYPE_MACCURSOR_RESOURCE, + + wxBITMAP_TYPE_MAX, + wxBITMAP_TYPE_ANY = 50 +}; + +// Polygon filling mode +enum wxPolygonFillMode +{ + wxODDEVEN_RULE = 1, + wxWINDING_RULE +}; + +// Standard cursors +enum wxStockCursor +{ + wxCURSOR_NONE, // should be 0 + wxCURSOR_ARROW, + wxCURSOR_RIGHT_ARROW, + wxCURSOR_BULLSEYE, + wxCURSOR_CHAR, + wxCURSOR_CROSS, + wxCURSOR_HAND, + wxCURSOR_IBEAM, + wxCURSOR_LEFT_BUTTON, + wxCURSOR_MAGNIFIER, + wxCURSOR_MIDDLE_BUTTON, + wxCURSOR_NO_ENTRY, + wxCURSOR_PAINT_BRUSH, + wxCURSOR_PENCIL, + wxCURSOR_POINT_LEFT, + wxCURSOR_POINT_RIGHT, + wxCURSOR_QUESTION_ARROW, + wxCURSOR_RIGHT_BUTTON, + wxCURSOR_SIZENESW, + wxCURSOR_SIZENS, + wxCURSOR_SIZENWSE, + wxCURSOR_SIZEWE, + wxCURSOR_SIZING, + wxCURSOR_SPRAYCAN, + wxCURSOR_WAIT, + wxCURSOR_WATCH, + wxCURSOR_BLANK, +#ifdef __WXGTK__ + wxCURSOR_DEFAULT, // standard X11 cursor +#endif +#ifdef __WXMAC__ + wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow +#endif +#ifdef __X__ + // Not yet implemented for Windows + wxCURSOR_CROSS_REVERSE, + wxCURSOR_DOUBLE_ARROW, + wxCURSOR_BASED_ARROW_UP, + wxCURSOR_BASED_ARROW_DOWN, +#endif // X11 + wxCURSOR_ARROWWAIT, +#ifdef __WXMAC__ + wxCURSOR_OPEN_HAND, + wxCURSOR_CLOSED_HAND, +#endif + + wxCURSOR_MAX +}; + +#ifndef __WXGTK__ + #define wxCURSOR_DEFAULT wxCURSOR_ARROW +#endif + +#ifndef __WXMAC__ + // TODO CS supply openhand and closedhand cursors + #define wxCURSOR_OPEN_HAND wxCURSOR_HAND + #define wxCURSOR_CLOSED_HAND wxCURSOR_HAND +#endif + +// --------------------------------------------------------------------------- +// macros +// --------------------------------------------------------------------------- + +#if defined(__WINDOWS__) || defined(__WXPM__) + #define wxHAS_IMAGES_IN_RESOURCES +#endif + +/* Useful macro for creating icons portably, for example: + + wxIcon *icon = new wxICON(sample); + + expands into: + + wxIcon *icon = new wxIcon("sample"); // On Windows + wxIcon *icon = new wxIcon(sample_xpm); // On wxGTK/Linux + */ + +#ifdef __WINDOWS__ + // Load from a resource + #define wxICON(X) wxIcon(wxT(#X)) +#elif defined(__WXPM__) + // Load from a resource + #define wxICON(X) wxIcon(wxT(#X)) +#elif defined(__WXDFB__) + // Initialize from an included XPM + #define wxICON(X) wxIcon( X##_xpm ) +#elif defined(__WXGTK__) + // Initialize from an included XPM + #define wxICON(X) wxIcon( X##_xpm ) +#elif defined(__WXMAC__) + // Initialize from an included XPM + #define wxICON(X) wxIcon( X##_xpm ) +#elif defined(__WXMOTIF__) + // Initialize from an included XPM + #define wxICON(X) wxIcon( X##_xpm ) +#elif defined(__WXX11__) + // Initialize from an included XPM + #define wxICON(X) wxIcon( X##_xpm ) +#else + // This will usually mean something on any platform + #define wxICON(X) wxIcon(wxT(#X)) +#endif // platform + +/* Another macro: this one is for portable creation of bitmaps. We assume that + under Unix bitmaps live in XPMs and under Windows they're in ressources. + */ + +#if defined(__WINDOWS__) || defined(__WXPM__) + #define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_BMP_RESOURCE) +#elif defined(__WXGTK__) || \ + defined(__WXMOTIF__) || \ + defined(__WXX11__) || \ + defined(__WXMAC__) || \ + defined(__WXDFB__) || \ + defined(__WXCOCOA__) + // Initialize from an included XPM + #define wxBITMAP(name) wxBitmap(name##_xpm) +#else // other platforms + #define wxBITMAP(name) wxBitmap(name##_xpm, wxBITMAP_TYPE_XPM) +#endif // platform + +// Macro for creating wxBitmap from in-memory PNG data. +// +// It reads PNG data from name_png static byte arrays that can be created using +// e.g. misc/scripts/png2c.py. +// +// This macro exists mostly as a helper for wxBITMAP_PNG() below but also +// because it's slightly more convenient to use than NewFromPNGData() directly. +#define wxBITMAP_PNG_FROM_DATA(name) \ + wxBitmap::NewFromPNGData(name##_png, WXSIZEOF(name##_png)) + +// Similar to wxBITMAP but used for the bitmaps in PNG format. +// +// Under Windows they should be embedded into the resource file using RT_RCDATA +// resource type and under OS X the PNG file with the specified name must be +// available in the resource subdirectory of the bundle. Elsewhere, this is +// exactly the same thing as wxBITMAP_PNG_FROM_DATA() described above. +#if defined(__WINDOWS__) || defined(__WXOSX__) + #define wxBITMAP_PNG(name) wxBitmap(wxS(#name), wxBITMAP_TYPE_PNG_RESOURCE) +#else + #define wxBITMAP_PNG(name) wxBITMAP_PNG_FROM_DATA(name) +#endif + +// =========================================================================== +// classes +// =========================================================================== + +// --------------------------------------------------------------------------- +// wxSize +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSize +{ +public: + // members are public for compatibility, don't use them directly. + int x, y; + + // constructors + wxSize() : x(0), y(0) { } + wxSize(int xx, int yy) : x(xx), y(yy) { } + + // no copy ctor or assignment operator - the defaults are ok + + wxSize& operator+=(const wxSize& sz) { x += sz.x; y += sz.y; return *this; } + wxSize& operator-=(const wxSize& sz) { x -= sz.x; y -= sz.y; return *this; } + wxSize& operator/=(int i) { x /= i; y /= i; return *this; } + wxSize& operator*=(int i) { x *= i; y *= i; return *this; } + wxSize& operator/=(unsigned int i) { x /= i; y /= i; return *this; } + wxSize& operator*=(unsigned int i) { x *= i; y *= i; return *this; } + wxSize& operator/=(long i) { x /= i; y /= i; return *this; } + wxSize& operator*=(long i) { x *= i; y *= i; return *this; } + wxSize& operator/=(unsigned long i) { x /= i; y /= i; return *this; } + wxSize& operator*=(unsigned long i) { x *= i; y *= i; return *this; } + wxSize& operator/=(double i) { x = int(x/i); y = int(y/i); return *this; } + wxSize& operator*=(double i) { x = int(x*i); y = int(y*i); return *this; } + + void IncTo(const wxSize& sz) + { if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; } + void DecTo(const wxSize& sz) + { if ( sz.x < x ) x = sz.x; if ( sz.y < y ) y = sz.y; } + void DecToIfSpecified(const wxSize& sz) + { + if ( sz.x != wxDefaultCoord && sz.x < x ) + x = sz.x; + if ( sz.y != wxDefaultCoord && sz.y < y ) + y = sz.y; + } + + void IncBy(int dx, int dy) { x += dx; y += dy; } + void IncBy(const wxPoint& pt); + void IncBy(const wxSize& sz) { IncBy(sz.x, sz.y); } + void IncBy(int d) { IncBy(d, d); } + + void DecBy(int dx, int dy) { IncBy(-dx, -dy); } + void DecBy(const wxPoint& pt); + void DecBy(const wxSize& sz) { DecBy(sz.x, sz.y); } + void DecBy(int d) { DecBy(d, d); } + + + wxSize& Scale(float xscale, float yscale) + { x = (int)(x*xscale); y = (int)(y*yscale); return *this; } + + // accessors + void Set(int xx, int yy) { x = xx; y = yy; } + void SetWidth(int w) { x = w; } + void SetHeight(int h) { y = h; } + + int GetWidth() const { return x; } + int GetHeight() const { return y; } + + bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; } + + // combine this size with the other one replacing the default (i.e. equal + // to wxDefaultCoord) components of this object with those of the other + void SetDefaults(const wxSize& size) + { + if ( x == wxDefaultCoord ) + x = size.x; + if ( y == wxDefaultCoord ) + y = size.y; + } + + // compatibility + int GetX() const { return x; } + int GetY() const { return y; } +}; + +inline bool operator==(const wxSize& s1, const wxSize& s2) +{ + return s1.x == s2.x && s1.y == s2.y; +} + +inline bool operator!=(const wxSize& s1, const wxSize& s2) +{ + return s1.x != s2.x || s1.y != s2.y; +} + +inline wxSize operator+(const wxSize& s1, const wxSize& s2) +{ + return wxSize(s1.x + s2.x, s1.y + s2.y); +} + +inline wxSize operator-(const wxSize& s1, const wxSize& s2) +{ + return wxSize(s1.x - s2.x, s1.y - s2.y); +} + +inline wxSize operator/(const wxSize& s, int i) +{ + return wxSize(s.x / i, s.y / i); +} + +inline wxSize operator*(const wxSize& s, int i) +{ + return wxSize(s.x * i, s.y * i); +} + +inline wxSize operator*(int i, const wxSize& s) +{ + return wxSize(s.x * i, s.y * i); +} + +inline wxSize operator/(const wxSize& s, unsigned int i) +{ + return wxSize(s.x / i, s.y / i); +} + +inline wxSize operator*(const wxSize& s, unsigned int i) +{ + return wxSize(s.x * i, s.y * i); +} + +inline wxSize operator*(unsigned int i, const wxSize& s) +{ + return wxSize(s.x * i, s.y * i); +} + +inline wxSize operator/(const wxSize& s, long i) +{ + return wxSize(s.x / i, s.y / i); +} + +inline wxSize operator*(const wxSize& s, long i) +{ + return wxSize(int(s.x * i), int(s.y * i)); +} + +inline wxSize operator*(long i, const wxSize& s) +{ + return wxSize(int(s.x * i), int(s.y * i)); +} + +inline wxSize operator/(const wxSize& s, unsigned long i) +{ + return wxSize(int(s.x / i), int(s.y / i)); +} + +inline wxSize operator*(const wxSize& s, unsigned long i) +{ + return wxSize(int(s.x * i), int(s.y * i)); +} + +inline wxSize operator*(unsigned long i, const wxSize& s) +{ + return wxSize(int(s.x * i), int(s.y * i)); +} + +inline wxSize operator*(const wxSize& s, double i) +{ + return wxSize(int(s.x * i), int(s.y * i)); +} + +inline wxSize operator*(double i, const wxSize& s) +{ + return wxSize(int(s.x * i), int(s.y * i)); +} + + + +// --------------------------------------------------------------------------- +// Point classes: with real or integer coordinates +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRealPoint +{ +public: + double x; + double y; + + wxRealPoint() : x(0.0), y(0.0) { } + wxRealPoint(double xx, double yy) : x(xx), y(yy) { } + wxRealPoint(const wxPoint& pt); + + // no copy ctor or assignment operator - the defaults are ok + + //assignment operators + wxRealPoint& operator+=(const wxRealPoint& p) { x += p.x; y += p.y; return *this; } + wxRealPoint& operator-=(const wxRealPoint& p) { x -= p.x; y -= p.y; return *this; } + + wxRealPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; } + wxRealPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; } +}; + + +inline bool operator==(const wxRealPoint& p1, const wxRealPoint& p2) +{ + return wxIsSameDouble(p1.x, p2.x) && wxIsSameDouble(p1.y, p2.y); +} + +inline bool operator!=(const wxRealPoint& p1, const wxRealPoint& p2) +{ + return !(p1 == p2); +} + +inline wxRealPoint operator+(const wxRealPoint& p1, const wxRealPoint& p2) +{ + return wxRealPoint(p1.x + p2.x, p1.y + p2.y); +} + + +inline wxRealPoint operator-(const wxRealPoint& p1, const wxRealPoint& p2) +{ + return wxRealPoint(p1.x - p2.x, p1.y - p2.y); +} + + +inline wxRealPoint operator/(const wxRealPoint& s, int i) +{ + return wxRealPoint(s.x / i, s.y / i); +} + +inline wxRealPoint operator*(const wxRealPoint& s, int i) +{ + return wxRealPoint(s.x * i, s.y * i); +} + +inline wxRealPoint operator*(int i, const wxRealPoint& s) +{ + return wxRealPoint(s.x * i, s.y * i); +} + +inline wxRealPoint operator/(const wxRealPoint& s, unsigned int i) +{ + return wxRealPoint(s.x / i, s.y / i); +} + +inline wxRealPoint operator*(const wxRealPoint& s, unsigned int i) +{ + return wxRealPoint(s.x * i, s.y * i); +} + +inline wxRealPoint operator*(unsigned int i, const wxRealPoint& s) +{ + return wxRealPoint(s.x * i, s.y * i); +} + +inline wxRealPoint operator/(const wxRealPoint& s, long i) +{ + return wxRealPoint(s.x / i, s.y / i); +} + +inline wxRealPoint operator*(const wxRealPoint& s, long i) +{ + return wxRealPoint(s.x * i, s.y * i); +} + +inline wxRealPoint operator*(long i, const wxRealPoint& s) +{ + return wxRealPoint(s.x * i, s.y * i); +} + +inline wxRealPoint operator/(const wxRealPoint& s, unsigned long i) +{ + return wxRealPoint(s.x / i, s.y / i); +} + +inline wxRealPoint operator*(const wxRealPoint& s, unsigned long i) +{ + return wxRealPoint(s.x * i, s.y * i); +} + +inline wxRealPoint operator*(unsigned long i, const wxRealPoint& s) +{ + return wxRealPoint(s.x * i, s.y * i); +} + +inline wxRealPoint operator*(const wxRealPoint& s, double i) +{ + return wxRealPoint(int(s.x * i), int(s.y * i)); +} + +inline wxRealPoint operator*(double i, const wxRealPoint& s) +{ + return wxRealPoint(int(s.x * i), int(s.y * i)); +} + + +// ---------------------------------------------------------------------------- +// wxPoint: 2D point with integer coordinates +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPoint +{ +public: + int x, y; + + wxPoint() : x(0), y(0) { } + wxPoint(int xx, int yy) : x(xx), y(yy) { } + wxPoint(const wxRealPoint& pt) : x(int(pt.x)), y(int(pt.y)) { } + + // no copy ctor or assignment operator - the defaults are ok + + //assignment operators + wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; } + wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; } + + wxPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; } + wxPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; } + + // check if both components are set/initialized + bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; } + + // fill in the unset components with the values from the other point + void SetDefaults(const wxPoint& pt) + { + if ( x == wxDefaultCoord ) + x = pt.x; + if ( y == wxDefaultCoord ) + y = pt.y; + } +}; + + +// comparison +inline bool operator==(const wxPoint& p1, const wxPoint& p2) +{ + return p1.x == p2.x && p1.y == p2.y; +} + +inline bool operator!=(const wxPoint& p1, const wxPoint& p2) +{ + return !(p1 == p2); +} + + +// arithmetic operations (component wise) +inline wxPoint operator+(const wxPoint& p1, const wxPoint& p2) +{ + return wxPoint(p1.x + p2.x, p1.y + p2.y); +} + +inline wxPoint operator-(const wxPoint& p1, const wxPoint& p2) +{ + return wxPoint(p1.x - p2.x, p1.y - p2.y); +} + +inline wxPoint operator+(const wxPoint& p, const wxSize& s) +{ + return wxPoint(p.x + s.x, p.y + s.y); +} + +inline wxPoint operator-(const wxPoint& p, const wxSize& s) +{ + return wxPoint(p.x - s.x, p.y - s.y); +} + +inline wxPoint operator+(const wxSize& s, const wxPoint& p) +{ + return wxPoint(p.x + s.x, p.y + s.y); +} + +inline wxPoint operator-(const wxSize& s, const wxPoint& p) +{ + return wxPoint(s.x - p.x, s.y - p.y); +} + +inline wxPoint operator-(const wxPoint& p) +{ + return wxPoint(-p.x, -p.y); +} + +inline wxPoint operator/(const wxPoint& s, int i) +{ + return wxPoint(s.x / i, s.y / i); +} + +inline wxPoint operator*(const wxPoint& s, int i) +{ + return wxPoint(s.x * i, s.y * i); +} + +inline wxPoint operator*(int i, const wxPoint& s) +{ + return wxPoint(s.x * i, s.y * i); +} + +inline wxPoint operator/(const wxPoint& s, unsigned int i) +{ + return wxPoint(s.x / i, s.y / i); +} + +inline wxPoint operator*(const wxPoint& s, unsigned int i) +{ + return wxPoint(s.x * i, s.y * i); +} + +inline wxPoint operator*(unsigned int i, const wxPoint& s) +{ + return wxPoint(s.x * i, s.y * i); +} + +inline wxPoint operator/(const wxPoint& s, long i) +{ + return wxPoint(s.x / i, s.y / i); +} + +inline wxPoint operator*(const wxPoint& s, long i) +{ + return wxPoint(int(s.x * i), int(s.y * i)); +} + +inline wxPoint operator*(long i, const wxPoint& s) +{ + return wxPoint(int(s.x * i), int(s.y * i)); +} + +inline wxPoint operator/(const wxPoint& s, unsigned long i) +{ + return wxPoint(s.x / i, s.y / i); +} + +inline wxPoint operator*(const wxPoint& s, unsigned long i) +{ + return wxPoint(int(s.x * i), int(s.y * i)); +} + +inline wxPoint operator*(unsigned long i, const wxPoint& s) +{ + return wxPoint(int(s.x * i), int(s.y * i)); +} + +inline wxPoint operator*(const wxPoint& s, double i) +{ + return wxPoint(int(s.x * i), int(s.y * i)); +} + +inline wxPoint operator*(double i, const wxPoint& s) +{ + return wxPoint(int(s.x * i), int(s.y * i)); +} + +WX_DECLARE_LIST_WITH_DECL(wxPoint, wxPointList, class WXDLLIMPEXP_CORE); + +// --------------------------------------------------------------------------- +// wxRect +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRect +{ +public: + wxRect() + : x(0), y(0), width(0), height(0) + { } + wxRect(int xx, int yy, int ww, int hh) + : x(xx), y(yy), width(ww), height(hh) + { } + wxRect(const wxPoint& topLeft, const wxPoint& bottomRight); + wxRect(const wxPoint& pt, const wxSize& size) + : x(pt.x), y(pt.y), width(size.x), height(size.y) + { } + wxRect(const wxSize& size) + : x(0), y(0), width(size.x), height(size.y) + { } + + // default copy ctor and assignment operators ok + + int GetX() const { return x; } + void SetX(int xx) { x = xx; } + + int GetY() const { return y; } + void SetY(int yy) { y = yy; } + + int GetWidth() const { return width; } + void SetWidth(int w) { width = w; } + + int GetHeight() const { return height; } + void SetHeight(int h) { height = h; } + + wxPoint GetPosition() const { return wxPoint(x, y); } + void SetPosition( const wxPoint &p ) { x = p.x; y = p.y; } + + wxSize GetSize() const { return wxSize(width, height); } + void SetSize( const wxSize &s ) { width = s.GetWidth(); height = s.GetHeight(); } + + bool IsEmpty() const { return (width <= 0) || (height <= 0); } + + int GetLeft() const { return x; } + int GetTop() const { return y; } + int GetBottom() const { return y + height - 1; } + int GetRight() const { return x + width - 1; } + + void SetLeft(int left) { x = left; } + void SetRight(int right) { width = right - x + 1; } + void SetTop(int top) { y = top; } + void SetBottom(int bottom) { height = bottom - y + 1; } + + wxPoint GetTopLeft() const { return GetPosition(); } + wxPoint GetLeftTop() const { return GetTopLeft(); } + void SetTopLeft(const wxPoint &p) { SetPosition(p); } + void SetLeftTop(const wxPoint &p) { SetTopLeft(p); } + + wxPoint GetBottomRight() const { return wxPoint(GetRight(), GetBottom()); } + wxPoint GetRightBottom() const { return GetBottomRight(); } + void SetBottomRight(const wxPoint &p) { SetRight(p.x); SetBottom(p.y); } + void SetRightBottom(const wxPoint &p) { SetBottomRight(p); } + + wxPoint GetTopRight() const { return wxPoint(GetRight(), GetTop()); } + wxPoint GetRightTop() const { return GetTopRight(); } + void SetTopRight(const wxPoint &p) { SetRight(p.x); SetTop(p.y); } + void SetRightTop(const wxPoint &p) { SetTopRight(p); } + + wxPoint GetBottomLeft() const { return wxPoint(GetLeft(), GetBottom()); } + wxPoint GetLeftBottom() const { return GetBottomLeft(); } + void SetBottomLeft(const wxPoint &p) { SetLeft(p.x); SetBottom(p.y); } + void SetLeftBottom(const wxPoint &p) { SetBottomLeft(p); } + + // operations with rect + wxRect& Inflate(wxCoord dx, wxCoord dy); + wxRect& Inflate(const wxSize& d) { return Inflate(d.x, d.y); } + wxRect& Inflate(wxCoord d) { return Inflate(d, d); } + wxRect Inflate(wxCoord dx, wxCoord dy) const + { + wxRect r = *this; + r.Inflate(dx, dy); + return r; + } + + wxRect& Deflate(wxCoord dx, wxCoord dy) { return Inflate(-dx, -dy); } + wxRect& Deflate(const wxSize& d) { return Inflate(-d.x, -d.y); } + wxRect& Deflate(wxCoord d) { return Inflate(-d); } + wxRect Deflate(wxCoord dx, wxCoord dy) const + { + wxRect r = *this; + r.Deflate(dx, dy); + return r; + } + + void Offset(wxCoord dx, wxCoord dy) { x += dx; y += dy; } + void Offset(const wxPoint& pt) { Offset(pt.x, pt.y); } + + wxRect& Intersect(const wxRect& rect); + wxRect Intersect(const wxRect& rect) const + { + wxRect r = *this; + r.Intersect(rect); + return r; + } + + wxRect& Union(const wxRect& rect); + wxRect Union(const wxRect& rect) const + { + wxRect r = *this; + r.Union(rect); + return r; + } + + // return true if the point is (not strcitly) inside the rect + bool Contains(int x, int y) const; + bool Contains(const wxPoint& pt) const { return Contains(pt.x, pt.y); } + // return true if the rectangle 'rect' is (not strictly) inside this rect + bool Contains(const wxRect& rect) const; + +#if WXWIN_COMPATIBILITY_2_6 + // use Contains() instead + wxDEPRECATED( bool Inside(int x, int y) const ); + wxDEPRECATED( bool Inside(const wxPoint& pt) const ); + wxDEPRECATED( bool Inside(const wxRect& rect) const ); +#endif // WXWIN_COMPATIBILITY_2_6 + + // return true if the rectangles have a non empty intersection + bool Intersects(const wxRect& rect) const; + + // like Union() but don't ignore empty rectangles + wxRect& operator+=(const wxRect& rect); + + // intersections of two rectrangles not testing for empty rectangles + wxRect& operator*=(const wxRect& rect); + + // centre this rectangle in the given (usually, but not necessarily, + // larger) one + wxRect CentreIn(const wxRect& r, int dir = wxBOTH) const + { + return wxRect(dir & wxHORIZONTAL ? r.x + (r.width - width)/2 : x, + dir & wxVERTICAL ? r.y + (r.height - height)/2 : y, + width, height); + } + + wxRect CenterIn(const wxRect& r, int dir = wxBOTH) const + { + return CentreIn(r, dir); + } + +public: + int x, y, width, height; +}; + + +// compare rectangles +inline bool operator==(const wxRect& r1, const wxRect& r2) +{ + return (r1.x == r2.x) && (r1.y == r2.y) && + (r1.width == r2.width) && (r1.height == r2.height); +} + +inline bool operator!=(const wxRect& r1, const wxRect& r2) +{ + return !(r1 == r2); +} + +// like Union() but don't treat empty rectangles specially +WXDLLIMPEXP_CORE wxRect operator+(const wxRect& r1, const wxRect& r2); + +// intersections of two rectangles +WXDLLIMPEXP_CORE wxRect operator*(const wxRect& r1, const wxRect& r2); + + + + +#if WXWIN_COMPATIBILITY_2_6 +inline bool wxRect::Inside(int cx, int cy) const { return Contains(cx, cy); } +inline bool wxRect::Inside(const wxPoint& pt) const { return Contains(pt); } +inline bool wxRect::Inside(const wxRect& rect) const { return Contains(rect); } +#endif // WXWIN_COMPATIBILITY_2_6 + + +// define functions which couldn't be defined above because of declarations +// order +inline void wxSize::IncBy(const wxPoint& pt) { IncBy(pt.x, pt.y); } +inline void wxSize::DecBy(const wxPoint& pt) { DecBy(pt.x, pt.y); } + +// --------------------------------------------------------------------------- +// Management of pens, brushes and fonts +// --------------------------------------------------------------------------- + +typedef wxInt8 wxDash; + +class WXDLLIMPEXP_CORE wxGDIObjListBase { +public: + wxGDIObjListBase(); + ~wxGDIObjListBase(); + +protected: + wxList list; +}; + +WX_DECLARE_STRING_HASH_MAP(wxColour*, wxStringToColourHashMap); + +class WXDLLIMPEXP_CORE wxColourDatabase +{ +public: + wxColourDatabase(); + ~wxColourDatabase(); + + // find colour by name or name for the given colour + wxColour Find(const wxString& name) const; + wxString FindName(const wxColour& colour) const; + + // add a new colour to the database + void AddColour(const wxString& name, const wxColour& colour); + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated, use Find() instead + wxDEPRECATED( wxColour *FindColour(const wxString& name) ); +#endif // WXWIN_COMPATIBILITY_2_6 + + +#ifdef __WXPM__ + // PM keeps its own type of colour table + long* m_palTable; + size_t m_nSize; +#endif + +private: + // load the database with the built in colour values when called for the + // first time, do nothing after this + void Initialize(); + + wxStringToColourHashMap *m_map; +}; + +class WXDLLIMPEXP_CORE wxResourceCache: public wxList +{ +public: + wxResourceCache() { } +#if !wxUSE_STD_CONTAINERS + wxResourceCache(const unsigned int keyType) : wxList(keyType) { } +#endif + virtual ~wxResourceCache(); +}; + +// --------------------------------------------------------------------------- +// global variables +// --------------------------------------------------------------------------- + + +/* Stock objects + + wxStockGDI creates the stock GDI objects on demand. Pointers to the + created objects are stored in the ms_stockObject array, which is indexed + by the Item enum values. Platorm-specific fonts can be created by + implementing a derived class with an override for the GetFont function. + wxStockGDI operates as a singleton, accessed through the ms_instance + pointer. By default this pointer is set to an instance of wxStockGDI. + A derived class must arrange to set this pointer to an instance of itself. +*/ +class WXDLLIMPEXP_CORE wxStockGDI +{ +public: + enum Item { + BRUSH_BLACK, + BRUSH_BLUE, + BRUSH_CYAN, + BRUSH_GREEN, + BRUSH_YELLOW, + BRUSH_GREY, + BRUSH_LIGHTGREY, + BRUSH_MEDIUMGREY, + BRUSH_RED, + BRUSH_TRANSPARENT, + BRUSH_WHITE, + COLOUR_BLACK, + COLOUR_BLUE, + COLOUR_CYAN, + COLOUR_GREEN, + COLOUR_YELLOW, + COLOUR_LIGHTGREY, + COLOUR_RED, + COLOUR_WHITE, + CURSOR_CROSS, + CURSOR_HOURGLASS, + CURSOR_STANDARD, + FONT_ITALIC, + FONT_NORMAL, + FONT_SMALL, + FONT_SWISS, + PEN_BLACK, + PEN_BLACKDASHED, + PEN_BLUE, + PEN_CYAN, + PEN_GREEN, + PEN_YELLOW, + PEN_GREY, + PEN_LIGHTGREY, + PEN_MEDIUMGREY, + PEN_RED, + PEN_TRANSPARENT, + PEN_WHITE, + ITEMCOUNT + }; + + wxStockGDI(); + virtual ~wxStockGDI(); + static void DeleteAll(); + + static wxStockGDI& instance() { return *ms_instance; } + + static const wxBrush* GetBrush(Item item); + static const wxColour* GetColour(Item item); + static const wxCursor* GetCursor(Item item); + // Can be overridden by platform-specific derived classes + virtual const wxFont* GetFont(Item item); + static const wxPen* GetPen(Item item); + +protected: + static wxStockGDI* ms_instance; + + static wxObject* ms_stockObject[ITEMCOUNT]; + + wxDECLARE_NO_COPY_CLASS(wxStockGDI); +}; + +#define wxITALIC_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_ITALIC) +#define wxNORMAL_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_NORMAL) +#define wxSMALL_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_SMALL) +#define wxSWISS_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_SWISS) + +#define wxBLACK_DASHED_PEN wxStockGDI::GetPen(wxStockGDI::PEN_BLACKDASHED) +#define wxBLACK_PEN wxStockGDI::GetPen(wxStockGDI::PEN_BLACK) +#define wxBLUE_PEN wxStockGDI::GetPen(wxStockGDI::PEN_BLUE) +#define wxCYAN_PEN wxStockGDI::GetPen(wxStockGDI::PEN_CYAN) +#define wxGREEN_PEN wxStockGDI::GetPen(wxStockGDI::PEN_GREEN) +#define wxYELLOW_PEN wxStockGDI::GetPen(wxStockGDI::PEN_YELLOW) +#define wxGREY_PEN wxStockGDI::GetPen(wxStockGDI::PEN_GREY) +#define wxLIGHT_GREY_PEN wxStockGDI::GetPen(wxStockGDI::PEN_LIGHTGREY) +#define wxMEDIUM_GREY_PEN wxStockGDI::GetPen(wxStockGDI::PEN_MEDIUMGREY) +#define wxRED_PEN wxStockGDI::GetPen(wxStockGDI::PEN_RED) +#define wxTRANSPARENT_PEN wxStockGDI::GetPen(wxStockGDI::PEN_TRANSPARENT) +#define wxWHITE_PEN wxStockGDI::GetPen(wxStockGDI::PEN_WHITE) + +#define wxBLACK_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_BLACK) +#define wxBLUE_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_BLUE) +#define wxCYAN_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_CYAN) +#define wxGREEN_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_GREEN) +#define wxYELLOW_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_YELLOW) +#define wxGREY_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_GREY) +#define wxLIGHT_GREY_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_LIGHTGREY) +#define wxMEDIUM_GREY_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_MEDIUMGREY) +#define wxRED_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_RED) +#define wxTRANSPARENT_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_TRANSPARENT) +#define wxWHITE_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_WHITE) + +#define wxBLACK wxStockGDI::GetColour(wxStockGDI::COLOUR_BLACK) +#define wxBLUE wxStockGDI::GetColour(wxStockGDI::COLOUR_BLUE) +#define wxCYAN wxStockGDI::GetColour(wxStockGDI::COLOUR_CYAN) +#define wxGREEN wxStockGDI::GetColour(wxStockGDI::COLOUR_GREEN) +#define wxYELLOW wxStockGDI::GetColour(wxStockGDI::COLOUR_YELLOW) +#define wxLIGHT_GREY wxStockGDI::GetColour(wxStockGDI::COLOUR_LIGHTGREY) +#define wxRED wxStockGDI::GetColour(wxStockGDI::COLOUR_RED) +#define wxWHITE wxStockGDI::GetColour(wxStockGDI::COLOUR_WHITE) + +#define wxCROSS_CURSOR wxStockGDI::GetCursor(wxStockGDI::CURSOR_CROSS) +#define wxHOURGLASS_CURSOR wxStockGDI::GetCursor(wxStockGDI::CURSOR_HOURGLASS) +#define wxSTANDARD_CURSOR wxStockGDI::GetCursor(wxStockGDI::CURSOR_STANDARD) + +// 'Null' objects +extern WXDLLIMPEXP_DATA_CORE(wxBitmap) wxNullBitmap; +extern WXDLLIMPEXP_DATA_CORE(wxIcon) wxNullIcon; +extern WXDLLIMPEXP_DATA_CORE(wxCursor) wxNullCursor; +extern WXDLLIMPEXP_DATA_CORE(wxPen) wxNullPen; +extern WXDLLIMPEXP_DATA_CORE(wxBrush) wxNullBrush; +extern WXDLLIMPEXP_DATA_CORE(wxPalette) wxNullPalette; +extern WXDLLIMPEXP_DATA_CORE(wxFont) wxNullFont; +extern WXDLLIMPEXP_DATA_CORE(wxColour) wxNullColour; +extern WXDLLIMPEXP_DATA_CORE(wxIconBundle) wxNullIconBundle; + +extern WXDLLIMPEXP_DATA_CORE(wxColourDatabase*) wxTheColourDatabase; + +extern WXDLLIMPEXP_DATA_CORE(const char) wxPanelNameStr[]; + +extern WXDLLIMPEXP_DATA_CORE(const wxSize) wxDefaultSize; +extern WXDLLIMPEXP_DATA_CORE(const wxPoint) wxDefaultPosition; + +// --------------------------------------------------------------------------- +// global functions +// --------------------------------------------------------------------------- + +// resource management +extern void WXDLLIMPEXP_CORE wxInitializeStockLists(); +extern void WXDLLIMPEXP_CORE wxDeleteStockLists(); + +// is the display colour (or monochrome)? +extern bool WXDLLIMPEXP_CORE wxColourDisplay(); + +// Returns depth of screen +extern int WXDLLIMPEXP_CORE wxDisplayDepth(); +#define wxGetDisplayDepth wxDisplayDepth + +// get the display size +extern void WXDLLIMPEXP_CORE wxDisplaySize(int *width, int *height); +extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySize(); +extern void WXDLLIMPEXP_CORE wxDisplaySizeMM(int *width, int *height); +extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySizeMM(); +extern wxSize WXDLLIMPEXP_CORE wxGetDisplayPPI(); + +// Get position and size of the display workarea +extern void WXDLLIMPEXP_CORE wxClientDisplayRect(int *x, int *y, int *width, int *height); +extern wxRect WXDLLIMPEXP_CORE wxGetClientDisplayRect(); + +// set global cursor +extern void WXDLLIMPEXP_CORE wxSetCursor(const wxCursor& cursor); + +#endif + // _WX_GDICMNH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gdiobj.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gdiobj.h new file mode 100644 index 0000000000..903dfe083d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gdiobj.h @@ -0,0 +1,92 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gdiobj.h +// Purpose: wxGDIObject base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GDIOBJ_H_BASE_ +#define _WX_GDIOBJ_H_BASE_ + +#include "wx/object.h" + +// ---------------------------------------------------------------------------- +// wxGDIRefData is the base class for wxXXXData structures which contain the +// real data for the GDI object and are shared among all wxWin objects sharing +// the same native GDI object +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGDIRefData : public wxObjectRefData +{ +public: + // Default ctor which needs to be defined just because we use + // wxDECLARE_NO_COPY_CLASS() below. + wxGDIRefData() { } + + // override this in the derived classes to check if this data object is + // really fully initialized + virtual bool IsOk() const { return true; } + +private: + wxDECLARE_NO_COPY_CLASS(wxGDIRefData); +}; + +// ---------------------------------------------------------------------------- +// wxGDIObject: base class for bitmaps, pens, brushes, ... +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGDIObject : public wxObject +{ +public: + // checks if the object can be used + virtual bool IsOk() const + { + // the cast here is safe because the derived classes always create + // wxGDIRefData objects + return m_refData && static_cast(m_refData)->IsOk(); + } + + // don't use in the new code, use IsOk() instead + bool IsNull() const { return m_refData == NULL; } + + // older version, for backwards compatibility only (but not deprecated + // because it's still widely used) + bool Ok() const { return IsOk(); } + +#if defined(__WXMSW__) || defined(__WXPM__) + // Creates the resource + virtual bool RealizeResource() { return false; } + + // Frees the resource + virtual bool FreeResource(bool WXUNUSED(force) = false) { return false; } + + virtual bool IsFree() const { return false; } + + // Returns handle. + virtual WXHANDLE GetResourceHandle() const { return 0; } +#endif // defined(__WXMSW__) || defined(__WXPM__) + +protected: + // replace base class functions using wxObjectRefData with our own which + // use wxGDIRefData to ensure that we always work with data objects of the + // correct type (i.e. derived from wxGDIRefData) + virtual wxObjectRefData *CreateRefData() const + { + return CreateGDIRefData(); + } + + virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const + { + return CloneGDIRefData(static_cast(data)); + } + + virtual wxGDIRefData *CreateGDIRefData() const = 0; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const = 0; + + DECLARE_DYNAMIC_CLASS(wxGDIObject) +}; + +#endif // _WX_GDIOBJ_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/aboutdlgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/aboutdlgg.h new file mode 100644 index 0000000000..36e0cad438 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/aboutdlgg.h @@ -0,0 +1,102 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/aboutdlgg.h +// Purpose: generic wxAboutBox() implementation +// Author: Vadim Zeitlin +// Created: 2006-10-07 +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_ABOUTDLGG_H_ +#define _WX_GENERIC_ABOUTDLGG_H_ + +#include "wx/defs.h" + +#if wxUSE_ABOUTDLG + +#include "wx/dialog.h" + +class WXDLLIMPEXP_FWD_ADV wxAboutDialogInfo; +class WXDLLIMPEXP_FWD_CORE wxSizer; +class WXDLLIMPEXP_FWD_CORE wxSizerFlags; + +// Under GTK and OS X "About" dialogs are not supposed to be modal, unlike MSW +// and, presumably, all the other platforms. +#ifndef wxUSE_MODAL_ABOUT_DIALOG + #if defined(__WXGTK__) || defined(__WXMAC__) + #define wxUSE_MODAL_ABOUT_DIALOG 0 + #else + #define wxUSE_MODAL_ABOUT_DIALOG 1 + #endif +#endif // wxUSE_MODAL_ABOUT_DIALOG not defined + +// ---------------------------------------------------------------------------- +// wxGenericAboutDialog: generic "About" dialog implementation +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGenericAboutDialog : public wxDialog +{ +public: + // constructors and Create() method + // -------------------------------- + + // default ctor, you must use Create() to really initialize the dialog + wxGenericAboutDialog() { Init(); } + + // ctor which fully initializes the object + wxGenericAboutDialog(const wxAboutDialogInfo& info, wxWindow* parent = NULL) + { + Init(); + + (void)Create(info, parent); + } + + // this method must be called if and only if the default ctor was used + bool Create(const wxAboutDialogInfo& info, wxWindow* parent = NULL); + +protected: + // this virtual method may be overridden to add some more controls to the + // dialog + // + // notice that for this to work you must call Create() from the derived + // class ctor and not use the base class ctor directly as otherwise the + // virtual function of the derived class wouldn't be called + virtual void DoAddCustomControls() { } + + // add arbitrary control to the text sizer contents with the specified + // flags + void AddControl(wxWindow *win, const wxSizerFlags& flags); + + // add arbitrary control to the text sizer contents and center it + void AddControl(wxWindow *win); + + // add the text, if it's not empty, to the text sizer contents + void AddText(const wxString& text); + +#if wxUSE_COLLPANE + // add a wxCollapsiblePane containing the given text + void AddCollapsiblePane(const wxString& title, const wxString& text); +#endif // wxUSE_COLLPANE + +private: + // common part of all ctors + void Init() { m_sizerText = NULL; } + +#if !wxUSE_MODAL_ABOUT_DIALOG + // An explicit handler for deleting the dialog when it's closed is needed + // when we show it non-modally. + void OnCloseWindow(wxCloseEvent& event); + void OnOK(wxCommandEvent& event); +#endif // !wxUSE_MODAL_ABOUT_DIALOG + + wxSizer *m_sizerText; +}; + +// unlike wxAboutBox which can show either the native or generic about dialog, +// this function always shows the generic one +WXDLLIMPEXP_ADV void wxGenericAboutBox(const wxAboutDialogInfo& info, wxWindow* parent = NULL); + +#endif // wxUSE_ABOUTDLG + +#endif // _WX_GENERIC_ABOUTDLGG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/accel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/accel.h new file mode 100644 index 0000000000..44f8e07e83 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/accel.h @@ -0,0 +1,49 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/accel.h +// Purpose: wxAcceleratorTable class +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_ACCEL_H_ +#define _WX_GENERIC_ACCEL_H_ + +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; + +// ---------------------------------------------------------------------------- +// wxAcceleratorTable +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxAcceleratorTable : public wxObject +{ +public: + wxAcceleratorTable(); + wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); + virtual ~wxAcceleratorTable(); + + bool Ok() const { return IsOk(); } + bool IsOk() const; + + void Add(const wxAcceleratorEntry& entry); + void Remove(const wxAcceleratorEntry& entry); + + // implementation + // -------------- + + wxMenuItem *GetMenuItem(const wxKeyEvent& event) const; + int GetCommand(const wxKeyEvent& event) const; + + const wxAcceleratorEntry *GetEntry(const wxKeyEvent& event) const; + +protected: + // ref counting code + virtual wxObjectRefData *CreateRefData() const; + virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) +}; + +#endif // _WX_GENERIC_ACCEL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/animate.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/animate.h new file mode 100644 index 0000000000..818daf890c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/animate.h @@ -0,0 +1,177 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/animate.h +// Purpose: wxAnimation and wxAnimationCtrl +// Author: Julian Smart and Guillermo Rodriguez Garcia +// Modified by: Francesco Montorsi +// Created: 13/8/99 +// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_ANIMATEH__ +#define _WX_GENERIC_ANIMATEH__ + +#include "wx/bitmap.h" + +// ---------------------------------------------------------------------------- +// wxAnimation +// ---------------------------------------------------------------------------- + +WX_DECLARE_LIST_WITH_DECL(wxAnimationDecoder, wxAnimationDecoderList, class WXDLLIMPEXP_ADV); + +class WXDLLIMPEXP_ADV wxAnimation : public wxAnimationBase +{ +public: + wxAnimation() {} + wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY) + { LoadFile(name, type); } + + virtual bool IsOk() const + { return m_refData != NULL; } + + virtual unsigned int GetFrameCount() const; + virtual int GetDelay(unsigned int i) const; + virtual wxImage GetFrame(unsigned int i) const; + virtual wxSize GetSize() const; + + virtual bool LoadFile(const wxString& filename, + wxAnimationType type = wxANIMATION_TYPE_ANY); + virtual bool Load(wxInputStream& stream, + wxAnimationType type = wxANIMATION_TYPE_ANY); + + // extended interface used by the generic implementation of wxAnimationCtrl + wxPoint GetFramePosition(unsigned int frame) const; + wxSize GetFrameSize(unsigned int frame) const; + wxAnimationDisposal GetDisposalMethod(unsigned int frame) const; + wxColour GetTransparentColour(unsigned int frame) const; + wxColour GetBackgroundColour() const; + +protected: + static wxAnimationDecoderList sm_handlers; + +public: + static inline wxAnimationDecoderList& GetHandlers() { return sm_handlers; } + static void AddHandler(wxAnimationDecoder *handler); + static void InsertHandler(wxAnimationDecoder *handler); + static const wxAnimationDecoder *FindHandler( wxAnimationType animType ); + + static void CleanUpHandlers(); + static void InitStandardHandlers(); + + DECLARE_DYNAMIC_CLASS(wxAnimation) +}; + + +// ---------------------------------------------------------------------------- +// wxAnimationCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxAnimationCtrl: public wxAnimationCtrlBase +{ +public: + wxAnimationCtrl() { Init(); } + wxAnimationCtrl(wxWindow *parent, + wxWindowID id, + const wxAnimation& anim = wxNullAnimation, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxAC_DEFAULT_STYLE, + const wxString& name = wxAnimationCtrlNameStr) + { + Init(); + + Create(parent, id, anim, pos, size, style, name); + } + + void Init(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxAnimation& anim = wxNullAnimation, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxAC_DEFAULT_STYLE, + const wxString& name = wxAnimationCtrlNameStr); + + ~wxAnimationCtrl(); + +public: + virtual bool LoadFile(const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY); + virtual bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY); + + virtual void Stop(); + virtual bool Play() + { return Play(true /* looped */); } + virtual bool IsPlaying() const + { return m_isPlaying; } + + void SetAnimation(const wxAnimation &animation); + wxAnimation GetAnimation() const + { return m_animation; } + + virtual void SetInactiveBitmap(const wxBitmap &bmp); + + // override base class method + virtual bool SetBackgroundColour(const wxColour& col); + +public: // event handlers + + void OnPaint(wxPaintEvent& event); + void OnTimer(wxTimerEvent& event); + void OnSize(wxSizeEvent& event); + +public: // extended API specific to this implementation of wxAnimateCtrl + + // Specify whether the animation's background colour is to be shown (the default), + // or whether the window background should show through + void SetUseWindowBackgroundColour(bool useWinBackground = true) + { m_useWinBackgroundColour = useWinBackground; } + bool IsUsingWindowBackgroundColour() const + { return m_useWinBackgroundColour; } + + // This overload of Play() lets you specify if the animation must loop or not + bool Play(bool looped); + + // Draw the current frame of the animation into given DC. + // This is fast as current frame is always cached. + void DrawCurrentFrame(wxDC& dc); + + // Returns a wxBitmap with the current frame drawn in it + wxBitmap& GetBackingStore() + { return m_backingStore; } + +protected: // internal utilities + + // resize this control to fit m_animation + void FitToAnimation(); + + // Draw the background; use this when e.g. previous frame had wxANIM_TOBACKGROUND disposal. + void DisposeToBackground(); + void DisposeToBackground(wxDC& dc); + void DisposeToBackground(wxDC& dc, const wxPoint &pos, const wxSize &sz); + + void IncrementalUpdateBackingStore(); + bool RebuildBackingStoreUpToFrame(unsigned int); + void DrawFrame(wxDC &dc, unsigned int); + + virtual void DisplayStaticImage(); + virtual wxSize DoGetBestSize() const; + +protected: + unsigned int m_currentFrame; // Current frame + bool m_looped; // Looped, or not + wxTimer m_timer; // The timer + wxAnimation m_animation; // The animation + + bool m_isPlaying; // Is the animation playing? + bool m_useWinBackgroundColour; // Use animation bg colour or window bg colour? + + wxBitmap m_backingStore; // The frames are drawn here and then blitted + // on the screen + +private: + typedef wxAnimationCtrlBase base_type; + DECLARE_DYNAMIC_CLASS(wxAnimationCtrl) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_GENERIC_ANIMATEH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/bmpcbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/bmpcbox.h new file mode 100644 index 0000000000..d5e5cbb169 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/bmpcbox.h @@ -0,0 +1,136 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/bmpcbox.h +// Purpose: wxBitmapComboBox +// Author: Jaakko Salli +// Modified by: +// Created: Aug-30-2006 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_BMPCBOX_H_ +#define _WX_GENERIC_BMPCBOX_H_ + + +#define wxGENERIC_BITMAPCOMBOBOX 1 + +#include "wx/odcombo.h" + +// ---------------------------------------------------------------------------- +// wxBitmapComboBox: a wxComboBox that allows images to be shown +// in front of string items. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxBitmapComboBox : public wxOwnerDrawnComboBox, + public wxBitmapComboBoxBase +{ +public: + + // ctors and such + wxBitmapComboBox() : wxOwnerDrawnComboBox(), wxBitmapComboBoxBase() + { + Init(); + } + + wxBitmapComboBox(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr) + : wxOwnerDrawnComboBox(), + wxBitmapComboBoxBase() + { + Init(); + + (void)Create(parent, id, value, pos, size, n, + choices, style, validator, name); + } + + wxBitmapComboBox(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + int n, + const wxString choices[], + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr); + + virtual ~wxBitmapComboBox(); + + // Adds item with image to the end of the combo box. + int Append(const wxString& item, const wxBitmap& bitmap = wxNullBitmap); + int Append(const wxString& item, const wxBitmap& bitmap, void *clientData); + int Append(const wxString& item, const wxBitmap& bitmap, wxClientData *clientData); + + // Inserts item with image into the list before pos. Not valid for wxCB_SORT + // styles, use Append instead. + int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos); + int Insert(const wxString& item, const wxBitmap& bitmap, + unsigned int pos, void *clientData); + int Insert(const wxString& item, const wxBitmap& bitmap, + unsigned int pos, wxClientData *clientData); + + // Sets the image for the given item. + virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap); + virtual bool SetFont(const wxFont& font); + +protected: + + virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, int item, int flags) const; + virtual void OnDrawItem(wxDC& dc, const wxRect& rect, int item, int flags) const; + virtual wxCoord OnMeasureItem(size_t item) const; + virtual wxCoord OnMeasureItemWidth(size_t item) const; + + // Event handlers + void OnSize(wxSizeEvent& event); + + virtual wxSize DoGetBestSize() const; + + virtual wxItemContainer* GetItemContainer() { return this; } + virtual wxWindow* GetControl() { return this; } + + // wxItemContainer implementation + virtual int DoInsertItems(const wxArrayStringsAdapter & items, + unsigned int pos, + void **clientData, wxClientDataType type); + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + +private: + bool m_inResize; + + void Init(); + + DECLARE_EVENT_TABLE() + + DECLARE_DYNAMIC_CLASS(wxBitmapComboBox) +}; + +#endif // _WX_GENERIC_BMPCBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/busyinfo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/busyinfo.h new file mode 100644 index 0000000000..7f56edb26d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/busyinfo.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/busyinfo.h +// Purpose: Information window (when app is busy) +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BUSYINFO_H_ +#define _WX_BUSYINFO_H_ + +#include "wx/defs.h" + +#if wxUSE_BUSYINFO + +#include "wx/object.h" + +class WXDLLIMPEXP_FWD_CORE wxFrame; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +//-------------------------------------------------------------------------------- +// wxBusyInfo +// Displays progress information +// Can be used in exactly same way as wxBusyCursor +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBusyInfo : public wxObject +{ +public: + wxBusyInfo(const wxString& message, wxWindow *parent = NULL); + + virtual ~wxBusyInfo(); + +private: + wxFrame *m_InfoFrame; + + wxDECLARE_NO_COPY_CLASS(wxBusyInfo); +}; + +#endif // wxUSE_BUSYINFO +#endif // _WX_BUSYINFO_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/buttonbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/buttonbar.h new file mode 100644 index 0000000000..e933a3ca2c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/buttonbar.h @@ -0,0 +1,123 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/buttonbar.h +// Purpose: wxButtonToolBar declaration +// Author: Julian Smart, after Robert Roebling, Vadim Zeitlin, SciTech +// Modified by: +// Created: 2006-04-13 +// Copyright: (c) Julian Smart, Robert Roebling, Vadim Zeitlin, +// SciTech Software, Inc. +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BUTTONBAR_H_ +#define _WX_BUTTONBAR_H_ + +#include "wx/bmpbuttn.h" +#include "wx/toolbar.h" + +class WXDLLIMPEXP_FWD_CORE wxButtonToolBarTool; + +// ---------------------------------------------------------------------------- +// wxButtonToolBar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxButtonToolBar : public wxToolBarBase +{ +public: + // construction/destruction + wxButtonToolBar() { Init(); } + wxButtonToolBar(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxToolBarNameStr) + { + Init(); + + Create(parent, id, pos, size, style, name); + } + + bool Create( wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxToolBarNameStr ); + + virtual ~wxButtonToolBar(); + + virtual bool Realize(); + + virtual void SetToolShortHelp(int id, const wxString& helpString); + virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const; + +protected: + // common part of all ctors + void Init(); + + // implement base class pure virtuals + virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); + virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); + + virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable); + virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle); + virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); + + virtual wxToolBarToolBase *CreateTool(int id, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled, + wxItemKind kind, + wxObject *clientData, + const wxString& shortHelp, + const wxString& longHelp); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); + + virtual wxSize DoGetBestClientSize() const; + + // calculate layout + void DoLayout(); + + // get the bounding rect for the given tool + wxRect GetToolRect(wxToolBarToolBase *tool) const; + + // get the rect limits depending on the orientation: top/bottom for a + // vertical toolbar, left/right for a horizontal one + void GetRectLimits(const wxRect& rect, wxCoord *start, wxCoord *end) const; + + // receives button commands + void OnCommand(wxCommandEvent& event); + + // paints a border + void OnPaint(wxPaintEvent& event); + + // detects mouse clicks outside buttons + void OnLeftUp(wxMouseEvent& event); + +private: + // have we calculated the positions of our tools? + bool m_needsLayout; + + // the width of a separator + wxCoord m_widthSeparator; + + // the total size of all toolbar elements + wxCoord m_maxWidth, + m_maxHeight; + + // the height of a label + int m_labelHeight; + + // the space above the label + int m_labelMargin; + +private: + DECLARE_DYNAMIC_CLASS(wxButtonToolBar) + DECLARE_EVENT_TABLE() +}; + +#endif + // _WX_BUTTONBAR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/calctrlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/calctrlg.h new file mode 100644 index 0000000000..8e430b6231 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/calctrlg.h @@ -0,0 +1,316 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/calctrlg.h +// Purpose: generic implementation of date-picker control +// Author: Vadim Zeitlin +// Modified by: +// Created: 29.12.99 +// Copyright: (c) 1999 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_CALCTRLG_H +#define _WX_GENERIC_CALCTRLG_H + +#include "wx/control.h" // the base class +#include "wx/dcclient.h" // for wxPaintDC + +class WXDLLIMPEXP_FWD_CORE wxComboBox; +class WXDLLIMPEXP_FWD_CORE wxStaticText; +class WXDLLIMPEXP_FWD_CORE wxSpinCtrl; +class WXDLLIMPEXP_FWD_CORE wxSpinEvent; + +// ---------------------------------------------------------------------------- +// wxGenericCalendarCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGenericCalendarCtrl : public wxCalendarCtrlBase +{ +public: + // construction + wxGenericCalendarCtrl() { Init(); } + wxGenericCalendarCtrl(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAL_SHOW_HOLIDAYS, + const wxString& name = wxCalendarNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAL_SHOW_HOLIDAYS, + const wxString& name = wxCalendarNameStr); + + virtual ~wxGenericCalendarCtrl(); + + virtual bool Destroy(); + + // set/get the current date + // ------------------------ + + virtual bool SetDate(const wxDateTime& date); + virtual wxDateTime GetDate() const { return m_date; } + + + // set/get the range in which selection can occur + // --------------------------------------------- + + virtual bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, + const wxDateTime& upperdate = wxDefaultDateTime); + + virtual bool GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const; + + // these functions are for generic version only, don't use them but use the + // Set/GetDateRange() above instead + bool SetLowerDateLimit(const wxDateTime& date = wxDefaultDateTime); + const wxDateTime& GetLowerDateLimit() const { return m_lowdate; } + bool SetUpperDateLimit(const wxDateTime& date = wxDefaultDateTime); + const wxDateTime& GetUpperDateLimit() const { return m_highdate; } + + + // calendar mode + // ------------- + + // some calendar styles can't be changed after the control creation by + // just using SetWindowStyle() and Refresh() and the functions below + // should be used instead for them + + // corresponds to wxCAL_NO_MONTH_CHANGE bit + virtual bool EnableMonthChange(bool enable = true); + + // corresponds to wxCAL_NO_YEAR_CHANGE bit, deprecated, generic only + void EnableYearChange(bool enable = true); + + + // customization + // ------------- + + virtual void Mark(size_t day, bool mark); + + // all other functions in this section are for generic version only + + // header colours are used for painting the weekdays at the top + virtual void SetHeaderColours(const wxColour& colFg, const wxColour& colBg) + { + m_colHeaderFg = colFg; + m_colHeaderBg = colBg; + } + + virtual const wxColour& GetHeaderColourFg() const { return m_colHeaderFg; } + virtual const wxColour& GetHeaderColourBg() const { return m_colHeaderBg; } + + // highlight colour is used for the currently selected date + virtual void SetHighlightColours(const wxColour& colFg, const wxColour& colBg) + { + m_colHighlightFg = colFg; + m_colHighlightBg = colBg; + } + + virtual const wxColour& GetHighlightColourFg() const { return m_colHighlightFg; } + virtual const wxColour& GetHighlightColourBg() const { return m_colHighlightBg; } + + // holiday colour is used for the holidays (if style & wxCAL_SHOW_HOLIDAYS) + virtual void SetHolidayColours(const wxColour& colFg, const wxColour& colBg) + { + m_colHolidayFg = colFg; + m_colHolidayBg = colBg; + } + + virtual const wxColour& GetHolidayColourFg() const { return m_colHolidayFg; } + virtual const wxColour& GetHolidayColourBg() const { return m_colHolidayBg; } + + virtual wxCalendarDateAttr *GetAttr(size_t day) const + { + wxCHECK_MSG( day > 0 && day < 32, NULL, wxT("invalid day") ); + + return m_attrs[day - 1]; + } + + virtual void SetAttr(size_t day, wxCalendarDateAttr *attr) + { + wxCHECK_RET( day > 0 && day < 32, wxT("invalid day") ); + + delete m_attrs[day - 1]; + m_attrs[day - 1] = attr; + } + + virtual void ResetAttr(size_t day) { SetAttr(day, NULL); } + + virtual void SetHoliday(size_t day); + + virtual wxCalendarHitTestResult HitTest(const wxPoint& pos, + wxDateTime *date = NULL, + wxDateTime::WeekDay *wd = NULL); + + // implementation only from now on + // ------------------------------- + + // forward these functions to all subcontrols + virtual bool Enable(bool enable = true); + virtual bool Show(bool show = true); + + virtual void SetWindowStyleFlag(long style); + + virtual wxVisualAttributes GetDefaultAttributes() const + { return GetClassDefaultAttributes(GetWindowVariant()); } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + void OnSysColourChanged(wxSysColourChangedEvent& event); + +protected: + // override some base class virtuals + virtual wxSize DoGetBestSize() const; + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual void DoGetSize(int *width, int *height) const; + +private: + // common part of all ctors + void Init(); + + // startup colours and reinitialization after colour changes in system + void InitColours(); + + // event handlers + void OnPaint(wxPaintEvent& event); + void OnClick(wxMouseEvent& event); + void OnDClick(wxMouseEvent& event); + void OnChar(wxKeyEvent& event); + void OnMonthChange(wxCommandEvent& event); + + void HandleYearChange(wxCommandEvent& event); + void OnYearChange(wxSpinEvent& event); + void OnYearTextChange(wxCommandEvent& event); + + // (re)calc m_widthCol and m_heightRow + void RecalcGeometry(); + + // set the date and send the notification + void SetDateAndNotify(const wxDateTime& date); + + // get the week (row, in range 1..6) for the given date + size_t GetWeek(const wxDateTime& date) const; + + // get the date from which we start drawing days + wxDateTime GetStartDate() const; + + // get the first/last days of the week corresponding to the current style + wxDateTime::WeekDay GetWeekStart() const + { + return HasFlag(wxCAL_MONDAY_FIRST) ? wxDateTime::Mon + : wxDateTime::Sun; + } + + wxDateTime::WeekDay GetWeekEnd() const + { + return HasFlag(wxCAL_MONDAY_FIRST) ? wxDateTime::Sun + : wxDateTime::Sat; + } + + + // is this date shown? + bool IsDateShown(const wxDateTime& date) const; + + // is this date in the currently allowed range? + bool IsDateInRange(const wxDateTime& date) const; + + // adjust the date to the currently allowed range, return true if it was + // changed + bool AdjustDateToRange(wxDateTime *date) const; + + // redraw the given date + void RefreshDate(const wxDateTime& date); + + // change the date inside the same month/year + void ChangeDay(const wxDateTime& date); + + // deprecated + bool AllowYearChange() const + { + return !(GetWindowStyle() & wxCAL_NO_YEAR_CHANGE); + } + + // show the correct controls + void ShowCurrentControls(); + + // create the month combo and year spin controls + void CreateMonthComboBox(); + void CreateYearSpinCtrl(); + +public: + // get the currently shown control for month/year + wxControl *GetMonthControl() const; + wxControl *GetYearControl() const; + +private: + virtual void ResetHolidayAttrs(); + virtual void RefreshHolidays() { Refresh(); } + + // OnPaint helper-methods + + // Highlight the [fromdate : todate] range using pen and brush + void HighlightRange(wxPaintDC* dc, const wxDateTime& fromdate, const wxDateTime& todate, const wxPen* pen, const wxBrush* brush); + + // Get the "coordinates" for the date relative to the month currently displayed. + // using (day, week): upper left coord is (1, 1), lower right coord is (7, 6) + // if the date isn't visible (-1, -1) is put in (day, week) and false is returned + bool GetDateCoord(const wxDateTime& date, int *day, int *week) const; + + // Set the flag for SetDate(): otherwise it would overwrite the year + // typed in by the user + void SetUserChangedYear() { m_userChangedYear = true; } + + + // the subcontrols + wxStaticText *m_staticMonth; + wxComboBox *m_comboMonth; + + wxStaticText *m_staticYear; + wxSpinCtrl *m_spinYear; + + // the current selection + wxDateTime m_date; + + // the date-range + wxDateTime m_lowdate; + wxDateTime m_highdate; + + // default attributes + wxColour m_colHighlightFg, + m_colHighlightBg, + m_colHolidayFg, + m_colHolidayBg, + m_colHeaderFg, + m_colHeaderBg, + m_colBackground, + m_colSurrounding; + + // the attributes for each of the month days + wxCalendarDateAttr *m_attrs[31]; + + // the width and height of one column/row in the calendar + wxCoord m_widthCol, + m_heightRow, + m_rowOffset, + m_calendarWeekWidth; + + wxRect m_leftArrowRect, + m_rightArrowRect; + + // the week day names + wxString m_weekdays[7]; + + // true if SetDate() is being called as the result of changing the year in + // the year control + bool m_userChangedYear; + + DECLARE_DYNAMIC_CLASS(wxGenericCalendarCtrl) + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxGenericCalendarCtrl); +}; + +#endif // _WX_GENERIC_CALCTRLG_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/caret.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/caret.h new file mode 100644 index 0000000000..67041cf20d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/caret.h @@ -0,0 +1,94 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/caret.h +// Purpose: generic wxCaret class +// Author: Vadim Zeitlin (original code by Robert Roebling) +// Modified by: +// Created: 25.05.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CARET_H_ +#define _WX_CARET_H_ + +#include "wx/timer.h" +#include "wx/dc.h" +#include "wx/overlay.h" + +#ifdef wxHAS_NATIVE_OVERLAY + #define wxHAS_CARET_USING_OVERLAYS +#endif + +class WXDLLIMPEXP_FWD_CORE wxCaret; + +class WXDLLIMPEXP_CORE wxCaretTimer : public wxTimer +{ +public: + wxCaretTimer(wxCaret *caret); + virtual void Notify(); + +private: + wxCaret *m_caret; +}; + +class WXDLLIMPEXP_CORE wxCaret : public wxCaretBase +{ +public: + // ctors + // ----- + // default - use Create() + wxCaret() : m_timer(this) { InitGeneric(); } + // creates a block caret associated with the given window + wxCaret(wxWindowBase *window, int width, int height) + : wxCaretBase(window, width, height), m_timer(this) { InitGeneric(); } + wxCaret(wxWindowBase *window, const wxSize& size) + : wxCaretBase(window, size), m_timer(this) { InitGeneric(); } + + virtual ~wxCaret(); + + // implementation + // -------------- + + // called by wxWindow (not using the event tables) + virtual void OnSetFocus(); + virtual void OnKillFocus(); + + // called by wxCaretTimer + void OnTimer(); + +protected: + virtual void DoShow(); + virtual void DoHide(); + virtual void DoMove(); + virtual void DoSize(); + + // blink the caret once + void Blink(); + + // refresh the caret + void Refresh(); + + // draw the caret on the given DC + void DoDraw(wxDC *dc, wxWindow* win); + +private: + // GTK specific initialization + void InitGeneric(); + +#ifdef wxHAS_CARET_USING_OVERLAYS + // the overlay for displaying the caret + wxOverlay m_overlay; +#else + // the bitmap holding the part of window hidden by the caret when it was + // at (m_xOld, m_yOld) + wxBitmap m_bmpUnderCaret; + int m_xOld, + m_yOld; +#endif + + wxCaretTimer m_timer; + bool m_blinkedOut, // true => caret hidden right now + m_hasFocus; // true => our window has focus +}; + +#endif // _WX_CARET_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/choicdgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/choicdgg.h new file mode 100644 index 0000000000..2d92b44276 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/choicdgg.h @@ -0,0 +1,464 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/choicdgg.h +// Purpose: Generic choice dialogs +// Author: Julian Smart +// Modified by: 03.11.00: VZ to add wxArrayString and multiple sel functions +// Created: 01/02/97 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_CHOICDGG_H_ +#define _WX_GENERIC_CHOICDGG_H_ + +#include "wx/dynarray.h" +#include "wx/dialog.h" + +class WXDLLIMPEXP_FWD_CORE wxListBoxBase; + +// ---------------------------------------------------------------------------- +// some (ugly...) constants +// ---------------------------------------------------------------------------- + +#define wxCHOICE_HEIGHT 150 +#define wxCHOICE_WIDTH 200 + +#ifdef __WXWINCE__ +#define wxCHOICEDLG_STYLE \ + (wxDEFAULT_DIALOG_STYLE | wxOK | wxCANCEL | wxCENTRE) +#else +#define wxCHOICEDLG_STYLE \ + (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE) +#endif + +// ---------------------------------------------------------------------------- +// wxAnyChoiceDialog: a base class for dialogs containing a listbox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxAnyChoiceDialog : public wxDialog +{ +public: + wxAnyChoiceDialog() { } + + wxAnyChoiceDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + int n, const wxString *choices, + long styleDlg = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition, + long styleLbox = wxLB_ALWAYS_SB) + { + (void)Create(parent, message, caption, n, choices, + styleDlg, pos, styleLbox); + } + wxAnyChoiceDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + long styleDlg = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition, + long styleLbox = wxLB_ALWAYS_SB) + { + (void)Create(parent, message, caption, choices, + styleDlg, pos, styleLbox); + } + + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + int n, const wxString *choices, + long styleDlg = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition, + long styleLbox = wxLB_ALWAYS_SB); + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + long styleDlg = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition, + long styleLbox = wxLB_ALWAYS_SB); + +protected: + wxListBoxBase *m_listbox; + + virtual wxListBoxBase *CreateList(int n, + const wxString *choices, + long styleLbox); + + wxDECLARE_NO_COPY_CLASS(wxAnyChoiceDialog); +}; + +// ---------------------------------------------------------------------------- +// wxSingleChoiceDialog: a dialog with single selection listbox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSingleChoiceDialog : public wxAnyChoiceDialog +{ +public: + wxSingleChoiceDialog() + { + m_selection = -1; + } + + wxSingleChoiceDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + int n, + const wxString *choices, + void **clientData = NULL, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition) + { + Create(parent, message, caption, n, choices, clientData, style, pos); + } + + wxSingleChoiceDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + void **clientData = NULL, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition) + { + Create(parent, message, caption, choices, clientData, style, pos); + } + + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + int n, + const wxString *choices, + void **clientData = NULL, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition); + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + void **clientData = NULL, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition); + + void SetSelection(int sel); + int GetSelection() const { return m_selection; } + wxString GetStringSelection() const { return m_stringSelection; } + void* GetSelectionData() const { return m_clientData; } + +#if WXWIN_COMPATIBILITY_2_8 + // Deprecated overloads taking "char**" client data. + wxDEPRECATED_CONSTRUCTOR + ( + wxSingleChoiceDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + int n, + const wxString *choices, + char **clientData, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition) + ) + { + Create(parent, message, caption, n, choices, + (void**)clientData, style, pos); + } + + wxDEPRECATED_CONSTRUCTOR + ( + wxSingleChoiceDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + char **clientData, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition) + ) + { + Create(parent, message, caption, choices, + (void**)clientData, style, pos); + } + + wxDEPRECATED_INLINE + ( + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + int n, + const wxString *choices, + char **clientData, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition), + return Create(parent, message, caption, n, choices, + (void**)clientData, style, pos); + ) + + wxDEPRECATED_INLINE + ( + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + char **clientData, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition), + return Create(parent, message, caption, choices, + (void**)clientData, style, pos); + ) + + // NB: no need to make it return wxChar, it's untyped + wxDEPRECATED_ACCESSOR + ( + char* GetSelectionClientData() const, + (char*)GetSelectionData() + ) +#endif // WXWIN_COMPATIBILITY_2_8 + + // implementation from now on + void OnOK(wxCommandEvent& event); +#ifndef __SMARTPHONE__ + void OnListBoxDClick(wxCommandEvent& event); +#endif +#ifdef __WXWINCE__ + void OnJoystickButtonDown(wxJoystickEvent& event); +#endif + +protected: + int m_selection; + wxString m_stringSelection; + + void DoChoice(); + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxSingleChoiceDialog) + DECLARE_EVENT_TABLE() +}; + +// ---------------------------------------------------------------------------- +// wxMultiChoiceDialog: a dialog with multi selection listbox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMultiChoiceDialog : public wxAnyChoiceDialog +{ +public: + wxMultiChoiceDialog() { } + + wxMultiChoiceDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + int n, + const wxString *choices, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition) + { + (void)Create(parent, message, caption, n, choices, style, pos); + } + wxMultiChoiceDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition) + { + (void)Create(parent, message, caption, choices, style, pos); + } + + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + int n, + const wxString *choices, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition); + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + long style = wxCHOICEDLG_STYLE, + const wxPoint& pos = wxDefaultPosition); + + void SetSelections(const wxArrayInt& selections); + wxArrayInt GetSelections() const { return m_selections; } + + // implementation from now on + virtual bool TransferDataFromWindow(); + +protected: +#if wxUSE_CHECKLISTBOX + virtual wxListBoxBase *CreateList(int n, + const wxString *choices, + long styleLbox); +#endif // wxUSE_CHECKLISTBOX + + wxArrayInt m_selections; + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMultiChoiceDialog) +}; + +// ---------------------------------------------------------------------------- +// wrapper functions which can be used to get selection(s) from the user +// ---------------------------------------------------------------------------- + +// get the user selection as a string +WXDLLIMPEXP_CORE wxString wxGetSingleChoice(const wxString& message, + const wxString& caption, + const wxArrayString& choices, + wxWindow *parent = NULL, + int x = wxDefaultCoord, + int y = wxDefaultCoord, + bool centre = true, + int width = wxCHOICE_WIDTH, + int height = wxCHOICE_HEIGHT, + int initialSelection = 0); + +WXDLLIMPEXP_CORE wxString wxGetSingleChoice(const wxString& message, + const wxString& caption, + int n, const wxString *choices, + wxWindow *parent = NULL, + int x = wxDefaultCoord, + int y = wxDefaultCoord, + bool centre = true, + int width = wxCHOICE_WIDTH, + int height = wxCHOICE_HEIGHT, + int initialSelection = 0); + +WXDLLIMPEXP_CORE wxString wxGetSingleChoice(const wxString& message, + const wxString& caption, + const wxArrayString& choices, + int initialSelection, + wxWindow *parent = NULL); + +WXDLLIMPEXP_CORE wxString wxGetSingleChoice(const wxString& message, + const wxString& caption, + int n, const wxString *choices, + int initialSelection, + wxWindow *parent = NULL); + +// Same as above but gets position in list of strings, instead of string, +// or -1 if no selection +WXDLLIMPEXP_CORE int wxGetSingleChoiceIndex(const wxString& message, + const wxString& caption, + const wxArrayString& choices, + wxWindow *parent = NULL, + int x = wxDefaultCoord, + int y = wxDefaultCoord, + bool centre = true, + int width = wxCHOICE_WIDTH, + int height = wxCHOICE_HEIGHT, + int initialSelection = 0); + +WXDLLIMPEXP_CORE int wxGetSingleChoiceIndex(const wxString& message, + const wxString& caption, + int n, const wxString *choices, + wxWindow *parent = NULL, + int x = wxDefaultCoord, + int y = wxDefaultCoord, + bool centre = true, + int width = wxCHOICE_WIDTH, + int height = wxCHOICE_HEIGHT, + int initialSelection = 0); + +WXDLLIMPEXP_CORE int wxGetSingleChoiceIndex(const wxString& message, + const wxString& caption, + const wxArrayString& choices, + int initialSelection, + wxWindow *parent = NULL); + +WXDLLIMPEXP_CORE int wxGetSingleChoiceIndex(const wxString& message, + const wxString& caption, + int n, const wxString *choices, + int initialSelection, + wxWindow *parent = NULL); + +// Return client data instead or NULL if canceled +WXDLLIMPEXP_CORE void* wxGetSingleChoiceData(const wxString& message, + const wxString& caption, + const wxArrayString& choices, + void **client_data, + wxWindow *parent = NULL, + int x = wxDefaultCoord, + int y = wxDefaultCoord, + bool centre = true, + int width = wxCHOICE_WIDTH, + int height = wxCHOICE_HEIGHT, + int initialSelection = 0); + +WXDLLIMPEXP_CORE void* wxGetSingleChoiceData(const wxString& message, + const wxString& caption, + int n, const wxString *choices, + void **client_data, + wxWindow *parent = NULL, + int x = wxDefaultCoord, + int y = wxDefaultCoord, + bool centre = true, + int width = wxCHOICE_WIDTH, + int height = wxCHOICE_HEIGHT, + int initialSelection = 0); + +WXDLLIMPEXP_CORE void* wxGetSingleChoiceData(const wxString& message, + const wxString& caption, + const wxArrayString& choices, + void **client_data, + int initialSelection, + wxWindow *parent = NULL); + + +WXDLLIMPEXP_CORE void* wxGetSingleChoiceData(const wxString& message, + const wxString& caption, + int n, const wxString *choices, + void **client_data, + int initialSelection, + wxWindow *parent = NULL); + +// fill the array with the indices of the chosen items, it will be empty +// if no items were selected or Cancel was pressed - return the number of +// selections or -1 if cancelled +WXDLLIMPEXP_CORE int wxGetSelectedChoices(wxArrayInt& selections, + const wxString& message, + const wxString& caption, + int n, const wxString *choices, + wxWindow *parent = NULL, + int x = wxDefaultCoord, + int y = wxDefaultCoord, + bool centre = true, + int width = wxCHOICE_WIDTH, + int height = wxCHOICE_HEIGHT); + +WXDLLIMPEXP_CORE int wxGetSelectedChoices(wxArrayInt& selections, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + wxWindow *parent = NULL, + int x = wxDefaultCoord, + int y = wxDefaultCoord, + bool centre = true, + int width = wxCHOICE_WIDTH, + int height = wxCHOICE_HEIGHT); + +#if WXWIN_COMPATIBILITY_2_8 +// fill the array with the indices of the chosen items, it will be empty +// if no items were selected or Cancel was pressed - return the number of +// selections +wxDEPRECATED( WXDLLIMPEXP_CORE size_t wxGetMultipleChoices(wxArrayInt& selections, + const wxString& message, + const wxString& caption, + int n, const wxString *choices, + wxWindow *parent = NULL, + int x = wxDefaultCoord, + int y = wxDefaultCoord, + bool centre = true, + int width = wxCHOICE_WIDTH, + int height = wxCHOICE_HEIGHT) ); + +wxDEPRECATED( WXDLLIMPEXP_CORE size_t wxGetMultipleChoices(wxArrayInt& selections, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + wxWindow *parent = NULL, + int x = wxDefaultCoord, + int y = wxDefaultCoord, + bool centre = true, + int width = wxCHOICE_WIDTH, + int height = wxCHOICE_HEIGHT)); +#endif // WXWIN_COMPATIBILITY_2_8 + +#endif // _WX_GENERIC_CHOICDGG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/clrpickerg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/clrpickerg.h new file mode 100644 index 0000000000..de32125e00 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/clrpickerg.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/clrpickerg.h +// Purpose: wxGenericColourButton header +// Author: Francesco Montorsi (based on Vadim Zeitlin's code) +// Modified by: +// Created: 14/4/2006 +// Copyright: (c) Vadim Zeitlin, Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CLRPICKER_H_ +#define _WX_CLRPICKER_H_ + +#include "wx/button.h" +#include "wx/bmpbuttn.h" +#include "wx/colourdata.h" + +//----------------------------------------------------------------------------- +// wxGenericColourButton: a button which brings up a wxColourDialog +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericColourButton : public wxBitmapButton, + public wxColourPickerWidgetBase +{ +public: + wxGenericColourButton() {} + wxGenericColourButton(wxWindow *parent, + wxWindowID id, + const wxColour& col = *wxBLACK, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCLRBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxColourPickerWidgetNameStr) + { + Create(parent, id, col, pos, size, style, validator, name); + } + + virtual ~wxGenericColourButton() {} + + +public: // API extensions specific for wxGenericColourButton + + // user can override this to init colour data in a different way + virtual void InitColourData(); + + // returns the colour data shown in wxColourDialog + wxColourData *GetColourData() { return &ms_data; } + + +public: + + bool Create(wxWindow *parent, + wxWindowID id, + const wxColour& col = *wxBLACK, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCLRBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxColourPickerWidgetNameStr); + + void OnButtonClick(wxCommandEvent &); + + +protected: + wxBitmap m_bitmap; + + wxSize DoGetBestSize() const; + + void UpdateColour(); + + // the colour data shown in wxColourPickerCtrlGeneric + // controls. This member is static so that all colour pickers + // in the program share the same set of custom colours. + static wxColourData ms_data; + +private: + DECLARE_DYNAMIC_CLASS(wxGenericColourButton) +}; + + +#endif // _WX_CLRPICKER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/collpaneg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/collpaneg.h new file mode 100644 index 0000000000..ec0777115d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/collpaneg.h @@ -0,0 +1,110 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/collpaneg.h +// Purpose: wxGenericCollapsiblePane +// Author: Francesco Montorsi +// Modified by: +// Created: 8/10/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLLAPSABLE_PANE_H_GENERIC_ +#define _WX_COLLAPSABLE_PANE_H_GENERIC_ + +// forward declared +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxStaticLine; +#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) +class WXDLLIMPEXP_FWD_CORE wxDisclosureTriangle; +#endif + +#include "wx/containr.h" + +// ---------------------------------------------------------------------------- +// wxGenericCollapsiblePane +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericCollapsiblePane : + public wxNavigationEnabled +{ +public: + wxGenericCollapsiblePane() { Init(); } + + wxGenericCollapsiblePane(wxWindow *parent, + wxWindowID winid, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCP_DEFAULT_STYLE, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxCollapsiblePaneNameStr) + { + Init(); + + Create(parent, winid, label, pos, size, style, val, name); + } + + virtual ~wxGenericCollapsiblePane(); + + bool Create(wxWindow *parent, + wxWindowID winid, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCP_DEFAULT_STYLE, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxCollapsiblePaneNameStr); + + // public wxCollapsiblePane API + virtual void Collapse(bool collapse = true); + virtual void SetLabel(const wxString &label); + + virtual bool IsCollapsed() const + { return m_pPane==NULL || !m_pPane->IsShown(); } + virtual wxWindow *GetPane() const + { return m_pPane; } + virtual wxString GetLabel() const + { return m_strLabel; } + + virtual bool Layout(); + + + // for the generic collapsible pane only: + wxControl* GetControlWidget() const + { return (wxControl*)m_pButton; } + + // implementation only, don't use + void OnStateChange(const wxSize& sizeNew); + +protected: + // overridden methods + virtual wxSize DoGetBestSize() const; + + wxString GetBtnLabel() const; + int GetBorder() const; + + // child controls +#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) + wxDisclosureTriangle *m_pButton; +#else + wxButton *m_pButton; +#endif + wxStaticLine *m_pStaticLine; + wxWindow *m_pPane; + wxSizer *m_sz; + + // the button label without ">>" or "<<" + wxString m_strLabel; + +private: + void Init(); + + // event handlers + void OnButton(wxCommandEvent &ev); + void OnSize(wxSizeEvent &ev); + + DECLARE_DYNAMIC_CLASS(wxGenericCollapsiblePane) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_COLLAPSABLE_PANE_H_GENERIC_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/colour.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/colour.h new file mode 100644 index 0000000000..5db020cacd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/colour.h @@ -0,0 +1,71 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/colour.h +// Purpose: wxColour class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_COLOUR_H_ +#define _WX_GENERIC_COLOUR_H_ + +#include "wx/object.h" + +// Colour +class WXDLLIMPEXP_CORE wxColour: public wxColourBase +{ +public: + // constructors + // ------------ + DEFINE_STD_WXCOLOUR_CONSTRUCTORS + + // copy ctors and assignment operators + wxColour(const wxColour& col) + { + *this = col; + } + + wxColour& operator=(const wxColour& col); + + // accessors + virtual bool IsOk() const { return m_isInit; } + + unsigned char Red() const { return m_red; } + unsigned char Green() const { return m_green; } + unsigned char Blue() const { return m_blue; } + unsigned char Alpha() const { return m_alpha; } + + // comparison + bool operator==(const wxColour& colour) const + { + return (m_red == colour.m_red && + m_green == colour.m_green && + m_blue == colour.m_blue && + m_alpha == colour.m_alpha && + m_isInit == colour.m_isInit); + } + + bool operator!=(const wxColour& colour) const { return !(*this == colour); } + +protected: + + // Helper function + void Init(); + + virtual void + InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); + +private: + bool m_isInit; + unsigned char m_red; + unsigned char m_blue; + unsigned char m_green; + unsigned char m_alpha; + +private: + DECLARE_DYNAMIC_CLASS(wxColour) +}; + +#endif // _WX_GENERIC_COLOUR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/colrdlgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/colrdlgg.h new file mode 100644 index 0000000000..a83abd8ce3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/colrdlgg.h @@ -0,0 +1,116 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/colrdlgg.h +// Purpose: wxGenericColourDialog +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLORDLGG_H_ +#define _WX_COLORDLGG_H_ + +#include "wx/gdicmn.h" +#include "wx/dialog.h" + +#define wxID_ADD_CUSTOM 3000 + +#if wxUSE_SLIDER + + #define wxID_RED_SLIDER 3001 + #define wxID_GREEN_SLIDER 3002 + #define wxID_BLUE_SLIDER 3003 + + class WXDLLIMPEXP_FWD_CORE wxSlider; + +#endif // wxUSE_SLIDER + +class WXDLLIMPEXP_CORE wxGenericColourDialog : public wxDialog +{ +public: + wxGenericColourDialog(); + wxGenericColourDialog(wxWindow *parent, + wxColourData *data = NULL); + virtual ~wxGenericColourDialog(); + + bool Create(wxWindow *parent, wxColourData *data = NULL); + + wxColourData &GetColourData() { return m_colourData; } + + virtual int ShowModal(); + + // Internal functions + void OnMouseEvent(wxMouseEvent& event); + void OnPaint(wxPaintEvent& event); + + virtual void CalculateMeasurements(); + virtual void CreateWidgets(); + virtual void InitializeColours(); + + virtual void PaintBasicColours(wxDC& dc); + virtual void PaintCustomColours(wxDC& dc); + virtual void PaintCustomColour(wxDC& dc); + virtual void PaintHighlight(wxDC& dc, bool draw); + + virtual void OnBasicColourClick(int which); + virtual void OnCustomColourClick(int which); + + void OnAddCustom(wxCommandEvent& event); + +#if wxUSE_SLIDER + void OnRedSlider(wxCommandEvent& event); + void OnGreenSlider(wxCommandEvent& event); + void OnBlueSlider(wxCommandEvent& event); +#endif // wxUSE_SLIDER + + void OnCloseWindow(wxCloseEvent& event); + +protected: + wxColourData m_colourData; + + // Area reserved for grids of colours + wxRect m_standardColoursRect; + wxRect m_customColoursRect; + wxRect m_singleCustomColourRect; + + // Size of each colour rectangle + wxPoint m_smallRectangleSize; + + // For single customizable colour + wxPoint m_customRectangleSize; + + // Grid spacing (between rectangles) + int m_gridSpacing; + + // Section spacing (between left and right halves of dialog box) + int m_sectionSpacing; + + // 48 'standard' colours + wxColour m_standardColours[48]; + + // 16 'custom' colours + wxColour m_customColours[16]; + + // Which colour is selected? An index into one of the two areas. + int m_colourSelection; + int m_whichKind; // 1 for standard colours, 2 for custom colours, + +#if wxUSE_SLIDER + wxSlider *m_redSlider; + wxSlider *m_greenSlider; + wxSlider *m_blueSlider; +#endif // wxUSE_SLIDER + + int m_buttonY; + + int m_okButtonX; + int m_customButtonX; + + // static bool colourDialogCancelled; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGenericColourDialog) +}; + +#endif // _WX_COLORDLGG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/combo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/combo.h new file mode 100644 index 0000000000..f271563ae2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/combo.h @@ -0,0 +1,172 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/combo.h +// Purpose: Generic wxComboCtrl +// Author: Jaakko Salli +// Modified by: +// Created: Apr-30-2006 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_COMBOCTRL_H_ +#define _WX_GENERIC_COMBOCTRL_H_ + +#if wxUSE_COMBOCTRL + +// Only define generic if native doesn't have all the features +#if !defined(wxCOMBOCONTROL_FULLY_FEATURED) + +// ---------------------------------------------------------------------------- +// Generic wxComboCtrl +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + +// all actions of single line text controls are supported + +// popup/dismiss the choice window +#define wxACTION_COMBOBOX_POPUP wxT("popup") +#define wxACTION_COMBOBOX_DISMISS wxT("dismiss") + +#endif + +#include "wx/dcbuffer.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr[]; + +class WXDLLIMPEXP_CORE wxGenericComboCtrl : public wxComboCtrlBase +{ +public: + // ctors and such + wxGenericComboCtrl() : wxComboCtrlBase() { Init(); } + + wxGenericComboCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + : wxComboCtrlBase() + { + Init(); + + (void)Create(parent, id, value, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + virtual ~wxGenericComboCtrl(); + + void SetCustomPaintWidth( int width ); + + virtual bool IsKeyPopupToggle(const wxKeyEvent& event) const; + + static int GetFeatures() { return wxComboCtrlFeatures::All; } + +#if defined(__WXUNIVERSAL__) + // we have our own input handler and our own actions + virtual bool PerformAction(const wxControlAction& action, + long numArg = 0l, + const wxString& strArg = wxEmptyString); +#endif + +protected: + + // Dummies for platform-specific wxTextEntry implementations +#if defined(__WXUNIVERSAL__) + // Looks like there's nothing we need to override here +#elif defined(__WXMOTIF__) + virtual WXWidget GetTextWidget() const { return NULL; } +#elif defined(__WXGTK__) +#if defined(__WXGTK20__) + virtual GtkEditable *GetEditable() const { return NULL; } + virtual GtkEntry *GetEntry() const { return NULL; } +#endif +#elif defined(__WXMAC__) + // Looks like there's nothing we need to override here +#elif defined(__WXPM__) + virtual WXHWND GetEditHWND() const { return NULL; } +#endif + + // For better transparent background rendering + virtual bool HasTransparentBackground() + { + #if wxALWAYS_NATIVE_DOUBLE_BUFFER + #ifdef __WXGTK__ + // Sanity check for GTK+ + return IsDoubleBuffered(); + #else + return true; + #endif + #else + return false; + #endif + } + + // Mandatory virtuals + virtual void OnResize(); + + // Event handlers + void OnPaintEvent( wxPaintEvent& event ); + void OnMouseEvent( wxMouseEvent& event ); + +private: + void Init(); + + DECLARE_EVENT_TABLE() + + DECLARE_DYNAMIC_CLASS(wxGenericComboCtrl) +}; + + +#ifndef _WX_COMBOCONTROL_H_ + +// If native wxComboCtrl was not defined, then prepare a simple +// front-end so that wxRTTI works as expected. + +class WXDLLIMPEXP_CORE wxComboCtrl : public wxGenericComboCtrl +{ +public: + wxComboCtrl() : wxGenericComboCtrl() {} + + wxComboCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + : wxGenericComboCtrl() + { + (void)Create(parent, id, value, pos, size, style, validator, name); + } + + virtual ~wxComboCtrl() {} + +protected: + +private: + DECLARE_DYNAMIC_CLASS(wxComboCtrl) +}; + +#endif // _WX_COMBOCONTROL_H_ + +#else + +#define wxGenericComboCtrl wxComboCtrl + +#endif // !defined(wxCOMBOCONTROL_FULLY_FEATURED) + +#endif // wxUSE_COMBOCTRL +#endif + // _WX_GENERIC_COMBOCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/ctrlsub.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/ctrlsub.h new file mode 100644 index 0000000000..0dd113dcf9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/ctrlsub.h @@ -0,0 +1,122 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/ctrlsub.h +// Purpose: common functionality of wxItemContainer-derived controls +// Author: Vadim Zeitlin +// Created: 2007-07-25 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_CTRLSUB_H_ +#define _WX_GENERIC_CTRLSUB_H_ + +#include "wx/dynarray.h" + +// ---------------------------------------------------------------------------- +// wxControlWithItemsGeneric: generic implementation of item client data +// ---------------------------------------------------------------------------- + +class wxControlWithItemsGeneric : public wxControlWithItemsBase +{ +public: + wxControlWithItemsGeneric() { } + + virtual void DoInitItemClientData() + { + m_itemsClientData.resize(GetCount(), NULL); + } + + virtual void DoSetItemClientData(unsigned int n, void *clientData) + { + m_itemsClientData[n] = clientData; + } + + virtual void *DoGetItemClientData(unsigned int n) const + { + return m_itemsClientData[n]; + } + + virtual void DoClear() { m_itemsClientData.clear(); } + virtual void DoDeleteOneItem(unsigned int pos) + { + if ( HasClientData() ) + m_itemsClientData.RemoveAt(pos); + } + +protected: + // preallocate memory for numItems new items: this should be called from + // the derived classes DoInsertItems() to speed up appending big numbers of + // items with client data; it is safe to call even if we don't use client + // data at all and does nothing in this case + void AllocClientData(unsigned int numItems) + { + if ( HasClientData() ) + m_itemsClientData.reserve(m_itemsClientData.size() + numItems); + } + + // this must be called by derived classes when a new item is added to the + // control to add storage for the corresponding client data pointer (before + // inserting many items, call AllocClientData()) + void InsertNewItemClientData(unsigned int pos, + void **clientData, + unsigned int n, + wxClientDataType type) + { + if ( InitClientDataIfNeeded(type) ) + m_itemsClientData.Insert(clientData[n], pos); + } + + // the same as InsertNewItemClientData() but for numItems consecutive items + // (this can only be used if the control doesn't support sorting as + // otherwise the items positions wouldn't be consecutive any more) + void InsertNewItemsClientData(unsigned int pos, + unsigned int numItems, + void **clientData, + wxClientDataType type) + { + if ( InitClientDataIfNeeded(type) ) + { + // it's more efficient to insert everything at once and then update + // for big number of items to avoid moving the array contents + // around (which would result in O(N^2) algorithm) + m_itemsClientData.Insert(NULL, pos, numItems); + + for ( unsigned int n = 0; n < numItems; ++n, ++pos ) + m_itemsClientData[pos] = clientData[n]; + } + } + + + // vector containing the client data pointers: it is either empty (if + // client data is not used) or has the same number of elements as the + // control + wxArrayPtrVoid m_itemsClientData; + +private: + // initialize client data if needed, return false if we don't have any + // client data and true otherwise + bool InitClientDataIfNeeded(wxClientDataType type) + { + if ( !HasClientData() ) + { + if ( type == wxClientData_None ) + { + // we didn't have the client data before and are not asked to + // store it now neither + return false; + } + + // this is the first time client data is used with this control + DoInitItemClientData(); + SetClientDataType(type); + } + //else: we already have client data + + return true; + } + + wxDECLARE_NO_COPY_CLASS(wxControlWithItemsGeneric); +}; + +#endif // _WX_GENERIC_CTRLSUB_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/custombgwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/custombgwin.h new file mode 100644 index 0000000000..8004195498 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/custombgwin.h @@ -0,0 +1,95 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/custombgwin.h +// Purpose: Generic implementation of wxCustomBackgroundWindow. +// Author: Vadim Zeitlin +// Created: 2011-10-10 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_CUSTOMBGWIN_H_ +#define _WX_GENERIC_CUSTOMBGWIN_H_ + +#include "wx/bitmap.h" + +// A helper to avoid template bloat: this class contains all type-independent +// code of wxCustomBackgroundWindow<> below. +class wxCustomBackgroundWindowGenericBase : public wxCustomBackgroundWindowBase +{ +public: + wxCustomBackgroundWindowGenericBase() { } + +protected: + void DoEraseBackground(wxEraseEvent& event, wxWindow* win) + { + wxDC& dc = *event.GetDC(); + + const wxSize clientSize = win->GetClientSize(); + const wxSize bitmapSize = m_bitmapBg.GetSize(); + + for ( int x = 0; x < clientSize.x; x += bitmapSize.x ) + { + for ( int y = 0; y < clientSize.y; y += bitmapSize.y ) + { + dc.DrawBitmap(m_bitmapBg, x, y); + } + } + } + + + // The bitmap used for painting the background if valid. + wxBitmap m_bitmapBg; + + + wxDECLARE_NO_COPY_CLASS(wxCustomBackgroundWindowGenericBase); +}; + +// ---------------------------------------------------------------------------- +// wxCustomBackgroundWindow +// ---------------------------------------------------------------------------- + +template +class wxCustomBackgroundWindow : public W, + public wxCustomBackgroundWindowGenericBase +{ +public: + typedef W BaseWindowClass; + + wxCustomBackgroundWindow() { } + +protected: + virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) + { + m_bitmapBg = bmp; + + if ( m_bitmapBg.IsOk() ) + { + BaseWindowClass::Connect + ( + wxEVT_ERASE_BACKGROUND, + wxEraseEventHandler(wxCustomBackgroundWindow::OnEraseBackground) + ); + } + else + { + BaseWindowClass::Disconnect + ( + wxEVT_ERASE_BACKGROUND, + wxEraseEventHandler(wxCustomBackgroundWindow::OnEraseBackground) + ); + } + } + +private: + // Event handler for erasing the background which is only used when we have + // a valid background bitmap. + void OnEraseBackground(wxEraseEvent& event) + { + DoEraseBackground(event, this); + } + + + wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCustomBackgroundWindow, W); +}; + +#endif // _WX_GENERIC_CUSTOMBGWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dataview.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dataview.h new file mode 100644 index 0000000000..f3ac8ee598 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dataview.h @@ -0,0 +1,292 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/dataview.h +// Purpose: wxDataViewCtrl generic implementation header +// Author: Robert Roebling +// Modified By: Bo Yang +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GENERICDATAVIEWCTRLH__ +#define __GENERICDATAVIEWCTRLH__ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/list.h" +#include "wx/control.h" +#include "wx/scrolwin.h" +#include "wx/icon.h" +#include "wx/vector.h" + +class WXDLLIMPEXP_FWD_ADV wxDataViewMainWindow; +class WXDLLIMPEXP_FWD_ADV wxDataViewHeaderWindow; + +// --------------------------------------------------------- +// wxDataViewColumn +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewColumn : public wxDataViewColumnBase +{ +public: + wxDataViewColumn(const wxString& title, + wxDataViewRenderer *renderer, + unsigned int model_column, + int width = wxDVC_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE) + : wxDataViewColumnBase(renderer, model_column), + m_title(title) + { + Init(width, align, flags); + } + + wxDataViewColumn(const wxBitmap& bitmap, + wxDataViewRenderer *renderer, + unsigned int model_column, + int width = wxDVC_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE) + : wxDataViewColumnBase(bitmap, renderer, model_column) + { + Init(width, align, flags); + } + + // implement wxHeaderColumnBase methods + virtual void SetTitle(const wxString& title) { m_title = title; UpdateDisplay(); } + virtual wxString GetTitle() const { return m_title; } + + virtual void SetWidth(int width) { m_width = width; UpdateDisplay(); } + virtual int GetWidth() const; + + virtual void SetMinWidth(int minWidth) { m_minWidth = minWidth; UpdateDisplay(); } + virtual int GetMinWidth() const { return m_minWidth; } + + virtual void SetAlignment(wxAlignment align) { m_align = align; UpdateDisplay(); } + virtual wxAlignment GetAlignment() const { return m_align; } + + virtual void SetFlags(int flags) { m_flags = flags; UpdateDisplay(); } + virtual int GetFlags() const { return m_flags; } + + virtual bool IsSortKey() const { return m_sort; } + + virtual void UnsetAsSortKey(); + + virtual void SetSortOrder(bool ascending); + + virtual bool IsSortOrderAscending() const { return m_sortAscending; } + + virtual void SetBitmap( const wxBitmap& bitmap ) { wxDataViewColumnBase::SetBitmap(bitmap); UpdateDisplay(); } + + +private: + // common part of all ctors + void Init(int width, wxAlignment align, int flags); + + void UpdateDisplay(); + + wxString m_title; + int m_width, + m_minWidth; + wxAlignment m_align; + int m_flags; + bool m_sort, + m_sortAscending; + + friend class wxDataViewHeaderWindowBase; + friend class wxDataViewHeaderWindow; + friend class wxDataViewHeaderWindowMSW; +}; + +// --------------------------------------------------------- +// wxDataViewCtrl +// --------------------------------------------------------- + +WX_DECLARE_LIST_WITH_DECL(wxDataViewColumn, wxDataViewColumnList, + class WXDLLIMPEXP_ADV); + +class WXDLLIMPEXP_ADV wxDataViewCtrl : public wxDataViewCtrlBase, + public wxScrollHelper +{ + friend class wxDataViewMainWindow; + friend class wxDataViewHeaderWindowBase; + friend class wxDataViewHeaderWindow; + friend class wxDataViewHeaderWindowMSW; + friend class wxDataViewColumn; + +public: + wxDataViewCtrl() : wxScrollHelper(this) + { + Init(); + } + + wxDataViewCtrl( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDataViewCtrlNameStr ) + : wxScrollHelper(this) + { + Create(parent, id, pos, size, style, validator, name); + } + + virtual ~wxDataViewCtrl(); + + void Init(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDataViewCtrlNameStr); + + virtual bool AssociateModel( wxDataViewModel *model ); + + virtual bool AppendColumn( wxDataViewColumn *col ); + virtual bool PrependColumn( wxDataViewColumn *col ); + virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col ); + + virtual void DoSetExpanderColumn(); + virtual void DoSetIndent(); + + virtual unsigned int GetColumnCount() const; + virtual wxDataViewColumn* GetColumn( unsigned int pos ) const; + virtual bool DeleteColumn( wxDataViewColumn *column ); + virtual bool ClearColumns(); + virtual int GetColumnPosition( const wxDataViewColumn *column ) const; + + virtual wxDataViewColumn *GetSortingColumn() const; + + virtual int GetSelectedItemsCount() const; + virtual int GetSelections( wxDataViewItemArray & sel ) const; + virtual void SetSelections( const wxDataViewItemArray & sel ); + virtual void Select( const wxDataViewItem & item ); + virtual void Unselect( const wxDataViewItem & item ); + virtual bool IsSelected( const wxDataViewItem & item ) const; + + virtual void SelectAll(); + virtual void UnselectAll(); + + virtual void EnsureVisible( const wxDataViewItem & item, + const wxDataViewColumn *column = NULL ); + virtual void HitTest( const wxPoint & point, wxDataViewItem & item, + wxDataViewColumn* &column ) const; + virtual wxRect GetItemRect( const wxDataViewItem & item, + const wxDataViewColumn *column = NULL ) const; + + virtual bool SetRowHeight( int rowHeight ); + + virtual void Expand( const wxDataViewItem & item ); + virtual void Collapse( const wxDataViewItem & item ); + virtual bool IsExpanded( const wxDataViewItem & item ) const; + + virtual void SetFocus(); + + virtual bool SetFont(const wxFont & font); + +#if wxUSE_DRAG_AND_DROP + virtual bool EnableDragSource( const wxDataFormat &format ); + virtual bool EnableDropTarget( const wxDataFormat &format ); +#endif // wxUSE_DRAG_AND_DROP + + virtual wxBorder GetDefaultBorder() const; + + virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column); + + // These methods are specific to generic wxDataViewCtrl implementation and + // should not be used in portable code. + wxColour GetAlternateRowColour() const { return m_alternateRowColour; } + void SetAlternateRowColour(const wxColour& colour); + +protected: + virtual void EnsureVisible( int row, int column ); + + // Notice that row here may be invalid (i.e. >= GetRowCount()), this is not + // an error and this function simply returns an invalid item in this case. + virtual wxDataViewItem GetItemByRow( unsigned int row ) const; + virtual int GetRowByItem( const wxDataViewItem & item ) const; + + int GetSortingColumnIndex() const { return m_sortingColumnIdx; } + void SetSortingColumnIndex(int idx) { m_sortingColumnIdx = idx; } + +public: // utility functions not part of the API + + // returns the "best" width for the idx-th column + unsigned int GetBestColumnWidth(int idx) const; + + // called by header window after reorder + void ColumnMoved( wxDataViewColumn* col, unsigned int new_pos ); + + // update the display after a change to an individual column + void OnColumnChange(unsigned int idx); + + // update after a change to the number of columns + void OnColumnsCountChanged(); + + wxWindow *GetMainWindow() { return (wxWindow*) m_clientArea; } + + // return the index of the given column in m_cols + int GetColumnIndex(const wxDataViewColumn *column) const; + + // Return the index of the column having the given model index. + int GetModelColumnIndex(unsigned int model_column) const; + + // return the column displayed at the given position in the control + wxDataViewColumn *GetColumnAt(unsigned int pos) const; + + virtual wxDataViewColumn *GetCurrentColumn() const; + + virtual void OnInternalIdle(); + +private: + virtual wxDataViewItem DoGetCurrentItem() const; + virtual void DoSetCurrentItem(const wxDataViewItem& item); + + void InvalidateColBestWidths(); + void InvalidateColBestWidth(int idx); + void UpdateColWidths(); + + wxDataViewColumnList m_cols; + // cached column best widths information, values are for + // respective columns from m_cols and the arrays have same size + struct CachedColWidthInfo + { + CachedColWidthInfo() : width(0), dirty(true) {} + int width; // cached width or 0 if not computed + bool dirty; // column was invalidated, header needs updating + }; + wxVector m_colsBestWidths; + // This indicates that at least one entry in m_colsBestWidths has 'dirty' + // flag set. It's cheaper to check one flag in OnInternalIdle() than to + // iterate over m_colsBestWidths to check if anything needs to be done. + bool m_colsDirty; + + wxDataViewModelNotifier *m_notifier; + wxDataViewMainWindow *m_clientArea; + wxDataViewHeaderWindow *m_headerArea; + + // user defined color to draw row lines, may be invalid + wxColour m_alternateRowColour; + + // the index of the column currently used for sorting or -1 + int m_sortingColumnIdx; + +private: + void OnSize( wxSizeEvent &event ); + virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size); + + // we need to return a special WM_GETDLGCODE value to process just the + // arrows but let the other navigation characters through +#ifdef __WXMSW__ + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); +#endif // __WXMSW__ + + WX_FORWARD_TO_SCROLL_HELPER() + +private: + DECLARE_DYNAMIC_CLASS(wxDataViewCtrl) + wxDECLARE_NO_COPY_CLASS(wxDataViewCtrl); + DECLARE_EVENT_TABLE() +}; + + +#endif // __GENERICDATAVIEWCTRLH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/datectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/datectrl.h new file mode 100644 index 0000000000..47e656634b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/datectrl.h @@ -0,0 +1,96 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/datectrl.h +// Purpose: generic wxDatePickerCtrl implementation +// Author: Andreas Pflug +// Modified by: +// Created: 2005-01-19 +// Copyright: (c) 2005 Andreas Pflug +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_DATECTRL_H_ +#define _WX_GENERIC_DATECTRL_H_ + +#include "wx/compositewin.h" + +class WXDLLIMPEXP_FWD_CORE wxComboCtrl; + +class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl; +class WXDLLIMPEXP_FWD_ADV wxCalendarComboPopup; + +class WXDLLIMPEXP_ADV wxDatePickerCtrlGeneric + : public wxCompositeWindow +{ +public: + // creating the control + wxDatePickerCtrlGeneric() { Init(); } + virtual ~wxDatePickerCtrlGeneric(); + wxDatePickerCtrlGeneric(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDatePickerCtrlNameStr) + { + Init(); + + (void)Create(parent, id, date, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDatePickerCtrlNameStr); + + // wxDatePickerCtrl methods + void SetValue(const wxDateTime& date); + wxDateTime GetValue() const; + + bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const; + void SetRange(const wxDateTime &dt1, const wxDateTime &dt2); + + bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, + const wxDateTime& upperdate = wxDefaultDateTime); + + // extra methods available only in this (generic) implementation + wxCalendarCtrl *GetCalendar() const; + + + // implementation only from now on + // ------------------------------- + + // overridden base class methods + virtual bool Destroy(); + +protected: + virtual wxSize DoGetBestSize() const; + +private: + void Init(); + + // return the list of the windows composing this one + virtual wxWindowList GetCompositeWindowParts() const; + + void OnText(wxCommandEvent &event); + void OnSize(wxSizeEvent& event); + void OnFocus(wxFocusEvent& event); + +#ifdef __WXOSX_COCOA__ + virtual void OSXGenerateEvent(const wxDateTime& WXUNUSED(dt)) { } +#endif + + wxComboCtrl* m_combo; + wxCalendarComboPopup* m_popup; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxDatePickerCtrlGeneric); +}; + +#endif // _WX_GENERIC_DATECTRL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dcpsg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dcpsg.h new file mode 100644 index 0000000000..ea423475d5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dcpsg.h @@ -0,0 +1,159 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/dcpsg.h +// Purpose: wxPostScriptDC class +// Author: Julian Smart and others +// Modified by: +// Copyright: (c) Julian Smart and Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCPSG_H_ +#define _WX_DCPSG_H_ + +#include "wx/defs.h" + +#if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT + +#include "wx/dc.h" +#include "wx/dcprint.h" +#include "wx/dialog.h" +#include "wx/module.h" +#include "wx/cmndata.h" +#include "wx/strvararg.h" + +//----------------------------------------------------------------------------- +// wxPostScriptDC +//----------------------------------------------------------------------------- + + +class WXDLLIMPEXP_CORE wxPostScriptDC : public wxDC +{ +public: + wxPostScriptDC(); + + // Recommended constructor + wxPostScriptDC(const wxPrintData& printData); + +private: + DECLARE_DYNAMIC_CLASS(wxPostScriptDC) +}; + +class WXDLLIMPEXP_CORE wxPostScriptDCImpl : public wxDCImpl +{ +public: + wxPostScriptDCImpl( wxPrinterDC *owner ); + wxPostScriptDCImpl( wxPrinterDC *owner, const wxPrintData& data ); + wxPostScriptDCImpl( wxPostScriptDC *owner ); + wxPostScriptDCImpl( wxPostScriptDC *owner, const wxPrintData& data ); + + void Init(); + + virtual ~wxPostScriptDCImpl(); + + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const; + + bool CanDrawBitmap() const { return true; } + + void Clear(); + void SetFont( const wxFont& font ); + void SetPen( const wxPen& pen ); + void SetBrush( const wxBrush& brush ); + void SetLogicalFunction( wxRasterOperationMode function ); + void SetBackground( const wxBrush& brush ); + + void DestroyClippingRegion(); + + bool StartDoc(const wxString& message); + void EndDoc(); + void StartPage(); + void EndPage(); + + wxCoord GetCharHeight() const; + wxCoord GetCharWidth() const; + bool CanGetTextExtent() const { return true; } + + // Resolution in pixels per logical inch + wxSize GetPPI() const; + + virtual void ComputeScaleAndOrigin(); + + void SetBackgroundMode(int WXUNUSED(mode)) { } + void SetPalette(const wxPalette& WXUNUSED(palette)) { } + + void SetPrintData(const wxPrintData& data); + wxPrintData& GetPrintData() { return m_printData; } + + virtual int GetDepth() const { return 24; } + + void PsPrint( const wxString& psdata ); + + // Overrridden for wxPrinterDC Impl + + virtual int GetResolution() const; + virtual wxRect GetPaperRect() const; + + virtual void* GetHandle() const { return NULL; } + +protected: + bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, + wxFloodFillStyle style = wxFLOOD_SURFACE); + bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const; + void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); + void DoCrossHair(wxCoord x, wxCoord y) ; + void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc); + void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea); + void DoDrawPoint(wxCoord x, wxCoord y); + void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0); + void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset = 0, wxCoord yoffset = 0, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], + wxCoord xoffset = 0, wxCoord yoffset = 0, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20); + void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); +#if wxUSE_SPLINES + void DoDrawSpline(const wxPointList *points); +#endif + bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); + void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); + void DoDrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false); + void DoDrawText(const wxString& text, wxCoord x, wxCoord y); + void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle); + void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + void DoSetDeviceClippingRegion( const wxRegion &WXUNUSED(clip)) + { + wxFAIL_MSG( "not implemented" ); + } + void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; + void DoGetSize(int* width, int* height) const; + void DoGetSizeMM(int *width, int *height) const; + + FILE* m_pstream; // PostScript output stream + unsigned char m_currentRed; + unsigned char m_currentGreen; + unsigned char m_currentBlue; + int m_pageNumber; + bool m_clipping; + double m_underlinePosition; + double m_underlineThickness; + wxPrintData m_printData; + double m_pageHeight; + +private: + DECLARE_DYNAMIC_CLASS(wxPostScriptDCImpl) +}; + +#endif + // wxUSE_POSTSCRIPT && wxUSE_PRINTING_ARCHITECTURE + +#endif + // _WX_DCPSG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dirctrlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dirctrlg.h new file mode 100644 index 0000000000..bdaa3df33b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dirctrlg.h @@ -0,0 +1,318 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/dirctrlg.h +// Purpose: wxGenericDirCtrl class +// Builds on wxDirCtrl class written by Robert Roebling for the +// wxFile application, modified by Harm van der Heijden. +// Further modified for Windows. +// Author: Robert Roebling, Harm van der Heijden, Julian Smart et al +// Modified by: +// Created: 21/3/2000 +// Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIRCTRL_H_ +#define _WX_DIRCTRL_H_ + +#if wxUSE_DIRDLG + +#include "wx/treectrl.h" +#include "wx/dialog.h" +#include "wx/dirdlg.h" +#include "wx/choice.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +class WXDLLIMPEXP_FWD_BASE wxHashTable; + +//----------------------------------------------------------------------------- +// Extra styles for wxGenericDirCtrl +//----------------------------------------------------------------------------- + +enum +{ + // Only allow directory viewing/selection, no files + wxDIRCTRL_DIR_ONLY = 0x0010, + // When setting the default path, select the first file in the directory + wxDIRCTRL_SELECT_FIRST = 0x0020, + // Show the filter list + wxDIRCTRL_SHOW_FILTERS = 0x0040, + // Use 3D borders on internal controls + wxDIRCTRL_3D_INTERNAL = 0x0080, + // Editable labels + wxDIRCTRL_EDIT_LABELS = 0x0100, + // Allow multiple selection + wxDIRCTRL_MULTIPLE = 0x0200 +}; + +//----------------------------------------------------------------------------- +// wxDirItemData +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDirItemData : public wxTreeItemData +{ +public: + wxDirItemData(const wxString& path, const wxString& name, bool isDir); + virtual ~wxDirItemData(){} + void SetNewDirName(const wxString& path); + + bool HasSubDirs() const; + bool HasFiles(const wxString& spec = wxEmptyString) const; + + wxString m_path, m_name; + bool m_isHidden; + bool m_isExpanded; + bool m_isDir; +}; + +//----------------------------------------------------------------------------- +// wxDirCtrl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxDirFilterListCtrl; + +class WXDLLIMPEXP_CORE wxGenericDirCtrl: public wxControl +{ +public: + wxGenericDirCtrl(); + wxGenericDirCtrl(wxWindow *parent, const wxWindowID id = wxID_ANY, + const wxString &dir = wxDirDialogDefaultFolderStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDIRCTRL_3D_INTERNAL, + const wxString& filter = wxEmptyString, + int defaultFilter = 0, + const wxString& name = wxTreeCtrlNameStr ) + { + Init(); + Create(parent, id, dir, pos, size, style, filter, defaultFilter, name); + } + + bool Create(wxWindow *parent, const wxWindowID id = wxID_ANY, + const wxString &dir = wxDirDialogDefaultFolderStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDIRCTRL_3D_INTERNAL, + const wxString& filter = wxEmptyString, + int defaultFilter = 0, + const wxString& name = wxTreeCtrlNameStr ); + + virtual void Init(); + + virtual ~wxGenericDirCtrl(); + + void OnExpandItem(wxTreeEvent &event ); + void OnCollapseItem(wxTreeEvent &event ); + void OnBeginEditItem(wxTreeEvent &event ); + void OnEndEditItem(wxTreeEvent &event ); + void OnTreeSelChange(wxTreeEvent &event); + void OnItemActivated(wxTreeEvent &event); + void OnSize(wxSizeEvent &event ); + + // Try to expand as much of the given path as possible. + virtual bool ExpandPath(const wxString& path); + // collapse the path + virtual bool CollapsePath(const wxString& path); + + // Accessors + + virtual inline wxString GetDefaultPath() const { return m_defaultPath; } + virtual void SetDefaultPath(const wxString& path) { m_defaultPath = path; } + + // Get dir or filename + virtual wxString GetPath() const; + virtual void GetPaths(wxArrayString& paths) const; + + // Get selected filename path only (else empty string). + // I.e. don't count a directory as a selection + virtual wxString GetFilePath() const; + virtual void GetFilePaths(wxArrayString& paths) const; + virtual void SetPath(const wxString& path); + + virtual void SelectPath(const wxString& path, bool select = true); + virtual void SelectPaths(const wxArrayString& paths); + + virtual void ShowHidden( bool show ); + virtual bool GetShowHidden() { return m_showHidden; } + + virtual wxString GetFilter() const { return m_filter; } + virtual void SetFilter(const wxString& filter); + + virtual int GetFilterIndex() const { return m_currentFilter; } + virtual void SetFilterIndex(int n); + + virtual wxTreeItemId GetRootId() { return m_rootId; } + + virtual wxTreeCtrl* GetTreeCtrl() const { return m_treeCtrl; } + virtual wxDirFilterListCtrl* GetFilterListCtrl() const { return m_filterListCtrl; } + + virtual void UnselectAll(); + + // Helper + virtual void SetupSections(); + + // Find the child that matches the first part of 'path'. + // E.g. if a child path is "/usr" and 'path' is "/usr/include" + // then the child for /usr is returned. + // If the path string has been used (we're at the leaf), done is set to true + virtual wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& done); + + wxString GetPath(wxTreeItemId itemId) const; + + // Resize the components of the control + virtual void DoResize(); + + // Collapse & expand the tree, thus re-creating it from scratch: + virtual void ReCreateTree(); + + // Collapse the entire tree + virtual void CollapseTree(); + + // overridden base class methods + virtual void SetFocus(); + +protected: + virtual void ExpandRoot(); + virtual void ExpandDir(wxTreeItemId parentId); + virtual void CollapseDir(wxTreeItemId parentId); + virtual const wxTreeItemId AddSection(const wxString& path, const wxString& name, int imageId = 0); + virtual wxTreeItemId AppendItem (const wxTreeItemId & parent, + const wxString & text, + int image = -1, int selectedImage = -1, + wxTreeItemData * data = NULL); + //void FindChildFiles(wxTreeItemId id, int dirFlags, wxArrayString& filenames); + virtual wxTreeCtrl* CreateTreeCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long treeStyle); + + // Extract description and actual filter from overall filter string + bool ExtractWildcard(const wxString& filterStr, int n, wxString& filter, wxString& description); + +private: + void PopulateNode(wxTreeItemId node); + wxDirItemData* GetItemData(wxTreeItemId itemId); + + bool m_showHidden; + wxTreeItemId m_rootId; + wxString m_defaultPath; // Starting path + long m_styleEx; // Extended style + wxString m_filter; // Wildcards in same format as per wxFileDialog + int m_currentFilter; // The current filter index + wxString m_currentFilterStr; // Current filter string + wxTreeCtrl* m_treeCtrl; + wxDirFilterListCtrl* m_filterListCtrl; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGenericDirCtrl) + wxDECLARE_NO_COPY_CLASS(wxGenericDirCtrl); +}; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRCTRL_SELECTIONCHANGED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRCTRL_FILEACTIVATED, wxTreeEvent ); + +#define wx__DECLARE_DIRCTRL_EVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_DIRCTRL_ ## evt, id, wxTreeEventHandler(fn)) + +#define EVT_DIRCTRL_SELECTIONCHANGED(id, fn) wx__DECLARE_DIRCTRL_EVT(SELECTIONCHANGED, id, fn) +#define EVT_DIRCTRL_FILEACTIVATED(id, fn) wx__DECLARE_DIRCTRL_EVT(FILEACTIVATED, id, fn) + +//----------------------------------------------------------------------------- +// wxDirFilterListCtrl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDirFilterListCtrl: public wxChoice +{ +public: + wxDirFilterListCtrl() { Init(); } + wxDirFilterListCtrl(wxGenericDirCtrl* parent, const wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0) + { + Init(); + Create(parent, id, pos, size, style); + } + + bool Create(wxGenericDirCtrl* parent, const wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + + void Init(); + + virtual ~wxDirFilterListCtrl() {} + + //// Operations + void FillFilterList(const wxString& filter, int defaultFilter); + + //// Events + void OnSelFilter(wxCommandEvent& event); + +protected: + wxGenericDirCtrl* m_dirCtrl; + + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxDirFilterListCtrl) + wxDECLARE_NO_COPY_CLASS(wxDirFilterListCtrl); +}; + +#if !defined(__WXMSW__) && !defined(__WXMAC__) && !defined(__WXPM__) + #define wxDirCtrl wxGenericDirCtrl +#endif + +// Symbols for accessing individual controls +#define wxID_TREECTRL 7000 +#define wxID_FILTERLISTCTRL 7001 + +#endif // wxUSE_DIRDLG + +//------------------------------------------------------------------------- +// wxFileIconsTable - use wxTheFileIconsTable which is created as necessary +//------------------------------------------------------------------------- + +#if wxUSE_DIRDLG || wxUSE_FILEDLG || wxUSE_FILECTRL + +class WXDLLIMPEXP_FWD_CORE wxImageList; + +class WXDLLIMPEXP_CORE wxFileIconsTable +{ +public: + wxFileIconsTable(); + ~wxFileIconsTable(); + + enum iconId_Type + { + folder, + folder_open, + computer, + drive, + cdrom, + floppy, + removeable, + file, + executable + }; + + int GetIconID(const wxString& extension, const wxString& mime = wxEmptyString); + wxImageList *GetSmallImageList(); + +protected: + void Create(); // create on first use + + wxImageList *m_smallImageList; + wxHashTable *m_HashTable; +}; + +// The global fileicons table +extern WXDLLIMPEXP_DATA_CORE(wxFileIconsTable *) wxTheFileIconsTable; + +#endif // wxUSE_DIRDLG || wxUSE_FILEDLG || wxUSE_FILECTRL + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_DIRCTRL_SELECTIONCHANGED wxEVT_DIRCTRL_SELECTIONCHANGED +#define wxEVT_COMMAND_DIRCTRL_FILEACTIVATED wxEVT_DIRCTRL_FILEACTIVATED + +#endif + // _WX_DIRCTRLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dirdlgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dirdlgg.h new file mode 100644 index 0000000000..cc8b5a874b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dirdlgg.h @@ -0,0 +1,88 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/dirdlgg.h +// Purpose: wxGenericDirCtrl class +// Builds on wxDirCtrl class written by Robert Roebling for the +// wxFile application, modified by Harm van der Heijden. +// Further modified for Windows. +// Author: Robert Roebling, Harm van der Heijden, Julian Smart et al +// Modified by: +// Created: 21/3/2000 +// Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIRDLGG_H_ +#define _WX_DIRDLGG_H_ + +class WXDLLIMPEXP_FWD_CORE wxGenericDirCtrl; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxTreeEvent; + +// we may be included directly as well as from wx/dirdlg.h (FIXME) +extern WXDLLIMPEXP_DATA_CORE(const char) wxDirDialogNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxDirSelectorPromptStr[]; + +#ifndef wxDD_DEFAULT_STYLE +#ifdef __WXWINCE__ + #define wxDD_DEFAULT_STYLE wxDEFAULT_DIALOG_STYLE +#else + #define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) +#endif +#endif + +#include "wx/dialog.h" + +//----------------------------------------------------------------------------- +// wxGenericDirDialog +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericDirDialog : public wxDirDialogBase +{ +public: + wxGenericDirDialog() : wxDirDialogBase() { } + + wxGenericDirDialog(wxWindow* parent, + const wxString& title = wxDirSelectorPromptStr, + const wxString& defaultPath = wxEmptyString, + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize,//Size(450, 550), + const wxString& name = wxDirDialogNameStr); + + bool Create(wxWindow* parent, + const wxString& title = wxDirSelectorPromptStr, + const wxString& defaultPath = wxEmptyString, + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize,//Size(450, 550), + const wxString& name = wxDirDialogNameStr); + + //// Accessors + void SetPath(const wxString& path); + wxString GetPath() const; + + //// Overrides + virtual int ShowModal(); + virtual void EndModal(int retCode); + + // this one is specific to wxGenericDirDialog + wxTextCtrl* GetInputCtrl() const { return m_input; } + +protected: + //// Event handlers + void OnCloseWindow(wxCloseEvent& event); + void OnOK(wxCommandEvent& event); + void OnTreeSelected(wxTreeEvent &event); + void OnTreeKeyDown(wxTreeEvent &event); + void OnNew(wxCommandEvent& event); + void OnGoHome(wxCommandEvent& event); + void OnShowHidden(wxCommandEvent& event); + + wxGenericDirCtrl* m_dirCtrl; + wxTextCtrl* m_input; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGenericDirDialog) +}; + +#endif // _WX_DIRDLGG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dragimgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dragimgg.h new file mode 100644 index 0000000000..9c90e163f2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dragimgg.h @@ -0,0 +1,271 @@ +////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/dragimgg.h +// Purpose: wxDragImage class: a kind of a cursor, that can cope +// with more sophisticated images +// Author: Julian Smart +// Modified by: +// Created: 29/2/2000 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DRAGIMGG_H_ +#define _WX_DRAGIMGG_H_ + +#include "wx/bitmap.h" +#include "wx/icon.h" +#include "wx/cursor.h" +#include "wx/treectrl.h" +#include "wx/listctrl.h" +#include "wx/log.h" +#include "wx/overlay.h" + +/* + To use this class, create a wxDragImage when you start dragging, for example: + + void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event) + { +#ifdef __WXMSW__ + ::UpdateWindow((HWND) GetHWND()); // We need to implement this in wxWidgets +#endif + + CaptureMouse(); + + m_dragImage = new wxDragImage(* this, itemId); + m_dragImage->BeginDrag(wxPoint(0, 0), this); + m_dragImage->Move(pt, this); + m_dragImage->Show(this); + ... + } + + In your OnMouseMove function, hide the image, do any display updating required, + then move and show the image again: + + void MyTreeCtrl::OnMouseMove(wxMouseEvent& event) + { + if (m_dragMode == MY_TREE_DRAG_NONE) + { + event.Skip(); + return; + } + + // Prevent screen corruption by hiding the image + if (m_dragImage) + m_dragImage->Hide(this); + + // Do some updating of the window, such as highlighting the drop target + ... + +#ifdef __WXMSW__ + if (updateWindow) + ::UpdateWindow((HWND) GetHWND()); +#endif + + // Move and show the image again + m_dragImage->Move(event.GetPosition(), this); + m_dragImage->Show(this); + } + + Eventually we end the drag and delete the drag image. + + void MyTreeCtrl::OnLeftUp(wxMouseEvent& event) + { + ... + + // End the drag and delete the drag image + if (m_dragImage) + { + m_dragImage->EndDrag(this); + delete m_dragImage; + m_dragImage = NULL; + } + ReleaseMouse(); + } +*/ + +/* + * wxGenericDragImage + */ + +class WXDLLIMPEXP_CORE wxGenericDragImage: public wxObject +{ +public: + + // Ctors & dtor + //////////////////////////////////////////////////////////////////////////// + + wxGenericDragImage(const wxCursor& cursor = wxNullCursor) + { + Init(); + Create(cursor); + } + + wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor = wxNullCursor) + { + Init(); + + Create(image, cursor); + } + + wxGenericDragImage(const wxIcon& image, const wxCursor& cursor = wxNullCursor) + { + Init(); + + Create(image, cursor); + } + + wxGenericDragImage(const wxString& str, const wxCursor& cursor = wxNullCursor) + { + Init(); + + Create(str, cursor); + } + +#if WXWIN_COMPATIBILITY_2_6 + // don't use in new code, use versions without hot spot parameter + wxDEPRECATED( wxGenericDragImage(const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( wxGenericDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( wxGenericDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( bool Create(const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) ); +#endif // WXWIN_COMPATIBILITY_2_6 + +#if wxUSE_TREECTRL + wxGenericDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id) + { + Init(); + + Create(treeCtrl, id); + } +#endif + +#if wxUSE_LISTCTRL + wxGenericDragImage(const wxListCtrl& listCtrl, long id) + { + Init(); + + Create(listCtrl, id); + } +#endif + + virtual ~wxGenericDragImage(); + + // Attributes + //////////////////////////////////////////////////////////////////////////// + +#ifdef wxHAS_NATIVE_OVERLAY + // backing store is not used when native overlays are + void SetBackingBitmap(wxBitmap* WXUNUSED(bitmap)) { } +#else + // For efficiency, tell wxGenericDragImage to use a bitmap that's already + // created (e.g. from last drag) + void SetBackingBitmap(wxBitmap* bitmap) { m_pBackingBitmap = bitmap; } +#endif // wxHAS_NATIVE_OVERLAY/!wxHAS_NATIVE_OVERLAY + + // Operations + //////////////////////////////////////////////////////////////////////////// + + // Create a drag image with a virtual image (need to override DoDrawImage, GetImageRect) + bool Create(const wxCursor& cursor = wxNullCursor); + + // Create a drag image from a bitmap and optional cursor + bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor); + + // Create a drag image from an icon and optional cursor + bool Create(const wxIcon& image, const wxCursor& cursor = wxNullCursor); + + // Create a drag image from a string and optional cursor + bool Create(const wxString& str, const wxCursor& cursor = wxNullCursor); + +#if wxUSE_TREECTRL + // Create a drag image for the given tree control item + bool Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id); +#endif + +#if wxUSE_LISTCTRL + // Create a drag image for the given list control item + bool Create(const wxListCtrl& listCtrl, long id); +#endif + + // Begin drag. hotspot is the location of the drag position relative to the upper-left + // corner of the image. + bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = NULL); + + // Begin drag. hotspot is the location of the drag position relative to the upper-left + // corner of the image. This is full screen only. fullScreenRect gives the + // position of the window on the screen, to restrict the drag to. + bool BeginDrag(const wxPoint& hotspot, wxWindow* window, wxWindow* fullScreenRect); + + // End drag + bool EndDrag(); + + // Move the image: call from OnMouseMove. Pt is in window client coordinates if window + // is non-NULL, or in screen coordinates if NULL. + bool Move(const wxPoint& pt); + + // Show the image + bool Show(); + + // Hide the image + bool Hide(); + + // Implementation + //////////////////////////////////////////////////////////////////////////// + + void Init(); + + // Override this if you are using a virtual image (drawing your own image) + virtual wxRect GetImageRect(const wxPoint& pos) const; + + // Override this if you are using a virtual image (drawing your own image) + virtual bool DoDrawImage(wxDC& dc, const wxPoint& pos) const; + + // Override this if you wish to draw the window contents to the backing bitmap + // yourself. This can be desirable if you wish to avoid flicker by not having to + // redraw the window itself before dragging in order to be graphic-minus-dragged-objects. + // Instead, paint the drag image's backing bitmap to be correct, and leave the window + // to be updated only when dragging the objects away (thus giving a smoother appearance). + virtual bool UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC, + const wxRect& sourceRect, const wxRect& destRect) const; + + // Erase and redraw simultaneously if possible + virtual bool RedrawImage(const wxPoint& oldPos, const wxPoint& newPos, bool eraseOld, bool drawNew); + +protected: + wxBitmap m_bitmap; + wxIcon m_icon; + wxCursor m_cursor; + wxCursor m_oldCursor; +// wxPoint m_hotspot; + wxPoint m_offset; // The hostpot value passed to BeginDrag + wxPoint m_position; + bool m_isDirty; + bool m_isShown; + wxWindow* m_window; + wxDC* m_windowDC; + +#ifdef wxHAS_NATIVE_OVERLAY + wxOverlay m_overlay; + wxDCOverlay* m_dcOverlay; +#else + // Stores the window contents while we're dragging the image around + wxBitmap m_backingBitmap; + wxBitmap* m_pBackingBitmap; // Pointer to existing backing bitmap + // (pass to wxGenericDragImage as an efficiency measure) + // A temporary bitmap for repairing/redrawing + wxBitmap m_repairBitmap; +#endif // !wxHAS_NATIVE_OVERLAY + + wxRect m_boundingRect; + bool m_fullScreen; + +private: + DECLARE_DYNAMIC_CLASS(wxGenericDragImage) + wxDECLARE_NO_COPY_CLASS(wxGenericDragImage); +}; + +#endif + // _WX_DRAGIMGG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dvrenderer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dvrenderer.h new file mode 100644 index 0000000000..75889a8108 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dvrenderer.h @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/dvrenderer.h +// Purpose: wxDataViewRenderer for generic wxDataViewCtrl implementation +// Author: Robert Roebling, Vadim Zeitlin +// Created: 2009-11-07 (extracted from wx/generic/dataview.h) +// Copyright: (c) 2006 Robert Roebling +// (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_DVRENDERER_H_ +#define _WX_GENERIC_DVRENDERER_H_ + +// ---------------------------------------------------------------------------- +// wxDataViewRenderer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewRenderer: public wxDataViewCustomRendererBase +{ +public: + wxDataViewRenderer( const wxString &varianttype, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + virtual ~wxDataViewRenderer(); + + virtual wxDC *GetDC(); + + virtual void SetAlignment( int align ); + virtual int GetAlignment() const; + + virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE) + { m_ellipsizeMode = mode; } + virtual wxEllipsizeMode GetEllipsizeMode() const + { return m_ellipsizeMode; } + + virtual void SetMode( wxDataViewCellMode mode ) + { m_mode = mode; } + virtual wxDataViewCellMode GetMode() const + { return m_mode; } + + // implementation + + // This callback is used by generic implementation of wxDVC itself. It's + // different from the corresponding ActivateCell() method which should only + // be overridable for the custom renderers while the generic implementation + // uses this one for all of them, including the standard ones. + + virtual bool WXActivateCell(const wxRect& WXUNUSED(cell), + wxDataViewModel *WXUNUSED(model), + const wxDataViewItem & WXUNUSED(item), + unsigned int WXUNUSED(col), + const wxMouseEvent* WXUNUSED(mouseEvent)) + { return false; } + +private: + int m_align; + wxDataViewCellMode m_mode; + + wxEllipsizeMode m_ellipsizeMode; + + wxDC *m_dc; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer) +}; + +#endif // _WX_GENERIC_DVRENDERER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dvrenderers.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dvrenderers.h new file mode 100644 index 0000000000..6f80c773a5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/dvrenderers.h @@ -0,0 +1,183 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/dvrenderers.h +// Purpose: All generic wxDataViewCtrl renderer classes +// Author: Robert Roebling, Vadim Zeitlin +// Created: 2009-11-07 (extracted from wx/generic/dataview.h) +// Copyright: (c) 2006 Robert Roebling +// (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_DVRENDERERS_H_ +#define _WX_GENERIC_DVRENDERERS_H_ + +// --------------------------------------------------------- +// wxDataViewCustomRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewCustomRenderer: public wxDataViewRenderer +{ +public: + wxDataViewCustomRenderer( const wxString &varianttype = wxT("string"), + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + + + // see the explanation of the following WXOnXXX() methods in wx/generic/dvrenderer.h + + virtual bool WXActivateCell(const wxRect& cell, + wxDataViewModel *model, + const wxDataViewItem& item, + unsigned int col, + const wxMouseEvent *mouseEvent) + { + return ActivateCell(cell, model, item, col, mouseEvent); + } + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomRenderer) +}; + + +// --------------------------------------------------------- +// wxDataViewTextRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewTextRenderer: public wxDataViewRenderer +{ +public: + wxDataViewTextRenderer( const wxString &varianttype = wxT("string"), + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + + bool SetValue( const wxVariant &value ); + bool GetValue( wxVariant &value ) const; + + virtual bool Render(wxRect cell, wxDC *dc, int state); + virtual wxSize GetSize() const; + + // in-place editing + virtual bool HasEditorCtrl() const; + virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, + const wxVariant &value ); + virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ); + +protected: + wxString m_text; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewBitmapRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewBitmapRenderer: public wxDataViewRenderer +{ +public: + wxDataViewBitmapRenderer( const wxString &varianttype = wxT("wxBitmap"), + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + + bool SetValue( const wxVariant &value ); + bool GetValue( wxVariant &value ) const; + + bool Render( wxRect cell, wxDC *dc, int state ); + wxSize GetSize() const; + +private: + wxIcon m_icon; + wxBitmap m_bitmap; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewBitmapRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewToggleRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewToggleRenderer: public wxDataViewRenderer +{ +public: + wxDataViewToggleRenderer( const wxString &varianttype = wxT("bool"), + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + + bool SetValue( const wxVariant &value ); + bool GetValue( wxVariant &value ) const; + + bool Render( wxRect cell, wxDC *dc, int state ); + wxSize GetSize() const; + + // Implementation only, don't use nor override + virtual bool WXActivateCell(const wxRect& cell, + wxDataViewModel *model, + const wxDataViewItem& item, + unsigned int col, + const wxMouseEvent *mouseEvent); +private: + bool m_toggle; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewProgressRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewProgressRenderer: public wxDataViewRenderer +{ +public: + wxDataViewProgressRenderer( const wxString &label = wxEmptyString, + const wxString &varianttype = wxT("long"), + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + + bool SetValue( const wxVariant &value ); + bool GetValue( wxVariant& value ) const; + + virtual bool Render(wxRect cell, wxDC *dc, int state); + virtual wxSize GetSize() const; + +private: + wxString m_label; + int m_value; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewIconTextRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewIconTextRenderer: public wxDataViewRenderer +{ +public: + wxDataViewIconTextRenderer( const wxString &varianttype = wxT("wxDataViewIconText"), + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + + bool SetValue( const wxVariant &value ); + bool GetValue( wxVariant &value ) const; + + virtual bool Render(wxRect cell, wxDC *dc, int state); + virtual wxSize GetSize() const; + + virtual bool HasEditorCtrl() const { return true; } + virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, + const wxVariant &value ); + virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ); + +private: + wxDataViewIconText m_value; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer) +}; + +#endif // _WX_GENERIC_DVRENDERERS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fdrepdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fdrepdlg.h new file mode 100644 index 0000000000..d1ad8d1b88 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fdrepdlg.h @@ -0,0 +1,70 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/fdrepdlg.h +// Purpose: wxGenericFindReplaceDialog class +// Author: Markus Greither +// Modified by: +// Created: 25/05/2001 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_FDREPDLG_H_ +#define _WX_GENERIC_FDREPDLG_H_ + +class WXDLLIMPEXP_FWD_CORE wxCheckBox; +class WXDLLIMPEXP_FWD_CORE wxRadioBox; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; + +// ---------------------------------------------------------------------------- +// wxGenericFindReplaceDialog: dialog for searching / replacing text +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericFindReplaceDialog : public wxFindReplaceDialogBase +{ +public: + wxGenericFindReplaceDialog() { Init(); } + + wxGenericFindReplaceDialog(wxWindow *parent, + wxFindReplaceData *data, + const wxString& title, + int style = 0) + { + Init(); + + (void)Create(parent, data, title, style); + } + + bool Create(wxWindow *parent, + wxFindReplaceData *data, + const wxString& title, + int style = 0); + +protected: + void Init(); + + void SendEvent(const wxEventType& evtType); + + void OnFind(wxCommandEvent& event); + void OnReplace(wxCommandEvent& event); + void OnReplaceAll(wxCommandEvent& event); + void OnCancel(wxCommandEvent& event); + + void OnUpdateFindUI(wxUpdateUIEvent& event); + + void OnCloseWindow(wxCloseEvent& event); + + wxCheckBox *m_chkCase, + *m_chkWord; + + wxRadioBox *m_radioDir; + + wxTextCtrl *m_textFind, + *m_textRepl; + +private: + DECLARE_DYNAMIC_CLASS(wxGenericFindReplaceDialog) + + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_GENERIC_FDREPDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/filectrlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/filectrlg.h new file mode 100644 index 0000000000..ba26118d7f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/filectrlg.h @@ -0,0 +1,303 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/filectrlg.h +// Purpose: wxGenericFileCtrl Header +// Author: Diaa M. Sami +// Modified by: +// Created: Jul-07-2007 +// Copyright: (c) Diaa M. Sami +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_FILECTRL_H_ +#define _WX_GENERIC_FILECTRL_H_ + +#if wxUSE_FILECTRL + +#include "wx/containr.h" +#include "wx/listctrl.h" +#include "wx/filectrl.h" +#include "wx/filename.h" + +class WXDLLIMPEXP_FWD_CORE wxCheckBox; +class WXDLLIMPEXP_FWD_CORE wxChoice; +class WXDLLIMPEXP_FWD_CORE wxStaticText; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; + +extern WXDLLIMPEXP_DATA_CORE(const char) wxFileSelectorDefaultWildcardStr[]; + +//----------------------------------------------------------------------------- +// wxFileData - a class to hold the file info for the wxFileListCtrl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileData +{ +public: + enum fileType + { + is_file = 0x0000, + is_dir = 0x0001, + is_link = 0x0002, + is_exe = 0x0004, + is_drive = 0x0008 + }; + + wxFileData() { Init(); } + // Full copy constructor + wxFileData( const wxFileData& fileData ) { Copy(fileData); } + // Create a filedata from this information + wxFileData( const wxString &filePath, const wxString &fileName, + fileType type, int image_id ); + + // make a full copy of the other wxFileData + void Copy( const wxFileData &other ); + + // (re)read the extra data about the file from the system + void ReadData(); + + // get the name of the file, dir, drive + wxString GetFileName() const { return m_fileName; } + // get the full path + name of the file, dir, path + wxString GetFilePath() const { return m_filePath; } + // Set the path + name and name of the item + void SetNewName( const wxString &filePath, const wxString &fileName ); + + // Get the size of the file in bytes + wxFileOffset GetSize() const { return m_size; } + // Get the type of file, either file extension or , , + wxString GetFileType() const; + // get the last modification time + wxDateTime GetDateTime() const { return m_dateTime; } + // Get the time as a formatted string + wxString GetModificationTime() const; + // in UNIX get rwx for file, in MSW get attributes ARHS + wxString GetPermissions() const { return m_permissions; } + // Get the id of the image used in a wxImageList + int GetImageId() const { return m_image; } + + bool IsFile() const { return !IsDir() && !IsLink() && !IsDrive(); } + bool IsDir() const { return (m_type & is_dir ) != 0; } + bool IsLink() const { return (m_type & is_link ) != 0; } + bool IsExe() const { return (m_type & is_exe ) != 0; } + bool IsDrive() const { return (m_type & is_drive) != 0; } + + // Get/Set the type of file, file/dir/drive/link + int GetType() const { return m_type; } + + // the wxFileListCtrl fields in report view + enum fileListFieldType + { + FileList_Name, + FileList_Size, + FileList_Type, + FileList_Time, +#if defined(__UNIX__) || defined(__WIN32__) + FileList_Perm, +#endif // defined(__UNIX__) || defined(__WIN32__) + FileList_Max + }; + + // Get the entry for report view of wxFileListCtrl + wxString GetEntry( fileListFieldType num ) const; + + // Get a string representation of the file info + wxString GetHint() const; + // initialize a wxListItem attributes + void MakeItem( wxListItem &item ); + + // operators + wxFileData& operator = (const wxFileData& fd) { Copy(fd); return *this; } + +protected: + wxString m_fileName; + wxString m_filePath; + wxFileOffset m_size; + wxDateTime m_dateTime; + wxString m_permissions; + int m_type; + int m_image; + +private: + void Init(); +}; + +//----------------------------------------------------------------------------- +// wxFileListCtrl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileListCtrl : public wxListCtrl +{ +public: + wxFileListCtrl(); + wxFileListCtrl( wxWindow *win, + wxWindowID id, + const wxString &wild, + bool showHidden, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLC_LIST, + const wxValidator &validator = wxDefaultValidator, + const wxString &name = wxT("filelist") ); + virtual ~wxFileListCtrl(); + + virtual void ChangeToListMode(); + virtual void ChangeToReportMode(); + virtual void ChangeToSmallIconMode(); + virtual void ShowHidden( bool show = true ); + bool GetShowHidden() const { return m_showHidden; } + + virtual long Add( wxFileData *fd, wxListItem &item ); + virtual void UpdateItem(const wxListItem &item); + virtual void UpdateFiles(); + virtual void MakeDir(); + virtual void GoToParentDir(); + virtual void GoToHomeDir(); + virtual void GoToDir( const wxString &dir ); + virtual void SetWild( const wxString &wild ); + wxString GetWild() const { return m_wild; } + wxString GetDir() const { return m_dirName; } + + void OnListDeleteItem( wxListEvent &event ); + void OnListDeleteAllItems( wxListEvent &event ); + void OnListEndLabelEdit( wxListEvent &event ); + void OnListColClick( wxListEvent &event ); + + virtual void SortItems(wxFileData::fileListFieldType field, bool forward); + bool GetSortDirection() const { return m_sort_forward; } + wxFileData::fileListFieldType GetSortField() const { return m_sort_field; } + +protected: + void FreeItemData(wxListItem& item); + void FreeAllItemsData(); + + wxString m_dirName; + bool m_showHidden; + wxString m_wild; + + bool m_sort_forward; + wxFileData::fileListFieldType m_sort_field; + +private: + DECLARE_DYNAMIC_CLASS(wxFileListCtrl) + DECLARE_EVENT_TABLE() +}; + +class WXDLLIMPEXP_CORE wxGenericFileCtrl : public wxNavigationEnabled, + public wxFileCtrlBase +{ +public: + wxGenericFileCtrl() + { + m_ignoreChanges = false; + } + + wxGenericFileCtrl ( wxWindow *parent, + wxWindowID id, + const wxString& defaultDirectory = wxEmptyString, + const wxString& defaultFilename = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFC_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& name = wxFileCtrlNameStr ) + { + m_ignoreChanges = false; + Create(parent, id, defaultDirectory, defaultFilename, wildCard, + style, pos, size, name ); + } + + virtual ~wxGenericFileCtrl() {} + + bool Create( wxWindow *parent, + wxWindowID id, + const wxString& defaultDirectory = wxEmptyString, + const wxString& defaultFileName = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFC_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& name = wxFileCtrlNameStr ); + + virtual void SetWildcard( const wxString& wildCard ); + virtual void SetFilterIndex( int filterindex ); + virtual bool SetDirectory( const wxString& dir ); + + // Selects a certain file. + // In case the filename specified isn't found/couldn't be shown with + // currently selected filter, false is returned and nothing happens + virtual bool SetFilename( const wxString& name ); + + // Changes to a certain directory and selects a certain file. + // In case the filename specified isn't found/couldn't be shown with + // currently selected filter, false is returned and if directory exists + // it's chdir'ed to + virtual bool SetPath( const wxString& path ); + + virtual wxString GetFilename() const; + virtual wxString GetDirectory() const; + virtual wxString GetWildcard() const { return this->m_wildCard; } + virtual wxString GetPath() const; + virtual void GetPaths( wxArrayString& paths ) const; + virtual void GetFilenames( wxArrayString& files ) const; + virtual int GetFilterIndex() const { return m_filterIndex; } + + virtual bool HasMultipleFileSelection() const + { return HasFlag(wxFC_MULTIPLE); } + virtual void ShowHidden(bool show) { m_list->ShowHidden( show ); } + + void GoToParentDir(); + void GoToHomeDir(); + + // get the directory currently shown in the control: this can be different + // from GetDirectory() if the user entered a full path (with a path other + // than the one currently shown in the control) in the text control + // manually + wxString GetShownDirectory() const { return m_list->GetDir(); } + + wxFileListCtrl *GetFileList() { return m_list; } + + void ChangeToReportMode() { m_list->ChangeToReportMode(); } + void ChangeToListMode() { m_list->ChangeToListMode(); } + + +private: + void OnChoiceFilter( wxCommandEvent &event ); + void OnCheck( wxCommandEvent &event ); + void OnActivated( wxListEvent &event ); + void OnTextEnter( wxCommandEvent &WXUNUSED( event ) ); + void OnTextChange( wxCommandEvent &WXUNUSED( event ) ); + void OnSelected( wxListEvent &event ); + void HandleAction( const wxString &fn ); + + void DoSetFilterIndex( int filterindex ); + void UpdateControls(); + + // the first of these methods can only be used for the controls with single + // selection (i.e. without wxFC_MULTIPLE style), the second one in any case + wxFileName DoGetFileName() const; + void DoGetFilenames( wxArrayString& filenames, bool fullPath ) const; + + int m_style; + + wxString m_filterExtension; + wxChoice *m_choice; + wxTextCtrl *m_text; + wxFileListCtrl *m_list; + wxCheckBox *m_check; + wxStaticText *m_static; + + wxString m_dir; + wxString m_fileName; + wxString m_wildCard; // wild card in one string as we got it + + int m_filterIndex; + bool m_inSelected; + bool m_ignoreChanges; + bool m_noSelChgEvent; // suppress selection changed events. + + DECLARE_DYNAMIC_CLASS( wxGenericFileCtrl ) + DECLARE_EVENT_TABLE() +}; + +#endif // wxUSE_FILECTRL + +#endif // _WX_GENERIC_FILECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/filedlgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/filedlgg.h new file mode 100644 index 0000000000..7d14e523fb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/filedlgg.h @@ -0,0 +1,160 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/filedlgg.h +// Purpose: wxGenericFileDialog +// Author: Robert Roebling +// Modified by: +// Created: 8/17/99 +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILEDLGG_H_ +#define _WX_FILEDLGG_H_ + +#include "wx/listctrl.h" +#include "wx/datetime.h" +#include "wx/filefn.h" +#include "wx/artprov.h" +#include "wx/filedlg.h" +#include "wx/generic/filectrlg.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxBitmapButton; +class WXDLLIMPEXP_FWD_CORE wxGenericFileCtrl; +class WXDLLIMPEXP_FWD_CORE wxGenericFileDialog; +class WXDLLIMPEXP_FWD_CORE wxFileCtrlEvent; + +//------------------------------------------------------------------------- +// wxGenericFileDialog +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericFileDialog: public wxFileDialogBase +{ +public: + wxGenericFileDialog() : wxFileDialogBase() { Init(); } + + wxGenericFileDialog(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr, + bool bypassGenericImpl = false ); + + bool Create( wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr, + bool bypassGenericImpl = false ); + + virtual ~wxGenericFileDialog(); + + virtual void SetDirectory(const wxString& dir) + { m_filectrl->SetDirectory(dir); } + virtual void SetFilename(const wxString& name) + { m_filectrl->SetFilename(name); } + virtual void SetMessage(const wxString& message) { SetTitle(message); } + virtual void SetPath(const wxString& path) + { m_filectrl->SetPath(path); } + virtual void SetFilterIndex(int filterIndex) + { m_filectrl->SetFilterIndex(filterIndex); } + virtual void SetWildcard(const wxString& wildCard) + { m_filectrl->SetWildcard(wildCard); } + + virtual wxString GetPath() const + { return m_filectrl->GetPath(); } + virtual void GetPaths(wxArrayString& paths) const + { m_filectrl->GetPaths(paths); } + virtual wxString GetDirectory() const + { return m_filectrl->GetDirectory(); } + virtual wxString GetFilename() const + { return m_filectrl->GetFilename(); } + virtual void GetFilenames(wxArrayString& files) const + { m_filectrl->GetFilenames(files); } + virtual wxString GetWildcard() const + { return m_filectrl->GetWildcard(); } + virtual int GetFilterIndex() const + { return m_filectrl->GetFilterIndex(); } + virtual bool SupportsExtraControl() const { return true; } + + // implementation only from now on + // ------------------------------- + + virtual int ShowModal(); + virtual bool Show( bool show = true ); + + void OnList( wxCommandEvent &event ); + void OnReport( wxCommandEvent &event ); + void OnUp( wxCommandEvent &event ); + void OnHome( wxCommandEvent &event ); + void OnOk( wxCommandEvent &event ); + void OnNew( wxCommandEvent &event ); + void OnFileActivated( wxFileCtrlEvent &event); + +private: + // if true, don't use this implementation at all + bool m_bypassGenericImpl; + +protected: + // update the state of m_upDirButton and m_newDirButton depending on the + // currently selected directory + void OnUpdateButtonsUI(wxUpdateUIEvent& event); + + wxString m_filterExtension; + wxGenericFileCtrl *m_filectrl; + wxBitmapButton *m_upDirButton; + wxBitmapButton *m_newDirButton; + +private: + void Init(); + wxBitmapButton* AddBitmapButton( wxWindowID winId, const wxArtID& artId, + const wxString& tip, wxSizer *sizer ); + + DECLARE_DYNAMIC_CLASS(wxGenericFileDialog) + DECLARE_EVENT_TABLE() + + // these variables are preserved between wxGenericFileDialog calls + static long ms_lastViewStyle; // list or report? + static bool ms_lastShowHidden; // did we show hidden files? +}; + +#ifdef wxHAS_GENERIC_FILEDIALOG + +class WXDLLIMPEXP_CORE wxFileDialog: public wxGenericFileDialog +{ +public: + wxFileDialog() {} + + wxFileDialog(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = 0, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize) + :wxGenericFileDialog(parent, message, + defaultDir, defaultFile, wildCard, + style, + pos, size) + { + } + +private: + DECLARE_DYNAMIC_CLASS(wxFileDialog) +}; + +#endif // wxHAS_GENERIC_FILEDIALOG + +#endif // _WX_FILEDLGG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/filepickerg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/filepickerg.h new file mode 100644 index 0000000000..d88daa556a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/filepickerg.h @@ -0,0 +1,221 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/filepickerg.h +// Purpose: wxGenericFileDirButton, wxGenericFileButton, wxGenericDirButton +// Author: Francesco Montorsi +// Modified by: +// Created: 14/4/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILEDIRPICKER_H_ +#define _WX_FILEDIRPICKER_H_ + +#include "wx/button.h" +#include "wx/filedlg.h" +#include "wx/dirdlg.h" + + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRPICKER_CHANGED, wxFileDirPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEvent ); + + +//----------------------------------------------------------------------------- +// wxGenericFileDirButton: a button which brings up a wx{File|Dir}Dialog +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericFileDirButton : public wxButton, + public wxFileDirPickerWidgetBase +{ +public: + wxGenericFileDirButton() { Init(); } + wxGenericFileDirButton(wxWindow *parent, + wxWindowID id, + const wxString& label = wxFilePickerWidgetLabel, + const wxString& path = wxEmptyString, + const wxString &message = wxFileSelectorPromptStr, + const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFilePickerWidgetNameStr) + { + Init(); + Create(parent, id, label, path, message, wildcard, + pos, size, style, validator, name); + } + + virtual wxControl *AsControl() { return this; } + +public: // overridable + + virtual wxDialog *CreateDialog() = 0; + + virtual wxWindow *GetDialogParent() + { return GetParent(); } + + virtual wxEventType GetEventType() const = 0; + + virtual void SetInitialDirectory(const wxString& dir); + +public: + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label = wxFilePickerWidgetLabel, + const wxString& path = wxEmptyString, + const wxString &message = wxFileSelectorPromptStr, + const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFilePickerWidgetNameStr); + + // event handler for the click + void OnButtonClick(wxCommandEvent &); + +protected: + wxString m_message, m_wildcard; + + // we just store the style passed to the ctor here instead of passing it to + // wxButton as some of our bits can conflict with wxButton styles and it + // just doesn't make sense to use picker styles for wxButton anyhow + long m_pickerStyle; + + // Initial directory set by SetInitialDirectory() call or empty. + wxString m_initialDir; + +private: + // common part of all ctors + void Init() { m_pickerStyle = -1; } +}; + + +//----------------------------------------------------------------------------- +// wxGenericFileButton: a button which brings up a wxFileDialog +//----------------------------------------------------------------------------- + +#define wxFILEBTN_DEFAULT_STYLE (wxFLP_OPEN) + +class WXDLLIMPEXP_CORE wxGenericFileButton : public wxGenericFileDirButton +{ +public: + wxGenericFileButton() {} + wxGenericFileButton(wxWindow *parent, + wxWindowID id, + const wxString& label = wxFilePickerWidgetLabel, + const wxString& path = wxEmptyString, + const wxString &message = wxFileSelectorPromptStr, + const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxFILEBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFilePickerWidgetNameStr) + { + Create(parent, id, label, path, message, wildcard, + pos, size, style, validator, name); + } + +public: // overridable + + virtual long GetDialogStyle() const + { + // the derived class must initialize it if it doesn't use the + // non-default wxGenericFileDirButton ctor + wxASSERT_MSG( m_pickerStyle != -1, + "forgot to initialize m_pickerStyle?" ); + + + long filedlgstyle = 0; + + if ( m_pickerStyle & wxFLP_OPEN ) + filedlgstyle |= wxFD_OPEN; + if ( m_pickerStyle & wxFLP_SAVE ) + filedlgstyle |= wxFD_SAVE; + if ( m_pickerStyle & wxFLP_OVERWRITE_PROMPT ) + filedlgstyle |= wxFD_OVERWRITE_PROMPT; + if ( m_pickerStyle & wxFLP_FILE_MUST_EXIST ) + filedlgstyle |= wxFD_FILE_MUST_EXIST; + if ( m_pickerStyle & wxFLP_CHANGE_DIR ) + filedlgstyle |= wxFD_CHANGE_DIR; + + return filedlgstyle; + } + + virtual wxDialog *CreateDialog(); + + wxEventType GetEventType() const + { return wxEVT_FILEPICKER_CHANGED; } + +protected: + void UpdateDialogPath(wxDialog *p) + { wxStaticCast(p, wxFileDialog)->SetPath(m_path); } + void UpdatePathFromDialog(wxDialog *p) + { m_path = wxStaticCast(p, wxFileDialog)->GetPath(); } + +private: + DECLARE_DYNAMIC_CLASS(wxGenericFileButton) +}; + + +//----------------------------------------------------------------------------- +// wxGenericDirButton: a button which brings up a wxDirDialog +//----------------------------------------------------------------------------- + +#define wxDIRBTN_DEFAULT_STYLE 0 + +class WXDLLIMPEXP_CORE wxGenericDirButton : public wxGenericFileDirButton +{ +public: + wxGenericDirButton() {} + wxGenericDirButton(wxWindow *parent, + wxWindowID id, + const wxString& label = wxDirPickerWidgetLabel, + const wxString& path = wxEmptyString, + const wxString &message = wxDirSelectorPromptStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDIRBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDirPickerWidgetNameStr) + { + Create(parent, id, label, path, message, wxEmptyString, + pos, size, style, validator, name); + } + +public: // overridable + + virtual long GetDialogStyle() const + { + long dirdlgstyle = wxDD_DEFAULT_STYLE; + + if ( m_pickerStyle & wxDIRP_DIR_MUST_EXIST ) + dirdlgstyle |= wxDD_DIR_MUST_EXIST; + if ( m_pickerStyle & wxDIRP_CHANGE_DIR ) + dirdlgstyle |= wxDD_CHANGE_DIR; + + return dirdlgstyle; + } + + virtual wxDialog *CreateDialog(); + + wxEventType GetEventType() const + { return wxEVT_DIRPICKER_CHANGED; } + +protected: + void UpdateDialogPath(wxDialog *p) + { wxStaticCast(p, wxDirDialog)->SetPath(m_path); } + void UpdatePathFromDialog(wxDialog *p) + { m_path = wxStaticCast(p, wxDirDialog)->GetPath(); } + +private: + DECLARE_DYNAMIC_CLASS(wxGenericDirButton) +}; + +// old wxEVT_COMMAND_* constants +//#define wxEVT_COMMAND_DIRPICKER_CHANGED wxEVT_DIRPICKER_CHANGED +//#define wxEVT_COMMAND_FILEPICKER_CHANGED wxEVT_FILEPICKER_CHANGED + +#endif // _WX_FILEDIRPICKER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fontdlgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fontdlgg.h new file mode 100644 index 0000000000..a16fa6e2e8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fontdlgg.h @@ -0,0 +1,109 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/fontdlgg.h +// Purpose: wxGenericFontDialog +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_FONTDLGG_H +#define _WX_GENERIC_FONTDLGG_H + +#include "wx/gdicmn.h" +#include "wx/font.h" + +#ifdef __WXWINCE__ +#define USE_SPINCTRL_FOR_POINT_SIZE 1 +class WXDLLIMPEXP_FWD_CORE wxSpinEvent; +#else +#define USE_SPINCTRL_FOR_POINT_SIZE 0 +#endif + +/* + * FONT DIALOG + */ + +class WXDLLIMPEXP_FWD_CORE wxChoice; +class WXDLLIMPEXP_FWD_CORE wxText; +class WXDLLIMPEXP_FWD_CORE wxCheckBox; +class WXDLLIMPEXP_FWD_CORE wxFontPreviewer; + +enum +{ + wxID_FONT_UNDERLINE = 3000, + wxID_FONT_STYLE, + wxID_FONT_WEIGHT, + wxID_FONT_FAMILY, + wxID_FONT_COLOUR, + wxID_FONT_SIZE +}; + +class WXDLLIMPEXP_CORE wxGenericFontDialog : public wxFontDialogBase +{ +public: + wxGenericFontDialog() { Init(); } + wxGenericFontDialog(wxWindow *parent) + : wxFontDialogBase(parent) { Init(); } + wxGenericFontDialog(wxWindow *parent, const wxFontData& data) + : wxFontDialogBase(parent, data) { Init(); } + virtual ~wxGenericFontDialog(); + + virtual int ShowModal(); + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated, for backwards compatibility only + wxDEPRECATED( wxGenericFontDialog(wxWindow *parent, const wxFontData *data) ); +#endif // WXWIN_COMPATIBILITY_2_6 + + // Internal functions + void OnCloseWindow(wxCloseEvent& event); + + virtual void CreateWidgets(); + virtual void InitializeFont(); + + void OnChangeFont(wxCommandEvent& event); + +#if USE_SPINCTRL_FOR_POINT_SIZE + void OnChangeSize(wxSpinEvent& event); +#endif + +protected: + + virtual bool DoCreate(wxWindow *parent); + +private: + + // common part of all ctors + void Init(); + + void DoChangeFont(); + + wxFont m_dialogFont; + + wxChoice *m_familyChoice; + wxChoice *m_styleChoice; + wxChoice *m_weightChoice; + wxChoice *m_colourChoice; + wxCheckBox *m_underLineCheckBox; + +#if !USE_SPINCTRL_FOR_POINT_SIZE + wxChoice *m_pointSizeChoice; +#endif + + wxFontPreviewer *m_previewer; + bool m_useEvents; + + // static bool fontDialogCancelled; + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGenericFontDialog) +}; + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated, for backwards compatibility only +inline wxGenericFontDialog::wxGenericFontDialog(wxWindow *parent, const wxFontData *data) + :wxFontDialogBase(parent) { Init(); InitFontData(data); Create(parent); } +#endif // WXWIN_COMPATIBILITY_2_6 + +#endif // _WX_GENERIC_FONTDLGG_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fontpickerg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fontpickerg.h new file mode 100644 index 0000000000..8090450038 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fontpickerg.h @@ -0,0 +1,75 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/fontpickerg.h +// Purpose: wxGenericFontButton header +// Author: Francesco Montorsi +// Modified by: +// Created: 14/4/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONTPICKER_H_ +#define _WX_FONTPICKER_H_ + +#include "wx/button.h" +#include "wx/fontdata.h" + +//----------------------------------------------------------------------------- +// wxGenericFontButton: a button which brings up a wxFontDialog +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericFontButton : public wxButton, + public wxFontPickerWidgetBase +{ +public: + wxGenericFontButton() {} + wxGenericFontButton(wxWindow *parent, + wxWindowID id, + const wxFont &initial = wxNullFont, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxFONTBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFontPickerWidgetNameStr) + { + Create(parent, id, initial, pos, size, style, validator, name); + } + + virtual ~wxGenericFontButton() {} + + +public: // API extensions specific for wxGenericFontButton + + // user can override this to init font data in a different way + virtual void InitFontData(); + + // returns the font data shown in wxFontDialog + wxFontData *GetFontData() { return &m_data; } + + +public: + + bool Create(wxWindow *parent, + wxWindowID id, + const wxFont &initial = *wxNORMAL_FONT, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxFONTBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFontPickerWidgetNameStr); + + void OnButtonClick(wxCommandEvent &); + + +protected: + + void UpdateFont(); + + wxFontData m_data; + +private: + DECLARE_DYNAMIC_CLASS(wxGenericFontButton) +}; + + +#endif // _WX_FONTPICKER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fswatcher.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fswatcher.h new file mode 100644 index 0000000000..efd7631b47 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/fswatcher.h @@ -0,0 +1,25 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/fswatcher.h +// Purpose: wxPollingFileSystemWatcher +// Author: Bartosz Bekier +// Created: 2009-05-26 +// Copyright: (c) 2009 Bartosz Bekier +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FSWATCHER_GENERIC_H_ +#define _WX_FSWATCHER_GENERIC_H_ + +#include "wx/defs.h" + +#if wxUSE_FSWATCHER + +class WXDLLIMPEXP_BASE wxPollingFileSystemWatcher : public wxFileSystemWatcherBase +{ +public: + +}; + +#endif // wxUSE_FSWATCHER + +#endif /* _WX_FSWATCHER_GENERIC_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/grid.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/grid.h new file mode 100644 index 0000000000..c58cec3742 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/grid.h @@ -0,0 +1,2723 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/grid.h +// Purpose: wxGrid and related classes +// Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) +// Modified by: Santiago Palacios +// Created: 1/08/1999 +// Copyright: (c) Michael Bedward +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_GRID_H_ +#define _WX_GENERIC_GRID_H_ + +#include "wx/defs.h" + +#if wxUSE_GRID + +#include "wx/hashmap.h" + +#include "wx/scrolwin.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_ADV(const char) wxGridNameStr[]; + +// Default parameters for wxGrid +// +#define WXGRID_DEFAULT_NUMBER_ROWS 10 +#define WXGRID_DEFAULT_NUMBER_COLS 10 +#if defined(__WXMSW__) || defined(__WXGTK20__) +#define WXGRID_DEFAULT_ROW_HEIGHT 25 +#else +#define WXGRID_DEFAULT_ROW_HEIGHT 30 +#endif // __WXMSW__ +#define WXGRID_DEFAULT_COL_WIDTH 80 +#define WXGRID_DEFAULT_COL_LABEL_HEIGHT 32 +#define WXGRID_DEFAULT_ROW_LABEL_WIDTH 82 +#define WXGRID_LABEL_EDGE_ZONE 2 +#define WXGRID_MIN_ROW_HEIGHT 15 +#define WXGRID_MIN_COL_WIDTH 15 +#define WXGRID_DEFAULT_SCROLLBAR_WIDTH 16 + +// type names for grid table values +#define wxGRID_VALUE_STRING wxT("string") +#define wxGRID_VALUE_BOOL wxT("bool") +#define wxGRID_VALUE_NUMBER wxT("long") +#define wxGRID_VALUE_FLOAT wxT("double") +#define wxGRID_VALUE_CHOICE wxT("choice") + +#define wxGRID_VALUE_TEXT wxGRID_VALUE_STRING +#define wxGRID_VALUE_LONG wxGRID_VALUE_NUMBER + +// magic constant which tells (to some functions) to automatically calculate +// the appropriate size +#define wxGRID_AUTOSIZE (-1) + +// many wxGrid methods work either with columns or rows, this enum is used for +// the parameter indicating which one should it be +enum wxGridDirection +{ + wxGRID_COLUMN, + wxGRID_ROW +}; + +// Flags used with wxGrid::Render() to select parts of the grid to draw. +enum wxGridRenderStyle +{ + wxGRID_DRAW_ROWS_HEADER = 0x001, + wxGRID_DRAW_COLS_HEADER = 0x002, + wxGRID_DRAW_CELL_LINES = 0x004, + wxGRID_DRAW_BOX_RECT = 0x008, + wxGRID_DRAW_SELECTION = 0x010, + wxGRID_DRAW_DEFAULT = wxGRID_DRAW_ROWS_HEADER | + wxGRID_DRAW_COLS_HEADER | + wxGRID_DRAW_CELL_LINES | + wxGRID_DRAW_BOX_RECT +}; + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_ADV wxGrid; +class WXDLLIMPEXP_FWD_ADV wxGridCellAttr; +class WXDLLIMPEXP_FWD_ADV wxGridCellAttrProviderData; +class WXDLLIMPEXP_FWD_ADV wxGridColLabelWindow; +class WXDLLIMPEXP_FWD_ADV wxGridCornerLabelWindow; +class WXDLLIMPEXP_FWD_ADV wxGridRowLabelWindow; +class WXDLLIMPEXP_FWD_ADV wxGridWindow; +class WXDLLIMPEXP_FWD_ADV wxGridTypeRegistry; +class WXDLLIMPEXP_FWD_ADV wxGridSelection; + +class WXDLLIMPEXP_FWD_CORE wxHeaderCtrl; +class WXDLLIMPEXP_FWD_CORE wxCheckBox; +class WXDLLIMPEXP_FWD_CORE wxComboBox; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +#if wxUSE_SPINCTRL +class WXDLLIMPEXP_FWD_CORE wxSpinCtrl; +#endif + +class wxGridFixedIndicesSet; + +class wxGridOperations; +class wxGridRowOperations; +class wxGridColumnOperations; +class wxGridDirectionOperations; + + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +#define wxSafeIncRef(p) if ( p ) (p)->IncRef() +#define wxSafeDecRef(p) if ( p ) (p)->DecRef() + +// ---------------------------------------------------------------------------- +// wxGridCellWorker: common base class for wxGridCellRenderer and +// wxGridCellEditor +// +// NB: this is more an implementation convenience than a design issue, so this +// class is not documented and is not public at all +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGridCellWorker : public wxClientDataContainer, public wxRefCounter +{ +public: + wxGridCellWorker() { } + + // interpret renderer parameters: arbitrary string whose interpretation is + // left to the derived classes + virtual void SetParameters(const wxString& params); + +protected: + // virtual dtor for any base class - private because only DecRef() can + // delete us + virtual ~wxGridCellWorker(); + +private: + // suppress the stupid gcc warning about the class having private dtor and + // no friends + friend class wxGridCellWorkerDummyFriend; +}; + +// ---------------------------------------------------------------------------- +// wxGridCellRenderer: this class is responsible for actually drawing the cell +// in the grid. You may pass it to the wxGridCellAttr (below) to change the +// format of one given cell or to wxGrid::SetDefaultRenderer() to change the +// view of all cells. This is an ABC, you will normally use one of the +// predefined derived classes or derive your own class from it. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGridCellRenderer : public wxGridCellWorker +{ +public: + // draw the given cell on the provided DC inside the given rectangle + // using the style specified by the attribute and the default or selected + // state corresponding to the isSelected value. + // + // this pure virtual function has a default implementation which will + // prepare the DC using the given attribute: it will draw the rectangle + // with the bg colour from attr and set the text colour and font + virtual void Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int row, int col, + bool isSelected) = 0; + + // get the preferred size of the cell for its contents + virtual wxSize GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col) = 0; + + // create a new object which is the copy of this one + virtual wxGridCellRenderer *Clone() const = 0; +}; + +// ---------------------------------------------------------------------------- +// wxGridCellEditor: This class is responsible for providing and manipulating +// the in-place edit controls for the grid. Instances of wxGridCellEditor +// (actually, instances of derived classes since it is an ABC) can be +// associated with the cell attributes for individual cells, rows, columns, or +// even for the entire grid. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGridCellEditor : public wxGridCellWorker +{ +public: + wxGridCellEditor(); + + bool IsCreated() const { return m_control != NULL; } + wxControl* GetControl() const { return m_control; } + void SetControl(wxControl* control) { m_control = control; } + + wxGridCellAttr* GetCellAttr() const { return m_attr; } + void SetCellAttr(wxGridCellAttr* attr) { m_attr = attr; } + + // Creates the actual edit control + virtual void Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler) = 0; + + // Size and position the edit control + virtual void SetSize(const wxRect& rect); + + // Show or hide the edit control, use the specified attributes to set + // colours/fonts for it + virtual void Show(bool show, wxGridCellAttr *attr = NULL); + + // Draws the part of the cell not occupied by the control: the base class + // version just fills it with background colour from the attribute + virtual void PaintBackground(wxDC& dc, + const wxRect& rectCell, + const wxGridCellAttr& attr); + + + // The methods called by wxGrid when a cell is edited: first BeginEdit() is + // called, then EndEdit() is and if it returns true and if the change is + // not vetoed by a user-defined event handler, finally ApplyEdit() is called + + // Fetch the value from the table and prepare the edit control + // to begin editing. Set the focus to the edit control. + virtual void BeginEdit(int row, int col, wxGrid* grid) = 0; + + // Returns false if nothing changed, otherwise returns true and return the + // new value in its string form in the newval output parameter. + // + // This should also store the new value in its real type internally so that + // it could be used by ApplyEdit() but it must not modify the grid as the + // change could still be vetoed. + virtual bool EndEdit(int row, int col, const wxGrid *grid, + const wxString& oldval, wxString *newval) = 0; + + // Complete the editing of the current cell by storing the value saved by + // the previous call to EndEdit() in the grid + virtual void ApplyEdit(int row, int col, wxGrid* grid) = 0; + + + // Reset the value in the control back to its starting value + virtual void Reset() = 0; + + // return true to allow the given key to start editing: the base class + // version only checks that the event has no modifiers. The derived + // classes are supposed to do "if ( base::IsAcceptedKey() && ... )" in + // their IsAcceptedKey() implementation, although, of course, it is not a + // mandatory requirment. + // + // NB: if the key is F2 (special), editing will always start and this + // method will not be called at all (but StartingKey() will) + virtual bool IsAcceptedKey(wxKeyEvent& event); + + // If the editor is enabled by pressing keys on the grid, this will be + // called to let the editor do something about that first key if desired + virtual void StartingKey(wxKeyEvent& event); + + // if the editor is enabled by clicking on the cell, this method will be + // called + virtual void StartingClick(); + + // Some types of controls on some platforms may need some help + // with the Return key. + virtual void HandleReturn(wxKeyEvent& event); + + // Final cleanup + virtual void Destroy(); + + // create a new object which is the copy of this one + virtual wxGridCellEditor *Clone() const = 0; + + // added GetValue so we can get the value which is in the control + virtual wxString GetValue() const = 0; + +protected: + // the dtor is private because only DecRef() can delete us + virtual ~wxGridCellEditor(); + + // the control we show on screen + wxControl* m_control; + + // a temporary pointer to the attribute being edited + wxGridCellAttr* m_attr; + + // if we change the colours/font of the control from the default ones, we + // must restore the default later and we save them here between calls to + // Show(true) and Show(false) + wxColour m_colFgOld, + m_colBgOld; + wxFont m_fontOld; + + // suppress the stupid gcc warning about the class having private dtor and + // no friends + friend class wxGridCellEditorDummyFriend; + + wxDECLARE_NO_COPY_CLASS(wxGridCellEditor); +}; + +// ---------------------------------------------------------------------------- +// wxGridHeaderRenderer and company: like wxGridCellRenderer but for headers +// ---------------------------------------------------------------------------- + +// Base class for corner window renderer: it is the simplest of all renderers +// and only has a single function +class WXDLLIMPEXP_ADV wxGridCornerHeaderRenderer +{ +public: + // Draw the border around the corner window. + virtual void DrawBorder(const wxGrid& grid, + wxDC& dc, + wxRect& rect) const = 0; + + // make the dtor of a class with virtual functions virtual to avoid g++ + // warnings, even though this class is not supposed to be used + // polymorphically + virtual ~wxGridCornerHeaderRenderer() { } +}; + + +// Base class for the row/column header cells renderers +class WXDLLIMPEXP_ADV wxGridHeaderLabelsRenderer + : public wxGridCornerHeaderRenderer +{ +public: + // Draw header cell label + virtual void DrawLabel(const wxGrid& grid, + wxDC& dc, + const wxString& value, + const wxRect& rect, + int horizAlign, + int vertAlign, + int textOrientation) const; +}; + +// Currently the row/column/corner renders don't need any methods other than +// those already in wxGridHeaderLabelsRenderer but still define separate classes +// for them for future extensions and also for better type safety (i.e. to +// avoid inadvertently using a column header renderer for the row headers) +class WXDLLIMPEXP_ADV wxGridRowHeaderRenderer + : public wxGridHeaderLabelsRenderer +{ +}; + +class WXDLLIMPEXP_ADV wxGridColumnHeaderRenderer + : public wxGridHeaderLabelsRenderer +{ +}; + +// Also define the default renderers which are used by wxGridCellAttrProvider +// by default +class WXDLLIMPEXP_ADV wxGridRowHeaderRendererDefault + : public wxGridRowHeaderRenderer +{ +public: + virtual void DrawBorder(const wxGrid& grid, + wxDC& dc, + wxRect& rect) const; +}; + +// Column header cells renderers +class WXDLLIMPEXP_ADV wxGridColumnHeaderRendererDefault + : public wxGridColumnHeaderRenderer +{ +public: + virtual void DrawBorder(const wxGrid& grid, + wxDC& dc, + wxRect& rect) const; +}; + +// Header corner renderer +class WXDLLIMPEXP_ADV wxGridCornerHeaderRendererDefault + : public wxGridCornerHeaderRenderer +{ +public: + virtual void DrawBorder(const wxGrid& grid, + wxDC& dc, + wxRect& rect) const; +}; + + +// ---------------------------------------------------------------------------- +// wxGridCellAttr: this class can be used to alter the cells appearance in +// the grid by changing their colour/font/... from default. An object of this +// class may be returned by wxGridTable::GetAttr(). +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGridCellAttr : public wxClientDataContainer, public wxRefCounter +{ +public: + enum wxAttrKind + { + Any, + Default, + Cell, + Row, + Col, + Merged + }; + + // ctors + wxGridCellAttr(wxGridCellAttr *attrDefault = NULL) + { + Init(attrDefault); + + SetAlignment(wxALIGN_INVALID, wxALIGN_INVALID); + } + + // VZ: considering the number of members wxGridCellAttr has now, this ctor + // seems to be pretty useless... may be we should just remove it? + wxGridCellAttr(const wxColour& colText, + const wxColour& colBack, + const wxFont& font, + int hAlign, + int vAlign) + : m_colText(colText), m_colBack(colBack), m_font(font) + { + Init(); + SetAlignment(hAlign, vAlign); + } + + // creates a new copy of this object + wxGridCellAttr *Clone() const; + void MergeWith(wxGridCellAttr *mergefrom); + + // setters + void SetTextColour(const wxColour& colText) { m_colText = colText; } + void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; } + void SetFont(const wxFont& font) { m_font = font; } + void SetAlignment(int hAlign, int vAlign) + { + m_hAlign = hAlign; + m_vAlign = vAlign; + } + void SetSize(int num_rows, int num_cols); + void SetOverflow(bool allow = true) + { m_overflow = allow ? Overflow : SingleCell; } + void SetReadOnly(bool isReadOnly = true) + { m_isReadOnly = isReadOnly ? ReadOnly : ReadWrite; } + + // takes ownership of the pointer + void SetRenderer(wxGridCellRenderer *renderer) + { wxSafeDecRef(m_renderer); m_renderer = renderer; } + void SetEditor(wxGridCellEditor* editor) + { wxSafeDecRef(m_editor); m_editor = editor; } + + void SetKind(wxAttrKind kind) { m_attrkind = kind; } + + // accessors + bool HasTextColour() const { return m_colText.IsOk(); } + bool HasBackgroundColour() const { return m_colBack.IsOk(); } + bool HasFont() const { return m_font.IsOk(); } + bool HasAlignment() const + { + return m_hAlign != wxALIGN_INVALID || m_vAlign != wxALIGN_INVALID; + } + bool HasRenderer() const { return m_renderer != NULL; } + bool HasEditor() const { return m_editor != NULL; } + bool HasReadWriteMode() const { return m_isReadOnly != Unset; } + bool HasOverflowMode() const { return m_overflow != UnsetOverflow; } + bool HasSize() const { return m_sizeRows != 1 || m_sizeCols != 1; } + + const wxColour& GetTextColour() const; + const wxColour& GetBackgroundColour() const; + const wxFont& GetFont() const; + void GetAlignment(int *hAlign, int *vAlign) const; + + // unlike GetAlignment() which always overwrites its output arguments with + // the alignment values to use, falling back on default alignment if this + // attribute doesn't have any, this function will preserve the values of + // parameters on entry if the corresponding alignment is not set in this + // attribute meaning that they can be initialized to default alignment (and + // also that they must be initialized, unlike with GetAlignment()) + void GetNonDefaultAlignment(int *hAlign, int *vAlign) const; + + void GetSize(int *num_rows, int *num_cols) const; + bool GetOverflow() const + { return m_overflow != SingleCell; } + wxGridCellRenderer *GetRenderer(const wxGrid* grid, int row, int col) const; + wxGridCellEditor *GetEditor(const wxGrid* grid, int row, int col) const; + + bool IsReadOnly() const { return m_isReadOnly == wxGridCellAttr::ReadOnly; } + + wxAttrKind GetKind() { return m_attrkind; } + + void SetDefAttr(wxGridCellAttr* defAttr) { m_defGridAttr = defAttr; } + +protected: + // the dtor is private because only DecRef() can delete us + virtual ~wxGridCellAttr() + { + wxSafeDecRef(m_renderer); + wxSafeDecRef(m_editor); + } + +private: + enum wxAttrReadMode + { + Unset = -1, + ReadWrite, + ReadOnly + }; + + enum wxAttrOverflowMode + { + UnsetOverflow = -1, + Overflow, + SingleCell + }; + + // the common part of all ctors + void Init(wxGridCellAttr *attrDefault = NULL); + + + wxColour m_colText, + m_colBack; + wxFont m_font; + int m_hAlign, + m_vAlign; + int m_sizeRows, + m_sizeCols; + + wxAttrOverflowMode m_overflow; + + wxGridCellRenderer* m_renderer; + wxGridCellEditor* m_editor; + wxGridCellAttr* m_defGridAttr; + + wxAttrReadMode m_isReadOnly; + + wxAttrKind m_attrkind; + + // use Clone() instead + wxDECLARE_NO_COPY_CLASS(wxGridCellAttr); + + // suppress the stupid gcc warning about the class having private dtor and + // no friends + friend class wxGridCellAttrDummyFriend; +}; + +// ---------------------------------------------------------------------------- +// wxGridCellAttrProvider: class used by wxGridTableBase to retrieve/store the +// cell attributes. +// ---------------------------------------------------------------------------- + +// implementation note: we separate it from wxGridTableBase because we wish to +// avoid deriving a new table class if possible, and sometimes it will be +// enough to just derive another wxGridCellAttrProvider instead +// +// the default implementation is reasonably efficient for the generic case, +// but you might still wish to implement your own for some specific situations +// if you have performance problems with the stock one +class WXDLLIMPEXP_ADV wxGridCellAttrProvider : public wxClientDataContainer +{ +public: + wxGridCellAttrProvider(); + virtual ~wxGridCellAttrProvider(); + + // DecRef() must be called on the returned pointer + virtual wxGridCellAttr *GetAttr(int row, int col, + wxGridCellAttr::wxAttrKind kind ) const; + + // all these functions take ownership of the pointer, don't call DecRef() + // on it + virtual void SetAttr(wxGridCellAttr *attr, int row, int col); + virtual void SetRowAttr(wxGridCellAttr *attr, int row); + virtual void SetColAttr(wxGridCellAttr *attr, int col); + + // these functions must be called whenever some rows/cols are deleted + // because the internal data must be updated then + void UpdateAttrRows( size_t pos, int numRows ); + void UpdateAttrCols( size_t pos, int numCols ); + + + // get renderers for the given row/column header label and the corner + // window: unlike cell renderers, these objects are not reference counted + // and are never NULL so they are returned by reference + virtual const wxGridColumnHeaderRenderer& GetColumnHeaderRenderer(int col); + virtual const wxGridRowHeaderRenderer& GetRowHeaderRenderer(int row); + virtual const wxGridCornerHeaderRenderer& GetCornerRenderer(); + +private: + void InitData(); + + wxGridCellAttrProviderData *m_data; + + wxDECLARE_NO_COPY_CLASS(wxGridCellAttrProvider); +}; + +// ---------------------------------------------------------------------------- +// wxGridCellCoords: location of a cell in the grid +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGridCellCoords +{ +public: + wxGridCellCoords() { m_row = m_col = -1; } + wxGridCellCoords( int r, int c ) { m_row = r; m_col = c; } + + // default copy ctor is ok + + int GetRow() const { return m_row; } + void SetRow( int n ) { m_row = n; } + int GetCol() const { return m_col; } + void SetCol( int n ) { m_col = n; } + void Set( int row, int col ) { m_row = row; m_col = col; } + + wxGridCellCoords& operator=( const wxGridCellCoords& other ) + { + if ( &other != this ) + { + m_row=other.m_row; + m_col=other.m_col; + } + return *this; + } + + bool operator==( const wxGridCellCoords& other ) const + { + return (m_row == other.m_row && m_col == other.m_col); + } + + bool operator!=( const wxGridCellCoords& other ) const + { + return (m_row != other.m_row || m_col != other.m_col); + } + + bool operator!() const + { + return (m_row == -1 && m_col == -1 ); + } + +private: + int m_row; + int m_col; +}; + + +// For comparisons... +// +extern WXDLLIMPEXP_ADV wxGridCellCoords wxGridNoCellCoords; +extern WXDLLIMPEXP_ADV wxRect wxGridNoCellRect; + +// An array of cell coords... +// +WX_DECLARE_OBJARRAY_WITH_DECL(wxGridCellCoords, wxGridCellCoordsArray, + class WXDLLIMPEXP_ADV); + +// ---------------------------------------------------------------------------- +// Grid table classes +// ---------------------------------------------------------------------------- + +// the abstract base class +class WXDLLIMPEXP_ADV wxGridTableBase : public wxObject, + public wxClientDataContainer +{ +public: + wxGridTableBase(); + virtual ~wxGridTableBase(); + + // You must override these functions in a derived table class + // + + // return the number of rows and columns in this table + virtual int GetNumberRows() = 0; + virtual int GetNumberCols() = 0; + + // the methods above are unfortunately non-const even though they should + // have been const -- but changing it now is not possible any longer as it + // would break the existing code overriding them, so instead we provide + // these const synonyms which can be used from const-correct code + int GetRowsCount() const + { return const_cast(this)->GetNumberRows(); } + int GetColsCount() const + { return const_cast(this)->GetNumberCols(); } + + + virtual bool IsEmptyCell( int row, int col ) + { + return GetValue(row, col).empty(); + } + + bool IsEmpty(const wxGridCellCoords& coord) + { + return IsEmptyCell(coord.GetRow(), coord.GetCol()); + } + + virtual wxString GetValue( int row, int col ) = 0; + virtual void SetValue( int row, int col, const wxString& value ) = 0; + + // Data type determination and value access + virtual wxString GetTypeName( int row, int col ); + virtual bool CanGetValueAs( int row, int col, const wxString& typeName ); + virtual bool CanSetValueAs( int row, int col, const wxString& typeName ); + + virtual long GetValueAsLong( int row, int col ); + virtual double GetValueAsDouble( int row, int col ); + virtual bool GetValueAsBool( int row, int col ); + + virtual void SetValueAsLong( int row, int col, long value ); + virtual void SetValueAsDouble( int row, int col, double value ); + virtual void SetValueAsBool( int row, int col, bool value ); + + // For user defined types + virtual void* GetValueAsCustom( int row, int col, const wxString& typeName ); + virtual void SetValueAsCustom( int row, int col, const wxString& typeName, void* value ); + + + // Overriding these is optional + // + virtual void SetView( wxGrid *grid ) { m_view = grid; } + virtual wxGrid * GetView() const { return m_view; } + + virtual void Clear() {} + virtual bool InsertRows( size_t pos = 0, size_t numRows = 1 ); + virtual bool AppendRows( size_t numRows = 1 ); + virtual bool DeleteRows( size_t pos = 0, size_t numRows = 1 ); + virtual bool InsertCols( size_t pos = 0, size_t numCols = 1 ); + virtual bool AppendCols( size_t numCols = 1 ); + virtual bool DeleteCols( size_t pos = 0, size_t numCols = 1 ); + + virtual wxString GetRowLabelValue( int row ); + virtual wxString GetColLabelValue( int col ); + virtual void SetRowLabelValue( int WXUNUSED(row), const wxString& ) {} + virtual void SetColLabelValue( int WXUNUSED(col), const wxString& ) {} + + // Attribute handling + // + + // give us the attr provider to use - we take ownership of the pointer + void SetAttrProvider(wxGridCellAttrProvider *attrProvider); + + // get the currently used attr provider (may be NULL) + wxGridCellAttrProvider *GetAttrProvider() const { return m_attrProvider; } + + // Does this table allow attributes? Default implementation creates + // a wxGridCellAttrProvider if necessary. + virtual bool CanHaveAttributes(); + + // by default forwarded to wxGridCellAttrProvider if any. May be + // overridden to handle attributes directly in the table. + virtual wxGridCellAttr *GetAttr( int row, int col, + wxGridCellAttr::wxAttrKind kind ); + + + // these functions take ownership of the pointer + virtual void SetAttr(wxGridCellAttr* attr, int row, int col); + virtual void SetRowAttr(wxGridCellAttr *attr, int row); + virtual void SetColAttr(wxGridCellAttr *attr, int col); + +private: + wxGrid * m_view; + wxGridCellAttrProvider *m_attrProvider; + + DECLARE_ABSTRACT_CLASS(wxGridTableBase) + wxDECLARE_NO_COPY_CLASS(wxGridTableBase); +}; + + +// ---------------------------------------------------------------------------- +// wxGridTableMessage +// ---------------------------------------------------------------------------- + +// IDs for messages sent from grid table to view +// +enum wxGridTableRequest +{ + wxGRIDTABLE_REQUEST_VIEW_GET_VALUES = 2000, + wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES, + wxGRIDTABLE_NOTIFY_ROWS_INSERTED, + wxGRIDTABLE_NOTIFY_ROWS_APPENDED, + wxGRIDTABLE_NOTIFY_ROWS_DELETED, + wxGRIDTABLE_NOTIFY_COLS_INSERTED, + wxGRIDTABLE_NOTIFY_COLS_APPENDED, + wxGRIDTABLE_NOTIFY_COLS_DELETED +}; + +class WXDLLIMPEXP_ADV wxGridTableMessage +{ +public: + wxGridTableMessage(); + wxGridTableMessage( wxGridTableBase *table, int id, + int comInt1 = -1, + int comInt2 = -1 ); + + void SetTableObject( wxGridTableBase *table ) { m_table = table; } + wxGridTableBase * GetTableObject() const { return m_table; } + void SetId( int id ) { m_id = id; } + int GetId() { return m_id; } + void SetCommandInt( int comInt1 ) { m_comInt1 = comInt1; } + int GetCommandInt() { return m_comInt1; } + void SetCommandInt2( int comInt2 ) { m_comInt2 = comInt2; } + int GetCommandInt2() { return m_comInt2; } + +private: + wxGridTableBase *m_table; + int m_id; + int m_comInt1; + int m_comInt2; + + wxDECLARE_NO_COPY_CLASS(wxGridTableMessage); +}; + + + +// ------ wxGridStringArray +// A 2-dimensional array of strings for data values +// + +WX_DECLARE_OBJARRAY_WITH_DECL(wxArrayString, wxGridStringArray, + class WXDLLIMPEXP_ADV); + + + +// ------ wxGridStringTable +// +// Simplest type of data table for a grid for small tables of strings +// that are stored in memory +// + +class WXDLLIMPEXP_ADV wxGridStringTable : public wxGridTableBase +{ +public: + wxGridStringTable(); + wxGridStringTable( int numRows, int numCols ); + + // these are pure virtual in wxGridTableBase + // + virtual int GetNumberRows() { return static_cast(m_data.size()); } + virtual int GetNumberCols() { return m_numCols; } + virtual wxString GetValue( int row, int col ); + virtual void SetValue( int row, int col, const wxString& s ); + + // overridden functions from wxGridTableBase + // + void Clear(); + bool InsertRows( size_t pos = 0, size_t numRows = 1 ); + bool AppendRows( size_t numRows = 1 ); + bool DeleteRows( size_t pos = 0, size_t numRows = 1 ); + bool InsertCols( size_t pos = 0, size_t numCols = 1 ); + bool AppendCols( size_t numCols = 1 ); + bool DeleteCols( size_t pos = 0, size_t numCols = 1 ); + + void SetRowLabelValue( int row, const wxString& ); + void SetColLabelValue( int col, const wxString& ); + wxString GetRowLabelValue( int row ); + wxString GetColLabelValue( int col ); + +private: + wxGridStringArray m_data; + + // notice that while we don't need to store the number of our rows as it's + // always equal to the size of m_data array, we do need to store the number + // of our columns as we can't retrieve it from m_data when the number of + // rows is 0 (see #10818) + int m_numCols; + + // These only get used if you set your own labels, otherwise the + // GetRow/ColLabelValue functions return wxGridTableBase defaults + // + wxArrayString m_rowLabels; + wxArrayString m_colLabels; + + DECLARE_DYNAMIC_CLASS_NO_COPY( wxGridStringTable ) +}; + + + +// ============================================================================ +// Grid view classes +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxGridSizesInfo stores information about sizes of the rows or columns. +// +// It assumes that most of the columns or rows have default size and so stores +// the default size separately and uses a hash to map column or row numbers to +// their non default size for those which don't have the default size. +// ---------------------------------------------------------------------------- + +// hash map to store positions as the keys and sizes as the values +WX_DECLARE_HASH_MAP_WITH_DECL( unsigned, int, wxIntegerHash, wxIntegerEqual, + wxUnsignedToIntHashMap, class WXDLLIMPEXP_ADV ); + +struct WXDLLIMPEXP_ADV wxGridSizesInfo +{ + // default ctor, initialize m_sizeDefault and m_customSizes later + wxGridSizesInfo() { } + + // ctor used by wxGrid::Get{Col,Row}Sizes() + wxGridSizesInfo(int defSize, const wxArrayInt& allSizes); + + // default copy ctor, assignment operator and dtor are ok + + // Get the size of the element with the given index + int GetSize(unsigned pos) const; + + + // default size + int m_sizeDefault; + + // position -> size map containing all elements with non-default size + wxUnsignedToIntHashMap m_customSizes; +}; + +// ---------------------------------------------------------------------------- +// wxGrid +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGrid : public wxScrolledWindow +{ +public: + // possible selection modes + enum wxGridSelectionModes + { + wxGridSelectCells = 0, // allow selecting anything + wxGridSelectRows = 1, // allow selecting only entire rows + wxGridSelectColumns = 2, // allow selecting only entire columns + wxGridSelectRowsOrColumns = wxGridSelectRows | wxGridSelectColumns + }; + + // Different behaviour of the TAB key when the end (or the beginning, for + // Shift-TAB) of the current row is reached: + enum TabBehaviour + { + Tab_Stop, // Do nothing, this is default. + Tab_Wrap, // Move to the next (or previous) row. + Tab_Leave // Move to the next (or previous) control. + }; + + // creation and destruction + // ------------------------ + + // ctor and Create() create the grid window, as with the other controls + wxGrid() { Init(); } + + wxGrid(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxWANTS_CHARS, + const wxString& name = wxGridNameStr) + { + Init(); + + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxWANTS_CHARS, + const wxString& name = wxGridNameStr); + + virtual ~wxGrid(); + + // however to initialize grid data either CreateGrid() or SetTable() must + // be also called + + // this is basically equivalent to + // + // SetTable(new wxGridStringTable(numRows, numCols), true, selmode) + // + bool CreateGrid( int numRows, int numCols, + wxGridSelectionModes selmode = wxGridSelectCells ); + + bool SetTable( wxGridTableBase *table, + bool takeOwnership = false, + wxGridSelectionModes selmode = wxGridSelectCells ); + + bool ProcessTableMessage(wxGridTableMessage&); + + wxGridTableBase *GetTable() const { return m_table; } + + + void SetSelectionMode(wxGridSelectionModes selmode); + wxGridSelectionModes GetSelectionMode() const; + + // ------ grid dimensions + // + int GetNumberRows() const { return m_numRows; } + int GetNumberCols() const { return m_numCols; } + + + // ------ display update functions + // + wxArrayInt CalcRowLabelsExposed( const wxRegion& reg ) const; + + wxArrayInt CalcColLabelsExposed( const wxRegion& reg ) const; + wxGridCellCoordsArray CalcCellsExposed( const wxRegion& reg ) const; + + + void ClearGrid(); + bool InsertRows(int pos = 0, int numRows = 1, bool updateLabels = true) + { + return DoModifyLines(&wxGridTableBase::InsertRows, + pos, numRows, updateLabels); + } + bool InsertCols(int pos = 0, int numCols = 1, bool updateLabels = true) + { + return DoModifyLines(&wxGridTableBase::InsertCols, + pos, numCols, updateLabels); + } + + bool AppendRows(int numRows = 1, bool updateLabels = true) + { + return DoAppendLines(&wxGridTableBase::AppendRows, numRows, updateLabels); + } + bool AppendCols(int numCols = 1, bool updateLabels = true) + { + return DoAppendLines(&wxGridTableBase::AppendCols, numCols, updateLabels); + } + + bool DeleteRows(int pos = 0, int numRows = 1, bool updateLabels = true) + { + return DoModifyLines(&wxGridTableBase::DeleteRows, + pos, numRows, updateLabels); + } + bool DeleteCols(int pos = 0, int numCols = 1, bool updateLabels = true) + { + return DoModifyLines(&wxGridTableBase::DeleteCols, + pos, numCols, updateLabels); + } + + void DrawGridCellArea( wxDC& dc , const wxGridCellCoordsArray& cells ); + void DrawGridSpace( wxDC& dc ); + void DrawCellBorder( wxDC& dc, const wxGridCellCoords& ); + void DrawAllGridLines( wxDC& dc, const wxRegion & reg ); + void DrawCell( wxDC& dc, const wxGridCellCoords& ); + void DrawHighlight(wxDC& dc, const wxGridCellCoordsArray& cells); + + // this function is called when the current cell highlight must be redrawn + // and may be overridden by the user + virtual void DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr ); + + virtual void DrawRowLabels( wxDC& dc, const wxArrayInt& rows ); + virtual void DrawRowLabel( wxDC& dc, int row ); + + virtual void DrawColLabels( wxDC& dc, const wxArrayInt& cols ); + virtual void DrawColLabel( wxDC& dc, int col ); + + virtual void DrawCornerLabel(wxDC& dc); + + // ------ Cell text drawing functions + // + void DrawTextRectangle( wxDC& dc, const wxString&, const wxRect&, + int horizontalAlignment = wxALIGN_LEFT, + int verticalAlignment = wxALIGN_TOP, + int textOrientation = wxHORIZONTAL ) const; + + void DrawTextRectangle( wxDC& dc, const wxArrayString& lines, const wxRect&, + int horizontalAlignment = wxALIGN_LEFT, + int verticalAlignment = wxALIGN_TOP, + int textOrientation = wxHORIZONTAL ) const; + + // ------ grid render function for printing + // + void Render( wxDC& dc, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxGridCellCoords& topLeft = wxGridCellCoords(-1, -1), + const wxGridCellCoords& bottomRight = wxGridCellCoords(-1, -1), + int style = wxGRID_DRAW_DEFAULT ); + + // Split a string containing newline characters into an array of + // strings and return the number of lines + // + void StringToLines( const wxString& value, wxArrayString& lines ) const; + + void GetTextBoxSize( const wxDC& dc, + const wxArrayString& lines, + long *width, long *height ) const; + + + // ------ + // Code that does a lot of grid modification can be enclosed + // between BeginBatch() and EndBatch() calls to avoid screen + // flicker + // + void BeginBatch() { m_batchCount++; } + void EndBatch(); + + int GetBatchCount() { return m_batchCount; } + + virtual void Refresh(bool eraseb = true, const wxRect* rect = NULL); + + // Use this, rather than wxWindow::Refresh(), to force an + // immediate repainting of the grid. Has no effect if you are + // already inside a BeginBatch / EndBatch block. + // + // This function is necessary because wxGrid has a minimal OnPaint() + // handler to reduce screen flicker. + // + void ForceRefresh(); + + + // ------ edit control functions + // + bool IsEditable() const { return m_editable; } + void EnableEditing( bool edit ); + + void EnableCellEditControl( bool enable = true ); + void DisableCellEditControl() { EnableCellEditControl(false); } + bool CanEnableCellControl() const; + bool IsCellEditControlEnabled() const; + bool IsCellEditControlShown() const; + + bool IsCurrentCellReadOnly() const; + + void ShowCellEditControl(); + void HideCellEditControl(); + void SaveEditControlValue(); + + + // ------ grid location functions + // Note that all of these functions work with the logical coordinates of + // grid cells and labels so you will need to convert from device + // coordinates for mouse events etc. + // + wxGridCellCoords XYToCell(int x, int y) const; + void XYToCell(int x, int y, wxGridCellCoords& coords) const + { coords = XYToCell(x, y); } + wxGridCellCoords XYToCell(const wxPoint& pos) const + { return XYToCell(pos.x, pos.y); } + + // these functions return the index of the row/columns corresponding to the + // given logical position in pixels + // + // if clipToMinMax is false (default, wxNOT_FOUND is returned if the + // position is outside any row/column, otherwise the first/last element is + // returned in this case + int YToRow( int y, bool clipToMinMax = false ) const; + int XToCol( int x, bool clipToMinMax = false ) const; + + int YToEdgeOfRow( int y ) const; + int XToEdgeOfCol( int x ) const; + + wxRect CellToRect( int row, int col ) const; + wxRect CellToRect( const wxGridCellCoords& coords ) const + { return CellToRect( coords.GetRow(), coords.GetCol() ); } + + int GetGridCursorRow() const { return m_currentCellCoords.GetRow(); } + int GetGridCursorCol() const { return m_currentCellCoords.GetCol(); } + + // check to see if a cell is either wholly visible (the default arg) or + // at least partially visible in the grid window + // + bool IsVisible( int row, int col, bool wholeCellVisible = true ) const; + bool IsVisible( const wxGridCellCoords& coords, bool wholeCellVisible = true ) const + { return IsVisible( coords.GetRow(), coords.GetCol(), wholeCellVisible ); } + void MakeCellVisible( int row, int col ); + void MakeCellVisible( const wxGridCellCoords& coords ) + { MakeCellVisible( coords.GetRow(), coords.GetCol() ); } + + + // ------ grid cursor movement functions + // + void SetGridCursor(int row, int col) { SetCurrentCell(row, col); } + void SetGridCursor(const wxGridCellCoords& c) { SetCurrentCell(c); } + + void GoToCell(int row, int col) + { + if ( SetCurrentCell(row, col) ) + MakeCellVisible(row, col); + } + + void GoToCell(const wxGridCellCoords& coords) + { + if ( SetCurrentCell(coords) ) + MakeCellVisible(coords); + } + + bool MoveCursorUp( bool expandSelection ); + bool MoveCursorDown( bool expandSelection ); + bool MoveCursorLeft( bool expandSelection ); + bool MoveCursorRight( bool expandSelection ); + bool MovePageDown(); + bool MovePageUp(); + bool MoveCursorUpBlock( bool expandSelection ); + bool MoveCursorDownBlock( bool expandSelection ); + bool MoveCursorLeftBlock( bool expandSelection ); + bool MoveCursorRightBlock( bool expandSelection ); + + void SetTabBehaviour(TabBehaviour behaviour) { m_tabBehaviour = behaviour; } + + + // ------ label and gridline formatting + // + int GetDefaultRowLabelSize() const { return WXGRID_DEFAULT_ROW_LABEL_WIDTH; } + int GetRowLabelSize() const { return m_rowLabelWidth; } + int GetDefaultColLabelSize() const { return WXGRID_DEFAULT_COL_LABEL_HEIGHT; } + int GetColLabelSize() const { return m_colLabelHeight; } + wxColour GetLabelBackgroundColour() const { return m_labelBackgroundColour; } + wxColour GetLabelTextColour() const { return m_labelTextColour; } + wxFont GetLabelFont() const { return m_labelFont; } + void GetRowLabelAlignment( int *horiz, int *vert ) const; + void GetColLabelAlignment( int *horiz, int *vert ) const; + int GetColLabelTextOrientation() const; + wxString GetRowLabelValue( int row ) const; + wxString GetColLabelValue( int col ) const; + + wxColour GetCellHighlightColour() const { return m_cellHighlightColour; } + int GetCellHighlightPenWidth() const { return m_cellHighlightPenWidth; } + int GetCellHighlightROPenWidth() const { return m_cellHighlightROPenWidth; } + + // this one will use wxHeaderCtrl for the column labels + void UseNativeColHeader(bool native = true); + + // this one will still draw them manually but using the native renderer + // instead of using the same appearance as for the row labels + void SetUseNativeColLabels( bool native = true ); + + void SetRowLabelSize( int width ); + void SetColLabelSize( int height ); + void HideRowLabels() { SetRowLabelSize( 0 ); } + void HideColLabels() { SetColLabelSize( 0 ); } + void SetLabelBackgroundColour( const wxColour& ); + void SetLabelTextColour( const wxColour& ); + void SetLabelFont( const wxFont& ); + void SetRowLabelAlignment( int horiz, int vert ); + void SetColLabelAlignment( int horiz, int vert ); + void SetColLabelTextOrientation( int textOrientation ); + void SetRowLabelValue( int row, const wxString& ); + void SetColLabelValue( int col, const wxString& ); + void SetCellHighlightColour( const wxColour& ); + void SetCellHighlightPenWidth(int width); + void SetCellHighlightROPenWidth(int width); + + + // interactive grid mouse operations control + // ----------------------------------------- + + // functions globally enabling row/column interactive resizing (enabled by + // default) + void EnableDragRowSize( bool enable = true ); + void DisableDragRowSize() { EnableDragRowSize( false ); } + + void EnableDragColSize( bool enable = true ); + void DisableDragColSize() { EnableDragColSize( false ); } + + // if interactive resizing is enabled, some rows/columns can still have + // fixed size + void DisableRowResize(int row) { DoDisableLineResize(row, m_setFixedRows); } + void DisableColResize(int col) { DoDisableLineResize(col, m_setFixedCols); } + + // these functions return whether the given row/column can be + // effectively resized: for this interactive resizing must be enabled + // and this index must not have been passed to DisableRow/ColResize() + bool CanDragRowSize(int row) const + { return m_canDragRowSize && DoCanResizeLine(row, m_setFixedRows); } + bool CanDragColSize(int col) const + { return m_canDragColSize && DoCanResizeLine(col, m_setFixedCols); } + + // interactive column reordering (disabled by default) + void EnableDragColMove( bool enable = true ); + void DisableDragColMove() { EnableDragColMove( false ); } + bool CanDragColMove() const { return m_canDragColMove; } + + // interactive resizing of grid cells (enabled by default) + void EnableDragGridSize(bool enable = true); + void DisableDragGridSize() { EnableDragGridSize(false); } + bool CanDragGridSize() const { return m_canDragGridSize; } + + // interactive dragging of cells (disabled by default) + void EnableDragCell( bool enable = true ); + void DisableDragCell() { EnableDragCell( false ); } + bool CanDragCell() const { return m_canDragCell; } + + + // grid lines + // ---------- + + // enable or disable drawing of the lines + void EnableGridLines(bool enable = true); + bool GridLinesEnabled() const { return m_gridLinesEnabled; } + + // by default grid lines stop at last column/row, but this may be changed + void ClipHorzGridLines(bool clip) + { DoClipGridLines(m_gridLinesClipHorz, clip); } + void ClipVertGridLines(bool clip) + { DoClipGridLines(m_gridLinesClipVert, clip); } + bool AreHorzGridLinesClipped() const { return m_gridLinesClipHorz; } + bool AreVertGridLinesClipped() const { return m_gridLinesClipVert; } + + // this can be used to change the global grid lines colour + void SetGridLineColour(const wxColour& col); + wxColour GetGridLineColour() const { return m_gridLineColour; } + + // these methods may be overridden to customize individual grid lines + // appearance + virtual wxPen GetDefaultGridLinePen(); + virtual wxPen GetRowGridLinePen(int row); + virtual wxPen GetColGridLinePen(int col); + + + // attributes + // ---------- + + // this sets the specified attribute for this cell or in this row/col + void SetAttr(int row, int col, wxGridCellAttr *attr); + void SetRowAttr(int row, wxGridCellAttr *attr); + void SetColAttr(int col, wxGridCellAttr *attr); + + // the grid can cache attributes for the recently used cells (currently it + // only caches one attribute for the most recently used one) and might + // notice that its value in the attribute provider has changed -- if this + // happens, call this function to force it + void RefreshAttr(int row, int col); + + // returns the attribute we may modify in place: a new one if this cell + // doesn't have any yet or the existing one if it does + // + // DecRef() must be called on the returned pointer, as usual + wxGridCellAttr *GetOrCreateCellAttr(int row, int col) const; + + + // shortcuts for setting the column parameters + + // set the format for the data in the column: default is string + void SetColFormatBool(int col); + void SetColFormatNumber(int col); + void SetColFormatFloat(int col, int width = -1, int precision = -1); + void SetColFormatCustom(int col, const wxString& typeName); + + // ------ row and col formatting + // + int GetDefaultRowSize() const; + int GetRowSize( int row ) const; + bool IsRowShown(int row) const { return GetRowSize(row) != 0; } + int GetDefaultColSize() const; + int GetColSize( int col ) const; + bool IsColShown(int col) const { return GetColSize(col) != 0; } + wxColour GetDefaultCellBackgroundColour() const; + wxColour GetCellBackgroundColour( int row, int col ) const; + wxColour GetDefaultCellTextColour() const; + wxColour GetCellTextColour( int row, int col ) const; + wxFont GetDefaultCellFont() const; + wxFont GetCellFont( int row, int col ) const; + void GetDefaultCellAlignment( int *horiz, int *vert ) const; + void GetCellAlignment( int row, int col, int *horiz, int *vert ) const; + bool GetDefaultCellOverflow() const; + bool GetCellOverflow( int row, int col ) const; + + // this function returns 1 in num_rows and num_cols for normal cells, + // positive numbers for a cell spanning multiple columns/rows (as set with + // SetCellSize()) and _negative_ numbers corresponding to the offset of the + // top left cell of the span from this one for the other cells covered by + // this cell + // + // the return value is CellSpan_None, CellSpan_Main or CellSpan_Inside for + // each of these cases respectively + enum CellSpan + { + CellSpan_Inside = -1, + CellSpan_None = 0, + CellSpan_Main + }; + + CellSpan GetCellSize( int row, int col, int *num_rows, int *num_cols ) const; + + wxSize GetCellSize(const wxGridCellCoords& coords) + { + wxSize s; + GetCellSize(coords.GetRow(), coords.GetCol(), &s.x, &s.y); + return s; + } + + // ------ row and col sizes + void SetDefaultRowSize( int height, bool resizeExistingRows = false ); + void SetRowSize( int row, int height ); + void HideRow(int row) { DoSetRowSize(row, 0); } + void ShowRow(int row) { DoSetRowSize(row, -1); } + + void SetDefaultColSize( int width, bool resizeExistingCols = false ); + void SetColSize( int col, int width ); + void HideCol(int col) { DoSetColSize(col, 0); } + void ShowCol(int col) { DoSetColSize(col, -1); } + + // the row and column sizes can be also set all at once using + // wxGridSizesInfo which holds all of them at once + + wxGridSizesInfo GetColSizes() const + { return wxGridSizesInfo(GetDefaultColSize(), m_colWidths); } + wxGridSizesInfo GetRowSizes() const + { return wxGridSizesInfo(GetDefaultRowSize(), m_rowHeights); } + + void SetColSizes(const wxGridSizesInfo& sizeInfo); + void SetRowSizes(const wxGridSizesInfo& sizeInfo); + + + // ------- columns (only, for now) reordering + + // columns index <-> positions mapping: by default, the position of the + // column is the same as its index, but the columns can also be reordered + // (either by calling SetColPos() explicitly or by the user dragging the + // columns around) in which case their indices don't correspond to their + // positions on display any longer + // + // internally we always work with indices except for the functions which + // have "Pos" in their names (and which work with columns, not pixels) and + // only the display and hit testing code really cares about display + // positions at all + + // set the positions of all columns at once (this method uses the same + // conventions as wxHeaderCtrl::SetColumnsOrder() for the order array) + void SetColumnsOrder(const wxArrayInt& order); + + // return the column index corresponding to the given (valid) position + int GetColAt(int pos) const + { + return m_colAt.empty() ? pos : m_colAt[pos]; + } + + // reorder the columns so that the column with the given index is now shown + // as the position pos + void SetColPos(int idx, int pos); + + // return the position at which the column with the given index is + // displayed: notice that this is a slow operation as we don't maintain the + // reverse mapping currently + int GetColPos(int idx) const + { + if ( m_colAt.IsEmpty() ) + return idx; + + for ( int i = 0; i < m_numCols; i++ ) + { + if ( m_colAt[i] == idx ) + return i; + } + + wxFAIL_MSG( "invalid column index" ); + + return wxNOT_FOUND; + } + + // reset the columns positions to the default order + void ResetColPos(); + + + // automatically size the column or row to fit to its contents, if + // setAsMin is true, this optimal width will also be set as minimal width + // for this column + void AutoSizeColumn( int col, bool setAsMin = true ) + { AutoSizeColOrRow(col, setAsMin, wxGRID_COLUMN); } + void AutoSizeRow( int row, bool setAsMin = true ) + { AutoSizeColOrRow(row, setAsMin, wxGRID_ROW); } + + // auto size all columns (very ineffective for big grids!) + void AutoSizeColumns( bool setAsMin = true ) + { (void)SetOrCalcColumnSizes(false, setAsMin); } + + void AutoSizeRows( bool setAsMin = true ) + { (void)SetOrCalcRowSizes(false, setAsMin); } + + // auto size the grid, that is make the columns/rows of the "right" size + // and also set the grid size to just fit its contents + void AutoSize(); + + // Note for both AutoSizeRowLabelSize and AutoSizeColLabelSize: + // If col equals to wxGRID_AUTOSIZE value then function autosizes labels column + // instead of data column. Note that this operation may be slow for large + // tables. + // autosize row height depending on label text + void AutoSizeRowLabelSize( int row ); + + // autosize column width depending on label text + void AutoSizeColLabelSize( int col ); + + // column won't be resized to be lesser width - this must be called during + // the grid creation because it won't resize the column if it's already + // narrower than the minimal width + void SetColMinimalWidth( int col, int width ); + void SetRowMinimalHeight( int row, int width ); + + /* These members can be used to query and modify the minimal + * acceptable size of grid rows and columns. Call this function in + * your code which creates the grid if you want to display cells + * with a size smaller than the default acceptable minimum size. + * Like the members SetColMinimalWidth and SetRowMinimalWidth, + * the existing rows or columns will not be checked/resized. + */ + void SetColMinimalAcceptableWidth( int width ); + void SetRowMinimalAcceptableHeight( int width ); + int GetColMinimalAcceptableWidth() const; + int GetRowMinimalAcceptableHeight() const; + + void SetDefaultCellBackgroundColour( const wxColour& ); + void SetCellBackgroundColour( int row, int col, const wxColour& ); + void SetDefaultCellTextColour( const wxColour& ); + + void SetCellTextColour( int row, int col, const wxColour& ); + void SetDefaultCellFont( const wxFont& ); + void SetCellFont( int row, int col, const wxFont& ); + void SetDefaultCellAlignment( int horiz, int vert ); + void SetCellAlignment( int row, int col, int horiz, int vert ); + void SetDefaultCellOverflow( bool allow ); + void SetCellOverflow( int row, int col, bool allow ); + void SetCellSize( int row, int col, int num_rows, int num_cols ); + + // takes ownership of the pointer + void SetDefaultRenderer(wxGridCellRenderer *renderer); + void SetCellRenderer(int row, int col, wxGridCellRenderer *renderer); + wxGridCellRenderer *GetDefaultRenderer() const; + wxGridCellRenderer* GetCellRenderer(int row, int col) const; + + // takes ownership of the pointer + void SetDefaultEditor(wxGridCellEditor *editor); + void SetCellEditor(int row, int col, wxGridCellEditor *editor); + wxGridCellEditor *GetDefaultEditor() const; + wxGridCellEditor* GetCellEditor(int row, int col) const; + + + + // ------ cell value accessors + // + wxString GetCellValue( int row, int col ) const + { + if ( m_table ) + { + return m_table->GetValue( row, col ); + } + else + { + return wxEmptyString; + } + } + + wxString GetCellValue( const wxGridCellCoords& coords ) const + { return GetCellValue( coords.GetRow(), coords.GetCol() ); } + + void SetCellValue( int row, int col, const wxString& s ); + void SetCellValue( const wxGridCellCoords& coords, const wxString& s ) + { SetCellValue( coords.GetRow(), coords.GetCol(), s ); } + + // returns true if the cell can't be edited + bool IsReadOnly(int row, int col) const; + + // make the cell editable/readonly + void SetReadOnly(int row, int col, bool isReadOnly = true); + + // ------ select blocks of cells + // + void SelectRow( int row, bool addToSelected = false ); + void SelectCol( int col, bool addToSelected = false ); + + void SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol, + bool addToSelected = false ); + + void SelectBlock( const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + bool addToSelected = false ) + { SelectBlock( topLeft.GetRow(), topLeft.GetCol(), + bottomRight.GetRow(), bottomRight.GetCol(), + addToSelected ); } + + void SelectAll(); + + bool IsSelection() const; + + // ------ deselect blocks or cells + // + void DeselectRow( int row ); + void DeselectCol( int col ); + void DeselectCell( int row, int col ); + + void ClearSelection(); + + bool IsInSelection( int row, int col ) const; + + bool IsInSelection( const wxGridCellCoords& coords ) const + { return IsInSelection( coords.GetRow(), coords.GetCol() ); } + + wxGridCellCoordsArray GetSelectedCells() const; + wxGridCellCoordsArray GetSelectionBlockTopLeft() const; + wxGridCellCoordsArray GetSelectionBlockBottomRight() const; + wxArrayInt GetSelectedRows() const; + wxArrayInt GetSelectedCols() const; + + // This function returns the rectangle that encloses the block of cells + // limited by TopLeft and BottomRight cell in device coords and clipped + // to the client size of the grid window. + // + wxRect BlockToDeviceRect( const wxGridCellCoords & topLeft, + const wxGridCellCoords & bottomRight ) const; + + // Access or update the selection fore/back colours + wxColour GetSelectionBackground() const + { return m_selectionBackground; } + wxColour GetSelectionForeground() const + { return m_selectionForeground; } + + void SetSelectionBackground(const wxColour& c) { m_selectionBackground = c; } + void SetSelectionForeground(const wxColour& c) { m_selectionForeground = c; } + + + // Methods for a registry for mapping data types to Renderers/Editors + void RegisterDataType(const wxString& typeName, + wxGridCellRenderer* renderer, + wxGridCellEditor* editor); + // DJC MAPTEK + virtual wxGridCellEditor* GetDefaultEditorForCell(int row, int col) const; + wxGridCellEditor* GetDefaultEditorForCell(const wxGridCellCoords& c) const + { return GetDefaultEditorForCell(c.GetRow(), c.GetCol()); } + virtual wxGridCellRenderer* GetDefaultRendererForCell(int row, int col) const; + virtual wxGridCellEditor* GetDefaultEditorForType(const wxString& typeName) const; + virtual wxGridCellRenderer* GetDefaultRendererForType(const wxString& typeName) const; + + // grid may occupy more space than needed for its rows/columns, this + // function allows to set how big this extra space is + void SetMargins(int extraWidth, int extraHeight) + { + m_extraWidth = extraWidth; + m_extraHeight = extraHeight; + + CalcDimensions(); + } + + // Accessors for component windows + wxWindow* GetGridWindow() const { return (wxWindow*)m_gridWin; } + wxWindow* GetGridRowLabelWindow() const { return (wxWindow*)m_rowLabelWin; } + wxWindow* GetGridColLabelWindow() const { return m_colWindow; } + wxWindow* GetGridCornerLabelWindow() const { return (wxWindow*)m_cornerLabelWin; } + + // This one can only be called if we are using the native header window + wxHeaderCtrl *GetGridColHeader() const + { + wxASSERT_MSG( m_useNativeHeader, "no column header window" ); + + // static_cast<> doesn't work without the full class declaration in + // view and we prefer to avoid adding more compile-time dependencies + // even at the cost of using reinterpret_cast<> + return reinterpret_cast(m_colWindow); + } + + // Allow adjustment of scroll increment. The default is (15, 15). + void SetScrollLineX(int x) { m_xScrollPixelsPerLine = x; } + void SetScrollLineY(int y) { m_yScrollPixelsPerLine = y; } + int GetScrollLineX() const { return m_xScrollPixelsPerLine; } + int GetScrollLineY() const { return m_yScrollPixelsPerLine; } + + // ------- drag and drop +#if wxUSE_DRAG_AND_DROP + virtual void SetDropTarget(wxDropTarget *dropTarget); +#endif // wxUSE_DRAG_AND_DROP + + + // ------- sorting support + + // wxGrid doesn't support sorting on its own but it can indicate the sort + // order in the column header (currently only if native header control is + // used though) + + // return the column currently displaying the sort indicator or wxNOT_FOUND + // if none + int GetSortingColumn() const { return m_sortCol; } + + // return true if this column is currently used for sorting + bool IsSortingBy(int col) const { return GetSortingColumn() == col; } + + // return the current sorting order (on GetSortingColumn()): true for + // ascending sort and false for descending; it doesn't make sense to call + // it if GetSortingColumn() returns wxNOT_FOUND + bool IsSortOrderAscending() const { return m_sortIsAscending; } + + // set the sorting column (or unsets any existing one if wxNOT_FOUND) and + // the order in which to sort + void SetSortingColumn(int col, bool ascending = true); + + // unset any existing sorting column + void UnsetSortingColumn() { SetSortingColumn(wxNOT_FOUND); } + +#if WXWIN_COMPATIBILITY_2_8 + // ------ For compatibility with previous wxGrid only... + // + // ************************************************ + // ** Don't use these in new code because they ** + // ** are liable to disappear in a future ** + // ** revision ** + // ************************************************ + // + + wxGrid( wxWindow *parent, + int x, int y, int w = wxDefaultCoord, int h = wxDefaultCoord, + long style = wxWANTS_CHARS, + const wxString& name = wxPanelNameStr ) + { + Init(); + Create(parent, wxID_ANY, wxPoint(x, y), wxSize(w, h), style, name); + } + + void SetCellValue( const wxString& val, int row, int col ) + { SetCellValue( row, col, val ); } + + void UpdateDimensions() + { CalcDimensions(); } + + int GetRows() const { return GetNumberRows(); } + int GetCols() const { return GetNumberCols(); } + int GetCursorRow() const { return GetGridCursorRow(); } + int GetCursorColumn() const { return GetGridCursorCol(); } + + int GetScrollPosX() const { return 0; } + int GetScrollPosY() const { return 0; } + + void SetScrollX( int WXUNUSED(x) ) { } + void SetScrollY( int WXUNUSED(y) ) { } + + void SetColumnWidth( int col, int width ) + { SetColSize( col, width ); } + + int GetColumnWidth( int col ) const + { return GetColSize( col ); } + + void SetRowHeight( int row, int height ) + { SetRowSize( row, height ); } + + // GetRowHeight() is below + + int GetViewHeight() const // returned num whole rows visible + { return 0; } + + int GetViewWidth() const // returned num whole cols visible + { return 0; } + + void SetLabelSize( int orientation, int sz ) + { + if ( orientation == wxHORIZONTAL ) + SetColLabelSize( sz ); + else + SetRowLabelSize( sz ); + } + + int GetLabelSize( int orientation ) const + { + if ( orientation == wxHORIZONTAL ) + return GetColLabelSize(); + else + return GetRowLabelSize(); + } + + void SetLabelAlignment( int orientation, int align ) + { + if ( orientation == wxHORIZONTAL ) + SetColLabelAlignment( align, wxALIGN_INVALID ); + else + SetRowLabelAlignment( align, wxALIGN_INVALID ); + } + + int GetLabelAlignment( int orientation, int WXUNUSED(align) ) const + { + int h, v; + if ( orientation == wxHORIZONTAL ) + { + GetColLabelAlignment( &h, &v ); + return h; + } + else + { + GetRowLabelAlignment( &h, &v ); + return h; + } + } + + void SetLabelValue( int orientation, const wxString& val, int pos ) + { + if ( orientation == wxHORIZONTAL ) + SetColLabelValue( pos, val ); + else + SetRowLabelValue( pos, val ); + } + + wxString GetLabelValue( int orientation, int pos) const + { + if ( orientation == wxHORIZONTAL ) + return GetColLabelValue( pos ); + else + return GetRowLabelValue( pos ); + } + + wxFont GetCellTextFont() const + { return m_defaultCellAttr->GetFont(); } + + wxFont GetCellTextFont(int WXUNUSED(row), int WXUNUSED(col)) const + { return m_defaultCellAttr->GetFont(); } + + void SetCellTextFont(const wxFont& fnt) + { SetDefaultCellFont( fnt ); } + + void SetCellTextFont(const wxFont& fnt, int row, int col) + { SetCellFont( row, col, fnt ); } + + void SetCellTextColour(const wxColour& val, int row, int col) + { SetCellTextColour( row, col, val ); } + + void SetCellTextColour(const wxColour& col) + { SetDefaultCellTextColour( col ); } + + void SetCellBackgroundColour(const wxColour& col) + { SetDefaultCellBackgroundColour( col ); } + + void SetCellBackgroundColour(const wxColour& colour, int row, int col) + { SetCellBackgroundColour( row, col, colour ); } + + bool GetEditable() const { return IsEditable(); } + void SetEditable( bool edit = true ) { EnableEditing( edit ); } + bool GetEditInPlace() const { return IsCellEditControlEnabled(); } + + void SetEditInPlace(bool WXUNUSED(edit) = true) { } + + void SetCellAlignment( int align, int row, int col) + { SetCellAlignment(row, col, align, wxALIGN_CENTER); } + void SetCellAlignment( int WXUNUSED(align) ) {} + void SetCellBitmap(wxBitmap *WXUNUSED(bitmap), int WXUNUSED(row), int WXUNUSED(col)) + { } + void SetDividerPen(const wxPen& WXUNUSED(pen)) { } + wxPen& GetDividerPen() const; + void OnActivate(bool WXUNUSED(active)) {} + + // ******** End of compatibility functions ********** + + + + // ------ control IDs + enum { wxGRID_CELLCTRL = 2000, + wxGRID_TOPCTRL }; + + // ------ control types + enum { wxGRID_TEXTCTRL = 2100, + wxGRID_CHECKBOX, + wxGRID_CHOICE, + wxGRID_COMBOBOX }; + + wxDEPRECATED_INLINE(bool CanDragRowSize() const, return m_canDragRowSize; ) + wxDEPRECATED_INLINE(bool CanDragColSize() const, return m_canDragColSize; ) +#endif // WXWIN_COMPATIBILITY_2_8 + + + // override some base class functions + virtual bool Enable(bool enable = true); + virtual wxWindow *GetMainWindowOfCompositeControl() + { return (wxWindow*)m_gridWin; } + virtual void Fit(); + + // implementation only + void CancelMouseCapture(); + +protected: + virtual wxSize DoGetBestSize() const; + + bool m_created; + + wxGridWindow *m_gridWin; + wxGridCornerLabelWindow *m_cornerLabelWin; + wxGridRowLabelWindow *m_rowLabelWin; + + // the real type of the column window depends on m_useNativeHeader value: + // if it is true, its dynamic type is wxHeaderCtrl, otherwise it is + // wxGridColLabelWindow, use accessors below when the real type matters + wxWindow *m_colWindow; + + wxGridColLabelWindow *GetColLabelWindow() const + { + wxASSERT_MSG( !m_useNativeHeader, "no column label window" ); + + return reinterpret_cast(m_colWindow); + } + + wxGridTableBase *m_table; + bool m_ownTable; + + int m_numRows; + int m_numCols; + + wxGridCellCoords m_currentCellCoords; + + // the corners of the block being currently selected or wxGridNoCellCoords + wxGridCellCoords m_selectedBlockTopLeft; + wxGridCellCoords m_selectedBlockBottomRight; + + // when selecting blocks of cells (either from the keyboard using Shift + // with cursor keys, or by dragging the mouse), the selection is anchored + // at m_currentCellCoords which defines one of the corners of the rectangle + // being selected -- and this variable defines the other corner, i.e. it's + // either m_selectedBlockTopLeft or m_selectedBlockBottomRight depending on + // which of them is not m_currentCellCoords + // + // if no block selection is in process, it is set to wxGridNoCellCoords + wxGridCellCoords m_selectedBlockCorner; + + wxGridSelection *m_selection; + + wxColour m_selectionBackground; + wxColour m_selectionForeground; + + // NB: *never* access m_row/col arrays directly because they are created + // on demand, *always* use accessor functions instead! + + // init the m_rowHeights/Bottoms arrays with default values + void InitRowHeights(); + + int m_defaultRowHeight; + int m_minAcceptableRowHeight; + wxArrayInt m_rowHeights; + wxArrayInt m_rowBottoms; + + // init the m_colWidths/Rights arrays + void InitColWidths(); + + int m_defaultColWidth; + int m_minAcceptableColWidth; + wxArrayInt m_colWidths; + wxArrayInt m_colRights; + + int m_sortCol; + bool m_sortIsAscending; + + bool m_useNativeHeader, + m_nativeColumnLabels; + + // get the col/row coords + int GetColWidth(int col) const; + int GetColLeft(int col) const; + int GetColRight(int col) const; + + // this function must be public for compatibility... +public: + int GetRowHeight(int row) const; +protected: + + int GetRowTop(int row) const; + int GetRowBottom(int row) const; + + int m_rowLabelWidth; + int m_colLabelHeight; + + // the size of the margin left to the right and bottom of the cell area + int m_extraWidth, + m_extraHeight; + + wxColour m_labelBackgroundColour; + wxColour m_labelTextColour; + wxFont m_labelFont; + + int m_rowLabelHorizAlign; + int m_rowLabelVertAlign; + int m_colLabelHorizAlign; + int m_colLabelVertAlign; + int m_colLabelTextOrientation; + + bool m_defaultRowLabelValues; + bool m_defaultColLabelValues; + + wxColour m_gridLineColour; + bool m_gridLinesEnabled; + bool m_gridLinesClipHorz, + m_gridLinesClipVert; + wxColour m_cellHighlightColour; + int m_cellHighlightPenWidth; + int m_cellHighlightROPenWidth; + + + // common part of AutoSizeColumn/Row() and GetBestSize() + int SetOrCalcColumnSizes(bool calcOnly, bool setAsMin = true); + int SetOrCalcRowSizes(bool calcOnly, bool setAsMin = true); + + // common part of AutoSizeColumn/Row() + void AutoSizeColOrRow(int n, bool setAsMin, wxGridDirection direction); + + // Calculate the minimum acceptable size for labels area + wxCoord CalcColOrRowLabelAreaMinSize(wxGridDirection direction); + + // if a column has a minimal width, it will be the value for it in this + // hash table + wxLongToLongHashMap m_colMinWidths, + m_rowMinHeights; + + // get the minimal width of the given column/row + int GetColMinimalWidth(int col) const; + int GetRowMinimalHeight(int col) const; + + // do we have some place to store attributes in? + bool CanHaveAttributes() const; + + // cell attribute cache (currently we only cache 1, may be will do + // more/better later) + struct CachedAttr + { + int row, col; + wxGridCellAttr *attr; + } m_attrCache; + + // invalidates the attribute cache + void ClearAttrCache(); + + // adds an attribute to cache + void CacheAttr(int row, int col, wxGridCellAttr *attr) const; + + // looks for an attr in cache, returns true if found + bool LookupAttr(int row, int col, wxGridCellAttr **attr) const; + + // looks for the attr in cache, if not found asks the table and caches the + // result + wxGridCellAttr *GetCellAttr(int row, int col) const; + wxGridCellAttr *GetCellAttr(const wxGridCellCoords& coords ) const + { return GetCellAttr( coords.GetRow(), coords.GetCol() ); } + + // the default cell attr object for cells that don't have their own + wxGridCellAttr* m_defaultCellAttr; + + + bool m_inOnKeyDown; + int m_batchCount; + + + wxGridTypeRegistry* m_typeRegistry; + + enum CursorMode + { + WXGRID_CURSOR_SELECT_CELL, + WXGRID_CURSOR_RESIZE_ROW, + WXGRID_CURSOR_RESIZE_COL, + WXGRID_CURSOR_SELECT_ROW, + WXGRID_CURSOR_SELECT_COL, + WXGRID_CURSOR_MOVE_COL + }; + + // this method not only sets m_cursorMode but also sets the correct cursor + // for the given mode and, if captureMouse is not false releases the mouse + // if it was captured and captures it if it must be captured + // + // for this to work, you should always use it and not set m_cursorMode + // directly! + void ChangeCursorMode(CursorMode mode, + wxWindow *win = NULL, + bool captureMouse = true); + + wxWindow *m_winCapture; // the window which captured the mouse + + // this variable is used not for finding the correct current cursor but + // mainly for finding out what is going to happen if the mouse starts being + // dragged right now + // + // by default it is WXGRID_CURSOR_SELECT_CELL meaning that nothing else is + // going on, and it is set to one of RESIZE/SELECT/MOVE values while the + // corresponding operation will be started if the user starts dragging the + // mouse from the current position + CursorMode m_cursorMode; + + + //Column positions + wxArrayInt m_colAt; + + bool m_canDragRowSize; + bool m_canDragColSize; + bool m_canDragColMove; + bool m_canDragGridSize; + bool m_canDragCell; + + // the last position (horizontal or vertical depending on whether the user + // is resizing a column or a row) where a row or column separator line was + // dragged by the user or -1 of there is no drag operation in progress + int m_dragLastPos; + int m_dragRowOrCol; + + // true if a drag operation is in progress; when this is true, + // m_startDragPos is valid, i.e. not wxDefaultPosition + bool m_isDragging; + + // the position (in physical coordinates) where the user started dragging + // the mouse or wxDefaultPosition if mouse isn't being dragged + // + // notice that this can be != wxDefaultPosition while m_isDragging is still + // false because we wait until the mouse is moved some distance away before + // setting m_isDragging to true + wxPoint m_startDragPos; + + bool m_waitForSlowClick; + + wxGridCellCoords m_selectionStart; + + wxCursor m_rowResizeCursor; + wxCursor m_colResizeCursor; + + bool m_editable; // applies to whole grid + bool m_cellEditCtrlEnabled; // is in-place edit currently shown? + + TabBehaviour m_tabBehaviour; // determines how the TAB key behaves + + void Init(); // common part of all ctors + void Create(); + void CreateColumnWindow(); + void CalcDimensions(); + void CalcWindowSizes(); + bool Redimension( wxGridTableMessage& ); + + + // generate the appropriate grid event and return -1 if it was vetoed, 1 if + // it was processed (but not vetoed) and 0 if it wasn't processed + int SendEvent(const wxEventType evtType, + int row, int col, + const wxMouseEvent& e); + int SendEvent(const wxEventType evtType, + const wxGridCellCoords& coords, + const wxMouseEvent& e) + { return SendEvent(evtType, coords.GetRow(), coords.GetCol(), e); } + int SendEvent(const wxEventType evtType, + int row, int col, + const wxString& s = wxString()); + int SendEvent(const wxEventType evtType, + const wxGridCellCoords& coords, + const wxString& s = wxString()) + { return SendEvent(evtType, coords.GetRow(), coords.GetCol(), s); } + int SendEvent(const wxEventType evtType, const wxString& s = wxString()) + { return SendEvent(evtType, m_currentCellCoords, s); } + + // send wxEVT_GRID_{ROW,COL}_SIZE or wxEVT_GRID_COL_AUTO_SIZE, return true + // if the event was processed, false otherwise + bool SendGridSizeEvent(wxEventType type, + int row, int col, + const wxMouseEvent& mouseEv); + + void OnPaint( wxPaintEvent& ); + void OnSize( wxSizeEvent& ); + void OnKeyDown( wxKeyEvent& ); + void OnKeyUp( wxKeyEvent& ); + void OnChar( wxKeyEvent& ); + void OnEraseBackground( wxEraseEvent& ); + void OnHideEditor( wxCommandEvent& ); + + + bool SetCurrentCell( const wxGridCellCoords& coords ); + bool SetCurrentCell( int row, int col ) + { return SetCurrentCell( wxGridCellCoords(row, col) ); } + + + // this function is called to extend the block being currently selected + // from mouse and keyboard event handlers + void UpdateBlockBeingSelected(int topRow, int leftCol, + int bottomRow, int rightCol); + + void UpdateBlockBeingSelected(const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight) + { UpdateBlockBeingSelected(topLeft.GetRow(), topLeft.GetCol(), + bottomRight.GetRow(), bottomRight.GetCol()); } + + // ------ functions to get/send data (see also public functions) + // + bool GetModelValues(); + bool SetModelValues(); + + friend class WXDLLIMPEXP_FWD_ADV wxGridSelection; + friend class wxGridRowOperations; + friend class wxGridColumnOperations; + + // they call our private Process{{Corner,Col,Row}Label,GridCell}MouseEvent() + friend class wxGridCornerLabelWindow; + friend class wxGridColLabelWindow; + friend class wxGridRowLabelWindow; + friend class wxGridWindow; + friend class wxGridHeaderRenderer; + + friend class wxGridHeaderCtrl; + +private: + + // implement wxScrolledWindow method to return m_gridWin size + virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size); + + // redraw the grid lines, should be called after changing their attributes + void RedrawGridLines(); + + // draw all grid lines in the given cell region (unlike the public + // DrawAllGridLines() which just draws all of them) + void DrawRangeGridLines(wxDC& dc, const wxRegion& reg, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight); + + // draw all lines from top to bottom row and left to right column in the + // rectangle determined by (top, left)-(bottom, right) -- but notice that + // the caller must have set up the clipping correctly, this rectangle is + // only used here for optimization + void DoDrawGridLines(wxDC& dc, + int top, int left, + int bottom, int right, + int topRow, int leftCol, + int bottomRight, int rightCol); + + // common part of Clip{Horz,Vert}GridLines + void DoClipGridLines(bool& var, bool clip); + + // update the sorting indicator shown in the specified column (whose index + // must be valid) + // + // this will use GetSortingColumn() and IsSortOrderAscending() to determine + // the sorting indicator to effectively show + void UpdateColumnSortingIndicator(int col); + + // update the grid after changing the columns order (common part of + // SetColPos() and ResetColPos()) + void RefreshAfterColPosChange(); + + + // return the position (not index) of the column at the given logical pixel + // position + // + // this always returns a valid position, even if the coordinate is out of + // bounds (in which case first/last column is returned) + int XToPos(int x) const; + + + // event handlers and their helpers + // -------------------------------- + + // process mouse drag event in WXGRID_CURSOR_SELECT_CELL mode + bool DoGridCellDrag(wxMouseEvent& event, + const wxGridCellCoords& coords, + bool isFirstDrag); + + // process row/column resizing drag event + void DoGridLineDrag(wxMouseEvent& event, const wxGridOperations& oper); + + // process mouse drag event in the grid window + void DoGridDragEvent(wxMouseEvent& event, const wxGridCellCoords& coords); + + // process different clicks on grid cells + void DoGridCellLeftDown(wxMouseEvent& event, + const wxGridCellCoords& coords, + const wxPoint& pos); + void DoGridCellLeftDClick(wxMouseEvent& event, + const wxGridCellCoords& coords, + const wxPoint& pos); + void DoGridCellLeftUp(wxMouseEvent& event, const wxGridCellCoords& coords); + + // process movement (but not dragging) event in the grid cell area + void DoGridMouseMoveEvent(wxMouseEvent& event, + const wxGridCellCoords& coords, + const wxPoint& pos); + + // process mouse events in the grid window + void ProcessGridCellMouseEvent(wxMouseEvent& event); + + // process mouse events in the row/column labels/corner windows + void ProcessRowLabelMouseEvent(wxMouseEvent& event); + void ProcessColLabelMouseEvent(wxMouseEvent& event); + void ProcessCornerLabelMouseEvent(wxMouseEvent& event); + + void DoColHeaderClick(int col); + + void DoStartResizeCol(int col); + void DoUpdateResizeCol(int x); + void DoUpdateResizeColWidth(int w); + void DoStartMoveCol(int col); + + void DoEndDragResizeRow(const wxMouseEvent& event); + void DoEndDragResizeCol(const wxMouseEvent& event); + void DoEndMoveCol(int pos); + + // process a TAB keypress + void DoGridProcessTab(wxKeyboardState& kbdState); + + // common implementations of methods defined for both rows and columns + void DeselectLine(int line, const wxGridOperations& oper); + bool DoEndDragResizeLine(const wxGridOperations& oper); + int PosToLinePos(int pos, bool clipToMinMax, + const wxGridOperations& oper) const; + int PosToLine(int pos, bool clipToMinMax, + const wxGridOperations& oper) const; + int PosToEdgeOfLine(int pos, const wxGridOperations& oper) const; + + bool DoMoveCursor(bool expandSelection, + const wxGridDirectionOperations& diroper); + bool DoMoveCursorByPage(const wxGridDirectionOperations& diroper); + bool DoMoveCursorByBlock(bool expandSelection, + const wxGridDirectionOperations& diroper); + void AdvanceToNextNonEmpty(wxGridCellCoords& coords, + const wxGridDirectionOperations& diroper); + + // common part of {Insert,Delete}{Rows,Cols} + bool DoModifyLines(bool (wxGridTableBase::*funcModify)(size_t, size_t), + int pos, int num, bool updateLabels); + // Append{Rows,Cols} is a bit different because of one less parameter + bool DoAppendLines(bool (wxGridTableBase::*funcAppend)(size_t), + int num, bool updateLabels); + + // common part of Set{Col,Row}Sizes + void DoSetSizes(const wxGridSizesInfo& sizeInfo, + const wxGridOperations& oper); + + // common part of Disable{Row,Col}Resize and CanDrag{Row,Col}Size + void DoDisableLineResize(int line, wxGridFixedIndicesSet *& setFixed); + bool DoCanResizeLine(int line, const wxGridFixedIndicesSet *setFixed) const; + + // Helper of Render(): get grid size, origin offset and fill cell arrays + void GetRenderSizes( const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + wxPoint& pointOffSet, wxSize& sizeGrid, + wxGridCellCoordsArray& renderCells, + wxArrayInt& arrayCols, wxArrayInt& arrayRows ); + + // Helper of Render(): set the scale to draw the cells at the right size. + void SetRenderScale( wxDC& dc, const wxPoint& pos, const wxSize& size, + const wxSize& sizeGrid ); + + // Helper of Render(): get render start position from passed parameter + wxPoint GetRenderPosition( wxDC& dc, const wxPoint& position ); + + // Helper of Render(): draws a box around the rendered area + void DoRenderBox( wxDC& dc, const int& style, + const wxPoint& pointOffSet, + const wxSize& sizeCellArea, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight ); + + // Implementation of public Set{Row,Col}Size() and {Hide,Show}{Row,Col}(). + // They interpret their height or width parameter slightly different from + // the public methods where -1 in it means "auto fit to the label" for the + // compatibility reasons. Here it means "show a previously hidden row or + // column" while 0 means "hide it" just as in the public methods. And any + // positive values are handled naturally, i.e. they just specify the size. + void DoSetRowSize( int row, int height ); + void DoSetColSize( int col, int width ); + + + // these sets contain the indices of fixed, i.e. non-resizable + // interactively, grid rows or columns and are NULL if there are no fixed + // elements (which is the default) + wxGridFixedIndicesSet *m_setFixedRows, + *m_setFixedCols; + + DECLARE_DYNAMIC_CLASS( wxGrid ) + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxGrid); +}; + +// ---------------------------------------------------------------------------- +// wxGridUpdateLocker prevents updates to a grid during its lifetime +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGridUpdateLocker +{ +public: + // if the pointer is NULL, Create() can be called later + wxGridUpdateLocker(wxGrid *grid = NULL) + { + Init(grid); + } + + // can be called if ctor was used with a NULL pointer, must not be called + // more than once + void Create(wxGrid *grid) + { + wxASSERT_MSG( !m_grid, wxT("shouldn't be called more than once") ); + + Init(grid); + } + + ~wxGridUpdateLocker() + { + if ( m_grid ) + m_grid->EndBatch(); + } + +private: + void Init(wxGrid *grid) + { + m_grid = grid; + if ( m_grid ) + m_grid->BeginBatch(); + } + + wxGrid *m_grid; + + wxDECLARE_NO_COPY_CLASS(wxGridUpdateLocker); +}; + +// ---------------------------------------------------------------------------- +// Grid event class and event types +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGridEvent : public wxNotifyEvent, + public wxKeyboardState +{ +public: + wxGridEvent() + : wxNotifyEvent() + { + Init(-1, -1, -1, -1, false); + } + + wxGridEvent(int id, + wxEventType type, + wxObject* obj, + int row = -1, int col = -1, + int x = -1, int y = -1, + bool sel = true, + const wxKeyboardState& kbd = wxKeyboardState()) + : wxNotifyEvent(type, id), + wxKeyboardState(kbd) + { + Init(row, col, x, y, sel); + SetEventObject(obj); + } + + // explicitly specifying inline allows gcc < 3.4 to + // handle the deprecation attribute even in the constructor. + wxDEPRECATED_CONSTRUCTOR( + wxGridEvent(int id, + wxEventType type, + wxObject* obj, + int row, int col, + int x, int y, + bool sel, + bool control, + bool shift = false, bool alt = false, bool meta = false)); + + virtual int GetRow() { return m_row; } + virtual int GetCol() { return m_col; } + wxPoint GetPosition() { return wxPoint( m_x, m_y ); } + bool Selecting() { return m_selecting; } + + virtual wxEvent *Clone() const { return new wxGridEvent(*this); } + +protected: + int m_row; + int m_col; + int m_x; + int m_y; + bool m_selecting; + +private: + void Init(int row, int col, int x, int y, bool sel) + { + m_row = row; + m_col = col; + m_x = x; + m_y = y; + m_selecting = sel; + } + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridEvent) +}; + +class WXDLLIMPEXP_ADV wxGridSizeEvent : public wxNotifyEvent, + public wxKeyboardState +{ +public: + wxGridSizeEvent() + : wxNotifyEvent() + { + Init(-1, -1, -1); + } + + wxGridSizeEvent(int id, + wxEventType type, + wxObject* obj, + int rowOrCol = -1, + int x = -1, int y = -1, + const wxKeyboardState& kbd = wxKeyboardState()) + : wxNotifyEvent(type, id), + wxKeyboardState(kbd) + { + Init(rowOrCol, x, y); + + SetEventObject(obj); + } + + wxDEPRECATED_CONSTRUCTOR( + wxGridSizeEvent(int id, + wxEventType type, + wxObject* obj, + int rowOrCol, + int x, int y, + bool control, + bool shift = false, + bool alt = false, + bool meta = false) ); + + int GetRowOrCol() { return m_rowOrCol; } + wxPoint GetPosition() { return wxPoint( m_x, m_y ); } + + virtual wxEvent *Clone() const { return new wxGridSizeEvent(*this); } + +protected: + int m_rowOrCol; + int m_x; + int m_y; + +private: + void Init(int rowOrCol, int x, int y) + { + m_rowOrCol = rowOrCol; + m_x = x; + m_y = y; + } + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridSizeEvent) +}; + + +class WXDLLIMPEXP_ADV wxGridRangeSelectEvent : public wxNotifyEvent, + public wxKeyboardState +{ +public: + wxGridRangeSelectEvent() + : wxNotifyEvent() + { + Init(wxGridNoCellCoords, wxGridNoCellCoords, false); + } + + wxGridRangeSelectEvent(int id, + wxEventType type, + wxObject* obj, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + bool sel = true, + const wxKeyboardState& kbd = wxKeyboardState()) + : wxNotifyEvent(type, id), + wxKeyboardState(kbd) + { + Init(topLeft, bottomRight, sel); + + SetEventObject(obj); + } + + wxDEPRECATED_CONSTRUCTOR( + wxGridRangeSelectEvent(int id, + wxEventType type, + wxObject* obj, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + bool sel, + bool control, + bool shift = false, + bool alt = false, + bool meta = false) ); + + wxGridCellCoords GetTopLeftCoords() { return m_topLeft; } + wxGridCellCoords GetBottomRightCoords() { return m_bottomRight; } + int GetTopRow() { return m_topLeft.GetRow(); } + int GetBottomRow() { return m_bottomRight.GetRow(); } + int GetLeftCol() { return m_topLeft.GetCol(); } + int GetRightCol() { return m_bottomRight.GetCol(); } + bool Selecting() { return m_selecting; } + + virtual wxEvent *Clone() const { return new wxGridRangeSelectEvent(*this); } + +protected: + void Init(const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + bool selecting) + { + m_topLeft = topLeft; + m_bottomRight = bottomRight; + m_selecting = selecting; + } + + wxGridCellCoords m_topLeft; + wxGridCellCoords m_bottomRight; + bool m_selecting; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridRangeSelectEvent) +}; + + +class WXDLLIMPEXP_ADV wxGridEditorCreatedEvent : public wxCommandEvent +{ +public: + wxGridEditorCreatedEvent() + : wxCommandEvent() + { + m_row = 0; + m_col = 0; + m_ctrl = NULL; + } + + wxGridEditorCreatedEvent(int id, wxEventType type, wxObject* obj, + int row, int col, wxControl* ctrl); + + int GetRow() { return m_row; } + int GetCol() { return m_col; } + wxControl* GetControl() { return m_ctrl; } + void SetRow(int row) { m_row = row; } + void SetCol(int col) { m_col = col; } + void SetControl(wxControl* ctrl) { m_ctrl = ctrl; } + + virtual wxEvent *Clone() const { return new wxGridEditorCreatedEvent(*this); } + +private: + int m_row; + int m_col; + wxControl* m_ctrl; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxGridEditorCreatedEvent) +}; + + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_LEFT_CLICK, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_RIGHT_DCLICK, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_LABEL_LEFT_DCLICK, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_LABEL_RIGHT_DCLICK, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_ROW_SIZE, wxGridSizeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_COL_SIZE, wxGridSizeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_COL_AUTO_SIZE, wxGridSizeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_CHANGING, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_CHANGED, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_SELECT_CELL, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_EDITOR_SHOWN, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_EDITOR_HIDDEN, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_EDITOR_CREATED, wxGridEditorCreatedEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_BEGIN_DRAG, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_COL_MOVE, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_COL_SORT, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_TABBING, wxGridEvent ); + +typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&); +typedef void (wxEvtHandler::*wxGridSizeEventFunction)(wxGridSizeEvent&); +typedef void (wxEvtHandler::*wxGridRangeSelectEventFunction)(wxGridRangeSelectEvent&); +typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreatedEvent&); + +#define wxGridEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxGridEventFunction, func) + +#define wxGridSizeEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxGridSizeEventFunction, func) + +#define wxGridRangeSelectEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxGridRangeSelectEventFunction, func) + +#define wxGridEditorCreatedEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxGridEditorCreatedEventFunction, func) + +#define wx__DECLARE_GRIDEVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridEventHandler(fn)) + +#define wx__DECLARE_GRIDSIZEEVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridSizeEventHandler(fn)) + +#define wx__DECLARE_GRIDRANGESELEVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridRangeSelectEventHandler(fn)) + +#define wx__DECLARE_GRIDEDITOREVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_GRID_ ## evt, id, wxGridEditorCreatedEventHandler(fn)) + +#define EVT_GRID_CMD_CELL_LEFT_CLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_LEFT_CLICK, id, fn) +#define EVT_GRID_CMD_CELL_RIGHT_CLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_RIGHT_CLICK, id, fn) +#define EVT_GRID_CMD_CELL_LEFT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_LEFT_DCLICK, id, fn) +#define EVT_GRID_CMD_CELL_RIGHT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(CELL_RIGHT_DCLICK, id, fn) +#define EVT_GRID_CMD_LABEL_LEFT_CLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_LEFT_CLICK, id, fn) +#define EVT_GRID_CMD_LABEL_RIGHT_CLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_RIGHT_CLICK, id, fn) +#define EVT_GRID_CMD_LABEL_LEFT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_LEFT_DCLICK, id, fn) +#define EVT_GRID_CMD_LABEL_RIGHT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_RIGHT_DCLICK, id, fn) +#define EVT_GRID_CMD_ROW_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(ROW_SIZE, id, fn) +#define EVT_GRID_CMD_COL_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(COL_SIZE, id, fn) +#define EVT_GRID_CMD_COL_AUTO_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(COL_AUTO_SIZE, id, fn) +#define EVT_GRID_CMD_COL_MOVE(id, fn) wx__DECLARE_GRIDEVT(COL_MOVE, id, fn) +#define EVT_GRID_CMD_COL_SORT(id, fn) wx__DECLARE_GRIDEVT(COL_SORT, id, fn) +#define EVT_GRID_CMD_RANGE_SELECT(id, fn) wx__DECLARE_GRIDRANGESELEVT(RANGE_SELECT, id, fn) +#define EVT_GRID_CMD_CELL_CHANGING(id, fn) wx__DECLARE_GRIDEVT(CELL_CHANGING, id, fn) +#define EVT_GRID_CMD_CELL_CHANGED(id, fn) wx__DECLARE_GRIDEVT(CELL_CHANGED, id, fn) +#define EVT_GRID_CMD_SELECT_CELL(id, fn) wx__DECLARE_GRIDEVT(SELECT_CELL, id, fn) +#define EVT_GRID_CMD_EDITOR_SHOWN(id, fn) wx__DECLARE_GRIDEVT(EDITOR_SHOWN, id, fn) +#define EVT_GRID_CMD_EDITOR_HIDDEN(id, fn) wx__DECLARE_GRIDEVT(EDITOR_HIDDEN, id, fn) +#define EVT_GRID_CMD_EDITOR_CREATED(id, fn) wx__DECLARE_GRIDEDITOREVT(EDITOR_CREATED, id, fn) +#define EVT_GRID_CMD_CELL_BEGIN_DRAG(id, fn) wx__DECLARE_GRIDEVT(CELL_BEGIN_DRAG, id, fn) +#define EVT_GRID_CMD_TABBING(id, fn) wx__DECLARE_GRIDEVT(TABBING, id, fn) + +// same as above but for any id (exists mainly for backwards compatibility but +// then it's also true that you rarely have multiple grid in the same window) +#define EVT_GRID_CELL_LEFT_CLICK(fn) EVT_GRID_CMD_CELL_LEFT_CLICK(wxID_ANY, fn) +#define EVT_GRID_CELL_RIGHT_CLICK(fn) EVT_GRID_CMD_CELL_RIGHT_CLICK(wxID_ANY, fn) +#define EVT_GRID_CELL_LEFT_DCLICK(fn) EVT_GRID_CMD_CELL_LEFT_DCLICK(wxID_ANY, fn) +#define EVT_GRID_CELL_RIGHT_DCLICK(fn) EVT_GRID_CMD_CELL_RIGHT_DCLICK(wxID_ANY, fn) +#define EVT_GRID_LABEL_LEFT_CLICK(fn) EVT_GRID_CMD_LABEL_LEFT_CLICK(wxID_ANY, fn) +#define EVT_GRID_LABEL_RIGHT_CLICK(fn) EVT_GRID_CMD_LABEL_RIGHT_CLICK(wxID_ANY, fn) +#define EVT_GRID_LABEL_LEFT_DCLICK(fn) EVT_GRID_CMD_LABEL_LEFT_DCLICK(wxID_ANY, fn) +#define EVT_GRID_LABEL_RIGHT_DCLICK(fn) EVT_GRID_CMD_LABEL_RIGHT_DCLICK(wxID_ANY, fn) +#define EVT_GRID_ROW_SIZE(fn) EVT_GRID_CMD_ROW_SIZE(wxID_ANY, fn) +#define EVT_GRID_COL_SIZE(fn) EVT_GRID_CMD_COL_SIZE(wxID_ANY, fn) +#define EVT_GRID_COL_AUTO_SIZE(fn) EVT_GRID_CMD_COL_AUTO_SIZE(wxID_ANY, fn) +#define EVT_GRID_COL_MOVE(fn) EVT_GRID_CMD_COL_MOVE(wxID_ANY, fn) +#define EVT_GRID_COL_SORT(fn) EVT_GRID_CMD_COL_SORT(wxID_ANY, fn) +#define EVT_GRID_RANGE_SELECT(fn) EVT_GRID_CMD_RANGE_SELECT(wxID_ANY, fn) +#define EVT_GRID_CELL_CHANGING(fn) EVT_GRID_CMD_CELL_CHANGING(wxID_ANY, fn) +#define EVT_GRID_CELL_CHANGED(fn) EVT_GRID_CMD_CELL_CHANGED(wxID_ANY, fn) +#define EVT_GRID_SELECT_CELL(fn) EVT_GRID_CMD_SELECT_CELL(wxID_ANY, fn) +#define EVT_GRID_EDITOR_SHOWN(fn) EVT_GRID_CMD_EDITOR_SHOWN(wxID_ANY, fn) +#define EVT_GRID_EDITOR_HIDDEN(fn) EVT_GRID_CMD_EDITOR_HIDDEN(wxID_ANY, fn) +#define EVT_GRID_EDITOR_CREATED(fn) EVT_GRID_CMD_EDITOR_CREATED(wxID_ANY, fn) +#define EVT_GRID_CELL_BEGIN_DRAG(fn) EVT_GRID_CMD_CELL_BEGIN_DRAG(wxID_ANY, fn) +#define EVT_GRID_TABBING(fn) EVT_GRID_CMD_TABBING(wxID_ANY, fn) + +// we used to have a single wxEVT_GRID_CELL_CHANGE event but it was split into +// wxEVT_GRID_CELL_CHANGING and CHANGED ones in wx 2.9.0, however the CHANGED +// is basically the same as the old CHANGE event so we keep the name for +// compatibility +#if WXWIN_COMPATIBILITY_2_8 + #define wxEVT_GRID_CELL_CHANGE wxEVT_GRID_CELL_CHANGED + + #define EVT_GRID_CMD_CELL_CHANGE EVT_GRID_CMD_CELL_CHANGED + #define EVT_GRID_CELL_CHANGE EVT_GRID_CELL_CHANGED +#endif // WXWIN_COMPATIBILITY_2_8 + +#if 0 // TODO: implement these ? others ? + +extern const int wxEVT_GRID_CREATE_CELL; +extern const int wxEVT_GRID_CHANGE_LABELS; +extern const int wxEVT_GRID_CHANGE_SEL_LABEL; + +#define EVT_GRID_CREATE_CELL(fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CREATE_CELL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ), +#define EVT_GRID_CHANGE_LABELS(fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_LABELS, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ), +#define EVT_GRID_CHANGE_SEL_LABEL(fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_GRID_CHANGE_SEL_LABEL, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxGridEventFunction, &fn ), NULL ), + +#endif + +#endif // wxUSE_GRID +#endif // _WX_GENERIC_GRID_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/gridctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/gridctrl.h new file mode 100644 index 0000000000..efcb233c8d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/gridctrl.h @@ -0,0 +1,276 @@ +/////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/gridctrl.h +// Purpose: wxGrid controls +// Author: Paul Gammans, Roger Gammans +// Modified by: +// Created: 11/04/2001 +// Copyright: (c) The Computer Surgery (paul@compsurg.co.uk) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_GRIDCTRL_H_ +#define _WX_GENERIC_GRIDCTRL_H_ + +#include "wx/grid.h" + +#if wxUSE_GRID + +#define wxGRID_VALUE_CHOICEINT wxT("choiceint") +#define wxGRID_VALUE_DATETIME wxT("datetime") + + +// the default renderer for the cells containing string data +class WXDLLIMPEXP_ADV wxGridCellStringRenderer : public wxGridCellRenderer +{ +public: + // draw the string + virtual void Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int row, int col, + bool isSelected); + + // return the string extent + virtual wxSize GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col); + + virtual wxGridCellRenderer *Clone() const + { return new wxGridCellStringRenderer; } + +protected: + // set the text colours before drawing + void SetTextColoursAndFont(const wxGrid& grid, + const wxGridCellAttr& attr, + wxDC& dc, + bool isSelected); + + // calc the string extent for given string/font + wxSize DoGetBestSize(const wxGridCellAttr& attr, + wxDC& dc, + const wxString& text); +}; + +// the default renderer for the cells containing numeric (long) data +class WXDLLIMPEXP_ADV wxGridCellNumberRenderer : public wxGridCellStringRenderer +{ +public: + // draw the string right aligned + virtual void Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int row, int col, + bool isSelected); + + virtual wxSize GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col); + + virtual wxGridCellRenderer *Clone() const + { return new wxGridCellNumberRenderer; } + +protected: + wxString GetString(const wxGrid& grid, int row, int col); +}; + +class WXDLLIMPEXP_ADV wxGridCellFloatRenderer : public wxGridCellStringRenderer +{ +public: + wxGridCellFloatRenderer(int width = -1, + int precision = -1, + int format = wxGRID_FLOAT_FORMAT_DEFAULT); + + // get/change formatting parameters + int GetWidth() const { return m_width; } + void SetWidth(int width) { m_width = width; m_format.clear(); } + int GetPrecision() const { return m_precision; } + void SetPrecision(int precision) { m_precision = precision; m_format.clear(); } + int GetFormat() const { return m_style; } + void SetFormat(int format) { m_style = format; m_format.clear(); } + + // draw the string right aligned with given width/precision + virtual void Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int row, int col, + bool isSelected); + + virtual wxSize GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col); + + // parameters string format is "width[,precision[,format]]" + // with format being one of f|e|g|E|F|G + virtual void SetParameters(const wxString& params); + + virtual wxGridCellRenderer *Clone() const; + +protected: + wxString GetString(const wxGrid& grid, int row, int col); + +private: + // formatting parameters + int m_width, + m_precision; + + int m_style; + wxString m_format; +}; + +// renderer for boolean fields +class WXDLLIMPEXP_ADV wxGridCellBoolRenderer : public wxGridCellRenderer +{ +public: + // draw a check mark or nothing + virtual void Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int row, int col, + bool isSelected); + + // return the checkmark size + virtual wxSize GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col); + + virtual wxGridCellRenderer *Clone() const + { return new wxGridCellBoolRenderer; } + +private: + static wxSize ms_sizeCheckMark; +}; + + +#if wxUSE_DATETIME + +#include "wx/datetime.h" + +// the default renderer for the cells containing times and dates +class WXDLLIMPEXP_ADV wxGridCellDateTimeRenderer : public wxGridCellStringRenderer +{ +public: + wxGridCellDateTimeRenderer(const wxString& outformat = wxDefaultDateTimeFormat, + const wxString& informat = wxDefaultDateTimeFormat); + + // draw the string right aligned + virtual void Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int row, int col, + bool isSelected); + + virtual wxSize GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col); + + virtual wxGridCellRenderer *Clone() const; + + // output strptime()-like format string + virtual void SetParameters(const wxString& params); + +protected: + wxString GetString(const wxGrid& grid, int row, int col); + + wxString m_iformat; + wxString m_oformat; + wxDateTime m_dateDef; + wxDateTime::TimeZone m_tz; +}; + +#endif // wxUSE_DATETIME + +// renders a number using the corresponding text string +class WXDLLIMPEXP_ADV wxGridCellEnumRenderer : public wxGridCellStringRenderer +{ +public: + wxGridCellEnumRenderer( const wxString& choices = wxEmptyString ); + + // draw the string right aligned + virtual void Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int row, int col, + bool isSelected); + + virtual wxSize GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col); + + virtual wxGridCellRenderer *Clone() const; + + // parameters string format is "item1[,item2[...,itemN]]" where itemN will + // be used if the cell value is N-1 + virtual void SetParameters(const wxString& params); + +protected: + wxString GetString(const wxGrid& grid, int row, int col); + + wxArrayString m_choices; +}; + + +class WXDLLIMPEXP_ADV wxGridCellAutoWrapStringRenderer : public wxGridCellStringRenderer +{ +public: + wxGridCellAutoWrapStringRenderer() : wxGridCellStringRenderer() { } + + virtual void Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int row, int col, + bool isSelected); + + virtual wxSize GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col); + + virtual wxGridCellRenderer *Clone() const + { return new wxGridCellAutoWrapStringRenderer; } + +private: + wxArrayString GetTextLines( wxGrid& grid, + wxDC& dc, + const wxGridCellAttr& attr, + const wxRect& rect, + int row, int col); + + // Helper methods of GetTextLines() + + // Break a single logical line of text into several physical lines, all of + // which are added to the lines array. The lines are broken at maxWidth and + // the dc is used for measuring text extent only. + void BreakLine(wxDC& dc, + const wxString& logicalLine, + wxCoord maxWidth, + wxArrayString& lines); + + // Break a word, which is supposed to be wider than maxWidth, into several + // lines, which are added to lines array and the last, incomplete, of which + // is returned in line output parameter. + // + // Returns the width of the last line. + wxCoord BreakWord(wxDC& dc, + const wxString& word, + wxCoord maxWidth, + wxArrayString& lines, + wxString& line); + + +}; + +#endif // wxUSE_GRID +#endif // _WX_GENERIC_GRIDCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/grideditors.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/grideditors.h new file mode 100644 index 0000000000..b5986e4222 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/grideditors.h @@ -0,0 +1,378 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/grideditors.h +// Purpose: wxGridCellEditorEvtHandler and wxGrid editors +// Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) +// Modified by: Santiago Palacios +// Created: 1/08/1999 +// Copyright: (c) Michael Bedward +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_GRID_EDITORS_H_ +#define _WX_GENERIC_GRID_EDITORS_H_ + +#include "wx/defs.h" + +#if wxUSE_GRID + +#include "wx/scopedptr.h" + +class wxGridCellEditorEvtHandler : public wxEvtHandler +{ +public: + wxGridCellEditorEvtHandler(wxGrid* grid, wxGridCellEditor* editor) + : m_grid(grid), + m_editor(editor), + m_inSetFocus(false) + { + } + + void OnKillFocus(wxFocusEvent& event); + void OnKeyDown(wxKeyEvent& event); + void OnChar(wxKeyEvent& event); + + void SetInSetFocus(bool inSetFocus) { m_inSetFocus = inSetFocus; } + +private: + wxGrid *m_grid; + wxGridCellEditor *m_editor; + + // Work around the fact that a focus kill event can be sent to + // a combobox within a set focus event. + bool m_inSetFocus; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGridCellEditorEvtHandler) + wxDECLARE_NO_COPY_CLASS(wxGridCellEditorEvtHandler); +}; + + +#if wxUSE_TEXTCTRL + +// the editor for string/text data +class WXDLLIMPEXP_ADV wxGridCellTextEditor : public wxGridCellEditor +{ +public: + wxEXPLICIT wxGridCellTextEditor(size_t maxChars = 0); + + virtual void Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler); + virtual void SetSize(const wxRect& rect); + + virtual void PaintBackground(wxDC& dc, + const wxRect& rectCell, + const wxGridCellAttr& attr); + + virtual bool IsAcceptedKey(wxKeyEvent& event); + virtual void BeginEdit(int row, int col, wxGrid* grid); + virtual bool EndEdit(int row, int col, const wxGrid* grid, + const wxString& oldval, wxString *newval); + virtual void ApplyEdit(int row, int col, wxGrid* grid); + + virtual void Reset(); + virtual void StartingKey(wxKeyEvent& event); + virtual void HandleReturn(wxKeyEvent& event); + + // parameters string format is "max_width" + virtual void SetParameters(const wxString& params); +#if wxUSE_VALIDATORS + virtual void SetValidator(const wxValidator& validator); +#endif + + virtual wxGridCellEditor *Clone() const; + + // added GetValue so we can get the value which is in the control + virtual wxString GetValue() const; + +protected: + wxTextCtrl *Text() const { return (wxTextCtrl *)m_control; } + + // parts of our virtual functions reused by the derived classes + void DoCreate(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler, + long style = 0); + void DoBeginEdit(const wxString& startValue); + void DoReset(const wxString& startValue); + +private: + size_t m_maxChars; // max number of chars allowed +#if wxUSE_VALIDATORS + wxScopedPtr m_validator; +#endif + wxString m_value; + + wxDECLARE_NO_COPY_CLASS(wxGridCellTextEditor); +}; + +// the editor for numeric (long) data +class WXDLLIMPEXP_ADV wxGridCellNumberEditor : public wxGridCellTextEditor +{ +public: + // allows to specify the range - if min == max == -1, no range checking is + // done + wxGridCellNumberEditor(int min = -1, int max = -1); + + virtual void Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler); + + virtual bool IsAcceptedKey(wxKeyEvent& event); + virtual void BeginEdit(int row, int col, wxGrid* grid); + virtual bool EndEdit(int row, int col, const wxGrid* grid, + const wxString& oldval, wxString *newval); + virtual void ApplyEdit(int row, int col, wxGrid* grid); + + virtual void Reset(); + virtual void StartingKey(wxKeyEvent& event); + + // parameters string format is "min,max" + virtual void SetParameters(const wxString& params); + + virtual wxGridCellEditor *Clone() const + { return new wxGridCellNumberEditor(m_min, m_max); } + + // added GetValue so we can get the value which is in the control + virtual wxString GetValue() const; + +protected: +#if wxUSE_SPINCTRL + wxSpinCtrl *Spin() const { return (wxSpinCtrl *)m_control; } +#endif + + // if HasRange(), we use wxSpinCtrl - otherwise wxTextCtrl + bool HasRange() const + { +#if wxUSE_SPINCTRL + return m_min != m_max; +#else + return false; +#endif + } + + // string representation of our value + wxString GetString() const + { return wxString::Format(wxT("%ld"), m_value); } + +private: + int m_min, + m_max; + + long m_value; + + wxDECLARE_NO_COPY_CLASS(wxGridCellNumberEditor); +}; + + +enum wxGridCellFloatFormat +{ + // Decimal floating point (%f) + wxGRID_FLOAT_FORMAT_FIXED = 0x0010, + + // Scientific notation (mantise/exponent) using e character (%e) + wxGRID_FLOAT_FORMAT_SCIENTIFIC = 0x0020, + + // Use the shorter of %e or %f (%g) + wxGRID_FLOAT_FORMAT_COMPACT = 0x0040, + + // To use in combination with one of the above formats (%F/%E/%G) + wxGRID_FLOAT_FORMAT_UPPER = 0x0080, + + // Format used by default. + wxGRID_FLOAT_FORMAT_DEFAULT = wxGRID_FLOAT_FORMAT_FIXED, + + // A mask to extract format from the combination of flags. + wxGRID_FLOAT_FORMAT_MASK = wxGRID_FLOAT_FORMAT_FIXED | + wxGRID_FLOAT_FORMAT_SCIENTIFIC | + wxGRID_FLOAT_FORMAT_COMPACT | + wxGRID_FLOAT_FORMAT_UPPER +}; + +// the editor for floating point numbers (double) data +class WXDLLIMPEXP_ADV wxGridCellFloatEditor : public wxGridCellTextEditor +{ +public: + wxGridCellFloatEditor(int width = -1, + int precision = -1, + int format = wxGRID_FLOAT_FORMAT_DEFAULT); + + virtual void Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler); + + virtual bool IsAcceptedKey(wxKeyEvent& event); + virtual void BeginEdit(int row, int col, wxGrid* grid); + virtual bool EndEdit(int row, int col, const wxGrid* grid, + const wxString& oldval, wxString *newval); + virtual void ApplyEdit(int row, int col, wxGrid* grid); + + virtual void Reset(); + virtual void StartingKey(wxKeyEvent& event); + + virtual wxGridCellEditor *Clone() const + { return new wxGridCellFloatEditor(m_width, m_precision); } + + // parameters string format is "width[,precision[,format]]" + // format to choose beween f|e|g|E|G (f is used by default) + virtual void SetParameters(const wxString& params); + +protected: + // string representation of our value + wxString GetString(); + +private: + int m_width, + m_precision; + double m_value; + + int m_style; + wxString m_format; + + wxDECLARE_NO_COPY_CLASS(wxGridCellFloatEditor); +}; + +#endif // wxUSE_TEXTCTRL + +#if wxUSE_CHECKBOX + +// the editor for boolean data +class WXDLLIMPEXP_ADV wxGridCellBoolEditor : public wxGridCellEditor +{ +public: + wxGridCellBoolEditor() { } + + virtual void Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler); + + virtual void SetSize(const wxRect& rect); + virtual void Show(bool show, wxGridCellAttr *attr = NULL); + + virtual bool IsAcceptedKey(wxKeyEvent& event); + virtual void BeginEdit(int row, int col, wxGrid* grid); + virtual bool EndEdit(int row, int col, const wxGrid* grid, + const wxString& oldval, wxString *newval); + virtual void ApplyEdit(int row, int col, wxGrid* grid); + + virtual void Reset(); + virtual void StartingClick(); + virtual void StartingKey(wxKeyEvent& event); + + virtual wxGridCellEditor *Clone() const + { return new wxGridCellBoolEditor; } + + // added GetValue so we can get the value which is in the control, see + // also UseStringValues() + virtual wxString GetValue() const; + + // set the string values returned by GetValue() for the true and false + // states, respectively + static void UseStringValues(const wxString& valueTrue = wxT("1"), + const wxString& valueFalse = wxEmptyString); + + // return true if the given string is equal to the string representation of + // true value which we currently use + static bool IsTrueValue(const wxString& value); + +protected: + wxCheckBox *CBox() const { return (wxCheckBox *)m_control; } + +private: + bool m_value; + + static wxString ms_stringValues[2]; + + wxDECLARE_NO_COPY_CLASS(wxGridCellBoolEditor); +}; + +#endif // wxUSE_CHECKBOX + +#if wxUSE_COMBOBOX + +// the editor for string data allowing to choose from the list of strings +class WXDLLIMPEXP_ADV wxGridCellChoiceEditor : public wxGridCellEditor +{ +public: + // if !allowOthers, user can't type a string not in choices array + wxGridCellChoiceEditor(size_t count = 0, + const wxString choices[] = NULL, + bool allowOthers = false); + wxGridCellChoiceEditor(const wxArrayString& choices, + bool allowOthers = false); + + virtual void Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler); + + virtual void SetSize(const wxRect& rect); + + virtual void PaintBackground(wxDC& dc, + const wxRect& rectCell, + const wxGridCellAttr& attr); + + virtual void BeginEdit(int row, int col, wxGrid* grid); + virtual bool EndEdit(int row, int col, const wxGrid* grid, + const wxString& oldval, wxString *newval); + virtual void ApplyEdit(int row, int col, wxGrid* grid); + + virtual void Reset(); + + // parameters string format is "item1[,item2[...,itemN]]" + virtual void SetParameters(const wxString& params); + + virtual wxGridCellEditor *Clone() const; + + // added GetValue so we can get the value which is in the control + virtual wxString GetValue() const; + +protected: + wxComboBox *Combo() const { return (wxComboBox *)m_control; } + + wxString m_value; + wxArrayString m_choices; + bool m_allowOthers; + + wxDECLARE_NO_COPY_CLASS(wxGridCellChoiceEditor); +}; + +#endif // wxUSE_COMBOBOX + +#if wxUSE_COMBOBOX + +class WXDLLIMPEXP_ADV wxGridCellEnumEditor : public wxGridCellChoiceEditor +{ +public: + wxGridCellEnumEditor( const wxString& choices = wxEmptyString ); + virtual ~wxGridCellEnumEditor() {} + + virtual wxGridCellEditor* Clone() const; + + virtual void BeginEdit(int row, int col, wxGrid* grid); + virtual bool EndEdit(int row, int col, const wxGrid* grid, + const wxString& oldval, wxString *newval); + virtual void ApplyEdit(int row, int col, wxGrid* grid); + +private: + long m_index; + + wxDECLARE_NO_COPY_CLASS(wxGridCellEnumEditor); +}; + +#endif // wxUSE_COMBOBOX + +class WXDLLIMPEXP_ADV wxGridCellAutoWrapStringEditor : public wxGridCellTextEditor +{ +public: + wxGridCellAutoWrapStringEditor() : wxGridCellTextEditor() { } + virtual void Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler); + + virtual wxGridCellEditor *Clone() const + { return new wxGridCellAutoWrapStringEditor; } + + wxDECLARE_NO_COPY_CLASS(wxGridCellAutoWrapStringEditor); +}; + +#endif // wxUSE_GRID + +#endif // _WX_GENERIC_GRID_EDITORS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/gridsel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/gridsel.h new file mode 100644 index 0000000000..76135532c1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/gridsel.h @@ -0,0 +1,115 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/gridsel.h +// Purpose: wxGridSelection +// Author: Stefan Neis +// Modified by: +// Created: 20/02/2000 +// Copyright: (c) Stefan Neis +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_GRIDSEL_H_ +#define _WX_GENERIC_GRIDSEL_H_ + +#include "wx/defs.h" + +#if wxUSE_GRID + +#include "wx/grid.h" + +class WXDLLIMPEXP_ADV wxGridSelection +{ +public: + wxGridSelection(wxGrid *grid, + wxGrid::wxGridSelectionModes sel = wxGrid::wxGridSelectCells); + + bool IsSelection(); + bool IsInSelection(int row, int col); + bool IsInSelection(const wxGridCellCoords& coords) + { + return IsInSelection(coords.GetRow(), coords.GetCol()); + } + + void SetSelectionMode(wxGrid::wxGridSelectionModes selmode); + wxGrid::wxGridSelectionModes GetSelectionMode() { return m_selectionMode; } + void SelectRow(int row, const wxKeyboardState& kbd = wxKeyboardState()); + void SelectCol(int col, const wxKeyboardState& kbd = wxKeyboardState()); + void SelectBlock(int topRow, int leftCol, + int bottomRow, int rightCol, + const wxKeyboardState& kbd = wxKeyboardState(), + bool sendEvent = true ); + void SelectBlock(const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + const wxKeyboardState& kbd = wxKeyboardState(), + bool sendEvent = true ) + { + SelectBlock(topLeft.GetRow(), topLeft.GetCol(), + bottomRight.GetRow(), bottomRight.GetCol(), + kbd, sendEvent); + } + + void SelectCell(int row, int col, + const wxKeyboardState& kbd = wxKeyboardState(), + bool sendEvent = true); + void SelectCell(const wxGridCellCoords& coords, + const wxKeyboardState& kbd = wxKeyboardState(), + bool sendEvent = true) + { + SelectCell(coords.GetRow(), coords.GetCol(), kbd, sendEvent); + } + + void ToggleCellSelection(int row, int col, + const wxKeyboardState& kbd = wxKeyboardState()); + void ToggleCellSelection(const wxGridCellCoords& coords, + const wxKeyboardState& kbd = wxKeyboardState()) + { + ToggleCellSelection(coords.GetRow(), coords.GetCol(), kbd); + } + + void ClearSelection(); + + void UpdateRows( size_t pos, int numRows ); + void UpdateCols( size_t pos, int numCols ); + +private: + int BlockContain( int topRow1, int leftCol1, + int bottomRow1, int rightCol1, + int topRow2, int leftCol2, + int bottomRow2, int rightCol2 ); + // returns 1, if Block1 contains Block2, + // -1, if Block2 contains Block1, + // 0, otherwise + + int BlockContainsCell( int topRow, int leftCol, + int bottomRow, int rightCol, + int row, int col ) + // returns 1, if Block contains Cell, + // 0, otherwise + { + return ( topRow <= row && row <= bottomRow && + leftCol <= col && col <= rightCol ); + } + + void SelectBlockNoEvent(int topRow, int leftCol, + int bottomRow, int rightCol) + { + SelectBlock(topRow, leftCol, bottomRow, rightCol, + wxKeyboardState(), false); + } + + wxGridCellCoordsArray m_cellSelection; + wxGridCellCoordsArray m_blockSelectionTopLeft; + wxGridCellCoordsArray m_blockSelectionBottomRight; + wxArrayInt m_rowSelection; + wxArrayInt m_colSelection; + + wxGrid *m_grid; + wxGrid::wxGridSelectionModes m_selectionMode; + + friend class WXDLLIMPEXP_FWD_ADV wxGrid; + + wxDECLARE_NO_COPY_CLASS(wxGridSelection); +}; + +#endif // wxUSE_GRID +#endif // _WX_GENERIC_GRIDSEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/headerctrlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/headerctrlg.h new file mode 100644 index 0000000000..d2eceb2bfc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/headerctrlg.h @@ -0,0 +1,181 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/headerctrlg.h +// Purpose: Generic wxHeaderCtrl implementation +// Author: Vadim Zeitlin +// Created: 2008-12-01 +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_HEADERCTRLG_H_ +#define _WX_GENERIC_HEADERCTRLG_H_ + +#include "wx/event.h" +#include "wx/vector.h" +#include "wx/overlay.h" + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxHeaderCtrl : public wxHeaderCtrlBase +{ +public: + wxHeaderCtrl() + { + Init(); + } + + wxHeaderCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHD_DEFAULT_STYLE, + const wxString& name = wxHeaderCtrlNameStr) + { + Init(); + + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHD_DEFAULT_STYLE, + const wxString& name = wxHeaderCtrlNameStr); + + virtual ~wxHeaderCtrl(); + +protected: + virtual wxSize DoGetBestSize() const; + + +private: + // implement base class pure virtuals + virtual void DoSetCount(unsigned int count); + virtual unsigned int DoGetCount() const; + virtual void DoUpdate(unsigned int idx); + + virtual void DoScrollHorz(int dx); + + virtual void DoSetColumnsOrder(const wxArrayInt& order); + virtual wxArrayInt DoGetColumnsOrder() const; + + // common part of all ctors + void Init(); + + // event handlers + void OnPaint(wxPaintEvent& event); + void OnMouse(wxMouseEvent& event); + void OnKeyDown(wxKeyEvent& event); + void OnCaptureLost(wxMouseCaptureLostEvent& event); + + // move the column with given idx at given position (this doesn't generate + // any events but does refresh the display) + void DoMoveCol(unsigned int idx, unsigned int pos); + + // return the horizontal start position of the given column in physical + // coordinates + int GetColStart(unsigned int idx) const; + + // and the end position + int GetColEnd(unsigned int idx) const; + + // refresh the given column [only]; idx must be valid + void RefreshCol(unsigned int idx); + + // refresh the given column if idx is valid + void RefreshColIfNotNone(unsigned int idx); + + // refresh all the controls starting from (and including) the given one + void RefreshColsAfter(unsigned int idx); + + // return the column at the given position or -1 if it is beyond the + // rightmost column and put true into onSeparator output parameter if the + // position is near the divider at the right end of this column (notice + // that this means that we return column 0 even if the position is over + // column 1 but close enough to the divider separating it from column 0) + unsigned int FindColumnAtPoint(int x, bool *onSeparator = NULL) const; + + // return true if a drag resizing operation is currently in progress + bool IsResizing() const; + + // return true if a drag reordering operation is currently in progress + bool IsReordering() const; + + // return true if any drag operation is currently in progress + bool IsDragging() const { return IsResizing() || IsReordering(); } + + // end any drag operation currently in progress (resizing or reordering) + void EndDragging(); + + // cancel the drag operation currently in progress and generate an event + // about it + void CancelDragging(); + + // start (if m_colBeingResized is -1) or continue resizing the column + // + // this generates wxEVT_HEADER_BEGIN_RESIZE/RESIZING events and can + // cancel the operation if the user handler decides so + void StartOrContinueResizing(unsigned int col, int xPhysical); + + // end the resizing operation currently in progress and generate an event + // about it with its cancelled flag set if xPhysical is -1 + void EndResizing(int xPhysical); + + // same functions as above but for column moving/reordering instead of + // resizing + void StartReordering(unsigned int col, int xPhysical); + + // returns true if we did drag the column somewhere else or false if we + // didn't really move it -- in this case we consider that no reordering + // took place and that a normal column click event should be generated + bool EndReordering(int xPhysical); + + // constrain the given position to be larger than the start position of the + // given column plus its minimal width and return the effective width + int ConstrainByMinWidth(unsigned int col, int& xPhysical); + + // update the information displayed while a column is being moved around + void UpdateReorderingMarker(int xPhysical); + + // clear any overlaid markers + void ClearMarkers(); + + + // number of columns in the control currently + unsigned int m_numColumns; + + // index of the column under mouse or -1 if none + unsigned int m_hover; + + // the column being resized or -1 if there is no resizing operation in + // progress + unsigned int m_colBeingResized; + + // the column being moved or -1 if there is no reordering operation in + // progress + unsigned int m_colBeingReordered; + + // the distance from the start of m_colBeingReordered and the mouse + // position when the user started to drag it + int m_dragOffset; + + // the horizontal scroll offset + int m_scrollOffset; + + // the overlay display used during the dragging operations + wxOverlay m_overlay; + + // the indices of the column appearing at the given position on the display + // (its size is always m_numColumns) + wxArrayInt m_colIndices; + + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxHeaderCtrl); +}; + +#endif // _WX_GENERIC_HEADERCTRLG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/helpext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/helpext.h new file mode 100644 index 0000000000..fe0c3e7eb2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/helpext.h @@ -0,0 +1,105 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/helpext.h +// Purpose: an external help controller for wxWidgets +// Author: Karsten Ballueder (Ballueder@usa.net) +// Modified by: +// Copyright: (c) Karsten Ballueder 1998 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_HELPEXT_H_ +#define __WX_HELPEXT_H_ + +#if wxUSE_HELP + + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/helpbase.h" + + +// ---------------------------------------------------------------------------- +// wxExtHelpController +// ---------------------------------------------------------------------------- + +// This class implements help via an external browser. +class WXDLLIMPEXP_ADV wxExtHelpController : public wxHelpControllerBase +{ +public: + wxExtHelpController(wxWindow* parentWindow = NULL); + virtual ~wxExtHelpController(); + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED(void SetBrowser(const wxString& browsername = wxEmptyString, bool isNetscape = false) ); +#endif + + // Set viewer: new name for SetBrowser + virtual void SetViewer(const wxString& viewer = wxEmptyString, + long flags = wxHELP_NETSCAPE); + + virtual bool Initialize(const wxString& dir, int WXUNUSED(server)) + { return Initialize(dir); } + + virtual bool Initialize(const wxString& dir); + virtual bool LoadFile(const wxString& file = wxEmptyString); + virtual bool DisplayContents(void); + virtual bool DisplaySection(int sectionNo); + virtual bool DisplaySection(const wxString& section); + virtual bool DisplayBlock(long blockNo); + virtual bool KeywordSearch(const wxString& k, + wxHelpSearchMode mode = wxHELP_SEARCH_ALL); + + virtual bool Quit(void); + virtual void OnQuit(void); + + virtual bool DisplayHelp(const wxString &) ; + + virtual void SetFrameParameters(const wxString& WXUNUSED(title), + const wxSize& WXUNUSED(size), + const wxPoint& WXUNUSED(pos) = wxDefaultPosition, + bool WXUNUSED(newFrameEachTime) = false) + { + // does nothing by default + } + + virtual wxFrame *GetFrameParameters(wxSize *WXUNUSED(size) = NULL, + wxPoint *WXUNUSED(pos) = NULL, + bool *WXUNUSED(newFrameEachTime) = NULL) + { + return NULL; // does nothing by default + } + +protected: + // Filename of currently active map file. + wxString m_helpDir; + + // How many entries do we have in the map file? + int m_NumOfEntries; + + // A list containing all id,url,documentation triples. + wxList *m_MapList; + +private: + // parse a single line of the map file (called by LoadFile()) + // + // return true if the line was valid or false otherwise + bool ParseMapFileLine(const wxString& line); + + // Deletes the list and all objects. + void DeleteList(void); + + + // How to call the html viewer. + wxString m_BrowserName; + + // Is the viewer a variant of netscape? + bool m_BrowserIsNetscape; + + DECLARE_CLASS(wxExtHelpController) +}; + +#endif // wxUSE_HELP + +#endif // __WX_HELPEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/hyperlink.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/hyperlink.h new file mode 100644 index 0000000000..eb73388869 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/hyperlink.h @@ -0,0 +1,144 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/hyperlink.h +// Purpose: Hyperlink control +// Author: David Norris , Otto Wyss +// Modified by: Ryan Norton, Francesco Montorsi +// Created: 04/02/2005 +// Copyright: (c) 2005 David Norris +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERICHYPERLINKCTRL_H_ +#define _WX_GENERICHYPERLINKCTRL_H_ + +// ---------------------------------------------------------------------------- +// wxGenericHyperlinkCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGenericHyperlinkCtrl : public wxHyperlinkCtrlBase +{ +public: + // Default constructor (for two-step construction). + wxGenericHyperlinkCtrl() { Init(); } + + // Constructor. + wxGenericHyperlinkCtrl(wxWindow *parent, + wxWindowID id, + const wxString& label, const wxString& url, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHL_DEFAULT_STYLE, + const wxString& name = wxHyperlinkCtrlNameStr) + { + Init(); + (void) Create(parent, id, label, url, pos, size, style, name); + } + + // Creation function (for two-step construction). + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, const wxString& url, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHL_DEFAULT_STYLE, + const wxString& name = wxHyperlinkCtrlNameStr); + + + // get/set + wxColour GetHoverColour() const { return m_hoverColour; } + void SetHoverColour(const wxColour &colour) { m_hoverColour = colour; } + + wxColour GetNormalColour() const { return m_normalColour; } + void SetNormalColour(const wxColour &colour); + + wxColour GetVisitedColour() const { return m_visitedColour; } + void SetVisitedColour(const wxColour &colour); + + wxString GetURL() const { return m_url; } + void SetURL (const wxString &url) { m_url=url; } + + void SetVisited(bool visited = true) { m_visited=visited; } + bool GetVisited() const { return m_visited; } + + // NOTE: also wxWindow::Set/GetLabel, wxWindow::Set/GetBackgroundColour, + // wxWindow::Get/SetFont, wxWindow::Get/SetCursor are important ! + + +protected: + // Helper used by this class itself and native MSW implementation that + // connects OnRightUp() and OnPopUpCopy() handlers. + void ConnectMenuHandlers(); + + // event handlers + + // Renders the hyperlink. + void OnPaint(wxPaintEvent& event); + + // Handle set/kill focus events (invalidate for painting focus rect) + void OnFocus(wxFocusEvent& event); + + // Fire a HyperlinkEvent on space + void OnChar(wxKeyEvent& event); + + // Returns the wxRect of the label of this hyperlink. + // This is different from the clientsize's rectangle when + // clientsize != bestsize and this rectangle is influenced + // by the alignment of the label (wxHL_ALIGN_*). + wxRect GetLabelRect() const; + + // If the click originates inside the bounding box of the label, + // a flag is set so that an event will be fired when the left + // button is released. + void OnLeftDown(wxMouseEvent& event); + + // If the click both originated and finished inside the bounding box + // of the label, a HyperlinkEvent is fired. + void OnLeftUp(wxMouseEvent& event); + void OnRightUp(wxMouseEvent& event); + + // Changes the cursor to a hand, if the mouse is inside the label's + // bounding box. + void OnMotion(wxMouseEvent& event); + + // Changes the cursor back to the default, if necessary. + void OnLeaveWindow(wxMouseEvent& event); + + // handles "Copy URL" menuitem + void OnPopUpCopy(wxCommandEvent& event); + + // overridden base class virtuals + + // Returns the best size for the window, which is the size needed + // to display the text label. + virtual wxSize DoGetBestClientSize() const; + + // creates a context menu with "Copy URL" menuitem + virtual void DoContextMenu(const wxPoint &); + +private: + // Common part of all ctors. + void Init(); + + // URL associated with the link. This is transmitted inside + // the HyperlinkEvent fired when the user clicks on the label. + wxString m_url; + + // Foreground colours for various link types. + // NOTE: wxWindow::m_backgroundColour is used for background, + // wxWindow::m_foregroundColour is used to render non-visited links + wxColour m_hoverColour; + wxColour m_normalColour; + wxColour m_visitedColour; + + // True if the mouse cursor is inside the label's bounding box. + bool m_rollover; + + // True if the link has been clicked before. + bool m_visited; + + // True if a click is in progress (left button down) and the click + // originated inside the label's bounding box. + bool m_clicking; +}; + +#endif // _WX_GENERICHYPERLINKCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/icon.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/icon.h new file mode 100644 index 0000000000..7a336d37ce --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/icon.h @@ -0,0 +1,62 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/icon.h +// Purpose: wxIcon implementation for ports where it's same as wxBitmap +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_ICON_H_ +#define _WX_GENERIC_ICON_H_ + +#include "wx/bitmap.h" + +//----------------------------------------------------------------------------- +// wxIcon +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxIcon: public wxBitmap +{ +public: + wxIcon(); + + wxIcon(const char* const* bits); +#ifdef wxNEEDS_CHARPP + wxIcon(char **bits); +#endif + + // For compatibility with wxMSW where desired size is sometimes required to + // distinguish between multiple icons in a resource. + wxIcon( const wxString& filename, + wxBitmapType type = wxICON_DEFAULT_TYPE, + int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) : + wxBitmap(filename, type) + { + } + + wxIcon(const wxIconLocation& loc) + : wxBitmap(loc.GetFileName(), wxBITMAP_TYPE_ANY) + { + } + + bool LoadFile(const wxString& name, wxBitmapType flags, + int WXUNUSED(desiredWidth), int WXUNUSED(desiredHeight)) + { return wxBitmap::LoadFile(name, flags); } + + // unhide the base class version + virtual bool LoadFile(const wxString& name, + wxBitmapType flags = wxICON_DEFAULT_TYPE) + { return wxBitmap::LoadFile(name, flags); } + + // create from bitmap (which should have a mask unless it's monochrome): + // there shouldn't be any implicit bitmap -> icon conversion (i.e. no + // ctors, assignment operators...), but it's ok to have such function + void CopyFromBitmap(const wxBitmap& bmp); + +private: + DECLARE_DYNAMIC_CLASS(wxIcon) +}; + +#endif // _WX_GENERIC_ICON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/imaglist.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/imaglist.h new file mode 100644 index 0000000000..8fc145e03f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/imaglist.h @@ -0,0 +1,79 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/imaglist.h +// Purpose: +// Author: Robert Roebling +// Created: 01/02/97 +// Copyright: (c) 1998 Robert Roebling and Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGLISTG_H_ +#define _WX_IMAGLISTG_H_ + +#include "wx/list.h" + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxColour; + + +class WXDLLIMPEXP_CORE wxGenericImageList: public wxObject +{ +public: + wxGenericImageList() { m_width = m_height = 0; } + wxGenericImageList( int width, int height, bool mask = true, int initialCount = 1 ); + virtual ~wxGenericImageList(); + bool Create( int width, int height, bool mask = true, int initialCount = 1 ); + bool Create(); + + virtual int GetImageCount() const; + virtual bool GetSize( int index, int &width, int &height ) const; + + int Add( const wxBitmap& bitmap ); + int Add( const wxBitmap& bitmap, const wxBitmap& mask ); + int Add( const wxBitmap& bitmap, const wxColour& maskColour ); + wxBitmap GetBitmap(int index) const; + wxIcon GetIcon(int index) const; + bool Replace( int index, const wxBitmap &bitmap ); + bool Replace( int index, const wxBitmap &bitmap, const wxBitmap& mask ); + bool Remove( int index ); + bool RemoveAll(); + + virtual bool Draw(int index, wxDC& dc, int x, int y, + int flags = wxIMAGELIST_DRAW_NORMAL, + bool solidBackground = false); + + // Internal use only + const wxBitmap *GetBitmapPtr(int index) const; +private: + wxObjectList m_images; + + int m_width; + int m_height; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericImageList) +}; + +#ifndef wxHAS_NATIVE_IMAGELIST + +/* + * wxImageList has to be a real class or we have problems with + * the run-time information. + */ + +class WXDLLIMPEXP_CORE wxImageList: public wxGenericImageList +{ + DECLARE_DYNAMIC_CLASS(wxImageList) + +public: + wxImageList() {} + + wxImageList( int width, int height, bool mask = true, int initialCount = 1 ) + : wxGenericImageList(width, height, mask, initialCount) + { + } +}; +#endif // !wxHAS_NATIVE_IMAGELIST + +#endif // _WX_IMAGLISTG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/infobar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/infobar.h new file mode 100644 index 0000000000..cd751b1e9a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/infobar.h @@ -0,0 +1,137 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/infobar.h +// Purpose: generic wxInfoBar class declaration +// Author: Vadim Zeitlin +// Created: 2009-07-28 +// Copyright: (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_INFOBAR_H_ +#define _WX_GENERIC_INFOBAR_H_ + +class WXDLLIMPEXP_FWD_CORE wxBitmapButton; +class WXDLLIMPEXP_FWD_CORE wxStaticBitmap; +class WXDLLIMPEXP_FWD_CORE wxStaticText; + +// ---------------------------------------------------------------------------- +// wxInfoBar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxInfoBarGeneric : public wxInfoBarBase +{ +public: + // the usual ctors and Create() but remember that info bar is created + // hidden + wxInfoBarGeneric() { Init(); } + + wxInfoBarGeneric(wxWindow *parent, wxWindowID winid = wxID_ANY) + { + Init(); + Create(parent, winid); + } + + bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY); + + + // implement base class methods + // ---------------------------- + + virtual void ShowMessage(const wxString& msg, + int flags = wxICON_INFORMATION); + + virtual void Dismiss(); + + virtual void AddButton(wxWindowID btnid, const wxString& label = wxString()); + + virtual void RemoveButton(wxWindowID btnid); + + // methods specific to this version + // -------------------------------- + + // set the effect(s) to use when showing/hiding the bar, may be + // wxSHOW_EFFECT_NONE to disable any effects entirely + // + // by default, slide to bottom/top is used when it's positioned on the top + // of the window for showing/hiding it and top/bottom when it's positioned + // at the bottom + void SetShowHideEffects(wxShowEffect showEffect, wxShowEffect hideEffect) + { + m_showEffect = showEffect; + m_hideEffect = hideEffect; + } + + // get effect used when showing/hiding the window + wxShowEffect GetShowEffect() const; + wxShowEffect GetHideEffect() const; + + // set the duration of animation used when showing/hiding the bar, in ms + void SetEffectDuration(int duration) { m_effectDuration = duration; } + + // get the currently used effect animation duration + int GetEffectDuration() const { return m_effectDuration; } + + + // overridden base class methods + // ----------------------------- + + // setting the font of this window sets it for the text control inside it + // (default font is a larger and bold version of the normal one) + virtual bool SetFont(const wxFont& font); + +#if wxABI_VERSION >= 30001 + // same thing with the colour: this affects the text colour + virtual bool SetForegroundColour(const wxColor& colour); +#endif // 3.0.1+ + +protected: + // info bar shouldn't have any border by default, the colour difference + // between it and the main window separates it well enough + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + + // update the parent to take our new or changed size into account (notably + // should be called when we're shown or hidden) + void UpdateParent(); + +private: + // common part of all ctors + void Init(); + + // handler for the close button + void OnButton(wxCommandEvent& event); + + // show/hide the bar + void DoShow(); + void DoHide(); + + // determine the placement of the bar from its position in the containing + // sizer + enum BarPlacement + { + BarPlacement_Top, + BarPlacement_Bottom, + BarPlacement_Unknown + }; + + BarPlacement GetBarPlacement() const; + + + // different controls making up the bar + wxStaticBitmap *m_icon; + wxStaticText *m_text; + wxBitmapButton *m_button; + + // the effects to use when showing/hiding and duration for them: by default + // the effect is determined by the info bar automatically depending on its + // position and the default duration is used + wxShowEffect m_showEffect, + m_hideEffect; + int m_effectDuration; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxInfoBarGeneric); +}; + +#endif // _WX_GENERIC_INFOBAR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/laywin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/laywin.h new file mode 100644 index 0000000000..a38fd97fc1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/laywin.h @@ -0,0 +1,227 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/laywin.h +// Purpose: Implements a simple layout algorithm, plus +// wxSashLayoutWindow which is an example of a window with +// layout-awareness (via event handlers). This is suited to +// IDE-style window layout. +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LAYWIN_H_G_ +#define _WX_LAYWIN_H_G_ + +#if wxUSE_SASH + #include "wx/sashwin.h" +#endif // wxUSE_SASH + +#include "wx/event.h" + +class WXDLLIMPEXP_FWD_ADV wxQueryLayoutInfoEvent; +class WXDLLIMPEXP_FWD_ADV wxCalculateLayoutEvent; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_QUERY_LAYOUT_INFO, wxQueryLayoutInfoEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_CALCULATE_LAYOUT, wxCalculateLayoutEvent ); + +enum wxLayoutOrientation +{ + wxLAYOUT_HORIZONTAL, + wxLAYOUT_VERTICAL +}; + +enum wxLayoutAlignment +{ + wxLAYOUT_NONE, + wxLAYOUT_TOP, + wxLAYOUT_LEFT, + wxLAYOUT_RIGHT, + wxLAYOUT_BOTTOM +}; + +// Not sure this is necessary +// Tell window which dimension we're sizing on +#define wxLAYOUT_LENGTH_Y 0x0008 +#define wxLAYOUT_LENGTH_X 0x0000 + +// Use most recently used length +#define wxLAYOUT_MRU_LENGTH 0x0010 + +// Only a query, so don't actually move it. +#define wxLAYOUT_QUERY 0x0100 + +/* + * This event is used to get information about window alignment, + * orientation and size. + */ + +class WXDLLIMPEXP_ADV wxQueryLayoutInfoEvent: public wxEvent +{ +public: + wxQueryLayoutInfoEvent(wxWindowID id = 0) + { + SetEventType(wxEVT_QUERY_LAYOUT_INFO); + m_requestedLength = 0; + m_flags = 0; + m_id = id; + m_alignment = wxLAYOUT_TOP; + m_orientation = wxLAYOUT_HORIZONTAL; + } + + // Read by the app + void SetRequestedLength(int length) { m_requestedLength = length; } + int GetRequestedLength() const { return m_requestedLength; } + + void SetFlags(int flags) { m_flags = flags; } + int GetFlags() const { return m_flags; } + + // Set by the app + void SetSize(const wxSize& size) { m_size = size; } + wxSize GetSize() const { return m_size; } + + void SetOrientation(wxLayoutOrientation orient) { m_orientation = orient; } + wxLayoutOrientation GetOrientation() const { return m_orientation; } + + void SetAlignment(wxLayoutAlignment align) { m_alignment = align; } + wxLayoutAlignment GetAlignment() const { return m_alignment; } + + virtual wxEvent *Clone() const { return new wxQueryLayoutInfoEvent(*this); } + +protected: + int m_flags; + int m_requestedLength; + wxSize m_size; + wxLayoutOrientation m_orientation; + wxLayoutAlignment m_alignment; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxQueryLayoutInfoEvent) +}; + +typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEvent&); + +#define wxQueryLayoutInfoEventHandler( func ) \ + wxEVENT_HANDLER_CAST( wxQueryLayoutInfoEventFunction, func ) + +#define EVT_QUERY_LAYOUT_INFO(func) \ + wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_QUERY_LAYOUT_INFO, wxID_ANY, wxID_ANY, wxQueryLayoutInfoEventHandler( func ), NULL ), + +/* + * This event is used to take a bite out of the available client area. + */ + +class WXDLLIMPEXP_ADV wxCalculateLayoutEvent: public wxEvent +{ +public: + wxCalculateLayoutEvent(wxWindowID id = 0) + { + SetEventType(wxEVT_CALCULATE_LAYOUT); + m_flags = 0; + m_id = id; + } + + // Read by the app + void SetFlags(int flags) { m_flags = flags; } + int GetFlags() const { return m_flags; } + + // Set by the app + void SetRect(const wxRect& rect) { m_rect = rect; } + wxRect GetRect() const { return m_rect; } + + virtual wxEvent *Clone() const { return new wxCalculateLayoutEvent(*this); } + +protected: + int m_flags; + wxRect m_rect; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCalculateLayoutEvent) +}; + +typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEvent&); + +#define wxCalculateLayoutEventHandler( func ) wxEVENT_HANDLER_CAST(wxCalculateLayoutEventFunction, func) + +#define EVT_CALCULATE_LAYOUT(func) \ + wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_CALCULATE_LAYOUT, wxID_ANY, wxID_ANY, wxCalculateLayoutEventHandler( func ), NULL ), + +#if wxUSE_SASH + +// This is window that can remember alignment/orientation, does its own layout, +// and can provide sashes too. Useful for implementing docked windows with sashes in +// an IDE-style interface. +class WXDLLIMPEXP_ADV wxSashLayoutWindow: public wxSashWindow +{ +public: + wxSashLayoutWindow() + { + Init(); + } + + wxSashLayoutWindow(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("layoutWindow")) + { + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("layoutWindow")); + +// Accessors + inline wxLayoutAlignment GetAlignment() const { return m_alignment; } + inline wxLayoutOrientation GetOrientation() const { return m_orientation; } + + inline void SetAlignment(wxLayoutAlignment align) { m_alignment = align; } + inline void SetOrientation(wxLayoutOrientation orient) { m_orientation = orient; } + + // Give the window default dimensions + inline void SetDefaultSize(const wxSize& size) { m_defaultSize = size; } + +// Event handlers + // Called by layout algorithm to allow window to take a bit out of the + // client rectangle, and size itself if not in wxLAYOUT_QUERY mode. + void OnCalculateLayout(wxCalculateLayoutEvent& event); + + // Called by layout algorithm to retrieve information about the window. + void OnQueryLayoutInfo(wxQueryLayoutInfoEvent& event); + +private: + void Init(); + + wxLayoutAlignment m_alignment; + wxLayoutOrientation m_orientation; + wxSize m_defaultSize; + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxSashLayoutWindow) + DECLARE_EVENT_TABLE() +}; + +#endif // wxUSE_SASH + +class WXDLLIMPEXP_FWD_CORE wxMDIParentFrame; +class WXDLLIMPEXP_FWD_CORE wxFrame; + +// This class implements the layout algorithm +class WXDLLIMPEXP_ADV wxLayoutAlgorithm: public wxObject +{ +public: + wxLayoutAlgorithm() {} + +#if wxUSE_MDI_ARCHITECTURE + // The MDI client window is sized to whatever's left over. + bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL); +#endif // wxUSE_MDI_ARCHITECTURE + + // mainWindow is sized to whatever's left over. This function for backward + // compatibility; use LayoutWindow. + bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL); + + // mainWindow is sized to whatever's left over. + bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = NULL); +}; + +#endif + // _WX_LAYWIN_H_G_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/listctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/listctrl.h new file mode 100644 index 0000000000..7e18eeccbf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/listctrl.h @@ -0,0 +1,277 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/listctrl.h +// Purpose: Generic list control +// Author: Robert Roebling +// Created: 01/02/97 +// Copyright: (c) 1998 Robert Roebling and Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_LISTCTRL_H_ +#define _WX_GENERIC_LISTCTRL_H_ + +#include "wx/containr.h" +#include "wx/scrolwin.h" +#include "wx/textctrl.h" + +#if wxUSE_DRAG_AND_DROP +class WXDLLIMPEXP_FWD_CORE wxDropTarget; +#endif + +//----------------------------------------------------------------------------- +// internal classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxListHeaderWindow; +class WXDLLIMPEXP_FWD_CORE wxListMainWindow; + +//----------------------------------------------------------------------------- +// wxListCtrl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericListCtrl: public wxNavigationEnabled, + public wxScrollHelper +{ +public: + + wxGenericListCtrl() : wxScrollHelper(this) + { + Init(); + } + + wxGenericListCtrl( wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLC_ICON, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxListCtrlNameStr) + : wxScrollHelper(this) + { + Create(parent, winid, pos, size, style, validator, name); + } + + virtual ~wxGenericListCtrl(); + + void Init(); + + bool Create( wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLC_ICON, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxListCtrlNameStr); + + bool GetColumn( int col, wxListItem& item ) const; + bool SetColumn( int col, const wxListItem& item ); + int GetColumnWidth( int col ) const; + bool SetColumnWidth( int col, int width); + int GetCountPerPage() const; // not the same in wxGLC as in Windows, I think + wxRect GetViewRect() const; + + bool GetItem( wxListItem& info ) const; + bool SetItem( wxListItem& info ) ; + long SetItem( long index, int col, const wxString& label, int imageId = -1 ); + int GetItemState( long item, long stateMask ) const; + bool SetItemState( long item, long state, long stateMask); + bool SetItemImage( long item, int image, int selImage = -1 ); + bool SetItemColumnImage( long item, long column, int image ); + wxString GetItemText( long item, int col = 0 ) const; + void SetItemText( long item, const wxString& str ); + wxUIntPtr GetItemData( long item ) const; + bool SetItemPtrData(long item, wxUIntPtr data); + bool SetItemData(long item, long data) { return SetItemPtrData(item, data); } + bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const; + bool GetSubItemRect( long item, long subItem, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const; + bool GetItemPosition( long item, wxPoint& pos ) const; + bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC + int GetItemCount() const; + int GetColumnCount() const; + void SetItemSpacing( int spacing, bool isSmall = false ); + wxSize GetItemSpacing() const; + void SetItemTextColour( long item, const wxColour& col); + wxColour GetItemTextColour( long item ) const; + void SetItemBackgroundColour( long item, const wxColour &col); + wxColour GetItemBackgroundColour( long item ) const; + void SetItemFont( long item, const wxFont &f); + wxFont GetItemFont( long item ) const; + int GetSelectedItemCount() const; + wxColour GetTextColour() const; + void SetTextColour(const wxColour& col); + long GetTopItem() const; + + void SetSingleStyle( long style, bool add = true ) ; + void SetWindowStyleFlag( long style ); + void RecreateWindow() {} + long GetNextItem( long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE ) const; + wxImageList *GetImageList( int which ) const; + void SetImageList( wxImageList *imageList, int which ); + void AssignImageList( wxImageList *imageList, int which ); + bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC + + void ClearAll(); + bool DeleteItem( long item ); + bool DeleteAllItems(); + bool DeleteAllColumns(); + bool DeleteColumn( int col ); + + void SetItemCount(long count); + + wxTextCtrl *EditLabel(long item, + wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl)); + wxTextCtrl* GetEditControl() const; + void Edit( long item ) { EditLabel(item); } + + bool EnsureVisible( long item ); + long FindItem( long start, const wxString& str, bool partial = false ); + long FindItem( long start, wxUIntPtr data ); + long FindItem( long start, const wxPoint& pt, int direction ); // not supported in wxGLC + long HitTest( const wxPoint& point, int& flags, long *pSubItem = NULL ) const; + long InsertItem(wxListItem& info); + long InsertItem( long index, const wxString& label ); + long InsertItem( long index, int imageIndex ); + long InsertItem( long index, const wxString& label, int imageIndex ); + bool ScrollList( int dx, int dy ); + bool SortItems( wxListCtrlCompare fn, wxIntPtr data ); + + // do we have a header window? + bool HasHeader() const + { return InReportView() && !HasFlag(wxLC_NO_HEADER); } + + // refresh items selectively (only useful for virtual list controls) + void RefreshItem(long item); + void RefreshItems(long itemFrom, long itemTo); + + virtual void EnableBellOnNoMatch(bool on = true); + +#if WXWIN_COMPATIBILITY_2_6 + // obsolete, don't use + wxDEPRECATED( int GetItemSpacing( bool isSmall ) const ); +#endif // WXWIN_COMPATIBILITY_2_6 + + + // overridden base class virtuals + // ------------------------------ + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + virtual void Update(); + + + // implementation only from now on + // ------------------------------- + + // generic version extension, don't use in portable code + bool Update( long item ); + + void OnInternalIdle( ); + + // We have to hand down a few functions + virtual void Refresh(bool eraseBackground = true, + const wxRect *rect = NULL); + + virtual bool SetBackgroundColour( const wxColour &colour ); + virtual bool SetForegroundColour( const wxColour &colour ); + virtual wxColour GetBackgroundColour() const; + virtual wxColour GetForegroundColour() const; + virtual bool SetFont( const wxFont &font ); + virtual bool SetCursor( const wxCursor &cursor ); + +#if wxUSE_DRAG_AND_DROP + virtual void SetDropTarget( wxDropTarget *dropTarget ); + virtual wxDropTarget *GetDropTarget() const; +#endif + + virtual bool ShouldInheritColours() const { return false; } + + // implementation + // -------------- + + wxImageList *m_imageListNormal; + wxImageList *m_imageListSmall; + wxImageList *m_imageListState; // what's that ? + bool m_ownsImageListNormal, + m_ownsImageListSmall, + m_ownsImageListState; + wxListHeaderWindow *m_headerWin; + wxListMainWindow *m_mainWin; + +protected: + // Implement base class pure virtual methods. + long DoInsertColumn(long col, const wxListItem& info); + + + virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); + + virtual wxSize DoGetBestClientSize() const; + + // return the text for the given column of the given item + virtual wxString OnGetItemText(long item, long column) const; + + // return the icon for the given item. In report view, OnGetItemImage will + // only be called for the first column. See OnGetItemColumnImage for + // details. + virtual int OnGetItemImage(long item) const; + + // return the icon for the given item and column. + virtual int OnGetItemColumnImage(long item, long column) const; + + // it calls our OnGetXXX() functions + friend class WXDLLIMPEXP_FWD_CORE wxListMainWindow; + + virtual wxBorder GetDefaultBorder() const; + + virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size); + +private: + void CreateOrDestroyHeaderWindowAsNeeded(); + void OnScroll( wxScrollWinEvent& event ); + void OnSize( wxSizeEvent &event ); + + // we need to return a special WM_GETDLGCODE value to process just the + // arrows but let the other navigation characters through +#if defined(__WXMSW__) && !defined(__WXWINCE__) && !defined(__WXUNIVERSAL__) + virtual WXLRESULT + MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); +#endif // __WXMSW__ + + WX_FORWARD_TO_SCROLL_HELPER() + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGenericListCtrl) +}; + +#if (!defined(__WXMSW__) || defined(__WXUNIVERSAL__)) && (!(defined(__WXMAC__) && wxOSX_USE_CARBON) || defined(__WXUNIVERSAL__ )) +/* + * wxListCtrl has to be a real class or we have problems with + * the run-time information. + */ + +class WXDLLIMPEXP_CORE wxListCtrl: public wxGenericListCtrl +{ + DECLARE_DYNAMIC_CLASS(wxListCtrl) + +public: + wxListCtrl() {} + + wxListCtrl(wxWindow *parent, wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLC_ICON, + const wxValidator &validator = wxDefaultValidator, + const wxString &name = wxListCtrlNameStr) + : wxGenericListCtrl(parent, winid, pos, size, style, validator, name) + { + } + +}; +#endif // !__WXMSW__ || __WXUNIVERSAL__ + +#endif // _WX_GENERIC_LISTCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/logg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/logg.h new file mode 100644 index 0000000000..303b441e81 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/logg.h @@ -0,0 +1,152 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/logg.h +// Purpose: Assorted wxLogXXX functions, and wxLog (sink for logs) +// Author: Vadim Zeitlin +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LOGG_H_ +#define _WX_LOGG_H_ + +#if wxUSE_GUI + +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxLogFrame; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +// ---------------------------------------------------------------------------- +// the following log targets are only compiled in if the we're compiling the +// GUI part (andnot just the base one) of the library, they're implemented in +// src/generic/logg.cpp *and not src/common/log.cpp unlike all the rest) +// ---------------------------------------------------------------------------- + +#if wxUSE_TEXTCTRL + +// log everything to a text window (GUI only of course) +class WXDLLIMPEXP_CORE wxLogTextCtrl : public wxLog +{ +public: + wxLogTextCtrl(wxTextCtrl *pTextCtrl); + +protected: + // implement sink function + virtual void DoLogText(const wxString& msg); + +private: + // the control we use + wxTextCtrl *m_pTextCtrl; + + wxDECLARE_NO_COPY_CLASS(wxLogTextCtrl); +}; + +#endif // wxUSE_TEXTCTRL + +// ---------------------------------------------------------------------------- +// GUI log target, the default one for wxWidgets programs +// ---------------------------------------------------------------------------- + +#if wxUSE_LOGGUI + +class WXDLLIMPEXP_CORE wxLogGui : public wxLog +{ +public: + // ctor + wxLogGui(); + + // show all messages that were logged since the last Flush() + virtual void Flush(); + +protected: + virtual void DoLogRecord(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info); + + // return the title to be used for the log dialog, depending on m_bErrors + // and m_bWarnings values + wxString GetTitle() const; + + // return the icon (one of wxICON_XXX constants) to be used for the dialog + // depending on m_bErrors/m_bWarnings + int GetSeverityIcon() const; + + // empty everything + void Clear(); + + + wxArrayString m_aMessages; // the log message texts + wxArrayInt m_aSeverity; // one of wxLOG_XXX values + wxArrayLong m_aTimes; // the time of each message + bool m_bErrors, // do we have any errors? + m_bWarnings, // any warnings? + m_bHasMessages; // any messages at all? + +private: + // this method is called to show a single log message, it uses + // wxMessageBox() by default + virtual void DoShowSingleLogMessage(const wxString& message, + const wxString& title, + int style); + + // this method is called to show multiple log messages, it uses wxLogDialog + virtual void DoShowMultipleLogMessages(const wxArrayString& messages, + const wxArrayInt& severities, + const wxArrayLong& times, + const wxString& title, + int style); +}; + +#endif // wxUSE_LOGGUI + +// ---------------------------------------------------------------------------- +// (background) log window: this class forwards all log messages to the log +// target which was active when it was instantiated, but also collects them +// to the log window. This window has its own menu which allows the user to +// close it, clear the log contents or save it to the file. +// ---------------------------------------------------------------------------- + +#if wxUSE_LOGWINDOW + +class WXDLLIMPEXP_CORE wxLogWindow : public wxLogPassThrough +{ +public: + wxLogWindow(wxWindow *pParent, // the parent frame (can be NULL) + const wxString& szTitle, // the title of the frame + bool bShow = true, // show window immediately? + bool bPassToOld = true); // pass messages to the old target? + + virtual ~wxLogWindow(); + + // window operations + // show/hide the log window + void Show(bool bShow = true); + // retrieve the pointer to the frame + wxFrame *GetFrame() const; + + // overridables + // called if the user closes the window interactively, will not be + // called if it is destroyed for another reason (such as when program + // exits) - return true from here to allow the frame to close, false + // to prevent this from happening + virtual bool OnFrameClose(wxFrame *frame); + // called right before the log frame is going to be deleted: will + // always be called unlike OnFrameClose() + virtual void OnFrameDelete(wxFrame *frame); + +protected: + virtual void DoLogTextAtLevel(wxLogLevel level, const wxString& msg); + +private: + wxLogFrame *m_pLogFrame; // the log frame + + wxDECLARE_NO_COPY_CLASS(wxLogWindow); +}; + +#endif // wxUSE_LOGWINDOW + +#endif // wxUSE_GUI + +#endif // _WX_LOGG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/mask.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/mask.h new file mode 100644 index 0000000000..f6aad1a86d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/mask.h @@ -0,0 +1,53 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/mask.h +// Purpose: generic implementation of wxMask +// Author: Vadim Zeitlin +// Created: 2006-09-28 +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_MASKG_H_ +#define _WX_GENERIC_MASKG_H_ + +// ---------------------------------------------------------------------------- +// generic wxMask implementation +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMask : public wxMaskBase +{ +public: + wxMask() { } + wxMask(const wxBitmap& bitmap, const wxColour& colour) + { + InitFromColour(bitmap, colour); + } + +#if wxUSE_PALETTE + wxMask(const wxBitmap& bitmap, int paletteIndex) + { + Create(bitmap, paletteIndex); + } +#endif // wxUSE_PALETTE + + wxMask(const wxBitmap& bitmap) + { + InitFromMonoBitmap(bitmap); + } + + // implementation-only from now on + wxBitmap GetBitmap() const { return m_bitmap; } + +private: + // implement wxMaskBase pure virtuals + virtual void FreeData(); + virtual bool InitFromColour(const wxBitmap& bitmap, const wxColour& colour); + virtual bool InitFromMonoBitmap(const wxBitmap& bitmap); + + wxBitmap m_bitmap; + + DECLARE_DYNAMIC_CLASS(wxMask) +}; + +#endif // _WX_GENERIC_MASKG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/mdig.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/mdig.h new file mode 100644 index 0000000000..7c433edc40 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/mdig.h @@ -0,0 +1,260 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/mdig.h +// Purpose: Generic MDI (Multiple Document Interface) classes +// Author: Hans Van Leemputten +// Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes +// Created: 29/07/2002 +// Copyright: (c) 2002 Hans Van Leemputten +// (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_MDIG_H_ +#define _WX_GENERIC_MDIG_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/panel.h" + +class WXDLLIMPEXP_FWD_CORE wxBookCtrlBase; +class WXDLLIMPEXP_FWD_CORE wxBookCtrlEvent; +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxIconBundle; +class WXDLLIMPEXP_FWD_CORE wxNotebook; + +#if wxUSE_GENERIC_MDI_AS_NATIVE + #define wxGenericMDIParentFrame wxMDIParentFrame + #define wxGenericMDIChildFrame wxMDIChildFrame + #define wxGenericMDIClientWindow wxMDIClientWindow +#else // !wxUSE_GENERIC_MDI_AS_NATIVE + class WXDLLIMPEXP_FWD_CORE wxGenericMDIParentFrame; + class WXDLLIMPEXP_FWD_CORE wxGenericMDIChildFrame; + class WXDLLIMPEXP_FWD_CORE wxGenericMDIClientWindow; +#endif // wxUSE_GENERIC_MDI_AS_NATIVE/!wxUSE_GENERIC_MDI_AS_NATIVE + +// ---------------------------------------------------------------------------- +// wxGenericMDIParentFrame +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericMDIParentFrame : public wxMDIParentFrameBase +{ +public: + wxGenericMDIParentFrame() { Init(); } + wxGenericMDIParentFrame(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, winid, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr); + + virtual ~wxGenericMDIParentFrame(); + + // implement base class pure virtuals + static bool IsTDI() { return true; } + + virtual void ActivateNext() { AdvanceActive(true); } + virtual void ActivatePrevious() { AdvanceActive(false); } + +#if wxUSE_MENUS + virtual void SetWindowMenu(wxMenu* pMenu); + + virtual void SetMenuBar(wxMenuBar *pMenuBar); +#endif // wxUSE_MENUS + + virtual wxGenericMDIClientWindow *OnCreateGenericClient(); + + + // implementation only from now on + void WXSetChildMenuBar(wxGenericMDIChildFrame *child); + void WXUpdateChildTitle(wxGenericMDIChildFrame *child); + void WXActivateChild(wxGenericMDIChildFrame *child); + void WXRemoveChild(wxGenericMDIChildFrame *child); + bool WXIsActiveChild(wxGenericMDIChildFrame *child) const; + bool WXIsInsideChildHandler(wxGenericMDIChildFrame *child) const; + + // return the book control used by the client window to manage the pages + wxBookCtrlBase *GetBookCtrl() const; + +protected: +#if wxUSE_MENUS + wxMenuBar *m_pMyMenuBar; +#endif // wxUSE_MENUS + + // advance the activation forward or backwards + void AdvanceActive(bool forward); + +private: + void Init(); + +#if wxUSE_MENUS + void RemoveWindowMenu(wxMenuBar *pMenuBar); + void AddWindowMenu(wxMenuBar *pMenuBar); + + void OnWindowMenu(wxCommandEvent& event); +#endif // wxUSE_MENUS + + virtual bool ProcessEvent(wxEvent& event); + + void OnClose(wxCloseEvent& event); + + // return the client window, may be NULL if we hadn't been created yet + wxGenericMDIClientWindow *GetGenericClientWindow() const; + + // close all children, return false if any of them vetoed it + bool CloseAll(); + + + // this pointer is non-NULL if we're currently inside our ProcessEvent() + // and we forwarded the event to this child (as we do with menu events) + wxMDIChildFrameBase *m_childHandler; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGenericMDIParentFrame) +}; + +// ---------------------------------------------------------------------------- +// wxGenericMDIChildFrame +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericMDIChildFrame : public wxTDIChildFrame +{ +public: + wxGenericMDIChildFrame() { Init(); } + wxGenericMDIChildFrame(wxGenericMDIParentFrame *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, winid, title, pos, size, style, name); + } + + bool Create(wxGenericMDIParentFrame *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxGenericMDIChildFrame(); + + // implement MDI operations + virtual void Activate(); + + +#if wxUSE_MENUS + virtual void SetMenuBar( wxMenuBar *menu_bar ); + virtual wxMenuBar *GetMenuBar() const; +#endif // wxUSE_MENUS + + virtual wxString GetTitle() const { return m_title; } + virtual void SetTitle(const wxString& title); + + virtual bool TryAfter(wxEvent& event); + + // implementation only from now on + + wxGenericMDIParentFrame* GetGenericMDIParent() const + { +#if wxUSE_GENERIC_MDI_AS_NATIVE + return GetMDIParent(); +#else // generic != native + return m_mdiParentGeneric; +#endif + } + +protected: + wxString m_title; + +#if wxUSE_MENUS + wxMenuBar *m_pMenuBar; +#endif // wxUSE_MENUS + +#if !wxUSE_GENERIC_MDI_AS_NATIVE + wxGenericMDIParentFrame *m_mdiParentGeneric; +#endif + +protected: + void Init(); + +private: + void OnMenuHighlight(wxMenuEvent& event); + void OnClose(wxCloseEvent& event); + + DECLARE_DYNAMIC_CLASS(wxGenericMDIChildFrame) + DECLARE_EVENT_TABLE() + + friend class wxGenericMDIClientWindow; +}; + +// ---------------------------------------------------------------------------- +// wxGenericMDIClientWindow +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericMDIClientWindow : public wxMDIClientWindowBase +{ +public: + wxGenericMDIClientWindow() { } + + // unfortunately we need to provide our own version of CreateClient() + // because of the difference in the type of the first parameter and + // implement the base class pure virtual method in terms of it + // (CreateGenericClient() is virtual itself to allow customizing the client + // window creation by overriding it in the derived classes) + virtual bool CreateGenericClient(wxWindow *parent); + virtual bool CreateClient(wxMDIParentFrame *parent, + long WXUNUSED(style) = wxVSCROLL | wxHSCROLL) + { + return CreateGenericClient(parent); + } + + // implementation only + wxBookCtrlBase *GetBookCtrl() const; + wxGenericMDIChildFrame *GetChild(size_t pos) const; + int FindChild(wxGenericMDIChildFrame *child) const; + +private: + void PageChanged(int OldSelection, int newSelection); + + void OnPageChanged(wxBookCtrlEvent& event); + void OnSize(wxSizeEvent& event); + + // the notebook containing all MDI children as its pages + wxNotebook *m_notebook; + + DECLARE_DYNAMIC_CLASS(wxGenericMDIClientWindow) +}; + +// ---------------------------------------------------------------------------- +// inline functions implementation +// ---------------------------------------------------------------------------- + +inline bool +wxGenericMDIParentFrame:: +WXIsInsideChildHandler(wxGenericMDIChildFrame *child) const +{ + return child == m_childHandler; +} + +#endif // _WX_GENERIC_MDIG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/msgdlgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/msgdlgg.h new file mode 100644 index 0000000000..66bd5484ea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/msgdlgg.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/msgdlgg.h +// Purpose: Generic wxMessageDialog +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_MSGDLGG_H_ +#define _WX_GENERIC_MSGDLGG_H_ + +class WXDLLIMPEXP_FWD_CORE wxSizer; + +class WXDLLIMPEXP_CORE wxGenericMessageDialog : public wxMessageDialogBase +{ +public: + wxGenericMessageDialog(wxWindow *parent, + const wxString& message, + const wxString& caption = wxMessageBoxCaptionStr, + long style = wxOK|wxCENTRE, + const wxPoint& pos = wxDefaultPosition); + + virtual int ShowModal(); + +protected: + // Creates a message dialog taking any options that have been set after + // object creation into account such as custom labels. + void DoCreateMsgdialog(); + + void OnYes(wxCommandEvent& event); + void OnNo(wxCommandEvent& event); + void OnHelp(wxCommandEvent& event); + void OnCancel(wxCommandEvent& event); + + // can be overridden to provide more contents to the dialog + virtual void AddMessageDialogCheckBox(wxSizer *WXUNUSED(sizer)) { } + virtual void AddMessageDialogDetails(wxSizer *WXUNUSED(sizer)) { } + +private: + // Creates and returns a standard button sizer using the style of this + // dialog and the custom labels, if any. + // + // May return NULL on smart phone platforms not using buttons at all. + wxSizer *CreateMsgDlgButtonSizer(); + + wxPoint m_pos; + bool m_created; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGenericMessageDialog) +}; + +#endif // _WX_GENERIC_MSGDLGG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/notebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/notebook.h new file mode 100644 index 0000000000..e328e0bfcf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/notebook.h @@ -0,0 +1,155 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/notebook.h +// Purpose: wxNotebook class (a.k.a. property sheet, tabbed dialog) +// Author: Julian Smart +// Modified by: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_NOTEBOOK_H_ +#define _WX_NOTEBOOK_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- +#include "wx/event.h" +#include "wx/control.h" + +// ---------------------------------------------------------------------------- +// types +// ---------------------------------------------------------------------------- + +// fwd declarations +class WXDLLIMPEXP_FWD_CORE wxImageList; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxTabView; + +// ---------------------------------------------------------------------------- +// wxNotebook +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase +{ +public: + // ctors + // ----- + // default for dynamic class + wxNotebook(); + // the same arguments as for wxControl (@@@ any special styles?) + wxNotebook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr); + // Create() function + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr); + // dtor + virtual ~wxNotebook(); + + // accessors + // --------- + // Find the position of the wxNotebookPage, wxNOT_FOUND if not found. + int FindPagePosition(wxNotebookPage* page) const; + + // set the currently selected page, return the index of the previously + // selected one (or wxNOT_FOUND on error) + // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events + int SetSelection(size_t nPage); + // cycle thru the tabs + // void AdvanceSelection(bool bForward = true); + + // changes selected page without sending events + int ChangeSelection(size_t nPage); + + // set/get the title of a page + bool SetPageText(size_t nPage, const wxString& strText); + wxString GetPageText(size_t nPage) const; + + // get the number of rows for a control with wxNB_MULTILINE style (not all + // versions support it - they will always return 1 then) + virtual int GetRowCount() const ; + + // sets/returns item's image index in the current image list + int GetPageImage(size_t nPage) const; + bool SetPageImage(size_t nPage, int nImage); + + // control the appearance of the notebook pages + // set the size (the same for all pages) + void SetPageSize(const wxSize& size); + // set the padding between tabs (in pixels) + void SetPadding(const wxSize& padding); + + // Sets the size of the tabs (assumes all tabs are the same size) + void SetTabSize(const wxSize& sz); + + // operations + // ---------- + // remove one page from the notebook, and delete the page. + bool DeletePage(size_t nPage); + bool DeletePage(wxNotebookPage* page); + // remove one page from the notebook, without deleting the page. + bool RemovePage(size_t nPage); + bool RemovePage(wxNotebookPage* page); + virtual wxWindow* DoRemovePage(size_t nPage); + + // remove all pages + bool DeleteAllPages(); + // the same as AddPage(), but adds it at the specified position + bool InsertPage(size_t nPage, + wxNotebookPage *pPage, + const wxString& strText, + bool bSelect = false, + int imageId = NO_IMAGE); + + // callbacks + // --------- + void OnSize(wxSizeEvent& event); + void OnInternalIdle(); + void OnSelChange(wxBookCtrlEvent& event); + void OnSetFocus(wxFocusEvent& event); + void OnNavigationKey(wxNavigationKeyEvent& event); + + // base class virtuals + // ------------------- + virtual void Command(wxCommandEvent& event); + virtual void SetConstraintSizes(bool recurse = true); + virtual bool DoPhase(int nPhase); + + virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; + + // Implementation + + // wxNotebook on Motif uses a generic wxTabView to implement itself. + wxTabView *GetTabView() const { return m_tabView; } + void SetTabView(wxTabView *v) { m_tabView = v; } + + void OnMouseEvent(wxMouseEvent& event); + void OnPaint(wxPaintEvent& event); + + virtual wxRect GetAvailableClientSize(); + + // Implementation: calculate the layout of the view rect + // and resize the children if required + bool RefreshLayout(bool force = true); + +protected: + // common part of all ctors + void Init(); + + // helper functions + void ChangePage(int nOldSel, int nSel); // change pages + + wxTabView* m_tabView; + + DECLARE_DYNAMIC_CLASS(wxNotebook) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_NOTEBOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/notifmsg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/notifmsg.h new file mode 100644 index 0000000000..1cd74ba7f0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/notifmsg.h @@ -0,0 +1,60 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/notifmsg.h +// Purpose: generic implementation of wxGenericNotificationMessage +// Author: Vadim Zeitlin +// Created: 2007-11-24 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_NOTIFMSG_H_ +#define _WX_GENERIC_NOTIFMSG_H_ + +class wxNotificationMessageDialog; + +// ---------------------------------------------------------------------------- +// wxGenericNotificationMessage +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxGenericNotificationMessage : public wxNotificationMessageBase +{ +public: + wxGenericNotificationMessage() { Init(); } + wxGenericNotificationMessage(const wxString& title, + const wxString& message = wxString(), + wxWindow *parent = NULL, + int flags = wxICON_INFORMATION) + : wxNotificationMessageBase(title, message, parent, flags) + { + Init(); + } + + virtual ~wxGenericNotificationMessage(); + + + virtual bool Show(int timeout = Timeout_Auto); + virtual bool Close(); + + // generic implementation-specific methods + + // get/set the default timeout (used if Timeout_Auto is specified) + static int GetDefaultTimeout() { return ms_timeout; } + static void SetDefaultTimeout(int timeout); + +private: + void Init(); + + + // default timeout + static int ms_timeout; + + // notification message is represented by a modeless dialog in this + // implementation + wxNotificationMessageDialog *m_dialog; + + + wxDECLARE_NO_COPY_CLASS(wxGenericNotificationMessage); +}; + +#endif // _WX_GENERIC_NOTIFMSG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/numdlgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/numdlgg.h new file mode 100644 index 0000000000..ac45ce915c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/numdlgg.h @@ -0,0 +1,78 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/numdlgg.h +// Purpose: wxNumberEntryDialog class +// Author: John Labenski +// Modified by: +// Created: 07.02.04 (extracted from textdlgg.cpp) +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __NUMDLGH_G__ +#define __NUMDLGH_G__ + +#include "wx/defs.h" + +#if wxUSE_NUMBERDLG + +#include "wx/dialog.h" + +#if wxUSE_SPINCTRL + class WXDLLIMPEXP_FWD_CORE wxSpinCtrl; +#else + class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +#endif // wxUSE_SPINCTRL + +// ---------------------------------------------------------------------------- +// wxNumberEntryDialog: a dialog with spin control, [ok] and [cancel] buttons +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNumberEntryDialog : public wxDialog +{ +public: + wxNumberEntryDialog(wxWindow *parent, + const wxString& message, + const wxString& prompt, + const wxString& caption, + long value, long min, long max, + const wxPoint& pos = wxDefaultPosition); + + long GetValue() const { return m_value; } + + // implementation only + void OnOK(wxCommandEvent& event); + void OnCancel(wxCommandEvent& event); + +protected: + +#if wxUSE_SPINCTRL + wxSpinCtrl *m_spinctrl; +#else + wxTextCtrl *m_spinctrl; +#endif // wxUSE_SPINCTRL + + long m_value, m_min, m_max; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxNumberEntryDialog) + wxDECLARE_NO_COPY_CLASS(wxNumberEntryDialog); +}; + +// ---------------------------------------------------------------------------- +// function to get a number from user +// ---------------------------------------------------------------------------- + +WXDLLIMPEXP_CORE long + wxGetNumberFromUser(const wxString& message, + const wxString& prompt, + const wxString& caption, + long value = 0, + long min = 0, + long max = 100, + wxWindow *parent = NULL, + const wxPoint& pos = wxDefaultPosition); + +#endif // wxUSE_NUMBERDLG + +#endif // __NUMDLGH_G__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/paletteg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/paletteg.h new file mode 100644 index 0000000000..0f6f5a4918 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/paletteg.h @@ -0,0 +1,50 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/paletteg.h +// Purpose: +// Author: Robert Roebling +// Created: 01/02/97 +// Copyright: (c) 1998 Robert Roebling and Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __WX_PALETTEG_H__ +#define __WX_PALETTEG_H__ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxPalette; + +//----------------------------------------------------------------------------- +// wxPalette +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPalette: public wxPaletteBase +{ +public: + wxPalette(); + wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ); + virtual ~wxPalette(); + + bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); + int GetPixel( unsigned char red, unsigned char green, unsigned char blue ) const; + bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const; + + virtual int GetColoursCount() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxPalette) +}; + +#endif // __WX_PALETTEG_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/panelg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/panelg.h new file mode 100644 index 0000000000..5c02cb35d8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/panelg.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/panelg.h +// Purpose: wxPanel: a container for child controls +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_PANELG_H_ +#define _WX_GENERIC_PANELG_H_ + +#include "wx/bitmap.h" + +class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase +{ +public: + wxPanel() { } + + // Constructor + wxPanel(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, + const wxString& name = wxPanelNameStr) + { + Create(parent, winid, pos, size, style, name); + } + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_CONSTRUCTOR( + wxPanel(wxWindow *parent, + int x, int y, int width, int height, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, + const wxString& name = wxPanelNameStr) + { + Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name); + } + ) +#endif // WXWIN_COMPATIBILITY_2_8 + +private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel); +}; + +#endif // _WX_GENERIC_PANELG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/printps.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/printps.h new file mode 100644 index 0000000000..388307297c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/printps.h @@ -0,0 +1,67 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/printps.h +// Purpose: wxPostScriptPrinter, wxPostScriptPrintPreview +// wxGenericPageSetupDialog +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __PRINTPSH__ +#define __PRINTPSH__ + +#include "wx/prntbase.h" + +#if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT + +// ---------------------------------------------------------------------------- +// Represents the printer: manages printing a wxPrintout object +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPostScriptPrinter : public wxPrinterBase +{ +public: + wxPostScriptPrinter(wxPrintDialogData *data = NULL); + virtual ~wxPostScriptPrinter(); + + virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true); + virtual wxDC* PrintDialog(wxWindow *parent); + virtual bool Setup(wxWindow *parent); + +private: + DECLARE_DYNAMIC_CLASS(wxPostScriptPrinter) +}; + +// ---------------------------------------------------------------------------- +// wxPrintPreview: programmer creates an object of this class to preview a +// wxPrintout. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPostScriptPrintPreview : public wxPrintPreviewBase +{ +public: + wxPostScriptPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting = NULL, + wxPrintDialogData *data = NULL); + wxPostScriptPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintData *data); + + virtual ~wxPostScriptPrintPreview(); + + virtual bool Print(bool interactive); + virtual void DetermineScaling(); + +private: + void Init(wxPrintout *printout, wxPrintout *printoutForPrinting); + +private: + DECLARE_CLASS(wxPostScriptPrintPreview) +}; + +#endif + +#endif +// __PRINTPSH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/grid.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/grid.h new file mode 100644 index 0000000000..7ef99700cf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/grid.h @@ -0,0 +1,948 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/private/grid.h +// Purpose: Private wxGrid structures +// Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) +// Modified by: Santiago Palacios +// Created: 1/08/1999 +// Copyright: (c) Michael Bedward +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_GRID_PRIVATE_H_ +#define _WX_GENERIC_GRID_PRIVATE_H_ + +#include "wx/defs.h" + +#if wxUSE_GRID + +// Internally used (and hence intentionally not exported) event telling wxGrid +// to hide the currently shown editor. +wxDECLARE_EVENT( wxEVT_GRID_HIDE_EDITOR, wxCommandEvent ); + +// ---------------------------------------------------------------------------- +// array classes +// ---------------------------------------------------------------------------- + +WX_DEFINE_ARRAY_WITH_DECL_PTR(wxGridCellAttr *, wxArrayAttrs, + class WXDLLIMPEXP_ADV); + +struct wxGridCellWithAttr +{ + wxGridCellWithAttr(int row, int col, wxGridCellAttr *attr_) + : coords(row, col), attr(attr_) + { + wxASSERT( attr ); + } + + wxGridCellWithAttr(const wxGridCellWithAttr& other) + : coords(other.coords), + attr(other.attr) + { + attr->IncRef(); + } + + wxGridCellWithAttr& operator=(const wxGridCellWithAttr& other) + { + coords = other.coords; + if (attr != other.attr) + { + attr->DecRef(); + attr = other.attr; + attr->IncRef(); + } + return *this; + } + + void ChangeAttr(wxGridCellAttr* new_attr) + { + if (attr != new_attr) + { + // "Delete" (i.e. DecRef) the old attribute. + attr->DecRef(); + attr = new_attr; + // Take ownership of the new attribute, i.e. no IncRef. + } + } + + ~wxGridCellWithAttr() + { + attr->DecRef(); + } + + wxGridCellCoords coords; + wxGridCellAttr *attr; +}; + +WX_DECLARE_OBJARRAY_WITH_DECL(wxGridCellWithAttr, wxGridCellWithAttrArray, + class WXDLLIMPEXP_ADV); + + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// header column providing access to the column information stored in wxGrid +// via wxHeaderColumn interface +class wxGridHeaderColumn : public wxHeaderColumn +{ +public: + wxGridHeaderColumn(wxGrid *grid, int col) + : m_grid(grid), + m_col(col) + { + } + + virtual wxString GetTitle() const { return m_grid->GetColLabelValue(m_col); } + virtual wxBitmap GetBitmap() const { return wxNullBitmap; } + virtual int GetWidth() const { return m_grid->GetColSize(m_col); } + virtual int GetMinWidth() const { return 0; } + virtual wxAlignment GetAlignment() const + { + int horz, + vert; + m_grid->GetColLabelAlignment(&horz, &vert); + + return static_cast(horz); + } + + virtual int GetFlags() const + { + // we can't know in advance whether we can sort by this column or not + // with wxGrid API so suppose we can by default + int flags = wxCOL_SORTABLE; + if ( m_grid->CanDragColSize(m_col) ) + flags |= wxCOL_RESIZABLE; + if ( m_grid->CanDragColMove() ) + flags |= wxCOL_REORDERABLE; + if ( GetWidth() == 0 ) + flags |= wxCOL_HIDDEN; + + return flags; + } + + virtual bool IsSortKey() const + { + return m_grid->IsSortingBy(m_col); + } + + virtual bool IsSortOrderAscending() const + { + return m_grid->IsSortOrderAscending(); + } + +private: + // these really should be const but are not because the column needs to be + // assignable to be used in a wxVector (in STL build, in non-STL build we + // avoid the need for this) + wxGrid *m_grid; + int m_col; +}; + +// header control retreiving column information from the grid +class wxGridHeaderCtrl : public wxHeaderCtrl +{ +public: + wxGridHeaderCtrl(wxGrid *owner) + : wxHeaderCtrl(owner, + wxID_ANY, + wxDefaultPosition, + wxDefaultSize, + wxHD_ALLOW_HIDE | + (owner->CanDragColMove() ? wxHD_ALLOW_REORDER : 0)) + { + } + +protected: + virtual const wxHeaderColumn& GetColumn(unsigned int idx) const + { + return m_columns[idx]; + } + +private: + wxGrid *GetOwner() const { return static_cast(GetParent()); } + + static wxMouseEvent GetDummyMouseEvent() + { + // make up a dummy event for the grid event to use -- unfortunately we + // can't do anything else here + wxMouseEvent e; + e.SetState(wxGetMouseState()); + return e; + } + + // override the base class method to update our m_columns array + virtual void OnColumnCountChanging(unsigned int count) + { + const unsigned countOld = m_columns.size(); + if ( count < countOld ) + { + // just discard the columns which don't exist any more (notice that + // we can't use resize() here as it would require the vector + // value_type, i.e. wxGridHeaderColumn to be default constructible, + // which it is not) + m_columns.erase(m_columns.begin() + count, m_columns.end()); + } + else // new columns added + { + // add columns for the new elements + for ( unsigned n = countOld; n < count; n++ ) + m_columns.push_back(wxGridHeaderColumn(GetOwner(), n)); + } + } + + // override to implement column auto sizing + virtual bool UpdateColumnWidthToFit(unsigned int idx, int widthTitle) + { + // TODO: currently grid doesn't support computing the column best width + // from its contents so we just use the best label width as is + GetOwner()->SetColSize(idx, widthTitle); + + return true; + } + + // overridden to react to the actions using the columns popup menu + virtual void UpdateColumnVisibility(unsigned int idx, bool show) + { + GetOwner()->SetColSize(idx, show ? wxGRID_AUTOSIZE : 0); + + // as this is done by the user we should notify the main program about + // it + GetOwner()->SendGridSizeEvent(wxEVT_GRID_COL_SIZE, -1, idx, + GetDummyMouseEvent()); + } + + // overridden to react to the columns order changes in the customization + // dialog + virtual void UpdateColumnsOrder(const wxArrayInt& order) + { + GetOwner()->SetColumnsOrder(order); + } + + + // event handlers forwarding wxHeaderCtrl events to wxGrid + void OnClick(wxHeaderCtrlEvent& event) + { + GetOwner()->SendEvent(wxEVT_GRID_LABEL_LEFT_CLICK, + -1, event.GetColumn(), + GetDummyMouseEvent()); + + GetOwner()->DoColHeaderClick(event.GetColumn()); + } + + void OnDoubleClick(wxHeaderCtrlEvent& event) + { + if ( !GetOwner()->SendEvent(wxEVT_GRID_LABEL_LEFT_DCLICK, + -1, event.GetColumn(), + GetDummyMouseEvent()) ) + { + event.Skip(); + } + } + + void OnRightClick(wxHeaderCtrlEvent& event) + { + if ( !GetOwner()->SendEvent(wxEVT_GRID_LABEL_RIGHT_CLICK, + -1, event.GetColumn(), + GetDummyMouseEvent()) ) + { + event.Skip(); + } + } + + void OnBeginResize(wxHeaderCtrlEvent& event) + { + GetOwner()->DoStartResizeCol(event.GetColumn()); + + event.Skip(); + } + + void OnResizing(wxHeaderCtrlEvent& event) + { + GetOwner()->DoUpdateResizeColWidth(event.GetWidth()); + } + + void OnEndResize(wxHeaderCtrlEvent& event) + { + // we again need to pass a mouse event to be used for the grid event + // generation but we don't have it here so use a dummy one as in + // UpdateColumnVisibility() + wxMouseEvent e; + e.SetState(wxGetMouseState()); + GetOwner()->DoEndDragResizeCol(e); + + event.Skip(); + } + + void OnBeginReorder(wxHeaderCtrlEvent& event) + { + GetOwner()->DoStartMoveCol(event.GetColumn()); + } + + void OnEndReorder(wxHeaderCtrlEvent& event) + { + GetOwner()->DoEndMoveCol(event.GetNewOrder()); + } + + wxVector m_columns; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxGridHeaderCtrl); +}; + +// common base class for various grid subwindows +class WXDLLIMPEXP_ADV wxGridSubwindow : public wxWindow +{ +public: + wxGridSubwindow(wxGrid *owner, + int additionalStyle = 0, + const wxString& name = wxPanelNameStr) + : wxWindow(owner, wxID_ANY, + wxDefaultPosition, wxDefaultSize, + wxBORDER_NONE | additionalStyle, + name) + { + m_owner = owner; + } + + virtual wxWindow *GetMainWindowOfCompositeControl() { return m_owner; } + + virtual bool AcceptsFocus() const { return false; } + + wxGrid *GetOwner() { return m_owner; } + +protected: + void OnMouseCaptureLost(wxMouseCaptureLostEvent& event); + + wxGrid *m_owner; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxGridSubwindow); +}; + +class WXDLLIMPEXP_ADV wxGridRowLabelWindow : public wxGridSubwindow +{ +public: + wxGridRowLabelWindow(wxGrid *parent) + : wxGridSubwindow(parent) + { + } + + +private: + void OnPaint( wxPaintEvent& event ); + void OnMouseEvent( wxMouseEvent& event ); + void OnMouseWheel( wxMouseEvent& event ); + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxGridRowLabelWindow); +}; + + +class WXDLLIMPEXP_ADV wxGridColLabelWindow : public wxGridSubwindow +{ +public: + wxGridColLabelWindow(wxGrid *parent) + : wxGridSubwindow(parent) + { + } + + +private: + void OnPaint( wxPaintEvent& event ); + void OnMouseEvent( wxMouseEvent& event ); + void OnMouseWheel( wxMouseEvent& event ); + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxGridColLabelWindow); +}; + + +class WXDLLIMPEXP_ADV wxGridCornerLabelWindow : public wxGridSubwindow +{ +public: + wxGridCornerLabelWindow(wxGrid *parent) + : wxGridSubwindow(parent) + { + } + +private: + void OnMouseEvent( wxMouseEvent& event ); + void OnMouseWheel( wxMouseEvent& event ); + void OnPaint( wxPaintEvent& event ); + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxGridCornerLabelWindow); +}; + +class WXDLLIMPEXP_ADV wxGridWindow : public wxGridSubwindow +{ +public: + wxGridWindow(wxGrid *parent) + : wxGridSubwindow(parent, + wxWANTS_CHARS | wxCLIP_CHILDREN, + "GridWindow") + { + } + + + virtual void ScrollWindow( int dx, int dy, const wxRect *rect ); + + virtual bool AcceptsFocus() const { return true; } + +private: + void OnPaint( wxPaintEvent &event ); + void OnMouseWheel( wxMouseEvent& event ); + void OnMouseEvent( wxMouseEvent& event ); + void OnKeyDown( wxKeyEvent& ); + void OnKeyUp( wxKeyEvent& ); + void OnChar( wxKeyEvent& ); + void OnEraseBackground( wxEraseEvent& ); + void OnFocus( wxFocusEvent& ); + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxGridWindow); +}; + +// ---------------------------------------------------------------------------- +// the internal data representation used by wxGridCellAttrProvider +// ---------------------------------------------------------------------------- + +// this class stores attributes set for cells +class WXDLLIMPEXP_ADV wxGridCellAttrData +{ +public: + void SetAttr(wxGridCellAttr *attr, int row, int col); + wxGridCellAttr *GetAttr(int row, int col) const; + void UpdateAttrRows( size_t pos, int numRows ); + void UpdateAttrCols( size_t pos, int numCols ); + +private: + // searches for the attr for given cell, returns wxNOT_FOUND if not found + int FindIndex(int row, int col) const; + + wxGridCellWithAttrArray m_attrs; +}; + +// this class stores attributes set for rows or columns +class WXDLLIMPEXP_ADV wxGridRowOrColAttrData +{ +public: + // empty ctor to suppress warnings + wxGridRowOrColAttrData() {} + ~wxGridRowOrColAttrData(); + + void SetAttr(wxGridCellAttr *attr, int rowOrCol); + wxGridCellAttr *GetAttr(int rowOrCol) const; + void UpdateAttrRowsOrCols( size_t pos, int numRowsOrCols ); + +private: + wxArrayInt m_rowsOrCols; + wxArrayAttrs m_attrs; +}; + +// NB: this is just a wrapper around 3 objects: one which stores cell +// attributes, and 2 others for row/col ones +class WXDLLIMPEXP_ADV wxGridCellAttrProviderData +{ +public: + wxGridCellAttrData m_cellAttrs; + wxGridRowOrColAttrData m_rowAttrs, + m_colAttrs; +}; + +// ---------------------------------------------------------------------------- +// operations classes abstracting the difference between operating on rows and +// columns +// ---------------------------------------------------------------------------- + +// This class allows to write a function only once because by using its methods +// it will apply to both columns and rows. +// +// This is an abstract interface definition, the two concrete implementations +// below should be used when working with rows and columns respectively. +class wxGridOperations +{ +public: + // Returns the operations in the other direction, i.e. wxGridRowOperations + // if this object is a wxGridColumnOperations and vice versa. + virtual wxGridOperations& Dual() const = 0; + + // Return the number of rows or columns. + virtual int GetNumberOfLines(const wxGrid *grid) const = 0; + + // Return the selection mode which allows selecting rows or columns. + virtual wxGrid::wxGridSelectionModes GetSelectionMode() const = 0; + + // Make a wxGridCellCoords from the given components: thisDir is row or + // column and otherDir is column or row + virtual wxGridCellCoords MakeCoords(int thisDir, int otherDir) const = 0; + + // Calculate the scrolled position of the given abscissa or ordinate. + virtual int CalcScrolledPosition(wxGrid *grid, int pos) const = 0; + + // Selects the horizontal or vertical component from the given object. + virtual int Select(const wxGridCellCoords& coords) const = 0; + virtual int Select(const wxPoint& pt) const = 0; + virtual int Select(const wxSize& sz) const = 0; + virtual int Select(const wxRect& r) const = 0; + virtual int& Select(wxRect& r) const = 0; + + // Returns width or height of the rectangle + virtual int& SelectSize(wxRect& r) const = 0; + + // Make a wxSize such that Select() applied to it returns first component + virtual wxSize MakeSize(int first, int second) const = 0; + + // Sets the row or column component of the given cell coordinates + virtual void Set(wxGridCellCoords& coords, int line) const = 0; + + + // Draws a line parallel to the row or column, i.e. horizontal or vertical: + // pos is the horizontal or vertical position of the line and start and end + // are the coordinates of the line extremities in the other direction + virtual void + DrawParallelLine(wxDC& dc, int start, int end, int pos) const = 0; + + // Draw a horizontal or vertical line across the given rectangle + // (this is implemented in terms of above and uses Select() to extract + // start and end from the given rectangle) + void DrawParallelLineInRect(wxDC& dc, const wxRect& rect, int pos) const + { + const int posStart = Select(rect.GetPosition()); + DrawParallelLine(dc, posStart, posStart + Select(rect.GetSize()), pos); + } + + + // Return the index of the row or column at the given pixel coordinate. + virtual int + PosToLine(const wxGrid *grid, int pos, bool clip = false) const = 0; + + // Get the top/left position, in pixels, of the given row or column + virtual int GetLineStartPos(const wxGrid *grid, int line) const = 0; + + // Get the bottom/right position, in pixels, of the given row or column + virtual int GetLineEndPos(const wxGrid *grid, int line) const = 0; + + // Get the height/width of the given row/column + virtual int GetLineSize(const wxGrid *grid, int line) const = 0; + + // Get wxGrid::m_rowBottoms/m_colRights array + virtual const wxArrayInt& GetLineEnds(const wxGrid *grid) const = 0; + + // Get default height row height or column width + virtual int GetDefaultLineSize(const wxGrid *grid) const = 0; + + // Return the minimal acceptable row height or column width + virtual int GetMinimalAcceptableLineSize(const wxGrid *grid) const = 0; + + // Return the minimal row height or column width + virtual int GetMinimalLineSize(const wxGrid *grid, int line) const = 0; + + // Set the row height or column width + virtual void SetLineSize(wxGrid *grid, int line, int size) const = 0; + + // Set the row default height or column default width + virtual void SetDefaultLineSize(wxGrid *grid, int size, bool resizeExisting) const = 0; + + + // Return the index of the line at the given position + // + // NB: currently this is always identity for the rows as reordering is only + // implemented for the lines + virtual int GetLineAt(const wxGrid *grid, int pos) const = 0; + + // Return the display position of the line with the given index. + // + // NB: As GetLineAt(), currently this is always identity for rows. + virtual int GetLinePos(const wxGrid *grid, int line) const = 0; + + // Return the index of the line just before the given one or wxNOT_FOUND. + virtual int GetLineBefore(const wxGrid* grid, int line) const = 0; + + // Get the row or column label window + virtual wxWindow *GetHeaderWindow(wxGrid *grid) const = 0; + + // Get the width or height of the row or column label window + virtual int GetHeaderWindowSize(wxGrid *grid) const = 0; + + + // This class is never used polymorphically but give it a virtual dtor + // anyhow to suppress g++ complaints about it + virtual ~wxGridOperations() { } +}; + +class wxGridRowOperations : public wxGridOperations +{ +public: + virtual wxGridOperations& Dual() const; + + virtual int GetNumberOfLines(const wxGrid *grid) const + { return grid->GetNumberRows(); } + + virtual wxGrid::wxGridSelectionModes GetSelectionMode() const + { return wxGrid::wxGridSelectRows; } + + virtual wxGridCellCoords MakeCoords(int thisDir, int otherDir) const + { return wxGridCellCoords(thisDir, otherDir); } + + virtual int CalcScrolledPosition(wxGrid *grid, int pos) const + { return grid->CalcScrolledPosition(wxPoint(pos, 0)).x; } + + virtual int Select(const wxGridCellCoords& c) const { return c.GetRow(); } + virtual int Select(const wxPoint& pt) const { return pt.x; } + virtual int Select(const wxSize& sz) const { return sz.x; } + virtual int Select(const wxRect& r) const { return r.x; } + virtual int& Select(wxRect& r) const { return r.x; } + virtual int& SelectSize(wxRect& r) const { return r.width; } + virtual wxSize MakeSize(int first, int second) const + { return wxSize(first, second); } + virtual void Set(wxGridCellCoords& coords, int line) const + { coords.SetRow(line); } + + virtual void DrawParallelLine(wxDC& dc, int start, int end, int pos) const + { dc.DrawLine(start, pos, end, pos); } + + virtual int PosToLine(const wxGrid *grid, int pos, bool clip = false) const + { return grid->YToRow(pos, clip); } + virtual int GetLineStartPos(const wxGrid *grid, int line) const + { return grid->GetRowTop(line); } + virtual int GetLineEndPos(const wxGrid *grid, int line) const + { return grid->GetRowBottom(line); } + virtual int GetLineSize(const wxGrid *grid, int line) const + { return grid->GetRowHeight(line); } + virtual const wxArrayInt& GetLineEnds(const wxGrid *grid) const + { return grid->m_rowBottoms; } + virtual int GetDefaultLineSize(const wxGrid *grid) const + { return grid->GetDefaultRowSize(); } + virtual int GetMinimalAcceptableLineSize(const wxGrid *grid) const + { return grid->GetRowMinimalAcceptableHeight(); } + virtual int GetMinimalLineSize(const wxGrid *grid, int line) const + { return grid->GetRowMinimalHeight(line); } + virtual void SetLineSize(wxGrid *grid, int line, int size) const + { grid->SetRowSize(line, size); } + virtual void SetDefaultLineSize(wxGrid *grid, int size, bool resizeExisting) const + { grid->SetDefaultRowSize(size, resizeExisting); } + + virtual int GetLineAt(const wxGrid * WXUNUSED(grid), int pos) const + { return pos; } // TODO: implement row reordering + virtual int GetLinePos(const wxGrid * WXUNUSED(grid), int line) const + { return line; } // TODO: implement row reordering + + virtual int GetLineBefore(const wxGrid* WXUNUSED(grid), int line) const + { return line - 1; } + + virtual wxWindow *GetHeaderWindow(wxGrid *grid) const + { return grid->GetGridRowLabelWindow(); } + virtual int GetHeaderWindowSize(wxGrid *grid) const + { return grid->GetRowLabelSize(); } +}; + +class wxGridColumnOperations : public wxGridOperations +{ +public: + virtual wxGridOperations& Dual() const; + + virtual int GetNumberOfLines(const wxGrid *grid) const + { return grid->GetNumberCols(); } + + virtual wxGrid::wxGridSelectionModes GetSelectionMode() const + { return wxGrid::wxGridSelectColumns; } + + virtual wxGridCellCoords MakeCoords(int thisDir, int otherDir) const + { return wxGridCellCoords(otherDir, thisDir); } + + virtual int CalcScrolledPosition(wxGrid *grid, int pos) const + { return grid->CalcScrolledPosition(wxPoint(0, pos)).y; } + + virtual int Select(const wxGridCellCoords& c) const { return c.GetCol(); } + virtual int Select(const wxPoint& pt) const { return pt.y; } + virtual int Select(const wxSize& sz) const { return sz.y; } + virtual int Select(const wxRect& r) const { return r.y; } + virtual int& Select(wxRect& r) const { return r.y; } + virtual int& SelectSize(wxRect& r) const { return r.height; } + virtual wxSize MakeSize(int first, int second) const + { return wxSize(second, first); } + virtual void Set(wxGridCellCoords& coords, int line) const + { coords.SetCol(line); } + + virtual void DrawParallelLine(wxDC& dc, int start, int end, int pos) const + { dc.DrawLine(pos, start, pos, end); } + + virtual int PosToLine(const wxGrid *grid, int pos, bool clip = false) const + { return grid->XToCol(pos, clip); } + virtual int GetLineStartPos(const wxGrid *grid, int line) const + { return grid->GetColLeft(line); } + virtual int GetLineEndPos(const wxGrid *grid, int line) const + { return grid->GetColRight(line); } + virtual int GetLineSize(const wxGrid *grid, int line) const + { return grid->GetColWidth(line); } + virtual const wxArrayInt& GetLineEnds(const wxGrid *grid) const + { return grid->m_colRights; } + virtual int GetDefaultLineSize(const wxGrid *grid) const + { return grid->GetDefaultColSize(); } + virtual int GetMinimalAcceptableLineSize(const wxGrid *grid) const + { return grid->GetColMinimalAcceptableWidth(); } + virtual int GetMinimalLineSize(const wxGrid *grid, int line) const + { return grid->GetColMinimalWidth(line); } + virtual void SetLineSize(wxGrid *grid, int line, int size) const + { grid->SetColSize(line, size); } + virtual void SetDefaultLineSize(wxGrid *grid, int size, bool resizeExisting) const + { grid->SetDefaultColSize(size, resizeExisting); } + + virtual int GetLineAt(const wxGrid *grid, int pos) const + { return grid->GetColAt(pos); } + virtual int GetLinePos(const wxGrid *grid, int line) const + { return grid->GetColPos(line); } + + virtual int GetLineBefore(const wxGrid* grid, int line) const + { + int posBefore = grid->GetColPos(line) - 1; + return posBefore >= 0 ? grid->GetColAt(posBefore) : wxNOT_FOUND; + } + + virtual wxWindow *GetHeaderWindow(wxGrid *grid) const + { return grid->GetGridColLabelWindow(); } + virtual int GetHeaderWindowSize(wxGrid *grid) const + { return grid->GetColLabelSize(); } +}; + +// This class abstracts the difference between operations going forward +// (down/right) and backward (up/left) and allows to use the same code for +// functions which differ only in the direction of grid traversal. +// +// Notice that all operations in this class work with display positions and not +// internal indices which can be different if the columns were reordered. +// +// Like wxGridOperations it's an ABC with two concrete subclasses below. Unlike +// it, this is a normal object and not just a function dispatch table and has a +// non-default ctor. +// +// Note: the explanation of this discrepancy is the existence of (very useful) +// Dual() method in wxGridOperations which forces us to make wxGridOperations a +// function dispatcher only. +class wxGridDirectionOperations +{ +public: + // The oper parameter to ctor selects whether we work with rows or columns + wxGridDirectionOperations(wxGrid *grid, const wxGridOperations& oper) + : m_grid(grid), + m_oper(oper) + { + } + + // Check if the component of this point in our direction is at the + // boundary, i.e. is the first/last row/column + virtual bool IsAtBoundary(const wxGridCellCoords& coords) const = 0; + + // Increment the component of this point in our direction + virtual void Advance(wxGridCellCoords& coords) const = 0; + + // Find the line at the given distance, in pixels, away from this one + // (this uses clipping, i.e. anything after the last line is counted as the + // last one and anything before the first one as 0) + // + // TODO: Implementation of this method currently doesn't support column + // reordering as it mixes up indices and positions. But this doesn't + // really matter as it's only called for rows (Page Up/Down only work + // vertically) and row reordering is not currently supported. We'd + // need to fix it if this ever changes however. + virtual int MoveByPixelDistance(int line, int distance) const = 0; + + // This class is never used polymorphically but give it a virtual dtor + // anyhow to suppress g++ complaints about it + virtual ~wxGridDirectionOperations() { } + +protected: + // Get the position of the row or column from the given coordinates pair. + // + // This is just a shortcut to avoid repeating m_oper and m_grid multiple + // times in the derived classes code. + int GetLinePos(const wxGridCellCoords& coords) const + { + return m_oper.GetLinePos(m_grid, m_oper.Select(coords)); + } + + // Get the index of the row or column from the position. + int GetLineAt(int pos) const + { + return m_oper.GetLineAt(m_grid, pos); + } + + // Check if the given line is visible, i.e. has non 0 size. + bool IsLineVisible(int line) const + { + return m_oper.GetLineSize(m_grid, line) != 0; + } + + + wxGrid * const m_grid; + const wxGridOperations& m_oper; +}; + +class wxGridBackwardOperations : public wxGridDirectionOperations +{ +public: + wxGridBackwardOperations(wxGrid *grid, const wxGridOperations& oper) + : wxGridDirectionOperations(grid, oper) + { + } + + virtual bool IsAtBoundary(const wxGridCellCoords& coords) const + { + wxASSERT_MSG( m_oper.Select(coords) >= 0, "invalid row/column" ); + + int pos = GetLinePos(coords); + while ( pos ) + { + // Check the previous line. + int line = GetLineAt(--pos); + if ( IsLineVisible(line) ) + { + // There is another visible line before this one, hence it's + // not at boundary. + return false; + } + } + + // We reached the boundary without finding any visible lines. + return true; + } + + virtual void Advance(wxGridCellCoords& coords) const + { + int pos = GetLinePos(coords); + for ( ;; ) + { + // This is not supposed to happen if IsAtBoundary() returned false. + wxCHECK_RET( pos, "can't advance when already at boundary" ); + + int line = GetLineAt(--pos); + if ( IsLineVisible(line) ) + { + m_oper.Set(coords, line); + break; + } + } + } + + virtual int MoveByPixelDistance(int line, int distance) const + { + int pos = m_oper.GetLineStartPos(m_grid, line); + return m_oper.PosToLine(m_grid, pos - distance + 1, true); + } +}; + +// Please refer to the comments above when reading this class code, it's +// absolutely symmetrical to wxGridBackwardOperations. +class wxGridForwardOperations : public wxGridDirectionOperations +{ +public: + wxGridForwardOperations(wxGrid *grid, const wxGridOperations& oper) + : wxGridDirectionOperations(grid, oper), + m_numLines(oper.GetNumberOfLines(grid)) + { + } + + virtual bool IsAtBoundary(const wxGridCellCoords& coords) const + { + wxASSERT_MSG( m_oper.Select(coords) < m_numLines, "invalid row/column" ); + + int pos = GetLinePos(coords); + while ( pos < m_numLines - 1 ) + { + int line = GetLineAt(++pos); + if ( IsLineVisible(line) ) + return false; + } + + return true; + } + + virtual void Advance(wxGridCellCoords& coords) const + { + int pos = GetLinePos(coords); + for ( ;; ) + { + wxCHECK_RET( pos < m_numLines - 1, + "can't advance when already at boundary" ); + + int line = GetLineAt(++pos); + if ( IsLineVisible(line) ) + { + m_oper.Set(coords, line); + break; + } + } + } + + virtual int MoveByPixelDistance(int line, int distance) const + { + int pos = m_oper.GetLineStartPos(m_grid, line); + return m_oper.PosToLine(m_grid, pos + distance, true); + } + +private: + const int m_numLines; +}; + +// ---------------------------------------------------------------------------- +// data structures used for the data type registry +// ---------------------------------------------------------------------------- + +struct wxGridDataTypeInfo +{ + wxGridDataTypeInfo(const wxString& typeName, + wxGridCellRenderer* renderer, + wxGridCellEditor* editor) + : m_typeName(typeName), m_renderer(renderer), m_editor(editor) + {} + + ~wxGridDataTypeInfo() + { + wxSafeDecRef(m_renderer); + wxSafeDecRef(m_editor); + } + + wxString m_typeName; + wxGridCellRenderer* m_renderer; + wxGridCellEditor* m_editor; + + wxDECLARE_NO_COPY_CLASS(wxGridDataTypeInfo); +}; + + +WX_DEFINE_ARRAY_WITH_DECL_PTR(wxGridDataTypeInfo*, wxGridDataTypeInfoArray, + class WXDLLIMPEXP_ADV); + + +class WXDLLIMPEXP_ADV wxGridTypeRegistry +{ +public: + wxGridTypeRegistry() {} + ~wxGridTypeRegistry(); + + void RegisterDataType(const wxString& typeName, + wxGridCellRenderer* renderer, + wxGridCellEditor* editor); + + // find one of already registered data types + int FindRegisteredDataType(const wxString& typeName); + + // try to FindRegisteredDataType(), if this fails and typeName is one of + // standard typenames, register it and return its index + int FindDataType(const wxString& typeName); + + // try to FindDataType(), if it fails see if it is not one of already + // registered data types with some params in which case clone the + // registered data type and set params for it + int FindOrCloneDataType(const wxString& typeName); + + wxGridCellRenderer* GetRenderer(int index); + wxGridCellEditor* GetEditor(int index); + +private: + wxGridDataTypeInfoArray m_typeinfo; +}; + +#endif // wxUSE_GRID +#endif // _WX_GENERIC_GRID_PRIVATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/listctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/listctrl.h new file mode 100644 index 0000000000..32afaada6f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/listctrl.h @@ -0,0 +1,866 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/private/listctrl.h +// Purpose: private definitions of wxListCtrl helpers +// Author: Robert Roebling +// Vadim Zeitlin (virtual list control support) +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_LISTCTRL_PRIVATE_H_ +#define _WX_GENERIC_LISTCTRL_PRIVATE_H_ + +#include "wx/defs.h" + +#if wxUSE_LISTCTRL + +#include "wx/listctrl.h" +#include "wx/selstore.h" +#include "wx/timer.h" +#include "wx/settings.h" + +// ============================================================================ +// private classes +// ============================================================================ + +//----------------------------------------------------------------------------- +// wxColWidthInfo (internal) +//----------------------------------------------------------------------------- + +struct wxColWidthInfo +{ + int nMaxWidth; + bool bNeedsUpdate; // only set to true when an item whose + // width == nMaxWidth is removed + + wxColWidthInfo(int w = 0, bool needsUpdate = false) + { + nMaxWidth = w; + bNeedsUpdate = needsUpdate; + } +}; + +WX_DEFINE_ARRAY_PTR(wxColWidthInfo *, ColWidthArray); + +//----------------------------------------------------------------------------- +// wxListItemData (internal) +//----------------------------------------------------------------------------- + +class wxListItemData +{ +public: + wxListItemData(wxListMainWindow *owner); + ~wxListItemData(); + + void SetItem( const wxListItem &info ); + void SetImage( int image ) { m_image = image; } + void SetData( wxUIntPtr data ) { m_data = data; } + void SetPosition( int x, int y ); + void SetSize( int width, int height ); + + bool HasText() const { return !m_text.empty(); } + const wxString& GetText() const { return m_text; } + void SetText(const wxString& text) { m_text = text; } + + // we can't use empty string for measuring the string width/height, so + // always return something + wxString GetTextForMeasuring() const + { + wxString s = GetText(); + if ( s.empty() ) + s = wxT('H'); + + return s; + } + + bool IsHit( int x, int y ) const; + + int GetX() const; + int GetY() const; + int GetWidth() const; + int GetHeight() const; + + int GetImage() const { return m_image; } + bool HasImage() const { return GetImage() != -1; } + + void GetItem( wxListItem &info ) const; + + void SetAttr(wxListItemAttr *attr) { m_attr = attr; } + wxListItemAttr *GetAttr() const { return m_attr; } + +public: + // the item image or -1 + int m_image; + + // user data associated with the item + wxUIntPtr m_data; + + // the item coordinates are not used in report mode; instead this pointer is + // NULL and the owner window is used to retrieve the item position and size + wxRect *m_rect; + + // the list ctrl we are in + wxListMainWindow *m_owner; + + // custom attributes or NULL + wxListItemAttr *m_attr; + +protected: + // common part of all ctors + void Init(); + + wxString m_text; +}; + +//----------------------------------------------------------------------------- +// wxListHeaderData (internal) +//----------------------------------------------------------------------------- + +class wxListHeaderData : public wxObject +{ +public: + wxListHeaderData(); + wxListHeaderData( const wxListItem &info ); + void SetItem( const wxListItem &item ); + void SetPosition( int x, int y ); + void SetWidth( int w ); + void SetState( int state ); + void SetFormat( int format ); + void SetHeight( int h ); + bool HasImage() const; + + bool HasText() const { return !m_text.empty(); } + const wxString& GetText() const { return m_text; } + void SetText(const wxString& text) { m_text = text; } + + void GetItem( wxListItem &item ); + + bool IsHit( int x, int y ) const; + int GetImage() const; + int GetWidth() const; + int GetFormat() const; + int GetState() const; + +protected: + long m_mask; + int m_image; + wxString m_text; + int m_format; + int m_width; + int m_xpos, + m_ypos; + int m_height; + int m_state; + +private: + void Init(); +}; + +//----------------------------------------------------------------------------- +// wxListLineData (internal) +//----------------------------------------------------------------------------- + +WX_DECLARE_LIST(wxListItemData, wxListItemDataList); + +class wxListLineData +{ +public: + // the list of subitems: only may have more than one item in report mode + wxListItemDataList m_items; + + // this is not used in report view + struct GeometryInfo + { + // total item rect + wxRect m_rectAll; + + // label only + wxRect m_rectLabel; + + // icon only + wxRect m_rectIcon; + + // the part to be highlighted + wxRect m_rectHighlight; + + // extend all our rects to be centered inside the one of given width + void ExtendWidth(wxCoord w) + { + wxASSERT_MSG( m_rectAll.width <= w, + wxT("width can only be increased") ); + + m_rectAll.width = w; + m_rectLabel.x = m_rectAll.x + (w - m_rectLabel.width) / 2; + m_rectIcon.x = m_rectAll.x + (w - m_rectIcon.width) / 2; + m_rectHighlight.x = m_rectAll.x + (w - m_rectHighlight.width) / 2; + } + } + *m_gi; + + // is this item selected? [NB: not used in virtual mode] + bool m_highlighted; + + // back pointer to the list ctrl + wxListMainWindow *m_owner; + +public: + wxListLineData(wxListMainWindow *owner); + + ~wxListLineData() + { + WX_CLEAR_LIST(wxListItemDataList, m_items); + delete m_gi; + } + + // called by the owner when it toggles report view + void SetReportView(bool inReportView) + { + // we only need m_gi when we're not in report view so update as needed + if ( inReportView ) + { + delete m_gi; + m_gi = NULL; + } + else + { + m_gi = new GeometryInfo; + } + } + + // are we in report mode? + inline bool InReportView() const; + + // are we in virtual report mode? + inline bool IsVirtual() const; + + // these 2 methods shouldn't be called for report view controls, in that + // case we determine our position/size ourselves + + // calculate the size of the line + void CalculateSize( wxDC *dc, int spacing ); + + // remember the position this line appears at + void SetPosition( int x, int y, int spacing ); + + // wxListCtrl API + + void SetImage( int image ) { SetImage(0, image); } + int GetImage() const { return GetImage(0); } + void SetImage( int index, int image ); + int GetImage( int index ) const; + + bool HasImage() const { return GetImage() != -1; } + bool HasText() const { return !GetText(0).empty(); } + + void SetItem( int index, const wxListItem &info ); + void GetItem( int index, wxListItem &info ); + + wxString GetText(int index) const; + void SetText( int index, const wxString& s ); + + wxListItemAttr *GetAttr() const; + void SetAttr(wxListItemAttr *attr); + + // return true if the highlighting really changed + bool Highlight( bool on ); + + void ReverseHighlight(); + + bool IsHighlighted() const + { + wxASSERT_MSG( !IsVirtual(), wxT("unexpected call to IsHighlighted") ); + + return m_highlighted; + } + + // draw the line on the given DC in icon/list mode + void Draw( wxDC *dc, bool current ); + + // the same in report mode: it needs more parameters as we don't store + // everything in the item in report mode + void DrawInReportMode( wxDC *dc, + const wxRect& rect, + const wxRect& rectHL, + bool highlighted, + bool current ); + +private: + // set the line to contain num items (only can be > 1 in report mode) + void InitItems( int num ); + + // get the mode (i.e. style) of the list control + inline int GetMode() const; + + // Apply this item attributes to the given DC: set the text font and colour + // and also erase the background appropriately. + void ApplyAttributes(wxDC *dc, + const wxRect& rectHL, + bool highlighted, + bool current); + + // draw the text on the DC with the correct justification; also add an + // ellipsis if the text is too large to fit in the current width + void DrawTextFormatted(wxDC *dc, + const wxString &text, + int col, + int x, + int yMid, // this is middle, not top, of the text + int width); +}; + +WX_DECLARE_OBJARRAY(wxListLineData, wxListLineDataArray); + +//----------------------------------------------------------------------------- +// wxListHeaderWindow (internal) +//----------------------------------------------------------------------------- + +class wxListHeaderWindow : public wxWindow +{ +protected: + wxListMainWindow *m_owner; + const wxCursor *m_currentCursor; + wxCursor *m_resizeCursor; + bool m_isDragging; + + // column being resized or -1 + int m_column; + + // divider line position in logical (unscrolled) coords + int m_currentX; + + // minimal position beyond which the divider line + // can't be dragged in logical coords + int m_minX; + +public: + wxListHeaderWindow(); + + // We provide only Create(), not the ctor, because we need to create the + // C++ object before creating the window, see the explanations in + // CreateOrDestroyHeaderWindowAsNeeded() + bool Create( wxWindow *win, + wxWindowID id, + wxListMainWindow *owner, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = wxT("wxlistctrlcolumntitles") ); + + virtual ~wxListHeaderWindow(); + + // We never need focus as we don't have any keyboard interface. + virtual bool AcceptsFocus() const { return false; } + + void DrawCurrent(); + void AdjustDC( wxDC& dc ); + + void OnPaint( wxPaintEvent &event ); + void OnMouse( wxMouseEvent &event ); + + // needs refresh + bool m_dirty; + + // Update main window's column later + bool m_sendSetColumnWidth; + int m_colToSend; + int m_widthToSend; + + virtual void OnInternalIdle(); + +private: + // common part of all ctors + void Init(); + + // generate and process the list event of the given type, return true if + // it wasn't vetoed, i.e. if we should proceed + bool SendListEvent(wxEventType type, const wxPoint& pos); + + DECLARE_EVENT_TABLE() +}; + +//----------------------------------------------------------------------------- +// wxListRenameTimer (internal) +//----------------------------------------------------------------------------- + +class wxListRenameTimer: public wxTimer +{ +private: + wxListMainWindow *m_owner; + +public: + wxListRenameTimer( wxListMainWindow *owner ); + void Notify(); +}; + +//----------------------------------------------------------------------------- +// wxListFindTimer (internal) +//----------------------------------------------------------------------------- + +class wxListFindTimer: public wxTimer +{ +public: + // reset the current prefix after half a second of inactivity + enum { DELAY = 500 }; + + wxListFindTimer( wxListMainWindow *owner ) + : m_owner(owner) + { + } + + virtual void Notify(); + +private: + wxListMainWindow *m_owner; +}; + +//----------------------------------------------------------------------------- +// wxListTextCtrlWrapper: wraps a wxTextCtrl to make it work for inline editing +//----------------------------------------------------------------------------- + +class wxListTextCtrlWrapper : public wxEvtHandler +{ +public: + // NB: text must be a valid object but not Create()d yet + wxListTextCtrlWrapper(wxListMainWindow *owner, + wxTextCtrl *text, + size_t itemEdit); + + wxTextCtrl *GetText() const { return m_text; } + + // Check if the given key event should stop editing and return true if it + // does or false otherwise. + bool CheckForEndEditKey(const wxKeyEvent& event); + + // Different reasons for calling EndEdit(): + // + // It was called because: + enum EndReason + { + End_Accept, // user has accepted the changes. + End_Discard, // user has cancelled editing. + End_Destroy // the entire control is being destroyed. + }; + + void EndEdit(EndReason reason); + +protected: + void OnChar( wxKeyEvent &event ); + void OnKeyUp( wxKeyEvent &event ); + void OnKillFocus( wxFocusEvent &event ); + + bool AcceptChanges(); + void Finish( bool setfocus ); + +private: + wxListMainWindow *m_owner; + wxTextCtrl *m_text; + wxString m_startValue; + size_t m_itemEdited; + bool m_aboutToFinish; + + DECLARE_EVENT_TABLE() +}; + +//----------------------------------------------------------------------------- +// wxListMainWindow (internal) +//----------------------------------------------------------------------------- + +WX_DECLARE_LIST(wxListHeaderData, wxListHeaderDataList); + +class wxListMainWindow : public wxWindow +{ +public: + wxListMainWindow(); + wxListMainWindow( wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size ); + + virtual ~wxListMainWindow(); + + // called by the main control when its mode changes + void SetReportView(bool inReportView); + + // helper to simplify testing for wxLC_XXX flags + bool HasFlag(int flag) const { return m_parent->HasFlag(flag); } + + // return true if this is a virtual list control + bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); } + + // return true if the control is in report mode + bool InReportView() const { return HasFlag(wxLC_REPORT); } + + // return true if we are in single selection mode, false if multi sel + bool IsSingleSel() const { return HasFlag(wxLC_SINGLE_SEL); } + + // do we have a header window? + bool HasHeader() const + { return InReportView() && !HasFlag(wxLC_NO_HEADER); } + + void HighlightAll( bool on ); + + // all these functions only do something if the line is currently visible + + // change the line "selected" state, return true if it really changed + bool HighlightLine( size_t line, bool highlight = true); + + // as HighlightLine() but do it for the range of lines: this is incredibly + // more efficient for virtual list controls! + // + // NB: unlike HighlightLine() this one does refresh the lines on screen + void HighlightLines( size_t lineFrom, size_t lineTo, bool on = true ); + + // toggle the line state and refresh it + void ReverseHighlight( size_t line ) + { HighlightLine(line, !IsHighlighted(line)); RefreshLine(line); } + + // return true if the line is highlighted + bool IsHighlighted(size_t line) const; + + // refresh one or several lines at once + void RefreshLine( size_t line ); + void RefreshLines( size_t lineFrom, size_t lineTo ); + + // refresh all selected items + void RefreshSelected(); + + // refresh all lines below the given one: the difference with + // RefreshLines() is that the index here might not be a valid one (happens + // when the last line is deleted) + void RefreshAfter( size_t lineFrom ); + + // the methods which are forwarded to wxListLineData itself in list/icon + // modes but are here because the lines don't store their positions in the + // report mode + + // get the bound rect for the entire line + wxRect GetLineRect(size_t line) const; + + // get the bound rect of the label + wxRect GetLineLabelRect(size_t line) const; + + // get the bound rect of the items icon (only may be called if we do have + // an icon!) + wxRect GetLineIconRect(size_t line) const; + + // get the rect to be highlighted when the item has focus + wxRect GetLineHighlightRect(size_t line) const; + + // get the size of the total line rect + wxSize GetLineSize(size_t line) const + { return GetLineRect(line).GetSize(); } + + // return the hit code for the corresponding position (in this line) + long HitTestLine(size_t line, int x, int y) const; + + // bring the selected item into view, scrolling to it if necessary + void MoveToItem(size_t item); + + bool ScrollList( int WXUNUSED(dx), int dy ); + + // bring the current item into view + void MoveToFocus() { MoveToItem(m_current); } + + // start editing the label of the given item + wxTextCtrl *EditLabel(long item, + wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl)); + wxTextCtrl *GetEditControl() const + { + return m_textctrlWrapper ? m_textctrlWrapper->GetText() : NULL; + } + + void ResetTextControl(wxTextCtrl *text) + { + delete text; + m_textctrlWrapper = NULL; + } + + void OnRenameTimer(); + bool OnRenameAccept(size_t itemEdit, const wxString& value); + void OnRenameCancelled(size_t itemEdit); + + void OnFindTimer(); + // set whether or not to ring the find bell + // (does nothing on MSW - bell is always rung) + void EnableBellOnNoMatch( bool on ); + + void OnMouse( wxMouseEvent &event ); + + // called to switch the selection from the current item to newCurrent, + void OnArrowChar( size_t newCurrent, const wxKeyEvent& event ); + + void OnCharHook( wxKeyEvent &event ); + void OnChar( wxKeyEvent &event ); + void OnKeyDown( wxKeyEvent &event ); + void OnKeyUp( wxKeyEvent &event ); + void OnSetFocus( wxFocusEvent &event ); + void OnKillFocus( wxFocusEvent &event ); + void OnScroll( wxScrollWinEvent& event ); + + void OnPaint( wxPaintEvent &event ); + + void OnChildFocus(wxChildFocusEvent& event); + + void DrawImage( int index, wxDC *dc, int x, int y ); + void GetImageSize( int index, int &width, int &height ) const; + + void SetImageList( wxImageList *imageList, int which ); + void SetItemSpacing( int spacing, bool isSmall = false ); + int GetItemSpacing( bool isSmall = false ); + + void SetColumn( int col, const wxListItem &item ); + void SetColumnWidth( int col, int width ); + void GetColumn( int col, wxListItem &item ) const; + int GetColumnWidth( int col ) const; + int GetColumnCount() const { return m_columns.GetCount(); } + + // returns the sum of the heights of all columns + int GetHeaderWidth() const; + + int GetCountPerPage() const; + + void SetItem( wxListItem &item ); + void GetItem( wxListItem &item ) const; + void SetItemState( long item, long state, long stateMask ); + void SetItemStateAll( long state, long stateMask ); + int GetItemState( long item, long stateMask ) const; + bool GetItemRect( long item, wxRect &rect ) const + { + return GetSubItemRect(item, wxLIST_GETSUBITEMRECT_WHOLEITEM, rect); + } + bool GetSubItemRect( long item, long subItem, wxRect& rect ) const; + wxRect GetViewRect() const; + bool GetItemPosition( long item, wxPoint& pos ) const; + int GetSelectedItemCount() const; + + wxString GetItemText(long item, int col = 0) const + { + wxListItem info; + info.m_mask = wxLIST_MASK_TEXT; + info.m_itemId = item; + info.m_col = col; + GetItem( info ); + return info.m_text; + } + + void SetItemText(long item, const wxString& value) + { + wxListItem info; + info.m_mask = wxLIST_MASK_TEXT; + info.m_itemId = item; + info.m_text = value; + SetItem( info ); + } + + wxImageList* GetSmallImageList() const + { return m_small_image_list; } + + // set the scrollbars and update the positions of the items + void RecalculatePositions(bool noRefresh = false); + + // refresh the window and the header + void RefreshAll(); + + long GetNextItem( long item, int geometry, int state ) const; + void DeleteItem( long index ); + void DeleteAllItems(); + void DeleteColumn( int col ); + void DeleteEverything(); + void EnsureVisible( long index ); + long FindItem( long start, const wxString& str, bool partial = false ); + long FindItem( long start, wxUIntPtr data); + long FindItem( const wxPoint& pt ); + long HitTest( int x, int y, int &flags ) const; + void InsertItem( wxListItem &item ); + long InsertColumn( long col, const wxListItem &item ); + int GetItemWidthWithImage(wxListItem * item); + void SortItems( wxListCtrlCompare fn, wxIntPtr data ); + + size_t GetItemCount() const; + bool IsEmpty() const { return GetItemCount() == 0; } + void SetItemCount(long count); + + // change the current (== focused) item, send a notification event + void ChangeCurrent(size_t current); + void ResetCurrent() { ChangeCurrent((size_t)-1); } + bool HasCurrent() const { return m_current != (size_t)-1; } + + // send out a wxListEvent + void SendNotify( size_t line, + wxEventType command, + const wxPoint& point = wxDefaultPosition ); + + // override base class virtual to reset m_lineHeight when the font changes + virtual bool SetFont(const wxFont& font) + { + if ( !wxWindow::SetFont(font) ) + return false; + + m_lineHeight = 0; + + return true; + } + + // these are for wxListLineData usage only + + // get the backpointer to the list ctrl + wxGenericListCtrl *GetListCtrl() const + { + return wxStaticCast(GetParent(), wxGenericListCtrl); + } + + // get the height of all lines (assuming they all do have the same height) + wxCoord GetLineHeight() const; + + // get the y position of the given line (only for report view) + wxCoord GetLineY(size_t line) const; + + // get the brush to use for the item highlighting + wxBrush *GetHighlightBrush() const + { + return m_hasFocus ? m_highlightBrush : m_highlightUnfocusedBrush; + } + + bool HasFocus() const + { + return m_hasFocus; + } + +protected: + // the array of all line objects for a non virtual list control (for the + // virtual list control we only ever use m_lines[0]) + wxListLineDataArray m_lines; + + // the list of column objects + wxListHeaderDataList m_columns; + + // currently focused item or -1 + size_t m_current; + + // the number of lines per page + int m_linesPerPage; + + // this flag is set when something which should result in the window + // redrawing happens (i.e. an item was added or deleted, or its appearance + // changed) and OnPaint() doesn't redraw the window while it is set which + // allows to minimize the number of repaintings when a lot of items are + // being added. The real repainting occurs only after the next OnIdle() + // call + bool m_dirty; + + wxColour *m_highlightColour; + wxImageList *m_small_image_list; + wxImageList *m_normal_image_list; + int m_small_spacing; + int m_normal_spacing; + bool m_hasFocus; + + bool m_lastOnSame; + wxTimer *m_renameTimer; + + // incremental search data + wxString m_findPrefix; + wxTimer *m_findTimer; + // This flag is set to 0 if the bell is disabled, 1 if it is enabled and -1 + // if it is globally enabled but has been temporarily disabled because we + // had already beeped for this particular search. + int m_findBell; + + bool m_isCreated; + int m_dragCount; + wxPoint m_dragStart; + ColWidthArray m_aColWidths; + + // for double click logic + size_t m_lineLastClicked, + m_lineBeforeLastClicked, + m_lineSelectSingleOnUp; + +protected: + wxWindow *GetMainWindowOfCompositeControl() { return GetParent(); } + + // the total count of items in a virtual list control + size_t m_countVirt; + + // the object maintaining the items selection state, only used in virtual + // controls + wxSelectionStore m_selStore; + + // common part of all ctors + void Init(); + + // get the line data for the given index + wxListLineData *GetLine(size_t n) const + { + wxASSERT_MSG( n != (size_t)-1, wxT("invalid line index") ); + + if ( IsVirtual() ) + { + wxConstCast(this, wxListMainWindow)->CacheLineData(n); + n = 0; + } + + return &m_lines[n]; + } + + // get a dummy line which can be used for geometry calculations and such: + // you must use GetLine() if you want to really draw the line + wxListLineData *GetDummyLine() const; + + // cache the line data of the n-th line in m_lines[0] + void CacheLineData(size_t line); + + // get the range of visible lines + void GetVisibleLinesRange(size_t *from, size_t *to); + + // force us to recalculate the range of visible lines + void ResetVisibleLinesRange() { m_lineFrom = (size_t)-1; } + + // find the first item starting with the given prefix after the given item + size_t PrefixFindItem(size_t item, const wxString& prefix) const; + + // get the colour to be used for drawing the rules + wxColour GetRuleColour() const + { + return wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT); + } + +private: + // initialize the current item if needed + void UpdateCurrent(); + + // delete all items but don't refresh: called from dtor + void DoDeleteAllItems(); + + // Compute the minimal width needed to fully display the column header. + int ComputeMinHeaderWidth(const wxListHeaderData* header) const; + + + // the height of one line using the current font + wxCoord m_lineHeight; + + // the total header width or 0 if not calculated yet + wxCoord m_headerWidth; + + // the first and last lines being shown on screen right now (inclusive), + // both may be -1 if they must be calculated so never access them directly: + // use GetVisibleLinesRange() above instead + size_t m_lineFrom, + m_lineTo; + + // the brushes to use for item highlighting when we do/don't have focus + wxBrush *m_highlightBrush, + *m_highlightUnfocusedBrush; + + // wrapper around the text control currently used for in place editing or + // NULL if no item is being edited + wxListTextCtrlWrapper *m_textctrlWrapper; + + + DECLARE_EVENT_TABLE() + + friend class wxGenericListCtrl; +}; + +#endif // wxUSE_LISTCTRL +#endif // _WX_GENERIC_LISTCTRL_PRIVATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/markuptext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/markuptext.h new file mode 100644 index 0000000000..1d9569229e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/markuptext.h @@ -0,0 +1,77 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/private/markuptext.h +// Purpose: Generic wxMarkupText class for managing text with markup. +// Author: Vadim Zeitlin +// Created: 2011-02-21 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_PRIVATE_MARKUPTEXT_H_ +#define _WX_GENERIC_PRIVATE_MARKUPTEXT_H_ + +#include "wx/defs.h" + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxRect; + +// ---------------------------------------------------------------------------- +// wxMarkupText: allows to measure and draw the text containing markup. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMarkupText +{ +public: + // Constants for Render() flags. + enum + { + Render_Default = 0, // Don't show mnemonics visually. + Render_ShowAccels = 1 // Underline mnemonics. + }; + + + // Initialize with the given string containing markup (which is supposed to + // be valid, the caller must check for it before constructing this object). + // + // Notice that the usual rules for mnemonics apply to the markup text: if + // it contains any '&' characters they must be escaped by doubling them, + // otherwise they indicate that the next character is the mnemonic for this + // field. + // + // TODO-MULTILINE-MARKUP: Currently only single line labels are supported, + // search for other occurrences of this comment to find the places which + // need to be updated to support multiline labels with markup. + wxMarkupText(const wxString& markup) + : m_markup(markup) + { + } + + // Default copy ctor, assignment operator and dtor are ok. + + // Update the markup string. + // + // The same rules for mnemonics as in the ctor apply to this string. + void SetMarkup(const wxString& markup) { m_markup = markup; } + + + // Return the width and height required by the given string and optionally + // the height of the visible part above the baseline (i.e. ascent minus + // internal leading). + // + // The font currently selected into the DC is used for measuring (notice + // that it is changed by this function but normally -- i.e. if markup is + // valid -- restored to its original value when it returns). + wxSize Measure(wxDC& dc, int *visibleHeight = NULL) const; + + // Render the markup string into the given DC in the specified rectangle. + // + // Notice that while the function uses the provided rectangle for alignment + // (it centers the text in it), no clipping is done by it so use Measure() + // and set the clipping region before rendering if necessary. + void Render(wxDC& dc, const wxRect& rect, int flags); + +private: + wxString m_markup; +}; + +#endif // _WX_GENERIC_PRIVATE_MARKUPTEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/richtooltip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/richtooltip.h new file mode 100644 index 0000000000..ad356f51f8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/richtooltip.h @@ -0,0 +1,64 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/private/richtooltip.h +// Purpose: wxRichToolTipGenericImpl declaration. +// Author: Vadim Zeitlin +// Created: 2011-10-18 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_ +#define _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_ + +#include "wx/icon.h" +#include "wx/colour.h" + +// ---------------------------------------------------------------------------- +// wxRichToolTipGenericImpl: defines generic wxRichToolTip implementation. +// ---------------------------------------------------------------------------- + +class wxRichToolTipGenericImpl : public wxRichToolTipImpl +{ +public: + wxRichToolTipGenericImpl(const wxString& title, const wxString& message) : + m_title(title), + m_message(message) + { + m_tipKind = wxTipKind_Auto; + + // This is pretty arbitrary, we could follow MSW and use some multiple + // of double-click time here. + m_timeout = 5000; + m_delay = 0; + } + + virtual void SetBackgroundColour(const wxColour& col, + const wxColour& colEnd); + virtual void SetCustomIcon(const wxIcon& icon); + virtual void SetStandardIcon(int icon); + virtual void SetTimeout(unsigned milliseconds, + unsigned millisecondsDelay = 0); + virtual void SetTipKind(wxTipKind tipKind); + virtual void SetTitleFont(const wxFont& font); + + virtual void ShowFor(wxWindow* win, const wxRect* rect = NULL); + +protected: + wxString m_title, + m_message; + +private: + wxIcon m_icon; + + wxColour m_colStart, + m_colEnd; + + unsigned m_timeout, + m_delay; + + wxTipKind m_tipKind; + + wxFont m_titleFont; +}; + +#endif // _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/textmeasure.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/textmeasure.h new file mode 100644 index 0000000000..2b31d02831 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/textmeasure.h @@ -0,0 +1,39 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/private/textmeasure.h +// Purpose: Generic wxTextMeasure declaration. +// Author: Vadim Zeitlin +// Created: 2012-10-17 +// Copyright: (c) 1997-2012 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_PRIVATE_TEXTMEASURE_H_ +#define _WX_GENERIC_PRIVATE_TEXTMEASURE_H_ + +// ---------------------------------------------------------------------------- +// wxTextMeasure for the platforms without native support. +// ---------------------------------------------------------------------------- + +class wxTextMeasure : public wxTextMeasureBase +{ +public: + wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL) + : wxTextMeasureBase(dc, font) {} + wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL) + : wxTextMeasureBase(win, font) {} + +protected: + virtual void DoGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL); + + virtual bool DoGetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX); + + wxDECLARE_NO_COPY_CLASS(wxTextMeasure); +}; + +#endif // _WX_GENERIC_PRIVATE_TEXTMEASURE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/timer.h new file mode 100644 index 0000000000..6d96389ce8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/private/timer.h @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/private/timer.h +// Purpose: Generic implementation of wxTimer class +// Author: Vaclav Slavik +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_PRIVATE_TIMER_H_ +#define _WX_GENERIC_PRIVATE_TIMER_H_ + +#if wxUSE_TIMER + +#include "wx/private/timer.h" + +//----------------------------------------------------------------------------- +// wxTimer +//----------------------------------------------------------------------------- + +class wxTimerDesc; + +class WXDLLIMPEXP_BASE wxGenericTimerImpl : public wxTimerImpl +{ +public: + wxGenericTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { Init(); } + virtual ~wxGenericTimerImpl(); + + virtual bool Start(int millisecs = -1, bool oneShot = false); + virtual void Stop(); + + virtual bool IsRunning() const; + + // implementation + static void NotifyTimers(); + +protected: + void Init(); + +private: + wxTimerDesc *m_desc; +}; + +#endif // wxUSE_TIMER + +#endif // _WX_GENERIC_PRIVATE_TIMER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/prntdlgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/prntdlgg.h new file mode 100644 index 0000000000..6c8f7bd5a7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/prntdlgg.h @@ -0,0 +1,256 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/prntdlgg.h +// Purpose: wxGenericPrintDialog, wxGenericPrintSetupDialog, +// wxGenericPageSetupDialog +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __PRINTDLGH_G_ +#define __PRINTDLGH_G_ + +#include "wx/defs.h" + +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/dialog.h" +#include "wx/cmndata.h" +#include "wx/prntbase.h" +#include "wx/printdlg.h" +#include "wx/listctrl.h" + +#include "wx/dc.h" +#if wxUSE_POSTSCRIPT + #include "wx/dcps.h" +#endif + +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxCheckBox; +class WXDLLIMPEXP_FWD_CORE wxComboBox; +class WXDLLIMPEXP_FWD_CORE wxStaticText; +class WXDLLIMPEXP_FWD_CORE wxRadioBox; +class WXDLLIMPEXP_FWD_CORE wxPageSetupDialogData; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// This is not clear why all these enums start with 10 or 30 but do not change it +// without good reason to avoid some subtle backwards compatibility breakage + +enum +{ + wxPRINTID_STATIC = 10, + wxPRINTID_RANGE, + wxPRINTID_FROM, + wxPRINTID_TO, + wxPRINTID_COPIES, + wxPRINTID_PRINTTOFILE, + wxPRINTID_SETUP +}; + +enum +{ + wxPRINTID_LEFTMARGIN = 30, + wxPRINTID_RIGHTMARGIN, + wxPRINTID_TOPMARGIN, + wxPRINTID_BOTTOMMARGIN +}; + +enum +{ + wxPRINTID_PRINTCOLOUR = 10, + wxPRINTID_ORIENTATION, + wxPRINTID_COMMAND, + wxPRINTID_OPTIONS, + wxPRINTID_PAPERSIZE, + wxPRINTID_PRINTER +}; + +#if wxUSE_POSTSCRIPT + +//---------------------------------------------------------------------------- +// wxPostScriptNativeData +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPostScriptPrintNativeData: public wxPrintNativeDataBase +{ +public: + wxPostScriptPrintNativeData(); + virtual ~wxPostScriptPrintNativeData(); + + virtual bool TransferTo( wxPrintData &data ); + virtual bool TransferFrom( const wxPrintData &data ); + + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const { return true; } + + const wxString& GetPrinterCommand() const { return m_printerCommand; } + const wxString& GetPrinterOptions() const { return m_printerOptions; } + const wxString& GetPreviewCommand() const { return m_previewCommand; } + const wxString& GetFontMetricPath() const { return m_afmPath; } + double GetPrinterScaleX() const { return m_printerScaleX; } + double GetPrinterScaleY() const { return m_printerScaleY; } + long GetPrinterTranslateX() const { return m_printerTranslateX; } + long GetPrinterTranslateY() const { return m_printerTranslateY; } + + void SetPrinterCommand(const wxString& command) { m_printerCommand = command; } + void SetPrinterOptions(const wxString& options) { m_printerOptions = options; } + void SetPreviewCommand(const wxString& command) { m_previewCommand = command; } + void SetFontMetricPath(const wxString& path) { m_afmPath = path; } + void SetPrinterScaleX(double x) { m_printerScaleX = x; } + void SetPrinterScaleY(double y) { m_printerScaleY = y; } + void SetPrinterScaling(double x, double y) { m_printerScaleX = x; m_printerScaleY = y; } + void SetPrinterTranslateX(long x) { m_printerTranslateX = x; } + void SetPrinterTranslateY(long y) { m_printerTranslateY = y; } + void SetPrinterTranslation(long x, long y) { m_printerTranslateX = x; m_printerTranslateY = y; } + +#if wxUSE_STREAMS + wxOutputStream *GetOutputStream() { return m_outputStream; } + void SetOutputStream( wxOutputStream *output ) { m_outputStream = output; } +#endif + +private: + wxString m_printerCommand; + wxString m_previewCommand; + wxString m_printerOptions; + wxString m_afmPath; + double m_printerScaleX; + double m_printerScaleY; + long m_printerTranslateX; + long m_printerTranslateY; +#if wxUSE_STREAMS + wxOutputStream *m_outputStream; +#endif + +private: + DECLARE_DYNAMIC_CLASS(wxPostScriptPrintNativeData) +}; + +// ---------------------------------------------------------------------------- +// Simulated Print and Print Setup dialogs for non-Windows platforms (and +// Windows using PostScript print/preview) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericPrintDialog : public wxPrintDialogBase +{ +public: + wxGenericPrintDialog(wxWindow *parent, + wxPrintDialogData* data = NULL); + wxGenericPrintDialog(wxWindow *parent, wxPrintData* data); + + virtual ~wxGenericPrintDialog(); + + void OnSetup(wxCommandEvent& event); + void OnRange(wxCommandEvent& event); + void OnOK(wxCommandEvent& event); + + virtual bool TransferDataFromWindow(); + virtual bool TransferDataToWindow(); + + virtual int ShowModal(); + + wxPrintData& GetPrintData() + { return m_printDialogData.GetPrintData(); } + + wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; } + wxDC *GetPrintDC(); + +public: +// wxStaticText* m_printerMessage; + wxButton* m_setupButton; +// wxButton* m_helpButton; + wxRadioBox* m_rangeRadioBox; + wxTextCtrl* m_fromText; + wxTextCtrl* m_toText; + wxTextCtrl* m_noCopiesText; + wxCheckBox* m_printToFileCheckBox; +// wxCheckBox* m_collateCopiesCheckBox; + + wxPrintDialogData m_printDialogData; + +protected: + void Init(wxWindow *parent); + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog) +}; + +class WXDLLIMPEXP_CORE wxGenericPrintSetupDialog : public wxDialog +{ +public: + // There are no configuration options for the dialog, so we + // just pass the wxPrintData object (no wxPrintSetupDialogData class needed) + wxGenericPrintSetupDialog(wxWindow *parent, wxPrintData* data); + virtual ~wxGenericPrintSetupDialog(); + + void Init(wxPrintData* data); + + void OnPrinter(wxListEvent& event); + + virtual bool TransferDataFromWindow(); + virtual bool TransferDataToWindow(); + + virtual wxComboBox *CreatePaperTypeChoice(); + +public: + wxListCtrl* m_printerListCtrl; + wxRadioBox* m_orientationRadioBox; + wxTextCtrl* m_printerCommandText; + wxTextCtrl* m_printerOptionsText; + wxCheckBox* m_colourCheckBox; + wxComboBox* m_paperTypeChoice; + + wxPrintData m_printData; + wxPrintData& GetPrintData() { return m_printData; } + + // After pressing OK, write data here. + wxPrintData* m_targetData; + +private: + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxGenericPrintSetupDialog) +}; +#endif + // wxUSE_POSTSCRIPT + +class WXDLLIMPEXP_CORE wxGenericPageSetupDialog : public wxPageSetupDialogBase +{ +public: + wxGenericPageSetupDialog(wxWindow *parent = NULL, + wxPageSetupDialogData* data = NULL); + virtual ~wxGenericPageSetupDialog(); + + virtual bool TransferDataFromWindow(); + virtual bool TransferDataToWindow(); + + virtual wxPageSetupDialogData& GetPageSetupDialogData(); + + void OnPrinter(wxCommandEvent& event); + wxComboBox *CreatePaperTypeChoice(int* x, int* y); + +public: + wxButton* m_printerButton; + wxRadioBox* m_orientationRadioBox; + wxTextCtrl* m_marginLeftText; + wxTextCtrl* m_marginTopText; + wxTextCtrl* m_marginRightText; + wxTextCtrl* m_marginBottomText; + wxComboBox* m_paperTypeChoice; + + wxPageSetupDialogData m_pageData; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericPageSetupDialog) +}; + +#endif + +#endif +// __PRINTDLGH_G_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/progdlgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/progdlgg.h new file mode 100644 index 0000000000..d29452f1f0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/progdlgg.h @@ -0,0 +1,229 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/progdlgg.h +// Purpose: wxGenericProgressDialog class +// Author: Karsten Ballueder +// Modified by: Francesco Montorsi +// Created: 09.05.1999 +// Copyright: (c) Karsten Ballueder +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __PROGDLGH_G__ +#define __PROGDLGH_G__ + +#include "wx/dialog.h" + +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxEventLoop; +class WXDLLIMPEXP_FWD_CORE wxGauge; +class WXDLLIMPEXP_FWD_CORE wxStaticText; +class WXDLLIMPEXP_FWD_CORE wxWindowDisabler; + +/* + Progress dialog which shows a moving progress bar. + Taken from the Mahogany project. +*/ +class WXDLLIMPEXP_CORE wxGenericProgressDialog : public wxDialog +{ +public: + wxGenericProgressDialog(); + wxGenericProgressDialog(const wxString& title, const wxString& message, + int maximum = 100, + wxWindow *parent = NULL, + int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE); + + virtual ~wxGenericProgressDialog(); + + bool Create(const wxString& title, + const wxString& message, + int maximum = 100, + wxWindow *parent = NULL, + int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE); + + virtual bool Update(int value, const wxString& newmsg = wxEmptyString, bool *skip = NULL); + virtual bool Pulse(const wxString& newmsg = wxEmptyString, bool *skip = NULL); + + void Resume(); + + int GetValue() const; + int GetRange() const; + wxString GetMessage() const; + + void SetRange(int maximum); + + // Return whether "Cancel" or "Skip" button was pressed, always return + // false if the corresponding button is not shown. + bool WasCancelled() const; + bool WasSkipped() const; + + // Must provide overload to avoid hiding it (and warnings about it) + virtual void Update() { wxDialog::Update(); } + + virtual bool Show( bool show = true ); + + // This enum is an implementation detail and should not be used + // by user code. + enum State + { + Uncancelable = -1, // dialog can't be canceled + Canceled, // can be cancelled and, in fact, was + Continue, // can be cancelled but wasn't + Finished, // finished, waiting to be removed from screen + Dismissed // was closed by user after finishing + }; + +protected: + // Update just the m_maximum field, this is used by public SetRange() but, + // unlike it, doesn't update the controls state. This makes it useful for + // both this class and its derived classes that don't use m_gauge to + // display progress. + void SetMaximum(int maximum); + + // Return the labels to use for showing the elapsed/estimated/remaining + // times respectively. + static wxString GetElapsedLabel() { return wxGetTranslation("Elapsed time:"); } + static wxString GetEstimatedLabel() { return wxGetTranslation("Estimated time:"); } + static wxString GetRemainingLabel() { return wxGetTranslation("Remaining time:"); } + + + // Similar to wxWindow::HasFlag() but tests for a presence of a wxPD_XXX + // flag in our (separate) flags instead of using m_windowStyle. + bool HasPDFlag(int flag) const { return (m_pdStyle & flag) != 0; } + + // Return the progress dialog style. Prefer to use HasPDFlag() if possible. + int GetPDStyle() const { return m_pdStyle; } + void SetPDStyle(int pdStyle) { m_pdStyle = pdStyle; } + + // Updates estimated times from a given progress bar value and stores the + // results in provided arguments. + void UpdateTimeEstimates(int value, + unsigned long &elapsedTime, + unsigned long &estimatedTime, + unsigned long &remainingTime); + + // Converts seconds to HH:mm:ss format. + static wxString GetFormattedTime(unsigned long timeInSec); + + // callback for optional abort button + void OnCancel(wxCommandEvent&); + + // callback for optional skip button + void OnSkip(wxCommandEvent&); + + // callback to disable "hard" window closing + void OnClose(wxCloseEvent&); + + // called to disable the other windows while this dialog is shown + void DisableOtherWindows(); + + // must be called to reenable the other windows temporarily disabled while + // the dialog was shown + void ReenableOtherWindows(); + + // Set the top level parent we store from the parent window provided when + // creating the dialog. + void SetTopParent(wxWindow* parent); + + // return the top level parent window of this dialog (may be NULL) + wxWindow *GetTopParent() const { return m_parentTop; } + + + // continue processing or not (return value for Update()) + State m_state; + + // the maximum value + int m_maximum; + +#if defined(__WXMSW__ ) || defined(__WXPM__) + // the factor we use to always keep the value in 16 bit range as the native + // control only supports ranges from 0 to 65,535 + size_t m_factor; +#endif // __WXMSW__ + + // time when the dialog was created + unsigned long m_timeStart; + // time when the dialog was closed or cancelled + unsigned long m_timeStop; + // time between the moment the dialog was closed/cancelled and resume + unsigned long m_break; + +private: + // update the label to show the given time (in seconds) + static void SetTimeLabel(unsigned long val, wxStaticText *label); + + // common part of all ctors + void Init(); + + // create the label with given text and another one to show the time nearby + // as the next windows in the sizer, returns the created control + wxStaticText *CreateLabel(const wxString& text, wxSizer *sizer); + + // updates the label message + void UpdateMessage(const wxString &newmsg); + + // common part of Update() and Pulse(), returns true if not cancelled + bool DoBeforeUpdate(bool *skip); + + // common part of Update() and Pulse() + void DoAfterUpdate(); + + // shortcuts for enabling buttons + void EnableClose(); + void EnableSkip(bool enable = true); + void EnableAbort(bool enable = true); + void DisableSkip() { EnableSkip(false); } + void DisableAbort() { EnableAbort(false); } + + // the widget displaying current status (may be NULL) + wxGauge *m_gauge; + // the message displayed + wxStaticText *m_msg; + // displayed elapsed, estimated, remaining time + wxStaticText *m_elapsed, + *m_estimated, + *m_remaining; + + // parent top level window (may be NULL) + wxWindow *m_parentTop; + + // Progress dialog styles: this is not the same as m_windowStyle because + // wxPD_XXX constants clash with the existing TLW styles so to be sure we + // don't have any conflicts we just use a separate variable for storing + // them. + int m_pdStyle; + + // skip some portion + bool m_skip; + +#if !defined(__SMARTPHONE__) + // the abort and skip buttons (or NULL if none) + wxButton *m_btnAbort; + wxButton *m_btnSkip; +#endif + + // saves the time when elapsed time was updated so there is only one + // update per second + unsigned long m_last_timeupdate; + + // tells how often a change of the estimated time has to be confirmed + // before it is actually displayed - this reduces the frequency of updates + // of estimated and remaining time + int m_delay; + + // counts the confirmations + int m_ctdelay; + unsigned long m_display_estimated; + + // for wxPD_APP_MODAL case + wxWindowDisabler *m_winDisabler; + + // Temporary event loop created by the dialog itself if there is no + // currently active loop when it is created. + wxEventLoop *m_tempEventLoop; + + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxGenericProgressDialog); +}; + +#endif // __PROGDLGH_G__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/propdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/propdlg.h new file mode 100644 index 0000000000..6cb63efad9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/propdlg.h @@ -0,0 +1,168 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/propdlg.h +// Purpose: wxPropertySheetDialog +// Author: Julian Smart +// Modified by: +// Created: 2005-03-12 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROPDLG_H_ +#define _WX_PROPDLG_H_ + +#include "wx/defs.h" + +#if wxUSE_BOOKCTRL + +#include "wx/dialog.h" + +class WXDLLIMPEXP_FWD_CORE wxBookCtrlBase; + +//----------------------------------------------------------------------------- +// wxPropertySheetDialog +// A platform-independent properties dialog. +// +// * on PocketPC, a flat-look 'property sheet' notebook will be used, with +// no OK/Cancel/Help buttons +// * on other platforms, a normal notebook will be used, with standard buttons +// +// To use this class, call Create from your derived class. +// Then create pages and add to the book control. Finally call CreateButtons and +// LayoutDialog. +// +// For example: +// +// MyPropertySheetDialog::Create(...) +// { +// wxPropertySheetDialog::Create(...); +// +// // Add page +// wxPanel* panel = new wxPanel(GetBookCtrl(), ...); +// GetBookCtrl()->AddPage(panel, wxT("General")); +// +// CreateButtons(); +// LayoutDialog(); +// } +// +// Override CreateBookCtrl and AddBookCtrl to create and add a different +// kind of book control. +//----------------------------------------------------------------------------- + +enum wxPropertySheetDialogFlags +{ + // Use the platform default + wxPROPSHEET_DEFAULT = 0x0001, + + // Use a notebook + wxPROPSHEET_NOTEBOOK = 0x0002, + + // Use a toolbook + wxPROPSHEET_TOOLBOOK = 0x0004, + + // Use a choicebook + wxPROPSHEET_CHOICEBOOK = 0x0008, + + // Use a listbook + wxPROPSHEET_LISTBOOK = 0x0010, + + // Use a wxButtonToolBar toolbook + wxPROPSHEET_BUTTONTOOLBOOK = 0x0020, + + // Use a treebook + wxPROPSHEET_TREEBOOK = 0x0040, + + // Shrink dialog to fit current page + wxPROPSHEET_SHRINKTOFIT = 0x0100 +}; + +class WXDLLIMPEXP_ADV wxPropertySheetDialog : public wxDialog +{ +public: + wxPropertySheetDialog() : wxDialog() { Init(); } + + wxPropertySheetDialog(wxWindow* parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr) + { + Init(); + Create(parent, id, title, pos, sz, style, name); + } + + bool Create(wxWindow* parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr); + +//// Accessors + + // Set and get the notebook + void SetBookCtrl(wxBookCtrlBase* book) { m_bookCtrl = book; } + wxBookCtrlBase* GetBookCtrl() const { return m_bookCtrl; } + + // Override function in base + virtual wxWindow* GetContentWindow() const; + + // Set and get the inner sizer + void SetInnerSize(wxSizer* sizer) { m_innerSizer = sizer; } + wxSizer* GetInnerSizer() const { return m_innerSizer ; } + + // Set and get the book style + void SetSheetStyle(long sheetStyle) { m_sheetStyle = sheetStyle; } + long GetSheetStyle() const { return m_sheetStyle ; } + + // Set and get the border around the whole dialog + void SetSheetOuterBorder(int border) { m_sheetOuterBorder = border; } + int GetSheetOuterBorder() const { return m_sheetOuterBorder ; } + + // Set and get the border around the book control only + void SetSheetInnerBorder(int border) { m_sheetInnerBorder = border; } + int GetSheetInnerBorder() const { return m_sheetInnerBorder ; } + +/// Operations + + // Creates the buttons (none on PocketPC) + virtual void CreateButtons(int flags = wxOK|wxCANCEL); + + // Lay out the dialog, to be called after pages have been created + virtual void LayoutDialog(int centreFlags = wxBOTH); + +/// Implementation + + // Creates the book control. If you want to use a different kind of + // control, override. + virtual wxBookCtrlBase* CreateBookCtrl(); + + // Adds the book control to the inner sizer. + virtual void AddBookCtrl(wxSizer* sizer); + + // Set the focus + void OnActivate(wxActivateEvent& event); + + // Resize dialog if necessary + void OnIdle(wxIdleEvent& event); + +private: + void Init(); + +protected: + wxBookCtrlBase* m_bookCtrl; + wxSizer* m_innerSizer; // sizer for extra space + long m_sheetStyle; + int m_sheetOuterBorder; + int m_sheetInnerBorder; + int m_selectedPage; + + DECLARE_DYNAMIC_CLASS(wxPropertySheetDialog) + DECLARE_EVENT_TABLE() +}; + +#endif // wxUSE_BOOKCTRL + +#endif // _WX_PROPDLG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/region.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/region.h new file mode 100644 index 0000000000..1c5048dbf2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/region.h @@ -0,0 +1,81 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/region.h +// Purpose: generic wxRegion class +// Author: David Elliott +// Modified by: +// Created: 2004/04/12 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_REGION_H__ +#define _WX_GENERIC_REGION_H__ + +class WXDLLIMPEXP_CORE wxRegionGeneric : public wxRegionBase +{ +public: + wxRegionGeneric(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + wxRegionGeneric(const wxPoint& topLeft, const wxPoint& bottomRight); + wxRegionGeneric(const wxRect& rect); + wxRegionGeneric(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + wxRegionGeneric(const wxBitmap& bmp); + wxRegionGeneric(const wxBitmap& bmp, const wxColour& transp, int tolerance = 0); + wxRegionGeneric(); + virtual ~wxRegionGeneric(); + + // wxRegionBase pure virtuals + virtual void Clear(); + virtual bool IsEmpty() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + // wxRegionBase pure virtuals + virtual bool DoIsEqual(const wxRegion& region) const; + virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const; + virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const; + virtual wxRegionContain DoContainsRect(const wxRect& rect) const; + + virtual bool DoOffset(wxCoord x, wxCoord y); + virtual bool DoUnionWithRect(const wxRect& rect); + virtual bool DoUnionWithRegion(const wxRegion& region); + virtual bool DoIntersect(const wxRegion& region); + virtual bool DoSubtract(const wxRegion& region); + virtual bool DoXor(const wxRegion& region); + + friend class WXDLLIMPEXP_FWD_CORE wxRegionIteratorGeneric; +}; + +class WXDLLIMPEXP_CORE wxRegionIteratorGeneric : public wxObject +{ +public: + wxRegionIteratorGeneric(); + wxRegionIteratorGeneric(const wxRegionGeneric& region); + wxRegionIteratorGeneric(const wxRegionIteratorGeneric& iterator); + virtual ~wxRegionIteratorGeneric(); + + wxRegionIteratorGeneric& operator=(const wxRegionIteratorGeneric& iterator); + + void Reset() { m_current = 0; } + void Reset(const wxRegionGeneric& region); + + operator bool () const { return HaveRects(); } + bool HaveRects() const; + + wxRegionIteratorGeneric& operator++(); + wxRegionIteratorGeneric operator++(int); + + long GetX() const; + long GetY() const; + long GetW() const; + long GetWidth() const { return GetW(); } + long GetH() const; + long GetHeight() const { return GetH(); } + wxRect GetRect() const; +private: + long m_current; + wxRegionGeneric m_region; +}; + +#endif // _WX_GENERIC_REGION_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/richmsgdlgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/richmsgdlgg.h new file mode 100644 index 0000000000..5446f87fef --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/richmsgdlgg.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/richmsgdlgg.h +// Purpose: wxGenericRichMessageDialog +// Author: Rickard Westerlund +// Created: 2010-07-04 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_RICHMSGDLGG_H_ +#define _WX_GENERIC_RICHMSGDLGG_H_ + +class WXDLLIMPEXP_FWD_CORE wxCheckBox; +class WXDLLIMPEXP_FWD_CORE wxCollapsiblePane; +class WXDLLIMPEXP_FWD_CORE wxCollapsiblePaneEvent; + +class WXDLLIMPEXP_CORE wxGenericRichMessageDialog + : public wxRichMessageDialogBase +{ +public: + wxGenericRichMessageDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + long style) + : wxRichMessageDialogBase( parent, message, caption, style ), + m_checkBox(NULL), + m_detailsPane(NULL) + { } + + virtual bool IsCheckBoxChecked() const; + +protected: + wxCheckBox *m_checkBox; + wxCollapsiblePane *m_detailsPane; + + // overrides methods in the base class + virtual void AddMessageDialogCheckBox(wxSizer *sizer); + virtual void AddMessageDialogDetails(wxSizer *sizer); + +private: + void OnPaneChanged(wxCollapsiblePaneEvent& event); + + DECLARE_EVENT_TABLE() + + wxDECLARE_NO_COPY_CLASS(wxGenericRichMessageDialog); +}; + +#endif // _WX_GENERIC_RICHMSGDLGG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/sashwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/sashwin.h new file mode 100644 index 0000000000..e4f34d8296 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/sashwin.h @@ -0,0 +1,267 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/sashwin.h +// Purpose: wxSashWindow implementation. A sash window has an optional +// sash on each edge, allowing it to be dragged. An event +// is generated when the sash is released. +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SASHWIN_H_G_ +#define _WX_SASHWIN_H_G_ + +#if wxUSE_SASH + +#include "wx/defs.h" +#include "wx/window.h" +#include "wx/string.h" + +#define wxSASH_DRAG_NONE 0 +#define wxSASH_DRAG_DRAGGING 1 +#define wxSASH_DRAG_LEFT_DOWN 2 + +enum wxSashEdgePosition { + wxSASH_TOP = 0, + wxSASH_RIGHT, + wxSASH_BOTTOM, + wxSASH_LEFT, + wxSASH_NONE = 100 +}; + +/* + * wxSashEdge represents one of the four edges of a window. + */ + +class WXDLLIMPEXP_ADV wxSashEdge +{ +public: + wxSashEdge() + { m_show = false; +#if WXWIN_COMPATIBILITY_2_6 + m_border = false; +#endif + m_margin = 0; } + + bool m_show; // Is the sash showing? +#if WXWIN_COMPATIBILITY_2_6 + bool m_border; // Do we draw a border? +#endif + int m_margin; // The margin size +}; + +/* + * wxSashWindow flags + */ + +#define wxSW_NOBORDER 0x0000 +//#define wxSW_3D 0x0010 +#define wxSW_BORDER 0x0020 +#define wxSW_3DSASH 0x0040 +#define wxSW_3DBORDER 0x0080 +#define wxSW_3D (wxSW_3DSASH | wxSW_3DBORDER) + +/* + * wxSashWindow allows any of its edges to have a sash which can be dragged + * to resize the window. The actual content window will be created as a child + * of wxSashWindow. + */ + +class WXDLLIMPEXP_ADV wxSashWindow: public wxWindow +{ +public: + // Default constructor + wxSashWindow() + { + Init(); + } + + // Normal constructor + wxSashWindow(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("sashWindow")) + { + Init(); + Create(parent, id, pos, size, style, name); + } + + virtual ~wxSashWindow(); + + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("sashWindow")); + + // Set whether there's a sash in this position + void SetSashVisible(wxSashEdgePosition edge, bool sash); + + // Get whether there's a sash in this position + bool GetSashVisible(wxSashEdgePosition edge) const { return m_sashes[edge].m_show; } + +#if WXWIN_COMPATIBILITY_2_6 + // Set whether there's a border in this position + // This value is unused in wxSashWindow. + void SetSashBorder(wxSashEdgePosition edge, bool border) { m_sashes[edge].m_border = border; } + + // Get whether there's a border in this position + // This value is unused in wxSashWindow. + bool HasBorder(wxSashEdgePosition edge) const { return m_sashes[edge].m_border; } +#endif + + // Get border size + int GetEdgeMargin(wxSashEdgePosition edge) const { return m_sashes[edge].m_margin; } + + // Sets the default sash border size + void SetDefaultBorderSize(int width) { m_borderSize = width; } + + // Gets the default sash border size + int GetDefaultBorderSize() const { return m_borderSize; } + + // Sets the addition border size between child and sash window + void SetExtraBorderSize(int width) { m_extraBorderSize = width; } + + // Gets the addition border size between child and sash window + int GetExtraBorderSize() const { return m_extraBorderSize; } + + virtual void SetMinimumSizeX(int min) { m_minimumPaneSizeX = min; } + virtual void SetMinimumSizeY(int min) { m_minimumPaneSizeY = min; } + virtual int GetMinimumSizeX() const { return m_minimumPaneSizeX; } + virtual int GetMinimumSizeY() const { return m_minimumPaneSizeY; } + + virtual void SetMaximumSizeX(int max) { m_maximumPaneSizeX = max; } + virtual void SetMaximumSizeY(int max) { m_maximumPaneSizeY = max; } + virtual int GetMaximumSizeX() const { return m_maximumPaneSizeX; } + virtual int GetMaximumSizeY() const { return m_maximumPaneSizeY; } + +//////////////////////////////////////////////////////////////////////////// +// Implementation + + // Paints the border and sash + void OnPaint(wxPaintEvent& event); + + // Handles mouse events + void OnMouseEvent(wxMouseEvent& ev); + + // Adjusts the panes + void OnSize(wxSizeEvent& event); + +#if defined(__WXMSW__) || defined(__WXMAC__) + // Handle cursor correctly + void OnSetCursor(wxSetCursorEvent& event); +#endif // wxMSW + + // Draws borders + void DrawBorders(wxDC& dc); + + // Draws the sashes + void DrawSash(wxSashEdgePosition edge, wxDC& dc); + + // Draws the sashes + void DrawSashes(wxDC& dc); + + // Draws the sash tracker (for whilst moving the sash) + void DrawSashTracker(wxSashEdgePosition edge, int x, int y); + + // Tests for x, y over sash + wxSashEdgePosition SashHitTest(int x, int y, int tolerance = 2); + + // Resizes subwindows + void SizeWindows(); + + // Initialize colours + void InitColours(); + +private: + void Init(); + + wxSashEdge m_sashes[4]; + int m_dragMode; + wxSashEdgePosition m_draggingEdge; + int m_oldX; + int m_oldY; + int m_borderSize; + int m_extraBorderSize; + int m_firstX; + int m_firstY; + int m_minimumPaneSizeX; + int m_minimumPaneSizeY; + int m_maximumPaneSizeX; + int m_maximumPaneSizeY; + wxCursor* m_sashCursorWE; + wxCursor* m_sashCursorNS; + wxColour m_lightShadowColour; + wxColour m_mediumShadowColour; + wxColour m_darkShadowColour; + wxColour m_hilightColour; + wxColour m_faceColour; + bool m_mouseCaptured; + wxCursor* m_currentCursor; + +private: + DECLARE_DYNAMIC_CLASS(wxSashWindow) + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxSashWindow); +}; + +class WXDLLIMPEXP_FWD_ADV wxSashEvent; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_SASH_DRAGGED, wxSashEvent ); + +enum wxSashDragStatus +{ + wxSASH_STATUS_OK, + wxSASH_STATUS_OUT_OF_RANGE +}; + +class WXDLLIMPEXP_ADV wxSashEvent: public wxCommandEvent +{ +public: + wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE) + { + m_eventType = (wxEventType) wxEVT_SASH_DRAGGED; + m_id = id; + m_edge = edge; + } + + wxSashEvent(const wxSashEvent& event) + : wxCommandEvent(event), + m_edge(event.m_edge), + m_dragRect(event.m_dragRect), + m_dragStatus(event.m_dragStatus) { } + + void SetEdge(wxSashEdgePosition edge) { m_edge = edge; } + wxSashEdgePosition GetEdge() const { return m_edge; } + + //// The rectangle formed by the drag operation + void SetDragRect(const wxRect& rect) { m_dragRect = rect; } + wxRect GetDragRect() const { return m_dragRect; } + + //// Whether the drag caused the rectangle to be reversed (e.g. + //// dragging the top below the bottom) + void SetDragStatus(wxSashDragStatus status) { m_dragStatus = status; } + wxSashDragStatus GetDragStatus() const { return m_dragStatus; } + + virtual wxEvent *Clone() const { return new wxSashEvent(*this); } + +private: + wxSashEdgePosition m_edge; + wxRect m_dragRect; + wxSashDragStatus m_dragStatus; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSashEvent) +}; + +typedef void (wxEvtHandler::*wxSashEventFunction)(wxSashEvent&); + +#define wxSashEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxSashEventFunction, func) + +#define EVT_SASH_DRAGGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_SASH_DRAGGED, id, wxSashEventHandler(fn)) +#define EVT_SASH_DRAGGED_RANGE(id1, id2, fn) \ + wx__DECLARE_EVT2(wxEVT_SASH_DRAGGED, id1, id2, wxSashEventHandler(fn)) + +#endif // wxUSE_SASH + +#endif + // _WX_SASHWIN_H_G_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/scrolwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/scrolwin.h new file mode 100644 index 0000000000..863cdf923e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/scrolwin.h @@ -0,0 +1,53 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/scrolwin.h +// Purpose: generic wxScrollHelper +// Author: Vadim Zeitlin +// Created: 2008-12-24 (replacing old file with the same name) +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_SCROLLWIN_H_ +#define _WX_GENERIC_SCROLLWIN_H_ + +// ---------------------------------------------------------------------------- +// generic wxScrollHelper implementation +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScrollHelper : public wxScrollHelperBase +{ +public: + wxScrollHelper(wxWindow *winToScroll); + + // implement base class pure virtuals + virtual void AdjustScrollbars(); + virtual bool IsScrollbarShown(int orient) const; + +protected: + virtual void DoScroll(int x, int y); + virtual void DoShowScrollbars(wxScrollbarVisibility horz, + wxScrollbarVisibility vert); + +private: + // helper of AdjustScrollbars(): does the work for the single scrollbar + // + // notice that the parameters passed by non-const references are modified + // by this function + void DoAdjustScrollbar(int orient, + int clientSize, + int virtSize, + int pixelsPerUnit, + int& scrollUnits, + int& scrollPosition, + int& scrollLinesPerPage, + wxScrollbarVisibility visibility); + + + wxScrollbarVisibility m_xVisibility, + m_yVisibility; + + wxDECLARE_NO_COPY_CLASS(wxScrollHelper); +}; + +#endif // _WX_GENERIC_SCROLLWIN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/spinctlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/spinctlg.h new file mode 100644 index 0000000000..a35cc8a4a4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/spinctlg.h @@ -0,0 +1,432 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/spinctlg.h +// Purpose: generic wxSpinCtrl class +// Author: Vadim Zeitlin +// Modified by: +// Created: 28.10.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_SPINCTRL_H_ +#define _WX_GENERIC_SPINCTRL_H_ + +// ---------------------------------------------------------------------------- +// wxSpinCtrl is a combination of wxSpinButton and wxTextCtrl, so if +// wxSpinButton is available, this is what we do - but if it isn't, we still +// define wxSpinCtrl class which then has the same appearance as wxTextCtrl but +// the different interface. This allows to write programs using wxSpinCtrl +// without tons of #ifdefs. +// ---------------------------------------------------------------------------- + +#if wxUSE_SPINBTN + +#include "wx/compositewin.h" + +class WXDLLIMPEXP_FWD_CORE wxSpinButton; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; + +class wxSpinCtrlTextGeneric; // wxTextCtrl used for the wxSpinCtrlGenericBase + +// The !wxUSE_SPINBTN version's GetValue() function conflicts with the +// wxTextCtrl's GetValue() and so you have to input a dummy int value. +#define wxSPINCTRL_GETVALUE_FIX + +// ---------------------------------------------------------------------------- +// wxSpinCtrlGeneric is a combination of wxTextCtrl and wxSpinButton +// +// This class manages a double valued generic spinctrl through the DoGet/SetXXX +// functions that are made public as Get/SetXXX functions for int or double +// for the wxSpinCtrl and wxSpinCtrlDouble classes respectively to avoid +// function ambiguity. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinCtrlGenericBase + : public wxNavigationEnabled > +{ +public: + wxSpinCtrlGenericBase() { Init(); } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + double min = 0, double max = 100, double initial = 0, + double inc = 1, + const wxString& name = wxT("wxSpinCtrl")); + + virtual ~wxSpinCtrlGenericBase(); + + // accessors + // T GetValue() const + // T GetMin() const + // T GetMax() const + // T GetIncrement() const + virtual bool GetSnapToTicks() const { return m_snap_to_ticks; } + // unsigned GetDigits() const - wxSpinCtrlDouble only + + // operations + virtual void SetValue(const wxString& text); + // void SetValue(T val) + // void SetRange(T minVal, T maxVal) + // void SetIncrement(T inc) + virtual void SetSnapToTicks(bool snap_to_ticks); + // void SetDigits(unsigned digits) - wxSpinCtrlDouble only + + // Select text in the textctrl + void SetSelection(long from, long to); + + // implementation from now on + + // forward these functions to all subcontrols + virtual bool Enable(bool enable = true); + virtual bool Show(bool show = true); +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip(wxToolTip *tip); +#endif // wxUSE_TOOLTIPS + + virtual bool SetBackgroundColour(const wxColour& colour); + + // get the subcontrols + wxTextCtrl *GetText() const { return m_textCtrl; } + wxSpinButton *GetSpinButton() const { return m_spinButton; } + + // forwarded events from children windows + void OnSpinButton(wxSpinEvent& event); + void OnTextLostFocus(wxFocusEvent& event); + void OnTextChar(wxKeyEvent& event); + + // this window itself is used only as a container for its sub windows so it + // shouldn't accept the focus at all and any attempts to explicitly set + // focus to it should give focus to its text constol part + virtual bool AcceptsFocus() const { return false; } + virtual void SetFocus(); + + friend class wxSpinCtrlTextGeneric; + +protected: + // override the base class virtuals involved into geometry calculations + virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + virtual void DoMoveWindow(int x, int y, int width, int height); + +#ifdef __WXMSW__ + // and, for MSW, enabling this window itself + virtual void DoEnable(bool enable); +#endif // __WXMSW__ + + enum SendEvent + { + SendEvent_None, + SendEvent_Text + }; + + // generic double valued functions + double DoGetValue() const { return m_value; } + bool DoSetValue(double val, SendEvent sendEvent); + void DoSetRange(double min_val, double max_val); + void DoSetIncrement(double inc); + + // update our value to reflect the text control contents (if it has been + // modified by user, do nothing otherwise) + // + // can also change the text control if its value is invalid + // + // return true if our value has changed + bool SyncSpinToText(SendEvent sendEvent); + + // Send the correct event type + virtual void DoSendEvent() = 0; + + // Convert the text to/from the corresponding value. + virtual bool DoTextToValue(const wxString& text, double *val) = 0; + virtual wxString DoValueToText(double val) = 0; + + // check if the value is in range + bool InRange(double n) const { return (n >= m_min) && (n <= m_max); } + + // ensure that the value is in range wrapping it round if necessary + double AdjustToFitInRange(double value) const; + + + double m_value; + double m_min; + double m_max; + double m_increment; + bool m_snap_to_ticks; + + int m_spin_value; + + // the subcontrols + wxTextCtrl *m_textCtrl; + wxSpinButton *m_spinButton; + +private: + // common part of all ctors + void Init(); + + // Implement pure virtual function inherited from wxCompositeWindow. + virtual wxWindowList GetCompositeWindowParts() const; + + DECLARE_EVENT_TABLE() +}; + +#else // !wxUSE_SPINBTN + +#define wxSPINCTRL_GETVALUE_FIX int = 1 + +// ---------------------------------------------------------------------------- +// wxSpinCtrl is just a text control +// ---------------------------------------------------------------------------- + +#include "wx/textctrl.h" + +class WXDLLIMPEXP_CORE wxSpinCtrlGenericBase : public wxTextCtrl +{ +public: + wxSpinCtrlGenericBase() : m_value(0), m_min(0), m_max(100), + m_increment(1), m_snap_to_ticks(false), + m_format(wxT("%g")) { } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + double min = 0, double max = 100, double initial = 0, + double inc = 1, + const wxString& name = wxT("wxSpinCtrl")) + { + m_min = min; + m_max = max; + m_value = initial; + m_increment = inc; + + bool ok = wxTextCtrl::Create(parent, id, value, pos, size, style, + wxDefaultValidator, name); + DoSetValue(initial, SendEvent_None); + + return ok; + } + + // accessors + // T GetValue() const + // T GetMin() const + // T GetMax() const + // T GetIncrement() const + virtual bool GetSnapToTicks() const { return m_snap_to_ticks; } + // unsigned GetDigits() const - wxSpinCtrlDouble only + + // operations + virtual void SetValue(const wxString& text) { wxTextCtrl::SetValue(text); } + // void SetValue(T val) + // void SetRange(T minVal, T maxVal) + // void SetIncrement(T inc) + virtual void SetSnapToTicks(bool snap_to_ticks) + { m_snap_to_ticks = snap_to_ticks; } + // void SetDigits(unsigned digits) - wxSpinCtrlDouble only + + // Select text in the textctrl + //void SetSelection(long from, long to); + +protected: + // generic double valued + double DoGetValue() const + { + double n; + if ( (wxSscanf(wxTextCtrl::GetValue(), wxT("%lf"), &n) != 1) ) + n = INT_MIN; + + return n; + } + + bool DoSetValue(double val, SendEvent sendEvent) + { + wxString str(wxString::Format(m_format, val)); + switch ( sendEvent ) + { + case SendEvent_None: + wxTextCtrl::ChangeValue(str); + break; + + case SendEvent_Text: + wxTextCtrl::SetValue(str); + break; + } + + return true; + } + void DoSetRange(double min_val, double max_val) + { + m_min = min_val; + m_max = max_val; + } + void DoSetIncrement(double inc) { m_increment = inc; } // Note: unused + + double m_value; + double m_min; + double m_max; + double m_increment; + bool m_snap_to_ticks; + wxString m_format; +}; + +#endif // wxUSE_SPINBTN/!wxUSE_SPINBTN + +#if !defined(wxHAS_NATIVE_SPINCTRL) + +//----------------------------------------------------------------------------- +// wxSpinCtrl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinCtrlGenericBase +{ +public: + wxSpinCtrl() { Init(); } + wxSpinCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + int min = 0, int max = 100, int initial = 0, + const wxString& name = wxT("wxSpinCtrl")) + { + Init(); + + Create(parent, id, value, pos, size, style, min, max, initial, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + int min = 0, int max = 100, int initial = 0, + const wxString& name = wxT("wxSpinCtrl")) + { + return wxSpinCtrlGenericBase::Create(parent, id, value, pos, size, + style, min, max, initial, 1, name); + } + + // accessors + int GetValue(wxSPINCTRL_GETVALUE_FIX) const { return int(DoGetValue()); } + int GetMin() const { return int(m_min); } + int GetMax() const { return int(m_max); } + int GetIncrement() const { return int(m_increment); } + + // operations + void SetValue(const wxString& value) + { wxSpinCtrlGenericBase::SetValue(value); } + void SetValue( int value ) { DoSetValue(value, SendEvent_None); } + void SetRange( int minVal, int maxVal ) { DoSetRange(minVal, maxVal); } + void SetIncrement(int inc) { DoSetIncrement(inc); } + + virtual int GetBase() const { return m_base; } + virtual bool SetBase(int base); + +protected: + virtual void DoSendEvent(); + + virtual bool DoTextToValue(const wxString& text, double *val); + virtual wxString DoValueToText(double val); + +private: + // Common part of all ctors. + void Init() + { + m_base = 10; + } + + int m_base; + + DECLARE_DYNAMIC_CLASS(wxSpinCtrl) +}; + +#endif // wxHAS_NATIVE_SPINCTRL + +//----------------------------------------------------------------------------- +// wxSpinCtrlDouble +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinCtrlDouble : public wxSpinCtrlGenericBase +{ +public: + wxSpinCtrlDouble() { Init(); } + wxSpinCtrlDouble(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + double min = 0, double max = 100, double initial = 0, + double inc = 1, + const wxString& name = wxT("wxSpinCtrlDouble")) + { + Init(); + + Create(parent, id, value, pos, size, style, + min, max, initial, inc, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + double min = 0, double max = 100, double initial = 0, + double inc = 1, + const wxString& name = wxT("wxSpinCtrlDouble")) + { + return wxSpinCtrlGenericBase::Create(parent, id, value, pos, size, + style, min, max, initial, + inc, name); + } + + // accessors + double GetValue(wxSPINCTRL_GETVALUE_FIX) const { return DoGetValue(); } + double GetMin() const { return m_min; } + double GetMax() const { return m_max; } + double GetIncrement() const { return m_increment; } + unsigned GetDigits() const { return m_digits; } + + // operations + void SetValue(const wxString& value) + { wxSpinCtrlGenericBase::SetValue(value); } + void SetValue(double value) { DoSetValue(value, SendEvent_None); } + void SetRange(double minVal, double maxVal) { DoSetRange(minVal, maxVal); } + void SetIncrement(double inc) { DoSetIncrement(inc); } + void SetDigits(unsigned digits); + + // We don't implement bases support for floating point numbers, this is not + // very useful in practice. + virtual int GetBase() const { return 10; } + virtual bool SetBase(int WXUNUSED(base)) { return 0; } + +protected: + virtual void DoSendEvent(); + + virtual bool DoTextToValue(const wxString& text, double *val); + virtual wxString DoValueToText(double val); + + unsigned m_digits; + +private: + // Common part of all ctors. + void Init() + { + m_digits = 0; + m_format = wxS("%g"); + } + + wxString m_format; + + DECLARE_DYNAMIC_CLASS(wxSpinCtrlDouble) +}; + +#endif // _WX_GENERIC_SPINCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/splash.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/splash.h new file mode 100644 index 0000000000..24ad733d5d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/splash.h @@ -0,0 +1,97 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/splash.h +// Purpose: Splash screen class +// Author: Julian Smart +// Modified by: +// Created: 28/6/2000 +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SPLASH_H_ +#define _WX_SPLASH_H_ + +#include "wx/bitmap.h" +#include "wx/eventfilter.h" +#include "wx/frame.h" +#include "wx/timer.h" + + +/* + * A window for displaying a splash screen + */ + +#define wxSPLASH_CENTRE_ON_PARENT 0x01 +#define wxSPLASH_CENTRE_ON_SCREEN 0x02 +#define wxSPLASH_NO_CENTRE 0x00 +#define wxSPLASH_TIMEOUT 0x04 +#define wxSPLASH_NO_TIMEOUT 0x00 + +class WXDLLIMPEXP_FWD_ADV wxSplashScreenWindow; + +/* + * wxSplashScreen + */ + +class WXDLLIMPEXP_ADV wxSplashScreen: public wxFrame, + public wxEventFilter +{ +public: + // for RTTI macros only + wxSplashScreen() { Init(); } + wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds, + wxWindow* parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP); + virtual ~wxSplashScreen(); + + void OnCloseWindow(wxCloseEvent& event); + void OnNotify(wxTimerEvent& event); + + long GetSplashStyle() const { return m_splashStyle; } + wxSplashScreenWindow* GetSplashWindow() const { return m_window; } + int GetTimeout() const { return m_milliseconds; } + + // Override wxEventFilter method to hide splash screen on any user input. + virtual int FilterEvent(wxEvent& event); + +protected: + // Common part of all ctors. + void Init(); + + wxSplashScreenWindow* m_window; + long m_splashStyle; + int m_milliseconds; + wxTimer m_timer; + + DECLARE_DYNAMIC_CLASS(wxSplashScreen) + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxSplashScreen); +}; + +/* + * wxSplashScreenWindow + */ + +class WXDLLIMPEXP_ADV wxSplashScreenWindow: public wxWindow +{ +public: + wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER); + + void OnPaint(wxPaintEvent& event); + void OnEraseBackground(wxEraseEvent& event); + + void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } + wxBitmap& GetBitmap() { return m_bitmap; } + +protected: + wxBitmap m_bitmap; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxSplashScreenWindow); +}; + + +#endif + // _WX_SPLASH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/splitter.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/splitter.h new file mode 100644 index 0000000000..61128a3959 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/splitter.h @@ -0,0 +1,419 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/splitter.h +// Purpose: wxSplitterWindow class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_SPLITTER_H_ +#define _WX_GENERIC_SPLITTER_H_ + +#include "wx/window.h" // base class declaration +#include "wx/containr.h" // wxControlContainer + +class WXDLLIMPEXP_FWD_CORE wxSplitterEvent; + +// --------------------------------------------------------------------------- +// splitter constants +// --------------------------------------------------------------------------- + +enum wxSplitMode +{ + wxSPLIT_HORIZONTAL = 1, + wxSPLIT_VERTICAL +}; + +enum +{ + wxSPLIT_DRAG_NONE, + wxSPLIT_DRAG_DRAGGING, + wxSPLIT_DRAG_LEFT_DOWN +}; + +// --------------------------------------------------------------------------- +// wxSplitterWindow maintains one or two panes, with +// an optional vertical or horizontal split which +// can be used with the mouse or programmatically. +// --------------------------------------------------------------------------- + +// TODO: +// 1) Perhaps make the borders sensitive to dragging in order to create a split. +// The MFC splitter window manages scrollbars as well so is able to +// put sash buttons on the scrollbars, but we probably don't want to go down +// this path. +// 2) for wxWidgets 2.0, we must find a way to set the WS_CLIPCHILDREN style +// to prevent flickering. (WS_CLIPCHILDREN doesn't work in all cases so can't be +// standard). + +class WXDLLIMPEXP_CORE wxSplitterWindow: public wxNavigationEnabled +{ +public: + +//////////////////////////////////////////////////////////////////////////// +// Public API + + // Default constructor + wxSplitterWindow() + { + Init(); + } + + // Normal constructor + wxSplitterWindow(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_3D, + const wxString& name = wxT("splitter")) + { + Init(); + Create(parent, id, pos, size, style, name); + } + + virtual ~wxSplitterWindow(); + + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_3D, + const wxString& name = wxT("splitter")); + + // Gets the only or left/top pane + wxWindow *GetWindow1() const { return m_windowOne; } + + // Gets the right/bottom pane + wxWindow *GetWindow2() const { return m_windowTwo; } + + // Sets the split mode + void SetSplitMode(int mode) + { + wxASSERT_MSG( mode == wxSPLIT_VERTICAL || mode == wxSPLIT_HORIZONTAL, + wxT("invalid split mode") ); + + m_splitMode = (wxSplitMode)mode; + } + + // Gets the split mode + wxSplitMode GetSplitMode() const { return m_splitMode; } + + // Initialize with one window + void Initialize(wxWindow *window); + + // Associates the given window with window 2, drawing the appropriate sash + // and changing the split mode. + // Does nothing and returns false if the window is already split. + // A sashPosition of 0 means choose a default sash position, + // negative sashPosition specifies the size of right/lower pane as it's + // absolute value rather than the size of left/upper pane. + virtual bool SplitVertically(wxWindow *window1, + wxWindow *window2, + int sashPosition = 0) + { return DoSplit(wxSPLIT_VERTICAL, window1, window2, sashPosition); } + virtual bool SplitHorizontally(wxWindow *window1, + wxWindow *window2, + int sashPosition = 0) + { return DoSplit(wxSPLIT_HORIZONTAL, window1, window2, sashPosition); } + + // Removes the specified (or second) window from the view + // Doesn't actually delete the window. + bool Unsplit(wxWindow *toRemove = NULL); + + // Replaces one of the windows with another one (neither old nor new + // parameter should be NULL) + bool ReplaceWindow(wxWindow *winOld, wxWindow *winNew); + + // Make sure the child window sizes are updated. This is useful + // for reducing flicker by updating the sizes before a + // window is shown, if you know the overall size is correct. + void UpdateSize(); + + // Is the window split? + bool IsSplit() const { return (m_windowTwo != NULL); } + + // Sets the border size + void SetBorderSize(int WXUNUSED(width)) { } + + // Hide or show the sash and test whether it's currently hidden. + void SetSashInvisible(bool invisible = true); + bool IsSashInvisible() const { return HasFlag(wxSP_NOSASH); } + + // Gets the current sash size which may be 0 if it's hidden and the default + // sash size. + int GetSashSize() const; + int GetDefaultSashSize() const; + + // Gets the border size + int GetBorderSize() const; + + // Set the sash position + void SetSashPosition(int position, bool redraw = true); + + // Gets the sash position + int GetSashPosition() const { return m_sashPosition; } + + // Set the sash gravity + void SetSashGravity(double gravity); + + // Gets the sash gravity + double GetSashGravity() const { return m_sashGravity; } + + // If this is zero, we can remove panes by dragging the sash. + void SetMinimumPaneSize(int min); + int GetMinimumPaneSize() const { return m_minimumPaneSize; } + + // NB: the OnXXX() functions below are for backwards compatibility only, + // don't use them in new code but handle the events instead! + + // called when the sash position is about to change, may return a new value + // for the sash or -1 to prevent the change from happening at all + virtual int OnSashPositionChanging(int newSashPosition); + + // Called when the sash position is about to be changed, return + // false from here to prevent the change from taking place. + // Repositions sash to minimum position if pane would be too small. + // newSashPosition here is always positive or zero. + virtual bool OnSashPositionChange(int newSashPosition); + + // If the sash is moved to an extreme position, a subwindow + // is removed from the splitter window, and the app is + // notified. The app should delete or hide the window. + virtual void OnUnsplit(wxWindow *removed); + + // Called when the sash is double-clicked. + // The default behaviour is to remove the sash if the + // minimum pane size is zero. + virtual void OnDoubleClickSash(int x, int y); + +//////////////////////////////////////////////////////////////////////////// +// Implementation + + // Paints the border and sash + void OnPaint(wxPaintEvent& event); + + // Handles mouse events + void OnMouseEvent(wxMouseEvent& ev); + + // Aborts dragging mode + void OnMouseCaptureLost(wxMouseCaptureLostEvent& event); + + // Adjusts the panes + void OnSize(wxSizeEvent& event); + + // In live mode, resize child windows in idle time + void OnInternalIdle(); + + // Draws the sash + virtual void DrawSash(wxDC& dc); + + // Draws the sash tracker (for whilst moving the sash) + virtual void DrawSashTracker(int x, int y); + + // Tests for x, y over sash + virtual bool SashHitTest(int x, int y); + + // Resizes subwindows + virtual void SizeWindows(); + +#ifdef __WXMAC__ + virtual bool MacClipGrandChildren() const { return true ; } +#endif + + // Sets the sash size: this doesn't do anything and shouldn't be used at + // all any more. + wxDEPRECATED_INLINE( void SetSashSize(int WXUNUSED(width)), return; ) + +protected: + // event handlers +#if defined(__WXMSW__) || defined(__WXMAC__) + void OnSetCursor(wxSetCursorEvent& event); +#endif // wxMSW + + // send the given event, return false if the event was processed and vetoed + // by the user code + bool DoSendEvent(wxSplitterEvent& event); + + // common part of all ctors + void Init(); + + // common part of SplitVertically() and SplitHorizontally() + bool DoSplit(wxSplitMode mode, + wxWindow *window1, wxWindow *window2, + int sashPosition); + + // adjusts sash position with respect to min. pane and window sizes + int AdjustSashPosition(int sashPos) const; + + // get either width or height depending on the split mode + int GetWindowSize() const; + + // convert the user specified sash position which may be > 0 (as is), < 0 + // (specifying the size of the right pane) or 0 (use default) to the real + // position to be passed to DoSetSashPosition() + int ConvertSashPosition(int sashPos) const; + + // set the real sash position, sashPos here must be positive + // + // returns true if the sash position has been changed, false otherwise + bool DoSetSashPosition(int sashPos); + + // set the sash position and send an event about it having been changed + void SetSashPositionAndNotify(int sashPos); + + // callbacks executed when we detect that the mouse has entered or left + // the sash + virtual void OnEnterSash(); + virtual void OnLeaveSash(); + + // set the cursor appropriate for the current split mode + void SetResizeCursor(); + + // redraw the splitter if its "hotness" changed if necessary + void RedrawIfHotSensitive(bool isHot); + + // return the best size of the splitter equal to best sizes of its + // subwindows + virtual wxSize DoGetBestSize() const; + + + wxSplitMode m_splitMode; + wxWindow* m_windowOne; + wxWindow* m_windowTwo; + int m_dragMode; + int m_oldX; // current tracker position if not live mode + int m_oldY; // current tracker position if not live mode + int m_sashPosition; // Number of pixels from left or top + double m_sashGravity; + wxSize m_lastSize; + int m_requestedSashPosition; + int m_sashPositionCurrent; // while dragging + wxPoint m_ptStart; // mouse position when dragging started + int m_sashStart; // sash position when dragging started + int m_minimumPaneSize; + wxCursor m_sashCursorWE; + wxCursor m_sashCursorNS; + wxPen *m_sashTrackerPen; + + // when in live mode, set this to true to resize children in idle + bool m_needUpdating:1; + bool m_permitUnsplitAlways:1; + bool m_isHot:1; + +private: + DECLARE_DYNAMIC_CLASS(wxSplitterWindow) + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxSplitterWindow); +}; + +// ---------------------------------------------------------------------------- +// event class and macros +// ---------------------------------------------------------------------------- + +// we reuse the same class for all splitter event types because this is the +// usual wxWin convention, but the three event types have different kind of +// data associated with them, so the accessors can be only used if the real +// event type matches with the one for which the accessors make sense +class WXDLLIMPEXP_CORE wxSplitterEvent : public wxNotifyEvent +{ +public: + wxSplitterEvent(wxEventType type = wxEVT_NULL, + wxSplitterWindow *splitter = NULL) + : wxNotifyEvent(type) + { + SetEventObject(splitter); + if (splitter) m_id = splitter->GetId(); + } + wxSplitterEvent(const wxSplitterEvent& event) + : wxNotifyEvent(event), m_data(event.m_data) { } + + // SASH_POS_CHANGED methods + + // setting the sash position to -1 prevents the change from taking place at + // all + void SetSashPosition(int pos) + { + wxASSERT( GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGED + || GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGING); + + m_data.pos = pos; + } + + int GetSashPosition() const + { + wxASSERT( GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGED + || GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGING); + + return m_data.pos; + } + + // UNSPLIT event methods + wxWindow *GetWindowBeingRemoved() const + { + wxASSERT( GetEventType() == wxEVT_SPLITTER_UNSPLIT ); + + return m_data.win; + } + + // DCLICK event methods + int GetX() const + { + wxASSERT( GetEventType() == wxEVT_SPLITTER_DOUBLECLICKED ); + + return m_data.pt.x; + } + + int GetY() const + { + wxASSERT( GetEventType() == wxEVT_SPLITTER_DOUBLECLICKED ); + + return m_data.pt.y; + } + + virtual wxEvent *Clone() const { return new wxSplitterEvent(*this); } + +private: + friend class WXDLLIMPEXP_FWD_CORE wxSplitterWindow; + + // data for the different types of event + union + { + int pos; // position for SASH_POS_CHANGED event + wxWindow *win; // window being removed for UNSPLIT event + struct + { + int x, y; + } pt; // position of double click for DCLICK event + } m_data; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSplitterEvent) +}; + +typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&); + +#define wxSplitterEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxSplitterEventFunction, func) + +#define wx__DECLARE_SPLITTEREVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_SPLITTER_ ## evt, id, wxSplitterEventHandler(fn)) + +#define EVT_SPLITTER_SASH_POS_CHANGED(id, fn) \ + wx__DECLARE_SPLITTEREVT(SASH_POS_CHANGED, id, fn) + +#define EVT_SPLITTER_SASH_POS_CHANGING(id, fn) \ + wx__DECLARE_SPLITTEREVT(SASH_POS_CHANGING, id, fn) + +#define EVT_SPLITTER_DCLICK(id, fn) \ + wx__DECLARE_SPLITTEREVT(DOUBLECLICKED, id, fn) + +#define EVT_SPLITTER_UNSPLIT(id, fn) \ + wx__DECLARE_SPLITTEREVT(UNSPLIT, id, fn) + + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED wxEVT_SPLITTER_SASH_POS_CHANGED +#define wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING wxEVT_SPLITTER_SASH_POS_CHANGING +#define wxEVT_COMMAND_SPLITTER_DOUBLECLICKED wxEVT_SPLITTER_DOUBLECLICKED +#define wxEVT_COMMAND_SPLITTER_UNSPLIT wxEVT_SPLITTER_UNSPLIT + +#endif // _WX_GENERIC_SPLITTER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/srchctlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/srchctlg.h new file mode 100644 index 0000000000..c61ddee751 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/srchctlg.h @@ -0,0 +1,277 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/srchctlg.h +// Purpose: generic wxSearchCtrl class +// Author: Vince Harron +// Created: 2006-02-19 +// Copyright: Vince Harron +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_SEARCHCTRL_H_ +#define _WX_GENERIC_SEARCHCTRL_H_ + +#if wxUSE_SEARCHCTRL + +#include "wx/bitmap.h" + +class WXDLLIMPEXP_FWD_CORE wxSearchButton; +class WXDLLIMPEXP_FWD_CORE wxSearchTextCtrl; + +// ---------------------------------------------------------------------------- +// wxSearchCtrl is a combination of wxTextCtrl and wxSearchButton +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSearchCtrl : public wxSearchCtrlBase +{ +public: + // creation + // -------- + + wxSearchCtrl(); + wxSearchCtrl(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSearchCtrlNameStr); + + virtual ~wxSearchCtrl(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSearchCtrlNameStr); + +#if wxUSE_MENUS + // get/set search button menu + // -------------------------- + virtual void SetMenu( wxMenu* menu ); + virtual wxMenu* GetMenu(); +#endif // wxUSE_MENUS + + // get/set search options + // ---------------------- + virtual void ShowSearchButton( bool show ); + virtual bool IsSearchButtonVisible() const; + + virtual void ShowCancelButton( bool show ); + virtual bool IsCancelButtonVisible() const; + + // TODO: In 2.9 these should probably be virtual, and declared in the base class... + void SetDescriptiveText(const wxString& text); + wxString GetDescriptiveText() const; + + // accessors + // --------- + + virtual wxString GetRange(long from, long to) const; + + virtual int GetLineLength(long lineNo) const; + virtual wxString GetLineText(long lineNo) const; + virtual int GetNumberOfLines() const; + + virtual bool IsModified() const; + virtual bool IsEditable() const; + + // more readable flag testing methods + virtual bool IsSingleLine() const; + virtual bool IsMultiLine() const; + + // If the return values from and to are the same, there is no selection. + virtual void GetSelection(long* from, long* to) const; + + virtual wxString GetStringSelection() const; + + // operations + // ---------- + + // editing + virtual void Clear(); + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to); + + // load/save the controls contents from/to the file + virtual bool LoadFile(const wxString& file); + virtual bool SaveFile(const wxString& file = wxEmptyString); + + // sets/clears the dirty flag + virtual void MarkDirty(); + virtual void DiscardEdits(); + + // set the max number of characters which may be entered in a single line + // text control + virtual void SetMaxLength(unsigned long WXUNUSED(len)); + + // writing text inserts it at the current position, appending always + // inserts it at the end + virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text); + + // insert the character which would have resulted from this key event, + // return true if anything has been inserted + virtual bool EmulateKeyPress(const wxKeyEvent& event); + + // text control under some platforms supports the text styles: these + // methods allow to apply the given text style to the given selection or to + // set/get the style which will be used for all appended text + virtual bool SetStyle(long start, long end, const wxTextAttr& style); + virtual bool GetStyle(long position, wxTextAttr& style); + virtual bool SetDefaultStyle(const wxTextAttr& style); + virtual const wxTextAttr& GetDefaultStyle() const; + + // translate between the position (which is just an index in the text ctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent column and line. + virtual long XYToPosition(long x, long y) const; + virtual bool PositionToXY(long pos, long *x, long *y) const; + + virtual void ShowPosition(long pos); + + // find the character at position given in pixels + // + // NB: pt is in device coords (not adjusted for the client area origin nor + // scrolling) + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const; + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const; + + // Clipboard operations + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + virtual bool CanCopy() const; + virtual bool CanCut() const; + virtual bool CanPaste() const; + + // Undo/redo + virtual void Undo(); + virtual void Redo(); + + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + // Insertion point + virtual void SetInsertionPoint(long pos); + virtual void SetInsertionPointEnd(); + virtual long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + + virtual void SetSelection(long from, long to); + virtual void SelectAll(); + virtual void SetEditable(bool editable); + +#if 0 + + // override streambuf method +#if wxHAS_TEXT_WINDOW_STREAM + int overflow(int i); +#endif // wxHAS_TEXT_WINDOW_STREAM + + // stream-like insertion operators: these are always available, whether we + // were, or not, compiled with streambuf support + wxTextCtrl& operator<<(const wxString& s); + wxTextCtrl& operator<<(int i); + wxTextCtrl& operator<<(long i); + wxTextCtrl& operator<<(float f); + wxTextCtrl& operator<<(double d); + wxTextCtrl& operator<<(const wxChar c); +#endif + + // do the window-specific processing after processing the update event + virtual void DoUpdateWindowUI(wxUpdateUIEvent& event); + + virtual bool ShouldInheritColours() const; + + // wxWindow overrides + virtual bool SetFont(const wxFont& font); + virtual bool SetBackgroundColour(const wxColour& colour); + + // search control generic only + void SetSearchBitmap( const wxBitmap& bitmap ); + void SetCancelBitmap( const wxBitmap& bitmap ); +#if wxUSE_MENUS + void SetSearchMenuBitmap( const wxBitmap& bitmap ); +#endif // wxUSE_MENUS + +protected: + virtual void DoSetValue(const wxString& value, int flags); + virtual wxString DoGetValue() const; + + virtual bool DoLoadFile(const wxString& file, int fileType); + virtual bool DoSaveFile(const wxString& file, int fileType); + + // override the base class virtuals involved into geometry calculations + virtual wxSize DoGetBestSize() const; + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual void LayoutControls(int x, int y, int width, int height); + + virtual void RecalcBitmaps(); + + void Init(); + + virtual wxBitmap RenderSearchBitmap( int x, int y, bool renderDrop ); + virtual wxBitmap RenderCancelBitmap( int x, int y ); + + void OnCancelButton( wxCommandEvent& event ); + + void OnSetFocus( wxFocusEvent& event ); + void OnSize( wxSizeEvent& event ); + + bool HasMenu() const + { +#if wxUSE_MENUS + return m_menu != NULL; +#else // !wxUSE_MENUS + return false; +#endif // wxUSE_MENUS/!wxUSE_MENUS + } + +private: + friend class wxSearchButton; + + // Implement pure virtual function inherited from wxCompositeWindow. + virtual wxWindowList GetCompositeWindowParts() const; + +#if wxUSE_MENUS + void PopupSearchMenu(); +#endif // wxUSE_MENUS + + // the subcontrols + wxSearchTextCtrl *m_text; + wxSearchButton *m_searchButton; + wxSearchButton *m_cancelButton; +#if wxUSE_MENUS + wxMenu *m_menu; +#endif // wxUSE_MENUS + + bool m_searchButtonVisible; + bool m_cancelButtonVisible; + + bool m_searchBitmapUser; + bool m_cancelBitmapUser; +#if wxUSE_MENUS + bool m_searchMenuBitmapUser; +#endif // wxUSE_MENUS + + wxBitmap m_searchBitmap; + wxBitmap m_cancelBitmap; +#if wxUSE_MENUS + wxBitmap m_searchMenuBitmap; +#endif // wxUSE_MENUS + +private: + DECLARE_DYNAMIC_CLASS(wxSearchCtrl) + + DECLARE_EVENT_TABLE() +}; + +#endif // wxUSE_SEARCHCTRL + +#endif // _WX_GENERIC_SEARCHCTRL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/statbmpg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/statbmpg.h new file mode 100644 index 0000000000..f3d198df4e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/statbmpg.h @@ -0,0 +1,75 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/statbmpg.h +// Purpose: wxGenericStaticBitmap header +// Author: Marcin Wojdyr, Stefan Csomor +// Created: 2008-06-16 +// Copyright: wxWidgets developers +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_STATBMP_H_ +#define _WX_GENERIC_STATBMP_H_ + +#include "wx/statbmp.h" + +class WXDLLIMPEXP_CORE wxGenericStaticBitmap : public wxStaticBitmapBase +{ +public: + wxGenericStaticBitmap() {} + wxGenericStaticBitmap(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr) + { + Create(parent, id, bitmap, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr); + + virtual void SetBitmap(const wxBitmap& bitmap) + { + m_bitmap = bitmap; + SetInitialSize(GetBitmapSize()); + Refresh(); + } + + virtual wxBitmap GetBitmap() const { return m_bitmap; } + + virtual void SetIcon(const wxIcon& icon) + { + m_bitmap.CopyFromIcon(icon); + SetInitialSize(GetBitmapSize()); + Refresh(); + } + +#if defined(__WXGTK20__) || defined(__WXMAC__) + // icons and bitmaps are really the same thing in wxGTK and wxMac + wxIcon GetIcon() const { return (const wxIcon &)m_bitmap; } +#endif + + +private: + wxSize GetBitmapSize() + { + return m_bitmap.IsOk() ? m_bitmap.GetScaledSize() + : wxSize(16, 16); // this is completely arbitrary + } + + void OnPaint(wxPaintEvent& event); + + wxBitmap m_bitmap; + + DECLARE_DYNAMIC_CLASS(wxGenericStaticBitmap) +}; + + +#endif //_WX_GENERIC_STATBMP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/statline.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/statline.h new file mode 100644 index 0000000000..8a7ccbf088 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/statline.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/statline.h +// Purpose: a generic wxStaticLine class +// Author: Vadim Zeitlin +// Created: 28.06.99 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_STATLINE_H_ +#define _WX_GENERIC_STATLINE_H_ + +class wxStaticBox; + +// ---------------------------------------------------------------------------- +// wxStaticLine +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase +{ + DECLARE_DYNAMIC_CLASS(wxStaticLine) + +public: + // constructors and pseudo-constructors + wxStaticLine() { m_statbox = NULL; } + + wxStaticLine( wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr ) + { + Create(parent, id, pos, size, style, name); + } + + virtual ~wxStaticLine(); + + bool Create( wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr ); + + // it's necessary to override this wxWindow function because we + // will want to return the main widget for m_statbox + // + WXWidget GetMainWidget() const; + + // override wxWindow methods to make things work + virtual void DoSetSize(int x, int y, int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoMoveWindow(int x, int y, int width, int height); +protected: + // we implement the static line using a static box + wxStaticBox *m_statbox; +}; + +#endif // _WX_GENERIC_STATLINE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/stattextg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/stattextg.h new file mode 100644 index 0000000000..918a4f4eb3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/stattextg.h @@ -0,0 +1,90 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/stattextg.h +// Purpose: wxGenericStaticText header +// Author: Marcin Wojdyr +// Created: 2008-06-26 +// Copyright: Marcin Wojdyr +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_STATTEXTG_H_ +#define _WX_GENERIC_STATTEXTG_H_ + +// prevent it from including the platform-specific wxStaticText declaration as +// this is not going to compile if it derives from wxGenericStaticText defined +// below (currently this is only the case in wxUniv but it could also happen +// with other ports) +#define wxNO_PORT_STATTEXT_INCLUDE +#include "wx/stattext.h" +#undef wxNO_PORT_STATTEXT_INCLUDE + +class WXDLLIMPEXP_CORE wxGenericStaticText : public wxStaticTextBase +{ +public: + wxGenericStaticText() { Init(); } + + wxGenericStaticText(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticTextNameStr) + { + Init(); + + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticTextNameStr); + + virtual ~wxGenericStaticText(); + + + // overridden base class virtual methods + virtual void SetLabel(const wxString& label); + virtual bool SetFont(const wxFont &font); + +protected: + virtual wxSize DoGetBestClientSize() const; + + virtual wxString DoGetLabel() const { return m_label; } + virtual void DoSetLabel(const wxString& label); + + void DoSetSize(int x, int y, int width, int height, int sizeFlags); + +#if wxUSE_MARKUP + virtual bool DoSetLabelMarkup(const wxString& markup); +#endif // wxUSE_MARKUP + +private: + void Init() + { +#if wxUSE_MARKUP + m_markupText = NULL; +#endif // wxUSE_MARKUP + } + + void OnPaint(wxPaintEvent& event); + + void DoDrawLabel(wxDC& dc, const wxRect& rect); + + // These fields are only used if m_markupText == NULL. + wxString m_label; + int m_mnemonic; + +#if wxUSE_MARKUP + class wxMarkupText *m_markupText; +#endif // wxUSE_MARKUP + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericStaticText) +}; + +#endif // _WX_GENERIC_STATTEXTG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/statusbr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/statusbr.h new file mode 100644 index 0000000000..bff20807e3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/statusbr.h @@ -0,0 +1,119 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/statusbr.h +// Purpose: wxStatusBarGeneric class +// Author: Julian Smart +// Modified by: VZ at 05.02.00 to derive from wxStatusBarBase +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_STATUSBR_H_ +#define _WX_GENERIC_STATUSBR_H_ + +#include "wx/defs.h" + +#if wxUSE_STATUSBAR + +#include "wx/pen.h" +#include "wx/arrstr.h" + + +// ---------------------------------------------------------------------------- +// wxStatusBarGeneric +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStatusBarGeneric : public wxStatusBarBase +{ +public: + wxStatusBarGeneric() { Init(); } + wxStatusBarGeneric(wxWindow *parent, + wxWindowID winid = wxID_ANY, + long style = wxSTB_DEFAULT_STYLE, + const wxString& name = wxStatusBarNameStr) + { + Init(); + + Create(parent, winid, style, name); + } + + virtual ~wxStatusBarGeneric(); + + bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, + long style = wxSTB_DEFAULT_STYLE, + const wxString& name = wxStatusBarNameStr); + + // implement base class methods + virtual void SetStatusWidths(int n, const int widths_field[]); + virtual bool GetFieldRect(int i, wxRect& rect) const; + virtual void SetMinHeight(int height); + + virtual int GetBorderX() const { return m_borderX; } + virtual int GetBorderY() const { return m_borderY; } + + + // implementation only (not part of wxStatusBar public API): + + int GetFieldFromPoint(const wxPoint& point) const; + +protected: + virtual void DoUpdateStatusText(int number); + + // event handlers + void OnPaint(wxPaintEvent& event); + void OnSize(wxSizeEvent& event); + + void OnLeftDown(wxMouseEvent& event); + void OnRightDown(wxMouseEvent& event); + + // Responds to colour changes + void OnSysColourChanged(wxSysColourChangedEvent& event); + +protected: + + virtual void DrawFieldText(wxDC& dc, const wxRect& rc, int i, int textHeight); + virtual void DrawField(wxDC& dc, int i, int textHeight); + + void SetBorderX(int x); + void SetBorderY(int y); + + virtual void InitColours(); + + // true if the status bar shows the size grip: for this it must have + // wxSTB_SIZEGRIP style and the window it is attached to must be resizable + // and not maximized + bool ShowsSizeGrip() const; + + // returns the position and the size of the size grip + wxRect GetSizeGripRect() const; + + // common part of all ctors + void Init(); + + // the last known size, fields widths must be updated whenever it's out of + // date + wxSize m_lastClientSize; + + // the absolute widths of the status bar panes in pixels + wxArrayInt m_widthsAbs; + + int m_borderX; + int m_borderY; + + wxPen m_mediumShadowPen; + wxPen m_hilightPen; + + virtual wxSize DoGetBestSize() const; + +private: + // Update m_lastClientSize and m_widthsAbs from the current size. + void DoUpdateFieldWidths(); + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric) +}; + +#endif // wxUSE_STATUSBAR + +#endif + // _WX_GENERIC_STATUSBR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/tabg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/tabg.h new file mode 100644 index 0000000000..d376b3b510 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/tabg.h @@ -0,0 +1,358 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/tabg.h +// Purpose: Generic tabbed dialogs; used by wxMotif's wxNotebook +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __TABGH_G__ +#define __TABGH_G__ + +#define WXTAB_VERSION 1.1 + +#include "wx/hashmap.h" +#include "wx/string.h" +#include "wx/dialog.h" +#include "wx/panel.h" +#include "wx/list.h" + +class WXDLLIMPEXP_FWD_CORE wxTabView; + +/* + * A wxTabControl is the internal and visual representation + * of the tab. + */ + +class WXDLLIMPEXP_CORE wxTabControl: public wxObject +{ +DECLARE_DYNAMIC_CLASS(wxTabControl) +public: + wxTabControl(wxTabView *v = NULL); + virtual ~wxTabControl(void); + + virtual void OnDraw(wxDC& dc, bool lastInRow); + void SetLabel(const wxString& str) { m_controlLabel = str; } + wxString GetLabel(void) const { return m_controlLabel; } + + void SetFont(const wxFont& f) { m_labelFont = f; } + wxFont *GetFont(void) const { return (wxFont*) & m_labelFont; } + + void SetSelected(bool sel) { m_isSelected = sel; } + bool IsSelected(void) const { return m_isSelected; } + + void SetPosition(int x, int y) { m_offsetX = x; m_offsetY = y; } + void SetSize(int x, int y) { m_width = x; m_height = y; } + + void SetRowPosition(int r) { m_rowPosition = r; } + int GetRowPosition() const { return m_rowPosition; } + void SetColPosition(int c) { m_colPosition = c; } + int GetColPosition() const { return m_colPosition; } + + int GetX(void) const { return m_offsetX; } + int GetY(void) const { return m_offsetY; } + int GetWidth(void) const { return m_width; } + int GetHeight(void) const { return m_height; } + + int GetId(void) const { return m_id; } + void SetId(int i) { m_id = i; } + + virtual bool HitTest(int x, int y) const ; + +protected: + wxTabView* m_view; + wxString m_controlLabel; + bool m_isSelected; + wxFont m_labelFont; + int m_offsetX; // Offsets from top-left of tab view area (the area below the tabs) + int m_offsetY; + int m_width; + int m_height; + int m_id; + int m_rowPosition; // Position in row from 0 + int m_colPosition; // Position in col from 0 +}; + +/* + * Each wxTabLayer is a list of tabs. E.g. there + * are 3 layers in the MS Word Options dialog. + */ + +class WXDLLIMPEXP_CORE wxTabLayer: public wxList +{ +}; + +/* + * The wxTabView controls and draws the tabbed object + */ + +WX_DECLARE_LIST(wxTabLayer, wxTabLayerList); + +#define wxTAB_STYLE_DRAW_BOX 1 // Draws 3D boxes round tab layers +#define wxTAB_STYLE_COLOUR_INTERIOR 2 // Colours interior of tabs, otherwise draws outline + +class WXDLLIMPEXP_CORE wxTabView: public wxObject +{ +DECLARE_DYNAMIC_CLASS(wxTabView) +public: + wxTabView(long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR); + virtual ~wxTabView(); + + inline int GetNumberOfLayers() const { return m_layers.GetCount(); } + inline wxTabLayerList& GetLayers() { return m_layers; } + + inline void SetWindow(wxWindow* wnd) { m_window = wnd; } + inline wxWindow* GetWindow(void) const { return m_window; } + + // Automatically positions tabs + wxTabControl *AddTab(int id, const wxString& label, wxTabControl *existingTab = NULL); + + // Remove the tab without deleting the window + bool RemoveTab(int id); + + void ClearTabs(bool deleteTabs = true); + + bool SetTabText(int id, const wxString& label); + wxString GetTabText(int id) const; + + // Layout tabs (optional, e.g. if resizing window) + void LayoutTabs(); + + // Draw all tabs + virtual void Draw(wxDC& dc); + + // Process mouse event, return false if we didn't process it + virtual bool OnEvent(wxMouseEvent& event); + + // Called when a tab is activated + virtual void OnTabActivate(int activateId, int deactivateId); + // Allows vetoing + virtual bool OnTabPreActivate(int WXUNUSED(activateId), int WXUNUSED(deactivateId) ) { return true; } + + // Allows use of application-supplied wxTabControl classes. + virtual wxTabControl *OnCreateTabControl(void) { return new wxTabControl(this); } + + void SetHighlightColour(const wxColour& col); + void SetShadowColour(const wxColour& col); + void SetBackgroundColour(const wxColour& col); + inline void SetTextColour(const wxColour& col) { m_textColour = col; } + + inline wxColour GetHighlightColour(void) const { return m_highlightColour; } + inline wxColour GetShadowColour(void) const { return m_shadowColour; } + inline wxColour GetBackgroundColour(void) const { return m_backgroundColour; } + inline wxColour GetTextColour(void) const { return m_textColour; } + inline const wxPen *GetHighlightPen(void) const { return m_highlightPen; } + inline const wxPen *GetShadowPen(void) const { return m_shadowPen; } + inline const wxPen *GetBackgroundPen(void) const { return m_backgroundPen; } + inline const wxBrush *GetBackgroundBrush(void) const { return m_backgroundBrush; } + + inline void SetViewRect(const wxRect& rect) { m_tabViewRect = rect; } + inline wxRect GetViewRect(void) const { return m_tabViewRect; } + + // Calculate tab width to fit to view, and optionally adjust the view + // to fit the tabs exactly. + int CalculateTabWidth(int noTabs, bool adjustView = false); + + inline void SetTabStyle(long style) { m_tabStyle = style; } + inline long GetTabStyle(void) const { return m_tabStyle; } + + inline void SetTabSize(int w, int h) { m_tabWidth = w; m_tabHeight = h; } + inline int GetTabWidth(void) const { return m_tabWidth; } + inline int GetTabHeight(void) const { return m_tabHeight; } + inline void SetTabSelectionHeight(int h) { m_tabSelectionHeight = h; } + inline int GetTabSelectionHeight(void) const { return m_tabSelectionHeight; } + + // Returns the total height of the tabs component -- this may be several + // times the height of a tab, if there are several tab layers (rows). + int GetTotalTabHeight(); + + inline int GetTopMargin(void) const { return m_topMargin; } + inline void SetTopMargin(int margin) { m_topMargin = margin; } + + void SetTabSelection(int sel, bool activateTool = true); + inline int GetTabSelection() const { return m_tabSelection; } + + // Find tab control for id + wxTabControl *FindTabControlForId(int id) const ; + + // Find tab control for layer, position (starting from zero) + wxTabControl *FindTabControlForPosition(int layer, int position) const ; + + inline int GetHorizontalTabOffset() const { return m_tabHorizontalOffset; } + inline int GetHorizontalTabSpacing() const { return m_tabHorizontalSpacing; } + inline void SetHorizontalTabOffset(int sp) { m_tabHorizontalOffset = sp; } + inline void SetHorizontalTabSpacing(int sp) { m_tabHorizontalSpacing = sp; } + + inline void SetVerticalTabTextSpacing(int s) { m_tabVerticalTextSpacing = s; } + inline int GetVerticalTabTextSpacing() const { return m_tabVerticalTextSpacing; } + + inline wxFont *GetTabFont() const { return (wxFont*) & m_tabFont; } + inline void SetTabFont(const wxFont& f) { m_tabFont = f; } + + inline wxFont *GetSelectedTabFont() const { return (wxFont*) & m_tabSelectedFont; } + inline void SetSelectedTabFont(const wxFont& f) { m_tabSelectedFont = f; } + // Find the node and the column at which this control is positioned. + wxList::compatibility_iterator FindTabNodeAndColumn(wxTabControl *control, int *col) const ; + + // Do the necessary to change to this tab + virtual bool ChangeTab(wxTabControl *control); + + // Move the selected tab to the bottom layer, if necessary, + // without calling app activation code + bool MoveSelectionTab(wxTabControl *control); + + inline int GetNumberOfTabs() const { return m_noTabs; } + +protected: + // List of layers, from front to back. + wxTabLayerList m_layers; + + // Selected tab + int m_tabSelection; + + // Usual tab height + int m_tabHeight; + + // The height of the selected tab + int m_tabSelectionHeight; + + // Usual tab width + int m_tabWidth; + + // Space between tabs + int m_tabHorizontalSpacing; + + // Space between top of normal tab and text + int m_tabVerticalTextSpacing; + + // Horizontal offset of each tab row above the first + int m_tabHorizontalOffset; + + // The distance between the bottom of the first tab row + // and the top of the client area (i.e. the margin) + int m_topMargin; + + // The position and size of the view above which the tabs are placed. + // I.e., the internal client area of the sheet. + wxRect m_tabViewRect; + + // Bitlist of styles + long m_tabStyle; + + // Colours + wxColour m_highlightColour; + wxColour m_shadowColour; + wxColour m_backgroundColour; + wxColour m_textColour; + + // Pen and brush cache + const wxPen* m_highlightPen; + const wxPen* m_shadowPen; + const wxPen* m_backgroundPen; + const wxBrush* m_backgroundBrush; + + wxFont m_tabFont; + wxFont m_tabSelectedFont; + + int m_noTabs; + + wxWindow* m_window; +}; + +/* + * A dialog box class that is tab-friendly + */ + +class WXDLLIMPEXP_CORE wxTabbedDialog : public wxDialog +{ + DECLARE_DYNAMIC_CLASS(wxTabbedDialog) + +public: + wxTabbedDialog(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long windowStyle = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr); + virtual ~wxTabbedDialog(); + + wxTabView *GetTabView() const { return m_tabView; } + void SetTabView(wxTabView *v) { m_tabView = v; } + + void OnCloseWindow(wxCloseEvent& event); + void OnMouseEvent(wxMouseEvent& event); + void OnPaint(wxPaintEvent& event); + +protected: + wxTabView* m_tabView; + +private: + DECLARE_EVENT_TABLE() +}; + +/* + * A panel class that is tab-friendly + */ + +class WXDLLIMPEXP_CORE wxTabbedPanel : public wxPanel +{ + DECLARE_DYNAMIC_CLASS(wxTabbedPanel) + +public: + wxTabbedPanel(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long windowStyle = 0, + const wxString& name = wxPanelNameStr); + virtual ~wxTabbedPanel(); + + wxTabView *GetTabView() const { return m_tabView; } + void SetTabView(wxTabView *v) { m_tabView = v; } + + void OnMouseEvent(wxMouseEvent& event); + void OnPaint(wxPaintEvent& event); + +protected: + wxTabView* m_tabView; + +private: + DECLARE_EVENT_TABLE() +}; + +WX_DECLARE_HASH_MAP(int, wxWindow*, wxIntegerHash, wxIntegerEqual, + wxIntToWindowHashMap); + +class WXDLLIMPEXP_CORE wxPanelTabView : public wxTabView +{ + DECLARE_DYNAMIC_CLASS(wxPanelTabView) + +public: + wxPanelTabView(wxPanel *pan, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR); + virtual ~wxPanelTabView(void); + + // Called when a tab is activated + virtual void OnTabActivate(int activateId, int deactivateId); + + // Specific to this class + void AddTabWindow(int id, wxWindow *window); + wxWindow *GetTabWindow(int id) const ; + void ClearWindows(bool deleteWindows = true); + wxWindow *GetCurrentWindow() const { return m_currentWindow; } + + void ShowWindowForTab(int id); + // wxList& GetWindows() const { return (wxList&) m_tabWindows; } + +protected: + // List of panels, one for each tab. Indexed + // by tab ID. + wxIntToWindowHashMap m_tabWindows; + wxWindow* m_currentWindow; + wxPanel* m_panel; +}; + +#endif + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/textdlgg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/textdlgg.h new file mode 100644 index 0000000000..023d497c30 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/textdlgg.h @@ -0,0 +1,134 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/textdlgg.h +// Purpose: wxTextEntryDialog class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTDLGG_H_ +#define _WX_TEXTDLGG_H_ + +#include "wx/defs.h" + +#if wxUSE_TEXTDLG + +#include "wx/dialog.h" + +#if wxUSE_VALIDATORS +#include "wx/valtext.h" +#include "wx/textctrl.h" +#endif + +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; + +extern WXDLLIMPEXP_DATA_CORE(const char) wxGetTextFromUserPromptStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxGetPasswordFromUserPromptStr[]; + +#define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE | wxWS_EX_VALIDATE_RECURSIVELY) + +// ---------------------------------------------------------------------------- +// wxTextEntryDialog: a dialog with text control, [ok] and [cancel] buttons +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextEntryDialog : public wxDialog +{ +public: + wxTextEntryDialog() + { + m_textctrl = NULL; + } + + wxTextEntryDialog(wxWindow *parent, + const wxString& message, + const wxString& caption = wxGetTextFromUserPromptStr, + const wxString& value = wxEmptyString, + long style = wxTextEntryDialogStyle, + const wxPoint& pos = wxDefaultPosition) + { + Create(parent, message, caption, value, style, pos); + } + + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption = wxGetTextFromUserPromptStr, + const wxString& value = wxEmptyString, + long style = wxTextEntryDialogStyle, + const wxPoint& pos = wxDefaultPosition); + + void SetValue(const wxString& val); + wxString GetValue() const { return m_value; } + + void SetMaxLength(unsigned long len); + +#if wxUSE_VALIDATORS + void SetTextValidator( const wxTextValidator& validator ); +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( void SetTextValidator( long style ) ); +#endif + void SetTextValidator( wxTextValidatorStyle style = wxFILTER_NONE ); + wxTextValidator* GetTextValidator() { return (wxTextValidator*)m_textctrl->GetValidator(); } +#endif // wxUSE_VALIDATORS + + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); + + // implementation only + void OnOK(wxCommandEvent& event); + +protected: + wxTextCtrl *m_textctrl; + wxString m_value; + long m_dialogStyle; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxTextEntryDialog) + wxDECLARE_NO_COPY_CLASS(wxTextEntryDialog); +}; + +// ---------------------------------------------------------------------------- +// wxPasswordEntryDialog: dialog with password control, [ok] and [cancel] +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPasswordEntryDialog : public wxTextEntryDialog +{ +public: + wxPasswordEntryDialog(wxWindow *parent, + const wxString& message, + const wxString& caption = wxGetPasswordFromUserPromptStr, + const wxString& value = wxEmptyString, + long style = wxTextEntryDialogStyle, + const wxPoint& pos = wxDefaultPosition); +private: + DECLARE_DYNAMIC_CLASS(wxPasswordEntryDialog) + wxDECLARE_NO_COPY_CLASS(wxPasswordEntryDialog); +}; + +// ---------------------------------------------------------------------------- +// function to get a string from user +// ---------------------------------------------------------------------------- + +WXDLLIMPEXP_CORE wxString + wxGetTextFromUser(const wxString& message, + const wxString& caption = wxGetTextFromUserPromptStr, + const wxString& default_value = wxEmptyString, + wxWindow *parent = NULL, + wxCoord x = wxDefaultCoord, + wxCoord y = wxDefaultCoord, + bool centre = true); + +WXDLLIMPEXP_CORE wxString + wxGetPasswordFromUser(const wxString& message, + const wxString& caption = wxGetPasswordFromUserPromptStr, + const wxString& default_value = wxEmptyString, + wxWindow *parent = NULL, + wxCoord x = wxDefaultCoord, + wxCoord y = wxDefaultCoord, + bool centre = true); + +#endif + // wxUSE_TEXTDLG +#endif // _WX_TEXTDLGG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/timectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/timectrl.h new file mode 100644 index 0000000000..20b02498bd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/timectrl.h @@ -0,0 +1,69 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/timectrl.h +// Purpose: Generic implementation of wxTimePickerCtrl. +// Author: Paul Breen, Vadim Zeitlin +// Created: 2011-09-22 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_TIMECTRL_H_ +#define _WX_GENERIC_TIMECTRL_H_ + +#include "wx/containr.h" +#include "wx/compositewin.h" + +class WXDLLIMPEXP_ADV wxTimePickerCtrlGeneric + : public wxCompositeWindow< wxNavigationEnabled > +{ +public: + typedef wxCompositeWindow< wxNavigationEnabled > Base; + + // Creating the control. + wxTimePickerCtrlGeneric() { Init(); } + virtual ~wxTimePickerCtrlGeneric(); + wxTimePickerCtrlGeneric(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTP_DEFAULT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTimePickerCtrlNameStr) + { + Init(); + + (void)Create(parent, id, date, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTP_DEFAULT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTimePickerCtrlNameStr); + + // Implement pure virtual wxTimePickerCtrlBase methods. + virtual void SetValue(const wxDateTime& date); + virtual wxDateTime GetValue() const; + +protected: + virtual wxSize DoGetBestSize() const; + + virtual void DoMoveWindow(int x, int y, int width, int height); + +private: + void Init(); + + // Return the list of the windows composing this one. + virtual wxWindowList GetCompositeWindowParts() const; + + // Implementation data. + class wxTimePickerGenericImpl* m_impl; + + wxDECLARE_NO_COPY_CLASS(wxTimePickerCtrlGeneric); +}; + +#endif // _WX_GENERIC_TIMECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/treectlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/treectlg.h new file mode 100644 index 0000000000..53b3942835 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/treectlg.h @@ -0,0 +1,395 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/treectlg.h +// Purpose: wxTreeCtrl class +// Author: Robert Roebling +// Modified by: +// Created: 01/02/97 +// Copyright: (c) 1997,1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _GENERIC_TREECTRL_H_ +#define _GENERIC_TREECTRL_H_ + +#if wxUSE_TREECTRL + +#include "wx/scrolwin.h" +#include "wx/pen.h" + +// ----------------------------------------------------------------------------- +// forward declaration +// ----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxGenericTreeItem; + +class WXDLLIMPEXP_FWD_CORE wxTreeItemData; + +class WXDLLIMPEXP_FWD_CORE wxTreeRenameTimer; +class WXDLLIMPEXP_FWD_CORE wxTreeFindTimer; +class WXDLLIMPEXP_FWD_CORE wxTreeTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; + +// ----------------------------------------------------------------------------- +// wxGenericTreeCtrl - the tree control +// ----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericTreeCtrl : public wxTreeCtrlBase, + public wxScrollHelper +{ +public: + // creation + // -------- + + wxGenericTreeCtrl() : wxTreeCtrlBase(), wxScrollHelper(this) { Init(); } + + wxGenericTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTR_DEFAULT_STYLE, + const wxValidator &validator = wxDefaultValidator, + const wxString& name = wxTreeCtrlNameStr) + : wxTreeCtrlBase(), + wxScrollHelper(this) + { + Init(); + Create(parent, id, pos, size, style, validator, name); + } + + virtual ~wxGenericTreeCtrl(); + + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTR_DEFAULT_STYLE, + const wxValidator &validator = wxDefaultValidator, + const wxString& name = wxTreeCtrlNameStr); + + // implement base class pure virtuals + // ---------------------------------- + + virtual unsigned int GetCount() const; + + virtual unsigned int GetIndent() const { return m_indent; } + virtual void SetIndent(unsigned int indent); + + + virtual void SetImageList(wxImageList *imageList); + virtual void SetStateImageList(wxImageList *imageList); + + virtual wxString GetItemText(const wxTreeItemId& item) const; + virtual int GetItemImage(const wxTreeItemId& item, + wxTreeItemIcon which = wxTreeItemIcon_Normal) const; + virtual wxTreeItemData *GetItemData(const wxTreeItemId& item) const; + virtual wxColour GetItemTextColour(const wxTreeItemId& item) const; + virtual wxColour GetItemBackgroundColour(const wxTreeItemId& item) const; + virtual wxFont GetItemFont(const wxTreeItemId& item) const; + + virtual void SetItemText(const wxTreeItemId& item, const wxString& text); + virtual void SetItemImage(const wxTreeItemId& item, + int image, + wxTreeItemIcon which = wxTreeItemIcon_Normal); + virtual void SetItemData(const wxTreeItemId& item, wxTreeItemData *data); + + virtual void SetItemHasChildren(const wxTreeItemId& item, bool has = true); + virtual void SetItemBold(const wxTreeItemId& item, bool bold = true); + virtual void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = true); + virtual void SetItemTextColour(const wxTreeItemId& item, const wxColour& col); + virtual void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col); + virtual void SetItemFont(const wxTreeItemId& item, const wxFont& font); + + virtual bool IsVisible(const wxTreeItemId& item) const; + virtual bool ItemHasChildren(const wxTreeItemId& item) const; + virtual bool IsExpanded(const wxTreeItemId& item) const; + virtual bool IsSelected(const wxTreeItemId& item) const; + virtual bool IsBold(const wxTreeItemId& item) const; + + virtual size_t GetChildrenCount(const wxTreeItemId& item, + bool recursively = true) const; + + // navigation + // ---------- + + virtual wxTreeItemId GetRootItem() const { return m_anchor; } + virtual wxTreeItemId GetSelection() const + { + wxASSERT_MSG( !HasFlag(wxTR_MULTIPLE), + wxT("must use GetSelections() with this control") ); + + return m_current; + } + virtual size_t GetSelections(wxArrayTreeItemIds&) const; + virtual wxTreeItemId GetFocusedItem() const { return m_current; } + + virtual void ClearFocusedItem(); + virtual void SetFocusedItem(const wxTreeItemId& item); + + virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const; + virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const; + virtual wxTreeItemId GetNextChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const; + virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const; + virtual wxTreeItemId GetNextSibling(const wxTreeItemId& item) const; + virtual wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const; + + virtual wxTreeItemId GetFirstVisibleItem() const; + virtual wxTreeItemId GetNextVisible(const wxTreeItemId& item) const; + virtual wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const; + + + // operations + // ---------- + + virtual wxTreeItemId AddRoot(const wxString& text, + int image = -1, int selectedImage = -1, + wxTreeItemData *data = NULL); + + virtual void Delete(const wxTreeItemId& item); + virtual void DeleteChildren(const wxTreeItemId& item); + virtual void DeleteAllItems(); + + virtual void Expand(const wxTreeItemId& item); + virtual void Collapse(const wxTreeItemId& item); + virtual void CollapseAndReset(const wxTreeItemId& item); + virtual void Toggle(const wxTreeItemId& item); + + virtual void Unselect(); + virtual void UnselectAll(); + virtual void SelectItem(const wxTreeItemId& item, bool select = true); + virtual void SelectChildren(const wxTreeItemId& parent); + + virtual void EnsureVisible(const wxTreeItemId& item); + virtual void ScrollTo(const wxTreeItemId& item); + + virtual wxTextCtrl *EditLabel(const wxTreeItemId& item, + wxClassInfo* textCtrlClass = wxCLASSINFO(wxTextCtrl)); + virtual wxTextCtrl *GetEditControl() const; + virtual void EndEditLabel(const wxTreeItemId& item, + bool discardChanges = false); + + virtual void EnableBellOnNoMatch(bool on = true); + + virtual void SortChildren(const wxTreeItemId& item); + + // items geometry + // -------------- + + virtual bool GetBoundingRect(const wxTreeItemId& item, + wxRect& rect, + bool textOnly = false) const; + + + // this version specific methods + // ----------------------------- + + wxImageList *GetButtonsImageList() const { return m_imageListButtons; } + void SetButtonsImageList(wxImageList *imageList); + void AssignButtonsImageList(wxImageList *imageList); + + void SetDropEffectAboveItem( bool above = false ) { m_dropEffectAboveItem = above; } + bool GetDropEffectAboveItem() const { return m_dropEffectAboveItem; } + + wxTreeItemId GetNext(const wxTreeItemId& item) const; + +#if WXWIN_COMPATIBILITY_2_6 + // use EditLabel() instead + void Edit( const wxTreeItemId& item ) { EditLabel(item); } +#endif // WXWIN_COMPATIBILITY_2_6 + + // implementation only from now on + + // overridden base class virtuals + virtual bool SetBackgroundColour(const wxColour& colour); + virtual bool SetForegroundColour(const wxColour& colour); + + virtual void Refresh(bool eraseBackground = true, const wxRect *rect = NULL); + + virtual bool SetFont( const wxFont &font ); + virtual void SetWindowStyle(const long styles); + + // callbacks + void OnPaint( wxPaintEvent &event ); + void OnSetFocus( wxFocusEvent &event ); + void OnKillFocus( wxFocusEvent &event ); + void OnKeyDown( wxKeyEvent &event ); + void OnChar( wxKeyEvent &event ); + void OnMouse( wxMouseEvent &event ); + void OnGetToolTip( wxTreeEvent &event ); + void OnSize( wxSizeEvent &event ); + void OnInternalIdle( ); + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation helpers + void AdjustMyScrollbars(); + + WX_FORWARD_TO_SCROLL_HELPER() + +protected: + friend class wxGenericTreeItem; + friend class wxTreeRenameTimer; + friend class wxTreeFindTimer; + friend class wxTreeTextCtrl; + + wxFont m_normalFont; + wxFont m_boldFont; + + wxGenericTreeItem *m_anchor; + wxGenericTreeItem *m_current, + *m_key_current, + // A hint to select a parent item after deleting a child + *m_select_me; + unsigned short m_indent; + int m_lineHeight; + wxPen m_dottedPen; + wxBrush *m_hilightBrush, + *m_hilightUnfocusedBrush; + bool m_hasFocus; + bool m_dirty; + bool m_ownsImageListButtons; + bool m_isDragging; // true between BEGIN/END drag events + bool m_lastOnSame; // last click on the same item as prev + wxImageList *m_imageListButtons; + + int m_dragCount; + wxPoint m_dragStart; + wxGenericTreeItem *m_dropTarget; + wxCursor m_oldCursor; // cursor is changed while dragging + wxGenericTreeItem *m_oldSelection; + wxGenericTreeItem *m_underMouse; // for visual effects + + enum { NoEffect, BorderEffect, AboveEffect, BelowEffect } m_dndEffect; + wxGenericTreeItem *m_dndEffectItem; + + wxTreeTextCtrl *m_textCtrl; + + + wxTimer *m_renameTimer; + + // incremental search data + wxString m_findPrefix; + wxTimer *m_findTimer; + // This flag is set to 0 if the bell is disabled, 1 if it is enabled and -1 + // if it is globally enabled but has been temporarily disabled because we + // had already beeped for this particular search. + int m_findBell; + + bool m_dropEffectAboveItem; + + // the common part of all ctors + void Init(); + + // overridden wxWindow methods + virtual void DoThaw(); + + // misc helpers + void SendDeleteEvent(wxGenericTreeItem *itemBeingDeleted); + + void DrawBorder(const wxTreeItemId& item); + void DrawLine(const wxTreeItemId& item, bool below); + void DrawDropEffect(wxGenericTreeItem *item); + + void DoSelectItem(const wxTreeItemId& id, + bool unselect_others = true, + bool extended_select = false); + + virtual int DoGetItemState(const wxTreeItemId& item) const; + virtual void DoSetItemState(const wxTreeItemId& item, int state); + + virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent, + size_t previous, + const wxString& text, + int image, + int selectedImage, + wxTreeItemData *data); + virtual wxTreeItemId DoInsertAfter(const wxTreeItemId& parent, + const wxTreeItemId& idPrevious, + const wxString& text, + int image = -1, int selImage = -1, + wxTreeItemData *data = NULL); + virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags) const; + + // called by wxTextTreeCtrl when it marks itself for deletion + void ResetTextControl(); + + // find the first item starting with the given prefix after the given item + wxTreeItemId FindItem(const wxTreeItemId& id, const wxString& prefix) const; + + bool HasButtons() const { return HasFlag(wxTR_HAS_BUTTONS); } + + void CalculateLineHeight(); + int GetLineHeight(wxGenericTreeItem *item) const; + void PaintLevel( wxGenericTreeItem *item, wxDC& dc, int level, int &y ); + void PaintItem( wxGenericTreeItem *item, wxDC& dc); + + void CalculateLevel( wxGenericTreeItem *item, wxDC &dc, int level, int &y ); + void CalculatePositions(); + + void RefreshSubtree( wxGenericTreeItem *item ); + void RefreshLine( wxGenericTreeItem *item ); + + // redraw all selected items + void RefreshSelected(); + + // RefreshSelected() recursive helper + void RefreshSelectedUnder(wxGenericTreeItem *item); + + void OnRenameTimer(); + bool OnRenameAccept(wxGenericTreeItem *item, const wxString& value); + void OnRenameCancelled(wxGenericTreeItem *item); + + void FillArray(wxGenericTreeItem*, wxArrayTreeItemIds&) const; + void SelectItemRange( wxGenericTreeItem *item1, wxGenericTreeItem *item2 ); + bool TagAllChildrenUntilLast(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select); + bool TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select); + void UnselectAllChildren( wxGenericTreeItem *item ); + void ChildrenClosing(wxGenericTreeItem* item); + + void DoDirtyProcessing(); + + virtual wxSize DoGetBestSize() const; + +private: + // Reset the state of the last find (i.e. keyboard incremental search) + // operation. + void ResetFindState(); + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxGenericTreeCtrl) + wxDECLARE_NO_COPY_CLASS(wxGenericTreeCtrl); +}; + +#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__) +/* + * wxTreeCtrl has to be a real class or we have problems with + * the run-time information. + */ + +class WXDLLIMPEXP_CORE wxTreeCtrl: public wxGenericTreeCtrl +{ + DECLARE_DYNAMIC_CLASS(wxTreeCtrl) + +public: + wxTreeCtrl() {} + + wxTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTR_DEFAULT_STYLE, + const wxValidator &validator = wxDefaultValidator, + const wxString& name = wxTreeCtrlNameStr) + : wxGenericTreeCtrl(parent, id, pos, size, style, validator, name) + { + } +}; +#endif // !__WXMSW__ || __WXUNIVERSAL__ + +#endif // wxUSE_TREECTRL + +#endif // _GENERIC_TREECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/wizard.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/wizard.h new file mode 100644 index 0000000000..2161870077 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/generic/wizard.h @@ -0,0 +1,168 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/wizard.h +// Purpose: declaration of generic wxWizard class +// Author: Vadim Zeitlin +// Modified by: Robert Vazan (sizers) +// Created: 28.09.99 +// Copyright: (c) 1999 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_WIZARD_H_ +#define _WX_GENERIC_WIZARD_H_ + +// ---------------------------------------------------------------------------- +// wxWizard +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxStaticBitmap; +class WXDLLIMPEXP_FWD_ADV wxWizardEvent; +class WXDLLIMPEXP_FWD_CORE wxBoxSizer; +class WXDLLIMPEXP_FWD_ADV wxWizardSizer; + +class WXDLLIMPEXP_ADV wxWizard : public wxWizardBase +{ +public: + // ctor + wxWizard() { Init(); } + wxWizard(wxWindow *parent, + int id = wxID_ANY, + const wxString& title = wxEmptyString, + const wxBitmap& bitmap = wxNullBitmap, + const wxPoint& pos = wxDefaultPosition, + long style = wxDEFAULT_DIALOG_STYLE) + { + Init(); + Create(parent, id, title, bitmap, pos, style); + } + bool Create(wxWindow *parent, + int id = wxID_ANY, + const wxString& title = wxEmptyString, + const wxBitmap& bitmap = wxNullBitmap, + const wxPoint& pos = wxDefaultPosition, + long style = wxDEFAULT_DIALOG_STYLE); + void Init(); + virtual ~wxWizard(); + + // implement base class pure virtuals + virtual bool RunWizard(wxWizardPage *firstPage); + virtual wxWizardPage *GetCurrentPage() const; + virtual void SetPageSize(const wxSize& size); + virtual wxSize GetPageSize() const; + virtual void FitToPage(const wxWizardPage *firstPage); + virtual wxSizer *GetPageAreaSizer() const; + virtual void SetBorder(int border); + + /// set/get bitmap + const wxBitmap& GetBitmap() const { return m_bitmap; } + void SetBitmap(const wxBitmap& bitmap); + + // implementation only from now on + // ------------------------------- + + // is the wizard running? + bool IsRunning() const { return m_page != NULL; } + + // show the prev/next page, but call TransferDataFromWindow on the current + // page first and return false without changing the page if + // TransferDataFromWindow() returns false - otherwise, returns true + virtual bool ShowPage(wxWizardPage *page, bool goingForward = true); + + // do fill the dialog with controls + // this is app-overridable to, for example, set help and tooltip text + virtual void DoCreateControls(); + + // Do the adaptation + virtual bool DoLayoutAdaptation(); + + // Set/get bitmap background colour + void SetBitmapBackgroundColour(const wxColour& colour) { m_bitmapBackgroundColour = colour; } + const wxColour& GetBitmapBackgroundColour() const { return m_bitmapBackgroundColour; } + + // Set/get bitmap placement (centred, tiled etc.) + void SetBitmapPlacement(int placement) { m_bitmapPlacement = placement; } + int GetBitmapPlacement() const { return m_bitmapPlacement; } + + // Set/get minimum bitmap width + void SetMinimumBitmapWidth(int w) { m_bitmapMinimumWidth = w; } + int GetMinimumBitmapWidth() const { return m_bitmapMinimumWidth; } + + // Tile bitmap + static bool TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap); + +protected: + // for compatibility only, doesn't do anything any more + void FinishLayout() { } + + // Do fit, and adjust to screen size if necessary + virtual void DoWizardLayout(); + + // Resize bitmap if necessary + virtual bool ResizeBitmap(wxBitmap& bmp); + + // was the dialog really created? + bool WasCreated() const { return m_btnPrev != NULL; } + + // event handlers + void OnCancel(wxCommandEvent& event); + void OnBackOrNext(wxCommandEvent& event); + void OnHelp(wxCommandEvent& event); + + void OnWizEvent(wxWizardEvent& event); + + void AddBitmapRow(wxBoxSizer *mainColumn); + void AddStaticLine(wxBoxSizer *mainColumn); + void AddBackNextPair(wxBoxSizer *buttonRow); + void AddButtonRow(wxBoxSizer *mainColumn); + + // the page size requested by user + wxSize m_sizePage; + + // the dialog position from the ctor + wxPoint m_posWizard; + + // wizard state + wxWizardPage *m_page; // the current page or NULL + wxBitmap m_bitmap; // the default bitmap to show + + // wizard controls + wxButton *m_btnPrev, // the "" or "Finish" button + wxStaticBitmap *m_statbmp; // the control for the bitmap + + // Border around page area sizer requested using SetBorder() + int m_border; + + // Whether RunWizard() was called + bool m_started; + + // Whether was modal (modeless has to be destroyed on finish or cancel) + bool m_wasModal; + + // True if pages are laid out using the sizer + bool m_usingSizer; + + // Page area sizer will be inserted here with padding + wxBoxSizer *m_sizerBmpAndPage; + + // Actual position and size of pages + wxWizardSizer *m_sizerPage; + + // Bitmap background colour if resizing bitmap + wxColour m_bitmapBackgroundColour; + + // Bitmap placement flags + int m_bitmapPlacement; + + // Minimum bitmap width + int m_bitmapMinimumWidth; + + friend class wxWizardSizer; + + DECLARE_DYNAMIC_CLASS(wxWizard) + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxWizard); +}; + +#endif // _WX_GENERIC_WIZARD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/geometry.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/geometry.h new file mode 100644 index 0000000000..287d083451 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/geometry.h @@ -0,0 +1,804 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/geometry.h +// Purpose: Common Geometry Classes +// Author: Stefan Csomor +// Modified by: +// Created: 08/05/99 +// Copyright: (c) 1999 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GEOMETRY_H_ +#define _WX_GEOMETRY_H_ + +#include "wx/defs.h" + +#if wxUSE_GEOMETRY + +#include "wx/utils.h" +#include "wx/gdicmn.h" +#include "wx/math.h" + +class WXDLLIMPEXP_FWD_BASE wxDataInputStream; +class WXDLLIMPEXP_FWD_BASE wxDataOutputStream; + +// clipping from Cohen-Sutherland + +enum wxOutCode +{ + wxInside = 0x00 , + wxOutLeft = 0x01 , + wxOutRight = 0x02 , + wxOutTop = 0x08 , + wxOutBottom = 0x04 +}; + +class WXDLLIMPEXP_CORE wxPoint2DInt +{ +public : + inline wxPoint2DInt(); + inline wxPoint2DInt( wxInt32 x , wxInt32 y ); + inline wxPoint2DInt( const wxPoint2DInt &pt ); + inline wxPoint2DInt( const wxPoint &pt ); + + // noops for this class, just return the coords + inline void GetFloor( wxInt32 *x , wxInt32 *y ) const; + inline void GetRounded( wxInt32 *x , wxInt32 *y ) const; + + inline wxDouble GetVectorLength() const; + wxDouble GetVectorAngle() const; + inline void SetVectorLength( wxDouble length ); + void SetVectorAngle( wxDouble degrees ); + void SetPolarCoordinates( wxInt32 angle , wxInt32 length ); + // set the vector length to 1.0, preserving the angle + inline void Normalize(); + + inline wxDouble GetDistance( const wxPoint2DInt &pt ) const; + inline wxDouble GetDistanceSquare( const wxPoint2DInt &pt ) const; + inline wxInt32 GetDotProduct( const wxPoint2DInt &vec ) const; + inline wxInt32 GetCrossProduct( const wxPoint2DInt &vec ) const; + + // the reflection of this point + inline wxPoint2DInt operator-(); + + inline wxPoint2DInt& operator=(const wxPoint2DInt& pt); + inline wxPoint2DInt& operator+=(const wxPoint2DInt& pt); + inline wxPoint2DInt& operator-=(const wxPoint2DInt& pt); + inline wxPoint2DInt& operator*=(const wxPoint2DInt& pt); + inline wxPoint2DInt& operator*=(wxDouble n); + inline wxPoint2DInt& operator*=(wxInt32 n); + inline wxPoint2DInt& operator/=(const wxPoint2DInt& pt); + inline wxPoint2DInt& operator/=(wxDouble n); + inline wxPoint2DInt& operator/=(wxInt32 n); + inline operator wxPoint() const; + inline bool operator==(const wxPoint2DInt& pt) const; + inline bool operator!=(const wxPoint2DInt& pt) const; + +#if wxUSE_STREAMS + void WriteTo( wxDataOutputStream &stream ) const; + void ReadFrom( wxDataInputStream &stream ); +#endif // wxUSE_STREAMS + + wxInt32 m_x; + wxInt32 m_y; +}; + +inline wxPoint2DInt operator+(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2); +inline wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2); +inline wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2); +inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt); +inline wxPoint2DInt operator*(wxDouble n , const wxPoint2DInt& pt); +inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n); +inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxDouble n); +inline wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2); +inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n); +inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxDouble n); + +inline wxPoint2DInt::wxPoint2DInt() +{ + m_x = 0; + m_y = 0; +} + +inline wxPoint2DInt::wxPoint2DInt( wxInt32 x , wxInt32 y ) +{ + m_x = x; + m_y = y; +} + +inline wxPoint2DInt::wxPoint2DInt( const wxPoint2DInt &pt ) +{ + m_x = pt.m_x; + m_y = pt.m_y; +} + +inline wxPoint2DInt::wxPoint2DInt( const wxPoint &pt ) +{ + m_x = pt.x; + m_y = pt.y; +} + +inline void wxPoint2DInt::GetFloor( wxInt32 *x , wxInt32 *y ) const +{ + if ( x ) + *x = m_x; + if ( y ) + *y = m_y; +} + +inline void wxPoint2DInt::GetRounded( wxInt32 *x , wxInt32 *y ) const +{ + GetFloor(x, y); +} + +inline wxDouble wxPoint2DInt::GetVectorLength() const +{ + // cast needed MIPSpro compiler under SGI + return sqrt( (double)(m_x)*(m_x) + (m_y)*(m_y) ); +} + +inline void wxPoint2DInt::SetVectorLength( wxDouble length ) +{ + wxDouble before = GetVectorLength(); + m_x = (wxInt32)(m_x * length / before); + m_y = (wxInt32)(m_y * length / before); +} + +inline void wxPoint2DInt::Normalize() +{ + SetVectorLength( 1 ); +} + +inline wxDouble wxPoint2DInt::GetDistance( const wxPoint2DInt &pt ) const +{ + return sqrt( GetDistanceSquare( pt ) ); +} + +inline wxDouble wxPoint2DInt::GetDistanceSquare( const wxPoint2DInt &pt ) const +{ + return ( (pt.m_x-m_x)*(pt.m_x-m_x) + (pt.m_y-m_y)*(pt.m_y-m_y) ); +} + +inline wxInt32 wxPoint2DInt::GetDotProduct( const wxPoint2DInt &vec ) const +{ + return ( m_x * vec.m_x + m_y * vec.m_y ); +} + +inline wxInt32 wxPoint2DInt::GetCrossProduct( const wxPoint2DInt &vec ) const +{ + return ( m_x * vec.m_y - vec.m_x * m_y ); +} + +inline wxPoint2DInt::operator wxPoint() const +{ + return wxPoint( m_x, m_y); +} + +inline wxPoint2DInt wxPoint2DInt::operator-() +{ + return wxPoint2DInt( -m_x, -m_y); +} + +inline wxPoint2DInt& wxPoint2DInt::operator=(const wxPoint2DInt& pt) +{ + if (this != &pt) + { + m_x = pt.m_x; + m_y = pt.m_y; + } + return *this; +} + +inline wxPoint2DInt& wxPoint2DInt::operator+=(const wxPoint2DInt& pt) +{ + m_x = m_x + pt.m_x; + m_y = m_y + pt.m_y; + return *this; +} + +inline wxPoint2DInt& wxPoint2DInt::operator-=(const wxPoint2DInt& pt) +{ + m_x = m_x - pt.m_x; + m_y = m_y - pt.m_y; + return *this; +} + +inline wxPoint2DInt& wxPoint2DInt::operator*=(const wxPoint2DInt& pt) +{ + m_x = m_x * pt.m_x; + m_y = m_y * pt.m_y; + return *this; +} + +inline wxPoint2DInt& wxPoint2DInt::operator/=(const wxPoint2DInt& pt) +{ + m_x = m_x / pt.m_x; + m_y = m_y / pt.m_y; + return *this; +} + +inline bool wxPoint2DInt::operator==(const wxPoint2DInt& pt) const +{ + return m_x == pt.m_x && m_y == pt.m_y; +} + +inline bool wxPoint2DInt::operator!=(const wxPoint2DInt& pt) const +{ + return m_x != pt.m_x || m_y != pt.m_y; +} + +inline wxPoint2DInt operator+(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) +{ + return wxPoint2DInt( pt1.m_x + pt2.m_x , pt1.m_y + pt2.m_y ); +} + +inline wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) +{ + return wxPoint2DInt( pt1.m_x - pt2.m_x , pt1.m_y - pt2.m_y ); +} + + +inline wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) +{ + return wxPoint2DInt( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y ); +} + +inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt) +{ + return wxPoint2DInt( pt.m_x * n , pt.m_y * n ); +} + +inline wxPoint2DInt operator*(wxDouble n , const wxPoint2DInt& pt) +{ + return wxPoint2DInt( static_cast(pt.m_x * n) , + static_cast(pt.m_y * n) ); +} + +inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n) +{ + return wxPoint2DInt( pt.m_x * n , pt.m_y * n ); +} + +inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxDouble n) +{ + return wxPoint2DInt( static_cast(pt.m_x * n) , + static_cast(pt.m_y * n) ); +} + +inline wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) +{ + return wxPoint2DInt( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y ); +} + +inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n) +{ + return wxPoint2DInt( pt.m_x / n , pt.m_y / n ); +} + +inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxDouble n) +{ + return wxPoint2DInt( static_cast(pt.m_x / n) , + static_cast(pt.m_y / n) ); +} + +// wxPoint2Ds represent a point or a vector in a 2d coordinate system + +class WXDLLIMPEXP_CORE wxPoint2DDouble +{ +public : + inline wxPoint2DDouble(); + inline wxPoint2DDouble( wxDouble x , wxDouble y ); + inline wxPoint2DDouble( const wxPoint2DDouble &pt ); + wxPoint2DDouble( const wxPoint2DInt &pt ) + { m_x = (wxDouble) pt.m_x ; m_y = (wxDouble) pt.m_y ; } + wxPoint2DDouble( const wxPoint &pt ) + { m_x = (wxDouble) pt.x ; m_y = (wxDouble) pt.y ; } + + // two different conversions to integers, floor and rounding + inline void GetFloor( wxInt32 *x , wxInt32 *y ) const; + inline void GetRounded( wxInt32 *x , wxInt32 *y ) const; + + inline wxDouble GetVectorLength() const; + wxDouble GetVectorAngle() const ; + void SetVectorLength( wxDouble length ); + void SetVectorAngle( wxDouble degrees ); + void SetPolarCoordinates( wxDouble angle , wxDouble length ); + // set the vector length to 1.0, preserving the angle + void Normalize(); + + inline wxDouble GetDistance( const wxPoint2DDouble &pt ) const; + inline wxDouble GetDistanceSquare( const wxPoint2DDouble &pt ) const; + inline wxDouble GetDotProduct( const wxPoint2DDouble &vec ) const; + inline wxDouble GetCrossProduct( const wxPoint2DDouble &vec ) const; + + // the reflection of this point + inline wxPoint2DDouble operator-(); + + inline wxPoint2DDouble& operator=(const wxPoint2DDouble& pt); + inline wxPoint2DDouble& operator+=(const wxPoint2DDouble& pt); + inline wxPoint2DDouble& operator-=(const wxPoint2DDouble& pt); + inline wxPoint2DDouble& operator*=(const wxPoint2DDouble& pt); + inline wxPoint2DDouble& operator*=(wxDouble n); + inline wxPoint2DDouble& operator*=(wxInt32 n); + inline wxPoint2DDouble& operator/=(const wxPoint2DDouble& pt); + inline wxPoint2DDouble& operator/=(wxDouble n); + inline wxPoint2DDouble& operator/=(wxInt32 n); + + inline bool operator==(const wxPoint2DDouble& pt) const; + inline bool operator!=(const wxPoint2DDouble& pt) const; + + wxDouble m_x; + wxDouble m_y; +}; + +inline wxPoint2DDouble operator+(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2); +inline wxPoint2DDouble operator-(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2); +inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2); +inline wxPoint2DDouble operator*(wxDouble n , const wxPoint2DDouble& pt); +inline wxPoint2DDouble operator*(wxInt32 n , const wxPoint2DDouble& pt); +inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxDouble n); +inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxInt32 n); +inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2); +inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxDouble n); +inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxInt32 n); + +inline wxPoint2DDouble::wxPoint2DDouble() +{ + m_x = 0.0; + m_y = 0.0; +} + +inline wxPoint2DDouble::wxPoint2DDouble( wxDouble x , wxDouble y ) +{ + m_x = x; + m_y = y; +} + +inline wxPoint2DDouble::wxPoint2DDouble( const wxPoint2DDouble &pt ) +{ + m_x = pt.m_x; + m_y = pt.m_y; +} + +inline void wxPoint2DDouble::GetFloor( wxInt32 *x , wxInt32 *y ) const +{ + *x = (wxInt32) floor( m_x ); + *y = (wxInt32) floor( m_y ); +} + +inline void wxPoint2DDouble::GetRounded( wxInt32 *x , wxInt32 *y ) const +{ + *x = (wxInt32) floor( m_x + 0.5 ); + *y = (wxInt32) floor( m_y + 0.5); +} + +inline wxDouble wxPoint2DDouble::GetVectorLength() const +{ + return sqrt( (m_x)*(m_x) + (m_y)*(m_y) ) ; +} + +inline void wxPoint2DDouble::SetVectorLength( wxDouble length ) +{ + wxDouble before = GetVectorLength() ; + m_x = (m_x * length / before) ; + m_y = (m_y * length / before) ; +} + +inline void wxPoint2DDouble::Normalize() +{ + SetVectorLength( 1 ); +} + +inline wxDouble wxPoint2DDouble::GetDistance( const wxPoint2DDouble &pt ) const +{ + return sqrt( GetDistanceSquare( pt ) ); +} + +inline wxDouble wxPoint2DDouble::GetDistanceSquare( const wxPoint2DDouble &pt ) const +{ + return ( (pt.m_x-m_x)*(pt.m_x-m_x) + (pt.m_y-m_y)*(pt.m_y-m_y) ); +} + +inline wxDouble wxPoint2DDouble::GetDotProduct( const wxPoint2DDouble &vec ) const +{ + return ( m_x * vec.m_x + m_y * vec.m_y ); +} + +inline wxDouble wxPoint2DDouble::GetCrossProduct( const wxPoint2DDouble &vec ) const +{ + return ( m_x * vec.m_y - vec.m_x * m_y ); +} + +inline wxPoint2DDouble wxPoint2DDouble::operator-() +{ + return wxPoint2DDouble( -m_x, -m_y); +} + +inline wxPoint2DDouble& wxPoint2DDouble::operator=(const wxPoint2DDouble& pt) +{ + if (this != &pt) + { + m_x = pt.m_x; + m_y = pt.m_y; + } + return *this; +} + +inline wxPoint2DDouble& wxPoint2DDouble::operator+=(const wxPoint2DDouble& pt) +{ + m_x = m_x + pt.m_x; + m_y = m_y + pt.m_y; + return *this; +} + +inline wxPoint2DDouble& wxPoint2DDouble::operator-=(const wxPoint2DDouble& pt) +{ + m_x = m_x - pt.m_x; + m_y = m_y - pt.m_y; + return *this; +} + +inline wxPoint2DDouble& wxPoint2DDouble::operator*=(const wxPoint2DDouble& pt) +{ + m_x = m_x * pt.m_x; + m_y = m_y * pt.m_y; + return *this; +} + +inline wxPoint2DDouble& wxPoint2DDouble::operator/=(const wxPoint2DDouble& pt) +{ + m_x = m_x / pt.m_x; + m_y = m_y / pt.m_y; + return *this; +} + +inline bool wxPoint2DDouble::operator==(const wxPoint2DDouble& pt) const +{ + return wxIsSameDouble(m_x, pt.m_x) && wxIsSameDouble(m_y, pt.m_y); +} + +inline bool wxPoint2DDouble::operator!=(const wxPoint2DDouble& pt) const +{ + return !(*this == pt); +} + +inline wxPoint2DDouble operator+(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) +{ + return wxPoint2DDouble( pt1.m_x + pt2.m_x , pt1.m_y + pt2.m_y ); +} + +inline wxPoint2DDouble operator-(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) +{ + return wxPoint2DDouble( pt1.m_x - pt2.m_x , pt1.m_y - pt2.m_y ); +} + + +inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) +{ + return wxPoint2DDouble( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y ); +} + +inline wxPoint2DDouble operator*(wxDouble n , const wxPoint2DDouble& pt) +{ + return wxPoint2DDouble( pt.m_x * n , pt.m_y * n ); +} + +inline wxPoint2DDouble operator*(wxInt32 n , const wxPoint2DDouble& pt) +{ + return wxPoint2DDouble( pt.m_x * n , pt.m_y * n ); +} + +inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxDouble n) +{ + return wxPoint2DDouble( pt.m_x * n , pt.m_y * n ); +} + +inline wxPoint2DDouble operator*(const wxPoint2DDouble& pt , wxInt32 n) +{ + return wxPoint2DDouble( pt.m_x * n , pt.m_y * n ); +} + +inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) +{ + return wxPoint2DDouble( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y ); +} + +inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxDouble n) +{ + return wxPoint2DDouble( pt.m_x / n , pt.m_y / n ); +} + +inline wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxInt32 n) +{ + return wxPoint2DDouble( pt.m_x / n , pt.m_y / n ); +} + +// wxRect2Ds are a axis-aligned rectangles, each side of the rect is parallel to the x- or m_y- axis. The rectangle is either defined by the +// top left and bottom right corner, or by the top left corner and size. A point is contained within the rectangle if +// left <= x < right and top <= m_y < bottom , thus it is a half open interval. + +class WXDLLIMPEXP_CORE wxRect2DDouble +{ +public: + wxRect2DDouble() + { m_x = m_y = m_width = m_height = 0; } + wxRect2DDouble(wxDouble x, wxDouble y, wxDouble w, wxDouble h) + { m_x = x; m_y = y; m_width = w; m_height = h; } +/* + wxRect2DDouble(const wxPoint2DDouble& topLeft, const wxPoint2DDouble& bottomRight); + wxRect2DDouble(const wxPoint2DDouble& pos, const wxSize& size); + wxRect2DDouble(const wxRect2DDouble& rect); +*/ + // single attribute accessors + + wxPoint2DDouble GetPosition() const + { return wxPoint2DDouble(m_x, m_y); } + wxSize GetSize() const + { return wxSize((int) m_width, (int) m_height); } + + // for the edge and corner accessors there are two setters counterparts, the Set.. functions keep the other corners at their + // position whenever sensible, the Move.. functions keep the size of the rect and move the other corners appropriately + + inline wxDouble GetLeft() const { return m_x; } + inline void SetLeft( wxDouble n ) { m_width += m_x - n; m_x = n; } + inline void MoveLeftTo( wxDouble n ) { m_x = n; } + inline wxDouble GetTop() const { return m_y; } + inline void SetTop( wxDouble n ) { m_height += m_y - n; m_y = n; } + inline void MoveTopTo( wxDouble n ) { m_y = n; } + inline wxDouble GetBottom() const { return m_y + m_height; } + inline void SetBottom( wxDouble n ) { m_height += n - (m_y+m_height);} + inline void MoveBottomTo( wxDouble n ) { m_y = n - m_height; } + inline wxDouble GetRight() const { return m_x + m_width; } + inline void SetRight( wxDouble n ) { m_width += n - (m_x+m_width) ; } + inline void MoveRightTo( wxDouble n ) { m_x = n - m_width; } + + inline wxPoint2DDouble GetLeftTop() const + { return wxPoint2DDouble( m_x , m_y ); } + inline void SetLeftTop( const wxPoint2DDouble &pt ) + { m_width += m_x - pt.m_x; m_height += m_y - pt.m_y; m_x = pt.m_x; m_y = pt.m_y; } + inline void MoveLeftTopTo( const wxPoint2DDouble &pt ) + { m_x = pt.m_x; m_y = pt.m_y; } + inline wxPoint2DDouble GetLeftBottom() const + { return wxPoint2DDouble( m_x , m_y + m_height ); } + inline void SetLeftBottom( const wxPoint2DDouble &pt ) + { m_width += m_x - pt.m_x; m_height += pt.m_y - (m_y+m_height) ; m_x = pt.m_x; } + inline void MoveLeftBottomTo( const wxPoint2DDouble &pt ) + { m_x = pt.m_x; m_y = pt.m_y - m_height; } + inline wxPoint2DDouble GetRightTop() const + { return wxPoint2DDouble( m_x+m_width , m_y ); } + inline void SetRightTop( const wxPoint2DDouble &pt ) + { m_width += pt.m_x - ( m_x + m_width ); m_height += m_y - pt.m_y; m_y = pt.m_y; } + inline void MoveRightTopTo( const wxPoint2DDouble &pt ) + { m_x = pt.m_x - m_width; m_y = pt.m_y; } + inline wxPoint2DDouble GetRightBottom() const + { return wxPoint2DDouble( m_x+m_width , m_y + m_height ); } + inline void SetRightBottom( const wxPoint2DDouble &pt ) + { m_width += pt.m_x - ( m_x + m_width ); m_height += pt.m_y - (m_y+m_height);} + inline void MoveRightBottomTo( const wxPoint2DDouble &pt ) + { m_x = pt.m_x - m_width; m_y = pt.m_y - m_height; } + inline wxPoint2DDouble GetCentre() const + { return wxPoint2DDouble( m_x+m_width/2 , m_y+m_height/2 ); } + inline void SetCentre( const wxPoint2DDouble &pt ) + { MoveCentreTo( pt ); } // since this is impossible without moving... + inline void MoveCentreTo( const wxPoint2DDouble &pt ) + { m_x += pt.m_x - (m_x+m_width/2) , m_y += pt.m_y -(m_y+m_height/2); } + inline wxOutCode GetOutCode( const wxPoint2DDouble &pt ) const + { return (wxOutCode) (( ( pt.m_x < m_x ) ? wxOutLeft : 0 ) + + ( ( pt.m_x > m_x + m_width ) ? wxOutRight : 0 ) + + ( ( pt.m_y < m_y ) ? wxOutTop : 0 ) + + ( ( pt.m_y > m_y + m_height ) ? wxOutBottom : 0 )); } + inline wxOutCode GetOutcode(const wxPoint2DDouble &pt) const + { return GetOutCode(pt) ; } + inline bool Contains( const wxPoint2DDouble &pt ) const + { return GetOutCode( pt ) == wxInside; } + inline bool Contains( const wxRect2DDouble &rect ) const + { return ( ( ( m_x <= rect.m_x ) && ( rect.m_x + rect.m_width <= m_x + m_width ) ) && + ( ( m_y <= rect.m_y ) && ( rect.m_y + rect.m_height <= m_y + m_height ) ) ); } + inline bool IsEmpty() const + { return m_width <= 0 || m_height <= 0; } + inline bool HaveEqualSize( const wxRect2DDouble &rect ) const + { return wxIsSameDouble(rect.m_width, m_width) && wxIsSameDouble(rect.m_height, m_height); } + + inline void Inset( wxDouble x , wxDouble y ) + { m_x += x; m_y += y; m_width -= 2 * x; m_height -= 2 * y; } + inline void Inset( wxDouble left , wxDouble top ,wxDouble right , wxDouble bottom ) + { m_x += left; m_y += top; m_width -= left + right; m_height -= top + bottom;} + inline void Offset( const wxPoint2DDouble &pt ) + { m_x += pt.m_x; m_y += pt.m_y; } + + void ConstrainTo( const wxRect2DDouble &rect ); + + inline wxPoint2DDouble Interpolate( wxInt32 widthfactor , wxInt32 heightfactor ) + { return wxPoint2DDouble( m_x + m_width * widthfactor , m_y + m_height * heightfactor ); } + + static void Intersect( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest ); + inline void Intersect( const wxRect2DDouble &otherRect ) + { Intersect( *this , otherRect , this ); } + inline wxRect2DDouble CreateIntersection( const wxRect2DDouble &otherRect ) const + { wxRect2DDouble result; Intersect( *this , otherRect , &result); return result; } + bool Intersects( const wxRect2DDouble &rect ) const; + + static void Union( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest ); + void Union( const wxRect2DDouble &otherRect ) + { Union( *this , otherRect , this ); } + void Union( const wxPoint2DDouble &pt ); + inline wxRect2DDouble CreateUnion( const wxRect2DDouble &otherRect ) const + { wxRect2DDouble result; Union( *this , otherRect , &result); return result; } + + inline void Scale( wxDouble f ) + { m_x *= f; m_y *= f; m_width *= f; m_height *= f;} + inline void Scale( wxInt32 num , wxInt32 denum ) + { m_x *= ((wxDouble)num)/((wxDouble)denum); m_y *= ((wxDouble)num)/((wxDouble)denum); + m_width *= ((wxDouble)num)/((wxDouble)denum); m_height *= ((wxDouble)num)/((wxDouble)denum);} + + wxRect2DDouble& operator = (const wxRect2DDouble& rect); + inline bool operator == (const wxRect2DDouble& rect) const + { return wxIsSameDouble(m_x, rect.m_x) && wxIsSameDouble(m_y, rect.m_y) && HaveEqualSize(rect); } + inline bool operator != (const wxRect2DDouble& rect) const + { return !(*this == rect); } + + wxDouble m_x; + wxDouble m_y; + wxDouble m_width; + wxDouble m_height; +}; + + +// wxRect2Ds are a axis-aligned rectangles, each side of the rect is parallel to the x- or m_y- axis. The rectangle is either defined by the +// top left and bottom right corner, or by the top left corner and size. A point is contained within the rectangle if +// left <= x < right and top <= m_y < bottom , thus it is a half open interval. + +class WXDLLIMPEXP_CORE wxRect2DInt +{ +public: + wxRect2DInt() { m_x = m_y = m_width = m_height = 0; } + wxRect2DInt( const wxRect& r ) { m_x = r.x ; m_y = r.y ; m_width = r.width ; m_height = r.height ; } + wxRect2DInt(wxInt32 x, wxInt32 y, wxInt32 w, wxInt32 h) { m_x = x; m_y = y; m_width = w; m_height = h; } + wxRect2DInt(const wxPoint2DInt& topLeft, const wxPoint2DInt& bottomRight); + inline wxRect2DInt(const wxPoint2DInt& pos, const wxSize& size); + inline wxRect2DInt(const wxRect2DInt& rect); + + // single attribute accessors + + wxPoint2DInt GetPosition() const { return wxPoint2DInt(m_x, m_y); } + wxSize GetSize() const { return wxSize(m_width, m_height); } + + // for the edge and corner accessors there are two setters counterparts, the Set.. functions keep the other corners at their + // position whenever sensible, the Move.. functions keep the size of the rect and move the other corners appropriately + + inline wxInt32 GetLeft() const { return m_x; } + inline void SetLeft( wxInt32 n ) { m_width += m_x - n; m_x = n; } + inline void MoveLeftTo( wxInt32 n ) { m_x = n; } + inline wxInt32 GetTop() const { return m_y; } + inline void SetTop( wxInt32 n ) { m_height += m_y - n; m_y = n; } + inline void MoveTopTo( wxInt32 n ) { m_y = n; } + inline wxInt32 GetBottom() const { return m_y + m_height; } + inline void SetBottom( wxInt32 n ) { m_height += n - (m_y+m_height);} + inline void MoveBottomTo( wxInt32 n ) { m_y = n - m_height; } + inline wxInt32 GetRight() const { return m_x + m_width; } + inline void SetRight( wxInt32 n ) { m_width += n - (m_x+m_width) ; } + inline void MoveRightTo( wxInt32 n ) { m_x = n - m_width; } + + inline wxPoint2DInt GetLeftTop() const { return wxPoint2DInt( m_x , m_y ); } + inline void SetLeftTop( const wxPoint2DInt &pt ) { m_width += m_x - pt.m_x; m_height += m_y - pt.m_y; m_x = pt.m_x; m_y = pt.m_y; } + inline void MoveLeftTopTo( const wxPoint2DInt &pt ) { m_x = pt.m_x; m_y = pt.m_y; } + inline wxPoint2DInt GetLeftBottom() const { return wxPoint2DInt( m_x , m_y + m_height ); } + inline void SetLeftBottom( const wxPoint2DInt &pt ) { m_width += m_x - pt.m_x; m_height += pt.m_y - (m_y+m_height) ; m_x = pt.m_x; } + inline void MoveLeftBottomTo( const wxPoint2DInt &pt ) { m_x = pt.m_x; m_y = pt.m_y - m_height; } + inline wxPoint2DInt GetRightTop() const { return wxPoint2DInt( m_x+m_width , m_y ); } + inline void SetRightTop( const wxPoint2DInt &pt ) { m_width += pt.m_x - ( m_x + m_width ); m_height += m_y - pt.m_y; m_y = pt.m_y; } + inline void MoveRightTopTo( const wxPoint2DInt &pt ) { m_x = pt.m_x - m_width; m_y = pt.m_y; } + inline wxPoint2DInt GetRightBottom() const { return wxPoint2DInt( m_x+m_width , m_y + m_height ); } + inline void SetRightBottom( const wxPoint2DInt &pt ) { m_width += pt.m_x - ( m_x + m_width ); m_height += pt.m_y - (m_y+m_height);} + inline void MoveRightBottomTo( const wxPoint2DInt &pt ) { m_x = pt.m_x - m_width; m_y = pt.m_y - m_height; } + inline wxPoint2DInt GetCentre() const { return wxPoint2DInt( m_x+m_width/2 , m_y+m_height/2 ); } + inline void SetCentre( const wxPoint2DInt &pt ) { MoveCentreTo( pt ); } // since this is impossible without moving... + inline void MoveCentreTo( const wxPoint2DInt &pt ) { m_x += pt.m_x - (m_x+m_width/2) , m_y += pt.m_y -(m_y+m_height/2); } + inline wxOutCode GetOutCode( const wxPoint2DInt &pt ) const + { return (wxOutCode) (( ( pt.m_x < m_x ) ? wxOutLeft : 0 ) + + ( ( pt.m_x >= m_x + m_width ) ? wxOutRight : 0 ) + + ( ( pt.m_y < m_y ) ? wxOutTop : 0 ) + + ( ( pt.m_y >= m_y + m_height ) ? wxOutBottom : 0 )); } + inline wxOutCode GetOutcode( const wxPoint2DInt &pt ) const + { return GetOutCode( pt ) ; } + inline bool Contains( const wxPoint2DInt &pt ) const + { return GetOutCode( pt ) == wxInside; } + inline bool Contains( const wxRect2DInt &rect ) const + { return ( ( ( m_x <= rect.m_x ) && ( rect.m_x + rect.m_width <= m_x + m_width ) ) && + ( ( m_y <= rect.m_y ) && ( rect.m_y + rect.m_height <= m_y + m_height ) ) ); } + inline bool IsEmpty() const + { return ( m_width <= 0 || m_height <= 0 ); } + inline bool HaveEqualSize( const wxRect2DInt &rect ) const + { return ( rect.m_width == m_width && rect.m_height == m_height ); } + + inline void Inset( wxInt32 x , wxInt32 y ) { m_x += x; m_y += y; m_width -= 2 * x; m_height -= 2 * y; } + inline void Inset( wxInt32 left , wxInt32 top ,wxInt32 right , wxInt32 bottom ) + { m_x += left; m_y += top; m_width -= left + right; m_height -= top + bottom;} + inline void Offset( const wxPoint2DInt &pt ) { m_x += pt.m_x; m_y += pt.m_y; } + void ConstrainTo( const wxRect2DInt &rect ); + inline wxPoint2DInt Interpolate( wxInt32 widthfactor , wxInt32 heightfactor ) { return wxPoint2DInt( m_x + m_width * widthfactor , m_y + m_height * heightfactor ); } + + static void Intersect( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest ); + inline void Intersect( const wxRect2DInt &otherRect ) { Intersect( *this , otherRect , this ); } + inline wxRect2DInt CreateIntersection( const wxRect2DInt &otherRect ) const { wxRect2DInt result; Intersect( *this , otherRect , &result); return result; } + bool Intersects( const wxRect2DInt &rect ) const; + + static void Union( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest ); + void Union( const wxRect2DInt &otherRect ) { Union( *this , otherRect , this ); } + void Union( const wxPoint2DInt &pt ); + inline wxRect2DInt CreateUnion( const wxRect2DInt &otherRect ) const { wxRect2DInt result; Union( *this , otherRect , &result); return result; } + + inline void Scale( wxInt32 f ) { m_x *= f; m_y *= f; m_width *= f; m_height *= f;} + inline void Scale( wxInt32 num , wxInt32 denum ) + { m_x *= ((wxInt32)num)/((wxInt32)denum); m_y *= ((wxInt32)num)/((wxInt32)denum); + m_width *= ((wxInt32)num)/((wxInt32)denum); m_height *= ((wxInt32)num)/((wxInt32)denum);} + + wxRect2DInt& operator = (const wxRect2DInt& rect); + bool operator == (const wxRect2DInt& rect) const; + bool operator != (const wxRect2DInt& rect) const; + +#if wxUSE_STREAMS + void WriteTo( wxDataOutputStream &stream ) const; + void ReadFrom( wxDataInputStream &stream ); +#endif // wxUSE_STREAMS + + wxInt32 m_x; + wxInt32 m_y; + wxInt32 m_width; + wxInt32 m_height; +}; + +inline wxRect2DInt::wxRect2DInt( const wxRect2DInt &r ) +{ + m_x = r.m_x; + m_y = r.m_y; + m_width = r.m_width; + m_height = r.m_height; +} + +inline wxRect2DInt::wxRect2DInt( const wxPoint2DInt &a , const wxPoint2DInt &b) +{ + m_x = wxMin( a.m_x , b.m_x ); + m_y = wxMin( a.m_y , b.m_y ); + m_width = abs( a.m_x - b.m_x ); + m_height = abs( a.m_y - b.m_y ); +} + +inline wxRect2DInt::wxRect2DInt( const wxPoint2DInt& pos, const wxSize& size) +{ + m_x = pos.m_x; + m_y = pos.m_y; + m_width = size.x; + m_height = size.y; +} + +inline bool wxRect2DInt::operator == (const wxRect2DInt& rect) const +{ + return (m_x==rect.m_x && m_y==rect.m_y && + m_width==rect.m_width && m_height==rect.m_height); +} + +inline bool wxRect2DInt::operator != (const wxRect2DInt& rect) const +{ + return !(*this == rect); +} + +class WXDLLIMPEXP_CORE wxTransform2D +{ +public : + virtual ~wxTransform2D() { } + virtual void Transform( wxPoint2DInt* pt )const = 0; + virtual void Transform( wxRect2DInt* r ) const; + virtual wxPoint2DInt Transform( const wxPoint2DInt &pt ) const; + virtual wxRect2DInt Transform( const wxRect2DInt &r ) const ; + + virtual void InverseTransform( wxPoint2DInt* pt ) const = 0; + virtual void InverseTransform( wxRect2DInt* r ) const ; + virtual wxPoint2DInt InverseTransform( const wxPoint2DInt &pt ) const ; + virtual wxRect2DInt InverseTransform( const wxRect2DInt &r ) const ; +}; + + +#endif // wxUSE_GEOMETRY + +#endif // _WX_GEOMETRY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gifdecod.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gifdecod.h new file mode 100644 index 0000000000..f0b84fc4bf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gifdecod.h @@ -0,0 +1,113 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gifdecod.h +// Purpose: wxGIFDecoder, GIF reader for wxImage and wxAnimation +// Author: Guillermo Rodriguez Garcia +// Version: 3.02 +// Copyright: (c) 1999 Guillermo Rodriguez Garcia +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GIFDECOD_H_ +#define _WX_GIFDECOD_H_ + +#include "wx/defs.h" + +#if wxUSE_STREAMS && wxUSE_GIF + +#include "wx/stream.h" +#include "wx/image.h" +#include "wx/animdecod.h" +#include "wx/dynarray.h" + +// internal utility used to store a frame in 8bit-per-pixel format +class GIFImage; + + +// -------------------------------------------------------------------------- +// Constants +// -------------------------------------------------------------------------- + +// Error codes: +// Note that the error code wxGIF_TRUNCATED means that the image itself +// is most probably OK, but the decoder didn't reach the end of the data +// stream; this means that if it was not reading directly from file, +// the stream will not be correctly positioned. +// +enum wxGIFErrorCode +{ + wxGIF_OK = 0, // everything was OK + wxGIF_INVFORMAT, // error in GIF header + wxGIF_MEMERR, // error allocating memory + wxGIF_TRUNCATED // file appears to be truncated +}; + +// -------------------------------------------------------------------------- +// wxGIFDecoder class +// -------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGIFDecoder : public wxAnimationDecoder +{ +public: + // constructor, destructor, etc. + wxGIFDecoder(); + ~wxGIFDecoder(); + + // get data of current frame + unsigned char* GetData(unsigned int frame) const; + unsigned char* GetPalette(unsigned int frame) const; + unsigned int GetNcolours(unsigned int frame) const; + int GetTransparentColourIndex(unsigned int frame) const; + wxColour GetTransparentColour(unsigned int frame) const; + + virtual wxSize GetFrameSize(unsigned int frame) const; + virtual wxPoint GetFramePosition(unsigned int frame) const; + virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const; + virtual long GetDelay(unsigned int frame) const; + + // GIFs can contain both static images and animations + bool IsAnimation() const + { return m_nFrames > 1; } + + // load function which returns more info than just Load(): + wxGIFErrorCode LoadGIF( wxInputStream& stream ); + + // free all internal frames + void Destroy(); + + // implementation of wxAnimationDecoder's pure virtuals + virtual bool Load( wxInputStream& stream ) + { return LoadGIF(stream) == wxGIF_OK; } + + bool ConvertToImage(unsigned int frame, wxImage *image) const; + + wxAnimationDecoder *Clone() const + { return new wxGIFDecoder; } + wxAnimationType GetType() const + { return wxANIMATION_TYPE_GIF; } + +private: + // wxAnimationDecoder pure virtual + virtual bool DoCanRead( wxInputStream& stream ) const; + // modifies current stream position (see wxAnimationDecoder::CanRead) + + int getcode(wxInputStream& stream, int bits, int abfin); + wxGIFErrorCode dgif(wxInputStream& stream, + GIFImage *img, int interl, int bits); + + + // array of all frames + wxArrayPtrVoid m_frames; + + // decoder state vars + int m_restbits; // remaining valid bits + unsigned int m_restbyte; // remaining bytes in this block + unsigned int m_lastbyte; // last byte read + unsigned char m_buffer[256]; // buffer for reading + unsigned char *m_bufp; // pointer to next byte in buffer + + wxDECLARE_NO_COPY_CLASS(wxGIFDecoder); +}; + +#endif // wxUSE_STREAMS && wxUSE_GIF + +#endif // _WX_GIFDECOD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/glcanvas.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/glcanvas.h new file mode 100644 index 0000000000..688d4788b0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/glcanvas.h @@ -0,0 +1,248 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/glcanvas.h +// Purpose: wxGLCanvas base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GLCANVAS_H_BASE_ +#define _WX_GLCANVAS_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_GLCANVAS + +#include "wx/app.h" +#include "wx/palette.h" +#include "wx/window.h" + +class WXDLLIMPEXP_FWD_GL wxGLCanvas; +class WXDLLIMPEXP_FWD_GL wxGLContext; + +// ---------------------------------------------------------------------------- +// Constants for attributes list +// ---------------------------------------------------------------------------- + +// Notice that not all implementation support options such as stereo, auxiliary +// buffers, alpha channel, and accumulator buffer, use IsDisplaySupported() to +// check for individual attributes support. +enum +{ + WX_GL_RGBA = 1, // use true color palette (on if no attrs specified) + WX_GL_BUFFER_SIZE, // bits for buffer if not WX_GL_RGBA + WX_GL_LEVEL, // 0 for main buffer, >0 for overlay, <0 for underlay + WX_GL_DOUBLEBUFFER, // use double buffering (on if no attrs specified) + WX_GL_STEREO, // use stereoscopic display + WX_GL_AUX_BUFFERS, // number of auxiliary buffers + WX_GL_MIN_RED, // use red buffer with most bits (> MIN_RED bits) + WX_GL_MIN_GREEN, // use green buffer with most bits (> MIN_GREEN bits) + WX_GL_MIN_BLUE, // use blue buffer with most bits (> MIN_BLUE bits) + WX_GL_MIN_ALPHA, // use alpha buffer with most bits (> MIN_ALPHA bits) + WX_GL_DEPTH_SIZE, // bits for Z-buffer (0,16,32) + WX_GL_STENCIL_SIZE, // bits for stencil buffer + WX_GL_MIN_ACCUM_RED, // use red accum buffer with most bits (> MIN_ACCUM_RED bits) + WX_GL_MIN_ACCUM_GREEN, // use green buffer with most bits (> MIN_ACCUM_GREEN bits) + WX_GL_MIN_ACCUM_BLUE, // use blue buffer with most bits (> MIN_ACCUM_BLUE bits) + WX_GL_MIN_ACCUM_ALPHA, // use alpha buffer with most bits (> MIN_ACCUM_ALPHA bits) + WX_GL_SAMPLE_BUFFERS, // 1 for multisampling support (antialiasing) + WX_GL_SAMPLES // 4 for 2x2 antialiasing supersampling on most graphics cards +}; + +#define wxGLCanvasName wxT("GLCanvas") + +// ---------------------------------------------------------------------------- +// wxGLContextBase: OpenGL rendering context +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_GL wxGLContextBase : public wxObject +{ +public: + /* + The derived class should provide a ctor with this signature: + + wxGLContext(wxGLCanvas *win, const wxGLContext *other = NULL); + */ + + // set this context as the current one + virtual bool SetCurrent(const wxGLCanvas& win) const = 0; +}; + +// ---------------------------------------------------------------------------- +// wxGLCanvasBase: window which can be used for OpenGL rendering +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_GL wxGLCanvasBase : public wxWindow +{ +public: + // default ctor doesn't initialize the window, use Create() later + wxGLCanvasBase(); + + virtual ~wxGLCanvasBase(); + + + /* + The derived class should provide a ctor with this signature: + + wxGLCanvas(wxWindow *parent, + wxWindowID id = wxID_ANY, + int* attribList = 0, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const wxPalette& palette = wxNullPalette); + */ + + // operations + // ---------- + + // set the given context associated with this window as the current one + bool SetCurrent(const wxGLContext& context) const; + + // flush the back buffer (if we have it) + virtual bool SwapBuffers() = 0; + + + // accessors + // --------- + + // check if the given attributes are supported without creating a canvas + static bool IsDisplaySupported(const int *attribList); + +#if wxUSE_PALETTE + const wxPalette *GetPalette() const { return &m_palette; } +#endif // wxUSE_PALETTE + + // miscellaneous helper functions + // ------------------------------ + + // call glcolor() for the colour with the given name, return false if + // colour not found + bool SetColour(const wxString& colour); + + // return true if the extension with given name is supported + // + // notice that while this function is implemented for all of GLX, WGL and + // AGL the extensions names are usually not the same for different + // platforms and so the code using it still usually uses conditional + // compilation + static bool IsExtensionSupported(const char *extension); + + // deprecated methods using the implicit wxGLContext +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( wxGLContext* GetContext() const ); + + wxDEPRECATED( void SetCurrent() ); + + wxDEPRECATED( void OnSize(wxSizeEvent& event) ); +#endif // WXWIN_COMPATIBILITY_2_8 + +#ifdef __WXUNIVERSAL__ + // resolve the conflict with wxWindowUniv::SetCurrent() + virtual bool SetCurrent(bool doit) { return wxWindow::SetCurrent(doit); } +#endif + +protected: + // override this to implement SetColour() in GL_INDEX_MODE + // (currently only implemented in wxX11 and wxMotif ports) + virtual int GetColourIndex(const wxColour& WXUNUSED(col)) { return -1; } + + // check if the given extension name is present in the space-separated list + // of extensions supported by the current implementation such as returned + // by glXQueryExtensionsString() or glGetString(GL_EXTENSIONS) + static bool IsExtensionInList(const char *list, const char *extension); + +#if wxUSE_PALETTE + // create default palette if we're not using RGBA mode + // (not supported in most ports) + virtual wxPalette CreateDefaultPalette() { return wxNullPalette; } + + wxPalette m_palette; +#endif // wxUSE_PALETTE + +#if WXWIN_COMPATIBILITY_2_8 + wxGLContext *m_glContext; +#endif // WXWIN_COMPATIBILITY_2_8 +}; + +// ---------------------------------------------------------------------------- +// wxGLApp: a special wxApp subclass for OpenGL applications which must be used +// to select a visual compatible with the given attributes +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_GL wxGLAppBase : public wxApp +{ +public: + wxGLAppBase() : wxApp() { } + + // use this in the constructor of the user-derived wxGLApp class to + // determine if an OpenGL rendering context with these attributes + // is available - returns true if so, false if not. + virtual bool InitGLVisual(const int *attribList) = 0; +}; + +#if defined(__WXMSW__) + #include "wx/msw/glcanvas.h" +#elif defined(__WXMOTIF__) || defined(__WXX11__) + #include "wx/x11/glcanvas.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/glcanvas.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/glcanvas.h" +#elif defined(__WXMAC__) + #include "wx/osx/glcanvas.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/glcanvas.h" +#else + #error "wxGLCanvas not supported in this wxWidgets port" +#endif + +// wxMac and wxMSW don't need anything extra in wxGLAppBase, so declare it here +#ifndef wxGL_APP_DEFINED + +class WXDLLIMPEXP_GL wxGLApp : public wxGLAppBase +{ +public: + wxGLApp() : wxGLAppBase() { } + + virtual bool InitGLVisual(const int *attribList); + +private: + DECLARE_DYNAMIC_CLASS(wxGLApp) +}; + +#endif // !wxGL_APP_DEFINED + +// ---------------------------------------------------------------------------- +// wxGLAPI: an API wrapper that allows the use of 'old' APIs even on OpenGL +// platforms that don't support it natively anymore, if the APIs are available +// it's a mere redirect +// ---------------------------------------------------------------------------- + +#ifndef wxUSE_OPENGL_EMULATION + #define wxUSE_OPENGL_EMULATION 0 +#endif + +class WXDLLIMPEXP_GL wxGLAPI : public wxObject +{ +public: + wxGLAPI(); + ~wxGLAPI(); + + static void glFrustum(GLfloat left, GLfloat right, GLfloat bottom, + GLfloat top, GLfloat zNear, GLfloat zFar); + static void glBegin(GLenum mode); + static void glTexCoord2f(GLfloat s, GLfloat t); + static void glVertex3f(GLfloat x, GLfloat y, GLfloat z); + static void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz); + static void glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a); + static void glColor3f(GLfloat r, GLfloat g, GLfloat b); + static void glEnd(); +}; + +#endif // wxUSE_GLCANVAS + +#endif // _WX_GLCANVAS_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/graphics.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/graphics.h new file mode 100644 index 0000000000..46f60b6884 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/graphics.h @@ -0,0 +1,888 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/graphics.h +// Purpose: graphics context header +// Author: Stefan Csomor +// Modified by: +// Created: +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GRAPHICS_H_ +#define _WX_GRAPHICS_H_ + +#include "wx/defs.h" + +#if wxUSE_GRAPHICS_CONTEXT + +#include "wx/geometry.h" +#include "wx/dynarray.h" +#include "wx/dc.h" +#include "wx/image.h" +#include "wx/vector.h" + +enum wxAntialiasMode +{ + wxANTIALIAS_NONE, // should be 0 + wxANTIALIAS_DEFAULT +}; + +enum wxInterpolationQuality +{ + // default interpolation + wxINTERPOLATION_DEFAULT, + // no interpolation + wxINTERPOLATION_NONE, + // fast interpolation, suited for interactivity + wxINTERPOLATION_FAST, + // better quality + wxINTERPOLATION_GOOD, + // best quality, not suited for interactivity + wxINTERPOLATION_BEST +}; + +enum wxCompositionMode +{ + // R = Result, S = Source, D = Destination, premultiplied with alpha + // Ra, Sa, Da their alpha components + + // classic Porter-Duff compositions + // http://keithp.com/~keithp/porterduff/p253-porter.pdf + + wxCOMPOSITION_INVALID = -1, /* indicates invalid/unsupported mode */ + wxCOMPOSITION_CLEAR, /* R = 0 */ + wxCOMPOSITION_SOURCE, /* R = S */ + wxCOMPOSITION_OVER, /* R = S + D*(1 - Sa) */ + wxCOMPOSITION_IN, /* R = S*Da */ + wxCOMPOSITION_OUT, /* R = S*(1 - Da) */ + wxCOMPOSITION_ATOP, /* R = S*Da + D*(1 - Sa) */ + + wxCOMPOSITION_DEST, /* R = D, essentially a noop */ + wxCOMPOSITION_DEST_OVER, /* R = S*(1 - Da) + D */ + wxCOMPOSITION_DEST_IN, /* R = D*Sa */ + wxCOMPOSITION_DEST_OUT, /* R = D*(1 - Sa) */ + wxCOMPOSITION_DEST_ATOP, /* R = S*(1 - Da) + D*Sa */ + wxCOMPOSITION_XOR, /* R = S*(1 - Da) + D*(1 - Sa) */ + + // mathematical compositions + wxCOMPOSITION_ADD /* R = S + D */ +}; + +class WXDLLIMPEXP_FWD_CORE wxWindowDC; +class WXDLLIMPEXP_FWD_CORE wxMemoryDC; +#if wxUSE_PRINTING_ARCHITECTURE +class WXDLLIMPEXP_FWD_CORE wxPrinterDC; +#endif +#ifdef __WXMSW__ +#if wxUSE_ENH_METAFILE +class WXDLLIMPEXP_FWD_CORE wxEnhMetaFileDC; +#endif +#endif +class WXDLLIMPEXP_FWD_CORE wxGraphicsContext; +class WXDLLIMPEXP_FWD_CORE wxGraphicsPath; +class WXDLLIMPEXP_FWD_CORE wxGraphicsMatrix; +class WXDLLIMPEXP_FWD_CORE wxGraphicsFigure; +class WXDLLIMPEXP_FWD_CORE wxGraphicsRenderer; +class WXDLLIMPEXP_FWD_CORE wxGraphicsPen; +class WXDLLIMPEXP_FWD_CORE wxGraphicsBrush; +class WXDLLIMPEXP_FWD_CORE wxGraphicsFont; +class WXDLLIMPEXP_FWD_CORE wxGraphicsBitmap; + +/* + * notes about the graphics context apis + * + * angles : are measured in radians, 0.0 being in direction of positiv x axis, PI/2 being + * in direction of positive y axis. + */ + +// Base class of all objects used for drawing in the new graphics API, the always point back to their +// originating rendering engine, there is no dynamic unloading of a renderer currently allowed, +// these references are not counted + +// +// The data used by objects like graphics pens etc is ref counted, in order to avoid unnecessary expensive +// duplication. Any operation on a shared instance that results in a modified state, uncouples this +// instance from the other instances that were shared - using copy on write semantics +// + +class WXDLLIMPEXP_FWD_CORE wxGraphicsObjectRefData; +class WXDLLIMPEXP_FWD_CORE wxGraphicsBitmapData; +class WXDLLIMPEXP_FWD_CORE wxGraphicsMatrixData; +class WXDLLIMPEXP_FWD_CORE wxGraphicsPathData; + +class WXDLLIMPEXP_CORE wxGraphicsObject : public wxObject +{ +public: + wxGraphicsObject(); + wxGraphicsObject( wxGraphicsRenderer* renderer ); + virtual ~wxGraphicsObject(); + + bool IsNull() const; + + // returns the renderer that was used to create this instance, or NULL if it has not been initialized yet + wxGraphicsRenderer* GetRenderer() const; + wxGraphicsObjectRefData* GetGraphicsData() const; +protected: + virtual wxObjectRefData* CreateRefData() const; + virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const; + + DECLARE_DYNAMIC_CLASS(wxGraphicsObject) +}; + +class WXDLLIMPEXP_CORE wxGraphicsPen : public wxGraphicsObject +{ +public: + wxGraphicsPen() {} + virtual ~wxGraphicsPen() {} +private: + DECLARE_DYNAMIC_CLASS(wxGraphicsPen) +}; + +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsPen) wxNullGraphicsPen; + +class WXDLLIMPEXP_CORE wxGraphicsBrush : public wxGraphicsObject +{ +public: + wxGraphicsBrush() {} + virtual ~wxGraphicsBrush() {} +private: + DECLARE_DYNAMIC_CLASS(wxGraphicsBrush) +}; + +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsBrush) wxNullGraphicsBrush; + +class WXDLLIMPEXP_CORE wxGraphicsFont : public wxGraphicsObject +{ +public: + wxGraphicsFont() {} + virtual ~wxGraphicsFont() {} +private: + DECLARE_DYNAMIC_CLASS(wxGraphicsFont) +}; + +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsFont) wxNullGraphicsFont; + +class WXDLLIMPEXP_CORE wxGraphicsBitmap : public wxGraphicsObject +{ +public: + wxGraphicsBitmap() {} + virtual ~wxGraphicsBitmap() {} + + // Convert bitmap to wxImage: this is more efficient than converting to + // wxBitmap first and then to wxImage and also works without X server + // connection under Unix that wxBitmap requires. +#if wxUSE_IMAGE + wxImage ConvertToImage() const; +#endif // wxUSE_IMAGE + + void* GetNativeBitmap() const; + + const wxGraphicsBitmapData* GetBitmapData() const + { return (const wxGraphicsBitmapData*) GetRefData(); } + wxGraphicsBitmapData* GetBitmapData() + { return (wxGraphicsBitmapData*) GetRefData(); } + +private: + DECLARE_DYNAMIC_CLASS(wxGraphicsBitmap) +}; + +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsBitmap) wxNullGraphicsBitmap; + +class WXDLLIMPEXP_CORE wxGraphicsMatrix : public wxGraphicsObject +{ +public: + wxGraphicsMatrix() {} + + virtual ~wxGraphicsMatrix() {} + + // concatenates the matrix + virtual void Concat( const wxGraphicsMatrix *t ); + void Concat( const wxGraphicsMatrix &t ) { Concat( &t ); } + + // sets the matrix to the respective values + virtual void Set(wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, + wxDouble tx=0.0, wxDouble ty=0.0); + + // gets the component valuess of the matrix + virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL, + wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const; + + // makes this the inverse matrix + virtual void Invert(); + + // returns true if the elements of the transformation matrix are equal ? + virtual bool IsEqual( const wxGraphicsMatrix* t) const; + bool IsEqual( const wxGraphicsMatrix& t) const { return IsEqual( &t ); } + + // return true if this is the identity matrix + virtual bool IsIdentity() const; + + // + // transformation + // + + // add the translation to this matrix + virtual void Translate( wxDouble dx , wxDouble dy ); + + // add the scale to this matrix + virtual void Scale( wxDouble xScale , wxDouble yScale ); + + // add the rotation to this matrix (radians) + virtual void Rotate( wxDouble angle ); + + // + // apply the transforms + // + + // applies that matrix to the point + virtual void TransformPoint( wxDouble *x, wxDouble *y ) const; + + // applies the matrix except for translations + virtual void TransformDistance( wxDouble *dx, wxDouble *dy ) const; + + // returns the native representation + virtual void * GetNativeMatrix() const; + + const wxGraphicsMatrixData* GetMatrixData() const + { return (const wxGraphicsMatrixData*) GetRefData(); } + wxGraphicsMatrixData* GetMatrixData() + { return (wxGraphicsMatrixData*) GetRefData(); } + +private: + DECLARE_DYNAMIC_CLASS(wxGraphicsMatrix) +}; + +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsMatrix) wxNullGraphicsMatrix; + +class WXDLLIMPEXP_CORE wxGraphicsPath : public wxGraphicsObject +{ +public: + wxGraphicsPath() {} + virtual ~wxGraphicsPath() {} + + // + // These are the path primitives from which everything else can be constructed + // + + // begins a new subpath at (x,y) + virtual void MoveToPoint( wxDouble x, wxDouble y ); + void MoveToPoint( const wxPoint2DDouble& p); + + // adds a straight line from the current point to (x,y) + virtual void AddLineToPoint( wxDouble x, wxDouble y ); + void AddLineToPoint( const wxPoint2DDouble& p); + + // adds a cubic Bezier curve from the current point, using two control points and an end point + virtual void AddCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y ); + void AddCurveToPoint( const wxPoint2DDouble& c1, const wxPoint2DDouble& c2, const wxPoint2DDouble& e); + + // adds another path + virtual void AddPath( const wxGraphicsPath& path ); + + // closes the current sub-path + virtual void CloseSubpath(); + + // gets the last point of the current path, (0,0) if not yet set + virtual void GetCurrentPoint( wxDouble* x, wxDouble* y) const; + wxPoint2DDouble GetCurrentPoint() const; + + // adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle + virtual void AddArc( wxDouble x, wxDouble y, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise ); + void AddArc( const wxPoint2DDouble& c, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise); + + // + // These are convenience functions which - if not available natively will be assembled + // using the primitives from above + // + + // adds a quadratic Bezier curve from the current point, using a control point and an end point + virtual void AddQuadCurveToPoint( wxDouble cx, wxDouble cy, wxDouble x, wxDouble y ); + + // appends a rectangle as a new closed subpath + virtual void AddRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + + // appends an ellipsis as a new closed subpath fitting the passed rectangle + virtual void AddCircle( wxDouble x, wxDouble y, wxDouble r ); + + // appends a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1) + virtual void AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r ); + + // appends an ellipse + virtual void AddEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h); + + // appends a rounded rectangle + virtual void AddRoundedRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h, wxDouble radius); + + // returns the native path + virtual void * GetNativePath() const; + + // give the native path returned by GetNativePath() back (there might be some deallocations necessary) + virtual void UnGetNativePath(void *p)const; + + // transforms each point of this path by the matrix + virtual void Transform( const wxGraphicsMatrix& matrix ); + + // gets the bounding box enclosing all points (possibly including control points) + virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h)const; + wxRect2DDouble GetBox()const; + + virtual bool Contains( wxDouble x, wxDouble y, wxPolygonFillMode fillStyle = wxODDEVEN_RULE)const; + bool Contains( const wxPoint2DDouble& c, wxPolygonFillMode fillStyle = wxODDEVEN_RULE)const; + + const wxGraphicsPathData* GetPathData() const + { return (const wxGraphicsPathData*) GetRefData(); } + wxGraphicsPathData* GetPathData() + { return (wxGraphicsPathData*) GetRefData(); } + +private: + DECLARE_DYNAMIC_CLASS(wxGraphicsPath) +}; + +extern WXDLLIMPEXP_DATA_CORE(wxGraphicsPath) wxNullGraphicsPath; + + +// Describes a single gradient stop. +class wxGraphicsGradientStop +{ +public: + wxGraphicsGradientStop(wxColour col = wxTransparentColour, + float pos = 0.) + : m_col(col), + m_pos(pos) + { + } + + // default copy ctor, assignment operator and dtor are ok + + const wxColour& GetColour() const { return m_col; } + void SetColour(const wxColour& col) { m_col = col; } + + float GetPosition() const { return m_pos; } + void SetPosition(float pos) + { + wxASSERT_MSG( pos >= 0 && pos <= 1, "invalid gradient stop position" ); + + m_pos = pos; + } + +private: + // The colour of this gradient band. + wxColour m_col; + + // Its starting position: 0 is the beginning and 1 is the end. + float m_pos; +}; + +// A collection of gradient stops ordered by their positions (from lowest to +// highest). The first stop (index 0, position 0.0) is always the starting +// colour and the last one (index GetCount() - 1, position 1.0) is the end +// colour. +class WXDLLIMPEXP_CORE wxGraphicsGradientStops +{ +public: + wxGraphicsGradientStops(wxColour startCol = wxTransparentColour, + wxColour endCol = wxTransparentColour) + { + // we can't use Add() here as it relies on having start/end stops as + // first/last array elements so do it manually + m_stops.push_back(wxGraphicsGradientStop(startCol, 0.f)); + m_stops.push_back(wxGraphicsGradientStop(endCol, 1.f)); + } + + // default copy ctor, assignment operator and dtor are ok for this class + + + // Add a stop in correct order. + void Add(const wxGraphicsGradientStop& stop); + void Add(wxColour col, float pos) { Add(wxGraphicsGradientStop(col, pos)); } + + // Get the number of stops. + size_t GetCount() const { return m_stops.size(); } + + // Return the stop at the given index (which must be valid). + wxGraphicsGradientStop Item(unsigned n) const { return m_stops.at(n); } + + // Get/set start and end colours. + void SetStartColour(wxColour col) + { m_stops[0].SetColour(col); } + wxColour GetStartColour() const + { return m_stops[0].GetColour(); } + void SetEndColour(wxColour col) + { m_stops[m_stops.size() - 1].SetColour(col); } + wxColour GetEndColour() const + { return m_stops[m_stops.size() - 1].GetColour(); } + +private: + // All the stops stored in ascending order of positions. + wxVector m_stops; +}; + +class WXDLLIMPEXP_CORE wxGraphicsContext : public wxGraphicsObject +{ +public: + wxGraphicsContext(wxGraphicsRenderer* renderer); + + virtual ~wxGraphicsContext(); + + static wxGraphicsContext* Create( const wxWindowDC& dc); + static wxGraphicsContext * Create( const wxMemoryDC& dc); +#if wxUSE_PRINTING_ARCHITECTURE + static wxGraphicsContext * Create( const wxPrinterDC& dc); +#endif +#ifdef __WXMSW__ +#if wxUSE_ENH_METAFILE + static wxGraphicsContext * Create( const wxEnhMetaFileDC& dc); +#endif +#endif + + static wxGraphicsContext* CreateFromNative( void * context ); + + static wxGraphicsContext* CreateFromNativeWindow( void * window ); + + static wxGraphicsContext* Create( wxWindow* window ); + +#if wxUSE_IMAGE + // Create a context for drawing onto a wxImage. The image life time must be + // greater than that of the context itself as when the context is destroyed + // it will copy its contents to the specified image. + static wxGraphicsContext* Create(wxImage& image); +#endif // wxUSE_IMAGE + + // create a context that can be used for measuring texts only, no drawing allowed + static wxGraphicsContext * Create(); + + // begin a new document (relevant only for printing / pdf etc) if there is a progress dialog, message will be shown + virtual bool StartDoc( const wxString& message ); + + // done with that document (relevant only for printing / pdf etc) + virtual void EndDoc(); + + // opens a new page (relevant only for printing / pdf etc) with the given size in points + // (if both are null the default page size will be used) + virtual void StartPage( wxDouble width = 0, wxDouble height = 0 ); + + // ends the current page (relevant only for printing / pdf etc) + virtual void EndPage(); + + // make sure that the current content of this context is immediately visible + virtual void Flush(); + + wxGraphicsPath CreatePath() const; + + virtual wxGraphicsPen CreatePen(const wxPen& pen) const; + + virtual wxGraphicsBrush CreateBrush(const wxBrush& brush ) const; + + // sets the brush to a linear gradient, starting at (x1,y1) and ending at + // (x2,y2) with the given boundary colours or the specified stops + wxGraphicsBrush + CreateLinearGradientBrush(wxDouble x1, wxDouble y1, + wxDouble x2, wxDouble y2, + const wxColour& c1, const wxColour& c2) const; + wxGraphicsBrush + CreateLinearGradientBrush(wxDouble x1, wxDouble y1, + wxDouble x2, wxDouble y2, + const wxGraphicsGradientStops& stops) const; + + // sets the brush to a radial gradient originating at (xo,yc) and ending + // on a circle around (xc,yc) with the given radius; the colours may be + // specified by just the two extremes or the full array of gradient stops + wxGraphicsBrush + CreateRadialGradientBrush(wxDouble xo, wxDouble yo, + wxDouble xc, wxDouble yc, wxDouble radius, + const wxColour& oColor, const wxColour& cColor) const; + + wxGraphicsBrush + CreateRadialGradientBrush(wxDouble xo, wxDouble yo, + wxDouble xc, wxDouble yc, wxDouble radius, + const wxGraphicsGradientStops& stops) const; + + // creates a font + virtual wxGraphicsFont CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) const; + virtual wxGraphicsFont CreateFont(double sizeInPixels, + const wxString& facename, + int flags = wxFONTFLAG_DEFAULT, + const wxColour& col = *wxBLACK) const; + + // create a native bitmap representation + virtual wxGraphicsBitmap CreateBitmap( const wxBitmap &bitmap ) const; +#if wxUSE_IMAGE + wxGraphicsBitmap CreateBitmapFromImage(const wxImage& image) const; +#endif // wxUSE_IMAGE + + // create a native bitmap representation + virtual wxGraphicsBitmap CreateSubBitmap( const wxGraphicsBitmap &bitmap, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) const; + + // create a 'native' matrix corresponding to these values + virtual wxGraphicsMatrix CreateMatrix( wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, + wxDouble tx=0.0, wxDouble ty=0.0) const; + + wxGraphicsMatrix CreateMatrix( const wxAffineMatrix2DBase& mat ) const + { + wxMatrix2D mat2D; + wxPoint2DDouble tr; + mat.Get(&mat2D, &tr); + + return CreateMatrix(mat2D.m_11, mat2D.m_12, mat2D.m_21, mat2D.m_22, + tr.m_x, tr.m_y); + } + + // push the current state of the context, ie the transformation matrix on a stack + virtual void PushState() = 0; + + // pops a stored state from the stack + virtual void PopState() = 0; + + // clips drawings to the region intersected with the current clipping region + virtual void Clip( const wxRegion ®ion ) = 0; + + // clips drawings to the rect intersected with the current clipping region + virtual void Clip( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; + + // resets the clipping to original extent + virtual void ResetClip() = 0; + + // returns the native context + virtual void * GetNativeContext() = 0; + + // returns the current shape antialiasing mode + virtual wxAntialiasMode GetAntialiasMode() const { return m_antialias; } + + // sets the antialiasing mode, returns true if it supported + virtual bool SetAntialiasMode(wxAntialiasMode antialias) = 0; + + // returns the current interpolation quality + virtual wxInterpolationQuality GetInterpolationQuality() const { return m_interpolation; } + + // sets the interpolation quality, returns true if it supported + virtual bool SetInterpolationQuality(wxInterpolationQuality interpolation) = 0; + + // returns the current compositing operator + virtual wxCompositionMode GetCompositionMode() const { return m_composition; } + + // sets the compositing operator, returns true if it supported + virtual bool SetCompositionMode(wxCompositionMode op) = 0; + + // returns the size of the graphics context in device coordinates + void GetSize(wxDouble* width, wxDouble* height) const + { + if ( width ) + *width = m_width; + if ( height ) + *height = m_height; + } + + // returns the resolution of the graphics context in device points per inch + virtual void GetDPI( wxDouble* dpiX, wxDouble* dpiY); + +#if 0 + // sets the current alpha on this context + virtual void SetAlpha( wxDouble alpha ); + + // returns the alpha on this context + virtual wxDouble GetAlpha() const; +#endif + + // all rendering is done into a fully transparent temporary context + virtual void BeginLayer(wxDouble opacity) = 0; + + // composites back the drawings into the context with the opacity given at + // the BeginLayer call + virtual void EndLayer() = 0; + + // + // transformation : changes the current transformation matrix CTM of the context + // + + // translate + virtual void Translate( wxDouble dx , wxDouble dy ) = 0; + + // scale + virtual void Scale( wxDouble xScale , wxDouble yScale ) = 0; + + // rotate (radians) + virtual void Rotate( wxDouble angle ) = 0; + + // concatenates this transform with the current transform of this context + virtual void ConcatTransform( const wxGraphicsMatrix& matrix ) = 0; + + // sets the transform of this context + virtual void SetTransform( const wxGraphicsMatrix& matrix ) = 0; + + // gets the matrix of this context + virtual wxGraphicsMatrix GetTransform() const = 0; + // + // setting the paint + // + + // sets the pen + virtual void SetPen( const wxGraphicsPen& pen ); + + void SetPen( const wxPen& pen ); + + // sets the brush for filling + virtual void SetBrush( const wxGraphicsBrush& brush ); + + void SetBrush( const wxBrush& brush ); + + // sets the font + virtual void SetFont( const wxGraphicsFont& font ); + + void SetFont( const wxFont& font, const wxColour& colour ); + + + // strokes along a path with the current pen + virtual void StrokePath( const wxGraphicsPath& path ) = 0; + + // fills a path with the current brush + virtual void FillPath( const wxGraphicsPath& path, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ) = 0; + + // draws a path by first filling and then stroking + virtual void DrawPath( const wxGraphicsPath& path, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); + + // + // text + // + + void DrawText( const wxString &str, wxDouble x, wxDouble y ) + { DoDrawText(str, x, y); } + + void DrawText( const wxString &str, wxDouble x, wxDouble y, wxDouble angle ) + { DoDrawRotatedText(str, x, y, angle); } + + void DrawText( const wxString &str, wxDouble x, wxDouble y, + const wxGraphicsBrush& backgroundBrush ) + { DoDrawFilledText(str, x, y, backgroundBrush); } + + void DrawText( const wxString &str, wxDouble x, wxDouble y, + wxDouble angle, const wxGraphicsBrush& backgroundBrush ) + { DoDrawRotatedFilledText(str, x, y, angle, backgroundBrush); } + + + virtual void GetTextExtent( const wxString &text, wxDouble *width, wxDouble *height, + wxDouble *descent = NULL, wxDouble *externalLeading = NULL ) const = 0; + + virtual void GetPartialTextExtents(const wxString& text, wxArrayDouble& widths) const = 0; + + // + // image support + // + + virtual void DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; + + virtual void DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; + + virtual void DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; + + // + // convenience methods + // + + // strokes a single line + virtual void StrokeLine( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2); + + // stroke lines connecting each of the points + virtual void StrokeLines( size_t n, const wxPoint2DDouble *points); + + // stroke disconnected lines from begin to end points + virtual void StrokeLines( size_t n, const wxPoint2DDouble *beginPoints, const wxPoint2DDouble *endPoints); + + // draws a polygon + virtual void DrawLines( size_t n, const wxPoint2DDouble *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); + + // draws a rectangle + virtual void DrawRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h); + + // draws an ellipse + virtual void DrawEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h); + + // draws a rounded rectangle + virtual void DrawRoundedRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h, wxDouble radius); + + // wrappers using wxPoint2DDouble TODO + + // helper to determine if a 0.5 offset should be applied for the drawing operation + virtual bool ShouldOffset() const { return false; } + + // indicates whether the context should try to offset for pixel boundaries, this only makes sense on + // bitmap devices like screen, by default this is turned off + virtual void EnableOffset(bool enable = true); + + void DisableOffset() { EnableOffset(false); } + bool OffsetEnabled() { return m_enableOffset; } + +protected: + // These fields must be initialized in the derived class ctors. + wxDouble m_width, + m_height; + + wxGraphicsPen m_pen; + wxGraphicsBrush m_brush; + wxGraphicsFont m_font; + wxAntialiasMode m_antialias; + wxCompositionMode m_composition; + wxInterpolationQuality m_interpolation; + bool m_enableOffset; + +protected: + // implementations of overloaded public functions: we use different names + // for them to avoid the virtual function hiding problems in the derived + // classes + virtual void DoDrawText(const wxString& str, wxDouble x, wxDouble y) = 0; + virtual void DoDrawRotatedText(const wxString& str, wxDouble x, wxDouble y, + wxDouble angle); + virtual void DoDrawFilledText(const wxString& str, wxDouble x, wxDouble y, + const wxGraphicsBrush& backgroundBrush); + virtual void DoDrawRotatedFilledText(const wxString& str, + wxDouble x, wxDouble y, + wxDouble angle, + const wxGraphicsBrush& backgroundBrush); + + wxDECLARE_NO_COPY_CLASS(wxGraphicsContext); + DECLARE_ABSTRACT_CLASS(wxGraphicsContext) +}; + +#if 0 + +// +// A graphics figure allows to cache path, pen etc creations, also will be a basis for layering/grouping elements +// + +class WXDLLIMPEXP_CORE wxGraphicsFigure : public wxGraphicsObject +{ +public: + wxGraphicsFigure(wxGraphicsRenderer* renderer); + + virtual ~wxGraphicsFigure(); + + void SetPath( wxGraphicsMatrix* matrix ); + + void SetMatrix( wxGraphicsPath* path); + + // draws this object on the context + virtual void Draw( wxGraphicsContext* cg ); + + // returns the path of this object + wxGraphicsPath* GetPath() { return m_path; } + + // returns the transformation matrix of this object, may be null if there is no transformation necessary + wxGraphicsMatrix* GetMatrix() { return m_matrix; } + +private: + wxGraphicsMatrix* m_matrix; + wxGraphicsPath* m_path; + + DECLARE_DYNAMIC_CLASS(wxGraphicsFigure) +}; + +#endif + +// +// The graphics renderer is the instance corresponding to the rendering engine used, eg there is ONE core graphics renderer +// instance on OSX. This instance is pointed back to by all objects created by it. Therefore you can create eg additional +// paths at any point from a given matrix etc. +// + +class WXDLLIMPEXP_CORE wxGraphicsRenderer : public wxObject +{ +public: + wxGraphicsRenderer() {} + + virtual ~wxGraphicsRenderer() {} + + static wxGraphicsRenderer* GetDefaultRenderer(); + + static wxGraphicsRenderer* GetCairoRenderer(); + // Context + + virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc) = 0; + virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc) = 0; +#if wxUSE_PRINTING_ARCHITECTURE + virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc) = 0; +#endif +#ifdef __WXMSW__ +#if wxUSE_ENH_METAFILE + virtual wxGraphicsContext * CreateContext( const wxEnhMetaFileDC& dc) = 0; +#endif +#endif + + virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ) = 0; + + virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window ) = 0; + + virtual wxGraphicsContext * CreateContext( wxWindow* window ) = 0; + +#if wxUSE_IMAGE + virtual wxGraphicsContext * CreateContextFromImage(wxImage& image) = 0; +#endif // wxUSE_IMAGE + + // create a context that can be used for measuring texts only, no drawing allowed + virtual wxGraphicsContext * CreateMeasuringContext() = 0; + + // Path + + virtual wxGraphicsPath CreatePath() = 0; + + // Matrix + + virtual wxGraphicsMatrix CreateMatrix( wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, + wxDouble tx=0.0, wxDouble ty=0.0) = 0; + + // Paints + + virtual wxGraphicsPen CreatePen(const wxPen& pen) = 0; + + virtual wxGraphicsBrush CreateBrush(const wxBrush& brush ) = 0; + + // Gradient brush creation functions may not honour all the stops specified + // stops and use just its boundary colours (this is currently the case + // under OS X) + virtual wxGraphicsBrush + CreateLinearGradientBrush(wxDouble x1, wxDouble y1, + wxDouble x2, wxDouble y2, + const wxGraphicsGradientStops& stops) = 0; + + virtual wxGraphicsBrush + CreateRadialGradientBrush(wxDouble xo, wxDouble yo, + wxDouble xc, wxDouble yc, + wxDouble radius, + const wxGraphicsGradientStops& stops) = 0; + + // sets the font + virtual wxGraphicsFont CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) = 0; + virtual wxGraphicsFont CreateFont(double sizeInPixels, + const wxString& facename, + int flags = wxFONTFLAG_DEFAULT, + const wxColour& col = *wxBLACK) = 0; + + // create a native bitmap representation + virtual wxGraphicsBitmap CreateBitmap( const wxBitmap &bitmap ) = 0; +#if wxUSE_IMAGE + virtual wxGraphicsBitmap CreateBitmapFromImage(const wxImage& image) = 0; + virtual wxImage CreateImageFromBitmap(const wxGraphicsBitmap& bmp) = 0; +#endif // wxUSE_IMAGE + + // create a graphics bitmap from a native bitmap + virtual wxGraphicsBitmap CreateBitmapFromNativeBitmap( void* bitmap ) = 0; + + // create a subimage from a native image representation + virtual wxGraphicsBitmap CreateSubBitmap( const wxGraphicsBitmap &bitmap, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) = 0; + +private: + wxDECLARE_NO_COPY_CLASS(wxGraphicsRenderer); + DECLARE_ABSTRACT_CLASS(wxGraphicsRenderer) +}; + + +#if wxUSE_IMAGE +inline +wxImage wxGraphicsBitmap::ConvertToImage() const +{ + wxGraphicsRenderer* renderer = GetRenderer(); + return renderer ? renderer->CreateImageFromBitmap(*this) : wxNullImage; +} +#endif // wxUSE_IMAGE + +#endif // wxUSE_GRAPHICS_CONTEXT + +#endif // _WX_GRAPHICS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/grid.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/grid.h new file mode 100644 index 0000000000..02055658ed --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/grid.h @@ -0,0 +1,21 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/grid.h +// Purpose: wxGrid base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GRID_H_BASE_ +#define _WX_GRID_H_BASE_ + +#include "wx/generic/grid.h" + +// these headers used to be included from the above header but isn't any more, +// still do it from here for compatibility +#include "wx/generic/grideditors.h" +#include "wx/generic/gridctrl.h" + +#endif // _WX_GRID_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/accel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/accel.h new file mode 100644 index 0000000000..09ffb61cc1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/accel.h @@ -0,0 +1,14 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/accel.h +// Purpose: wxAcceleratorTable redirection file +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// VZ: keeping the old file just in case we're going to have a native GTK+ +// wxAcceleratorTable implementation one day, but for now use the generic +// version +#include "wx/generic/accel.h" diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/animate.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/animate.h new file mode 100644 index 0000000000..1cda545a41 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/animate.h @@ -0,0 +1,153 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/animate.h +// Purpose: Animation classes +// Author: Julian Smart and Guillermo Rodriguez Garcia +// Modified by: Francesco Montorsi +// Created: 13/8/99 +// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKANIMATEH__ +#define _WX_GTKANIMATEH__ + +typedef struct _GdkPixbufAnimation GdkPixbufAnimation; +typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter; + +// ---------------------------------------------------------------------------- +// wxAnimation +// Unlike the generic wxAnimation object (see generic\animate.cpp), we won't +// use directly wxAnimationHandlers as gdk-pixbuf already provides the +// concept of handler and will automatically use the available handlers. +// Like generic wxAnimation object, this implementation of wxAnimation is +// refcounted so that assignment is very fast +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxAnimation : public wxAnimationBase +{ +public: + wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY) + : m_pixbuf(NULL) { LoadFile(name, type); } + wxAnimation(GdkPixbufAnimation *p = NULL); + wxAnimation(const wxAnimation&); + ~wxAnimation() { UnRef(); } + + wxAnimation& operator= (const wxAnimation&); + + virtual bool IsOk() const + { return m_pixbuf != NULL; } + + + // unfortunately GdkPixbufAnimation does not expose these info: + + virtual unsigned int GetFrameCount() const { return 0; } + virtual wxImage GetFrame(unsigned int frame) const; + + // we can retrieve the delay for a frame only after building + // a GdkPixbufAnimationIter... + virtual int GetDelay(unsigned int WXUNUSED(frame)) const { return 0; } + + virtual wxSize GetSize() const; + + virtual bool LoadFile(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY); + virtual bool Load(wxInputStream &stream, wxAnimationType type = wxANIMATION_TYPE_ANY); + + // Implementation +public: // used by GTK callbacks + + GdkPixbufAnimation *GetPixbuf() const + { return m_pixbuf; } + void SetPixbuf(GdkPixbufAnimation* p); + +protected: + GdkPixbufAnimation *m_pixbuf; + +private: + void UnRef(); + + typedef wxAnimationBase base_type; + DECLARE_DYNAMIC_CLASS(wxAnimation) +}; + + +// ---------------------------------------------------------------------------- +// wxAnimationCtrl +// ---------------------------------------------------------------------------- + +// Resize to animation size if this is set +#define wxAN_FIT_ANIMATION 0x0010 + +class WXDLLIMPEXP_ADV wxAnimationCtrl: public wxAnimationCtrlBase +{ +public: + wxAnimationCtrl() { Init(); } + wxAnimationCtrl(wxWindow *parent, + wxWindowID id, + const wxAnimation& anim = wxNullAnimation, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxAC_DEFAULT_STYLE, + const wxString& name = wxAnimationCtrlNameStr) + { + Init(); + + Create(parent, id, anim, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxAnimation& anim = wxNullAnimation, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxAC_DEFAULT_STYLE, + const wxString& name = wxAnimationCtrlNameStr); + + ~wxAnimationCtrl(); + +public: // event handler + + void OnTimer(wxTimerEvent &); + +public: // public API + + virtual bool LoadFile(const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY); + virtual bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY); + + virtual void SetAnimation(const wxAnimation &anim); + virtual wxAnimation GetAnimation() const + { return wxAnimation(m_anim); } + + virtual bool Play(); + virtual void Stop(); + + virtual bool IsPlaying() const; + + bool SetBackgroundColour( const wxColour &colour ); + +protected: + + virtual void DisplayStaticImage(); + virtual wxSize DoGetBestSize() const; + void FitToAnimation(); + void ClearToBackgroundColour(); + + void ResetAnim(); + void ResetIter(); + +protected: // internal vars + + GdkPixbufAnimation *m_anim; + GdkPixbufAnimationIter *m_iter; + + wxTimer m_timer; + bool m_bPlaying; + +private: + typedef wxAnimationCtrlBase base_type; + + void Init(); + + DECLARE_DYNAMIC_CLASS(wxAnimationCtrl) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_GTKANIMATEH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/anybutton.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/anybutton.h new file mode 100644 index 0000000000..604c72c72a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/anybutton.h @@ -0,0 +1,80 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/anybutton.h +// Purpose: wxGTK wxAnyButton class declaration +// Author: Robert Roebling +// Created: 1998-05-20 (extracted from button.h) +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_ANYBUTTON_H_ +#define _WX_GTK_ANYBUTTON_H_ + +//----------------------------------------------------------------------------- +// wxAnyButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase +{ +public: + wxAnyButton() + { + m_isCurrent = + m_isPressed = false; + } + + virtual bool Enable( bool enable = true ); + + // implementation + // -------------- + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // called from GTK callbacks: they update the button state and call + // GTKUpdateBitmap() + void GTKMouseEnters(); + void GTKMouseLeaves(); + void GTKPressed(); + void GTKReleased(); + +protected: + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + virtual wxBitmap DoGetBitmap(State which) const; + virtual void DoSetBitmap(const wxBitmap& bitmap, State which); + virtual void DoSetBitmapPosition(wxDirection dir); + +private: + typedef wxAnyButtonBase base_type; + + // focus event handler: calls GTKUpdateBitmap() + void GTKOnFocus(wxFocusEvent& event); + + // update the bitmap to correspond to the current button state + void GTKUpdateBitmap(); + + // return the current button state from m_isXXX flags (which means that it + // might not correspond to the real current state as e.g. m_isCurrent will + // never be true if we don't have a valid current bitmap) + State GTKGetCurrentState() const; + + // show the given bitmap (must be valid) + void GTKDoShowBitmap(const wxBitmap& bitmap); + + + // the bitmaps for the different state of the buttons, all of them may be + // invalid and the button only shows a bitmap at all if State_Normal bitmap + // is valid + wxBitmap m_bitmaps[State_Max]; + + // true iff mouse is currently over the button + bool m_isCurrent; + + // true iff the button is in pressed state + bool m_isPressed; + + wxDECLARE_NO_COPY_CLASS(wxAnyButton); +}; + +#endif // _WX_GTK_ANYBUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/app.h new file mode 100644 index 0000000000..6f112a3c88 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/app.h @@ -0,0 +1,93 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/app.h +// Purpose: wxApp definition for wxGTK +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_APP_H_ +#define _WX_GTK_APP_H_ + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 +typedef struct _HildonProgram HildonProgram; +#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 + +//----------------------------------------------------------------------------- +// wxApp +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxApp: public wxAppBase +{ +public: + wxApp(); + virtual ~wxApp(); + + /* override for altering the way wxGTK intializes the GUI + * (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by + * default. when overriding this method, the code in it is likely to be + * platform dependent, otherwise use OnInit(). */ + virtual bool SetNativeTheme(const wxString& theme); + virtual bool OnInitGui(); + + // override base class (pure) virtuals + virtual void WakeUpIdle(); + + virtual bool Initialize(int& argc, wxChar **argv); + virtual void CleanUp(); + + virtual void OnAssertFailure(const wxChar *file, + int line, + const wxChar *func, + const wxChar *cond, + const wxChar *msg); + + // GTK-specific methods + // ------------------- + + // this can be overridden to return a specific visual to be used for GTK+ + // instead of the default one (it's used by wxGLApp) + // + // must return XVisualInfo pointer (it is not freed by caller) + virtual void *GetXVisualInfo() { return NULL; } + + // Check if we're using a global menu. Currently this is only true when + // running under Ubuntu Unity and global menu is not disabled. + // + // This is mostly used in the implementation in order to work around + // various bugs arising due to this. + static bool GTKIsUsingGlobalMenu(); + +#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 + // Maemo-specific method: get the main program object + HildonProgram *GetHildonProgram(); +#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 + + // implementation only from now on + // ------------------------------- + + // check for pending events, without interference from our idle source + bool EventsPending(); + bool DoIdle(); + +private: + // true if we're inside an assert modal dialog + bool m_isInAssert; + +#if wxUSE_THREADS + wxMutex m_idleMutex; +#endif + unsigned m_idleSourceId; + +#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 + HildonProgram *m_hildonProgram; +#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 + + DECLARE_DYNAMIC_CLASS(wxApp) +}; + +#endif // _WX_GTK_APP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/assertdlg_gtk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/assertdlg_gtk.h new file mode 100644 index 0000000000..098e9b1123 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/assertdlg_gtk.h @@ -0,0 +1,77 @@ +/* /////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/assertdlg_gtk.h +// Purpose: GtkAssertDialog +// Author: Francesco Montorsi +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////// */ + +#ifndef _WX_GTK_ASSERTDLG_H_ +#define _WX_GTK_ASSERTDLG_H_ + +#define GTK_TYPE_ASSERT_DIALOG (gtk_assert_dialog_get_type ()) +#define GTK_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialog)) +#define GTK_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass)) +#define GTK_IS_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_ASSERT_DIALOG)) +#define GTK_IS_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ASSERT_DIALOG)) +#define GTK_ASSERT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass)) + +typedef struct _GtkAssertDialog GtkAssertDialog; +typedef struct _GtkAssertDialogClass GtkAssertDialogClass; +typedef void (*GtkAssertDialogStackFrameCallback)(void *); + +struct _GtkAssertDialog +{ + GtkDialog parent_instance; + + /* GtkAssertDialog widgets */ + GtkWidget *expander; + GtkWidget *message; + GtkWidget *treeview; + + GtkWidget *shownexttime; + + /* callback for processing the stack frame */ + GtkAssertDialogStackFrameCallback callback; + void *userdata; +}; + +struct _GtkAssertDialogClass +{ + GtkDialogClass parent_class; +}; + +typedef enum +{ + GTK_ASSERT_DIALOG_STOP, + GTK_ASSERT_DIALOG_CONTINUE, + GTK_ASSERT_DIALOG_CONTINUE_SUPPRESSING +} GtkAssertDialogResponseID; + + + + +GType gtk_assert_dialog_get_type(void); +GtkWidget *gtk_assert_dialog_new(void); + +/* get the assert message */ +gchar *gtk_assert_dialog_get_message(GtkAssertDialog *assertdlg); + +/* set the assert message */ +void gtk_assert_dialog_set_message(GtkAssertDialog *assertdlg, const gchar *msg); + +/* get a string containing all stack frames appended to the dialog */ +gchar *gtk_assert_dialog_get_backtrace(GtkAssertDialog *assertdlg); + +/* sets the callback to use when the user wants to see the stackframe */ +void gtk_assert_dialog_set_backtrace_callback(GtkAssertDialog *assertdlg, + GtkAssertDialogStackFrameCallback callback, + void *userdata); + +/* appends a stack frame to the dialog */ +void gtk_assert_dialog_append_stack_frame(GtkAssertDialog *dlg, + const gchar *function, + const gchar *sourcefile, + guint line_number); + +#endif /* _WX_GTK_ASSERTDLG_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/bitmap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/bitmap.h new file mode 100644 index 0000000000..d035f2c2c1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/bitmap.h @@ -0,0 +1,181 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/bitmap.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_BITMAP_H_ +#define _WX_GTK_BITMAP_H_ + +#ifdef __WXGTK3__ +typedef struct _cairo cairo_t; +typedef struct _cairo_surface cairo_surface_t; +#endif +typedef struct _GdkPixbuf GdkPixbuf; +class WXDLLIMPEXP_FWD_CORE wxPixelDataBase; + +//----------------------------------------------------------------------------- +// wxMask +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMask: public wxMaskBase +{ +public: + wxMask(); + wxMask(const wxMask& mask); + wxMask( const wxBitmap& bitmap, const wxColour& colour ); +#if wxUSE_PALETTE + wxMask( const wxBitmap& bitmap, int paletteIndex ); +#endif // wxUSE_PALETTE + wxMask( const wxBitmap& bitmap ); + virtual ~wxMask(); + wxBitmap GetBitmap() const; + + // implementation +#ifdef __WXGTK3__ + wxMask(cairo_surface_t*); + operator cairo_surface_t*() const; +#else + wxMask(GdkPixmap*); + operator GdkPixmap*() const; +#endif + +protected: + virtual void FreeData(); + virtual bool InitFromColour(const wxBitmap& bitmap, const wxColour& colour); + virtual bool InitFromMonoBitmap(const wxBitmap& bitmap); + +private: +#ifdef __WXGTK3__ + cairo_surface_t* m_bitmap; +#else + GdkPixmap* m_bitmap; +#endif + + DECLARE_DYNAMIC_CLASS(wxMask) +}; + +//----------------------------------------------------------------------------- +// wxBitmap +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase +{ +public: + wxBitmap() { } + wxBitmap( int width, int height, int depth = wxBITMAP_SCREEN_DEPTH ) + { Create(width, height, depth); } + wxBitmap( const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH ) + { Create(sz, depth); } + wxBitmap( const char bits[], int width, int height, int depth = 1 ); + wxBitmap( const char* const* bits ); +#ifdef wxNEEDS_CHARPP + // needed for old GCC + wxBitmap(char** data) + { *this = wxBitmap(const_cast(data)); } +#endif + wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE ); +#if wxUSE_IMAGE + wxBitmap(const wxImage& image, int depth = wxBITMAP_SCREEN_DEPTH); +#endif // wxUSE_IMAGE + wxBitmap(GdkPixbuf* pixbuf, int depth = 0); + virtual ~wxBitmap(); + + bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); + bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) + { return Create(sz.GetWidth(), sz.GetHeight(), depth); } + bool Create(int width, int height, const wxDC& WXUNUSED(dc)) + { return Create(width,height); } + + + virtual int GetHeight() const; + virtual int GetWidth() const; + virtual int GetDepth() const; + +#if wxUSE_IMAGE + wxImage ConvertToImage() const; +#endif // wxUSE_IMAGE + + // copies the contents and mask of the given (colour) icon to the bitmap + virtual bool CopyFromIcon(const wxIcon& icon); + + wxMask *GetMask() const; + void SetMask( wxMask *mask ); + + wxBitmap GetSubBitmap( const wxRect& rect ) const; + + bool SaveFile(const wxString &name, wxBitmapType type, + const wxPalette *palette = NULL) const; + bool LoadFile(const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); + +#if wxUSE_PALETTE + wxPalette *GetPalette() const; + void SetPalette(const wxPalette& palette); + wxPalette *GetColourMap() const { return GetPalette(); } +#endif // wxUSE_PALETTE + + static void InitStandardHandlers(); + + // implementation + // -------------- + + void SetHeight( int height ); + void SetWidth( int width ); + void SetDepth( int depth ); + +#ifdef __WXGTK3__ + GdkPixbuf* GetPixbufNoMask() const; + cairo_t* CairoCreate() const; + void Draw(cairo_t* cr, int x, int y, bool useMask = true, const wxColour* fg = NULL, const wxColour* bg = NULL) const; + void SetSourceSurface(cairo_t* cr, int x, int y, const wxColour* fg = NULL, const wxColour* bg = NULL) const; +#else + GdkPixmap *GetPixmap() const; + bool HasPixmap() const; + bool HasPixbuf() const; + wxBitmap(GdkPixmap* pixmap); +#endif + GdkPixbuf *GetPixbuf() const; + + // raw bitmap access support functions + void *GetRawData(wxPixelDataBase& data, int bpp); + void UngetRawData(wxPixelDataBase& data); + + bool HasAlpha() const; + +protected: +#ifndef __WXGTK3__ +#if wxUSE_IMAGE + bool CreateFromImage(const wxImage& image, int depth); +#endif // wxUSE_IMAGE +#endif + + virtual wxGDIRefData* CreateGDIRefData() const; + virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const; + +private: +#ifndef __WXGTK3__ + void SetPixmap(GdkPixmap* pixmap); +#if wxUSE_IMAGE + // to be called from CreateFromImage only! + bool CreateFromImageAsPixmap(const wxImage& image, int depth); + bool CreateFromImageAsPixbuf(const wxImage& image); +#endif // wxUSE_IMAGE + +public: + // implementation only + enum Representation + { + Pixmap, + Pixbuf + }; + // removes other representations from memory, keeping only 'keep' + // (wxBitmap may keep same bitmap e.g. as both pixmap and pixbuf): + void PurgeOtherRepresentations(Representation keep); +#endif + + DECLARE_DYNAMIC_CLASS(wxBitmap) +}; + +#endif // _WX_GTK_BITMAP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/bmpbuttn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/bmpbuttn.h new file mode 100644 index 0000000000..f70e28ceb7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/bmpbuttn.h @@ -0,0 +1,46 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/bmpbutton.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_BMPBUTTON_H_ +#define _WX_GTK_BMPBUTTON_H_ + +// ---------------------------------------------------------------------------- +// wxBitmapButton +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase +{ +public: + wxBitmapButton() { } + + wxBitmapButton(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Create(parent, id, bitmap, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + +private: + DECLARE_DYNAMIC_CLASS(wxBitmapButton) +}; + +#endif // _WX_GTK_BMPBUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/bmpcbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/bmpcbox.h new file mode 100644 index 0000000000..f5d00a517b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/bmpcbox.h @@ -0,0 +1,146 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/bmpcbox.h +// Purpose: wxBitmapComboBox +// Author: Jaakko Salli +// Created: 2008-05-19 +// Copyright: (c) 2008 Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_BMPCBOX_H_ +#define _WX_GTK_BMPCBOX_H_ + + +#include "wx/combobox.h" + +// ---------------------------------------------------------------------------- +// wxBitmapComboBox: a wxComboBox that allows images to be shown +// in front of string items. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxBitmapComboBox : public wxComboBox, + public wxBitmapComboBoxBase +{ +public: + // ctors and such + wxBitmapComboBox() : wxComboBox(), wxBitmapComboBoxBase() + { + Init(); + } + + wxBitmapComboBox(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr) + : wxComboBox(), + wxBitmapComboBoxBase() + { + Init(); + + (void)Create(parent, id, value, pos, size, n, + choices, style, validator, name); + } + + wxBitmapComboBox(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + int n, + const wxString choices[], + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr); + + virtual ~wxBitmapComboBox(); + + // Sets the image for the given item. + virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap); + + // Returns the image of the item with the given index. + virtual wxBitmap GetItemBitmap(unsigned int n) const; + + // Returns size of the image used in list + virtual wxSize GetBitmapSize() const + { + return m_bitmapSize; + } + + // Adds item with image to the end of the combo box. + int Append(const wxString& item, const wxBitmap& bitmap = wxNullBitmap); + int Append(const wxString& item, const wxBitmap& bitmap, void *clientData); + int Append(const wxString& item, const wxBitmap& bitmap, wxClientData *clientData); + + // Inserts item with image into the list before pos. Not valid for wxCB_SORT + // styles, use Append instead. + int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos); + int Insert(const wxString& item, const wxBitmap& bitmap, + unsigned int pos, void *clientData); + int Insert(const wxString& item, const wxBitmap& bitmap, + unsigned int pos, wxClientData *clientData); + + // Override some wxTextEntry interface. + virtual void WriteText(const wxString& value); + + virtual wxString GetValue() const; + virtual void Remove(long from, long to); + + virtual void SetInsertionPoint(long pos); + virtual long GetInsertionPoint() const; + virtual long GetLastPosition() const; + + virtual void SetSelection(long from, long to); + virtual void GetSelection(long *from, long *to) const; + + virtual void SetSelection(int n) { wxComboBox::SetSelection(n); } + virtual int GetSelection() const { return wxComboBox::GetSelection(); } + + virtual bool IsEditable() const; + virtual void SetEditable(bool editable); + + virtual GtkWidget* GetConnectWidget(); + +protected: + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + virtual void GTKCreateComboBoxWidget(); + virtual void GTKInsertComboBoxTextItem( unsigned int n, const wxString& text ); + + virtual wxSize DoGetBestSize() const; + + wxSize m_bitmapSize; + int m_bitmapCellIndex; + +private: + void Init(); + + DECLARE_DYNAMIC_CLASS(wxBitmapComboBox) +}; + +#endif // _WX_GTK_BMPCBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/brush.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/brush.h new file mode 100644 index 0000000000..37a4845e6e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/brush.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/brush.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_BRUSH_H_ +#define _WX_GTK_BRUSH_H_ + +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxColour; + +//----------------------------------------------------------------------------- +// wxBrush +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase +{ +public: + wxBrush() { } + + wxBrush( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID ); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) ); +#endif + wxBrush( const wxBitmap &stippleBitmap ); + virtual ~wxBrush(); + + bool operator==(const wxBrush& brush) const; + bool operator!=(const wxBrush& brush) const { return !(*this == brush); } + + wxBrushStyle GetStyle() const; + wxColour GetColour() const; + wxBitmap *GetStipple() const; + + void SetColour( const wxColour& col ); + void SetColour( unsigned char r, unsigned char g, unsigned char b ); + void SetStyle( wxBrushStyle style ); + void SetStipple( const wxBitmap& stipple ); + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxBrushStyle)style); } +#endif + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxBrush) +}; + +#endif // _WX_GTK_BRUSH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/button.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/button.h new file mode 100644 index 0000000000..9e7a57d890 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/button.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/button.h +// Purpose: wxGTK wxButton class declaration +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_BUTTON_H_ +#define _WX_GTK_BUTTON_H_ + +//----------------------------------------------------------------------------- +// wxButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxButton : public wxButtonBase +{ +public: + wxButton() {} + wxButton(wxWindow *parent, wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + virtual wxWindow *SetDefault(); + virtual void SetLabel( const wxString &label ); + + // implementation + // -------------- + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // helper to allow access to protected member from GTK callback + void MoveWindow(int x, int y, int width, int height) { DoMoveWindow(x, y, width, height); } + + // called from GTK callbacks: they update the button state and call + // GTKUpdateBitmap() + void GTKMouseEnters(); + void GTKMouseLeaves(); + void GTKPressed(); + void GTKReleased(); + +protected: + virtual wxSize DoGetBestSize() const; + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + +#if wxUSE_MARKUP + virtual bool DoSetLabelMarkup(const wxString& markup); +#endif // wxUSE_MARKUP + +private: + typedef wxButtonBase base_type; + + // Return the GtkLabel used by this button. + GtkLabel *GTKGetLabel() const; + + DECLARE_DYNAMIC_CLASS(wxButton) +}; + +#endif // _WX_GTK_BUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/calctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/calctrl.h new file mode 100644 index 0000000000..3fce698ee5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/calctrl.h @@ -0,0 +1,69 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/calctrl.h +// Purpose: wxGtkCalendarCtrl control +// Author: Marcin Wojdyr +// Copyright: (C) 2008 Marcin Wojdyr +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef GTK_CALCTRL_H__ +#define GTK_CALCTRL_H__ + +class WXDLLIMPEXP_ADV wxGtkCalendarCtrl : public wxCalendarCtrlBase +{ +public: + wxGtkCalendarCtrl() {} + wxGtkCalendarCtrl(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAL_SHOW_HOLIDAYS, + const wxString& name = wxCalendarNameStr) + { + Create(parent, id, date, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAL_SHOW_HOLIDAYS, + const wxString& name = wxCalendarNameStr); + + virtual ~wxGtkCalendarCtrl() {} + + virtual bool SetDate(const wxDateTime& date); + virtual wxDateTime GetDate() const; + + virtual bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, + const wxDateTime& upperdate = wxDefaultDateTime); + virtual bool GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const; + + virtual bool EnableMonthChange(bool enable = true); + + virtual void Mark(size_t day, bool mark); + + // implementation + // -------------- + + void GTKGenerateEvent(wxEventType type); + +private: + bool IsInValidRange(const wxDateTime& dt) const; + + // Range of the dates that can be selected by user, either or both may be + // invalid to indicate that no corresponding restriction is set. + wxDateTime m_validStart, + m_validEnd; + + // Last known selected date, may be different from the real selection in + // the control while a handler for day-selected is running. + wxDateTime m_selectedDate; + + DECLARE_DYNAMIC_CLASS(wxGtkCalendarCtrl) + wxDECLARE_NO_COPY_CLASS(wxGtkCalendarCtrl); +}; + +#endif // GTK_CALCTRL_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/checkbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/checkbox.h new file mode 100644 index 0000000000..69985fc457 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/checkbox.h @@ -0,0 +1,67 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/checkbox.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKCHECKBOX_H_ +#define _WX_GTKCHECKBOX_H_ + +// ---------------------------------------------------------------------------- +// wxCheckBox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase +{ +public: + wxCheckBox(); + ~wxCheckBox(); + wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr ); + + void SetValue( bool state ); + bool GetValue() const; + + virtual void SetLabel( const wxString& label ); + virtual bool Enable( bool enable = true ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + void GTKDisableEvents(); + void GTKEnableEvents(); + +protected: + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + void DoSet3StateValue(wxCheckBoxState state); + wxCheckBoxState DoGet3StateValue() const; + +private: + typedef wxCheckBoxBase base_type; + + GtkWidget *m_widgetCheckbox; + GtkWidget *m_widgetLabel; + + DECLARE_DYNAMIC_CLASS(wxCheckBox) +}; + +#endif // _WX_GTKCHECKBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/checklst.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/checklst.h new file mode 100644 index 0000000000..3cfbd76407 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/checklst.h @@ -0,0 +1,48 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/checklst.h +// Purpose: wxCheckListBox class +// Author: Robert Roebling +// Modified by: +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKCHECKLIST_H_ +#define _WX_GTKCHECKLIST_H_ + +//----------------------------------------------------------------------------- +// wxCheckListBox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase +{ +public: + wxCheckListBox(); + wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int nStrings = 0, + const wxString *choices = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + virtual bool IsChecked(unsigned int index) const; + virtual void Check(unsigned int index, bool check = true); + + int GetItemHeight() const; + + void DoCreateCheckList(); + +private: + DECLARE_DYNAMIC_CLASS(wxCheckListBox) +}; + +#endif // _WX_GTKCHECKLIST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/chkconf.h new file mode 100644 index 0000000000..84595b256c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/chkconf.h @@ -0,0 +1,98 @@ +/* + * Name: wx/gtk/chkconf.h + * Purpose: wxGTK-specific settings consistency checks + * Author: Vadim Zeitlin + * Created: 2007-07-19 (extracted from wx/chkconf.h) + * Copyright: (c) 2000-2007 Vadim Zeitlin + * Licence: wxWindows licence + */ + +#ifndef __WXUNIVERSAL__ +# if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "MDI requires wxUSE_MENUS in wxGTK" +# else +# undef wxUSE_MENUS +# define wxUSE_MENUS 1 +# endif +# endif +#endif /* !__WXUNIVERSAL__ */ + +#if wxUSE_JOYSTICK +# if !wxUSE_THREADS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxJoystick requires threads in wxGTK" +# else +# undef wxUSE_JOYSTICK +# define wxUSE_JOYSTICK 0 +# endif +# endif +#endif /* wxUSE_JOYSTICK */ + +#if wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT +# undef wxUSE_POSTSCRIPT +# define wxUSE_POSTSCRIPT 1 +#endif + +#if wxUSE_OWNER_DRAWN +# undef wxUSE_OWNER_DRAWN +# define wxUSE_OWNER_DRAWN 0 +#endif + +#if wxUSE_METAFILE +# undef wxUSE_METAFILE +# define wxUSE_METAFILE 0 +#endif + +#if wxUSE_ENH_METAFILE +# undef wxUSE_ENH_METAFILE +# define wxUSE_ENH_METAFILE 0 +#endif + +#ifndef __UNIX__ + +# undef wxUSE_WEBVIEW +# define wxUSE_WEBVIEW 0 +# undef wxUSE_WEBVIEW_WEBKIT +# define wxUSE_WEBVIEW_WEBKIT 0 + +# undef wxUSE_MEDIACTRL +# define wxUSE_MEDIACTRL 0 + + /* + We could use GDK_WINDOWING_X11 for those but this would require + including gdk/gdk.h and we don't want to do it from here, so assume + we're not using X11 if we're not under Unix. + */ + +# undef wxUSE_UIACTIONSIMULATOR +# define wxUSE_UIACTIONSIMULATOR 0 + +# undef wxUSE_GLCANVAS +# define wxUSE_GLCANVAS 0 + +#endif /* __UNIX__ */ + +/* + We always need Cairo with wxGTK, enable it if necessary (this can only + happen under Windows). + */ +#ifdef __WINDOWS__ + +#if !wxUSE_CAIRO +# undef wxUSE_CAIRO +# define wxUSE_CAIRO 1 +#endif + +#endif /* __WINDOWS__ */ + +#ifdef __WXGTK3__ + #if !wxUSE_GRAPHICS_CONTEXT + #ifdef wxABORT_ON_CONFIG_ERROR + #error "GTK+ 3 support requires wxGraphicsContext" + #else + #undef wxUSE_GRAPHICS_CONTEXT + #define wxUSE_GRAPHICS_CONTEXT 1 + #endif + #endif +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/choice.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/choice.h new file mode 100644 index 0000000000..d952a0fa2c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/choice.h @@ -0,0 +1,118 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/choice.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_CHOICE_H_ +#define _WX_GTK_CHOICE_H_ + +class WXDLLIMPEXP_FWD_BASE wxSortedArrayString; +class WXDLLIMPEXP_FWD_BASE wxArrayString; + +//----------------------------------------------------------------------------- +// wxChoice +//----------------------------------------------------------------------------- + +class wxGtkCollatedArrayString; + +class WXDLLIMPEXP_CORE wxChoice : public wxChoiceBase +{ +public: + wxChoice() + { + Init(); + } + wxChoice( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr ) + { + Init(); + Create(parent, id, pos, size, n, choices, style, validator, name); + } + wxChoice( wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr ) + { + Init(); + Create(parent, id, pos, size, choices, style, validator, name); + } + virtual ~wxChoice(); + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr ); + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr ); + + int GetSelection() const; + void SetSelection(int n); + + virtual unsigned int GetCount() const; + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& string); + + virtual void SetColumns(int n=1); + virtual int GetColumns() const; + + virtual void GTKDisableEvents(); + virtual void GTKEnableEvents(); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + // this array is only used for controls with wxCB_SORT style, so only + // allocate it if it's needed (hence using pointer) + wxGtkCollatedArrayString *m_strings; + + // contains the client data for the items + wxArrayPtrVoid m_clientData; + + // index to GtkListStore cell which displays the item text + int m_stringCellIndex; + + virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + + // in derived classes, implement this to insert list store entry + // with all items default except text + virtual void GTKInsertComboBoxTextItem( unsigned int n, const wxString& text ); + +private: + void Init(); + + DECLARE_DYNAMIC_CLASS(wxChoice) +}; + + +#endif // _WX_GTK_CHOICE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/clipbrd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/clipbrd.h new file mode 100644 index 0000000000..28d84df815 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/clipbrd.h @@ -0,0 +1,135 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/clipbrd.h +// Purpose: wxClipboard for wxGTK +// Author: Robert Roebling, Vadim Zeitlin +// Copyright: (c) 1998 Robert Roebling +// (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_CLIPBOARD_H_ +#define _WX_GTK_CLIPBOARD_H_ + +// ---------------------------------------------------------------------------- +// wxClipboard +// ---------------------------------------------------------------------------- + +#include "wx/weakref.h" + +class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase +{ +public: + // there are several clipboards in X11 (and in GDK) + enum Kind + { + Primary, + Clipboard + }; + + wxClipboard(); + virtual ~wxClipboard(); + + // open the clipboard before SetData() and GetData() + virtual bool Open(); + + // close the clipboard after SetData() and GetData() + virtual void Close(); + + // query whether the clipboard is opened + virtual bool IsOpened() const; + + // set the clipboard data. all other formats will be deleted. + virtual bool SetData( wxDataObject *data ); + + // add to the clipboard data. + virtual bool AddData( wxDataObject *data ); + + // ask if data in correct format is available + virtual bool IsSupported( const wxDataFormat& format ); + + // ask if data in correct format is available + virtual bool IsSupportedAsync( wxEvtHandler *sink ); + + // fill data with data on the clipboard (if available) + virtual bool GetData( wxDataObject& data ); + + // clears wxTheClipboard and the system's clipboard if possible + virtual void Clear(); + + + + // implementation from now on + // -------------------------- + + // get our clipboard item (depending on m_usePrimary value) + GdkAtom GTKGetClipboardAtom() const; + + // get the data object currently being requested + wxDataObject *GTKGetDataObject( GdkAtom atom ); + + // clear the data for the given clipboard kind + void GTKClearData(Kind kind); + + // called when selection data is received + void GTKOnSelectionReceived(const GtkSelectionData& sel); + + // called when available target information is received + bool GTKOnTargetReceived(const wxDataFormat& format); + +private: + // the data object for the specific selection + wxDataObject *& Data(Kind kind) + { + return kind == Primary ? m_dataPrimary : m_dataClipboard; + } + + // the data object we're currently using + wxDataObject *& Data() + { + return Data(m_usePrimary ? Primary : Clipboard); + } + + + // set or unset selection ownership + bool SetSelectionOwner(bool set = true); + + // add atom to the list of supported targets + void AddSupportedTarget(GdkAtom atom); + + // check if the given format is supported + bool DoIsSupported(const wxDataFormat& format); + + + // both of these pointers can be non-NULL simultaneously but we only use + // one of them at any moment depending on m_usePrimary value, use Data() + // (from inside) or GTKGetDataObject() (from outside) accessors + wxDataObject *m_dataPrimary, + *m_dataClipboard; + + // this is used to temporarily hold the object passed to our GetData() so + // that GTK callbacks could access it + wxDataObject *m_receivedData; + + // used to pass information about the format we need from DoIsSupported() + // to GTKOnTargetReceived() + GdkAtom m_targetRequested; + + GtkWidget *m_clipboardWidget; // for getting and offering data + GtkWidget *m_targetsWidget; // for getting list of supported formats + + // ID of the connection to "selection_get" signal, initially 0. + unsigned long m_idSelectionGetHandler; + + bool m_open; + bool m_formatSupported; + +public: + // async stuff + wxEvtHandlerRef m_sink; +private: + GtkWidget *m_targetsWidgetAsync; // for getting list of supported formats + + DECLARE_DYNAMIC_CLASS(wxClipboard) +}; + +#endif // _WX_GTK_CLIPBOARD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/clrpicker.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/clrpicker.h new file mode 100644 index 0000000000..4a375fb849 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/clrpicker.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/clrpicker.h +// Purpose: wxColourButton header +// Author: Francesco Montorsi +// Modified by: +// Created: 14/4/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_CLRPICKER_H_ +#define _WX_GTK_CLRPICKER_H_ + +#include "wx/button.h" + +//----------------------------------------------------------------------------- +// wxColourButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxColourButton : public wxButton, + public wxColourPickerWidgetBase +{ +public: + wxColourButton() : m_topParent(NULL) {} + wxColourButton(wxWindow *parent, + wxWindowID id, + const wxColour& initial = *wxBLACK, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCLRBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxColourPickerWidgetNameStr) + : m_topParent(NULL) + { + Create(parent, id, initial, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxColour& initial = *wxBLACK, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCLRBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxColourPickerWidgetNameStr); + + virtual ~wxColourButton(); + +protected: + void UpdateColour(); + +public: // used by the GTK callback only + + void GTKSetColour(const wxColour& colour) + { m_colour = colour; } + + wxWindow *m_topParent; + +private: + DECLARE_DYNAMIC_CLASS(wxColourButton) +}; + +#endif // _WX_GTK_CLRPICKER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/collpane.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/collpane.h new file mode 100644 index 0000000000..7503b8e1b2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/collpane.h @@ -0,0 +1,79 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/collpane.h +// Purpose: wxCollapsiblePane +// Author: Francesco Montorsi +// Modified by: +// Created: 8/10/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLLAPSABLE_PANEL_H_GTK_ +#define _WX_COLLAPSABLE_PANEL_H_GTK_ + +// ---------------------------------------------------------------------------- +// wxCollapsiblePane +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCollapsiblePane : public wxCollapsiblePaneBase +{ +public: + wxCollapsiblePane() { Init(); } + + wxCollapsiblePane(wxWindow *parent, + wxWindowID winid, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCP_DEFAULT_STYLE, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxCollapsiblePaneNameStr) + { + Init(); + + Create(parent, winid, label, pos, size, style, val, name); + } + + bool Create(wxWindow *parent, + wxWindowID winid, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCP_DEFAULT_STYLE, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxCollapsiblePaneNameStr); + + virtual void Collapse(bool collapse = true); + virtual bool IsCollapsed() const; + virtual void SetLabel(const wxString& str); + + virtual wxWindow *GetPane() const { return m_pPane; } + virtual wxString GetLabel() const { return m_strLabel; } + +protected: + virtual wxSize DoGetBestSize() const; + +public: // used by GTK callbacks + bool m_bIgnoreNextChange; + wxSize m_szCollapsed; + + wxWindow *m_pPane; + + // the button label without ">>" or "<<" + wxString m_strLabel; + +private: + void Init() + { + m_bIgnoreNextChange = false; + } + + void OnSize(wxSizeEvent&); + virtual void AddChildGTK(wxWindowGTK* child); + GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + DECLARE_DYNAMIC_CLASS(wxCollapsiblePane) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_COLLAPSABLE_PANEL_H_GTK_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/colordlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/colordlg.h new file mode 100644 index 0000000000..a1fdbb75ec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/colordlg.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/colordlg.h +// Purpose: wxColourDialog +// Author: Vaclav Slavik +// Modified by: +// Created: 2004/06/04 +// Copyright: (c) Vaclav Slavik, 2004 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_COLORDLG_H_ +#define _WX_GTK_COLORDLG_H_ + +#include "wx/dialog.h" + +class WXDLLIMPEXP_CORE wxColourDialog : public wxDialog +{ +public: + wxColourDialog() {} + wxColourDialog(wxWindow *parent, + wxColourData *data = NULL); + virtual ~wxColourDialog() {} + + bool Create(wxWindow *parent, wxColourData *data = NULL); + + wxColourData &GetColourData() { return m_data; } + + virtual int ShowModal(); + +protected: + // implement some base class methods to do nothing to avoid asserts and + // GTK warnings, since this is not a real wxDialog. + virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} + virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height)) {} + + // copy data between the dialog and m_colourData: + void ColourDataToDialog(); + void DialogToColourData(); + + wxColourData m_data; + + DECLARE_DYNAMIC_CLASS(wxColourDialog) +}; + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/colour.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/colour.h new file mode 100644 index 0000000000..d48d707cbe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/colour.h @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/colour.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_COLOUR_H_ +#define _WX_GTK_COLOUR_H_ + +#ifdef __WXGTK3__ +typedef struct _GdkRGBA GdkRGBA; +#endif + +//----------------------------------------------------------------------------- +// wxColour +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxColour : public wxColourBase +{ +public: + // constructors + // ------------ + DEFINE_STD_WXCOLOUR_CONSTRUCTORS + wxColour(const GdkColor& gdkColor); +#ifdef __WXGTK3__ + wxColour(const GdkRGBA& gdkRGBA); +#endif + + virtual ~wxColour(); + + bool operator==(const wxColour& col) const; + bool operator!=(const wxColour& col) const { return !(*this == col); } + + unsigned char Red() const; + unsigned char Green() const; + unsigned char Blue() const; + unsigned char Alpha() const; + + // Implementation part +#ifdef __WXGTK3__ + operator const GdkRGBA*() const; +#else + void CalcPixel( GdkColormap *cmap ); + int GetPixel() const; +#endif + const GdkColor *GetColor() const; + +protected: + virtual void + InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); + + virtual bool FromString(const wxString& str); + + DECLARE_DYNAMIC_CLASS(wxColour) +}; + +#endif // _WX_GTK_COLOUR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/combobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/combobox.h new file mode 100644 index 0000000000..c655991e3c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/combobox.h @@ -0,0 +1,166 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/combobox.h +// Purpose: +// Author: Robert Roebling +// Created: 01/02/97 +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_COMBOBOX_H_ +#define _WX_GTK_COMBOBOX_H_ + +#include "wx/choice.h" + +typedef struct _GtkEntry GtkEntry; + +//----------------------------------------------------------------------------- +// wxComboBox +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxComboBox : public wxChoice, + public wxTextEntry +{ +public: + wxComboBox() + : wxChoice(), wxTextEntry() + { + Init(); + } + wxComboBox(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + : wxChoice(), wxTextEntry() + { + Init(); + Create(parent, id, value, pos, size, n, choices, style, validator, name); + } + + wxComboBox(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + : wxChoice(), wxTextEntry() + { + Init(); + Create(parent, id, value, pos, size, choices, style, validator, name); + } + ~wxComboBox(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + // Set/GetSelection() from wxTextEntry and wxChoice + + virtual void SetSelection(int n) { wxChoice::SetSelection(n); } + virtual void SetSelection(long from, long to) + { wxTextEntry::SetSelection(from, to); } + + virtual int GetSelection() const { return wxChoice::GetSelection(); } + virtual void GetSelection(long *from, long *to) const + { return wxTextEntry::GetSelection(from, to); } + + virtual wxString GetStringSelection() const + { + return wxItemContainer::GetStringSelection(); + } + + virtual void SetString(unsigned int n, const wxString& string); + + virtual void Popup(); + virtual void Dismiss(); + + virtual void Clear() + { + wxTextEntry::Clear(); + wxItemContainer::Clear(); + } + + // See wxComboBoxBase discussion of IsEmpty(). + bool IsListEmpty() const { return wxItemContainer::IsEmpty(); } + bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); } + + void OnChar( wxKeyEvent &event ); + + virtual void SetValue(const wxString& value); + + // Standard event handling + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + void OnDelete(wxCommandEvent& event); + void OnSelectAll(wxCommandEvent& event); + + void OnUpdateCut(wxUpdateUIEvent& event); + void OnUpdateCopy(wxUpdateUIEvent& event); + void OnUpdatePaste(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + void OnUpdateDelete(wxUpdateUIEvent& event); + void OnUpdateSelectAll(wxUpdateUIEvent& event); + + virtual void GTKDisableEvents(); + virtual void GTKEnableEvents(); + GtkWidget* GetConnectWidget(); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + // From wxWindowGTK: + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + // Widgets that use the style->base colour for the BG colour should + // override this and return true. + virtual bool UseGTKStyleBase() const { return true; } + + // Override in derived classes to create combo box widgets with + // custom list stores. + virtual void GTKCreateComboBoxWidget(); + + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + + virtual GtkEntry *GetEntry() const + { return m_entry; } + + GtkEntry* m_entry; + +private: + // From wxTextEntry: + virtual wxWindow *GetEditableWindow() { return this; } + virtual GtkEditable *GetEditable() const; + virtual void EnableTextChangedEvents(bool enable); + + void Init(); + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_GTK_COMBOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/control.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/control.h new file mode 100644 index 0000000000..454d1fc90d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/control.h @@ -0,0 +1,93 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/control.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_CONTROL_H_ +#define _WX_GTK_CONTROL_H_ + +typedef struct _GtkLabel GtkLabel; +typedef struct _GtkFrame GtkFrame; +typedef struct _GtkEntry GtkEntry; + +//----------------------------------------------------------------------------- +// wxControl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxControl : public wxControlBase +{ + typedef wxControlBase base_type; +public: + wxControl(); + wxControl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr) + { + Create(parent, id, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); + + virtual wxVisualAttributes GetDefaultAttributes() const; +#ifdef __WXGTK3__ + virtual bool SetFont(const wxFont& font); +#endif + +protected: + virtual wxSize DoGetBestSize() const; + void PostCreation(const wxSize& size); + + // sets the label to the given string and also sets it for the given widget + void GTKSetLabelForLabel(GtkLabel *w, const wxString& label); +#if wxUSE_MARKUP + void GTKSetLabelWithMarkupForLabel(GtkLabel *w, const wxString& label); +#endif // wxUSE_MARKUP + + // GtkFrame helpers + GtkWidget* GTKCreateFrame(const wxString& label); + void GTKSetLabelForFrame(GtkFrame *w, const wxString& label); + void GTKFrameApplyWidgetStyle(GtkFrame* w, GtkRcStyle* rc); + void GTKFrameSetMnemonicWidget(GtkFrame* w, GtkWidget* widget); + + // remove mnemonics ("&"s) from the label + static wxString GTKRemoveMnemonics(const wxString& label); + + // converts wx label to GTK+ label, i.e. basically replace "&"s with "_"s + static wxString GTKConvertMnemonics(const wxString &label); + + // converts wx label to GTK+ labels preserving Pango markup + static wxString GTKConvertMnemonicsWithMarkup(const wxString& label); + + // These are used by GetDefaultAttributes + static wxVisualAttributes + GetDefaultAttributesFromGTKWidget(GtkWidget* widget, + bool useBase = false, + int state = 0); + + // Widgets that use the style->base colour for the BG colour should + // override this and return true. + virtual bool UseGTKStyleBase() const { return false; } + + // Fix sensitivity due to bug in GTK+ < 2.14 + void GTKFixSensitivity(bool onlyIfUnderMouse = true); + + // Ask GTK+ for preferred size. Use it after setting the font. + wxSize GTKGetPreferredSize(GtkWidget* widget) const; + + // Inner margins in a GtkEntry + wxPoint GTKGetEntryMargins(GtkEntry* entry) const; + +private: + DECLARE_DYNAMIC_CLASS(wxControl) +}; + +#endif // _WX_GTK_CONTROL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/cursor.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/cursor.h new file mode 100644 index 0000000000..e1915efc1d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/cursor.h @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/cursor.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_CURSOR_H_ +#define _WX_GTK_CURSOR_H_ + +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +class WXDLLIMPEXP_FWD_CORE wxColour; +class WXDLLIMPEXP_FWD_CORE wxImage; + +//----------------------------------------------------------------------------- +// wxCursor +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject +{ +public: + wxCursor(); + wxCursor(wxStockCursor id) { InitFromStock(id); } +#if WXWIN_COMPATIBILITY_2_8 + wxCursor(int id) { InitFromStock((wxStockCursor)id); } +#endif +#if wxUSE_IMAGE + wxCursor( const wxImage & image ); + wxCursor(const wxString& name, + wxBitmapType type = wxCURSOR_DEFAULT_TYPE, + int hotSpotX = 0, int hotSpotY = 0); +#endif + wxCursor( const char bits[], int width, int height, + int hotSpotX = -1, int hotSpotY = -1, + const char maskBits[] = NULL, + const wxColour* fg = NULL, const wxColour* bg = NULL); + virtual ~wxCursor(); + + // implementation + + GdkCursor *GetCursor() const; + +protected: + void InitFromStock(wxStockCursor); +#if wxUSE_IMAGE + void InitFromImage(const wxImage& image); +#endif + + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxCursor) +}; + +#endif // _WX_GTK_CURSOR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataform.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataform.h new file mode 100644 index 0000000000..b7c3be71f3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataform.h @@ -0,0 +1,80 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dataform.h +// Purpose: declaration of the wxDataFormat class +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.10.99 (extracted from gtk/dataobj.h) +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_DATAFORM_H +#define _WX_GTK_DATAFORM_H + +class WXDLLIMPEXP_CORE wxDataFormat +{ +public: + // the clipboard formats under GDK are GdkAtoms + typedef GdkAtom NativeFormat; + + wxDataFormat(); + wxDataFormat( wxDataFormatId type ); + wxDataFormat( NativeFormat format ); + + // we have to provide all the overloads to allow using strings instead of + // data formats (as a lot of existing code does) + wxDataFormat( const wxString& id ) { InitFromString(id); } + wxDataFormat( const char *id ) { InitFromString(id); } + wxDataFormat( const wchar_t *id ) { InitFromString(id); } + wxDataFormat( const wxCStrData& id ) { InitFromString(id); } + + wxDataFormat& operator=(const wxDataFormat& format) + { + if (&format != this) + { + m_type = format.m_type; + m_format = format.m_format; + } + return *this; + } + wxDataFormat& operator=(NativeFormat format) + { SetId(format); return *this; } + + // comparison (must have both versions) + bool operator==(NativeFormat format) const + { return m_format == (NativeFormat)format; } + bool operator!=(NativeFormat format) const + { return m_format != (NativeFormat)format; } + bool operator==(wxDataFormatId format) const + { return m_type == (wxDataFormatId)format; } + bool operator!=(wxDataFormatId format) const + { return m_type != (wxDataFormatId)format; } + + // explicit and implicit conversions to NativeFormat which is one of + // standard data types (implicit conversion is useful for preserving the + // compatibility with old code) + NativeFormat GetFormatId() const { return m_format; } + operator NativeFormat() const { return m_format; } + + void SetId( NativeFormat format ); + + // string ids are used for custom types - this SetId() must be used for + // application-specific formats + wxString GetId() const; + void SetId( const wxString& id ); + + // implementation + wxDataFormatId GetType() const; + void SetType( wxDataFormatId type ); + +private: + // common part of ctors from format name + void InitFromString(const wxString& id); + + wxDataFormatId m_type; + NativeFormat m_format; + + void PrepareFormats(); +}; + +#endif // _WX_GTK_DATAFORM_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataobj.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataobj.h new file mode 100644 index 0000000000..859093fcb2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataobj.h @@ -0,0 +1,26 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dataobj.h +// Purpose: declaration of the wxDataObject +// Author: Robert Roebling +// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_DATAOBJ_H_ +#define _WX_GTK_DATAOBJ_H_ + +// ---------------------------------------------------------------------------- +// wxDataObject is the same as wxDataObjectBase under wxGTK +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase +{ +public: + wxDataObject(); + virtual ~wxDataObject(); + + virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const; +}; + +#endif // _WX_GTK_DATAOBJ_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataobj2.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataobj2.h new file mode 100644 index 0000000000..62f380a429 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataobj2.h @@ -0,0 +1,114 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dataobj2.h +// Purpose: declaration of standard wxDataObjectSimple-derived classes +// Author: Robert Roebling +// Created: 19.10.99 (extracted from gtk/dataobj.h) +// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_DATAOBJ2_H_ +#define _WX_GTK_DATAOBJ2_H_ + +// ---------------------------------------------------------------------------- +// wxBitmapDataObject is a specialization of wxDataObject for bitmaps +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase +{ +public: + // ctors + wxBitmapDataObject(); + wxBitmapDataObject(const wxBitmap& bitmap); + + // destr + virtual ~wxBitmapDataObject(); + + // override base class virtual to update PNG data too + virtual void SetBitmap(const wxBitmap& bitmap); + + // implement base class pure virtuals + // ---------------------------------- + + virtual size_t GetDataSize() const { return m_pngSize; } + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + // Must provide overloads to avoid hiding them (and warnings about it) + virtual size_t GetDataSize(const wxDataFormat&) const + { + return GetDataSize(); + } + virtual bool GetDataHere(const wxDataFormat&, void *buf) const + { + return GetDataHere(buf); + } + virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) + { + return SetData(len, buf); + } + +protected: + void Clear() { free(m_pngData); } + void ClearAll() { Clear(); Init(); } + + size_t m_pngSize; + void *m_pngData; + + void DoConvertToPng(); + +private: + void Init() { m_pngData = NULL; m_pngSize = 0; } +}; + +// ---------------------------------------------------------------------------- +// wxFileDataObject is a specialization of wxDataObject for file names +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDataObject : public wxFileDataObjectBase +{ +public: + // implement base class pure virtuals + // ---------------------------------- + + void AddFile( const wxString &filename ); + + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + // Must provide overloads to avoid hiding them (and warnings about it) + virtual size_t GetDataSize(const wxDataFormat&) const + { + return GetDataSize(); + } + virtual bool GetDataHere(const wxDataFormat&, void *buf) const + { + return GetDataHere(buf); + } + virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) + { + return SetData(len, buf); + } +}; + +// ---------------------------------------------------------------------------- +// wxURLDataObject is a specialization of wxDataObject for URLs +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxURLDataObject : public wxDataObjectComposite +{ +public: + wxURLDataObject(const wxString& url = wxEmptyString); + + wxString GetURL() const; + void SetURL(const wxString& url); + +private: + class wxTextURIListDataObject* const m_dobjURIList; + wxTextDataObject* const m_dobjText; + + wxDECLARE_NO_COPY_CLASS(wxURLDataObject); +}; + + +#endif // _WX_GTK_DATAOBJ2_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataview.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataview.h new file mode 100644 index 0000000000..44d2af93b2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dataview.h @@ -0,0 +1,230 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dataview.h +// Purpose: wxDataViewCtrl GTK+2 implementation header +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKDATAVIEWCTRL_H_ +#define _WX_GTKDATAVIEWCTRL_H_ + +#include "wx/list.h" + +class WXDLLIMPEXP_FWD_ADV wxDataViewCtrlInternal; + +struct _GtkTreePath; + +// --------------------------------------------------------- +// wxDataViewColumn +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewColumn: public wxDataViewColumnBase +{ +public: + wxDataViewColumn( const wxString &title, wxDataViewRenderer *renderer, + unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *renderer, + unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE ); + + + // setters: + + virtual void SetTitle( const wxString &title ); + virtual void SetBitmap( const wxBitmap &bitmap ); + + virtual void SetOwner( wxDataViewCtrl *owner ); + + virtual void SetAlignment( wxAlignment align ); + + virtual void SetSortable( bool sortable ); + virtual void SetSortOrder( bool ascending ); + + virtual void SetResizeable( bool resizable ); + virtual void SetHidden( bool hidden ); + + virtual void SetMinWidth( int minWidth ); + virtual void SetWidth( int width ); + + virtual void SetReorderable( bool reorderable ); + + virtual void SetFlags(int flags) { SetIndividualFlags(flags); } + + // getters: + + virtual wxString GetTitle() const; + virtual wxAlignment GetAlignment() const; + + virtual bool IsSortable() const; + virtual bool IsSortOrderAscending() const; + virtual bool IsSortKey() const; + + virtual bool IsResizeable() const; + virtual bool IsHidden() const; + + virtual int GetWidth() const; + virtual int GetMinWidth() const; + + virtual bool IsReorderable() const; + + virtual int GetFlags() const { return GetFromIndividualFlags(); } + + // implementation + GtkWidget* GetGtkHandle() const { return m_column; } + +private: + // holds the GTK handle + GtkWidget *m_column; + + // holds GTK handles for title/bitmap in the header + GtkWidget *m_image; + GtkWidget *m_label; + + // delayed connection to mouse events + friend class wxDataViewCtrl; + void OnInternalIdle(); + bool m_isConnected; + + void Init(wxAlignment align, int flags, int width); +}; + +WX_DECLARE_LIST_WITH_DECL(wxDataViewColumn, wxDataViewColumnList, + class WXDLLIMPEXP_ADV); + +// --------------------------------------------------------- +// wxDataViewCtrl +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewCtrl: public wxDataViewCtrlBase +{ +public: + wxDataViewCtrl() + { + Init(); + } + + wxDataViewCtrl( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDataViewCtrlNameStr ) + { + Init(); + + Create(parent, id, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDataViewCtrlNameStr); + + virtual ~wxDataViewCtrl(); + + virtual bool AssociateModel( wxDataViewModel *model ); + + virtual bool PrependColumn( wxDataViewColumn *col ); + virtual bool AppendColumn( wxDataViewColumn *col ); + virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col ); + + virtual unsigned int GetColumnCount() const; + virtual wxDataViewColumn* GetColumn( unsigned int pos ) const; + virtual bool DeleteColumn( wxDataViewColumn *column ); + virtual bool ClearColumns(); + virtual int GetColumnPosition( const wxDataViewColumn *column ) const; + + virtual wxDataViewColumn *GetSortingColumn() const; + + virtual int GetSelectedItemsCount() const; + virtual int GetSelections( wxDataViewItemArray & sel ) const; + virtual void SetSelections( const wxDataViewItemArray & sel ); + virtual void Select( const wxDataViewItem & item ); + virtual void Unselect( const wxDataViewItem & item ); + virtual bool IsSelected( const wxDataViewItem & item ) const; + virtual void SelectAll(); + virtual void UnselectAll(); + + virtual void EnsureVisible( const wxDataViewItem& item, + const wxDataViewColumn *column = NULL ); + virtual void HitTest( const wxPoint &point, + wxDataViewItem &item, + wxDataViewColumn *&column ) const; + virtual wxRect GetItemRect( const wxDataViewItem &item, + const wxDataViewColumn *column = NULL ) const; + + virtual bool SetRowHeight( int rowHeight ); + + virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column); + + virtual void Expand( const wxDataViewItem & item ); + virtual void Collapse( const wxDataViewItem & item ); + virtual bool IsExpanded( const wxDataViewItem & item ) const; + + virtual bool EnableDragSource( const wxDataFormat &format ); + virtual bool EnableDropTarget( const wxDataFormat &format ); + + virtual wxDataViewColumn *GetCurrentColumn() const; + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + wxWindow *GetMainWindow() { return (wxWindow*) this; } + + GtkWidget *GtkGetTreeView() { return m_treeview; } + wxDataViewCtrlInternal* GtkGetInternal() { return m_internal; } + + // Convert GTK path to our item. Returned item may be invalid if get_iter() + // failed. + wxDataViewItem GTKPathToItem(struct _GtkTreePath *path) const; + + virtual void OnInternalIdle(); + + int GTKGetUniformRowHeight() const { return m_uniformRowHeight; } + +protected: + virtual void DoSetExpanderColumn(); + virtual void DoSetIndent(); + + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + +private: + void Init(); + + virtual wxDataViewItem DoGetCurrentItem() const; + virtual void DoSetCurrentItem(const wxDataViewItem& item); + + // Return wxDataViewColumn matching the given GtkTreeViewColumn. + // + // If the input argument is NULL, return NULL too. Otherwise we must find + // the matching column and assert if we didn't. + wxDataViewColumn* FromGTKColumn(GtkTreeViewColumn *gtk_col) const; + + friend class wxDataViewCtrlDCImpl; + friend class wxDataViewColumn; + friend class wxDataViewCtrlInternal; + + GtkWidget *m_treeview; + wxDataViewCtrlInternal *m_internal; + wxDataViewColumnList m_cols; + wxDataViewItem m_ensureVisibleDefered; + + // By default this is set to -1 and the height of the rows is determined by + // GetRect() methods of the renderers but this can be set to a positive + // value to force the height of all rows to the given value. + int m_uniformRowHeight; + + virtual void AddChildGTK(wxWindowGTK* child); + void GtkEnableSelectionEvents(); + void GtkDisableSelectionEvents(); + + DECLARE_DYNAMIC_CLASS(wxDataViewCtrl) + wxDECLARE_NO_COPY_CLASS(wxDataViewCtrl); +}; + + +#endif // _WX_GTKDATAVIEWCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dc.h new file mode 100644 index 0000000000..7eb9dd1267 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dc.h @@ -0,0 +1,155 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dc.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKDC_H_ +#define _WX_GTKDC_H_ + +#ifdef __WXGTK3__ + +#include "wx/dcgraph.h" + +class wxGTKCairoDCImpl: public wxGCDCImpl +{ + typedef wxGCDCImpl base_type; +public: + wxGTKCairoDCImpl(wxDC* owner); + wxGTKCairoDCImpl(wxDC* owner, int); + wxGTKCairoDCImpl(wxDC* owner, wxWindow* window); + + virtual void DoDrawBitmap(const wxBitmap& bitmap, int x, int y, bool useMask); + virtual void DoDrawIcon(const wxIcon& icon, int x, int y); +#if wxUSE_IMAGE + virtual bool DoFloodFill(int x, int y, const wxColour& col, wxFloodFillStyle style); +#endif + virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const; + virtual bool DoGetPixel(int x, int y, wxColour* col) const; + virtual void DoGetSize(int* width, int* height) const; + virtual bool DoStretchBlit(int xdest, int ydest, int dstWidth, int dstHeight, wxDC* source, int xsrc, int ysrc, int srcWidth, int srcHeight, wxRasterOperationMode rop, bool useMask, int xsrcMask, int ysrcMask); + virtual void* GetCairoContext() const; + +protected: + int m_width, m_height; + + wxDECLARE_NO_COPY_CLASS(wxGTKCairoDCImpl); +}; +//----------------------------------------------------------------------------- + +class wxWindowDCImpl: public wxGTKCairoDCImpl +{ + typedef wxGTKCairoDCImpl base_type; +public: + wxWindowDCImpl(wxWindowDC* owner, wxWindow* window); + + wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl); +}; +//----------------------------------------------------------------------------- + +class wxClientDCImpl: public wxGTKCairoDCImpl +{ + typedef wxGTKCairoDCImpl base_type; +public: + wxClientDCImpl(wxClientDC* owner, wxWindow* window); + + wxDECLARE_NO_COPY_CLASS(wxClientDCImpl); +}; +//----------------------------------------------------------------------------- + +class wxPaintDCImpl: public wxGTKCairoDCImpl +{ + typedef wxGTKCairoDCImpl base_type; +public: + wxPaintDCImpl(wxPaintDC* owner, wxWindow* window); + + wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl); +}; +//----------------------------------------------------------------------------- + +class wxScreenDCImpl: public wxGTKCairoDCImpl +{ + typedef wxGTKCairoDCImpl base_type; +public: + wxScreenDCImpl(wxScreenDC* owner); + + wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl); +}; +//----------------------------------------------------------------------------- + +class wxMemoryDCImpl: public wxGTKCairoDCImpl +{ + typedef wxGTKCairoDCImpl base_type; +public: + wxMemoryDCImpl(wxMemoryDC* owner); + wxMemoryDCImpl(wxMemoryDC* owner, wxBitmap& bitmap); + wxMemoryDCImpl(wxMemoryDC* owner, wxDC* dc); + virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const; + virtual void DoSelect(const wxBitmap& bitmap); + virtual const wxBitmap& GetSelectedBitmap() const; + virtual wxBitmap& GetSelectedBitmap(); + +private: + void Setup(); + wxBitmap m_bitmap; + + wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl); +}; +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGTKCairoDC: public wxDC +{ + typedef wxDC base_type; +public: + wxGTKCairoDC(cairo_t* cr); + + wxDECLARE_NO_COPY_CLASS(wxGTKCairoDC); +}; + +#else + +#include "wx/dc.h" + +//----------------------------------------------------------------------------- +// wxDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGTKDCImpl : public wxDCImpl +{ +public: + wxGTKDCImpl( wxDC *owner ); + virtual ~wxGTKDCImpl(); + +#if wxUSE_PALETTE + void SetColourMap( const wxPalette& palette ) { SetPalette(palette); } +#endif // wxUSE_PALETTE + + // Resolution in pixels per logical inch + virtual wxSize GetPPI() const; + + virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; } + virtual void EndDoc() { } + virtual void StartPage() { } + virtual void EndPage() { } + + virtual GdkWindow* GetGDKWindow() const { return NULL; } + virtual void* GetHandle() const { return GetGDKWindow(); } + + // base class pure virtuals implemented here + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + virtual void DoGetSizeMM(int* width, int* height) const; + + DECLARE_ABSTRACT_CLASS(wxGTKDCImpl) +}; + +// this must be defined when wxDC::Blit() honours the DC origin and needed to +// allow wxUniv code in univ/winuniv.cpp to work with versions of wxGTK +// 2.3.[23] +#ifndef wxHAS_WORKING_GTK_DC_BLIT + #define wxHAS_WORKING_GTK_DC_BLIT +#endif + +#endif +#endif // _WX_GTKDC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dcclient.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dcclient.h new file mode 100644 index 0000000000..53469796a1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dcclient.h @@ -0,0 +1,161 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dcclient.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKDCCLIENT_H_ +#define _WX_GTKDCCLIENT_H_ + +#include "wx/gtk/dc.h" + +//----------------------------------------------------------------------------- +// wxWindowDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxGTKDCImpl +{ +public: + wxWindowDCImpl( wxDC *owner ); + wxWindowDCImpl( wxDC *owner, wxWindow *win ); + + virtual ~wxWindowDCImpl(); + + virtual bool CanDrawBitmap() const { return true; } + virtual bool CanGetTextExtent() const { return true; } + + virtual void DoGetSize(int *width, int *height) const; + virtual bool DoFloodFill( wxCoord x, wxCoord y, const wxColour& col, + wxFloodFillStyle style=wxFLOOD_SURFACE ); + virtual bool DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const; + + virtual void DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 ); + virtual void DoCrossHair( wxCoord x, wxCoord y ); + virtual void DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc ); + virtual void DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord height, + double sa, double ea ); + virtual void DoDrawPoint( wxCoord x, wxCoord y ); + + virtual void DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset); + virtual void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + + virtual void DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); + virtual void DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0 ); + virtual void DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); + + virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ); + virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y, + bool useMask = false ); + + virtual bool DoBlit( wxCoord xdest, wxCoord ydest, + wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode logical_func = wxCOPY, + bool useMask = false, + wxCoord xsrcMask = -1, wxCoord ysrcMask = -1 ); + + virtual void DoDrawText( const wxString &text, wxCoord x, wxCoord y ); + virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, + double angle); + virtual void DoGetTextExtent( const wxString &string, + wxCoord *width, wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; + virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const; + virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); + virtual void DoSetDeviceClippingRegion( const wxRegion ®ion ); + + virtual wxCoord GetCharWidth() const; + virtual wxCoord GetCharHeight() const; + + virtual void Clear(); + + virtual void SetFont( const wxFont &font ); + virtual void SetPen( const wxPen &pen ); + virtual void SetBrush( const wxBrush &brush ); + virtual void SetBackground( const wxBrush &brush ); + virtual void SetLogicalFunction( wxRasterOperationMode function ); + virtual void SetTextForeground( const wxColour &col ); + virtual void SetTextBackground( const wxColour &col ); + virtual void SetBackgroundMode( int mode ); + virtual void SetPalette( const wxPalette& palette ); + + virtual void DestroyClippingRegion(); + + // Resolution in pixels per logical inch + virtual wxSize GetPPI() const; + virtual int GetDepth() const; + + // overrriden here for RTL + virtual void SetDeviceOrigin( wxCoord x, wxCoord y ); + virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp ); + +// protected: + // implementation + // -------------- + + GdkWindow *m_gdkwindow; + GdkGC *m_penGC; + GdkGC *m_brushGC; + GdkGC *m_textGC; + GdkGC *m_bgGC; + GdkColormap *m_cmap; + bool m_isScreenDC; + wxRegion m_currentClippingRegion; + wxRegion m_paintClippingRegion; + + // PangoContext stuff for GTK 2.0 + PangoContext *m_context; + PangoLayout *m_layout; + PangoFontDescription *m_fontdesc; + + void SetUpDC( bool ismem = false ); + void Destroy(); + + virtual void ComputeScaleAndOrigin(); + + virtual GdkWindow *GetGDKWindow() const { return m_gdkwindow; } + +private: + void DrawingSetup(GdkGC*& gc, bool& originChanged); + GdkPixmap* MonoToColor(GdkPixmap* monoPixmap, int x, int y, int w, int h) const; + + DECLARE_ABSTRACT_CLASS(wxWindowDCImpl) +}; + +//----------------------------------------------------------------------------- +// wxClientDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl +{ +public: + wxClientDCImpl( wxDC *owner ); + wxClientDCImpl( wxDC *owner, wxWindow *win ); + + virtual void DoGetSize(int *width, int *height) const; + + DECLARE_ABSTRACT_CLASS(wxClientDCImpl) +}; + +//----------------------------------------------------------------------------- +// wxPaintDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl +{ +public: + wxPaintDCImpl( wxDC *owner ); + wxPaintDCImpl( wxDC *owner, wxWindow *win ); + + DECLARE_ABSTRACT_CLASS(wxPaintDCImpl) +}; + +#endif // _WX_GTKDCCLIENT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dcmemory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dcmemory.h new file mode 100644 index 0000000000..8afb45c52e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dcmemory.h @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dcmemory.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_DCMEMORY_H_ +#define _WX_GTK_DCMEMORY_H_ + +#include "wx/dcmemory.h" +#include "wx/gtk/dcclient.h" + +//----------------------------------------------------------------------------- +// wxMemoryDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl +{ +public: + wxMemoryDCImpl( wxMemoryDC *owner ); + wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ); + wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); + + virtual ~wxMemoryDCImpl(); + + // these get reimplemented for mono-bitmaps to behave + // more like their Win32 couterparts. They now interpret + // wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0 + // and everything else as drawing 1. + virtual void SetPen( const wxPen &pen ); + virtual void SetBrush( const wxBrush &brush ); + virtual void SetBackground( const wxBrush &brush ); + virtual void SetTextForeground( const wxColour &col ); + virtual void SetTextBackground( const wxColour &col ); + + // overridden from wxDCImpl + virtual void DoGetSize( int *width, int *height ) const; + virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const; + virtual void* GetHandle() const; + + // overridden for wxMemoryDC Impl + virtual void DoSelect(const wxBitmap& bitmap); + + virtual const wxBitmap& GetSelectedBitmap() const; + virtual wxBitmap& GetSelectedBitmap(); + +private: + wxBitmap m_selected; + + void Init(); + + DECLARE_ABSTRACT_CLASS(wxMemoryDCImpl) +}; + +#endif + // _WX_GTK_DCMEMORY_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dcscreen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dcscreen.h new file mode 100644 index 0000000000..c91926b910 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dcscreen.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dcscreen.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKDCSCREEN_H_ +#define _WX_GTKDCSCREEN_H_ + +#include "wx/dcscreen.h" +#include "wx/gtk/dcclient.h" + +//----------------------------------------------------------------------------- +// wxScreenDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxWindowDCImpl +{ +public: + wxScreenDCImpl( wxScreenDC *owner ); + ~wxScreenDCImpl(); + + virtual void DoGetSize(int *width, int *height) const; + +private: + void Init(); + + DECLARE_ABSTRACT_CLASS(wxScreenDCImpl) +}; + +#endif // _WX_GTKDCSCREEN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dialog.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dialog.h new file mode 100644 index 0000000000..fcd7cd3db8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dialog.h @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dialog.h +// Purpose: +// Author: Robert Roebling +// Created: +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKDIALOG_H_ +#define _WX_GTKDIALOG_H_ + +class WXDLLIMPEXP_FWD_CORE wxGUIEventLoop; + +//----------------------------------------------------------------------------- +// wxDialog +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDialog: public wxDialogBase +{ +public: + wxDialog() { Init(); } + wxDialog( wxWindow *parent, wxWindowID id, + const wxString &title, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString &name = wxDialogNameStr ); + bool Create( wxWindow *parent, wxWindowID id, + const wxString &title, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString &name = wxDialogNameStr ); + virtual ~wxDialog(); + + virtual bool Show( bool show = true ); + virtual int ShowModal(); + virtual void EndModal( int retCode ); + virtual bool IsModal() const; + +private: + // common part of all ctors + void Init(); + + bool m_modalShowing; + wxGUIEventLoop *m_modalLoop; + + DECLARE_DYNAMIC_CLASS(wxDialog) +}; + +#endif // _WX_GTKDIALOG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dirdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dirdlg.h new file mode 100644 index 0000000000..8a05d55796 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dirdlg.h @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dirdlg.h +// Purpose: wxDirDialog +// Author: Francesco Montorsi +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKDIRDLGH__ +#define __GTKDIRDLGH__ + +//------------------------------------------------------------------------- +// wxDirDialog +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase +{ +public: + wxDirDialog() { } + + wxDirDialog(wxWindow *parent, + const wxString& message = wxDirSelectorPromptStr, + const wxString& defaultPath = wxEmptyString, + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& name = wxDirDialogNameStr); + bool Create(wxWindow *parent, + const wxString& message = wxDirSelectorPromptStr, + const wxString& defaultPath = wxEmptyString, + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& name = wxDirDialogNameStr); + virtual ~wxDirDialog() { } + + +public: // overrides from wxGenericDirDialog + + wxString GetPath() const; + void SetPath(const wxString& path); + + + // Implementation only. + + void GTKOnAccept(); + void GTKOnCancel(); + +protected: + // override this from wxTLW since the native + // form doesn't have any m_wxwindow + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + +private: + wxString m_selectedDirectory; + + DECLARE_DYNAMIC_CLASS(wxDirDialog) +}; + +#endif // __GTKDIRDLGH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dnd.h new file mode 100644 index 0000000000..0aea7b41f6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dnd.h @@ -0,0 +1,124 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dnd.h +// Purpose: declaration of the wxDropTarget class +// Author: Robert Roebling +// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_DND_H_ +#define _WX_GTK_DND_H_ + +#include "wx/icon.h" + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// this macro may be used instead for wxDropSource ctor arguments: it will use +// the icon 'name' from an XPM file under GTK, but will expand to something +// else under MSW. If you don't use it, you will have to use #ifdef in the +// application code. +#define wxDROP_ICON(name) wxICON(name) + +//------------------------------------------------------------------------- +// wxDropTarget +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropTarget: public wxDropTargetBase +{ +public: + wxDropTarget(wxDataObject *dataObject = NULL ); + + virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); + virtual bool OnDrop(wxCoord x, wxCoord y); + virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def); + virtual bool GetData(); + + // Can only be called during OnXXX methods. + wxDataFormat GetMatchingPair(); + + // implementation + + GdkAtom GTKGetMatchingPair(bool quiet = false); + wxDragResult GTKFigureOutSuggestedAction(); + + void GtkRegisterWidget( GtkWidget *widget ); + void GtkUnregisterWidget( GtkWidget *widget ); + + GdkDragContext *m_dragContext; + GtkWidget *m_dragWidget; + GtkSelectionData *m_dragData; + unsigned m_dragTime; + bool m_firstMotion; // gdk has no "gdk_drag_enter" event + + void GTKSetDragContext( GdkDragContext *dc ) { m_dragContext = dc; } + void GTKSetDragWidget( GtkWidget *w ) { m_dragWidget = w; } + void GTKSetDragData( GtkSelectionData *sd ) { m_dragData = sd; } + void GTKSetDragTime(unsigned time) { m_dragTime = time; } +}; + +//------------------------------------------------------------------------- +// wxDropSource +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase +{ +public: + // constructor. set data later with SetData() + wxDropSource( wxWindow *win = NULL, + const wxIcon © = wxNullIcon, + const wxIcon &move = wxNullIcon, + const wxIcon &none = wxNullIcon); + + // constructor for setting one data object + wxDropSource( wxDataObject& data, + wxWindow *win, + const wxIcon © = wxNullIcon, + const wxIcon &move = wxNullIcon, + const wxIcon &none = wxNullIcon); + + virtual ~wxDropSource(); + + // set the icon corresponding to given drag result + void SetIcon(wxDragResult res, const wxIcon& icon) + { + if ( res == wxDragCopy ) + m_iconCopy = icon; + else if ( res == wxDragMove ) + m_iconMove = icon; + else + m_iconNone = icon; + } + + // start drag action + virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); + + void PrepareIcon( int action, GdkDragContext *context ); + + GtkWidget *m_widget; + GtkWidget *m_iconWindow; + GdkDragContext *m_dragContext; + wxWindow *m_window; + + wxDragResult m_retValue; + wxIcon m_iconCopy, + m_iconMove, + m_iconNone; + + bool m_waiting; + +private: + // common part of both ctors + void SetIcons(const wxIcon& copy, + const wxIcon& move, + const wxIcon& none); + + // GTK implementation + void GTKConnectDragSignals(); + void GTKDisconnectDragSignals(); + +}; + +#endif // _WX_GTK_DND_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dvrenderer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dvrenderer.h new file mode 100644 index 0000000000..dfaba5609a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dvrenderer.h @@ -0,0 +1,104 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dvrenderer.h +// Purpose: wxDataViewRenderer for GTK wxDataViewCtrl implementation +// Author: Robert Roebling, Vadim Zeitlin +// Created: 2009-11-07 (extracted from wx/gtk/dataview.h) +// Copyright: (c) 2006 Robert Roebling +// (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_DVRENDERER_H_ +#define _WX_GTK_DVRENDERER_H_ + +typedef struct _GtkCellRendererText GtkCellRendererText; +typedef struct _GtkTreeViewColumn GtkTreeViewColumn; + +// ---------------------------------------------------------------------------- +// wxDataViewRenderer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewRenderer: public wxDataViewRendererBase +{ +public: + wxDataViewRenderer( const wxString &varianttype, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + + virtual void SetMode( wxDataViewCellMode mode ); + virtual wxDataViewCellMode GetMode() const; + + virtual void SetAlignment( int align ); + virtual int GetAlignment() const; + + virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE); + virtual wxEllipsizeMode GetEllipsizeMode() const; + + // GTK-specific implementation + // --------------------------- + + // pack the GTK cell renderers used by this renderer to the given column + // + // by default only a single m_renderer is used but some renderers use more + // than one GTK cell renderer + virtual void GtkPackIntoColumn(GtkTreeViewColumn *column); + + // called when the cell value was edited by user with the new value + // + // it validates the new value and notifies the model about the change by + // calling GtkOnCellChanged() if it was accepted + virtual void GtkOnTextEdited(const char *itempath, const wxString& value); + + GtkCellRenderer* GetGtkHandle() { return m_renderer; } + void GtkInitHandlers(); + void GtkUpdateAlignment() { GtkApplyAlignment(m_renderer); } + + // should be overridden to return true if the renderer supports properties + // corresponding to wxDataViewItemAttr field, see wxGtkTreeCellDataFunc() + // for details + virtual bool GtkSupportsAttrs() const { return false; } + + // if GtkSupportsAttrs() returns true, this function will be called to + // effectively set the attribute to use for rendering the next item + // + // it should return true if the attribute had any non-default properties + virtual bool GtkSetAttr(const wxDataViewItemAttr& WXUNUSED(attr)) + { return false; } + + + // these functions are only called if GtkSupportsAttrs() returns true and + // are used to remember whether the renderer currently uses the default + // attributes or if we changed (and not reset them) + bool GtkIsUsingDefaultAttrs() const { return m_usingDefaultAttrs; } + void GtkSetUsingDefaultAttrs(bool def) { m_usingDefaultAttrs = def; } + + // return the text renderer used by this renderer for setting text cell + // specific attributes: can return NULL if this renderer doesn't render any + // text + virtual GtkCellRendererText *GtkGetTextRenderer() const { return NULL; } + + wxDataViewCellMode GtkGetMode() { return m_mode; } + +protected: + virtual void GtkOnCellChanged(const wxVariant& value, + const wxDataViewItem& item, + unsigned col); + + // Apply our effective alignment (i.e. m_alignment if specified or the + // associated column alignment by default) to the given renderer. + void GtkApplyAlignment(GtkCellRenderer *renderer); + + GtkCellRenderer *m_renderer; + int m_alignment; + wxDataViewCellMode m_mode; + + // true if we hadn't changed any visual attributes or restored them since + // doing this + bool m_usingDefaultAttrs; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer) +}; + +#endif // _WX_GTK_DVRENDERER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dvrenderers.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dvrenderers.h new file mode 100644 index 0000000000..385fa73a0b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/dvrenderers.h @@ -0,0 +1,274 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/dvrenderers.h +// Purpose: All GTK wxDataViewCtrl renderer classes +// Author: Robert Roebling, Vadim Zeitlin +// Created: 2009-11-07 (extracted from wx/gtk/dataview.h) +// Copyright: (c) 2006 Robert Roebling +// (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_DVRENDERERS_H_ +#define _WX_GTK_DVRENDERERS_H_ + +#ifdef __WXGTK3__ + typedef struct _cairo_rectangle_int cairo_rectangle_int_t; + typedef cairo_rectangle_int_t GdkRectangle; +#else + typedef struct _GdkRectangle GdkRectangle; +#endif + +// --------------------------------------------------------- +// wxDataViewTextRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewTextRenderer: public wxDataViewRenderer +{ +public: + wxDataViewTextRenderer( const wxString &varianttype = "string", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + + virtual bool SetValue( const wxVariant &value ) + { + return SetTextValue(value); + } + + virtual bool GetValue( wxVariant &value ) const + { + wxString str; + if ( !GetTextValue(str) ) + return false; + + value = str; + + return true; + } + + virtual void SetAlignment( int align ); + + virtual bool GtkSupportsAttrs() const { return true; } + virtual bool GtkSetAttr(const wxDataViewItemAttr& attr); + + virtual GtkCellRendererText *GtkGetTextRenderer() const; + +protected: + // implementation of Set/GetValue() + bool SetTextValue(const wxString& str); + bool GetTextValue(wxString& str) const; + + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewBitmapRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewBitmapRenderer: public wxDataViewRenderer +{ +public: + wxDataViewBitmapRenderer( const wxString &varianttype = "wxBitmap", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + + bool SetValue( const wxVariant &value ); + bool GetValue( wxVariant &value ) const; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewBitmapRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewToggleRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewToggleRenderer: public wxDataViewRenderer +{ +public: + wxDataViewToggleRenderer( const wxString &varianttype = "bool", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + + bool SetValue( const wxVariant &value ); + bool GetValue( wxVariant &value ) const; + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewCustomRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewCustomRenderer: public wxDataViewCustomRendererBase +{ +public: + wxDataViewCustomRenderer( const wxString &varianttype = "string", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT, + bool no_init = false ); + virtual ~wxDataViewCustomRenderer(); + + + // Create DC on request + virtual wxDC *GetDC(); + + // override the base class function to use GTK text cell renderer + virtual void RenderText(const wxString& text, + int xoffset, + wxRect cell, + wxDC *dc, + int state); + + struct GTKRenderParams; + + // store GTK render call parameters for possible later use + void GTKSetRenderParams(GTKRenderParams* renderParams) + { + m_renderParams = renderParams; + } + + // we may or not support attributes, as we don't know it, return true to + // make it possible to use them + virtual bool GtkSupportsAttrs() const { return true; } + + virtual bool GtkSetAttr(const wxDataViewItemAttr& attr) + { + SetAttr(attr); + return !attr.IsDefault(); + } + + virtual GtkCellRendererText *GtkGetTextRenderer() const; + +private: + bool Init(wxDataViewCellMode mode, int align); + + // Called from GtkGetTextRenderer() to really create the renderer if + // necessary. + void GtkInitTextRenderer(); + + wxDC *m_dc; + + GtkCellRendererText *m_text_renderer; + + // parameters of the original render() call stored so that we could pass + // them forward to m_text_renderer if our RenderText() is called + GTKRenderParams* m_renderParams; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewProgressRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewProgressRenderer: public wxDataViewCustomRenderer +{ +public: + wxDataViewProgressRenderer( const wxString &label = wxEmptyString, + const wxString &varianttype = "long", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + virtual ~wxDataViewProgressRenderer(); + + bool SetValue( const wxVariant &value ); + bool GetValue( wxVariant &value ) const; + + virtual bool Render( wxRect cell, wxDC *dc, int state ); + virtual wxSize GetSize() const; + +private: + void GTKSetLabel(); + + wxString m_label; + int m_value; + +#if !wxUSE_UNICODE + // Flag used to indicate that we need to set the label because we were + // unable to do it in the ctor (see comments there). + bool m_needsToSetLabel; +#endif // !wxUSE_UNICODE + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewIconTextRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewIconTextRenderer: public wxDataViewTextRenderer +{ +public: + wxDataViewIconTextRenderer( const wxString &varianttype = "wxDataViewIconText", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT ); + virtual ~wxDataViewIconTextRenderer(); + + bool SetValue( const wxVariant &value ); + bool GetValue( wxVariant &value ) const; + + virtual void GtkPackIntoColumn(GtkTreeViewColumn *column); + +protected: + virtual void GtkOnCellChanged(const wxVariant& value, + const wxDataViewItem& item, + unsigned col); + +private: + wxDataViewIconText m_value; + + // we use the base class m_renderer for the text and this one for the icon + GtkCellRenderer *m_rendererIcon; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer) +}; + +// ------------------------------------- +// wxDataViewChoiceRenderer +// ------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewChoiceRenderer: public wxDataViewCustomRenderer +{ +public: + wxDataViewChoiceRenderer(const wxArrayString &choices, + wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, + int alignment = wxDVR_DEFAULT_ALIGNMENT ); + virtual bool Render( wxRect rect, wxDC *dc, int state ); + virtual wxSize GetSize() const; + virtual bool SetValue( const wxVariant &value ); + virtual bool GetValue( wxVariant &value ) const; + + void SetAlignment( int align ); + + wxString GetChoice(size_t index) const { return m_choices[index]; } + const wxArrayString& GetChoices() const { return m_choices; } + +private: + wxArrayString m_choices; + wxString m_data; +}; + +// ---------------------------------------------------------------------------- +// wxDataViewChoiceByIndexRenderer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewChoiceByIndexRenderer: public wxDataViewChoiceRenderer +{ +public: + wxDataViewChoiceByIndexRenderer( const wxArrayString &choices, + wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, + int alignment = wxDVR_DEFAULT_ALIGNMENT ); + + virtual bool SetValue( const wxVariant &value ); + virtual bool GetValue( wxVariant &value ) const; + +private: + virtual void GtkOnTextEdited(const char *itempath, const wxString& str); +}; + + + +#endif // _WX_GTK_DVRENDERERS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/evtloop.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/evtloop.h new file mode 100644 index 0000000000..ba8db406d5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/evtloop.h @@ -0,0 +1,47 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/evtloop.h +// Purpose: wxGTK event loop implementation +// Author: Vadim Zeitlin +// Created: 2008-12-27 +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_EVTLOOP_H_ +#define _WX_GTK_EVTLOOP_H_ + +// ---------------------------------------------------------------------------- +// wxGUIEventLoop for wxGTK +// ---------------------------------------------------------------------------- + +typedef union _GdkEvent GdkEvent; + +class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopBase +{ +public: + wxGUIEventLoop(); + + virtual void ScheduleExit(int rc = 0); + virtual bool Pending() const; + virtual bool Dispatch(); + virtual int DispatchTimeout(unsigned long timeout); + virtual void WakeUp(); + virtual bool YieldFor(long eventsToProcess); + + void StoreGdkEventForLaterProcessing(GdkEvent* ev) + { m_arrGdkEvents.Add(ev); } + +protected: + virtual int DoRun(); + +private: + // the exit code of this event loop + int m_exitcode; + + // used to temporarily store events in DoYield() + wxArrayPtrVoid m_arrGdkEvents; + + wxDECLARE_NO_COPY_CLASS(wxGUIEventLoop); +}; + +#endif // _WX_GTK_EVTLOOP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/evtloopsrc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/evtloopsrc.h new file mode 100644 index 0000000000..f80523424d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/evtloopsrc.h @@ -0,0 +1,39 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/evtloopsrc.h +// Purpose: wxGTKEventLoopSource class +// Author: Vadim Zeitlin +// Created: 2009-10-21 +// Copyright: (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_EVTLOOPSRC_H_ +#define _WX_GTK_EVTLOOPSRC_H_ + +// ---------------------------------------------------------------------------- +// wxGTKEventLoopSource: wxEventLoopSource for GTK port +// ---------------------------------------------------------------------------- + +class wxGTKEventLoopSource : public wxEventLoopSource +{ +public: + // sourceId is the id of the watch in GTK context, not the FD of the file + // this source corresponds to + wxGTKEventLoopSource(unsigned sourceId, + wxEventLoopSourceHandler *handler, + int flags) + : wxEventLoopSource(handler, flags), + m_sourceId(sourceId) + { + } + + virtual ~wxGTKEventLoopSource(); + +private: + const unsigned m_sourceId; + + wxDECLARE_NO_COPY_CLASS(wxGTKEventLoopSource); +}; + +#endif // _WX_GTK_EVTLOOPSRC_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filectrl.h new file mode 100644 index 0000000000..3de17e3af8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filectrl.h @@ -0,0 +1,144 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/filectrl.h +// Purpose: wxGtkFileCtrl Header +// Author: Diaa M. Sami +// Modified by: +// Created: Aug-10-2007 +// Copyright: (c) Diaa M. Sami +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + + +#ifndef _WX_GTK_FILECTRL_H_ +#define _WX_GTK_FILECTRL_H_ + +#include "wx/control.h" +#include "wx/filectrl.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxFileSelectorDefaultWildcardStr[]; + +typedef struct _GtkFileChooser GtkFileChooser; + +// [GTK] current problems: +// All methods(e.g. SetFilename(), SetPath(), etc) which change the state of +// the control result in events fired, such events should be suppressed. +// ------ +// Sometimes a selection event(with 0 files) is fired before +// wxEVT_FILECTRL_FOLDERCHANGED, unfortunately this can hardly be detected! + +// A wx wrapper for any Gtk object implementing the interface GtkFileChooser + +class WXDLLIMPEXP_CORE wxGtkFileChooser +{ +public: + wxGtkFileChooser() { m_ignoreNextFilterEvent = false; } + + void SetWidget(GtkFileChooser *w); + + wxString GetPath() const; + void GetPaths( wxArrayString& paths ) const; + wxString GetDirectory() const; + wxString GetFilename() const; + void GetFilenames( wxArrayString& files ) const; + int GetFilterIndex() const; + + bool SetPath( const wxString& path ); + bool SetDirectory( const wxString& dir ); + void SetWildcard( const wxString& wildCard ); + void SetFilterIndex( int filterIndex ); + + bool HasFilterChoice() const; + + bool ShouldIgnoreNextFilterEvent() const { return m_ignoreNextFilterEvent; } + + wxString GetCurrentWildCard() const + { return m_wildcards[GetFilterIndex()]; } + +private: + GtkFileChooser *m_widget; + // First wildcard in filter, to be used when the user + // saves a file without giving an extension. + wxArrayString m_wildcards; + + // If true, ignore the next event because it was generated by us and not + // the user. + bool m_ignoreNextFilterEvent; +}; + +#if wxUSE_FILECTRL + +class WXDLLIMPEXP_CORE wxGtkFileCtrl: public wxControl, + public wxFileCtrlBase +{ +public: + wxGtkFileCtrl () { Init(); } + + wxGtkFileCtrl ( wxWindow *parent, + wxWindowID id, + const wxString& defaultDirectory = wxEmptyString, + const wxString& defaultFilename = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFC_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& name = wxFileCtrlNameStr ) + { + Init(); + Create( parent, id, defaultDirectory, defaultFilename, wildCard, style, pos, size, name ); + } + + virtual ~wxGtkFileCtrl(); + + bool Create( wxWindow *parent, + wxWindowID id, + const wxString& defaultDirectory = wxEmptyString, + const wxString& defaultFileName = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFC_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& name = wxFileCtrlNameStr ); + + virtual void SetWildcard( const wxString& wildCard ); + virtual void SetFilterIndex( int filterIndex ); + virtual bool SetDirectory( const wxString& dir ); + virtual bool SetFilename( const wxString& name ); + virtual bool SetPath( const wxString& path ); + + virtual wxString GetFilename() const; + virtual wxString GetDirectory() const; + virtual wxString GetWildcard() const { return this->m_wildCard; } + virtual wxString GetPath() const; + virtual void GetPaths( wxArrayString& paths ) const; + virtual void GetFilenames( wxArrayString& files ) const; + virtual int GetFilterIndex() const { return m_fc.GetFilterIndex(); } + + virtual bool HasMultipleFileSelection() const { return HasFlag( wxFC_MULTIPLE ); } + virtual void ShowHidden(bool show); + + virtual bool HasFilterChoice() const + { return m_fc.HasFilterChoice(); } + + + // Implementation only from now on. + bool GTKShouldIgnoreNextFilterEvent() const + { return m_fc.ShouldIgnoreNextFilterEvent(); } + + bool m_checkNextSelEvent; + bool m_ignoreNextFolderChangeEvent; + +protected: + GtkFileChooser *m_fcWidget; + wxGtkFileChooser m_fc; + wxString m_wildCard; + +private: + void Init(); + + DECLARE_DYNAMIC_CLASS( wxGtkFileCtrl ) +}; + +#endif // wxUSE_FILECTRL + +#endif // _WX_GTK_FILECTRL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filedlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filedlg.h new file mode 100644 index 0000000000..377734db79 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filedlg.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/filedlg.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKFILEDLG_H_ +#define _WX_GTKFILEDLG_H_ + +#include "wx/gtk/filectrl.h" // for wxGtkFileChooser + +//------------------------------------------------------------------------- +// wxFileDialog +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase +{ +public: + wxFileDialog() { } + + wxFileDialog(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr); + bool Create(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr); + virtual ~wxFileDialog(); + + virtual wxString GetPath() const; + virtual void GetPaths(wxArrayString& paths) const; + virtual wxString GetFilename() const; + virtual void GetFilenames(wxArrayString& files) const; + virtual int GetFilterIndex() const; + + virtual void SetMessage(const wxString& message); + virtual void SetPath(const wxString& path); + virtual void SetDirectory(const wxString& dir); + virtual void SetFilename(const wxString& name); + virtual void SetWildcard(const wxString& wildCard); + virtual void SetFilterIndex(int filterIndex); + + virtual int ShowModal(); + + virtual bool SupportsExtraControl() const { return true; } + + // Implementation only. + void GTKSelectionChanged(const wxString& filename); + + +protected: + // override this from wxTLW since the native + // form doesn't have any m_wxwindow + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + +private: + void OnFakeOk( wxCommandEvent &event ); + void OnSize(wxSizeEvent&); + virtual void AddChildGTK(wxWindowGTK* child); + + wxGtkFileChooser m_fc; + + DECLARE_DYNAMIC_CLASS(wxFileDialog) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_GTKFILEDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filehistory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filehistory.h new file mode 100644 index 0000000000..70a93d6f5e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filehistory.h @@ -0,0 +1,24 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/filehistory.h +// Purpose: GTK+ bits for wxFileHistory +// Author: Vaclav Slavik +// Created: 2010-05-06 +// Copyright: (c) 2010 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_FILEHISTORY_H_ +#define _WX_GTK_FILEHISTORY_H_ + +class WXDLLIMPEXP_CORE wxFileHistory : public wxFileHistoryBase +{ +public: + wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1) + : wxFileHistoryBase(maxFiles, idBase) {} + + virtual void AddFileToHistory(const wxString& file); + + DECLARE_DYNAMIC_CLASS(wxFileHistory) +}; + +#endif // _WX_GTK_FILEHISTORY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filepicker.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filepicker.h new file mode 100644 index 0000000000..27e1fdc779 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/filepicker.h @@ -0,0 +1,192 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/filedirpicker.h +// Purpose: wxFileButton, wxDirButton header +// Author: Francesco Montorsi +// Modified by: +// Created: 14/4/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_FILEPICKER_H_ +#define _WX_GTK_FILEPICKER_H_ + +// since GtkColorButton is available only for GTK+ >= 2.4, +// we need to use generic versions if we detect (at runtime) +// that GTK+ < 2.4 +#include "wx/generic/filepickerg.h" + +//----------------------------------------------------------------------------- +// wxFileButton and wxDirButton shared code +// (cannot be a base class since they need to derive from wxGenericFileButton +// and from wxGenericDirButton classes !) +//----------------------------------------------------------------------------- + +#define FILEDIRBTN_OVERRIDES \ + /* NULL is because of a problem with destruction order which happens */ \ + /* if we pass GetParent(): in fact, this GTK native implementation */ \ + /* needs to create the dialog in ::Create() and not for each user */ \ + /* request in response to the user click as the generic implementation */ \ + /* does. */ \ + virtual wxWindow *GetDialogParent() \ + { \ + return NULL; \ + } \ + \ + /* even if wx derive from wxGenericFileButton, i.e. from wxButton, our */ \ + /* native GTK+ widget does not derive from GtkButton thus *all* uses */ \ + /* GTK_BUTTON(m_widget) macro done by wxButton must be bypassed to */ \ + /* avoid bunch of GTK+ warnings like: */ \ + /* invalid cast from `GtkFileChooserButton' to `GtkButton' */ \ + /* so, override wxButton::GTKGetWindow and return NULL as GTK+ doesn't */ \ + /* give us access to the internal GdkWindow of a GtkFileChooserButton */ \ +protected: \ + virtual GdkWindow * \ + GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const \ + { return NULL; } + + +//----------------------------------------------------------------------------- +// wxFileButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileButton : public wxGenericFileButton +{ +public: + wxFileButton() { Init(); } + wxFileButton(wxWindow *parent, + wxWindowID id, + const wxString& label = wxFilePickerWidgetLabel, + const wxString &path = wxEmptyString, + const wxString &message = wxFileSelectorPromptStr, + const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxFILEBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFilePickerWidgetNameStr) + { + Init(); + m_pickerStyle = style; + Create(parent, id, label, path, message, wildcard, + pos, size, style, validator, name); + } + + virtual ~wxFileButton(); + + +public: // overrides + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label = wxFilePickerWidgetLabel, + const wxString &path = wxEmptyString, + const wxString &message = wxFileSelectorPromptStr, + const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFilePickerWidgetNameStr); + + // event handler for the click + void OnDialogOK(wxCommandEvent &); + + virtual void SetPath(const wxString &str); + virtual void SetInitialDirectory(const wxString& dir); + + // see macro defined above + FILEDIRBTN_OVERRIDES + +protected: + wxDialog *m_dialog; + +private: + // common part of all ctors + void Init() { m_dialog = NULL; } + + DECLARE_DYNAMIC_CLASS(wxFileButton) +}; + + +//----------------------------------------------------------------------------- +// wxDirButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDirButton : public wxGenericDirButton +{ +public: + wxDirButton() { Init(); } + wxDirButton(wxWindow *parent, + wxWindowID id, + const wxString& label = wxFilePickerWidgetLabel, + const wxString &path = wxEmptyString, + const wxString &message = wxFileSelectorPromptStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDIRBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFilePickerWidgetNameStr) + { + Init(); + + m_pickerStyle = style; + + Create(parent, id, label, path, message, wxEmptyString, + pos, size, style, validator, name); + } + + virtual ~wxDirButton(); + + +public: // overrides + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label = wxFilePickerWidgetLabel, + const wxString &path = wxEmptyString, + const wxString &message = wxFileSelectorPromptStr, + const wxString &wildcard = wxFileSelectorDefaultWildcardStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFilePickerWidgetNameStr); + + + // GtkFileChooserButton does not support GTK_FILE_CHOOSER_CREATE_FOLDER + // thus we must ensure that the wxDD_DIR_MUST_EXIST style was given + long GetDialogStyle() const + { + return (wxGenericDirButton::GetDialogStyle() | wxDD_DIR_MUST_EXIST); + } + + virtual void SetPath(const wxString &str); + virtual void SetInitialDirectory(const wxString& dir); + + // see macro defined above + FILEDIRBTN_OVERRIDES + +protected: + wxDialog *m_dialog; + +public: // used by the GTK callback only + + bool m_bIgnoreNextChange; + + void GTKUpdatePath(const char *gtkpath); + +private: + void Init() + { + m_dialog = NULL; + m_bIgnoreNextChange = false; + } + + DECLARE_DYNAMIC_CLASS(wxDirButton) +}; + +#undef FILEDIRBTN_OVERRIDES + +#endif // _WX_GTK_FILEPICKER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/font.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/font.h new file mode 100644 index 0000000000..a218a29dfe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/font.h @@ -0,0 +1,127 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/font.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_FONT_H_ +#define _WX_GTK_FONT_H_ + +// ---------------------------------------------------------------------------- +// wxFont +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFont : public wxFontBase +{ +public: + wxFont() { } + + wxFont(const wxFontInfo& info); + + wxFont(const wxString& nativeFontInfoString) + { + Create(nativeFontInfoString); + } + + wxFont(const wxNativeFontInfo& info); + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxFont(int size, + int family, + int style, + int weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding); + } +#endif + + wxFont(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(size, family, style, weight, underlined, face, encoding); + } + + wxFont(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(10, family, style, weight, underlined, face, encoding); + SetPixelSize(pixelSize); + } + + bool Create(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + + // wxGTK-specific + bool Create(const wxString& fontname); + + virtual ~wxFont(); + + // implement base class pure virtuals + virtual int GetPointSize() const; + virtual wxFontStyle GetStyle() const; + virtual wxFontWeight GetWeight() const; + virtual wxString GetFaceName() const; + virtual bool GetUnderlined() const; + virtual bool GetStrikethrough() const; + virtual wxFontEncoding GetEncoding() const; + virtual const wxNativeFontInfo *GetNativeFontInfo() const; + virtual bool IsFixedWidth() const; + + virtual void SetPointSize( int pointSize ); + virtual void SetFamily(wxFontFamily family); + virtual void SetStyle(wxFontStyle style); + virtual void SetWeight(wxFontWeight weight); + virtual bool SetFaceName( const wxString& faceName ); + virtual void SetUnderlined( bool underlined ); + virtual void SetStrikethrough(bool strikethrough); + virtual void SetEncoding(wxFontEncoding encoding); + + wxDECLARE_COMMON_FONT_METHODS(); + + // Set Pango attributes in the specified layout. Currently only + // underlined and strike-through attributes are handled by this function. + // + // If neither of them is specified, returns false, otherwise sets up the + // attributes and returns true. + bool GTKSetPangoAttrs(PangoLayout* layout) const; + + // implementation from now on + void Unshare(); + + // no data :-) + +protected: + virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info ); + + virtual wxGDIRefData* CreateGDIRefData() const; + virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const; + + virtual wxFontFamily DoGetFamily() const; + +private: + void Init(); + + DECLARE_DYNAMIC_CLASS(wxFont) +}; + +#endif // _WX_GTK_FONT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/fontdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/fontdlg.h new file mode 100644 index 0000000000..4c5b57a3e3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/fontdlg.h @@ -0,0 +1,46 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/fontdlg.h +// Purpose: wxFontDialog +// Author: Robert Roebling +// Created: +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_FONTDLG_H_ +#define _WX_GTK_FONTDLG_H_ + +//----------------------------------------------------------------------------- +// wxFontDialog +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFontDialog : public wxFontDialogBase +{ +public: + wxFontDialog() : wxFontDialogBase() { /* must be Create()d later */ } + wxFontDialog(wxWindow *parent) + : wxFontDialogBase(parent) { Create(parent); } + wxFontDialog(wxWindow *parent, const wxFontData& data) + : wxFontDialogBase(parent, data) { Create(parent, data); } + + virtual ~wxFontDialog(); + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated interface, don't use + wxDEPRECATED( wxFontDialog(wxWindow *parent, const wxFontData *data) ); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + // create the GTK dialog + virtual bool DoCreate(wxWindow *parent); + + DECLARE_DYNAMIC_CLASS(wxFontDialog) +}; + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated interface, don't use +inline wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData *data) + : wxFontDialogBase(parent) { InitFontData(data); Create(parent); } +#endif // WXWIN_COMPATIBILITY_2_6 + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/fontpicker.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/fontpicker.h new file mode 100644 index 0000000000..65bb5c9593 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/fontpicker.h @@ -0,0 +1,62 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/fontpicker.h +// Purpose: wxFontButton header +// Author: Francesco Montorsi +// Modified by: +// Created: 14/4/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_FONTPICKER_H_ +#define _WX_GTK_FONTPICKER_H_ + +#include "wx/button.h" + +//----------------------------------------------------------------------------- +// wxFontButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFontButton : public wxButton, + public wxFontPickerWidgetBase +{ +public: + wxFontButton() {} + wxFontButton(wxWindow *parent, + wxWindowID id, + const wxFont& initial = wxNullFont, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxFONTBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFontPickerWidgetNameStr) + { + Create(parent, id, initial, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxFont& initial = wxNullFont, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxFONTBTN_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxFontPickerWidgetNameStr); + + virtual ~wxFontButton(); + +protected: + void UpdateFont(); + + +public: // used by the GTK callback only + + void SetNativeFontInfo(const char *gtkdescription) + { m_selectedFont.SetNativeFontInfo(wxString::FromAscii(gtkdescription)); } + +private: + DECLARE_DYNAMIC_CLASS(wxFontButton) +}; + +#endif // _WX_GTK_FONTPICKER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/frame.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/frame.h new file mode 100644 index 0000000000..1f172c43c1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/frame.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/frame.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_FRAME_H_ +#define _WX_GTK_FRAME_H_ + +//----------------------------------------------------------------------------- +// wxFrame +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase +{ +public: + // construction + wxFrame() { Init(); } + wxFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxFrame(); + +#if wxUSE_STATUSBAR + void SetStatusBar(wxStatusBar *statbar); +#endif // wxUSE_STATUSBAR + +#if wxUSE_TOOLBAR + void SetToolBar(wxToolBar *toolbar); +#endif // wxUSE_TOOLBAR + + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); + wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); } + +#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 + // in Hildon environment all frames are always shown maximized + virtual bool IsMaximized() const { return true; } +#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 + + // implementation from now on + // -------------------------- + + virtual bool SendIdleEvents(wxIdleEvent& event); + +protected: + // override wxWindow methods to take into account tool/menu/statusbars + virtual void DoGetClientSize( int *width, int *height ) const; + +#if wxUSE_MENUS_NATIVE + virtual void DetachMenuBar(); + virtual void AttachMenuBar(wxMenuBar *menubar); +#endif // wxUSE_MENUS_NATIVE + +private: + void Init(); + + long m_fsSaveFlag; + + DECLARE_DYNAMIC_CLASS(wxFrame) +}; + +#endif // _WX_GTK_FRAME_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/gauge.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/gauge.h new file mode 100644 index 0000000000..8df47461e5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/gauge.h @@ -0,0 +1,85 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/gauge.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_GAUGE_H_ +#define _WX_GTK_GAUGE_H_ + +//----------------------------------------------------------------------------- +// wxGauge +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGauge: public wxControl +{ +public: + wxGauge() { Init(); } + + wxGauge( wxWindow *parent, + wxWindowID id, + int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr ) + { + Init(); + + Create(parent, id, range, pos, size, style, validator, name); + } + + bool Create( wxWindow *parent, + wxWindowID id, int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr ); + + void SetShadowWidth( int WXUNUSED(w) ) { } + void SetBezelFace( int WXUNUSED(w) ) { } + int GetShadowWidth() const { return 0; } + int GetBezelFace() const { return 0; } + + // determinate mode API + void SetRange( int r ); + void SetValue( int pos ); + + int GetRange() const; + int GetValue() const; + + // indeterminate mode API + virtual void Pulse(); + + bool IsVertical() const { return HasFlag(wxGA_VERTICAL); } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + virtual wxVisualAttributes GetDefaultAttributes() const; + + // implementation + // ------------- + + // the max and current gauge values + int m_rangeMax, + m_gaugePos; + +protected: + // set the gauge value to the value of m_gaugePos + void DoSetGauge(); + + virtual wxSize DoGetBestSize() const; + +private: + void Init() { m_rangeMax = m_gaugePos = 0; } + + DECLARE_DYNAMIC_CLASS(wxGauge) +}; + +#endif + // _WX_GTK_GAUGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/glcanvas.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/glcanvas.h new file mode 100644 index 0000000000..01591149b5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/glcanvas.h @@ -0,0 +1,111 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/glcanvas.h +// Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK +// Author: Robert Roebling +// Modified by: +// Created: 17/8/98 +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GLCANVAS_H_ +#define _WX_GLCANVAS_H_ + +#include "wx/unix/glx11.h" + +//--------------------------------------------------------------------------- +// wxGLCanvas +//--------------------------------------------------------------------------- + +class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasX11 +{ +public: + wxGLCanvas(wxWindow *parent, + wxWindowID id = wxID_ANY, + const int *attribList = NULL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const wxPalette& palette = wxNullPalette); + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette); + + virtual bool SetBackgroundStyle(wxBackgroundStyle style); + + // implement wxGLCanvasX11 methods + // -------------------------------- + + virtual Window GetXWindow() const; + + + // deprecated methods + // ------------------ + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( + wxGLCanvas(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); + + wxDEPRECATED( + wxGLCanvas(wxWindow *parent, + const wxGLContext *shared, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); + + wxDEPRECATED( + wxGLCanvas(wxWindow *parent, + const wxGLCanvas *shared, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); + + // called from "realized" callback to create the implicit context if needed + void GTKInitImplicitContext(); +#endif // WXWIN_COMPATIBILITY_2_8 + + // implementation from now on + void OnInternalIdle(); + + bool m_exposed; +#ifdef __WXGTK3__ + cairo_t* m_cairoPaintContext; +#endif + +#if WXWIN_COMPATIBILITY_2_8 + wxGLContext *m_sharedContext; + wxGLCanvas *m_sharedContextOf; + const bool m_createImplicitContext; +#endif // WXWIN_COMPATIBILITY_2_8 + +private: + DECLARE_CLASS(wxGLCanvas) +}; + +#endif // _WX_GLCANVAS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/gnome/gvfs.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/gnome/gvfs.h new file mode 100644 index 0000000000..559f14f569 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/gnome/gvfs.h @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/gnome/gvfs.h +// Author: Robert Roebling +// Purpose: GNOME VFS support +// Created: 17/03/06 +// Copyright: Robert Roebling +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_GVFS_H_ +#define _WX_GTK_GVFS_H_ + +#include "wx/defs.h" + +#if wxUSE_MIMETYPE && wxUSE_LIBGNOMEVFS + +#include "wx/string.h" +#include "wx/unix/mimetype.h" + +//---------------------------------------------------------------------------- +// wxGnomeVFSMimeTypesManagerImpl +//---------------------------------------------------------------------------- + +class wxGnomeVFSMimeTypesManagerImpl: public wxMimeTypesManagerImpl +{ +public: + wxGnomeVFSMimeTypesManagerImpl() { } + +protected: + virtual bool DoAssociation(const wxString& strType, + const wxString& strIcon, + wxMimeTypeCommands *entry, + const wxArrayString& strExtensions, + const wxString& strDesc); +}; + +//---------------------------------------------------------------------------- +// wxGnomeVFSMimeTypesManagerFactory +//---------------------------------------------------------------------------- + +class wxGnomeVFSMimeTypesManagerFactory: public wxMimeTypesManagerFactory +{ +public: + wxGnomeVFSMimeTypesManagerFactory() {} + + virtual wxMimeTypesManagerImpl *CreateMimeTypesManagerImpl(); +}; + +#endif + // wxUSE_MIMETYPE + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/hildon/notifmsg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/hildon/notifmsg.h new file mode 100644 index 0000000000..ade115fe8a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/hildon/notifmsg.h @@ -0,0 +1,58 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/hildon/notifmsg.h +// Purpose: Hildon implementation of wxNotificationMessage +// Author: Vadim Zeitlin +// Created: 2007-11-21 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_HILDON_NOTIFMSG_H_ +#define _WX_GTK_HILDON_NOTIFMSG_H_ + +typedef struct _HildonBanner HildonBanner; + +// ---------------------------------------------------------------------------- +// wxNotificationMessage +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxNotificationMessage : public wxNotificationMessageBase +{ +public: + wxNotificationMessage() { Init(); } + wxNotificationMessage(const wxString& title, + const wxString& message = wxString(), + wxWindow *parent = NULL) + : wxNotificationMessageBase(title, message, parent) + { + Init(); + } + + virtual ~wxNotificationMessage(); + + + virtual bool Show(int timeout = Timeout_Auto); + virtual bool Close(); + +private: + void Init() { m_banner = NULL; } + + // return the string containing markup for both the title and, if + // specified, the message + wxString HildonGetMarkup() const; + + // returns the widget of the parent GtkWindow to use or NULL + GtkWidget *HildonGetWindow() const; + + + // the banner we're showing, only non-NULL if it's an animation or progress + // banner as the informational dialog times out on its own and we don't + // need to store it (nor do we have any way to get its widget anyhow) + GtkWidget *m_banner; + + + wxDECLARE_NO_COPY_CLASS(wxNotificationMessage); +}; + +#endif // _WX_GTK_HILDON_NOTIFMSG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/hyperlink.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/hyperlink.h new file mode 100644 index 0000000000..0b6ce6bf9a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/hyperlink.h @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/hyperlink.h +// Purpose: Hyperlink control +// Author: Francesco Montorsi +// Modified by: +// Created: 14/2/2007 +// Copyright: (c) 2007 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKHYPERLINKCTRL_H_ +#define _WX_GTKHYPERLINKCTRL_H_ + +#include "wx/generic/hyperlink.h" + +// ---------------------------------------------------------------------------- +// wxHyperlinkCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxHyperlinkCtrl : public wxGenericHyperlinkCtrl +{ +public: + // Default constructor (for two-step construction). + wxHyperlinkCtrl() { } + + // Constructor. + wxHyperlinkCtrl(wxWindow *parent, + wxWindowID id, + const wxString& label, const wxString& url, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHL_DEFAULT_STYLE, + const wxString& name = wxHyperlinkCtrlNameStr) + { + (void)Create(parent, id, label, url, pos, size, style, name); + } + + // Creation function (for two-step construction). + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, const wxString& url, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHL_DEFAULT_STYLE, + const wxString& name = wxHyperlinkCtrlNameStr); + + + // get/set + virtual wxColour GetHoverColour() const; + virtual void SetHoverColour(const wxColour &colour); + + virtual wxColour GetNormalColour() const; + virtual void SetNormalColour(const wxColour &colour); + + virtual wxColour GetVisitedColour() const; + virtual void SetVisitedColour(const wxColour &colour); + + virtual wxString GetURL() const; + virtual void SetURL(const wxString &url); + + virtual void SetLabel(const wxString &label); + +protected: + virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetBestClientSize() const; + + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + DECLARE_DYNAMIC_CLASS(wxHyperlinkCtrl) +}; + +#endif // _WX_GTKHYPERLINKCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/infobar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/infobar.h new file mode 100644 index 0000000000..45563eb275 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/infobar.h @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/infobar.h +// Purpose: native implementation of wxInfoBar for GTK+ 2.18 and later +// Author: Vadim Zeitlin +// Created: 2009-09-26 +// Copyright: (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_INFOBAR_H_ +#define _WX_GTK_INFOBAR_H_ + +#include "wx/generic/infobar.h" + +// ---------------------------------------------------------------------------- +// wxInfoBar for GTK+ +// ---------------------------------------------------------------------------- + +// notice that the native GTK+ implementation is only available since +// (relatively recent) 2.18 so we inherit from the generic one to be able to +// fall back to it if GTK+ version is determined to be too old during run-time +class WXDLLIMPEXP_CORE wxInfoBar : public wxInfoBarGeneric +{ +public: + wxInfoBar() { Init(); } + + wxInfoBar(wxWindow *parent, wxWindowID winid = wxID_ANY) + { + Init(); + Create(parent, winid); + } + + bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY); + + virtual ~wxInfoBar(); + + // implement base class methods + // ---------------------------- + + virtual void ShowMessage(const wxString& msg, + int flags = wxICON_INFORMATION); + + virtual void Dismiss(); + + virtual void AddButton(wxWindowID btnid, + const wxString& label = wxString()); + + virtual void RemoveButton(wxWindowID btnid); + + // implementation only + // ------------------- + + void GTKResponse(int btnid); + +protected: + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + +private: + void Init() { m_impl = NULL; } + + // add a button with the given id/label and return its widget + GtkWidget *GTKAddButton(wxWindowID btnid, + const wxString& label = wxString()); + + + // only used when the native implementation is really being used + class wxInfoBarGTKImpl *m_impl; + + wxDECLARE_NO_COPY_CLASS(wxInfoBar); +}; + +#endif // _WX_GTK_INFOBAR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/listbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/listbox.h new file mode 100644 index 0000000000..c40bda6a27 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/listbox.h @@ -0,0 +1,135 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/listbox.h +// Purpose: wxListBox class declaration +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_LISTBOX_H_ +#define _WX_GTK_LISTBOX_H_ + +struct _wxTreeEntry; +struct _GtkTreeIter; + +//----------------------------------------------------------------------------- +// wxListBox +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase +{ +public: + // ctors and such + wxListBox() + { + Init(); + } + wxListBox( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr ) + { + Init(); + Create(parent, id, pos, size, n, choices, style, validator, name); + } + wxListBox( wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr ) + { + Init(); + Create(parent, id, pos, size, choices, style, validator, name); + } + virtual ~wxListBox(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + virtual int FindString(const wxString& s, bool bCase = false) const; + + virtual bool IsSelected(int n) const; + virtual int GetSelection() const; + virtual int GetSelections(wxArrayInt& aSelections) const; + + virtual void EnsureVisible(int n); + + virtual void Update(); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation from now on + + virtual GtkWidget *GetConnectWidget(); + + struct _GtkTreeView *m_treeview; + struct _GtkListStore *m_liststore; + +#if wxUSE_CHECKLISTBOX + bool m_hasCheckBoxes; +#endif // wxUSE_CHECKLISTBOX + + struct _wxTreeEntry* GTKGetEntry(unsigned pos) const; + + void GTKDisableEvents(); + void GTKEnableEvents(); + + void GTKOnSelectionChanged(); + void GTKOnActivated(int item); + +protected: + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + virtual wxSize DoGetBestSize() const; + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + virtual void DoSetSelection(int n, bool select); + + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + virtual int DoInsertOneItem(const wxString& item, unsigned int pos); + + virtual void DoSetFirstItem(int n); + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + virtual int DoListHitTest(const wxPoint& point) const; + + // get the iterator for the given index, returns false if invalid + bool GTKGetIteratorFor(unsigned pos, _GtkTreeIter *iter) const; + + // get the index for the given iterator, return wxNOT_FOUND on failure + int GTKGetIndexFor(_GtkTreeIter& iter) const; + + // common part of DoSetFirstItem() and EnsureVisible() + void DoScrollToCell(int n, float alignY, float alignX); + +private: + void Init(); //common construction + + DECLARE_DYNAMIC_CLASS(wxListBox) +}; + +#endif // _WX_GTK_LISTBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/mdi.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/mdi.h new file mode 100644 index 0000000000..02a61eb899 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/mdi.h @@ -0,0 +1,153 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/mdi.h +// Purpose: TDI-based MDI implementation for wxGTK +// Author: Robert Roebling +// Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes +// Copyright: (c) 1998 Robert Roebling +// (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_MDI_H_ +#define _WX_GTK_MDI_H_ + +#include "wx/frame.h" + +class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame; +class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow; + +typedef struct _GtkNotebook GtkNotebook; + +//----------------------------------------------------------------------------- +// wxMDIParentFrame +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIParentFrame : public wxMDIParentFrameBase +{ +public: + wxMDIParentFrame() { Init(); } + wxMDIParentFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr); + + // we don't store the active child in m_currentChild unlike the base class + // version so override this method to find it dynamically + virtual wxMDIChildFrame *GetActiveChild() const; + + // implement base class pure virtuals + // ---------------------------------- + + virtual void ActivateNext(); + virtual void ActivatePrevious(); + + static bool IsTDI() { return true; } + + // implementation + + bool m_justInserted; + + virtual void OnInternalIdle(); + +protected: + virtual void DoGetClientSize(int* width, int* height) const; + +private: + friend class wxMDIChildFrame; + void Init(); + + DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) +}; + +//----------------------------------------------------------------------------- +// wxMDIChildFrame +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIChildFrame : public wxTDIChildFrame +{ +public: + wxMDIChildFrame() { Init(); } + wxMDIChildFrame(wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxMDIChildFrame(); + + virtual void SetMenuBar( wxMenuBar *menu_bar ); + virtual wxMenuBar *GetMenuBar() const; + + virtual void Activate(); + + virtual void SetTitle(const wxString& title); + + // implementation + + void OnActivate( wxActivateEvent& event ); + void OnMenuHighlight( wxMenuEvent& event ); + virtual void GTKHandleRealized(); + + wxMenuBar *m_menuBar; + bool m_justInserted; + +private: + void Init(); + + GtkNotebook *GTKGetNotebook() const; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) +}; + +//----------------------------------------------------------------------------- +// wxMDIClientWindow +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIClientWindow : public wxMDIClientWindowBase +{ +public: + wxMDIClientWindow() { } + ~wxMDIClientWindow(); + + virtual bool CreateClient(wxMDIParentFrame *parent, + long style = wxVSCROLL | wxHSCROLL); + +private: + virtual void AddChildGTK(wxWindowGTK* child); + + DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) +}; + +#endif // _WX_GTK_MDI_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/menu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/menu.h new file mode 100644 index 0000000000..fec12ba977 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/menu.h @@ -0,0 +1,110 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/menu.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKMENU_H_ +#define _WX_GTKMENU_H_ + +//----------------------------------------------------------------------------- +// wxMenuBar +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase +{ +public: + // ctors + wxMenuBar(); + wxMenuBar(long style); + wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); + ~wxMenuBar(); + + // implement base class (pure) virtuals + virtual bool Append( wxMenu *menu, const wxString &title ); + virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Remove(size_t pos); + + virtual int FindMenuItem(const wxString& menuString, + const wxString& itemString) const; + virtual wxMenuItem* FindItem( int id, wxMenu **menu = NULL ) const; + + virtual void EnableTop( size_t pos, bool flag ); + virtual bool IsEnabledTop(size_t pos) const; + virtual void SetMenuLabel( size_t pos, const wxString& label ); + virtual wxString GetMenuLabel( size_t pos ) const; + + void SetLayoutDirection(wxLayoutDirection dir); + wxLayoutDirection GetLayoutDirection() const; + + virtual void Attach(wxFrame *frame); + virtual void Detach(); + +private: + // common part of Append and Insert + void GtkAppend(wxMenu* menu, const wxString& title, int pos = -1); + + void Init(size_t n, wxMenu *menus[], const wxString titles[], long style); + + // wxMenuBar is not a top level window but it still doesn't need a parent + // window + virtual bool GTKNeedsParent() const { return false; } + + GtkWidget* m_menubar; + + DECLARE_DYNAMIC_CLASS(wxMenuBar) +}; + +//----------------------------------------------------------------------------- +// wxMenu +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase +{ +public: + // ctors & dtor + wxMenu(const wxString& title, long style = 0) + : wxMenuBase(title, style) { Init(); } + + wxMenu(long style = 0) : wxMenuBase(style) { Init(); } + + virtual ~wxMenu(); + + void Attach(wxMenuBarBase *menubar); + + void SetLayoutDirection(const wxLayoutDirection dir); + wxLayoutDirection GetLayoutDirection() const; + + // Returns the title, with mnemonics translated to wx format + wxString GetTitle() const; + + // Sets the title, with mnemonics translated to gtk format + virtual void SetTitle(const wxString& title); + + // implementation GTK only + GtkWidget *m_menu; // GtkMenu + GtkWidget *m_owner; + GtkAccelGroup *m_accel; + bool m_popupShown; + +protected: + virtual wxMenuItem* DoAppend(wxMenuItem *item); + virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); + virtual wxMenuItem* DoRemove(wxMenuItem *item); + +private: + // common code for all constructors: + void Init(); + + // common part of Append (if pos == -1) and Insert + void GtkAppend(wxMenuItem* item, int pos = -1); + + + DECLARE_DYNAMIC_CLASS(wxMenu) +}; + +#endif + // _WX_GTKMENU_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/menuitem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/menuitem.h new file mode 100644 index 0000000000..c17ad03a97 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/menuitem.h @@ -0,0 +1,61 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/menuitem.h +// Purpose: wxMenuItem class +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKMENUITEM_H_ +#define _WX_GTKMENUITEM_H_ + +#include "wx/bitmap.h" + +//----------------------------------------------------------------------------- +// wxMenuItem +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase +{ +public: + wxMenuItem(wxMenu *parentMenu = NULL, + int id = wxID_SEPARATOR, + const wxString& text = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL, + wxMenu *subMenu = NULL); + virtual ~wxMenuItem(); + + // implement base class virtuals + virtual void SetItemLabel( const wxString& str ); + virtual void Enable( bool enable = true ); + virtual void Check( bool check = true ); + virtual bool IsChecked() const; + virtual void SetBitmap(const wxBitmap& bitmap); + virtual const wxBitmap& GetBitmap() const { return m_bitmap; } + + // implementation + void SetMenuItem(GtkWidget *menuItem); + GtkWidget *GetMenuItem() const { return m_menuItem; } + void SetGtkLabel(); + +#if WXWIN_COMPATIBILITY_2_8 + // compatibility only, don't use in new code + wxDEPRECATED_CONSTRUCTOR( + wxMenuItem(wxMenu *parentMenu, + int id, + const wxString& text, + const wxString& help, + bool isCheckable, + wxMenu *subMenu = NULL) + ); +#endif + +private: + wxBitmap m_bitmap; // Bitmap for menuitem, if any + GtkWidget *m_menuItem; // GtkMenuItem + + DECLARE_DYNAMIC_CLASS(wxMenuItem) +}; + +#endif // _WX_GTKMENUITEM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/minifram.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/minifram.h new file mode 100644 index 0000000000..748f266a9a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/minifram.h @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/minifram.h +// Purpose: wxMiniFrame class +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_MINIFRAME_H_ +#define _WX_GTK_MINIFRAME_H_ + +#include "wx/bitmap.h" +#include "wx/frame.h" + +//----------------------------------------------------------------------------- +// wxMiniFrame +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMiniFrame: public wxFrame +{ + DECLARE_DYNAMIC_CLASS(wxMiniFrame) + +public: + wxMiniFrame() {} + wxMiniFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAPTION | wxRESIZE_BORDER, + const wxString& name = wxFrameNameStr) + { + Create(parent, id, title, pos, size, style, name); + } + ~wxMiniFrame(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAPTION | wxRESIZE_BORDER, + const wxString& name = wxFrameNameStr); + + virtual void SetTitle( const wxString &title ); + +protected: + virtual void DoSetSizeHints( int minW, int minH, + int maxW, int maxH, + int incW, int incH ); + virtual void DoGetClientSize(int* width, int* height) const; + + // implementation +public: + bool m_isDragging; + int m_oldX,m_oldY; + int m_diffX,m_diffY; + wxBitmap m_closeButton; + int m_miniEdge; + int m_miniTitle; +}; + +#endif // _WX_GTK_MINIFRAME_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/msgdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/msgdlg.h new file mode 100644 index 0000000000..670d7f9782 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/msgdlg.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/msgdlg.h +// Purpose: wxMessageDialog for GTK+2 +// Author: Vaclav Slavik +// Modified by: +// Created: 2003/02/28 +// Copyright: (c) Vaclav Slavik, 2003 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_MSGDLG_H_ +#define _WX_GTK_MSGDLG_H_ + +class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase +{ +public: + wxMessageDialog(wxWindow *parent, const wxString& message, + const wxString& caption = wxMessageBoxCaptionStr, + long style = wxOK|wxCENTRE, + const wxPoint& pos = wxDefaultPosition); + + virtual int ShowModal(); + virtual bool Show(bool WXUNUSED(show) = true) { return false; } + +protected: + // implement some base class methods to do nothing to avoid asserts and + // GTK warnings, since this is not a real wxDialog. + virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} + virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height)) {} + // override to convert wx mnemonics to GTK+ ones and handle stock ids + virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label); + +private: + // override to use stock GTK+ defaults instead of just string ones + virtual wxString GetDefaultYesLabel() const; + virtual wxString GetDefaultNoLabel() const; + virtual wxString GetDefaultOKLabel() const; + virtual wxString GetDefaultCancelLabel() const; + virtual wxString GetDefaultHelpLabel() const; + + // create the real GTK+ dialog: this is done from ShowModal() to allow + // changing the message between constructing the dialog and showing it + void GTKCreateMsgDialog(); + + DECLARE_DYNAMIC_CLASS(wxMessageDialog) +}; + +#endif // _WX_GTK_MSGDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/nonownedwnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/nonownedwnd.h new file mode 100644 index 0000000000..70e853c1ce --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/nonownedwnd.h @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/nonownedwnd.h +// Purpose: wxGTK-specific wxNonOwnedWindow declaration. +// Author: Vadim Zeitlin +// Created: 2011-10-12 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_NONOWNEDWND_H_ +#define _WX_GTK_NONOWNEDWND_H_ + +class wxNonOwnedWindowShapeImpl; + +// ---------------------------------------------------------------------------- +// wxNonOwnedWindow contains code common to wx{Popup,TopLevel}Window in wxGTK. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase +{ +public: + wxNonOwnedWindow() { m_shapeImpl = NULL; } + virtual ~wxNonOwnedWindow(); + + // Overridden to actually set the shape when the window becomes realized. + virtual void GTKHandleRealized(); + +protected: + virtual bool DoClearShape(); + virtual bool DoSetRegionShape(const wxRegion& region); +#if wxUSE_GRAPHICS_CONTEXT + virtual bool DoSetPathShape(const wxGraphicsPath& path); +#endif // wxUSE_GRAPHICS_CONTEXT + + +private: + // If non-NULL, contains information about custom window shape. + wxNonOwnedWindowShapeImpl* m_shapeImpl; + + wxDECLARE_NO_COPY_CLASS(wxNonOwnedWindow); +}; + +#endif // _WX_GTK_NONOWNEDWND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/notebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/notebook.h new file mode 100644 index 0000000000..6edbb84fb1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/notebook.h @@ -0,0 +1,144 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/notebook.h +// Purpose: wxNotebook class +// Author: Robert Roebling +// Modified by: +// Copyright: (c) Julian Smart and Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKNOTEBOOK_H_ +#define _WX_GTKNOTEBOOK_H_ + +//----------------------------------------------------------------------------- +// internal class +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxGtkNotebookPage; + +#include "wx/list.h" +WX_DECLARE_LIST(wxGtkNotebookPage, wxGtkNotebookPagesList); + +//----------------------------------------------------------------------------- +// wxNotebook +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase +{ +public: + // default for dynamic class + wxNotebook(); + // the same arguments as for wxControl + wxNotebook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr); + // Create() function + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr); + // dtor + virtual ~wxNotebook(); + + // accessors + // --------- + + // set the currently selected page, return the index of the previously + // selected one (or wxNOT_FOUND on error) + // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events + int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); } + // get the currently selected page + int GetSelection() const; + + // changes selected page without sending events + int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); } + + // set/get the title of a page + bool SetPageText(size_t nPage, const wxString& strText); + wxString GetPageText(size_t nPage) const; + + // sets/returns item's image index in the current image list + int GetPageImage(size_t nPage) const; + bool SetPageImage(size_t nPage, int nImage); + + // control the appearance of the notebook pages + // set the padding between tabs (in pixels) + void SetPadding(const wxSize& padding); + // sets the size of the tabs (assumes all tabs are the same size) + void SetTabSize(const wxSize& sz); + + // geometry + virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; + virtual int HitTest(const wxPoint& pt, long *flags = NULL) const; + + // operations + // ---------- + // remove all pages + bool DeleteAllPages(); + + // adds a new page to the notebook (it will be deleted by the notebook, + // don't delete it yourself). If bSelect, this page becomes active. + // the same as AddPage(), but adds it at the specified position + bool InsertPage( size_t position, + wxNotebookPage *win, + const wxString& strText, + bool bSelect = false, + int imageId = NO_IMAGE ); + + // handler for tab navigation + // -------------------------- + void OnNavigationKey(wxNavigationKeyEvent& event); + + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + // -------------- + +#if wxUSE_CONSTRAINTS + void SetConstraintSizes(bool recurse); + bool DoPhase(int phase); +#endif + + // Called by GTK event handler when the current page is definitely changed. + void GTKOnPageChanged(); + + // helper function + wxGtkNotebookPage* GetNotebookPage(int page) const; + + // the additional page data (the pages themselves are in m_pages array) + wxGtkNotebookPagesList m_pagesData; + + // we need to store the old selection since there + // is no other way to know about it at the time + // of the change selection event + int m_oldSelection; + +protected: + // set all page's attributes + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + // remove one page from the notebook but do not destroy it + virtual wxNotebookPage *DoRemovePage(size_t nPage); + + int DoSetSelection(size_t nPage, int flags = 0); + +private: + // the padding set by SetPadding() + int m_padding; + + void Init(); + virtual void AddChildGTK(wxWindowGTK* child); + + DECLARE_DYNAMIC_CLASS(wxNotebook) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_GTKNOTEBOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/notifmsg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/notifmsg.h new file mode 100644 index 0000000000..9135b3aee8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/notifmsg.h @@ -0,0 +1,51 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/notifmsg.h +// Purpose: wxNotificationMessage for wxGTK. +// Author: Vadim Zeitlin +// Created: 2012-07-25 +// Copyright: (c) 2012 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_NOTIFMSG_H_ +#define _WX_GTK_NOTIFMSG_H_ + +typedef struct _NotifyNotification NotifyNotification; + +// ---------------------------------------------------------------------------- +// wxNotificationMessage +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxNotificationMessage : public wxNotificationMessageBase +{ +public: + wxNotificationMessage() { Init(); } + wxNotificationMessage(const wxString& title, + const wxString& message = wxString(), + wxWindow *parent = NULL, + int flags = wxICON_INFORMATION) + : wxNotificationMessageBase(title, message, parent, flags) + { + Init(); + } + + virtual ~wxNotificationMessage(); + + + virtual bool Show(int timeout = Timeout_Auto); + virtual bool Close(); + + // Set the name of the icon to use, overriding the default icon determined + // by the flags. Call with empty string to reset custom icon. + bool GTKSetIconName(const wxString& name); + +private: + void Init() { m_notification = NULL; } + + NotifyNotification* m_notification; + wxString m_iconName; + + wxDECLARE_NO_COPY_CLASS(wxNotificationMessage); +}; + +#endif // _WX_GTK_NOTIFMSG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/pen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/pen.h new file mode 100644 index 0000000000..85aa102747 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/pen.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/pen.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PEN_H_ +#define _WX_GTK_PEN_H_ + +typedef signed char wxGTKDash; + +//----------------------------------------------------------------------------- +// wxPen +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPen: public wxPenBase +{ +public: + wxPen() { } + + wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID ); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); +#endif + + virtual ~wxPen(); + + bool operator==(const wxPen& pen) const; + bool operator!=(const wxPen& pen) const { return !(*this == pen); } + + void SetColour( const wxColour &colour ); + void SetColour( unsigned char red, unsigned char green, unsigned char blue ); + void SetCap( wxPenCap capStyle ); + void SetJoin( wxPenJoin joinStyle ); + void SetStyle( wxPenStyle style ); + void SetWidth( int width ); + void SetDashes( int number_of_dashes, const wxDash *dash ); + void SetStipple(const wxBitmap& stipple); + + wxColour GetColour() const; + wxPenCap GetCap() const; + wxPenJoin GetJoin() const; + wxPenStyle GetStyle() const; + int GetWidth() const; + int GetDashes(wxDash **ptr) const; + int GetDashCount() const; + wxDash* GetDash() const; + wxBitmap *GetStipple() const; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxPenStyle)style); } +#endif + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxPen) +}; + +#endif // _WX_GTK_PEN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/popupwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/popupwin.h new file mode 100644 index 0000000000..1c848795b9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/popupwin.h @@ -0,0 +1,50 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/popupwin.h +// Purpose: +// Author: Robert Roebling +// Created: +// Copyright: (c) 2001 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_POPUPWIN_H_ +#define _WX_GTK_POPUPWIN_H_ + +//----------------------------------------------------------------------------- +// wxPopUpWindow +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPopupWindow: public wxPopupWindowBase +{ +public: + wxPopupWindow() { } + virtual ~wxPopupWindow(); + + wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE) + { (void)Create(parent, flags); } + bool Create(wxWindow *parent, int flags = wxBORDER_NONE); + + virtual bool Show(bool show = true); + + virtual void SetFocus(); + + // implementation + // -------------- + + // GTK time when connecting to button_press signal + wxUint32 m_time; + +protected: + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + virtual void DoMoveWindow(int x, int y, int width, int height); + +#ifdef __WXUNIVERSAL__ + DECLARE_EVENT_TABLE() +#endif + DECLARE_DYNAMIC_CLASS(wxPopupWindow) +}; + +#endif // _WX_GTK_POPUPWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/print.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/print.h new file mode 100644 index 0000000000..e4eae1cef3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/print.h @@ -0,0 +1,354 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/print.h +// Author: Anthony Bretaudeau +// Purpose: GTK printing support +// Created: 2007-08-25 +// Copyright: (c) Anthony Bretaudeau +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRINT_H_ +#define _WX_GTK_PRINT_H_ + +#include "wx/defs.h" + +#if wxUSE_GTKPRINT + +#include "wx/print.h" +#include "wx/printdlg.h" +#include "wx/prntbase.h" +#include "wx/dc.h" + +typedef struct _GtkPrintOperation GtkPrintOperation; +typedef struct _GtkPrintContext GtkPrintContext; +typedef struct _GtkPrintSettings GtkPrintSettings; +typedef struct _GtkPageSetup GtkPageSetup; + +typedef struct _cairo cairo_t; + +//---------------------------------------------------------------------------- +// wxGtkPrintFactory +//---------------------------------------------------------------------------- + +class wxGtkPrintFactory: public wxPrintFactory +{ +public: + virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data ); + + virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, + wxPrintout *printout = NULL, + wxPrintDialogData *data = NULL ); + virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, + wxPrintout *printout, + wxPrintData *data ); + + virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, + wxPrintDialogData *data = NULL ); + virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, + wxPrintData *data ); + + virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent, + wxPageSetupDialogData * data = NULL ); + + virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ); + + virtual bool HasPrintSetupDialog(); + virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data ); + virtual bool HasOwnPrintToFile(); + virtual bool HasPrinterLine(); + virtual wxString CreatePrinterLine(); + virtual bool HasStatusLine(); + virtual wxString CreateStatusLine(); + + virtual wxPrintNativeDataBase *CreatePrintNativeData(); +}; + +//---------------------------------------------------------------------------- +// wxGtkPrintDialog +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGtkPrintDialog: public wxPrintDialogBase +{ +public: + wxGtkPrintDialog( wxWindow *parent, + wxPrintDialogData* data = NULL ); + wxGtkPrintDialog( wxWindow *parent, wxPrintData* data); + virtual ~wxGtkPrintDialog(); + + wxPrintData& GetPrintData() + { return m_printDialogData.GetPrintData(); } + wxPrintDialogData& GetPrintDialogData() + { return m_printDialogData; } + + wxDC *GetPrintDC() { return m_dc; } + void SetPrintDC(wxDC * printDC) { m_dc = printDC; } + + virtual int ShowModal(); + + virtual bool Validate() { return true; } + virtual bool TransferDataToWindow() { return true; } + virtual bool TransferDataFromWindow() { return true; } + + void SetShowDialog(bool show) { m_showDialog = show; } + bool GetShowDialog() { return m_showDialog; } + +protected: + // Implement some base class methods to do nothing to avoid asserts and + // GTK warnings, since this is not a real wxDialog. + virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} + virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height)) {} + +private: + wxPrintDialogData m_printDialogData; + wxWindow *m_parent; + bool m_showDialog; + wxDC *m_dc; + + DECLARE_DYNAMIC_CLASS(wxGtkPrintDialog) +}; + +//---------------------------------------------------------------------------- +// wxGtkPageSetupDialog +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGtkPageSetupDialog: public wxPageSetupDialogBase +{ +public: + wxGtkPageSetupDialog( wxWindow *parent, + wxPageSetupDialogData* data = NULL ); + virtual ~wxGtkPageSetupDialog(); + + virtual wxPageSetupDialogData& GetPageSetupDialogData() { return m_pageDialogData; } + + virtual int ShowModal(); + + virtual bool Validate() { return true; } + virtual bool TransferDataToWindow() { return true; } + virtual bool TransferDataFromWindow() { return true; } + +protected: + // Implement some base class methods to do nothing to avoid asserts and + // GTK warnings, since this is not a real wxDialog. + virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} + virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height)) {} + +private: + wxPageSetupDialogData m_pageDialogData; + wxWindow *m_parent; + + DECLARE_DYNAMIC_CLASS(wxGtkPageSetupDialog) +}; + +//---------------------------------------------------------------------------- +// wxGtkPrinter +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGtkPrinter : public wxPrinterBase +{ +public: + wxGtkPrinter(wxPrintDialogData *data = NULL); + virtual ~wxGtkPrinter(); + + virtual bool Print(wxWindow *parent, + wxPrintout *printout, + bool prompt = true); + virtual wxDC* PrintDialog(wxWindow *parent); + virtual bool Setup(wxWindow *parent); + + GtkPrintContext *GetPrintContext() { return m_gpc; } + void SetPrintContext(GtkPrintContext *context) {m_gpc = context;} + void BeginPrint(wxPrintout *printout, GtkPrintOperation *operation, GtkPrintContext *context); + void DrawPage(wxPrintout *printout, GtkPrintOperation *operation, GtkPrintContext *context, int page_nr); + +private: + GtkPrintContext *m_gpc; + wxDC *m_dc; + + DECLARE_DYNAMIC_CLASS(wxGtkPrinter) + wxDECLARE_NO_COPY_CLASS(wxGtkPrinter); +}; + +//---------------------------------------------------------------------------- +// wxGtkPrintNativeData +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGtkPrintNativeData : public wxPrintNativeDataBase +{ +public: + wxGtkPrintNativeData(); + virtual ~wxGtkPrintNativeData(); + + virtual bool TransferTo( wxPrintData &data ); + virtual bool TransferFrom( const wxPrintData &data ); + + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const { return true; } + + GtkPrintSettings* GetPrintConfig() { return m_config; } + void SetPrintConfig( GtkPrintSettings * config ); + + GtkPrintOperation* GetPrintJob() { return m_job; } + void SetPrintJob(GtkPrintOperation *job) { m_job = job; } + + GtkPrintContext *GetPrintContext() { return m_context; } + void SetPrintContext(GtkPrintContext *context) {m_context = context; } + + + GtkPageSetup* GetPageSetupFromSettings(GtkPrintSettings* settings); + void SetPageSetupToSettings(GtkPrintSettings* settings, GtkPageSetup* page_setup); + +private: + // NB: m_config is created and owned by us, but the other objects are not + // and their accessors don't change their ref count. + GtkPrintSettings *m_config; + GtkPrintOperation *m_job; + GtkPrintContext *m_context; + + DECLARE_DYNAMIC_CLASS(wxGtkPrintNativeData) +}; + +//----------------------------------------------------------------------------- +// wxGtkPrinterDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGtkPrinterDCImpl : public wxDCImpl +{ +public: + wxGtkPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ); + virtual ~wxGtkPrinterDCImpl(); + + bool Ok() const { return IsOk(); } + bool IsOk() const; + + virtual void* GetCairoContext() const; + virtual void* GetHandle() const; + + bool CanDrawBitmap() const { return true; } + void Clear(); + void SetFont( const wxFont& font ); + void SetPen( const wxPen& pen ); + void SetBrush( const wxBrush& brush ); + void SetLogicalFunction( wxRasterOperationMode function ); + void SetBackground( const wxBrush& brush ); + void DestroyClippingRegion(); + bool StartDoc(const wxString& message); + void EndDoc(); + void StartPage(); + void EndPage(); + wxCoord GetCharHeight() const; + wxCoord GetCharWidth() const; + bool CanGetTextExtent() const { return true; } + wxSize GetPPI() const; + virtual int GetDepth() const { return 24; } + void SetBackgroundMode(int mode); + void SetPalette(const wxPalette& WXUNUSED(palette)) { } + void SetResolution(int ppi); + + // overridden for wxPrinterDC Impl + virtual int GetResolution() const; + virtual wxRect GetPaperRect() const; + +protected: + bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, + wxFloodFillStyle style=wxFLOOD_SURFACE ); + void DoGradientFillConcentric(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, const wxPoint& circleCenter); + void DoGradientFillLinear(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, wxDirection nDirection = wxEAST); + bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const; + void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); + void DoCrossHair(wxCoord x, wxCoord y); + void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc); + void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea); + void DoDrawPoint(wxCoord x, wxCoord y); + void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0); + void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); + void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); + void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0); + void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); +#if wxUSE_SPLINES + void DoDrawSpline(const wxPointList *points); +#endif + bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); + void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y ); + void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false ); + void DoDrawText(const wxString& text, wxCoord x, wxCoord y ); + void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle); + void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + void DoSetDeviceClippingRegion( const wxRegion &WXUNUSED(clip) ) + { + wxFAIL_MSG( "not implemented" ); + } + void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL ) const; + void DoGetSize(int* width, int* height) const; + void DoGetSizeMM(int *width, int *height) const; + + wxPrintData& GetPrintData() { return m_printData; } + void SetPrintData(const wxPrintData& data); + +private: + wxPrintData m_printData; + PangoContext *m_context; + PangoLayout *m_layout; + PangoFontDescription *m_fontdesc; + cairo_t *m_cairo; + + unsigned char m_currentRed; + unsigned char m_currentGreen; + unsigned char m_currentBlue; + unsigned char m_currentAlpha; + + GtkPrintContext *m_gpc; + int m_resolution; + double m_PS2DEV; + double m_DEV2PS; + + DECLARE_DYNAMIC_CLASS(wxGtkPrinterDCImpl) + wxDECLARE_NO_COPY_CLASS(wxGtkPrinterDCImpl); +}; + +// ---------------------------------------------------------------------------- +// wxGtkPrintPreview: programmer creates an object of this class to preview a +// wxPrintout. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGtkPrintPreview : public wxPrintPreviewBase +{ +public: + wxGtkPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting = NULL, + wxPrintDialogData *data = NULL); + wxGtkPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintData *data); + + virtual ~wxGtkPrintPreview(); + + virtual bool Print(bool interactive); + virtual void DetermineScaling(); + +private: + void Init(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintData *data); + + // resolution to use in DPI + int m_resolution; + + DECLARE_CLASS(wxGtkPrintPreview) +}; + +#endif // wxUSE_GTKPRINT + +#endif // _WX_GTK_PRINT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private.h new file mode 100644 index 0000000000..4c52f53c50 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private.h @@ -0,0 +1,132 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private.h +// Purpose: wxGTK private macros, functions &c +// Author: Vadim Zeitlin +// Modified by: +// Created: 12.03.02 +// Copyright: (c) 2002 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_H_ +#define _WX_GTK_PRIVATE_H_ + +#include + +#include "wx/gtk/private/string.h" +#include "wx/gtk/private/gtk2-compat.h" + +#ifndef G_VALUE_INIT + // introduced in GLib 2.30 + #define G_VALUE_INIT { 0, { { 0 } } } +#endif + +// pango_version_check symbol is quite recent ATM (4/2007)... so we +// use our own wrapper which implements a smart trick. +// Use this function as you'd use pango_version_check: +// +// if (!wx_pango_version_check(1,18,0)) +// ... call to a function available only in pango >= 1.18 ... +// +// and use it only to test for pango versions >= 1.16.0 +extern const gchar *wx_pango_version_check(int major, int minor, int micro); + +#if wxUSE_UNICODE + #define wxGTK_CONV(s) (s).utf8_str() + #define wxGTK_CONV_ENC(s, enc) wxGTK_CONV((s)) + #define wxGTK_CONV_FONT(s, font) wxGTK_CONV((s)) + #define wxGTK_CONV_SYS(s) wxGTK_CONV((s)) + + #define wxGTK_CONV_BACK(s) wxString::FromUTF8Unchecked(s) + #define wxGTK_CONV_BACK_ENC(s, enc) wxGTK_CONV_BACK(s) + #define wxGTK_CONV_BACK_FONT(s, font) wxGTK_CONV_BACK(s) + #define wxGTK_CONV_BACK_SYS(s) wxGTK_CONV_BACK(s) +#else + #include "wx/font.h" + + // convert the text between the given encoding and UTF-8 used by wxGTK + extern WXDLLIMPEXP_CORE wxCharBuffer + wxConvertToGTK(const wxString& s, + wxFontEncoding enc = wxFONTENCODING_SYSTEM); + + extern WXDLLIMPEXP_CORE wxCharBuffer + wxConvertFromGTK(const wxString& s, + wxFontEncoding enc = wxFONTENCODING_SYSTEM); + + // helper: use the encoding of the given font if it's valid + inline wxCharBuffer wxConvertToGTK(const wxString& s, const wxFont& font) + { + return wxConvertToGTK(s, font.IsOk() ? font.GetEncoding() + : wxFONTENCODING_SYSTEM); + } + + inline wxCharBuffer wxConvertFromGTK(const wxString& s, const wxFont& font) + { + return wxConvertFromGTK(s, font.IsOk() ? font.GetEncoding() + : wxFONTENCODING_SYSTEM); + } + + // more helpers: allow passing GTK+ strings directly + inline wxCharBuffer + wxConvertFromGTK(const wxGtkString& gs, + wxFontEncoding enc = wxFONTENCODING_SYSTEM) + { + return wxConvertFromGTK(gs.c_str(), enc); + } + + inline wxCharBuffer + wxConvertFromGTK(const wxGtkString& gs, const wxFont& font) + { + return wxConvertFromGTK(gs.c_str(), font); + } + + #define wxGTK_CONV(s) wxGTK_CONV_FONT((s), m_font) + #define wxGTK_CONV_ENC(s, enc) wxConvertToGTK((s), (enc)) + #define wxGTK_CONV_FONT(s, font) wxConvertToGTK((s), (font)) + #define wxGTK_CONV_SYS(s) wxConvertToGTK((s)) + + #define wxGTK_CONV_BACK(s) wxConvertFromGTK((s), m_font) + #define wxGTK_CONV_BACK_ENC(s, enc) wxConvertFromGTK((s), (enc)) + #define wxGTK_CONV_BACK_FONT(s, font) wxConvertFromGTK((s), (font)) + #define wxGTK_CONV_BACK_SYS(s) wxConvertFromGTK((s)) +#endif + +// Define a macro for converting wxString to char* in appropriate encoding for +// the file names. +#ifdef G_OS_WIN32 + // Under MSW, UTF-8 file name encodings are always used. + #define wxGTK_CONV_FN(s) (s).utf8_str() +#else + // Under Unix use GLib file name encoding (which is also UTF-8 by default + // but may be different from it). + #define wxGTK_CONV_FN(s) (s).fn_str() +#endif + +// ---------------------------------------------------------------------------- +// various private helper functions +// ---------------------------------------------------------------------------- + +namespace wxGTKPrivate +{ + +// these functions create the GTK widgets of the specified types which can then +// used to retrieve their styles, pass them to drawing functions &c +// +// the returned widgets shouldn't be destroyed, this is done automatically on +// shutdown +WXDLLIMPEXP_CORE GtkWidget *GetButtonWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetCheckButtonWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetComboBoxWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetEntryWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetHeaderButtonWidgetFirst(); +WXDLLIMPEXP_CORE GtkWidget *GetHeaderButtonWidgetLast(); +WXDLLIMPEXP_CORE GtkWidget *GetHeaderButtonWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetNotebookWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetRadioButtonWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetSplitterWidget(wxOrientation orient = wxHORIZONTAL); +WXDLLIMPEXP_CORE GtkWidget *GetTextEntryWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetTreeWidget(); + +} // wxGTKPrivate + +#endif // _WX_GTK_PRIVATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/dialogcount.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/dialogcount.h new file mode 100644 index 0000000000..b282e99ca5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/dialogcount.h @@ -0,0 +1,48 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/dialogcount.h +// Purpose: Helper for temporarily changing wxOpenModalDialogsCount global. +// Author: Vadim Zeitlin +// Created: 2013-03-21 +// Copyright: (c) 2013 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_DIALOGCOUNT_H_ +#define _WX_GTK_PRIVATE_DIALOGCOUNT_H_ + +#include "wx/defs.h" + +// This global variable contains the number of currently opened modal dialogs. +// When it is non null, the global menu used in Ubuntu Unity needs to be +// explicitly disabled as this doesn't currently happen on its own due to a bug +// in Unity, see https://bugs.launchpad.net/indicator-appmenu/+bug/674605 +// +// For this to work, all modal dialogs must use wxOpenModalDialogLocker class +// below to increment this variable while they are indeed being modally shown. +// +// This variable is defined in src/gtk/toplevel.cpp +extern int wxOpenModalDialogsCount; + +// ---------------------------------------------------------------------------- +// wxOpenModalDialogLocker: Create an object of this class to increment +// wxOpenModalDialogsCount during its lifetime. +// ---------------------------------------------------------------------------- + +class wxOpenModalDialogLocker +{ +public: + wxOpenModalDialogLocker() + { + wxOpenModalDialogsCount++; + } + + ~wxOpenModalDialogLocker() + { + wxOpenModalDialogsCount--; + } + +private: + wxDECLARE_NO_COPY_CLASS(wxOpenModalDialogLocker); +}; + +#endif // _WX_GTK_PRIVATE_DIALOGCOUNT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/error.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/error.h new file mode 100644 index 0000000000..5432b18bf3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/error.h @@ -0,0 +1,45 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: gtk/private/error.h +// Purpose: Wrapper around GError. +// Author: Vadim Zeitlin +// Created: 2012-07-25 +// Copyright: (c) 2012 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_ERROR_H_ +#define _WX_GTK_PRIVATE_ERROR_H_ + +// ---------------------------------------------------------------------------- +// wxGtkError wraps GError and releases it automatically. +// ---------------------------------------------------------------------------- + +// Create an object of this class and pass the result of its Out() method to a +// function taking "GError**", then use GetMessage() if the function returned +// false. +class wxGtkError +{ +public: + wxGtkError() { m_error = NULL; } + ~wxGtkError() { if ( m_error ) g_error_free(m_error); } + + GError** Out() + { + // This would result in a GError leak. + wxASSERT_MSG( !m_error, wxS("Can't reuse the same object.") ); + + return &m_error; + } + + wxString GetMessage() const + { + return wxString::FromUTF8(m_error->message); + } + +private: + GError* m_error; + + wxDECLARE_NO_COPY_CLASS(wxGtkError); +}; + +#endif // _WX_GTK_PRIVATE_ERROR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/event.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/event.h new file mode 100644 index 0000000000..eda9e6e7f4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/event.h @@ -0,0 +1,79 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/event.h +// Purpose: Helper functions for working with GDK and wx events +// Author: Vaclav Slavik +// Created: 2011-10-14 +// Copyright: (c) 2011 Vaclav Slavik +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _GTK_PRIVATE_EVENT_H_ +#define _GTK_PRIVATE_EVENT_H_ + +#if !GTK_CHECK_VERSION(2,10,0) + // GTK+ can reliably detect Meta key state only since 2.10 when + // GDK_META_MASK was introduced -- there wasn't any way to detect it + // in older versions. wxGTK used GDK_MOD2_MASK for this purpose, but + // GDK_MOD2_MASK is documented as: + // + // the fifth modifier key (it depends on the modifier mapping of the X + // server which key is interpreted as this modifier) + // + // In other words, it isn't guaranteed to map to Meta. This is a real + // problem: it is common to map NumLock to it (in fact, it's an exception + // if the X server _doesn't_ use it for NumLock). So the old code caused + // wxKeyEvent::MetaDown() to always return true as long as NumLock was on + // on many systems, which broke all applications using + // wxKeyEvent::GetModifiers() to check modifiers state (see e.g. here: + // http://tinyurl.com/56lsk2). + // + // Because of this, it's better to not detect Meta key state at all than + // to detect it incorrectly. Hence the following #define, which causes + // m_metaDown to be always set to false. + #define GDK_META_MASK 0 +#endif + +namespace wxGTKImpl +{ + +// init wxMouseEvent with the info from GdkEventXXX struct +template void InitMouseEvent(wxWindowGTK *win, + wxMouseEvent& event, + T *gdk_event) +{ + event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK) != 0; + event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK) != 0; + event.m_altDown = (gdk_event->state & GDK_MOD1_MASK) != 0; + event.m_metaDown = (gdk_event->state & GDK_META_MASK) != 0; + event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK) != 0; + event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK) != 0; + event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK) != 0; + + // In gdk/win32 VK_XBUTTON1 is translated to GDK_BUTTON4_MASK + // and VK_XBUTTON2 to GDK_BUTTON5_MASK. In x11/gdk buttons 4/5 + // are wheel rotation and buttons 8/9 don't change the state. + event.m_aux1Down = (gdk_event->state & GDK_BUTTON4_MASK) != 0; + event.m_aux2Down = (gdk_event->state & GDK_BUTTON5_MASK) != 0; + + wxPoint pt = win->GetClientAreaOrigin(); + event.m_x = (wxCoord)gdk_event->x - pt.x; + event.m_y = (wxCoord)gdk_event->y - pt.y; + + if ((win->m_wxwindow) && (win->GetLayoutDirection() == wxLayout_RightToLeft)) + { + // origin in the upper right corner + GtkAllocation a; + gtk_widget_get_allocation(win->m_wxwindow, &a); + int window_width = a.width; + event.m_x = window_width - event.m_x; + } + + event.SetEventObject( win ); + event.SetId( win->GetId() ); + event.SetTimestamp( gdk_event->time ); +} + +} // namespace wxGTKImpl + +#endif // _GTK_PRIVATE_EVENT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/gdkconv.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/gdkconv.h new file mode 100644 index 0000000000..b63b0c74cd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/gdkconv.h @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/gdkconv.h +// Purpose: Helper functions for converting between GDK and wx types +// Author: Vadim Zeitlin +// Created: 2009-11-10 +// Copyright: (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _GTK_PRIVATE_GDKCONV_H_ +#define _GTK_PRIVATE_GDKCONV_H_ + +namespace wxGTKImpl +{ + +inline wxRect wxRectFromGDKRect(const GdkRectangle *r) +{ + return wxRect(r->x, r->y, r->width, r->height); +} + +inline void wxRectToGDKRect(const wxRect& rect, GdkRectangle& r) +{ + r.x = rect.x; + r.y = rect.y; + r.width = rect.width; + r.height = rect.height; +} + +} // namespace wxGTKImpl + +#endif // _GTK_PRIVATE_GDKCONV_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/gtk2-compat.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/gtk2-compat.h new file mode 100644 index 0000000000..76a6075857 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/gtk2-compat.h @@ -0,0 +1,521 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/compat.h +// Purpose: Compatibility code for older GTK+ versions +// Author: Vaclav Slavik +// Created: 2011-03-25 +// Copyright: (c) 2011 Vaclav Slavik +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_COMPAT_H_ +#define _WX_GTK_PRIVATE_COMPAT_H_ + +// ---------------------------------------------------------------------------- +// Implementations of new accessors for older GTK+ versions +// ---------------------------------------------------------------------------- + +// GTK+ deprecated direct access to struct members and some other stuff, +// replacing them with simple accessor functions. These aren't available in +// older versions, though, so we have to provide them for compatibility. +// +// Note: wx_ prefix is used to avoid symbol conflicts at runtime +// +// Note 2: We support building against newer GTK+ version and using an older +// one at runtime, so we must provide our implementations of these +// functions even if GTK_CHECK_VERSION would indicate the function is +// already available in GTK+. + +#ifndef __WXGTK3__ + +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 2.8 + +static inline GtkWidget* wx_gtk_scrolled_window_get_hscrollbar(GtkScrolledWindow* scrolled_window) +{ + return scrolled_window->hscrollbar; +} +#define gtk_scrolled_window_get_hscrollbar wx_gtk_scrolled_window_get_hscrollbar + +static inline GtkWidget* wx_gtk_scrolled_window_get_vscrollbar(GtkScrolledWindow* scrolled_window) +{ + return scrolled_window->vscrollbar; +} +#define gtk_scrolled_window_get_vscrollbar wx_gtk_scrolled_window_get_vscrollbar + +// ---------------------------------------------------------------------------- +// the following were introduced in GLib 2.10 + +static inline gpointer wx_g_object_ref_sink(gpointer object) +{ + g_object_ref(object); + gtk_object_sink(GTK_OBJECT(object)); + return object; +} +#define g_object_ref_sink wx_g_object_ref_sink + +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 2.12 + +static inline void wx_gtk_about_dialog_set_program_name(GtkAboutDialog* about, const gchar* name) +{ + gtk_about_dialog_set_name(about, name); +} +#define gtk_about_dialog_set_program_name wx_gtk_about_dialog_set_program_name + +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 2.14 + +static inline gdouble wx_gtk_adjustment_get_lower(GtkAdjustment* adjustment) +{ + return adjustment->lower; +} +#define gtk_adjustment_get_lower wx_gtk_adjustment_get_lower + +static inline gdouble wx_gtk_adjustment_get_page_increment(GtkAdjustment* adjustment) +{ + return adjustment->page_increment; +} +#define gtk_adjustment_get_page_increment wx_gtk_adjustment_get_page_increment + +static inline gdouble wx_gtk_adjustment_get_page_size(GtkAdjustment* adjustment) +{ + return adjustment->page_size; +} +#define gtk_adjustment_get_page_size wx_gtk_adjustment_get_page_size + +static inline gdouble wx_gtk_adjustment_get_step_increment(GtkAdjustment* adjustment) +{ + return adjustment->step_increment; +} +#define gtk_adjustment_get_step_increment wx_gtk_adjustment_get_step_increment + +static inline gdouble wx_gtk_adjustment_get_upper(GtkAdjustment* adjustment) +{ + return adjustment->upper; +} +#define gtk_adjustment_get_upper wx_gtk_adjustment_get_upper + +static inline void wx_gtk_adjustment_set_page_size(GtkAdjustment* adjustment, gdouble page_size) +{ + adjustment->page_size = page_size; +} +#define gtk_adjustment_set_page_size wx_gtk_adjustment_set_page_size + +static inline GtkWidget* wx_gtk_color_selection_dialog_get_color_selection(GtkColorSelectionDialog* csd) +{ + return csd->colorsel; +} +#define gtk_color_selection_dialog_get_color_selection wx_gtk_color_selection_dialog_get_color_selection + +static inline GtkWidget* wx_gtk_dialog_get_content_area(GtkDialog* dialog) +{ + return dialog->vbox; +} +#define gtk_dialog_get_content_area wx_gtk_dialog_get_content_area + +static inline GtkWidget* wx_gtk_dialog_get_action_area(GtkDialog* dialog) +{ + return dialog->action_area; +} +#define gtk_dialog_get_action_area wx_gtk_dialog_get_action_area + +static inline guint16 wx_gtk_entry_get_text_length(GtkEntry* entry) +{ + return entry->text_length; +} +#define gtk_entry_get_text_length wx_gtk_entry_get_text_length + +static inline const guchar* wx_gtk_selection_data_get_data(GtkSelectionData* selection_data) +{ + return selection_data->data; +} +#define gtk_selection_data_get_data wx_gtk_selection_data_get_data + +static inline GdkAtom wx_gtk_selection_data_get_data_type(GtkSelectionData* selection_data) +{ + return selection_data->type; +} +#define gtk_selection_data_get_data_type wx_gtk_selection_data_get_data_type + +static inline gint wx_gtk_selection_data_get_format(GtkSelectionData* selection_data) +{ + return selection_data->format; +} +#define gtk_selection_data_get_format wx_gtk_selection_data_get_format + +static inline gint wx_gtk_selection_data_get_length(GtkSelectionData* selection_data) +{ + return selection_data->length; +} +#define gtk_selection_data_get_length wx_gtk_selection_data_get_length + +static inline GdkAtom wx_gtk_selection_data_get_target(GtkSelectionData* selection_data) +{ + return selection_data->target; +} +#define gtk_selection_data_get_target wx_gtk_selection_data_get_target + +static inline GdkWindow* wx_gtk_widget_get_window(GtkWidget* widget) +{ + return widget->window; +} +#define gtk_widget_get_window wx_gtk_widget_get_window + +static inline GtkWidget* wx_gtk_window_get_default_widget(GtkWindow* window) +{ + return window->default_widget; +} +#define gtk_window_get_default_widget wx_gtk_window_get_default_widget + +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 2.16 + +static inline GdkAtom wx_gtk_selection_data_get_selection(GtkSelectionData* selection_data) +{ + return selection_data->selection; +} +#define gtk_selection_data_get_selection wx_gtk_selection_data_get_selection + +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 2.18 + +static inline void wx_gtk_cell_renderer_get_alignment(GtkCellRenderer* cell, gfloat* xalign, gfloat* yalign) +{ + *xalign = cell->xalign; + *yalign = cell->yalign; +} +#define gtk_cell_renderer_get_alignment wx_gtk_cell_renderer_get_alignment + +static inline void wx_gtk_cell_renderer_get_padding(GtkCellRenderer* cell, gint* xpad, gint* ypad) +{ + *xpad = cell->xpad; + *ypad = cell->ypad; +} +#define gtk_cell_renderer_get_padding wx_gtk_cell_renderer_get_padding + +static inline void wx_gtk_widget_get_allocation(GtkWidget* widget, GtkAllocation* allocation) +{ + *allocation = widget->allocation; +} +#define gtk_widget_get_allocation wx_gtk_widget_get_allocation + +inline gboolean wx_gtk_widget_get_has_window(GtkWidget *widget) +{ + return !GTK_WIDGET_NO_WINDOW(widget); +} +#define gtk_widget_get_has_window wx_gtk_widget_get_has_window + + +inline gboolean wx_gtk_widget_get_has_grab(GtkWidget *widget) +{ + return GTK_WIDGET_HAS_GRAB(widget); +} +#define gtk_widget_get_has_grab wx_gtk_widget_get_has_grab + + +inline gboolean wx_gtk_widget_get_visible(GtkWidget *widget) +{ + return GTK_WIDGET_VISIBLE(widget); +} +#define gtk_widget_get_visible wx_gtk_widget_get_visible + + +inline gboolean wx_gtk_widget_get_sensitive(GtkWidget *widget) +{ + return GTK_WIDGET_SENSITIVE(widget); +} +#define gtk_widget_get_sensitive wx_gtk_widget_get_sensitive + + +inline gboolean wx_gtk_widget_is_drawable(GtkWidget *widget) +{ + return GTK_WIDGET_DRAWABLE(widget); +} +#define gtk_widget_is_drawable wx_gtk_widget_is_drawable + + +inline gboolean wx_gtk_widget_get_can_focus(GtkWidget *widget) +{ + return GTK_WIDGET_CAN_FOCUS(widget); +} +#define gtk_widget_get_can_focus wx_gtk_widget_get_can_focus + +inline void wx_gtk_widget_set_can_focus(GtkWidget *widget, gboolean can) +{ + if ( can ) + GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_FOCUS); + else + GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_FOCUS); +} +#define gtk_widget_set_can_focus wx_gtk_widget_set_can_focus + + +inline gboolean wx_gtk_widget_get_can_default(GtkWidget *widget) +{ + return GTK_WIDGET_CAN_DEFAULT(widget); +} +#define gtk_widget_get_can_default wx_gtk_widget_get_can_default + +inline void wx_gtk_widget_set_can_default(GtkWidget *widget, gboolean can) +{ + if ( can ) + GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_DEFAULT); + else + GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_DEFAULT); +} +#define gtk_widget_set_can_default wx_gtk_widget_set_can_default + + +inline gboolean wx_gtk_widget_has_default(GtkWidget *widget) +{ + return GTK_WIDGET_HAS_DEFAULT(widget); +} +#define gtk_widget_has_default wx_gtk_widget_has_default + + +inline GtkStateType wx_gtk_widget_get_state(GtkWidget *widget) +{ + return (GtkStateType)GTK_WIDGET_STATE(widget); +} +#define gtk_widget_get_state wx_gtk_widget_get_state + + +inline gboolean wx_gtk_widget_get_double_buffered(GtkWidget *widget) +{ + return GTK_WIDGET_DOUBLE_BUFFERED(widget); +} +#define gtk_widget_get_double_buffered wx_gtk_widget_get_double_buffered + +static inline gboolean wx_gtk_widget_has_grab(GtkWidget* widget) +{ + return GTK_WIDGET_HAS_GRAB(widget); +} +#define gtk_widget_has_grab wx_gtk_widget_has_grab + +static inline void wx_gtk_widget_set_allocation(GtkWidget* widget, const GtkAllocation* allocation) +{ + widget->allocation = *allocation; +} +#define gtk_widget_set_allocation wx_gtk_widget_set_allocation + +static inline gboolean wx_gtk_widget_is_toplevel(GtkWidget* widget) +{ + return GTK_WIDGET_TOPLEVEL(widget); +} +#define gtk_widget_is_toplevel wx_gtk_widget_is_toplevel + +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 2.20 + +inline gboolean wx_gtk_widget_get_realized(GtkWidget *widget) +{ + return GTK_WIDGET_REALIZED(widget); +} +#define gtk_widget_get_realized wx_gtk_widget_get_realized + + +inline gboolean wx_gtk_widget_get_mapped(GtkWidget *widget) +{ + return GTK_WIDGET_MAPPED(widget); +} +#define gtk_widget_get_mapped wx_gtk_widget_get_mapped + +static inline void wx_gtk_widget_get_requisition(GtkWidget* widget, GtkRequisition* requisition) +{ + *requisition = widget->requisition; +} +#define gtk_widget_get_requisition wx_gtk_widget_get_requisition + +static inline GdkWindow* wx_gtk_entry_get_text_window(GtkEntry* entry) +{ + return entry->text_area; +} +#define gtk_entry_get_text_window wx_gtk_entry_get_text_window + +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 2.22 + +static inline GdkWindow* wx_gtk_button_get_event_window(GtkButton* button) +{ + return button->event_window; +} +#define gtk_button_get_event_window wx_gtk_button_get_event_window + +static inline GdkDragAction wx_gdk_drag_context_get_actions(GdkDragContext* context) +{ + return context->actions; +} +#define gdk_drag_context_get_actions wx_gdk_drag_context_get_actions + +static inline GdkDragAction wx_gdk_drag_context_get_selected_action(GdkDragContext* context) +{ + return context->action; +} +#define gdk_drag_context_get_selected_action wx_gdk_drag_context_get_selected_action + +static inline GdkDragAction wx_gdk_drag_context_get_suggested_action(GdkDragContext* context) +{ + return context->suggested_action; +} +#define gdk_drag_context_get_suggested_action wx_gdk_drag_context_get_suggested_action + +static inline GList* wx_gdk_drag_context_list_targets(GdkDragContext* context) +{ + return context->targets; +} +#define gdk_drag_context_list_targets wx_gdk_drag_context_list_targets + +static inline gint wx_gdk_visual_get_depth(GdkVisual* visual) +{ + return visual->depth; +} +#define gdk_visual_get_depth wx_gdk_visual_get_depth + +static inline gboolean wx_gtk_window_has_group(GtkWindow* window) +{ + return window->group != NULL; +} +#define gtk_window_has_group wx_gtk_window_has_group + +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 2.24 + +static inline GdkDisplay* wx_gdk_window_get_display(GdkWindow* window) +{ + return gdk_drawable_get_display(window); +} +#define gdk_window_get_display wx_gdk_window_get_display + +static inline GdkScreen* wx_gdk_window_get_screen(GdkWindow* window) +{ + return gdk_drawable_get_screen(window); +} +#define gdk_window_get_screen wx_gdk_window_get_screen + +static inline gint wx_gdk_window_get_height(GdkWindow* window) +{ + int h; + gdk_drawable_get_size(window, NULL, &h); + return h; +} +#define gdk_window_get_height wx_gdk_window_get_height + +static inline gint wx_gdk_window_get_width(GdkWindow* window) +{ + int w; + gdk_drawable_get_size(window, &w, NULL); + return w; +} +#define gdk_window_get_width wx_gdk_window_get_width + +#if GTK_CHECK_VERSION(2,10,0) +static inline void wx_gdk_cairo_set_source_window(cairo_t* cr, GdkWindow* window, gdouble x, gdouble y) +{ + gdk_cairo_set_source_pixmap(cr, window, x, y); +} +#define gdk_cairo_set_source_window wx_gdk_cairo_set_source_window +#endif + +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 3.0 + +static inline void wx_gdk_window_get_geometry(GdkWindow* window, gint* x, gint* y, gint* width, gint* height) +{ + gdk_window_get_geometry(window, x, y, width, height, NULL); +} +#define gdk_window_get_geometry wx_gdk_window_get_geometry + +static inline GtkWidget* wx_gtk_tree_view_column_get_button(GtkTreeViewColumn* tree_column) +{ + return tree_column->button; +} +#define gtk_tree_view_column_get_button wx_gtk_tree_view_column_get_button + +static inline GtkWidget* wx_gtk_box_new(GtkOrientation orientation, gint spacing) +{ + GtkWidget* widget; + if (orientation == GTK_ORIENTATION_HORIZONTAL) + widget = gtk_hbox_new(false, spacing); + else + widget = gtk_vbox_new(false, spacing); + return widget; +} +#define gtk_box_new wx_gtk_box_new + +static inline GtkWidget* wx_gtk_button_box_new(GtkOrientation orientation) +{ + GtkWidget* widget; + if (orientation == GTK_ORIENTATION_HORIZONTAL) + widget = gtk_hbutton_box_new(); + else + widget = gtk_vbutton_box_new(); + return widget; +} +#define gtk_button_box_new wx_gtk_button_box_new + +static inline GtkWidget* wx_gtk_scale_new(GtkOrientation orientation, GtkAdjustment* adjustment) +{ + GtkWidget* widget; + if (orientation == GTK_ORIENTATION_HORIZONTAL) + widget = gtk_hscale_new(adjustment); + else + widget = gtk_vscale_new(adjustment); + return widget; +} +#define gtk_scale_new wx_gtk_scale_new + +static inline GtkWidget* wx_gtk_scrollbar_new(GtkOrientation orientation, GtkAdjustment* adjustment) +{ + GtkWidget* widget; + if (orientation == GTK_ORIENTATION_HORIZONTAL) + widget = gtk_hscrollbar_new(adjustment); + else + widget = gtk_vscrollbar_new(adjustment); + return widget; +} +#define gtk_scrollbar_new wx_gtk_scrollbar_new + +static inline GtkWidget* wx_gtk_separator_new(GtkOrientation orientation) +{ + GtkWidget* widget; + if (orientation == GTK_ORIENTATION_HORIZONTAL) + widget = gtk_hseparator_new(); + else + widget = gtk_vseparator_new(); + return widget; +} +#define gtk_separator_new wx_gtk_separator_new + +static inline void wx_gtk_widget_get_preferred_height(GtkWidget* widget, gint* minimum, gint* natural) +{ + GtkRequisition req; + gtk_widget_size_request(widget, &req); + if (minimum) + *minimum = req.height; + if (natural) + *natural = req.height; +} +#define gtk_widget_get_preferred_height wx_gtk_widget_get_preferred_height + +static inline void wx_gtk_widget_get_preferred_width(GtkWidget* widget, gint* minimum, gint* natural) +{ + GtkRequisition req; + gtk_widget_size_request(widget, &req); + if (minimum) + *minimum = req.width; + if (natural) + *natural = req.width; +} +#define gtk_widget_get_preferred_width wx_gtk_widget_get_preferred_width + +static inline void wx_gtk_widget_get_preferred_size(GtkWidget* widget, GtkRequisition* minimum, GtkRequisition* natural) +{ + GtkRequisition* req = minimum; + if (req == NULL) + req = natural; + gtk_widget_size_request(widget, req); +} +#define gtk_widget_get_preferred_size wx_gtk_widget_get_preferred_size + +#endif // !__WXGTK3__ +#endif // _WX_GTK_PRIVATE_COMPAT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/list.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/list.h new file mode 100644 index 0000000000..15ddf71cae --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/list.h @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/list.h +// Purpose: wxGtkList class. +// Author: Vadim Zeitlin +// Created: 2011-08-21 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_LIST_H_ +#define _WX_GTK_PRIVATE_LIST_H_ + +// ---------------------------------------------------------------------------- +// Convenience class for calling g_list_free() automatically +// ---------------------------------------------------------------------------- + +class wxGtkList +{ +public: + explicit wxGtkList(GList* list) : m_list(list) { } + ~wxGtkList() { g_list_free(m_list); } + + operator GList *() const { return m_list; } + GList * operator->() const { return m_list; } + +protected: + GList* const m_list; + + wxDECLARE_NO_COPY_CLASS(wxGtkList); +}; + +#endif // _WX_GTK_PRIVATE_LIST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/messagetype.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/messagetype.h new file mode 100644 index 0000000000..2c3a2a5a58 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/messagetype.h @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/messagetype.h +// Purpose: translate between wx and GtkMessageType +// Author: Vadim Zeitlin +// Created: 2009-09-27 +// Copyright: (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _GTK_PRIVATE_MSGTYPE_H_ +#define _GTK_PRIVATE_MSGTYPE_H_ + +#include + +namespace wxGTKImpl +{ + +// Convert the given wx style to GtkMessageType, return true if succeeded or +// false if failed. +inline bool ConvertMessageTypeFromWX(int style, GtkMessageType *type) +{ +#ifdef __WXGTK210__ + if ( gtk_check_version(2, 10, 0) == NULL && (style & wxICON_NONE)) + *type = GTK_MESSAGE_OTHER; + else +#endif // __WXGTK210__ + if (style & wxICON_EXCLAMATION) + *type = GTK_MESSAGE_WARNING; + else if (style & wxICON_ERROR) + *type = GTK_MESSAGE_ERROR; + else if (style & wxICON_INFORMATION) + *type = GTK_MESSAGE_INFO; + else if (style & wxICON_QUESTION) + *type = GTK_MESSAGE_QUESTION; + else + return false; + + return true; +} + +} // namespace wxGTKImpl + +#endif // _GTK_PRIVATE_MSGTYPE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/mnemonics.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/mnemonics.h new file mode 100644 index 0000000000..0b6e4ba45a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/mnemonics.h @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/mnemonics.h +// Purpose: helper functions for dealing with GTK+ mnemonics +// Author: Vadim Zeitlin +// Created: 2007-11-12 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _GTK_PRIVATE_MNEMONICS_H_ +#define _GTK_PRIVATE_MNEMONICS_H_ + +#if wxUSE_CONTROLS || wxUSE_MENUS + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// functions to convert between wxWidgets and GTK+ string containing mnemonics +// ---------------------------------------------------------------------------- + +// remove all mnemonics from a string +wxString wxGTKRemoveMnemonics(const wxString& label); + +// convert a wx string with '&' to GTK+ string with '_'s +wxString wxConvertMnemonicsToGTK(const wxString& label); + +// convert a wx string with '&' to indicate mnemonics as well as HTML entities +// to a GTK+ string with "&" used instead of '&', i.e. suitable for use +// with GTK+ functions using markup strings +wxString wxConvertMnemonicsToGTKMarkup(const wxString& label); + +// convert GTK+ string with '_'s to wx string with '&'s +wxString wxConvertMnemonicsFromGTK(const wxString& label); + +#endif // wxUSE_CONTROLS || wxUSE_MENUS + +#endif // _GTK_PRIVATE_MNEMONICS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/object.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/object.h new file mode 100644 index 0000000000..472e4c3ede --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/object.h @@ -0,0 +1,35 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/object.h +// Purpose: wxGtkObject class declaration +// Author: Vadim Zeitlin +// Created: 2008-08-27 +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_OBJECT_H_ +#define _WX_GTK_PRIVATE_OBJECT_H_ + +// ---------------------------------------------------------------------------- +// Convenience class for calling g_object_unref() automatically +// ---------------------------------------------------------------------------- + +template +class wxGtkObject +{ +public: + explicit wxGtkObject(T *p) : m_ptr(p) { } + ~wxGtkObject() { g_object_unref(m_ptr); } + + operator T *() const { return m_ptr; } + +private: + T * const m_ptr; + + // copying could be implemented by using g_object_ref() but for now there + // is no need for it so don't implement it + wxDECLARE_NO_COPY_CLASS(wxGtkObject); +}; + +#endif // _WX_GTK_PRIVATE_OBJECT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/string.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/string.h new file mode 100644 index 0000000000..bd188d10f8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/string.h @@ -0,0 +1,120 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/string.h +// Purpose: wxGtkString class declaration +// Author: Vadim Zeitlin +// Created: 2006-10-19 +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_STRING_H_ +#define _WX_GTK_PRIVATE_STRING_H_ + +// ---------------------------------------------------------------------------- +// Convenience class for g_freeing a gchar* on scope exit automatically +// ---------------------------------------------------------------------------- + +class wxGtkString +{ +public: + explicit wxGtkString(gchar *s) : m_str(s) { } + ~wxGtkString() { g_free(m_str); } + + const gchar *c_str() const { return m_str; } + + operator gchar *() const { return m_str; } + +private: + gchar *m_str; + + wxDECLARE_NO_COPY_CLASS(wxGtkString); +}; + + +// ---------------------------------------------------------------------------- +// list for sorting collated strings +// ---------------------------------------------------------------------------- + +#include "wx/string.h" +#include "wx/vector.h" +#include "wx/sharedptr.h" + +class wxGtkCollatableString +{ +public: + wxGtkCollatableString( const wxString &label, gchar *key ) + { + m_label = label; + m_key = key; + } + + ~wxGtkCollatableString() + { + if (m_key) + g_free( m_key ); + } + + wxString m_label; + gchar *m_key; +}; + +class wxGtkCollatedArrayString +{ +public: + wxGtkCollatedArrayString() { } + + int Add( const wxString &new_label ) + { + int index = 0; + + gchar *new_key_lower = g_utf8_casefold( new_label.utf8_str(), -1); + gchar *new_key = g_utf8_collate_key( new_key_lower, -1); + g_free( new_key_lower ); + + wxSharedPtr new_ptr( new wxGtkCollatableString( new_label, new_key ) ); + + wxVector< wxSharedPtr >::iterator iter; + for (iter = m_list.begin(); iter != m_list.end(); ++iter) + { + wxSharedPtr ptr = *iter; + + gchar *key = ptr->m_key; + if (strcmp(key,new_key) >= 0) + { + m_list.insert( iter, new_ptr ); + return index; + } + index ++; + } + + m_list.push_back( new_ptr ); + return index; + } + + size_t GetCount() + { + return m_list.size(); + } + + wxString At( size_t index ) + { + return m_list[index]->m_label; + } + + void Clear() + { + m_list.clear(); + } + + void RemoveAt( size_t index ) + { + m_list.erase( m_list.begin() + index ); + } + +private: + wxVector< wxSharedPtr > m_list; +}; + + +#endif // _WX_GTK_PRIVATE_STRING_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/textmeasure.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/textmeasure.h new file mode 100644 index 0000000000..d27b096f26 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/textmeasure.h @@ -0,0 +1,64 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/textmeasure.h +// Purpose: wxGTK-specific declaration of wxTextMeasure class +// Author: Manuel Martin +// Created: 2012-10-05 +// Copyright: (c) 1997-2012 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_TEXTMEASURE_H_ +#define _WX_GTK_PRIVATE_TEXTMEASURE_H_ + +// ---------------------------------------------------------------------------- +// wxTextMeasure +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindowDCImpl; + +class wxTextMeasure : public wxTextMeasureBase +{ +public: + wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL) + : wxTextMeasureBase(dc, font) + { + Init(); + } + + wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL) + : wxTextMeasureBase(win, font) + { + Init(); + } + +protected: + // Common part of both ctors. + void Init(); + + virtual void BeginMeasuring(); + virtual void EndMeasuring(); + + virtual void DoGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL); + + virtual bool DoGetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX); + + // This class is only used for DC text measuring with GTK+ 2 as GTK+ 3 uses + // Cairo and not Pango for this. However it's still used even with GTK+ 3 + // for window text measuring, so the context and the layout are still + // needed. +#ifndef __WXGTK3__ + wxWindowDCImpl *m_wdc; +#endif // GTK+ < 3 + PangoContext *m_context; + PangoLayout *m_layout; + + wxDECLARE_NO_COPY_CLASS(wxTextMeasure); +}; + +#endif // _WX_GTK_PRIVATE_TEXTMEASURE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/timer.h new file mode 100644 index 0000000000..89f1355bba --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/timer.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/timer.h +// Purpose: wxTimerImpl for wxGTK +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_TIMER_H_ +#define _WX_GTK_PRIVATE_TIMER_H_ + +#if wxUSE_TIMER + +#include "wx/private/timer.h" + +//----------------------------------------------------------------------------- +// wxTimer +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGTKTimerImpl : public wxTimerImpl +{ +public: + wxGTKTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { m_sourceId = 0; } + + virtual bool Start( int millisecs = -1, bool oneShot = false ); + virtual void Stop(); + virtual bool IsRunning() const { return m_sourceId != 0; } + +protected: + int m_sourceId; +}; + +#endif // wxUSE_TIMER + +#endif // _WX_GTK_PRIVATE_TIMER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/treeentry_gtk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/treeentry_gtk.h new file mode 100644 index 0000000000..17abe2fc77 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/treeentry_gtk.h @@ -0,0 +1,58 @@ +/* /////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/treeentry_gtk.h +// Purpose: GtkTreeEntry - a string/userdata combo for use with treeview +// Author: Ryan Norton +// Copyright: (c) 2006 Ryan Norton +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////// */ + +#ifndef _WX_GTK_TREE_ENTRY_H_ +#define _WX_GTK_TREE_ENTRY_H_ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include /* for gpointer and gchar* etc. */ + +#define WX_TYPE_TREE_ENTRY wx_tree_entry_get_type() +#define WX_TREE_ENTRY(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, wx_tree_entry_get_type(), wxTreeEntry) +#define WX_IS_TREE_ENTRY(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, wx_tree_entry_get_type()) + +typedef struct _wxTreeEntry wxTreeEntry; + +typedef void (*wxTreeEntryDestroy)(wxTreeEntry* entry, void* context); + +struct _wxTreeEntry +{ + GObject parent; /* object instance */ + gchar* label; /* label - always copied by this object except on get */ + gchar* collate_key; /* collate key used for string comparisons/sorting */ + gpointer userdata; /* untouched userdata */ + wxTreeEntryDestroy destroy_func; /* called upon destruction - use for freeing userdata etc. */ + gpointer destroy_func_data; /* context passed to destroy_func */ +}; + +wxTreeEntry* wx_tree_entry_new(void); + +GType wx_tree_entry_get_type(void); + +char* wx_tree_entry_get_collate_key(wxTreeEntry* entry); + +char* wx_tree_entry_get_label(wxTreeEntry* entry); + +void* wx_tree_entry_get_userdata(wxTreeEntry* entry); + +void wx_tree_entry_set_label(wxTreeEntry* entry, const char* label); + +void wx_tree_entry_set_userdata(wxTreeEntry* entry, void* userdata); + +void wx_tree_entry_set_destroy_func(wxTreeEntry* entry, + wxTreeEntryDestroy destroy_func, + gpointer destroy_func_data); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _WX_GTK_TREE_ENTRY_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/win_gtk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/win_gtk.h new file mode 100644 index 0000000000..0fd421f3bc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/private/win_gtk.h @@ -0,0 +1,35 @@ +/* /////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/win_gtk.h +// Purpose: native GTK+ widget for wxWindow +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////// */ + +#ifndef _WX_GTK_PIZZA_H_ +#define _WX_GTK_PIZZA_H_ + +#define WX_PIZZA(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, wxPizza::type(), wxPizza) +#define WX_IS_PIZZA(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, wxPizza::type()) + +struct WXDLLIMPEXP_CORE wxPizza +{ + // borders styles which can be used with wxPizza + enum { BORDER_STYLES = + wxBORDER_SIMPLE | wxBORDER_RAISED | wxBORDER_SUNKEN | wxBORDER_THEME }; + + static GtkWidget* New(long windowStyle = 0); + static GType type(); + void move(GtkWidget* widget, int x, int y, int width, int height); + void put(GtkWidget* widget, int x, int y, int width, int height); + void scroll(int dx, int dy); + void get_border(GtkBorder& border); + + GtkFixed m_fixed; + GList* m_children; + int m_scroll_x; + int m_scroll_y; + int m_windowStyle; +}; + +#endif // _WX_GTK_PIZZA_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/radiobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/radiobox.h new file mode 100644 index 0000000000..a7f6bd9125 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/radiobox.h @@ -0,0 +1,153 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/radiobox.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_RADIOBOX_H_ +#define _WX_GTK_RADIOBOX_H_ + +#include "wx/bitmap.h" + +class WXDLLIMPEXP_FWD_CORE wxGTKRadioButtonInfo; + +#include "wx/list.h" + +WX_DECLARE_EXPORTED_LIST(wxGTKRadioButtonInfo, wxRadioBoxButtonsInfoList); + + +//----------------------------------------------------------------------------- +// wxRadioBox +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRadioBox : public wxControl, + public wxRadioBoxBase +{ +public: + // ctors and dtor + wxRadioBox() { } + wxRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = (const wxString *) NULL, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); + } + + wxRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Create( parent, id, title, pos, size, choices, majorDim, style, val, name ); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = (const wxString *) NULL, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + + virtual ~wxRadioBox(); + + + // implement wxItemContainerImmutable methods + virtual unsigned int GetCount() const; + + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + + virtual void SetSelection(int n); + virtual int GetSelection() const; + + + // implement wxRadioBoxBase methods + virtual bool Show(unsigned int n, bool show = true); + virtual bool Enable(unsigned int n, bool enable = true); + + virtual bool IsItemEnabled(unsigned int n) const; + virtual bool IsItemShown(unsigned int n) const; + + + // override some base class methods to operate on radiobox itself too + virtual bool Show( bool show = true ); + virtual bool Enable( bool enable = true ); + + virtual void SetLabel( const wxString& label ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + virtual int GetItemFromPoint( const wxPoint& pt ) const; +#if wxUSE_HELP + // override virtual wxWindow::GetHelpTextAtPoint to use common platform independent + // wxRadioBoxBase::DoGetHelpTextAtPoint from the platform independent + // base class-interface wxRadioBoxBase. + virtual wxString GetHelpTextAtPoint(const wxPoint & pt, wxHelpEvent::Origin origin) const + { + return wxRadioBoxBase::DoGetHelpTextAtPoint( this, pt, origin ); + } +#endif // wxUSE_HELP + + // implementation + // -------------- + + void GtkDisableEvents(); + void GtkEnableEvents(); +#if wxUSE_TOOLTIPS + virtual void GTKApplyToolTip(const char* tip); +#endif // wxUSE_TOOLTIPS + + wxRadioBoxButtonsInfoList m_buttonsInfo; + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + +#if wxUSE_TOOLTIPS + virtual void DoSetItemToolTip(unsigned int n, wxToolTip *tooltip); +#endif + + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + virtual bool GTKNeedsToFilterSameWindowFocus() const { return true; } + + virtual bool GTKWidgetNeedsMnemonic() const; + virtual void GTKWidgetDoSetMnemonic(GtkWidget* w); + +private: + DECLARE_DYNAMIC_CLASS(wxRadioBox) +}; + +#endif // _WX_GTK_RADIOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/radiobut.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/radiobut.h new file mode 100644 index 0000000000..165370aa12 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/radiobut.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/radiobut.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_RADIOBUT_H_ +#define _WX_GTK_RADIOBUT_H_ + +//----------------------------------------------------------------------------- +// wxRadioButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRadioButton: public wxControl +{ +public: + wxRadioButton() { } + wxRadioButton( wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr ) + { + Create( parent, id, label, pos, size, style, validator, name ); + } + + bool Create( wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr ); + + virtual void SetLabel(const wxString& label); + virtual void SetValue(bool val); + virtual bool GetValue() const; + virtual bool Enable( bool enable = true ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + +private: + typedef wxControl base_type; + + DECLARE_DYNAMIC_CLASS(wxRadioButton) +}; + +#endif // _WX_GTK_RADIOBUT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/region.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/region.h new file mode 100644 index 0000000000..a2231a1950 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/region.h @@ -0,0 +1,138 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/region.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_REGION_H_ +#define _WX_GTK_REGION_H_ + +#ifdef __WXGTK3__ +typedef struct _cairo_region cairo_region_t; +#endif + +// ---------------------------------------------------------------------------- +// wxRegion +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRegion : public wxRegionBase +{ +public: + wxRegion() { } + + wxRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h ) + { + InitRect(x, y, w, h); + } + + wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight ) + { + InitRect(topLeft.x, topLeft.y, + bottomRight.x - topLeft.x, bottomRight.y - topLeft.y); + } + + wxRegion( const wxRect& rect ) + { + InitRect(rect.x, rect.y, rect.width, rect.height); + } + + wxRegion( size_t n, const wxPoint *points, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); + +#if wxUSE_IMAGE + wxRegion( const wxBitmap& bmp) + { + Union(bmp); + } + wxRegion( const wxBitmap& bmp, + const wxColour& transColour, int tolerance = 0) + { + Union(bmp, transColour, tolerance); + } +#endif // wxUSE_IMAGE + + virtual ~wxRegion(); + + // wxRegionBase methods + virtual void Clear(); + virtual bool IsEmpty() const; + +#ifdef __WXGTK3__ + cairo_region_t* GetRegion() const; +#else + wxRegion(const GdkRegion* region); + GdkRegion *GetRegion() const; +#endif + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + // wxRegionBase pure virtuals + virtual bool DoIsEqual(const wxRegion& region) const; + virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const; + virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const; + virtual wxRegionContain DoContainsRect(const wxRect& rect) const; + + virtual bool DoOffset(wxCoord x, wxCoord y); + virtual bool DoUnionWithRect(const wxRect& rect); + virtual bool DoUnionWithRegion(const wxRegion& region); + virtual bool DoIntersect(const wxRegion& region); + virtual bool DoSubtract(const wxRegion& region); + virtual bool DoXor(const wxRegion& region); + + // common part of ctors for a rectangle region + void InitRect(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + +private: + DECLARE_DYNAMIC_CLASS(wxRegion) +}; + +// ---------------------------------------------------------------------------- +// wxRegionIterator: decomposes a region into rectangles +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRegionIterator: public wxObject +{ +public: + wxRegionIterator(); + wxRegionIterator(const wxRegion& region); + wxRegionIterator(const wxRegionIterator& ri) : wxObject(ri) { Init(); *this = ri; } + ~wxRegionIterator(); + + wxRegionIterator& operator=(const wxRegionIterator& ri); + + void Reset() { m_current = 0u; } + void Reset(const wxRegion& region); + + bool HaveRects() const; + operator bool () const { return HaveRects(); } + + wxRegionIterator& operator ++ (); + wxRegionIterator operator ++ (int); + + wxCoord GetX() const; + wxCoord GetY() const; + wxCoord GetW() const; + wxCoord GetWidth() const { return GetW(); } + wxCoord GetH() const; + wxCoord GetHeight() const { return GetH(); } + wxRect GetRect() const; + +private: + void Init(); + void CreateRects( const wxRegion& r ); + + wxRegion m_region; + wxRect *m_rects; + int m_numRects; + int m_current; + + DECLARE_DYNAMIC_CLASS(wxRegionIterator) +}; + + +#endif + // _WX_GTK_REGION_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/scrolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/scrolbar.h new file mode 100644 index 0000000000..e49bb7a2ce --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/scrolbar.h @@ -0,0 +1,54 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/scrolbar.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_SCROLLBAR_H_ +#define _WX_GTK_SCROLLBAR_H_ + +//----------------------------------------------------------------------------- +// wxScrollBar +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase +{ +public: + wxScrollBar(); + inline wxScrollBar( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr ) + { + Create( parent, id, pos, size, style, validator, name ); + } + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr ); + virtual ~wxScrollBar(); + int GetThumbPosition() const; + int GetThumbSize() const; + int GetPageSize() const; + int GetRange() const; + virtual void SetThumbPosition( int viewStart ); + virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, + bool refresh = true ); + + void SetThumbSize(int thumbSize); + void SetPageSize( int pageLength ); + void SetRange(int range); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + DECLARE_DYNAMIC_CLASS(wxScrollBar) +}; + +#endif // _WX_GTK_SCROLLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/scrolwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/scrolwin.h new file mode 100644 index 0000000000..c36040ce88 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/scrolwin.h @@ -0,0 +1,79 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/scrolwin.h +// Purpose: wxScrolledWindow class +// Author: Robert Roebling +// Modified by: Vadim Zeitlin (2005-10-10): wxScrolledWindow is now common +// Created: 01/02/97 +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_SCROLLWIN_H_ +#define _WX_GTK_SCROLLWIN_H_ + +// ---------------------------------------------------------------------------- +// wxScrolledWindow +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScrollHelper : public wxScrollHelperBase +{ + typedef wxScrollHelperBase base_type; +public: + // default ctor doesn't do anything + wxScrollHelper(wxWindow *win) : wxScrollHelperBase(win) { } + + // implement the base class methods + virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, + int noUnitsX, int noUnitsY, + int xPos = 0, int yPos = 0, + bool noRefresh = false); + virtual void AdjustScrollbars(); + + virtual bool IsScrollbarShown(int orient) const; + +protected: + virtual void DoScroll(int x, int y); + virtual void DoShowScrollbars(wxScrollbarVisibility horz, + wxScrollbarVisibility vert); + +private: + // this does (each) half of AdjustScrollbars() work + void DoAdjustScrollbar(GtkRange* range, + int pixelsPerLine, + int winSize, + int virtSize, + int *pos, + int *lines, + int *linesPerPage); + + void DoAdjustHScrollbar(int winSize, int virtSize) + { + DoAdjustScrollbar + ( + m_win->m_scrollBar[wxWindow::ScrollDir_Horz], + m_xScrollPixelsPerLine, winSize, virtSize, + &m_xScrollPosition, &m_xScrollLines, &m_xScrollLinesPerPage + ); + } + + void DoAdjustVScrollbar(int winSize, int virtSize) + { + DoAdjustScrollbar + ( + m_win->m_scrollBar[wxWindow::ScrollDir_Vert], + m_yScrollPixelsPerLine, winSize, virtSize, + &m_yScrollPosition, &m_yScrollLines, &m_yScrollLinesPerPage + ); + } + + // and this does the same for Scroll() + void DoScrollOneDir(int orient, + int pos, + int pixelsPerLine, + int *posOld); + + wxDECLARE_NO_COPY_CLASS(wxScrollHelper); +}; + +#endif // _WX_GTK_SCROLLWIN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/setup.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/setup.h new file mode 100644 index 0000000000..f2e1182ab7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/setup.h @@ -0,0 +1,1672 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/setup.h +// Purpose: Configuration for the library +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SETUP_H_ +#define _WX_SETUP_H_ + +/* --- start common options --- */ +// ---------------------------------------------------------------------------- +// global settings +// ---------------------------------------------------------------------------- + +// define this to 0 when building wxBase library - this can also be done from +// makefile/project file overriding the value here +#ifndef wxUSE_GUI + #define wxUSE_GUI 1 +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// compatibility settings +// ---------------------------------------------------------------------------- + +// This setting determines the compatibility with 2.6 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_6 0 + +// This setting determines the compatibility with 2.8 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_8 1 + +// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when +// default system font is used for wxWindow::GetCharWidth/Height() instead of +// the current font. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxDIALOG_UNIT_COMPATIBILITY 0 + +// ---------------------------------------------------------------------------- +// debugging settings +// ---------------------------------------------------------------------------- + +// wxDEBUG_LEVEL will be defined as 1 in wx/debug.h so normally there is no +// need to define it here. You may do it for two reasons: either completely +// disable/compile out the asserts in release version (then do it inside #ifdef +// NDEBUG) or, on the contrary, enable more asserts, including the usually +// disabled ones, in the debug build (then do it inside #ifndef NDEBUG) +// +// #ifdef NDEBUG +// #define wxDEBUG_LEVEL 0 +// #else +// #define wxDEBUG_LEVEL 2 +// #endif + +// wxHandleFatalExceptions() may be used to catch the program faults at run +// time and, instead of terminating the program with a usual GPF message box, +// call the user-defined wxApp::OnFatalException() function. If you set +// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work. +// +// This setting is for Win32 only and can only be enabled if your compiler +// supports Win32 structured exception handling (currently only VC++ does) +// +// Default is 1 +// +// Recommended setting: 1 if your compiler supports it. +#define wxUSE_ON_FATAL_EXCEPTION 1 + +// Set this to 1 to be able to generate a human-readable (unlike +// machine-readable minidump created by wxCrashReport::Generate()) stack back +// trace when your program crashes using wxStackWalker +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_STACKWALKER 1 + +// Set this to 1 to compile in wxDebugReport class which allows you to create +// and optionally upload to your web site a debug report consisting of back +// trace of the crash (if wxUSE_STACKWALKER == 1) and other information. +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, it is compiled into a separate library so there +// is no overhead if you don't use it +#define wxUSE_DEBUGREPORT 1 + +// Generic comment about debugging settings: they are very useful if you don't +// use any other memory leak detection tools such as Purify/BoundsChecker, but +// are probably redundant otherwise. Also, Visual C++ CRT has the same features +// as wxWidgets memory debugging subsystem built in since version 5.0 and you +// may prefer to use it instead of built in memory debugging code because it is +// faster and more fool proof. +// +// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG +// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0) +// and if __NO_VC_CRTDBG__ is not defined. + +// The rest of the options in this section are obsolete and not supported, +// enable them at your own risk. + +// If 1, enables wxDebugContext, for writing error messages to file, etc. If +// __WXDEBUG__ is not defined, will still use the normal memory operators. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_CONTEXT 0 + +// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF* +// __WXDEBUG__ is also defined. +// +// WARNING: this code may not work with all architectures, especially if +// alignment is an issue. This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 1 if you are not using a memory debugging tool, else 0 +#define wxUSE_MEMORY_TRACING 0 + +// In debug mode, cause new and delete to be redefined globally. +// If this causes problems (e.g. link errors which is a common problem +// especially if you use another library which also redefines the global new +// and delete), set this to 0. +// This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If +// this causes problems (e.g. link errors), set this to 0. You may need to set +// this to 0 if using templates (at least for VC++). This switch is currently +// ignored for MinGW/Cygwin. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_NEW_ALWAYS 0 + + +// ---------------------------------------------------------------------------- +// Unicode support +// ---------------------------------------------------------------------------- + +// These settings are obsolete: the library is always built in Unicode mode +// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if +// absolutely necessary -- updating it is strongly recommended as the ANSI mode +// will disappear completely in future wxWidgets releases. +#ifndef wxUSE_UNICODE + #define wxUSE_UNICODE 1 +#endif + +// wxUSE_WCHAR_T is required by wxWidgets now, don't change. +#define wxUSE_WCHAR_T 1 + +// ---------------------------------------------------------------------------- +// global features +// ---------------------------------------------------------------------------- + +// Compile library in exception-safe mode? If set to 1, the library will try to +// behave correctly in presence of exceptions (even though it still will not +// use the exceptions itself) and notify the user code about any unhandled +// exceptions. If set to 0, propagation of the exceptions through the library +// code will lead to undefined behaviour -- but the code itself will be +// slightly smaller and faster. +// +// Note that like wxUSE_THREADS this option is automatically set to 0 if +// wxNO_EXCEPTIONS is defined. +// +// Default is 1 +// +// Recommended setting: depends on whether you intend to use C++ exceptions +// in your own code (1 if you do, 0 if you don't) +#define wxUSE_EXCEPTIONS 1 + +// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI +// +// Default is 0 +// +// Recommended setting: 0 (this is still work in progress...) +#define wxUSE_EXTENDED_RTTI 0 + +// Support for message/error logging. This includes wxLogXXX() functions and +// wxLog and derived classes. Don't set this to 0 unless you really know what +// you are doing. +// +// Default is 1 +// +// Recommended setting: 1 (always) +#define wxUSE_LOG 1 + +// Recommended setting: 1 +#define wxUSE_LOGWINDOW 1 + +// Recommended setting: 1 +#define wxUSE_LOGGUI 1 + +// Recommended setting: 1 +#define wxUSE_LOG_DIALOG 1 + +// Support for command line parsing using wxCmdLineParser class. +// +// Default is 1 +// +// Recommended setting: 1 (can be set to 0 if you don't use the cmd line) +#define wxUSE_CMDLINE_PARSER 1 + +// Support for multithreaded applications: if 1, compile in thread classes +// (thread.h) and make the library a bit more thread safe. Although thread +// support is quite stable by now, you may still consider recompiling the +// library without it if you have no use for it - this will result in a +// somewhat smaller and faster operation. +// +// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset +// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in +// build/msw/config.* file this value will have no effect. +// +// Default is 1 +// +// Recommended setting: 0 unless you do plan to develop MT applications +#define wxUSE_THREADS 1 + +// If enabled, compiles wxWidgets streams classes +// +// wx stream classes are used for image IO, process IO redirection, network +// protocols implementation and much more and so disabling this results in a +// lot of other functionality being lost. +// +// Default is 1 +// +// Recommended setting: 1 as setting it to 0 disables many other things +#define wxUSE_STREAMS 1 + +// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. +// Note that if the system's implementation does not support positional +// parameters, setting this to 1 forces the use of the wxWidgets implementation +// of wxVsnprintf. The standard vsnprintf() supports positional parameters on +// many Unix systems but usually doesn't under Windows. +// +// Positional parameters are very useful when translating a program since using +// them in formatting strings allow translators to correctly reorder the +// translated sentences. +// +// Default is 1 +// +// Recommended setting: 1 if you want to support multiple languages +#define wxUSE_PRINTF_POS_PARAMS 1 + +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but is +// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets +// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under +// XP as this triggers a bug in compiler TLS support that results in crashes +// when any TLS variables are used. +// +// If you're absolutely sure that your build of wxWidgets is never going to be +// used in such situation, either because it's not going to be linked from any +// kind of plugin or because you only target Vista or later systems, you can +// set this to 2 to force the use of compiler TLS even under MSW. +// +// Default is 1 meaning that compiler TLS is used only if it's 100% safe. +// +// Recommended setting: 2 if you want to have maximal performance and don't +// care about the scenario described above. +#define wxUSE_COMPILER_TLS 1 + +// ---------------------------------------------------------------------------- +// Interoperability with the standard library. +// ---------------------------------------------------------------------------- + +// Set wxUSE_STL to 1 to enable maximal interoperability with the standard +// library, even at the cost of backwards compatibility. +// +// Default is 0 +// +// Recommended setting: 0 as the options below already provide a relatively +// good level of interoperability and changing this option arguably isn't worth +// diverging from the official builds of the library. +#define wxUSE_STL 0 + +// This is not a real option but is used as the default value for +// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library headers, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_DEFAULT 0 +#else + #define wxUSE_STD_DEFAULT 1 +#endif + +// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<> +// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but +// usually more limited) implementations are used which allows to avoid the +// dependency on the C++ run-time library. +// +// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't +// support using standard containers and that VC6 needs non-default options for +// such build to avoid getting "fatal error C1076: compiler limit : internal +// heap limit reached; use /Zm to specify a higher limit" in its own standard +// headers, so you need to ensure you do increase the heap size before enabling +// this option for this compiler. +// +// Default is 0 for compatibility reasons. +// +// Recommended setting: 1 unless compatibility with the official wxWidgets +// build and/or the existing code is a concern. +#define wxUSE_STD_CONTAINERS 0 + +// Use standard C++ streams if 1 instead of wx streams in some places. If +// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the +// standard streams library. +// +// Notice that enabling this does not replace wx streams with std streams +// everywhere, in a lot of places wx streams are used no matter what. +// +// Default is 1 if compiler supports it. +// +// Recommended setting: 1 if you use the standard streams anyhow and so +// dependency on the standard streams library is not a +// problem +#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT + +// Enable minimal interoperability with the standard C++ string class if 1. +// "Minimal" means that wxString can be constructed from std::string or +// std::wstring but can't be implicitly converted to them. You need to enable +// the option below for the latter. +// +// Default is 1 for most compilers. +// +// Recommended setting: 1 unless you want to ensure your program doesn't use +// the standard C++ library at all. +#define wxUSE_STD_STRING wxUSE_STD_DEFAULT + +// Make wxString as much interchangeable with std::[w]string as possible, in +// particular allow implicit conversion of wxString to either of these classes. +// This comes at a price (or a benefit, depending on your point of view) of not +// allowing implicit conversion to "const char *" and "const wchar_t *". +// +// Because a lot of existing code relies on these conversions, this option is +// disabled by default but can be enabled for your build if you don't care +// about compatibility. +// +// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled. +// +// Recommended setting: 0 to remain compatible with the official builds of +// wxWidgets. +#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL + +// VC++ 4.2 and above allows and but you can't mix +// them. Set this option to 1 to use , 0 to use . +// +// Note that newer compilers (including VC++ 7.1 and later) don't support +// wxUSE_IOSTREAMH == 1 and so will be used anyhow. +// +// Default is 0. +// +// Recommended setting: 0, only set to 1 if you use a really old compiler +#define wxUSE_IOSTREAMH 0 + + +// ---------------------------------------------------------------------------- +// non GUI features selection +// ---------------------------------------------------------------------------- + +// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit +// integer which is implemented in terms of native 64 bit integers if any or +// uses emulation otherwise. +// +// This class is required by wxDateTime and so you should enable it if you want +// to use wxDateTime. For most modern platforms, it will use the native 64 bit +// integers in which case (almost) all of its functions are inline and it +// almost does not take any space, so there should be no reason to switch it +// off. +// +// Recommended setting: 1 +#define wxUSE_LONGLONG 1 + +// Set wxUSE_BASE64 to 1, to compile in Base64 support. This is required for +// storing binary data in wxConfig on most platforms. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_BASE64 1 + +// Set this to 1 to be able to use wxEventLoop even in console applications +// (i.e. using base library only, without GUI). This is mostly useful for +// processing socket events but is also necessary to use timers in console +// applications +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_CONSOLE_EVENTLOOP 1 + +// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level +// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions. +// +// Default is 1 +// +// Recommended setting: 1 (wxFile is highly recommended as it is required by +// i18n code, wxFileConfig and others) +#define wxUSE_FILE 1 +#define wxUSE_FFILE 1 + +// Use wxFSVolume class providing access to the configured/active mount points +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely disabled if you don't use it) +#define wxUSE_FSVOLUME 1 + +// Use wxStandardPaths class which allows to retrieve some standard locations +// in the file system +// +// Default is 1 +// +// Recommended setting: 1 (may be disabled to save space, but not much) +#define wxUSE_STDPATHS 1 + +// use wxTextBuffer class: required by wxTextFile +#define wxUSE_TEXTBUFFER 1 + +// use wxTextFile class: requires wxFile and wxTextBuffer, required by +// wxFileConfig +#define wxUSE_TEXTFILE 1 + +// i18n support: _() macro, wxLocale class. Requires wxTextFile. +#define wxUSE_INTL 1 + +// Provide wxFoo_l() functions similar to standard foo() functions but taking +// an extra locale parameter. +// +// Notice that this is fully implemented only for the systems providing POSIX +// xlocale support or Microsoft Visual C++ >= 8 (which provides proprietary +// almost-equivalent of xlocale functions), otherwise wxFoo_l() functions will +// only work for the current user locale and "C" locale. You can use +// wxHAS_XLOCALE_SUPPORT to test whether the full support is available. +// +// Default is 1 +// +// Recommended setting: 1 but may be disabled if you are writing programs +// running only in C locale anyhow +#define wxUSE_XLOCALE 1 + +// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which +// allow to manipulate dates, times and time intervals. wxDateTime replaces the +// old wxTime and wxDate classes which are still provided for backwards +// compatibility (and implemented in terms of wxDateTime). +// +// Note that this class is relatively new and is still officially in alpha +// stage because some features are not yet (fully) implemented. It is already +// quite useful though and should only be disabled if you are aiming at +// absolutely minimal version of the library. +// +// Requires: wxUSE_LONGLONG +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_DATETIME 1 + +// Set wxUSE_TIMER to 1 to compile wxTimer class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_TIMER 1 + +// Use wxStopWatch clas. +// +// Default is 1 +// +// Recommended setting: 1 (needed by wxSocket) +#define wxUSE_STOPWATCH 1 + +// Set wxUSE_FSWATCHER to 1 if you want to enable wxFileSystemWatcher +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FSWATCHER 1 + +// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes +// which allow the application to store its settings in the persistent +// storage. Setting this to 1 will also enable on-demand creation of the +// global config object in wxApp. +// +// See also wxUSE_CONFIG_NATIVE below. +// +// Recommended setting: 1 +#define wxUSE_CONFIG 1 + +// If wxUSE_CONFIG is 1, you may choose to use either the native config +// classes under Windows (using .INI files under Win16 and the registry under +// Win32) or the portable text file format used by the config classes under +// Unix. +// +// Default is 1 to use native classes. Note that you may still use +// wxFileConfig even if you set this to 1 - just the config object created by +// default for the applications needs will be a wxRegConfig or wxIniConfig and +// not wxFileConfig. +// +// Recommended setting: 1 +#define wxUSE_CONFIG_NATIVE 1 + +// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows +// to connect/disconnect from the network and be notified whenever the dial-up +// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DIALUP_MANAGER 1 + +// Compile in classes for run-time DLL loading and function calling. +// Required by wxUSE_DIALUP_MANAGER. +// +// This setting is for Win32 only +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DYNLIB_CLASS 1 + +// experimental, don't use for now +#define wxUSE_DYNAMIC_LOADER 1 + +// Set to 1 to use socket classes +#define wxUSE_SOCKETS 1 + +// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS) +// +// Notice that currently setting this option under Windows will result in +// programs which can only run on recent OS versions (with ws2_32.dll +// installed) which is why it is disabled by default. +// +// Default is 1. +// +// Recommended setting: 1 if you need IPv6 support +#define wxUSE_IPV6 0 + +// Set to 1 to enable virtual file systems (required by wxHTML) +#define wxUSE_FILESYSTEM 1 + +// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ZIP 1 + +// Set to 1 to enable virtual archive filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ARCHIVE 1 + +// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_INET 1 + +// wxArchive classes for accessing archives such as zip and tar +#define wxUSE_ARCHIVE_STREAMS 1 + +// Set to 1 to compile wxZipInput/OutputStream classes. +#define wxUSE_ZIPSTREAM 1 + +// Set to 1 to compile wxTarInput/OutputStream classes. +#define wxUSE_TARSTREAM 1 + +// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by +// wxUSE_LIBPNG +#define wxUSE_ZLIB 1 + +// If enabled, the code written by Apple will be used to write, in a portable +// way, float on the disk. See extended.c for the license which is different +// from wxWidgets one. +// +// Default is 1. +// +// Recommended setting: 1 unless you don't like the license terms (unlikely) +#define wxUSE_APPLE_IEEE 1 + +// Joystick support class +#define wxUSE_JOYSTICK 1 + +// wxFontEnumerator class +#define wxUSE_FONTENUM 1 + +// wxFontMapper class +#define wxUSE_FONTMAP 1 + +// wxMimeTypesManager class +#define wxUSE_MIMETYPE 1 + +// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP +// or wxURL you need to set this to 1. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_PROTOCOL 1 + +// The settings for the individual URL schemes +#define wxUSE_PROTOCOL_FILE 1 +#define wxUSE_PROTOCOL_FTP 1 +#define wxUSE_PROTOCOL_HTTP 1 + +// Define this to use wxURL class. +#define wxUSE_URL 1 + +// Define this to use native platform url and protocol support. +// Currently valid only for MS-Windows. +// Note: if you set this to 1, you can open ftp/http/gopher sites +// and obtain a valid input stream for these sites +// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0. +// Doing so reduces the code size. +// +// This code is experimental and subject to change. +#define wxUSE_URL_NATIVE 0 + +// Support for wxVariant class used in several places throughout the library, +// notably in wxDataViewCtrl API. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size as much as +// possible in which case setting this to 0 can gain up to 100KB. +#define wxUSE_VARIANT 1 + +// Support for wxAny class, the successor for wxVariant. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size by a small amount, +// or your compiler cannot for some reason cope with complexity of templates used. +#define wxUSE_ANY 1 + +// Support for regular expression matching via wxRegEx class: enable this to +// use POSIX regular expressions in your code. You need to compile regex +// library from src/regex to use it under Windows. +// +// Default is 0 +// +// Recommended setting: 1 if your compiler supports it, if it doesn't please +// contribute us a makefile for src/regex for it +#define wxUSE_REGEX 1 + +// wxSystemOptions class +#define wxUSE_SYSTEM_OPTIONS 1 + +// wxSound class +#define wxUSE_SOUND 1 + +// Use wxMediaCtrl +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_MEDIACTRL 1 + +// Use wxWidget's XRC XML-based resource system. Recommended. +// +// Default is 1 +// +// Recommended setting: 1 (requires wxUSE_XML) +#define wxUSE_XRC 1 + +// XML parsing classes. Note that their API will change in the future, so +// using wxXmlDocument and wxXmlNode in your app is not recommended. +// +// Default is the same as wxUSE_XRC, i.e. 1 by default. +// +// Recommended setting: 1 (required by XRC) +#define wxUSE_XML wxUSE_XRC + +// Use wxWidget's AUI docking system +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_AUI 1 + +// Use wxWidget's Ribbon classes for interfaces +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_RIBBON 1 + +// Use wxPropertyGrid. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_PROPGRID 1 + +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + +// Use wxWidget's web viewing classes +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW 1 + +// Use the IE wxWebView backend +// +// Default is 1 on MSW +// +// Recommended setting: 1 +#ifdef __WXMSW__ +#define wxUSE_WEBVIEW_IE 1 +#else +#define wxUSE_WEBVIEW_IE 0 +#endif + +// Use the WebKit wxWebView backend +// +// Default is 1 on GTK and OSX +// +// Recommended setting: 1 +#if defined(__WXGTK__) || defined(__WXOSX__) +#define wxUSE_WEBVIEW_WEBKIT 1 +#else +#define wxUSE_WEBVIEW_WEBKIT 0 +#endif + +// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced +// 2D drawing API. (Still somewhat experimental) +// +// Please note that on Windows gdiplus.dll is loaded dynamically which means +// that nothing special needs to be done as long as you don't use +// wxGraphicsContext at all or only use it on XP and later systems but you +// still do need to distribute it yourself for an application using +// wxGraphicsContext to be runnable on pre-XP systems. +// +// Default is 1 except if you're using a non-Microsoft compiler under Windows +// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. +// mingw32) you may need to install the headers (and just the headers) +// yourself. If you do, change the setting below manually. +// +// Recommended setting: 1 if supported by the compilation environment + +// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is +// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined +#ifdef _MSC_VER +# if _MSC_VER >= 1310 + // MSVC7.1+ comes with new enough Platform SDK, enable + // wxGraphicsContext support for it +# define wxUSE_GRAPHICS_CONTEXT 1 +# else + // MSVC 6 didn't include GDI+ headers so disable by default, enable it + // here if you use MSVC 6 with a newer SDK +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#else + // Disable support for other Windows compilers, enable it if your compiler + // comes with new enough SDK or you installed the headers manually. + // + // Notice that this will be set by configure under non-Windows platforms + // anyhow so the value there is not important. +# define wxUSE_GRAPHICS_CONTEXT 0 +#endif + +// Enable wxGraphicsContext implementation using Cairo library. +// +// This is not needed under Windows and detected automatically by configure +// under other systems, however you may set this to 1 manually if you installed +// Cairo under Windows yourself and prefer to use it instead the native GDI+ +// implementation. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_CAIRO 0 + + +// ---------------------------------------------------------------------------- +// Individual GUI controls +// ---------------------------------------------------------------------------- + +// You must set wxUSE_CONTROLS to 1 if you are using any controls at all +// (without it, wxControl class is not compiled) +// +// Default is 1 +// +// Recommended setting: 1 (don't change except for very special programs) +#define wxUSE_CONTROLS 1 + +// Support markup in control labels, i.e. provide wxControl::SetLabelMarkup(). +// Currently markup is supported only by a few controls and only some ports but +// their number will increase with time. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you want to save on code size) +#define wxUSE_MARKUP 1 + +// wxPopupWindow class is a top level transient window. It is currently used +// to implement wxTipWindow +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW) +#define wxUSE_POPUPWIN 1 + +// wxTipWindow allows to implement the custom tooltips, it is used by the +// context help classes. Requires wxUSE_POPUPWIN. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0) +#define wxUSE_TIPWINDOW 1 + +// Each of the settings below corresponds to one wxWidgets control. They are +// all switched on by default but may be disabled if you are sure that your +// program (including any standard dialogs it can show!) doesn't need them and +// if you desperately want to save some space. If you use any of these you must +// set wxUSE_CONTROLS as well. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl +#define wxUSE_BANNERWINDOW 1 // wxBannerWindow +#define wxUSE_BUTTON 1 // wxButton +#define wxUSE_BMPBUTTON 1 // wxBitmapButton +#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl +#define wxUSE_CHECKBOX 1 // wxCheckBox +#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHOICE 1 // wxChoice +#define wxUSE_COLLPANE 1 // wxCollapsiblePane +#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl +#define wxUSE_COMBOBOX 1 // wxComboBox +#define wxUSE_COMMANDLINKBUTTON 1 // wxCommandLinkButton +#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl +#define wxUSE_DATEPICKCTRL 1 // wxDatePickerCtrl +#define wxUSE_DIRPICKERCTRL 1 // wxDirPickerCtrl +#define wxUSE_EDITABLELISTBOX 1 // wxEditableListBox +#define wxUSE_FILECTRL 1 // wxFileCtrl +#define wxUSE_FILEPICKERCTRL 1 // wxFilePickerCtrl +#define wxUSE_FONTPICKERCTRL 1 // wxFontPickerCtrl +#define wxUSE_GAUGE 1 // wxGauge +#define wxUSE_HEADERCTRL 1 // wxHeaderCtrl +#define wxUSE_HYPERLINKCTRL 1 // wxHyperlinkCtrl +#define wxUSE_LISTBOX 1 // wxListBox +#define wxUSE_LISTCTRL 1 // wxListCtrl +#define wxUSE_RADIOBOX 1 // wxRadioBox +#define wxUSE_RADIOBTN 1 // wxRadioButton +#define wxUSE_RICHMSGDLG 1 // wxRichMessageDialog +#define wxUSE_SCROLLBAR 1 // wxScrollBar +#define wxUSE_SEARCHCTRL 1 // wxSearchCtrl +#define wxUSE_SLIDER 1 // wxSlider +#define wxUSE_SPINBTN 1 // wxSpinButton +#define wxUSE_SPINCTRL 1 // wxSpinCtrl +#define wxUSE_STATBOX 1 // wxStaticBox +#define wxUSE_STATLINE 1 // wxStaticLine +#define wxUSE_STATTEXT 1 // wxStaticText +#define wxUSE_STATBMP 1 // wxStaticBitmap +#define wxUSE_TEXTCTRL 1 // wxTextCtrl +#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl +#define wxUSE_TOGGLEBTN 1 // requires wxButton +#define wxUSE_TREECTRL 1 // wxTreeCtrl +#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl + +// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR +// below either wxStatusBar95 or a generic wxStatusBar will be used. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STATUSBAR 1 + +// Two status bar implementations are available under Win32: the generic one +// or the wrapper around native control. For native look and feel the native +// version should be used. +// +// Default is 1 for the platforms where native status bar is supported. +// +// Recommended setting: 1 (there is no advantage in using the generic one) +#define wxUSE_NATIVE_STATUSBAR 1 + +// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar +// classes at all. Otherwise, use the native toolbar class unless +// wxUSE_TOOLBAR_NATIVE is 0. +// +// Default is 1 for all settings. +// +// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE. +#define wxUSE_TOOLBAR 1 +#define wxUSE_TOOLBAR_NATIVE 1 + +// wxNotebook is a control with several "tabs" located on one of its sides. It +// may be used to logically organise the data presented to the user instead of +// putting everything in one huge dialog. It replaces wxTabControl and related +// classes of wxWin 1.6x. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTEBOOK 1 + +// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_LISTBOOK 1 + +// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CHOICEBOOK 1 + +// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TREEBOOK 1 + +// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of +// tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLBOOK 1 + +// wxTaskBarIcon is a small notification icon shown in the system toolbar or +// dock. +// +// Default is 1. +// +// Recommended setting: 1 (but can be set to 0 if you don't need it) +#define wxUSE_TASKBARICON 1 + +// wxGrid class +// +// Default is 1, set to 0 to cut down compilation time and binaries size if you +// don't use it. +// +// Recommended setting: 1 +// +#define wxUSE_GRID 1 + +// wxMiniFrame class: a frame with narrow title bar +// +// Default is 1. +// +// Recommended setting: 1 (it doesn't cost almost anything) +#define wxUSE_MINIFRAME 1 + +// wxComboCtrl and related classes: combobox with custom popup window and +// not necessarily a listbox. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it +// it used by wxComboBox +#define wxUSE_COMBOCTRL 1 + +// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox +// items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0, except where it is +// needed as a base class for generic wxBitmapComboBox. +#define wxUSE_ODCOMBOBOX 1 + +// wxBitmapComboBox is a combobox that can have images in front of text items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 +#define wxUSE_BITMAPCOMBOBOX 1 + +// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items +// up and down in it. It is also used as part of wxRearrangeDialog. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 (currently used only by +// wxHeaderCtrl) +#define wxUSE_REARRANGECTRL 1 + +// ---------------------------------------------------------------------------- +// Miscellaneous GUI stuff +// ---------------------------------------------------------------------------- + +// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar) +#define wxUSE_ACCEL 1 + +// Use the standard art provider. The icons returned by this provider are +// embedded into the library as XPMs so disabling it reduces the library size +// somewhat but this should only be done if you use your own custom art +// provider returning the icons or never use any icons not provided by the +// native art provider (which might not be implemented at all for some +// platforms) or by the Tango icons provider (if it's not itself disabled +// below). +// +// Default is 1. +// +// Recommended setting: 1 unless you use your own custom art provider. +#define wxUSE_ARTPROVIDER_STD 1 + +// Use art provider providing Tango icons: this art provider has higher quality +// icons than the default ones using smaller size XPM icons without +// transparency but the embedded PNG icons add to the library size. +// +// Default is 1 under non-GTK ports. Under wxGTK the native art provider using +// the GTK+ stock icons replaces it so it is normally not necessary. +// +// Recommended setting: 1 but can be turned off to reduce the library size. +#define wxUSE_ARTPROVIDER_TANGO 1 + +// Hotkey support (currently Windows only) +#define wxUSE_HOTKEY 1 + +// Use wxCaret: a class implementing a "cursor" in a text control (called caret +// under Windows). +// +// Default is 1. +// +// Recommended setting: 1 (can be safely set to 0, not used by the library) +#define wxUSE_CARET 1 + +// Use wxDisplay class: it allows enumerating all displays on a system and +// their geometries as well as finding the display on which the given point or +// window lies. +// +// Default is 1. +// +// Recommended setting: 1 if you need it, can be safely set to 0 otherwise +#define wxUSE_DISPLAY 1 + +// Miscellaneous geometry code: needed for Canvas library +#define wxUSE_GEOMETRY 1 + +// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and +// wxListCtrl. +// +// Default is 1. +// +// Recommended setting: 1 (set it to 0 if you don't use any of the controls +// enumerated above, then this class is mostly useless too) +#define wxUSE_IMAGLIST 1 + +// Use wxInfoBar class. +// +// Default is 1. +// +// Recommended setting: 1 (but can be disabled without problems as nothing +// depends on it) +#define wxUSE_INFOBAR 1 + +// Use wxMenu, wxMenuBar, wxMenuItem. +// +// Default is 1. +// +// Recommended setting: 1 (can't be disabled under MSW) +#define wxUSE_MENUS 1 + +// Use wxNotificationMessage. +// +// wxNotificationMessage allows to show non-intrusive messages to the user +// using balloons, banners, popups or whatever is the appropriate method for +// the current platform. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTIFICATION_MESSAGE 1 + +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + +// wxRichToolTip is a customizable tooltip class which has more functionality +// than the stock (but native, unlike this class) wxToolTip. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely set to 0 if you don't need it) +#define wxUSE_RICHTOOLTIP 1 + +// Use wxSashWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SASH 1 + +// Use wxSplitterWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SPLITTER 1 + +// Use wxToolTip and wxWindow::Set/GetToolTip() methods. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLTIPS 1 + +// wxValidator class and related methods +#define wxUSE_VALIDATORS 1 + +// Use reference counted ID management: this means that wxWidgets will track +// the automatically allocated ids (those used when you use wxID_ANY when +// creating a window, menu or toolbar item &c) instead of just supposing that +// the program never runs out of them. This is mostly useful only under wxMSW +// where the total ids range is limited to SHRT_MIN..SHRT_MAX and where +// long-running programs can run into problems with ids reuse without this. On +// the other platforms, where the ids have the full int range, this shouldn't +// be necessary. +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif + +// ---------------------------------------------------------------------------- +// common dialogs +// ---------------------------------------------------------------------------- + +// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g. +// file selector, printer dialog). Switching this off also switches off the +// printing architecture and interactive wxPrinterDC. +// +// Default is 1 +// +// Recommended setting: 1 (unless it really doesn't work) +#define wxUSE_COMMON_DIALOGS 1 + +// wxBusyInfo displays window with message when app is busy. Works in same way +// as wxBusyCursor +#define wxUSE_BUSYINFO 1 + +// Use single/multiple choice dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_CHOICEDLG 1 + +// Use colour picker dialog +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_COLOURDLG 1 + +// wxDirDlg class for getting a directory name from user +#define wxUSE_DIRDLG 1 + +// TODO: setting to choose the generic or native one + +// Use file open/save dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in many places in the library itself) +#define wxUSE_FILEDLG 1 + +// Use find/replace dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely set to 0) +#define wxUSE_FINDREPLDLG 1 + +// Use font picker dialog +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_FONTDLG 1 + +// Use wxMessageDialog and wxMessageBox. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_MSGDLG 1 + +// progress dialog class for lengthy operations +#define wxUSE_PROGRESSDLG 1 + +// support for startup tips (wxShowTip &c) +#define wxUSE_STARTUP_TIPS 1 + +// text entry dialog and wxGetTextFromUser function +#define wxUSE_TEXTDLG 1 + +// number entry dialog +#define wxUSE_NUMBERDLG 1 + +// splash screen class +#define wxUSE_SPLASH 1 + +// wizards +#define wxUSE_WIZARDDLG 1 + +// Compile in wxAboutBox() function showing the standard "About" dialog. +// +// Default is 1 +// +// Recommended setting: 1 but can be set to 0 to save some space if you don't +// use this function +#define wxUSE_ABOUTDLG 1 + +// wxFileHistory class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FILE_HISTORY 1 + +// ---------------------------------------------------------------------------- +// Metafiles support +// ---------------------------------------------------------------------------- + +// Windows supports the graphics format known as metafile which is, though not +// portable, is widely used under Windows and so is supported by wxWin (under +// Windows only, of course). Win16 (Win3.1) used the so-called "Window +// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in +// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by +// default, WMFs will be used under Win16 and EMFs under Win32. This may be +// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting +// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile +// in any metafile related classes at all. +// +// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS. +// +// Recommended setting: default or 0 for everything for portable programs. +#define wxUSE_METAFILE 1 +#define wxUSE_ENH_METAFILE 1 +#define wxUSE_WIN_METAFILES_ALWAYS 0 + +// ---------------------------------------------------------------------------- +// Big GUI components +// ---------------------------------------------------------------------------- + +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + +// Set to 0 to disable document/view architecture +#define wxUSE_DOC_VIEW_ARCHITECTURE 1 + +// Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 1 + +// Set to 0 to disable print/preview architecture code +#define wxUSE_PRINTING_ARCHITECTURE 1 + +// wxHTML sublibrary allows to display HTML in wxWindow programs and much, +// much more. +// +// Default is 1. +// +// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a +// smaller library. +#define wxUSE_HTML 1 + +// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL +// headers and libraries to be able to compile the library with wxUSE_GLCANVAS +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). +// +// Default is 1 unless the compiler is known to ship without the necessary +// headers (Digital Mars) or the platform doesn't support OpenGL (Windows CE). +// +// Recommended setting: 1 if you intend to use OpenGL, can be safely set to 0 +// otherwise. +#define wxUSE_GLCANVAS 1 + +// wxRichTextCtrl allows editing of styled text. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 if you want compile a +// smaller library. +#define wxUSE_RICHTEXT 1 + +// ---------------------------------------------------------------------------- +// Data transfer +// ---------------------------------------------------------------------------- + +// Use wxClipboard class for clipboard copy/paste. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CLIPBOARD 1 + +// Use wxDataObject and related classes. Needed for clipboard and OLE drag and +// drop +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DATAOBJ 1 + +// Use wxDropTarget and wxDropSource classes for drag and drop (this is +// different from "built in" drag and drop in wxTreeCtrl which is always +// available). Requires wxUSE_DATAOBJ. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DRAG_AND_DROP 1 + +// Use wxAccessible for enhanced and customisable accessibility. +// Depends on wxUSE_OLE. +// +// Default is 0. +// +// Recommended setting (at present): 0 +#define wxUSE_ACCESSIBILITY 0 + +// ---------------------------------------------------------------------------- +// miscellaneous settings +// ---------------------------------------------------------------------------- + +// wxSingleInstanceChecker class allows to verify at startup if another program +// instance is running. +// +// Default is 1 +// +// Recommended setting: 1 (the class is tiny, disabling it won't save much +// space) +#define wxUSE_SNGLINST_CHECKER 1 + +#define wxUSE_DRAGIMAGE 1 + +#define wxUSE_IPC 1 + // 0 for no interprocess comms +#define wxUSE_HELP 1 + // 0 for no help facility + +// Should we use MS HTML help for wxHelpController? If disabled, neither +// wxCHMHelpController nor wxBestHelpController are available. +// +// Default is 1 under MSW, 0 is always used for the other platforms. +// +// Recommended setting: 1, only set to 0 if you have trouble compiling +// wxCHMHelpController (could be a problem with really ancient compilers) +#define wxUSE_MS_HTML_HELP 1 + + +// Use wxHTML-based help controller? +#define wxUSE_WXHTML_HELP 1 + +#define wxUSE_CONSTRAINTS 1 + // 0 for no window layout constraint system + +#define wxUSE_SPLINES 1 + // 0 for no splines + +#define wxUSE_MOUSEWHEEL 1 + // Include mouse wheel support + +// Compile wxUIActionSimulator class? +#define wxUSE_UIACTIONSIMULATOR 1 + +// ---------------------------------------------------------------------------- +// wxDC classes for various output formats +// ---------------------------------------------------------------------------- + +// Set to 1 for PostScript device context. +#define wxUSE_POSTSCRIPT 0 + +// Set to 1 to use font metric files in GetTextExtent +#define wxUSE_AFM_FOR_POSTSCRIPT 1 + +// Set to 1 to compile in support for wxSVGFileDC, a wxDC subclass which allows +// to create files in SVG (Scalable Vector Graphics) format. +#define wxUSE_SVG 1 + +// Should wxDC provide SetTransformMatrix() and related methods? +// +// Default is 1 but can be set to 0 if this functionality is not used. Notice +// that currently only wxMSW supports this so setting this to 0 doesn't change +// much for non-MSW platforms (although it will still save a few bytes +// probably). +// +// Recommended setting: 1. +#define wxUSE_DC_TRANSFORM_MATRIX 1 + +// ---------------------------------------------------------------------------- +// image format support +// ---------------------------------------------------------------------------- + +// wxImage supports many different image formats which can be configured at +// compile-time. BMP is always supported, others are optional and can be safely +// disabled if you don't plan to use images in such format sometimes saving +// substantial amount of code in the final library. +// +// Some formats require an extra library which is included in wxWin sources +// which is mentioned if it is the case. + +// Set to 1 for wxImage support (recommended). +#define wxUSE_IMAGE 1 + +// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB. +#define wxUSE_LIBPNG 1 + +// Set to 1 for JPEG format support (requires libjpeg) +#define wxUSE_LIBJPEG 1 + +// Set to 1 for TIFF format support (requires libtiff) +#define wxUSE_LIBTIFF 1 + +// Set to 1 for TGA format support (loading only) +#define wxUSE_TGA 1 + +// Set to 1 for GIF format support +#define wxUSE_GIF 1 + +// Set to 1 for PNM format support +#define wxUSE_PNM 1 + +// Set to 1 for PCX format support +#define wxUSE_PCX 1 + +// Set to 1 for IFF format support (Amiga format) +#define wxUSE_IFF 0 + +// Set to 1 for XPM format support +#define wxUSE_XPM 1 + +// Set to 1 for MS Icons and Cursors format support +#define wxUSE_ICO_CUR 1 + +// Set to 1 to compile in wxPalette class +#define wxUSE_PALETTE 1 + +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 + + +/* --- end common options --- */ + +/* --- start MSW options --- */ +// ---------------------------------------------------------------------------- +// Windows-only settings +// ---------------------------------------------------------------------------- + +// Set wxUSE_UNICODE_MSLU to 1 if you're compiling wxWidgets in Unicode mode +// and want to run your programs under Windows 9x and not only NT/2000/XP. +// This setting enables use of unicows.dll from MSLU (MS Layer for Unicode, see +// http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx). Note +// that you will have to modify the makefiles to include unicows.lib import +// library as the first library (see installation instructions in install.txt +// to learn how to do it when building the library or samples). +// +// If your compiler doesn't have unicows.lib, you can get a version of it at +// http://libunicows.sourceforge.net +// +// Default is 0 +// +// Recommended setting: 0 (1 if you want to deploy Unicode apps on 9x systems) +#ifndef wxUSE_UNICODE_MSLU + #define wxUSE_UNICODE_MSLU 0 +#endif + +// Set this to 1 if you want to use wxWidgets and MFC in the same program. This +// will override some other settings (see below) +// +// Default is 0. +// +// Recommended setting: 0 unless you really have to use MFC +#define wxUSE_MFC 0 + +// Set this to 1 for generic OLE support: this is required for drag-and-drop, +// clipboard, OLE Automation. Only set it to 0 if your compiler is very old and +// can't compile/doesn't have the OLE headers. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_OLE 1 + +// Set this to 1 to enable wxAutomationObject class. +// +// Default is 1. +// +// Recommended setting: 1 if you need to control other applications via OLE +// Automation, can be safely set to 0 otherwise +#define wxUSE_OLE_AUTOMATION 1 + +// Set this to 1 to enable wxActiveXContainer class allowing to embed OLE +// controls in wx. +// +// Default is 1. +// +// Recommended setting: 1, required by wxMediaCtrl +#define wxUSE_ACTIVEX 1 + +// wxDC caching implementation +#define wxUSE_DC_CACHEING 1 + +// Set this to 1 to enable wxDIB class used internally for manipulating +// wxBitmap data. +// +// Default is 1, set it to 0 only if you don't use wxImage neither +// +// Recommended setting: 1 (without it conversion to/from wxImage won't work) +#define wxUSE_WXDIB 1 + +// Set to 0 to disable PostScript print/preview architecture code under Windows +// (just use Windows printing). +#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1 + +// Set this to 1 to compile in wxRegKey class. +// +// Default is 1 +// +// Recommended setting: 1, this is used internally by wx in a few places +#define wxUSE_REGKEY 1 + +// Set this to 1 to use RICHEDIT controls for wxTextCtrl with style wxTE_RICH +// which allows to put more than ~32Kb of text in it even under Win9x (NT +// doesn't have such limitation). +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1, only set it to 0 if your compiler doesn't have +// or can't compile +#define wxUSE_RICHEDIT 1 + +// Set this to 1 to use extra features of richedit v2 and later controls +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1 +#define wxUSE_RICHEDIT2 1 + +// Set this to 1 to enable support for the owner-drawn menu and listboxes. This +// is required by wxUSE_CHECKLISTBOX. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 for a small library size reduction +#define wxUSE_OWNER_DRAWN 1 + +// Set this to 1 to enable MSW-specific wxTaskBarIcon::ShowBalloon() method. It +// is required by native wxNotificationMessage implementation. +// +// Default is 1 but disabled in wx/msw/chkconf.h if SDK is too old to contain +// the necessary declarations. +// +// Recommended setting: 1, set to 0 for a tiny library size reduction +#define wxUSE_TASKBARICON_BALLOONS 1 + +// Set to 1 to compile MS Windows XP theme engine support +#define wxUSE_UXTHEME 1 + +// Set to 1 to use InkEdit control (Tablet PC), if available +#define wxUSE_INKEDIT 0 + +// Set to 1 to enable .INI files based wxConfig implementation (wxIniConfig) +// +// Default is 0. +// +// Recommended setting: 0, nobody uses .INI files any more +#define wxUSE_INICONF 0 + +// ---------------------------------------------------------------------------- +// Generic versions of native controls +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxDatePickerCtrlGeneric in addition to the +// native wxDatePickerCtrl +// +// Default is 0. +// +// Recommended setting: 0, this is mainly used for testing +#define wxUSE_DATEPICKCTRL_GENERIC 0 + +// Set this to 1 to be able to use wxTimePickerCtrlGeneric in addition to the +// native wxTimePickerCtrl for the platforms that have the latter (MSW). +// +// Default is 0. +// +// Recommended setting: 0, this is mainly used for testing +#define wxUSE_TIMEPICKCTRL_GENERIC 0 + +// ---------------------------------------------------------------------------- +// Crash debugging helpers +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxCrashReport::Generate() to create mini +// dumps of your program when it crashes (or at any other moment) +// +// Default is 1 if supported by the compiler (VC++ and recent BC++ only). +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_CRASHREPORT 1 +/* --- end MSW options --- */ + +// GTK-specific options used when not using configure. As we can't test for the +// exact GTK version (without including GTK+ headers that we don't want to +// include from our own public headers), just assume a recent GTK 2.x. +#define __WXGTK20__ +#define __WXGTK210__ +#define __WXGTK218__ +//#define __WXGTK3__ + +#endif // _WX_SETUP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/slider.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/slider.h new file mode 100644 index 0000000000..f8833c4685 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/slider.h @@ -0,0 +1,84 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/slider.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_SLIDER_H_ +#define _WX_GTK_SLIDER_H_ + +// ---------------------------------------------------------------------------- +// wxSlider +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase +{ +public: + wxSlider(); + wxSlider(wxWindow *parent, + wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr) + { + Create( parent, id, value, minValue, maxValue, + pos, size, style, validator, name ); + } + ~wxSlider(); + + bool Create(wxWindow *parent, + wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr); + + // implement the base class pure virtuals + virtual int GetValue() const; + virtual void SetValue(int value); + + virtual void SetRange(int minValue, int maxValue); + virtual int GetMin() const; + virtual int GetMax() const; + + virtual void SetLineSize(int lineSize); + virtual void SetPageSize(int pageSize); + virtual int GetLineSize() const; + virtual int GetPageSize() const; + + virtual void SetThumbLength(int lenPixels); + virtual int GetThumbLength() const; + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + void GTKDisableEvents(); + void GTKEnableEvents(); + bool GTKEventsDisabled() const; + + double m_pos; + int m_scrollEventType; + bool m_needThumbRelease; + GtkWidget *m_scale; + +protected: + GtkWidget *m_minLabel,*m_maxLabel; + bool m_blockScrollEvent; + + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + // set the slider value unconditionally + void GTKSetValue(int value); + + DECLARE_DYNAMIC_CLASS(wxSlider) +}; + +#endif // _WX_GTK_SLIDER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/spinbutt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/spinbutt.h new file mode 100644 index 0000000000..4bd71f4746 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/spinbutt.h @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/spinbutt.h +// Purpose: wxSpinButton class +// Author: Robert Roebling +// Modified by: +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_SPINBUTT_H_ +#define _WX_GTK_SPINBUTT_H_ + +//----------------------------------------------------------------------------- +// wxSpinButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase +{ +public: + wxSpinButton(); + wxSpinButton(wxWindow *parent, + wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL, + const wxString& name = wxSPIN_BUTTON_NAME) + { + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL, + const wxString& name = wxSPIN_BUTTON_NAME); + + virtual int GetValue() const; + virtual void SetValue( int value ); + virtual void SetRange( int minVal, int maxVal ); + virtual int GetMin() const; + virtual int GetMax() const; + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + virtual bool Enable( bool enable = true ); + + // implementation + int m_pos; + +protected: + void GtkDisableEvents() const; + void GtkEnableEvents() const; + + virtual wxSize DoGetBestSize() const; + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + +private: + typedef wxSpinButtonBase base_type; + + DECLARE_DYNAMIC_CLASS(wxSpinButton) +}; + +#endif // _WX_GTK_SPINBUTT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/spinctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/spinctrl.h new file mode 100644 index 0000000000..ef7b6edb7d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/spinctrl.h @@ -0,0 +1,205 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/spinctrl.h +// Purpose: wxSpinCtrl class +// Author: Robert Roebling +// Modified by: +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_SPINCTRL_H_ +#define _WX_GTK_SPINCTRL_H_ + +//----------------------------------------------------------------------------- +// wxSpinCtrlGTKBase - Base class for GTK versions of the wxSpinCtrl[Double] +// +// This class manages a double valued GTK spinctrl through the DoGet/SetXXX +// functions that are made public as Get/SetXXX functions for int or double +// for the wxSpinCtrl and wxSpinCtrlDouble classes respectively to avoid +// function ambiguity. +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinCtrlGTKBase : public wxSpinCtrlBase +{ +public: + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + long style, + double min, double max, double initial, + double inc, + const wxString& name); + + // wxSpinCtrl(Double) methods call DoXXX functions of the same name + + // accessors + // T GetValue() const + // T GetMin() const + // T GetMax() const + // T GetIncrement() const + virtual bool GetSnapToTicks() const; + + // operations + virtual void SetValue(const wxString& value); + // void SetValue(T val) + // void SetRange(T minVal, T maxVal) + // void SetIncrement(T inc) + void SetSnapToTicks( bool snap_to_ticks ); + + // Select text in the textctrl + void SetSelection(long from, long to); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + void OnChar( wxKeyEvent &event ); + +protected: + double DoGetValue() const; + double DoGetMin() const; + double DoGetMax() const; + double DoGetIncrement() const; + + void DoSetValue(double val); + void DoSetValue(const wxString& strValue); + void DoSetRange(double min_val, double max_val); + void DoSetIncrement(double inc); + + void GtkDisableEvents() const; + void GtkEnableEvents() const; + + virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + // Widgets that use the style->base colour for the BG colour should + // override this and return true. + virtual bool UseGTKStyleBase() const { return true; } + + friend class wxSpinCtrlEventDisabler; + + DECLARE_EVENT_TABLE() +}; + +//----------------------------------------------------------------------------- +// wxSpinCtrl - An integer valued spin control +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinCtrlGTKBase +{ +public: + wxSpinCtrl() { Init(); } + wxSpinCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + int min = 0, int max = 100, int initial = 0, + const wxString& name = wxS("wxSpinCtrl")) + { + Init(); + + Create(parent, id, value, pos, size, style, min, max, initial, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + int min = 0, int max = 100, int initial = 0, + const wxString& name = wxS("wxSpinCtrl")) + { + return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size, + style, min, max, initial, 1, name); + } + + // accessors + int GetValue() const { return int(DoGetValue()); } + int GetMin() const { return int(DoGetMin()); } + int GetMax() const { return int(DoGetMax()); } + int GetIncrement() const { return int(DoGetIncrement()); } + + // operations + void SetValue(const wxString& value) { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc + void SetValue( int value ) { DoSetValue(value); } + void SetRange( int minVal, int maxVal ) { DoSetRange(minVal, maxVal); } + void SetIncrement(int inc) { DoSetIncrement(inc); } + + virtual int GetBase() const { return m_base; } + virtual bool SetBase(int base); + +private: + // Common part of all ctors. + void Init() + { + m_base = 10; + } + + int m_base; + + DECLARE_DYNAMIC_CLASS(wxSpinCtrl) +}; + +//----------------------------------------------------------------------------- +// wxSpinCtrlDouble - a double valued spin control +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinCtrlDouble : public wxSpinCtrlGTKBase +{ +public: + wxSpinCtrlDouble() {} + wxSpinCtrlDouble(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + double min = 0, double max = 100, double initial = 0, + double inc = 1, + const wxString& name = wxS("wxSpinCtrlDouble")) + { + Create(parent, id, value, pos, size, style, + min, max, initial, inc, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + double min = 0, double max = 100, double initial = 0, + double inc = 1, + const wxString& name = wxS("wxSpinCtrlDouble")) + { + return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size, + style, min, max, initial, inc, name); + } + + // accessors + double GetValue() const { return DoGetValue(); } + double GetMin() const { return DoGetMin(); } + double GetMax() const { return DoGetMax(); } + double GetIncrement() const { return DoGetIncrement(); } + unsigned GetDigits() const; + + // operations + void SetValue(const wxString& value) { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc + void SetValue(double value) { DoSetValue(value); } + void SetRange(double minVal, double maxVal) { DoSetRange(minVal, maxVal); } + void SetIncrement(double inc) { DoSetIncrement(inc); } + void SetDigits(unsigned digits); + + virtual int GetBase() const { return 10; } + virtual bool SetBase(int WXUNUSED(base)) { return false; } + + DECLARE_DYNAMIC_CLASS(wxSpinCtrlDouble) +}; + +#endif // _WX_GTK_SPINCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/statbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/statbmp.h new file mode 100644 index 0000000000..b7bba950d0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/statbmp.h @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/statbmp.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKSTATICBITMAPH__ +#define __GTKSTATICBITMAPH__ + +#include "wx/icon.h" + +//----------------------------------------------------------------------------- +// wxStaticBitmap +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase +{ +public: + wxStaticBitmap(); + wxStaticBitmap( wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr ); + bool Create( wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr); + + virtual void SetIcon(const wxIcon& icon) { SetBitmap( icon ); } + virtual void SetBitmap( const wxBitmap& bitmap ); + virtual wxBitmap GetBitmap() const { return m_bitmap; } + + // for compatibility with wxMSW + wxIcon GetIcon() const + { + // don't use wxDynamicCast, icons and bitmaps are really the same thing + // in wxGTK + return (const wxIcon &)m_bitmap; + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +private: + wxBitmap m_bitmap; + + DECLARE_DYNAMIC_CLASS(wxStaticBitmap) +}; + +#endif // __GTKSTATICBITMAPH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/statbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/statbox.h new file mode 100644 index 0000000000..80dbb7f594 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/statbox.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/statbox.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKSTATICBOX_H_ +#define _WX_GTKSTATICBOX_H_ + +//----------------------------------------------------------------------------- +// wxStaticBox +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase +{ +public: + wxStaticBox(); + wxStaticBox( wxWindow *parent, + wxWindowID id, + const wxString &label, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = wxStaticBoxNameStr ); + bool Create( wxWindow *parent, + wxWindowID id, + const wxString &label, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = wxStaticBoxNameStr ); + + virtual void SetLabel( const wxString &label ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + + virtual bool GTKIsTransparentForMouse() const { return true; } + + virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; + + virtual void AddChild( wxWindowBase *child ); + +protected: + virtual bool GTKWidgetNeedsMnemonic() const; + virtual void GTKWidgetDoSetMnemonic(GtkWidget* w); + + void DoApplyWidgetStyle(GtkRcStyle *style); + + DECLARE_DYNAMIC_CLASS(wxStaticBox) +}; + +#endif // _WX_GTKSTATICBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/statline.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/statline.h new file mode 100644 index 0000000000..aa4077671f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/statline.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/statline.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKSTATICLINEH__ +#define __GTKSTATICLINEH__ + +#include "wx/defs.h" + +#if wxUSE_STATLINE + +// ---------------------------------------------------------------------------- +// wxStaticLine +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase +{ +public: + wxStaticLine(); + wxStaticLine(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr); + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + +private: + DECLARE_DYNAMIC_CLASS(wxStaticLine) +}; + +#endif // wxUSE_STATLINE + +#endif // __GTKSTATICLINEH__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/stattext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/stattext.h new file mode 100644 index 0000000000..f6d88cb83a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/stattext.h @@ -0,0 +1,69 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/stattext.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_STATTEXT_H_ +#define _WX_GTK_STATTEXT_H_ + +//----------------------------------------------------------------------------- +// wxStaticText +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase +{ +public: + wxStaticText(); + wxStaticText(wxWindow *parent, + wxWindowID id, + const wxString &label, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = wxStaticTextNameStr ); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString &label, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = wxStaticTextNameStr ); + + void SetLabel( const wxString &label ); + + bool SetFont( const wxFont &font ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + // -------------- + +protected: + virtual bool GTKWidgetNeedsMnemonic() const; + virtual void GTKWidgetDoSetMnemonic(GtkWidget* w); + + virtual wxSize DoGetBestSize() const; + + virtual wxString DoGetLabel() const; + virtual void DoSetLabel(const wxString& str); +#if wxUSE_MARKUP + virtual bool DoSetLabelMarkup(const wxString& markup); +#endif // wxUSE_MARKUP + +private: + // Common part of SetLabel() and DoSetLabelMarkup(). + typedef void (wxStaticText::*GTKLabelSetter)(GtkLabel *, const wxString&); + + void GTKDoSetLabel(GTKLabelSetter setter, const wxString& label); + + + DECLARE_DYNAMIC_CLASS(wxStaticText) +}; + +#endif + // _WX_GTK_STATTEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/taskbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/taskbar.h new file mode 100644 index 0000000000..03bd8daff0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/taskbar.h @@ -0,0 +1,33 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/taskbar.h +// Purpose: wxTaskBarIcon class for GTK2 +// Author: Paul Cornett +// Created: 2009-02-08 +// Copyright: (c) 2009 Paul Cornett +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_TASKBARICON_H_ +#define _WX_GTK_TASKBARICON_H_ + +class WXDLLIMPEXP_ADV wxTaskBarIcon: public wxTaskBarIconBase +{ +public: + wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE); + ~wxTaskBarIcon(); + virtual bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxString()); + virtual bool RemoveIcon(); + virtual bool PopupMenu(wxMenu* menu); + bool IsOk() const { return true; } + bool IsIconInstalled() const; + + class Private; + +private: + Private* m_priv; + + DECLARE_DYNAMIC_CLASS(wxTaskBarIcon) + DECLARE_NO_COPY_CLASS(wxTaskBarIcon) +}; + +#endif // _WX_GTK_TASKBARICON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/textctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/textctrl.h new file mode 100644 index 0000000000..9fefd91975 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/textctrl.h @@ -0,0 +1,227 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/textctrl.h +// Purpose: +// Author: Robert Roebling +// Created: 01/02/97 +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_TEXTCTRL_H_ +#define _WX_GTK_TEXTCTRL_H_ + +typedef struct _GtkTextMark GtkTextMark; + +//----------------------------------------------------------------------------- +// wxTextCtrl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextCtrl: public wxTextCtrlBase +{ +public: + wxTextCtrl() { Init(); } + wxTextCtrl(wxWindow *parent, + wxWindowID id, + const wxString &value = wxEmptyString, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxTextCtrlNameStr); + + virtual ~wxTextCtrl(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString &value = wxEmptyString, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxTextCtrlNameStr); + + // implement base class pure virtuals + // ---------------------------------- + + virtual void WriteText(const wxString& text); + virtual wxString GetValue() const; + virtual bool IsEmpty() const; + + virtual int GetLineLength(long lineNo) const; + virtual wxString GetLineText(long lineNo) const; + virtual int GetNumberOfLines() const; + + virtual bool IsModified() const; + virtual bool IsEditable() const; + + virtual void GetSelection(long* from, long* to) const; + + virtual void Remove(long from, long to); + + virtual void MarkDirty(); + virtual void DiscardEdits(); + + virtual bool SetStyle(long start, long end, const wxTextAttr& style); + virtual bool GetStyle(long position, wxTextAttr& style); + + // translate between the position (which is just an index in the text ctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent column and line. + virtual long XYToPosition(long x, long y) const; + virtual bool PositionToXY(long pos, long *x, long *y) const; + + virtual void ShowPosition(long pos); + + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const; + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const + { + return wxTextCtrlBase::HitTest(pt, col, row); + } + + // Clipboard operations + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + // Insertion point + virtual void SetInsertionPoint(long pos); + virtual long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + + virtual void SetSelection(long from, long to); + virtual void SetEditable(bool editable); + + // Overridden wxWindow methods + virtual void SetWindowStyleFlag( long style ); + virtual bool Enable( bool enable = true ); + + // Implementation from now on + void OnDropFiles( wxDropFilesEvent &event ); + void OnChar( wxKeyEvent &event ); + + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + + void OnUpdateCut(wxUpdateUIEvent& event); + void OnUpdateCopy(wxUpdateUIEvent& event); + void OnUpdatePaste(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + + bool SetFont(const wxFont& font); + bool SetForegroundColour(const wxColour& colour); + bool SetBackgroundColour(const wxColour& colour); + + GtkWidget* GetConnectWidget(); + + void SetUpdateFont(bool WXUNUSED(update)) { } + + // implementation only from now on + + // tell the control to ignore next text changed signal + void IgnoreNextTextUpdate(int n = 1) { m_countUpdatesToIgnore = n; } + + // should we ignore the changed signal? always resets the flag + bool IgnoreTextUpdate(); + + // call this to indicate that the control is about to be changed + // programmatically and so m_modified flag shouldn't be set + void DontMarkDirtyOnNextChange() { m_dontMarkDirty = true; } + + // should we mark the control as dirty? always resets the flag + bool MarkDirtyOnChange(); + + // always let GTK have mouse release events for multiline controls + virtual bool GTKProcessEvent(wxEvent& event) const; + + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + // overridden wxWindow virtual methods + virtual wxSize DoGetBestSize() const; + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + + virtual void DoFreeze(); + virtual void DoThaw(); + + // Widgets that use the style->base colour for the BG colour should + // override this and return true. + virtual bool UseGTKStyleBase() const { return true; } + + virtual void DoSetValue(const wxString &value, int flags = 0); + + // Override this to use either GtkEntry or GtkTextView IME depending on the + // kind of control we are. + virtual int GTKIMFilterKeypress(GdkEventKey* event) const; + + virtual wxPoint DoPositionToCoords(long pos) const; + + // wrappers hiding the differences between functions doing the same thing + // for GtkTextView and GtkEntry (all of them use current window style to + // set the given characteristic) + void GTKSetEditable(); + void GTKSetVisibility(); + void GTKSetActivatesDefault(); + void GTKSetWrapMode(); + void GTKSetJustification(); + +private: + void Init(); + + // overridden wxTextEntry virtual methods + virtual GtkEditable *GetEditable() const; + virtual GtkEntry *GetEntry() const; + virtual void EnableTextChangedEvents(bool enable); + + // change the font for everything in this control + void ChangeFontGlobally(); + + // get the encoding which is used in this control: this looks at our font + // and default style but not the current style (i.e. the style for the + // current position); returns wxFONTENCODING_SYSTEM if we have no specific + // encoding + wxFontEncoding GetTextEncoding() const; + + // returns either m_text or m_buffer depending on whether the control is + // single- or multi-line; convenient for the GTK+ functions which work with + // both + void *GetTextObject() const + { + return IsMultiLine() ? static_cast(m_buffer) + : static_cast(m_text); + } + + + // the widget used for single line controls + GtkWidget *m_text; + + bool m_modified:1; + bool m_dontMarkDirty:1; + + int m_countUpdatesToIgnore; + + // Our text buffer. Convenient, and holds the buffer while using + // a dummy one when frozen + GtkTextBuffer *m_buffer; + + GtkTextMark* m_showPositionOnThaw; + GSList* m_anonymousMarkList; + + // For wxTE_AUTO_URL + void OnUrlMouseEvent(wxMouseEvent&); + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxTextCtrl) +}; + +#endif // _WX_GTK_TEXTCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/textentry.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/textentry.h new file mode 100644 index 0000000000..5df686cf24 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/textentry.h @@ -0,0 +1,86 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/textentry.h +// Purpose: wxGTK-specific wxTextEntry implementation +// Author: Vadim Zeitlin +// Created: 2007-09-24 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_TEXTENTRY_H_ +#define _WX_GTK_TEXTENTRY_H_ + +typedef struct _GdkEventKey GdkEventKey; +typedef struct _GtkEditable GtkEditable; +typedef struct _GtkEntry GtkEntry; + +// ---------------------------------------------------------------------------- +// wxTextEntry: roughly corresponds to GtkEditable +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase +{ +public: + wxTextEntry() { } + + // implement wxTextEntryBase pure virtual methods + virtual void WriteText(const wxString& text); + virtual void Remove(long from, long to); + + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + virtual void Undo(); + virtual void Redo(); + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + virtual void SetInsertionPoint(long pos); + virtual long GetInsertionPoint() const; + virtual long GetLastPosition() const; + + virtual void SetSelection(long from, long to); + virtual void GetSelection(long *from, long *to) const; + + virtual bool IsEditable() const; + virtual void SetEditable(bool editable); + + virtual void SetMaxLength(unsigned long len); + + // implementation only from now on + void SendMaxLenEvent(); + bool GTKEntryOnInsertText(const char* text); + +protected: + // This method must be called from the derived class Create() to connect + // the handlers for the clipboard (cut/copy/paste) events. + void GTKConnectClipboardSignals(GtkWidget* entry); + + // And this one to connect "insert-text" signal. + void GTKConnectInsertTextSignal(GtkEntry* entry); + + + virtual void DoSetValue(const wxString& value, int flags); + virtual wxString DoGetValue() const; + + // margins functions + virtual bool DoSetMargins(const wxPoint& pt); + virtual wxPoint DoGetMargins() const; + + virtual bool DoAutoCompleteStrings(const wxArrayString& choices); + + // Override the base class method to use GtkEntry IM context. + virtual int GTKIMFilterKeypress(GdkEventKey* event) const; + +private: + // implement this to return the associated GtkEntry or another widget + // implementing GtkEditable + virtual GtkEditable *GetEditable() const = 0; + + // implement this to return the associated GtkEntry + virtual GtkEntry *GetEntry() const = 0; +}; + +#endif // _WX_GTK_TEXTENTRY_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/tglbtn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/tglbtn.h new file mode 100644 index 0000000000..d6975311f4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/tglbtn.h @@ -0,0 +1,120 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/tglbtn.h +// Purpose: Declaration of the wxToggleButton class, which implements a +// toggle button under wxGTK. +// Author: John Norris, minor changes by Axel Schlueter +// Modified by: +// Created: 08.02.01 +// Copyright: (c) 2000 Johnny C. Norris II +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_TOGGLEBUTTON_H_ +#define _WX_GTK_TOGGLEBUTTON_H_ + +#include "wx/bitmap.h" + +//----------------------------------------------------------------------------- +// wxToggleButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToggleButton: public wxToggleButtonBase +{ +public: + // construction/destruction + wxToggleButton() {} + wxToggleButton(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + // Create the control + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + // Get/set the value + void SetValue(bool state); + bool GetValue() const; + + // Set the label + void SetLabel(const wxString& label); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + void GTKDisableEvents(); + void GTKEnableEvents(); + + virtual wxSize DoGetBestSize() const; + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + +#if wxUSE_MARKUP + virtual bool DoSetLabelMarkup(const wxString& markup); +#endif // wxUSE_MARKUP + +private: + typedef wxToggleButtonBase base_type; + + // Return the GtkLabel used by this toggle button. + GtkLabel *GTKGetLabel() const; + + DECLARE_DYNAMIC_CLASS(wxToggleButton) +}; + +//----------------------------------------------------------------------------- +// wxBitmapToggleButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButton +{ +public: + // construction/destruction + wxBitmapToggleButton() {} + wxBitmapToggleButton(wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + // Create the control + bool Create(wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + // deprecated synonym for SetBitmapLabel() + wxDEPRECATED_INLINE( void SetLabel(const wxBitmap& bitmap), + SetBitmapLabel(bitmap); ) + // prevent virtual function hiding + virtual void SetLabel(const wxString& label) { wxToggleButton::SetLabel(label); } + +private: + typedef wxToggleButtonBase base_type; + + DECLARE_DYNAMIC_CLASS(wxBitmapToggleButton) +}; + +#endif // _WX_GTK_TOGGLEBUTTON_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/toolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/toolbar.h new file mode 100644 index 0000000000..d504b6c2e8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/toolbar.h @@ -0,0 +1,104 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/toolbar.h +// Purpose: GTK toolbar +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_TOOLBAR_H_ +#define _WX_GTK_TOOLBAR_H_ + +#if wxUSE_TOOLBAR + +typedef struct _GtkTooltips GtkTooltips; + +// ---------------------------------------------------------------------------- +// wxToolBar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase +{ +public: + // construction/destruction + wxToolBar() { Init(); } + wxToolBar( wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr ) + { + Init(); + + Create(parent, id, pos, size, style, name); + } + + bool Create( wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr ); + + virtual ~wxToolBar(); + + virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const; + + virtual void SetToolShortHelp(int id, const wxString& helpString); + + virtual void SetWindowStyleFlag( long style ); + + virtual void SetToolNormalBitmap(int id, const wxBitmap& bitmap); + virtual void SetToolDisabledBitmap(int id, const wxBitmap& bitmap); + + virtual bool Realize(); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + virtual wxToolBarToolBase *CreateTool(int id, + const wxString& label, + const wxBitmap& bitmap1, + const wxBitmap& bitmap2 = wxNullBitmap, + wxItemKind kind = wxITEM_NORMAL, + wxObject *clientData = NULL, + const wxString& shortHelpString = wxEmptyString, + const wxString& longHelpString = wxEmptyString); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); + + // implementation from now on + // -------------------------- + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_DEFAULT; } + + virtual wxSize DoGetBestSize() const; + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + // implement base class pure virtuals + virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); + virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); + + virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable); + virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle); + virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); + +private: + void Init(); + void GtkSetStyle(); + GSList* GetRadioGroup(size_t pos); + virtual void AddChildGTK(wxWindowGTK* child); + + GtkToolbar* m_toolbar; + GtkTooltips* m_tooltips; + + DECLARE_DYNAMIC_CLASS(wxToolBar) +}; + +#endif // wxUSE_TOOLBAR + +#endif + // _WX_GTK_TOOLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/tooltip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/tooltip.h new file mode 100644 index 0000000000..25c682b428 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/tooltip.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/tooltip.h +// Purpose: wxToolTip class +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTKTOOLTIP_H_ +#define _WX_GTKTOOLTIP_H_ + +#include "wx/string.h" +#include "wx/object.h" + +//----------------------------------------------------------------------------- +// forward declarations +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +//----------------------------------------------------------------------------- +// wxToolTip +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToolTip : public wxObject +{ +public: + wxToolTip( const wxString &tip ); + + // globally change the tooltip parameters + static void Enable( bool flag ); + static void SetDelay( long msecs ); + // set the delay after which the tooltip disappears or how long the tooltip remains visible + static void SetAutoPop(long msecs); + // set the delay between subsequent tooltips to appear + static void SetReshow(long msecs); + + // get/set the tooltip text + void SetTip( const wxString &tip ); + wxString GetTip() const { return m_text; } + + wxWindow *GetWindow() const { return m_window; } + + // Implementation + void GTKSetWindow(wxWindow* win); + static void GTKApply(GtkWidget* widget, const char* tip); + +private: + wxString m_text; + wxWindow *m_window; + + DECLARE_ABSTRACT_CLASS(wxToolTip) +}; + +#endif // _WX_GTKTOOLTIP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/toplevel.h new file mode 100644 index 0000000000..9f9374b06b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/toplevel.h @@ -0,0 +1,169 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/toplevel.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_TOPLEVEL_H_ +#define _WX_GTK_TOPLEVEL_H_ + +//----------------------------------------------------------------------------- +// wxTopLevelWindowGTK +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTopLevelWindowGTK : public wxTopLevelWindowBase +{ + typedef wxTopLevelWindowBase base_type; +public: + // construction + wxTopLevelWindowGTK() { Init(); } + wxTopLevelWindowGTK(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxTopLevelWindowGTK(); + + // implement base class pure virtuals + virtual void Maximize(bool maximize = true); + virtual bool IsMaximized() const; + virtual void Iconize(bool iconize = true); + virtual bool IsIconized() const; + virtual void SetIcons(const wxIconBundle& icons); + virtual void Restore(); + + virtual bool EnableCloseButton(bool enable = true); + + virtual void ShowWithoutActivating(); + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); + virtual bool IsFullScreen() const { return m_fsIsShowing; } + + virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); + + virtual void SetWindowStyleFlag( long style ); + + virtual bool Show(bool show = true); + + virtual void Raise(); + + virtual bool IsActive(); + + virtual void SetTitle( const wxString &title ); + virtual wxString GetTitle() const { return m_title; } + + virtual void SetLabel(const wxString& label) { SetTitle( label ); } + virtual wxString GetLabel() const { return GetTitle(); } + + + virtual bool SetTransparent(wxByte alpha); + virtual bool CanSetTransparent(); + + // Experimental, to allow help windows to be + // viewable from within modal dialogs + virtual void AddGrab(); + virtual void RemoveGrab(); + virtual bool IsGrabbed() const { return m_grabbed; } + + + virtual void Refresh( bool eraseBackground = true, + const wxRect *rect = (const wxRect *) NULL ); + + // implementation from now on + // -------------------------- + + // GTK callbacks + virtual void OnInternalIdle(); + + virtual void GTKHandleRealized(); + + void GTKConfigureEvent(int x, int y); + + // do *not* call this to iconize the frame, this is a private function! + void SetIconizeState(bool iconic); + + GtkWidget *m_mainWidget; + + bool m_fsIsShowing; /* full screen */ + int m_fsSaveGdkFunc, m_fsSaveGdkDecor; + wxRect m_fsSaveFrame; + + // m_windowStyle translated to GDK's terms + int m_gdkFunc, + m_gdkDecor; + + // size of WM decorations + struct DecorSize + { + int left, right, top, bottom; + }; + DecorSize m_decorSize; + + // private gtk_timeout_add result for mimicing wxUSER_ATTENTION_INFO and + // wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle. + int m_urgency_hint; + // timer for detecting WM with broken _NET_REQUEST_FRAME_EXTENTS handling + unsigned m_netFrameExtentsTimerId; + + // return the size of the window without WM decorations + void GTKDoGetSize(int *width, int *height) const; + + void GTKUpdateDecorSize(const DecorSize& decorSize); + +protected: + // give hints to the Window Manager for how the size + // of the TLW can be changed by dragging + virtual void DoSetSizeHints( int minW, int minH, + int maxW, int maxH, + int incW, int incH); + // move the window to the specified location and resize it + virtual void DoMoveWindow(int x, int y, int width, int height); + + // take into account WM decorations here + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + virtual void DoSetClientSize(int width, int height); + virtual void DoGetClientSize(int *width, int *height) const; + + // string shown in the title bar + wxString m_title; + + bool m_deferShow; + +private: + void Init(); + DecorSize& GetCachedDecorSize(); + + // size hint increments + int m_incWidth, m_incHeight; + + // is the frame currently iconized? + bool m_isIconized; + + // is the frame currently grabbed explicitly by the application? + bool m_grabbed; + + bool m_updateDecorSize; + bool m_deferShowAllowed; +}; + +#endif // _WX_GTK_TOPLEVEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/webview_webkit.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/webview_webkit.h new file mode 100644 index 0000000000..e1a01bf811 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/webview_webkit.h @@ -0,0 +1,186 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/gtk/wx/webview.h +// Purpose: GTK webkit backend for web view component +// Author: Robert Roebling, Marianne Gagnon +// Copyright: (c) 2010 Marianne Gagnon, 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_WEBKITCTRL_H_ +#define _WX_GTK_WEBKITCTRL_H_ + +#include "wx/defs.h" + +#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) + +#include "wx/sharedptr.h" +#include "wx/webview.h" + +typedef struct _WebKitWebView WebKitWebView; + +//----------------------------------------------------------------------------- +// wxWebViewWebKit +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_WEBVIEW wxWebViewWebKit : public wxWebView +{ +public: + wxWebViewWebKit(); + + wxWebViewWebKit(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxWebViewNameStr) + { + Create(parent, id, url, pos, size, style, name); + } + + virtual bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxWebViewNameStr); + + virtual ~wxWebViewWebKit(); + + virtual bool Enable( bool enable = true ); + + // implementation + // -------------- + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + virtual void Stop(); + virtual void LoadURL(const wxString& url); + virtual void GoBack(); + virtual void GoForward(); + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); + virtual bool CanGoBack() const; + virtual bool CanGoForward() const; + virtual void ClearHistory(); + virtual void EnableContextMenu(bool enable = true); + virtual void EnableHistory(bool enable = true); + virtual wxVector > GetBackwardHistory(); + virtual wxVector > GetForwardHistory(); + virtual void LoadHistoryItem(wxSharedPtr item); + virtual wxString GetCurrentURL() const; + virtual wxString GetCurrentTitle() const; + virtual wxString GetPageSource() const; + virtual wxString GetPageText() const; + virtual void Print(); + virtual bool IsBusy() const; + + void SetZoomType(wxWebViewZoomType); + wxWebViewZoomType GetZoomType() const; + bool CanSetZoomType(wxWebViewZoomType) const; + virtual wxWebViewZoom GetZoom() const; + virtual void SetZoom(wxWebViewZoom); + + //Clipboard functions + virtual bool CanCut() const; + virtual bool CanCopy() const; + virtual bool CanPaste() const; + virtual void Cut(); + virtual void Copy(); + virtual void Paste(); + + //Undo / redo functionality + virtual bool CanUndo() const; + virtual bool CanRedo() const; + virtual void Undo(); + virtual void Redo(); + + //Find function + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT); + + //Editing functions + virtual void SetEditable(bool enable = true); + virtual bool IsEditable() const; + + //Selection + virtual void DeleteSelection(); + virtual bool HasSelection() const; + virtual void SelectAll(); + virtual wxString GetSelectedText() const; + virtual wxString GetSelectedSource() const; + virtual void ClearSelection(); + + virtual void RunScript(const wxString& javascript); + + //Virtual Filesystem Support + virtual void RegisterHandler(wxSharedPtr handler); + virtual wxVector > GetHandlers() { return m_handlerList; } + + virtual void* GetNativeBackend() const { return m_web_view; } + + /** TODO: check if this can be made private + * The native control has a getter to check for busy state, but except in + * very recent versions of webkit this getter doesn't say everything we need + * (namely it seems to stay indefinitely busy when loading is cancelled by + * user) + */ + bool m_busy; + + wxString m_vfsurl; + + //We use this flag to stop recursion when we load a page from the navigation + //callback, mainly when loading a VFS page + bool m_guard; + //This flag is use to indicate when a navigation event is the result of a + //create-web-view signal and so we need to send a new window event + bool m_creating; + +protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + +private: + + void ZoomIn(); + void ZoomOut(); + void SetWebkitZoom(float level); + float GetWebkitZoom() const; + + //Find helper function + void FindClear(); + + // focus event handler: calls GTKUpdateBitmap() + void GTKOnFocus(wxFocusEvent& event); + + WebKitWebView *m_web_view; + int m_historyLimit; + + wxVector > m_handlerList; + + //variables used for Find() + int m_findFlags; + wxString m_findText; + int m_findPosition; + int m_findCount; + + wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit); +}; + +class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryWebKit : public wxWebViewFactory +{ +public: + virtual wxWebView* Create() { return new wxWebViewWebKit; } + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { return new wxWebViewWebKit(parent, id, url, pos, size, style, name); } +}; + + +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/webviewhistoryitem_webkit.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/webviewhistoryitem_webkit.h new file mode 100644 index 0000000000..a798efdda6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/webviewhistoryitem_webkit.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/gtk/webviewhistoryitem.h +// Purpose: wxWebViewHistoryItem header for GTK +// Author: Steven Lamerton +// Copyright: (c) 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_WEBVIEWHISTORYITEM_H_ +#define _WX_GTK_WEBVIEWHISTORYITEM_H_ + +#include "wx/setup.h" + +#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) + +class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem +{ +public: + wxWebViewHistoryItem(const wxString& url, const wxString& title) : + m_url(url), m_title(title) {} + wxString GetUrl() { return m_url; } + wxString GetTitle() { return m_title; } + + friend class wxWebViewWebKit; + +private: + wxString m_url, m_title; + void* m_histItem; +}; + +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) + +#endif // _WX_GTK_WEBVIEWHISTORYITEM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/window.h new file mode 100644 index 0000000000..2d37388a06 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk/window.h @@ -0,0 +1,461 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/window.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_WINDOW_H_ +#define _WX_GTK_WINDOW_H_ + +#include "wx/dynarray.h" + +#ifdef __WXGTK3__ + typedef struct _cairo cairo_t; + typedef struct _GtkStyleProvider GtkStyleProvider; + #define WXUNUSED_IN_GTK3(x) +#else + #define WXUNUSED_IN_GTK3(x) x +#endif + +typedef struct _GdkEventKey GdkEventKey; +typedef struct _GtkIMContext GtkIMContext; + +WX_DEFINE_EXPORTED_ARRAY_PTR(GdkWindow *, wxArrayGdkWindows); + +extern "C" +{ + +typedef void (*wxGTKCallback)(); + +} + +//----------------------------------------------------------------------------- +// wxWindowGTK +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowGTK : public wxWindowBase +{ +public: + // creating the window + // ------------------- + wxWindowGTK(); + wxWindowGTK(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + virtual ~wxWindowGTK(); + + // implement base class (pure) virtual methods + // ------------------------------------------- + + virtual void Raise(); + virtual void Lower(); + + virtual bool Show( bool show = true ); + + virtual bool IsRetained() const; + + virtual void SetFocus(); + + // hint from wx to native GTK+ tab traversal code + virtual void SetCanFocus(bool canFocus); + + virtual bool Reparent( wxWindowBase *newParent ); + + virtual void WarpPointer(int x, int y); + + virtual void Refresh( bool eraseBackground = true, + const wxRect *rect = (const wxRect *) NULL ); + virtual void Update(); + virtual void ClearBackground(); + + virtual bool SetBackgroundColour( const wxColour &colour ); + virtual bool SetForegroundColour( const wxColour &colour ); + virtual bool SetCursor( const wxCursor &cursor ); + virtual bool SetFont( const wxFont &font ); + + virtual bool SetBackgroundStyle(wxBackgroundStyle style) ; + virtual bool IsTransparentBackgroundSupported(wxString* reason = NULL) const; + + virtual int GetCharHeight() const; + virtual int GetCharWidth() const; + + virtual void SetScrollbar( int orient, int pos, int thumbVisible, + int range, bool refresh = true ); + virtual void SetScrollPos( int orient, int pos, bool refresh = true ); + virtual int GetScrollPos( int orient ) const; + virtual int GetScrollThumb( int orient ) const; + virtual int GetScrollRange( int orient ) const; + virtual void ScrollWindow( int dx, int dy, + const wxRect* rect = NULL ); + virtual bool ScrollLines(int lines); + virtual bool ScrollPages(int pages); + +#if wxUSE_DRAG_AND_DROP + virtual void SetDropTarget( wxDropTarget *dropTarget ); +#endif // wxUSE_DRAG_AND_DROP + + virtual void AddChild( wxWindowBase *child ); + virtual void RemoveChild( wxWindowBase *child ); + + virtual void SetLayoutDirection(wxLayoutDirection dir); + virtual wxLayoutDirection GetLayoutDirection() const; + virtual wxCoord AdjustForLayoutDirection(wxCoord x, + wxCoord width, + wxCoord widthTotal) const; + + virtual bool DoIsExposed( int x, int y ) const; + virtual bool DoIsExposed( int x, int y, int w, int h ) const; + + // currently wxGTK2-only + void SetDoubleBuffered(bool on); + virtual bool IsDoubleBuffered() const; + + // SetLabel(), which does nothing in wxWindow + virtual void SetLabel(const wxString& label) { m_gtkLabel = label; } + virtual wxString GetLabel() const { return m_gtkLabel; } + + // implementation + // -------------- + + virtual WXWidget GetHandle() const { return m_widget; } + + // many important things are done here, this function must be called + // regularly + virtual void OnInternalIdle(); + + // For compatibility across platforms (not in event table) + void OnIdle(wxIdleEvent& WXUNUSED(event)) {} + + // Used by all window classes in the widget creation process. + bool PreCreation( wxWindowGTK *parent, const wxPoint &pos, const wxSize &size ); + void PostCreation(); + + // Internal addition of child windows + void DoAddChild(wxWindowGTK *child); + + // This method sends wxPaintEvents to the window. + // It is also responsible for background erase events. +#ifdef __WXGTK3__ + void GTKSendPaintEvents(cairo_t* cr); +#else + void GTKSendPaintEvents(const GdkRegion* region); +#endif + + // The methods below are required because many native widgets + // are composed of several subwidgets and setting a style for + // the widget means setting it for all subwidgets as well. + // also, it is not clear which native widget is the top + // widget where (most of) the input goes. even tooltips have + // to be applied to all subwidgets. + virtual GtkWidget* GetConnectWidget(); + void ConnectWidget( GtkWidget *widget ); + + // Called from several event handlers, if it returns true or false, the + // same value should be immediately returned by the handler without doing + // anything else. If it returns -1, the handler should continue as usual + int GTKCallbackCommonPrologue(struct _GdkEventAny *event) const; + + // Simplified form of GTKCallbackCommonPrologue() which can be used from + // GTK callbacks without return value to check if the event should be + // ignored: if this returns true, the event shouldn't be handled + bool GTKShouldIgnoreEvent() const; + + + // override this if some events should never be consumed by wxWidgets but + // but have to be left for the native control + // + // base version just calls HandleWindowEvent() + virtual bool GTKProcessEvent(wxEvent& event) const; + + // Map GTK widget direction of the given widget to/from wxLayoutDirection + static wxLayoutDirection GTKGetLayout(GtkWidget *widget); + static void GTKSetLayout(GtkWidget *widget, wxLayoutDirection dir); + + // This is called when capture is taken from the window. It will + // fire off capture lost events. + void GTKReleaseMouseAndNotify(); + + GdkWindow* GTKGetDrawingWindow() const; + + bool GTKHandleFocusIn(); + bool GTKHandleFocusOut(); + void GTKHandleFocusOutNoDeferring(); + static void GTKHandleDeferredFocusOut(); + + // Called when m_widget becomes realized. Derived classes must call the + // base class method if they override it. + virtual void GTKHandleRealized(); + void GTKHandleUnrealize(); + +protected: + // for controls composed of multiple GTK widgets, return true to eliminate + // spurious focus events if the focus changes between GTK+ children within + // the same wxWindow + virtual bool GTKNeedsToFilterSameWindowFocus() const { return false; } + + // Override GTKWidgetNeedsMnemonic and return true if your + // needs to set its mnemonic widget, such as for a + // GtkLabel for wxStaticText, then do the actual + // setting of the widget inside GTKWidgetDoSetMnemonic + virtual bool GTKWidgetNeedsMnemonic() const; + virtual void GTKWidgetDoSetMnemonic(GtkWidget* w); + + // Get the GdkWindows making part of this window: usually there will be + // only one of them in which case it should be returned directly by this + // function. If there is more than one GdkWindow (can be the case for + // composite widgets), return NULL and fill in the provided array + // + // This is not pure virtual for backwards compatibility but almost + // certainly must be overridden in any wxControl-derived class! + virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + + // Check if the given window makes part of this widget + bool GTKIsOwnWindow(GdkWindow *window) const; + +public: + // Returns the default context which usually is anti-aliased + PangoContext *GTKGetPangoDefaultContext(); + +#if wxUSE_TOOLTIPS + // applies tooltip to the widget (tip must be UTF-8 encoded) + virtual void GTKApplyToolTip(const char* tip); +#endif // wxUSE_TOOLTIPS + + // Called when a window should delay showing itself + // until idle time used in Reparent(). + void GTKShowOnIdle() { m_showOnIdle = true; } + + // This is called from the various OnInternalIdle methods + bool GTKShowFromOnIdle(); + + // is this window transparent for the mouse events (as wxStaticBox is)? + virtual bool GTKIsTransparentForMouse() const { return false; } + + // Common scroll event handling code for wxWindow and wxScrollBar + wxEventType GTKGetScrollEventType(GtkRange* range); + + // position and size of the window + int m_x, m_y; + int m_width, m_height; + int m_clientWidth, m_clientHeight; + // Whether the client size variables above are known to be correct + // (because they have been validated by a size-allocate) and should + // be used to report client size + bool m_useCachedClientSize; + + // see the docs in src/gtk/window.cpp + GtkWidget *m_widget; // mostly the widget seen by the rest of GTK + GtkWidget *m_wxwindow; // mostly the client area as per wxWidgets + + // label for use with GetLabelSetLabel + wxString m_gtkLabel; + + // return true if the window is of a standard (i.e. not wxWidgets') class + bool IsOfStandardClass() const { return m_wxwindow == NULL; } + + // this widget will be queried for GTK's focus events + GtkWidget *m_focusWidget; + + void GTKDisableFocusOutEvent(); + void GTKEnableFocusOutEvent(); + + + // Input method support + + // The IM context used for generic, i.e. non-native, windows. + // + // It might be a good idea to avoid allocating it unless key events from + // this window are really needed but currently we do it unconditionally. + // + // For native widgets (i.e. those for which IsOfStandardClass() returns + // true) it is NULL. + GtkIMContext* m_imContext; + + // Pointer to the event being currently processed by the IME or NULL if not + // inside key handling. + GdkEventKey* m_imKeyEvent; + + // This method generalizes gtk_im_context_filter_keypress(): for the + // generic windows it does just that but it's overridden by the classes + // wrapping native widgets that use IM themselves and so provide specific + // methods for accessing it such gtk_entry_im_context_filter_keypress(). + virtual int GTKIMFilterKeypress(GdkEventKey* event) const; + + // This method must be called from the derived classes "insert-text" signal + // handlers to check if the text is not being inserted by the IM and, if + // this is the case, generate appropriate wxEVT_CHAR events for it. + // + // Returns true if we did generate and process events corresponding to this + // text or false if we didn't handle it. + bool GTKOnInsertText(const char* text); + + // This is just a helper of GTKOnInsertText() which is also used by GTK+ + // "commit" signal handler. + bool GTKDoInsertTextFromIM(const char* text); + + + // indices for the arrays below + enum ScrollDir { ScrollDir_Horz, ScrollDir_Vert, ScrollDir_Max }; + + // horizontal/vertical scroll bar + GtkRange* m_scrollBar[ScrollDir_Max]; + + // horizontal/vertical scroll position + double m_scrollPos[ScrollDir_Max]; + + // return the scroll direction index corresponding to the given orientation + // (which is wxVERTICAL or wxHORIZONTAL) + static ScrollDir ScrollDirFromOrient(int orient) + { + return orient == wxVERTICAL ? ScrollDir_Vert : ScrollDir_Horz; + } + + // return the orientation for the given scrolling direction + static int OrientFromScrollDir(ScrollDir dir) + { + return dir == ScrollDir_Horz ? wxHORIZONTAL : wxVERTICAL; + } + + // find the direction of the given scrollbar (must be one of ours) + ScrollDir ScrollDirFromRange(GtkRange *range) const; + + void GTKUpdateCursor(bool isBusyOrGlobalCursor = false, bool isRealize = false); + + // extra (wxGTK-specific) flags + bool m_noExpose:1; // wxGLCanvas has its own redrawing + bool m_nativeSizeEvent:1; // wxGLCanvas sends wxSizeEvent upon "alloc_size" + bool m_isScrolling:1; // dragging scrollbar thumb? + bool m_clipPaintRegion:1; // true after ScrollWindow() + wxRegion m_nativeUpdateRegion; // not transformed for RTL + bool m_dirtyTabOrder:1; // tab order changed, GTK focus + // chain needs update + bool m_mouseButtonDown:1; + + bool m_showOnIdle:1; // postpone showing the window until idle + +protected: + // implement the base class pure virtuals + virtual void DoGetTextExtent(const wxString& string, + int *x, int *y, + int *descent = NULL, + int *externalLeading = NULL, + const wxFont *font = NULL) const; + virtual void DoClientToScreen( int *x, int *y ) const; + virtual void DoScreenToClient( int *x, int *y ) const; + virtual void DoGetPosition( int *x, int *y ) const; + virtual void DoGetSize( int *width, int *height ) const; + virtual void DoGetClientSize( int *width, int *height ) const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoSetClientSize(int width, int height); + virtual wxSize DoGetBorderSize() const; + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual void DoEnable(bool enable); + +#if wxUSE_MENUS_NATIVE + virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); +#endif // wxUSE_MENUS_NATIVE + + virtual void DoCaptureMouse(); + virtual void DoReleaseMouse(); + + virtual void DoFreeze(); + virtual void DoThaw(); + + void GTKFreezeWidget(GtkWidget *w); + void GTKThawWidget(GtkWidget *w); + void GTKDisconnect(void* instance); + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip( wxToolTip *tip ); +#endif // wxUSE_TOOLTIPS + + // Create a GtkScrolledWindow containing the given widget (usually + // m_wxwindow but not necessarily) and assigns it to m_widget. Also shows + // the widget passed to it. + // + // Can be only called if we have either wxHSCROLL or wxVSCROLL in our + // style. + void GTKCreateScrolledWindowWith(GtkWidget* view); + + virtual void DoMoveInTabOrder(wxWindow *win, WindowOrder move); + virtual bool DoNavigateIn(int flags); + + + // Copies m_children tab order to GTK focus chain: + void RealizeTabOrder(); + +#ifndef __WXGTK3__ + // Called by ApplyWidgetStyle (which is called by SetFont() and + // SetXXXColour etc to apply style changed to native widgets) to create + // modified GTK style with non-standard attributes. + GtkRcStyle* GTKCreateWidgetStyle(); +#endif + + void GTKApplyWidgetStyle(bool forceStyle = false); + + // helper function to ease native widgets wrapping, called by + // ApplyWidgetStyle -- override this, not ApplyWidgetStyle + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + + void GTKApplyStyle(GtkWidget* widget, GtkRcStyle* style); + + // sets the border of a given GtkScrolledWindow from a wx style + static void GTKScrolledWindowSetBorder(GtkWidget* w, int style); + + // Connect the given function to the specified signal on m_widget. + // + // This is just a wrapper for g_signal_connect() and returns the handler id + // just as it does. + unsigned long GTKConnectWidget(const char *signal, wxGTKCallback callback); + + void ConstrainSize(); + +private: + void Init(); + + // return true if this window must have a non-NULL parent, false if it can + // be created without parent (normally only top level windows but in wxGTK + // there is also the exception of wxMenuBar) + virtual bool GTKNeedsParent() const { return !IsTopLevel(); } + + enum ScrollUnit { ScrollUnit_Line, ScrollUnit_Page, ScrollUnit_Max }; + + // common part of ScrollLines() and ScrollPages() and could be used, in the + // future, for horizontal scrolling as well + // + // return true if we scrolled, false otherwise (on error or simply if we + // are already at the end) + bool DoScrollByUnits(ScrollDir dir, ScrollUnit unit, int units); + virtual void AddChildGTK(wxWindowGTK* child); + +#ifdef __WXGTK3__ + // paint context is stashed here so wxPaintDC can use it + cairo_t* m_paintContext; + // style provider for "background-image" + GtkStyleProvider* m_styleProvider; + +public: + cairo_t* GTKPaintContext() const + { + return m_paintContext; + } +#endif + + DECLARE_DYNAMIC_CLASS(wxWindowGTK) + wxDECLARE_NO_COPY_CLASS(wxWindowGTK); +}; + +#endif // _WX_GTK_WINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/accel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/accel.h new file mode 100644 index 0000000000..36f153ef40 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/accel.h @@ -0,0 +1,14 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/accel.h +// Purpose: wxAcceleratorTable redirection file +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// VZ: keeping the old file just in case we're going to have a native GTK+ +// wxAcceleratorTable implementation one day, but for now use the generic +// version +#include "wx/generic/accel.h" diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/app.h new file mode 100644 index 0000000000..c8b7dc8a97 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/app.h @@ -0,0 +1,77 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/app.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKAPPH__ +#define __GTKAPPH__ + +#include "wx/frame.h" +#include "wx/icon.h" +#include "wx/strconv.h" + +typedef struct _GdkVisual GdkVisual; + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxApp; +class WXDLLIMPEXP_FWD_BASE wxLog; + +//----------------------------------------------------------------------------- +// wxApp +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxApp: public wxAppBase +{ +public: + wxApp(); + virtual ~wxApp(); + + /* override for altering the way wxGTK intializes the GUI + * (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by + * default. when overriding this method, the code in it is likely to be + * platform dependent, otherwise use OnInit(). */ + virtual bool OnInitGui(); + + // override base class (pure) virtuals + virtual void WakeUpIdle(); + + virtual bool Initialize(int& argc, wxChar **argv); + virtual void CleanUp(); + + static bool InitialzeVisual(); + + virtual void OnAssertFailure(const wxChar *file, + int line, + const wxChar *func, + const wxChar *cond, + const wxChar *msg); + + bool IsInAssert() const { return m_isInAssert; } + + int m_idleTag; + void RemoveIdleTag(); + + unsigned char *m_colorCube; + + // Used by the wxGLApp and wxGLCanvas class for GL-based X visual + // selection. + void *m_glVisualInfo; // this is actually an XVisualInfo* + void *m_glFBCInfo; // this is actually an GLXFBConfig* + // This returns the current visual: either that used by wxRootWindow + // or the XVisualInfo* for SGI. + GdkVisual *GetGdkVisual(); + +private: + // true if we're inside an assert modal dialog + bool m_isInAssert; + + DECLARE_DYNAMIC_CLASS(wxApp) +}; + +#endif // __GTKAPPH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/bitmap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/bitmap.h new file mode 100644 index 0000000000..6eb72a95c5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/bitmap.h @@ -0,0 +1,154 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/bitmap.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __GTKBITMAPH__ +#define __GTKBITMAPH__ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" +#include "wx/palette.h" +#include "wx/gdiobj.h" + +class WXDLLIMPEXP_FWD_CORE wxPixelDataBase; + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxMask; +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxImage; + +//----------------------------------------------------------------------------- +// wxMask +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMask: public wxObject +{ +public: + wxMask(); + wxMask( const wxBitmap& bitmap, const wxColour& colour ); +#if wxUSE_PALETTE + wxMask( const wxBitmap& bitmap, int paletteIndex ); +#endif // wxUSE_PALETTE + wxMask( const wxBitmap& bitmap ); + virtual ~wxMask(); + + bool Create( const wxBitmap& bitmap, const wxColour& colour ); +#if wxUSE_PALETTE + bool Create( const wxBitmap& bitmap, int paletteIndex ); +#endif // wxUSE_PALETTE + bool Create( const wxBitmap& bitmap ); + + // implementation + GdkBitmap *m_bitmap; + + GdkBitmap *GetBitmap() const; + +private: + DECLARE_DYNAMIC_CLASS(wxMask) +}; + +//----------------------------------------------------------------------------- +// wxBitmap +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase +{ +public: + wxBitmap() {} + wxBitmap( int width, int height, int depth = -1 ) { Create( width, height, depth ); } + wxBitmap( const wxSize& sz, int depth = -1 ) { Create( sz, depth ); } + wxBitmap( const char bits[], int width, int height, int depth = 1 ); + wxBitmap( const char* const* bits ); +#ifdef wxNEEDS_CHARPP + // needed for old GCC + wxBitmap(char** data) + { + *this = wxBitmap(const_cast(data)); + } +#endif + wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE ); + wxBitmap( const wxImage& image, int depth = -1 ) { (void)CreateFromImage(image, depth); } + virtual ~wxBitmap(); + + bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); + bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) + { return Create(sz.GetWidth(), sz.GetHeight(), depth); } + bool Create(int width, int height, const wxDC& WXUNUSED(dc)) + { return Create(width,height); } + + virtual int GetHeight() const; + virtual int GetWidth() const; + virtual int GetDepth() const; + + wxImage ConvertToImage() const; + + // copies the contents and mask of the given (colour) icon to the bitmap + virtual bool CopyFromIcon(const wxIcon& icon); + + wxMask *GetMask() const; + void SetMask( wxMask *mask ); + + wxBitmap GetSubBitmap( const wxRect& rect ) const; + + bool SaveFile(const wxString &name, wxBitmapType type, + const wxPalette *palette = NULL) const; + bool LoadFile(const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); + +#if wxUSE_PALETTE + wxPalette *GetPalette() const; + void SetPalette(const wxPalette& palette); + wxPalette *GetColourMap() const { return GetPalette(); } +#endif // wxUSE_PALETTE + + static void InitStandardHandlers(); + + // implementation + // -------------- + + void SetHeight( int height ); + void SetWidth( int width ); + void SetDepth( int depth ); + void SetPixmap( GdkPixmap *pixmap ); + void SetBitmap( GdkBitmap *bitmap ); + + GdkPixmap *GetPixmap() const; + GdkBitmap *GetBitmap() const; + bool HasPixmap() const; + + // Basically, this corresponds to Win32 StretchBlt() + wxBitmap Rescale( int clipx, int clipy, int clipwidth, int clipheight, int width, int height ); + + // raw bitmap access support functions + void *GetRawData(wxPixelDataBase& data, int bpp); + void UngetRawData(wxPixelDataBase& data); + + bool HasAlpha() const; + +protected: + bool CreateFromImage(const wxImage& image, int depth); + + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + // to be called from CreateFromImage only! + bool CreateFromImageAsBitmap(const wxImage& image); + bool CreateFromImageAsPixmap(const wxImage& image); + + friend class wxBitmapHandler; + +private: + DECLARE_DYNAMIC_CLASS(wxBitmap) +}; + + +#endif // __GTKBITMAPH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/bmpbuttn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/bmpbuttn.h new file mode 100644 index 0000000000..40dc99d9bb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/bmpbuttn.h @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/bmpbutton.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __BMPBUTTONH__ +#define __BMPBUTTONH__ + +// ---------------------------------------------------------------------------- +// wxBitmapButton +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase +{ +public: + wxBitmapButton() { Init(); } + + wxBitmapButton(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxBU_AUTODRAW, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Init(); + + Create(parent, id, bitmap, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxBU_AUTODRAW, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + void SetLabel( const wxString &label ); + virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); } + + virtual bool Enable(bool enable = TRUE); + + // implementation + // -------------- + + void GTKSetHasFocus(); + void GTKSetNotFocus(); + void StartSelect(); + void EndSelect(); + void DoApplyWidgetStyle(GtkRcStyle *style); + + bool m_hasFocus:1; + bool m_isSelected:1; + +protected: + virtual void OnSetBitmap(); + virtual wxSize DoGetBestSize() const; + + void Init(); + +private: + DECLARE_DYNAMIC_CLASS(wxBitmapButton) +}; + +#endif // __BMPBUTTONH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/brush.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/brush.h new file mode 100644 index 0000000000..e4ede7f560 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/brush.h @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/brush.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __GTKBRUSHH__ +#define __GTKBRUSHH__ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" +#include "wx/gdiobj.h" +#include "wx/bitmap.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxBrush; + +//----------------------------------------------------------------------------- +// wxBrush +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase +{ +public: + wxBrush() { } + + wxBrush( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID ); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) ); +#endif + wxBrush( const wxBitmap &stippleBitmap ); + virtual ~wxBrush(); + + bool operator==(const wxBrush& brush) const; + bool operator!=(const wxBrush& brush) const { return !(*this == brush); } + + wxBrushStyle GetStyle() const; + wxColour GetColour() const; + wxBitmap *GetStipple() const; + + void SetColour( const wxColour& col ); + void SetColour( unsigned char r, unsigned char g, unsigned char b ); + void SetStyle( wxBrushStyle style ); + void SetStipple( const wxBitmap& stipple ); + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxBrushStyle)style); } +#endif + +private: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxBrush) +}; + +#endif // __GTKBRUSHH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/button.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/button.h new file mode 100644 index 0000000000..d7909905d4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/button.h @@ -0,0 +1,67 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/button.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKBUTTONH__ +#define __GTKBUTTONH__ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/list.h" + +//----------------------------------------------------------------------------- +// wxButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxButton: public wxButtonBase +{ +public: + wxButton(); + wxButton(wxWindow *parent, wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + virtual ~wxButton(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + virtual wxWindow *SetDefault(); + virtual void SetLabel( const wxString &label ); + virtual bool Enable( bool enable = TRUE ); + + // implementation + // -------------- + + void DoApplyWidgetStyle(GtkRcStyle *style); + bool IsOwnGtkWindow( GdkWindow *window ); + + // Since this wxButton doesn't derive from wxButtonBase (why?) we need + // to override this here too... + virtual bool ShouldInheritColours() const { return false; } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + virtual wxSize DoGetBestSize() const; + +private: + DECLARE_DYNAMIC_CLASS(wxButton) +}; + +#endif // __GTKBUTTONH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/checkbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/checkbox.h new file mode 100644 index 0000000000..2cc90a1703 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/checkbox.h @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/checkbox.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKCHECKBOXH__ +#define __GTKCHECKBOXH__ + +// ---------------------------------------------------------------------------- +// wxCheckBox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase +{ +public: + wxCheckBox(); + wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr ); + + void SetValue( bool state ); + bool GetValue() const; + + virtual void SetLabel( const wxString& label ); + virtual bool Enable( bool enable = TRUE ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + // -------------- + + void DoApplyWidgetStyle(GtkRcStyle *style); + bool IsOwnGtkWindow( GdkWindow *window ); + void OnInternalIdle(); + + GtkWidget *m_widgetCheckbox; + GtkWidget *m_widgetLabel; + + bool m_blockEvent; + +protected: + virtual wxSize DoGetBestSize() const; + +private: + DECLARE_DYNAMIC_CLASS(wxCheckBox) +}; + +#endif // __GTKCHECKBOXH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/checklst.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/checklst.h new file mode 100644 index 0000000000..bf20d53f55 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/checklst.h @@ -0,0 +1,59 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/checklst.h +// Purpose: wxCheckListBox class +// Author: Robert Roebling +// Modified by: +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKCHECKLISTH__ +#define __GTKCHECKLISTH__ + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// there is no "right" choice of the checkbox indicators, so allow the user to +// define them himself if he wants +#ifndef wxCHECKLBOX_CHECKED + #define wxCHECKLBOX_CHECKED wxT('x') + #define wxCHECKLBOX_UNCHECKED wxT(' ') + + #define wxCHECKLBOX_STRING wxT("[ ] ") +#endif + +//----------------------------------------------------------------------------- +// wxCheckListBox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase +{ +public: + wxCheckListBox(); + wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int nStrings = 0, + const wxString *choices = (const wxString *)NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + bool IsChecked(unsigned int index) const; + void Check(unsigned int index, bool check = true); + + int GetItemHeight() const; + +private: + DECLARE_DYNAMIC_CLASS(wxCheckListBox) +}; + +#endif //__GTKCHECKLISTH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/choice.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/choice.h new file mode 100644 index 0000000000..83fb38db79 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/choice.h @@ -0,0 +1,111 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/choice.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKCHOICEH__ +#define __GTKCHOICEH__ + +class WXDLLIMPEXP_FWD_BASE wxSortedArrayString; +class WXDLLIMPEXP_FWD_BASE wxArrayString; + +//----------------------------------------------------------------------------- +// wxChoice +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxChoice : public wxChoiceBase +{ +public: + wxChoice(); + wxChoice( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr ) + { + m_strings = NULL; + + Create(parent, id, pos, size, n, choices, style, validator, name); + } + wxChoice( wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr ) + { + m_strings = NULL; + + Create(parent, id, pos, size, choices, style, validator, name); + } + virtual ~wxChoice(); + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr ); + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr ); + + // implement base class pure virtuals + void DoDeleteOneItem(unsigned int n); + void DoClear(); + + int GetSelection() const; + virtual void SetSelection(int n); + + virtual unsigned int GetCount() const; + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& string); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + wxList m_clientList; // contains the client data for the items + + void DoApplyWidgetStyle(GtkRcStyle *style); + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + + virtual wxSize DoGetBestSize() const; + + virtual bool IsOwnGtkWindow( GdkWindow *window ); + +private: + // DoInsertItems() helper + int GtkAddHelper(GtkWidget *menu, unsigned int pos, const wxString& item); + + // this array is only used for controls with wxCB_SORT style, so only + // allocate it if it's needed (hence using pointer) + wxSortedArrayString *m_strings; + +public: + // this circumvents a GTK+ 2.0 bug so that the selection is + // invalidated properly + int m_selection_hack; + +private: + DECLARE_DYNAMIC_CLASS(wxChoice) +}; + + +#endif // __GTKCHOICEH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/clipbrd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/clipbrd.h new file mode 100644 index 0000000000..18d1d9d400 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/clipbrd.h @@ -0,0 +1,77 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/clipbrd.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __GTKCLIPBOARDH__ +#define __GTKCLIPBOARDH__ + +#if wxUSE_CLIPBOARD + +#include "wx/object.h" +#include "wx/list.h" +#include "wx/dataobj.h" +#include "wx/control.h" +#include "wx/module.h" + +// ---------------------------------------------------------------------------- +// wxClipboard +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase +{ +public: + wxClipboard(); + virtual ~wxClipboard(); + + // open the clipboard before SetData() and GetData() + virtual bool Open(); + + // close the clipboard after SetData() and GetData() + virtual void Close(); + + // query whether the clipboard is opened + virtual bool IsOpened() const; + + // set the clipboard data. all other formats will be deleted. + virtual bool SetData( wxDataObject *data ); + + // add to the clipboard data. + virtual bool AddData( wxDataObject *data ); + + // ask if data in correct format is available + virtual bool IsSupported( const wxDataFormat& format ); + + // fill data with data on the clipboard (if available) + virtual bool GetData( wxDataObject& data ); + + // clears wxTheClipboard and the system's clipboard if possible + virtual void Clear(); + + // implementation from now on + bool m_open; + bool m_ownsClipboard; + bool m_ownsPrimarySelection; + wxDataObject *m_data; + + GtkWidget *m_clipboardWidget; /* for getting and offering data */ + GtkWidget *m_targetsWidget; /* for getting list of supported formats */ + bool m_waiting; /* querying data or formats is asynchronous */ + + bool m_formatSupported; + GdkAtom m_targetRequested; + wxDataObject *m_receivedData; + +private: + DECLARE_DYNAMIC_CLASS(wxClipboard) +}; + +#endif + // wxUSE_CLIPBOARD + +#endif + // __GTKCLIPBOARDH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/colordlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/colordlg.h new file mode 100644 index 0000000000..6b780f7c6b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/colordlg.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/colordlg.h +// Purpose: wxColourDialog +// Author: Vaclav Slavik +// Modified by: +// Created: 2004/06/04 +// Copyright: (c) Vaclav Slavik, 2004 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __COLORDLG_H__ +#define __COLORDLG_H__ + +#include "wx/defs.h" +#include "wx/gdicmn.h" +#include "wx/dialog.h" + + +class WXDLLIMPEXP_CORE wxColourDialog : public wxDialog +{ +public: + wxColourDialog() {} + wxColourDialog(wxWindow *parent, + wxColourData *data = NULL); + virtual ~wxColourDialog() {} + + bool Create(wxWindow *parent, wxColourData *data = NULL); + + wxColourData &GetColourData() { return m_data; } + + virtual int ShowModal(); + +protected: + // implement some base class methods to do nothing to avoid asserts and + // GTK warnings, since this is not a real wxDialog. + virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} + virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height)) {} + + // copy data between the dialog and m_colourData: + void ColourDataToDialog(); + void DialogToColourData(); + + wxColourData m_data; + + DECLARE_DYNAMIC_CLASS(wxColourDialog) +}; + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/colour.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/colour.h new file mode 100644 index 0000000000..3c18f74368 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/colour.h @@ -0,0 +1,69 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/colour.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKCOLOURH__ +#define __GTKCOLOURH__ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" +#include "wx/gdiobj.h" +#include "wx/palette.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxPaintDC; +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class WXDLLIMPEXP_FWD_CORE wxColour; + +//----------------------------------------------------------------------------- +// wxColour +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxColour : public wxColourBase +{ +public: + // constructors + // ------------ + DEFINE_STD_WXCOLOUR_CONSTRUCTORS + + virtual ~wxColour(); + + virtual bool FromString(const wxString& str); + + bool operator==(const wxColour& col) const; + bool operator!=(const wxColour& col) const { return !(*this == col); } + + unsigned char Red() const; + unsigned char Green() const; + unsigned char Blue() const; + + + // Implementation part + void CalcPixel( GdkColormap *cmap ); + int GetPixel() const; + GdkColor *GetColor() const; + +protected: + // ref counting code + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + virtual void + InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); + +private: + DECLARE_DYNAMIC_CLASS(wxColour) +}; + +#endif // __GTKCOLOURH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/combobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/combobox.h new file mode 100644 index 0000000000..585318f4b3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/combobox.h @@ -0,0 +1,187 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/combobox.h +// Purpose: +// Author: Robert Roebling +// Created: 01/02/97 +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKCOMBOBOXH__ +#define __GTKCOMBOBOXH__ + +#include "wx/defs.h" + +#if wxUSE_COMBOBOX + +#include "wx/object.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxComboBox; + +//----------------------------------------------------------------------------- +// global data +//----------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr[]; +extern WXDLLIMPEXP_BASE const wxChar* wxEmptyString; + +//----------------------------------------------------------------------------- +// wxComboBox +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxComboBox : + public wxWindowWithItems +{ +public: + inline wxComboBox() {} + inline wxComboBox(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + Create(parent, id, value, pos, size, n, choices, style, validator, name); + } + inline wxComboBox(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + Create(parent, id, value, pos, size, choices, style, validator, name); + } + + virtual ~wxComboBox(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + void DoClear(); + void DoDeleteOneItem(unsigned int n); + + virtual int FindString(const wxString& s, bool bCase = false) const; + int GetSelection() const; + int GetCurrentSelection() const; + virtual wxString GetString(unsigned int n) const; + wxString GetStringSelection() const; + virtual unsigned int GetCount() const; + virtual void SetSelection(int n); + virtual void SetString(unsigned int n, const wxString &text); + + wxString GetValue() const { return DoGetValue(); } + void SetValue(const wxString& value); + void WriteText(const wxString& value); + + void Copy(); + void Cut(); + void Paste(); + bool CanCopy() const; + bool CanCut() const; + bool CanPaste() const; + void SetInsertionPoint( long pos ); + void SetInsertionPointEnd() { SetInsertionPoint( -1 ); } + long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + void Remove(long from, long to) { Replace(from, to, wxEmptyString); } + void Replace( long from, long to, const wxString& value ); + void SetSelection( long from, long to ); + void GetSelection( long* from, long* to ) const; + void SetEditable( bool editable ); + void Undo() ; + void Redo() ; + bool CanUndo() const; + bool CanRedo() const; + void SelectAll(); + bool IsEditable() const ; + bool HasSelection() const ; + + // implementation + + virtual void SetFocus(); + + void OnSize( wxSizeEvent &event ); + void OnChar( wxKeyEvent &event ); + + // Standard event handling + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + void OnDelete(wxCommandEvent& event); + void OnSelectAll(wxCommandEvent& event); + + void OnUpdateCut(wxUpdateUIEvent& event); + void OnUpdateCopy(wxUpdateUIEvent& event); + void OnUpdatePaste(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + void OnUpdateDelete(wxUpdateUIEvent& event); + void OnUpdateSelectAll(wxUpdateUIEvent& event); + + bool m_ignoreNextUpdate:1; + wxList m_clientDataList; + wxList m_clientObjectList; + int m_prevSelection; + + void DisableEvents(); + void EnableEvents(); + GtkWidget* GetConnectWidget(); + bool IsOwnGtkWindow( GdkWindow *window ); + void DoApplyWidgetStyle(GtkRcStyle *style); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + + virtual wxSize DoGetBestSize() const; + + // implement wxTextEntry pure virtual methods + virtual wxString DoGetValue() const; + virtual wxWindow *GetEditableWindow() { return this; } + + // Widgets that use the style->base colour for the BG colour should + // override this and return true. + virtual bool UseGTKStyleBase() const { return true; } + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox) + DECLARE_EVENT_TABLE() +}; + +#endif + +#endif + + // __GTKCOMBOBOXH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/control.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/control.h new file mode 100644 index 0000000000..c9b8982088 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/control.h @@ -0,0 +1,104 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/control.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKCONTROLH__ +#define __GTKCONTROLH__ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/list.h" +#include "wx/window.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxControl; + +typedef struct _GtkLabel GtkLabel; +typedef struct _GtkFrame GtkFrame; + +//----------------------------------------------------------------------------- +// wxControl +//----------------------------------------------------------------------------- + +// C-linkage function pointer types for GetDefaultAttributesFromGTKWidget +extern "C" { + typedef GtkWidget* (*wxGtkWidgetNew_t)(void); + typedef GtkWidget* (*wxGtkWidgetNewFromStr_t)(const char*); + typedef GtkWidget* (*wxGtkWidgetNewFromAdj_t)(GtkAdjustment*); +} + +class WXDLLIMPEXP_CORE wxControl : public wxControlBase +{ +public: + wxControl(); + wxControl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr) + { + Create(parent, id, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); + + virtual void SetLabel( const wxString &label ); + virtual wxString GetLabel() const; + + virtual wxVisualAttributes GetDefaultAttributes() const; + +protected: + virtual wxSize DoGetBestSize() const; + void PostCreation(const wxSize& size); + + // sets the label to the given string and also sets it for the given widget + void GTKSetLabelForLabel(GtkLabel *w, const wxString& label); + + // as GTKSetLabelForLabel() but for a GtkFrame widget + void GTKSetLabelForFrame(GtkFrame *w, const wxString& label); + + // remove mnemonics ("&"s) from the label + static wxString GTKRemoveMnemonics(const wxString& label); + + // These are used by GetDefaultAttributes + static wxVisualAttributes + GetDefaultAttributesFromGTKWidget(GtkWidget* widget, + bool useBase = false, + int state = -1); + static wxVisualAttributes + GetDefaultAttributesFromGTKWidget(wxGtkWidgetNew_t, + bool useBase = false, + int state = -1); + static wxVisualAttributes + GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromStr_t, + bool useBase = false, + int state = -1); + + static wxVisualAttributes + GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t, + bool useBase = false, + int state = -1); + + // Widgets that use the style->base colour for the BG colour should + // override this and return true. + virtual bool UseGTKStyleBase() const { return false; } + + // this field contains the label in wx format, i.e. with "&" mnemonics + wxString m_label; + +private: + DECLARE_DYNAMIC_CLASS(wxControl) +}; + +#endif // __GTKCONTROLH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/cursor.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/cursor.h new file mode 100644 index 0000000000..15b041183f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/cursor.h @@ -0,0 +1,62 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/cursor.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKCURSORH__ +#define __GTKCURSORH__ + +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +#if wxUSE_IMAGE +#include "wx/image.h" +#endif + +//----------------------------------------------------------------------------- +// wxCursor +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject +{ +public: + wxCursor(); + wxCursor(wxStockCursor id) { InitFromStock(id); } +#if WXWIN_COMPATIBILITY_2_8 + wxCursor(int id) { InitFromStock((wxStockCursor)id); } +#endif +#if wxUSE_IMAGE + wxCursor( const wxImage & image ); +#endif + wxCursor( const char bits[], int width, int height, + int hotSpotX=-1, int hotSpotY=-1, + const char maskBits[] = NULL, + const wxColour* fg = NULL, const wxColour* bg = NULL); + + /* WARNING: the following ctor is missing: + + wxCursor(const wxString& name, + wxBitmapType type = wxCURSOR_DEFAULT_TYPE, + int hotSpotX = 0, int hotSpotY = 0); + */ + + virtual ~wxCursor(); + + // implementation + + GdkCursor *GetCursor() const; + +protected: + void InitFromStock(wxStockCursor); + + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxCursor) +}; + +#endif // __GTKCURSORH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dataform.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dataform.h new file mode 100644 index 0000000000..bfdab5e596 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dataform.h @@ -0,0 +1,74 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/dataform.h +// Purpose: declaration of the wxDataFormat class +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.10.99 (extracted from gtk/dataobj.h) +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_DATAFORM_H +#define _WX_GTK_DATAFORM_H + +class WXDLLIMPEXP_CORE wxDataFormat +{ +public: + // the clipboard formats under GDK are GdkAtoms + typedef GdkAtom NativeFormat; + + wxDataFormat(); + wxDataFormat( wxDataFormatId type ); + wxDataFormat( NativeFormat format ); + + // we have to provide all the overloads to allow using strings instead of + // data formats (as a lot of existing code does) + wxDataFormat( const wxString& id ) { InitFromString(id); } + wxDataFormat( const char *id ) { InitFromString(id); } + wxDataFormat( const wchar_t *id ) { InitFromString(id); } + wxDataFormat( const wxCStrData& id ) { InitFromString(id); } + + + wxDataFormat& operator=(const wxDataFormat& format) + { m_type = format.m_type; m_format = format.m_format; return *this; } + wxDataFormat& operator=(NativeFormat format) + { SetId(format); return *this; } + + // comparison (must have both versions) + bool operator==(NativeFormat format) const + { return m_format == (NativeFormat)format; } + bool operator!=(NativeFormat format) const + { return m_format != (NativeFormat)format; } + bool operator==(wxDataFormatId format) const + { return m_type == (wxDataFormatId)format; } + bool operator!=(wxDataFormatId format) const + { return m_type != (wxDataFormatId)format; } + + // explicit and implicit conversions to NativeFormat which is one of + // standard data types (implicit conversion is useful for preserving the + // compatibility with old code) + NativeFormat GetFormatId() const { return m_format; } + operator NativeFormat() const { return m_format; } + + void SetId( NativeFormat format ); + + // string ids are used for custom types - this SetId() must be used for + // application-specific formats + wxString GetId() const; + void SetId( const wxString& id ); + + // implementation + wxDataFormatId GetType() const; + void SetType( wxDataFormatId type ); + +private: + // common part of ctors from format name + void InitFromString(const wxString& id); + + wxDataFormatId m_type; + NativeFormat m_format; + + void PrepareFormats(); +}; + +#endif // _WX_GTK_DATAFORM_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dataobj.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dataobj.h new file mode 100644 index 0000000000..16bfe64eff --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dataobj.h @@ -0,0 +1,26 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/dataobj.h +// Purpose: declaration of the wxDataObject +// Author: Robert Roebling +// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_DATAOBJ_H_ +#define _WX_GTK_DATAOBJ_H_ + +// ---------------------------------------------------------------------------- +// wxDataObject is the same as wxDataObjectBase under wxGTK +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase +{ +public: + wxDataObject(); + virtual ~wxDataObject(); + + virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const; +}; + +#endif // _WX_GTK_DATAOBJ_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dataobj2.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dataobj2.h new file mode 100644 index 0000000000..b847242cfc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dataobj2.h @@ -0,0 +1,84 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/dataobj2.h +// Purpose: declaration of standard wxDataObjectSimple-derived classes +// Author: Robert Roebling +// Created: 19.10.99 (extracted from gtk/dataobj.h) +// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_DATAOBJ2_H_ +#define _WX_GTK_DATAOBJ2_H_ + +// ---------------------------------------------------------------------------- +// wxBitmapDataObject is a specialization of wxDataObject for bitmaps +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase +{ +public: + // ctors + wxBitmapDataObject(); + wxBitmapDataObject(const wxBitmap& bitmap); + + // destr + virtual ~wxBitmapDataObject(); + + // override base class virtual to update PNG data too + virtual void SetBitmap(const wxBitmap& bitmap); + + // implement base class pure virtuals + // ---------------------------------- + + virtual size_t GetDataSize() const { return m_pngSize; } + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + +protected: + void Init() { m_pngData = NULL; m_pngSize = 0; } + void Clear() { free(m_pngData); } + void ClearAll() { Clear(); Init(); } + + size_t m_pngSize; + void *m_pngData; + + void DoConvertToPng(); + +private: + // virtual function hiding supression + size_t GetDataSize(const wxDataFormat& format) const + { return(wxDataObjectSimple::GetDataSize(format)); } + bool GetDataHere(const wxDataFormat& format, void* pBuf) const + { return(wxDataObjectSimple::GetDataHere(format, pBuf)); } + bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf) + { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); } +}; + +// ---------------------------------------------------------------------------- +// wxFileDataObject is a specialization of wxDataObject for file names +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDataObject : public wxFileDataObjectBase +{ +public: + // implement base class pure virtuals + // ---------------------------------- + + void AddFile( const wxString &filename ); + + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + +private: + // virtual function hiding supression + size_t GetDataSize(const wxDataFormat& format) const + { return(wxDataObjectSimple::GetDataSize(format)); } + bool GetDataHere(const wxDataFormat& format, void* pBuf) const + { return(wxDataObjectSimple::GetDataHere(format, pBuf)); } + bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf) + { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); } +}; + +#endif // _WX_GTK_DATAOBJ2_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dc.h new file mode 100644 index 0000000000..a6d571f8eb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dc.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/dc.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKDCH__ +#define __GTKDCH__ + +#include "wx/dc.h" + +//----------------------------------------------------------------------------- +// wxDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGTKDCImpl : public wxDCImpl +{ +public: + wxGTKDCImpl(wxDC *owner); + virtual ~wxGTKDCImpl() { } + +#if wxUSE_PALETTE + void SetColourMap( const wxPalette& palette ) { SetPalette(palette); } +#endif // wxUSE_PALETTE + + // Resolution in pixels per logical inch + virtual wxSize GetPPI() const; + + virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; } + virtual void EndDoc() { } + virtual void StartPage() { } + virtual void EndPage() { } + + virtual GdkWindow* GetGDKWindow() const { return NULL; } + +public: + // implementation + wxCoord XDEV2LOG(wxCoord x) const { return DeviceToLogicalX(x); } + wxCoord XDEV2LOGREL(wxCoord x) const { return DeviceToLogicalXRel(x); } + wxCoord YDEV2LOG(wxCoord y) const { return DeviceToLogicalY(y); } + wxCoord YDEV2LOGREL(wxCoord y) const { return DeviceToLogicalYRel(y); } + wxCoord XLOG2DEV(wxCoord x) const { return LogicalToDeviceX(x); } + wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); } + wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); } + wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); } + + // base class pure virtuals implemented here + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + virtual void DoGetSizeMM(int* width, int* height) const; + +private: + DECLARE_ABSTRACT_CLASS(wxDC) +}; + +// this must be defined when wxDC::Blit() honours the DC origian and needed to +// allow wxUniv code in univ/winuniv.cpp to work with versions of wxGTK +// 2.3.[23] +#ifndef wxHAS_WORKING_GTK_DC_BLIT + #define wxHAS_WORKING_GTK_DC_BLIT +#endif + +#endif // __GTKDCH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dcclient.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dcclient.h new file mode 100644 index 0000000000..142268273a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dcclient.h @@ -0,0 +1,161 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/dcclient.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKDCCLIENTH__ +#define __GTKDCCLIENTH__ + +#include "wx/gtk1/dc.h" +#include "wx/window.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindowDCImpl; +class WXDLLIMPEXP_FWD_CORE wxPaintDCImpl; +class WXDLLIMPEXP_FWD_CORE wxClientDCImpl; + +//----------------------------------------------------------------------------- +// wxWindowDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxGTKDCImpl +{ +public: + wxWindowDCImpl(wxDC *owner); + wxWindowDCImpl(wxDC *owner, wxWindow *win); + + virtual ~wxWindowDCImpl(); + + virtual bool CanDrawBitmap() const { return true; } + virtual bool CanGetTextExtent() const { return true; } + +protected: + virtual void DoGetSize(int *width, int *height) const; + virtual bool DoFloodFill( wxCoord x, wxCoord y, const wxColour& col, wxFloodFillStyle style=wxFLOOD_SURFACE ); + virtual bool DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const; + + virtual void DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 ); + virtual void DoCrossHair( wxCoord x, wxCoord y ); + virtual void DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc ); + virtual void DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord height, + double sa, double ea ); + virtual void DoDrawPoint( wxCoord x, wxCoord y ); + + virtual void DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset); + virtual void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + + virtual void DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); + virtual void DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0 ); + virtual void DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); + + virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ); + virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y, + bool useMask = false ); + + virtual bool DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode logical_func = wxCOPY, bool useMask = false, + wxCoord xsrcMask = -1, wxCoord ysrcMask = -1 ); + + virtual void DoDrawText( const wxString &text, wxCoord x, wxCoord y ); + virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, + double angle); + virtual void DoGetTextExtent( const wxString &string, + wxCoord *width, wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; + +public: + virtual wxCoord GetCharWidth() const; + virtual wxCoord GetCharHeight() const; + + virtual void Clear(); + + virtual void SetFont( const wxFont &font ); + virtual void SetPen( const wxPen &pen ); + virtual void SetBrush( const wxBrush &brush ); + virtual void SetBackground( const wxBrush &brush ); + virtual void SetLogicalFunction( wxRasterOperationMode function ); + virtual void SetTextForeground( const wxColour &col ); + virtual void SetTextBackground( const wxColour &col ); + virtual void SetBackgroundMode( int mode ); + virtual void SetPalette( const wxPalette& palette ); + + virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); + virtual void DestroyClippingRegion(); + virtual void DoSetDeviceClippingRegion( const wxRegion ®ion ); + + // Resolution in pixels per logical inch + virtual wxSize GetPPI() const; + virtual int GetDepth() const; + + virtual GdkWindow* GetGDKWindow() const { return m_window; } + + // implementation + // -------------- + + GdkWindow *m_window; + GdkGC *m_penGC; + GdkGC *m_brushGC; + GdkGC *m_textGC; + GdkGC *m_bgGC; + GdkColormap *m_cmap; + bool m_isMemDC; + bool m_isScreenDC; + wxWindow *m_owner; + wxRegion m_currentClippingRegion; + wxRegion m_paintClippingRegion; + + void SetUpDC(); + void Destroy(); + virtual void ComputeScaleAndOrigin(); + + GdkWindow *GetWindow() { return m_window; } + +private: + DECLARE_DYNAMIC_CLASS(wxWindowDCImpl) +}; + +//----------------------------------------------------------------------------- +// wxClientDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl +{ +public: + wxClientDCImpl(wxDC *owner) : wxWindowDCImpl(owner) { } + wxClientDCImpl(wxDC *owner, wxWindow *win); + +protected: + virtual void DoGetSize(int *width, int *height) const; + +private: + DECLARE_DYNAMIC_CLASS(wxClientDCImpl) +}; + +//----------------------------------------------------------------------------- +// wxPaintDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl +{ +public: + wxPaintDCImpl(wxDC *owner) : wxClientDCImpl(owner) { } + wxPaintDCImpl(wxDC *owner, wxWindow *win); + +private: + DECLARE_DYNAMIC_CLASS(wxPaintDCImpl) +}; + +#endif // __GTKDCCLIENTH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dcmemory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dcmemory.h new file mode 100644 index 0000000000..0c55c755d8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dcmemory.h @@ -0,0 +1,68 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/dcmemory.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKDCMEMORYH__ +#define __GTKDCMEMORYH__ + +#include "wx/dcmemory.h" +#include "wx/gtk1/dcclient.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxMemoryDCImpl; + +//----------------------------------------------------------------------------- +// wxMemoryDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl +{ +public: + wxMemoryDCImpl(wxMemoryDC *owner) + : wxWindowDCImpl(owner) + { + Init(); + } + + wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap) + : wxWindowDCImpl(owner) + { + Init(); + + DoSelect(bitmap); + } + + wxMemoryDCImpl(wxMemoryDC *owner, wxDC *dc); + virtual ~wxMemoryDCImpl(); + + virtual void DoSelect(const wxBitmap& bitmap); + virtual void DoGetSize( int *width, int *height ) const; + + // these get reimplemented for mono-bitmaps to behave + // more like their Win32 couterparts. They now interpret + // wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0 + // and everything else as drawing 1. + virtual void SetPen( const wxPen &pen ); + virtual void SetBrush( const wxBrush &brush ); + virtual void SetBackground( const wxBrush &brush ); + virtual void SetTextForeground( const wxColour &col ); + virtual void SetTextBackground( const wxColour &col ); + + // implementation + wxBitmap m_selected; + +private: + void Init(); + + DECLARE_DYNAMIC_CLASS(wxMemoryDCImpl) +}; + +#endif // __GTKDCMEMORYH__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dcscreen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dcscreen.h new file mode 100644 index 0000000000..17adad8811 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dcscreen.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/dcscreen.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKDCSCREENH__ +#define __GTKDCSCREENH__ + +#include "wx/gtk1/dcclient.h" + +//----------------------------------------------------------------------------- +// wxScreenDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxPaintDCImpl +{ +public: + wxScreenDCImpl(wxScreenDC *owner); + virtual ~wxScreenDCImpl(); + + // implementation + + static GdkWindow *sm_overlayWindow; + static int sm_overlayWindowX; + static int sm_overlayWindowY; + +protected: + virtual void DoGetSize(int *width, int *height) const; + +private: + DECLARE_DYNAMIC_CLASS(wxScreenDCImpl) +}; + +#endif // __GTKDCSCREENH__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dialog.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dialog.h new file mode 100644 index 0000000000..a5adcebec5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dialog.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/dialog.h +// Purpose: +// Author: Robert Roebling +// Created: +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKDIALOGH__ +#define __GTKDIALOGH__ + +//----------------------------------------------------------------------------- +// wxDialog +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDialog: public wxDialogBase +{ +public: + wxDialog() { Init(); } + wxDialog( wxWindow *parent, wxWindowID id, + const wxString &title, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString &name = wxDialogNameStr ); + bool Create( wxWindow *parent, wxWindowID id, + const wxString &title, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString &name = wxDialogNameStr ); + virtual ~wxDialog() {} + + void OnApply( wxCommandEvent &event ); + void OnCancel( wxCommandEvent &event ); + void OnOK( wxCommandEvent &event ); + void OnPaint( wxPaintEvent& event ); + void OnCloseWindow( wxCloseEvent& event ); + /* + void OnCharHook( wxKeyEvent& event ); + */ + + virtual bool Show( bool show = TRUE ); + virtual int ShowModal(); + virtual void EndModal( int retCode ); + virtual bool IsModal() const; + void SetModal( bool modal ); + + // implementation + // -------------- + + bool m_modalShowing; + +protected: + // common part of all ctors + void Init(); + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxDialog) +}; + +#endif // __GTKDIALOGH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dnd.h new file mode 100644 index 0000000000..11832ed3f3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/dnd.h @@ -0,0 +1,129 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/dnd.h +// Purpose: declaration of the wxDropTarget class +// Author: Robert Roebling +// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKDNDH__ +#define __GTKDNDH__ + +#if wxUSE_DRAG_AND_DROP + +#include "wx/object.h" +#include "wx/string.h" +#include "wx/dataobj.h" +#include "wx/cursor.h" +#include "wx/icon.h" +#include "wx/gdicmn.h" + +//------------------------------------------------------------------------- +// classes +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class WXDLLIMPEXP_FWD_CORE wxDropTarget; +class WXDLLIMPEXP_FWD_CORE wxTextDropTarget; +class WXDLLIMPEXP_FWD_CORE wxFileDropTarget; + +class WXDLLIMPEXP_FWD_CORE wxDropSource; + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// this macro may be used instead for wxDropSource ctor arguments: it will use +// the icon 'name' from an XPM file under GTK, but will expand to something +// else under MSW. If you don't use it, you will have to use #ifdef in the +// application code. +#define wxDROP_ICON(name) wxICON(name) + +//------------------------------------------------------------------------- +// wxDropTarget +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropTarget: public wxDropTargetBase +{ +public: + wxDropTarget(wxDataObject *dataObject = NULL ); + + virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); + virtual bool OnDrop(wxCoord x, wxCoord y); + virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def); + virtual bool GetData(); + + // implementation + + GdkAtom GetMatchingPair(bool quiet = false); + + void RegisterWidget( GtkWidget *widget ); + void UnregisterWidget( GtkWidget *widget ); + + GdkDragContext *m_dragContext; + GtkWidget *m_dragWidget; + GtkSelectionData *m_dragData; + unsigned m_dragTime; + bool m_firstMotion; // gdk has no "gdk_drag_enter" event + + void SetDragContext( GdkDragContext *dc ) { m_dragContext = dc; } + void SetDragWidget( GtkWidget *w ) { m_dragWidget = w; } + void SetDragData( GtkSelectionData *sd ) { m_dragData = sd; } + void SetDragTime(unsigned time) { m_dragTime = time; } +}; + +//------------------------------------------------------------------------- +// wxDropSource +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase +{ +public: + // constructor. set data later with SetData() + wxDropSource( wxWindow *win = NULL, + const wxIcon © = wxNullIcon, + const wxIcon &move = wxNullIcon, + const wxIcon &none = wxNullIcon); + + // constructor for setting one data object + wxDropSource( wxDataObject& data, + wxWindow *win, + const wxIcon © = wxNullIcon, + const wxIcon &move = wxNullIcon, + const wxIcon &none = wxNullIcon); + + virtual ~wxDropSource(); + + // start drag action + virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); + + // GTK implementation + void RegisterWindow(); + void UnregisterWindow(); + + void PrepareIcon( int action, GdkDragContext *context ); + + GtkWidget *m_widget; + GtkWidget *m_iconWindow; + GdkDragContext *m_dragContext; + wxWindow *m_window; + + wxDragResult m_retValue; + wxIcon m_iconCopy, + m_iconMove, + m_iconNone; + + bool m_waiting; + +private: + // common part of both ctors + void SetIcons(const wxIcon& copy, + const wxIcon& move, + const wxIcon& none); +}; + +#endif // wxUSE_DRAG_AND_DROP + +#endif //__GTKDNDH__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/filedlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/filedlg.h new file mode 100644 index 0000000000..41ed774ea4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/filedlg.h @@ -0,0 +1,68 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/filedlg.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKFILEDLGH__ +#define __GTKFILEDLGH__ + +#include "wx/generic/filedlgg.h" + +//------------------------------------------------------------------------- +// wxFileDialog +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDialog: public wxGenericFileDialog +{ +public: + wxFileDialog() { } + + wxFileDialog(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr); + + virtual ~wxFileDialog(); + + virtual wxString GetPath() const; + virtual void GetPaths(wxArrayString& paths) const; + virtual wxString GetDirectory() const; + virtual wxString GetFilename() const; + virtual void GetFilenames(wxArrayString& files) const; + virtual int GetFilterIndex() const; + + virtual void SetMessage(const wxString& message); + virtual void SetPath(const wxString& path); + virtual void SetDirectory(const wxString& dir); + virtual void SetFilename(const wxString& name); + virtual void SetWildcard(const wxString& wildCard); + virtual void SetFilterIndex(int filterIndex); + + virtual int ShowModal(); + virtual bool Show( bool show = true ); + +//private: + bool m_destroyed_by_delete; + + // override this from wxTLW since the native + // form doesn't have any m_wxwindow + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + +private: + DECLARE_DYNAMIC_CLASS(wxFileDialog) + DECLARE_EVENT_TABLE() + void OnFakeOk( wxCommandEvent &event ); +}; + +#endif // __GTKFILEDLGH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/font.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/font.h new file mode 100644 index 0000000000..b240152149 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/font.h @@ -0,0 +1,141 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/font.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKFONTH__ +#define __GTKFONTH__ + +#include "wx/hash.h" + +// ---------------------------------------------------------------------------- +// classes +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxPaintDC; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class WXDLLIMPEXP_FWD_CORE wxFont; + +// ---------------------------------------------------------------------------- +// wxFont +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFont : public wxFontBase +{ +public: + // ctors and such + wxFont() { } + + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + + wxFont(const wxString& fontname) + { + Create(fontname); + } + + wxFont(const wxNativeFontInfo& info); + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxFont(int size, + int family, + int style, + int weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding); + } +#endif + + wxFont(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(size, family, style, weight, underlined, face, encoding); + } + + wxFont(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(10, family, style, weight, underlined, face, encoding); + SetPixelSize(pixelSize); + } + + bool Create(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + + + // wxGTK-specific + bool Create(const wxString& fontname); + + virtual ~wxFont(); + + // implement base class pure virtuals + virtual int GetPointSize() const; + virtual wxFontStyle GetStyle() const; + virtual wxFontWeight GetWeight() const; + virtual wxString GetFaceName() const; + virtual bool GetUnderlined() const; + virtual wxFontEncoding GetEncoding() const; + virtual const wxNativeFontInfo *GetNativeFontInfo() const; + virtual bool IsFixedWidth() const; + + virtual void SetPointSize( int pointSize ); + virtual void SetFamily(wxFontFamily family); + virtual void SetStyle(wxFontStyle style); + virtual void SetWeight(wxFontWeight weight); + virtual bool SetFaceName( const wxString& faceName ); + virtual void SetUnderlined( bool underlined ); + virtual void SetEncoding(wxFontEncoding encoding); + + wxDECLARE_COMMON_FONT_METHODS(); + + // implementation from now on + void Unshare(); + + GdkFont* GetInternalFont(float scale = 1.0) const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info ); + virtual wxFontFamily DoGetFamily() const; + +private: + DECLARE_DYNAMIC_CLASS(wxFont) +}; + +#endif // __GTKFONTH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/fontdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/fontdlg.h new file mode 100644 index 0000000000..bb82bf8d9a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/fontdlg.h @@ -0,0 +1,50 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/fontdlg.h +// Purpose: wxFontDialog +// Author: Robert Roebling +// Created: +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTK_FONTDLGH__ +#define __GTK_FONTDLGH__ + +//----------------------------------------------------------------------------- +// wxFontDialog +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFontDialog : public wxFontDialogBase +{ +public: + wxFontDialog() : wxFontDialogBase() { /* must be Create()d later */ } + wxFontDialog(wxWindow *parent) + : wxFontDialogBase(parent) { Create(parent); } + wxFontDialog(wxWindow *parent, const wxFontData& data) + : wxFontDialogBase(parent, data) { Create(parent, data); } + + virtual ~wxFontDialog(); + + // implementation only + void SetChosenFont(const char *name); + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated interface, don't use + wxDEPRECATED( wxFontDialog(wxWindow *parent, const wxFontData *data) ); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + // create the GTK dialog + virtual bool DoCreate(wxWindow *parent); + +private: + DECLARE_DYNAMIC_CLASS(wxFontDialog) +}; + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated interface, don't use +inline wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData *data) + : wxFontDialogBase(parent) { InitFontData(data); Create(parent); } +#endif // WXWIN_COMPATIBILITY_2_6 + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/frame.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/frame.h new file mode 100644 index 0000000000..12d0984a64 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/frame.h @@ -0,0 +1,108 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/frame.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKFRAMEH__ +#define __GTKFRAMEH__ + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame; +class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow; +class WXDLLIMPEXP_FWD_CORE wxMenu; +class WXDLLIMPEXP_FWD_CORE wxMenuBar; +class WXDLLIMPEXP_FWD_CORE wxToolBar; +class WXDLLIMPEXP_FWD_CORE wxStatusBar; + +//----------------------------------------------------------------------------- +// wxFrame +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase +{ +public: + // construction + wxFrame() { Init(); } + wxFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxFrame(); + +#if wxUSE_STATUSBAR + virtual void PositionStatusBar(); + + virtual wxStatusBar* CreateStatusBar(int number = 1, + long style = wxSTB_DEFAULT_STYLE, + wxWindowID id = 0, + const wxString& name = wxStatusLineNameStr); + + void SetStatusBar(wxStatusBar *statbar); +#endif // wxUSE_STATUSBAR + +#if wxUSE_TOOLBAR + virtual wxToolBar* CreateToolBar(long style = -1, + wxWindowID id = -1, + const wxString& name = wxToolBarNameStr); + void SetToolBar(wxToolBar *toolbar); +#endif // wxUSE_TOOLBAR + + wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); } + + // implementation from now on + // -------------------------- + + // GTK callbacks + virtual void GtkOnSize( int x, int y, int width, int height ); + virtual void OnInternalIdle(); + + bool m_menuBarDetached; + int m_menuBarHeight; + bool m_toolBarDetached; + +protected: + // common part of all ctors + void Init(); + + // override wxWindow methods to take into account tool/menu/statusbars + virtual void DoSetClientSize(int width, int height); + virtual void DoGetClientSize( int *width, int *height ) const; + +#if wxUSE_MENUS_NATIVE + + virtual void DetachMenuBar(); + virtual void AttachMenuBar(wxMenuBar *menubar); + +public: + // Menu size is dynamic now, call this whenever it might change. + void UpdateMenuBarSize(); + +#endif // wxUSE_MENUS_NATIVE + + DECLARE_DYNAMIC_CLASS(wxFrame) +}; + +#endif // __GTKFRAMEH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/gauge.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/gauge.h new file mode 100644 index 0000000000..2d8aa5c8d9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/gauge.h @@ -0,0 +1,80 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/gauge.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKGAUGEH__ +#define __GTKGAUGEH__ + +//----------------------------------------------------------------------------- +// wxGaugeBox +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase +{ +public: + wxGauge() { Init(); } + + wxGauge( wxWindow *parent, + wxWindowID id, + int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr ) + { + Init(); + + Create(parent, id, range, pos, size, style, validator, name); + } + + bool Create( wxWindow *parent, + wxWindowID id, int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr ); + + void SetShadowWidth( int WXUNUSED(w) ) { } + void SetBezelFace( int WXUNUSED(w) ) { } + void SetRange( int r ); + void SetValue( int pos ); + int GetShadowWidth() const { return 0; } + int GetBezelFace() const { return 0; } + int GetRange() const; + int GetValue() const; + + bool IsVertical() const { return HasFlag(wxGA_VERTICAL); } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + // ------------- + + // the max and current gauge values + int m_rangeMax, + m_gaugePos; + +protected: + // common part of all ctors + void Init() { m_rangeMax = m_gaugePos = 0; } + + // set the gauge value to the value of m_gaugePos + void DoSetGauge(); + + virtual wxSize DoGetBestSize() const; + + virtual wxVisualAttributes GetDefaultAttributes() const; + +private: + DECLARE_DYNAMIC_CLASS(wxGauge) +}; + +#endif + // __GTKGAUGEH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/glcanvas.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/glcanvas.h new file mode 100644 index 0000000000..222225e0d9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/glcanvas.h @@ -0,0 +1,108 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/glcanvas.h +// Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK +// Author: Robert Roebling +// Modified by: +// Created: 17/8/98 +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GLCANVAS_H_ +#define _WX_GLCANVAS_H_ + +#include "wx/unix/glx11.h" + +//--------------------------------------------------------------------------- +// wxGLCanvas +//--------------------------------------------------------------------------- + +class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasX11 +{ +public: + wxGLCanvas(wxWindow *parent, + wxWindowID id = wxID_ANY, + const int *attribList = NULL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const wxPalette& palette = wxNullPalette); + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette); + + + // implement wxGLCanvasX11 methods + // ------------------------------- + + virtual Window GetXWindow() const; + + + // deprecated methods + // ------------------ + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_CONSTRUCTOR( + wxGLCanvas(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); + + wxDEPRECATED_CONSTRUCTOR( + wxGLCanvas(wxWindow *parent, + const wxGLContext *shared, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); + + wxDEPRECATED_CONSTRUCTOR( + wxGLCanvas(wxWindow *parent, + const wxGLCanvas *shared, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); + + // called from "realized" callback to create the implicit context if needed + void GTKInitImplicitContext(); +#endif // WXWIN_COMPATIBILITY_2_8 + + // implementation from now on + virtual void OnInternalIdle(); + + + GtkWidget *m_glWidget; + +#if WXWIN_COMPATIBILITY_2_8 + wxGLContext *m_sharedContext; + wxGLCanvas *m_sharedContextOf; + const bool m_createImplicitContext; +#endif // WXWIN_COMPATIBILITY_2_8 + +private: + DECLARE_CLASS(wxGLCanvas) +}; + +#endif // _WX_GLCANVAS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/listbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/listbox.h new file mode 100644 index 0000000000..96968fc153 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/listbox.h @@ -0,0 +1,139 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/listbox.h +// Purpose: wxListBox class declaration +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKLISTBOXH__ +#define __GTKLISTBOXH__ + +#include "wx/list.h" + +typedef struct _GtkList GtkList; + +class WXDLLIMPEXP_FWD_BASE wxSortedArrayString; + +//----------------------------------------------------------------------------- +// wxListBox +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase +{ +public: + // ctors and such + wxListBox(); + wxListBox( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr ) + { +#if wxUSE_CHECKLISTBOX + m_hasCheckBoxes = false; +#endif // wxUSE_CHECKLISTBOX + Create(parent, id, pos, size, n, choices, style, validator, name); + } + wxListBox( wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr ) + { +#if wxUSE_CHECKLISTBOX + m_hasCheckBoxes = false; +#endif // wxUSE_CHECKLISTBOX + Create(parent, id, pos, size, choices, style, validator, name); + } + virtual ~wxListBox(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + // implement base class pure virtuals + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + virtual int FindString(const wxString& s, bool bCase = false) const; + + virtual bool IsSelected(int n) const; + virtual void DoSetSelection(int n, bool select); + virtual int GetSelection() const; + virtual int GetSelections(wxArrayInt& aSelections) const; + + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void DoSetFirstItem(int n); + + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation from now on + + void GtkAddItem( const wxString &item, int pos=-1 ); + int GtkGetIndex( GtkWidget *item ) const; + GtkWidget *GetConnectWidget(); + bool IsOwnGtkWindow( GdkWindow *window ); + void DoApplyWidgetStyle(GtkRcStyle *style); + void OnInternalIdle(); + +#if wxUSE_TOOLTIPS + void ApplyToolTip( GtkTooltips *tips, const wxChar *tip ); +#endif // wxUSE_TOOLTIPS + + GtkList *m_list; + wxList m_clientList; + +#if wxUSE_CHECKLISTBOX + bool m_hasCheckBoxes; +#endif // wxUSE_CHECKLISTBOX + + int m_prevSelection; + bool m_blockEvent; + + virtual void FixUpMouseEvent(GtkWidget *widget, wxCoord& x, wxCoord& y); + +protected: + virtual wxSize DoGetBestSize() const; + + // return the string label for the given item + wxString GetRealLabel(struct _GList *item) const; + + // Widgets that use the style->base colour for the BG colour should + // override this and return true. + virtual bool UseGTKStyleBase() const { return true; } + +private: + // this array is only used for controls with wxCB_SORT style, so only + // allocate it if it's needed (hence using pointer) + wxSortedArrayString *m_strings; + + DECLARE_DYNAMIC_CLASS(wxListBox) +}; + +#endif // __GTKLISTBOXH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/mdi.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/mdi.h new file mode 100644 index 0000000000..301ab4c482 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/mdi.h @@ -0,0 +1,147 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/mdi.h +// Purpose: TDI-based MDI implementation for wxGTK1 +// Author: Robert Roebling +// Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes +// Copyright: (c) 1998 Robert Roebling +// (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK1_MDI_H_ +#define _WX_GTK1_MDI_H_ + +#include "wx/frame.h" + +class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame; +class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow; + +typedef struct _GtkNotebook GtkNotebook; + +//----------------------------------------------------------------------------- +// wxMDIParentFrame +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIParentFrame : public wxMDIParentFrameBase +{ +public: + wxMDIParentFrame() { Init(); } + wxMDIParentFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr); + + // we don't store the active child in m_currentChild unlike the base class + // version so override this method to find it dynamically + virtual wxMDIChildFrame *GetActiveChild() const; + + // implement base class pure virtuals + // ---------------------------------- + + virtual void ActivateNext(); + virtual void ActivatePrevious(); + + static bool IsTDI() { return true; } + + // implementation + + bool m_justInserted; + + virtual void GtkOnSize( int x, int y, int width, int height ); + virtual void OnInternalIdle(); + +private: + void Init(); + + DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) +}; + +//----------------------------------------------------------------------------- +// wxMDIChildFrame +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIChildFrame : public wxTDIChildFrame +{ +public: + wxMDIChildFrame() { Init(); } + wxMDIChildFrame(wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxMDIChildFrame(); + + virtual void SetMenuBar( wxMenuBar *menu_bar ); + virtual wxMenuBar *GetMenuBar() const; + + virtual void Activate(); + + virtual void SetTitle(const wxString& title); + + // implementation + + void OnActivate( wxActivateEvent& event ); + void OnMenuHighlight( wxMenuEvent& event ); + + wxMenuBar *m_menuBar; + GtkNotebookPage *m_page; + bool m_justInserted; + +private: + void Init(); + + GtkNotebook *GTKGetNotebook() const; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) +}; + +//----------------------------------------------------------------------------- +// wxMDIClientWindow +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIClientWindow : public wxMDIClientWindowBase +{ +public: + wxMDIClientWindow() { } + + virtual bool CreateClient(wxMDIParentFrame *parent, + long style = wxVSCROLL | wxHSCROLL); + +private: + DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) +}; + +#endif // _WX_GTK1_MDI_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/menu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/menu.h new file mode 100644 index 0000000000..b3285c7d11 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/menu.h @@ -0,0 +1,101 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/menu.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKMENUH__ +#define __GTKMENUH__ + +//----------------------------------------------------------------------------- +// wxMenuBar +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase +{ +public: + // ctors + wxMenuBar(); + wxMenuBar(long style); + wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); + virtual ~wxMenuBar(); + + // implement base class (pure) virtuals + virtual bool Append( wxMenu *menu, const wxString &title ); + virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Remove(size_t pos); + + virtual int FindMenuItem(const wxString& menuString, + const wxString& itemString) const; + virtual wxMenuItem* FindItem( int id, wxMenu **menu = NULL ) const; + + virtual void EnableTop( size_t pos, bool flag ); + virtual void SetMenuLabel( size_t pos, const wxString& label ); + virtual wxString GetMenuLabel( size_t pos ) const; + + // common part of Append and Insert + bool GtkAppend(wxMenu *menu, const wxString& title, int pos=-1); + + virtual void Attach(wxFrame *frame); + virtual void Detach(); + + GtkAccelGroup *m_accel; + GtkWidget *m_menubar; + long m_style; + +private: + void Init(size_t n, wxMenu *menus[], const wxString titles[], long style); + + DECLARE_DYNAMIC_CLASS(wxMenuBar) +}; + +//----------------------------------------------------------------------------- +// wxMenu +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase +{ +public: + // ctors & dtor + wxMenu(const wxString& title, long style = 0) + : wxMenuBase(title, style) { Init(); } + + wxMenu(long style = 0) : wxMenuBase(style) { Init(); } + + virtual ~wxMenu(); + + // implement base class virtuals + virtual wxMenuItem* DoAppend(wxMenuItem *item); + virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); + virtual wxMenuItem* DoRemove(wxMenuItem *item); + + // Returns the title, with mnemonics translated to wx format + wxString GetTitle() const; + + // TODO: virtual void SetTitle(const wxString& title); + + // implementation + int FindMenuIdByMenuItem( GtkWidget *menuItem ) const; + + // implementation GTK only + GtkWidget *m_menu; // GtkMenu + GtkWidget *m_owner; + GtkAccelGroup *m_accel; + +private: + // common code for all constructors: + void Init(); + + // common part of Append (if pos == -1) and Insert + bool GtkAppend(wxMenuItem *item, int pos=-1); + + GtkWidget *m_prevRadio; + + DECLARE_DYNAMIC_CLASS(wxMenu) +}; + +#endif + // __GTKMENUH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/menuitem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/menuitem.h new file mode 100644 index 0000000000..a36b1b2fc7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/menuitem.h @@ -0,0 +1,77 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/menuitem.h +// Purpose: wxMenuItem class +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKMENUITEMH__ +#define __GTKMENUITEMH__ + +#include "wx/bitmap.h" + +//----------------------------------------------------------------------------- +// wxMenuItem +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase +{ +public: + wxMenuItem(wxMenu *parentMenu = NULL, + int id = wxID_SEPARATOR, + const wxString& text = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL, + wxMenu *subMenu = NULL); + virtual ~wxMenuItem(); + + // implement base class virtuals + virtual void SetItemLabel( const wxString& str ); + virtual wxString GetItemLabel() const; + virtual void Enable( bool enable = TRUE ); + virtual void Check( bool check = TRUE ); + virtual bool IsChecked() const; + virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } + virtual const wxBitmap& GetBitmap() const { return m_bitmap; } + +#if wxUSE_ACCEL + virtual wxAcceleratorEntry *GetAccel() const; +#endif // wxUSE_ACCEL + + // implementation + void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; } + GtkWidget *GetMenuItem() const { return m_menuItem; } + GtkWidget *GetLabelWidget() const { return m_labelWidget; } + void SetLabelWidget(GtkWidget *labelWidget) { m_labelWidget = labelWidget; } + wxString GetFactoryPath() const; + + wxString GetHotKey() const { return m_hotKey; } + + // compatibility only, don't use in new code + wxMenuItem(wxMenu *parentMenu, + int id, + const wxString& text, + const wxString& help, + bool isCheckable, + wxMenu *subMenu = NULL); + +private: + // common part of all ctors + void Init(); + + // DoSetText() transforms the accel mnemonics in our label from MSW/wxWin + // style to GTK+ and is called from ctor and SetText() + void DoSetText(const wxString& text); + + wxString m_hotKey; + wxBitmap m_bitmap; // Bitmap for menuitem, if any + + GtkWidget *m_menuItem; // GtkMenuItem + GtkWidget* m_labelWidget; // Label widget + + DECLARE_DYNAMIC_CLASS(wxMenuItem) +}; + +#endif + //__GTKMENUITEMH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/minifram.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/minifram.h new file mode 100644 index 0000000000..84e3104cbc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/minifram.h @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/minifram.h +// Purpose: wxMiniFrame class +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKMINIFRAMEH__ +#define __GTKMINIFRAMEH__ + +#include "wx/defs.h" + +#if wxUSE_MINIFRAME + +#include "wx/object.h" +#include "wx/frame.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxMiniFrame; + +//----------------------------------------------------------------------------- +// wxMiniFrame +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMiniFrame: public wxFrame +{ + DECLARE_DYNAMIC_CLASS(wxMiniFrame) + +public: + wxMiniFrame() {} + wxMiniFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION, + const wxString& name = wxFrameNameStr) + { + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION, + const wxString& name = wxFrameNameStr); + + virtual void SetTitle( const wxString &title ); + // implementation + + bool m_isDragging; + int m_oldX,m_oldY; + int m_diffX,m_diffY; +}; + +#endif + +#endif + // __GTKMINIFRAMEH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/msgdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/msgdlg.h new file mode 100644 index 0000000000..444f5a798e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/msgdlg.h @@ -0,0 +1,50 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/msgdlg.h +// Purpose: wxMessageDialog for GTK+2 +// Author: Vaclav Slavik +// Modified by: +// Created: 2003/02/28 +// Copyright: (c) Vaclav Slavik, 2003 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __MSGDLG_H__ +#define __MSGDLG_H__ + +#include "wx/defs.h" +#include "wx/dialog.h" + +// type is an 'or' (|) of wxOK, wxCANCEL, wxYES_NO +// Returns wxYES/NO/OK/CANCEL + +extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxMessageBoxCaptionStr[]; + +class WXDLLIMPEXP_CORE wxMessageDialog: public wxDialog, public wxMessageDialogBase +{ +public: + wxMessageDialog(wxWindow *parent, const wxString& message, + const wxString& caption = wxMessageBoxCaptionStr, + long style = wxOK|wxCENTRE, + const wxPoint& pos = wxDefaultPosition); + virtual ~wxMessageDialog(); + + int ShowModal(); + virtual bool Show( bool WXUNUSED(show) = true ) { return false; } + +protected: + // implement some base class methods to do nothing to avoid asserts and + // GTK warnings, since this is not a real wxDialog. + virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} + virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height)) {} + +private: + wxString m_caption; + wxString m_message; + + DECLARE_DYNAMIC_CLASS(wxMessageDialog) +}; + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/notebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/notebook.h new file mode 100644 index 0000000000..45e7db965f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/notebook.h @@ -0,0 +1,149 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/notebook.h +// Purpose: wxNotebook class +// Author: Robert Roebling +// Modified by: +// Copyright: (c) Julian Smart and Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKNOTEBOOKH__ +#define __GTKNOTEBOOKH__ + +//----------------------------------------------------------------------------- +// internal class +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxGtkNotebookPage; + +#include "wx/list.h" +WX_DECLARE_LIST(wxGtkNotebookPage, wxGtkNotebookPagesList); + +//----------------------------------------------------------------------------- +// wxNotebook +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase +{ +public: + // default for dynamic class + wxNotebook(); + // the same arguments as for wxControl + wxNotebook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr); + // Create() function + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr); + // dtor + virtual ~wxNotebook(); + + // accessors + // --------- + + // set the currently selected page, return the index of the previously + // selected one (or wxNOT_FOUND on error) + // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events + int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); } + // get the currently selected page + int GetSelection() const; + + // changes selected page without sending events + int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); } + + // set/get the title of a page + bool SetPageText(size_t nPage, const wxString& strText); + wxString GetPageText(size_t nPage) const; + + // sets/returns item's image index in the current image list + int GetPageImage(size_t nPage) const; + bool SetPageImage(size_t nPage, int nImage); + + // control the appearance of the notebook pages + // set the size (the same for all pages) + void SetPageSize(const wxSize& size); + // set the padding between tabs (in pixels) + void SetPadding(const wxSize& padding); + // sets the size of the tabs (assumes all tabs are the same size) + void SetTabSize(const wxSize& sz); + + virtual int HitTest(const wxPoint& pt, long *flags = NULL) const; + + // operations + // ---------- + // remove all pages + bool DeleteAllPages(); + + // adds a new page to the notebook (it will be deleted by the notebook, + // don't delete it yourself). If bSelect, this page becomes active. + // the same as AddPage(), but adds it at the specified position + bool InsertPage( size_t position, + wxNotebookPage *win, + const wxString& strText, + bool bSelect = false, + int imageId = NO_IMAGE ); + + // handler for tab navigation + // -------------------------- + void OnNavigationKey(wxNavigationKeyEvent& event); + + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + // -------------- + +#if wxUSE_CONSTRAINTS + void SetConstraintSizes(bool recurse); + bool DoPhase(int phase); +#endif + + // set all page's attributes + void DoApplyWidgetStyle(GtkRcStyle *style); + + // report if window belongs to notebook + bool IsOwnGtkWindow( GdkWindow *window ); + + // common part of all ctors + void Init(); + + // helper function + wxGtkNotebookPage* GetNotebookPage(int page) const; + + // the additional page data (the pages themselves are in m_pages array) + wxGtkNotebookPagesList m_pagesData; + + // for reasons explained in gtk/notebook.cpp we store the current + // selection internally instead of querying the notebook for it + int m_selection; + + // flag set to true while we're inside "switch_page" callback + bool m_inSwitchPage; + + // flag set to true when the switch-page signal has been programmatically generated + bool m_skipNextPageChangeEvent; + +protected: + // remove one page from the notebook but do not destroy it + virtual wxNotebookPage *DoRemovePage(size_t nPage); + + int DoSetSelection(size_t nPage, int flags = 0); + +private: + // the padding set by SetPadding() + int m_padding; + + DECLARE_DYNAMIC_CLASS(wxNotebook) + DECLARE_EVENT_TABLE() +}; + +#endif + // __GTKNOTEBOOKH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/pen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/pen.h new file mode 100644 index 0000000000..6c308c31d7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/pen.h @@ -0,0 +1,78 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/pen.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKPENH__ +#define __GTKPENH__ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxPen; + +#if defined(__WXGTK127__) +typedef signed char wxGTKDash; +#else +typedef char wxGTKDash; +#endif + +//----------------------------------------------------------------------------- +// wxPen +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPen: public wxPenBase +{ +public: + wxPen() { } + + wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID ); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); +#endif + + bool operator==(const wxPen& pen) const; + bool operator!=(const wxPen& pen) const { return !(*this == pen); } + + void SetColour( const wxColour &colour ); + void SetColour( unsigned char red, unsigned char green, unsigned char blue ); + void SetCap( wxPenCap capStyle ); + void SetJoin( wxPenJoin joinStyle ); + void SetStyle( wxPenStyle style ); + void SetWidth( int width ); + void SetDashes( int number_of_dashes, const wxDash *dash ); + void SetStipple(const wxBitmap& stipple); + + wxColour GetColour() const; + wxPenCap GetCap() const; + wxPenJoin GetJoin() const; + wxPenStyle GetStyle() const; + int GetWidth() const; + int GetDashes(wxDash **ptr) const; + int GetDashCount() const; + wxDash* GetDash() const; + wxBitmap *GetStipple() const; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxPenStyle)style); } +#endif + +private: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxPen) +}; + +#endif // __GTKPENH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/popupwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/popupwin.h new file mode 100644 index 0000000000..b053b519de --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/popupwin.h @@ -0,0 +1,53 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/popupwin.h +// Purpose: +// Author: Robert Roebling +// Created: +// Copyright: (c) 2001 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKPOPUPWINH__ +#define __GTKPOPUPWINH__ + +#include "wx/defs.h" +#include "wx/panel.h" +#include "wx/icon.h" + +//----------------------------------------------------------------------------- +// wxPopUpWindow +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPopupWindow: public wxPopupWindowBase +{ +public: + wxPopupWindow() { } + virtual ~wxPopupWindow(); + + wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE) + { (void)Create(parent, flags); } + bool Create(wxWindow *parent, int flags = wxBORDER_NONE); + + virtual bool Show( bool show = TRUE ); + + // implementation + // -------------- + + virtual void DoMoveWindow(int x, int y, int width, int height); + + virtual void OnInternalIdle(); + + +protected: + void GtkOnSize( int x, int y, int width, int height ); + + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxPopupWindow) +}; + +#endif // __GTKPOPUPWINDOWH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/private.h new file mode 100644 index 0000000000..e684e9ea2f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/private.h @@ -0,0 +1,95 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/private.h +// Purpose: wxGTK private macros, functions &c +// Author: Vadim Zeitlin +// Modified by: +// Created: 12.03.02 +// Copyright: (c) 2002 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_H_ +#define _WX_GTK_PRIVATE_H_ + +#include +#include + +#include "wx/event.h" + +// fail all version tests if the GTK+ version is so ancient that it doesn't +// even have GTK_CHECK_VERSION +#ifndef GTK_CHECK_VERSION + #define GTK_CHECK_VERSION(a, b, c) 0 +#endif + +#define wxGTK_CONV(s) s.c_str() +#define wxGTK_CONV_BACK(s) s + + +// child is not a member of GTK_BUTTON() any more in GTK+ 2.0 +#define BUTTON_CHILD(w) GTK_BUTTON((w))->child + +// event_window has disappeared from GtkToggleButton in GTK+ 2.0 +#define TOGGLE_BUTTON_EVENT_WIN(w) GTK_TOGGLE_BUTTON((w))->event_window + +// gtk_editable_{copy|cut|paste}_clipboard() had an extra argument under +// previous GTK+ versions but no more +#if defined(__WXGTK20__) || (GTK_MINOR_VERSION > 0) + #define DUMMY_CLIPBOARD_ARG +#else + #define DUMMY_CLIPBOARD_ARG ,0 +#endif + +// _GtkEditable is private in GTK2 +#define GET_EDITABLE_POS(w) GTK_EDITABLE((w))->current_pos +#define SET_EDITABLE_POS(w, pos) \ + GTK_EDITABLE((w))->current_pos = (pos) + +// this GtkNotebook struct field has been renamed in GTK2 +#define NOTEBOOK_PANEL(nb) GTK_NOTEBOOK(nb)->panel + +#define SCROLLBAR_CBACK_ARG +#define GET_SCROLL_TYPE(w) GTK_RANGE((w))->scroll_type + +// translate a GTK+ scroll type to a wxEventType +inline wxEventType GtkScrollTypeToWx(guint scrollType) +{ + wxEventType command; + switch ( scrollType ) + { + case GTK_SCROLL_STEP_BACKWARD: + command = wxEVT_SCROLL_LINEUP; + break; + + case GTK_SCROLL_STEP_FORWARD: + command = wxEVT_SCROLL_LINEDOWN; + break; + + case GTK_SCROLL_PAGE_BACKWARD: + command = wxEVT_SCROLL_PAGEUP; + break; + + case GTK_SCROLL_PAGE_FORWARD: + command = wxEVT_SCROLL_PAGEDOWN; + break; + + default: + command = wxEVT_SCROLL_THUMBTRACK; + } + + return command; +} + +inline wxEventType GtkScrollWinTypeToWx(guint scrollType) +{ + // GtkScrollTypeToWx() returns SCROLL_XXX, not SCROLLWIN_XXX as we need + return GtkScrollTypeToWx(scrollType) + + wxEVT_SCROLLWIN_TOP - wxEVT_SCROLL_TOP; +} + +// Needed for implementing e.g. combobox on wxGTK within a modal dialog. +void wxAddGrab(wxWindow* window); +void wxRemoveGrab(wxWindow* window); + +#endif // _WX_GTK_PRIVATE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/private/mnemonics.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/private/mnemonics.h new file mode 100644 index 0000000000..98907cd779 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/private/mnemonics.h @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/private/mnemonics.h +// Purpose: helper functions for dealing with GTK+ mnemonics +// Author: Vadim Zeitlin +// Created: 2007-11-12 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _GTK_PRIVATE_MNEMONICS_H_ +#define _GTK_PRIVATE_MNEMONICS_H_ + +#if wxUSE_CONTROLS || wxUSE_MENUS + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// functions to convert between wxWidgets and GTK+ string containing mnemonics +// ---------------------------------------------------------------------------- + +// remove all mnemonics from a string +wxString wxGTKRemoveMnemonics(const wxString& label); + +// convert a wx string with '&' to GTK+ string with '_'s +wxString wxConvertMnemonicsToGTK(const wxString& label); + +// convert a wx string with '&' to indicate mnemonics as well as HTML entities +// to a GTK+ string with "&" used instead of '&', i.e. suitable for use +// with GTK+ functions using markup strings +wxString wxConvertMnemonicsToGTKMarkup(const wxString& label); + +// convert GTK+ string with '_'s to wx string with '&'s +wxString wxConvertMnemonicsFromGTK(const wxString& label); + +#endif // wxUSE_CONTROLS || wxUSE_MENUS + +#endif // _GTK_PRIVATE_MNEMONICS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/private/timer.h new file mode 100644 index 0000000000..add461e32a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/private/timer.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/private/timer.h +// Purpose: wxTimerImpl for wxGTK +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK1_PRIVATE_TIMER_H_ +#define _WX_GTK1_PRIVATE_TIMER_H_ + +#include "wx/private/timer.h" + +//----------------------------------------------------------------------------- +// wxTimer +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGTKTimerImpl : public wxTimerImpl +{ +public: + wxGTKTimerImpl(wxTimer *timer) : wxTimerImpl(timer) { m_tag = -1; } + + virtual bool Start(int millisecs = -1, bool oneShot = FALSE); + virtual void Stop(); + + virtual bool IsRunning() const { return m_tag != -1; } + +private: + // registered timeout id, -1 if the timer isn't running + int m_tag; +}; + +#endif // _WX_GTK1_PRIVATE_TIMER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/radiobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/radiobox.h new file mode 100644 index 0000000000..c6cac92ad9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/radiobox.h @@ -0,0 +1,135 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/radiobox.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_RADIOBOX_H_ +#define _WX_GTK_RADIOBOX_H_ + +#include "wx/bitmap.h" + +//----------------------------------------------------------------------------- +// wxRadioBox +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRadioBox : public wxControl, + public wxRadioBoxBase +{ +public: + // ctors and dtor + wxRadioBox() { Init(); } + wxRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = (const wxString *) NULL, + int majorDim = 1, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Init(); + + Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); + } + + wxRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 1, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Init(); + + Create( parent, id, title, pos, size, choices, majorDim, style, val, name ); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = (const wxString *) NULL, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + + virtual ~wxRadioBox(); + + + // implement wxItemContainerImmutable methods + virtual unsigned int GetCount() const; + + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + + virtual void SetSelection(int n); + virtual int GetSelection() const; + + + // implement wxRadioBoxBase methods + virtual bool Show(unsigned int n, bool show = true); + virtual bool Enable(unsigned int n, bool enable = true); + + virtual bool IsItemEnabled(unsigned int n) const; + virtual bool IsItemShown(unsigned int n) const; + + + // override some base class methods to operate on radiobox itself too + virtual bool Show( bool show = true ); + virtual bool Enable( bool enable = true ); + + virtual void SetLabel( const wxString& label ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + // -------------- + + void SetFocus(); + void GtkDisableEvents(); + void GtkEnableEvents(); + bool IsOwnGtkWindow( GdkWindow *window ); + void DoApplyWidgetStyle(GtkRcStyle *style); +#if wxUSE_TOOLTIPS + void ApplyToolTip( GtkTooltips *tips, const wxChar *tip ); +#endif // wxUSE_TOOLTIPS + + virtual void OnInternalIdle(); + + bool m_hasFocus, + m_lostFocus; + wxList m_boxes; + +protected: + // common part of all ctors + void Init(); + +private: + DECLARE_DYNAMIC_CLASS(wxRadioBox) +}; + +#endif // _WX_GTK_RADIOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/radiobut.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/radiobut.h new file mode 100644 index 0000000000..153dd275cf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/radiobut.h @@ -0,0 +1,66 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/radiobut.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKRADIOBUTTONH__ +#define __GTKRADIOBUTTONH__ + +//----------------------------------------------------------------------------- +// wxRadioButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRadioButton: public wxControl +{ +public: + wxRadioButton() { } + wxRadioButton( wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr ) + { + Create( parent, id, label, pos, size, style, validator, name ); + } + + bool Create( wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr ); + + virtual void SetLabel(const wxString& label); + virtual void SetValue(bool val); + virtual bool GetValue() const; + virtual bool Enable( bool enable = TRUE ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + + virtual bool IsRadioButton() const { return TRUE; } + + void DoApplyWidgetStyle(GtkRcStyle *style); + bool IsOwnGtkWindow( GdkWindow *window ); + void OnInternalIdle(); + + bool m_blockEvent; + +protected: + virtual wxSize DoGetBestSize() const; + +private: + DECLARE_DYNAMIC_CLASS(wxRadioButton) +}; + +#endif // __GTKRADIOBUTTONH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/region.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/region.h new file mode 100644 index 0000000000..8647b94b80 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/region.h @@ -0,0 +1,125 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/region.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_REGION_H_ +#define _WX_GTK_REGION_H_ + +#include "wx/list.h" + +// ---------------------------------------------------------------------------- +// wxRegion +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRegion : public wxRegionBase +{ +public: + wxRegion() { } + + wxRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h ) + { + InitRect(x, y, w, h); + } + + wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight ) + { + InitRect(topLeft.x, topLeft.y, + bottomRight.x - topLeft.x, bottomRight.y - topLeft.y); + } + + wxRegion( const wxRect& rect ) + { + InitRect(rect.x, rect.y, rect.width, rect.height); + } + + wxRegion( size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); + + wxRegion( const wxBitmap& bmp) + { + Union(bmp); + } + wxRegion( const wxBitmap& bmp, + const wxColour& transColour, int tolerance = 0) + { + Union(bmp, transColour, tolerance); + } + + virtual ~wxRegion(); + + // wxRegionBase methods + virtual void Clear(); + virtual bool IsEmpty() const; + +public: + // Init with GdkRegion, set ref count to 2 so that + // the C++ class will not destroy the region! + wxRegion( GdkRegion *region ); + + GdkRegion *GetRegion() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + // wxRegionBase pure virtuals + virtual bool DoIsEqual(const wxRegion& region) const; + virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const; + virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const; + virtual wxRegionContain DoContainsRect(const wxRect& rect) const; + + virtual bool DoOffset(wxCoord x, wxCoord y); + virtual bool DoUnionWithRect(const wxRect& rect); + virtual bool DoUnionWithRegion(const wxRegion& region); + virtual bool DoIntersect(const wxRegion& region); + virtual bool DoSubtract(const wxRegion& region); + virtual bool DoXor(const wxRegion& region); + + // common part of ctors for a rectangle region + void InitRect(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + +private: + DECLARE_DYNAMIC_CLASS(wxRegion) +}; + +// ---------------------------------------------------------------------------- +// wxRegionIterator: decomposes a region into rectangles +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRegionIterator: public wxObject +{ +public: + wxRegionIterator(); + wxRegionIterator(const wxRegion& region); + + void Reset() { m_current = 0u; } + void Reset(const wxRegion& region); + + bool HaveRects() const; + operator bool () const { return HaveRects(); } + + wxRegionIterator& operator ++ (); + wxRegionIterator operator ++ (int); + + wxCoord GetX() const; + wxCoord GetY() const; + wxCoord GetW() const; + wxCoord GetWidth() const { return GetW(); } + wxCoord GetH() const; + wxCoord GetHeight() const { return GetH(); } + wxRect GetRect() const; + +private: + size_t m_current; + wxRegion m_region; + +private: + DECLARE_DYNAMIC_CLASS(wxRegionIterator) +}; + + +#endif + // _WX_GTK_REGION_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/scrolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/scrolbar.h new file mode 100644 index 0000000000..2a5baa7ff2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/scrolbar.h @@ -0,0 +1,84 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/scrolbar.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKSCROLLBARH__ +#define __GTKSCROLLBARH__ + +#include "wx/defs.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxScrollBar; + +//----------------------------------------------------------------------------- +// wxScrollBar +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase +{ +public: + wxScrollBar() + { m_adjust = NULL; m_oldPos = 0.0; } + inline wxScrollBar( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr ) + { + Create( parent, id, pos, size, style, validator, name ); + } + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr ); + virtual ~wxScrollBar(); + int GetThumbPosition() const; + int GetThumbSize() const; + int GetPageSize() const; + int GetRange() const; + virtual void SetThumbPosition( int viewStart ); + virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, + bool refresh = TRUE ); + + // Backward compatibility + // ---------------------- + + int GetValue(void) const; + void SetValue( int viewStart ); + void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const; + int GetViewLength() const; + int GetObjectLength() const; + void SetPageSize( int pageLength ); + void SetObjectLength( int objectLength ); + void SetViewLength( int viewLength ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + // -------------- + + bool IsOwnGtkWindow( GdkWindow *window ); + + GtkAdjustment *m_adjust; + float m_oldPos; + +protected: + virtual wxSize DoGetBestSize() const; + +private: + DECLARE_DYNAMIC_CLASS(wxScrollBar) +}; + +#endif + // __GTKSCROLLBARH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/scrolwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/scrolwin.h new file mode 100644 index 0000000000..28fe92640f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/scrolwin.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/scrolwin.h +// Purpose: wxScrolledWindow class +// Author: Robert Roebling +// Modified by: Vadim Zeitlin (2005-10-10): wxScrolledWindow is now common +// Created: 01/02/97 +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_SCROLLWIN_H_ +#define _WX_GTK_SCROLLWIN_H_ + +// ---------------------------------------------------------------------------- +// wxScrolledWindow +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScrollHelper : public wxScrollHelperBase +{ +public: + wxScrollHelper(wxWindow *win) : wxScrollHelperBase(win) { } + + // implement base class pure virtuals + virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, + int noUnitsX, int noUnitsY, + int xPos = 0, int yPos = 0, + bool noRefresh = false); + virtual bool IsScrollbarShown(int orient) const; + virtual void AdjustScrollbars(); + +protected: + virtual void DoScroll(int x, int y); + virtual void DoShowScrollbars(wxScrollbarVisibility horz, + wxScrollbarVisibility vert); + + // this does (each) half of AdjustScrollbars() work + void DoAdjustScrollbar(GtkAdjustment *adj, + int pixelsPerLine, + int winSize, + int virtSize, + int *pos, + int *lines, + int *linesPerPage); + + // and this does the same for Scroll() + void DoScrollOneDir(int orient, + GtkAdjustment *adj, + int pos, + int pixelsPerLine, + int *posOld); + +private: + wxDECLARE_NO_COPY_CLASS(wxScrollHelper); +}; + +#endif // _WX_GTK_SCROLLWIN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/slider.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/slider.h new file mode 100644 index 0000000000..0782415170 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/slider.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/slider.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKSLIDERH__ +#define __GTKSLIDERH__ + +// ---------------------------------------------------------------------------- +// wxSlider +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase +{ +public: + wxSlider() { } + wxSlider(wxWindow *parent, + wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr) + { + Create( parent, id, value, minValue, maxValue, + pos, size, style, validator, name ); + } + + bool Create(wxWindow *parent, + wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr); + + // implement the base class pure virtuals + virtual int GetValue() const; + virtual void SetValue(int value); + + virtual void SetRange(int minValue, int maxValue); + virtual int GetMin() const; + virtual int GetMax() const; + + virtual void SetLineSize(int lineSize); + virtual void SetPageSize(int pageSize); + virtual int GetLineSize() const; + virtual int GetPageSize() const; + + virtual void SetThumbLength(int lenPixels); + virtual int GetThumbLength() const; + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + bool IsOwnGtkWindow( GdkWindow *window ); + void GtkDisableEvents(); + void GtkEnableEvents(); + + GtkAdjustment *m_adjust; + float m_oldPos; + +private: + DECLARE_DYNAMIC_CLASS(wxSlider) +}; + +#endif // __GTKSLIDERH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/spinbutt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/spinbutt.h new file mode 100644 index 0000000000..332628fd8d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/spinbutt.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/spinbutt.h +// Purpose: wxSpinButton class +// Author: Robert Roebling +// Modified by: +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_SPINBUTT_H_ +#define _WX_GTK_SPINBUTT_H_ + +//----------------------------------------------------------------------------- +// wxSpinButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase +{ +public: + wxSpinButton() { } + wxSpinButton(wxWindow *parent, + wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL, + const wxString& name = wxSPIN_BUTTON_NAME) + { + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL, + const wxString& name = wxSPIN_BUTTON_NAME); + + virtual int GetValue() const; + virtual void SetValue( int value ); + virtual void SetRange( int minVal, int maxVal ); + virtual int GetMin() const; + virtual int GetMax() const; + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + void OnSize( wxSizeEvent &event ); + + bool IsOwnGtkWindow( GdkWindow *window ); + + GtkAdjustment *m_adjust; + float m_oldPos; + +protected: + virtual wxSize DoGetBestSize() const; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxSpinButton) +}; + +#endif + // _WX_GTK_SPINBUTT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/spinctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/spinctrl.h new file mode 100644 index 0000000000..0b42fce248 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/spinctrl.h @@ -0,0 +1,97 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/spinctrl.h +// Purpose: wxSpinCtrl class +// Author: Robert Roebling +// Modified by: +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKSPINCTRLH__ +#define __GTKSPINCTRLH__ + +#include "wx/defs.h" + +#if wxUSE_SPINCTRL + +#include "wx/control.h" + +//----------------------------------------------------------------------------- +// wxSpinCtrl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinCtrl : public wxControl +{ +public: + wxSpinCtrl() {} + wxSpinCtrl(wxWindow *parent, + wxWindowID id = -1, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS, + int min = 0, int max = 100, int initial = 0, + const wxString& name = wxT("wxSpinCtrl")) + { + Create(parent, id, value, pos, size, style, min, max, initial, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = -1, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS, + int min = 0, int max = 100, int initial = 0, + const wxString& name = wxT("wxSpinCtrl")); + + void SetValue(const wxString& text); + void SetSelection(long from, long to); + + virtual int GetValue() const; + virtual void SetValue( int value ); + virtual void SetRange( int minVal, int maxVal ); + virtual int GetMin() const; + virtual int GetMax() const; + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + void OnChar( wxKeyEvent &event ); + + bool IsOwnGtkWindow( GdkWindow *window ); + void GtkDisableEvents(); + void GtkEnableEvents(); + + GtkAdjustment *m_adjust; + float m_oldPos; + + virtual int GetBase() const { return m_base; } + virtual bool SetBase(int base); + + protected: + virtual wxSize DoGetBestSize() const; + + // Widgets that use the style->base colour for the BG colour should + // override this and return true. + virtual bool UseGTKStyleBase() const { return true; } + +private: + // Common part of all ctors. + void Init() + { + m_base = 10; + } + + int m_base; + + DECLARE_DYNAMIC_CLASS(wxSpinCtrl) + DECLARE_EVENT_TABLE() +}; + +#endif + // wxUSE_SPINCTRL + +#endif + // __GTKSPINCTRLH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/statbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/statbmp.h new file mode 100644 index 0000000000..e67d425258 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/statbmp.h @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/statbmp.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKSTATICBITMAPH__ +#define __GTKSTATICBITMAPH__ + +#include "wx/icon.h" + +//----------------------------------------------------------------------------- +// wxStaticBitmap +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase +{ +public: + wxStaticBitmap(); + wxStaticBitmap( wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr ); + bool Create( wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr); + + virtual void SetIcon(const wxIcon& icon) { SetBitmap( icon ); } + virtual void SetBitmap( const wxBitmap& bitmap ); + virtual wxBitmap GetBitmap() const { return m_bitmap; } + + // for compatibility with wxMSW + wxIcon GetIcon() const + { + // don't use wxDynamicCast, icons and bitmaps are really the same thing + // in wxGTK + return (const wxIcon &)m_bitmap; + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +private: + wxBitmap m_bitmap; + + DECLARE_DYNAMIC_CLASS(wxStaticBitmap) +}; + +#endif // __GTKSTATICBITMAPH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/statbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/statbox.h new file mode 100644 index 0000000000..089c3488c9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/statbox.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/statbox.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKSTATICBOXH__ +#define __GTKSTATICBOXH__ + +//----------------------------------------------------------------------------- +// wxStaticBox +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase +{ +public: + wxStaticBox(); + wxStaticBox( wxWindow *parent, + wxWindowID id, + const wxString &label, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = wxStaticBoxNameStr ); + bool Create( wxWindow *parent, + wxWindowID id, + const wxString &label, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = wxStaticBoxNameStr ); + + virtual void SetLabel( const wxString &label ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + + virtual bool IsTransparentForMouse() const { return TRUE; } + +protected: + void DoApplyWidgetStyle(GtkRcStyle *style); + +private: + DECLARE_DYNAMIC_CLASS(wxStaticBox) +}; + +#endif // __GTKSTATICBOXH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/statline.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/statline.h new file mode 100644 index 0000000000..b1be2ce3cc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/statline.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/statline.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKSTATICLINEH__ +#define __GTKSTATICLINEH__ + +#include "wx/defs.h" + +#if wxUSE_STATLINE + +// ---------------------------------------------------------------------------- +// wxStaticLine +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase +{ +public: + wxStaticLine(); + wxStaticLine(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr); + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + +private: + DECLARE_DYNAMIC_CLASS(wxStaticLine) +}; + +#endif // wxUSE_STATLINE + +#endif // __GTKSTATICLINEH__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/stattext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/stattext.h new file mode 100644 index 0000000000..fd70468c9a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/stattext.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/stattext.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKSTATICTEXTH__ +#define __GTKSTATICTEXTH__ + +//----------------------------------------------------------------------------- +// wxStaticText +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase +{ +public: + wxStaticText(); + wxStaticText(wxWindow *parent, + wxWindowID id, + const wxString &label, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = wxStaticTextNameStr ); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString &label, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = wxStaticTextNameStr ); + + virtual wxString GetLabel() const; + virtual void SetLabel( const wxString &label ); + + virtual bool SetFont( const wxFont &font ); + virtual bool SetForegroundColour( const wxColour& colour ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + virtual wxSize DoGetBestSize() const; + + DECLARE_DYNAMIC_CLASS(wxStaticText) +}; + +#endif // __GTKSTATICTEXTH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/textctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/textctrl.h new file mode 100644 index 0000000000..ebb07ea642 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/textctrl.h @@ -0,0 +1,195 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/textctrl.h +// Purpose: +// Author: Robert Roebling +// Created: 01/02/97 +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKTEXTCTRLH__ +#define __GTKTEXTCTRLH__ + +//----------------------------------------------------------------------------- +// wxTextCtrl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextCtrl: public wxTextCtrlBase +{ +public: + wxTextCtrl() { Init(); } + wxTextCtrl(wxWindow *parent, + wxWindowID id, + const wxString &value = wxEmptyString, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxTextCtrlNameStr); + + virtual ~wxTextCtrl(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString &value = wxEmptyString, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxTextCtrlNameStr); + + // implement base class pure virtuals + // ---------------------------------- + + virtual int GetLineLength(long lineNo) const; + virtual wxString GetLineText(long lineNo) const; + virtual int GetNumberOfLines() const; + + virtual bool IsModified() const; + virtual bool IsEditable() const; + + // If the return values from and to are the same, there is no selection. + virtual void GetSelection(long* from, long* to) const; + + // operations + // ---------- + + // editing + virtual void Clear(); + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to); + + // sets/clears the dirty flag + virtual void MarkDirty(); + virtual void DiscardEdits(); + + virtual void SetMaxLength(unsigned long len); + + // writing text inserts it at the current position, appending always + // inserts it at the end + virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text); + + // apply text attribute to the range of text (only works with richedit + // controls) + virtual bool SetStyle(long start, long end, const wxTextAttr& style); + + // translate between the position (which is just an index in the text ctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent column and line. + virtual long XYToPosition(long x, long y) const; + virtual bool PositionToXY(long pos, long *x, long *y) const; + + virtual void ShowPosition(long pos); + + // Clipboard operations + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + // Undo/redo + virtual void Undo(); + virtual void Redo(); + + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + // Insertion point + virtual void SetInsertionPoint(long pos); + virtual void SetInsertionPointEnd(); + virtual long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + + virtual void SetSelection(long from, long to); + virtual void SetEditable(bool editable); + + virtual void DoEnable( bool enable ); + + // Implementation from now on + void OnDropFiles( wxDropFilesEvent &event ); + void OnChar( wxKeyEvent &event ); + + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + + void OnUpdateCut(wxUpdateUIEvent& event); + void OnUpdateCopy(wxUpdateUIEvent& event); + void OnUpdatePaste(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + + bool SetFont(const wxFont& font); + bool SetForegroundColour(const wxColour& colour); + bool SetBackgroundColour(const wxColour& colour); + + GtkWidget* GetConnectWidget(); + bool IsOwnGtkWindow( GdkWindow *window ); + void DoApplyWidgetStyle(GtkRcStyle *style); + void CalculateScrollbar(); + void OnInternalIdle(); + + void SetUpdateFont(bool update) { m_updateFont = update; } + void UpdateFontIfNeeded(); + + void SetModified() { m_modified = true; } + + // textctrl specific scrolling + virtual bool ScrollLines(int lines); + virtual bool ScrollPages(int pages); + + // implementation only from now on + + // tell the control to ignore next text changed signal + void IgnoreNextTextUpdate(); + + // should we ignore the changed signal? always resets the flag + bool IgnoreTextUpdate(); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + virtual wxSize DoGetBestSize() const; + + // common part of all ctors + void Init(); + + // overridden wxWindow methods + virtual void DoFreeze(); + virtual void DoThaw(); + + // get the vertical adjustment, if any, NULL otherwise + GtkAdjustment *GetVAdj() const; + + // scroll the control by the given number of pixels, return true if the + // scroll position changed + bool DoScroll(GtkAdjustment *adj, int diff); + + // Widgets that use the style->base colour for the BG colour should + // override this and return true. + virtual bool UseGTKStyleBase() const { return true; } + + virtual void DoSetValue(const wxString &value, int flags = 0); + virtual wxString DoGetValue() const; + +private: + // change the font for everything in this control + void ChangeFontGlobally(); + + GtkWidget *m_text; + GtkWidget *m_vScrollbar; + + bool m_modified:1; + bool m_vScrollbarVisible:1; + bool m_updateFont:1; + bool m_ignoreNextUpdate:1; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxTextCtrl) +}; + +#endif // __GTKTEXTCTRLH__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/tglbtn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/tglbtn.h new file mode 100644 index 0000000000..60c9f8981d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/tglbtn.h @@ -0,0 +1,136 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/tglbtn.h +// Purpose: Declaration of the wxToggleButton class, which implements a +// toggle button under wxGTK. +// Author: John Norris, minor changes by Axel Schlueter +// Modified by: +// Created: 08.02.01 +// Copyright: (c) 2000 Johnny C. Norris II +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_TOGGLEBUTTON_H_ +#define _WX_GTK_TOGGLEBUTTON_H_ + +#include "wx/bitmap.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxToggleButton; +class WXDLLIMPEXP_FWD_CORE wxToggleBitmapButton; + +//----------------------------------------------------------------------------- +// wxToggleBitmapButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToggleBitmapButton: public wxToggleButtonBase +{ +public: + // construction/destruction + wxToggleBitmapButton() {} + wxToggleBitmapButton(wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + // Create the control + bool Create(wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + // Get/set the value + void SetValue(bool state); + bool GetValue() const; + + // Set the label + virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); } + virtual void SetLabel(const wxBitmap& label); + bool Enable(bool enable = TRUE); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + bool m_blockEvent; + wxBitmap m_bitmap; + + void OnSetBitmap(); + void DoApplyWidgetStyle(GtkRcStyle *style); + bool IsOwnGtkWindow(GdkWindow *window); + + virtual void OnInternalIdle(); + virtual wxSize DoGetBestSize() const; + +private: + DECLARE_DYNAMIC_CLASS(wxToggleBitmapButton) +}; + +//----------------------------------------------------------------------------- +// wxToggleButton +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToggleButton: public wxControl +{ +public: + // construction/destruction + wxToggleButton() {} + wxToggleButton(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + // Create the control + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + // Get/set the value + void SetValue(bool state); + bool GetValue() const; + + // Set the label + void SetLabel(const wxString& label); + bool Enable(bool enable = TRUE); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation + bool m_blockEvent; + + void DoApplyWidgetStyle(GtkRcStyle *style); + bool IsOwnGtkWindow(GdkWindow *window); + + virtual void OnInternalIdle(); + virtual wxSize DoGetBestSize() const; + +private: + DECLARE_DYNAMIC_CLASS(wxToggleButton) +}; + +#endif // _WX_GTK_TOGGLEBUTTON_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/toolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/toolbar.h new file mode 100644 index 0000000000..6b6f05990a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/toolbar.h @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/toolbar.h +// Purpose: GTK toolbar +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_TOOLBAR_H_ +#define _WX_GTK_TOOLBAR_H_ + +#if wxUSE_TOOLBAR + +// ---------------------------------------------------------------------------- +// wxToolBar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase +{ +public: + // construction/destruction + wxToolBar() { Init(); } + wxToolBar( wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxToolBarNameStr ) + { + Init(); + + Create(parent, id, pos, size, style, name); + } + + bool Create( wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxToolBarNameStr ); + + virtual ~wxToolBar(); + + // override base class virtuals + virtual void SetMargins(int x, int y); + virtual void SetToolSeparation(int separation); + + virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const; + + virtual void SetToolShortHelp(int id, const wxString& helpString); + + virtual void SetWindowStyleFlag( long style ); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // implementation from now on + // -------------------------- + + GtkToolbar *m_toolbar; + + bool m_blockEvent; + + void OnInternalIdle(); + +protected: + // common part of all ctors + void Init(); + + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_DEFAULT; } + + // set the GTK toolbar style and orientation + void GtkSetStyle(); + + // implement base class pure virtuals + virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); + virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); + + virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable); + virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle); + virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); + + virtual wxToolBarToolBase *CreateTool(int id, + const wxString& label, + const wxBitmap& bitmap1, + const wxBitmap& bitmap2, + wxItemKind kind, + wxObject *clientData, + const wxString& shortHelpString, + const wxString& longHelpString); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); + +private: + DECLARE_DYNAMIC_CLASS(wxToolBar) +}; + +#endif // wxUSE_TOOLBAR + +#endif + // _WX_GTK_TOOLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/tooltip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/tooltip.h new file mode 100644 index 0000000000..e293160c8f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/tooltip.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/tooltip.h +// Purpose: wxToolTip class +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKTOOLTIPH__ +#define __GTKTOOLTIPH__ + +#include "wx/defs.h" +#include "wx/string.h" +#include "wx/object.h" + +//----------------------------------------------------------------------------- +// forward declarations +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxToolTip; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +//----------------------------------------------------------------------------- +// wxToolTip +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToolTip : public wxObject +{ +public: + // globally change the tooltip parameters + static void Enable( bool flag ); + static void SetDelay( long msecs ); + // set the delay after which the tooltip disappears or how long the tooltip remains visible + static void SetAutoPop(long msecs); + // set the delay between subsequent tooltips to appear + static void SetReshow(long msecs); + + wxToolTip( const wxString &tip ); + + // get/set the tooltip text + void SetTip( const wxString &tip ); + wxString GetTip() const { return m_text; } + + wxWindow *GetWindow() const { return m_window; } + bool IsOk() const { return m_window != NULL; } + + // implementation + void Apply( wxWindow *win ); + +private: + wxString m_text; + wxWindow *m_window; + + DECLARE_ABSTRACT_CLASS(wxToolTip) +}; + +#endif // __GTKTOOLTIPH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/toplevel.h new file mode 100644 index 0000000000..dc75a430d8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/toplevel.h @@ -0,0 +1,129 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/toplevel.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKTOPLEVELH__ +#define __GTKTOPLEVELH__ + +//----------------------------------------------------------------------------- +// wxTopLevelWindowGTK +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTopLevelWindowGTK : public wxTopLevelWindowBase +{ +public: + // construction + wxTopLevelWindowGTK() { Init(); } + wxTopLevelWindowGTK(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxTopLevelWindowGTK(); + + // implement base class pure virtuals + virtual void Maximize(bool maximize = true); + virtual bool IsMaximized() const; + virtual void Iconize(bool iconize = true); + virtual bool IsIconized() const; + virtual void SetIcons(const wxIconBundle& icons); + virtual void Restore(); + + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); + virtual bool IsFullScreen() const { return m_fsIsShowing; } + + virtual bool SetShape(const wxRegion& region); + + virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); + + virtual void SetWindowStyleFlag( long style ); + + virtual bool Show(bool show = true); + + virtual void Raise(); + + virtual bool IsActive(); + + virtual void SetTitle( const wxString &title ); + virtual wxString GetTitle() const { return m_title; } + + // Experimental, to allow help windows to be + // viewable from within modal dialogs + virtual void AddGrab(); + virtual void RemoveGrab(); + virtual bool IsGrabbed() const { return m_grabbed; } + + // implementation from now on + // -------------------------- + + // move the window to the specified location and resize it: this is called + // from both DoSetSize() and DoSetClientSize() + virtual void DoMoveWindow(int x, int y, int width, int height); + + // GTK callbacks + virtual void GtkOnSize( int x, int y, int width, int height ); + virtual void OnInternalIdle(); + + // do *not* call this to iconize the frame, this is a private function! + void SetIconizeState(bool iconic); + + int m_miniEdge, + m_miniTitle; + GtkWidget *m_mainWidget; + bool m_insertInClientArea; /* not from within OnCreateXXX */ + + bool m_fsIsShowing; /* full screen */ + long m_fsSaveGdkFunc, m_fsSaveGdkDecor; + long m_fsSaveFlag; + wxRect m_fsSaveFrame; + + // m_windowStyle translated to GDK's terms + long m_gdkFunc, + m_gdkDecor; + + // private gtk_timeout_add result for mimicing wxUSER_ATTENTION_INFO and + // wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle. + int m_urgency_hint; + +protected: + // common part of all ctors + void Init(); + + // override wxWindow methods to take into account tool/menu/statusbars + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + virtual void DoSetClientSize(int width, int height); + virtual void DoGetClientSize( int *width, int *height ) const; + + wxString m_title; + + // is the frame currently iconized? + bool m_isIconized; + // is the frame currently grabbed explicitly + // by the application? + bool m_grabbed; +}; + +#endif // __GTKTOPLEVELH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/treectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/treectrl.h new file mode 100644 index 0000000000..a290539ee6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/treectrl.h @@ -0,0 +1,405 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/treectrl.h +// Purpose: wxTreeCtrl class +// Author: Denis Pershin +// Modified by: +// Created: 08/08/98 +// Copyright: (c) Denis Pershin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TREECTRL_H_ +#define _WX_TREECTRL_H_ + +#include "wx/textctrl.h" +#include "wx/imaglist.h" + +#include + +// the type for "untyped" data +typedef long wxDataType; + +// fwd decl +class WXDLLIMPEXP_CORE wxImageList; +struct wxTreeViewItem; + +// a callback function used for sorting tree items, it should return -1 if the +// first item precedes the second, +1 if the second precedes the first or 0 if +// they're equivalent +class WXDLLIMPEXP_FWD_CORE wxTreeItemData; +typedef int (*wxTreeItemCmpFunc)(wxTreeItemData *item1, wxTreeItemData *item2); + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// values for the `flags' parameter of wxTreeCtrl::HitTest() which determine +// where exactly the specified point is situated: + // above the client area. +static const int wxTREE_HITTEST_ABOVE = 0x0001; + // below the client area. +static const int wxTREE_HITTEST_BELOW = 0x0002; + // in the client area but below the last item. +static const int wxTREE_HITTEST_NOWHERE = 0x0004; + // on the button associated with an item. +static const int wxTREE_HITTEST_ONITEMBUTTON = 0x0010; + // on the bitmap associated with an item. +static const int wxTREE_HITTEST_ONITEMICON = 0x0020; + // in the indentation associated with an item. +static const int wxTREE_HITTEST_ONITEMINDENT = 0x0040; + // on the label (string) associated with an item. +static const int wxTREE_HITTEST_ONITEMLABEL = 0x0080; + // in the area to the right of an item. +static const int wxTREE_HITTEST_ONITEMRIGHT = 0x0100; + // on the state icon for a tree view item that is in a user-defined state. +static const int wxTREE_HITTEST_ONITEMSTATEICON = 0x0200; + // to the right of the client area. +static const int wxTREE_HITTEST_TOLEFT = 0x0400; + // to the left of the client area. +static const int wxTREE_HITTEST_TORIGHT = 0x0800; + // anywhere on the item +static const int wxTREE_HITTEST_ONITEM = wxTREE_HITTEST_ONITEMICON | + wxTREE_HITTEST_ONITEMLABEL | + wxTREE_HITTEST_ONITEMSTATEICON; + +#if WXWIN_COMPATIBILITY_2_6 + // NB: all the following flags are for compatbility only and will be removed in + // next versions + // flags for deprecated InsertItem() variant + #define wxTREE_INSERT_FIRST 0xFFFF0001 + #define wxTREE_INSERT_LAST 0xFFFF0002 +#endif + +// ---------------------------------------------------------------------------- +// wxTreeItemId identifies an element of the tree. In this implementation, it's +// just a trivial wrapper around GTK GtkTreeItem *. It's opaque for the +// application. +// ---------------------------------------------------------------------------- +class WXDLLIMPEXP_CORE wxTreeItemId { +public: + // ctors + wxTreeItemId() { m_itemId = NULL; } + + // default copy ctor/assignment operator are ok for us + + // accessors + // is this a valid tree item? + bool IsOk() const { return m_itemId != NULL; } + + // conversion to/from either real (system-dependent) tree item id or + // to "long" which used to be the type for tree item ids in previous + // versions of wxWidgets + + // for wxTreeCtrl usage only + wxTreeItemId(GtkTreeItem *itemId) { m_itemId = itemId; } + operator GtkTreeItem *() const { return m_itemId; } + void operator =(GtkTreeItem *item) { m_itemId = item; } + +protected: + GtkTreeItem *m_itemId; +}; + +// ---------------------------------------------------------------------------- +// wxTreeItemData is some (arbitrary) user class associated with some item. The +// main advantage of having this class (compared to old untyped interface) is +// that wxTreeItemData's are destroyed automatically by the tree and, as this +// class has virtual dtor, it means that the memory will be automatically +// freed. OTOH, we don't just use wxObject instead of wxTreeItemData because +// the size of this class is critical: in any real application, each tree leaf +// will have wxTreeItemData associated with it and number of leaves may be +// quite big. +// +// Because the objects of this class are deleted by the tree, they should +// always be allocated on the heap! +// ---------------------------------------------------------------------------- +class WXDLLIMPEXP_CORE wxTreeItemData : private wxTreeItemId { +public: + // default ctor/copy ctor/assignment operator are ok + + // dtor is virtual and all the items are deleted by the tree control when + // it's deleted, so you normally don't have to care about freeing memory + // allocated in your wxTreeItemData-derived class + virtual ~wxTreeItemData() { } + + // accessors: set/get the item associated with this node + void SetId(const wxTreeItemId& id) { m_itemId = id; } + const wxTreeItemId& GetId() const { return (wxTreeItemId&) m_itemId; } +}; + +class WXDLLIMPEXP_CORE wxTreeCtrl: public wxControl { +public: + // creation + // -------- + wxTreeCtrl() { Init(); } + + wxTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = "wxTreeCtrl") { + Create(parent, id, pos, size, style, validator, name); + } + + virtual ~wxTreeCtrl(); + + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = "wxTreeCtrl"); + + // accessors + // --------- + + // get the total number of items in the control + virtual unsigned int GetCount() const; + + // indent is the number of pixels the children are indented relative to + // the parents position. SetIndent() also redraws the control + // immediately. + unsigned int GetIndent() const; + void SetIndent(unsigned int indent); + + // image list: these functions allow to associate an image list with + // the control and retrieve it. Note that the control does _not_ delete + // the associated image list when it's deleted in order to allow image + // lists to be shared between different controls. + // + // The normal image list is for the icons which correspond to the + // normal tree item state (whether it is selected or not). + // Additionally, the application might choose to show a state icon + // which corresponds to an app-defined item state (for example, + // checked/unchecked) which are taken from the state image list. + wxImageList *GetImageList() const; + wxImageList *GetStateImageList() const; + + void SetImageList(wxImageList *imageList); + void SetStateImageList(wxImageList *imageList); + + // Functions to work with tree ctrl items. Unfortunately, they can _not_ be + // member functions of wxTreeItem because they must know the tree the item + // belongs to for Windows implementation and storing the pointer to + // wxTreeCtrl in each wxTreeItem is just too much waste. + + // accessors + // --------- + + // retrieve items label + wxString GetItemText(const wxTreeItemId& item) const; + // get the normal item image + int GetItemImage(const wxTreeItemId& item) const; + // get the data associated with the item + wxTreeItemData *GetItemData(const wxTreeItemId& item) const; + + // modifiers + // --------- + + // set items label + void SetItemText(const wxTreeItemId& item, const wxString& text); + // set the normal item image + void SetItemImage(const wxTreeItemId& item, int image); + // associate some data with the item + void SetItemData(const wxTreeItemId& item, wxTreeItemData *data); + + // item status inquiries + // --------------------- + + // is the item visible (it might be outside the view or not expanded)? + bool IsVisible(const wxTreeItemId& item) const; + // does the item has any children? + bool ItemHasChildren(const wxTreeItemId& item) const; + // is the item expanded (only makes sense if HasChildren())? + bool IsExpanded(const wxTreeItemId& item) const; + // is this item currently selected (the same as has focus)? + bool IsSelected(const wxTreeItemId& item) const; + + // number of children + // ------------------ + + // if 'recursively' is false, only immediate children count, otherwise + // the returned number is the number of all items in this branch + size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = true); + + // navigation + // ---------- + + // wxTreeItemId.IsOk() will return false if there is no such item + + // get the root tree item + wxTreeItemId GetRootItem() const; + + // get the item currently selected (may return NULL if no selection) + wxTreeItemId GetSelection() const; + + // get the parent of this item (may return NULL if root) + wxTreeItemId GetItemParent(const wxTreeItemId& item) const; + + // for this enumeration function you must pass in a "cookie" parameter + // which is opaque for the application but is necessary for the library + // to make these functions reentrant (i.e. allow more than one + // enumeration on one and the same object simultaneously). Of course, + // the "cookie" passed to GetFirstChild() and GetNextChild() should be + // the same! + + // get the last child of this item - this method doesn't use cookies + wxTreeItemId GetLastChild(const wxTreeItemId& item) const; + + // get the next sibling of this item + wxTreeItemId GetNextSibling(const wxTreeItemId& item) const; + // get the previous sibling + wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const; + + // get first visible item + wxTreeItemId GetFirstVisibleItem() const; + // get the next visible item: item must be visible itself! + // see IsVisible() and wxTreeCtrl::GetFirstVisibleItem() + wxTreeItemId GetNextVisible(const wxTreeItemId& item) const; + // get the previous visible item: item must be visible itself! + wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const; + + // operations + // ---------- + + // add the root node to the tree + wxTreeItemId AddRoot(const wxString& text, + int image = -1, int selectedImage = -1, + wxTreeItemData *data = NULL); + + // insert a new item in as the first child of the parent + wxTreeItemId PrependItem(const wxTreeItemId& parent, + const wxString& text, + int image = -1, int selectedImage = -1, + wxTreeItemData *data = NULL); + + // insert a new item after a given one + wxTreeItemId InsertItem(const wxTreeItemId& parent, + const wxTreeItemId& idPrevious, + const wxString& text, + int image = -1, int selectedImage = -1, + wxTreeItemData *data = NULL); + + // insert a new item in as the last child of the parent + wxTreeItemId AppendItem(const wxTreeItemId& parent, + const wxString& text, + int image = -1, int selectedImage = -1, + wxTreeItemData *data = NULL); + + // delete this item and associated data if any + void Delete(const wxTreeItemId& item); + // delete all items from the tree + void DeleteAllItems(); + + // expand this item + void Expand(const wxTreeItemId& item); + // collapse the item without removing its children + void Collapse(const wxTreeItemId& item); + // collapse the item and remove all children + void CollapseAndReset(const wxTreeItemId& item); + // toggles the current state + void Toggle(const wxTreeItemId& item); + + // remove the selection from currently selected item (if any) + void Unselect(); + // select this item + void SelectItem(const wxTreeItemId& item); + // make sure this item is visible (expanding the parent item and/or + // scrolling to this item if necessary) + void EnsureVisible(const wxTreeItemId& item); + // scroll to this item (but don't expand its parent) + void ScrollTo(const wxTreeItemId& item); + + // start editing the item label: this (temporarily) replaces the item + // with a one line edit control. The item will be selected if it hadn't + // been before. textCtrlClass parameter allows you to create an edit + // control of arbitrary user-defined class deriving from wxTextCtrl. + wxTextCtrl* EditLabel(const wxTreeItemId& item, + wxClassInfo* textCtrlClass = wxCLASSINFO(wxTextCtrl)); + // returns the same pointer as StartEdit() if the item is being edited, + // NULL otherwise (it's assumed that no more than one item may be + // edited simultaneously) + wxTextCtrl* GetEditControl() const; + // end editing and accept or discard the changes to item label + void EndEditLabel(const wxTreeItemId& item, bool discardChanges = false); + + // sort the children of this item using the specified callback function + // (it should return -1, 0 or +1 as usual), if it's not specified + // alphabetical comparaison is performed. + // + // NB: this function is not reentrant! + void SortChildren(const wxTreeItemId& item, + wxTreeItemCmpFunc *cmpFunction = NULL); + + // deprecated + // ---------- + +#if WXWIN_COMPATIBILITY_2_6 + // these methods are deprecated and will be removed in future versions of + // wxWidgets, they're here for compatibility only, don't use them in new + // code (the comments indicate why these methods are now useless and how to + // replace them) + + // use Expand, Collapse, CollapseAndReset or Toggle + wxDEPRECATED( void ExpandItem(const wxTreeItemId& item, int action) ); + + // use SetImageList + wxDEPRECATED( void SetImageList(wxImageList *imageList, int) ) + { SetImageList(imageList); } + + // use Set/GetItemImage directly + wxDEPRECATED( int GetItemSelectedImage(const wxTreeItemId& item) const ); + wxDEPRECATED( void SetItemSelectedImage(const wxTreeItemId& item, int image) ); + + // get the first child of this item + wxDEPRECATED( wxTreeItemId GetFirstChild(const wxTreeItemId& item, long& cookie) const ); + // get the next child (after GetFirstChild or GetNextChild) + wxDEPRECATED( wxTreeItemId GetNextChild(const wxTreeItemId& item, long& cookie) const ); + + // use AddRoot, PrependItem or AppendItem + wxDEPRECATED( wxTreeItemId InsertItem(const wxTreeItemId& parent, + const wxString& text, + int image = -1, int selImage = -1, + long insertAfter = wxTREE_INSERT_LAST) ); + +#endif // WXWIN_COMPATIBILITY_2_6 + + // use Set/GetImageList and Set/GetStateImageList + wxImageList *GetImageList(int) const + { return GetImageList(); } + + void SendExpanding(const wxTreeItemId& item); + void SendExpanded(const wxTreeItemId& item); + void SendCollapsing(const wxTreeItemId& item); + void SendCollapsed(const wxTreeItemId& item); + void SendSelChanging(const wxTreeItemId& item); + void SendSelChanged(const wxTreeItemId& item); + +protected: + + wxTreeItemId m_editItem; + GtkTree *m_tree; + GtkTreeItem *m_anchor; + wxTextCtrl* m_textCtrl; + wxImageList* m_imageListNormal; + wxImageList* m_imageListState; + + long m_curitemId; + + void SendMessage(wxEventType command, const wxTreeItemId& item); +// GtkTreeItem *findGtkTreeItem(wxTreeCtrlId &id) const; + + // the common part of all ctors + void Init(); + // insert a new item in as the last child of the parent + wxTreeItemId p_InsertItem(GtkTreeItem *p, + const wxString& text, + int image, int selectedImage, + wxTreeItemData *data); + + + DECLARE_DYNAMIC_CLASS(wxTreeCtrl) +}; + +#endif + // _WX_TREECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/win_gtk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/win_gtk.h new file mode 100644 index 0000000000..09f23c59b3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/win_gtk.h @@ -0,0 +1,146 @@ +/* /////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/win_gtk.h +// Purpose: wxWidgets's GTK base widget = GtkPizza +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////// */ + + +#ifndef __GTK_PIZZA_H__ +#define __GTK_PIZZA_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include +#include +#include +#include +#include + +#include "wx/dlimpexp.h" + +#define GTK_PIZZA(obj) GTK_CHECK_CAST (obj, gtk_pizza_get_type (), GtkPizza) +#define GTK_PIZZA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_pizza_get_type (), GtkPizzaClass) +#define GTK_IS_PIZZA(obj) GTK_CHECK_TYPE (obj, gtk_pizza_get_type ()) + +/* Shadow types */ +typedef enum +{ + GTK_MYSHADOW_NONE, + GTK_MYSHADOW_THIN, + GTK_MYSHADOW_IN, + GTK_MYSHADOW_OUT +} GtkMyShadowType; + +typedef struct _GtkPizzaChild GtkPizzaChild; +typedef struct _GtkPizza GtkPizza; +typedef struct _GtkPizzaClass GtkPizzaClass; + +struct _GtkPizzaChild +{ + GtkWidget *widget; + gint x; + gint y; + gint width; + gint height; +}; + +struct _GtkPizza +{ + GtkContainer container; + GList *children; + GtkMyShadowType shadow_type; + + guint width; + guint height; + + guint xoffset; + guint yoffset; + + GdkWindow *bin_window; + + GdkVisibilityState visibility; + gulong configure_serial; + gint scroll_x; + gint scroll_y; + + gboolean clear_on_draw; + gboolean use_filter; + gboolean external_expose; +}; + +struct _GtkPizzaClass +{ + GtkContainerClass parent_class; + + void (*set_scroll_adjustments) (GtkPizza *pizza, + GtkAdjustment *hadjustment, + GtkAdjustment *vadjustment); +}; + +WXDLLIMPEXP_CORE +GtkType gtk_pizza_get_type (void); +WXDLLIMPEXP_CORE +GtkWidget* gtk_pizza_new (void); + +WXDLLIMPEXP_CORE +void gtk_pizza_set_shadow_type (GtkPizza *pizza, + GtkMyShadowType type); + +WXDLLIMPEXP_CORE +void gtk_pizza_set_clear (GtkPizza *pizza, + gboolean clear); + +WXDLLIMPEXP_CORE +void gtk_pizza_set_filter (GtkPizza *pizza, + gboolean use); + +WXDLLIMPEXP_CORE +void gtk_pizza_set_external (GtkPizza *pizza, + gboolean expose); + +WXDLLIMPEXP_CORE +void gtk_pizza_scroll (GtkPizza *pizza, + gint dx, + gint dy); + +WXDLLIMPEXP_CORE +gint gtk_pizza_child_resized (GtkPizza *pizza, + GtkWidget *widget); + +WXDLLIMPEXP_CORE +void gtk_pizza_put (GtkPizza *pizza, + GtkWidget *widget, + gint x, + gint y, + gint width, + gint height); + +WXDLLIMPEXP_CORE +void gtk_pizza_move (GtkPizza *pizza, + GtkWidget *widget, + gint x, + gint y ); + +WXDLLIMPEXP_CORE +void gtk_pizza_resize (GtkPizza *pizza, + GtkWidget *widget, + gint width, + gint height ); + +WXDLLIMPEXP_CORE +void gtk_pizza_set_size (GtkPizza *pizza, + GtkWidget *widget, + gint x, + gint y, + gint width, + gint height); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + +#endif /* __GTK_PIZZA_H__ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/window.h new file mode 100644 index 0000000000..a7fd1e9bac --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/gtk1/window.h @@ -0,0 +1,273 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk1/window.h +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKWINDOWH__ +#define __GTKWINDOWH__ + +typedef struct _GtkTooltips GtkTooltips; +#ifdef HAVE_XIM +typedef struct _GdkIC GdkIC; +typedef struct _GdkICAttr GdkICAttr; +#endif + +//----------------------------------------------------------------------------- +// callback definition for inserting a window (internal) +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindowGTK; +typedef void (*wxInsertChildFunction)( wxWindowGTK*, wxWindowGTK* ); + +//----------------------------------------------------------------------------- +// wxWindowGTK +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowGTK : public wxWindowBase +{ +public: + // creating the window + // ------------------- + wxWindowGTK(); + wxWindowGTK(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + virtual ~wxWindowGTK(); + + // implement base class (pure) virtual methods + // ------------------------------------------- + + virtual void SetLabel(const wxString& WXUNUSED(label)) { } + virtual wxString GetLabel() const { return wxEmptyString; } + + virtual bool Destroy(); + + virtual void Raise(); + virtual void Lower(); + + virtual bool Show( bool show = true ); + virtual void DoEnable( bool enable ); + + virtual void SetWindowStyleFlag( long style ); + + virtual bool IsRetained() const; + + virtual void SetFocus(); + virtual bool AcceptsFocus() const; + + virtual bool Reparent( wxWindowBase *newParent ); + + virtual void WarpPointer(int x, int y); + + virtual void Refresh( bool eraseBackground = true, + const wxRect *rect = (const wxRect *) NULL ); + virtual void Update(); + virtual void ClearBackground(); + + virtual bool SetBackgroundColour( const wxColour &colour ); + virtual bool SetForegroundColour( const wxColour &colour ); + virtual bool SetCursor( const wxCursor &cursor ); + virtual bool SetFont( const wxFont &font ); + + virtual bool SetBackgroundStyle(wxBackgroundStyle style) ; + + virtual int GetCharHeight() const; + virtual int GetCharWidth() const; + + virtual void SetScrollbar( int orient, int pos, int thumbVisible, + int range, bool refresh = true ); + virtual void SetScrollPos( int orient, int pos, bool refresh = true ); + virtual int GetScrollPos( int orient ) const; + virtual int GetScrollThumb( int orient ) const; + virtual int GetScrollRange( int orient ) const; + virtual void ScrollWindow( int dx, int dy, + const wxRect* rect = NULL ); + +#if wxUSE_DRAG_AND_DROP + virtual void SetDropTarget( wxDropTarget *dropTarget ); +#endif // wxUSE_DRAG_AND_DROP + + virtual bool IsDoubleBuffered() const { return false; } + + GdkWindow* GTKGetDrawingWindow() const; + + // implementation + // -------------- + + virtual WXWidget GetHandle() const { return m_widget; } + + // I don't want users to override what's done in idle so everything that + // has to be done in idle time in order for wxGTK to work is done in + // OnInternalIdle + virtual void OnInternalIdle(); + + // Internal representation of Update() + void GtkUpdate(); + + // For compatibility across platforms (not in event table) + void OnIdle(wxIdleEvent& WXUNUSED(event)) {} + + // Used by all window classes in the widget creation process. + bool PreCreation( wxWindowGTK *parent, const wxPoint &pos, const wxSize &size ); + void PostCreation(); + + // Internal addition of child windows. differs from class + // to class not by using virtual functions but by using + // the m_insertCallback. + void DoAddChild(wxWindowGTK *child); + + // This methods sends wxPaintEvents to the window. It reads the + // update region, breaks it up into rects and sends an event + // for each rect. It is also responsible for background erase + // events and NC paint events. It is called from "draw" and + // "expose" handlers as well as from ::Update() + void GtkSendPaintEvents(); + + // The methods below are required because many native widgets + // are composed of several subwidgets and setting a style for + // the widget means setting it for all subwidgets as well. + // also, it is not clear which native widget is the top + // widget where (most of) the input goes. even tooltips have + // to be applied to all subwidgets. + virtual GtkWidget* GetConnectWidget(); + virtual bool IsOwnGtkWindow( GdkWindow *window ); + void ConnectWidget( GtkWidget *widget ); + +#if wxUSE_TOOLTIPS + virtual void ApplyToolTip( GtkTooltips *tips, const wxChar *tip ); +#endif // wxUSE_TOOLTIPS + + // Call after modifing the value of m_hAdjust or m_vAdjust to bring the + // scrolbar in sync (this does not generate any wx events) + void GtkUpdateScrollbar(int orient); + + // Called from GTK signal handlers. it indicates that + // the layout functions have to be called later on + // (i.e. in idle time, implemented in OnInternalIdle() ). + void GtkUpdateSize() { m_sizeSet = false; } + + // fix up the mouse event coords, used by wxListBox only so far + virtual void FixUpMouseEvent(GtkWidget * WXUNUSED(widget), + wxCoord& WXUNUSED(x), + wxCoord& WXUNUSED(y)) { } + + // is this window transparent for the mouse events (as wxStaticBox is)? + virtual bool IsTransparentForMouse() const { return false; } + + // is this a radiobutton (used by radiobutton code itself only)? + virtual bool IsRadioButton() const { return false; } + + // position and size of the window + int m_x, m_y; + int m_width, m_height; + int m_oldClientWidth,m_oldClientHeight; + + // see the docs in src/gtk/window.cpp + GtkWidget *m_widget; // mostly the widget seen by the rest of GTK + GtkWidget *m_wxwindow; // mostly the client area as per wxWidgets + + // this widget will be queried for GTK's focus events + GtkWidget *m_focusWidget; + +#ifdef HAVE_XIM + // XIM support for wxWidgets + GdkIC *m_ic; + GdkICAttr *m_icattr; +#endif // HAVE_XIM + + // The area to be cleared (and not just refreshed) + // We cannot make this distinction under GTK 2.0. + wxRegion m_clearRegion; + + // scrolling stuff + GtkAdjustment *m_hAdjust,*m_vAdjust; + float m_oldHorizontalPos; + float m_oldVerticalPos; + + // extra (wxGTK-specific) flags + bool m_needParent:1; // ! wxFrame, wxDialog, wxNotebookPage ? + bool m_noExpose:1; // wxGLCanvas has its own redrawing + bool m_nativeSizeEvent:1; // wxGLCanvas sends wxSizeEvent upon "alloc_size" + bool m_hasScrolling:1; + bool m_hasVMT:1; + bool m_sizeSet:1; + bool m_resizing:1; + bool m_acceptsFocus:1; // true if not static + bool m_hasFocus:1; // true if == FindFocus() + bool m_isScrolling:1; // dragging scrollbar thumb? + bool m_clipPaintRegion:1; // true after ScrollWindow() + bool m_needsStyleChange:1; // May not be able to change + // background style until OnIdle + + // C++ has no virtual methods in the constrcutor of any class but we need + // different methods of inserting a child window into a wxFrame, + // wxMDIFrame, wxNotebook etc. this is the callback that will get used. + wxInsertChildFunction m_insertCallback; + + // implement the base class pure virtuals + virtual void DoGetTextExtent(const wxString& string, + int *x, int *y, + int *descent = NULL, + int *externalLeading = NULL, + const wxFont *theFont = NULL) const; + +#if wxUSE_MENUS_NATIVE + virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); +#endif // wxUSE_MENUS_NATIVE + + virtual void DoClientToScreen( int *x, int *y ) const; + virtual void DoScreenToClient( int *x, int *y ) const; + virtual void DoGetPosition( int *x, int *y ) const; + virtual void DoGetSize( int *width, int *height ) const; + virtual void DoGetClientSize( int *width, int *height ) const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoSetClientSize(int width, int height); + virtual void DoMoveWindow(int x, int y, int width, int height); + + virtual void DoCaptureMouse(); + virtual void DoReleaseMouse(); + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip( wxToolTip *tip ); +#endif // wxUSE_TOOLTIPS + +protected: + // common part of all ctors (not virtual because called from ctor) + void Init(); + + // Called by ApplyWidgetStyle (which is called by SetFont() and + // SetXXXColour etc to apply style changed to native widgets) to create + // modified GTK style with non-standard attributes. If forceStyle=true, + // creates empty GtkRcStyle if there are no modifications, otherwise + // returns NULL in such case. + GtkRcStyle *CreateWidgetStyle(bool forceStyle = false); + + // Overridden in many GTK widgets who have to handle subwidgets + virtual void ApplyWidgetStyle(bool forceStyle = false); + + // helper function to ease native widgets wrapping, called by + // ApplyWidgetStyle -- override this, not ApplyWidgetStyle + virtual void DoApplyWidgetStyle(GtkRcStyle *style); + +private: + DECLARE_DYNAMIC_CLASS(wxWindowGTK) + wxDECLARE_NO_COPY_CLASS(wxWindowGTK); +}; + +extern WXDLLIMPEXP_CORE wxWindow *wxFindFocusedChild(wxWindowGTK *win); + +#endif // __GTKWINDOWH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/hash.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/hash.h new file mode 100644 index 0000000000..452040ba31 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/hash.h @@ -0,0 +1,312 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/hash.h +// Purpose: wxHashTable class +// Author: Julian Smart +// Modified by: VZ at 25.02.00: type safe hashes with WX_DECLARE_HASH() +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HASH_H__ +#define _WX_HASH_H__ + +#include "wx/defs.h" +#include "wx/string.h" + +#if !wxUSE_STD_CONTAINERS + #include "wx/object.h" +#else + class WXDLLIMPEXP_FWD_BASE wxObject; +#endif + +// the default size of the hash +#define wxHASH_SIZE_DEFAULT (1000) + +/* + * A hash table is an array of user-definable size with lists + * of data items hanging off the array positions. Usually there'll + * be a hit, so no search is required; otherwise we'll have to run down + * the list to find the desired item. +*/ + +union wxHashKeyValue +{ + long integer; + wxString *string; +}; + +// for some compilers (AIX xlC), defining it as friend inside the class is not +// enough, so provide a real forward declaration +class WXDLLIMPEXP_FWD_BASE wxHashTableBase; + +class WXDLLIMPEXP_BASE wxHashTableBase_Node +{ + friend class WXDLLIMPEXP_FWD_BASE wxHashTableBase; + typedef class WXDLLIMPEXP_FWD_BASE wxHashTableBase_Node _Node; +public: + wxHashTableBase_Node( long key, void* value, + wxHashTableBase* table ); + wxHashTableBase_Node( const wxString& key, void* value, + wxHashTableBase* table ); + ~wxHashTableBase_Node(); + + long GetKeyInteger() const { return m_key.integer; } + const wxString& GetKeyString() const { return *m_key.string; } + + void* GetData() const { return m_value; } + void SetData( void* data ) { m_value = data; } + +protected: + _Node* GetNext() const { return m_next; } + +protected: + // next node in the chain + wxHashTableBase_Node* m_next; + + // key + wxHashKeyValue m_key; + + // value + void* m_value; + + // pointer to the hash containing the node, used to remove the + // node from the hash when the user deletes the node iterating + // through it + // TODO: move it to wxHashTable_Node (only wxHashTable supports + // iteration) + wxHashTableBase* m_hashPtr; +}; + +class WXDLLIMPEXP_BASE wxHashTableBase +#if !wxUSE_STD_CONTAINERS + : public wxObject +#endif +{ + friend class WXDLLIMPEXP_FWD_BASE wxHashTableBase_Node; +public: + typedef wxHashTableBase_Node Node; + + wxHashTableBase(); + virtual ~wxHashTableBase() { } + + void Create( wxKeyType keyType = wxKEY_INTEGER, + size_t size = wxHASH_SIZE_DEFAULT ); + void Clear(); + void Destroy(); + + size_t GetSize() const { return m_size; } + size_t GetCount() const { return m_count; } + + void DeleteContents( bool flag ) { m_deleteContents = flag; } + + static long MakeKey(const wxString& string); + +protected: + void DoPut( long key, long hash, void* data ); + void DoPut( const wxString& key, long hash, void* data ); + void* DoGet( long key, long hash ) const; + void* DoGet( const wxString& key, long hash ) const; + void* DoDelete( long key, long hash ); + void* DoDelete( const wxString& key, long hash ); + +private: + // Remove the node from the hash, *only called from + // ~wxHashTable*_Node destructor + void DoRemoveNode( wxHashTableBase_Node* node ); + + // destroys data contained in the node if appropriate: + // deletes the key if it is a string and destrys + // the value if m_deleteContents is true + void DoDestroyNode( wxHashTableBase_Node* node ); + + // inserts a node in the table (at the end of the chain) + void DoInsertNode( size_t bucket, wxHashTableBase_Node* node ); + + // removes a node from the table (fiven a pointer to the previous + // but does not delete it (only deletes its contents) + void DoUnlinkNode( size_t bucket, wxHashTableBase_Node* node, + wxHashTableBase_Node* prev ); + + // unconditionally deletes node value (invoking the + // correct destructor) + virtual void DoDeleteContents( wxHashTableBase_Node* node ) = 0; + +protected: + // number of buckets + size_t m_size; + + // number of nodes (key/value pairs) + size_t m_count; + + // table + Node** m_table; + + // key typ (INTEGER/STRING) + wxKeyType m_keyType; + + // delete contents when hash is cleared + bool m_deleteContents; + +private: + wxDECLARE_NO_COPY_CLASS(wxHashTableBase); +}; + +// ---------------------------------------------------------------------------- +// for compatibility only +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxHashTable_Node : public wxHashTableBase_Node +{ + friend class WXDLLIMPEXP_FWD_BASE wxHashTable; +public: + wxHashTable_Node( long key, void* value, + wxHashTableBase* table ) + : wxHashTableBase_Node( key, value, table ) { } + wxHashTable_Node( const wxString& key, void* value, + wxHashTableBase* table ) + : wxHashTableBase_Node( key, value, table ) { } + + wxObject* GetData() const + { return (wxObject*)wxHashTableBase_Node::GetData(); } + void SetData( wxObject* data ) + { wxHashTableBase_Node::SetData( data ); } + + wxHashTable_Node* GetNext() const + { return (wxHashTable_Node*)wxHashTableBase_Node::GetNext(); } +}; + +// should inherit protectedly, but it is public for compatibility in +// order to publicly inherit from wxObject +class WXDLLIMPEXP_BASE wxHashTable : public wxHashTableBase +{ + typedef wxHashTableBase hash; +public: + typedef wxHashTable_Node Node; + typedef wxHashTable_Node* compatibility_iterator; +public: + wxHashTable( wxKeyType keyType = wxKEY_INTEGER, + size_t size = wxHASH_SIZE_DEFAULT ) + : wxHashTableBase() { Create( keyType, size ); BeginFind(); } + wxHashTable( const wxHashTable& table ); + + virtual ~wxHashTable() { Destroy(); } + + const wxHashTable& operator=( const wxHashTable& ); + + // key and value are the same + void Put(long value, wxObject *object) + { DoPut( value, value, object ); } + void Put(long lhash, long value, wxObject *object) + { DoPut( value, lhash, object ); } + void Put(const wxString& value, wxObject *object) + { DoPut( value, MakeKey( value ), object ); } + void Put(long lhash, const wxString& value, wxObject *object) + { DoPut( value, lhash, object ); } + + // key and value are the same + wxObject *Get(long value) const + { return (wxObject*)DoGet( value, value ); } + wxObject *Get(long lhash, long value) const + { return (wxObject*)DoGet( value, lhash ); } + wxObject *Get(const wxString& value) const + { return (wxObject*)DoGet( value, MakeKey( value ) ); } + wxObject *Get(long lhash, const wxString& value) const + { return (wxObject*)DoGet( value, lhash ); } + + // Deletes entry and returns data if found + wxObject *Delete(long key) + { return (wxObject*)DoDelete( key, key ); } + wxObject *Delete(long lhash, long key) + { return (wxObject*)DoDelete( key, lhash ); } + wxObject *Delete(const wxString& key) + { return (wxObject*)DoDelete( key, MakeKey( key ) ); } + wxObject *Delete(long lhash, const wxString& key) + { return (wxObject*)DoDelete( key, lhash ); } + + // Way of iterating through whole hash table (e.g. to delete everything) + // Not necessary, of course, if you're only storing pointers to + // objects maintained separately + void BeginFind() { m_curr = NULL; m_currBucket = 0; } + Node* Next(); + + void Clear() { wxHashTableBase::Clear(); } + + size_t GetCount() const { return wxHashTableBase::GetCount(); } +protected: + // copy helper + void DoCopy( const wxHashTable& copy ); + + // searches the next node starting from bucket bucketStart and sets + // m_curr to it and m_currBucket to its bucket + void GetNextNode( size_t bucketStart ); +private: + virtual void DoDeleteContents( wxHashTableBase_Node* node ); + + // current node + Node* m_curr; + + // bucket the current node belongs to + size_t m_currBucket; +}; + +// defines a new type safe hash table which stores the elements of type eltype +// in lists of class listclass +#define _WX_DECLARE_HASH(eltype, dummy, hashclass, classexp) \ + classexp hashclass : public wxHashTableBase \ + { \ + public: \ + hashclass(wxKeyType keyType = wxKEY_INTEGER, \ + size_t size = wxHASH_SIZE_DEFAULT) \ + : wxHashTableBase() { Create(keyType, size); } \ + \ + virtual ~hashclass() { Destroy(); } \ + \ + void Put(long key, eltype *data) { DoPut(key, key, (void*)data); } \ + void Put(long lhash, long key, eltype *data) \ + { DoPut(key, lhash, (void*)data); } \ + eltype *Get(long key) const { return (eltype*)DoGet(key, key); } \ + eltype *Get(long lhash, long key) const \ + { return (eltype*)DoGet(key, lhash); } \ + eltype *Delete(long key) { return (eltype*)DoDelete(key, key); } \ + eltype *Delete(long lhash, long key) \ + { return (eltype*)DoDelete(key, lhash); } \ + private: \ + virtual void DoDeleteContents( wxHashTableBase_Node* node ) \ + { delete (eltype*)node->GetData(); } \ + \ + DECLARE_NO_COPY_CLASS(hashclass) \ + } + + +// this macro is to be used in the user code +#define WX_DECLARE_HASH(el, list, hash) \ + _WX_DECLARE_HASH(el, list, hash, class) + +// and this one does exactly the same thing but should be used inside the +// library +#define WX_DECLARE_EXPORTED_HASH(el, list, hash) \ + _WX_DECLARE_HASH(el, list, hash, class WXDLLIMPEXP_CORE) + +#define WX_DECLARE_USER_EXPORTED_HASH(el, list, hash, usergoo) \ + _WX_DECLARE_HASH(el, list, hash, class usergoo) + +// delete all hash elements +// +// NB: the class declaration of the hash elements must be visible from the +// place where you use this macro, otherwise the proper destructor may not +// be called (a decent compiler should give a warning about it, but don't +// count on it)! +#define WX_CLEAR_HASH_TABLE(hash) \ + { \ + (hash).BeginFind(); \ + wxHashTable::compatibility_iterator it = (hash).Next(); \ + while( it ) \ + { \ + delete it->GetData(); \ + it = (hash).Next(); \ + } \ + (hash).Clear(); \ + } + +#endif // _WX_HASH_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/hashmap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/hashmap.h new file mode 100644 index 0000000000..ed26c35418 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/hashmap.h @@ -0,0 +1,756 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/hashmap.h +// Purpose: wxHashMap class +// Author: Mattia Barbon +// Modified by: +// Created: 29/01/2002 +// Copyright: (c) Mattia Barbon +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HASHMAP_H_ +#define _WX_HASHMAP_H_ + +#include "wx/string.h" +#include "wx/wxcrt.h" + +// In wxUSE_STD_CONTAINERS build we prefer to use the standard hash map class +// but it can be either in non-standard hash_map header (old g++ and some other +// STL implementations) or in C++0x standard unordered_map which can in turn be +// available either in std::tr1 or std namespace itself +// +// To summarize: if std::unordered_map is available use it, otherwise use tr1 +// and finally fall back to non-standard hash_map + +#if (defined(HAVE_EXT_HASH_MAP) || defined(HAVE_HASH_MAP)) \ + && (defined(HAVE_GNU_CXX_HASH_MAP) || defined(HAVE_STD_HASH_MAP)) + #define HAVE_STL_HASH_MAP +#endif + +#if wxUSE_STD_CONTAINERS && \ + (defined(HAVE_STD_UNORDERED_MAP) || defined(HAVE_TR1_UNORDERED_MAP)) + +#if defined(HAVE_STD_UNORDERED_MAP) + #include + #define WX_HASH_MAP_NAMESPACE std +#elif defined(HAVE_TR1_UNORDERED_MAP) + #include + #define WX_HASH_MAP_NAMESPACE std::tr1 +#endif + +#define _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP ) \ + typedef WX_HASH_MAP_NAMESPACE::unordered_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T > CLASSNAME + +#elif wxUSE_STD_CONTAINERS && defined(HAVE_STL_HASH_MAP) + +#if defined(HAVE_EXT_HASH_MAP) + #include +#elif defined(HAVE_HASH_MAP) + #include +#endif + +#if defined(HAVE_GNU_CXX_HASH_MAP) + #define WX_HASH_MAP_NAMESPACE __gnu_cxx +#elif defined(HAVE_STD_HASH_MAP) + #define WX_HASH_MAP_NAMESPACE std +#endif + +#define _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP ) \ + typedef WX_HASH_MAP_NAMESPACE::hash_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T > CLASSNAME + +#else // !wxUSE_STD_CONTAINERS || no std::{hash,unordered}_map class available + +#define wxNEEDS_WX_HASH_MAP + +#ifdef __WXWINCE__ +typedef int ptrdiff_t; +#else +#include // for ptrdiff_t +#endif + +// private +struct WXDLLIMPEXP_BASE _wxHashTable_NodeBase +{ + _wxHashTable_NodeBase() : m_next(NULL) {} + + _wxHashTable_NodeBase* m_next; + +// Cannot do this: +// wxDECLARE_NO_COPY_CLASS(_wxHashTable_NodeBase); +// without rewriting the macros, which require a public copy constructor. +}; + +// private +class WXDLLIMPEXP_BASE _wxHashTableBase2 +{ +public: + typedef void (*NodeDtor)(_wxHashTable_NodeBase*); + typedef unsigned long (*BucketFromNode)(_wxHashTableBase2*,_wxHashTable_NodeBase*); + typedef _wxHashTable_NodeBase* (*ProcessNode)(_wxHashTable_NodeBase*); +protected: + static _wxHashTable_NodeBase* DummyProcessNode(_wxHashTable_NodeBase* node); + static void DeleteNodes( size_t buckets, _wxHashTable_NodeBase** table, + NodeDtor dtor ); + static _wxHashTable_NodeBase* GetFirstNode( size_t buckets, + _wxHashTable_NodeBase** table ) + { + for( size_t i = 0; i < buckets; ++i ) + if( table[i] ) + return table[i]; + return NULL; + } + + // as static const unsigned prime_count = 31 but works with all compilers + enum { prime_count = 31 }; + static const unsigned long ms_primes[prime_count]; + + // returns the first prime in ms_primes greater than n + static unsigned long GetNextPrime( unsigned long n ); + + // returns the first prime in ms_primes smaller than n + // ( or ms_primes[0] if n is very small ) + static unsigned long GetPreviousPrime( unsigned long n ); + + static void CopyHashTable( _wxHashTable_NodeBase** srcTable, + size_t srcBuckets, _wxHashTableBase2* dst, + _wxHashTable_NodeBase** dstTable, + BucketFromNode func, ProcessNode proc ); + + static void** AllocTable( size_t sz ) + { + return (void **)calloc(sz, sizeof(void*)); + } + static void FreeTable(void *table) + { + free(table); + } +}; + +#define _WX_DECLARE_HASHTABLE( VALUE_T, KEY_T, HASH_T, KEY_EX_T, KEY_EQ_T,\ + PTROPERATOR, CLASSNAME, CLASSEXP, \ + SHOULD_GROW, SHOULD_SHRINK ) \ +CLASSEXP CLASSNAME : protected _wxHashTableBase2 \ +{ \ +public: \ + typedef KEY_T key_type; \ + typedef VALUE_T value_type; \ + typedef HASH_T hasher; \ + typedef KEY_EQ_T key_equal; \ + \ + typedef size_t size_type; \ + typedef ptrdiff_t difference_type; \ + typedef value_type* pointer; \ + typedef const value_type* const_pointer; \ + typedef value_type& reference; \ + typedef const value_type& const_reference; \ + /* should these be protected? */ \ + typedef const KEY_T const_key_type; \ + typedef const VALUE_T const_mapped_type; \ +public: \ + typedef KEY_EX_T key_extractor; \ + typedef CLASSNAME Self; \ +protected: \ + _wxHashTable_NodeBase** m_table; \ + size_t m_tableBuckets; \ + size_t m_items; \ + hasher m_hasher; \ + key_equal m_equals; \ + key_extractor m_getKey; \ +public: \ + struct Node:public _wxHashTable_NodeBase \ + { \ + public: \ + Node( const value_type& value ) \ + : m_value( value ) {} \ + Node* next() { return static_cast(m_next); } \ + \ + value_type m_value; \ + }; \ + \ +protected: \ + static void DeleteNode( _wxHashTable_NodeBase* node ) \ + { \ + delete static_cast(node); \ + } \ +public: \ + /* */ \ + /* forward iterator */ \ + /* */ \ + CLASSEXP Iterator \ + { \ + public: \ + Node* m_node; \ + Self* m_ht; \ + \ + Iterator() : m_node(NULL), m_ht(NULL) {} \ + Iterator( Node* node, const Self* ht ) \ + : m_node(node), m_ht(const_cast(ht)) {} \ + bool operator ==( const Iterator& it ) const \ + { return m_node == it.m_node; } \ + bool operator !=( const Iterator& it ) const \ + { return m_node != it.m_node; } \ + protected: \ + Node* GetNextNode() \ + { \ + size_type bucket = GetBucketForNode(m_ht,m_node); \ + for( size_type i = bucket + 1; i < m_ht->m_tableBuckets; ++i ) \ + { \ + if( m_ht->m_table[i] ) \ + return static_cast(m_ht->m_table[i]); \ + } \ + return NULL; \ + } \ + \ + void PlusPlus() \ + { \ + Node* next = m_node->next(); \ + m_node = next ? next : GetNextNode(); \ + } \ + }; \ + friend class Iterator; \ + \ +public: \ + CLASSEXP iterator : public Iterator \ + { \ + public: \ + iterator() : Iterator() {} \ + iterator( Node* node, Self* ht ) : Iterator( node, ht ) {} \ + iterator& operator++() { PlusPlus(); return *this; } \ + iterator operator++(int) { iterator it=*this;PlusPlus();return it; } \ + reference operator *() const { return m_node->m_value; } \ + PTROPERATOR(pointer) \ + }; \ + \ + CLASSEXP const_iterator : public Iterator \ + { \ + public: \ + const_iterator() : Iterator() {} \ + const_iterator(iterator i) : Iterator(i) {} \ + const_iterator( Node* node, const Self* ht ) \ + : Iterator(node, const_cast(ht)) {} \ + const_iterator& operator++() { PlusPlus();return *this; } \ + const_iterator operator++(int) { const_iterator it=*this;PlusPlus();return it; } \ + const_reference operator *() const { return m_node->m_value; } \ + PTROPERATOR(const_pointer) \ + }; \ + \ + CLASSNAME( size_type sz = 10, const hasher& hfun = hasher(), \ + const key_equal& k_eq = key_equal(), \ + const key_extractor& k_ex = key_extractor() ) \ + : m_tableBuckets( GetNextPrime( (unsigned long) sz ) ), \ + m_items( 0 ), \ + m_hasher( hfun ), \ + m_equals( k_eq ), \ + m_getKey( k_ex ) \ + { \ + m_table = (_wxHashTable_NodeBase**)AllocTable(m_tableBuckets); \ + } \ + \ + CLASSNAME( const Self& ht ) \ + : m_table(NULL), \ + m_tableBuckets( 0 ), \ + m_items( ht.m_items ), \ + m_hasher( ht.m_hasher ), \ + m_equals( ht.m_equals ), \ + m_getKey( ht.m_getKey ) \ + { \ + HashCopy( ht ); \ + } \ + \ + const Self& operator=( const Self& ht ) \ + { \ + if (&ht != this) \ + { \ + clear(); \ + m_hasher = ht.m_hasher; \ + m_equals = ht.m_equals; \ + m_getKey = ht.m_getKey; \ + m_items = ht.m_items; \ + HashCopy( ht ); \ + } \ + return *this; \ + } \ + \ + ~CLASSNAME() \ + { \ + clear(); \ + \ + FreeTable(m_table); \ + } \ + \ + hasher hash_funct() { return m_hasher; } \ + key_equal key_eq() { return m_equals; } \ + \ + /* removes all elements from the hash table, but does not */ \ + /* shrink it ( perhaps it should ) */ \ + void clear() \ + { \ + DeleteNodes(m_tableBuckets, m_table, DeleteNode); \ + m_items = 0; \ + } \ + \ + size_type size() const { return m_items; } \ + size_type max_size() const { return size_type(-1); } \ + bool empty() const { return size() == 0; } \ + \ + const_iterator end() const { return const_iterator(NULL, this); } \ + iterator end() { return iterator(NULL, this); } \ + const_iterator begin() const \ + { return const_iterator(static_cast(GetFirstNode(m_tableBuckets, m_table)), this); } \ + iterator begin() \ + { return iterator(static_cast(GetFirstNode(m_tableBuckets, m_table)), this); } \ + \ + size_type erase( const const_key_type& key ) \ + { \ + _wxHashTable_NodeBase** node = GetNodePtr(key); \ + \ + if( !node ) \ + return 0; \ + \ + --m_items; \ + _wxHashTable_NodeBase* temp = (*node)->m_next; \ + delete static_cast(*node); \ + (*node) = temp; \ + if( SHOULD_SHRINK( m_tableBuckets, m_items ) ) \ + ResizeTable( GetPreviousPrime( (unsigned long) m_tableBuckets ) - 1 ); \ + return 1; \ + } \ + \ +protected: \ + static size_type GetBucketForNode( Self* ht, Node* node ) \ + { \ + return ht->m_hasher( ht->m_getKey( node->m_value ) ) \ + % ht->m_tableBuckets; \ + } \ + static Node* CopyNode( Node* node ) { return new Node( *node ); } \ + \ + Node* GetOrCreateNode( const value_type& value, bool& created ) \ + { \ + const const_key_type& key = m_getKey( value ); \ + size_t bucket = m_hasher( key ) % m_tableBuckets; \ + Node* node = static_cast(m_table[bucket]); \ + \ + while( node ) \ + { \ + if( m_equals( m_getKey( node->m_value ), key ) ) \ + { \ + created = false; \ + return node; \ + } \ + node = node->next(); \ + } \ + created = true; \ + return CreateNode( value, bucket); \ + }\ + Node * CreateNode( const value_type& value, size_t bucket ) \ + {\ + Node* node = new Node( value ); \ + node->m_next = m_table[bucket]; \ + m_table[bucket] = node; \ + \ + /* must be after the node is inserted */ \ + ++m_items; \ + if( SHOULD_GROW( m_tableBuckets, m_items ) ) \ + ResizeTable( m_tableBuckets ); \ + \ + return node; \ + } \ + void CreateNode( const value_type& value ) \ + {\ + CreateNode(value, m_hasher( m_getKey(value) ) % m_tableBuckets ); \ + }\ + \ + /* returns NULL if not found */ \ + _wxHashTable_NodeBase** GetNodePtr(const const_key_type& key) const \ + { \ + size_t bucket = m_hasher( key ) % m_tableBuckets; \ + _wxHashTable_NodeBase** node = &m_table[bucket]; \ + \ + while( *node ) \ + { \ + if (m_equals(m_getKey(static_cast(*node)->m_value), key)) \ + return node; \ + node = &(*node)->m_next; \ + } \ + \ + return NULL; \ + } \ + \ + /* returns NULL if not found */ \ + /* expressing it in terms of GetNodePtr is 5-8% slower :-( */ \ + Node* GetNode( const const_key_type& key ) const \ + { \ + size_t bucket = m_hasher( key ) % m_tableBuckets; \ + Node* node = static_cast(m_table[bucket]); \ + \ + while( node ) \ + { \ + if( m_equals( m_getKey( node->m_value ), key ) ) \ + return node; \ + node = node->next(); \ + } \ + \ + return NULL; \ + } \ + \ + void ResizeTable( size_t newSize ) \ + { \ + newSize = GetNextPrime( (unsigned long)newSize ); \ + _wxHashTable_NodeBase** srcTable = m_table; \ + size_t srcBuckets = m_tableBuckets; \ + m_table = (_wxHashTable_NodeBase**)AllocTable( newSize ); \ + m_tableBuckets = newSize; \ + \ + CopyHashTable( srcTable, srcBuckets, \ + this, m_table, \ + (BucketFromNode)GetBucketForNode,\ + (ProcessNode)&DummyProcessNode ); \ + FreeTable(srcTable); \ + } \ + \ + /* this must be called _after_ m_table has been cleaned */ \ + void HashCopy( const Self& ht ) \ + { \ + ResizeTable( ht.size() ); \ + CopyHashTable( ht.m_table, ht.m_tableBuckets, \ + (_wxHashTableBase2*)this, \ + m_table, \ + (BucketFromNode)GetBucketForNode, \ + (ProcessNode)CopyNode ); \ + } \ +}; + +// defines an STL-like pair class CLASSNAME storing two fields: first of type +// KEY_T and second of type VALUE_T +#define _WX_DECLARE_PAIR( KEY_T, VALUE_T, CLASSNAME, CLASSEXP ) \ +CLASSEXP CLASSNAME \ +{ \ +public: \ + typedef KEY_T first_type; \ + typedef VALUE_T second_type; \ + typedef KEY_T t1; \ + typedef VALUE_T t2; \ + typedef const KEY_T const_t1; \ + typedef const VALUE_T const_t2; \ + \ + CLASSNAME(const const_t1& f, const const_t2& s) \ + : first(const_cast(f)), second(const_cast(s)) {} \ + \ + t1 first; \ + t2 second; \ +}; + +// defines the class CLASSNAME returning the key part (of type KEY_T) from a +// pair of type PAIR_T +#define _WX_DECLARE_HASH_MAP_KEY_EX( KEY_T, PAIR_T, CLASSNAME, CLASSEXP ) \ +CLASSEXP CLASSNAME \ +{ \ + typedef KEY_T key_type; \ + typedef PAIR_T pair_type; \ + typedef const key_type const_key_type; \ + typedef const pair_type const_pair_type; \ + typedef const_key_type& const_key_reference; \ + typedef const_pair_type& const_pair_reference; \ +public: \ + CLASSNAME() { } \ + const_key_reference operator()( const_pair_reference pair ) const { return pair.first; }\ + \ + /* the dummy assignment operator is needed to suppress compiler */ \ + /* warnings from hash table class' operator=(): gcc complains about */ \ + /* "statement with no effect" without it */ \ + CLASSNAME& operator=(const CLASSNAME&) { return *this; } \ +}; + +// grow/shrink predicates +inline bool never_grow( size_t, size_t ) { return false; } +inline bool never_shrink( size_t, size_t ) { return false; } +inline bool grow_lf70( size_t buckets, size_t items ) +{ + return float(items)/float(buckets) >= 0.85f; +} + +#endif // various hash map implementations + +// ---------------------------------------------------------------------------- +// hashing and comparison functors +// ---------------------------------------------------------------------------- + +// NB: implementation detail: all of these classes must have dummy assignment +// operators to suppress warnings about "statement with no effect" from gcc +// in the hash table class assignment operator (where they're assigned) + +#ifndef wxNEEDS_WX_HASH_MAP + +// integer types +struct WXDLLIMPEXP_BASE wxIntegerHash +{ +private: + WX_HASH_MAP_NAMESPACE::hash longHash; + WX_HASH_MAP_NAMESPACE::hash ulongHash; + WX_HASH_MAP_NAMESPACE::hash intHash; + WX_HASH_MAP_NAMESPACE::hash uintHash; + WX_HASH_MAP_NAMESPACE::hash shortHash; + WX_HASH_MAP_NAMESPACE::hash ushortHash; + +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + // hash ought to work but doesn't on some compilers + #if (!defined SIZEOF_LONG_LONG && SIZEOF_LONG == 4) \ + || (defined SIZEOF_LONG_LONG && SIZEOF_LONG_LONG == SIZEOF_LONG * 2) + size_t longlongHash( wxLongLong_t x ) const + { + return longHash( wx_truncate_cast(long, x) ) ^ + longHash( wx_truncate_cast(long, x >> (sizeof(long) * 8)) ); + } + #elif defined SIZEOF_LONG_LONG && SIZEOF_LONG_LONG == SIZEOF_LONG + WX_HASH_MAP_NAMESPACE::hash longlongHash; + #else + WX_HASH_MAP_NAMESPACE::hash longlongHash; + #endif +#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + +public: + wxIntegerHash() { } + size_t operator()( long x ) const { return longHash( x ); } + size_t operator()( unsigned long x ) const { return ulongHash( x ); } + size_t operator()( int x ) const { return intHash( x ); } + size_t operator()( unsigned int x ) const { return uintHash( x ); } + size_t operator()( short x ) const { return shortHash( x ); } + size_t operator()( unsigned short x ) const { return ushortHash( x ); } +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + size_t operator()( wxLongLong_t x ) const { return longlongHash(x); } + size_t operator()( wxULongLong_t x ) const { return longlongHash(x); } +#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + + wxIntegerHash& operator=(const wxIntegerHash&) { return *this; } +}; + +#else // wxNEEDS_WX_HASH_MAP + +// integer types +struct WXDLLIMPEXP_BASE wxIntegerHash +{ + wxIntegerHash() { } + unsigned long operator()( long x ) const { return (unsigned long)x; } + unsigned long operator()( unsigned long x ) const { return x; } + unsigned long operator()( int x ) const { return (unsigned long)x; } + unsigned long operator()( unsigned int x ) const { return x; } + unsigned long operator()( short x ) const { return (unsigned long)x; } + unsigned long operator()( unsigned short x ) const { return x; } +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + wxULongLong_t operator()( wxLongLong_t x ) const { return static_cast(x); } + wxULongLong_t operator()( wxULongLong_t x ) const { return x; } +#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + + wxIntegerHash& operator=(const wxIntegerHash&) { return *this; } +}; + +#endif // !wxNEEDS_WX_HASH_MAP/wxNEEDS_WX_HASH_MAP + +struct WXDLLIMPEXP_BASE wxIntegerEqual +{ + wxIntegerEqual() { } + bool operator()( long a, long b ) const { return a == b; } + bool operator()( unsigned long a, unsigned long b ) const { return a == b; } + bool operator()( int a, int b ) const { return a == b; } + bool operator()( unsigned int a, unsigned int b ) const { return a == b; } + bool operator()( short a, short b ) const { return a == b; } + bool operator()( unsigned short a, unsigned short b ) const { return a == b; } +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + bool operator()( wxLongLong_t a, wxLongLong_t b ) const { return a == b; } + bool operator()( wxULongLong_t a, wxULongLong_t b ) const { return a == b; } +#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + + wxIntegerEqual& operator=(const wxIntegerEqual&) { return *this; } +}; + +// pointers +struct WXDLLIMPEXP_BASE wxPointerHash +{ + wxPointerHash() { } + +#ifdef wxNEEDS_WX_HASH_MAP + wxUIntPtr operator()( const void* k ) const { return wxPtrToUInt(k); } +#else + size_t operator()( const void* k ) const { return (size_t)k; } +#endif + + wxPointerHash& operator=(const wxPointerHash&) { return *this; } +}; + +struct WXDLLIMPEXP_BASE wxPointerEqual +{ + wxPointerEqual() { } + bool operator()( const void* a, const void* b ) const { return a == b; } + + wxPointerEqual& operator=(const wxPointerEqual&) { return *this; } +}; + +// wxString, char*, wchar_t* +struct WXDLLIMPEXP_BASE wxStringHash +{ + wxStringHash() {} + unsigned long operator()( const wxString& x ) const + { return stringHash( x.wx_str() ); } + unsigned long operator()( const wchar_t* x ) const + { return stringHash( x ); } + unsigned long operator()( const char* x ) const + { return stringHash( x ); } + +#if WXWIN_COMPATIBILITY_2_8 + static unsigned long wxCharStringHash( const wxChar* x ) + { return stringHash(x); } + #if wxUSE_UNICODE + static unsigned long charStringHash( const char* x ) + { return stringHash(x); } + #endif +#endif // WXWIN_COMPATIBILITY_2_8 + + static unsigned long stringHash( const wchar_t* ); + static unsigned long stringHash( const char* ); + + wxStringHash& operator=(const wxStringHash&) { return *this; } +}; + +struct WXDLLIMPEXP_BASE wxStringEqual +{ + wxStringEqual() {} + bool operator()( const wxString& a, const wxString& b ) const + { return a == b; } + bool operator()( const wxChar* a, const wxChar* b ) const + { return wxStrcmp( a, b ) == 0; } +#if wxUSE_UNICODE + bool operator()( const char* a, const char* b ) const + { return strcmp( a, b ) == 0; } +#endif // wxUSE_UNICODE + + wxStringEqual& operator=(const wxStringEqual&) { return *this; } +}; + +#ifdef wxNEEDS_WX_HASH_MAP + +#define wxPTROP_NORMAL(pointer) \ + pointer operator ->() const { return &(m_node->m_value); } +#define wxPTROP_NOP(pointer) + +#define _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP ) \ +_WX_DECLARE_PAIR( KEY_T, VALUE_T, CLASSNAME##_wxImplementation_Pair, CLASSEXP ) \ +_WX_DECLARE_HASH_MAP_KEY_EX( KEY_T, CLASSNAME##_wxImplementation_Pair, CLASSNAME##_wxImplementation_KeyEx, CLASSEXP ) \ +_WX_DECLARE_HASHTABLE( CLASSNAME##_wxImplementation_Pair, KEY_T, HASH_T, \ + CLASSNAME##_wxImplementation_KeyEx, KEY_EQ_T, wxPTROP_NORMAL, \ + CLASSNAME##_wxImplementation_HashTable, CLASSEXP, grow_lf70, never_shrink ) \ +CLASSEXP CLASSNAME:public CLASSNAME##_wxImplementation_HashTable \ +{ \ +public: \ + typedef VALUE_T mapped_type; \ + _WX_DECLARE_PAIR( iterator, bool, Insert_Result, CLASSEXP ) \ + \ + wxEXPLICIT CLASSNAME( size_type hint = 100, hasher hf = hasher(), \ + key_equal eq = key_equal() ) \ + : CLASSNAME##_wxImplementation_HashTable( hint, hf, eq, \ + CLASSNAME##_wxImplementation_KeyEx() ) {} \ + \ + mapped_type& operator[]( const const_key_type& key ) \ + { \ + bool created; \ + return GetOrCreateNode( \ + CLASSNAME##_wxImplementation_Pair( key, mapped_type() ), \ + created)->m_value.second; \ + } \ + \ + const_iterator find( const const_key_type& key ) const \ + { \ + return const_iterator( GetNode( key ), this ); \ + } \ + \ + iterator find( const const_key_type& key ) \ + { \ + return iterator( GetNode( key ), this ); \ + } \ + \ + Insert_Result insert( const value_type& v ) \ + { \ + bool created; \ + Node *node = GetOrCreateNode( \ + CLASSNAME##_wxImplementation_Pair( v.first, v.second ), \ + created); \ + return Insert_Result(iterator(node, this), created); \ + } \ + \ + size_type erase( const key_type& k ) \ + { return CLASSNAME##_wxImplementation_HashTable::erase( k ); } \ + void erase( const iterator& it ) { erase( (*it).first ); } \ + \ + /* count() == 0 | 1 */ \ + size_type count( const const_key_type& key ) \ + { \ + return GetNode( key ) ? 1u : 0u; \ + } \ +} + +#endif // wxNEEDS_WX_HASH_MAP + +// these macros are to be used in the user code +#define WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME) \ + _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, class ) + +#define WX_DECLARE_STRING_HASH_MAP( VALUE_T, CLASSNAME ) \ + _WX_DECLARE_HASH_MAP( wxString, VALUE_T, wxStringHash, wxStringEqual, \ + CLASSNAME, class ) + +#define WX_DECLARE_VOIDPTR_HASH_MAP( VALUE_T, CLASSNAME ) \ + _WX_DECLARE_HASH_MAP( void*, VALUE_T, wxPointerHash, wxPointerEqual, \ + CLASSNAME, class ) + +// and these do exactly the same thing but should be used inside the +// library +#define WX_DECLARE_HASH_MAP_WITH_DECL( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, DECL) \ + _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, DECL ) + +#define WX_DECLARE_EXPORTED_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME) \ + WX_DECLARE_HASH_MAP_WITH_DECL( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, \ + CLASSNAME, class WXDLLIMPEXP_CORE ) + +#define WX_DECLARE_STRING_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, DECL ) \ + _WX_DECLARE_HASH_MAP( wxString, VALUE_T, wxStringHash, wxStringEqual, \ + CLASSNAME, DECL ) + +#define WX_DECLARE_EXPORTED_STRING_HASH_MAP( VALUE_T, CLASSNAME ) \ + WX_DECLARE_STRING_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, \ + class WXDLLIMPEXP_CORE ) + +#define WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, DECL ) \ + _WX_DECLARE_HASH_MAP( void*, VALUE_T, wxPointerHash, wxPointerEqual, \ + CLASSNAME, DECL ) + +#define WX_DECLARE_EXPORTED_VOIDPTR_HASH_MAP( VALUE_T, CLASSNAME ) \ + WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, \ + class WXDLLIMPEXP_CORE ) + +// delete all hash elements +// +// NB: the class declaration of the hash elements must be visible from the +// place where you use this macro, otherwise the proper destructor may not +// be called (a decent compiler should give a warning about it, but don't +// count on it)! +#define WX_CLEAR_HASH_MAP(type, hashmap) \ + { \ + type::iterator it, en; \ + for( it = (hashmap).begin(), en = (hashmap).end(); it != en; ++it ) \ + delete it->second; \ + (hashmap).clear(); \ + } + +//--------------------------------------------------------------------------- +// Declarations of common hashmap classes + +WX_DECLARE_HASH_MAP_WITH_DECL( long, long, wxIntegerHash, wxIntegerEqual, + wxLongToLongHashMap, class WXDLLIMPEXP_BASE ); + +WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxString, wxStringToStringHashMap, + class WXDLLIMPEXP_BASE ); + +WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxUIntPtr, wxStringToNumHashMap, + class WXDLLIMPEXP_BASE ); + + +#endif // _WX_HASHMAP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/hashset.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/hashset.h new file mode 100644 index 0000000000..8cd1becf9b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/hashset.h @@ -0,0 +1,198 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/hashset.h +// Purpose: wxHashSet class +// Author: Mattia Barbon +// Modified by: +// Created: 11/08/2003 +// Copyright: (c) Mattia Barbon +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HASHSET_H_ +#define _WX_HASHSET_H_ + +#include "wx/hashmap.h" + +// see comment in wx/hashmap.h which also applies to different standard hash +// set classes + +#if wxUSE_STD_CONTAINERS && \ + (defined(HAVE_STD_UNORDERED_SET) || defined(HAVE_TR1_UNORDERED_SET)) + +#if defined(HAVE_STD_UNORDERED_SET) + #include + #define WX_HASH_SET_BASE_TEMPLATE std::unordered_set +#elif defined(HAVE_TR1_UNORDERED_SET) + #include + #define WX_HASH_SET_BASE_TEMPLATE std::tr1::unordered_set +#else + #error Update this code: unordered_set is available, but I do not know where. +#endif + +#elif wxUSE_STD_CONTAINERS && defined(HAVE_STL_HASH_MAP) + +#if defined(HAVE_EXT_HASH_MAP) + #include +#elif defined(HAVE_HASH_MAP) + #include +#endif + +#define WX_HASH_SET_BASE_TEMPLATE WX_HASH_MAP_NAMESPACE::hash_set + +#endif // different hash_set/unordered_set possibilities + +#ifdef WX_HASH_SET_BASE_TEMPLATE + +// we need to define the class declared by _WX_DECLARE_HASH_SET as a class and +// not a typedef to allow forward declaring it +#define _WX_DECLARE_HASH_SET_IMPL( KEY_T, HASH_T, KEY_EQ_T, PTROP, CLASSNAME, CLASSEXP ) \ +CLASSEXP CLASSNAME \ + : public WX_HASH_SET_BASE_TEMPLATE< KEY_T, HASH_T, KEY_EQ_T > \ +{ \ +public: \ + explicit CLASSNAME(size_type n = 3, \ + const hasher& h = hasher(), \ + const key_equal& ke = key_equal(), \ + const allocator_type& a = allocator_type()) \ + : WX_HASH_SET_BASE_TEMPLATE< KEY_T, HASH_T, KEY_EQ_T >(n, h, ke, a) \ + {} \ + template \ + CLASSNAME(InputIterator f, InputIterator l, \ + const hasher& h = hasher(), \ + const key_equal& ke = key_equal(), \ + const allocator_type& a = allocator_type()) \ + : WX_HASH_SET_BASE_TEMPLATE< KEY_T, HASH_T, KEY_EQ_T >(f, l, h, ke, a)\ + {} \ + CLASSNAME(const WX_HASH_SET_BASE_TEMPLATE< KEY_T, HASH_T, KEY_EQ_T >& s) \ + : WX_HASH_SET_BASE_TEMPLATE< KEY_T, HASH_T, KEY_EQ_T >(s) \ + {} \ +} + +// In some standard library implementations (in particular, the libstdc++ that +// ships with g++ 4.7), std::unordered_set inherits privately from its hasher +// and comparator template arguments for purposes of empty base optimization. +// As a result, in the declaration of a class deriving from std::unordered_set +// the names of the hasher and comparator classes are interpreted as naming +// the base class which is inaccessible. +// The workaround is to prefix the class names with 'struct'; however, don't +// do this on MSVC because it causes a warning there if the class was +// declared as a 'class' rather than a 'struct' (and MSVC's std::unordered_set +// implementation does not suffer from the access problem). +#ifdef _MSC_VER +#define WX_MAYBE_PREFIX_WITH_STRUCT(STRUCTNAME) STRUCTNAME +#else +#define WX_MAYBE_PREFIX_WITH_STRUCT(STRUCTNAME) struct STRUCTNAME +#endif + +#define _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, PTROP, CLASSNAME, CLASSEXP ) \ + _WX_DECLARE_HASH_SET_IMPL( \ + KEY_T, \ + WX_MAYBE_PREFIX_WITH_STRUCT(HASH_T), \ + WX_MAYBE_PREFIX_WITH_STRUCT(KEY_EQ_T), \ + PTROP, \ + CLASSNAME, \ + CLASSEXP) + +#else // no appropriate STL class, use our own implementation + +// this is a complex way of defining an easily inlineable identity function... +#define _WX_DECLARE_HASH_SET_KEY_EX( KEY_T, CLASSNAME, CLASSEXP ) \ +CLASSEXP CLASSNAME \ +{ \ + typedef KEY_T key_type; \ + typedef const key_type const_key_type; \ + typedef const_key_type& const_key_reference; \ +public: \ + CLASSNAME() { } \ + const_key_reference operator()( const_key_reference key ) const \ + { return key; } \ + \ + /* the dummy assignment operator is needed to suppress compiler */ \ + /* warnings from hash table class' operator=(): gcc complains about */ \ + /* "statement with no effect" without it */ \ + CLASSNAME& operator=(const CLASSNAME&) { return *this; } \ +}; + +#define _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, PTROP, CLASSNAME, CLASSEXP )\ +_WX_DECLARE_HASH_SET_KEY_EX( KEY_T, CLASSNAME##_wxImplementation_KeyEx, CLASSEXP ) \ +_WX_DECLARE_HASHTABLE( KEY_T, KEY_T, HASH_T, \ + CLASSNAME##_wxImplementation_KeyEx, KEY_EQ_T, PTROP, \ + CLASSNAME##_wxImplementation_HashTable, CLASSEXP, grow_lf70, never_shrink ) \ +CLASSEXP CLASSNAME:public CLASSNAME##_wxImplementation_HashTable \ +{ \ +public: \ + _WX_DECLARE_PAIR( iterator, bool, Insert_Result, CLASSEXP ) \ + \ + wxEXPLICIT CLASSNAME( size_type hint = 100, hasher hf = hasher(), \ + key_equal eq = key_equal() ) \ + : CLASSNAME##_wxImplementation_HashTable( hint, hf, eq, \ + CLASSNAME##_wxImplementation_KeyEx() ) {} \ + \ + Insert_Result insert( const key_type& key ) \ + { \ + bool created; \ + Node *node = GetOrCreateNode( key, created ); \ + return Insert_Result( iterator( node, this ), created ); \ + } \ + \ + const_iterator find( const const_key_type& key ) const \ + { \ + return const_iterator( GetNode( key ), this ); \ + } \ + \ + iterator find( const const_key_type& key ) \ + { \ + return iterator( GetNode( key ), this ); \ + } \ + \ + size_type erase( const key_type& k ) \ + { return CLASSNAME##_wxImplementation_HashTable::erase( k ); } \ + void erase( const iterator& it ) { erase( *it ); } \ + void erase( const const_iterator& it ) { erase( *it ); } \ + \ + /* count() == 0 | 1 */ \ + size_type count( const const_key_type& key ) const \ + { return GetNode( key ) ? 1 : 0; } \ +} + +#endif // STL/wx implementations + + +// these macros are to be used in the user code +#define WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME) \ + _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, wxPTROP_NORMAL, CLASSNAME, class ) + +// and these do exactly the same thing but should be used inside the +// library +#define WX_DECLARE_HASH_SET_WITH_DECL( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME, DECL) \ + _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, wxPTROP_NORMAL, CLASSNAME, DECL ) + +#define WX_DECLARE_EXPORTED_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME) \ + WX_DECLARE_HASH_SET_WITH_DECL( KEY_T, HASH_T, KEY_EQ_T, \ + CLASSNAME, class WXDLLIMPEXP_CORE ) + +// Finally these versions allow to define hash sets of non-objects (including +// pointers, hence the confusing but wxArray-compatible name) without +// operator->() which can't be used for them. This is mostly used inside the +// library itself to avoid warnings when using such hash sets with some less +// common compilers (notably Sun CC). +#define WX_DECLARE_HASH_SET_PTR( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME) \ + _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, wxPTROP_NOP, CLASSNAME, class ) +#define WX_DECLARE_HASH_SET_WITH_DECL_PTR( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME, DECL) \ + _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, wxPTROP_NOP, CLASSNAME, DECL ) + +// delete all hash elements +// +// NB: the class declaration of the hash elements must be visible from the +// place where you use this macro, otherwise the proper destructor may not +// be called (a decent compiler should give a warning about it, but don't +// count on it)! +#define WX_CLEAR_HASH_SET(type, hashset) \ + { \ + type::iterator it, en; \ + for( it = (hashset).begin(), en = (hashset).end(); it != en; ++it ) \ + delete *it; \ + (hashset).clear(); \ + } + +#endif // _WX_HASHSET_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/headercol.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/headercol.h new file mode 100644 index 0000000000..1002c0f562 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/headercol.h @@ -0,0 +1,288 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/headercol.h +// Purpose: declaration of wxHeaderColumn class +// Author: Vadim Zeitlin +// Created: 2008-12-02 +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HEADERCOL_H_ +#define _WX_HEADERCOL_H_ + +#include "wx/bitmap.h" + +#if wxUSE_HEADERCTRL + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +enum +{ + // special value for column width meaning unspecified/default + wxCOL_WIDTH_DEFAULT = -1, + + // size the column automatically to fit all values + wxCOL_WIDTH_AUTOSIZE = -2 +}; + +// bit masks for the various column attributes +enum +{ + // column can be resized (included in default flags) + wxCOL_RESIZABLE = 1, + + // column can be clicked to toggle the sort order by its contents + wxCOL_SORTABLE = 2, + + // column can be dragged to change its order (included in default) + wxCOL_REORDERABLE = 4, + + // column is not shown at all + wxCOL_HIDDEN = 8, + + // default flags for wxHeaderColumn ctor + wxCOL_DEFAULT_FLAGS = wxCOL_RESIZABLE | wxCOL_REORDERABLE +}; + +// ---------------------------------------------------------------------------- +// wxHeaderColumn: interface for a column in a header of controls such as +// wxListCtrl, wxDataViewCtrl or wxGrid +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxHeaderColumn +{ +public: + // ctors and dtor + // -------------- + + /* + Derived classes must provide ctors with the following signatures + (notice that they shouldn't be explicit to allow passing strings/bitmaps + directly to methods such wxHeaderCtrl::AppendColumn()): + wxHeaderColumn(const wxString& title, + int width = wxCOL_WIDTH_DEFAULT, + wxAlignment align = wxALIGN_NOT, + int flags = wxCOL_DEFAULT_FLAGS); + wxHeaderColumn(const wxBitmap &bitmap, + int width = wxDVC_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxCOL_DEFAULT_FLAGS); + */ + + // virtual dtor for the base class to avoid gcc warnings even though we + // don't normally delete the objects of this class via a pointer to + // wxHeaderColumn so it's not necessary, strictly speaking + virtual ~wxHeaderColumn() { } + + // getters for various attributes + // ------------------------------ + + // notice that wxHeaderColumn only provides getters as this is all the + // wxHeaderCtrl needs, various derived class must also provide some way to + // change these attributes but this can be done either at the column level + // (in which case they should inherit from wxSettableHeaderColumn) or via + // the methods of the main control in which case you don't need setters in + // the column class at all + + // title is the string shown for this column + virtual wxString GetTitle() const = 0; + + // bitmap shown (instead of text) in the column header + virtual wxBitmap GetBitmap() const = 0; \ + + // width of the column in pixels, can be set to wxCOL_WIDTH_DEFAULT meaning + // unspecified/default + virtual int GetWidth() const = 0; + + // minimal width can be set for resizable columns to forbid resizing them + // below the specified size (set to 0 to remove) + virtual int GetMinWidth() const = 0; + + // alignment of the text: wxALIGN_CENTRE, wxALIGN_LEFT or wxALIGN_RIGHT + virtual wxAlignment GetAlignment() const = 0; + + + // flags manipulations: + // -------------------- + + // notice that while we make GetFlags() pure virtual here and implement the + // individual flags access in terms of it, for some derived classes it is + // more natural to implement access to each flag individually, in which + // case they can use our GetFromIndividualFlags() helper below to implement + // GetFlags() + + // retrieve all column flags at once: combination of wxCOL_XXX values above + virtual int GetFlags() const = 0; + + bool HasFlag(int flag) const { return (GetFlags() & flag) != 0; } + + + // wxCOL_RESIZABLE + virtual bool IsResizeable() const + { return HasFlag(wxCOL_RESIZABLE); } + + // wxCOL_SORTABLE + virtual bool IsSortable() const + { return HasFlag(wxCOL_SORTABLE); } + + // wxCOL_REORDERABLE + virtual bool IsReorderable() const + { return HasFlag(wxCOL_REORDERABLE); } + + // wxCOL_HIDDEN + virtual bool IsHidden() const + { return HasFlag(wxCOL_HIDDEN); } + bool IsShown() const + { return !IsHidden(); } + + + // sorting + // ------- + + // return true if the column is the one currently used for sorting + virtual bool IsSortKey() const = 0; + + // for sortable columns indicate whether we should sort in ascending or + // descending order (this should only be taken into account if IsSortKey()) + virtual bool IsSortOrderAscending() const = 0; + +protected: + // helper for the class overriding IsXXX() + int GetFromIndividualFlags() const; +}; + +// ---------------------------------------------------------------------------- +// wxSettableHeaderColumn: column which allows to change its fields too +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSettableHeaderColumn : public wxHeaderColumn +{ +public: + virtual void SetTitle(const wxString& title) = 0; + virtual void SetBitmap(const wxBitmap& bitmap) = 0; + virtual void SetWidth(int width) = 0; + virtual void SetMinWidth(int minWidth) = 0; + virtual void SetAlignment(wxAlignment align) = 0; + + // see comment for wxHeaderColumn::GetFlags() about the relationship + // between SetFlags() and Set{Sortable,Reorderable,...} + + // change, set, clear, toggle or test for any individual flag + virtual void SetFlags(int flags) = 0; + void ChangeFlag(int flag, bool set); + void SetFlag(int flag); + void ClearFlag(int flag); + void ToggleFlag(int flag); + + virtual void SetResizeable(bool resizable) + { ChangeFlag(wxCOL_RESIZABLE, resizable); } + virtual void SetSortable(bool sortable) + { ChangeFlag(wxCOL_SORTABLE, sortable); } + virtual void SetReorderable(bool reorderable) + { ChangeFlag(wxCOL_REORDERABLE, reorderable); } + virtual void SetHidden(bool hidden) + { ChangeFlag(wxCOL_HIDDEN, hidden); } + + // This function can be called to indicate that this column is not used for + // sorting any more. Under some platforms it's not necessary to do anything + // in this case as just setting another column as a sort key takes care of + // everything but under MSW we currently need to call this explicitly to + // reset the sort indicator displayed on the column. + virtual void UnsetAsSortKey() { } + + virtual void SetSortOrder(bool ascending) = 0; + void ToggleSortOrder() { SetSortOrder(!IsSortOrderAscending()); } + +protected: + // helper for the class overriding individual SetXXX() methods instead of + // overriding SetFlags() + void SetIndividualFlags(int flags); +}; + +// ---------------------------------------------------------------------------- +// wxHeaderColumnSimple: trivial generic implementation of wxHeaderColumn +// ---------------------------------------------------------------------------- + +class wxHeaderColumnSimple : public wxSettableHeaderColumn +{ +public: + // ctors and dtor + wxHeaderColumnSimple(const wxString& title, + int width = wxCOL_WIDTH_DEFAULT, + wxAlignment align = wxALIGN_NOT, + int flags = wxCOL_DEFAULT_FLAGS) + : m_title(title), + m_width(width), + m_align(align), + m_flags(flags) + { + Init(); + } + + wxHeaderColumnSimple(const wxBitmap& bitmap, + int width = wxCOL_WIDTH_DEFAULT, + wxAlignment align = wxALIGN_CENTER, + int flags = wxCOL_DEFAULT_FLAGS) + : m_bitmap(bitmap), + m_width(width), + m_align(align), + m_flags(flags) + { + Init(); + } + + // implement base class pure virtuals + virtual void SetTitle(const wxString& title) { m_title = title; } + virtual wxString GetTitle() const { return m_title; } + + virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } + wxBitmap GetBitmap() const { return m_bitmap; } + + virtual void SetWidth(int width) { m_width = width; } + virtual int GetWidth() const { return m_width; } + + virtual void SetMinWidth(int minWidth) { m_minWidth = minWidth; } + virtual int GetMinWidth() const { return m_minWidth; } + + virtual void SetAlignment(wxAlignment align) { m_align = align; } + virtual wxAlignment GetAlignment() const { return m_align; } + + virtual void SetFlags(int flags) { m_flags = flags; } + virtual int GetFlags() const { return m_flags; } + + virtual bool IsSortKey() const { return m_sort; } + virtual void UnsetAsSortKey() { m_sort = false; } + + virtual void SetSortOrder(bool ascending) + { + m_sort = true; + m_sortAscending = ascending; + } + + virtual bool IsSortOrderAscending() const { return m_sortAscending; } + +private: + // common part of all ctors + void Init() + { + m_minWidth = 0; + m_sort = false; + m_sortAscending = true; + } + + wxString m_title; + wxBitmap m_bitmap; + int m_width, + m_minWidth; + wxAlignment m_align; + int m_flags; + bool m_sort, + m_sortAscending; +}; + +#endif // wxUSE_HEADERCTRL + +#endif // _WX_HEADERCOL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/headerctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/headerctrl.h new file mode 100644 index 0000000000..78d7117b9f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/headerctrl.h @@ -0,0 +1,488 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/headerctrl.h +// Purpose: wxHeaderCtrlBase class: interface of wxHeaderCtrl +// Author: Vadim Zeitlin +// Created: 2008-12-01 +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HEADERCTRL_H_ +#define _WX_HEADERCTRL_H_ + +#include "wx/control.h" + +#if wxUSE_HEADERCTRL + +#include "wx/dynarray.h" +#include "wx/vector.h" + +#include "wx/headercol.h" + +// notice that the classes in this header are defined in the core library even +// although currently they're only used by wxGrid which is in wxAdv because we +// plan to use it in wxListCtrl which is in core too in the future +class WXDLLIMPEXP_FWD_CORE wxHeaderCtrlEvent; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +enum +{ + // allow column drag and drop + wxHD_ALLOW_REORDER = 0x0001, + + // allow hiding (and showing back) the columns using the menu shown by + // right clicking the header + wxHD_ALLOW_HIDE = 0x0002, + + // style used by default when creating the control + wxHD_DEFAULT_STYLE = wxHD_ALLOW_REORDER +}; + +extern WXDLLIMPEXP_DATA_CORE(const char) wxHeaderCtrlNameStr[]; + +// ---------------------------------------------------------------------------- +// wxHeaderCtrlBase defines the interface of a header control +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxHeaderCtrlBase : public wxControl +{ +public: + /* + Derived classes must provide default ctor as well as a ctor and + Create() function with the following signatures: + + wxHeaderCtrl(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHD_DEFAULT_STYLE, + const wxString& name = wxHeaderCtrlNameStr); + + bool Create(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHD_DEFAULT_STYLE, + const wxString& name = wxHeaderCtrlNameStr); + */ + + // column-related methods + // ---------------------- + + // set the number of columns in the control + // + // this also calls UpdateColumn() for all columns + void SetColumnCount(unsigned int count); + + // return the number of columns in the control as set by SetColumnCount() + unsigned int GetColumnCount() const { return DoGetCount(); } + + // return whether the control has any columns + bool IsEmpty() const { return DoGetCount() == 0; } + + // update the column with the given index + void UpdateColumn(unsigned int idx) + { + wxCHECK_RET( idx < GetColumnCount(), "invalid column index" ); + + DoUpdate(idx); + } + + + // columns order + // ------------- + + // set the columns order: the array defines the column index which appears + // the given position, it must have GetColumnCount() elements and contain + // all indices exactly once + void SetColumnsOrder(const wxArrayInt& order); + wxArrayInt GetColumnsOrder() const; + + // get the index of the column at the given display position + unsigned int GetColumnAt(unsigned int pos) const; + + // get the position at which this column is currently displayed + unsigned int GetColumnPos(unsigned int idx) const; + + // reset the columns order to the natural one + void ResetColumnsOrder(); + + // helper function used by the generic version of this control and also + // wxGrid: reshuffles the array of column indices indexed by positions + // (i.e. using the same convention as for SetColumnsOrder()) so that the + // column with the given index is found at the specified position + static void MoveColumnInOrderArray(wxArrayInt& order, + unsigned int idx, + unsigned int pos); + + + // UI helpers + // ---------- + +#if wxUSE_MENUS + // show the popup menu containing all columns with check marks for the ones + // which are currently shown and return true if something was done using it + // (in this case UpdateColumnVisibility() will have been called) or false + // if the menu was cancelled + // + // this is called from the default right click handler for the controls + // with wxHD_ALLOW_HIDE style + bool ShowColumnsMenu(const wxPoint& pt, const wxString& title = wxString()); + + // append the entries for all our columns to the given menu, with the + // currently visible columns being checked + // + // this is used by ShowColumnsMenu() but can also be used if you use your + // own custom columns menu but nevertheless want to show all the columns in + // it + // + // the ids of the items corresponding to the columns are consecutive and + // start from idColumnsBase + void AddColumnsItems(wxMenu& menu, int idColumnsBase = 0); +#endif // wxUSE_MENUS + + // show the columns customization dialog and return true if something was + // changed using it (in which case UpdateColumnVisibility() and/or + // UpdateColumnsOrder() will have been called) + // + // this is called by the control itself from ShowColumnsMenu() (which in + // turn is only called by the control if wxHD_ALLOW_HIDE style was + // specified) and if the control has wxHD_ALLOW_REORDER style as well + bool ShowCustomizeDialog(); + + // compute column title width + int GetColumnTitleWidth(const wxHeaderColumn& col); + + // implementation only from now on + // ------------------------------- + + // the user doesn't need to TAB to this control + virtual bool AcceptsFocusFromKeyboard() const { return false; } + + // this method is only overridden in order to synchronize the control with + // the main window when it is scrolled, the derived class must implement + // DoScrollHorz() + virtual void ScrollWindow(int dx, int dy, const wxRect *rect = NULL); + +protected: + // this method must be implemented by the derived classes to return the + // information for the given column + virtual const wxHeaderColumn& GetColumn(unsigned int idx) const = 0; + + // this method is called from the default EVT_HEADER_SEPARATOR_DCLICK + // handler to update the fitting column width of the given column, it + // should return true if the width was really updated + virtual bool UpdateColumnWidthToFit(unsigned int WXUNUSED(idx), + int WXUNUSED(widthTitle)) + { + return false; + } + + // this method is called from ShowColumnsMenu() and must be overridden to + // update the internal column visibility (there is no need to call + // UpdateColumn() from here, this will be done internally) + virtual void UpdateColumnVisibility(unsigned int WXUNUSED(idx), + bool WXUNUSED(show)) + { + wxFAIL_MSG( "must be overridden if called" ); + } + + // this method is called from ShowCustomizeDialog() to reorder all columns + // at once and should be implemented for controls using wxHD_ALLOW_REORDER + // style (there is no need to call SetColumnsOrder() from here, this is + // done by the control itself) + virtual void UpdateColumnsOrder(const wxArrayInt& WXUNUSED(order)) + { + wxFAIL_MSG( "must be overridden if called" ); + } + + // this method can be overridden in the derived classes to do something + // (e.g. update/resize some internal data structures) before the number of + // columns in the control changes + virtual void OnColumnCountChanging(unsigned int WXUNUSED(count)) { } + + + // helper function for the derived classes: update the array of column + // indices after the number of columns changed + void DoResizeColumnIndices(wxArrayInt& colIndices, unsigned int count); + +protected: + // this window doesn't look nice with the border so don't use it by default + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + +private: + // methods implementing our public API and defined in platform-specific + // implementations + virtual void DoSetCount(unsigned int count) = 0; + virtual unsigned int DoGetCount() const = 0; + virtual void DoUpdate(unsigned int idx) = 0; + + virtual void DoScrollHorz(int dx) = 0; + + virtual void DoSetColumnsOrder(const wxArrayInt& order) = 0; + virtual wxArrayInt DoGetColumnsOrder() const = 0; + + + // event handlers + void OnSeparatorDClick(wxHeaderCtrlEvent& event); +#if wxUSE_MENUS + void OnRClick(wxHeaderCtrlEvent& event); +#endif // wxUSE_MENUS + + DECLARE_EVENT_TABLE() +}; + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl: port-specific header control implementation, notice that this +// is still an ABC which is meant to be used as part of another +// control, see wxHeaderCtrlSimple for a standalone version +// ---------------------------------------------------------------------------- + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + #include "wx/msw/headerctrl.h" +#else + #define wxHAS_GENERIC_HEADERCTRL + #include "wx/generic/headerctrlg.h" +#endif // platform + +// ---------------------------------------------------------------------------- +// wxHeaderCtrlSimple: concrete header control which can be used standalone +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxHeaderCtrlSimple : public wxHeaderCtrl +{ +public: + // control creation + // ---------------- + + wxHeaderCtrlSimple() { Init(); } + wxHeaderCtrlSimple(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHD_DEFAULT_STYLE, + const wxString& name = wxHeaderCtrlNameStr) + { + Init(); + + Create(parent, winid, pos, size, style, name); + } + + // managing the columns + // -------------------- + + // insert the column at the given position, using GetColumnCount() as + // position appends it at the end + void InsertColumn(const wxHeaderColumnSimple& col, unsigned int idx) + { + wxCHECK_RET( idx <= GetColumnCount(), "invalid column index" ); + + DoInsert(col, idx); + } + + // append the column to the end of the control + void AppendColumn(const wxHeaderColumnSimple& col) + { + DoInsert(col, GetColumnCount()); + } + + // delete the column at the given index + void DeleteColumn(unsigned int idx) + { + wxCHECK_RET( idx < GetColumnCount(), "invalid column index" ); + + DoDelete(idx); + } + + // delete all the existing columns + void DeleteAllColumns(); + + + // modifying columns + // ----------------- + + // show or hide the column, notice that even when a column is hidden we + // still account for it when using indices + void ShowColumn(unsigned int idx, bool show = true) + { + wxCHECK_RET( idx < GetColumnCount(), "invalid column index" ); + + DoShowColumn(idx, show); + } + + void HideColumn(unsigned int idx) + { + ShowColumn(idx, false); + } + + // indicate that the column is used for sorting + void ShowSortIndicator(unsigned int idx, bool ascending = true) + { + wxCHECK_RET( idx < GetColumnCount(), "invalid column index" ); + + DoShowSortIndicator(idx, ascending); + } + + // remove the sort indicator completely + void RemoveSortIndicator(); + +protected: + // implement/override base class methods + virtual const wxHeaderColumn& GetColumn(unsigned int idx) const; + virtual bool UpdateColumnWidthToFit(unsigned int idx, int widthTitle); + + // and define another one to be overridden in the derived classes: it + // should return the best width for the given column contents or -1 if not + // implemented, we use it to implement UpdateColumnWidthToFit() + virtual int GetBestFittingWidth(unsigned int WXUNUSED(idx)) const + { + return -1; + } + +private: + // functions implementing our public API + void DoInsert(const wxHeaderColumnSimple& col, unsigned int idx); + void DoDelete(unsigned int idx); + void DoShowColumn(unsigned int idx, bool show); + void DoShowSortIndicator(unsigned int idx, bool ascending); + + // common part of all ctors + void Init(); + + // bring the column count in sync with the number of columns we store + void UpdateColumnCount() + { + SetColumnCount(static_cast(m_cols.size())); + } + + + // all our current columns + typedef wxVector Columns; + Columns m_cols; + + // the column currently used for sorting or -1 if none + unsigned int m_sortKey; + + + wxDECLARE_NO_COPY_CLASS(wxHeaderCtrlSimple); +}; + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl events +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxHeaderCtrlEvent : public wxNotifyEvent +{ +public: + wxHeaderCtrlEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) + : wxNotifyEvent(commandType, winid), + m_col(-1), + m_width(0), + m_order(static_cast(-1)) + { + } + + wxHeaderCtrlEvent(const wxHeaderCtrlEvent& event) + : wxNotifyEvent(event), + m_col(event.m_col), + m_width(event.m_width), + m_order(event.m_order) + { + } + + // the column which this event pertains to: valid for all header events + int GetColumn() const { return m_col; } + void SetColumn(int col) { m_col = col; } + + // the width of the column: valid for column resizing/dragging events only + int GetWidth() const { return m_width; } + void SetWidth(int width) { m_width = width; } + + // the new position of the column: for end reorder events only + unsigned int GetNewOrder() const { return m_order; } + void SetNewOrder(unsigned int order) { m_order = order; } + + virtual wxEvent *Clone() const { return new wxHeaderCtrlEvent(*this); } + +protected: + // the column affected by the event + int m_col; + + // the current width for the dragging events + int m_width; + + // the new column position for end reorder event + unsigned int m_order; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxHeaderCtrlEvent) +}; + + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_CLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_RIGHT_CLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_MIDDLE_CLICK, wxHeaderCtrlEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_RIGHT_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_MIDDLE_DCLICK, wxHeaderCtrlEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_SEPARATOR_DCLICK, wxHeaderCtrlEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_BEGIN_RESIZE, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_RESIZING, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_END_RESIZE, wxHeaderCtrlEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_BEGIN_REORDER, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_END_REORDER, wxHeaderCtrlEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_DRAGGING_CANCELLED, wxHeaderCtrlEvent ); + +typedef void (wxEvtHandler::*wxHeaderCtrlEventFunction)(wxHeaderCtrlEvent&); + +#define wxHeaderCtrlEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxHeaderCtrlEventFunction, func) + +#define wx__DECLARE_HEADER_EVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_HEADER_ ## evt, id, wxHeaderCtrlEventHandler(fn)) + +#define EVT_HEADER_CLICK(id, fn) wx__DECLARE_HEADER_EVT(CLICK, id, fn) +#define EVT_HEADER_RIGHT_CLICK(id, fn) wx__DECLARE_HEADER_EVT(RIGHT_CLICK, id, fn) +#define EVT_HEADER_MIDDLE_CLICK(id, fn) wx__DECLARE_HEADER_EVT(MIDDLE_CLICK, id, fn) + +#define EVT_HEADER_DCLICK(id, fn) wx__DECLARE_HEADER_EVT(DCLICK, id, fn) +#define EVT_HEADER_RIGHT_DCLICK(id, fn) wx__DECLARE_HEADER_EVT(RIGHT_DCLICK, id, fn) +#define EVT_HEADER_MIDDLE_DCLICK(id, fn) wx__DECLARE_HEADER_EVT(MIDDLE_DCLICK, id, fn) + +#define EVT_HEADER_SEPARATOR_DCLICK(id, fn) wx__DECLARE_HEADER_EVT(SEPARATOR_DCLICK, id, fn) + +#define EVT_HEADER_BEGIN_RESIZE(id, fn) wx__DECLARE_HEADER_EVT(BEGIN_RESIZE, id, fn) +#define EVT_HEADER_RESIZING(id, fn) wx__DECLARE_HEADER_EVT(RESIZING, id, fn) +#define EVT_HEADER_END_RESIZE(id, fn) wx__DECLARE_HEADER_EVT(END_RESIZE, id, fn) + +#define EVT_HEADER_BEGIN_REORDER(id, fn) wx__DECLARE_HEADER_EVT(BEGIN_REORDER, id, fn) +#define EVT_HEADER_END_REORDER(id, fn) wx__DECLARE_HEADER_EVT(END_REORDER, id, fn) + +#define EVT_HEADER_DRAGGING_CANCELLED(id, fn) wx__DECLARE_HEADER_EVT(DRAGGING_CANCELLED, id, fn) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_HEADER_CLICK wxEVT_HEADER_CLICK +#define wxEVT_COMMAND_HEADER_RIGHT_CLICK wxEVT_HEADER_RIGHT_CLICK +#define wxEVT_COMMAND_HEADER_MIDDLE_CLICK wxEVT_HEADER_MIDDLE_CLICK +#define wxEVT_COMMAND_HEADER_DCLICK wxEVT_HEADER_DCLICK +#define wxEVT_COMMAND_HEADER_RIGHT_DCLICK wxEVT_HEADER_RIGHT_DCLICK +#define wxEVT_COMMAND_HEADER_MIDDLE_DCLICK wxEVT_HEADER_MIDDLE_DCLICK +#define wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK wxEVT_HEADER_SEPARATOR_DCLICK +#define wxEVT_COMMAND_HEADER_BEGIN_RESIZE wxEVT_HEADER_BEGIN_RESIZE +#define wxEVT_COMMAND_HEADER_RESIZING wxEVT_HEADER_RESIZING +#define wxEVT_COMMAND_HEADER_END_RESIZE wxEVT_HEADER_END_RESIZE +#define wxEVT_COMMAND_HEADER_BEGIN_REORDER wxEVT_HEADER_BEGIN_REORDER +#define wxEVT_COMMAND_HEADER_END_REORDER wxEVT_HEADER_END_REORDER +#define wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED wxEVT_HEADER_DRAGGING_CANCELLED + +#endif // wxUSE_HEADERCTRL + +#endif // _WX_HEADERCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/help.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/help.h new file mode 100644 index 0000000000..17539c1b32 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/help.h @@ -0,0 +1,43 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/help.h +// Purpose: wxHelpController base header +// Author: wxWidgets Team +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELP_H_BASE_ +#define _WX_HELP_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_HELP + +#include "wx/helpbase.h" + +#ifdef __WXWINCE__ + #include "wx/msw/wince/helpwce.h" + + #define wxHelpController wxWinceHelpController +#elif defined(__WXMSW__) + #include "wx/msw/helpchm.h" + + #define wxHelpController wxCHMHelpController +#else // !MSW + +#if wxUSE_WXHTML_HELP + #include "wx/html/helpctrl.h" + #define wxHelpController wxHtmlHelpController +#else + #include "wx/generic/helpext.h" + #define wxHelpController wxExtHelpController +#endif + +#endif // MSW/!MSW + +#endif // wxUSE_HELP + +#endif + // _WX_HELP_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/helpbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/helpbase.h new file mode 100644 index 0000000000..9a924fd38e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/helpbase.h @@ -0,0 +1,105 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/helpbase.h +// Purpose: Help system base classes +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPBASEH__ +#define _WX_HELPBASEH__ + +#include "wx/defs.h" + +#if wxUSE_HELP + +#include "wx/object.h" +#include "wx/string.h" +#include "wx/gdicmn.h" +#include "wx/frame.h" + +// Flags for SetViewer +#define wxHELP_NETSCAPE 1 + +// Search modes: +enum wxHelpSearchMode +{ + wxHELP_SEARCH_INDEX, + wxHELP_SEARCH_ALL +}; + +// Defines the API for help controllers +class WXDLLIMPEXP_CORE wxHelpControllerBase: public wxObject +{ +public: + inline wxHelpControllerBase(wxWindow* parentWindow = NULL) { m_parentWindow = parentWindow; } + inline ~wxHelpControllerBase() {} + + // Must call this to set the filename and server name. + // server is only required when implementing TCP/IP-based + // help controllers. + virtual bool Initialize(const wxString& WXUNUSED(file), int WXUNUSED(server) ) { return false; } + virtual bool Initialize(const wxString& WXUNUSED(file)) { return false; } + + // Set viewer: only relevant to some kinds of controller + virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {} + + // If file is "", reloads file given in Initialize + virtual bool LoadFile(const wxString& file = wxEmptyString) = 0; + + // Displays the contents + virtual bool DisplayContents(void) = 0; + + // Display the given section + virtual bool DisplaySection(int sectionNo) = 0; + + // Display the section using a context id + virtual bool DisplayContextPopup(int WXUNUSED(contextId)) { return false; } + + // Display the text in a popup, if possible + virtual bool DisplayTextPopup(const wxString& WXUNUSED(text), const wxPoint& WXUNUSED(pos)) { return false; } + + // By default, uses KeywordSection to display a topic. Implementations + // may override this for more specific behaviour. + virtual bool DisplaySection(const wxString& section) { return KeywordSearch(section); } + virtual bool DisplayBlock(long blockNo) = 0; + virtual bool KeywordSearch(const wxString& k, + wxHelpSearchMode mode = wxHELP_SEARCH_ALL) = 0; + /// Allows one to override the default settings for the help frame. + virtual void SetFrameParameters(const wxString& WXUNUSED(title), + const wxSize& WXUNUSED(size), + const wxPoint& WXUNUSED(pos) = wxDefaultPosition, + bool WXUNUSED(newFrameEachTime) = false) + { + // does nothing by default + } + /// Obtains the latest settings used by the help frame and the help + /// frame. + virtual wxFrame *GetFrameParameters(wxSize *WXUNUSED(size) = NULL, + wxPoint *WXUNUSED(pos) = NULL, + bool *WXUNUSED(newFrameEachTime) = NULL) + { + return NULL; // does nothing by default + } + + virtual bool Quit() = 0; + virtual void OnQuit() {} + + /// Set the window that can optionally be used for the help window's parent. + virtual void SetParentWindow(wxWindow* win) { m_parentWindow = win; } + + /// Get the window that can optionally be used for the help window's parent. + virtual wxWindow* GetParentWindow() const { return m_parentWindow; } + +protected: + wxWindow* m_parentWindow; +private: + DECLARE_CLASS(wxHelpControllerBase) +}; + +#endif // wxUSE_HELP + +#endif +// _WX_HELPBASEH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/helphtml.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/helphtml.h new file mode 100644 index 0000000000..87bc81dfbd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/helphtml.h @@ -0,0 +1,19 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/helphtml.h +// Purpose: Includes wx/html/helpctrl.h, for wxHtmlHelpController. +// Author: Julian Smart +// Modified by: +// Created: 2003-05-24 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_HELPHTML_H_ +#define __WX_HELPHTML_H_ + +#if wxUSE_WXHTML_HELP +#include "wx/html/helpctrl.h" +#endif + +#endif // __WX_HELPHTML_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/helpwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/helpwin.h new file mode 100644 index 0000000000..b73a62ebaf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/helpwin.h @@ -0,0 +1,21 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/helpwin.h +// Purpose: Includes Windows or OS/2 help +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPWIN_H_BASE_ +#define _WX_HELPWIN_H_BASE_ + +#if defined(__WXMSW__) +#include "wx/msw/helpwin.h" +#elif defined(__WXPM__) +#include "wx/os2/helpwin.h" +#endif + +#endif + // _WX_HELPWIN_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/forcelnk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/forcelnk.h new file mode 100644 index 0000000000..8d3631c903 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/forcelnk.h @@ -0,0 +1,62 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/forcelnk.h +// Purpose: macros which force the linker to link apparently unused code +// Author: Vaclav Slavik +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + +DESCRPITON: + +mod_*.cpp files contain handlers for tags. These files are modules - they contain +one wxTagModule class and it's OnInit() method is called from wxApp's init method. +The module is called even if you only link it into the executable, so everything +seems wonderful. + +The problem is that we have these modules in LIBRARY and mod_*.cpp files contain +no method nor class which is known out of the module. So the linker won't +link these .o/.obj files into executable because it detected that it is not used +by the program. + +To workaround this I introduced set of macros FORCE_LINK_ME and FORCE_LINK. These +macros are generic and are not limited to mod_*.cpp files. You may find them quite +useful somewhere else... + +How to use them: +let's suppose you want to always link file foo.cpp and that you have module +always.cpp that is certainly always linked (e.g. the one with main() function +or htmlwin.cpp in wxHtml library). + +Place FORCE_LINK_ME(foo) somewhere in foo.cpp and FORCE_LINK(foo) somewhere +in always.cpp +See mod_*.cpp and htmlwin.cpp for example :-) + +*/ + + +#ifndef _WX_FORCELNK_H_ +#define _WX_FORCELNK_H_ + +#include "wx/link.h" + +// compatibility defines +#define FORCE_LINK wxFORCE_LINK_MODULE +#define FORCE_LINK_ME wxFORCE_LINK_THIS_MODULE + +#define FORCE_WXHTML_MODULES() \ + FORCE_LINK(m_layout) \ + FORCE_LINK(m_fonts) \ + FORCE_LINK(m_image) \ + FORCE_LINK(m_list) \ + FORCE_LINK(m_dflist) \ + FORCE_LINK(m_pre) \ + FORCE_LINK(m_hline) \ + FORCE_LINK(m_links) \ + FORCE_LINK(m_tables) \ + FORCE_LINK(m_span) \ + FORCE_LINK(m_style) + + +#endif // _WX_FORCELNK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpctrl.h new file mode 100644 index 0000000000..0053823a88 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpctrl.h @@ -0,0 +1,164 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/helpctrl.h +// Purpose: wxHtmlHelpController +// Notes: Based on htmlhelp.cpp, implementing a monolithic +// HTML Help controller class, by Vaclav Slavik +// Author: Harm van der Heijden and Vaclav Slavik +// Copyright: (c) Harm van der Heijden and Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPCTRL_H_ +#define _WX_HELPCTRL_H_ + +#include "wx/defs.h" + +#if wxUSE_WXHTML_HELP + +#include "wx/helpbase.h" +#include "wx/html/helpfrm.h" + +#define wxID_HTML_HELPFRAME (wxID_HIGHEST + 1) + +// This style indicates that the window is +// embedded in the application and must not be +// destroyed by the help controller. +#define wxHF_EMBEDDED 0x00008000 + +// Create a dialog for the help window. +#define wxHF_DIALOG 0x00010000 + +// Create a frame for the help window. +#define wxHF_FRAME 0x00020000 + +// Make the dialog modal when displaying help. +#define wxHF_MODAL 0x00040000 + +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpDialog; +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpWindow; +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpFrame; +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpDialog; + +class WXDLLIMPEXP_HTML wxHtmlHelpController : public wxHelpControllerBase // wxEvtHandler +{ + DECLARE_DYNAMIC_CLASS(wxHtmlHelpController) + +public: + wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE, wxWindow* parentWindow = NULL); + wxHtmlHelpController(wxWindow* parentWindow, int style = wxHF_DEFAULT_STYLE); + + virtual ~wxHtmlHelpController(); + + void SetShouldPreventAppExit(bool enable); + + void SetTitleFormat(const wxString& format); + void SetTempDir(const wxString& path) { m_helpData.SetTempDir(path); } + bool AddBook(const wxString& book_url, bool show_wait_msg = false); + bool AddBook(const wxFileName& book_file, bool show_wait_msg = false); + + bool Display(const wxString& x); + bool Display(int id); + bool DisplayContents(); + bool DisplayIndex(); + bool KeywordSearch(const wxString& keyword, + wxHelpSearchMode mode = wxHELP_SEARCH_ALL); + + wxHtmlHelpWindow* GetHelpWindow() { return m_helpWindow; } + void SetHelpWindow(wxHtmlHelpWindow* helpWindow); + + wxHtmlHelpFrame* GetFrame() { return m_helpFrame; } + wxHtmlHelpDialog* GetDialog() { return m_helpDialog; } + +#if wxUSE_CONFIG + void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString); + + // Assigns config object to the Ctrl. This config is then + // used in subsequent calls to Read/WriteCustomization of both help + // Ctrl and it's wxHtmlWindow + virtual void ReadCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString); + virtual void WriteCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString); +#endif // wxUSE_CONFIG + + //// Backward compatibility with wxHelpController API + + virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize(file); } + virtual bool Initialize(const wxString& file); + virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {} + virtual bool LoadFile(const wxString& file = wxT("")); + virtual bool DisplaySection(int sectionNo); + virtual bool DisplaySection(const wxString& section) { return Display(section); } + virtual bool DisplayBlock(long blockNo) { return DisplaySection(blockNo); } + virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos); + + virtual void SetFrameParameters(const wxString& titleFormat, + const wxSize& size, + const wxPoint& pos = wxDefaultPosition, + bool newFrameEachTime = false); + /// Obtains the latest settings used by the help frame and the help + /// frame. + virtual wxFrame *GetFrameParameters(wxSize *size = NULL, + wxPoint *pos = NULL, + bool *newFrameEachTime = NULL); + + // Get direct access to help data: + wxHtmlHelpData *GetHelpData() { return &m_helpData; } + + virtual bool Quit() ; + virtual void OnQuit() {} + + void OnCloseFrame(wxCloseEvent& evt); + + // Make the help controller's frame 'modal' if + // needed + void MakeModalIfNeeded(); + + // Find the top-most parent window + wxWindow* FindTopLevelWindow(); + +protected: + void Init(int style); + + virtual wxWindow* CreateHelpWindow(); + virtual wxHtmlHelpFrame* CreateHelpFrame(wxHtmlHelpData *data); + virtual wxHtmlHelpDialog* CreateHelpDialog(wxHtmlHelpData *data); + virtual void DestroyHelpWindow(); + + wxHtmlHelpData m_helpData; + wxHtmlHelpWindow* m_helpWindow; +#if wxUSE_CONFIG + wxConfigBase * m_Config; + wxString m_ConfigRoot; +#endif // wxUSE_CONFIG + wxString m_titleFormat; + int m_FrameStyle; + wxHtmlHelpFrame* m_helpFrame; + wxHtmlHelpDialog* m_helpDialog; + + bool m_shouldPreventAppExit; + + wxDECLARE_NO_COPY_CLASS(wxHtmlHelpController); +}; + +/* + * wxHtmlModalHelp + * A convenience class particularly for use on wxMac, + * where you can only show modal dialogs from a modal + * dialog. + * + * Use like this: + * + * wxHtmlModalHelp help(parent, filename, topic); + * + * If topic is empty, the help contents is displayed. + */ + +class WXDLLIMPEXP_HTML wxHtmlModalHelp +{ +public: + wxHtmlModalHelp(wxWindow* parent, const wxString& helpFile, const wxString& topic = wxEmptyString, + int style = wxHF_DEFAULT_STYLE | wxHF_DIALOG | wxHF_MODAL); +}; + +#endif // wxUSE_WXHTML_HELP + +#endif // _WX_HELPCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpdata.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpdata.h new file mode 100644 index 0000000000..5b4480379b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpdata.h @@ -0,0 +1,222 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/helpdata.h +// Purpose: wxHtmlHelpData +// Notes: Based on htmlhelp.cpp, implementing a monolithic +// HTML Help controller class, by Vaclav Slavik +// Author: Harm van der Heijden and Vaclav Slavik +// Copyright: (c) Harm van der Heijden and Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPDATA_H_ +#define _WX_HELPDATA_H_ + +#include "wx/defs.h" + +#if wxUSE_HTML + +#include "wx/object.h" +#include "wx/string.h" +#include "wx/filesys.h" +#include "wx/dynarray.h" +#include "wx/font.h" + +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpData; + +//-------------------------------------------------------------------------------- +// helper classes & structs +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlBookRecord +{ +public: + wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath, + const wxString& title, const wxString& start) + { + m_BookFile = bookfile; + m_BasePath = basepath; + m_Title = title; + m_Start = start; + // for debugging, give the contents index obvious default values + m_ContentsStart = m_ContentsEnd = -1; + } + wxString GetBookFile() const { return m_BookFile; } + wxString GetTitle() const { return m_Title; } + wxString GetStart() const { return m_Start; } + wxString GetBasePath() const { return m_BasePath; } + /* SetContentsRange: store in the bookrecord where in the index/contents lists the + * book's records are stored. This to facilitate searching in a specific book. + * This code will have to be revised when loading/removing books becomes dynamic. + * (as opposed to appending only) + * Note that storing index range is pointless, because the index is alphab. sorted. */ + void SetContentsRange(int start, int end) { m_ContentsStart = start; m_ContentsEnd = end; } + int GetContentsStart() const { return m_ContentsStart; } + int GetContentsEnd() const { return m_ContentsEnd; } + + void SetTitle(const wxString& title) { m_Title = title; } + void SetBasePath(const wxString& path) { m_BasePath = path; } + void SetStart(const wxString& start) { m_Start = start; } + + // returns full filename of page (which is part of the book), + // i.e. with book's basePath prepended. If page is already absolute + // path, basePath is _not_ prepended. + wxString GetFullPath(const wxString &page) const; + +protected: + wxString m_BookFile; + wxString m_BasePath; + wxString m_Title; + wxString m_Start; + int m_ContentsStart; + int m_ContentsEnd; +}; + + +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxHtmlBookRecord, wxHtmlBookRecArray, + WXDLLIMPEXP_HTML); + +struct WXDLLIMPEXP_HTML wxHtmlHelpDataItem +{ + wxHtmlHelpDataItem() : level(0), parent(NULL), id(wxID_ANY), book(NULL) {} + + int level; + wxHtmlHelpDataItem *parent; + int id; + wxString name; + wxString page; + wxHtmlBookRecord *book; + + // returns full filename of m_Page, i.e. with book's basePath prepended + wxString GetFullPath() const { return book->GetFullPath(page); } + + // returns item indented with spaces if it has level>1: + wxString GetIndentedName() const; +}; + +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxHtmlHelpDataItem, wxHtmlHelpDataItems, + WXDLLIMPEXP_HTML); + + +//------------------------------------------------------------------------------ +// wxHtmlSearchEngine +// This class takes input streams and scans them for occurrence +// of keyword(s) +//------------------------------------------------------------------------------ + +class WXDLLIMPEXP_HTML wxHtmlSearchEngine : public wxObject +{ +public: + wxHtmlSearchEngine() : wxObject() {} + virtual ~wxHtmlSearchEngine() {} + + // Sets the keyword we will be searching for + virtual void LookFor(const wxString& keyword, bool case_sensitive, bool whole_words_only); + + // Scans the stream for the keyword. + // Returns true if the stream contains keyword, fALSE otherwise + virtual bool Scan(const wxFSFile& file); + +private: + wxString m_Keyword; + bool m_CaseSensitive; + bool m_WholeWords; + + wxDECLARE_NO_COPY_CLASS(wxHtmlSearchEngine); +}; + + +// State information of a search action. I'd have preferred to make this a +// nested class inside wxHtmlHelpData, but that's against coding standards :-( +// Never construct this class yourself, obtain a copy from +// wxHtmlHelpData::PrepareKeywordSearch(const wxString& key) +class WXDLLIMPEXP_HTML wxHtmlSearchStatus +{ +public: + // constructor; supply wxHtmlHelpData ptr, the keyword and (optionally) the + // title of the book to search. By default, all books are searched. + wxHtmlSearchStatus(wxHtmlHelpData* base, const wxString& keyword, + bool case_sensitive, bool whole_words_only, + const wxString& book = wxEmptyString); + bool Search(); // do the next iteration + bool IsActive() { return m_Active; } + int GetCurIndex() { return m_CurIndex; } + int GetMaxIndex() { return m_MaxIndex; } + const wxString& GetName() { return m_Name; } + + const wxHtmlHelpDataItem *GetCurItem() const { return m_CurItem; } + +private: + wxHtmlHelpData* m_Data; + wxHtmlSearchEngine m_Engine; + wxString m_Keyword, m_Name; + wxString m_LastPage; + wxHtmlHelpDataItem* m_CurItem; + bool m_Active; // search is not finished + int m_CurIndex; // where we are now + int m_MaxIndex; // number of files we search + // For progress bar: 100*curindex/maxindex = % complete + + wxDECLARE_NO_COPY_CLASS(wxHtmlSearchStatus); +}; + +class WXDLLIMPEXP_HTML wxHtmlHelpData : public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxHtmlHelpData) + friend class wxHtmlSearchStatus; + +public: + wxHtmlHelpData(); + virtual ~wxHtmlHelpData(); + + // Sets directory where temporary files are stored. + // These temp files are index & contents file in binary (much faster to read) + // form. These files are NOT deleted on program's exit. + void SetTempDir(const wxString& path); + + // Adds new book. 'book' is location of .htb file (stands for "html book"). + // See documentation for details on its format. + // Returns success. + bool AddBook(const wxString& book); + bool AddBookParam(const wxFSFile& bookfile, + wxFontEncoding encoding, + const wxString& title, const wxString& contfile, + const wxString& indexfile = wxEmptyString, + const wxString& deftopic = wxEmptyString, + const wxString& path = wxEmptyString); + + // Some accessing stuff: + + // returns URL of page on basis of (file)name + wxString FindPageByName(const wxString& page); + // returns URL of page on basis of MS id + wxString FindPageById(int id); + + const wxHtmlBookRecArray& GetBookRecArray() const { return m_bookRecords; } + + const wxHtmlHelpDataItems& GetContentsArray() const { return m_contents; } + const wxHtmlHelpDataItems& GetIndexArray() const { return m_index; } + +protected: + wxString m_tempPath; + + // each book has one record in this array: + wxHtmlBookRecArray m_bookRecords; + + wxHtmlHelpDataItems m_contents; // list of all available books and pages + wxHtmlHelpDataItems m_index; // list of index itesm + +protected: + // Imports .hhp files (MS HTML Help Workshop) + bool LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys, + const wxString& indexfile, const wxString& contentsfile); + // Reads binary book + bool LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f); + // Writes binary book + bool SaveCachedBook(wxHtmlBookRecord *book, wxOutputStream *f); + + wxDECLARE_NO_COPY_CLASS(wxHtmlHelpData); +}; + +#endif + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpdlg.h new file mode 100644 index 0000000000..fd86b2e3f3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpdlg.h @@ -0,0 +1,89 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/helpdlg.h +// Purpose: wxHtmlHelpDialog +// Notes: Based on htmlhelp.cpp, implementing a monolithic +// HTML Help controller class, by Vaclav Slavik +// Author: Harm van der Heijden, Vaclav Slavik, Julian Smart +// Copyright: (c) Harm van der Heijden, Vaclav Slavik, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPDLG_H_ +#define _WX_HELPDLG_H_ + +#include "wx/defs.h" + +#if wxUSE_WXHTML_HELP + +#include "wx/html/helpdata.h" +#include "wx/window.h" +#include "wx/dialog.h" +#include "wx/frame.h" +#include "wx/config.h" +#include "wx/splitter.h" +#include "wx/notebook.h" +#include "wx/listbox.h" +#include "wx/choice.h" +#include "wx/combobox.h" +#include "wx/checkbox.h" +#include "wx/stattext.h" +#include "wx/html/htmlwin.h" +#include "wx/html/helpwnd.h" +#include "wx/html/htmprint.h" + +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpController; +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpWindow; + +class WXDLLIMPEXP_HTML wxHtmlHelpDialog : public wxDialog +{ + DECLARE_DYNAMIC_CLASS(wxHtmlHelpDialog) + +public: + wxHtmlHelpDialog(wxHtmlHelpData* data = NULL) { Init(data); } + wxHtmlHelpDialog(wxWindow* parent, wxWindowID wxWindowID, + const wxString& title = wxEmptyString, + int style = wxHF_DEFAULT_STYLE, wxHtmlHelpData* data = NULL); + virtual ~wxHtmlHelpDialog(); + + bool Create(wxWindow* parent, wxWindowID id, const wxString& title = wxEmptyString, + int style = wxHF_DEFAULT_STYLE); + + /// Returns the data associated with this dialog. + wxHtmlHelpData* GetData() { return m_Data; } + + /// Returns the controller that created this dialog. + wxHtmlHelpController* GetController() const { return m_helpController; } + + /// Sets the controller associated with this dialog. + void SetController(wxHtmlHelpController* controller) { m_helpController = controller; } + + /// Returns the help window. + wxHtmlHelpWindow* GetHelpWindow() const { return m_HtmlHelpWin; } + + // Sets format of title of the frame. Must contain exactly one "%s" + // (for title of displayed HTML page) + void SetTitleFormat(const wxString& format); + + // Override to add custom buttons to the toolbar + virtual void AddToolbarButtons(wxToolBar* WXUNUSED(toolBar), int WXUNUSED(style)) {} + +protected: + void Init(wxHtmlHelpData* data = NULL); + + void OnCloseWindow(wxCloseEvent& event); + +protected: + // Temporary pointer to pass to window + wxHtmlHelpData* m_Data; + wxString m_TitleFormat; // title of the help frame + wxHtmlHelpWindow *m_HtmlHelpWin; + wxHtmlHelpController* m_helpController; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxHtmlHelpDialog); +}; + +#endif + // wxUSE_WXHTML_HELP + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpfrm.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpfrm.h new file mode 100644 index 0000000000..89225eb27b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpfrm.h @@ -0,0 +1,157 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/helpfrm.h +// Purpose: wxHtmlHelpFrame +// Notes: Based on htmlhelp.cpp, implementing a monolithic +// HTML Help controller class, by Vaclav Slavik +// Author: Harm van der Heijden and Vaclav Slavik +// Copyright: (c) Harm van der Heijden and Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPFRM_H_ +#define _WX_HELPFRM_H_ + +#include "wx/defs.h" + +#if wxUSE_WXHTML_HELP + +#include "wx/helpbase.h" +#include "wx/html/helpdata.h" +#include "wx/window.h" +#include "wx/frame.h" +#include "wx/config.h" +#include "wx/splitter.h" +#include "wx/notebook.h" +#include "wx/listbox.h" +#include "wx/choice.h" +#include "wx/combobox.h" +#include "wx/checkbox.h" +#include "wx/stattext.h" +#include "wx/html/htmlwin.h" +#include "wx/html/helpwnd.h" +#include "wx/html/htmprint.h" + +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxTreeEvent; +class WXDLLIMPEXP_FWD_CORE wxTreeCtrl; + + +// style flags for the Help Frame +#define wxHF_TOOLBAR 0x0001 +#define wxHF_CONTENTS 0x0002 +#define wxHF_INDEX 0x0004 +#define wxHF_SEARCH 0x0008 +#define wxHF_BOOKMARKS 0x0010 +#define wxHF_OPEN_FILES 0x0020 +#define wxHF_PRINT 0x0040 +#define wxHF_FLAT_TOOLBAR 0x0080 +#define wxHF_MERGE_BOOKS 0x0100 +#define wxHF_ICONS_BOOK 0x0200 +#define wxHF_ICONS_BOOK_CHAPTER 0x0400 +#define wxHF_ICONS_FOLDER 0x0000 // this is 0 since it is default +#define wxHF_DEFAULT_STYLE (wxHF_TOOLBAR | wxHF_CONTENTS | \ + wxHF_INDEX | wxHF_SEARCH | \ + wxHF_BOOKMARKS | wxHF_PRINT) +//compatibility: +#define wxHF_OPENFILES wxHF_OPEN_FILES +#define wxHF_FLATTOOLBAR wxHF_FLAT_TOOLBAR +#define wxHF_DEFAULTSTYLE wxHF_DEFAULT_STYLE + +struct wxHtmlHelpMergedIndexItem; +class wxHtmlHelpMergedIndex; + +class WXDLLIMPEXP_FWD_CORE wxHelpControllerBase; +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpController; +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpWindow; + +class WXDLLIMPEXP_HTML wxHtmlHelpFrame : public wxFrame +{ + DECLARE_DYNAMIC_CLASS(wxHtmlHelpFrame) + +public: + wxHtmlHelpFrame(wxHtmlHelpData* data = NULL) { Init(data); } + wxHtmlHelpFrame(wxWindow* parent, wxWindowID wxWindowID, + const wxString& title = wxEmptyString, + int style = wxHF_DEFAULT_STYLE, wxHtmlHelpData* data = NULL +#if wxUSE_CONFIG + , wxConfigBase *config=NULL, const wxString& rootpath = wxEmptyString +#endif // wxUSE_CONFIG + ); + bool Create(wxWindow* parent, wxWindowID id, const wxString& title = wxEmptyString, + int style = wxHF_DEFAULT_STYLE +#if wxUSE_CONFIG + , wxConfigBase *config=NULL, const wxString& rootpath = wxEmptyString +#endif // wxUSE_CONFIG + ); + virtual ~wxHtmlHelpFrame(); + + /// Returns the data associated with the window. + wxHtmlHelpData* GetData() { return m_Data; } + + /// Returns the help controller associated with the window. + wxHtmlHelpController* GetController() const { return m_helpController; } + + /// Sets the help controller associated with the window. + void SetController(wxHtmlHelpController* controller); + + /// Returns the help window. + wxHtmlHelpWindow* GetHelpWindow() const { return m_HtmlHelpWin; } + + // Sets format of title of the frame. Must contain exactly one "%s" + // (for title of displayed HTML page) + void SetTitleFormat(const wxString& format); + +#if wxUSE_CONFIG + // For compatibility + void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString); +#endif // wxUSE_CONFIG + + // Make the help controller's frame 'modal' if + // needed + void AddGrabIfNeeded(); + + // Override to add custom buttons to the toolbar + virtual void AddToolbarButtons(wxToolBar* WXUNUSED(toolBar), int WXUNUSED(style)) {} + + void SetShouldPreventAppExit(bool enable); + + // we don't want to prevent the app from closing just because a help window + // remains opened + virtual bool ShouldPreventAppExit() const { return m_shouldPreventAppExit; } + +protected: + void Init(wxHtmlHelpData* data = NULL); + + void OnCloseWindow(wxCloseEvent& event); + void OnActivate(wxActivateEvent& event); + +#ifdef __WXMAC__ + void OnClose(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); +#endif + + // Images: + enum { + IMG_Book = 0, + IMG_Folder, + IMG_Page + }; + +protected: + wxHtmlHelpData* m_Data; + bool m_DataCreated; // m_Data created by frame, or supplied? + wxString m_TitleFormat; // title of the help frame + wxHtmlHelpWindow *m_HtmlHelpWin; + wxHtmlHelpController* m_helpController; + bool m_shouldPreventAppExit; + +private: + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxHtmlHelpFrame); +}; + +#endif // wxUSE_WXHTML_HELP + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpwnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpwnd.h new file mode 100644 index 0000000000..803c0da14b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/helpwnd.h @@ -0,0 +1,304 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/helpwnd.h +// Purpose: wxHtmlHelpWindow +// Notes: Based on htmlhelp.cpp, implementing a monolithic +// HTML Help controller class, by Vaclav Slavik +// Author: Harm van der Heijden and Vaclav Slavik +// Copyright: (c) Harm van der Heijden and Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPWND_H_ +#define _WX_HELPWND_H_ + +#include "wx/defs.h" + +#if wxUSE_WXHTML_HELP + +#include "wx/helpbase.h" +#include "wx/html/helpdata.h" +#include "wx/window.h" +#include "wx/frame.h" +#include "wx/config.h" +#include "wx/splitter.h" +#include "wx/notebook.h" +#include "wx/listbox.h" +#include "wx/choice.h" +#include "wx/combobox.h" +#include "wx/checkbox.h" +#include "wx/stattext.h" +#include "wx/hash.h" +#include "wx/html/htmlwin.h" +#include "wx/html/htmprint.h" + +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxTreeEvent; +class WXDLLIMPEXP_FWD_CORE wxTreeCtrl; + +// style flags for the Help Frame +#define wxHF_TOOLBAR 0x0001 +#define wxHF_CONTENTS 0x0002 +#define wxHF_INDEX 0x0004 +#define wxHF_SEARCH 0x0008 +#define wxHF_BOOKMARKS 0x0010 +#define wxHF_OPEN_FILES 0x0020 +#define wxHF_PRINT 0x0040 +#define wxHF_FLAT_TOOLBAR 0x0080 +#define wxHF_MERGE_BOOKS 0x0100 +#define wxHF_ICONS_BOOK 0x0200 +#define wxHF_ICONS_BOOK_CHAPTER 0x0400 +#define wxHF_ICONS_FOLDER 0x0000 // this is 0 since it is default +#define wxHF_DEFAULT_STYLE (wxHF_TOOLBAR | wxHF_CONTENTS | \ + wxHF_INDEX | wxHF_SEARCH | \ + wxHF_BOOKMARKS | wxHF_PRINT) +//compatibility: +#define wxHF_OPENFILES wxHF_OPEN_FILES +#define wxHF_FLATTOOLBAR wxHF_FLAT_TOOLBAR +#define wxHF_DEFAULTSTYLE wxHF_DEFAULT_STYLE + +struct wxHtmlHelpFrameCfg +{ + int x, y, w, h; + long sashpos; + bool navig_on; +}; + +struct wxHtmlHelpMergedIndexItem; +class wxHtmlHelpMergedIndex; + +class WXDLLIMPEXP_FWD_CORE wxHelpControllerBase; +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpController; + +/*! + * Help window + */ + +class WXDLLIMPEXP_HTML wxHtmlHelpWindow : public wxWindow +{ + DECLARE_DYNAMIC_CLASS(wxHtmlHelpWindow) + +public: + wxHtmlHelpWindow(wxHtmlHelpData* data = NULL) { Init(data); } + wxHtmlHelpWindow(wxWindow* parent, wxWindowID wxWindowID, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int style = wxTAB_TRAVERSAL|wxNO_BORDER, + int helpStyle = wxHF_DEFAULT_STYLE, + wxHtmlHelpData* data = NULL); + bool Create(wxWindow* parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int style = wxTAB_TRAVERSAL|wxNO_BORDER, + int helpStyle = wxHF_DEFAULT_STYLE); + virtual ~wxHtmlHelpWindow(); + + wxHtmlHelpData* GetData() { return m_Data; } + wxHtmlHelpController* GetController() const { return m_helpController; } + void SetController(wxHtmlHelpController* controller); + + // Displays page x. If not found it will offect the user a choice of + // searching books. + // Looking for the page runs in these steps: + // 1. try to locate file named x (if x is for example "doc/howto.htm") + // 2. try to open starting page of book x + // 3. try to find x in contents (if x is for example "How To ...") + // 4. try to find x in index (if x is for example "How To ...") + bool Display(const wxString& x); + + // Alternative version that works with numeric ID. + // (uses extension to MS format, , see docs) + bool Display(const int id); + + // Displays help window and focuses contents. + bool DisplayContents(); + + // Displays help window and focuses index. + bool DisplayIndex(); + + // Searches for keyword. Returns true and display page if found, return + // false otherwise + // Syntax of keyword is Altavista-like: + // * words are separated by spaces + // (but "\"hello world\"" is only one world "hello world") + // * word may be pretended by + or - + // (+ : page must contain the word ; - : page can't contain the word) + // * if there is no + or - before the word, + is default + bool KeywordSearch(const wxString& keyword, + wxHelpSearchMode mode = wxHELP_SEARCH_ALL); + +#if wxUSE_CONFIG + void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString) + { + m_Config = config; + m_ConfigRoot = rootpath; + ReadCustomization(config, rootpath); + } + + // Saves custom settings into cfg config. it will use the path 'path' + // if given, otherwise it will save info into currently selected path. + // saved values : things set by SetFonts, SetBorders. + void ReadCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString); + void WriteCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString); +#endif // wxUSE_CONFIG + + // call this to let wxHtmlHelpWindow know page changed + void NotifyPageChanged(); + + // Refreshes Contents and Index tabs + void RefreshLists(); + + // Gets the HTML window + wxHtmlWindow* GetHtmlWindow() const { return m_HtmlWin; } + + // Gets the splitter window + wxSplitterWindow* GetSplitterWindow() const { return m_Splitter; } + + // Gets the toolbar + wxToolBar* GetToolBar() const { return m_toolBar; } + + // Gets the configuration data + wxHtmlHelpFrameCfg& GetCfgData() { return m_Cfg; } + + // Gets the tree control + wxTreeCtrl *GetTreeCtrl() const { return m_ContentsBox; } + +protected: + void Init(wxHtmlHelpData* data = NULL); + + // Adds items to m_Contents tree control + void CreateContents(); + + // Adds items to m_IndexList + void CreateIndex(); + + // Add books to search choice panel + void CreateSearch(); + + // Updates "merged index" structure that combines indexes of all books + // into better searchable structure + void UpdateMergedIndex(); + + // Add custom buttons to toolbar + virtual void AddToolbarButtons(wxToolBar *toolBar, int style); + + // Displays options dialog (fonts etc.) + virtual void OptionsDialog(); + + void OnToolbar(wxCommandEvent& event); + void OnContentsSel(wxTreeEvent& event); + void OnIndexSel(wxCommandEvent& event); + void OnIndexFind(wxCommandEvent& event); + void OnIndexAll(wxCommandEvent& event); + void OnSearchSel(wxCommandEvent& event); + void OnSearch(wxCommandEvent& event); + void OnBookmarksSel(wxCommandEvent& event); + void OnSize(wxSizeEvent& event); + + // Images: + enum { + IMG_Book = 0, + IMG_Folder, + IMG_Page + }; + +protected: + wxHtmlHelpData* m_Data; + bool m_DataCreated; // m_Data created by frame, or supplied? + wxString m_TitleFormat; // title of the help frame + // below are various pointers to GUI components + wxHtmlWindow *m_HtmlWin; + wxSplitterWindow *m_Splitter; + wxPanel *m_NavigPan; + wxNotebook *m_NavigNotebook; + wxTreeCtrl *m_ContentsBox; + wxTextCtrl *m_IndexText; + wxButton *m_IndexButton; + wxButton *m_IndexButtonAll; + wxListBox *m_IndexList; + wxTextCtrl *m_SearchText; + wxButton *m_SearchButton; + wxListBox *m_SearchList; + wxChoice *m_SearchChoice; + wxStaticText *m_IndexCountInfo; + wxCheckBox *m_SearchCaseSensitive; + wxCheckBox *m_SearchWholeWords; + wxToolBar* m_toolBar; + + wxComboBox *m_Bookmarks; + wxArrayString m_BookmarksNames, m_BookmarksPages; + + wxHtmlHelpFrameCfg m_Cfg; + +#if wxUSE_CONFIG + wxConfigBase *m_Config; + wxString m_ConfigRoot; +#endif // wxUSE_CONFIG + + // pagenumbers of controls in notebook (usually 0,1,2) + int m_ContentsPage; + int m_IndexPage; + int m_SearchPage; + + // lists of available fonts (used in options dialog) + wxArrayString *m_NormalFonts, *m_FixedFonts; + int m_FontSize; // 0,1,2 = small,medium,big + wxString m_NormalFace, m_FixedFace; + + bool m_UpdateContents; + +#if wxUSE_PRINTING_ARCHITECTURE + wxHtmlEasyPrinting *m_Printer; +#endif + wxHashTable *m_PagesHash; + wxHtmlHelpController* m_helpController; + + int m_hfStyle; + +private: + void DoIndexFind(); + void DoIndexAll(); + void DisplayIndexItem(const wxHtmlHelpMergedIndexItem *it); + wxHtmlHelpMergedIndex *m_mergedIndex; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxHtmlHelpWindow); +}; + +/*! + * Command IDs + */ + +enum +{ + //wxID_HTML_HELPFRAME = wxID_HIGHEST + 1, + wxID_HTML_PANEL = wxID_HIGHEST + 10, + wxID_HTML_BACK, + wxID_HTML_FORWARD, + wxID_HTML_UPNODE, + wxID_HTML_UP, + wxID_HTML_DOWN, + wxID_HTML_PRINT, + wxID_HTML_OPENFILE, + wxID_HTML_OPTIONS, + wxID_HTML_BOOKMARKSLIST, + wxID_HTML_BOOKMARKSADD, + wxID_HTML_BOOKMARKSREMOVE, + wxID_HTML_TREECTRL, + wxID_HTML_INDEXPAGE, + wxID_HTML_INDEXLIST, + wxID_HTML_INDEXTEXT, + wxID_HTML_INDEXBUTTON, + wxID_HTML_INDEXBUTTONALL, + wxID_HTML_NOTEBOOK, + wxID_HTML_SEARCHPAGE, + wxID_HTML_SEARCHTEXT, + wxID_HTML_SEARCHLIST, + wxID_HTML_SEARCHBUTTON, + wxID_HTML_SEARCHCHOICE, + wxID_HTML_COUNTINFO +}; + +#endif // wxUSE_WXHTML_HELP + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlcell.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlcell.h new file mode 100644 index 0000000000..7f40f94ed5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlcell.h @@ -0,0 +1,709 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/htmlcell.h +// Purpose: wxHtmlCell class is used by wxHtmlWindow/wxHtmlWinParser +// as a basic visual element of HTML page +// Author: Vaclav Slavik +// Copyright: (c) 1999-2003 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HTMLCELL_H_ +#define _WX_HTMLCELL_H_ + +#include "wx/defs.h" + +#if wxUSE_HTML + +#include "wx/html/htmltag.h" +#include "wx/html/htmldefs.h" +#include "wx/window.h" + + +class WXDLLIMPEXP_FWD_HTML wxHtmlWindowInterface; +class WXDLLIMPEXP_FWD_HTML wxHtmlLinkInfo; +class WXDLLIMPEXP_FWD_HTML wxHtmlCell; +class WXDLLIMPEXP_FWD_HTML wxHtmlContainerCell; + + +// wxHtmlSelection is data holder with information about text selection. +// Selection is defined by two positions (beginning and end of the selection) +// and two leaf(!) cells at these positions. +class WXDLLIMPEXP_HTML wxHtmlSelection +{ +public: + wxHtmlSelection() + : m_fromPos(wxDefaultPosition), m_toPos(wxDefaultPosition), + m_fromCharacterPos(-1), m_toCharacterPos(-1), + m_fromCell(NULL), m_toCell(NULL) {} + + // this version is used for the user selection defined with the mouse + void Set(const wxPoint& fromPos, const wxHtmlCell *fromCell, + const wxPoint& toPos, const wxHtmlCell *toCell); + void Set(const wxHtmlCell *fromCell, const wxHtmlCell *toCell); + + const wxHtmlCell *GetFromCell() const { return m_fromCell; } + const wxHtmlCell *GetToCell() const { return m_toCell; } + + // these values are in absolute coordinates: + const wxPoint& GetFromPos() const { return m_fromPos; } + const wxPoint& GetToPos() const { return m_toPos; } + + // these are From/ToCell's private data + void ClearFromToCharacterPos() { m_toCharacterPos = m_fromCharacterPos = -1; } + bool AreFromToCharacterPosSet() const { return m_toCharacterPos != -1 && m_fromCharacterPos != -1; } + + void SetFromCharacterPos (wxCoord pos) { m_fromCharacterPos = pos; } + void SetToCharacterPos (wxCoord pos) { m_toCharacterPos = pos; } + wxCoord GetFromCharacterPos () const { return m_fromCharacterPos; } + wxCoord GetToCharacterPos () const { return m_toCharacterPos; } + + bool IsEmpty() const + { return m_fromPos == wxDefaultPosition && + m_toPos == wxDefaultPosition; } + +private: + wxPoint m_fromPos, m_toPos; + wxCoord m_fromCharacterPos, m_toCharacterPos; + const wxHtmlCell *m_fromCell, *m_toCell; +}; + + + +enum wxHtmlSelectionState +{ + wxHTML_SEL_OUT, // currently rendered cell is outside the selection + wxHTML_SEL_IN, // ... is inside selection + wxHTML_SEL_CHANGING // ... is the cell on which selection state changes +}; + +// Selection state is passed to wxHtmlCell::Draw so that it can render itself +// differently e.g. when inside text selection or outside it. +class WXDLLIMPEXP_HTML wxHtmlRenderingState +{ +public: + wxHtmlRenderingState() : m_selState(wxHTML_SEL_OUT) {} + + void SetSelectionState(wxHtmlSelectionState s) { m_selState = s; } + wxHtmlSelectionState GetSelectionState() const { return m_selState; } + + void SetFgColour(const wxColour& c) { m_fgColour = c; } + const wxColour& GetFgColour() const { return m_fgColour; } + void SetBgColour(const wxColour& c) { m_bgColour = c; } + const wxColour& GetBgColour() const { return m_bgColour; } + void SetBgMode(int m) { m_bgMode = m; } + int GetBgMode() const { return m_bgMode; } + +private: + wxHtmlSelectionState m_selState; + wxColour m_fgColour, m_bgColour; + int m_bgMode; +}; + + +// HTML rendering customization. This class is used when rendering wxHtmlCells +// as a callback: +class WXDLLIMPEXP_HTML wxHtmlRenderingStyle +{ +public: + virtual ~wxHtmlRenderingStyle() {} + virtual wxColour GetSelectedTextColour(const wxColour& clr) = 0; + virtual wxColour GetSelectedTextBgColour(const wxColour& clr) = 0; +}; + +// Standard style: +class WXDLLIMPEXP_HTML wxDefaultHtmlRenderingStyle : public wxHtmlRenderingStyle +{ +public: + virtual wxColour GetSelectedTextColour(const wxColour& clr); + virtual wxColour GetSelectedTextBgColour(const wxColour& clr); +}; + + +// Information given to cells when drawing them. Contains rendering state, +// selection information and rendering style object that can be used to +// customize the output. +class WXDLLIMPEXP_HTML wxHtmlRenderingInfo +{ +public: + wxHtmlRenderingInfo() : m_selection(NULL), m_style(NULL) {} + + void SetSelection(wxHtmlSelection *s) { m_selection = s; } + wxHtmlSelection *GetSelection() const { return m_selection; } + + void SetStyle(wxHtmlRenderingStyle *style) { m_style = style; } + wxHtmlRenderingStyle& GetStyle() { return *m_style; } + + wxHtmlRenderingState& GetState() { return m_state; } + +protected: + wxHtmlSelection *m_selection; + wxHtmlRenderingStyle *m_style; + wxHtmlRenderingState m_state; +}; + + +// Flags for wxHtmlCell::FindCellByPos +enum +{ + wxHTML_FIND_EXACT = 1, + wxHTML_FIND_NEAREST_BEFORE = 2, + wxHTML_FIND_NEAREST_AFTER = 4 +}; + + +// Superscript/subscript/normal script mode of a cell +enum wxHtmlScriptMode +{ + wxHTML_SCRIPT_NORMAL, + wxHTML_SCRIPT_SUB, + wxHTML_SCRIPT_SUP +}; + + +// --------------------------------------------------------------------------- +// wxHtmlCell +// Internal data structure. It represents fragments of parsed +// HTML page - a word, picture, table, horizontal line and so +// on. It is used by wxHtmlWindow to represent HTML page in +// memory. +// --------------------------------------------------------------------------- + + +class WXDLLIMPEXP_HTML wxHtmlCell : public wxObject +{ +public: + wxHtmlCell(); + virtual ~wxHtmlCell(); + + void SetParent(wxHtmlContainerCell *p) {m_Parent = p;} + wxHtmlContainerCell *GetParent() const {return m_Parent;} + + int GetPosX() const {return m_PosX;} + int GetPosY() const {return m_PosY;} + int GetWidth() const {return m_Width;} + + // Returns the maximum possible length of the cell. + // Call Layout at least once before using GetMaxTotalWidth() + virtual int GetMaxTotalWidth() const { return m_Width; } + + int GetHeight() const {return m_Height;} + int GetDescent() const {return m_Descent;} + + void SetScriptMode(wxHtmlScriptMode mode, long previousBase); + wxHtmlScriptMode GetScriptMode() const { return m_ScriptMode; } + long GetScriptBaseline() { return m_ScriptBaseline; } + + // Formatting cells are not visible on the screen, they only alter + // renderer's state. + bool IsFormattingCell() const { return m_Width == 0 && m_Height == 0; } + + const wxString& GetId() const { return m_id; } + void SetId(const wxString& id) { m_id = id; } + + // returns the link associated with this cell. The position is position + // within the cell so it varies from 0 to m_Width, from 0 to m_Height + virtual wxHtmlLinkInfo* GetLink(int WXUNUSED(x) = 0, + int WXUNUSED(y) = 0) const + { return m_Link; } + + // Returns cursor to be used when mouse is over the cell, can be + // overridden by the derived classes to use a different cursor whenever the + // mouse is over this cell. + virtual wxCursor GetMouseCursor(wxHtmlWindowInterface *window) const; + + // Returns cursor to be used when mouse is over the given point, can be + // overridden if the cursor should change depending on where exactly inside + // the cell the mouse is. + virtual wxCursor GetMouseCursorAt(wxHtmlWindowInterface *window, + const wxPoint& relPos) const; + +#if WXWIN_COMPATIBILITY_2_6 + // this was replaced by GetMouseCursor, don't use in new code! + virtual wxCursor GetCursor() const; +#endif + + // return next cell among parent's cells + wxHtmlCell *GetNext() const {return m_Next;} + // returns first child cell (if there are any, i.e. if this is container): + virtual wxHtmlCell* GetFirstChild() const { return NULL; } + + // members writing methods + virtual void SetPos(int x, int y) {m_PosX = x, m_PosY = y;} + void SetLink(const wxHtmlLinkInfo& link); + void SetNext(wxHtmlCell *cell) {m_Next = cell;} + + // 1. adjust cell's width according to the fact that maximal possible width + // is w. (this has sense when working with horizontal lines, tables + // etc.) + // 2. prepare layout (=fill-in m_PosX, m_PosY (and sometime m_Height) + // members) = place items to fit window, according to the width w + virtual void Layout(int w); + + // renders the cell + virtual void Draw(wxDC& WXUNUSED(dc), + int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(view_y1), int WXUNUSED(view_y2), + wxHtmlRenderingInfo& WXUNUSED(info)) {} + + // proceed drawing actions in case the cell is not visible (scrolled out of + // screen). This is needed to change fonts, colors and so on. + virtual void DrawInvisible(wxDC& WXUNUSED(dc), + int WXUNUSED(x), int WXUNUSED(y), + wxHtmlRenderingInfo& WXUNUSED(info)) {} + + // This method returns pointer to the FIRST cell for that + // the condition + // is true. It first checks if the condition is true for this + // cell and then calls m_Next->Find(). (Note: it checks + // all subcells if the cell is container) + // Condition is unique condition identifier (see htmldefs.h) + // (user-defined condition IDs should start from 10000) + // and param is optional parameter + // Example : m_Cell->Find(wxHTML_COND_ISANCHOR, "news"); + // returns pointer to anchor news + virtual const wxHtmlCell* Find(int condition, const void* param) const; + + + // This function is called when mouse button is clicked over the cell. + // Returns true if a link is clicked, false otherwise. + // + // 'window' is pointer to wxHtmlWindowInterface of the window which + // generated the event. + // HINT: if this handling is not enough for you you should use + // wxHtmlWidgetCell + virtual bool ProcessMouseClick(wxHtmlWindowInterface *window, + const wxPoint& pos, + const wxMouseEvent& event); + +#if WXWIN_COMPATIBILITY_2_6 + // this was replaced by ProcessMouseClick, don't use in new code! + virtual void OnMouseClick(wxWindow *window, + int x, int y, const wxMouseEvent& event); +#endif + + // This method used to adjust pagebreak position. The parameter is variable + // that contains y-coordinate of page break (= horizontal line that should + // not be crossed by words, images etc.). If this cell cannot be divided + // into two pieces (each one on another page) then it moves the pagebreak + // few pixels up. + // + // Returned value : true if pagebreak was modified, false otherwise + // Usage : while (container->AdjustPagebreak(&p)) {} + virtual bool AdjustPagebreak(int *pagebreak, + const wxArrayInt& known_pagebreaks, + int pageHeight) const; + + // Sets cell's behaviour on pagebreaks (see AdjustPagebreak). Default + // is true - the cell can be split on two pages + // If there is no way to fit a cell in the current page size, the cell + // is always split, ignoring this setting. + void SetCanLiveOnPagebreak(bool can) { m_CanLiveOnPagebreak = can; } + + // Can the line be broken before this cell? + virtual bool IsLinebreakAllowed() const + { return !IsFormattingCell(); } + + // Returns true for simple == terminal cells, i.e. not composite ones. + // This if for internal usage only and may disappear in future versions! + virtual bool IsTerminalCell() const { return true; } + + // Find a cell inside this cell positioned at the given coordinates + // (relative to this's positions). Returns NULL if no such cell exists. + // The flag can be used to specify whether to look for terminal or + // nonterminal cells or both. In either case, returned cell is deepest + // cell in cells tree that contains [x,y]. + virtual wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y, + unsigned flags = wxHTML_FIND_EXACT) const; + + // Returns absolute position of the cell on HTML canvas. + // If rootCell is provided, then it's considered to be the root of the + // hierarchy and the returned value is relative to it. + wxPoint GetAbsPos(wxHtmlCell *rootCell = NULL) const; + + // Returns root cell of the hierarchy (i.e. grand-grand-...-parent that + // doesn't have a parent itself) + wxHtmlCell *GetRootCell() const; + + // Returns first (last) terminal cell inside this cell. It may return NULL, + // but it is rare -- only if there are no terminals in the tree. + virtual wxHtmlCell *GetFirstTerminal() const + { return wxConstCast(this, wxHtmlCell); } + virtual wxHtmlCell *GetLastTerminal() const + { return wxConstCast(this, wxHtmlCell); } + + // Returns cell's depth, i.e. how far under the root cell it is + // (if it is the root, depth is 0) + unsigned GetDepth() const; + + // Returns true if the cell appears before 'cell' in natural order of + // cells (= as they are read). If cell A is (grand)parent of cell B, + // then both A.IsBefore(B) and B.IsBefore(A) always return true. + bool IsBefore(wxHtmlCell *cell) const; + + // Converts the cell into text representation. If sel != NULL then + // only part of the cell inside the selection is converted. + virtual wxString ConvertToText(wxHtmlSelection *WXUNUSED(sel)) const + { return wxEmptyString; } + +protected: + // pointer to the next cell + wxHtmlCell *m_Next; + // pointer to parent cell + wxHtmlContainerCell *m_Parent; + + // dimensions of fragment (m_Descent is used to position text & images) + int m_Width, m_Height, m_Descent; + // position where the fragment is drawn: + int m_PosX, m_PosY; + + // superscript/subscript/normal: + wxHtmlScriptMode m_ScriptMode; + long m_ScriptBaseline; + + // destination address if this fragment is hypertext link, NULL otherwise + wxHtmlLinkInfo *m_Link; + // true if this cell can be placed on pagebreak, false otherwise + bool m_CanLiveOnPagebreak; + // unique identifier of the cell, generated from "id" property of tags + wxString m_id; + + DECLARE_ABSTRACT_CLASS(wxHtmlCell) + wxDECLARE_NO_COPY_CLASS(wxHtmlCell); +}; + + + + +// ---------------------------------------------------------------------------- +// Inherited cells: +// ---------------------------------------------------------------------------- + + +// ---------------------------------------------------------------------------- +// wxHtmlWordCell +// Single word in input stream. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlWordCell : public wxHtmlCell +{ +public: + wxHtmlWordCell(const wxString& word, const wxDC& dc); + void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, + wxHtmlRenderingInfo& info); + virtual wxCursor GetMouseCursor(wxHtmlWindowInterface *window) const; + virtual wxString ConvertToText(wxHtmlSelection *sel) const; + bool IsLinebreakAllowed() const { return m_allowLinebreak; } + + void SetPreviousWord(wxHtmlWordCell *cell); + +protected: + virtual wxString GetAllAsText() const + { return m_Word; } + virtual wxString GetPartAsText(int begin, int end) const + { return m_Word.Mid(begin, end - begin); } + + void SetSelectionPrivPos(const wxDC& dc, wxHtmlSelection *s) const; + void Split(const wxDC& dc, + const wxPoint& selFrom, const wxPoint& selTo, + unsigned& pos1, unsigned& pos2) const; + + wxString m_Word; + bool m_allowLinebreak; + + DECLARE_ABSTRACT_CLASS(wxHtmlWordCell) + wxDECLARE_NO_COPY_CLASS(wxHtmlWordCell); +}; + + +// wxHtmlWordCell specialization for storing text fragments with embedded +// '\t's; these differ from normal words in that the displayed text is +// different from the text copied to clipboard +class WXDLLIMPEXP_HTML wxHtmlWordWithTabsCell : public wxHtmlWordCell +{ +public: + wxHtmlWordWithTabsCell(const wxString& word, + const wxString& wordOrig, + size_t linepos, + const wxDC& dc) + : wxHtmlWordCell(word, dc), + m_wordOrig(wordOrig), + m_linepos(linepos) + {} + +protected: + virtual wxString GetAllAsText() const; + virtual wxString GetPartAsText(int begin, int end) const; + + wxString m_wordOrig; + size_t m_linepos; +}; + + +// Container contains other cells, thus forming tree structure of rendering +// elements. Basic code of layout algorithm is contained in this class. +class WXDLLIMPEXP_HTML wxHtmlContainerCell : public wxHtmlCell +{ +public: + wxHtmlContainerCell(wxHtmlContainerCell *parent); + virtual ~wxHtmlContainerCell(); + + virtual void Layout(int w); + virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, + wxHtmlRenderingInfo& info); + virtual void DrawInvisible(wxDC& dc, int x, int y, + wxHtmlRenderingInfo& info); + + virtual bool AdjustPagebreak(int *pagebreak, + const wxArrayInt& known_pagebreaks, + int pageHeight) const; + + // insert cell at the end of m_Cells list + void InsertCell(wxHtmlCell *cell); + + // sets horizontal/vertical alignment + void SetAlignHor(int al) {m_AlignHor = al; m_LastLayout = -1;} + int GetAlignHor() const {return m_AlignHor;} + void SetAlignVer(int al) {m_AlignVer = al; m_LastLayout = -1;} + int GetAlignVer() const {return m_AlignVer;} + + // sets left-border indentation. units is one of wxHTML_UNITS_* constants + // what is combination of wxHTML_INDENT_* + void SetIndent(int i, int what, int units = wxHTML_UNITS_PIXELS); + // returns the indentation. ind is one of wxHTML_INDENT_* constants + int GetIndent(int ind) const; + // returns type of value returned by GetIndent(ind) + int GetIndentUnits(int ind) const; + + // sets alignment info based on given tag's params + void SetAlign(const wxHtmlTag& tag); + // sets floating width adjustment + // (examples : 32 percent of parent container, + // -15 pixels percent (this means 100 % - 15 pixels) + void SetWidthFloat(int w, int units) {m_WidthFloat = w; m_WidthFloatUnits = units; m_LastLayout = -1;} + void SetWidthFloat(const wxHtmlTag& tag, double pixel_scale = 1.0); + // sets minimal height of this container. + void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP) {m_MinHeight = h; m_MinHeightAlign = align; m_LastLayout = -1;} + + void SetBackgroundColour(const wxColour& clr) {m_BkColour = clr;} + // returns background colour (of wxNullColour if none set), so that widgets can + // adapt to it: + wxColour GetBackgroundColour(); + void SetBorder(const wxColour& clr1, const wxColour& clr2, int border = 1) {m_Border = border; m_BorderColour1 = clr1, m_BorderColour2 = clr2;} + virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const; + virtual const wxHtmlCell* Find(int condition, const void* param) const; + +#if WXWIN_COMPATIBILITY_2_6 + // this was replaced by ProcessMouseClick, don't use in new code! + virtual void OnMouseClick(wxWindow *window, + int x, int y, const wxMouseEvent& event); +#endif + virtual bool ProcessMouseClick(wxHtmlWindowInterface *window, + const wxPoint& pos, + const wxMouseEvent& event); + + virtual wxHtmlCell* GetFirstChild() const { return m_Cells; } + + // returns last child cell: + wxHtmlCell* GetLastChild() const { return m_LastCell; } + + // see comment in wxHtmlCell about this method + virtual bool IsTerminalCell() const { return false; } + + virtual wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y, + unsigned flags = wxHTML_FIND_EXACT) const; + + virtual wxHtmlCell *GetFirstTerminal() const; + virtual wxHtmlCell *GetLastTerminal() const; + + + // Removes indentation on top or bottom of the container (i.e. above or + // below first/last terminal cell). For internal use only. + virtual void RemoveExtraSpacing(bool top, bool bottom); + + // Returns the maximum possible length of the container. + // Call Layout at least once before using GetMaxTotalWidth() + virtual int GetMaxTotalWidth() const { return m_MaxTotalWidth; } + +protected: + void UpdateRenderingStatePre(wxHtmlRenderingInfo& info, + wxHtmlCell *cell) const; + void UpdateRenderingStatePost(wxHtmlRenderingInfo& info, + wxHtmlCell *cell) const; + +protected: + int m_IndentLeft, m_IndentRight, m_IndentTop, m_IndentBottom; + // indentation of subcells. There is always m_Indent pixels + // big space between given border of the container and the subcells + // it m_Indent < 0 it is in PERCENTS, otherwise it is in pixels + int m_MinHeight, m_MinHeightAlign; + // minimal height. + wxHtmlCell *m_Cells, *m_LastCell; + // internal cells, m_Cells points to the first of them, m_LastCell to the last one. + // (LastCell is needed only to speed-up InsertCell) + int m_AlignHor, m_AlignVer; + // alignment horizontal and vertical (left, center, right) + int m_WidthFloat, m_WidthFloatUnits; + // width float is used in adjustWidth + wxColour m_BkColour; + // background color of this container + int m_Border; + // border size. Draw only if m_Border > 0 + wxColour m_BorderColour1, m_BorderColour2; + // borders color of this container + int m_LastLayout; + // if != -1 then call to Layout may be no-op + // if previous call to Layout has same argument + int m_MaxTotalWidth; + // Maximum possible length if ignoring line wrap + + + DECLARE_ABSTRACT_CLASS(wxHtmlContainerCell) + wxDECLARE_NO_COPY_CLASS(wxHtmlContainerCell); +}; + + + +// --------------------------------------------------------------------------- +// wxHtmlColourCell +// Color changer. +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlColourCell : public wxHtmlCell +{ +public: + wxHtmlColourCell(const wxColour& clr, int flags = wxHTML_CLR_FOREGROUND) : wxHtmlCell() {m_Colour = clr; m_Flags = flags;} + virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, + wxHtmlRenderingInfo& info); + virtual void DrawInvisible(wxDC& dc, int x, int y, + wxHtmlRenderingInfo& info); + +protected: + wxColour m_Colour; + unsigned m_Flags; + + DECLARE_ABSTRACT_CLASS(wxHtmlColourCell) + wxDECLARE_NO_COPY_CLASS(wxHtmlColourCell); +}; + + + + +//-------------------------------------------------------------------------------- +// wxHtmlFontCell +// Sets actual font used for text rendering +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlFontCell : public wxHtmlCell +{ +public: + wxHtmlFontCell(wxFont *font) : wxHtmlCell() { m_Font = (*font); } + virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, + wxHtmlRenderingInfo& info); + virtual void DrawInvisible(wxDC& dc, int x, int y, + wxHtmlRenderingInfo& info); + +protected: + wxFont m_Font; + + DECLARE_ABSTRACT_CLASS(wxHtmlFontCell) + wxDECLARE_NO_COPY_CLASS(wxHtmlFontCell); +}; + + + + + + +//-------------------------------------------------------------------------------- +// wxHtmlwidgetCell +// This cell is connected with wxWindow object +// You can use it to insert windows into HTML page +// (buttons, input boxes etc.) +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlWidgetCell : public wxHtmlCell +{ +public: + // !!! wnd must have correct parent! + // if w != 0 then the m_Wnd has 'floating' width - it adjust + // it's width according to parent container's width + // (w is percent of parent's width) + wxHtmlWidgetCell(wxWindow *wnd, int w = 0); + virtual ~wxHtmlWidgetCell() { m_Wnd->Destroy(); } + virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, + wxHtmlRenderingInfo& info); + virtual void DrawInvisible(wxDC& dc, int x, int y, + wxHtmlRenderingInfo& info); + virtual void Layout(int w); + +protected: + wxWindow* m_Wnd; + int m_WidthFloat; + // width float is used in adjustWidth (it is in percents) + + DECLARE_ABSTRACT_CLASS(wxHtmlWidgetCell) + wxDECLARE_NO_COPY_CLASS(wxHtmlWidgetCell); +}; + + + +//-------------------------------------------------------------------------------- +// wxHtmlLinkInfo +// Internal data structure. It represents hypertext link +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlLinkInfo : public wxObject +{ +public: + wxHtmlLinkInfo() : wxObject() + { m_Href = m_Target = wxEmptyString; m_Event = NULL, m_Cell = NULL; } + wxHtmlLinkInfo(const wxString& href, const wxString& target = wxEmptyString) : wxObject() + { m_Href = href; m_Target = target; m_Event = NULL, m_Cell = NULL; } + wxHtmlLinkInfo(const wxHtmlLinkInfo& l) : wxObject() + { m_Href = l.m_Href, m_Target = l.m_Target, m_Event = l.m_Event; + m_Cell = l.m_Cell; } + wxHtmlLinkInfo& operator=(const wxHtmlLinkInfo& l) + { m_Href = l.m_Href, m_Target = l.m_Target, m_Event = l.m_Event; + m_Cell = l.m_Cell; return *this; } + + void SetEvent(const wxMouseEvent *e) { m_Event = e; } + void SetHtmlCell(const wxHtmlCell *e) { m_Cell = e; } + + wxString GetHref() const { return m_Href; } + wxString GetTarget() const { return m_Target; } + const wxMouseEvent* GetEvent() const { return m_Event; } + const wxHtmlCell* GetHtmlCell() const { return m_Cell; } + +private: + wxString m_Href, m_Target; + const wxMouseEvent *m_Event; + const wxHtmlCell *m_Cell; +}; + + + +// ---------------------------------------------------------------------------- +// wxHtmlTerminalCellsInterator +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlTerminalCellsInterator +{ +public: + wxHtmlTerminalCellsInterator(const wxHtmlCell *from, const wxHtmlCell *to) + : m_to(to), m_pos(from) {} + + operator bool() const { return m_pos != NULL; } + const wxHtmlCell* operator++(); + const wxHtmlCell* operator->() const { return m_pos; } + const wxHtmlCell* operator*() const { return m_pos; } + +private: + const wxHtmlCell *m_to, *m_pos; +}; + + + +#endif // wxUSE_HTML + +#endif // _WX_HTMLCELL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmldefs.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmldefs.h new file mode 100644 index 0000000000..9de190ca34 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmldefs.h @@ -0,0 +1,101 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/htmldefs.h +// Purpose: constants for wxhtml library +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef _WX_HTMLDEFS_H_ +#define _WX_HTMLDEFS_H_ + +#include "wx/defs.h" + +#if wxUSE_HTML + +//-------------------------------------------------------------------------------- +// ALIGNMENTS +// Describes alignment of text etc. in containers +//-------------------------------------------------------------------------------- + +#define wxHTML_ALIGN_LEFT 0x0000 +#define wxHTML_ALIGN_RIGHT 0x0002 +#define wxHTML_ALIGN_JUSTIFY 0x0010 + +#define wxHTML_ALIGN_TOP 0x0004 +#define wxHTML_ALIGN_BOTTOM 0x0008 + +#define wxHTML_ALIGN_CENTER 0x0001 + + + +//-------------------------------------------------------------------------------- +// COLOR MODES +// Used by wxHtmlColourCell to determine clr of what is changing +//-------------------------------------------------------------------------------- + +#define wxHTML_CLR_FOREGROUND 0x0001 +#define wxHTML_CLR_BACKGROUND 0x0002 +#define wxHTML_CLR_TRANSPARENT_BACKGROUND 0x0004 + + + +//-------------------------------------------------------------------------------- +// UNITS +// Used to specify units +//-------------------------------------------------------------------------------- + +#define wxHTML_UNITS_PIXELS 0x0001 +#define wxHTML_UNITS_PERCENT 0x0002 + + + +//-------------------------------------------------------------------------------- +// INDENTS +// Used to specify indetation relatives +//-------------------------------------------------------------------------------- + +#define wxHTML_INDENT_LEFT 0x0010 +#define wxHTML_INDENT_RIGHT 0x0020 +#define wxHTML_INDENT_TOP 0x0040 +#define wxHTML_INDENT_BOTTOM 0x0080 + +#define wxHTML_INDENT_HORIZONTAL (wxHTML_INDENT_LEFT | wxHTML_INDENT_RIGHT) +#define wxHTML_INDENT_VERTICAL (wxHTML_INDENT_TOP | wxHTML_INDENT_BOTTOM) +#define wxHTML_INDENT_ALL (wxHTML_INDENT_VERTICAL | wxHTML_INDENT_HORIZONTAL) + + + + +//-------------------------------------------------------------------------------- +// FIND CONDITIONS +// Identifiers of wxHtmlCell's Find() conditions +//-------------------------------------------------------------------------------- + +#define wxHTML_COND_ISANCHOR 1 + // Finds the anchor of 'param' name (pointer to wxString). + +#define wxHTML_COND_ISIMAGEMAP 2 + // Finds imagemap of 'param' name (pointer to wxString). + // (used exclusively by m_image.cpp) + +#define wxHTML_COND_USER 10000 + // User-defined conditions should start from this number + + +//-------------------------------------------------------------------------------- +// INTERNALS +// wxHTML internal constants +//-------------------------------------------------------------------------------- + + /* size of one scroll step of wxHtmlWindow in pixels */ +#define wxHTML_SCROLL_STEP 16 + + /* size of temporary buffer used during parsing */ +#define wxHTML_BUFLEN 1024 + +#endif // wxUSE_HTML + +#endif // _WX_HTMLDEFS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlfilt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlfilt.h new file mode 100644 index 0000000000..fe25d4ffb9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlfilt.h @@ -0,0 +1,81 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/htmlfilt.h +// Purpose: filters +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HTMLFILT_H_ +#define _WX_HTMLFILT_H_ + +#include "wx/defs.h" + +#if wxUSE_HTML + +#include "wx/filesys.h" + + +//-------------------------------------------------------------------------------- +// wxHtmlFilter +// This class is input filter. It can "translate" files +// in non-HTML format to HTML format +// interface to access certain +// kinds of files (HTPP, FTP, local, tar.gz etc..) +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlFilter : public wxObject +{ + DECLARE_ABSTRACT_CLASS(wxHtmlFilter) + +public: + wxHtmlFilter() : wxObject() {} + virtual ~wxHtmlFilter() {} + + // returns true if this filter is able to open&read given file + virtual bool CanRead(const wxFSFile& file) const = 0; + + // Reads given file and returns HTML document. + // Returns empty string if opening failed + virtual wxString ReadFile(const wxFSFile& file) const = 0; +}; + + + +//-------------------------------------------------------------------------------- +// wxHtmlFilterPlainText +// This filter is used as default filter if no other can +// be used (= uknown type of file). It is used by +// wxHtmlWindow itself. +//-------------------------------------------------------------------------------- + + +class WXDLLIMPEXP_HTML wxHtmlFilterPlainText : public wxHtmlFilter +{ + DECLARE_DYNAMIC_CLASS(wxHtmlFilterPlainText) + +public: + virtual bool CanRead(const wxFSFile& file) const; + virtual wxString ReadFile(const wxFSFile& file) const; +}; + +//-------------------------------------------------------------------------------- +// wxHtmlFilterHTML +// filter for text/html +//-------------------------------------------------------------------------------- + +class wxHtmlFilterHTML : public wxHtmlFilter +{ + DECLARE_DYNAMIC_CLASS(wxHtmlFilterHTML) + + public: + virtual bool CanRead(const wxFSFile& file) const; + virtual wxString ReadFile(const wxFSFile& file) const; +}; + + + +#endif // wxUSE_HTML + +#endif // _WX_HTMLFILT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlpars.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlpars.h new file mode 100644 index 0000000000..86612f168e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlpars.h @@ -0,0 +1,307 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/htmlpars.h +// Purpose: wxHtmlParser class (generic parser) +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HTMLPARS_H_ +#define _WX_HTMLPARS_H_ + +#include "wx/defs.h" +#if wxUSE_HTML + +#include "wx/html/htmltag.h" +#include "wx/filesys.h" +#include "wx/hashmap.h" +#include "wx/hashset.h" +#include "wx/vector.h" +#include "wx/fontenc.h" + +class WXDLLIMPEXP_FWD_BASE wxMBConv; +class WXDLLIMPEXP_FWD_HTML wxHtmlParser; +class WXDLLIMPEXP_FWD_HTML wxHtmlTagHandler; +class WXDLLIMPEXP_FWD_HTML wxHtmlEntitiesParser; + +class wxHtmlTextPieces; +class wxHtmlParserState; + +WX_DECLARE_HASH_SET_WITH_DECL_PTR(wxHtmlTagHandler*, + wxPointerHash, wxPointerEqual, + wxHtmlTagHandlersSet, + class WXDLLIMPEXP_HTML); +WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxHtmlTagHandler*, + wxHtmlTagHandlersHash, + class WXDLLIMPEXP_HTML); + + +enum wxHtmlURLType +{ + wxHTML_URL_PAGE, + wxHTML_URL_IMAGE, + wxHTML_URL_OTHER +}; + +// This class handles generic parsing of HTML document : it scans +// the document and divides it into blocks of tags (where one block +// consists of starting and ending tag and of text between these +// 2 tags. +class WXDLLIMPEXP_HTML wxHtmlParser : public wxObject +{ + DECLARE_ABSTRACT_CLASS(wxHtmlParser) + +public: + wxHtmlParser(); + virtual ~wxHtmlParser(); + + // Sets the class which will be used for opening files + void SetFS(wxFileSystem *fs) { m_FS = fs; } + + wxFileSystem* GetFS() const { return m_FS; } + + // Opens file if the parser is allowed to open given URL (may be forbidden + // for security reasons) + virtual wxFSFile *OpenURL(wxHtmlURLType type, const wxString& url) const; + + // You can simply call this method when you need parsed output. + // This method does these things: + // 1. call InitParser(source); + // 2. call DoParsing(); + // 3. call GetProduct(); (its return value is then returned) + // 4. call DoneParser(); + wxObject* Parse(const wxString& source); + + // Sets the source. This must be called before running Parse() method. + virtual void InitParser(const wxString& source); + // This must be called after Parse(). + virtual void DoneParser(); + + // May be called during parsing to immediately return from Parse(). + virtual void StopParsing() { m_stopParsing = true; } + + // Parses the m_Source from begin_pos to end_pos-1. + // (in noparams version it parses whole m_Source) + void DoParsing(const wxString::const_iterator& begin_pos, + const wxString::const_iterator& end_pos); + void DoParsing(); + + // Returns pointer to the tag at parser's current position + wxHtmlTag *GetCurrentTag() const { return m_CurTag; } + + // Returns product of parsing + // Returned value is result of parsing of the part. The type of this result + // depends on internal representation in derived parser + // (see wxHtmlWinParser for details). + virtual wxObject* GetProduct() = 0; + + // adds handler to the list & hash table of handlers. + virtual void AddTagHandler(wxHtmlTagHandler *handler); + + // Forces the handler to handle additional tags (not returned by GetSupportedTags). + // The handler should already be in use by this parser. + // Example: you want to parse following pseudo-html structure: + // + // + // + // + // This last it has different meaning, we don't want it to be parsed by myitems handler! + // handler can handle only 'myitems' (e.g. its GetSupportedTags returns "MYITEMS") + // you can call PushTagHandler(handler, "IT") when you find + // and call PopTagHandler() when you find + void PushTagHandler(wxHtmlTagHandler *handler, const wxString& tags); + + // Restores state before last call to PushTagHandler + void PopTagHandler(); + + const wxString* GetSource() {return m_Source;} + void SetSource(const wxString& src); + + // Sets HTML source and remembers current parser's state so that it can + // later be restored. This is useful for on-line modifications of + // HTML source (for example,
 handler replaces spaces with  
+    // and newlines with 
) + virtual void SetSourceAndSaveState(const wxString& src); + // Restores parser's state from stack or returns false if the stack is + // empty + virtual bool RestoreState(); + + // Returns HTML source inside the element (i.e. between the starting + // and ending tag) + wxString GetInnerSource(const wxHtmlTag& tag); + + // Parses HTML string 'markup' and extracts charset info from tag + // if present. Returns empty string if the tag is missing. + // For wxHTML's internal use. + static wxString ExtractCharsetInformation(const wxString& markup); + + // Returns entity parser object, used to substitute HTML &entities; + wxHtmlEntitiesParser *GetEntitiesParser() const { return m_entitiesParser; } + + // Returns true if the tag starting at the given position is a comment tag + // + // p should point to '<' character and is modified to point to the closing + // '>' of the end comment tag if this is indeed a comment + static bool + SkipCommentTag(wxString::const_iterator& p, wxString::const_iterator end); + +protected: + // DOM structure + void CreateDOMTree(); + void DestroyDOMTree(); + void CreateDOMSubTree(wxHtmlTag *cur, + const wxString::const_iterator& begin_pos, + const wxString::const_iterator& end_pos, + wxHtmlTagsCache *cache); + + // Adds text to the output. + // This is called from Parse() and must be overridden in derived classes. + // txt is not guaranteed to be only one word. It is largest continuous part + // of text (= not broken by tags) + virtual void AddText(const wxString& txt) = 0; + + // Adds tag and proceeds it. Parse() may (and usually is) called from this method. + // This is called from Parse() and may be overridden. + // Default behaviour is that it looks for proper handler in m_Handlers. The tag is + // ignored if no hander is found. + // Derived class is *responsible* for filling in m_Handlers table. + virtual void AddTag(const wxHtmlTag& tag); + +protected: + // DOM tree: + wxHtmlTag *m_CurTag; + wxHtmlTag *m_Tags; + wxHtmlTextPieces *m_TextPieces; + size_t m_CurTextPiece; + + const wxString *m_Source; + + wxHtmlParserState *m_SavedStates; + + // handlers that handle particular tags. The table is accessed by + // key = tag's name. + // This attribute MUST be filled by derived class otherwise it would + // be empty and no tags would be recognized + // (see wxHtmlWinParser for details about filling it) + // m_HandlersHash is for random access based on knowledge of tag name (BR, P, etc.) + // it may (and often does) contain more references to one object + // m_HandlersList is list of all handlers and it is guaranteed to contain + // only one reference to each handler instance. + wxHtmlTagHandlersSet m_HandlersSet; + wxHtmlTagHandlersHash m_HandlersHash; + + wxDECLARE_NO_COPY_CLASS(wxHtmlParser); + + // class for opening files (file system) + wxFileSystem *m_FS; + // handlers stack used by PushTagHandler and PopTagHandler + wxVector m_HandlersStack; + + // entity parse + wxHtmlEntitiesParser *m_entitiesParser; + + // flag indicating that the parser should stop + bool m_stopParsing; +}; + + + +// This class (and derived classes) cooperates with wxHtmlParser. +// Each recognized tag is passed to handler which is capable +// of handling it. Each tag is handled in 3 steps: +// 1. Handler will modifies state of parser +// (using its public methods) +// 2. Parser parses source between starting and ending tag +// 3. Handler restores original state of the parser +class WXDLLIMPEXP_HTML wxHtmlTagHandler : public wxObject +{ + DECLARE_ABSTRACT_CLASS(wxHtmlTagHandler) + +public: + wxHtmlTagHandler() : wxObject () { m_Parser = NULL; } + + // Sets the parser. + // NOTE : each _instance_ of handler is guaranteed to be called + // only by one parser. This means you don't have to care about + // reentrancy. + virtual void SetParser(wxHtmlParser *parser) + { m_Parser = parser; } + + // Get the parser associated with this tag handler. + wxHtmlParser* GetParser() const { return m_Parser; } + + // Returns list of supported tags. The list is in uppercase and + // tags are delimited by ','. + // Example : "I,B,FONT,P" + // is capable of handling italic, bold, font and paragraph tags + virtual wxString GetSupportedTags() = 0; + + // This is hadling core method. It does all the Steps 1-3. + // To process step 2, you can call ParseInner() + // returned value : true if it called ParseInner(), + // false etherwise + virtual bool HandleTag(const wxHtmlTag& tag) = 0; + +protected: + // parses input between beginning and ending tag. + // m_Parser must be set. + void ParseInner(const wxHtmlTag& tag) + { m_Parser->DoParsing(tag.GetBeginIter(), tag.GetEndIter1()); } + + // Parses given source as if it was tag's inner code (see + // wxHtmlParser::GetInnerSource). Unlike ParseInner(), this method lets + // you specify the source code to parse. This is useful when you need to + // modify the inner text before parsing. + void ParseInnerSource(const wxString& source); + + wxHtmlParser *m_Parser; + + wxDECLARE_NO_COPY_CLASS(wxHtmlTagHandler); +}; + + +// This class is used to parse HTML entities in strings. It can handle +// both named entities and &#xxxx entries where xxxx is Unicode code. +class WXDLLIMPEXP_HTML wxHtmlEntitiesParser : public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxHtmlEntitiesParser) + +public: + wxHtmlEntitiesParser(); + virtual ~wxHtmlEntitiesParser(); + + // Sets encoding of output string. + // Has no effect if wxUSE_UNICODE==1 +#if wxUSE_UNICODE + void SetEncoding(wxFontEncoding WXUNUSED(encoding)) {} +#else + void SetEncoding(wxFontEncoding encoding); +#endif + + // Parses entities in input and replaces them with respective characters + // (with respect to output encoding) + wxString Parse(const wxString& input) const; + + // Returns character for given entity or 0 if the enity is unknown + wxChar GetEntityChar(const wxString& entity) const; + + // Returns character that represents given Unicode code +#if wxUSE_UNICODE + wxChar GetCharForCode(unsigned code) const { return (wxChar)code; } +#else + wxChar GetCharForCode(unsigned code) const; +#endif + +protected: +#if !wxUSE_UNICODE + wxMBConv *m_conv; + wxFontEncoding m_encoding; +#endif + + wxDECLARE_NO_COPY_CLASS(wxHtmlEntitiesParser); +}; + + +#endif + +#endif // _WX_HTMLPARS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlproc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlproc.h new file mode 100644 index 0000000000..d608b58ff9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlproc.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/htmlprep.h +// Purpose: HTML processor +// Author: Vaclav Slavik +// Copyright: (c) 2001 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HTMLPREP_H_ +#define _WX_HTMLPREP_H_ + +#include "wx/defs.h" + +#if wxUSE_HTML + +#include "wx/string.h" + +// Priority of preprocessor in the chain. The higher, the earlier it is used +enum +{ + wxHTML_PRIORITY_DONTCARE = 128, // if the order doesn't matter, use this + // priority + wxHTML_PRIORITY_SYSTEM = 256 // >=256 is only for wxHTML's internals +}; + +// Classes derived from this class serve as simple text processors for +// wxHtmlWindow. wxHtmlWindow runs HTML markup through all registered +// processors before displaying it, thus allowing for on-the-fly +// modifications of the markup. + +class WXDLLIMPEXP_HTML wxHtmlProcessor : public wxObject +{ + DECLARE_ABSTRACT_CLASS(wxHtmlProcessor) + +public: + wxHtmlProcessor() : wxObject(), m_enabled(true) {} + virtual ~wxHtmlProcessor() {} + + // Process input text and return processed result + virtual wxString Process(const wxString& text) const = 0; + + // Return priority value of this processor. The higher, the sooner + // is the processor applied to the text. + virtual int GetPriority() const { return wxHTML_PRIORITY_DONTCARE; } + + // Enable/disable the processor. wxHtmlWindow won't use a disabled + // processor even if it is in its processors queue. + virtual void Enable(bool enable = true) { m_enabled = enable; } + bool IsEnabled() const { return m_enabled; } + +protected: + bool m_enabled; +}; + +#endif // wxUSE_HTML + +#endif // _WX_HTMLPROC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmltag.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmltag.h new file mode 100644 index 0000000000..f7b4f9b5b0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmltag.h @@ -0,0 +1,179 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/htmltag.h +// Purpose: wxHtmlTag class (represents single tag) +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HTMLTAG_H_ +#define _WX_HTMLTAG_H_ + +#include "wx/defs.h" + +#if wxUSE_HTML + +#include "wx/object.h" +#include "wx/arrstr.h" + +class WXDLLIMPEXP_FWD_CORE wxColour; +class WXDLLIMPEXP_FWD_HTML wxHtmlEntitiesParser; + +//----------------------------------------------------------------------------- +// wxHtmlTagsCache +// - internal wxHTML class, do not use! +//----------------------------------------------------------------------------- + +class wxHtmlTagsCacheData; + +class WXDLLIMPEXP_HTML wxHtmlTagsCache +{ +private: + wxHtmlTagsCacheData *m_Cache; + int m_CachePos; + + wxHtmlTagsCacheData& Cache() { return *m_Cache; } + +public: + wxHtmlTagsCache() {m_Cache = NULL;} + wxHtmlTagsCache(const wxString& source); + virtual ~wxHtmlTagsCache(); + + // Finds parameters for tag starting at at and fills the variables + void QueryTag(const wxString::const_iterator& at, + const wxString::const_iterator& inputEnd, + wxString::const_iterator *end1, + wxString::const_iterator *end2, + bool *hasEnding); + + wxDECLARE_NO_COPY_CLASS(wxHtmlTagsCache); +}; + + +//-------------------------------------------------------------------------------- +// wxHtmlTag +// This represents single tag. It is used as internal structure +// by wxHtmlParser. +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlTag +{ +protected: + // constructs wxHtmlTag object based on HTML tag. + // The tag begins (with '<' character) at position pos in source + // end_pos is position where parsing ends (usually end of document) + wxHtmlTag(wxHtmlTag *parent, + const wxString *source, + const wxString::const_iterator& pos, + const wxString::const_iterator& end_pos, + wxHtmlTagsCache *cache, + wxHtmlEntitiesParser *entParser); + friend class wxHtmlParser; +public: + ~wxHtmlTag(); + + wxHtmlTag *GetParent() const {return m_Parent;} + wxHtmlTag *GetFirstSibling() const; + wxHtmlTag *GetLastSibling() const; + wxHtmlTag *GetChildren() const { return m_FirstChild; } + wxHtmlTag *GetPreviousSibling() const { return m_Prev; } + wxHtmlTag *GetNextSibling() const {return m_Next; } + // Return next tag, as if tree had been flattened + wxHtmlTag *GetNextTag() const; + + // Returns tag's name in uppercase. + inline wxString GetName() const {return m_Name;} + + // Returns true if the tag has given parameter. Parameter + // should always be in uppercase. + // Example : HasParam("SRC") returns true + bool HasParam(const wxString& par) const; + + // Returns value of the param. Value is in uppercase unless it is + // enclosed with " + // Example :

GetParam("ALIGN") returns (RIGHT) + //

GetParam("SRC") returns (WhaT.jpg) + // (or ("WhaT.jpg") if with_quotes == true) + wxString GetParam(const wxString& par, bool with_quotes = false) const; + + // Return true if the string could be parsed as an HTML colour and false + // otherwise. + static bool ParseAsColour(const wxString& str, wxColour *clr); + + // Convenience functions: + bool GetParamAsString(const wxString& par, wxString *str) const; + bool GetParamAsColour(const wxString& par, wxColour *clr) const; + bool GetParamAsInt(const wxString& par, int *clr) const; + bool GetParamAsIntOrPercent(const wxString& param, + int* value, bool& isPercent) const; + + // Scans param like scanf() functions family does. + // Example : ScanParam("COLOR", "\"#%X\"", &clr); + // This is always with with_quotes=false + // Returns number of scanned values + // (like sscanf() does) + // NOTE: unlike scanf family, this function only accepts + // *one* parameter ! + int ScanParam(const wxString& par, const char *format, void *param) const; + int ScanParam(const wxString& par, const wchar_t *format, void *param) const; + + // Returns string containing all params. + wxString GetAllParams() const; + + // return true if there is matching ending tag + inline bool HasEnding() const {return m_hasEnding;} + + // returns beginning position of _internal_ block of text as iterator + // into parser's source string (see wxHtmlParser::GetSource()) + // See explanation (returned value is marked with *): + // bla bla bla * bla bla intenal text bla bla + wxString::const_iterator GetBeginIter() const + { return m_Begin; } + // returns ending position of _internal_ block of text as iterator + // into parser's source string (see wxHtmlParser::GetSource()): + // bla bla bla bla bla intenal text* bla bla + wxString::const_iterator GetEndIter1() const { return m_End1; } + // returns end position 2 as iterator + // into parser's source string (see wxHtmlParser::GetSource()): + // bla bla bla bla bla internal text* bla bla + wxString::const_iterator GetEndIter2() const { return m_End2; } + +#if WXWIN_COMPATIBILITY_2_8 + // use GetBeginIter(), GetEndIter1() and GetEndIter2() instead + wxDEPRECATED( inline int GetBeginPos() const ); + wxDEPRECATED( inline int GetEndPos1() const ); + wxDEPRECATED( inline int GetEndPos2() const ); +#endif // WXWIN_COMPATIBILITY_2_8 + +private: + wxString m_Name; + bool m_hasEnding; + wxString::const_iterator m_Begin, m_End1, m_End2; + wxArrayString m_ParamNames, m_ParamValues; +#if WXWIN_COMPATIBILITY_2_8 + wxString::const_iterator m_sourceStart; +#endif + + // DOM tree relations: + wxHtmlTag *m_Next; + wxHtmlTag *m_Prev; + wxHtmlTag *m_FirstChild, *m_LastChild; + wxHtmlTag *m_Parent; + + wxDECLARE_NO_COPY_CLASS(wxHtmlTag); +}; + + +#if WXWIN_COMPATIBILITY_2_8 +inline int wxHtmlTag::GetBeginPos() const { return int(m_Begin - m_sourceStart); } +inline int wxHtmlTag::GetEndPos1() const { return int(m_End1 - m_sourceStart); } +inline int wxHtmlTag::GetEndPos2() const { return int(m_End2 - m_sourceStart); } +#endif // WXWIN_COMPATIBILITY_2_8 + + + + +#endif // wxUSE_HTML + +#endif // _WX_HTMLTAG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlwin.h new file mode 100644 index 0000000000..7c716df115 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmlwin.h @@ -0,0 +1,658 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/htmlwin.h +// Purpose: wxHtmlWindow class for parsing & displaying HTML +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HTMLWIN_H_ +#define _WX_HTMLWIN_H_ + +#include "wx/defs.h" +#if wxUSE_HTML + +#include "wx/window.h" +#include "wx/scrolwin.h" +#include "wx/config.h" +#include "wx/stopwatch.h" +#include "wx/html/winpars.h" +#include "wx/html/htmlcell.h" +#include "wx/filesys.h" +#include "wx/html/htmlfilt.h" +#include "wx/filename.h" +#include "wx/bitmap.h" + +class wxHtmlProcessor; +class wxHtmlWinModule; +class wxHtmlHistoryArray; +class wxHtmlProcessorList; +class WXDLLIMPEXP_FWD_HTML wxHtmlWinAutoScrollTimer; +class WXDLLIMPEXP_FWD_HTML wxHtmlCellEvent; +class WXDLLIMPEXP_FWD_HTML wxHtmlLinkEvent; +class WXDLLIMPEXP_FWD_CORE wxStatusBar; + +// wxHtmlWindow flags: +#define wxHW_SCROLLBAR_NEVER 0x0002 +#define wxHW_SCROLLBAR_AUTO 0x0004 +#define wxHW_NO_SELECTION 0x0008 + +#define wxHW_DEFAULT_STYLE wxHW_SCROLLBAR_AUTO + +/// Enum for wxHtmlWindow::OnOpeningURL and wxHtmlWindowInterface::OnOpeningURL +enum wxHtmlOpeningStatus +{ + /// Open the requested URL + wxHTML_OPEN, + /// Do not open the URL + wxHTML_BLOCK, + /// Redirect to another URL (returned from OnOpeningURL) + wxHTML_REDIRECT +}; + +/** + Abstract interface to a HTML rendering window (such as wxHtmlWindow or + wxHtmlListBox) that is passed to wxHtmlWinParser. It encapsulates all + communication from the parser to the window. + */ +class WXDLLIMPEXP_HTML wxHtmlWindowInterface +{ +public: + /// Ctor + wxHtmlWindowInterface() {} + virtual ~wxHtmlWindowInterface() {} + + /** + Called by the parser to set window's title to given text. + */ + virtual void SetHTMLWindowTitle(const wxString& title) = 0; + + /** + Called when a link is clicked. + + @param link information about the clicked link + */ + virtual void OnHTMLLinkClicked(const wxHtmlLinkInfo& link) = 0; + + /** + Called when the parser needs to open another URL (e.g. an image). + + @param type Type of the URL request (e.g. image) + @param url URL the parser wants to open + @param redirect If the return value is wxHTML_REDIRECT, then the + URL to redirect to will be stored in this variable + (the pointer must never be NULL) + + @return indicator of how to treat the request + */ + virtual wxHtmlOpeningStatus OnHTMLOpeningURL(wxHtmlURLType type, + const wxString& url, + wxString *redirect) const = 0; + + /** + Converts coordinates @a pos relative to given @a cell to + physical coordinates in the window. + */ + virtual wxPoint HTMLCoordsToWindow(wxHtmlCell *cell, + const wxPoint& pos) const = 0; + + /// Returns the window used for rendering (may be NULL). + virtual wxWindow* GetHTMLWindow() = 0; + + /// Returns background colour to use by default. + virtual wxColour GetHTMLBackgroundColour() const = 0; + + /// Sets window's background to colour @a clr. + virtual void SetHTMLBackgroundColour(const wxColour& clr) = 0; + + /// Sets window's background to given bitmap. + virtual void SetHTMLBackgroundImage(const wxBitmap& bmpBg) = 0; + + /// Sets status bar text. + virtual void SetHTMLStatusText(const wxString& text) = 0; + + /// Type of mouse cursor + enum HTMLCursor + { + /// Standard mouse cursor (typically an arrow) + HTMLCursor_Default, + /// Cursor shown over links + HTMLCursor_Link, + /// Cursor shown over selectable text + HTMLCursor_Text + }; + + /** + Returns mouse cursor of given @a type. + */ + virtual wxCursor GetHTMLCursor(HTMLCursor type) const = 0; +}; + +/** + Helper class that implements part of mouse handling for wxHtmlWindow and + wxHtmlListBox. Cursor changes and clicking on links are handled, text + selection is not. + */ +class WXDLLIMPEXP_HTML wxHtmlWindowMouseHelper +{ +protected: + /** + Ctor. + + @param iface Interface to the owner window. + */ + wxHtmlWindowMouseHelper(wxHtmlWindowInterface *iface); + + /** + Virtual dtor. + + It is not really needed in this case but at leats it prevents gcc from + complaining about its absence. + */ + virtual ~wxHtmlWindowMouseHelper() { } + + /// Returns true if the mouse moved since the last call to HandleIdle + bool DidMouseMove() const { return m_tmpMouseMoved; } + + /// Call this from EVT_MOTION event handler + void HandleMouseMoved(); + + /** + Call this from EVT_LEFT_UP handler (or, alternatively, EVT_LEFT_DOWN). + + @param rootCell HTML cell inside which the click occured. This doesn't + have to be the leaf cell, it can be e.g. toplevel + container, but the mouse must be inside the container's + area, otherwise the event would be ignored. + @param pos Mouse position in coordinates relative to @a cell + @param event The event that triggered the call + */ + bool HandleMouseClick(wxHtmlCell *rootCell, + const wxPoint& pos, const wxMouseEvent& event); + + /** + Call this from OnInternalIdle of the HTML displaying window. Handles + mouse movements and must be used together with HandleMouseMoved. + + @param rootCell HTML cell inside which the click occured. This doesn't + have to be the leaf cell, it can be e.g. toplevel + container, but the mouse must be inside the container's + area, otherwise the event would be ignored. + @param pos Current mouse position in coordinates relative to + @a cell + */ + void HandleIdle(wxHtmlCell *rootCell, const wxPoint& pos); + + /** + Called by HandleIdle when the mouse hovers over a cell. Default + behaviour is to do nothing. + + @param cell the cell the mouse is over + @param x, y coordinates of mouse relative to the cell + */ + virtual void OnCellMouseHover(wxHtmlCell *cell, wxCoord x, wxCoord y); + + /** + Called by HandleMouseClick when the user clicks on a cell. + Default behaviour is to call wxHtmlWindowInterface::OnLinkClicked() + if this cell corresponds to a hypertext link. + + @param cell the cell the mouse is over + @param x, y coordinates of mouse relative to the cell + @param event The event that triggered the call + + + @return true if a link was clicked, false otherwise. + */ + virtual bool OnCellClicked(wxHtmlCell *cell, + wxCoord x, wxCoord y, + const wxMouseEvent& event); + +protected: + // this flag indicates if the mouse moved (used by HandleIdle) + bool m_tmpMouseMoved; + // contains last link name + wxHtmlLinkInfo *m_tmpLastLink; + // contains the last (terminal) cell which contained the mouse + wxHtmlCell *m_tmpLastCell; + +private: + wxHtmlWindowInterface *m_interface; +}; + +// ---------------------------------------------------------------------------- +// wxHtmlWindow +// (This is probably the only class you will directly use.) +// Purpose of this class is to display HTML page (either local +// file or downloaded via HTTP protocol) in a window. Width of +// window is constant - given in constructor - virtual height +// is changed dynamically depending on page size. Once the +// window is created you can set its content by calling +// SetPage(text) or LoadPage(filename). +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlWindow : public wxScrolledWindow, + public wxHtmlWindowInterface, + public wxHtmlWindowMouseHelper +{ + DECLARE_DYNAMIC_CLASS(wxHtmlWindow) + friend class wxHtmlWinModule; + +public: + wxHtmlWindow() : wxHtmlWindowMouseHelper(this) { Init(); } + wxHtmlWindow(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHW_DEFAULT_STYLE, + const wxString& name = wxT("htmlWindow")) + : wxHtmlWindowMouseHelper(this) + { + Init(); + Create(parent, id, pos, size, style, name); + } + virtual ~wxHtmlWindow(); + + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHW_SCROLLBAR_AUTO, + const wxString& name = wxT("htmlWindow")); + + // Set HTML page and display it. !! source is HTML document itself, + // it is NOT address/filename of HTML document. If you want to + // specify document location, use LoadPage() istead + // Return value : false if an error occurred, true otherwise + virtual bool SetPage(const wxString& source); + + // Append to current page + bool AppendToPage(const wxString& source); + + // Load HTML page from given location. Location can be either + // a) /usr/wxGTK2/docs/html/wx.htm + // b) http://www.somewhere.uk/document.htm + // c) ftp://ftp.somesite.cz/pub/something.htm + // In case there is no prefix (http:,ftp:), the method + // will try to find it itself (1. local file, then http or ftp) + // After the page is loaded, the method calls SetPage() to display it. + // Note : you can also use path relative to previously loaded page + // Return value : same as SetPage + virtual bool LoadPage(const wxString& location); + + // Loads HTML page from file + bool LoadFile(const wxFileName& filename); + + // Returns full location of opened page + wxString GetOpenedPage() const {return m_OpenedPage;} + // Returns anchor within opened page + wxString GetOpenedAnchor() const {return m_OpenedAnchor;} + // Returns of opened page or empty string otherwise + wxString GetOpenedPageTitle() const {return m_OpenedPageTitle;} + + // Sets frame in which page title will be displayed. Format is format of + // frame title, e.g. "HtmlHelp : %s". It must contain exactly one %s + void SetRelatedFrame(wxFrame* frame, const wxString& format); + wxFrame* GetRelatedFrame() const {return m_RelatedFrame;} + +#if wxUSE_STATUSBAR + // After(!) calling SetRelatedFrame, this sets statusbar slot where messages + // will be displayed. Default is -1 = no messages. + void SetRelatedStatusBar(int index); + void SetRelatedStatusBar(wxStatusBar*, int index = 0); +#endif // wxUSE_STATUSBAR + + // Sets fonts to be used when displaying HTML page. + void SetFonts(const wxString& normal_face, const wxString& fixed_face, + const int *sizes = NULL); + + // Sets font sizes to be relative to the given size or the system + // default size; use either specified or default font + void SetStandardFonts(int size = -1, + const wxString& normal_face = wxEmptyString, + const wxString& fixed_face = wxEmptyString); + + // Sets space between text and window borders. + void SetBorders(int b) {m_Borders = b;} + + // Sets the bitmap to use for background (currnetly it will be tiled, + // when/if we have CSS support we could add other possibilities...) + void SetBackgroundImage(const wxBitmap& bmpBg) { m_bmpBg = bmpBg; } + +#if wxUSE_CONFIG + // Saves custom settings into cfg config. it will use the path 'path' + // if given, otherwise it will save info into currently selected path. + // saved values : things set by SetFonts, SetBorders. + virtual void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString); + // ... + virtual void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString); +#endif // wxUSE_CONFIG + + // Goes to previous/next page (in browsing history) + // Returns true if successful, false otherwise + bool HistoryBack(); + bool HistoryForward(); + bool HistoryCanBack(); + bool HistoryCanForward(); + // Resets history + void HistoryClear(); + + // Returns pointer to conteiners/cells structure. + // It should be used ONLY when printing + wxHtmlContainerCell* GetInternalRepresentation() const {return m_Cell;} + + // Adds input filter + static void AddFilter(wxHtmlFilter *filter); + + // Returns a pointer to the parser. + wxHtmlWinParser *GetParser() const { return m_Parser; } + + // Adds HTML processor to this instance of wxHtmlWindow: + void AddProcessor(wxHtmlProcessor *processor); + // Adds HTML processor to wxHtmlWindow class as whole: + static void AddGlobalProcessor(wxHtmlProcessor *processor); + + + // -- Callbacks -- + + // Sets the title of the window + // (depending on the information passed to SetRelatedFrame() method) + virtual void OnSetTitle(const wxString& title); + + // Called when user clicked on hypertext link. Default behaviour is to + // call LoadPage(loc) + virtual void OnLinkClicked(const wxHtmlLinkInfo& link); + + // Called when wxHtmlWindow wants to fetch data from an URL (e.g. when + // loading a page or loading an image). The data are downloaded if and only if + // OnOpeningURL returns true. If OnOpeningURL returns wxHTML_REDIRECT, + // it must set *redirect to the new URL + virtual wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType WXUNUSED(type), + const wxString& WXUNUSED(url), + wxString *WXUNUSED(redirect)) const + { return wxHTML_OPEN; } + +#if wxUSE_CLIPBOARD + // Helper functions to select parts of page: + void SelectWord(const wxPoint& pos); + void SelectLine(const wxPoint& pos); + void SelectAll(); + + // Convert selection to text: + wxString SelectionToText() { return DoSelectionToText(m_selection); } + + // Converts current page to text: + wxString ToText(); +#endif // wxUSE_CLIPBOARD + + virtual void OnInternalIdle(); + + /// Returns standard HTML cursor as used by wxHtmlWindow + static wxCursor GetDefaultHTMLCursor(HTMLCursor type); + +protected: + void Init(); + + // Scrolls to anchor of this name. (Anchor is #news + // or #features etc. it is part of address sometimes: + // http://www.ms.mff.cuni.cz/~vsla8348/wxhtml/index.html#news) + // Return value : true if anchor exists, false otherwise + bool ScrollToAnchor(const wxString& anchor); + + // Prepares layout (= fill m_PosX, m_PosY for fragments) based on + // actual size of window. This method also setup scrollbars + void CreateLayout(); + + void OnPaint(wxPaintEvent& event); + void OnEraseBackground(wxEraseEvent& event); + void OnSize(wxSizeEvent& event); + void OnMouseMove(wxMouseEvent& event); + void OnMouseDown(wxMouseEvent& event); + void OnMouseUp(wxMouseEvent& event); +#if wxUSE_CLIPBOARD + void OnKeyUp(wxKeyEvent& event); + void OnDoubleClick(wxMouseEvent& event); + void OnCopy(wxCommandEvent& event); + void OnClipboardEvent(wxClipboardTextEvent& event); + void OnMouseEnter(wxMouseEvent& event); + void OnMouseLeave(wxMouseEvent& event); + void OnMouseCaptureLost(wxMouseCaptureLostEvent& event); +#endif // wxUSE_CLIPBOARD + + // Returns new filter (will be stored into m_DefaultFilter variable) + virtual wxHtmlFilter *GetDefaultFilter() {return new wxHtmlFilterPlainText;} + + // cleans static variables + static void CleanUpStatics(); + + // Returns true if text selection is enabled (wxClipboard must be available + // and wxHW_NO_SELECTION not used) + bool IsSelectionEnabled() const; + + enum ClipboardType + { + Primary, + Secondary + }; + + // Copies selection to clipboard if the clipboard support is available + // + // returns true if anything was copied to clipboard, false otherwise + bool CopySelection(ClipboardType t = Secondary); + +#if wxUSE_CLIPBOARD + // Automatic scrolling during selection: + void StopAutoScrolling(); +#endif // wxUSE_CLIPBOARD + + wxString DoSelectionToText(wxHtmlSelection *sel); + +public: + // wxHtmlWindowInterface methods: + virtual void SetHTMLWindowTitle(const wxString& title); + virtual void OnHTMLLinkClicked(const wxHtmlLinkInfo& link); + virtual wxHtmlOpeningStatus OnHTMLOpeningURL(wxHtmlURLType type, + const wxString& url, + wxString *redirect) const; + virtual wxPoint HTMLCoordsToWindow(wxHtmlCell *cell, + const wxPoint& pos) const; + virtual wxWindow* GetHTMLWindow(); + virtual wxColour GetHTMLBackgroundColour() const; + virtual void SetHTMLBackgroundColour(const wxColour& clr); + virtual void SetHTMLBackgroundImage(const wxBitmap& bmpBg); + virtual void SetHTMLStatusText(const wxString& text); + virtual wxCursor GetHTMLCursor(HTMLCursor type) const; + + // implementation of SetPage() + bool DoSetPage(const wxString& source); + +protected: + // This is pointer to the first cell in parsed data. (Note: the first cell + // is usually top one = all other cells are sub-cells of this one) + wxHtmlContainerCell *m_Cell; + // parser which is used to parse HTML input. + // Each wxHtmlWindow has its own parser because sharing one global + // parser would be problematic (because of reentrancy) + wxHtmlWinParser *m_Parser; + // contains name of actually opened page or empty string if no page opened + wxString m_OpenedPage; + // contains name of current anchor within m_OpenedPage + wxString m_OpenedAnchor; + // contains title of actually opened page or empty string if no <TITLE> tag + wxString m_OpenedPageTitle; + // class for opening files (file system) + wxFileSystem* m_FS; + + // frame in which page title should be displayed & number of its statusbar + // reserved for usage with this html window + wxFrame *m_RelatedFrame; +#if wxUSE_STATUSBAR + int m_RelatedStatusBarIndex; + wxStatusBar* m_RelatedStatusBar; +#endif // wxUSE_STATUSBAR + wxString m_TitleFormat; + + // borders (free space between text and window borders) + // defaults to 10 pixels. + int m_Borders; + + // current text selection or NULL + wxHtmlSelection *m_selection; + + // true if the user is dragging mouse to select text + bool m_makingSelection; + +#if wxUSE_CLIPBOARD + // time of the last doubleclick event, used to detect tripleclicks + // (tripleclicks are used to select whole line): + wxMilliClock_t m_lastDoubleClick; + + // helper class to automatically scroll the window if the user is selecting + // text and the mouse leaves wxHtmlWindow: + wxHtmlWinAutoScrollTimer *m_timerAutoScroll; +#endif // wxUSE_CLIPBOARD + +private: + // erase the window background using m_bmpBg or just solid colour if we + // don't have any background image + void DoEraseBackground(wxDC& dc); + + // window content for double buffered rendering, may be invalid until it is + // really initialized in OnPaint() + wxBitmap m_backBuffer; + + // background image, may be invalid + wxBitmap m_bmpBg; + + // variables used when user is selecting text + wxPoint m_tmpSelFromPos; + wxHtmlCell *m_tmpSelFromCell; + + // if >0 contents of the window is not redrawn + // (in order to avoid ugly blinking) + int m_tmpCanDrawLocks; + + // list of HTML filters + static wxList m_Filters; + // this filter is used when no filter is able to read some file + static wxHtmlFilter *m_DefaultFilter; + + // html processors array: + wxHtmlProcessorList *m_Processors; + static wxHtmlProcessorList *m_GlobalProcessors; + + // browser history + wxHtmlHistoryArray *m_History; + int m_HistoryPos; + // if this FLAG is false, items are not added to history + bool m_HistoryOn; + + // Flag used to communicate between OnPaint() and OnEraseBackground(), see + // the comments near its use. + bool m_isBgReallyErased; + + // standard mouse cursors + static wxCursor *ms_cursorLink; + static wxCursor *ms_cursorText; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxHtmlWindow); +}; + +class WXDLLIMPEXP_FWD_HTML wxHtmlCellEvent; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_HTML, wxEVT_HTML_CELL_CLICKED, wxHtmlCellEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_HTML, wxEVT_HTML_CELL_HOVER, wxHtmlCellEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_HTML, wxEVT_HTML_LINK_CLICKED, wxHtmlLinkEvent ); + + +/*! + * Html cell window event + */ + +class WXDLLIMPEXP_HTML wxHtmlCellEvent : public wxCommandEvent +{ +public: + wxHtmlCellEvent() {} + wxHtmlCellEvent(wxEventType commandType, int id, + wxHtmlCell *cell, const wxPoint &pt, + const wxMouseEvent &ev) + : wxCommandEvent(commandType, id) + { + m_cell = cell; + m_pt = pt; + m_mouseEvent = ev; + m_bLinkWasClicked = false; + } + + wxHtmlCell* GetCell() const { return m_cell; } + wxPoint GetPoint() const { return m_pt; } + wxMouseEvent GetMouseEvent() const { return m_mouseEvent; } + + void SetLinkClicked(bool linkclicked) { m_bLinkWasClicked=linkclicked; } + bool GetLinkClicked() const { return m_bLinkWasClicked; } + + // default copy ctor, assignment operator and dtor are ok + virtual wxEvent *Clone() const { return new wxHtmlCellEvent(*this); } + +private: + wxHtmlCell *m_cell; + wxMouseEvent m_mouseEvent; + wxPoint m_pt; + + bool m_bLinkWasClicked; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxHtmlCellEvent) +}; + + + +/*! + * Html link event + */ + +class WXDLLIMPEXP_HTML wxHtmlLinkEvent : public wxCommandEvent +{ +public: + wxHtmlLinkEvent() {} + wxHtmlLinkEvent(int id, const wxHtmlLinkInfo &linkinfo) + : wxCommandEvent(wxEVT_HTML_LINK_CLICKED, id) + { + m_linkInfo = linkinfo; + } + + const wxHtmlLinkInfo &GetLinkInfo() const { return m_linkInfo; } + + // default copy ctor, assignment operator and dtor are ok + virtual wxEvent *Clone() const { return new wxHtmlLinkEvent(*this); } + +private: + wxHtmlLinkInfo m_linkInfo; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxHtmlLinkEvent) +}; + + +typedef void (wxEvtHandler::*wxHtmlCellEventFunction)(wxHtmlCellEvent&); +typedef void (wxEvtHandler::*wxHtmlLinkEventFunction)(wxHtmlLinkEvent&); + +#define wxHtmlCellEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxHtmlCellEventFunction, func) +#define wxHtmlLinkEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxHtmlLinkEventFunction, func) + +#define EVT_HTML_CELL_CLICKED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_HTML_CELL_CLICKED, id, wxHtmlCellEventHandler(fn)) +#define EVT_HTML_CELL_HOVER(id, fn) \ + wx__DECLARE_EVT1(wxEVT_HTML_CELL_HOVER, id, wxHtmlCellEventHandler(fn)) +#define EVT_HTML_LINK_CLICKED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_HTML_LINK_CLICKED, id, wxHtmlLinkEventHandler(fn)) + + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_HTML_CELL_CLICKED wxEVT_HTML_CELL_CLICKED +#define wxEVT_COMMAND_HTML_CELL_HOVER wxEVT_HTML_CELL_HOVER +#define wxEVT_COMMAND_HTML_LINK_CLICKED wxEVT_HTML_LINK_CLICKED + +#endif // wxUSE_HTML + +#endif // _WX_HTMLWIN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmprint.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmprint.h new file mode 100644 index 0000000000..9cf170a461 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/htmprint.h @@ -0,0 +1,318 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/htmprint.h +// Purpose: html printing classes +// Author: Vaclav Slavik +// Created: 25/09/99 +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HTMPRINT_H_ +#define _WX_HTMPRINT_H_ + +#include "wx/defs.h" + +#if wxUSE_HTML & wxUSE_PRINTING_ARCHITECTURE + +#include "wx/html/htmlcell.h" +#include "wx/html/winpars.h" +#include "wx/html/htmlfilt.h" + +#include "wx/print.h" +#include "wx/printdlg.h" + +#include <limits.h> // INT_MAX + +//-------------------------------------------------------------------------------- +// wxHtmlDCRenderer +// This class is capable of rendering HTML into specified +// portion of DC +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlDCRenderer : public wxObject +{ +public: + wxHtmlDCRenderer(); + virtual ~wxHtmlDCRenderer(); + + // Following 3 methods *must* be called before any call to Render: + + // Assign DC to this render + void SetDC(wxDC *dc, double pixel_scale = 1.0) + { SetDC(dc, pixel_scale, pixel_scale); } + void SetDC(wxDC *dc, double pixel_scale, double font_scale); + + // Sets size of output rectangle, in pixels. Note that you *can't* change + // width of the rectangle between calls to Render! (You can freely change height.) + void SetSize(int width, int height); + + // Sets the text to be displayed. + // Basepath is base directory (html string would be stored there if it was in + // file). It is used to determine path for loading images, for example. + // isdir is false if basepath is filename, true if it is directory name + // (see wxFileSystem for detailed explanation) + void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true); + + // Sets fonts to be used when displaying HTML page. (if size null then default sizes used). + void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL); + + // Sets font sizes to be relative to the given size or the system + // default size; use either specified or default font + void SetStandardFonts(int size = -1, + const wxString& normal_face = wxEmptyString, + const wxString& fixed_face = wxEmptyString); + + // [x,y] is position of upper-left corner of printing rectangle (see SetSize) + // from is y-coordinate of the very first visible cell + // to is y-coordinate of the next following page break, if any + // Returned value is y coordinate of first cell than didn't fit onto page. + // Use this value as 'from' in next call to Render in order to print multiple pages + // document + // If dont_render is TRUE then nothing is rendered into DC and it only counts + // pixels and return y coord of the next page + // + // known_pagebreaks and number_of_pages are used only when counting pages; + // otherwise, their default values should be used. Their purpose is to + // support pagebreaks using a subset of CSS2's <DIV>. The <DIV> handler + // needs to know what pagebreaks have already been set so that it doesn't + // set the same pagebreak twice. + // + // CAUTION! Render() changes DC's user scale and does NOT restore it! + int Render(int x, int y, wxArrayInt& known_pagebreaks, int from = 0, + int dont_render = false, int to = INT_MAX); + + // returns total width of the html document + int GetTotalWidth() const; + + // returns total height of the html document + // (compare Render's return value with this) + int GetTotalHeight() const; + +private: + wxDC *m_DC; + wxHtmlWinParser *m_Parser; + wxFileSystem *m_FS; + wxHtmlContainerCell *m_Cells; + int m_MaxWidth, m_Width, m_Height; + + wxDECLARE_NO_COPY_CLASS(wxHtmlDCRenderer); +}; + + + + + +enum { + wxPAGE_ODD, + wxPAGE_EVEN, + wxPAGE_ALL +}; + + + +//-------------------------------------------------------------------------------- +// wxHtmlPrintout +// This class is derived from standard wxWidgets printout class +// and is used to print HTML documents. +//-------------------------------------------------------------------------------- + + +class WXDLLIMPEXP_HTML wxHtmlPrintout : public wxPrintout +{ +public: + wxHtmlPrintout(const wxString& title = wxT("Printout")); + virtual ~wxHtmlPrintout(); + + void SetHtmlText(const wxString& html, const wxString &basepath = wxEmptyString, bool isdir = true); + // prepares the class for printing this html document. + // Must be called before using the class, in fact just after constructor + // + // basepath is base directory (html string would be stored there if it was in + // file). It is used to determine path for loading images, for example. + // isdir is false if basepath is filename, true if it is directory name + // (see wxFileSystem for detailed explanation) + + void SetHtmlFile(const wxString &htmlfile); + // same as SetHtmlText except that it takes regular file as the parameter + + void SetHeader(const wxString& header, int pg = wxPAGE_ALL); + void SetFooter(const wxString& footer, int pg = wxPAGE_ALL); + // sets header/footer for the document. The argument is interpreted as HTML document. + // You can use macros in it: + // @PAGENUM@ is replaced by page number + // @PAGESCNT@ is replaced by total number of pages + // + // pg is one of wxPAGE_ODD, wxPAGE_EVEN and wx_PAGE_ALL constants. + // You can set different header/footer for odd and even pages + + // Sets fonts to be used when displaying HTML page. (if size null then default sizes used). + void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL); + + // Sets font sizes to be relative to the given size or the system + // default size; use either specified or default font + void SetStandardFonts(int size = -1, + const wxString& normal_face = wxEmptyString, + const wxString& fixed_face = wxEmptyString); + + void SetMargins(float top = 25.2f, float bottom = 25.2f, float left = 25.2f, float right = 25.2f, + float spaces = 5); + // sets margins in milimeters. Defaults to 1 inch for margins and 0.5cm for space + // between text and header and/or footer + + // wxPrintout stuff: + bool OnPrintPage(int page); + bool HasPage(int page); + void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); + bool OnBeginDocument(int startPage, int endPage); + void OnPreparePrinting(); + + // Adds input filter + static void AddFilter(wxHtmlFilter *filter); + + // Cleanup + static void CleanUpStatics(); + +private: + // this function is called by the base class OnPreparePrinting() + // implementation and by default checks whether the document fits into + // pageArea horizontally and warns the user if it does not and, if we're + // going to print and not just to preview the document, giving him the + // possibility to cancel printing + // + // you may override it to either suppress this check if truncation of the + // HTML being printed is acceptable or, on the contrary, add more checks to + // it, e.g. for the fit in the vertical direction if the document should + // always appear on a single page + // + // return true if printing should go ahead or false to cancel it (the + // return value is ignored when previewing) + virtual bool CheckFit(const wxSize& pageArea, const wxSize& docArea) const; + + void RenderPage(wxDC *dc, int page); + // renders one page into dc + wxString TranslateHeader(const wxString& instr, int page); + // substitute @PAGENUM@ and @PAGESCNT@ by real values + void CountPages(); + // counts pages and fills m_NumPages and m_PageBreaks + + +private: + int m_NumPages; + wxArrayInt m_PageBreaks; + + wxString m_Document, m_BasePath; + bool m_BasePathIsDir; + wxString m_Headers[2], m_Footers[2]; + + int m_HeaderHeight, m_FooterHeight; + wxHtmlDCRenderer *m_Renderer, *m_RendererHdr; + float m_MarginTop, m_MarginBottom, m_MarginLeft, m_MarginRight, m_MarginSpace; + + // list of HTML filters + static wxList m_Filters; + + wxDECLARE_NO_COPY_CLASS(wxHtmlPrintout); +}; + + + + + +//-------------------------------------------------------------------------------- +// wxHtmlEasyPrinting +// This class provides very simple interface to printing +// architecture. It allows you to print HTML documents only +// with very few commands. +// +// Note : do not create this class on stack only. +// You should create an instance on app startup and +// use this instance for all printing. Why? The class +// stores page&printer settings in it. +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlEasyPrinting : public wxObject +{ +public: + wxHtmlEasyPrinting(const wxString& name = wxT("Printing"), wxWindow *parentWindow = NULL); + virtual ~wxHtmlEasyPrinting(); + + bool PreviewFile(const wxString &htmlfile); + bool PreviewText(const wxString &htmltext, const wxString& basepath = wxEmptyString); + // Preview file / html-text for printing + // (and offers printing) + // basepath is base directory for opening subsequent files (e.g. from <img> tag) + + bool PrintFile(const wxString &htmlfile); + bool PrintText(const wxString &htmltext, const wxString& basepath = wxEmptyString); + // Print file / html-text w/o preview + + void PageSetup(); + // pop up printer or page setup dialog + + void SetHeader(const wxString& header, int pg = wxPAGE_ALL); + void SetFooter(const wxString& footer, int pg = wxPAGE_ALL); + // sets header/footer for the document. The argument is interpreted as HTML document. + // You can use macros in it: + // @PAGENUM@ is replaced by page number + // @PAGESCNT@ is replaced by total number of pages + // + // pg is one of wxPAGE_ODD, wxPAGE_EVEN and wx_PAGE_ALL constants. + // You can set different header/footer for odd and even pages + + void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = 0); + // Sets fonts to be used when displaying HTML page. (if size null then default sizes used) + + // Sets font sizes to be relative to the given size or the system + // default size; use either specified or default font + void SetStandardFonts(int size = -1, + const wxString& normal_face = wxEmptyString, + const wxString& fixed_face = wxEmptyString); + + wxPrintData *GetPrintData(); + wxPageSetupDialogData *GetPageSetupData() {return m_PageSetupData;} + // return page setting data objects. + // (You can set their parameters.) + + wxWindow* GetParentWindow() const { return m_ParentWindow; } + // get the parent window + void SetParentWindow(wxWindow* window) { m_ParentWindow = window; } + // set the parent window + + const wxString& GetName() const { return m_Name; } + // get the printout name + void SetName(const wxString& name) { m_Name = name; } + // set the printout name + +protected: + virtual wxHtmlPrintout *CreatePrintout(); + virtual bool DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2); + virtual bool DoPrint(wxHtmlPrintout *printout); + +private: + wxPrintData *m_PrintData; + wxPageSetupDialogData *m_PageSetupData; + wxString m_Name; + int m_FontsSizesArr[7]; + int *m_FontsSizes; + wxString m_FontFaceFixed, m_FontFaceNormal; + + enum FontMode + { + FontMode_Explicit, + FontMode_Standard + }; + FontMode m_fontMode; + + wxString m_Headers[2], m_Footers[2]; + wxWindow *m_ParentWindow; + + wxDECLARE_NO_COPY_CLASS(wxHtmlEasyPrinting); +}; + + + + +#endif // wxUSE_HTML & wxUSE_PRINTING_ARCHITECTURE + +#endif // _WX_HTMPRINT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/m_templ.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/m_templ.h new file mode 100644 index 0000000000..58603ac086 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/m_templ.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/m_templ.h +// Purpose: Modules template file +// Author: Vaclav Slavik +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + +DESCRIPTION: +This is set of macros for easier writing of tag handlers. How to use it? +See mod_fonts.cpp for example... + +Attention! This is quite strange C++ bastard. Before using it, +I STRONGLY recommend reading and understanding these macros!! + +*/ + + +#ifndef _WX_M_TEMPL_H_ +#define _WX_M_TEMPL_H_ + +#include "wx/defs.h" + +#if wxUSE_HTML + +#include "wx/html/winpars.h" + +#define TAG_HANDLER_BEGIN(name,tags) \ + class wxHTML_Handler_##name : public wxHtmlWinTagHandler \ + { \ + public: \ + wxString GetSupportedTags() {return wxT(tags);} + + + +#define TAG_HANDLER_VARS \ + private: + +#define TAG_HANDLER_CONSTR(name) \ + public: \ + wxHTML_Handler_##name () : wxHtmlWinTagHandler() + + +#define TAG_HANDLER_PROC(varib) \ + public: \ + bool HandleTag(const wxHtmlTag& varib) + + + +#define TAG_HANDLER_END(name) \ + }; + + + + +#define TAGS_MODULE_BEGIN(name) \ + class wxHTML_Module##name : public wxHtmlTagsModule \ + { \ + DECLARE_DYNAMIC_CLASS(wxHTML_Module##name ) \ + public: \ + void FillHandlersTable(wxHtmlWinParser *parser) \ + { + + + + +#define TAGS_MODULE_ADD(handler) \ + parser->AddTagHandler(new wxHTML_Handler_##handler); + + + + +#define TAGS_MODULE_END(name) \ + } \ + }; \ + IMPLEMENT_DYNAMIC_CLASS(wxHTML_Module##name , wxHtmlTagsModule) + + + +#endif +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/styleparams.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/styleparams.h new file mode 100644 index 0000000000..8269c12459 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/styleparams.h @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/styleparams.h +// Purpose: wxHtml helper code for extracting style parameters +// Author: Nigel Paton +// Copyright: wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HTML_STYLEPARAMS_H_ +#define _WX_HTML_STYLEPARAMS_H_ + +#include "wx/defs.h" + +#if wxUSE_HTML + +#include "wx/arrstr.h" + +class WXDLLIMPEXP_FWD_HTML wxHtmlTag; + +// This is a private class used by wxHTML to parse "style" attributes of HTML +// elements. Currently both parsing and support for the parsed values is pretty +// trivial. +class WXDLLIMPEXP_HTML wxHtmlStyleParams +{ +public: + // Construct a style parameters object corresponding to the style attribute + // of the given HTML tag. + wxHtmlStyleParams(const wxHtmlTag& tag); + + // Check whether the named parameter is present or not. + bool HasParam(const wxString& par) const + { + return m_names.Index(par, false /* ignore case */) != wxNOT_FOUND; + } + + // Get the value of the named parameter, return empty string if none. + wxString GetParam(const wxString& par) const + { + int index = m_names.Index(par, false); + return index == wxNOT_FOUND ? wxString() : m_values[index]; + } + +private: + // Arrays if names and values of the parameters + wxArrayString + m_names, + m_values; +}; + +#endif // wxUSE_HTML + +#endif // _WX_HTML_STYLEPARAMS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/webkit.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/webkit.h new file mode 100644 index 0000000000..87003672b4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/webkit.h @@ -0,0 +1,239 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/webkit.h +// Purpose: wxWebKitCtrl - embeddable web kit control +// Author: Jethro Grassie / Kevin Ollivier +// Modified by: +// Created: 2004-4-16 +// Copyright: (c) Jethro Grassie / Kevin Ollivier +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WEBKIT_H +#define _WX_WEBKIT_H + +#if wxUSE_WEBKIT + +#if !defined(__WXMAC__) && !defined(__WXCOCOA__) +#error "wxWebKitCtrl not implemented for this platform" +#endif + +#include "wx/control.h" +DECLARE_WXCOCOA_OBJC_CLASS(WebView); + +// ---------------------------------------------------------------------------- +// Web Kit Control +// ---------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_CORE(const char) wxWebKitCtrlNameStr[]; + +class WXDLLIMPEXP_CORE wxWebKitCtrl : public wxControl +{ +public: + DECLARE_DYNAMIC_CLASS(wxWebKitCtrl) + + wxWebKitCtrl() {} + wxWebKitCtrl(wxWindow *parent, + wxWindowID winID, + const wxString& strURL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxWebKitCtrlNameStr) + { + Create(parent, winID, strURL, pos, size, style, validator, name); + } + bool Create(wxWindow *parent, + wxWindowID winID, + const wxString& strURL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxWebKitCtrlNameStr); + virtual ~wxWebKitCtrl(); + + void LoadURL(const wxString &url); + + bool CanGoBack(); + bool CanGoForward(); + bool GoBack(); + bool GoForward(); + void Reload(); + void Stop(); + bool CanGetPageSource(); + wxString GetPageSource(); + void SetPageSource(const wxString& source, const wxString& baseUrl = wxEmptyString); + wxString GetPageURL(){ return m_currentURL; } + void SetPageTitle(const wxString& title) { m_pageTitle = title; } + wxString GetPageTitle(){ return m_pageTitle; } + + // since these worked in 2.6, add wrappers + void SetTitle(const wxString& title) { SetPageTitle(title); } + wxString GetTitle() { return GetPageTitle(); } + + wxString GetSelection(); + + bool CanIncreaseTextSize(); + void IncreaseTextSize(); + bool CanDecreaseTextSize(); + void DecreaseTextSize(); + + void Print(bool showPrompt = false); + + void MakeEditable(bool enable = true); + bool IsEditable(); + + wxString RunScript(const wxString& javascript); + + void SetScrollPos(int pos); + int GetScrollPos(); + + // don't hide base class virtuals + virtual void SetScrollPos( int orient, int pos, bool refresh = true ) + { return wxControl::SetScrollPos(orient, pos, refresh); } + virtual int GetScrollPos( int orient ) const + { return wxControl::GetScrollPos(orient); } + + //we need to resize the webview when the control size changes + void OnSize(wxSizeEvent &event); + void OnMove(wxMoveEvent &event); + void OnMouseEvents(wxMouseEvent &event); +protected: + DECLARE_EVENT_TABLE() + void MacVisibilityChanged(); + +private: + wxWindow *m_parent; + wxWindowID m_windowID; + wxString m_currentURL; + wxString m_pageTitle; + + WX_WebView m_webView; + + // we may use this later to setup our own mouse events, + // so leave it in for now. + void* m_webKitCtrlEventHandler; +}; + +// ---------------------------------------------------------------------------- +// Web Kit Events +// ---------------------------------------------------------------------------- + +enum { + wxWEBKIT_STATE_START = 1, + wxWEBKIT_STATE_NEGOTIATING = 2, + wxWEBKIT_STATE_REDIRECTING = 4, + wxWEBKIT_STATE_TRANSFERRING = 8, + wxWEBKIT_STATE_STOP = 16, + wxWEBKIT_STATE_FAILED = 32 +}; + +enum { + wxWEBKIT_NAV_LINK_CLICKED = 1, + wxWEBKIT_NAV_BACK_NEXT = 2, + wxWEBKIT_NAV_FORM_SUBMITTED = 4, + wxWEBKIT_NAV_RELOAD = 8, + wxWEBKIT_NAV_FORM_RESUBMITTED = 16, + wxWEBKIT_NAV_OTHER = 32 + +}; + + + +class WXDLLIMPEXP_CORE wxWebKitBeforeLoadEvent : public wxCommandEvent +{ + DECLARE_DYNAMIC_CLASS( wxWebKitBeforeLoadEvent ) + +public: + bool IsCancelled() { return m_cancelled; } + void Cancel(bool cancel = true) { m_cancelled = cancel; } + wxString GetURL() { return m_url; } + void SetURL(const wxString& url) { m_url = url; } + void SetNavigationType(int navType) { m_navType = navType; } + int GetNavigationType() { return m_navType; } + + wxWebKitBeforeLoadEvent( wxWindow* win = NULL ); + wxEvent *Clone(void) const { return new wxWebKitBeforeLoadEvent(*this); } + +protected: + bool m_cancelled; + wxString m_url; + int m_navType; +}; + +class WXDLLIMPEXP_CORE wxWebKitStateChangedEvent : public wxCommandEvent +{ + DECLARE_DYNAMIC_CLASS( wxWebKitStateChangedEvent ) + +public: + int GetState() { return m_state; } + void SetState(const int state) { m_state = state; } + wxString GetURL() { return m_url; } + void SetURL(const wxString& url) { m_url = url; } + + wxWebKitStateChangedEvent( wxWindow* win = NULL ); + wxEvent *Clone(void) const { return new wxWebKitStateChangedEvent(*this); } + +protected: + int m_state; + wxString m_url; +}; + + +class WXDLLIMPEXP_CORE wxWebKitNewWindowEvent : public wxCommandEvent +{ + DECLARE_DYNAMIC_CLASS( wxWebKitNewWindowEvent ) +public: + wxString GetURL() const { return m_url; } + void SetURL(const wxString& url) { m_url = url; } + wxString GetTargetName() const { return m_targetName; } + void SetTargetName(const wxString& name) { m_targetName = name; } + + wxWebKitNewWindowEvent( wxWindow* win = (wxWindow*)(NULL)); + wxEvent *Clone(void) const { return new wxWebKitNewWindowEvent(*this); } + +private: + wxString m_url; + wxString m_targetName; +}; + +typedef void (wxEvtHandler::*wxWebKitStateChangedEventFunction)(wxWebKitStateChangedEvent&); +typedef void (wxEvtHandler::*wxWebKitBeforeLoadEventFunction)(wxWebKitBeforeLoadEvent&); +typedef void (wxEvtHandler::*wxWebKitNewWindowEventFunction)(wxWebKitNewWindowEvent&); + +#define wxWebKitStateChangedEventHandler( func ) \ + wxEVENT_HANDLER_CAST( wxWebKitStateChangedEventFunction, func ) + +#define wxWebKitBeforeLoadEventHandler( func ) \ + wxEVENT_HANDLER_CAST( wxWebKitBeforeLoadEventFunction, func ) + +#define wxWebKitNewWindowEventHandler( func ) \ + wxEVENT_HANDLER_CAST( wxWebKitNewWindowEventFunction, func ) + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_WEBKIT_STATE_CHANGED, wxWebKitStateChangedEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_WEBKIT_BEFORE_LOAD, wxWebKitBeforeLoadEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_WEBKIT_NEW_WINDOW, wxWebKitNewWindowEvent ); + +#define EVT_WEBKIT_STATE_CHANGED(func) \ + wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_STATE_CHANGED, \ + wxID_ANY, \ + wxID_ANY, \ + wxWebKitStateChangedEventHandler( func ), \ + NULL ), + +#define EVT_WEBKIT_BEFORE_LOAD(func) \ + wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_BEFORE_LOAD, \ + wxID_ANY, \ + wxID_ANY, \ + wxWebKitBeforeLoadEventHandler( func ), \ + NULL ), + +#define EVT_WEBKIT_NEW_WINDOW(func) \ + wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_NEW_WINDOW, \ + wxID_ANY, \ + wxID_ANY, \ + wxWebKitNewWindowEventHandler( func ), \ + NULL ), +#endif // wxUSE_WEBKIT + +#endif + // _WX_WEBKIT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/winpars.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/winpars.h new file mode 100644 index 0000000000..a778dfa85f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/html/winpars.h @@ -0,0 +1,312 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/html/winpars.h +// Purpose: wxHtmlWinParser class (parser to be used with wxHtmlWindow) +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WINPARS_H_ +#define _WX_WINPARS_H_ + +#include "wx/defs.h" +#if wxUSE_HTML + +#include "wx/module.h" +#include "wx/font.h" +#include "wx/html/htmlpars.h" +#include "wx/html/htmlcell.h" +#include "wx/encconv.h" + +class WXDLLIMPEXP_FWD_HTML wxHtmlWindow; +class WXDLLIMPEXP_FWD_HTML wxHtmlWindowInterface; +class WXDLLIMPEXP_FWD_HTML wxHtmlWinParser; +class WXDLLIMPEXP_FWD_HTML wxHtmlWinTagHandler; +class WXDLLIMPEXP_FWD_HTML wxHtmlTagsModule; + + +//-------------------------------------------------------------------------------- +// wxHtmlWinParser +// This class is derived from wxHtmlParser and its mail goal +// is to parse HTML input so that it can be displayed in +// wxHtmlWindow. It uses special wxHtmlWinTagHandler. +//-------------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlWinParser : public wxHtmlParser +{ + DECLARE_ABSTRACT_CLASS(wxHtmlWinParser) + friend class wxHtmlWindow; + +public: + wxHtmlWinParser(wxHtmlWindowInterface *wndIface = NULL); + + virtual ~wxHtmlWinParser(); + + virtual void InitParser(const wxString& source); + virtual void DoneParser(); + virtual wxObject* GetProduct(); + + virtual wxFSFile *OpenURL(wxHtmlURLType type, const wxString& url) const; + + // Set's the DC used for parsing. If SetDC() is not called, + // parsing won't proceed + virtual void SetDC(wxDC *dc, double pixel_scale = 1.0) + { SetDC(dc, pixel_scale, pixel_scale); } + void SetDC(wxDC *dc, double pixel_scale, double font_scale); + + wxDC *GetDC() {return m_DC;} + double GetPixelScale() {return m_PixelScale;} + int GetCharHeight() const {return m_CharHeight;} + int GetCharWidth() const {return m_CharWidth;} + + // NOTE : these functions do _not_ return _actual_ + // height/width. They return h/w of default font + // for this DC. If you want actual values, call + // GetDC()->GetChar...() + + // returns interface to the rendering window + wxHtmlWindowInterface *GetWindowInterface() {return m_windowInterface;} +#if WXWIN_COMPATIBILITY_2_6 + // deprecated, use GetWindowInterface()->GetHTMLWindow() instead + wxDEPRECATED( wxHtmlWindow *GetWindow() ); +#endif + + // Sets fonts to be used when displaying HTML page. (if size null then default sizes used). + void SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes = NULL); + + // Sets font sizes to be relative to the given size or the system + // default size; use either specified or default font + void SetStandardFonts(int size = -1, + const wxString& normal_face = wxEmptyString, + const wxString& fixed_face = wxEmptyString); + + // Adds tags module. see wxHtmlTagsModule for details. + static void AddModule(wxHtmlTagsModule *module); + + static void RemoveModule(wxHtmlTagsModule *module); + + // parsing-related methods. These methods are called by tag handlers: + + // Returns pointer to actual container. Common use in tag handler is : + // m_WParser->GetContainer()->InsertCell(new ...); + wxHtmlContainerCell *GetContainer() const {return m_Container;} + + // opens new container. This container is sub-container of opened + // container. Sets GetContainer to newly created container + // and returns it. + wxHtmlContainerCell *OpenContainer(); + + // works like OpenContainer except that new container is not created + // but c is used. You can use this to directly set actual container + wxHtmlContainerCell *SetContainer(wxHtmlContainerCell *c); + + // closes the container and sets actual Container to upper-level + // container + wxHtmlContainerCell *CloseContainer(); + + int GetFontSize() const {return m_FontSize;} + void SetFontSize(int s); + // Try to map a font size in points to the HTML 1-7 font size range. + void SetFontPointSize(int pt); + int GetFontBold() const {return m_FontBold;} + void SetFontBold(int x) {m_FontBold = x;} + int GetFontItalic() const {return m_FontItalic;} + void SetFontItalic(int x) {m_FontItalic = x;} + int GetFontUnderlined() const {return m_FontUnderlined;} + void SetFontUnderlined(int x) {m_FontUnderlined = x;} + int GetFontFixed() const {return m_FontFixed;} + void SetFontFixed(int x) {m_FontFixed = x;} + wxString GetFontFace() const {return GetFontFixed() ? m_FontFaceFixed : m_FontFaceNormal;} + void SetFontFace(const wxString& face); + + int GetAlign() const {return m_Align;} + void SetAlign(int a) {m_Align = a;} + + wxHtmlScriptMode GetScriptMode() const { return m_ScriptMode; } + void SetScriptMode(wxHtmlScriptMode mode) { m_ScriptMode = mode; } + long GetScriptBaseline() const { return m_ScriptBaseline; } + void SetScriptBaseline(long base) { m_ScriptBaseline = base; } + + const wxColour& GetLinkColor() const { return m_LinkColor; } + void SetLinkColor(const wxColour& clr) { m_LinkColor = clr; } + const wxColour& GetActualColor() const { return m_ActualColor; } + void SetActualColor(const wxColour& clr) { m_ActualColor = clr ;} + const wxColour& GetActualBackgroundColor() const { return m_ActualBackgroundColor; } + void SetActualBackgroundColor(const wxColour& clr) { m_ActualBackgroundColor = clr;} + int GetActualBackgroundMode() const { return m_ActualBackgroundMode; } + void SetActualBackgroundMode(int mode) { m_ActualBackgroundMode = mode;} + const wxHtmlLinkInfo& GetLink() const { return m_Link; } + void SetLink(const wxHtmlLinkInfo& link); + + // applies current parser state (link, sub/supscript, ...) to given cell + void ApplyStateToCell(wxHtmlCell *cell); + + // Needs to be called after inserting a cell that interrupts the flow of + // the text like e.g. <img> and tells us to not consider any of the + // following space as being part of the same space run as before. + void StopCollapsingSpaces() { m_tmpLastWasSpace = false; } + +#if !wxUSE_UNICODE + void SetInputEncoding(wxFontEncoding enc); + wxFontEncoding GetInputEncoding() const { return m_InputEnc; } + wxFontEncoding GetOutputEncoding() const { return m_OutputEnc; } + wxEncodingConverter *GetEncodingConverter() const { return m_EncConv; } +#endif + + // creates font depending on m_Font* members. + virtual wxFont* CreateCurrentFont(); + + enum WhitespaceMode + { + Whitespace_Normal, // normal mode, collapse whitespace + Whitespace_Pre // inside <pre>, keep whitespace as-is + }; + + // change the current whitespace handling mode + void SetWhitespaceMode(WhitespaceMode mode) { m_whitespaceMode = mode; } + WhitespaceMode GetWhitespaceMode() const { return m_whitespaceMode; } + +protected: + virtual void AddText(const wxString& txt); + +private: + void FlushWordBuf(wxChar *temp, int& len); + void AddWord(wxHtmlWordCell *word); + void AddWord(const wxString& word) + { AddWord(new wxHtmlWordCell(word, *(GetDC()))); } + void AddPreBlock(const wxString& text); + + bool m_tmpLastWasSpace; + wxChar *m_tmpStrBuf; + size_t m_tmpStrBufSize; + // temporary variables used by AddText + wxHtmlWindowInterface *m_windowInterface; + // window we're parsing for + double m_PixelScale, m_FontScale; + wxDC *m_DC; + // Device Context we're parsing for + static wxList m_Modules; + // list of tags modules (see wxHtmlTagsModule for details) + // This list is used to initialize m_Handlers member. + + wxHtmlContainerCell *m_Container; + // current container. See Open/CloseContainer for details. + + int m_FontBold, m_FontItalic, m_FontUnderlined, m_FontFixed; // this is not true,false but 1,0, we need it for indexing + int m_FontSize; // From 1 (smallest) to 7, default is 3. + wxColour m_LinkColor; + wxColour m_ActualColor; + wxColour m_ActualBackgroundColor; + int m_ActualBackgroundMode; + // basic font parameters. + wxHtmlLinkInfo m_Link; + // actual hypertext link or empty string + bool m_UseLink; + // true if m_Link is not empty + int m_CharHeight, m_CharWidth; + // average height of normal-sized text + int m_Align; + // actual alignment + wxHtmlScriptMode m_ScriptMode; + // current script mode (sub/sup/normal) + long m_ScriptBaseline; + // current sub/supscript base + + wxFont* m_FontsTable[2][2][2][2][7]; + wxString m_FontsFacesTable[2][2][2][2][7]; +#if !wxUSE_UNICODE + wxFontEncoding m_FontsEncTable[2][2][2][2][7]; +#endif + // table of loaded fonts. 1st four indexes are 0 or 1, depending on on/off + // state of these flags (from left to right): + // [bold][italic][underlined][fixed_size] + // last index is font size : from 0 to 6 (remapped from html sizes 1 to 7) + // Note : this table covers all possible combinations of fonts, but not + // all of them are used, so many items in table are usually NULL. + int m_FontsSizes[7]; + wxString m_FontFaceFixed, m_FontFaceNormal; + // html font sizes and faces of fixed and proportional fonts + +#if !wxUSE_UNICODE + wxChar m_nbsp; + wxFontEncoding m_InputEnc, m_OutputEnc; + // I/O font encodings + wxEncodingConverter *m_EncConv; +#endif + + // current whitespace handling mode + WhitespaceMode m_whitespaceMode; + + wxHtmlWordCell *m_lastWordCell; + + // current position on line, in num. of characters; used to properly + // expand TABs; only updated while inside <pre> + int m_posColumn; + + wxDECLARE_NO_COPY_CLASS(wxHtmlWinParser); +}; + + + + + + +//----------------------------------------------------------------------------- +// wxHtmlWinTagHandler +// This is basicly wxHtmlTagHandler except +// it is extended with protected member m_Parser pointing to +// the wxHtmlWinParser object +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_HTML wxHtmlStyleParams; + +class WXDLLIMPEXP_HTML wxHtmlWinTagHandler : public wxHtmlTagHandler +{ + DECLARE_ABSTRACT_CLASS(wxHtmlWinTagHandler) + +public: + wxHtmlWinTagHandler() : wxHtmlTagHandler() {} + + virtual void SetParser(wxHtmlParser *parser) {wxHtmlTagHandler::SetParser(parser); m_WParser = (wxHtmlWinParser*) parser;} + +protected: + wxHtmlWinParser *m_WParser; // same as m_Parser, but overcasted + + void ApplyStyle(const wxHtmlStyleParams &styleParams); + + wxDECLARE_NO_COPY_CLASS(wxHtmlWinTagHandler); +}; + + + + + + +//---------------------------------------------------------------------------- +// wxHtmlTagsModule +// This is basic of dynamic tag handlers binding. +// The class provides methods for filling parser's handlers +// hash table. +// (See documentation for details) +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlTagsModule : public wxModule +{ + DECLARE_DYNAMIC_CLASS(wxHtmlTagsModule) + +public: + wxHtmlTagsModule() : wxModule() {} + + virtual bool OnInit(); + virtual void OnExit(); + + // This is called by wxHtmlWinParser. + // The method must simply call parser->AddTagHandler(new + // <handler_class_name>); for each handler + virtual void FillHandlersTable(wxHtmlWinParser * WXUNUSED(parser)) { } +}; + + +#endif + +#endif // _WX_WINPARS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/htmllbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/htmllbox.h new file mode 100644 index 0000000000..27c3a36c30 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/htmllbox.h @@ -0,0 +1,321 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/htmllbox.h +// Purpose: wxHtmlListBox is a listbox whose items are wxHtmlCells +// Author: Vadim Zeitlin +// Modified by: +// Created: 31.05.03 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HTMLLBOX_H_ +#define _WX_HTMLLBOX_H_ + +#include "wx/vlbox.h" // base class +#include "wx/html/htmlwin.h" +#include "wx/ctrlsub.h" + +#if wxUSE_FILESYSTEM + #include "wx/filesys.h" +#endif // wxUSE_FILESYSTEM + +class WXDLLIMPEXP_FWD_HTML wxHtmlCell; +class WXDLLIMPEXP_FWD_HTML wxHtmlWinParser; +class WXDLLIMPEXP_FWD_HTML wxHtmlListBoxCache; +class WXDLLIMPEXP_FWD_HTML wxHtmlListBoxStyle; + +extern WXDLLIMPEXP_DATA_HTML(const char) wxHtmlListBoxNameStr[]; +extern WXDLLIMPEXP_DATA_HTML(const char) wxSimpleHtmlListBoxNameStr[]; + +// ---------------------------------------------------------------------------- +// wxHtmlListBox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_HTML wxHtmlListBox : public wxVListBox, + public wxHtmlWindowInterface, + public wxHtmlWindowMouseHelper +{ + DECLARE_ABSTRACT_CLASS(wxHtmlListBox) +public: + // constructors and such + // --------------------- + + // default constructor, you must call Create() later + wxHtmlListBox(); + + // normal constructor which calls Create() internally + wxHtmlListBox(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxHtmlListBoxNameStr); + + // really creates the control and sets the initial number of items in it + // (which may be changed later with SetItemCount()) + // + // the only special style which may be specified here is wxLB_MULTIPLE + // + // returns true on success or false if the control couldn't be created + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxHtmlListBoxNameStr); + + // destructor cleans up whatever resources we use + virtual ~wxHtmlListBox(); + + // override some base class virtuals + virtual void RefreshRow(size_t line); + virtual void RefreshRows(size_t from, size_t to); + virtual void RefreshAll(); + virtual void SetItemCount(size_t count); + +#if wxUSE_FILESYSTEM + // retrieve the file system used by the wxHtmlWinParser: if you use + // relative paths in your HTML, you should use its ChangePathTo() method + wxFileSystem& GetFileSystem() { return m_filesystem; } + const wxFileSystem& GetFileSystem() const { return m_filesystem; } +#endif // wxUSE_FILESYSTEM + + virtual void OnInternalIdle(); + +protected: + // this method must be implemented in the derived class and should return + // the body (i.e. without <html>) of the HTML for the given item + virtual wxString OnGetItem(size_t n) const = 0; + + // this function may be overridden to decorate HTML returned by OnGetItem() + virtual wxString OnGetItemMarkup(size_t n) const; + + + // this method allows to customize the selection appearance: it may be used + // to specify the colour of the text which normally has the given colour + // colFg when it is inside the selection + // + // by default, the original colour is not used at all and all text has the + // same (default for this system) colour inside selection + virtual wxColour GetSelectedTextColour(const wxColour& colFg) const; + + // this is the same as GetSelectedTextColour() but allows to customize the + // background colour -- this is even more rarely used as you can change it + // globally using SetSelectionBackground() + virtual wxColour GetSelectedTextBgColour(const wxColour& colBg) const; + + + // we implement both of these functions in terms of OnGetItem(), they are + // not supposed to be overridden by our descendants + virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const; + virtual wxCoord OnMeasureItem(size_t n) const; + + // override this one to draw custom background for selected items correctly + virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const; + + // this method may be overridden to handle clicking on a link in the + // listbox (by default, clicks on links are simply ignored) + virtual void OnLinkClicked(size_t n, const wxHtmlLinkInfo& link); + + // event handlers + void OnSize(wxSizeEvent& event); + void OnMouseMove(wxMouseEvent& event); + void OnLeftDown(wxMouseEvent& event); + + + // common part of all ctors + void Init(); + + // ensure that the given item is cached + void CacheItem(size_t n) const; + +private: + // wxHtmlWindowInterface methods: + virtual void SetHTMLWindowTitle(const wxString& title); + virtual void OnHTMLLinkClicked(const wxHtmlLinkInfo& link); + virtual wxHtmlOpeningStatus OnHTMLOpeningURL(wxHtmlURLType type, + const wxString& url, + wxString *redirect) const; + virtual wxPoint HTMLCoordsToWindow(wxHtmlCell *cell, + const wxPoint& pos) const; + virtual wxWindow* GetHTMLWindow(); + virtual wxColour GetHTMLBackgroundColour() const; + virtual void SetHTMLBackgroundColour(const wxColour& clr); + virtual void SetHTMLBackgroundImage(const wxBitmap& bmpBg); + virtual void SetHTMLStatusText(const wxString& text); + virtual wxCursor GetHTMLCursor(HTMLCursor type) const; + + // returns index of item that contains given HTML cell + size_t GetItemForCell(const wxHtmlCell *cell) const; + + // return physical coordinates of root wxHtmlCell of n-th item + wxPoint GetRootCellCoords(size_t n) const; + + // Converts physical coordinates stored in @a pos into coordinates + // relative to the root cell of the item under mouse cursor, if any. If no + // cell is found under the cursor, returns false. Otherwise stores the new + // coordinates back into @a pos and pointer to the cell under cursor into + // @a cell and returns true. + bool PhysicalCoordsToCell(wxPoint& pos, wxHtmlCell*& cell) const; + + // The opposite of PhysicalCoordsToCell: converts coordinates relative to + // given cell to physical coordinates in the window + wxPoint CellCoordsToPhysical(const wxPoint& pos, wxHtmlCell *cell) const; + +private: + // this class caches the pre-parsed HTML to speed up display + wxHtmlListBoxCache *m_cache; + + // HTML parser we use + wxHtmlWinParser *m_htmlParser; + +#if wxUSE_FILESYSTEM + // file system used by m_htmlParser + wxFileSystem m_filesystem; +#endif // wxUSE_FILESYSTEM + + // rendering style for the parser which allows us to customize our colours + wxHtmlListBoxStyle *m_htmlRendStyle; + + + // it calls our GetSelectedTextColour() and GetSelectedTextBgColour() + friend class wxHtmlListBoxStyle; + friend class wxHtmlListBoxWinInterface; + + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxHtmlListBox); +}; + + +// ---------------------------------------------------------------------------- +// wxSimpleHtmlListBox +// ---------------------------------------------------------------------------- + +#define wxHLB_DEFAULT_STYLE wxBORDER_SUNKEN +#define wxHLB_MULTIPLE wxLB_MULTIPLE + +class WXDLLIMPEXP_HTML wxSimpleHtmlListBox : + public wxWindowWithItems<wxHtmlListBox, wxItemContainer> +{ + DECLARE_ABSTRACT_CLASS(wxSimpleHtmlListBox) +public: + // wxListbox-compatible constructors + // --------------------------------- + + wxSimpleHtmlListBox() { } + + wxSimpleHtmlListBox(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = wxHLB_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSimpleHtmlListBoxNameStr) + { + Create(parent, id, pos, size, n, choices, style, validator, name); + } + + wxSimpleHtmlListBox(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = wxHLB_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSimpleHtmlListBoxNameStr) + { + Create(parent, id, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = wxHLB_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSimpleHtmlListBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = wxHLB_DEFAULT_STYLE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSimpleHtmlListBoxNameStr); + + virtual ~wxSimpleHtmlListBox(); + + // these must be overloaded otherwise the compiler will complain + // about wxItemContainerImmutable::[G|S]etSelection being pure virtuals... + void SetSelection(int n) + { wxVListBox::SetSelection(n); } + int GetSelection() const + { return wxVListBox::GetSelection(); } + + + // accessing strings + // ----------------- + + virtual unsigned int GetCount() const + { return m_items.GetCount(); } + + virtual wxString GetString(unsigned int n) const; + + // override default unoptimized wxItemContainer::GetStrings() function + wxArrayString GetStrings() const + { return m_items; } + + virtual void SetString(unsigned int n, const wxString& s); + + // resolve ambiguity between wxItemContainer and wxVListBox versions + void Clear(); + +protected: + virtual int DoInsertItems(const wxArrayStringsAdapter & items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void DoSetItemClientData(unsigned int n, void *clientData) + { m_HTMLclientData[n] = clientData; } + + virtual void *DoGetItemClientData(unsigned int n) const + { return m_HTMLclientData[n]; } + + // wxItemContainer methods + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + + // calls wxHtmlListBox::SetItemCount() and RefreshAll() + void UpdateCount(); + + // override these functions just to change their visibility: users of + // wxSimpleHtmlListBox shouldn't be allowed to call them directly! + virtual void SetItemCount(size_t count) + { wxHtmlListBox::SetItemCount(count); } + virtual void SetRowCount(size_t count) + { wxHtmlListBox::SetRowCount(count); } + + virtual wxString OnGetItem(size_t n) const + { return m_items[n]; } + + virtual void InitEvent(wxCommandEvent& event, int n) + { + // we're not a virtual control and we can include the string + // of the item which was clicked: + event.SetString(m_items[n]); + wxVListBox::InitEvent(event, n); + } + + wxArrayString m_items; + wxArrayPtrVoid m_HTMLclientData; + + // Note: For the benefit of old compilers (like gcc-2.8) this should + // not be named m_clientdata as that clashes with the name of an + // anonymous struct member in wxEvtHandler, which we derive from. + + wxDECLARE_NO_COPY_CLASS(wxSimpleHtmlListBox); +}; + +#endif // _WX_HTMLLBOX_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/hyperlink.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/hyperlink.h new file mode 100644 index 0000000000..db183d5a2e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/hyperlink.h @@ -0,0 +1,173 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/hyperlink.h +// Purpose: Hyperlink control +// Author: David Norris <danorris@gmail.com>, Otto Wyss +// Modified by: Ryan Norton, Francesco Montorsi +// Created: 04/02/2005 +// Copyright: (c) 2005 David Norris +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HYPERLINK_H_ +#define _WX_HYPERLINK_H_ + +#include "wx/defs.h" + +#if wxUSE_HYPERLINKCTRL + +#include "wx/control.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +#define wxHL_CONTEXTMENU 0x0001 +#define wxHL_ALIGN_LEFT 0x0002 +#define wxHL_ALIGN_RIGHT 0x0004 +#define wxHL_ALIGN_CENTRE 0x0008 +#define wxHL_DEFAULT_STYLE (wxHL_CONTEXTMENU|wxNO_BORDER|wxHL_ALIGN_CENTRE) + +extern WXDLLIMPEXP_DATA_ADV(const char) wxHyperlinkCtrlNameStr[]; + + +// ---------------------------------------------------------------------------- +// wxHyperlinkCtrl +// ---------------------------------------------------------------------------- + +// A static text control that emulates a hyperlink. The link is displayed +// in an appropriate text style, derived from the control's normal font. +// When the mouse rolls over the link, the cursor changes to a hand and the +// link's color changes to the active color. +// +// Clicking on the link does not launch a web browser; instead, a +// HyperlinkEvent is fired. The event propagates upward until it is caught, +// just like a wxCommandEvent. +// +// Use the EVT_HYPERLINK() to catch link events. +class WXDLLIMPEXP_ADV wxHyperlinkCtrlBase : public wxControl +{ +public: + + // get/set + virtual wxColour GetHoverColour() const = 0; + virtual void SetHoverColour(const wxColour &colour) = 0; + + virtual wxColour GetNormalColour() const = 0; + virtual void SetNormalColour(const wxColour &colour) = 0; + + virtual wxColour GetVisitedColour() const = 0; + virtual void SetVisitedColour(const wxColour &colour) = 0; + + virtual wxString GetURL() const = 0; + virtual void SetURL (const wxString &url) = 0; + + virtual void SetVisited(bool visited = true) = 0; + virtual bool GetVisited() const = 0; + + // NOTE: also wxWindow::Set/GetLabel, wxWindow::Set/GetBackgroundColour, + // wxWindow::Get/SetFont, wxWindow::Get/SetCursor are important ! + + virtual bool HasTransparentBackground() { return true; } + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // checks for validity some of the ctor/Create() function parameters + void CheckParams(const wxString& label, const wxString& url, long style); + +public: + // not part of the public API but needs to be public as used by + // GTK+ callbacks: + void SendEvent(); +}; + +// ---------------------------------------------------------------------------- +// wxHyperlinkEvent +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_ADV wxHyperlinkEvent; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_HYPERLINK, wxHyperlinkEvent ); + +// +// An event fired when the user clicks on the label in a hyperlink control. +// See HyperlinkControl for details. +// +class WXDLLIMPEXP_ADV wxHyperlinkEvent : public wxCommandEvent +{ +public: + wxHyperlinkEvent() {} + wxHyperlinkEvent(wxObject *generator, wxWindowID id, const wxString& url) + : wxCommandEvent(wxEVT_HYPERLINK, id), + m_url(url) + { + SetEventObject(generator); + } + + // Returns the URL associated with the hyperlink control + // that the user clicked on. + wxString GetURL() const { return m_url; } + void SetURL(const wxString &url) { m_url=url; } + + // default copy ctor, assignment operator and dtor are ok + virtual wxEvent *Clone() const { return new wxHyperlinkEvent(*this); } + +private: + + // URL associated with the hyperlink control that the used clicked on. + wxString m_url; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxHyperlinkEvent) +}; + + +// ---------------------------------------------------------------------------- +// event types and macros +// ---------------------------------------------------------------------------- + +typedef void (wxEvtHandler::*wxHyperlinkEventFunction)(wxHyperlinkEvent&); + +#define wxHyperlinkEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxHyperlinkEventFunction, func) + +#define EVT_HYPERLINK(id, fn) \ + wx__DECLARE_EVT1(wxEVT_HYPERLINK, id, wxHyperlinkEventHandler(fn)) + + +#if defined(__WXGTK210__) && !defined(__WXUNIVERSAL__) + #include "wx/gtk/hyperlink.h" +// Note that the native control is only available in Unicode version under MSW. +#elif defined(__WXMSW__) && wxUSE_UNICODE && !defined(__WXUNIVERSAL__) + #include "wx/msw/hyperlink.h" +#else + #include "wx/generic/hyperlink.h" + + class WXDLLIMPEXP_ADV wxHyperlinkCtrl : public wxGenericHyperlinkCtrl + { + public: + wxHyperlinkCtrl() { } + + wxHyperlinkCtrl(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxString& url, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHL_DEFAULT_STYLE, + const wxString& name = wxHyperlinkCtrlNameStr) + : wxGenericHyperlinkCtrl(parent, id, label, url, pos, size, + style, name) + { + } + + private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxHyperlinkCtrl ); + }; +#endif + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_HYPERLINK wxEVT_HYPERLINK + +#endif // wxUSE_HYPERLINKCTRL + +#endif // _WX_HYPERLINK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/icon.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/icon.h new file mode 100644 index 0000000000..27bb3e6921 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/icon.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/icon.h +// Purpose: wxIcon base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ICON_H_BASE_ +#define _WX_ICON_H_BASE_ + +#include "wx/iconloc.h" + + +// a more readable way to tell +#define wxICON_SCREEN_DEPTH (-1) + + +// the wxICON_DEFAULT_TYPE (the wxIcon equivalent of wxBITMAP_DEFAULT_TYPE) +// constant defines the default argument value for wxIcon ctor and wxIcon::LoadFile() +// functions. + +#if defined(__WXMSW__) + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE + #include "wx/msw/icon.h" +#elif defined(__WXMOTIF__) + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #include "wx/motif/icon.h" +#elif defined(__WXGTK20__) + #ifdef __WINDOWS__ + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE + #else + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #endif + #include "wx/generic/icon.h" +#elif defined(__WXGTK__) + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #include "wx/generic/icon.h" +#elif defined(__WXX11__) + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #include "wx/generic/icon.h" +#elif defined(__WXDFB__) + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #include "wx/generic/icon.h" +#elif defined(__WXMAC__) +#if wxOSX_USE_COCOA_OR_CARBON + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICON_RESOURCE + #include "wx/osx/icon.h" +#else + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_PNG_RESOURCE + #include "wx/generic/icon.h" +#endif +#elif defined(__WXCOCOA__) + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICON_RESOURCE + #include "wx/cocoa/icon.h" +#elif defined(__WXPM__) + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE + #include "wx/os2/icon.h" +#endif + +//----------------------------------------------------------------------------- +// wxVariant support +//----------------------------------------------------------------------------- + +#if wxUSE_VARIANT +#include "wx/variant.h" +DECLARE_VARIANT_OBJECT_EXPORTED(wxIcon,WXDLLIMPEXP_CORE) +#endif + + +#endif + // _WX_ICON_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/iconbndl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/iconbndl.h new file mode 100644 index 0000000000..50ad64261d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/iconbndl.h @@ -0,0 +1,132 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/iconbndl.h +// Purpose: wxIconBundle +// Author: Mattia barbon +// Modified by: +// Created: 23.03.02 +// Copyright: (c) Mattia Barbon +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ICONBNDL_H_ +#define _WX_ICONBNDL_H_ + +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" // for wxSize +#include "wx/icon.h" + +#include "wx/dynarray.h" + +class WXDLLIMPEXP_FWD_BASE wxInputStream; + +WX_DECLARE_EXPORTED_OBJARRAY(wxIcon, wxIconArray); + +// this class can't load bitmaps of type wxBITMAP_TYPE_ICO_RESOURCE, +// if you need them, you have to load them manually and call +// wxIconCollection::AddIcon +class WXDLLIMPEXP_CORE wxIconBundle : public wxGDIObject +{ +public: + // Flags that determine what happens if GetIcon() doesn't find the icon of + // exactly the requested size. + enum + { + // Return invalid icon if exact size is not found. + FALLBACK_NONE = 0, + + // Return the icon of the system icon size if exact size is not found. + // May be combined with other non-NONE enum elements to determine what + // happens if the system icon size is not found neither. + FALLBACK_SYSTEM = 1, + + // Return the icon of closest larger size or, if there is no icon of + // larger size in the bundle, the closest icon of smaller size. + FALLBACK_NEAREST_LARGER = 2 + }; + + // default constructor + wxIconBundle(); + + // initializes the bundle with the icon(s) found in the file +#if wxUSE_STREAMS && wxUSE_IMAGE +#if wxUSE_FFILE || wxUSE_FILE + wxIconBundle(const wxString& file, wxBitmapType type = wxBITMAP_TYPE_ANY); +#endif // wxUSE_FFILE || wxUSE_FILE + wxIconBundle(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY); +#endif // wxUSE_STREAMS && wxUSE_IMAGE + + // initializes the bundle with a single icon + wxIconBundle(const wxIcon& icon); + + // default copy ctor and assignment operator are OK + + // adds all the icons contained in the file to the collection, + // if the collection already contains icons with the same + // width and height, they are replaced +#if wxUSE_STREAMS && wxUSE_IMAGE +#if wxUSE_FFILE || wxUSE_FILE + void AddIcon(const wxString& file, wxBitmapType type = wxBITMAP_TYPE_ANY); +#endif // wxUSE_FFILE || wxUSE_FILE + void AddIcon(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY); +#endif // wxUSE_STREAMS && wxUSE_IMAGE + + // adds the icon to the collection, if the collection already + // contains an icon with the same width and height, it is + // replaced + void AddIcon(const wxIcon& icon); + + // returns the icon with the given size; if no such icon exists, + // behavior is specified by the flags. + wxIcon GetIcon(const wxSize& size, int flags = FALLBACK_SYSTEM) const; + + // equivalent to GetIcon(wxSize(size, size)) + wxIcon GetIcon(wxCoord size = wxDefaultCoord, + int flags = FALLBACK_SYSTEM) const + { return GetIcon(wxSize(size, size), flags); } + + // returns the icon exactly of the specified size or wxNullIcon if no icon + // of exactly given size are available + wxIcon GetIconOfExactSize(const wxSize& size) const; + wxIcon GetIconOfExactSize(wxCoord size) const + { return GetIconOfExactSize(wxSize(size, size)); } + + // enumerate all icons in the bundle: don't use these functions if ti can + // be avoided, using GetIcon() directly is better + + // return the number of available icons + size_t GetIconCount() const; + + // return the icon at index (must be < GetIconCount()) + wxIcon GetIconByIndex(size_t n) const; + + // check if we have any icons at all + bool IsEmpty() const { return GetIconCount() == 0; } + +#if WXWIN_COMPATIBILITY_2_8 +#if wxUSE_STREAMS && wxUSE_IMAGE && (wxUSE_FFILE || wxUSE_FILE) + wxDEPRECATED( void AddIcon(const wxString& file, long type) + { + AddIcon(file, (wxBitmapType)type); + } + ) + + wxDEPRECATED_CONSTRUCTOR( wxIconBundle (const wxString& file, long type) + { + AddIcon(file, (wxBitmapType)type); + } + ) +#endif // wxUSE_STREAMS && wxUSE_IMAGE && (wxUSE_FFILE || wxUSE_FILE) +#endif // WXWIN_COMPATIBILITY_2_8 + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + // delete all icons + void DeleteIcons(); + + DECLARE_DYNAMIC_CLASS(wxIconBundle) +}; + +#endif // _WX_ICONBNDL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/iconloc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/iconloc.h new file mode 100644 index 0000000000..9baaaa5297 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/iconloc.h @@ -0,0 +1,80 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/iconloc.h +// Purpose: declaration of wxIconLocation class +// Author: Vadim Zeitlin +// Modified by: +// Created: 21.06.2003 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ICONLOC_H_ +#define _WX_ICONLOC_H_ + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// wxIconLocation: describes the location of an icon +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxIconLocationBase +{ +public: + // ctor takes the name of the file where the icon is + wxEXPLICIT wxIconLocationBase(const wxString& filename = wxEmptyString) + : m_filename(filename) { } + + // default copy ctor, assignment operator and dtor are ok + + + // returns true if this object is valid/initialized + bool IsOk() const { return !m_filename.empty(); } + + // set/get the icon file name + void SetFileName(const wxString& filename) { m_filename = filename; } + const wxString& GetFileName() const { return m_filename; } + +private: + wxString m_filename; +}; + +// under Windows the same file may contain several icons so we also store the +// index of the icon +#if defined(__WINDOWS__) + +class WXDLLIMPEXP_BASE wxIconLocation : public wxIconLocationBase +{ +public: + // ctor takes the name of the file where the icon is and the icons index in + // the file + wxEXPLICIT wxIconLocation(const wxString& file = wxEmptyString, int num = 0); + + // set/get the icon index + void SetIndex(int num) { m_index = num; } + int GetIndex() const { return m_index; } + +private: + int m_index; +}; + +inline +wxIconLocation::wxIconLocation(const wxString& file, int num) + : wxIconLocationBase(file) +{ + SetIndex(num); +} + +#else // !__WINDOWS__ + +// must be a class because we forward declare it as class +class WXDLLIMPEXP_BASE wxIconLocation : public wxIconLocationBase +{ +public: + wxEXPLICIT wxIconLocation(const wxString& filename = wxEmptyString) + : wxIconLocationBase(filename) { } +}; + +#endif // platform + +#endif // _WX_ICONLOC_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagbmp.h new file mode 100644 index 0000000000..262373a70e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagbmp.h @@ -0,0 +1,159 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/imagbmp.h +// Purpose: wxImage BMP, ICO, CUR and ANI handlers +// Author: Robert Roebling, Chris Elliott +// Copyright: (c) Robert Roebling, Chris Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGBMP_H_ +#define _WX_IMAGBMP_H_ + +#include "wx/image.h" + +// defines for saving the BMP file in different formats, Bits Per Pixel +// USE: wximage.SetOption( wxIMAGE_OPTION_BMP_FORMAT, wxBMP_xBPP ); +#define wxIMAGE_OPTION_BMP_FORMAT wxString(wxT("wxBMP_FORMAT")) + +// These two options are filled in upon reading CUR file and can (should) be +// specified when saving a CUR file - they define the hotspot of the cursor: +#define wxIMAGE_OPTION_CUR_HOTSPOT_X wxT("HotSpotX") +#define wxIMAGE_OPTION_CUR_HOTSPOT_Y wxT("HotSpotY") + + +enum +{ + wxBMP_24BPP = 24, // default, do not need to set + //wxBMP_16BPP = 16, // wxQuantize can only do 236 colors? + wxBMP_8BPP = 8, // 8bpp, quantized colors + wxBMP_8BPP_GREY = 9, // 8bpp, rgb averaged to greys + wxBMP_8BPP_GRAY = wxBMP_8BPP_GREY, + wxBMP_8BPP_RED = 10, // 8bpp, red used as greyscale + wxBMP_8BPP_PALETTE = 11, // 8bpp, use the wxImage's palette + wxBMP_4BPP = 4, // 4bpp, quantized colors + wxBMP_1BPP = 1, // 1bpp, quantized "colors" + wxBMP_1BPP_BW = 2 // 1bpp, black & white from red +}; + +// ---------------------------------------------------------------------------- +// wxBMPHandler +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBMPHandler : public wxImageHandler +{ +public: + wxBMPHandler() + { + m_name = wxT("Windows bitmap file"); + m_extension = wxT("bmp"); + m_type = wxBITMAP_TYPE_BMP; + m_mime = wxT("image/x-bmp"); + } + +#if wxUSE_STREAMS + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + +protected: + virtual bool DoCanRead( wxInputStream& stream ); + bool SaveDib(wxImage *image, wxOutputStream& stream, bool verbose, + bool IsBmp, bool IsMask); + bool DoLoadDib(wxImage *image, int width, int height, int bpp, int ncolors, + int comp, wxFileOffset bmpOffset, wxInputStream& stream, + bool verbose, bool IsBmp, bool hasPalette); + bool LoadDib(wxImage *image, wxInputStream& stream, bool verbose, bool IsBmp); +#endif // wxUSE_STREAMS + +private: + DECLARE_DYNAMIC_CLASS(wxBMPHandler) +}; + +#if wxUSE_ICO_CUR +// ---------------------------------------------------------------------------- +// wxICOHandler +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxICOHandler : public wxBMPHandler +{ +public: + wxICOHandler() + { + m_name = wxT("Windows icon file"); + m_extension = wxT("ico"); + m_type = wxBITMAP_TYPE_ICO; + m_mime = wxT("image/x-ico"); + } + +#if wxUSE_STREAMS + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool DoLoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index ); + +protected: + virtual int DoGetImageCount( wxInputStream& stream ); + virtual bool DoCanRead( wxInputStream& stream ); +#endif // wxUSE_STREAMS + +private: + DECLARE_DYNAMIC_CLASS(wxICOHandler) +}; + + +// ---------------------------------------------------------------------------- +// wxCURHandler +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCURHandler : public wxICOHandler +{ +public: + wxCURHandler() + { + m_name = wxT("Windows cursor file"); + m_extension = wxT("cur"); + m_type = wxBITMAP_TYPE_CUR; + m_mime = wxT("image/x-cur"); + } + + // VS: This handler's meat is implemented inside wxICOHandler (the two + // formats are almost identical), but we hide this fact at + // the API level, since it is a mere implementation detail. + +protected: +#if wxUSE_STREAMS + virtual bool DoCanRead( wxInputStream& stream ); +#endif // wxUSE_STREAMS + +private: + DECLARE_DYNAMIC_CLASS(wxCURHandler) +}; +// ---------------------------------------------------------------------------- +// wxANIHandler +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxANIHandler : public wxCURHandler +{ +public: + wxANIHandler() + { + m_name = wxT("Windows animated cursor file"); + m_extension = wxT("ani"); + m_type = wxBITMAP_TYPE_ANI; + m_mime = wxT("image/x-ani"); + } + + +#if wxUSE_STREAMS + virtual bool SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), bool WXUNUSED(verbose=true) ){return false ;} + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + +protected: + virtual int DoGetImageCount( wxInputStream& stream ); + virtual bool DoCanRead( wxInputStream& stream ); +#endif // wxUSE_STREAMS + +private: + DECLARE_DYNAMIC_CLASS(wxANIHandler) +}; + +#endif // wxUSE_ICO_CUR +#endif // _WX_IMAGBMP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/image.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/image.h new file mode 100644 index 0000000000..3e7f39eb0d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/image.h @@ -0,0 +1,651 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/image.h +// Purpose: wxImage class +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGE_H_ +#define _WX_IMAGE_H_ + +#include "wx/defs.h" + +#if wxUSE_IMAGE + +#include "wx/object.h" +#include "wx/string.h" +#include "wx/gdicmn.h" +#include "wx/hashmap.h" +#include "wx/arrstr.h" + +#if wxUSE_STREAMS +# include "wx/stream.h" +#endif + +// on some systems (Unixware 7.x) index is defined as a macro in the headers +// which breaks the compilation below +#undef index + +#define wxIMAGE_OPTION_QUALITY wxString(wxS("quality")) +#define wxIMAGE_OPTION_FILENAME wxString(wxS("FileName")) + +#define wxIMAGE_OPTION_RESOLUTION wxString(wxS("Resolution")) +#define wxIMAGE_OPTION_RESOLUTIONX wxString(wxS("ResolutionX")) +#define wxIMAGE_OPTION_RESOLUTIONY wxString(wxS("ResolutionY")) + +#define wxIMAGE_OPTION_RESOLUTIONUNIT wxString(wxS("ResolutionUnit")) + +#define wxIMAGE_OPTION_MAX_WIDTH wxString(wxS("MaxWidth")) +#define wxIMAGE_OPTION_MAX_HEIGHT wxString(wxS("MaxHeight")) + +#define wxIMAGE_OPTION_ORIGINAL_WIDTH wxString(wxS("OriginalWidth")) +#define wxIMAGE_OPTION_ORIGINAL_HEIGHT wxString(wxS("OriginalHeight")) + +// constants used with wxIMAGE_OPTION_RESOLUTIONUNIT +// +// NB: don't change these values, they correspond to libjpeg constants +enum wxImageResolution +{ + // Resolution not specified + wxIMAGE_RESOLUTION_NONE = 0, + + // Resolution specified in inches + wxIMAGE_RESOLUTION_INCHES = 1, + + // Resolution specified in centimeters + wxIMAGE_RESOLUTION_CM = 2 +}; + +// Constants for wxImage::Scale() for determining the level of quality +enum wxImageResizeQuality +{ + // different image resizing algorithms used by Scale() and Rescale() + wxIMAGE_QUALITY_NEAREST = 0, + wxIMAGE_QUALITY_BILINEAR = 1, + wxIMAGE_QUALITY_BICUBIC = 2, + wxIMAGE_QUALITY_BOX_AVERAGE = 3, + + // default quality is low (but fast) + wxIMAGE_QUALITY_NORMAL = wxIMAGE_QUALITY_NEAREST, + + // highest (but best) quality + wxIMAGE_QUALITY_HIGH = 4 +}; + +// alpha channel values: fully transparent, default threshold separating +// transparent pixels from opaque for a few functions dealing with alpha and +// fully opaque +const unsigned char wxIMAGE_ALPHA_TRANSPARENT = 0; +const unsigned char wxIMAGE_ALPHA_THRESHOLD = 0x80; +const unsigned char wxIMAGE_ALPHA_OPAQUE = 0xff; + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxImageHandler; +class WXDLLIMPEXP_FWD_CORE wxImage; +class WXDLLIMPEXP_FWD_CORE wxPalette; + +//----------------------------------------------------------------------------- +// wxVariant support +//----------------------------------------------------------------------------- + +#if wxUSE_VARIANT +#include "wx/variant.h" +DECLARE_VARIANT_OBJECT_EXPORTED(wxImage,WXDLLIMPEXP_CORE) +#endif + +//----------------------------------------------------------------------------- +// wxImageHandler +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxImageHandler: public wxObject +{ +public: + wxImageHandler() + : m_name(wxEmptyString), m_extension(wxEmptyString), m_mime(), m_type(wxBITMAP_TYPE_INVALID) + { } + +#if wxUSE_STREAMS + // NOTE: LoadFile and SaveFile are not pure virtuals to allow derived classes + // to implement only one of the two + virtual bool LoadFile( wxImage *WXUNUSED(image), wxInputStream& WXUNUSED(stream), + bool WXUNUSED(verbose)=true, int WXUNUSED(index)=-1 ) + { return false; } + virtual bool SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), + bool WXUNUSED(verbose)=true ) + { return false; } + + int GetImageCount( wxInputStream& stream ); + // save the stream position, call DoGetImageCount() and restore the position + + bool CanRead( wxInputStream& stream ) { return CallDoCanRead(stream); } + bool CanRead( const wxString& name ); +#endif // wxUSE_STREAMS + + void SetName(const wxString& name) { m_name = name; } + void SetExtension(const wxString& ext) { m_extension = ext; } + void SetAltExtensions(const wxArrayString& exts) { m_altExtensions = exts; } + void SetType(wxBitmapType type) { m_type = type; } + void SetMimeType(const wxString& type) { m_mime = type; } + const wxString& GetName() const { return m_name; } + const wxString& GetExtension() const { return m_extension; } + const wxArrayString& GetAltExtensions() const { return m_altExtensions; } + wxBitmapType GetType() const { return m_type; } + const wxString& GetMimeType() const { return m_mime; } + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( + void SetType(long type) { SetType((wxBitmapType)type); } + ) +#endif // WXWIN_COMPATIBILITY_2_8 + +protected: +#if wxUSE_STREAMS + // NOTE: this function is allowed to change the current stream position + // since GetImageCount() will take care of restoring it later + virtual int DoGetImageCount( wxInputStream& WXUNUSED(stream) ) + { return 1; } // default return value is 1 image + + // NOTE: this function is allowed to change the current stream position + // since CallDoCanRead() will take care of restoring it later + virtual bool DoCanRead( wxInputStream& stream ) = 0; + + // save the stream position, call DoCanRead() and restore the position + bool CallDoCanRead(wxInputStream& stream); +#endif // wxUSE_STREAMS + + // helper for the derived classes SaveFile() implementations: returns the + // values of x- and y-resolution options specified as the image options if + // any + static wxImageResolution + GetResolutionFromOptions(const wxImage& image, int *x, int *y); + + + wxString m_name; + wxString m_extension; + wxArrayString m_altExtensions; + wxString m_mime; + wxBitmapType m_type; + +private: + DECLARE_CLASS(wxImageHandler) +}; + +//----------------------------------------------------------------------------- +// wxImageHistogram +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxImageHistogramEntry +{ +public: + wxImageHistogramEntry() { index = value = 0; } + unsigned long index; + unsigned long value; +}; + +WX_DECLARE_EXPORTED_HASH_MAP(unsigned long, wxImageHistogramEntry, + wxIntegerHash, wxIntegerEqual, + wxImageHistogramBase); + +class WXDLLIMPEXP_CORE wxImageHistogram : public wxImageHistogramBase +{ +public: + wxImageHistogram() : wxImageHistogramBase(256) { } + + // get the key in the histogram for the given RGB values + static unsigned long MakeKey(unsigned char r, + unsigned char g, + unsigned char b) + { + return (r << 16) | (g << 8) | b; + } + + // find first colour that is not used in the image and has higher + // RGB values than RGB(startR, startG, startB) + // + // returns true and puts this colour in r, g, b (each of which may be NULL) + // on success or returns false if there are no more free colours + bool FindFirstUnusedColour(unsigned char *r, + unsigned char *g, + unsigned char *b, + unsigned char startR = 1, + unsigned char startG = 0, + unsigned char startB = 0 ) const; +}; + +//----------------------------------------------------------------------------- +// wxImage +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxImage: public wxObject +{ +public: + // red, green and blue are 8 bit unsigned integers in the range of 0..255 + // We use the identifier RGBValue instead of RGB, since RGB is #defined + class RGBValue + { + public: + RGBValue(unsigned char r=0, unsigned char g=0, unsigned char b=0) + : red(r), green(g), blue(b) {} + unsigned char red; + unsigned char green; + unsigned char blue; + }; + + // hue, saturation and value are doubles in the range 0.0..1.0 + class HSVValue + { + public: + HSVValue(double h=0.0, double s=0.0, double v=0.0) + : hue(h), saturation(s), value(v) {} + double hue; + double saturation; + double value; + }; + + wxImage() {} + wxImage( int width, int height, bool clear = true ) + { Create( width, height, clear ); } + wxImage( int width, int height, unsigned char* data, bool static_data = false ) + { Create( width, height, data, static_data ); } + wxImage( int width, int height, unsigned char* data, unsigned char* alpha, bool static_data = false ) + { Create( width, height, data, alpha, static_data ); } + + // ctor variants using wxSize: + wxImage( const wxSize& sz, bool clear = true ) + { Create( sz, clear ); } + wxImage( const wxSize& sz, unsigned char* data, bool static_data = false ) + { Create( sz, data, static_data ); } + wxImage( const wxSize& sz, unsigned char* data, unsigned char* alpha, bool static_data = false ) + { Create( sz, data, alpha, static_data ); } + + wxImage( const wxString& name, wxBitmapType type = wxBITMAP_TYPE_ANY, int index = -1 ) + { LoadFile( name, type, index ); } + wxImage( const wxString& name, const wxString& mimetype, int index = -1 ) + { LoadFile( name, mimetype, index ); } + wxImage( const char* const* xpmData ) + { Create(xpmData); } + +#if wxUSE_STREAMS + wxImage( wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY, int index = -1 ) + { LoadFile( stream, type, index ); } + wxImage( wxInputStream& stream, const wxString& mimetype, int index = -1 ) + { LoadFile( stream, mimetype, index ); } +#endif // wxUSE_STREAMS + + bool Create( const char* const* xpmData ); +#ifdef __BORLANDC__ + // needed for Borland 5.5 + wxImage( char** xpmData ) { Create(const_cast<const char* const*>(xpmData)); } + bool Create( char** xpmData ) { return Create(const_cast<const char* const*>(xpmData)); } +#endif + + bool Create( int width, int height, bool clear = true ); + bool Create( int width, int height, unsigned char* data, bool static_data = false ); + bool Create( int width, int height, unsigned char* data, unsigned char* alpha, bool static_data = false ); + + // Create() variants using wxSize: + bool Create( const wxSize& sz, bool clear = true ) + { return Create(sz.GetWidth(), sz.GetHeight(), clear); } + bool Create( const wxSize& sz, unsigned char* data, bool static_data = false ) + { return Create(sz.GetWidth(), sz.GetHeight(), data, static_data); } + bool Create( const wxSize& sz, unsigned char* data, unsigned char* alpha, bool static_data = false ) + { return Create(sz.GetWidth(), sz.GetHeight(), data, alpha, static_data); } + + void Destroy(); + + // initialize the image data with zeroes + void Clear(unsigned char value = 0); + + // creates an identical copy of the image (the = operator + // just raises the ref count) + wxImage Copy() const; + + // return the new image with size width*height + wxImage GetSubImage( const wxRect& rect) const; + + // Paste the image or part of this image into an image of the given size at the pos + // any newly exposed areas will be filled with the rgb colour + // by default if r = g = b = -1 then fill with this image's mask colour or find and + // set a suitable mask colour + wxImage Size( const wxSize& size, const wxPoint& pos, + int r = -1, int g = -1, int b = -1 ) const; + + // pastes image into this instance and takes care of + // the mask colour and out of bounds problems + void Paste( const wxImage &image, int x, int y ); + + // return the new image with size width*height + wxImage Scale( int width, int height, + wxImageResizeQuality quality = wxIMAGE_QUALITY_NORMAL ) const; + + // box averager and bicubic filters for up/down sampling + wxImage ResampleNearest(int width, int height) const; + wxImage ResampleBox(int width, int height) const; + wxImage ResampleBilinear(int width, int height) const; + wxImage ResampleBicubic(int width, int height) const; + + // blur the image according to the specified pixel radius + wxImage Blur(int radius) const; + wxImage BlurHorizontal(int radius) const; + wxImage BlurVertical(int radius) const; + + wxImage ShrinkBy( int xFactor , int yFactor ) const ; + + // rescales the image in place + wxImage& Rescale( int width, int height, + wxImageResizeQuality quality = wxIMAGE_QUALITY_NORMAL ) + { return *this = Scale(width, height, quality); } + + // resizes the image in place + wxImage& Resize( const wxSize& size, const wxPoint& pos, + int r = -1, int g = -1, int b = -1 ) { return *this = Size(size, pos, r, g, b); } + + // Rotates the image about the given point, 'angle' radians. + // Returns the rotated image, leaving this image intact. + wxImage Rotate(double angle, const wxPoint & centre_of_rotation, + bool interpolating = true, wxPoint * offset_after_rotation = NULL) const; + + wxImage Rotate90( bool clockwise = true ) const; + wxImage Rotate180() const; + wxImage Mirror( bool horizontally = true ) const; + + // replace one colour with another + void Replace( unsigned char r1, unsigned char g1, unsigned char b1, + unsigned char r2, unsigned char g2, unsigned char b2 ); + + // Convert to greyscale image. Uses the luminance component (Y) of the image. + // The luma value (YUV) is calculated using (R * weight_r) + (G * weight_g) + (B * weight_b), defaults to ITU-T BT.601 + wxImage ConvertToGreyscale(double weight_r, double weight_g, double weight_b) const; + wxImage ConvertToGreyscale(void) const; + + // convert to monochrome image (<r,g,b> will be replaced by white, + // everything else by black) + wxImage ConvertToMono( unsigned char r, unsigned char g, unsigned char b ) const; + + // Convert to disabled (dimmed) image. + wxImage ConvertToDisabled(unsigned char brightness = 255) const; + + // these routines are slow but safe + void SetRGB( int x, int y, unsigned char r, unsigned char g, unsigned char b ); + void SetRGB( const wxRect& rect, unsigned char r, unsigned char g, unsigned char b ); + unsigned char GetRed( int x, int y ) const; + unsigned char GetGreen( int x, int y ) const; + unsigned char GetBlue( int x, int y ) const; + + void SetAlpha(int x, int y, unsigned char alpha); + unsigned char GetAlpha(int x, int y) const; + + // find first colour that is not used in the image and has higher + // RGB values than <startR,startG,startB> + bool FindFirstUnusedColour( unsigned char *r, unsigned char *g, unsigned char *b, + unsigned char startR = 1, unsigned char startG = 0, + unsigned char startB = 0 ) const; + // Set image's mask to the area of 'mask' that has <r,g,b> colour + bool SetMaskFromImage(const wxImage & mask, + unsigned char mr, unsigned char mg, unsigned char mb); + + // converts image's alpha channel to mask (choosing mask colour + // automatically or using the specified colour for the mask), if it has + // any, does nothing otherwise: + bool ConvertAlphaToMask(unsigned char threshold = wxIMAGE_ALPHA_THRESHOLD); + bool ConvertAlphaToMask(unsigned char mr, unsigned char mg, unsigned char mb, + unsigned char threshold = wxIMAGE_ALPHA_THRESHOLD); + + + // This method converts an image where the original alpha + // information is only available as a shades of a colour + // (actually shades of grey) typically when you draw anti- + // aliased text into a bitmap. The DC drawinf routines + // draw grey values on the black background although they + // actually mean to draw white with differnt alpha values. + // This method reverses it, assuming a black (!) background + // and white text (actually only the red channel is read). + // The method will then fill up the whole image with the + // colour given. + bool ConvertColourToAlpha( unsigned char r, unsigned char g, unsigned char b ); + + static bool CanRead( const wxString& name ); + static int GetImageCount( const wxString& name, wxBitmapType type = wxBITMAP_TYPE_ANY ); + virtual bool LoadFile( const wxString& name, wxBitmapType type = wxBITMAP_TYPE_ANY, int index = -1 ); + virtual bool LoadFile( const wxString& name, const wxString& mimetype, int index = -1 ); + +#if wxUSE_STREAMS + static bool CanRead( wxInputStream& stream ); + static int GetImageCount( wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY ); + virtual bool LoadFile( wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY, int index = -1 ); + virtual bool LoadFile( wxInputStream& stream, const wxString& mimetype, int index = -1 ); +#endif + + virtual bool SaveFile( const wxString& name ) const; + virtual bool SaveFile( const wxString& name, wxBitmapType type ) const; + virtual bool SaveFile( const wxString& name, const wxString& mimetype ) const; + +#if wxUSE_STREAMS + virtual bool SaveFile( wxOutputStream& stream, wxBitmapType type ) const; + virtual bool SaveFile( wxOutputStream& stream, const wxString& mimetype ) const; +#endif + + bool Ok() const { return IsOk(); } + bool IsOk() const; + int GetWidth() const; + int GetHeight() const; + + wxSize GetSize() const + { return wxSize(GetWidth(), GetHeight()); } + + // Gets the type of image found by LoadFile or specified with SaveFile + wxBitmapType GetType() const; + + // Set the image type, this is normally only called if the image is being + // created from data in the given format but not using LoadFile() (e.g. + // wxGIFDecoder uses this) + void SetType(wxBitmapType type); + + // these functions provide fastest access to wxImage data but should be + // used carefully as no checks are done + unsigned char *GetData() const; + void SetData( unsigned char *data, bool static_data=false ); + void SetData( unsigned char *data, int new_width, int new_height, bool static_data=false ); + + unsigned char *GetAlpha() const; // may return NULL! + bool HasAlpha() const { return GetAlpha() != NULL; } + void SetAlpha(unsigned char *alpha = NULL, bool static_data=false); + void InitAlpha(); + void ClearAlpha(); + + // return true if this pixel is masked or has alpha less than specified + // threshold + bool IsTransparent(int x, int y, + unsigned char threshold = wxIMAGE_ALPHA_THRESHOLD) const; + + // Mask functions + void SetMaskColour( unsigned char r, unsigned char g, unsigned char b ); + // Get the current mask colour or find a suitable colour + // returns true if using current mask colour + bool GetOrFindMaskColour( unsigned char *r, unsigned char *g, unsigned char *b ) const; + unsigned char GetMaskRed() const; + unsigned char GetMaskGreen() const; + unsigned char GetMaskBlue() const; + void SetMask( bool mask = true ); + bool HasMask() const; + +#if wxUSE_PALETTE + // Palette functions + bool HasPalette() const; + const wxPalette& GetPalette() const; + void SetPalette(const wxPalette& palette); +#endif // wxUSE_PALETTE + + // Option functions (arbitrary name/value mapping) + void SetOption(const wxString& name, const wxString& value); + void SetOption(const wxString& name, int value); + wxString GetOption(const wxString& name) const; + int GetOptionInt(const wxString& name) const; + bool HasOption(const wxString& name) const; + + unsigned long CountColours( unsigned long stopafter = (unsigned long) -1 ) const; + + // Computes the histogram of the image and fills a hash table, indexed + // with integer keys built as 0xRRGGBB, containing wxImageHistogramEntry + // objects. Each of them contains an 'index' (useful to build a palette + // with the image colours) and a 'value', which is the number of pixels + // in the image with that colour. + // Returned value: # of entries in the histogram + unsigned long ComputeHistogram( wxImageHistogram &h ) const; + + // Rotates the hue of each pixel of the image. angle is a double in the range + // -1.0..1.0 where -1.0 is -360 degrees and 1.0 is 360 degrees + void RotateHue(double angle); + + static wxList& GetHandlers() { return sm_handlers; } + static void AddHandler( wxImageHandler *handler ); + static void InsertHandler( wxImageHandler *handler ); + static bool RemoveHandler( const wxString& name ); + static wxImageHandler *FindHandler( const wxString& name ); + static wxImageHandler *FindHandler( const wxString& extension, wxBitmapType imageType ); + static wxImageHandler *FindHandler( wxBitmapType imageType ); + + static wxImageHandler *FindHandlerMime( const wxString& mimetype ); + + static wxString GetImageExtWildcard(); + + static void CleanUpHandlers(); + static void InitStandardHandlers(); + + static HSVValue RGBtoHSV(const RGBValue& rgb); + static RGBValue HSVtoRGB(const HSVValue& hsv); + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_CONSTRUCTOR( + wxImage(const wxString& name, long type, int index = -1) + { + LoadFile(name, (wxBitmapType)type, index); + } + ) + +#if wxUSE_STREAMS + wxDEPRECATED_CONSTRUCTOR( + wxImage(wxInputStream& stream, long type, int index = -1) + { + LoadFile(stream, (wxBitmapType)type, index); + } + ) + + wxDEPRECATED( + bool LoadFile(wxInputStream& stream, long type, int index = -1) + { + return LoadFile(stream, (wxBitmapType)type, index); + } + ) + + wxDEPRECATED( + bool SaveFile(wxOutputStream& stream, long type) const + { + return SaveFile(stream, (wxBitmapType)type); + } + ) +#endif // wxUSE_STREAMS + + wxDEPRECATED( + bool LoadFile(const wxString& name, long type, int index = -1) + { + return LoadFile(name, (wxBitmapType)type, index); + } + ) + + wxDEPRECATED( + bool SaveFile(const wxString& name, long type) const + { + return SaveFile(name, (wxBitmapType)type); + } + ) + + static wxDEPRECATED( + wxImageHandler *FindHandler(const wxString& ext, long type) + { + return FindHandler(ext, (wxBitmapType)type); + } + ) + + static wxDEPRECATED( + wxImageHandler *FindHandler(long imageType) + { + return FindHandler((wxBitmapType)imageType); + } + ) +#endif // WXWIN_COMPATIBILITY_2_8 + +protected: + static wxList sm_handlers; + + // return the index of the point with the given coordinates or -1 if the + // image is invalid of the coordinates are out of range + // + // note that index must be multiplied by 3 when using it with RGB array + long XYToIndex(int x, int y) const; + + virtual wxObjectRefData* CreateRefData() const; + virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const; + +private: + friend class WXDLLIMPEXP_FWD_CORE wxImageHandler; + + // Possible values for MakeEmptyClone() flags. + enum + { + // Create an image with the same orientation as this one. This is the + // default and only exists for symmetry with SwapOrientation. + Clone_SameOrientation = 0, + + // Create an image with the same height as this image width and the + // same width as this image height. + Clone_SwapOrientation = 1 + }; + + // Returns a new blank image with the same dimensions (or with width and + // height swapped if Clone_SwapOrientation flag is given), alpha, and mask + // as this image itself. This is used by several functions creating + // modified versions of this image. + wxImage MakeEmptyClone(int flags = Clone_SameOrientation) const; + +#if wxUSE_STREAMS + // read the image from the specified stream updating image type if + // successful + bool DoLoad(wxImageHandler& handler, wxInputStream& stream, int index); + + // write the image to the specified stream and also update the image type + // if successful + bool DoSave(wxImageHandler& handler, wxOutputStream& stream) const; +#endif // wxUSE_STREAMS + + DECLARE_DYNAMIC_CLASS(wxImage) +}; + + +extern void WXDLLIMPEXP_CORE wxInitAllImageHandlers(); + +extern WXDLLIMPEXP_DATA_CORE(wxImage) wxNullImage; + +//----------------------------------------------------------------------------- +// wxImage handlers +//----------------------------------------------------------------------------- + +#include "wx/imagbmp.h" +#include "wx/imagpng.h" +#include "wx/imaggif.h" +#include "wx/imagpcx.h" +#include "wx/imagjpeg.h" +#include "wx/imagtga.h" +#include "wx/imagtiff.h" +#include "wx/imagpnm.h" +#include "wx/imagxpm.h" +#include "wx/imagiff.h" + +#endif // wxUSE_IMAGE + +#endif + // _WX_IMAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/imaggif.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imaggif.h new file mode 100644 index 0000000000..1d76a632c8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imaggif.h @@ -0,0 +1,93 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/imaggif.h +// Purpose: wxImage GIF handler +// Author: Vaclav Slavik, Guillermo Rodriguez Garcia, Gershon Elber, Troels K +// Copyright: (c) 1999-2011 Vaclav Slavik, Guillermo Rodriguez Garcia, Gershon Elber, Troels K +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGGIF_H_ +#define _WX_IMAGGIF_H_ + +#include "wx/image.h" + + +//----------------------------------------------------------------------------- +// wxGIFHandler +//----------------------------------------------------------------------------- + +#if wxUSE_GIF + +#define wxIMAGE_OPTION_GIF_COMMENT wxT("GifComment") + +struct wxRGB; +struct GifHashTableType; +class WXDLLIMPEXP_FWD_CORE wxImageArray; // anidecod.h + +class WXDLLIMPEXP_CORE wxGIFHandler : public wxImageHandler +{ +public: + inline wxGIFHandler() + { + m_name = wxT("GIF file"); + m_extension = wxT("gif"); + m_type = wxBITMAP_TYPE_GIF; + m_mime = wxT("image/gif"); + m_hashTable = NULL; + } + +#if wxUSE_STREAMS + virtual bool LoadFile(wxImage *image, wxInputStream& stream, + bool verbose = true, int index = -1); + virtual bool SaveFile(wxImage *image, wxOutputStream& stream, + bool verbose=true); + + // Save animated gif + bool SaveAnimation(const wxImageArray& images, wxOutputStream *stream, + bool verbose = true, int delayMilliSecs = 1000); + +protected: + virtual int DoGetImageCount(wxInputStream& stream); + virtual bool DoCanRead(wxInputStream& stream); + + bool DoSaveFile(const wxImage&, wxOutputStream *, bool verbose, + bool first, int delayMilliSecs, bool loop, + const wxRGB *pal, int palCount, + int mask_index); +#endif // wxUSE_STREAMS +protected: + + // Declarations for saving + + unsigned long m_crntShiftDWord; /* For bytes decomposition into codes. */ + int m_pixelCount; + struct GifHashTableType *m_hashTable; + wxInt16 + m_EOFCode, /* The EOF LZ code. */ + m_clearCode, /* The CLEAR LZ code. */ + m_runningCode, /* The next code algorithm can generate. */ + m_runningBits, /* The number of bits required to represent RunningCode. */ + m_maxCode1, /* 1 bigger than max. possible code, in RunningBits bits. */ + m_crntCode, /* Current algorithm code. */ + m_crntShiftState; /* Number of bits in CrntShiftDWord. */ + wxUint8 m_LZBuf[256]; /* Compressed input is buffered here. */ + + bool InitHashTable(); + void ClearHashTable(); + void InsertHashTable(unsigned long key, int code); + int ExistsHashTable(unsigned long key); + +#if wxUSE_STREAMS + bool CompressOutput(wxOutputStream *, int code); + bool SetupCompress(wxOutputStream *, int bpp); + bool CompressLine(wxOutputStream *, const wxUint8 *line, int lineLen); +#endif + +private: + DECLARE_DYNAMIC_CLASS(wxGIFHandler) +}; + +#endif // wxUSE_GIF + +#endif // _WX_IMAGGIF_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagiff.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagiff.h new file mode 100644 index 0000000000..f7307ba5e1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagiff.h @@ -0,0 +1,43 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/imagiff.h +// Purpose: wxImage handler for Amiga IFF images +// Author: Steffen Gutmann +// Copyright: (c) Steffen Gutmann, 2002 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGE_IFF_H_ +#define _WX_IMAGE_IFF_H_ + +#include "wx/image.h" + +//----------------------------------------------------------------------------- +// wxIFFHandler +//----------------------------------------------------------------------------- + +#if wxUSE_IMAGE && wxUSE_IFF + +class WXDLLIMPEXP_CORE wxIFFHandler : public wxImageHandler +{ +public: + wxIFFHandler() + { + m_name = wxT("IFF file"); + m_extension = wxT("iff"); + m_type = wxBITMAP_TYPE_IFF; + m_mime = wxT("image/x-iff"); + } + +#if wxUSE_STREAMS + virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1); + virtual bool SaveFile(wxImage *image, wxOutputStream& stream, bool verbose=true); +protected: + virtual bool DoCanRead(wxInputStream& stream); +#endif + + DECLARE_DYNAMIC_CLASS(wxIFFHandler) +}; + +#endif // wxUSE_IMAGE && wxUSE_IFF + +#endif // _WX_IMAGE_IFF_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagjpeg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagjpeg.h new file mode 100644 index 0000000000..53f6e06170 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagjpeg.h @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/imagjpeg.h +// Purpose: wxImage JPEG handler +// Author: Vaclav Slavik +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGJPEG_H_ +#define _WX_IMAGJPEG_H_ + +#include "wx/defs.h" + +//----------------------------------------------------------------------------- +// wxJPEGHandler +//----------------------------------------------------------------------------- + +#if wxUSE_LIBJPEG + +#include "wx/image.h" +#include "wx/versioninfo.h" + +class WXDLLIMPEXP_CORE wxJPEGHandler: public wxImageHandler +{ +public: + inline wxJPEGHandler() + { + m_name = wxT("JPEG file"); + m_extension = wxT("jpg"); + m_altExtensions.Add(wxT("jpeg")); + m_altExtensions.Add(wxT("jpe")); + m_type = wxBITMAP_TYPE_JPEG; + m_mime = wxT("image/jpeg"); + } + + static wxVersionInfo GetLibraryVersionInfo(); + +#if wxUSE_STREAMS + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); +protected: + virtual bool DoCanRead( wxInputStream& stream ); +#endif + +private: + DECLARE_DYNAMIC_CLASS(wxJPEGHandler) +}; + +#endif // wxUSE_LIBJPEG + +#endif // _WX_IMAGJPEG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/imaglist.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imaglist.h new file mode 100644 index 0000000000..72255ac710 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imaglist.h @@ -0,0 +1,56 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/imaglist.h +// Purpose: wxImageList base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGLIST_H_BASE_ +#define _WX_IMAGLIST_H_BASE_ + +#include "wx/defs.h" + +/* + * wxImageList is used for wxListCtrl, wxTreeCtrl. These controls refer to + * images for their items by an index into an image list. + * A wxImageList is capable of creating images with optional masks from + * a variety of sources - a single bitmap plus a colour to indicate the mask, + * two bitmaps, or an icon. + * + * Image lists can also create and draw images used for drag and drop functionality. + * This is not yet implemented in wxImageList. We need to discuss a generic API + * for doing drag and drop and see whether it ties in with the Win95 view of it. + * See below for candidate functions and an explanation of how they might be + * used. + */ + +// Flag values for Set/GetImageList +enum +{ + wxIMAGE_LIST_NORMAL, // Normal icons + wxIMAGE_LIST_SMALL, // Small icons + wxIMAGE_LIST_STATE // State icons: unimplemented (see WIN32 documentation) +}; + +// Flags for Draw +#define wxIMAGELIST_DRAW_NORMAL 0x0001 +#define wxIMAGELIST_DRAW_TRANSPARENT 0x0002 +#define wxIMAGELIST_DRAW_SELECTED 0x0004 +#define wxIMAGELIST_DRAW_FOCUSED 0x0008 + +#if defined(__WXMSW__) || defined(__WXMAC__) + #define wxHAS_NATIVE_IMAGELIST +#endif + +#if !defined(wxHAS_NATIVE_IMAGELIST) + #include "wx/generic/imaglist.h" +#elif defined(__WXMSW__) + #include "wx/msw/imaglist.h" +#elif defined(__WXMAC__) + #include "wx/osx/imaglist.h" +#endif + +#endif // _WX_IMAGLIST_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagpcx.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagpcx.h new file mode 100644 index 0000000000..cc9d54fa8a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagpcx.h @@ -0,0 +1,46 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/imagpcx.h +// Purpose: wxImage PCX handler +// Author: Guillermo Rodriguez Garcia <guille@iies.es> +// Copyright: (c) 1999 Guillermo Rodriguez Garcia +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGPCX_H_ +#define _WX_IMAGPCX_H_ + +#include "wx/image.h" + + +//----------------------------------------------------------------------------- +// wxPCXHandler +//----------------------------------------------------------------------------- + +#if wxUSE_PCX +class WXDLLIMPEXP_CORE wxPCXHandler : public wxImageHandler +{ +public: + inline wxPCXHandler() + { + m_name = wxT("PCX file"); + m_extension = wxT("pcx"); + m_type = wxBITMAP_TYPE_PCX; + m_mime = wxT("image/pcx"); + } + +#if wxUSE_STREAMS + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); +protected: + virtual bool DoCanRead( wxInputStream& stream ); +#endif // wxUSE_STREAMS + +private: + DECLARE_DYNAMIC_CLASS(wxPCXHandler) +}; +#endif // wxUSE_PCX + + +#endif + // _WX_IMAGPCX_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagpng.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagpng.h new file mode 100644 index 0000000000..55adcd5f97 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagpng.h @@ -0,0 +1,68 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/imagpng.h +// Purpose: wxImage PNG handler +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGPNG_H_ +#define _WX_IMAGPNG_H_ + +#include "wx/defs.h" + +//----------------------------------------------------------------------------- +// wxPNGHandler +//----------------------------------------------------------------------------- + +#if wxUSE_LIBPNG + +#include "wx/image.h" +#include "wx/versioninfo.h" + +#define wxIMAGE_OPTION_PNG_FORMAT wxT("PngFormat") +#define wxIMAGE_OPTION_PNG_BITDEPTH wxT("PngBitDepth") +#define wxIMAGE_OPTION_PNG_FILTER wxT("PngF") +#define wxIMAGE_OPTION_PNG_COMPRESSION_LEVEL wxT("PngZL") +#define wxIMAGE_OPTION_PNG_COMPRESSION_MEM_LEVEL wxT("PngZM") +#define wxIMAGE_OPTION_PNG_COMPRESSION_STRATEGY wxT("PngZS") +#define wxIMAGE_OPTION_PNG_COMPRESSION_BUFFER_SIZE wxT("PngZB") + +enum +{ + wxPNG_TYPE_COLOUR = 0, + wxPNG_TYPE_GREY = 2, + wxPNG_TYPE_GREY_RED = 3, + wxPNG_TYPE_PALETTE = 4 +}; + +class WXDLLIMPEXP_CORE wxPNGHandler: public wxImageHandler +{ +public: + inline wxPNGHandler() + { + m_name = wxT("PNG file"); + m_extension = wxT("png"); + m_type = wxBITMAP_TYPE_PNG; + m_mime = wxT("image/png"); + } + + static wxVersionInfo GetLibraryVersionInfo(); + +#if wxUSE_STREAMS + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); +protected: + virtual bool DoCanRead( wxInputStream& stream ); +#endif + +private: + DECLARE_DYNAMIC_CLASS(wxPNGHandler) +}; + +#endif + // wxUSE_LIBPNG + +#endif + // _WX_IMAGPNG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagpnm.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagpnm.h new file mode 100644 index 0000000000..aab7c76faa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagpnm.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/imagpnm.h +// Purpose: wxImage PNM handler +// Author: Sylvain Bougnoux +// Copyright: (c) Sylvain Bougnoux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGPNM_H_ +#define _WX_IMAGPNM_H_ + +#include "wx/image.h" + +//----------------------------------------------------------------------------- +// wxPNMHandler +//----------------------------------------------------------------------------- + +#if wxUSE_PNM +class WXDLLIMPEXP_CORE wxPNMHandler : public wxImageHandler +{ +public: + inline wxPNMHandler() + { + m_name = wxT("PNM file"); + m_extension = wxT("pnm"); + m_altExtensions.Add(wxT("ppm")); + m_altExtensions.Add(wxT("pgm")); + m_altExtensions.Add(wxT("pbm")); + m_type = wxBITMAP_TYPE_PNM; + m_mime = wxT("image/pnm"); + } + +#if wxUSE_STREAMS + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); +protected: + virtual bool DoCanRead( wxInputStream& stream ); +#endif + +private: + DECLARE_DYNAMIC_CLASS(wxPNMHandler) +}; +#endif + + +#endif + // _WX_IMAGPNM_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagtga.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagtga.h new file mode 100644 index 0000000000..d11083785f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagtga.h @@ -0,0 +1,46 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/imagtga.h +// Purpose: wxImage TGA handler +// Author: Seth Jackson +// Copyright: (c) 2005 Seth Jackson +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGTGA_H_ +#define _WX_IMAGTGA_H_ + +#include "wx/image.h" + +//----------------------------------------------------------------------------- +// wxTGAHandler +//----------------------------------------------------------------------------- + +#if wxUSE_TGA + +class WXDLLIMPEXP_CORE wxTGAHandler : public wxImageHandler +{ +public: + wxTGAHandler() + { + m_name = wxT("TGA file"); + m_extension = wxT("tga"); + m_altExtensions.Add(wxT("tpic")); + m_type = wxBITMAP_TYPE_TGA; + m_mime = wxT("image/tga"); + } + +#if wxUSE_STREAMS + virtual bool LoadFile(wxImage* image, wxInputStream& stream, + bool verbose = true, int index = -1); + virtual bool SaveFile(wxImage* image, wxOutputStream& stream, + bool verbose = true); +protected: + virtual bool DoCanRead(wxInputStream& stream); +#endif // wxUSE_STREAMS + + DECLARE_DYNAMIC_CLASS(wxTGAHandler) +}; + +#endif // wxUSE_TGA + +#endif // _WX_IMAGTGA_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagtiff.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagtiff.h new file mode 100644 index 0000000000..9182e67173 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagtiff.h @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/imagtiff.h +// Purpose: wxImage TIFF handler +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGTIFF_H_ +#define _WX_IMAGTIFF_H_ + +#include "wx/defs.h" + +//----------------------------------------------------------------------------- +// wxTIFFHandler +//----------------------------------------------------------------------------- + +#if wxUSE_LIBTIFF + +#include "wx/image.h" +#include "wx/versioninfo.h" + +// defines for wxImage::SetOption +#define wxIMAGE_OPTION_TIFF_BITSPERSAMPLE wxString(wxT("BitsPerSample")) +#define wxIMAGE_OPTION_TIFF_SAMPLESPERPIXEL wxString(wxT("SamplesPerPixel")) +#define wxIMAGE_OPTION_TIFF_COMPRESSION wxString(wxT("Compression")) +#define wxIMAGE_OPTION_TIFF_PHOTOMETRIC wxString(wxT("Photometric")) +#define wxIMAGE_OPTION_TIFF_IMAGEDESCRIPTOR wxString(wxT("ImageDescriptor")) + +// for backwards compatibility +#define wxIMAGE_OPTION_BITSPERSAMPLE wxIMAGE_OPTION_TIFF_BITSPERSAMPLE +#define wxIMAGE_OPTION_SAMPLESPERPIXEL wxIMAGE_OPTION_TIFF_SAMPLESPERPIXEL +#define wxIMAGE_OPTION_COMPRESSION wxIMAGE_OPTION_TIFF_COMPRESSION +#define wxIMAGE_OPTION_IMAGEDESCRIPTOR wxIMAGE_OPTION_TIFF_IMAGEDESCRIPTOR + +class WXDLLIMPEXP_CORE wxTIFFHandler: public wxImageHandler +{ +public: + wxTIFFHandler(); + + static wxVersionInfo GetLibraryVersionInfo(); + +#if wxUSE_STREAMS + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); + +protected: + virtual int DoGetImageCount( wxInputStream& stream ); + virtual bool DoCanRead( wxInputStream& stream ); +#endif + +private: + DECLARE_DYNAMIC_CLASS(wxTIFFHandler) +}; + +#endif // wxUSE_LIBTIFF + +#endif // _WX_IMAGTIFF_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagxpm.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagxpm.h new file mode 100644 index 0000000000..16477b2d57 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/imagxpm.h @@ -0,0 +1,44 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/imagxpm.h +// Purpose: wxImage XPM handler +// Author: Vaclav Slavik +// Copyright: (c) 2001 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGXPM_H_ +#define _WX_IMAGXPM_H_ + +#include "wx/image.h" + +#if wxUSE_XPM + +//----------------------------------------------------------------------------- +// wxXPMHandler +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxXPMHandler : public wxImageHandler +{ +public: + inline wxXPMHandler() + { + m_name = wxT("XPM file"); + m_extension = wxT("xpm"); + m_type = wxBITMAP_TYPE_XPM; + m_mime = wxT("image/xpm"); + } + +#if wxUSE_STREAMS + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); +protected: + virtual bool DoCanRead( wxInputStream& stream ); +#endif + +private: + DECLARE_DYNAMIC_CLASS(wxXPMHandler) +}; + +#endif // wxUSE_XPM + +#endif // _WX_IMAGXPM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/infobar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/infobar.h new file mode 100644 index 0000000000..be390a856e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/infobar.h @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/infobar.h +// Purpose: declaration of wxInfoBarBase defining common API of wxInfoBar +// Author: Vadim Zeitlin +// Created: 2009-07-28 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_INFOBAR_H_ +#define _WX_INFOBAR_H_ + +#include "wx/defs.h" + +#if wxUSE_INFOBAR + +#include "wx/control.h" + +// ---------------------------------------------------------------------------- +// wxInfoBar shows non-critical but important information to the user +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxInfoBarBase : public wxControl +{ +public: + // real ctors are provided by the derived classes, just notice that unlike + // most of the other windows, info bar is created hidden and must be + // explicitly shown when it is needed (this is done because it is supposed + // to be shown only intermittently and hiding it after creating it from the + // user code would result in flicker) + wxInfoBarBase() { } + + + // show the info bar with the given message and optionally an icon + virtual void ShowMessage(const wxString& msg, + int flags = wxICON_INFORMATION) = 0; + + // hide the info bar + virtual void Dismiss() = 0; + + // add an extra button to the bar, near the message (replacing the default + // close button which is only shown if no extra buttons are used) + virtual void AddButton(wxWindowID btnid, + const wxString& label = wxString()) = 0; + + // remove a button previously added by AddButton() + virtual void RemoveButton(wxWindowID btnid) = 0; + +private: + wxDECLARE_NO_COPY_CLASS(wxInfoBarBase); +}; + +// currently only GTK+ has a native implementation +#if defined(__WXGTK218__) && !defined(__WXUNIVERSAL__) + #include "wx/gtk/infobar.h" + #define wxHAS_NATIVE_INFOBAR +#endif // wxGTK2 + +// if the generic version is the only one we have, use it +#ifndef wxHAS_NATIVE_INFOBAR + #include "wx/generic/infobar.h" + #define wxInfoBar wxInfoBarGeneric +#endif + +#endif // wxUSE_INFOBAR + +#endif // _WX_INFOBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/init.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/init.h new file mode 100644 index 0000000000..6ce8e82876 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/init.h @@ -0,0 +1,116 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/init.h +// Purpose: wxWidgets initialization and finalization functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 29.06.2003 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_INIT_H_ +#define _WX_INIT_H_ + +#include "wx/defs.h" +#include "wx/chartype.h" + +// ---------------------------------------------------------------------------- +// wxEntry helper functions which allow to have more fine grained control +// ---------------------------------------------------------------------------- + +// do common initialization, return true if ok (in this case wxEntryCleanup +// must be called later), otherwise the program can't use wxWidgets at all +// +// this function also creates wxTheApp as a side effect, if IMPLEMENT_APP +// hadn't been used a dummy default application object is created +// +// note that the parameters may be modified, this is why we pass them by +// reference! +extern bool WXDLLIMPEXP_BASE wxEntryStart(int& argc, wxChar **argv); + +// free the resources allocated by the library in wxEntryStart() and shut it +// down (wxEntryStart() may be called again afterwards if necessary) +extern void WXDLLIMPEXP_BASE wxEntryCleanup(); + + +// ---------------------------------------------------------------------------- +// wxEntry: this function initializes the library, runs the main event loop +// and cleans it up +// ---------------------------------------------------------------------------- + +// note that other, platform-specific, overloads of wxEntry may exist as well +// but this one always exists under all platforms +// +// returns the program exit code +extern int WXDLLIMPEXP_BASE wxEntry(int& argc, wxChar **argv); + +// we overload wxEntry[Start]() to take "char **" pointers too +#if wxUSE_UNICODE + +extern bool WXDLLIMPEXP_BASE wxEntryStart(int& argc, char **argv); +extern int WXDLLIMPEXP_BASE wxEntry(int& argc, char **argv); + +#endif// wxUSE_UNICODE + +// Under Windows we define additional wxEntry() overloads with signature +// compatible with WinMain() and not the traditional main(). +#if wxUSE_GUI && defined(__WINDOWS__) + #include "wx/msw/init.h" +#endif + +// ---------------------------------------------------------------------------- +// Using the library without (explicit) application object: you may avoid using +// wxDECLARE_APP and wxIMPLEMENT_APP macros and call the functions below instead at +// the program startup and termination +// ---------------------------------------------------------------------------- + +// initialize the library (may be called as many times as needed, but each +// call to wxInitialize() must be matched by wxUninitialize()) +extern bool WXDLLIMPEXP_BASE wxInitialize(); +extern bool WXDLLIMPEXP_BASE wxInitialize(int argc, wxChar **argv); +#if wxUSE_UNICODE +extern bool WXDLLIMPEXP_BASE wxInitialize(int argc, char **argv); +#endif + +// clean up -- the library can't be used any more after the last call to +// wxUninitialize() +extern void WXDLLIMPEXP_BASE wxUninitialize(); + +// create an object of this class on stack to initialize/cleanup the library +// automatically +class WXDLLIMPEXP_BASE wxInitializer +{ +public: + // initialize the library + wxInitializer() + { + m_ok = wxInitialize(); + } + + wxInitializer(int argc, wxChar **argv) + { + m_ok = wxInitialize(argc, argv); + } + +#if wxUSE_UNICODE + wxInitializer(int argc, char **argv) + { + m_ok = wxInitialize(argc, argv); + } +#endif // wxUSE_UNICODE + + // has the initialization been successful? (explicit test) + bool IsOk() const { return m_ok; } + + // has the initialization been successful? (implicit test) + operator bool() const { return m_ok; } + + // dtor only does clean up if we initialized the library properly + ~wxInitializer() { if ( m_ok ) wxUninitialize(); } + +private: + bool m_ok; +}; + +#endif // _WX_INIT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/intl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/intl.h new file mode 100644 index 0000000000..fea4d2d65b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/intl.h @@ -0,0 +1,360 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/intl.h +// Purpose: Internationalization and localisation for wxWidgets +// Author: Vadim Zeitlin +// Modified by: Michael N. Filippov <michael@idisys.iae.nsk.su> +// (2003/09/30 - plural forms support) +// Created: 29/01/98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_INTL_H_ +#define _WX_INTL_H_ + +#include "wx/defs.h" +#include "wx/string.h" +#include "wx/translation.h" + +// Make wxLayoutDirection enum available without need for wxUSE_INTL so wxWindow, wxApp +// and other classes are not distrubed by wxUSE_INTL + +enum wxLayoutDirection +{ + wxLayout_Default, + wxLayout_LeftToRight, + wxLayout_RightToLeft +}; + +#if wxUSE_INTL + +#include "wx/fontenc.h" +#include "wx/language.h" + +// ============================================================================ +// global decls +// ============================================================================ + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// ---------------------------------------------------------------------------- +// forward decls +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxLocale; +class WXDLLIMPEXP_FWD_BASE wxLanguageInfoArray; + +// ============================================================================ +// locale support +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxLanguageInfo: encapsulates wxLanguage to OS native lang.desc. +// translation information +// ---------------------------------------------------------------------------- + +struct WXDLLIMPEXP_BASE wxLanguageInfo +{ + int Language; // wxLanguage id + wxString CanonicalName; // Canonical name, e.g. fr_FR +#ifdef __WINDOWS__ + wxUint32 WinLang, // Win32 language identifiers + WinSublang; +#endif // __WINDOWS__ + wxString Description; // human-readable name of the language + wxLayoutDirection LayoutDirection; + +#ifdef __WINDOWS__ + // return the LCID corresponding to this language + wxUint32 GetLCID() const; +#endif // __WINDOWS__ + + // return the locale name corresponding to this language usable with + // setlocale() on the current system + wxString GetLocaleName() const; +}; + +// for Unix systems GetLocaleName() is trivial so implement it inline here, for +// MSW it's implemented in intl.cpp +#ifndef __WINDOWS__ +inline wxString wxLanguageInfo::GetLocaleName() const { return CanonicalName; } +#endif // !__WINDOWS__ + + +// ---------------------------------------------------------------------------- +// wxLocaleCategory: the category of locale settings +// ---------------------------------------------------------------------------- + +enum wxLocaleCategory +{ + // (any) numbers + wxLOCALE_CAT_NUMBER, + + // date/time + wxLOCALE_CAT_DATE, + + // monetary value + wxLOCALE_CAT_MONEY, + + // default category for wxLocaleInfo values which only apply to a single + // category (e.g. wxLOCALE_SHORT_DATE_FMT) + wxLOCALE_CAT_DEFAULT, + + wxLOCALE_CAT_MAX +}; + +// ---------------------------------------------------------------------------- +// wxLocaleInfo: the items understood by wxLocale::GetInfo() +// ---------------------------------------------------------------------------- + +enum wxLocaleInfo +{ + // the thousands separator (for wxLOCALE_CAT_NUMBER or MONEY) + wxLOCALE_THOUSANDS_SEP, + + // the character used as decimal point (for wxLOCALE_CAT_NUMBER or MONEY) + wxLOCALE_DECIMAL_POINT, + + // the stftime()-formats used for short/long date and time representations + // (under some platforms short and long date formats are the same) + // + // NB: these elements should appear in this order, code in GetInfo() relies + // on it + wxLOCALE_SHORT_DATE_FMT, + wxLOCALE_LONG_DATE_FMT, + wxLOCALE_DATE_TIME_FMT, + wxLOCALE_TIME_FMT + +}; + +// ---------------------------------------------------------------------------- +// wxLocale: encapsulates all language dependent settings, including current +// message catalogs, date, time and currency formats (TODO) &c +// ---------------------------------------------------------------------------- + +enum wxLocaleInitFlags +{ + wxLOCALE_DONT_LOAD_DEFAULT = 0x0000, // don't load wxwin.mo + wxLOCALE_LOAD_DEFAULT = 0x0001 // load wxwin.mo? +#if WXWIN_COMPATIBILITY_2_8 + ,wxLOCALE_CONV_ENCODING = 0x0002 // no longer used, simply remove + // it from the existing code +#endif +}; + +class WXDLLIMPEXP_BASE wxLocale +{ +public: + // ctor & dtor + // ----------- + + // call Init() if you use this ctor + wxLocale() { DoCommonInit(); } + + // the ctor has a side effect of changing current locale + wxLocale(const wxString& name, // name (for messages) + const wxString& shortName = wxEmptyString, // dir prefix (for msg files) + const wxString& locale = wxEmptyString, // locale (for setlocale) + bool bLoadDefault = true // preload wxstd.mo? +#if WXWIN_COMPATIBILITY_2_8 + ,bool bConvertEncoding = true // convert Win<->Unix if necessary? +#endif + ) + { + DoCommonInit(); + +#if WXWIN_COMPATIBILITY_2_8 + Init(name, shortName, locale, bLoadDefault, bConvertEncoding); +#else + Init(name, shortName, locale, bLoadDefault); +#endif + } + + wxLocale(int language, // wxLanguage id or custom language + int flags = wxLOCALE_LOAD_DEFAULT) + { + DoCommonInit(); + + Init(language, flags); + } + + // the same as a function (returns true on success) + bool Init(const wxString& name, + const wxString& shortName = wxEmptyString, + const wxString& locale = wxEmptyString, + bool bLoadDefault = true +#if WXWIN_COMPATIBILITY_2_8 + ,bool bConvertEncoding = true +#endif + ); + + // same as second ctor (returns true on success) + bool Init(int language = wxLANGUAGE_DEFAULT, + int flags = wxLOCALE_LOAD_DEFAULT); + + // restores old locale + virtual ~wxLocale(); + + // Try to get user's (or OS's) preferred language setting. + // Return wxLANGUAGE_UNKNOWN if language-guessing algorithm failed + static int GetSystemLanguage(); + + // get the encoding used by default for text on this system, returns + // wxFONTENCODING_SYSTEM if it couldn't be determined + static wxFontEncoding GetSystemEncoding(); + + // get the string describing the system encoding, return empty string if + // couldn't be determined + static wxString GetSystemEncodingName(); + + // get the values of the given locale-dependent datum: the current locale + // is used, the US default value is returned if everything else fails + static wxString GetInfo(wxLocaleInfo index, + wxLocaleCategory cat = wxLOCALE_CAT_DEFAULT); + + // return true if the locale was set successfully + bool IsOk() const { return m_pszOldLocale != NULL; } + + // returns locale name + const wxString& GetLocale() const { return m_strLocale; } + + // return current locale wxLanguage value + int GetLanguage() const { return m_language; } + + // return locale name to be passed to setlocale() + wxString GetSysName() const; + + // return 'canonical' name, i.e. in the form of xx[_YY], where xx is + // language code according to ISO 639 and YY is country name + // as specified by ISO 3166. + wxString GetCanonicalName() const { return m_strShort; } + + // add a prefix to the catalog lookup path: the message catalog files will be + // looked up under prefix/<lang>/LC_MESSAGES, prefix/LC_MESSAGES and prefix + // (in this order). + // + // This only applies to subsequent invocations of AddCatalog()! + static void AddCatalogLookupPathPrefix(const wxString& prefix) + { wxFileTranslationsLoader::AddCatalogLookupPathPrefix(prefix); } + + // add a catalog: it's searched for in standard places (current directory + // first, system one after), but the you may prepend additional directories to + // the search path with AddCatalogLookupPathPrefix(). + // + // The loaded catalog will be used for message lookup by GetString(). + // + // Returns 'true' if it was successfully loaded + bool AddCatalog(const wxString& domain); + bool AddCatalog(const wxString& domain, wxLanguage msgIdLanguage); + bool AddCatalog(const wxString& domain, + wxLanguage msgIdLanguage, const wxString& msgIdCharset); + + // check if the given locale is provided by OS and C run time + static bool IsAvailable(int lang); + + // check if the given catalog is loaded + bool IsLoaded(const wxString& domain) const; + + // Retrieve the language info struct for the given language + // + // Returns NULL if no info found, pointer must *not* be deleted by caller + static const wxLanguageInfo *GetLanguageInfo(int lang); + + // Returns language name in English or empty string if the language + // is not in database + static wxString GetLanguageName(int lang); + + // Returns ISO code ("canonical name") of language or empty string if the + // language is not in database + static wxString GetLanguageCanonicalName(int lang); + + // Find the language for the given locale string which may be either a + // canonical ISO 2 letter language code ("xx"), a language code followed by + // the country code ("xx_XX") or a Windows full language name ("Xxxxx...") + // + // Returns NULL if no info found, pointer must *not* be deleted by caller + static const wxLanguageInfo *FindLanguageInfo(const wxString& locale); + + // Add custom language to the list of known languages. + // Notes: 1) wxLanguageInfo contains platform-specific data + // 2) must be called before Init to have effect + static void AddLanguage(const wxLanguageInfo& info); + + // retrieve the translation for a string in all loaded domains unless + // the szDomain parameter is specified (and then only this domain is + // searched) + // n - additional parameter for PluralFormsParser + // + // return original string if translation is not available + // (in this case an error message is generated the first time + // a string is not found; use wxLogNull to suppress it) + // + // domains are searched in the last to first order, i.e. catalogs + // added later override those added before. + const wxString& GetString(const wxString& origString, + const wxString& domain = wxEmptyString) const + { + return wxGetTranslation(origString, domain); + } + // plural form version of the same: + const wxString& GetString(const wxString& origString, + const wxString& origString2, + unsigned n, + const wxString& domain = wxEmptyString) const + { + return wxGetTranslation(origString, origString2, n, domain); + } + + // Returns the current short name for the locale + const wxString& GetName() const { return m_strShort; } + + // return the contents of .po file header + wxString GetHeaderValue(const wxString& header, + const wxString& domain = wxEmptyString) const; + + // These two methods are for internal use only. First one creates + // ms_languagesDB if it doesn't already exist, second one destroys + // it. + static void CreateLanguagesDB(); + static void DestroyLanguagesDB(); + +private: + bool DoInit(const wxString& name, + const wxString& shortName, + const wxString& locale); + + // copy default table of languages from global static array to + // m_langugagesInfo, called by InitLanguagesDB + static void InitLanguagesDB(); + + // initialize the member fields to default values + void DoCommonInit(); + + wxString m_strLocale, // this locale name + m_strShort; // short name for the locale + int m_language; // this locale wxLanguage value + + const char *m_pszOldLocale; // previous locale from setlocale() + wxLocale *m_pOldLocale; // previous wxLocale + + bool m_initialized; + + wxTranslations m_translations; + + static wxLanguageInfoArray *ms_languagesDB; + + wxDECLARE_NO_COPY_CLASS(wxLocale); +}; + +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +// get the current locale object (note that it may be NULL!) +extern WXDLLIMPEXP_BASE wxLocale* wxGetLocale(); + +#endif // wxUSE_INTL + +#endif // _WX_INTL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/iosfwrap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/iosfwrap.h new file mode 100644 index 0000000000..13fb1f7f89 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/iosfwrap.h @@ -0,0 +1,25 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/iosfwrap.h +// Purpose: includes the correct stream-related forward declarations +// Author: Jan van Dijk <jan@etpmod.phys.tue.nl> +// Modified by: +// Created: 18.12.2002 +// Copyright: wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#if wxUSE_STD_IOSTREAM + +#if wxUSE_IOSTREAMH + // There is no pre-ANSI iosfwd header so we include the full declarations. +# include <iostream.h> +#else +# include <iosfwd> +#endif + +#ifdef __WINDOWS__ +# include "wx/msw/winundef.h" +#endif + +#endif // wxUSE_STD_IOSTREAM + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ioswrap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ioswrap.h new file mode 100644 index 0000000000..5805588ead --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ioswrap.h @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ioswrap.h +// Purpose: includes the correct iostream headers for current compiler +// Author: Vadim Zeitlin +// Modified by: +// Created: 03.02.99 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#if wxUSE_STD_IOSTREAM + +#include "wx/beforestd.h" + +#if wxUSE_IOSTREAMH +# include <iostream.h> +#else +# include <iostream> +#endif + +#include "wx/afterstd.h" + +#ifdef __WINDOWS__ +# include "wx/msw/winundef.h" +#endif + +#endif + // wxUSE_STD_IOSTREAM + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ipc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ipc.h new file mode 100644 index 0000000000..36542e5f09 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ipc.h @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ipc.h +// Purpose: wrapper around different wxIPC classes implementations +// Author: Vadim Zeitlin +// Modified by: +// Created: 15.04.02 +// Copyright: (c) 2002 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IPC_H_ +#define _WX_IPC_H_ + +// Set wxUSE_DDE_FOR_IPC to 1 to use DDE for IPC under Windows. If it is set to +// 0, or if the platform is not Windows, use TCP/IP for IPC implementation + +#if !defined(wxUSE_DDE_FOR_IPC) + #ifdef __WINDOWS__ + #define wxUSE_DDE_FOR_IPC 1 + #else + #define wxUSE_DDE_FOR_IPC 0 + #endif +#endif // !defined(wxUSE_DDE_FOR_IPC) + +#if !defined(__WINDOWS__) + #undef wxUSE_DDE_FOR_IPC + #define wxUSE_DDE_FOR_IPC 0 +#endif + +#if wxUSE_DDE_FOR_IPC + #define wxConnection wxDDEConnection + #define wxServer wxDDEServer + #define wxClient wxDDEClient + + #include "wx/dde.h" +#else // !wxUSE_DDE_FOR_IPC + #define wxConnection wxTCPConnection + #define wxServer wxTCPServer + #define wxClient wxTCPClient + + #include "wx/sckipc.h" +#endif // wxUSE_DDE_FOR_IPC/!wxUSE_DDE_FOR_IPC + +#endif // _WX_IPC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ipcbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ipcbase.h new file mode 100644 index 0000000000..4d69958e4c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ipcbase.h @@ -0,0 +1,263 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/ipcbase.h +// Purpose: Base classes for IPC +// Author: Julian Smart +// Modified by: +// Created: 4/1/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IPCBASEH__ +#define _WX_IPCBASEH__ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" + +enum wxIPCFormat +{ + wxIPC_INVALID = 0, + wxIPC_TEXT = 1, /* CF_TEXT */ + wxIPC_BITMAP = 2, /* CF_BITMAP */ + wxIPC_METAFILE = 3, /* CF_METAFILEPICT */ + wxIPC_SYLK = 4, + wxIPC_DIF = 5, + wxIPC_TIFF = 6, + wxIPC_OEMTEXT = 7, /* CF_OEMTEXT */ + wxIPC_DIB = 8, /* CF_DIB */ + wxIPC_PALETTE = 9, + wxIPC_PENDATA = 10, + wxIPC_RIFF = 11, + wxIPC_WAVE = 12, + wxIPC_UTF16TEXT = 13, /* CF_UNICODE */ + wxIPC_ENHMETAFILE = 14, + wxIPC_FILENAME = 15, /* CF_HDROP */ + wxIPC_LOCALE = 16, + wxIPC_UTF8TEXT = 17, + wxIPC_UTF32TEXT = 18, +#if SIZEOF_WCHAR_T == 2 + wxIPC_UNICODETEXT = wxIPC_UTF16TEXT, +#elif SIZEOF_WCHAR_T == 4 + wxIPC_UNICODETEXT = wxIPC_UTF32TEXT, +#else +# error "Unknown wchar_t size" +#endif + wxIPC_PRIVATE = 20 +}; + +class WXDLLIMPEXP_FWD_BASE wxServerBase; +class WXDLLIMPEXP_FWD_BASE wxClientBase; + +class WXDLLIMPEXP_BASE wxConnectionBase: public wxObject +{ +public: + wxConnectionBase(void *buffer, size_t size); // use external buffer + wxConnectionBase(); // use internal, adaptive buffer + wxConnectionBase(const wxConnectionBase& copy); + virtual ~wxConnectionBase(); + + void SetConnected( bool c ) { m_connected = c; } + bool GetConnected() { return m_connected; } + + // Calls that CLIENT can make + bool Execute(const void *data, size_t size, wxIPCFormat fmt = wxIPC_PRIVATE) + { return DoExecute(data, size, fmt); } + bool Execute(const char *s, size_t size = wxNO_LEN) + { return DoExecute(s, size == wxNO_LEN ? strlen(s) + 1 + : size, wxIPC_TEXT); } + bool Execute(const wchar_t *ws, size_t size = wxNO_LEN) + { return DoExecute(ws, size == wxNO_LEN ? (wcslen(ws) + 1)*sizeof(wchar_t) + : size, wxIPC_UNICODETEXT); } + bool Execute(const wxString& s) + { + const wxScopedCharBuffer buf = s.utf8_str(); + return DoExecute(buf, strlen(buf) + 1, wxIPC_UTF8TEXT); + } + bool Execute(const wxCStrData& cs) + { return Execute(cs.AsString()); } + + virtual const void *Request(const wxString& item, + size_t *size = NULL, + wxIPCFormat format = wxIPC_TEXT) = 0; + + bool Poke(const wxString& item, const void *data, size_t size, + wxIPCFormat fmt = wxIPC_PRIVATE) + { return DoPoke(item, data, size, fmt); } + bool Poke(const wxString& item, const char *s, size_t size = wxNO_LEN) + { return DoPoke(item, s, size == wxNO_LEN ? strlen(s) + 1 + : size, wxIPC_TEXT); } + bool Poke(const wxString& item, const wchar_t *ws, size_t size = wxNO_LEN) + { return DoPoke(item, ws, + size == wxNO_LEN ? (wcslen(ws) + 1)*sizeof(wchar_t) + : size, wxIPC_UNICODETEXT); } + bool Poke(const wxString& item, const wxString s) + { + const wxScopedCharBuffer buf = s.utf8_str(); + return DoPoke(item, buf, strlen(buf) + 1, wxIPC_UTF8TEXT); + } + bool Poke(const wxString& item, const wxCStrData& cs) + { return Poke(item, cs.AsString()); } + + virtual bool StartAdvise(const wxString& item) = 0; + virtual bool StopAdvise(const wxString& item) = 0; + + // Calls that SERVER can make + bool Advise(const wxString& item, const void *data, size_t size, + wxIPCFormat fmt = wxIPC_PRIVATE) + { return DoAdvise(item, data, size, fmt); } + bool Advise(const wxString& item, const char *s, size_t size = wxNO_LEN) + { return DoAdvise(item, s, size == wxNO_LEN ? strlen(s) + 1 + : size, wxIPC_TEXT); } + bool Advise(const wxString& item, const wchar_t *ws, size_t size = wxNO_LEN) + { return DoAdvise(item, ws, + size == wxNO_LEN ? (wcslen(ws) + 1)*sizeof(wchar_t) + : size, wxIPC_UNICODETEXT); } + bool Advise(const wxString& item, const wxString s) + { + const wxScopedCharBuffer buf = s.utf8_str(); + return DoAdvise(item, buf, strlen(buf) + 1, wxIPC_UTF8TEXT); + } + bool Advise(const wxString& item, const wxCStrData& cs) + { return Advise(item, cs.AsString()); } + + // Calls that both can make + virtual bool Disconnect() = 0; + + + // Callbacks to SERVER - override at will + virtual bool OnExec(const wxString& WXUNUSED(topic), + const wxString& WXUNUSED(data)) + { + wxFAIL_MSG( "This method shouldn't be called, if it is, it probably " + "means that you didn't update your old code overriding " + "OnExecute() to use the new parameter types (\"const void *\" " + "instead of \"wxChar *\" and \"size_t\" instead of \"int\"), " + "you must do it or your code wouldn't be executed at all!" ); + return false; + } + + // deprecated function kept for backwards compatibility: usually you will + // want to override OnExec() above instead which receives its data in a more + // convenient format + virtual bool OnExecute(const wxString& topic, + const void *data, + size_t size, + wxIPCFormat format) + { return OnExec(topic, GetTextFromData(data, size, format)); } + + virtual const void *OnRequest(const wxString& WXUNUSED(topic), + const wxString& WXUNUSED(item), + size_t *size, + wxIPCFormat WXUNUSED(format)) + { *size = 0; return NULL; } + + virtual bool OnPoke(const wxString& WXUNUSED(topic), + const wxString& WXUNUSED(item), + const void *WXUNUSED(data), + size_t WXUNUSED(size), + wxIPCFormat WXUNUSED(format)) + { return false; } + + virtual bool OnStartAdvise(const wxString& WXUNUSED(topic), + const wxString& WXUNUSED(item)) + { return false; } + + virtual bool OnStopAdvise(const wxString& WXUNUSED(topic), + const wxString& WXUNUSED(item)) + { return false; } + + // Callbacks to CLIENT - override at will + virtual bool OnAdvise(const wxString& WXUNUSED(topic), + const wxString& WXUNUSED(item), + const void *WXUNUSED(data), + size_t WXUNUSED(size), + wxIPCFormat WXUNUSED(format)) + { return false; } + + // Callbacks to BOTH + virtual bool OnDisconnect() { delete this; return true; } + + + // return true if this is one of the formats used for textual data + // transmission + static bool IsTextFormat(wxIPCFormat format) + { + return format == wxIPC_TEXT || + format == wxIPC_UTF8TEXT || + format == wxIPC_UTF16TEXT || + format == wxIPC_UTF32TEXT; + } + + // converts from the data and format into a wxString automatically + // + // this function accepts data in all of wxIPC_TEXT, wxIPC_UNICODETEXT, and + // wxIPC_UTF8TEXT formats but asserts if the format is anything else (i.e. + // such that IsTextFormat(format) doesn't return true) + // + // notice that the size parameter here contains the total size of the data, + // including the terminating '\0' or L'\0' + static + wxString GetTextFromData(const void *data, size_t size, wxIPCFormat format); + + + // return a buffer at least this size, reallocating buffer if needed + // returns NULL if using an inadequate user buffer which can't be resized + void *GetBufferAtLeast(size_t bytes); + +protected: + virtual bool DoExecute(const void *data, size_t size, wxIPCFormat format) = 0; + virtual bool DoPoke(const wxString& item, const void *data, size_t size, + wxIPCFormat format) = 0; + virtual bool DoAdvise(const wxString& item, const void *data, size_t size, + wxIPCFormat format) = 0; + + +private: + char *m_buffer; + size_t m_buffersize; + bool m_deletebufferwhendone; + +protected: + bool m_connected; + + wxDECLARE_NO_ASSIGN_CLASS(wxConnectionBase); + DECLARE_CLASS(wxConnectionBase) +}; + + +class WXDLLIMPEXP_BASE wxServerBase : public wxObject +{ +public: + wxServerBase() { } + virtual ~wxServerBase() { } + + // Returns false on error (e.g. port number is already in use) + virtual bool Create(const wxString& serverName) = 0; + + // Callbacks to SERVER - override at will + virtual wxConnectionBase *OnAcceptConnection(const wxString& topic) = 0; + + DECLARE_CLASS(wxServerBase) +}; + +class WXDLLIMPEXP_BASE wxClientBase : public wxObject +{ +public: + wxClientBase() { } + virtual ~wxClientBase() { } + + virtual bool ValidHost(const wxString& host) = 0; + + // Call this to make a connection. Returns NULL if cannot. + virtual wxConnectionBase *MakeConnection(const wxString& host, + const wxString& server, + const wxString& topic) = 0; + + // Callbacks to CLIENT - override at will + virtual wxConnectionBase *OnMakeConnection() = 0; + + DECLARE_CLASS(wxClientBase) +}; + +#endif // _WX_IPCBASEH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/itemid.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/itemid.h new file mode 100644 index 0000000000..99897e9c17 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/itemid.h @@ -0,0 +1,61 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/itemid.h +// Purpose: wxItemId class declaration. +// Author: Vadim Zeitlin +// Created: 2011-08-17 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ITEMID_H_ +#define _WX_ITEMID_H_ + +// ---------------------------------------------------------------------------- +// wxItemId: an opaque item identifier used with wx{Tree,TreeList,DataView}Ctrl. +// ---------------------------------------------------------------------------- + +// The template argument T is typically a pointer to some opaque type. While +// wxTreeItemId and wxDataViewItem use a pointer to void, this is dangerous and +// not recommended for the new item id classes. +template <typename T> +class wxItemId +{ +public: + typedef T Type; + + // This ctor is implicit which is fine for non-void* types, but if you use + // this class with void* you're strongly advised to make the derived class + // ctor explicit as implicitly converting from any pointer is simply too + // dangerous. + wxItemId(Type item = NULL) : m_pItem(item) { } + + // Default copy ctor, assignment operator and dtor are ok. + + bool IsOk() const { return m_pItem != NULL; } + Type GetID() const { return m_pItem; } + operator const Type() const { return m_pItem; } + + // This is used for implementation purposes only. + Type operator->() const { return m_pItem; } + + void Unset() { m_pItem = NULL; } + + // This field is public *only* for compatibility with the old wxTreeItemId + // implementation and must not be used in any new code. +//private: + Type m_pItem; +}; + +template <typename T> +bool operator==(const wxItemId<T>& left, const wxItemId<T>& right) +{ + return left.GetID() == right.GetID(); +} + +template <typename T> +bool operator!=(const wxItemId<T>& left, const wxItemId<T>& right) +{ + return !(left == right); +} + +#endif // _WX_ITEMID_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/joystick.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/joystick.h new file mode 100644 index 0000000000..733ad7de8a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/joystick.h @@ -0,0 +1,37 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/joystick.h +// Purpose: wxJoystick base header +// Author: wxWidgets Team +// Modified by: +// Created: +// Copyright: (c) wxWidgets Team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_JOYSTICK_H_BASE_ +#define _WX_JOYSTICK_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_JOYSTICK + +#if defined(__WINDOWS__) +#include "wx/msw/joystick.h" +#elif defined(__WXMOTIF__) +#include "wx/unix/joystick.h" +#elif defined(__WXGTK__) +#include "wx/unix/joystick.h" +#elif defined(__WXX11__) +#include "wx/unix/joystick.h" +#elif defined(__DARWIN__) +#include "wx/osx/core/joystick.h" +#elif defined(__WXMAC__) +#include "wx/osx/joystick.h" +#elif defined(__WXPM__) +#include "wx/os2/joystick.h" +#endif + +#endif // wxUSE_JOYSTICK + +#endif + // _WX_JOYSTICK_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/kbdstate.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/kbdstate.h new file mode 100644 index 0000000000..ab0df32d1c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/kbdstate.h @@ -0,0 +1,121 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/kbdstate.h +// Purpose: Declaration of wxKeyboardState class +// Author: Vadim Zeitlin +// Created: 2008-09-19 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_KBDSTATE_H_ +#define _WX_KBDSTATE_H_ + +#include "wx/defs.h" + +// ---------------------------------------------------------------------------- +// wxKeyboardState stores the state of the keyboard modifier keys +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxKeyboardState +{ +public: + wxKeyboardState(bool controlDown = false, + bool shiftDown = false, + bool altDown = false, + bool metaDown = false) + : m_controlDown(controlDown), + m_shiftDown(shiftDown), + m_altDown(altDown), + m_metaDown(metaDown) +#ifdef __WXOSX__ + ,m_rawControlDown(false) +#endif + { + } + + // default copy ctor, assignment operator and dtor are ok + + + // accessors for the various modifier keys + // --------------------------------------- + + // should be used check if the key event has exactly the given modifiers: + // "GetModifiers() = wxMOD_CONTROL" is easier to write than "ControlDown() + // && !MetaDown() && !AltDown() && !ShiftDown()" + int GetModifiers() const + { + return (m_controlDown ? wxMOD_CONTROL : 0) | + (m_shiftDown ? wxMOD_SHIFT : 0) | + (m_metaDown ? wxMOD_META : 0) | +#ifdef __WXOSX__ + (m_rawControlDown ? wxMOD_RAW_CONTROL : 0) | +#endif + (m_altDown ? wxMOD_ALT : 0); + } + + // returns true if any modifiers at all are pressed + bool HasAnyModifiers() const { return GetModifiers() != wxMOD_NONE; } + + // returns true if any modifiers changing the usual key interpretation are + // pressed, notably excluding Shift + bool HasModifiers() const + { + return ControlDown() || RawControlDown() || AltDown(); + } + + // accessors for individual modifier keys + bool ControlDown() const { return m_controlDown; } + bool RawControlDown() const + { +#ifdef __WXOSX__ + return m_rawControlDown; +#else + return m_controlDown; +#endif + } + bool ShiftDown() const { return m_shiftDown; } + bool MetaDown() const { return m_metaDown; } + bool AltDown() const { return m_altDown; } + + // "Cmd" is a pseudo key which is Control for PC and Unix platforms but + // Apple ("Command") key under Macs: it makes often sense to use it instead + // of, say, ControlDown() because Cmd key is used for the same thing under + // Mac as Ctrl elsewhere (but Ctrl still exists, just not used for this + // purpose under Mac) + bool CmdDown() const + { + return ControlDown(); + } + + // these functions are mostly used by wxWidgets itself + // --------------------------------------------------- + + void SetControlDown(bool down) { m_controlDown = down; } + void SetRawControlDown(bool down) + { +#ifdef __WXOSX__ + m_rawControlDown = down; +#else + m_controlDown = down; +#endif + } + void SetShiftDown(bool down) { m_shiftDown = down; } + void SetAltDown(bool down) { m_altDown = down; } + void SetMetaDown(bool down) { m_metaDown = down; } + + + // for backwards compatibility with the existing code accessing these + // members of wxKeyEvent directly, these variables are public, however you + // should not use them in any new code, please use the accessors instead +public: + bool m_controlDown : 1; + bool m_shiftDown : 1; + bool m_altDown : 1; + bool m_metaDown : 1; +#ifdef __WXOSX__ + bool m_rawControlDown : 1; +#endif +}; + +#endif // _WX_KBDSTATE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/language.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/language.h new file mode 100644 index 0000000000..3324ef0752 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/language.h @@ -0,0 +1,282 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/language.h +// Purpose: wxLanguage enum +// Author: Vadim Zeitlin +// Created: 2010-04-23 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// WARNING: Parts of this file are generated. See misc/languages/README for +// details. + +#ifndef _WX_LANGUAGE_H_ +#define _WX_LANGUAGE_H_ + +#include "wx/defs.h" + +#if wxUSE_INTL + +// ---------------------------------------------------------------------------- +// wxLanguage: defines all supported languages +// ---------------------------------------------------------------------------- + +// --- --- --- generated code begins here --- --- --- + +/** + The languages supported by wxLocale. + + This enum is generated by misc/languages/genlang.py + When making changes, please put them into misc/languages/langtabl.txt +*/ +enum wxLanguage +{ + /// User's default/preffered language as got from OS. + wxLANGUAGE_DEFAULT, + + /// Unknown language, returned if wxLocale::GetSystemLanguage fails. + wxLANGUAGE_UNKNOWN, + + wxLANGUAGE_ABKHAZIAN, + wxLANGUAGE_AFAR, + wxLANGUAGE_AFRIKAANS, + wxLANGUAGE_ALBANIAN, + wxLANGUAGE_AMHARIC, + wxLANGUAGE_ARABIC, + wxLANGUAGE_ARABIC_ALGERIA, + wxLANGUAGE_ARABIC_BAHRAIN, + wxLANGUAGE_ARABIC_EGYPT, + wxLANGUAGE_ARABIC_IRAQ, + wxLANGUAGE_ARABIC_JORDAN, + wxLANGUAGE_ARABIC_KUWAIT, + wxLANGUAGE_ARABIC_LEBANON, + wxLANGUAGE_ARABIC_LIBYA, + wxLANGUAGE_ARABIC_MOROCCO, + wxLANGUAGE_ARABIC_OMAN, + wxLANGUAGE_ARABIC_QATAR, + wxLANGUAGE_ARABIC_SAUDI_ARABIA, + wxLANGUAGE_ARABIC_SUDAN, + wxLANGUAGE_ARABIC_SYRIA, + wxLANGUAGE_ARABIC_TUNISIA, + wxLANGUAGE_ARABIC_UAE, + wxLANGUAGE_ARABIC_YEMEN, + wxLANGUAGE_ARMENIAN, + wxLANGUAGE_ASSAMESE, + wxLANGUAGE_ASTURIAN, + wxLANGUAGE_AYMARA, + wxLANGUAGE_AZERI, + wxLANGUAGE_AZERI_CYRILLIC, + wxLANGUAGE_AZERI_LATIN, + wxLANGUAGE_BASHKIR, + wxLANGUAGE_BASQUE, + wxLANGUAGE_BELARUSIAN, + wxLANGUAGE_BENGALI, + wxLANGUAGE_BHUTANI, + wxLANGUAGE_BIHARI, + wxLANGUAGE_BISLAMA, + wxLANGUAGE_BOSNIAN, + wxLANGUAGE_BRETON, + wxLANGUAGE_BULGARIAN, + wxLANGUAGE_BURMESE, + wxLANGUAGE_CAMBODIAN, + wxLANGUAGE_CATALAN, + wxLANGUAGE_CHINESE, + wxLANGUAGE_CHINESE_SIMPLIFIED, + wxLANGUAGE_CHINESE_TRADITIONAL, + wxLANGUAGE_CHINESE_HONGKONG, + wxLANGUAGE_CHINESE_MACAU, + wxLANGUAGE_CHINESE_SINGAPORE, + wxLANGUAGE_CHINESE_TAIWAN, + wxLANGUAGE_CORSICAN, + wxLANGUAGE_CROATIAN, + wxLANGUAGE_CZECH, + wxLANGUAGE_DANISH, + wxLANGUAGE_DUTCH, + wxLANGUAGE_DUTCH_BELGIAN, + wxLANGUAGE_ENGLISH, + wxLANGUAGE_ENGLISH_UK, + wxLANGUAGE_ENGLISH_US, + wxLANGUAGE_ENGLISH_AUSTRALIA, + wxLANGUAGE_ENGLISH_BELIZE, + wxLANGUAGE_ENGLISH_BOTSWANA, + wxLANGUAGE_ENGLISH_CANADA, + wxLANGUAGE_ENGLISH_CARIBBEAN, + wxLANGUAGE_ENGLISH_DENMARK, + wxLANGUAGE_ENGLISH_EIRE, + wxLANGUAGE_ENGLISH_JAMAICA, + wxLANGUAGE_ENGLISH_NEW_ZEALAND, + wxLANGUAGE_ENGLISH_PHILIPPINES, + wxLANGUAGE_ENGLISH_SOUTH_AFRICA, + wxLANGUAGE_ENGLISH_TRINIDAD, + wxLANGUAGE_ENGLISH_ZIMBABWE, + wxLANGUAGE_ESPERANTO, + wxLANGUAGE_ESTONIAN, + wxLANGUAGE_FAEROESE, + wxLANGUAGE_FARSI, + wxLANGUAGE_FIJI, + wxLANGUAGE_FINNISH, + wxLANGUAGE_FRENCH, + wxLANGUAGE_FRENCH_BELGIAN, + wxLANGUAGE_FRENCH_CANADIAN, + wxLANGUAGE_FRENCH_LUXEMBOURG, + wxLANGUAGE_FRENCH_MONACO, + wxLANGUAGE_FRENCH_SWISS, + wxLANGUAGE_FRISIAN, + wxLANGUAGE_GALICIAN, + wxLANGUAGE_GEORGIAN, + wxLANGUAGE_GERMAN, + wxLANGUAGE_GERMAN_AUSTRIAN, + wxLANGUAGE_GERMAN_BELGIUM, + wxLANGUAGE_GERMAN_LIECHTENSTEIN, + wxLANGUAGE_GERMAN_LUXEMBOURG, + wxLANGUAGE_GERMAN_SWISS, + wxLANGUAGE_GREEK, + wxLANGUAGE_GREENLANDIC, + wxLANGUAGE_GUARANI, + wxLANGUAGE_GUJARATI, + wxLANGUAGE_HAUSA, + wxLANGUAGE_HEBREW, + wxLANGUAGE_HINDI, + wxLANGUAGE_HUNGARIAN, + wxLANGUAGE_ICELANDIC, + wxLANGUAGE_INDONESIAN, + wxLANGUAGE_INTERLINGUA, + wxLANGUAGE_INTERLINGUE, + wxLANGUAGE_INUKTITUT, + wxLANGUAGE_INUPIAK, + wxLANGUAGE_IRISH, + wxLANGUAGE_ITALIAN, + wxLANGUAGE_ITALIAN_SWISS, + wxLANGUAGE_JAPANESE, + wxLANGUAGE_JAVANESE, + wxLANGUAGE_KABYLE, + wxLANGUAGE_KANNADA, + wxLANGUAGE_KASHMIRI, + wxLANGUAGE_KASHMIRI_INDIA, + wxLANGUAGE_KAZAKH, + wxLANGUAGE_KERNEWEK, + wxLANGUAGE_KINYARWANDA, + wxLANGUAGE_KIRGHIZ, + wxLANGUAGE_KIRUNDI, + wxLANGUAGE_KONKANI, + wxLANGUAGE_KOREAN, + wxLANGUAGE_KURDISH, + wxLANGUAGE_LAOTHIAN, + wxLANGUAGE_LATIN, + wxLANGUAGE_LATVIAN, + wxLANGUAGE_LINGALA, + wxLANGUAGE_LITHUANIAN, + wxLANGUAGE_MACEDONIAN, + wxLANGUAGE_MALAGASY, + wxLANGUAGE_MALAY, + wxLANGUAGE_MALAYALAM, + wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM, + wxLANGUAGE_MALAY_MALAYSIA, + wxLANGUAGE_MALTESE, + wxLANGUAGE_MANIPURI, + wxLANGUAGE_MAORI, + wxLANGUAGE_MARATHI, + wxLANGUAGE_MOLDAVIAN, + wxLANGUAGE_MONGOLIAN, + wxLANGUAGE_NAURU, + wxLANGUAGE_NEPALI, + wxLANGUAGE_NEPALI_INDIA, + wxLANGUAGE_NORWEGIAN_BOKMAL, + wxLANGUAGE_NORWEGIAN_NYNORSK, + wxLANGUAGE_OCCITAN, + wxLANGUAGE_ORIYA, + wxLANGUAGE_OROMO, + wxLANGUAGE_PASHTO, + wxLANGUAGE_POLISH, + wxLANGUAGE_PORTUGUESE, + wxLANGUAGE_PORTUGUESE_BRAZILIAN, + wxLANGUAGE_PUNJABI, + wxLANGUAGE_QUECHUA, + wxLANGUAGE_RHAETO_ROMANCE, + wxLANGUAGE_ROMANIAN, + wxLANGUAGE_RUSSIAN, + wxLANGUAGE_RUSSIAN_UKRAINE, + wxLANGUAGE_SAMI, + wxLANGUAGE_SAMOAN, + wxLANGUAGE_SANGHO, + wxLANGUAGE_SANSKRIT, + wxLANGUAGE_SCOTS_GAELIC, + wxLANGUAGE_SERBIAN, + wxLANGUAGE_SERBIAN_CYRILLIC, + wxLANGUAGE_SERBIAN_LATIN, + wxLANGUAGE_SERBO_CROATIAN, + wxLANGUAGE_SESOTHO, + wxLANGUAGE_SETSWANA, + wxLANGUAGE_SHONA, + wxLANGUAGE_SINDHI, + wxLANGUAGE_SINHALESE, + wxLANGUAGE_SISWATI, + wxLANGUAGE_SLOVAK, + wxLANGUAGE_SLOVENIAN, + wxLANGUAGE_SOMALI, + wxLANGUAGE_SPANISH, + wxLANGUAGE_SPANISH_ARGENTINA, + wxLANGUAGE_SPANISH_BOLIVIA, + wxLANGUAGE_SPANISH_CHILE, + wxLANGUAGE_SPANISH_COLOMBIA, + wxLANGUAGE_SPANISH_COSTA_RICA, + wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC, + wxLANGUAGE_SPANISH_ECUADOR, + wxLANGUAGE_SPANISH_EL_SALVADOR, + wxLANGUAGE_SPANISH_GUATEMALA, + wxLANGUAGE_SPANISH_HONDURAS, + wxLANGUAGE_SPANISH_MEXICAN, + wxLANGUAGE_SPANISH_MODERN, + wxLANGUAGE_SPANISH_NICARAGUA, + wxLANGUAGE_SPANISH_PANAMA, + wxLANGUAGE_SPANISH_PARAGUAY, + wxLANGUAGE_SPANISH_PERU, + wxLANGUAGE_SPANISH_PUERTO_RICO, + wxLANGUAGE_SPANISH_URUGUAY, + wxLANGUAGE_SPANISH_US, + wxLANGUAGE_SPANISH_VENEZUELA, + wxLANGUAGE_SUNDANESE, + wxLANGUAGE_SWAHILI, + wxLANGUAGE_SWEDISH, + wxLANGUAGE_SWEDISH_FINLAND, + wxLANGUAGE_TAGALOG, + wxLANGUAGE_TAJIK, + wxLANGUAGE_TAMIL, + wxLANGUAGE_TATAR, + wxLANGUAGE_TELUGU, + wxLANGUAGE_THAI, + wxLANGUAGE_TIBETAN, + wxLANGUAGE_TIGRINYA, + wxLANGUAGE_TONGA, + wxLANGUAGE_TSONGA, + wxLANGUAGE_TURKISH, + wxLANGUAGE_TURKMEN, + wxLANGUAGE_TWI, + wxLANGUAGE_UIGHUR, + wxLANGUAGE_UKRAINIAN, + wxLANGUAGE_URDU, + wxLANGUAGE_URDU_INDIA, + wxLANGUAGE_URDU_PAKISTAN, + wxLANGUAGE_UZBEK, + wxLANGUAGE_UZBEK_CYRILLIC, + wxLANGUAGE_UZBEK_LATIN, + wxLANGUAGE_VALENCIAN, + wxLANGUAGE_VIETNAMESE, + wxLANGUAGE_VOLAPUK, + wxLANGUAGE_WELSH, + wxLANGUAGE_WOLOF, + wxLANGUAGE_XHOSA, + wxLANGUAGE_YIDDISH, + wxLANGUAGE_YORUBA, + wxLANGUAGE_ZHUANG, + wxLANGUAGE_ZULU, + + /// For custom, user-defined languages. + wxLANGUAGE_USER_DEFINED +}; + +// --- --- --- generated code ends here --- --- --- + +#endif // wxUSE_INTL + +#endif // _WX_LANGUAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/layout.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/layout.h new file mode 100644 index 0000000000..30d46c2490 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/layout.h @@ -0,0 +1,190 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/layout.h +// Purpose: OBSOLETE layout constraint classes, use sizers instead +// Author: Julian Smart +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LAYOUT_H_ +#define _WX_LAYOUT_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/object.h" + +// X stupidly defines these in X.h +#ifdef Above + #undef Above +#endif +#ifdef Below + #undef Below +#endif + +#if wxUSE_CONSTRAINTS + +// ---------------------------------------------------------------------------- +// forward declrations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindowBase; +class WXDLLIMPEXP_FWD_CORE wxLayoutConstraints; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +#define wxLAYOUT_DEFAULT_MARGIN 0 + +enum wxEdge +{ + wxLeft, wxTop, wxRight, wxBottom, wxWidth, wxHeight, + wxCentre, wxCenter = wxCentre, wxCentreX, wxCentreY +}; + +enum wxRelationship +{ + wxUnconstrained = 0, + wxAsIs, + wxPercentOf, + wxAbove, + wxBelow, + wxLeftOf, + wxRightOf, + wxSameAs, + wxAbsolute +}; + +// ---------------------------------------------------------------------------- +// wxIndividualLayoutConstraint: a constraint on window position +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxIndividualLayoutConstraint : public wxObject +{ +public: + wxIndividualLayoutConstraint(); + + // note that default copy ctor and assignment operators are ok + + virtual ~wxIndividualLayoutConstraint(){} + + void Set(wxRelationship rel, wxWindowBase *otherW, wxEdge otherE, int val = 0, int marg = wxLAYOUT_DEFAULT_MARGIN); + + // + // Sibling relationships + // + void LeftOf(wxWindowBase *sibling, int marg = wxLAYOUT_DEFAULT_MARGIN); + void RightOf(wxWindowBase *sibling, int marg = wxLAYOUT_DEFAULT_MARGIN); + void Above(wxWindowBase *sibling, int marg = wxLAYOUT_DEFAULT_MARGIN); + void Below(wxWindowBase *sibling, int marg = wxLAYOUT_DEFAULT_MARGIN); + + // + // 'Same edge' alignment + // + void SameAs(wxWindowBase *otherW, wxEdge edge, int marg = wxLAYOUT_DEFAULT_MARGIN); + + // The edge is a percentage of the other window's edge + void PercentOf(wxWindowBase *otherW, wxEdge wh, int per); + + // + // Edge has absolute value + // + void Absolute(int val); + + // + // Dimension is unconstrained + // + void Unconstrained() { relationship = wxUnconstrained; } + + // + // Dimension is 'as is' (use current size settings) + // + void AsIs() { relationship = wxAsIs; } + + // + // Accessors + // + wxWindowBase *GetOtherWindow() { return otherWin; } + wxEdge GetMyEdge() const { return myEdge; } + void SetEdge(wxEdge which) { myEdge = which; } + void SetValue(int v) { value = v; } + int GetMargin() { return margin; } + void SetMargin(int m) { margin = m; } + int GetValue() const { return value; } + int GetPercent() const { return percent; } + int GetOtherEdge() const { return otherEdge; } + bool GetDone() const { return done; } + void SetDone(bool d) { done = d; } + wxRelationship GetRelationship() { return relationship; } + void SetRelationship(wxRelationship r) { relationship = r; } + + // Reset constraint if it mentions otherWin + bool ResetIfWin(wxWindowBase *otherW); + + // Try to satisfy constraint + bool SatisfyConstraint(wxLayoutConstraints *constraints, wxWindowBase *win); + + // Get the value of this edge or dimension, or if this + // is not determinable, -1. + int GetEdge(wxEdge which, wxWindowBase *thisWin, wxWindowBase *other) const; + +protected: + // To be allowed to modify the internal variables + friend class wxIndividualLayoutConstraint_Serialize; + + // 'This' window is the parent or sibling of otherWin + wxWindowBase *otherWin; + + wxEdge myEdge; + wxRelationship relationship; + int margin; + int value; + int percent; + wxEdge otherEdge; + bool done; + + DECLARE_DYNAMIC_CLASS(wxIndividualLayoutConstraint) +}; + +// ---------------------------------------------------------------------------- +// wxLayoutConstraints: the complete set of constraints for a window +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxLayoutConstraints : public wxObject +{ +public: + // Edge constraints + wxIndividualLayoutConstraint left; + wxIndividualLayoutConstraint top; + wxIndividualLayoutConstraint right; + wxIndividualLayoutConstraint bottom; + // Size constraints + wxIndividualLayoutConstraint width; + wxIndividualLayoutConstraint height; + // Centre constraints + wxIndividualLayoutConstraint centreX; + wxIndividualLayoutConstraint centreY; + + wxLayoutConstraints(); + + // note that default copy ctor and assignment operators are ok + + virtual ~wxLayoutConstraints(){} + + bool SatisfyConstraints(wxWindowBase *win, int *noChanges); + bool AreSatisfied() const + { + return left.GetDone() && top.GetDone() && + width.GetDone() && height.GetDone(); + } + + DECLARE_DYNAMIC_CLASS(wxLayoutConstraints) +}; + +#endif // wxUSE_CONSTRAINTS + +#endif // _WX_LAYOUT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/laywin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/laywin.h new file mode 100644 index 0000000000..e3f6b6eeea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/laywin.h @@ -0,0 +1,17 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/laywin.h +// Purpose: wxSashLayoutWindow base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LAYWIN_H_BASE_ +#define _WX_LAYWIN_H_BASE_ + +#include "wx/generic/laywin.h" + +#endif + // _WX_LAYWIN_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/link.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/link.h new file mode 100644 index 0000000000..c422fc17af --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/link.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/link.h +// Purpose: macros to force linking modules which might otherwise be +// discarded by the linker +// Author: Vaclav Slavik +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LINK_H_ +#define _WX_LINK_H_ + +// This must be part of the module you want to force: +#define wxFORCE_LINK_THIS_MODULE(module_name) \ + extern void _wx_link_dummy_func_##module_name (); \ + void _wx_link_dummy_func_##module_name () { } + + +// And this must be somewhere where it certainly will be linked: +#define wxFORCE_LINK_MODULE(module_name) \ + extern void _wx_link_dummy_func_##module_name (); \ + static struct wxForceLink##module_name \ + { \ + wxForceLink##module_name() \ + { \ + _wx_link_dummy_func_##module_name (); \ + } \ + } _wx_link_dummy_var_##module_name; + + +#endif // _WX_LINK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/list.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/list.h new file mode 100644 index 0000000000..160b3b8ba4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/list.h @@ -0,0 +1,1341 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/list.h +// Purpose: wxList, wxStringList classes +// Author: Julian Smart +// Modified by: VZ at 16/11/98: WX_DECLARE_LIST() and typesafe lists added +// Created: 29/01/98 +// Copyright: (c) 1998 Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + All this is quite ugly but serves two purposes: + 1. Be almost 100% compatible with old, untyped, wxList class + 2. Ensure compile-time type checking for the linked lists + + The idea is to have one base class (wxListBase) working with "void *" data, + but to hide these untyped functions - i.e. make them protected, so they + can only be used from derived classes which have inline member functions + working with right types. This achieves the 2nd goal. As for the first one, + we provide a special derivation of wxListBase called wxList which looks just + like the old class. +*/ + +#ifndef _WX_LIST_H_ +#define _WX_LIST_H_ + +// ----------------------------------------------------------------------------- +// headers +// ----------------------------------------------------------------------------- + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" +#include "wx/vector.h" + +#if wxUSE_STD_CONTAINERS + #include "wx/beforestd.h" + #include <algorithm> + #include <iterator> + #include <list> + #include "wx/afterstd.h" +#endif + +// ---------------------------------------------------------------------------- +// types +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxObjectListNode; +typedef wxObjectListNode wxNode; + +#if wxUSE_STD_CONTAINERS + +#define wxLIST_COMPATIBILITY + +#define WX_DECLARE_LIST_3(elT, dummy1, liT, dummy2, decl) \ + WX_DECLARE_LIST_WITH_DECL(elT, liT, decl) +#define WX_DECLARE_LIST_PTR_3(elT, dummy1, liT, dummy2, decl) \ + WX_DECLARE_LIST_3(elT, dummy1, liT, dummy2, decl) + +#define WX_DECLARE_LIST_2(elT, liT, dummy, decl) \ + WX_DECLARE_LIST_WITH_DECL(elT, liT, decl) +#define WX_DECLARE_LIST_PTR_2(elT, liT, dummy, decl) \ + WX_DECLARE_LIST_2(elT, liT, dummy, decl) \ + +#define WX_DECLARE_LIST_WITH_DECL(elT, liT, decl) \ + WX_DECLARE_LIST_XO(elT*, liT, decl) + +#if !defined(__VISUALC__) || __VISUALC__ >= 1300 // == !VC6 + +template<class T> +class wxList_SortFunction +{ +public: + wxList_SortFunction(wxSortCompareFunction f) : m_f(f) { } + bool operator()(const T& i1, const T& i2) + { return m_f((T*)&i1, (T*)&i2) < 0; } +private: + wxSortCompareFunction m_f; +}; + +#define WX_LIST_SORTFUNCTION( elT, f ) wxList_SortFunction<elT>(f) +#define WX_LIST_VC6_WORKAROUND(elT, liT, decl) + +#else // if defined( __VISUALC__ ) && __VISUALC__ < 1300 // == VC6 + +#define WX_LIST_SORTFUNCTION( elT, f ) std::greater<elT>( f ) +#define WX_LIST_VC6_WORKAROUND(elT, liT, decl) \ + decl liT; \ + \ + /* Workaround for broken VC6 STL incorrectly requires a std::greater<> */ \ + /* to be passed into std::list::sort() */ \ + template <> \ + struct std::greater<elT> \ + { \ + private: \ + wxSortCompareFunction m_CompFunc; \ + public: \ + greater( wxSortCompareFunction compfunc = NULL ) \ + : m_CompFunc( compfunc ) {} \ + bool operator()(const elT X, const elT Y) const \ + { \ + return m_CompFunc ? \ + ( m_CompFunc( wxListCastElementToVoidPtr(X), \ + wxListCastElementToVoidPtr(Y) ) < 0 ) : \ + ( X > Y ); \ + } \ + }; + +// helper for std::greater<elT> above: +template<typename T> +inline const void *wxListCastElementToVoidPtr(const T* ptr) { return ptr; } +inline const void *wxListCastElementToVoidPtr(const wxString& str) + { return (const char*)str; } + +#endif // VC6/!VC6 + +/* + Note 1: the outer helper class _WX_LIST_HELPER_##liT below is a workaround + for mingw 3.2.3 compiler bug that prevents a static function of liT class + from being exported into dll. A minimal code snippet reproducing the bug: + + struct WXDLLIMPEXP_CORE Foo + { + static void Bar(); + struct SomeInnerClass + { + friend class Foo; // comment this out to make it link + }; + ~Foo() + { + Bar(); + } + }; + + The program does not link under mingw_gcc 3.2.3 producing undefined + reference to Foo::Bar() function + + + Note 2: the EmptyList is needed to allow having a NULL pointer-like + invalid iterator. We used to use just an uninitialized iterator object + instead but this fails with some debug/checked versions of STL, notably the + glibc version activated with _GLIBCXX_DEBUG, so we need to have a separate + invalid iterator. + */ + +// the real wxList-class declaration +#define WX_DECLARE_LIST_XO(elT, liT, decl) \ + decl _WX_LIST_HELPER_##liT \ + { \ + typedef elT _WX_LIST_ITEM_TYPE_##liT; \ + typedef std::list<elT> BaseListType; \ + public: \ + static BaseListType EmptyList; \ + static void DeleteFunction( _WX_LIST_ITEM_TYPE_##liT X ); \ + }; \ + \ + WX_LIST_VC6_WORKAROUND(elT, liT, decl) \ + class liT : public std::list<elT> \ + { \ + private: \ + typedef std::list<elT> BaseListType; \ + \ + bool m_destroy; \ + \ + public: \ + class compatibility_iterator \ + { \ + private: \ + /* Workaround for broken VC6 nested class name resolution */ \ + typedef std::list<elT>::iterator iterator; \ + friend class liT; \ + \ + iterator m_iter; \ + liT * m_list; \ + \ + public: \ + compatibility_iterator() \ + : m_iter(_WX_LIST_HELPER_##liT::EmptyList.end()), m_list( NULL ) {} \ + compatibility_iterator( liT* li, iterator i ) \ + : m_iter( i ), m_list( li ) {} \ + compatibility_iterator( const liT* li, iterator i ) \ + : m_iter( i ), m_list( const_cast< liT* >( li ) ) {} \ + \ + compatibility_iterator* operator->() { return this; } \ + const compatibility_iterator* operator->() const { return this; } \ + \ + bool operator==(const compatibility_iterator& i) const \ + { \ + wxASSERT_MSG( m_list && i.m_list, \ + wxT("comparing invalid iterators is illegal") ); \ + return (m_list == i.m_list) && (m_iter == i.m_iter); \ + } \ + bool operator!=(const compatibility_iterator& i) const \ + { return !( operator==( i ) ); } \ + operator bool() const \ + { return m_list ? m_iter != m_list->end() : false; } \ + bool operator !() const \ + { return !( operator bool() ); } \ + \ + elT GetData() const \ + { return *m_iter; } \ + void SetData( elT e ) \ + { *m_iter = e; } \ + \ + compatibility_iterator GetNext() const \ + { \ + iterator i = m_iter; \ + return compatibility_iterator( m_list, ++i ); \ + } \ + compatibility_iterator GetPrevious() const \ + { \ + if ( m_iter == m_list->begin() ) \ + return compatibility_iterator(); \ + \ + iterator i = m_iter; \ + return compatibility_iterator( m_list, --i ); \ + } \ + int IndexOf() const \ + { \ + return *this ? (int)std::distance( m_list->begin(), m_iter ) \ + : wxNOT_FOUND; \ + } \ + }; \ + public: \ + liT() : m_destroy( false ) {} \ + \ + compatibility_iterator Find( const elT e ) const \ + { \ + liT* _this = const_cast< liT* >( this ); \ + return compatibility_iterator( _this, \ + std::find( _this->begin(), _this->end(), e ) ); \ + } \ + \ + bool IsEmpty() const \ + { return empty(); } \ + size_t GetCount() const \ + { return size(); } \ + int Number() const \ + { return static_cast< int >( GetCount() ); } \ + \ + compatibility_iterator Item( size_t idx ) const \ + { \ + iterator i = const_cast< liT* >(this)->begin(); \ + std::advance( i, idx ); \ + return compatibility_iterator( this, i ); \ + } \ + elT operator[](size_t idx) const \ + { \ + return Item(idx).GetData(); \ + } \ + \ + compatibility_iterator GetFirst() const \ + { \ + return compatibility_iterator( this, \ + const_cast< liT* >(this)->begin() ); \ + } \ + compatibility_iterator GetLast() const \ + { \ + iterator i = const_cast< liT* >(this)->end(); \ + return compatibility_iterator( this, !empty() ? --i : i ); \ + } \ + bool Member( elT e ) const \ + { return Find( e ); } \ + compatibility_iterator Nth( int n ) const \ + { return Item( n ); } \ + int IndexOf( elT e ) const \ + { return Find( e ).IndexOf(); } \ + \ + compatibility_iterator Append( elT e ) \ + { \ + push_back( e ); \ + return GetLast(); \ + } \ + compatibility_iterator Insert( elT e ) \ + { \ + push_front( e ); \ + return compatibility_iterator( this, begin() ); \ + } \ + compatibility_iterator Insert(const compatibility_iterator & i, elT e)\ + { \ + return compatibility_iterator( this, insert( i.m_iter, e ) ); \ + } \ + compatibility_iterator Insert( size_t idx, elT e ) \ + { \ + return compatibility_iterator( this, \ + insert( Item( idx ).m_iter, e ) ); \ + } \ + \ + void DeleteContents( bool destroy ) \ + { m_destroy = destroy; } \ + bool GetDeleteContents() const \ + { return m_destroy; } \ + void Erase( const compatibility_iterator& i ) \ + { \ + if ( m_destroy ) \ + _WX_LIST_HELPER_##liT::DeleteFunction( i->GetData() ); \ + erase( i.m_iter ); \ + } \ + bool DeleteNode( const compatibility_iterator& i ) \ + { \ + if( i ) \ + { \ + Erase( i ); \ + return true; \ + } \ + return false; \ + } \ + bool DeleteObject( elT e ) \ + { \ + return DeleteNode( Find( e ) ); \ + } \ + void Clear() \ + { \ + if ( m_destroy ) \ + std::for_each( begin(), end(), \ + _WX_LIST_HELPER_##liT::DeleteFunction ); \ + clear(); \ + } \ + /* Workaround for broken VC6 std::list::sort() see above */ \ + void Sort( wxSortCompareFunction compfunc ) \ + { sort( WX_LIST_SORTFUNCTION( elT, compfunc ) ); } \ + ~liT() { Clear(); } \ + \ + /* It needs access to our EmptyList */ \ + friend class compatibility_iterator; \ + } + +#define WX_DECLARE_LIST(elementtype, listname) \ + WX_DECLARE_LIST_WITH_DECL(elementtype, listname, class) +#define WX_DECLARE_LIST_PTR(elementtype, listname) \ + WX_DECLARE_LIST(elementtype, listname) + +#define WX_DECLARE_EXPORTED_LIST(elementtype, listname) \ + WX_DECLARE_LIST_WITH_DECL(elementtype, listname, class WXDLLIMPEXP_CORE) +#define WX_DECLARE_EXPORTED_LIST_PTR(elementtype, listname) \ + WX_DECLARE_EXPORTED_LIST(elementtype, listname) + +#define WX_DECLARE_USER_EXPORTED_LIST(elementtype, listname, usergoo) \ + WX_DECLARE_LIST_WITH_DECL(elementtype, listname, class usergoo) +#define WX_DECLARE_USER_EXPORTED_LIST_PTR(elementtype, listname, usergoo) \ + WX_DECLARE_USER_EXPORTED_LIST(elementtype, listname, usergoo) + +// this macro must be inserted in your program after +// #include "wx/listimpl.cpp" +#define WX_DEFINE_LIST(name) "don't forget to include listimpl.cpp!" + +#define WX_DEFINE_EXPORTED_LIST(name) WX_DEFINE_LIST(name) +#define WX_DEFINE_USER_EXPORTED_LIST(name) WX_DEFINE_LIST(name) + +#else // if !wxUSE_STD_CONTAINERS + + +// undef it to get rid of old, deprecated functions +#define wxLIST_COMPATIBILITY + +// ----------------------------------------------------------------------------- +// key stuff: a list may be optionally keyed on integer or string key +// ----------------------------------------------------------------------------- + +union wxListKeyValue +{ + long integer; + wxString *string; +}; + +// a struct which may contain both types of keys +// +// implementation note: on one hand, this class allows to have only one function +// for any keyed operation instead of 2 almost equivalent. OTOH, it's needed to +// resolve ambiguity which we would otherwise have with wxStringList::Find() and +// wxList::Find(const char *). +class WXDLLIMPEXP_BASE wxListKey +{ +public: + // implicit ctors + wxListKey() : m_keyType(wxKEY_NONE) + { } + wxListKey(long i) : m_keyType(wxKEY_INTEGER) + { m_key.integer = i; } + wxListKey(const wxString& s) : m_keyType(wxKEY_STRING) + { m_key.string = new wxString(s); } + wxListKey(const char *s) : m_keyType(wxKEY_STRING) + { m_key.string = new wxString(s); } + wxListKey(const wchar_t *s) : m_keyType(wxKEY_STRING) + { m_key.string = new wxString(s); } + + // accessors + wxKeyType GetKeyType() const { return m_keyType; } + const wxString GetString() const + { wxASSERT( m_keyType == wxKEY_STRING ); return *m_key.string; } + long GetNumber() const + { wxASSERT( m_keyType == wxKEY_INTEGER ); return m_key.integer; } + + // comparison + // Note: implementation moved to list.cpp to prevent BC++ inline + // expansion warning. + bool operator==(wxListKeyValue value) const ; + + // dtor + ~wxListKey() + { + if ( m_keyType == wxKEY_STRING ) + delete m_key.string; + } + +private: + wxKeyType m_keyType; + wxListKeyValue m_key; +}; + +// ----------------------------------------------------------------------------- +// wxNodeBase class is a (base for) node in a double linked list +// ----------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_BASE(wxListKey) wxDefaultListKey; + +class WXDLLIMPEXP_FWD_BASE wxListBase; + +class WXDLLIMPEXP_BASE wxNodeBase +{ +friend class wxListBase; +public: + // ctor + wxNodeBase(wxListBase *list = NULL, + wxNodeBase *previous = NULL, + wxNodeBase *next = NULL, + void *data = NULL, + const wxListKey& key = wxDefaultListKey); + + virtual ~wxNodeBase(); + + // FIXME no check is done that the list is really keyed on strings + wxString GetKeyString() const { return *m_key.string; } + long GetKeyInteger() const { return m_key.integer; } + + // Necessary for some existing code + void SetKeyString(const wxString& s) { m_key.string = new wxString(s); } + void SetKeyInteger(long i) { m_key.integer = i; } + +#ifdef wxLIST_COMPATIBILITY + // compatibility methods, use Get* instead. + wxDEPRECATED( wxNode *Next() const ); + wxDEPRECATED( wxNode *Previous() const ); + wxDEPRECATED( wxObject *Data() const ); +#endif // wxLIST_COMPATIBILITY + +protected: + // all these are going to be "overloaded" in the derived classes + wxNodeBase *GetNext() const { return m_next; } + wxNodeBase *GetPrevious() const { return m_previous; } + + void *GetData() const { return m_data; } + void SetData(void *data) { m_data = data; } + + // get 0-based index of this node within the list or wxNOT_FOUND + int IndexOf() const; + + virtual void DeleteData() { } +public: + // for wxList::iterator + void** GetDataPtr() const { return &(const_cast<wxNodeBase*>(this)->m_data); } +private: + // optional key stuff + wxListKeyValue m_key; + + void *m_data; // user data + wxNodeBase *m_next, // next and previous nodes in the list + *m_previous; + + wxListBase *m_list; // list we belong to + + wxDECLARE_NO_COPY_CLASS(wxNodeBase); +}; + +// ----------------------------------------------------------------------------- +// a double-linked list class +// ----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxList; + +class WXDLLIMPEXP_BASE wxListBase +{ +friend class wxNodeBase; // should be able to call DetachNode() +friend class wxHashTableBase; // should be able to call untyped Find() + +public: + // default ctor & dtor + wxListBase(wxKeyType keyType = wxKEY_NONE) + { Init(keyType); } + virtual ~wxListBase(); + + // accessors + // count of items in the list + size_t GetCount() const { return m_count; } + + // return true if this list is empty + bool IsEmpty() const { return m_count == 0; } + + // operations + + // delete all nodes + void Clear(); + + // instruct it to destroy user data when deleting nodes + void DeleteContents(bool destroy) { m_destroy = destroy; } + + // query if to delete + bool GetDeleteContents() const + { return m_destroy; } + + // get the keytype + wxKeyType GetKeyType() const + { return m_keyType; } + + // set the keytype (required by the serial code) + void SetKeyType(wxKeyType keyType) + { wxASSERT( m_count==0 ); m_keyType = keyType; } + +#ifdef wxLIST_COMPATIBILITY + // compatibility methods from old wxList + wxDEPRECATED( int Number() const ); // use GetCount instead. + wxDEPRECATED( wxNode *First() const ); // use GetFirst + wxDEPRECATED( wxNode *Last() const ); // use GetLast + wxDEPRECATED( wxNode *Nth(size_t n) const ); // use Item + + // kludge for typesafe list migration in core classes. + wxDEPRECATED( operator wxList&() const ); +#endif // wxLIST_COMPATIBILITY + +protected: + + // all methods here are "overloaded" in derived classes to provide compile + // time type checking + + // create a node for the list of this type + virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, + void *data, + const wxListKey& key = wxDefaultListKey) = 0; + + + // ctors + // from an array + wxListBase(size_t count, void *elements[]); + // from a sequence of objects + wxListBase(void *object, ... /* terminate with NULL */); + +protected: + void Assign(const wxListBase& list) + { Clear(); DoCopy(list); } + + // get list head/tail + wxNodeBase *GetFirst() const { return m_nodeFirst; } + wxNodeBase *GetLast() const { return m_nodeLast; } + + // by (0-based) index + wxNodeBase *Item(size_t index) const; + + // get the list item's data + void *operator[](size_t n) const + { + wxNodeBase *node = Item(n); + + return node ? node->GetData() : NULL; + } + + // operations + // append to end of list + wxNodeBase *Prepend(void *object) + { return (wxNodeBase *)wxListBase::Insert(object); } + // append to beginning of list + wxNodeBase *Append(void *object); + // insert a new item at the beginning of the list + wxNodeBase *Insert(void *object) + { return Insert(static_cast<wxNodeBase *>(NULL), object); } + // insert a new item at the given position + wxNodeBase *Insert(size_t pos, void *object) + { return pos == GetCount() ? Append(object) + : Insert(Item(pos), object); } + // insert before given node or at front of list if prev == NULL + wxNodeBase *Insert(wxNodeBase *prev, void *object); + + // keyed append + wxNodeBase *Append(long key, void *object); + wxNodeBase *Append(const wxString& key, void *object); + + // removes node from the list but doesn't delete it (returns pointer + // to the node or NULL if it wasn't found in the list) + wxNodeBase *DetachNode(wxNodeBase *node); + // delete element from list, returns false if node not found + bool DeleteNode(wxNodeBase *node); + // finds object pointer and deletes node (and object if DeleteContents + // is on), returns false if object not found + bool DeleteObject(void *object); + + // search (all return NULL if item not found) + // by data + wxNodeBase *Find(const void *object) const; + + // by key + wxNodeBase *Find(const wxListKey& key) const; + + // get 0-based index of object or wxNOT_FOUND + int IndexOf( void *object ) const; + + // this function allows the sorting of arbitrary lists by giving + // a function to compare two list elements. The list is sorted in place. + void Sort(const wxSortCompareFunction compfunc); + + // functions for iterating over the list + void *FirstThat(wxListIterateFunction func); + void ForEach(wxListIterateFunction func); + void *LastThat(wxListIterateFunction func); + + // for STL interface, "last" points to one after the last node + // of the controlled sequence (NULL for the end of the list) + void Reverse(); + void DeleteNodes(wxNodeBase* first, wxNodeBase* last); +private: + + // common part of all ctors + void Init(wxKeyType keyType = wxKEY_NONE); + + // helpers + // common part of copy ctor and assignment operator + void DoCopy(const wxListBase& list); + // common part of all Append()s + wxNodeBase *AppendCommon(wxNodeBase *node); + // free node's data and node itself + void DoDeleteNode(wxNodeBase *node); + + size_t m_count; // number of elements in the list + bool m_destroy; // destroy user data when deleting list items? + wxNodeBase *m_nodeFirst, // pointers to the head and tail of the list + *m_nodeLast; + + wxKeyType m_keyType; // type of our keys (may be wxKEY_NONE) +}; + +// ----------------------------------------------------------------------------- +// macros for definition of "template" list type +// ----------------------------------------------------------------------------- + +// and now some heavy magic... + +// declare a list type named 'name' and containing elements of type 'T *' +// (as a by product of macro expansion you also get wx##name##Node +// wxNode-derived type) +// +// implementation details: +// 1. We define _WX_LIST_ITEM_TYPE_##name typedef to save in it the item type +// for the list of given type - this allows us to pass only the list name +// to WX_DEFINE_LIST() even if it needs both the name and the type +// +// 2. We redefine all non-type-safe wxList functions with type-safe versions +// which don't take any space (everything is inline), but bring compile +// time error checking. +// +// 3. The macro which is usually used (WX_DECLARE_LIST) is defined in terms of +// a more generic WX_DECLARE_LIST_2 macro which, in turn, uses the most +// generic WX_DECLARE_LIST_3 one. The last macro adds a sometimes +// interesting capability to store polymorphic objects in the list and is +// particularly useful with, for example, "wxWindow *" list where the +// wxWindowBase pointers are put into the list, but wxWindow pointers are +// retrieved from it. +// +// 4. final hack is that WX_DECLARE_LIST_3 is defined in terms of +// WX_DECLARE_LIST_4 to allow defining classes without operator->() as +// it results in compiler warnings when this operator doesn't make sense +// (i.e. stored elements are not pointers) + +// common part of WX_DECLARE_LIST_3 and WX_DECLARE_LIST_PTR_3 +#define WX_DECLARE_LIST_4(T, Tbase, name, nodetype, classexp, ptrop) \ + typedef int (*wxSortFuncFor_##name)(const T **, const T **); \ + \ + classexp nodetype : public wxNodeBase \ + { \ + public: \ + nodetype(wxListBase *list = NULL, \ + nodetype *previous = NULL, \ + nodetype *next = NULL, \ + T *data = NULL, \ + const wxListKey& key = wxDefaultListKey) \ + : wxNodeBase(list, previous, next, data, key) { } \ + \ + nodetype *GetNext() const \ + { return (nodetype *)wxNodeBase::GetNext(); } \ + nodetype *GetPrevious() const \ + { return (nodetype *)wxNodeBase::GetPrevious(); } \ + \ + T *GetData() const \ + { return (T *)wxNodeBase::GetData(); } \ + void SetData(T *data) \ + { wxNodeBase::SetData(data); } \ + \ + protected: \ + virtual void DeleteData(); \ + \ + DECLARE_NO_COPY_CLASS(nodetype) \ + }; \ + \ + classexp name : public wxListBase \ + { \ + public: \ + typedef nodetype Node; \ + classexp compatibility_iterator \ + { \ + public: \ + compatibility_iterator(Node *ptr = NULL) : m_ptr(ptr) { } \ + \ + Node *operator->() const { return m_ptr; } \ + operator Node *() const { return m_ptr; } \ + \ + private: \ + Node *m_ptr; \ + }; \ + \ + name(wxKeyType keyType = wxKEY_NONE) : wxListBase(keyType) \ + { } \ + name(const name& list) : wxListBase(list.GetKeyType()) \ + { Assign(list); } \ + name(size_t count, T *elements[]) \ + : wxListBase(count, (void **)elements) { } \ + \ + name& operator=(const name& list) \ + { if (&list != this) Assign(list); return *this; } \ + \ + nodetype *GetFirst() const \ + { return (nodetype *)wxListBase::GetFirst(); } \ + nodetype *GetLast() const \ + { return (nodetype *)wxListBase::GetLast(); } \ + \ + nodetype *Item(size_t index) const \ + { return (nodetype *)wxListBase::Item(index); } \ + \ + T *operator[](size_t index) const \ + { \ + nodetype *node = Item(index); \ + return node ? (T*)(node->GetData()) : NULL; \ + } \ + \ + nodetype *Append(Tbase *object) \ + { return (nodetype *)wxListBase::Append(object); } \ + nodetype *Insert(Tbase *object) \ + { return (nodetype *)Insert(static_cast<nodetype *>(NULL), \ + object); } \ + nodetype *Insert(size_t pos, Tbase *object) \ + { return (nodetype *)wxListBase::Insert(pos, object); } \ + nodetype *Insert(nodetype *prev, Tbase *object) \ + { return (nodetype *)wxListBase::Insert(prev, object); } \ + \ + nodetype *Append(long key, void *object) \ + { return (nodetype *)wxListBase::Append(key, object); } \ + nodetype *Append(const wxChar *key, void *object) \ + { return (nodetype *)wxListBase::Append(key, object); } \ + \ + nodetype *DetachNode(nodetype *node) \ + { return (nodetype *)wxListBase::DetachNode(node); } \ + bool DeleteNode(nodetype *node) \ + { return wxListBase::DeleteNode(node); } \ + bool DeleteObject(Tbase *object) \ + { return wxListBase::DeleteObject(object); } \ + void Erase(nodetype *it) \ + { DeleteNode(it); } \ + \ + nodetype *Find(const Tbase *object) const \ + { return (nodetype *)wxListBase::Find(object); } \ + \ + virtual nodetype *Find(const wxListKey& key) const \ + { return (nodetype *)wxListBase::Find(key); } \ + \ + bool Member(const Tbase *object) const \ + { return Find(object) != NULL; } \ + \ + int IndexOf(Tbase *object) const \ + { return wxListBase::IndexOf(object); } \ + \ + void Sort(wxSortCompareFunction func) \ + { wxListBase::Sort(func); } \ + void Sort(wxSortFuncFor_##name func) \ + { Sort((wxSortCompareFunction)func); } \ + \ + protected: \ + virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, \ + void *data, \ + const wxListKey& key = wxDefaultListKey) \ + { \ + return new nodetype(this, \ + (nodetype *)prev, (nodetype *)next, \ + (T *)data, key); \ + } \ + /* STL interface */ \ + public: \ + typedef size_t size_type; \ + typedef int difference_type; \ + typedef T* value_type; \ + typedef Tbase* base_value_type; \ + typedef value_type& reference; \ + typedef const value_type& const_reference; \ + typedef base_value_type& base_reference; \ + typedef const base_value_type& const_base_reference; \ + \ + classexp iterator \ + { \ + typedef name list; \ + public: \ + typedef nodetype Node; \ + typedef iterator itor; \ + typedef T* value_type; \ + typedef value_type* ptr_type; \ + typedef value_type& reference; \ + \ + Node* m_node; \ + Node* m_init; \ + public: \ + typedef reference reference_type; \ + typedef ptr_type pointer_type; \ + \ + iterator(Node* node, Node* init) : m_node(node), m_init(init) {}\ + iterator() : m_node(NULL), m_init(NULL) { } \ + reference_type operator*() const \ + { return *(pointer_type)m_node->GetDataPtr(); } \ + ptrop \ + itor& operator++() \ + { \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ + return *this; \ + } \ + const itor operator++(int) \ + { \ + itor tmp = *this; \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ + return tmp; \ + } \ + itor& operator--() \ + { \ + m_node = m_node ? m_node->GetPrevious() : m_init; \ + return *this; \ + } \ + const itor operator--(int) \ + { \ + itor tmp = *this; \ + m_node = m_node ? m_node->GetPrevious() : m_init; \ + return tmp; \ + } \ + bool operator!=(const itor& it) const \ + { return it.m_node != m_node; } \ + bool operator==(const itor& it) const \ + { return it.m_node == m_node; } \ + }; \ + classexp const_iterator \ + { \ + typedef name list; \ + public: \ + typedef nodetype Node; \ + typedef T* value_type; \ + typedef const value_type& const_reference; \ + typedef const_iterator itor; \ + typedef value_type* ptr_type; \ + \ + Node* m_node; \ + Node* m_init; \ + public: \ + typedef const_reference reference_type; \ + typedef const ptr_type pointer_type; \ + \ + const_iterator(Node* node, Node* init) \ + : m_node(node), m_init(init) { } \ + const_iterator() : m_node(NULL), m_init(NULL) { } \ + const_iterator(const iterator& it) \ + : m_node(it.m_node), m_init(it.m_init) { } \ + reference_type operator*() const \ + { return *(pointer_type)m_node->GetDataPtr(); } \ + ptrop \ + itor& operator++() \ + { \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ + return *this; \ + } \ + const itor operator++(int) \ + { \ + itor tmp = *this; \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ + return tmp; \ + } \ + itor& operator--() \ + { \ + m_node = m_node ? m_node->GetPrevious() : m_init; \ + return *this; \ + } \ + const itor operator--(int) \ + { \ + itor tmp = *this; \ + m_node = m_node ? m_node->GetPrevious() : m_init; \ + return tmp; \ + } \ + bool operator!=(const itor& it) const \ + { return it.m_node != m_node; } \ + bool operator==(const itor& it) const \ + { return it.m_node == m_node; } \ + }; \ + classexp reverse_iterator \ + { \ + typedef name list; \ + public: \ + typedef nodetype Node; \ + typedef T* value_type; \ + typedef reverse_iterator itor; \ + typedef value_type* ptr_type; \ + typedef value_type& reference; \ + \ + Node* m_node; \ + Node* m_init; \ + public: \ + typedef reference reference_type; \ + typedef ptr_type pointer_type; \ + \ + reverse_iterator(Node* node, Node* init) \ + : m_node(node), m_init(init) { } \ + reverse_iterator() : m_node(NULL), m_init(NULL) { } \ + reference_type operator*() const \ + { return *(pointer_type)m_node->GetDataPtr(); } \ + ptrop \ + itor& operator++() \ + { m_node = m_node->GetPrevious(); return *this; } \ + const itor operator++(int) \ + { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; }\ + itor& operator--() \ + { m_node = m_node ? m_node->GetNext() : m_init; return *this; } \ + const itor operator--(int) \ + { \ + itor tmp = *this; \ + m_node = m_node ? m_node->GetNext() : m_init; \ + return tmp; \ + } \ + bool operator!=(const itor& it) const \ + { return it.m_node != m_node; } \ + bool operator==(const itor& it) const \ + { return it.m_node == m_node; } \ + }; \ + classexp const_reverse_iterator \ + { \ + typedef name list; \ + public: \ + typedef nodetype Node; \ + typedef T* value_type; \ + typedef const_reverse_iterator itor; \ + typedef value_type* ptr_type; \ + typedef const value_type& const_reference; \ + \ + Node* m_node; \ + Node* m_init; \ + public: \ + typedef const_reference reference_type; \ + typedef const ptr_type pointer_type; \ + \ + const_reverse_iterator(Node* node, Node* init) \ + : m_node(node), m_init(init) { } \ + const_reverse_iterator() : m_node(NULL), m_init(NULL) { } \ + const_reverse_iterator(const reverse_iterator& it) \ + : m_node(it.m_node), m_init(it.m_init) { } \ + reference_type operator*() const \ + { return *(pointer_type)m_node->GetDataPtr(); } \ + ptrop \ + itor& operator++() \ + { m_node = m_node->GetPrevious(); return *this; } \ + const itor operator++(int) \ + { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; }\ + itor& operator--() \ + { m_node = m_node ? m_node->GetNext() : m_init; return *this;}\ + const itor operator--(int) \ + { \ + itor tmp = *this; \ + m_node = m_node ? m_node->GetNext() : m_init; \ + return tmp; \ + } \ + bool operator!=(const itor& it) const \ + { return it.m_node != m_node; } \ + bool operator==(const itor& it) const \ + { return it.m_node == m_node; } \ + }; \ + \ + wxEXPLICIT name(size_type n, const_reference v = value_type()) \ + { assign(n, v); } \ + name(const const_iterator& first, const const_iterator& last) \ + { assign(first, last); } \ + iterator begin() { return iterator(GetFirst(), GetLast()); } \ + const_iterator begin() const \ + { return const_iterator(GetFirst(), GetLast()); } \ + iterator end() { return iterator(NULL, GetLast()); } \ + const_iterator end() const { return const_iterator(NULL, GetLast()); }\ + reverse_iterator rbegin() \ + { return reverse_iterator(GetLast(), GetFirst()); } \ + const_reverse_iterator rbegin() const \ + { return const_reverse_iterator(GetLast(), GetFirst()); } \ + reverse_iterator rend() { return reverse_iterator(NULL, GetFirst()); }\ + const_reverse_iterator rend() const \ + { return const_reverse_iterator(NULL, GetFirst()); } \ + void resize(size_type n, value_type v = value_type()) \ + { \ + while (n < size()) \ + pop_back(); \ + while (n > size()) \ + push_back(v); \ + } \ + size_type size() const { return GetCount(); } \ + size_type max_size() const { return INT_MAX; } \ + bool empty() const { return IsEmpty(); } \ + reference front() { return *begin(); } \ + const_reference front() const { return *begin(); } \ + reference back() { iterator tmp = end(); return *--tmp; } \ + const_reference back() const { const_iterator tmp = end(); return *--tmp; }\ + void push_front(const_reference v = value_type()) \ + { Insert(GetFirst(), (const_base_reference)v); } \ + void pop_front() { DeleteNode(GetFirst()); } \ + void push_back(const_reference v = value_type()) \ + { Append((const_base_reference)v); } \ + void pop_back() { DeleteNode(GetLast()); } \ + void assign(const_iterator first, const const_iterator& last) \ + { \ + clear(); \ + for(; first != last; ++first) \ + Append((const_base_reference)*first); \ + } \ + void assign(size_type n, const_reference v = value_type()) \ + { \ + clear(); \ + for(size_type i = 0; i < n; ++i) \ + Append((const_base_reference)v); \ + } \ + iterator insert(const iterator& it, const_reference v) \ + { \ + if ( it == end() ) \ + { \ + Append((const_base_reference)v); \ + /* \ + note that this is the new end(), the old one was \ + invalidated by the Append() call, and this is why we \ + can't use the same code as in the normal case below \ + */ \ + iterator itins(end()); \ + return --itins; \ + } \ + else \ + { \ + Insert(it.m_node, (const_base_reference)v); \ + iterator itins(it); \ + return --itins; \ + } \ + } \ + void insert(const iterator& it, size_type n, const_reference v) \ + { \ + for(size_type i = 0; i < n; ++i) \ + insert(it, v); \ + } \ + void insert(const iterator& it, \ + const_iterator first, const const_iterator& last) \ + { \ + for(; first != last; ++first) \ + insert(it, *first); \ + } \ + iterator erase(const iterator& it) \ + { \ + iterator next = iterator(it.m_node->GetNext(), GetLast()); \ + DeleteNode(it.m_node); return next; \ + } \ + iterator erase(const iterator& first, const iterator& last) \ + { \ + iterator next = last; \ + if ( next != end() ) \ + ++next; \ + DeleteNodes(first.m_node, last.m_node); \ + return next; \ + } \ + void clear() { Clear(); } \ + void splice(const iterator& it, name& l, const iterator& first, const iterator& last)\ + { insert(it, first, last); l.erase(first, last); } \ + void splice(const iterator& it, name& l) \ + { splice(it, l, l.begin(), l.end() ); } \ + void splice(const iterator& it, name& l, const iterator& first) \ + { \ + if ( it != first ) \ + { \ + insert(it, *first); \ + l.erase(first); \ + } \ + } \ + void remove(const_reference v) \ + { DeleteObject((const_base_reference)v); } \ + void reverse() \ + { Reverse(); } \ + /* void swap(name& l) \ + { \ + { size_t t = m_count; m_count = l.m_count; l.m_count = t; } \ + { bool t = m_destroy; m_destroy = l.m_destroy; l.m_destroy = t; }\ + { wxNodeBase* t = m_nodeFirst; m_nodeFirst = l.m_nodeFirst; l.m_nodeFirst = t; }\ + { wxNodeBase* t = m_nodeLast; m_nodeLast = l.m_nodeLast; l.m_nodeLast = t; }\ + { wxKeyType t = m_keyType; m_keyType = l.m_keyType; l.m_keyType = t; }\ + } */ \ + } + +#define WX_LIST_PTROP \ + pointer_type operator->() const \ + { return (pointer_type)m_node->GetDataPtr(); } +#define WX_LIST_PTROP_NONE + +#define WX_DECLARE_LIST_3(T, Tbase, name, nodetype, classexp) \ + WX_DECLARE_LIST_4(T, Tbase, name, nodetype, classexp, WX_LIST_PTROP_NONE) +#define WX_DECLARE_LIST_PTR_3(T, Tbase, name, nodetype, classexp) \ + WX_DECLARE_LIST_4(T, Tbase, name, nodetype, classexp, WX_LIST_PTROP) + +#define WX_DECLARE_LIST_2(elementtype, listname, nodename, classexp) \ + WX_DECLARE_LIST_3(elementtype, elementtype, listname, nodename, classexp) +#define WX_DECLARE_LIST_PTR_2(elementtype, listname, nodename, classexp) \ + WX_DECLARE_LIST_PTR_3(elementtype, elementtype, listname, nodename, classexp) + +#define WX_DECLARE_LIST(elementtype, listname) \ + typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ + WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class) +#define WX_DECLARE_LIST_PTR(elementtype, listname) \ + typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ + WX_DECLARE_LIST_PTR_2(elementtype, listname, wx##listname##Node, class) + +#define WX_DECLARE_LIST_WITH_DECL(elementtype, listname, decl) \ + typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ + WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, decl) + +#define WX_DECLARE_EXPORTED_LIST(elementtype, listname) \ + WX_DECLARE_LIST_WITH_DECL(elementtype, listname, class WXDLLIMPEXP_CORE) + +#define WX_DECLARE_EXPORTED_LIST_PTR(elementtype, listname) \ + typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ + WX_DECLARE_LIST_PTR_2(elementtype, listname, wx##listname##Node, class WXDLLIMPEXP_CORE) + +#define WX_DECLARE_USER_EXPORTED_LIST(elementtype, listname, usergoo) \ + typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ + WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class usergoo) +#define WX_DECLARE_USER_EXPORTED_LIST_PTR(elementtype, listname, usergoo) \ + typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ + WX_DECLARE_LIST_PTR_2(elementtype, listname, wx##listname##Node, class usergoo) + +// this macro must be inserted in your program after +// #include "wx/listimpl.cpp" +#define WX_DEFINE_LIST(name) "don't forget to include listimpl.cpp!" + +#define WX_DEFINE_EXPORTED_LIST(name) WX_DEFINE_LIST(name) +#define WX_DEFINE_USER_EXPORTED_LIST(name) WX_DEFINE_LIST(name) + +#endif // !wxUSE_STD_CONTAINERS + +// ============================================================================ +// now we can define classes 100% compatible with the old ones +// ============================================================================ + +// ---------------------------------------------------------------------------- +// commonly used list classes +// ---------------------------------------------------------------------------- + +#if defined(wxLIST_COMPATIBILITY) + +// inline compatibility functions + +#if !wxUSE_STD_CONTAINERS + +// ---------------------------------------------------------------------------- +// wxNodeBase deprecated methods +// ---------------------------------------------------------------------------- + +inline wxNode *wxNodeBase::Next() const { return (wxNode *)GetNext(); } +inline wxNode *wxNodeBase::Previous() const { return (wxNode *)GetPrevious(); } +inline wxObject *wxNodeBase::Data() const { return (wxObject *)GetData(); } + +// ---------------------------------------------------------------------------- +// wxListBase deprecated methods +// ---------------------------------------------------------------------------- + +inline int wxListBase::Number() const { return (int)GetCount(); } +inline wxNode *wxListBase::First() const { return (wxNode *)GetFirst(); } +inline wxNode *wxListBase::Last() const { return (wxNode *)GetLast(); } +inline wxNode *wxListBase::Nth(size_t n) const { return (wxNode *)Item(n); } +inline wxListBase::operator wxList&() const { return *(wxList*)this; } + +#endif + +// define this to make a lot of noise about use of the old wxList classes. +//#define wxWARN_COMPAT_LIST_USE + +// ---------------------------------------------------------------------------- +// wxList compatibility class: in fact, it's a list of wxObjects +// ---------------------------------------------------------------------------- + +WX_DECLARE_LIST_2(wxObject, wxObjectList, wxObjectListNode, + class WXDLLIMPEXP_BASE); + +class WXDLLIMPEXP_BASE wxList : public wxObjectList +{ +public: +#if defined(wxWARN_COMPAT_LIST_USE) && !wxUSE_STD_CONTAINERS + wxList() { } + wxDEPRECATED( wxList(int key_type) ); +#elif !wxUSE_STD_CONTAINERS + wxList(int key_type = wxKEY_NONE); +#endif + + // this destructor is required for Darwin + ~wxList() { } + +#if !wxUSE_STD_CONTAINERS + wxList& operator=(const wxList& list) + { if (&list != this) Assign(list); return *this; } + + // compatibility methods + void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); } +#endif // !wxUSE_STD_CONTAINERS + +#ifndef __VISUALC6__ + template<typename T> + wxVector<T> AsVector() const + { + wxVector<T> vector(size()); + size_t i = 0; + + for ( const_iterator it = begin(); it != end(); ++it ) + { + vector[i++] = static_cast<T>(*it); + } + + return vector; + } +#endif // !__VISUALC6__ + +}; + +#if !wxUSE_STD_CONTAINERS + +// ----------------------------------------------------------------------------- +// wxStringList class for compatibility with the old code +// ----------------------------------------------------------------------------- +WX_DECLARE_LIST_2(wxChar, wxStringListBase, wxStringListNode, class WXDLLIMPEXP_BASE); + +class WXDLLIMPEXP_BASE wxStringList : public wxStringListBase +{ +public: + // ctors and such + // default +#ifdef wxWARN_COMPAT_LIST_USE + wxStringList(); + wxDEPRECATED( wxStringList(const wxChar *first ...) ); // FIXME-UTF8 +#else + wxStringList(); + wxStringList(const wxChar *first ...); // FIXME-UTF8 +#endif + + // copying the string list: the strings are copied, too (extremely + // inefficient!) + wxStringList(const wxStringList& other) : wxStringListBase() { DeleteContents(true); DoCopy(other); } + wxStringList& operator=(const wxStringList& other) + { + if (&other != this) + { + Clear(); + DoCopy(other); + } + return *this; + } + + // operations + // makes a copy of the string + wxNode *Add(const wxChar *s); + + // Append to beginning of list + wxNode *Prepend(const wxChar *s); + + bool Delete(const wxChar *s); + + wxChar **ListToArray(bool new_copies = false) const; + bool Member(const wxChar *s) const; + + // alphabetic sort + void Sort(); + +private: + void DoCopy(const wxStringList&); // common part of copy ctor and operator= +}; + +#else // if wxUSE_STD_CONTAINERS + +WX_DECLARE_LIST_XO(wxString, wxStringListBase, class WXDLLIMPEXP_BASE); + +class WXDLLIMPEXP_BASE wxStringList : public wxStringListBase +{ +public: + compatibility_iterator Append(wxChar* s) + { wxString tmp = s; delete[] s; return wxStringListBase::Append(tmp); } + compatibility_iterator Insert(wxChar* s) + { wxString tmp = s; delete[] s; return wxStringListBase::Insert(tmp); } + compatibility_iterator Insert(size_t pos, wxChar* s) + { + wxString tmp = s; + delete[] s; + return wxStringListBase::Insert(pos, tmp); + } + compatibility_iterator Add(const wxChar* s) + { push_back(s); return GetLast(); } + compatibility_iterator Prepend(const wxChar* s) + { push_front(s); return GetFirst(); } +}; + +#endif // wxUSE_STD_CONTAINERS + +#endif // wxLIST_COMPATIBILITY + +// delete all list elements +// +// NB: the class declaration of the list elements must be visible from the +// place where you use this macro, otherwise the proper destructor may not +// be called (a decent compiler should give a warning about it, but don't +// count on it)! +#define WX_CLEAR_LIST(type, list) \ + { \ + type::iterator it, en; \ + for( it = (list).begin(), en = (list).end(); it != en; ++it ) \ + delete *it; \ + (list).clear(); \ + } + +// append all element of one list to another one +#define WX_APPEND_LIST(list, other) \ + { \ + wxList::compatibility_iterator node = other->GetFirst(); \ + while ( node ) \ + { \ + (list)->push_back(node->GetData()); \ + node = node->GetNext(); \ + } \ + } + +#endif // _WX_LISTH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/listbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/listbase.h new file mode 100644 index 0000000000..5e6fb7cae3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/listbase.h @@ -0,0 +1,625 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/listbase.h +// Purpose: wxListCtrl class +// Author: Vadim Zeitlin +// Modified by: +// Created: 04.12.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LISTBASE_H_BASE_ +#define _WX_LISTBASE_H_BASE_ + +#include "wx/colour.h" +#include "wx/font.h" +#include "wx/gdicmn.h" +#include "wx/event.h" +#include "wx/control.h" + +class WXDLLIMPEXP_FWD_CORE wxImageList; + +// ---------------------------------------------------------------------------- +// types +// ---------------------------------------------------------------------------- + +// type of compare function for wxListCtrl sort operation +typedef +int (wxCALLBACK *wxListCtrlCompare)(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData); + +// ---------------------------------------------------------------------------- +// wxListCtrl constants +// ---------------------------------------------------------------------------- + +// style flags +#define wxLC_VRULES 0x0001 +#define wxLC_HRULES 0x0002 + +#define wxLC_ICON 0x0004 +#define wxLC_SMALL_ICON 0x0008 +#define wxLC_LIST 0x0010 +#define wxLC_REPORT 0x0020 + +#define wxLC_ALIGN_TOP 0x0040 +#define wxLC_ALIGN_LEFT 0x0080 +#define wxLC_AUTOARRANGE 0x0100 +#define wxLC_VIRTUAL 0x0200 +#define wxLC_EDIT_LABELS 0x0400 +#define wxLC_NO_HEADER 0x0800 +#define wxLC_NO_SORT_HEADER 0x1000 +#define wxLC_SINGLE_SEL 0x2000 +#define wxLC_SORT_ASCENDING 0x4000 +#define wxLC_SORT_DESCENDING 0x8000 + +#define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT) +#define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT) +#define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING) + +// for compatibility only +#define wxLC_USER_TEXT wxLC_VIRTUAL + +// Omitted because +// (a) too much detail +// (b) not enough style flags +// (c) not implemented anyhow in the generic version +// +// #define wxLC_NO_SCROLL +// #define wxLC_NO_LABEL_WRAP +// #define wxLC_OWNERDRAW_FIXED +// #define wxLC_SHOW_SEL_ALWAYS + +// Mask flags to tell app/GUI what fields of wxListItem are valid +#define wxLIST_MASK_STATE 0x0001 +#define wxLIST_MASK_TEXT 0x0002 +#define wxLIST_MASK_IMAGE 0x0004 +#define wxLIST_MASK_DATA 0x0008 +#define wxLIST_SET_ITEM 0x0010 +#define wxLIST_MASK_WIDTH 0x0020 +#define wxLIST_MASK_FORMAT 0x0040 + +// State flags for indicating the state of an item +#define wxLIST_STATE_DONTCARE 0x0000 +#define wxLIST_STATE_DROPHILITED 0x0001 // MSW only +#define wxLIST_STATE_FOCUSED 0x0002 +#define wxLIST_STATE_SELECTED 0x0004 +#define wxLIST_STATE_CUT 0x0008 // MSW only +#define wxLIST_STATE_DISABLED 0x0010 // OS2 only +#define wxLIST_STATE_FILTERED 0x0020 // OS2 only +#define wxLIST_STATE_INUSE 0x0040 // OS2 only +#define wxLIST_STATE_PICKED 0x0080 // OS2 only +#define wxLIST_STATE_SOURCE 0x0100 // OS2 only + +// Hit test flags, used in HitTest +#define wxLIST_HITTEST_ABOVE 0x0001 // Above the client area. +#define wxLIST_HITTEST_BELOW 0x0002 // Below the client area. +#define wxLIST_HITTEST_NOWHERE 0x0004 // In the client area but below the last item. +#define wxLIST_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item. +#define wxLIST_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item. +#define wxLIST_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item. +#define wxLIST_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state. +#define wxLIST_HITTEST_TOLEFT 0x0400 // To the left of the client area. +#define wxLIST_HITTEST_TORIGHT 0x0800 // To the right of the client area. + +#define wxLIST_HITTEST_ONITEM (wxLIST_HITTEST_ONITEMICON | wxLIST_HITTEST_ONITEMLABEL | wxLIST_HITTEST_ONITEMSTATEICON) + +// GetSubItemRect constants +#define wxLIST_GETSUBITEMRECT_WHOLEITEM -1l + +// Flags for GetNextItem (MSW only except wxLIST_NEXT_ALL) +enum +{ + wxLIST_NEXT_ABOVE, // Searches for an item above the specified item + wxLIST_NEXT_ALL, // Searches for subsequent item by index + wxLIST_NEXT_BELOW, // Searches for an item below the specified item + wxLIST_NEXT_LEFT, // Searches for an item to the left of the specified item + wxLIST_NEXT_RIGHT // Searches for an item to the right of the specified item +}; + +// Alignment flags for Arrange (MSW only except wxLIST_ALIGN_LEFT) +enum +{ + wxLIST_ALIGN_DEFAULT, + wxLIST_ALIGN_LEFT, + wxLIST_ALIGN_TOP, + wxLIST_ALIGN_SNAP_TO_GRID +}; + +// Column format (MSW only except wxLIST_FORMAT_LEFT) +enum wxListColumnFormat +{ + wxLIST_FORMAT_LEFT, + wxLIST_FORMAT_RIGHT, + wxLIST_FORMAT_CENTRE, + wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE +}; + +// Autosize values for SetColumnWidth +enum +{ + wxLIST_AUTOSIZE = -1, + wxLIST_AUTOSIZE_USEHEADER = -2 // partly supported by generic version +}; + +// Flag values for GetItemRect +enum +{ + wxLIST_RECT_BOUNDS, + wxLIST_RECT_ICON, + wxLIST_RECT_LABEL +}; + +// Flag values for FindItem (MSW only) +enum +{ + wxLIST_FIND_UP, + wxLIST_FIND_DOWN, + wxLIST_FIND_LEFT, + wxLIST_FIND_RIGHT +}; + +// ---------------------------------------------------------------------------- +// wxListItemAttr: a structure containing the visual attributes of an item +// ---------------------------------------------------------------------------- + +// TODO: this should be renamed to wxItemAttr or something general like this +// and used as base class for wxTextAttr which duplicates this class +// entirely currently +class WXDLLIMPEXP_CORE wxListItemAttr +{ +public: + // ctors + wxListItemAttr() { } + wxListItemAttr(const wxColour& colText, + const wxColour& colBack, + const wxFont& font) + : m_colText(colText), m_colBack(colBack), m_font(font) + { + } + + // default copy ctor, assignment operator and dtor are ok + + + // setters + void SetTextColour(const wxColour& colText) { m_colText = colText; } + void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; } + void SetFont(const wxFont& font) { m_font = font; } + + // accessors + bool HasTextColour() const { return m_colText.IsOk(); } + bool HasBackgroundColour() const { return m_colBack.IsOk(); } + bool HasFont() const { return m_font.IsOk(); } + + const wxColour& GetTextColour() const { return m_colText; } + const wxColour& GetBackgroundColour() const { return m_colBack; } + const wxFont& GetFont() const { return m_font; } + + + // this is almost like assignment operator except it doesn't overwrite the + // fields unset in the source attribute + void AssignFrom(const wxListItemAttr& source) + { + if ( source.HasTextColour() ) + SetTextColour(source.GetTextColour()); + if ( source.HasBackgroundColour() ) + SetBackgroundColour(source.GetBackgroundColour()); + if ( source.HasFont() ) + SetFont(source.GetFont()); + } + +private: + wxColour m_colText, + m_colBack; + wxFont m_font; +}; + +// ---------------------------------------------------------------------------- +// wxListItem: the item or column info, used to exchange data with wxListCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxListItem : public wxObject +{ +public: + wxListItem() { Init(); m_attr = NULL; } + wxListItem(const wxListItem& item) + : wxObject(), + m_mask(item.m_mask), + m_itemId(item.m_itemId), + m_col(item.m_col), + m_state(item.m_state), + m_stateMask(item.m_stateMask), + m_text(item.m_text), + m_image(item.m_image), + m_data(item.m_data), + m_format(item.m_format), + m_width(item.m_width), + m_attr(NULL) + { + // copy list item attributes + if ( item.HasAttributes() ) + m_attr = new wxListItemAttr(*item.GetAttributes()); + } + + wxListItem& operator=(const wxListItem& item) + { + if ( &item != this ) + { + m_mask = item.m_mask; + m_itemId = item.m_itemId; + m_col = item.m_col; + m_state = item.m_state; + m_stateMask = item.m_stateMask; + m_text = item.m_text; + m_image = item.m_image; + m_data = item.m_data; + m_format = item.m_format; + m_width = item.m_width; + m_attr = item.m_attr ? new wxListItemAttr(*item.m_attr) : NULL; + } + + return *this; + } + + virtual ~wxListItem() { delete m_attr; } + + // resetting + void Clear() { Init(); m_text.clear(); ClearAttributes(); } + void ClearAttributes() { if ( m_attr ) { delete m_attr; m_attr = NULL; } } + + // setters + void SetMask(long mask) + { m_mask = mask; } + void SetId(long id) + { m_itemId = id; } + void SetColumn(int col) + { m_col = col; } + void SetState(long state) + { m_mask |= wxLIST_MASK_STATE; m_state = state; m_stateMask |= state; } + void SetStateMask(long stateMask) + { m_stateMask = stateMask; } + void SetText(const wxString& text) + { m_mask |= wxLIST_MASK_TEXT; m_text = text; } + void SetImage(int image) + { m_mask |= wxLIST_MASK_IMAGE; m_image = image; } + void SetData(long data) + { m_mask |= wxLIST_MASK_DATA; m_data = data; } + void SetData(void *data) + { m_mask |= wxLIST_MASK_DATA; m_data = wxPtrToUInt(data); } + + void SetWidth(int width) + { m_mask |= wxLIST_MASK_WIDTH; m_width = width; } + void SetAlign(wxListColumnFormat align) + { m_mask |= wxLIST_MASK_FORMAT; m_format = align; } + + void SetTextColour(const wxColour& colText) + { Attributes().SetTextColour(colText); } + void SetBackgroundColour(const wxColour& colBack) + { Attributes().SetBackgroundColour(colBack); } + void SetFont(const wxFont& font) + { Attributes().SetFont(font); } + + // accessors + long GetMask() const { return m_mask; } + long GetId() const { return m_itemId; } + int GetColumn() const { return m_col; } + long GetState() const { return m_state & m_stateMask; } + const wxString& GetText() const { return m_text; } + int GetImage() const { return m_image; } + wxUIntPtr GetData() const { return m_data; } + + int GetWidth() const { return m_width; } + wxListColumnFormat GetAlign() const { return (wxListColumnFormat)m_format; } + + wxListItemAttr *GetAttributes() const { return m_attr; } + bool HasAttributes() const { return m_attr != NULL; } + + wxColour GetTextColour() const + { return HasAttributes() ? m_attr->GetTextColour() : wxNullColour; } + wxColour GetBackgroundColour() const + { return HasAttributes() ? m_attr->GetBackgroundColour() + : wxNullColour; } + wxFont GetFont() const + { return HasAttributes() ? m_attr->GetFont() : wxNullFont; } + + // this conversion is necessary to make old code using GetItem() to + // compile + operator long() const { return m_itemId; } + + // these members are public for compatibility + + long m_mask; // Indicates what fields are valid + long m_itemId; // The zero-based item position + int m_col; // Zero-based column, if in report mode + long m_state; // The state of the item + long m_stateMask;// Which flags of m_state are valid (uses same flags) + wxString m_text; // The label/header text + int m_image; // The zero-based index into an image list + wxUIntPtr m_data; // App-defined data + + // For columns only + int m_format; // left, right, centre + int m_width; // width of column + +#ifdef __WXPM__ + int m_miniImage; // handle to the mini image for OS/2 +#endif + +protected: + // creates m_attr if we don't have it yet + wxListItemAttr& Attributes() + { + if ( !m_attr ) + m_attr = new wxListItemAttr; + + return *m_attr; + } + + void Init() + { + m_mask = 0; + m_itemId = -1; + m_col = 0; + m_state = 0; + m_stateMask = 0; + m_image = -1; + m_data = 0; + + m_format = wxLIST_FORMAT_CENTRE; + m_width = 0; + } + + wxListItemAttr *m_attr; // optional pointer to the items style + +private: + DECLARE_DYNAMIC_CLASS(wxListItem) +}; + +// ---------------------------------------------------------------------------- +// wxListCtrlBase: the base class for the main control itself. +// ---------------------------------------------------------------------------- + +// Unlike other base classes, this class doesn't currently define the API of +// the real control class but is just used for implementation convenience. We +// should define the public class functions as pure virtual here in the future +// however. +class WXDLLIMPEXP_CORE wxListCtrlBase : public wxControl +{ +public: + wxListCtrlBase() { } + + // Image list methods. + // ------------------- + + // Associate the given (possibly NULL to indicate that no images will be + // used) image list with the control. The ownership of the image list + // passes to the control, i.e. it will be deleted when the control itself + // is destroyed. + // + // The value of "which" must be one of wxIMAGE_LIST_{NORMAL,SMALL,STATE}. + virtual void AssignImageList(wxImageList* imageList, int which) = 0; + + // Same as AssignImageList() but the control does not delete the image list + // so it can be shared among several controls. + virtual void SetImageList(wxImageList* imageList, int which) = 0; + + // Return the currently used image list, may be NULL. + virtual wxImageList* GetImageList(int which) const = 0; + + + // Column-related methods. + // ----------------------- + + // All these methods can only be used in report view mode. + + // Appends a new column. + // + // Returns the index of the newly inserted column or -1 on error. + long AppendColumn(const wxString& heading, + wxListColumnFormat format = wxLIST_FORMAT_LEFT, + int width = -1); + + // Add a new column to the control at the position "col". + // + // Returns the index of the newly inserted column or -1 on error. + long InsertColumn(long col, const wxListItem& info); + long InsertColumn(long col, + const wxString& heading, + int format = wxLIST_FORMAT_LEFT, + int width = wxLIST_AUTOSIZE); + + // Delete the given or all columns. + virtual bool DeleteColumn(int col) = 0; + virtual bool DeleteAllColumns() = 0; + + // Return the current number of columns. + virtual int GetColumnCount() const = 0; + + // Get or update information about the given column. Set item mask to + // indicate the fields to retrieve or change. + // + // Returns false on error, e.g. if the column index is invalid. + virtual bool GetColumn(int col, wxListItem& item) const = 0; + virtual bool SetColumn(int col, const wxListItem& item) = 0; + + // Convenient wrappers for the above methods which get or update just the + // column width. + virtual int GetColumnWidth(int col) const = 0; + virtual bool SetColumnWidth(int col, int width) = 0; + + // return the attribute for the item (may return NULL if none) + virtual wxListItemAttr *OnGetItemAttr(long item) const; + + // Other miscellaneous accessors. + // ------------------------------ + + // Convenient functions for testing the list control mode: + bool InReportView() const { return HasFlag(wxLC_REPORT); } + bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); } + + // Enable or disable beep when incremental match doesn't find any item. + // Only implemented in the generic version currently. + virtual void EnableBellOnNoMatch(bool WXUNUSED(on) = true) { } + + void EnableAlternateRowColours(bool enable = true); + void SetAlternateRowColour(const wxColour& colour); + +protected: + // Real implementations methods to which our public forwards. + virtual long DoInsertColumn(long col, const wxListItem& info) = 0; + + // Overridden methods of the base class. + virtual wxSize DoGetBestClientSize() const; + +private: + // user defined color to draw row lines, may be invalid + wxListItemAttr m_alternateRowColour; +}; + +// ---------------------------------------------------------------------------- +// wxListEvent - the event class for the wxListCtrl notifications +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxListEvent : public wxNotifyEvent +{ +public: + wxListEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) + : wxNotifyEvent(commandType, winid) + , m_code(-1) + , m_oldItemIndex(-1) + , m_itemIndex(-1) + , m_col(-1) + , m_pointDrag() + , m_item() + , m_editCancelled(false) + { } + + wxListEvent(const wxListEvent& event) + : wxNotifyEvent(event) + , m_code(event.m_code) + , m_oldItemIndex(event.m_oldItemIndex) + , m_itemIndex(event.m_itemIndex) + , m_col(event.m_col) + , m_pointDrag(event.m_pointDrag) + , m_item(event.m_item) + , m_editCancelled(event.m_editCancelled) + { } + + int GetKeyCode() const { return m_code; } + long GetIndex() const { return m_itemIndex; } + int GetColumn() const { return m_col; } + wxPoint GetPoint() const { return m_pointDrag; } + const wxString& GetLabel() const { return m_item.m_text; } + const wxString& GetText() const { return m_item.m_text; } + int GetImage() const { return m_item.m_image; } + wxUIntPtr GetData() const { return m_item.m_data; } + long GetMask() const { return m_item.m_mask; } + const wxListItem& GetItem() const { return m_item; } + + // for wxEVT_LIST_CACHE_HINT only + long GetCacheFrom() const { return m_oldItemIndex; } + long GetCacheTo() const { return m_itemIndex; } + + // was label editing canceled? (for wxEVT_LIST_END_LABEL_EDIT only) + bool IsEditCancelled() const { return m_editCancelled; } + void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; } + + virtual wxEvent *Clone() const { return new wxListEvent(*this); } + +//protected: -- not for backwards compatibility + int m_code; + long m_oldItemIndex; // only for wxEVT_LIST_CACHE_HINT + long m_itemIndex; + int m_col; + wxPoint m_pointDrag; + + wxListItem m_item; + +protected: + bool m_editCancelled; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxListEvent) +}; + +// ---------------------------------------------------------------------------- +// wxListCtrl event macros +// ---------------------------------------------------------------------------- + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_BEGIN_DRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_BEGIN_RDRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_BEGIN_LABEL_EDIT, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_END_LABEL_EDIT, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_DELETE_ITEM, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_DELETE_ALL_ITEMS, wxListEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_SELECTED, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_DESELECTED, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_KEY_DOWN, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_INSERT_ITEM, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_RIGHT_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_MIDDLE_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_ACTIVATED, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_CACHE_HINT, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_RIGHT_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_BEGIN_DRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_DRAGGING, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_END_DRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_FOCUSED, wxListEvent ); + +typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); + +#define wxListEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxListEventFunction, func) + +#define wx__DECLARE_LISTEVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_LIST_ ## evt, id, wxListEventHandler(fn)) + +#define EVT_LIST_BEGIN_DRAG(id, fn) wx__DECLARE_LISTEVT(BEGIN_DRAG, id, fn) +#define EVT_LIST_BEGIN_RDRAG(id, fn) wx__DECLARE_LISTEVT(BEGIN_RDRAG, id, fn) +#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) wx__DECLARE_LISTEVT(BEGIN_LABEL_EDIT, id, fn) +#define EVT_LIST_END_LABEL_EDIT(id, fn) wx__DECLARE_LISTEVT(END_LABEL_EDIT, id, fn) +#define EVT_LIST_DELETE_ITEM(id, fn) wx__DECLARE_LISTEVT(DELETE_ITEM, id, fn) +#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) wx__DECLARE_LISTEVT(DELETE_ALL_ITEMS, id, fn) +#define EVT_LIST_KEY_DOWN(id, fn) wx__DECLARE_LISTEVT(KEY_DOWN, id, fn) +#define EVT_LIST_INSERT_ITEM(id, fn) wx__DECLARE_LISTEVT(INSERT_ITEM, id, fn) + +#define EVT_LIST_COL_CLICK(id, fn) wx__DECLARE_LISTEVT(COL_CLICK, id, fn) +#define EVT_LIST_COL_RIGHT_CLICK(id, fn) wx__DECLARE_LISTEVT(COL_RIGHT_CLICK, id, fn) +#define EVT_LIST_COL_BEGIN_DRAG(id, fn) wx__DECLARE_LISTEVT(COL_BEGIN_DRAG, id, fn) +#define EVT_LIST_COL_DRAGGING(id, fn) wx__DECLARE_LISTEVT(COL_DRAGGING, id, fn) +#define EVT_LIST_COL_END_DRAG(id, fn) wx__DECLARE_LISTEVT(COL_END_DRAG, id, fn) + +#define EVT_LIST_ITEM_SELECTED(id, fn) wx__DECLARE_LISTEVT(ITEM_SELECTED, id, fn) +#define EVT_LIST_ITEM_DESELECTED(id, fn) wx__DECLARE_LISTEVT(ITEM_DESELECTED, id, fn) +#define EVT_LIST_ITEM_RIGHT_CLICK(id, fn) wx__DECLARE_LISTEVT(ITEM_RIGHT_CLICK, id, fn) +#define EVT_LIST_ITEM_MIDDLE_CLICK(id, fn) wx__DECLARE_LISTEVT(ITEM_MIDDLE_CLICK, id, fn) +#define EVT_LIST_ITEM_ACTIVATED(id, fn) wx__DECLARE_LISTEVT(ITEM_ACTIVATED, id, fn) +#define EVT_LIST_ITEM_FOCUSED(id, fn) wx__DECLARE_LISTEVT(ITEM_FOCUSED, id, fn) + +#define EVT_LIST_CACHE_HINT(id, fn) wx__DECLARE_LISTEVT(CACHE_HINT, id, fn) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_LIST_BEGIN_DRAG wxEVT_LIST_BEGIN_DRAG +#define wxEVT_COMMAND_LIST_BEGIN_RDRAG wxEVT_LIST_BEGIN_RDRAG +#define wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT wxEVT_LIST_BEGIN_LABEL_EDIT +#define wxEVT_COMMAND_LIST_END_LABEL_EDIT wxEVT_LIST_END_LABEL_EDIT +#define wxEVT_COMMAND_LIST_DELETE_ITEM wxEVT_LIST_DELETE_ITEM +#define wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS wxEVT_LIST_DELETE_ALL_ITEMS +#define wxEVT_COMMAND_LIST_ITEM_SELECTED wxEVT_LIST_ITEM_SELECTED +#define wxEVT_COMMAND_LIST_ITEM_DESELECTED wxEVT_LIST_ITEM_DESELECTED +#define wxEVT_COMMAND_LIST_KEY_DOWN wxEVT_LIST_KEY_DOWN +#define wxEVT_COMMAND_LIST_INSERT_ITEM wxEVT_LIST_INSERT_ITEM +#define wxEVT_COMMAND_LIST_COL_CLICK wxEVT_LIST_COL_CLICK +#define wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK wxEVT_LIST_ITEM_RIGHT_CLICK +#define wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK wxEVT_LIST_ITEM_MIDDLE_CLICK +#define wxEVT_COMMAND_LIST_ITEM_ACTIVATED wxEVT_LIST_ITEM_ACTIVATED +#define wxEVT_COMMAND_LIST_CACHE_HINT wxEVT_LIST_CACHE_HINT +#define wxEVT_COMMAND_LIST_COL_RIGHT_CLICK wxEVT_LIST_COL_RIGHT_CLICK +#define wxEVT_COMMAND_LIST_COL_BEGIN_DRAG wxEVT_LIST_COL_BEGIN_DRAG +#define wxEVT_COMMAND_LIST_COL_DRAGGING wxEVT_LIST_COL_DRAGGING +#define wxEVT_COMMAND_LIST_COL_END_DRAG wxEVT_LIST_COL_END_DRAG +#define wxEVT_COMMAND_LIST_ITEM_FOCUSED wxEVT_LIST_ITEM_FOCUSED + + +#endif + // _WX_LISTCTRL_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/listbook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/listbook.h new file mode 100644 index 0000000000..1c7cdbd923 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/listbook.h @@ -0,0 +1,129 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/listbook.h +// Purpose: wxListbook: wxListCtrl and wxNotebook combination +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.08.03 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LISTBOOK_H_ +#define _WX_LISTBOOK_H_ + +#include "wx/defs.h" + +#if wxUSE_LISTBOOK + +#include "wx/bookctrl.h" +#include "wx/containr.h" + +class WXDLLIMPEXP_FWD_CORE wxListView; +class WXDLLIMPEXP_FWD_CORE wxListEvent; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LISTBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LISTBOOK_PAGE_CHANGING, wxBookCtrlEvent ); + +// wxListbook flags +#define wxLB_DEFAULT wxBK_DEFAULT +#define wxLB_TOP wxBK_TOP +#define wxLB_BOTTOM wxBK_BOTTOM +#define wxLB_LEFT wxBK_LEFT +#define wxLB_RIGHT wxBK_RIGHT +#define wxLB_ALIGN_MASK wxBK_ALIGN_MASK + +// ---------------------------------------------------------------------------- +// wxListbook +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxListbook : public wxNavigationEnabled<wxBookCtrlBase> +{ +public: + wxListbook() { } + + wxListbook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxEmptyString) + { + (void)Create(parent, id, pos, size, style, name); + } + + // quasi ctor + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxEmptyString); + + + // overridden base class methods + virtual bool SetPageText(size_t n, const wxString& strText); + virtual wxString GetPageText(size_t n) const; + virtual int GetPageImage(size_t n) const; + virtual bool SetPageImage(size_t n, int imageId); + virtual bool InsertPage(size_t n, + wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE); + virtual int SetSelection(size_t n) { return DoSetSelection(n, SetSelection_SendEvent); } + virtual int ChangeSelection(size_t n) { return DoSetSelection(n); } + virtual int HitTest(const wxPoint& pt, long *flags = NULL) const; + virtual void SetImageList(wxImageList *imageList); + + virtual bool DeleteAllPages(); + + wxListView* GetListView() const { return (wxListView*)m_bookctrl; } + +protected: + virtual wxWindow *DoRemovePage(size_t page); + + void UpdateSelectedPage(size_t newsel); + + wxBookCtrlEvent* CreatePageChangingEvent() const; + void MakeChangedEvent(wxBookCtrlEvent &event); + + // Get the correct wxListCtrl flags to use depending on our own flags. + long GetListCtrlFlags() const; + + // event handlers + void OnListSelected(wxListEvent& event); + void OnSize(wxSizeEvent& event); + +private: + // this should be called when we need to be relaid out + void UpdateSize(); + + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxListbook) +}; + +// ---------------------------------------------------------------------------- +// listbook event class and related stuff +// ---------------------------------------------------------------------------- + +// wxListbookEvent is obsolete and defined for compatibility only (notice that +// we use #define and not typedef to also keep compatibility with the existing +// code which forward declares it) +#define wxListbookEvent wxBookCtrlEvent +typedef wxBookCtrlEventFunction wxListbookEventFunction; +#define wxListbookEventHandler(func) wxBookCtrlEventHandler(func) + +#define EVT_LISTBOOK_PAGE_CHANGED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_LISTBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + +#define EVT_LISTBOOK_PAGE_CHANGING(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_LISTBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED wxEVT_LISTBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING wxEVT_LISTBOOK_PAGE_CHANGING + +#endif // wxUSE_LISTBOOK + +#endif // _WX_LISTBOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/listbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/listbox.h new file mode 100644 index 0000000000..afb0220036 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/listbox.h @@ -0,0 +1,165 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/listbox.h +// Purpose: wxListBox class interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 22.10.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LISTBOX_H_BASE_ +#define _WX_LISTBOX_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_LISTBOX + +#include "wx/ctrlsub.h" // base class + +// forward declarations are enough here +class WXDLLIMPEXP_FWD_BASE wxArrayInt; +class WXDLLIMPEXP_FWD_BASE wxArrayString; + +// ---------------------------------------------------------------------------- +// global data +// ---------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_CORE(const char) wxListBoxNameStr[]; + +// ---------------------------------------------------------------------------- +// wxListBox interface is defined by the class wxListBoxBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxListBoxBase : public wxControlWithItems +{ +public: + wxListBoxBase() { } + virtual ~wxListBoxBase(); + + void InsertItems(unsigned int nItems, const wxString *items, unsigned int pos) + { Insert(nItems, items, pos); } + void InsertItems(const wxArrayString& items, unsigned int pos) + { Insert(items, pos); } + + // multiple selection logic + virtual bool IsSelected(int n) const = 0; + virtual void SetSelection(int n); + void SetSelection(int n, bool select) { DoSetSelection(n, select); } + void Deselect(int n) { DoSetSelection(n, false); } + void DeselectAll(int itemToLeaveSelected = -1); + + virtual bool SetStringSelection(const wxString& s, bool select); + virtual bool SetStringSelection(const wxString& s) + { + return SetStringSelection(s, true); + } + + // works for single as well as multiple selection listboxes (unlike + // GetSelection which only works for listboxes with single selection) + virtual int GetSelections(wxArrayInt& aSelections) const = 0; + + // set the specified item at the first visible item or scroll to max + // range. + void SetFirstItem(int n) { DoSetFirstItem(n); } + void SetFirstItem(const wxString& s); + + // ensures that the given item is visible scrolling the listbox if + // necessary + virtual void EnsureVisible(int n); + + // a combination of Append() and EnsureVisible(): appends the item to the + // listbox and ensures that it is visible i.e. not scrolled out of view + void AppendAndEnsureVisible(const wxString& s); + + // return true if the listbox allows multiple selection + bool HasMultipleSelection() const + { + return (m_windowStyle & wxLB_MULTIPLE) || + (m_windowStyle & wxLB_EXTENDED); + } + + // override wxItemContainer::IsSorted + virtual bool IsSorted() const { return HasFlag( wxLB_SORT ); } + + // emulate selecting or deselecting the item event.GetInt() (depending on + // event.GetExtraLong()) + void Command(wxCommandEvent& event); + + // return the index of the item at this position or wxNOT_FOUND + int HitTest(const wxPoint& point) const { return DoListHitTest(point); } + int HitTest(int x, int y) const { return DoListHitTest(wxPoint(x, y)); } + + +protected: + virtual void DoSetFirstItem(int n) = 0; + + virtual void DoSetSelection(int n, bool select) = 0; + + // there is already wxWindow::DoHitTest() so call this one differently + virtual int DoListHitTest(const wxPoint& WXUNUSED(point)) const + { return wxNOT_FOUND; } + + // Helper for the code generating events in single selection mode: updates + // m_oldSelections and return true if the selection really changed. + // Otherwise just returns false. + bool DoChangeSingleSelection(int item); + + // Helper for generating events in multiple and extended mode: compare the + // current selections with the previously recorded ones (in + // m_oldSelections) and send the appropriate event if they differ, + // otherwise just return false. + bool CalcAndSendEvent(); + + // Send a listbox (de)selection or double click event. + // + // Returns true if the event was processed. + bool SendEvent(wxEventType evtType, int item, bool selected); + + // Array storing the indices of all selected items that we already notified + // the user code about for multi selection list boxes. + // + // For single selection list boxes, we reuse this array to store the single + // currently selected item, this is used by DoChangeSingleSelection(). + // + // TODO-OPT: wxSelectionStore would be more efficient for big list boxes. + wxArrayInt m_oldSelections; + + // Update m_oldSelections with currently selected items (does nothing in + // single selection mode on platforms other than MSW). + void UpdateOldSelections(); + +private: + wxDECLARE_NO_COPY_CLASS(wxListBoxBase); +}; + +// ---------------------------------------------------------------------------- +// include the platform-specific class declaration +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/listbox.h" +#elif defined(__WXMSW__) + #include "wx/msw/listbox.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/listbox.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/listbox.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/listbox.h" +#elif defined(__WXMAC__) + #include "wx/osx/listbox.h" +#elif defined(__WXPM__) + #include "wx/os2/listbox.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/listbox.h" +#endif + +#endif // wxUSE_LISTBOX + +#endif + // _WX_LISTBOX_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/listctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/listctrl.h new file mode 100644 index 0000000000..51aca4a1b1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/listctrl.h @@ -0,0 +1,109 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/listctrl.h +// Purpose: wxListCtrl class +// Author: Vadim Zeitlin +// Modified by: +// Created: 04.12.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LISTCTRL_H_BASE_ +#define _WX_LISTCTRL_H_BASE_ + +#include "wx/defs.h" // headers should include this before first wxUSE_XXX check + +#if wxUSE_LISTCTRL + +#include "wx/listbase.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_CORE(const char) wxListCtrlNameStr[]; + +// ---------------------------------------------------------------------------- +// include the wxListCtrl class declaration +// ---------------------------------------------------------------------------- + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + #include "wx/msw/listctrl.h" +#elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON + #include "wx/osx/listctrl.h" +#else + #include "wx/generic/listctrl.h" +#endif + +// ---------------------------------------------------------------------------- +// wxListView: a class which provides a better API for list control +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxListView : public wxListCtrl +{ +public: + wxListView() { } + wxListView( wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLC_REPORT, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxListCtrlNameStr) + { + Create(parent, winid, pos, size, style, validator, name); + } + + // focus/selection stuff + // --------------------- + + // [de]select an item + void Select(long n, bool on = true) + { + SetItemState(n, on ? wxLIST_STATE_SELECTED : 0, wxLIST_STATE_SELECTED); + } + + // focus and show the given item + void Focus(long index) + { + SetItemState(index, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); + EnsureVisible(index); + } + + // get the currently focused item or -1 if none + long GetFocusedItem() const + { + return GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED); + } + + // get first and subsequent selected items, return -1 when no more + long GetNextSelected(long item) const + { return GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); } + long GetFirstSelected() const + { return GetNextSelected(-1); } + + // return true if the item is selected + bool IsSelected(long index) const + { return GetItemState(index, wxLIST_STATE_SELECTED) != 0; } + + // columns + // ------- + + void SetColumnImage(int col, int image) + { + wxListItem item; + item.SetMask(wxLIST_MASK_IMAGE); + item.SetImage(image); + SetColumn(col, item); + } + + void ClearColumnImage(int col) { SetColumnImage(col, -1); } + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxListView) +}; + +#endif // wxUSE_LISTCTRL + +#endif + // _WX_LISTCTRL_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/listimpl.cpp b/3rdparty/wxwidgets3.0-3.0.1/include/wx/listimpl.cpp new file mode 100644 index 0000000000..f3a4a1bdfe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/listimpl.cpp @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/listimpl.cpp +// Purpose: second-part of macro based implementation of template lists +// Author: Vadim Zeitlin +// Modified by: +// Created: 16/11/98 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#if wxUSE_STD_CONTAINERS + +#undef WX_DEFINE_LIST +#define WX_DEFINE_LIST(name) \ + void _WX_LIST_HELPER_##name::DeleteFunction( _WX_LIST_ITEM_TYPE_##name X )\ + { \ + delete X; \ + } \ + _WX_LIST_HELPER_##name::BaseListType _WX_LIST_HELPER_##name::EmptyList; + +#else // !wxUSE_STD_CONTAINERS + #undef WX_DEFINE_LIST_2 + #define WX_DEFINE_LIST_2(T, name) \ + void wx##name##Node::DeleteData() \ + { \ + delete (T *)GetData(); \ + } + + // redefine the macro so that now it will generate the class implementation + // old value would provoke a compile-time error if this file is not included + #undef WX_DEFINE_LIST + #define WX_DEFINE_LIST(name) WX_DEFINE_LIST_2(_WX_LIST_ITEM_TYPE_##name, name) + +#endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/log.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/log.h new file mode 100644 index 0000000000..be0a245a49 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/log.h @@ -0,0 +1,1647 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/log.h +// Purpose: Assorted wxLogXXX functions, and wxLog (sink for logs) +// Author: Vadim Zeitlin +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LOG_H_ +#define _WX_LOG_H_ + +#include "wx/defs.h" +#include "wx/cpp.h" + +// ---------------------------------------------------------------------------- +// types +// ---------------------------------------------------------------------------- + +// NB: this is needed even if wxUSE_LOG == 0 +typedef unsigned long wxLogLevel; + +// the trace masks have been superseded by symbolic trace constants, they're +// for compatibility only and will be removed soon - do NOT use them +#if WXWIN_COMPATIBILITY_2_8 + #define wxTraceMemAlloc 0x0001 // trace memory allocation (new/delete) + #define wxTraceMessages 0x0002 // trace window messages/X callbacks + #define wxTraceResAlloc 0x0004 // trace GDI resource allocation + #define wxTraceRefCount 0x0008 // trace various ref counting operations + + #ifdef __WINDOWS__ + #define wxTraceOleCalls 0x0100 // OLE interface calls + #endif + + typedef unsigned long wxTraceMask; +#endif // WXWIN_COMPATIBILITY_2_8 + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/string.h" +#include "wx/strvararg.h" + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxObject; + +#if wxUSE_GUI + class WXDLLIMPEXP_FWD_CORE wxFrame; +#endif // wxUSE_GUI + +#if wxUSE_LOG + +#include "wx/arrstr.h" + +#ifndef __WXWINCE__ + #include <time.h> // for time_t +#endif + +#include "wx/dynarray.h" +#include "wx/hashmap.h" + +#if wxUSE_THREADS + #include "wx/thread.h" +#endif // wxUSE_THREADS + +// wxUSE_LOG_DEBUG enables the debug log messages +#ifndef wxUSE_LOG_DEBUG + #if wxDEBUG_LEVEL + #define wxUSE_LOG_DEBUG 1 + #else // !wxDEBUG_LEVEL + #define wxUSE_LOG_DEBUG 0 + #endif +#endif + +// wxUSE_LOG_TRACE enables the trace messages, they are disabled by default +#ifndef wxUSE_LOG_TRACE + #if wxDEBUG_LEVEL + #define wxUSE_LOG_TRACE 1 + #else // !wxDEBUG_LEVEL + #define wxUSE_LOG_TRACE 0 + #endif +#endif // wxUSE_LOG_TRACE + +// wxLOG_COMPONENT identifies the component which generated the log record and +// can be #define'd to a user-defined value when compiling the user code to use +// component-based filtering (see wxLog::SetComponentLevel()) +#ifndef wxLOG_COMPONENT + // this is a variable and not a macro in order to allow the user code to + // just #define wxLOG_COMPONENT without #undef'ining it first + extern WXDLLIMPEXP_DATA_BASE(const char *) wxLOG_COMPONENT; + + #ifdef WXBUILDING + #define wxLOG_COMPONENT "wx" + #endif +#endif + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// different standard log levels (you may also define your own) +enum wxLogLevelValues +{ + wxLOG_FatalError, // program can't continue, abort immediately + wxLOG_Error, // a serious error, user must be informed about it + wxLOG_Warning, // user is normally informed about it but may be ignored + wxLOG_Message, // normal message (i.e. normal output of a non GUI app) + wxLOG_Status, // informational: might go to the status line of GUI app + wxLOG_Info, // informational message (a.k.a. 'Verbose') + wxLOG_Debug, // never shown to the user, disabled in release mode + wxLOG_Trace, // trace messages are also only enabled in debug mode + wxLOG_Progress, // used for progress indicator (not yet) + wxLOG_User = 100, // user defined levels start here + wxLOG_Max = 10000 +}; + +// symbolic trace masks - wxLogTrace("foo", "some trace message...") will be +// discarded unless the string "foo" has been added to the list of allowed +// ones with AddTraceMask() + +#define wxTRACE_MemAlloc wxT("memalloc") // trace memory allocation (new/delete) +#define wxTRACE_Messages wxT("messages") // trace window messages/X callbacks +#define wxTRACE_ResAlloc wxT("resalloc") // trace GDI resource allocation +#define wxTRACE_RefCount wxT("refcount") // trace various ref counting operations + +#ifdef __WINDOWS__ + #define wxTRACE_OleCalls wxT("ole") // OLE interface calls +#endif + +#include "wx/iosfwrap.h" + +// ---------------------------------------------------------------------------- +// information about a log record, i.e. unit of log output +// ---------------------------------------------------------------------------- + +class wxLogRecordInfo +{ +public: + // default ctor creates an uninitialized object + wxLogRecordInfo() + { + memset(this, 0, sizeof(*this)); + } + + // normal ctor, used by wxLogger specifies the location of the log + // statement; its time stamp and thread id are set up here + wxLogRecordInfo(const char *filename_, + int line_, + const char *func_, + const char *component_) + { + filename = filename_; + func = func_; + line = line_; + component = component_; + + timestamp = time(NULL); + +#if wxUSE_THREADS + threadId = wxThread::GetCurrentId(); +#endif // wxUSE_THREADS + + m_data = NULL; + } + + // we need to define copy ctor and assignment operator because of m_data + wxLogRecordInfo(const wxLogRecordInfo& other) + { + Copy(other); + } + + wxLogRecordInfo& operator=(const wxLogRecordInfo& other) + { + if ( &other != this ) + { + delete m_data; + Copy(other); + } + + return *this; + } + + // dtor is non-virtual, this class is not meant to be derived from + ~wxLogRecordInfo() + { + delete m_data; + } + + + // the file name and line number of the file where the log record was + // generated, if available or NULL and 0 otherwise + const char *filename; + int line; + + // the name of the function where the log record was generated (may be NULL + // if the compiler doesn't support __FUNCTION__) + const char *func; + + // the name of the component which generated this message, may be NULL if + // not set (i.e. wxLOG_COMPONENT not defined) + const char *component; + + // time of record generation + time_t timestamp; + +#if wxUSE_THREADS + // id of the thread which logged this record + wxThreadIdType threadId; +#endif // wxUSE_THREADS + + + // store an arbitrary value in this record context + // + // wxWidgets always uses keys starting with "wx.", e.g. "wx.sys_error" + void StoreValue(const wxString& key, wxUIntPtr val) + { + if ( !m_data ) + m_data = new ExtraData; + + m_data->numValues[key] = val; + } + + void StoreValue(const wxString& key, const wxString& val) + { + if ( !m_data ) + m_data = new ExtraData; + + m_data->strValues[key] = val; + } + + + // these functions retrieve the value of either numeric or string key, + // return false if not found + bool GetNumValue(const wxString& key, wxUIntPtr *val) const + { + if ( !m_data ) + return false; + + wxStringToNumHashMap::const_iterator it = m_data->numValues.find(key); + if ( it == m_data->numValues.end() ) + return false; + + *val = it->second; + + return true; + } + + bool GetStrValue(const wxString& key, wxString *val) const + { + if ( !m_data ) + return false; + + wxStringToStringHashMap::const_iterator it = m_data->strValues.find(key); + if ( it == m_data->strValues.end() ) + return false; + + *val = it->second; + + return true; + } + +private: + void Copy(const wxLogRecordInfo& other) + { + memcpy(this, &other, sizeof(*this)); + if ( other.m_data ) + m_data = new ExtraData(*other.m_data); + } + + // extra data associated with the log record: this is completely optional + // and can be used to pass information from the log function to the log + // sink (e.g. wxLogSysError() uses this to pass the error code) + struct ExtraData + { + wxStringToNumHashMap numValues; + wxStringToStringHashMap strValues; + }; + + // NULL if not used + ExtraData *m_data; +}; + +#define wxLOG_KEY_TRACE_MASK "wx.trace_mask" + +// ---------------------------------------------------------------------------- +// log record: a unit of log output +// ---------------------------------------------------------------------------- + +struct wxLogRecord +{ + wxLogRecord(wxLogLevel level_, + const wxString& msg_, + const wxLogRecordInfo& info_) + : level(level_), + msg(msg_), + info(info_) + { + } + + wxLogLevel level; + wxString msg; + wxLogRecordInfo info; +}; + +// ---------------------------------------------------------------------------- +// Derive from this class to customize format of log messages. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxLogFormatter +{ +public: + // Default constructor. + wxLogFormatter() { } + + // Trivial but virtual destructor for the base class. + virtual ~wxLogFormatter() { } + + + // Override this method to implement custom formatting of the given log + // record. The default implementation simply prepends a level-dependent + // prefix to the message and optionally adds a time stamp. + virtual wxString Format(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info) const; + +protected: + // Override this method to change just the time stamp formatting. It is + // called by default Format() implementation. + virtual wxString FormatTime(time_t t) const; +}; + + +// ---------------------------------------------------------------------------- +// derive from this class to redirect (or suppress, or ...) log messages +// normally, only a single instance of this class exists but it's not enforced +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxLog +{ +public: + // ctor + wxLog() : m_formatter(new wxLogFormatter) { } + + // make dtor virtual for all derived classes + virtual ~wxLog(); + + + // log messages selection + // ---------------------- + + // these functions allow to completely disable all log messages or disable + // log messages at level less important than specified for the current + // thread + + // is logging enabled at all now? + static bool IsEnabled() + { +#if wxUSE_THREADS + if ( !wxThread::IsMain() ) + return IsThreadLoggingEnabled(); +#endif // wxUSE_THREADS + + return ms_doLog; + } + + // change the flag state, return the previous one + static bool EnableLogging(bool enable = true) + { +#if wxUSE_THREADS + if ( !wxThread::IsMain() ) + return EnableThreadLogging(enable); +#endif // wxUSE_THREADS + + bool doLogOld = ms_doLog; + ms_doLog = enable; + return doLogOld; + } + + // return the current global log level + static wxLogLevel GetLogLevel() { return ms_logLevel; } + + // set global log level: messages with level > logLevel will not be logged + static void SetLogLevel(wxLogLevel logLevel) { ms_logLevel = logLevel; } + + // set the log level for the given component + static void SetComponentLevel(const wxString& component, wxLogLevel level); + + // return the effective log level for this component, falling back to + // parent component and to the default global log level if necessary + // + // NB: component argument is passed by value and not const reference in an + // attempt to encourage compiler to avoid an extra copy: as we modify + // the component internally, we'd create one anyhow and like this it + // can be avoided if the string is a temporary anyhow + static wxLogLevel GetComponentLevel(wxString component); + + + // is logging of messages from this component enabled at this level? + // + // usually always called with wxLOG_COMPONENT as second argument + static bool IsLevelEnabled(wxLogLevel level, wxString component) + { + return IsEnabled() && level <= GetComponentLevel(component); + } + + + // enable/disable messages at wxLOG_Verbose level (only relevant if the + // current log level is greater or equal to it) + // + // notice that verbose mode can be activated by the standard command-line + // '--verbose' option + static void SetVerbose(bool bVerbose = true) { ms_bVerbose = bVerbose; } + + // check if verbose messages are enabled + static bool GetVerbose() { return ms_bVerbose; } + + + // message buffering + // ----------------- + + // flush shows all messages if they're not logged immediately (FILE + // and iostream logs don't need it, but wxLogGui does to avoid showing + // 17 modal dialogs one after another) + virtual void Flush(); + + // flush the active target if any and also output any pending messages from + // background threads + static void FlushActive(); + + // only one sink is active at each moment get current log target, will call + // wxAppTraits::CreateLogTarget() to create one if none exists + static wxLog *GetActiveTarget(); + + // change log target, logger may be NULL + static wxLog *SetActiveTarget(wxLog *logger); + +#if wxUSE_THREADS + // change log target for the current thread only, shouldn't be called from + // the main thread as it doesn't use thread-specific log target + static wxLog *SetThreadActiveTarget(wxLog *logger); +#endif // wxUSE_THREADS + + // suspend the message flushing of the main target until the next call + // to Resume() - this is mainly for internal use (to prevent wxYield() + // from flashing the messages) + static void Suspend() { ms_suspendCount++; } + + // must be called for each Suspend()! + static void Resume() { ms_suspendCount--; } + + // should GetActiveTarget() try to create a new log object if the + // current is NULL? + static void DontCreateOnDemand(); + + // Make GetActiveTarget() create a new log object again. + static void DoCreateOnDemand(); + + // log the count of repeating messages instead of logging the messages + // multiple times + static void SetRepetitionCounting(bool bRepetCounting = true) + { ms_bRepetCounting = bRepetCounting; } + + // gets duplicate counting status + static bool GetRepetitionCounting() { return ms_bRepetCounting; } + + // add string trace mask + static void AddTraceMask(const wxString& str); + + // add string trace mask + static void RemoveTraceMask(const wxString& str); + + // remove all string trace masks + static void ClearTraceMasks(); + + // get string trace masks: note that this is MT-unsafe if other threads can + // call AddTraceMask() concurrently + static const wxArrayString& GetTraceMasks(); + + // is this trace mask in the list? + static bool IsAllowedTraceMask(const wxString& mask); + + + // log formatting + // ----------------- + + // Change wxLogFormatter object used by wxLog to format the log messages. + // + // wxLog takes ownership of the pointer passed in but the caller is + // responsible for deleting the returned pointer. + wxLogFormatter* SetFormatter(wxLogFormatter* formatter); + + + // All the time stamp related functions below only work when the default + // wxLogFormatter is being used. Defining a custom formatter overrides them + // as it could use its own time stamp format or format messages without + // using time stamp at all. + + + // sets the time stamp string format: this is used as strftime() format + // string for the log targets which add time stamps to the messages; set + // it to empty string to disable time stamping completely. + static void SetTimestamp(const wxString& ts) { ms_timestamp = ts; } + + // disable time stamping of log messages + static void DisableTimestamp() { SetTimestamp(wxEmptyString); } + + + // get the current timestamp format string (maybe empty) + static const wxString& GetTimestamp() { return ms_timestamp; } + + + + // helpers: all functions in this section are mostly for internal use only, + // don't call them from your code even if they are not formally deprecated + + // put the time stamp into the string if ms_timestamp is not empty (don't + // change it otherwise); the first overload uses the current time. + static void TimeStamp(wxString *str); + static void TimeStamp(wxString *str, time_t t); + + // these methods should only be called from derived classes DoLogRecord(), + // DoLogTextAtLevel() and DoLogText() implementations respectively and + // shouldn't be called directly, use logging functions instead + void LogRecord(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info) + { + DoLogRecord(level, msg, info); + } + + void LogTextAtLevel(wxLogLevel level, const wxString& msg) + { + DoLogTextAtLevel(level, msg); + } + + void LogText(const wxString& msg) + { + DoLogText(msg); + } + + // this is a helper used by wxLogXXX() functions, don't call it directly + // and see DoLog() for function to overload in the derived classes + static void OnLog(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info); + + // version called when no information about the location of the log record + // generation is available (but the time stamp is), it mainly exists for + // backwards compatibility, don't use it in new code + static void OnLog(wxLogLevel level, const wxString& msg, time_t t); + + // a helper calling the above overload with current time + static void OnLog(wxLogLevel level, const wxString& msg) + { + OnLog(level, msg, time(NULL)); + } + + + // this method exists for backwards compatibility only, don't use + bool HasPendingMessages() const { return true; } + +#if WXWIN_COMPATIBILITY_2_6 + // this function doesn't do anything any more, don't call it + static wxDEPRECATED_INLINE( + wxChar *SetLogBuffer(wxChar *, size_t = 0), return NULL; + ); +#endif // WXWIN_COMPATIBILITY_2_6 + + // don't use integer masks any more, use string trace masks instead +#if WXWIN_COMPATIBILITY_2_8 + static wxDEPRECATED_INLINE( void SetTraceMask(wxTraceMask ulMask), + ms_ulTraceMask = ulMask; ) + + // this one can't be marked deprecated as it's used in our own wxLogger + // below but it still is deprecated and shouldn't be used + static wxTraceMask GetTraceMask() { return ms_ulTraceMask; } +#endif // WXWIN_COMPATIBILITY_2_8 + +protected: + // the logging functions that can be overridden: DoLogRecord() is called + // for every "record", i.e. a unit of log output, to be logged and by + // default formats the message and passes it to DoLogTextAtLevel() which in + // turn passes it to DoLogText() by default + + // override this method if you want to change message formatting or do + // dynamic filtering + virtual void DoLogRecord(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info); + + // override this method to redirect output to different channels depending + // on its level only; if even the level doesn't matter, override + // DoLogText() instead + virtual void DoLogTextAtLevel(wxLogLevel level, const wxString& msg); + + // this function is not pure virtual as it might not be needed if you do + // the logging in overridden DoLogRecord() or DoLogTextAtLevel() directly + // but if you do not override them in your derived class you must override + // this one as the default implementation of it simply asserts + virtual void DoLogText(const wxString& msg); + + + // the rest of the functions are for backwards compatibility only, don't + // use them in new code; if you're updating your existing code you need to + // switch to overriding DoLogRecord/Text() above (although as long as these + // functions exist, log classes using them will continue to work) +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_BUT_USED_INTERNALLY( + virtual void DoLog(wxLogLevel level, const char *szString, time_t t) + ); + + wxDEPRECATED_BUT_USED_INTERNALLY( + virtual void DoLog(wxLogLevel level, const wchar_t *wzString, time_t t) + ); + + // these shouldn't be used by new code + wxDEPRECATED_BUT_USED_INTERNALLY_INLINE( + virtual void DoLogString(const char *WXUNUSED(szString), + time_t WXUNUSED(t)), + wxEMPTY_PARAMETER_VALUE + ) + + wxDEPRECATED_BUT_USED_INTERNALLY_INLINE( + virtual void DoLogString(const wchar_t *WXUNUSED(wzString), + time_t WXUNUSED(t)), + wxEMPTY_PARAMETER_VALUE + ) +#endif // WXWIN_COMPATIBILITY_2_8 + + + // log a message indicating the number of times the previous message was + // repeated if previous repetition counter is strictly positive, does + // nothing otherwise; return the old value of repetition counter + unsigned LogLastRepeatIfNeeded(); + +private: +#if wxUSE_THREADS + // called from FlushActive() to really log any buffered messages logged + // from the other threads + void FlushThreadMessages(); + + // these functions are called for non-main thread only by IsEnabled() and + // EnableLogging() respectively + static bool IsThreadLoggingEnabled(); + static bool EnableThreadLogging(bool enable = true); +#endif // wxUSE_THREADS + + // get the active log target for the main thread, auto-creating it if + // necessary + // + // this is called from GetActiveTarget() and OnLog() when they're called + // from the main thread + static wxLog *GetMainThreadActiveTarget(); + + // called from OnLog() if it's called from the main thread or if we have a + // (presumably MT-safe) thread-specific logger and by FlushThreadMessages() + // when it plays back the buffered messages logged from the other threads + void CallDoLogNow(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info); + + + // variables + // ---------------- + + wxLogFormatter *m_formatter; // We own this pointer. + + + // static variables + // ---------------- + + // if true, don't log the same message multiple times, only log it once + // with the number of times it was repeated + static bool ms_bRepetCounting; + + static wxLog *ms_pLogger; // currently active log sink + static bool ms_doLog; // false => all logging disabled + static bool ms_bAutoCreate; // create new log targets on demand? + static bool ms_bVerbose; // false => ignore LogInfo messages + + static wxLogLevel ms_logLevel; // limit logging to levels <= ms_logLevel + + static size_t ms_suspendCount; // if positive, logs are not flushed + + // format string for strftime(), if empty, time stamping log messages is + // disabled + static wxString ms_timestamp; + +#if WXWIN_COMPATIBILITY_2_8 + static wxTraceMask ms_ulTraceMask; // controls wxLogTrace behaviour +#endif // WXWIN_COMPATIBILITY_2_8 +}; + +// ---------------------------------------------------------------------------- +// "trivial" derivations of wxLog +// ---------------------------------------------------------------------------- + +// log everything except for the debug/trace messages (which are passed to +// wxMessageOutputDebug) to a buffer +class WXDLLIMPEXP_BASE wxLogBuffer : public wxLog +{ +public: + wxLogBuffer() { } + + // get the string contents with all messages logged + const wxString& GetBuffer() const { return m_str; } + + // show the buffer contents to the user in the best possible way (this uses + // wxMessageOutputMessageBox) and clear it + virtual void Flush(); + +protected: + virtual void DoLogTextAtLevel(wxLogLevel level, const wxString& msg); + +private: + wxString m_str; + + wxDECLARE_NO_COPY_CLASS(wxLogBuffer); +}; + + +// log everything to a "FILE *", stderr by default +class WXDLLIMPEXP_BASE wxLogStderr : public wxLog +{ +public: + // redirect log output to a FILE + wxLogStderr(FILE *fp = NULL); + +protected: + // implement sink function + virtual void DoLogText(const wxString& msg); + + FILE *m_fp; + + wxDECLARE_NO_COPY_CLASS(wxLogStderr); +}; + +#if wxUSE_STD_IOSTREAM + +// log everything to an "ostream", cerr by default +class WXDLLIMPEXP_BASE wxLogStream : public wxLog +{ +public: + // redirect log output to an ostream + wxLogStream(wxSTD ostream *ostr = (wxSTD ostream *) NULL); + +protected: + // implement sink function + virtual void DoLogText(const wxString& msg); + + // using ptr here to avoid including <iostream.h> from this file + wxSTD ostream *m_ostr; +}; + +#endif // wxUSE_STD_IOSTREAM + +// ---------------------------------------------------------------------------- +// /dev/null log target: suppress logging until this object goes out of scope +// ---------------------------------------------------------------------------- + +// example of usage: +/* + void Foo() + { + wxFile file; + + // wxFile.Open() normally complains if file can't be opened, we don't + // want it + wxLogNull logNo; + + if ( !file.Open("bar") ) + ... process error ourselves ... + + // ~wxLogNull called, old log sink restored + } + */ +class WXDLLIMPEXP_BASE wxLogNull +{ +public: + wxLogNull() : m_flagOld(wxLog::EnableLogging(false)) { } + ~wxLogNull() { (void)wxLog::EnableLogging(m_flagOld); } + +private: + bool m_flagOld; // the previous value of the wxLog::ms_doLog +}; + +// ---------------------------------------------------------------------------- +// chaining log target: installs itself as a log target and passes all +// messages to the real log target given to it in the ctor but also forwards +// them to the previously active one +// +// note that you don't have to call SetActiveTarget() with this class, it +// does it itself in its ctor +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxLogChain : public wxLog +{ +public: + wxLogChain(wxLog *logger); + virtual ~wxLogChain(); + + // change the new log target + void SetLog(wxLog *logger); + + // this can be used to temporarily disable (and then reenable) passing + // messages to the old logger (by default we do pass them) + void PassMessages(bool bDoPass) { m_bPassMessages = bDoPass; } + + // are we passing the messages to the previous log target? + bool IsPassingMessages() const { return m_bPassMessages; } + + // return the previous log target (may be NULL) + wxLog *GetOldLog() const { return m_logOld; } + + // override base class version to flush the old logger as well + virtual void Flush(); + + // call to avoid destroying the old log target + void DetachOldLog() { m_logOld = NULL; } + +protected: + // pass the record to the old logger if needed + virtual void DoLogRecord(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info); + +private: + // the current log target + wxLog *m_logNew; + + // the previous log target + wxLog *m_logOld; + + // do we pass the messages to the old logger? + bool m_bPassMessages; + + wxDECLARE_NO_COPY_CLASS(wxLogChain); +}; + +// a chain log target which uses itself as the new logger + +#define wxLogPassThrough wxLogInterposer + +class WXDLLIMPEXP_BASE wxLogInterposer : public wxLogChain +{ +public: + wxLogInterposer(); + +private: + wxDECLARE_NO_COPY_CLASS(wxLogInterposer); +}; + +// a temporary interposer which doesn't destroy the old log target +// (calls DetachOldLog) + +class WXDLLIMPEXP_BASE wxLogInterposerTemp : public wxLogChain +{ +public: + wxLogInterposerTemp(); + +private: + wxDECLARE_NO_COPY_CLASS(wxLogInterposerTemp); +}; + +#if wxUSE_GUI + // include GUI log targets: + #include "wx/generic/logg.h" +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// wxLogger +// ---------------------------------------------------------------------------- + +// wxLogger is a helper class used by wxLogXXX() functions implementation, +// don't use it directly as it's experimental and subject to change (OTOH it +// might become public in the future if it's deemed to be useful enough) + +// contains information about the context from which a log message originates +// and provides Log() vararg method which forwards to wxLog::OnLog() and passes +// this context to it +class wxLogger +{ +public: + // ctor takes the basic information about the log record + wxLogger(wxLogLevel level, + const char *filename, + int line, + const char *func, + const char *component) + : m_level(level), + m_info(filename, line, func, component) + { + } + + // store extra data in our log record and return this object itself (so + // that further calls to its functions could be chained) + template <typename T> + wxLogger& Store(const wxString& key, T val) + { + m_info.StoreValue(key, val); + return *this; + } + + // hack for "overloaded" wxLogXXX() functions: calling this method + // indicates that we may have an extra first argument preceding the format + // string and that if we do have it, we should store it in m_info using the + // given key (while by default 0 value will be used) + wxLogger& MaybeStore(const wxString& key, wxUIntPtr value = 0) + { + wxASSERT_MSG( m_optKey.empty(), "can only have one optional value" ); + m_optKey = key; + + m_info.StoreValue(key, value); + return *this; + } + + + // non-vararg function used by wxVLogXXX(): + + // log the message at the level specified in the ctor if this log message + // is enabled + void LogV(const wxString& format, va_list argptr) + { + // remember that fatal errors can't be disabled + if ( m_level == wxLOG_FatalError || + wxLog::IsLevelEnabled(m_level, m_info.component) ) + DoCallOnLog(format, argptr); + } + + // overloads used by functions with optional leading arguments (whose + // values are stored in the key passed to MaybeStore()) + void LogV(long num, const wxString& format, va_list argptr) + { + Store(m_optKey, num); + + LogV(format, argptr); + } + + void LogV(void *ptr, const wxString& format, va_list argptr) + { + Store(m_optKey, wxPtrToUInt(ptr)); + + LogV(format, argptr); + } + + void LogVTrace(const wxString& mask, const wxString& format, va_list argptr) + { + if ( !wxLog::IsAllowedTraceMask(mask) ) + return; + + Store(wxLOG_KEY_TRACE_MASK, mask); + + LogV(format, argptr); + } + + + // vararg functions used by wxLogXXX(): + + // will log the message at the level specified in the ctor + // + // notice that this function supposes that the caller already checked that + // the level was enabled and does no checks itself + WX_DEFINE_VARARG_FUNC_VOID + ( + Log, + 1, (const wxFormatString&), + DoLog, DoLogUtf8 + ) + + // same as Log() but with an extra numeric or pointer parameters: this is + // used to pass an optional value by storing it in m_info under the name + // passed to MaybeStore() and is required to support "overloaded" versions + // of wxLogStatus() and wxLogSysError() + WX_DEFINE_VARARG_FUNC_VOID + ( + Log, + 2, (long, const wxFormatString&), + DoLogWithNum, DoLogWithNumUtf8 + ) + + // unfortunately we can't use "void *" here as we get overload ambiguities + // with Log(wxFormatString, ...) when the first argument is a "char *" or + // "wchar_t *" then -- so we only allow passing wxObject here, which is + // ugly but fine in practice as this overload is only used by wxLogStatus() + // whose first argument is a wxFrame + WX_DEFINE_VARARG_FUNC_VOID + ( + Log, + 2, (wxObject *, const wxFormatString&), + DoLogWithPtr, DoLogWithPtrUtf8 + ) + + // log the message at the level specified as its first argument + // + // as the macros don't have access to the level argument in this case, this + // function does check that the level is enabled itself + WX_DEFINE_VARARG_FUNC_VOID + ( + LogAtLevel, + 2, (wxLogLevel, const wxFormatString&), + DoLogAtLevel, DoLogAtLevelUtf8 + ) + + // special versions for wxLogTrace() which is passed either string or + // integer mask as first argument determining whether the message should be + // logged or not + WX_DEFINE_VARARG_FUNC_VOID + ( + LogTrace, + 2, (const wxString&, const wxFormatString&), + DoLogTrace, DoLogTraceUtf8 + ) + +#if WXWIN_COMPATIBILITY_2_8 + WX_DEFINE_VARARG_FUNC_VOID + ( + LogTrace, + 2, (wxTraceMask, const wxFormatString&), + DoLogTraceMask, DoLogTraceMaskUtf8 + ) +#endif // WXWIN_COMPATIBILITY_2_8 + +#ifdef __WATCOMC__ + // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351 + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 1, (const wxString&), + (wxFormatString(f1))) + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 1, (const wxCStrData&), + (wxFormatString(f1))) + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 1, (const char*), + (wxFormatString(f1))) + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 1, (const wchar_t*), + (wxFormatString(f1))) + + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 2, (long, const wxString&), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 2, (long, const wxCStrData&), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 2, (long, const char *), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 2, (long, const wchar_t *), + (f1, wxFormatString(f2))) + + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 2, (wxObject *, const wxString&), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 2, (wxObject *, const wxCStrData&), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 2, (wxObject *, const char *), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, Log, + 2, (wxObject *, const wchar_t *), + (f1, wxFormatString(f2))) + + WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel, + 2, (wxLogLevel, const wxString&), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel, + 2, (wxLogLevel, const wxCStrData&), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel, + 2, (wxLogLevel, const char *), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel, + 2, (wxLogLevel, const wchar_t *), + (f1, wxFormatString(f2))) + + WX_VARARG_WATCOM_WORKAROUND(void, LogTrace, + 2, (const wxString&, const wxString&), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, LogTrace, + 2, (const wxString&, const wxCStrData&), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, LogTrace, + 2, (const wxString&, const char *), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, LogTrace, + 2, (const wxString&, const wchar_t *), + (f1, wxFormatString(f2))) + +#if WXWIN_COMPATIBILITY_2_8 + WX_VARARG_WATCOM_WORKAROUND(void, LogTrace, + 2, (wxTraceMask, wxTraceMask), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, LogTrace, + 2, (wxTraceMask, const wxCStrData&), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, LogTrace, + 2, (wxTraceMask, const char *), + (f1, wxFormatString(f2))) + WX_VARARG_WATCOM_WORKAROUND(void, LogTrace, + 2, (wxTraceMask, const wchar_t *), + (f1, wxFormatString(f2))) +#endif // WXWIN_COMPATIBILITY_2_8 +#endif // __WATCOMC__ + +private: +#if !wxUSE_UTF8_LOCALE_ONLY + void DoLog(const wxChar *format, ...) + { + va_list argptr; + va_start(argptr, format); + DoCallOnLog(format, argptr); + va_end(argptr); + } + + void DoLogWithNum(long num, const wxChar *format, ...) + { + Store(m_optKey, num); + + va_list argptr; + va_start(argptr, format); + DoCallOnLog(format, argptr); + va_end(argptr); + } + + void DoLogWithPtr(void *ptr, const wxChar *format, ...) + { + Store(m_optKey, wxPtrToUInt(ptr)); + + va_list argptr; + va_start(argptr, format); + DoCallOnLog(format, argptr); + va_end(argptr); + } + + void DoLogAtLevel(wxLogLevel level, const wxChar *format, ...) + { + if ( !wxLog::IsLevelEnabled(level, m_info.component) ) + return; + + va_list argptr; + va_start(argptr, format); + DoCallOnLog(level, format, argptr); + va_end(argptr); + } + + void DoLogTrace(const wxString& mask, const wxChar *format, ...) + { + if ( !wxLog::IsAllowedTraceMask(mask) ) + return; + + Store(wxLOG_KEY_TRACE_MASK, mask); + + va_list argptr; + va_start(argptr, format); + DoCallOnLog(format, argptr); + va_end(argptr); + } + +#if WXWIN_COMPATIBILITY_2_8 + void DoLogTraceMask(wxTraceMask mask, const wxChar *format, ...) + { + if ( (wxLog::GetTraceMask() & mask) != mask ) + return; + + Store(wxLOG_KEY_TRACE_MASK, mask); + + va_list argptr; + va_start(argptr, format); + DoCallOnLog(format, argptr); + va_end(argptr); + } +#endif // WXWIN_COMPATIBILITY_2_8 +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#if wxUSE_UNICODE_UTF8 + void DoLogUtf8(const char *format, ...) + { + va_list argptr; + va_start(argptr, format); + DoCallOnLog(format, argptr); + va_end(argptr); + } + + void DoLogWithNumUtf8(long num, const char *format, ...) + { + Store(m_optKey, num); + + va_list argptr; + va_start(argptr, format); + DoCallOnLog(format, argptr); + va_end(argptr); + } + + void DoLogWithPtrUtf8(void *ptr, const char *format, ...) + { + Store(m_optKey, wxPtrToUInt(ptr)); + + va_list argptr; + va_start(argptr, format); + DoCallOnLog(format, argptr); + va_end(argptr); + } + + void DoLogAtLevelUtf8(wxLogLevel level, const char *format, ...) + { + if ( !wxLog::IsLevelEnabled(level, m_info.component) ) + return; + + va_list argptr; + va_start(argptr, format); + DoCallOnLog(level, format, argptr); + va_end(argptr); + } + + void DoLogTraceUtf8(const wxString& mask, const char *format, ...) + { + if ( !wxLog::IsAllowedTraceMask(mask) ) + return; + + Store(wxLOG_KEY_TRACE_MASK, mask); + + va_list argptr; + va_start(argptr, format); + DoCallOnLog(format, argptr); + va_end(argptr); + } + +#if WXWIN_COMPATIBILITY_2_8 + void DoLogTraceMaskUtf8(wxTraceMask mask, const char *format, ...) + { + if ( (wxLog::GetTraceMask() & mask) != mask ) + return; + + Store(wxLOG_KEY_TRACE_MASK, mask); + + va_list argptr; + va_start(argptr, format); + DoCallOnLog(format, argptr); + va_end(argptr); + } +#endif // WXWIN_COMPATIBILITY_2_8 +#endif // wxUSE_UNICODE_UTF8 + + void DoCallOnLog(wxLogLevel level, const wxString& format, va_list argptr) + { + wxLog::OnLog(level, wxString::FormatV(format, argptr), m_info); + } + + void DoCallOnLog(const wxString& format, va_list argptr) + { + DoCallOnLog(m_level, format, argptr); + } + + + const wxLogLevel m_level; + wxLogRecordInfo m_info; + + wxString m_optKey; + + wxDECLARE_NO_COPY_CLASS(wxLogger); +}; + +// ============================================================================ +// global functions +// ============================================================================ + +// ---------------------------------------------------------------------------- +// get error code/error message from system in a portable way +// ---------------------------------------------------------------------------- + +// return the last system error code +WXDLLIMPEXP_BASE unsigned long wxSysErrorCode(); + +// return the error message for given (or last if 0) error code +WXDLLIMPEXP_BASE const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0); + +// ---------------------------------------------------------------------------- +// define wxLog<level>() functions which can be used by application instead of +// stdio, iostream &c for log messages for easy redirection +// ---------------------------------------------------------------------------- + +/* + The code below is unreadable because it (unfortunately unavoidably) + contains a lot of macro magic but all it does is to define wxLogXXX() such + that you can call them as vararg functions to log a message at the + corresponding level. + + More precisely, it defines: + + - wxLog{FatalError,Error,Warning,Message,Verbose,Debug}() functions + taking the format string and additional vararg arguments if needed. + - wxLogGeneric(wxLogLevel level, const wxString& format, ...) which + takes the log level explicitly. + - wxLogSysError(const wxString& format, ...) and wxLogSysError(long + err, const wxString& format, ...) which log a wxLOG_Error severity + message with the error message corresponding to the system error code + err or the last error. + - wxLogStatus(const wxString& format, ...) which logs the message into + the status bar of the main application window and its overload + wxLogStatus(wxFrame *frame, const wxString& format, ...) which logs it + into the status bar of the specified frame. + - wxLogTrace(Mask mask, const wxString& format, ...) which only logs + the message is the specified mask is enabled. This comes in two kinds: + Mask can be a wxString or a long. Both are deprecated. + + In addition, wxVLogXXX() versions of all the functions above are also + defined. They take a va_list argument instead of "...". + */ + +// creates wxLogger object for the current location +#define wxMAKE_LOGGER(level) \ + wxLogger(wxLOG_##level, __FILE__, __LINE__, __WXFUNCTION__, wxLOG_COMPONENT) + +// this macro generates the expression which logs whatever follows it in +// parentheses at the level specified as argument +#define wxDO_LOG(level) wxMAKE_LOGGER(level).Log + +// this is the non-vararg equivalent +#define wxDO_LOGV(level, format, argptr) \ + wxMAKE_LOGGER(level).LogV(format, argptr) + +// this macro declares wxLog<level>() macro which logs whatever follows it if +// logging at specified level is enabled (notice that if it is false, the +// following arguments are not even evaluated which is good as it avoids +// unnecessary overhead) +// +// Note: the strange (because executing at most once) for() loop because we +// must arrange for wxDO_LOG() to be at the end of the macro and using a +// more natural "if (IsLevelEnabled()) wxDO_LOG()" would result in wrong +// behaviour for the following code ("else" would bind to the wrong "if"): +// +// if ( cond ) +// wxLogError("!!!"); +// else +// ... +// +// See also #11829 for the problems with other simpler approaches, +// notably the need for two macros due to buggy __LINE__ in MSVC. +// +// Note 2: Unfortunately we can't use the same solution for all compilers +// because the loop-based one results in problems with MSVC6 due to its +// wrong (pre-C++98) rules for the scope of the variables declared +// inside the loop, as this prevents us from using wxLogXXX() in switch +// statement clauses ("initialization of loopvar skipped by case"). So +// for now, i.e. while we still support VC6, use the previous solution +// for it (FIXME-VC6). +#ifdef __VISUALC6__ +#define wxDO_LOG_IF_ENABLED(level) \ + if ( !wxLog::IsLevelEnabled(wxLOG_##level, wxLOG_COMPONENT) ) \ + {} \ + else \ + wxDO_LOG(level) +#else +#define wxDO_LOG_IF_ENABLED_HELPER(level, loopvar) \ + for ( bool loopvar = false; \ + !loopvar && wxLog::IsLevelEnabled(wxLOG_##level, wxLOG_COMPONENT); \ + loopvar = true ) \ + wxDO_LOG(level) + +#define wxDO_LOG_IF_ENABLED(level) \ + wxDO_LOG_IF_ENABLED_HELPER(level, wxMAKE_UNIQUE_NAME(wxlogcheck)) +#endif + +// wxLogFatalError() is special as it can't be disabled +#define wxLogFatalError wxDO_LOG(FatalError) +#define wxVLogFatalError(format, argptr) wxDO_LOGV(FatalError, format, argptr) + +#define wxLogError wxDO_LOG_IF_ENABLED(Error) +#define wxVLogError(format, argptr) wxDO_LOGV(Error, format, argptr) + +#define wxLogWarning wxDO_LOG_IF_ENABLED(Warning) +#define wxVLogWarning(format, argptr) wxDO_LOGV(Warning, format, argptr) + +#define wxLogMessage wxDO_LOG_IF_ENABLED(Message) +#define wxVLogMessage(format, argptr) wxDO_LOGV(Message, format, argptr) + +// this one is special as it only logs if we're in verbose mode +#define wxLogVerbose \ + if ( !(wxLog::IsLevelEnabled(wxLOG_Info, wxLOG_COMPONENT) && \ + wxLog::GetVerbose()) ) \ + {} \ + else \ + wxDO_LOG(Info) +#define wxVLogVerbose(format, argptr) \ + if ( !(wxLog::IsLevelEnabled(wxLOG_Info, wxLOG_COMPONENT) && \ + wxLog::GetVerbose()) ) \ + {} \ + else \ + wxDO_LOGV(Info, format, argptr) + +// deprecated synonyms for wxLogVerbose() and wxVLogVerbose() +#define wxLogInfo wxLogVerbose +#define wxVLogInfo wxVLogVerbose + + +// another special case: the level is passed as first argument of the function +// and so is not available to the macro +// +// notice that because of this, arguments of wxLogGeneric() are currently +// always evaluated, unlike for the other log functions +#define wxLogGeneric wxMAKE_LOGGER(Max).LogAtLevel +#define wxVLogGeneric(level, format, argptr) \ + if ( !wxLog::IsLevelEnabled(wxLOG_##level, wxLOG_COMPONENT) ) \ + {} \ + else \ + wxDO_LOGV(level, format, argptr) + + +// wxLogSysError() needs to stash the error code value in the log record info +// so it needs special handling too; additional complications arise because the +// error code may or not be present as the first argument +// +// notice that we unfortunately can't avoid the call to wxSysErrorCode() even +// though it may be unneeded if an explicit error code is passed to us because +// the message might not be logged immediately (e.g. it could be queued for +// logging from the main thread later) and so we can't to wait until it is +// logged to determine whether we have last error or not as it will be too late +// and it will have changed already by then (in fact it even changes when +// wxString::Format() is called because of vsnprintf() inside it so it can +// change even much sooner) +#define wxLOG_KEY_SYS_ERROR_CODE "wx.sys_error" + +#define wxLogSysError \ + if ( !wxLog::IsLevelEnabled(wxLOG_Error, wxLOG_COMPONENT) ) \ + {} \ + else \ + wxMAKE_LOGGER(Error).MaybeStore(wxLOG_KEY_SYS_ERROR_CODE, \ + wxSysErrorCode()).Log + +// unfortunately we can't have overloaded macros so we can't define versions +// both with and without error code argument and have to rely on LogV() +// overloads in wxLogger to select between them +#define wxVLogSysError \ + wxMAKE_LOGGER(Error).MaybeStore(wxLOG_KEY_SYS_ERROR_CODE, \ + wxSysErrorCode()).LogV + +#if wxUSE_GUI + // wxLogStatus() is similar to wxLogSysError() as it allows to optionally + // specify the frame to which the message should go + #define wxLOG_KEY_FRAME "wx.frame" + + #define wxLogStatus \ + if ( !wxLog::IsLevelEnabled(wxLOG_Status, wxLOG_COMPONENT) ) \ + {} \ + else \ + wxMAKE_LOGGER(Status).MaybeStore(wxLOG_KEY_FRAME).Log + + #define wxVLogStatus \ + wxMAKE_LOGGER(Status).MaybeStore(wxLOG_KEY_FRAME).LogV +#endif // wxUSE_GUI + + +#else // !wxUSE_LOG + +#undef wxUSE_LOG_DEBUG +#define wxUSE_LOG_DEBUG 0 + +#undef wxUSE_LOG_TRACE +#define wxUSE_LOG_TRACE 0 + +#if defined(__WATCOMC__) || defined(__MINGW32__) + // Mingw has similar problem with wxLogSysError: + #define WX_WATCOM_OR_MINGW_ONLY_CODE( x ) x +#else + #define WX_WATCOM_OR_MINGW_ONLY_CODE( x ) +#endif + +// define macros for defining log functions which do nothing at all +// +// WX_WATCOM_ONLY_CODE is needed to work around +// http://bugzilla.openwatcom.org/show_bug.cgi?id=351 +#define wxDEFINE_EMPTY_LOG_FUNCTION(level) \ + WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 1, (const wxFormatString&)) \ + WX_WATCOM_ONLY_CODE( \ + WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 1, (const char*)) \ + WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 1, (const wchar_t*)) \ + WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 1, (const wxCStrData&)) \ + ) \ + inline void wxVLog##level(const wxFormatString& WXUNUSED(format), \ + va_list WXUNUSED(argptr)) { } \ + +#define wxDEFINE_EMPTY_LOG_FUNCTION2(level, argclass) \ + WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const wxFormatString&)) \ + WX_WATCOM_OR_MINGW_ONLY_CODE( \ + WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const char*)) \ + WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const wchar_t*)) \ + WX_DEFINE_VARARG_FUNC_NOP(wxLog##level, 2, (argclass, const wxCStrData&)) \ + ) \ + inline void wxVLog##level(argclass WXUNUSED(arg), \ + const wxFormatString& WXUNUSED(format), \ + va_list WXUNUSED(argptr)) {} + +wxDEFINE_EMPTY_LOG_FUNCTION(FatalError); +wxDEFINE_EMPTY_LOG_FUNCTION(Error); +wxDEFINE_EMPTY_LOG_FUNCTION(SysError); +wxDEFINE_EMPTY_LOG_FUNCTION2(SysError, long); +wxDEFINE_EMPTY_LOG_FUNCTION(Warning); +wxDEFINE_EMPTY_LOG_FUNCTION(Message); +wxDEFINE_EMPTY_LOG_FUNCTION(Info); +wxDEFINE_EMPTY_LOG_FUNCTION(Verbose); + +wxDEFINE_EMPTY_LOG_FUNCTION2(Generic, wxLogLevel); + +#if wxUSE_GUI + wxDEFINE_EMPTY_LOG_FUNCTION(Status); + wxDEFINE_EMPTY_LOG_FUNCTION2(Status, wxFrame *); +#endif // wxUSE_GUI + +// Empty Class to fake wxLogNull +class WXDLLIMPEXP_BASE wxLogNull +{ +public: + wxLogNull() { } +}; + +// Dummy macros to replace some functions. +#define wxSysErrorCode() (unsigned long)0 +#define wxSysErrorMsg( X ) (const wxChar*)NULL + +// Fake symbolic trace masks... for those that are used frequently +#define wxTRACE_OleCalls wxEmptyString // OLE interface calls + +#endif // wxUSE_LOG/!wxUSE_LOG + + +// debug functions can be completely disabled in optimized builds + +// if these log functions are disabled, we prefer to define them as (empty) +// variadic macros as this completely removes them and their argument +// evaluation from the object code but if this is not supported by compiler we +// use empty inline functions instead (defining them as nothing would result in +// compiler warnings) +// +// note that making wxVLogDebug/Trace() themselves (empty inline) functions is +// a bad idea as some compilers are stupid enough to not inline even empty +// functions if their parameters are complicated enough, but by defining them +// as an empty inline function we ensure that even dumbest compilers optimise +// them away +#ifdef __BORLANDC__ + // but Borland gives "W8019: Code has no effect" for wxLogNop() so we need + // to define it differently for it to avoid these warnings (same problem as + // with wxUnusedVar()) + #define wxLogNop() { } +#else + inline void wxLogNop() { } +#endif + +#if wxUSE_LOG_DEBUG + #define wxLogDebug wxDO_LOG_IF_ENABLED(Debug) + #define wxVLogDebug(format, argptr) wxDO_LOGV(Debug, format, argptr) +#else // !wxUSE_LOG_DEBUG + #define wxVLogDebug(fmt, valist) wxLogNop() + + #ifdef HAVE_VARIADIC_MACROS + #define wxLogDebug(fmt, ...) wxLogNop() + #else // !HAVE_VARIADIC_MACROS + WX_DEFINE_VARARG_FUNC_NOP(wxLogDebug, 1, (const wxFormatString&)) + #endif +#endif // wxUSE_LOG_DEBUG/!wxUSE_LOG_DEBUG + +#if wxUSE_LOG_TRACE + #define wxLogTrace \ + if ( !wxLog::IsLevelEnabled(wxLOG_Trace, wxLOG_COMPONENT) ) \ + {} \ + else \ + wxMAKE_LOGGER(Trace).LogTrace + #define wxVLogTrace \ + if ( !wxLog::IsLevelEnabled(wxLOG_Trace, wxLOG_COMPONENT) ) \ + {} \ + else \ + wxMAKE_LOGGER(Trace).LogVTrace +#else // !wxUSE_LOG_TRACE + #define wxVLogTrace(mask, fmt, valist) wxLogNop() + + #ifdef HAVE_VARIADIC_MACROS + #define wxLogTrace(mask, fmt, ...) wxLogNop() + #else // !HAVE_VARIADIC_MACROS + #if WXWIN_COMPATIBILITY_2_8 + WX_DEFINE_VARARG_FUNC_NOP(wxLogTrace, 2, (wxTraceMask, const wxFormatString&)) + #endif + WX_DEFINE_VARARG_FUNC_NOP(wxLogTrace, 2, (const wxString&, const wxFormatString&)) + #ifdef __WATCOMC__ + // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351 + WX_DEFINE_VARARG_FUNC_NOP(wxLogTrace, 2, (const char*, const char*)) + WX_DEFINE_VARARG_FUNC_NOP(wxLogTrace, 2, (const wchar_t*, const wchar_t*)) + #endif + #endif // HAVE_VARIADIC_MACROS/!HAVE_VARIADIC_MACROS +#endif // wxUSE_LOG_TRACE/!wxUSE_LOG_TRACE + +// wxLogFatalError helper: show the (fatal) error to the user in a safe way, +// i.e. without using wxMessageBox() for example because it could crash +void WXDLLIMPEXP_BASE +wxSafeShowMessage(const wxString& title, const wxString& text); + +// ---------------------------------------------------------------------------- +// debug only logging functions: use them with API name and error code +// ---------------------------------------------------------------------------- + +#if wxUSE_LOG_DEBUG + // make life easier for people using VC++ IDE: clicking on the message + // will take us immediately to the place of the failed API +#ifdef __VISUALC__ + #define wxLogApiError(api, rc) \ + wxLogDebug(wxT("%s(%d): '%s' failed with error 0x%08lx (%s)."), \ + __FILE__, __LINE__, api, \ + (long)rc, wxSysErrorMsg(rc)) +#else // !VC++ + #define wxLogApiError(api, rc) \ + wxLogDebug(wxT("In file %s at line %d: '%s' failed with ") \ + wxT("error 0x%08lx (%s)."), \ + __FILE__, __LINE__, api, \ + (long)rc, wxSysErrorMsg(rc)) +#endif // VC++/!VC++ + + #define wxLogLastError(api) wxLogApiError(api, wxSysErrorCode()) + +#else // !wxUSE_LOG_DEBUG + #define wxLogApiError(api, err) wxLogNop() + #define wxLogLastError(api) wxLogNop() +#endif // wxUSE_LOG_DEBUG/!wxUSE_LOG_DEBUG + +// wxCocoa has additiional trace masks +#if defined(__WXCOCOA__) +#include "wx/cocoa/log.h" +#endif + +#ifdef WX_WATCOM_ONLY_CODE + #undef WX_WATCOM_ONLY_CODE +#endif + +// macro which disables debug logging in release builds: this is done by +// default by wxIMPLEMENT_APP() so usually it doesn't need to be used explicitly +#if defined(NDEBUG) && wxUSE_LOG_DEBUG + #define wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD() \ + wxLog::SetLogLevel(wxLOG_Info) +#else // !NDEBUG + #define wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD() +#endif // NDEBUG/!NDEBUG + +#endif // _WX_LOG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/longlong.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/longlong.h new file mode 100644 index 0000000000..8a2848c54a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/longlong.h @@ -0,0 +1,1144 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/longlong.h +// Purpose: declaration of wxLongLong class - best implementation of a 64 +// bit integer for the current platform. +// Author: Jeffrey C. Ollie <jeff@ollie.clive.ia.us>, Vadim Zeitlin +// Modified by: +// Created: 10.02.99 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LONGLONG_H +#define _WX_LONGLONG_H + +#include "wx/defs.h" + +#if wxUSE_LONGLONG + +#include "wx/string.h" + +#include <limits.h> // for LONG_MAX + +// define this to compile wxLongLongWx in "test" mode: the results of all +// calculations will be compared with the real results taken from +// wxLongLongNative -- this is extremely useful to find the bugs in +// wxLongLongWx class! + +// #define wxLONGLONG_TEST_MODE + +#ifdef wxLONGLONG_TEST_MODE + #define wxUSE_LONGLONG_WX 1 + #define wxUSE_LONGLONG_NATIVE 1 +#endif // wxLONGLONG_TEST_MODE + +// ---------------------------------------------------------------------------- +// decide upon which class we will use +// ---------------------------------------------------------------------------- + +#ifndef wxLongLong_t + // both warning and pragma warning are not portable, but at least an + // unknown pragma should never be an error -- except that, actually, some + // broken compilers don't like it, so we have to disable it in this case + // <sigh> + #ifdef __GNUC__ + #warning "Your compiler does not appear to support 64 bit "\ + "integers, using emulation class instead.\n" \ + "Please report your compiler version to " \ + "wx-dev@lists.wxwidgets.org!" + #elif !(defined(__WATCOMC__) || defined(__VISAGECPP__)) + #pragma warning "Your compiler does not appear to support 64 bit "\ + "integers, using emulation class instead.\n" \ + "Please report your compiler version to " \ + "wx-dev@lists.wxwidgets.org!" + #endif + + #define wxUSE_LONGLONG_WX 1 +#endif // compiler + +// the user may predefine wxUSE_LONGLONG_NATIVE and/or wxUSE_LONGLONG_NATIVE +// to disable automatic testing (useful for the test program which defines +// both classes) but by default we only use one class +#if (defined(wxUSE_LONGLONG_WX) && wxUSE_LONGLONG_WX) || !defined(wxLongLong_t) + // don't use both classes unless wxUSE_LONGLONG_NATIVE was explicitly set: + // this is useful in test programs and only there + #ifndef wxUSE_LONGLONG_NATIVE + #define wxUSE_LONGLONG_NATIVE 0 + #endif + + class WXDLLIMPEXP_FWD_BASE wxLongLongWx; + class WXDLLIMPEXP_FWD_BASE wxULongLongWx; +#if defined(__VISUALC__) && !defined(__WIN32__) + #define wxLongLong wxLongLongWx + #define wxULongLong wxULongLongWx +#else + typedef wxLongLongWx wxLongLong; + typedef wxULongLongWx wxULongLong; +#endif + +#else + // if nothing is defined, use native implementation by default, of course + #ifndef wxUSE_LONGLONG_NATIVE + #define wxUSE_LONGLONG_NATIVE 1 + #endif +#endif + +#ifndef wxUSE_LONGLONG_WX + #define wxUSE_LONGLONG_WX 0 + class WXDLLIMPEXP_FWD_BASE wxLongLongNative; + class WXDLLIMPEXP_FWD_BASE wxULongLongNative; + typedef wxLongLongNative wxLongLong; + typedef wxULongLongNative wxULongLong; +#endif + +// NB: if both wxUSE_LONGLONG_WX and NATIVE are defined, the user code should +// typedef wxLongLong as it wants, we don't do it + +// ---------------------------------------------------------------------------- +// choose the appropriate class +// ---------------------------------------------------------------------------- + +// we use iostream for wxLongLong output +#include "wx/iosfwrap.h" + +#if wxUSE_LONGLONG_NATIVE + +class WXDLLIMPEXP_BASE wxLongLongNative +{ +public: + // ctors + // default ctor initializes to 0 + wxLongLongNative() : m_ll(0) { } + // from long long + wxLongLongNative(wxLongLong_t ll) : m_ll(ll) { } + // from 2 longs + wxLongLongNative(wxInt32 hi, wxUint32 lo) + { + // cast to wxLongLong_t first to avoid precision loss! + m_ll = ((wxLongLong_t) hi) << 32; + m_ll |= (wxLongLong_t) lo; + } +#if wxUSE_LONGLONG_WX + wxLongLongNative(wxLongLongWx ll); +#endif + + // default copy ctor is ok + + // no dtor + + // assignment operators + // from native 64 bit integer +#ifndef wxLongLongIsLong + wxLongLongNative& operator=(wxLongLong_t ll) + { m_ll = ll; return *this; } + wxLongLongNative& operator=(wxULongLong_t ll) + { m_ll = ll; return *this; } +#endif // !wxLongLongNative + wxLongLongNative& operator=(const wxULongLongNative &ll); + wxLongLongNative& operator=(int l) + { m_ll = l; return *this; } + wxLongLongNative& operator=(long l) + { m_ll = l; return *this; } + wxLongLongNative& operator=(unsigned int l) + { m_ll = l; return *this; } + wxLongLongNative& operator=(unsigned long l) + { m_ll = l; return *this; } +#if wxUSE_LONGLONG_WX + wxLongLongNative& operator=(wxLongLongWx ll); + wxLongLongNative& operator=(const class wxULongLongWx &ll); +#endif + + + // from double: this one has an explicit name because otherwise we + // would have ambiguity with "ll = int" and also because we don't want + // to have implicit conversions between doubles and wxLongLongs + wxLongLongNative& Assign(double d) + { m_ll = (wxLongLong_t)d; return *this; } + + // assignment operators from wxLongLongNative is ok + + // accessors + // get high part + wxInt32 GetHi() const + { return wx_truncate_cast(wxInt32, m_ll >> 32); } + // get low part + wxUint32 GetLo() const + { return wx_truncate_cast(wxUint32, m_ll); } + + // get absolute value + wxLongLongNative Abs() const { return wxLongLongNative(*this).Abs(); } + wxLongLongNative& Abs() { if ( m_ll < 0 ) m_ll = -m_ll; return *this; } + + // convert to native long long + wxLongLong_t GetValue() const { return m_ll; } + + // convert to long with range checking in debug mode (only!) + long ToLong() const + { + wxASSERT_MSG( (m_ll >= LONG_MIN) && (m_ll <= LONG_MAX), + wxT("wxLongLong to long conversion loss of precision") ); + + return wx_truncate_cast(long, m_ll); + } + + // convert to double + double ToDouble() const { return wx_truncate_cast(double, m_ll); } + + // don't provide implicit conversion to wxLongLong_t or we will have an + // ambiguity for all arithmetic operations + //operator wxLongLong_t() const { return m_ll; } + + // operations + // addition + wxLongLongNative operator+(const wxLongLongNative& ll) const + { return wxLongLongNative(m_ll + ll.m_ll); } + wxLongLongNative& operator+=(const wxLongLongNative& ll) + { m_ll += ll.m_ll; return *this; } + + wxLongLongNative operator+(const wxLongLong_t ll) const + { return wxLongLongNative(m_ll + ll); } + wxLongLongNative& operator+=(const wxLongLong_t ll) + { m_ll += ll; return *this; } + + // pre increment + wxLongLongNative& operator++() + { m_ll++; return *this; } + + // post increment + wxLongLongNative operator++(int) + { wxLongLongNative value(*this); m_ll++; return value; } + + // negation operator + wxLongLongNative operator-() const + { return wxLongLongNative(-m_ll); } + wxLongLongNative& Negate() { m_ll = -m_ll; return *this; } + + // subtraction + wxLongLongNative operator-(const wxLongLongNative& ll) const + { return wxLongLongNative(m_ll - ll.m_ll); } + wxLongLongNative& operator-=(const wxLongLongNative& ll) + { m_ll -= ll.m_ll; return *this; } + + wxLongLongNative operator-(const wxLongLong_t ll) const + { return wxLongLongNative(m_ll - ll); } + wxLongLongNative& operator-=(const wxLongLong_t ll) + { m_ll -= ll; return *this; } + + // pre decrement + wxLongLongNative& operator--() + { m_ll--; return *this; } + + // post decrement + wxLongLongNative operator--(int) + { wxLongLongNative value(*this); m_ll--; return value; } + + // shifts + // left shift + wxLongLongNative operator<<(int shift) const + { return wxLongLongNative(m_ll << shift); } + wxLongLongNative& operator<<=(int shift) + { m_ll <<= shift; return *this; } + + // right shift + wxLongLongNative operator>>(int shift) const + { return wxLongLongNative(m_ll >> shift); } + wxLongLongNative& operator>>=(int shift) + { m_ll >>= shift; return *this; } + + // bitwise operators + wxLongLongNative operator&(const wxLongLongNative& ll) const + { return wxLongLongNative(m_ll & ll.m_ll); } + wxLongLongNative& operator&=(const wxLongLongNative& ll) + { m_ll &= ll.m_ll; return *this; } + + wxLongLongNative operator|(const wxLongLongNative& ll) const + { return wxLongLongNative(m_ll | ll.m_ll); } + wxLongLongNative& operator|=(const wxLongLongNative& ll) + { m_ll |= ll.m_ll; return *this; } + + wxLongLongNative operator^(const wxLongLongNative& ll) const + { return wxLongLongNative(m_ll ^ ll.m_ll); } + wxLongLongNative& operator^=(const wxLongLongNative& ll) + { m_ll ^= ll.m_ll; return *this; } + + // multiplication/division + wxLongLongNative operator*(const wxLongLongNative& ll) const + { return wxLongLongNative(m_ll * ll.m_ll); } + wxLongLongNative operator*(long l) const + { return wxLongLongNative(m_ll * l); } + wxLongLongNative& operator*=(const wxLongLongNative& ll) + { m_ll *= ll.m_ll; return *this; } + wxLongLongNative& operator*=(long l) + { m_ll *= l; return *this; } + + wxLongLongNative operator/(const wxLongLongNative& ll) const + { return wxLongLongNative(m_ll / ll.m_ll); } + wxLongLongNative operator/(long l) const + { return wxLongLongNative(m_ll / l); } + wxLongLongNative& operator/=(const wxLongLongNative& ll) + { m_ll /= ll.m_ll; return *this; } + wxLongLongNative& operator/=(long l) + { m_ll /= l; return *this; } + + wxLongLongNative operator%(const wxLongLongNative& ll) const + { return wxLongLongNative(m_ll % ll.m_ll); } + wxLongLongNative operator%(long l) const + { return wxLongLongNative(m_ll % l); } + + // comparison + bool operator==(const wxLongLongNative& ll) const + { return m_ll == ll.m_ll; } + bool operator==(long l) const + { return m_ll == l; } + bool operator!=(const wxLongLongNative& ll) const + { return m_ll != ll.m_ll; } + bool operator!=(long l) const + { return m_ll != l; } + bool operator<(const wxLongLongNative& ll) const + { return m_ll < ll.m_ll; } + bool operator<(long l) const + { return m_ll < l; } + bool operator>(const wxLongLongNative& ll) const + { return m_ll > ll.m_ll; } + bool operator>(long l) const + { return m_ll > l; } + bool operator<=(const wxLongLongNative& ll) const + { return m_ll <= ll.m_ll; } + bool operator<=(long l) const + { return m_ll <= l; } + bool operator>=(const wxLongLongNative& ll) const + { return m_ll >= ll.m_ll; } + bool operator>=(long l) const + { return m_ll >= l; } + + // miscellaneous + + // return the string representation of this number + wxString ToString() const; + + // conversion to byte array: returns a pointer to static buffer! + void *asArray() const; + +#if wxUSE_STD_IOSTREAM + // input/output + friend WXDLLIMPEXP_BASE + wxSTD ostream& operator<<(wxSTD ostream&, const wxLongLongNative&); +#endif + + friend WXDLLIMPEXP_BASE + wxString& operator<<(wxString&, const wxLongLongNative&); + +#if wxUSE_STREAMS + friend WXDLLIMPEXP_BASE + class wxTextOutputStream& operator<<(class wxTextOutputStream&, const wxLongLongNative&); + friend WXDLLIMPEXP_BASE + class wxTextInputStream& operator>>(class wxTextInputStream&, wxLongLongNative&); +#endif + +private: + wxLongLong_t m_ll; +}; + + +class WXDLLIMPEXP_BASE wxULongLongNative +{ +public: + // ctors + // default ctor initializes to 0 + wxULongLongNative() : m_ll(0) { } + // from long long + wxULongLongNative(wxULongLong_t ll) : m_ll(ll) { } + // from 2 longs + wxULongLongNative(wxUint32 hi, wxUint32 lo) : m_ll(0) + { + // cast to wxLongLong_t first to avoid precision loss! + m_ll = ((wxULongLong_t) hi) << 32; + m_ll |= (wxULongLong_t) lo; + } + +#if wxUSE_LONGLONG_WX + wxULongLongNative(const class wxULongLongWx &ll); +#endif + + // default copy ctor is ok + + // no dtor + + // assignment operators + // from native 64 bit integer +#ifndef wxLongLongIsLong + wxULongLongNative& operator=(wxULongLong_t ll) + { m_ll = ll; return *this; } + wxULongLongNative& operator=(wxLongLong_t ll) + { m_ll = ll; return *this; } +#endif // !wxLongLongNative + wxULongLongNative& operator=(int l) + { m_ll = l; return *this; } + wxULongLongNative& operator=(long l) + { m_ll = l; return *this; } + wxULongLongNative& operator=(unsigned int l) + { m_ll = l; return *this; } + wxULongLongNative& operator=(unsigned long l) + { m_ll = l; return *this; } + wxULongLongNative& operator=(const wxLongLongNative &ll) + { m_ll = ll.GetValue(); return *this; } +#if wxUSE_LONGLONG_WX + wxULongLongNative& operator=(wxLongLongWx ll); + wxULongLongNative& operator=(const class wxULongLongWx &ll); +#endif + + // assignment operators from wxULongLongNative is ok + + // accessors + // get high part + wxUint32 GetHi() const + { return wx_truncate_cast(wxUint32, m_ll >> 32); } + // get low part + wxUint32 GetLo() const + { return wx_truncate_cast(wxUint32, m_ll); } + + // convert to native ulong long + wxULongLong_t GetValue() const { return m_ll; } + + // convert to ulong with range checking in debug mode (only!) + unsigned long ToULong() const + { + wxASSERT_MSG( m_ll <= ULONG_MAX, + wxT("wxULongLong to long conversion loss of precision") ); + + return wx_truncate_cast(unsigned long, m_ll); + } + + // convert to double + // + // For some completely obscure reasons compiling the cast below with + // VC6 in DLL builds only (!) results in "error C2520: conversion from + // unsigned __int64 to double not implemented, use signed __int64" so + // we must use a different version for that compiler. +#ifdef __VISUALC6__ + double ToDouble() const; +#else + double ToDouble() const { return wx_truncate_cast(double, m_ll); } +#endif + + // operations + // addition + wxULongLongNative operator+(const wxULongLongNative& ll) const + { return wxULongLongNative(m_ll + ll.m_ll); } + wxULongLongNative& operator+=(const wxULongLongNative& ll) + { m_ll += ll.m_ll; return *this; } + + wxULongLongNative operator+(const wxULongLong_t ll) const + { return wxULongLongNative(m_ll + ll); } + wxULongLongNative& operator+=(const wxULongLong_t ll) + { m_ll += ll; return *this; } + + // pre increment + wxULongLongNative& operator++() + { m_ll++; return *this; } + + // post increment + wxULongLongNative operator++(int) + { wxULongLongNative value(*this); m_ll++; return value; } + + // subtraction + wxULongLongNative operator-(const wxULongLongNative& ll) const + { return wxULongLongNative(m_ll - ll.m_ll); } + wxULongLongNative& operator-=(const wxULongLongNative& ll) + { m_ll -= ll.m_ll; return *this; } + + wxULongLongNative operator-(const wxULongLong_t ll) const + { return wxULongLongNative(m_ll - ll); } + wxULongLongNative& operator-=(const wxULongLong_t ll) + { m_ll -= ll; return *this; } + + // pre decrement + wxULongLongNative& operator--() + { m_ll--; return *this; } + + // post decrement + wxULongLongNative operator--(int) + { wxULongLongNative value(*this); m_ll--; return value; } + + // shifts + // left shift + wxULongLongNative operator<<(int shift) const + { return wxULongLongNative(m_ll << shift); } + wxULongLongNative& operator<<=(int shift) + { m_ll <<= shift; return *this; } + + // right shift + wxULongLongNative operator>>(int shift) const + { return wxULongLongNative(m_ll >> shift); } + wxULongLongNative& operator>>=(int shift) + { m_ll >>= shift; return *this; } + + // bitwise operators + wxULongLongNative operator&(const wxULongLongNative& ll) const + { return wxULongLongNative(m_ll & ll.m_ll); } + wxULongLongNative& operator&=(const wxULongLongNative& ll) + { m_ll &= ll.m_ll; return *this; } + + wxULongLongNative operator|(const wxULongLongNative& ll) const + { return wxULongLongNative(m_ll | ll.m_ll); } + wxULongLongNative& operator|=(const wxULongLongNative& ll) + { m_ll |= ll.m_ll; return *this; } + + wxULongLongNative operator^(const wxULongLongNative& ll) const + { return wxULongLongNative(m_ll ^ ll.m_ll); } + wxULongLongNative& operator^=(const wxULongLongNative& ll) + { m_ll ^= ll.m_ll; return *this; } + + // multiplication/division + wxULongLongNative operator*(const wxULongLongNative& ll) const + { return wxULongLongNative(m_ll * ll.m_ll); } + wxULongLongNative operator*(unsigned long l) const + { return wxULongLongNative(m_ll * l); } + wxULongLongNative& operator*=(const wxULongLongNative& ll) + { m_ll *= ll.m_ll; return *this; } + wxULongLongNative& operator*=(unsigned long l) + { m_ll *= l; return *this; } + + wxULongLongNative operator/(const wxULongLongNative& ll) const + { return wxULongLongNative(m_ll / ll.m_ll); } + wxULongLongNative operator/(unsigned long l) const + { return wxULongLongNative(m_ll / l); } + wxULongLongNative& operator/=(const wxULongLongNative& ll) + { m_ll /= ll.m_ll; return *this; } + wxULongLongNative& operator/=(unsigned long l) + { m_ll /= l; return *this; } + + wxULongLongNative operator%(const wxULongLongNative& ll) const + { return wxULongLongNative(m_ll % ll.m_ll); } + wxULongLongNative operator%(unsigned long l) const + { return wxULongLongNative(m_ll % l); } + + // comparison + bool operator==(const wxULongLongNative& ll) const + { return m_ll == ll.m_ll; } + bool operator==(unsigned long l) const + { return m_ll == l; } + bool operator!=(const wxULongLongNative& ll) const + { return m_ll != ll.m_ll; } + bool operator!=(unsigned long l) const + { return m_ll != l; } + bool operator<(const wxULongLongNative& ll) const + { return m_ll < ll.m_ll; } + bool operator<(unsigned long l) const + { return m_ll < l; } + bool operator>(const wxULongLongNative& ll) const + { return m_ll > ll.m_ll; } + bool operator>(unsigned long l) const + { return m_ll > l; } + bool operator<=(const wxULongLongNative& ll) const + { return m_ll <= ll.m_ll; } + bool operator<=(unsigned long l) const + { return m_ll <= l; } + bool operator>=(const wxULongLongNative& ll) const + { return m_ll >= ll.m_ll; } + bool operator>=(unsigned long l) const + { return m_ll >= l; } + + // miscellaneous + + // return the string representation of this number + wxString ToString() const; + + // conversion to byte array: returns a pointer to static buffer! + void *asArray() const; + +#if wxUSE_STD_IOSTREAM + // input/output + friend WXDLLIMPEXP_BASE + wxSTD ostream& operator<<(wxSTD ostream&, const wxULongLongNative&); +#endif + + friend WXDLLIMPEXP_BASE + wxString& operator<<(wxString&, const wxULongLongNative&); + +#if wxUSE_STREAMS + friend WXDLLIMPEXP_BASE + class wxTextOutputStream& operator<<(class wxTextOutputStream&, const wxULongLongNative&); + friend WXDLLIMPEXP_BASE + class wxTextInputStream& operator>>(class wxTextInputStream&, wxULongLongNative&); +#endif + +private: + wxULongLong_t m_ll; +}; + +inline +wxLongLongNative& wxLongLongNative::operator=(const wxULongLongNative &ll) +{ + m_ll = ll.GetValue(); + return *this; +} + +#endif // wxUSE_LONGLONG_NATIVE + +#if wxUSE_LONGLONG_WX + +class WXDLLIMPEXP_BASE wxLongLongWx +{ +public: + // ctors + // default ctor initializes to 0 + wxLongLongWx() + { + m_lo = m_hi = 0; + +#ifdef wxLONGLONG_TEST_MODE + m_ll = 0; + + Check(); +#endif // wxLONGLONG_TEST_MODE + } + // from long + wxLongLongWx(long l) { *this = l; } + // from 2 longs + wxLongLongWx(long hi, unsigned long lo) + { + m_hi = hi; + m_lo = lo; + +#ifdef wxLONGLONG_TEST_MODE + m_ll = hi; + m_ll <<= 32; + m_ll |= lo; + + Check(); +#endif // wxLONGLONG_TEST_MODE + } + + // default copy ctor is ok in both cases + + // no dtor + + // assignment operators + // from long + wxLongLongWx& operator=(long l) + { + m_lo = l; + m_hi = (l < 0 ? -1l : 0l); + +#ifdef wxLONGLONG_TEST_MODE + m_ll = l; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; + } + // from int + wxLongLongWx& operator=(int l) + { + return operator=((long)l); + } + + wxLongLongWx& operator=(unsigned long l) + { + m_lo = l; + m_hi = 0; + +#ifdef wxLONGLONG_TEST_MODE + m_ll = l; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; + } + + wxLongLongWx& operator=(unsigned int l) + { + return operator=((unsigned long)l); + } + + wxLongLongWx& operator=(const class wxULongLongWx &ll); + + // from double + wxLongLongWx& Assign(double d); + // can't have assignment operator from 2 longs + + // accessors + // get high part + long GetHi() const { return m_hi; } + // get low part + unsigned long GetLo() const { return m_lo; } + + // get absolute value + wxLongLongWx Abs() const { return wxLongLongWx(*this).Abs(); } + wxLongLongWx& Abs() + { + if ( m_hi < 0 ) + m_hi = -m_hi; + +#ifdef wxLONGLONG_TEST_MODE + if ( m_ll < 0 ) + m_ll = -m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; + } + + // convert to long with range checking in debug mode (only!) + long ToLong() const + { + wxASSERT_MSG( (m_hi == 0l) || (m_hi == -1l), + wxT("wxLongLong to long conversion loss of precision") ); + + return (long)m_lo; + } + + // convert to double + double ToDouble() const; + + // operations + // addition + wxLongLongWx operator+(const wxLongLongWx& ll) const; + wxLongLongWx& operator+=(const wxLongLongWx& ll); + wxLongLongWx operator+(long l) const; + wxLongLongWx& operator+=(long l); + + // pre increment operator + wxLongLongWx& operator++(); + + // post increment operator + wxLongLongWx& operator++(int) { return ++(*this); } + + // negation operator + wxLongLongWx operator-() const; + wxLongLongWx& Negate(); + + // subraction + wxLongLongWx operator-(const wxLongLongWx& ll) const; + wxLongLongWx& operator-=(const wxLongLongWx& ll); + + // pre decrement operator + wxLongLongWx& operator--(); + + // post decrement operator + wxLongLongWx& operator--(int) { return --(*this); } + + // shifts + // left shift + wxLongLongWx operator<<(int shift) const; + wxLongLongWx& operator<<=(int shift); + + // right shift + wxLongLongWx operator>>(int shift) const; + wxLongLongWx& operator>>=(int shift); + + // bitwise operators + wxLongLongWx operator&(const wxLongLongWx& ll) const; + wxLongLongWx& operator&=(const wxLongLongWx& ll); + wxLongLongWx operator|(const wxLongLongWx& ll) const; + wxLongLongWx& operator|=(const wxLongLongWx& ll); + wxLongLongWx operator^(const wxLongLongWx& ll) const; + wxLongLongWx& operator^=(const wxLongLongWx& ll); + wxLongLongWx operator~() const; + + // comparison + bool operator==(const wxLongLongWx& ll) const + { return m_lo == ll.m_lo && m_hi == ll.m_hi; } +#if wxUSE_LONGLONG_NATIVE + bool operator==(const wxLongLongNative& ll) const + { return m_lo == ll.GetLo() && m_hi == ll.GetHi(); } +#endif + bool operator!=(const wxLongLongWx& ll) const + { return !(*this == ll); } + bool operator<(const wxLongLongWx& ll) const; + bool operator>(const wxLongLongWx& ll) const; + bool operator<=(const wxLongLongWx& ll) const + { return *this < ll || *this == ll; } + bool operator>=(const wxLongLongWx& ll) const + { return *this > ll || *this == ll; } + + bool operator<(long l) const { return *this < wxLongLongWx(l); } + bool operator>(long l) const { return *this > wxLongLongWx(l); } + bool operator==(long l) const + { + return l >= 0 ? (m_hi == 0 && m_lo == (unsigned long)l) + : (m_hi == -1 && m_lo == (unsigned long)l); + } + + bool operator<=(long l) const { return *this < l || *this == l; } + bool operator>=(long l) const { return *this > l || *this == l; } + + // multiplication + wxLongLongWx operator*(const wxLongLongWx& ll) const; + wxLongLongWx& operator*=(const wxLongLongWx& ll); + + // division + wxLongLongWx operator/(const wxLongLongWx& ll) const; + wxLongLongWx& operator/=(const wxLongLongWx& ll); + + wxLongLongWx operator%(const wxLongLongWx& ll) const; + + void Divide(const wxLongLongWx& divisor, + wxLongLongWx& quotient, + wxLongLongWx& remainder) const; + + // input/output + + // return the string representation of this number + wxString ToString() const; + + void *asArray() const; + +#if wxUSE_STD_IOSTREAM + friend WXDLLIMPEXP_BASE + wxSTD ostream& operator<<(wxSTD ostream&, const wxLongLongWx&); +#endif // wxUSE_STD_IOSTREAM + + friend WXDLLIMPEXP_BASE + wxString& operator<<(wxString&, const wxLongLongWx&); + +#if wxUSE_STREAMS + friend WXDLLIMPEXP_BASE + class wxTextOutputStream& operator<<(class wxTextOutputStream&, const wxLongLongWx&); + friend WXDLLIMPEXP_BASE + class wxTextInputStream& operator>>(class wxTextInputStream&, wxLongLongWx&); +#endif + +private: + // long is at least 32 bits, so represent our 64bit number as 2 longs + + long m_hi; // signed bit is in the high part + unsigned long m_lo; + +#ifdef wxLONGLONG_TEST_MODE + void Check() + { + wxASSERT( (m_ll >> 32) == m_hi && (unsigned long)m_ll == m_lo ); + } + + wxLongLong_t m_ll; +#endif // wxLONGLONG_TEST_MODE +}; + + +class WXDLLIMPEXP_BASE wxULongLongWx +{ +public: + // ctors + // default ctor initializes to 0 + wxULongLongWx() + { + m_lo = m_hi = 0; + +#ifdef wxLONGLONG_TEST_MODE + m_ll = 0; + + Check(); +#endif // wxLONGLONG_TEST_MODE + } + // from ulong + wxULongLongWx(unsigned long l) { *this = l; } + // from 2 ulongs + wxULongLongWx(unsigned long hi, unsigned long lo) + { + m_hi = hi; + m_lo = lo; + +#ifdef wxLONGLONG_TEST_MODE + m_ll = hi; + m_ll <<= 32; + m_ll |= lo; + + Check(); +#endif // wxLONGLONG_TEST_MODE + } + + // from signed to unsigned + wxULongLongWx(wxLongLongWx ll) + { + wxASSERT(ll.GetHi() >= 0); + m_hi = (unsigned long)ll.GetHi(); + m_lo = ll.GetLo(); + } + + // default copy ctor is ok in both cases + + // no dtor + + // assignment operators + // from long + wxULongLongWx& operator=(unsigned long l) + { + m_lo = l; + m_hi = 0; + +#ifdef wxLONGLONG_TEST_MODE + m_ll = l; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; + } + wxULongLongWx& operator=(long l) + { + m_lo = l; + m_hi = (unsigned long) ((l<0) ? -1l : 0); + +#ifdef wxLONGLONG_TEST_MODE + m_ll = (wxULongLong_t) (wxLongLong_t) l; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; + } + wxULongLongWx& operator=(const class wxLongLongWx &ll) { + // Should we use an assert like it was before in the constructor? + // wxASSERT(ll.GetHi() >= 0); + m_hi = (unsigned long)ll.GetHi(); + m_lo = ll.GetLo(); + return *this; + } + + // can't have assignment operator from 2 longs + + // accessors + // get high part + unsigned long GetHi() const { return m_hi; } + // get low part + unsigned long GetLo() const { return m_lo; } + + // convert to long with range checking in debug mode (only!) + unsigned long ToULong() const + { + wxASSERT_MSG( m_hi == 0ul, + wxT("wxULongLong to long conversion loss of precision") ); + + return (unsigned long)m_lo; + } + + // convert to double + double ToDouble() const; + + // operations + // addition + wxULongLongWx operator+(const wxULongLongWx& ll) const; + wxULongLongWx& operator+=(const wxULongLongWx& ll); + wxULongLongWx operator+(unsigned long l) const; + wxULongLongWx& operator+=(unsigned long l); + + // pre increment operator + wxULongLongWx& operator++(); + + // post increment operator + wxULongLongWx& operator++(int) { return ++(*this); } + + // subtraction + wxLongLongWx operator-(const wxULongLongWx& ll) const; + wxULongLongWx& operator-=(const wxULongLongWx& ll); + + // pre decrement operator + wxULongLongWx& operator--(); + + // post decrement operator + wxULongLongWx& operator--(int) { return --(*this); } + + // shifts + // left shift + wxULongLongWx operator<<(int shift) const; + wxULongLongWx& operator<<=(int shift); + + // right shift + wxULongLongWx operator>>(int shift) const; + wxULongLongWx& operator>>=(int shift); + + // bitwise operators + wxULongLongWx operator&(const wxULongLongWx& ll) const; + wxULongLongWx& operator&=(const wxULongLongWx& ll); + wxULongLongWx operator|(const wxULongLongWx& ll) const; + wxULongLongWx& operator|=(const wxULongLongWx& ll); + wxULongLongWx operator^(const wxULongLongWx& ll) const; + wxULongLongWx& operator^=(const wxULongLongWx& ll); + wxULongLongWx operator~() const; + + // comparison + bool operator==(const wxULongLongWx& ll) const + { return m_lo == ll.m_lo && m_hi == ll.m_hi; } + bool operator!=(const wxULongLongWx& ll) const + { return !(*this == ll); } + bool operator<(const wxULongLongWx& ll) const; + bool operator>(const wxULongLongWx& ll) const; + bool operator<=(const wxULongLongWx& ll) const + { return *this < ll || *this == ll; } + bool operator>=(const wxULongLongWx& ll) const + { return *this > ll || *this == ll; } + + bool operator<(unsigned long l) const { return *this < wxULongLongWx(l); } + bool operator>(unsigned long l) const { return *this > wxULongLongWx(l); } + bool operator==(unsigned long l) const + { + return (m_hi == 0 && m_lo == (unsigned long)l); + } + + bool operator<=(unsigned long l) const { return *this < l || *this == l; } + bool operator>=(unsigned long l) const { return *this > l || *this == l; } + + // multiplication + wxULongLongWx operator*(const wxULongLongWx& ll) const; + wxULongLongWx& operator*=(const wxULongLongWx& ll); + + // division + wxULongLongWx operator/(const wxULongLongWx& ll) const; + wxULongLongWx& operator/=(const wxULongLongWx& ll); + + wxULongLongWx operator%(const wxULongLongWx& ll) const; + + void Divide(const wxULongLongWx& divisor, + wxULongLongWx& quotient, + wxULongLongWx& remainder) const; + + // input/output + + // return the string representation of this number + wxString ToString() const; + + void *asArray() const; + +#if wxUSE_STD_IOSTREAM + friend WXDLLIMPEXP_BASE + wxSTD ostream& operator<<(wxSTD ostream&, const wxULongLongWx&); +#endif // wxUSE_STD_IOSTREAM + + friend WXDLLIMPEXP_BASE + wxString& operator<<(wxString&, const wxULongLongWx&); + +#if wxUSE_STREAMS + friend WXDLLIMPEXP_BASE + class wxTextOutputStream& operator<<(class wxTextOutputStream&, const wxULongLongWx&); + friend WXDLLIMPEXP_BASE + class wxTextInputStream& operator>>(class wxTextInputStream&, wxULongLongWx&); +#endif + +private: + // long is at least 32 bits, so represent our 64bit number as 2 longs + + unsigned long m_hi; + unsigned long m_lo; + +#ifdef wxLONGLONG_TEST_MODE + void Check() + { + wxASSERT( (m_ll >> 32) == m_hi && (unsigned long)m_ll == m_lo ); + } + + wxULongLong_t m_ll; +#endif // wxLONGLONG_TEST_MODE +}; + +#endif // wxUSE_LONGLONG_WX + +// ---------------------------------------------------------------------------- +// binary operators +// ---------------------------------------------------------------------------- + +inline bool operator<(long l, const wxLongLong& ll) { return ll > l; } +inline bool operator>(long l, const wxLongLong& ll) { return ll < l; } +inline bool operator<=(long l, const wxLongLong& ll) { return ll >= l; } +inline bool operator>=(long l, const wxLongLong& ll) { return ll <= l; } +inline bool operator==(long l, const wxLongLong& ll) { return ll == l; } +inline bool operator!=(long l, const wxLongLong& ll) { return ll != l; } + +inline wxLongLong operator+(long l, const wxLongLong& ll) { return ll + l; } +inline wxLongLong operator-(long l, const wxLongLong& ll) +{ + return wxLongLong(l) - ll; +} + +inline bool operator<(unsigned long l, const wxULongLong& ull) { return ull > l; } +inline bool operator>(unsigned long l, const wxULongLong& ull) { return ull < l; } +inline bool operator<=(unsigned long l, const wxULongLong& ull) { return ull >= l; } +inline bool operator>=(unsigned long l, const wxULongLong& ull) { return ull <= l; } +inline bool operator==(unsigned long l, const wxULongLong& ull) { return ull == l; } +inline bool operator!=(unsigned long l, const wxULongLong& ull) { return ull != l; } + +inline wxULongLong operator+(unsigned long l, const wxULongLong& ull) { return ull + l; } + +inline wxLongLong operator-(unsigned long l, const wxULongLong& ull) +{ + wxULongLong ret = wxULongLong(l) - ull; + return wxLongLong((wxInt32)ret.GetHi(),ret.GetLo()); +} + +#if wxUSE_LONGLONG_NATIVE && wxUSE_STREAMS + +WXDLLIMPEXP_BASE class wxTextOutputStream &operator<<(class wxTextOutputStream &stream, wxULongLong_t value); +WXDLLIMPEXP_BASE class wxTextOutputStream &operator<<(class wxTextOutputStream &stream, wxLongLong_t value); + +WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &stream, wxULongLong_t &value); +WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &stream, wxLongLong_t &value); + +#endif + +// ---------------------------------------------------------------------------- +// Specialize numeric_limits<> for our long long wrapper classes. +// ---------------------------------------------------------------------------- + +#if wxUSE_LONGLONG_NATIVE + +// VC6 is known to not have __int64 specializations of numeric_limits<> in its +// <limits> anyhow so don't bother including it, especially as it results in +// tons of warnings because the standard header itself uses obsolete template +// specialization syntax. +#ifndef __VISUALC6__ + +#include <limits> + +namespace std +{ + +#ifdef __clang__ + // libstdc++ (used by Clang) uses struct for numeric_limits; unlike gcc, clang + // warns about this + template<> struct numeric_limits<wxLongLong> : public numeric_limits<wxLongLong_t> {}; + template<> struct numeric_limits<wxULongLong> : public numeric_limits<wxULongLong_t> {}; +#else + template<> class numeric_limits<wxLongLong> : public numeric_limits<wxLongLong_t> {}; + template<> class numeric_limits<wxULongLong> : public numeric_limits<wxULongLong_t> {}; +#endif + +} // namespace std + +#endif // !VC6 + +#endif // wxUSE_LONGLONG_NATIVE + +// ---------------------------------------------------------------------------- +// Specialize wxArgNormalizer to allow using wxLongLong directly with wx pseudo +// vararg functions. +// ---------------------------------------------------------------------------- + +// Notice that this must be done here and not in wx/strvararg.h itself because +// we can't include wx/longlong.h from there as this header itself includes +// wx/string.h which includes wx/strvararg.h too, so to avoid the circular +// dependencies we can only do it here (or add another header just for this but +// it doesn't seem necessary). +#include "wx/strvararg.h" + +template<> +struct WXDLLIMPEXP_BASE wxArgNormalizer<wxLongLong> +{ + wxArgNormalizer(wxLongLong value, + const wxFormatString *fmt, unsigned index) + : m_value(value) + { + wxASSERT_ARG_TYPE( fmt, index, wxFormatString::Arg_LongLongInt ); + } + + wxLongLong_t get() const { return m_value.GetValue(); } + + wxLongLong m_value; +}; + +#endif // wxUSE_LONGLONG + +#endif // _WX_LONGLONG_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/math.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/math.h new file mode 100644 index 0000000000..89a1b94473 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/math.h @@ -0,0 +1,165 @@ +/** +* Name: wx/math.h +* Purpose: Declarations/definitions of common math functions +* Author: John Labenski and others +* Modified by: +* Created: 02/02/03 +* Copyright: (c) John Labenski +* Licence: wxWindows licence +*/ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_MATH_H_ +#define _WX_MATH_H_ + +#include "wx/defs.h" + +#include <math.h> + +#ifndef M_PI + #define M_PI 3.1415926535897932384626433832795 +#endif + +/* Scaling factors for various unit conversions: 1 inch = 2.54 cm */ +#ifndef METRIC_CONVERSION_CONSTANT + #define METRIC_CONVERSION_CONSTANT (1/25.4) +#endif + +#ifndef mm2inches + #define mm2inches (METRIC_CONVERSION_CONSTANT) +#endif + +#ifndef inches2mm + #define inches2mm (1/(mm2inches)) +#endif + +#ifndef mm2twips + #define mm2twips (METRIC_CONVERSION_CONSTANT*1440) +#endif + +#ifndef twips2mm + #define twips2mm (1/(mm2twips)) +#endif + +#ifndef mm2pt + #define mm2pt (METRIC_CONVERSION_CONSTANT*72) +#endif + +#ifndef pt2mm + #define pt2mm (1/(mm2pt)) +#endif + + +#ifdef __cplusplus + +/* Any C++11 compiler should provide isfinite() */ +#if __cplusplus >= 201103 + #include <cmath> + #define wxFinite(x) std::isfinite(x) +#elif defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__) + #include <float.h> + #define wxFinite(x) _finite(x) +#elif defined(__MINGW64_TOOLCHAIN__) || defined(__clang__) + /* + add more compilers with C99 support here: using C99 isfinite() is + preferable to using BSD-ish finite() + */ + #if defined(_GLIBCXX_CMATH) || defined(_LIBCPP_CMATH) + // these <cmath> headers #undef isfinite + #define wxFinite(x) std::isfinite(x) + #else + #define wxFinite(x) isfinite(x) + #endif +#elif ( defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \ + defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \ + defined(__HPUX__) ) && ( !defined(wxOSX_USE_IPHONE) || wxOSX_USE_IPHONE == 0 ) +#ifdef __SOLARIS__ +#include <ieeefp.h> +#endif + #define wxFinite(x) finite(x) +#else + #define wxFinite(x) ((x) == (x)) +#endif + + +#if defined(__VISUALC__)||defined(__BORLAND__) + #define wxIsNaN(x) _isnan(x) +#elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \ + defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \ + defined(__HPUX__) + #define wxIsNaN(x) isnan(x) +#else + #define wxIsNaN(x) ((x) != (x)) +#endif + +#ifdef __INTELC__ + + inline bool wxIsSameDouble(double x, double y) + { + // VZ: this warning, given for operators==() and !=() is not wrong, as == + // shouldn't be used with doubles, but we get too many of them and + // removing these operators is probably not a good idea + // + // Maybe we should always compare doubles up to some "epsilon" precision + #pragma warning(push) + + // floating-point equality and inequality comparisons are unreliable + #pragma warning(disable: 1572) + + return x == y; + + #pragma warning(pop) + } + +#else /* !__INTELC__ */ + wxGCC_WARNING_SUPPRESS(float-equal) + inline bool wxIsSameDouble(double x, double y) { return x == y; } + wxGCC_WARNING_RESTORE(float-equal) + +#endif /* __INTELC__/!__INTELC__ */ + +inline bool wxIsNullDouble(double x) { return wxIsSameDouble(x, 0.); } + +inline int wxRound(double x) +{ + wxASSERT_MSG( x > INT_MIN - 0.5 && x < INT_MAX + 0.5, + wxT("argument out of supported range") ); + + #if defined(HAVE_ROUND) + return int(round(x)); + #else + return (int)(x < 0 ? x - 0.5 : x + 0.5); + #endif +} + +#endif /* __cplusplus */ + + +#if defined(__WINDOWS__) && !defined(__WXWINCE__) + #define wxMulDivInt32( a , b , c ) ::MulDiv( a , b , c ) +#else + #define wxMulDivInt32( a , b , c ) (wxRound((a)*(((wxDouble)b)/((wxDouble)c)))) +#endif + +#if wxUSE_APPLE_IEEE +#ifdef __cplusplus + extern "C" { +#endif + /* functions from common/extended.c */ + WXDLLIMPEXP_BASE wxFloat64 wxConvertFromIeeeExtended(const wxInt8 *bytes); + WXDLLIMPEXP_BASE void wxConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes); + + /* use wxConvertFromIeeeExtended() and wxConvertToIeeeExtended() instead */ +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( WXDLLIMPEXP_BASE wxFloat64 ConvertFromIeeeExtended(const wxInt8 *bytes) ); + wxDEPRECATED( WXDLLIMPEXP_BASE void ConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes) ); +#endif + +#ifdef __cplusplus + } +#endif +#endif /* wxUSE_APPLE_IEEE */ + + +#endif /* _WX_MATH_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/matrix.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/matrix.h new file mode 100644 index 0000000000..859c2a28d1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/matrix.h @@ -0,0 +1,234 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/matrix.h +// Purpose: wxTransformMatrix class. NOT YET USED +// Author: Chris Breeze, Julian Smart +// Modified by: Klaas Holwerda +// Created: 01/02/97 +// Copyright: (c) Julian Smart, Chris Breeze +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MATRIXH__ +#define _WX_MATRIXH__ + +//! headerfiles="matrix.h wx/object.h" +#include "wx/object.h" +#include "wx/math.h" + +//! codefiles="matrix.cpp" + +// A simple 3x3 matrix. This may be replaced by a more general matrix +// class some day. +// +// Note: this is intended to be used in wxDC at some point to replace +// the current system of scaling/translation. It is not yet used. + +//:definition +// A 3x3 matrix to do 2D transformations. +// It can be used to map data to window coordinates, +// and also for manipulating your own data. +// For example drawing a picture (composed of several primitives) +// at a certain coordinate and angle within another parent picture. +// At all times m_isIdentity is set if the matrix itself is an Identity matrix. +// It is used where possible to optimize calculations. +class WXDLLIMPEXP_CORE wxTransformMatrix: public wxObject +{ +public: + wxTransformMatrix(void); + wxTransformMatrix(const wxTransformMatrix& mat); + + //get the value in the matrix at col,row + //rows are horizontal (second index of m_matrix member) + //columns are vertical (first index of m_matrix member) + double GetValue(int col, int row) const; + + //set the value in the matrix at col,row + //rows are horizontal (second index of m_matrix member) + //columns are vertical (first index of m_matrix member) + void SetValue(int col, int row, double value); + + void operator = (const wxTransformMatrix& mat); + bool operator == (const wxTransformMatrix& mat) const; + bool operator != (const wxTransformMatrix& mat) const; + + //multiply every element by t + wxTransformMatrix& operator*=(const double& t); + //divide every element by t + wxTransformMatrix& operator/=(const double& t); + //add matrix m to this t + wxTransformMatrix& operator+=(const wxTransformMatrix& m); + //subtract matrix m from this + wxTransformMatrix& operator-=(const wxTransformMatrix& m); + //multiply matrix m with this + wxTransformMatrix& operator*=(const wxTransformMatrix& m); + + // constant operators + + //multiply every element by t and return result + wxTransformMatrix operator*(const double& t) const; + //divide this matrix by t and return result + wxTransformMatrix operator/(const double& t) const; + //add matrix m to this and return result + wxTransformMatrix operator+(const wxTransformMatrix& m) const; + //subtract matrix m from this and return result + wxTransformMatrix operator-(const wxTransformMatrix& m) const; + //multiply this by matrix m and return result + wxTransformMatrix operator*(const wxTransformMatrix& m) const; + wxTransformMatrix operator-() const; + + //rows are horizontal (second index of m_matrix member) + //columns are vertical (first index of m_matrix member) + double& operator()(int col, int row); + + //rows are horizontal (second index of m_matrix member) + //columns are vertical (first index of m_matrix member) + double operator()(int col, int row) const; + + // Invert matrix + bool Invert(void); + + // Make into identity matrix + bool Identity(void); + + // Is the matrix the identity matrix? + // Only returns a flag, which is set whenever an operation + // is done. + inline bool IsIdentity(void) const { return m_isIdentity; } + + // This does an actual check. + inline bool IsIdentity1(void) const ; + + //Scale by scale (isotropic scaling i.e. the same in x and y): + //!ex: + //!code: | scale 0 0 | + //!code: matrix' = | 0 scale 0 | x matrix + //!code: | 0 0 scale | + bool Scale(double scale); + + //Scale with center point and x/y scale + // + //!ex: + //!code: | xs 0 xc(1-xs) | + //!code: matrix' = | 0 ys yc(1-ys) | x matrix + //!code: | 0 0 1 | + wxTransformMatrix& Scale(const double &xs, const double &ys,const double &xc, const double &yc); + + // mirror a matrix in x, y + //!ex: + //!code: | -1 0 0 | + //!code: matrix' = | 0 -1 0 | x matrix + //!code: | 0 0 1 | + wxTransformMatrix& Mirror(bool x=true, bool y=false); + // Translate by dx, dy: + //!ex: + //!code: | 1 0 dx | + //!code: matrix' = | 0 1 dy | x matrix + //!code: | 0 0 1 | + bool Translate(double x, double y); + + // Rotate clockwise by the given number of degrees: + //!ex: + //!code: | cos sin 0 | + //!code: matrix' = | -sin cos 0 | x matrix + //!code: | 0 0 1 | + bool Rotate(double angle); + + //Rotate counter clockwise with point of rotation + // + //!ex: + //!code: | cos(r) -sin(r) x(1-cos(r))+y(sin(r)| + //!code: matrix' = | sin(r) cos(r) y(1-cos(r))-x(sin(r)| x matrix + //!code: | 0 0 1 | + wxTransformMatrix& Rotate(const double &r, const double &x, const double &y); + + // Transform X value from logical to device + inline double TransformX(double x) const; + + // Transform Y value from logical to device + inline double TransformY(double y) const; + + // Transform a point from logical to device coordinates + bool TransformPoint(double x, double y, double& tx, double& ty) const; + + // Transform a point from device to logical coordinates. + // Example of use: + // wxTransformMatrix mat = dc.GetTransformation(); + // mat.Invert(); + // mat.InverseTransformPoint(x, y, x1, y1); + // OR (shorthand:) + // dc.LogicalToDevice(x, y, x1, y1); + // The latter is slightly less efficient if we're doing several + // conversions, since the matrix is inverted several times. + // N.B. 'this' matrix is the inverse at this point + bool InverseTransformPoint(double x, double y, double& tx, double& ty) const; + + double Get_scaleX(); + double Get_scaleY(); + double GetRotation(); + void SetRotation(double rotation); + + +public: + double m_matrix[3][3]; + bool m_isIdentity; +}; + + +/* +Chris Breeze reported, that +some functions of wxTransformMatrix cannot work because it is not +known if he matrix has been inverted. Be careful when using it. +*/ + +// Transform X value from logical to device +// warning: this function can only be used for this purpose +// because no rotation is involved when mapping logical to device coordinates +// mirror and scaling for x and y will be part of the matrix +// if you have a matrix that is rotated, eg a shape containing a matrix to place +// it in the logical coordinate system, use TransformPoint +inline double wxTransformMatrix::TransformX(double x) const +{ + //normally like this, but since no rotation is involved (only mirror and scale) + //we can do without Y -> m_matrix[1]{0] is -sin(rotation angle) and therefore zero + //(x * m_matrix[0][0] + y * m_matrix[1][0] + m_matrix[2][0])) + return (m_isIdentity ? x : (x * m_matrix[0][0] + m_matrix[2][0])); +} + +// Transform Y value from logical to device +// warning: this function can only be used for this purpose +// because no rotation is involved when mapping logical to device coordinates +// mirror and scaling for x and y will be part of the matrix +// if you have a matrix that is rotated, eg a shape containing a matrix to place +// it in the logical coordinate system, use TransformPoint +inline double wxTransformMatrix::TransformY(double y) const +{ + //normally like this, but since no rotation is involved (only mirror and scale) + //we can do without X -> m_matrix[0]{1] is sin(rotation angle) and therefore zero + //(x * m_matrix[0][1] + y * m_matrix[1][1] + m_matrix[2][1])) + return (m_isIdentity ? y : (y * m_matrix[1][1] + m_matrix[2][1])); +} + + +// Is the matrix the identity matrix? +// Each operation checks whether the result is still the identity matrix and sets a flag. +inline bool wxTransformMatrix::IsIdentity1(void) const +{ + return + ( wxIsSameDouble(m_matrix[0][0], 1.0) && + wxIsSameDouble(m_matrix[1][1], 1.0) && + wxIsSameDouble(m_matrix[2][2], 1.0) && + wxIsSameDouble(m_matrix[1][0], 0.0) && + wxIsSameDouble(m_matrix[2][0], 0.0) && + wxIsSameDouble(m_matrix[0][1], 0.0) && + wxIsSameDouble(m_matrix[2][1], 0.0) && + wxIsSameDouble(m_matrix[0][2], 0.0) && + wxIsSameDouble(m_matrix[1][2], 0.0) ); +} + +// Calculates the determinant of a 2 x 2 matrix +inline double wxCalculateDet(double a11, double a21, double a12, double a22) +{ + return a11 * a22 - a12 * a21; +} + +#endif // _WX_MATRIXH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/mdi.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mdi.h new file mode 100644 index 0000000000..f6f9839306 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mdi.h @@ -0,0 +1,407 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/mdi.h +// Purpose: wxMDI base header +// Author: Julian Smart (original) +// Vadim Zeitlin (base MDI classes refactoring) +// Copyright: (c) 1998 Julian Smart +// (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MDI_H_BASE_ +#define _WX_MDI_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_MDI + +#include "wx/frame.h" +#include "wx/menu.h" + +// forward declarations +class WXDLLIMPEXP_FWD_CORE wxMDIParentFrame; +class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame; +class WXDLLIMPEXP_FWD_CORE wxMDIClientWindowBase; +class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow; + +// ---------------------------------------------------------------------------- +// wxMDIParentFrameBase: base class for parent frame for MDI children +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIParentFrameBase : public wxFrame +{ +public: + wxMDIParentFrameBase() + { + m_clientWindow = NULL; + m_currentChild = NULL; +#if wxUSE_MENUS + m_windowMenu = NULL; +#endif // wxUSE_MENUS + } + + /* + Derived classes should provide ctor and Create() with the following + declaration: + + bool Create(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr); + */ + +#if wxUSE_MENUS + virtual ~wxMDIParentFrameBase() + { + delete m_windowMenu; + } +#endif // wxUSE_MENUS + + // accessors + // --------- + + // Get or change the active MDI child window + virtual wxMDIChildFrame *GetActiveChild() const + { return m_currentChild; } + virtual void SetActiveChild(wxMDIChildFrame *child) + { m_currentChild = child; } + + + // Get the client window + wxMDIClientWindowBase *GetClientWindow() const { return m_clientWindow; } + + + // MDI windows menu functions + // -------------------------- + +#if wxUSE_MENUS + // return the pointer to the current window menu or NULL if we don't have + // because of wxFRAME_NO_WINDOW_MENU style + wxMenu* GetWindowMenu() const { return m_windowMenu; } + + // use the given menu instead of the default window menu + // + // menu can be NULL to disable the window menu completely + virtual void SetWindowMenu(wxMenu *menu) + { + if ( menu != m_windowMenu ) + { + delete m_windowMenu; + m_windowMenu = menu; + } + } +#endif // wxUSE_MENUS + + + // standard MDI window management functions + // ---------------------------------------- + + virtual void Cascade() { } + virtual void Tile(wxOrientation WXUNUSED(orient) = wxHORIZONTAL) { } + virtual void ArrangeIcons() { } + virtual void ActivateNext() = 0; + virtual void ActivatePrevious() = 0; + + /* + Derived classes must provide the following function: + + static bool IsTDI(); + */ + + // Create the client window class (don't Create() the window here, just + // return a new object of a wxMDIClientWindow-derived class) + // + // Notice that if you override this method you should use the default + // constructor and Create() and not the constructor creating the window + // when creating the frame or your overridden version is not going to be + // called (as the call to a virtual function from ctor will be dispatched + // to this class version) + virtual wxMDIClientWindow *OnCreateClient(); + +protected: + // Override to pass menu/toolbar events to the active child first. + virtual bool TryBefore(wxEvent& event); + + + // This is wxMDIClientWindow for all the native implementations but not for + // the generic MDI version which has its own wxGenericMDIClientWindow and + // so we store it as just a base class pointer because we don't need its + // exact type anyhow + wxMDIClientWindowBase *m_clientWindow; + wxMDIChildFrame *m_currentChild; + +#if wxUSE_MENUS + // the current window menu or NULL if we are not using it + wxMenu *m_windowMenu; +#endif // wxUSE_MENUS +}; + +// ---------------------------------------------------------------------------- +// wxMDIChildFrameBase: child frame managed by wxMDIParentFrame +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIChildFrameBase : public wxFrame +{ +public: + wxMDIChildFrameBase() { m_mdiParent = NULL; } + + /* + Derived classes should provide Create() with the following signature: + + bool Create(wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + And setting m_mdiParent to parent parameter. + */ + + // MDI children specific methods + virtual void Activate() = 0; + + // Return the MDI parent frame: notice that it may not be the same as + // GetParent() (our parent may be the client window or even its subwindow + // in some implementations) + wxMDIParentFrame *GetMDIParent() const { return m_mdiParent; } + + // Synonym for GetMDIParent(), was used in some other ports + wxMDIParentFrame *GetMDIParentFrame() const { return GetMDIParent(); } + + + // in most ports MDI children frames are not really top-level, the only + // exception are the Mac ports in which MDI children are just normal top + // level windows too + virtual bool IsTopLevel() const { return false; } + + // In all ports keyboard navigation must stop at MDI child frame level and + // can't cross its boundary. Indicate this by overriding this function to + // return true. + virtual bool IsTopNavigationDomain() const { return true; } + + // Raising any frame is supposed to show it but wxFrame Raise() + // implementation doesn't work for MDI child frames in most forms so + // forward this to Activate() which serves the same purpose by default. + virtual void Raise() { Activate(); } + +protected: + wxMDIParentFrame *m_mdiParent; +}; + +// ---------------------------------------------------------------------------- +// wxTDIChildFrame: child frame used by TDI implementations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTDIChildFrame : public wxMDIChildFrameBase +{ +public: + // override wxFrame methods for this non top-level window + +#if wxUSE_STATUSBAR + // no status bars + // + // TODO: MDI children should have their own status bars, why not? + virtual wxStatusBar* CreateStatusBar(int WXUNUSED(number) = 1, + long WXUNUSED(style) = 1, + wxWindowID WXUNUSED(id) = 1, + const wxString& WXUNUSED(name) + = wxEmptyString) + { return NULL; } + + virtual wxStatusBar *GetStatusBar() const + { return NULL; } + virtual void SetStatusText(const wxString &WXUNUSED(text), + int WXUNUSED(number)=0) + { } + virtual void SetStatusWidths(int WXUNUSED(n), + const int WXUNUSED(widths)[]) + { } +#endif // wxUSE_STATUSBAR + +#if wxUSE_TOOLBAR + // no toolbar + // + // TODO: again, it should be possible to have tool bars + virtual wxToolBar *CreateToolBar(long WXUNUSED(style), + wxWindowID WXUNUSED(id), + const wxString& WXUNUSED(name)) + { return NULL; } + virtual wxToolBar *GetToolBar() const { return NULL; } +#endif // wxUSE_TOOLBAR + + // no icon + virtual void SetIcons(const wxIconBundle& WXUNUSED(icons)) { } + + // title is used as the tab label + virtual wxString GetTitle() const { return m_title; } + virtual void SetTitle(const wxString& title) = 0; + + // no maximize etc + virtual void Maximize(bool WXUNUSED(maximize) = true) { } + virtual bool IsMaximized() const { return true; } + virtual bool IsAlwaysMaximized() const { return true; } + virtual void Iconize(bool WXUNUSED(iconize) = true) { } + virtual bool IsIconized() const { return false; } + virtual void Restore() { } + + virtual bool ShowFullScreen(bool WXUNUSED(show), + long WXUNUSED(style)) { return false; } + virtual bool IsFullScreen() const { return false; } + + + // we need to override these functions to ensure that a child window is + // created even though we derive from wxFrame -- basically we make it + // behave as just a wxWindow by short-circuiting wxTLW changes to the base + // class behaviour + + virtual void AddChild(wxWindowBase *child) { wxWindow::AddChild(child); } + + virtual bool Destroy() { return wxWindow::Destroy(); } + + // extra platform-specific hacks +#ifdef __WXMSW__ + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const + { + return wxWindow::MSWGetStyle(flags, exstyle); + } + + virtual WXHWND MSWGetParent() const + { + return wxWindow::MSWGetParent(); + } + + WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) + { + return wxWindow::MSWWindowProc(message, wParam, lParam); + } +#endif // __WXMSW__ + +protected: + virtual void DoGetSize(int *width, int *height) const + { + wxWindow::DoGetSize(width, height); + } + + virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags) + { + wxWindow::DoSetSize(x, y, width, height, sizeFlags); + } + + virtual void DoGetClientSize(int *width, int *height) const + { + wxWindow::DoGetClientSize(width, height); + } + + virtual void DoSetClientSize(int width, int height) + { + wxWindow::DoSetClientSize(width, height); + } + + virtual void DoMoveWindow(int x, int y, int width, int height) + { + wxWindow::DoMoveWindow(x, y, width, height); + } + + // no size hints + virtual void DoSetSizeHints(int WXUNUSED(minW), int WXUNUSED(minH), + int WXUNUSED(maxW), int WXUNUSED(maxH), + int WXUNUSED(incW), int WXUNUSED(incH)) { } + + wxString m_title; +}; + +// ---------------------------------------------------------------------------- +// wxMDIClientWindowBase: child of parent frame, parent of children frames +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIClientWindowBase : public wxWindow +{ +public: + /* + The derived class must provide the default ctor only (CreateClient() + will be called later). + */ + + // Can be overridden in the derived classes but the base class version must + // be usually called first to really create the client window. + virtual bool CreateClient(wxMDIParentFrame *parent, + long style = wxVSCROLL | wxHSCROLL) = 0; +}; + +// ---------------------------------------------------------------------------- +// Include the port-specific implementation of the base classes defined above +// ---------------------------------------------------------------------------- + +// wxUSE_GENERIC_MDI_AS_NATIVE may be predefined to force the generic MDI +// implementation use even on the platforms which usually don't use it +// +// notice that generic MDI can still be used without this, but you would need +// to explicitly use wxGenericMDIXXX classes in your code (and currently also +// add src/generic/mdig.cpp to your build as it's not compiled in if generic +// MDI is not used by default -- but this may change later...) +#ifndef wxUSE_GENERIC_MDI_AS_NATIVE + // wxUniv always uses the generic MDI implementation and so do the ports + // without native version (although wxCocoa seems to have one -- but it's + // probably not functional?) + #if defined(__WXCOCOA__) || \ + defined(__WXMOTIF__) || \ + defined(__WXPM__) || \ + defined(__WXUNIVERSAL__) + #define wxUSE_GENERIC_MDI_AS_NATIVE 1 + #else + #define wxUSE_GENERIC_MDI_AS_NATIVE 0 + #endif +#endif // wxUSE_GENERIC_MDI_AS_NATIVE + +#if wxUSE_GENERIC_MDI_AS_NATIVE + #include "wx/generic/mdig.h" +#elif defined(__WXMSW__) + #include "wx/msw/mdi.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/mdi.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/mdi.h" +#elif defined(__WXMAC__) + #include "wx/osx/mdi.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/mdi.h" +#endif + +inline wxMDIClientWindow *wxMDIParentFrameBase::OnCreateClient() +{ + return new wxMDIClientWindow; +} + +inline bool wxMDIParentFrameBase::TryBefore(wxEvent& event) +{ + // Menu (and toolbar) events should be sent to the active child frame + // first, if any. + if ( event.GetEventType() == wxEVT_MENU || + event.GetEventType() == wxEVT_UPDATE_UI ) + { + wxMDIChildFrame * const child = GetActiveChild(); + if ( child ) + { + // However avoid sending the event back to the child if it's + // currently being propagated to us from it. + wxWindow* const + from = static_cast<wxWindow*>(event.GetPropagatedFrom()); + if ( !from || !from->IsDescendant(child) ) + { + if ( child->ProcessWindowEventLocally(event) ) + return true; + } + } + } + + return wxFrame::TryBefore(event); +} + +#endif // wxUSE_MDI + +#endif // _WX_MDI_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/mediactrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mediactrl.h new file mode 100644 index 0000000000..4d0fd7b0f1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mediactrl.h @@ -0,0 +1,403 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/mediactrl.h +// Purpose: wxMediaCtrl class +// Author: Ryan Norton <wxprojects@comcast.net> +// Modified by: +// Created: 11/07/04 +// Copyright: (c) Ryan Norton +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// Definitions +// ============================================================================ + +// ---------------------------------------------------------------------------- +// Header guard +// ---------------------------------------------------------------------------- +#ifndef _WX_MEDIACTRL_H_ +#define _WX_MEDIACTRL_H_ + +// ---------------------------------------------------------------------------- +// Pre-compiled header stuff +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +// ---------------------------------------------------------------------------- +// Compilation guard +// ---------------------------------------------------------------------------- + +#if wxUSE_MEDIACTRL + +// ---------------------------------------------------------------------------- +// Includes +// ---------------------------------------------------------------------------- + +#include "wx/control.h" +#include "wx/uri.h" + +// ============================================================================ +// Declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// +// Enumerations +// +// ---------------------------------------------------------------------------- + +enum wxMediaState +{ + wxMEDIASTATE_STOPPED, + wxMEDIASTATE_PAUSED, + wxMEDIASTATE_PLAYING +}; + +enum wxMediaCtrlPlayerControls +{ + wxMEDIACTRLPLAYERCONTROLS_NONE = 0, + //Step controls like fastforward, step one frame etc. + wxMEDIACTRLPLAYERCONTROLS_STEP = 1 << 0, + //Volume controls like the speaker icon, volume slider, etc. + wxMEDIACTRLPLAYERCONTROLS_VOLUME = 1 << 1, + wxMEDIACTRLPLAYERCONTROLS_DEFAULT = + wxMEDIACTRLPLAYERCONTROLS_STEP | + wxMEDIACTRLPLAYERCONTROLS_VOLUME +}; + +#define wxMEDIABACKEND_DIRECTSHOW wxT("wxAMMediaBackend") +#define wxMEDIABACKEND_MCI wxT("wxMCIMediaBackend") +#define wxMEDIABACKEND_QUICKTIME wxT("wxQTMediaBackend") +#define wxMEDIABACKEND_GSTREAMER wxT("wxGStreamerMediaBackend") +#define wxMEDIABACKEND_REALPLAYER wxT("wxRealPlayerMediaBackend") +#define wxMEDIABACKEND_WMP10 wxT("wxWMP10MediaBackend") + +// ---------------------------------------------------------------------------- +// +// wxMediaEvent +// +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_MEDIA wxMediaEvent : public wxNotifyEvent +{ +public: + // ------------------------------------------------------------------------ + // wxMediaEvent Constructor + // + // Normal constructor, much the same as wxNotifyEvent + // ------------------------------------------------------------------------ + wxMediaEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) + : wxNotifyEvent(commandType, winid) + { } + + // ------------------------------------------------------------------------ + // wxMediaEvent Copy Constructor + // + // Normal copy constructor, much the same as wxNotifyEvent + // ------------------------------------------------------------------------ + wxMediaEvent(const wxMediaEvent &clone) + : wxNotifyEvent(clone) + { } + + // ------------------------------------------------------------------------ + // wxMediaEvent::Clone + // + // Allocates a copy of this object. + // Required for wxEvtHandler::AddPendingEvent + // ------------------------------------------------------------------------ + virtual wxEvent *Clone() const + { return new wxMediaEvent(*this); } + + + // Put this class on wxWidget's RTTI table + DECLARE_DYNAMIC_CLASS(wxMediaEvent) +}; + +// ---------------------------------------------------------------------------- +// +// wxMediaCtrl +// +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_MEDIA wxMediaCtrl : public wxControl +{ +public: + wxMediaCtrl() : m_imp(NULL), m_bLoaded(false) + { } + + wxMediaCtrl(wxWindow* parent, wxWindowID winid, + const wxString& fileName = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& szBackend = wxEmptyString, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxT("mediaCtrl")) + : m_imp(NULL), m_bLoaded(false) + { Create(parent, winid, fileName, pos, size, style, + szBackend, validator, name); } + + wxMediaCtrl(wxWindow* parent, wxWindowID winid, + const wxURI& location, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& szBackend = wxEmptyString, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxT("mediaCtrl")) + : m_imp(NULL), m_bLoaded(false) + { Create(parent, winid, location, pos, size, style, + szBackend, validator, name); } + + virtual ~wxMediaCtrl(); + + bool Create(wxWindow* parent, wxWindowID winid, + const wxString& fileName = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& szBackend = wxEmptyString, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxT("mediaCtrl")); + + bool Create(wxWindow* parent, wxWindowID winid, + const wxURI& location, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& szBackend = wxEmptyString, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxT("mediaCtrl")); + + bool DoCreate(const wxClassInfo* instance, + wxWindow* parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxT("mediaCtrl")); + + bool Play(); + bool Pause(); + bool Stop(); + + bool Load(const wxString& fileName); + + wxMediaState GetState(); + + wxFileOffset Seek(wxFileOffset where, wxSeekMode mode = wxFromStart); + wxFileOffset Tell(); //FIXME: This should be const + wxFileOffset Length(); //FIXME: This should be const + + double GetPlaybackRate(); //All but MCI & GStreamer + bool SetPlaybackRate(double dRate); //All but MCI & GStreamer + + bool Load(const wxURI& location); + bool Load(const wxURI& location, const wxURI& proxy); + + wxFileOffset GetDownloadProgress(); // DirectShow only + wxFileOffset GetDownloadTotal(); // DirectShow only + + double GetVolume(); + bool SetVolume(double dVolume); + + bool ShowPlayerControls( + wxMediaCtrlPlayerControls flags = wxMEDIACTRLPLAYERCONTROLS_DEFAULT); + + //helpers for the wxPython people + bool LoadURI(const wxString& fileName) + { return Load(wxURI(fileName)); } + bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy) + { return Load(wxURI(fileName), wxURI(proxy)); } + +protected: + static const wxClassInfo* NextBackend(wxClassInfo::const_iterator* it); + + void OnMediaFinished(wxMediaEvent& evt); + virtual void DoMoveWindow(int x, int y, int w, int h); + wxSize DoGetBestSize() const; + + //FIXME: This is nasty... find a better way to work around + //inheritance issues +#if defined(__WXOSX_CARBON__) + virtual void MacVisibilityChanged(); +#endif +#if defined(__WXOSX_CARBON__) || defined(__WXCOCOA__) + friend class wxQTMediaBackend; +#endif + class wxMediaBackend* m_imp; + bool m_bLoaded; + + DECLARE_DYNAMIC_CLASS(wxMediaCtrl) +}; + +// ---------------------------------------------------------------------------- +// +// wxMediaBackend +// +// Derive from this and use standard wxWidgets RTTI +// (DECLARE_DYNAMIC_CLASS and IMPLEMENT_CLASS) to make a backend +// for wxMediaCtrl. Backends are searched alphabetically - +// the one with the earliest letter is tried first. +// +// Note that this is currently not API or ABI compatible - +// so statically link or make the client compile on-site. +// +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_MEDIA wxMediaBackend : public wxObject +{ +public: + wxMediaBackend() + { } + + virtual ~wxMediaBackend(); + + virtual bool CreateControl(wxControl* WXUNUSED(ctrl), + wxWindow* WXUNUSED(parent), + wxWindowID WXUNUSED(winid), + const wxPoint& WXUNUSED(pos), + const wxSize& WXUNUSED(size), + long WXUNUSED(style), + const wxValidator& WXUNUSED(validator), + const wxString& WXUNUSED(name)) + { return false; } + + virtual bool Play() + { return false; } + virtual bool Pause() + { return false; } + virtual bool Stop() + { return false; } + + virtual bool Load(const wxString& WXUNUSED(fileName)) + { return false; } + virtual bool Load(const wxURI& WXUNUSED(location)) + { return false; } + + virtual bool SetPosition(wxLongLong WXUNUSED(where)) + { return 0; } + virtual wxLongLong GetPosition() + { return 0; } + virtual wxLongLong GetDuration() + { return 0; } + + virtual void Move(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(w), int WXUNUSED(h)) + { } + virtual wxSize GetVideoSize() const + { return wxSize(0,0); } + + virtual double GetPlaybackRate() + { return 0.0; } + virtual bool SetPlaybackRate(double WXUNUSED(dRate)) + { return false; } + + virtual wxMediaState GetState() + { return wxMEDIASTATE_STOPPED; } + + virtual double GetVolume() + { return 0.0; } + virtual bool SetVolume(double WXUNUSED(dVolume)) + { return false; } + + virtual bool Load(const wxURI& WXUNUSED(location), + const wxURI& WXUNUSED(proxy)) + { return false; } + + virtual bool ShowPlayerControls( + wxMediaCtrlPlayerControls WXUNUSED(flags)) + { return false; } + virtual bool IsInterfaceShown() + { return false; } + + virtual wxLongLong GetDownloadProgress() + { return 0; } + virtual wxLongLong GetDownloadTotal() + { return 0; } + + virtual void MacVisibilityChanged() + { } + virtual void RESERVED9() {} + + DECLARE_DYNAMIC_CLASS(wxMediaBackend) +}; + + +//Our events +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_FINISHED, wxMediaEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_STOP, wxMediaEvent ); + +//Function type(s) our events need +typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&); + +#define wxMediaEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxMediaEventFunction, func) + +//Macro for usage with message maps +#define EVT_MEDIA_FINISHED(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), +#define EVT_MEDIA_STOP(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STOP, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_LOADED, wxMediaEvent ); +#define EVT_MEDIA_LOADED(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_LOADED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_STATECHANGED, wxMediaEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_PLAY, wxMediaEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_PAUSE, wxMediaEvent ); +#define EVT_MEDIA_STATECHANGED(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STATECHANGED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), +#define EVT_MEDIA_PLAY(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PLAY, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), +#define EVT_MEDIA_PAUSE(winid, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PAUSE, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), + +// ---------------------------------------------------------------------------- +// common backend base class used by many other backends +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_MEDIA wxMediaBackendCommonBase : public wxMediaBackend +{ +public: + // add a pending wxMediaEvent of the given type + void QueueEvent(wxEventType evtType); + + // notify that the movie playback is finished + void QueueFinishEvent() + { + QueueEvent(wxEVT_MEDIA_STATECHANGED); + QueueEvent(wxEVT_MEDIA_FINISHED); + } + + // send the stop event and return true if it hasn't been vetoed + bool SendStopEvent(); + + // Queue pause event + void QueuePlayEvent(); + + // Queue pause event + void QueuePauseEvent(); + + // Queue stop event (no veto) + void QueueStopEvent(); + +protected: + // call this when the movie size has changed but not because it has just + // been loaded (in this case, call NotifyMovieLoaded() below) + void NotifyMovieSizeChanged(); + + // call this when the movie is fully loaded + void NotifyMovieLoaded(); + + + wxMediaCtrl *m_ctrl; // parent control +}; + +// ---------------------------------------------------------------------------- +// End compilation guard +// ---------------------------------------------------------------------------- +#endif // wxUSE_MEDIACTRL + +// ---------------------------------------------------------------------------- +// End header guard and header itself +// ---------------------------------------------------------------------------- +#endif // _WX_MEDIACTRL_H_ + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/memconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/memconf.h new file mode 100644 index 0000000000..3dbec634e1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/memconf.h @@ -0,0 +1,53 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/memconf.h +// Purpose: wxMemoryConfig class: a wxConfigBase implementation which only +// stores the settings in memory (thus they are lost when the +// program terminates) +// Author: Vadim Zeitlin +// Modified by: +// Created: 22.01.00 +// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +/* + * NB: I don't see how this class may possibly be useful to the application + * program (as the settings are lost on program termination), but it is + * handy to have it inside wxWidgets. So for now let's say that this class + * is private and should only be used by wxWidgets itself - this might + * change in the future. + */ + +#ifndef _WX_MEMCONF_H_ +#define _WX_MEMCONF_H_ + +#if wxUSE_CONFIG + +#include "wx/fileconf.h" // the base class + +// ---------------------------------------------------------------------------- +// wxMemoryConfig: a config class which stores settings in non-persistent way +// ---------------------------------------------------------------------------- + +// notice that we inherit from wxFileConfig which already stores its data in +// memory and just disable file reading/writing - this is probably not optimal +// and might be changed in future as well (this class will always deriev from +// wxConfigBase though) +class wxMemoryConfig : public wxFileConfig +{ +public: + // default (and only) ctor + wxMemoryConfig() : wxFileConfig(wxEmptyString, // default app name + wxEmptyString, // default vendor name + wxEmptyString, // no local config file + wxEmptyString, // no system config file + 0) // don't use any files + { + } + + wxDECLARE_NO_COPY_CLASS(wxMemoryConfig); +}; + +#endif // wxUSE_CONFIG + +#endif // _WX_MEMCONF_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/memory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/memory.h new file mode 100644 index 0000000000..834ae4efd6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/memory.h @@ -0,0 +1,370 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/memory.h +// Purpose: Memory operations +// Author: Arthur Seaton, Julian Smart +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MEMORY_H_ +#define _WX_MEMORY_H_ + +#include "wx/defs.h" +#include "wx/string.h" +#include "wx/msgout.h" + +#if wxUSE_MEMORY_TRACING || wxUSE_DEBUG_CONTEXT + +#include <stddef.h> + +WXDLLIMPEXP_BASE void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool isVect = false); +WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = false); + +//********************************************************************************** +/* + The global operator new used for everything apart from getting + dynamic storage within this function itself. +*/ + +// We'll only do malloc and free for the moment: leave the interesting +// stuff for the wxObject versions. + + +#if wxUSE_GLOBAL_MEMORY_OPERATORS + +// Undefine temporarily (new is #defined in object.h) because we want to +// declare some new operators. +#ifdef new + #undef new +#endif + +#if defined(__SUNCC__) + #define wxUSE_ARRAY_MEMORY_OPERATORS 0 +#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) + #define wxUSE_ARRAY_MEMORY_OPERATORS 1 +#elif defined (__SGI_CC_) + // only supported by -n32 compilers + #ifndef __EDG_ABI_COMPATIBILITY_VERSION + #define wxUSE_ARRAY_MEMORY_OPERATORS 0 + #endif +#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) + #define wxUSE_ARRAY_MEMORY_OPERATORS 1 +#else + // ::operator new[] is a recent C++ feature, so assume it's not supported + #define wxUSE_ARRAY_MEMORY_OPERATORS 0 +#endif + +// devik 2000-8-29: All new/delete ops are now inline because they can't +// be marked as dllexport/dllimport. It then leads to weird bugs when +// used on MSW as DLL +#if defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)) +inline void * operator new (size_t size, wxChar * fileName, int lineNum) +{ + return wxDebugAlloc(size, fileName, lineNum, false, false); +} + +inline void * operator new (size_t size) +{ + return wxDebugAlloc(size, NULL, 0, false); +} + +inline void operator delete (void * buf) +{ + wxDebugFree(buf, false); +} + +#if wxUSE_ARRAY_MEMORY_OPERATORS +inline void * operator new[] (size_t size) +{ + return wxDebugAlloc(size, NULL, 0, false, true); +} + +inline void * operator new[] (size_t size, wxChar * fileName, int lineNum) +{ + return wxDebugAlloc(size, fileName, lineNum, false, true); +} + +inline void operator delete[] (void * buf) +{ + wxDebugFree(buf, true); +} +#endif // wxUSE_ARRAY_MEMORY_OPERATORS + +#else + +void * operator new (size_t size, wxChar * fileName, int lineNum); + +void * operator new (size_t size); + +void operator delete (void * buf); + +#if wxUSE_ARRAY_MEMORY_OPERATORS +void * operator new[] (size_t size); + +void * operator new[] (size_t size, wxChar * fileName, int lineNum); + +void operator delete[] (void * buf); +#endif // wxUSE_ARRAY_MEMORY_OPERATORS +#endif // defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)) + +// VC++ 6.0 +#if ( defined(__VISUALC__) && (__VISUALC__ >= 1200) ) +inline void operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */) +{ + wxDebugFree(pData, false); +} +inline void operator delete[](void* pData, wxChar* /* fileName */, int /* lineNum */) +{ + wxDebugFree(pData, true); +} +#endif // __VISUALC__>=1200 +#endif // wxUSE_GLOBAL_MEMORY_OPERATORS + +//********************************************************************************** + +typedef unsigned int wxMarkerType; + +/* + Define the struct which will be placed at the start of all dynamically + allocated memory. +*/ + +class WXDLLIMPEXP_BASE wxMemStruct { + +friend class WXDLLIMPEXP_FWD_BASE wxDebugContext; // access to the m_next pointer for list traversal. + +public: +public: + int AssertList (); + + size_t RequestSize () { return m_reqSize; } + wxMarkerType Marker () { return m_firstMarker; } + + // When an object is deleted we set the id slot to a specific value. + inline void SetDeleted (); + inline int IsDeleted (); + + int Append (); + int Unlink (); + + // Used to determine if the object is really a wxMemStruct. + // Not a foolproof test by any means, but better than none I hope! + int AssertIt (); + + // Do all validation on a node. + int ValidateNode (); + + // Check the integrity of a node and of the list, node by node. + int CheckBlock (); + int CheckAllPrevious (); + + // Print a single node. + void PrintNode (); + + // Called when the memory linking functions get an error. + void ErrorMsg (const char *); + void ErrorMsg (); + + inline void *GetActualData(void) const { return m_actualData; } + + void Dump(void); + +public: + // Check for underwriting. There are 2 of these checks. This one + // inside the struct and another right after the struct. + wxMarkerType m_firstMarker; + + // File name and line number are from cpp. + wxChar* m_fileName; + int m_lineNum; + + // The amount of memory requested by the caller. + size_t m_reqSize; + + // Used to try to verify that we really are dealing with an object + // of the required class. Can be 1 of 2 values these indicating a valid + // wxMemStruct object, or a deleted wxMemStruct object. + wxMarkerType m_id; + + wxMemStruct * m_prev; + wxMemStruct * m_next; + + void * m_actualData; + bool m_isObject; +}; + + +typedef void (wxMemStruct::*PmSFV) (); + +// Type of the app function that can be installed and called at wxWidgets shutdown +// (after all other registered files with global destructors have been closed down). +typedef void (*wxShutdownNotifyFunction)(); + +/* + Debugging class. This will only have a single instance, but it's + a reasonable way to keep everything together and to make this + available for change if needed by someone else. + A lot of this stuff would be better off within the wxMemStruct class, but + it's stuff which we need to access at times when there is no wxMemStruct + object so we use this class instead. Think of it as a collection of + globals which have to do with the wxMemStruct class. +*/ + +class WXDLLIMPEXP_BASE wxDebugContext { + +protected: + // Used to set alignment for markers. + static size_t CalcAlignment (); + + // Returns the amount of padding needed after something of the given + // size. This is so that when we cast pointers backwards and forwards + // the pointer value will be valid for a wxMarkerType. + static size_t GetPadding (const size_t size) ; + + // Traverse the list. + static void TraverseList (PmSFV, wxMemStruct *from = NULL); + + static int debugLevel; + static bool debugOn; + + static int m_balign; // byte alignment + static int m_balignmask; // mask for performing byte alignment +public: + // Set a checkpoint to dump only the memory from + // a given point + static wxMemStruct *checkPoint; + + wxDebugContext(void); + ~wxDebugContext(void); + + static int GetLevel(void) { return debugLevel; } + static void SetLevel(int level) { debugLevel = level; } + + static bool GetDebugMode(void) { return debugOn; } + static void SetDebugMode(bool flag) { debugOn = flag; } + + static void SetCheckpoint(bool all = false); + static wxMemStruct *GetCheckpoint(void) { return checkPoint; } + + // Calculated from the request size and any padding needed + // before the final marker. + static size_t PaddedSize (const size_t reqSize); + + // Calc the total amount of space we need from the system + // to satisfy a caller request. This includes all padding. + static size_t TotSize (const size_t reqSize); + + // Return valid pointers to offsets within the allocated memory. + static char * StructPos (const char * buf); + static char * MidMarkerPos (const char * buf); + static char * CallerMemPos (const char * buf); + static char * EndMarkerPos (const char * buf, const size_t size); + + // Given a pointer to the start of the caller requested area + // return a pointer to the start of the entire alloc\'d buffer. + static char * StartPos (const char * caller); + + // Access to the list. + static wxMemStruct * GetHead () { return m_head; } + static wxMemStruct * GetTail () { return m_tail; } + + // Set the list sentinals. + static wxMemStruct * SetHead (wxMemStruct * st) { return (m_head = st); } + static wxMemStruct * SetTail (wxMemStruct * st) { return (m_tail = st); } + + // If this is set then every new operation checks the validity + // of the all previous nodes in the list. + static bool GetCheckPrevious () { return m_checkPrevious; } + static void SetCheckPrevious (bool value) { m_checkPrevious = value; } + + // Checks all nodes, or all nodes if checkAll is true + static int Check(bool checkAll = false); + + // Print out the list of wxMemStruct nodes. + static bool PrintList(void); + + // Dump objects + static bool Dump(void); + + // Print statistics + static bool PrintStatistics(bool detailed = true); + + // Print out the classes in the application. + static bool PrintClasses(void); + + // Count the number of non-wxDebugContext-related objects + // that are outstanding + static int CountObjectsLeft(bool sinceCheckpoint = false); + + // This function is used to output the dump + static void OutputDumpLine(const wxChar *szFormat, ...); + + static void SetShutdownNotifyFunction(wxShutdownNotifyFunction shutdownFn); + +private: + // Store these here to allow access to the list without + // needing to have a wxMemStruct object. + static wxMemStruct* m_head; + static wxMemStruct* m_tail; + + // Set to false if we're not checking all previous nodes when + // we do a new. Set to true when we are. + static bool m_checkPrevious; + + // Holds a pointer to an optional application function to call at shutdown. + static wxShutdownNotifyFunction sm_shutdownFn; + + // Have to access our shutdown hook + friend class wxDebugContextDumpDelayCounter; +}; + +// Final cleanup (e.g. deleting the log object and doing memory leak checking) +// will be delayed until all wxDebugContextDumpDelayCounter objects have been +// destructed. Adding one wxDebugContextDumpDelayCounter per file will delay +// memory leak checking until after destructing all global objects. + +class WXDLLIMPEXP_BASE wxDebugContextDumpDelayCounter +{ +public: + wxDebugContextDumpDelayCounter(); + ~wxDebugContextDumpDelayCounter(); + +private: + void DoDump(); + static int sm_count; +}; + +// make leak dump after all globals have been destructed +static wxDebugContextDumpDelayCounter wxDebugContextDumpDelayCounter_File; +#define WXDEBUG_DUMPDELAYCOUNTER \ + static wxDebugContextDumpDelayCounter wxDebugContextDumpDelayCounter_Extra; + +// Output a debug message, in a system dependent fashion. +void WXDLLIMPEXP_BASE wxTrace(const wxChar *fmt ...) WX_ATTRIBUTE_PRINTF_1; +void WXDLLIMPEXP_BASE wxTraceLevel(int level, const wxChar *fmt ...) WX_ATTRIBUTE_PRINTF_2; + +#define WXTRACE wxTrace +#define WXTRACELEVEL wxTraceLevel + +#else // wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT + +#define WXDEBUG_DUMPDELAYCOUNTER + +// Borland C++ Builder 6 seems to have troubles with inline functions (see bug +// 819700) +#if 0 + inline void wxTrace(const wxChar *WXUNUSED(fmt)) {} + inline void wxTraceLevel(int WXUNUSED(level), const wxChar *WXUNUSED(fmt)) {} +#else + #define wxTrace(fmt) + #define wxTraceLevel(l, fmt) +#endif + +#define WXTRACE true ? (void)0 : wxTrace +#define WXTRACELEVEL true ? (void)0 : wxTraceLevel + +#endif // wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT + +#endif // _WX_MEMORY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/memtext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/memtext.h new file mode 100644 index 0000000000..475e8fdc23 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/memtext.h @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/memtext.h +// Purpose: wxMemoryText allows to use wxTextBuffer without a file +// Created: 14.11.01 +// Author: Morten Hanssen +// Copyright: (c) 2001 Morten Hanssen +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MEMTEXT_H +#define _WX_MEMTEXT_H + +#include "wx/defs.h" + +// there is no separate setting for wxMemoryText, it's smallish anyhow +#if wxUSE_TEXTBUFFER + +// ---------------------------------------------------------------------------- +// wxMemoryText +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMemoryText : public wxTextBuffer +{ +public: + // Constructors. + wxMemoryText() { } + wxMemoryText(const wxString& name) : wxTextBuffer(name) { } + +protected: + virtual bool OnExists() const + { return false; } + + virtual bool OnOpen(const wxString & WXUNUSED(strBufferName), + wxTextBufferOpenMode WXUNUSED(OpenMode)) + { return true; } + + virtual bool OnClose() + { return true; } + + virtual bool OnRead(const wxMBConv& WXUNUSED(conv)) + { return true; } + + virtual bool OnWrite(wxTextFileType WXUNUSED(typeNew), + const wxMBConv& WXUNUSED(conv) = wxMBConvUTF8()) + { return true; } + +private: + wxDECLARE_NO_COPY_CLASS(wxMemoryText); +}; + +#endif // wxUSE_TEXTBUFFER + +#endif // _WX_MEMTEXT_H + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/menu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/menu.h new file mode 100644 index 0000000000..e4dedcf2dd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/menu.h @@ -0,0 +1,630 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/menu.h +// Purpose: wxMenu and wxMenuBar classes +// Author: Vadim Zeitlin +// Modified by: +// Created: 26.10.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MENU_H_BASE_ +#define _WX_MENU_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_MENUS + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/list.h" // for "template" list classes +#include "wx/window.h" // base class for wxMenuBar + +// also include this one to ensure compatibility with old code which only +// included wx/menu.h +#include "wx/menuitem.h" + +class WXDLLIMPEXP_FWD_CORE wxFrame; +class WXDLLIMPEXP_FWD_CORE wxMenu; +class WXDLLIMPEXP_FWD_CORE wxMenuBarBase; +class WXDLLIMPEXP_FWD_CORE wxMenuBar; +class WXDLLIMPEXP_FWD_CORE wxMenuItem; + +// pseudo template list classes +WX_DECLARE_EXPORTED_LIST(wxMenu, wxMenuList); +WX_DECLARE_EXPORTED_LIST(wxMenuItem, wxMenuItemList); + +// ---------------------------------------------------------------------------- +// wxMenu +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuBase : public wxEvtHandler +{ +public: + // create a menu + static wxMenu *New(const wxString& title = wxEmptyString, long style = 0); + + // ctors + wxMenuBase(const wxString& title, long style = 0) : m_title(title) + { Init(style); } + wxMenuBase(long style = 0) + { Init(style); } + + // dtor deletes all the menu items we own + virtual ~wxMenuBase(); + + // menu construction + // ----------------- + + // append any kind of item (normal/check/radio/separator) + wxMenuItem* Append(int itemid, + const wxString& text = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL) + { + return DoAppend(wxMenuItem::New((wxMenu *)this, itemid, text, help, kind)); + } + + // append a separator to the menu + wxMenuItem* AppendSeparator() { return Append(wxID_SEPARATOR); } + + // append a check item + wxMenuItem* AppendCheckItem(int itemid, + const wxString& text, + const wxString& help = wxEmptyString) + { + return Append(itemid, text, help, wxITEM_CHECK); + } + + // append a radio item + wxMenuItem* AppendRadioItem(int itemid, + const wxString& text, + const wxString& help = wxEmptyString) + { + return Append(itemid, text, help, wxITEM_RADIO); + } + + // append a submenu + wxMenuItem* AppendSubMenu(wxMenu *submenu, + const wxString& text, + const wxString& help = wxEmptyString) + { + return DoAppend(wxMenuItem::New((wxMenu *)this, wxID_ANY, text, help, + wxITEM_NORMAL, submenu)); + } + + // the most generic form of Append() - append anything + wxMenuItem* Append(wxMenuItem *item) { return DoAppend(item); } + + // insert a break in the menu (only works when appending the items, not + // inserting them) + virtual void Break() { } + + // insert an item before given position + wxMenuItem* Insert(size_t pos, wxMenuItem *item); + + // insert an item before given position + wxMenuItem* Insert(size_t pos, + int itemid, + const wxString& text = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL) + { + return Insert(pos, wxMenuItem::New((wxMenu *)this, itemid, text, help, kind)); + } + + // insert a separator + wxMenuItem* InsertSeparator(size_t pos) + { + return Insert(pos, wxMenuItem::New((wxMenu *)this, wxID_SEPARATOR)); + } + + // insert a check item + wxMenuItem* InsertCheckItem(size_t pos, + int itemid, + const wxString& text, + const wxString& help = wxEmptyString) + { + return Insert(pos, itemid, text, help, wxITEM_CHECK); + } + + // insert a radio item + wxMenuItem* InsertRadioItem(size_t pos, + int itemid, + const wxString& text, + const wxString& help = wxEmptyString) + { + return Insert(pos, itemid, text, help, wxITEM_RADIO); + } + + // insert a submenu + wxMenuItem* Insert(size_t pos, + int itemid, + const wxString& text, + wxMenu *submenu, + const wxString& help = wxEmptyString) + { + return Insert(pos, wxMenuItem::New((wxMenu *)this, itemid, text, help, + wxITEM_NORMAL, submenu)); + } + + // prepend an item to the menu + wxMenuItem* Prepend(wxMenuItem *item) + { + return Insert(0u, item); + } + + // prepend any item to the menu + wxMenuItem* Prepend(int itemid, + const wxString& text = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL) + { + return Insert(0u, itemid, text, help, kind); + } + + // prepend a separator + wxMenuItem* PrependSeparator() + { + return InsertSeparator(0u); + } + + // prepend a check item + wxMenuItem* PrependCheckItem(int itemid, + const wxString& text, + const wxString& help = wxEmptyString) + { + return InsertCheckItem(0u, itemid, text, help); + } + + // prepend a radio item + wxMenuItem* PrependRadioItem(int itemid, + const wxString& text, + const wxString& help = wxEmptyString) + { + return InsertRadioItem(0u, itemid, text, help); + } + + // prepend a submenu + wxMenuItem* Prepend(int itemid, + const wxString& text, + wxMenu *submenu, + const wxString& help = wxEmptyString) + { + return Insert(0u, itemid, text, submenu, help); + } + + // detach an item from the menu, but don't delete it so that it can be + // added back later (but if it's not, the caller is responsible for + // deleting it!) + wxMenuItem *Remove(int itemid) { return Remove(FindChildItem(itemid)); } + wxMenuItem *Remove(wxMenuItem *item); + + // delete an item from the menu (submenus are not destroyed by this + // function, see Destroy) + bool Delete(int itemid) { return Delete(FindChildItem(itemid)); } + bool Delete(wxMenuItem *item); + + // delete the item from menu and destroy it (if it's a submenu) + bool Destroy(int itemid) { return Destroy(FindChildItem(itemid)); } + bool Destroy(wxMenuItem *item); + + // menu items access + // ----------------- + + // get the items + size_t GetMenuItemCount() const { return m_items.GetCount(); } + + const wxMenuItemList& GetMenuItems() const { return m_items; } + wxMenuItemList& GetMenuItems() { return m_items; } + + // search + virtual int FindItem(const wxString& item) const; + wxMenuItem* FindItem(int itemid, wxMenu **menu = NULL) const; + + // find by position + wxMenuItem* FindItemByPosition(size_t position) const; + + // get/set items attributes + void Enable(int itemid, bool enable); + bool IsEnabled(int itemid) const; + + void Check(int itemid, bool check); + bool IsChecked(int itemid) const; + + void SetLabel(int itemid, const wxString& label); + wxString GetLabel(int itemid) const; + + // Returns the stripped label + wxString GetLabelText(int itemid) const { return wxMenuItem::GetLabelText(GetLabel(itemid)); } + + virtual void SetHelpString(int itemid, const wxString& helpString); + virtual wxString GetHelpString(int itemid) const; + + // misc accessors + // -------------- + + // the title + virtual void SetTitle(const wxString& title) { m_title = title; } + const wxString& GetTitle() const { return m_title; } + + // event handler + void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } + wxEvtHandler *GetEventHandler() const { return m_eventHandler; } + + // Invoking window: this is set by wxWindow::PopupMenu() before showing a + // popup menu and reset after it's hidden. Notice that you probably want to + // use GetWindow() below instead of GetInvokingWindow() as the latter only + // returns non-NULL for the top level menus + // + // NB: avoid calling SetInvokingWindow() directly if possible, use + // wxMenuInvokingWindowSetter class below instead + void SetInvokingWindow(wxWindow *win); + wxWindow *GetInvokingWindow() const { return m_invokingWindow; } + + // the window associated with this menu: this is the invoking window for + // popup menus or the top level window to which the menu bar is attached + // for menus which are part of a menu bar + wxWindow *GetWindow() const; + + // style + long GetStyle() const { return m_style; } + + // implementation helpers + // ---------------------- + + // Updates the UI for a menu and all submenus recursively. source is the + // object that has the update event handlers defined for it. If NULL, the + // menu or associated window will be used. + void UpdateUI(wxEvtHandler* source = NULL); + + // get the menu bar this menu is attached to (may be NULL, always NULL for + // popup menus). Traverse up the menu hierarchy to find it. + wxMenuBar *GetMenuBar() const; + + // called when the menu is attached/detached to/from a menu bar + virtual void Attach(wxMenuBarBase *menubar); + virtual void Detach(); + + // is the menu attached to a menu bar (or is it a popup one)? + bool IsAttached() const { return GetMenuBar() != NULL; } + + // set/get the parent of this menu + void SetParent(wxMenu *parent) { m_menuParent = parent; } + wxMenu *GetParent() const { return m_menuParent; } + + // implementation only from now on + // ------------------------------- + + // unlike FindItem(), this function doesn't recurse but only looks through + // our direct children and also may return the index of the found child if + // pos != NULL + wxMenuItem *FindChildItem(int itemid, size_t *pos = NULL) const; + + // called to generate a wxCommandEvent, return true if it was processed, + // false otherwise + // + // the checked parameter may have boolean value or -1 for uncheckable items + bool SendEvent(int itemid, int checked = -1); + + // compatibility: these functions are deprecated, use the new ones instead + // ----------------------------------------------------------------------- + + // use the versions taking wxItem_XXX now instead, they're more readable + // and allow adding the radio items as well + void Append(int itemid, + const wxString& text, + const wxString& help, + bool isCheckable) + { + Append(itemid, text, help, isCheckable ? wxITEM_CHECK : wxITEM_NORMAL); + } + + // use more readable and not requiring unused itemid AppendSubMenu() instead + wxMenuItem* Append(int itemid, + const wxString& text, + wxMenu *submenu, + const wxString& help = wxEmptyString) + { + return DoAppend(wxMenuItem::New((wxMenu *)this, itemid, text, help, + wxITEM_NORMAL, submenu)); + } + + void Insert(size_t pos, + int itemid, + const wxString& text, + const wxString& help, + bool isCheckable) + { + Insert(pos, itemid, text, help, isCheckable ? wxITEM_CHECK : wxITEM_NORMAL); + } + + void Prepend(int itemid, + const wxString& text, + const wxString& help, + bool isCheckable) + { + Insert(0u, itemid, text, help, isCheckable); + } + + static void LockAccels(bool locked) + { + ms_locked = locked; + } + +protected: + // virtuals to override in derived classes + // --------------------------------------- + + virtual wxMenuItem* DoAppend(wxMenuItem *item); + virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); + + virtual wxMenuItem *DoRemove(wxMenuItem *item); + virtual bool DoDelete(wxMenuItem *item); + virtual bool DoDestroy(wxMenuItem *item); + + // helpers + // ------- + + // common part of all ctors + void Init(long style); + + // associate the submenu with this menu + void AddSubMenu(wxMenu *submenu); + + wxMenuBar *m_menuBar; // menubar we belong to or NULL + wxMenu *m_menuParent; // parent menu or NULL + + wxString m_title; // the menu title or label + wxMenuItemList m_items; // the list of menu items + + wxWindow *m_invokingWindow; // for popup menus + + long m_style; // combination of wxMENU_XXX flags + + wxEvtHandler *m_eventHandler; // a pluggable in event handler + + static bool ms_locked; + + wxDECLARE_NO_COPY_CLASS(wxMenuBase); +}; + +#if wxUSE_EXTENDED_RTTI + +// ---------------------------------------------------------------------------- +// XTI accessor +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxMenuInfoHelper : public wxObject +{ +public: + wxMenuInfoHelper() { m_menu = NULL; } + virtual ~wxMenuInfoHelper() { } + + bool Create( wxMenu *menu, const wxString &title ) + { + m_menu = menu; + m_title = title; + return true; + } + + wxMenu* GetMenu() const { return m_menu; } + wxString GetTitle() const { return m_title; } + +private: + wxMenu *m_menu; + wxString m_title; + + DECLARE_DYNAMIC_CLASS(wxMenuInfoHelper) +}; + +WX_DECLARE_EXPORTED_LIST(wxMenuInfoHelper, wxMenuInfoHelperList ); + +#endif + +// ---------------------------------------------------------------------------- +// wxMenuBar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuBarBase : public wxWindow +{ +public: + // default ctor + wxMenuBarBase(); + + // dtor will delete all menus we own + virtual ~wxMenuBarBase(); + + // menu bar construction + // --------------------- + + // append a menu to the end of menubar, return true if ok + virtual bool Append(wxMenu *menu, const wxString& title); + + // insert a menu before the given position into the menubar, return true + // if inserted ok + virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title); + + // menu bar items access + // --------------------- + + // get the number of menus in the menu bar + size_t GetMenuCount() const { return m_menus.GetCount(); } + + // get the menu at given position + wxMenu *GetMenu(size_t pos) const; + + // replace the menu at given position with another one, returns the + // previous menu (which should be deleted by the caller) + virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); + + // delete the menu at given position from the menu bar, return the pointer + // to the menu (which should be deleted by the caller) + virtual wxMenu *Remove(size_t pos); + + // enable or disable a submenu + virtual void EnableTop(size_t pos, bool enable) = 0; + + // is the menu enabled? + virtual bool IsEnabledTop(size_t WXUNUSED(pos)) const { return true; } + + // get or change the label of the menu at given position + virtual void SetMenuLabel(size_t pos, const wxString& label) = 0; + virtual wxString GetMenuLabel(size_t pos) const = 0; + + // get the stripped label of the menu at given position + virtual wxString GetMenuLabelText(size_t pos) const { return wxMenuItem::GetLabelText(GetMenuLabel(pos)); } + + // item search + // ----------- + + // by menu and item names, returns wxNOT_FOUND if not found or id of the + // found item + virtual int FindMenuItem(const wxString& menu, const wxString& item) const; + + // find item by id (in any menu), returns NULL if not found + // + // if menu is !NULL, it will be filled with wxMenu this item belongs to + virtual wxMenuItem* FindItem(int itemid, wxMenu **menu = NULL) const; + + // find menu by its caption, return wxNOT_FOUND on failure + int FindMenu(const wxString& title) const; + + // item access + // ----------- + + // all these functions just use FindItem() and then call an appropriate + // method on it + // + // NB: under MSW, these methods can only be used after the menubar had + // been attached to the frame + + void Enable(int itemid, bool enable); + void Check(int itemid, bool check); + bool IsChecked(int itemid) const; + bool IsEnabled(int itemid) const; + virtual bool IsEnabled() const { return wxWindow::IsEnabled(); } + + void SetLabel(int itemid, const wxString &label); + wxString GetLabel(int itemid) const; + + void SetHelpString(int itemid, const wxString& helpString); + wxString GetHelpString(int itemid) const; + + // implementation helpers + + // get the frame we are attached to (may return NULL) + wxFrame *GetFrame() const { return m_menuBarFrame; } + + // returns true if we're attached to a frame + bool IsAttached() const { return GetFrame() != NULL; } + + // associate the menubar with the frame + virtual void Attach(wxFrame *frame); + + // called before deleting the menubar normally + virtual void Detach(); + + // need to override these ones to avoid virtual function hiding + virtual bool Enable(bool enable = true) { return wxWindow::Enable(enable); } + virtual void SetLabel(const wxString& s) { wxWindow::SetLabel(s); } + virtual wxString GetLabel() const { return wxWindow::GetLabel(); } + + // don't want menu bars to accept the focus by tabbing to them + virtual bool AcceptsFocusFromKeyboard() const { return false; } + + // update all menu item states in all menus + virtual void UpdateMenus(); + + virtual bool CanBeOutsideClientArea() const { return true; } + +#if wxUSE_EXTENDED_RTTI + // XTI helpers: + bool AppendMenuInfo( const wxMenuInfoHelper *info ) + { return Append( info->GetMenu(), info->GetTitle() ); } + const wxMenuInfoHelperList& GetMenuInfos() const; +#endif + +#if WXWIN_COMPATIBILITY_2_8 + // get or change the label of the menu at given position + // Deprecated in favour of SetMenuLabel + wxDEPRECATED( void SetLabelTop(size_t pos, const wxString& label) ); + // Deprecated in favour of GetMenuLabelText + wxDEPRECATED( wxString GetLabelTop(size_t pos) const ); +#endif + +protected: + // the list of all our menus + wxMenuList m_menus; + +#if wxUSE_EXTENDED_RTTI + // used by XTI + wxMenuInfoHelperList m_menuInfos; +#endif + + // the frame we are attached to (may be NULL) + wxFrame *m_menuBarFrame; + + wxDECLARE_NO_COPY_CLASS(wxMenuBarBase); +}; + +// ---------------------------------------------------------------------------- +// include the real class declaration +// ---------------------------------------------------------------------------- + +#ifdef wxUSE_BASE_CLASSES_ONLY + #define wxMenuItem wxMenuItemBase +#else // !wxUSE_BASE_CLASSES_ONLY +#if defined(__WXUNIVERSAL__) + #include "wx/univ/menu.h" +#elif defined(__WXMSW__) + #include "wx/msw/menu.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/menu.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/menu.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/menu.h" +#elif defined(__WXMAC__) + #include "wx/osx/menu.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/menu.h" +#elif defined(__WXPM__) + #include "wx/os2/menu.h" +#endif +#endif // wxUSE_BASE_CLASSES_ONLY/!wxUSE_BASE_CLASSES_ONLY + +// ---------------------------------------------------------------------------- +// Helper class used in the implementation only: sets the invoking window of +// the given menu in its ctor and resets it in dtor. +// ---------------------------------------------------------------------------- + +class wxMenuInvokingWindowSetter +{ +public: + // Ctor sets the invoking window for the given menu. + // + // The menu lifetime must be greater than that of this class. + wxMenuInvokingWindowSetter(wxMenu& menu, wxWindow *win) + : m_menu(menu) + { + menu.SetInvokingWindow(win); + } + + // Dtor resets the invoking window. + ~wxMenuInvokingWindowSetter() + { + m_menu.SetInvokingWindow(NULL); + } + +private: + wxMenu& m_menu; + + wxDECLARE_NO_COPY_CLASS(wxMenuInvokingWindowSetter); +}; + +#endif // wxUSE_MENUS + +#endif // _WX_MENU_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/menuitem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/menuitem.h new file mode 100644 index 0000000000..4eb80b7b5b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/menuitem.h @@ -0,0 +1,217 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/menuitem.h +// Purpose: wxMenuItem class +// Author: Vadim Zeitlin +// Modified by: +// Created: 25.10.99 +// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MENUITEM_H_BASE_ +#define _WX_MENUITEM_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_MENUS + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/object.h" // base class + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxAcceleratorEntry; +class WXDLLIMPEXP_FWD_CORE wxMenuItem; +class WXDLLIMPEXP_FWD_CORE wxMenu; + +// ---------------------------------------------------------------------------- +// wxMenuItem is an item in the menu which may be either a normal item, a sub +// menu or a separator +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuItemBase : public wxObject +{ +public: + // creation + static wxMenuItem *New(wxMenu *parentMenu = NULL, + int itemid = wxID_SEPARATOR, + const wxString& text = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL, + wxMenu *subMenu = NULL); + + // destruction: wxMenuItem will delete its submenu + virtual ~wxMenuItemBase(); + + // the menu we're in + wxMenu *GetMenu() const { return m_parentMenu; } + void SetMenu(wxMenu* menu) { m_parentMenu = menu; } + + // get/set id + void SetId(int itemid) { m_id = itemid; } + int GetId() const { return m_id; } + + // the item's text (or name) + // + // NB: the item's label includes the accelerators and mnemonics info (if + // any), i.e. it may contain '&' or '_' or "\t..." and thus is + // different from the item's text which only contains the text shown + // in the menu. This used to be called SetText. + virtual void SetItemLabel(const wxString& str); + + // return the item label including any mnemonics and accelerators. + // This used to be called GetText. + virtual wxString GetItemLabel() const { return m_text; } + + // return just the text of the item label, without any mnemonics + // This used to be called GetLabel. + virtual wxString GetItemLabelText() const { return GetLabelText(m_text); } + + // return just the text part of the given label (implemented in platform-specific code) + // This used to be called GetLabelFromText. + static wxString GetLabelText(const wxString& label); + + // what kind of menu item we are + wxItemKind GetKind() const { return m_kind; } + void SetKind(wxItemKind kind) { m_kind = kind; } + bool IsSeparator() const { return m_kind == wxITEM_SEPARATOR; } + + bool IsCheck() const { return m_kind == wxITEM_CHECK; } + bool IsRadio() const { return m_kind == wxITEM_RADIO; } + + virtual void SetCheckable(bool checkable) + { m_kind = checkable ? wxITEM_CHECK : wxITEM_NORMAL; } + + // Notice that this doesn't quite match SetCheckable(). + bool IsCheckable() const + { return m_kind == wxITEM_CHECK || m_kind == wxITEM_RADIO; } + + bool IsSubMenu() const { return m_subMenu != NULL; } + void SetSubMenu(wxMenu *menu) { m_subMenu = menu; } + wxMenu *GetSubMenu() const { return m_subMenu; } + + // state + virtual void Enable(bool enable = true) { m_isEnabled = enable; } + virtual bool IsEnabled() const { return m_isEnabled; } + + virtual void Check(bool check = true) { m_isChecked = check; } + virtual bool IsChecked() const { return m_isChecked; } + void Toggle() { Check(!m_isChecked); } + + // help string (displayed in the status bar by default) + void SetHelp(const wxString& str); + const wxString& GetHelp() const { return m_help; } + +#if wxUSE_ACCEL + // extract the accelerator from the given menu string, return NULL if none + // found + static wxAcceleratorEntry *GetAccelFromString(const wxString& label); + + // get our accelerator or NULL (caller must delete the pointer) + virtual wxAcceleratorEntry *GetAccel() const; + + // set the accel for this item - this may also be done indirectly with + // SetText() + virtual void SetAccel(wxAcceleratorEntry *accel); +#endif // wxUSE_ACCEL + +#if WXWIN_COMPATIBILITY_2_8 + // compatibility only, use new functions in the new code + wxDEPRECATED( void SetName(const wxString& str) ); + wxDEPRECATED( wxString GetName() const ); + + // Now use GetItemLabelText + wxDEPRECATED( wxString GetLabel() const ) ; + + // Now use GetItemLabel + wxDEPRECATED( const wxString& GetText() const ); + + // Now use GetLabelText to strip the accelerators + static wxDEPRECATED( wxString GetLabelFromText(const wxString& text) ); + + // Now use SetItemLabel + wxDEPRECATED( virtual void SetText(const wxString& str) ); +#endif // WXWIN_COMPATIBILITY_2_8 + + static wxMenuItem *New(wxMenu *parentMenu, + int itemid, + const wxString& text, + const wxString& help, + bool isCheckable, + wxMenu *subMenu = NULL) + { + return New(parentMenu, itemid, text, help, + isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu); + } + +protected: + wxWindowIDRef m_id; // numeric id of the item >= 0 or wxID_ANY or wxID_SEPARATOR + wxMenu *m_parentMenu, // the menu we belong to + *m_subMenu; // our sub menu or NULL + wxString m_text, // label of the item + m_help; // the help string for the item + wxItemKind m_kind; // separator/normal/check/radio item? + bool m_isChecked; // is checked? + bool m_isEnabled; // is enabled? + + // this ctor is for the derived classes only, we're never created directly + wxMenuItemBase(wxMenu *parentMenu = NULL, + int itemid = wxID_SEPARATOR, + const wxString& text = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL, + wxMenu *subMenu = NULL); + +private: + // and, if we have one ctor, compiler won't generate a default copy one, so + // declare them ourselves - but don't implement as they shouldn't be used + wxMenuItemBase(const wxMenuItemBase& item); + wxMenuItemBase& operator=(const wxMenuItemBase& item); +}; + +#if WXWIN_COMPATIBILITY_2_8 +inline void wxMenuItemBase::SetName(const wxString &str) + { SetItemLabel(str); } +inline wxString wxMenuItemBase::GetName() const + { return GetItemLabel(); } +inline wxString wxMenuItemBase::GetLabel() const + { return GetLabelText(m_text); } +inline const wxString& wxMenuItemBase::GetText() const { return m_text; } +inline void wxMenuItemBase::SetText(const wxString& text) { SetItemLabel(text); } +#endif // WXWIN_COMPATIBILITY_2_8 + +// ---------------------------------------------------------------------------- +// include the real class declaration +// ---------------------------------------------------------------------------- + +#ifdef wxUSE_BASE_CLASSES_ONLY + #define wxMenuItem wxMenuItemBase +#else // !wxUSE_BASE_CLASSES_ONLY +#if defined(__WXUNIVERSAL__) + #include "wx/univ/menuitem.h" +#elif defined(__WXMSW__) + #include "wx/msw/menuitem.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/menuitem.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/menuitem.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/menuitem.h" +#elif defined(__WXMAC__) + #include "wx/osx/menuitem.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/menuitem.h" +#elif defined(__WXPM__) + #include "wx/os2/menuitem.h" +#endif +#endif // wxUSE_BASE_CLASSES_ONLY/!wxUSE_BASE_CLASSES_ONLY + +#endif // wxUSE_MENUS + +#endif + // _WX_MENUITEM_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/convertible.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/convertible.h new file mode 100644 index 0000000000..4599937821 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/convertible.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/meta/convertible.h +// Purpose: Test if types are convertible +// Author: Arne Steinarson +// Created: 2008-01-10 +// Copyright: (c) 2008 Arne Steinarson +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_META_CONVERTIBLE_H_ +#define _WX_META_CONVERTIBLE_H_ + +// +// Introduce an extra class to make this header compilable with g++3.2 +// +template <class D, class B> +struct wxConvertibleTo_SizeHelper +{ + static char Match(B* pb); + static int Match(...); +}; + +// Helper to decide if an object of type D is convertible to type B (the test +// succeeds in particular when D derives from B) +template <class D, class B> +struct wxConvertibleTo +{ + enum + { + value = + sizeof(wxConvertibleTo_SizeHelper<D,B>::Match(static_cast<D*>(NULL))) + == + sizeof(char) + }; +}; + +#endif // _WX_META_CONVERTIBLE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/if.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/if.h new file mode 100644 index 0000000000..f6f3672fc7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/if.h @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/meta/if.h +// Purpose: declares wxIf<> metaprogramming construct +// Author: Vaclav Slavik +// Created: 2008-01-22 +// Copyright: (c) 2008 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_META_IF_H_ +#define _WX_META_IF_H_ + +#include "wx/defs.h" + +// NB: This code is intentionally written without partial templates +// specialization, because some older compilers (notably VC6) don't +// support it. + +namespace wxPrivate +{ + +template <bool Cond> +struct wxIfImpl + +// broken VC6 needs not just an incomplete template class declaration but a +// "skeleton" declaration of the specialized versions below as it apparently +// tries to look up the types in the generic template definition at some moment +// even though it ends up by using the correct specialization in the end -- but +// without this skeleton it doesn't recognize Result as a class at all below +#if defined(__VISUALC__) && !wxCHECK_VISUALC_VERSION(7) +{ + template<typename TTrue, typename TFalse> struct Result {}; +} +#endif // VC++ <= 6 +; + +// specialization for true: +template <> +struct wxIfImpl<true> +{ + template<typename TTrue, typename TFalse> struct Result + { + typedef TTrue value; + }; +}; + +// specialization for false: +template<> +struct wxIfImpl<false> +{ + template<typename TTrue, typename TFalse> struct Result + { + typedef TFalse value; + }; +}; + +} // namespace wxPrivate + +// wxIf<> template defines nested type "value" which is the same as +// TTrue if the condition Cond (boolean compile-time constant) was met and +// TFalse if it wasn't. +// +// See wxVector<T> in vector.h for usage example +template<bool Cond, typename TTrue, typename TFalse> +struct wxIf +{ + typedef typename wxPrivate::wxIfImpl<Cond> + ::template Result<TTrue, TFalse>::value + value; +}; + +#endif // _WX_META_IF_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/implicitconversion.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/implicitconversion.h new file mode 100644 index 0000000000..d596a6b248 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/implicitconversion.h @@ -0,0 +1,112 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/meta/implicitconversion.h +// Purpose: Determine resulting type from implicit conversion +// Author: Vaclav Slavik +// Created: 2010-10-22 +// Copyright: (c) 2010 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_META_IMPLICITCONVERSION_H_ +#define _WX_META_IMPLICITCONVERSION_H_ + +#include "wx/defs.h" +#include "wx/meta/if.h" + +// C++ hierarchy of data types is: +// +// Long double (highest) +// Double +// Float +// Unsigned long int +// Long int +// Unsigned int +// Int (lowest) +// +// Types lower in the hierarchy are converted into ones higher up if both are +// involved e.g. in arithmetic expressions. + +namespace wxPrivate +{ + +// Helper macro to define a constant inside a template class: it's needed +// because MSVC6 doesn't support initializing static integer members but the +// usual workaround of using enums instead doesn't work for Borland (at least +// in template classes). +#ifdef __VISUALC6__ + #define wxDEFINE_CLASS_INT_CONST(name, value) enum { name = value } +#else + #define wxDEFINE_CLASS_INT_CONST(name, value) static const int name = value +#endif + +template<typename T> +struct TypeHierarchy +{ + // consider unknown types (e.g. objects, pointers) to be of highest + // level, always convert to them if they occur + wxDEFINE_CLASS_INT_CONST( level, 9999 ); +}; + +#define WX_TYPE_HIERARCHY_LEVEL(level_num, type) \ + template<> struct TypeHierarchy<type> \ + { \ + wxDEFINE_CLASS_INT_CONST( level, level_num ); \ + } + +WX_TYPE_HIERARCHY_LEVEL( 1, char); +WX_TYPE_HIERARCHY_LEVEL( 2, unsigned char); +WX_TYPE_HIERARCHY_LEVEL( 3, short); +WX_TYPE_HIERARCHY_LEVEL( 4, unsigned short); +WX_TYPE_HIERARCHY_LEVEL( 5, int); +WX_TYPE_HIERARCHY_LEVEL( 6, unsigned int); +WX_TYPE_HIERARCHY_LEVEL( 7, long); +WX_TYPE_HIERARCHY_LEVEL( 8, unsigned long); +#ifdef wxLongLong_t +WX_TYPE_HIERARCHY_LEVEL( 9, wxLongLong_t); +WX_TYPE_HIERARCHY_LEVEL(10, wxULongLong_t); +#endif +WX_TYPE_HIERARCHY_LEVEL(11, float); +WX_TYPE_HIERARCHY_LEVEL(12, double); +WX_TYPE_HIERARCHY_LEVEL(13, long double); + +#if wxWCHAR_T_IS_REAL_TYPE + #if SIZEOF_WCHAR_T == SIZEOF_SHORT + template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<short> {}; + #elif SIZEOF_WCHAR_T == SIZEOF_INT + template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<int> {}; + #elif SIZEOF_WCHAR_T == SIZEOF_LONG + template<> struct TypeHierarchy<wchar_t> : public TypeHierarchy<long> {}; + #else + #error "weird wchar_t size, please update this code" + #endif +#endif + +#undef WX_TYPE_HIERARCHY_LEVEL + +} // namespace wxPrivate + +// Helper to determine resulting type of implicit conversion in +// an expression with two arithmetic types. +template<typename T1, typename T2> +struct wxImplicitConversionType +{ + typedef typename wxIf + < + // if T2 is "higher" type, convert to it + (int)(wxPrivate::TypeHierarchy<T1>::level) < (int)(wxPrivate::TypeHierarchy<T2>::level), + T2, + // otherwise use T1 + T1 + >::value + value; +}; + + +template<typename T1, typename T2, typename T3> +struct wxImplicitConversionType3 : public wxImplicitConversionType< + T1, + typename wxImplicitConversionType<T2,T3>::value> +{ +}; + +#endif // _WX_META_IMPLICITCONVERSION_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/int2type.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/int2type.h new file mode 100644 index 0000000000..7b8d5dc02c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/int2type.h @@ -0,0 +1,16 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/meta/int2type.h +// Purpose: Generate a unique type from a constant integer +// Author: Arne Steinarson +// Created: 2008-01-10 +// Copyright: (c) 2008 Arne Steinarson +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_META_INT2TYPE_H_ +#define _WX_META_INT2TYPE_H_ + +template <int N> +struct wxInt2Type { enum { value=N }; }; + +#endif // _WX_META_INT2TYPE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/movable.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/movable.h new file mode 100644 index 0000000000..e3a9f9e96c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/movable.h @@ -0,0 +1,44 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/meta/movable.h +// Purpose: Test if a type is movable using memmove() etc. +// Author: Vaclav Slavik +// Created: 2008-01-21 +// Copyright: (c) 2008 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_META_MOVABLE_H_ +#define _WX_META_MOVABLE_H_ + +#include "wx/meta/pod.h" +#include "wx/string.h" // for wxIsMovable<wxString> specialization + +// Helper to decide if an object of type T is "movable", i.e. if it can be +// copied to another memory location using memmove() or realloc() C functions. +// C++ only gurantees that POD types (including primitive types) are +// movable. +template<typename T> +struct wxIsMovable +{ + wxDEFINE_TEMPLATE_BOOL_VALUE(wxIsPod<T>::value); +}; + +// Macro to add wxIsMovable<T> specialization for given type that marks it +// as movable: +#define WX_DECLARE_TYPE_MOVABLE(type) \ + template<> struct wxIsMovable<type> \ + { \ + wxDEFINE_TEMPLATE_BOOL_VALUE(true); \ + }; + +// Our implementation of wxString is written in such way that it's safe to move +// it around (unless position cache is used which unfortunately breaks this). +// OTOH, we don't know anything about std::string. +// (NB: we don't put this into string.h and choose to include wx/string.h from +// here instead so that rarely-used wxIsMovable<T> code isn't included by +// everything) +#if !wxUSE_STD_STRING && !wxUSE_STRING_POS_CACHE +WX_DECLARE_TYPE_MOVABLE(wxString) +#endif + +#endif // _WX_META_MOVABLE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/pod.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/pod.h new file mode 100644 index 0000000000..b9dde13d65 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/pod.h @@ -0,0 +1,87 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/meta/pod.h +// Purpose: Test if a type is POD +// Author: Vaclav Slavik, Jaakko Salli +// Created: 2010-06-14 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_META_POD_H_ +#define _WX_META_POD_H_ + +#include "wx/defs.h" + +// +// TODO: Use TR1 is_pod<> implementation where available. VC9 SP1 has it +// in tr1 namespace, VC10 has it in std namespace. GCC 4.2 has it in +// <tr1/type_traits>, while GCC 4.3 and later have it in <type_traits>. +// + +// This macro declares something called "value" inside a class declaration. +// +// It has to be used because VC6 doesn't handle initialization of the static +// variables in the class declaration itself while BCC5.82 doesn't understand +// enums (it compiles the template fine but can't use it later) +#if defined(__VISUALC__) && !wxCHECK_VISUALC_VERSION(7) + #define wxDEFINE_TEMPLATE_BOOL_VALUE(val) enum { value = val } +#else + #define wxDEFINE_TEMPLATE_BOOL_VALUE(val) static const bool value = val +#endif + +// Helper to decide if an object of type T is POD (Plain Old Data) +template<typename T> +struct wxIsPod +{ + wxDEFINE_TEMPLATE_BOOL_VALUE(false); +}; + +// Macro to add wxIsPod<T> specialization for given type that marks it +// as Plain Old Data: +#define WX_DECLARE_TYPE_POD(type) \ + template<> struct wxIsPod<type> \ + { \ + wxDEFINE_TEMPLATE_BOOL_VALUE(true); \ + }; + +WX_DECLARE_TYPE_POD(bool) +WX_DECLARE_TYPE_POD(unsigned char) +WX_DECLARE_TYPE_POD(signed char) +WX_DECLARE_TYPE_POD(unsigned int) +WX_DECLARE_TYPE_POD(signed int) +WX_DECLARE_TYPE_POD(unsigned short int) +WX_DECLARE_TYPE_POD(signed short int) +WX_DECLARE_TYPE_POD(signed long int) +WX_DECLARE_TYPE_POD(unsigned long int) +WX_DECLARE_TYPE_POD(float) +WX_DECLARE_TYPE_POD(double) +WX_DECLARE_TYPE_POD(long double) +#if wxWCHAR_T_IS_REAL_TYPE +WX_DECLARE_TYPE_POD(wchar_t) +#endif +#ifdef wxLongLong_t +WX_DECLARE_TYPE_POD(wxLongLong_t) +WX_DECLARE_TYPE_POD(wxULongLong_t) +#endif + +// Visual C++ 6.0 can't compile partial template specializations and as this is +// only an optimization, we can live with pointers not being recognized as +// POD types under VC6 +#if !defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7) + +// pointers are Plain Old Data: +template<typename T> +struct wxIsPod<T*> +{ + static const bool value = true; +}; + +template<typename T> +struct wxIsPod<const T*> +{ + static const bool value = true; +}; + +#endif // !VC++ < 7 + +#endif // _WX_META_POD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/removeref.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/removeref.h new file mode 100644 index 0000000000..e199d033f7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/meta/removeref.h @@ -0,0 +1,36 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/meta/removeref.h +// Purpose: Allows to remove a reference from a type. +// Author: Vadim Zeitlin +// Created: 2012-10-21 +// Copyright: (c) 2012 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_META_REMOVEREF_H_ +#define _WX_META_REMOVEREF_H_ + +// wxRemoveRef<> is similar to C++11 std::remove_reference<> but works with all +// compilers (but, to compensate for this, doesn't work with rvalue references). + +// Except that it doesn't work with VC++ 6 as there doesn't seem to be any way +// to partially specialize a template for references with it. +#ifndef __VISUALC6__ + +template <typename T> +struct wxRemoveRef +{ + typedef T type; +}; + +template <typename T> +struct wxRemoveRef<T&> +{ + typedef T type; +}; + +#define wxHAS_REMOVEREF + +#endif // !__VISUALC6__ + +#endif // _WX_META_REMOVEREF_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/metafile.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/metafile.h new file mode 100644 index 0000000000..c34d8acef3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/metafile.h @@ -0,0 +1,53 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/metafile.h +// Purpose: wxMetaFile class declaration +// Author: wxWidgets team +// Modified by: +// Created: 13.01.00 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_METAFILE_H_BASE_ +#define _WX_METAFILE_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_METAFILE + +// provide synonyms for all metafile classes +#define wxMetaFile wxMetafile +#define wxMetaFileDC wxMetafileDC +#define wxMetaFileDataObject wxMetafileDataObject + +#define wxMakeMetaFilePlaceable wxMakeMetafilePlaceable + +#if defined(__WXMSW__) + #if wxUSE_ENH_METAFILE + #include "wx/msw/enhmeta.h" + + #if wxUSE_WIN_METAFILES_ALWAYS + // use normal metafiles as well + #include "wx/msw/metafile.h" + #else // also map all metafile classes to enh metafile + typedef wxEnhMetaFile wxMetafile; + typedef wxEnhMetaFileDC wxMetafileDC; + #if wxUSE_DRAG_AND_DROP + typedef wxEnhMetaFileDataObject wxMetafileDataObject; + #endif + + // this flag will be set if wxMetafile class is wxEnhMetaFile + #define wxMETAFILE_IS_ENH + #endif // wxUSE_WIN_METAFILES_ALWAYS + #else // !wxUSE_ENH_METAFILE + #include "wx/msw/metafile.h" + #endif +#elif defined(__WXPM__) + #include "wx/os2/metafile.h" +#elif defined(__WXMAC__) + #include "wx/osx/metafile.h" +#endif + +#endif // wxUSE_METAFILE + +#endif // _WX_METAFILE_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/mimetype.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mimetype.h new file mode 100644 index 0000000000..b3ae6b77b0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mimetype.h @@ -0,0 +1,536 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/mimetype.h +// Purpose: classes and functions to manage MIME types +// Author: Vadim Zeitlin +// Modified by: +// Chris Elliott (biol75@york.ac.uk) 5 Dec 00: write support for Win32 +// Created: 23.09.98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence (part of wxExtra library) +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MIMETYPE_H_ +#define _WX_MIMETYPE_H_ + +// ---------------------------------------------------------------------------- +// headers and such +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_MIMETYPE + +// the things we really need +#include "wx/string.h" +#include "wx/dynarray.h" +#include "wx/arrstr.h" + +#include <stdarg.h> + +// fwd decls +class WXDLLIMPEXP_FWD_BASE wxIconLocation; +class WXDLLIMPEXP_FWD_BASE wxFileTypeImpl; +class WXDLLIMPEXP_FWD_BASE wxMimeTypesManagerImpl; + +// these constants define the MIME informations source under UNIX and are used +// by wxMimeTypesManager::Initialize() +enum wxMailcapStyle +{ + wxMAILCAP_STANDARD = 1, + wxMAILCAP_NETSCAPE = 2, + wxMAILCAP_KDE = 4, + wxMAILCAP_GNOME = 8, + + wxMAILCAP_ALL = 15 +}; + +/* + TODO: would it be more convenient to have this class? + +class WXDLLIMPEXP_BASE wxMimeType : public wxString +{ +public: + // all string ctors here + + wxString GetType() const { return BeforeFirst(wxT('/')); } + wxString GetSubType() const { return AfterFirst(wxT('/')); } + + void SetSubType(const wxString& subtype) + { + *this = GetType() + wxT('/') + subtype; + } + + bool Matches(const wxMimeType& wildcard) + { + // implement using wxMimeTypesManager::IsOfType() + } +}; + +*/ + +// wxMimeTypeCommands stores the verbs defined for the given MIME type with +// their values +class WXDLLIMPEXP_BASE wxMimeTypeCommands +{ +public: + wxMimeTypeCommands() {} + + wxMimeTypeCommands(const wxArrayString& verbs, + const wxArrayString& commands) + : m_verbs(verbs), + m_commands(commands) + { + } + + // add a new verb with the command or replace the old value + void AddOrReplaceVerb(const wxString& verb, const wxString& cmd); + void Add(const wxString& s) + { + m_verbs.Add(s.BeforeFirst(wxT('='))); + m_commands.Add(s.AfterFirst(wxT('='))); + } + + // access the commands + size_t GetCount() const { return m_verbs.GetCount(); } + const wxString& GetVerb(size_t n) const { return m_verbs[n]; } + const wxString& GetCmd(size_t n) const { return m_commands[n]; } + + bool HasVerb(const wxString& verb) const + { return m_verbs.Index(verb) != wxNOT_FOUND; } + + // returns empty string and wxNOT_FOUND in idx if no such verb + wxString GetCommandForVerb(const wxString& verb, size_t *idx = NULL) const; + + // get a "verb=command" string + wxString GetVerbCmd(size_t n) const; + +private: + wxArrayString m_verbs; + wxArrayString m_commands; +}; + +// ---------------------------------------------------------------------------- +// wxFileTypeInfo: static container of information accessed via wxFileType. +// +// This class is used with wxMimeTypesManager::AddFallbacks() and Associate() +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFileTypeInfo +{ +private: + void DoVarArgInit(const wxString& mimeType, + const wxString& openCmd, + const wxString& printCmd, + const wxString& desc, + va_list argptr); + + void VarArgInit(const wxString *mimeType, + const wxString *openCmd, + const wxString *printCmd, + const wxString *desc, + // the other parameters form a NULL terminated list of + // extensions + ...); + +public: + // NB: This is a helper to get implicit conversion of variadic ctor's + // fixed arguments into something that can be passed to VarArgInit(). + // Do not use, it's used by the ctor only. + struct CtorString + { + CtorString(const char *str) : m_str(str) {} + CtorString(const wchar_t *str) : m_str(str) {} + CtorString(const wxString& str) : m_str(str) {} + CtorString(const wxCStrData& str) : m_str(str) {} + CtorString(const wxScopedCharBuffer& str) : m_str(str) {} + CtorString(const wxScopedWCharBuffer& str) : m_str(str) {} + + operator const wxString*() const { return &m_str; } + + wxString m_str; + }; + + // ctors + + // Ctor specifying just the MIME type (which is mandatory), the other + // fields can be set later if needed. + wxFileTypeInfo(const wxString& mimeType) + : m_mimeType(mimeType) + { + } + + // Ctor allowing to specify the values of all fields at once: + // + // wxFileTypeInfo(const wxString& mimeType, + // const wxString& openCmd, + // const wxString& printCmd, + // const wxString& desc, + // // the other parameters form a list of extensions for this + // // file type and should be terminated with wxNullPtr (not + // // just NULL!) + // ...); + WX_DEFINE_VARARG_FUNC_CTOR(wxFileTypeInfo, + 4, (const CtorString&, + const CtorString&, + const CtorString&, + const CtorString&), + VarArgInit, VarArgInit) +#ifdef __WATCOMC__ + // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351 + WX_VARARG_WATCOM_WORKAROUND_CTOR( + wxFileTypeInfo, + 4, (const wxString&, + const wxString&, + const wxString&, + const wxString&), + (CtorString(f1), + CtorString(f2), + CtorString(f3), + CtorString(f4))); + WX_VARARG_WATCOM_WORKAROUND_CTOR( + wxFileTypeInfo, + 4, (const wxCStrData&, + const wxCStrData&, + const wxCStrData&, + const wxCStrData&), + (CtorString(f1), + CtorString(f2), + CtorString(f3), + CtorString(f4))); + WX_VARARG_WATCOM_WORKAROUND_CTOR( + wxFileTypeInfo, + 4, (const char*, + const char*, + const char*, + const char*), + (CtorString(f1), + CtorString(f2), + CtorString(f3), + CtorString(f4))); + WX_VARARG_WATCOM_WORKAROUND_CTOR( + wxFileTypeInfo, + 4, (const wchar_t*, + const wchar_t*, + const wchar_t*, + const wchar_t*), + (CtorString(f1), + CtorString(f2), + CtorString(f3), + CtorString(f4))); +#endif + + // the array elements correspond to the parameters of the ctor above in + // the same order + wxFileTypeInfo(const wxArrayString& sArray); + + // invalid item - use this to terminate the array passed to + // wxMimeTypesManager::AddFallbacks + wxFileTypeInfo() { } + + // test if this object can be used + bool IsValid() const { return !m_mimeType.empty(); } + + // setters + // set the open/print commands + void SetOpenCommand(const wxString& command) { m_openCmd = command; } + void SetPrintCommand(const wxString& command) { m_printCmd = command; } + + // set the description + void SetDescription(const wxString& desc) { m_desc = desc; } + + // add another extension corresponding to this file type + void AddExtension(const wxString& ext) { m_exts.push_back(ext); } + + // set the icon info + void SetIcon(const wxString& iconFile, int iconIndex = 0) + { + m_iconFile = iconFile; + m_iconIndex = iconIndex; + } + // set the short desc + void SetShortDesc(const wxString& shortDesc) { m_shortDesc = shortDesc; } + + // accessors + // get the MIME type + const wxString& GetMimeType() const { return m_mimeType; } + // get the open command + const wxString& GetOpenCommand() const { return m_openCmd; } + // get the print command + const wxString& GetPrintCommand() const { return m_printCmd; } + // get the short description (only used under Win32 so far) + const wxString& GetShortDesc() const { return m_shortDesc; } + // get the long, user visible description + const wxString& GetDescription() const { return m_desc; } + // get the array of all extensions + const wxArrayString& GetExtensions() const { return m_exts; } + size_t GetExtensionsCount() const {return m_exts.GetCount(); } + // get the icon info + const wxString& GetIconFile() const { return m_iconFile; } + int GetIconIndex() const { return m_iconIndex; } + +private: + wxString m_mimeType, // the MIME type in "type/subtype" form + m_openCmd, // command to use for opening the file (%s allowed) + m_printCmd, // command to use for printing the file (%s allowed) + m_shortDesc, // a short string used in the registry + m_desc; // a free form description of this file type + + // icon stuff + wxString m_iconFile; // the file containing the icon + int m_iconIndex; // icon index in this file + + wxArrayString m_exts; // the extensions which are mapped on this filetype + + +#if 0 // TODO + // the additional (except "open" and "print") command names and values + wxArrayString m_commandNames, + m_commandValues; +#endif // 0 +}; + +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxFileTypeInfo, wxArrayFileTypeInfo, + WXDLLIMPEXP_BASE); + +// ---------------------------------------------------------------------------- +// wxFileType: gives access to all information about the files of given type. +// +// This class holds information about a given "file type". File type is the +// same as MIME type under Unix, but under Windows it corresponds more to an +// extension than to MIME type (in fact, several extensions may correspond to a +// file type). This object may be created in many different ways and depending +// on how it was created some fields may be unknown so the return value of all +// the accessors *must* be checked! +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFileType +{ +friend class WXDLLIMPEXP_FWD_BASE wxMimeTypesManagerImpl; // it has access to m_impl + +public: + // An object of this class must be passed to Get{Open|Print}Command. The + // default implementation is trivial and doesn't know anything at all about + // parameters, only filename and MIME type are used (so it's probably ok for + // Windows where %{param} is not used anyhow) + class MessageParameters + { + public: + // ctors + MessageParameters() { } + MessageParameters(const wxString& filename, + const wxString& mimetype = wxEmptyString) + : m_filename(filename), m_mimetype(mimetype) { } + + // accessors (called by GetOpenCommand) + // filename + const wxString& GetFileName() const { return m_filename; } + // mime type + const wxString& GetMimeType() const { return m_mimetype; } + + // override this function in derived class + virtual wxString GetParamValue(const wxString& WXUNUSED(name)) const + { return wxEmptyString; } + + // virtual dtor as in any base class + virtual ~MessageParameters() { } + + protected: + wxString m_filename, m_mimetype; + }; + + // ctor from static data + wxFileType(const wxFileTypeInfo& ftInfo); + + // accessors: all of them return true if the corresponding information + // could be retrieved/found, false otherwise (and in this case all [out] + // parameters are unchanged) + // return the MIME type for this file type + bool GetMimeType(wxString *mimeType) const; + bool GetMimeTypes(wxArrayString& mimeTypes) const; + // fill passed in array with all extensions associated with this file + // type + bool GetExtensions(wxArrayString& extensions); + // get the icon corresponding to this file type and of the given size + bool GetIcon(wxIconLocation *iconloc) const; + bool GetIcon(wxIconLocation *iconloc, + const MessageParameters& params) const; + // get a brief file type description ("*.txt" => "text document") + bool GetDescription(wxString *desc) const; + + // get the command to be used to open/print the given file. + // get the command to execute the file of given type + bool GetOpenCommand(wxString *openCmd, + const MessageParameters& params) const; + // a simpler to use version of GetOpenCommand() -- it only takes the + // filename and returns an empty string on failure + wxString GetOpenCommand(const wxString& filename) const; + // get the command to print the file of given type + bool GetPrintCommand(wxString *printCmd, + const MessageParameters& params) const; + + + // return the number of commands defined for this file type, 0 if none + size_t GetAllCommands(wxArrayString *verbs, wxArrayString *commands, + const wxFileType::MessageParameters& params) const; + + // set an arbitrary command, ask confirmation if it already exists and + // overwriteprompt is true + bool SetCommand(const wxString& cmd, const wxString& verb, + bool overwriteprompt = true); + + bool SetDefaultIcon(const wxString& cmd = wxEmptyString, int index = 0); + + + // remove the association for this filetype from the system MIME database: + // notice that it will only work if the association is defined in the user + // file/registry part, we will never modify the system-wide settings + bool Unassociate(); + + // operations + // expand a string in the format of GetOpenCommand (which may contain + // '%s' and '%t' format specifiers for the file name and mime type + // and %{param} constructions). + static wxString ExpandCommand(const wxString& command, + const MessageParameters& params); + + // dtor (not virtual, shouldn't be derived from) + ~wxFileType(); + +private: + // default ctor is private because the user code never creates us + wxFileType(); + + // no copy ctor/assignment operator + wxFileType(const wxFileType&); + wxFileType& operator=(const wxFileType&); + + // the static container of wxFileType data: if it's not NULL, it means that + // this object is used as fallback only + const wxFileTypeInfo *m_info; + + // the object which implements the real stuff like reading and writing + // to/from system MIME database + wxFileTypeImpl *m_impl; +}; + +//---------------------------------------------------------------------------- +// wxMimeTypesManagerFactory +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMimeTypesManagerFactory +{ +public: + wxMimeTypesManagerFactory() {} + virtual ~wxMimeTypesManagerFactory() {} + + virtual wxMimeTypesManagerImpl *CreateMimeTypesManagerImpl(); + + static void Set( wxMimeTypesManagerFactory *factory ); + static wxMimeTypesManagerFactory *Get(); + +private: + static wxMimeTypesManagerFactory *m_factory; +}; + +// ---------------------------------------------------------------------------- +// wxMimeTypesManager: interface to system MIME database. +// +// This class accesses the information about all known MIME types and allows +// the application to retrieve information (including how to handle data of +// given type) about them. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMimeTypesManager +{ +public: + // static helper functions + // ----------------------- + + // check if the given MIME type is the same as the other one: the + // second argument may contain wildcards ('*'), but not the first. If + // the types are equal or if the mimeType matches wildcard the function + // returns true, otherwise it returns false + static bool IsOfType(const wxString& mimeType, const wxString& wildcard); + + // ctor + wxMimeTypesManager(); + + // NB: the following 2 functions are for Unix only and don't do anything + // elsewhere + + // loads data from standard files according to the mailcap styles + // specified: this is a bitwise OR of wxMailcapStyle values + // + // use the extraDir parameter if you want to look for files in another + // directory + void Initialize(int mailcapStyle = wxMAILCAP_ALL, + const wxString& extraDir = wxEmptyString); + + // and this function clears all the data from the manager + void ClearData(); + + // Database lookup: all functions return a pointer to wxFileType object + // whose methods may be used to query it for the information you're + // interested in. If the return value is !NULL, caller is responsible for + // deleting it. + // get file type from file extension + wxFileType *GetFileTypeFromExtension(const wxString& ext); + // get file type from MIME type (in format <category>/<format>) + wxFileType *GetFileTypeFromMimeType(const wxString& mimeType); + + // enumerate all known MIME types + // + // returns the number of retrieved file types + size_t EnumAllFileTypes(wxArrayString& mimetypes); + + // these functions can be used to provide default values for some of the + // MIME types inside the program itself + // + // The filetypes array should be terminated by either NULL entry or an + // invalid wxFileTypeInfo (i.e. the one created with default ctor) + void AddFallbacks(const wxFileTypeInfo *filetypes); + void AddFallback(const wxFileTypeInfo& ft) { m_fallbacks.Add(ft); } + + // create or remove associations + + // create a new association using the fields of wxFileTypeInfo (at least + // the MIME type and the extension should be set) + // if the other fields are empty, the existing values should be left alone + wxFileType *Associate(const wxFileTypeInfo& ftInfo); + + // undo Associate() + bool Unassociate(wxFileType *ft) ; + + // dtor (not virtual, shouldn't be derived from) + ~wxMimeTypesManager(); + +private: + // no copy ctor/assignment operator + wxMimeTypesManager(const wxMimeTypesManager&); + wxMimeTypesManager& operator=(const wxMimeTypesManager&); + + // the fallback info which is used if the information is not found in the + // real system database + wxArrayFileTypeInfo m_fallbacks; + + // the object working with the system MIME database + wxMimeTypesManagerImpl *m_impl; + + // if m_impl is NULL, create one + void EnsureImpl(); + + friend class wxMimeTypeCmnModule; +}; + + +// ---------------------------------------------------------------------------- +// global variables +// ---------------------------------------------------------------------------- + +// the default mime manager for wxWidgets programs +extern WXDLLIMPEXP_DATA_BASE(wxMimeTypesManager *) wxTheMimeTypesManager; + +#endif // wxUSE_MIMETYPE + +#endif + //_WX_MIMETYPE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/minifram.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/minifram.h new file mode 100644 index 0000000000..f769c5a691 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/minifram.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/minifram.h +// Purpose: wxMiniFrame base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MINIFRAM_H_BASE_ +#define _WX_MINIFRAM_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_MINIFRAME + +#if defined(__WXMSW__) +#include "wx/msw/minifram.h" +#elif defined(__WXMOTIF__) +#include "wx/motif/minifram.h" +#elif defined(__WXGTK20__) +#include "wx/gtk/minifram.h" +#elif defined(__WXGTK__) +#include "wx/gtk1/minifram.h" +#elif defined(__WXX11__) +#include "wx/x11/minifram.h" +#elif defined(__WXMAC__) +#include "wx/osx/minifram.h" +#elif defined(__WXPM__) +#include "wx/os2/minifram.h" +#else +// TODO: it seems that wxMiniFrame could be just defined here generically +// instead of having all the above port-specific headers +#include "wx/frame.h" +typedef wxFrame wxMiniFrame; +#endif + +#endif // wxUSE_MINIFRAME +#endif // _WX_MINIFRAM_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/modalhook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/modalhook.h new file mode 100644 index 0000000000..55341f9bd9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/modalhook.h @@ -0,0 +1,104 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/modalhook.h +// Purpose: Allows to hook into showing modal dialogs. +// Author: Vadim Zeitlin +// Created: 2013-05-19 +// Copyright: (c) 2013 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MODALHOOK_H_ +#define _WX_MODALHOOK_H_ + +#include "wx/vector.h" + +class WXDLLIMPEXP_FWD_CORE wxDialog; + +// ---------------------------------------------------------------------------- +// Class allowing to be notified about any modal dialog calls. +// ---------------------------------------------------------------------------- + +// To be notified about entering and exiting modal dialogs and possibly to +// replace them with something else (e.g. just return a predefined value for +// testing), define an object of this class, override its Enter() and +// possibly Exit() methods and call Register() on it. +class WXDLLIMPEXP_CORE wxModalDialogHook +{ +public: + // Default ctor doesn't do anything, call Register() to activate the hook. + wxModalDialogHook() { } + + // Dtor unregisters the hook if it had been registered. + virtual ~wxModalDialogHook() { DoUnregister(); } + + // Register this hook as being active, i.e. its Enter() and Exit() methods + // will be called. + // + // Notice that the order of registration matters: the last hook registered + // is called first, and if its Enter() returns something != wxID_NONE, the + // subsequent hooks are skipped. + void Register(); + + // Unregister this hook. Notice that is done automatically from the dtor. + void Unregister(); + + // Called from wxWidgets code before showing any modal dialogs and calls + // Enter() for every registered hook. + static int CallEnter(wxDialog* dialog); + + // Called from wxWidgets code after dismissing the dialog and calls Exit() + // for every registered hook. + static void CallExit(wxDialog* dialog); + +protected: + // Called by wxWidgets before showing any modal dialogs, override this to + // be notified about this and return anything but wxID_NONE to skip showing + // the modal dialog entirely and just return the specified result. + virtual int Enter(wxDialog* dialog) = 0; + + // Called by wxWidgets after dismissing the modal dialog. Notice that it + // won't be called if Enter() hadn't been. + virtual void Exit(wxDialog* WXUNUSED(dialog)) { } + +private: + // Unregister the given hook, return true if it was done or false if the + // hook wasn't found. + bool DoUnregister(); + + // All the hooks in reverse registration order (i.e. in call order). + typedef wxVector<wxModalDialogHook*> Hooks; + static Hooks ms_hooks; + + wxDECLARE_NO_COPY_CLASS(wxModalDialogHook); +}; + +// Helper object used by WX_MODAL_DIALOG_HOOK below to ensure that CallExit() +// is called on scope exit. +class wxModalDialogHookExitGuard +{ +public: + wxEXPLICIT wxModalDialogHookExitGuard(wxDialog* dialog) + : m_dialog(dialog) + { + } + + ~wxModalDialogHookExitGuard() + { + wxModalDialogHook::CallExit(m_dialog); + } + +private: + wxDialog* const m_dialog; + + wxDECLARE_NO_COPY_CLASS(wxModalDialogHookExitGuard); +}; + +// This macro needs to be used at the top of every implementation of +// ShowModal() in order for wxModalDialogHook to work. +#define WX_HOOK_MODAL_DIALOG() \ + const int modalDialogHookRC = wxModalDialogHook::CallEnter(this); \ + if ( modalDialogHookRC != wxID_NONE ) \ + return modalDialogHookRC; \ + wxModalDialogHookExitGuard modalDialogHookExit(this) + +#endif // _WX_MODALHOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/module.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/module.h new file mode 100644 index 0000000000..96600b76ca --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/module.h @@ -0,0 +1,119 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/module.h +// Purpose: Modules handling +// Author: Wolfram Gloger/adapted by Guilhem Lavaux +// Modified by: +// Created: 04/11/98 +// Copyright: (c) Wolfram Gloger and Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MODULE_H_ +#define _WX_MODULE_H_ + +#include "wx/object.h" +#include "wx/list.h" +#include "wx/arrstr.h" +#include "wx/dynarray.h" + +// declare a linked list of modules +class WXDLLIMPEXP_FWD_BASE wxModule; +WX_DECLARE_USER_EXPORTED_LIST(wxModule, wxModuleList, WXDLLIMPEXP_BASE); + +// and an array of class info objects +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxClassInfo *, wxArrayClassInfo, + class WXDLLIMPEXP_BASE); + + +// declaring a class derived from wxModule will automatically create an +// instance of this class on program startup, call its OnInit() method and call +// OnExit() on program termination (but only if OnInit() succeeded) +class WXDLLIMPEXP_BASE wxModule : public wxObject +{ +public: + wxModule() {} + virtual ~wxModule() {} + + // if module init routine returns false the application + // will fail to startup + + bool Init() { return OnInit(); } + void Exit() { OnExit(); } + + // Override both of these + + // called on program startup + + virtual bool OnInit() = 0; + + // called just before program termination, but only if OnInit() + // succeeded + + virtual void OnExit() = 0; + + static void RegisterModule(wxModule *module); + static void RegisterModules(); + static bool InitializeModules(); + static void CleanUpModules() { DoCleanUpModules(m_modules); } + + // used by wxObjectLoader when unloading shared libs's + + static void UnregisterModule(wxModule *module); + +protected: + static wxModuleList m_modules; + + // the function to call from constructor of a deriving class add module + // dependency which will be initialized before the module and unloaded + // after that + void AddDependency(wxClassInfo *dep) + { + wxCHECK_RET( dep, wxT("NULL module dependency") ); + + m_dependencies.Add(dep); + } + + // same as the version above except it will look up wxClassInfo by name on + // its own + void AddDependency(const char *className) + { + m_namedDependencies.Add(className); + } + + +private: + // initialize module and Append it to initializedModules list recursively + // calling itself to satisfy module dependencies if needed + static bool + DoInitializeModule(wxModule *module, wxModuleList &initializedModules); + + // cleanup the modules in the specified list (which may not contain all + // modules if we're called during initialization because not all modules + // could be initialized) and also empty m_modules itself + static void DoCleanUpModules(const wxModuleList& modules); + + // resolve all named dependencies and add them to the normal m_dependencies + bool ResolveNamedDependencies(); + + + // module dependencies: contains wxClassInfo pointers for all modules which + // must be initialized before this one + wxArrayClassInfo m_dependencies; + + // and the named dependencies: those will be resolved during run-time and + // added to m_dependencies + wxArrayString m_namedDependencies; + + // used internally while initializing/cleaning up modules + enum + { + State_Registered, // module registered but not initialized yet + State_Initializing, // we're initializing this module but not done yet + State_Initialized // module initialized successfully + } m_state; + + + DECLARE_CLASS(wxModule) +}; + +#endif // _WX_MODULE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/accel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/accel.h new file mode 100644 index 0000000000..1c048c6dca --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/accel.h @@ -0,0 +1,39 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/accel.h +// Purpose: wxAcceleratorTable class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ACCEL_H_ +#define _WX_ACCEL_H_ + +#include "wx/object.h" +#include "wx/string.h" +#include "wx/event.h" + +class WXDLLIMPEXP_CORE wxAcceleratorTable: public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) +public: + wxAcceleratorTable(); + wxAcceleratorTable(const wxString& resource); // Load from .rc resource + wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); // Load from array + + virtual ~wxAcceleratorTable(); + + bool Ok() const { return IsOk(); } + bool IsOk() const; + + // Implementation only + int GetCount() const; + wxAcceleratorEntry* GetEntries() const; +}; + +extern WXDLLIMPEXP_DATA_CORE(wxAcceleratorTable) wxNullAcceleratorTable; + +#endif +// _WX_ACCEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/app.h new file mode 100644 index 0000000000..1fb7f951ec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/app.h @@ -0,0 +1,93 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/app.h +// Purpose: wxApp class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_APP_H_ +#define _WX_APP_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/event.h" +#include "wx/hashmap.h" + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxFrame; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxApp; +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; +class WXDLLIMPEXP_FWD_BASE wxLog; +class WXDLLIMPEXP_FWD_CORE wxEventLoop; +class WXDLLIMPEXP_FWD_CORE wxXVisualInfo; +class WXDLLIMPEXP_FWD_CORE wxPerDisplayData; + +// ---------------------------------------------------------------------------- +// the wxApp class for Motif - see wxAppBase for more details +// ---------------------------------------------------------------------------- + +WX_DECLARE_VOIDPTR_HASH_MAP( wxPerDisplayData*, wxPerDisplayDataMap ); + +class WXDLLIMPEXP_CORE wxApp : public wxAppBase +{ + DECLARE_DYNAMIC_CLASS(wxApp) + +public: + wxApp(); + virtual ~wxApp(); + + // override base class (pure) virtuals + // ----------------------------------- + + virtual int MainLoop(); + + virtual void Exit(); + + virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp + + // implementation from now on + // -------------------------- + +protected: + bool m_showOnInit; + +public: + // Implementation + virtual bool Initialize(int& argc, wxChar **argv); + virtual void CleanUp(); + + // Motif-specific + WXAppContext GetAppContext() const { return m_appContext; } + WXWidget GetTopLevelWidget(); + WXWidget GetTopLevelRealizedWidget(); + WXColormap GetMainColormap(WXDisplay* display); + WXDisplay* GetInitialDisplay() const { return m_initialDisplay; } + + void SetTopLevelWidget(WXDisplay* display, WXWidget widget); + void SetTopLevelRealizedWidget(WXDisplay* display, + WXWidget widget); + + // This handler is called when a property change event occurs + virtual void HandlePropertyChange(WXEvent *event); + + wxXVisualInfo* GetVisualInfo(WXDisplay* display); + +private: + // Motif-specific + WXAppContext m_appContext; + WXColormap m_mainColormap; + WXDisplay* m_initialDisplay; + wxPerDisplayDataMap* m_perDisplayData; +}; + +#endif +// _WX_APP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/bmpbuttn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/bmpbuttn.h new file mode 100644 index 0000000000..8a3bcf335c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/bmpbuttn.h @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/bmpbuttn.h +// Purpose: wxBitmapButton class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BMPBUTTN_H_ +#define _WX_BMPBUTTN_H_ + +#include "wx/motif/bmpmotif.h" + +#define wxDEFAULT_BUTTON_MARGIN 4 + +class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase +{ +public: + wxBitmapButton(); + virtual ~wxBitmapButton(); + wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, 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, wxWindowID id, const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + // Implementation + virtual void ChangeBackgroundColour(); + +protected: + virtual wxSize DoGetBestSize() const; + + virtual void DoSetBitmap(const wxBitmap& bitmap, State which); + virtual void OnSetBitmap(); + + // original bitmaps may be different from the ones we were initialized with + // if they were changed to reflect button background colour + wxBitmap m_bitmapsOriginal[State_Max]; + + wxBitmapCache m_bitmapCache; + + WXPixmap m_insensPixmap; + + DECLARE_DYNAMIC_CLASS(wxBitmapButton) +}; + +#endif // _WX_BMPBUTTN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/bmpmotif.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/bmpmotif.h new file mode 100644 index 0000000000..ada8ae17f7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/bmpmotif.h @@ -0,0 +1,56 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/bmpmotif.h +// Purpose: Motif-specific bitmap routines +// Author: Julian Smart, originally in bitmap.h +// Modified by: +// Created: 25/03/2003 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BMPMOTIF_H_ +#define _WX_BMPMOTIF_H_ + +#include "wx/defs.h" +#include "wx/bitmap.h" + +class WXDLLIMPEXP_CORE wxBitmapCache +{ +public: + wxBitmapCache() + { + m_labelPixmap = (WXPixmap)NULL; + m_armPixmap = (WXPixmap)NULL; + m_insensPixmap = (WXPixmap)NULL; + m_image = (WXImage)NULL; + m_display = NULL; + SetColoursChanged(); + } + + ~wxBitmapCache(); + + void SetColoursChanged(); + void SetBitmap( const wxBitmap& bitmap ); + + WXPixmap GetLabelPixmap( WXWidget w ); + WXPixmap GetInsensPixmap( WXWidget w = (WXWidget)NULL ); + WXPixmap GetArmPixmap( WXWidget w ); +private: + void InvalidateCache(); + void CreateImageIfNeeded( WXWidget w ); + + WXPixmap GetPixmapFromCache(WXWidget w); + + struct + { + bool label : 1; + bool arm : 1; + bool insens : 1; + } m_recalcPixmaps; + wxBitmap m_bitmap; + WXDisplay* m_display; + WXPixmap m_labelPixmap, m_armPixmap, m_insensPixmap; + WXImage m_image; +}; + +#endif // _WX_BMPMOTIF_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/button.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/button.h new file mode 100644 index 0000000000..29d201e111 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/button.h @@ -0,0 +1,56 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/button.h +// Purpose: wxButton class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BUTTON_H_ +#define _WX_BUTTON_H_ + +// Pushbutton +class WXDLLIMPEXP_CORE wxButton: public wxButtonBase +{ +public: + wxButton() { } + wxButton(wxWindow *parent, + wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + virtual wxWindow *SetDefault(); + virtual void Command(wxCommandEvent& event); + + static wxSize GetDefaultSize(); + + // Implementation + virtual wxSize GetMinSize() const; + +protected: + virtual wxSize DoGetBestSize() const; + +private: + wxSize OldGetBestSize() const; + wxSize OldGetMinSize() const; + void SetDefaultShadowThicknessAndResize(); + + DECLARE_DYNAMIC_CLASS(wxButton) +}; + +#endif // _WX_BUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/checkbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/checkbox.h new file mode 100644 index 0000000000..0fc4c1e488 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/checkbox.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/checkbox.h +// Purpose: wxCheckBox class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHECKBOX_H_ +#define _WX_CHECKBOX_H_ + +// Checkbox item (single checkbox) +class WXDLLIMPEXP_CORE wxCheckBox: public wxCheckBoxBase +{ + DECLARE_DYNAMIC_CLASS(wxCheckBox) + +public: + inline wxCheckBox() { Init(); } + inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Init(); + + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + virtual void SetValue(bool); + virtual bool GetValue() const ; + virtual void Command(wxCommandEvent& event); + + // Implementation + virtual void ChangeBackgroundColour(); +private: + // common part of all constructors + void Init() + { + m_evtType = wxEVT_CHECKBOX; + } + + virtual void DoSet3StateValue(wxCheckBoxState state); + + virtual wxCheckBoxState DoGet3StateValue() const; + + // public for the callback +public: + // either wxEVT_CHECKBOX or ..._TOGGLEBUTTON + wxEventType m_evtType; +}; + +#endif +// _WX_CHECKBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/checklst.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/checklst.h new file mode 100644 index 0000000000..c197dedaa4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/checklst.h @@ -0,0 +1,76 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/checklst.h +// Purpose: wxCheckListBox class - a listbox with checkable items +// Note: this is an optional class. +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHECKLST_H_ +#define _WX_CHECKLST_H_ + +#include "wx/listbox.h" + +class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase +{ + DECLARE_DYNAMIC_CLASS(wxCheckListBox) + +public: + // ctors + wxCheckListBox(); + wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int nStrings = 0, + const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + // items may be checked + bool IsChecked(unsigned int uiIndex) const; + void Check(unsigned int uiIndex, bool bCheck = true); + + // override base class functions + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual void SetString(unsigned int n, const wxString& s); + virtual wxString GetString(unsigned int n) const; + +private: + void DoToggleItem( int item, int x ); +private: + DECLARE_EVENT_TABLE() +}; + +#endif +// _WX_CHECKLST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/chkconf.h new file mode 100644 index 0000000000..79bbaa03b6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/chkconf.h @@ -0,0 +1,15 @@ +/* + * Name: wx/motif/chkconf.h + * Purpose: Motif-specific config settings checks + * Author: Vadim Zeitlin + * Modified by: + * Created: 2005-04-05 (extracted from wx/chkconf.h) + * Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwidgets.org> + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#if !defined(wxUSE_GADGETS) +# define wxUSE_GADGETS 0 +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/choice.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/choice.h new file mode 100644 index 0000000000..625810d14c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/choice.h @@ -0,0 +1,124 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/choice.h +// Purpose: wxChoice class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHOICE_H_ +#define _WX_CHOICE_H_ + +#include "wx/clntdata.h" + +#ifndef wxWIDGET_ARRAY_DEFINED + #define wxWIDGET_ARRAY_DEFINED + + #include "wx/dynarray.h" + WX_DEFINE_ARRAY_PTR(WXWidget, wxWidgetArray); +#endif + +// Choice item +class WXDLLIMPEXP_CORE wxChoice: public wxChoiceBase +{ + DECLARE_DYNAMIC_CLASS(wxChoice) + +public: + wxChoice(); + virtual ~wxChoice(); + + wxChoice(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Init(); + Create(parent, id, pos, size, n, choices, style, validator, name); + } + + wxChoice(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Init(); + Create(parent, id, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + + // implementation of wxControlWithItems + virtual unsigned int GetCount() const; + virtual int GetSelection() const; + virtual void DoDeleteOneItem(unsigned int n); + virtual void DoClear(); + virtual void SetString(unsigned int n, const wxString& s); + virtual wxString GetString(unsigned int n) const; + + // implementation of wxChoiceBase + virtual void SetSelection(int n); + virtual void SetColumns(int n = 1 ); + virtual int GetColumns() const ; + + // Original API + virtual void Command(wxCommandEvent& event); + + void SetFocus(); + + // Implementation + virtual void ChangeFont(bool keepOriginalSize = true); + virtual void ChangeBackgroundColour(); + virtual void ChangeForegroundColour(); + WXWidget GetTopWidget() const { return m_formWidget; } + WXWidget GetMainWidget() const { return m_buttonWidget; } + + virtual wxSize DoGetBestSize() const; + + // implementation, for wxChoiceCallback + const wxWidgetArray& GetWidgets() const { return m_widgetArray; } + const wxArrayString& GetStrings() const { return m_stringArray; } +protected: + // minimum size for the text ctrl + wxSize GetItemsSize() const; + // common part of all contructors + void Init(); + + WXWidget m_menuWidget; + WXWidget m_buttonWidget; + wxWidgetArray m_widgetArray; + WXWidget m_formWidget; + wxArrayString m_stringArray; + + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + // implementation of wxControlWithItems + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); +}; + +#endif // _WX_CHOICE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/clipbrd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/clipbrd.h new file mode 100644 index 0000000000..a70022659d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/clipbrd.h @@ -0,0 +1,80 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/clipbrd.h +// Purpose: Clipboard functionality. +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CLIPBRD_H_ +#define _WX_CLIPBRD_H_ + +#if wxUSE_CLIPBOARD + +class WXDLLIMPEXP_FWD_CORE wxDataObject; +struct wxDataIdToDataObject; + +#include "wx/list.h" + +WX_DECLARE_LIST(wxDataObject, wxDataObjectList); +WX_DECLARE_LIST(wxDataIdToDataObject, wxDataIdToDataObjectList); + +WXDLLIMPEXP_CORE bool wxOpenClipboard(); +WXDLLIMPEXP_CORE bool wxClipboardOpen(); +WXDLLIMPEXP_CORE bool wxCloseClipboard(); +WXDLLIMPEXP_CORE bool wxEmptyClipboard(); +WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat); +WXDLLIMPEXP_CORE bool wxSetClipboardData(wxDataFormat dataFormat, wxObject *obj, int width = 0, int height = 0); +WXDLLIMPEXP_CORE wxObject* wxGetClipboardData(wxDataFormat dataFormat, long *len = NULL); +WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat); +WXDLLIMPEXP_CORE wxDataFormat wxRegisterClipboardFormat(char *formatName); +WXDLLIMPEXP_CORE bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int maxCount); + +//----------------------------------------------------------------------------- +// wxClipboard +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase +{ +public: + wxClipboard(); + virtual ~wxClipboard(); + + // open the clipboard before SetData() and GetData() + virtual bool Open(); + + // close the clipboard after SetData() and GetData() + virtual void Close(); + + // opened? + virtual bool IsOpened() const { return m_open; } + + // replaces the data on the clipboard with data + virtual bool SetData( wxDataObject *data ); + + // adds data to the clipboard + virtual bool AddData( wxDataObject *data ); + + // format available on the clipboard ? + virtual bool IsSupported( const wxDataFormat& format ); + + // fill data with data on the clipboard (if available) + virtual bool GetData( wxDataObject& data ); + + // clears wxTheClipboard and the system's clipboard if possible + virtual void Clear(); + + // implementation from now on + bool m_open; + wxDataObjectList m_data; + wxDataIdToDataObjectList m_idToObject; + +private: + DECLARE_DYNAMIC_CLASS(wxClipboard) +}; + +#endif // wxUSE_CLIPBOARD + +#endif // _WX_CLIPBRD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/colour.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/colour.h new file mode 100644 index 0000000000..c30bbee091 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/colour.h @@ -0,0 +1,75 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/colour.h +// Purpose: wxColour class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLOUR_H_ +#define _WX_COLOUR_H_ + +#include "wx/object.h" +#include "wx/string.h" + +// Colour +class WXDLLIMPEXP_CORE wxColour : public wxColourBase +{ + DECLARE_DYNAMIC_CLASS(wxColour) +public: + // constructors + // ------------ + DEFINE_STD_WXCOLOUR_CONSTRUCTORS + + // copy ctors and assignment operators + wxColour( const wxColour& col ); + wxColour& operator = ( const wxColour& col ); + + // dtor + virtual ~wxColour(); + + + // accessors + virtual bool IsOk() const {return m_isInit; } + unsigned char Red() const { return m_red; } + unsigned char Green() const { return m_green; } + unsigned char Blue() const { return m_blue; } + + WXPixel GetPixel() const { return m_pixel; } + void SetPixel(WXPixel pixel) { m_pixel = pixel; m_isInit = true; } + + inline bool operator == (const wxColour& colour) const { return (m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue); } + + inline bool operator != (const wxColour& colour) const { return (!(m_red == colour.m_red && m_green == colour.m_green && m_blue == colour.m_blue)); } + + // Allocate a colour, or nearest colour, using the given display. + // If realloc is true, ignore the existing pixel, otherwise just return + // the existing one. + // Returns the allocated pixel. + + // TODO: can this handle mono displays? If not, we should have an extra + // flag to specify whether this should be black or white by default. + + WXPixel AllocColour(WXDisplay* display, bool realloc = false); + +protected: + // Helper function + void Init(); + + virtual void + InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); + +private: + bool m_isInit; + unsigned char m_red; + unsigned char m_blue; + unsigned char m_green; + +public: + WXPixel m_pixel; +}; + +#endif +// _WX_COLOUR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/combobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/combobox.h new file mode 100644 index 0000000000..15f2249a86 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/combobox.h @@ -0,0 +1,132 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/combobox.h +// Purpose: wxComboBox class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COMBOBOX_H_ +#define _WX_COMBOBOX_H_ + +#include "wx/choice.h" +#include "wx/textentry.h" + +// Combobox item +class WXDLLIMPEXP_CORE wxComboBox : public wxChoice, + public wxTextEntry +{ +public: + wxComboBox() { m_inSetSelection = false; } + virtual ~wxComboBox(); + + inline wxComboBox(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + m_inSetSelection = false; + Create(parent, id, value, pos, size, n, choices, + style, validator, name); + } + + inline wxComboBox(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + m_inSetSelection = false; + Create(parent, id, value, pos, size, choices, + style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + // See wxComboBoxBase discussion of IsEmpty(). + bool IsListEmpty() const { return wxItemContainer::IsEmpty(); } + bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); } + + // resolve ambiguities among virtual functions inherited from both base + // classes + virtual void Clear(); + virtual wxString GetValue() const { return wxTextEntry::GetValue(); } + virtual void SetValue(const wxString& value); + virtual wxString GetStringSelection() const + { return wxChoice::GetStringSelection(); } + + virtual void SetSelection(long from, long to) + { wxTextEntry::SetSelection(from, to); } + virtual void GetSelection(long *from, long *to) const + { wxTextEntry::GetSelection(from, to); } + + + // implementation of wxControlWithItems + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + virtual void DoDeleteOneItem(unsigned int n); + virtual int GetSelection() const ; + virtual void SetSelection(int n); + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual wxString GetString(unsigned int n) const ; + virtual void SetString(unsigned int n, const wxString& s); + + // Implementation + virtual void ChangeFont(bool keepOriginalSize = true); + virtual void ChangeBackgroundColour(); + virtual void ChangeForegroundColour(); + WXWidget GetTopWidget() const { return m_mainWidget; } + WXWidget GetMainWidget() const { return m_mainWidget; } + + //Copied from wxComboBoxBase because for wxMOTIF wxComboBox does not inherit from it. + virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); } + virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); } + +protected: + virtual wxSize DoGetBestSize() const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + // implement wxTextEntry pure virtual methods + virtual wxWindow *GetEditableWindow() { return this; } + virtual WXWidget GetTextWidget() const; + +private: + // only implemented for native combo box + void AdjustDropDownListSize(); + + // implementation detail, should really be private +public: + bool m_inSetSelection; + + DECLARE_DYNAMIC_CLASS(wxComboBox) +}; + +#endif // _WX_COMBOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/control.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/control.h new file mode 100644 index 0000000000..88062ce02d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/control.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/control.h +// Purpose: wxControl class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CONTROL_H_ +#define _WX_CONTROL_H_ + +#include "wx/window.h" +#include "wx/list.h" +#include "wx/validate.h" + +// General item class +class WXDLLIMPEXP_CORE wxControl: public wxControlBase +{ + DECLARE_ABSTRACT_CLASS(wxControl) + +public: + wxControl(); + wxControl( wxWindow *parent, + wxWindowID id, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxControlNameStr ) + { + Create(parent, id, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); + + // simulates the event, returns true if the event was processed + virtual void Command(wxCommandEvent& WXUNUSED(event)) { } + + // calls the callback and appropriate event handlers, returns true if + // event was processed + virtual bool ProcessCommand(wxCommandEvent& event); + + virtual void SetLabel(const wxString& label); + virtual wxString GetLabel() const ; + + bool InSetValue() const { return m_inSetValue; } + +protected: + // calls wxControlBase::CreateControl, also sets foreground, background and + // font to parent's values + bool CreateControl(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name); + + // native implementation using XtQueryGeometry + virtual wxSize DoGetBestSize() const; + + // Motif: prevent callbacks being called while in SetValue + bool m_inSetValue; + + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_CONTROL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/ctrlsub.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/ctrlsub.h new file mode 100644 index 0000000000..582cf854de --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/ctrlsub.h @@ -0,0 +1,39 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/ctrlsub.h +// Purpose: common functionality of wxItemContainer-derived controls +// Author: Vadim Zeitlin +// Created: 2007-07-25 +// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOTIF_CTRLSUB_H_ +#define _WX_MOTIF_CTRLSUB_H_ + +#include "wx/dynarray.h" +#include "wx/generic/ctrlsub.h" + +// ---------------------------------------------------------------------------- +// wxControlWithItems +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxControlWithItems : public wxControlWithItemsGeneric +{ +public: + wxControlWithItems() { } + +protected: + // Motif functions inserting items in the control interpret positions + // differently from wx: they're 1-based and 0 means to append + unsigned int GetMotifPosition(unsigned int pos) const + { + return pos == GetCount() ? 0 : pos + 1; + } + +private: + DECLARE_ABSTRACT_CLASS(wxControlWithItems) + wxDECLARE_NO_COPY_CLASS(wxControlWithItems); +}; + +#endif // _WX_MOTIF_CTRLSUB_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/cursor.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/cursor.h new file mode 100644 index 0000000000..3915d44335 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/cursor.h @@ -0,0 +1,70 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/cursor.h +// Purpose: wxCursor class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CURSOR_H_ +#define _WX_CURSOR_H_ + +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +class WXDLLIMPEXP_FWD_CORE wxImage; + +// Cursor +class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject +{ +public: + wxCursor(); + + wxCursor(const char bits[], int width, int height, + int hotSpotX = -1, int hotSpotY = -1, + const char maskBits[] = NULL, + const wxColour* fg = NULL, const wxColour* bg = NULL); + + wxCursor(const wxString& name, + wxBitmapType type = wxCURSOR_DEFAULT_TYPE, + int hotSpotX = 0, int hotSpotY = 0); + +#if wxUSE_IMAGE + wxCursor(const wxImage& image); +#endif + + wxCursor(wxStockCursor id) { InitFromStock(id); } +#if WXWIN_COMPATIBILITY_2_8 + wxCursor(int id) { InitFromStock((wxStockCursor)id); } +#endif + + virtual ~wxCursor(); + + // Motif-specific. + // Create/get a cursor for the current display + WXCursor GetXCursor(WXDisplay* display) const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + void InitFromStock(wxStockCursor); + + void Create(const char bits[], int width, int height, + int hotSpotX = -1, int hotSpotY = -1, + const char maskBits[] = NULL); + void Create(WXPixmap cursor, WXPixmap mask, int hotSpotX, int hotSpotY); + + // Make a cursor from standard id + WXCursor MakeCursor(WXDisplay* display, wxStockCursor id) const; + + DECLARE_DYNAMIC_CLASS(wxCursor) +}; + +extern WXDLLIMPEXP_CORE void wxSetCursor(const wxCursor& cursor); + +#endif +// _WX_CURSOR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dataform.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dataform.h new file mode 100644 index 0000000000..e1cc2d6473 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dataform.h @@ -0,0 +1,63 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/dataform.h +// Purpose: declaration of the wxDataFormat class +// Author: Robert Roebling +// Modified by: +// Created: 19.10.99 (extracted from motif/dataobj.h) +// Copyright: (c) 1999 Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOTIF_DATAFORM_H +#define _WX_MOTIF_DATAFORM_H + +class WXDLLIMPEXP_CORE wxDataFormat +{ +public: + // the clipboard formats under Xt are Atoms + typedef Atom NativeFormat; + + wxDataFormat(); + wxDataFormat( wxDataFormatId type ); + wxDataFormat( const wxString &id ); + wxDataFormat( NativeFormat format ); + + wxDataFormat& operator=(NativeFormat format) + { SetId(format); return *this; } + + // comparison (must have both versions) + bool operator==(NativeFormat format) const + { return m_format == (NativeFormat)format; } + bool operator!=(NativeFormat format) const + { return m_format != (NativeFormat)format; } + bool operator==(wxDataFormatId format) const + { return m_type == (wxDataFormatId)format; } + bool operator!=(wxDataFormatId format) const + { return m_type != (wxDataFormatId)format; } + + // explicit and implicit conversions to NativeFormat which is one of + // standard data types (implicit conversion is useful for preserving the + // compatibility with old code) + NativeFormat GetFormatId() const { return m_format; } + operator NativeFormat() const { return m_format; } + + void SetId( NativeFormat format ); + + // string ids are used for custom types - this SetId() must be used for + // application-specific formats + wxString GetId() const; + void SetId( const wxString& id ); + + // implementation + wxDataFormatId GetType() const; + +private: + wxDataFormatId m_type; + NativeFormat m_format; + + void PrepareFormats(); + void SetType( wxDataFormatId type ); +}; + + +#endif // _WX_MOTIF_DATAFORM_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dataobj.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dataobj.h new file mode 100644 index 0000000000..e88284f58c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dataobj.h @@ -0,0 +1,23 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/dataobj.h +// Purpose: declaration of the wxDataObject class for Motif +// Author: Julian Smart +// Copyright: (c) 1998 Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOTIF_DATAOBJ_H_ +#define _WX_MOTIF_DATAOBJ_H_ + +// ---------------------------------------------------------------------------- +// wxDataObject is the same as wxDataObjectBase under wxMotif +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase +{ +public: + virtual ~wxDataObject(); +}; + +#endif //_WX_MOTIF_DATAOBJ_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dataobj2.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dataobj2.h new file mode 100644 index 0000000000..d3f274b847 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dataobj2.h @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/dataobj2.h +// Purpose: declaration of standard wxDataObjectSimple-derived classes +// Author: Mattia Barbon +// Created: 27.04.03 +// Copyright: (c) 2003 Mattia Barbon +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOTIF_DATAOBJ2_H_ +#define _WX_MOTIF_DATAOBJ2_H_ + +// ---------------------------------------------------------------------------- +// wxBitmapDataObject is a specialization of wxDataObject for bitmaps +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase +{ +public: + // ctors + wxBitmapDataObject() + : wxBitmapDataObjectBase() { } + wxBitmapDataObject(const wxBitmap& bitmap) + : wxBitmapDataObjectBase(bitmap) { } + + // implement base class pure virtuals + // ---------------------------------- + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + + // unhide base class virtual functions + virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const + { return GetDataSize(); } + virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format), + void *buf) const + { return GetDataHere(buf); } + virtual bool SetData(const wxDataFormat& WXUNUSED(format), + size_t len, const void *buf) + { return SetData(len, buf); } +}; + +#endif // _WX_MOTIF_DATAOBJ2_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dc.h new file mode 100644 index 0000000000..4a96162fdf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dc.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/dc.h +// Purpose: wxMotifDCImpl class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DC_H_ +#define _WX_DC_H_ + +#include "wx/dc.h" + +// ---------------------------------------------------------------------------- +// wxMotifDCImpl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMotifDCImpl : public wxDCImpl +{ +public: + wxMotifDCImpl(wxDC *owner); + + virtual wxSize GetPPI() const; + +protected: + virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); + virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, + bool useMask = false); + + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); + virtual void DoGetSize(int *width, int *height) const; + virtual void DoGetSizeMM(int* width, int* height) const; + +public: + // implementation + wxCoord XDEV2LOG(wxCoord x) const { return DeviceToLogicalX(x); } + wxCoord XDEV2LOGREL(wxCoord x) const { return DeviceToLogicalXRel(x); } + wxCoord YDEV2LOG(wxCoord y) const { return DeviceToLogicalY(y); } + wxCoord YDEV2LOGREL(wxCoord y) const { return DeviceToLogicalYRel(y); } + wxCoord XLOG2DEV(wxCoord x) const { return LogicalToDeviceX(x); } + wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); } + wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); } + wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); } + + // Without device translation, for backing pixmap purposes + wxCoord XLOG2DEV_2(wxCoord x) const + { + return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX; + } + wxCoord YLOG2DEV_2(wxCoord y) const + { + return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY; + } + + DECLARE_DYNAMIC_CLASS(wxMotifDCImpl) +}; + +#endif // _WX_DC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcclient.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcclient.h new file mode 100644 index 0000000000..6dc0b0c522 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcclient.h @@ -0,0 +1,181 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/dcclient.h +// Purpose: wxClientDCImpl, wxPaintDCImpl and wxWindowDCImpl classes +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCCLIENT_H_ +#define _WX_DCCLIENT_H_ + +#include "wx/motif/dc.h" + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +//----------------------------------------------------------------------------- +// wxWindowDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxMotifDCImpl +{ +public: + wxWindowDCImpl(wxDC *owner); + wxWindowDCImpl(wxDC *owner, wxWindow *win); + + virtual ~wxWindowDCImpl(); + + // TODO this function is Motif-only for now - should it go into base class? + void Clear(const wxRect& rect); + + // implement base class pure virtuals + // ---------------------------------- + + virtual void Clear(); + + virtual void SetFont(const wxFont& font); + virtual void SetPen(const wxPen& pen); + virtual void SetBrush(const wxBrush& brush); + virtual void SetBackground(const wxBrush& brush); + virtual void SetBackgroundMode(int mode); + virtual void SetPalette(const wxPalette& palette); + virtual void SetLogicalFunction( wxRasterOperationMode function ); + + virtual void SetTextForeground(const wxColour& colour); + virtual void SetTextBackground(const wxColour& colour); + + virtual wxCoord GetCharHeight() const; + virtual wxCoord GetCharWidth() const; + virtual void DoGetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; + + virtual bool CanDrawBitmap() const; + virtual bool CanGetTextExtent() const; + + virtual int GetDepth() const; + virtual wxSize GetPPI() const; + + virtual void DestroyClippingRegion(); + + // Helper function for setting clipping + void SetDCClipping(WXRegion region); + + // implementation from now on + // -------------------------- + + WXGC GetGC() const { return m_gc; } + WXGC GetBackingGC() const { return m_gcBacking; } + WXDisplay* GetDisplay() const { return m_display; } + bool GetAutoSetting() const { return (m_autoSetting != 0); } // See comment in dcclient.cpp + void SetAutoSetting(bool flag) { m_autoSetting = flag; } + +protected: + // note that this function will call colour.SetPixel, + // and will do one of curCol = colour, curCol = wxWHITE, curCol = wxBLACK + // roundToWhite has an effect for monochrome display only + // if roundToWhite == true then the colour will be set to white unless + // it is RGB 0x000000;if roundToWhite == true the colour wull be set to + // black unless it id RGB 0xffffff + WXPixel CalculatePixel(wxColour& colour, wxColour& curCol, + bool roundToWhite) const; + // sets the foreground pixel taking into account the + // currently selected logical operation + void SetForegroundPixelWithLogicalFunction(WXPixel pixel); + + virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, + wxFloodFillStyle style = wxFLOOD_SURFACE); + + virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const; + + virtual void DoDrawPoint(wxCoord x, wxCoord y); + virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); + + virtual void DoDrawArc(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc); + virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, + double sa, double ea); + + virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, + wxCoord width, wxCoord height, + double radius); + virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + + virtual void DoCrossHair(wxCoord x, wxCoord y); + + virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); + virtual void DoDrawRotatedText(const wxString &text, wxCoord x, wxCoord y, double angle); + + virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); + + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); + virtual void DoSetDeviceClippingRegion(const wxRegion& region); + + virtual void DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset); + virtual void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + + void DoGetSize( int *width, int *height ) const; + + // common part of constructors + void Init(); + + WXGC m_gc; + WXGC m_gcBacking; + WXDisplay* m_display; + wxWindow* m_window; + // Pixmap for drawing on + WXPixmap m_pixmap; + // Last clipping region set on th GC, this is the combination + // of paint clipping region and all user-defined clipping regions + WXRegion m_clipRegion; + + // Not sure if we'll need all of these + WXPixel m_backgroundPixel; + wxColour m_currentColour; + int m_currentPenWidth ; + int m_currentPenJoin ; + int m_currentPenCap ; + int m_currentPenDashCount ; + wxX11Dash* m_currentPenDash ; + wxBitmap m_currentStipple ; + int m_currentStyle ; + int m_currentFill ; + int m_autoSetting ; // See comment in dcclient.cpp + + DECLARE_DYNAMIC_CLASS(wxWindowDCImpl) +}; + +class WXDLLIMPEXP_CORE wxPaintDCImpl: public wxWindowDCImpl +{ +public: + wxPaintDCImpl(wxDC *owner) : wxWindowDCImpl(owner) { } + wxPaintDCImpl(wxDC *owner, wxWindow* win); + + virtual ~wxPaintDCImpl(); + + DECLARE_DYNAMIC_CLASS(wxPaintDCImpl) +}; + +class WXDLLIMPEXP_CORE wxClientDCImpl: public wxWindowDCImpl +{ +public: + wxClientDCImpl(wxDC *owner) : wxWindowDCImpl(owner) { } + wxClientDCImpl(wxDC *owner, wxWindow* win) + : wxWindowDCImpl(owner, win) { } + + DECLARE_DYNAMIC_CLASS(wxClientDCImpl) +}; + +#endif // _WX_DCCLIENT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcmemory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcmemory.h new file mode 100644 index 0000000000..6a2e3e4e4d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcmemory.h @@ -0,0 +1,44 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/dcmemory.h +// Purpose: wxMemoryDCImpl class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCMEMORY_H_ +#define _WX_DCMEMORY_H_ + +#include "wx/motif/dcclient.h" + +class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl +{ +public: + wxMemoryDCImpl(wxMemoryDC *owner) : wxWindowDCImpl(owner) { Init(); } + wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap) + : wxWindowDCImpl(owner) + { + Init(); + DoSelect(bitmap); + } + + wxMemoryDCImpl(wxMemoryDC *owner, wxDC *dc); + virtual ~wxMemoryDCImpl(); + + virtual void DoGetSize( int *width, int *height ) const; + virtual void DoSelect(const wxBitmap& bitmap); + +private: + friend class wxPaintDC; + + void Init(); + + wxBitmap m_bitmap; + + DECLARE_DYNAMIC_CLASS(wxMemoryDCImpl) +}; + +#endif +// _WX_DCMEMORY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcprint.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcprint.h new file mode 100644 index 0000000000..d0e133cb51 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcprint.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/dcprint.h +// Purpose: wxPrinterDC class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCPRINT_H_ +#define _WX_DCPRINT_H_ + +#include "wx/motif/dc.h" + +class WXDLLIMPEXP_CORE wxPrinterDC : public wxMotifDCImpl +{ +public: + // Create a printer DC + wxPrinterDCImpl(const wxString& driver, const wxString& device, + const wxString& output, + bool interactive = true, + wxPrintOrientation orientation = wxPORTRAIT); + virtual ~wxPrinterDC(); + + wxRect GetPaperRect() const; + + DECLARE_CLASS(wxPrinterDCImpl) +}; + +#endif // _WX_DCPRINT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcscreen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcscreen.h new file mode 100644 index 0000000000..e12af87660 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dcscreen.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/dcscreen.h +// Purpose: wxScreenDCImpl class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCSCREEN_H_ +#define _WX_DCSCREEN_H_ + +#include "wx/motif/dcclient.h" + +class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxWindowDCImpl +{ +public: + // Create a DC representing the whole screen + wxScreenDCImpl(wxScreenDC *owner); + virtual ~wxScreenDCImpl(); + + // Compatibility with X's requirements for + // drawing on top of all windows + static bool StartDrawingOnTop(wxWindow* window); + static bool StartDrawingOnTop(wxRect* rect = NULL); + static bool EndDrawingOnTop(); + +private: + static WXWindow sm_overlayWindow; + + // If we have started transparent drawing at a non-(0,0) point + // then we will have to adjust the device origin in the + // constructor. + static int sm_overlayWindowX; + static int sm_overlayWindowY; + + DECLARE_DYNAMIC_CLASS(wxScreenDCImpl) +}; + +#endif // _WX_DCSCREEN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dialog.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dialog.h new file mode 100644 index 0000000000..f826926bfd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dialog.h @@ -0,0 +1,88 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/dialog.h +// Purpose: wxDialog class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIALOG_H_ +#define _WX_DIALOG_H_ + +class WXDLLIMPEXP_FWD_CORE wxEventLoop; + +// Dialog boxes +class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase +{ +public: + wxDialog(); + + wxDialog(wxWindow *parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr) + { + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr); + + virtual ~wxDialog(); + + virtual bool Destroy(); + + virtual bool Show(bool show = true); + + void SetTitle(const wxString& title); + + void SetModal(bool flag); + + virtual bool IsModal() const + { return m_modalShowing; } + + virtual int ShowModal(); + virtual void EndModal(int retCode); + + // Implementation + virtual void ChangeFont(bool keepOriginalSize = true); + virtual void ChangeBackgroundColour(); + virtual void ChangeForegroundColour(); + WXWidget GetTopWidget() const { return m_mainWidget; } + WXWidget GetClientWidget() const { return m_mainWidget; } + +private: + virtual bool XmDoCreateTLW(wxWindow* parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name); + + + //// Motif-specific + bool m_modalShowing; + wxEventLoop* m_eventLoop; + +protected: + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + virtual void DoSetClientSize(int width, int height); + + +private: + DECLARE_DYNAMIC_CLASS(wxDialog) +}; + +#endif // _WX_DIALOG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dnd.h new file mode 100644 index 0000000000..bc6baaa315 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/dnd.h @@ -0,0 +1,171 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/dnd.h +// Purpose: declaration of wxDropTarget, wxDropSource classes +// Author: Julian Smart +// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling, Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DND_H_ +#define _WX_DND_H_ + +#include "wx/defs.h" + +#if wxUSE_DRAG_AND_DROP + +#include "wx/object.h" +#include "wx/string.h" +#include "wx/dataobj.h" +#include "wx/cursor.h" + +//------------------------------------------------------------------------- +// classes +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class WXDLLIMPEXP_FWD_CORE wxDropTarget; +class WXDLLIMPEXP_FWD_CORE wxTextDropTarget; +class WXDLLIMPEXP_FWD_CORE wxFileDropTarget; +class WXDLLIMPEXP_FWD_CORE wxPrivateDropTarget; + +class WXDLLIMPEXP_FWD_CORE wxDropSource; + +//------------------------------------------------------------------------- +// wxDropTarget +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropTarget: public wxObject +{ +public: + + wxDropTarget(); + virtual ~wxDropTarget(); + + virtual void OnEnter() { } + virtual void OnLeave() { } + virtual bool OnDrop( long x, long y, const void *data, size_t size ) = 0; + + // Override these to indicate what kind of data you support: + + virtual size_t GetFormatCount() const = 0; + virtual wxDataFormat GetFormat(size_t n) const = 0; + + // implementation +}; + +//------------------------------------------------------------------------- +// wxTextDropTarget +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextDropTarget: public wxDropTarget +{ +public: + + wxTextDropTarget() {} + virtual bool OnDrop( long x, long y, const void *data, size_t size ); + virtual bool OnDropText( long x, long y, const char *psz ); + +protected: + + virtual size_t GetFormatCount() const; + virtual wxDataFormat GetFormat(size_t n) const; +}; + +//------------------------------------------------------------------------- +// wxPrivateDropTarget +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPrivateDropTarget: public wxDropTarget +{ +public: + + wxPrivateDropTarget(); + + // you have to override OnDrop to get at the data + + // the string ID identifies the format of clipboard or DnD data. a word + // processor would e.g. add a wxTextDataObject and a wxPrivateDataObject + // to the clipboard - the latter with the Id "WXWORD_FORMAT". + + void SetId( const wxString& id ) + { m_id = id; } + + wxString GetId() + { return m_id; } + +private: + + virtual size_t GetFormatCount() const; + virtual wxDataFormat GetFormat(size_t n) const; + + wxString m_id; +}; + +// ---------------------------------------------------------------------------- +// A drop target which accepts files (dragged from File Manager or Explorer) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDropTarget: public wxDropTarget +{ +public: + + wxFileDropTarget() {} + + virtual bool OnDrop( long x, long y, const void *data, size_t size ); + virtual bool OnDropFiles( long x, long y, + size_t nFiles, const char * const aszFiles[] ); + +protected: + + virtual size_t GetFormatCount() const; + virtual wxDataFormat GetFormat(size_t n) const; +}; + +//------------------------------------------------------------------------- +// wxDropSource +//------------------------------------------------------------------------- + +enum wxDragResult +{ + wxDragError, // error prevented the d&d operation from completing + wxDragNone, // drag target didn't accept the data + wxDragCopy, // the data was successfully copied + wxDragMove, // the data was successfully moved + wxDragCancel // the operation was cancelled by user (not an error) +}; + +class WXDLLIMPEXP_CORE wxDropSource: public wxObject +{ +public: + + wxDropSource( wxWindow *win ); + wxDropSource( wxDataObject &data, wxWindow *win ); + + virtual ~wxDropSource(void); + + void SetData( wxDataObject &data ); + wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); + + virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return true; } + + // implementation +#if 0 + void RegisterWindow(void); + void UnregisterWindow(void); + + wxWindow *m_window; + wxDragResult m_retValue; + wxDataObject *m_data; + + wxCursor m_defaultCursor; + wxCursor m_goaheadCursor; +#endif +}; + +#endif + +// wxUSE_DRAG_AND_DROP + +#endif +//_WX_DND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/filedlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/filedlg.h new file mode 100644 index 0000000000..8a44a32add --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/filedlg.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/filedlg.h +// Purpose: wxFileDialog class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILEDLG_H_ +#define _WX_FILEDLG_H_ + +//------------------------------------------------------------------------- +// wxFileDialog +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase +{ + DECLARE_DYNAMIC_CLASS(wxFileDialog) +public: + + // For Motif + static wxString m_fileSelectorAnswer; + static bool m_fileSelectorReturned; + +public: + wxFileDialog(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr); + + virtual int ShowModal(); +}; + +#endif // _WX_FILEDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/font.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/font.h new file mode 100644 index 0000000000..470d56a30c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/font.h @@ -0,0 +1,163 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/font.h +// Purpose: wxFont class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONT_H_ +#define _WX_FONT_H_ + +#if __WXMOTIF20__ && !__WXLESSTIF__ + #define wxMOTIF_USE_RENDER_TABLE 1 +#else + #define wxMOTIF_USE_RENDER_TABLE 0 +#endif +#define wxMOTIF_NEW_FONT_HANDLING wxMOTIF_USE_RENDER_TABLE + +class wxXFont; + +// Font +class WXDLLIMPEXP_CORE wxFont : public wxFontBase +{ +public: + // ctors and such + wxFont() { } + + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + + wxFont(const wxNativeFontInfo& info); + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxFont(int size, + int family, + int style, + int weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding); + } +#endif + + wxFont(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(size, family, style, weight, underlined, face, encoding); + } + + wxFont(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(10, family, style, weight, underlined, face, encoding); + SetPixelSize(pixelSize); + } + + bool Create(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + + // wxMOTIF-specific + bool Create(const wxString& fontname, + wxFontEncoding fontenc = wxFONTENCODING_DEFAULT); + bool Create(const wxNativeFontInfo& fontinfo); + + virtual ~wxFont(); + + // implement base class pure virtuals + virtual int GetPointSize() const; + virtual wxFontStyle GetStyle() const; + virtual wxFontWeight GetWeight() const; + virtual bool GetUnderlined() const; + virtual wxString GetFaceName() const; + virtual wxFontEncoding GetEncoding() const; + virtual const wxNativeFontInfo *GetNativeFontInfo() const; + + virtual void SetPointSize(int pointSize); + virtual void SetFamily(wxFontFamily family); + virtual void SetStyle(wxFontStyle style); + virtual void SetWeight(wxFontWeight weight); + virtual bool SetFaceName(const wxString& faceName); + virtual void SetUnderlined(bool underlined); + virtual void SetEncoding(wxFontEncoding encoding); + + wxDECLARE_COMMON_FONT_METHODS(); + + // Implementation + + // Find an existing, or create a new, XFontStruct + // based on this wxFont and the given scale. Append the + // font to list in the private data for future reference. + + // TODO This is a fairly basic implementation, that doesn't + // allow for different facenames, and also doesn't do a mapping + // between 'standard' facenames (e.g. Arial, Helvetica, Times Roman etc.) + // and the fonts that are available on a particular system. + // Maybe we need to scan the user's machine to build up a profile + // of the fonts and a mapping file. + + // Return font struct, and optionally the Motif font list + wxXFont *GetInternalFont(double scale = 1.0, + WXDisplay* display = NULL) const; + + // These two are helper functions for convenient access of the above. +#if wxMOTIF_USE_RENDER_TABLE + WXFontSet GetFontSet(double scale, WXDisplay* display = NULL) const; + WXRenderTable GetRenderTable(WXDisplay* display) const; +#else // if !wxMOTIF_USE_RENDER_TABLE + WXFontStructPtr GetFontStruct(double scale = 1.0, + WXDisplay* display = NULL) const; + WXFontList GetFontList(double scale = 1.0, + WXDisplay* display = NULL) const; +#endif // !wxMOTIF_USE_RENDER_TABLE + // returns either a XmFontList or XmRenderTable, depending + // on Motif version + WXFontType GetFontType(WXDisplay* display) const; + // like the function above but does a copy for XmFontList + WXFontType GetFontTypeC(WXDisplay* display) const; + static WXString GetFontTag(); + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info ); + virtual wxFontFamily DoGetFamily() const; + + void Unshare(); + +private: + DECLARE_DYNAMIC_CLASS(wxFont) +}; + +#endif // _WX_FONT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/frame.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/frame.h new file mode 100644 index 0000000000..3815420d5e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/frame.h @@ -0,0 +1,128 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/frame.h +// Purpose: wxFrame class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOTIF_FRAME_H_ +#define _WX_MOTIF_FRAME_H_ + +class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase +{ +public: + wxFrame() { Init(); } + wxFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxFrame(); + + virtual bool Show(bool show = true); + + // Set menu bar + void SetMenuBar(wxMenuBar *menu_bar); + + // Set title + void SetTitle(const wxString& title); + + // Set icon + virtual void SetIcons(const wxIconBundle& icons); + +#if wxUSE_STATUSBAR + virtual void PositionStatusBar(); +#endif // wxUSE_STATUSBAR + + // Create toolbar +#if wxUSE_TOOLBAR + virtual wxToolBar* CreateToolBar(long style = -1, + wxWindowID id = wxID_ANY, + const wxString& name = wxToolBarNameStr); + virtual void SetToolBar(wxToolBar *toolbar); + virtual void PositionToolBar(); +#endif // wxUSE_TOOLBAR + + // Implementation only from now on + // ------------------------------- + + void OnSysColourChanged(wxSysColourChangedEvent& event); + void OnActivate(wxActivateEvent& event); + + virtual void ChangeFont(bool keepOriginalSize = true); + virtual void ChangeBackgroundColour(); + virtual void ChangeForegroundColour(); + WXWidget GetMenuBarWidget() const; + WXWidget GetShellWidget() const { return m_frameShell; } + WXWidget GetWorkAreaWidget() const { return m_workArea; } + WXWidget GetClientAreaWidget() const { return m_clientArea; } + WXWidget GetTopWidget() const { return m_frameShell; } + + virtual WXWidget GetMainWidget() const { return m_mainWidget; } + + // The widget that can have children on it + WXWidget GetClientWidget() const; + bool GetVisibleStatus() const { return m_visibleStatus; } + void SetVisibleStatus( bool status ) { m_visibleStatus = status; } + + bool PreResize(); + + // for generic/mdig.h + virtual void DoGetClientSize(int *width, int *height) const; + +private: + // common part of all ctors + void Init(); + + // set a single icon for the frame + void DoSetIcon( const wxIcon& icon ); + + //// Motif-specific + WXWidget m_frameShell; + WXWidget m_workArea; + WXWidget m_clientArea; + bool m_visibleStatus; + bool m_iconized; + + virtual void DoGetSize(int *width, int *height) const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoSetClientSize(int width, int height); + +private: + virtual bool XmDoCreateTLW(wxWindow* parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name); + + + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxFrame) +}; + +#endif // _WX_MOTIF_FRAME_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/gauge.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/gauge.h new file mode 100644 index 0000000000..f839c2cc93 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/gauge.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/gauge.h +// Purpose: wxGauge class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GAUGE_H_ +#define _WX_GAUGE_H_ + +// Group box +class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase +{ + DECLARE_DYNAMIC_CLASS(wxGauge) + +public: + inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; } + + inline wxGauge(wxWindow *parent, wxWindowID id, + int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + 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, wxWindowID id, + int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr); + + void SetShadowWidth(int w); + void SetRange(int r); + void SetValue(int pos); + + int GetShadowWidth() const ; + int GetRange() const ; + int GetValue() const ; + + virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ; + +private: + virtual wxSize DoGetBestSize() const; + virtual void DoMoveWindow(int x, int y, int width, int height); +}; + +#endif +// _WX_GAUGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/icon.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/icon.h new file mode 100644 index 0000000000..8b2620bf4a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/icon.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/icon.h +// Purpose: wxIcon class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ICON_H_ +#define _WX_ICON_H_ + +#include "wx/bitmap.h" + +// Icon +class WXDLLIMPEXP_CORE wxIcon : public wxBitmap +{ +public: + wxIcon(); + + // Initialize with XBM data + wxIcon(const char bits[], int width, int height); + + // Initialize with XPM data + wxIcon(const char* const* data); +#ifdef wxNEEDS_CHARPP + wxIcon(char **data); +#endif + + wxIcon(const wxString& name, wxBitmapType type = wxICON_DEFAULT_TYPE, + int desiredWidth = -1, int desiredHeight = -1) + { + LoadFile(name, type, desiredWidth, desiredHeight); + } + + wxIcon(const wxIconLocation& loc) + { + LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ANY); + } + + virtual ~wxIcon(); + + bool LoadFile(const wxString& name, wxBitmapType type, + int desiredWidth, int desiredHeight); + + // unhide the base class version + virtual bool LoadFile(const wxString& name, + wxBitmapType flags = wxICON_DEFAULT_TYPE) + { return LoadFile(name, flags); } + + // create from bitmap (which should have a mask unless it's monochrome): + // there shouldn't be any implicit bitmap -> icon conversion (i.e. no + // ctors, assignment operators...), but it's ok to have such function + void CopyFromBitmap(const wxBitmap& bmp); + + + DECLARE_DYNAMIC_CLASS(wxIcon) +}; + +#endif // _WX_ICON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/listbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/listbox.h new file mode 100644 index 0000000000..0b8b91a59f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/listbox.h @@ -0,0 +1,104 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/listbox.h +// Purpose: wxListBox class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LISTBOX_H_ +#define _WX_LISTBOX_H_ + +#include "wx/ctrlsub.h" +#include "wx/clntdata.h" + +// forward decl for GetSelections() +class WXDLLIMPEXP_FWD_BASE wxArrayInt; + +// List box item +class WXDLLIMPEXP_CORE wxListBox: public wxListBoxBase +{ + DECLARE_DYNAMIC_CLASS(wxListBox) + +public: + wxListBox(); + wxListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Create(parent, id, pos, size, n, choices, style, validator, name); + } + + wxListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Create(parent, id, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + // implementation of wxControlWithItems + virtual unsigned int GetCount() const; + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + virtual int GetSelection() const; + virtual void DoDeleteOneItem(unsigned int n); + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual void DoClear(); + virtual void SetString(unsigned int n, const wxString& s); + virtual wxString GetString(unsigned int n) const; + + // implementation of wxListBoxbase + virtual void DoSetSelection(int n, bool select); + virtual void DoSetFirstItem(int n); + virtual int GetSelections(wxArrayInt& aSelections) const; + virtual bool IsSelected(int n) const; + + // For single or multiple choice list item + void Command(wxCommandEvent& event); + + // Implementation + virtual void ChangeBackgroundColour(); + virtual void ChangeForegroundColour(); + WXWidget GetTopWidget() const; + +#if wxUSE_CHECKLISTBOX + virtual void DoToggleItem(int WXUNUSED(item), int WXUNUSED(x)) {} +#endif +protected: + virtual wxSize DoGetBestSize() const; + + unsigned int m_noItems; + +private: + void SetSelectionPolicy(); +}; + +#endif +// _WX_LISTBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/menu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/menu.h new file mode 100644 index 0000000000..822a13d28b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/menu.h @@ -0,0 +1,174 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/menu.h +// Purpose: wxMenu, wxMenuBar classes +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOTIF_MENU_H_ +#define _WX_MOTIF_MENU_H_ + +#include "wx/colour.h" +#include "wx/font.h" +#include "wx/arrstr.h" + +class WXDLLIMPEXP_FWD_CORE wxFrame; + +// ---------------------------------------------------------------------------- +// Menu +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase +{ +public: + // ctors & dtor + wxMenu(const wxString& title, long style = 0) + : wxMenuBase(title, style) { Init(); } + + wxMenu(long style = 0) : wxMenuBase(style) { Init(); } + + virtual ~wxMenu(); + + // implement base class virtuals + virtual wxMenuItem* DoAppend(wxMenuItem *item); + virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); + virtual wxMenuItem* DoRemove(wxMenuItem *item); + + virtual void Break(); + + virtual void SetTitle(const wxString& title); + + bool ProcessCommand(wxCommandEvent& event); + + //// Motif-specific + WXWidget GetButtonWidget() const { return m_buttonWidget; } + void SetButtonWidget(WXWidget buttonWidget) { m_buttonWidget = buttonWidget; } + + WXWidget GetMainWidget() const { return m_menuWidget; } + + int GetId() const { return m_menuId; } + void SetId(int id) { m_menuId = id; } + + void SetMenuBar(wxMenuBar* menuBar) { m_menuBar = menuBar; } + wxMenuBar* GetMenuBar() const { return m_menuBar; } + + void CreatePopup(WXWidget logicalParent, int x, int y); + void DestroyPopup(); + void ShowPopup(int x, int y); + void HidePopup(); + + WXWidget CreateMenu(wxMenuBar *menuBar, WXWidget parent, wxMenu *topMenu, + size_t index, const wxString& title = wxEmptyString, + bool isPulldown = false); + + // For popups, need to destroy, then recreate menu for a different (or + // possibly same) window, since the parent may change. + void DestroyMenu(bool full); + WXWidget FindMenuItem(int id, wxMenuItem **it = NULL) const; + + const wxColour& GetBackgroundColour() const { return m_backgroundColour; } + const wxColour& GetForegroundColour() const { return m_foregroundColour; } + const wxFont& GetFont() const { return m_font; } + + void SetBackgroundColour(const wxColour& colour); + void SetForegroundColour(const wxColour& colour); + void SetFont(const wxFont& colour); + void ChangeFont(bool keepOriginalSize = false); + + WXWidget GetHandle() const { return m_menuWidget; } + + bool IsTearOff() const { return (m_style & wxMENU_TEAROFF) != 0; } + + void DestroyWidgetAndDetach(); +public: + // Motif-specific data + int m_numColumns; + WXWidget m_menuWidget; + WXWidget m_popupShell; // For holding the popup shell widget + WXWidget m_buttonWidget; // The actual string, so we can grey it etc. + int m_menuId; + wxMenu* m_topLevelMenu ; + bool m_ownedByMenuBar; + wxColour m_foregroundColour; + wxColour m_backgroundColour; + wxFont m_font; + +private: + // common code for both constructors: + void Init(); + + DECLARE_DYNAMIC_CLASS(wxMenu) +}; + +// ---------------------------------------------------------------------------- +// Menu Bar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase +{ +public: + wxMenuBar() { Init(); } + wxMenuBar(long WXUNUSED(style)) { Init(); } + wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); + wxMenuBar(size_t n, wxMenu *menus[], const wxArrayString& titles, long style = 0); + virtual ~wxMenuBar(); + + // implement base class (pure) virtuals + // ------------------------------------ + + virtual bool Append( wxMenu *menu, const wxString &title ); + virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Remove(size_t pos); + + virtual int FindMenuItem(const wxString& menuString, + const wxString& itemString) const; + virtual wxMenuItem* FindItem( int id, wxMenu **menu = NULL ) const; + + virtual void EnableTop( size_t pos, bool flag ); + virtual void SetMenuLabel( size_t pos, const wxString& label ); + virtual wxString GetMenuLabel( size_t pos ) const; + + // implementation only from now on + // ------------------------------- + + wxFrame* GetMenuBarFrame() const { return m_menuBarFrame; } + void SetMenuBarFrame(wxFrame* frame) { m_menuBarFrame = frame; } + WXWidget GetMainWidget() const { return m_mainWidget; } + void SetMainWidget(WXWidget widget) { m_mainWidget = widget; } + + // Create menubar + bool CreateMenuBar(wxFrame* frame); + + // Destroy menubar, but keep data structures intact so we can recreate it. + bool DestroyMenuBar(); + + const wxColour& GetBackgroundColour() const { return m_backgroundColour; } + const wxColour& GetForegroundColour() const { return m_foregroundColour; } + const wxFont& GetFont() const { return m_font; } + + virtual bool SetBackgroundColour(const wxColour& colour); + virtual bool SetForegroundColour(const wxColour& colour); + virtual bool SetFont(const wxFont& colour); + void ChangeFont(bool keepOriginalSize = false); + +public: + // common part of all ctors + void Init(); + + wxArrayString m_titles; + wxFrame *m_menuBarFrame; + + WXWidget m_mainWidget; + + wxColour m_foregroundColour; + wxColour m_backgroundColour; + wxFont m_font; + + DECLARE_DYNAMIC_CLASS(wxMenuBar) +}; + +#endif // _WX_MOTIF_MENU_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/menuitem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/menuitem.h new file mode 100644 index 0000000000..541e970a89 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/menuitem.h @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/menuitem.h +// Purpose: wxMenuItem class +// Author: Vadim Zeitlin +// Modified by: +// Created: 11.11.97 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOTIF_MENUITEM_H +#define _WX_MOTIF_MENUITEM_H + +#include "wx/bitmap.h" + +class WXDLLIMPEXP_FWD_CORE wxMenuBar; + +// ---------------------------------------------------------------------------- +// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase +{ +public: + // ctor & dtor + wxMenuItem(wxMenu *parentMenu = NULL, + int id = wxID_SEPARATOR, + const wxString& text = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL, + wxMenu *subMenu = NULL); + virtual ~wxMenuItem(); + + // accessors (some more are inherited from wxOwnerDrawn or are below) + virtual void SetItemLabel(const wxString& label); + virtual void Enable(bool enable = true); + virtual void Check(bool check = true); + // included SetBitmap and GetBitmap as copied from the GTK include file + // I'm not sure if this works but it silences the linker in the + // menu sample. + // JJ + virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } + virtual const wxBitmap& GetBitmap() const { return m_bitmap; } + + // implementation from now on + void CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMenu, + size_t index); + void DestroyItem(bool full); + + WXWidget GetButtonWidget() const { return m_buttonWidget; } + + wxMenuBar* GetMenuBar() const { return m_menuBar; } + void SetMenuBar(wxMenuBar* menuBar) { m_menuBar = menuBar; } + + wxMenu* GetTopMenu() const { return m_topMenu; } + void SetTopMenu(wxMenu* menu) { m_topMenu = menu; } + +private: + WXWidget m_buttonWidget; + wxMenuBar* m_menuBar; + wxMenu* m_topMenu; // Top-level menu e.g. popup-menu + wxBitmap m_bitmap; // Bitmap for menuitem, if any + + DECLARE_DYNAMIC_CLASS(wxMenuItem) +}; + +#endif // _WX_MOTIF_MENUITEM_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/minifram.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/minifram.h new file mode 100644 index 0000000000..f04a9ea989 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/minifram.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/minifram.h +// Purpose: wxMiniFrame class. A small frame for e.g. floating toolbars. +// If there is no equivalent on your platform, just make it a +// normal frame. +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MINIFRAM_H_ +#define _WX_MINIFRAM_H_ + +#include "wx/frame.h" + +class WXDLLIMPEXP_CORE wxMiniFrame: public wxFrame { + + DECLARE_DYNAMIC_CLASS(wxMiniFrame) + +public: + inline wxMiniFrame() {} + inline wxMiniFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION, + const wxString& name = wxFrameNameStr) + { + // Use wxFrame constructor in absence of more specific code. + Create(parent, id, title, pos, size, style, name); + } + + virtual ~wxMiniFrame() {} +protected: +}; + +#endif +// _WX_MINIFRAM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/msgdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/msgdlg.h new file mode 100644 index 0000000000..c662da2deb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/msgdlg.h @@ -0,0 +1,43 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/msgdlg.h +// Purpose: wxMessageDialog class. Use generic version if no +// platform-specific implementation. +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSGBOXDLG_H_ +#define _WX_MSGBOXDLG_H_ + +// ---------------------------------------------------------------------------- +// Message box dialog +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase +{ +public: + wxMessageDialog(wxWindow *parent, + const wxString& message, + const wxString& caption = wxMessageBoxCaptionStr, + long style = wxOK | wxCENTRE, + const wxPoint& WXUNUSED(pos) = wxDefaultPosition) + : wxMessageDialogBase(parent, message, caption, style) + { + } + + virtual int ShowModal(); + + // implementation only from now on + // called by the Motif callback + void SetResult(long result) { m_result = result; } + +protected: + long m_result; + + DECLARE_DYNAMIC_CLASS(wxMessageDialog) +}; + +#endif // _WX_MSGBOXDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/popupwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/popupwin.h new file mode 100644 index 0000000000..8ef11f1e1b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/popupwin.h @@ -0,0 +1,35 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/popupwin.h +// Purpose: wxPopupWindow class for wxMotif +// Author: Mattia Barbon +// Modified by: +// Created: 28.08.03 +// Copyright: (c) 2003 Mattia Barbon +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOTIF_POPUPWIN_H_ +#define _WX_MOTIF_POPUPWIN_H_ + +// ---------------------------------------------------------------------------- +// wxPopupWindow +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPopupWindow : public wxPopupWindowBase +{ +public: + wxPopupWindow() { Init(); } + + wxPopupWindow( wxWindow *parent, int flags = wxBORDER_NONE ) + { Init(); (void)Create( parent, flags ); } + + bool Create( wxWindow *parent, int flags = wxBORDER_NONE ); + + virtual bool Show( bool show = true ); +private: + void Init() { m_isShown = false; } + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow) +}; + +#endif // _WX_MOTIF_POPUPWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/print.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/print.h new file mode 100644 index 0000000000..258a8091d8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/print.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/print.h +// Purpose: wxPrinter, wxPrintPreview classes +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRINT_H_ +#define _WX_PRINT_H_ + +#include "wx/prntbase.h" + +/* +* Represents the printer: manages printing a wxPrintout object +*/ + +class WXDLLIMPEXP_CORE wxPrinter: public wxPrinterBase +{ + DECLARE_DYNAMIC_CLASS(wxPrinter) + +public: + wxPrinter(wxPrintData *data = NULL); + virtual ~wxPrinter(); + + 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 WXDLLIMPEXP_CORE wxPrintPreview: public wxPrintPreviewBase +{ + DECLARE_CLASS(wxPrintPreview) + +public: + wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL); + virtual ~wxPrintPreview(); + + virtual bool Print(bool interactive); + virtual void DetermineScaling(); +}; + +#endif +// _WX_PRINT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/private.h new file mode 100644 index 0000000000..f36fd8d6dd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/private.h @@ -0,0 +1,222 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/private.h +// Purpose: Private declarations for wxMotif port +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_H_ +#define _WX_PRIVATE_H_ + +#include "wx/defs.h" +#include <X11/Xlib.h> +#include <Xm/Xm.h> +#include "wx/evtloop.h" + +class WXDLLIMPEXP_FWD_CORE wxFont; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxSize; +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxColour; + +#include "wx/x11/privx.h" + +// Put any private declarations here: native Motif types may be used because +// this header is included after Xm/Xm.h + +// ---------------------------------------------------------------------------- +// convenience macros +// ---------------------------------------------------------------------------- + +#define wxCHECK_MOTIF_VERSION( major, minor ) \ + ( XmVersion >= (major) * 1000 + (minor) ) + +#define wxCHECK_LESSTIF_VERSION( major, minor ) \ + ( LesstifVersion >= (major) * 1000 + (minor) ) + +#define wxCHECK_LESSTIF() ( __WXLESSTIF__ ) + +// some compilers (e.g. Sun CC) give warnings when treating string literals as +// (non const) "char *" but many Motif functions take "char *" parameters which +// are really "const char *" so use this macro to suppress the warnings when we +// know it's ok +#define wxMOTIF_STR(x) const_cast<char *>(x) + +// ---------------------------------------------------------------------------- +// Miscellaneous functions +// ---------------------------------------------------------------------------- + +WXWidget wxCreateBorderWidget( WXWidget parent, long style ); + +// ---------------------------------------------------------------------------- +// common callbacks +// ---------------------------------------------------------------------------- + +// All widgets should have this as their resize proc. +extern void wxWidgetResizeProc(Widget w, XConfigureEvent *event, + String args[], int *num_args); + +// For repainting arbitrary windows +void wxUniversalRepaintProc(Widget w, XtPointer WXUNUSED(c_data), + XEvent *event, char *); + +// ---------------------------------------------------------------------------- +// we maintain a hash table which contains the mapping from Widget to wxWindow +// corresponding to the window for this widget +// ---------------------------------------------------------------------------- + +extern void wxDeleteWindowFromTable(Widget w); +extern wxWindow *wxGetWindowFromTable(Widget w); +extern bool wxAddWindowToTable(Widget w, wxWindow *win); + +// ---------------------------------------------------------------------------- +// wxBitmap related functions +// ---------------------------------------------------------------------------- + +// Creates a bitmap with transparent areas drawn in the given colour. +wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, const wxColour& colour); + +// ---------------------------------------------------------------------------- +// key events related functions +// ---------------------------------------------------------------------------- + +extern char wxFindMnemonic(const char* s); + +extern char * wxFindAccelerator (const char *s); +extern XmString wxFindAcceleratorText (const char *s); + +// ---------------------------------------------------------------------------- +// TranslateXXXEvent() functions - translate Motif event to wxWindow one +// ---------------------------------------------------------------------------- + +extern bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, + Widget widget, const XEvent *xevent); +extern bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, + Widget widget, const XEvent *xevent); + +extern void wxDoChangeForegroundColour(WXWidget widget, + wxColour& foregroundColour); +extern void wxDoChangeBackgroundColour(WXWidget widget, + const wxColour& backgroundColour, + bool changeArmColour = false); +extern void wxDoChangeFont(WXWidget widget, const wxFont& font); +extern void wxGetTextExtent(WXDisplay* display, const wxFont& font, + double scale, + const wxString& string, int* width, int* height, + int* ascent, int* descent); +extern void wxGetTextExtent(const wxWindow* window, const wxString& str, + int* width, int* height, + int* ascent, int* descent); + +#define wxNO_COLORS 0x00 +#define wxBACK_COLORS 0x01 +#define wxFORE_COLORS 0x02 + +extern XColor itemColors[5] ; + +#define wxBACK_INDEX 0 +#define wxFORE_INDEX 1 +#define wxSELE_INDEX 2 +#define wxTOPS_INDEX 3 +#define wxBOTS_INDEX 4 + +// ---------------------------------------------------------------------------- +// XmString/wxString conversion utilities +// ---------------------------------------------------------------------------- + +wxString wxXmStringToString( const XmString& xmString ); +XmString wxStringToXmString( const char* string ); +inline XmString wxStringToXmString( const wxScopedCharBuffer& string ) + { return wxStringToXmString(string.data()); } +inline XmString wxStringToXmString( const wxString& string ) + { return wxStringToXmString((const char*)string.mb_str()); } + +// XmString made easy to use in wxWidgets (and has an added benefit of +// cleaning up automatically) +class wxXmString +{ + void Init(const char *str) + { + m_string = XmStringCreateLtoR + ( + const_cast<char *>(str), + const_cast<char *>(XmSTRING_DEFAULT_CHARSET) + ); + } + +public: + wxXmString(const char* str) + { + Init(str); + } + + wxXmString(const wchar_t* str) + { + Init(wxConvLibc.cWC2MB(str)); + } + + wxXmString(const wxString& str) + { + Init(str.mb_str()); + } + + wxXmString(const wxCStrData& str) + { + Init(str); + } + + // just to avoid calling XmStringFree() + wxXmString(const XmString& string) { m_string = string; } + + ~wxXmString() { XmStringFree(m_string); } + + // semi-implicit conversion to XmString (shouldn't rely on implicit + // conversion because many of Motif functions are macros) + XmString operator()() const { return m_string; } + +private: + XmString m_string; +}; + +// ---------------------------------------------------------------------------- +// Routines used in both wxTextCtrl/wxListBox and nativa wxComboBox +// (defined in src/motif/listbox.cpp or src/motif/textctrl.cpp +// ---------------------------------------------------------------------------- + +int wxDoFindStringInList( Widget listWidget, const wxString& str ); +int wxDoGetSelectionInList( Widget listWidget ); +wxString wxDoGetStringInList( Widget listWidget, int n ); +wxSize wxDoGetListBoxBestSize( Widget listWidget, const wxWindow* window ); + +wxSize wxDoGetSingleTextCtrlBestSize( Widget textWidget, + const wxWindow* window ); + +// ---------------------------------------------------------------------------- +// event-related functions +// ---------------------------------------------------------------------------- + +// executes one main loop iteration (implemented in src/motif/evtloop.cpp) +// returns true if the loop should be exited +bool wxDoEventLoopIteration( wxGUIEventLoop& evtLoop ); + +// Consume all events until no more left +void wxFlushEvents(WXDisplay* display); + +// ---------------------------------------------------------------------------- +// macros to avoid casting WXFOO to Foo all the time +// ---------------------------------------------------------------------------- + +// argument is of type "wxWindow *" +#define GetWidget(w) ((Widget)(w)->GetHandle()) + +// ---------------------------------------------------------------------------- +// accessors for C modules +// ---------------------------------------------------------------------------- + +extern "C" XtAppContext wxGetAppContext(); + +#endif +// _WX_PRIVATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/private/timer.h new file mode 100644 index 0000000000..65a60f88c1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/private/timer.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/private/timer.h +// Purpose: wxTimer class +// Author: Julian Smart +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOTIF_PRIVATE_TIMER_H_ +#define _WX_MOTIF_PRIVATE_TIMER_H_ + +#include "wx/private/timer.h" + +class WXDLLIMPEXP_CORE wxMotifTimerImpl : public wxTimerImpl +{ +public: + wxMotifTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { m_id = 0; } + virtual ~wxMotifTimerImpl(); + + virtual bool Start(int milliseconds = -1, bool oneShot = false); + virtual void Stop(); + virtual bool IsRunning() const { return m_id != 0; } + + // override this to rearm the timer if necessary (i.e. if not one shot) as + // X timeouts are removed automatically when they expire + virtual void Notify(); + +protected: + // common part of Start() and Notify() + void DoStart(); + + long m_id; +}; + +#endif // _WX_MOTIF_PRIVATE_TIMER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/radiobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/radiobox.h new file mode 100644 index 0000000000..80dc58d22e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/radiobox.h @@ -0,0 +1,134 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/radiobox.h +// Purpose: wxRadioBox class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOTIF_RADIOBOX_H_ +#define _WX_MOTIF_RADIOBOX_H_ + +#ifndef wxWIDGET_ARRAY_DEFINED + #define wxWIDGET_ARRAY_DEFINED + + #include "wx/dynarray.h" + WX_DEFINE_ARRAY_PTR(WXWidget, wxWidgetArray); +#endif // wxWIDGET_ARRAY_DEFINED + +#include "wx/arrstr.h" + +class WXDLLIMPEXP_CORE wxRadioBox : public wxControl, public wxRadioBoxBase +{ +public: + wxRadioBox() { Init(); } + + wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Init(); + + Create(parent, id, title, pos, size, n, choices, + majorDim, style, val, name); + } + + wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Init(); + + Create(parent, id, title, pos, size, choices, + majorDim, style, val, name); + } + + virtual ~wxRadioBox(); + + bool Create(wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + + bool Create(wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + + // Enabling + virtual bool Enable(bool enable = true); + virtual bool Enable(unsigned int item, bool enable = true); + virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + // Showing + virtual bool Show(bool show = true); + virtual bool Show(unsigned int item, bool show = true); + virtual bool IsItemShown(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + virtual void SetSelection(int n); + int GetSelection() const; + + virtual void SetString(unsigned int item, const wxString& label); + virtual wxString GetString(unsigned int item) const; + + virtual wxString GetStringSelection() const; + virtual bool SetStringSelection(const wxString& s); + virtual unsigned int GetCount() const { return m_noItems; } ; + void Command(wxCommandEvent& event); + + int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; } + void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; } + + // Implementation + virtual void ChangeFont(bool keepOriginalSize = true); + virtual void ChangeBackgroundColour(); + virtual void ChangeForegroundColour(); + const wxWidgetArray& GetRadioButtons() const { return m_radioButtons; } + void SetSel(int i) { m_selectedButton = i; } + virtual WXWidget GetLabelWidget() const { return m_labelWidget; } + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + unsigned int m_noItems; + int m_noRowsOrCols; + int m_selectedButton; + + wxWidgetArray m_radioButtons; + WXWidget m_labelWidget; + wxArrayString m_radioButtonLabels; + +private: + void Init(); + + DECLARE_DYNAMIC_CLASS(wxRadioBox) +}; + +#endif // _WX_MOTIF_RADIOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/radiobut.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/radiobut.h new file mode 100644 index 0000000000..072294e4bd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/radiobut.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/radiobut.h +// Purpose: wxRadioButton class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RADIOBUT_H_ +#define _WX_RADIOBUT_H_ + +class WXDLLIMPEXP_CORE wxRadioButton: public wxControl +{ + DECLARE_DYNAMIC_CLASS(wxRadioButton) +public: + wxRadioButton(); + virtual ~wxRadioButton() { RemoveFromCycle(); } + + inline wxRadioButton(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr); + + virtual void SetValue(bool val); + virtual bool GetValue() const ; + + void Command(wxCommandEvent& event); + + // Implementation + virtual void ChangeBackgroundColour(); + + // *this function is an implementation detail* + // clears the selection in the radiobuttons in the cycle + // and returns the old selection (if any) + wxRadioButton* ClearSelections(); +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } +private: + wxRadioButton* AddInCycle(wxRadioButton* cycle); + void RemoveFromCycle(); + wxRadioButton* NextInCycle() { return m_cycle; } + + wxRadioButton *m_cycle; +}; + +#endif +// _WX_RADIOBUT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/scrolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/scrolbar.h new file mode 100644 index 0000000000..2029f60b03 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/scrolbar.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/scrolbar.h +// Purpose: wxScrollBar class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SCROLBAR_H_ +#define _WX_SCROLBAR_H_ + +// Scrollbar item +class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase +{ + DECLARE_DYNAMIC_CLASS(wxScrollBar) + +public: + inline wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; } + virtual ~wxScrollBar(); + + inline wxScrollBar(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr) + { + Create(parent, id, pos, size, style, validator, name); + } + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr); + + int GetThumbPosition() const ; + inline int GetThumbSize() const { return m_pageSize; } + inline int GetPageSize() const { return m_viewSize; } + inline int GetRange() const { return m_objectSize; } + + virtual void SetThumbPosition(int viewStart); + virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize, + bool refresh = true); + + void Command(wxCommandEvent& event); + + // Implementation + virtual void ChangeFont(bool keepOriginalSize = true); + virtual void ChangeBackgroundColour(); + +protected: + int m_pageSize; + int m_viewSize; + int m_objectSize; +}; + +#endif +// _WX_SCROLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/setup.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/setup.h new file mode 100644 index 0000000000..f92391d4dd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/setup.h @@ -0,0 +1,1507 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/setup.h +// Purpose: Configuration for the library +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SETUP_H_ +#define _WX_SETUP_H_ + +/* --- start common options --- */ +// ---------------------------------------------------------------------------- +// global settings +// ---------------------------------------------------------------------------- + +// define this to 0 when building wxBase library - this can also be done from +// makefile/project file overriding the value here +#ifndef wxUSE_GUI + #define wxUSE_GUI 1 +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// compatibility settings +// ---------------------------------------------------------------------------- + +// This setting determines the compatibility with 2.6 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_6 0 + +// This setting determines the compatibility with 2.8 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_8 1 + +// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when +// default system font is used for wxWindow::GetCharWidth/Height() instead of +// the current font. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxDIALOG_UNIT_COMPATIBILITY 0 + +// ---------------------------------------------------------------------------- +// debugging settings +// ---------------------------------------------------------------------------- + +// wxDEBUG_LEVEL will be defined as 1 in wx/debug.h so normally there is no +// need to define it here. You may do it for two reasons: either completely +// disable/compile out the asserts in release version (then do it inside #ifdef +// NDEBUG) or, on the contrary, enable more asserts, including the usually +// disabled ones, in the debug build (then do it inside #ifndef NDEBUG) +// +// #ifdef NDEBUG +// #define wxDEBUG_LEVEL 0 +// #else +// #define wxDEBUG_LEVEL 2 +// #endif + +// wxHandleFatalExceptions() may be used to catch the program faults at run +// time and, instead of terminating the program with a usual GPF message box, +// call the user-defined wxApp::OnFatalException() function. If you set +// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work. +// +// This setting is for Win32 only and can only be enabled if your compiler +// supports Win32 structured exception handling (currently only VC++ does) +// +// Default is 1 +// +// Recommended setting: 1 if your compiler supports it. +#define wxUSE_ON_FATAL_EXCEPTION 1 + +// Set this to 1 to be able to generate a human-readable (unlike +// machine-readable minidump created by wxCrashReport::Generate()) stack back +// trace when your program crashes using wxStackWalker +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_STACKWALKER 1 + +// Set this to 1 to compile in wxDebugReport class which allows you to create +// and optionally upload to your web site a debug report consisting of back +// trace of the crash (if wxUSE_STACKWALKER == 1) and other information. +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, it is compiled into a separate library so there +// is no overhead if you don't use it +#define wxUSE_DEBUGREPORT 1 + +// Generic comment about debugging settings: they are very useful if you don't +// use any other memory leak detection tools such as Purify/BoundsChecker, but +// are probably redundant otherwise. Also, Visual C++ CRT has the same features +// as wxWidgets memory debugging subsystem built in since version 5.0 and you +// may prefer to use it instead of built in memory debugging code because it is +// faster and more fool proof. +// +// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG +// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0) +// and if __NO_VC_CRTDBG__ is not defined. + +// The rest of the options in this section are obsolete and not supported, +// enable them at your own risk. + +// If 1, enables wxDebugContext, for writing error messages to file, etc. If +// __WXDEBUG__ is not defined, will still use the normal memory operators. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_CONTEXT 0 + +// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF* +// __WXDEBUG__ is also defined. +// +// WARNING: this code may not work with all architectures, especially if +// alignment is an issue. This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 1 if you are not using a memory debugging tool, else 0 +#define wxUSE_MEMORY_TRACING 0 + +// In debug mode, cause new and delete to be redefined globally. +// If this causes problems (e.g. link errors which is a common problem +// especially if you use another library which also redefines the global new +// and delete), set this to 0. +// This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If +// this causes problems (e.g. link errors), set this to 0. You may need to set +// this to 0 if using templates (at least for VC++). This switch is currently +// ignored for MinGW/Cygwin. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_NEW_ALWAYS 0 + + +// ---------------------------------------------------------------------------- +// Unicode support +// ---------------------------------------------------------------------------- + +// These settings are obsolete: the library is always built in Unicode mode +// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if +// absolutely necessary -- updating it is strongly recommended as the ANSI mode +// will disappear completely in future wxWidgets releases. +#ifndef wxUSE_UNICODE + #define wxUSE_UNICODE 1 +#endif + +// wxUSE_WCHAR_T is required by wxWidgets now, don't change. +#define wxUSE_WCHAR_T 1 + +// ---------------------------------------------------------------------------- +// global features +// ---------------------------------------------------------------------------- + +// Compile library in exception-safe mode? If set to 1, the library will try to +// behave correctly in presence of exceptions (even though it still will not +// use the exceptions itself) and notify the user code about any unhandled +// exceptions. If set to 0, propagation of the exceptions through the library +// code will lead to undefined behaviour -- but the code itself will be +// slightly smaller and faster. +// +// Note that like wxUSE_THREADS this option is automatically set to 0 if +// wxNO_EXCEPTIONS is defined. +// +// Default is 1 +// +// Recommended setting: depends on whether you intend to use C++ exceptions +// in your own code (1 if you do, 0 if you don't) +#define wxUSE_EXCEPTIONS 1 + +// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI +// +// Default is 0 +// +// Recommended setting: 0 (this is still work in progress...) +#define wxUSE_EXTENDED_RTTI 0 + +// Support for message/error logging. This includes wxLogXXX() functions and +// wxLog and derived classes. Don't set this to 0 unless you really know what +// you are doing. +// +// Default is 1 +// +// Recommended setting: 1 (always) +#define wxUSE_LOG 1 + +// Recommended setting: 1 +#define wxUSE_LOGWINDOW 1 + +// Recommended setting: 1 +#define wxUSE_LOGGUI 1 + +// Recommended setting: 1 +#define wxUSE_LOG_DIALOG 1 + +// Support for command line parsing using wxCmdLineParser class. +// +// Default is 1 +// +// Recommended setting: 1 (can be set to 0 if you don't use the cmd line) +#define wxUSE_CMDLINE_PARSER 1 + +// Support for multithreaded applications: if 1, compile in thread classes +// (thread.h) and make the library a bit more thread safe. Although thread +// support is quite stable by now, you may still consider recompiling the +// library without it if you have no use for it - this will result in a +// somewhat smaller and faster operation. +// +// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset +// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in +// build/msw/config.* file this value will have no effect. +// +// Default is 1 +// +// Recommended setting: 0 unless you do plan to develop MT applications +#define wxUSE_THREADS 1 + +// If enabled, compiles wxWidgets streams classes +// +// wx stream classes are used for image IO, process IO redirection, network +// protocols implementation and much more and so disabling this results in a +// lot of other functionality being lost. +// +// Default is 1 +// +// Recommended setting: 1 as setting it to 0 disables many other things +#define wxUSE_STREAMS 1 + +// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. +// Note that if the system's implementation does not support positional +// parameters, setting this to 1 forces the use of the wxWidgets implementation +// of wxVsnprintf. The standard vsnprintf() supports positional parameters on +// many Unix systems but usually doesn't under Windows. +// +// Positional parameters are very useful when translating a program since using +// them in formatting strings allow translators to correctly reorder the +// translated sentences. +// +// Default is 1 +// +// Recommended setting: 1 if you want to support multiple languages +#define wxUSE_PRINTF_POS_PARAMS 1 + +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but is +// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets +// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under +// XP as this triggers a bug in compiler TLS support that results in crashes +// when any TLS variables are used. +// +// If you're absolutely sure that your build of wxWidgets is never going to be +// used in such situation, either because it's not going to be linked from any +// kind of plugin or because you only target Vista or later systems, you can +// set this to 2 to force the use of compiler TLS even under MSW. +// +// Default is 1 meaning that compiler TLS is used only if it's 100% safe. +// +// Recommended setting: 2 if you want to have maximal performance and don't +// care about the scenario described above. +#define wxUSE_COMPILER_TLS 1 + +// ---------------------------------------------------------------------------- +// Interoperability with the standard library. +// ---------------------------------------------------------------------------- + +// Set wxUSE_STL to 1 to enable maximal interoperability with the standard +// library, even at the cost of backwards compatibility. +// +// Default is 0 +// +// Recommended setting: 0 as the options below already provide a relatively +// good level of interoperability and changing this option arguably isn't worth +// diverging from the official builds of the library. +#define wxUSE_STL 0 + +// This is not a real option but is used as the default value for +// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library headers, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_DEFAULT 0 +#else + #define wxUSE_STD_DEFAULT 1 +#endif + +// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<> +// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but +// usually more limited) implementations are used which allows to avoid the +// dependency on the C++ run-time library. +// +// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't +// support using standard containers and that VC6 needs non-default options for +// such build to avoid getting "fatal error C1076: compiler limit : internal +// heap limit reached; use /Zm to specify a higher limit" in its own standard +// headers, so you need to ensure you do increase the heap size before enabling +// this option for this compiler. +// +// Default is 0 for compatibility reasons. +// +// Recommended setting: 1 unless compatibility with the official wxWidgets +// build and/or the existing code is a concern. +#define wxUSE_STD_CONTAINERS 0 + +// Use standard C++ streams if 1 instead of wx streams in some places. If +// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the +// standard streams library. +// +// Notice that enabling this does not replace wx streams with std streams +// everywhere, in a lot of places wx streams are used no matter what. +// +// Default is 1 if compiler supports it. +// +// Recommended setting: 1 if you use the standard streams anyhow and so +// dependency on the standard streams library is not a +// problem +#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT + +// Enable minimal interoperability with the standard C++ string class if 1. +// "Minimal" means that wxString can be constructed from std::string or +// std::wstring but can't be implicitly converted to them. You need to enable +// the option below for the latter. +// +// Default is 1 for most compilers. +// +// Recommended setting: 1 unless you want to ensure your program doesn't use +// the standard C++ library at all. +#define wxUSE_STD_STRING wxUSE_STD_DEFAULT + +// Make wxString as much interchangeable with std::[w]string as possible, in +// particular allow implicit conversion of wxString to either of these classes. +// This comes at a price (or a benefit, depending on your point of view) of not +// allowing implicit conversion to "const char *" and "const wchar_t *". +// +// Because a lot of existing code relies on these conversions, this option is +// disabled by default but can be enabled for your build if you don't care +// about compatibility. +// +// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled. +// +// Recommended setting: 0 to remain compatible with the official builds of +// wxWidgets. +#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL + +// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix +// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>. +// +// Note that newer compilers (including VC++ 7.1 and later) don't support +// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow. +// +// Default is 0. +// +// Recommended setting: 0, only set to 1 if you use a really old compiler +#define wxUSE_IOSTREAMH 0 + + +// ---------------------------------------------------------------------------- +// non GUI features selection +// ---------------------------------------------------------------------------- + +// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit +// integer which is implemented in terms of native 64 bit integers if any or +// uses emulation otherwise. +// +// This class is required by wxDateTime and so you should enable it if you want +// to use wxDateTime. For most modern platforms, it will use the native 64 bit +// integers in which case (almost) all of its functions are inline and it +// almost does not take any space, so there should be no reason to switch it +// off. +// +// Recommended setting: 1 +#define wxUSE_LONGLONG 1 + +// Set wxUSE_BASE64 to 1, to compile in Base64 support. This is required for +// storing binary data in wxConfig on most platforms. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_BASE64 1 + +// Set this to 1 to be able to use wxEventLoop even in console applications +// (i.e. using base library only, without GUI). This is mostly useful for +// processing socket events but is also necessary to use timers in console +// applications +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_CONSOLE_EVENTLOOP 1 + +// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level +// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions. +// +// Default is 1 +// +// Recommended setting: 1 (wxFile is highly recommended as it is required by +// i18n code, wxFileConfig and others) +#define wxUSE_FILE 1 +#define wxUSE_FFILE 1 + +// Use wxFSVolume class providing access to the configured/active mount points +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely disabled if you don't use it) +#define wxUSE_FSVOLUME 1 + +// Use wxStandardPaths class which allows to retrieve some standard locations +// in the file system +// +// Default is 1 +// +// Recommended setting: 1 (may be disabled to save space, but not much) +#define wxUSE_STDPATHS 1 + +// use wxTextBuffer class: required by wxTextFile +#define wxUSE_TEXTBUFFER 1 + +// use wxTextFile class: requires wxFile and wxTextBuffer, required by +// wxFileConfig +#define wxUSE_TEXTFILE 1 + +// i18n support: _() macro, wxLocale class. Requires wxTextFile. +#define wxUSE_INTL 1 + +// Provide wxFoo_l() functions similar to standard foo() functions but taking +// an extra locale parameter. +// +// Notice that this is fully implemented only for the systems providing POSIX +// xlocale support or Microsoft Visual C++ >= 8 (which provides proprietary +// almost-equivalent of xlocale functions), otherwise wxFoo_l() functions will +// only work for the current user locale and "C" locale. You can use +// wxHAS_XLOCALE_SUPPORT to test whether the full support is available. +// +// Default is 1 +// +// Recommended setting: 1 but may be disabled if you are writing programs +// running only in C locale anyhow +#define wxUSE_XLOCALE 1 + +// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which +// allow to manipulate dates, times and time intervals. wxDateTime replaces the +// old wxTime and wxDate classes which are still provided for backwards +// compatibility (and implemented in terms of wxDateTime). +// +// Note that this class is relatively new and is still officially in alpha +// stage because some features are not yet (fully) implemented. It is already +// quite useful though and should only be disabled if you are aiming at +// absolutely minimal version of the library. +// +// Requires: wxUSE_LONGLONG +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_DATETIME 1 + +// Set wxUSE_TIMER to 1 to compile wxTimer class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_TIMER 1 + +// Use wxStopWatch clas. +// +// Default is 1 +// +// Recommended setting: 1 (needed by wxSocket) +#define wxUSE_STOPWATCH 1 + +// Set wxUSE_FSWATCHER to 1 if you want to enable wxFileSystemWatcher +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FSWATCHER 1 + +// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes +// which allow the application to store its settings in the persistent +// storage. Setting this to 1 will also enable on-demand creation of the +// global config object in wxApp. +// +// See also wxUSE_CONFIG_NATIVE below. +// +// Recommended setting: 1 +#define wxUSE_CONFIG 1 + +// If wxUSE_CONFIG is 1, you may choose to use either the native config +// classes under Windows (using .INI files under Win16 and the registry under +// Win32) or the portable text file format used by the config classes under +// Unix. +// +// Default is 1 to use native classes. Note that you may still use +// wxFileConfig even if you set this to 1 - just the config object created by +// default for the applications needs will be a wxRegConfig or wxIniConfig and +// not wxFileConfig. +// +// Recommended setting: 1 +#define wxUSE_CONFIG_NATIVE 1 + +// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows +// to connect/disconnect from the network and be notified whenever the dial-up +// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DIALUP_MANAGER 1 + +// Compile in classes for run-time DLL loading and function calling. +// Required by wxUSE_DIALUP_MANAGER. +// +// This setting is for Win32 only +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DYNLIB_CLASS 1 + +// experimental, don't use for now +#define wxUSE_DYNAMIC_LOADER 1 + +// Set to 1 to use socket classes +#define wxUSE_SOCKETS 1 + +// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS) +// +// Notice that currently setting this option under Windows will result in +// programs which can only run on recent OS versions (with ws2_32.dll +// installed) which is why it is disabled by default. +// +// Default is 1. +// +// Recommended setting: 1 if you need IPv6 support +#define wxUSE_IPV6 0 + +// Set to 1 to enable virtual file systems (required by wxHTML) +#define wxUSE_FILESYSTEM 1 + +// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ZIP 1 + +// Set to 1 to enable virtual archive filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ARCHIVE 1 + +// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_INET 1 + +// wxArchive classes for accessing archives such as zip and tar +#define wxUSE_ARCHIVE_STREAMS 1 + +// Set to 1 to compile wxZipInput/OutputStream classes. +#define wxUSE_ZIPSTREAM 1 + +// Set to 1 to compile wxTarInput/OutputStream classes. +#define wxUSE_TARSTREAM 1 + +// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by +// wxUSE_LIBPNG +#define wxUSE_ZLIB 1 + +// If enabled, the code written by Apple will be used to write, in a portable +// way, float on the disk. See extended.c for the license which is different +// from wxWidgets one. +// +// Default is 1. +// +// Recommended setting: 1 unless you don't like the license terms (unlikely) +#define wxUSE_APPLE_IEEE 1 + +// Joystick support class +#define wxUSE_JOYSTICK 1 + +// wxFontEnumerator class +#define wxUSE_FONTENUM 1 + +// wxFontMapper class +#define wxUSE_FONTMAP 1 + +// wxMimeTypesManager class +#define wxUSE_MIMETYPE 1 + +// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP +// or wxURL you need to set this to 1. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_PROTOCOL 1 + +// The settings for the individual URL schemes +#define wxUSE_PROTOCOL_FILE 1 +#define wxUSE_PROTOCOL_FTP 1 +#define wxUSE_PROTOCOL_HTTP 1 + +// Define this to use wxURL class. +#define wxUSE_URL 1 + +// Define this to use native platform url and protocol support. +// Currently valid only for MS-Windows. +// Note: if you set this to 1, you can open ftp/http/gopher sites +// and obtain a valid input stream for these sites +// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0. +// Doing so reduces the code size. +// +// This code is experimental and subject to change. +#define wxUSE_URL_NATIVE 0 + +// Support for wxVariant class used in several places throughout the library, +// notably in wxDataViewCtrl API. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size as much as +// possible in which case setting this to 0 can gain up to 100KB. +#define wxUSE_VARIANT 1 + +// Support for wxAny class, the successor for wxVariant. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size by a small amount, +// or your compiler cannot for some reason cope with complexity of templates used. +#define wxUSE_ANY 1 + +// Support for regular expression matching via wxRegEx class: enable this to +// use POSIX regular expressions in your code. You need to compile regex +// library from src/regex to use it under Windows. +// +// Default is 0 +// +// Recommended setting: 1 if your compiler supports it, if it doesn't please +// contribute us a makefile for src/regex for it +#define wxUSE_REGEX 1 + +// wxSystemOptions class +#define wxUSE_SYSTEM_OPTIONS 1 + +// wxSound class +#define wxUSE_SOUND 1 + +// Use wxMediaCtrl +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_MEDIACTRL 1 + +// Use wxWidget's XRC XML-based resource system. Recommended. +// +// Default is 1 +// +// Recommended setting: 1 (requires wxUSE_XML) +#define wxUSE_XRC 1 + +// XML parsing classes. Note that their API will change in the future, so +// using wxXmlDocument and wxXmlNode in your app is not recommended. +// +// Default is the same as wxUSE_XRC, i.e. 1 by default. +// +// Recommended setting: 1 (required by XRC) +#define wxUSE_XML wxUSE_XRC + +// Use wxWidget's AUI docking system +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_AUI 1 + +// Use wxWidget's Ribbon classes for interfaces +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_RIBBON 1 + +// Use wxPropertyGrid. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_PROPGRID 1 + +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + +// Use wxWidget's web viewing classes +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW 1 + +// Use the IE wxWebView backend +// +// Default is 1 on MSW +// +// Recommended setting: 1 +#ifdef __WXMSW__ +#define wxUSE_WEBVIEW_IE 1 +#else +#define wxUSE_WEBVIEW_IE 0 +#endif + +// Use the WebKit wxWebView backend +// +// Default is 1 on GTK and OSX +// +// Recommended setting: 1 +#if defined(__WXGTK__) || defined(__WXOSX__) +#define wxUSE_WEBVIEW_WEBKIT 1 +#else +#define wxUSE_WEBVIEW_WEBKIT 0 +#endif + +// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced +// 2D drawing API. (Still somewhat experimental) +// +// Please note that on Windows gdiplus.dll is loaded dynamically which means +// that nothing special needs to be done as long as you don't use +// wxGraphicsContext at all or only use it on XP and later systems but you +// still do need to distribute it yourself for an application using +// wxGraphicsContext to be runnable on pre-XP systems. +// +// Default is 1 except if you're using a non-Microsoft compiler under Windows +// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. +// mingw32) you may need to install the headers (and just the headers) +// yourself. If you do, change the setting below manually. +// +// Recommended setting: 1 if supported by the compilation environment + +// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is +// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined +#ifdef _MSC_VER +# if _MSC_VER >= 1310 + // MSVC7.1+ comes with new enough Platform SDK, enable + // wxGraphicsContext support for it +# define wxUSE_GRAPHICS_CONTEXT 1 +# else + // MSVC 6 didn't include GDI+ headers so disable by default, enable it + // here if you use MSVC 6 with a newer SDK +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#else + // Disable support for other Windows compilers, enable it if your compiler + // comes with new enough SDK or you installed the headers manually. + // + // Notice that this will be set by configure under non-Windows platforms + // anyhow so the value there is not important. +# define wxUSE_GRAPHICS_CONTEXT 0 +#endif + +// Enable wxGraphicsContext implementation using Cairo library. +// +// This is not needed under Windows and detected automatically by configure +// under other systems, however you may set this to 1 manually if you installed +// Cairo under Windows yourself and prefer to use it instead the native GDI+ +// implementation. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_CAIRO 0 + + +// ---------------------------------------------------------------------------- +// Individual GUI controls +// ---------------------------------------------------------------------------- + +// You must set wxUSE_CONTROLS to 1 if you are using any controls at all +// (without it, wxControl class is not compiled) +// +// Default is 1 +// +// Recommended setting: 1 (don't change except for very special programs) +#define wxUSE_CONTROLS 1 + +// Support markup in control labels, i.e. provide wxControl::SetLabelMarkup(). +// Currently markup is supported only by a few controls and only some ports but +// their number will increase with time. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you want to save on code size) +#define wxUSE_MARKUP 1 + +// wxPopupWindow class is a top level transient window. It is currently used +// to implement wxTipWindow +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW) +#define wxUSE_POPUPWIN 1 + +// wxTipWindow allows to implement the custom tooltips, it is used by the +// context help classes. Requires wxUSE_POPUPWIN. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0) +#define wxUSE_TIPWINDOW 1 + +// Each of the settings below corresponds to one wxWidgets control. They are +// all switched on by default but may be disabled if you are sure that your +// program (including any standard dialogs it can show!) doesn't need them and +// if you desperately want to save some space. If you use any of these you must +// set wxUSE_CONTROLS as well. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl +#define wxUSE_BANNERWINDOW 1 // wxBannerWindow +#define wxUSE_BUTTON 1 // wxButton +#define wxUSE_BMPBUTTON 1 // wxBitmapButton +#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl +#define wxUSE_CHECKBOX 1 // wxCheckBox +#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHOICE 1 // wxChoice +#define wxUSE_COLLPANE 1 // wxCollapsiblePane +#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl +#define wxUSE_COMBOBOX 1 // wxComboBox +#define wxUSE_COMMANDLINKBUTTON 1 // wxCommandLinkButton +#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl +#define wxUSE_DATEPICKCTRL 1 // wxDatePickerCtrl +#define wxUSE_DIRPICKERCTRL 1 // wxDirPickerCtrl +#define wxUSE_EDITABLELISTBOX 1 // wxEditableListBox +#define wxUSE_FILECTRL 1 // wxFileCtrl +#define wxUSE_FILEPICKERCTRL 1 // wxFilePickerCtrl +#define wxUSE_FONTPICKERCTRL 1 // wxFontPickerCtrl +#define wxUSE_GAUGE 1 // wxGauge +#define wxUSE_HEADERCTRL 1 // wxHeaderCtrl +#define wxUSE_HYPERLINKCTRL 1 // wxHyperlinkCtrl +#define wxUSE_LISTBOX 1 // wxListBox +#define wxUSE_LISTCTRL 1 // wxListCtrl +#define wxUSE_RADIOBOX 1 // wxRadioBox +#define wxUSE_RADIOBTN 1 // wxRadioButton +#define wxUSE_RICHMSGDLG 1 // wxRichMessageDialog +#define wxUSE_SCROLLBAR 1 // wxScrollBar +#define wxUSE_SEARCHCTRL 1 // wxSearchCtrl +#define wxUSE_SLIDER 1 // wxSlider +#define wxUSE_SPINBTN 1 // wxSpinButton +#define wxUSE_SPINCTRL 1 // wxSpinCtrl +#define wxUSE_STATBOX 1 // wxStaticBox +#define wxUSE_STATLINE 1 // wxStaticLine +#define wxUSE_STATTEXT 1 // wxStaticText +#define wxUSE_STATBMP 1 // wxStaticBitmap +#define wxUSE_TEXTCTRL 1 // wxTextCtrl +#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl +#define wxUSE_TOGGLEBTN 1 // requires wxButton +#define wxUSE_TREECTRL 1 // wxTreeCtrl +#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl + +// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR +// below either wxStatusBar95 or a generic wxStatusBar will be used. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STATUSBAR 1 + +// Two status bar implementations are available under Win32: the generic one +// or the wrapper around native control. For native look and feel the native +// version should be used. +// +// Default is 1 for the platforms where native status bar is supported. +// +// Recommended setting: 1 (there is no advantage in using the generic one) +#define wxUSE_NATIVE_STATUSBAR 1 + +// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar +// classes at all. Otherwise, use the native toolbar class unless +// wxUSE_TOOLBAR_NATIVE is 0. +// +// Default is 1 for all settings. +// +// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE. +#define wxUSE_TOOLBAR 1 +#define wxUSE_TOOLBAR_NATIVE 1 + +// wxNotebook is a control with several "tabs" located on one of its sides. It +// may be used to logically organise the data presented to the user instead of +// putting everything in one huge dialog. It replaces wxTabControl and related +// classes of wxWin 1.6x. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTEBOOK 1 + +// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_LISTBOOK 1 + +// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CHOICEBOOK 1 + +// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TREEBOOK 1 + +// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of +// tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLBOOK 1 + +// wxTaskBarIcon is a small notification icon shown in the system toolbar or +// dock. +// +// Default is 1. +// +// Recommended setting: 1 (but can be set to 0 if you don't need it) +#define wxUSE_TASKBARICON 1 + +// wxGrid class +// +// Default is 1, set to 0 to cut down compilation time and binaries size if you +// don't use it. +// +// Recommended setting: 1 +// +#define wxUSE_GRID 1 + +// wxMiniFrame class: a frame with narrow title bar +// +// Default is 1. +// +// Recommended setting: 1 (it doesn't cost almost anything) +#define wxUSE_MINIFRAME 1 + +// wxComboCtrl and related classes: combobox with custom popup window and +// not necessarily a listbox. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it +// it used by wxComboBox +#define wxUSE_COMBOCTRL 1 + +// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox +// items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0, except where it is +// needed as a base class for generic wxBitmapComboBox. +#define wxUSE_ODCOMBOBOX 1 + +// wxBitmapComboBox is a combobox that can have images in front of text items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 +#define wxUSE_BITMAPCOMBOBOX 1 + +// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items +// up and down in it. It is also used as part of wxRearrangeDialog. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 (currently used only by +// wxHeaderCtrl) +#define wxUSE_REARRANGECTRL 1 + +// ---------------------------------------------------------------------------- +// Miscellaneous GUI stuff +// ---------------------------------------------------------------------------- + +// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar) +#define wxUSE_ACCEL 1 + +// Use the standard art provider. The icons returned by this provider are +// embedded into the library as XPMs so disabling it reduces the library size +// somewhat but this should only be done if you use your own custom art +// provider returning the icons or never use any icons not provided by the +// native art provider (which might not be implemented at all for some +// platforms) or by the Tango icons provider (if it's not itself disabled +// below). +// +// Default is 1. +// +// Recommended setting: 1 unless you use your own custom art provider. +#define wxUSE_ARTPROVIDER_STD 1 + +// Use art provider providing Tango icons: this art provider has higher quality +// icons than the default ones using smaller size XPM icons without +// transparency but the embedded PNG icons add to the library size. +// +// Default is 1 under non-GTK ports. Under wxGTK the native art provider using +// the GTK+ stock icons replaces it so it is normally not necessary. +// +// Recommended setting: 1 but can be turned off to reduce the library size. +#define wxUSE_ARTPROVIDER_TANGO 1 + +// Hotkey support (currently Windows only) +#define wxUSE_HOTKEY 1 + +// Use wxCaret: a class implementing a "cursor" in a text control (called caret +// under Windows). +// +// Default is 1. +// +// Recommended setting: 1 (can be safely set to 0, not used by the library) +#define wxUSE_CARET 1 + +// Use wxDisplay class: it allows enumerating all displays on a system and +// their geometries as well as finding the display on which the given point or +// window lies. +// +// Default is 1. +// +// Recommended setting: 1 if you need it, can be safely set to 0 otherwise +#define wxUSE_DISPLAY 1 + +// Miscellaneous geometry code: needed for Canvas library +#define wxUSE_GEOMETRY 1 + +// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and +// wxListCtrl. +// +// Default is 1. +// +// Recommended setting: 1 (set it to 0 if you don't use any of the controls +// enumerated above, then this class is mostly useless too) +#define wxUSE_IMAGLIST 1 + +// Use wxInfoBar class. +// +// Default is 1. +// +// Recommended setting: 1 (but can be disabled without problems as nothing +// depends on it) +#define wxUSE_INFOBAR 1 + +// Use wxMenu, wxMenuBar, wxMenuItem. +// +// Default is 1. +// +// Recommended setting: 1 (can't be disabled under MSW) +#define wxUSE_MENUS 1 + +// Use wxNotificationMessage. +// +// wxNotificationMessage allows to show non-intrusive messages to the user +// using balloons, banners, popups or whatever is the appropriate method for +// the current platform. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTIFICATION_MESSAGE 1 + +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + +// wxRichToolTip is a customizable tooltip class which has more functionality +// than the stock (but native, unlike this class) wxToolTip. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely set to 0 if you don't need it) +#define wxUSE_RICHTOOLTIP 1 + +// Use wxSashWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SASH 1 + +// Use wxSplitterWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SPLITTER 1 + +// Use wxToolTip and wxWindow::Set/GetToolTip() methods. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLTIPS 1 + +// wxValidator class and related methods +#define wxUSE_VALIDATORS 1 + +// Use reference counted ID management: this means that wxWidgets will track +// the automatically allocated ids (those used when you use wxID_ANY when +// creating a window, menu or toolbar item &c) instead of just supposing that +// the program never runs out of them. This is mostly useful only under wxMSW +// where the total ids range is limited to SHRT_MIN..SHRT_MAX and where +// long-running programs can run into problems with ids reuse without this. On +// the other platforms, where the ids have the full int range, this shouldn't +// be necessary. +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif + +// ---------------------------------------------------------------------------- +// common dialogs +// ---------------------------------------------------------------------------- + +// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g. +// file selector, printer dialog). Switching this off also switches off the +// printing architecture and interactive wxPrinterDC. +// +// Default is 1 +// +// Recommended setting: 1 (unless it really doesn't work) +#define wxUSE_COMMON_DIALOGS 1 + +// wxBusyInfo displays window with message when app is busy. Works in same way +// as wxBusyCursor +#define wxUSE_BUSYINFO 1 + +// Use single/multiple choice dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_CHOICEDLG 1 + +// Use colour picker dialog +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_COLOURDLG 1 + +// wxDirDlg class for getting a directory name from user +#define wxUSE_DIRDLG 1 + +// TODO: setting to choose the generic or native one + +// Use file open/save dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in many places in the library itself) +#define wxUSE_FILEDLG 1 + +// Use find/replace dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely set to 0) +#define wxUSE_FINDREPLDLG 1 + +// Use font picker dialog +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_FONTDLG 1 + +// Use wxMessageDialog and wxMessageBox. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_MSGDLG 1 + +// progress dialog class for lengthy operations +#define wxUSE_PROGRESSDLG 1 + +// support for startup tips (wxShowTip &c) +#define wxUSE_STARTUP_TIPS 1 + +// text entry dialog and wxGetTextFromUser function +#define wxUSE_TEXTDLG 1 + +// number entry dialog +#define wxUSE_NUMBERDLG 1 + +// splash screen class +#define wxUSE_SPLASH 1 + +// wizards +#define wxUSE_WIZARDDLG 1 + +// Compile in wxAboutBox() function showing the standard "About" dialog. +// +// Default is 1 +// +// Recommended setting: 1 but can be set to 0 to save some space if you don't +// use this function +#define wxUSE_ABOUTDLG 1 + +// wxFileHistory class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FILE_HISTORY 1 + +// ---------------------------------------------------------------------------- +// Metafiles support +// ---------------------------------------------------------------------------- + +// Windows supports the graphics format known as metafile which is, though not +// portable, is widely used under Windows and so is supported by wxWin (under +// Windows only, of course). Win16 (Win3.1) used the so-called "Window +// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in +// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by +// default, WMFs will be used under Win16 and EMFs under Win32. This may be +// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting +// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile +// in any metafile related classes at all. +// +// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS. +// +// Recommended setting: default or 0 for everything for portable programs. +#define wxUSE_METAFILE 1 +#define wxUSE_ENH_METAFILE 1 +#define wxUSE_WIN_METAFILES_ALWAYS 0 + +// ---------------------------------------------------------------------------- +// Big GUI components +// ---------------------------------------------------------------------------- + +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + +// Set to 0 to disable document/view architecture +#define wxUSE_DOC_VIEW_ARCHITECTURE 1 + +// Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 1 + +// Set to 0 to disable print/preview architecture code +#define wxUSE_PRINTING_ARCHITECTURE 1 + +// wxHTML sublibrary allows to display HTML in wxWindow programs and much, +// much more. +// +// Default is 1. +// +// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a +// smaller library. +#define wxUSE_HTML 1 + +// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL +// headers and libraries to be able to compile the library with wxUSE_GLCANVAS +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). +// +// Default is 1 unless the compiler is known to ship without the necessary +// headers (Digital Mars) or the platform doesn't support OpenGL (Windows CE). +// +// Recommended setting: 1 if you intend to use OpenGL, can be safely set to 0 +// otherwise. +#define wxUSE_GLCANVAS 1 + +// wxRichTextCtrl allows editing of styled text. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 if you want compile a +// smaller library. +#define wxUSE_RICHTEXT 1 + +// ---------------------------------------------------------------------------- +// Data transfer +// ---------------------------------------------------------------------------- + +// Use wxClipboard class for clipboard copy/paste. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CLIPBOARD 1 + +// Use wxDataObject and related classes. Needed for clipboard and OLE drag and +// drop +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DATAOBJ 1 + +// Use wxDropTarget and wxDropSource classes for drag and drop (this is +// different from "built in" drag and drop in wxTreeCtrl which is always +// available). Requires wxUSE_DATAOBJ. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DRAG_AND_DROP 1 + +// Use wxAccessible for enhanced and customisable accessibility. +// Depends on wxUSE_OLE. +// +// Default is 0. +// +// Recommended setting (at present): 0 +#define wxUSE_ACCESSIBILITY 0 + +// ---------------------------------------------------------------------------- +// miscellaneous settings +// ---------------------------------------------------------------------------- + +// wxSingleInstanceChecker class allows to verify at startup if another program +// instance is running. +// +// Default is 1 +// +// Recommended setting: 1 (the class is tiny, disabling it won't save much +// space) +#define wxUSE_SNGLINST_CHECKER 1 + +#define wxUSE_DRAGIMAGE 1 + +#define wxUSE_IPC 1 + // 0 for no interprocess comms +#define wxUSE_HELP 1 + // 0 for no help facility + +// Should we use MS HTML help for wxHelpController? If disabled, neither +// wxCHMHelpController nor wxBestHelpController are available. +// +// Default is 1 under MSW, 0 is always used for the other platforms. +// +// Recommended setting: 1, only set to 0 if you have trouble compiling +// wxCHMHelpController (could be a problem with really ancient compilers) +#define wxUSE_MS_HTML_HELP 1 + + +// Use wxHTML-based help controller? +#define wxUSE_WXHTML_HELP 1 + +#define wxUSE_CONSTRAINTS 1 + // 0 for no window layout constraint system + +#define wxUSE_SPLINES 1 + // 0 for no splines + +#define wxUSE_MOUSEWHEEL 1 + // Include mouse wheel support + +// Compile wxUIActionSimulator class? +#define wxUSE_UIACTIONSIMULATOR 1 + +// ---------------------------------------------------------------------------- +// wxDC classes for various output formats +// ---------------------------------------------------------------------------- + +// Set to 1 for PostScript device context. +#define wxUSE_POSTSCRIPT 0 + +// Set to 1 to use font metric files in GetTextExtent +#define wxUSE_AFM_FOR_POSTSCRIPT 1 + +// Set to 1 to compile in support for wxSVGFileDC, a wxDC subclass which allows +// to create files in SVG (Scalable Vector Graphics) format. +#define wxUSE_SVG 1 + +// Should wxDC provide SetTransformMatrix() and related methods? +// +// Default is 1 but can be set to 0 if this functionality is not used. Notice +// that currently only wxMSW supports this so setting this to 0 doesn't change +// much for non-MSW platforms (although it will still save a few bytes +// probably). +// +// Recommended setting: 1. +#define wxUSE_DC_TRANSFORM_MATRIX 1 + +// ---------------------------------------------------------------------------- +// image format support +// ---------------------------------------------------------------------------- + +// wxImage supports many different image formats which can be configured at +// compile-time. BMP is always supported, others are optional and can be safely +// disabled if you don't plan to use images in such format sometimes saving +// substantial amount of code in the final library. +// +// Some formats require an extra library which is included in wxWin sources +// which is mentioned if it is the case. + +// Set to 1 for wxImage support (recommended). +#define wxUSE_IMAGE 1 + +// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB. +#define wxUSE_LIBPNG 1 + +// Set to 1 for JPEG format support (requires libjpeg) +#define wxUSE_LIBJPEG 1 + +// Set to 1 for TIFF format support (requires libtiff) +#define wxUSE_LIBTIFF 1 + +// Set to 1 for TGA format support (loading only) +#define wxUSE_TGA 1 + +// Set to 1 for GIF format support +#define wxUSE_GIF 1 + +// Set to 1 for PNM format support +#define wxUSE_PNM 1 + +// Set to 1 for PCX format support +#define wxUSE_PCX 1 + +// Set to 1 for IFF format support (Amiga format) +#define wxUSE_IFF 0 + +// Set to 1 for XPM format support +#define wxUSE_XPM 1 + +// Set to 1 for MS Icons and Cursors format support +#define wxUSE_ICO_CUR 1 + +// Set to 1 to compile in wxPalette class +#define wxUSE_PALETTE 1 + +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 + + +/* --- end common options --- */ + +#endif // _WX_SETUP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/slider.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/slider.h new file mode 100644 index 0000000000..db86ca0952 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/slider.h @@ -0,0 +1,78 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/slider.h +// Purpose: wxSlider class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SLIDER_H_ +#define _WX_SLIDER_H_ + +#include "wx/control.h" + +// Slider +class WXDLLIMPEXP_CORE wxSlider: public wxSliderBase +{ + DECLARE_DYNAMIC_CLASS(wxSlider) + +public: + wxSlider(); + + wxSlider(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr) + { + Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name); + } + + virtual ~wxSlider(); + + bool Create(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr); + + virtual int GetValue() const ; + virtual void SetValue(int); + + void SetRange(int minValue, int maxValue); + + inline int GetMin() const { return m_rangeMin; } + inline int GetMax() const { return m_rangeMax; } + + // For trackbars only + void SetPageSize(int pageSize); + int GetPageSize() const ; + void SetLineSize(int lineSize); + int GetLineSize() const ; + void SetThumbLength(int len) ; + int GetThumbLength() const ; + + void Command(wxCommandEvent& event); + +protected: + int m_rangeMin; + int m_rangeMax; + int m_pageSize; + int m_lineSize; + + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + +private: + DECLARE_EVENT_TABLE() +}; + +#endif +// _WX_SLIDER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/spinbutt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/spinbutt.h new file mode 100644 index 0000000000..eed6f6ce83 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/spinbutt.h @@ -0,0 +1,75 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/spinbutt.h +// Purpose: wxSpinButton class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SPINBUTT_H_ +#define _WX_SPINBUTT_H_ + +class WXDLLIMPEXP_FWD_CORE wxArrowButton; // internal + +class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase +{ + DECLARE_DYNAMIC_CLASS(wxSpinButton) + +public: + wxSpinButton() : m_up( 0 ), m_down( 0 ), m_pos( 0 ) { } + + wxSpinButton(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL, + const wxString& name = "wxSpinButton") + : m_up( 0 ), + m_down( 0 ), + m_pos( 0 ) + { + Create(parent, id, pos, size, style, name); + } + virtual ~wxSpinButton(); + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL, + const wxString& name = "wxSpinButton"); + + // accessors + int GetValue() const; + int GetMin() const { return m_min; } + int GetMax() const { return m_max; } + + // operations + void SetValue(int val); + void SetRange(int minVal, int maxVal); + + // Implementation + virtual void Command(wxCommandEvent& event) + { (void)ProcessCommand(event); } + virtual void ChangeFont(bool keepOriginalSize = true); + virtual void ChangeBackgroundColour(); + virtual void ChangeForegroundColour(); +public: + // implementation detail + void Increment( int delta ); + +private: + virtual void DoSetSize(int x, int y, int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual wxSize DoGetBestSize() const; + + wxArrowButton* m_up; + wxArrowButton* m_down; + int m_pos; +}; + +#endif +// _WX_SPINBUTT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/statbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/statbmp.h new file mode 100644 index 0000000000..c19268b710 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/statbmp.h @@ -0,0 +1,78 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/statbmp.h +// Purpose: wxStaticBitmap class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATBMP_H_ +#define _WX_STATBMP_H_ + +#include "wx/motif/bmpmotif.h" +#include "wx/icon.h" + +class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase +{ + DECLARE_DYNAMIC_CLASS(wxStaticBitmap) + +public: + wxStaticBitmap() { } + virtual ~wxStaticBitmap(); + + wxStaticBitmap(wxWindow *parent, wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr) + { + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr); + + virtual void SetBitmap(const wxBitmap& bitmap); + + virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event)) + { + return false; + } + + wxBitmap GetBitmap() const { return m_messageBitmap; } + + // for compatibility with wxMSW + wxIcon GetIcon() const + { + // don't use wxDynamicCast, icons and bitmaps are really the same thing + return *(wxIcon*)&m_messageBitmap; + } + + // for compatibility with wxMSW + void SetIcon(const wxIcon& icon) + { + SetBitmap( icon ); + } + + // Implementation + virtual void ChangeBackgroundColour(); + virtual void ChangeForegroundColour(); + +protected: + void DoSetBitmap(); + +protected: + wxBitmap m_messageBitmap; + wxBitmap m_messageBitmapOriginal; + wxBitmapCache m_bitmapCache; +}; + +#endif +// _WX_STATBMP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/statbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/statbox.h new file mode 100644 index 0000000000..a33967cf5d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/statbox.h @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/statbox.h +// Purpose: wxStaticBox class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATBOX_H_ +#define _WX_STATBOX_H_ + +// Group box +class WXDLLIMPEXP_CORE wxStaticBox: public wxStaticBoxBase +{ + DECLARE_DYNAMIC_CLASS(wxStaticBox) + +public: + wxStaticBox(); + wxStaticBox(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBoxNameStr) + { + Create(parent, id, label, pos, size, style, name); + } + + virtual ~wxStaticBox(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBoxNameStr); + + virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event)) + { + return false; + } + + virtual WXWidget GetLabelWidget() const { return m_labelWidget; } + + virtual void SetLabel(const wxString& label); + virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; + +private: + WXWidget m_labelWidget; + +private: + DECLARE_EVENT_TABLE() +}; + +#endif +// _WX_STATBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/stattext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/stattext.h new file mode 100644 index 0000000000..7abec32193 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/stattext.h @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/stattext.h +// Purpose: wxStaticText class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATTEXT_H_ +#define _WX_STATTEXT_H_ + +class WXDLLIMPEXP_CORE wxStaticText: public wxStaticTextBase +{ + DECLARE_DYNAMIC_CLASS(wxStaticText) + +public: + wxStaticText() { } + + wxStaticText(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticTextNameStr) + { + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticTextNameStr); + + // implementation + // -------------- + + // operations + virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event)) + { + return false; + } + + virtual void SetLabel(const wxString& label); + + // Get the widget that corresponds to the label + // (for font setting, label setting etc.) + virtual WXWidget GetLabelWidget() const + { return m_labelWidget; } + + virtual void DoSetLabel(const wxString& str); + virtual wxString DoGetLabel() const; + + virtual wxSize DoGetBestSize() const; +protected: + WXWidget m_labelWidget; +}; + +#endif +// _WX_STATTEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/textctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/textctrl.h new file mode 100644 index 0000000000..9ffe9d5a96 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/textctrl.h @@ -0,0 +1,114 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/textctrl.h +// Purpose: wxTextCtrl class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTCTRL_H_ +#define _WX_TEXTCTRL_H_ + +// Single-line text item +class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase +{ +public: + // creation + // -------- + + wxTextCtrl(); + wxTextCtrl(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr) + { + Create(parent, id, value, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr); + + // accessors + // --------- + virtual wxString GetValue() const; + + virtual int GetLineLength(long lineNo) const; + virtual wxString GetLineText(long lineNo) const; + virtual int GetNumberOfLines() const; + + // operations + // ---------- + + virtual void MarkDirty(); + virtual void DiscardEdits(); + virtual bool IsModified() const; + + virtual long XYToPosition(long x, long y) const; + virtual bool PositionToXY(long pos, long *x, long *y) const; + virtual void ShowPosition(long pos); + + // callbacks + // --------- + void OnDropFiles(wxDropFilesEvent& event); + void OnChar(wxKeyEvent& event); + // void OnEraseBackground(wxEraseEvent& event); + + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + + void OnUpdateCut(wxUpdateUIEvent& event); + void OnUpdateCopy(wxUpdateUIEvent& event); + void OnUpdatePaste(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + + virtual void Command(wxCommandEvent& event); + + // implementation from here to the end + // ----------------------------------- + virtual void ChangeFont(bool keepOriginalSize = true); + virtual void ChangeBackgroundColour(); + virtual void ChangeForegroundColour(); + void SetModified(bool mod) { m_modified = mod; } + virtual WXWidget GetTopWidget() const; + + // send the CHAR and TEXT_UPDATED events + void DoSendEvents(void /* XmTextVerifyCallbackStruct */ *cbs, + long keycode); + +protected: + virtual wxSize DoGetBestSize() const; + + virtual void DoSetValue(const wxString& value, int flags = 0); + + virtual WXWidget GetTextWidget() const { return m_mainWidget; } + +public: + // Motif-specific + void* m_tempCallbackStruct; + bool m_modified; + wxString m_value; // Required for password text controls + + // Did we call wxTextCtrl::OnChar? If so, generate a command event. + bool m_processedDefault; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxTextCtrl) +}; + +#endif +// _WX_TEXTCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/textentry.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/textentry.h new file mode 100644 index 0000000000..5cb18a715d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/textentry.h @@ -0,0 +1,59 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/textentry.h +// Purpose: wxMotif-specific wxTextEntry implementation +// Author: Vadim Zeitlin +// Created: 2007-11-05 +// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOTIF_TEXTENTRY_H_ +#define _WX_MOTIF_TEXTENTRY_H_ + +// ---------------------------------------------------------------------------- +// wxTextEntry wraps XmTextXXX() methods suitable for single-line controls +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase +{ +public: + wxTextEntry() { } + + // implement wxTextEntryBase pure virtual methods + virtual void WriteText(const wxString& text); + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to); + + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + virtual void Undo(); + virtual void Redo(); + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + virtual void SetInsertionPoint(long pos); + virtual long GetInsertionPoint() const; + virtual long GetLastPosition() const; + + virtual void SetSelection(long from, long to); + virtual void GetSelection(long *from, long *to) const; + + virtual bool IsEditable() const; + virtual void SetEditable(bool editable); + +protected: + virtual wxString DoGetValue() const; + + // translate wx text position (which may be -1 meaning "last one") to a + // valid Motif text position + long GetMotifPos(long pos) const; + +private: + // implement this to return the associated xmTextWidgetClass widget + virtual WXWidget GetTextWidget() const = 0; +}; + +#endif // _WX_MOTIF_TEXTENTRY_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/tglbtn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/tglbtn.h new file mode 100644 index 0000000000..68e731f5f6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/tglbtn.h @@ -0,0 +1,53 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/tglbtn.h +// Purpose: Declaration of the wxToggleButton class, which implements a +// toggle button under wxMotif. +// Author: Mattia Barbon +// Modified by: +// Created: 10.02.03 +// Copyright: (c) 2003 Mattia Barbon +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOGGLEBUTTON_H_ +#define _WX_TOGGLEBUTTON_H_ + +#include "wx/checkbox.h" + +class WXDLLIMPEXP_CORE wxToggleButton : public wxCheckBox +{ +public: + wxToggleButton() { Init(); } + wxToggleButton( wxWindow* parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr ) + { + Init(); + + Create( parent, id, label, pos, size, style, val, name ); + } + + bool Create( wxWindow* parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& val = wxDefaultValidator, + const wxString &name = wxCheckBoxNameStr ); + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + +private: + DECLARE_DYNAMIC_CLASS(wxToggleButton) + + // common part of all constructors + void Init() + { + m_evtType = wxEVT_TOGGLEBUTTON; + } +}; + +#endif // _WX_TOGGLEBUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/toolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/toolbar.h new file mode 100644 index 0000000000..954c836faf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/toolbar.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/toolbar.h +// Purpose: wxToolBar class +// Author: Julian Smart +// Modified by: 13.12.99 by VZ during toolbar classes reorganization +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOOLBAR_H_ +#define _WX_TOOLBAR_H_ + +class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase +{ +public: + // ctors and dtor + wxToolBar() { Init(); } + + wxToolBar(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr) + { + Init(); + + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr); + + virtual ~wxToolBar(); + + // override/implement base class virtuals + virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const; + + virtual bool Realize(); + + // implementation from now on + + // find tool by widget + wxToolBarToolBase *FindToolByWidget(WXWidget w) const; + +private: + // common part of all ctors + void Init(); + + // implement base class pure virtuals + virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); + virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); + + virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable); + virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle); + virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); + + virtual wxToolBarToolBase *CreateTool(int id, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled, + wxItemKind kind, + wxObject *clientData, + const wxString& shortHelp, + const wxString& longHelp); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); + + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); +private: + DECLARE_DYNAMIC_CLASS(wxToolBar) +}; + +#endif + // _WX_TOOLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/toplevel.h new file mode 100644 index 0000000000..5c9f28eb07 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/toplevel.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/toplevel.h +// Purpose: wxTopLevelWindow Motif implementation +// Author: Mattia Barbon +// Modified by: +// Created: 12/10/2002 +// Copyright: (c) Mattia Barbon +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __MOTIFTOPLEVELH__ +#define __MOTIFTOPLEVELH__ + +class WXDLLIMPEXP_CORE wxTopLevelWindowMotif : public wxTopLevelWindowBase +{ +public: + wxTopLevelWindowMotif() { Init(); } + wxTopLevelWindowMotif( wxWindow* parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr ) + { + Init(); + + Create( parent, id, title, pos, size, style, name ); + } + + bool Create( wxWindow* parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr ); + + virtual ~wxTopLevelWindowMotif(); + + virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL ); + virtual bool IsFullScreen() const; + + virtual void Maximize(bool maximize = true); + virtual void Restore(); + virtual void Iconize(bool iconize = true); + virtual bool IsMaximized() const; + virtual bool IsIconized() const; + + virtual void Raise(); + virtual void Lower(); + + virtual wxString GetTitle() const { return m_title; } + virtual void SetTitle( const wxString& title ) { m_title = title; } + + virtual bool SetShape( const wxRegion& region ); + + WXWidget GetShellWidget() const; +protected: + // common part of all constructors + void Init(); + // common part of wxDialog/wxFrame destructors + void PreDestroy(); + + virtual void DoGetPosition(int* x, int* y) const; + virtual void DoSetSizeHints(int minW, int minH, + int maxW, int maxH, + int incW, int incH); + +private: + // really create the Motif widget for TLW + virtual bool XmDoCreateTLW(wxWindow* parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) = 0; + + + wxString m_title; +}; + +#endif // __MOTIFTOPLEVELH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/window.h new file mode 100644 index 0000000000..d4cbc60d96 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/motif/window.h @@ -0,0 +1,329 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/motif/window.h +// Purpose: wxWindow class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WINDOW_H_ +#define _WX_WINDOW_H_ + +#include "wx/region.h" + +// ---------------------------------------------------------------------------- +// wxWindow class for Motif - see also wxWindowBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindow : public wxWindowBase +{ + friend class WXDLLIMPEXP_FWD_CORE wxDC; + friend class WXDLLIMPEXP_FWD_CORE wxWindowDC; + +public: + wxWindow() { Init(); } + + wxWindow(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + { + Init(); + Create(parent, id, pos, size, style, name); + } + + virtual ~wxWindow(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + + // implement base class pure virtuals + virtual void SetLabel(const wxString& label); + virtual wxString GetLabel() const; + + virtual void Raise(); + virtual void Lower(); + + virtual bool Show( bool show = true ); + virtual bool Enable( bool enable = true ); + + virtual void SetFocus(); + + virtual void WarpPointer(int x, int y); + + virtual void Refresh( bool eraseBackground = true, + const wxRect *rect = (const wxRect *) NULL ); + + virtual bool SetBackgroundColour( const wxColour &colour ); + virtual bool SetForegroundColour( const wxColour &colour ); + + virtual bool SetCursor( const wxCursor &cursor ); + virtual bool SetFont( const wxFont &font ); + + virtual int GetCharHeight() const; + virtual int GetCharWidth() const; + + virtual void SetScrollbar( int orient, int pos, int thumbVisible, + int range, bool refresh = true ); + virtual void SetScrollPos( int orient, int pos, bool refresh = true ); + virtual int GetScrollPos( int orient ) const; + virtual int GetScrollThumb( int orient ) const; + virtual int GetScrollRange( int orient ) const; + virtual void ScrollWindow( int dx, int dy, + const wxRect* rect = NULL ); + +#if wxUSE_DRAG_AND_DROP + virtual void SetDropTarget( wxDropTarget *dropTarget ); +#endif // wxUSE_DRAG_AND_DROP + + // Accept files for dragging + virtual void DragAcceptFiles(bool accept); + + // Get the unique identifier of a window + virtual WXWidget GetHandle() const { return GetMainWidget(); } + + // implementation from now on + // -------------------------- + + // accessors + // --------- + + // Get main widget for this window, e.g. a text widget + virtual WXWidget GetMainWidget() const; + // Get the widget that corresponds to the label (for font setting, + // label setting etc.) + virtual WXWidget GetLabelWidget() const; + // Get the client widget for this window (something we can create other + // windows on) + virtual WXWidget GetClientWidget() const; + // Get the top widget for this window, e.g. the scrolled widget parent of a + // multi-line text widget. Top means, top in the window hierarchy that + // implements this window. + virtual WXWidget GetTopWidget() const; + + // Get the underlying X window and display + WXWindow GetClientXWindow() const; + WXWindow GetXWindow() const; + WXDisplay *GetXDisplay() const; + + void SetLastClick(int button, long timestamp) + { m_lastButton = button; m_lastTS = timestamp; } + + int GetLastClickedButton() const { return m_lastButton; } + long GetLastClickTime() const { return m_lastTS; } + + // Gives window a chance to do something in response to a size message, + // e.g. arrange status bar, toolbar etc. + virtual bool PreResize(); + + // Generates a paint event + virtual void DoPaint(); + + // update rectangle/region manipulation + // (for wxWindowDC and Motif callbacks only) + // ----------------------------------------- + + // Adds a recangle to the updates list + void AddUpdateRect(int x, int y, int w, int h); + + void ClearUpdateRegion() { m_updateRegion.Clear(); } + void SetUpdateRegion(const wxRegion& region) { m_updateRegion = region; } + + // post-creation activities + void PostCreation(); + + // pre-creation activities + void PreCreation(); + +protected: + // Responds to colour changes: passes event on to children. + void OnSysColourChanged(wxSysColourChangedEvent& event); + + // Motif-specific + + void SetMainWidget(WXWidget w) { m_mainWidget = w; } + + // See src/motif/window.cpp, near the top, for an explanation + // why this is necessary + void CanvasSetSizeIntr(int x, int y, int width, int height, + int sizeFlags, bool fromCtor); + void DoSetSizeIntr(int x, int y, + int width, int height, + int sizeFlags, bool fromCtor); + + // for DoMoveWindowIntr flags + enum + { + wxMOVE_X = 1, + wxMOVE_Y = 2, + wxMOVE_WIDTH = 4, + wxMOVE_HEIGHT = 8 + }; + + void DoMoveWindowIntr(int x, int y, int width, int height, + int flags); + + // helper function, to remove duplicate code, used in wxScrollBar + WXWidget DoCreateScrollBar(WXWidget parent, wxOrientation orientation, + void (*callback)()); +public: + WXPixmap GetBackingPixmap() const { return m_backingPixmap; } + void SetBackingPixmap(WXPixmap pixmap) { m_backingPixmap = pixmap; } + int GetPixmapWidth() const { return m_pixmapWidth; } + int GetPixmapHeight() const { return m_pixmapHeight; } + void SetPixmapWidth(int w) { m_pixmapWidth = w; } + void SetPixmapHeight(int h) { m_pixmapHeight = h; } + + // Change properties + // Change to the current font (often overridden) + virtual void ChangeFont(bool keepOriginalSize = true); + + // Change background and foreground colour using current background colour + // setting (Motif generates foreground based on background) + virtual void ChangeBackgroundColour(); + // Change foreground colour using current foreground colour setting + virtual void ChangeForegroundColour(); + +protected: + // Adds the widget to the hash table and adds event handlers. + bool AttachWidget(wxWindow* parent, WXWidget mainWidget, + WXWidget formWidget, int x, int y, int width, int height); + bool DetachWidget(WXWidget widget); + + // How to implement accelerators. If we find a key event, translate to + // wxWidgets wxKeyEvent form. Find a widget for the window. Now find a + // wxWindow for the widget. If there isn't one, go up the widget hierarchy + // trying to find one. Once one is found, call ProcessAccelerator for the + // window. If it returns true (processed the event), skip the X event, + // otherwise carry on up the wxWidgets window hierarchy calling + // ProcessAccelerator. If all return false, process the X event as normal. + // Eventually we can implement OnCharHook the same way, but concentrate on + // accelerators for now. ProcessAccelerator must look at the current + // accelerator table, and try to find what menu id or window (beneath it) + // has this ID. Then construct an appropriate command + // event and send it. +public: + virtual bool ProcessAccelerator(wxKeyEvent& event); + +protected: + // unmanage and destroy an X widget f it's !NULL (passing NULL is ok) + void UnmanageAndDestroy(WXWidget widget); + + // map or unmap an X widget (passing NULL is ok), + // returns true if widget was mapped/unmapped + bool MapOrUnmap(WXWidget widget, bool map); + + // scrolling stuff + // --------------- + + // create/destroy window scrollbars + void CreateScrollbar(wxOrientation orientation); + void DestroyScrollbar(wxOrientation orientation); + + // get either hor or vert scrollbar widget + WXWidget GetScrollbar(wxOrientation orient) const + { return orient == wxHORIZONTAL ? m_hScrollBar : m_vScrollBar; } + + // set the scroll pos + void SetInternalScrollPos(wxOrientation orient, int pos) + { + if ( orient == wxHORIZONTAL ) + m_scrollPosX = pos; + else + m_scrollPosY = pos; + } + + // Motif-specific flags + // -------------------- + + bool m_needsRefresh:1; // repaint backing store? + + // For double-click detection + long m_lastTS; // last timestamp + unsigned m_lastButton:2; // last pressed button + +protected: + WXWidget m_mainWidget; + WXWidget m_hScrollBar; + WXWidget m_vScrollBar; + WXWidget m_borderWidget; + WXWidget m_scrolledWindow; + WXWidget m_drawingArea; + bool m_winCaptured:1; + WXPixmap m_backingPixmap; + int m_pixmapWidth; + int m_pixmapHeight; + int m_pixmapOffsetX; + int m_pixmapOffsetY; + + // Store the last scroll pos, since in wxWin the pos isn't set + // automatically by system + int m_scrollPosX; + int m_scrollPosY; + + // implement the base class pure virtuals + virtual void DoGetTextExtent(const wxString& string, + int *x, int *y, + int *descent = NULL, + int *externalLeading = NULL, + const wxFont *font = NULL) const; + virtual void DoClientToScreen( int *x, int *y ) const; + virtual void DoScreenToClient( int *x, int *y ) const; + virtual void DoGetPosition( int *x, int *y ) const; + virtual void DoGetSize( int *width, int *height ) const; + virtual void DoGetClientSize( int *width, int *height ) const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoSetClientSize(int width, int height); + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual bool DoPopupMenu(wxMenu *menu, int x, int y); + virtual void DoCaptureMouse(); + virtual void DoReleaseMouse(); + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip( wxToolTip *tip ); +#endif // wxUSE_TOOLTIPS + +private: + // common part of all ctors + void Init(); + + DECLARE_DYNAMIC_CLASS(wxWindow) + wxDECLARE_NO_COPY_CLASS(wxWindow); + DECLARE_EVENT_TABLE() +}; + +// ---------------------------------------------------------------------------- +// A little class to switch off `size optimization' while an instance of the +// object exists: this may be useful to temporarily disable the optimisation +// which consists to do nothing when the new size is equal to the old size - +// although quite useful usually to avoid flicker, sometimes it leads to +// undesired effects. +// +// Usage: create an instance of this class on the stack to disable the size +// optimisation, it will be reenabled as soon as the object goes out +// from scope. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNoOptimize +{ +public: + wxNoOptimize() { ms_count++; } + ~wxNoOptimize() { ms_count--; } + + static bool CanOptimize() { return ms_count == 0; } + +protected: + static int ms_count; +}; + +#endif // _WX_WINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/mousemanager.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mousemanager.h new file mode 100644 index 0000000000..caa2abeaec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mousemanager.h @@ -0,0 +1,153 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/mousemanager.h +// Purpose: wxMouseEventsManager class declaration +// Author: Vadim Zeitlin +// Created: 2009-04-20 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOUSEMANAGER_H_ +#define _WX_MOUSEMANAGER_H_ + +#include "wx/event.h" + +// ---------------------------------------------------------------------------- +// wxMouseEventsManager +// ---------------------------------------------------------------------------- + +/* + This class handles mouse events and synthesizes high-level notifications + such as clicks and drag events from low level mouse button presses and + mouse movement events. It is useful because handling the mouse events is + less obvious than might seem at a first glance: for example, clicks on an + object should only be generated if the mouse was both pressed and released + over it and not just released (so it requires storing the previous state) + and dragging shouldn't start before the mouse moves away far enough. + + This class encapsulates all these dull details for controls containing + multiple items which can be identified by a positive integer index and you + just need to implement its pure virtual functions to use it. + */ +class WXDLLIMPEXP_CORE wxMouseEventsManager : public wxEvtHandler +{ +public: + // a mouse event manager is always associated with a window and must be + // deleted by the window when it is destroyed so if it is created using the + // default ctor Create() must be called later + wxMouseEventsManager() { Init(); } + wxMouseEventsManager(wxWindow *win) { Init(); Create(win); } + bool Create(wxWindow *win); + + virtual ~wxMouseEventsManager(); + +protected: + // called to find the item at the given position: return wxNOT_FOUND (-1) + // if there is no item here + virtual int MouseHitTest(const wxPoint& pos) = 0; + + // called when the user clicked (i.e. pressed and released mouse over the + // same item), should normally generate a notification about this click and + // return true if it was handled or false otherwise, determining whether + // the original mouse event is skipped or not + virtual bool MouseClicked(int item) = 0; + + // called to start dragging the given item, should generate the appropriate + // BEGIN_DRAG event and return false if dragging this item was forbidden + virtual bool MouseDragBegin(int item, const wxPoint& pos) = 0; + + // called while the item is being dragged, should normally update the + // feedback on screen (usually using wxOverlay) + virtual void MouseDragging(int item, const wxPoint& pos) = 0; + + // called when the mouse is released after dragging the item + virtual void MouseDragEnd(int item, const wxPoint& pos) = 0; + + // called when mouse capture is lost while dragging the item, should remove + // the visual feedback drawn by MouseDragging() + virtual void MouseDragCancelled(int item) = 0; + + + // you don't need to override those but you will want to do if it your + // control renders pressed items differently + + // called when the item is becomes pressed, can be used to change its + // appearance + virtual void MouseClickBegin(int WXUNUSED(item)) { } + + // called if the mouse capture was lost while the item was pressed, can be + // used to restore the default item appearance if it was changed in + // MouseClickBegin() + virtual void MouseClickCancelled(int WXUNUSED(item)) { } + +private: + /* + Here is a small diagram explaining the switches between different + states: + + + /---------->NORMAL<--------------- Drag end + / / / | event + / / | | ^ + / / | | | + Click / N | | mouse | mouse up + event / | | down | + | / | | DRAGGING + | / | | ^ + Y|/ N \ v |Y + +-------------+ +--------+ N +-----------+ + |On same item?| |On item?| -----------|Begin drag?| + +-------------+ +--------+ / +-----------+ + ^ | / ^ + | | / | + \ mouse | / mouse moved | + \ up v v far enough / + \--------PRESSED-------------------/ + + + There are also transitions from PRESSED and DRAGGING to NORMAL in case + the mouse capture is lost or Escape key is pressed which are not shown. + */ + enum State + { + State_Normal, // initial, default state + State_Pressed, // mouse was pressed over an item + State_Dragging // the item is being dragged + }; + + // common part of both ctors + void Init(); + + // various event handlers + void OnCaptureLost(wxMouseCaptureLostEvent& event); + void OnLeftDown(wxMouseEvent& event); + void OnLeftUp(wxMouseEvent& event); + void OnMove(wxMouseEvent& event); + + + // the associated window, never NULL except between the calls to the + // default ctor and Create() + wxWindow *m_win; + + // the current state + State m_state; + + // the details of the operation currently in progress, only valid if + // m_state is not normal + + // the item being pressed or dragged (always valid, i.e. != wxNOT_FOUND if + // m_state != State_Normal) + int m_item; + + // the position of the last mouse event of interest: either mouse press in + // State_Pressed or last movement event in State_Dragging + wxPoint m_posLast; + + + DECLARE_EVENT_TABLE() + + wxDECLARE_NO_COPY_CLASS(wxMouseEventsManager); +}; + +#endif // _WX_MOUSEMANAGER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/mousestate.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mousestate.h new file mode 100644 index 0000000000..2ea1cc5bf1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mousestate.h @@ -0,0 +1,149 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/mousestate.h +// Purpose: Declaration of wxMouseState class +// Author: Vadim Zeitlin +// Created: 2008-09-19 (extracted from wx/utils.h) +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MOUSESTATE_H_ +#define _WX_MOUSESTATE_H_ + +#include "wx/gdicmn.h" // for wxPoint +#include "wx/kbdstate.h" + +// the symbolic names for the mouse buttons +enum wxMouseButton +{ + wxMOUSE_BTN_ANY = -1, + wxMOUSE_BTN_NONE = 0, + wxMOUSE_BTN_LEFT = 1, + wxMOUSE_BTN_MIDDLE = 2, + wxMOUSE_BTN_RIGHT = 3, + wxMOUSE_BTN_AUX1 = 4, + wxMOUSE_BTN_AUX2 = 5, + wxMOUSE_BTN_MAX +}; + +// ---------------------------------------------------------------------------- +// wxMouseState contains the information about mouse position, buttons and also +// key modifiers +// ---------------------------------------------------------------------------- + +// wxMouseState is used to hold information about button and modifier state +// and is what is returned from wxGetMouseState. +class WXDLLIMPEXP_CORE wxMouseState : public wxKeyboardState +{ +public: + wxMouseState() + : m_leftDown(false), m_middleDown(false), m_rightDown(false), + m_aux1Down(false), m_aux2Down(false), + m_x(0), m_y(0) + { + } + + // default copy ctor, assignment operator and dtor are ok + + + // accessors for the mouse position + wxCoord GetX() const { return m_x; } + wxCoord GetY() const { return m_y; } + wxPoint GetPosition() const { return wxPoint(m_x, m_y); } + void GetPosition(wxCoord *x, wxCoord *y) const + { + if ( x ) + *x = m_x; + if ( y ) + *y = m_y; + } + + // this overload is for compatibility only + void GetPosition(long *x, long *y) const + { + if ( x ) + *x = m_x; + if ( y ) + *y = m_y; + } + + // accessors for the pressed buttons + bool LeftIsDown() const { return m_leftDown; } + bool MiddleIsDown() const { return m_middleDown; } + bool RightIsDown() const { return m_rightDown; } + bool Aux1IsDown() const { return m_aux1Down; } + bool Aux2IsDown() const { return m_aux2Down; } + + bool ButtonIsDown(wxMouseButton but) const + { + switch ( but ) + { + case wxMOUSE_BTN_ANY: + return LeftIsDown() || MiddleIsDown() || RightIsDown() || + Aux1IsDown() || Aux2IsDown(); + + case wxMOUSE_BTN_LEFT: + return LeftIsDown(); + + case wxMOUSE_BTN_MIDDLE: + return MiddleIsDown(); + + case wxMOUSE_BTN_RIGHT: + return RightIsDown(); + + case wxMOUSE_BTN_AUX1: + return Aux1IsDown(); + + case wxMOUSE_BTN_AUX2: + return Aux2IsDown(); + + case wxMOUSE_BTN_NONE: + case wxMOUSE_BTN_MAX: + break; + } + + wxFAIL_MSG(wxS("invalid parameter")); + return false; + } + + + // these functions are mostly used by wxWidgets itself + void SetX(wxCoord x) { m_x = x; } + void SetY(wxCoord y) { m_y = y; } + void SetPosition(wxPoint pos) { m_x = pos.x, m_y = pos.y; } + + void SetLeftDown(bool down) { m_leftDown = down; } + void SetMiddleDown(bool down) { m_middleDown = down; } + void SetRightDown(bool down) { m_rightDown = down; } + void SetAux1Down(bool down) { m_aux1Down = down; } + void SetAux2Down(bool down) { m_aux2Down = down; } + + // this mostly makes sense in the derived classes such as wxMouseEvent + void SetState(const wxMouseState& state) { *this = state; } + + // these functions are for compatibility only, they were used in 2.8 + // version of wxMouseState but their names are confusing as wxMouseEvent + // has methods with the same names which do something quite different so + // don't use them any more +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_INLINE(bool LeftDown() const, return LeftIsDown(); ) + wxDEPRECATED_INLINE(bool MiddleDown() const, return MiddleIsDown(); ) + wxDEPRECATED_INLINE(bool RightDown() const, return RightIsDown(); ) +#endif // WXWIN_COMPATIBILITY_2_8 + + // for compatibility reasons these variables are public as the code using + // wxMouseEvent often uses them directly -- however they should not be + // accessed directly in this class, use the accessors above instead +// private: + bool m_leftDown : 1; + bool m_middleDown : 1; + bool m_rightDown : 1; + bool m_aux1Down : 1; + bool m_aux2Down : 1; + + wxCoord m_x, + m_y; +}; + +#endif // _WX_MOUSESTATE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msdos/apptrait.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msdos/apptrait.h new file mode 100644 index 0000000000..69216c64aa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msdos/apptrait.h @@ -0,0 +1,35 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msdos/apptrait.h +// Author: Michael Wetherell +// Copyright: (c) 2006 Michael Wetherell +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSDOS_APPTRAIT_H_ +#define _WX_MSDOS_APPTRAIT_H_ + +class wxConsoleAppTraits : public wxConsoleAppTraitsBase +{ +public: + virtual wxEventLoopBase *CreateEventLoop() { return NULL; } +#if wxUSE_TIMER + virtual wxTimerImpl *CreateTimerImpl(wxTimer *) { return NULL; } +#endif // wxUSE_TIMER +}; + +#if wxUSE_GUI + +class wxGUIAppTraits : public wxGUIAppTraitsBase +{ +public: + virtual wxEventLoopBase *CreateEventLoop(); + virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const; + +#if wxUSE_TIMER + virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); +#endif // wxUSE_TIMER +}; + +#endif // wxUSE_GUI + +#endif // _WX_MSDOS_APPTRAIT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msdos/mimetype.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msdos/mimetype.h new file mode 100644 index 0000000000..2404304704 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msdos/mimetype.h @@ -0,0 +1,110 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msdos/mimetype.h +// Purpose: classes and functions to manage MIME types +// Author: Vadim Zeitlin +// Modified by: +// Created: 23.09.98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence (part of wxExtra library) +///////////////////////////////////////////////////////////////////////////// + +#ifndef _MIMETYPE_IMPL_H +#define _MIMETYPE_IMPL_H + +#include "wx/defs.h" +#include "wx/mimetype.h" + + +class wxMimeTypesManagerImpl +{ +public : + wxMimeTypesManagerImpl() { } + + // load all data into memory - done when it is needed for the first time + void Initialize(int mailcapStyles = wxMAILCAP_STANDARD, + const wxString& extraDir = wxEmptyString); + + // and delete the data here + void ClearData(); + + // implement containing class functions + wxFileType *GetFileTypeFromExtension(const wxString& ext); + wxFileType *GetOrAllocateFileTypeFromExtension(const wxString& ext) ; + wxFileType *GetFileTypeFromMimeType(const wxString& mimeType); + + size_t EnumAllFileTypes(wxArrayString& mimetypes); + + void AddFallback(const wxFileTypeInfo& ft) { m_fallbacks.Add(ft); } + + // create a new filetype association + wxFileType *Associate(const wxFileTypeInfo& ftInfo); + // remove association + bool Unassociate(wxFileType *ft); + + // create a new filetype with the given name and extension + wxFileType *CreateFileType(const wxString& filetype, const wxString& ext); + +private: + wxArrayFileTypeInfo m_fallbacks; +}; + +class wxFileTypeImpl +{ +public: + // initialization functions + // this is used to construct a list of mimetypes which match; + // if built with GetFileTypeFromMimetype index 0 has the exact match and + // index 1 the type / * match + // if built with GetFileTypeFromExtension, index 0 has the mimetype for + // the first extension found, index 1 for the second and so on + + void Init(wxMimeTypesManagerImpl *manager, size_t index) + { m_manager = manager; m_index.Add(index); } + + // initialize us with our file type name + void SetFileType(const wxString& strFileType) + { m_strFileType = strFileType; } + void SetExt(const wxString& ext) + { m_ext = ext; } + + // implement accessor functions + bool GetExtensions(wxArrayString& extensions); + bool GetMimeType(wxString *mimeType) const; + bool GetMimeTypes(wxArrayString& mimeTypes) const; + bool GetIcon(wxIconLocation *iconLoc) const; + bool GetDescription(wxString *desc) const; + bool GetOpenCommand(wxString *openCmd, + const wxFileType::MessageParameters&) const + { return GetCommand(openCmd, "open"); } + bool GetPrintCommand(wxString *printCmd, + const wxFileType::MessageParameters&) const + { return GetCommand(printCmd, "print"); } + + size_t GetAllCommands(wxArrayString * verbs, wxArrayString * commands, + const wxFileType::MessageParameters& params) const; + + // remove the record for this file type + // probably a mistake to come here, use wxMimeTypesManager.Unassociate (ft) instead + bool Unassociate(wxFileType *ft) + { + return m_manager->Unassociate(ft); + } + + // set an arbitrary command, ask confirmation if it already exists and + // overwriteprompt is TRUE + bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = TRUE); + bool SetDefaultIcon(const wxString& strIcon = wxEmptyString, int index = 0); + + private: + // helper function + bool GetCommand(wxString *command, const char *verb) const; + + wxMimeTypesManagerImpl *m_manager; + wxArrayInt m_index; // in the wxMimeTypesManagerImpl arrays + wxString m_strFileType, m_ext; +}; + +#endif + //_MIMETYPE_H + +/* vi: set cin tw=80 ts=4 sw=4: */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msgdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msgdlg.h new file mode 100644 index 0000000000..8a234ac48f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msgdlg.h @@ -0,0 +1,321 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msgdlg.h +// Purpose: common header and base class for wxMessageDialog +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSGDLG_H_BASE_ +#define _WX_MSGDLG_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_MSGDLG + +#include "wx/dialog.h" +#include "wx/stockitem.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxMessageBoxCaptionStr[]; + +// ---------------------------------------------------------------------------- +// wxMessageDialogBase: base class defining wxMessageDialog interface +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMessageDialogBase : public wxDialog +{ +public: + // helper class for SetXXXLabels() methods: it makes it possible to pass + // either a stock id (wxID_CLOSE) or a string ("&Close") to them + class ButtonLabel + { + public: + // ctors are not explicit, objects of this class can be implicitly + // constructed from either stock ids or strings + ButtonLabel(int stockId) + : m_stockId(stockId) + { + wxASSERT_MSG( wxIsStockID(stockId), "invalid stock id" ); + } + + ButtonLabel(const wxString& label) + : m_label(label), m_stockId(wxID_NONE) + { + } + + ButtonLabel(const char *label) + : m_label(label), m_stockId(wxID_NONE) + { + } + + ButtonLabel(const wchar_t *label) + : m_label(label), m_stockId(wxID_NONE) + { + } + + ButtonLabel(const wxCStrData& label) + : m_label(label), m_stockId(wxID_NONE) + { + } + + // default copy ctor and dtor are ok + + // get the string label, whether it was originally specified directly + // or as a stock id -- this is only useful for platforms without native + // stock items id support + wxString GetAsString() const + { + return m_stockId == wxID_NONE + ? m_label + : wxGetStockLabel(m_stockId, wxSTOCK_FOR_BUTTON); + } + + // return the stock id or wxID_NONE if this is not a stock label + int GetStockId() const { return m_stockId; } + + private: + // the label if explicitly given or empty if this is a stock item + const wxString m_label; + + // the stock item id or wxID_NONE if m_label should be used + const int m_stockId; + }; + + // ctors + wxMessageDialogBase() { m_dialogStyle = 0; } + wxMessageDialogBase(wxWindow *parent, + const wxString& message, + const wxString& caption, + long style) + : m_message(message), + m_caption(caption) + { + m_parent = parent; + SetMessageDialogStyle(style); + } + + // virtual dtor for the base class + virtual ~wxMessageDialogBase() { } + + wxString GetCaption() const { return m_caption; } + + virtual void SetMessage(const wxString& message) + { + m_message = message; + } + + wxString GetMessage() const { return m_message; } + + void SetExtendedMessage(const wxString& extendedMessage) + { + m_extendedMessage = extendedMessage; + } + + wxString GetExtendedMessage() const { return m_extendedMessage; } + + // change the dialog style flag + void SetMessageDialogStyle(long style) + { + wxASSERT_MSG( ((style & wxYES_NO) == wxYES_NO) || !(style & wxYES_NO), + "wxYES and wxNO may only be used together" ); + + wxASSERT_MSG( !(style & wxYES) || !(style & wxOK), + "wxOK and wxYES/wxNO can't be used together" ); + + // It is common to specify just the icon, without wxOK, in the existing + // code, especially one written by Windows programmers as MB_OK is 0 + // and so they're used to omitting wxOK. Don't complain about it but + // just add wxOK implicitly for compatibility. + if ( !(style & wxYES) && !(style & wxOK) ) + style |= wxOK; + + wxASSERT_MSG( (style & wxID_OK) != wxID_OK, + "wxMessageBox: Did you mean wxOK (and not wxID_OK)?" ); + + wxASSERT_MSG( !(style & wxNO_DEFAULT) || (style & wxNO), + "wxNO_DEFAULT is invalid without wxNO" ); + + wxASSERT_MSG( !(style & wxCANCEL_DEFAULT) || (style & wxCANCEL), + "wxCANCEL_DEFAULT is invalid without wxCANCEL" ); + + wxASSERT_MSG( !(style & wxCANCEL_DEFAULT) || !(style & wxNO_DEFAULT), + "only one default button can be specified" ); + + m_dialogStyle = style; + } + + long GetMessageDialogStyle() const { return m_dialogStyle; } + + // customization of the message box buttons + virtual bool SetYesNoLabels(const ButtonLabel& yes,const ButtonLabel& no) + { + DoSetCustomLabel(m_yes, yes); + DoSetCustomLabel(m_no, no); + return true; + } + + virtual bool SetYesNoCancelLabels(const ButtonLabel& yes, + const ButtonLabel& no, + const ButtonLabel& cancel) + { + DoSetCustomLabel(m_yes, yes); + DoSetCustomLabel(m_no, no); + DoSetCustomLabel(m_cancel, cancel); + return true; + } + + virtual bool SetOKLabel(const ButtonLabel& ok) + { + DoSetCustomLabel(m_ok, ok); + return true; + } + + virtual bool SetOKCancelLabels(const ButtonLabel& ok, + const ButtonLabel& cancel) + { + DoSetCustomLabel(m_ok, ok); + DoSetCustomLabel(m_cancel, cancel); + return true; + } + + virtual bool SetHelpLabel(const ButtonLabel& help) + { + DoSetCustomLabel(m_help, help); + return true; + } + + // test if any custom labels were set + bool HasCustomLabels() const + { + return !(m_ok.empty() && m_cancel.empty() && m_help.empty() && + m_yes.empty() && m_no.empty()); + } + + // these functions return the label to be used for the button which is + // either a custom label explicitly set by the user or the default label, + // i.e. they always return a valid string + wxString GetYesLabel() const + { return m_yes.empty() ? GetDefaultYesLabel() : m_yes; } + wxString GetNoLabel() const + { return m_no.empty() ? GetDefaultNoLabel() : m_no; } + wxString GetOKLabel() const + { return m_ok.empty() ? GetDefaultOKLabel() : m_ok; } + wxString GetCancelLabel() const + { return m_cancel.empty() ? GetDefaultCancelLabel() : m_cancel; } + wxString GetHelpLabel() const + { return m_help.empty() ? GetDefaultHelpLabel() : m_help; } + + // based on message dialog style, returns exactly one of: wxICON_NONE, + // wxICON_ERROR, wxICON_WARNING, wxICON_QUESTION, wxICON_INFORMATION, + // wxICON_AUTH_NEEDED + virtual long GetEffectiveIcon() const + { + if ( m_dialogStyle & wxICON_NONE ) + return wxICON_NONE; + else if ( m_dialogStyle & wxICON_ERROR ) + return wxICON_ERROR; + else if ( m_dialogStyle & wxICON_WARNING ) + return wxICON_WARNING; + else if ( m_dialogStyle & wxICON_QUESTION ) + return wxICON_QUESTION; + else if ( m_dialogStyle & wxICON_INFORMATION ) + return wxICON_INFORMATION; + else if ( m_dialogStyle & wxYES ) + return wxICON_QUESTION; + else + return wxICON_INFORMATION; + } + +protected: + // for the platforms not supporting separate main and extended messages + // this function should be used to combine both of them in a single string + wxString GetFullMessage() const + { + wxString msg = m_message; + if ( !m_extendedMessage.empty() ) + msg << "\n\n" << m_extendedMessage; + + return msg; + } + + wxString m_message, + m_extendedMessage, + m_caption; + long m_dialogStyle; + + // this function is called by our public SetXXXLabels() and should assign + // the value to var with possibly some transformation (e.g. Cocoa version + // currently uses this to remove any accelerators from the button strings + // while GTK+ one handles stock items specifically here) + virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label) + { + var = label.GetAsString(); + } + + // these functions return the custom label or empty string and should be + // used only in specific circumstances such as creating the buttons with + // these labels (in which case it makes sense to only use a custom label if + // it was really given and fall back on stock label otherwise), use the + // Get{Yes,No,OK,Cancel}Label() methods above otherwise + const wxString& GetCustomYesLabel() const { return m_yes; } + const wxString& GetCustomNoLabel() const { return m_no; } + const wxString& GetCustomOKLabel() const { return m_ok; } + const wxString& GetCustomHelpLabel() const { return m_help; } + const wxString& GetCustomCancelLabel() const { return m_cancel; } + +private: + // these functions may be overridden to provide different defaults for the + // default button labels (this is used by wxGTK) + virtual wxString GetDefaultYesLabel() const { return wxGetTranslation("Yes"); } + virtual wxString GetDefaultNoLabel() const { return wxGetTranslation("No"); } + virtual wxString GetDefaultOKLabel() const { return wxGetTranslation("OK"); } + virtual wxString GetDefaultCancelLabel() const { return wxGetTranslation("Cancel"); } + virtual wxString GetDefaultHelpLabel() const { return wxGetTranslation("Help"); } + + // labels for the buttons, initially empty meaning that the defaults should + // be used, use GetYes/No/OK/CancelLabel() to access them + wxString m_yes, + m_no, + m_ok, + m_cancel, + m_help; + + wxDECLARE_NO_COPY_CLASS(wxMessageDialogBase); +}; + +#include "wx/generic/msgdlgg.h" + +#if defined(__WX_COMPILING_MSGDLGG_CPP__) || \ + defined(__WXUNIVERSAL__) || defined(__WXGPE__) || \ + (defined(__WXGTK__) && !defined(__WXGTK20__)) + + #define wxMessageDialog wxGenericMessageDialog +#elif defined(__WXCOCOA__) + #include "wx/cocoa/msgdlg.h" +#elif defined(__WXMSW__) + #include "wx/msw/msgdlg.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/msgdlg.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/msgdlg.h" +#elif defined(__WXMAC__) + #include "wx/osx/msgdlg.h" +#elif defined(__WXPM__) + #include "wx/os2/msgdlg.h" +#endif + +// ---------------------------------------------------------------------------- +// wxMessageBox: the simplest way to use wxMessageDialog +// ---------------------------------------------------------------------------- + +int WXDLLIMPEXP_CORE wxMessageBox(const wxString& message, + const wxString& caption = wxMessageBoxCaptionStr, + long style = wxOK | wxCENTRE, + wxWindow *parent = NULL, + int x = wxDefaultCoord, int y = wxDefaultCoord); + +#endif // wxUSE_MSGDLG + +#endif // _WX_MSGDLG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msgout.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msgout.h new file mode 100644 index 0000000000..63b39b92c2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msgout.h @@ -0,0 +1,185 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msgout.h +// Purpose: wxMessageOutput class. Shows a message to the user +// Author: Mattia Barbon +// Modified by: +// Created: 17.07.02 +// Copyright: (c) Mattia Barbon +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSGOUT_H_ +#define _WX_MSGOUT_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" +#include "wx/chartype.h" +#include "wx/strvararg.h" + +// ---------------------------------------------------------------------------- +// wxMessageOutput is a class abstracting formatted output target, i.e. +// something you can printf() to +// ---------------------------------------------------------------------------- + +// NB: VC6 has a bug that causes linker errors if you have template methods +// in a class using __declspec(dllimport). The solution is to split such +// class into two classes, one that contains the template methods and does +// *not* use WXDLLIMPEXP_BASE and another class that contains the rest +// (with DLL linkage). +class wxMessageOutputBase +{ +public: + virtual ~wxMessageOutputBase() { } + + // show a message to the user + // void Printf(const wxString& format, ...) = 0; + WX_DEFINE_VARARG_FUNC_VOID(Printf, 1, (const wxFormatString&), + DoPrintfWchar, DoPrintfUtf8) +#ifdef __WATCOMC__ + // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351 + WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const wxString&), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const wxCStrData&), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const char*), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const wchar_t*), + (wxFormatString(f1))); +#endif + + // called by DoPrintf() to output formatted string but can also be called + // directly if no formatting is needed + virtual void Output(const wxString& str) = 0; + +protected: + // NB: this is pure virtual so that it can be implemented in dllexported + // wxMessagOutput class +#if !wxUSE_UTF8_LOCALE_ONLY + virtual void DoPrintfWchar(const wxChar *format, ...) = 0; +#endif +#if wxUSE_UNICODE_UTF8 + virtual void DoPrintfUtf8(const char *format, ...) = 0; +#endif +}; + +#ifdef __VISUALC__ + // "non dll-interface class 'wxStringPrintfMixin' used as base interface + // for dll-interface class 'wxString'" -- this is OK in our case + #pragma warning (push) + #pragma warning (disable:4275) +#endif + +class WXDLLIMPEXP_BASE wxMessageOutput : public wxMessageOutputBase +{ +public: + virtual ~wxMessageOutput() { } + + // gets the current wxMessageOutput object (may be NULL during + // initialization or shutdown) + static wxMessageOutput* Get(); + + // sets the global wxMessageOutput instance; returns the previous one + static wxMessageOutput* Set(wxMessageOutput* msgout); + +protected: +#if !wxUSE_UTF8_LOCALE_ONLY + virtual void DoPrintfWchar(const wxChar *format, ...); +#endif +#if wxUSE_UNICODE_UTF8 + virtual void DoPrintfUtf8(const char *format, ...); +#endif + +private: + static wxMessageOutput* ms_msgOut; +}; + +#ifdef __VISUALC__ + #pragma warning (pop) +#endif + +// ---------------------------------------------------------------------------- +// implementation which sends output to stderr or specified file +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMessageOutputStderr : public wxMessageOutput +{ +public: + wxMessageOutputStderr(FILE *fp = stderr) : m_fp(fp) { } + + virtual void Output(const wxString& str); + +protected: + // return the string with "\n" appended if it doesn't already terminate + // with it (in which case it's returned unchanged) + wxString AppendLineFeedIfNeeded(const wxString& str); + + FILE *m_fp; +}; + +// ---------------------------------------------------------------------------- +// implementation showing the message to the user in "best" possible way: +// uses stderr or message box if available according to the flag given to ctor. +// ---------------------------------------------------------------------------- + +enum wxMessageOutputFlags +{ + wxMSGOUT_PREFER_STDERR = 0, // use stderr if available (this is the default) + wxMSGOUT_PREFER_MSGBOX = 1 // always use message box if available +}; + +class WXDLLIMPEXP_BASE wxMessageOutputBest : public wxMessageOutputStderr +{ +public: + wxMessageOutputBest(wxMessageOutputFlags flags = wxMSGOUT_PREFER_STDERR) + : m_flags(flags) { } + + virtual void Output(const wxString& str); + +private: + wxMessageOutputFlags m_flags; +}; + +// ---------------------------------------------------------------------------- +// implementation which shows output in a message box +// ---------------------------------------------------------------------------- + +#if wxUSE_GUI && wxUSE_MSGDLG + +class WXDLLIMPEXP_CORE wxMessageOutputMessageBox : public wxMessageOutput +{ +public: + wxMessageOutputMessageBox() { } + + virtual void Output(const wxString& str); +}; + +#endif // wxUSE_GUI && wxUSE_MSGDLG + +// ---------------------------------------------------------------------------- +// implementation using the native way of outputting debug messages +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMessageOutputDebug : public wxMessageOutputStderr +{ +public: + wxMessageOutputDebug() { } + + virtual void Output(const wxString& str); +}; + +// ---------------------------------------------------------------------------- +// implementation using wxLog (mainly for backwards compatibility) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMessageOutputLog : public wxMessageOutput +{ +public: + wxMessageOutputLog() { } + + virtual void Output(const wxString& str); +}; + +#endif // _WX_MSGOUT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msgqueue.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msgqueue.h new file mode 100644 index 0000000000..8b8da87d18 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msgqueue.h @@ -0,0 +1,168 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msqqueue.h +// Purpose: Message queues for inter-thread communication +// Author: Evgeniy Tarassov +// Created: 2007-10-31 +// Copyright: (C) 2007 TT-Solutions SARL +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSGQUEUE_H_ +#define _WX_MSGQUEUE_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/thread.h" + +#if wxUSE_THREADS + +#include "wx/stopwatch.h" + +#include "wx/beforestd.h" +#include <queue> +#include "wx/afterstd.h" + +enum wxMessageQueueError +{ + wxMSGQUEUE_NO_ERROR = 0, // operation completed successfully + wxMSGQUEUE_TIMEOUT, // no messages received before timeout expired + wxMSGQUEUE_MISC_ERROR // some unexpected (and fatal) error has occurred +}; + +// --------------------------------------------------------------------------- +// Message queue allows passing message between threads. +// +// This class is typically used for communicating between the main and worker +// threads. The main thread calls Post() and the worker thread calls Receive(). +// +// For this class a message is an object of arbitrary type T. Notice that +// typically there must be some special message indicating that the thread +// should terminate as there is no other way to gracefully shutdown a thread +// waiting on the message queue. +// --------------------------------------------------------------------------- +template <typename T> +class wxMessageQueue +{ +public: + // The type of the messages transported by this queue + typedef T Message; + + // Default ctor creates an initially empty queue + wxMessageQueue() + : m_conditionNotEmpty(m_mutex) + { + } + + // Add a message to this queue and signal the threads waiting for messages. + // + // This method is safe to call from multiple threads in parallel. + wxMessageQueueError Post(const Message& msg) + { + wxMutexLocker locker(m_mutex); + + wxCHECK( locker.IsOk(), wxMSGQUEUE_MISC_ERROR ); + + m_messages.push(msg); + + m_conditionNotEmpty.Signal(); + + return wxMSGQUEUE_NO_ERROR; + } + + // Remove all messages from the queue. + // + // This method is meant to be called from the same thread(s) that call + // Post() to discard any still pending requests if they became unnecessary. + wxMessageQueueError Clear() + { + wxCHECK( IsOk(), wxMSGQUEUE_MISC_ERROR ); + + wxMutexLocker locker(m_mutex); + + std::queue<T> empty; + std::swap(m_messages, empty); + + return wxMSGQUEUE_NO_ERROR; + } + + // Wait no more than timeout milliseconds until a message becomes available. + // + // Setting timeout to 0 is equivalent to an infinite timeout. See Receive(). + wxMessageQueueError ReceiveTimeout(long timeout, T& msg) + { + wxCHECK( IsOk(), wxMSGQUEUE_MISC_ERROR ); + + wxMutexLocker locker(m_mutex); + + wxCHECK( locker.IsOk(), wxMSGQUEUE_MISC_ERROR ); + + const wxMilliClock_t waitUntil = wxGetLocalTimeMillis() + timeout; + while ( m_messages.empty() ) + { + wxCondError result = m_conditionNotEmpty.WaitTimeout(timeout); + + if ( result == wxCOND_NO_ERROR ) + continue; + + wxCHECK( result == wxCOND_TIMEOUT, wxMSGQUEUE_MISC_ERROR ); + + const wxMilliClock_t now = wxGetLocalTimeMillis(); + + if ( now >= waitUntil ) + return wxMSGQUEUE_TIMEOUT; + + timeout = (waitUntil - now).ToLong(); + wxASSERT(timeout > 0); + } + + msg = m_messages.front(); + m_messages.pop(); + + return wxMSGQUEUE_NO_ERROR; + } + + // Same as ReceiveTimeout() but waits for as long as it takes for a message + // to become available (so it can't return wxMSGQUEUE_TIMEOUT) + wxMessageQueueError Receive(T& msg) + { + wxCHECK( IsOk(), wxMSGQUEUE_MISC_ERROR ); + + wxMutexLocker locker(m_mutex); + + wxCHECK( locker.IsOk(), wxMSGQUEUE_MISC_ERROR ); + + while ( m_messages.empty() ) + { + wxCondError result = m_conditionNotEmpty.Wait(); + + wxCHECK( result == wxCOND_NO_ERROR, wxMSGQUEUE_MISC_ERROR ); + } + + msg = m_messages.front(); + m_messages.pop(); + + return wxMSGQUEUE_NO_ERROR; + } + + // Return false only if there was a fatal error in ctor + bool IsOk() const + { + return m_conditionNotEmpty.IsOk(); + } + +private: + // Disable copy ctor and assignment operator + wxMessageQueue(const wxMessageQueue<T>& rhs); + wxMessageQueue<T>& operator=(const wxMessageQueue<T>& rhs); + + mutable wxMutex m_mutex; + wxCondition m_conditionNotEmpty; + + std::queue<T> m_messages; +}; + +#endif // wxUSE_THREADS + +#endif // _WX_MSGQUEUE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/mstream.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mstream.h new file mode 100644 index 0000000000..435aebdfb8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/mstream.h @@ -0,0 +1,109 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/mstream.h +// Purpose: Memory stream classes +// Author: Guilhem Lavaux +// Modified by: +// Created: 11/07/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WXMMSTREAM_H__ +#define _WX_WXMMSTREAM_H__ + +#include "wx/defs.h" + +#if wxUSE_STREAMS + +#include "wx/stream.h" + +class WXDLLIMPEXP_FWD_BASE wxMemoryOutputStream; + +class WXDLLIMPEXP_BASE wxMemoryInputStream : public wxInputStream +{ +public: + wxMemoryInputStream(const void *data, size_t length); + wxMemoryInputStream(const wxMemoryOutputStream& stream); + wxMemoryInputStream(wxInputStream& stream, + wxFileOffset lenFile = wxInvalidOffset) + { + InitFromStream(stream, lenFile); + } + wxMemoryInputStream(wxMemoryInputStream& stream) + : wxInputStream() + { + InitFromStream(stream, wxInvalidOffset); + } + + virtual ~wxMemoryInputStream(); + virtual wxFileOffset GetLength() const { return m_length; } + virtual bool IsSeekable() const { return true; } + + virtual char Peek(); + virtual bool CanRead() const; + + wxStreamBuffer *GetInputStreamBuffer() const { return m_i_streambuf; } + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated, compatibility only + wxDEPRECATED( wxStreamBuffer *InputStreamBuffer() const ); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + wxStreamBuffer *m_i_streambuf; + + size_t OnSysRead(void *buffer, size_t nbytes); + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; + +private: + // common part of ctors taking wxInputStream + void InitFromStream(wxInputStream& stream, wxFileOffset lenFile); + + size_t m_length; + + // copy ctor is implemented above: it copies the other stream in this one + DECLARE_ABSTRACT_CLASS(wxMemoryInputStream) + wxDECLARE_NO_ASSIGN_CLASS(wxMemoryInputStream); +}; + +class WXDLLIMPEXP_BASE wxMemoryOutputStream : public wxOutputStream +{ +public: + // if data is !NULL it must be allocated with malloc() + wxMemoryOutputStream(void *data = NULL, size_t length = 0); + virtual ~wxMemoryOutputStream(); + virtual wxFileOffset GetLength() const { return m_o_streambuf->GetLastAccess(); } + virtual bool IsSeekable() const { return true; } + + size_t CopyTo(void *buffer, size_t len) const; + + wxStreamBuffer *GetOutputStreamBuffer() const { return m_o_streambuf; } + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated, compatibility only + wxDEPRECATED( wxStreamBuffer *OutputStreamBuffer() const ); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + wxStreamBuffer *m_o_streambuf; + +protected: + size_t OnSysWrite(const void *buffer, size_t nbytes); + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; + + DECLARE_DYNAMIC_CLASS(wxMemoryOutputStream) + wxDECLARE_NO_COPY_CLASS(wxMemoryOutputStream); +}; + +#if WXWIN_COMPATIBILITY_2_6 + inline wxStreamBuffer *wxMemoryInputStream::InputStreamBuffer() const { return m_i_streambuf; } + inline wxStreamBuffer *wxMemoryOutputStream::OutputStreamBuffer() const { return m_o_streambuf; } +#endif // WXWIN_COMPATIBILITY_2_6 + +#endif + // wxUSE_STREAMS + +#endif + // _WX_WXMMSTREAM_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/accel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/accel.h new file mode 100644 index 0000000000..182662c209 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/accel.h @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/accel.h +// Purpose: wxAcceleratorTable class +// Author: Julian Smart +// Modified by: +// Created: 31/7/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ACCEL_H_ +#define _WX_ACCEL_H_ + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +// ---------------------------------------------------------------------------- +// the accel table has all accelerators for a given window or menu +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxAcceleratorTable : public wxObject +{ +public: + // default ctor + wxAcceleratorTable() { } + + // load from .rc resource (Windows specific) + wxAcceleratorTable(const wxString& resource); + + // initialize from array + wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); + + bool Ok() const { return IsOk(); } + bool IsOk() const; + void SetHACCEL(WXHACCEL hAccel); + WXHACCEL GetHACCEL() const; + + // translate the accelerator, return true if done + bool Translate(wxWindow *window, WXMSG *msg) const; + +private: + DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) +}; + +#endif + // _WX_ACCEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/amd64.manifest b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/amd64.manifest new file mode 100644 index 0000000000..60db9e3150 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/amd64.manifest @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> +<assemblyIdentity + version="0.64.1.0" + processorArchitecture="amd64" + name="Controls" + type="win32" +/> +<description>wxWindows application</description> +<dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="amd64" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> +</dependency> +</assembly> diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/anybutton.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/anybutton.h new file mode 100644 index 0000000000..e8226d51c3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/anybutton.h @@ -0,0 +1,80 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/anybutton.h +// Purpose: wxAnyButton class +// Author: Julian Smart +// Created: 1997-02-01 (extracted from button.h) +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_ANYBUTTON_H_ +#define _WX_MSW_ANYBUTTON_H_ + +// ---------------------------------------------------------------------------- +// Common button functionality +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase +{ +public: + wxAnyButton() + { + m_imageData = NULL; +#if wxUSE_MARKUP + m_markupText = NULL; +#endif // wxUSE_MARKUP + } + + virtual ~wxAnyButton(); + + // overridden base class methods + virtual void SetLabel(const wxString& label); + virtual bool SetBackgroundColour(const wxColour &colour); + virtual bool SetForegroundColour(const wxColour &colour); + + // implementation from now on + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + + virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item); + virtual State GetNormalState() const { return State_Normal; } + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +protected: + // usually overridden base class virtuals + virtual wxSize DoGetBestSize() const; + + virtual wxBitmap DoGetBitmap(State which) const; + virtual void DoSetBitmap(const wxBitmap& bitmap, State which); + virtual wxSize DoGetBitmapMargins() const; + virtual void DoSetBitmapMargins(wxCoord x, wxCoord y); + virtual void DoSetBitmapPosition(wxDirection dir); + +#if wxUSE_MARKUP + virtual bool DoSetLabelMarkup(const wxString& markup); +#endif // wxUSE_MARKUP + + // Increases the passed in size to account for the button image. + // + // Should only be called if we do have a button, i.e. if m_imageData is + // non-NULL. + void AdjustForBitmapSize(wxSize& size) const; + + class wxButtonImageData *m_imageData; + +#if wxUSE_MARKUP + class wxMarkupText *m_markupText; +#endif // wxUSE_MARKUP + + // Switches button into owner-drawn mode: this is used if we need to draw + // something not supported by the native control, such as using non default + // colours or a bitmap on pre-XP systems. + void MakeOwnerDrawn(); + bool IsOwnerDrawn() const; + +private: + wxDECLARE_NO_COPY_CLASS(wxAnyButton); +}; + +#endif // _WX_MSW_ANYBUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/app.h new file mode 100644 index 0000000000..b1b65da13e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/app.h @@ -0,0 +1,129 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/app.h +// Purpose: wxApp class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_APP_H_ +#define _WX_APP_H_ + +#include "wx/event.h" +#include "wx/icon.h" + +class WXDLLIMPEXP_FWD_CORE wxFrame; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxApp; +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; +class WXDLLIMPEXP_FWD_BASE wxLog; + +// Represents the application. Derive OnInit and declare +// a new App object to start application +class WXDLLIMPEXP_CORE wxApp : public wxAppBase +{ +public: + wxApp(); + virtual ~wxApp(); + + // override base class (pure) virtuals + virtual bool Initialize(int& argc, wxChar **argv); + virtual void CleanUp(); + + virtual void WakeUpIdle(); + + virtual void SetPrintMode(int mode) { m_printMode = mode; } + virtual int GetPrintMode() const { return m_printMode; } + + // implementation only + void OnIdle(wxIdleEvent& event); + void OnEndSession(wxCloseEvent& event); + void OnQueryEndSession(wxCloseEvent& event); + +#if wxUSE_EXCEPTIONS + virtual bool OnExceptionInMainLoop(); +#endif // wxUSE_EXCEPTIONS + + // MSW-specific from now on + // ------------------------ + + // this suffix should be appended to all our Win32 class names to obtain a + // variant registered without CS_[HV]REDRAW styles + static const wxChar *GetNoRedrawClassSuffix() { return wxT("NR"); } + + // get the name of the registered Win32 class with the given (unique) base + // name: this function constructs the unique class name using this name as + // prefix, checks if the class is already registered and registers it if it + // isn't and returns the name it was registered under (or NULL if it failed) + // + // the registered class will always have CS_[HV]REDRAW and CS_DBLCLKS + // styles as well as any additional styles specified as arguments here; and + // there will be also a companion registered class identical to this one + // but without CS_[HV]REDRAW whose name will be the same one but with + // GetNoRedrawClassSuffix() + // + // the background brush argument must be either a COLOR_XXX standard value + // or (default) -1 meaning that the class paints its background itself + static const wxChar *GetRegisteredClassName(const wxChar *name, + int bgBrushCol = -1, + int extraStyles = 0); + + // return true if this name corresponds to one of the classes we registered + // in the previous GetRegisteredClassName() calls + static bool IsRegisteredClassName(const wxString& name); + +protected: + int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT + +public: + // unregister any window classes registered by GetRegisteredClassName() + static void UnregisterWindowClasses(); + +#if wxUSE_RICHEDIT + // initialize the richedit DLL of (at least) given version, return true if + // ok (Win95 has version 1, Win98/NT4 has 1 and 2, W2K has 3) + static bool InitRichEdit(int version = 2); +#endif // wxUSE_RICHEDIT + + // returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it + // wasn't found at all + static int GetComCtl32Version(); + + // the same for shell32.dll: returns 400, 471, 500, 600, ... (4.70 not + // currently detected) + static int GetShell32Version(); + + // the SW_XXX value to be used for the frames opened by the application + // (currently seems unused which is a bug -- TODO) + static int m_nCmdShow; + +protected: + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxApp); + DECLARE_DYNAMIC_CLASS(wxApp) +}; + +#ifdef __WXWINCE__ + +// under CE provide a dummy implementation of GetComCtl32Version() returning +// the value passing all ">= 470" tests (which are the only ones used in our +// code currently) as commctrl.dll under CE 2.0 and later support comctl32.dll +// functionality +inline int wxApp::GetComCtl32Version() +{ + return 471; +} + +// this is not currently used at all under CE so it's not really clear what do +// we need to return from here +inline int wxApp::GetShell32Version() +{ + return 0; +} + +#endif // __WXWINCE__ + +#endif // _WX_APP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/apptbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/apptbase.h new file mode 100644 index 0000000000..65a1b5bff3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/apptbase.h @@ -0,0 +1,72 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/apptbase.h +// Purpose: declaration of wxAppTraits for MSW +// Author: Vadim Zeitlin +// Modified by: +// Created: 22.06.2003 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_APPTBASE_H_ +#define _WX_MSW_APPTBASE_H_ + +// ---------------------------------------------------------------------------- +// wxAppTraits: the MSW version adds extra hooks needed by MSW-only code +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase +{ +public: + // wxExecute() support methods + // --------------------------- + + // called before starting to wait for the child termination, may return + // some opaque data which will be passed later to AfterChildWaitLoop() + virtual void *BeforeChildWaitLoop() = 0; + + // called after starting to wait for the child termination, the parameter + // is the return value of BeforeChildWaitLoop() + virtual void AfterChildWaitLoop(void *data) = 0; + + +#if wxUSE_THREADS + // wxThread helpers + // ---------------- + + // process a message while waiting for a(nother) thread, should return + // false if and only if we have to exit the application + virtual bool DoMessageFromThreadWait() = 0; + + // wait for the handle to be signaled, return WAIT_OBJECT_0 if it is or, in + // the GUI code, WAIT_OBJECT_0 + 1 if a Windows message arrived + virtual WXDWORD WaitForThread(WXHANDLE hThread, int flags) = 0; +#endif // wxUSE_THREADS + + +#ifndef __WXWINCE__ + // console helpers + // --------------- + + // this method can be overridden by a derived class to always return true + // or false to force [not] using the console for output to stderr + // + // by default console applications always return true from here while the + // GUI ones only return true if they're being run from console and there is + // no other activity happening in this console + virtual bool CanUseStderr() = 0; + + // write text to the console, return true if ok or false on error + virtual bool WriteToStderr(const wxString& text) = 0; +#endif // !__WXWINCE__ + +protected: +#if wxUSE_THREADS + // implementation of WaitForThread() for the console applications which is + // also used by the GUI code if it doesn't [yet|already] dispatch events + WXDWORD DoSimpleWaitForThread(WXHANDLE hThread); +#endif // wxUSE_THREADS +}; + +#endif // _WX_MSW_APPTBASE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/apptrait.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/apptrait.h new file mode 100644 index 0000000000..f190da6dab --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/apptrait.h @@ -0,0 +1,96 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/apptrait.h +// Purpose: class implementing wxAppTraits for MSW +// Author: Vadim Zeitlin +// Modified by: +// Created: 21.06.2003 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_APPTRAIT_H_ +#define _WX_MSW_APPTRAIT_H_ + +// ---------------------------------------------------------------------------- +// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase +{ +public: + virtual wxEventLoopBase *CreateEventLoop(); + virtual void *BeforeChildWaitLoop(); + virtual void AfterChildWaitLoop(void *data); +#if wxUSE_TIMER + virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); +#endif // wxUSE_TIMER +#if wxUSE_THREADS + virtual bool DoMessageFromThreadWait(); + virtual WXDWORD WaitForThread(WXHANDLE hThread, int flags); +#endif // wxUSE_THREADS +#ifndef __WXWINCE__ + virtual bool CanUseStderr() { return true; } + virtual bool WriteToStderr(const wxString& text); +#endif // !__WXWINCE__ +}; + +#if wxUSE_GUI + +#if defined(__WXMSW__) + +class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase +{ +public: + virtual wxEventLoopBase *CreateEventLoop(); + virtual void *BeforeChildWaitLoop(); + virtual void AfterChildWaitLoop(void *data); +#if wxUSE_TIMER + virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); +#endif // wxUSE_TIMER +#if wxUSE_THREADS + virtual bool DoMessageFromThreadWait(); + virtual WXDWORD WaitForThread(WXHANDLE hThread, int flags); +#endif // wxUSE_THREADS + virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const; + +#ifndef __WXWINCE__ + virtual bool CanUseStderr(); + virtual bool WriteToStderr(const wxString& text); +#endif // !__WXWINCE__ +}; + +#elif defined(__WXGTK__) + +class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase +{ +public: + virtual wxEventLoopBase *CreateEventLoop(); + virtual void *BeforeChildWaitLoop() { return NULL; } + virtual void AfterChildWaitLoop(void *WXUNUSED(data)) { } +#if wxUSE_TIMER + virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); +#endif + +#if wxUSE_THREADS && defined(__WXGTK20__) + virtual void MutexGuiEnter(); + virtual void MutexGuiLeave(); +#endif + +#if wxUSE_THREADS + virtual bool DoMessageFromThreadWait() { return true; } + virtual WXDWORD WaitForThread(WXHANDLE hThread, int WXUNUSED(flags)) + { return DoSimpleWaitForThread(hThread); } +#endif // wxUSE_THREADS + virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const; + +#ifndef __WXWINCE__ + virtual bool CanUseStderr() { return false; } + virtual bool WriteToStderr(const wxString& WXUNUSED(text)) { return false; } +#endif // !__WXWINCE__ +}; + +#endif + +#endif // wxUSE_GUI + +#endif // _WX_MSW_APPTRAIT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bitmap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bitmap.h new file mode 100644 index 0000000000..c677af8ca3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bitmap.h @@ -0,0 +1,314 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/bitmap.h +// Purpose: wxBitmap class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BITMAP_H_ +#define _WX_BITMAP_H_ + +#include "wx/msw/gdiimage.h" +#include "wx/math.h" +#include "wx/palette.h" + +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxBitmapHandler; +class WXDLLIMPEXP_FWD_CORE wxBitmapRefData; +class WXDLLIMPEXP_FWD_CORE wxControl; +class WXDLLIMPEXP_FWD_CORE wxCursor; +class WXDLLIMPEXP_FWD_CORE wxDC; +#if wxUSE_WXDIB +class WXDLLIMPEXP_FWD_CORE wxDIB; +#endif +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxMask; +class WXDLLIMPEXP_FWD_CORE wxPalette; +class WXDLLIMPEXP_FWD_CORE wxPixelDataBase; + +// What kind of transparency should a bitmap copied from an icon or cursor +// have? +enum wxBitmapTransparency +{ + wxBitmapTransparency_Auto, // default: copy alpha if the source has it + wxBitmapTransparency_None, // never create alpha + wxBitmapTransparency_Always // always use alpha +}; + +// ---------------------------------------------------------------------------- +// wxBitmap: a mono or colour bitmap +// NOTE: for wxMSW we don't use the wxBitmapBase base class declared in bitmap.h! +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmap : public wxGDIImage, + public wxBitmapHelpers +{ +public: + // default ctor creates an invalid bitmap, you must Create() it later + wxBitmap() { } + + // Initialize with raw data + wxBitmap(const char bits[], int width, int height, int depth = 1); + + // Initialize with XPM data + wxBitmap(const char* const* data); +#ifdef wxNEEDS_CHARPP + wxBitmap(char** data) + { + *this = wxBitmap(const_cast<const char* const*>(data)); + } +#endif + + // Load a file or resource + wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); + + // New constructor for generalised creation from data + wxBitmap(const void* data, wxBitmapType type, int width, int height, int depth = 1); + + // Create a new, uninitialized bitmap of the given size and depth (if it + // is omitted, will create a bitmap compatible with the display) + // + // NB: this ctor will create a DIB for 24 and 32bpp bitmaps, use ctor + // taking a DC argument if you want to force using DDB in this case + wxBitmap(int width, int height, int depth = -1) { (void)Create(width, height, depth); } + wxBitmap(const wxSize& sz, int depth = -1) { (void)Create(sz, depth); } + + // Create a bitmap compatible with the given DC + wxBitmap(int width, int height, const wxDC& dc); + +#if wxUSE_IMAGE + // Convert from wxImage + wxBitmap(const wxImage& image, int depth = -1) + { (void)CreateFromImage(image, depth); } + + // Create a DDB compatible with the given DC from wxImage + wxBitmap(const wxImage& image, const wxDC& dc) + { (void)CreateFromImage(image, dc); } +#endif // wxUSE_IMAGE + + // we must have this, otherwise icons are silently copied into bitmaps using + // the copy ctor but the resulting bitmap is invalid! + wxBitmap(const wxIcon& icon, + wxBitmapTransparency transp = wxBitmapTransparency_Auto) + { + CopyFromIcon(icon, transp); + } + + wxBitmap& operator=(const wxIcon& icon) + { + (void)CopyFromIcon(icon); + + return *this; + } + + wxBitmap& operator=(const wxCursor& cursor) + { + (void)CopyFromCursor(cursor); + + return *this; + } + + virtual ~wxBitmap(); + +#if wxUSE_IMAGE + wxImage ConvertToImage() const; + wxBitmap ConvertToDisabled(unsigned char brightness = 255) const; +#endif // wxUSE_IMAGE + + // get the given part of bitmap + wxBitmap GetSubBitmap( const wxRect& rect ) const; + + // NB: This should not be called from user code. It is for wx internal + // use only. + wxBitmap GetSubBitmapOfHDC( const wxRect& rect, WXHDC hdc ) const; + + // copies the contents and mask of the given (colour) icon to the bitmap + bool CopyFromIcon(const wxIcon& icon, + wxBitmapTransparency transp = wxBitmapTransparency_Auto); + + // copies the contents and mask of the given cursor to the bitmap + bool CopyFromCursor(const wxCursor& cursor, + wxBitmapTransparency transp = wxBitmapTransparency_Auto); + +#if wxUSE_WXDIB + // copies from a device independent bitmap + bool CopyFromDIB(const wxDIB& dib); + bool IsDIB() const; + bool ConvertToDIB(); +#endif + + virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); + virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) + { return Create(sz.GetWidth(), sz.GetHeight(), depth); } + + virtual bool Create(int width, int height, const wxDC& dc); + virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1); + virtual bool CreateScaled(int w, int h, int d, double logicalScale) + { return Create(wxRound(w*logicalScale), wxRound(h*logicalScale), d); } + + virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); + virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = NULL) const; + + wxBitmapRefData *GetBitmapData() const + { return (wxBitmapRefData *)m_refData; } + + // raw bitmap access support functions + void *GetRawData(wxPixelDataBase& data, int bpp); + void UngetRawData(wxPixelDataBase& data); + +#if wxUSE_PALETTE + wxPalette* GetPalette() const; + void SetPalette(const wxPalette& palette); +#endif // wxUSE_PALETTE + + wxMask *GetMask() const; + void SetMask(wxMask *mask); + + // these functions are internal and shouldn't be used, they risk to + // disappear in the future + bool HasAlpha() const; + void UseAlpha(); + void ResetAlpha(); + + // support for scaled bitmaps + virtual double GetScaleFactor() const { return 1.0; } + virtual double GetScaledWidth() const { return GetWidth() / GetScaleFactor(); } + virtual double GetScaledHeight() const { return GetHeight() / GetScaleFactor(); } + virtual wxSize GetScaledSize() const + { return wxSize(wxRound(GetScaledWidth()), wxRound(GetScaledHeight())); } + + // implementation only from now on + // ------------------------------- + +public: + void SetHBITMAP(WXHBITMAP bmp) { SetHandle((WXHANDLE)bmp); } + WXHBITMAP GetHBITMAP() const { return (WXHBITMAP)GetHandle(); } + + void SetSelectedInto(wxDC *dc); + wxDC *GetSelectedInto() const; + +protected: + virtual wxGDIImageRefData *CreateData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + // creates an uninitialized bitmap, called from Create()s above + bool DoCreate(int w, int h, int depth, WXHDC hdc); + +#if wxUSE_IMAGE + // creates the bitmap from wxImage, supposed to be called from ctor + bool CreateFromImage(const wxImage& image, int depth); + + // creates a DDB from wxImage, supposed to be called from ctor + bool CreateFromImage(const wxImage& image, const wxDC& dc); + + // common part of the 2 methods above (hdc may be 0) + bool CreateFromImage(const wxImage& image, int depth, WXHDC hdc); +#endif // wxUSE_IMAGE + +private: + // common part of CopyFromIcon/CopyFromCursor for Win32 + bool + CopyFromIconOrCursor(const wxGDIImage& icon, + wxBitmapTransparency transp = wxBitmapTransparency_Auto); + + + DECLARE_DYNAMIC_CLASS(wxBitmap) +}; + +// ---------------------------------------------------------------------------- +// wxMask: a mono bitmap used for drawing bitmaps transparently. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMask : public wxObject +{ +public: + wxMask(); + + // Copy constructor + wxMask(const wxMask &mask); + + // Construct a mask from a bitmap and a colour indicating the transparent + // area + wxMask(const wxBitmap& bitmap, const wxColour& colour); + + // Construct a mask from a bitmap and a palette index indicating the + // transparent area + wxMask(const wxBitmap& bitmap, int paletteIndex); + + // Construct a mask from a mono bitmap (copies the bitmap). + wxMask(const wxBitmap& bitmap); + + // construct a mask from the givne bitmap handle + wxMask(WXHBITMAP hbmp) { m_maskBitmap = hbmp; } + + virtual ~wxMask(); + + bool Create(const wxBitmap& bitmap, const wxColour& colour); + bool Create(const wxBitmap& bitmap, int paletteIndex); + bool Create(const wxBitmap& bitmap); + + wxBitmap GetBitmap() const; + + // Implementation + WXHBITMAP GetMaskBitmap() const { return m_maskBitmap; } + void SetMaskBitmap(WXHBITMAP bmp) { m_maskBitmap = bmp; } + +protected: + WXHBITMAP m_maskBitmap; + + DECLARE_DYNAMIC_CLASS(wxMask) +}; + + +// ---------------------------------------------------------------------------- +// wxBitmapHandler is a class which knows how to load/save bitmaps to/from file +// NOTE: for wxMSW we don't use the wxBitmapHandler class declared in bitmap.h! +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapHandler : public wxGDIImageHandler +{ +public: + wxBitmapHandler() { } + wxBitmapHandler(const wxString& name, const wxString& ext, wxBitmapType type) + : wxGDIImageHandler(name, ext, type) { } + + // implement wxGDIImageHandler's pure virtuals: + + virtual bool Create(wxGDIImage *image, + const void* data, + wxBitmapType type, + int width, int height, int depth = 1); + virtual bool Load(wxGDIImage *image, + const wxString& name, + wxBitmapType type, + int desiredWidth, int desiredHeight); + virtual bool Save(const wxGDIImage *image, + const wxString& name, + wxBitmapType type) const; + + + // make wxBitmapHandler compatible with the wxBitmapHandler interface + // declared in bitmap.h, even if it's derived from wxGDIImageHandler: + + virtual bool Create(wxBitmap *bitmap, + const void* data, + wxBitmapType type, + int width, int height, int depth = 1); + virtual bool LoadFile(wxBitmap *bitmap, + const wxString& name, + wxBitmapType type, + int desiredWidth, int desiredHeight); + virtual bool SaveFile(const wxBitmap *bitmap, + const wxString& name, + wxBitmapType type, + const wxPalette *palette = NULL) const; + +private: + DECLARE_DYNAMIC_CLASS(wxBitmapHandler) +}; + +#endif + // _WX_BITMAP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/blank.cur b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/blank.cur new file mode 100644 index 0000000000..048f06b4ae Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/blank.cur differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bmpbuttn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bmpbuttn.h new file mode 100644 index 0000000000..e435673c2b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bmpbuttn.h @@ -0,0 +1,49 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/bmpbuttn.h +// Purpose: wxBitmapButton class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BMPBUTTN_H_ +#define _WX_BMPBUTTN_H_ + +#include "wx/button.h" +#include "wx/bitmap.h" +#include "wx/brush.h" + +class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase +{ +public: + wxBitmapButton() {} + + wxBitmapButton(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + 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, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxBU_AUTODRAW, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + +protected: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton) +}; + +#endif // _WX_BMPBUTTN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bmpcbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bmpcbox.h new file mode 100644 index 0000000000..0462c46217 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bmpcbox.h @@ -0,0 +1,135 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/bmpcbox.h +// Purpose: wxBitmapComboBox +// Author: Jaakko Salli +// Created: 2008-04-06 +// Copyright: (c) 2008 Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_BMPCBOX_H_ +#define _WX_MSW_BMPCBOX_H_ + + +#include "wx/combobox.h" + + +// ---------------------------------------------------------------------------- +// wxBitmapComboBox: a wxComboBox that allows images to be shown +// in front of string items. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxBitmapComboBox : public wxComboBox, + public wxBitmapComboBoxBase +{ +public: + // ctors and such + wxBitmapComboBox() : wxComboBox(), wxBitmapComboBoxBase() + { + Init(); + } + + wxBitmapComboBox(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr) + : wxComboBox(), + wxBitmapComboBoxBase() + { + Init(); + + (void)Create(parent, id, value, pos, size, n, + choices, style, validator, name); + } + + wxBitmapComboBox(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + int n, + const wxString choices[], + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapComboBoxNameStr); + + virtual ~wxBitmapComboBox(); + + // Sets the image for the given item. + virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap); + + virtual bool SetFont(const wxFont& font); + + // Adds item with image to the end of the combo box. + int Append(const wxString& item, const wxBitmap& bitmap = wxNullBitmap); + int Append(const wxString& item, const wxBitmap& bitmap, void *clientData); + int Append(const wxString& item, const wxBitmap& bitmap, wxClientData *clientData); + + // Inserts item with image into the list before pos. Not valid for wxCB_SORT + // styles, use Append instead. + int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos); + int Insert(const wxString& item, const wxBitmap& bitmap, + unsigned int pos, void *clientData); + int Insert(const wxString& item, const wxBitmap& bitmap, + unsigned int pos, wxClientData *clientData); + +protected: + + WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item); + virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item); + + // Event handlers + void OnSize(wxSizeEvent& event); + + virtual wxItemContainer* GetItemContainer() { return this; } + virtual wxWindow* GetControl() { return this; } + + // wxItemContainer implementation + virtual int DoInsertItems(const wxArrayStringsAdapter & items, + unsigned int pos, + void **clientData, wxClientDataType type); + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + + virtual bool OnAddBitmap(const wxBitmap& bitmap); + virtual wxSize DoGetBestSize() const; + void RecreateControl(); + +private: + void Init(); + + bool m_inResize; + + DECLARE_EVENT_TABLE() + + DECLARE_DYNAMIC_CLASS(wxBitmapComboBox) +}; + +#endif // _WX_MSW_BMPCBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/brush.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/brush.h new file mode 100644 index 0000000000..9665fd1133 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/brush.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/brush.h +// Purpose: wxBrush class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BRUSH_H_ +#define _WX_BRUSH_H_ + +class WXDLLIMPEXP_FWD_CORE wxBrush; +class WXDLLIMPEXP_FWD_CORE wxColour; +class WXDLLIMPEXP_FWD_CORE wxBitmap; + +// ---------------------------------------------------------------------------- +// wxBrush +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase +{ +public: + wxBrush(); + wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) ); +#endif + wxBrush(const wxBitmap& stipple); + virtual ~wxBrush(); + + virtual void SetColour(const wxColour& col); + virtual void SetColour(unsigned char r, unsigned char g, unsigned char b); + virtual void SetStyle(wxBrushStyle style); + virtual void SetStipple(const wxBitmap& stipple); + + bool operator==(const wxBrush& brush) const; + bool operator!=(const wxBrush& brush) const { return !(*this == brush); } + + wxColour GetColour() const; + wxBrushStyle GetStyle() const; + wxBitmap *GetStipple() const; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxBrushStyle)style); } +#endif + + // return the HBRUSH for this brush + virtual WXHANDLE GetResourceHandle() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxBrush) +}; + +#endif // _WX_BRUSH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bullseye.cur b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bullseye.cur new file mode 100644 index 0000000000..359f6e09af Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/bullseye.cur differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/button.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/button.h new file mode 100644 index 0000000000..26979a8939 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/button.h @@ -0,0 +1,85 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/button.h +// Purpose: wxButton class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_BUTTON_H_ +#define _WX_MSW_BUTTON_H_ + +// ---------------------------------------------------------------------------- +// Pushbutton +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxButton : public wxButtonBase +{ +public: + wxButton() { Init(); } + wxButton(wxWindow *parent, + wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Init(); + + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + virtual ~wxButton(); + + virtual wxWindow *SetDefault(); + + // implementation from now on + virtual void Command(wxCommandEvent& event); + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + virtual bool MSWCommand(WXUINT param, WXWORD id); + + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + +protected: + // send a notification event, return true if processed + bool SendClickEvent(); + + // default button handling + void SetTmpDefault(); + void UnsetTmpDefault(); + + // set or unset BS_DEFPUSHBUTTON style + static void SetDefaultStyle(wxButton *btn, bool on); + + virtual bool DoGetAuthNeeded() const; + virtual void DoSetAuthNeeded(bool show); + + // true if the UAC symbol is shown + bool m_authNeeded; + +private: + void Init() + { + m_authNeeded = false; + } + + void OnCharHook(wxKeyEvent& event); + + wxDECLARE_EVENT_TABLE(); + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxButton); +}; + +#endif // _WX_MSW_BUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/calctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/calctrl.h new file mode 100644 index 0000000000..c5c51d9fde --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/calctrl.h @@ -0,0 +1,98 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/calctrl.h +// Purpose: wxCalendarCtrl control implementation for MSW +// Author: Vadim Zeitlin +// Copyright: (C) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_CALCTRL_H_ +#define _WX_MSW_CALCTRL_H_ + +class WXDLLIMPEXP_ADV wxCalendarCtrl : public wxCalendarCtrlBase +{ +public: + wxCalendarCtrl() { Init(); } + wxCalendarCtrl(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAL_SHOW_HOLIDAYS, + const wxString& name = wxCalendarNameStr) + { + Init(); + + Create(parent, id, date, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAL_SHOW_HOLIDAYS, + const wxString& name = wxCalendarNameStr); + + virtual bool SetDate(const wxDateTime& date); + virtual wxDateTime GetDate() const; + + virtual bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, + const wxDateTime& upperdate = wxDefaultDateTime); + virtual bool GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const; + + virtual bool EnableMonthChange(bool enable = true); + + virtual void Mark(size_t day, bool mark); + virtual void SetHoliday(size_t day); + + virtual wxCalendarHitTestResult HitTest(const wxPoint& pos, + wxDateTime *date = NULL, + wxDateTime::WeekDay *wd = NULL); + + virtual void SetWindowStyleFlag(long style); + +protected: + virtual wxSize DoGetBestSize() const; + + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + + void MSWOnClick(wxMouseEvent& event); + void MSWOnDoubleClick(wxMouseEvent& event); + +private: + void Init(); + + // bring the control in sync with m_marks + void UpdateMarks(); + + // set first day of week in the control to correspond to our + // wxCAL_MONDAY_FIRST flag + void UpdateFirstDayOfWeek(); + + // reset holiday information + virtual void ResetHolidayAttrs() { m_holidays = 0; } + + // redisplay holidays + virtual void RefreshHolidays() { UpdateMarks(); } + + + // current date, we need to store it instead of simply retrieving it from + // the control as needed in order to be able to generate the correct events + // from MSWOnNotify() + wxDateTime m_date; + + // bit field containing the state (marked or not) of all days in the month + wxUint32 m_marks; + + // the same but indicating whether a day is a holiday or not + wxUint32 m_holidays; + + + DECLARE_DYNAMIC_CLASS(wxCalendarCtrl) + wxDECLARE_NO_COPY_CLASS(wxCalendarCtrl); +}; + +#endif // _WX_MSW_CALCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/caret.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/caret.h new file mode 100644 index 0000000000..c179032d08 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/caret.h @@ -0,0 +1,63 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/caret.h +// Purpose: wxCaret class - the MSW implementation of wxCaret +// Author: Vadim Zeitlin +// Modified by: +// Created: 23.05.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CARET_H_ +#define _WX_CARET_H_ + +class WXDLLIMPEXP_CORE wxCaret : public wxCaretBase +{ +public: + wxCaret() { Init(); } + // create the caret of given (in pixels) width and height and associate + // with the given window + wxCaret(wxWindow *window, int width, int height) + { + Init(); + + (void)Create(window, width, height); + } + // same as above + wxCaret(wxWindowBase *window, const wxSize& size) + { + Init(); + + (void)Create(window, size); + } + + // process wxWindow notifications + virtual void OnSetFocus(); + virtual void OnKillFocus(); + +protected: + void Init() + { + wxCaretBase::Init(); + + m_hasCaret = false; + } + + // override base class virtuals + virtual void DoMove(); + virtual void DoShow(); + virtual void DoHide(); + virtual void DoSize(); + + // helper function which creates the system caret + bool MSWCreateCaret(); + +private: + bool m_hasCaret; + + wxDECLARE_NO_COPY_CLASS(wxCaret); +}; + +#endif // _WX_CARET_H_ + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/cdrom.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/cdrom.ico new file mode 100644 index 0000000000..f3fa3a9576 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/cdrom.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/checkbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/checkbox.h new file mode 100644 index 0000000000..c1f0eff868 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/checkbox.h @@ -0,0 +1,93 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/checkbox.h +// Purpose: wxCheckBox class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHECKBOX_H_ +#define _WX_CHECKBOX_H_ + +// Checkbox item (single checkbox) +class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase +{ +public: + wxCheckBox() { } + wxCheckBox(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + virtual void SetValue(bool value); + virtual bool GetValue() const; + + // override some base class virtuals + virtual void SetLabel(const wxString& label); + + virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual void Command(wxCommandEvent& event); + virtual bool SetForegroundColour(const wxColour& colour); + virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item); + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + + // make the checkbox owner drawn or reset it to normal style + void MSWMakeOwnerDrawn(bool ownerDrawn); + + // implementation only from now on + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const; + +protected: + virtual wxSize DoGetBestClientSize() const; + + virtual void DoSet3StateValue(wxCheckBoxState value); + virtual wxCheckBoxState DoGet3StateValue() const; + + // return true if this checkbox is owner drawn + bool IsOwnerDrawn() const; + +private: + // common part of all ctors + void Init(); + + // event handlers used by owner-drawn checkbox + void OnMouseEnterOrLeave(wxMouseEvent& event); + void OnMouseLeft(wxMouseEvent& event); + void OnFocus(wxFocusEvent& event); + + + // current state of the checkbox + wxCheckBoxState m_state; + + // true if the checkbox is currently pressed + bool m_isPressed; + + // true if mouse is currently over the control + bool m_isHot; + + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckBox) +}; + +#endif + // _WX_CHECKBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/checklst.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/checklst.h new file mode 100644 index 0000000000..21b8651ac0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/checklst.h @@ -0,0 +1,88 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/checklst.h +// Purpose: wxCheckListBox class - a listbox with checkable items +// Author: Vadim Zeitlin +// Modified by: +// Created: 16.11.97 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __CHECKLST__H_ +#define __CHECKLST__H_ + +#if !wxUSE_OWNER_DRAWN + #error "wxCheckListBox class requires owner-drawn functionality." +#endif + +class WXDLLIMPEXP_FWD_CORE wxOwnerDrawn; +class WXDLLIMPEXP_FWD_CORE wxCheckListBoxItem; // fwd decl, defined in checklst.cpp + +class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase +{ +public: + // ctors + wxCheckListBox(); + wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int nStrings = 0, + const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + // items may be checked + virtual bool IsChecked(unsigned int uiIndex) const; + virtual void Check(unsigned int uiIndex, bool bCheck = true); + virtual void Toggle(unsigned int uiIndex); + + // we create our items ourselves and they have non-standard size, + // so we need to override these functions + virtual wxOwnerDrawn *CreateLboxItem(size_t n); + virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item); + +protected: + // pressing space or clicking the check box toggles the item + void OnKeyDown(wxKeyEvent& event); + void OnLeftClick(wxMouseEvent& event); + + // send an "item checked" event + void SendEvent(unsigned int uiIndex) + { + wxCommandEvent event(wxEVT_CHECKLISTBOX, GetId()); + event.SetInt(uiIndex); + event.SetEventObject(this); + event.SetString(GetString(uiIndex)); + ProcessCommand(event); + } + + wxSize DoGetBestClientSize() const; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckListBox) +}; + +#endif //_CHECKLST_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/child.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/child.ico new file mode 100644 index 0000000000..435cca2471 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/child.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/chkconf.h new file mode 100644 index 0000000000..c13adf7c5c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/chkconf.h @@ -0,0 +1,458 @@ +/* + * Name: wx/msw/chkconf.h + * Purpose: Compiler-specific configuration checking + * Author: Julian Smart + * Modified by: + * Created: 01/02/97 + * Copyright: (c) Julian Smart + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_MSW_CHKCONF_H_ +#define _WX_MSW_CHKCONF_H_ + +/* ensure that MSW-specific settings are defined */ +#ifndef wxUSE_ACTIVEX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ACTIVEX must be defined." +# else +# define wxUSE_ACTIVEX 0 +# endif +#endif /* !defined(wxUSE_ACTIVEX) */ + +#ifndef wxUSE_CRASHREPORT +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CRASHREPORT must be defined." +# else +# define wxUSE_CRASHREPORT 0 +# endif +#endif /* !defined(wxUSE_CRASHREPORT) */ + +#ifndef wxUSE_DC_CACHEING +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DC_CACHEING must be defined" +# else +# define wxUSE_DC_CACHEING 1 +# endif +#endif /* wxUSE_DC_CACHEING */ + +#ifndef wxUSE_DIALUP_MANAGER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DIALUP_MANAGER must be defined." +# else +# define wxUSE_DIALUP_MANAGER 0 +# endif +#endif /* !defined(wxUSE_DIALUP_MANAGER) */ + +#ifndef wxUSE_MS_HTML_HELP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MS_HTML_HELP must be defined." +# else +# define wxUSE_MS_HTML_HELP 0 +# endif +#endif /* !defined(wxUSE_MS_HTML_HELP) */ + +#ifndef wxUSE_INICONF +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_INICONF must be defined." +# else +# define wxUSE_INICONF 0 +# endif +#endif /* !defined(wxUSE_INICONF) */ + +#ifndef wxUSE_OLE +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_OLE must be defined." +# else +# define wxUSE_OLE 0 +# endif +#endif /* !defined(wxUSE_OLE) */ + +#ifndef wxUSE_OLE_AUTOMATION +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_OLE_AUTOMATION must be defined." +# else +# define wxUSE_OLE_AUTOMATION 0 +# endif +#endif /* !defined(wxUSE_OLE_AUTOMATION) */ + +#ifndef wxUSE_TASKBARICON_BALLOONS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_TASKBARICON_BALLOONS must be defined." +# else +# define wxUSE_TASKBARICON_BALLOONS 0 +# endif +#endif /* wxUSE_TASKBARICON_BALLOONS */ + +#ifndef wxUSE_UNICODE_MSLU +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_UNICODE_MSLU must be defined." +# else +# define wxUSE_UNICODE_MSLU 0 +# endif +#endif /* wxUSE_UNICODE_MSLU */ + +#ifndef wxUSE_UXTHEME +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_UXTHEME must be defined." +# else +# define wxUSE_UXTHEME 0 +# endif +#endif /* wxUSE_UXTHEME */ + +/* + * We don't want to give an error if wxUSE_UNICODE_MSLU is enabled but + * wxUSE_UNICODE is not as this would make it impossible to simply set the + * former in wx/setup.h as then the library wouldn't compile in non-Unicode + * configurations, so instead simply unset it silently when it doesn't make + * sense. + */ +#if wxUSE_UNICODE_MSLU && !wxUSE_UNICODE +# undef wxUSE_UNICODE_MSLU +# define wxUSE_UNICODE_MSLU 0 +#endif + + +/* + * Unfortunately we can't use compiler TLS support if the library can be used + * inside a dynamically loaded DLL under Windows XP, as this can result in hard + * to diagnose crashes due to the bugs in Windows TLS support, see #13116. + * + * So we disable it unless we can be certain that the code will never run under + * XP, as is the case if we're using a compiler which doesn't support XP such + * as MSVC 11+, unless it's used with the special "_xp" toolset, in which case + * _USING_V110_SDK71_ is defined. + * + * However defining wxUSE_COMPILER_TLS as 2 overrides this safety check, see + * the comments in wx/setup.h. + */ +#if wxUSE_COMPILER_TLS == 1 + #if !wxCHECK_VISUALC_VERSION(11) || defined(_USING_V110_SDK71_) + #undef wxUSE_COMPILER_TLS + #define wxUSE_COMPILER_TLS 0 + #endif +#endif + + +/* + * disable the settings which don't work for some compilers + */ + +#ifndef wxUSE_NORLANDER_HEADERS +# if ( wxCHECK_WATCOM_VERSION(1,0) || defined(__WINE__) ) || \ + ((defined(__MINGW32__) || defined(__CYGWIN__)) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))) +# define wxUSE_NORLANDER_HEADERS 1 +# else +# define wxUSE_NORLANDER_HEADERS 0 +# endif +#endif + +/* + * See WINVER definition in wx/msw/wrapwin.h for the explanation of this test + * logic. + */ +#if (defined(__VISUALC__) && (__VISUALC__ < 1300)) && \ + (!defined(WINVER) || WINVER < 0x0500) +# undef wxUSE_TASKBARICON_BALLOONS +# define wxUSE_TASKBARICON_BALLOONS 0 +#endif + +/* + * All of the settings below require SEH support (__try/__catch) and can't work + * without it. + */ +#if !defined(_MSC_VER) && \ + (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550) +# undef wxUSE_ON_FATAL_EXCEPTION +# define wxUSE_ON_FATAL_EXCEPTION 0 + +# undef wxUSE_CRASHREPORT +# define wxUSE_CRASHREPORT 0 + +# undef wxUSE_STACKWALKER +# define wxUSE_STACKWALKER 0 +#endif /* compiler doesn't support SEH */ + +#if defined(__GNUWIN32__) + /* These don't work as expected for mingw32 and cygwin32 */ +# undef wxUSE_MEMORY_TRACING +# define wxUSE_MEMORY_TRACING 0 + +# undef wxUSE_GLOBAL_MEMORY_OPERATORS +# define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +# undef wxUSE_DEBUG_NEW_ALWAYS +# define wxUSE_DEBUG_NEW_ALWAYS 0 + +/* some Cygwin versions don't have wcslen */ +# if defined(__CYGWIN__) || defined(__CYGWIN32__) +# if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) +# undef wxUSE_WCHAR_T +# define wxUSE_WCHAR_T 0 +# endif +#endif + +#endif /* __GNUWIN32__ */ + +/* wxUSE_MFC is not defined when using configure as it doesn't make sense for + gcc or mingw32 anyhow */ +#ifndef wxUSE_MFC + #define wxUSE_MFC 0 +#endif /* !defined(wxUSE_MFC) */ + +/* MFC duplicates these operators */ +#if wxUSE_MFC +# undef wxUSE_GLOBAL_MEMORY_OPERATORS +# define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +# undef wxUSE_DEBUG_NEW_ALWAYS +# define wxUSE_DEBUG_NEW_ALWAYS 0 +#endif /* wxUSE_MFC */ + +#if (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) + /* GnuWin32 doesn't have appropriate headers for e.g. IUnknown. */ +# undef wxUSE_DRAG_AND_DROP +# define wxUSE_DRAG_AND_DROP 0 +#endif + +#if !wxUSE_OWNER_DRAWN && !defined(__WXUNIVERSAL__) +# undef wxUSE_CHECKLISTBOX +# define wxUSE_CHECKLISTBOX 0 +#endif + +#if wxUSE_SPINCTRL +# if !wxUSE_SPINBTN +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxSpinCtrl requires wxSpinButton on MSW" +# else +# undef wxUSE_SPINBTN +# define wxUSE_SPINBTN 1 +# endif +# endif +#endif + +/* + Win64-specific checks. + */ +#ifdef __WIN64__ +# if wxUSE_STACKWALKER +# undef wxUSE_CRASHREPORT +# define wxUSE_CRASHREPORT 0 +# endif +#endif /* __WIN64__ */ + + +/* + Compiler-specific checks. + */ + +/* Borland */ +#ifdef __BORLANDC__ + +#if __BORLANDC__ < 0x500 + /* BC++ 4.0 can't compile JPEG library */ +# undef wxUSE_LIBJPEG +# define wxUSE_LIBJPEG 0 +#endif + +/* wxUSE_DEBUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode */ +#if defined(WXMAKINGDLL) || defined(WXUSINGDLL) +# undef wxUSE_DEBUG_NEW_ALWAYS +# define wxUSE_DEBUG_NEW_ALWAYS 0 +#endif + +#endif /* __BORLANDC__ */ + +/* DMC++ doesn't have definitions for date picker control, so use generic control + */ +#ifdef __DMC__ +# if wxUSE_DATEPICKCTRL +# undef wxUSE_DATEPICKCTRL_GENERIC +# undef wxUSE_DATEPICKCTRL +# endif +# define wxUSE_DATEPICKCTRL 0 +# define wxUSE_DATEPICKCTRL_GENERIC 1 +#endif + + + +/* + un/redefine the options which we can't compile (after checking that they're + defined + */ +#ifdef __WINE__ +# if wxUSE_ACTIVEX +# undef wxUSE_ACTIVEX +# define wxUSE_ACTIVEX 0 +# endif /* wxUSE_ACTIVEX */ + +# if wxUSE_UNICODE_MSLU +# undef wxUSE_UNICODE_MSLU +# define wxUSE_UNICODE_MSLU 0 +# endif /* wxUSE_UNICODE_MSLU */ +#endif /* __WINE__ */ + + +/* check settings consistency for MSW-specific ones */ +#if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION" +# else +# undef wxUSE_CRASHREPORT +# define wxUSE_CRASHREPORT 0 +# endif +#endif /* wxUSE_CRASHREPORT */ + +#if !wxUSE_VARIANT +# if wxUSE_ACTIVEX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxActiveXContainer requires wxVariant" +# else +# undef wxUSE_ACTIVEX +# define wxUSE_ACTIVEX 0 +# endif +# endif + +# if wxUSE_OLE_AUTOMATION +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxAutomationObject requires wxVariant" +# else +# undef wxUSE_OLE_AUTOMATION +# define wxUSE_OLE_AUTOMATION 0 +# endif +# endif +#endif /* !wxUSE_VARIANT */ + +#if !wxUSE_DYNAMIC_LOADER +# if wxUSE_MS_HTML_HELP +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MS_HTML_HELP requires wxUSE_DYNAMIC_LOADER." +# else +# undef wxUSE_MS_HTML_HELP +# define wxUSE_MS_HTML_HELP 0 +# endif +# endif +# if wxUSE_DIALUP_MANAGER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DIALUP_MANAGER requires wxUSE_DYNAMIC_LOADER." +# else +# undef wxUSE_DIALUP_MANAGER +# define wxUSE_DIALUP_MANAGER 0 +# endif +# endif +#endif /* !wxUSE_DYNAMIC_LOADER */ + +#if !wxUSE_DYNLIB_CLASS +# if wxUSE_DC_TRANSFORM_MATRIX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DC_TRANSFORM_MATRIX requires wxUSE_DYNLIB_CLASS" +# else +# undef wxUSE_DC_TRANSFORM_MATRIX +# define wxUSE_DC_TRANSFORM_MATRIX 0 +# endif +# endif +# if wxUSE_UXTHEME +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS" +# else +# undef wxUSE_UXTHEME +# define wxUSE_UXTHEME 0 +# endif +# endif +# if wxUSE_MEDIACTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS" +# else +# undef wxUSE_MEDIACTRL +# define wxUSE_MEDIACTRL 0 +# endif +# endif +# if wxUSE_INKEDIT +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_INKEDIT requires wxUSE_DYNLIB_CLASS" +# else +# undef wxUSE_INKEDIT +# define wxUSE_INKEDIT 0 +# endif +# endif +#endif /* !wxUSE_DYNLIB_CLASS */ + +#if !wxUSE_OLE +# if wxUSE_ACTIVEX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxActiveXContainer requires wxUSE_OLE" +# else +# undef wxUSE_ACTIVEX +# define wxUSE_ACTIVEX 0 +# endif +# endif + +# if wxUSE_DATAOBJ +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_DATAOBJ requires wxUSE_OLE" +# else +# undef wxUSE_DATAOBJ +# define wxUSE_DATAOBJ 0 +# endif +# endif + +# if wxUSE_OLE_AUTOMATION +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxAutomationObject requires wxUSE_OLE" +# else +# undef wxUSE_OLE_AUTOMATION +# define wxUSE_OLE_AUTOMATION 0 +# endif +# endif +#endif /* !wxUSE_OLE */ + +#if !wxUSE_ACTIVEX +# if wxUSE_MEDIACTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxMediaCtl requires wxActiveXContainer" +# else +# undef wxUSE_MEDIACTRL +# define wxUSE_MEDIACTRL 0 +# endif +# endif +# if wxUSE_WEB +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxWebView requires wxActiveXContainer under MSW" +# else +# undef wxUSE_WEB +# define wxUSE_WEB 0 +# endif +# endif +#endif /* !wxUSE_ACTIVEX */ + +#if !wxUSE_THREADS +# if wxUSE_FSWATCHER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxFileSystemWatcher requires wxThread under MSW" +# else +# undef wxUSE_FSWATCHER +# define wxUSE_FSWATCHER 0 +# endif +# endif +#endif /* !wxUSE_THREADS */ + + +#if !wxUSE_OLE_AUTOMATION +# if wxUSE_WEB +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxWebView requires wxUSE_OLE_AUTOMATION under MSW" +# else +# undef wxUSE_WEB +# define wxUSE_WEB 0 +# endif +# endif +#endif /* !wxUSE_OLE_AUTOMATION */ + +#if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT +# undef wxUSE_POSTSCRIPT +# define wxUSE_POSTSCRIPT 1 +#endif + +#endif /* _WX_MSW_CHKCONF_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/choice.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/choice.h new file mode 100644 index 0000000000..a6c5703efc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/choice.h @@ -0,0 +1,180 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/choice.h +// Purpose: wxChoice class +// Author: Julian Smart +// Modified by: Vadim Zeitlin to derive from wxChoiceBase +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHOICE_H_ +#define _WX_CHOICE_H_ + +struct tagCOMBOBOXINFO; + +// ---------------------------------------------------------------------------- +// Choice item +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxChoice : public wxChoiceBase +{ +public: + // ctors + wxChoice() { Init(); } + virtual ~wxChoice(); + + wxChoice(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Init(); + Create(parent, id, pos, size, n, choices, style, validator, name); + } + + wxChoice(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Init(); + Create(parent, id, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + + virtual bool Show(bool show = true); + + virtual void SetLabel(const wxString& label); + + virtual unsigned int GetCount() const; + virtual int GetSelection() const; + virtual int GetCurrentSelection() const; + virtual void SetSelection(int n); + + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // MSW only + virtual bool MSWCommand(WXUINT param, WXWORD id); + WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + virtual WXHBRUSH MSWControlColor(WXHDC hDC, WXHWND hWnd); + virtual bool MSWShouldPreProcessMessage(WXMSG *pMsg); + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // common part of all ctors + void Init() + { + m_lastAcceptedSelection = + m_pendingSelection = wxID_NONE; + m_heightOwn = wxDefaultCoord; + } + + virtual void DoDeleteOneItem(unsigned int n); + virtual void DoClear(); + + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + + // MSW implementation + virtual wxSize DoGetBestSize() const; + virtual void DoGetSize(int *w, int *h) const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + + // Show or hide the popup part of the control. + void MSWDoPopupOrDismiss(bool show); + + // update the height of the drop down list to fit the number of items we + // have (without changing the visible height) + void MSWUpdateDropDownHeight(); + + // set the height of the visible part of the control to m_heightOwn + void MSWUpdateVisibleHeight(); + + // Call GetComboBoxInfo() and return false if it's not supported by this + // system. Notice that the caller must initialize info.cbSize. + bool MSWGetComboBoxInfo(tagCOMBOBOXINFO* info) const; + + // create and initialize the control + bool CreateAndInit(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + int n, const wxString choices[], + long style, + const wxValidator& validator, + const wxString& name); + + // free all memory we have (used by Clear() and dtor) + void Free(); + + // set the height for simple combo box + int SetHeightSimpleComboBox(int nItems) const; + +#if wxUSE_DEFERRED_SIZING + virtual void MSWEndDeferWindowPos(); +#endif // wxUSE_DEFERRED_SIZING + + // These variables are only used while the drop down is opened. + // + // The first one contains the item that had been originally selected before + // the drop down was opened and the second one the item we should select + // when the drop down is closed again. + int m_lastAcceptedSelection, + m_pendingSelection; + + // the height of the control itself if it was set explicitly or + // wxDefaultCoord if it hadn't + int m_heightOwn; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoice) +}; + +#endif // _WX_CHOICE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/clipbrd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/clipbrd.h new file mode 100644 index 0000000000..53e8a169f9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/clipbrd.h @@ -0,0 +1,89 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/clipbrd.h +// Purpose: wxClipboad class and clipboard functions for MSW +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CLIPBRD_H_ +#define _WX_CLIPBRD_H_ + +#if wxUSE_CLIPBOARD + +// These functions superceded by wxClipboard, but retained in order to +// implement wxClipboard, and for compatibility. + +// open/close the clipboard +WXDLLIMPEXP_CORE bool wxOpenClipboard(); +WXDLLIMPEXP_CORE bool wxIsClipboardOpened(); +#define wxClipboardOpen wxIsClipboardOpened +WXDLLIMPEXP_CORE bool wxCloseClipboard(); + +// get/set data +WXDLLIMPEXP_CORE bool wxEmptyClipboard(); +WXDLLIMPEXP_CORE bool wxSetClipboardData(wxDataFormat dataFormat, + const void *data, + int width = 0, int height = 0); +WXDLLIMPEXP_CORE void* wxGetClipboardData(wxDataFormat dataFormat, + long *len = NULL); + +// clipboard formats +WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat); +WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat); +WXDLLIMPEXP_CORE int wxRegisterClipboardFormat(wxChar *formatName); +WXDLLIMPEXP_CORE bool wxGetClipboardFormatName(wxDataFormat dataFormat, + wxChar *formatName, + int maxCount); + +//----------------------------------------------------------------------------- +// wxClipboard +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase +{ +public: + wxClipboard(); + virtual ~wxClipboard(); + + // open the clipboard before SetData() and GetData() + virtual bool Open(); + + // close the clipboard after SetData() and GetData() + virtual void Close(); + + // query whether the clipboard is opened + virtual bool IsOpened() const; + + // set the clipboard data. all other formats will be deleted. + virtual bool SetData( wxDataObject *data ); + + // add to the clipboard data. + virtual bool AddData( wxDataObject *data ); + + // ask if data in correct format is available + virtual bool IsSupported( const wxDataFormat& format ); + + // fill data with data on the clipboard (if available) + virtual bool GetData( wxDataObject& data ); + + // clears wxTheClipboard and the system's clipboard if possible + virtual void Clear(); + + // flushes the clipboard: this means that the data which is currently on + // clipboard will stay available even after the application exits (possibly + // eating memory), otherwise the clipboard will be emptied on exit + virtual bool Flush(); + +private: + IDataObject *m_lastDataObject; + bool m_isOpened; + + DECLARE_DYNAMIC_CLASS(wxClipboard) +}; + +#endif // wxUSE_CLIPBOARD + +#endif // _WX_CLIPBRD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/colordlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/colordlg.h new file mode 100644 index 0000000000..76c7a37c74 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/colordlg.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/colordlg.h +// Purpose: wxColourDialog class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLORDLG_H_ +#define _WX_COLORDLG_H_ + +#include "wx/dialog.h" + +// ---------------------------------------------------------------------------- +// wxColourDialog: dialog for choosing a colours +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxColourDialog : public wxDialog +{ +public: + wxColourDialog() { Init(); } + wxColourDialog(wxWindow *parent, wxColourData *data = NULL) + { + Init(); + + Create(parent, data); + } + + bool Create(wxWindow *parent, wxColourData *data = NULL); + + wxColourData& GetColourData() { return m_colourData; } + + // override some base class virtuals + virtual void SetTitle(const wxString& title); + virtual wxString GetTitle() const; + + virtual int ShowModal(); + + // wxMSW-specific implementation from now on + // ----------------------------------------- + + // called from the hook procedure on WM_INITDIALOG reception + virtual void MSWOnInitDone(WXHWND hDlg); + +protected: + // common part of all ctors + void Init(); + +#if !(defined(__SMARTPHONE__) && defined(__WXWINCE__)) + virtual void DoGetPosition( int *x, int *y ) const; + virtual void DoGetSize(int *width, int *height) const; + virtual void DoGetClientSize(int *width, int *height) const; + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual void DoCentre(int dir); +#endif // !(__SMARTPHONE__ && __WXWINCE__) + + wxColourData m_colourData; + wxString m_title; + + // indicates that the dialog should be centered in this direction if non 0 + // (set by DoCentre(), used by MSWOnInitDone()) + int m_centreDir; + + // true if DoMoveWindow() had been called + bool m_movedWindow; + + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxColourDialog) +}; + +#endif // _WX_COLORDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/colour.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/colour.h new file mode 100644 index 0000000000..4b359fb370 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/colour.h @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/colour.h +// Purpose: wxColour class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLOUR_H_ +#define _WX_COLOUR_H_ + +#include "wx/object.h" + +// ---------------------------------------------------------------------------- +// Colour +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxColour : public wxColourBase +{ +public: + // constructors + // ------------ + DEFINE_STD_WXCOLOUR_CONSTRUCTORS + + // accessors + // --------- + + virtual bool IsOk() const { return m_isInit; } + + unsigned char Red() const { return m_red; } + unsigned char Green() const { return m_green; } + unsigned char Blue() const { return m_blue; } + unsigned char Alpha() const { return m_alpha ; } + + // comparison + bool operator==(const wxColour& colour) const + { + return m_isInit == colour.m_isInit + && m_red == colour.m_red + && m_green == colour.m_green + && m_blue == colour.m_blue + && m_alpha == colour.m_alpha; + } + + bool operator!=(const wxColour& colour) const { return !(*this == colour); } + + WXCOLORREF GetPixel() const { return m_pixel; } + +public: + WXCOLORREF m_pixel; + +protected: + // Helper function + void Init(); + + virtual void + InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); + +private: + bool m_isInit; + unsigned char m_red; + unsigned char m_blue; + unsigned char m_green; + unsigned char m_alpha; + +private: + DECLARE_DYNAMIC_CLASS(wxColour) +}; + +#endif // _WX_COLOUR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/colours.bmp b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/colours.bmp new file mode 100644 index 0000000000..7d391ad144 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/colours.bmp differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/combo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/combo.h new file mode 100644 index 0000000000..50dc6eba4f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/combo.h @@ -0,0 +1,117 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/combo.h +// Purpose: wxComboCtrl class +// Author: Jaakko Salli +// Modified by: +// Created: Apr-30-2006 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COMBOCONTROL_H_ +#define _WX_COMBOCONTROL_H_ + +// NB: Definition of _WX_COMBOCONTROL_H_ is used in wx/generic/combo.h to +// determine whether there is native wxComboCtrl, so make sure you +// use it in all native wxComboCtrls. + +#if wxUSE_COMBOCTRL + +#if !defined(__WXWINCE__) && wxUSE_TIMER + #include "wx/timer.h" + #define wxUSE_COMBOCTRL_POPUP_ANIMATION 1 +#else + #define wxUSE_COMBOCTRL_POPUP_ANIMATION 0 +#endif + + +// ---------------------------------------------------------------------------- +// Native wxComboCtrl +// ---------------------------------------------------------------------------- + +// Define this only if native implementation includes all features +#define wxCOMBOCONTROL_FULLY_FEATURED + +extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr[]; + +class WXDLLIMPEXP_CORE wxComboCtrl : public wxComboCtrlBase +{ +public: + // ctors and such + wxComboCtrl() : wxComboCtrlBase() { Init(); } + + wxComboCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + : wxComboCtrlBase() + { + Init(); + + (void)Create(parent, id, value, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + virtual ~wxComboCtrl(); + + virtual void PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const; + virtual bool IsKeyPopupToggle(const wxKeyEvent& event) const; + + static int GetFeatures() { return wxComboCtrlFeatures::All; } + +#if wxUSE_COMBOCTRL_POPUP_ANIMATION + void OnTimerEvent(wxTimerEvent& WXUNUSED(event)) { DoTimerEvent(); } + +protected: + void DoTimerEvent(); + + virtual bool AnimateShow( const wxRect& rect, int flags ); +#endif // wxUSE_COMBOCTRL_POPUP_ANIMATION + +protected: + + // Dummy method - we override all functions that call this + virtual WXHWND GetEditHWND() const { return NULL; } + + // customization + virtual void OnResize(); + virtual wxCoord GetNativeTextIndent() const; + + // event handlers + void OnPaintEvent( wxPaintEvent& event ); + void OnMouseEvent( wxMouseEvent& event ); + + virtual bool HasTransparentBackground() { return IsDoubleBuffered(); } + +private: + void Init(); + +#if wxUSE_COMBOCTRL_POPUP_ANIMATION + // Popup animation related + wxLongLong m_animStart; + wxTimer m_animTimer; + wxRect m_animRect; + int m_animFlags; +#endif + + DECLARE_EVENT_TABLE() + + DECLARE_DYNAMIC_CLASS(wxComboCtrl) +}; + + +#endif // wxUSE_COMBOCTRL +#endif + // _WX_COMBOCONTROL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/combobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/combobox.h new file mode 100644 index 0000000000..5fc7cc5cf1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/combobox.h @@ -0,0 +1,174 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/combobox.h +// Purpose: wxComboBox class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COMBOBOX_H_ +#define _WX_COMBOBOX_H_ + +#include "wx/choice.h" +#include "wx/textentry.h" + +#if wxUSE_COMBOBOX + +// ---------------------------------------------------------------------------- +// Combobox control +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxComboBox : public wxChoice, + public wxTextEntry +{ +public: + wxComboBox() { Init(); } + + wxComboBox(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + Init(); + Create(parent, id, value, pos, size, n, choices, style, validator, name); + + } + + wxComboBox(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + Init(); + + Create(parent, id, value, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + // See wxComboBoxBase discussion of IsEmpty(). + bool IsListEmpty() const { return wxItemContainer::IsEmpty(); } + bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); } + + // resolve ambiguities among virtual functions inherited from both base + // classes + virtual void Clear(); + virtual wxString GetValue() const; + virtual void SetValue(const wxString& value); + virtual wxString GetStringSelection() const + { return wxChoice::GetStringSelection(); } + virtual void Popup() { MSWDoPopupOrDismiss(true); } + virtual void Dismiss() { MSWDoPopupOrDismiss(false); } + virtual void SetSelection(int n) { wxChoice::SetSelection(n); } + virtual void SetSelection(long from, long to) + { wxTextEntry::SetSelection(from, to); } + virtual int GetSelection() const { return wxChoice::GetSelection(); } + virtual bool ContainsHWND(WXHWND hWnd) const; + virtual void GetSelection(long *from, long *to) const; + + virtual bool IsEditable() const; + + // implementation only from now on + virtual bool MSWCommand(WXUINT param, WXWORD id); + bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam); + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + bool MSWShouldPreProcessMessage(WXMSG *pMsg); + + // Standard event handling + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + void OnDelete(wxCommandEvent& event); + void OnSelectAll(wxCommandEvent& event); + + void OnUpdateCut(wxUpdateUIEvent& event); + void OnUpdateCopy(wxUpdateUIEvent& event); + void OnUpdatePaste(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + void OnUpdateDelete(wxUpdateUIEvent& event); + void OnUpdateSelectAll(wxUpdateUIEvent& event); + + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + +#if wxUSE_UXTHEME + // override wxTextEntry method to work around Windows bug + virtual bool SetHint(const wxString& hint); +#endif // wxUSE_UXTHEME + +protected: +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip(wxToolTip *tip); +#endif + + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + + // Override this one to avoid eating events from our popup listbox. + virtual wxWindow *MSWFindItem(long id, WXHWND hWnd) const; + + // this is the implementation of GetEditHWND() which can also be used when + // we don't have the edit control, it simply returns NULL then + // + // try not to use this function unless absolutely necessary (as in the + // message handling code where the edit control might not be created yet + // for the messages we receive during the control creation) as normally + // just testing for IsEditable() and using GetEditHWND() should be enough + WXHWND GetEditHWNDIfAvailable() const; + + virtual void EnableTextChangedEvents(bool enable) + { + m_allowTextEvents = enable; + } + +private: + // there are the overridden wxTextEntry methods which should only be called + // when we do have an edit control so they assert if this is not the case + virtual wxWindow *GetEditableWindow(); + virtual WXHWND GetEditHWND() const; + + // common part of all ctors + void Init() + { + m_allowTextEvents = true; + } + + // normally true, false if text events are currently disabled + bool m_allowTextEvents; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox) + DECLARE_EVENT_TABLE() +}; + +#endif // wxUSE_COMBOBOX + +#endif // _WX_COMBOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/commandlinkbutton.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/commandlinkbutton.h new file mode 100644 index 0000000000..bc4d4804d0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/commandlinkbutton.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/commandlinkbutton.h +// Purpose: wxCommandLinkButton class +// Author: Rickard Westerlund +// Created: 2010-06-11 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_COMMANDLINKBUTTON_H_ +#define _WX_MSW_COMMANDLINKBUTTON_H_ + +// ---------------------------------------------------------------------------- +// Command link button for wxMSW +// ---------------------------------------------------------------------------- + +// Derive from the generic version to be able to fall back to it during +// run-time if the command link buttons are not supported by the system we're +// running under. + +class WXDLLIMPEXP_ADV wxCommandLinkButton : public wxGenericCommandLinkButton +{ +public: + wxCommandLinkButton () : wxGenericCommandLinkButton() { } + + wxCommandLinkButton(wxWindow *parent, + wxWindowID id, + const wxString& mainLabel = wxEmptyString, + const wxString& note = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + : wxGenericCommandLinkButton() + { + Create(parent, id, mainLabel, note, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& mainLabel = wxEmptyString, + const wxString& note = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + // overridden base class methods + // ----------------------------- + + // do the same thing as in the generic case here + virtual void SetLabel(const wxString& label) + { + SetMainLabelAndNote(label.BeforeFirst('\n'), label.AfterFirst('\n')); + } + + virtual void SetMainLabelAndNote(const wxString& mainLabel, + const wxString& note); + + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + +protected: + virtual wxSize DoGetBestSize() const; + + virtual bool HasNativeBitmap() const; + +private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxCommandLinkButton); +}; + +#endif // _WX_MSW_COMMANDLINKBUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/computer.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/computer.ico new file mode 100644 index 0000000000..f36237bdb9 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/computer.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/control.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/control.h new file mode 100644 index 0000000000..35bf74e9fe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/control.h @@ -0,0 +1,135 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/control.h +// Purpose: wxControl class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CONTROL_H_ +#define _WX_CONTROL_H_ + +#include "wx/dynarray.h" + +// General item class +class WXDLLIMPEXP_CORE wxControl : public wxControlBase +{ +public: + wxControl() { } + + wxControl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr) + { + Create(parent, id, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); + + + // Simulates an event + virtual void Command(wxCommandEvent& event) { ProcessCommand(event); } + + + // implementation from now on + // -------------------------- + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // Calls the callback and appropriate event handlers + bool ProcessCommand(wxCommandEvent& event); + + // MSW-specific + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + + // For ownerdraw items + virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *WXUNUSED(item)) { return false; } + virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *WXUNUSED(item)) { return false; } + + const wxArrayLong& GetSubcontrols() const { return m_subControls; } + + // default handling of WM_CTLCOLORxxx: this is public so that wxWindow + // could call it + virtual WXHBRUSH MSWControlColor(WXHDC pDC, WXHWND hWnd); + + // default style for the control include WS_TABSTOP if it AcceptsFocus() + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const; + + // return default best size (doesn't really make any sense, override this) + virtual wxSize DoGetBestSize() const; + + // This is a helper for all wxControls made with UPDOWN native control. + // In wxMSW it was only wxSpinCtrl derived from wxSpinButton but in + // WinCE of Smartphones this happens also for native wxTextCtrl, + // wxChoice and others. + virtual wxSize GetBestSpinnerSize(const bool is_vertical) const; + + // create the control of the given Windows class: this is typically called + // from Create() method of the derived class passing its label, pos and + // size parameter (style parameter is not needed because m_windowStyle is + // supposed to had been already set and so is used instead when this + // function is called) + bool MSWCreateControl(const wxChar *classname, + const wxString& label, + const wxPoint& pos, + const wxSize& size); + + // NB: the method below is deprecated now, with MSWGetStyle() the method + // above should be used instead! Once all the controls are updated to + // implement MSWGetStyle() this version will disappear. + // + // create the control of the given class with the given style (combination + // of WS_XXX flags, i.e. Windows style, not wxWidgets one), returns + // false if creation failed + // + // All parameters except classname and style are optional, if the + // size/position are not given, they should be set later with SetSize() + // and, label (the title of the window), of course, is left empty. The + // extended style is determined from the style and the app 3D settings + // automatically if it's not specified explicitly. + bool MSWCreateControl(const wxChar *classname, + WXDWORD style, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& label = wxEmptyString, + WXDWORD exstyle = (WXDWORD)-1); + + // call this from the derived class MSWControlColor() if you want to show + // the control greyed out (and opaque) + WXHBRUSH MSWControlColorDisabled(WXHDC pDC); + + // common part of the 3 functions above: pass wxNullColour to use the + // appropriate background colour (meaning ours or our parents) or a fixed + // one + virtual WXHBRUSH DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd); + + // Look in our GetSubcontrols() for the windows with the given ID. + virtual wxWindow *MSWFindItem(long id, WXHWND hWnd) const; + + // for controls like radiobuttons which are really composite this array + // holds the ids (not HWNDs!) of the sub controls + wxArrayLong m_subControls; + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxControl) +}; + +#endif // _WX_CONTROL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/crashrpt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/crashrpt.h new file mode 100644 index 0000000000..f354b482c2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/crashrpt.h @@ -0,0 +1,119 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/crashrpt.h +// Purpose: helpers for the structured exception handling (SEH) under Win32 +// Author: Vadim Zeitlin +// Modified by: +// Created: 13.07.2003 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_CRASHRPT_H_ +#define _WX_MSW_CRASHRPT_H_ + +#include "wx/defs.h" + +#if wxUSE_CRASHREPORT + +struct _EXCEPTION_POINTERS; + +// ---------------------------------------------------------------------------- +// crash report generation flags +// ---------------------------------------------------------------------------- + +enum +{ + // we always report where the crash occurred + wxCRASH_REPORT_LOCATION = 0, + + // if this flag is given, the call stack is dumped + // + // this results in dump/crash report as small as possible, this is the + // default flag + wxCRASH_REPORT_STACK = 1, + + // if this flag is given, the values of the local variables are dumped + // + // note that with the current implementation it requires dumping the full + // process address space and so this will result in huge dump file and will + // take some time to generate + // + // it's probably not a good idea to use this by default, start with default + // mini dump and ask your users to set WX_CRASH_FLAGS environment variable + // to 2 or 4 if you need more information in the dump + wxCRASH_REPORT_LOCALS = 2, + + // if this flag is given, the values of all global variables are dumped + // + // this creates a much larger mini dump than just wxCRASH_REPORT_STACK but + // still much smaller than wxCRASH_REPORT_LOCALS one + wxCRASH_REPORT_GLOBALS = 4, + + // default is to create the smallest possible crash report + wxCRASH_REPORT_DEFAULT = wxCRASH_REPORT_LOCATION | wxCRASH_REPORT_STACK +}; + +// ---------------------------------------------------------------------------- +// wxCrashContext: information about the crash context +// ---------------------------------------------------------------------------- + +struct WXDLLIMPEXP_BASE wxCrashContext +{ + // initialize this object with the given information or from the current + // global exception info which is only valid inside wxApp::OnFatalException + wxCrashContext(_EXCEPTION_POINTERS *ep = NULL); + + // get the name for this exception code + wxString GetExceptionString() const; + + + // exception code + size_t code; + + // exception address + void *addr; + + // machine-specific registers vaues + struct + { +#ifdef __INTEL__ + wxInt32 eax, ebx, ecx, edx, esi, edi, + ebp, esp, eip, + cs, ds, es, fs, gs, ss, + flags; +#endif // __INTEL__ + } regs; +}; + +// ---------------------------------------------------------------------------- +// wxCrashReport: this class is used to create crash reports +// ---------------------------------------------------------------------------- + +struct WXDLLIMPEXP_BASE wxCrashReport +{ + // set the name of the file to which the report is written, it is + // constructed from the .exe name by default + static void SetFileName(const wxString& filename); + + // return the current file name + static wxString GetFileName(); + + // write the exception report to the file, return true if it could be done + // or false otherwise + // + // if ep pointer is NULL, the global exception info which is valid only + // inside wxApp::OnFatalException() is used + static bool Generate(int flags = wxCRASH_REPORT_DEFAULT, + _EXCEPTION_POINTERS *ep = NULL); + + + // generate a crash report from outside of wxApp::OnFatalException(), this + // can be used to take "snapshots" of the program in wxApp::OnAssert() for + // example + static bool GenerateNow(int flags = wxCRASH_REPORT_DEFAULT); +}; + +#endif // wxUSE_CRASHREPORT + +#endif // _WX_MSW_CRASHRPT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/cross.cur b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/cross.cur new file mode 100644 index 0000000000..5b8f4632f9 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/cross.cur differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/csquery.bmp b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/csquery.bmp new file mode 100644 index 0000000000..4e7bcdc30b Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/csquery.bmp differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ctrlsub.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ctrlsub.h new file mode 100644 index 0000000000..068be29e58 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ctrlsub.h @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ctrlsub.h +// Purpose: common functionality of wxItemContainer-derived controls +// Author: Vadim Zeitlin +// Created: 2007-07-25 +// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_CTRLSUB_H_ +#define _WX_MSW_CTRLSUB_H_ + +// ---------------------------------------------------------------------------- +// wxControlWithItems +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxControlWithItems : public wxControlWithItemsBase +{ +public: + wxControlWithItems() { } + +protected: + // preallocate memory for inserting the given new items into the control + // using the wm message (normally either LB_INITSTORAGE or CB_INITSTORAGE) + void MSWAllocStorage(const wxArrayStringsAdapter& items, unsigned wm); + + // insert or append a string to the controls using the given message + // (one of {CB,LB}_{ADD,INSERT}STRING, pos must be 0 when appending) + int MSWInsertOrAppendItem(unsigned pos, const wxString& item, unsigned wm); + + // normally the control containing the items is this window itself but if + // the derived control is composed of several windows, this method can be + // overridden to return the real list/combobox control + virtual WXHWND MSWGetItemsHWND() const { return GetHWND(); } + +private: + DECLARE_ABSTRACT_CLASS(wxControlWithItems) + wxDECLARE_NO_COPY_CLASS(wxControlWithItems); +}; + +#endif // _WX_MSW_CTRLSUB_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/cursor.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/cursor.h new file mode 100644 index 0000000000..aef2e2a516 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/cursor.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/cursor.h +// Purpose: wxCursor class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CURSOR_H_ +#define _WX_CURSOR_H_ + +#include "wx/msw/gdiimage.h" + +class WXDLLIMPEXP_FWD_CORE wxImage; + +// Cursor +class WXDLLIMPEXP_CORE wxCursor : public wxGDIImage +{ +public: + // constructors + wxCursor(); + wxCursor(const wxImage& image); + wxCursor(const wxString& name, + wxBitmapType type = wxCURSOR_DEFAULT_TYPE, + int hotSpotX = 0, int hotSpotY = 0); + wxCursor(wxStockCursor id) { InitFromStock(id); } +#if WXWIN_COMPATIBILITY_2_8 + wxCursor(int id) { InitFromStock((wxStockCursor)id); } +#endif + virtual ~wxCursor(); + + // implementation only + void SetHCURSOR(WXHCURSOR cursor) { SetHandle((WXHANDLE)cursor); } + WXHCURSOR GetHCURSOR() const { return (WXHCURSOR)GetHandle(); } + +protected: + void InitFromStock(wxStockCursor); + + virtual wxGDIImageRefData *CreateData() const; + +private: + DECLARE_DYNAMIC_CLASS(wxCursor) +}; + +#endif + // _WX_CURSOR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/custombgwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/custombgwin.h new file mode 100644 index 0000000000..ca8d8bfc42 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/custombgwin.h @@ -0,0 +1,57 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/custombgwin.h +// Purpose: wxMSW implementation of wxCustomBackgroundWindow +// Author: Vadim Zeitlin +// Created: 2011-10-10 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_CUSTOMBGWIN_H_ +#define _WX_MSW_CUSTOMBGWIN_H_ + +#include "wx/bitmap.h" +#include "wx/brush.h" + +// ---------------------------------------------------------------------------- +// wxCustomBackgroundWindow +// ---------------------------------------------------------------------------- + +template <class W> +class wxCustomBackgroundWindow : public W, + public wxCustomBackgroundWindowBase +{ +public: + typedef W BaseWindowClass; + + wxCustomBackgroundWindow() { m_backgroundBrush = NULL; } + + virtual ~wxCustomBackgroundWindow() { delete m_backgroundBrush; } + +protected: + virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) + { + delete m_backgroundBrush; + m_backgroundBrush = bmp.IsOk() ? new wxBrush(bmp) : NULL; + + // Our transparent children should use our background if we have it, + // otherwise try to restore m_inheritBgCol to some reasonable value: true + // if we also have non-default background colour or false otherwise. + BaseWindowClass::m_inheritBgCol = bmp.IsOk() + || BaseWindowClass::UseBgCol(); + } + + virtual WXHBRUSH MSWGetCustomBgBrush() + { + if ( m_backgroundBrush ) + return (WXHBRUSH)m_backgroundBrush->GetResourceHandle(); + + return BaseWindowClass::MSWGetCustomBgBrush(); + } + + wxBrush *m_backgroundBrush; + + wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCustomBackgroundWindow, W); +}; + +#endif // _WX_MSW_CUSTOMBGWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/datectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/datectrl.h new file mode 100644 index 0000000000..7ec52f0349 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/datectrl.h @@ -0,0 +1,66 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/datectrl.h +// Purpose: wxDatePickerCtrl for Windows +// Author: Vadim Zeitlin +// Modified by: +// Created: 2005-01-09 +// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_DATECTRL_H_ +#define _WX_MSW_DATECTRL_H_ + +// ---------------------------------------------------------------------------- +// wxDatePickerCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlBase +{ +public: + // ctors + wxDatePickerCtrl() { } + + wxDatePickerCtrl(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDatePickerCtrlNameStr) + { + Create(parent, id, dt, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDatePickerCtrlNameStr); + + // Override this one to add date-specific (and time-ignoring) checks. + virtual void SetValue(const wxDateTime& dt); + virtual wxDateTime GetValue() const; + + // Implement the base class pure virtuals. + virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2); + virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const; + + // Override MSW-specific functions used during control creation. + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + +protected: +#if wxUSE_INTL + virtual wxLocaleInfo MSWGetFormat() const; +#endif // wxUSE_INTL + virtual bool MSWAllowsNone() const { return HasFlag(wxDP_ALLOWNONE); } + virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch); + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl) +}; + +#endif // _WX_MSW_DATECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/datetimectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/datetimectrl.h new file mode 100644 index 0000000000..dcb4d4ee19 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/datetimectrl.h @@ -0,0 +1,88 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/datetimectrl.h +// Purpose: wxDateTimePickerCtrl for Windows. +// Author: Vadim Zeitlin +// Created: 2011-09-22 (extracted from wx/msw/datectrl.h). +// Copyright: (c) 2005-2011 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_DATETIMECTRL_H_ +#define _WX_MSW_DATETIMECTRL_H_ + +#include "wx/intl.h" + +// Forward declare a struct from Platform SDK. +struct tagNMDATETIMECHANGE; + +// ---------------------------------------------------------------------------- +// wxDateTimePickerCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDateTimePickerCtrl : public wxDateTimePickerCtrlBase +{ +public: + // set/get the date + virtual void SetValue(const wxDateTime& dt); + virtual wxDateTime GetValue() const; + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + virtual wxSize DoGetBestSize() const; + + // Helper for the derived classes Create(): creates a native control with + // the specified attributes. + bool MSWCreateDateTimePicker(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name); + + // Notice that the methods below must be overridden in all native MSW + // classes inheriting from this one but they can't be pure virtual because + // the generic implementations, not needing nor able to implement them, is + // also derived from this class currently. The real problem is, of course, + // this wrong class structure because the generic classes also inherit the + // wrong implementations of Set/GetValue() and DoGetBestSize() but as they + // override these methods anyhow, it does work -- but is definitely ugly + // and need to be changed (but how?) in the future. + +#if wxUSE_INTL + // Override to return the date/time format used by this control. + virtual wxLocaleInfo MSWGetFormat() const /* = 0 */ + { + wxFAIL_MSG( "Unreachable" ); + return wxLOCALE_TIME_FMT; + } +#endif // wxUSE_INTL + + // Override to indicate whether we can have no date at all. + virtual bool MSWAllowsNone() const /* = 0 */ + { + wxFAIL_MSG( "Unreachable" ); + return false; + } + + // Override to update m_date and send the event when the control contents + // changes, return true if the event was handled. + virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch) /* = 0 */ + { + wxUnusedVar(dtch); + wxFAIL_MSG( "Unreachable" ); + return false; + } + + + // the date currently shown by the control, may be invalid + wxDateTime m_date; +}; + +#endif // _WX_MSW_DATETIMECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dc.h new file mode 100644 index 0000000000..8ec5a94729 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dc.h @@ -0,0 +1,381 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/dc.h +// Purpose: wxDC class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_DC_H_ +#define _WX_MSW_DC_H_ + +#include "wx/defs.h" +#include "wx/dc.h" + +// --------------------------------------------------------------------------- +// macros +// --------------------------------------------------------------------------- + +#if wxUSE_DC_CACHEING +/* + * Cached blitting, maintaining a cache + * of bitmaps required for transparent blitting + * instead of constant creation/deletion + */ + +class wxDCCacheEntry: public wxObject +{ +public: + wxDCCacheEntry(WXHBITMAP hBitmap, int w, int h, int depth); + wxDCCacheEntry(WXHDC hDC, int depth); + virtual ~wxDCCacheEntry(); + + WXHBITMAP m_bitmap; + WXHDC m_dc; + int m_width; + int m_height; + int m_depth; +}; +#endif + +// this is an ABC: use one of the derived classes to create a DC associated +// with a window, screen, printer and so on +class WXDLLIMPEXP_CORE wxMSWDCImpl: public wxDCImpl +{ +public: + wxMSWDCImpl(wxDC *owner, WXHDC hDC); + virtual ~wxMSWDCImpl(); + + // implement base class pure virtuals + // ---------------------------------- + + virtual void Clear(); + + virtual bool StartDoc(const wxString& message); + virtual void EndDoc(); + + virtual void StartPage(); + virtual void EndPage(); + + virtual void SetFont(const wxFont& font); + virtual void SetPen(const wxPen& pen); + virtual void SetBrush(const wxBrush& brush); + virtual void SetBackground(const wxBrush& brush); + virtual void SetBackgroundMode(int mode); +#if wxUSE_PALETTE + virtual void SetPalette(const wxPalette& palette); +#endif // wxUSE_PALETTE + + virtual void DestroyClippingRegion(); + + virtual wxCoord GetCharHeight() const; + virtual wxCoord GetCharWidth() const; + + virtual bool CanDrawBitmap() const; + virtual bool CanGetTextExtent() const; + virtual int GetDepth() const; + virtual wxSize GetPPI() const; + + + virtual void SetMapMode(wxMappingMode mode); + virtual void SetUserScale(double x, double y); + virtual void SetLogicalScale(double x, double y); + virtual void SetLogicalOrigin(wxCoord x, wxCoord y); + virtual void SetDeviceOrigin(wxCoord x, wxCoord y); + virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp); + +#if wxUSE_DC_TRANSFORM_MATRIX + virtual bool CanUseTransformMatrix() const; + virtual bool SetTransformMatrix(const wxAffineMatrix2D& matrix); + virtual wxAffineMatrix2D GetTransformMatrix() const; + virtual void ResetTransformMatrix(); +#endif // wxUSE_DC_TRANSFORM_MATRIX + + virtual void SetLogicalFunction(wxRasterOperationMode function); + + // implementation from now on + // -------------------------- + + virtual void SetRop(WXHDC cdc); + virtual void SelectOldObjects(WXHDC dc); + + void SetWindow(wxWindow *win) + { + m_window = win; + +#if wxUSE_PALETTE + // if we have palettes use the correct one for this window + InitializePalette(); +#endif // wxUSE_PALETTE + } + + WXHDC GetHDC() const { return m_hDC; } + void SetHDC(WXHDC dc, bool bOwnsDC = false) + { + m_hDC = dc; + m_bOwnsDC = bOwnsDC; + + // we might have a pre existing clipping region, make sure that we + // return it if asked -- but avoid calling ::GetClipBox() right now as + // it could be unnecessary wasteful + m_clipping = true; + m_clipX1 = + m_clipX2 = 0; + } + + void* GetHandle() const { return (void*)GetHDC(); } + + const wxBitmap& GetSelectedBitmap() const { return m_selectedBitmap; } + wxBitmap& GetSelectedBitmap() { return m_selectedBitmap; } + + // update the internal clip box variables + void UpdateClipBox(); + +#if wxUSE_DC_CACHEING + static wxDCCacheEntry* FindBitmapInCache(WXHDC hDC, int w, int h); + static wxDCCacheEntry* FindDCInCache(wxDCCacheEntry* notThis, WXHDC hDC); + + static void AddToBitmapCache(wxDCCacheEntry* entry); + static void AddToDCCache(wxDCCacheEntry* entry); + static void ClearCache(); +#endif + + // RTL related functions + // --------------------- + + // get or change the layout direction (LTR or RTL) for this dc, + // wxLayout_Default is returned if layout direction is not supported + virtual wxLayoutDirection GetLayoutDirection() const; + virtual void SetLayoutDirection(wxLayoutDirection dir); + +protected: + void Init() + { + m_bOwnsDC = false; + m_hDC = NULL; + + m_oldBitmap = NULL; + m_oldPen = NULL; + m_oldBrush = NULL; + m_oldFont = NULL; + +#if wxUSE_PALETTE + m_oldPalette = NULL; +#endif // wxUSE_PALETTE + } + + // create an uninitialized DC: this should be only used by the derived + // classes + wxMSWDCImpl( wxDC *owner ) : wxDCImpl( owner ) { Init(); } + + void RealizeScaleAndOrigin(); + +public: + virtual void DoGetFontMetrics(int *height, + int *ascent, + int *descent, + int *internalLeading, + int *externalLeading, + int *averageWidth) const; + virtual void DoGetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; + virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const; + + virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, + wxFloodFillStyle style = wxFLOOD_SURFACE); + + virtual void DoGradientFillLinear(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour, + wxDirection nDirection = wxEAST); + + virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const; + + virtual void DoDrawPoint(wxCoord x, wxCoord y); + virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); + + virtual void DoDrawArc(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc); + virtual void DoDrawCheckMark(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); + virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, + double sa, double ea); + + virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, + wxCoord width, wxCoord height, + double radius); + virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + +#if wxUSE_SPLINES && !defined(__WXWINCE__) + virtual void DoDrawSpline(const wxPointList *points); +#endif + + virtual void DoCrossHair(wxCoord x, wxCoord y); + + virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); + virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, + bool useMask = false); + + virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); + virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, + double angle); + + virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); + + virtual bool DoStretchBlit(wxCoord xdest, wxCoord ydest, + wxCoord dstWidth, wxCoord dstHeight, + wxDC *source, + wxCoord xsrc, wxCoord ysrc, + wxCoord srcWidth, wxCoord srcHeight, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); + + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); + virtual void DoSetDeviceClippingRegion(const wxRegion& region); + virtual void DoGetClippingBox(wxCoord *x, wxCoord *y, + wxCoord *w, wxCoord *h) const; + + virtual void DoGetSizeMM(int* width, int* height) const; + + virtual void DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset); + virtual void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + virtual void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const + { + return subrect == NULL ? GetSelectedBitmap() + : GetSelectedBitmap().GetSubBitmap(*subrect); + } + + +#if wxUSE_PALETTE + // MSW specific, select a logical palette into the HDC + // (tell windows to translate pixel from other palettes to our custom one + // and vice versa) + // Realize tells it to also reset the system palette to this one. + void DoSelectPalette(bool realize = false); + + // Find out what palette our parent window has, then select it into the dc + void InitializePalette(); +#endif // wxUSE_PALETTE + +protected: + // common part of DoDrawText() and DoDrawRotatedText() + void DrawAnyText(const wxString& text, wxCoord x, wxCoord y); + + // common part of DoSetClippingRegion() and DoSetDeviceClippingRegion() + void SetClippingHrgn(WXHRGN hrgn); + + // implementation of DoGetSize() for wxScreen/PrinterDC: this simply + // returns the size of the entire device this DC is associated with + // + // notice that we intentionally put it in a separate function instead of + // DoGetSize() itself because we want it to remain pure virtual both + // because each derived class should take care to define it as needed (this + // implementation is not at all always appropriate) and because we want + // wxDC to be an ABC to prevent it from being created directly + void GetDeviceSize(int *width, int *height) const; + + + // MSW-specific member variables + // ----------------------------- + + // the window associated with this DC (may be NULL) + wxWindow *m_canvas; + + wxBitmap m_selectedBitmap; + + // TRUE => DeleteDC() in dtor, FALSE => only ReleaseDC() it + bool m_bOwnsDC:1; + + // our HDC + WXHDC m_hDC; + + // Store all old GDI objects when do a SelectObject, so we can select them + // back in (this unselecting user's objects) so we can safely delete the + // DC. + WXHBITMAP m_oldBitmap; + WXHPEN m_oldPen; + WXHBRUSH m_oldBrush; + WXHFONT m_oldFont; + +#if wxUSE_PALETTE + WXHPALETTE m_oldPalette; +#endif // wxUSE_PALETTE + +#if wxUSE_DC_CACHEING + static wxObjectList sm_bitmapCache; + static wxObjectList sm_dcCache; +#endif + + DECLARE_CLASS(wxMSWDCImpl) + wxDECLARE_NO_COPY_CLASS(wxMSWDCImpl); +}; + +// ---------------------------------------------------------------------------- +// wxDCTemp: a wxDC which doesn't free the given HDC (used by wxWidgets +// only/mainly) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDCTempImpl : public wxMSWDCImpl +{ +public: + // construct a temporary DC with the specified HDC and size (it should be + // specified whenever we know it for this HDC) + wxDCTempImpl(wxDC *owner, WXHDC hdc, const wxSize& size ) + : wxMSWDCImpl( owner, hdc ), + m_size(size) + { + } + + virtual ~wxDCTempImpl() + { + // prevent base class dtor from freeing it + SetHDC((WXHDC)NULL); + } + + virtual void DoGetSize(int *w, int *h) const + { + wxASSERT_MSG( m_size.IsFullySpecified(), + wxT("size of this DC hadn't been set and is unknown") ); + + if ( w ) + *w = m_size.x; + if ( h ) + *h = m_size.y; + } + +private: + // size of this DC must be explicitly set by SetSize() as we have no way to + // find it ourselves + const wxSize m_size; + + wxDECLARE_NO_COPY_CLASS(wxDCTempImpl); +}; + +class WXDLLIMPEXP_CORE wxDCTemp : public wxDC +{ +public: + wxDCTemp(WXHDC hdc, const wxSize& size = wxDefaultSize) + : wxDC(new wxDCTempImpl(this, hdc, size)) + { + } +}; + +#endif // _WX_MSW_DC_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcclient.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcclient.h new file mode 100644 index 0000000000..9399e5c4be --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcclient.h @@ -0,0 +1,108 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/dcclient.h +// Purpose: wxClientDC class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCCLIENT_H_ +#define _WX_DCCLIENT_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/dc.h" +#include "wx/msw/dc.h" +#include "wx/dcclient.h" + +class wxPaintDCInfo; + +// ---------------------------------------------------------------------------- +// DC classes +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxMSWDCImpl +{ +public: + // default ctor + wxWindowDCImpl( wxDC *owner ); + + // Create a DC corresponding to the whole window + wxWindowDCImpl( wxDC *owner, wxWindow *win ); + + virtual void DoGetSize(int *width, int *height) const; + +protected: + // initialize the newly created DC + void InitDC(); + + DECLARE_CLASS(wxWindowDCImpl) + wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl); +}; + +class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl +{ +public: + // default ctor + wxClientDCImpl( wxDC *owner ); + + // Create a DC corresponding to the client area of the window + wxClientDCImpl( wxDC *owner, wxWindow *win ); + + virtual ~wxClientDCImpl(); + + virtual void DoGetSize(int *width, int *height) const; + +protected: + void InitDC(); + + DECLARE_CLASS(wxClientDCImpl) + wxDECLARE_NO_COPY_CLASS(wxClientDCImpl); +}; + +class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl +{ +public: + wxPaintDCImpl( wxDC *owner ); + + // Create a DC corresponding for painting the window in OnPaint() + wxPaintDCImpl( wxDC *owner, wxWindow *win ); + + virtual ~wxPaintDCImpl(); + + // find the entry for this DC in the cache (keyed by the window) + static WXHDC FindDCInCache(wxWindow* win); + + // This must be called by the code handling WM_PAINT to remove the DC + // cached for this window for the duration of this message processing. + static void EndPaint(wxWindow *win); + +protected: + // Find the DC for this window in the cache, return NULL if not found. + static wxPaintDCInfo *FindInCache(wxWindow* win); + + DECLARE_CLASS(wxPaintDCImpl) + wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl); +}; + +/* + * wxPaintDCEx + * This class is used when an application sends an HDC with the WM_PAINT + * message. It is used in HandlePaint and need not be used by an application. + */ + +class WXDLLIMPEXP_CORE wxPaintDCEx : public wxPaintDC +{ +public: + wxPaintDCEx(wxWindow *canvas, WXHDC dc); + + DECLARE_CLASS(wxPaintDCEx) + wxDECLARE_NO_COPY_CLASS(wxPaintDCEx); +}; + +#endif + // _WX_DCCLIENT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcmemory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcmemory.h new file mode 100644 index 0000000000..59fdbc11b9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcmemory.h @@ -0,0 +1,44 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/dcmemory.h +// Purpose: wxMemoryDC class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCMEMORY_H_ +#define _WX_DCMEMORY_H_ + +#include "wx/dcmemory.h" +#include "wx/msw/dc.h" + +class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxMSWDCImpl +{ +public: + wxMemoryDCImpl( wxMemoryDC *owner ); + wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ); + wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); // Create compatible DC + + // override some base class virtuals + virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + virtual void DoGetSize(int* width, int* height) const; + virtual void DoSelect(const wxBitmap& bitmap); + + virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const + { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmapOfHDC(*subrect, GetHDC() );} + +protected: + // create DC compatible with the given one or screen if dc == NULL + bool CreateCompatible(wxDC *dc); + + // initialize the newly created DC + void Init(); + + DECLARE_CLASS(wxMemoryDCImpl) + wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl); +}; + +#endif + // _WX_DCMEMORY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcprint.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcprint.h new file mode 100644 index 0000000000..85a60246dd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcprint.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/dcprint.h +// Purpose: wxPrinterDC class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_DCPRINT_H_ +#define _WX_MSW_DCPRINT_H_ + +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/dcprint.h" +#include "wx/cmndata.h" +#include "wx/msw/dc.h" + +// ------------------------------------------------------------------------ +// wxPrinterDCImpl +// + +class WXDLLIMPEXP_CORE wxPrinterDCImpl : public wxMSWDCImpl +{ +public: + // Create from print data + wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ); + wxPrinterDCImpl( wxPrinterDC *owner, WXHDC theDC ); + + // override some base class virtuals + virtual bool StartDoc(const wxString& message); + virtual void EndDoc(); + virtual void StartPage(); + virtual void EndPage(); + + virtual wxRect GetPaperRect() const; + +protected: + virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, + bool useMask = false); + virtual bool DoBlit(wxCoord xdest, wxCoord ydest, + wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); + virtual void DoGetSize(int *w, int *h) const + { + GetDeviceSize(w, h); + } + + + // init the dc + void Init(); + + wxPrintData m_printData; + +private: + DECLARE_CLASS(wxPrinterDCImpl) + wxDECLARE_NO_COPY_CLASS(wxPrinterDCImpl); +}; + +// Gets an HDC for the specified printer configuration +WXHDC WXDLLIMPEXP_CORE wxGetPrinterDC(const wxPrintData& data); + +// ------------------------------------------------------------------------ +// wxPrinterDCromHDC +// + +class WXDLLIMPEXP_CORE wxPrinterDCFromHDC: public wxPrinterDC +{ +public: + wxPrinterDCFromHDC( WXHDC theDC ) + : wxPrinterDC(new wxPrinterDCImpl(this, theDC)) + { + } +}; + +#endif // wxUSE_PRINTING_ARCHITECTURE + +#endif // _WX_MSW_DCPRINT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcscreen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcscreen.h new file mode 100644 index 0000000000..f85bbe2ff3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dcscreen.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/dcscreen.h +// Purpose: wxScreenDC class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_DCSCREEN_H_ +#define _WX_MSW_DCSCREEN_H_ + +#include "wx/dcscreen.h" +#include "wx/msw/dc.h" + +class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxMSWDCImpl +{ +public: + // Create a DC representing the whole screen + wxScreenDCImpl( wxScreenDC *owner ); + + virtual void DoGetSize(int *w, int *h) const + { + GetDeviceSize(w, h); + } + + DECLARE_CLASS(wxScreenDCImpl) + wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl); +}; + +#endif // _WX_MSW_DCSCREEN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dde.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dde.h new file mode 100644 index 0000000000..558f66c40e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dde.h @@ -0,0 +1,137 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/dde.h +// Purpose: DDE class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DDE_H_ +#define _WX_DDE_H_ + +#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 WXDLLIMPEXP_FWD_BASE wxDDEServer; +class WXDLLIMPEXP_FWD_BASE wxDDEClient; + +class WXDLLIMPEXP_BASE wxDDEConnection : public wxConnectionBase +{ +public: + wxDDEConnection(void *buffer, size_t size); // use external buffer + wxDDEConnection(); // use internal buffer + virtual ~wxDDEConnection(); + + // implement base class pure virtual methods + virtual const void *Request(const wxString& item, + size_t *size = NULL, + wxIPCFormat format = wxIPC_TEXT); + virtual bool StartAdvise(const wxString& item); + virtual bool StopAdvise(const wxString& item); + virtual bool Disconnect(); + +protected: + virtual bool DoExecute(const void *data, size_t size, wxIPCFormat format); + virtual bool DoPoke(const wxString& item, const void *data, size_t size, + wxIPCFormat format); + virtual bool DoAdvise(const wxString& item, const void *data, size_t size, + wxIPCFormat format); + +public: + wxString m_topicName; + wxDDEServer* m_server; + wxDDEClient* m_client; + + WXHCONV m_hConv; + const void* m_sendingData; + int m_dataSize; + wxIPCFormat m_dataType; + + wxDECLARE_NO_COPY_CLASS(wxDDEConnection); + DECLARE_DYNAMIC_CLASS(wxDDEConnection) +}; + +class WXDLLIMPEXP_BASE wxDDEServer : public wxServerBase +{ +public: + wxDDEServer(); + bool Create(const wxString& server_name); + virtual ~wxDDEServer(); + + virtual wxConnectionBase *OnAcceptConnection(const wxString& topic); + + // Find/delete wxDDEConnection corresponding to the HCONV + wxDDEConnection *FindConnection(WXHCONV conv); + bool DeleteConnection(WXHCONV conv); + wxString& GetServiceName() const { return (wxString&) m_serviceName; } + + wxDDEConnectionList& GetConnections() const + { return (wxDDEConnectionList&) m_connections; } + +protected: + int m_lastError; + wxString m_serviceName; + wxDDEConnectionList m_connections; + + DECLARE_DYNAMIC_CLASS(wxDDEServer) +}; + +class WXDLLIMPEXP_BASE wxDDEClient: public wxClientBase +{ +public: + wxDDEClient(); + virtual ~wxDDEClient(); + + bool ValidHost(const wxString& host); + + // Call this to make a connection. Returns NULL if cannot. + virtual wxConnectionBase *MakeConnection(const wxString& host, + const wxString& server, + const wxString& topic); + + // Tailor this to return own connection. + virtual wxConnectionBase *OnMakeConnection(); + + // Find/delete wxDDEConnection corresponding to the HCONV + wxDDEConnection *FindConnection(WXHCONV conv); + bool DeleteConnection(WXHCONV conv); + + wxDDEConnectionList& GetConnections() const + { return (wxDDEConnectionList&) m_connections; } + +protected: + int m_lastError; + wxDDEConnectionList m_connections; + + DECLARE_DYNAMIC_CLASS(wxDDEClient) +}; + +void WXDLLIMPEXP_BASE wxDDEInitialize(); +void WXDLLIMPEXP_BASE wxDDECleanUp(); + +#endif // _WX_DDE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/debughlp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/debughlp.h new file mode 100644 index 0000000000..715814d0ae --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/debughlp.h @@ -0,0 +1,251 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/debughlp.h +// Purpose: wraps dbghelp.h standard file +// Author: Vadim Zeitlin +// Modified by: +// Created: 2005-01-08 (extracted from msw/crashrpt.cpp) +// Copyright: (c) 2003-2005 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_DEBUGHLPH_H_ +#define _WX_MSW_DEBUGHLPH_H_ + +#include "wx/dynlib.h" + +#include "wx/msw/wrapwin.h" +#ifndef __WXWINCE__ +#include <imagehlp.h> +#endif // __WXWINCE__ +#include "wx/msw/private.h" + +// All known versions of imagehlp.h define API_VERSION_NUMBER but it's not +// documented, so deal with the possibility that it's not defined just in case. +#ifndef API_VERSION_NUMBER + #define API_VERSION_NUMBER 0 +#endif + +// wxUSE_DBGHELP is a bit special as it is not defined in wx/setup.h and we try +// to auto-detect whether we should be using debug help API or not ourselves +// below. However if the auto-detection fails, you can always predefine it as 0 +// to avoid even trying. +#ifndef wxUSE_DBGHELP + // The version of imagehlp.h from VC6 (7) is too old and is missing some + // required symbols while the version from VC7 (9) is good enough. As we + // don't know anything about version 8, don't use it unless we can test it. + #if API_VERSION_NUMBER >= 9 + #define wxUSE_DBGHELP 1 + #else + #define wxUSE_DBGHELP 0 + #endif +#endif + +#if wxUSE_DBGHELP + +// ---------------------------------------------------------------------------- +// wxDbgHelpDLL: dynamically load dbghelp.dll functions +// ---------------------------------------------------------------------------- + +// wrapper for some functions from dbghelp.dll +// +// MT note: this class is not MT safe and should be only used from a single +// thread at a time (this is so because dbghelp.dll is not MT-safe +// itself anyhow) +class wxDbgHelpDLL +{ +public: + // some useful constants not present in debughlp.h (stolen from DIA SDK) + enum BasicType + { + BASICTYPE_NOTYPE = 0, + BASICTYPE_VOID = 1, + BASICTYPE_CHAR = 2, + BASICTYPE_WCHAR = 3, + BASICTYPE_INT = 6, + BASICTYPE_UINT = 7, + BASICTYPE_FLOAT = 8, + BASICTYPE_BCD = 9, + BASICTYPE_BOOL = 10, + BASICTYPE_LONG = 13, + BASICTYPE_ULONG = 14, + BASICTYPE_CURRENCY = 25, + BASICTYPE_DATE = 26, + BASICTYPE_VARIANT = 27, + BASICTYPE_COMPLEX = 28, + BASICTYPE_BIT = 29, + BASICTYPE_BSTR = 30, + BASICTYPE_HRESULT = 31, + BASICTYPE_MAX + }; + + enum SymbolTag + { + SYMBOL_TAG_NULL, + SYMBOL_TAG_EXE, + SYMBOL_TAG_COMPILAND, + SYMBOL_TAG_COMPILAND_DETAILS, + SYMBOL_TAG_COMPILAND_ENV, + SYMBOL_TAG_FUNCTION, + SYMBOL_TAG_BLOCK, + SYMBOL_TAG_DATA, + SYMBOL_TAG_ANNOTATION, + SYMBOL_TAG_LABEL, + SYMBOL_TAG_PUBLIC_SYMBOL, + SYMBOL_TAG_UDT, + SYMBOL_TAG_ENUM, + SYMBOL_TAG_FUNCTION_TYPE, + SYMBOL_TAG_POINTER_TYPE, + SYMBOL_TAG_ARRAY_TYPE, + SYMBOL_TAG_BASE_TYPE, + SYMBOL_TAG_TYPEDEF, + SYMBOL_TAG_BASE_CLASS, + SYMBOL_TAG_FRIEND, + SYMBOL_TAG_FUNCTION_ARG_TYPE, + SYMBOL_TAG_FUNC_DEBUG_START, + SYMBOL_TAG_FUNC_DEBUG_END, + SYMBOL_TAG_USING_NAMESPACE, + SYMBOL_TAG_VTABLE_SHAPE, + SYMBOL_TAG_VTABLE, + SYMBOL_TAG_CUSTOM, + SYMBOL_TAG_THUNK, + SYMBOL_TAG_CUSTOM_TYPE, + SYMBOL_TAG_MANAGED_TYPE, + SYMBOL_TAG_DIMENSION, + SYMBOL_TAG_MAX + }; + + enum DataKind + { + DATA_UNKNOWN, + DATA_LOCAL, + DATA_STATIC_LOCAL, + DATA_PARAM, + DATA_OBJECT_PTR, // "this" pointer + DATA_FILE_STATIC, + DATA_GLOBAL, + DATA_MEMBER, + DATA_STATIC_MEMBER, + DATA_CONSTANT, + DATA_MAX + }; + + enum UdtKind + { + UDT_STRUCT, + UDT_CLASS, + UDT_UNION, + UDT_MAX + }; + + + // function types + typedef DWORD (WINAPI *SymGetOptions_t)(); + typedef DWORD (WINAPI *SymSetOptions_t)(DWORD); + typedef BOOL (WINAPI *SymInitialize_t)(HANDLE, LPSTR, BOOL); + typedef BOOL (WINAPI *StackWalk_t)(DWORD, HANDLE, HANDLE, LPSTACKFRAME, + LPVOID, PREAD_PROCESS_MEMORY_ROUTINE, + PFUNCTION_TABLE_ACCESS_ROUTINE, + PGET_MODULE_BASE_ROUTINE, + PTRANSLATE_ADDRESS_ROUTINE); + typedef BOOL (WINAPI *SymFromAddr_t)(HANDLE, DWORD64, PDWORD64, PSYMBOL_INFO); + typedef LPVOID (WINAPI *SymFunctionTableAccess_t)(HANDLE, DWORD_PTR); + typedef DWORD_PTR (WINAPI *SymGetModuleBase_t)(HANDLE, DWORD_PTR); + typedef BOOL (WINAPI *SymGetLineFromAddr_t)(HANDLE, DWORD_PTR, + PDWORD, PIMAGEHLP_LINE); + typedef BOOL (WINAPI *SymSetContext_t)(HANDLE, PIMAGEHLP_STACK_FRAME, + PIMAGEHLP_CONTEXT); + typedef BOOL (WINAPI *SymEnumSymbols_t)(HANDLE, ULONG64, PCSTR, + PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID); + typedef BOOL (WINAPI *SymGetTypeInfo_t)(HANDLE, DWORD64, ULONG, + IMAGEHLP_SYMBOL_TYPE_INFO, PVOID); + typedef BOOL (WINAPI *SymCleanup_t)(HANDLE); + typedef BOOL (WINAPI *EnumerateLoadedModules_t)(HANDLE, PENUMLOADED_MODULES_CALLBACK, PVOID); + typedef BOOL (WINAPI *MiniDumpWriteDump_t)(HANDLE, DWORD, HANDLE, + MINIDUMP_TYPE, + CONST PMINIDUMP_EXCEPTION_INFORMATION, + CONST PMINIDUMP_USER_STREAM_INFORMATION, + CONST PMINIDUMP_CALLBACK_INFORMATION); + + // The macro called by wxDO_FOR_ALL_SYM_FUNCS() below takes 2 arguments: + // the name of the function in the program code, which never has "64" + // suffix, and the name of the function in the DLL which can have "64" + // suffix in some cases. These 2 helper macros call the macro with the + // correct arguments in both cases. + #define wxSYM_CALL(what, name) what(name, name) +#if defined(_M_AMD64) + #define wxSYM_CALL_64(what, name) what(name, name ## 64) + + // Also undo all the "helpful" definitions done by imagehlp.h that map 32 + // bit functions to 64 bit ones, we don't need this as we do it ourselves. + #undef StackWalk + #undef SymFunctionTableAccess + #undef SymGetModuleBase + #undef SymGetLineFromAddr + #undef EnumerateLoadedModules +#else + #define wxSYM_CALL_64(what, name) what(name, name) +#endif + + #define wxDO_FOR_ALL_SYM_FUNCS(what) \ + wxSYM_CALL_64(what, StackWalk); \ + wxSYM_CALL_64(what, SymFunctionTableAccess); \ + wxSYM_CALL_64(what, SymGetModuleBase); \ + wxSYM_CALL_64(what, SymGetLineFromAddr); \ + wxSYM_CALL_64(what, EnumerateLoadedModules); \ + \ + wxSYM_CALL(what, SymGetOptions); \ + wxSYM_CALL(what, SymSetOptions); \ + wxSYM_CALL(what, SymInitialize); \ + wxSYM_CALL(what, SymFromAddr); \ + wxSYM_CALL(what, SymSetContext); \ + wxSYM_CALL(what, SymEnumSymbols); \ + wxSYM_CALL(what, SymGetTypeInfo); \ + wxSYM_CALL(what, SymCleanup); \ + wxSYM_CALL(what, MiniDumpWriteDump) + + #define wxDECLARE_SYM_FUNCTION(func, name) static func ## _t func + + wxDO_FOR_ALL_SYM_FUNCS(wxDECLARE_SYM_FUNCTION); + + #undef wxDECLARE_SYM_FUNCTION + + // load all functions from DLL, return true if ok + static bool Init(); + + // return the string with the error message explaining why Init() failed + static const wxString& GetErrorMessage(); + + // log error returned by the given function to debug output + static void LogError(const wxChar *func); + + // return textual representation of the value of given symbol + static wxString DumpSymbol(PSYMBOL_INFO pSymInfo, void *pVariable); + + // return the name of the symbol with given type index + static wxString GetSymbolName(PSYMBOL_INFO pSymInfo); + +private: + // dereference the given symbol, i.e. return symbol which is not a + // pointer/reference any more + // + // if ppData != NULL, dereference the pointer as many times as we + // dereferenced the symbol + // + // return the tag of the dereferenced symbol + static SymbolTag DereferenceSymbol(PSYMBOL_INFO pSymInfo, void **ppData); + + static wxString DumpField(PSYMBOL_INFO pSymInfo, + void *pVariable, + unsigned level); + + static wxString DumpBaseType(BasicType bt, DWORD64 length, void *pVariable); + + static wxString DumpUDT(PSYMBOL_INFO pSymInfo, + void *pVariable, + unsigned level = 0); +}; + +#endif // wxUSE_DBGHELP + +#endif // _WX_MSW_DEBUGHLPH_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dialog.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dialog.h new file mode 100644 index 0000000000..5e6157426a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dialog.h @@ -0,0 +1,142 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/dialog.h +// Purpose: wxDialog class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIALOG_H_ +#define _WX_DIALOG_H_ + +#include "wx/panel.h" + +// this option is always enabled (there doesn't seem to be any good reason to +// disable it) for desktop Windows versions but Windows CE dialogs are usually +// not resizable and never show resize gripper anyhow so don't use it there +#ifdef __WXWINCE__ + #define wxUSE_DIALOG_SIZEGRIP 0 +#else + #define wxUSE_DIALOG_SIZEGRIP 1 +#endif + +extern WXDLLIMPEXP_DATA_CORE(const char) wxDialogNameStr[]; + +class WXDLLIMPEXP_FWD_CORE wxDialogModalData; + +#if wxUSE_TOOLBAR && (defined(__SMARTPHONE__) || defined(__POCKETPC__)) +class WXDLLIMPEXP_FWD_CORE wxToolBar; +extern WXDLLIMPEXP_DATA_CORE(const char) wxToolBarNameStr[]; +#endif + +// Dialog boxes +class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase +{ +public: + wxDialog() { Init(); } + + // full ctor + wxDialog(wxWindow *parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr); + + virtual ~wxDialog(); + + // return true if we're showing the dialog modally + virtual bool IsModal() const { return m_modalData != NULL; } + + // show the dialog modally and return the value passed to EndModal() + virtual int ShowModal(); + + // may be called to terminate the dialog with the given return code + virtual void EndModal(int retCode); + + + // we treat dialog toolbars specially under Windows CE +#if wxUSE_TOOLBAR && defined(__POCKETPC__) + // create main toolbar by calling OnCreateToolBar() + virtual wxToolBar* CreateToolBar(long style = -1, + wxWindowID winid = wxID_ANY, + const wxString& name = wxToolBarNameStr); + // return a new toolbar + virtual wxToolBar *OnCreateToolBar(long style, + wxWindowID winid, + const wxString& name ); + + // get the main toolbar + wxToolBar *GetToolBar() const { return m_dialogToolBar; } +#endif // wxUSE_TOOLBAR && __POCKETPC__ + + + // implementation only from now on + // ------------------------------- + + // override some base class virtuals + virtual bool Show(bool show = true); + +#if wxUSE_DIALOG_SIZEGRIP + virtual void SetWindowStyleFlag(long style); +#endif // wxUSE_DIALOG_SIZEGRIP + +#ifdef __POCKETPC__ + // Responds to the OK button in a PocketPC titlebar. This + // can be overridden, or you can change the id used for + // sending the event with SetAffirmativeId. Returns false + // if the event was not processed. + virtual bool DoOK(); +#endif + + // Windows callbacks + WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + +protected: + // common part of all ctors + void Init(); + +private: +#if wxUSE_DIALOG_SIZEGRIP + // these functions deal with the gripper window shown in the corner of + // resizable dialogs + void CreateGripper(); + void DestroyGripper(); + void ShowGripper(bool show); + void ResizeGripper(); + + // this function is used to adjust Z-order of new children relative to the + // gripper if we have one + void OnWindowCreate(wxWindowCreateEvent& event); + + // gripper window for a resizable dialog, NULL if we're not resizable + WXHWND m_hGripper; +#endif // wxUSE_DIALOG_SIZEGRIP + +#if wxUSE_TOOLBAR && defined(__POCKETPC__) + wxToolBar* m_dialogToolBar; +#endif + + // this pointer is non-NULL only while the modal event loop is running + wxDialogModalData *m_modalData; + + DECLARE_DYNAMIC_CLASS(wxDialog) + wxDECLARE_NO_COPY_CLASS(wxDialog); +}; + +#endif + // _WX_DIALOG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dib.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dib.h new file mode 100644 index 0000000000..28663c35fa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dib.h @@ -0,0 +1,271 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/dib.h +// Purpose: wxDIB class representing Win32 device independent bitmaps +// Author: Vadim Zeitlin +// Modified by: +// Created: 03.03.03 (replaces the old file with the same name) +// Copyright: (c) 1997-2003 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_DIB_H_ +#define _WX_MSW_DIB_H_ + +class WXDLLIMPEXP_FWD_CORE wxPalette; + +#include "wx/msw/private.h" + +#if wxUSE_WXDIB + +#ifdef __WXMSW__ + #include "wx/bitmap.h" +#endif // __WXMSW__ + +// ---------------------------------------------------------------------------- +// wxDIB: represents a DIB section +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDIB +{ +public: + // ctors and such + // -------------- + + // create an uninitialized DIB with the given width, height and depth (only + // 24 and 32 bpp DIBs are currently supported) + // + // after using this ctor, GetData() and GetHandle() may be used if IsOk() + // returns true + wxDIB(int width, int height, int depth) + { Init(); (void)Create(width, height, depth); } + +#ifdef __WXMSW__ + // create a DIB from the DDB + wxDIB(const wxBitmap& bmp) + { Init(); (void)Create(bmp); } +#endif // __WXMSW__ + + // create a DIB from the Windows DDB + wxDIB(HBITMAP hbmp) + { Init(); (void)Create(hbmp); } + + // load a DIB from file (any depth is supoprted here unlike above) + // + // as above, use IsOk() to see if the bitmap was loaded successfully + wxDIB(const wxString& filename) + { Init(); (void)Load(filename); } + + // same as the corresponding ctors but with return value + bool Create(int width, int height, int depth); +#ifdef __WXMSW__ + bool Create(const wxBitmap& bmp) { return Create(GetHbitmapOf(bmp)); } +#endif + bool Create(HBITMAP hbmp); + bool Load(const wxString& filename); + + // dtor is not virtual, this class is not meant to be used polymorphically + ~wxDIB(); + + + // operations + // ---------- + +#ifndef __WXWINCE__ + // create a bitmap compatible with the given HDC (or screen by default) and + // return its handle, the caller is responsible for freeing it (using + // DeleteObject()) + HBITMAP CreateDDB(HDC hdc = 0) const; +#endif // !__WXWINCE__ + + // get the handle from the DIB and reset it, i.e. this object won't destroy + // the DIB after this (but the caller should do it) + HBITMAP Detach() { HBITMAP hbmp = m_handle; m_handle = 0; return hbmp; } + +#if wxUSE_PALETTE + // create a palette for this DIB (always a trivial/default one for 24bpp) + wxPalette *CreatePalette() const; +#endif // wxUSE_PALETTE + + // save the DIB as a .BMP file to the file with the given name + bool Save(const wxString& filename); + + + // accessors + // --------- + + // return true if DIB was successfully created, false otherwise + bool IsOk() const { return m_handle != 0; } + + // get the bitmap size + wxSize GetSize() const { DoGetObject(); return wxSize(m_width, m_height); } + int GetWidth() const { DoGetObject(); return m_width; } + int GetHeight() const { DoGetObject(); return m_height; } + + // get the number of bits per pixel, or depth + int GetDepth() const { DoGetObject(); return m_depth; } + + // get the DIB handle + HBITMAP GetHandle() const { return m_handle; } + + // get raw pointer to bitmap bits, you should know what you do if you + // decide to use it + unsigned char *GetData() const + { DoGetObject(); return (unsigned char *)m_data; } + + + // HBITMAP conversion + // ------------------ + + // these functions are only used by wxWidgets internally right now, please + // don't use them directly if possible as they're subject to change + +#ifndef __WXWINCE__ + // creates a DDB compatible with the given (or screen) DC from either + // a plain DIB or a DIB section (in which case the last parameter must be + // non NULL) + static HBITMAP ConvertToBitmap(const BITMAPINFO *pbi, + HDC hdc = 0, + void *bits = NULL); + + // create a plain DIB (not a DIB section) from a DDB, the caller is + // responsable for freeing it using ::GlobalFree() + static HGLOBAL ConvertFromBitmap(HBITMAP hbmp); + + // creates a DIB from the given DDB or calculates the space needed by it: + // if pbi is NULL, only the space is calculated, otherwise pbi is supposed + // to point at BITMAPINFO of the correct size which is filled by this + // function (this overload is needed for wxBitmapDataObject code in + // src/msw/ole/dataobj.cpp) + static size_t ConvertFromBitmap(BITMAPINFO *pbi, HBITMAP hbmp); +#endif // __WXWINCE__ + + + // wxImage conversion + // ------------------ + +#if wxUSE_IMAGE + // Possible formats for DIBs created by the functions below. + enum PixelFormat + { + PixelFormat_PreMultiplied = 0, + PixelFormat_NotPreMultiplied = 1 + }; + + // Create a DIB from the given image, the DIB will be either 24 or 32 (if + // the image has alpha channel) bpp. + // + // By default the DIB stores pixel data in pre-multiplied format so that it + // can be used with ::AlphaBlend() but it is also possible to disable + // pre-multiplication for the DIB to be usable with ImageList_Draw() which + // does pre-multiplication internally. + wxDIB(const wxImage& image, PixelFormat pf = PixelFormat_PreMultiplied) + { + Init(); + (void)Create(image, pf); + } + + // same as the above ctor but with the return code + bool Create(const wxImage& image, PixelFormat pf = PixelFormat_PreMultiplied); + + // create wxImage having the same data as this DIB + wxImage ConvertToImage() const; +#endif // wxUSE_IMAGE + + + // helper functions + // ---------------- + + // return the size of one line in a DIB with given width and depth: the + // point here is that as the scan lines need to be DWORD aligned so we may + // need to add some padding + static unsigned long GetLineSize(int width, int depth) + { + return ((width*depth + 31) & ~31) >> 3; + } + +private: + // common part of all ctors + void Init(); + + // free resources + void Free(); + + // initialize the contents from the provided DDB (Create() must have been + // already called) + bool CopyFromDDB(HBITMAP hbmp); + + + // the DIB section handle, 0 if invalid + HBITMAP m_handle; + + // NB: we could store only m_handle and not any of the other fields as + // we may always retrieve them from it using ::GetObject(), but we + // decide to still store them for efficiency concerns -- however if we + // don't have them from the very beginning (e.g. DIB constructed from a + // bitmap), we only retrieve them when necessary and so these fields + // should *never* be accessed directly, even from inside wxDIB code + + // function which must be called before accessing any members and which + // gets their values from m_handle, if not done yet + void DoGetObject() const; + + // pointer to DIB bits, may be NULL + void *m_data; + + // size and depth of the image + int m_width, + m_height, + m_depth; + + // in some cases we could be using a handle which we didn't create and in + // this case we shouldn't free it neither -- this flag tell us if this is + // the case + bool m_ownsHandle; + + + // DIBs can't be copied + wxDIB(const wxDIB&); + wxDIB& operator=(const wxDIB&); +}; + +// ---------------------------------------------------------------------------- +// inline functions implementation +// ---------------------------------------------------------------------------- + +inline +void wxDIB::Init() +{ + m_handle = 0; + m_ownsHandle = true; + + m_data = NULL; + + m_width = + m_height = + m_depth = 0; +} + +inline +void wxDIB::Free() +{ + if ( m_handle && m_ownsHandle ) + { + if ( !::DeleteObject(m_handle) ) + { + wxLogLastError(wxT("DeleteObject(hDIB)")); + } + + Init(); + } +} + +inline wxDIB::~wxDIB() +{ + Free(); +} + +#endif + // wxUSE_WXDIB + +#endif // _WX_MSW_DIB_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dirdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dirdlg.h new file mode 100644 index 0000000000..b6939581ee --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dirdlg.h @@ -0,0 +1,39 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/dirdlg.h +// Purpose: wxDirDialog class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIRDLG_H_ +#define _WX_DIRDLG_H_ + +class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase +{ +public: + wxDirDialog(wxWindow *parent, + const wxString& message = wxDirSelectorPromptStr, + const wxString& defaultPath = wxEmptyString, + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& name = wxDirDialogNameStr); + + void SetPath(const wxString& path); + + virtual int ShowModal(); + +private: + // The real implementations of ShowModal(), used for Windows versions + // before and since Vista. + int ShowSHBrowseForFolder(WXHWND owner); + int ShowIFileDialog(WXHWND owner); + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDirDialog) +}; + +#endif + // _WX_DIRDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dragimag.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dragimag.h new file mode 100644 index 0000000000..e08723511a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/dragimag.h @@ -0,0 +1,244 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/dragimag.h +// Purpose: wxDragImage class: a kind of a cursor, that can cope +// with more sophisticated images +// Author: Julian Smart +// Modified by: +// Created: 08/04/99 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DRAGIMAG_H_ +#define _WX_DRAGIMAG_H_ + +#if wxUSE_DRAGIMAGE + +#include "wx/bitmap.h" +#include "wx/icon.h" +#include "wx/cursor.h" +#include "wx/treectrl.h" +#include "wx/listctrl.h" + +// If 1, use a simple wxCursor instead of ImageList_SetDragCursorImage +#define wxUSE_SIMPLER_DRAGIMAGE 0 + +/* + To use this class, create a wxDragImage when you start dragging, for example: + + void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event) + { +#ifdef __WXMSW__ + ::UpdateWindow((HWND) GetHWND()); // We need to implement this in wxWidgets +#endif + + CaptureMouse(); + + m_dragImage = new wxDragImage(* this, itemId); + m_dragImage->BeginDrag(wxPoint(0, 0), this); + m_dragImage->Move(pt, this); + m_dragImage->Show(this); + ... + } + + In your OnMouseMove function, hide the image, do any display updating required, + then move and show the image again: + + void MyTreeCtrl::OnMouseMove(wxMouseEvent& event) + { + if (m_dragMode == MY_TREE_DRAG_NONE) + { + event.Skip(); + return; + } + + // Prevent screen corruption by hiding the image + if (m_dragImage) + m_dragImage->Hide(this); + + // Do some updating of the window, such as highlighting the drop target + ... + +#ifdef __WXMSW__ + if (updateWindow) + ::UpdateWindow((HWND) GetHWND()); +#endif + + // Move and show the image again + m_dragImage->Move(event.GetPosition(), this); + m_dragImage->Show(this); + } + + Eventually we end the drag and delete the drag image. + + void MyTreeCtrl::OnLeftUp(wxMouseEvent& event) + { + ... + + // End the drag and delete the drag image + if (m_dragImage) + { + m_dragImage->EndDrag(this); + delete m_dragImage; + m_dragImage = NULL; + } + ReleaseMouse(); + } +*/ + +/* + Notes for Unix version: + Can we simply use cursors instead, creating a cursor dynamically, setting it into the window + in BeginDrag, and restoring the old cursor in EndDrag? + For a really bog-standard implementation, we could simply use a normal dragging cursor + and ignore the image. +*/ + +/* + * wxDragImage + */ + +class WXDLLIMPEXP_CORE wxDragImage: public wxObject +{ +public: + + // Ctors & dtor + //////////////////////////////////////////////////////////////////////////// + + wxDragImage(); + wxDragImage(const wxBitmap& image, const wxCursor& cursor = wxNullCursor) + { + Init(); + + Create(image, cursor); + } + + wxDragImage(const wxIcon& image, const wxCursor& cursor = wxNullCursor) + { + Init(); + + Create(image, cursor); + } + + wxDragImage(const wxString& str, const wxCursor& cursor = wxNullCursor) + { + Init(); + + Create(str, cursor); + } + +#if wxUSE_TREECTRL + wxDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id) + { + Init(); + + Create(treeCtrl, id); + } +#endif + +#if wxUSE_LISTCTRL + wxDragImage(const wxListCtrl& listCtrl, long id) + { + Init(); + + Create(listCtrl, id); + } +#endif + + virtual ~wxDragImage(); + + // Attributes + //////////////////////////////////////////////////////////////////////////// + + // Operations + //////////////////////////////////////////////////////////////////////////// + + // Create a drag image from a bitmap and optional cursor + bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor); + + // Create a drag image from an icon and optional cursor + bool Create(const wxIcon& image, const wxCursor& cursor = wxNullCursor); + + // Create a drag image from a string and optional cursor + bool Create(const wxString& str, const wxCursor& cursor = wxNullCursor); + +#if wxUSE_TREECTRL + // Create a drag image for the given tree control item + bool Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id); +#endif + +#if wxUSE_LISTCTRL + // Create a drag image for the given list control item + bool Create(const wxListCtrl& listCtrl, long id); +#endif + + // Begin drag. hotspot is the location of the drag position relative to the upper-left + // corner of the image. + bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = NULL); + + // Begin drag. hotspot is the location of the drag position relative to the upper-left + // corner of the image. This is full screen only. fullScreenRect gives the + // position of the window on the screen, to restrict the drag to. + bool BeginDrag(const wxPoint& hotspot, wxWindow* window, wxWindow* fullScreenRect); + + // End drag + bool EndDrag(); + + // Move the image: call from OnMouseMove. Pt is in window client coordinates if window + // is non-NULL, or in screen coordinates if NULL. + bool Move(const wxPoint& pt); + + // Show the image + bool Show(); + + // Hide the image + bool Hide(); + + // Implementation + //////////////////////////////////////////////////////////////////////////// + + // Initialize variables + void Init(); + + // Returns the native image list handle + WXHIMAGELIST GetHIMAGELIST() const { return m_hImageList; } + +#if !wxUSE_SIMPLER_DRAGIMAGE + // Returns the native image list handle for the cursor + WXHIMAGELIST GetCursorHIMAGELIST() const { return m_hCursorImageList; } +#endif + + // don't use in new code, use versions without hot spot parameter +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_CONSTRUCTOR( wxDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED_CONSTRUCTOR( wxDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED_CONSTRUCTOR( wxDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) ); +#endif // WXWIN_COMPATIBILITY_2_8 + +protected: + WXHIMAGELIST m_hImageList; + +#if wxUSE_SIMPLER_DRAGIMAGE + wxCursor m_oldCursor; +#else + WXHIMAGELIST m_hCursorImageList; +#endif + + wxCursor m_cursor; +// wxPoint m_cursorHotspot; // Obsolete + wxPoint m_position; + wxWindow* m_window; + wxRect m_boundingRect; + bool m_fullScreen; + +private: + DECLARE_DYNAMIC_CLASS(wxDragImage) + wxDECLARE_NO_COPY_CLASS(wxDragImage); +}; + +#endif // wxUSE_DRAGIMAGE +#endif + // _WX_DRAGIMAG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/drive.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/drive.ico new file mode 100644 index 0000000000..cac90115fe Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/drive.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/enhmeta.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/enhmeta.h new file mode 100644 index 0000000000..3951bd7f5a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/enhmeta.h @@ -0,0 +1,187 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/enhmeta.h +// Purpose: wxEnhMetaFile class for Win32 +// Author: Vadim Zeitlin +// Modified by: +// Created: 13.01.00 +// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_ENHMETA_H_ +#define _WX_MSW_ENHMETA_H_ + +#include "wx/dc.h" +#include "wx/gdiobj.h" + +#if wxUSE_DRAG_AND_DROP + #include "wx/dataobj.h" +#endif + +// ---------------------------------------------------------------------------- +// wxEnhMetaFile: encapsulation of Win32 HENHMETAFILE +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxEnhMetaFile : public wxGDIObject +{ +public: + wxEnhMetaFile(const wxString& file = wxEmptyString) : m_filename(file) + { Init(); } + wxEnhMetaFile(const wxEnhMetaFile& metafile) : wxGDIObject() + { Init(); Assign(metafile); } + wxEnhMetaFile& operator=(const wxEnhMetaFile& metafile) + { Free(); Assign(metafile); return *this; } + + virtual ~wxEnhMetaFile() + { Free(); } + + // display the picture stored in the metafile on the given DC + bool Play(wxDC *dc, wxRect *rectBound = NULL); + + // accessors + virtual bool IsOk() const { return m_hMF != 0; } + + wxSize GetSize() const; + int GetWidth() const { return GetSize().x; } + int GetHeight() const { return GetSize().y; } + + const wxString& GetFileName() const { return m_filename; } + + // copy the metafile to the clipboard: the width and height parameters are + // for backwards compatibility (with wxMetaFile) only, they are ignored by + // this method + bool SetClipboard(int width = 0, int height = 0); + + // implementation + WXHANDLE GetHENHMETAFILE() const { return m_hMF; } + void SetHENHMETAFILE(WXHANDLE hMF) { Free(); m_hMF = hMF; } + +protected: + void Init(); + void Free(); + void Assign(const wxEnhMetaFile& mf); + + // we don't use these functions (but probably should) but have to implement + // them as they're pure virtual in the base class + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + wxString m_filename; + WXHANDLE m_hMF; + + DECLARE_DYNAMIC_CLASS(wxEnhMetaFile) +}; + +// ---------------------------------------------------------------------------- +// wxEnhMetaFileDC: allows to create a wxEnhMetaFile +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxEnhMetaFileDC : public wxDC +{ +public: + // the ctor parameters specify the filename (empty for memory metafiles), + // the metafile picture size and the optional description/comment + wxEnhMetaFileDC(const wxString& filename = wxEmptyString, + int width = 0, int height = 0, + const wxString& description = wxEmptyString); + + // as above, but takes reference DC as first argument to take resolution, + // size, font metrics etc. from + wxEXPLICIT + wxEnhMetaFileDC(const wxDC& referenceDC, + const wxString& filename = wxEmptyString, + int width = 0, int height = 0, + const wxString& description = wxEmptyString); + + // obtain a pointer to the new metafile (caller should delete it) + wxEnhMetaFile *Close(); + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxEnhMetaFileDC) +}; + +#if wxUSE_DRAG_AND_DROP + +// ---------------------------------------------------------------------------- +// wxEnhMetaFileDataObject is a specialization of wxDataObject for enh metafile +// ---------------------------------------------------------------------------- + +// notice that we want to support both CF_METAFILEPICT and CF_ENHMETAFILE and +// so we derive from wxDataObject and not from wxDataObjectSimple +class WXDLLIMPEXP_CORE wxEnhMetaFileDataObject : public wxDataObject +{ +public: + // ctors + wxEnhMetaFileDataObject() { } + wxEnhMetaFileDataObject(const wxEnhMetaFile& metafile) + : m_metafile(metafile) { } + + // virtual functions which you may override if you want to provide data on + // demand only - otherwise, the trivial default versions will be used + virtual void SetMetafile(const wxEnhMetaFile& metafile) + { m_metafile = metafile; } + virtual wxEnhMetaFile GetMetafile() const + { return m_metafile; } + + // implement base class pure virtuals + virtual wxDataFormat GetPreferredFormat(Direction dir) const; + virtual size_t GetFormatCount(Direction dir) const; + virtual void GetAllFormats(wxDataFormat *formats, Direction dir) const; + virtual size_t GetDataSize(const wxDataFormat& format) const; + virtual bool GetDataHere(const wxDataFormat& format, void *buf) const; + virtual bool SetData(const wxDataFormat& format, size_t len, + const void *buf); + +protected: + wxEnhMetaFile m_metafile; + + wxDECLARE_NO_COPY_CLASS(wxEnhMetaFileDataObject); +}; + + +// ---------------------------------------------------------------------------- +// wxEnhMetaFileSimpleDataObject does derive from wxDataObjectSimple which +// makes it more convenient to use (it can be used with wxDataObjectComposite) +// at the price of not supoprting any more CF_METAFILEPICT but only +// CF_ENHMETAFILE +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxEnhMetaFileSimpleDataObject : public wxDataObjectSimple +{ +public: + // ctors + wxEnhMetaFileSimpleDataObject() : wxDataObjectSimple(wxDF_ENHMETAFILE) { } + wxEnhMetaFileSimpleDataObject(const wxEnhMetaFile& metafile) + : wxDataObjectSimple(wxDF_ENHMETAFILE), m_metafile(metafile) { } + + // virtual functions which you may override if you want to provide data on + // demand only - otherwise, the trivial default versions will be used + virtual void SetEnhMetafile(const wxEnhMetaFile& metafile) + { m_metafile = metafile; } + virtual wxEnhMetaFile GetEnhMetafile() const + { return m_metafile; } + + // implement base class pure virtuals + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + + virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const + { return GetDataSize(); } + virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format), + void *buf) const + { return GetDataHere(buf); } + virtual bool SetData(const wxDataFormat& WXUNUSED(format), + size_t len, const void *buf) + { return SetData(len, buf); } + +protected: + wxEnhMetaFile m_metafile; + + wxDECLARE_NO_COPY_CLASS(wxEnhMetaFileSimpleDataObject); +}; + +#endif // wxUSE_DRAG_AND_DROP + +#endif // _WX_MSW_ENHMETA_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/evtloop.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/evtloop.h new file mode 100644 index 0000000000..dee2c03db3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/evtloop.h @@ -0,0 +1,74 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/evtloop.h +// Purpose: wxEventLoop class for wxMSW port +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-07-31 +// Copyright: (c) 2003-2004 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_EVTLOOP_H_ +#define _WX_MSW_EVTLOOP_H_ + +#include "wx/dynarray.h" +#include "wx/msw/wrapwin.h" +#include "wx/window.h" +#include "wx/msw/evtloopconsole.h" // for wxMSWEventLoopBase + +// ---------------------------------------------------------------------------- +// wxEventLoop +// ---------------------------------------------------------------------------- + +WX_DECLARE_EXPORTED_OBJARRAY(MSG, wxMSGArray); + +class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxMSWEventLoopBase +{ +public: + wxGUIEventLoop() { } + + // process a single message: calls PreProcessMessage() before dispatching + // it + virtual void ProcessMessage(WXMSG *msg); + + // preprocess a message, return true if processed (i.e. no further + // dispatching required) + virtual bool PreProcessMessage(WXMSG *msg); + + // set the critical window: this is the window such that all the events + // except those to this window (and its children) stop to be processed + // (typical examples: assert or crash report dialog) + // + // calling this function with NULL argument restores the normal event + // handling + static void SetCriticalWindow(wxWindowMSW *win) { ms_winCritical = win; } + + // return true if there is no critical window or if this window is [a child + // of] the critical one + static bool AllowProcessing(wxWindowMSW *win) + { + return !ms_winCritical || IsChildOfCriticalWindow(win); + } + + // override/implement base class virtuals + virtual bool Dispatch(); + virtual int DispatchTimeout(unsigned long timeout); + virtual void WakeUp(); + virtual bool YieldFor(long eventsToProcess); + +protected: + virtual void OnNextIteration(); + +private: + // check if the given window is a child of ms_winCritical (which must be + // non NULL) + static bool IsChildOfCriticalWindow(wxWindowMSW *win); + + // array of messages used for temporary storage by YieldFor() + wxMSGArray m_arrMSG; + + // critical window or NULL + static wxWindowMSW *ms_winCritical; +}; + +#endif // _WX_MSW_EVTLOOP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/evtloopconsole.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/evtloopconsole.h new file mode 100644 index 0000000000..36da6f640a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/evtloopconsole.h @@ -0,0 +1,51 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/evtloopconsole.h +// Purpose: wxConsoleEventLoop class for Windows +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-07-31 +// Copyright: (c) 2003-2004 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_EVTLOOPCONSOLE_H_ +#define _WX_MSW_EVTLOOPCONSOLE_H_ + +class WXDLLIMPEXP_BASE wxMSWEventLoopBase : public wxEventLoopManual +{ +public: + wxMSWEventLoopBase(); + + // implement base class pure virtuals + virtual bool Pending() const; + +protected: + // get the next message from queue and return true or return false if we + // got WM_QUIT or an error occurred + bool GetNextMessage(WXMSG *msg); + + // same as above but with a timeout and return value can be -1 meaning that + // time out expired in addition to + int GetNextMessageTimeout(WXMSG *msg, unsigned long timeout); +}; + +#if wxUSE_CONSOLE_EVENTLOOP + +class WXDLLIMPEXP_BASE wxConsoleEventLoop : public wxMSWEventLoopBase +{ +public: + wxConsoleEventLoop() { } + + // override/implement base class virtuals + virtual bool Dispatch(); + virtual int DispatchTimeout(unsigned long timeout); + virtual void WakeUp(); + virtual bool YieldFor(long WXUNUSED(eventsToProcess)) { return true; } + + // Windows-specific function to process a single message + virtual void ProcessMessage(WXMSG *msg); +}; + +#endif // wxUSE_CONSOLE_EVENTLOOP + +#endif // _WX_MSW_EVTLOOPCONSOLE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/fdrepdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/fdrepdlg.h new file mode 100644 index 0000000000..af4de0d207 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/fdrepdlg.h @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/fdrepdlg.h +// Purpose: wxFindReplaceDialog class +// Author: Markus Greither +// Modified by: 31.07.01: VZ: integrated into wxWidgets +// Created: 23/03/2001 +// Copyright: (c) Markus Greither +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_FDREPDLG_H_ +#define _WX_MSW_FDREPDLG_H_ + +// ---------------------------------------------------------------------------- +// wxFindReplaceDialog: dialog for searching / replacing text +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFindReplaceDialog : public wxFindReplaceDialogBase +{ +public: + // ctors and such + wxFindReplaceDialog() { Init(); } + wxFindReplaceDialog(wxWindow *parent, + wxFindReplaceData *data, + const wxString &title, + int style = 0); + + bool Create(wxWindow *parent, + wxFindReplaceData *data, + const wxString &title, + int style = 0); + + virtual ~wxFindReplaceDialog(); + + // implementation only from now on + + wxFindReplaceDialogImpl *GetImpl() const { return m_impl; } + + // override some base class virtuals + virtual bool Show(bool show = true); + virtual void SetTitle( const wxString& title); + virtual wxString GetTitle() const; + +protected: + virtual void DoGetSize(int *width, int *height) const; + virtual void DoGetClientSize(int *width, int *height) const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + void Init(); + + wxString m_title; + + wxFindReplaceDialogImpl *m_impl; + + DECLARE_DYNAMIC_CLASS(wxFindReplaceDialog) + wxDECLARE_NO_COPY_CLASS(wxFindReplaceDialog); +}; + +#endif // _WX_MSW_FDREPDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/file1.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/file1.ico new file mode 100644 index 0000000000..f0a80d32b4 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/file1.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/filedlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/filedlg.h new file mode 100644 index 0000000000..a1958bace7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/filedlg.h @@ -0,0 +1,71 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/filedlg.h +// Purpose: wxFileDialog class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILEDLG_H_ +#define _WX_FILEDLG_H_ + +//------------------------------------------------------------------------- +// wxFileDialog +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase +{ +public: + wxFileDialog(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr); + + virtual void GetPaths(wxArrayString& paths) const; + virtual void GetFilenames(wxArrayString& files) const; +#ifndef __WXWINCE__ + virtual bool SupportsExtraControl() const { return true; } + void MSWOnInitDialogHook(WXHWND hwnd); +#endif // __WXWINCE__ + + virtual int ShowModal(); + + // wxMSW-specific implementation from now on + // ----------------------------------------- + + // called from the hook procedure on CDN_INITDONE reception + virtual void MSWOnInitDone(WXHWND hDlg); + + // called from the hook procedure on CDN_SELCHANGE. + void MSWOnSelChange(WXHWND hDlg); + +protected: + +#if !(defined(__SMARTPHONE__) && defined(__WXWINCE__)) + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual void DoCentre(int dir); + virtual void DoGetSize( int *width, int *height ) const; + virtual void DoGetPosition( int *x, int *y ) const; +#endif // !(__SMARTPHONE__ && __WXWINCE__) + +private: + wxArrayString m_fileNames; + + // remember if our SetPosition() or Centre() (which requires special + // treatment) was called + bool m_bMovedWindow; + int m_centreDir; // nothing to do if 0 + + DECLARE_DYNAMIC_CLASS(wxFileDialog) + wxDECLARE_NO_COPY_CLASS(wxFileDialog); +}; + +#endif // _WX_FILEDLG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/floppy.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/floppy.ico new file mode 100644 index 0000000000..4453a7512c Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/floppy.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/folder1.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/folder1.ico new file mode 100644 index 0000000000..2994019d4c Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/folder1.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/folder2.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/folder2.ico new file mode 100644 index 0000000000..9a595b9fea Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/folder2.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/font.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/font.h new file mode 100644 index 0000000000..275c6d9962 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/font.h @@ -0,0 +1,174 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/font.h +// Purpose: wxFont class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONT_H_ +#define _WX_FONT_H_ + +#include "wx/gdicmn.h" + +// ---------------------------------------------------------------------------- +// wxFont +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFont : public wxFontBase +{ +public: + // ctors and such + wxFont() { } + + wxFont(const wxFontInfo& info); + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxFont(int size, + int family, + int style, + int weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding); + } +#endif + + wxFont(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(size, family, style, weight, underlined, face, encoding); + } + + bool Create(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + return DoCreate(size, wxDefaultSize, false, family, style, + weight, underlined, face, encoding); + } + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxFont(const wxSize& pixelSize, + int family, + int style, + int weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(pixelSize, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, + underlined, face, encoding); + } +#endif + + wxFont(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(pixelSize, family, style, weight, + underlined, face, encoding); + } + + wxFont(const wxNativeFontInfo& info, WXHFONT hFont = 0) + { + Create(info, hFont); + } + + wxFont(const wxString& fontDesc); + + + bool Create(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + return DoCreate(-1, pixelSize, true, family, style, + weight, underlined, face, encoding); + } + + bool Create(const wxNativeFontInfo& info, WXHFONT hFont = 0); + + virtual ~wxFont(); + + // implement base class pure virtuals + virtual int GetPointSize() const; + virtual wxSize GetPixelSize() const; + virtual bool IsUsingSizeInPixels() const; + virtual wxFontStyle GetStyle() const; + virtual wxFontWeight GetWeight() const; + virtual bool GetUnderlined() const; + virtual bool GetStrikethrough() const; + virtual wxString GetFaceName() const; + virtual wxFontEncoding GetEncoding() const; + virtual const wxNativeFontInfo *GetNativeFontInfo() const; + + virtual void SetPointSize(int pointSize); + virtual void SetPixelSize(const wxSize& pixelSize); + virtual void SetFamily(wxFontFamily family); + virtual void SetStyle(wxFontStyle style); + virtual void SetWeight(wxFontWeight weight); + virtual bool SetFaceName(const wxString& faceName); + virtual void SetUnderlined(bool underlined); + virtual void SetStrikethrough(bool strikethrough); + virtual void SetEncoding(wxFontEncoding encoding); + + wxDECLARE_COMMON_FONT_METHODS(); + + virtual bool IsFixedWidth() const; + + // implementation only from now on + // ------------------------------- + + virtual bool IsFree() const; + virtual bool RealizeResource(); + virtual WXHANDLE GetResourceHandle() const; + virtual bool FreeResource(bool force = false); + + // for consistency with other wxMSW classes + WXHFONT GetHFONT() const; + +protected: + // real font creation function, used in all cases + bool DoCreate(int size, + const wxSize& pixelSize, + bool sizeUsingPixels, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + + virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info); + virtual wxFontFamily DoGetFamily() const; + + // implement wxObject virtuals which are used by AllocExclusive() + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxFont) +}; + +#endif // _WX_FONT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/fontdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/fontdlg.h new file mode 100644 index 0000000000..ea7e7ef7e8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/fontdlg.h @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/fontdlg.h +// Purpose: wxFontDialog class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_FONTDLG_H_ +#define _WX_MSW_FONTDLG_H_ + +// ---------------------------------------------------------------------------- +// wxFontDialog +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFontDialog : public wxFontDialogBase +{ +public: + wxFontDialog() : wxFontDialogBase() { /* must be Create()d later */ } + wxFontDialog(wxWindow *parent) + : wxFontDialogBase(parent) { Create(parent); } + wxFontDialog(wxWindow *parent, const wxFontData& data) + : wxFontDialogBase(parent, data) { Create(parent, data); } + + virtual int ShowModal(); + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated interface, don't use + wxDEPRECATED( wxFontDialog(wxWindow *parent, const wxFontData *data) ); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxFontDialog) +}; + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated interface, don't use +inline wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData *data) + : wxFontDialogBase(parent) { InitFontData(data); Create(parent); } +#endif // WXWIN_COMPATIBILITY_2_6 + +#endif + // _WX_MSW_FONTDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/frame.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/frame.h new file mode 100644 index 0000000000..54ad3beec4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/frame.h @@ -0,0 +1,168 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/frame.h +// Purpose: wxFrame class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FRAME_H_ +#define _WX_FRAME_H_ + +class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase +{ +public: + // construction + wxFrame() { Init(); } + wxFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxFrame(); + + // implement base class pure virtuals + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); + + // implementation only from now on + // ------------------------------- + + // event handlers + void OnSysColourChanged(wxSysColourChangedEvent& event); + + // Toolbar +#if wxUSE_TOOLBAR + virtual wxToolBar* CreateToolBar(long style = -1, + wxWindowID id = wxID_ANY, + const wxString& name = wxToolBarNameStr); +#endif // wxUSE_TOOLBAR + + // Status bar +#if wxUSE_STATUSBAR + virtual wxStatusBar* OnCreateStatusBar(int number = 1, + long style = wxSTB_DEFAULT_STYLE, + wxWindowID id = 0, + const wxString& name = wxStatusLineNameStr); + + // Hint to tell framework which status bar to use: the default is to use + // native one for the platforms which support it (Win32), the generic one + // otherwise + + // TODO: should this go into a wxFrameworkSettings class perhaps? + static void UseNativeStatusBar(bool useNative) + { m_useNativeStatusBar = useNative; } + static bool UsesNativeStatusBar() + { return m_useNativeStatusBar; } +#endif // wxUSE_STATUSBAR + + // event handlers + bool HandleSize(int x, int y, WXUINT flag); + bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control); + + // tooltip management +#if wxUSE_TOOLTIPS + WXHWND GetToolTipCtrl() const { return m_hwndToolTip; } + void SetToolTipCtrl(WXHWND hwndTT) { m_hwndToolTip = hwndTT; } +#endif // tooltips + + // override the base class function to handle iconized/maximized frames + virtual void SendSizeEvent(int flags = 0); + + virtual wxPoint GetClientAreaOrigin() const; + + // override base class version to add menu bar accel processing + virtual bool MSWTranslateMessage(WXMSG *msg) + { + return MSWDoTranslateMessage(this, msg); + } + + // window proc for the frames + virtual WXLRESULT MSWWindowProc(WXUINT message, + WXWPARAM wParam, + WXLPARAM lParam); + +#if wxUSE_MENUS + // get the currently active menu: this is the same as the frame menu for + // normal frames but is overridden by wxMDIParentFrame + virtual WXHMENU MSWGetActiveMenu() const { return m_hMenu; } + + // Look up the menu in the menu bar. + virtual wxMenu* MSWFindMenuFromHMENU(WXHMENU hMenu); +#endif // wxUSE_MENUS + +protected: + // common part of all ctors + void Init(); + + // override base class virtuals + virtual void DoGetClientSize(int *width, int *height) const; + virtual void DoSetClientSize(int width, int height); + +#if wxUSE_MENUS_NATIVE + // perform MSW-specific action when menubar is changed + virtual void AttachMenuBar(wxMenuBar *menubar); + + // a plug in for MDI frame classes which need to do something special when + // the menubar is set + virtual void InternalSetMenuBar(); +#endif // wxUSE_MENUS_NATIVE + + // propagate our state change to all child frames + void IconizeChildFrames(bool bIconize); + + // the real implementation of MSWTranslateMessage(), also used by + // wxMDIChildFrame + bool MSWDoTranslateMessage(wxFrame *frame, WXMSG *msg); + + virtual bool IsMDIChild() const { return false; } + + // get default (wxWidgets) icon for the frame + virtual WXHICON GetDefaultIcon() const; + +#if wxUSE_TOOLBAR + virtual void PositionToolBar(); +#endif // wxUSE_TOOLBAR + +#if wxUSE_STATUSBAR + virtual void PositionStatusBar(); + + static bool m_useNativeStatusBar; +#endif // wxUSE_STATUSBAR + +#if wxUSE_MENUS + // frame menu, NULL if none + WXHMENU m_hMenu; +#endif // wxUSE_MENUS + +private: +#if wxUSE_TOOLTIPS + WXHWND m_hwndToolTip; +#endif // tooltips + + // used by IconizeChildFrames(), see comments there + bool m_wasMinimized; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxFrame) +}; + +#endif + // _WX_FRAME_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/fswatcher.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/fswatcher.h new file mode 100644 index 0000000000..b73ee66188 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/fswatcher.h @@ -0,0 +1,37 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/fswatcher.h +// Purpose: wxMSWFileSystemWatcher +// Author: Bartosz Bekier +// Created: 2009-05-26 +// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FSWATCHER_MSW_H_ +#define _WX_FSWATCHER_MSW_H_ + +#include "wx/defs.h" + +#if wxUSE_FSWATCHER + +class WXDLLIMPEXP_BASE wxMSWFileSystemWatcher : public wxFileSystemWatcherBase +{ +public: + wxMSWFileSystemWatcher(); + + wxMSWFileSystemWatcher(const wxFileName& path, + int events = wxFSW_EVENT_ALL); + + // Override the base class function to provide a much more efficient + // implementation for it using the platform native support for watching the + // entire directory trees. + virtual bool AddTree(const wxFileName& path, int events = wxFSW_EVENT_ALL, + const wxString& filter = wxEmptyString); + +protected: + bool Init(); +}; + +#endif // wxUSE_FSWATCHER + +#endif /* _WX_FSWATCHER_MSW_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/gauge.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/gauge.h new file mode 100644 index 0000000000..ac820e99b7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/gauge.h @@ -0,0 +1,77 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/gauge.h +// Purpose: wxGauge implementation for MSW +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_GAUGE_H_ +#define _WX_MSW_GAUGE_H_ + +#if wxUSE_GAUGE + +extern WXDLLIMPEXP_DATA_CORE(const char) wxGaugeNameStr[]; + +// Group box +class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase +{ +public: + wxGauge() { } + + wxGauge(wxWindow *parent, + wxWindowID id, + int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr) + { + (void)Create(parent, id, range, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr); + + // set gauge range/value + virtual void SetRange(int range); + virtual void SetValue(int pos); + + // overridden base class virtuals + virtual bool SetForegroundColour(const wxColour& col); + virtual bool SetBackgroundColour(const wxColour& col); + + virtual void Pulse(); + + WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +protected: + virtual wxSize DoGetBestSize() const; + +private: + // returns true if the control is currently in indeterminate (a.k.a. + // "marquee") mode + bool IsInIndeterminateMode() const; + + // switch to/from indeterminate mode + void SetIndeterminateMode(); + void SetDeterminateMode(); + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxGauge) +}; + +#endif // wxUSE_GAUGE + +#endif // _WX_MSW_GAUGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/gccpriv.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/gccpriv.h new file mode 100644 index 0000000000..4bebc12090 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/gccpriv.h @@ -0,0 +1,138 @@ +/* + Name: wx/msw/gccpriv.h + Purpose: MinGW/Cygwin definitions + Author: Vadim Zeitlin + Modified by: + Created: + Copyright: (c) Vadim Zeitlin + Licence: wxWindows Licence +*/ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_MSW_GCCPRIV_H_ +#define _WX_MSW_GCCPRIV_H_ + +#if defined(__MINGW32__) && !defined(__GNUWIN32__) + #define __GNUWIN32__ +#endif + +#if defined(__MINGW32__) + /* + Include the header defining __MINGW32_{MAJ,MIN}OR_VERSION but check + that UNICODE or _UNICODE is already defined, as _mingw.h relies on them + being set and we'd get weird compilation errors later if it is included + without them being defined, better give a clearer error right now. + */ + #if !defined(UNICODE) + #ifndef wxUSE_UNICODE + #error "wxUSE_UNICODE must be defined before including this header." + #endif + #if wxUSE_UNICODE + #error "UNICODE must be defined before including this header." + #endif + #endif + + #include <_mingw.h> + + #define wxCHECK_MINGW32_VERSION( major, minor ) \ + ( ( ( __MINGW32_MAJOR_VERSION > (major) ) \ + || ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) ) +#else + #define wxCHECK_MINGW32_VERSION( major, minor ) (0) +#endif + +#if defined( __MINGW32__ ) && !defined(__WINE__) && !defined( HAVE_W32API_H ) + #if __MINGW32_MAJOR_VERSION >= 1 + #define HAVE_W32API_H + #endif +#elif defined( __CYGWIN__ ) && !defined( HAVE_W32API_H ) + #if ( __GNUC__ > 2 ) + #define HAVE_W32API_H + #endif +#endif + +#if wxCHECK_WATCOM_VERSION(1,0) + #define HAVE_W32API_H +#endif + +/* check for MinGW/Cygwin w32api version ( releases >= 0.5, only ) */ +#if defined( HAVE_W32API_H ) +#include <w32api.h> +#endif + +/* Watcom can't handle defined(xxx) here: */ +#if defined(__W32API_MAJOR_VERSION) && defined(__W32API_MINOR_VERSION) + #define wxCHECK_W32API_VERSION( major, minor ) \ + ( ( ( __W32API_MAJOR_VERSION > (major) ) \ + || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor) ) ) ) +#else + #define wxCHECK_W32API_VERSION( major, minor ) (0) +#endif + +/* Cygwin / Mingw32 with gcc >= 2.95 use new windows headers which + are more ms-like (header author is Anders Norlander, hence the name) */ +#if (defined(__MINGW32__) || defined(__CYGWIN__) || defined(__WINE__)) && ((__GNUC__>2) || ((__GNUC__==2) && (__GNUC_MINOR__>=95))) + #ifndef wxUSE_NORLANDER_HEADERS + #define wxUSE_NORLANDER_HEADERS 1 + #endif +#else + #ifndef wxUSE_NORLANDER_HEADERS + #define wxUSE_NORLANDER_HEADERS 0 + #endif +#endif + +/* "old" GNUWIN32 is the one without Norlander's headers: it lacks the + standard Win32 headers and we define the used stuff ourselves for it + in wx/msw/gnuwin32/extra.h */ +#if defined(__GNUC__) && !wxUSE_NORLANDER_HEADERS + #define __GNUWIN32_OLD__ +#endif + +/* Cygwin 1.0 */ +#if defined(__CYGWIN__) && ((__GNUC__==2) && (__GNUC_MINOR__==9)) + #define __CYGWIN10__ +#endif + +/* Mingw runtime 1.0-20010604 has some missing _tXXXX functions, + so let's define them ourselves: */ +#if defined(__GNUWIN32__) && wxCHECK_W32API_VERSION( 1, 0 ) \ + && !wxCHECK_W32API_VERSION( 1, 1 ) + #ifndef _tsetlocale + #if wxUSE_UNICODE + #define _tsetlocale _wsetlocale + #else + #define _tsetlocale setlocale + #endif + #endif + #ifndef _tgetenv + #if wxUSE_UNICODE + #define _tgetenv _wgetenv + #else + #define _tgetenv getenv + #endif + #endif + #ifndef _tfopen + #if wxUSE_UNICODE + #define _tfopen _wfopen + #else + #define _tfopen fopen + #endif + #endif +#endif + +/* current (= before mingw-runtime 3.3) mingw32 headers forget to + define _puttchar, this will probably be fixed in the next versions but + for now do it ourselves + */ +#if defined( __MINGW32__ ) && \ + !wxCHECK_MINGW32_VERSION(3,3) && !defined( _puttchar ) + #ifdef wxUSE_UNICODE + #define _puttchar putwchar + #else + #define _puttchar puttchar + #endif +#endif + +#endif + /* _WX_MSW_GCCPRIV_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/gdiimage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/gdiimage.h new file mode 100644 index 0000000000..d085e50a4a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/gdiimage.h @@ -0,0 +1,197 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/gdiimage.h +// Purpose: wxGDIImage class: base class for wxBitmap, wxIcon, wxCursor +// under MSW +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.11.99 +// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// NB: this is a private header, it is not intended to be directly included by +// user code (but may be included from other, public, wxWin headers + +#ifndef _WX_MSW_GDIIMAGE_H_ +#define _WX_MSW_GDIIMAGE_H_ + +#include "wx/gdiobj.h" // base class +#include "wx/gdicmn.h" // wxBITMAP_TYPE_INVALID +#include "wx/list.h" + +class WXDLLIMPEXP_FWD_CORE wxGDIImageRefData; +class WXDLLIMPEXP_FWD_CORE wxGDIImageHandler; +class WXDLLIMPEXP_FWD_CORE wxGDIImage; + +WX_DECLARE_EXPORTED_LIST(wxGDIImageHandler, wxGDIImageHandlerList); + +// ---------------------------------------------------------------------------- +// wxGDIImageRefData: common data fields for all derived classes +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGDIImageRefData : public wxGDIRefData +{ +public: + wxGDIImageRefData() + { + m_width = m_height = m_depth = 0; + + m_handle = 0; + } + + wxGDIImageRefData(const wxGDIImageRefData& data) : wxGDIRefData() + { + m_width = data.m_width; + m_height = data.m_height; + m_depth = data.m_depth; + + // can't copy handles like this, derived class copy ctor must do it! + m_handle = NULL; + } + + // accessors + virtual bool IsOk() const { return m_handle != 0; } + + void SetSize(int w, int h) { m_width = w; m_height = h; } + + // free the ressources we allocated + virtual void Free() = 0; + + // for compatibility, the member fields are public + + // the size of the image + int m_width, m_height; + + // the depth of the image + int m_depth; + + // the handle to it + union + { + WXHANDLE m_handle; // for untyped access + WXHBITMAP m_hBitmap; + WXHICON m_hIcon; + WXHCURSOR m_hCursor; + }; +}; + +// ---------------------------------------------------------------------------- +// wxGDIImage: this class supports GDI image handlers which may be registered +// dynamically and will be used for loading/saving the images in the specified +// format. It also falls back to wxImage if no appropriate image is found. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGDIImage : public wxGDIObject +{ +public: + // handlers list interface + static wxGDIImageHandlerList& GetHandlers() { return ms_handlers; } + + static void AddHandler(wxGDIImageHandler *handler); + static void InsertHandler(wxGDIImageHandler *handler); + static bool RemoveHandler(const wxString& name); + + static wxGDIImageHandler *FindHandler(const wxString& name); + static wxGDIImageHandler *FindHandler(const wxString& extension, long type); + static wxGDIImageHandler *FindHandler(long type); + + static void InitStandardHandlers(); + static void CleanUpHandlers(); + + // access to the ref data casted to the right type + wxGDIImageRefData *GetGDIImageData() const + { return (wxGDIImageRefData *)m_refData; } + + // accessors + WXHANDLE GetHandle() const + { return IsNull() ? 0 : GetGDIImageData()->m_handle; } + void SetHandle(WXHANDLE handle) + { AllocExclusive(); GetGDIImageData()->m_handle = handle; } + + int GetWidth() const { return IsNull() ? 0 : GetGDIImageData()->m_width; } + int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_height; } + int GetDepth() const { return IsNull() ? 0 : GetGDIImageData()->m_depth; } + + wxSize GetSize() const + { + return IsNull() ? wxSize(0,0) : + wxSize(GetGDIImageData()->m_width, GetGDIImageData()->m_height); + } + + void SetWidth(int w) { AllocExclusive(); GetGDIImageData()->m_width = w; } + void SetHeight(int h) { AllocExclusive(); GetGDIImageData()->m_height = h; } + void SetDepth(int d) { AllocExclusive(); GetGDIImageData()->m_depth = d; } + + void SetSize(int w, int h) + { + AllocExclusive(); + GetGDIImageData()->SetSize(w, h); + } + void SetSize(const wxSize& size) { SetSize(size.x, size.y); } + + // forward some of base class virtuals to wxGDIImageRefData + bool FreeResource(bool force = false); + virtual WXHANDLE GetResourceHandle() const; + +protected: + // create the data for the derived class here + virtual wxGDIImageRefData *CreateData() const = 0; + + // implement the wxGDIObject method in terms of our, more specific, one + virtual wxGDIRefData *CreateGDIRefData() const { return CreateData(); } + + // we can't [efficiently] clone objects of this class + virtual wxGDIRefData * + CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const + { + wxFAIL_MSG( wxT("must be implemented if used") ); + + return NULL; + } + + static wxGDIImageHandlerList ms_handlers; +}; + +// ---------------------------------------------------------------------------- +// wxGDIImageHandler: a class which knows how to load/save wxGDIImages. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGDIImageHandler : public wxObject +{ +public: + // ctor + wxGDIImageHandler() { m_type = wxBITMAP_TYPE_INVALID; } + wxGDIImageHandler(const wxString& name, + const wxString& ext, + wxBitmapType type) + : m_name(name), m_extension(ext), m_type(type) { } + + // accessors + void SetName(const wxString& name) { m_name = name; } + void SetExtension(const wxString& ext) { m_extension = ext; } + void SetType(wxBitmapType type) { m_type = type; } + + const wxString& GetName() const { return m_name; } + const wxString& GetExtension() const { return m_extension; } + wxBitmapType GetType() const { return m_type; } + + // real handler operations: to implement in derived classes + virtual bool Create(wxGDIImage *image, + const void* data, + wxBitmapType flags, + int width, int height, int depth = 1) = 0; + virtual bool Load(wxGDIImage *image, + const wxString& name, + wxBitmapType flags, + int desiredWidth, int desiredHeight) = 0; + virtual bool Save(const wxGDIImage *image, + const wxString& name, + wxBitmapType type) const = 0; + +protected: + wxString m_name; + wxString m_extension; + wxBitmapType m_type; +}; + +#endif // _WX_MSW_GDIIMAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/genrcdefs.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/genrcdefs.h new file mode 100644 index 0000000000..809419b3f9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/genrcdefs.h @@ -0,0 +1,46 @@ +/* + * Name: wx/msw/genrcdefs.h + * Purpose: Emit preprocessor symbols into rcdefs.h for resource compiler + * Author: Mike Wetherell + * Copyright: (c) 2005 Mike Wetherell + * Licence: wxWindows licence + */ + +#define EMIT(line) line + +EMIT(#ifndef _WX_RCDEFS_H) +EMIT(#define _WX_RCDEFS_H) + +#ifdef _MSC_FULL_VER +#if _MSC_FULL_VER < 140040130 +EMIT(#define wxUSE_RC_MANIFEST 1) +#endif +#else +EMIT(#define wxUSE_RC_MANIFEST 1) +#endif + +#if defined _M_AMD64 || defined __x86_64__ +EMIT(#define WX_CPU_AMD64) +#endif + +#ifdef _M_ARM +EMIT(#define WX_CPU_ARM) +#endif + +#if defined _M_IA64 || defined __ia64__ +EMIT(#define WX_CPU_IA64) +#endif + +#if defined _M_IX86 || defined _X86_ +EMIT(#define WX_CPU_X86) +#endif + +#ifdef _M_PPC +EMIT(#define WX_CPU_PPC) +#endif + +#ifdef _M_SH +EMIT(#define WX_CPU_SH) +#endif + +EMIT(#endif) diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/glcanvas.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/glcanvas.h new file mode 100644 index 0000000000..52b82f42a0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/glcanvas.h @@ -0,0 +1,158 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/glcanvas.h +// Purpose: wxGLCanvas, for using OpenGL with wxWidgets under Windows +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GLCANVAS_H_ +#define _WX_GLCANVAS_H_ + +#include "wx/palette.h" + +#include "wx/msw/wrapwin.h" + +#include <GL/gl.h> + +// ---------------------------------------------------------------------------- +// wxGLContext: OpenGL rendering context +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase +{ +public: + wxGLContext(wxGLCanvas *win, const wxGLContext* other = NULL); + virtual ~wxGLContext(); + + virtual bool SetCurrent(const wxGLCanvas& win) const; + + HGLRC GetGLRC() const { return m_glContext; } + +protected: + HGLRC m_glContext; + +private: + DECLARE_CLASS(wxGLContext) +}; + +// ---------------------------------------------------------------------------- +// wxGLCanvas: OpenGL output window +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasBase +{ +public: + wxEXPLICIT // avoid implicitly converting a wxWindow* to wxGLCanvas + wxGLCanvas(wxWindow *parent, + wxWindowID id = wxID_ANY, + const int *attribList = NULL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const wxPalette& palette = wxNullPalette); + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette); + + virtual ~wxGLCanvas(); + + // implement wxGLCanvasBase methods + virtual bool SwapBuffers(); + + + // MSW-specific helpers + // -------------------- + + // get the HDC used for OpenGL rendering + HDC GetHDC() const { return m_hDC; } + + // try to find pixel format matching the given attributes list for the + // specified HDC, return 0 on error, otherwise pfd is filled in with the + // information from attribList if non-NULL + static int ChooseMatchingPixelFormat(HDC hdc, const int *attribList, + PIXELFORMATDESCRIPTOR *pfd = NULL); + +#if wxUSE_PALETTE + // palette stuff + bool SetupPalette(const wxPalette& palette); + virtual wxPalette CreateDefaultPalette(); + void OnQueryNewPalette(wxQueryNewPaletteEvent& event); + void OnPaletteChanged(wxPaletteChangedEvent& event); +#endif // wxUSE_PALETTE + + // deprecated methods using the implicit wxGLContext, associate the context + // explicitly with the window instead +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( + wxGLCanvas(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); + + wxDEPRECATED( + wxGLCanvas(wxWindow *parent, + const wxGLContext *shared, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); + + wxDEPRECATED( + wxGLCanvas(wxWindow *parent, + const wxGLCanvas *shared, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); +#endif // WXWIN_COMPATIBILITY_2_8 + +protected: + // common part of all ctors + void Init(); + + // the real window creation function, Create() may reuse it twice as we may + // need to create an OpenGL window to query the available extensions and + // then potentially delete and recreate it with another pixel format + bool CreateWindow(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName); + + // set up the pixel format using the given attributes and palette + int DoSetup(PIXELFORMATDESCRIPTOR &pfd, const int *attribList); + + + // HDC for this window, we keep it all the time + HDC m_hDC; + +private: + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxGLCanvas) +}; + +#endif // _WX_GLCANVAS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/hand.cur b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/hand.cur new file mode 100644 index 0000000000..e5a1fe7c2f Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/hand.cur differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/headerctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/headerctrl.h new file mode 100644 index 0000000000..db702c5a19 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/headerctrl.h @@ -0,0 +1,136 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/headerctrl.h +// Purpose: wxMSW native wxHeaderCtrl +// Author: Vadim Zeitlin +// Created: 2008-12-01 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_HEADERCTRL_H_ +#define _WX_MSW_HEADERCTRL_H_ + +class WXDLLIMPEXP_FWD_CORE wxImageList; + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxHeaderCtrl : public wxHeaderCtrlBase +{ +public: + wxHeaderCtrl() + { + Init(); + } + + wxHeaderCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHD_DEFAULT_STYLE, + const wxString& name = wxHeaderCtrlNameStr) + { + Init(); + + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHD_DEFAULT_STYLE, + const wxString& name = wxHeaderCtrlNameStr); + + virtual ~wxHeaderCtrl(); + + +protected: + // override wxWindow methods which must be implemented by a new control + virtual wxSize DoGetBestSize() const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + +private: + // implement base class pure virtuals + virtual void DoSetCount(unsigned int count); + virtual unsigned int DoGetCount() const; + virtual void DoUpdate(unsigned int idx); + + virtual void DoScrollHorz(int dx); + + virtual void DoSetColumnsOrder(const wxArrayInt& order); + virtual wxArrayInt DoGetColumnsOrder() const; + + // override MSW-specific methods needed for new control + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + + // common part of all ctors + void Init(); + + // wrapper around Header_InsertItem(): insert the item using information + // from the given column at the given index + void DoInsertItem(const wxHeaderColumn& col, unsigned int idx); + + // get the number of currently visible items: this is also the total number + // of items contained in the native control + int GetShownColumnsCount() const; + + // due to the discrepancy for the hidden columns which we know about but + // the native control does not, there can be a difference between the + // column indices we use and the ones used by the native control; these + // functions translate between them + // + // notice that MSWToNativeIdx() shouldn't be called for hidden columns and + // MSWFromNativeIdx() always returns an index of a visible column + int MSWToNativeIdx(int idx); + int MSWFromNativeIdx(int item); + + // this is the same as above but for order, not index + int MSWToNativeOrder(int order); + int MSWFromNativeOrder(int order); + + // get the event type corresponding to a click or double click event + // (depending on dblclk value) with the specified (using MSW convention) + // mouse button + wxEventType GetClickEventType(bool dblclk, int button); + + + // the number of columns in the control, including the hidden ones (not + // taken into account by the native control, see comment in DoGetCount()) + unsigned int m_numColumns; + + // this is a lookup table allowing us to check whether the column with the + // given index is currently shown in the native control, in which case the + // value of this array element with this index is 0, or hidden + // + // notice that this may be different from GetColumn(idx).IsHidden() and in + // fact we need this array precisely because it will be different from it + // in DoUpdate() when the column hidden flag gets toggled and we need it to + // handle this transition correctly + wxArrayInt m_isHidden; + + // the order of our columns: this array contains the index of the column + // shown at the position n as the n-th element + // + // this is necessary only to handle the hidden columns: the native control + // doesn't know about them and so we can't use Header_GetOrderArray() + wxArrayInt m_colIndices; + + // the image list: initially NULL, created on demand + wxImageList *m_imageList; + + // the offset of the window used to emulate scrolling it + int m_scrollOffset; + + // actual column we are dragging or -1 if not dragging anything + int m_colBeingDragged; + + wxDECLARE_NO_COPY_CLASS(wxHeaderCtrl); +}; + +#endif // _WX_MSW_HEADERCTRL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/helpbest.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/helpbest.h new file mode 100644 index 0000000000..4deffa4adb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/helpbest.h @@ -0,0 +1,128 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/helpbest.h +// Purpose: Tries to load MS HTML Help, falls back to wxHTML upon failure +// Author: Mattia Barbon +// Modified by: +// Created: 02/04/2001 +// Copyright: (c) Mattia Barbon +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPBEST_H_ +#define _WX_HELPBEST_H_ + +#if wxUSE_HELP && wxUSE_MS_HTML_HELP \ + && wxUSE_WXHTML_HELP && !defined(__WXUNIVERSAL__) + +#include "wx/helpbase.h" +#include "wx/html/helpfrm.h" // for wxHF_DEFAULT_STYLE + +class WXDLLIMPEXP_HTML wxBestHelpController: public wxHelpControllerBase +{ +public: + wxBestHelpController(wxWindow* parentWindow = NULL, + int style = wxHF_DEFAULT_STYLE) + : wxHelpControllerBase(parentWindow), + m_helpControllerType(wxUseNone), + m_helpController(NULL), + m_style(style) + { + } + + virtual ~wxBestHelpController() { delete m_helpController; } + + // Must call this to set the filename + virtual bool Initialize(const wxString& file); + virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize( file ); } + + // If file is "", reloads file given in Initialize + virtual bool LoadFile(const wxString& file = wxEmptyString) + { + return m_helpController->LoadFile( GetValidFilename( file ) ); + } + + virtual bool DisplayContents() + { + return m_helpController->DisplayContents(); + } + + virtual bool DisplaySection(int sectionNo) + { + return m_helpController->DisplaySection( sectionNo ); + } + + virtual bool DisplaySection(const wxString& section) + { + return m_helpController->DisplaySection( section ); + } + + virtual bool DisplayBlock(long blockNo) + { + return m_helpController->DisplayBlock( blockNo ); + } + + virtual bool DisplayContextPopup(int contextId) + { + return m_helpController->DisplayContextPopup( contextId ); + } + + virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos) + { + return m_helpController->DisplayTextPopup( text, pos ); + } + + virtual bool KeywordSearch(const wxString& k, + wxHelpSearchMode mode = wxHELP_SEARCH_ALL) + { + return m_helpController->KeywordSearch( k, mode ); + } + + virtual bool Quit() + { + return m_helpController->Quit(); + } + + // Allows one to override the default settings for the help frame. + virtual void SetFrameParameters(const wxString& title, + const wxSize& size, + const wxPoint& pos = wxDefaultPosition, + bool newFrameEachTime = false) + { + m_helpController->SetFrameParameters( title, size, pos, + newFrameEachTime ); + } + + // Obtains the latest settings used by the help frame and the help frame. + virtual wxFrame *GetFrameParameters(wxSize *size = NULL, + wxPoint *pos = NULL, + bool *newFrameEachTime = NULL) + { + return m_helpController->GetFrameParameters( size, pos, + newFrameEachTime ); + } + + /// Set the window that can optionally be used for the help window's parent. + virtual void SetParentWindow(wxWindow* win) { m_helpController->SetParentWindow(win); } + + /// Get the window that can optionally be used for the help window's parent. + virtual wxWindow* GetParentWindow() const { return m_helpController->GetParentWindow(); } + +protected: + // Append/change extension if necessary. + wxString GetValidFilename(const wxString& file) const; + +protected: + enum HelpControllerType { wxUseNone, wxUseHtmlHelp, wxUseChmHelp }; + + HelpControllerType m_helpControllerType; + wxHelpControllerBase* m_helpController; + int m_style; + + DECLARE_DYNAMIC_CLASS(wxBestHelpController) + wxDECLARE_NO_COPY_CLASS(wxBestHelpController); +}; + +#endif // wxUSE_HELP && wxUSE_MS_HTML_HELP && wxUSE_WXHTML_HELP + +#endif + // _WX_HELPBEST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/helpchm.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/helpchm.h new file mode 100644 index 0000000000..17cda8ce00 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/helpchm.h @@ -0,0 +1,89 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/helpchm.h +// Purpose: Help system: MS HTML Help implementation +// Author: Julian Smart +// Modified by: +// Created: 16/04/2000 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_HELPCHM_H_ +#define _WX_MSW_HELPCHM_H_ + +#if wxUSE_MS_HTML_HELP + +#include "wx/helpbase.h" + +class WXDLLIMPEXP_CORE wxCHMHelpController : public wxHelpControllerBase +{ +public: + wxCHMHelpController(wxWindow* parentWindow = NULL): wxHelpControllerBase(parentWindow) { } + + // Must call this to set the filename + virtual bool Initialize(const wxString& file); + virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize( file ); } + + // If file is "", reloads file given in Initialize + virtual bool LoadFile(const wxString& file = wxEmptyString); + virtual bool DisplayContents(); + virtual bool DisplaySection(int sectionNo); + virtual bool DisplaySection(const wxString& section); + virtual bool DisplayBlock(long blockNo); + virtual bool DisplayContextPopup(int contextId); + virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos); + virtual bool KeywordSearch(const wxString& k, + wxHelpSearchMode mode = wxHELP_SEARCH_ALL); + virtual bool Quit(); + + wxString GetHelpFile() const { return m_helpFile; } + + // helper of DisplayTextPopup(), also used in wxSimpleHelpProvider::ShowHelp + static bool ShowContextHelpPopup(const wxString& text, + const wxPoint& pos, + wxWindow *window); + +protected: + // get the name of the CHM file we use from our m_helpFile + wxString GetValidFilename() const; + + // Call HtmlHelp() with the provided parameters (both overloads do the same + // thing but allow to avoid casts in the calling code) and return false + // (but don't crash) if HTML help is unavailable + static bool CallHtmlHelp(wxWindow *win, const wxChar *str, + unsigned cmd, WXWPARAM param); + static bool CallHtmlHelp(wxWindow *win, const wxChar *str, + unsigned cmd, const void *param = NULL) + { + return CallHtmlHelp(win, str, cmd, reinterpret_cast<WXWPARAM>(param)); + } + + // even simpler wrappers using GetParentWindow() and GetValidFilename() as + // the first 2 HtmlHelp() parameters + bool CallHtmlHelp(unsigned cmd, WXWPARAM param) + { + return CallHtmlHelp(GetParentWindow(), GetValidFilename().t_str(), + cmd, param); + } + + bool CallHtmlHelp(unsigned cmd, const void *param = NULL) + { + return CallHtmlHelp(cmd, reinterpret_cast<WXWPARAM>(param)); + } + + // wrapper around CallHtmlHelp(HH_DISPLAY_TEXT_POPUP): only one of text and + // contextId parameters can be non-NULL/non-zero + static bool DoDisplayTextPopup(const wxChar *text, + const wxPoint& pos, + int contextId, + wxWindow *window); + + + wxString m_helpFile; + + DECLARE_DYNAMIC_CLASS(wxCHMHelpController) +}; + +#endif // wxUSE_MS_HTML_HELP + +#endif // _WX_MSW_HELPCHM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/helpwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/helpwin.h new file mode 100644 index 0000000000..7cc5545435 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/helpwin.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/helpwin.h +// Purpose: Help system: WinHelp implementation +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPWIN_H_ +#define _WX_HELPWIN_H_ + +#include "wx/wx.h" + +#if wxUSE_HELP + +#include "wx/helpbase.h" + +class WXDLLIMPEXP_CORE wxWinHelpController: public wxHelpControllerBase +{ + DECLARE_DYNAMIC_CLASS(wxWinHelpController) + +public: + wxWinHelpController(wxWindow* parentWindow = NULL): wxHelpControllerBase(parentWindow) {} + virtual ~wxWinHelpController() {} + + // Must call this to set the filename + virtual bool Initialize(const wxString& file); + virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize( file ); } + + // If file is "", reloads file given in Initialize + virtual bool LoadFile(const wxString& file = wxEmptyString); + virtual bool DisplayContents(); + virtual bool DisplaySection(int sectionNo); + virtual bool DisplaySection(const wxString& section) { return KeywordSearch(section); } + virtual bool DisplayBlock(long blockNo); + virtual bool DisplayContextPopup(int contextId); + virtual bool KeywordSearch(const wxString& k, + wxHelpSearchMode mode = wxHELP_SEARCH_ALL); + virtual bool Quit(); + + inline wxString GetHelpFile() const { return m_helpFile; } + +protected: + // Append extension if necessary. + wxString GetValidFilename(const wxString& file) const; + +private: + wxString m_helpFile; +}; + +#endif // wxUSE_HELP +#endif +// _WX_HELPWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/htmlhelp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/htmlhelp.h new file mode 100644 index 0000000000..3e8a7caf92 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/htmlhelp.h @@ -0,0 +1,465 @@ +/* + * wx/msw/htmlhelp.h + * Copyright 2004 Jacek Caban + * + * Originally written for the Wine project, and issued under + * the wxWindows licence by kind permission of the author. + * + * Licence: wxWindows licence + */ + +#ifndef __HTMLHELP_H__ +#define __HTMLHELP_H__ + +#define HH_DISPLAY_TOPIC 0x00 +#define HH_HELP_FINDER 0x00 +#define HH_DISPLAY_TOC 0x01 +#define HH_DISPLAY_INDEX 0x02 +#define HH_DISPLAY_SEARCH 0x03 +#define HH_SET_WIN_TYPE 0x04 +#define HH_GET_WIN_TYPE 0x05 +#define HH_GET_WIN_HANDLE 0x06 +#define HH_ENUM_INFO_TYPE 0x07 +#define HH_SET_INFO_TYPE 0x08 +#define HH_SYNC 0x09 +#define HH_RESERVED1 0x0A +#define HH_RESERVED2 0x0B +#define HH_RESERVED3 0x0C +#define HH_KEYWORD_LOOKUP 0x0D +#define HH_DISPLAY_TEXT_POPUP 0x0E +#define HH_HELP_CONTEXT 0x0F +#define HH_TP_HELP_CONTEXTMENU 0x10 +#define HH_TP_HELP_WM_HELP 0x11 +#define HH_CLOSE_ALL 0x12 +#define HH_ALINK_LOOKUP 0x13 +#define HH_GET_LAST_ERROR 0x14 +#define HH_ENUM_CATEGORY 0x15 +#define HH_ENUM_CATEGORY_IT 0x16 +#define HH_RESET_IT_FILTER 0x17 +#define HH_SET_INCLUSIVE_FILTER 0x18 +#define HH_SET_EXCLUSIVE_FILTER 0x19 +#define HH_INITIALIZE 0x1C +#define HH_UNINITIALIZE 0x1D +#define HH_PRETRANSLATEMESSAGE 0xFD +#define HH_SET_GLOBAL_PROPERTY 0xFC + +#define HHWIN_PROP_TAB_AUTOHIDESHOW 0x00000001 +#define HHWIN_PROP_ONTOP 0x00000002 +#define HHWIN_PROP_NOTITLEBAR 0x00000004 +#define HHWIN_PROP_NODEF_STYLES 0x00000008 +#define HHWIN_PROP_NODEF_EXSTYLES 0x00000010 +#define HHWIN_PROP_TRI_PANE 0x00000020 +#define HHWIN_PROP_NOTB_TEXT 0x00000040 +#define HHWIN_PROP_POST_QUIT 0x00000080 +#define HHWIN_PROP_AUTO_SYNC 0x00000100 +#define HHWIN_PROP_TRACKING 0x00000200 +#define HHWIN_PROP_TAB_SEARCH 0x00000400 +#define HHWIN_PROP_TAB_HISTORY 0x00000800 +#define HHWIN_PROP_TAB_FAVORITES 0x00001000 +#define HHWIN_PROP_CHANGE_TITLE 0x00002000 +#define HHWIN_PROP_NAV_ONLY_WIN 0x00004000 +#define HHWIN_PROP_NO_TOOLBAR 0x00008000 +#define HHWIN_PROP_MENU 0x00010000 +#define HHWIN_PROP_TAB_ADVSEARCH 0x00020000 +#define HHWIN_PROP_USER_POS 0x00040000 +#define HHWIN_PROP_TAB_CUSTOM1 0x00080000 +#define HHWIN_PROP_TAB_CUSTOM2 0x00100000 +#define HHWIN_PROP_TAB_CUSTOM3 0x00200000 +#define HHWIN_PROP_TAB_CUSTOM4 0x00400000 +#define HHWIN_PROP_TAB_CUSTOM5 0x00800000 +#define HHWIN_PROP_TAB_CUSTOM6 0x01000000 +#define HHWIN_PROP_TAB_CUSTOM7 0x02000000 +#define HHWIN_PROP_TAB_CUSTOM8 0x04000000 +#define HHWIN_PROP_TAB_CUSTOM9 0x08000000 +#define HHWIN_TB_MARGIN 0x10000000 + +#define HHWIN_PARAM_PROPERTIES 0x00000002 +#define HHWIN_PARAM_STYLES 0x00000004 +#define HHWIN_PARAM_EXSTYLES 0x00000008 +#define HHWIN_PARAM_RECT 0x00000010 +#define HHWIN_PARAM_NAV_WIDTH 0x00000020 +#define HHWIN_PARAM_SHOWSTATE 0x00000040 +#define HHWIN_PARAM_INFOTYPES 0x00000080 +#define HHWIN_PARAM_TB_FLAGS 0x00000100 +#define HHWIN_PARAM_EXPANSION 0x00000200 +#define HHWIN_PARAM_TABPOS 0x00000400 +#define HHWIN_PARAM_TABORDER 0x00000800 +#define HHWIN_PARAM_HISTORY_COUNT 0x00001000 +#define HHWIN_PARAM_CUR_TAB 0x00002000 + +#define HHWIN_BUTTON_EXPAND 0x00000002 +#define HHWIN_BUTTON_BACK 0x00000004 +#define HHWIN_BUTTON_FORWARD 0x00000008 +#define HHWIN_BUTTON_STOP 0x00000010 +#define HHWIN_BUTTON_REFRESH 0x00000020 +#define HHWIN_BUTTON_HOME 0x00000040 +#define HHWIN_BUTTON_BROWSE_FWD 0x00000080 +#define HHWIN_BUTTON_BROWSE_BCK 0x00000100 +#define HHWIN_BUTTON_NOTES 0x00000200 +#define HHWIN_BUTTON_CONTENTS 0x00000400 +#define HHWIN_BUTTON_SYNC 0x00000800 +#define HHWIN_BUTTON_OPTIONS 0x00001000 +#define HHWIN_BUTTON_PRINT 0x00002000 +#define HHWIN_BUTTON_INDEX 0x00004000 +#define HHWIN_BUTTON_SEARCH 0x00008000 +#define HHWIN_BUTTON_HISTORY 0x00010000 +#define HHWIN_BUTTON_FAVORITES 0x00020000 +#define HHWIN_BUTTON_JUMP1 0x00040000 +#define HHWIN_BUTTON_JUMP2 0x00080000 +#define HHWIN_BUTTON_ZOOM 0x00100000 +#define HHWIN_BUTTON_TOC_NEXT 0x00200000 +#define HHWIN_BUTTON_TOC_PREV 0x00400000 + +#define HHWIN_DEF_BUTTONS \ + (HHWIN_BUTTON_EXPAND | HHWIN_BUTTON_BACK | HHWIN_BUTTON_OPTIONS | HHWIN_BUTTON_PRINT) + +#define IDTB_EXPAND 200 +#define IDTB_CONTRACT 201 +#define IDTB_STOP 202 +#define IDTB_REFRESH 203 +#define IDTB_BACK 204 +#define IDTB_HOME 205 +#define IDTB_SYNC 206 +#define IDTB_PRINT 207 +#define IDTB_OPTIONS 208 +#define IDTB_FORWARD 209 +#define IDTB_NOTES 210 +#define IDTB_BROWSE_FWD 211 +#define IDTB_BROWSE_BACK 212 +#define IDTB_CONTENTS 213 +#define IDTB_INDEX 214 +#define IDTB_SEARCH 215 +#define IDTB_HISTORY 216 +#define IDTB_FAVORITES 217 +#define IDTB_JUMP1 218 +#define IDTB_JUMP2 219 +#define IDTB_CUSTOMIZE 221 +#define IDTB_ZOOM 222 +#define IDTB_TOC_NEXT 223 +#define IDTB_TOC_PREV 224 + +#define HHN_FIRST (0U-860U) +#define HHN_LAST (0U-879U) +#define HHN_NAVCOMPLETE HHN_FIRST +#define HHN_TRACK (HHN_FIRST-1) +#define HHN_WINDOW_CREATE (HHN_FIRST-2) + + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct tagHH_NOTIFY { + NMHDR hdr; + PCSTR pszurl; +} HH_NOTIFY; + +typedef struct tagHH_POPUPA { + int cbStruct; + HINSTANCE hinst; + UINT idString; + LPCSTR pszText; + POINT pt; + COLORREF clrForeground; + COLORREF clrBackground; + RECT rcMargins; + LPCSTR pszFont; +} HH_POPUPA; + +typedef struct tagHH_POPUPW { + int cbStruct; + HINSTANCE hinst; + UINT idString; + LPCWSTR pszText; + POINT pt; + COLORREF clrForeground; + COLORREF clrBackground; + RECT rcMargins; + LPCWSTR pszFont; +} HH_POPUPW; + +#ifdef _UNICODE +typedef HH_POPUPW HH_POPUP; +#else +typedef HH_POPUPA HH_POPUP; +#endif + +typedef struct tagHH_ALINKA { + int cbStruct; + BOOL fReserved; + LPCSTR pszKeywords; + LPCSTR pszUrl; + LPCSTR pszMsgText; + LPCSTR pszMsgTitle; + LPCSTR pszWindow; + BOOL fIndexOnFail; +} HH_ALINKA; + +typedef struct tagHH_ALINKW { + int cbStruct; + BOOL fReserved; + LPCWSTR pszKeywords; + LPCWSTR pszUrl; + LPCWSTR pszMsgText; + LPCWSTR pszMsgTitle; + LPCWSTR pszWindow; + BOOL fIndexOnFail; +} HH_ALINKW; + +#ifdef _UNICODE +typedef HH_ALINKW HH_ALINK; +typedef HH_ALINKW HH_AKLINK; +#else +typedef HH_ALINKA HH_ALINK; +typedef HH_ALINKA HH_AKLINK; +#endif + +enum { + HHWIN_NAVTYPE_TOC, + HHWIN_NAVTYPE_INDEX, + HHWIN_NAVTYPE_SEARCH, + HHWIN_NAVTYPE_FAVORITES, + HHWIN_NAVTYPE_HISTORY, + HHWIN_NAVTYPE_AUTHOR, + HHWIN_NAVTYPE_CUSTOM_FIRST = 11 +}; + +enum { + IT_INCLUSIVE, + IT_EXCLUSIVE, + IT_HIDDEN +}; + +typedef struct tagHH_ENUM_IT { + int cbStruct; + int iType; + LPCSTR pszCatName; + LPCSTR pszITName; + LPCSTR pszITDescription; +} HH_ENUM_IT, *PHH_ENUM_IT; + +typedef struct tagHH_ENUM_CAT { + int cbStruct; + LPCSTR pszCatName; + LPCSTR pszCatDescription; +} HH_ENUM_CAT, *PHH_ENUM_CAT; + +typedef struct tagHH_SET_INFOTYPE { + int cbStruct; + LPCSTR pszCatName; + LPCSTR pszInfoTypeName; +} HH_SET_INFOTYPE; + +typedef DWORD HH_INFOTYPE, *PHH_INFOTYPE; + +enum { + HHWIN_NAVTAB_TOP, + HHWIN_NAVTAB_LEFT, + HHWIN_NAVTAB_BOTTOM +}; + +#define HH_MAX_TABS 19 + +enum { + HH_TAB_CONTENTS, + HH_TAB_INDEX, + HH_TAB_SEARCH, + HH_TAB_FAVORITES, + HH_TAB_HISTORY, + HH_TAB_AUTHOR, + HH_TAB_CUSTOM_FIRST = 11, + HH_TAB_CUSTOM_LAST = HH_MAX_TABS +}; + +#define HH_MAX_TABS_CUSTOM (HH_TAB_CUSTOM_LAST-HH_TAB_CUSTOM_FIRST+1) +#define HH_FTS_DEFAULT_PROXIMITY -1 + +typedef struct tagHH_FTS_QUERYA { + int cbStruct; + BOOL fUniCodeStrings; + LPCSTR pszSearchQuery; + LONG iProximity; + BOOL fStemmedSearch; + BOOL fTitleOnly; + BOOL fExecute; + LPCSTR pszWindow; +} HH_FTS_QUERYA; + +typedef struct tagHH_FTS_QUERYW { + int cbStruct; + BOOL fUniCodeStrings; + LPCWSTR pszSearchQuery; + LONG iProximity; + BOOL fStemmedSearch; + BOOL fTitleOnly; + BOOL fExecute; + LPCWSTR pszWindow; +} HH_FTS_QUERYW; + +#ifdef _UNICODE +typedef HH_FTS_QUERYW HH_FTS_QUERY; +#else +typedef HH_FTS_QUERYA HH_FTS_QUERY; +#endif + +typedef struct tagHH_WINTYPEA { + int cbStruct; + BOOL fUniCodeStrings; + LPCSTR pszType; + DWORD fsValidMembers; + DWORD fsWinProperties; + LPCSTR pszCaption; + DWORD dwStyles; + DWORD dwExStyles; + RECT rcWindowPos; + int nShowState; + HWND hwndHelp; + HWND hwndCaller; + PHH_INFOTYPE paInfoTypes; + HWND hwndToolBar; + HWND hwndNavigation; + HWND hwndHTML; + int iNavWidth; + RECT rcHTML; + LPCSTR pszToc; + LPCSTR pszIndex; + LPCSTR pszFile; + LPCSTR pszHome; + DWORD fsToolBarFlags; + BOOL fNotExpanded; + int curNavType; + int tabpos; + int idNotify; + BYTE tabOrder[HH_MAX_TABS+1]; + int cHistory; + LPCSTR pszJump1; + LPCSTR pszJump2; + LPCSTR pszUrlJump1; + LPCSTR pszUrlJump2; + RECT rcMinSize; + int cbInfoTypes; + LPCSTR pszCustomTabs; +} HH_WINTYPEA, *PHH_WINTYPEA; + +typedef struct tagHH_WINTYPEW { + int cbStruct; + BOOL fUniCodeStrings; + LPCWSTR pszType; + DWORD fsValidMembers; + DWORD fsWinProperties; + LPCWSTR pszCaption; + DWORD dwStyles; + DWORD dwExStyles; + RECT rcWindowPos; + int nShowState; + HWND hwndHelp; + HWND hwndCaller; + PHH_INFOTYPE paInfoTypes; + HWND hwndToolBar; + HWND hwndNavigation; + HWND hwndHTML; + int iNavWidth; + RECT rcHTML; + LPCWSTR pszToc; + LPCWSTR pszIndex; + LPCWSTR pszFile; + LPCWSTR pszHome; + DWORD fsToolBarFlags; + BOOL fNotExpanded; + int curNavType; + int tabpos; + int idNotify; + BYTE tabOrder[HH_MAX_TABS+1]; + int cHistory; + LPCWSTR pszJump1; + LPCWSTR pszJump2; + LPCWSTR pszUrlJump1; + LPCWSTR pszUrlJump2; + RECT rcMinSize; + int cbInfoTypes; + LPCWSTR pszCustomTabs; +} HH_WINTYPEW, *PHH_WINTYPEW; + +#ifdef _UNICODE +typedef HH_WINTYPEW HH_WINTYPE; +#else +typedef HH_WINTYPEA HH_WINTYPE; +#endif + +enum { + HHACT_TAB_CONTENTS, + HHACT_TAB_INDEX, + HHACT_TAB_SEARCH, + HHACT_TAB_HISTORY, + HHACT_TAB_FAVORITES, + HHACT_EXPAND, + HHACT_CONTRACT, + HHACT_BACK, + HHACT_FORWARD, + HHACT_STOP, + HHACT_REFRESH, + HHACT_HOME, + HHACT_SYNC, + HHACT_OPTIONS, + HHACT_PRINT, + HHACT_HIGHLIGHT, + HHACT_CUSTOMIZE, + HHACT_JUMP1, + HHACT_JUMP2, + HHACT_ZOOM, + HHACT_TOC_NEXT, + HHACT_TOC_PREV, + HHACT_NOTES, + HHACT_LAST_ENUM +}; + +typedef struct tagHH_NTRACKA { + NMHDR hdr; + PCSTR pszCurUrl; + int idAction; + PHH_WINTYPEA phhWinType; +} HH_NTRACKA; + +typedef struct tagHH_NTRACKW { + NMHDR hdr; + PCSTR pszCurUrl; + int idAction; + PHH_WINTYPEW phhWinType; +} HH_NTRACKW; + +#ifdef _UNICODE +typedef HH_NTRACKW HH_NTRACK; +#else +typedef HH_NTRACKA HH_NTRACK; +#endif + +HWND WINAPI HtmlHelpA(HWND,LPCSTR,UINT,DWORD); +HWND WINAPI HtmlHelpA(HWND,LPCSTR,UINT,DWORD); +#define HtmlHelp WINELIB_NAME_AW(HtmlHelp) + +#define ATOM_HTMLHELP_API_ANSI (LPTSTR)14 +#define ATOM_HTMLHELP_API_UNICODE (LPTSTR)15 + +typedef enum tagHH_GPROPID { + HH_GPROPID_SINGLETHREAD = 1, + HH_GPROPID_TOOLBAR_MARGIN = 2, + HH_GPROPID_UI_LANGUAGE = 3, + HH_GPROPID_CURRENT_SUBSET = 4, + HH_GPROPID_CONTENT_LANGUAGE = 5 +} HH_GPROPID; + +#ifdef __WIDL_OAIDL_H + +typedef struct tagHH_GLOBAL_PROPERTY +{ + HH_GPROPID id; + VARIANT var; +} HH_GLOBAL_PROPERTY ; + +#endif /* __WIDL_OAIDL_H */ + +#ifdef __cplusplus +} +#endif + +#endif /* __HTMLHELP_H__ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/hyperlink.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/hyperlink.h new file mode 100644 index 0000000000..847695b273 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/hyperlink.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/hyperlink.h +// Purpose: Hyperlink control +// Author: Rickard Westerlund +// Created: 2010-08-04 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_HYPERLINK_H_ +#define _WX_MSW_HYPERLINK_H_ + +#include "wx/generic/hyperlink.h" + +// ---------------------------------------------------------------------------- +// wxHyperlinkCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxHyperlinkCtrl : public wxGenericHyperlinkCtrl +{ +public: + // Default constructor (for two-step construction). + wxHyperlinkCtrl() { } + + // Constructor. + wxHyperlinkCtrl(wxWindow *parent, + wxWindowID id, + const wxString& label, const wxString& url, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHL_DEFAULT_STYLE, + const wxString& name = wxHyperlinkCtrlNameStr) + { + (void)Create(parent, id, label, url, pos, size, style, name); + } + + // Creation function (for two-step construction). + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, const wxString& url, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxHL_DEFAULT_STYLE, + const wxString& name = wxHyperlinkCtrlNameStr); + + + // overridden base class methods + // ----------------------------- + + virtual void SetURL(const wxString &url); + + virtual void SetLabel(const wxString &label); + +protected: + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + virtual wxSize DoGetBestClientSize() const; + +private: + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + + wxDECLARE_DYNAMIC_CLASS( wxHyperlinkCtrl ); +}; + +#endif // _WX_MSW_HYPERLINK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ia64.manifest b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ia64.manifest new file mode 100644 index 0000000000..242ea4b624 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ia64.manifest @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> +<assemblyIdentity + version="0.64.1.0" + processorArchitecture="IA64" + name="Controls" + type="win32" +/> +<description>wxWindows application</description> +<dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="IA64" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> +</dependency> +</assembly> diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/icon.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/icon.h new file mode 100644 index 0000000000..4737e449a4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/icon.h @@ -0,0 +1,96 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/icon.h +// Purpose: wxIcon class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ICON_H_ +#define _WX_ICON_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/msw/gdiimage.h" + +// --------------------------------------------------------------------------- +// icon data +// --------------------------------------------------------------------------- + +// notice that although wxIconRefData inherits from wxBitmapRefData, it is not +// a valid wxBitmapRefData +class WXDLLIMPEXP_CORE wxIconRefData : public wxGDIImageRefData +{ +public: + wxIconRefData() { } + virtual ~wxIconRefData() { Free(); } + + virtual void Free(); +}; + +// --------------------------------------------------------------------------- +// Icon +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxIcon : public wxGDIImage +{ +public: + // ctors + // default + wxIcon() { } + + // from raw data + wxIcon(const char bits[], int width, int height); + + // from XPM data + wxIcon(const char* const* data) { CreateIconFromXpm(data); } +#ifdef wxNEEDS_CHARPP + wxIcon(char **data) { CreateIconFromXpm(const_cast<const char* const*>(data)); } +#endif + // from resource/file + wxIcon(const wxString& name, + wxBitmapType type = wxICON_DEFAULT_TYPE, + int desiredWidth = -1, int desiredHeight = -1); + + wxIcon(const wxIconLocation& loc); + + virtual ~wxIcon(); + + virtual bool LoadFile(const wxString& name, + wxBitmapType type = wxICON_DEFAULT_TYPE, + int desiredWidth = -1, int desiredHeight = -1); + + bool CreateFromHICON(WXHICON icon); + + // implementation only from now on + wxIconRefData *GetIconData() const { return (wxIconRefData *)m_refData; } + + void SetHICON(WXHICON icon) { SetHandle((WXHANDLE)icon); } + WXHICON GetHICON() const { return (WXHICON)GetHandle(); } + + // create from bitmap (which should have a mask unless it's monochrome): + // there shouldn't be any implicit bitmap -> icon conversion (i.e. no + // ctors, assignment operators...), but it's ok to have such function + void CopyFromBitmap(const wxBitmap& bmp); + +protected: + virtual wxGDIImageRefData *CreateData() const + { + return new wxIconRefData; + } + + virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; + + // create from XPM data + void CreateIconFromXpm(const char* const* data); + +private: + DECLARE_DYNAMIC_CLASS(wxIcon) +}; + +#endif + // _WX_ICON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/imaglist.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/imaglist.h new file mode 100644 index 0000000000..3f831f1832 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/imaglist.h @@ -0,0 +1,205 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/imaglist.h +// Purpose: wxImageList class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGLIST_H_ +#define _WX_IMAGLIST_H_ + +#include "wx/bitmap.h" + +// Eventually we'll make this a reference-counted wxGDIObject. For +// now, the app must take care of ownership issues. That is, the +// image lists must be explicitly deleted after the control(s) that uses them +// is (are) deleted, or when the app exits. +class WXDLLIMPEXP_CORE wxImageList : public wxObject +{ +public: + /* + * Public interface + */ + + wxImageList(); + + // Creates an image list. + // Specify the width and height of the images in the list, + // whether there are masks associated with them (e.g. if creating images + // from icons), and the initial size of the list. + wxImageList(int width, int height, bool mask = true, int initialCount = 1) + { + Create(width, height, mask, initialCount); + } + virtual ~wxImageList(); + + + // Attributes + //////////////////////////////////////////////////////////////////////////// + + // Returns the number of images in the image list. + int GetImageCount() const; + + // Returns the size (same for all images) of the images in the list + bool GetSize(int index, int &width, int &height) const; + + // Operations + //////////////////////////////////////////////////////////////////////////// + + // Creates an image list + // width, height specify the size of the images in the list (all the same). + // mask specifies whether the images have masks or not. + // initialNumber is the initial number of images to reserve. + bool Create(int width, int height, bool mask = true, int initialNumber = 1); + + // Adds a bitmap, and optionally a mask bitmap. + // Note that wxImageList creates *new* bitmaps, so you may delete + // 'bitmap' and 'mask' after calling Add. + int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); + + // Adds a bitmap, using the specified colour to create the mask bitmap + // Note that wxImageList creates *new* bitmaps, so you may delete + // 'bitmap' after calling Add. + int Add(const wxBitmap& bitmap, const wxColour& maskColour); + + // Adds a bitmap and mask from an icon. + int Add(const wxIcon& icon); + + // Replaces a bitmap, optionally passing a mask bitmap. + // Note that wxImageList creates new bitmaps, so you may delete + // 'bitmap' and 'mask' after calling Replace. + bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); + +/* Not supported by Win95 + // Replacing a bitmap, using the specified colour to create the mask bitmap + // Note that wxImageList creates new bitmaps, so you may delete + // 'bitmap'. + bool Replace(int index, const wxBitmap& bitmap, const wxColour& maskColour); +*/ + + // Replaces a bitmap and mask from an icon. + // You can delete 'icon' after calling Replace. + bool Replace(int index, const wxIcon& icon); + + // Removes the image at the given index. + bool Remove(int index); + + // Remove all images + bool RemoveAll(); + + // Draws the given image on a dc at the specified position. + // If 'solidBackground' is true, Draw sets the image list background + // colour to the background colour of the wxDC, to speed up + // drawing by eliminating masked drawing where possible. + bool Draw(int index, wxDC& dc, int x, int y, + int flags = wxIMAGELIST_DRAW_NORMAL, + bool solidBackground = false); + + // Get a bitmap + wxBitmap GetBitmap(int index) const; + + // Get an icon + wxIcon GetIcon(int index) const; + + // TODO: miscellaneous functionality +/* + wxIcon *MakeIcon(int index); + bool SetOverlayImage(int index, int overlayMask); + +*/ + + // TODO: Drag-and-drop related functionality. + +#if 0 + // Creates a new drag image by combining the given image (typically a mouse cursor image) + // with the current drag image. + bool SetDragCursorImage(int index, const wxPoint& hotSpot); + + // If successful, returns a pointer to the temporary image list that is used for dragging; + // otherwise, NULL. + // dragPos: receives the current drag position. + // hotSpot: receives the offset of the drag image relative to the drag position. + static wxImageList *GetDragImageList(wxPoint& dragPos, wxPoint& hotSpot); + + // Call this function to begin dragging an image. This function creates a temporary image list + // that is used for dragging. The image combines the specified image and its mask with the + // current cursor. In response to subsequent mouse move messages, you can move the drag image + // by using the DragMove member function. To end the drag operation, you can use the EndDrag + // member function. + bool BeginDrag(int index, const wxPoint& hotSpot); + + // Ends a drag operation. + bool EndDrag(); + + // Call this function to move the image that is being dragged during a drag-and-drop operation. + // This function is typically called in response to a mouse move message. To begin a drag + // operation, use the BeginDrag member function. + static bool DragMove(const wxPoint& point); + + // During a drag operation, locks updates to the window specified by lockWindow and displays + // the drag image at the position specified by point. + // The coordinates are relative to the window's upper left corner, so you must compensate + // for the widths of window elements, such as the border, title bar, and menu bar, when + // specifying the coordinates. + // If lockWindow is NULL, this function draws the image in the display context associated + // with the desktop window, and coordinates are relative to the upper left corner of the screen. + // This function locks all other updates to the given window during the drag operation. + // If you need to do any drawing during a drag operation, such as highlighting the target + // of a drag-and-drop operation, you can temporarily hide the dragged image by using the + // wxImageList::DragLeave function. + + // lockWindow: pointer to the window that owns the drag image. + // point: position at which to display the drag image. Coordinates are relative to the + // upper left corner of the window (not the client area). + + static bool DragEnter( wxWindow *lockWindow, const wxPoint& point ); + + // Unlocks the window specified by pWndLock and hides the drag image, allowing the + // window to be updated. + static bool DragLeave( wxWindow *lockWindow ); + + /* Here's roughly how you'd use these functions if implemented in this Win95-like way: + + 1) Starting to drag: + + wxImageList *dragImageList = new wxImageList(16, 16, true); + dragImageList->Add(myDragImage); // Provide an image to combine with the current cursor + dragImageList->BeginDrag(0, wxPoint(0, 0)); + wxShowCursor(false); // wxShowCursor not yet implemented in wxWin + myWindow->CaptureMouse(); + + 2) Dragging: + + // Called within mouse move event. Could also use dragImageList instead of assuming + // these are static functions. + // These two functions could possibly be combined into one, since DragEnter is + // a bit obscure. + wxImageList::DragMove(wxPoint(x, y)); // x, y are current cursor position + wxImageList::DragEnter(NULL, wxPoint(x, y)); // NULL assumes dragging across whole screen + + 3) Finishing dragging: + + dragImageList->EndDrag(); + myWindow->ReleaseMouse(); + wxShowCursor(true); +*/ + +#endif + + // Implementation + //////////////////////////////////////////////////////////////////////////// + + // Returns the native image list handle + WXHIMAGELIST GetHIMAGELIST() const { return m_hImageList; } + +protected: + WXHIMAGELIST m_hImageList; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxImageList) +}; + +#endif + // _WX_IMAGLIST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/iniconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/iniconf.h new file mode 100644 index 0000000000..63ebd00141 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/iniconf.h @@ -0,0 +1,105 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/iniconf.h +// Purpose: INI-file based wxConfigBase implementation +// Author: Vadim Zeitlin +// Modified by: +// Created: 27.07.98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_INICONF_H_ +#define _WX_MSW_INICONF_H_ + +#include "wx/defs.h" + +#if wxUSE_CONFIG && wxUSE_INICONF + +// ---------------------------------------------------------------------------- +// wxIniConfig is a wxConfig implementation which uses MS Windows INI files to +// store the data. Because INI files don't really support arbitrary nesting of +// groups, we do the following: +// (1) in win.ini file we store all entries in the [vendor] section and +// the value group1/group2/key is mapped to the value group1_group2_key +// in this section, i.e. all path separators are replaced with underscore +// (2) in appname.ini file we map group1/group2/group3/key to the entry +// group2_group3_key in [group1] +// +// Of course, it might lead to indesirable results if '_' is also used in key +// names (i.e. group/key is the same as group_key) and also GetPath() result +// may be not what you would expect it to be. +// +// Another limitation: the keys and section names are never case-sensitive +// which might differ from wxFileConfig it it was compiled with +// wxCONFIG_CASE_SENSITIVE option. +// ---------------------------------------------------------------------------- + +// for this class, "local" file is the file appname.ini and the global file +// is the [vendor] subsection of win.ini (default for "vendor" is to be the +// same as appname). The file name (strAppName parameter) may, in fact, +// contain the full path to the file. If it doesn't, the file is searched for +// in the Windows directory. +class WXDLLIMPEXP_CORE wxIniConfig : public wxConfigBase +{ +public: + // ctor & dtor + // if strAppName doesn't contain the extension and is not an absolute path, + // ".ini" is appended to it. if strVendor is empty, it's taken to be the + // same as strAppName. + wxIniConfig(const wxString& strAppName = wxEmptyString, const wxString& strVendor = wxEmptyString, + const wxString& localFilename = wxEmptyString, const wxString& globalFilename = wxEmptyString, long style = wxCONFIG_USE_LOCAL_FILE); + virtual ~wxIniConfig(); + + // implement inherited pure virtual functions + virtual void SetPath(const wxString& strPath); + virtual const wxString& GetPath() const; + + virtual bool GetFirstGroup(wxString& str, long& lIndex) const; + virtual bool GetNextGroup (wxString& str, long& lIndex) const; + virtual bool GetFirstEntry(wxString& str, long& lIndex) const; + virtual bool GetNextEntry (wxString& str, long& lIndex) const; + + virtual size_t GetNumberOfEntries(bool bRecursive = false) const; + virtual size_t GetNumberOfGroups(bool bRecursive = false) const; + + virtual bool HasGroup(const wxString& strName) const; + virtual bool HasEntry(const wxString& strName) const; + + // return true if the current group is empty + bool IsEmpty() const; + + virtual bool Flush(bool bCurrentOnly = false); + + virtual bool RenameEntry(const wxString& oldName, const wxString& newName); + virtual bool RenameGroup(const wxString& oldName, const wxString& newName); + + virtual bool DeleteEntry(const wxString& Key, bool bGroupIfEmptyAlso = true); + virtual bool DeleteGroup(const wxString& szKey); + virtual bool DeleteAll(); + +protected: + // read/write + bool DoReadString(const wxString& key, wxString *pStr) const; + bool DoReadLong(const wxString& key, long *plResult) const; + bool DoReadBinary(const wxString& key, wxMemoryBuffer *buf) const; + + bool DoWriteString(const wxString& key, const wxString& szValue); + bool DoWriteLong(const wxString& key, long lValue); + bool DoWriteBinary(const wxString& key, const wxMemoryBuffer& buf); + +private: + // helpers + wxString GetPrivateKeyName(const wxString& szKey) const; + wxString GetKeyName(const wxString& szKey) const; + + wxString m_strLocalFilename; // name of the private INI file + wxString m_strGroup, // current group in appname.ini file + m_strPath; // the rest of the path (no trailing '_'!) + + wxDECLARE_NO_COPY_CLASS(wxIniConfig); + DECLARE_ABSTRACT_CLASS(wxIniConfig) +}; + +#endif // wxUSE_CONFIG && wxUSE_INICONF + +#endif // _WX_MSW_INICONF_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/init.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/init.h new file mode 100644 index 0000000000..014dedbd09 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/init.h @@ -0,0 +1,90 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/init.h +// Purpose: Windows-specific wxEntry() overload +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_INIT_H_ +#define _WX_MSW_INIT_H_ + +// ---------------------------------------------------------------------------- +// Windows-specific wxEntry() overload and wxIMPLEMENT_WXWIN_MAIN definition +// ---------------------------------------------------------------------------- + +// we need HINSTANCE declaration to define WinMain() +#include "wx/msw/wrapwin.h" + +#ifndef SW_SHOWNORMAL + #define SW_SHOWNORMAL 1 +#endif + +// WinMain() is always ANSI, even in Unicode build, under normal Windows +// but is always Unicode under CE +#ifdef __WXWINCE__ + typedef wchar_t *wxCmdLineArgType; +#else + typedef char *wxCmdLineArgType; +#endif + +// Windows-only overloads of wxEntry() and wxEntryStart() which take the +// parameters passed to WinMain() instead of those passed to main() +extern WXDLLIMPEXP_CORE bool + wxEntryStart(HINSTANCE hInstance, + HINSTANCE hPrevInstance = NULL, + wxCmdLineArgType pCmdLine = NULL, + int nCmdShow = SW_SHOWNORMAL); + +extern WXDLLIMPEXP_CORE int + wxEntry(HINSTANCE hInstance, + HINSTANCE hPrevInstance = NULL, + wxCmdLineArgType pCmdLine = NULL, + int nCmdShow = SW_SHOWNORMAL); + +#if defined(__BORLANDC__) && wxUSE_UNICODE + // Borland C++ has the following nonstandard behaviour: when the -WU + // command line flag is used, the linker expects to find wWinMain instead + // of WinMain. This flag causes the compiler to define _UNICODE and + // UNICODE symbols and there's no way to detect its use, so we have to + // define both WinMain and wWinMain so that wxIMPLEMENT_WXWIN_MAIN works + // for both code compiled with and without -WU. + // See http://sourceforge.net/tracker/?func=detail&atid=309863&aid=1935997&group_id=9863 + // for more details. + #define wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD \ + extern "C" int WINAPI wWinMain(HINSTANCE hInstance, \ + HINSTANCE hPrevInstance, \ + wchar_t * WXUNUSED(lpCmdLine), \ + int nCmdShow) \ + { \ + wxDISABLE_DEBUG_SUPPORT(); \ + \ + /* NB: wxEntry expects lpCmdLine argument to be char*, not */ \ + /* wchar_t*, but fortunately it's not used anywhere */ \ + /* and we can simply pass NULL in: */ \ + return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \ + } +#else + #define wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD +#endif // defined(__BORLANDC__) && wxUSE_UNICODE + +#define wxIMPLEMENT_WXWIN_MAIN \ + extern "C" int WINAPI WinMain(HINSTANCE hInstance, \ + HINSTANCE hPrevInstance, \ + wxCmdLineArgType WXUNUSED(lpCmdLine), \ + int nCmdShow) \ + { \ + wxDISABLE_DEBUG_SUPPORT(); \ + \ + /* NB: We pass NULL in place of lpCmdLine to behave the same as */ \ + /* Borland-specific wWinMain() above. If it becomes needed */ \ + /* to pass lpCmdLine to wxEntry() here, you'll have to fix */ \ + /* wWinMain() above too. */ \ + return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \ + } \ + wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD + + +#endif // _WX_MSW_INIT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/joystick.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/joystick.h new file mode 100644 index 0000000000..b3f5e57105 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/joystick.h @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/joystick.h +// Purpose: wxJoystick class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_JOYSTICK_H_ +#define _WX_JOYSTICK_H_ + +#include "wx/event.h" + +class WXDLLIMPEXP_ADV wxJoystick: public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxJoystick) + public: + /* + * Public interface + */ + + wxJoystick(int joystick = wxJOYSTICK1); + + // Attributes + //////////////////////////////////////////////////////////////////////////// + + wxPoint GetPosition(void) const; + int GetPosition(unsigned axis) const; + bool GetButtonState(unsigned button) 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 + //////////////////////////////////////////////////////////////////////////// + + static int GetNumberJoysticks(void); + + bool IsOk(void) const; // Checks that the joystick is functioning + 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 + // _WX_JOYSTICK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/libraries.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/libraries.h new file mode 100644 index 0000000000..86e47195d1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/libraries.h @@ -0,0 +1,26 @@ +/* + * Name: wx/msw/libraries.h + * Purpose: Pragmas for linking libs conditionally + * Author: Michael Wetherell + * Modified by: + * Copyright: (c) 2005 Michael Wetherell + * Licence: wxWindows licence + */ + +#ifndef _WX_MSW_LIBRARIES_H_ +#define _WX_MSW_LIBRARIES_H_ + +/* + * Notes: + * + * In general the preferred place to add libs is in the bakefiles. This file + * can be used where libs must be added conditionally, for those compilers that + * support a way to do that. + */ + +/* VC++ 5 didn't include oleacc.lib, though it came with the PSDK */ +#if defined __VISUALC__ && (wxUSE_ACCESSIBILITY || __VISUALC__ >= 1200) +#pragma comment(lib, "oleacc") +#endif + +#endif /* _WX_MSW_LIBRARIES_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/listbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/listbox.h new file mode 100644 index 0000000000..8d8bd01a87 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/listbox.h @@ -0,0 +1,201 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/listbox.h +// Purpose: wxListBox class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LISTBOX_H_ +#define _WX_LISTBOX_H_ + +#if wxUSE_LISTBOX + +// ---------------------------------------------------------------------------- +// simple types +// ---------------------------------------------------------------------------- + +#if wxUSE_OWNER_DRAWN + class WXDLLIMPEXP_FWD_CORE wxOwnerDrawn; + + // define the array of list box items + #include "wx/dynarray.h" + + WX_DEFINE_EXPORTED_ARRAY_PTR(wxOwnerDrawn *, wxListBoxItemsArray); +#endif // wxUSE_OWNER_DRAWN + +// forward decl for GetSelections() +class WXDLLIMPEXP_FWD_BASE wxArrayInt; + +// ---------------------------------------------------------------------------- +// List box control +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase +{ +public: + // ctors and such + wxListBox() { Init(); } + wxListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Init(); + + Create(parent, id, pos, size, n, choices, style, validator, name); + } + wxListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Init(); + + Create(parent, id, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + virtual ~wxListBox(); + + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + virtual int FindString(const wxString& s, bool bCase = false) const; + + virtual bool IsSelected(int n) const; + virtual int GetSelection() const; + virtual int GetSelections(wxArrayInt& aSelections) const; + + // return the index of the item at this position or wxNOT_FOUND + int HitTest(const wxPoint& pt) const { return DoHitTestList(pt); } + int HitTest(wxCoord x, wxCoord y) const { return DoHitTestList(wxPoint(x, y)); } + + // ownerdrawn wxListBox and wxCheckListBox support +#if wxUSE_OWNER_DRAWN + // override base class virtuals + virtual bool SetFont(const wxFont &font); + + bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item); + bool MSWOnDraw(WXDRAWITEMSTRUCT *item); + + // plug-in for derived classes + virtual wxOwnerDrawn *CreateLboxItem(size_t n); + + // allows to get the item and use SetXXX functions to set it's appearance + wxOwnerDrawn *GetItem(size_t n) const { return m_aItems[n]; } + + // get the index of the given item + int GetItemIndex(wxOwnerDrawn *item) const { return m_aItems.Index(item); } + + // get rect of the given item index + bool GetItemRect(size_t n, wxRect& rect) const; + + // redraw the given item + bool RefreshItem(size_t n); +#endif // wxUSE_OWNER_DRAWN + + // Windows-specific code to update the horizontal extent of the listbox, if + // necessary. If s is non-empty, the horizontal extent is increased to the + // length of this string if it's currently too short, otherwise the maximum + // extent of all strings is used. In any case calls InvalidateBestSize() + virtual void SetHorizontalExtent(const wxString& s = wxEmptyString); + + // Windows callbacks + bool MSWCommand(WXUINT param, WXWORD id); + WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + // under XP when using "transition effect for menus and tooltips" if we + // return true for WM_PRINTCLIENT here then it causes noticable slowdown + virtual bool MSWShouldPropagatePrintChild() + { + return false; + } + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL) + { + return GetCompositeControlsDefaultAttributes(variant); + } + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + + virtual void OnInternalIdle(); + +protected: + virtual wxSize DoGetBestClientSize() const; + + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + + virtual void DoSetSelection(int n, bool select); + + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void DoSetFirstItem(int n); + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + + // this can't be called DoHitTest() because wxWindow already has this method + virtual int DoHitTestList(const wxPoint& point) const; + + // free memory (common part of Clear() and dtor) + void Free(); + + unsigned int m_noItems; + +#if wxUSE_OWNER_DRAWN + // control items + wxListBoxItemsArray m_aItems; +#endif + +private: + // common part of all ctors + void Init(); + + // call this when items are added to or deleted from the listbox or an + // items text changes + void MSWOnItemsChanged(); + + // flag indicating whether the max horizontal extent should be updated, + // i.e. if we need to call SetHorizontalExtent() from OnInternalIdle() + bool m_updateHorizontalExtent; + + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxListBox) +}; + +#endif // wxUSE_LISTBOX + +#endif + // _WX_LISTBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/listctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/listctrl.h new file mode 100644 index 0000000000..e3f0a7d1df --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/listctrl.h @@ -0,0 +1,471 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/listctrl.h +// Purpose: wxListCtrl class +// Author: Julian Smart +// Modified by: Agron Selimaj +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LISTCTRL_H_ +#define _WX_LISTCTRL_H_ + +#include "wx/textctrl.h" +#include "wx/dynarray.h" +#include "wx/vector.h" + +class wxMSWListItemData; + +// define this symbol to indicate the availability of SetColumnsOrder() and +// related functions +#define wxHAS_LISTCTRL_COLUMN_ORDER + +/* + The wxListCtrl can show lists of items in four different modes: + wxLC_LIST: multicolumn list view, with optional small icons (icons could be + optional for some platforms). Columns are computed automatically, + i.e. you don't set columns as in wxLC_REPORT. In other words, + the list wraps, unlike a wxListBox. + wxLC_REPORT: single or multicolumn report view (with optional header) + wxLC_ICON: large icon view, with optional labels + wxLC_SMALL_ICON: small icon view, with optional labels + + You can change the style dynamically, either with SetSingleStyle or + SetWindowStyleFlag. + + Further window styles: + + wxLC_ALIGN_TOP icons align to the top (default) + wxLC_ALIGN_LEFT icons align to the left + wxLC_AUTOARRANGE icons arrange themselves + wxLC_USER_TEXT the app provides label text on demand, except for column headers + wxLC_EDIT_LABELS labels are editable: app will be notified. + wxLC_NO_HEADER no header in report mode + wxLC_NO_SORT_HEADER can't click on header + wxLC_SINGLE_SEL single selection + wxLC_SORT_ASCENDING sort ascending (must still supply a comparison callback in SortItems) + wxLC_SORT_DESCENDING sort descending (ditto) + + Items are referred to by their index (position in the list starting from zero). + + Label text is supplied via insertion/setting functions and is stored by the + control, unless the wxLC_USER_TEXT style has been specified, in which case + the app will be notified when text is required (see sample). + + Images are dealt with by (optionally) associating 3 image lists with the control. + Zero-based indexes into these image lists indicate which image is to be used for + which item. Each image in an image list can contain a mask, and can be made out + of either a bitmap, two bitmaps or an icon. See ImagList.h for more details. + + Notifications are passed via the wxWidgets 2.0 event system, or using virtual + functions in wxWidgets 1.66. + + See the sample wxListCtrl app for API usage. + + TODO: + - addition of further convenience functions + to avoid use of wxListItem in some functions + - state/overlay images: probably not needed. + - in Win95, you can be called back to supply other information + besides text, such as state information. This saves no memory + and is probably superfluous to requirements. + - testing of whole API, extending current sample. + + + */ + +class WXDLLIMPEXP_CORE wxListCtrl: public wxListCtrlBase +{ +public: + /* + * Public interface + */ + + wxListCtrl() { Init(); } + + wxListCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLC_ICON, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListCtrlNameStr) + { + Init(); + + Create(parent, id, pos, size, style, validator, name); + } + + virtual ~wxListCtrl(); + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLC_ICON, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListCtrlNameStr); + + + // Attributes + //////////////////////////////////////////////////////////////////////////// + + // Set the control colours + bool SetForegroundColour(const wxColour& col); + bool SetBackgroundColour(const wxColour& col); + + // Gets information about this column + bool GetColumn(int col, wxListItem& item) const; + + // Sets information about this column + bool SetColumn(int col, const wxListItem& item); + + // Gets the column width + int GetColumnWidth(int col) const; + + // Sets the column width + bool SetColumnWidth(int col, int width); + + + // Gets the column order from its index or index from its order + int GetColumnOrder(int col) const; + int GetColumnIndexFromOrder(int order) const; + + // Gets the column order for all columns + wxArrayInt GetColumnsOrder() const; + + // Sets the column order for all columns + bool SetColumnsOrder(const wxArrayInt& orders); + + + // Gets the number of items that can fit vertically in the + // visible area of the list control (list or report view) + // or the total number of items in the list control (icon + // or small icon view) + int GetCountPerPage() const; + + // return the total area occupied by all the items (icon/small icon only) + wxRect GetViewRect() const; + + // Gets the edit control for editing labels. + wxTextCtrl* GetEditControl() const; + + // Gets information about the item + bool GetItem(wxListItem& info) const; + + // Sets information about the item + bool SetItem(wxListItem& info); + + // Sets a string field at a particular column + long SetItem(long index, int col, const wxString& label, int imageId = -1); + + // Gets the item state + int GetItemState(long item, long stateMask) const; + + // Sets the item state + bool SetItemState(long item, long state, long stateMask); + + // Sets the item image + bool SetItemImage(long item, int image, int selImage = -1); + bool SetItemColumnImage(long item, long column, int image); + + // Gets the item text + wxString GetItemText(long item, int col = 0) const; + + // Sets the item text + void SetItemText(long item, const wxString& str); + + // Gets the item data + wxUIntPtr GetItemData(long item) const; + + // Sets the item data + bool SetItemPtrData(long item, wxUIntPtr data); + bool SetItemData(long item, long data) { return SetItemPtrData(item, data); } + + // Gets the item rectangle + bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const; + + // Gets the subitem rectangle in report mode + bool GetSubItemRect(long item, long subItem, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const; + + // Gets the item position + bool GetItemPosition(long item, wxPoint& pos) const; + + // Sets the item position + bool SetItemPosition(long item, const wxPoint& pos); + + // Gets the number of items in the list control + int GetItemCount() const; + + // Gets the number of columns in the list control + int GetColumnCount() const { return m_colCount; } + + // get the horizontal and vertical components of the item spacing + wxSize GetItemSpacing() const; + + // Foreground colour of an item. + void SetItemTextColour( long item, const wxColour& col); + wxColour GetItemTextColour( long item ) const; + + // Background colour of an item. + void SetItemBackgroundColour( long item, const wxColour &col); + wxColour GetItemBackgroundColour( long item ) const; + + // Font of an item. + void SetItemFont( long item, const wxFont &f); + wxFont GetItemFont( long item ) const; + + // Gets the number of selected items in the list control + int GetSelectedItemCount() const; + + // Gets the text colour of the listview + wxColour GetTextColour() const; + + // Sets the text colour of the listview + void SetTextColour(const wxColour& col); + + // Gets the index of the topmost visible item when in + // list or report view + long GetTopItem() const; + + // Add or remove a single window style + void SetSingleStyle(long style, bool add = true); + + // Set the whole window style + void SetWindowStyleFlag(long style); + + // Searches for an item, starting from 'item'. + // item can be -1 to find the first item that matches the + // specified flags. + // Returns the item or -1 if unsuccessful. + long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const; + + // Gets one of the three image lists + wxImageList *GetImageList(int which) const; + + // Sets the image list + // N.B. There's a quirk in the Win95 list view implementation. + // If in wxLC_LIST mode, it'll *still* display images by the labels if + // there's a small-icon image list set for the control - even though you + // haven't specified wxLIST_MASK_IMAGE when inserting. + // So you have to set a NULL small-icon image list to be sure that + // the wxLC_LIST mode works without icons. Of course, you may want icons... + void SetImageList(wxImageList *imageList, int which); + void AssignImageList(wxImageList *imageList, int which); + + // refresh items selectively (only useful for virtual list controls) + void RefreshItem(long item); + void RefreshItems(long itemFrom, long itemTo); + + // Operations + //////////////////////////////////////////////////////////////////////////// + + // Arranges the items + bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); + + // Deletes an item + bool DeleteItem(long item); + + // Deletes all items + bool DeleteAllItems(); + + // Deletes a column + bool DeleteColumn(int col); + + // Deletes all columns + bool DeleteAllColumns(); + + // Clears items, and columns if there are any. + void ClearAll(); + + // Edit the label + wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl)); + + // End label editing, optionally cancelling the edit + bool EndEditLabel(bool cancel); + + // Ensures this item is visible + bool EnsureVisible(long item); + + // Find an item whose label matches this string, starting from the item after 'start' + // or the beginning if 'start' is -1. + long FindItem(long start, const wxString& str, bool partial = false); + + // Find an item whose data matches this data, starting from the item after 'start' + // or the beginning if 'start' is -1. + long FindItem(long start, wxUIntPtr data); + + // Find an item nearest this position in the specified direction, starting from + // the item after 'start' or the beginning if 'start' is -1. + long FindItem(long start, const wxPoint& pt, int direction); + + // Determines which item (if any) is at the specified point, + // giving details in 'flags' (see wxLIST_HITTEST_... flags above) + // Request the subitem number as well at the given coordinate. + long HitTest(const wxPoint& point, int& flags, long* ptrSubItem = NULL) const; + + // Inserts an item, returning the index of the new item if successful, + // -1 otherwise. + long InsertItem(const wxListItem& info); + + // Insert a string item + long InsertItem(long index, const wxString& label); + + // Insert an image item + long InsertItem(long index, int imageIndex); + + // Insert an image/string item + long InsertItem(long index, const wxString& label, int imageIndex); + + // set the number of items in a virtual list control + void SetItemCount(long count); + + // Scrolls the list control. If in icon, small icon or report view mode, + // x specifies the number of pixels to scroll. If in list view mode, x + // specifies the number of columns to scroll. + // If in icon, small icon or list view mode, y specifies the number of pixels + // to scroll. If in report view mode, y specifies the number of lines to scroll. + bool ScrollList(int dx, int dy); + + // Sort items. + + // fn is a function which takes 3 long arguments: item1, item2, data. + // item1 is the long data associated with a first item (NOT the index). + // item2 is the long data associated with a second item (NOT the index). + // data is the same value as passed to SortItems. + // The return value is a negative number if the first item should precede the second + // item, a positive number of the second item should precede the first, + // or zero if the two items are equivalent. + + // data is arbitrary data to be passed to the sort function. + bool SortItems(wxListCtrlCompare fn, wxIntPtr data); + + // IMPLEMENTATION + virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + virtual bool MSWShouldPreProcessMessage(WXMSG* msg); + + // bring the control in sync with current m_windowStyle value + void UpdateStyle(); + + // Event handlers + //////////////////////////////////////////////////////////////////////////// + // Necessary for drawing hrules and vrules, if specified + void OnPaint(wxPaintEvent& event); + + + virtual bool ShouldInheritColours() const { return false; } + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + +#if WXWIN_COMPATIBILITY_2_6 + // obsolete stuff, for compatibility only -- don't use + wxDEPRECATED( int GetItemSpacing(bool isSmall) const); +#endif // WXWIN_COMPATIBILITY_2_6 + + // convert our styles to Windows + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + // special Windows message handling + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, + WXWPARAM wParam, + WXLPARAM lParam); + +protected: + // common part of all ctors + void Init(); + + // Implement constrained best size calculation. + virtual int DoGetBestClientHeight(int width) const + { return MSWGetBestViewRect(width, -1).y; } + virtual int DoGetBestClientWidth(int height) const + { return MSWGetBestViewRect(-1, height).x; } + + wxSize MSWGetBestViewRect(int x, int y) const; + + // Implement base class pure virtual methods. + long DoInsertColumn(long col, const wxListItem& info); + + // free memory taken by all internal data + void FreeAllInternalData(); + + // get the internal data object for this item (may return NULL) + wxMSWListItemData *MSWGetItemData(long item) const; + + // get the item attribute, either by quering it for virtual control, or by + // returning the one previously set using setter methods for a normal one + wxListItemAttr *DoGetItemColumnAttr(long item, long column) const; + + + wxTextCtrl* m_textCtrl; // The control used for editing a label + wxImageList * m_imageListNormal; // The image list for normal icons + wxImageList * m_imageListSmall; // The image list for small icons + wxImageList * m_imageListState; // The image list state icons (not implemented yet) + bool m_ownsImageListNormal, + m_ownsImageListSmall, + m_ownsImageListState; + + int m_colCount; // Windows doesn't have GetColumnCount so must + // keep track of inserted/deleted columns + long m_count; // Keep track of item count to save calls to + // ListView_GetItemCount + + // all wxMSWListItemData objects we use + wxVector<wxMSWListItemData *> m_internalData; + + // true if we have any items with custom attributes + bool m_hasAnyAttr; + + // these functions are only used for virtual list view controls, i.e. the + // ones with wxLC_VIRTUAL style + + // return the text for the given column of the given item + virtual wxString OnGetItemText(long item, long column) const; + + // return the icon for the given item. In report view, OnGetItemImage will + // only be called for the first column. See OnGetItemColumnImage for + // details. + virtual int OnGetItemImage(long item) const; + + // return the icon for the given item and column. + virtual int OnGetItemColumnImage(long item, long column) const; + + // return the attribute for the given item and column (may return NULL if none) + virtual wxListItemAttr *OnGetItemColumnAttr(long item, long WXUNUSED(column)) const + { + return OnGetItemAttr(item); + } + +private: + // process NM_CUSTOMDRAW notification message + WXLPARAM OnCustomDraw(WXLPARAM lParam); + + // set the extended styles for the control (used by Create() and + // UpdateStyle()), only should be called if InReportView() + void MSWSetExListStyles(); + + // initialize the (already created) m_textCtrl with the associated HWND + void InitEditControl(WXHWND hWnd); + + // destroy m_textCtrl if it's currently valid and reset it to NULL + void DeleteEditControl(); + + // Intercept Escape and Enter keys to avoid them being stolen from our + // in-place editor control. + void OnCharHook(wxKeyEvent& event); + + + DECLARE_DYNAMIC_CLASS(wxListCtrl) + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxListCtrl); +}; + +#endif // _WX_LISTCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/magnif1.cur b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/magnif1.cur new file mode 100644 index 0000000000..15d1a77a49 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/magnif1.cur differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mdi.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mdi.h new file mode 100644 index 0000000000..a699a3125c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mdi.h @@ -0,0 +1,265 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/mdi.h +// Purpose: MDI (Multiple Document Interface) classes +// Author: Julian Smart +// Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes +// Created: 01/02/97 +// Copyright: (c) 1997 Julian Smart +// (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_MDI_H_ +#define _WX_MSW_MDI_H_ + +#include "wx/frame.h" + +class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable; + +// --------------------------------------------------------------------------- +// wxMDIParentFrame +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIParentFrame : public wxMDIParentFrameBase +{ +public: + wxMDIParentFrame() { Init(); } + wxMDIParentFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + virtual ~wxMDIParentFrame(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr); + + // override/implement base class [pure] virtual methods + // ---------------------------------------------------- + + static bool IsTDI() { return false; } + + // we don't store the active child in m_currentChild so override this + // function to find it dynamically + virtual wxMDIChildFrame *GetActiveChild() const; + + virtual void Cascade(); + virtual void Tile(wxOrientation orient = wxHORIZONTAL); + virtual void ArrangeIcons(); + virtual void ActivateNext(); + virtual void ActivatePrevious(); + +#if wxUSE_MENUS + virtual void SetWindowMenu(wxMenu* menu); + + virtual void DoMenuUpdates(wxMenu* menu = NULL); + + // return the active child menu, if any + virtual WXHMENU MSWGetActiveMenu() const; +#endif // wxUSE_MENUS + + + // implementation only from now on + + // MDI helpers + // ----------- + +#if wxUSE_MENUS + // called by wxMDIChildFrame after it was successfully created + virtual void AddMDIChild(wxMDIChildFrame *child); + + // called by wxMDIChildFrame just before it is destroyed + virtual void RemoveMDIChild(wxMDIChildFrame *child); +#endif // wxUSE_MENUS + + // handlers + // -------- + + // Responds to colour changes + void OnSysColourChanged(wxSysColourChangedEvent& event); + + void OnSize(wxSizeEvent& event); + void OnIconized(wxIconizeEvent& event); + + bool HandleActivate(int state, bool minimized, WXHWND activate); + + // override window proc for MDI-specific message processing + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + + virtual WXLRESULT MSWDefWindowProc(WXUINT, WXWPARAM, WXLPARAM); + virtual bool MSWTranslateMessage(WXMSG* msg); + +#if wxUSE_MENUS + // override wxFrameBase function to also look in the active child menu bar + // and the "Window" menu + virtual wxMenuItem *FindItemInMenuBar(int menuId) const; +#endif // wxUSE_MENUS + +protected: +#if wxUSE_MENUS_NATIVE + virtual void InternalSetMenuBar(); +#endif // wxUSE_MENUS_NATIVE + + virtual WXHICON GetDefaultIcon() const; + + // set the size of the MDI client window to match the frame size + void UpdateClientSize(); + +private: + // common part of all ctors + void Init(); + +#if wxUSE_MENUS + // "Window" menu commands event handlers + void OnMDICommand(wxCommandEvent& event); + void OnMDIChild(wxCommandEvent& event); + + + // add/remove window menu if we have it (i.e. m_windowMenu != NULL) + void AddWindowMenu(); + void RemoveWindowMenu(); + + // update the window menu (if we have it) to enable or disable the commands + // which only make sense when we have more than one child + void UpdateWindowMenu(bool enable); + +#if wxUSE_ACCEL + wxAcceleratorTable *m_accelWindowMenu; +#endif // wxUSE_ACCEL +#endif // wxUSE_MENUS + + // return the number of child frames we currently have (maybe 0) + int GetChildFramesCount() const; + + + friend class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) + wxDECLARE_NO_COPY_CLASS(wxMDIParentFrame); +}; + +// --------------------------------------------------------------------------- +// wxMDIChildFrame +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIChildFrame : public wxMDIChildFrameBase +{ +public: + wxMDIChildFrame() { Init(); } + wxMDIChildFrame(wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxMDIChildFrame(); + + // implement MDI operations + virtual void Activate(); + + // Override some frame operations too + virtual void Maximize(bool maximize = true); + virtual void Restore(); + + virtual bool Show(bool show = true); + + // Implementation only from now on + // ------------------------------- + + // Handlers + bool HandleMDIActivate(long bActivate, WXHWND, WXHWND); + bool HandleWindowPosChanging(void *lpPos); + bool HandleGetMinMaxInfo(void *mmInfo); + + virtual WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + virtual WXLRESULT MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + virtual bool MSWTranslateMessage(WXMSG *msg); + + virtual void MSWDestroyWindow(); + + bool ResetWindowStyle(void *vrect); + + void OnIdle(wxIdleEvent& event); + +protected: + virtual void DoGetScreenPosition(int *x, int *y) const; + virtual void DoGetPosition(int *x, int *y) const; + virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); + virtual void DoSetClientSize(int width, int height); + virtual void InternalSetMenuBar(); + virtual bool IsMDIChild() const { return true; } + virtual void DetachMenuBar(); + + virtual WXHICON GetDefaultIcon() const; + + // common part of all ctors + void Init(); + +private: + bool m_needsInitialShow; // Show must be called in idle time after Creation + bool m_needsResize; // flag which tells us to artificially resize the frame + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMDIChildFrame) +}; + +// --------------------------------------------------------------------------- +// wxMDIClientWindow +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMDIClientWindow : public wxMDIClientWindowBase +{ +public: + wxMDIClientWindow() { Init(); } + + // Note: this is virtual, to allow overridden behaviour. + virtual bool CreateClient(wxMDIParentFrame *parent, + long style = wxVSCROLL | wxHSCROLL); + + // Explicitly call default scroll behaviour + void OnScroll(wxScrollEvent& event); + +protected: + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + void Init() { m_scrollX = m_scrollY = 0; } + + int m_scrollX, m_scrollY; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMDIClientWindow) +}; + +#endif // _WX_MSW_MDI_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mdi.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mdi.ico new file mode 100644 index 0000000000..435cca2471 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mdi.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/menu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/menu.h new file mode 100644 index 0000000000..5f4c9f1853 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/menu.h @@ -0,0 +1,261 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/menu.h +// Purpose: wxMenu, wxMenuBar classes +// Author: Julian Smart +// Modified by: Vadim Zeitlin (wxMenuItem is now in separate file) +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MENU_H_ +#define _WX_MENU_H_ + +#if wxUSE_ACCEL + #include "wx/accel.h" + #include "wx/dynarray.h" + + WX_DEFINE_EXPORTED_ARRAY_PTR(wxAcceleratorEntry *, wxAcceleratorArray); +#endif // wxUSE_ACCEL + +class WXDLLIMPEXP_FWD_CORE wxFrame; + +#if defined(__WXWINCE__) && wxUSE_TOOLBAR +class WXDLLIMPEXP_FWD_CORE wxToolBar; +#endif + +class wxMenuRadioItemsData; + +// Not using a combined wxToolBar/wxMenuBar? then use +// a commandbar in WinCE .NET to implement the +// menubar, since there is no ::SetMenu function. +#if defined(__WXWINCE__) +# if ((_WIN32_WCE >= 400) && !defined(__POCKETPC__) && !defined(__SMARTPHONE__)) || \ + defined(__HANDHELDPC__) +# define WINCE_WITH_COMMANDBAR +# else +# define WINCE_WITHOUT_COMMANDBAR +# endif +#endif + + +#include "wx/arrstr.h" + +// ---------------------------------------------------------------------------- +// Menu +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase +{ +public: + // ctors & dtor + wxMenu(const wxString& title, long style = 0) + : wxMenuBase(title, style) { Init(); } + + wxMenu(long style = 0) : wxMenuBase(style) { Init(); } + + virtual ~wxMenu(); + + virtual void Break(); + + virtual void SetTitle(const wxString& title); + + // MSW-only methods + // ---------------- + + // Create a new menu from the given native HMENU. Takes ownership of the + // menu handle and will delete it when this object is destroyed. + static wxMenu *MSWNewFromHMENU(WXHMENU hMenu) { return new wxMenu(hMenu); } + + + // implementation only from now on + // ------------------------------- + + bool MSWCommand(WXUINT param, WXWORD id); + + // get the native menu handle + WXHMENU GetHMenu() const { return m_hMenu; } + + // Return the start and end position of the radio group to which the item + // at the given position belongs. Returns false if there is no radio group + // containing this position. + bool MSWGetRadioGroupRange(int pos, int *start, int *end) const; + +#if wxUSE_ACCEL + // called by wxMenuBar to build its accel table from the accels of all menus + bool HasAccels() const { return !m_accels.empty(); } + size_t GetAccelCount() const { return m_accels.size(); } + size_t CopyAccels(wxAcceleratorEntry *accels) const; + + // called by wxMenuItem when its accels changes + void UpdateAccel(wxMenuItem *item); + + // helper used by wxMenu itself (returns the index in m_accels) + int FindAccel(int id) const; + + // used only by wxMDIParentFrame currently but could be useful elsewhere: + // returns a new accelerator table with accelerators for just this menu + // (shouldn't be called if we don't have any accelerators) + wxAcceleratorTable *CreateAccelTable() const; +#endif // wxUSE_ACCEL + +#if wxUSE_OWNER_DRAWN + + int GetMaxAccelWidth() + { + if (m_maxAccelWidth == -1) + CalculateMaxAccelWidth(); + return m_maxAccelWidth; + } + + void ResetMaxAccelWidth() + { + m_maxAccelWidth = -1; + } + + // get the menu with given handle (recursively) + wxMenu* MSWGetMenu(WXHMENU hMenu); + +private: + void CalculateMaxAccelWidth(); + +#endif // wxUSE_OWNER_DRAWN + +protected: + virtual wxMenuItem* DoAppend(wxMenuItem *item); + virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); + virtual wxMenuItem* DoRemove(wxMenuItem *item); + +private: + // This constructor is private, use MSWNewFromHMENU() to use it. + wxMenu(WXHMENU hMenu); + + // Common part of all ctors, it doesn't create a new HMENU. + void InitNoCreate(); + + // Common part of all ctors except of the one above taking a native menu + // handler: calls InitNoCreate() and also creates a new menu. + void Init(); + + // common part of Append/Insert (behaves as Append is pos == (size_t)-1) + bool DoInsertOrAppend(wxMenuItem *item, size_t pos = (size_t)-1); + + + // This variable contains the description of the radio item groups and + // allows to find whether an item at the given position is part of the + // group and also where its group starts and ends. + // + // It is initially NULL and only allocated if we have any radio items. + wxMenuRadioItemsData *m_radioData; + + // if true, insert a breal before appending the next item + bool m_doBreak; + + // the menu handle of this menu + WXHMENU m_hMenu; + +#if wxUSE_ACCEL + // the accelerators for our menu items + wxAcceleratorArray m_accels; +#endif // wxUSE_ACCEL + +#if wxUSE_OWNER_DRAWN + // true if the menu has any ownerdrawn items + bool m_ownerDrawn; + + // the max width of menu items bitmaps + int m_maxBitmapWidth; + + // the max width of menu items accels + int m_maxAccelWidth; +#endif // wxUSE_OWNER_DRAWN + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenu) +}; + +// ---------------------------------------------------------------------------- +// Menu Bar (a la Windows) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase +{ +public: + // ctors & dtor + // default constructor + wxMenuBar(); + // unused under MSW + wxMenuBar(long style); + // menubar takes ownership of the menus arrays but copies the titles + wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); + virtual ~wxMenuBar(); + + // menubar construction + virtual bool Append( wxMenu *menu, const wxString &title ); + virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Remove(size_t pos); + + virtual void EnableTop( size_t pos, bool flag ); + virtual bool IsEnabledTop(size_t pos) const; + virtual void SetMenuLabel( size_t pos, const wxString& label ); + virtual wxString GetMenuLabel( size_t pos ) const; + + // implementation from now on + WXHMENU Create(); + virtual void Detach(); + virtual void Attach(wxFrame *frame); + +#if defined(__WXWINCE__) && wxUSE_TOOLBAR + // Under WinCE, a menubar is owned by the frame's toolbar + void SetToolBar(wxToolBar* toolBar) { m_toolBar = toolBar; } + wxToolBar* GetToolBar() const { return m_toolBar; } +#endif + +#ifdef WINCE_WITH_COMMANDBAR + WXHWND GetCommandBar() const { return m_commandBar; } + bool AddAdornments(long style); +#endif + +#if wxUSE_ACCEL + // update the accel table (must be called after adding/deleting a menu) + void RebuildAccelTable(); +#endif // wxUSE_ACCEL + + // get the menu handle + WXHMENU GetHMenu() const { return m_hMenu; } + + // if the menubar is modified, the display is not updated automatically, + // call this function to update it (m_menuBarFrame should be !NULL) + void Refresh(); + + // To avoid compile warning + void Refresh( bool eraseBackground, + const wxRect *rect = (const wxRect *) NULL ) { wxWindow::Refresh(eraseBackground, rect); } + + // get the menu with given handle (recursively) + wxMenu* MSWGetMenu(WXHMENU hMenu); + +protected: + // common part of all ctors + void Init(); + + WXHMENU m_hMenu; + + // Return the MSW position for a wxMenu which is sometimes different from + // the wxWidgets position. + int MSWPositionForWxMenu(wxMenu *menu, int wxpos); + +#if defined(__WXWINCE__) && wxUSE_TOOLBAR + wxToolBar* m_toolBar; +#endif + +#ifdef WINCE_WITH_COMMANDBAR + WXHWND m_commandBar; + bool m_adornmentsAdded; +#endif + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuBar) +}; + +#endif // _WX_MENU_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/menuitem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/menuitem.h new file mode 100644 index 0000000000..d76bd11950 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/menuitem.h @@ -0,0 +1,147 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/menuitem.h +// Purpose: wxMenuItem class +// Author: Vadim Zeitlin +// Modified by: +// Created: 11.11.97 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _MENUITEM_H +#define _MENUITEM_H + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#if wxUSE_OWNER_DRAWN + #include "wx/ownerdrw.h" + #include "wx/bitmap.h" + + struct tagRECT; +#endif + +// ---------------------------------------------------------------------------- +// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase +#if wxUSE_OWNER_DRAWN + , public wxOwnerDrawn +#endif +{ +public: + // ctor & dtor + wxMenuItem(wxMenu *parentMenu = NULL, + int id = wxID_SEPARATOR, + const wxString& name = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL, + wxMenu *subMenu = NULL); + virtual ~wxMenuItem(); + + // override base class virtuals + virtual void SetItemLabel(const wxString& strName); + + virtual void Enable(bool bDoEnable = true); + virtual void Check(bool bDoCheck = true); + virtual bool IsChecked() const; + + // unfortunately needed to resolve ambiguity between + // wxMenuItemBase::IsCheckable() and wxOwnerDrawn::IsCheckable() + bool IsCheckable() const { return wxMenuItemBase::IsCheckable(); } + + // the id for a popup menu is really its menu handle (as required by + // ::AppendMenu() API), so this function will return either the id or the + // menu handle depending on what we are + // + // notice that it also returns the id as an unsigned int, as required by + // Win32 API + WXWPARAM GetMSWId() const; + +#if WXWIN_COMPATIBILITY_2_8 + // compatibility only, don't use in new code + wxDEPRECATED( + wxMenuItem(wxMenu *parentMenu, + int id, + const wxString& text, + const wxString& help, + bool isCheckable, + wxMenu *subMenu = NULL) + ); +#endif + +#if wxUSE_OWNER_DRAWN + + void SetBitmaps(const wxBitmap& bmpChecked, + const wxBitmap& bmpUnchecked = wxNullBitmap) + { + m_bmpChecked = bmpChecked; + m_bmpUnchecked = bmpUnchecked; + SetOwnerDrawn(true); + } + + void SetBitmap(const wxBitmap& bmp, bool bChecked = true) + { + if ( bChecked ) + m_bmpChecked = bmp; + else + m_bmpUnchecked = bmp; + SetOwnerDrawn(true); + } + + void SetDisabledBitmap(const wxBitmap& bmpDisabled) + { + m_bmpDisabled = bmpDisabled; + SetOwnerDrawn(true); + } + + const wxBitmap& GetBitmap(bool bChecked = true) const + { return (bChecked ? m_bmpChecked : m_bmpUnchecked); } + + const wxBitmap& GetDisabledBitmap() const + { return m_bmpDisabled; } + + int MeasureAccelWidth() const; + + // override wxOwnerDrawn base class virtuals + virtual wxString GetName() const; + virtual bool OnMeasureItem(size_t *pwidth, size_t *pheight); + virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat); + +protected: + virtual void GetFontToUse(wxFont& font) const; + virtual void GetColourToUse(wxODStatus stat, wxColour& colText, wxColour& colBack) const; + +private: + // helper function for draw std menu check mark + void DrawStdCheckMark(WXHDC hdc, const tagRECT* rc, wxODStatus stat); + +#else // !wxUSE_OWNER_DRAWN + // Provide stubs for the public functions above to ensure that the code + // still compiles without wxUSE_OWNER_DRAWN -- it makes sense to just drop + // the bitmaps then instead of failing compilation. + void SetBitmaps(const wxBitmap& WXUNUSED(bmpChecked), + const wxBitmap& WXUNUSED(bmpUnchecked) = wxNullBitmap) { } + void SetBitmap(const wxBitmap& WXUNUSED(bmp), + bool WXUNUSED(bChecked) = true) { } + const wxBitmap& GetBitmap() const { return wxNullBitmap; } +#endif // wxUSE_OWNER_DRAWN/!wxUSE_OWNER_DRAWN + +private: + // common part of all ctors + void Init(); + + +#if wxUSE_OWNER_DRAWN + // item bitmaps + wxBitmap m_bmpChecked, // bitmap to put near the item + m_bmpUnchecked, // (checked is used also for 'uncheckable' items) + m_bmpDisabled; +#endif // wxUSE_OWNER_DRAWN + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuItem) +}; + +#endif //_MENUITEM_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/metafile.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/metafile.h new file mode 100644 index 0000000000..8991f58c91 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/metafile.h @@ -0,0 +1,189 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/metafile.h +// Purpose: wxMetaFile, wxMetaFileDC and wxMetaFileDataObject classes +// Author: Julian Smart +// Modified by: VZ 07.01.00: implemented wxMetaFileDataObject +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_METAFIILE_H_ +#define _WX_METAFIILE_H_ + +#include "wx/dc.h" +#include "wx/gdiobj.h" + +#if wxUSE_DRAG_AND_DROP + #include "wx/dataobj.h" +#endif + +// ---------------------------------------------------------------------------- +// Metafile and metafile device context classes +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxMetafile; + +class WXDLLIMPEXP_CORE wxMetafileRefData: public wxGDIRefData +{ +public: + wxMetafileRefData(); + virtual ~wxMetafileRefData(); + + virtual bool IsOk() const { return m_metafile != 0; } + +public: + WXHANDLE m_metafile; + int m_windowsMappingMode; + int m_width, m_height; + + friend class WXDLLIMPEXP_FWD_CORE wxMetafile; +}; + +#define M_METAFILEDATA ((wxMetafileRefData *)m_refData) + +class WXDLLIMPEXP_CORE wxMetafile: public wxGDIObject +{ +public: + wxMetafile(const wxString& file = wxEmptyString); + virtual ~wxMetafile(); + + // 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); + + // set/get the size of metafile for clipboard operations + wxSize GetSize() const { return wxSize(GetWidth(), GetHeight()); } + int GetWidth() const { return M_METAFILEDATA->m_width; } + int GetHeight() const { return M_METAFILEDATA->m_height; } + + void SetWidth(int width) { M_METAFILEDATA->m_width = width; } + void SetHeight(int height) { M_METAFILEDATA->m_height = height; } + + // Implementation + WXHANDLE GetHMETAFILE() const { return M_METAFILEDATA->m_metafile; } + void SetHMETAFILE(WXHANDLE mf) ; + int GetWindowsMappingMode() const { return M_METAFILEDATA->m_windowsMappingMode; } + void SetWindowsMappingMode(int mm); + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxMetafile) +}; + +class WXDLLIMPEXP_CORE wxMetafileDCImpl: public wxMSWDCImpl +{ +public: + wxMetafileDCImpl(wxDC *owner, const wxString& file = wxEmptyString); + wxMetafileDCImpl(wxDC *owner, const wxString& file, + int xext, int yext, int xorg, int yorg); + virtual ~wxMetafileDCImpl(); + + virtual wxMetafile *Close(); + virtual void SetMapMode(wxMappingMode mode); + virtual void DoGetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; + + // Implementation + wxMetafile *GetMetaFile() const { return m_metaFile; } + void SetMetaFile(wxMetafile *mf) { m_metaFile = mf; } + int GetWindowsMappingMode() const { return m_windowsMappingMode; } + void SetWindowsMappingMode(int mm) { m_windowsMappingMode = mm; } + +protected: + virtual void DoGetSize(int *width, int *height) const; + + int m_windowsMappingMode; + wxMetafile* m_metaFile; + +private: + DECLARE_CLASS(wxMetafileDCImpl) + wxDECLARE_NO_COPY_CLASS(wxMetafileDCImpl); +}; + +class WXDLLIMPEXP_CORE wxMetafileDC: public wxDC +{ +public: + // Don't supply origin and extent + // Supply them to wxMakeMetaFilePlaceable instead. + wxMetafileDC(const wxString& file) + : wxDC(new wxMetafileDCImpl( this, 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) + : wxDC(new wxMetafileDCImpl( this, file, xext, yext, xorg, yorg )) + { } + + wxMetafile *GetMetafile() const + { return ((wxMetafileDCImpl*)m_pimpl)->GetMetaFile(); } + + wxMetafile *Close() + { return ((wxMetafileDCImpl*)m_pimpl)->Close(); } + +private: + DECLARE_CLASS(wxMetafileDC) + wxDECLARE_NO_COPY_CLASS(wxMetafileDC); +}; + + + + +/* + * 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 wxMM_TEXT mapping mode. + * + */ + +// No origin or extent +bool WXDLLIMPEXP_CORE wxMakeMetafilePlaceable(const wxString& filename, float scale = 1.0); + +// Optional origin and extent +bool WXDLLIMPEXP_CORE wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale = 1.0, bool useOriginAndExtent = true); + +// ---------------------------------------------------------------------------- +// wxMetafileDataObject is a specialization of wxDataObject for metafile data +// ---------------------------------------------------------------------------- + +#if wxUSE_DRAG_AND_DROP + +class WXDLLIMPEXP_CORE wxMetafileDataObject : public wxDataObjectSimple +{ +public: + // ctors + wxMetafileDataObject() : wxDataObjectSimple(wxDF_METAFILE) + { } + wxMetafileDataObject(const wxMetafile& metafile) + : wxDataObjectSimple(wxDF_METAFILE), m_metafile(metafile) { } + + // virtual functions which you may override if you want to provide data on + // demand only - otherwise, the trivial default versions will be used + virtual void SetMetafile(const wxMetafile& metafile) + { m_metafile = metafile; } + virtual wxMetafile GetMetafile() const + { return m_metafile; } + + // implement base class pure virtuals + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + +protected: + wxMetafile m_metafile; +}; + +#endif // wxUSE_DRAG_AND_DROP + +#endif + // _WX_METAFIILE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/microwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/microwin.h new file mode 100644 index 0000000000..bb9861ab10 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/microwin.h @@ -0,0 +1,234 @@ +/* +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/microwin.h +// Purpose: Extra implementation for MicroWindows +// Author: Julian Smart +// Created: 2001-05-31 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// +*/ + +#ifndef _WX_MICROWIN_H_ +#define _WX_MICROWIN_H_ + +/* Implemented by microwin.cpp */ + +#ifdef __cplusplus +extern "C" { +#endif + +BOOL SetCursorPos(int x, int y); + +HCURSOR SetCursor(HCURSOR hCursor); + +/* Implemented with wrong number of args by MicroWindows */ +/* so we need to use a different name */ +int GetScrollPosWX (HWND hWnd, int iSBar); + +BOOL ScrollWindow(HWND, int xAmount, int yAmount, + CONST RECT* lpRect, CONST RECT* lpClipRect); + +HWND WindowFromPoint(POINT pt); +SHORT GetKeyState(int nVirtKey); +HWND SetParent(HWND hWndChild, HWND hWndNewParent); +VOID DragAcceptFiles(HWND, BOOL); +BOOL IsDialogMessage(HWND hWnd, MSG* msg); +DWORD GetMessagePos(VOID); +BOOL IsIconic(HWND hWnd); +int SetMapMode(HDC hDC, int mode); +int GetMapMode(HDC hDC); +HCURSOR LoadCursor(HINSTANCE hInst, int cursor); +DWORD GetModuleFileName(HINSTANCE hInst, LPSTR name, DWORD sz); +VOID DestroyIcon(HICON hIcon); +COLORREF GetTextColor(HDC hdc); +COLORREF GetBkColor(HDC hdc); +HPALETTE SelectPalette(HDC hdc, HPALETTE hPalette, BOOL b); +BOOL IntersectClipRect(HDC hdc, int x, int y, + int w, int h); +BOOL GetClipBox(HDC hdc, RECT* rect); +BOOL DrawIconEx(HDC hdc, int x, int y, HICON hIcon, int w, int h, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags); +BOOL SetViewportExtEx(HDC hdc, int x, int y, LPSIZE lpSize); +BOOL SetViewportOrgEx(HDC hdc, int x, int y, LPPOINT lpPoint); +BOOL SetWindowExtEx(HDC hdc, int x, int y, LPSIZE lpSize); +BOOL SetWindowOrgEx(HDC hdc, int x, int y, LPPOINT lpSize); +BOOL ExtFloodFill(HDC hdc, int x, int y, COLORREF col, UINT flags); +int SetPolyFillMode(HDC hdc, int mode); +BOOL RoundRect(HDC hdc, int left, int top, int right, int bottom, int r1, int r2); +BOOL MaskBlt(HDC hdc, int x, int y, int w, int h, + HDC hDCSource, int xSrc, int ySrc, HBITMAP hBitmapMask, int xMask, int yMask, DWORD rop); +UINT RealizePalette(HDC hDC); +BOOL SetBrushOrgEx(HDC hdc, int xOrigin, int yOrigin, LPPOINT lpPoint); +int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj); + +/* For some reason these aren't defined in the headers */ +BOOL EnableScrollBar (HWND hWnd, int iSBar, BOOL bEnable) ; +BOOL GetScrollPos (HWND hWnd, int iSBar, int* pPos); +BOOL GetScrollRange (HWND hWnd, int iSBar, int* pMinPos, int* pMaxPos); +BOOL SetScrollPos (HWND hWnd, int iSBar, int iNewPos); +BOOL SetScrollRange (HWND hWnd, int iSBar, int iMinPos, int iMaxPos); +BOOL SetScrollInfo (HWND hWnd, int iSBar, + LPCSCROLLINFO lpsi, BOOL fRedraw); +BOOL GetScrollInfo(HWND hWnd, int iSBar, LPSCROLLINFO lpsi); +BOOL ShowScrollBar (HWND hWnd, int iSBar, BOOL bShow); +HBITMAP WINAPI +CreateBitmap( int width, int height, int nPlanes, int bPP, LPCVOID lpData); + +#ifdef __cplusplus +} +#endif + +/* + * Key State Masks for Mouse Messages + */ +#ifndef MK_LBUTTON +#define MK_LBUTTON 0x0001 +#define MK_RBUTTON 0x0002 +#define MK_SHIFT 0x0004 +#define MK_CONTROL 0x0008 +#define MK_MBUTTON 0x0010 +#endif + +/* + * DrawIcon flags + */ + +#ifndef DI_MASK +#define DI_MASK 0x0001 +#define DI_IMAGE 0x0002 +#define DI_NORMAL 0x0003 +#define DI_COMPAT 0x0004 +#define DI_DEFAULTSIZE 0x0008 +#endif + +/* TODO: May have to fake these message */ +#ifndef WM_INITDIALOG +#define WM_INITDIALOG 0x0110 +#endif +#ifndef WM_QUERYENDSESSION +#define WM_QUERYENDSESSION 0x0011 +#endif +#ifndef WM_ENDSESSION +#define WM_ENDSESSION 0x0016 +#endif +#ifndef WM_SETCURSOR +#define WM_SETCURSOR 0x0020 +#endif +#ifndef WM_GETMINMAXINFO +#define WM_GETMINMAXINFO 0x0024 +typedef struct tagMINMAXINFO { + POINT ptReserved; + POINT ptMaxSize; + POINT ptMaxPosition; + POINT ptMinTrackSize; + POINT ptMaxTrackSize; +} MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO; + +#endif +#ifndef WM_SYSCOMMAND +#define WM_SYSCOMMAND 0x0112 +#endif +#ifndef WM_SYSCOLORCHANGE +#define WM_SYSCOLORCHANGE 0x0015 +#endif +#ifndef WM_QUERYNEWPALETTE +#define WM_QUERYNEWPALETTE 0x030F +#endif +#ifndef WM_PALETTEISCHANGING +#define WM_PALETTEISCHANGING 0x0310 +#endif +#ifndef WM_PALETTECHANGED +#define WM_PALETTECHANGED 0x0311 +#endif +#ifndef WM_NOTIFY +#define WM_NOTIFY 0x004E +#endif +#ifndef WM_DROPFILES +#define WM_DROPFILES 0x0233 +#endif + +#ifndef PALETTERGB +#define PALETTERGB RGB +#endif + +#ifndef MM_TEXT +#define MM_TEXT 1 +#define MM_LOMETRIC 2 +#define MM_HIMETRIC 3 +#define MM_LOENGLISH 4 +#define MM_HIENGLISH 5 +#define MM_TWIPS 6 +#define MM_ISOTROPIC 7 +#define MM_ANISOTROPIC 8 +#endif + +#ifndef SC_MAXIMIZE +#define SC_MINIMIZE 0xF020 +#define SC_MAXIMIZE 0xF030 +#endif + +// TODO: all of them +#ifndef IDC_ARROW +#define IDC_ARROW 1 +#endif + +/* + * Standard Cursor IDs + */ +#ifndef MAKEINTRESOURCE +#define MAKEINTRESOURCE(r) r +#endif + +#ifndef IDC_ARROW +#define IDC_ARROW MAKEINTRESOURCE(32512) +#define IDC_IBEAM MAKEINTRESOURCE(32513) +#define IDC_WAIT MAKEINTRESOURCE(32514) +#define IDC_CROSS MAKEINTRESOURCE(32515) +#define IDC_UPARROW MAKEINTRESOURCE(32516) +#define IDC_SIZE MAKEINTRESOURCE(32640) /* OBSOLETE: use IDC_SIZEALL */ +#define IDC_ICON MAKEINTRESOURCE(32641) /* OBSOLETE: use IDC_ARROW */ +#define IDC_SIZENWSE MAKEINTRESOURCE(32642) +#define IDC_SIZENESW MAKEINTRESOURCE(32643) +#define IDC_SIZEWE MAKEINTRESOURCE(32644) +#define IDC_SIZENS MAKEINTRESOURCE(32645) +#define IDC_SIZEALL MAKEINTRESOURCE(32646) +#define IDC_NO MAKEINTRESOURCE(32648) /* not in win3.1 */ +#if(WINVER >= 0x0500) +#define IDC_HAND MAKEINTRESOURCE(32649) +#endif /* WINVER >= 0x0500 */ +#define IDC_APPSTARTING MAKEINTRESOURCE(32650) /* not in win3.1 */ +#if(WINVER >= 0x0400) +#define IDC_HELP MAKEINTRESOURCE(32651) +#endif /* WINVER >= 0x0400 */ +#endif + +/* ExtFloodFill style flags */ +#define FLOODFILLBORDER 0 +#define FLOODFILLSURFACE 1 + +/* PolyFill() Modes */ +#define ALTERNATE 1 +#define WINDING 2 +#define POLYFILL_LAST 2 + +/* Quaternary raster codes */ +#define MAKEROP4(fore,back) (DWORD)((((back) << 8) & 0xFF000000) | (fore)) + +/* Device Parameters for GetDeviceCaps() */ +#define DRIVERVERSION 0 /* Device driver version */ +#define TECHNOLOGY 2 /* Device classification */ +#define HORZSIZE 4 /* Horizontal size in millimeters */ +#define VERTSIZE 6 /* Vertical size in millimeters */ + +/* Ternary raster operations */ +/* Now defined by MicroWindows */ +#if 0 +#define DSTINVERT (DWORD)0x00550009 /* dest = (NOT dest) */ +#define WHITENESS (DWORD)0x00FF0062 /* dest = WHITE */ +#define SRCERASE (DWORD)0x00440328 /* dest = source AND (NOT dest ) */ +#define MERGEPAINT (DWORD)0x00BB0226 /* dest = (NOT source) OR dest */ +#define SRCPAINT (DWORD)0x00EE0086 /* dest = source OR dest */ +#define NOTSRCCOPY (DWORD)0x00330008 /* dest = (NOT source) */ +#endif + +#endif /* _WX_MICROWIN_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mimetype.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mimetype.h new file mode 100644 index 0000000000..90a7013b6f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mimetype.h @@ -0,0 +1,115 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/mimetype.h +// Purpose: classes and functions to manage MIME types +// Author: Vadim Zeitlin +// Modified by: +// Created: 23.09.98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence (part of wxExtra library) +///////////////////////////////////////////////////////////////////////////// + +#ifndef _MIMETYPE_IMPL_H +#define _MIMETYPE_IMPL_H + +#include "wx/defs.h" + +#if wxUSE_MIMETYPE + +#include "wx/mimetype.h" + +// ---------------------------------------------------------------------------- +// wxFileTypeImpl is the MSW version of wxFileType, this is a private class +// and is never used directly by the application +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFileTypeImpl +{ +public: + // ctor + wxFileTypeImpl() { } + + // one of these Init() function must be called (ctor can't take any + // arguments because it's common) + + // initialize us with our file type name and extension - in this case + // we will read all other data from the registry + void Init(const wxString& strFileType, const wxString& ext); + + // implement accessor functions + bool GetExtensions(wxArrayString& extensions); + bool GetMimeType(wxString *mimeType) const; + bool GetMimeTypes(wxArrayString& mimeTypes) const; + bool GetIcon(wxIconLocation *iconLoc) const; + bool GetDescription(wxString *desc) const; + bool GetOpenCommand(wxString *openCmd, + const wxFileType::MessageParameters& params) const; + bool GetPrintCommand(wxString *printCmd, + const wxFileType::MessageParameters& params) const; + + size_t GetAllCommands(wxArrayString * verbs, wxArrayString * commands, + const wxFileType::MessageParameters& params) const; + + bool Unassociate(); + + // set an arbitrary command, ask confirmation if it already exists and + // overwriteprompt is true + bool SetCommand(const wxString& cmd, + const wxString& verb, + bool overwriteprompt = true); + + bool SetDefaultIcon(const wxString& cmd = wxEmptyString, int index = 0); + + // this is called by Associate + bool SetDescription (const wxString& desc); + +private: + // helper function: reads the command corresponding to the specified verb + // from the registry (returns an empty string if not found) + wxString GetCommand(const wxString& verb) const; + + // get the registry path for the given verb + wxString GetVerbPath(const wxString& verb) const; + + // check that the registry key for our extension exists, create it if it + // doesn't, return false if this failed + bool EnsureExtKeyExists(); + + wxString m_strFileType, // may be empty + m_ext; + + // these methods are not publicly accessible (as wxMimeTypesManager + // doesn't know about them), and should only be called by Unassociate + + bool RemoveOpenCommand(); + bool RemoveCommand(const wxString& verb); + bool RemoveMimeType(); + bool RemoveDefaultIcon(); + bool RemoveDescription(); +}; + +class WXDLLIMPEXP_BASE wxMimeTypesManagerImpl +{ +public: + // nothing to do here, we don't load any data but just go and fetch it from + // the registry when asked for + wxMimeTypesManagerImpl() { } + + // implement containing class functions + wxFileType *GetFileTypeFromExtension(const wxString& ext); + wxFileType *GetOrAllocateFileTypeFromExtension(const wxString& ext); + wxFileType *GetFileTypeFromMimeType(const wxString& mimeType); + + size_t EnumAllFileTypes(wxArrayString& mimetypes); + + // create a new filetype association + wxFileType *Associate(const wxFileTypeInfo& ftInfo); + + // create a new filetype with the given name and extension + wxFileType *CreateFileType(const wxString& filetype, const wxString& ext); +}; + +#endif // wxUSE_MIMETYPE + +#endif + //_MIMETYPE_IMPL_H + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/minifram.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/minifram.h new file mode 100644 index 0000000000..5e12562ebc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/minifram.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/minifram.h +// Purpose: wxMiniFrame class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MINIFRAM_H_ +#define _WX_MINIFRAM_H_ + +#include "wx/frame.h" + +class WXDLLIMPEXP_CORE wxMiniFrame : public wxFrame +{ +public: + wxMiniFrame() { } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER, + const wxString& name = wxFrameNameStr) + { + return wxFrame::Create(parent, id, title, pos, size, + style | + wxFRAME_TOOL_WINDOW | + (parent ? wxFRAME_FLOAT_ON_PARENT : 0), name); + } + + wxMiniFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAPTION | wxCLIP_CHILDREN | wxRESIZE_BORDER, + const wxString& name = wxFrameNameStr) + { + Create(parent, id, title, pos, size, style, name); + } + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMiniFrame) +}; + +#endif + // _WX_MINIFRAM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/missing.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/missing.h new file mode 100644 index 0000000000..4babbbea4d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/missing.h @@ -0,0 +1,690 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/missing.h +// Purpose: Declarations for parts of the Win32 SDK that are missing in +// the versions that come with some compilers +// Created: 2002/04/23 +// Copyright: (c) 2002 Mattia Barbon +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MISSING_H_ +#define _WX_MISSING_H_ + +/* + * The following are required for VC++ 6. + */ + +// Needed by cursor.cpp +#ifndef IDC_HAND + #define IDC_HAND MAKEINTRESOURCE(32649) +#endif + +// Needed by strconv.cpp +#ifndef WC_NO_BEST_FIT_CHARS + #define WC_NO_BEST_FIT_CHARS 0x400 +#endif + +#ifndef WM_CONTEXTMENU + #define WM_CONTEXTMENU 0x007B +#endif + +#ifndef WM_CHANGEUISTATE + #define WM_CHANGEUISTATE 0x0127 +#endif + +#ifndef WM_UPDATEUISTATE + #define WM_UPDATEUISTATE 0x0128 +#endif + +#ifndef WM_QUERYUISTATE + #define WM_QUERYUISTATE 0x0129 +#endif + +#ifndef WM_PRINTCLIENT + #define WM_PRINTCLIENT 0x318 +#endif + +#ifndef DT_HIDEPREFIX + #define DT_HIDEPREFIX 0x00100000 +#endif + +#ifndef DSS_HIDEPREFIX + #define DSS_HIDEPREFIX 0x0200 +#endif + +// Needed by toplevel.cpp +#ifndef UIS_SET + #define UIS_SET 1 + #define UIS_CLEAR 2 + #define UIS_INITIALIZE 3 +#endif + +#ifndef UISF_HIDEFOCUS + #define UISF_HIDEFOCUS 1 +#endif + +#ifndef UISF_HIDEACCEL + #define UISF_HIDEACCEL 2 +#endif + +#ifndef OFN_EXPLORER + #define OFN_EXPLORER 0x00080000 +#endif + +#ifndef OFN_ENABLESIZING + #define OFN_ENABLESIZING 0x00800000 +#endif + +// Needed by window.cpp +#if wxUSE_MOUSEWHEEL + #ifndef WM_MOUSEWHEEL + #define WM_MOUSEWHEEL 0x020A + #endif + #ifndef WM_MOUSEHWHEEL + #define WM_MOUSEHWHEEL 0x020E + #endif + #ifndef WHEEL_DELTA + #define WHEEL_DELTA 120 + #endif + #ifndef SPI_GETWHEELSCROLLLINES + #define SPI_GETWHEELSCROLLLINES 104 + #endif + #ifndef SPI_GETWHEELSCROLLCHARS + #define SPI_GETWHEELSCROLLCHARS 108 + #endif +#endif // wxUSE_MOUSEWHEEL + +// Needed by window.cpp +#ifndef VK_OEM_1 + #define VK_OEM_1 0xBA + #define VK_OEM_2 0xBF + #define VK_OEM_3 0xC0 + #define VK_OEM_4 0xDB + #define VK_OEM_5 0xDC + #define VK_OEM_6 0xDD + #define VK_OEM_7 0xDE + #define VK_OEM_102 0xE2 +#endif + +#ifndef VK_OEM_COMMA + #define VK_OEM_PLUS 0xBB + #define VK_OEM_COMMA 0xBC + #define VK_OEM_MINUS 0xBD + #define VK_OEM_PERIOD 0xBE +#endif + +#ifndef SM_TABLETPC + #define SM_TABLETPC 86 +#endif + +#ifndef INKEDIT_CLASS +# define INKEDIT_CLASSW L"INKEDIT" +# ifdef UNICODE +# define INKEDIT_CLASS INKEDIT_CLASSW +# else +# define INKEDIT_CLASS "INKEDIT" +# endif +#endif + +#ifndef EM_SETINKINSERTMODE +# define EM_SETINKINSERTMODE (WM_USER + 0x0204) +#endif + +#ifndef EM_SETUSEMOUSEFORINPUT +#define EM_SETUSEMOUSEFORINPUT (WM_USER + 0x224) +#endif + +#ifndef TPM_RECURSE +#define TPM_RECURSE 1 +#endif + + +#ifndef WS_EX_LAYOUTRTL +#define WS_EX_LAYOUTRTL 0x00400000 +#endif + +#ifndef WS_EX_COMPOSITED +#define WS_EX_COMPOSITED 0x02000000L +#endif + +#ifndef WS_EX_LAYERED +#define WS_EX_LAYERED 0x00080000 +#endif + +#ifndef LWA_ALPHA +#define LWA_ALPHA 2 +#endif + +#ifndef QS_ALLPOSTMESSAGE +#define QS_ALLPOSTMESSAGE 0 +#endif + +/* + * The following are required for VC++ 5 when the PSDK is not available. + */ + +#if defined __VISUALC__ && __VISUALC__ <= 1100 + +#ifndef VER_NT_WORKSTATION + +typedef struct _OSVERSIONINFOEXA { + DWORD dwOSVersionInfoSize; + DWORD dwMajorVersion; + DWORD dwMinorVersion; + DWORD dwBuildNumber; + DWORD dwPlatformId; + CHAR szCSDVersion[128]; + WORD wServicePackMajor; + WORD wServicePackMinor; + WORD wSuiteMask; + BYTE wProductType; + BYTE wReserved; +} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA; +typedef struct _OSVERSIONINFOEXW { + DWORD dwOSVersionInfoSize; + DWORD dwMajorVersion; + DWORD dwMinorVersion; + DWORD dwBuildNumber; + DWORD dwPlatformId; + WCHAR szCSDVersion[128]; + WORD wServicePackMajor; + WORD wServicePackMinor; + WORD wSuiteMask; + BYTE wProductType; + BYTE wReserved; +} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW; + +#ifdef UNICODE +typedef OSVERSIONINFOW OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO; +typedef OSVERSIONINFOEXW OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX; +#else +typedef OSVERSIONINFOA OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO; +typedef OSVERSIONINFOEXA OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX; +#endif + +#endif // defined VER_NT_WORKSTATION + +#ifndef CP_SYMBOL + #define CP_SYMBOL 42 +#endif + +// NMLVCUSTOMDRAW originally didn't have the iSubItem member. It was added +// with IE4, as was IPN_FIRST which is used as a test :-(. +// +#ifndef IPN_FIRST + +typedef struct wxtagNMLVCUSTOMDRAW_ { + NMCUSTOMDRAW nmcd; + COLORREF clrText; + COLORREF clrTextBk; + int iSubItem; +} wxNMLVCUSTOMDRAW_, *wxLPNMLVCUSTOMDRAW_; + +#define NMLVCUSTOMDRAW wxNMLVCUSTOMDRAW_ +#define LPNMLVCUSTOMDRAW wxLPNMLVCUSTOMDRAW_ + +#endif // defined IPN_FIRST + +#endif // defined __VISUALC__ && __VISUALC__ <= 1100 + +// ---------------------------------------------------------------------------- +// menu stuff +// ---------------------------------------------------------------------------- + +#ifndef MIIM_BITMAP + #define MIIM_STRING 0x00000040 + #define MIIM_BITMAP 0x00000080 + #define MIIM_FTYPE 0x00000100 + #define HBMMENU_CALLBACK ((HBITMAP) -1) + + typedef struct tagMENUINFO + { + DWORD cbSize; + DWORD fMask; + DWORD dwStyle; + UINT cyMax; + HBRUSH hbrBack; + DWORD dwContextHelpID; + DWORD dwMenuData; + } MENUINFO, FAR *LPMENUINFO; +#endif // MIIM_BITMAP &c + +// ---------------------------------------------------------------------------- +// definitions related to ListView and Header common controls, needed by +// msw/listctrl.cpp and msw/headerctrl.cpp +// ---------------------------------------------------------------------------- + +#ifndef I_IMAGENONE + #define I_IMAGENONE (-2) +#endif + +#ifndef LVS_EX_FULLROWSELECT + #define LVS_EX_FULLROWSELECT 0x00000020 +#endif + +// LVS_EX_LABELTIP is not supported by Windows CE, don't define it there +#if !defined(LVS_EX_LABELTIP) && !defined(__WXWINCE__) + #define LVS_EX_LABELTIP 0x00004000 +#endif + +#ifndef LVS_EX_SUBITEMIMAGES + #define LVS_EX_SUBITEMIMAGES 0x00000002 +#endif + +#ifndef HDN_GETDISPINFOW + #define HDN_GETDISPINFOW (HDN_FIRST-29) +#endif + +#ifndef HDS_HOTTRACK + #define HDS_HOTTRACK 4 +#endif +#ifndef HDS_FLAT + #define HDS_FLAT 0x0200 +#endif + +#ifndef HDF_SORTUP + #define HDF_SORTUP 0x0400 + #define HDF_SORTDOWN 0x0200 +#endif + + /* + * In addition to the above, the following are required for several compilers. + */ + +#if !defined(CCS_VERT) +#define CCS_VERT 0x00000080L +#endif + +#if !defined(CCS_RIGHT) +#define CCS_RIGHT (CCS_VERT|CCS_BOTTOM) +#endif + +#if !defined(TB_SETDISABLEDIMAGELIST) + #define TB_SETDISABLEDIMAGELIST (WM_USER + 54) +#endif // !defined(TB_SETDISABLEDIMAGELIST) + +#ifndef CFM_BACKCOLOR + #define CFM_BACKCOLOR 0x04000000 +#endif + +#ifndef HANGUL_CHARSET + #define HANGUL_CHARSET 129 +#endif + +#ifndef CCM_SETUNICODEFORMAT + #define CCM_SETUNICODEFORMAT 8197 +#endif + +// ---------------------------------------------------------------------------- +// Tree control +// ---------------------------------------------------------------------------- + +#ifndef TV_FIRST + #define TV_FIRST 0x1100 +#endif + +#ifndef TVS_FULLROWSELECT + #define TVS_FULLROWSELECT 0x1000 +#endif + +#ifndef TVM_SETBKCOLOR + #define TVM_SETBKCOLOR (TV_FIRST + 29) + #define TVM_SETTEXTCOLOR (TV_FIRST + 30) +#endif + + /* + * The following are required for BC++ 5.5 (none at present.) + */ + + /* + * The following are specifically required for Digital Mars C++ + */ + +#ifdef __DMC__ + +#ifndef VER_NT_WORKSTATION +typedef struct _OSVERSIONINFOEX { + DWORD dwOSVersionInfoSize; + DWORD dwMajorVersion; + DWORD dwMinorVersion; + DWORD dwBuildNumber; + DWORD dwPlatformId; + TCHAR szCSDVersion[ 128 ]; + WORD wServicePackMajor; + WORD wServicePackMinor; + WORD wSuiteMask; + BYTE wProductType; + BYTE wReserved; +} OSVERSIONINFOEX; +#endif // !defined(VER_NT_WORKSTATION) + +#ifndef _TrackMouseEvent + #define _TrackMouseEvent TrackMouseEvent +#endif + +#ifndef LVM_SETEXTENDEDLISTVIEWSTYLE + #define LVM_SETEXTENDEDLISTVIEWSTYLE (0x1000 + 54) +#endif + +#ifndef LVM_GETSUBITEMRECT + #define LVM_GETSUBITEMRECT (0x1000 + 56) +#endif + +#ifndef LVCF_IMAGE + #define LVCF_IMAGE 0x0010 +#endif + +#ifndef Header_GetItemRect + #define Header_GetItemRect(w,i,r) \ + (BOOL)SendMessage((w),HDM_GETITEMRECT,(WPARAM)(i),(LPARAM)(r)) +#endif + +#ifndef HDM_GETITEMRECT + #define HDM_GETITEMRECT (HDM_FIRST+7) +#endif + +#ifndef ListView_GetHeader + #define ListView_GetHeader(w) (HWND)SendMessage((w),LVM_GETHEADER,0,0) +#endif + +#ifndef ListView_GetSubItemRect + #define ListView_GetSubItemRect(w, i, s, c, p) (HWND)SendMessage(w,LVM_GETSUBITEMRECT,i, ((p) ? ((((LPRECT)(p))->top = s), (((LPRECT)(p))->left = c), (LPARAM)(p)) : (LPARAM)(LPRECT)NULL)) +#endif + +#ifndef LVM_GETHEADER + #define LVM_GETHEADER (LVM_FIRST+31) +#endif + +#ifndef HDLAYOUT + #define HDLAYOUT HD_LAYOUT +#endif + +#ifndef HDITEM + #define HDITEM HD_ITEM +#endif + +#ifndef NMHEADER + #define NMHEADER HD_NOTIFY +#endif + +#ifndef HDS_DRAGDROP + #define HDS_DRAGDROP 0x0040 +#endif +#ifndef HDS_FULLDRAG + #define HDS_FULLDRAG 0x0080 +#endif + + +#ifndef HDN_BEGINDRAG + #define HDN_BEGINDRAG (HDN_FIRST - 11) +#endif + +#ifndef HDN_ENDDRAG + #define HDN_ENDDRAG (HDN_FIRST - 10) +#endif + +#ifndef LVSICF_NOSCROLL + #define LVSICF_NOINVALIDATEALL 0x0001 + #define LVSICF_NOSCROLL 0x0002 +#endif + +#ifndef CP_SYMBOL + #define CP_SYMBOL 42 +#endif + +// ---------------------------------------------------------------------------- +// wxDisplay +// ---------------------------------------------------------------------------- + +// The windows headers with Digital Mars lack some typedefs. +// typedef them as my_XXX and then #define to rename to XXX in case +// a newer version of Digital Mars fixes the headers +// (or up to date PSDK is in use with older version) +// also we use any required definition (MONITOR_DEFAULTTONULL) to recognize +// whether whole missing block needs to be included + +#ifndef MONITOR_DEFAULTTONULL + + #define HMONITOR_DECLARED + DECLARE_HANDLE(HMONITOR); + typedef BOOL(CALLBACK* my_MONITORENUMPROC)(HMONITOR,HDC,LPRECT,LPARAM); + #define MONITORENUMPROC my_MONITORENUMPROC + typedef struct my_tagMONITORINFO { + DWORD cbSize; + RECT rcMonitor; + RECT rcWork; + DWORD dwFlags; + } my_MONITORINFO,*my_LPMONITORINFO; + #define MONITORINFO my_MONITORINFO + #define LPMONITORINFO my_LPMONITORINFO + + typedef struct my_MONITORINFOEX : public my_tagMONITORINFO + { + TCHAR szDevice[CCHDEVICENAME]; + } my_MONITORINFOEX, *my_LPMONITORINFOEX; + #define MONITORINFOEX my_MONITORINFOEX + #define LPMONITORINFOEX my_LPMONITORINFOEX + + #ifndef MONITOR_DEFAULTTONULL + #define MONITOR_DEFAULTTONULL 0 + #endif // MONITOR_DEFAULTTONULL + + #ifndef MONITORINFOF_PRIMARY + #define MONITORINFOF_PRIMARY 1 + #endif // MONITORINFOF_PRIMARY + + #ifndef DDENUM_ATTACHEDSECONDARYDEVICES + #define DDENUM_ATTACHEDSECONDARYDEVICES 1 + #endif + +#endif // MONITOR_DEFAULTTONULL + +// ---------------------------------------------------------------------------- +// Tree control +// ---------------------------------------------------------------------------- + +#ifndef TVIS_FOCUSED + #define TVIS_FOCUSED 0x0001 +#endif + +#ifndef TVS_CHECKBOXES + #define TVS_CHECKBOXES 0x0100 +#endif + +#ifndef TVITEM + #define TVITEM TV_ITEM +#endif + +#endif + // DMC++ + + /* + * The following are specifically required for OpenWatcom C++ (none at present) + */ + +#if defined(__WATCOMC__) +#endif + + /* + * The following are specifically required for MinGW (none at present) + */ + +#if defined (__MINGW32__) + +#if !wxCHECK_W32API_VERSION(3,1) + +#include <windows.h> +#include "wx/msw/winundef.h" + +typedef struct +{ + RECT rgrc[3]; + WINDOWPOS *lppos; +} NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS; + +#endif + +#endif + +//Various defines that will be needed by mingw and possibly VC++6 +//Used by the webview library + +#ifndef DISPID_COMMANDSTATECHANGE +#define DISPID_COMMANDSTATECHANGE 105 +#endif + +#ifndef DISPID_NAVIGATECOMPLETE2 +#define DISPID_NAVIGATECOMPLETE2 252 +#endif + +#ifndef DISPID_NAVIGATEERROR +#define DISPID_NAVIGATEERROR 271 +#endif + +#ifndef DISPID_NEWWINDOW3 +#define DISPID_NEWWINDOW3 273 +#endif + +#ifndef INET_E_ERROR_FIRST +#define INET_E_ERROR_FIRST 0x800C0002L +#endif + +#ifndef INET_E_INVALID_URL +#define INET_E_INVALID_URL 0x800C0002L +#endif + +#ifndef INET_E_NO_SESSION +#define INET_E_NO_SESSION 0x800C0003L +#endif + +#ifndef INET_E_CANNOT_CONNECT +#define INET_E_CANNOT_CONNECT 0x800C0004L +#endif + +#ifndef INET_E_RESOURCE_NOT_FOUND +#define INET_E_RESOURCE_NOT_FOUND 0x800C0005L +#endif + +#ifndef INET_E_OBJECT_NOT_FOUND +#define INET_E_OBJECT_NOT_FOUND 0x800C0006L +#endif + +#ifndef INET_E_DATA_NOT_AVAILABLE +#define INET_E_DATA_NOT_AVAILABLE 0x800C0007L +#endif + +#ifndef INET_E_DOWNLOAD_FAILURE +#define INET_E_DOWNLOAD_FAILURE 0x800C0008L +#endif + +#ifndef INET_E_AUTHENTICATION_REQUIRED +#define INET_E_AUTHENTICATION_REQUIRED 0x800C0009L +#endif + +#ifndef INET_E_NO_VALID_MEDIA +#define INET_E_NO_VALID_MEDIA 0x800C000AL +#endif + +#ifndef INET_E_CONNECTION_TIMEOUT +#define INET_E_CONNECTION_TIMEOUT 0x800C000BL +#endif + +#ifndef INET_E_INVALID_REQUEST +#define INET_E_INVALID_REQUEST 0x800C000CL +#endif + +#ifndef INET_E_UNKNOWN_PROTOCOL +#define INET_E_UNKNOWN_PROTOCOL 0x800C000DL +#endif + +#ifndef INET_E_SECURITY_PROBLEM +#define INET_E_SECURITY_PROBLEM 0x800C000EL +#endif + +#ifndef INET_E_CANNOT_LOAD_DATA +#define INET_E_CANNOT_LOAD_DATA 0x800C000FL +#endif + +#ifndef INET_E_CANNOT_INSTANTIATE_OBJECT +#define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010L +#endif + +#ifndef INET_E_QUERYOPTION_UNKNOWN +#define INET_E_QUERYOPTION_UNKNOWN 0x800C0013L +#endif + +#ifndef INET_E_REDIRECT_FAILED +#define INET_E_REDIRECT_FAILED 0x800C0014L +#endif + +#ifndef INET_E_REDIRECT_TO_DIR +#define INET_E_REDIRECT_TO_DIR 0x800C0015L +#endif + +#ifndef INET_E_CANNOT_LOCK_REQUEST +#define INET_E_CANNOT_LOCK_REQUEST 0x800C0016L +#endif + +#ifndef INET_E_USE_EXTEND_BINDING +#define INET_E_USE_EXTEND_BINDING 0x800C0017L +#endif + +#ifndef INET_E_TERMINATED_BIND +#define INET_E_TERMINATED_BIND 0x800C0018L +#endif + +#ifndef INET_E_INVALID_CERTIFICATE +#define INET_E_INVALID_CERTIFICATE 0x800C0019L +#endif + +#ifndef INET_E_CODE_DOWNLOAD_DECLINED +#define INET_E_CODE_DOWNLOAD_DECLINED 0x800C0100L +#endif + +#ifndef INET_E_RESULT_DISPATCHED +#define INET_E_RESULT_DISPATCHED 0x800C0200L +#endif + +#ifndef INET_E_CANNOT_REPLACE_SFP_FILE +#define INET_E_CANNOT_REPLACE_SFP_FILE 0x800C0300L +#endif + +#ifndef INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY +#define INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY 0x800C0500L +#endif + +#ifndef INET_E_CODE_INSTALL_SUPPRESSED +#define INET_E_CODE_INSTALL_SUPPRESSED 0x800C0400L +#endif + +#ifndef MUI_LANGUAGE_NAME +#define MUI_LANGUAGE_NAME 0x8 +#endif + + /* + * In addition to the declarations for VC++, the following are required for WinCE + */ + +#ifdef __WXWINCE__ + #include "wx/msw/wince/missing.h" +#endif + + /* + * The following are specifically required for Wine + */ + +#ifdef __WINE__ + #ifndef ENUM_CURRENT_SETTINGS + #define ENUM_CURRENT_SETTINGS ((DWORD)-1) + #endif + #ifndef BROADCAST_QUERY_DENY + #define BROADCAST_QUERY_DENY 1112363332 + #endif +#endif // defined __WINE__ + +#ifndef INVALID_FILE_ATTRIBUTES + #define INVALID_FILE_ATTRIBUTES ((DWORD)-1) +#endif + +#endif + // _WX_MISSING_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/msgdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/msgdlg.h new file mode 100644 index 0000000000..3562a362c3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/msgdlg.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/msgdlg.h +// Purpose: wxMessageDialog class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSGBOXDLG_H_ +#define _WX_MSGBOXDLG_H_ + +class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase +{ +public: + wxMessageDialog(wxWindow *parent, + const wxString& message, + const wxString& caption = wxMessageBoxCaptionStr, + long style = wxOK|wxCENTRE, + const wxPoint& WXUNUSED(pos) = wxDefaultPosition) + : wxMessageDialogBase(parent, message, caption, style) + { + m_hook = NULL; + } + + virtual int ShowModal(); + + virtual long GetEffectiveIcon() const; + + // implementation-specific + + // return the font used for the text in the message box + static wxFont GetMessageFont(); + +protected: + // Override this as task dialogs are always centered on parent. + virtual void DoCentre(int dir); + +private: + // hook procedure used to adjust the message box beyond what the standard + // MessageBox() function can do for us + static WXLRESULT wxCALLBACK HookFunction(int code, WXWPARAM, WXLPARAM); + + static const struct ButtonAccessors + { + int id; + wxString (wxMessageDialog::*getter)() const; + } ms_buttons[]; + + // replace the static text control with a text control in order to show + // scrollbar (and also, incidentally, allow text selection) + void ReplaceStaticWithEdit(); + + // adjust the button labels + // + // this is called from HookFunction() and our HWND is valid at this moment + void AdjustButtonLabels(); + + // offset all buttons starting from the first one given by dx to the right + void OffsetButtonsStartingFrom(int first, int dx); + + // used by ShowModal() to display a message box when task dialogs + // aren't available. + int ShowMessageBox(); + + + WXHANDLE m_hook; // HHOOK used to position the message box + + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxMessageDialog); +}; + + +#endif // _WX_MSGBOXDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mslu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mslu.h new file mode 100644 index 0000000000..d8b9441b38 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/mslu.h @@ -0,0 +1,22 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/mslu.h +// Purpose: MSLU-related declarations +// Author: Vaclav Slavik +// Modified by: Vadim Zeitlin to move out various functions to other files +// to fix header inter-dependencies +// Created: 2002/02/17 +// Copyright: (c) 2002 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSLU_H_ +#define _WX_MSLU_H_ + +#include "wx/defs.h" + +// Returns true if we are running under Unicode emulation in Win9x environment. +// Workaround hacks take effect only if this condition is met +// (NB: this function is needed even if !wxUSE_UNICODE_MSLU) +WXDLLIMPEXP_BASE bool wxUsingUnicowsDll(); + +#endif // _WX_MSLU_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/msvcrt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/msvcrt.h new file mode 100644 index 0000000000..e92a88d841 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/msvcrt.h @@ -0,0 +1,69 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/msvcrt.h +// Purpose: macros to use some non-standard features of MS Visual C++ +// C run-time library +// Author: Vadim Zeitlin +// Modified by: +// Created: 31.01.1999 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// the goal of this file is to define wxCrtSetDbgFlag() macro which may be +// used like this: +// wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); +// to turn on memory leak checks for programs compiled with Microsoft Visual +// C++ (5.0+). The macro will not be defined under other compilers or if it +// can't be used with MSVC for whatever reason. + +#ifndef _MSW_MSVCRT_H_ +#define _MSW_MSVCRT_H_ + +// use debug CRT functions for memory leak detections in VC++ 5.0+ in debug +// builds +#undef wxUSE_VC_CRTDBG +#if defined(_DEBUG) && defined(__VISUALC__) && (__VISUALC__ >= 1000) \ + && !defined(UNDER_CE) + // it doesn't combine well with wxWin own memory debugging methods + #if !wxUSE_GLOBAL_MEMORY_OPERATORS && !wxUSE_MEMORY_TRACING && !defined(__NO_VC_CRTDBG__) + #define wxUSE_VC_CRTDBG + #endif +#endif + +#ifdef wxUSE_VC_CRTDBG + // Need to undef new if including crtdbg.h which may redefine new itself + #ifdef new + #undef new + #endif + + #include <stdlib.h> + + // Defining _CRTBLD should never be necessary at all, but keep it for now + // as there is no time to retest all the compilers before 3.0 release. + // Definitely do not use it with MSVS 2013 as defining it results in errors + // if the standard <assert.h> is included afterwards. + #if !defined(_CRTBLD) && !wxCHECK_VISUALC_VERSION(12) + // Needed when building with pure MS SDK + #define _CRTBLD + #endif + + #include <crtdbg.h> + + #undef WXDEBUG_NEW + #define WXDEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) + + // this define works around a bug with inline declarations of new, see + // + // http://support.microsoft.com/kb/q140858/ + // + // for the details + #define new WXDEBUG_NEW + + #define wxCrtSetDbgFlag(flag) \ + _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | (flag)) +#else // !using VC CRT + #define wxCrtSetDbgFlag(flag) +#endif // wxUSE_VC_CRTDBG + +#endif // _MSW_MSVCRT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/nonownedwnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/nonownedwnd.h new file mode 100644 index 0000000000..72e3e6b072 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/nonownedwnd.h @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/nonownedwnd.h +// Purpose: wxNonOwnedWindow declaration for wxMSW. +// Author: Vadim Zeitlin +// Created: 2011-10-09 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_NONOWNEDWND_H_ +#define _WX_MSW_NONOWNEDWND_H_ + +class wxNonOwnedWindowShapeImpl; + +// ---------------------------------------------------------------------------- +// wxNonOwnedWindow +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase +{ +public: + wxNonOwnedWindow(); + virtual ~wxNonOwnedWindow(); + +protected: + virtual bool DoClearShape(); + virtual bool DoSetRegionShape(const wxRegion& region); +#if wxUSE_GRAPHICS_CONTEXT + virtual bool DoSetPathShape(const wxGraphicsPath& path); + +private: + wxNonOwnedWindowShapeImpl* m_shapeImpl; +#endif // wxUSE_GRAPHICS_CONTEXT + + wxDECLARE_NO_COPY_CLASS(wxNonOwnedWindow); +}; + +#endif // _WX_MSW_NONOWNEDWND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/notebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/notebook.h new file mode 100644 index 0000000000..ceda97127a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/notebook.h @@ -0,0 +1,213 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/notebook.h +// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet) +// Author: Robert Roebling +// Modified by: Vadim Zeitlin for Windows version +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _NOTEBOOK_H +#define _NOTEBOOK_H + +#if wxUSE_NOTEBOOK + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/control.h" + +// ---------------------------------------------------------------------------- +// wxNotebook +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase +{ +public: + // ctors + // ----- + // default for dynamic class + wxNotebook(); + // the same arguments as for wxControl (@@@ any special styles?) + wxNotebook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr); + // Create() function + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr); + virtual ~wxNotebook(); + + // accessors + // --------- + // get number of pages in the dialog + virtual size_t GetPageCount() const; + + // set the currently selected page, return the index of the previously + // selected one (or wxNOT_FOUND on error) + // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events + int SetSelection(size_t nPage); + + // changes selected page without sending events + int ChangeSelection(size_t nPage); + + // set/get the title of a page + bool SetPageText(size_t nPage, const wxString& strText); + wxString GetPageText(size_t nPage) const; + + // image list stuff: each page may have an image associated with it. All + // the images belong to an image list, so you have to + // 1) create an image list + // 2) associate it with the notebook + // 3) set for each page it's image + // associate image list with a control + void SetImageList(wxImageList* imageList); + + // sets/returns item's image index in the current image list + int GetPageImage(size_t nPage) const; + bool SetPageImage(size_t nPage, int nImage); + + // currently it's always 1 because wxGTK doesn't support multi-row + // tab controls + int GetRowCount() const; + + // control the appearance of the notebook pages + // set the size (the same for all pages) + void SetPageSize(const wxSize& size); + // set the padding between tabs (in pixels) + void SetPadding(const wxSize& padding); + + // operations + // ---------- + // remove all pages + bool DeleteAllPages(); + + // inserts a new page to the notebook (it will be deleted ny the notebook, + // don't delete it yourself). If bSelect, this page becomes active. + bool InsertPage(size_t nPage, + wxNotebookPage *pPage, + const wxString& strText, + bool bSelect = false, + int imageId = NO_IMAGE); + + // Windows-only at present. Also, you must use the wxNB_FIXEDWIDTH + // style. + void SetTabSize(const wxSize& sz); + + // hit test + virtual int HitTest(const wxPoint& pt, long *flags = NULL) const; + + // calculate the size of the notebook from the size of its page + virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; + + // callbacks + // --------- + void OnSize(wxSizeEvent& event); + void OnNavigationKey(wxNavigationKeyEvent& event); + + // base class virtuals + // ------------------- + + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + virtual bool MSWOnScroll(int orientation, WXWORD nSBCode, + WXWORD pos, WXHWND control); + +#if wxUSE_CONSTRAINTS + virtual void SetConstraintSizes(bool recurse = true); + virtual bool DoPhase(int nPhase); +#endif // wxUSE_CONSTRAINTS + + // Attempts to get colour for UX theme page background + wxColour GetThemeBackgroundColour() const; + + // implementation only + // ------------------- + +#if wxUSE_UXTHEME + virtual bool SetBackgroundColour(const wxColour& colour) + { + if ( !wxNotebookBase::SetBackgroundColour(colour) ) + return false; + + UpdateBgBrush(); + + return true; + } + + // draw child background + virtual bool MSWPrintChild(WXHDC hDC, wxWindow *win); + + virtual bool MSWHasInheritableBackground() const { return true; } +#endif // wxUSE_UXTHEME + + // translate wxWin styles to the Windows ones + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const; + +protected: + // common part of all ctors + void Init(); + + // hides the currently shown page and shows the given one (if not -1) and + // updates m_selection accordingly + void UpdateSelection(int selNew); + + // remove one page from the notebook, without deleting + virtual wxNotebookPage *DoRemovePage(size_t nPage); + + // get the page rectangle for the current notebook size + // + // returns empty rectangle if an error occurs, do test for it + wxRect GetPageSize() const; + + // set the size of the given page to fit in the notebook + void AdjustPageSize(wxNotebookPage *page); + +#if wxUSE_UXTHEME + // return the themed brush for painting our children + virtual WXHBRUSH MSWGetCustomBgBrush() { return m_hbrBackground; } + + // gets the bitmap of notebook background and returns a brush from it + WXHBRUSH QueryBgBitmap(); + + // creates the brush to be used for drawing the tab control background + void UpdateBgBrush(); + + // common part of QueryBgBitmap() and MSWPrintChild() + // + // if child == NULL, draw background for the entire notebook itself + bool DoDrawBackground(WXHDC hDC, wxWindow *child = NULL); +#endif // wxUSE_UXTHEME + + // these function are only used for reducing flicker on notebook resize and + // we don't need to do this for WinCE +#ifndef __WXWINCE__ + void OnEraseBackground(wxEraseEvent& event); + void OnPaint(wxPaintEvent& event); + + // true if we have already subclassed our updown control + bool m_hasSubclassedUpdown; + + // true if we already refreshed the current page after showing the window + bool m_doneUpdateHack; +#endif // __WXWINCE__ + +#if wxUSE_UXTHEME + // background brush used to paint the tab control + WXHBRUSH m_hbrBackground; +#endif // wxUSE_UXTHEME + + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxNotebook) + DECLARE_EVENT_TABLE() +}; + +#endif // wxUSE_NOTEBOOK + +#endif // _NOTEBOOK_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/notifmsg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/notifmsg.h new file mode 100644 index 0000000000..b7e0e0e867 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/notifmsg.h @@ -0,0 +1,74 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/notifmsg.h +// Purpose: implementation of wxNotificationMessage for Windows +// Author: Vadim Zeitlin +// Created: 2007-12-01 +// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_NOTIFMSG_H_ +#define _WX_MSW_NOTIFMSG_H_ + +class WXDLLIMPEXP_FWD_ADV wxTaskBarIcon; + +// ---------------------------------------------------------------------------- +// wxNotificationMessage +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxNotificationMessage : public wxNotificationMessageBase +{ +public: + wxNotificationMessage() { Init(); } + wxNotificationMessage(const wxString& title, + const wxString& message = wxString(), + wxWindow *parent = NULL, + int flags = wxICON_INFORMATION) + : wxNotificationMessageBase(title, message, parent, flags) + { + Init(); + } + + virtual ~wxNotificationMessage(); + + + virtual bool Show(int timeout = Timeout_Auto); + virtual bool Close(); + + // MSW implementation-specific methods + + // by default, wxNotificationMessage under MSW creates a temporary taskbar + // icon to which it attaches the notification, if there is an existing + // taskbar icon object in the application you may want to call this method + // to attach the notification to it instead (we won't take ownership of it + // and you can also pass NULL to not use the icon for notifications any + // more) + // + // returns the task bar icon which was used previously (may be NULL) + static wxTaskBarIcon *UseTaskBarIcon(wxTaskBarIcon *icon); + + // call this to always use the generic implementation, even if the system + // supports the balloon tooltips used by the native one + static void AlwaysUseGeneric(bool alwaysUseGeneric) + { + ms_alwaysUseGeneric = alwaysUseGeneric; + } + +private: + // common part of all ctors + void Init() { m_impl = NULL; } + + + // flag indicating whether we should always use generic implementation + static bool ms_alwaysUseGeneric; + + // the real implementation of this class (selected during run-time because + // the balloon task bar icons are not available in all Windows versions) + class wxNotifMsgImpl *m_impl; + + + wxDECLARE_NO_COPY_CLASS(wxNotificationMessage); +}; + +#endif // _WX_MSW_NOTIFMSG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/access.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/access.h new file mode 100644 index 0000000000..980943edb8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/access.h @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ole/access.h +// Purpose: declaration of the wxAccessible class +// Author: Julian Smart +// Modified by: +// Created: 2003-02-12 +// Copyright: (c) 2003 Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ACCESS_H_ +#define _WX_ACCESS_H_ + +#if wxUSE_ACCESSIBILITY + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class wxIAccessible; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// ---------------------------------------------------------------------------- +// wxAccessible implements accessibility behaviour. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxAccessible : public wxAccessibleBase +{ +public: + wxAccessible(wxWindow *win = NULL); + virtual ~wxAccessible(); + +// Overridables + +// Accessors + + // Returns the wxIAccessible pointer + wxIAccessible* GetIAccessible() { return m_pIAccessible; } + + // Returns the IAccessible standard interface pointer + void* GetIAccessibleStd() ; + +// Operations + + // Sends an event when something changes in an accessible object. + static void NotifyEvent(int eventType, wxWindow* window, wxAccObject objectType, + int objectId); + +protected: + void Init(); + +private: + wxIAccessible * m_pIAccessible; // the pointer to COM interface + void* m_pIAccessibleStd; // the pointer to the standard COM interface, + // for default processing + + wxDECLARE_NO_COPY_CLASS(wxAccessible); +}; + +#endif //wxUSE_ACCESSIBILITY + +#endif //_WX_ACCESS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/activex.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/activex.h new file mode 100644 index 0000000000..76dca3c36e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/activex.h @@ -0,0 +1,263 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ole/activex.h +// Purpose: wxActiveXContainer class +// Author: Ryan Norton <wxprojects@comcast.net> +// Modified by: +// Created: 8/18/05 +// Copyright: (c) Ryan Norton +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// Definitions +// ============================================================================ + +#ifndef _WX_MSW_OLE_ACTIVEXCONTAINER_H_ +#define _WX_MSW_OLE_ACTIVEXCONTAINER_H_ + +#if wxUSE_ACTIVEX + +//--------------------------------------------------------------------------- +// wx includes +//--------------------------------------------------------------------------- + +#include "wx/msw/ole/oleutils.h" // wxBasicString &c +#include "wx/msw/ole/uuid.h" +#include "wx/window.h" +#include "wx/variant.h" + +class FrameSite; + +//--------------------------------------------------------------------------- +// MSW COM includes +//--------------------------------------------------------------------------- +#include <oleidl.h> +#include <olectl.h> + +#if !defined(__WXWINCE__) || defined(__WINCE_STANDARDSDK__) +#include <exdisp.h> +#endif + +#include <docobj.h> + +#ifndef STDMETHOD + #define STDMETHOD(funcname) virtual HRESULT wxSTDCALL funcname +#endif + +// +// These defines are from another ole header - but its not in the +// latest sdk. Also the ifndef DISPID_READYSTATE is here because at +// least on my machine with the latest sdk olectl.h defines these 3 +// +#ifndef DISPID_READYSTATE + #define DISPID_READYSTATE (-525) + #define DISPID_READYSTATECHANGE (-609) + #define DISPID_AMBIENT_TRANSFERPRIORITY (-728) +#endif + +#define DISPID_AMBIENT_OFFLINEIFNOTCONNECTED (-5501) +#define DISPID_AMBIENT_SILENT (-5502) + +#ifndef DISPID_AMBIENT_CODEPAGE + #define DISPID_AMBIENT_CODEPAGE (-725) + #define DISPID_AMBIENT_CHARSET (-727) +#endif + + +//--------------------------------------------------------------------------- +// +// wxActiveXContainer +// +//--------------------------------------------------------------------------- + +template<typename I> +class wxAutoOleInterface +{ +public: + typedef I Interface; + + explicit wxAutoOleInterface(I *pInterface = NULL) : m_interface(pInterface) + {} + wxAutoOleInterface(REFIID riid, IUnknown *pUnk) : m_interface(NULL) + { QueryInterface(riid, pUnk); } + wxAutoOleInterface(REFIID riid, IDispatch *pDispatch) : m_interface(NULL) + { QueryInterface(riid, pDispatch); } + wxAutoOleInterface(REFCLSID clsid, REFIID riid) : m_interface(NULL) + { CreateInstance(clsid, riid); } + wxAutoOleInterface(const wxAutoOleInterface& ti) : m_interface(NULL) + { operator=(ti); } + + wxAutoOleInterface& operator=(const wxAutoOleInterface& ti) + { + if ( ti.m_interface ) + ti.m_interface->AddRef(); + Free(); + m_interface = ti.m_interface; + return *this; + } + + wxAutoOleInterface& operator=(I*& ti) + { + Free(); + m_interface = ti; + return *this; + } + + ~wxAutoOleInterface() { Free(); } + + void Free() + { + if ( m_interface ) + m_interface->Release(); + m_interface = NULL; + } + + HRESULT QueryInterface(REFIID riid, IUnknown *pUnk) + { + Free(); + wxASSERT(pUnk != NULL); + return pUnk->QueryInterface(riid, (void **)&m_interface); + } + + HRESULT CreateInstance(REFCLSID clsid, REFIID riid) + { + Free(); + return CoCreateInstance + ( + clsid, + NULL, + CLSCTX_ALL, + riid, + (void **)&m_interface + ); + } + + operator I*() const {return m_interface; } + I* operator->() {return m_interface; } + I** GetRef() {return &m_interface; } + bool Ok() const { return IsOk(); } + bool IsOk() const { return m_interface != NULL; } + +protected: + I *m_interface; +}; + +#if WXWIN_COMPATIBILITY_2_8 +// this macro is kept for compatibility with older wx versions +#define WX_DECLARE_AUTOOLE(wxAutoOleInterfaceType, I) \ + typedef wxAutoOleInterface<I> wxAutoOleInterfaceType; +#endif // WXWIN_COMPATIBILITY_2_8 + +typedef wxAutoOleInterface<IDispatch> wxAutoIDispatch; +typedef wxAutoOleInterface<IOleClientSite> wxAutoIOleClientSite; +typedef wxAutoOleInterface<IUnknown> wxAutoIUnknown; +typedef wxAutoOleInterface<IOleObject> wxAutoIOleObject; +typedef wxAutoOleInterface<IOleInPlaceObject> wxAutoIOleInPlaceObject; +typedef wxAutoOleInterface<IOleInPlaceActiveObject> wxAutoIOleInPlaceActiveObject; +typedef wxAutoOleInterface<IOleDocumentView> wxAutoIOleDocumentView; +typedef wxAutoOleInterface<IViewObject> wxAutoIViewObject; + +class WXDLLIMPEXP_CORE wxActiveXContainer : public wxWindow +{ +public: + wxActiveXContainer(wxWindow * parent, REFIID iid, IUnknown* pUnk); + virtual ~wxActiveXContainer(); + + void OnSize(wxSizeEvent&); + void OnPaint(wxPaintEvent&); + void OnSetFocus(wxFocusEvent&); + void OnKillFocus(wxFocusEvent&); + virtual bool MSWTranslateMessage(WXMSG* pMsg); + virtual bool QueryClientSiteInterface(REFIID iid, void **_interface, const char *&desc); + +protected: + friend class FrameSite; + friend class wxActiveXEvents; + + FrameSite *m_frameSite; + wxAutoIDispatch m_Dispatch; + wxAutoIOleClientSite m_clientSite; + wxAutoIUnknown m_ActiveX; + wxAutoIOleObject m_oleObject; + wxAutoIOleInPlaceObject m_oleInPlaceObject; + wxAutoIOleInPlaceActiveObject m_oleInPlaceActiveObject; + wxAutoIOleDocumentView m_docView; + wxAutoIViewObject m_viewObject; + HWND m_oleObjectHWND; + bool m_bAmbientUserMode; + DWORD m_docAdviseCookie; + wxWindow* m_realparent; + + void CreateActiveX(REFIID, IUnknown*); +}; + +///\brief Store native event parameters. +///\detail Store OLE 'Invoke' parameters for event handlers that need to access them. +/// These are the exact values for the event as they are passed to the wxActiveXContainer. +struct wxActiveXEventNativeMSW +{ + DISPID dispIdMember; + REFIID riid; + LCID lcid; + WORD wFlags; + DISPPARAMS *pDispParams; + VARIANT *pVarResult; + EXCEPINFO *pExcepInfo; + unsigned int *puArgErr; + + wxActiveXEventNativeMSW + (DISPID a_dispIdMember, REFIID a_riid, LCID a_lcid, WORD a_wFlags, DISPPARAMS *a_pDispParams, + VARIANT *a_pVarResult, EXCEPINFO *a_pExcepInfo, unsigned int *a_puArgErr) + :dispIdMember(a_dispIdMember), riid(a_riid), lcid(a_lcid), wFlags(a_wFlags), pDispParams(a_pDispParams), + pVarResult(a_pVarResult), pExcepInfo(a_pExcepInfo), puArgErr(a_puArgErr) + { } +}; + +// Events +class WXDLLIMPEXP_CORE wxActiveXEvent : public wxCommandEvent +{ +private: + friend class wxActiveXEvents; + wxVariant m_params; + DISPID m_dispid; + +public: + virtual wxEvent *Clone() const + { return new wxActiveXEvent(*this); } + + size_t ParamCount() const; + + wxString ParamType(size_t idx) const + { + wxASSERT(idx < ParamCount()); + return m_params[idx].GetType(); + } + + wxString ParamName(size_t idx) const + { + wxASSERT(idx < ParamCount()); + return m_params[idx].GetName(); + } + + wxVariant& operator[] (size_t idx); + + DISPID GetDispatchId() const + { return m_dispid; } + + wxActiveXEventNativeMSW *GetNativeParameters() const + { return (wxActiveXEventNativeMSW*)GetClientData(); } +}; + +// #define wxACTIVEX_ID 14001 +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_ACTIVEX, wxActiveXEvent ); + +typedef void (wxEvtHandler::*wxActiveXEventFunction)(wxActiveXEvent&); + +#define wxActiveXEventHandler(func) \ + wxEVENT_HANDLER_CAST( wxActiveXEventFunction, func ) + +#define EVT_ACTIVEX(id, fn) wxDECLARE_EVENT_TABLE_ENTRY(wxEVT_ACTIVEX, id, -1, wxActiveXEventHandler( fn ), NULL ), + +#endif // wxUSE_ACTIVEX + +#endif // _WX_MSW_OLE_ACTIVEXCONTAINER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/automtn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/automtn.h new file mode 100644 index 0000000000..1d1eb33af3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/automtn.h @@ -0,0 +1,140 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ole/automtn.h +// Purpose: OLE automation utilities +// Author: Julian Smart +// Modified by: +// Created: 11/6/98 +// Copyright: (c) 1998, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_AUTOMTN_H_ +#define _WX_AUTOMTN_H_ + +#include "wx/defs.h" + +#if wxUSE_OLE_AUTOMATION + +#include "wx/object.h" +#include "wx/variant.h" + +typedef void WXIDISPATCH; +typedef unsigned short* WXBSTR; +typedef unsigned long WXLCID; + +#ifdef GetObject +#undef GetObject +#endif + +// Flags used with wxAutomationObject::GetInstance() +enum wxAutomationInstanceFlags +{ + // Only use the existing instance, never create a new one. + wxAutomationInstance_UseExistingOnly = 0, + + // Create a new instance if there are no existing ones. + wxAutomationInstance_CreateIfNeeded = 1, + + // Do not log errors if we failed to get the existing instance because none + // is available. + wxAutomationInstance_SilentIfNone = 2 +}; + +/* + * wxAutomationObject + * Wraps up an IDispatch pointer and invocation; does variant conversion. + */ + +class WXDLLIMPEXP_CORE wxAutomationObject: public wxObject +{ +public: + wxAutomationObject(WXIDISPATCH* dispatchPtr = NULL); + virtual ~wxAutomationObject(); + + // Set/get dispatch pointer + void SetDispatchPtr(WXIDISPATCH* dispatchPtr) { m_dispatchPtr = dispatchPtr; } + WXIDISPATCH* GetDispatchPtr() const { return m_dispatchPtr; } + bool IsOk() const { return m_dispatchPtr != NULL; } + + // Get a dispatch pointer from the current object associated + // with a ProgID, such as "Excel.Application" + bool GetInstance(const wxString& progId, + int flags = wxAutomationInstance_CreateIfNeeded) const; + + // Get a dispatch pointer from a new instance of the class + bool CreateInstance(const wxString& progId) const; + + // Low-level invocation function. Pass either an array of variants, + // or an array of pointers to variants. + bool Invoke(const wxString& member, int action, + wxVariant& retValue, int noArgs, wxVariant args[], const wxVariant* ptrArgs[] = 0) const; + + // Invoke a member function + wxVariant CallMethod(const wxString& method, int noArgs, wxVariant args[]); + wxVariant CallMethodArray(const wxString& method, int noArgs, const wxVariant **args); + + // Convenience function + wxVariant CallMethod(const wxString& method, + const wxVariant& arg1 = wxNullVariant, const wxVariant& arg2 = wxNullVariant, + const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant, + const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant); + + // Get/Put property + wxVariant GetProperty(const wxString& property, int noArgs = 0, wxVariant args[] = NULL) const; + wxVariant GetPropertyArray(const wxString& property, int noArgs, const wxVariant **args) const; + wxVariant GetProperty(const wxString& property, + const wxVariant& arg1, const wxVariant& arg2 = wxNullVariant, + const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant, + const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant); + + bool PutPropertyArray(const wxString& property, int noArgs, const wxVariant **args); + bool PutProperty(const wxString& property, int noArgs, wxVariant args[]) ; + bool PutProperty(const wxString& property, + const wxVariant& arg1, const wxVariant& arg2 = wxNullVariant, + const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant, + const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant); + + // Uses DISPATCH_PROPERTYGET + // and returns a dispatch pointer. The calling code should call Release + // on the pointer, though this could be implicit by constructing an wxAutomationObject + // with it and letting the destructor call Release. + WXIDISPATCH* GetDispatchProperty(const wxString& property, int noArgs, wxVariant args[]) const; + WXIDISPATCH* GetDispatchProperty(const wxString& property, int noArgs, const wxVariant **args) const; + + // A way of initialising another wxAutomationObject with a dispatch object, + // without having to deal with nasty IDispatch pointers. + bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs = 0, wxVariant args[] = NULL) const; + bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs, const wxVariant **args) const; + + // Returns the locale identifier used in automation calls. The default is + // LOCALE_SYSTEM_DEFAULT. Objects obtained by GetObject() inherit the + // locale identifier from the one that created them. + WXLCID GetLCID() const; + + // Sets the locale identifier to be used in automation calls performed by + // this object. The default is LOCALE_SYSTEM_DEFAULT. + void SetLCID(WXLCID lcid); + + // Returns the flags used for conversions between wxVariant and OLE + // VARIANT, see wxOleConvertVariantFlags. The default value is + // wxOleConvertVariant_Default but all the objects obtained by GetObject() + // inherit the flags from the one that created them. + long GetConvertVariantFlags() const; + + // Sets the flags used for conversions between wxVariant and OLE VARIANT, + // see wxOleConvertVariantFlags (default is wxOleConvertVariant_Default. + void SetConvertVariantFlags(long flags); + +public: // public for compatibility only, don't use m_dispatchPtr directly. + WXIDISPATCH* m_dispatchPtr; + +private: + WXLCID m_lcid; + long m_convertVariantFlags; + + wxDECLARE_NO_COPY_CLASS(wxAutomationObject); +}; + +#endif // wxUSE_OLE_AUTOMATION + +#endif // _WX_AUTOMTN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dataform.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dataform.h new file mode 100644 index 0000000000..26959099f7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dataform.h @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ole/dataform.h +// Purpose: declaration of the wxDataFormat class +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.10.99 (extracted from msw/ole/dataobj.h) +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_OLE_DATAFORM_H +#define _WX_MSW_OLE_DATAFORM_H + +// ---------------------------------------------------------------------------- +// wxDataFormat identifies the single format of data +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDataFormat +{ +public: + // the clipboard formats under Win32 are WORD's + typedef unsigned short NativeFormat; + + wxDataFormat(NativeFormat format = wxDF_INVALID) { m_format = format; } + + // we need constructors from all string types as implicit conversions to + // wxString don't apply when we already rely on implicit conversion of a, + // for example, "char *" string to wxDataFormat, and existing code does it + wxDataFormat(const wxString& format) { SetId(format); } + wxDataFormat(const char *format) { SetId(format); } + wxDataFormat(const wchar_t *format) { SetId(format); } + wxDataFormat(const wxCStrData& format) { SetId(format); } + + wxDataFormat& operator=(NativeFormat format) + { m_format = format; return *this; } + wxDataFormat& operator=(const wxDataFormat& format) + { m_format = format.m_format; return *this; } + + // default copy ctor/assignment operators ok + + // comparison (must have both versions) + bool operator==(wxDataFormatId format) const; + bool operator!=(wxDataFormatId format) const; + bool operator==(const wxDataFormat& format) const; + bool operator!=(const wxDataFormat& format) const; + + // explicit and implicit conversions to NativeFormat which is one of + // standard data types (implicit conversion is useful for preserving the + // compatibility with old code) + NativeFormat GetFormatId() const { return m_format; } + operator NativeFormat() const { return m_format; } + + // this works with standard as well as custom ids + void SetType(NativeFormat format) { m_format = format; } + NativeFormat GetType() const { return m_format; } + + // string ids are used for custom types - this SetId() must be used for + // application-specific formats + wxString GetId() const; + void SetId(const wxString& format); + + // returns true if the format is one of those defined in wxDataFormatId + bool IsStandard() const { return m_format > 0 && m_format < wxDF_PRIVATE; } + +private: + NativeFormat m_format; +}; + +#endif // _WX_MSW_OLE_DATAFORM_H + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dataobj.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dataobj.h new file mode 100644 index 0000000000..cc1002766a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dataobj.h @@ -0,0 +1,78 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ole/dataobj.h +// Purpose: declaration of the wxDataObject class +// Author: Vadim Zeitlin +// Modified by: +// Created: 10.05.98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_OLE_DATAOBJ_H +#define _WX_MSW_OLE_DATAOBJ_H + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +struct IDataObject; + +// ---------------------------------------------------------------------------- +// wxDataObject is a "smart" and polymorphic piece of data. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase +{ +public: + // ctor & dtor + wxDataObject(); + virtual ~wxDataObject(); + + // retrieve IDataObject interface (for other OLE related classes) + IDataObject *GetInterface() const { return m_pIDataObject; } + + // tell the object that it should be now owned by IDataObject - i.e. when + // it is deleted, it should delete us as well + void SetAutoDelete(); + + // return true if we support this format in "Get" direction + bool IsSupportedFormat(const wxDataFormat& format) const + { return wxDataObjectBase::IsSupported(format, Get); } + + // if this method returns false, this wxDataObject will be copied to + // the clipboard with its size prepended to it, which is compatible with + // older wx versions + // + // if returns true, then this wxDataObject will be copied to the clipboard + // without any additional information and ::HeapSize() function will be used + // to get the size of that data + virtual bool NeedsVerbatimData(const wxDataFormat& WXUNUSED(format)) const + { + // return false from here only for compatibility with earlier wx versions + return true; + } + + // function to return symbolic name of clipboard format (for debug messages) +#ifdef __WXDEBUG__ + static const wxChar *GetFormatName(wxDataFormat format); + + #define wxGetFormatName(format) wxDataObject::GetFormatName(format) +#else // !Debug + #define wxGetFormatName(format) wxT("") +#endif // Debug/!Debug + // they need to be accessed from wxIDataObject, so made them public, + // or wxIDataObject friend +public: + virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size, + const wxDataFormat& format ); + virtual void* SetSizeInBuffer( void* buffer, size_t size, + const wxDataFormat& format ); + virtual size_t GetBufferOffset( const wxDataFormat& format ); + +private: + IDataObject *m_pIDataObject; // pointer to the COM interface + + wxDECLARE_NO_COPY_CLASS(wxDataObject); +}; + +#endif //_WX_MSW_OLE_DATAOBJ_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dataobj2.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dataobj2.h new file mode 100644 index 0000000000..9b97e9fb0a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dataobj2.h @@ -0,0 +1,145 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ole/dataobj2.h +// Purpose: second part of platform specific wxDataObject header - +// declarations of predefined wxDataObjectSimple-derived classes +// Author: Vadim Zeitlin +// Modified by: +// Created: 21.10.99 +// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_OLE_DATAOBJ2_H +#define _WX_MSW_OLE_DATAOBJ2_H + +// ---------------------------------------------------------------------------- +// wxBitmapDataObject is a specialization of wxDataObject for bitmap data +// +// NB: in fact, under MSW we support CF_DIB (and not CF_BITMAP) clipboard +// format and we also provide wxBitmapDataObject2 for CF_BITMAP (which is +// rarely used). This is ugly, but I haven't found a solution for it yet. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase +{ +public: + // ctors + wxBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap) + : wxBitmapDataObjectBase(bitmap) + { + SetFormat(wxDF_DIB); + + m_data = NULL; + } + + // implement base class pure virtuals + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + + virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const + { return GetDataSize(); } + virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format), + void *buf) const + { return GetDataHere(buf); } + virtual bool SetData(const wxDataFormat& WXUNUSED(format), + size_t len, const void *buf) + { return SetData(len, buf); } + +private: + // the DIB data + void /* BITMAPINFO */ *m_data; + + wxDECLARE_NO_COPY_CLASS(wxBitmapDataObject); +}; + +// ---------------------------------------------------------------------------- +// wxBitmapDataObject2 - a data object for CF_BITMAP +// +// FIXME did I already mention it was ugly? +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapDataObject2 : public wxBitmapDataObjectBase +{ +public: + // ctors + wxBitmapDataObject2(const wxBitmap& bitmap = wxNullBitmap) + : wxBitmapDataObjectBase(bitmap) + { + } + + // implement base class pure virtuals + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + + virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const + { return GetDataSize(); } + virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format), + void *buf) const + { return GetDataHere(buf); } + virtual bool SetData(const wxDataFormat& WXUNUSED(format), + size_t len, const void *buf) + { return SetData(len, buf); } + +private: + wxDECLARE_NO_COPY_CLASS(wxBitmapDataObject2); +}; + +// ---------------------------------------------------------------------------- +// wxFileDataObject - data object for CF_HDROP +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDataObject : public wxFileDataObjectBase +{ +public: + wxFileDataObject() { } + + // implement base class pure virtuals + virtual bool SetData(size_t len, const void *buf); + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *pData) const; + virtual void AddFile(const wxString& file); + + virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const + { return GetDataSize(); } + virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format), + void *buf) const + { return GetDataHere(buf); } + virtual bool SetData(const wxDataFormat& WXUNUSED(format), + size_t len, const void *buf) + { return SetData(len, buf); } + +private: + wxDECLARE_NO_COPY_CLASS(wxFileDataObject); +}; + +// ---------------------------------------------------------------------------- +// wxURLDataObject: data object for URLs +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxURLDataObject : public wxDataObjectComposite +{ +public: + // initialize with URL in ctor or use SetURL later + wxURLDataObject(const wxString& url = wxEmptyString); + + // return the URL as string + wxString GetURL() const; + + // Set a string as the URL in the data object + void SetURL(const wxString& url); + + // override to set m_textFormat + virtual bool SetData(const wxDataFormat& format, + size_t len, + const void *buf); + +private: + // last data object we got data in + wxDataObjectSimple *m_dataObjectLast; + + wxDECLARE_NO_COPY_CLASS(wxURLDataObject); +}; + +#endif // _WX_MSW_OLE_DATAOBJ2_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dropsrc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dropsrc.h new file mode 100644 index 0000000000..1c5f692702 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/dropsrc.h @@ -0,0 +1,78 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ole/dropsrc.h +// Purpose: declaration of the wxDropSource class +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.03.98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OLEDROPSRC_H +#define _WX_OLEDROPSRC_H + +#if wxUSE_DRAG_AND_DROP + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class wxIDropSource; +class WXDLLIMPEXP_FWD_CORE wxDataObject; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// this macro may be used instead for wxDropSource ctor arguments: it will use +// the cursor 'name' from the resources under MSW, but will expand to +// something else under GTK. If you don't use it, you will have to use #ifdef +// in the application code. +#define wxDROP_ICON(name) wxCursor(wxT(#name)) + +// ---------------------------------------------------------------------------- +// wxDropSource is used to start the drag-&-drop operation on associated +// wxDataObject object. It's responsible for giving UI feedback while dragging. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropSource : public wxDropSourceBase +{ +public: + // ctors: if you use default ctor you must call SetData() later! + // + // NB: the "wxWindow *win" parameter is unused and is here only for wxGTK + // compatibility, as well as both icon parameters + wxDropSource(wxWindow *win = NULL, + const wxCursor &cursorCopy = wxNullCursor, + const wxCursor &cursorMove = wxNullCursor, + const wxCursor &cursorStop = wxNullCursor); + wxDropSource(wxDataObject& data, + wxWindow *win = NULL, + const wxCursor &cursorCopy = wxNullCursor, + const wxCursor &cursorMove = wxNullCursor, + const wxCursor &cursorStop = wxNullCursor); + + virtual ~wxDropSource(); + + // do it (call this in response to a mouse button press, for example) + // params: if bAllowMove is false, data can be only copied + virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); + + // overridable: you may give some custom UI feedback during d&d operation + // in this function (it's called on each mouse move, so it shouldn't be + // too slow). Just return false if you want default feedback. + virtual bool GiveFeedback(wxDragResult effect); + +protected: + void Init(); + +private: + wxIDropSource *m_pIDropSource; // the pointer to COM interface + + wxDECLARE_NO_COPY_CLASS(wxDropSource); +}; + +#endif //wxUSE_DRAG_AND_DROP + +#endif //_WX_OLEDROPSRC_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/droptgt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/droptgt.h new file mode 100644 index 0000000000..4cb9d3907d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/droptgt.h @@ -0,0 +1,89 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ole/droptgt.h +// Purpose: declaration of the wxDropTarget class +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.03.98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OLEDROPTGT_H +#define _WX_OLEDROPTGT_H + +#if wxUSE_DRAG_AND_DROP + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class wxIDropTarget; +struct wxIDropTargetHelper; +struct IDataObject; + +// ---------------------------------------------------------------------------- +// An instance of the class wxDropTarget may be associated with any wxWindow +// derived object via SetDropTarget() function. If this is done, the virtual +// methods of wxDropTarget are called when something is dropped on the window. +// +// Note that wxDropTarget is an abstract base class (ABC) and you should derive +// your own class from it implementing pure virtual function in order to use it +// (all of them, including protected ones which are called by the class itself) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropTarget : public wxDropTargetBase +{ +public: + // ctor & dtor + wxDropTarget(wxDataObject *dataObject = NULL); + virtual ~wxDropTarget(); + + // normally called by wxWindow on window creation/destruction, but might be + // called `manually' as well. Register() returns true on success. + bool Register(WXHWND hwnd); + void Revoke(WXHWND hwnd); + + // provide default implementation for base class pure virtuals + virtual bool OnDrop(wxCoord x, wxCoord y); + virtual bool GetData(); + + // Can only be called during OnXXX methods. + wxDataFormat GetMatchingPair(); + + // implementation only from now on + // ------------------------------- + + // do we accept this kind of data? + bool MSWIsAcceptedData(IDataObject *pIDataSource) const; + + // give us the data source from IDropTarget::Drop() - this is later used by + // GetData() when it's called from inside OnData() + void MSWSetDataSource(IDataObject *pIDataSource); + + // These functions take care of all things necessary to support native drag + // images. + // + // {Init,End}DragImageSupport() are called during Register/Revoke, + // UpdateDragImageOnXXX() functions are called on the corresponding drop + // target events. + void MSWInitDragImageSupport(); + void MSWEndDragImageSupport(); + void MSWUpdateDragImageOnData(wxCoord x, wxCoord y, wxDragResult res); + void MSWUpdateDragImageOnDragOver(wxCoord x, wxCoord y, wxDragResult res); + void MSWUpdateDragImageOnEnter(wxCoord x, wxCoord y, wxDragResult res); + void MSWUpdateDragImageOnLeave(); + +private: + // helper used by IsAcceptedData() and GetData() + wxDataFormat MSWGetSupportedFormat(IDataObject *pIDataSource) const; + + wxIDropTarget *m_pIDropTarget; // the pointer to our COM interface + IDataObject *m_pIDataSource; // the pointer to the source data object + wxIDropTargetHelper *m_dropTargetHelper; // the drop target helper + + wxDECLARE_NO_COPY_CLASS(wxDropTarget); +}; + +#endif //wxUSE_DRAG_AND_DROP + +#endif //_WX_OLEDROPTGT_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/oleutils.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/oleutils.h new file mode 100644 index 0000000000..c9f7eb88c8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/oleutils.h @@ -0,0 +1,357 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ole/oleutils.h +// Purpose: OLE helper routines, OLE debugging support &c +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.02.1998 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OLEUTILS_H +#define _WX_OLEUTILS_H + +#include "wx/defs.h" + +#if wxUSE_OLE + +// ole2.h includes windows.h, so include wrapwin.h first +#include "wx/msw/wrapwin.h" +// get IUnknown, REFIID &c +#include <ole2.h> +#include "wx/intl.h" +#include "wx/log.h" + +// ============================================================================ +// General purpose functions and macros +// ============================================================================ + +// ---------------------------------------------------------------------------- +// initialize/cleanup OLE +// ---------------------------------------------------------------------------- + +// call OleInitialize() or CoInitialize[Ex]() depending on the platform +// +// return true if ok, false otherwise +inline bool wxOleInitialize() +{ + HRESULT +#ifdef __WXWINCE__ + hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); +#else + hr = ::OleInitialize(NULL); +#endif + + // RPC_E_CHANGED_MODE indicates that OLE had been already initialized + // before, albeit with different mode. Don't consider it to be an error as + // we don't actually care ourselves about the mode used so this allows the + // main application to call OleInitialize() on its own before we do if it + // needs non-default mode. + if ( hr != RPC_E_CHANGED_MODE && FAILED(hr) ) + { + wxLogError(wxGetTranslation("Cannot initialize OLE")); + + return false; + } + + return true; +} + +inline void wxOleUninitialize() +{ +#ifdef __WXWINCE__ + ::CoUninitialize(); +#else + ::OleUninitialize(); +#endif +} + +// ---------------------------------------------------------------------------- +// misc helper functions/macros +// ---------------------------------------------------------------------------- + +// release the interface pointer (if !NULL) +inline void ReleaseInterface(IUnknown *pIUnk) +{ + if ( pIUnk != NULL ) + pIUnk->Release(); +} + +// release the interface pointer (if !NULL) and make it NULL +#define RELEASE_AND_NULL(p) if ( (p) != NULL ) { p->Release(); p = NULL; }; + +// return true if the iid is in the array +extern WXDLLIMPEXP_CORE bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount); + +// ============================================================================ +// IUnknown implementation helpers +// ============================================================================ + +/* + The most dumb implementation of IUnknown methods. We don't support + aggregation nor containment, but for 99% of cases this simple + implementation is quite enough. + + Usage is trivial: here is all you should have + 1) DECLARE_IUNKNOWN_METHODS in your (IUnknown derived!) class declaration + 2) BEGIN/END_IID_TABLE with ADD_IID in between for all interfaces you + support (at least all for which you intent to return 'this' from QI, + i.e. you should derive from IFoo if you have ADD_IID(Foo)) somewhere else + 3) IMPLEMENT_IUNKNOWN_METHODS somewhere also + + These macros are quite simple: AddRef and Release are trivial and QI does + lookup in a static member array of IIDs and returns 'this' if it founds + the requested interface in it or E_NOINTERFACE if not. + */ + +/* + wxAutoULong: this class is used for automatically initalising m_cRef to 0 +*/ +class wxAutoULong +{ +public: + wxAutoULong(ULONG value = 0) : m_Value(value) { } + + operator ULONG&() { return m_Value; } + ULONG& operator=(ULONG value) { m_Value = value; return m_Value; } + + wxAutoULong& operator++() { ++m_Value; return *this; } + const wxAutoULong operator++( int ) { wxAutoULong temp = *this; ++m_Value; return temp; } + + wxAutoULong& operator--() { --m_Value; return *this; } + const wxAutoULong operator--( int ) { wxAutoULong temp = *this; --m_Value; return temp; } + +private: + ULONG m_Value; +}; + +// declare the methods and the member variable containing reference count +// you must also define the ms_aIids array somewhere with BEGIN_IID_TABLE +// and friends (see below) + +#define DECLARE_IUNKNOWN_METHODS \ + public: \ + STDMETHODIMP QueryInterface(REFIID, void **); \ + STDMETHODIMP_(ULONG) AddRef(); \ + STDMETHODIMP_(ULONG) Release(); \ + private: \ + static const IID *ms_aIids[]; \ + wxAutoULong m_cRef + +// macros for declaring supported interfaces +// NB: ADD_IID prepends IID_I whereas ADD_RAW_IID does not +#define BEGIN_IID_TABLE(cname) const IID *cname::ms_aIids[] = { +#define ADD_IID(iid) &IID_I##iid, +#define ADD_RAW_IID(iid) &iid, +#define END_IID_TABLE } + +// implementation is as straightforward as possible +// Parameter: classname - the name of the class +#define IMPLEMENT_IUNKNOWN_METHODS(classname) \ + STDMETHODIMP classname::QueryInterface(REFIID riid, void **ppv) \ + { \ + wxLogQueryInterface(wxT(#classname), riid); \ + \ + if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { \ + *ppv = this; \ + AddRef(); \ + \ + return S_OK; \ + } \ + else { \ + *ppv = NULL; \ + \ + return (HRESULT) E_NOINTERFACE; \ + } \ + } \ + \ + STDMETHODIMP_(ULONG) classname::AddRef() \ + { \ + wxLogAddRef(wxT(#classname), m_cRef); \ + \ + return ++m_cRef; \ + } \ + \ + STDMETHODIMP_(ULONG) classname::Release() \ + { \ + wxLogRelease(wxT(#classname), m_cRef); \ + \ + if ( --m_cRef == wxAutoULong(0) ) { \ + delete this; \ + return 0; \ + } \ + else \ + return m_cRef; \ + } + +// ============================================================================ +// Debugging support +// ============================================================================ + +// VZ: I don't know it's not done for compilers other than VC++ but I leave it +// as is. Please note, though, that tracing OLE interface calls may be +// incredibly useful when debugging OLE programs. +#if defined(__WXDEBUG__) && (( defined(__VISUALC__) && (__VISUALC__ >= 1000) )) +// ---------------------------------------------------------------------------- +// All OLE specific log functions have DebugTrace level (as LogTrace) +// ---------------------------------------------------------------------------- + +// tries to translate riid into a symbolic name, if possible +WXDLLIMPEXP_CORE void wxLogQueryInterface(const wxChar *szInterface, REFIID riid); + +// these functions print out the new value of reference counter +WXDLLIMPEXP_CORE void wxLogAddRef (const wxChar *szInterface, ULONG cRef); +WXDLLIMPEXP_CORE void wxLogRelease(const wxChar *szInterface, ULONG cRef); + +#else //!__WXDEBUG__ + #define wxLogQueryInterface(szInterface, riid) + #define wxLogAddRef(szInterface, cRef) + #define wxLogRelease(szInterface, cRef) +#endif //__WXDEBUG__ + +// wrapper around BSTR type (by Vadim Zeitlin) + +class WXDLLIMPEXP_CORE wxBasicString +{ +public: + // ctors & dtor + wxBasicString(const wxString& str); + wxBasicString(const wxBasicString& bstr); + ~wxBasicString(); + + wxBasicString& operator=(const wxBasicString& bstr); + + // accessors + // just get the string + operator BSTR() const { return m_bstrBuf; } + // retrieve a copy of our string - caller must SysFreeString() it later! + BSTR Get() const { return SysAllocString(m_bstrBuf); } + +private: + // actual string + BSTR m_bstrBuf; +}; + +#if wxUSE_VARIANT +// Convert variants +class WXDLLIMPEXP_FWD_BASE wxVariant; + +// wrapper for CURRENCY type used in VARIANT (VARIANT.vt == VT_CY) +class WXDLLIMPEXP_CORE wxVariantDataCurrency : public wxVariantData +{ +public: + wxVariantDataCurrency() { VarCyFromR8(0.0, &m_value); } + wxVariantDataCurrency(CURRENCY value) { m_value = value; } + + CURRENCY GetValue() const { return m_value; } + void SetValue(CURRENCY value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; + +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; + + wxVariantData* Clone() const { return new wxVariantDataCurrency(m_value); } + virtual wxString GetType() const { return wxS("currency"); } + + DECLARE_WXANY_CONVERSION() + +private: + CURRENCY m_value; +}; + + +// wrapper for SCODE type used in VARIANT (VARIANT.vt == VT_ERROR) +class WXDLLIMPEXP_CORE wxVariantDataErrorCode : public wxVariantData +{ +public: + wxVariantDataErrorCode(SCODE value = S_OK) { m_value = value; } + + SCODE GetValue() const { return m_value; } + void SetValue(SCODE value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; + +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; + + wxVariantData* Clone() const { return new wxVariantDataErrorCode(m_value); } + virtual wxString GetType() const { return wxS("errorcode"); } + + DECLARE_WXANY_CONVERSION() + +private: + SCODE m_value; +}; + +// wrapper for SAFEARRAY, used for passing multidimensional arrays in wxVariant +class WXDLLIMPEXP_CORE wxVariantDataSafeArray : public wxVariantData +{ +public: + wxEXPLICIT wxVariantDataSafeArray(SAFEARRAY* value = NULL) + { + m_value = value; + } + + SAFEARRAY* GetValue() const { return m_value; } + void SetValue(SAFEARRAY* value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; + +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; + + wxVariantData* Clone() const { return new wxVariantDataSafeArray(m_value); } + virtual wxString GetType() const { return wxS("safearray"); } + + DECLARE_WXANY_CONVERSION() + +private: + SAFEARRAY* m_value; +}; + +// Used by wxAutomationObject for its wxConvertOleToVariant() calls. +enum wxOleConvertVariantFlags +{ + wxOleConvertVariant_Default = 0, + + // If wxOleConvertVariant_ReturnSafeArrays flag is set, SAFEARRAYs + // contained in OLE VARIANTs will be returned as wxVariants + // with wxVariantDataSafeArray type instead of wxVariants + // with the list type containing the (flattened) SAFEARRAY's elements. + wxOleConvertVariant_ReturnSafeArrays = 1 +}; + +WXDLLIMPEXP_CORE +bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant); + +WXDLLIMPEXP_CORE +bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant, + long flags = wxOleConvertVariant_Default); + +#endif // wxUSE_VARIANT + +// Convert string to Unicode +WXDLLIMPEXP_CORE BSTR wxConvertStringToOle(const wxString& str); + +// Convert string from BSTR to wxString +WXDLLIMPEXP_CORE wxString wxConvertStringFromOle(BSTR bStr); + +#else // !wxUSE_OLE + +// ---------------------------------------------------------------------------- +// stub functions to avoid #if wxUSE_OLE in the main code +// ---------------------------------------------------------------------------- + +inline bool wxOleInitialize() { return false; } +inline void wxOleUninitialize() { } + +#endif // wxUSE_OLE/!wxUSE_OLE + +#endif //_WX_OLEUTILS_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/safearray.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/safearray.h new file mode 100644 index 0000000000..fb5c70a399 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/safearray.h @@ -0,0 +1,394 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: msw/ole/safearray.h +// Purpose: Helpers for working with OLE SAFEARRAYs. +// Author: PB +// Created: 2012-09-23 +// Copyright: (c) 2012 wxWidgets development team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _MSW_OLE_SAFEARRAY_H_ +#define _MSW_OLE_SAFEARRAY_H_ + +#include "wx/msw/ole/oleutils.h" + +#if wxUSE_OLE && wxUSE_VARIANT + +/* + wxSafeArray is wxWidgets wrapper for working with MS Windows SAFEARRAYs. + It also has convenience functions for converting between SAFEARRAY + and wxVariant with list type or wxArrayString. +*/ + +// The base class with type-independent methods. It exists solely in order to +// reduce the template bloat. +class WXDLLIMPEXP_CORE wxSafeArrayBase +{ +public: + // If owns a SAFEARRAY, it's unlocked and destroyed. + virtual ~wxSafeArrayBase() { Destroy(); } + + // Unlocks and destroys the owned SAFEARRAY. + void Destroy(); + + // Unlocks the owned SAFEARRAY, returns it and gives up its ownership. + SAFEARRAY* Detach(); + + // Returns true if has a valid SAFEARRAY. + bool HasArray() const { return m_array != NULL; } + + // Returns the number of dimensions. + size_t GetDim() const; + + // Returns lower bound for dimension dim in bound. Dimensions start at 1. + bool GetLBound(size_t dim, long& bound) const; + + // Returns upper bound for dimension dim in bound. Dimensions start at 1. + bool GetUBound(size_t dim, long& bound) const; + + // Returns element count for dimension dim. Dimensions start at 1. + size_t GetCount(size_t dim) const; + +protected: + // Default constructor, protected so the class can't be used on its own, + // it's only used as a base class of wxSafeArray<>. + wxSafeArrayBase() + { + m_array = NULL; + } + + bool Lock(); + bool Unlock(); + + SAFEARRAY* m_array; +}; + +// wxSafeArrayConvertor<> must be specialized for the type in order to allow +// using it with wxSafeArray<>. +// +// We specialize it below for the standard types. +template <VARTYPE varType> +struct wxSafeArrayConvertor {}; + +/** + Macro for specializing wxSafeArrayConvertor for simple types. + + The template parameters are: + - externType: basic C data type, e.g. wxFloat64 or wxInt32 + - varType: corresponding VARIANT type constant, e.g. VT_R8 or VT_I4. +*/ +#define wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(externType, varType) \ +template <> \ +struct wxSafeArrayConvertor<varType> \ +{ \ + typedef externType externT; \ + typedef externT internT; \ + static bool ToArray(const externT& from, internT& to) \ + { \ + to = from; \ + return true; \ + } \ + static bool FromArray(const internT& from, externT& to) \ + { \ + to = from; \ + return true; \ + } \ +} + +wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxInt16, VT_I2); +wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxInt32, VT_I4); +wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxFloat32, VT_R4); +wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxFloat64, VT_R8); + +// Specialization for VT_BSTR using wxString. +template <> +struct wxSafeArrayConvertor<VT_BSTR> +{ + typedef wxString externT; + typedef BSTR internT; + + static bool ToArray(const wxString& from, BSTR& to) + { + BSTR bstr = wxConvertStringToOle(from); + + if ( !bstr && !from.empty() ) + { + // BSTR can be NULL for empty strings but if the string was + // not empty, it means we failed to allocate memory for it. + return false; + } + to = bstr; + return true; + } + + static bool FromArray(const BSTR from, wxString& to) + { + to = wxConvertStringFromOle(from); + return true; + } +}; + +// Specialization for VT_VARIANT using wxVariant. +template <> +struct wxSafeArrayConvertor<VT_VARIANT> +{ + typedef wxVariant externT; + typedef VARIANT internT; + + static bool ToArray(const wxVariant& from, VARIANT& to) + { + return wxConvertVariantToOle(from, to); + } + + static bool FromArray(const VARIANT& from, wxVariant& to) + { + return wxConvertOleToVariant(from, to); + } +}; + + +template <VARTYPE varType> +class wxSafeArray : public wxSafeArrayBase +{ +public: + typedef wxSafeArrayConvertor<varType> Convertor; + typedef typename Convertor::internT internT; + typedef typename Convertor::externT externT; + + // Default constructor. + wxSafeArray() + { + m_array = NULL; + } + + // Creates and locks a zero-based one-dimensional SAFEARRAY with the given + // number of elements. + bool Create(size_t count) + { + SAFEARRAYBOUND bound; + + bound.lLbound = 0; + bound.cElements = count; + return Create(&bound, 1); + } + + // Creates and locks a SAFEARRAY. See SafeArrayCreate() in MSDN + // documentation for more information. + bool Create(SAFEARRAYBOUND* bound, size_t dimensions) + { + wxCHECK_MSG( !m_array, false, wxS("Can't be created twice") ); + + m_array = SafeArrayCreate(varType, dimensions, bound); + if ( !m_array ) + return false; + + return Lock(); + } + + /** + Creates a 0-based one-dimensional SAFEARRAY from wxVariant with the + list type. + + Can be called only for wxSafeArray<VT_VARIANT>. + */ + bool CreateFromListVariant(const wxVariant& variant) + { + wxCHECK(varType == VT_VARIANT, false); + wxCHECK(variant.GetType() == wxS("list"), false); + + if ( !Create(variant.GetCount()) ) + return false; + + VARIANT* data = static_cast<VARIANT*>(m_array->pvData); + + for ( size_t i = 0; i < variant.GetCount(); i++) + { + if ( !Convertor::ToArray(variant[i], data[i]) ) + return false; + } + return true; + } + + /** + Creates a 0-based one-dimensional SAFEARRAY from wxArrayString. + + Can be called only for wxSafeArray<VT_BSTR>. + */ + bool CreateFromArrayString(const wxArrayString& strings) + { + wxCHECK(varType == VT_BSTR, false); + + if ( !Create(strings.size()) ) + return false; + + BSTR* data = static_cast<BSTR*>(m_array->pvData); + + for ( size_t i = 0; i < strings.size(); i++ ) + { + if ( !Convertor::ToArray(strings[i], data[i]) ) + return false; + } + return true; + } + + /** + Attaches and locks an existing SAFEARRAY. + The array must have the same VARTYPE as this wxSafeArray was + instantiated with. + */ + bool Attach(SAFEARRAY* array) + { + wxCHECK_MSG(!m_array && array, false, + wxS("Can only attach a valid array to an uninitialized one") ); + + VARTYPE vt; + HRESULT hr = SafeArrayGetVartype(array, &vt); + if ( FAILED(hr) ) + { + wxLogApiError(wxS("SafeArrayGetVarType()"), hr); + return false; + } + + wxCHECK_MSG(vt == varType, false, + wxS("Attaching array of invalid type")); + + m_array = array; + return Lock(); + } + + /** + Indices have the same row-column order as rgIndices in + SafeArrayPutElement(), i.e. they follow BASIC rules, NOT C ones. + */ + bool SetElement(long* indices, const externT& element) + { + wxCHECK_MSG( m_array, false, wxS("Uninitialized array") ); + wxCHECK_MSG( indices, false, wxS("Invalid index") ); + + internT* data; + + if ( FAILED( SafeArrayPtrOfIndex(m_array, (LONG *)indices, (void**)&data) ) ) + return false; + + return Convertor::ToArray(element, *data); + } + + /** + Indices have the same row-column order as rgIndices in + SafeArrayPutElement(), i.e. they follow BASIC rules, NOT C ones. + */ + bool GetElement(long* indices, externT& element) const + { + wxCHECK_MSG( m_array, false, wxS("Uninitialized array") ); + wxCHECK_MSG( indices, false, wxS("Invalid index") ); + + internT* data; + + if ( FAILED( SafeArrayPtrOfIndex(m_array, (LONG *)indices, (void**)&data) ) ) + return false; + + return Convertor::FromArray(*data, element); + } + + /** + Converts the array to a wxVariant with the list type, regardless of the + underlying SAFEARRAY type. + + If the array is multidimensional, it is flattened using the alghoritm + originally employed in wxConvertOleToVariant(). + */ + bool ConvertToVariant(wxVariant& variant) const + { + wxCHECK_MSG( m_array, false, wxS("Uninitialized array") ); + + size_t dims = m_array->cDims; + size_t count = 1; + + for ( size_t i = 0; i < dims; i++ ) + count *= m_array->rgsabound[i].cElements; + + const internT* data = static_cast<const internT*>(m_array->pvData); + externT element; + + variant.ClearList(); + for ( size_t i1 = 0; i1 < count; i1++ ) + { + if ( !Convertor::FromArray(data[i1], element) ) + { + variant.ClearList(); + return false; + } + variant.Append(element); + } + return true; + } + + /** + Converts an array to an ArrayString. + + Can be called only for wxSafeArray<VT_BSTR>. If the array is + multidimensional, it is flattened using the alghoritm originally + employed in wxConvertOleToVariant(). + */ + bool ConvertToArrayString(wxArrayString& strings) const + { + wxCHECK_MSG( m_array, false, wxS("Uninitialized array") ); + wxCHECK(varType == VT_BSTR, false); + + size_t dims = m_array->cDims; + size_t count = 1; + + for ( size_t i = 0; i < dims; i++ ) + count *= m_array->rgsabound[i].cElements; + + const BSTR* data = static_cast<const BSTR*>(m_array->pvData); + wxString element; + + strings.clear(); + strings.reserve(count); + for ( size_t i1 = 0; i1 < count; i1++ ) + { + if ( !Convertor::FromArray(data[i1], element) ) + { + strings.clear(); + return false; + } + strings.push_back(element); + } + return true; + } + + static bool ConvertToVariant(SAFEARRAY* psa, wxVariant& variant) + { + wxSafeArray<varType> sa; + bool result = false; + + if ( sa.Attach(psa) ) + result = sa.ConvertToVariant(variant); + + if ( sa.HasArray() ) + sa.Detach(); + + return result; + } + + static bool ConvertToArrayString(SAFEARRAY* psa, wxArrayString& strings) + { + wxSafeArray<varType> sa; + bool result = false; + + if ( sa.Attach(psa) ) + result = sa.ConvertToArrayString(strings); + + if ( sa.HasArray() ) + sa.Detach(); + + return result; + } + + wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxSafeArray, varType); +}; + +#endif // wxUSE_OLE && wxUSE_VARIANT + +#endif // _MSW_OLE_SAFEARRAY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/uuid.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/uuid.h new file mode 100644 index 0000000000..2408450611 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ole/uuid.h @@ -0,0 +1,89 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ole/uuid.h +// Purpose: encapsulates an UUID with some added helper functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 11.07.97 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +// +// Notes: you should link your project with RPCRT4.LIB! +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OLEUUID_H +#define _WX_OLEUUID_H + +#include "wx/chartype.h" +// ------------------------------------------------------------------ +// UUID (Universally Unique IDentifier) definition +// ------------------------------------------------------------------ + +// ----- taken from RPC.H +#ifndef UUID_DEFINED // in some cases RPC.H will be already + #ifdef __WIN32__ // included, so avoid redefinition + typedef struct + { + unsigned long Data1; + unsigned short Data2; + unsigned short Data3; + unsigned char Data4[8]; + } UUID; // UUID = GUID = CLSID = LIBID = IID + #endif // WIN32 +#endif // UUID_DEFINED + +#ifndef GUID_DEFINED + typedef UUID GUID; + #define UUID_DEFINED // prevent redefinition +#endif // GUID_DEFINED + +typedef unsigned char uchar; + +// ------------------------------------------------------------------ +// a class to store UUID and it's string representation +// ------------------------------------------------------------------ + +// uses RPC functions to create/convert Universally Unique Identifiers +class WXDLLIMPEXP_CORE Uuid +{ +private: + UUID m_uuid; + wxUChar *m_pszUuid; // this string is alloc'd and freed by RPC + wxChar *m_pszCForm; // this string is allocated in Set/Create + + void UuidToCForm(); + + // function used to set initial state by all ctors + void Init() { m_pszUuid = NULL; m_pszCForm = NULL; } + +public: + // ctors & dtor + Uuid() { Init(); } + Uuid(const wxChar *pc) { Init(); Set(pc); } + Uuid(const UUID &uuid) { Init(); Set(uuid); } + ~Uuid(); + + // copy ctor and assignment operator needed for this class + Uuid(const Uuid& uuid); + Uuid& operator=(const Uuid& uuid); + + // create a brand new UUID + void Create(); + + // set value of UUID + bool Set(const wxChar *pc); // from a string, returns true if ok + void Set(const UUID& uuid); // from another UUID (never fails) + + // comparison operators + bool operator==(const Uuid& uuid) const; + bool operator!=(const Uuid& uuid) const { return !(*this == uuid); } + + // accessors + operator const UUID*() const { return &m_uuid; } + operator const wxChar*() const { return (wxChar *)(m_pszUuid); } + + // return string representation of the UUID in the C form + // (as in DEFINE_GUID macro) + const wxChar *CForm() const { return m_pszCForm; } +}; + +#endif //_WX_OLEUUID_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ownerdrw.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ownerdrw.h new file mode 100644 index 0000000000..789a7f2d77 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/ownerdrw.h @@ -0,0 +1,28 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/ownerdrw.h +// Purpose: wxOwnerDrawn class +// Author: Marcin Malich +// Modified by: +// Created: 2009-09-22 +// Copyright: (c) 2009 Marcin Malich <me@malcom.pl> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OWNERDRW_H_ +#define _WX_OWNERDRW_H_ + +#if wxUSE_OWNER_DRAWN + +class WXDLLIMPEXP_CORE wxOwnerDrawn : public wxOwnerDrawnBase +{ +public: + wxOwnerDrawn() {} + virtual ~wxOwnerDrawn() {} + + virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, + wxODAction act, wxODStatus stat); +}; + +#endif // wxUSE_OWNER_DRAWN + +#endif // _WX_OWNERDRW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/palette.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/palette.h new file mode 100644 index 0000000000..78477b4320 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/palette.h @@ -0,0 +1,50 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/palette.h +// Purpose: wxPalette class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PALETTE_H_ +#define _WX_PALETTE_H_ + +#include "wx/gdiobj.h" + +class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase +{ +public: + wxPalette() { } + wxPalette(int n, + const unsigned char *red, const unsigned char *green, const unsigned char *blue) + { + Create(n, red, green, blue); + } + + bool Create(int n, + const unsigned char *red, const unsigned char *green, const unsigned char *blue); + + virtual int GetColoursCount() const; + + int + GetPixel(unsigned char red, unsigned char green, unsigned char blue) const; + + bool + GetRGB(int pixel, + unsigned char *red, unsigned char *green, unsigned char *blue) const; + + // implemetation + WXHPALETTE GetHPALETTE() const; + void SetHPALETTE(WXHPALETTE pal); + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxPalette) +}; + +#endif // _WX_PALETTE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/panel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/panel.h new file mode 100644 index 0000000000..4762bef191 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/panel.h @@ -0,0 +1,56 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/panel.h +// Purpose: wxMSW-specific wxPanel class. +// Author: Vadim Zeitlin +// Created: 2011-03-18 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PANEL_H_ +#define _WX_MSW_PANEL_H_ + +class WXDLLIMPEXP_FWD_CORE wxBrush; + +// ---------------------------------------------------------------------------- +// wxPanel +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase +{ +public: + wxPanel() { } + + wxPanel(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, + const wxString& name = wxPanelNameStr) + { + Create(parent, winid, pos, size, style, name); + } + + // This is overridden for MSW to return true for all panels that are child + // of a window with themed background (such as wxNotebook) which should + // show through the child panels. + virtual bool HasTransparentBackground(); + + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_CONSTRUCTOR( + wxPanel(wxWindow *parent, + int x, int y, int width, int height, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, + const wxString& name = wxPanelNameStr) + { + Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name); + } + ) +#endif // WXWIN_COMPATIBILITY_2_8 + +private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel); +}; + +#endif // _WX_MSW_PANEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pbrush.cur b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pbrush.cur new file mode 100644 index 0000000000..299016a315 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pbrush.cur differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pen.h new file mode 100644 index 0000000000..cb68780b43 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pen.h @@ -0,0 +1,78 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/pen.h +// Purpose: wxPen class +// Author: Julian Smart +// Modified by: Vadim Zeitlin: fixed operator=(), ==(), !=() +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PEN_H_ +#define _WX_PEN_H_ + +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +// ---------------------------------------------------------------------------- +// Pen +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPen : public wxPenBase +{ +public: + wxPen() { } + wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); +#endif + + wxPen(const wxBitmap& stipple, int width); + virtual ~wxPen() { } + + bool operator==(const wxPen& pen) const; + bool operator!=(const wxPen& pen) const { return !(*this == pen); } + + // Override in order to recreate the pen + void SetColour(const wxColour& col); + void SetColour(unsigned char r, unsigned char g, unsigned char b); + + void SetWidth(int width); + void SetStyle(wxPenStyle style); + void SetStipple(const wxBitmap& stipple); + void SetDashes(int nb_dashes, const wxDash *dash); + void SetJoin(wxPenJoin join); + void SetCap(wxPenCap cap); + + wxColour GetColour() const; + int GetWidth() const; + wxPenStyle GetStyle() const; + wxPenJoin GetJoin() const; + wxPenCap GetCap() const; + int GetDashes(wxDash** ptr) const; + wxDash* GetDash() const; + int GetDashCount() const; + wxBitmap* GetStipple() const; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxPenStyle)style); } +#endif + + // internal: wxGDIObject methods + virtual bool RealizeResource(); + virtual bool FreeResource(bool force = false); + virtual WXHANDLE GetResourceHandle() const; + virtual bool IsFree() const; + +protected: + virtual wxGDIRefData* CreateGDIRefData() const; + virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const; + + // same as FreeResource() + RealizeResource() + bool Recreate(); + + DECLARE_DYNAMIC_CLASS(wxPen) +}; + +#endif // _WX_PEN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pencil.cur b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pencil.cur new file mode 100644 index 0000000000..afa760257c Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pencil.cur differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pntleft.cur b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pntleft.cur new file mode 100644 index 0000000000..e7192aab6d Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pntleft.cur differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pntright.cur b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pntright.cur new file mode 100644 index 0000000000..565447b03c Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/pntright.cur differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/popupwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/popupwin.h new file mode 100644 index 0000000000..e41c82ea46 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/popupwin.h @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/popupwin.h +// Purpose: wxPopupWindow class for wxMSW +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.01.01 +// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_POPUPWIN_H_ +#define _WX_MSW_POPUPWIN_H_ + +// ---------------------------------------------------------------------------- +// wxPopupWindow +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPopupWindow : public wxPopupWindowBase +{ +public: + wxPopupWindow() { } + + wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE) + { (void)Create(parent, flags); } + + bool Create(wxWindow *parent, int flags = wxBORDER_NONE); + + virtual void SetFocus(); + virtual bool Show(bool show = true); + + // return the style to be used for the popup windows + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const; + + // get the HWND to be used as parent of this window with CreateWindow() + virtual WXHWND MSWGetParent() const; + +protected: + virtual void DoGetPosition(int *x, int *y) const; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow) +}; + +#endif // _WX_MSW_POPUPWIN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/printdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/printdlg.h new file mode 100644 index 0000000000..2955b89b3c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/printdlg.h @@ -0,0 +1,125 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/printdlg.h +// Purpose: wxPrintDialog, wxPageSetupDialog classes +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRINTDLG_H_ +#define _WX_PRINTDLG_H_ + +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/dialog.h" +#include "wx/cmndata.h" +#include "wx/prntbase.h" +#include "wx/printdlg.h" + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WinPrinter; + +//---------------------------------------------------------------------------- +// wxWindowsPrintNativeData +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowsPrintNativeData: public wxPrintNativeDataBase +{ +public: + wxWindowsPrintNativeData(); + virtual ~wxWindowsPrintNativeData(); + + virtual bool TransferTo( wxPrintData &data ); + virtual bool TransferFrom( const wxPrintData &data ); + + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const; + + void InitializeDevMode(const wxString &printerName = wxEmptyString, WinPrinter* printer = NULL); + void* GetDevMode() const { return m_devMode; } + void SetDevMode(void* data) { m_devMode = data; } + void* GetDevNames() const { return m_devNames; } + void SetDevNames(void* data) { m_devNames = data; } + +private: + void* m_devMode; + void* m_devNames; + + short m_customWindowsPaperId; + +private: + DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData) +}; + +// --------------------------------------------------------------------------- +// wxWindowsPrintDialog: the MSW dialog for printing +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowsPrintDialog : public wxPrintDialogBase +{ +public: + wxWindowsPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); + wxWindowsPrintDialog(wxWindow *parent, wxPrintData* data); + virtual ~wxWindowsPrintDialog(); + + bool Create(wxWindow *parent, wxPrintDialogData* data = NULL); + virtual int ShowModal(); + + wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; } + wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); } + + virtual wxDC *GetPrintDC(); + +private: + wxPrintDialogData m_printDialogData; + wxPrinterDC* m_printerDC; + bool m_destroyDC; + wxWindow* m_dialogParent; + +private: + bool ConvertToNative( wxPrintDialogData &data ); + bool ConvertFromNative( wxPrintDialogData &data ); + + // holds MSW handle + void* m_printDlg; + +private: + wxDECLARE_NO_COPY_CLASS(wxWindowsPrintDialog); + DECLARE_CLASS(wxWindowsPrintDialog) +}; + +// --------------------------------------------------------------------------- +// wxWindowsPageSetupDialog: the MSW page setup dialog +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowsPageSetupDialog: public wxPageSetupDialogBase +{ +public: + wxWindowsPageSetupDialog(); + wxWindowsPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL); + virtual ~wxWindowsPageSetupDialog(); + + bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL); + virtual int ShowModal(); + bool ConvertToNative( wxPageSetupDialogData &data ); + bool ConvertFromNative( wxPageSetupDialogData &data ); + + virtual wxPageSetupDialogData& GetPageSetupDialogData() { return m_pageSetupData; } + +private: + wxPageSetupDialogData m_pageSetupData; + wxWindow* m_dialogParent; + + // holds MSW handle + void* m_pageDlg; + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPageSetupDialog) +}; + +#endif // wxUSE_PRINTING_ARCHITECTURE + +#endif + // _WX_PRINTDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/printwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/printwin.h new file mode 100644 index 0000000000..e5ef80b043 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/printwin.h @@ -0,0 +1,66 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/printwin.h +// Purpose: wxWindowsPrinter, wxWindowsPrintPreview classes +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRINTWIN_H_ +#define _WX_PRINTWIN_H_ + +#include "wx/prntbase.h" + +// --------------------------------------------------------------------------- +// Represents the printer: manages printing a wxPrintout object +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowsPrinter : public wxPrinterBase +{ + DECLARE_DYNAMIC_CLASS(wxWindowsPrinter) + +public: + wxWindowsPrinter(wxPrintDialogData *data = NULL); + + virtual bool Print(wxWindow *parent, + wxPrintout *printout, + bool prompt = true); + + virtual wxDC *PrintDialog(wxWindow *parent); + virtual bool Setup(wxWindow *parent); + +private: + wxDECLARE_NO_COPY_CLASS(wxWindowsPrinter); +}; + +// --------------------------------------------------------------------------- +// wxPrintPreview: programmer creates an object of this class to preview a +// wxPrintout. +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowsPrintPreview : public wxPrintPreviewBase +{ +public: + wxWindowsPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting = NULL, + wxPrintDialogData *data = NULL); + wxWindowsPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintData *data); + virtual ~wxWindowsPrintPreview(); + + virtual bool Print(bool interactive); + virtual void DetermineScaling(); + +protected: +#if wxUSE_ENH_METAFILE + virtual bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum); +#endif + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPrintPreview) +}; + +#endif +// _WX_PRINTWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private.h new file mode 100644 index 0000000000..a6b3f76396 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private.h @@ -0,0 +1,1076 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private.h +// Purpose: Private declarations: as this header is only included by +// wxWidgets itself, it may contain identifiers which don't start +// with "wx". +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_H_ +#define _WX_PRIVATE_H_ + +#include "wx/msw/wrapwin.h" + +#ifdef __WXMICROWIN__ + // Extra prototypes and symbols not defined by MicroWindows + #include "wx/msw/microwin.h" +#endif + +#include "wx/log.h" + +#if wxUSE_GUI + #include "wx/window.h" +#endif // wxUSE_GUI + +class WXDLLIMPEXP_FWD_CORE wxFont; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxWindowBase; + +// --------------------------------------------------------------------------- +// private constants +// --------------------------------------------------------------------------- + +// 260 was taken from windef.h +#ifndef MAX_PATH + #define MAX_PATH 260 +#endif + +// --------------------------------------------------------------------------- +// standard icons from the resources +// --------------------------------------------------------------------------- + +#if wxUSE_GUI + +extern WXDLLIMPEXP_DATA_CORE(HICON) wxSTD_FRAME_ICON; +extern WXDLLIMPEXP_DATA_CORE(HICON) wxSTD_MDIPARENTFRAME_ICON; +extern WXDLLIMPEXP_DATA_CORE(HICON) wxSTD_MDICHILDFRAME_ICON; +extern WXDLLIMPEXP_DATA_CORE(HICON) wxDEFAULT_FRAME_ICON; +extern WXDLLIMPEXP_DATA_CORE(HICON) wxDEFAULT_MDIPARENTFRAME_ICON; +extern WXDLLIMPEXP_DATA_CORE(HICON) wxDEFAULT_MDICHILDFRAME_ICON; +extern WXDLLIMPEXP_DATA_CORE(HFONT) wxSTATUS_LINE_FONT; + +#endif // wxUSE_GUI + +// --------------------------------------------------------------------------- +// global data +// --------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_BASE(HINSTANCE) wxhInstance; + +extern "C" +{ + WXDLLIMPEXP_BASE HINSTANCE wxGetInstance(); +} + +WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst); + +// --------------------------------------------------------------------------- +// define things missing from some compilers' headers +// --------------------------------------------------------------------------- + +#if defined(__WXWINCE__) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) +#ifndef ZeroMemory + inline void ZeroMemory(void *buf, size_t len) { memset(buf, 0, len); } +#endif +#endif // old mingw32 + +// this defines a CASTWNDPROC macro which casts a pointer to the type of a +// window proc +#if defined(STRICT) || defined(__GNUC__) + typedef WNDPROC WndProcCast; +#else + typedef FARPROC WndProcCast; +#endif + + +#define CASTWNDPROC (WndProcCast) + + + +// --------------------------------------------------------------------------- +// some stuff for old Windows versions (FIXME: what does it do here??) +// --------------------------------------------------------------------------- + +#if !defined(APIENTRY) // NT defines APIENTRY, 3.x not + #define APIENTRY FAR PASCAL +#endif + +#ifdef __WIN32__ + #define _EXPORT +#else + #define _EXPORT _export +#endif + +#ifndef __WIN32__ + typedef signed short int SHORT; +#endif + +#if !defined(__WIN32__) // 3.x uses FARPROC for dialogs +#ifndef STRICT + #define DLGPROC FARPROC +#endif +#endif + +/* + * Decide what window classes we're going to use + * for this combination of CTl3D/FAFA settings + */ + +#define STATIC_CLASS wxT("STATIC") +#define STATIC_FLAGS (SS_LEFT|WS_CHILD|WS_VISIBLE) +#define CHECK_CLASS wxT("BUTTON") +#define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP|WS_CHILD) +#define CHECK_IS_FAFA FALSE +#define RADIO_CLASS wxT("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 wxT("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) +*/ + +// --------------------------------------------------------------------------- +// misc macros +// --------------------------------------------------------------------------- + +#define MEANING_CHARACTER '0' +#define DEFAULT_ITEM_WIDTH 100 +#define DEFAULT_ITEM_HEIGHT 80 + +// Scale font to get edit control height +//#define EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) (3*(cy)/2) +#define EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) (cy+8) + +// 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); + +// --------------------------------------------------------------------------- +// useful macros and functions +// --------------------------------------------------------------------------- + +// a wrapper macro for ZeroMemory() +#if defined(__WIN32__) && !defined(__WXMICROWIN__) +#define wxZeroMemory(obj) ::ZeroMemory(&obj, sizeof(obj)) +#else +#define wxZeroMemory(obj) memset((void*) & obj, 0, sizeof(obj)) +#endif + +// This one is a macro so that it can be tested with #ifdef, it will be +// undefined if it cannot be implemented for a given compiler. +// Vc++, bcc, dmc, ow, mingw akk have _get_osfhandle() and Cygwin has +// get_osfhandle. Others are currently unknown, e.g. Salford, Intel, Visual +// Age. +#if defined(__WXWINCE__) + #define wxGetOSFHandle(fd) ((HANDLE)fd) + #define wxOpenOSFHandle(h, flags) ((int)wxPtrToUInt(h)) +#elif defined(__CYGWIN__) + #define wxGetOSFHandle(fd) ((HANDLE)get_osfhandle(fd)) +#elif defined(__VISUALC__) \ + || defined(__BORLANDC__) \ + || defined(__DMC__) \ + || defined(__WATCOMC__) \ + || defined(__MINGW32__) + #define wxGetOSFHandle(fd) ((HANDLE)_get_osfhandle(fd)) + #define wxOpenOSFHandle(h, flags) (_open_osfhandle(wxPtrToUInt(h), flags)) + #define wx_fdopen _fdopen +#endif + +// close the handle in the class dtor +class AutoHANDLE +{ +public: + wxEXPLICIT AutoHANDLE(HANDLE handle) : m_handle(handle) { } + + bool IsOk() const { return m_handle != INVALID_HANDLE_VALUE; } + operator HANDLE() const { return m_handle; } + + ~AutoHANDLE() { if ( IsOk() ) ::CloseHandle(m_handle); } + +protected: + HANDLE m_handle; +}; + +// a template to make initializing Windows styructs less painful: it zeroes all +// the struct fields and also sets cbSize member to the correct value (and so +// can be only used with structures which have this member...) +template <class T> +struct WinStruct : public T +{ + WinStruct() + { + ::ZeroMemory(this, sizeof(T)); + + // explicit qualification is required here for this to be valid C++ + this->cbSize = sizeof(T); + } +}; + + +// Macros for converting wxString to the type expected by API functions. +// +// Normally it is enough to just use wxString::t_str() which is implicitly +// convertible to LPCTSTR, but in some cases an explicit conversion is required. +// +// In such cases wxMSW_CONV_LPCTSTR() should be used. But if an API function +// takes a non-const pointer, wxMSW_CONV_LPTSTR() which casts away the +// constness (but doesn't make it possible to really modify the returned +// pointer, of course) should be used. And if a string is passed as LPARAM, use +// wxMSW_CONV_LPARAM() which does the required ugly reinterpret_cast<> too. +#define wxMSW_CONV_LPCTSTR(s) static_cast<const wxChar *>((s).t_str()) +#define wxMSW_CONV_LPTSTR(s) const_cast<wxChar *>(wxMSW_CONV_LPCTSTR(s)) +#define wxMSW_CONV_LPARAM(s) reinterpret_cast<LPARAM>(wxMSW_CONV_LPCTSTR(s)) + + +#if wxUSE_GUI + +#include "wx/gdicmn.h" +#include "wx/colour.h" + +// make conversion from wxColour and COLORREF a bit less painful +inline COLORREF wxColourToRGB(const wxColour& c) +{ + return RGB(c.Red(), c.Green(), c.Blue()); +} + +inline COLORREF wxColourToPalRGB(const wxColour& c) +{ + return PALETTERGB(c.Red(), c.Green(), c.Blue()); +} + +inline wxColour wxRGBToColour(COLORREF rgb) +{ + return wxColour(GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)); +} + +inline void wxRGBToColour(wxColour& c, COLORREF rgb) +{ + c.Set(GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)); +} + +// get the standard colour map for some standard colours - see comment in this +// function to understand why is it needed and when should it be used +// +// it returns a wxCOLORMAP (can't use COLORMAP itself here as comctl32.dll +// might be not included/available) array of size wxSTD_COLOUR_MAX +// +// NB: if you change these colours, update wxBITMAP_STD_COLOURS in the +// resources as well: it must have the same number of pixels! +enum wxSTD_COLOUR +{ + wxSTD_COL_BTNTEXT, + wxSTD_COL_BTNSHADOW, + wxSTD_COL_BTNFACE, + wxSTD_COL_BTNHIGHLIGHT, + wxSTD_COL_MAX +}; + +struct WXDLLIMPEXP_CORE wxCOLORMAP +{ + COLORREF from, to; +}; + +// this function is implemented in src/msw/window.cpp +extern wxCOLORMAP *wxGetStdColourMap(); + +// create a wxRect from Windows RECT +inline wxRect wxRectFromRECT(const RECT& rc) +{ + return wxRect(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); +} + +// copy Windows RECT to our wxRect +inline void wxCopyRECTToRect(const RECT& rc, wxRect& rect) +{ + rect = wxRectFromRECT(rc); +} + +// and vice versa +inline void wxCopyRectToRECT(const wxRect& rect, RECT& rc) +{ + // note that we don't use wxRect::GetRight() as it is one of compared to + // wxRectFromRECT() above + rc.top = rect.y; + rc.left = rect.x; + rc.right = rect.x + rect.width; + rc.bottom = rect.y + rect.height; +} + +// translations between HIMETRIC units (which OLE likes) and pixels (which are +// liked by all the others) - implemented in msw/utilsexc.cpp +extern void HIMETRICToPixel(LONG *x, LONG *y); +extern void HIMETRICToPixel(LONG *x, LONG *y, HDC hdcRef); +extern void PixelToHIMETRIC(LONG *x, LONG *y); +extern void PixelToHIMETRIC(LONG *x, LONG *y, HDC hdcRef); + +// Windows convention of the mask is opposed to the wxWidgets one, so we need +// to invert the mask each time we pass one/get one to/from Windows +extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w = 0, int h = 0); + +// Creates an icon or cursor depending from a bitmap +// +// The bitmap must be valid and it should have a mask. If it doesn't, a default +// mask is created using light grey as the transparent colour. +extern HICON wxBitmapToHICON(const wxBitmap& bmp); + +// Same requirments as above apply and the bitmap must also have the correct +// size. +extern +HCURSOR wxBitmapToHCURSOR(const wxBitmap& bmp, int hotSpotX, int hotSpotY); + + +#if wxUSE_OWNER_DRAWN + +// Draw the bitmap in specified state (this is used by owner drawn controls) +enum wxDSBStates +{ + wxDSB_NORMAL = 0, + wxDSB_SELECTED, + wxDSB_DISABLED +}; + +extern +BOOL wxDrawStateBitmap(HDC hDC, HBITMAP hBitmap, int x, int y, UINT uState); + +#endif // wxUSE_OWNER_DRAWN + +// get (x, y) from DWORD - notice that HI/LOWORD can *not* be used because they +// will fail on system with multiple monitors where the coords may be negative +// +// these macros are standard now (Win98) but some older headers don't have them +#ifndef GET_X_LPARAM + #define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp)) + #define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp)) +#endif // GET_X_LPARAM + +// get the current state of SHIFT/CTRL/ALT keys +inline bool wxIsModifierDown(int vk) +{ + // GetKeyState() returns different negative values on WinME and WinNT, + // so simply test for negative value. + return ::GetKeyState(vk) < 0; +} + +inline bool wxIsShiftDown() +{ + return wxIsModifierDown(VK_SHIFT); +} + +inline bool wxIsCtrlDown() +{ + return wxIsModifierDown(VK_CONTROL); +} + +inline bool wxIsAltDown() +{ + return wxIsModifierDown(VK_MENU); +} + +inline bool wxIsAnyModifierDown() +{ + return wxIsShiftDown() || wxIsCtrlDown() || wxIsAltDown(); +} + +// wrapper around GetWindowRect() and GetClientRect() APIs doing error checking +// for Win32 +inline RECT wxGetWindowRect(HWND hwnd) +{ + RECT rect; + + if ( !::GetWindowRect(hwnd, &rect) ) + { + wxLogLastError(wxT("GetWindowRect")); + } + + return rect; +} + +inline RECT wxGetClientRect(HWND hwnd) +{ + RECT rect; + + if ( !::GetClientRect(hwnd, &rect) ) + { + wxLogLastError(wxT("GetClientRect")); + } + + return rect; +} + +// --------------------------------------------------------------------------- +// small helper classes +// --------------------------------------------------------------------------- + +// create an instance of this class and use it as the HDC for screen, will +// automatically release the DC going out of scope +class ScreenHDC +{ +public: + ScreenHDC() { m_hdc = ::GetDC(NULL); } + ~ScreenHDC() { ::ReleaseDC(NULL, m_hdc); } + + operator HDC() const { return m_hdc; } + +private: + HDC m_hdc; + + wxDECLARE_NO_COPY_CLASS(ScreenHDC); +}; + +// the same as ScreenHDC but for window DCs +class WindowHDC +{ +public: + WindowHDC() : m_hwnd(NULL), m_hdc(NULL) { } + WindowHDC(HWND hwnd) { m_hdc = ::GetDC(m_hwnd = hwnd); } + ~WindowHDC() { if ( m_hwnd && m_hdc ) { ::ReleaseDC(m_hwnd, m_hdc); } } + + operator HDC() const { return m_hdc; } + +private: + HWND m_hwnd; + HDC m_hdc; + + wxDECLARE_NO_COPY_CLASS(WindowHDC); +}; + +// the same as ScreenHDC but for memory DCs: creates the HDC compatible with +// the given one (screen by default) in ctor and destroys it in dtor +class MemoryHDC +{ +public: + MemoryHDC(HDC hdc = 0) { m_hdc = ::CreateCompatibleDC(hdc); } + ~MemoryHDC() { ::DeleteDC(m_hdc); } + + operator HDC() const { return m_hdc; } + +private: + HDC m_hdc; + + wxDECLARE_NO_COPY_CLASS(MemoryHDC); +}; + +// a class which selects a GDI object into a DC in its ctor and deselects in +// dtor +class SelectInHDC +{ +private: + void DoInit(HGDIOBJ hgdiobj) { m_hgdiobj = ::SelectObject(m_hdc, hgdiobj); } + +public: + SelectInHDC() : m_hdc(NULL), m_hgdiobj(NULL) { } + SelectInHDC(HDC hdc, HGDIOBJ hgdiobj) : m_hdc(hdc) { DoInit(hgdiobj); } + + void Init(HDC hdc, HGDIOBJ hgdiobj) + { + wxASSERT_MSG( !m_hdc, wxT("initializing twice?") ); + + m_hdc = hdc; + + DoInit(hgdiobj); + } + + ~SelectInHDC() { if ( m_hdc ) ::SelectObject(m_hdc, m_hgdiobj); } + + // return true if the object was successfully selected + operator bool() const { return m_hgdiobj != 0; } + +private: + HDC m_hdc; + HGDIOBJ m_hgdiobj; + + wxDECLARE_NO_COPY_CLASS(SelectInHDC); +}; + +// a class which cleans up any GDI object +class AutoGDIObject +{ +protected: + AutoGDIObject() { m_gdiobj = NULL; } + AutoGDIObject(HGDIOBJ gdiobj) : m_gdiobj(gdiobj) { } + ~AutoGDIObject() { if ( m_gdiobj ) ::DeleteObject(m_gdiobj); } + + void InitGdiobj(HGDIOBJ gdiobj) + { + wxASSERT_MSG( !m_gdiobj, wxT("initializing twice?") ); + + m_gdiobj = gdiobj; + } + + HGDIOBJ GetObject() const { return m_gdiobj; } + +private: + HGDIOBJ m_gdiobj; +}; + +// TODO: all this asks for using a AutoHandler<T, CreateFunc> template... + +// a class for temporary brushes +class AutoHBRUSH : private AutoGDIObject +{ +public: + AutoHBRUSH(COLORREF col) + : AutoGDIObject(::CreateSolidBrush(col)) { } + + operator HBRUSH() const { return (HBRUSH)GetObject(); } +}; + +// a class for temporary fonts +class AutoHFONT : private AutoGDIObject +{ +private: +public: + AutoHFONT() + : AutoGDIObject() { } + + AutoHFONT(const LOGFONT& lf) + : AutoGDIObject(::CreateFontIndirect(&lf)) { } + + void Init(const LOGFONT& lf) { InitGdiobj(::CreateFontIndirect(&lf)); } + + operator HFONT() const { return (HFONT)GetObject(); } +}; + +// a class for temporary pens +class AutoHPEN : private AutoGDIObject +{ +public: + AutoHPEN(COLORREF col) + : AutoGDIObject(::CreatePen(PS_SOLID, 0, col)) { } + + operator HPEN() const { return (HPEN)GetObject(); } +}; + +// classes for temporary bitmaps +class AutoHBITMAP : private AutoGDIObject +{ +public: + AutoHBITMAP() + : AutoGDIObject() { } + + AutoHBITMAP(HBITMAP hbmp) : AutoGDIObject(hbmp) { } + + void Init(HBITMAP hbmp) { InitGdiobj(hbmp); } + + operator HBITMAP() const { return (HBITMAP)GetObject(); } +}; + +class CompatibleBitmap : public AutoHBITMAP +{ +public: + CompatibleBitmap(HDC hdc, int w, int h) + : AutoHBITMAP(::CreateCompatibleBitmap(hdc, w, h)) + { + } +}; + +class MonoBitmap : public AutoHBITMAP +{ +public: + MonoBitmap(int w, int h) + : AutoHBITMAP(::CreateBitmap(w, h, 1, 1, 0)) + { + } +}; + +// class automatically destroys the region object +class AutoHRGN : private AutoGDIObject +{ +public: + AutoHRGN(HRGN hrgn) : AutoGDIObject(hrgn) { } + + operator HRGN() const { return (HRGN)GetObject(); } +}; + +// class sets the specified clipping region during its life time +class HDCClipper +{ +public: + HDCClipper(HDC hdc, HRGN hrgn) + : m_hdc(hdc) + { + if ( !::SelectClipRgn(hdc, hrgn) ) + { + wxLogLastError(wxT("SelectClipRgn")); + } + } + + ~HDCClipper() + { + ::SelectClipRgn(m_hdc, NULL); + } + +private: + HDC m_hdc; + + wxDECLARE_NO_COPY_CLASS(HDCClipper); +}; + +// set the given map mode for the life time of this object +// +// NB: SetMapMode() is not supported by CE so we also define a helper macro +// to avoid using it there +#ifdef __WXWINCE__ + #define wxCHANGE_HDC_MAP_MODE(hdc, mm) +#else // !__WXWINCE__ + class HDCMapModeChanger + { + public: + HDCMapModeChanger(HDC hdc, int mm) + : m_hdc(hdc) + { + m_modeOld = ::SetMapMode(hdc, mm); + if ( !m_modeOld ) + { + wxLogLastError(wxT("SelectClipRgn")); + } + } + + ~HDCMapModeChanger() + { + if ( m_modeOld ) + ::SetMapMode(m_hdc, m_modeOld); + } + + private: + HDC m_hdc; + int m_modeOld; + + wxDECLARE_NO_COPY_CLASS(HDCMapModeChanger); + }; + + #define wxCHANGE_HDC_MAP_MODE(hdc, mm) \ + HDCMapModeChanger wxMAKE_UNIQUE_NAME(wxHDCMapModeChanger)(hdc, mm) +#endif // __WXWINCE__/!__WXWINCE__ + +// smart pointer using GlobalAlloc/GlobalFree() +class GlobalPtr +{ +public: + // default ctor, call Init() later + GlobalPtr() + { + m_hGlobal = NULL; + } + + // allocates a block of given size + void Init(size_t size, unsigned flags = GMEM_MOVEABLE) + { + m_hGlobal = ::GlobalAlloc(flags, size); + if ( !m_hGlobal ) + { + wxLogLastError(wxT("GlobalAlloc")); + } + } + + GlobalPtr(size_t size, unsigned flags = GMEM_MOVEABLE) + { + Init(size, flags); + } + + ~GlobalPtr() + { + if ( m_hGlobal && ::GlobalFree(m_hGlobal) ) + { + wxLogLastError(wxT("GlobalFree")); + } + } + + // implicit conversion + operator HGLOBAL() const { return m_hGlobal; } + +private: + HGLOBAL m_hGlobal; + + wxDECLARE_NO_COPY_CLASS(GlobalPtr); +}; + +// when working with global pointers (which is unfortunately still necessary +// sometimes, e.g. for clipboard) it is important to unlock them exactly as +// many times as we lock them which just asks for using a "smart lock" class +class GlobalPtrLock +{ +public: + // default ctor, use Init() later -- should only be used if the HGLOBAL can + // be NULL (in which case Init() shouldn't be called) + GlobalPtrLock() + { + m_hGlobal = NULL; + m_ptr = NULL; + } + + // initialize the object, may be only called if we were created using the + // default ctor; HGLOBAL must not be NULL + void Init(HGLOBAL hGlobal) + { + m_hGlobal = hGlobal; + + // NB: GlobalLock() is a macro, not a function, hence don't use the + // global scope operator with it (and neither with GlobalUnlock()) + m_ptr = GlobalLock(hGlobal); + if ( !m_ptr ) + { + wxLogLastError(wxT("GlobalLock")); + } + } + + // initialize the object, HGLOBAL must not be NULL + GlobalPtrLock(HGLOBAL hGlobal) + { + Init(hGlobal); + } + + ~GlobalPtrLock() + { + if ( m_hGlobal && !GlobalUnlock(m_hGlobal) ) + { + // this might happen simply because the block became unlocked + DWORD dwLastError = ::GetLastError(); + if ( dwLastError != NO_ERROR ) + { + wxLogApiError(wxT("GlobalUnlock"), dwLastError); + } + } + } + + void *Get() const { return m_ptr; } + operator void *() const { return m_ptr; } + +private: + HGLOBAL m_hGlobal; + void *m_ptr; + + wxDECLARE_NO_COPY_CLASS(GlobalPtrLock); +}; + +// register the class when it is first needed and unregister it in dtor +class ClassRegistrar +{ +public: + // ctor doesn't register the class, call Initialize() for this + ClassRegistrar() { m_registered = -1; } + + // return true if the class is already registered + bool IsInitialized() const { return m_registered != -1; } + + // return true if the class had been already registered + bool IsRegistered() const { return m_registered == 1; } + + // try to register the class if not done yet, return true on success + bool Register(const WNDCLASS& wc) + { + // we should only be called if we hadn't been initialized yet + wxASSERT_MSG( m_registered == -1, + wxT("calling ClassRegistrar::Register() twice?") ); + + m_registered = ::RegisterClass(&wc) ? 1 : 0; + if ( !IsRegistered() ) + { + wxLogLastError(wxT("RegisterClassEx()")); + } + else + { + m_clsname = wc.lpszClassName; + } + + return m_registered == 1; + } + + // get the name of the registered class (returns empty string if not + // registered) + const wxString& GetName() const { return m_clsname; } + + // unregister the class if it had been registered + ~ClassRegistrar() + { + if ( IsRegistered() ) + { + if ( !::UnregisterClass(m_clsname.t_str(), wxGetInstance()) ) + { + wxLogLastError(wxT("UnregisterClass")); + } + } + } + +private: + // initial value is -1 which means that we hadn't tried registering the + // class yet, it becomes true or false (1 or 0) when Initialize() is called + int m_registered; + + // the name of the class, only non empty if it had been registered + wxString m_clsname; +}; + +// --------------------------------------------------------------------------- +// macros to make casting between WXFOO and FOO a bit easier: the GetFoo() +// returns Foo cast to the Windows type for oruselves, while GetFooOf() takes +// an argument which should be a pointer or reference to the object of the +// corresponding class (this depends on the macro) +// --------------------------------------------------------------------------- + +#define GetHwnd() ((HWND)GetHWND()) +#define GetHwndOf(win) ((HWND)((win)->GetHWND())) +// old name +#define GetWinHwnd GetHwndOf + +#define GetHdc() ((HDC)GetHDC()) +#define GetHdcOf(dc) ((HDC)(dc).GetHDC()) + +#define GetHbitmap() ((HBITMAP)GetHBITMAP()) +#define GetHbitmapOf(bmp) ((HBITMAP)(bmp).GetHBITMAP()) + +#define GetHicon() ((HICON)GetHICON()) +#define GetHiconOf(icon) ((HICON)(icon).GetHICON()) + +#define GetHaccel() ((HACCEL)GetHACCEL()) +#define GetHaccelOf(table) ((HACCEL)((table).GetHACCEL())) + +#define GetHbrush() ((HBRUSH)GetResourceHandle()) +#define GetHbrushOf(brush) ((HBRUSH)(brush).GetResourceHandle()) + +#define GetHmenu() ((HMENU)GetHMenu()) +#define GetHmenuOf(menu) ((HMENU)(menu)->GetHMenu()) + +#define GetHcursor() ((HCURSOR)GetHCURSOR()) +#define GetHcursorOf(cursor) ((HCURSOR)(cursor).GetHCURSOR()) + +#define GetHfont() ((HFONT)GetHFONT()) +#define GetHfontOf(font) ((HFONT)(font).GetHFONT()) + +#define GetHimagelist() ((HIMAGELIST)GetHIMAGELIST()) +#define GetHimagelistOf(imgl) ((HIMAGELIST)(imgl)->GetHIMAGELIST()) + +#define GetHpalette() ((HPALETTE)GetHPALETTE()) +#define GetHpaletteOf(pal) ((HPALETTE)(pal).GetHPALETTE()) + +#define GetHpen() ((HPEN)GetResourceHandle()) +#define GetHpenOf(pen) ((HPEN)(pen).GetResourceHandle()) + +#define GetHrgn() ((HRGN)GetHRGN()) +#define GetHrgnOf(rgn) ((HRGN)(rgn).GetHRGN()) + +#endif // wxUSE_GUI + +// --------------------------------------------------------------------------- +// global functions +// --------------------------------------------------------------------------- + +// return the full path of the given module +inline wxString wxGetFullModuleName(HMODULE hmod) +{ + wxString fullname; + if ( !::GetModuleFileName + ( + hmod, + wxStringBuffer(fullname, MAX_PATH), + MAX_PATH + ) ) + { + wxLogLastError(wxT("GetModuleFileName")); + } + + return fullname; +} + +// return the full path of the program file +inline wxString wxGetFullModuleName() +{ + return wxGetFullModuleName((HMODULE)wxGetInstance()); +} + +// return the run-time version of the OS in a format similar to +// WINVER/_WIN32_WINNT compile-time macros: +// +// 0x0300 Windows NT 3.51 +// 0x0400 Windows 95, NT4 +// 0x0410 Windows 98 +// 0x0500 Windows ME, 2000 +// 0x0501 Windows XP, 2003 +// 0x0502 Windows XP SP2, 2003 SP1 +// 0x0600 Windows Vista, 2008 +// 0x0601 Windows 7 +// 0x0602 Windows 8 (currently also returned for 8.1) +// +// for the other Windows versions 0 is currently returned +enum wxWinVersion +{ + wxWinVersion_Unknown = 0, + + wxWinVersion_3 = 0x0300, + wxWinVersion_NT3 = wxWinVersion_3, + + wxWinVersion_4 = 0x0400, + wxWinVersion_95 = wxWinVersion_4, + wxWinVersion_NT4 = wxWinVersion_4, + wxWinVersion_98 = 0x0410, + + wxWinVersion_5 = 0x0500, + wxWinVersion_ME = wxWinVersion_5, + wxWinVersion_NT5 = wxWinVersion_5, + wxWinVersion_2000 = wxWinVersion_5, + wxWinVersion_XP = 0x0501, + wxWinVersion_2003 = 0x0501, + wxWinVersion_XP_SP2 = 0x0502, + wxWinVersion_2003_SP1 = 0x0502, + + wxWinVersion_6 = 0x0600, + wxWinVersion_Vista = wxWinVersion_6, + wxWinVersion_NT6 = wxWinVersion_6, + + wxWinVersion_7 = 0x601, + + wxWinVersion_8 = 0x602 +}; + +WXDLLIMPEXP_BASE wxWinVersion wxGetWinVersion(); + +#if wxUSE_GUI && defined(__WXMSW__) + +// cursor stuff +extern HCURSOR wxGetCurrentBusyCursor(); // from msw/utils.cpp +extern const wxCursor *wxGetGlobalCursor(); // from msw/cursor.cpp + +// GetCursorPos can fail without populating the POINT. This falls back to GetMessagePos. +WXDLLIMPEXP_CORE void wxGetCursorPosMSW(POINT* pt); + +WXDLLIMPEXP_CORE void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont& the_font); +WXDLLIMPEXP_CORE void wxFillLogFont(LOGFONT *logFont, const wxFont *font); +WXDLLIMPEXP_CORE wxFont wxCreateFontFromLogFont(const LOGFONT *logFont); +WXDLLIMPEXP_CORE wxFontEncoding wxGetFontEncFromCharSet(int charset); + +WXDLLIMPEXP_CORE void wxSliderEvent(WXHWND control, WXWORD wParam, WXWORD pos); +WXDLLIMPEXP_CORE void wxScrollBarEvent(WXHWND hbar, WXWORD wParam, WXWORD pos); + +// Find maximum size of window/rectangle +extern WXDLLIMPEXP_CORE void wxFindMaxSize(WXHWND hwnd, RECT *rect); + +// Safely get the window text (i.e. without using fixed size buffer) +extern WXDLLIMPEXP_CORE wxString wxGetWindowText(WXHWND hWnd); + +// get the window class name +extern WXDLLIMPEXP_CORE wxString wxGetWindowClass(WXHWND hWnd); + +// get the window id (should be unsigned, hence this is not wxWindowID which +// is, for mainly historical reasons, signed) +extern WXDLLIMPEXP_CORE int wxGetWindowId(WXHWND hWnd); + +// check if hWnd's WNDPROC is wndProc. Return true if yes, false if they are +// different +extern WXDLLIMPEXP_CORE bool wxCheckWindowWndProc(WXHWND hWnd, WXFARPROC wndProc); + +// Does this window style specify any border? +inline bool wxStyleHasBorder(long style) +{ + return (style & (wxSIMPLE_BORDER | wxRAISED_BORDER | + wxSUNKEN_BORDER | wxDOUBLE_BORDER)) != 0; +} + +inline long wxGetWindowExStyle(const wxWindowMSW *win) +{ + return ::GetWindowLong(GetHwndOf(win), GWL_EXSTYLE); +} + +inline bool wxHasWindowExStyle(const wxWindowMSW *win, long style) +{ + return (wxGetWindowExStyle(win) & style) != 0; +} + +inline long wxSetWindowExStyle(const wxWindowMSW *win, long style) +{ + return ::SetWindowLong(GetHwndOf(win), GWL_EXSTYLE, style); +} + +// ---------------------------------------------------------------------------- +// functions mapping HWND to wxWindow +// ---------------------------------------------------------------------------- + +// this function simply checks whether the given hwnd corresponds to a wxWindow +// and returns either that window if it does or NULL otherwise +extern WXDLLIMPEXP_CORE wxWindow* wxFindWinFromHandle(HWND hwnd); + +// find the window for HWND which is part of some wxWindow, i.e. unlike +// wxFindWinFromHandle() above it will also work for "sub controls" of a +// wxWindow. +// +// returns the wxWindow corresponding to the given HWND or NULL. +extern WXDLLIMPEXP_CORE wxWindow *wxGetWindowFromHWND(WXHWND hwnd); + +// Get the size of an icon +extern WXDLLIMPEXP_CORE wxSize wxGetHiconSize(HICON hicon); + +// Lines are drawn differently for WinCE and regular WIN32 +WXDLLIMPEXP_CORE void wxDrawLine(HDC hdc, int x1, int y1, int x2, int y2); + +// fill the client rect of the given window on the provided dc using this brush +inline void wxFillRect(HWND hwnd, HDC hdc, HBRUSH hbr) +{ + RECT rc; + ::GetClientRect(hwnd, &rc); + ::FillRect(hdc, &rc, hbr); +} + +// ---------------------------------------------------------------------------- +// 32/64 bit helpers +// ---------------------------------------------------------------------------- + +#ifdef __WIN64__ + +inline void *wxGetWindowProc(HWND hwnd) +{ + return (void *)::GetWindowLongPtr(hwnd, GWLP_WNDPROC); +} + +inline void *wxGetWindowUserData(HWND hwnd) +{ + return (void *)::GetWindowLongPtr(hwnd, GWLP_USERDATA); +} + +inline WNDPROC wxSetWindowProc(HWND hwnd, WNDPROC func) +{ + return (WNDPROC)::SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)func); +} + +inline void *wxSetWindowUserData(HWND hwnd, void *data) +{ + return (void *)::SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)data); +} + +#else // __WIN32__ + +// note that the casts to LONG_PTR here are required even on 32-bit machines +// for the 64-bit warning mode of later versions of MSVC (C4311/4312) +inline WNDPROC wxGetWindowProc(HWND hwnd) +{ + return (WNDPROC)(LONG_PTR)::GetWindowLong(hwnd, GWL_WNDPROC); +} + +inline void *wxGetWindowUserData(HWND hwnd) +{ + return (void *)(LONG_PTR)::GetWindowLong(hwnd, GWL_USERDATA); +} + +inline WNDPROC wxSetWindowProc(HWND hwnd, WNDPROC func) +{ + return (WNDPROC)(LONG_PTR)::SetWindowLong(hwnd, GWL_WNDPROC, (LONG_PTR)func); +} + +inline void *wxSetWindowUserData(HWND hwnd, void *data) +{ + return (void *)(LONG_PTR)::SetWindowLong(hwnd, GWL_USERDATA, (LONG_PTR)data); +} + +#endif // __WIN64__/__WIN32__ + +#endif // wxUSE_GUI && __WXMSW__ + +#endif // _WX_PRIVATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/button.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/button.h new file mode 100644 index 0000000000..9f605c66a3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/button.h @@ -0,0 +1,76 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/button.h +// Purpose: helper functions used with native BUTTON control +// Author: Vadim Zeitlin +// Created: 2008-06-07 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_BUTTON_H_ +#define _WX_MSW_PRIVATE_BUTTON_H_ + +// define some standard button constants which may be missing in the headers +#ifndef BS_PUSHLIKE + #define BS_PUSHLIKE 0x00001000L +#endif + +#ifndef BST_UNCHECKED + #define BST_UNCHECKED 0x0000 +#endif + +#ifndef BST_CHECKED + #define BST_CHECKED 0x0001 +#endif + +#ifndef BST_INDETERMINATE + #define BST_INDETERMINATE 0x0002 +#endif + +namespace wxMSWButton +{ + +// returns BS_MULTILINE if the label contains new lines or 0 otherwise +inline int GetMultilineStyle(const wxString& label) +{ + return label.find(wxT('\n')) == wxString::npos ? 0 : BS_MULTILINE; +} + +// update the style of the specified HWND to include or exclude BS_MULTILINE +// depending on whether the label contains the new lines +void UpdateMultilineStyle(HWND hwnd, const wxString& label); + +// flags for ComputeBestSize() and GetFittingSize() +enum +{ + Size_AuthNeeded = 1, + Size_ExactFit = 2 +}; + +// NB: All the functions below are implemented in src/msw/button.cpp + +// Compute the button size (as if wxBU_EXACTFIT were specified, i.e. without +// adjusting it to be of default size if it's smaller) for the given label size +WXDLLIMPEXP_CORE wxSize +GetFittingSize(wxWindow *win, const wxSize& sizeLabel, int flags = 0); + +// Compute the button size (as if wxBU_EXACTFIT were specified) by computing +// its label size and then calling GetFittingSize(). +wxSize ComputeBestFittingSize(wxControl *btn, int flags = 0); + +// Increase the size passed as parameter to be at least the standard button +// size if the control doesn't have wxBU_EXACTFIT style and also cache it as +// the best size and return its value -- this is used in DoGetBestSize() +// implementation. +wxSize IncreaseToStdSizeAndCache(wxControl *btn, const wxSize& size); + +// helper of wxToggleButton::DoGetBestSize() +inline wxSize ComputeBestSize(wxControl *btn, int flags = 0) +{ + return IncreaseToStdSizeAndCache(btn, ComputeBestFittingSize(btn, flags)); +} + +} // namespace wxMSWButton + +#endif // _WX_MSW_PRIVATE_BUTTON_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/comptr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/comptr.h new file mode 100644 index 0000000000..194cf54f90 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/comptr.h @@ -0,0 +1,129 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/comptr.h +// Purpose: Smart pointer for COM interfaces. +// Author: PB +// Created: 2012-04-16 +// Copyright: (c) 2012 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_COMPTR_H_ +#define _WX_MSW_PRIVATE_COMPTR_H_ + +// ---------------------------------------------------------------------------- +// wxCOMPtr: A minimalistic smart pointer for use with COM interfaces. +// ---------------------------------------------------------------------------- + +template <class T> +class wxCOMPtr +{ +public: + typedef T element_type; + + wxCOMPtr() + : m_ptr(NULL) + { + } + + wxEXPLICIT wxCOMPtr(T* ptr) + : m_ptr(ptr) + { + if ( m_ptr ) + m_ptr->AddRef(); + } + + wxCOMPtr(const wxCOMPtr& ptr) + : m_ptr(ptr.get()) + { + if ( m_ptr ) + m_ptr->AddRef(); + } + + ~wxCOMPtr() + { + if ( m_ptr ) + m_ptr->Release(); + } + + void reset(T* ptr = NULL) + { + if ( m_ptr != ptr) + { + if ( ptr ) + ptr->AddRef(); + if ( m_ptr ) + m_ptr->Release(); + m_ptr = ptr; + } + } + + wxCOMPtr& operator=(const wxCOMPtr& ptr) + { + reset(ptr.get()); + return *this; + } + + wxCOMPtr& operator=(T* ptr) + { + reset(ptr); + return *this; + } + + operator T*() const + { + return m_ptr; + } + + T& operator*() const + { + return *m_ptr; + } + + T* operator->() const + { + return m_ptr; + } + + // It would be better to forbid direct access completely but we do need + // for QueryInterface() and similar functions, so provide it but it can + // only be used to initialize the pointer, not to modify an existing one. + T** operator&() + { + wxASSERT_MSG(!m_ptr, + wxS("Can't get direct access to initialized pointer")); + + return &m_ptr; + } + + T* get() const + { + return m_ptr; + } + + bool operator<(T* ptr) const + { + return get() < ptr; + } + +private: + T* m_ptr; +}; + +// Define a helper for the macro below: we just need a function taking a +// pointer and not returning anything to avoid warnings about unused return +// value of the cast in the macro itself. +namespace wxPrivate { inline void PPV_ARGS_CHECK(void*) { } } + +// Takes the interface name and a pointer to a pointer of the interface type +// and expands into the IID of this interface and the same pointer but after a +// type-safety check. +// +// This is similar to the standard IID_PPV_ARGS macro but takes the pointer +// type instead of relying on the non-standard Microsoft __uuidof(). +#define wxIID_PPV_ARGS(IType, pType) \ + IID_##IType, \ + (wxPrivate::PPV_ARGS_CHECK(static_cast<IType*>(*pType)), \ + reinterpret_cast<void**>(pType)) + +#endif // _WX_MSW_PRIVATE_COMPTR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/datecontrols.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/datecontrols.h new file mode 100644 index 0000000000..9794cfae89 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/datecontrols.h @@ -0,0 +1,30 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/datecontrols.h +// Purpose: implementation helpers for wxDatePickerCtrl and wxCalendarCtrl +// Author: Vadim Zeitlin +// Created: 2008-04-04 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _MSW_PRIVATE_DATECONTROLS_H_ +#define _MSW_PRIVATE_DATECONTROLS_H_ + +#include "wx/datetime.h" + +#include "wx/msw/wrapwin.h" + +// namespace for the helper functions related to the date controls +namespace wxMSWDateControls +{ + +// do the one time only initialization of date classes of comctl32.dll, return +// true if ok or log an error and return false if we failed (this can only +// happen with a very old version of common controls DLL, i.e. before 4.70) +extern bool CheckInitialization(); + +} // namespace wxMSWDateControls + +#endif // _MSW_PRIVATE_DATECONTROLS_H_ + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/dc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/dc.h new file mode 100644 index 0000000000..303cd19df6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/dc.h @@ -0,0 +1,147 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/dc.h +// Purpose: private wxMSW helpers for working with HDCs +// Author: Vadim Zeitlin +// Created: 2009-06-16 (extracted from src/msw/dc.cpp) +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _MSW_PRIVATE_DC_H_ +#define _MSW_PRIVATE_DC_H_ + +#include "wx/msw/dc.h" +#include "wx/msw/wrapwin.h" + +namespace wxMSWImpl +{ + +// various classes to change some DC property temporarily + +// text background and foreground colours +class wxTextColoursChanger +{ +public: + wxTextColoursChanger(HDC hdc, const wxMSWDCImpl& dc) + : m_hdc(hdc) + { + Change(dc.GetTextForeground(), dc.GetTextBackground()); + } + + wxTextColoursChanger(HDC hdc, const wxColour& colFg, const wxColour& colBg) + : m_hdc(hdc) + { + Change(colFg, colBg); + } + + wxTextColoursChanger(HDC hdc, COLORREF colFg, COLORREF colBg) + : m_hdc(hdc) + { + Change(colFg, colBg); + } + + ~wxTextColoursChanger() + { + if ( m_oldColFg != CLR_INVALID ) + ::SetTextColor(m_hdc, m_oldColFg); + if ( m_oldColBg != CLR_INVALID ) + ::SetBkColor(m_hdc, m_oldColBg); + } + +protected: + // this ctor doesn't change mode immediately, call Change() later to do it + // only if needed + wxTextColoursChanger(HDC hdc) + : m_hdc(hdc) + { + m_oldColFg = + m_oldColBg = CLR_INVALID; + } + + void Change(const wxColour& colFg, const wxColour& colBg) + { + Change(colFg.IsOk() ? colFg.GetPixel() : CLR_INVALID, + colBg.IsOk() ? colBg.GetPixel() : CLR_INVALID); + } + + void Change(COLORREF colFg, COLORREF colBg) + { + if ( colFg != CLR_INVALID ) + { + m_oldColFg = ::SetTextColor(m_hdc, colFg); + if ( m_oldColFg == CLR_INVALID ) + { + wxLogLastError(wxT("SetTextColor")); + } + } + else + { + m_oldColFg = CLR_INVALID; + } + + if ( colBg != CLR_INVALID ) + { + m_oldColBg = ::SetBkColor(m_hdc, colBg); + if ( m_oldColBg == CLR_INVALID ) + { + wxLogLastError(wxT("SetBkColor")); + } + } + else + { + m_oldColBg = CLR_INVALID; + } + } + +private: + const HDC m_hdc; + COLORREF m_oldColFg, + m_oldColBg; + + wxDECLARE_NO_COPY_CLASS(wxTextColoursChanger); +}; + +// background mode +class wxBkModeChanger +{ +public: + // set background mode to opaque if mode != wxBRUSHSTYLE_TRANSPARENT + wxBkModeChanger(HDC hdc, int mode) + : m_hdc(hdc) + { + Change(mode); + } + + ~wxBkModeChanger() + { + if ( m_oldMode ) + ::SetBkMode(m_hdc, m_oldMode); + } + +protected: + // this ctor doesn't change mode immediately, call Change() later to do it + // only if needed + wxBkModeChanger(HDC hdc) : m_hdc(hdc) { m_oldMode = 0; } + + void Change(int mode) + { + m_oldMode = ::SetBkMode(m_hdc, mode == wxBRUSHSTYLE_TRANSPARENT + ? TRANSPARENT + : OPAQUE); + if ( !m_oldMode ) + { + wxLogLastError(wxT("SetBkMode")); + } + } + +private: + const HDC m_hdc; + int m_oldMode; + + wxDECLARE_NO_COPY_CLASS(wxBkModeChanger); +}; + +} // namespace wxMSWImpl + +#endif // _MSW_PRIVATE_DC_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/fswatcher.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/fswatcher.h new file mode 100644 index 0000000000..38e3b41ee0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/fswatcher.h @@ -0,0 +1,335 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/fswatcher.h +// Purpose: File system watcher impl classes +// Author: Bartosz Bekier +// Created: 2009-05-26 +// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef WX_MSW_PRIVATE_FSWATCHER_H_ +#define WX_MSW_PRIVATE_FSWATCHER_H_ + +#include "wx/filename.h" +#include "wx/vector.h" +#include "wx/msw/private.h" + +// ============================================================================ +// wxFSWatcherEntry implementation & helper declarations +// ============================================================================ + +class wxFSWatcherImplMSW; + +class wxFSWatchEntryMSW : public wxFSWatchInfo +{ +public: + enum + { + BUFFER_SIZE = 4096 // TODO parametrize + }; + + wxFSWatchEntryMSW(const wxFSWatchInfo& winfo) : + wxFSWatchInfo(winfo) + { + // get handle for this path + m_handle = OpenDir(m_path); + m_overlapped = (OVERLAPPED*)calloc(1, sizeof(OVERLAPPED)); + wxZeroMemory(m_buffer); + } + + virtual ~wxFSWatchEntryMSW() + { + wxLogTrace(wxTRACE_FSWATCHER, "Deleting entry '%s'", m_path); + + if (m_handle != INVALID_HANDLE_VALUE) + { + if (!CloseHandle(m_handle)) + { + wxLogSysError(_("Unable to close the handle for '%s'"), + m_path); + } + } + free(m_overlapped); + } + + bool IsOk() const + { + return m_handle != INVALID_HANDLE_VALUE; + } + + HANDLE GetHandle() const + { + return m_handle; + } + + void* GetBuffer() + { + return m_buffer; + } + + OVERLAPPED* GetOverlapped() const + { + return m_overlapped; + } + +private: + // opens dir with all flags, attributes etc. necessary to be later + // asynchronous watched with ReadDirectoryChangesW + static HANDLE OpenDir(const wxString& path) + { + HANDLE handle = CreateFile(path.t_str(), + FILE_LIST_DIRECTORY, + FILE_SHARE_READ | + FILE_SHARE_WRITE | + FILE_SHARE_DELETE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | + FILE_FLAG_OVERLAPPED, + NULL); + if (handle == INVALID_HANDLE_VALUE) + { + wxLogSysError(_("Failed to open directory \"%s\" for monitoring."), + path); + } + + return handle; + } + + HANDLE m_handle; // handle to opened directory + char m_buffer[BUFFER_SIZE]; // buffer for fs events + OVERLAPPED* m_overlapped; + + wxDECLARE_NO_COPY_CLASS(wxFSWatchEntryMSW); +}; + +// ============================================================================ +// wxFSWatcherImplMSW helper classes implementations +// ============================================================================ + +class wxIOCPService +{ +public: + wxIOCPService() : + m_iocp(INVALID_HANDLE_VALUE) + { + Init(); + } + + ~wxIOCPService() + { + if (m_iocp != INVALID_HANDLE_VALUE) + { + if (!CloseHandle(m_iocp)) + { + wxLogSysError(_("Unable to close I/O completion port handle")); + } + } + m_watches.clear(); + } + + // associates a wxFSWatchEntryMSW with completion port + bool Add(wxSharedPtr<wxFSWatchEntryMSW> watch) + { + wxCHECK_MSG( m_iocp != INVALID_HANDLE_VALUE, false, "IOCP not init" ); + wxCHECK_MSG( watch->IsOk(), false, "Invalid watch" ); + + // associate with IOCP + HANDLE ret = CreateIoCompletionPort(watch->GetHandle(), m_iocp, + (ULONG_PTR)watch.get(), 0); + if (ret == NULL) + { + wxLogSysError(_("Unable to associate handle with " + "I/O completion port")); + return false; + } + else if (ret != m_iocp) + { + wxFAIL_MSG(_("Unexpectedly new I/O completion port was created")); + return false; + } + + // add to watch map + wxFSWatchEntries::value_type val(watch->GetPath(), watch); + return m_watches.insert(val).second; + } + + // Removes a watch we're currently using. Notice that this doesn't happen + // immediately, CompleteRemoval() must be called later when it's really + // safe to delete the watch, i.e. after completion of the IO operation + // using it. + bool ScheduleForRemoval(const wxSharedPtr<wxFSWatchEntryMSW>& watch) + { + wxCHECK_MSG( m_iocp != INVALID_HANDLE_VALUE, false, "IOCP not init" ); + wxCHECK_MSG( watch->IsOk(), false, "Invalid watch" ); + + const wxString path = watch->GetPath(); + wxFSWatchEntries::iterator it = m_watches.find(path); + wxCHECK_MSG( it != m_watches.end(), false, + "Can't remove a watch we don't use" ); + + // We can't just delete the watch here as we can have pending events + // for it and if we destroyed it now, we could get a dangling (or, + // worse, reused to point to another object) pointer in ReadEvents() so + // just remember that this one should be removed when CompleteRemoval() + // is called later. + m_removedWatches.push_back(watch); + m_watches.erase(it); + + return true; + } + + // Really remove the watch previously passed to ScheduleForRemoval(). + // + // It's ok to call this for a watch that hadn't been removed before, in + // this case we'll just return false and do nothing. + bool CompleteRemoval(wxFSWatchEntryMSW* watch) + { + for ( Watches::iterator it = m_removedWatches.begin(); + it != m_removedWatches.end(); + ++it ) + { + if ( (*it).get() == watch ) + { + // Removing the object from here will result in deleting the + // watch itself as it's not referenced from anywhere else now. + m_removedWatches.erase(it); + return true; + } + } + + return false; + } + + // post completion packet + bool PostEmptyStatus() + { + wxCHECK_MSG( m_iocp != INVALID_HANDLE_VALUE, false, "IOCP not init" ); + + // The special values of 0 will make GetStatus() return Status_Exit. + int ret = PostQueuedCompletionStatus(m_iocp, 0, 0, NULL); + if (!ret) + { + wxLogSysError(_("Unable to post completion status")); + } + + return ret != 0; + } + + // Possible return values of GetStatus() + enum Status + { + // Status successfully retrieved into the provided arguments. + Status_OK, + + // Special status indicating that we should exit retrieved. + Status_Exit, + + // An error occurred because the watched directory was deleted. + Status_Deleted, + + // Some other error occurred. + Status_Error + }; + + // Wait for completion status to arrive. + // This function can block forever in it's wait for completion status. + // Use PostEmptyStatus() to wake it up (and end the worker thread) + Status + GetStatus(DWORD* count, wxFSWatchEntryMSW** watch, + OVERLAPPED** overlapped) + { + wxCHECK_MSG( m_iocp != INVALID_HANDLE_VALUE, Status_Error, + "Invalid IOCP object" ); + wxCHECK_MSG( count && watch && overlapped, Status_Error, + "Output parameters can't be NULL" ); + + int ret = GetQueuedCompletionStatus(m_iocp, count, (ULONG_PTR *)watch, + overlapped, INFINITE); + if ( ret != 0 ) + { + return *count || *watch || *overlapped ? Status_OK : Status_Exit; + } + + // An error is returned if the underlying directory has been deleted, + // but this is not really an unexpected failure, so handle it + // specially. + if ( wxSysErrorCode() == ERROR_ACCESS_DENIED && + *watch && !wxFileName::DirExists((*watch)->GetPath()) ) + return Status_Deleted; + + // Some other error, at least log it. + wxLogSysError(_("Unable to dequeue completion packet")); + + return Status_Error; + } + +protected: + bool Init() + { + m_iocp = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0); + if (m_iocp == NULL) + { + wxLogSysError(_("Unable to create I/O completion port")); + } + return m_iocp != NULL; + } + + HANDLE m_iocp; + + // The hash containing all the wxFSWatchEntryMSW objects currently being + // watched keyed by their paths. + wxFSWatchEntries m_watches; + + // Contains the watches which had been removed but are still pending. + typedef wxVector< wxSharedPtr<wxFSWatchEntryMSW> > Watches; + Watches m_removedWatches; +}; + + +class wxIOCPThread : public wxThread +{ +public: + wxIOCPThread(wxFSWatcherImplMSW* service, wxIOCPService* iocp); + + // finishes this thread + bool Finish(); + +protected: + // structure to hold information needed to process one native event + // this is just a dummy holder, so it doesn't take ownership of it's data + struct wxEventProcessingData + { + wxEventProcessingData(const FILE_NOTIFY_INFORMATION* ne, + const wxFSWatchEntryMSW* watch) : + nativeEvent(ne), watch(watch) + {} + + const FILE_NOTIFY_INFORMATION* nativeEvent; + const wxFSWatchEntryMSW* watch; + }; + + virtual ExitCode Entry(); + + // wait for events to occur, read them and send to interested parties + // returns false it empty status was read, which means we whould exit + // true otherwise + bool ReadEvents(); + + void ProcessNativeEvents(wxVector<wxEventProcessingData>& events); + + void SendEvent(wxFileSystemWatcherEvent& evt); + + static int Native2WatcherFlags(int flags); + + static wxString FileNotifyInformationToString( + const FILE_NOTIFY_INFORMATION& e); + + static wxFileName GetEventPath(const wxFSWatchEntryMSW& watch, + const FILE_NOTIFY_INFORMATION& e); + + wxFSWatcherImplMSW* m_service; + wxIOCPService* m_iocp; +}; + +#endif /* WX_MSW_PRIVATE_FSWATCHER_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/hiddenwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/hiddenwin.h new file mode 100644 index 0000000000..3b52b60983 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/hiddenwin.h @@ -0,0 +1,30 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/hiddenwin.h +// Purpose: Helper for creating a hidden window used by wxMSW internally. +// Author: Vadim Zeitlin +// Created: 2011-09-16 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_HIDDENWIN_H_ +#define _WX_MSW_PRIVATE_HIDDENWIN_H_ + +#include "wx/msw/private.h" + +/* + Creates a hidden window with supplied window proc registering the class for + it if necessary (i.e. the first time only). Caller is responsible for + destroying the window and unregistering the class (note that this must be + done because wxWidgets may be used as a DLL and so may be loaded/unloaded + multiple times into/from the same process so we can't rely on automatic + Windows class unregistration). + + pclassname is a pointer to a caller stored classname, which must initially be + NULL. classname is the desired wndclass classname. If function successfully + registers the class, pclassname will be set to classname. + */ +extern "C" WXDLLIMPEXP_BASE HWND +wxCreateHiddenWindow(LPCTSTR *pclassname, LPCTSTR classname, WNDPROC wndproc); + +#endif // _WX_MSW_PRIVATE_HIDDENWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/keyboard.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/keyboard.h new file mode 100644 index 0000000000..002303e967 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/keyboard.h @@ -0,0 +1,41 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/keyboard.h +// Purpose: Helper keyboard-related functions. +// Author: Vadim Zeitlin +// Created: 2010-09-09 +// Copyright: (c) 2010 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_KEYBOARD_H_ +#define _WX_MSW_PRIVATE_KEYBOARD_H_ + +#include "wx/defs.h" + +namespace wxMSWKeyboard +{ + +// ---------------------------------------------------------------------------- +// Functions for translating between MSW virtual keys codes and wx key codes +// +// These functions are currently implemented in src/msw/window.cpp. +// ---------------------------------------------------------------------------- + +// Translate MSW virtual key code to wx key code. lParam is used to distinguish +// between numpad and extended version of the keys, extended is assumed by +// default if lParam == 0. +// +// Returns WXK_NONE if translation couldn't be done at all (this happens e.g. +// for dead keys and in this case uc will be WXK_NONE too) or if the key +// corresponds to a non-Latin-1 character in which case uc is filled with its +// Unicode value. +WXDLLIMPEXP_CORE int VKToWX(WXWORD vk, WXLPARAM lParam = 0, wchar_t *uc = NULL); + +// Translate wxKeyCode enum element (passed as int for compatibility reasons) +// to MSW virtual key code. isExtended is set to true if the key corresponds to +// a non-numpad version of a key that exists both on numpad and outside it. +WXDLLIMPEXP_CORE WXWORD WXToVK(int id, bool *isExtended = NULL); + +} // namespace wxMSWKeyboard + +#endif // _WX_MSW_PRIVATE_KEYBOARD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/metrics.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/metrics.h new file mode 100644 index 0000000000..0e1b41deb5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/metrics.h @@ -0,0 +1,48 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/metrics.h +// Purpose: various helper functions to retrieve system metrics +// Author: Vadim Zeitlin +// Created: 2008-09-05 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_METRICS_H_ +#define _WX_MSW_PRIVATE_METRICS_H_ + +namespace wxMSWImpl +{ + +// return NONCLIENTMETRICS as retrieved by SystemParametersInfo() +// +// currently this is not cached as the values may change when system settings +// do and we don't react to this to invalidate the cache but it could be done +// in the future +// +// MT-safety: this function is only meant to be called from the main thread +inline const NONCLIENTMETRICS& GetNonClientMetrics() +{ + static WinStruct<NONCLIENTMETRICS> nm; + if ( !::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &nm, 0) ) + { +#if WINVER >= 0x0600 + // a new field has been added to NONCLIENTMETRICS under Vista, so + // the call to SystemParametersInfo() fails if we use the struct + // size incorporating this new value on an older system -- retry + // without it + nm.cbSize -= sizeof(int); + if ( !::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &nm, 0) ) +#endif // WINVER >= 0x0600 + { + // maybe we should initialize the struct with some defaults? + wxLogLastError(wxT("SystemParametersInfo(SPI_GETNONCLIENTMETRICS)")); + } + } + + return nm; +} + +} // namespace wxMSWImpl + +#endif // _WX_MSW_PRIVATE_METRICS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/msgdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/msgdlg.h new file mode 100644 index 0000000000..e8946503be --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/msgdlg.h @@ -0,0 +1,93 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/msgdlg.h +// Purpose: helper functions used with native message dialog +// Author: Rickard Westerlund +// Created: 2010-07-12 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_MSGDLG_H_ +#define _WX_MSW_PRIVATE_MSGDLG_H_ + +#include "wx/msw/wrapcctl.h" +#include "wx/scopedarray.h" + +// Macro to help identify if task dialogs are available: we rely on +// TD_WARNING_ICON being defined in the headers for this as this symbol is used +// by the task dialogs only. Also notice that task dialogs are available for +// Unicode applications only. +#if defined(TD_WARNING_ICON) && wxUSE_UNICODE + #define wxHAS_MSW_TASKDIALOG +#endif + +// Provides methods for creating a task dialog. +namespace wxMSWMessageDialog +{ + +#ifdef wxHAS_MSW_TASKDIALOG + class wxMSWTaskDialogConfig + { + public: + enum { MAX_BUTTONS = 4 }; + + wxMSWTaskDialogConfig() + : buttons(new TASKDIALOG_BUTTON[MAX_BUTTONS]), + parent(NULL), + iconId(0), + style(0), + useCustomLabels(false) + { } + + // initializes the object from a message dialog. + wxMSWTaskDialogConfig(const wxMessageDialogBase& dlg); + + wxScopedArray<TASKDIALOG_BUTTON> buttons; + wxWindow *parent; + wxString caption; + wxString message; + wxString extendedMessage; + long iconId; + long style; + bool useCustomLabels; + wxString btnYesLabel; + wxString btnNoLabel; + wxString btnOKLabel; + wxString btnCancelLabel; + wxString btnHelpLabel; + + // Will create a task dialog with it's paremeters for it's creation + // stored in the provided TASKDIALOGCONFIG parameter. + // NOTE: The wxMSWTaskDialogConfig object needs to remain accessible + // during the subsequent call to TaskDialogIndirect(). + void MSWCommonTaskDialogInit(TASKDIALOGCONFIG &tdc); + + // Used by MSWCommonTaskDialogInit() to add a regular button or a + // button with a custom label if used. + void AddTaskDialogButton(TASKDIALOGCONFIG &tdc, + int btnCustomId, + int btnCommonId, + const wxString& customLabel); + }; // class wxMSWTaskDialogConfig + + + typedef HRESULT (WINAPI *TaskDialogIndirect_t)(const TASKDIALOGCONFIG *, + int *, int *, BOOL *); + + // Return the pointer to TaskDialogIndirect(). This should only be called + // if HasNativeTaskDialog() returned true and is normally guaranteed to + // succeed in this case. + TaskDialogIndirect_t GetTaskDialogIndirectFunc(); +#endif // wxHAS_MSW_TASKDIALOG + + + // Check if the task dialog is available: this simply checks the OS version + // as we know that it's only present in Vista and later. + bool HasNativeTaskDialog(); + + // Translates standard MSW button IDs like IDCANCEL into an equivalent + // wx constant such as wxCANCEL. + int MSWTranslateReturnCode(int msAns); +}; // namespace wxMSWMessageDialog + +#endif // _WX_MSW_PRIVATE_MSGDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/pipestream.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/pipestream.h new file mode 100644 index 0000000000..ba6d032bea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/pipestream.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/pipestream.h +// Purpose: MSW wxPipeInputStream and wxPipeOutputStream declarations +// Author: Vadim Zeitlin +// Created: 2013-06-08 (extracted from src/msw/utilsexc.cpp) +// Copyright: (c) 2013 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_PIPESTREAM_H_ +#define _WX_MSW_PRIVATE_PIPESTREAM_H_ + +class wxPipeInputStream : public wxInputStream +{ +public: + wxEXPLICIT wxPipeInputStream(HANDLE hInput); + virtual ~wxPipeInputStream(); + + // returns true if the pipe is still opened + bool IsOpened() const { return m_hInput != INVALID_HANDLE_VALUE; } + + // returns true if there is any data to be read from the pipe + virtual bool CanRead() const; + +protected: + virtual size_t OnSysRead(void *buffer, size_t len); + +protected: + HANDLE m_hInput; + + wxDECLARE_NO_COPY_CLASS(wxPipeInputStream); +}; + +class wxPipeOutputStream: public wxOutputStream +{ +public: + wxEXPLICIT wxPipeOutputStream(HANDLE hOutput); + virtual ~wxPipeOutputStream() { Close(); } + bool Close(); + +protected: + size_t OnSysWrite(const void *buffer, size_t len); + +protected: + HANDLE m_hOutput; + + wxDECLARE_NO_COPY_CLASS(wxPipeOutputStream); +}; + +#endif // _WX_MSW_PRIVATE_PIPESTREAM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/sockmsw.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/sockmsw.h new file mode 100644 index 0000000000..e0f550d329 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/sockmsw.h @@ -0,0 +1,66 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/gsockmsw.h +// Purpose: MSW-specific socket implementation +// Authors: Guilhem Lavaux, Guillermo Rodriguez Garcia, Vadim Zeitlin +// Created: April 1997 +// Copyright: (C) 1999-1997, Guilhem Lavaux +// (C) 1999-2000, Guillermo Rodriguez Garcia +// (C) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef _WX_MSW_GSOCKMSW_H_ +#define _WX_MSW_GSOCKMSW_H_ + +#include "wx/msw/wrapwin.h" + +#if defined(__CYGWIN__) + //CYGWIN gives annoying warning about runtime stuff if we don't do this +# define USE_SYS_TYPES_FD_SET +# include <sys/types.h> +#endif + +#if defined(__WXWINCE__) || defined(__CYGWIN__) + #include <winsock.h> +#endif + +// ---------------------------------------------------------------------------- +// MSW-specific socket implementation +// ---------------------------------------------------------------------------- + +class wxSocketImplMSW : public wxSocketImpl +{ +public: + wxSocketImplMSW(wxSocketBase& wxsocket); + + virtual ~wxSocketImplMSW(); + + virtual wxSocketError GetLastError() const; + + virtual void ReenableEvents(wxSocketEventFlags WXUNUSED(flags)) + { + // notifications are never disabled in this implementation, there is no + // need for this as WSAAsyncSelect() only sends notification once when + // the new data becomes available anyhow, so there is no need to do + // anything here + } + +private: + virtual void DoClose(); + + virtual void UnblockAndRegisterWithEventLoop() + { + // no need to make the socket non-blocking, Install_Callback() will do + // it + wxSocketManager::Get()->Install_Callback(this); + } + + int m_msgnumber; + + friend class wxSocketMSWManager; + + wxDECLARE_NO_COPY_CLASS(wxSocketImplMSW); +}; + +#endif /* _WX_MSW_GSOCKMSW_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/textmeasure.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/textmeasure.h new file mode 100644 index 0000000000..ee14751a5b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/textmeasure.h @@ -0,0 +1,63 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/textmeasure.h +// Purpose: wxMSW-specific declaration of wxTextMeasure class +// Author: Manuel Martin +// Created: 2012-10-05 +// Copyright: (c) 1997-2012 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_TEXTMEASURE_H_ +#define _WX_MSW_PRIVATE_TEXTMEASURE_H_ + +#include "wx/msw/wrapwin.h" + +// ---------------------------------------------------------------------------- +// wxTextMeasure for MSW. +// ---------------------------------------------------------------------------- + +class wxTextMeasure : public wxTextMeasureBase +{ +public: + wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL) + : wxTextMeasureBase(dc, font) + { + Init(); + } + + wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL) + : wxTextMeasureBase(win, font) + { + Init(); + } + +protected: + void Init(); + + virtual void BeginMeasuring(); + virtual void EndMeasuring(); + + virtual void DoGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL); + + virtual bool DoGetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX); + + + + // We use either the HDC of the provided wxDC or an HDC created for our + // window. + HDC m_hdc; + + // If we change the font in BeginMeasuring(), we restore it to the old one + // in EndMeasuring(). + HFONT m_hfontOld; + + wxDECLARE_NO_COPY_CLASS(wxTextMeasure); +}; + +#endif // _WX_MSW_PRIVATE_TEXTMEASURE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/timer.h new file mode 100644 index 0000000000..71ce2ceec7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/private/timer.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/timer.h +// Purpose: wxTimer class +// Author: Julian Smart +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_TIMER_H_ +#define _WX_MSW_PRIVATE_TIMER_H_ + +#if wxUSE_TIMER + +#include "wx/private/timer.h" +#include "wx/msw/wrapwin.h" // for WPARAM + +class WXDLLIMPEXP_BASE wxMSWTimerImpl : public wxTimerImpl +{ +public: + wxMSWTimerImpl(wxTimer *timer) : wxTimerImpl(timer) { m_id = 0; } + + virtual bool Start(int milliseconds = -1, bool oneShot = false); + virtual void Stop(); + + virtual bool IsRunning() const { return m_id != 0; } + +protected: + // this must be 64 bit under Win64 as WPARAM (storing timer ids) is 64 bit + // there and so the ids may possibly not fit in 32 bits + WPARAM m_id; +}; + +#endif // wxUSE_TIMER + +#endif // _WX_TIMERH_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/progdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/progdlg.h new file mode 100644 index 0000000000..c63a0b66f8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/progdlg.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/progdlg.h +// Purpose: wxProgressDialog +// Author: Rickard Westerlund +// Created: 2010-07-22 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROGDLG_H_ +#define _WX_PROGDLG_H_ + +class wxProgressDialogTaskRunner; +class wxProgressDialogSharedData; + +class WXDLLIMPEXP_CORE wxProgressDialog : public wxGenericProgressDialog +{ +public: + wxProgressDialog(const wxString& title, const wxString& message, + int maximum = 100, + wxWindow *parent = NULL, + int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE); + + virtual ~wxProgressDialog(); + + virtual bool Update(int value, const wxString& newmsg = wxEmptyString, bool *skip = NULL); + virtual bool Pulse(const wxString& newmsg = wxEmptyString, bool *skip = NULL); + + void Resume(); + + int GetValue() const; + wxString GetMessage() const; + + void SetRange(int maximum); + + // Return whether "Cancel" or "Skip" button was pressed, always return + // false if the corresponding button is not shown. + bool WasSkipped() const; + bool WasCancelled() const; + + virtual void SetTitle(const wxString& title); + virtual wxString GetTitle() const; + + virtual bool Show( bool show = true ); + + // Must provide overload to avoid hiding it (and warnings about it) + virtual void Update() { wxGenericProgressDialog::Update(); } + + virtual WXWidget GetHandle() const; + +private: + // Performs common routines to Update() and Pulse(). Requires the + // shared object to have been entered. + bool DoNativeBeforeUpdate(bool *skip); + + // Updates the various timing informations for both determinate + // and indeterminate modes. Requires the shared object to have + // been entered. + void UpdateExpandedInformation(int value); + + wxProgressDialogTaskRunner *m_taskDialogRunner; + + wxProgressDialogSharedData *m_sharedData; + + // Store the message and title we currently use to be able to return it + // from Get{Message,Title}() + wxString m_message, + m_title; + + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxProgressDialog); +}; + +#endif // _WX_PROGDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/question.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/question.ico new file mode 100644 index 0000000000..b34c3b81d1 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/question.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/radiobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/radiobox.h new file mode 100644 index 0000000000..53620db9b3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/radiobox.h @@ -0,0 +1,189 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/radiobox.h +// Purpose: wxRadioBox class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RADIOBOX_H_ +#define _WX_RADIOBOX_H_ + +#include "wx/statbox.h" + +class WXDLLIMPEXP_FWD_CORE wxSubwindows; + +// ---------------------------------------------------------------------------- +// wxRadioBox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRadioBox : public wxStaticBox, public wxRadioBoxBase +{ +public: + wxRadioBox() { Init(); } + + wxRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, n, choices, majorDim, + style, val, name); + } + + wxRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, choices, majorDim, + style, val, name); + } + + virtual ~wxRadioBox(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + + // implement the radiobox interface + virtual void SetSelection(int n); + virtual int GetSelection() const { return m_selectedButton; } + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& label); + virtual bool Enable(unsigned int n, bool enable = true); + virtual bool Show(unsigned int n, bool show = true); + virtual bool IsItemEnabled(unsigned int n) const; + virtual bool IsItemShown(unsigned int n) const; + virtual int GetItemFromPoint(const wxPoint& pt) const; + + // override some base class methods + virtual bool Show(bool show = true); + virtual bool Enable(bool enable = true); + virtual bool CanBeFocused() const; + virtual void SetFocus(); + virtual bool SetFont(const wxFont& font); + virtual bool ContainsHWND(WXHWND hWnd) const; +#if wxUSE_TOOLTIPS + virtual bool HasToolTips() const; +#endif // wxUSE_TOOLTIPS +#if wxUSE_HELP + // override virtual function with a platform-independent implementation + virtual wxString GetHelpTextAtPoint(const wxPoint & pt, wxHelpEvent::Origin origin) const + { + return wxRadioBoxBase::DoGetHelpTextAtPoint( this, pt, origin ); + } +#endif // wxUSE_HELP + + virtual bool Reparent(wxWindowBase *newParent); + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + + void SetLabelFont(const wxFont& WXUNUSED(font)) {} + void SetButtonFont(const wxFont& font) { SetFont(font); } + + + // implementation only from now on + // ------------------------------- + + // This function can be used to check if the given radio button HWND + // belongs to one of our radio boxes. If it doesn't, NULL is returned. + static wxRadioBox *GetFromRadioButtonHWND(WXHWND hwnd); + + virtual bool MSWCommand(WXUINT param, WXWORD id); + void Command(wxCommandEvent& event); + + void SendNotificationEvent(); + +protected: + // common part of all ctors + void Init(); + + // subclass one radio button + void SubclassRadioButton(WXHWND hWndBtn); + + // get the max size of radio buttons + wxSize GetMaxButtonSize() const; + + // get the total size occupied by the radio box buttons + wxSize GetTotalButtonSize(const wxSize& sizeBtn) const; + + // Adjust all the buttons to the new window size. + void PositionAllButtons(int x, int y, int width, int height); + + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual wxSize DoGetBestSize() const; + +#if wxUSE_TOOLTIPS + virtual void DoSetItemToolTip(unsigned int n, wxToolTip * tooltip); +#endif + +#ifndef __WXWINCE__ + virtual WXHRGN MSWGetRegionWithoutChildren(); +#endif // __WXWINCE__ + + // resolve ambiguity in base classes + virtual wxBorder GetDefaultBorder() const { return wxRadioBoxBase::GetDefaultBorder(); } + + // the buttons we contain + wxSubwindows *m_radioButtons; + + // and the special dummy button used only as a tab group boundary + WXHWND m_dummyHwnd; + wxWindowIDRef m_dummyId; + + // array of widths and heights of the buttons, may be wxDefaultCoord if the + // corresponding quantity should be computed + int *m_radioWidth; + int *m_radioHeight; + + // currently selected button or wxNOT_FOUND if none + int m_selectedButton; + +private: + DECLARE_DYNAMIC_CLASS(wxRadioBox) + wxDECLARE_NO_COPY_CLASS(wxRadioBox); +}; + +#endif + // _WX_RADIOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/radiobut.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/radiobut.h new file mode 100644 index 0000000000..4e9af38f70 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/radiobut.h @@ -0,0 +1,70 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/radiobut.h +// Purpose: wxRadioButton class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RADIOBUT_H_ +#define _WX_RADIOBUT_H_ + +class WXDLLIMPEXP_CORE wxRadioButton: public wxControl +{ +public: + // ctors and creation functions + wxRadioButton() { Init(); } + + wxRadioButton(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr) + { + Init(); + + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr); + + // implement the radio button interface + virtual void SetValue(bool value); + virtual bool GetValue() const; + + // implementation only from now on + virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual void Command(wxCommandEvent& event); + virtual bool HasTransparentBackground() { return true; } + + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + virtual wxSize DoGetBestSize() const; + +private: + // common part of all ctors + void Init(); + + // we need to store the state internally as the result of GetValue() + // sometimes gets out of sync in WM_COMMAND handler + bool m_isChecked; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxRadioButton) +}; + +#endif + // _WX_RADIOBUT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/rcdefs.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/rcdefs.h new file mode 100644 index 0000000000..8b9ac716f9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/rcdefs.h @@ -0,0 +1,41 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/rcdefs.h +// Purpose: Fallback for the generated rcdefs.h under the lib directory +// Author: Mike Wetherell +// Copyright: (c) 2005 Mike Wetherell +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RCDEFS_H +#define _WX_RCDEFS_H + +#ifdef __GNUC__ + // We must be using windres which uses gcc as its preprocessor. We do need + // to generate the manifest then as gcc doesn't do it automatically and we + // can define the architecture macro on our own as all the usual symbols + // are available (unlike with Microsoft RC.EXE which doesn't predefine + // anything useful at all). + #ifndef wxUSE_RC_MANIFEST + #define wxUSE_RC_MANIFEST 1 + #endif + + #if defined __i386__ + #ifndef WX_CPU_X86 + #define WX_CPU_X86 + #endif + #elif defined __x86_64__ + #ifndef WX_CPU_AMD64 + #define WX_CPU_AMD64 + #endif + #elif defined __ia64__ + #ifndef WX_CPU_IA64 + #define WX_CPU_IA64 + #endif + #endif +#endif + +// Don't do anything here for the other compilers, in particular don't define +// WX_CPU_X86 here as we used to do. If people define wxUSE_RC_MANIFEST, they +// must also define the architecture constant correctly. + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/regconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/regconf.h new file mode 100644 index 0000000000..ec290ec88c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/regconf.h @@ -0,0 +1,114 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/regconf.h +// Purpose: Registry based implementation of wxConfigBase +// Author: Vadim Zeitlin +// Modified by: +// Created: 27.04.98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_REGCONF_H_ +#define _WX_MSW_REGCONF_H_ + +#include "wx/defs.h" + +#if wxUSE_CONFIG && wxUSE_REGKEY + +#include "wx/msw/registry.h" +#include "wx/object.h" +#include "wx/confbase.h" +#include "wx/buffer.h" + +// ---------------------------------------------------------------------------- +// wxRegConfig +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxRegConfig : public wxConfigBase +{ +public: + // ctor & dtor + // will store data in HKLM\appName and HKCU\appName + wxRegConfig(const wxString& appName = wxEmptyString, + const wxString& vendorName = wxEmptyString, + const wxString& localFilename = wxEmptyString, + const wxString& globalFilename = wxEmptyString, + long style = wxCONFIG_USE_GLOBAL_FILE); + + // dtor will save unsaved data + virtual ~wxRegConfig(){} + + // implement inherited pure virtual functions + // ------------------------------------------ + + // path management + virtual void SetPath(const wxString& strPath); + virtual const wxString& GetPath() const { return m_strPath; } + + // entry/subgroup info + // enumerate all of them + virtual bool GetFirstGroup(wxString& str, long& lIndex) const; + virtual bool GetNextGroup (wxString& str, long& lIndex) const; + virtual bool GetFirstEntry(wxString& str, long& lIndex) const; + virtual bool GetNextEntry (wxString& str, long& lIndex) const; + + // tests for existence + virtual bool HasGroup(const wxString& strName) const; + virtual bool HasEntry(const wxString& strName) const; + virtual EntryType GetEntryType(const wxString& name) const; + + // get number of entries/subgroups in the current group, with or without + // it's subgroups + virtual size_t GetNumberOfEntries(bool bRecursive = false) const; + virtual size_t GetNumberOfGroups(bool bRecursive = false) const; + + virtual bool Flush(bool WXUNUSED(bCurrentOnly) = false) { return true; } + + // rename + virtual bool RenameEntry(const wxString& oldName, const wxString& newName); + virtual bool RenameGroup(const wxString& oldName, const wxString& newName); + + // delete + virtual bool DeleteEntry(const wxString& key, bool bGroupIfEmptyAlso = true); + virtual bool DeleteGroup(const wxString& key); + virtual bool DeleteAll(); + +protected: + // opens the local key creating it if necessary and returns it + wxRegKey& LocalKey() const // must be const to be callable from const funcs + { + wxRegConfig* self = wxConstCast(this, wxRegConfig); + + if ( !m_keyLocal.IsOpened() ) + { + // create on demand + self->m_keyLocal.Create(); + } + + return self->m_keyLocal; + } + + // implement read/write methods + virtual bool DoReadString(const wxString& key, wxString *pStr) const; + virtual bool DoReadLong(const wxString& key, long *plResult) const; + virtual bool DoReadBinary(const wxString& key, wxMemoryBuffer* buf) const; + + virtual bool DoWriteString(const wxString& key, const wxString& szValue); + virtual bool DoWriteLong(const wxString& key, long lValue); + virtual bool DoWriteBinary(const wxString& key, const wxMemoryBuffer& buf); + +private: + // these keys are opened during all lifetime of wxRegConfig object + wxRegKey m_keyLocalRoot, m_keyLocal, + m_keyGlobalRoot, m_keyGlobal; + + // current path (not '/' terminated) + wxString m_strPath; + + wxDECLARE_NO_COPY_CLASS(wxRegConfig); + DECLARE_ABSTRACT_CLASS(wxRegConfig) +}; + +#endif // wxUSE_CONFIG && wxUSE_REGKEY + +#endif // _WX_MSW_REGCONF_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/region.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/region.h new file mode 100644 index 0000000000..aba0d536dc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/region.h @@ -0,0 +1,103 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/region.h +// Purpose: wxRegion class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) 1997-2002 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_REGION_H_ +#define _WX_MSW_REGION_H_ + +class WXDLLIMPEXP_CORE wxRegion : public wxRegionWithCombine +{ +public: + wxRegion(); + wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight); + wxRegion(const wxRect& rect); + wxRegion(WXHRGN hRegion); // Hangs on to this region + wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); +#if wxUSE_IMAGE + wxRegion( const wxBitmap& bmp) + { + Union(bmp); + } + wxRegion( const wxBitmap& bmp, + const wxColour& transColour, int tolerance = 0) + { + Union(bmp, transColour, tolerance); + } +#endif // wxUSE_IMAGE + + virtual ~wxRegion(); + + // wxRegionBase methods + virtual void Clear(); + virtual bool IsEmpty() const; + + // Get internal region handle + WXHRGN GetHRGN() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + virtual bool DoIsEqual(const wxRegion& region) const; + virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const; + virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const; + virtual wxRegionContain DoContainsRect(const wxRect& rect) const; + + virtual bool DoOffset(wxCoord x, wxCoord y); + virtual bool DoCombine(const wxRegion& region, wxRegionOp op); + + friend class WXDLLIMPEXP_FWD_CORE wxRegionIterator; + + DECLARE_DYNAMIC_CLASS(wxRegion) +}; + +class WXDLLIMPEXP_CORE wxRegionIterator : public wxObject +{ +public: + wxRegionIterator() { Init(); } + wxRegionIterator(const wxRegion& region); + wxRegionIterator(const wxRegionIterator& ri) : wxObject(ri) { Init(); *this = ri; } + + wxRegionIterator& operator=(const wxRegionIterator& ri); + + virtual ~wxRegionIterator(); + + void Reset() { m_current = 0; } + void Reset(const wxRegion& region); + + bool HaveRects() const { return (m_current < m_numRects); } + + operator bool () const { return HaveRects(); } + + wxRegionIterator& operator++(); + wxRegionIterator operator++(int); + + wxCoord GetX() const; + wxCoord GetY() const; + wxCoord GetW() const; + wxCoord GetWidth() const { return GetW(); } + wxCoord GetH() const; + wxCoord GetHeight() const { return GetH(); } + + wxRect GetRect() const { return wxRect(GetX(), GetY(), GetW(), GetH()); } + +private: + // common part of all ctors + void Init(); + + long m_current; + long m_numRects; + wxRegion m_region; + wxRect* m_rects; + + DECLARE_DYNAMIC_CLASS(wxRegionIterator) +}; + +#endif // _WX_MSW_REGION_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/registry.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/registry.h new file mode 100644 index 0000000000..20343a540b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/registry.h @@ -0,0 +1,275 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/registry.h +// Purpose: Registry classes and functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 03.04.1998 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_REGISTRY_H_ +#define _WX_MSW_REGISTRY_H_ + +#include "wx/defs.h" + +#if wxUSE_REGKEY + +class WXDLLIMPEXP_FWD_BASE wxOutputStream; + +// ---------------------------------------------------------------------------- +// class wxRegKey encapsulates window HKEY handle +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE 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 + 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 + = Type_Dword, // (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 // ??? + }; + + // predefined registry keys + enum StdKey + { + HKCR, // classes root + HKCU, // current user + HKLM, // local machine + HKUSR, // users + HKPD, // performance data (WinNT/2K only) + HKCC, // current config + HKDD, // dynamic data (Win95/98 only) + HKMAX + }; + + // access mode for the key + enum AccessMode + { + Read, // read-only + Write // read and write + }; + + // Different registry views supported under WOW64. + enum WOW64ViewMode + { + // 32 bit registry for 32 bit applications, 64 bit registry + // for 64 bit ones. + WOW64ViewMode_Default, + + // Can be used in 64 bit apps to access 32 bit registry, + // has no effect (i.e. treated as default) in 32 bit apps. + WOW64ViewMode_32, + + // Can be used in 32 bit apps to access 64 bit registry, + // has no effect (i.e. treated as default) in 64 bit apps. + WOW64ViewMode_64 + }; + + // information about standard (predefined) registry keys + // number of standard keys + static const size_t nStdKeys; + // get the name of a standard key + static const wxChar *GetStdKeyName(size_t key); + // get the short name of a standard key + static const wxChar *GetStdKeyShortName(size_t key); + // get StdKey from root HKEY + static StdKey GetStdKeyFromHkey(WXHKEY hkey); + + // extracts 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(WOW64ViewMode viewMode = WOW64ViewMode_Default); + + // strKey is the full name of the key (i.e. starting with HKEY_xxx...) + wxRegKey(const wxString& strKey, + WOW64ViewMode viewMode = WOW64ViewMode_Default); + + // strKey is the name of key under (standard key) keyParent + wxRegKey(StdKey keyParent, + const wxString& strKey, + WOW64ViewMode viewMode = WOW64ViewMode_Default); + + // strKey is the name of key under (previously created) keyParent + wxRegKey(const wxRegKey& keyParent, const wxString& strKey); + // dtor closes the key + ~wxRegKey(); + + // change key (closes the previously opened key if any) + // the name is absolute, i.e. should start with HKEY_xxx + void SetName(const wxString& strKey); + // the name is relative to the parent key + void SetName(StdKey keyParent, const wxString& strKey); + // the name is relative to the parent key + void SetName(const wxRegKey& keyParent, const wxString& strKey); + // hKey should be opened and will be closed in wxRegKey dtor + void SetHkey(WXHKEY hKey); + + // get infomation about the key + // get the (full) key name. Abbreviate std root keys if bShortPrefix. + wxString GetName(bool bShortPrefix = true) const; + // Retrieves the registry view used by this key. + WOW64ViewMode GetView() const { return m_viewMode; } + // return true if the key exists + bool Exists() const; + // get the info about key (any number of these pointers may be NULL) + bool GetKeyInfo(size_t *pnSubKeys, // number of subkeys + size_t *pnMaxKeyLen, // max len of subkey name + size_t *pnValues, // number of values + size_t *pnMaxValueLen) 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(AccessMode mode = Write); + // create the key: will fail if the key already exists and !bOkIfExists + bool Create(bool bOkIfExists = true); + // rename a value from old name to new one + bool RenameValue(const wxString& szValueOld, const wxString& szValueNew); + // rename the key + bool Rename(const wxString& szNewName); + // copy value to another key possibly changing its name (by default it will + // remain the same) + bool CopyValue(const wxString& szValue, wxRegKey& keyDst, + const wxString& szNewName = wxEmptyString); + + // copy the entire contents of the key recursively to another location + bool Copy(const wxString& szNewName); + // same as Copy() but using a key and not the name + bool Copy(wxRegKey& keyDst); + // 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 wxString& szKey); + // deletes the named value (may be empty string to remove the default value) + bool DeleteValue(const wxString& szValue); + + // access to values and subkeys + // get value type + ValueType GetValueType(const wxString& szValue) const; + // returns true if the value contains a number (else it's some string) + bool IsNumericValue(const wxString& szValue) const; + + // assignment operators set the default value of the key + wxRegKey& operator=(const wxString& strValue) + { SetValue(wxEmptyString, strValue); return *this; } + + // query the default value of the key: implicitly or explicitly + wxString QueryDefaultValue() const; + operator wxString() const { return QueryDefaultValue(); } + + // named values + + // set the string value + bool SetValue(const wxString& szValue, const wxString& strValue); + // retrieve the string value + bool QueryValue(const wxString& szValue, wxString& strValue) const + { return QueryValue(szValue, strValue, false); } + // retrieve raw string value + bool QueryRawValue(const wxString& szValue, wxString& strValue) const + { return QueryValue(szValue, strValue, true); } + // retrieve either raw or expanded string value + bool QueryValue(const wxString& szValue, wxString& strValue, bool raw) const; + + // set the numeric value + bool SetValue(const wxString& szValue, long lValue); + // return the numeric value + bool QueryValue(const wxString& szValue, long *plValue) const; + // set the binary value + bool SetValue(const wxString& szValue, const wxMemoryBuffer& buf); + // return the binary value + bool QueryValue(const wxString& szValue, wxMemoryBuffer& buf) const; + + // query existence of a key/value + // return true if value exists + bool HasValue(const wxString& szKey) const; + // return true if given subkey exists + bool HasSubKey(const wxString& szKey) const; + // return true if any subkeys exist + bool HasSubkeys() const; + // return true if any values exist + bool HasValues() const; + // return true if the key is empty (nothing under this key) + bool IsEmpty() const { return !HasSubkeys() && !HasValues(); } + + // enumerate values and subkeys + bool GetFirstValue(wxString& strValueName, long& lIndex); + bool GetNextValue (wxString& strValueName, long& lIndex) const; + + bool GetFirstKey (wxString& strKeyName , long& lIndex); + bool GetNextKey (wxString& strKeyName , long& lIndex) const; + + // export the contents of this key and all its subkeys to the given file + // (which won't be overwritten, it's an error if it already exists) + // + // note that we export the key in REGEDIT4 format, not RegSaveKey() binary + // format nor newer REGEDIT5 one + bool Export(const wxString& filename) const; + + // same as above but write to the given (opened) stream + bool Export(wxOutputStream& ostr) const; + + + // for wxRegConfig usage only: preallocate some memory for the name + void ReserveMemoryForName(size_t bytes) { m_strKey.reserve(bytes); } + +private: + // common part of all ctors + void Init() + { + m_hKey = (WXHKEY) NULL; + m_dwLastError = 0; + } + + // recursive helper for Export() + bool DoExport(wxOutputStream& ostr) const; + + // export a single value + bool DoExportValue(wxOutputStream& ostr, const wxString& name) const; + + // return the text representation (in REGEDIT4 format) of the value with the + // given name + wxString FormatValue(const wxString& name) const; + + + WXHKEY m_hKey, // our handle + m_hRootKey; // handle of the top key (i.e. StdKey) + wxString m_strKey; // key name (relative to m_hRootKey) + WOW64ViewMode m_viewMode; // which view to select under WOW64 + AccessMode m_mode; // valid only if key is opened + long m_dwLastError; // last error (0 if none) + + + wxDECLARE_NO_COPY_CLASS(wxRegKey); +}; + +#endif // wxUSE_REGKEY + +#endif // _WX_MSW_REGISTRY_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/removble.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/removble.ico new file mode 100644 index 0000000000..f218a894c2 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/removble.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/richmsgdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/richmsgdlg.h new file mode 100644 index 0000000000..20c8eb72da --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/richmsgdlg.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/richmsgdlg.h +// Purpose: wxRichMessageDialog +// Author: Rickard Westerlund +// Created: 2010-07-04 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_RICHMSGDLG_H_ +#define _WX_MSW_RICHMSGDLG_H_ + +class WXDLLIMPEXP_CORE wxRichMessageDialog : public wxGenericRichMessageDialog +{ +public: + wxRichMessageDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + long style) + : wxGenericRichMessageDialog(parent, message, caption, style) + { } + + // overridden base class method showing the native task dialog if possible + virtual int ShowModal(); + +private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxRichMessageDialog); +}; + +#endif // _WX_MSW_RICHMSGDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/roller.cur b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/roller.cur new file mode 100644 index 0000000000..118c37fa43 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/roller.cur differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/scrolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/scrolbar.h new file mode 100644 index 0000000000..1b7c86295d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/scrolbar.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/scrolbar.h +// Purpose: wxScrollBar class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SCROLBAR_H_ +#define _WX_SCROLBAR_H_ + +// Scrollbar item +class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase +{ +public: + wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; } + virtual ~wxScrollBar(); + + wxScrollBar(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr) + { + Create(parent, id, pos, size, style, validator, name); + } + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr); + + int GetThumbPosition() const ; + int GetThumbSize() const { return m_pageSize; } + int GetPageSize() const { return m_viewSize; } + int GetRange() const { return m_objectSize; } + + virtual void SetThumbPosition(int viewStart); + virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize, + bool refresh = true); + + // needed for RTTI + void SetThumbSize( int s ) { SetScrollbar( GetThumbPosition() , s , GetRange() , GetPageSize() , true ) ; } + void SetPageSize( int s ) { SetScrollbar( GetThumbPosition() , GetThumbSize() , GetRange() , s , true ) ; } + void SetRange( int s ) { SetScrollbar( GetThumbPosition() , GetThumbSize() , s , GetPageSize() , true ) ; } + + void Command(wxCommandEvent& event); + virtual bool MSWOnScroll(int orientation, WXWORD wParam, + WXWORD pos, WXHWND control); + + // override wxControl version to not use solid background here + virtual WXHBRUSH MSWControlColor(WXHDC pDC, WXHWND hWnd); + + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +protected: + virtual wxSize DoGetBestSize() const; + + int m_pageSize; + int m_viewSize; + int m_objectSize; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxScrollBar) +}; + +#endif + // _WX_SCROLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/seh.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/seh.h new file mode 100644 index 0000000000..3f7c93e520 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/seh.h @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/seh.h +// Purpose: declarations for SEH (structured exceptions handling) support +// Author: Vadim Zeitlin +// Created: 2006-04-26 +// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_SEH_H_ +#define _WX_MSW_SEH_H_ + +#if wxUSE_ON_FATAL_EXCEPTION + + // the exception handler which should be called from the exception filter + // + // it calsl wxApp::OnFatalException() if possible + extern unsigned long wxGlobalSEHandler(EXCEPTION_POINTERS *pExcPtrs); + + // helper macro for wxSEH_HANDLE +#if defined(__BORLANDC__) || (defined(__VISUALC__) && (__VISUALC__ <= 1200)) + // some compilers don't understand that this code is unreachable and warn + // about no value being returned from the function without it, so calm them + // down + #define wxSEH_DUMMY_RETURN(rc) return rc; +#else + #define wxSEH_DUMMY_RETURN(rc) +#endif + + // macros which allow to avoid many #if wxUSE_ON_FATAL_EXCEPTION in the code + // which uses them + #define wxSEH_TRY __try + #define wxSEH_IGNORE __except ( EXCEPTION_EXECUTE_HANDLER ) { } + #define wxSEH_HANDLE(rc) \ + __except ( wxGlobalSEHandler(GetExceptionInformation()) ) \ + { \ + /* use the same exit code as abort() */ \ + ::ExitProcess(3); \ + \ + wxSEH_DUMMY_RETURN(rc) \ + } + +#else // wxUSE_ON_FATAL_EXCEPTION + #define wxSEH_TRY + #define wxSEH_IGNORE + #define wxSEH_HANDLE(rc) +#endif // wxUSE_ON_FATAL_EXCEPTION + +#if wxUSE_ON_FATAL_EXCEPTION && defined(__VISUALC__) && !defined(__WXWINCE__) + #include <eh.h> + + // C++ exception to structured exceptions translator: we need it in order + // to prevent VC++ from "helpfully" translating structured exceptions (such + // as division by 0 or access violation) to C++ pseudo-exceptions + extern void wxSETranslator(unsigned int code, EXCEPTION_POINTERS *ep); + + // up to VC 12 this warning ("calling _set_se_translator() requires /EHa") + // is harmless and it's easier to suppress it than use different makefiles + // for VC5 and 6 (which don't support /EHa at all) and VC7+ (which does + // accept it but it seems to change nothing for it anyhow) + #if __VISUALC__ < 1900 + #pragma warning(disable: 4535) + #endif + + // note that the SE translator must be called wxSETranslator! + #define DisableAutomaticSETranslator() _set_se_translator(wxSETranslator) +#else // !__VISUALC__ + // the other compilers do nothing as stupid by default so nothing to do for + // them + #define DisableAutomaticSETranslator() +#endif // __VISUALC__/!__VISUALC__ + +#endif // _WX_MSW_SEH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/setup.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/setup.h new file mode 100644 index 0000000000..eed28c7012 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/setup.h @@ -0,0 +1,1665 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/setup.h +// Purpose: Configuration for the library +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SETUP_H_ +#define _WX_SETUP_H_ + +/* --- start common options --- */ +// ---------------------------------------------------------------------------- +// global settings +// ---------------------------------------------------------------------------- + +// define this to 0 when building wxBase library - this can also be done from +// makefile/project file overriding the value here +#ifndef wxUSE_GUI + #define wxUSE_GUI 1 +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// compatibility settings +// ---------------------------------------------------------------------------- + +// This setting determines the compatibility with 2.6 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_6 0 + +// This setting determines the compatibility with 2.8 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_8 1 + +// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when +// default system font is used for wxWindow::GetCharWidth/Height() instead of +// the current font. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxDIALOG_UNIT_COMPATIBILITY 0 + +// ---------------------------------------------------------------------------- +// debugging settings +// ---------------------------------------------------------------------------- + +// wxDEBUG_LEVEL will be defined as 1 in wx/debug.h so normally there is no +// need to define it here. You may do it for two reasons: either completely +// disable/compile out the asserts in release version (then do it inside #ifdef +// NDEBUG) or, on the contrary, enable more asserts, including the usually +// disabled ones, in the debug build (then do it inside #ifndef NDEBUG) +// +// #ifdef NDEBUG +// #define wxDEBUG_LEVEL 0 +// #else +// #define wxDEBUG_LEVEL 2 +// #endif + +// wxHandleFatalExceptions() may be used to catch the program faults at run +// time and, instead of terminating the program with a usual GPF message box, +// call the user-defined wxApp::OnFatalException() function. If you set +// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work. +// +// This setting is for Win32 only and can only be enabled if your compiler +// supports Win32 structured exception handling (currently only VC++ does) +// +// Default is 1 +// +// Recommended setting: 1 if your compiler supports it. +#define wxUSE_ON_FATAL_EXCEPTION 1 + +// Set this to 1 to be able to generate a human-readable (unlike +// machine-readable minidump created by wxCrashReport::Generate()) stack back +// trace when your program crashes using wxStackWalker +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_STACKWALKER 1 + +// Set this to 1 to compile in wxDebugReport class which allows you to create +// and optionally upload to your web site a debug report consisting of back +// trace of the crash (if wxUSE_STACKWALKER == 1) and other information. +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, it is compiled into a separate library so there +// is no overhead if you don't use it +#define wxUSE_DEBUGREPORT 1 + +// Generic comment about debugging settings: they are very useful if you don't +// use any other memory leak detection tools such as Purify/BoundsChecker, but +// are probably redundant otherwise. Also, Visual C++ CRT has the same features +// as wxWidgets memory debugging subsystem built in since version 5.0 and you +// may prefer to use it instead of built in memory debugging code because it is +// faster and more fool proof. +// +// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG +// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0) +// and if __NO_VC_CRTDBG__ is not defined. + +// The rest of the options in this section are obsolete and not supported, +// enable them at your own risk. + +// If 1, enables wxDebugContext, for writing error messages to file, etc. If +// __WXDEBUG__ is not defined, will still use the normal memory operators. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_CONTEXT 0 + +// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF* +// __WXDEBUG__ is also defined. +// +// WARNING: this code may not work with all architectures, especially if +// alignment is an issue. This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 1 if you are not using a memory debugging tool, else 0 +#define wxUSE_MEMORY_TRACING 0 + +// In debug mode, cause new and delete to be redefined globally. +// If this causes problems (e.g. link errors which is a common problem +// especially if you use another library which also redefines the global new +// and delete), set this to 0. +// This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If +// this causes problems (e.g. link errors), set this to 0. You may need to set +// this to 0 if using templates (at least for VC++). This switch is currently +// ignored for MinGW/Cygwin. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_NEW_ALWAYS 0 + + +// ---------------------------------------------------------------------------- +// Unicode support +// ---------------------------------------------------------------------------- + +// These settings are obsolete: the library is always built in Unicode mode +// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if +// absolutely necessary -- updating it is strongly recommended as the ANSI mode +// will disappear completely in future wxWidgets releases. +#ifndef wxUSE_UNICODE + #define wxUSE_UNICODE 1 +#endif + +// wxUSE_WCHAR_T is required by wxWidgets now, don't change. +#define wxUSE_WCHAR_T 1 + +// ---------------------------------------------------------------------------- +// global features +// ---------------------------------------------------------------------------- + +// Compile library in exception-safe mode? If set to 1, the library will try to +// behave correctly in presence of exceptions (even though it still will not +// use the exceptions itself) and notify the user code about any unhandled +// exceptions. If set to 0, propagation of the exceptions through the library +// code will lead to undefined behaviour -- but the code itself will be +// slightly smaller and faster. +// +// Note that like wxUSE_THREADS this option is automatically set to 0 if +// wxNO_EXCEPTIONS is defined. +// +// Default is 1 +// +// Recommended setting: depends on whether you intend to use C++ exceptions +// in your own code (1 if you do, 0 if you don't) +#define wxUSE_EXCEPTIONS 1 + +// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI +// +// Default is 0 +// +// Recommended setting: 0 (this is still work in progress...) +#define wxUSE_EXTENDED_RTTI 0 + +// Support for message/error logging. This includes wxLogXXX() functions and +// wxLog and derived classes. Don't set this to 0 unless you really know what +// you are doing. +// +// Default is 1 +// +// Recommended setting: 1 (always) +#define wxUSE_LOG 1 + +// Recommended setting: 1 +#define wxUSE_LOGWINDOW 1 + +// Recommended setting: 1 +#define wxUSE_LOGGUI 1 + +// Recommended setting: 1 +#define wxUSE_LOG_DIALOG 1 + +// Support for command line parsing using wxCmdLineParser class. +// +// Default is 1 +// +// Recommended setting: 1 (can be set to 0 if you don't use the cmd line) +#define wxUSE_CMDLINE_PARSER 1 + +// Support for multithreaded applications: if 1, compile in thread classes +// (thread.h) and make the library a bit more thread safe. Although thread +// support is quite stable by now, you may still consider recompiling the +// library without it if you have no use for it - this will result in a +// somewhat smaller and faster operation. +// +// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset +// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in +// build/msw/config.* file this value will have no effect. +// +// Default is 1 +// +// Recommended setting: 0 unless you do plan to develop MT applications +#define wxUSE_THREADS 1 + +// If enabled, compiles wxWidgets streams classes +// +// wx stream classes are used for image IO, process IO redirection, network +// protocols implementation and much more and so disabling this results in a +// lot of other functionality being lost. +// +// Default is 1 +// +// Recommended setting: 1 as setting it to 0 disables many other things +#define wxUSE_STREAMS 1 + +// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. +// Note that if the system's implementation does not support positional +// parameters, setting this to 1 forces the use of the wxWidgets implementation +// of wxVsnprintf. The standard vsnprintf() supports positional parameters on +// many Unix systems but usually doesn't under Windows. +// +// Positional parameters are very useful when translating a program since using +// them in formatting strings allow translators to correctly reorder the +// translated sentences. +// +// Default is 1 +// +// Recommended setting: 1 if you want to support multiple languages +#define wxUSE_PRINTF_POS_PARAMS 1 + +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but is +// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets +// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under +// XP as this triggers a bug in compiler TLS support that results in crashes +// when any TLS variables are used. +// +// If you're absolutely sure that your build of wxWidgets is never going to be +// used in such situation, either because it's not going to be linked from any +// kind of plugin or because you only target Vista or later systems, you can +// set this to 2 to force the use of compiler TLS even under MSW. +// +// Default is 1 meaning that compiler TLS is used only if it's 100% safe. +// +// Recommended setting: 2 if you want to have maximal performance and don't +// care about the scenario described above. +#define wxUSE_COMPILER_TLS 1 + +// ---------------------------------------------------------------------------- +// Interoperability with the standard library. +// ---------------------------------------------------------------------------- + +// Set wxUSE_STL to 1 to enable maximal interoperability with the standard +// library, even at the cost of backwards compatibility. +// +// Default is 0 +// +// Recommended setting: 0 as the options below already provide a relatively +// good level of interoperability and changing this option arguably isn't worth +// diverging from the official builds of the library. +#define wxUSE_STL 0 + +// This is not a real option but is used as the default value for +// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library headers, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_DEFAULT 0 +#else + #define wxUSE_STD_DEFAULT 1 +#endif + +// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<> +// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but +// usually more limited) implementations are used which allows to avoid the +// dependency on the C++ run-time library. +// +// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't +// support using standard containers and that VC6 needs non-default options for +// such build to avoid getting "fatal error C1076: compiler limit : internal +// heap limit reached; use /Zm to specify a higher limit" in its own standard +// headers, so you need to ensure you do increase the heap size before enabling +// this option for this compiler. +// +// Default is 0 for compatibility reasons. +// +// Recommended setting: 1 unless compatibility with the official wxWidgets +// build and/or the existing code is a concern. +#define wxUSE_STD_CONTAINERS 0 + +// Use standard C++ streams if 1 instead of wx streams in some places. If +// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the +// standard streams library. +// +// Notice that enabling this does not replace wx streams with std streams +// everywhere, in a lot of places wx streams are used no matter what. +// +// Default is 1 if compiler supports it. +// +// Recommended setting: 1 if you use the standard streams anyhow and so +// dependency on the standard streams library is not a +// problem +#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT + +// Enable minimal interoperability with the standard C++ string class if 1. +// "Minimal" means that wxString can be constructed from std::string or +// std::wstring but can't be implicitly converted to them. You need to enable +// the option below for the latter. +// +// Default is 1 for most compilers. +// +// Recommended setting: 1 unless you want to ensure your program doesn't use +// the standard C++ library at all. +#define wxUSE_STD_STRING wxUSE_STD_DEFAULT + +// Make wxString as much interchangeable with std::[w]string as possible, in +// particular allow implicit conversion of wxString to either of these classes. +// This comes at a price (or a benefit, depending on your point of view) of not +// allowing implicit conversion to "const char *" and "const wchar_t *". +// +// Because a lot of existing code relies on these conversions, this option is +// disabled by default but can be enabled for your build if you don't care +// about compatibility. +// +// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled. +// +// Recommended setting: 0 to remain compatible with the official builds of +// wxWidgets. +#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL + +// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix +// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>. +// +// Note that newer compilers (including VC++ 7.1 and later) don't support +// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow. +// +// Default is 0. +// +// Recommended setting: 0, only set to 1 if you use a really old compiler +#define wxUSE_IOSTREAMH 0 + + +// ---------------------------------------------------------------------------- +// non GUI features selection +// ---------------------------------------------------------------------------- + +// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit +// integer which is implemented in terms of native 64 bit integers if any or +// uses emulation otherwise. +// +// This class is required by wxDateTime and so you should enable it if you want +// to use wxDateTime. For most modern platforms, it will use the native 64 bit +// integers in which case (almost) all of its functions are inline and it +// almost does not take any space, so there should be no reason to switch it +// off. +// +// Recommended setting: 1 +#define wxUSE_LONGLONG 1 + +// Set wxUSE_BASE64 to 1, to compile in Base64 support. This is required for +// storing binary data in wxConfig on most platforms. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_BASE64 1 + +// Set this to 1 to be able to use wxEventLoop even in console applications +// (i.e. using base library only, without GUI). This is mostly useful for +// processing socket events but is also necessary to use timers in console +// applications +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_CONSOLE_EVENTLOOP 1 + +// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level +// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions. +// +// Default is 1 +// +// Recommended setting: 1 (wxFile is highly recommended as it is required by +// i18n code, wxFileConfig and others) +#define wxUSE_FILE 1 +#define wxUSE_FFILE 1 + +// Use wxFSVolume class providing access to the configured/active mount points +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely disabled if you don't use it) +#define wxUSE_FSVOLUME 1 + +// Use wxStandardPaths class which allows to retrieve some standard locations +// in the file system +// +// Default is 1 +// +// Recommended setting: 1 (may be disabled to save space, but not much) +#define wxUSE_STDPATHS 1 + +// use wxTextBuffer class: required by wxTextFile +#define wxUSE_TEXTBUFFER 1 + +// use wxTextFile class: requires wxFile and wxTextBuffer, required by +// wxFileConfig +#define wxUSE_TEXTFILE 1 + +// i18n support: _() macro, wxLocale class. Requires wxTextFile. +#define wxUSE_INTL 1 + +// Provide wxFoo_l() functions similar to standard foo() functions but taking +// an extra locale parameter. +// +// Notice that this is fully implemented only for the systems providing POSIX +// xlocale support or Microsoft Visual C++ >= 8 (which provides proprietary +// almost-equivalent of xlocale functions), otherwise wxFoo_l() functions will +// only work for the current user locale and "C" locale. You can use +// wxHAS_XLOCALE_SUPPORT to test whether the full support is available. +// +// Default is 1 +// +// Recommended setting: 1 but may be disabled if you are writing programs +// running only in C locale anyhow +#define wxUSE_XLOCALE 1 + +// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which +// allow to manipulate dates, times and time intervals. wxDateTime replaces the +// old wxTime and wxDate classes which are still provided for backwards +// compatibility (and implemented in terms of wxDateTime). +// +// Note that this class is relatively new and is still officially in alpha +// stage because some features are not yet (fully) implemented. It is already +// quite useful though and should only be disabled if you are aiming at +// absolutely minimal version of the library. +// +// Requires: wxUSE_LONGLONG +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_DATETIME 1 + +// Set wxUSE_TIMER to 1 to compile wxTimer class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_TIMER 1 + +// Use wxStopWatch clas. +// +// Default is 1 +// +// Recommended setting: 1 (needed by wxSocket) +#define wxUSE_STOPWATCH 1 + +// Set wxUSE_FSWATCHER to 1 if you want to enable wxFileSystemWatcher +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FSWATCHER 1 + +// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes +// which allow the application to store its settings in the persistent +// storage. Setting this to 1 will also enable on-demand creation of the +// global config object in wxApp. +// +// See also wxUSE_CONFIG_NATIVE below. +// +// Recommended setting: 1 +#define wxUSE_CONFIG 1 + +// If wxUSE_CONFIG is 1, you may choose to use either the native config +// classes under Windows (using .INI files under Win16 and the registry under +// Win32) or the portable text file format used by the config classes under +// Unix. +// +// Default is 1 to use native classes. Note that you may still use +// wxFileConfig even if you set this to 1 - just the config object created by +// default for the applications needs will be a wxRegConfig or wxIniConfig and +// not wxFileConfig. +// +// Recommended setting: 1 +#define wxUSE_CONFIG_NATIVE 1 + +// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows +// to connect/disconnect from the network and be notified whenever the dial-up +// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DIALUP_MANAGER 1 + +// Compile in classes for run-time DLL loading and function calling. +// Required by wxUSE_DIALUP_MANAGER. +// +// This setting is for Win32 only +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DYNLIB_CLASS 1 + +// experimental, don't use for now +#define wxUSE_DYNAMIC_LOADER 1 + +// Set to 1 to use socket classes +#define wxUSE_SOCKETS 1 + +// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS) +// +// Notice that currently setting this option under Windows will result in +// programs which can only run on recent OS versions (with ws2_32.dll +// installed) which is why it is disabled by default. +// +// Default is 1. +// +// Recommended setting: 1 if you need IPv6 support +#define wxUSE_IPV6 0 + +// Set to 1 to enable virtual file systems (required by wxHTML) +#define wxUSE_FILESYSTEM 1 + +// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ZIP 1 + +// Set to 1 to enable virtual archive filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ARCHIVE 1 + +// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_INET 1 + +// wxArchive classes for accessing archives such as zip and tar +#define wxUSE_ARCHIVE_STREAMS 1 + +// Set to 1 to compile wxZipInput/OutputStream classes. +#define wxUSE_ZIPSTREAM 1 + +// Set to 1 to compile wxTarInput/OutputStream classes. +#define wxUSE_TARSTREAM 1 + +// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by +// wxUSE_LIBPNG +#define wxUSE_ZLIB 1 + +// If enabled, the code written by Apple will be used to write, in a portable +// way, float on the disk. See extended.c for the license which is different +// from wxWidgets one. +// +// Default is 1. +// +// Recommended setting: 1 unless you don't like the license terms (unlikely) +#define wxUSE_APPLE_IEEE 1 + +// Joystick support class +#define wxUSE_JOYSTICK 1 + +// wxFontEnumerator class +#define wxUSE_FONTENUM 1 + +// wxFontMapper class +#define wxUSE_FONTMAP 1 + +// wxMimeTypesManager class +#define wxUSE_MIMETYPE 1 + +// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP +// or wxURL you need to set this to 1. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_PROTOCOL 1 + +// The settings for the individual URL schemes +#define wxUSE_PROTOCOL_FILE 1 +#define wxUSE_PROTOCOL_FTP 1 +#define wxUSE_PROTOCOL_HTTP 1 + +// Define this to use wxURL class. +#define wxUSE_URL 1 + +// Define this to use native platform url and protocol support. +// Currently valid only for MS-Windows. +// Note: if you set this to 1, you can open ftp/http/gopher sites +// and obtain a valid input stream for these sites +// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0. +// Doing so reduces the code size. +// +// This code is experimental and subject to change. +#define wxUSE_URL_NATIVE 0 + +// Support for wxVariant class used in several places throughout the library, +// notably in wxDataViewCtrl API. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size as much as +// possible in which case setting this to 0 can gain up to 100KB. +#define wxUSE_VARIANT 1 + +// Support for wxAny class, the successor for wxVariant. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size by a small amount, +// or your compiler cannot for some reason cope with complexity of templates used. +#define wxUSE_ANY 1 + +// Support for regular expression matching via wxRegEx class: enable this to +// use POSIX regular expressions in your code. You need to compile regex +// library from src/regex to use it under Windows. +// +// Default is 0 +// +// Recommended setting: 1 if your compiler supports it, if it doesn't please +// contribute us a makefile for src/regex for it +#define wxUSE_REGEX 1 + +// wxSystemOptions class +#define wxUSE_SYSTEM_OPTIONS 1 + +// wxSound class +#define wxUSE_SOUND 1 + +// Use wxMediaCtrl +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_MEDIACTRL 1 + +// Use wxWidget's XRC XML-based resource system. Recommended. +// +// Default is 1 +// +// Recommended setting: 1 (requires wxUSE_XML) +#define wxUSE_XRC 1 + +// XML parsing classes. Note that their API will change in the future, so +// using wxXmlDocument and wxXmlNode in your app is not recommended. +// +// Default is the same as wxUSE_XRC, i.e. 1 by default. +// +// Recommended setting: 1 (required by XRC) +#define wxUSE_XML wxUSE_XRC + +// Use wxWidget's AUI docking system +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_AUI 1 + +// Use wxWidget's Ribbon classes for interfaces +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_RIBBON 1 + +// Use wxPropertyGrid. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_PROPGRID 1 + +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + +// Use wxWidget's web viewing classes +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW 1 + +// Use the IE wxWebView backend +// +// Default is 1 on MSW +// +// Recommended setting: 1 +#ifdef __WXMSW__ +#define wxUSE_WEBVIEW_IE 1 +#else +#define wxUSE_WEBVIEW_IE 0 +#endif + +// Use the WebKit wxWebView backend +// +// Default is 1 on GTK and OSX +// +// Recommended setting: 1 +#if defined(__WXGTK__) || defined(__WXOSX__) +#define wxUSE_WEBVIEW_WEBKIT 1 +#else +#define wxUSE_WEBVIEW_WEBKIT 0 +#endif + +// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced +// 2D drawing API. (Still somewhat experimental) +// +// Please note that on Windows gdiplus.dll is loaded dynamically which means +// that nothing special needs to be done as long as you don't use +// wxGraphicsContext at all or only use it on XP and later systems but you +// still do need to distribute it yourself for an application using +// wxGraphicsContext to be runnable on pre-XP systems. +// +// Default is 1 except if you're using a non-Microsoft compiler under Windows +// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. +// mingw32) you may need to install the headers (and just the headers) +// yourself. If you do, change the setting below manually. +// +// Recommended setting: 1 if supported by the compilation environment + +// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is +// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined +#ifdef _MSC_VER +# if _MSC_VER >= 1310 + // MSVC7.1+ comes with new enough Platform SDK, enable + // wxGraphicsContext support for it +# define wxUSE_GRAPHICS_CONTEXT 1 +# else + // MSVC 6 didn't include GDI+ headers so disable by default, enable it + // here if you use MSVC 6 with a newer SDK +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#else + // Disable support for other Windows compilers, enable it if your compiler + // comes with new enough SDK or you installed the headers manually. + // + // Notice that this will be set by configure under non-Windows platforms + // anyhow so the value there is not important. +# define wxUSE_GRAPHICS_CONTEXT 0 +#endif + +// Enable wxGraphicsContext implementation using Cairo library. +// +// This is not needed under Windows and detected automatically by configure +// under other systems, however you may set this to 1 manually if you installed +// Cairo under Windows yourself and prefer to use it instead the native GDI+ +// implementation. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_CAIRO 0 + + +// ---------------------------------------------------------------------------- +// Individual GUI controls +// ---------------------------------------------------------------------------- + +// You must set wxUSE_CONTROLS to 1 if you are using any controls at all +// (without it, wxControl class is not compiled) +// +// Default is 1 +// +// Recommended setting: 1 (don't change except for very special programs) +#define wxUSE_CONTROLS 1 + +// Support markup in control labels, i.e. provide wxControl::SetLabelMarkup(). +// Currently markup is supported only by a few controls and only some ports but +// their number will increase with time. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you want to save on code size) +#define wxUSE_MARKUP 1 + +// wxPopupWindow class is a top level transient window. It is currently used +// to implement wxTipWindow +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW) +#define wxUSE_POPUPWIN 1 + +// wxTipWindow allows to implement the custom tooltips, it is used by the +// context help classes. Requires wxUSE_POPUPWIN. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0) +#define wxUSE_TIPWINDOW 1 + +// Each of the settings below corresponds to one wxWidgets control. They are +// all switched on by default but may be disabled if you are sure that your +// program (including any standard dialogs it can show!) doesn't need them and +// if you desperately want to save some space. If you use any of these you must +// set wxUSE_CONTROLS as well. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl +#define wxUSE_BANNERWINDOW 1 // wxBannerWindow +#define wxUSE_BUTTON 1 // wxButton +#define wxUSE_BMPBUTTON 1 // wxBitmapButton +#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl +#define wxUSE_CHECKBOX 1 // wxCheckBox +#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHOICE 1 // wxChoice +#define wxUSE_COLLPANE 1 // wxCollapsiblePane +#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl +#define wxUSE_COMBOBOX 1 // wxComboBox +#define wxUSE_COMMANDLINKBUTTON 1 // wxCommandLinkButton +#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl +#define wxUSE_DATEPICKCTRL 1 // wxDatePickerCtrl +#define wxUSE_DIRPICKERCTRL 1 // wxDirPickerCtrl +#define wxUSE_EDITABLELISTBOX 1 // wxEditableListBox +#define wxUSE_FILECTRL 1 // wxFileCtrl +#define wxUSE_FILEPICKERCTRL 1 // wxFilePickerCtrl +#define wxUSE_FONTPICKERCTRL 1 // wxFontPickerCtrl +#define wxUSE_GAUGE 1 // wxGauge +#define wxUSE_HEADERCTRL 1 // wxHeaderCtrl +#define wxUSE_HYPERLINKCTRL 1 // wxHyperlinkCtrl +#define wxUSE_LISTBOX 1 // wxListBox +#define wxUSE_LISTCTRL 1 // wxListCtrl +#define wxUSE_RADIOBOX 1 // wxRadioBox +#define wxUSE_RADIOBTN 1 // wxRadioButton +#define wxUSE_RICHMSGDLG 1 // wxRichMessageDialog +#define wxUSE_SCROLLBAR 1 // wxScrollBar +#define wxUSE_SEARCHCTRL 1 // wxSearchCtrl +#define wxUSE_SLIDER 1 // wxSlider +#define wxUSE_SPINBTN 1 // wxSpinButton +#define wxUSE_SPINCTRL 1 // wxSpinCtrl +#define wxUSE_STATBOX 1 // wxStaticBox +#define wxUSE_STATLINE 1 // wxStaticLine +#define wxUSE_STATTEXT 1 // wxStaticText +#define wxUSE_STATBMP 1 // wxStaticBitmap +#define wxUSE_TEXTCTRL 1 // wxTextCtrl +#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl +#define wxUSE_TOGGLEBTN 1 // requires wxButton +#define wxUSE_TREECTRL 1 // wxTreeCtrl +#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl + +// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR +// below either wxStatusBar95 or a generic wxStatusBar will be used. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STATUSBAR 1 + +// Two status bar implementations are available under Win32: the generic one +// or the wrapper around native control. For native look and feel the native +// version should be used. +// +// Default is 1 for the platforms where native status bar is supported. +// +// Recommended setting: 1 (there is no advantage in using the generic one) +#define wxUSE_NATIVE_STATUSBAR 1 + +// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar +// classes at all. Otherwise, use the native toolbar class unless +// wxUSE_TOOLBAR_NATIVE is 0. +// +// Default is 1 for all settings. +// +// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE. +#define wxUSE_TOOLBAR 1 +#define wxUSE_TOOLBAR_NATIVE 1 + +// wxNotebook is a control with several "tabs" located on one of its sides. It +// may be used to logically organise the data presented to the user instead of +// putting everything in one huge dialog. It replaces wxTabControl and related +// classes of wxWin 1.6x. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTEBOOK 1 + +// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_LISTBOOK 1 + +// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CHOICEBOOK 1 + +// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TREEBOOK 1 + +// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of +// tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLBOOK 1 + +// wxTaskBarIcon is a small notification icon shown in the system toolbar or +// dock. +// +// Default is 1. +// +// Recommended setting: 1 (but can be set to 0 if you don't need it) +#define wxUSE_TASKBARICON 1 + +// wxGrid class +// +// Default is 1, set to 0 to cut down compilation time and binaries size if you +// don't use it. +// +// Recommended setting: 1 +// +#define wxUSE_GRID 1 + +// wxMiniFrame class: a frame with narrow title bar +// +// Default is 1. +// +// Recommended setting: 1 (it doesn't cost almost anything) +#define wxUSE_MINIFRAME 1 + +// wxComboCtrl and related classes: combobox with custom popup window and +// not necessarily a listbox. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it +// it used by wxComboBox +#define wxUSE_COMBOCTRL 1 + +// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox +// items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0, except where it is +// needed as a base class for generic wxBitmapComboBox. +#define wxUSE_ODCOMBOBOX 1 + +// wxBitmapComboBox is a combobox that can have images in front of text items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 +#define wxUSE_BITMAPCOMBOBOX 1 + +// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items +// up and down in it. It is also used as part of wxRearrangeDialog. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 (currently used only by +// wxHeaderCtrl) +#define wxUSE_REARRANGECTRL 1 + +// ---------------------------------------------------------------------------- +// Miscellaneous GUI stuff +// ---------------------------------------------------------------------------- + +// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar) +#define wxUSE_ACCEL 1 + +// Use the standard art provider. The icons returned by this provider are +// embedded into the library as XPMs so disabling it reduces the library size +// somewhat but this should only be done if you use your own custom art +// provider returning the icons or never use any icons not provided by the +// native art provider (which might not be implemented at all for some +// platforms) or by the Tango icons provider (if it's not itself disabled +// below). +// +// Default is 1. +// +// Recommended setting: 1 unless you use your own custom art provider. +#define wxUSE_ARTPROVIDER_STD 1 + +// Use art provider providing Tango icons: this art provider has higher quality +// icons than the default ones using smaller size XPM icons without +// transparency but the embedded PNG icons add to the library size. +// +// Default is 1 under non-GTK ports. Under wxGTK the native art provider using +// the GTK+ stock icons replaces it so it is normally not necessary. +// +// Recommended setting: 1 but can be turned off to reduce the library size. +#define wxUSE_ARTPROVIDER_TANGO 1 + +// Hotkey support (currently Windows only) +#define wxUSE_HOTKEY 1 + +// Use wxCaret: a class implementing a "cursor" in a text control (called caret +// under Windows). +// +// Default is 1. +// +// Recommended setting: 1 (can be safely set to 0, not used by the library) +#define wxUSE_CARET 1 + +// Use wxDisplay class: it allows enumerating all displays on a system and +// their geometries as well as finding the display on which the given point or +// window lies. +// +// Default is 1. +// +// Recommended setting: 1 if you need it, can be safely set to 0 otherwise +#define wxUSE_DISPLAY 1 + +// Miscellaneous geometry code: needed for Canvas library +#define wxUSE_GEOMETRY 1 + +// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and +// wxListCtrl. +// +// Default is 1. +// +// Recommended setting: 1 (set it to 0 if you don't use any of the controls +// enumerated above, then this class is mostly useless too) +#define wxUSE_IMAGLIST 1 + +// Use wxInfoBar class. +// +// Default is 1. +// +// Recommended setting: 1 (but can be disabled without problems as nothing +// depends on it) +#define wxUSE_INFOBAR 1 + +// Use wxMenu, wxMenuBar, wxMenuItem. +// +// Default is 1. +// +// Recommended setting: 1 (can't be disabled under MSW) +#define wxUSE_MENUS 1 + +// Use wxNotificationMessage. +// +// wxNotificationMessage allows to show non-intrusive messages to the user +// using balloons, banners, popups or whatever is the appropriate method for +// the current platform. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTIFICATION_MESSAGE 1 + +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + +// wxRichToolTip is a customizable tooltip class which has more functionality +// than the stock (but native, unlike this class) wxToolTip. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely set to 0 if you don't need it) +#define wxUSE_RICHTOOLTIP 1 + +// Use wxSashWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SASH 1 + +// Use wxSplitterWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SPLITTER 1 + +// Use wxToolTip and wxWindow::Set/GetToolTip() methods. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLTIPS 1 + +// wxValidator class and related methods +#define wxUSE_VALIDATORS 1 + +// Use reference counted ID management: this means that wxWidgets will track +// the automatically allocated ids (those used when you use wxID_ANY when +// creating a window, menu or toolbar item &c) instead of just supposing that +// the program never runs out of them. This is mostly useful only under wxMSW +// where the total ids range is limited to SHRT_MIN..SHRT_MAX and where +// long-running programs can run into problems with ids reuse without this. On +// the other platforms, where the ids have the full int range, this shouldn't +// be necessary. +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif + +// ---------------------------------------------------------------------------- +// common dialogs +// ---------------------------------------------------------------------------- + +// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g. +// file selector, printer dialog). Switching this off also switches off the +// printing architecture and interactive wxPrinterDC. +// +// Default is 1 +// +// Recommended setting: 1 (unless it really doesn't work) +#define wxUSE_COMMON_DIALOGS 1 + +// wxBusyInfo displays window with message when app is busy. Works in same way +// as wxBusyCursor +#define wxUSE_BUSYINFO 1 + +// Use single/multiple choice dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_CHOICEDLG 1 + +// Use colour picker dialog +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_COLOURDLG 1 + +// wxDirDlg class for getting a directory name from user +#define wxUSE_DIRDLG 1 + +// TODO: setting to choose the generic or native one + +// Use file open/save dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in many places in the library itself) +#define wxUSE_FILEDLG 1 + +// Use find/replace dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely set to 0) +#define wxUSE_FINDREPLDLG 1 + +// Use font picker dialog +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_FONTDLG 1 + +// Use wxMessageDialog and wxMessageBox. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_MSGDLG 1 + +// progress dialog class for lengthy operations +#define wxUSE_PROGRESSDLG 1 + +// support for startup tips (wxShowTip &c) +#define wxUSE_STARTUP_TIPS 1 + +// text entry dialog and wxGetTextFromUser function +#define wxUSE_TEXTDLG 1 + +// number entry dialog +#define wxUSE_NUMBERDLG 1 + +// splash screen class +#define wxUSE_SPLASH 1 + +// wizards +#define wxUSE_WIZARDDLG 1 + +// Compile in wxAboutBox() function showing the standard "About" dialog. +// +// Default is 1 +// +// Recommended setting: 1 but can be set to 0 to save some space if you don't +// use this function +#define wxUSE_ABOUTDLG 1 + +// wxFileHistory class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FILE_HISTORY 1 + +// ---------------------------------------------------------------------------- +// Metafiles support +// ---------------------------------------------------------------------------- + +// Windows supports the graphics format known as metafile which is, though not +// portable, is widely used under Windows and so is supported by wxWin (under +// Windows only, of course). Win16 (Win3.1) used the so-called "Window +// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in +// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by +// default, WMFs will be used under Win16 and EMFs under Win32. This may be +// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting +// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile +// in any metafile related classes at all. +// +// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS. +// +// Recommended setting: default or 0 for everything for portable programs. +#define wxUSE_METAFILE 1 +#define wxUSE_ENH_METAFILE 1 +#define wxUSE_WIN_METAFILES_ALWAYS 0 + +// ---------------------------------------------------------------------------- +// Big GUI components +// ---------------------------------------------------------------------------- + +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + +// Set to 0 to disable document/view architecture +#define wxUSE_DOC_VIEW_ARCHITECTURE 1 + +// Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 1 + +// Set to 0 to disable print/preview architecture code +#define wxUSE_PRINTING_ARCHITECTURE 1 + +// wxHTML sublibrary allows to display HTML in wxWindow programs and much, +// much more. +// +// Default is 1. +// +// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a +// smaller library. +#define wxUSE_HTML 1 + +// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL +// headers and libraries to be able to compile the library with wxUSE_GLCANVAS +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). +// +// Default is 1 unless the compiler is known to ship without the necessary +// headers (Digital Mars) or the platform doesn't support OpenGL (Windows CE). +// +// Recommended setting: 1 if you intend to use OpenGL, can be safely set to 0 +// otherwise. +#define wxUSE_GLCANVAS 1 + +// wxRichTextCtrl allows editing of styled text. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 if you want compile a +// smaller library. +#define wxUSE_RICHTEXT 1 + +// ---------------------------------------------------------------------------- +// Data transfer +// ---------------------------------------------------------------------------- + +// Use wxClipboard class for clipboard copy/paste. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CLIPBOARD 1 + +// Use wxDataObject and related classes. Needed for clipboard and OLE drag and +// drop +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DATAOBJ 1 + +// Use wxDropTarget and wxDropSource classes for drag and drop (this is +// different from "built in" drag and drop in wxTreeCtrl which is always +// available). Requires wxUSE_DATAOBJ. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DRAG_AND_DROP 1 + +// Use wxAccessible for enhanced and customisable accessibility. +// Depends on wxUSE_OLE. +// +// Default is 0. +// +// Recommended setting (at present): 0 +#define wxUSE_ACCESSIBILITY 0 + +// ---------------------------------------------------------------------------- +// miscellaneous settings +// ---------------------------------------------------------------------------- + +// wxSingleInstanceChecker class allows to verify at startup if another program +// instance is running. +// +// Default is 1 +// +// Recommended setting: 1 (the class is tiny, disabling it won't save much +// space) +#define wxUSE_SNGLINST_CHECKER 1 + +#define wxUSE_DRAGIMAGE 1 + +#define wxUSE_IPC 1 + // 0 for no interprocess comms +#define wxUSE_HELP 1 + // 0 for no help facility + +// Should we use MS HTML help for wxHelpController? If disabled, neither +// wxCHMHelpController nor wxBestHelpController are available. +// +// Default is 1 under MSW, 0 is always used for the other platforms. +// +// Recommended setting: 1, only set to 0 if you have trouble compiling +// wxCHMHelpController (could be a problem with really ancient compilers) +#define wxUSE_MS_HTML_HELP 1 + + +// Use wxHTML-based help controller? +#define wxUSE_WXHTML_HELP 1 + +#define wxUSE_CONSTRAINTS 1 + // 0 for no window layout constraint system + +#define wxUSE_SPLINES 1 + // 0 for no splines + +#define wxUSE_MOUSEWHEEL 1 + // Include mouse wheel support + +// Compile wxUIActionSimulator class? +#define wxUSE_UIACTIONSIMULATOR 1 + +// ---------------------------------------------------------------------------- +// wxDC classes for various output formats +// ---------------------------------------------------------------------------- + +// Set to 1 for PostScript device context. +#define wxUSE_POSTSCRIPT 0 + +// Set to 1 to use font metric files in GetTextExtent +#define wxUSE_AFM_FOR_POSTSCRIPT 1 + +// Set to 1 to compile in support for wxSVGFileDC, a wxDC subclass which allows +// to create files in SVG (Scalable Vector Graphics) format. +#define wxUSE_SVG 1 + +// Should wxDC provide SetTransformMatrix() and related methods? +// +// Default is 1 but can be set to 0 if this functionality is not used. Notice +// that currently only wxMSW supports this so setting this to 0 doesn't change +// much for non-MSW platforms (although it will still save a few bytes +// probably). +// +// Recommended setting: 1. +#define wxUSE_DC_TRANSFORM_MATRIX 1 + +// ---------------------------------------------------------------------------- +// image format support +// ---------------------------------------------------------------------------- + +// wxImage supports many different image formats which can be configured at +// compile-time. BMP is always supported, others are optional and can be safely +// disabled if you don't plan to use images in such format sometimes saving +// substantial amount of code in the final library. +// +// Some formats require an extra library which is included in wxWin sources +// which is mentioned if it is the case. + +// Set to 1 for wxImage support (recommended). +#define wxUSE_IMAGE 1 + +// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB. +#define wxUSE_LIBPNG 1 + +// Set to 1 for JPEG format support (requires libjpeg) +#define wxUSE_LIBJPEG 1 + +// Set to 1 for TIFF format support (requires libtiff) +#define wxUSE_LIBTIFF 1 + +// Set to 1 for TGA format support (loading only) +#define wxUSE_TGA 1 + +// Set to 1 for GIF format support +#define wxUSE_GIF 1 + +// Set to 1 for PNM format support +#define wxUSE_PNM 1 + +// Set to 1 for PCX format support +#define wxUSE_PCX 1 + +// Set to 1 for IFF format support (Amiga format) +#define wxUSE_IFF 0 + +// Set to 1 for XPM format support +#define wxUSE_XPM 1 + +// Set to 1 for MS Icons and Cursors format support +#define wxUSE_ICO_CUR 1 + +// Set to 1 to compile in wxPalette class +#define wxUSE_PALETTE 1 + +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 + + +/* --- end common options --- */ + +/* --- start MSW options --- */ +// ---------------------------------------------------------------------------- +// Windows-only settings +// ---------------------------------------------------------------------------- + +// Set wxUSE_UNICODE_MSLU to 1 if you're compiling wxWidgets in Unicode mode +// and want to run your programs under Windows 9x and not only NT/2000/XP. +// This setting enables use of unicows.dll from MSLU (MS Layer for Unicode, see +// http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx). Note +// that you will have to modify the makefiles to include unicows.lib import +// library as the first library (see installation instructions in install.txt +// to learn how to do it when building the library or samples). +// +// If your compiler doesn't have unicows.lib, you can get a version of it at +// http://libunicows.sourceforge.net +// +// Default is 0 +// +// Recommended setting: 0 (1 if you want to deploy Unicode apps on 9x systems) +#ifndef wxUSE_UNICODE_MSLU + #define wxUSE_UNICODE_MSLU 0 +#endif + +// Set this to 1 if you want to use wxWidgets and MFC in the same program. This +// will override some other settings (see below) +// +// Default is 0. +// +// Recommended setting: 0 unless you really have to use MFC +#define wxUSE_MFC 0 + +// Set this to 1 for generic OLE support: this is required for drag-and-drop, +// clipboard, OLE Automation. Only set it to 0 if your compiler is very old and +// can't compile/doesn't have the OLE headers. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_OLE 1 + +// Set this to 1 to enable wxAutomationObject class. +// +// Default is 1. +// +// Recommended setting: 1 if you need to control other applications via OLE +// Automation, can be safely set to 0 otherwise +#define wxUSE_OLE_AUTOMATION 1 + +// Set this to 1 to enable wxActiveXContainer class allowing to embed OLE +// controls in wx. +// +// Default is 1. +// +// Recommended setting: 1, required by wxMediaCtrl +#define wxUSE_ACTIVEX 1 + +// wxDC caching implementation +#define wxUSE_DC_CACHEING 1 + +// Set this to 1 to enable wxDIB class used internally for manipulating +// wxBitmap data. +// +// Default is 1, set it to 0 only if you don't use wxImage neither +// +// Recommended setting: 1 (without it conversion to/from wxImage won't work) +#define wxUSE_WXDIB 1 + +// Set to 0 to disable PostScript print/preview architecture code under Windows +// (just use Windows printing). +#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1 + +// Set this to 1 to compile in wxRegKey class. +// +// Default is 1 +// +// Recommended setting: 1, this is used internally by wx in a few places +#define wxUSE_REGKEY 1 + +// Set this to 1 to use RICHEDIT controls for wxTextCtrl with style wxTE_RICH +// which allows to put more than ~32Kb of text in it even under Win9x (NT +// doesn't have such limitation). +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1, only set it to 0 if your compiler doesn't have +// or can't compile <richedit.h> +#define wxUSE_RICHEDIT 1 + +// Set this to 1 to use extra features of richedit v2 and later controls +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1 +#define wxUSE_RICHEDIT2 1 + +// Set this to 1 to enable support for the owner-drawn menu and listboxes. This +// is required by wxUSE_CHECKLISTBOX. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 for a small library size reduction +#define wxUSE_OWNER_DRAWN 1 + +// Set this to 1 to enable MSW-specific wxTaskBarIcon::ShowBalloon() method. It +// is required by native wxNotificationMessage implementation. +// +// Default is 1 but disabled in wx/msw/chkconf.h if SDK is too old to contain +// the necessary declarations. +// +// Recommended setting: 1, set to 0 for a tiny library size reduction +#define wxUSE_TASKBARICON_BALLOONS 1 + +// Set to 1 to compile MS Windows XP theme engine support +#define wxUSE_UXTHEME 1 + +// Set to 1 to use InkEdit control (Tablet PC), if available +#define wxUSE_INKEDIT 0 + +// Set to 1 to enable .INI files based wxConfig implementation (wxIniConfig) +// +// Default is 0. +// +// Recommended setting: 0, nobody uses .INI files any more +#define wxUSE_INICONF 0 + +// ---------------------------------------------------------------------------- +// Generic versions of native controls +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxDatePickerCtrlGeneric in addition to the +// native wxDatePickerCtrl +// +// Default is 0. +// +// Recommended setting: 0, this is mainly used for testing +#define wxUSE_DATEPICKCTRL_GENERIC 0 + +// Set this to 1 to be able to use wxTimePickerCtrlGeneric in addition to the +// native wxTimePickerCtrl for the platforms that have the latter (MSW). +// +// Default is 0. +// +// Recommended setting: 0, this is mainly used for testing +#define wxUSE_TIMEPICKCTRL_GENERIC 0 + +// ---------------------------------------------------------------------------- +// Crash debugging helpers +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxCrashReport::Generate() to create mini +// dumps of your program when it crashes (or at any other moment) +// +// Default is 1 if supported by the compiler (VC++ and recent BC++ only). +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_CRASHREPORT 1 +/* --- end MSW options --- */ + +#endif // _WX_SETUP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/setup_inc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/setup_inc.h new file mode 100644 index 0000000000..6905a7a8e6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/setup_inc.h @@ -0,0 +1,164 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/setup_inc.h +// Purpose: MSW-specific setup.h options +// Author: Vadim Zeitlin +// Created: 2007-07-21 (extracted from wx/msw/setup0.h) +// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// Windows-only settings +// ---------------------------------------------------------------------------- + +// Set wxUSE_UNICODE_MSLU to 1 if you're compiling wxWidgets in Unicode mode +// and want to run your programs under Windows 9x and not only NT/2000/XP. +// This setting enables use of unicows.dll from MSLU (MS Layer for Unicode, see +// http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx). Note +// that you will have to modify the makefiles to include unicows.lib import +// library as the first library (see installation instructions in install.txt +// to learn how to do it when building the library or samples). +// +// If your compiler doesn't have unicows.lib, you can get a version of it at +// http://libunicows.sourceforge.net +// +// Default is 0 +// +// Recommended setting: 0 (1 if you want to deploy Unicode apps on 9x systems) +#ifndef wxUSE_UNICODE_MSLU + #define wxUSE_UNICODE_MSLU 0 +#endif + +// Set this to 1 if you want to use wxWidgets and MFC in the same program. This +// will override some other settings (see below) +// +// Default is 0. +// +// Recommended setting: 0 unless you really have to use MFC +#define wxUSE_MFC 0 + +// Set this to 1 for generic OLE support: this is required for drag-and-drop, +// clipboard, OLE Automation. Only set it to 0 if your compiler is very old and +// can't compile/doesn't have the OLE headers. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_OLE 1 + +// Set this to 1 to enable wxAutomationObject class. +// +// Default is 1. +// +// Recommended setting: 1 if you need to control other applications via OLE +// Automation, can be safely set to 0 otherwise +#define wxUSE_OLE_AUTOMATION 1 + +// Set this to 1 to enable wxActiveXContainer class allowing to embed OLE +// controls in wx. +// +// Default is 1. +// +// Recommended setting: 1, required by wxMediaCtrl +#define wxUSE_ACTIVEX 1 + +// wxDC caching implementation +#define wxUSE_DC_CACHEING 1 + +// Set this to 1 to enable wxDIB class used internally for manipulating +// wxBitmap data. +// +// Default is 1, set it to 0 only if you don't use wxImage neither +// +// Recommended setting: 1 (without it conversion to/from wxImage won't work) +#define wxUSE_WXDIB 1 + +// Set to 0 to disable PostScript print/preview architecture code under Windows +// (just use Windows printing). +#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1 + +// Set this to 1 to compile in wxRegKey class. +// +// Default is 1 +// +// Recommended setting: 1, this is used internally by wx in a few places +#define wxUSE_REGKEY 1 + +// Set this to 1 to use RICHEDIT controls for wxTextCtrl with style wxTE_RICH +// which allows to put more than ~32Kb of text in it even under Win9x (NT +// doesn't have such limitation). +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1, only set it to 0 if your compiler doesn't have +// or can't compile <richedit.h> +#define wxUSE_RICHEDIT 1 + +// Set this to 1 to use extra features of richedit v2 and later controls +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1 +#define wxUSE_RICHEDIT2 1 + +// Set this to 1 to enable support for the owner-drawn menu and listboxes. This +// is required by wxUSE_CHECKLISTBOX. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 for a small library size reduction +#define wxUSE_OWNER_DRAWN 1 + +// Set this to 1 to enable MSW-specific wxTaskBarIcon::ShowBalloon() method. It +// is required by native wxNotificationMessage implementation. +// +// Default is 1 but disabled in wx/msw/chkconf.h if SDK is too old to contain +// the necessary declarations. +// +// Recommended setting: 1, set to 0 for a tiny library size reduction +#define wxUSE_TASKBARICON_BALLOONS 1 + +// Set to 1 to compile MS Windows XP theme engine support +#define wxUSE_UXTHEME 1 + +// Set to 1 to use InkEdit control (Tablet PC), if available +#define wxUSE_INKEDIT 0 + +// Set to 1 to enable .INI files based wxConfig implementation (wxIniConfig) +// +// Default is 0. +// +// Recommended setting: 0, nobody uses .INI files any more +#define wxUSE_INICONF 0 + +// ---------------------------------------------------------------------------- +// Generic versions of native controls +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxDatePickerCtrlGeneric in addition to the +// native wxDatePickerCtrl +// +// Default is 0. +// +// Recommended setting: 0, this is mainly used for testing +#define wxUSE_DATEPICKCTRL_GENERIC 0 + +// Set this to 1 to be able to use wxTimePickerCtrlGeneric in addition to the +// native wxTimePickerCtrl for the platforms that have the latter (MSW). +// +// Default is 0. +// +// Recommended setting: 0, this is mainly used for testing +#define wxUSE_TIMEPICKCTRL_GENERIC 0 + +// ---------------------------------------------------------------------------- +// Crash debugging helpers +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxCrashReport::Generate() to create mini +// dumps of your program when it crashes (or at any other moment) +// +// Default is 1 if supported by the compiler (VC++ and recent BC++ only). +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_CRASHREPORT 1 diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/slider.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/slider.h new file mode 100644 index 0000000000..a16c5952e0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/slider.h @@ -0,0 +1,141 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/slider.h +// Purpose: wxSlider class implementation using trackbar control +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SLIDER_H_ +#define _WX_SLIDER_H_ + +class WXDLLIMPEXP_FWD_CORE wxSubwindows; + +// Slider +class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase +{ +public: + wxSlider() { Init(); } + + wxSlider(wxWindow *parent, + wxWindowID id, + int value, + int minValue, + int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr) + { + Init(); + + (void)Create(parent, id, value, minValue, maxValue, + pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + int value, + int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr); + + virtual ~wxSlider(); + + // slider methods + virtual int GetValue() const; + virtual void SetValue(int); + + void SetRange(int minValue, int maxValue); + + int GetMin() const { return m_rangeMin; } + int GetMax() const { return m_rangeMax; } + + // Win32-specific slider methods + int GetTickFreq() const { return m_tickFreq; } + void SetPageSize(int pageSize); + int GetPageSize() const; + void ClearSel(); + void ClearTicks(); + void SetLineSize(int lineSize); + int GetLineSize() const; + int GetSelEnd() const; + int GetSelStart() const; + void SetSelection(int minPos, int maxPos); + void SetThumbLength(int len); + int GetThumbLength() const; + void SetTick(int tickPos); + + // implementation only from now on + WXHWND GetStaticMin() const; + WXHWND GetStaticMax() const; + WXHWND GetEditValue() const; + virtual bool ContainsHWND(WXHWND hWnd) const; + + // we should let background show through the slider (and its labels) + virtual bool HasTransparentBackground() { return true; } + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + + void Command(wxCommandEvent& event); + virtual bool MSWOnScroll(int orientation, WXWORD wParam, + WXWORD pos, WXHWND control); + + virtual bool Show(bool show = true); + virtual bool Enable(bool show = true); + virtual bool SetFont(const wxFont& font); + + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const; + +protected: + // common part of all ctors + void Init(); + + // format an integer value as string + static wxString Format(int n) { return wxString::Format(wxT("%d"), n); } + + // get the boundig box for the slider and possible labels + wxRect GetBoundingBox() const; + + // Get the height and, if the pointers are non NULL, widths of both labels. + // + // Notice that the return value will be 0 if we don't have wxSL_LABELS + // style but we do fill widthMin and widthMax even if we don't have + // wxSL_MIN_MAX_LABELS style set so the caller should account for it. + int GetLabelsSize(int *widthMin = NULL, int *widthMax = NULL) const; + + + // overridden base class virtuals + virtual void DoGetPosition(int *x, int *y) const; + virtual void DoGetSize(int *width, int *height) const; + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual wxSize DoGetBestSize() const; + + // the labels windows, if any + wxSubwindows *m_labels; + + int m_rangeMin; + int m_rangeMax; + int m_pageSize; + int m_lineSize; + int m_tickFreq; + + // flag needed to detect whether we're getting THUMBRELEASE event because + // of dragging the thumb or scrolling the mouse wheel + bool m_isDragging; + + // Platform-specific implementation of SetTickFreq + virtual void DoSetTickFreq(int freq); + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider) +}; + +#endif // _WX_SLIDER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/sound.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/sound.h new file mode 100644 index 0000000000..9e7cc49698 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/sound.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/sound.h +// Purpose: wxSound class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SOUND_H_ +#define _WX_SOUND_H_ + +#if wxUSE_SOUND + +class WXDLLIMPEXP_ADV wxSound : public wxSoundBase +{ +public: + wxSound(); + wxSound(const wxString& fileName, bool isResource = false); + wxSound(size_t size, const void* data); + virtual ~wxSound(); + + // Create from resource or file + bool Create(const wxString& fileName, bool isResource = false); + + // Create from data + bool Create(size_t size, const void* data); + + bool IsOk() const { return m_data != NULL; } + + static void Stop(); + +protected: + void Init() { m_data = NULL; } + bool CheckCreatedOk(); + void Free(); + + virtual bool DoPlay(unsigned flags) const; + +private: + // data of this object + class wxSoundData *m_data; + + wxDECLARE_NO_COPY_CLASS(wxSound); +}; + +#endif // wxUSE_SOUND + +#endif // _WX_SOUND_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/spinbutt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/spinbutt.h new file mode 100644 index 0000000000..d50912fbf8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/spinbutt.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/spinbutt.h +// Purpose: wxSpinButton class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SPINBUTT_H_ +#define _WX_SPINBUTT_H_ + +#include "wx/control.h" +#include "wx/event.h" + +#if wxUSE_SPINBTN + +class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase +{ +public: + // construction + wxSpinButton() { } + + wxSpinButton(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, + const wxString& name = wxSPIN_BUTTON_NAME) + { + Create(parent, id, pos, size, style, name); + } + + virtual ~wxSpinButton(); + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, + const wxString& name = wxSPIN_BUTTON_NAME); + + + // accessors + virtual int GetValue() const; + virtual void SetValue(int val); + virtual void SetRange(int minVal, int maxVal); + + // implementation + virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + virtual bool MSWOnScroll(int orientation, WXWORD wParam, + WXWORD pos, WXHWND control); + + // a wxSpinButton can't do anything useful with focus, only wxSpinCtrl can + virtual bool AcceptsFocus() const { return false; } + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +protected: + virtual wxSize DoGetBestSize() const; + + // ensure that the control displays a value in the current range + virtual void NormalizeValue(); + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxSpinButton) +}; + +#endif // wxUSE_SPINBTN + +#endif // _WX_SPINBUTT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/spinctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/spinctrl.h new file mode 100644 index 0000000000..9250292de0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/spinctrl.h @@ -0,0 +1,171 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/spinctrl.h +// Purpose: wxSpinCtrl class declaration for Win32 +// Author: Vadim Zeitlin +// Modified by: +// Created: 22.07.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_SPINCTRL_H_ +#define _WX_MSW_SPINCTRL_H_ + +#include "wx/spinbutt.h" // the base class + +#if wxUSE_SPINCTRL + +#include "wx/dynarray.h" + +class WXDLLIMPEXP_FWD_CORE wxSpinCtrl; +WX_DEFINE_EXPORTED_ARRAY_PTR(wxSpinCtrl *, wxArraySpins); + +// ---------------------------------------------------------------------------- +// Under Win32, wxSpinCtrl is a wxSpinButton with a buddy (as MSDN docs call +// it) text window whose contents is automatically updated when the spin +// control is clicked. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinButton +{ +public: + wxSpinCtrl() { Init(); } + + wxSpinCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + int min = 0, int max = 100, int initial = 0, + const wxString& name = wxT("wxSpinCtrl")) + { + Init(); + + Create(parent, id, value, pos, size, style, min, max, initial, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT, + int min = 0, int max = 100, int initial = 0, + const wxString& name = wxT("wxSpinCtrl")); + + // a wxTextCtrl-like method (but we can't have GetValue returning wxString + // because the base class already has one returning int!) + void SetValue(const wxString& text); + + // another wxTextCtrl-like method + void SetSelection(long from, long to); + + // wxSpinCtrlBase methods + virtual int GetBase() const; + virtual bool SetBase(int base); + + + // implementation only from now on + // ------------------------------- + + virtual ~wxSpinCtrl(); + + virtual void SetValue(int val); + virtual int GetValue() const; + virtual void SetRange(int minVal, int maxVal); + virtual bool SetFont(const wxFont &font); + virtual void SetFocus(); + + virtual bool Enable(bool enable = true); + virtual bool Show(bool show = true); + + virtual bool Reparent(wxWindowBase *newParent); + + // wxSpinButton doesn't accept focus, but we do + virtual bool AcceptsFocus() const { return wxWindow::AcceptsFocus(); } + + // we're like wxTextCtrl and not (default) wxButton + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL) + { + return GetCompositeControlsDefaultAttributes(variant); + } + + // for internal use only + + // get the subclassed window proc of the buddy text + WXFARPROC GetBuddyWndProc() const { return m_wndProcBuddy; } + + // return the spinctrl object whose buddy is the given window or NULL + static wxSpinCtrl *GetSpinForTextCtrl(WXHWND hwndBuddy); + + // process a WM_COMMAND generated by the buddy text control + bool ProcessTextCommand(WXWORD cmd, WXWORD id); + + // recognize buddy window as part of this control at wx level + virtual bool ContainsHWND(WXHWND hWnd) const { return hWnd == m_hwndBuddy; } + +protected: + virtual void DoGetPosition(int *x, int *y) const; + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + virtual void DoGetSize(int *width, int *height) const; + virtual void DoGetClientSize(int *x, int *y) const; +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip( wxToolTip *tip ); +#endif // wxUSE_TOOLTIPS + + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + virtual bool MSWOnScroll(int orientation, WXWORD wParam, + WXWORD pos, WXHWND control); + + // handle processing of special keys + void OnChar(wxKeyEvent& event); + void OnSetFocus(wxFocusEvent& event); + void OnKillFocus(wxFocusEvent& event); + + // generate spin control update event with the given value + void SendSpinUpdate(int value); + + // called to ensure that the value is in the correct range + virtual void NormalizeValue(); + + + // the value of the control before the latest change (which might not have + // changed anything in fact -- this is why we need this field) + int m_oldValue; + + // the data for the "buddy" text ctrl + WXHWND m_hwndBuddy; + WXFARPROC m_wndProcBuddy; + + // Block text update event after SetValue() + bool m_blockEvent; + +private: + // Common part of all ctors. + void Init(); + + // Adjust the text control style depending on whether we need to enter only + // digits or may need to enter something else (e.g. "-" sign, "x" + // hexadecimal prefix, ...) in it. + void UpdateBuddyStyle(); + + + DECLARE_DYNAMIC_CLASS(wxSpinCtrl) + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxSpinCtrl); +}; + +#endif // wxUSE_SPINCTRL + +#endif // _WX_MSW_SPINCTRL_H_ + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/stackwalk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/stackwalk.h new file mode 100644 index 0000000000..6ff467205e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/stackwalk.h @@ -0,0 +1,104 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/stackwalk.h +// Purpose: wxStackWalker for MSW +// Author: Vadim Zeitlin +// Modified by: +// Created: 2005-01-08 +// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_STACKWALK_H_ +#define _WX_MSW_STACKWALK_H_ + +#include "wx/arrstr.h" + +// these structs are declared in windows headers +struct _CONTEXT; +struct _EXCEPTION_POINTERS; + +// and these in dbghelp.h +struct _SYMBOL_INFO; + +// ---------------------------------------------------------------------------- +// wxStackFrame +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStackFrame : public wxStackFrameBase +{ +private: + wxStackFrame *ConstCast() const + { return const_cast<wxStackFrame *>(this); } + + size_t DoGetParamCount() const { return m_paramTypes.GetCount(); } + +public: + wxStackFrame(size_t level, void *address, size_t addrFrame) + : wxStackFrameBase(level, address) + { + m_hasName = + m_hasLocation = false; + + m_addrFrame = addrFrame; + } + + virtual size_t GetParamCount() const + { + ConstCast()->OnGetParam(); + return DoGetParamCount(); + } + + virtual bool + GetParam(size_t n, wxString *type, wxString *name, wxString *value) const; + + // callback used by OnGetParam(), don't call directly + void OnParam(_SYMBOL_INFO *pSymInfo); + +protected: + virtual void OnGetName(); + virtual void OnGetLocation(); + + void OnGetParam(); + + + // helper for debug API: it wants to have addresses as DWORDs + size_t GetSymAddr() const + { + return reinterpret_cast<size_t>(m_address); + } + +private: + bool m_hasName, + m_hasLocation; + + size_t m_addrFrame; + + wxArrayString m_paramTypes, + m_paramNames, + m_paramValues; +}; + +// ---------------------------------------------------------------------------- +// wxStackWalker +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStackWalker : public wxStackWalkerBase +{ +public: + // we don't use ctor argument, it is for compatibility with Unix version + // only + wxStackWalker(const char * WXUNUSED(argv0) = NULL) { } + + virtual void Walk(size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH); +#if wxUSE_ON_FATAL_EXCEPTION + virtual void WalkFromException(size_t maxDepth = wxSTACKWALKER_MAX_DEPTH); +#endif // wxUSE_ON_FATAL_EXCEPTION + + + // enumerate stack frames from the given context + void WalkFrom(const _CONTEXT *ctx, size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH); + void WalkFrom(const _EXCEPTION_POINTERS *ep, size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH); +}; + +#endif // _WX_MSW_STACKWALK_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statbmp.h new file mode 100644 index 0000000000..7cb93efd06 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statbmp.h @@ -0,0 +1,98 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/statbmp.h +// Purpose: wxStaticBitmap class for wxMSW +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATBMP_H_ +#define _WX_STATBMP_H_ + +#include "wx/control.h" +#include "wx/icon.h" +#include "wx/bitmap.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBitmapNameStr[]; + +// a control showing an icon or a bitmap +class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase +{ +public: + wxStaticBitmap() { Init(); } + + wxStaticBitmap(wxWindow *parent, + wxWindowID id, + const wxGDIImage& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr) + { + Init(); + + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxGDIImage& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr); + + virtual ~wxStaticBitmap() { Free(); } + + virtual void SetIcon(const wxIcon& icon) { SetImage(&icon); } + virtual void SetBitmap(const wxBitmap& bitmap) { SetImage(&bitmap); } + virtual wxBitmap GetBitmap() const; + virtual wxIcon GetIcon() const; + + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +protected: + virtual wxSize DoGetBestClientSize() const; + + // ctor/dtor helpers + void Init() { m_isIcon = true; m_image = NULL; m_currentHandle = 0; } + void Free(); + + // true if icon/bitmap is valid + bool ImageIsOk() const; + + void SetImage(const wxGDIImage* image); + void SetImageNoCopy( wxGDIImage* image ); + +#ifndef __WXWINCE__ + // draw the bitmap ourselves here if the OS can't do it correctly (if it + // can we leave it to it) + void DoPaintManually(wxPaintEvent& event); +#endif // !__WXWINCE__ + + void WXHandleSize(wxSizeEvent& event); + + // we can have either an icon or a bitmap + bool m_isIcon; + wxGDIImage *m_image; + + // handle used in last call to STM_SETIMAGE + WXHANDLE m_currentHandle; + +private: + // Replace the image at the native control level with the given HBITMAP or + // HICON (which can be 0) and destroy the previous image if necessary. + void MSWReplaceImageHandle(WXLPARAM handle); + + DECLARE_DYNAMIC_CLASS(wxStaticBitmap) + wxDECLARE_EVENT_TABLE(); + wxDECLARE_NO_COPY_CLASS(wxStaticBitmap); +}; + +#endif + // _WX_STATBMP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statbox.h new file mode 100644 index 0000000000..7721ccacb1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statbox.h @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/statbox.h +// Purpose: wxStaticBox class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_STATBOX_H_ +#define _WX_MSW_STATBOX_H_ + +// Group box +class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase +{ +public: + wxStaticBox() { } + + wxStaticBox(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBoxNameStr) + { + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBoxNameStr); + + /// Implementation only + virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; + + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +protected: + virtual wxSize DoGetBestSize() const; + +#ifndef __WXWINCE__ +public: + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + +protected: + // return the region with all the windows inside this static box excluded + virtual WXHRGN MSWGetRegionWithoutChildren(); + + // remove the parts which are painted by static box itself from the given + // region which is embedded in a rectangle (0, 0)-(w, h) + virtual void MSWGetRegionWithoutSelf(WXHRGN hrgn, int w, int h); + + // paint the given rectangle with our background brush/colour + virtual void PaintBackground(wxDC& dc, const struct tagRECT& rc); + // paint the foreground of the static box + virtual void PaintForeground(wxDC& dc, const struct tagRECT& rc); + + void OnPaint(wxPaintEvent& event); +#endif // !__WXWINCE__ + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticBox) +}; + +#endif // _WX_MSW_STATBOX_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statline.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statline.h new file mode 100644 index 0000000000..1d2662b3bb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statline.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/statline.h +// Purpose: MSW version of wxStaticLine class +// Author: Vadim Zeitlin +// Created: 28.06.99 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_STATLINE_H_ +#define _WX_MSW_STATLINE_H_ + +// ---------------------------------------------------------------------------- +// wxStaticLine +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase +{ +public: + // constructors and pseudo-constructors + wxStaticLine() { } + + wxStaticLine( wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr ) + { + Create(parent, id, pos, size, style, name); + } + + bool Create( wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr ); + + // overridden base class virtuals + virtual bool AcceptsFocus() const { return false; } + + // usually overridden base class virtuals + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticLine) +}; + +#endif // _WX_MSW_STATLINE_H_ + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/stattext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/stattext.h new file mode 100644 index 0000000000..9bbcca7141 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/stattext.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/stattext.h +// Purpose: wxStaticText class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATTEXT_H_ +#define _WX_STATTEXT_H_ + +class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase +{ +public: + wxStaticText() { } + + wxStaticText(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticTextNameStr) + { + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticTextNameStr); + + // override some methods to resize the window properly + virtual void SetLabel(const wxString& label); + virtual bool SetFont( const wxFont &font ); + + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const; + +protected: + // implement/override some base class virtuals + virtual void DoSetSize(int x, int y, int w, int h, + int sizeFlags = wxSIZE_AUTO); + virtual wxSize DoGetBestClientSize() const; + + virtual wxString DoGetLabel() const; + virtual void DoSetLabel(const wxString& str); + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticText) +}; + +#endif + // _WX_STATTEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statusbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statusbar.h new file mode 100644 index 0000000000..b1d352a7cc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/statusbar.h @@ -0,0 +1,111 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/statusbar.h +// Purpose: native implementation of wxStatusBar +// Author: Vadim Zeitlin +// Modified by: +// Created: 04.04.98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_STATUSBAR_H_ +#define _WX_MSW_STATUSBAR_H_ + +#if wxUSE_NATIVE_STATUSBAR + +#include "wx/vector.h" +#include "wx/tooltip.h" + +class WXDLLIMPEXP_FWD_CORE wxClientDC; + +class WXDLLIMPEXP_CORE wxStatusBar : public wxStatusBarBase +{ +public: + // ctors and such + wxStatusBar(); + wxStatusBar(wxWindow *parent, + wxWindowID id = wxID_ANY, + long style = wxSTB_DEFAULT_STYLE, + const wxString& name = wxStatusBarNameStr) + { + m_pDC = NULL; + (void)Create(parent, id, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + long style = wxSTB_DEFAULT_STYLE, + const wxString& name = wxStatusBarNameStr); + + virtual ~wxStatusBar(); + + // implement base class methods + virtual void SetFieldsCount(int number = 1, const int *widths = NULL); + virtual void SetStatusWidths(int n, const int widths_field[]); + virtual void SetStatusStyles(int n, const int styles[]); + virtual void SetMinHeight(int height); + virtual bool GetFieldRect(int i, wxRect& rect) const; + + virtual int GetBorderX() const; + virtual int GetBorderY() const; + + // override some wxWindow virtual methods too + virtual bool SetFont(const wxFont& font); + + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, + WXWPARAM wParam, + WXLPARAM lParam); + +protected: + // implement base class pure virtual method + virtual void DoUpdateStatusText(int number); + + // override some base class virtuals + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const; + virtual wxSize DoGetBestSize() const; + virtual void DoMoveWindow(int x, int y, int width, int height); +#if wxUSE_TOOLTIPS + virtual bool MSWProcessMessage(WXMSG* pMsg); + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result); +#endif + + // implementation of the public SetStatusWidths() + void MSWUpdateFieldsWidths(); + + // used by DoUpdateStatusText() + wxClientDC *m_pDC; + +#if wxUSE_TOOLTIPS + // the tooltips used when wxSTB_SHOW_TIPS is given + wxVector<wxToolTip*> m_tooltips; +#endif + +private: + struct MSWBorders + { + int horz, + vert, + between; + }; + + // retrieve all status bar borders using SB_GETBORDERS + MSWBorders MSWGetBorders() const; + + // return the size of the border between the fields + int MSWGetBorderWidth() const; + + struct MSWMetrics + { + int gripWidth, + textMargin; + }; + + // return the various status bar metrics + static const MSWMetrics& MSWGetMetrics(); + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBar) +}; + +#endif // wxUSE_NATIVE_STATUSBAR + +#endif // _WX_MSW_STATUSBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/std.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/std.ico new file mode 100644 index 0000000000..435cca2471 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/std.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/stdpaths.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/stdpaths.h new file mode 100644 index 0000000000..80ad985044 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/stdpaths.h @@ -0,0 +1,95 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/stdpaths.h +// Purpose: wxStandardPaths for Win32 +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-10-19 +// Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_STDPATHS_H_ +#define _WX_MSW_STDPATHS_H_ + +// ---------------------------------------------------------------------------- +// wxStandardPaths +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStandardPaths : public wxStandardPathsBase +{ +public: + // implement base class pure virtuals + virtual wxString GetExecutablePath() const; + virtual wxString GetConfigDir() const; + virtual wxString GetUserConfigDir() const; + virtual wxString GetDataDir() const; + virtual wxString GetUserDataDir() const; + virtual wxString GetUserLocalDataDir() const; + virtual wxString GetPluginsDir() const; + virtual wxString GetDocumentsDir() const; + + + // MSW-specific methods + + // This class supposes that data, plugins &c files are located under the + // program directory which is the directory containing the application + // binary itself. But sometimes this binary may be in a subdirectory of the + // main program directory, e.g. this happens in at least the following + // common cases: + // 1. The program is in "bin" subdirectory of the installation directory. + // 2. The program is in "debug" subdirectory of the directory containing + // sources and data files during development + // + // By calling this function you instruct the class to remove the last + // component of the path if it matches its argument. Notice that it may be + // called more than once, e.g. you can call both IgnoreAppSubDir("bin") and + // IgnoreAppSubDir("debug") to take care of both production and development + // cases above but that each call will only remove the last path component. + // Finally note that the argument can contain wild cards so you can also + // call IgnoreAppSubDir("vc*msw*") to ignore all build directories at once + // when using wxWidgets-inspired output directories names. + void IgnoreAppSubDir(const wxString& subdirPattern); + + // This function is used to ignore all common build directories and is + // called from the ctor -- use DontIgnoreAppSubDir() to undo this. + void IgnoreAppBuildSubDirs(); + + // Undo the effects of all preceding IgnoreAppSubDir() calls. + void DontIgnoreAppSubDir(); + + + // Returns the directory corresponding to the specified Windows shell CSIDL + static wxString MSWGetShellDir(int csidl); + +protected: + // Ctor is protected, use wxStandardPaths::Get() instead of instantiating + // objects of this class directly. + // + // It calls IgnoreAppBuildSubDirs() and also sets up the object to use + // both vendor and application name by default. + wxStandardPaths(); + + // get the path corresponding to the given standard CSIDL_XXX constant + static wxString DoGetDirectory(int csidl); + + // return the directory of the application itself + wxString GetAppDir() const; + + // directory returned by GetAppDir() + mutable wxString m_appDir; +}; + +// ---------------------------------------------------------------------------- +// wxStandardPathsWin16: this class is for internal use only +// ---------------------------------------------------------------------------- + +// override config file locations to be compatible with the values used by +// wxFileConfig (dating from Win16 days which explains the class name) +class WXDLLIMPEXP_BASE wxStandardPathsWin16 : public wxStandardPaths +{ +public: + virtual wxString GetConfigDir() const; + virtual wxString GetUserConfigDir() const; +}; + +#endif // _WX_MSW_STDPATHS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/subwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/subwin.h new file mode 100644 index 0000000000..9e48b9e35f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/subwin.h @@ -0,0 +1,218 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/subwin.h +// Purpose: helper for implementing the controls with subwindows +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-12-11 +// Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_SUBWIN_H_ +#define _WX_MSW_SUBWIN_H_ + +#include "wx/msw/private.h" + +// ---------------------------------------------------------------------------- +// wxSubwindows contains all HWNDs making part of a single wx control +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSubwindows +{ +public: + // the number of subwindows can be specified either as parameter to ctor or + // later in Create() + wxSubwindows(size_t n = 0) { Init(); if ( n ) Create(n); } + + // allocate enough space for the given number of windows + void Create(size_t n) + { + wxASSERT_MSG( !m_hwnds, wxT("Create() called twice?") ); + + m_count = n; + m_hwnds = (HWND *)calloc(n, sizeof(HWND)); + m_ids = new wxWindowIDRef[n]; + } + + // non-virtual dtor, this class is not supposed to be used polymorphically + ~wxSubwindows() + { + for ( size_t n = 0; n < m_count; n++ ) + { + if ( m_hwnds[n] ) + ::DestroyWindow(m_hwnds[n]); + } + + free(m_hwnds); + delete [] m_ids; + } + + // get the number of subwindows + size_t GetCount() const { return m_count; } + + // access a given window + HWND& Get(size_t n) + { + wxASSERT_MSG( n < m_count, wxT("subwindow index out of range") ); + + return m_hwnds[n]; + } + + HWND operator[](size_t n) const + { + return const_cast<wxSubwindows *>(this)->Get(n); + } + + // initialize the given window: id will be stored in wxWindowIDRef ensuring + // that it is not reused while this object exists + void Set(size_t n, HWND hwnd, wxWindowID id) + { + wxASSERT_MSG( n < m_count, wxT("subwindow index out of range") ); + + m_hwnds[n] = hwnd; + m_ids[n] = id; + } + + // check if we have this window + bool HasWindow(HWND hwnd) + { + for ( size_t n = 0; n < m_count; n++ ) + { + if ( m_hwnds[n] == hwnd ) + return true; + } + + return false; + } + + + // methods which are forwarded to all subwindows + // --------------------------------------------- + + // show/hide everything + void Show(bool show) + { + int sw = show ? SW_SHOW : SW_HIDE; + for ( size_t n = 0; n < m_count; n++ ) + { + if ( m_hwnds[n] ) + ::ShowWindow(m_hwnds[n], sw); + } + } + + // enable/disable everything + void Enable(bool enable) + { + for ( size_t n = 0; n < m_count; n++ ) + { + if ( m_hwnds[n] ) + ::EnableWindow(m_hwnds[n], enable); + } + } + + // set font for all windows + void SetFont(const wxFont& font) + { + HFONT hfont = GetHfontOf(font); + wxCHECK_RET( hfont, wxT("invalid font") ); + + for ( size_t n = 0; n < m_count; n++ ) + { + if ( m_hwnds[n] ) + { + ::SendMessage(m_hwnds[n], WM_SETFONT, (WPARAM)hfont, 0); + + // otherwise the window might not be redrawn correctly + ::InvalidateRect(m_hwnds[n], NULL, FALSE /* don't erase bg */); + } + } + } + + // find the bounding box for all windows + wxRect GetBoundingBox() const + { + wxRect r; + for ( size_t n = 0; n < m_count; n++ ) + { + if ( m_hwnds[n] ) + { + RECT rc; + + ::GetWindowRect(m_hwnds[n], &rc); + + r.Union(wxRectFromRECT(rc)); + } + } + + return r; + } + +private: + void Init() + { + m_count = 0; + m_hwnds = NULL; + } + + // number of elements in m_hwnds array + size_t m_count; + + // the HWNDs we contain + HWND *m_hwnds; + + // the IDs of the windows + wxWindowIDRef *m_ids; + + + wxDECLARE_NO_COPY_CLASS(wxSubwindows); +}; + +// convenient macro to forward a few methods which are usually propagated to +// subwindows to a wxSubwindows object +// +// parameters should be: +// - cname the name of the class implementing these methods +// - base the name of its base class +// - subwins the name of the member variable of type wxSubwindows * +#define WX_FORWARD_STD_METHODS_TO_SUBWINDOWS(cname, base, subwins) \ + bool cname::ContainsHWND(WXHWND hWnd) const \ + { \ + return subwins && subwins->HasWindow((HWND)hWnd); \ + } \ + \ + bool cname::Show(bool show) \ + { \ + if ( !base::Show(show) ) \ + return false; \ + \ + if ( subwins ) \ + subwins->Show(show); \ + \ + return true; \ + } \ + \ + bool cname::Enable(bool enable) \ + { \ + if ( !base::Enable(enable) ) \ + return false; \ + \ + if ( subwins ) \ + subwins->Enable(enable); \ + \ + return true; \ + } \ + \ + bool cname::SetFont(const wxFont& font) \ + { \ + if ( !base::SetFont(font) ) \ + return false; \ + \ + if ( subwins ) \ + subwins->SetFont(font); \ + \ + return true; \ + } + + +#endif // _WX_MSW_SUBWIN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/taskbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/taskbar.h new file mode 100644 index 0000000000..c9a4a11ca5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/taskbar.h @@ -0,0 +1,70 @@ +///////////////////////////////////////////////////////////////////////// +// File: wx/msw/taskbar.h +// Purpose: Defines wxTaskBarIcon class for manipulating icons on the +// Windows task bar. +// Author: Julian Smart +// Modified by: Vaclav Slavik +// Created: 24/3/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TASKBAR_H_ +#define _WX_TASKBAR_H_ + +#include "wx/icon.h" + +// private helper class: +class WXDLLIMPEXP_FWD_ADV wxTaskBarIconWindow; + +class WXDLLIMPEXP_ADV wxTaskBarIcon : public wxTaskBarIconBase +{ +public: + wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE); + virtual ~wxTaskBarIcon(); + + // Accessors + bool IsOk() const { return true; } + bool IsIconInstalled() const { return m_iconAdded; } + + // Operations + bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString); + bool RemoveIcon(void); + bool PopupMenu(wxMenu *menu); + + // MSW-specific class methods + +#if wxUSE_TASKBARICON_BALLOONS + // show a balloon notification (the icon must have been already initialized + // using SetIcon) + // + // title and text are limited to 63 and 255 characters respectively, msec + // is the timeout, in milliseconds, before the balloon disappears (will be + // clamped down to the allowed 10-30s range by Windows if it's outside it) + // and flags can include wxICON_ERROR/INFO/WARNING to show a corresponding + // icon + // + // return true if balloon was shown, false on error (incorrect parameters + // or function unsupported by OS) + bool ShowBalloon(const wxString& title, + const wxString& text, + unsigned msec = 0, + int flags = 0); +#endif // wxUSE_TASKBARICON_BALLOONS + +protected: + friend class wxTaskBarIconWindow; + + long WindowProc(unsigned int msg, unsigned int wParam, long lParam); + void RegisterWindowMessages(); + + + wxTaskBarIconWindow *m_win; + bool m_iconAdded; + wxIcon m_icon; + wxString m_strTooltip; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon) +}; + +#endif // _WX_TASKBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/textctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/textctrl.h new file mode 100644 index 0000000000..1a81e44d71 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/textctrl.h @@ -0,0 +1,290 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/textctrl.h +// Purpose: wxTextCtrl class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTCTRL_H_ +#define _WX_TEXTCTRL_H_ + +class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase +{ +public: + // creation + // -------- + + wxTextCtrl() { Init(); } + wxTextCtrl(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr) + { + Init(); + + Create(parent, id, value, pos, size, style, validator, name); + } + virtual ~wxTextCtrl(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr); + + // overridden wxTextEntry methods + // ------------------------------ + + virtual wxString GetValue() const; + virtual wxString GetRange(long from, long to) const; + + virtual bool IsEmpty() const; + + virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text); + virtual void Clear(); + + virtual int GetLineLength(long lineNo) const; + virtual wxString GetLineText(long lineNo) const; + virtual int GetNumberOfLines() const; + + virtual void SetMaxLength(unsigned long len); + + virtual void GetSelection(long *from, long *to) const; + + virtual void Redo(); + virtual bool CanRedo() const; + + virtual void SetInsertionPointEnd(); + virtual long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + + // implement base class pure virtuals + // ---------------------------------- + + virtual bool IsModified() const; + virtual void MarkDirty(); + virtual void DiscardEdits(); + +#ifdef __WIN32__ + virtual bool EmulateKeyPress(const wxKeyEvent& event); +#endif // __WIN32__ + +#if wxUSE_RICHEDIT + // apply text attribute to the range of text (only works with richedit + // controls) + virtual bool SetStyle(long start, long end, const wxTextAttr& style); + virtual bool SetDefaultStyle(const wxTextAttr& style); + virtual bool GetStyle(long position, wxTextAttr& style); +#endif // wxUSE_RICHEDIT + + // translate between the position (which is just an index in the text ctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent column and line. + virtual long XYToPosition(long x, long y) const; + virtual bool PositionToXY(long pos, long *x, long *y) const; + + virtual void ShowPosition(long pos); + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const; + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const + { + return wxTextCtrlBase::HitTest(pt, col, row); + } + + // Caret handling (Windows only) + bool ShowNativeCaret(bool show = true); + bool HideNativeCaret() { return ShowNativeCaret(false); } + + // Implementation from now on + // -------------------------- + +#if wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT + virtual void SetDropTarget(wxDropTarget *dropTarget); +#endif // wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT + + virtual void SetWindowStyleFlag(long style); + + virtual void Command(wxCommandEvent& event); + virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual WXHBRUSH MSWControlColor(WXHDC hDC, WXHWND hWnd); + +#if wxUSE_RICHEDIT + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + + int GetRichVersion() const { return m_verRichEdit; } + bool IsRich() const { return m_verRichEdit != 0; } + + // rich edit controls are not compatible with normal ones and we must set + // the colours and font for them otherwise + virtual bool SetBackgroundColour(const wxColour& colour); + virtual bool SetForegroundColour(const wxColour& colour); + virtual bool SetFont(const wxFont& font); +#else + bool IsRich() const { return false; } +#endif // wxUSE_RICHEDIT + +#if wxUSE_INKEDIT && wxUSE_RICHEDIT + bool IsInkEdit() const { return m_isInkEdit != 0; } +#else + bool IsInkEdit() const { return false; } +#endif + + virtual void AdoptAttributesFromHWND(); + + virtual bool AcceptsFocusFromKeyboard() const; + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const; + + // callbacks + void OnDropFiles(wxDropFilesEvent& event); + void OnChar(wxKeyEvent& event); // Process 'enter' if required + + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + void OnDelete(wxCommandEvent& event); + void OnSelectAll(wxCommandEvent& event); + + void OnUpdateCut(wxUpdateUIEvent& event); + void OnUpdateCopy(wxUpdateUIEvent& event); + void OnUpdatePaste(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + void OnUpdateDelete(wxUpdateUIEvent& event); + void OnUpdateSelectAll(wxUpdateUIEvent& event); + + // Show a context menu for Rich Edit controls (the standard + // EDIT control has one already) + void OnContextMenu(wxContextMenuEvent& event); + + // be sure the caret remains invisible if the user + // called HideNativeCaret() before + void OnSetFocus(wxFocusEvent& event); + + // intercept WM_GETDLGCODE + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + + virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg); + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + +protected: + // common part of all ctors + void Init(); + + virtual bool DoLoadFile(const wxString& file, int fileType); + + // creates the control of appropriate class (plain or rich edit) with the + // styles corresponding to m_windowStyle + // + // this is used by ctor/Create() and when we need to recreate the control + // later + bool MSWCreateText(const wxString& value, + const wxPoint& pos, + const wxSize& size); + + virtual void DoSetValue(const wxString &value, int flags = 0); + + virtual wxPoint DoPositionToCoords(long pos) const; + + // return true if this control has a user-set limit on amount of text (i.e. + // the limit is due to a previous call to SetMaxLength() and not built in) + bool HasSpaceLimit(unsigned int *len) const; + + // Used by EN_MAXTEXT handler to increase the size limit (will do nothing + // if the current limit is big enough). Should never be called directly. + // + // Returns true if we increased the limit to allow entering more text, + // false if we hit the limit set by SetMaxLength() and so didn't change it. + bool AdjustSpaceLimit(); + +#if wxUSE_RICHEDIT && (!wxUSE_UNICODE || wxUSE_UNICODE_MSLU) + // replace the selection or the entire control contents with the given text + // in the specified encoding + bool StreamIn(const wxString& value, wxFontEncoding encoding, bool selOnly); + + // get the contents of the control out as text in the given encoding + wxString StreamOut(wxFontEncoding encoding, bool selOnly = false) const; +#endif // wxUSE_RICHEDIT + + // replace the contents of the selection or of the entire control with the + // given text + void DoWriteText(const wxString& text, + int flags = SetValue_SendEvent | SetValue_SelectionOnly); + + // set the selection (possibly without scrolling the caret into view) + void DoSetSelection(long from, long to, int flags); + + // get the length of the line containing the character at the given + // position + long GetLengthOfLineContainingPos(long pos) const; + + // send TEXT_UPDATED event, return true if it was handled, false otherwise + bool SendUpdateEvent(); + + virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + +#if wxUSE_RICHEDIT + // Apply the character-related parts of wxTextAttr to the given selection + // or the entire control if start == end == -1. + // + // This function is private and should only be called for rich edit + // controls and with (from, to) already in correct order, i.e. from <= to. + bool MSWSetCharFormat(const wxTextAttr& attr, long from = -1, long to = -1); + + // Same as above for paragraph-related parts of wxTextAttr. Note that this + // can only be applied to the selection as RichEdit doesn't support setting + // the paragraph styles globally. + bool MSWSetParaFormat(const wxTextAttr& attr, long from, long to); + + + // we're using RICHEDIT (and not simple EDIT) control if this field is not + // 0, it also gives the version of the RICHEDIT control being used + // (although not directly: 1 is for 1.0, 2 is for either 2.0 or 3.0 as we + // can't nor really need to distinguish between them and 4 is for 4.1) + int m_verRichEdit; +#endif // wxUSE_RICHEDIT + + // number of EN_UPDATE events sent by Windows when we change the controls + // text ourselves: we want this to be exactly 1 + int m_updatesCount; + +private: + virtual void EnableTextChangedEvents(bool enable) + { + m_updatesCount = enable ? -1 : -2; + } + + // implement wxTextEntry pure virtual: it implements all the operations for + // the simple EDIT controls + virtual WXHWND GetEditHWND() const { return m_hWnd; } + + void OnKeyDown(wxKeyEvent& event); + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl) + + wxMenu* m_privateContextMenu; + + bool m_isNativeCaretShown; + +#if wxUSE_INKEDIT && wxUSE_RICHEDIT + int m_isInkEdit; +#endif + +}; + +#endif // _WX_TEXTCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/textentry.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/textentry.h new file mode 100644 index 0000000000..80b9e23966 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/textentry.h @@ -0,0 +1,102 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/textentry.h +// Purpose: wxMSW-specific wxTextEntry implementation +// Author: Vadim Zeitlin +// Created: 2007-09-26 +// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_TEXTENTRY_H_ +#define _WX_MSW_TEXTENTRY_H_ + +class wxTextAutoCompleteData; // private class used only by wxTextEntry itself + +// ---------------------------------------------------------------------------- +// wxTextEntry: common part of wxComboBox and (single line) wxTextCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase +{ +public: + wxTextEntry(); + virtual ~wxTextEntry(); + + // implement wxTextEntryBase pure virtual methods + virtual void WriteText(const wxString& text); + virtual void Remove(long from, long to); + + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + virtual void Undo(); + virtual void Redo(); + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + virtual void SetInsertionPoint(long pos); + virtual long GetInsertionPoint() const; + virtual long GetLastPosition() const; + + virtual void SetSelection(long from, long to) + { DoSetSelection(from, to); } + virtual void GetSelection(long *from, long *to) const; + + virtual bool IsEditable() const; + virtual void SetEditable(bool editable); + + virtual void SetMaxLength(unsigned long len); + +#if wxUSE_UXTHEME + virtual bool SetHint(const wxString& hint); + virtual wxString GetHint() const; +#endif // wxUSE_UXTHEME + +protected: + virtual wxString DoGetValue() const; + + // this is really a hook for multiline text controls as the single line + // ones don't need to ever scroll to show the selection but having it here + // allows us to put Remove() in the base class + enum + { + SetSel_NoScroll = 0, // don't do anything special + SetSel_Scroll = 1 // default: scroll to make the selection visible + }; + virtual void DoSetSelection(long from, long to, int flags = SetSel_Scroll); + + // margins functions + virtual bool DoSetMargins(const wxPoint& pt); + virtual wxPoint DoGetMargins() const; + + // auto-completion uses COM under Windows so they won't work without + // wxUSE_OLE as OleInitialize() is not called then +#if wxUSE_OLE + virtual bool DoAutoCompleteStrings(const wxArrayString& choices); +#if wxUSE_DYNLIB_CLASS + virtual bool DoAutoCompleteFileNames(int flags); +#endif // wxUSE_DYNLIB_CLASS + virtual bool DoAutoCompleteCustom(wxTextCompleter *completer); +#endif // wxUSE_OLE + +private: + // implement this to return the HWND of the EDIT control + virtual WXHWND GetEditHWND() const = 0; + +#if wxUSE_OLE + // Get the auto-complete object creating it if necessary. Returns NULL if + // creating it failed. + wxTextAutoCompleteData *GetOrCreateCompleter(); + + // Various auto-completion-related stuff, only used if any of AutoComplete() + // methods are called. Use the function above to access it. + wxTextAutoCompleteData *m_autoCompleteData; + + // It needs to call our GetEditableWindow() and GetEditHWND() methods. + friend class wxTextAutoCompleteData; +#endif // wxUSE_OLE +}; + +#endif // _WX_MSW_TEXTENTRY_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/tglbtn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/tglbtn.h new file mode 100644 index 0000000000..091978b865 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/tglbtn.h @@ -0,0 +1,110 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/tglbtn.h +// Purpose: Declaration of the wxToggleButton class, which implements a +// toggle button under wxMSW. +// Author: John Norris, minor changes by Axel Schlueter +// Modified by: +// Created: 08.02.01 +// Copyright: (c) 2000 Johnny C. Norris II +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOGGLEBUTTON_H_ +#define _WX_TOGGLEBUTTON_H_ + +#include "wx/bitmap.h" + +// Checkbox item (single checkbox) +class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase +{ +public: + wxToggleButton() { Init(); } + wxToggleButton(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + virtual void SetValue(bool value); + virtual bool GetValue() const ; + + virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual void Command(wxCommandEvent& event); + + virtual State GetNormalState() const; + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const; + + void Init(); + + // current state of the button (when owner-drawn) + bool m_state; + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton) +}; + +//----------------------------------------------------------------------------- +// wxBitmapToggleButton +//----------------------------------------------------------------------------- + + +class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButton +{ +public: + // construction/destruction + wxBitmapToggleButton() {} + wxBitmapToggleButton(wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + // Create the control + bool Create(wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + // deprecated synonym for SetBitmapLabel() + wxDEPRECATED_INLINE( void SetLabel(const wxBitmap& bitmap), + SetBitmapLabel(bitmap); ) + // prevent virtual function hiding + virtual void SetLabel(const wxString& label) { wxToggleButton::SetLabel(label); } + +private: + DECLARE_DYNAMIC_CLASS(wxBitmapToggleButton) +}; + +#endif // _WX_TOGGLEBUTTON_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/timectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/timectrl.h new file mode 100644 index 0000000000..c5bc83aec6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/timectrl.h @@ -0,0 +1,62 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/timectrl.h +// Purpose: wxTimePickerCtrl for Windows. +// Author: Vadim Zeitlin +// Created: 2011-09-22 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_TIMECTRL_H_ +#define _WX_MSW_TIMECTRL_H_ + +// ---------------------------------------------------------------------------- +// wxTimePickerCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxTimePickerCtrl : public wxTimePickerCtrlBase +{ +public: + // ctors + wxTimePickerCtrl() { } + + wxTimePickerCtrl(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTP_DEFAULT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTimePickerCtrlNameStr) + { + Create(parent, id, dt, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTP_DEFAULT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTimePickerCtrlNameStr) + { + return MSWCreateDateTimePicker(parent, id, dt, + pos, size, style, + validator, name); + } + + // Override MSW-specific functions used during control creation. + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + +protected: +#if wxUSE_INTL + virtual wxLocaleInfo MSWGetFormat() const; +#endif // wxUSE_INTL + virtual bool MSWAllowsNone() const { return false; } + virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch); + + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTimePickerCtrl); +}; + +#endif // _WX_MSW_TIMECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/tls.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/tls.h new file mode 100644 index 0000000000..9d46cadf3e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/tls.h @@ -0,0 +1,116 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/tls.h +// Purpose: Win32 implementation of wxTlsValue<> +// Author: Vadim Zeitlin +// Created: 2008-08-08 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_TLS_H_ +#define _WX_MSW_TLS_H_ + +#include "wx/msw/wrapwin.h" +#include "wx/thread.h" +#include "wx/vector.h" + +// ---------------------------------------------------------------------------- +// wxTlsKey is a helper class encapsulating a TLS slot +// ---------------------------------------------------------------------------- + +class wxTlsKey +{ +public: + // ctor allocates a new key + wxTlsKey(wxTlsDestructorFunction destructor) + { + m_destructor = destructor; + m_slot = ::TlsAlloc(); + } + + // return true if the key was successfully allocated + bool IsOk() const { return m_slot != TLS_OUT_OF_INDEXES; } + + // get the key value, there is no error return + void *Get() const + { + return ::TlsGetValue(m_slot); + } + + // change the key value, return true if ok + bool Set(void *value) + { + void *old = Get(); + + if ( ::TlsSetValue(m_slot, value) == 0 ) + return false; + + if ( old ) + m_destructor(old); + + // update m_allValues list of all values - remove old, add new + wxCriticalSectionLocker lock(m_csAllValues); + if ( old ) + { + for ( wxVector<void*>::iterator i = m_allValues.begin(); + i != m_allValues.end(); + ++i ) + { + if ( *i == old ) + { + if ( value ) + *i = value; + else + m_allValues.erase(i); + return true; + } + } + wxFAIL_MSG( "previous wxTlsKey value not recorded in m_allValues" ); + } + + if ( value ) + m_allValues.push_back(value); + + return true; + } + + // free the key + ~wxTlsKey() + { + if ( !IsOk() ) + return; + + // Win32 API doesn't have the equivalent of pthread's destructor, so we + // have to keep track of all allocated values and destroy them manually; + // ideally we'd do that at thread exit time, but since we could only + // do that with wxThread and not otherwise created threads, we do it + // here. + // + // TODO: We should still call destructors for wxTlsKey used in the + // thread from wxThread's thread shutdown code, *in addition* + // to doing it in ~wxTlsKey. + // + // NB: No need to lock m_csAllValues, by the time this code is called, + // no other thread can be using this key. + for ( wxVector<void*>::iterator i = m_allValues.begin(); + i != m_allValues.end(); + ++i ) + { + m_destructor(*i); + } + + ::TlsFree(m_slot); + } + +private: + wxTlsDestructorFunction m_destructor; + DWORD m_slot; + + wxVector<void*> m_allValues; + wxCriticalSection m_csAllValues; + + wxDECLARE_NO_COPY_CLASS(wxTlsKey); +}; + +#endif // _WX_MSW_TLS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/toolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/toolbar.h new file mode 100644 index 0000000000..0c6b7e9c9a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/toolbar.h @@ -0,0 +1,181 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/toolbar.h +// Purpose: wxToolBar (Windows 95 toolbar) class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_TBAR95_H_ +#define _WX_MSW_TBAR95_H_ + +#if wxUSE_TOOLBAR + +#include "wx/dynarray.h" +#include "wx/imaglist.h" + +class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase +{ +public: + // ctors and dtor + wxToolBar() { Init(); } + + wxToolBar(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr) + { + Init(); + + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr); + + virtual ~wxToolBar(); + + // override/implement base class virtuals + virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const; + + virtual bool Realize(); + + virtual void SetToolBitmapSize(const wxSize& size); + virtual wxSize GetToolSize() const; + + virtual void SetRows(int nRows); + + virtual void SetToolNormalBitmap(int id, const wxBitmap& bitmap); + virtual void SetToolDisabledBitmap(int id, const wxBitmap& bitmap); + + // implementation only from now on + // ------------------------------- + + virtual void SetWindowStyleFlag(long style); + + virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + + void OnMouseEvent(wxMouseEvent& event); + void OnSysColourChanged(wxSysColourChangedEvent& event); + void OnEraseBackground(wxEraseEvent& event); + + void SetFocus() {} + + static WXHBITMAP MapBitmap(WXHBITMAP bitmap, int width, int height); + + // override WndProc mainly to process WM_SIZE + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +#ifdef wxHAS_MSW_BACKGROUND_ERASE_HOOK + virtual bool MSWEraseBgHook(WXHDC hDC); + virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, wxWindowMSW *child); +#endif // wxHAS_MSW_BACKGROUND_ERASE_HOOK + + virtual wxToolBarToolBase *CreateTool(int id, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled = wxNullBitmap, + wxItemKind kind = wxITEM_NORMAL, + wxObject *clientData = NULL, + const wxString& shortHelp = wxEmptyString, + const wxString& longHelp = wxEmptyString); + + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); +protected: + // common part of all ctors + void Init(); + + // create the native toolbar control + bool MSWCreateToolbar(const wxPoint& pos, const wxSize& size); + + // recreate the control completely + void Recreate(); + + // implement base class pure virtuals + virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); + virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); + + virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable); + virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle); + virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); + + // return the appropriate size and flags for the toolbar control + virtual wxSize DoGetBestSize() const; + + // handlers for various events + bool HandleSize(WXWPARAM wParam, WXLPARAM lParam); +#ifdef wxHAS_MSW_BACKGROUND_ERASE_HOOK + bool HandlePaint(WXWPARAM wParam, WXLPARAM lParam); +#endif // wxHAS_MSW_BACKGROUND_ERASE_HOOK + void HandleMouseMove(WXWPARAM wParam, WXLPARAM lParam); + + // should be called whenever the toolbar size changes + void UpdateSize(); + + // create m_disabledImgList (but doesn't fill it), set it to NULL if it is + // unneeded + void CreateDisabledImageList(); + + // get the Windows toolbar style of this control + long GetMSWToolbarStyle() const; + + + // the big bitmap containing all bitmaps of the toolbar buttons + WXHBITMAP m_hBitmap; + + // the image list with disabled images, may be NULL if we use + // system-provided versions of them + wxImageList *m_disabledImgList; + + // the total number of toolbar elements + size_t m_nButtons; + + // the sum of the sizes of the fixed items (i.e. excluding stretchable + // spaces) in the toolbar direction + int m_totalFixedSize; + + // the tool the cursor is in + wxToolBarToolBase *m_pInTool; + +private: + // makes sure tool bitmap size is sufficient for all tools + void AdjustToolBitmapSize(); + + // update the sizes of stretchable spacers to consume all extra space we + // have + void UpdateStretchableSpacersSize(); + +#ifdef wxHAS_MSW_BACKGROUND_ERASE_HOOK + // do erase the toolbar background, always do it for the entire control as + // the caller sets the clipping region correctly to exclude parts which + // should not be erased + void MSWDoEraseBackground(WXHDC hDC); + + // return the brush to use for erasing the toolbar background + WXHBRUSH MSWGetToolbarBgBrush(); +#endif // wxHAS_MSW_BACKGROUND_ERASE_HOOK + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxToolBar) + wxDECLARE_NO_COPY_CLASS(wxToolBar); +}; + +#endif // wxUSE_TOOLBAR + +#endif // _WX_MSW_TBAR95_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/tooltip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/tooltip.h new file mode 100644 index 0000000000..68ea492031 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/tooltip.h @@ -0,0 +1,111 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/tooltip.h +// Purpose: wxToolTip class - tooltip control +// Author: Vadim Zeitlin +// Modified by: +// Created: 31.01.99 +// Copyright: (c) 1999 Robert Roebling, Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_TOOLTIP_H_ +#define _WX_MSW_TOOLTIP_H_ + +#include "wx/object.h" +#include "wx/gdicmn.h" + +class WXDLLIMPEXP_FWD_CORE wxWindow; +class wxToolTipOtherWindows; + +class WXDLLIMPEXP_CORE wxToolTip : public wxObject +{ +public: + // ctor & dtor + wxToolTip(const wxString &tip); + virtual ~wxToolTip(); + + // ctor used by wxStatusBar to associate a tooltip to a portion of + // the status bar window: + wxToolTip(wxWindow* win, unsigned int id, + const wxString &tip, const wxRect& rc); + + // accessors + // tip text + void SetTip(const wxString& tip); + const wxString& GetTip() const { return m_text; } + + // the window we're associated with + void SetWindow(wxWindow *win); + wxWindow *GetWindow() const { return m_window; } + + // controlling tooltip behaviour: globally change tooltip parameters + // enable or disable the tooltips globally + static void Enable(bool flag); + // set the delay after which the tooltip appears + static void SetDelay(long milliseconds); + // set the delay after which the tooltip disappears or how long the + // tooltip remains visible + static void SetAutoPop(long milliseconds); + // set the delay between subsequent tooltips to appear + static void SetReshow(long milliseconds); + // set maximum width for the new tooltips: -1 disables wrapping + // entirely, 0 restores the default behaviour + static void SetMaxWidth(int width); + + // implementation only from now on + // ------------------------------- + + // should be called in response to WM_MOUSEMOVE + static void RelayEvent(WXMSG *msg); + + // add a window to the tooltip control + void AddOtherWindow(WXHWND hwnd); + + // remove any tooltip from the window + static void Remove(WXHWND hwnd, unsigned int id, const wxRect& rc); + + // Set the rectangle we're associated with. This rectangle is only used for + // the main window, not any sub-windows added with Add() so in general it + // makes sense to use it for tooltips associated with a single window only. + void SetRect(const wxRect& rc); + +private: + // Adds a window other than our main m_window to this tooltip. + void DoAddHWND(WXHWND hWnd); + + // Perform the specified operation for the given window only. + void DoSetTip(WXHWND hWnd); + void DoRemove(WXHWND hWnd); + + // Call the given function for all windows we're associated with. + void DoForAllWindows(void (wxToolTip::*func)(WXHWND)); + + + // the one and only one tooltip control we use - never access it directly + // but use GetToolTipCtrl() which will create it when needed + static WXHWND ms_hwndTT; + + // create the tooltip ctrl if it doesn't exist yet and return its HWND + static WXHWND GetToolTipCtrl(); + + // new tooltip maximum width, defaults to min(display width, 400) + static int ms_maxWidth; + + // remove this tooltip from the tooltip control + void Remove(); + + // adjust tooltip max width based on current tooltip text + bool AdjustMaxWidth(); + + wxString m_text; // tooltip text + wxWindow* m_window; // main window we're associated with + wxToolTipOtherWindows *m_others; // other windows associated with it or NULL + wxRect m_rect; // the rect of the window for which this tooltip is shown + // (or a rect with width/height == 0 to show it for the entire window) + unsigned int m_id; // the id of this tooltip (ignored when m_rect width/height is 0) + + DECLARE_ABSTRACT_CLASS(wxToolTip) + wxDECLARE_NO_COPY_CLASS(wxToolTip); +}; + +#endif // _WX_MSW_TOOLTIP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/toplevel.h new file mode 100644 index 0000000000..fd1de18d80 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/toplevel.h @@ -0,0 +1,262 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/toplevel.h +// Purpose: wxTopLevelWindowMSW is the MSW implementation of wxTLW +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.09.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_TOPLEVEL_H_ +#define _WX_MSW_TOPLEVEL_H_ + +// ---------------------------------------------------------------------------- +// wxTopLevelWindowMSW +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTopLevelWindowMSW : public wxTopLevelWindowBase +{ +public: + // constructors and such + wxTopLevelWindowMSW() { Init(); } + + wxTopLevelWindowMSW(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxTopLevelWindowMSW(); + + // implement base class pure virtuals + virtual void SetTitle( const wxString& title); + virtual wxString GetTitle() const; + virtual void Maximize(bool maximize = true); + virtual bool IsMaximized() const; + virtual void Iconize(bool iconize = true); + virtual bool IsIconized() const; + virtual void SetIcons(const wxIconBundle& icons ); + virtual void Restore(); + + virtual void SetLayoutDirection(wxLayoutDirection dir); + + virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); + + virtual bool Show(bool show = true); + virtual void Raise(); + + virtual void ShowWithoutActivating(); + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); + virtual bool IsFullScreen() const { return m_fsIsShowing; } + + // wxMSW only: EnableCloseButton(false) may be used to remove the "Close" + // button from the title bar + virtual bool EnableCloseButton(bool enable = true); + + // Set window transparency if the platform supports it + virtual bool SetTransparent(wxByte alpha); + virtual bool CanSetTransparent(); + + + // MSW-specific methods + // -------------------- + + // Return the menu representing the "system" menu of the window. You can + // call wxMenu::AppendWhatever() methods on it but removing items from it + // is in general not a good idea. + // + // The pointer returned by this method belongs to the window and will be + // deleted when the window itself is, do not delete it yourself. May return + // NULL if getting the system menu failed. + wxMenu *MSWGetSystemMenu() const; + + + // implementation from now on + // -------------------------- + + // event handlers + void OnActivate(wxActivateEvent& event); + + // called by wxWindow whenever it gets focus + void SetLastFocus(wxWindow *win) { m_winLastFocused = win; } + wxWindow *GetLastFocus() const { return m_winLastFocused; } + +#if defined(__SMARTPHONE__) && defined(__WXWINCE__) + virtual void SetLeftMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL); + virtual void SetRightMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL); + bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control); + virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg); +#endif // __SMARTPHONE__ && __WXWINCE__ + +#if defined(__SMARTPHONE__) || defined(__POCKETPC__) + // Soft Input Panel (SIP) change notification + virtual bool HandleSettingChange(WXWPARAM wParam, WXLPARAM lParam); +#endif + + // translate wxWidgets flags to Windows ones + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const; + + // choose the right parent to use with CreateWindow() + virtual WXHWND MSWGetParent() const; + + // window proc for the frames + WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +#if wxUSE_MENUS + bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu); + + // handle WM_EXITMENULOOP message for Win95 only + bool HandleExitMenuLoop(WXWORD isPopup); + + // handle WM_(UN)INITMENUPOPUP message to generate wxEVT_MENU_OPEN/CLOSE + bool HandleMenuPopup(wxEventType evtType, WXHMENU hMenu); + + // Command part of HandleMenuPopup() and HandleExitMenuLoop(). + bool DoSendMenuOpenCloseEvent(wxEventType evtType, wxMenu* menu, bool popup); + + // Find the menu corresponding to the given handle. + virtual wxMenu* MSWFindMenuFromHMENU(WXHMENU hMenu); +#endif // wxUSE_MENUS + +protected: + // common part of all ctors + void Init(); + + // create a new frame, return false if it couldn't be created + bool CreateFrame(const wxString& title, + const wxPoint& pos, + const wxSize& size); + + // create a new dialog using the given dialog template from resources, + // return false if it couldn't be created + bool CreateDialog(const void *dlgTemplate, + const wxString& title, + const wxPoint& pos, + const wxSize& size); + + // common part of Iconize(), Maximize() and Restore() + void DoShowWindow(int nShowCmd); + + // override those to return the normal window coordinates even when the + // window is minimized +#ifndef __WXWINCE__ + virtual void DoGetPosition(int *x, int *y) const; + virtual void DoGetSize(int *width, int *height) const; +#endif // __WXWINCE__ + + // Top level windows have different freeze semantics on Windows + virtual void DoFreeze(); + virtual void DoThaw(); + + // helper of SetIcons(): calls gets the icon with the size specified by the + // given system metrics (SM_C{X|Y}[SM]ICON) from the bundle and sets it + // using WM_SETICON with the specified wParam (ICOM_SMALL or ICON_BIG); + // returns true if the icon was set + bool DoSelectAndSetIcon(const wxIconBundle& icons, int smX, int smY, int i); + + // override wxWindow virtual method to use CW_USEDEFAULT if necessary + virtual void MSWGetCreateWindowCoords(const wxPoint& pos, + const wxSize& size, + int& x, int& y, + int& w, int& h) const; + + + // is the window currently iconized? + bool m_iconized; + + // should the frame be maximized when it will be shown? set by Maximize() + // when it is called while the frame is hidden + bool m_maximizeOnShow; + + // Data to save/restore when calling ShowFullScreen + long m_fsStyle; // Passed to ShowFullScreen + wxRect m_fsOldSize; + long m_fsOldWindowStyle; + bool m_fsIsMaximized; + bool m_fsIsShowing; + + // Save the current focus to m_winLastFocused if we're not iconized (the + // focus is always NULL when we're iconized). + void DoSaveLastFocus(); + + // Restore focus to m_winLastFocused if possible and needed. + void DoRestoreLastFocus(); + + // The last focused child: we remember it when we're deactivated and + // restore focus to it when we're activated (this is done here) or restored + // from iconic state (done by wxFrame). + wxWindow *m_winLastFocused; + +#if defined(__SMARTPHONE__) && defined(__WXWINCE__) + class ButtonMenu + { + public: + ButtonMenu(); + ~ButtonMenu(); + + void SetButton(int id = wxID_ANY, + const wxString& label = wxEmptyString, + wxMenu *subMenu = NULL); + + bool IsAssigned() const {return m_assigned;} + bool IsMenu() const {return m_menu!=NULL;} + + int GetId() const {return m_id;} + wxMenu* GetMenu() const {return m_menu;} + wxString GetLabel() {return m_label;} + + static wxMenu *DuplicateMenu(wxMenu *menu); + + protected: + int m_id; + wxString m_label; + wxMenu *m_menu; + bool m_assigned; + }; + + ButtonMenu m_LeftButton; + ButtonMenu m_RightButton; + HWND m_MenuBarHWND; + + void ReloadButton(ButtonMenu& button, UINT menuID); + void ReloadAllButtons(); +#endif // __SMARTPHONE__ && __WXWINCE__ + +private: + +#if defined(__SMARTPHONE__) || defined(__POCKETPC__) + void* m_activateInfo; +#endif + + // The system menu: initially NULL but can be set (once) by + // MSWGetSystemMenu(). Owned by this window. + wxMenu *m_menuSystem; + + // The number of currently opened menus: 0 initially, 1 when a top level + // menu is opened, 2 when its submenu is opened and so on. + int m_menuDepth; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxTopLevelWindowMSW); +}; + +#endif // _WX_MSW_TOPLEVEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/treectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/treectrl.h new file mode 100644 index 0000000000..5eeede8598 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/treectrl.h @@ -0,0 +1,354 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/treectrl.h +// Purpose: wxTreeCtrl class +// Author: Julian Smart +// Modified by: Vadim Zeitlin to be less MSW-specific on 10/10/98 +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_TREECTRL_H_ +#define _WX_MSW_TREECTRL_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#if wxUSE_TREECTRL + +#include "wx/textctrl.h" +#include "wx/dynarray.h" +#include "wx/treebase.h" +#include "wx/hashmap.h" + +#ifdef __GNUWIN32__ + // Cygwin windows.h defines these identifiers + #undef GetFirstChild + #undef GetNextSibling +#endif // Cygwin + +// fwd decl +class WXDLLIMPEXP_FWD_CORE wxImageList; +class WXDLLIMPEXP_FWD_CORE wxDragImage; +struct WXDLLIMPEXP_FWD_CORE wxTreeViewItem; + +#if WXWIN_COMPATIBILITY_2_6 + // NB: all the following flags are for compatbility only and will be removed in the + // next versions + // flags for deprecated InsertItem() variant (their values are the same as of + // TVI_FIRST and TVI_LAST) + #define wxTREE_INSERT_FIRST 0xFFFF0001 + #define wxTREE_INSERT_LAST 0xFFFF0002 +#endif + +// hash storing attributes for our items +WX_DECLARE_EXPORTED_VOIDPTR_HASH_MAP(wxTreeItemAttr *, wxMapTreeAttr); + +// ---------------------------------------------------------------------------- +// wxTreeCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTreeCtrl : public wxTreeCtrlBase +{ +public: + // creation + // -------- + wxTreeCtrl() { Init(); } + + wxTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTreeCtrlNameStr) + { + Create(parent, id, pos, size, style, validator, name); + } + + virtual ~wxTreeCtrl(); + + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTreeCtrlNameStr); + + // implement base class pure virtuals + // ---------------------------------- + + virtual unsigned int GetCount() const; + + virtual unsigned int GetIndent() const; + virtual void SetIndent(unsigned int indent); + + virtual void SetImageList(wxImageList *imageList); + virtual void SetStateImageList(wxImageList *imageList); + + virtual wxString GetItemText(const wxTreeItemId& item) const; + virtual int GetItemImage(const wxTreeItemId& item, + wxTreeItemIcon which = wxTreeItemIcon_Normal) const; + virtual wxTreeItemData *GetItemData(const wxTreeItemId& item) const; + virtual wxColour GetItemTextColour(const wxTreeItemId& item) const; + virtual wxColour GetItemBackgroundColour(const wxTreeItemId& item) const; + virtual wxFont GetItemFont(const wxTreeItemId& item) const; + + virtual void SetItemText(const wxTreeItemId& item, const wxString& text); + virtual void SetItemImage(const wxTreeItemId& item, int image, + wxTreeItemIcon which = wxTreeItemIcon_Normal); + virtual void SetItemData(const wxTreeItemId& item, wxTreeItemData *data); + virtual void SetItemHasChildren(const wxTreeItemId& item, bool has = true); + virtual void SetItemBold(const wxTreeItemId& item, bool bold = true); + virtual void SetItemDropHighlight(const wxTreeItemId& item, + bool highlight = true); + virtual void SetItemTextColour(const wxTreeItemId& item, + const wxColour& col); + virtual void SetItemBackgroundColour(const wxTreeItemId& item, + const wxColour& col); + virtual void SetItemFont(const wxTreeItemId& item, const wxFont& font); + + // item status inquiries + // --------------------- + + virtual bool IsVisible(const wxTreeItemId& item) const; + virtual bool ItemHasChildren(const wxTreeItemId& item) const; + virtual bool IsExpanded(const wxTreeItemId& item) const; + virtual bool IsSelected(const wxTreeItemId& item) const; + virtual bool IsBold(const wxTreeItemId& item) const; + + virtual size_t GetChildrenCount(const wxTreeItemId& item, + bool recursively = true) const; + + // navigation + // ---------- + + virtual wxTreeItemId GetRootItem() const; + virtual wxTreeItemId GetSelection() const; + virtual size_t GetSelections(wxArrayTreeItemIds& selections) const; + virtual wxTreeItemId GetFocusedItem() const; + + virtual void ClearFocusedItem(); + virtual void SetFocusedItem(const wxTreeItemId& item); + + + virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const; + virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const; + virtual wxTreeItemId GetNextChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const; + virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const; + + virtual wxTreeItemId GetNextSibling(const wxTreeItemId& item) const; + virtual wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const; + + virtual wxTreeItemId GetFirstVisibleItem() const; + virtual wxTreeItemId GetNextVisible(const wxTreeItemId& item) const; + virtual wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const; + + // operations + // ---------- + + virtual wxTreeItemId AddRoot(const wxString& text, + int image = -1, int selectedImage = -1, + wxTreeItemData *data = NULL); + + virtual void Delete(const wxTreeItemId& item); + virtual void DeleteChildren(const wxTreeItemId& item); + virtual void DeleteAllItems(); + + virtual void Expand(const wxTreeItemId& item); + virtual void Collapse(const wxTreeItemId& item); + virtual void CollapseAndReset(const wxTreeItemId& item); + virtual void Toggle(const wxTreeItemId& item); + + virtual void Unselect(); + virtual void UnselectAll(); + virtual void SelectItem(const wxTreeItemId& item, bool select = true); + virtual void SelectChildren(const wxTreeItemId& parent); + + virtual void EnsureVisible(const wxTreeItemId& item); + virtual void ScrollTo(const wxTreeItemId& item); + + virtual wxTextCtrl *EditLabel(const wxTreeItemId& item, + wxClassInfo* textCtrlClass = wxCLASSINFO(wxTextCtrl)); + virtual wxTextCtrl *GetEditControl() const; + virtual void EndEditLabel(const wxTreeItemId& WXUNUSED(item), + bool discardChanges = false) + { + DoEndEditLabel(discardChanges); + } + + virtual void SortChildren(const wxTreeItemId& item); + + virtual bool GetBoundingRect(const wxTreeItemId& item, + wxRect& rect, + bool textOnly = false) const; + + // implementation + // -------------- + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + virtual WXLRESULT MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + virtual bool MSWShouldPreProcessMessage(WXMSG* msg); + + // override some base class virtuals + virtual bool SetBackgroundColour(const wxColour &colour); + virtual bool SetForegroundColour(const wxColour &colour); + + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + +protected: + // Implement "update locking" in a custom way for this control. + virtual void DoFreeze(); + virtual void DoThaw(); + + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + // SetImageList helper + void SetAnyImageList(wxImageList *imageList, int which); + + // refresh a single item + void RefreshItem(const wxTreeItemId& item); + + // end edit label + void DoEndEditLabel(bool discardChanges = false); + + virtual int DoGetItemState(const wxTreeItemId& item) const; + virtual void DoSetItemState(const wxTreeItemId& item, int state); + + virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent, + size_t pos, + const wxString& text, + int image, int selectedImage, + wxTreeItemData *data); + virtual wxTreeItemId DoInsertAfter(const wxTreeItemId& parent, + const wxTreeItemId& idPrevious, + const wxString& text, + int image = -1, int selImage = -1, + wxTreeItemData *data = NULL); + virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags) const; + + // obtain the user data for the lParam member of TV_ITEM + class wxTreeItemParam *GetItemParam(const wxTreeItemId& item) const; + + // update the event to include the items client data and pass it to + // HandleWindowEvent(), return true if it processed it + bool HandleTreeEvent(wxTreeEvent& event) const; + + // pass the event to HandleTreeEvent() and return true if the event was + // either unprocessed or not vetoed + bool IsTreeEventAllowed(wxTreeEvent& event) const + { + return !HandleTreeEvent(event) || event.IsAllowed(); + } + + // generate a wxEVT_KEY_DOWN event from the specified WPARAM/LPARAM values + // having the same meaning as for WM_KEYDOWN, return true if it was + // processed + bool MSWHandleTreeKeyDownEvent(WXWPARAM wParam, WXLPARAM lParam); + + // handle a key event in a multi-selection control, should be only called + // for keys which can be used to change the selection + // + // return true if the key was processed, false otherwise + bool MSWHandleSelectionKey(unsigned vkey); + + + // data used only while editing the item label: + wxTextCtrl *m_textCtrl; // text control in which it is edited + wxTreeItemId m_idEdited; // the item being edited + +private: + // the common part of all ctors + void Init(); + + // helper functions + bool DoGetItem(wxTreeViewItem *tvItem) const; + void DoSetItem(wxTreeViewItem *tvItem); + + void DoExpand(const wxTreeItemId& item, int flag); + + void DoSelectItem(const wxTreeItemId& item, bool select = true); + void DoUnselectItem(const wxTreeItemId& item); + void DoToggleItemSelection(const wxTreeItemId& item); + + void DoUnselectAll(); + void DoSelectChildren(const wxTreeItemId& parent); + + void DeleteTextCtrl(); + + // return true if the item is the hidden root one (i.e. it's the root item + // and the tree has wxTR_HIDE_ROOT style) + bool IsHiddenRoot(const wxTreeItemId& item) const; + + + // check if the given flags (taken from TV_HITTESTINFO structure) + // indicate a position "on item": this is less trivial than just checking + // for TVHT_ONITEM because we consider that points to the left and right of + // item text are also "on item" when wxTR_FULL_ROW_HIGHLIGHT is used as the + // item visually spans the entire breadth of the window then + bool MSWIsOnItem(unsigned flags) const; + + + // the hash storing the items attributes (indexed by item ids) + wxMapTreeAttr m_attrs; + + // true if the hash above is not empty + bool m_hasAnyAttr; + +#if wxUSE_DRAGIMAGE + // used for dragging + wxDragImage *m_dragImage; +#endif + + // Virtual root item, if wxTR_HIDE_ROOT is set. + void* m_pVirtualRoot; + + // the starting item for selection with Shift + wxTreeItemId m_htSelStart, m_htClickedItem; + wxPoint m_ptClick; + + // whether dragging has started + bool m_dragStarted; + + // whether focus was lost between subsequent clicks of a single item + bool m_focusLost; + + // set when we are changing selection ourselves (only used in multi + // selection mode) + bool m_changingSelection; + + // whether we need to trigger a state image click event + bool m_triggerStateImageClick; + + // whether we need to deselect other items on mouse up + bool m_mouseUpDeselect; + + // The size to restore the control to when it is thawed, see DoThaw(). + wxSize m_thawnSize; + + friend class wxTreeItemIndirectData; + friend class wxTreeSortHelper; + + DECLARE_DYNAMIC_CLASS(wxTreeCtrl) + wxDECLARE_NO_COPY_CLASS(wxTreeCtrl); +}; + +#endif // wxUSE_TREECTRL + +#endif // _WX_MSW_TREECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/uxtheme.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/uxtheme.h new file mode 100644 index 0000000000..5c4eae981d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/uxtheme.h @@ -0,0 +1,297 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/uxtheme.h +// Purpose: wxUxThemeEngine class: support for XP themes +// Author: John Platts, Vadim Zeitlin +// Modified by: +// Created: 2003 +// Copyright: (c) 2003 John Platts, Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UXTHEME_H_ +#define _WX_UXTHEME_H_ + +#include "wx/defs.h" + +#include "wx/msw/private.h" // we use GetHwndOf() +#include "wx/msw/uxthemep.h" + +// Amazingly, GetThemeFont() and GetThemeSysFont() functions use LOGFONTA under +// XP but LOGFONTW (even in non-Unicode build) under later versions of Windows. +// If we declare them as taking LOGFONT below, the code would be able to +// silently pass LOGFONTA to them in ANSI build and would crash at run-time +// under Windows Vista/7 because of a buffer overrun (LOGFONTA being smaller +// than LOGFONTW expected by these functions). If we we declare them as taking +// LOGFONTW, the code wouldn't work correctly under XP. So we use a special +// wxUxThemeFont class to encapsulate this and intentionally change the LOGFONT +// output parameters of the theme functions to take it instead. + +class wxUxThemeFont +{ +public: + // Trivial default ctor. + wxUxThemeFont() { } + + // Just some unique type. + struct Ptr { }; + +#if wxUSE_UNICODE + // In Unicode build we always use LOGFONT anyhow so this class is + // completely trivial. + Ptr *GetPtr() { return reinterpret_cast<Ptr *>(&m_lfW); } + const LOGFONTW& GetLOGFONT() { return m_lfW; } +#else // !wxUSE_UNICODE + // Return either LOGFONTA or LOGFONTW pointer as required by the current + // Windows version. + Ptr *GetPtr() + { + return UseLOGFONTW() ? reinterpret_cast<Ptr *>(&m_lfW) + : reinterpret_cast<Ptr *>(&m_lfA); + } + + // This method returns LOGFONT (i.e. LOGFONTA in ANSI build and LOGFONTW in + // Unicode one) which can be used with other, normal, Windows or wx + // functions. Internally it may need to transform LOGFONTW to LOGFONTA. + const LOGFONTA& GetLOGFONT() + { + if ( UseLOGFONTW() ) + { + // Most of the fields are the same in LOGFONTA and LOGFONTW so just + // copy everything by default. + memcpy(&m_lfA, &m_lfW, sizeof(m_lfA)); + + // But the face name must be converted from Unicode. + WideCharToMultiByte(CP_ACP, 0, m_lfW.lfFaceName, -1, + m_lfA.lfFaceName, sizeof(m_lfA.lfFaceName), + NULL, NULL); + } + + return m_lfA; + } + +private: + static bool UseLOGFONTW() + { + return wxGetWinVersion() >= wxWinVersion_Vista; + } + + LOGFONTA m_lfA; +#endif // wxUSE_UNICODE/!wxUSE_UNICODE + +private: + LOGFONTW m_lfW; + + wxDECLARE_NO_COPY_CLASS(wxUxThemeFont); +}; + +typedef HTHEME (__stdcall *PFNWXUOPENTHEMEDATA)(HWND, const wchar_t *); +typedef HRESULT (__stdcall *PFNWXUCLOSETHEMEDATA)(HTHEME); +typedef HRESULT (__stdcall *PFNWXUDRAWTHEMEBACKGROUND)(HTHEME, HDC, int, int, const RECT *, const RECT *); +typedef HRESULT (__stdcall *PFNWXUDRAWTHEMETEXT)(HTHEME, HDC, int, int, const wchar_t *, int, DWORD, DWORD, const RECT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDCONTENTRECT)(HTHEME, HDC, int, int, const RECT *, RECT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDEXTENT)(HTHEME, HDC, int, int, const RECT *, RECT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEPARTSIZE)(HTHEME, HDC, int, int, const RECT *, /* enum */ THEMESIZE, SIZE *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMETEXTEXTENT)(HTHEME, HDC, int, int, const wchar_t *, int, DWORD, const RECT *, RECT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMETEXTMETRICS)(HTHEME, HDC, int, int, TEXTMETRIC*); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDREGION)(HTHEME, HDC, int, int, const RECT *, HRGN *); +typedef HRESULT (__stdcall *PFNWXUHITTESTTHEMEBACKGROUND)(HTHEME, HDC, int, int, DWORD, const RECT *, HRGN, POINT, unsigned short *); +typedef HRESULT (__stdcall *PFNWXUDRAWTHEMEEDGE)(HTHEME, HDC, int, int, const RECT *, unsigned int, unsigned int, RECT *); +typedef HRESULT (__stdcall *PFNWXUDRAWTHEMEICON)(HTHEME, HDC, int, int, const RECT *, HIMAGELIST, int); +typedef BOOL (__stdcall *PFNWXUISTHEMEPARTDEFINED)(HTHEME, int, int); +typedef BOOL (__stdcall *PFNWXUISTHEMEBACKGROUNDPARTIALLYTRANSPARENT)(HTHEME, int, int); +typedef HRESULT (__stdcall *PFNWXUGETTHEMECOLOR)(HTHEME, int, int, int, COLORREF*); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEMETRIC)(HTHEME, HDC, int, int, int, int *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMESTRING)(HTHEME, int, int, int, wchar_t *, int); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEBOOL)(HTHEME, int, int, int, BOOL *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEINT)(HTHEME, int, int, int, int *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEENUMVALUE)(HTHEME, int, int, int, int *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEPOSITION)(HTHEME, int, int, int, POINT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEFONT)(HTHEME, HDC, int, int, int, wxUxThemeFont::Ptr *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMERECT)(HTHEME, int, int, int, RECT *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEMARGINS)(HTHEME, HDC, int, int, int, RECT *, MARGINS *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEINTLIST)(HTHEME, int, int, int, INTLIST*); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEPROPERTYORIGIN)(HTHEME, int, int, int, /* enum */ PROPERTYORIGIN *); +typedef HRESULT (__stdcall *PFNWXUSETWINDOWTHEME)(HWND, const wchar_t*, const wchar_t *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEFILENAME)(HTHEME, int, int, int, wchar_t *, int); +typedef COLORREF(__stdcall *PFNWXUGETTHEMESYSCOLOR)(HTHEME, int); +typedef HBRUSH (__stdcall *PFNWXUGETTHEMESYSCOLORBRUSH)(HTHEME, int); +typedef BOOL (__stdcall *PFNWXUGETTHEMESYSBOOL)(HTHEME, int); +typedef int (__stdcall *PFNWXUGETTHEMESYSSIZE)(HTHEME, int); +typedef HRESULT (__stdcall *PFNWXUGETTHEMESYSFONT)(HTHEME, int, wxUxThemeFont::Ptr *); +typedef HRESULT (__stdcall *PFNWXUGETTHEMESYSSTRING)(HTHEME, int, wchar_t *, int); +typedef HRESULT (__stdcall *PFNWXUGETTHEMESYSINT)(HTHEME, int, int *); +typedef BOOL (__stdcall *PFNWXUISTHEMEACTIVE)(); +typedef BOOL (__stdcall *PFNWXUISAPPTHEMED)(); +typedef HTHEME (__stdcall *PFNWXUGETWINDOWTHEME)(HWND); +typedef HRESULT (__stdcall *PFNWXUENABLETHEMEDIALOGTEXTURE)(HWND, DWORD); +typedef BOOL (__stdcall *PFNWXUISTHEMEDIALOGTEXTUREENABLED)(HWND); +typedef DWORD (__stdcall *PFNWXUGETTHEMEAPPPROPERTIES)(); +typedef void (__stdcall *PFNWXUSETTHEMEAPPPROPERTIES)(DWORD); +typedef HRESULT (__stdcall *PFNWXUGETCURRENTTHEMENAME)(wchar_t *, int, wchar_t *, int, wchar_t *, int); +typedef HRESULT (__stdcall *PFNWXUGETTHEMEDOCUMENTATIONPROPERTY)(const wchar_t *, const wchar_t *, wchar_t *, int); +typedef HRESULT (__stdcall *PFNWXUDRAWTHEMEPARENTBACKGROUND)(HWND, HDC, RECT *); +typedef HRESULT (__stdcall *PFNWXUENABLETHEMING)(BOOL); + +// ---------------------------------------------------------------------------- +// wxUxThemeEngine: provides all theme functions from uxtheme.dll +// ---------------------------------------------------------------------------- + +// we always define this class, even if wxUSE_UXTHEME == 0, but we just make it +// empty in this case -- this allows to use it elsewhere without any #ifdefs +#if wxUSE_UXTHEME + #include "wx/dynlib.h" + + #define wxUX_THEME_DECLARE(type, func) type func; +#else + #define wxUX_THEME_DECLARE(type, func) type func(...) { return 0; } +#endif + +class WXDLLIMPEXP_CORE wxUxThemeEngine +{ +public: + // get the theme engine or NULL if themes are not available + static wxUxThemeEngine *Get(); + + // get the theme enging or NULL if themes are not available or not used for + // this application + static wxUxThemeEngine *GetIfActive(); + + // all uxtheme.dll functions + wxUX_THEME_DECLARE(PFNWXUOPENTHEMEDATA, OpenThemeData) + wxUX_THEME_DECLARE(PFNWXUCLOSETHEMEDATA, CloseThemeData) + wxUX_THEME_DECLARE(PFNWXUDRAWTHEMEBACKGROUND, DrawThemeBackground) + wxUX_THEME_DECLARE(PFNWXUDRAWTHEMETEXT, DrawThemeText) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEBACKGROUNDCONTENTRECT, GetThemeBackgroundContentRect) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEBACKGROUNDEXTENT, GetThemeBackgroundExtent) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEPARTSIZE, GetThemePartSize) + wxUX_THEME_DECLARE(PFNWXUGETTHEMETEXTEXTENT, GetThemeTextExtent) + wxUX_THEME_DECLARE(PFNWXUGETTHEMETEXTMETRICS, GetThemeTextMetrics) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEBACKGROUNDREGION, GetThemeBackgroundRegion) + wxUX_THEME_DECLARE(PFNWXUHITTESTTHEMEBACKGROUND, HitTestThemeBackground) + wxUX_THEME_DECLARE(PFNWXUDRAWTHEMEEDGE, DrawThemeEdge) + wxUX_THEME_DECLARE(PFNWXUDRAWTHEMEICON, DrawThemeIcon) + wxUX_THEME_DECLARE(PFNWXUISTHEMEPARTDEFINED, IsThemePartDefined) + wxUX_THEME_DECLARE(PFNWXUISTHEMEBACKGROUNDPARTIALLYTRANSPARENT, IsThemeBackgroundPartiallyTransparent) + wxUX_THEME_DECLARE(PFNWXUGETTHEMECOLOR, GetThemeColor) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEMETRIC, GetThemeMetric) + wxUX_THEME_DECLARE(PFNWXUGETTHEMESTRING, GetThemeString) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEBOOL, GetThemeBool) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEINT, GetThemeInt) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEENUMVALUE, GetThemeEnumValue) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEPOSITION, GetThemePosition) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEFONT, GetThemeFont) + wxUX_THEME_DECLARE(PFNWXUGETTHEMERECT, GetThemeRect) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEMARGINS, GetThemeMargins) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEINTLIST, GetThemeIntList) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEPROPERTYORIGIN, GetThemePropertyOrigin) + wxUX_THEME_DECLARE(PFNWXUSETWINDOWTHEME, SetWindowTheme) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEFILENAME, GetThemeFilename) + wxUX_THEME_DECLARE(PFNWXUGETTHEMESYSCOLOR, GetThemeSysColor) + wxUX_THEME_DECLARE(PFNWXUGETTHEMESYSCOLORBRUSH, GetThemeSysColorBrush) + wxUX_THEME_DECLARE(PFNWXUGETTHEMESYSBOOL, GetThemeSysBool) + wxUX_THEME_DECLARE(PFNWXUGETTHEMESYSSIZE, GetThemeSysSize) + wxUX_THEME_DECLARE(PFNWXUGETTHEMESYSFONT, GetThemeSysFont) + wxUX_THEME_DECLARE(PFNWXUGETTHEMESYSSTRING, GetThemeSysString) + wxUX_THEME_DECLARE(PFNWXUGETTHEMESYSINT, GetThemeSysInt) + wxUX_THEME_DECLARE(PFNWXUISTHEMEACTIVE, IsThemeActive) + wxUX_THEME_DECLARE(PFNWXUISAPPTHEMED, IsAppThemed) + wxUX_THEME_DECLARE(PFNWXUGETWINDOWTHEME, GetWindowTheme) + wxUX_THEME_DECLARE(PFNWXUENABLETHEMEDIALOGTEXTURE, EnableThemeDialogTexture) + wxUX_THEME_DECLARE(PFNWXUISTHEMEDIALOGTEXTUREENABLED, IsThemeDialogTextureEnabled) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEAPPPROPERTIES, GetThemeAppProperties) + wxUX_THEME_DECLARE(PFNWXUSETTHEMEAPPPROPERTIES, SetThemeAppProperties) + wxUX_THEME_DECLARE(PFNWXUGETCURRENTTHEMENAME, GetCurrentThemeName) + wxUX_THEME_DECLARE(PFNWXUGETTHEMEDOCUMENTATIONPROPERTY, GetThemeDocumentationProperty) + wxUX_THEME_DECLARE(PFNWXUDRAWTHEMEPARENTBACKGROUND, DrawThemeParentBackground) + wxUX_THEME_DECLARE(PFNWXUENABLETHEMING, EnableTheming) + +private: + // construcor is private as only Get() can create us and is also trivial as + // everything really happens in Initialize() + wxUxThemeEngine() { } + + // destructor is private as only Get() and wxUxThemeModule delete us, it is + // not virtual as we're not supposed to be derived from + ~wxUxThemeEngine() { } + +#if wxUSE_UXTHEME + // initialize the theme engine: load the DLL, resolve the functions + // + // return true if we can be used, false if themes are not available + bool Initialize(); + + + // uxtheme.dll + wxDynamicLibrary m_dllUxTheme; + + + // the one and only theme engine, initially NULL + static wxUxThemeEngine *ms_themeEngine; + + // this is a bool which initially has the value -1 meaning "unknown" + static int ms_isThemeEngineAvailable; + + // it must be able to delete us + friend class wxUxThemeModule; +#endif // wxUSE_UXTHEME + + wxDECLARE_NO_COPY_CLASS(wxUxThemeEngine); +}; + +#if wxUSE_UXTHEME + +/* static */ inline wxUxThemeEngine *wxUxThemeEngine::GetIfActive() +{ + wxUxThemeEngine *engine = Get(); + return engine && engine->IsAppThemed() && engine->IsThemeActive() + ? engine + : NULL; +} + +#else // !wxUSE_UXTHEME + +/* static */ inline wxUxThemeEngine *wxUxThemeEngine::Get() +{ + return NULL; +} + +/* static */ inline wxUxThemeEngine *wxUxThemeEngine::GetIfActive() +{ + return NULL; +} + +#endif // wxUSE_UXTHEME/!wxUSE_UXTHEME + +// ---------------------------------------------------------------------------- +// wxUxThemeHandle: encapsulates ::Open/CloseThemeData() +// ---------------------------------------------------------------------------- + +class wxUxThemeHandle +{ +public: + wxUxThemeHandle(const wxWindow *win, const wchar_t *classes) + { + wxUxThemeEngine *engine = wxUxThemeEngine::Get(); + + m_hTheme = engine ? (HTHEME)engine->OpenThemeData(GetHwndOf(win), classes) + : NULL; + } + + operator HTHEME() const { return m_hTheme; } + + ~wxUxThemeHandle() + { + if ( m_hTheme ) + { + wxUxThemeEngine::Get()->CloseThemeData(m_hTheme); + } + } + +private: + HTHEME m_hTheme; + + wxDECLARE_NO_COPY_CLASS(wxUxThemeHandle); +}; + +#endif // _WX_UXTHEME_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/uxthemep.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/uxthemep.h new file mode 100644 index 0000000000..3d5123b9cf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/uxthemep.h @@ -0,0 +1,169 @@ +/* + * Win32 5.1 theme definitions + * + * Copyright (C) 2003 Kevin Koltzau + * + * Originally written for the Wine project, and issued under + * the wxWindows licence by kind permission of the author. + * + * Licence: wxWindows licence + */ + +#ifndef __WINE_UXTHEME_H +#define __WINE_UXTHEME_H + +#include "wx/msw/wrapcctl.h" + +typedef HANDLE HTHEME; + +HRESULT WINAPI CloseThemeData(HTHEME hTheme); +HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*); + +#define DTBG_CLIPRECT 0x00000001 +#define DTBG_DRAWSOLID 0x00000002 +#define DTBG_OMITBORDER 0x00000004 +#define DTBG_OMITCONTENT 0x00000008 +#define DTBG_COMPUTINGREGION 0x00000010 +#define DTBG_MIRRORDC 0x00000020 + +typedef struct _DTBGOPTS { + DWORD dwSize; + DWORD dwFlags; + RECT rcClip; +} DTBGOPTS, *PDTBGOPTS; + +HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*, + const DTBGOPTS*); +HRESULT WINAPI DrawThemeEdge(HTHEME,HDC,int,int,const RECT*,UINT,UINT, + RECT*); +HRESULT WINAPI DrawThemeIcon(HTHEME,HDC,int,int,const RECT*,HIMAGELIST,int); +HRESULT WINAPI DrawThemeParentBackground(HWND,HDC,RECT*); + +#define DTT_GRAYED 0x1 + +HRESULT WINAPI DrawThemeText(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,DWORD, + const RECT*); + +#define ETDT_DISABLE 0x00000001 +#define ETDT_ENABLE 0x00000002 +#define ETDT_USETABTEXTURE 0x00000004 +#define ETDT_ENABLETAB (ETDT_ENABLE|ETDT_USETABTEXTURE) + +HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD); +HRESULT WINAPI EnableTheming(BOOL); +HRESULT WINAPI GetCurrentThemeName(LPWSTR,int,LPWSTR,int,LPWSTR,int); + +#define STAP_ALLOW_NONCLIENT (1<<0) +#define STAP_ALLOW_CONTROLS (1<<1) +#define STAP_ALLOW_WEBCONTENT (1<<2) + +DWORD WINAPI GetThemeAppProperties(void); +HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int, + const RECT*,RECT*); +HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*); +HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*); +HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*); +HRESULT WINAPI GetThemeColor(HTHEME,int,int,int,COLORREF*); + +#if defined(__GNUC__) +# define SZ_THDOCPROP_DISPLAYNAME (const WCHAR []){ 'D','i','s','p','l','a','y','N','a','m','e',0 } +# define SZ_THDOCPROP_CANONICALNAME (const WCHAR []){ 'T','h','e','m','e','N','a','m','e',0 } +# define SZ_THDOCPROP_TOOLTIP (const WCHAR []){ 'T','o','o','l','T','i','p',0 } +# define SZ_THDOCPROP_AUTHOR (const WCHAR []){ 'a','u','t','h','o','r',0 } +#else /* lif defined(_MSC_VER) */ +# define SZ_THDOCPROP_DISPLAYNAME L"DisplayName" +# define SZ_THDOCPROP_CANONICALNAME L"ThemeName" +# define SZ_THDOCPROP_TOOLTIP L"ToolTip" +# define SZ_THDOCPROP_AUTHOR L"author" +/* +#else +static const WCHAR SZ_THDOCPROP_DISPLAYNAME[] = { 'D','i','s','p','l','a','y','N','a','m','e',0 }; +static const WCHAR SZ_THDOCPROP_CANONICALNAME[] = { 'T','h','e','m','e','N','a','m','e',0 }; +static const WCHAR SZ_THDOCPROP_TOOLTIP[] = { 'T','o','o','l','T','i','p',0 }; +static const WCHAR SZ_THDOCPROP_AUTHOR[] = { 'a','u','t','h','o','r',0 }; +*/ +#endif + +HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int); +HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*); +HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int); +HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONTW*); +HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*); + +#define MAX_INTLIST_COUNT 10 +typedef struct _INTLIST { + int iValueCount; + int iValues[MAX_INTLIST_COUNT]; +} INTLIST, *PINTLIST; + +HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*); + +typedef struct _MARGINS { + int cxLeftWidth; + int cxRightWidth; + int cyTopHeight; + int cyBottomHeight; +} MARGINS, *PMARGINS; + +HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*); +HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*); + +typedef enum { + TS_MIN, + TS_TRUE, + TS_DRAW +} THEMESIZE; + +HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*); +HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*); + +typedef enum { + PO_STATE, + PO_PART, + PO_CLASS, + PO_GLOBAL, + PO_NOTFOUND +} PROPERTYORIGIN; + +HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*); +HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*); +HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int); +BOOL WINAPI GetThemeSysBool(HTHEME,int); +COLORREF WINAPI GetThemeSysColor(HTHEME,int); +HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int); +HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONTW*); +HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*); +int WINAPI GetThemeSysSize(HTHEME,int); +HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int); +HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD, + const RECT*,RECT*); +HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRICW*); +HTHEME WINAPI GetWindowTheme(HWND); + +#define HTTB_BACKGROUNDSEG 0x0000 +#define HTTB_FIXEDBORDER 0x0002 +#define HTTB_CAPTION 0x0004 +#define HTTB_RESIZINGBORDER_LEFT 0x0010 +#define HTTB_RESIZINGBORDER_TOP 0x0020 +#define HTTB_RESIZINGBORDER_RIGHT 0x0040 +#define HTTB_RESIZINGBORDER_BOTTOM 0x0080 +#define HTTB_RESIZINGBORDER \ + (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|\ + HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM) +#define HTTB_SIZINGTEMPLATE 0x0100 +#define HTTB_SYSTEMSIZINGMARGINS 0x0200 + +HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*, + HRGN,POINT,WORD*); +BOOL WINAPI IsAppThemed(void); +BOOL WINAPI IsThemeActive(void); +BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int); +BOOL WINAPI IsThemeDialogTextureEnabled(void); +BOOL WINAPI IsThemePartDefined(HTHEME,int,int); +HTHEME WINAPI OpenThemeData(HWND,LPCWSTR); +void WINAPI SetThemeAppProperties(DWORD); +HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR); + + +#endif + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/webview_ie.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/webview_ie.h new file mode 100644 index 0000000000..bc19ee85ae --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/webview_ie.h @@ -0,0 +1,356 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/msw/webview_ie.h +// Purpose: wxMSW IE wxWebView backend +// Author: Marianne Gagnon +// Copyright: (c) 2010 Marianne Gagnon, 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef wxWebViewIE_H +#define wxWebViewIE_H + +#include "wx/setup.h" + +#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE && defined(__WXMSW__) + +#include "wx/control.h" +#include "wx/webview.h" +#include "wx/msw/ole/automtn.h" +#include "wx/msw/ole/activex.h" +#include "wx/msw/ole/oleutils.h" +#include "wx/msw/private/comptr.h" +#include "wx/msw/wrapwin.h" +#include "wx/msw/missing.h" +#include "wx/msw/webview_missing.h" +#include "wx/sharedptr.h" +#include "wx/vector.h" + +struct IHTMLDocument2; +struct IHTMLElement; +struct IMarkupPointer; +class wxFSFile; +class ClassFactory; +class wxIEContainer; +class DocHostUIHandler; +class wxFindPointers; +class wxIInternetProtocol; + +class WXDLLIMPEXP_WEBVIEW wxWebViewIE : public wxWebView +{ +public: + + wxWebViewIE() {} + + wxWebViewIE(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { + Create(parent, id, url, pos, size, style, name); + } + + ~wxWebViewIE(); + + bool Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr); + + virtual void LoadURL(const wxString& url); + virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item); + virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory(); + virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory(); + + virtual bool CanGoForward() const; + virtual bool CanGoBack() const; + virtual void GoBack(); + virtual void GoForward(); + virtual void ClearHistory(); + virtual void EnableHistory(bool enable = true); + virtual void Stop(); + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); + + virtual wxString GetPageSource() const; + virtual wxString GetPageText() const; + + virtual bool IsBusy() const; + virtual wxString GetCurrentURL() const; + virtual wxString GetCurrentTitle() const; + + virtual void SetZoomType(wxWebViewZoomType); + virtual wxWebViewZoomType GetZoomType() const; + virtual bool CanSetZoomType(wxWebViewZoomType) const; + + virtual void Print(); + + virtual wxWebViewZoom GetZoom() const; + virtual void SetZoom(wxWebViewZoom zoom); + + //Clipboard functions + virtual bool CanCut() const; + virtual bool CanCopy() const; + virtual bool CanPaste() const; + virtual void Cut(); + virtual void Copy(); + virtual void Paste(); + + //Undo / redo functionality + virtual bool CanUndo() const; + virtual bool CanRedo() const; + virtual void Undo(); + virtual void Redo(); + + //Find function + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT); + + //Editing functions + virtual void SetEditable(bool enable = true); + virtual bool IsEditable() const; + + //Selection + virtual void SelectAll(); + virtual bool HasSelection() const; + virtual void DeleteSelection(); + virtual wxString GetSelectedText() const; + virtual wxString GetSelectedSource() const; + virtual void ClearSelection(); + + virtual void RunScript(const wxString& javascript); + + //Virtual Filesystem Support + virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler); + + virtual void* GetNativeBackend() const { return m_webBrowser; } + + // ---- IE-specific methods + + // FIXME: I seem to be able to access remote webpages even in offline mode... + bool IsOfflineMode(); + void SetOfflineMode(bool offline); + + wxWebViewZoom GetIETextZoom() const; + void SetIETextZoom(wxWebViewZoom level); + + wxWebViewZoom GetIEOpticalZoom() const; + void SetIEOpticalZoom(wxWebViewZoom level); + + void onActiveXEvent(wxActiveXEvent& evt); + void onEraseBg(wxEraseEvent&) {} + + DECLARE_EVENT_TABLE(); + +protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + +private: + wxIEContainer* m_container; + wxAutomationObject m_ie; + IWebBrowser2* m_webBrowser; + DWORD m_dwCookie; + wxCOMPtr<DocHostUIHandler> m_uiHandler; + + //We store the current zoom type; + wxWebViewZoomType m_zoomType; + + /** The "Busy" property of IWebBrowser2 does not always return busy when + * we'd want it to; this variable may be set to true in cases where the + * Busy property is false but should be true. + */ + bool m_isBusy; + //We manage our own history, the history list contains the history items + //which are added as documentcomplete events arrive, unless we are loading + //an item from the history. The position is stored as an int, and reflects + //where we are in the history list. + wxVector<wxSharedPtr<wxWebViewHistoryItem> > m_historyList; + wxVector<ClassFactory*> m_factories; + int m_historyPosition; + bool m_historyLoadingFromList; + bool m_historyEnabled; + + //We store find flag, results and position. + wxVector<wxFindPointers> m_findPointers; + int m_findFlags; + wxString m_findText; + int m_findPosition; + + //Generic helper functions + bool CanExecCommand(wxString command) const; + void ExecCommand(wxString command); + wxCOMPtr<IHTMLDocument2> GetDocument() const; + bool IsElementVisible(wxCOMPtr<IHTMLElement> elm); + //Find helper functions. + void FindInternal(const wxString& text, int flags, int internal_flag); + long FindNext(int direction = 1); + void FindClear(); + //Toggles control features see INTERNETFEATURELIST for values. + bool EnableControlFeature(long flag, bool enable = true); + + wxDECLARE_DYNAMIC_CLASS(wxWebViewIE); +}; + +class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryIE : public wxWebViewFactory +{ +public: + virtual wxWebView* Create() { return new wxWebViewIE; } + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { return new wxWebViewIE(parent, id, url, pos, size, style, name); } +}; + +class VirtualProtocol : public wxIInternetProtocol +{ +protected: + wxIInternetProtocolSink* m_protocolSink; + wxString m_html; + VOID * fileP; + + wxFSFile* m_file; + wxSharedPtr<wxWebViewHandler> m_handler; + +public: + VirtualProtocol(wxSharedPtr<wxWebViewHandler> handler); + virtual ~VirtualProtocol() {} + + //IUnknown + DECLARE_IUNKNOWN_METHODS; + + //IInternetProtocolRoot + HRESULT STDMETHODCALLTYPE Abort(HRESULT WXUNUSED(hrReason), + DWORD WXUNUSED(dwOptions)) + { return E_NOTIMPL; } + HRESULT STDMETHODCALLTYPE Continue(wxPROTOCOLDATA *WXUNUSED(pProtocolData)) + { return S_OK; } + HRESULT STDMETHODCALLTYPE Resume() { return S_OK; } + HRESULT STDMETHODCALLTYPE Start(LPCWSTR szUrl, + wxIInternetProtocolSink *pOIProtSink, + wxIInternetBindInfo *pOIBindInfo, + DWORD grfPI, + HANDLE_PTR dwReserved); + HRESULT STDMETHODCALLTYPE Suspend() { return S_OK; } + HRESULT STDMETHODCALLTYPE Terminate(DWORD WXUNUSED(dwOptions)) { return S_OK; } + + //IInternetProtocol + HRESULT STDMETHODCALLTYPE LockRequest(DWORD WXUNUSED(dwOptions)) + { return S_OK; } + HRESULT STDMETHODCALLTYPE Read(void *pv, ULONG cb, ULONG *pcbRead); + HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER WXUNUSED(dlibMove), + DWORD WXUNUSED(dwOrigin), + ULARGE_INTEGER* WXUNUSED(plibNewPosition)) + { return E_FAIL; } + HRESULT STDMETHODCALLTYPE UnlockRequest() { return S_OK; } +}; + +class ClassFactory : public IClassFactory +{ +public: + ClassFactory(wxSharedPtr<wxWebViewHandler> handler) : m_handler(handler) + { AddRef(); } + virtual ~ClassFactory() {} + + wxString GetName() { return m_handler->GetName(); } + + //IClassFactory + HRESULT STDMETHODCALLTYPE CreateInstance(IUnknown* pUnkOuter, + REFIID riid, void** ppvObject); + HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock); + + //IUnknown + DECLARE_IUNKNOWN_METHODS; + +private: + wxSharedPtr<wxWebViewHandler> m_handler; +}; + +class wxIEContainer : public wxActiveXContainer +{ +public: + wxIEContainer(wxWindow *parent, REFIID iid, IUnknown *pUnk, DocHostUIHandler* uiHandler = NULL); + virtual ~wxIEContainer(); + virtual bool QueryClientSiteInterface(REFIID iid, void **_interface, const char *&desc); +private: + DocHostUIHandler* m_uiHandler; +}; + +class DocHostUIHandler : public wxIDocHostUIHandler +{ +public: + DocHostUIHandler(wxWebView* browser) { m_browser = browser; } + virtual ~DocHostUIHandler() {} + + virtual HRESULT wxSTDCALL ShowContextMenu(DWORD dwID, POINT *ppt, + IUnknown *pcmdtReserved, + IDispatch *pdispReserved); + + virtual HRESULT wxSTDCALL GetHostInfo(DOCHOSTUIINFO *pInfo); + + virtual HRESULT wxSTDCALL ShowUI(DWORD dwID, + IOleInPlaceActiveObject *pActiveObject, + IOleCommandTarget *pCommandTarget, + IOleInPlaceFrame *pFrame, + IOleInPlaceUIWindow *pDoc); + + virtual HRESULT wxSTDCALL HideUI(void); + + virtual HRESULT wxSTDCALL UpdateUI(void); + + virtual HRESULT wxSTDCALL EnableModeless(BOOL fEnable); + + virtual HRESULT wxSTDCALL OnDocWindowActivate(BOOL fActivate); + + virtual HRESULT wxSTDCALL OnFrameWindowActivate(BOOL fActivate); + + virtual HRESULT wxSTDCALL ResizeBorder(LPCRECT prcBorder, + IOleInPlaceUIWindow *pUIWindow, + BOOL fRameWindow); + + virtual HRESULT wxSTDCALL TranslateAccelerator(LPMSG lpMsg, + const GUID *pguidCmdGroup, + DWORD nCmdID); + + virtual HRESULT wxSTDCALL GetOptionKeyPath(LPOLESTR *pchKey, + DWORD dw); + + virtual HRESULT wxSTDCALL GetDropTarget(IDropTarget *pDropTarget, + IDropTarget **ppDropTarget); + + virtual HRESULT wxSTDCALL GetExternal(IDispatch **ppDispatch); + + virtual HRESULT wxSTDCALL TranslateUrl(DWORD dwTranslate, + OLECHAR *pchURLIn, + OLECHAR **ppchURLOut); + + virtual HRESULT wxSTDCALL FilterDataObject(IDataObject *pDO, + IDataObject **ppDORet); + //IUnknown + DECLARE_IUNKNOWN_METHODS; + +private: + wxWebView* m_browser; +}; + +class wxFindPointers +{ +public: + wxFindPointers(wxIMarkupPointer *ptrBegin, wxIMarkupPointer *ptrEnd) + { + begin = ptrBegin; + end = ptrEnd; + } + //The two markup pointers. + wxIMarkupPointer *begin, *end; +}; + +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE && defined(__WXMSW__) + +#endif // wxWebViewIE_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/webview_missing.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/webview_missing.h new file mode 100644 index 0000000000..fc2b8bc045 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/webview_missing.h @@ -0,0 +1,947 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/msw/webview_missing.h +// Purpose: Defintions / classes commonly missing used by wxWebViewIE +// Author: Steven Lamerton +// Copyright: (c) 2012 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + * Classes and definitions used by wxWebViewIE vary in their + * completeness between compilers and versions of compilers. + * We implement our own versions here which should work + * for all compilers. The definitions are taken from the + * mingw-w64 headers which are public domain. +*/ + +/* urlmon.h */ + +struct IHTMLElement; +struct IHTMLDocument2; + +#ifndef REFRESH_NORMAL +#define REFRESH_NORMAL 0 +#endif + +#ifndef REFRESH_COMPLETELY +#define REFRESH_COMPLETELY 3 +#endif + +typedef enum __wxMIDL_IBindStatusCallback_0006 +{ + wxBSCF_FIRSTDATANOTIFICATION = 0x1, + wxBSCF_INTERMEDIATEDATANOTIFICATION = 0x2, + wxBSCF_LASTDATANOTIFICATION = 0x4, + wxBSCF_DATAFULLYAVAILABLE = 0x8, + wxBSCF_AVAILABLEDATASIZEUNKNOWN = 0x10 +} wxBSCF; + +EXTERN_C const IID CLSID_FileProtocol; + +typedef struct _tagwxBINDINFO +{ + ULONG cbSize; + LPWSTR szExtraInfo; + STGMEDIUM stgmedData; + DWORD grfBindInfoF; + DWORD dwBindVerb; + LPWSTR szCustomVerb; + DWORD cbstgmedData; + DWORD dwOptions; + DWORD dwOptionsFlags; + DWORD dwCodePage; + SECURITY_ATTRIBUTES securityAttributes; + IID iid; + IUnknown *pUnk; + DWORD dwReserved; +} wxBINDINFO; + +typedef struct _tagwxPROTOCOLDATA +{ + DWORD grfFlags; + DWORD dwState; + LPVOID pData; + ULONG cbData; +} wxPROTOCOLDATA; + +class wxIInternetBindInfo : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL GetBindInfo(DWORD *grfBINDF, wxBINDINFO *pbindinfo) = 0; + virtual HRESULT wxSTDCALL GetBindString(ULONG ulStringType, LPOLESTR *ppwzStr, + ULONG cEl, ULONG *pcElFetched) = 0; +}; + +class wxIInternetProtocolSink : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL Switch(wxPROTOCOLDATA *pProtocolData) = 0; + virtual HRESULT wxSTDCALL ReportProgress(ULONG ulStatusCode, + LPCWSTR szStatusText) = 0; + virtual HRESULT wxSTDCALL ReportData(DWORD grfBSCF, ULONG ulProgress, + ULONG ulProgressMax) = 0; + virtual HRESULT wxSTDCALL ReportResult(HRESULT hrResult, DWORD dwError, + LPCWSTR szResult) = 0; +}; + +class wxIInternetProtocolRoot : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL Start(LPCWSTR szUrl, wxIInternetProtocolSink *pOIProtSink, + wxIInternetBindInfo *pOIBindInfo, DWORD grfPI, + HANDLE_PTR dwReserved) = 0; + virtual HRESULT wxSTDCALL Continue(wxPROTOCOLDATA *pProtocolData) = 0; + virtual HRESULT wxSTDCALL Abort(HRESULT hrReason, DWORD dwOptions) = 0; + virtual HRESULT wxSTDCALL Terminate(DWORD dwOptions) = 0; + virtual HRESULT wxSTDCALL Suspend(void) = 0; + virtual HRESULT wxSTDCALL Resume(void) = 0; +}; + + +class wxIInternetProtocol : public wxIInternetProtocolRoot +{ +public: + virtual HRESULT wxSTDCALL Read(void *pv, ULONG cb, ULONG *pcbRead) = 0; + virtual HRESULT wxSTDCALL Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, + ULARGE_INTEGER *plibNewPosition) = 0; + virtual HRESULT wxSTDCALL LockRequest(DWORD dwOptions) = 0; + virtual HRESULT wxSTDCALL UnlockRequest(void) = 0; +}; + + +class wxIInternetSession : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL RegisterNameSpace(IClassFactory *pCF, REFCLSID rclsid, + LPCWSTR pwzProtocol, + ULONG cPatterns, + const LPCWSTR *ppwzPatterns, + DWORD dwReserved) = 0; + virtual HRESULT wxSTDCALL UnregisterNameSpace(IClassFactory *pCF, + LPCWSTR pszProtocol) = 0; + virtual HRESULT wxSTDCALL RegisterMimeFilter(IClassFactory *pCF, + REFCLSID rclsid, + LPCWSTR pwzType) = 0; + virtual HRESULT wxSTDCALL UnregisterMimeFilter(IClassFactory *pCF, + LPCWSTR pwzType) = 0; + virtual HRESULT wxSTDCALL CreateBinding(LPBC pBC, LPCWSTR szUrl, + IUnknown *pUnkOuter, IUnknown **ppUnk, + wxIInternetProtocol **ppOInetProt, + DWORD dwOption) = 0; + virtual HRESULT wxSTDCALL SetSessionOption(DWORD dwOption, LPVOID pBuffer, + DWORD dwBufferLength, + DWORD dwReserved) = 0; + virtual HRESULT wxSTDCALL GetSessionOption(DWORD dwOption, LPVOID pBuffer, + DWORD *pdwBufferLength, + DWORD dwReserved) = 0; +}; + +/* end of urlmon.h */ + +/* mshtmhst.h */ + +typedef enum _tagwxDOCHOSTUIFLAG +{ + DOCHOSTUIFLAG_DIALOG = 0x1, + DOCHOSTUIFLAG_DISABLE_HELP_MENU = 0x2, + DOCHOSTUIFLAG_NO3DBORDER = 0x4, + DOCHOSTUIFLAG_SCROLL_NO = 0x8, + DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE = 0x10, + DOCHOSTUIFLAG_OPENNEWWIN = 0x20, + DOCHOSTUIFLAG_DISABLE_OFFSCREEN = 0x40, + DOCHOSTUIFLAG_FLAT_SCROLLBAR = 0x80, + DOCHOSTUIFLAG_DIV_BLOCKDEFAULT = 0x100, + DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY = 0x200, + DOCHOSTUIFLAG_OVERRIDEBEHAVIORFACTORY = 0x400, + DOCHOSTUIFLAG_CODEPAGELINKEDFONTS = 0x800, + DOCHOSTUIFLAG_URL_ENCODING_DISABLE_UTF8 = 0x1000, + DOCHOSTUIFLAG_URL_ENCODING_ENABLE_UTF8 = 0x2000, + DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE = 0x4000, + DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION = 0x10000, + DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION = 0x20000, + DOCHOSTUIFLAG_THEME = 0x40000, + DOCHOSTUIFLAG_NOTHEME = 0x80000, + DOCHOSTUIFLAG_NOPICS = 0x100000, + DOCHOSTUIFLAG_NO3DOUTERBORDER = 0x200000, + DOCHOSTUIFLAG_DISABLE_EDIT_NS_FIXUP = 0x400000, + DOCHOSTUIFLAG_LOCAL_MACHINE_ACCESS_CHECK = 0x800000, + DOCHOSTUIFLAG_DISABLE_UNTRUSTEDPROTOCOL = 0x1000000 +} DOCHOSTUIFLAG; + +typedef struct _tagwxDOCHOSTUIINFO +{ + ULONG cbSize; + DWORD dwFlags; + DWORD dwDoubleClick; + OLECHAR *pchHostCss; + OLECHAR *pchHostNS; +} DOCHOSTUIINFO; + +class wxIDocHostUIHandler : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL ShowContextMenu(DWORD dwID, POINT *ppt, + IUnknown *pcmdtReserved, + IDispatch *pdispReserved) = 0; + + virtual HRESULT wxSTDCALL GetHostInfo(DOCHOSTUIINFO *pInfo) = 0; + + virtual HRESULT wxSTDCALL ShowUI(DWORD dwID, + IOleInPlaceActiveObject *pActiveObject, + IOleCommandTarget *pCommandTarget, + IOleInPlaceFrame *pFrame, + IOleInPlaceUIWindow *pDoc) = 0; + + virtual HRESULT wxSTDCALL HideUI(void) = 0; + + virtual HRESULT wxSTDCALL UpdateUI(void) = 0; + + virtual HRESULT wxSTDCALL EnableModeless(BOOL fEnable) = 0; + + virtual HRESULT wxSTDCALL OnDocWindowActivate(BOOL fActivate) = 0; + + virtual HRESULT wxSTDCALL OnFrameWindowActivate(BOOL fActivate) = 0; + + virtual HRESULT wxSTDCALL ResizeBorder(LPCRECT prcBorder, + IOleInPlaceUIWindow *pUIWindow, + BOOL fRameWindow) = 0; + + virtual HRESULT wxSTDCALL TranslateAccelerator(LPMSG lpMsg, + const GUID *pguidCmdGroup, + DWORD nCmdID) = 0; + + virtual HRESULT wxSTDCALL GetOptionKeyPath(LPOLESTR *pchKey, + DWORD dw) = 0; + + virtual HRESULT wxSTDCALL GetDropTarget(IDropTarget *pDropTarget, + IDropTarget **ppDropTarget) = 0; + + virtual HRESULT wxSTDCALL GetExternal(IDispatch **ppDispatch) = 0; + + virtual HRESULT wxSTDCALL TranslateUrl(DWORD dwTranslate, + OLECHAR *pchURLIn, + OLECHAR **ppchURLOut) = 0; + + virtual HRESULT wxSTDCALL FilterDataObject(IDataObject *pDO, + IDataObject **ppDORet) = 0; +}; + +/* end of mshtmhst.h */ + +/* mshtml.h */ + +typedef enum _tagwxPOINTER_GRAVITY +{ + wxPOINTER_GRAVITY_Left = 0, + wxPOINTER_GRAVITY_Right = 1, + wxPOINTER_GRAVITY_Max = 2147483647 +} wxPOINTER_GRAVITY; + +typedef enum _tagwxELEMENT_ADJACENCY +{ + wxELEM_ADJ_BeforeBegin = 0, + wxELEM_ADJ_AfterBegin = 1, + wxELEM_ADJ_BeforeEnd = 2, + wxELEM_ADJ_AfterEnd = 3, + wxELEMENT_ADJACENCY_Max = 2147483647 +} wxELEMENT_ADJACENCY; + +typedef enum _tagwxMARKUP_CONTEXT_TYPE +{ + wxCONTEXT_TYPE_None = 0, + wxCONTEXT_TYPE_Text = 1, + wxCONTEXT_TYPE_EnterScope = 2, + wxCONTEXT_TYPE_ExitScope = 3, + wxCONTEXT_TYPE_NoScope = 4, + wxMARKUP_CONTEXT_TYPE_Max = 2147483647 +} wxMARKUP_CONTEXT_TYPE; + +typedef enum _tagwxFINDTEXT_FLAGS +{ + wxFINDTEXT_BACKWARDS = 0x1, + wxFINDTEXT_WHOLEWORD = 0x2, + wxFINDTEXT_MATCHCASE = 0x4, + wxFINDTEXT_RAW = 0x20000, + wxFINDTEXT_MATCHDIAC = 0x20000000, + wxFINDTEXT_MATCHKASHIDA = 0x40000000, + wxFINDTEXT_MATCHALEFHAMZA = 0x80000000, + wxFINDTEXT_FLAGS_Max = 2147483647 +} wxFINDTEXT_FLAGS; + +typedef enum _tagwxMOVEUNIT_ACTION +{ + wxMOVEUNIT_PREVCHAR = 0, + wxMOVEUNIT_NEXTCHAR = 1, + wxMOVEUNIT_PREVCLUSTERBEGIN = 2, + wxMOVEUNIT_NEXTCLUSTERBEGIN = 3, + wxMOVEUNIT_PREVCLUSTEREND = 4, + wxMOVEUNIT_NEXTCLUSTEREND = 5, + wxMOVEUNIT_PREVWORDBEGIN = 6, + wxMOVEUNIT_NEXTWORDBEGIN = 7, + wxMOVEUNIT_PREVWORDEND = 8, + wxMOVEUNIT_NEXTWORDEND = 9, + wxMOVEUNIT_PREVPROOFWORD = 10, + wxMOVEUNIT_NEXTPROOFWORD = 11, + wxMOVEUNIT_NEXTURLBEGIN = 12, + wxMOVEUNIT_PREVURLBEGIN = 13, + wxMOVEUNIT_NEXTURLEND = 14, + wxMOVEUNIT_PREVURLEND = 15, + wxMOVEUNIT_PREVSENTENCE = 16, + wxMOVEUNIT_NEXTSENTENCE = 17, + wxMOVEUNIT_PREVBLOCK = 18, + wxMOVEUNIT_NEXTBLOCK = 19, + wxMOVEUNIT_ACTION_Max = 2147483647 +} wxMOVEUNIT_ACTION; + +typedef enum _tagwxELEMENT_TAG_ID +{ + wxTAGID_NULL = 0, wxTAGID_UNKNOWN = 1, wxTAGID_A = 2, wxTAGID_ACRONYM = 3, + wxTAGID_ADDRESS = 4, wxTAGID_APPLET = 5, wxTAGID_AREA = 6, wxTAGID_B = 7, + wxTAGID_BASE = 8, wxTAGID_BASEFONT = 9, wxTAGID_BDO = 10, + wxTAGID_BGSOUND = 11, wxTAGID_BIG = 12, wxTAGID_BLINK = 13, + wxTAGID_BLOCKQUOTE = 14, wxTAGID_BODY = 15, wxTAGID_BR = 16, + wxTAGID_BUTTON = 17, wxTAGID_CAPTION = 18, wxTAGID_CENTER = 19, + wxTAGID_CITE = 20, wxTAGID_CODE = 21, wxTAGID_COL = 22, + wxTAGID_COLGROUP = 23, wxTAGID_COMMENT = 24, wxTAGID_COMMENT_RAW = 25, + wxTAGID_DD = 26, wxTAGID_DEL = 27, wxTAGID_DFN = 28, wxTAGID_DIR = 29, + wxTAGID_DIV = 30, wxTAGID_DL = 31, wxTAGID_DT = 32, wxTAGID_EM = 33, + wxTAGID_EMBED = 34, wxTAGID_FIELDSET = 35, wxTAGID_FONT = 36, + wxTAGID_FORM = 37, wxTAGID_FRAME = 38, wxTAGID_FRAMESET = 39, + wxTAGID_GENERIC = 40, wxTAGID_H1 = 41, wxTAGID_H2 = 42, wxTAGID_H3 = 43, + wxTAGID_H4 = 44, wxTAGID_H5 = 45, wxTAGID_H6 = 46, wxTAGID_HEAD = 47, + wxTAGID_HR = 48, wxTAGID_HTML = 49, wxTAGID_I = 50, wxTAGID_IFRAME = 51, + wxTAGID_IMG = 52, wxTAGID_INPUT = 53, wxTAGID_INS = 54, wxTAGID_KBD = 55, + wxTAGID_LABEL = 56, wxTAGID_LEGEND = 57, wxTAGID_LI = 58, wxTAGID_LINK = 59, + wxTAGID_LISTING = 60, wxTAGID_MAP = 61, wxTAGID_MARQUEE = 62, + wxTAGID_MENU = 63, wxTAGID_META = 64, wxTAGID_NEXTID = 65, + wxTAGID_NOBR = 66, wxTAGID_NOEMBED = 67, wxTAGID_NOFRAMES = 68, + wxTAGID_NOSCRIPT = 69, wxTAGID_OBJECT = 70, wxTAGID_OL = 71, + wxTAGID_OPTION = 72, wxTAGID_P = 73, wxTAGID_PARAM = 74, + wxTAGID_PLAINTEXT = 75, wxTAGID_PRE = 76, wxTAGID_Q = 77, wxTAGID_RP = 78, + wxTAGID_RT = 79, wxTAGID_RUBY = 80, wxTAGID_S = 81, wxTAGID_SAMP = 82, + wxTAGID_SCRIPT = 83, wxTAGID_SELECT = 84, wxTAGID_SMALL = 85, + wxTAGID_SPAN = 86, wxTAGID_STRIKE = 87, wxTAGID_STRONG = 88, + wxTAGID_STYLE = 89, wxTAGID_SUB = 90, wxTAGID_SUP = 91, wxTAGID_TABLE = 92, + wxTAGID_TBODY = 93, wxTAGID_TC = 94, wxTAGID_TD = 95, wxTAGID_TEXTAREA = 96, + wxTAGID_TFOOT = 97, wxTAGID_TH = 98, wxTAGID_THEAD = 99, + wxTAGID_TITLE = 100, wxTAGID_TR = 101, wxTAGID_TT = 102, wxTAGID_U = 103, + wxTAGID_UL = 104, wxTAGID_VAR = 105, wxTAGID_WBR = 106, wxTAGID_XMP = 107, + wxTAGID_ROOT = 108, wxTAGID_OPTGROUP = 109, wxTAGID_COUNT = 110, + wxTAGID_LAST_PREDEFINED = 10000, wxELEMENT_TAG_ID_Max = 2147483647 +} wxELEMENT_TAG_ID; + +struct wxIHTMLStyle : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL put_fontFamily(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_fontFamily(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_fontStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_fontStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_fontVariant(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_fontVariant(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_fontWeight(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_fontWeight(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_fontSize(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_fontSize(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_font(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_font(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_color(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_color(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_background(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_background(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundColor(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_backgroundColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundImage(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_backgroundImage(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundRepeat(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_backgroundRepeat(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundAttachment(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_backgroundAttachment(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundPosition(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_backgroundPosition(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundPositionX(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_backgroundPositionX(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundPositionY(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_backgroundPositionY(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_wordSpacing(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_wordSpacing(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_letterSpacing(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_letterSpacing(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_textDecoration(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_textDecoration(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_textDecorationNone(VARIANT_BOOL v) = 0; + virtual HRESULT wxSTDCALL get_textDecorationNone(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL put_textDecorationUnderline(VARIANT_BOOL v) = 0; + virtual HRESULT wxSTDCALL get_textDecorationUnderline(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL put_textDecorationOverline(VARIANT_BOOL v) = 0; + virtual HRESULT wxSTDCALL get_textDecorationOverline(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL put_textDecorationLineThrough(VARIANT_BOOL v) = 0; + virtual HRESULT wxSTDCALL get_textDecorationLineThrough(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL put_textDecorationBlink(VARIANT_BOOL v) = 0; + virtual HRESULT wxSTDCALL get_textDecorationBlink(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL put_verticalAlign(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_verticalAlign(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_textTransform(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_textTransform(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_textAlign(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_textAlign(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_textIndent(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_textIndent(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_lineHeight(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_lineHeight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_marginTop(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_marginTop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_marginRight(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_marginRight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_marginBottom(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_marginBottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_marginLeft(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_marginLeft(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_margin(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_margin(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_paddingTop(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_paddingTop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_paddingRight(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_paddingRight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_paddingBottom(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_paddingBottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_paddingLeft(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_paddingLeft(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_padding(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_padding(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_border(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_border(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderTop(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderTop(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderRight(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderRight(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderBottom(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderBottom(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderLeft(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderLeft(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderColor(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderColor(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderTopColor(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderTopColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderRightColor(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderRightColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderBottomColor(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderBottomColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderLeftColor(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderLeftColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderWidth(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderWidth(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderTopWidth(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderTopWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderRightWidth(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderRightWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderBottomWidth(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderBottomWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderLeftWidth(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderLeftWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderTopStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderTopStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderRightStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderRightStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderBottomStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderBottomStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderLeftStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderLeftStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_width(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_width(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_height(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_height(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_styleFloat(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_styleFloat(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_clear(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_clear(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_display(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_display(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_visibility(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_visibility(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_listStyleType(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_listStyleType(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_listStylePosition(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_listStylePosition(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_listStyleImage(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_listStyleImage(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_listStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_listStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_whiteSpace(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_whiteSpace(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_top(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_top(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_left(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_left(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_position(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_zIndex(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_zIndex(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_overflow(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_overflow(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_pageBreakBefore(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_pageBreakBefore(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_pageBreakAfter(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_pageBreakAfter(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_cssText(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_cssText(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_pixelTop(long v) = 0; + virtual HRESULT wxSTDCALL get_pixelTop(long *p) = 0; + virtual HRESULT wxSTDCALL put_pixelLeft(long v) = 0; + virtual HRESULT wxSTDCALL get_pixelLeft(long *p) = 0; + virtual HRESULT wxSTDCALL put_pixelWidth(long v) = 0; + virtual HRESULT wxSTDCALL get_pixelWidth(long *p) = 0; + virtual HRESULT wxSTDCALL put_pixelHeight(long v) = 0; + virtual HRESULT wxSTDCALL get_pixelHeight(long *p) = 0; + virtual HRESULT wxSTDCALL put_posTop(float v) = 0; + virtual HRESULT wxSTDCALL get_posTop(float *p) = 0; + virtual HRESULT wxSTDCALL put_posLeft(float v) = 0; + virtual HRESULT wxSTDCALL get_posLeft(float *p) = 0; + virtual HRESULT wxSTDCALL put_posWidth(float v) = 0; + virtual HRESULT wxSTDCALL get_posWidth(float *p) = 0; + virtual HRESULT wxSTDCALL put_posHeight(float v) = 0; + virtual HRESULT wxSTDCALL get_posHeight(float *p) = 0; + virtual HRESULT wxSTDCALL put_cursor(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_cursor(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_clip(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_clip(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_filter(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_filter(BSTR *p) = 0; + virtual HRESULT wxSTDCALL setAttribute(BSTR strAttributeName, VARIANT AttributeValue, LONG lFlags = 1) = 0; + virtual HRESULT wxSTDCALL getAttribute(BSTR strAttributeName, LONG lFlags, VARIANT *AttributeValue) = 0; + virtual HRESULT wxSTDCALL removeAttribute(BSTR strAttributeName, LONG lFlags, VARIANT_BOOL *pfSuccess) = 0; + virtual HRESULT wxSTDCALL toString(BSTR *String) = 0; +}; + +struct wxIHTMLCurrentStyle : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL get_position(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_styleFloat(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_color(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_fontFamily(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_fontStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_fontVariant(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_fontWeight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_fontSize(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundImage(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundPositionX(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundPositionY(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundRepeat(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderLeftColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderTopColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderRightColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderBottomColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderTopStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderRightStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderBottomStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderLeftStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderTopWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderRightWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderBottomWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderLeftWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_left(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_top(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_width(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_height(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_paddingLeft(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_paddingTop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_paddingRight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_paddingBottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_textAlign(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textDecoration(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_display(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_visibility(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_zIndex(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_letterSpacing(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_lineHeight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_textIndent(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_verticalAlign(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundAttachment(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_marginTop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_marginRight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_marginBottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_marginLeft(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_clear(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_listStyleType(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_listStylePosition(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_listStyleImage(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_clipTop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_clipRight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_clipBottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_clipLeft(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_overflow(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_pageBreakBefore(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_pageBreakAfter(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_cursor(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_tableLayout(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderCollapse(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_direction(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_behavior(BSTR *p) = 0; + virtual HRESULT wxSTDCALL getAttribute(BSTR strAttributeName, LONG lFlags, VARIANT *AttributeValue) = 0; + virtual HRESULT wxSTDCALL get_unicodeBidi(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_right(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_bottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_imeMode(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_rubyAlign(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_rubyPosition(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_rubyOverhang(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textAutospace(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_lineBreak(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_wordBreak(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textJustify(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textJustifyTrim(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textKashida(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_blockDirection(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_layoutGridChar(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_layoutGridLine(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_layoutGridMode(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_layoutGridType(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderColor(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderWidth(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_padding(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_margin(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_accelerator(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_overflowX(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_overflowY(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textTransform(BSTR *p) = 0; +}; + + +struct wxIHTMLRect : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL put_left(long v) = 0; + virtual HRESULT wxSTDCALL get_left(long *p) = 0; + virtual HRESULT wxSTDCALL put_top(long v) = 0; + virtual HRESULT wxSTDCALL get_top(long *p) = 0; + virtual HRESULT wxSTDCALL put_right(long v) = 0; + virtual HRESULT wxSTDCALL get_right(long *p) = 0; + virtual HRESULT wxSTDCALL put_bottom(long v) = 0; + virtual HRESULT wxSTDCALL get_bottom(long *p) = 0; +}; + +struct wxIHTMLRectCollection : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL get_length(long *p) = 0; + virtual HRESULT wxSTDCALL get__newEnum(IUnknown **p) = 0; + virtual HRESULT wxSTDCALL item(VARIANT *pvarIndex, VARIANT *pvarResult) = 0; +}; + +struct wxIHTMLFiltersCollection : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL get_length(long *p) = 0; + virtual HRESULT wxSTDCALL get__newEnum(IUnknown **p) = 0; + virtual HRESULT wxSTDCALL item(VARIANT *pvarIndex, VARIANT *pvarResult) = 0; +}; + +struct wxIHTMLElementCollection : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL toString(BSTR *String) = 0; + virtual HRESULT wxSTDCALL put_length(long v) = 0; + virtual HRESULT wxSTDCALL get_length(long *p) = 0; + virtual HRESULT wxSTDCALL get__newEnum(IUnknown **p) = 0; + virtual HRESULT wxSTDCALL item(VARIANT name, VARIANT index, IDispatch **pdisp) = 0; + virtual HRESULT wxSTDCALL tags(VARIANT tagName, IDispatch **pdisp) = 0; +}; + +struct wxIHTMLElement2 : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL get_scopeName(BSTR *p) = 0; + virtual HRESULT wxSTDCALL setCapture(VARIANT_BOOL containerCapture = -1) = 0; + virtual HRESULT wxSTDCALL releaseCapture(void) = 0; + virtual HRESULT wxSTDCALL put_onlosecapture(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onlosecapture(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL componentFromPoint(long x, long y, BSTR *component) = 0; + virtual HRESULT wxSTDCALL doScroll(VARIANT component) = 0; + virtual HRESULT wxSTDCALL put_onscroll(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onscroll(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondrag(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondrag(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondragend(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondragend(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondragenter(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondragenter(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondragover(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondragover(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondragleave(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondragleave(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondrop(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondrop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onbeforecut(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onbeforecut(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_oncut(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_oncut(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onbeforecopy(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onbeforecopy(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_oncopy(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_oncopy(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onbeforepaste(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onbeforepaste(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onpaste(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onpaste(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_currentStyle(wxIHTMLCurrentStyle **p) = 0; + virtual HRESULT wxSTDCALL put_onpropertychange(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onpropertychange(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL getClientRects(wxIHTMLRectCollection **pRectCol) = 0; + virtual HRESULT wxSTDCALL getBoundingClientRect(wxIHTMLRect **pRect) = 0; + virtual HRESULT wxSTDCALL setExpression(BSTR propname, BSTR expression, BSTR language = L"") = 0; + virtual HRESULT wxSTDCALL getExpression(BSTR propname, VARIANT *expression) = 0; + virtual HRESULT wxSTDCALL removeExpression(BSTR propname, VARIANT_BOOL *pfSuccess) = 0; + virtual HRESULT wxSTDCALL put_tabIndex(short v) = 0; + virtual HRESULT wxSTDCALL get_tabIndex(short *p) = 0; + virtual HRESULT wxSTDCALL focus(void) = 0; + virtual HRESULT wxSTDCALL put_accessKey(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_accessKey(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_onblur(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onblur(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onfocus(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onfocus(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onresize(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onresize(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL blur(void) = 0; + virtual HRESULT wxSTDCALL addFilter(IUnknown *pUnk) = 0; + virtual HRESULT wxSTDCALL removeFilter(IUnknown *pUnk) = 0; + virtual HRESULT wxSTDCALL get_clientHeight(long *p) = 0; + virtual HRESULT wxSTDCALL get_clientWidth(long *p) = 0; + virtual HRESULT wxSTDCALL get_clientTop(long *p) = 0; + virtual HRESULT wxSTDCALL get_clientLeft(long *p) = 0; + virtual HRESULT wxSTDCALL attachEvent(BSTR event, IDispatch *pDisp, VARIANT_BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL detachEvent(BSTR event, IDispatch *pDisp) = 0; + virtual HRESULT wxSTDCALL get_readyState(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onreadystatechange(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onreadystatechange(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onrowsdelete(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onrowsdelete(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onrowsinserted(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onrowsinserted(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_oncellchange(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_oncellchange(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_dir(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_dir(BSTR *p) = 0; + virtual HRESULT wxSTDCALL createControlRange(IDispatch **range) = 0; + virtual HRESULT wxSTDCALL get_scrollHeight(long *p) = 0; + virtual HRESULT wxSTDCALL get_scrollWidth(long *p) = 0; + virtual HRESULT wxSTDCALL put_scrollTop(long v) = 0; + virtual HRESULT wxSTDCALL get_scrollTop(long *p) = 0; + virtual HRESULT wxSTDCALL put_scrollLeft(long v) = 0; + virtual HRESULT wxSTDCALL get_scrollLeft(long *p) = 0; + virtual HRESULT wxSTDCALL clearAttributes(void) = 0; + virtual HRESULT wxSTDCALL mergeAttributes(IHTMLElement *mergeThis) = 0; + virtual HRESULT wxSTDCALL put_oncontextmenu(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_oncontextmenu(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL insertAdjacentElement(BSTR where, IHTMLElement *insertedElement, IHTMLElement **inserted) = 0; + virtual HRESULT wxSTDCALL applyElement(IHTMLElement *apply, BSTR where, IHTMLElement **applied) = 0; + virtual HRESULT wxSTDCALL getAdjacentText(BSTR where, BSTR *text) = 0; + virtual HRESULT wxSTDCALL replaceAdjacentText(BSTR where, BSTR newText, BSTR *oldText) = 0; + virtual HRESULT wxSTDCALL get_canHaveChildren(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL addBehavior(BSTR bstrUrl, VARIANT *pvarFactory, long *pCookie) = 0; + virtual HRESULT wxSTDCALL removeBehavior(long cookie, VARIANT_BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL get_runtimeStyle(wxIHTMLStyle **p) = 0; + virtual HRESULT wxSTDCALL get_behaviorUrns(IDispatch **p) = 0; + virtual HRESULT wxSTDCALL put_tagUrn(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_tagUrn(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_onbeforeeditfocus(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onbeforeeditfocus(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_readyStateValue(long *p) = 0; + virtual HRESULT wxSTDCALL getElementsByTagName(BSTR v, + wxIHTMLElementCollection **pelColl) = 0; +}; + +struct wxIHTMLTxtRange : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL get_htmlText(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_text(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_text(BSTR *p) = 0; + virtual HRESULT wxSTDCALL parentElement(IHTMLElement **parent) = 0; + virtual HRESULT wxSTDCALL duplicate(wxIHTMLTxtRange **Duplicate) = 0; + virtual HRESULT wxSTDCALL inRange(wxIHTMLTxtRange *Range, VARIANT_BOOL *InRange) = 0; + virtual HRESULT wxSTDCALL isEqual(wxIHTMLTxtRange *Range, VARIANT_BOOL *IsEqual) = 0; + virtual HRESULT wxSTDCALL scrollIntoView(VARIANT_BOOL fStart = -1) = 0; + virtual HRESULT wxSTDCALL collapse(VARIANT_BOOL Start = -1) = 0; + virtual HRESULT wxSTDCALL expand(BSTR Unit, VARIANT_BOOL *Success) = 0; + virtual HRESULT wxSTDCALL move(BSTR Unit, long Count, long *ActualCount) = 0; + virtual HRESULT wxSTDCALL moveStart(BSTR Unit, long Count, long *ActualCount) = 0; + virtual HRESULT wxSTDCALL moveEnd(BSTR Unit, long Count, long *ActualCount) = 0; + virtual HRESULT wxSTDCALL select(void) = 0; + virtual HRESULT wxSTDCALL pasteHTML(BSTR html) = 0; + virtual HRESULT wxSTDCALL moveToElementText(IHTMLElement *element) = 0; + virtual HRESULT wxSTDCALL setEndPoint(BSTR how, wxIHTMLTxtRange *SourceRange) = 0; + virtual HRESULT wxSTDCALL compareEndPoints(BSTR how, wxIHTMLTxtRange *SourceRange, long *ret) = 0; + virtual HRESULT wxSTDCALL findText(BSTR String, long count, long Flags, VARIANT_BOOL *Success) = 0; + virtual HRESULT wxSTDCALL moveToPoint(long x, long y) = 0; + virtual HRESULT wxSTDCALL getBookmark(BSTR *Boolmark) = 0; + virtual HRESULT wxSTDCALL moveToBookmark(BSTR Bookmark, VARIANT_BOOL *Success) = 0; + virtual HRESULT wxSTDCALL queryCommandSupported(BSTR cmdID, VARIANT_BOOL *pfRet) = 0; + virtual HRESULT wxSTDCALL queryCommandEnabled(BSTR cmdID, VARIANT_BOOL *pfRet) = 0; + virtual HRESULT wxSTDCALL queryCommandState(BSTR cmdID, VARIANT_BOOL *pfRet) = 0; + virtual HRESULT wxSTDCALL queryCommandIndeterm(BSTR cmdID, VARIANT_BOOL *pfRet) = 0; + virtual HRESULT wxSTDCALL queryCommandText(BSTR cmdID, BSTR *pcmdText) = 0; + virtual HRESULT wxSTDCALL queryCommandValue(BSTR cmdID, VARIANT *pcmdValue) = 0; + virtual HRESULT wxSTDCALL execCommand(BSTR cmdID, VARIANT_BOOL showUI, VARIANT value, VARIANT_BOOL *pfRet) = 0; + virtual HRESULT wxSTDCALL execCommandShowHelp(BSTR cmdID, VARIANT_BOOL *pfRet) = 0; +}; + +struct wxIMarkupContainer : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL OwningDoc(IHTMLDocument2 **ppDoc) = 0; +}; + +struct wxIMarkupPointer : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL OwningDoc(IHTMLDocument2 **ppDoc) = 0; + virtual HRESULT wxSTDCALL Gravity(wxPOINTER_GRAVITY *pGravity) = 0; + virtual HRESULT wxSTDCALL SetGravity(wxPOINTER_GRAVITY Gravity) = 0; + virtual HRESULT wxSTDCALL Cling(BOOL *pfCling) = 0; + virtual HRESULT wxSTDCALL SetCling(BOOL fCLing) = 0; + virtual HRESULT wxSTDCALL Unposition(void) = 0; + virtual HRESULT wxSTDCALL IsPositioned(BOOL *pfPositioned) = 0; + virtual HRESULT wxSTDCALL GetContainer(wxIMarkupContainer **ppContainer) = 0; + virtual HRESULT wxSTDCALL MoveAdjacentToElement(IHTMLElement *pElement, wxELEMENT_ADJACENCY eAdj) = 0; + virtual HRESULT wxSTDCALL MoveToPointer(wxIMarkupPointer *pPointer) = 0; + virtual HRESULT wxSTDCALL MoveToContainer(wxIMarkupContainer *pContainer, BOOL fAtStart) = 0; + virtual HRESULT wxSTDCALL Left(BOOL fMove, wxMARKUP_CONTEXT_TYPE *pContext, IHTMLElement **ppElement, long *pcch, OLECHAR *pchText) = 0; + virtual HRESULT wxSTDCALL Right(BOOL fMove, wxMARKUP_CONTEXT_TYPE *pContext, IHTMLElement **ppElement, long *pcch, OLECHAR *pchText) = 0; + virtual HRESULT wxSTDCALL CurrentScope(IHTMLElement **ppElemCurrent) = 0; + virtual HRESULT wxSTDCALL IsLeftOf(wxIMarkupPointer *pPointerThat, BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL IsLeftOfOrEqualTo(wxIMarkupPointer *pPointerThat, BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL IsRightOf(wxIMarkupPointer *pPointerThat, BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL IsRightOfOrEqualTo(wxIMarkupPointer *pPointerThat, BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL IsEqualTo(wxIMarkupPointer *pPointerThat, BOOL *pfAreEqual) = 0; + virtual HRESULT wxSTDCALL MoveUnit(wxMOVEUNIT_ACTION muAction) = 0; + virtual HRESULT wxSTDCALL FindText(OLECHAR *pchFindText, DWORD dwFlags, wxIMarkupPointer *pIEndMatch, wxIMarkupPointer *pIEndSearch) = 0; +}; + +struct wxIMarkupServices : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL CreateMarkupPointer(wxIMarkupPointer **ppPointer) = 0; + virtual HRESULT wxSTDCALL CreateMarkupContainer(wxIMarkupContainer **ppMarkupContainer) = 0; + virtual HRESULT wxSTDCALL CreateElement(wxELEMENT_TAG_ID tagID, OLECHAR *pchAttributes, IHTMLElement **ppElement) = 0; + virtual HRESULT wxSTDCALL CloneElement(IHTMLElement *pElemCloneThis, IHTMLElement **ppElementTheClone) = 0; + virtual HRESULT wxSTDCALL InsertElement(IHTMLElement *pElementInsert, wxIMarkupPointer *pPointerStart, wxIMarkupPointer *pPointerFinish) = 0; + virtual HRESULT wxSTDCALL RemoveElement(IHTMLElement *pElementRemove) = 0; + virtual HRESULT wxSTDCALL Remove(wxIMarkupPointer *pPointerStart, wxIMarkupPointer *pPointerFinish) = 0; + virtual HRESULT wxSTDCALL Copy(wxIMarkupPointer *pPointerSourceStart, wxIMarkupPointer *pPointerSourceFinish, wxIMarkupPointer *pPointerTarget) = 0; + virtual HRESULT wxSTDCALL Move(wxIMarkupPointer *pPointerSourceStart, wxIMarkupPointer *pPointerSourceFinish, wxIMarkupPointer *pPointerTarget) = 0; + virtual HRESULT wxSTDCALL InsertText(OLECHAR *pchText, long cch, wxIMarkupPointer *pPointerTarget) = 0; + virtual HRESULT wxSTDCALL ParseString(OLECHAR *pchHTML, DWORD dwFlags, wxIMarkupContainer **ppContainerResult, wxIMarkupPointer *ppPointerStart, wxIMarkupPointer *ppPointerFinish) = 0; + virtual HRESULT wxSTDCALL ParseGlobal(HGLOBAL hglobalHTML, DWORD dwFlags, wxIMarkupContainer **ppContainerResult, wxIMarkupPointer *pPointerStart, wxIMarkupPointer *pPointerFinish) = 0; + virtual HRESULT wxSTDCALL IsScopedElement(IHTMLElement *pElement, BOOL *pfScoped) = 0; + virtual HRESULT wxSTDCALL GetElementTagId(IHTMLElement *pElement, wxELEMENT_TAG_ID *ptagId) = 0; + virtual HRESULT wxSTDCALL GetTagIDForName(BSTR bstrName, wxELEMENT_TAG_ID *ptagId) = 0; + virtual HRESULT wxSTDCALL GetNameForTagID(wxELEMENT_TAG_ID tagId, BSTR *pbstrName) = 0; + virtual HRESULT wxSTDCALL MovePointersToRange(wxIHTMLTxtRange *pIRange, wxIMarkupPointer *pPointerStart, wxIMarkupPointer *pPointerFinish) = 0; + virtual HRESULT wxSTDCALL MoveRangeToPointers(wxIMarkupPointer *pPointerStart, wxIMarkupPointer *pPointerFinish, wxIHTMLTxtRange *pIRange) = 0; + virtual HRESULT wxSTDCALL BeginUndoUnit(OLECHAR *pchTitle) = 0; + virtual HRESULT wxSTDCALL EndUndoUnit(void) = 0; +}; + +/* end of mshtml.h */ + +/* WinInet.h */ + +#ifndef HTTP_STATUS_BAD_REQUEST +#define HTTP_STATUS_BAD_REQUEST 400 +#endif + +#ifndef HTTP_STATUS_DENIED +#define HTTP_STATUS_DENIED 401 +#endif + +#ifndef HTTP_STATUS_PAYMENT_REQ +#define HTTP_STATUS_PAYMENT_REQ 402 +#endif + +#ifndef HTTP_STATUS_FORBIDDEN +#define HTTP_STATUS_FORBIDDEN 403 +#endif + +#ifndef HTTP_STATUS_NOT_FOUND +#define HTTP_STATUS_NOT_FOUND 404 +#endif + +#ifndef HTTP_STATUS_BAD_METHOD +#define HTTP_STATUS_BAD_METHOD 405 +#endif + +#ifndef HTTP_STATUS_NONE_ACCEPTABLE +#define HTTP_STATUS_NONE_ACCEPTABLE 406 +#endif + +#ifndef HTTP_STATUS_PROXY_AUTH_REQ +#define HTTP_STATUS_PROXY_AUTH_REQ 407 +#endif + +#ifndef HTTP_STATUS_REQUEST_TIMEOUT +#define HTTP_STATUS_REQUEST_TIMEOUT 408 +#endif + +#ifndef HTTP_STATUS_CONFLICT +#define HTTP_STATUS_CONFLICT 409 +#endif + +#ifndef HTTP_STATUS_GONE +#define HTTP_STATUS_GONE 410 +#endif + +#ifndef HTTP_STATUS_LENGTH_REQUIRED +#define HTTP_STATUS_LENGTH_REQUIRED 411 +#endif + +#ifndef HTTP_STATUS_PRECOND_FAILED +#define HTTP_STATUS_PRECOND_FAILED 412 +#endif + +#ifndef HTTP_STATUS_REQUEST_TOO_LARGE +#define HTTP_STATUS_REQUEST_TOO_LARGE 413 +#endif + +#ifndef HTTP_STATUS_URI_TOO_LONG +#define HTTP_STATUS_URI_TOO_LONG 414 +#endif + +#ifndef HTTP_STATUS_UNSUPPORTED_MEDIA +#define HTTP_STATUS_UNSUPPORTED_MEDIA 415 +#endif + +#ifndef HTTP_STATUS_RETRY_WITH +#define HTTP_STATUS_RETRY_WITH 449 +#endif + +#ifndef HTTP_STATUS_SERVER_ERROR +#define HTTP_STATUS_SERVER_ERROR 500 +#endif + +#ifndef HTTP_STATUS_NOT_SUPPORTED +#define HTTP_STATUS_NOT_SUPPORTED 501 +#endif + +#ifndef HTTP_STATUS_BAD_GATEWAY +#define HTTP_STATUS_BAD_GATEWAY 502 +#endif + +#ifndef HTTP_STATUS_SERVICE_UNAVAIL +#define HTTP_STATUS_SERVICE_UNAVAIL 503 +#endif + +#ifndef HTTP_STATUS_GATEWAY_TIMEOUT +#define HTTP_STATUS_GATEWAY_TIMEOUT 504 +#endif + +#ifndef HTTP_STATUS_VERSION_NOT_SUP +#define HTTP_STATUS_VERSION_NOT_SUP 505 +#endif + +/* end of WinInet.h */ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/webviewhistoryitem_ie.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/webviewhistoryitem_ie.h new file mode 100644 index 0000000000..6edfbb3932 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/webviewhistoryitem_ie.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/msw/webviewhistoryitem.h +// Purpose: wxWebViewHistoryItem header for MSW +// Author: Steven Lamerton +// Copyright: (c) 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_WEBVIEWHISTORYITEM_H_ +#define _WX_MSW_WEBVIEWHISTORYITEM_H_ + +#include "wx/setup.h" + +#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE && defined(__WXMSW__) + +class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem +{ +public: + wxWebViewHistoryItem(const wxString& url, const wxString& title) : + m_url(url), m_title(title) {} + wxString GetUrl() { return m_url; } + wxString GetTitle() { return m_title; } + +private: + wxString m_url, m_title; +}; + +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE && defined(__WXMSW__) + +#endif // _WX_MSW_WEBVIEWHISTORYITEM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/checklst.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/checklst.h new file mode 100644 index 0000000000..61121298bc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/checklst.h @@ -0,0 +1,90 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wince/checklst.h +// Purpose: wxCheckListBox class - a listbox with checkable items +// Author: Wlodzimierz ABX Skiba +// Modified by: +// Created: 30.10.2005 +// Copyright: (c) Wlodzimierz Skiba +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef __CHECKLSTCE__H_ +#define __CHECKLSTCE__H_ + +class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase +{ +public: + // ctors + wxCheckListBox(); + wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int nStrings = 0, + const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + virtual ~wxCheckListBox(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + // items may be checked + virtual bool IsChecked(unsigned int uiIndex) const; + virtual void Check(unsigned int uiIndex, bool bCheck = true); + + // public interface derived from wxListBox and lower classes + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + virtual unsigned int GetCount() const; + virtual int GetSelection() const; + virtual int GetSelections(wxArrayInt& aSelections) const; + virtual wxString GetString(unsigned int n) const; + virtual bool IsSelected(int n) const; + virtual void SetString(unsigned int n, const wxString& s); + + // Implementation + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); +protected: + + void OnSize(wxSizeEvent& event); + + // protected interface derived from wxListBox and lower classes + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void* DoGetItemClientData(unsigned int n) const; + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void DoSetFirstItem(int n); + virtual void DoSetSelection(int n, bool select); + // convert our styles to Windows + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + +private: + wxArrayPtrVoid m_itemsClientData; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckListBox) +}; + +#endif //_CHECKLSTCE_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/chkconf.h new file mode 100644 index 0000000000..00785067ee --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/chkconf.h @@ -0,0 +1,150 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wince/chkconf.h +// Purpose: WinCE-specific configuration options checks +// Author: Vadim Zeitlin +// Modified by: +// Created: 2005-03-07 +// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_WINCE_CHKCONF_H_ +#define _WX_MSW_WINCE_CHKCONF_H_ + +// ---------------------------------------------------------------------------- +// Disable features which don't work or don't make sense under CE +// ---------------------------------------------------------------------------- + +// please keep the list in alphabetic order except for closely related settings +// (e.g. wxUSE_ENH_METAFILE is put immediately after wxUSE_METAFILE) + +#undef wxUSE_DEBUGREPORT +#define wxUSE_DEBUGREPORT 0 + +#if _WIN32_WCE < 400 + // not enough API and lack of ddraw.h + #undef wxUSE_DISPLAY + #define wxUSE_DISPLAY 0 +#endif + +// eVC doesn't have standard streams +#ifdef __EVC4__ + #undef wxUSE_STD_IOSTREAM + #define wxUSE_STD_IOSTREAM 0 +#endif + +// wxFSVolume currently doesn't compile under CE and it's not clear if it makes +// sense at all there (the drives and their names are fixed on CE systems) +#undef wxUSE_FSVOLUME +#define wxUSE_FSVOLUME 0 + +// no .INI files API under CE +#undef wxUSE_INICONF +#define wxUSE_INICONF 0 + +// DDE doesn't exist under WinCE and wxIPC is DDE-based under MSW +#undef wxUSE_IPC +#define wxUSE_IPC 0 + +// doesn't make sense for CE devices and doesn't compile anyhow +#undef wxUSE_JOYSTICK +#define wxUSE_JOYSTICK 0 + +// libtiff doesn't build with eVC but is ok with VC8 +#ifdef __EVC4__ + #undef wxUSE_LIBTIFF + #define wxUSE_LIBTIFF 0 +#endif + +// no AUI under CE: it's unnecessary and currently doesn't compile +#undef wxUSE_AUI +#define wxUSE_AUI 0 + +// no MDI under CE +#undef wxUSE_MDI +#define wxUSE_MDI 0 +#undef wxUSE_MDI_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 0 + +// metafiles are not supported neither +#undef wxUSE_METAFILE +#define wxUSE_METAFILE 0 +#undef wxUSE_ENH_METAFILE +#define wxUSE_ENH_METAFILE 0 + +// not sure if this is supported by CE but it doesn't compile currently anyhow +#undef wxUSE_MS_HTML_HELP +#define wxUSE_MS_HTML_HELP 0 + +// eVC doesn't support SEH +#undef wxUSE_ON_FATAL_EXCEPTION +#define wxUSE_ON_FATAL_EXCEPTION 0 + +// no owner drawn controls (not sure if this is possible at all but in any case +// the code doesn't currently compile) +#undef wxUSE_OWNER_DRAWN +#define wxUSE_OWNER_DRAWN 0 + +#undef wxUSE_PRINTING_ARCHITECTURE +#define wxUSE_PRINTING_ARCHITECTURE 0 + +// regex doesn't build with eVC but is ok with VC8 +#ifdef __EVC4__ + #undef wxUSE_REGEX + #define wxUSE_REGEX 0 +#endif + +#undef wxUSE_RICHEDIT +#define wxUSE_RICHEDIT 0 +#undef wxUSE_RICHEDIT2 +#define wxUSE_RICHEDIT2 0 + +// Standard SDK lacks a few things, forcefully disable them +#ifdef WCE_PLATFORM_STANDARDSDK + // no shell functions support + #undef wxUSE_STDPATHS + #define wxUSE_STDPATHS 0 +#endif // WCE_PLATFORM_STANDARDSDK + +// there is no support for balloon taskbar icons +#undef wxUSE_TASKBARICON_BALLOONS +#define wxUSE_TASKBARICON_BALLOONS 0 + +// not sure if this is supported by eVC but VC8 SDK lacks the tooltips control +// related declarations +#if wxCHECK_VISUALC_VERSION(8) + #undef wxUSE_TOOLTIPS + #define wxUSE_TOOLTIPS 0 +#endif + +#undef wxUSE_UNICODE_MSLU +#define wxUSE_UNICODE_MSLU 0 + +#undef wxUSE_UXTHEME +#define wxUSE_UXTHEME 0 + +#undef wxUSE_WXHTML_HELP +#define wxUSE_WXHTML_HELP 0 + + +// Disable features which don't make sense for MS Smartphones +// (due to pointer device usage, limited controls or dialogs, file system) +#if defined(__SMARTPHONE__) + #undef wxUSE_LISTBOOK + #define wxUSE_LISTBOOK 0 + + #undef wxUSE_NOTEBOOK + #define wxUSE_NOTEBOOK 0 + + #undef wxUSE_STATUSBAR + #define wxUSE_STATUSBAR 0 + + #undef wxUSE_COLOURPICKERCTRL + #define wxUSE_COLOURPICKERCTRL 0 + + #undef wxUSE_COLOURDLG + #define wxUSE_COLOURDLG 0 +#endif // __SMARTPHONE__ + +#endif // _WX_MSW_WINCE_CHKCONF_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/choicece.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/choicece.h new file mode 100644 index 0000000000..e280be7fdc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/choicece.h @@ -0,0 +1,140 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wince/choicece.h +// Purpose: wxChoice implementation for smart phones driven by WinCE +// Author: Wlodzimierz ABX Skiba +// Modified by: +// Created: 29.07.2004 +// Copyright: (c) Wlodzimierz Skiba +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHOICECE_H_BASE_ +#define _WX_CHOICECE_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_CHOICE + +#include "wx/dynarray.h" + +class WXDLLIMPEXP_FWD_CORE wxChoice; +WX_DEFINE_EXPORTED_ARRAY_PTR(wxChoice *, wxArrayChoiceSpins); + +// ---------------------------------------------------------------------------- +// Choice item +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxChoice : public wxChoiceBase +{ +public: + // ctors + wxChoice() { } + virtual ~wxChoice(); + + wxChoice(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Create(parent, id, pos, size, n, choices, style, validator, name); + } + wxChoice(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Create(parent, id, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + + // implement base class pure virtuals + virtual void DoDeleteOneItem(unsigned int n); + virtual void DoClear(); + + virtual unsigned int GetCount() const; + virtual int GetSelection() const; + virtual void SetSelection(int n); + + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + + // get the subclassed window proc of the buddy list of choices + WXFARPROC GetBuddyWndProc() const { return m_wndProcBuddy; } + + // return the choice object whose buddy is the given window or NULL + static wxChoice *GetChoiceForListBox(WXHWND hwndBuddy); + + virtual bool MSWCommand(WXUINT param, WXWORD id); + +protected: + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + + virtual WXHWND MSWGetItemsHWND() const { return m_hwndBuddy; } + + // MSW implementation + virtual void DoGetPosition(int *x, int *y) const; + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual wxSize DoGetBestSize() const; + virtual void DoGetSize(int *width, int *height) const; + + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + // create and initialize the control + bool CreateAndInit(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + int n, const wxString choices[], + long style, + const wxValidator& validator, + const wxString& name); + + // the data for the "buddy" list + WXHWND m_hwndBuddy; + WXFARPROC m_wndProcBuddy; + + // all existing wxChoice - this allows to find the one corresponding to + // the given buddy window in GetSpinChoiceCtrl() + static wxArrayChoiceSpins ms_allChoiceSpins; + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoice) +}; + +#endif // wxUSE_CHOICE + +#endif // _WX_CHOICECE_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/helpwce.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/helpwce.h new file mode 100644 index 0000000000..20cd4e405c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/helpwce.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wince/helpwce.h +// Purpose: Help system: Windows CE help implementation +// Author: Julian Smart +// Modified by: +// Created: 2003-07-12 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPWCE_H_ +#define _WX_HELPWCE_H_ + +#if wxUSE_HELP + +#include "wx/helpbase.h" + +class WXDLLIMPEXP_CORE wxWinceHelpController : public wxHelpControllerBase +{ +public: + wxWinceHelpController(wxWindow* parentWindow = NULL): wxHelpControllerBase(parentWindow) {} + virtual ~wxWinceHelpController() {} + + // Must call this to set the filename + virtual bool Initialize(const wxString& file); + + // If file is "", reloads file given in Initialize + virtual bool LoadFile(const wxString& file = wxEmptyString); + virtual bool DisplayContents(); + virtual bool DisplaySection(int sectionNo); + virtual bool DisplaySection(const wxString& section); + virtual bool DisplayBlock(long blockNo); + virtual bool DisplayContextPopup(int contextId); + virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos); + virtual bool KeywordSearch(const wxString& k, + wxHelpSearchMode mode = wxHELP_SEARCH_ALL); + virtual bool Quit(); + + wxString GetHelpFile() const { return m_helpFile; } + +protected: + // Append extension if necessary. + wxString GetValidFilename(const wxString& file) const; + + // View topic, or just the HTML file + bool ViewURL(const wxString& topic = wxEmptyString); + +private: + wxString m_helpFile; + + DECLARE_CLASS(wxWinceHelpController) +}; + +#endif // wxUSE_MS_HTML_HELP + +#endif +// _WX_HELPWCE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/libraries.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/libraries.h new file mode 100644 index 0000000000..d05e604ca2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/libraries.h @@ -0,0 +1,53 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wince/libraries.h +// Purpose: VC++ pragmas for linking against SDK libs +// Author: Vaclav Slavik +// Modified by: +// Created: 2004-04-11 +// Copyright: (c) 2004 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LIBRARIES_H_ +#define _WX_LIBRARIES_H_ + +// NB: According to Microsoft, it is up to the OEM to decide whether +// some of libraries will be included in the system or not. For example, +// MS' STANDARDSDK does not include cyshell.lib and aygshell.lib, while +// Pocket PC 2003 SDK does. We depend on some symbols that are in these +// libraries in some SDKs and in different libs in others. Fortunately we +// can detect what SDK is used in C++ code, so we take advantage of +// VC++'s #pragma to link against the libraries conditionally, instead of +// including libraries in project files. + +#if defined(__VISUALC__) && defined(__WXWINCE__) + +#if (_WIN32_WCE >= 400) || defined(__POCKETPC__) + // No commdlg.lib in Mobile 5.0 Smartphone +#if !(defined(__SMARTPHONE__) && _WIN32_WCE >= 1200) + #pragma comment(lib,"commdlg.lib") +#endif +#endif + +// this library is only available for PocketPC targets using recent SDK and is +// needed for RTTI support +#if (_WIN32_WCE >= 400) && !defined(__WINCE_NET__) && !defined(wxNO_RTTI) + #pragma comment(lib,"ccrtrtti.lib") +#endif + +#if defined(__WINCE_STANDARDSDK__) + // DoDragDrop: + #pragma comment(lib,"olece400.lib") +#elif defined(__POCKETPC__) || defined(__SMARTPHONE__) || defined(__WINCE_NET__) + #pragma comment(lib,"ceshell.lib") + #pragma comment(lib,"aygshell.lib") +#elif defined(__HANDHELDPC__) + // Handheld PC builds. Maybe WindowsCE.NET 4.X needs another symbol. + #pragma comment(lib,"ceshell.lib") +#else + #error "Unknown SDK, please fill-in missing pieces" +#endif + +#endif // __VISUALC__ && __WXWINCE__ + +#endif // _WX_LIBRARIES_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/missing.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/missing.h new file mode 100644 index 0000000000..73f48bea1e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/missing.h @@ -0,0 +1,139 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wince/missing.h +// Purpose: Missing things in WinCE +// Author: Marco Cavallini +// Modified by: +// Created: 16/11/2002 +// Copyright: (c) KOAN SAS ( www.koansoftware.com ) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CE_MISSING_H_ +#define _WX_CE_MISSING_H_ + +#include "wx/msw/private.h" +#include "shellapi.h" + +inline BOOL IsIconic( HWND WXUNUSED(hWnd) ) +{ + // Probably not right... +#if 0 + long style = GetWindowLong(hWnd, GWL_STYLE); + return ((style & WS_MINIMIZE) == 0); +#endif + return FALSE; +} + +#ifdef __POCKETPC__ +#define SM_CXCURSOR 13 +#define SM_CYCURSOR 14 +#endif + +// Missing from eVC 4 for some reason +#ifndef I_IMAGENONE +#define I_IMAGENONE (-2) +#endif + +#ifndef TBSTYLE_NO_DROPDOWN_ARROW +#define TBSTYLE_NO_DROPDOWN_ARROW 0x0080 +#endif + +#ifndef SHCMBM_GETMENU +#define SHCMBM_GETMENU (WM_USER + 402) +#endif + +#ifndef SHCMBM_SETSUBMENU +#define SHCMBM_SETSUBMENU (WM_USER + 400) // wparam == id of button, lParam == hmenu, return is old hmenu +#endif + +#ifndef SHCMBM_GETSUBMENU +#define SHCMBM_GETSUBMENU (WM_USER + 401) // lParam == ID +#endif + +#ifndef LVS_EX_FULLROWSELECT + #define LVS_EX_FULLROWSELECT 0x00000020 +#endif + +#ifndef TVS_FULLROWSELECT + #define TVS_FULLROWSELECT 0x1000 +#endif + +#ifndef TVM_SETBKCOLOR + #define TVM_SETBKCOLOR (TV_FIRST + 29) + #define TVM_SETTEXTCOLOR (TV_FIRST + 30) +#endif + +// Used in msgdlg.cpp, evtloop.cpp +#ifndef MB_TASKMODAL +#define MB_TASKMODAL 0x2000 +#endif + +#ifndef HGDI_ERROR +#define HGDI_ERROR ((HANDLE)(0xFFFFFFFFL)) +#endif + +// some windows styles don't exist in CE SDK, replace them with closest +// equivalents +#ifndef WS_THICKFRAME + #define WS_THICKFRAME WS_BORDER +#endif + +#ifndef WS_MINIMIZE + #define WS_MINIMIZE 0 +#endif + +#ifndef WS_MAXIMIZE + #define WS_MAXIMIZE 0 +#endif + + +// global memory functions don't exist under CE (good riddance, of course, but +// the existing code still uses them in some places, so make it compile) +// +// update: they're defined in eVC 4 inside "#ifdef UNDER_CE" block +#ifndef UNDER_CE + #define GlobalAlloc LocalAlloc + #define GlobalFree LocalFree + #define GlobalSize LocalSize + #define GPTR LPTR + #define GHND LPTR + #define GMEM_MOVEABLE 0 + #define GMEM_SHARE 0 +#endif // !UNDER_CE + +// WinCE RTL doesn't implement bsearch() used in encconv.cpp +extern "C" void * +bsearch(const void *key, const void *base, size_t num, size_t size, + int (wxCMPFUNC_CONV *cmp)(const void *, const void *)); + +#define O_RDONLY 0x0000 /* open for reading only */ +#define O_WRONLY 0x0001 /* open for writing only */ +#define O_RDWR 0x0002 /* open for reading and writing */ +#define O_APPEND 0x0008 /* writes done at eof */ + +#define O_CREAT 0x0100 /* create and open file */ +#define O_TRUNC 0x0200 /* open and truncate */ +#define O_EXCL 0x0400 /* open only if file doesn't already exist */ + +#define O_TEXT 0x4000 /* file mode is text (translated) */ +#define O_BINARY 0x8000 /* file mode is binary (untranslated) */ + +#ifndef SS_SUNKEN + #define SS_SUNKEN 0x00001000L +#endif + +// unsupported flags for WINDOWPOS structure +#ifndef SWP_NOCOPYBITS + #define SWP_NOCOPYBITS 0 +#endif + +#ifndef SWP_NOOWNERZORDER + #define SWP_NOOWNERZORDER 0 +#endif + +#ifndef SWP_NOSENDCHANGING + #define SWP_NOSENDCHANGING 0 +#endif + +#endif // _WX_CE_MISSING_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/net.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/net.h new file mode 100644 index 0000000000..f99209bd55 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/net.h @@ -0,0 +1,20 @@ +// Copyright 1998, Ben Goetter. All rights reserved. + +/* + patch holes in winsock + + WCE 2.0 lacks many of the 'database' winsock routines. + Stub just enough them for ss.dll. + + getprotobynumber + getservbyport + getservbyname + +*/ + +struct servent * WINSOCKAPI getservbyport(int port, const char * proto) ; + +struct servent * WINSOCKAPI getservbyname(const char * name, + const char * proto) ; +struct protoent * WINSOCKAPI getprotobynumber(int proto) ; + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/resources.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/resources.h new file mode 100644 index 0000000000..f080518950 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/resources.h @@ -0,0 +1,26 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wince/resources.h +// Purpose: identifiers shared between resource compiler and eVC +// Author: Wlodzimierz ABX Skiba +// Modified by: +// Created: 01.05.2004 +// Copyright: (c) Wlodzimierz Skiba +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// Windows CE dummy menu for SHCreateMenuBar() +#define wxIDM_SHMENU 40000 + +#define IDM_LEFT 40001 +#define IDM_RIGHT 40002 +#define IDM_ITEM 40003 + +#define IDS_EMPTY 40010 + +#define IDR_POPUP_1 40020 +#define IDR_POPUP_2 40021 + +#define IDR_MENUBAR_ONE_BUTTON 40030 +#define IDR_MENUBAR_LEFT_MENU 40031 +#define IDR_MENUBAR_RIGHT_MENU 40032 +#define IDR_MENUBAR_BOTH_MENUS 40033 diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/setup.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/setup.h new file mode 100644 index 0000000000..692445cb87 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/setup.h @@ -0,0 +1,1603 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wince/setup.h +// Purpose: Configuration for the library +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SETUP_H_ +#define _WX_SETUP_H_ + +/* --- start common options --- */ +// ---------------------------------------------------------------------------- +// global settings +// ---------------------------------------------------------------------------- + +// define this to 0 when building wxBase library - this can also be done from +// makefile/project file overriding the value here +#ifndef wxUSE_GUI + #define wxUSE_GUI 1 +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// compatibility settings +// ---------------------------------------------------------------------------- + +// This setting determines the compatibility with 2.6 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_6 0 + +// This setting determines the compatibility with 2.8 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_8 1 + +// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when +// default system font is used for wxWindow::GetCharWidth/Height() instead of +// the current font. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxDIALOG_UNIT_COMPATIBILITY 0 + +// ---------------------------------------------------------------------------- +// debugging settings +// ---------------------------------------------------------------------------- + +// wxDEBUG_LEVEL will be defined as 1 in wx/debug.h so normally there is no +// need to define it here. You may do it for two reasons: either completely +// disable/compile out the asserts in release version (then do it inside #ifdef +// NDEBUG) or, on the contrary, enable more asserts, including the usually +// disabled ones, in the debug build (then do it inside #ifndef NDEBUG) +// +// #ifdef NDEBUG +// #define wxDEBUG_LEVEL 0 +// #else +// #define wxDEBUG_LEVEL 2 +// #endif + +// wxHandleFatalExceptions() may be used to catch the program faults at run +// time and, instead of terminating the program with a usual GPF message box, +// call the user-defined wxApp::OnFatalException() function. If you set +// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work. +// +// This setting is for Win32 only and can only be enabled if your compiler +// supports Win32 structured exception handling (currently only VC++ does) +// +// Default is 1 +// +// Recommended setting: 1 if your compiler supports it. +#define wxUSE_ON_FATAL_EXCEPTION 1 + +// Set this to 1 to be able to generate a human-readable (unlike +// machine-readable minidump created by wxCrashReport::Generate()) stack back +// trace when your program crashes using wxStackWalker +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_STACKWALKER 1 + +// Set this to 1 to compile in wxDebugReport class which allows you to create +// and optionally upload to your web site a debug report consisting of back +// trace of the crash (if wxUSE_STACKWALKER == 1) and other information. +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, it is compiled into a separate library so there +// is no overhead if you don't use it +#define wxUSE_DEBUGREPORT 1 + +// Generic comment about debugging settings: they are very useful if you don't +// use any other memory leak detection tools such as Purify/BoundsChecker, but +// are probably redundant otherwise. Also, Visual C++ CRT has the same features +// as wxWidgets memory debugging subsystem built in since version 5.0 and you +// may prefer to use it instead of built in memory debugging code because it is +// faster and more fool proof. +// +// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG +// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0) +// and if __NO_VC_CRTDBG__ is not defined. + +// The rest of the options in this section are obsolete and not supported, +// enable them at your own risk. + +// If 1, enables wxDebugContext, for writing error messages to file, etc. If +// __WXDEBUG__ is not defined, will still use the normal memory operators. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_CONTEXT 0 + +// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF* +// __WXDEBUG__ is also defined. +// +// WARNING: this code may not work with all architectures, especially if +// alignment is an issue. This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 1 if you are not using a memory debugging tool, else 0 +#define wxUSE_MEMORY_TRACING 0 + +// In debug mode, cause new and delete to be redefined globally. +// If this causes problems (e.g. link errors which is a common problem +// especially if you use another library which also redefines the global new +// and delete), set this to 0. +// This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If +// this causes problems (e.g. link errors), set this to 0. You may need to set +// this to 0 if using templates (at least for VC++). This switch is currently +// ignored for MinGW/Cygwin. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_NEW_ALWAYS 0 + + +// ---------------------------------------------------------------------------- +// Unicode support +// ---------------------------------------------------------------------------- + +// These settings are obsolete: the library is always built in Unicode mode +// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if +// absolutely necessary -- updating it is strongly recommended as the ANSI mode +// will disappear completely in future wxWidgets releases. +#ifndef wxUSE_UNICODE + #define wxUSE_UNICODE 1 +#endif + +// wxUSE_WCHAR_T is required by wxWidgets now, don't change. +#define wxUSE_WCHAR_T 1 + +// ---------------------------------------------------------------------------- +// global features +// ---------------------------------------------------------------------------- + +// Compile library in exception-safe mode? If set to 1, the library will try to +// behave correctly in presence of exceptions (even though it still will not +// use the exceptions itself) and notify the user code about any unhandled +// exceptions. If set to 0, propagation of the exceptions through the library +// code will lead to undefined behaviour -- but the code itself will be +// slightly smaller and faster. +// +// Note that like wxUSE_THREADS this option is automatically set to 0 if +// wxNO_EXCEPTIONS is defined. +// +// Default is 1 +// +// Recommended setting: depends on whether you intend to use C++ exceptions +// in your own code (1 if you do, 0 if you don't) +#define wxUSE_EXCEPTIONS 1 + +// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI +// +// Default is 0 +// +// Recommended setting: 0 (this is still work in progress...) +#define wxUSE_EXTENDED_RTTI 0 + +// Support for message/error logging. This includes wxLogXXX() functions and +// wxLog and derived classes. Don't set this to 0 unless you really know what +// you are doing. +// +// Default is 1 +// +// Recommended setting: 1 (always) +#define wxUSE_LOG 1 + +// Recommended setting: 1 +#define wxUSE_LOGWINDOW 1 + +// Recommended setting: 1 +#define wxUSE_LOGGUI 1 + +// Recommended setting: 1 +#define wxUSE_LOG_DIALOG 1 + +// Support for command line parsing using wxCmdLineParser class. +// +// Default is 1 +// +// Recommended setting: 1 (can be set to 0 if you don't use the cmd line) +#define wxUSE_CMDLINE_PARSER 1 + +// Support for multithreaded applications: if 1, compile in thread classes +// (thread.h) and make the library a bit more thread safe. Although thread +// support is quite stable by now, you may still consider recompiling the +// library without it if you have no use for it - this will result in a +// somewhat smaller and faster operation. +// +// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset +// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in +// build/msw/config.* file this value will have no effect. +// +// Default is 1 +// +// Recommended setting: 0 unless you do plan to develop MT applications +#define wxUSE_THREADS 1 + +// If enabled, compiles wxWidgets streams classes +// +// wx stream classes are used for image IO, process IO redirection, network +// protocols implementation and much more and so disabling this results in a +// lot of other functionality being lost. +// +// Default is 1 +// +// Recommended setting: 1 as setting it to 0 disables many other things +#define wxUSE_STREAMS 1 + +// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. +// Note that if the system's implementation does not support positional +// parameters, setting this to 1 forces the use of the wxWidgets implementation +// of wxVsnprintf. The standard vsnprintf() supports positional parameters on +// many Unix systems but usually doesn't under Windows. +// +// Positional parameters are very useful when translating a program since using +// them in formatting strings allow translators to correctly reorder the +// translated sentences. +// +// Default is 1 +// +// Recommended setting: 1 if you want to support multiple languages +#define wxUSE_PRINTF_POS_PARAMS 1 + +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but is +// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets +// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under +// XP as this triggers a bug in compiler TLS support that results in crashes +// when any TLS variables are used. +// +// If you're absolutely sure that your build of wxWidgets is never going to be +// used in such situation, either because it's not going to be linked from any +// kind of plugin or because you only target Vista or later systems, you can +// set this to 2 to force the use of compiler TLS even under MSW. +// +// Default is 1 meaning that compiler TLS is used only if it's 100% safe. +// +// Recommended setting: 2 if you want to have maximal performance and don't +// care about the scenario described above. +#define wxUSE_COMPILER_TLS 1 + +// ---------------------------------------------------------------------------- +// Interoperability with the standard library. +// ---------------------------------------------------------------------------- + +// Set wxUSE_STL to 1 to enable maximal interoperability with the standard +// library, even at the cost of backwards compatibility. +// +// Default is 0 +// +// Recommended setting: 0 as the options below already provide a relatively +// good level of interoperability and changing this option arguably isn't worth +// diverging from the official builds of the library. +#define wxUSE_STL 0 + +// This is not a real option but is used as the default value for +// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library headers, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_DEFAULT 0 +#else + #define wxUSE_STD_DEFAULT 1 +#endif + +// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<> +// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but +// usually more limited) implementations are used which allows to avoid the +// dependency on the C++ run-time library. +// +// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't +// support using standard containers and that VC6 needs non-default options for +// such build to avoid getting "fatal error C1076: compiler limit : internal +// heap limit reached; use /Zm to specify a higher limit" in its own standard +// headers, so you need to ensure you do increase the heap size before enabling +// this option for this compiler. +// +// Default is 0 for compatibility reasons. +// +// Recommended setting: 1 unless compatibility with the official wxWidgets +// build and/or the existing code is a concern. +#define wxUSE_STD_CONTAINERS 0 + +// Use standard C++ streams if 1 instead of wx streams in some places. If +// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the +// standard streams library. +// +// Notice that enabling this does not replace wx streams with std streams +// everywhere, in a lot of places wx streams are used no matter what. +// +// Default is 1 if compiler supports it. +// +// Recommended setting: 1 if you use the standard streams anyhow and so +// dependency on the standard streams library is not a +// problem +#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT + +// Enable minimal interoperability with the standard C++ string class if 1. +// "Minimal" means that wxString can be constructed from std::string or +// std::wstring but can't be implicitly converted to them. You need to enable +// the option below for the latter. +// +// Default is 1 for most compilers. +// +// Recommended setting: 1 unless you want to ensure your program doesn't use +// the standard C++ library at all. +#define wxUSE_STD_STRING wxUSE_STD_DEFAULT + +// Make wxString as much interchangeable with std::[w]string as possible, in +// particular allow implicit conversion of wxString to either of these classes. +// This comes at a price (or a benefit, depending on your point of view) of not +// allowing implicit conversion to "const char *" and "const wchar_t *". +// +// Because a lot of existing code relies on these conversions, this option is +// disabled by default but can be enabled for your build if you don't care +// about compatibility. +// +// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled. +// +// Recommended setting: 0 to remain compatible with the official builds of +// wxWidgets. +#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL + +// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix +// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>. +// +// Note that newer compilers (including VC++ 7.1 and later) don't support +// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow. +// +// Default is 0. +// +// Recommended setting: 0, only set to 1 if you use a really old compiler +#define wxUSE_IOSTREAMH 0 + + +// ---------------------------------------------------------------------------- +// non GUI features selection +// ---------------------------------------------------------------------------- + +// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit +// integer which is implemented in terms of native 64 bit integers if any or +// uses emulation otherwise. +// +// This class is required by wxDateTime and so you should enable it if you want +// to use wxDateTime. For most modern platforms, it will use the native 64 bit +// integers in which case (almost) all of its functions are inline and it +// almost does not take any space, so there should be no reason to switch it +// off. +// +// Recommended setting: 1 +#define wxUSE_LONGLONG 1 + +// Set wxUSE_BASE64 to 1, to compile in Base64 support. This is required for +// storing binary data in wxConfig on most platforms. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_BASE64 1 + +// Set this to 1 to be able to use wxEventLoop even in console applications +// (i.e. using base library only, without GUI). This is mostly useful for +// processing socket events but is also necessary to use timers in console +// applications +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_CONSOLE_EVENTLOOP 1 + +// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level +// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions. +// +// Default is 1 +// +// Recommended setting: 1 (wxFile is highly recommended as it is required by +// i18n code, wxFileConfig and others) +#define wxUSE_FILE 1 +#define wxUSE_FFILE 1 + +// Use wxFSVolume class providing access to the configured/active mount points +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely disabled if you don't use it) +#define wxUSE_FSVOLUME 1 + +// Use wxStandardPaths class which allows to retrieve some standard locations +// in the file system +// +// Default is 1 +// +// Recommended setting: 1 (may be disabled to save space, but not much) +#define wxUSE_STDPATHS 1 + +// use wxTextBuffer class: required by wxTextFile +#define wxUSE_TEXTBUFFER 1 + +// use wxTextFile class: requires wxFile and wxTextBuffer, required by +// wxFileConfig +#define wxUSE_TEXTFILE 1 + +// i18n support: _() macro, wxLocale class. Requires wxTextFile. +#define wxUSE_INTL 1 + +// Provide wxFoo_l() functions similar to standard foo() functions but taking +// an extra locale parameter. +// +// Notice that this is fully implemented only for the systems providing POSIX +// xlocale support or Microsoft Visual C++ >= 8 (which provides proprietary +// almost-equivalent of xlocale functions), otherwise wxFoo_l() functions will +// only work for the current user locale and "C" locale. You can use +// wxHAS_XLOCALE_SUPPORT to test whether the full support is available. +// +// Default is 1 +// +// Recommended setting: 1 but may be disabled if you are writing programs +// running only in C locale anyhow +#define wxUSE_XLOCALE 1 + +// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which +// allow to manipulate dates, times and time intervals. wxDateTime replaces the +// old wxTime and wxDate classes which are still provided for backwards +// compatibility (and implemented in terms of wxDateTime). +// +// Note that this class is relatively new and is still officially in alpha +// stage because some features are not yet (fully) implemented. It is already +// quite useful though and should only be disabled if you are aiming at +// absolutely minimal version of the library. +// +// Requires: wxUSE_LONGLONG +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_DATETIME 1 + +// Set wxUSE_TIMER to 1 to compile wxTimer class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_TIMER 1 + +// Use wxStopWatch clas. +// +// Default is 1 +// +// Recommended setting: 1 (needed by wxSocket) +#define wxUSE_STOPWATCH 1 + +// Set wxUSE_FSWATCHER to 1 if you want to enable wxFileSystemWatcher +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FSWATCHER 1 + +// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes +// which allow the application to store its settings in the persistent +// storage. Setting this to 1 will also enable on-demand creation of the +// global config object in wxApp. +// +// See also wxUSE_CONFIG_NATIVE below. +// +// Recommended setting: 1 +#define wxUSE_CONFIG 1 + +// If wxUSE_CONFIG is 1, you may choose to use either the native config +// classes under Windows (using .INI files under Win16 and the registry under +// Win32) or the portable text file format used by the config classes under +// Unix. +// +// Default is 1 to use native classes. Note that you may still use +// wxFileConfig even if you set this to 1 - just the config object created by +// default for the applications needs will be a wxRegConfig or wxIniConfig and +// not wxFileConfig. +// +// Recommended setting: 1 +#define wxUSE_CONFIG_NATIVE 1 + +// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows +// to connect/disconnect from the network and be notified whenever the dial-up +// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DIALUP_MANAGER 1 + +// Compile in classes for run-time DLL loading and function calling. +// Required by wxUSE_DIALUP_MANAGER. +// +// This setting is for Win32 only +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DYNLIB_CLASS 1 + +// experimental, don't use for now +#define wxUSE_DYNAMIC_LOADER 1 + +// Set to 1 to use socket classes +#define wxUSE_SOCKETS 1 + +// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS) +// +// Notice that currently setting this option under Windows will result in +// programs which can only run on recent OS versions (with ws2_32.dll +// installed) which is why it is disabled by default. +// +// Default is 1. +// +// Recommended setting: 1 if you need IPv6 support +#define wxUSE_IPV6 0 + +// Set to 1 to enable virtual file systems (required by wxHTML) +#define wxUSE_FILESYSTEM 1 + +// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ZIP 1 + +// Set to 1 to enable virtual archive filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ARCHIVE 1 + +// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_INET 1 + +// wxArchive classes for accessing archives such as zip and tar +#define wxUSE_ARCHIVE_STREAMS 1 + +// Set to 1 to compile wxZipInput/OutputStream classes. +#define wxUSE_ZIPSTREAM 1 + +// Set to 1 to compile wxTarInput/OutputStream classes. +#define wxUSE_TARSTREAM 1 + +// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by +// wxUSE_LIBPNG +#define wxUSE_ZLIB 1 + +// If enabled, the code written by Apple will be used to write, in a portable +// way, float on the disk. See extended.c for the license which is different +// from wxWidgets one. +// +// Default is 1. +// +// Recommended setting: 1 unless you don't like the license terms (unlikely) +#define wxUSE_APPLE_IEEE 1 + +// Joystick support class +#define wxUSE_JOYSTICK 1 + +// wxFontEnumerator class +#define wxUSE_FONTENUM 1 + +// wxFontMapper class +#define wxUSE_FONTMAP 1 + +// wxMimeTypesManager class +#define wxUSE_MIMETYPE 1 + +// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP +// or wxURL you need to set this to 1. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_PROTOCOL 1 + +// The settings for the individual URL schemes +#define wxUSE_PROTOCOL_FILE 1 +#define wxUSE_PROTOCOL_FTP 1 +#define wxUSE_PROTOCOL_HTTP 1 + +// Define this to use wxURL class. +#define wxUSE_URL 1 + +// Define this to use native platform url and protocol support. +// Currently valid only for MS-Windows. +// Note: if you set this to 1, you can open ftp/http/gopher sites +// and obtain a valid input stream for these sites +// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0. +// Doing so reduces the code size. +// +// This code is experimental and subject to change. +#define wxUSE_URL_NATIVE 0 + +// Support for wxVariant class used in several places throughout the library, +// notably in wxDataViewCtrl API. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size as much as +// possible in which case setting this to 0 can gain up to 100KB. +#define wxUSE_VARIANT 1 + +// Support for wxAny class, the successor for wxVariant. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size by a small amount, +// or your compiler cannot for some reason cope with complexity of templates used. +#define wxUSE_ANY 1 + +// Support for regular expression matching via wxRegEx class: enable this to +// use POSIX regular expressions in your code. You need to compile regex +// library from src/regex to use it under Windows. +// +// Default is 0 +// +// Recommended setting: 1 if your compiler supports it, if it doesn't please +// contribute us a makefile for src/regex for it +#define wxUSE_REGEX 1 + +// wxSystemOptions class +#define wxUSE_SYSTEM_OPTIONS 1 + +// wxSound class +#define wxUSE_SOUND 1 + +// Use wxMediaCtrl +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_MEDIACTRL 1 + +// Use wxWidget's XRC XML-based resource system. Recommended. +// +// Default is 1 +// +// Recommended setting: 1 (requires wxUSE_XML) +#define wxUSE_XRC 1 + +// XML parsing classes. Note that their API will change in the future, so +// using wxXmlDocument and wxXmlNode in your app is not recommended. +// +// Default is the same as wxUSE_XRC, i.e. 1 by default. +// +// Recommended setting: 1 (required by XRC) +#define wxUSE_XML wxUSE_XRC + +// Use wxWidget's AUI docking system +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_AUI 1 + +// Use wxWidget's Ribbon classes for interfaces +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_RIBBON 1 + +// Use wxPropertyGrid. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_PROPGRID 1 + +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + +// Use wxWidget's web viewing classes +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW 1 + +// Use the IE wxWebView backend +// +// Default is 1 on MSW +// +// Recommended setting: 1 +#ifdef __WXMSW__ +#define wxUSE_WEBVIEW_IE 1 +#else +#define wxUSE_WEBVIEW_IE 0 +#endif + +// Use the WebKit wxWebView backend +// +// Default is 1 on GTK and OSX +// +// Recommended setting: 1 +#if defined(__WXGTK__) || defined(__WXOSX__) +#define wxUSE_WEBVIEW_WEBKIT 1 +#else +#define wxUSE_WEBVIEW_WEBKIT 0 +#endif + +// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced +// 2D drawing API. (Still somewhat experimental) +// +// Please note that on Windows gdiplus.dll is loaded dynamically which means +// that nothing special needs to be done as long as you don't use +// wxGraphicsContext at all or only use it on XP and later systems but you +// still do need to distribute it yourself for an application using +// wxGraphicsContext to be runnable on pre-XP systems. +// +// Default is 1 except if you're using a non-Microsoft compiler under Windows +// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. +// mingw32) you may need to install the headers (and just the headers) +// yourself. If you do, change the setting below manually. +// +// Recommended setting: 1 if supported by the compilation environment + +// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is +// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined +#ifdef _MSC_VER +# if _MSC_VER >= 1310 + // MSVC7.1+ comes with new enough Platform SDK, enable + // wxGraphicsContext support for it +# define wxUSE_GRAPHICS_CONTEXT 1 +# else + // MSVC 6 didn't include GDI+ headers so disable by default, enable it + // here if you use MSVC 6 with a newer SDK +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#else + // Disable support for other Windows compilers, enable it if your compiler + // comes with new enough SDK or you installed the headers manually. + // + // Notice that this will be set by configure under non-Windows platforms + // anyhow so the value there is not important. +# define wxUSE_GRAPHICS_CONTEXT 0 +#endif + +// Enable wxGraphicsContext implementation using Cairo library. +// +// This is not needed under Windows and detected automatically by configure +// under other systems, however you may set this to 1 manually if you installed +// Cairo under Windows yourself and prefer to use it instead the native GDI+ +// implementation. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_CAIRO 0 + + +// ---------------------------------------------------------------------------- +// Individual GUI controls +// ---------------------------------------------------------------------------- + +// You must set wxUSE_CONTROLS to 1 if you are using any controls at all +// (without it, wxControl class is not compiled) +// +// Default is 1 +// +// Recommended setting: 1 (don't change except for very special programs) +#define wxUSE_CONTROLS 1 + +// Support markup in control labels, i.e. provide wxControl::SetLabelMarkup(). +// Currently markup is supported only by a few controls and only some ports but +// their number will increase with time. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you want to save on code size) +#define wxUSE_MARKUP 1 + +// wxPopupWindow class is a top level transient window. It is currently used +// to implement wxTipWindow +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW) +#define wxUSE_POPUPWIN 1 + +// wxTipWindow allows to implement the custom tooltips, it is used by the +// context help classes. Requires wxUSE_POPUPWIN. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0) +#define wxUSE_TIPWINDOW 1 + +// Each of the settings below corresponds to one wxWidgets control. They are +// all switched on by default but may be disabled if you are sure that your +// program (including any standard dialogs it can show!) doesn't need them and +// if you desperately want to save some space. If you use any of these you must +// set wxUSE_CONTROLS as well. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl +#define wxUSE_BANNERWINDOW 1 // wxBannerWindow +#define wxUSE_BUTTON 1 // wxButton +#define wxUSE_BMPBUTTON 1 // wxBitmapButton +#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl +#define wxUSE_CHECKBOX 1 // wxCheckBox +#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHOICE 1 // wxChoice +#define wxUSE_COLLPANE 1 // wxCollapsiblePane +#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl +#define wxUSE_COMBOBOX 1 // wxComboBox +#define wxUSE_COMMANDLINKBUTTON 1 // wxCommandLinkButton +#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl +#define wxUSE_DATEPICKCTRL 1 // wxDatePickerCtrl +#define wxUSE_DIRPICKERCTRL 1 // wxDirPickerCtrl +#define wxUSE_EDITABLELISTBOX 1 // wxEditableListBox +#define wxUSE_FILECTRL 1 // wxFileCtrl +#define wxUSE_FILEPICKERCTRL 1 // wxFilePickerCtrl +#define wxUSE_FONTPICKERCTRL 1 // wxFontPickerCtrl +#define wxUSE_GAUGE 1 // wxGauge +#define wxUSE_HEADERCTRL 1 // wxHeaderCtrl +#define wxUSE_HYPERLINKCTRL 1 // wxHyperlinkCtrl +#define wxUSE_LISTBOX 1 // wxListBox +#define wxUSE_LISTCTRL 1 // wxListCtrl +#define wxUSE_RADIOBOX 1 // wxRadioBox +#define wxUSE_RADIOBTN 1 // wxRadioButton +#define wxUSE_RICHMSGDLG 1 // wxRichMessageDialog +#define wxUSE_SCROLLBAR 1 // wxScrollBar +#define wxUSE_SEARCHCTRL 1 // wxSearchCtrl +#define wxUSE_SLIDER 1 // wxSlider +#define wxUSE_SPINBTN 1 // wxSpinButton +#define wxUSE_SPINCTRL 1 // wxSpinCtrl +#define wxUSE_STATBOX 1 // wxStaticBox +#define wxUSE_STATLINE 1 // wxStaticLine +#define wxUSE_STATTEXT 1 // wxStaticText +#define wxUSE_STATBMP 1 // wxStaticBitmap +#define wxUSE_TEXTCTRL 1 // wxTextCtrl +#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl +#define wxUSE_TOGGLEBTN 1 // requires wxButton +#define wxUSE_TREECTRL 1 // wxTreeCtrl +#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl + +// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR +// below either wxStatusBar95 or a generic wxStatusBar will be used. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STATUSBAR 1 + +// Two status bar implementations are available under Win32: the generic one +// or the wrapper around native control. For native look and feel the native +// version should be used. +// +// Default is 1 for the platforms where native status bar is supported. +// +// Recommended setting: 1 (there is no advantage in using the generic one) +#define wxUSE_NATIVE_STATUSBAR 1 + +// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar +// classes at all. Otherwise, use the native toolbar class unless +// wxUSE_TOOLBAR_NATIVE is 0. +// +// Default is 1 for all settings. +// +// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE. +#define wxUSE_TOOLBAR 1 +#define wxUSE_TOOLBAR_NATIVE 1 + +// wxNotebook is a control with several "tabs" located on one of its sides. It +// may be used to logically organise the data presented to the user instead of +// putting everything in one huge dialog. It replaces wxTabControl and related +// classes of wxWin 1.6x. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTEBOOK 1 + +// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_LISTBOOK 1 + +// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CHOICEBOOK 1 + +// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TREEBOOK 1 + +// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of +// tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLBOOK 1 + +// wxTaskBarIcon is a small notification icon shown in the system toolbar or +// dock. +// +// Default is 1. +// +// Recommended setting: 1 (but can be set to 0 if you don't need it) +#define wxUSE_TASKBARICON 1 + +// wxGrid class +// +// Default is 1, set to 0 to cut down compilation time and binaries size if you +// don't use it. +// +// Recommended setting: 1 +// +#define wxUSE_GRID 1 + +// wxMiniFrame class: a frame with narrow title bar +// +// Default is 1. +// +// Recommended setting: 1 (it doesn't cost almost anything) +#define wxUSE_MINIFRAME 1 + +// wxComboCtrl and related classes: combobox with custom popup window and +// not necessarily a listbox. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it +// it used by wxComboBox +#define wxUSE_COMBOCTRL 1 + +// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox +// items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0, except where it is +// needed as a base class for generic wxBitmapComboBox. +#define wxUSE_ODCOMBOBOX 1 + +// wxBitmapComboBox is a combobox that can have images in front of text items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 +#define wxUSE_BITMAPCOMBOBOX 1 + +// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items +// up and down in it. It is also used as part of wxRearrangeDialog. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 (currently used only by +// wxHeaderCtrl) +#define wxUSE_REARRANGECTRL 1 + +// ---------------------------------------------------------------------------- +// Miscellaneous GUI stuff +// ---------------------------------------------------------------------------- + +// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar) +#define wxUSE_ACCEL 1 + +// Use the standard art provider. The icons returned by this provider are +// embedded into the library as XPMs so disabling it reduces the library size +// somewhat but this should only be done if you use your own custom art +// provider returning the icons or never use any icons not provided by the +// native art provider (which might not be implemented at all for some +// platforms) or by the Tango icons provider (if it's not itself disabled +// below). +// +// Default is 1. +// +// Recommended setting: 1 unless you use your own custom art provider. +#define wxUSE_ARTPROVIDER_STD 1 + +// Use art provider providing Tango icons: this art provider has higher quality +// icons than the default ones using smaller size XPM icons without +// transparency but the embedded PNG icons add to the library size. +// +// Default is 1 under non-GTK ports. Under wxGTK the native art provider using +// the GTK+ stock icons replaces it so it is normally not necessary. +// +// Recommended setting: 1 but can be turned off to reduce the library size. +#define wxUSE_ARTPROVIDER_TANGO 1 + +// Hotkey support (currently Windows only) +#define wxUSE_HOTKEY 1 + +// Use wxCaret: a class implementing a "cursor" in a text control (called caret +// under Windows). +// +// Default is 1. +// +// Recommended setting: 1 (can be safely set to 0, not used by the library) +#define wxUSE_CARET 1 + +// Use wxDisplay class: it allows enumerating all displays on a system and +// their geometries as well as finding the display on which the given point or +// window lies. +// +// Default is 1. +// +// Recommended setting: 1 if you need it, can be safely set to 0 otherwise +#define wxUSE_DISPLAY 1 + +// Miscellaneous geometry code: needed for Canvas library +#define wxUSE_GEOMETRY 1 + +// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and +// wxListCtrl. +// +// Default is 1. +// +// Recommended setting: 1 (set it to 0 if you don't use any of the controls +// enumerated above, then this class is mostly useless too) +#define wxUSE_IMAGLIST 1 + +// Use wxInfoBar class. +// +// Default is 1. +// +// Recommended setting: 1 (but can be disabled without problems as nothing +// depends on it) +#define wxUSE_INFOBAR 1 + +// Use wxMenu, wxMenuBar, wxMenuItem. +// +// Default is 1. +// +// Recommended setting: 1 (can't be disabled under MSW) +#define wxUSE_MENUS 1 + +// Use wxNotificationMessage. +// +// wxNotificationMessage allows to show non-intrusive messages to the user +// using balloons, banners, popups or whatever is the appropriate method for +// the current platform. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTIFICATION_MESSAGE 1 + +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + +// wxRichToolTip is a customizable tooltip class which has more functionality +// than the stock (but native, unlike this class) wxToolTip. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely set to 0 if you don't need it) +#define wxUSE_RICHTOOLTIP 1 + +// Use wxSashWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SASH 1 + +// Use wxSplitterWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SPLITTER 1 + +// Use wxToolTip and wxWindow::Set/GetToolTip() methods. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLTIPS 1 + +// wxValidator class and related methods +#define wxUSE_VALIDATORS 1 + +// Use reference counted ID management: this means that wxWidgets will track +// the automatically allocated ids (those used when you use wxID_ANY when +// creating a window, menu or toolbar item &c) instead of just supposing that +// the program never runs out of them. This is mostly useful only under wxMSW +// where the total ids range is limited to SHRT_MIN..SHRT_MAX and where +// long-running programs can run into problems with ids reuse without this. On +// the other platforms, where the ids have the full int range, this shouldn't +// be necessary. +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif + +// ---------------------------------------------------------------------------- +// common dialogs +// ---------------------------------------------------------------------------- + +// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g. +// file selector, printer dialog). Switching this off also switches off the +// printing architecture and interactive wxPrinterDC. +// +// Default is 1 +// +// Recommended setting: 1 (unless it really doesn't work) +#define wxUSE_COMMON_DIALOGS 1 + +// wxBusyInfo displays window with message when app is busy. Works in same way +// as wxBusyCursor +#define wxUSE_BUSYINFO 1 + +// Use single/multiple choice dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_CHOICEDLG 1 + +// Use colour picker dialog +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_COLOURDLG 1 + +// wxDirDlg class for getting a directory name from user +#define wxUSE_DIRDLG 1 + +// TODO: setting to choose the generic or native one + +// Use file open/save dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in many places in the library itself) +#define wxUSE_FILEDLG 1 + +// Use find/replace dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely set to 0) +#define wxUSE_FINDREPLDLG 1 + +// Use font picker dialog +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_FONTDLG 1 + +// Use wxMessageDialog and wxMessageBox. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_MSGDLG 1 + +// progress dialog class for lengthy operations +#define wxUSE_PROGRESSDLG 1 + +// support for startup tips (wxShowTip &c) +#define wxUSE_STARTUP_TIPS 1 + +// text entry dialog and wxGetTextFromUser function +#define wxUSE_TEXTDLG 1 + +// number entry dialog +#define wxUSE_NUMBERDLG 1 + +// splash screen class +#define wxUSE_SPLASH 1 + +// wizards +#define wxUSE_WIZARDDLG 1 + +// Compile in wxAboutBox() function showing the standard "About" dialog. +// +// Default is 1 +// +// Recommended setting: 1 but can be set to 0 to save some space if you don't +// use this function +#define wxUSE_ABOUTDLG 1 + +// wxFileHistory class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FILE_HISTORY 1 + +// ---------------------------------------------------------------------------- +// Metafiles support +// ---------------------------------------------------------------------------- + +// Windows supports the graphics format known as metafile which is, though not +// portable, is widely used under Windows and so is supported by wxWin (under +// Windows only, of course). Win16 (Win3.1) used the so-called "Window +// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in +// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by +// default, WMFs will be used under Win16 and EMFs under Win32. This may be +// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting +// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile +// in any metafile related classes at all. +// +// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS. +// +// Recommended setting: default or 0 for everything for portable programs. +#define wxUSE_METAFILE 1 +#define wxUSE_ENH_METAFILE 1 +#define wxUSE_WIN_METAFILES_ALWAYS 0 + +// ---------------------------------------------------------------------------- +// Big GUI components +// ---------------------------------------------------------------------------- + +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + +// Set to 0 to disable document/view architecture +#define wxUSE_DOC_VIEW_ARCHITECTURE 1 + +// Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 1 + +// Set to 0 to disable print/preview architecture code +#define wxUSE_PRINTING_ARCHITECTURE 1 + +// wxHTML sublibrary allows to display HTML in wxWindow programs and much, +// much more. +// +// Default is 1. +// +// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a +// smaller library. +#define wxUSE_HTML 1 + +// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL +// headers and libraries to be able to compile the library with wxUSE_GLCANVAS +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). +// +// Default is 1 unless the compiler is known to ship without the necessary +// headers (Digital Mars) or the platform doesn't support OpenGL (Windows CE). +// +// Recommended setting: 1 if you intend to use OpenGL, can be safely set to 0 +// otherwise. +#define wxUSE_GLCANVAS 1 + +// wxRichTextCtrl allows editing of styled text. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 if you want compile a +// smaller library. +#define wxUSE_RICHTEXT 1 + +// ---------------------------------------------------------------------------- +// Data transfer +// ---------------------------------------------------------------------------- + +// Use wxClipboard class for clipboard copy/paste. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CLIPBOARD 1 + +// Use wxDataObject and related classes. Needed for clipboard and OLE drag and +// drop +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DATAOBJ 1 + +// Use wxDropTarget and wxDropSource classes for drag and drop (this is +// different from "built in" drag and drop in wxTreeCtrl which is always +// available). Requires wxUSE_DATAOBJ. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DRAG_AND_DROP 1 + +// Use wxAccessible for enhanced and customisable accessibility. +// Depends on wxUSE_OLE. +// +// Default is 0. +// +// Recommended setting (at present): 0 +#define wxUSE_ACCESSIBILITY 0 + +// ---------------------------------------------------------------------------- +// miscellaneous settings +// ---------------------------------------------------------------------------- + +// wxSingleInstanceChecker class allows to verify at startup if another program +// instance is running. +// +// Default is 1 +// +// Recommended setting: 1 (the class is tiny, disabling it won't save much +// space) +#define wxUSE_SNGLINST_CHECKER 1 + +#define wxUSE_DRAGIMAGE 1 + +#define wxUSE_IPC 1 + // 0 for no interprocess comms +#define wxUSE_HELP 1 + // 0 for no help facility + +// Should we use MS HTML help for wxHelpController? If disabled, neither +// wxCHMHelpController nor wxBestHelpController are available. +// +// Default is 1 under MSW, 0 is always used for the other platforms. +// +// Recommended setting: 1, only set to 0 if you have trouble compiling +// wxCHMHelpController (could be a problem with really ancient compilers) +#define wxUSE_MS_HTML_HELP 1 + + +// Use wxHTML-based help controller? +#define wxUSE_WXHTML_HELP 1 + +#define wxUSE_CONSTRAINTS 1 + // 0 for no window layout constraint system + +#define wxUSE_SPLINES 1 + // 0 for no splines + +#define wxUSE_MOUSEWHEEL 1 + // Include mouse wheel support + +// Compile wxUIActionSimulator class? +#define wxUSE_UIACTIONSIMULATOR 1 + +// ---------------------------------------------------------------------------- +// wxDC classes for various output formats +// ---------------------------------------------------------------------------- + +// Set to 1 for PostScript device context. +#define wxUSE_POSTSCRIPT 0 + +// Set to 1 to use font metric files in GetTextExtent +#define wxUSE_AFM_FOR_POSTSCRIPT 1 + +// Set to 1 to compile in support for wxSVGFileDC, a wxDC subclass which allows +// to create files in SVG (Scalable Vector Graphics) format. +#define wxUSE_SVG 1 + +// Should wxDC provide SetTransformMatrix() and related methods? +// +// Default is 1 but can be set to 0 if this functionality is not used. Notice +// that currently only wxMSW supports this so setting this to 0 doesn't change +// much for non-MSW platforms (although it will still save a few bytes +// probably). +// +// Recommended setting: 1. +#define wxUSE_DC_TRANSFORM_MATRIX 1 + +// ---------------------------------------------------------------------------- +// image format support +// ---------------------------------------------------------------------------- + +// wxImage supports many different image formats which can be configured at +// compile-time. BMP is always supported, others are optional and can be safely +// disabled if you don't plan to use images in such format sometimes saving +// substantial amount of code in the final library. +// +// Some formats require an extra library which is included in wxWin sources +// which is mentioned if it is the case. + +// Set to 1 for wxImage support (recommended). +#define wxUSE_IMAGE 1 + +// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB. +#define wxUSE_LIBPNG 1 + +// Set to 1 for JPEG format support (requires libjpeg) +#define wxUSE_LIBJPEG 1 + +// Set to 1 for TIFF format support (requires libtiff) +#define wxUSE_LIBTIFF 1 + +// Set to 1 for TGA format support (loading only) +#define wxUSE_TGA 1 + +// Set to 1 for GIF format support +#define wxUSE_GIF 1 + +// Set to 1 for PNM format support +#define wxUSE_PNM 1 + +// Set to 1 for PCX format support +#define wxUSE_PCX 1 + +// Set to 1 for IFF format support (Amiga format) +#define wxUSE_IFF 0 + +// Set to 1 for XPM format support +#define wxUSE_XPM 1 + +// Set to 1 for MS Icons and Cursors format support +#define wxUSE_ICO_CUR 1 + +// Set to 1 to compile in wxPalette class +#define wxUSE_PALETTE 1 + +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 + + +/* --- end common options --- */ + +// ---------------------------------------------------------------------------- +// general Windows-specific stuff +// ---------------------------------------------------------------------------- + +// Set this to 1 for generic OLE support: this is required for drag-and-drop, +// clipboard, OLE Automation. Only set it to 0 if your compiler is very old and +// can't compile/doesn't have the OLE headers. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_OLE 1 + +// Set this to 1 to enable wxDIB (don't change unless you have reason to) +#define wxUSE_WXDIB 1 + +// Set this to 1 to compile in wxRegKey class. +// +// Default is 1 +// +// Recommended setting: 1, this is used internally by wx in a few places +#define wxUSE_REGKEY 1 + +// ---------------------------------------------------------------------------- +// Windows CE specific stuff +// ---------------------------------------------------------------------------- + +// list of things which don't make sense under Windows CE in alphabetical order +// (please keep it!) +// +// NB: stuff which doesn't work at all under CE is forcefully disabled in +// wx/msw/wince/chkconf.h + +// Windows CE doesn't use RAS so wxDialUpManager doesn't work under it +#undef wxUSE_DIALUP_MANAGER +#define wxUSE_DIALUP_MANAGER 0 + +#undef wxUSE_DRAG_AND_DROP +#define wxUSE_DRAG_AND_DROP 0 + +#undef wxUSE_FSVOLUME +#define wxUSE_FSVOLUME 0 + +// MDI is not supported under CE +#undef wxUSE_MDI +#define wxUSE_MDI 0 + +#undef wxUSE_MDI_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 0 + +// there is no difference between frame and mini frame decorations under CE +#undef wxUSE_MINIFRAME +#define wxUSE_MINIFRAME 0 + +// no CHM support under CE +#undef wxUSE_MS_HTML_HELP +#define wxUSE_MS_HTML_HELP 0 + +// ??? +#undef wxUSE_OWNER_DRAWN +#define wxUSE_OWNER_DRAWN 0 + +// there is usually no printer attached to a PDA... +#undef wxUSE_PRINTING_ARCHITECTURE +#define wxUSE_PRINTING_ARCHITECTURE 0 + +// doesn't make much sense in absence of mouse... +#undef wxUSE_TOOLTIPS +#define wxUSE_TOOLTIPS 0 + +// Do use commdlg.h +#undef wxUSE_COMMON_DIALOGS +#define wxUSE_COMMON_DIALOGS 1 + +// don't use wxRichTextCtrl on WinCE yet, it's not ready, plus it's +// probably overkill for a WinCE environment. +#undef wxUSE_RICHTEXT +#define wxUSE_RICHTEXT 0 + +// ---------------------------------------------------------------------------- +// Crash debugging helpers +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxCrashReport::Generate() to create mini +// dumps of your program when it crashes (or at any other moment) +// +// Default is 1 if supported by the compiler (VC++ and recent BC++ only). +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_CRASHREPORT 0 + +// ---------------------------------------------------------------------------- +// obsolete MSW settings, don't change +// ---------------------------------------------------------------------------- + +#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0 + +#endif // _WX_SETUP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/smartphone.rc b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/smartphone.rc new file mode 100644 index 0000000000..89ac65f450 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/smartphone.rc @@ -0,0 +1,64 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wince/smartphone.rc +// Purpose: resources for MS Smartphone build +// Author: Wlodzimierz ABX Skiba +// Modified by: +// Created: 01.05.2004 +// Copyright: (c) Wlodzimierz Skiba +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#include <aygshell.h> + +STRINGTABLE +BEGIN + IDS_EMPTY "" +END + +IDR_POPUP_1 MENU +BEGIN + POPUP "" + BEGIN + MENUITEM "M", IDM_ITEM + END +END + +IDR_POPUP_2 MENU +BEGIN + POPUP "" + BEGIN + MENUITEM "M", IDM_ITEM + END + POPUP "" + BEGIN + MENUITEM "M", IDM_ITEM + END +END + +IDR_MENUBAR_ONE_BUTTON RCDATA +BEGIN + 0,2, + I_IMAGENONE, IDM_LEFT, TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, NOMENU, + I_IMAGENONE, IDM_RIGHT, TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, NOMENU, +END + +IDR_MENUBAR_LEFT_MENU RCDATA +BEGIN + IDR_POPUP_1,1, + I_IMAGENONE, IDM_LEFT, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 0, +END + +IDR_MENUBAR_RIGHT_MENU RCDATA +BEGIN + IDR_POPUP_1,2, + I_IMAGENONE, IDM_LEFT, TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, NOMENU, + I_IMAGENONE, IDM_RIGHT, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 0, +END + +IDR_MENUBAR_BOTH_MENUS RCDATA +BEGIN + IDR_POPUP_2,2, + I_IMAGENONE, IDM_LEFT, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 0, + I_IMAGENONE, IDM_RIGHT, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_EMPTY, 0, 1, +END + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/tbarwce.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/tbarwce.h new file mode 100644 index 0000000000..12cfd7e8fe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/tbarwce.h @@ -0,0 +1,169 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wince/tbarwce.h +// Purpose: Windows CE wxToolBar class +// Author: Julian Smart +// Modified by: +// Created: 2003-07-12 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BARWCE_H_ +#define _WX_BARWCE_H_ + +#if wxUSE_TOOLBAR + +#include "wx/dynarray.h" + +// Smartphones don't have toolbars, so use a dummy class +#ifdef __SMARTPHONE__ + +class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase +{ +public: + // ctors and dtor + wxToolBar() { } + + wxToolBar(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr) + { + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr); + + // override/implement base class virtuals + virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const; + virtual bool Realize() { return true; } + +protected: + // implement base class pure virtuals + virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); + virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); + + virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable); + virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle); + virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); + + virtual wxToolBarToolBase *CreateTool(int id, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled, + wxItemKind kind, + wxObject *clientData, + const wxString& shortHelp, + const wxString& longHelp); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxToolBar) + wxDECLARE_NO_COPY_CLASS(wxToolBar); +}; + +#else + +// For __POCKETPC__ + +#include "wx/msw/toolbar.h" + +class WXDLLIMPEXP_CORE wxToolMenuBar : public wxToolBar +{ +public: + // ctors and dtor + wxToolMenuBar() { Init(); } + + wxToolMenuBar(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr, + wxMenuBar* menuBar = NULL) + { + Init(); + + Create(parent, id, pos, size, style, name, menuBar); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr, + wxMenuBar* menuBar = NULL); + + virtual ~wxToolMenuBar(); + + // override/implement base class virtuals + virtual bool Realize(); + + // implementation only from now on + // ------------------------------- + + // Override in order to bypass wxToolBar's overridden function + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + + virtual bool MSWCommand(WXUINT param, WXWORD id); + + // Return HMENU for the menu associated with the commandbar + WXHMENU GetHMenu(); + + // Set the wxMenuBar associated with this commandbar + void SetMenuBar(wxMenuBar* menuBar) { m_menuBar = menuBar; } + + // Returns the wxMenuBar associated with this commandbar + wxMenuBar* GetMenuBar() const { return m_menuBar; } + +protected: + // common part of all ctors + void Init(); + + // create the native toolbar control + bool MSWCreateToolbar(const wxPoint& pos, const wxSize& size, wxMenuBar* menuBar); + + // recreate the control completely + void Recreate(); + + // implement base class pure virtuals + virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); + virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); + + virtual wxToolBarToolBase *CreateTool(int id, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled, + wxItemKind kind, + wxObject *clientData, + const wxString& shortHelp, + const wxString& longHelp); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); + + // The menubar associated with this toolbar + wxMenuBar* m_menuBar; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxToolMenuBar) + wxDECLARE_NO_COPY_CLASS(wxToolMenuBar); +}; + +#endif + // __SMARTPHONE__ + +#endif // wxUSE_TOOLBAR + +#endif + // _WX_BARWCE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/textctrlce.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/textctrlce.h new file mode 100644 index 0000000000..3c51633b0a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/textctrlce.h @@ -0,0 +1,235 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wince/textctrlce.h +// Purpose: wxTextCtrl implementation for smart phones driven by WinCE +// Author: Wlodzimierz ABX Skiba +// Modified by: +// Created: 30.08.2004 +// Copyright: (c) Wlodzimierz Skiba +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTCTRLCE_H_ +#define _WX_TEXTCTRLCE_H_ + +#include "wx/dynarray.h" + +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +WX_DEFINE_EXPORTED_ARRAY_PTR(wxTextCtrl *, wxArrayTextSpins); + +class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase +{ +public: + // creation + // -------- + + wxTextCtrl() { Init(); } + wxTextCtrl(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr) + { + Init(); + + Create(parent, id, value, pos, size, style, validator, name); + } + virtual ~wxTextCtrl(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr); + + // implement base class pure virtuals + // ---------------------------------- + + virtual wxString GetValue() const; + virtual void SetValue(const wxString& value) { DoSetValue(value, SetValue_SendEvent); } + + virtual void ChangeValue(const wxString &value) { DoSetValue(value); } + + virtual wxString GetRange(long from, long to) const; + + virtual int GetLineLength(long lineNo) const; + virtual wxString GetLineText(long lineNo) const; + virtual int GetNumberOfLines() const; + + virtual bool IsModified() const; + virtual bool IsEditable() const; + + virtual void GetSelection(long* from, long* to) const; + + // operations + // ---------- + + // editing + virtual void Clear(); + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to); + + // load the controls contents from the file + virtual bool LoadFile(const wxString& file); + + // clears the dirty flag + virtual void MarkDirty(); + virtual void DiscardEdits(); + + virtual void SetMaxLength(unsigned long len); + + // writing text inserts it at the current position, appending always + // inserts it at the end + virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text); + + // translate between the position (which is just an index in the text ctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent column and line. + virtual long XYToPosition(long x, long y) const; + virtual bool PositionToXY(long pos, long *x, long *y) const; + + virtual void ShowPosition(long pos); + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const; + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const + { + return wxTextCtrlBase::HitTest(pt, col, row); + } + + // Clipboard operations + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + virtual bool CanCopy() const; + virtual bool CanCut() const; + virtual bool CanPaste() const; + + // Undo/redo + virtual void Undo(); + virtual void Redo(); + + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + // Insertion point + virtual void SetInsertionPoint(long pos); + virtual void SetInsertionPointEnd(); + virtual long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + + virtual void SetSelection(long from, long to); + virtual void SetEditable(bool editable); + + // Caret handling (Windows only) + + bool ShowNativeCaret(bool show = true); + bool HideNativeCaret() { return ShowNativeCaret(false); } + + // Implementation from now on + // -------------------------- + + virtual void Command(wxCommandEvent& event); + virtual bool MSWCommand(WXUINT param, WXWORD id); + + virtual void AdoptAttributesFromHWND(); + + virtual bool AcceptsFocus() const; + + // callbacks + void OnDropFiles(wxDropFilesEvent& event); + void OnChar(wxKeyEvent& event); // Process 'enter' if required + + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + void OnDelete(wxCommandEvent& event); + void OnSelectAll(wxCommandEvent& event); + + void OnUpdateCut(wxUpdateUIEvent& event); + void OnUpdateCopy(wxUpdateUIEvent& event); + void OnUpdatePaste(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + void OnUpdateDelete(wxUpdateUIEvent& event); + void OnUpdateSelectAll(wxUpdateUIEvent& event); + + // Show a context menu for Rich Edit controls (the standard + // EDIT control has one already) + void OnRightClick(wxMouseEvent& event); + + // be sure the caret remains invisible if the user + // called HideNativeCaret() before + void OnSetFocus(wxFocusEvent& event); + + // get the subclassed window proc of the buddy + WXFARPROC GetBuddyWndProc() const { return m_wndProcBuddy; } + + // intercept WM_GETDLGCODE + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + +protected: + // common part of all ctors + void Init(); + + // call this to increase the size limit (will do nothing if the current + // limit is big enough) + // + // returns true if we increased the limit to allow entering more text, + // false if we hit the limit set by SetMaxLength() and so didn't change it + bool AdjustSpaceLimit(); + + void DoSetValue(const wxString &value, int flags = 0); + + // replace the contents of the selection or of the entire control with the + // given text + void DoWriteText(const wxString& text, int flags = SetValue_SelectionOnly); + + // set the selection possibly without scrolling the caret into view + void DoSetSelection(long from, long to, bool scrollCaret = true); + + // return true if there is a non empty selection in the control + bool HasSelection() const; + + // get the length of the line containing the character at the given + // position + long GetLengthOfLineContainingPos(long pos) const; + + // send TEXT_UPDATED event, return true if it was handled, false otherwise + bool SendUpdateEvent(); + + // override some base class virtuals + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual wxSize DoGetBestSize() const; + + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + + // if true, SendUpdateEvent() will eat the next event (see comments in the + // code as to why this is needed) + bool m_suppressNextUpdate; + + // all existing wxTextCtrl - this allows to find the one corresponding to + // the given buddy window in GetSpinTextCtrl() + static wxArrayTextSpins ms_allTextSpins; + +protected: + + // the data for the "buddy" list + WXHWND m_hwndBuddy; + WXFARPROC m_wndProcBuddy; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl) + + bool m_isNativeCaretShown; +}; + +#endif // _WX_TEXTCTRLCE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/time.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/time.h new file mode 100644 index 0000000000..d711111c89 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/time.h @@ -0,0 +1,53 @@ + +/* + * time.h + * Missing time functions and structures for use under WinCE + */ + +#ifndef _WX_MSW_WINCE_TIME_H_ +#define _WX_MSW_WINCE_TIME_H_ + +#ifndef _TM_DEFINED + +#define _TM_DEFINED + +struct tm { + int tm_sec; /* seconds after the minute - [0,59] */ + int tm_min; /* minutes after the hour - [0,59] */ + int tm_hour; /* hours since midnight - [0,23] */ + int tm_mday; /* day of the month - [1,31] */ + int tm_mon; /* months since January - [0,11] */ + int tm_year; /* years since 1900 */ + int tm_wday; /* days since Sunday - [0,6] */ + int tm_yday; /* days since January 1 - [0,365] */ + int tm_isdst; /* daylight savings time flag */ + }; + +extern "C" +{ + +time_t __cdecl time(time_t *); + +time_t __cdecl mktime(struct tm *); + +// VC8 CRT provides the other functions +#if !defined(__VISUALC__) || (__VISUALC__ < 1400) + +struct tm * __cdecl localtime(const time_t *); + +struct tm * __cdecl gmtime(const time_t *); + +#define _tcsftime wcsftime + +size_t __cdecl wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *); + +extern long timezone; + +#endif // !VC8 + +} + +#endif // !_TM_DEFINED + +#endif // _WX_MSW_WINCE_TIME_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/wince.rc b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/wince.rc new file mode 100644 index 0000000000..e9c7e28ef7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wince/wince.rc @@ -0,0 +1,15 @@ +#include <commctrl.h> +#include "wx/msw/wince/resources.h" + +#ifdef WIN32_PLATFORM_WFSP + #include "wx/msw/wince/smartphone.rc" +#else // !smartphone + +// Dummy empty menubar/toolbar for WinCE +wxIDM_SHMENU RCDATA DISCARDABLE +BEGIN + wxIDM_SHMENU, + 0 +END + +#endif // smartphone/!smartphone diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/window.h new file mode 100644 index 0000000000..bd793e143b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/window.h @@ -0,0 +1,724 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/window.h +// Purpose: wxWindowMSW class +// Author: Julian Smart +// Modified by: Vadim Zeitlin on 13.05.99: complete refont of message handling, +// elimination of Default(), ... +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WINDOW_H_ +#define _WX_WINDOW_H_ + +#include "wx/settings.h" // solely for wxSystemColour + +// if this is set to 1, we use deferred window sizing to reduce flicker when +// resizing complicated window hierarchies, but this can in theory result in +// different behaviour than the old code so we keep the possibility to use it +// by setting this to 0 (in the future this should be removed completely) +#ifdef __WXWINCE__ + #define wxUSE_DEFERRED_SIZING 0 +#else + #define wxUSE_DEFERRED_SIZING 1 +#endif + +// --------------------------------------------------------------------------- +// wxWindow declaration for MSW +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowMSW : public wxWindowBase +{ + friend class wxSpinCtrl; + friend class wxSlider; + friend class wxRadioBox; +#if defined __VISUALC__ && __VISUALC__ <= 1200 + friend class wxWindowMSW; +#endif +public: + wxWindowMSW() { Init(); } + + wxWindowMSW(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + { + Init(); + Create(parent, id, pos, size, style, name); + } + + virtual ~wxWindowMSW(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + + // implement base class pure virtuals + virtual void SetLabel(const wxString& label); + virtual wxString GetLabel() const; + + virtual void Raise(); + virtual void Lower(); + + virtual bool BeginRepositioningChildren(); + virtual void EndRepositioningChildren(); + + virtual bool Show(bool show = true); + virtual bool ShowWithEffect(wxShowEffect effect, + unsigned timeout = 0) + { + return MSWShowWithEffect(true, effect, timeout); + } + virtual bool HideWithEffect(wxShowEffect effect, + unsigned timeout = 0) + { + return MSWShowWithEffect(false, effect, timeout); + } + + virtual void SetFocus(); + virtual void SetFocusFromKbd(); + + virtual bool Reparent(wxWindowBase *newParent); + + virtual void WarpPointer(int x, int y); + + virtual void Refresh( bool eraseBackground = true, + const wxRect *rect = (const wxRect *) NULL ); + virtual void Update(); + + virtual void SetWindowStyleFlag(long style); + virtual void SetExtraStyle(long exStyle); + virtual bool SetCursor( const wxCursor &cursor ); + virtual bool SetFont( const wxFont &font ); + + virtual int GetCharHeight() const; + virtual int GetCharWidth() const; + + virtual void SetScrollbar( int orient, int pos, int thumbVisible, + int range, bool refresh = true ); + virtual void SetScrollPos( int orient, int pos, bool refresh = true ); + virtual int GetScrollPos( int orient ) const; + virtual int GetScrollThumb( int orient ) const; + virtual int GetScrollRange( int orient ) const; + virtual void ScrollWindow( int dx, int dy, + const wxRect* rect = NULL ); + + virtual bool ScrollLines(int lines); + virtual bool ScrollPages(int pages); + + virtual void SetLayoutDirection(wxLayoutDirection dir); + virtual wxLayoutDirection GetLayoutDirection() const; + virtual wxCoord AdjustForLayoutDirection(wxCoord x, + wxCoord width, + wxCoord widthTotal) const; + +#if wxUSE_DRAG_AND_DROP + virtual void SetDropTarget( wxDropTarget *dropTarget ); +#endif // wxUSE_DRAG_AND_DROP + + // Accept files for dragging + virtual void DragAcceptFiles(bool accept); + +#ifndef __WXUNIVERSAL__ + // Native resource loading (implemented in src/msw/nativdlg.cpp) + // FIXME: should they really be all virtual? + virtual bool LoadNativeDialog(wxWindow* parent, wxWindowID& id); + virtual bool LoadNativeDialog(wxWindow* parent, const wxString& name); + wxWindow* GetWindowChild1(wxWindowID id); + wxWindow* GetWindowChild(wxWindowID id); +#endif // __WXUNIVERSAL__ + +#if wxUSE_HOTKEY + // install and deinstall a system wide hotkey + virtual bool RegisterHotKey(int hotkeyId, int modifiers, int keycode); + virtual bool UnregisterHotKey(int hotkeyId); +#endif // wxUSE_HOTKEY + +#ifdef __POCKETPC__ + bool IsContextMenuEnabled() const { return m_contextMenuEnabled; } + void EnableContextMenu(bool enable = true) { m_contextMenuEnabled = enable; } +#endif + + // window handle stuff + // ------------------- + + WXHWND GetHWND() const { return m_hWnd; } + void SetHWND(WXHWND hWnd) { m_hWnd = hWnd; } + virtual WXWidget GetHandle() const { return GetHWND(); } + + void AssociateHandle(WXWidget handle); + void DissociateHandle(); + + // does this window have deferred position and/or size? + bool IsSizeDeferred() const; + + // these functions allow to register a global handler for the given Windows + // message: it will be called from MSWWindowProc() of any window which gets + // this event if it's not processed before (i.e. unlike a hook procedure it + // does not override the normal processing) + // + // notice that if you want to process a message for a given window only you + // should override its MSWWindowProc() instead + + // type of the handler: it is called with the message parameters (except + // that the window object is passed instead of window handle) and should + // return true if it handled the message or false if it should be passed to + // DefWindowProc() + typedef bool (*MSWMessageHandler)(wxWindowMSW *win, + WXUINT nMsg, + WXWPARAM wParam, + WXLPARAM lParam); + + // install a handler, shouldn't be called more than one for the same message + static bool MSWRegisterMessageHandler(int msg, MSWMessageHandler handler); + + // unregister a previously registered handler + static void MSWUnregisterMessageHandler(int msg, MSWMessageHandler handler); + + + // implementation from now on + // ========================== + + // event handlers + // -------------- + + void OnPaint(wxPaintEvent& event); +#ifdef __WXWINCE__ + void OnInitDialog(wxInitDialogEvent& event); +#endif + +public: + // Windows subclassing + void SubclassWin(WXHWND hWnd); + void UnsubclassWin(); + + WXFARPROC MSWGetOldWndProc() const { return m_oldWndProc; } + void MSWSetOldWndProc(WXFARPROC proc) { m_oldWndProc = proc; } + + // return true if the window is of a standard (i.e. not wxWidgets') class + // + // to understand why does it work, look at SubclassWin() code and comments + bool IsOfStandardClass() const { return m_oldWndProc != NULL; } + + wxWindow *FindItem(long id, WXHWND hWnd = NULL) const; + wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const; + + // MSW only: true if this control is part of the main control + virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return false; } + +#if wxUSE_TOOLTIPS + // MSW only: true if this window or any of its children have a tooltip + virtual bool HasToolTips() const { return GetToolTip() != NULL; } +#endif // wxUSE_TOOLTIPS + + // translate wxWidgets style flags for this control into the Windows style + // and optional extended style for the corresponding native control + // + // this is the function that should be overridden in the derived classes, + // but you will mostly use MSWGetCreateWindowFlags() below + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const ; + + // get the MSW window flags corresponding to wxWidgets ones + // + // the functions returns the flags (WS_XXX) directly and puts the ext + // (WS_EX_XXX) flags into the provided pointer if not NULL + WXDWORD MSWGetCreateWindowFlags(WXDWORD *exflags = NULL) const + { return MSWGetStyle(GetWindowStyle(), exflags); } + + // update the real underlying window style flags to correspond to the + // current wxWindow object style (safe to call even if window isn't fully + // created yet) + void MSWUpdateStyle(long flagsOld, long exflagsOld); + + // get the HWND to be used as parent of this window with CreateWindow() + virtual WXHWND MSWGetParent() const; + + // get the Win32 window class name used by all wxWindow objects by default + static const wxChar *MSWGetRegisteredClassName(); + + // creates the window of specified Windows class with given style, extended + // style, title and geometry (default values + // + // returns true if the window has been created, false if creation failed + bool MSWCreate(const wxChar *wclass, + const wxChar *title = NULL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + WXDWORD style = 0, + WXDWORD exendedStyle = 0); + + virtual bool MSWCommand(WXUINT param, WXWORD id); + +#ifndef __WXUNIVERSAL__ + // Create an appropriate wxWindow from a HWND + virtual wxWindow* CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd); + + // Make sure the window style reflects the HWND style (roughly) + virtual void AdoptAttributesFromHWND(); +#endif // __WXUNIVERSAL__ + + // Setup background and foreground colours correctly + virtual void SetupColours(); + + // ------------------------------------------------------------------------ + // helpers for message handlers: these perform the same function as the + // message crackers from <windowsx.h> - they unpack WPARAM and LPARAM into + // the correct parameters + // ------------------------------------------------------------------------ + + void UnpackCommand(WXWPARAM wParam, WXLPARAM lParam, + WXWORD *id, WXHWND *hwnd, WXWORD *cmd); + void UnpackActivate(WXWPARAM wParam, WXLPARAM lParam, + WXWORD *state, WXWORD *minimized, WXHWND *hwnd); + void UnpackScroll(WXWPARAM wParam, WXLPARAM lParam, + WXWORD *code, WXWORD *pos, WXHWND *hwnd); + void UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam, + WXHDC *hdc, WXHWND *hwnd); + void UnpackMenuSelect(WXWPARAM wParam, WXLPARAM lParam, + WXWORD *item, WXWORD *flags, WXHMENU *hmenu); + + // ------------------------------------------------------------------------ + // internal handlers for MSW messages: all handlers return a boolean value: + // true means that the handler processed the event and false that it didn't + // ------------------------------------------------------------------------ + + // there are several cases where we have virtual functions for Windows + // message processing: this is because these messages often require to be + // processed in a different manner in the derived classes. For all other + // messages, however, we do *not* have corresponding MSWOnXXX() function + // and if the derived class wants to process them, it should override + // MSWWindowProc() directly. + + // scroll event (both horizontal and vertical) + virtual bool MSWOnScroll(int orientation, WXWORD nSBCode, + WXWORD pos, WXHWND control); + + // child control notifications + virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + + // owner-drawn controls need to process these messages + virtual bool MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *item); + virtual bool MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *item); + + // the rest are not virtual + bool HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate); + bool HandleInitDialog(WXHWND hWndFocus); + bool HandleDestroy(); + + bool HandlePaint(); + bool HandlePrintClient(WXHDC hDC); + bool HandleEraseBkgnd(WXHDC hDC); + + bool HandleMinimize(); + bool HandleMaximize(); + bool HandleSize(int x, int y, WXUINT flag); + bool HandleSizing(wxRect& rect); + bool HandleGetMinMaxInfo(void *mmInfo); + bool HandleEnterSizeMove(); + bool HandleExitSizeMove(); + + bool HandleShow(bool show, int status); + bool HandleActivate(int flag, bool minimized, WXHWND activate); + + bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control); + + bool HandleCtlColor(WXHBRUSH *hBrush, WXHDC hdc, WXHWND hWnd); + + bool HandlePaletteChanged(WXHWND hWndPalChange); + bool HandleQueryNewPalette(); + bool HandleSysColorChange(); + bool HandleDisplayChange(); + bool HandleCaptureChanged(WXHWND gainedCapture); + virtual bool HandleSettingChange(WXWPARAM wParam, WXLPARAM lParam); + + bool HandleQueryEndSession(long logOff, bool *mayEnd); + bool HandleEndSession(bool endSession, long logOff); + + bool HandleSetFocus(WXHWND wnd); + bool HandleKillFocus(WXHWND wnd); + + bool HandleDropFiles(WXWPARAM wParam); + + bool HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags); + bool HandleMouseMove(int x, int y, WXUINT flags); + bool HandleMouseWheel(wxMouseWheelAxis axis, + WXWPARAM wParam, WXLPARAM lParam); + + bool HandleChar(WXWPARAM wParam, WXLPARAM lParam); + bool HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam); + bool HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam); +#if wxUSE_HOTKEY + bool HandleHotKey(WXWPARAM wParam, WXLPARAM lParam); +#endif +#ifdef __WIN32__ + int HandleMenuChar(int chAccel, WXLPARAM lParam); +#endif + // Create and process a clipboard event specified by type. + bool HandleClipboardEvent( WXUINT nMsg ); + + bool HandleQueryDragIcon(WXHICON *hIcon); + + bool HandleSetCursor(WXHWND hWnd, short nHitTest, int mouseMsg); + + bool HandlePower(WXWPARAM wParam, WXLPARAM lParam, bool *vetoed); + + + // The main body of common window proc for all wxWindow objects. It tries + // to handle the given message and returns true if it was handled (the + // appropriate return value is then put in result, which must be non-NULL) + // or false if it wasn't. + // + // This function should be overridden in any new code instead of + // MSWWindowProc() even if currently most of the code overrides + // MSWWindowProc() as it had been written before this function was added. + virtual bool MSWHandleMessage(WXLRESULT *result, + WXUINT message, + WXWPARAM wParam, + WXLPARAM lParam); + + // Common Window procedure for all wxWindow objects: forwards to + // MSWHandleMessage() and MSWDefWindowProc() if the message wasn't handled. + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + + // Calls an appropriate default window procedure + virtual WXLRESULT MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + + // message processing helpers + + // return false if the message shouldn't be translated/preprocessed but + // dispatched normally + virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg); + + // return true if the message was preprocessed and shouldn't be dispatched + virtual bool MSWProcessMessage(WXMSG* pMsg); + + // return true if the message was translated and shouldn't be dispatched + virtual bool MSWTranslateMessage(WXMSG* pMsg); + + // called when the window is about to be destroyed + virtual void MSWDestroyWindow(); + + + // Functions dealing with painting the window background. The derived + // classes should normally only need to reimplement MSWGetBgBrush() if they + // need to use a non-solid brush for erasing their background. This + // function is called by MSWGetBgBrushForChild() which only exists for the + // weird wxToolBar case and MSWGetBgBrushForChild() itself is used by + // MSWGetBgBrush() to actually find the right brush to use. + + // Adjust the origin for the brush returned by MSWGetBgBrushForChild(). + // + // This needs to be overridden for scrolled windows to ensure that the + // scrolling of their associated DC is taken into account. + // + // Both parameters must be non-NULL. + virtual void MSWAdjustBrushOrg(int* WXUNUSED(xOrg), + int* WXUNUSED(yOrg)) const + { + } + + // The brush returned from here must remain valid at least until the next + // event loop iteration. Returning 0, as is done by default, indicates + // there is no custom background brush. + virtual WXHBRUSH MSWGetCustomBgBrush() { return 0; } + + // this function should return the brush to paint the children controls + // background or 0 if this window doesn't impose any particular background + // on its children + // + // the hDC parameter is the DC background will be drawn on, it can be used + // to call SetBrushOrgEx() on it if the returned brush is a bitmap one + // + // child parameter is never NULL, it can be this window itself or one of + // its (grand)children + // + // the base class version returns a solid brush if we have a non default + // background colour or 0 otherwise + virtual WXHBRUSH MSWGetBgBrushForChild(WXHDC hDC, wxWindowMSW *child); + + // return the background brush to use for painting the given window by + // querying the parent windows via MSWGetBgBrushForChild() recursively + WXHBRUSH MSWGetBgBrush(WXHDC hDC); + + enum MSWThemeColour + { + ThemeColourText = 0, + ThemeColourBackground, + ThemeColourBorder + }; + + // returns a specific theme colour, or if that is not possible then + // wxSystemSettings::GetColour(fallback) + wxColour MSWGetThemeColour(const wchar_t *themeName, + int themePart, + int themeState, + MSWThemeColour themeColour, + wxSystemColour fallback) const; + + // gives the parent the possibility to draw its children background, e.g. + // this is used by wxNotebook to do it using DrawThemeBackground() + // + // return true if background was drawn, false otherwise + virtual bool MSWPrintChild(WXHDC WXUNUSED(hDC), wxWindow * WXUNUSED(child)) + { + return false; + } + + // some controls (e.g. wxListBox) need to set the return value themselves + // + // return true to let parent handle it if we don't, false otherwise + virtual bool MSWShouldPropagatePrintChild() + { + return true; + } + + // This should be overridden to return true for the controls which have + // themed background that should through their children. Currently only + // wxNotebook uses this. + // + // The base class version already returns true if we have a solid + // background colour that should be propagated to our children. + virtual bool MSWHasInheritableBackground() const + { + return InheritsBackgroundColour(); + } + +#if !defined(__WXWINCE__) && !defined(__WXUNIVERSAL__) + #define wxHAS_MSW_BACKGROUND_ERASE_HOOK +#endif + +#ifdef wxHAS_MSW_BACKGROUND_ERASE_HOOK + // allows the child to hook into its parent WM_ERASEBKGND processing: call + // MSWSetEraseBgHook() with a non-NULL window to make parent call + // MSWEraseBgHook() on this window (don't forget to reset it to NULL + // afterwards) + // + // this hack is used by wxToolBar, see comments there + void MSWSetEraseBgHook(wxWindow *child); + + // return true if WM_ERASEBKGND is currently hooked + bool MSWHasEraseBgHook() const; + + // called when the window on which MSWSetEraseBgHook() had been called + // receives WM_ERASEBKGND + virtual bool MSWEraseBgHook(WXHDC WXUNUSED(hDC)) { return false; } +#endif // wxHAS_MSW_BACKGROUND_ERASE_HOOK + + // common part of Show/HideWithEffect() + bool MSWShowWithEffect(bool show, + wxShowEffect effect, + unsigned timeout); + + // Responds to colour changes: passes event on to children. + void OnSysColourChanged(wxSysColourChangedEvent& event); + + // initialize various fields of wxMouseEvent (common part of MSWOnMouseXXX) + void InitMouseEvent(wxMouseEvent& event, int x, int y, WXUINT flags); + + // check if mouse is in the window + bool IsMouseInWindow() const; + + // check if a native double-buffering applies for this window + virtual bool IsDoubleBuffered() const; + + void SetDoubleBuffered(bool on); + + // synthesize a wxEVT_LEAVE_WINDOW event and set m_mouseInWindow to false + void GenerateMouseLeave(); + + // virtual function for implementing internal idle + // behaviour + virtual void OnInternalIdle(); + +protected: + // this allows you to implement standard control borders without + // repeating the code in different classes that are not derived from + // wxControl + virtual wxBorder GetDefaultBorderForControl() const; + + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const; + + // Translate wxBORDER_THEME (and other border styles if necessary to the value + // that makes most sense for this Windows environment + virtual wxBorder TranslateBorder(wxBorder border) const; + +#if wxUSE_MENUS_NATIVE + virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); +#endif // wxUSE_MENUS_NATIVE + + // the window handle + WXHWND m_hWnd; + + // the old window proc (we subclass all windows) + WXFARPROC m_oldWndProc; + + // additional (MSW specific) flags + bool m_mouseInWindow:1; + bool m_lastKeydownProcessed:1; + + // the size of one page for scrolling + int m_xThumbSize; + int m_yThumbSize; + + // implement the base class pure virtuals + virtual void DoGetTextExtent(const wxString& string, + int *x, int *y, + int *descent = NULL, + int *externalLeading = NULL, + const wxFont *font = NULL) const; + virtual void DoClientToScreen( int *x, int *y ) const; + virtual void DoScreenToClient( int *x, int *y ) const; + virtual void DoGetPosition( int *x, int *y ) const; + virtual void DoGetSize( int *width, int *height ) const; + virtual void DoGetClientSize( int *width, int *height ) const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoSetClientSize(int width, int height); + + virtual wxSize DoGetBorderSize() const; + + virtual void DoCaptureMouse(); + virtual void DoReleaseMouse(); + + virtual void DoEnable(bool enable); + + virtual void DoFreeze(); + virtual void DoThaw(); + + // this simply moves/resizes the given HWND which is supposed to be our + // sibling (this is useful for controls which are composite at MSW level + // and for which DoMoveWindow() is not enough) + // + // returns true if the window move was deferred, false if it was moved + // immediately (no error return) + bool DoMoveSibling(WXHWND hwnd, int x, int y, int width, int height); + + // move the window to the specified location and resize it: this is called + // from both DoSetSize() and DoSetClientSize() and would usually just call + // ::MoveWindow() except for composite controls which will want to arrange + // themselves inside the given rectangle + virtual void DoMoveWindow(int x, int y, int width, int height); + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip( wxToolTip *tip ); + + // process TTN_NEEDTEXT message properly (i.e. fixing the bugs in + // comctl32.dll in our code -- see the function body for more info) + bool HandleTooltipNotify(WXUINT code, + WXLPARAM lParam, + const wxString& ttip); +#endif // wxUSE_TOOLTIPS + + // This is used by CreateKeyEvent() and also for wxEVT_CHAR[_HOOK] event + // creation. Notice that this method doesn't initialize wxKeyEvent + // m_keyCode and m_uniChar fields. + void InitAnyKeyEvent(wxKeyEvent& event, + WXWPARAM wParam, + WXLPARAM lParam) const; + + // Helper functions used by HandleKeyXXX() methods and some derived + // classes, wParam and lParam have the same meaning as in WM_KEY{DOWN,UP}. + // + // NB: evType here must be wxEVT_KEY_{DOWN,UP} as wParam here contains the + // virtual key code, not character! + wxKeyEvent CreateKeyEvent(wxEventType evType, + WXWPARAM wParam, + WXLPARAM lParam = 0) const; + + // Another helper for creating wxKeyEvent for wxEVT_CHAR and related types. + // + // The wParam and lParam here must come from WM_CHAR event parameters, i.e. + // wParam must be a character and not a virtual code. + wxKeyEvent CreateCharEvent(wxEventType evType, + WXWPARAM wParam, + WXLPARAM lParam) const; + + + // default OnEraseBackground() implementation, return true if we did erase + // the background, false otherwise (i.e. the system should erase it) + bool DoEraseBackground(WXHDC hDC); + + // generate WM_CHANGEUISTATE if it's needed for the OS we're running under + // + // action should be one of the UIS_XXX constants + // state should be one or more of the UISF_XXX constants + // if action == UIS_INITIALIZE then it doesn't seem to matter what we use + // for state as the system will decide for us what needs to be set + void MSWUpdateUIState(int action, int state = 0); + + // translate wxWidgets coords into Windows ones suitable to be passed to + // ::CreateWindow(), called from MSWCreate() + virtual void MSWGetCreateWindowCoords(const wxPoint& pos, + const wxSize& size, + int& x, int& y, + int& w, int& h) const; + + bool MSWEnableHWND(WXHWND hWnd, bool enable); + + // Return the pointer to this window or one of its sub-controls if this ID + // and HWND combination belongs to one of them. + // + // This is used by FindItem() and is overridden in wxControl, see there. + virtual wxWindow* MSWFindItem(long WXUNUSED(id), WXHWND WXUNUSED(hWnd)) const + { + return NULL; + } + +private: + // common part of all ctors + void Init(); + + // the (non-virtual) handlers for the events + bool HandleMove(int x, int y); + bool HandleMoving(wxRect& rect); + bool HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags); + bool HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + +#if wxUSE_DEFERRED_SIZING +protected: + // this function is called after the window was resized to its new size + virtual void MSWEndDeferWindowPos() + { + m_pendingPosition = wxDefaultPosition; + m_pendingSize = wxDefaultSize; + } + + // current defer window position operation handle (may be NULL) + WXHANDLE m_hDWP; + + // When deferred positioning is done these hold the pending changes, and + // are used for the default values if another size/pos changes is done on + // this window before the group of deferred changes is completed. + wxPoint m_pendingPosition; + wxSize m_pendingSize; +#endif // wxUSE_DEFERRED_SIZING + +private: +#ifdef __POCKETPC__ + bool m_contextMenuEnabled; +#endif + + DECLARE_DYNAMIC_CLASS(wxWindowMSW) + wxDECLARE_NO_COPY_CLASS(wxWindowMSW); + DECLARE_EVENT_TABLE() +}; + +// window creation helper class: before creating a new HWND, instantiate an +// object of this class on stack - this allows to process the messages sent to +// the window even before CreateWindow() returns +class wxWindowCreationHook +{ +public: + wxWindowCreationHook(wxWindowMSW *winBeingCreated); + ~wxWindowCreationHook(); +}; + +#endif // _WX_WINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/winundef.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/winundef.h new file mode 100644 index 0000000000..af44c49aea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/winundef.h @@ -0,0 +1,483 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: winundef.h +// Purpose: undefine the common symbols #define'd by <windows.h> +// Author: Vadim Zeitlin +// Modified by: +// Created: 16.05.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* THIS SHOULD NOT BE USED since you might include it once e.g. in window.h, + * then again _AFTER_ you've included windows.h, in which case it won't work + * a 2nd time -- JACS +#ifndef _WX_WINUNDEF_H_ +#define _WX_WINUNDEF_H_ + */ + +// ---------------------------------------------------------------------------- +// windows.h #defines the following identifiers which are also used in wxWin so +// we replace these symbols with the corresponding inline functions and +// undefine the macro. +// +// This looks quite ugly here but allows us to write clear (and correct!) code +// elsewhere because the functions, unlike the macros, respect the scope. +// ---------------------------------------------------------------------------- + +// CreateDialog + +#if defined(CreateDialog) + #undef CreateDialog + + inline HWND CreateDialog(HINSTANCE hInstance, + LPCTSTR pTemplate, + HWND hwndParent, + DLGPROC pDlgProc) + { + #ifdef _UNICODE + return CreateDialogW(hInstance, pTemplate, hwndParent, pDlgProc); + #else + return CreateDialogA(hInstance, pTemplate, hwndParent, pDlgProc); + #endif + } +#endif + +// CreateFont + +#ifdef CreateFont + #undef CreateFont + + inline HFONT CreateFont(int height, + int width, + int escapement, + int orientation, + int weight, + DWORD italic, + DWORD underline, + DWORD strikeout, + DWORD charset, + DWORD outprecision, + DWORD clipprecision, + DWORD quality, + DWORD family, + LPCTSTR facename) + { + #ifdef _UNICODE + return CreateFontW(height, width, escapement, orientation, + weight, italic, underline, strikeout, charset, + outprecision, clipprecision, quality, + family, facename); + #else + return CreateFontA(height, width, escapement, orientation, + weight, italic, underline, strikeout, charset, + outprecision, clipprecision, quality, + family, facename); + #endif + } +#endif // CreateFont + +// CreateWindow + +#if defined(CreateWindow) + #undef CreateWindow + + inline HWND CreateWindow(LPCTSTR lpClassName, + LPCTSTR lpWndClass, + DWORD dwStyle, + int x, int y, int w, int h, + HWND hWndParent, + HMENU hMenu, + HINSTANCE hInstance, + LPVOID lpParam) + { + #ifdef _UNICODE + return CreateWindowW(lpClassName, lpWndClass, dwStyle, x, y, w, h, + hWndParent, hMenu, hInstance, lpParam); + #else + return CreateWindowA(lpClassName, lpWndClass, dwStyle, x, y, w, h, + hWndParent, hMenu, hInstance, lpParam); + #endif + } +#endif + +// LoadMenu + +#ifdef LoadMenu + #undef LoadMenu + + inline HMENU LoadMenu(HINSTANCE instance, LPCTSTR name) + { + #ifdef _UNICODE + return LoadMenuW(instance, name); + #else + return LoadMenuA(instance, name); + #endif + } +#endif + +// FindText + +#ifdef FindText + #undef FindText + + inline HWND APIENTRY FindText(LPFINDREPLACE lpfindreplace) + { + #ifdef _UNICODE + return FindTextW(lpfindreplace); + #else + return FindTextA(lpfindreplace); + #endif + } +#endif + +// GetCharWidth + +#ifdef GetCharWidth + #undef GetCharWidth + inline BOOL GetCharWidth(HDC dc, UINT first, UINT last, LPINT buffer) + { + #ifdef _UNICODE + return GetCharWidthW(dc, first, last, buffer); + #else + return GetCharWidthA(dc, first, last, buffer); + #endif + } +#endif + +// FindWindow + +#ifdef FindWindow + #undef FindWindow + #ifdef _UNICODE + inline HWND FindWindow(LPCWSTR classname, LPCWSTR windowname) + { + return FindWindowW(classname, windowname); + } + #else + inline HWND FindWindow(LPCSTR classname, LPCSTR windowname) + { + return FindWindowA(classname, windowname); + } + #endif +#endif + +// PlaySound + +#ifdef PlaySound + #undef PlaySound + #ifdef _UNICODE + inline BOOL PlaySound(LPCWSTR pszSound, HMODULE hMod, DWORD fdwSound) + { + return PlaySoundW(pszSound, hMod, fdwSound); + } + #else + inline BOOL PlaySound(LPCSTR pszSound, HMODULE hMod, DWORD fdwSound) + { + return PlaySoundA(pszSound, hMod, fdwSound); + } + #endif +#endif + +// GetClassName + +#ifdef GetClassName + #undef GetClassName + #ifdef _UNICODE + inline int GetClassName(HWND h, LPWSTR classname, int maxcount) + { + return GetClassNameW(h, classname, maxcount); + } + #else + inline int GetClassName(HWND h, LPSTR classname, int maxcount) + { + return GetClassNameA(h, classname, maxcount); + } + #endif +#endif + +// GetClassInfo + +#ifdef GetClassInfo + #undef GetClassInfo + #ifdef _UNICODE + inline BOOL GetClassInfo(HINSTANCE h, LPCWSTR name, LPWNDCLASSW winclass) + { + return GetClassInfoW(h, name, winclass); + } + #else + inline BOOL GetClassInfo(HINSTANCE h, LPCSTR name, LPWNDCLASSA winclass) + { + return GetClassInfoA(h, name, winclass); + } + #endif +#endif + +// LoadAccelerators + +#ifdef LoadAccelerators + #undef LoadAccelerators + #ifdef _UNICODE + inline HACCEL LoadAccelerators(HINSTANCE h, LPCWSTR name) + { + return LoadAcceleratorsW(h, name); + } + #else + inline HACCEL LoadAccelerators(HINSTANCE h, LPCSTR name) + { + return LoadAcceleratorsA(h, name); + } + #endif +#endif + +// DrawText + +#ifdef DrawText + #undef DrawText + #ifdef _UNICODE + inline int DrawText(HDC h, LPCWSTR str, int count, LPRECT rect, UINT format) + { + return DrawTextW(h, str, count, rect, format); + } + #else + inline int DrawText(HDC h, LPCSTR str, int count, LPRECT rect, UINT format) + { + return DrawTextA(h, str, count, rect, format); + } + #endif +#endif + + +// StartDoc + +#ifdef StartDoc + #undef StartDoc + + // Work around a bug in very old MinGW headers that didn't define DOCINFOW + // and DOCINFOA but only DOCINFO in both ANSI and Unicode. + #if defined( __GNUG__ ) + #if !wxCHECK_W32API_VERSION( 0, 5 ) + #define DOCINFOW DOCINFO + #define DOCINFOA DOCINFO + #endif + #endif + + #ifdef _UNICODE + inline int StartDoc(HDC h, CONST DOCINFOW* info) + { + return StartDocW(h, (DOCINFOW*) info); + } + #else + inline int StartDoc(HDC h, CONST DOCINFOA* info) + { + return StartDocA(h, (DOCINFOA*) info); + } + #endif +#endif + +// GetObject + +#ifdef GetObject + #undef GetObject + inline int GetObject(HGDIOBJ h, int i, LPVOID buffer) + { + #ifdef _UNICODE + return GetObjectW(h, i, buffer); + #else + return GetObjectA(h, i, buffer); + #endif + } +#endif + +// GetMessage + +#ifdef GetMessage + #undef GetMessage + inline int GetMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax) + { + #ifdef _UNICODE + return GetMessageW(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax); + #else + return GetMessageA(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax); + #endif + } +#endif + +// LoadIcon +#ifdef LoadIcon + #undef LoadIcon + inline HICON LoadIcon(HINSTANCE hInstance, LPCTSTR lpIconName) + { + #ifdef _UNICODE + return LoadIconW(hInstance, lpIconName); + #else // ANSI + return LoadIconA(hInstance, lpIconName); + #endif // Unicode/ANSI + } +#endif // LoadIcon + +// LoadBitmap +#ifdef LoadBitmap + #undef LoadBitmap + inline HBITMAP LoadBitmap(HINSTANCE hInstance, LPCTSTR lpBitmapName) + { + #ifdef _UNICODE + return LoadBitmapW(hInstance, lpBitmapName); + #else // ANSI + return LoadBitmapA(hInstance, lpBitmapName); + #endif // Unicode/ANSI + } +#endif // LoadBitmap + +// LoadLibrary + +#ifdef LoadLibrary + #undef LoadLibrary + #ifdef _UNICODE + inline HINSTANCE LoadLibrary(LPCWSTR lpLibFileName) + { + return LoadLibraryW(lpLibFileName); + } + #else + inline HINSTANCE LoadLibrary(LPCSTR lpLibFileName) + { + return LoadLibraryA(lpLibFileName); + } + #endif +#endif + +// FindResource +#ifdef FindResource + #undef FindResource + #ifdef _UNICODE + inline HRSRC FindResource(HMODULE hModule, LPCWSTR lpName, LPCWSTR lpType) + { + return FindResourceW(hModule, lpName, lpType); + } + #else + inline HRSRC FindResource(HMODULE hModule, LPCSTR lpName, LPCSTR lpType) + { + return FindResourceA(hModule, lpName, lpType); + } + #endif +#endif + +// IsMaximized + +#ifdef IsMaximized + #undef IsMaximized + inline BOOL IsMaximized(HWND WXUNUSED_IN_WINCE(hwnd)) + { +#ifdef __WXWINCE__ + return FALSE; +#else + return IsZoomed(hwnd); +#endif + } +#endif + +// GetFirstChild + +#ifdef GetFirstChild + #undef GetFirstChild + inline HWND GetFirstChild(HWND WXUNUSED_IN_WINCE(hwnd)) + { +#ifdef __WXWINCE__ + return 0; +#else + return GetTopWindow(hwnd); +#endif + } +#endif + +// GetFirstSibling + +#ifdef GetFirstSibling + #undef GetFirstSibling + inline HWND GetFirstSibling(HWND hwnd) + { + return GetWindow(hwnd,GW_HWNDFIRST); + } +#endif + +// GetLastSibling + +#ifdef GetLastSibling + #undef GetLastSibling + inline HWND GetLastSibling(HWND hwnd) + { + return GetWindow(hwnd,GW_HWNDLAST); + } +#endif + +// GetPrevSibling + +#ifdef GetPrevSibling + #undef GetPrevSibling + inline HWND GetPrevSibling(HWND hwnd) + { + return GetWindow(hwnd,GW_HWNDPREV); + } +#endif + +// GetNextSibling + +#ifdef GetNextSibling + #undef GetNextSibling + inline HWND GetNextSibling(HWND hwnd) + { + return GetWindow(hwnd,GW_HWNDNEXT); + } +#endif + +// For WINE + +#if defined(GetWindowStyle) + #undef GetWindowStyle +#endif + +// For ming and cygwin + +// GetFirstChild +#ifdef GetFirstChild + #undef GetFirstChild + inline HWND GetFirstChild(HWND h) + { + return GetTopWindow(h); + } +#endif + + +// GetNextSibling +#ifdef GetNextSibling + #undef GetNextSibling + inline HWND GetNextSibling(HWND h) + { + return GetWindow(h, GW_HWNDNEXT); + } +#endif + + +#ifdef Yield + #undef Yield +#endif + + +#if defined(__WXWINCE__) && defined(DrawIcon) //#ifdef DrawIcon + #undef DrawIcon + inline BOOL DrawIcon(HDC hdc, int x, int y, HICON hicon) + { + return DrawIconEx(hdc,x,y,hicon,0,0,0,NULL, DI_NORMAL) ; + } +#endif + + +// GetWindowProc +//ifdef GetWindowProc +// #undef GetWindowProc +//endif +//ifdef GetNextChild +// #undef GetNextChild +//endif + +// #endif // _WX_WINUNDEF_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapcctl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapcctl.h new file mode 100644 index 0000000000..036e191139 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapcctl.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wrapcctl.h +// Purpose: Wrapper for the standard <commctrl.h> header +// Author: Vadim Zeitlin +// Modified by: +// Created: 03.08.2003 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_WRAPCCTL_H_ +#define _WX_MSW_WRAPCCTL_H_ + +#include "wx/msw/wrapwin.h" + +#include <commctrl.h> + +// define things which might be missing from our commctrl.h +#include "wx/msw/missing.h" + +// Set Unicode format for a common control +inline void wxSetCCUnicodeFormat(HWND WXUNUSED_IN_WINCE(hwnd)) +{ +#ifndef __WXWINCE__ + ::SendMessage(hwnd, CCM_SETUNICODEFORMAT, wxUSE_UNICODE, 0); +#else // !__WXWINCE__ + // here it should be already in Unicode anyhow +#endif // __WXWINCE__/!__WXWINCE__ +} + +#if wxUSE_GUI +// Return the default font for the common controls +// +// this is implemented in msw/settings.cpp +class wxFont; +extern wxFont wxGetCCDefaultFont(); + +// this is just a wrapper for HDITEM which we can't use in the public header +// because we don't want to include commctrl.h (and hence windows.h) from there +struct wxHDITEM : public HDITEM +{ + wxHDITEM() + { + ::ZeroMemory(this, sizeof(*this)); + } +}; + +#endif // wxUSE_GUI + +#endif // _WX_MSW_WRAPCCTL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapcdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapcdlg.h new file mode 100644 index 0000000000..fe663119ec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapcdlg.h @@ -0,0 +1,27 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wrapcdlg.h +// Purpose: Wrapper for the standard <commdlg.h> header +// Author: Wlodzimierz ABX Skiba +// Modified by: +// Created: 22.03.2005 +// Copyright: (c) 2005 Wlodzimierz Skiba +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_WRAPCDLG_H_ +#define _WX_MSW_WRAPCDLG_H_ + +#include "wx/defs.h" + +#include "wx/msw/wrapwin.h" +#include "wx/msw/private.h" +#include "wx/msw/missing.h" + +#if wxUSE_COMMON_DIALOGS && !defined(__SMARTPHONE__) && !defined(__WXMICROWIN__) + #include <commdlg.h> +#endif + +#include "wx/msw/winundef.h" + +#endif // _WX_MSW_WRAPCDLG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapgdip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapgdip.h new file mode 100644 index 0000000000..04d4009a67 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapgdip.h @@ -0,0 +1,31 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wrapgdip.h +// Purpose: wrapper around <gdiplus.h> header +// Author: Vadim Zeitlin +// Created: 2007-03-15 +// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_WRAPGDIP_H_ +#define _WX_MSW_WRAPGDIP_H_ + +#include "wx/msw/wrapwin.h" + +// these macros must be defined before gdiplus.h is included but we explicitly +// prevent windows.h from defining them in wx/msw/wrapwin.h as they conflict +// with standard functions of the same name elsewhere, so we have to pay for it +// by manually redefining them ourselves here +#ifndef max + #define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef min + #define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +#include <gdiplus.h> +using namespace Gdiplus; + +#endif // _WX_MSW_WRAPGDIP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapshl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapshl.h new file mode 100644 index 0000000000..8826a039ba --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapshl.h @@ -0,0 +1,94 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wrapshl.h +// Purpose: wrapper class for stuff from shell32.dll +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-10-19 +// Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_WRAPSHL_H_ +#define _WX_MSW_WRAPSHL_H_ + +#include "wx/msw/wrapwin.h" + +#ifdef __WXWINCE__ + #include <winreg.h> + #include <objbase.h> + #include <shlguid.h> + #include <shellapi.h> +#endif + +#include <shlobj.h> + +#include "wx/msw/winundef.h" + +#include "wx/log.h" + +// ---------------------------------------------------------------------------- +// wxItemIdList implements RAII on top of ITEMIDLIST +// ---------------------------------------------------------------------------- + +class wxItemIdList +{ +public: + // ctor takes ownership of the item and will free it + wxItemIdList(LPITEMIDLIST pidl) + { + m_pidl = pidl; + } + + static void Free(LPITEMIDLIST pidl) + { + if ( pidl ) + { + LPMALLOC pMalloc; + SHGetMalloc(&pMalloc); + if ( pMalloc ) + { + pMalloc->Free(pidl); + pMalloc->Release(); + } + else + { + wxLogLastError(wxT("SHGetMalloc")); + } + } + } + + ~wxItemIdList() + { + Free(m_pidl); + } + + // implicit conversion to LPITEMIDLIST + operator LPITEMIDLIST() const { return m_pidl; } + + // get the corresponding path, returns empty string on error + wxString GetPath() const + { + wxString path; + if ( !SHGetPathFromIDList(m_pidl, wxStringBuffer(path, MAX_PATH)) ) + { + wxLogLastError(wxT("SHGetPathFromIDList")); + } + + return path; + } + +private: + LPITEMIDLIST m_pidl; + + wxDECLARE_NO_COPY_CLASS(wxItemIdList); +}; + +// enable autocompleting filenames in the text control with given HWND +// +// this only works on systems with shlwapi.dll 5.0 or later +// +// implemented in src/msw/utilsgui.cpp +extern bool wxEnableFileNameAutoComplete(HWND hwnd); + +#endif // _WX_MSW_WRAPSHL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapwin.h new file mode 100644 index 0000000000..266179847e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wrapwin.h @@ -0,0 +1,116 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/wrapwin.h +// Purpose: Wrapper around <windows.h>, to be included instead of it +// Author: Vaclav Slavik +// Created: 2003/07/22 +// Copyright: (c) 2003 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WRAPWIN_H_ +#define _WX_WRAPWIN_H_ + +#include "wx/platform.h" + +// strict type checking to detect conversion from HFOO to HBAR at compile-time +#ifndef STRICT + #define STRICT 1 +#endif + +// this macro tells windows.h to not define min() and max() as macros: we need +// this as otherwise they conflict with standard C++ functions +#ifndef NOMINMAX + #define NOMINMAX +#endif // NOMINMAX + + +// before including windows.h, define version macros at (currently) maximal +// values because we do all our checks at run-time anyhow +#ifndef WINVER + // the only exception to the above is MSVC 6 which has a time bomb in its + // headers: they warn against using them with WINVER >= 0x0500 as they + // contain only part of the declarations and they're not always correct, so + // don't define WINVER for it at all as this allows everything to work as + // expected both with standard VC6 headers (which define WINVER as 0x0400 + // by default) and headers from a newer SDK (which may define it as 0x0500) + #if !defined(__VISUALC__) || (__VISUALC__ >= 1300) + #define WINVER 0x0600 + #endif +#endif + +// define _WIN32_WINNT and _WIN32_IE to the highest possible values because we +// always check for the version of installed DLLs at runtime anyway (see +// wxGetWinVersion() and wxApp::GetComCtl32Version()) unless the user really +// doesn't want to use APIs only available on later OS versions and had defined +// them to (presumably lower) values +#ifndef _WIN32_WINNT + #define _WIN32_WINNT 0x0600 +#endif + +#ifndef _WIN32_IE + #define _WIN32_IE 0x0700 +#endif + +/* Deal with clash with __WINDOWS__ include guard */ +#if defined(__WXWINCE__) && defined(__WINDOWS__) +#undef __WINDOWS__ +#endif + +// For IPv6 support, we must include winsock2.h before winsock.h, and +// windows.h include winsock.h so do it before including it +#if wxUSE_IPV6 + #include <winsock2.h> +#endif + +#include <windows.h> + +#if defined(__WXWINCE__) && !defined(__WINDOWS__) +#define __WINDOWS__ +#endif + +// #undef the macros defined in winsows.h which conflict with code elsewhere +#include "wx/msw/winundef.h" + +// Types DWORD_PTR, ULONG_PTR and so on are used for 64-bit compatibility +// in the WINAPI SDK (they are an integral type that is the size of a +// pointer) on MSVC 7 and later. However, they are not available in older +// Platform SDKs, and since they are typedefs and not #defines we simply +// overwrite them if there is a chance that they're not defined +#if (!defined(_MSC_VER) || (_MSC_VER < 1300)) && !defined(__WIN64__) + #define UINT_PTR unsigned int + #define INT_PTR int + #define HANDLE_PTR unsigned long + #define LONG_PTR long + #define ULONG_PTR unsigned long + #define DWORD_PTR unsigned long +#endif // !defined(_MSC_VER) || _MSC_VER < 1300 + +// ---------------------------------------------------------------------------- +// Fix the functions wrongly implemented in unicows.dll +// ---------------------------------------------------------------------------- + +#if wxUSE_UNICODE_MSLU + +#if wxUSE_GUI + +WXDLLIMPEXP_CORE int wxMSLU_DrawStateW(WXHDC dc, WXHBRUSH br, WXFARPROC outputFunc, + WXLPARAM lData, WXWPARAM wData, + int x, int y, int cx, int cy, + unsigned int flags); +#define DrawStateW(dc, br, func, ld, wd, x, y, cx, cy, flags) \ + wxMSLU_DrawStateW((WXHDC)dc,(WXHBRUSH)br,(WXFARPROC)func, \ + ld, wd, x, y, cx, cy, flags) + +WXDLLIMPEXP_CORE int wxMSLU_GetOpenFileNameW(void *ofn); +#define GetOpenFileNameW(ofn) wxMSLU_GetOpenFileNameW((void*)ofn) + +WXDLLIMPEXP_CORE int wxMSLU_GetSaveFileNameW(void *ofn); +#define GetSaveFileNameW(ofn) wxMSLU_GetSaveFileNameW((void*)ofn) + +#endif // wxUSE_GUI + +#endif // wxUSE_UNICODE_MSLU + +#endif // _WX_WRAPWIN_H_ + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wx.manifest b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wx.manifest new file mode 100644 index 0000000000..ecce6f5c3b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wx.manifest @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> +<assemblyIdentity + version="0.64.1.0" + processorArchitecture="x86" + name="Controls" + type="win32" +/> +<description>wxWindows application</description> +<dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="X86" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> +</dependency> +</assembly> diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wx.rc b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wx.rc new file mode 100644 index 0000000000..702861a287 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/msw/wx.rc @@ -0,0 +1,126 @@ +///////////////////////////////////////////////////////////////////////////// +// File: wx.rc +// Purpose: wxWindows resource definitions. ALWAYS include +// this in your application resource file. +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#include <windows.h> + +#if defined(_WIN32_WCE) + #include "wx/msw/wince/wince.rc" +#endif + +#include "wx/msw/rcdefs.h" + +////////////////////////////////////////////////////////////////////////////// +// +// This is the MDI Window menu +// + +wxWindowMenu MENU DISCARDABLE +BEGIN + POPUP "&Window" + BEGIN + MENUITEM "&Cascade", 4002 + MENUITEM "Tile &Horizontally", 4001 + MENUITEM "Tile &Vertically", 4005 + MENUITEM "", -1 + 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_ROLLER CURSOR DISCARDABLE "wx/msw/roller.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_BLANK CURSOR DISCARDABLE "wx/msw/blank.cur" +WXCURSOR_CROSS CURSOR DISCARDABLE "wx/msw/cross.cur" + + +////////////////////////////////////////////////////////////////////////////// +// +// Default Icons +// + +// First wx icon in alphabetical order, so it will be used by Explorer if the +// application doesn't have any icons of its own +wxICON_AAA ICON "wx/msw/std.ico" + +//wxDEFAULT_FRAME ICON "wx/msw/std.ico" +//wxDEFAULT_MDIPARENTFRAME ICON "wx/msw/mdi.ico" +//wxDEFAULT_MDICHILDFRAME ICON "wx/msw/child.ico" + +// Standard small icons +wxICON_SMALL_CLOSED_FOLDER ICON "wx/msw/folder1.ico" +wxICON_SMALL_OPEN_FOLDER ICON "wx/msw/folder2.ico" +wxICON_SMALL_FILE ICON "wx/msw/file1.ico" +wxICON_SMALL_COMPUTER ICON "wx/msw/computer.ico" +wxICON_SMALL_DRIVE ICON "wx/msw/drive.ico" +wxICON_SMALL_CDROM ICON "wx/msw/cdrom.ico" +wxICON_SMALL_FLOPPY ICON "wx/msw/floppy.ico" +wxICON_SMALL_REMOVEABLE ICON "wx/msw/removble.ico" + +////////////////////////////////////////////////////////////////////////////// +// +// Bitmaps +// + +// For wxContextHelpButton +csquery BITMAP "wx/msw/csquery.bmp" + +// For obtaining the RGB values of standard colours +wxBITMAP_STD_COLOURS BITMAP "wx/msw/colours.bmp" + +////////////////////////////////////////////////////////////////////////////// +// +// Include manifest file for common controls library v6 required to use themes. +// +// Predefining wxUSE_NO_MANIFEST as 1 always disables the use of the manifest. +// Otherwise we include it only if wxUSE_RC_MANIFEST is defined as 1. +// + +#if !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0) + +#if defined(wxUSE_RC_MANIFEST) && wxUSE_RC_MANIFEST + +// see "about isolated applications" topic in MSDN +#ifdef ISOLATION_AWARE_ENABLED +#define wxMANIFEST_ID 2 +#else +#define wxMANIFEST_ID 1 +#endif + +#if defined(WX_CPU_AMD64) +wxMANIFEST_ID 24 "wx/msw/amd64.manifest" +#elif defined(WX_CPU_IA64) +wxMANIFEST_ID 24 "wx/msw/ia64.manifest" +#elif defined(WX_CPU_X86) +wxMANIFEST_ID 24 "wx/msw/wx.manifest" +#else +// Notice that if the manifest is included, WX_CPU_XXX constant corresponding +// to the architecture we're compiling for must be defined. This can be done +// either manually in your make/project file or by configuring the resource +// compiler paths to search in $(WXWIN)/lib/$(COMPILER_PREFIX)_lib/mswu[d] +// directory for its include files, as wx/msw/rcdefs.h file in this directory +// is generated during wxWidgets build and contains the correct definition. +#error "One of WX_CPU_XXX constants must be defined. See comment above." +#endif + +#endif // wxUSE_RC_MANIFEST + +#endif // !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0) diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/nativewin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/nativewin.h new file mode 100644 index 0000000000..e0328e9583 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/nativewin.h @@ -0,0 +1,173 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/nativewin.h +// Purpose: classes allowing to wrap a native window handle +// Author: Vadim Zeitlin +// Created: 2008-03-05 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_NATIVEWIN_H_ +#define _WX_NATIVEWIN_H_ + +#include "wx/toplevel.h" + +// this symbol can be tested in the user code to see if the current wx port has +// support for creating wxNativeContainerWindow from native windows +// +// be optimistic by default, we undefine it below if we don't have it finally +#define wxHAS_NATIVE_CONTAINER_WINDOW + +// we define the following typedefs for each of the platform supporting native +// windows wrapping: +// +// - wxNativeContainerWindowHandle is the toolkit-level handle of the native +// window, i.e. HWND/GdkWindow*/NSWindow +// +// - wxNativeContainerWindowId is the lowest level identifier of the native +// window, i.e. HWND/GdkNativeWindow/NSWindow (so it's the same as above for +// all platforms except GTK where we also can work with Window/XID) +// +// later we'll also have +// +// - wxNativeWindowHandle for child windows (which will be wrapped by +// wxNativeWindow<T> class), it is HWND/GtkWidget*/ControlRef +#if defined(__WXMSW__) + #include "wx/msw/wrapwin.h" + + typedef HWND wxNativeContainerWindowId; + typedef HWND wxNativeContainerWindowHandle; +#elif defined(__WXGTK__) + // GdkNativeWindow is guint32 under GDK/X11 and gpointer under GDK/WIN32 + #ifdef __UNIX__ + typedef unsigned long wxNativeContainerWindowId; + #else + typedef void *wxNativeContainerWindowId; + #endif + typedef GdkWindow *wxNativeContainerWindowHandle; +#else + // no support for using native windows under this platform yet + #undef wxHAS_NATIVE_CONTAINER_WINDOW +#endif + +#ifdef wxHAS_NATIVE_CONTAINER_WINDOW + +// ---------------------------------------------------------------------------- +// wxNativeContainerWindow: can be used for creating other wxWindows inside it +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNativeContainerWindow : public wxTopLevelWindow +{ +public: + // default ctor, call Create() later + wxNativeContainerWindow() { } + + // create a window from an existing native window handle + // + // use GetHandle() to check if the creation was successful, it will return + // 0 if the handle was invalid + wxNativeContainerWindow(wxNativeContainerWindowHandle handle) + { + Create(handle); + } + + // same as ctor above but with a return code + bool Create(wxNativeContainerWindowHandle handle); + +#if defined(__WXGTK__) + // this is a convenient ctor for wxGTK applications which can also create + // the objects of this class from the really native window handles and not + // only the GdkWindow objects + // + // wxNativeContainerWindowId is Window (i.e. an XID, i.e. an int) under X11 + // (when GDK_WINDOWING_X11 is defined) or HWND under Win32 + wxNativeContainerWindow(wxNativeContainerWindowId winid) { Create(winid); } + + bool Create(wxNativeContainerWindowId winid); +#endif // wxGTK + + // unlike for the normal windows, dtor will not destroy the native window + // as it normally doesn't belong to us + virtual ~wxNativeContainerWindow(); + + + // provide (trivial) implementation of the base class pure virtuals + virtual void SetTitle(const wxString& WXUNUSED(title)) + { + wxFAIL_MSG( "not implemented for native windows" ); + } + + virtual wxString GetTitle() const + { + wxFAIL_MSG( "not implemented for native windows" ); + + return wxString(); + } + + virtual void Maximize(bool WXUNUSED(maximize) = true) + { + wxFAIL_MSG( "not implemented for native windows" ); + } + + virtual bool IsMaximized() const + { + wxFAIL_MSG( "not implemented for native windows" ); + + return false; + } + + virtual void Iconize(bool WXUNUSED(iconize) = true) + { + wxFAIL_MSG( "not implemented for native windows" ); + } + + virtual bool IsIconized() const + { + // this is called by wxGTK implementation so don't assert + return false; + } + + virtual void Restore() + { + wxFAIL_MSG( "not implemented for native windows" ); + } + + virtual bool ShowFullScreen(bool WXUNUSED(show), + long WXUNUSED(style) = wxFULLSCREEN_ALL) + { + wxFAIL_MSG( "not implemented for native windows" ); + + return false; + } + + virtual bool IsFullScreen() const + { + wxFAIL_MSG( "not implemented for native windows" ); + + return false; + } + +#ifdef __WXMSW__ + virtual bool IsShown() const; +#endif // __WXMSW__ + + // this is an implementation detail: called when the native window is + // destroyed by an outside agency; deletes the C++ object too but can in + // principle be overridden to something else (knowing that the window + // handle of this object and all of its children is invalid any more) + virtual void OnNativeDestroyed(); + +protected: +#ifdef __WXMSW__ + virtual WXLRESULT + MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); +#endif // __WXMSW__ + +private: + wxDECLARE_NO_COPY_CLASS(wxNativeContainerWindow); +}; + +#endif // wxHAS_NATIVE_CONTAINER_WINDOW + +#endif // _WX_NATIVEWIN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/nonownedwnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/nonownedwnd.h new file mode 100644 index 0000000000..7d8709933d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/nonownedwnd.h @@ -0,0 +1,113 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/nonownedwnd.h +// Purpose: declares wxNonTopLevelWindow class +// Author: Vaclav Slavik +// Modified by: +// Created: 2006-12-24 +// Copyright: (c) 2006 TT-Solutions +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_NONOWNEDWND_H_ +#define _WX_NONOWNEDWND_H_ + +#include "wx/window.h" + +// Styles that can be used with any wxNonOwnedWindow: +#define wxFRAME_SHAPED 0x0010 // Create a window that is able to be shaped + +class WXDLLIMPEXP_FWD_CORE wxGraphicsPath; + +// ---------------------------------------------------------------------------- +// wxNonOwnedWindow: a window that is not a child window of another one. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNonOwnedWindowBase : public wxWindow +{ +public: + // Set the shape of the window to the given region. + // Returns true if the platform supports this feature (and the + // operation is successful.) + bool SetShape(const wxRegion& region) + { + // This style is in fact only needed by wxOSX/Carbon so once we don't + // use this port any more, we could get rid of this requirement, but + // for now you must specify wxFRAME_SHAPED for SetShape() to work on + // all platforms. + wxCHECK_MSG + ( + HasFlag(wxFRAME_SHAPED), false, + wxS("Shaped windows must be created with the wxFRAME_SHAPED style.") + ); + + return region.IsEmpty() ? DoClearShape() : DoSetRegionShape(region); + } + +#if wxUSE_GRAPHICS_CONTEXT + // Set the shape using the specified path. + bool SetShape(const wxGraphicsPath& path) + { + wxCHECK_MSG + ( + HasFlag(wxFRAME_SHAPED), false, + wxS("Shaped windows must be created with the wxFRAME_SHAPED style.") + ); + + return DoSetPathShape(path); + } +#endif // wxUSE_GRAPHICS_CONTEXT + + + // Overridden base class methods. + // ------------------------------ + + virtual void AdjustForParentClientOrigin(int& WXUNUSED(x), int& WXUNUSED(y), + int WXUNUSED(sizeFlags) = 0) const + { + // Non owned windows positions don't need to be adjusted for parent + // client area origin so simply do nothing here. + } + + virtual void InheritAttributes() + { + // Non owned windows don't inherit attributes from their parent window + // (if the parent frame is red, it doesn't mean that all dialogs shown + // by it should be red as well), so don't do anything here neither. + } + +protected: + virtual bool DoClearShape() + { + return false; + } + + virtual bool DoSetRegionShape(const wxRegion& WXUNUSED(region)) + { + return false; + } + +#if wxUSE_GRAPHICS_CONTEXT + virtual bool DoSetPathShape(const wxGraphicsPath& WXUNUSED(path)) + { + return false; + } +#endif // wxUSE_GRAPHICS_CONTEXT +}; + +#if defined(__WXDFB__) + #include "wx/dfb/nonownedwnd.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/nonownedwnd.h" +#elif defined(__WXMAC__) + #include "wx/osx/nonownedwnd.h" +#elif defined(__WXMSW__) && !defined(__WXWINCE__) + #include "wx/msw/nonownedwnd.h" +#else + // No special class needed in other ports, they can derive both wxTLW and + // wxPopupWindow directly from wxWindow and don't implement SetShape(). + class wxNonOwnedWindow : public wxNonOwnedWindowBase + { + }; +#endif + +#endif // _WX_NONOWNEDWND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/notebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/notebook.h new file mode 100644 index 0000000000..1535229aa0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/notebook.h @@ -0,0 +1,209 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/notebook.h +// Purpose: wxNotebook interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 01.02.01 +// Copyright: (c) 1996-2000 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_NOTEBOOK_H_BASE_ +#define _WX_NOTEBOOK_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_NOTEBOOK + +#include "wx/bookctrl.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// wxNotebook hit results, use wxBK_HITTEST so other book controls can share them +// if wxUSE_NOTEBOOK is disabled +enum +{ + wxNB_HITTEST_NOWHERE = wxBK_HITTEST_NOWHERE, + wxNB_HITTEST_ONICON = wxBK_HITTEST_ONICON, + wxNB_HITTEST_ONLABEL = wxBK_HITTEST_ONLABEL, + wxNB_HITTEST_ONITEM = wxBK_HITTEST_ONITEM, + wxNB_HITTEST_ONPAGE = wxBK_HITTEST_ONPAGE +}; + +// wxNotebook flags + +// use common book wxBK_* flags for describing alignment +#define wxNB_DEFAULT wxBK_DEFAULT +#define wxNB_TOP wxBK_TOP +#define wxNB_BOTTOM wxBK_BOTTOM +#define wxNB_LEFT wxBK_LEFT +#define wxNB_RIGHT wxBK_RIGHT + +#define wxNB_FIXEDWIDTH 0x0100 +#define wxNB_MULTILINE 0x0200 +#define wxNB_NOPAGETHEME 0x0400 +#define wxNB_FLAT 0x0800 + + +typedef wxWindow wxNotebookPage; // so far, any window can be a page + +extern WXDLLIMPEXP_DATA_CORE(const char) wxNotebookNameStr[]; + +#if wxUSE_EXTENDED_RTTI + +// ---------------------------------------------------------------------------- +// XTI accessor +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxNotebookPageInfo : public wxObject +{ +public: + wxNotebookPageInfo() { m_page = NULL; m_imageId = -1; m_selected = false; } + virtual ~wxNotebookPageInfo() { } + + bool Create(wxNotebookPage *page, + const wxString& text, + bool selected, + int imageId) + { + m_page = page; + m_text = text; + m_selected = selected; + m_imageId = imageId; + return true; + } + + wxNotebookPage* GetPage() const { return m_page; } + wxString GetText() const { return m_text; } + bool GetSelected() const { return m_selected; } + int GetImageId() const { return m_imageId; } + +private: + wxNotebookPage *m_page; + wxString m_text; + bool m_selected; + int m_imageId; + + DECLARE_DYNAMIC_CLASS(wxNotebookPageInfo) +}; + +WX_DECLARE_EXPORTED_LIST(wxNotebookPageInfo, wxNotebookPageInfoList ); + +#endif + +// ---------------------------------------------------------------------------- +// wxNotebookBase: define wxNotebook interface +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNotebookBase : public wxBookCtrlBase +{ +public: + // ctors + // ----- + + wxNotebookBase() { } + + // wxNotebook-specific additions to wxBookCtrlBase interface + // --------------------------------------------------------- + + // get the number of rows for a control with wxNB_MULTILINE style (not all + // versions support it - they will always return 1 then) + virtual int GetRowCount() const { return 1; } + + // set the padding between tabs (in pixels) + virtual void SetPadding(const wxSize& padding) = 0; + + // set the size of the tabs for wxNB_FIXEDWIDTH controls + virtual void SetTabSize(const wxSize& sz) = 0; + + + + // implement some base class functions + virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; + + // On platforms that support it, get the theme page background colour, else invalid colour + virtual wxColour GetThemeBackgroundColour() const { return wxNullColour; } + + + // send wxEVT_NOTEBOOK_PAGE_CHANGING/ED events + + // returns false if the change to nPage is vetoed by the program + bool SendPageChangingEvent(int nPage); + + // sends the event about page change from old to new (or GetSelection() if + // new is wxNOT_FOUND) + void SendPageChangedEvent(int nPageOld, int nPageNew = wxNOT_FOUND); + + // wxBookCtrlBase overrides this method to return false but we do need + // focus because we have tabs + virtual bool AcceptsFocus() const { return wxControl::AcceptsFocus(); } + +#if wxUSE_EXTENDED_RTTI + // XTI accessors + virtual void AddPageInfo( wxNotebookPageInfo* info ); + virtual const wxNotebookPageInfoList& GetPageInfos() const; +#endif + +protected: +#if wxUSE_EXTENDED_RTTI + wxNotebookPageInfoList m_pageInfos; +#endif + wxDECLARE_NO_COPY_CLASS(wxNotebookBase); +}; + +// ---------------------------------------------------------------------------- +// notebook event class and related stuff +// ---------------------------------------------------------------------------- + +// wxNotebookEvent is obsolete and defined for compatibility only (notice that +// we use #define and not typedef to also keep compatibility with the existing +// code which forward declares it) +#define wxNotebookEvent wxBookCtrlEvent +typedef wxBookCtrlEventFunction wxNotebookEventFunction; +#define wxNotebookEventHandler(func) wxBookCtrlEventHandler(func) + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_NOTEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_NOTEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); + +#define EVT_NOTEBOOK_PAGE_CHANGED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_NOTEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + +#define EVT_NOTEBOOK_PAGE_CHANGING(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_NOTEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + +// ---------------------------------------------------------------------------- +// wxNotebook class itself +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/notebook.h" +#elif defined(__WXMSW__) + #include "wx/msw/notebook.h" +#elif defined(__WXMOTIF__) + #include "wx/generic/notebook.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/notebook.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/notebook.h" +#elif defined(__WXMAC__) + #include "wx/osx/notebook.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/notebook.h" +#elif defined(__WXPM__) + #include "wx/os2/notebook.h" +#endif + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED wxEVT_NOTEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING wxEVT_NOTEBOOK_PAGE_CHANGING + +#endif // wxUSE_NOTEBOOK + +#endif + // _WX_NOTEBOOK_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/notifmsg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/notifmsg.h new file mode 100644 index 0000000000..fe49c8763c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/notifmsg.h @@ -0,0 +1,159 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/notifmsg.h +// Purpose: class allowing to show notification messages to the user +// Author: Vadim Zeitlin +// Created: 2007-11-19 +// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_NOTIFMSG_H_ +#define _WX_NOTIFMSG_H_ + +#include "wx/event.h" + +#if wxUSE_NOTIFICATION_MESSAGE + +// ---------------------------------------------------------------------------- +// wxNotificationMessage: allows to show the user a message non intrusively +// ---------------------------------------------------------------------------- + +// notice that this class is not a window and so doesn't derive from wxWindow + +class WXDLLIMPEXP_ADV wxNotificationMessageBase : public wxEvtHandler +{ +public: + // ctors and initializers + // ---------------------- + + // default ctor, use setters below to initialize it later + wxNotificationMessageBase() + { + m_parent = NULL; + m_flags = wxICON_INFORMATION; + } + + // create a notification object with the given title and message (the + // latter may be empty in which case only the title will be shown) + wxNotificationMessageBase(const wxString& title, + const wxString& message = wxEmptyString, + wxWindow *parent = NULL, + int flags = wxICON_INFORMATION) + : m_title(title), + m_message(message), + m_parent(parent) + { + SetFlags(flags); + } + + // note that the setters must be called before Show() + + // set the title: short string, markup not allowed + void SetTitle(const wxString& title) { m_title = title; } + + // set the text of the message: this is a longer string than the title and + // some platforms allow simple HTML-like markup in it + void SetMessage(const wxString& message) { m_message = message; } + + // set the parent for this notification: we'll be associated with the top + // level parent of this window or, if this method is not called, with the + // main application window by default + void SetParent(wxWindow *parent) { m_parent = parent; } + + // this method can currently be used to choose a standard icon to use: the + // parameter may be one of wxICON_INFORMATION, wxICON_WARNING or + // wxICON_ERROR only (but not wxICON_QUESTION) + void SetFlags(int flags) + { + wxASSERT_MSG( flags == wxICON_INFORMATION || + flags == wxICON_WARNING || flags == wxICON_ERROR, + "Invalid icon flags specified" ); + + m_flags = flags; + } + + + // showing and hiding + // ------------------ + + // possible values for Show() timeout + enum + { + Timeout_Auto = -1, // notification will be hidden automatically + Timeout_Never = 0 // notification will never time out + }; + + // show the notification to the user and hides it after timeout seconds + // pass (special values Timeout_Auto and Timeout_Never can be used) + // + // returns false if an error occurred + virtual bool Show(int timeout = Timeout_Auto) = 0; + + // hide the notification, returns true if it was hidden or false if it + // couldn't be done (e.g. on some systems automatically hidden + // notifications can't be hidden manually) + virtual bool Close() = 0; + +protected: + // accessors for the derived classes + const wxString& GetTitle() const { return m_title; } + const wxString& GetMessage() const { return m_message; } + wxWindow *GetParent() const { return m_parent; } + int GetFlags() const { return m_flags; } + + // return the concatenation of title and message separated by a new line, + // this is suitable for simple implementation which have no support for + // separate title and message parts of the notification + wxString GetFullMessage() const + { + wxString text(m_title); + if ( !m_message.empty() ) + { + text << "\n\n" << m_message; + } + + return text; + } + +private: + wxString m_title, + m_message; + + wxWindow *m_parent; + + int m_flags; + + wxDECLARE_NO_COPY_CLASS(wxNotificationMessageBase); +}; + +/* + TODO: Implement under OS X using notification centre (10.8+) or + Growl (http://growl.info/) for the previous versions. + */ +#if defined(__WXGTK__) && wxUSE_LIBNOTIFY + #include "wx/gtk/notifmsg.h" +#elif defined(__WXGTK__) && (wxUSE_LIBHILDON || wxUSE_LIBHILDON2) + #include "wx/gtk/hildon/notifmsg.h" +#elif defined(__WXMSW__) && wxUSE_TASKBARICON && wxUSE_TASKBARICON_BALLOONS + #include "wx/msw/notifmsg.h" +#else + #include "wx/generic/notifmsg.h" + + class wxNotificationMessage : public wxGenericNotificationMessage + { + public: + wxNotificationMessage() { } + wxNotificationMessage(const wxString& title, + const wxString& message = wxEmptyString, + wxWindow *parent = NULL, + int flags = wxICON_INFORMATION) + : wxGenericNotificationMessage(title, message, parent, flags) + { + } + }; +#endif + +#endif // wxUSE_NOTIFICATION_MESSAGE + +#endif // _WX_NOTIFMSG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/numdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/numdlg.h new file mode 100644 index 0000000000..c1c39742ec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/numdlg.h @@ -0,0 +1,22 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/numdlg.h +// Purpose: wxNumberEntryDialog class +// Author: John Labenski +// Modified by: +// Created: 07.02.04 (extracted from wx/textdlg.h) +// Copyright: (c) John Labenski +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_NUMDLGDLG_H_BASE_ +#define _WX_NUMDLGDLG_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_NUMBERDLG + +#include "wx/generic/numdlgg.h" + +#endif // wxUSE_NUMBERDLG + +#endif // _WX_NUMDLGDLG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/numformatter.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/numformatter.h new file mode 100644 index 0000000000..13b47b210b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/numformatter.h @@ -0,0 +1,78 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/numformatter.h +// Purpose: wxNumberFormatter class +// Author: Fulvio Senore, Vadim Zeitlin +// Created: 2010-11-06 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_NUMFORMATTER_H_ +#define _WX_NUMFORMATTER_H_ + +#include "wx/string.h" + +// Helper class for formatting numbers with thousands separators which also +// supports parsing the numbers formatted by it. +class WXDLLIMPEXP_BASE wxNumberFormatter +{ +public: + // Bit masks for ToString() + enum Style + { + Style_None = 0x00, + Style_WithThousandsSep = 0x01, + Style_NoTrailingZeroes = 0x02 // Only for floating point numbers + }; + + // Format a number as a string. By default, the thousands separator is + // used, specify Style_None to prevent this. For floating point numbers, + // precision can also be specified. + static wxString ToString(long val, + int style = Style_WithThousandsSep); +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + static wxString ToString(wxLongLong_t val, + int style = Style_WithThousandsSep); +#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + static wxString ToString(double val, + int precision, + int style = Style_WithThousandsSep); + + // Parse a string representing a number, possibly with thousands separator. + // + // Return true on success and stores the result in the provided location + // which must be a valid non-NULL pointer. + static bool FromString(wxString s, long *val); +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + static bool FromString(wxString s, wxLongLong_t *val); +#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + static bool FromString(wxString s, double *val); + + + // Get the decimal separator for the current locale. It is always defined + // and we fall back to returning '.' in case of an error. + static wxChar GetDecimalSeparator(); + + // Get the thousands separator if grouping of the digits is used by the + // current locale. The value returned in sep should be only used if the + // function returns true. + static bool GetThousandsSeparatorIfUsed(wxChar *sep); + +private: + // Post-process the string representing an integer. + static wxString PostProcessIntString(wxString s, int style); + + // Add the thousands separators to a string representing a number without + // the separators. This is used by ToString(Style_WithThousandsSep). + static void AddThousandsSeparators(wxString& s); + + // Remove trailing zeroes and, if there is nothing left after it, the + // decimal separator itself from a string representing a floating point + // number. Also used by ToString(). + static void RemoveTrailingZeroes(wxString& s); + + // Remove all thousands separators from a string representing a number. + static void RemoveThousandsSeparators(wxString& s); +}; + +#endif // _WX_NUMFORMATTER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/object.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/object.h new file mode 100644 index 0000000000..04c6512254 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/object.h @@ -0,0 +1,497 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/object.h +// Purpose: wxObject class, plus run-time type information macros +// Author: Julian Smart +// Modified by: Ron Lee +// Created: 01/02/97 +// Copyright: (c) 1997 Julian Smart +// (c) 2001 Ron Lee <ron@debian.org> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OBJECTH__ +#define _WX_OBJECTH__ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/memory.h" + +#define wxDECLARE_CLASS_INFO_ITERATORS() \ +class WXDLLIMPEXP_BASE const_iterator \ + { \ + typedef wxHashTable_Node Node; \ + public: \ + typedef const wxClassInfo* value_type; \ + typedef const value_type& const_reference; \ + typedef const_iterator itor; \ + typedef value_type* ptr_type; \ + \ + Node* m_node; \ + wxHashTable* m_table; \ + public: \ + typedef const_reference reference_type; \ + typedef ptr_type pointer_type; \ + \ + const_iterator(Node* node, wxHashTable* table) \ + : m_node(node), m_table(table) { } \ + const_iterator() : m_node(NULL), m_table(NULL) { } \ + value_type operator*() const; \ + itor& operator++(); \ + const itor operator++(int); \ + bool operator!=(const itor& it) const \ + { return it.m_node != m_node; } \ + bool operator==(const itor& it) const \ + { return it.m_node == m_node; } \ + }; \ + \ + static const_iterator begin_classinfo(); \ + static const_iterator end_classinfo() + +// based on the value of wxUSE_EXTENDED_RTTI symbol, +// only one of the RTTI system will be compiled: +// - the "old" one (defined by rtti.h) or +// - the "new" one (defined by xti.h) +#include "wx/xti.h" +#include "wx/rtti.h" + +#define wxIMPLEMENT_CLASS(name, basename) \ + wxIMPLEMENT_ABSTRACT_CLASS(name, basename) + +#define wxIMPLEMENT_CLASS2(name, basename1, basename2) \ + wxIMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) + +// ----------------------------------- +// for pluggable classes +// ----------------------------------- + + // NOTE: this should probably be the very first statement + // in the class declaration so wxPluginSentinel is + // the first member initialised and the last destroyed. + +// _DECLARE_DL_SENTINEL(name) wxPluginSentinel m_pluginsentinel; + +#if wxUSE_NESTED_CLASSES + +#define _DECLARE_DL_SENTINEL(name, exportdecl) \ +class exportdecl name##PluginSentinel { \ +private: \ + static const wxString sm_className; \ +public: \ + name##PluginSentinel(); \ + ~name##PluginSentinel(); \ +}; \ +name##PluginSentinel m_pluginsentinel + +#define _IMPLEMENT_DL_SENTINEL(name) \ + const wxString name::name##PluginSentinel::sm_className(#name); \ + name::name##PluginSentinel::name##PluginSentinel() { \ + wxPluginLibrary *e = (wxPluginLibrary*) wxPluginLibrary::ms_classes.Get(#name); \ + if( e != 0 ) { e->RefObj(); } \ + } \ + name::name##PluginSentinel::~name##PluginSentinel() { \ + wxPluginLibrary *e = (wxPluginLibrary*) wxPluginLibrary::ms_classes.Get(#name); \ + if( e != 0 ) { e->UnrefObj(); } \ + } +#else + +#define _DECLARE_DL_SENTINEL(name) +#define _IMPLEMENT_DL_SENTINEL(name) + +#endif // wxUSE_NESTED_CLASSES + +#define wxDECLARE_PLUGGABLE_CLASS(name) \ + wxDECLARE_DYNAMIC_CLASS(name); _DECLARE_DL_SENTINEL(name, WXDLLIMPEXP_CORE) +#define wxDECLARE_ABSTRACT_PLUGGABLE_CLASS(name) \ + wxDECLARE_ABSTRACT_CLASS(name); _DECLARE_DL_SENTINEL(name, WXDLLIMPEXP_CORE) + +#define wxDECLARE_USER_EXPORTED_PLUGGABLE_CLASS(name, usergoo) \ + wxDECLARE_DYNAMIC_CLASS(name); _DECLARE_DL_SENTINEL(name, usergoo) +#define wxDECLARE_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS(name, usergoo) \ + wxDECLARE_ABSTRACT_CLASS(name); _DECLARE_DL_SENTINEL(name, usergoo) + +#define wxIMPLEMENT_PLUGGABLE_CLASS(name, basename) \ + wxIMPLEMENT_DYNAMIC_CLASS(name, basename) _IMPLEMENT_DL_SENTINEL(name) +#define wxIMPLEMENT_PLUGGABLE_CLASS2(name, basename1, basename2) \ + wxIMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) _IMPLEMENT_DL_SENTINEL(name) +#define wxIMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(name, basename) \ + wxIMPLEMENT_ABSTRACT_CLASS(name, basename) _IMPLEMENT_DL_SENTINEL(name) +#define wxIMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2) \ + wxIMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) _IMPLEMENT_DL_SENTINEL(name) + +#define wxIMPLEMENT_USER_EXPORTED_PLUGGABLE_CLASS(name, basename) \ + wxIMPLEMENT_PLUGGABLE_CLASS(name, basename) +#define wxIMPLEMENT_USER_EXPORTED_PLUGGABLE_CLASS2(name, basename1, basename2) \ + wxIMPLEMENT_PLUGGABLE_CLASS2(name, basename1, basename2) +#define wxIMPLEMENT_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS(name, basename) \ + wxIMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(name, basename) +#define wxIMPLEMENT_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2) \ + wxIMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2) + +#define wxCLASSINFO(name) (&name::ms_classInfo) + +#define wxIS_KIND_OF(obj, className) obj->IsKindOf(&className::ms_classInfo) + +// Just seems a bit nicer-looking (pretend it's not a macro) +#define wxIsKindOf(obj, className) obj->IsKindOf(&className::ms_classInfo) + +// this cast does some more checks at compile time as it uses static_cast +// internally +// +// note that it still has different semantics from dynamic_cast<> and so can't +// be replaced by it as long as there are any compilers not supporting it +#define wxDynamicCast(obj, className) \ + ((className *) wxCheckDynamicCast( \ + const_cast<wxObject *>(static_cast<const wxObject *>(\ + const_cast<className *>(static_cast<const className *>(obj)))), \ + &className::ms_classInfo)) + +// The 'this' pointer is always true, so use this version +// to cast the this pointer and avoid compiler warnings. +#define wxDynamicCastThis(className) \ + (IsKindOf(&className::ms_classInfo) ? (className *)(this) : (className *)0) + +// FIXME-VC6: dummy argument needed because VC6 doesn't support explicitly +// choosing the template function to call +template <class T> +inline T *wxCheckCast(const void *ptr, T * = NULL) +{ + wxASSERT_MSG( wxDynamicCast(ptr, T), "wxStaticCast() used incorrectly" ); + return const_cast<T *>(static_cast<const T *>(ptr)); +} + +#define wxStaticCast(obj, className) wxCheckCast((obj), (className *)NULL) + +// ---------------------------------------------------------------------------- +// set up memory debugging macros +// ---------------------------------------------------------------------------- + +/* + Which new/delete operator variants do we want? + + _WX_WANT_NEW_SIZET_WXCHAR_INT = void *operator new (size_t size, wxChar *fileName = 0, int lineNum = 0) + _WX_WANT_DELETE_VOID = void operator delete (void * buf) + _WX_WANT_DELETE_VOID_CONSTCHAR_SIZET = void operator delete (void *buf, const char *_fname, size_t _line) + _WX_WANT_DELETE_VOID_WXCHAR_INT = void operator delete(void *buf, wxChar*, int) + _WX_WANT_ARRAY_NEW_SIZET_WXCHAR_INT = void *operator new[] (size_t size, wxChar *fileName , int lineNum = 0) + _WX_WANT_ARRAY_DELETE_VOID = void operator delete[] (void *buf) + _WX_WANT_ARRAY_DELETE_VOID_WXCHAR_INT = void operator delete[] (void* buf, wxChar*, int ) +*/ + +#if wxUSE_MEMORY_TRACING + +// All compilers get this one +#define _WX_WANT_NEW_SIZET_WXCHAR_INT + +// Everyone except Visage gets the next one +#ifndef __VISAGECPP__ + #define _WX_WANT_DELETE_VOID +#endif + +// Only visage gets this one under the correct circumstances +#if defined(__VISAGECPP__) && __DEBUG_ALLOC__ + #define _WX_WANT_DELETE_VOID_CONSTCHAR_SIZET +#endif + +// Only VC++ 6 gets overloaded delete that matches new +#if (defined(__VISUALC__) && (__VISUALC__ >= 1200)) + #define _WX_WANT_DELETE_VOID_WXCHAR_INT +#endif + +// Now see who (if anyone) gets the array memory operators +#if wxUSE_ARRAY_MEMORY_OPERATORS + + // Everyone except Visual C++ (cause problems for VC++ - crashes) + #if !defined(__VISUALC__) + #define _WX_WANT_ARRAY_NEW_SIZET_WXCHAR_INT + #endif + + // Everyone except Visual C++ (cause problems for VC++ - crashes) + #if !defined(__VISUALC__) + #define _WX_WANT_ARRAY_DELETE_VOID + #endif +#endif // wxUSE_ARRAY_MEMORY_OPERATORS + +#endif // wxUSE_MEMORY_TRACING + +// ---------------------------------------------------------------------------- +// Compatibility macro aliases DECLARE group +// ---------------------------------------------------------------------------- +// deprecated variants _not_ requiring a semicolon after them and without wx prefix. +// (note that also some wx-prefixed macro do _not_ require a semicolon because +// it's not always possible to force the compire to require it) + +#define DECLARE_CLASS_INFO_ITERATORS() wxDECLARE_CLASS_INFO_ITERATORS(); +#define DECLARE_ABSTRACT_CLASS(n) wxDECLARE_ABSTRACT_CLASS(n); +#define DECLARE_DYNAMIC_CLASS_NO_ASSIGN(n) wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(n); +#define DECLARE_DYNAMIC_CLASS_NO_COPY(n) wxDECLARE_DYNAMIC_CLASS_NO_COPY(n); +#define DECLARE_DYNAMIC_CLASS(n) wxDECLARE_DYNAMIC_CLASS(n); +#define DECLARE_CLASS(n) wxDECLARE_CLASS(n); + +#define DECLARE_PLUGGABLE_CLASS(n) wxDECLARE_PLUGGABLE_CLASS(n); +#define DECLARE_ABSTRACT_PLUGGABLE_CLASS(n) wxDECLARE_ABSTRACT_PLUGGABLE_CLASS(n); +#define DECLARE_USER_EXPORTED_PLUGGABLE_CLASS(n,u) wxDECLARE_USER_EXPORTED_PLUGGABLE_CLASS(n,u); +#define DECLARE_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS(n,u) wxDECLARE_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS(n,u); + +// ---------------------------------------------------------------------------- +// wxRefCounter: ref counted data "manager" +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxRefCounter +{ +public: + wxRefCounter() { m_count = 1; } + + int GetRefCount() const { return m_count; } + + void IncRef() { m_count++; } + void DecRef(); + +protected: + // this object should never be destroyed directly but only as a + // result of a DecRef() call: + virtual ~wxRefCounter() { } + +private: + // our refcount: + int m_count; + + // It doesn't make sense to copy the reference counted objects, a new ref + // counter should be created for a new object instead and compilation + // errors in the code using wxRefCounter due to the lack of copy ctor often + // indicate a problem, e.g. a forgotten copy ctor implementation somewhere. + wxDECLARE_NO_COPY_CLASS(wxRefCounter); +}; + +// ---------------------------------------------------------------------------- +// wxObjectRefData: ref counted data meant to be stored in wxObject +// ---------------------------------------------------------------------------- + +typedef wxRefCounter wxObjectRefData; + +// ---------------------------------------------------------------------------- +// wxObjectDataPtr: helper class to avoid memleaks because of missing calls +// to wxObjectRefData::DecRef +// ---------------------------------------------------------------------------- + +template <class T> +class wxObjectDataPtr +{ +public: + typedef T element_type; + + wxEXPLICIT wxObjectDataPtr(T *ptr = NULL) : m_ptr(ptr) {} + + // copy ctor + wxObjectDataPtr(const wxObjectDataPtr<T> &tocopy) + : m_ptr(tocopy.m_ptr) + { + if (m_ptr) + m_ptr->IncRef(); + } + + ~wxObjectDataPtr() + { + if (m_ptr) + m_ptr->DecRef(); + } + + T *get() const { return m_ptr; } + + // test for pointer validity: defining conversion to unspecified_bool_type + // and not more obvious bool to avoid implicit conversions to integer types + typedef T *(wxObjectDataPtr<T>::*unspecified_bool_type)() const; + operator unspecified_bool_type() const + { + return m_ptr ? &wxObjectDataPtr<T>::get : NULL; + } + + T& operator*() const + { + wxASSERT(m_ptr != NULL); + return *(m_ptr); + } + + T *operator->() const + { + wxASSERT(m_ptr != NULL); + return get(); + } + + void reset(T *ptr) + { + if (m_ptr) + m_ptr->DecRef(); + m_ptr = ptr; + } + + wxObjectDataPtr& operator=(const wxObjectDataPtr &tocopy) + { + if (m_ptr) + m_ptr->DecRef(); + m_ptr = tocopy.m_ptr; + if (m_ptr) + m_ptr->IncRef(); + return *this; + } + + wxObjectDataPtr& operator=(T *ptr) + { + if (m_ptr) + m_ptr->DecRef(); + m_ptr = ptr; + return *this; + } + +private: + T *m_ptr; +}; + +// ---------------------------------------------------------------------------- +// wxObject: the root class of wxWidgets object hierarchy +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxObject +{ + wxDECLARE_ABSTRACT_CLASS(wxObject); + +public: + wxObject() { m_refData = NULL; } + virtual ~wxObject() { UnRef(); } + + wxObject(const wxObject& other) + { + m_refData = other.m_refData; + if (m_refData) + m_refData->IncRef(); + } + + wxObject& operator=(const wxObject& other) + { + if ( this != &other ) + { + Ref(other); + } + return *this; + } + + bool IsKindOf(const wxClassInfo *info) const; + + + // Turn on the correct set of new and delete operators + +#ifdef _WX_WANT_NEW_SIZET_WXCHAR_INT + void *operator new ( size_t size, const wxChar *fileName = NULL, int lineNum = 0 ); +#endif + +#ifdef _WX_WANT_DELETE_VOID + void operator delete ( void * buf ); +#endif + +#ifdef _WX_WANT_DELETE_VOID_CONSTCHAR_SIZET + void operator delete ( void *buf, const char *_fname, size_t _line ); +#endif + +#ifdef _WX_WANT_DELETE_VOID_WXCHAR_INT + void operator delete ( void *buf, const wxChar*, int ); +#endif + +#ifdef _WX_WANT_ARRAY_NEW_SIZET_WXCHAR_INT + void *operator new[] ( size_t size, const wxChar *fileName = NULL, int lineNum = 0 ); +#endif + +#ifdef _WX_WANT_ARRAY_DELETE_VOID + void operator delete[] ( void *buf ); +#endif + +#ifdef _WX_WANT_ARRAY_DELETE_VOID_WXCHAR_INT + void operator delete[] (void* buf, const wxChar*, int ); +#endif + + // ref counted data handling methods + + // get/set + wxObjectRefData *GetRefData() const { return m_refData; } + void SetRefData(wxObjectRefData *data) { m_refData = data; } + + // make a 'clone' of the object + void Ref(const wxObject& clone); + + // destroy a reference + void UnRef(); + + // Make sure this object has only one reference + void UnShare() { AllocExclusive(); } + + // check if this object references the same data as the other one + bool IsSameAs(const wxObject& o) const { return m_refData == o.m_refData; } + +protected: + // ensure that our data is not shared with anybody else: if we have no + // data, it is created using CreateRefData() below, if we have shared data + // it is copied using CloneRefData(), otherwise nothing is done + void AllocExclusive(); + + // both methods must be implemented if AllocExclusive() is used, not pure + // virtual only because of the backwards compatibility reasons + + // create a new m_refData + virtual wxObjectRefData *CreateRefData() const; + + // create a new m_refData initialized with the given one + virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; + + wxObjectRefData *m_refData; +}; + +inline wxObject *wxCheckDynamicCast(wxObject *obj, wxClassInfo *classInfo) +{ + return obj && obj->GetClassInfo()->IsKindOf(classInfo) ? obj : NULL; +} + +#include "wx/xti2.h" + +// ---------------------------------------------------------------------------- +// more debugging macros +// ---------------------------------------------------------------------------- + +#if wxUSE_DEBUG_NEW_ALWAYS + #define WXDEBUG_NEW new(__TFILE__,__LINE__) + + #if wxUSE_GLOBAL_MEMORY_OPERATORS + #define new WXDEBUG_NEW + #elif defined(__VISUALC__) + // Including this file redefines new and allows leak reports to + // contain line numbers + #include "wx/msw/msvcrt.h" + #endif +#endif // wxUSE_DEBUG_NEW_ALWAYS + +// ---------------------------------------------------------------------------- +// Compatibility macro aliases IMPLEMENT group +// ---------------------------------------------------------------------------- + +// deprecated variants _not_ requiring a semicolon after them and without wx prefix. +// (note that also some wx-prefixed macro do _not_ require a semicolon because +// it's not always possible to force the compire to require it) + +#define IMPLEMENT_DYNAMIC_CLASS(n,b) wxIMPLEMENT_DYNAMIC_CLASS(n,b) +#define IMPLEMENT_DYNAMIC_CLASS2(n,b1,b2) wxIMPLEMENT_DYNAMIC_CLASS2(n,b1,b2) +#define IMPLEMENT_ABSTRACT_CLASS(n,b) wxIMPLEMENT_ABSTRACT_CLASS(n,b) +#define IMPLEMENT_ABSTRACT_CLASS2(n,b1,b2) wxIMPLEMENT_ABSTRACT_CLASS2(n,b1,b2) +#define IMPLEMENT_CLASS(n,b) wxIMPLEMENT_CLASS(n,b) +#define IMPLEMENT_CLASS2(n,b1,b2) wxIMPLEMENT_CLASS2(n,b1,b2) + +#define IMPLEMENT_PLUGGABLE_CLASS(n,b) wxIMPLEMENT_PLUGGABLE_CLASS(n,b) +#define IMPLEMENT_PLUGGABLE_CLASS2(n,b,b2) wxIMPLEMENT_PLUGGABLE_CLASS2(n,b,b2) +#define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(n,b) wxIMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(n,b) +#define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(n,b,b2) wxIMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(n,b,b2) +#define IMPLEMENT_USER_EXPORTED_PLUGGABLE_CLASS(n,b) wxIMPLEMENT_USER_EXPORTED_PLUGGABLE_CLASS(n,b) +#define IMPLEMENT_USER_EXPORTED_PLUGGABLE_CLASS2(n,b,b2) wxIMPLEMENT_USER_EXPORTED_PLUGGABLE_CLASS2(n,b,b2) +#define IMPLEMENT_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS(n,b) wxIMPLEMENT_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS(n,b) +#define IMPLEMENT_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS2(n,b,b2) wxIMPLEMENT_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS2(n,b,b2) + +#define CLASSINFO(n) wxCLASSINFO(n) + +#endif // _WX_OBJECTH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/odcombo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/odcombo.h new file mode 100644 index 0000000000..af0f1160d8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/odcombo.h @@ -0,0 +1,399 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/odcombo.h +// Purpose: wxOwnerDrawnComboBox and wxVListBoxPopup +// Author: Jaakko Salli +// Modified by: +// Created: Apr-30-2006 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ODCOMBO_H_ +#define _WX_ODCOMBO_H_ + +#include "wx/defs.h" + +#if wxUSE_ODCOMBOBOX + +#include "wx/combo.h" +#include "wx/ctrlsub.h" +#include "wx/vlbox.h" +#include "wx/timer.h" + + +// +// New window styles for wxOwnerDrawnComboBox +// +enum +{ + // Double-clicking cycles item if wxCB_READONLY is also used. + wxODCB_DCLICK_CYCLES = wxCC_SPECIAL_DCLICK, + + // If used, control itself is not custom paint using callback. + // Even if this is not used, writable combo is never custom paint + // until SetCustomPaintWidth is called + wxODCB_STD_CONTROL_PAINT = 0x1000 +}; + + +// +// Callback flags (see wxOwnerDrawnComboBox::OnDrawItem) +// +enum wxOwnerDrawnComboBoxPaintingFlags +{ + // when set, we are painting the selected item in control, + // not in the popup + wxODCB_PAINTING_CONTROL = 0x0001, + + + // when set, we are painting an item which should have + // focus rectangle painted in the background. Text colour + // and clipping region are then appropriately set in + // the default OnDrawBackground implementation. + wxODCB_PAINTING_SELECTED = 0x0002 +}; + + +// ---------------------------------------------------------------------------- +// wxVListBoxComboPopup is a wxVListBox customized to act as a popup control. +// +// Notes: +// wxOwnerDrawnComboBox uses this as its popup. However, it always derives +// from native wxComboCtrl. If you need to use this popup with +// wxGenericComboControl, then remember that vast majority of item manipulation +// functionality is implemented in the wxVListBoxComboPopup class itself. +// +// ---------------------------------------------------------------------------- + + +class WXDLLIMPEXP_ADV wxVListBoxComboPopup : public wxVListBox, + public wxComboPopup +{ + friend class wxOwnerDrawnComboBox; +public: + + // init and dtor + wxVListBoxComboPopup() : wxVListBox(), wxComboPopup() { } + virtual ~wxVListBoxComboPopup(); + + // required virtuals + virtual void Init(); + virtual bool Create(wxWindow* parent); + virtual void SetFocus(); + virtual wxWindow *GetControl() { return this; } + virtual void SetStringValue( const wxString& value ); + virtual wxString GetStringValue() const; + + // more customization + virtual void OnPopup(); + virtual wxSize GetAdjustedSize( int minWidth, int prefHeight, int maxHeight ); + virtual void PaintComboControl( wxDC& dc, const wxRect& rect ); + virtual void OnComboKeyEvent( wxKeyEvent& event ); + virtual void OnComboCharEvent( wxKeyEvent& event ); + virtual void OnComboDoubleClick(); + virtual bool LazyCreate(); + virtual bool FindItem(const wxString& item, wxString* trueItem); + + // Item management + void SetSelection( int item ); + void Insert( const wxString& item, int pos ); + int Append(const wxString& item); + void Clear(); + void Delete( unsigned int item ); + void SetItemClientData(unsigned int n, void* clientData, wxClientDataType clientDataItemsType); + void *GetItemClientData(unsigned int n) const; + void SetString( int item, const wxString& str ); + wxString GetString( int item ) const; + unsigned int GetCount() const; + int FindString(const wxString& s, bool bCase = false) const; + int GetSelection() const; + + //void Populate( int n, const wxString choices[] ); + void Populate( const wxArrayString& choices ); + void ClearClientDatas(); + + // helpers + int GetItemAtPosition( const wxPoint& pos ) { return HitTest(pos); } + wxCoord GetTotalHeight() const { return EstimateTotalHeight(); } + wxCoord GetLineHeight(int line) const { return OnGetRowHeight(line); } + +protected: + + // Called by OnComboDoubleClick and OnCombo{Key,Char}Event + bool HandleKey( int keycode, bool saturate, wxChar keychar = 0 ); + + // sends combobox select event from the parent combo control + void SendComboBoxEvent( int selection ); + + // gets value, sends event and dismisses + void DismissWithEvent(); + + // OnMeasureItemWidth will be called on next GetAdjustedSize. + void ItemWidthChanged(unsigned int item) + { + m_widths[item] = -1; + m_widthsDirty = true; + } + + // Callbacks for drawing and measuring items. Override in a derived class for + // owner-drawnness. Font, background and text colour have been prepared according + // to selection, focus and such. + // + // item: item index to be drawn, may be wxNOT_FOUND when painting combo control itself + // and there is no valid selection + // flags: wxODCB_PAINTING_CONTROL is set if painting to combo control instead of list + // + // NOTE: If wxVListBoxComboPopup is used with a wxComboCtrl class not derived from + // wxOwnerDrawnComboBox, this method must be overridden. + virtual void OnDrawItem( wxDC& dc, const wxRect& rect, int item, int flags) const; + + // This is same as in wxVListBox + virtual wxCoord OnMeasureItem( size_t item ) const; + + // Return item width, or -1 for calculating from text extent (default) + virtual wxCoord OnMeasureItemWidth( size_t item ) const; + + // Draw item and combo control background. Flags are same as with OnDrawItem. + // NB: Can't use name OnDrawBackground because of virtual function hiding warnings. + virtual void OnDrawBg(wxDC& dc, const wxRect& rect, int item, int flags) const; + + // Additional wxVListBox implementation (no need to override in derived classes) + virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const; + void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const; + + // filter mouse move events happening outside the list box + // move selection with cursor + void OnMouseMove(wxMouseEvent& event); + void OnKey(wxKeyEvent& event); + void OnChar(wxKeyEvent& event); + void OnLeftClick(wxMouseEvent& event); + + // Return the widest item width (recalculating it if necessary) + int GetWidestItemWidth() { CalcWidths(); return m_widestWidth; } + + // Return the index of the widest item (recalculating it if necessary) + int GetWidestItem() { CalcWidths(); return m_widestItem; } + + // Stop partial completion (when some other event occurs) + void StopPartialCompletion(); + + wxArrayString m_strings; + wxArrayPtrVoid m_clientDatas; + + wxFont m_useFont; + + //wxString m_stringValue; // displayed text (may be different than m_strings[m_value]) + int m_value; // selection + int m_itemHover; // on which item the cursor is + int m_itemHeight; // default item height (calculate from font size + // and used in the absence of callback) + wxClientDataType m_clientDataItemsType; + +private: + + // Cached item widths (in pixels). + wxArrayInt m_widths; + + // Width of currently widest item. + int m_widestWidth; + + // Index of currently widest item. + int m_widestItem; + + // Measure some items in next GetAdjustedSize? + bool m_widthsDirty; + + // Find widest item in next GetAdjustedSize? + bool m_findWidest; + + // has the mouse been released on this control? + bool m_clicked; + + // Recalculate widths if they are dirty + void CalcWidths(); + + // Partial completion string + wxString m_partialCompletionString; + + wxString m_stringValue; + +#if wxUSE_TIMER + // Partial completion timer + wxTimer m_partialCompletionTimer; +#endif // wxUSE_TIMER + + DECLARE_EVENT_TABLE() +}; + + +// ---------------------------------------------------------------------------- +// wxOwnerDrawnComboBox: a generic wxComboBox that allows custom paint items +// in addition to many other types of customization already allowed by +// the wxComboCtrl. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox : + public wxWindowWithItems<wxComboCtrl, wxItemContainer> +{ + //friend class wxComboPopupWindow; + friend class wxVListBoxComboPopup; +public: + + // ctors and such + wxOwnerDrawnComboBox() { Init(); } + + wxOwnerDrawnComboBox(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + int n, + const wxString choices[], + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + Init(); + + (void)Create(parent, id, value, pos, size, n, + choices, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + wxOwnerDrawnComboBox(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxArrayString& choices = wxArrayString(), + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + int n, + const wxString choices[], + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + virtual ~wxOwnerDrawnComboBox(); + + // Prevent app from using wxComboPopup + void SetPopupControl(wxVListBoxComboPopup* popup) + { + DoSetPopupControl(popup); + } + + // wxControlWithItems methods + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual void Select(int n); + virtual int GetSelection() const; + + // Override these just to maintain consistency with virtual methods + // between classes. + virtual void Clear(); + virtual void GetSelection(long *from, long *to) const; + + virtual void SetSelection(int n) { Select(n); } + + + // Prevent a method from being hidden + virtual void SetSelection(long from, long to) + { + wxComboCtrl::SetSelection(from,to); + } + + // Return the widest item width (recalculating it if necessary) + virtual int GetWidestItemWidth() { EnsurePopupControl(); return GetVListBoxComboPopup()->GetWidestItemWidth(); } + + // Return the index of the widest item (recalculating it if necessary) + virtual int GetWidestItem() { EnsurePopupControl(); return GetVListBoxComboPopup()->GetWidestItem(); } + + virtual bool IsSorted() const { return HasFlag(wxCB_SORT); } + +protected: + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + + // Callback for drawing. Font, background and text colour have been + // prepared according to selection, focus and such. + // item: item index to be drawn, may be wxNOT_FOUND when painting combo control itself + // and there is no valid selection + // flags: wxODCB_PAINTING_CONTROL is set if painting to combo control instead of list + virtual void OnDrawItem( wxDC& dc, const wxRect& rect, int item, int flags ) const; + + // Callback for item height, or -1 for default + virtual wxCoord OnMeasureItem( size_t item ) const; + + // Callback for item width, or -1 for default/undetermined + virtual wxCoord OnMeasureItemWidth( size_t item ) const; + + // override base implementation so we can return the size for the + // largest item + virtual wxSize DoGetBestSize() const; + + // Callback for background drawing. Flags are same as with + // OnDrawItem. + virtual void OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags ) const; + + // NULL popup can be used to indicate default interface + virtual void DoSetPopupControl(wxComboPopup* popup); + + // clears all allocated client datas + void ClearClientDatas(); + + wxVListBoxComboPopup* GetVListBoxComboPopup() const + { + return (wxVListBoxComboPopup*) m_popupInterface; + } + + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + + // temporary storage for the initial choices + //const wxString* m_baseChoices; + //int m_baseChoicesCount; + wxArrayString m_initChs; + +private: + void Init(); + + DECLARE_EVENT_TABLE() + + DECLARE_DYNAMIC_CLASS(wxOwnerDrawnComboBox) +}; + + +#endif // wxUSE_ODCOMBOBOX + +#endif + // _WX_ODCOMBO_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/accel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/accel.h new file mode 100644 index 0000000000..0b9bde6dcc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/accel.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/accel.h +// Purpose: wxAcceleratorTable class +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ACCEL_H_ +#define _WX_ACCEL_H_ + +#include "wx/object.h" + +class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable; + +// Hold Ctrl key down +#define wxACCEL_ALT 0x01 + +// Hold Ctrl key down +#define wxACCEL_CTRL 0x02 + + // Hold Shift key down +#define wxACCEL_SHIFT 0x04 + + // Hold no key down +#define wxACCEL_NORMAL 0x00 + +class WXDLLIMPEXP_CORE wxAcceleratorTable: public wxObject +{ +DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) +public: + wxAcceleratorTable(); + wxAcceleratorTable(const wxString& rsResource); // Load from .rc resource + wxAcceleratorTable( int n + ,const wxAcceleratorEntry vaEntries[] + ); // Load from array + + virtual ~wxAcceleratorTable(); + + bool Ok() const { return IsOk(); } + bool IsOk() const; + void SetHACCEL(WXHACCEL hAccel); + WXHACCEL GetHACCEL(void) const; + + // translate the accelerator, return TRUE if done + bool Translate( WXHWND hWnd + ,WXMSG* pMsg + ) const; +}; + +WXDLLIMPEXP_DATA_CORE(extern wxAcceleratorTable) wxNullAcceleratorTable; + +WXDLLIMPEXP_CORE wxString wxPMTextToLabel(const wxString& rsTitle); +#endif + // _WX_ACCEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/app.h new file mode 100644 index 0000000000..984783963d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/app.h @@ -0,0 +1,121 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/app.h +// Purpose: wxApp class +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_APP_H_ +#define _WX_APP_H_ + +#ifdef __WATCOMC__ + +#include <types.h> +#include <sys/ioctl.h> +#include <sys/select.h> + +#else + +#include <sys/time.h> +#include <sys/types.h> + +#ifdef __EMX__ +#include <unistd.h> +#else +#include <utils.h> +#undef BYTE_ORDER +#include <types.h> +#define INCL_ORDERS +#endif + +#endif + +#include "wx/event.h" +#include "wx/icon.h" + +class WXDLLIMPEXP_FWD_CORE wxFrame; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxApp; +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; +class WXDLLIMPEXP_FWD_BASE wxLog; + +WXDLLIMPEXP_DATA_CORE(extern wxApp*) wxTheApp; +WXDLLIMPEXP_DATA_CORE(extern HAB) vHabmain; + +// Force an exit from main loop +void WXDLLIMPEXP_CORE wxExit(void); + +// Yield to other apps/messages +bool WXDLLIMPEXP_CORE wxYield(void); + +extern MRESULT EXPENTRY wxWndProc( HWND + ,ULONG + ,MPARAM + ,MPARAM + ); + + +// Represents the application. Derive OnInit and declare +// a new App object to start application +class WXDLLIMPEXP_CORE wxApp : public wxAppBase +{ + DECLARE_DYNAMIC_CLASS(wxApp) + +public: + wxApp(); + virtual ~wxApp(); + + // override base class (pure) virtuals + virtual bool Initialize(int& argc, wxChar **argv); + virtual void CleanUp(void); + + virtual bool OnInitGui(void); + + virtual void WakeUpIdle(void); + + virtual void SetPrintMode(int mode) { m_nPrintMode = mode; } + virtual int GetPrintMode(void) const { return m_nPrintMode; } + + // implementation only + void OnIdle(wxIdleEvent& rEvent); + void OnEndSession(wxCloseEvent& rEvent); + void OnQueryEndSession(wxCloseEvent& rEvent); + + int AddSocketHandler(int handle, int mask, + void (*callback)(void*), void * gsock); + void RemoveSocketHandler(int handle); + void HandleSockets(); + +protected: + bool m_bShowOnInit; + int m_nPrintMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT + + // + // PM-specific wxApp definitions */ + // +private: + int m_maxSocketHandles; + int m_maxSocketNr; + int m_lastUsedHandle; + fd_set m_readfds; + fd_set m_writefds; + void* m_sockCallbackInfo; + +public: + + // Implementation + static bool RegisterWindowClasses(HAB vHab); + +public: + int m_nCmdShow; + HMQ m_hMq; + +protected: + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxApp); +}; +#endif + // _WX_APP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/apptbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/apptbase.h new file mode 100644 index 0000000000..d4476b649a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/apptbase.h @@ -0,0 +1,35 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/apptbase.h +// Purpose: declaration of wxAppTraits for OS2 +// Author: Stefan Neis +// Modified by: +// Created: 22.09.2003 +// Copyright: (c) 2003 Stefan Neis <Stefan.Neis@t-online.de> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_APPTBASE_H_ +#define _WX_OS2_APPTBASE_H_ + +// ---------------------------------------------------------------------------- +// wxAppTraits: the OS2 version adds extra hooks needed by OS2-only code +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase +{ +public: + // wxThread helpers + // ---------------- + + // Initialize PM facilities to enable GUI access + virtual void InitializeGui(unsigned long &ulHab); + + // Clean up message queue. + virtual void TerminateGui(unsigned long ulHab); + +#if wxUSE_SOCKETS + virtual wxFDIOManager *GetFDIOManager(); +#endif +}; + +#endif // _WX_OS2_APPTBASE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/apptrait.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/apptrait.h new file mode 100644 index 0000000000..d9d1cd8aed --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/apptrait.h @@ -0,0 +1,68 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/apptrait.h +// Purpose: class implementing wxAppTraits for OS/2 +// Author: Stefan Neis +// Modified by: +// Created: 22.09.2003 +// Copyright: (c) 2003 Stefan Neis <Stefan.Neis@t-online.de> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_APPTRAIT_H_ +#define _WX_OS2_APPTRAIT_H_ + +// ---------------------------------------------------------------------------- +// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase +{ +public: +#if wxUSE_CONSOLE_EVENTLOOP + virtual wxEventLoopBase *CreateEventLoop(); +#endif // wxUSE_CONSOLE_EVENTLOOP +#if wxUSE_TIMER + virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); +#endif +}; + +#if wxUSE_GUI + +class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase +{ +public: + virtual wxEventLoopBase *CreateEventLoop(); +#if wxUSE_TIMER + virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); +#endif + virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const; + + // wxThread helpers + // ---------------- + + // Initialize PM facilities to enable GUI access + virtual void InitializeGui(unsigned long &ulHab); + + // Clean up message queue. + virtual void TerminateGui(unsigned long ulHab); +#ifdef __WXGTK__ + virtual wxString GetDesktopEnvironment() const; +#endif +#if wxUSE_SOCKETS + virtual wxFDIOManager *GetFDIOManager(); +#endif +}; + +#ifndef __WXPM__ +inline void wxGUIAppTraits::InitializeGui(unsigned long &WXUNUSED(ulHab)) +{ +} + +inline void wxGUIAppTraits::TerminateGui(unsigned long WXUNUSED(ulHab)) +{ +} +#endif + +#endif // wxUSE_GUI + +#endif // _WX_OS2_APPTRAIT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/bitmap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/bitmap.h new file mode 100644 index 0000000000..b4c1642395 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/bitmap.h @@ -0,0 +1,374 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/bitmap.h +// Purpose: wxBitmap class +// Author: David Webster +// Modified by: +// Created: 11/28/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BITMAP_H_ +#define _WX_BITMAP_H_ + +#include "wx/os2/private.h" +#include "wx/os2/gdiimage.h" +#include "wx/gdicmn.h" +#include "wx/palette.h" + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxControl; +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxBitmapHandler; +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxMask; +class WXDLLIMPEXP_FWD_CORE wxCursor; +class WXDLLIMPEXP_FWD_CORE wxControl; +class WXDLLIMPEXP_FWD_CORE wxPixelDataBase; + +// ---------------------------------------------------------------------------- +// Bitmap data +// +// NB: this class is private, but declared here to make it possible inline +// wxBitmap functions accessing it +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapRefData : public wxGDIImageRefData +{ +public: + wxBitmapRefData(); + wxBitmapRefData(const wxBitmapRefData &tocopy); + virtual ~wxBitmapRefData() { Free(); } + + virtual void Free(); + +public: + int m_nNumColors; + wxPalette m_vBitmapPalette; + int m_nQuality; + + // OS2-specific + // ------------ + + wxDC* m_pSelectedInto; + + // + // Optional mask for transparent drawing + // + wxMask* m_pBitmapMask; +}; // end of CLASS wxBitmapRefData + +// ---------------------------------------------------------------------------- +// wxBitmap: a mono or colour bitmap +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmap : public wxGDIImage, + public wxBitmapHelpers +{ +public: + // default ctor creates an invalid bitmap, you must Create() it later + wxBitmap() { Init(); } + + // Copy constructors + inline wxBitmap(const wxBitmap& rBitmap) + : wxGDIImage(rBitmap) + { + Init(); + SetHandle(rBitmap.GetHandle()); + } + + // Initialize with raw data + wxBitmap( const char bits[] + ,int nWidth + ,int nHeight + ,int nDepth = 1 + ); + + // Initialize with XPM data + wxBitmap(const char* const* bits); +#ifdef wxNEEDS_CHARPP + // needed for old GCC + wxBitmap(char** data) + { + *this = wxBitmap(const_cast<const char* const*>(data)); + } +#endif + + // Load a resource + wxBitmap( int nId + ,wxBitmapType lType = wxBITMAP_DEFAULT_TYPE + ); + + // For compatiability with other ports, under OS/2 does same as default ctor + inline wxBitmap( const wxString& WXUNUSED(rFilename) + ,wxBitmapType WXUNUSED(lType) + ) + { Init(); } + // New constructor for generalised creation from data + wxBitmap( const void* pData + ,wxBitmapType lType + ,int nWidth + ,int nHeight + ,int nDepth = 1 + ); + + // If depth is omitted, will create a bitmap compatible with the display + wxBitmap( int nWidth, int nHeight, int nDepth = -1 ) + { + Init(); + (void)Create(nWidth, nHeight, nDepth); + } + wxBitmap( const wxSize& sz, int nDepth = -1 ) + { + Init(); + (void)Create(sz, nDepth); + } + + wxBitmap( const wxImage& image, int depth = -1 ) + { (void)CreateFromImage(image, depth); } + + // we must have this, otherwise icons are silently copied into bitmaps using + // the copy ctor but the resulting bitmap is invalid! + inline wxBitmap(const wxIcon& rIcon) + { Init(); CopyFromIcon(rIcon); } + + wxBitmap& operator=(const wxIcon& rIcon) + { + (void)CopyFromIcon(rIcon); + + return(*this); + } + + wxBitmap& operator=(const wxCursor& rCursor) + { + (void)CopyFromCursor(rCursor); + return (*this); + } + + virtual ~wxBitmap(); + + wxImage ConvertToImage() const; + wxBitmap ConvertToDisabled(unsigned char brightness = 255) const; + + // get the given part of bitmap + wxBitmap GetSubBitmap(const wxRect& rRect) const; + + // copies the contents and mask of the given (colour) icon to the bitmap + bool CopyFromIcon(const wxIcon& rIcon); + + // copies the contents and mask of the given cursor to the bitmap + bool CopyFromCursor(const wxCursor& rCursor); + + virtual bool Create( int nWidth + ,int nHeight + ,int nDepth = wxBITMAP_SCREEN_DEPTH + ); + virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) + { return Create(sz.GetWidth(), sz.GetHeight(), depth); } + virtual bool Create(int width, int height, const wxDC& WXUNUSED(dc)) + { return Create(width,height); } + + virtual bool Create( const void* pData + ,wxBitmapType lType + ,int nWidth + ,int nHeight + ,int nDepth = 1 + ); + virtual bool LoadFile( int nId + ,wxBitmapType lType = wxBITMAP_DEFAULT_TYPE + ); + virtual bool LoadFile( const wxString& rName + ,wxBitmapType lType = wxBITMAP_DEFAULT_TYPE + ); + virtual bool SaveFile( const wxString& rName + ,wxBitmapType lType + ,const wxPalette* pCmap = NULL + ); + + inline wxBitmapRefData* GetBitmapData() const + { return (wxBitmapRefData *)m_refData; } + + // raw bitmap access support functions + void *GetRawData(wxPixelDataBase& data, int bpp); + void UngetRawData(wxPixelDataBase& data); + + inline int GetQuality() const + { return (GetBitmapData() ? GetBitmapData()->m_nQuality : 0); } + + void SetQuality(int nQ); + + wxPalette* GetPalette() const + { return (GetBitmapData() ? (& GetBitmapData()->m_vBitmapPalette) : NULL); } + + void SetPalette(const wxPalette& rPalette); + + inline wxMask* GetMask() const + { return (GetBitmapData() ? GetBitmapData()->m_pBitmapMask : NULL); } + + void SetMask(wxMask* pMask) ; + + // Implementation +public: + inline void SetHBITMAP(WXHBITMAP hBmp) + { SetHandle((WXHANDLE)hBmp); } + + inline WXHBITMAP GetHBITMAP() const + { return (WXHBITMAP)GetHandle(); } + + inline void SetSelectedInto(wxDC* pDc) + { if (GetBitmapData()) GetBitmapData()->m_pSelectedInto = pDc; } + + inline wxDC* GetSelectedInto() const + { return (GetBitmapData() ? GetBitmapData()->m_pSelectedInto : NULL); } + + inline bool IsMono(void) const { return m_bIsMono; } + + // An OS/2 version that probably doesn't do anything like the msw version + wxBitmap GetBitmapForDC(wxDC& rDc) const; + +protected: + // common part of all ctors + void Init(); + + inline virtual wxGDIImageRefData* CreateData() const + { return new wxBitmapRefData; } + + bool CreateFromImage(const wxImage& image, int depth); + + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + bool CopyFromIconOrCursor(const wxGDIImage& rIcon); + + bool m_bIsMono; + DECLARE_DYNAMIC_CLASS(wxBitmap) +}; // end of CLASS wxBitmap + +// ---------------------------------------------------------------------------- +// wxMask: a mono bitmap used for drawing bitmaps transparently. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMask : public wxObject +{ +public: + wxMask(); + wxMask( const wxMask& tocopy); + + // Construct a mask from a bitmap and a colour indicating the transparent + // area + wxMask( const wxBitmap& rBitmap + ,const wxColour& rColour + ); + + // Construct a mask from a bitmap and a palette index indicating the + // transparent area + wxMask( const wxBitmap& rBitmap + ,int nPaletteIndex + ); + + // Construct a mask from a mono bitmap (copies the bitmap). + wxMask(const wxBitmap& rBitmap); + + // construct a mask from the givne bitmap handle + wxMask(WXHBITMAP hBmp) + { m_hMaskBitmap = hBmp; } + + virtual ~wxMask(); + + bool Create( const wxBitmap& bitmap + ,const wxColour& rColour + ); + bool Create( const wxBitmap& rBitmap + ,int nPaletteIndex + ); + bool Create(const wxBitmap& rBitmap); + + // Implementation + WXHBITMAP GetMaskBitmap() const + { return m_hMaskBitmap; } + void SetMaskBitmap(WXHBITMAP hBmp) + { m_hMaskBitmap = hBmp; } + +protected: + WXHBITMAP m_hMaskBitmap; + DECLARE_DYNAMIC_CLASS(wxMask) +}; // end of CLASS wxMask + +// ---------------------------------------------------------------------------- +// wxBitmapHandler is a class which knows how to load/save bitmaps to/from file +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapHandler : public wxGDIImageHandler +{ +public: + inline wxBitmapHandler() + { m_lType = wxBITMAP_TYPE_INVALID; } + + inline wxBitmapHandler( const wxString& rName + ,const wxString& rExt + ,wxBitmapType lType + ) + : wxGDIImageHandler( rName + ,rExt + ,lType) + { + } + + // keep wxBitmapHandler derived from wxGDIImageHandler compatible with the + // old class which worked only with bitmaps + virtual bool Create( wxBitmap* pBitmap + ,const void* pData + ,wxBitmapType lType + ,int nWidth + ,int nHeight + ,int nDepth = 1 + ); + virtual bool LoadFile( wxBitmap* pBitmap + ,int nId + ,wxBitmapType lType + ,int nDesiredWidth + ,int nDesiredHeight + ); + virtual bool LoadFile( wxBitmap* pBitmap + ,const wxString& rName + ,wxBitmapType lType + ,int nDesiredWidth + ,int nDesiredHeight + ); + virtual bool SaveFile( wxBitmap* pBitmap + ,const wxString& rName + ,wxBitmapType lType + ,const wxPalette* pPalette = NULL + ) const; + + virtual bool Create( wxGDIImage* pImage + ,const void* pData + ,wxBitmapType lFlags + ,int nWidth + ,int nHeight + ,int nDepth = 1 + ); + virtual bool Load( wxGDIImage* pImage + ,int nId + ,wxBitmapType lFlags + ,int nDesiredWidth + ,int nDesiredHeight + ); + virtual bool Save( const wxGDIImage* pImage + ,const wxString& rName + ,wxBitmapType lType + ) const; +private: + inline virtual bool Load( wxGDIImage* WXUNUSED(pImage) + ,const wxString& WXUNUSED(rName) + ,WXHANDLE WXUNUSED(hPs) + ,wxBitmapType WXUNUSED(lFlags) + ,int WXUNUSED(nDesiredWidth) + ,int WXUNUSED(nDesiredHeight) + ) + { return false; } + DECLARE_DYNAMIC_CLASS(wxBitmapHandler) +}; // end of CLASS wxBitmapHandler + +#endif + // _WX_BITMAP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/blank.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/blank.ptr new file mode 100644 index 0000000000..bc209be62b Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/blank.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/bmpbuttn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/bmpbuttn.h new file mode 100644 index 0000000000..1b7c5ab278 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/bmpbuttn.h @@ -0,0 +1,88 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/bmpbuttn.h +// Purpose: wxBitmapButton class +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BMPBUTTN_H_ +#define _WX_BMPBUTTN_H_ + +#include "wx/button.h" +#include "wx/dcclient.h" + +WXDLLIMPEXP_DATA_CORE(extern const char) wxButtonNameStr[]; + +#define wxDEFAULT_BUTTON_MARGIN 4 + +class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase +{ +public: + inline wxBitmapButton() + { + m_marginX = wxDEFAULT_BUTTON_MARGIN; + m_marginY = wxDEFAULT_BUTTON_MARGIN; + } + inline wxBitmapButton( wxWindow* pParent + ,wxWindowID vId + ,const wxBitmap& rBitmap + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxBU_AUTODRAW + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxButtonNameStr + ) + { + Create( pParent + ,vId + ,rBitmap + ,rPos + ,rSize + ,lStyle + ,rValidator + ,rsName + ); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxBitmap& rBitmap + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxBU_AUTODRAW + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxButtonNameStr + ); + + virtual void SetLabel(const wxBitmap& rBitmap) + { + SetBitmapLabel(rBitmap); + } + + // + // Implementation + // + virtual bool OS2OnDraw(WXDRAWITEMSTRUCT* pItem); + +private: + + virtual void DrawFace( wxClientDC& rDC + ,bool bSel + ); + virtual void DrawButtonFocus(wxClientDC& rDC); + virtual void DrawButtonDisable( wxClientDC& rDC + ,wxBitmap& rBmp + ); + DECLARE_DYNAMIC_CLASS(wxBitmapButton) + + virtual void SetLabel(const wxString& rsString) + { + wxButton::SetLabel(rsString); + } +}; // end of CLASS wxBitmapButton + +#endif // _WX_BMPBUTTN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/brush.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/brush.h new file mode 100644 index 0000000000..a94d111289 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/brush.h @@ -0,0 +1,68 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/brush.h +// Purpose: wxBrush class +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BRUSH_H_ +#define _WX_BRUSH_H_ + +#include "wx/bitmap.h" + +// Brush +class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase +{ +public: + wxBrush(); + wxBrush(const wxColour& rCol, wxBrushStyle nStyle = wxBRUSHSTYLE_SOLID); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) ); +#endif + wxBrush(const wxBitmap& rStipple); + virtual ~wxBrush(); + + bool operator == (const wxBrush& rBrush) const; + inline bool operator != (const wxBrush& rBrush) const { return !(*this == rBrush); } + + virtual void SetColour(const wxColour& rColour); + virtual void SetColour(unsigned char cRed, unsigned char cGreen, unsigned char cBrush); + virtual void SetPS(HPS hPS); + virtual void SetStyle(wxBrushStyle nStyle); + virtual void SetStipple(const wxBitmap& rStipple); + + wxColour GetColour(void) const; + wxBrushStyle GetStyle(void) const; + wxBitmap* GetStipple(void) const; + int GetPS(void) const; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxBrushStyle)style); } +#endif + + // + // Implementation + // + + // + // Useful helper: create the brush resource + // + bool RealizeResource(void); + virtual WXHANDLE GetResourceHandle(void) const; + bool FreeResource(bool bForce = false); + bool IsFree(void) const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxBrush) +}; // end of CLASS wxBrush + +#endif + // _WX_BRUSH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/bullseye.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/bullseye.ptr new file mode 100644 index 0000000000..ce684b465b Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/bullseye.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/button.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/button.h new file mode 100644 index 0000000000..134c4ce017 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/button.h @@ -0,0 +1,95 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/button.h +// Purpose: wxButton class +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BUTTON_H_ +#define _WX_BUTTON_H_ + +#include "wx/control.h" + +// Pushbutton +class WXDLLIMPEXP_CORE wxButton: public wxButtonBase +{ +public: + inline wxButton() {} + inline wxButton( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsLabel = wxEmptyString + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxButtonNameStr + ) + { + Create( pParent + ,vId + ,rsLabel + ,rPos + ,rSize + ,lStyle + ,rValidator + ,rsName + ); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsLabel = wxEmptyString + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxButtonNameStr + ); + + virtual ~wxButton(); + + virtual wxWindow *SetDefault(); + + static wxSize GetDefaultSize(void); + virtual void Command(wxCommandEvent& rEvent); + virtual bool OS2Command( WXUINT uParam + ,WXWORD vId + ); + virtual WXHBRUSH OnCtlColor( WXHDC hDC + ,WXHWND hWnd + ,WXUINT uCtlColor + ,WXUINT uMessage + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + void MakeOwnerDrawn(void); + + virtual MRESULT WindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + +protected: + + bool SendClickEvent(void); + void SetTmpDefault(void); + void UnsetTmpDefault(void); + + static void SetDefaultStyle( wxButton* pButton + ,bool bOn + ); + + virtual wxSize DoGetBestSize(void) const; + virtual WXDWORD OS2GetStyle( long style + ,WXDWORD* exstyle + ) const; +private: + DECLARE_DYNAMIC_CLASS(wxButton) +}; // end of CLASS wxButton + +#endif + // _WX_BUTTON_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/cdrom.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/cdrom.ico new file mode 100644 index 0000000000..e9e2364af1 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/cdrom.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/checkbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/checkbox.h new file mode 100644 index 0000000000..6514fdd2d5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/checkbox.h @@ -0,0 +1,116 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/checkbox.h +// Purpose: wxCheckBox class +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHECKBOX_H_ +#define _WX_CHECKBOX_H_ + +#include "wx/control.h" + +// Checkbox item (single checkbox) +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase +{ + public: + inline wxCheckBox() { } + inline wxCheckBox( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxCheckBoxNameStr + ) + { + Create( pParent + ,vId + ,rsLabel + ,rPos + ,rSize + ,lStyle + ,rValidator + ,rsName + ); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxCheckBoxNameStr + ); + + virtual void SetValue(bool bValue); + virtual bool GetValue(void) const ; + + virtual bool OS2Command( WXUINT uParam + ,WXWORD wId + ); + virtual void SetLabel(const wxString& rsLabel); + virtual void Command(wxCommandEvent& rEvent); + +protected: + virtual wxSize DoGetBestSize(void) const; +private: + DECLARE_DYNAMIC_CLASS(wxCheckBox) +}; + +class WXDLLIMPEXP_CORE wxBitmapCheckBox: public wxCheckBox +{ + public: + + inline wxBitmapCheckBox() { m_nCheckWidth = -1; m_nCheckHeight = -1; } + inline wxBitmapCheckBox( wxWindow* pParent + ,wxWindowID vId + ,const wxBitmap* pLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxCheckBoxNameStr + ) + { + Create( pParent + ,vId + ,pLabel + ,rPos + ,rSize + ,lStyle + ,rValidator + ,rsName + ); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxBitmap* pLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxCheckBoxNameStr + ); + + virtual void SetLabel(const wxBitmap& rBitmap); + + int m_nCheckWidth; + int m_nCheckHeight; + +private: + + virtual void SetLabel(const wxString& rsString) + { wxCheckBox::SetLabel(rsString); } + DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox) +}; +#endif + // _WX_CHECKBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/checklst.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/checklst.h new file mode 100644 index 0000000000..04e5249509 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/checklst.h @@ -0,0 +1,88 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/checklst.h +// Purpose: wxCheckListBox class - a listbox with checkable items +// Note: this is an optional class. +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHECKLST_H_ +#define _WX_CHECKLST_H_ + +#include <stddef.h> + +#include "wx/defs.h" + +class wxOwnerDrawn; // so the compiler knows, it is a class. + +class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase +{ +public: + // + // Ctors + // + wxCheckListBox(); + wxCheckListBox( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& vSize = wxDefaultSize + ,int nStrings = 0 + ,const wxString asChoices[] = NULL + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxListBoxNameStr + ); + wxCheckListBox( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos + ,const wxSize& vSize + ,const wxArrayString& asChoices + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxListBoxNameStr + ); + + // + // Override base class virtuals + // + virtual void Delete(unsigned int n); + + virtual bool SetFont(const wxFont &rFont); + + // + // Items may be checked + // + bool IsChecked(unsigned int uiIndex) const; + void Check(unsigned int uiIndex, bool bCheck = true); + + // + // Accessors + // + size_t GetItemHeight(void) 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(size_t n); + virtual long OS2OnMeasure(WXMEASUREITEMSTRUCT* pItem); + + // + // Pressing space or clicking the check box toggles the item + // + void OnChar(wxKeyEvent& rEvent); + void OnLeftClick(wxMouseEvent& rEvent); + +private: + size_t m_nItemHeight; // height of checklistbox items (the same for all) + + DECLARE_DYNAMIC_CLASS(wxCheckListBox) + DECLARE_EVENT_TABLE() +}; // end of CLASS wxCheckListBox + +#endif + // _WX_CHECKLST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/child.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/child.ico new file mode 100644 index 0000000000..6d94514c93 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/child.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/chkconf.h new file mode 100644 index 0000000000..3a9151853b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/chkconf.h @@ -0,0 +1,47 @@ +/* + * Name: wx/os2/chkconf.h + * Purpose: Compiler-specific configuration checking + * Author: Julian Smart + * Modified by: + * Created: 01/02/97 + * Copyright: (c) Julian Smart + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_OS2_CHKCONF_H_ +#define _WX_OS2_CHKCONF_H_ + +/* + wxDisplay is not implemented for OS/2, use stub common version instead. + */ +#if wxUSE_DISPLAY +# undef wxUSE_DISPLAY +# define wxUSE_DISPLAY 0 +#endif /* wxUSE_DISPLAY */ + +/* Watcom builds for OS/2 port are setup.h driven and setup.h is + automatically generated from include/wx/setup_inc.h so we have + to disable here features not supported currently or enable + features required */ +#ifdef __WATCOMC__ + +#if wxUSE_STACKWALKER +# undef wxUSE_STACKWALKER +# define wxUSE_STACKWALKER 0 +#endif /* wxUSE_STACKWALKER */ + +#if !wxUSE_POSTSCRIPT +# undef wxUSE_POSTSCRIPT +# define wxUSE_POSTSCRIPT 1 +#endif + +#if wxUSE_MS_HTML_HELP +# undef wxUSE_MS_HTML_HELP +# define wxUSE_MS_HTML_HELP 0 +#endif + +#endif /* __WATCOM__ */ + +#endif /* _WX_OS2_CHKCONF_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/choice.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/choice.h new file mode 100644 index 0000000000..2a5e3ae4cc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/choice.h @@ -0,0 +1,134 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/choice.h +// Purpose: wxChoice class +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHOICE_H_ +#define _WX_CHOICE_H_ + +// ---------------------------------------------------------------------------- +// Choice item +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxChoice: public wxChoiceBase +{ + DECLARE_DYNAMIC_CLASS(wxChoice) + +public: + // ctors + inline wxChoice() { } + virtual ~wxChoice(); + + inline wxChoice( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,int n = 0 + ,const wxString asChoices[] = NULL + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxChoiceNameStr + ) + { + Create( pParent + ,vId + ,rPos + ,rSize + ,n + ,asChoices + ,lStyle + ,rValidator + ,rsName + ); + } + + inline wxChoice( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos + ,const wxSize& rSize + ,const wxArrayString& asChoices + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxChoiceNameStr + ) + { + Create( pParent + ,vId + ,rPos + ,rSize + ,asChoices + ,lStyle + ,rValidator + ,rsName + ); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,int n = 0 + ,const wxString asChoices[] = NULL + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxChoiceNameStr + ); + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos + ,const wxSize& rSize + ,const wxArrayString& asChoices + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxChoiceNameStr + ); + + // + // Implement base class virtuals + // + virtual void DoDeleteOneItem(unsigned int n); + virtual void DoClear(void); + + virtual unsigned int GetCount() const; + virtual int GetSelection(void) const; + virtual void SetSelection(int n); + + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& rsStr); + + // + // OS2 only + // + virtual bool OS2Command( WXUINT uParam + ,WXWORD wId + ); + MRESULT OS2WindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + +protected: + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, + wxClientDataType type); + + virtual void DoSetItemClientData(unsigned int n, void* pClientData); + virtual void* DoGetItemClientData(unsigned int n) const; + virtual wxSize DoGetBestSize(void) const; + virtual void DoSetSize( int nX + ,int nY + ,int nWidth + ,int nHeight + ,int nsizeFlags = wxSIZE_AUTO + ); + void Free(void); +}; // end of CLASS wxChoice + +#endif // _WX_CHOICE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/clipbrd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/clipbrd.h new file mode 100644 index 0000000000..ddd31b872c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/clipbrd.h @@ -0,0 +1,95 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/clipbrd.h +// Purpose: Clipboard functionality. +// Note: this functionality is under review, and +// is derived from wxWidgets 1.xx code. Please contact +// the wxWidgets developers for further information. +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CLIPBRD_H_ +#define _WX_CLIPBRD_H_ + +#if wxUSE_CLIPBOARD + +#include "wx/list.h" +#include "wx/module.h" +#include "wx/dataobj.h" // for wxDataFormat + +// These functions superceded by wxClipboard, but retained in order to +// implement wxClipboard, and for compatibility. + +// open/close the clipboard +WXDLLIMPEXP_CORE bool wxOpenClipboard(); +WXDLLIMPEXP_CORE bool wxIsClipboardOpened(); +#define wxClipboardOpen wxIsClipboardOpened +WXDLLIMPEXP_CORE bool wxCloseClipboard(); + +// get/set data +WXDLLIMPEXP_CORE bool wxEmptyClipboard(); +WXDLLIMPEXP_CORE bool wxSetClipboardData(wxDataFormat dataFormat, + const void *data, + int width = 0, int height = 0); +WXDLLIMPEXP_CORE void* wxGetClipboardData(wxDataFormat dataFormat, + long *len = NULL); + +// clipboard formats +WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat); +WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat); +WXDLLIMPEXP_CORE int wxRegisterClipboardFormat(wxChar *formatName); +WXDLLIMPEXP_CORE bool wxGetClipboardFormatName(wxDataFormat dataFormat, + wxChar *formatName, + int maxCount); + +//----------------------------------------------------------------------------- +// wxClipboard +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxDataObject; +class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase +{ + DECLARE_DYNAMIC_CLASS(wxClipboard) + +public: + wxClipboard(); + virtual ~wxClipboard(); + + // open the clipboard before SetData() and GetData() + virtual bool Open(); + + // close the clipboard after SetData() and GetData() + virtual void Close(); + + // query whether the clipboard is opened + virtual bool IsOpened() const; + + // set the clipboard data. all other formats will be deleted. + virtual bool SetData( wxDataObject *data ); + + // add to the clipboard data. + virtual bool AddData( wxDataObject *data ); + + // ask if data in correct format is available + virtual bool IsSupported( const wxDataFormat& format ); + + // fill data with data on the clipboard (if available) + virtual bool GetData( wxDataObject& data ); + + // clears wxTheClipboard and the system's clipboard if possible + virtual void Clear(); + + // flushes the clipboard: this means that the data which is currently on + // clipboard will stay available even after the application exits (possibly + // eating memory), otherwise the clipboard will be emptied on exit + virtual bool Flush(); + +private: + bool m_clearOnExit; +}; + +#endif // wxUSE_CLIPBOARD +#endif // _WX_CLIPBRD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/clock.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/clock.ptr new file mode 100644 index 0000000000..45ac051667 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/clock.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/colour.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/colour.h new file mode 100644 index 0000000000..857e533c41 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/colour.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/colour.h +// Purpose: wxColour class +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLOUR_H_ +#define _WX_COLOUR_H_ + +#include "wx/object.h" + +// Colour +class WXDLLIMPEXP_CORE wxColour: public wxColourBase +{ +public: + // constructors + // ------------ + DEFINE_STD_WXCOLOUR_CONSTRUCTORS + + // Copy ctors and assignment operators + wxColour(const wxColour& rCol); + wxColour(const wxColour* pCol); + wxColour&operator = (const wxColour& rCol); + + // Dtor + virtual ~wxColour(); + + // Accessors + virtual bool IsOk(void) const { return m_bIsInit; } + + unsigned char Red(void) const { return m_cRed; } + unsigned char Green(void) const { return m_cGreen; } + unsigned char Blue(void) const { return m_cBlue; } + + // Comparison + bool operator == (const wxColour& rColour) const + { + return (m_bIsInit == rColour.m_bIsInit + && m_cRed == rColour.m_cRed + && m_cGreen == rColour.m_cGreen + && m_cBlue == rColour.m_cBlue + ); + } + + bool operator != (const wxColour& rColour) const { return !(*this == rColour); } + + WXCOLORREF GetPixel(void) const { return m_vPixel; } + + +private: + + // Helper function + void Init(); + + bool m_bIsInit; + unsigned char m_cRed; + unsigned char m_cBlue; + unsigned char m_cGreen; + + virtual void + InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); + +public: + WXCOLORREF m_vPixel ; +private: + DECLARE_DYNAMIC_CLASS(wxColour) +}; // end of class wxColour + +#endif + // _WX_COLOUR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/colours.bmp b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/colours.bmp new file mode 100644 index 0000000000..62d1f8045f Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/colours.bmp differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/combobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/combobox.h new file mode 100644 index 0000000000..0678cd791c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/combobox.h @@ -0,0 +1,137 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/combobox.h +// Purpose: wxComboBox class +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COMBOBOX_H_ +#define _WX_COMBOBOX_H_ + +#include "wx/choice.h" +#include "wx/textentry.h" + +#if wxUSE_COMBOBOX + +// Combobox item +class WXDLLIMPEXP_CORE wxComboBox : public wxChoice, + public wxTextEntry +{ + + public: + inline wxComboBox() {} + + inline wxComboBox( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsValue = wxEmptyString + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,int n = 0 + ,const wxString asChoices[] = NULL + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxComboBoxNameStr + ) + { + Create( pParent + ,vId + ,rsValue + ,rPos + ,rSize + ,n + ,asChoices + ,lStyle + ,rValidator + ,rsName + ); + } + + inline wxComboBox( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsValue + ,const wxPoint& rPos + ,const wxSize& rSize + ,const wxArrayString& asChoices + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxComboBoxNameStr + ) + { + Create( pParent + ,vId + ,rsValue + ,rPos + ,rSize + ,asChoices + ,lStyle + ,rValidator + ,rsName + ); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsValue = wxEmptyString + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,int n = 0 + ,const wxString asChoices[] = NULL + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxComboBoxNameStr + ); + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsValue + ,const wxPoint& rPos + ,const wxSize& rSize + ,const wxArrayString& asChoices + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxComboBoxNameStr + ); + + // See wxComboBoxBase discussion of IsEmpty(). + bool IsListEmpty() const { return wxItemContainer::IsEmpty(); } + bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); } + + // resolve ambiguities among virtual functions inherited from both base + // classes + virtual void Clear(); + virtual wxString GetValue() const; + virtual void SetValue(const wxString& value); + virtual wxString GetStringSelection() const + { return wxChoice::GetStringSelection(); } + + inline virtual void SetSelection(int n) { wxChoice::SetSelection(n); } + virtual void SetSelection(long from, long to) + { wxTextEntry::SetSelection(from, to); } + virtual int GetSelection() const { return wxChoice::GetSelection(); } + virtual void GetSelection(long *from, long *to) const + { wxTextEntry::GetSelection(from, to); } + + virtual bool IsEditable() const; + + virtual bool OS2Command( WXUINT uParam + ,WXWORD wId + ); + bool ProcessEditMsg( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + +private: + // implement wxTextEntry pure virtual methods + virtual wxWindow *GetEditableWindow() { return this; } + virtual WXHWND GetEditHWND() const { return m_hWnd; } + + DECLARE_DYNAMIC_CLASS(wxComboBox) +}; // end of CLASS wxComboBox + +#endif // wxUSE_COMBOBOX +#endif + // _WX_COMBOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/computer.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/computer.ico new file mode 100644 index 0000000000..07d8e0e29a Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/computer.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/control.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/control.h new file mode 100644 index 0000000000..0d799ed1cc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/control.h @@ -0,0 +1,129 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/control.h +// Purpose: wxControl class +// Author: David Webster +// Modified by: +// Created: 09/17/99 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CONTROL_H_ +#define _WX_CONTROL_H_ + +#include "wx/dynarray.h" + +// General item class +class WXDLLIMPEXP_CORE wxControl : public wxControlBase +{ + DECLARE_ABSTRACT_CLASS(wxControl) + +public: + wxControl(); + wxControl( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxControlNameStr + ) + { + Create( pParent, vId, rPos, rSize, lStyle, rValidator, rsName ); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxControlNameStr + ); + + virtual void SetLabel(const wxString& rsLabel); + virtual wxString GetLabel() const { return m_label; } + + // + // Simulates an event + // + virtual void Command(wxCommandEvent& rEvent) { ProcessCommand(rEvent); } + + // + // Implementation from now on + // -------------------------- + // + + // + // Calls the callback and appropriate event handlers + // + bool ProcessCommand(wxCommandEvent& rEvent); + + // + // For ownerdraw items + // + virtual bool OS2OnDraw(WXDRAWITEMSTRUCT* WXUNUSED(pItem)) { return false; } + virtual long OS2OnMeasure(WXMEASUREITEMSTRUCT* WXUNUSED(pItem)) { return 0L; } + + wxArrayLong& GetSubcontrols() { return m_aSubControls; } + void OnEraseBackground(wxEraseEvent& rEvent); + virtual WXHBRUSH OnCtlColor( WXHDC hDC + ,WXHWND pWnd + ,WXUINT nCtlColor + ,WXUINT uMessage + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + +public: + // + // For controls like radiobuttons which are really composite + // + wxArrayLong m_aSubControls; + + virtual wxSize DoGetBestSize(void) const; + + // + // Create the control of the given PM class + // + bool OS2CreateControl( const wxChar* zClassname + ,const wxString& rsLabel + ,const wxPoint& rPos + ,const wxSize& rSize + ,long lStyle + ); + // + // Create the control of the given class with the given style, returns false + // if creation failed. + // + bool OS2CreateControl( const wxChar* zClassname + ,WXDWORD dwStyle + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,const wxString& rsLabel = wxEmptyString + ,WXDWORD dwExstyle = (WXDWORD)-1 + ); + + // + // Default style for the control include WS_TABSTOP if it AcceptsFocus() + // + virtual WXDWORD OS2GetStyle( long lStyle + ,WXDWORD* pdwExstyle + ) const; + + inline int GetXComp(void) const {return m_nXComp;} + inline int GetYComp(void) const {return m_nYComp;} + inline void SetXComp(const int nXComp) {m_nXComp = nXComp;} + inline void SetYComp(const int nYComp) {m_nYComp = nYComp;} + +private: + int m_nXComp; + int m_nYComp; + + wxString m_label; + WXDWORD m_dwStyle; + + DECLARE_EVENT_TABLE() +}; // end of wxControl + +#endif // _WX_CONTROL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/cross.bmp b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/cross.bmp new file mode 100644 index 0000000000..079cb0dd58 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/cross.bmp differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/csquery.bmp b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/csquery.bmp new file mode 100644 index 0000000000..7a63555268 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/csquery.bmp differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/cursor.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/cursor.h new file mode 100644 index 0000000000..8dd6b02780 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/cursor.h @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/cursor.h +// Purpose: wxCursor class +// Author: David Webster +// Modified by: +// Created: 10/13/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CURSOR_H_ +#define _WX_CURSOR_H_ + +#include "wx/bitmap.h" + +class WXDLLIMPEXP_CORE wxCursorRefData: public wxGDIImageRefData +{ +public: + wxCursorRefData(); + virtual ~wxCursorRefData() { Free(); } + virtual void Free(void); + bool m_bDestroyCursor; +}; // end of CLASS wxCursorRefData + +#define M_CURSORDATA ((wxCursorRefData *)m_refData) +#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData) + +// Cursor +class WXDLLIMPEXP_CORE wxCursor: public wxBitmap +{ +public: + wxCursor(); + + wxCursor(const wxImage& rImage); + + wxCursor( const wxString& rsName + ,wxBitmapType lType = wxCURSOR_DEFAULT_TYPE + ,int nHotSpotX = 0 + ,int nHotSpotY = 0 + ); + wxCursor(wxStockCursor id) { InitFromStock(id); } +#if WXWIN_COMPATIBILITY_2_8 + wxCursor(int id) { InitFromStock((wxStockCursor)id); } +#endif + inline ~wxCursor() { } + + inline WXHCURSOR GetHCURSOR(void) const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); } + inline void SetHCURSOR(WXHCURSOR hCursor) { SetHandle((WXHANDLE)hCursor); } + +protected: + void InitFromStock(wxStockCursor); + inline virtual wxGDIImageRefData* CreateData(void) const { return (new wxCursorRefData); } + +private: + DECLARE_DYNAMIC_CLASS(wxCursor) +}; // end of CLASS wxCursor + +#endif + // _WX_CURSOR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dataform.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dataform.h new file mode 100644 index 0000000000..1d6896c247 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dataform.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/dataform.h +// Purpose: declaration of the wxDataFormat class +// Author: Stefan Csomor +// Modified by: +// Created: 10/21/99 +// Copyright: (c) 1999 Stefan Csomor +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_DATAFORM_H +#define _WX_OS2_DATAFORM_H + +class wxDataFormat +{ +public: + wxDataFormat(unsigned int uFormat = wxDF_INVALID) { m_uFormat = uFormat; } + wxDataFormat(const wxString& zFormat) { SetId(zFormat); } + + wxDataFormat& operator=(unsigned int uFormat) { m_uFormat = uFormat; return(*this); } + wxDataFormat& operator=(const wxDataFormat& rFormat) {m_uFormat = rFormat.m_uFormat; return(*this); } + + // + // Comparison (must have both versions) + // + bool operator==(wxDataFormatId eFormat) const { return (m_uFormat == (unsigned int)eFormat); } + bool operator!=(wxDataFormatId eFormat) const { return (m_uFormat != (unsigned int)eFormat); } + bool operator==(const wxDataFormat& rFormat) const { return (m_uFormat == rFormat.m_uFormat); } + bool operator!=(const wxDataFormat& rFormat) const { return (m_uFormat != rFormat.m_uFormat); } + operator unsigned int(void) const { return m_uFormat; } + + unsigned int GetFormatId(void) const { return (unsigned int)m_uFormat; } + unsigned int GetType(void) const { return (unsigned int)m_uFormat; } + + bool IsStandard(void) const; + + void SetType(unsigned int uType){ m_uFormat = uType; } + + // + // String ids are used for custom types - this SetId() must be used for + // application-specific formats + // + wxString GetId(void) const; + void SetId(const wxString& pId); + +private: + unsigned int m_uFormat; +}; // end of CLASS wxDataFormat + +#endif // _WX_GTK_DATAFORM_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dataobj.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dataobj.h new file mode 100644 index 0000000000..e83ded21bb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dataobj.h @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/dataobj.h +// Purpose: declaration of the wxDataObject +// Author: Stefan Csomor +// Modified by: +// Created: 10/21/99 +// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_DATAOBJ_H_ +#define _WX_OS2_DATAOBJ_H_ + +// ---------------------------------------------------------------------------- +// wxDataObject is the same as wxDataObjectBase under wxGTK +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase +{ +public: + wxDataObject(); + virtual ~wxDataObject(); + + virtual bool IsSupportedFormat( const wxDataFormat& eFormat + ,Direction eDir = Get + ) const + { + return(IsSupported( eFormat + ,eDir + )); + } + + PDRAGITEM GetInterface(void) const {return m_pDataObject;} +private: + PDRAGITEM m_pDataObject; +}; + +#endif // _WX_OS2_DATAOBJ_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dataobj2.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dataobj2.h new file mode 100644 index 0000000000..b3e3d319d4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dataobj2.h @@ -0,0 +1,84 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/dataobj2.h +// Purpose: declaration of standard wxDataObjectSimple-derived classes +// Author: Stefan Csomor (adapted from Robert Roebling's gtk port +// Modified by: +// Created: 10/21/99 +// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_DATAOBJ2_H_ +#define _WX_OS2_DATAOBJ2_H_ + +// ---------------------------------------------------------------------------- +// wxBitmapDataObject is a specialization of wxDataObject for bitmaps +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase +{ +public: + // ctors + wxBitmapDataObject(); + wxBitmapDataObject(const wxBitmap& bitmap); + + // destr + virtual ~wxBitmapDataObject(); + + // override base class virtual to update PNG data too + virtual void SetBitmap(const wxBitmap& bitmap); + + // implement base class pure virtuals + // ---------------------------------- + + virtual size_t GetDataSize() const { return m_pngSize; } + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + +protected: + void Init() { m_pngData = NULL; m_pngSize = 0; } + void Clear() { free(m_pngData); } + void ClearAll() { Clear(); Init(); } + + size_t m_pngSize; + void *m_pngData; + + void DoConvertToPng(); + +private: + // Virtual function hiding supression + size_t GetDataSize(const wxDataFormat& rFormat) const + { return(wxDataObjectSimple::GetDataSize(rFormat)); } + bool GetDataHere(const wxDataFormat& rFormat, void* pBuf) const + { return(wxDataObjectSimple::GetDataHere(rFormat, pBuf)); } + bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf) + { return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); } +}; + +// ---------------------------------------------------------------------------- +// wxFileDataObject is a specialization of wxDataObject for file names +// ---------------------------------------------------------------------------- + +class wxFileDataObject : public wxFileDataObjectBase +{ +public: + // implement base class pure virtuals + // ---------------------------------- + + void AddFile( const wxString &filename ); + + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + +private: + // Virtual function hiding supression + size_t GetDataSize(const wxDataFormat& rFormat) const + { return(wxDataObjectSimple::GetDataSize(rFormat)); } + bool GetDataHere(const wxDataFormat& rFormat, void* pBuf) const + { return(wxDataObjectSimple::GetDataHere(rFormat, pBuf)); } + bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf) + { return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); } +}; + +#endif // _WX_OS2_DATAOBJ2_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dc.h new file mode 100644 index 0000000000..3db23c71b5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dc.h @@ -0,0 +1,407 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/dc.h +// Purpose: wxDC class +// Author: David Webster +// Modified by: +// Created: 08/26/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DC_H_ +#define _WX_DC_H_ + +#include "wx/defs.h" +#include "wx/dc.h" + +// --------------------------------------------------------------------------- +// macros +// --------------------------------------------------------------------------- + +// Logical to device +// Absolute +#define XLOG2DEV(x) (x) +#define YLOG2DEV(y) (y) + +// Relative +#define XLOG2DEVREL(x) (x) +#define YLOG2DEVREL(y) (y) + +// Device to logical +// Absolute +#define XDEV2LOG(x) (x) + +#define YDEV2LOG(y) (y) + +// Relative +#define XDEV2LOGREL(x) (x) +#define YDEV2LOGREL(y) (y) + +/* + * Have the same macros as for XView but not for every operation: + * just for calculating window/viewport extent (a better way of scaling). + */ + +// Logical to device +// Absolute +#define MS_XLOG2DEV(x) LogicalToDevice(x) + +#define MS_YLOG2DEV(y) LogicalToDevice(y) + +// Relative +#define MS_XLOG2DEVREL(x) LogicalToDeviceXRel(x) +#define MS_YLOG2DEVREL(y) LogicalToDeviceYRel(y) + +// Device to logical +// Absolute +#define MS_XDEV2LOG(x) DeviceToLogicalX(x) + +#define MS_YDEV2LOG(y) DeviceToLogicalY(y) + +// Relative +#define MS_XDEV2LOGREL(x) DeviceToLogicalXRel(x) +#define MS_YDEV2LOGREL(y) DeviceToLogicalYRel(y) + +#define YSCALE(y) (yorigin - (y)) + +#define wx_round(a) (int)((a)+.5) + +#if wxUSE_DC_CACHEING +/* + * Cached blitting, maintaining a cache + * of bitmaps required for transparent blitting + * instead of constant creation/deletion + */ + +class wxDCCacheEntry : public wxObject +{ +public: + wxDCCacheEntry( WXHBITMAP hBitmap + ,int nWidth + ,int nHeight + ,int nDepth + ); + wxDCCacheEntry( HPS hPS + ,int nDepth + ); + virtual ~wxDCCacheEntry(); + + WXHBITMAP m_hBitmap; + HPS m_hPS; + int m_nWidth; + int m_nHeight; + int m_nDepth; +}; // end of CLASS wxDCCacheEntry +#endif + +// this is an ABC: use one of the derived classes to create a DC associated +// with a window, screen, printer and so on +class WXDLLIMPEXP_CORE wxPMDCImpl : public wxDCImpl +{ + DECLARE_DYNAMIC_CLASS(wxDC) + +public: + wxPMDCImpl(wxDC *owner, WXHDC hDC); + virtual ~wxPMDCImpl(); + + // implement base class pure virtuals + // ---------------------------------- + + virtual void Clear(); + + virtual bool StartDoc(const wxString& rsMessage); + virtual void EndDoc(); + + virtual void StartPage(); + virtual void EndPage(); + + virtual void SetFont(const wxFont& rFont); + virtual void SetPen(const wxPen& rPen); + virtual void SetBrush(const wxBrush& rBrush); + virtual void SetBackground(const wxBrush& rBrush); + virtual void SetBackgroundMode(int nMode); + virtual void SetPalette(const wxPalette& rPalette); + + virtual void DestroyClippingRegion(); + + virtual wxCoord GetCharHeight() const; + virtual wxCoord GetCharWidth() const; + + virtual bool CanDrawBitmap() const; + virtual bool CanGetTextExtent() const; + virtual int GetDepth() const; + virtual wxSize GetPPI() const; + + virtual void SetMapMode(wxMappingMode nMode); + virtual void SetUserScale( double dX + ,double dY + ); + virtual void SetLogicalScale( double dX + ,double dY + ); + virtual void SetLogicalOrigin( wxCoord vX + ,wxCoord vY + ); + virtual void SetDeviceOrigin( wxCoord vX + ,wxCoord vY + ); + virtual void SetAxisOrientation( bool bXLeftRight + ,bool bYBottomUp + ); + virtual void SetLogicalFunction(wxRasterOperationMode nFunction); + + // implementation from now on + // -------------------------- + + virtual void SetRop(WXHDC hCdc); + virtual void SelectOldObjects(WXHDC hDc); + + wxWindow* GetWindow() const { return m_pCanvas; } + void SetWindow(wxWindow* pWin) { m_pCanvas = pWin; } + + WXHDC GetHDC() const { return m_hDC; } + void SetHDC( WXHDC hDc + ,bool bOwnsDC = FALSE + ) + { + m_hDC = hDc; + m_bOwnsDC = bOwnsDC; + } + + HPS GetHPS() const { return m_hPS; } + void SetHPS(HPS hPS) + { + m_hPS = hPS; + } + const wxBitmap& GetSelectedBitmap() const { return m_vSelectedBitmap; } + wxBitmap& GetSelectedBitmap() { return m_vSelectedBitmap; } + + void UpdateClipBox(); + +#if wxUSE_DC_CACHEING + static wxDCCacheEntry* FindBitmapInCache( HPS hPS + ,int nWidth + ,int nHeight + ); + static wxDCCacheEntry* FindDCInCache( wxDCCacheEntry* pNotThis + ,HPS hPS + ); + + static void AddToBitmapCache(wxDCCacheEntry* pEntry); + static void AddToDCCache(wxDCCacheEntry* pEntry); + static void ClearCache(); +#endif + +protected: + void Init() + { + m_pCanvas = NULL; + m_hOldBitmap = 0; + m_hOldPen = 0; + m_hOldBrush = 0; + m_hOldFont = 0; +#if wxUSE_PALETTE + m_hOldPalette = 0; +#endif // wxUSE_PALETTE + + m_bOwnsDC = false; + m_hDC = 0; + m_hOldPS = NULL; + m_hPS = NULL; + m_bIsPaintTime = false; // True at Paint Time + + m_pen.SetColour(*wxBLACK); + m_brush.SetColour(*wxWHITE); + } + + // create an uninitialized DC: this should be only used by the derived + // classes + wxPMDCImpl( wxDC *owner ) : wxDCImpl( owner ) { Init(); } + +public: + virtual void DoGetTextExtent( const wxString& rsString + ,wxCoord* pX + ,wxCoord* pY + ,wxCoord* pDescent = NULL + ,wxCoord* pExternalLeading = NULL + ,const wxFont* pTheFont = NULL + ) const; + virtual bool DoFloodFill( wxCoord vX + ,wxCoord vY + ,const wxColour& rCol + ,wxFloodFillStyle nStyle = wxFLOOD_SURFACE + ); + + virtual bool DoGetPixel( wxCoord vX + ,wxCoord vY + ,wxColour* pCol + ) const; + + virtual void DoDrawPoint( wxCoord vX + ,wxCoord vY + ); + virtual void DoDrawLine( wxCoord vX1 + ,wxCoord vY1 + ,wxCoord vX2 + ,wxCoord vY2 + ); + + virtual void DoDrawArc( wxCoord vX1 + ,wxCoord vY1 + ,wxCoord vX2 + ,wxCoord vY2 + ,wxCoord vXc + ,wxCoord vYc + ); + virtual void DoDrawCheckMark( wxCoord vX + ,wxCoord vY + ,wxCoord vWidth + ,wxCoord vHeight + ); + virtual void DoDrawEllipticArc( wxCoord vX + ,wxCoord vY + ,wxCoord vW + ,wxCoord vH + ,double dSa + ,double dEa + ); + + virtual void DoDrawRectangle( wxCoord vX + ,wxCoord vY + ,wxCoord vWidth + ,wxCoord vHeight + ); + virtual void DoDrawRoundedRectangle( wxCoord vX + ,wxCoord vY + ,wxCoord vWidth + ,wxCoord vHeight + ,double dRadius + ); + virtual void DoDrawEllipse( wxCoord vX + ,wxCoord vY + ,wxCoord vWidth + ,wxCoord vHeight + ); + + virtual void DoCrossHair( wxCoord vX + ,wxCoord vY + ); + + virtual void DoDrawIcon( const wxIcon& rIcon + ,wxCoord vX + ,wxCoord vY + ); + virtual void DoDrawBitmap( const wxBitmap& rBmp + ,wxCoord vX + ,wxCoord vY + ,bool bUseMask = FALSE + ); + + virtual void DoDrawText( const wxString& rsText + ,wxCoord vX + ,wxCoord vY + ); + virtual void DoDrawRotatedText( const wxString& rsText + ,wxCoord vX + ,wxCoord vY + ,double dAngle + ); + + virtual bool DoBlit( wxCoord vXdest + ,wxCoord vYdest + ,wxCoord vWidth + ,wxCoord vHeight + ,wxDC* pSource + ,wxCoord vXsrc + ,wxCoord vYsrc + ,wxRasterOperationMode nRop = wxCOPY + ,bool bUseMask = FALSE + ,wxCoord vXsrcMask = -1 + ,wxCoord vYsrcMask = -1 + ); + + virtual void DoSetClippingRegion( wxCoord vX + ,wxCoord vY + ,wxCoord vWidth + ,wxCoord vHeight + ); + virtual void DoSetDeviceClippingRegion(const wxRegion& rRegion); + + virtual void DoGetSize( int* pWidth + ,int* pHeight + ) const; + virtual void DoGetSizeMM( int* pWidth + ,int* pHeight + ) const; + + virtual void DoDrawLines( int n + ,const wxPoint vaPoints[] + ,wxCoord vXoffset + ,wxCoord yYoffset + ); + virtual void DoDrawPolygon( int n + ,const wxPoint vaPoints[] + ,wxCoord vXoffset + ,wxCoord vYoffset + ,wxPolygonFillMode nFillStyle = wxODDEVEN_RULE + ); + +#if wxUSE_PALETTE + void DoSelectPalette(bool bRealize = FALSE); + void InitializePalette(); +#endif // wxUSE_PALETTE + +protected: + // + // common part of DoDrawText() and DoDrawRotatedText() + // + void DrawAnyText( const wxString& rsText + ,wxCoord vX + ,wxCoord vY + ); + + // OS2-specific member variables ?? do we even need this under OS/2? + int m_nWindowExtX; + int m_nWindowExtY; + + // + // the window associated with this DC (may be NULL) + // + wxWindow* m_pCanvas; + wxBitmap m_vSelectedBitmap; + +public: + // PM specific stuff + HPS m_hPS; + HPS m_hOldPS; // old hPS, if any + bool m_bIsPaintTime;// True at Paint Time + + RECTL m_vRclPaint; // Bounding rectangle at Paint time etc. + // + // TRUE => DeleteDC() in dtor, FALSE => only ReleaseDC() it + // + bool m_bOwnsDC:1; + + // + // our HDC + // + WXHDC m_hDC; + + // + // Store all old GDI objects when do a SelectObject, so we can select them + // back in (this unselecting user's objects) so we can safely delete the + // DC. + // + WXHBITMAP m_hOldBitmap; + WXHPEN m_hOldPen; + WXHBRUSH m_hOldBrush; + WXHFONT m_hOldFont; + WXHPALETTE m_hOldPalette; + +#if wxUSE_DC_CACHEING + static wxList m_svBitmapCache; + static wxList m_svDCCache; +#endif +}; // end of CLASS wxDC +#endif + // _WX_DC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcclient.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcclient.h new file mode 100644 index 0000000000..1770285489 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcclient.h @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/dcclient.h +// Purpose: wxClientDC class +// Author: David Webster +// Modified by: +// Created: 09/12/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCCLIENT_H_ +#define _WX_DCCLIENT_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/dc.h" +#include "wx/os2/dc.h" +#include "wx/dcclient.h" +#include "wx/dynarray.h" + +// ---------------------------------------------------------------------------- +// array types +// ---------------------------------------------------------------------------- + +// this one if used by wxPaintDC only +struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo; + +WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo); + +// ---------------------------------------------------------------------------- +// DC classes +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxPMDCImpl +{ +public: + // default ctor + wxWindowDCImpl( wxDC *owner ); + + // Create a DC corresponding to the whole window + wxWindowDCImpl( wxDC *owner, wxWindow *pWin ); + + virtual void DoGetSize(int *pWidth, int *pHeight) const; + +protected: + // initialize the newly created DC + void InitDC(void); + +private: + SIZEL m_PageSize; + DECLARE_CLASS(wxWindowDCImpl) + wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl); +}; // end of CLASS wxWindowDC + +class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl +{ +public: + // default ctor + wxClientDCImpl( wxDC *owner ); + + // Create a DC corresponding to the client area of the window + wxClientDCImpl( wxDC *owner, wxWindow *pWin ); + + virtual ~wxClientDCImpl(); + + virtual void DoGetSize(int *pWidth, int *pHeight) const; + +protected: + void InitDC(void); + +private: + DECLARE_CLASS(wxClientDCImpl) + wxDECLARE_NO_COPY_CLASS(wxClientDCImpl); +}; // end of CLASS wxClientDC + +class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl +{ +public: + wxPaintDCImpl( wxDC *owner ); + + // Create a DC corresponding for painting the window in OnPaint() + wxPaintDCImpl( wxDC *owner, wxWindow *pWin ); + + virtual ~wxPaintDCImpl(); + + // find the entry for this DC in the cache (keyed by the window) + static WXHDC FindDCInCache(wxWindow* pWin); + +protected: + static wxArrayDCInfo ms_cache; + + // find the entry for this DC in the cache (keyed by the window) + wxPaintDCInfo* FindInCache(size_t* pIndex = NULL) const; +private: + DECLARE_CLASS(wxPaintDCImpl) + wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl); +}; // end of wxPaintDC + +#endif + // _WX_DCCLIENT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcmemory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcmemory.h new file mode 100644 index 0000000000..fb22f0a4d7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcmemory.h @@ -0,0 +1,43 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/dcmemory.h +// Purpose: wxMemoryDC class +// Author: David Webster +// Modified by: +// Created: 09/09/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCMEMORY_H_ +#define _WX_DCMEMORY_H_ + +#include "wx/dcmemory.h" +#include "wx/os2/dc.h" + +class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxPMDCImpl +{ +public: + wxMemoryDCImpl( wxMemoryDC *owner ); + wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ); + wxMemoryDCImpl( wxMemoryDC *owner, wxDC* pDC); // Create compatible DC + + // override some base class virtuals + virtual void DoGetSize(int* pWidth, int* pHeight) const; + virtual void DoSelect(const wxBitmap& bitmap); + + virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const + { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect);} + +protected: + // create DC compatible with the given one or screen if dc == NULL + bool CreateCompatible(wxDC* pDC); + + // initialize the newly created DC + void Init(void); +private: + DECLARE_CLASS(wxMemoryDCImpl) + wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl); +}; // end of CLASS wxMemoryDCImpl + +#endif + // _WX_DCMEMORY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcprint.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcprint.h new file mode 100644 index 0000000000..7baef4a679 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcprint.h @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/dcprint.h +// Purpose: wxPrinterDC class +// Author: David Webster +// Modified by: +// Created: 09/12/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCPRINT_H_ +#define _WX_DCPRINT_H_ + +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/dc.h" +#include "wx/cmndata.h" +#include "wx/os2/dc.h" + +class WXDLLIMPEXP_CORE wxPrinterDCImpl: public wxPMDCImpl +{ + public: + // Create a printer DC + + // Create from print data + wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& rData ); + wxPrinterDCImpl( wxPrinterDC *owner, WXHDC hTheDC); + + // override some base class virtuals + virtual bool StartDoc(const wxString& rsMessage); + virtual void EndDoc(void); + virtual void StartPage(void); + virtual void EndPage(void); + + virtual wxRect GetPaperRect() const; + +protected: + virtual void DoDrawBitmap( const wxBitmap& rBmp + ,wxCoord vX + ,wxCoord vY + ,bool bUseMask = FALSE + ); + virtual bool DoBlit( wxCoord vXdest + ,wxCoord vYdest + ,wxCoord vWidth + ,wxCoord vHeight + ,wxDC* pSource + ,wxCoord vXsrc + ,wxCoord vYsrc + ,wxRasterOperationMode nRop = wxCOPY + ,bool bUseMask = FALSE + ,wxCoord vXsrcMask = -1 + ,wxCoord vYsrcMask = -1 + ); + + // init the dc + void Init(void); + + wxPrintData m_printData; +private: + DECLARE_CLASS(wxPrinterDCImpl) + wxDECLARE_NO_COPY_CLASS(wxPrinterDCImpl); +}; // end of CLASS wxPrinterDC + +// Gets an HDC for the specified printer configuration +WXHDC WXDLLIMPEXP_CORE wxGetPrinterDC(const wxPrintData& rData); + +#endif // wxUSE_PRINTING_ARCHITECTURE + +#endif + // _WX_DCPRINT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcscreen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcscreen.h new file mode 100644 index 0000000000..76b7243f68 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dcscreen.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/dcscreen.h +// Purpose: wxScreenDC class +// Author: David Webster +// Modified by: +// Created: 10/14/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_DCSCREEN_H_ +#define _WX_OS2_DCSCREEN_H_ + +#include "wx/dcscreen.h" +#include "wx/os2/dc.h" + +class WXDLLIMPEXP_CORE wxScreenDCImpl: public wxPMDCImpl +{ + public: + // Create a DC representing the whole screen + wxScreenDCImpl( wxScreenDC *owner ); + + virtual void DoGetSize( int* pnWidth + ,int* pnHeight + ) const; + +private: + DECLARE_CLASS(wxScreenDCImpl) + wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl); +}; // end of CLASS wxScreenDC + +#endif + // _WX_DCSCREEN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dialog.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dialog.h new file mode 100644 index 0000000000..e4136df3c9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dialog.h @@ -0,0 +1,119 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/dialog.h +// Purpose: wxDialog class +// Author: David Webster +// Modified by: +// Created: 10/14/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIALOG_H_ +#define _WX_DIALOG_H_ + +#include "wx/panel.h" + +WXDLLIMPEXP_DATA_CORE(extern const char) wxDialogNameStr[]; + +class WXDLLIMPEXP_FWD_CORE wxDialogModalData; + +// +// Dialog boxes +// +class WXDLLIMPEXP_CORE wxDialog: public wxDialogBase +{ +public: + + inline wxDialog() { Init(); } + + // full ctor + wxDialog(wxWindow *parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, style, name); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxDEFAULT_DIALOG_STYLE + ,const wxString& rsName = wxDialogNameStr + ); + virtual ~wxDialog(); + + // return true if we're showing the dialog modally + virtual bool IsModal() const { return m_modalData != NULL; } + + // show the dialog modally and return the value passed to EndModal() + virtual int ShowModal(); + + // may be called to terminate the dialog with the given return code + virtual void EndModal(int retCode); + + // implementation only from now on + // ------------------------------- + + // override some base class virtuals + virtual bool Show(bool show = true); + + // + // Callbacks + // + virtual MRESULT OS2WindowProc( WXUINT uMessage + ,WXWPARAM wParam + ,WXLPARAM lParam + ); +#if WXWIN_COMPATIBILITY_2_6 + + // Constructor with a modal flag, but no window id - the old convention + wxDEPRECATED( wxDialog( wxWindow* pParent + ,const wxString& rsTitle + ,bool bModal + ,int nX = -1 + ,int nY = -1 + ,int nWidth = 500 + ,int nHeight = 500 + ,long lStyle = wxDEFAULT_DIALOG_STYLE + ,const wxString& rsName = wxDialogNameStr + ) ); + + // just call Show() or ShowModal() + wxDEPRECATED( void SetModal(bool bFlag) ); + + // use IsModal() + wxDEPRECATED( bool IsModalShowing() const ); + +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + // + // Common part of all ctors + // + void Init(void); + +private: + wxWindow* m_pOldFocus; + bool m_endModalCalled; // allow for closing within InitDialog + + // this pointer is non-NULL only while the modal event loop is running + wxDialogModalData *m_modalData; + + // + // While we are showing a modal dialog we disable the other windows using + // this object + // + class wxWindowDisabler* m_pWindowDisabler; + + DECLARE_DYNAMIC_CLASS(wxDialog) + wxDECLARE_NO_COPY_CLASS(wxDialog); +}; // end of CLASS wxDialog + +#endif // _WX_DIALOG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dirdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dirdlg.h new file mode 100644 index 0000000000..fa53c6857f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dirdlg.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/dirdlg.h +// Purpose: wxDirDialog class +// Author: David Webster +// Modified by: +// Created: 10/14/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIRDLG_H_ +#define _WX_DIRDLG_H_ + +#include "wx/dialog.h" + +WXDLLIMPEXP_DATA_CORE(extern const wxChar) wxFileSelectorPromptStr[]; + +class WXDLLIMPEXP_CORE wxDirDialog: public wxDirDialogBase +{ + DECLARE_DYNAMIC_CLASS(wxDirDialog) +public: + wxDirDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultPath = "", + long style = 0, const wxPoint& pos = wxDefaultPosition); + + int ShowModal(); + +protected: + wxWindow * m_parent; +}; + +#endif + // _WX_DIRDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/disable.bmp b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/disable.bmp new file mode 100644 index 0000000000..8859e1b9ae Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/disable.bmp differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dnd.h new file mode 100644 index 0000000000..c70a0d3e53 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/dnd.h @@ -0,0 +1,98 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/dnd.h +// Purpose: declaration of the wxDropTarget class +// Author: David Webster +// Modified by: +// Created: 10/21/99 +// Copyright: (c) 1999 David Webster +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + + +#ifndef __OS2DNDH__ +#define __OS2DNDH__ + +#if !wxUSE_DRAG_AND_DROP + #error "You should #define wxUSE_DRAG_AND_DROP to 1 to compile this file!" +#endif //WX_DRAG_DROP + +#define INCL_WINSTDDRAG +#include <os2.h> +#ifndef __EMX__ +#include <pmstddlg.h> +#endif + +class CIDropTarget; + +//------------------------------------------------------------------------- +// wxDropSource +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase +{ +public: + /* constructor. set data later with SetData() */ + wxDropSource(wxWindow* pWin); + + /* constructor for setting one data object */ + wxDropSource( wxDataObject& rData, + wxWindow* pWin + ); + virtual ~wxDropSource(); + + /* start drag action */ + virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); + virtual bool GiveFeedback(wxDragResult eEffect); + +protected: + void Init(void); + + ULONG m_ulItems; + PDRAGINFO m_pDragInfo; + DRAGIMAGE m_vDragImage; + PDRAGITEM m_pDragItem; + wxWindow* m_pWindow; +}; // end of CLASS wxDropSource + +//------------------------------------------------------------------------- +// wxDropTarget +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropTarget : public wxDropTargetBase +{ +public: + wxDropTarget(wxDataObject* pDataObject = NULL); + virtual ~wxDropTarget(); + + // + // These functions are called when data is moved over position (x, y) and + // may return either wxDragCopy, wxDragMove or wxDragNone depending on + // what would happen if the data were dropped here. + // + // The last parameter is what would happen by default and is determined by + // the platform-specific logic (for example, under Windows it's wxDragCopy + // if Ctrl key is pressed and wxDragMove otherwise) except that it will + // always be wxDragNone if the carried data is in an unsupported format. + // + // OnData must be implemented and other should be overridden by derived classes + // + virtual wxDragResult OnData( wxCoord vX + ,wxCoord vY + ,wxDragResult eResult + ); + virtual bool OnDrop( wxCoord vX + ,wxCoord vY + ); + bool IsAcceptedData(PDRAGINFO pDataSource) const; + +protected: + virtual bool GetData(void); + wxDataFormat GetSupportedFormat(PDRAGINFO pDataSource) const; + void Release(void); + +private: + CIDropTarget* m_pDropTarget; +}; // end of CLASS wxDropTarget + +#endif //__OS2DNDH__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/drive.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/drive.ico new file mode 100644 index 0000000000..06ed593368 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/drive.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/error.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/error.ico new file mode 100644 index 0000000000..d921d22f7a Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/error.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/file.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/file.ico new file mode 100644 index 0000000000..a0769fac51 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/file.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/filedlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/filedlg.h new file mode 100644 index 0000000000..74c789dbf0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/filedlg.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/filedlg.h +// Purpose: wxFileDialog class +// Author: David Webster +// Modified by: +// Created: 10/05/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILEDLG_H_ +#define _WX_FILEDLG_H_ + +//------------------------------------------------------------------------- +// wxFileDialog +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase +{ +DECLARE_DYNAMIC_CLASS(wxFileDialog) +public: + wxFileDialog( wxWindow* pParent + ,const wxString& rsMessage = wxFileSelectorPromptStr + ,const wxString& rsDefaultDir = wxEmptyString + ,const wxString& rsDefaultFile = wxEmptyString + ,const wxString& rsWildCard = wxFileSelectorDefaultWildcardStr + ,long lStyle = wxFD_DEFAULT_STYLE + ,const wxPoint& rPos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr + ); + + virtual void GetPaths(wxArrayString& rasPath) const; + + int ShowModal(); + +protected: + wxArrayString m_fileNames; +}; // end of CLASS wxFileDialog + +#endif // _WX_FILEDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/floppy.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/floppy.ico new file mode 100644 index 0000000000..823094f1e5 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/floppy.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/folder.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/folder.ico new file mode 100644 index 0000000000..317fe37393 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/folder.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/folder1.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/folder1.ico new file mode 100644 index 0000000000..317fe37393 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/folder1.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/folder2.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/folder2.ico new file mode 100644 index 0000000000..b35a1469ec Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/folder2.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/font.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/font.h new file mode 100644 index 0000000000..2d5f39f54f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/font.h @@ -0,0 +1,156 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/font.h +// Purpose: wxFont class +// Author: David Webster +// Modified by: +// Created: 10/06/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONT_H_ +#define _WX_FONT_H_ + +#include "wx/gdiobj.h" +#include "wx/os2/private.h" + +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxEmptyString; + +// ---------------------------------------------------------------------------- +// wxFont +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFont : public wxFontBase +{ +public: + // ctors and such + wxFont() { } + + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxFont(int size, + int family, + int style, + int weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding); + } +#endif + + wxFont(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(size, family, style, weight, underlined, face, encoding); + } + + wxFont(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(10, family, style, weight, underlined, face, encoding); + SetPixelSize(pixelSize); + } + + bool Create(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + + wxFont( const wxNativeFontInfo& rInfo + ,WXHFONT hFont = 0 + ) + + { + (void)Create( rInfo + ,hFont + ); + } + + wxFont(const wxString& rsFontDesc); + + bool Create( const wxNativeFontInfo& rInfo + ,WXHFONT hFont = 0 + ); + + virtual ~wxFont(); + + // + // Implement base class pure virtuals + // + virtual int GetPointSize(void) const; + virtual wxFontStyle GetStyle() const; + virtual wxFontWeight GetWeight() const; + virtual bool GetUnderlined(void) const; + virtual wxString GetFaceName(void) const; + virtual wxFontEncoding GetEncoding(void) const; + virtual const wxNativeFontInfo* GetNativeFontInfo() const; + + virtual void SetPointSize(int nPointSize); + virtual void SetFamily(wxFontFamily family); + virtual void SetStyle(wxFontStyle style); + virtual void SetWeight(wxFontWeight weight); + virtual bool SetFaceName(const wxString& rsFaceName); + virtual void SetUnderlined(bool bUnderlined); + virtual void SetEncoding(wxFontEncoding vEncoding); + + wxDECLARE_COMMON_FONT_METHODS(); + + // + // For internal use only! + // + void SetPS(HPS hPS); + void SetFM( PFONTMETRICS pFM + ,int nNumFonts + ); + // + // Implementation only from now on + // ------------------------------- + // + virtual bool IsFree(void) const; + virtual bool RealizeResource(void); + virtual WXHANDLE GetResourceHandle(void) const; + virtual bool FreeResource(bool bForce = false); + + WXHFONT GetHFONT(void) const; + +protected: + virtual void DoSetNativeFontInfo(const wxNativeFontInfo& rInfo); + virtual wxFontFamily DoGetFamily() const; + + // implement wxObject virtuals which are used by AllocExclusive() + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxFont) +}; // end of wxFont + +#endif // _WX_FONT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/fontdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/fontdlg.h new file mode 100644 index 0000000000..c2e65c10e7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/fontdlg.h @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/fontdlg.h +// Purpose: wxFontDialog class. Use generic version if no +// platform-specific implementation. +// Author: David Webster +// Modified by: +// Created: 10/06/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONTDLG_H_ +#define _WX_FONTDLG_H_ + +#include "wx/dialog.h" + +/* + * Font dialog + */ + +class WXDLLIMPEXP_CORE wxFontDialog: public wxFontDialogBase +{ +public: + wxFontDialog() : wxFontDialogBase() { /* must be Create()d later */ } + wxFontDialog (wxWindow* pParent) : wxFontDialogBase(pParent) { Create(pParent); } + wxFontDialog( wxWindow* pParent + ,const wxFontData& rData + ) + : wxFontDialogBase( pParent + ,rData + ) + { + Create( pParent + ,rData + ); + } + + virtual int ShowModal(); + +#if WXWIN_COMPATIBILITY_2_6 + // + // Deprecated interface, don't use + // + wxDEPRECATED( wxFontDialog( wxWindow* pParent, const wxFontData* pData ) ); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + DECLARE_DYNAMIC_CLASS(wxFontDialog) +}; // end of CLASS wxFontDialog + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated interface, don't use +inline wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData *data) + : wxFontDialogBase(parent) { InitFontData(data); Create(parent); } +#endif // WXWIN_COMPATIBILITY_2_6 + +#endif + // _WX_FONTDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/frame.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/frame.h new file mode 100644 index 0000000000..e337086b95 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/frame.h @@ -0,0 +1,221 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/frame.h +// Purpose: wxFrame class +// Author: David Webster +// Modified by: +// Created: 10/27/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FRAME_H_ +#define _WX_FRAME_H_ + +// +// Get the default resource ID's for frames +// +#include "wx/os2/wxrsc.h" + +class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase +{ +public: + // construction + wxFrame() { Init(); } + wxFrame( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxDEFAULT_FRAME_STYLE + ,const wxString& rsName = wxFrameNameStr + ) + { + Init(); + + Create(pParent, vId, rsTitle, rPos, rSize, lStyle, rsName); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxDEFAULT_FRAME_STYLE + ,const wxString& rsName = wxFrameNameStr + ); + + virtual ~wxFrame(); + + // implement base class pure virtuals +#if wxUSE_MENUS_NATIVE + virtual void SetMenuBar(wxMenuBar* pMenubar); +#endif + virtual bool ShowFullScreen( bool bShow + ,long lStyle = wxFULLSCREEN_ALL + ); + + + // implementation only from now on + // ------------------------------- + + virtual void Raise(void); + + // event handlers + void OnSysColourChanged(wxSysColourChangedEvent& rEvent); + + // Toolbar +#if wxUSE_TOOLBAR + virtual wxToolBar* CreateToolBar( long lStyle = -1 + ,wxWindowID vId = -1 + ,const wxString& rsName = wxToolBarNameStr + ); + + virtual wxToolBar* OnCreateToolBar( long lStyle + ,wxWindowID vId + ,const wxString& rsName + ); + virtual void PositionToolBar(void); +#endif // wxUSE_TOOLBAR + + // Status bar +#if wxUSE_STATUSBAR + virtual wxStatusBar* OnCreateStatusBar( int nNumber = 1 + ,long lStyle = wxSTB_DEFAULT_STYLE + ,wxWindowID vId = 0 + ,const wxString& rsName = wxStatusLineNameStr + ); + virtual void PositionStatusBar(void); + + // Hint to tell framework which status bar to use: the default is to use + // native one for the platforms which support it (Win32), the generic one + // otherwise + + // TODO: should this go into a wxFrameworkSettings class perhaps? + static void UseNativeStatusBar(bool bUseNative) + { m_bUseNativeStatusBar = bUseNative; } + static bool UsesNativeStatusBar() + { return m_bUseNativeStatusBar; } +#endif // wxUSE_STATUSBAR + + WXHMENU GetWinMenu() const { return m_hMenu; } + + // Returns the origin of client area (may be different from (0,0) if the + // frame has a toolbar) + virtual wxPoint GetClientAreaOrigin() const; + + // event handlers + bool HandlePaint(void); + bool HandleSize( int nX + ,int nY + ,WXUINT uFlag + ); + bool HandleCommand( WXWORD wId + ,WXWORD wCmd + ,WXHWND wControl + ); + bool HandleMenuSelect( WXWORD wItem + ,WXWORD wFlags + ,WXHMENU hMenu + ); + + // tooltip management +#if wxUSE_TOOLTIPS + WXHWND GetToolTipCtrl(void) const { return m_hWndToolTip; } + void SetToolTipCtrl(WXHWND hHwndTT) { m_hWndToolTip = hHwndTT; } +#endif // tooltips + + void SetClient(WXHWND c_Hwnd); + void SetClient(wxWindow* c_Window); + wxWindow *GetClient(); + + friend MRESULT EXPENTRY wxFrameWndProc(HWND hWnd,ULONG ulMsg, MPARAM wParam, MPARAM lParam); + friend MRESULT EXPENTRY wxFrameMainWndProc(HWND hWnd,ULONG ulMsg, MPARAM wParam, MPARAM lParam); + +protected: + // common part of all ctors + void Init(void); + + virtual WXHICON GetDefaultIcon(void) const; + // override base class virtuals + virtual void DoGetClientSize( int* pWidth + ,int* pHeight + ) const; + virtual void DoSetClientSize( int nWidth + ,int nWeight + ); + inline virtual bool IsMDIChild(void) const { return FALSE; } + +#if wxUSE_MENUS_NATIVE + // helper + void DetachMenuBar(void); + // perform MSW-specific action when menubar is changed + virtual void AttachMenuBar(wxMenuBar* pMenubar); + // a plug in for MDI frame classes which need to do something special when + // the menubar is set + virtual void InternalSetMenuBar(void); +#endif + // propagate our state change to all child frames + void IconizeChildFrames(bool bIconize); + + // we add menu bar accel processing + bool OS2TranslateMessage(WXMSG* pMsg); + + // window proc for the frames + MRESULT OS2WindowProc( WXUINT uMessage + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + + bool m_bIconized; + WXHICON m_hDefaultIcon; + +#if wxUSE_STATUSBAR + static bool m_bUseNativeStatusBar; +#endif // wxUSE_STATUSBAR + + // Data to save/restore when calling ShowFullScreen + long m_lFsStyle; // Passed to ShowFullScreen + wxRect m_vFsOldSize; + long m_lFsOldWindowStyle; + int m_nFsStatusBarFields; // 0 for no status bar + int m_nFsStatusBarHeight; + int m_nFsToolBarHeight; + bool m_bFsIsMaximized; + bool m_bFsIsShowing; + bool m_bWasMinimized; + bool m_bIsShown; + +private: +#if wxUSE_TOOLTIPS + WXHWND m_hWndToolTip; +#endif // tooltips + + // + // Handles to child windows of the Frame, and the frame itself, + // that we don't have child objects for (m_hWnd in wxWindow is the + // handle of the Frame's client window! + // + WXHWND m_hTitleBar; + WXHWND m_hHScroll; + WXHWND m_hVScroll; + + // + // Swp structures for various client data + // DW: Better off in attached RefData? + // + SWP m_vSwpTitleBar; + SWP m_vSwpMenuBar; + SWP m_vSwpHScroll; + SWP m_vSwpVScroll; + SWP m_vSwpStatusBar; + SWP m_vSwpToolBar; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxFrame) +}; + +MRESULT EXPENTRY wxFrameWndProc(HWND hWnd,ULONG ulMsg, MPARAM wParam, MPARAM lParam); +MRESULT EXPENTRY wxFrameMainWndProc(HWND hWnd,ULONG ulMsg, MPARAM wParam, MPARAM lParam); +#endif + // _WX_FRAME_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/gauge.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/gauge.h new file mode 100644 index 0000000000..faac3db4b8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/gauge.h @@ -0,0 +1,77 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/gauge.h +// Purpose: wxGauge class +// Author: David Webster +// Modified by: +// Created: 10/06/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GAUGE_H_ +#define _WX_GAUGE_H_ + +class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase +{ +public: + inline wxGauge() { m_nRangeMax = 0; m_nGaugePos = 0; } + + inline wxGauge( wxWindow* pParent + ,wxWindowID vId + ,int nRange + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxGA_HORIZONTAL + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxGaugeNameStr + ) + { + Create( pParent + ,vId + ,nRange + ,rPos + ,rSize + ,lStyle + ,rValidator + ,rsName + ); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,int nRange + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxGA_HORIZONTAL + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxGaugeNameStr + ); + + int GetShadowWidth(void) const; + int GetBezelFace(void) const; + int GetRange(void) const; + int GetValue(void) const; + + bool SetBackgroundColour(const wxColour& rColour); + void SetBezelFace(int nWidth); + bool SetForegroundColour(const wxColour& rColour); + void SetRange(int nRange); + void SetShadowWidth(int nWidth); + void SetValue(int nPos); + + inline virtual bool AcceptsFocus(void) const { return FALSE; } + inline virtual void Command(wxCommandEvent& WXUNUSED(rEvent)) {} + +protected: + int m_nRangeMax; + int m_nGaugePos; + int m_nWidth; + int m_nHeight; + + wxSize DoGetBestSize(void) const; + +private: + DECLARE_DYNAMIC_CLASS(wxGauge) +}; // end of CLASS wxGauge + +#endif // _WX_GAUGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/gdiimage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/gdiimage.h new file mode 100644 index 0000000000..45814eb0ec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/gdiimage.h @@ -0,0 +1,251 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/gdiimage.h +// Purpose: wxGDIImage class: base class for wxBitmap, wxIcon, wxCursor +// under OS/2 +// Author: David Webster (adapted from msw version by Vadim Zeitlin) +// Modified by: +// Created: 20.11.99 +// Copyright: (c) 1999 David Webster +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// NB: this is a private header, it is not intended to be directly included by +// user code (but may be included from other, public, wxWin headers + +#ifndef _WX_OS2_GDIIMAGE_H_ +#define _WX_OS2_GDIIMAGE_H_ + +#include "wx/gdiobj.h" // base class +#include "wx/gdicmn.h" // wxBITMAP_TYPE_INVALID +#include "wx/list.h" + +class WXDLLIMPEXP_FWD_CORE wxGDIImageRefData; +class WXDLLIMPEXP_FWD_CORE wxGDIImageHandler; +class WXDLLIMPEXP_FWD_CORE wxGDIImage; + +WX_DECLARE_EXPORTED_LIST(wxGDIImageHandler, wxGDIImageHandlerList); + +// ---------------------------------------------------------------------------- +// wxGDIImageRefData: common data fields for all derived classes +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGDIImageRefData : public wxGDIRefData +{ +public: + wxGDIImageRefData() + { + m_nWidth = m_nHeight = m_nDepth = 0; + + m_hHandle = 0; + } + + // accessors + virtual bool IsOk() const + { + if (m_hHandle == 0) + return false; + return true; + } + + void SetSize( int nW + ,int nH + ) + { m_nWidth = nW; m_nHeight = nH; } + + // free the ressources we allocated + virtual void Free() { } + + // for compatibility, the member fields are public + + // the size of the image + int m_nWidth; + int m_nHeight; + + // the depth of the image + int m_nDepth; + + // the handle to it + union + { + WXHANDLE m_hHandle; // for untyped access + WXHBITMAP m_hBitmap; + WXHICON m_hIcon; + WXHCURSOR m_hCursor; + }; + + unsigned int m_uId; +}; + +// ---------------------------------------------------------------------------- +// wxGDIImageHandler: a class which knows how to load/save wxGDIImages. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGDIImageHandler : public wxObject +{ +public: + // ctor + wxGDIImageHandler() { m_lType = wxBITMAP_TYPE_INVALID; } + wxGDIImageHandler( const wxString& rName + ,const wxString& rExt + ,wxBitmapType lType + ) + : m_sName(rName) + , m_sExtension(rExt) + { + m_lType = lType; + } + + // accessors + void SetName(const wxString& rName) { m_sName = rName; } + void SetExtension(const wxString& rExt) { m_sExtension = rExt; } + void SetType(wxBitmapType lType) { m_lType = lType; } + + wxString GetName() const { return m_sName; } + wxString GetExtension() const { return m_sExtension; } + wxBitmapType GetType() const { return m_lType; } + + // real handler operations: to implement in derived classes + virtual bool Create( wxGDIImage* pImage + ,const void* pData + ,wxBitmapType lFlags + ,int nWidth + ,int nHeight + ,int nDepth = 1 + ) = 0; + virtual bool Load( wxGDIImage* pImage + ,const wxString& rName + ,HPS hPs + ,wxBitmapType lFlags + ,int nDesiredWidth + ,int nDesiredHeight + ) = 0; + virtual bool Load( wxGDIImage* pImage + ,int nId + ,wxBitmapType lFlags + ,int nDesiredWidth + ,int nDesiredHeight + ) = 0; + virtual bool Save( const wxGDIImage* pImage + ,const wxString& rName + ,wxBitmapType lType + ) const = 0; + +protected: + wxString m_sName; + wxString m_sExtension; + wxBitmapType m_lType; +}; // end of wxGDIImageHandler + +// ---------------------------------------------------------------------------- +// wxGDIImage: this class supports GDI image handlers which may be registered +// dynamically and will be used for loading/saving the images in the specified +// format. It also falls back to wxImage if no appropriate image is found. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGDIImage : public wxGDIObject +{ +public: + // handlers list interface + static wxGDIImageHandlerList& GetHandlers() { return ms_handlers; } + + static void AddHandler(wxGDIImageHandler* hHandler); + static void InsertHandler(wxGDIImageHandler* hHandler); + static bool RemoveHandler(const wxString& rName); + + static wxGDIImageHandler* FindHandler(const wxString& rName); + static wxGDIImageHandler* FindHandler(const wxString& rExtension, wxBitmapType lType); + static wxGDIImageHandler* FindHandler(wxBitmapType lType); + + static void InitStandardHandlers(); + static void CleanUpHandlers(); + + // access to the ref data casted to the right type + wxGDIImageRefData *GetGDIImageData() const + { return (wxGDIImageRefData *)m_refData; } + + // create data if we don't have it yet + void EnsureHasData() { if ( IsNull() ) m_refData = CreateData(); } + + // accessors + WXHANDLE GetHandle() const + { + wxGDIImageRefData* pData; + + pData = GetGDIImageData(); + if (!pData) + return 0; + else + return pData->m_hHandle; + } + void SetHandle(WXHANDLE hHandle) + { + wxGDIImageRefData* pData; + + EnsureHasData(); + pData = GetGDIImageData(); + pData->m_hHandle = hHandle; + } + + int GetWidth() const { return IsNull() ? 0 : GetGDIImageData()->m_nWidth; } + int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_nHeight; } + int GetDepth() const { return IsNull() ? 0 : GetGDIImageData()->m_nDepth; } + + wxSize GetSize() const + { + return IsNull() ? wxSize(0,0) : + wxSize(GetGDIImageData()->m_nWidth, GetGDIImageData()->m_nHeight); + } + + void SetWidth(int nW) { EnsureHasData(); GetGDIImageData()->m_nWidth = nW; } + void SetHeight(int nH) { EnsureHasData(); GetGDIImageData()->m_nHeight = nH; } + void SetDepth(int nD) { EnsureHasData(); GetGDIImageData()->m_nDepth = nD; } + + void SetSize( int nW + ,int nH + ) + { + EnsureHasData(); + GetGDIImageData()->SetSize(nW, nH); + } + void SetSize(const wxSize& rSize) { SetSize(rSize.x, rSize.y); } + + unsigned int GetId(void) const + { + wxGDIImageRefData* pData; + + pData = GetGDIImageData(); + if (!pData) + return 0; + else + return pData->m_uId; + } // end of WxWinGdi_CGDIImage::GetId + void SetId(unsigned int uId) + { + wxGDIImageRefData* pData; + + EnsureHasData(); + pData = GetGDIImageData(); + pData->m_uId = uId; + } + // forward some of base class virtuals to wxGDIImageRefData + bool FreeResource(bool bForce = false); + virtual WXHANDLE GetResourceHandle() const; + +protected: + // create the data for the derived class here + virtual wxGDIImageRefData* CreateData() const = 0; + virtual wxGDIRefData *CreateGDIRefData() const { return CreateData(); } + + // we can't [efficiently] clone objects of this class + virtual wxGDIRefData * + CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const + { + wxFAIL_MSG( wxT("must be implemented if used") ); + + return NULL; + } + + static wxGDIImageHandlerList ms_handlers; +}; + +#endif // _WX_MSW_GDIIMAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/hand.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/hand.ptr new file mode 100644 index 0000000000..4dfcca7cee Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/hand.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/heart.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/heart.ptr new file mode 100644 index 0000000000..e2e9519fb5 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/heart.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/helpwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/helpwin.h new file mode 100644 index 0000000000..7013ae5db6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/helpwin.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/helpwin.h +// Purpose: Help system: native implementation for your system. +// Author: David Webster +// Modified by: +// Created: 10/09/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPWIN_H_ +#define _WX_HELPWIN_H_ + +#include "wx/wx.h" + +#if wxUSE_HELP + +#include "wx/helpbase.h" + +class WXDLLIMPEXP_CORE wxWinHelpController: public wxHelpControllerBase +{ + DECLARE_CLASS(wxWinHelpController) + + public: + wxWinHelpController(); + virtual ~wxWinHelpController(); + + // Must call this to set the filename and server name + virtual bool Initialize(const wxString& file); + + // If file is "", reloads file given in Initialize + virtual bool LoadFile(const wxString& file = wxEmptyString); + virtual bool DisplayContents(); + virtual bool DisplaySection(int sectionNo); + virtual bool DisplayBlock(long blockNo); + virtual bool KeywordSearch(const wxString& k, + wxHelpSearchMode mode = wxHELP_SEARCH_ALL); + + virtual bool Quit(); + virtual void OnQuit(); + + inline wxString GetHelpFile() const { return m_helpFile; } + +protected: + wxString m_helpFile; +private: + // virtual function hiding supression :: do not use + bool Initialize(const wxString& rFile, int WXUNUSED(nServer) ) { return(Initialize(rFile)); } + bool DisplaySection(const wxString& rSection) { return wxHelpControllerBase::DisplaySection(rSection); } +}; + +#endif //wxUSE_HELP + +#endif + // _WX_HELPWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/icon.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/icon.h new file mode 100644 index 0000000000..1248f619f8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/icon.h @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/icon.h +// Purpose: wxIcon class +// Author: David Webster +// Modified by: +// Created: 10/09/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ICON_H_ +#define _WX_ICON_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/bitmap.h" +#include "wx/os2/gdiimage.h" + +#define wxIconRefDataBase wxGDIImageRefData +#define wxIconBase wxGDIImage + +class WXDLLIMPEXP_CORE wxIconRefData: public wxIconRefDataBase +{ +public: + wxIconRefData() { } + virtual ~wxIconRefData() { Free(); } + + virtual void Free(); +}; // end of + +// --------------------------------------------------------------------------- +// Icon +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxIcon: public wxIconBase +{ +public: + wxIcon(); + + wxIcon( const char bits[] + ,int nWidth + ,int nHeight + ); + wxIcon(const char* const* ppData) { CreateIconFromXpm(ppData); } +#ifdef wxNEEDS_CHARPP + wxIcon(char** ppData) { CreateIconFromXpm(const_cast<const char* const*>(ppData)); } +#endif + wxIcon( const wxString& rName + ,wxBitmapType lFlags = wxICON_DEFAULT_TYPE + ,int nDesiredWidth = -1 + ,int nDesiredHeight = -1 + ); + wxIcon(const wxIconLocation& loc) + { + LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ICO); + } + + virtual ~wxIcon(); + + bool LoadFile( const wxString& rName + ,wxBitmapType lFlags = wxICON_DEFAULT_TYPE + ,int nDesiredWidth = -1 + ,int nDesiredHeight = -1 + ); + + wxIconRefData *GetIconData() const { return (wxIconRefData *)m_refData; } + + inline void SetHICON(WXHICON hIcon) { SetHandle((WXHANDLE)hIcon); } + inline WXHICON GetHICON() const { return (WXHICON)GetHandle(); } + inline bool IsXpm(void) const { return m_bIsXpm; } + inline const wxBitmap& GetXpmSrc(void) const { return m_vXpmSrc; } + + void CopyFromBitmap(const wxBitmap& rBmp); +protected: + virtual wxGDIImageRefData* CreateData() const + { + return new wxIconRefData; + } + void CreateIconFromXpm(const char* const* ppData); + +private: + bool m_bIsXpm; + wxBitmap m_vXpmSrc; + + DECLARE_DYNAMIC_CLASS(wxIcon) +}; + +#endif + // _WX_ICON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/info.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/info.ico new file mode 100644 index 0000000000..eccdd2e09c Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/info.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/iniconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/iniconf.h new file mode 100644 index 0000000000..07cb3ef0ff --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/iniconf.h @@ -0,0 +1,121 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/iniconf.h +// Purpose: INI-file based wxConfigBase implementation +// Author: David Webster +// Modified by: +// Created: 10/09/99 +// Copyright: David Webster +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _INICONF_H +#define _INICONF_H + +// ---------------------------------------------------------------------------- +// wxIniConfig is a wxConfig implementation which uses MS Windows INI files to +// store the data. Because INI files don't really support arbitrary nesting of +// groups, we do the following: +// (1) in win.ini file we store all entries in the [vendor] section and +// the value group1/group2/key is mapped to the value group1_group2_key +// in this section, i.e. all path separators are replaced with underscore +// (2) in appname.ini file we map group1/group2/group3/key to the entry +// group2_group3_key in [group1] +// +// Of course, it might lead to indesirable results if '_' is also used in key +// names (i.e. group/key is the same as group_key) and also GetPath() result +// may be not what you would expect it to be. +// +// Another limitation: the keys and section names are never case-sensitive +// which might differ from wxFileConfig it it was compiled with +// wxCONFIG_CASE_SENSITIVE option. +// ---------------------------------------------------------------------------- + +// for this class, "local" file is the file appname.ini and the global file +// is the [vendor] subsection of win.ini (default for "vendor" is to be the +// same as appname). The file name (strAppName parameter) may, in fact, +// contain the full path to the file. If it doesn't, the file is searched for +// in the Windows directory. +class WXDLLIMPEXP_CORE wxIniConfig : public wxConfigBase +{ +public: + // ctor & dtor + // if strAppName doesn't contain the extension and is not an absolute path, + // ".ini" is appended to it. if strVendor is empty, it's taken to be the + // same as strAppName. + wxIniConfig(const wxString& strAppName = wxEmptyString, const wxString& strVendor = wxEmptyString, + const wxString& localFilename = wxEmptyString, const wxString& globalFilename = wxEmptyString, long style = wxCONFIG_USE_LOCAL_FILE); + virtual ~wxIniConfig(); + + // implement inherited pure virtual functions + virtual void SetPath(const wxString& strPath); + virtual const wxString& GetPath() const; + + virtual bool GetFirstGroup(wxString& str, long& lIndex) const; + virtual bool GetNextGroup (wxString& str, long& lIndex) const; + virtual bool GetFirstEntry(wxString& str, long& lIndex) const; + virtual bool GetNextEntry (wxString& str, long& lIndex) const; + + virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const; + virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const; + + virtual bool HasGroup(const wxString& strName) const; + virtual bool HasEntry(const wxString& strName) const; + + // return TRUE if the current group is empty + bool IsEmpty() const; + + // read/write + bool Read(const wxString& key, wxString *pStr) const; + bool Read(const wxString& key, wxString *pStr, const wxString& szDefault) const; + bool Read(const wxString& key, long *plResult) const; + + // The following are necessary to satisfy the compiler + wxString Read(const wxString& key, const wxString& defVal) const + { return wxConfigBase::Read(key, defVal); } + bool Read(const wxString& key, long *pl, long defVal) const + { return wxConfigBase::Read(key, pl, defVal); } + long Read(const wxString& key, long defVal) const + { return wxConfigBase::Read(key, defVal); } + bool Read(const wxString& key, int *pi, int defVal) const + { return wxConfigBase::Read(key, pi, defVal); } + bool Read(const wxString& key, int *pi) const + { return wxConfigBase::Read(key, pi); } + bool Read(const wxString& key, double* val) const + { return wxConfigBase::Read(key, val); } + bool Read(const wxString& key, double* val, double defVal) const + { return wxConfigBase::Read(key, val, defVal); } + + bool Write(const wxString& key, const wxString& szValue); + bool Write(const wxString& key, long lValue); + + virtual bool Flush(bool bCurrentOnly = FALSE); + + virtual bool RenameEntry(const wxString& oldName, const wxString& newName); + virtual bool RenameGroup(const wxString& oldName, const wxString& newName); + + virtual bool DeleteEntry(const wxString& Key, bool bGroupIfEmptyAlso); + virtual bool DeleteGroup(const wxString& szKey); + virtual bool DeleteAll(); + +private: + // helpers + wxString GetPrivateKeyName(const wxString& szKey) const; + wxString GetKeyName(const wxString& szKey) const; + + wxString m_strLocalFilename; // name of the private INI file + wxString m_strGroup, // current group in appname.ini file + m_strPath; // the rest of the path (no trailing '_'!) + // Virtual function hiding + virtual bool Read(const wxString& key, bool* val) const + { return(wxConfigBase::Read(key, val));} + virtual bool Read(const wxString& key, bool* val, bool defVal) const + { return(wxConfigBase::Read(key, val, defVal));} + virtual bool Write(const wxString& key, double value) + { return(wxConfigBase::Write(key, value));} + virtual bool Write(const wxString& key, bool value) + { return(wxConfigBase::Write(key, value));} + virtual bool Write(const wxString& key, const char* value) + { return(wxConfigBase::Write(key, value));} +}; + +#endif //_INICONF_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/joystick.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/joystick.h new file mode 100644 index 0000000000..dd431d71d8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/joystick.h @@ -0,0 +1,88 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/joystick.h +// Purpose: wxJoystick class +// Author: David Webster +// Modified by: +// Created: 10/09/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_JOYSTICK_H_ +#define _WX_JOYSTICK_H_ + +#include "wx/event.h" + +class WXDLLIMPEXP_ADV wxJoystick: public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxJoystick) + public: + /* + * Public interface + */ + + wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; } + + // Attributes + //////////////////////////////////////////////////////////////////////////// + + wxPoint GetPosition() const; + int GetZPosition() const; + int GetButtonState() const; + int GetPOVPosition() const; + int GetPOVCTSPosition() const; + int GetRudderPosition() const; + int GetUPosition() const; + int GetVPosition() const; + int GetMovementThreshold() const; + void SetMovementThreshold(int threshold) ; + + // Capabilities + //////////////////////////////////////////////////////////////////////////// + + bool IsOk() const; // Checks that the joystick is functioning + static int GetNumberJoysticks() ; + int GetManufacturerId() const ; + int GetProductId() const ; + wxString GetProductName() const ; + int GetXMin() const; + int GetYMin() const; + int GetZMin() const; + int GetXMax() const; + int GetYMax() const; + int GetZMax() const; + int GetNumberButtons() const; + int GetNumberAxes() const; + int GetMaxButtons() const; + int GetMaxAxes() const; + int GetPollingMin() const; + int GetPollingMax() const; + int GetRudderMin() const; + int GetRudderMax() const; + int GetUMin() const; + int GetUMax() const; + int GetVMin() const; + int GetVMax() const; + + bool HasRudder() const; + bool HasZ() const; + bool HasU() const; + bool HasV() const; + bool HasPOV() const; + bool HasPOV4Dir() const; + bool HasPOVCTS() 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(); + +protected: + int m_joystick; +}; + +#endif + // _WX_JOYSTICK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/listbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/listbox.h new file mode 100644 index 0000000000..dc6d6913b9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/listbox.h @@ -0,0 +1,165 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/listbox.h +// Purpose: wxListBox class +// Author: David Webster +// Modified by: +// Created: 10/09/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LISTBOX_H_ +#define _WX_LISTBOX_H_ + +// ---------------------------------------------------------------------------- +// simple types +// ---------------------------------------------------------------------------- + +#if wxUSE_OWNER_DRAWN + class WXDLLIMPEXP_FWD_CORE wxOwnerDrawn; + + // define the array of list box items + #include "wx/dynarray.h" + + WX_DEFINE_EXPORTED_ARRAY_PTR(wxOwnerDrawn *, wxListBoxItemsArray); +#endif // wxUSE_OWNER_DRAWN + +// forward decl for GetSelections() +class wxArrayInt; + +// ---------------------------------------------------------------------------- +// List box control +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase +{ +public: + // ctors and such + wxListBox(); + wxListBox( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,int n = 0 + ,const wxString asChoices[] = NULL + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxListBoxNameStr) + { + Create( pParent + ,vId + ,rPos + ,rSize + ,n + ,asChoices + ,lStyle + ,rValidator + ,rsName + ); + } + wxListBox( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos + ,const wxSize& rSize + ,const wxArrayString& asChoices + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxListBoxNameStr) + { + Create( pParent + ,vId + ,rPos + ,rSize + ,asChoices + ,lStyle + ,rValidator + ,rsName + ); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,int n = 0 + ,const wxString asChoices[] = NULL + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxListBoxNameStr + ); + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos + ,const wxSize& rSize + ,const wxArrayString& asChoices + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxListBoxNameStr + ); + + virtual ~wxListBox(); + + // + // Implement base class pure virtuals + // + virtual void DoClear(void); + virtual void DoDeleteOneItem(unsigned int n); + + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& rsString); + + virtual bool IsSelected(int n) const; + virtual void DoSetSelection(int n, bool bSelect); + virtual int GetSelection(void) const; + virtual int GetSelections(wxArrayInt& raSelections) const; + + virtual void DoSetFirstItem(int n); + + virtual void DoSetItemClientData(unsigned int n, void* pClientData); + virtual void* DoGetItemClientData(unsigned int n) const; + + // + // wxCheckListBox support + // +#if wxUSE_OWNER_DRAWN + long OS2OnMeasure(WXMEASUREITEMSTRUCT *item); + bool OS2OnDraw(WXDRAWITEMSTRUCT *item); + + virtual wxOwnerDrawn* CreateItem(size_t n); + wxOwnerDrawn* GetItem(size_t n) const { return m_aItems[n]; } + int GetItemIndex(wxOwnerDrawn *item) const { return m_aItems.Index(item); } +#endif // wxUSE_OWNER_DRAWN + + bool OS2Command( WXUINT uParam + ,WXWORD wId + ); + virtual void SetupColours(void); + +protected: + + bool HasMultipleSelection(void) const; + virtual wxSize DoGetBestSize(void) const; + + unsigned int m_nNumItems; + int m_nSelected; + +#if wxUSE_OWNER_DRAWN + // + // Control items + // + wxListBoxItemsArray m_aItems; +#endif + + // + // Implement base wxItemContainer virtuals + // + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, + wxClientDataType type); + + DECLARE_DYNAMIC_CLASS(wxListBox) +}; // end of wxListBox + +#endif // _WX_LISTBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/listctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/listctrl.h new file mode 100644 index 0000000000..8f7aee9904 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/listctrl.h @@ -0,0 +1,539 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/listctrl.h +// Purpose: wxListCtrl class +// Author: +// Modified by: +// Created: +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LISTCTRL_H_ +#define _WX_LISTCTRL_H_ + +#if wxUSE_LISTCTRL + +#include "wx/control.h" +#include "wx/event.h" +#include "wx/hash.h" +#include "wx/textctrl.h" + + +class WXDLLIMPEXP_FWD_CORE wxImageList; + +typedef int (wxCALLBACK *wxListCtrlCompare)(long lItem1, long lItem2, long lSortData); + +class WXDLLIMPEXP_CORE wxListCtrl: public wxControl +{ +public: + wxListCtrl() { Init(); } + wxListCtrl( wxWindow* pParent + ,wxWindowID vId = -1 + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxLC_ICON + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxListCtrlNameStr) + { + Init(); + Create( pParent + ,vId + ,rPos + ,rSize + ,lStyle + ,rValidator + ,rsName + ); + } + virtual ~wxListCtrl(); + + bool Create( wxWindow* pParent + ,wxWindowID vId = -1 + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxLC_ICON + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxListCtrlNameStr + ); + + + // Attributes + //////////////////////////////////////////////////////////////////////////// + // + + // + // Set the control colours + // + bool SetForegroundColour(const wxColour& rCol); + bool SetBackgroundColour(const wxColour& rCol); + + // + // Information about this column + // + bool GetColumn( int nCol + ,wxListItem& rItem + ) const; + bool SetColumn( int nCol + ,wxListItem& rItem + ); + + // + // Column width + // + int GetColumnWidth(int nCol) const; + bool SetColumnWidth( int nCol + ,int nWidth + ); + + // + // Gets the number of items that can fit vertically in the + // visible area of the list control (list or report view) + // or the total number of items in the list control (icon + // or small icon view) + // + int GetCountPerPage(void) const; + + wxRect GetViewRect() const; + // + // Gets the edit control for editing labels. + // + wxTextCtrl* GetEditControl(void) const; + + // + // Information about the item + // + bool GetItem(wxListItem& rInfo) const; + bool SetItem(wxListItem& rInfo); + + // + // Sets a string field at a particular column + // + long SetItem( long lIndex + ,int nCol + ,const wxString& rsLabel + ,int nImageId = -1 + ); + + // + // Item state + // + int GetItemState( long lItem + ,long lStateMask + ) const; + bool SetItemState( long lItem + ,long lState + ,long lStateMask + ); + + // + // Sets the item image + // + bool SetItemImage( long lItem + ,int nImage + ,int lSelImage + ); + bool SetItemColumnImage( long lItem + ,long lColumn + ,int nImage + ); + + // + // Item text + // + wxString GetItemText(long lItem) const; + void SetItemText( long lItem + ,const wxString& rsStr + ); + + // + // Item data + // + long GetItemData(long lItem) const; + bool SetItemPtrData(long item, wxUIntPtr data); + bool SetItemData(long item, long data) { return SetItemPtrData(item, data); } + + // + // Gets the item rectangle + // + bool GetItemRect( long lItem + ,wxRect& rRect + ,int nCode = wxLIST_RECT_BOUNDS + ) const; + + // + // Item position + // + bool GetItemPosition( long lItem + ,wxPoint& rPos + ) const; + bool SetItemPosition( long lItem + ,const wxPoint& rPos + ); + + // + // Gets the number of items in the list control + // + int GetItemCount(void) const; + + // + // Gets the number of columns in the list control + // + inline int GetColumnCount(void) const { return m_nColCount; } + + // + // Retrieves the spacing between icons in pixels. + // If bIsSmall is true, gets the spacing for the small icon + // view, otherwise the large icon view. + // + int GetItemSpacing(bool bIsSmall) const; + + // + // Foreground colour of an item. + // + wxColour GetItemTextColour(long lItem) const; + void SetItemTextColour( long lItem + ,const wxColour& rCol + ); + + // + // Background colour of an item. + // + wxColour GetItemBackgroundColour(long lItem ) const; + void SetItemBackgroundColour( long lItem + ,const wxColour& rCol + ); + + // + // Gets the number of selected items in the list control + // + int GetSelectedItemCount(void) const; + + // + // Text colour of the listview + // + wxColour GetTextColour(void) const; + void SetTextColour(const wxColour& rCol); + + // + // Gets the index of the topmost visible item when in + // list or report view + // + long GetTopItem(void) const; + + // + // Add or remove a single window style + void SetSingleStyle( long lStyle + ,bool bAdd = true + ); + + // + // Set the whole window style + // + void SetWindowStyleFlag(long lStyle); + + // + // Searches for an item, starting from 'item'. + // item can be -1 to find the first item that matches the + // specified flags. + // Returns the item or -1 if unsuccessful. + long GetNextItem( long lItem + ,int nGeometry = wxLIST_NEXT_ALL + ,int lState = wxLIST_STATE_DONTCARE + ) const; + + // + // Gets one of the three image lists + // + wxImageList* GetImageList(int nWhich) const; + + // + // Sets the image list + // + void SetImageList( wxImageList* pImageList + ,int nWhich + ); + void AssignImageList( wxImageList* pImageList + ,int nWhich + ); + + // + // Returns true if it is a virtual list control + // + inline bool IsVirtual() const { return (GetWindowStyle() & wxLC_VIRTUAL) != 0; } + + // + // Refresh items selectively (only useful for virtual list controls) + // + void RefreshItem(long lItem); + void RefreshItems( long lItemFrom + ,long lItemTo + ); + + // + // Operations + //////////////////////////////////////////////////////////////////////////// + // + + // + // Arranges the items + // + bool Arrange(int nFlag = wxLIST_ALIGN_DEFAULT); + + // + // Deletes an item + // + bool DeleteItem(long lItem); + + // + // Deletes all items + bool DeleteAllItems(void); + + // + // Deletes a column + // + bool DeleteColumn(int nCol); + + // + // Deletes all columns + // + bool DeleteAllColumns(void); + + // + // Clears items, and columns if there are any. + // + void ClearAll(void); + + // + // Edit the label + // + wxTextCtrl* EditLabel( long lItem + ,wxClassInfo* pTextControlClass = wxCLASSINFO(wxTextCtrl) + ); + + // + // End label editing, optionally cancelling the edit + // + bool EndEditLabel(bool bCancel); + + // + // Ensures this item is visible + // + bool EnsureVisible(long lItem); + + // + // Find an item whose label matches this string, starting from the item after 'start' + // or the beginning if 'start' is -1. + // + long FindItem( long lStart + ,const wxString& rsStr + ,bool bPartial = false + ); + + // + // Find an item whose data matches this data, starting from the item after 'start' + // or the beginning if 'start' is -1. + // + long FindItem( long lStart + ,long lData + ); + + // + // Find an item nearest this position in the specified direction, starting from + // the item after 'start' or the beginning if 'start' is -1. + // + long FindItem( long lStart + ,const wxPoint& rPoint + ,int lDirection + ); + + // + // Determines which item (if any) is at the specified point, + // giving details in 'flags' (see wxLIST_HITTEST_... flags above) + // + long HitTest( const wxPoint& rPoint + ,int& rFlags + ); + + // + // Inserts an item, returning the index of the new item if successful, + // -1 otherwise. + // + long InsertItem(wxListItem& rInfo); + + // + // Insert a string item + // + long InsertItem( long lIndex + ,const wxString& rsLabel + ); + + // + // Insert an image item + // + long InsertItem( long lIndex + ,int nImageIndex + ); + + // + // Insert an image/string item + // + long InsertItem( long lIndex + ,const wxString& rsLabel + ,int nImageIndex + ); + + // + // For list view mode (only), inserts a column. + // + long InsertColumn( long lCol + ,wxListItem& rInfo + ); + + long InsertColumn( long lCol + ,const wxString& rsHeading + ,int nFormat = wxLIST_FORMAT_LEFT + ,int lWidth = -1 + ); + + // + // set the number of items in a virtual list control + // + void SetItemCount(long lCount); + + // + // Scrolls the list control. If in icon, small icon or report view mode, + // x specifies the number of pixels to scroll. If in list view mode, x + // specifies the number of columns to scroll. + // If in icon, small icon or list view mode, y specifies the number of pixels + // to scroll. If in report view mode, y specifies the number of lines to scroll. + // + bool ScrollList( int nDx + ,int nDy + ); + + // Sort items. + + // + // fn is a function which takes 3 long arguments: item1, item2, data. + // item1 is the long data associated with a first item (NOT the index). + // item2 is the long data associated with a second item (NOT the index). + // data is the same value as passed to SortItems. + // The return value is a negative number if the first item should precede the second + // item, a positive number of the second item should precede the first, + // or zero if the two items are equivalent. + // + // data is arbitrary data to be passed to the sort function. + // + bool SortItems( wxListCtrlCompare fn + ,long lData + ); + + // + // IMPLEMENTATION + // -------------- + // + virtual bool OS2Command( WXUINT uParam + ,WXWORD wId + ); + // + // Bring the control in sync with current m_windowStyle value + // + void UpdateStyle(void); + + // + // Implementation: converts wxWidgets style to MSW style. + // Can be a single style flag or a bit list. + // oldStyle is 'normalised' so that it doesn't contain + // conflicting styles. + // + long ConvertToOS2Style( long& lOldStyle + ,long lStyle + ) const; + long ConvertArrangeToOS2Style(long lStyle); + long ConvertViewToOS2Style(long lStyle); + + virtual MRESULT OS2WindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + + // Event handlers + //////////////////////////////////////////////////////////////////////////// + // Necessary for drawing hrules and vrules, if specified + void OnPaint(wxPaintEvent& rEvent); + +protected: + // + // common part of all ctors + // + void Init(void); + + // + // Free memory taken by all internal data + // + void FreeAllInternalData(void); + + wxTextCtrl* m_pTextCtrl; // The control used for editing a label + wxImageList* m_pImageListNormal; // The image list for normal icons + wxImageList* m_pImageListSmall; // The image list for small icons + wxImageList* m_pImageListState; // The image list state icons (not implemented yet) + bool m_bOwnsImageListNormal; + bool m_bOwnsImageListSmall; + bool m_bOwnsImageListState; + long m_lBaseStyle; // Basic PM style flags, for recreation purposes + int m_nColCount; // PM doesn't have GetColumnCount so must + // keep track of inserted/deleted columns + + // + // true if we have any internal data (user data & attributes) + // + bool m_bAnyInternalData; + + // + // true if we have any items with custom attributes + // + bool m_bHasAnyAttr; + + // + // These functions are only used for virtual list view controls, i.e. the + // ones with wxLC_VIRTUAL style + // + // return the text for the given column of the given item + // + virtual wxString OnGetItemText( long lItem + ,long lColumn + ) const; + + // + // Return the icon for the given item. In report view, OnGetItemImage will + // only be called for the first column. See OnGetItemColumnImage for + // details. + // + virtual int OnGetItemImage(long lItem) const; + + // + // Return the icon for the given item and column + // + virtual int OnGetItemColumnImage(long lItem, long lColumn) const; + + // + // Return the attribute for the item (may return NULL if none) + // + virtual wxListItemAttr* OnGetItemAttr(long lItem) const; + +private: + bool DoCreateControl( int nX + ,int nY + ,int nWidth + ,int nHeight + ); + + DECLARE_DYNAMIC_CLASS(wxListCtrl) + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxListCtrl); +}; // end of CLASS wxListCtrl + +#endif // wxUSE_LISTCTRL + +#endif // _WX_LISTCTRL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/magnit1.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/magnit1.ptr new file mode 100644 index 0000000000..0e0b74803c Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/magnit1.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/mdi.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/mdi.h new file mode 100644 index 0000000000..dbb6703767 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/mdi.h @@ -0,0 +1,197 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/mdi.h +// Purpose: MDI (Multiple Document Interface) classes. +// This doesn't have to be implemented just like Windows, +// it could be a tabbed design as in wxGTK. +// Author: David Webster +// Modified by: +// Created: 10/10/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MDI_H_ +#define _WX_MDI_H_ + +#include "wx/frame.h" + +class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow; +class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame; + +class WXDLLIMPEXP_CORE wxMDIParentFrame: public wxFrame +{ +DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) + + friend class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame; +public: + + wxMDIParentFrame(); + inline wxMDIParentFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, // Scrolling refers to client window + const wxString& name = wxFrameNameStr) + { + Create(parent, id, title, pos, size, style, name); + } + + virtual ~wxMDIParentFrame(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr); + + // accessors + // --------- + + // Get the active MDI child window (Windows only) + wxMDIChildFrame *GetActiveChild() const; + + // Get the client window + wxMDIClientWindow *GetClientWindow() const { return m_clientWindow; } + + // Create the client window class (don't Create the window, + // just return a new class) + virtual wxMDIClientWindow *OnCreateClient(void); + + wxMenu* GetWindowMenu() const { return m_windowMenu; } +// void SetWindowMenu(wxMwnu* pMenu); + + // MDI operations + // -------------- + virtual void Cascade(); + virtual void Tile(); + virtual void ArrangeIcons(); + virtual void ActivateNext(); + virtual void ActivatePrevious(); + + // handlers + // -------- + + // Responds to colour changes + void OnSysColourChanged(wxSysColourChangedEvent& event); + + void OnSize(wxSizeEvent& event); + + bool HandleActivate(int state, bool minimized, WXHWND activate); + bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control); + + // override window proc for MDI-specific message processing + virtual MRESULT OS2WindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + + virtual MRESULT OS2DefWindowProc(WXUINT, WXWPARAM, WXLPARAM); + virtual bool OS2TranslateMessage(WXMSG* msg); + +protected: + virtual void InternalSetMenuBar(); + + wxMDIClientWindow * m_clientWindow; + wxMDIChildFrame * m_currentChild; + wxMenu* m_windowMenu; + + // TRUE if MDI Frame is intercepting commands, not child + bool m_parentFrameActive; + +private: + DECLARE_EVENT_TABLE() +}; + +class WXDLLIMPEXP_CORE wxMDIChildFrame: public wxFrame +{ +DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) +public: + + wxMDIChildFrame(); + inline wxMDIChildFrame(wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Create(parent, id, title, pos, size, style, name); + } + + virtual ~wxMDIChildFrame(); + + bool Create(wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + // MDI operations + virtual void Maximize(bool maximize = TRUE); + virtual void Restore(); + virtual void Activate(); + + // Handlers + + bool HandleMDIActivate(long bActivate, WXHWND, WXHWND); + bool HandleSize(int x, int y, WXUINT); + bool HandleWindowPosChanging(void *lpPos); + bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control); + + virtual MRESULT OS2WindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + virtual MRESULT OS2DefWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + virtual bool OS2TranslateMessage(WXMSG *msg); + + virtual void OS2DestroyWindow(); + + // Implementation + bool ResetWindowStyle(void *vrect); + +protected: + virtual void DoGetPosition(int *x, int *y) const; + virtual void DoSetClientSize(int width, int height); + virtual void InternalSetMenuBar(); +}; + +/* The client window is a child of the parent MDI frame, and itself + * contains the child MDI frames. + * However, you create the MDI children as children of the MDI parent: + * only in the implementation does the client window become the parent + * of the children. Phew! So the children are sort of 'adopted'... + */ + +class WXDLLIMPEXP_CORE wxMDIClientWindow: public wxWindow +{ + DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) + + public: + + wxMDIClientWindow() { Init(); } + wxMDIClientWindow(wxMDIParentFrame *parent, long style = 0) + { + Init(); + + CreateClient(parent, style); + } + + // Note: this is virtual, to allow overridden behaviour. + virtual bool CreateClient(wxMDIParentFrame *parent, + long style = wxVSCROLL | wxHSCROLL); + + // Explicitly call default scroll behaviour + void OnScroll(wxScrollEvent& event); + +protected: + void Init() { m_scrollX = m_scrollY = 0; } + + int m_scrollX, m_scrollY; + +private: + DECLARE_EVENT_TABLE() +}; + +#endif + // _WX_MDI_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/menu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/menu.h new file mode 100644 index 0000000000..a3a045bb1f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/menu.h @@ -0,0 +1,291 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/menu.h +// Purpose: wxMenu, wxMenuBar classes +// Author: David Webster +// Modified by: +// Created: 10/10/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MENU_H_ +#define _WX_MENU_H_ + +#if wxUSE_ACCEL + #include "wx/accel.h" + #include "wx/list.h" // for "template" list classes + #include "wx/dynarray.h" + + WX_DEFINE_EXPORTED_ARRAY_PTR(wxAcceleratorEntry *, wxAcceleratorArray); +#endif // wxUSE_ACCEL + +class WXDLLIMPEXP_FWD_CORE wxFrame; + +void wxSetShortCutKey(wxChar* zText); + +// ---------------------------------------------------------------------------- +// Menu +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase +{ +public: + // + // Ctors & dtor + // + wxMenu( const wxString& rTitle + ,long lStyle = 0 + ) + : wxMenuBase( rTitle + ,lStyle + ) + { + Init(); + } + + wxMenu(long lStyle = 0) + : wxMenuBase(lStyle) + { + Init(); + } + + virtual ~wxMenu(); + + // + // Implement base class virtuals + // + virtual wxMenuItem* DoAppend(wxMenuItem* pItem); + virtual wxMenuItem* DoInsert( size_t nPos + ,wxMenuItem* pItem + ); + virtual wxMenuItem* DoRemove(wxMenuItem* pItem); + virtual void Break(void); + virtual void SetTitle(const wxString& rTitle); + + // + // Implementation only from now on + // ------------------------------- + // + virtual void Attach(wxMenuBarBase* pMenubar); + + bool OS2Command( WXUINT uParam + ,WXWORD wId + ); + + // + // Semi-private accessors + // + + // + // Get the window which contains this menu + // + wxWindow* GetWindow(void) const; + + // + // Get the menu handle + // + WXHMENU GetHMenu() const { return m_hMenu; } + +#if wxUSE_ACCEL + // + // Called by wxMenuBar to build its accel table from the accels of all menus + // + bool HasAccels(void) const { return m_vAccels.IsEmpty(); } + size_t GetAccelCount(void) const { return m_vAccels.GetCount(); } + size_t CopyAccels(wxAcceleratorEntry* pAccels) const; + + // + // Called by wxMenuItem when its accels changes + // + void UpdateAccel(wxMenuItem* pItem); + + // + // Helper used by wxMenu itself (returns the index in m_accels) + // + int FindAccel(int nId) const; +#endif // wxUSE_ACCEL + // + // OS/2 specific Find + // + wxMenuItem* FindItem(int id, ULONG hItem, wxMenu **menu = NULL) const; + //virtual function hiding suppression + int FindItem(const wxString& rsString) const + { return wxMenuBase::FindItem(rsString); } + wxMenuItem* FindItem(int id, wxMenu **menu = NULL) const + { return wxMenuBase::FindItem(id, menu); } + + // + // All OS/2PM Menu's have one of these + // + MENUITEM m_vMenuData; + +private: + // + // Common part of all ctors + // + void Init(); + + // + // Common part of Append/Insert (behaves as Append is pos == (size_t)-1) + // + bool DoInsertOrAppend( wxMenuItem* pItem + ,size_t nPos = (size_t)-1 + ); + + // + // Terminate the current radio group, if any + // + void EndRadioGroup(void); + + // + // If true, insert a breal before appending the next item + // + bool m_bDoBreak; + + // + // The menu handle of this menu + // + WXHMENU m_hMenu; + + // + // The helper variable for creating unique IDs. + // + static USHORT m_nextMenuId; + + // + // The position of the first item in the current radio group or -1 + // + int m_nStartRadioGroup; + +#if wxUSE_ACCEL + // + // The accelerators for our menu items + // + wxAcceleratorArray m_vAccels; +#endif // wxUSE_ACCEL + + DECLARE_DYNAMIC_CLASS(wxMenu) +}; // end of wxMenu + +// ---------------------------------------------------------------------------- +// Menu Bar (a la Windows) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase +{ +public: + // + // Ctors & dtor + // + + // + // Default constructor + // + wxMenuBar(); + + // + // Unused under OS2 + wxMenuBar(long lStyle); + + // + // Menubar takes ownership of the menus arrays but copies the titles + // + wxMenuBar( int n + ,wxMenu* vMenus[] + ,const wxString sTitles[] + ,long lStyle = 0 + ); + virtual ~wxMenuBar(); + + // + // Menubar construction + // + virtual bool Append( wxMenu* pMenu + ,const wxString& rTitle + ); + virtual bool Insert( size_t nPos + ,wxMenu* pMenu + ,const wxString& rTitle + ); + virtual wxMenu* Replace( size_t nPos + ,wxMenu* pMenu + ,const wxString& rTitle + ); + virtual wxMenu* Remove(size_t nPos); + virtual int FindMenuItem( const wxString& rMenuString + ,const wxString& rItemString + ) const; + virtual wxMenuItem* FindItem( int nId + ,wxMenu** ppMenu = NULL + ) const; + virtual wxMenuItem* FindItem( int nId + ,ULONG hItem + ,wxMenu** ppMenu = NULL + ) const; + virtual void EnableTop( size_t nPos + ,bool bFlag + ); + virtual void SetMenuLabel( size_t nPos + ,const wxString& rLabel + ); + virtual wxString GetMenuLabel(size_t nPos) const; + + // + // Implementation from now on + // + WXHMENU Create(void); + virtual void Detach(void); + virtual void Attach(wxFrame* pFrame); + +#if wxUSE_ACCEL + // + // Get the accel table for all the menus + // + const wxAcceleratorTable& GetAccelTable(void) const { return m_vAccelTable; } + + // + // Update the accel table (must be called after adding/deleting a menu) + // + void RebuildAccelTable(void); +#endif // wxUSE_ACCEL + + // + // Get the menu handle + WXHMENU GetHMenu(void) const { return m_hMenu; } + + // + // If the menubar is modified, the display is not updated automatically, + // call this function to update it (m_menuBarFrame should be !NULL) + // + void Refresh(void); + +protected: + // + // Common part of all ctors + // + void Init(void); + + wxArrayString m_titles; + + WXHMENU m_hMenu; + +#if wxUSE_ACCEL + // + // The accelerator table for all accelerators in all our menus + // + wxAcceleratorTable m_vAccelTable; +#endif // wxUSE_ACCEL + +private: + // + // Virtual function hiding suppression + // + void Refresh( bool bErase + ,const wxRect* pRect + ) + { wxWindow::Refresh(bErase, pRect); } + + DECLARE_DYNAMIC_CLASS(wxMenuBar) +}; + +#endif // _WX_MENU_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/menuitem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/menuitem.h new file mode 100644 index 0000000000..626996fe26 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/menuitem.h @@ -0,0 +1,171 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/menuitem.h +// Purpose: wxMenuItem class +// Author: Vadim Zeitlin +// Modified by: +// Created: 11.11.97 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _MENUITEM_H +#define _MENUITEM_H + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" +#include "wx/os2/private.h" // for MENUITEM + +// an exception to the general rule that a normal header doesn't include other +// headers - only because ownerdrw.h is not always included and I don't want +// to write #ifdef's everywhere... +#if wxUSE_OWNER_DRAWN + #include "wx/ownerdrw.h" + #include "wx/bitmap.h" +#endif + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// ---------------------------------------------------------------------------- +// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour +// ---------------------------------------------------------------------------- +class WXDLLIMPEXP_CORE wxMenuItem: public wxMenuItemBase +#if wxUSE_OWNER_DRAWN + , public wxOwnerDrawn +#endif +{ +public: + // + // ctor & dtor + // + wxMenuItem( wxMenu* pParentMenu = NULL + ,int nId = wxID_SEPARATOR + ,const wxString& rStrName = wxEmptyString + ,const wxString& rWxHelp = wxEmptyString + ,wxItemKind eKind = wxITEM_NORMAL + ,wxMenu* pSubMenu = NULL + ); + + // + // Depricated, do not use in new code + // + wxMenuItem( wxMenu* pParentMenu + ,int vId + ,const wxString& rsText + ,const wxString& rsHelp + ,bool bIsCheckable + ,wxMenu* pSubMenu = NULL + ); + virtual ~wxMenuItem(); + + // + // Override base class virtuals + // + virtual void SetItemLabel(const wxString& rStrName); + + virtual void Enable(bool bDoEnable = true); + virtual void Check(bool bDoCheck = true); + virtual bool IsChecked(void) const; + + // + // Unfortunately needed to resolve ambiguity between + // wxMenuItemBase::IsCheckable() and wxOwnerDrawn::IsCheckable() + // + bool IsCheckable(void) const { return wxMenuItemBase::IsCheckable(); } + + // + // The id for a popup menu is really its menu handle (as required by + // ::AppendMenu() API), so this function will return either the id or the + // menu handle depending on what we're + // + int GetRealId(void) const; + + // + // Mark item as belonging to the given radio group + // + void SetAsRadioGroupStart(void); + void SetRadioGroupStart(int nStart); + void SetRadioGroupEnd(int nEnd); + + // + // All OS/2PM Submenus and menus have one of these + // + MENUITEM m_vMenuData; + +#if wxUSE_OWNER_DRAWN + + void SetBitmaps(const wxBitmap& bmpChecked, + const wxBitmap& bmpUnchecked = wxNullBitmap) + { + m_bmpChecked = bmpChecked; + m_bmpUnchecked = bmpUnchecked; + SetOwnerDrawn(true); + } + + void SetBitmap(const wxBitmap& bmp, bool bChecked = true) + { + if ( bChecked ) + m_bmpChecked = bmp; + else + m_bmpUnchecked = bmp; + SetOwnerDrawn(true); + } + + void SetDisabledBitmap(const wxBitmap& bmpDisabled) + { + m_bmpDisabled = bmpDisabled; + SetOwnerDrawn(true); + } + + const wxBitmap& GetBitmap(bool bChecked = true) const + { return (bChecked ? m_bmpChecked : m_bmpUnchecked); } + + const wxBitmap& GetDisabledBitmap() const + { return m_bmpDisabled; } + + + // override wxOwnerDrawn base class virtuals + virtual wxString GetName() const; + virtual bool OnMeasureItem(size_t *pwidth, size_t *pheight); + virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat); + +protected: + virtual void GetFontToUse(wxFont& font) const; + +#endif // wxUSE_OWNER_DRAWN + +private: + void Init(); + + // + // The positions of the first and last items of the radio group this item + // belongs to or -1: start is the radio group start and is valid for all + // but first radio group items (m_isRadioGroupStart == FALSE), end is valid + // only for the first one + // + union + { + int m_nStart; + int m_nEnd; + } m_vRadioGroup; + + // + // Does this item start a radio group? + // + bool m_bIsRadioGroupStart; + +#if wxUSE_OWNER_DRAWN + // item bitmaps + wxBitmap m_bmpChecked, // bitmap to put near the item + m_bmpUnchecked, // (checked is used also for 'uncheckable' items) + m_bmpDisabled; +#endif // wxUSE_OWNER_DRAWN + + DECLARE_DYNAMIC_CLASS(wxMenuItem) +}; // end of CLASS wxMenuItem + +#endif //_MENUITEM_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/metafile.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/metafile.h new file mode 100644 index 0000000000..5036afe6eb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/metafile.h @@ -0,0 +1,208 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/metafile.h +// Purpose: wxMetaFile, wxMetaFileDC classes. +// This probably should be restricted to Windows platforms, +// but if there is an equivalent on your platform, great. +// Author: David Webster +// Modified by: +// Created: 10/10/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef _WX_METAFIILE_H_ +#define _WX_METAFIILE_H_ + +#include "wx/dc.h" +#include "wx/gdiobj.h" +#include "wx/os2/dc.h" + +#if wxUSE_DRAG_AND_DROP +#include "wx/dataobj.h" +#endif + +/* + * Metafile and metafile device context classes + * + */ + +#define wxMetaFile wxMetafile +#define wxMetaFileDC wxMetafileDC + +class WXDLLIMPEXP_FWD_CORE wxMetafile; + +class WXDLLIMPEXP_CORE wxMetafileRefData: public wxGDIRefData +{ + friend class WXDLLIMPEXP_FWD_CORE wxMetafile; +public: + wxMetafileRefData(void); + virtual ~wxMetafileRefData(void); + + virtual bool IsOk() const { return m_metafile != 0; } + +public: + WXHANDLE m_metafile; + int m_windowsMappingMode; +}; + +#define M_METAFILEDATA ((wxMetafileRefData *)m_refData) + +class WXDLLIMPEXP_CORE wxMetafile: public wxGDIObject +{ + DECLARE_DYNAMIC_CLASS(wxMetafile) +public: + wxMetafile(const wxString& file = wxEmptyString); + virtual ~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); + + // Implementation + inline WXHANDLE GetHMETAFILE(void) { return M_METAFILEDATA->m_metafile; } + void SetHMETAFILE(WXHANDLE mf) ; + inline int GetWindowsMappingMode(void) { return M_METAFILEDATA->m_windowsMappingMode; } + void SetWindowsMappingMode(int mm); + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; +}; + +class WXDLLIMPEXP_CORE wxMetafileDCImpl: public wxPMDCImpl +{ +public: + wxMetafileDCImpl(wxDC *owner, const wxString& file = wxEmptyString); + wxMetafileDCImpl(wxDC *owner, const wxString& file, + int xext, int yext, int xorg, int yorg); + virtual ~wxMetafileDCImpl(); + + virtual wxMetafile *Close(); + virtual void SetMapMode(wxMappingMode mode); + virtual void DoGetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; + + // Implementation + wxMetafile *GetMetaFile() const { return m_metaFile; } + void SetMetaFile(wxMetafile *mf) { m_metaFile = mf; } + int GetWindowsMappingMode() const { return m_windowsMappingMode; } + void SetWindowsMappingMode(int mm) { m_windowsMappingMode = mm; } + +protected: + virtual void DoGetSize(int *width, int *height) const; + + int m_windowsMappingMode; + wxMetafile* m_metaFile; + +private: + DECLARE_CLASS(wxMetafileDCImpl) + wxDECLARE_NO_COPY_CLASS(wxMetafileDCImpl); +}; + +class WXDLLIMPEXP_CORE wxMetafileDC: public wxDC +{ +public: + // Don't supply origin and extent + // Supply them to wxMakeMetaFilePlaceable instead. + wxMetafileDC(const wxString& file = wxEmptyString) + :wxDC(new wxMetafileDCImpl( this, 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) + : wxDC(new wxMetafileDCImpl( this, file, xext, yext, xorg, yorg )) + { } + + wxMetafile *GetMetafile() const + { return ((wxMetafileDCImpl*)m_pimpl)->GetMetaFile(); } + + virtual ~wxMetafileDC(void) + { delete m_pimpl; } + + // Should be called at end of drawing + virtual wxMetafile *Close(void) + { return ((wxMetafileDCImpl*)m_pimpl)->Close(); } + + inline void SetMetaFile(wxMetafile *mf) + { ((wxMetafileDCImpl*)m_pimpl)->SetMetaFile(mf); } + +private: + DECLARE_CLASS(wxMetafileDC) + wxDECLARE_NO_COPY_CLASS(wxMetafileDC); +}; + +/* + * 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 wxMM_TEXT mapping mode. + * + */ + +// No origin or extent +#define wxMakeMetaFilePlaceable wxMakeMetafilePlaceable +bool WXDLLIMPEXP_CORE wxMakeMetafilePlaceable(const wxString& filename, float scale = 1.0); + +// Optional origin and extent +bool WXDLLIMPEXP_CORE wxMakeMetaFilePlaceable( const wxString& filename + ,int x1 + ,int y1 + ,int x2 + ,int y2 + ,float scale = 1.0 + ,bool useOriginAndExtent = true + ); + +// ---------------------------------------------------------------------------- +// wxMetafileDataObject is a specialization of wxDataObject for metafile data +// ---------------------------------------------------------------------------- + +// TODO: implement OLE side of things. At present, it's just for clipboard +// use. + +#if wxUSE_DRAG_AND_DROP +class WXDLLIMPEXP_CORE wxMetafileDataObject : public wxDataObject +{ +public: + // ctors + wxMetafileDataObject() { m_width = 0; m_height = 0; } + wxMetafileDataObject(const wxMetafile& metafile, int width = 0,int height = 0) + :m_metafile(metafile) + ,m_width(width) + ,m_height(height) { } + + void SetMetafile(const wxMetafile& metafile, int w = 0, int h = 0) + { m_metafile = metafile; m_width = w; m_height = h; } + wxMetafile GetMetafile() const { return m_metafile; } + int GetWidth() const { return m_width; } + int GetHeight() const { return m_height; } + + virtual wxDataFormat GetFormat() const { return wxDF_METAFILE; } + +/* ?? + // implement base class pure virtuals + virtual wxDataFormat GetPreferredFormat() const + { return (wxDataFormat) wxDataObject::Text; } + virtual bool IsSupportedFormat(wxDataFormat format) const + { return format == wxDataObject::Text || format == wxDataObject::Locale; } + virtual size_t GetDataSize() const + { return m_strText.Len() + 1; } // +1 for trailing '\0'of course + virtual void GetDataHere(void *pBuf) const + { memcpy(pBuf, m_strText.c_str(), GetDataSize()); } +*/ + +private: + wxMetafile m_metafile; + int m_width; + int m_height; +}; +#endif + +#endif + // _WX_METAFIILE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/mimetype.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/mimetype.h new file mode 100644 index 0000000000..6429e98776 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/mimetype.h @@ -0,0 +1,107 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/mimetype.h +// Purpose: classes and functions to manage MIME types +// Author: David Webster +// Modified by: +// Created: 01.21.99 +// Copyright: adopted from msw port -- (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence (part of wxExtra library) +///////////////////////////////////////////////////////////////////////////// + +#ifndef _MIMETYPE_IMPL_H +#define _MIMETYPE_IMPL_H + +#include "wx/defs.h" + +#if wxUSE_MIMETYPE + +#include "wx/mimetype.h" + +// ---------------------------------------------------------------------------- +// wxFileTypeImpl is the OS/2 version of wxFileType, this is a private class +// and is never used directly by the application +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFileTypeImpl +{ +public: + // ctor + wxFileTypeImpl() { m_info = NULL; } + + // one of these Init() function must be called (ctor can't take any + // arguments because it's common) + + // initialize us with our file type name and extension - in this case + // we will read all other data from the registry + void Init(const wxString& strFileType, const wxString& ext) + { m_strFileType = strFileType; m_ext = ext; } + + // initialize us with a wxFileTypeInfo object - it contains all the + // data + void Init(const wxFileTypeInfo& info) + { m_info = &info; } + + // implement accessor functions + bool GetExtensions(wxArrayString& extensions); + bool GetMimeType(wxString *mimeType) const; + bool GetMimeTypes(wxArrayString& mimeTypes) const; + bool GetIcon(wxIconLocation *iconLoc) const; + bool GetDescription(wxString *desc) const; + bool GetOpenCommand(wxString *openCmd, + const wxFileType::MessageParameters& params) const; + bool GetPrintCommand(wxString *printCmd, + const wxFileType::MessageParameters& params) const; + + size_t GetAllCommands(wxArrayString * verbs, wxArrayString * commands, + const wxFileType::MessageParameters& params) const; + + bool Unassociate(); + + // set an arbitrary command, ask confirmation if it already exists and + // overwriteprompt is true + bool SetCommand(const wxString& cmd, + const wxString& verb, + bool overwriteprompt = true); + + bool SetDefaultIcon(const wxString& cmd = wxEmptyString, int index = 0); + + // this is called by Associate + bool SetDescription (const wxString& desc); + +private: + // helper function: reads the command corresponding to the specified verb + // from the registry (returns an empty string if not found) + wxString GetCommand(const wxChar *verb) const; + + // we use either m_info or read the data from the registry if m_info == NULL + const wxFileTypeInfo *m_info; + wxString m_strFileType, // may be empty + m_ext; +}; + + + +class WXDLLIMPEXP_BASE wxMimeTypesManagerImpl +{ +public: + // nothing to do here, we don't load any data but just go and fetch it from + // the registry when asked for + wxMimeTypesManagerImpl() { } + + // implement containing class functions + wxFileType *GetFileTypeFromExtension(const wxString& ext); + wxFileType *GetOrAllocateFileTypeFromExtension(const wxString& ext); + wxFileType *GetFileTypeFromMimeType(const wxString& mimeType); + + size_t EnumAllFileTypes(wxArrayString& mimetypes); + + void AddFallback(const wxFileTypeInfo& ft) { m_fallbacks.Add(ft); } + +private: + wxArrayFileTypeInfo m_fallbacks; +}; + +#endif // wxUSE_MIMETYPE + +#endif + //_MIMETYPE_IMPL_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/minifram.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/minifram.h new file mode 100644 index 0000000000..44dd84eec1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/minifram.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/minifram.h +// Purpose: wxMiniFrame class. A small frame for e.g. floating toolbars. +// If there is no equivalent on your platform, just make it a +// normal frame. +// Author: David Webster +// Modified by: +// Created: 10/10/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MINIFRAM_H_ +#define _WX_MINIFRAM_H_ + +#include "wx/frame.h" + +class WXDLLIMPEXP_CORE wxMiniFrame: public wxFrame { + + DECLARE_DYNAMIC_CLASS(wxMiniFrame) + +public: + inline wxMiniFrame(void) {} + inline wxMiniFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Create(parent, id, title, pos, size, style | wxFRAME_TOOL_WINDOW | wxFRAME_FLOAT_ON_PARENT, name); + } + +protected: +}; + +#endif + // _WX_MINIFRAM_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/msgdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/msgdlg.h new file mode 100644 index 0000000000..8b94effb3f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/msgdlg.h @@ -0,0 +1,34 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/msgdlg.h +// Purpose: wxMessageDialog class. Use generic version if no +// platform-specific implementation. +// Author: David Webster +// Modified by: +// Created: 10/12/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSGBOXDLG_H_ +#define _WX_MSGBOXDLG_H_ + +class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase +{ +public: + wxMessageDialog( wxWindow* pParent + ,const wxString& rsMessage + ,const wxString& rsCaption = wxMessageBoxCaptionStr + ,long lStyle = wxOK|wxCENTRE + ,const wxPoint& WXUNUSED(rPos) = wxDefaultPosition + ) + : wxMessageDialogBase(pParent, rsMessage, rsCaption, lStyle) + { + } + + int ShowModal(void); + +protected: + DECLARE_DYNAMIC_CLASS(wxMessageDialog) +}; // end of CLASS wxMessageDialog + +#endif // _WX_MSGBOXDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/notebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/notebook.h new file mode 100644 index 0000000000..e9df265914 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/notebook.h @@ -0,0 +1,200 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/notebook.h +// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet) +// Author: David Webster +// Modified by: +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _NOTEBOOK_H +#define _NOTEBOOK_H + +#if wxUSE_NOTEBOOK + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/control.h" + +// ---------------------------------------------------------------------------- +// wxNotebook +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase +{ +public: + // + // Ctors + // ----- + // Default for dynamic class + // + wxNotebook(); + + // + // the same arguments as for wxControl + // + wxNotebook( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxString& rsName = wxNotebookNameStr + ); + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxString& rsName = wxNotebookNameStr + ); + + // + // Accessors + // --------- + // Get number of pages in the dialog + // + virtual size_t GetPageCount(void) const; + + // + // Set the currently selected page, return the index of the previously + // selected one (or wxNOT_FOUND on error) + // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events + // + int SetSelection(size_t nPage); + + // changes selected page without sending events + int ChangeSelection(size_t nPage); + + // + // Set/Get the title of a page + // + bool SetPageText( size_t nPage + ,const wxString& sStrText + ); + wxString GetPageText(size_t nPage) const; + + // + // Image list stuff: each page may have an image associated with it. All + // the images belong to an image list, so you have to + // 1) create an image list + // 2) associate it with the notebook + // 3) set for each page it's image + // associate image list with a control + // + void SetImageList(wxImageList* pImageList); + + // + // Sets/returns item's image index in the current image list + // + int GetPageImage(size_t nPage) const; + bool SetPageImage( size_t nPage + ,int nImage + ); + + // + // Currently it's always 1 because wxGTK doesn't support multi-row + // tab controls + // + int GetRowCount(void) const; + + // + // control the appearance of the notebook pages + // set the size (the same for all pages) + // + void SetPageSize(const wxSize& rSize); + + // + // Set the padding between tabs (in pixels) + // + void SetPadding(const wxSize& rPadding); + + // + // Operations + // ---------- + // Remove all pages + // + bool DeleteAllPages(void); + + // + // Adds a new page to the notebook (it will be deleted ny the notebook, + // don't delete it yourself). If bSelect, this page becomes active. + // + bool AddPage( wxNotebookPage* pPage + ,const wxString& rsStrText + ,bool bSelect = false + ,int nImageId = -1 + ); + + // + // The same as AddPage(), but adds it at the specified position + // + bool InsertPage( size_t nPage + ,wxNotebookPage* pPage + ,const wxString& rsStrText + ,bool bSelect = false + ,int nImageId = -1 + ); + + // + // Windows-only at present. Also, you must use the wxNB_FIXEDWIDTH + // style. + // + void SetTabSize(const wxSize& rSize); + + // + // Callbacks + // --------- + // + void OnSize(wxSizeEvent& rEvent); + void OnSelChange(wxBookCtrlEvent& rEvent); + void OnSetFocus(wxFocusEvent& rEvent); + void OnNavigationKey(wxNavigationKeyEvent& rEvent); + + // + // Base class virtuals + // ------------------- + // + virtual bool OS2OnScroll( int nOrientation + ,WXWORD wSBCode + ,WXWORD wPos + ,WXHWND hControl + ); + virtual void SetConstraintSizes(bool bRecurse = true); + virtual bool DoPhase(int nPhase); + +protected: + // + // Common part of all ctors + // + void Init(void); + + // + // Translate wxWin styles to the PM ones + // + virtual WXDWORD OS2GetStyle( long lFlags + ,WXDWORD* pwExstyle = NULL + ) const; + + // + // Remove one page from the notebook, without deleting + // + virtual wxNotebookPage* DoRemovePage(size_t nPage); + + // + // Helper functions + // + +private: + wxArrayLong m_alPageId; + int m_nTabSize; // holds the largest tab size + + DECLARE_DYNAMIC_CLASS(wxNotebook) + DECLARE_EVENT_TABLE() +}; // end of CLASS wxNotebook + +#endif // wxUSE_NOTEBOOK + +#endif // _NOTEBOOK_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/ownerdrw.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/ownerdrw.h new file mode 100644 index 0000000000..49de7f00f2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/ownerdrw.h @@ -0,0 +1,28 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/ownerdrw.h +// Purpose: wxOwnerDrawn class +// Author: Marcin Malich +// Modified by: +// Created: 2009-09-22 +// Copyright: (c) 2009 Marcin Malich <me@malcom.pl> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OWNERDRW_H_ +#define _WX_OWNERDRW_H_ + +#if wxUSE_OWNER_DRAWN + +class WXDLLIMPEXP_CORE wxOwnerDrawn : public wxOwnerDrawnBase +{ +public: + wxOwnerDrawn() {} + virtual ~wxOwnerDrawn() {} + + virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, + wxODAction act, wxODStatus stat); +}; + +#endif // wxUSE_OWNER_DRAWN + +#endif // _WX_OWNERDRW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/palette.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/palette.h new file mode 100644 index 0000000000..ef67ec240a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/palette.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/palette.h +// Purpose: wxPalette class +// Author: David Webster +// Modified by: +// Created: 10/12/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PALETTE_H_ +#define _WX_PALETTE_H_ + +#include "wx/gdiobj.h" +#include "wx/os2/private.h" + +class WXDLLIMPEXP_FWD_CORE wxPalette; + +class WXDLLIMPEXP_CORE wxPaletteRefData: public wxGDIRefData +{ + friend class WXDLLIMPEXP_FWD_CORE wxPalette; +public: + wxPaletteRefData(); + virtual ~wxPaletteRefData(); +// protected: + WXHPALETTE m_hPalette; + HPS m_hPS; +}; // end of CLASS wxPaletteRefData + +#define M_PALETTEDATA ((wxPaletteRefData *)m_refData) + +class WXDLLIMPEXP_CORE wxPalette: public wxPaletteBase +{ +public: + wxPalette(); + + wxPalette( int n + ,const unsigned char* pRed + ,const unsigned char* pGreen + ,const unsigned char* pBlue + ); + virtual ~wxPalette(); + + bool Create( int n + ,const unsigned char* pRed + ,const unsigned char* pGreen + ,const unsigned char* pBlue + ); + int GetPixel( unsigned char cRed + ,unsigned char cGreen + ,unsigned char cBlue + ) const; + bool GetRGB( int nPixel + ,unsigned char* pRed + ,unsigned char* pGreen + ,unsigned char* pBlue + ) const; + + virtual bool FreeResource(bool bForce = false); + + inline WXHPALETTE GetHPALETTE(void) const { return (M_PALETTEDATA ? M_PALETTEDATA->m_hPalette : 0); } + void SetHPALETTE(WXHPALETTE hPalette); + void SetPS(HPS hPS); + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxPalette) +}; // end of CLASS wxPalette + +#endif + // _WX_PALETTE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pbrush.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pbrush.ptr new file mode 100644 index 0000000000..f7738ca048 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pbrush.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pen.h new file mode 100644 index 0000000000..9ae321a020 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pen.h @@ -0,0 +1,105 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/pen.h +// Purpose: wxPen class +// Author: David Webster +// Modified by: +// Created: 10/10/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PEN_H_ +#define _WX_PEN_H_ + +#include "wx/gdiobj.h" +#include "wx/bitmap.h" + +typedef long wxPMDash; + +// ---------------------------------------------------------------------------- +// Pen +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPen : public wxPenBase +{ +public: + wxPen() { } + wxPen( const wxColour& rColour + ,int nWidth = 1 + ,wxPenStyle nStyle = wxPENSTYLE_SOLID + ); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); +#endif + + wxPen( const wxBitmap& rStipple + ,int nWidth + ); + virtual ~wxPen() { } + + bool operator == (const wxPen& rPen) const; + inline bool operator != (const wxPen& rPen) const + { return !(*this == rPen); } + + // + // Override in order to recreate the pen + // + void SetColour(const wxColour& rColour); + void SetColour(unsigned char cRed, unsigned char cGreen, unsigned char cBlue); + + void SetWidth(int nWidth); + void SetStyle(wxPenStyle nStyle); + void SetStipple(const wxBitmap& rStipple); + void SetDashes( int nNbDashes + ,const wxDash* pDash + ); + void SetJoin(wxPenJoin nJoin); + void SetCap(wxPenCap nCap); + void SetPS(HPS hPS); + + wxColour GetColour(void) const; + int GetWidth(void) const; + wxPenStyle GetStyle(void) const; + wxPenJoin GetJoin(void) const; + wxPenCap GetCap(void) const; + int GetPS(void) const; + int GetDashes(wxDash **ptr) const; + wxDash* GetDash() const; + int GetDashCount() const; + wxBitmap* GetStipple(void) const; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxPenStyle)style); } +#endif + + // + // Implementation + // + + // + // Useful helper: create the brush resource + // + bool RealizeResource(void); + bool FreeResource(bool bForce = false); + virtual WXHANDLE GetResourceHandle(void) const; + bool IsFree(void) const; + +private: + LINEBUNDLE m_vLineBundle; + AREABUNDLE m_vAreaBundle; + +protected: + virtual wxGDIRefData* CreateGDIRefData() const; + virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const; + + // same as FreeResource() + RealizeResource() + bool Recreate(); + + DECLARE_DYNAMIC_CLASS(wxPen) +}; // end of CLASS wxPen + +extern int wx2os2PenStyle(wxPenStyle nWxStyle); + +#endif + // _WX_PEN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pencil.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pencil.ptr new file mode 100644 index 0000000000..792d7bbec6 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pencil.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pnghand.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pnghand.h new file mode 100644 index 0000000000..f5d0209dcd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pnghand.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/pnghand.h +// Purpose: PNG bitmap handler +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Microsoft, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PNGHAND_H_ +#define _WX_PNGHAND_H_ + +class WXDLLIMPEXP_CORE wxPNGFileHandler: public wxBitmapHandler +{ + DECLARE_DYNAMIC_CLASS(wxPNGFileHandler) +public: + inline wxPNGFileHandler(void) + { + m_sName = "PNG bitmap file"; + m_sExtension = "bmp"; + m_lType = wxBITMAP_TYPE_PNG; + } + + virtual bool LoadFile( wxBitmap* pBitmap + ,const wxString& rName + ,HPS hPs + ,long lFlags + ,int nDesiredWidth + ,int nDesiredHeight + ); + virtual bool SaveFile( wxBitmap* pBitmap + ,const wxString& rName + ,int nType + ,const wxPalette* pPalette = NULL + ); +}; + +#endif + // _WX_PNGHAND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pngread.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pngread.h new file mode 100644 index 0000000000..3c40306804 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pngread.h @@ -0,0 +1,287 @@ +/* + * File: wx/os2/pngread.h + * Purpose: PNG file reader + * Author: Alejandro Aguilar Sierra/Julian Smart + * Created: 1995 + * Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra@servidor.unam.mx> + * + * + */ + +#ifndef _WX_PNGREAD__ +#define _WX_PNGREAD__ + +#ifndef byte +typedef unsigned char byte; +#endif + +#define WXIMA_COLORS DIB_PAL_COLORS + +typedef byte* ImagePointerType; + +typedef struct +{ + byte red; + byte green; + byte blue; +} rgb_color_struct; + + +#define COLORTYPE_PALETTE 1 +#define COLORTYPE_COLOR 2 +#define COLORTYPE_ALPHA 4 + +class wxPNGReader +{ +protected: + int filetype; + wxChar filename[255]; + ImagePointerType RawImage; // Image data + + int Width, Height; // Dimensions + int Depth; // (bits x pixel) + int ColorType; // Bit 1 = Palette used + // Bit 2 = Color used + // Bit 3 = Alpha used + + long EfeWidth; // Efective Width + + BITMAPINFOHEADER2* lpbi; + int bgindex; + wxPalette* Palette; + bool imageOK; +friend class wxPNGReaderIter; +public: + wxPNGReader(void); + wxPNGReader (wxChar* ImageFileName); // Read an image file + ~wxPNGReader (); + + void Create(int width, int height, int deep, int colortype=-1); + + bool ReadFile( wxChar* ImageFileName=0 ); + bool SaveFile( wxChar* ImageFileName=0 ); + bool SaveXPM(wxChar *filename, wxChar *name = 0); + int GetWidth( void ) const { return Width; } + int GetHeight( void ) const { return Height; } + int GetDepth( void ) const { return Depth; } + int GetColorType( void ) const { return ColorType; } + + int GetIndex(int x, int y); + bool GetRGB(int x, int y, byte* r, byte* g, byte* b); + + bool SetIndex(int x, int y, int index); + bool SetRGB(int x, int y, byte r, byte g, byte b); + + // ColorMap settings + bool SetPalette(wxPalette* colourmap); + bool SetPalette(int n, rgb_color_struct *rgb_struct); + bool SetPalette(int n, byte *r, byte *g=0, byte *b=0); + wxPalette* GetPalette() const { return Palette; } + + void NullData(); + inline int GetBGIndex(void) { return bgindex; } + + inline bool Inside(int x, int y) + { return (0<=y && y<Height && 0<=x && x<Width); } + + virtual wxBitmap *GetBitmap(void); + virtual bool InstantiateBitmap(wxBitmap *bitmap); + wxMask *CreateMask(void); + + inline bool Ok() const { return IsOk(); } + inline bool IsOk(void) { return imageOK; } +}; + +class wxPNGReaderIter +{ +protected: + int Itx, Ity; // Counters + int Stepx, Stepy; + ImagePointerType IterImage; // Image pointer + wxPNGReader *ima; +public: +// Constructors + wxPNGReaderIter ( void ); + wxPNGReaderIter ( wxPNGReader *imax ); + operator wxPNGReader* (); + +// Iterators + bool ItOK (); + void reset (); + void upset (); + void SetRow(byte *buf, int n); + void GetRow(byte *buf, int n); + byte GetByte( ) { return IterImage[Itx]; } + void SetByte(byte b) { IterImage[Itx] = b; } + ImagePointerType GetRow(void); + bool NextRow(); + bool PrevRow(); + bool NextByte(); + bool PrevByte(); + + void SetSteps(int x, int y=0) { Stepx = x; Stepy = y; } + void GetSteps(int *x, int *y) { *x = Stepx; *y = Stepy; } + bool NextStep(); + bool PrevStep(); + +////////////////////////// AD - for interlace /////////////////////////////// + void SetY(int y); +///////////////////////////////////////////////////////////////////////////// +}; + + +inline +wxPNGReaderIter::wxPNGReaderIter(void) +{ + ima = 0; + IterImage = 0; + Itx = Ity = 0; + Stepx = Stepy = 0; +} + +inline +wxPNGReaderIter::wxPNGReaderIter(wxPNGReader *imax): ima(imax) +{ + if (ima) + IterImage = ima->RawImage; + Itx = Ity = 0; + Stepx = Stepy = 0; +} + +inline +wxPNGReaderIter::operator wxPNGReader* () +{ + return ima; +} + +inline +bool wxPNGReaderIter::ItOK () +{ + if (ima) + return ima->Inside(Itx, Ity); + else + return FALSE; +} + + +inline void wxPNGReaderIter::reset() +{ + IterImage = ima->RawImage; + Itx = Ity = 0; +} + +inline void wxPNGReaderIter::upset() +{ + Itx = 0; + Ity = ima->Height-1; + IterImage = ima->RawImage + ima->EfeWidth*(ima->Height-1); +} + +inline bool wxPNGReaderIter::NextRow() +{ + if (++Ity >= ima->Height) return 0; + IterImage += ima->EfeWidth; + return 1; +} + +inline bool wxPNGReaderIter::PrevRow() +{ + if (--Ity < 0) return 0; + IterImage -= ima->EfeWidth; + return 1; +} + +////////////////////////// AD - for interlace /////////////////////////////// +inline void wxPNGReaderIter::SetY(int y) +{ + if ((y < 0) || (y > ima->Height)) return; + Ity = y; + IterImage = ima->RawImage + ima->EfeWidth*y; +} + +///////////////////////////////////////////////////////////////////////////// + +inline void wxPNGReaderIter::SetRow(byte *buf, int n) +{ +// Here should be bcopy or memcpy + //_fmemcpy(IterImage, (void far *)buf, n); + if (n<0) + n = ima->GetWidth(); + + for (int i=0; i<n; i++) IterImage[i] = buf[i]; +} + +inline void wxPNGReaderIter::GetRow(byte *buf, int n) +{ + for (int i=0; i<n; i++) buf[i] = IterImage[i]; +} + +inline ImagePointerType wxPNGReaderIter::GetRow() +{ + return IterImage; +} + +inline bool wxPNGReaderIter::NextByte() +{ + if (++Itx < ima->EfeWidth) + return 1; + else + if (++Ity < ima->Height) + { + IterImage += ima->EfeWidth; + Itx = 0; + return 1; + } else + return 0; +} + +inline bool wxPNGReaderIter::PrevByte() +{ + if (--Itx >= 0) + return 1; + else + if (--Ity >= 0) + { + IterImage -= ima->EfeWidth; + Itx = 0; + return 1; + } else + return 0; +} + +inline bool wxPNGReaderIter::NextStep() +{ + Itx += Stepx; + if (Itx < ima->EfeWidth) + return 1; + else { + Ity += Stepy; + if (Ity < ima->Height) + { + IterImage += ima->EfeWidth; + Itx = 0; + return 1; + } else + return 0; + } +} + +inline bool wxPNGReaderIter::PrevStep() +{ + Itx -= Stepx; + if (Itx >= 0) + return 1; + else { + Ity -= Stepy; + if (Ity >= 0 && Ity < ima->Height) + { + IterImage -= ima->EfeWidth; + Itx = 0; + return 1; + } else + return 0; + } +} + +#endif + // _WX_PNGREAD__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pntleft.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pntleft.ptr new file mode 100644 index 0000000000..e11bb0882d Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pntleft.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pntright.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pntright.ptr new file mode 100644 index 0000000000..b243c42a05 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/pntright.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/popupwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/popupwin.h new file mode 100644 index 0000000000..bcbe265cf4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/popupwin.h @@ -0,0 +1,57 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/popupwin.h +// Purpose: wxPopupWindow class for wxPM +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.01.01 +// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PM_POPUPWIN_H_ +#define _WX_PM_POPUPWIN_H_ + +// ---------------------------------------------------------------------------- +// wxPopupWindow +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPopupWindow : public wxPopupWindowBase +{ +public: + wxPopupWindow() { } + + wxPopupWindow( wxWindow* pParent + ,int nFlags + ) + { (void)Create(pParent, nFlags); } + + bool Create( wxWindow* pParent + ,int nFlags = wxBORDER_NONE + ); + // + // Implementation only from now on + // ------------------------------- + // +protected: + + virtual void DoGetPosition( int* pnX + ,int* pny + ) const; + + virtual WXDWORD OS2GetStyle( long lFlags + ,WXDWORD* dwExstyle + ) const; + // + // Get the HWND to be used as parent of this window with CreateWindow() + // + virtual WXHWND OS2GetParent(void) const; + + // + // The list of all currently shown popup windows used by FindPopupFor() + // + static wxWindowList m_svShownPopups; + + DECLARE_DYNAMIC_CLASS(wxPopupWindow) +}; // end of CLASS wxPopupWindow + +#endif // _WX_PM_POPUPWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/print.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/print.h new file mode 100644 index 0000000000..a22fab1e01 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/print.h @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/print.h +// Purpose: wxPrinter, wxPrintPreview classes +// Author: David Webster +// Modified by: +// Created: 10/14/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRINT_H_ +#define _WX_PRINT_H_ + +#include "wx/prntbase.h" + +/* + * Represents the printer: manages printing a wxPrintout object + */ + +class WXDLLIMPEXP_CORE wxOS2Printer: public wxPrinterBase +{ + DECLARE_DYNAMIC_CLASS(wxPrinter) + + public: + wxOS2Printer(wxPrintData *data = NULL); + virtual ~wxOS2Printer(); + + virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE); + virtual wxDC* PrintDialog(wxWindow *parent); + virtual bool Setup(wxWindow *parent); +private: +}; + +/* + * wxPrintPreview + * Programmer creates an object of this class to preview a wxPrintout. + */ + +class WXDLLIMPEXP_CORE wxOS2PrintPreview: public wxPrintPreviewBase +{ + DECLARE_CLASS(wxPrintPreview) + + public: + wxOS2PrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL); + virtual ~wxOS2PrintPreview(); + + virtual bool Print(bool interactive); + virtual void DetermineScaling(); +}; + +#endif + // _WX_PRINT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/printos2.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/printos2.h new file mode 100644 index 0000000000..3cf8f0ec4d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/printos2.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/printos2.h +// Purpose: wxOS2Printer, wxOS2PrintPreview classes +// Author: David Webster +// Modified by: +// Created: 10/14/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRINT_H_ +#define _WX_PRINT_H_ + +#include "wx/prntbase.h" + +#if wxUSE_PRINTING_ARCHITECTURE + +/* + * Represents the printer: manages printing a wxPrintout object + */ + +class WXDLLIMPEXP_CORE wxOS2Printer: public wxPrinterBase +{ + DECLARE_DYNAMIC_CLASS(wxOS2Printer) + +public: + wxOS2Printer(wxPrintDialogData *data = NULL); + virtual ~wxOS2Printer(); + + virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true); + virtual wxDC* PrintDialog(wxWindow *parent); + virtual bool Setup(wxWindow *parent); +private: +}; + +/* + * wxOS2PrintPreview + * Programmer creates an object of this class to preview a wxPrintout. + */ + +class WXDLLIMPEXP_CORE wxOS2PrintPreview: public wxPrintPreviewBase +{ + DECLARE_CLASS(wxOS2PrintPreview) + +public: + wxOS2PrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintDialogData *data = NULL); + wxOS2PrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data); + virtual ~wxOS2PrintPreview(); + + virtual bool Print(bool interactive); + virtual void DetermineScaling(); +}; + +#endif // wxUSE_PRINTING_ARCHITECTURE + +#endif + // _WX_PRINT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/private.h new file mode 100644 index 0000000000..9729793909 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/private.h @@ -0,0 +1,423 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/private.h +// Purpose: Private declarations: as this header is only included by +// wxWidgets itself, it may contain identifiers which don't start +// with "wx". +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_PRIVATE_H_ +#define _WX_OS2_PRIVATE_H_ + +#define INCL_BASE +#define INCL_PM +#define INCL_GPI +#define INCL_WINSYS +#define INCL_GPIERRORS +#define INCL_DOS +#define INCL_DOSPROCESS +#define INCL_DOSERRORS +#define INCL_WIN +#define INCL_WINATOM +#define INCL_SHLERRORS + +#include <os2.h> + +#if wxONLY_WATCOM_EARLIER_THAN(1,4) + inline HATOMTBL APIENTRY WinQuerySystemAtomTable(VOID){return NULL;} + inline ULONG APIENTRY WinQueryAtomName(HATOMTBL,ATOM,PCSZ,ULONG){return 0;} + inline LONG APIENTRY GpiPointArc(HPS,PPOINTL){return GPI_ERROR;} + inline BOOL APIENTRY WinDrawPointer(HPS,LONG,LONG,HPOINTER,ULONG){return FALSE;} + inline HPOINTER APIENTRY WinCreatePointerIndirect(HWND,PPOINTERINFO){return NULLHANDLE;} + inline BOOL APIENTRY WinGetMaxPosition(HWND,PSWP){return FALSE;} + inline BOOL APIENTRY WinGetMinPosition(HWND,PSWP,PPOINTL){return FALSE;} +#endif + +#if defined(__WATCOMC__) && defined(__WXMOTIF__) + #include <os2def.h> + #define I_NEED_OS2_H + #include <X11/Xmd.h> + + // include this header from here for many of the GUI related code + #if wxUSE_GUI + extern "C" { + #include <Xm/VendorSP.h> + } + #endif + + // provide Unix-like pipe() + #include <types.h> + #include <tcpustd.h> + #include <sys/time.h> + // Use ::DosCreatePipe or ::DosCreateNPipe under OS/2 + // for more see http://posix2.sourceforge.net/guide.html + inline int pipe( int WXUNUSED(filedes)[2] ) + { + wxFAIL_MSG(wxT("Implement first")); + return -1; + } +#endif + +#if defined (__EMX__) && !defined(USE_OS2_TOOLKIT_HEADERS) && !defined(HAVE_SPBCDATA) + + typedef struct _SPBCDATA { + ULONG cbSize; /* Size of control block. */ + ULONG ulTextLimit; /* Entryfield text limit. */ + LONG lLowerLimit; /* Spin lower limit (numeric only). */ + LONG lUpperLimit; /* Spin upper limit (numeric only). */ + ULONG idMasterSpb; /* ID of the servant's master spinbutton. */ + PVOID pHWXCtlData; /* Handwriting control data structure flag. */ + } SPBCDATA; + + typedef SPBCDATA *PSPBCDATA; + +#endif + +#include "wx/dlimpexp.h" +#include "wx/fontenc.h" + +class WXDLLIMPEXP_FWD_CORE wxFont; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_BASE wxString; +class WXDLLIMPEXP_FWD_CORE wxBitmap; + +// --------------------------------------------------------------------------- +// private constants +// --------------------------------------------------------------------------- + +// +// Constant strings for control names and classes +// + +// +// Controls +// +WXDLLIMPEXP_DATA_CORE(extern const char) wxButtonNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxCheckBoxNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxChoiceNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxComboBoxNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxDialogNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxFrameNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxGaugeNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxStaticBoxNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxListBoxNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxStaticLineNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxStaticTextNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxStaticBitmapNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxPanelNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxRadioBoxNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxRadioButtonNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxBitmapRadioButtonNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxScrollBarNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxSliderNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxTextCtrlNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxToolBarNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxStatusLineNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxGetTextFromUserPromptStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxMessageBoxCaptionStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxFileSelectorPromptStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxFileSelectorDefaultWildcardStr[]; +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxInternalErrorStr; +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxFatalErrorStr; +WXDLLIMPEXP_DATA_CORE(extern const char) wxTreeCtrlNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxDirDialogNameStr[]; +WXDLLIMPEXP_DATA_CORE(extern const char) wxDirDialogDefaultFolderStr[]; + +// +// Class names +// +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxFrameClassName; +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxFrameClassNameNoRedraw; +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxMDIFrameClassName; +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxMDIFrameClassNameNoRedraw; +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxMDIChildFrameClassName; +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxMDIChildFrameClassNameNoRedraw; +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxPanelClassName; +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxPanelClassNameNR; +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxCanvasClassName; +WXDLLIMPEXP_DATA_CORE(extern const wxChar*) wxCanvasClassNameNR; + +// --------------------------------------------------------------------------- +// standard icons from the resources +// --------------------------------------------------------------------------- + +#ifdef __WXPM__ + +WXDLLIMPEXP_DATA_CORE(extern HICON) wxSTD_FRAME_ICON; +WXDLLIMPEXP_DATA_CORE(extern HICON) wxSTD_MDIPARENTFRAME_ICON; +WXDLLIMPEXP_DATA_CORE(extern HICON) wxSTD_MDICHILDFRAME_ICON; +WXDLLIMPEXP_DATA_CORE(extern HICON) wxDEFAULT_FRAME_ICON; +WXDLLIMPEXP_DATA_CORE(extern HICON) wxDEFAULT_MDIPARENTFRAME_ICON; +WXDLLIMPEXP_DATA_CORE(extern HICON) wxDEFAULT_MDICHILDFRAME_ICON; +WXDLLIMPEXP_DATA_CORE(extern HFONT) wxSTATUS_LINE_FONT; + +#endif + +// --------------------------------------------------------------------------- +// this defines a CASTWNDPROC macro which casts a pointer to the type of a +// window proc for PM. +// MPARAM is a void * but is really a 32-bit value +// --------------------------------------------------------------------------- + +typedef MRESULT (APIENTRY * WndProcCast) (HWND, ULONG, MPARAM, MPARAM); +#define CASTWNDPROC (WndProcCast) + +/* + * Decide what window classes we're going to use + * for this combination of CTl3D/FAFA settings + */ + +#define STATIC_CLASS wxT("STATIC") +#define STATIC_FLAGS (SS_TEXT|DT_LEFT|SS_LEFT|WS_VISIBLE) +#define CHECK_CLASS wxT("BUTTON") +#define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP) +#define CHECK_IS_FAFA FALSE +#define RADIO_CLASS wxT("BUTTON" ) +#define RADIO_FLAGS (BS_AUTORADIOBUTTON|WS_VISIBLE) +#define RADIO_SIZE 20 +#define RADIO_IS_FAFA FALSE +#define PURE_WINDOWS +/* PM has no group box button style +#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) +*/ + +// --------------------------------------------------------------------------- +// misc macros +// --------------------------------------------------------------------------- + +#define MEANING_CHARACTER '0' +#define DEFAULT_ITEM_WIDTH 200 +#define DEFAULT_ITEM_HEIGHT 80 + +// Scale font to get edit control height +#define EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy) (3*(cy)/2) + +#ifdef __WXPM__ + +// Generic subclass proc, for panel item moving/sizing and intercept +// EDIT control VK_RETURN messages +extern LONG APIENTRY wxSubclassedGenericControlProc(WXHWND hWnd, WXDWORD message, WXWPARAM wParam, WXLPARAM lParam); + +#endif + +// --------------------------------------------------------------------------- +// constants which might miss from some compilers' headers +// --------------------------------------------------------------------------- + +#if !defined(WS_EX_CLIENTEDGE) + #define WS_EX_CLIENTEDGE 0x00000200L +#endif + +#ifndef ENDSESSION_LOGOFF + #define ENDSESSION_LOGOFF 0x80000000 +#endif + +#ifndef PMERR_INVALID_PARM + #define PMERR_INVALID_PARM 0x1303 +#endif + +#ifndef PMERR_INVALID_PARAMETERS + #define PMERR_INVALID_PARAMETERS 0x1208 +#endif + +#ifndef BOOKERR_INVALID_PARAMETERS + #define BOOKERR_INVALID_PARAMETERS -1 +#endif + +#ifndef DLGC_ENTRYFIELD + #define DLGC_ENTRYFIELD 0x0001 +#endif + +#ifndef DLGC_BUTTON + #define DLGC_BUTTON 0x0002 +#endif + +#ifndef DLGC_MLE + #define DLGC_MLE 0x0400 +#endif + +#ifndef DP_NORMAL + #define DP_NORMAL 0 +#endif + +// --------------------------------------------------------------------------- +// debug messages -- OS/2 has no native debug output system +// --------------------------------------------------------------------------- + +// --------------------------------------------------------------------------- +// macros to make casting between WXFOO and FOO a bit easier: the GetFoo() +// returns Foo cast to the Windows type for oruselves, while GetFooOf() takes +// an argument which should be a pointer or reference to the object of the +// corresponding class (this depends on the macro) +// --------------------------------------------------------------------------- + +#define GetHwnd() ((HWND)GetHWND()) +#define GetHwndOf(win) ((HWND)((win)->GetHWND())) +// old name +#define GetWinHwnd GetHwndOf + +#define GetHdc() ((HDC)GetHDC()) +#define GetHdcOf(dc) ((HDC)(dc).GetHDC()) + +#define GetHbitmap() ((HBITMAP)GetHBITMAP()) +#define GetHbitmapOf(bmp) ((HBITMAP)(bmp).GetHBITMAP()) + +#define GetHicon() ((HICON)GetHICON()) +#define GetHiconOf(icon) ((HICON)(icon).GetHICON()) + +#define GetHaccel() ((HACCEL)GetHACCEL()) +#define GetHaccelOf(table) ((HACCEL)((table).GetHACCEL())) + +#define GetHmenu() ((HMENU)GetHMenu()) +#define GetHmenuOf(menu) ((HMENU)menu->GetHMenu()) + +#define GetHcursor() ((HCURSOR)GetHCURSOR()) +#define GetHcursorOf(cursor) ((HCURSOR)(cursor).GetHCURSOR()) + +#define GetHfont() ((HFONT)GetHFONT()) +#define GetHfontOf(font) ((HFONT)(font).GetHFONT()) + +// OS/2 convention of the mask is opposed to the wxWidgets one, so we need +// to invert the mask each time we pass one/get one to/from Windows +extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w = 0, int h = 0); +extern HBITMAP wxCopyBmp(HBITMAP hbmp, bool flip=false, int w=0, int h=0); + +// --------------------------------------------------------------------------- +// global data +// --------------------------------------------------------------------------- + +#ifdef __WXPM__ +// The MakeProcInstance version of the function wxSubclassedGenericControlProc +WXDLLIMPEXP_DATA_CORE(extern int) wxGenericControlSubClassProc; +WXDLLIMPEXP_DATA_CORE(extern wxChar*) wxBuffer; +WXDLLIMPEXP_DATA_CORE(extern HINSTANCE) wxhInstance; +#endif + +// --------------------------------------------------------------------------- +// global functions +// --------------------------------------------------------------------------- + +#ifdef __WXPM__ +extern "C" +{ +WXDLLIMPEXP_CORE HINSTANCE wxGetInstance(); +} + +WXDLLIMPEXP_CORE void wxSetInstance(HINSTANCE hInst); +#endif + +#include "wx/thread.h" +static inline MRESULT MySendMsg(HWND hwnd, ULONG ulMsgid, + MPARAM mpParam1, MPARAM mpParam2) +{ + MRESULT vRes; + vRes = ::WinSendMsg(hwnd, ulMsgid, mpParam1, mpParam2); +#if wxUSE_THREADS + if (!wxThread::IsMain()) + ::WinPostMsg(hwnd, ulMsgid, mpParam1, mpParam2); +#endif + return vRes; +} +#define WinSendMsg MySendMsg + +#ifdef __WXPM__ + +WXDLLIMPEXP_CORE void wxDrawBorder( HPS hPS + ,RECTL& rRect + ,WXDWORD dwStyle + ); + +WXDLLIMPEXP_CORE wxWindow* wxFindWinFromHandle(WXHWND hWnd); + +WXDLLIMPEXP_CORE void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font); + +WXDLLIMPEXP_CORE void wxConvertVectorFontSize( FIXED fxPointSize + ,PFATTRS pFattrs + ); +WXDLLIMPEXP_CORE void wxFillLogFont( LOGFONT* pLogFont + ,PFACENAMEDESC pFaceName + ,HPS* phPS + ,bool* pbInternalPS + ,long* pflId + ,wxString& sFaceName + ,wxFont* pFont + ); +WXDLLIMPEXP_CORE wxFontEncoding wxGetFontEncFromCharSet(int nCharSet); +WXDLLIMPEXP_CORE void wxOS2SelectMatchingFontByName( PFATTRS vFattrs + ,PFACENAMEDESC pFaceName + ,PFONTMETRICS pFM + ,int nNumFonts + ,const wxFont* pFont + ); +WXDLLIMPEXP_CORE wxFont wxCreateFontFromLogFont( LOGFONT* pLogFont + ,PFONTMETRICS pFM + ,PFACENAMEDESC pFace + ); +WXDLLIMPEXP_CORE int wxGpiStrcmp(wxChar* s0, wxChar* s1); + +WXDLLIMPEXP_CORE void wxSliderEvent(WXHWND control, WXWORD wParam, WXWORD pos); +WXDLLIMPEXP_CORE void wxScrollBarEvent(WXHWND hbar, WXWORD wParam, WXWORD pos); + +// Find maximum size of window/rectangle +WXDLLIMPEXP_CORE extern void wxFindMaxSize(WXHWND hwnd, RECT *rect); + +WXDLLIMPEXP_CORE wxWindow* wxFindControlFromHandle(WXHWND hWnd); +WXDLLIMPEXP_CORE void wxAddControlHandle(WXHWND hWnd, wxWindow *item); + +// Safely get the window text (i.e. without using fixed size buffer) +WXDLLIMPEXP_CORE extern wxString wxGetWindowText(WXHWND hWnd); + +// get the window class name +WXDLLIMPEXP_CORE extern wxString wxGetWindowClass(WXHWND hWnd); + +// get the window id (should be unsigned, hence this is not wxWindowID which +// is, for mainly historical reasons, signed) +WXDLLIMPEXP_CORE extern WXWORD wxGetWindowId(WXHWND hWnd); + +// Convert a PM Error code to a string +WXDLLIMPEXP_BASE extern wxString wxPMErrorToStr(ERRORID vError); + +// Does this window style specify any border? +inline bool wxStyleHasBorder(long style) +{ + return (style & (wxSIMPLE_BORDER | wxRAISED_BORDER | + wxSUNKEN_BORDER | wxDOUBLE_BORDER)) != 0; +} + +inline RECTL wxGetWindowRect(HWND hWnd) +{ + RECTL vRect; + + ::WinQueryWindowRect(hWnd, &vRect); + return vRect; +} // end of wxGetWindowRect + +WXDLLIMPEXP_CORE extern void wxOS2SetFont( HWND hWnd + ,const wxFont& rFont + ); + + +WXDLLIMPEXP_CORE extern bool wxCheckWindowWndProc( WXHWND hWnd + ,WXFARPROC fnWndProc + ); +WXDLLIMPEXP_CORE extern wxBitmap wxDisableBitmap( const wxBitmap& rBmp + ,long lColor + ); +#if wxUSE_GUI +class wxColour; +WXDLLIMPEXP_CORE extern COLORREF wxColourToRGB(const wxColour& rColor); +#endif + +#endif // __WXPM__ + +#endif // _WX_OS2_PRIVATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/private/timer.h new file mode 100644 index 0000000000..a1ba027559 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/private/timer.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/private/timer.h +// Purpose: wxTimer class +// Author: David Webster +// Modified by: +// Created: 10/17/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_PRIVATE_TIMER_H_ +#define _WX_OS2_PRIVATE_TIMER_H_ + +#include "wx/private/timer.h" + +class WXDLLIMPEXP_CORE wxOS2TimerImpl: public wxTimerImpl +{ +friend void wxProcessTimer(wxOS2TimerImpl& timer); + +public: + wxOS2TimerImpl(wxTimer *timer) : wxTimerImpl(timer) { m_ulId = 0; } + + virtual bool Start(int nMilliseconds = -1, bool bOneShot = FALSE); + virtual void Stop(void); + + virtual bool IsRunning(void) const { return m_ulId != 0L; } + +protected: + ULONG m_ulId; + HAB m_Hab; +}; + +extern ULONG wxTimerProc( HWND WXUNUSED(hwnd) + ,ULONG + ,int nIdTimer + ,ULONG + ); +#endif // _WX_OS2_PRIVATE_TIMER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/query.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/query.ptr new file mode 100644 index 0000000000..cfffae5951 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/query.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/question.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/question.ico new file mode 100644 index 0000000000..129053ec6a Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/question.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/radiobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/radiobox.h new file mode 100644 index 0000000000..c548ab7b14 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/radiobox.h @@ -0,0 +1,193 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/radiobox.h +// Purpose: wxRadioBox class +// Author: David Webster +// Modified by: +// Created: 10/12/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RADIOBOX_H_ +#define _WX_RADIOBOX_H_ + +// List box item +class WXDLLIMPEXP_FWD_CORE wxBitmap ; + +class WXDLLIMPEXP_CORE wxRadioBox: public wxControl, public wxRadioBoxBase +{ +public: + wxRadioBox(); + + inline wxRadioBox( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,int nNum = 0 + ,const wxString asChoices[] = NULL + ,int nMajorDim = 0 + ,long lStyle = wxRA_SPECIFY_COLS + ,const wxValidator& rVal = wxDefaultValidator + ,const wxString& rsName = wxRadioBoxNameStr + ) + { + Create( pParent + ,vId + ,rsTitle + ,rPos + ,rSize + ,nNum + ,asChoices + ,nMajorDim + ,lStyle + ,rVal + ,rsName + ); + } + + inline wxRadioBox( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos + ,const wxSize& rSize + ,const wxArrayString& asChoices + ,int nMajorDim = 0 + ,long lStyle = wxRA_SPECIFY_COLS + ,const wxValidator& rVal = wxDefaultValidator + ,const wxString& rsName = wxRadioBoxNameStr + ) + { + Create( pParent + ,vId + ,rsTitle + ,rPos + ,rSize + ,asChoices + ,nMajorDim + ,lStyle + ,rVal + ,rsName + ); + } + + virtual ~wxRadioBox(); + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,int nNum = 0 + ,const wxString asChoices[] = NULL + ,int nMajorDim = 0 + ,long lStyle = wxRA_SPECIFY_COLS + ,const wxValidator& rVal = wxDefaultValidator + ,const wxString& rsName = wxRadioBoxNameStr + ); + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos + ,const wxSize& rSize + ,const wxArrayString& asChoices + ,int nMajorDim = 0 + ,long lStyle = wxRA_SPECIFY_COLS + ,const wxValidator& rVal = wxDefaultValidator + ,const wxString& rsName = wxRadioBoxNameStr + ); + + // Enabling + virtual bool Enable(bool bEnable = true); + virtual bool Enable(unsigned int nItem, bool bEnable = true); + virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + // Showing + virtual bool Show(bool bShow = true); + virtual bool Show(unsigned int nItem, bool bShow = true); + virtual bool IsItemShown(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + void Command(wxCommandEvent& rEvent); + bool ContainsHWND(WXHWND hWnd) const; + + virtual WXHBRUSH OnCtlColor( WXHDC hDC + ,WXHWND hWnd + ,WXUINT uCtlColor + ,WXUINT uMessage + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + virtual bool OS2Command( WXUINT uParam + ,WXWORD wId + ); + void SendNotificationEvent(void); + MRESULT WindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + + + + + virtual unsigned int GetCount() const; + inline WXHWND* GetRadioButtons(void) const { return m_ahRadioButtons; } + int GetSelection(void) const; + void GetSize(int* pnX, int* pnY) const; + inline int GetSizeFlags(void) const { return m_nSizeFlags; } + virtual wxString GetString(unsigned int nIndex) const; + virtual wxString GetStringSelection(void) const; + + inline void SetButtonFont(const wxFont& rFont) { SetFont(rFont); } + void SetFocus(void); + virtual bool SetFont(const wxFont& rFont); + inline void SetLabelFont(const wxFont& WXUNUSED(font)) {} + virtual void SetSelection(int nIndex); + virtual void SetString(unsigned int nNum, const wxString& rsLabel); + virtual bool SetStringSelection(const wxString& rsStr); + + virtual void SetLabel(const wxString& rsLabel) + { wxControl::SetLabel(rsLabel); } + virtual wxString GetLabel() const + { return wxControl::GetLabel(); } + + void SetLabel( int nItem, const wxString& rsLabel ); + void SetLabel( int item, wxBitmap* pBitmap ); + wxString GetLabel(int nItem) const; + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + virtual wxSize DoGetBestSize(void) const; + virtual void DoSetSize( int nX + ,int nY + ,int nWidth + ,int nHeight + ,int nSizeFlags = wxSIZE_AUTO + ); + wxSize GetMaxButtonSize(void) const; + wxSize GetTotalButtonSize(const wxSize& rSizeBtn) const; + void SubclassRadioButton(WXHWND hWndBtn); + + + WXHWND* m_ahRadioButtons; + int* m_pnRadioWidth; // for bitmaps + int* m_pnRadioHeight; + int m_nSelectedButton; + int m_nSizeFlags; + +private: + + unsigned int m_nNoItems; + + DECLARE_DYNAMIC_CLASS(wxRadioBox) +}; // end of wxRadioBox + +#endif // _WX_RADIOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/radiobut.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/radiobut.h new file mode 100644 index 0000000000..7e8f9ac173 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/radiobut.h @@ -0,0 +1,80 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/radiobut.h +// Purpose: wxRadioButton class +// Author: David Webster +// Modified by: +// Created: 10/12/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RADIOBUT_H_ +#define _WX_RADIOBUT_H_ + +#include "wx/control.h" + +class WXDLLIMPEXP_CORE wxRadioButton: public wxControl +{ +public: + inline wxRadioButton() { Init(); } + inline wxRadioButton( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxRadioButtonNameStr + ) + { + Init(); + + Create( pParent + ,vId + ,rsLabel + ,rPos + ,rSize + ,lStyle + ,rValidator + ,rsName + ); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxRadioButtonNameStr + ); + + virtual void SetLabel(const wxString& rsLabel); + virtual void SetValue(bool bVal); + virtual bool GetValue(void) const ; + + bool OS2Command( WXUINT wParam + ,WXWORD wId + ); + void Command(wxCommandEvent& rEvent); + virtual MRESULT OS2WindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + virtual void SetFocus(void); + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + virtual wxSize DoGetBestSize() const; + +private: + void Init(void); + + bool m_bFocusJustSet; + + DECLARE_DYNAMIC_CLASS(wxRadioButton) +}; // end of wxRadioButton + +#endif + // _WX_RADIOBUT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/region.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/region.h new file mode 100644 index 0000000000..40ef561b96 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/region.h @@ -0,0 +1,115 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/region.h +// Purpose: wxRegion class +// Author: David Webster +// Modified by: +// Created: 10/15/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_REGION_H_ +#define _WX_OS2_REGION_H_ + +#include "wx/list.h" +#include "wx/os2/private.h" + +class WXDLLIMPEXP_CORE wxRegion : public wxRegionWithCombine +{ +public: + wxRegion( wxCoord x + ,wxCoord y + ,wxCoord vWidth + ,wxCoord vHeight + ); + wxRegion( const wxPoint& rTopLeft + ,const wxPoint& rBottomRight + ); + wxRegion(const wxRect& rRect); + wxRegion(WXHRGN hRegion, WXHDC hPS); // Hangs on to this region + wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); + wxRegion( const wxBitmap& bmp) + { + Union(bmp); + } + wxRegion( const wxBitmap& bmp, + const wxColour& transColour, int tolerance = 0) + { + Union(bmp, transColour, tolerance); + } + + wxRegion(); + virtual ~wxRegion(); + + // + // Modify region + // + + // + // Clear current region + // + virtual void Clear(); + + // + // Is region empty? + // + virtual bool IsEmpty() const; + + // + // Get internal region handle + // + WXHRGN GetHRGN() const; + + void SetPS(HPS hPS); + +protected: + virtual wxGDIRefData* CreateGDIRefData(void) const; + virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* pData) const; + + virtual bool DoIsEqual(const wxRegion& region) const; + virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const; + virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const; + virtual wxRegionContain DoContainsRect(const wxRect& rect) const; + + virtual bool DoOffset(wxCoord x, wxCoord y); + virtual bool DoCombine(const wxRegion& region, wxRegionOp op); + + friend class WXDLLIMPEXP_FWD_CORE wxRegionIterator; + DECLARE_DYNAMIC_CLASS(wxRegion); + +}; // end of CLASS wxRegion + +class WXDLLIMPEXP_CORE wxRegionIterator : public wxObject +{ +public: + wxRegionIterator(); + wxRegionIterator(const wxRegion& rRegion); + virtual ~wxRegionIterator(); + + void Reset(void) { m_lCurrent = 0; } + void Reset(const wxRegion& rRegion); + + operator bool (void) const { return m_lCurrent < m_lNumRects; } + bool HaveRects(void) const { return m_lCurrent < m_lNumRects; } + + void operator ++ (void); + void operator ++ (int); + + wxCoord GetX(void) const; + wxCoord GetY(void) const; + wxCoord GetW(void) const; + wxCoord GetWidth(void) const { return GetW(); } + wxCoord GetH(void) const; + wxCoord GetHeight(void) const { return GetH(); } + wxRect GetRect(void) const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); } + +private: + long m_lCurrent; + long m_lNumRects; + wxRegion m_vRegion; + wxRect* m_pRects; + + DECLARE_DYNAMIC_CLASS(wxRegionIterator) +}; // end of wxRegionIterator + +#endif // _WX_OS2_REGION_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/removble.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/removble.ico new file mode 100644 index 0000000000..823094f1e5 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/removble.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/roller.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/roller.ptr new file mode 100644 index 0000000000..5306a1722b Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/roller.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/scrolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/scrolbar.h new file mode 100644 index 0000000000..d8688818e6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/scrolbar.h @@ -0,0 +1,98 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/scrolbar.h +// Purpose: wxScrollBar class +// Author: David Webster +// Modified by: +// Created: 10/15/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SCROLBAR_H_ +#define _WX_SCROLBAR_H_ + +#include "wx/scrolbar.h" + +// Scrollbar item +class WXDLLIMPEXP_CORE wxScrollBar : public wxScrollBarBase +{ +public: + inline wxScrollBar() + { + m_nPageSize = 0; + m_nViewSize = 0; + m_nObjectSize = 0; + } + inline wxScrollBar( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxSB_HORIZONTAL +#if wxUSE_VALIDATORS + ,const wxValidator& rValidator = wxDefaultValidator +#endif + ,const wxString& rsName = wxScrollBarNameStr + ) + { + Create( pParent + ,vId + ,rPos + ,rSize + ,lStyle +#if wxUSE_VALIDATORS + ,rValidator +#endif + ,rsName + ); + } + virtual ~wxScrollBar(); + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxSB_HORIZONTAL +#if wxUSE_VALIDATORS + ,const wxValidator& rValidator = wxDefaultValidator +#endif + ,const wxString& rsName = wxScrollBarNameStr + ); + + int GetThumbPosition(void) const ; + inline int GetThumbSize(void) const { return m_nPageSize; } + inline int GetPageSize(void) const { return m_nViewSize; } + inline int GetRange(void) const { return m_nObjectSize; } + + virtual void SetThumbPosition(int nViewStart); + virtual void SetScrollbar( int nPosition + ,int nThumbSize + ,int nRange + ,int nPageSize + ,bool bRefresh = TRUE + ); + + void Command(wxCommandEvent& rEvent); + virtual WXHBRUSH OnCtlColor( WXHDC hDC + ,WXHWND hWnd + ,WXUINT uCtlColor + ,WXUINT uMessage + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + virtual bool OS2OnScroll( int nOrientation + ,WXWORD wParam + ,WXWORD wPos + ,WXHWND hControl + ); + +protected: + int m_nPageSize; + int m_nViewSize; + int m_nObjectSize; + +private: + DECLARE_DYNAMIC_CLASS(wxScrollBar) +}; // end of CLASS wxScrollBar + +#endif + // _WX_SCROLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/setup.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/setup.h new file mode 100644 index 0000000000..6884170ab9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/setup.h @@ -0,0 +1,1515 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/setup.h +// Purpose: Configuration for the library +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SETUP_H_ +#define _WX_SETUP_H_ + +/* --- start common options --- */ +// ---------------------------------------------------------------------------- +// global settings +// ---------------------------------------------------------------------------- + +// define this to 0 when building wxBase library - this can also be done from +// makefile/project file overriding the value here +#ifndef wxUSE_GUI + #define wxUSE_GUI 1 +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// compatibility settings +// ---------------------------------------------------------------------------- + +// This setting determines the compatibility with 2.6 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_6 0 + +// This setting determines the compatibility with 2.8 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_8 1 + +// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when +// default system font is used for wxWindow::GetCharWidth/Height() instead of +// the current font. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxDIALOG_UNIT_COMPATIBILITY 0 + +// ---------------------------------------------------------------------------- +// debugging settings +// ---------------------------------------------------------------------------- + +// wxDEBUG_LEVEL will be defined as 1 in wx/debug.h so normally there is no +// need to define it here. You may do it for two reasons: either completely +// disable/compile out the asserts in release version (then do it inside #ifdef +// NDEBUG) or, on the contrary, enable more asserts, including the usually +// disabled ones, in the debug build (then do it inside #ifndef NDEBUG) +// +// #ifdef NDEBUG +// #define wxDEBUG_LEVEL 0 +// #else +// #define wxDEBUG_LEVEL 2 +// #endif + +// wxHandleFatalExceptions() may be used to catch the program faults at run +// time and, instead of terminating the program with a usual GPF message box, +// call the user-defined wxApp::OnFatalException() function. If you set +// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work. +// +// This setting is for Win32 only and can only be enabled if your compiler +// supports Win32 structured exception handling (currently only VC++ does) +// +// Default is 1 +// +// Recommended setting: 1 if your compiler supports it. +#define wxUSE_ON_FATAL_EXCEPTION 1 + +// Set this to 1 to be able to generate a human-readable (unlike +// machine-readable minidump created by wxCrashReport::Generate()) stack back +// trace when your program crashes using wxStackWalker +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_STACKWALKER 1 + +// Set this to 1 to compile in wxDebugReport class which allows you to create +// and optionally upload to your web site a debug report consisting of back +// trace of the crash (if wxUSE_STACKWALKER == 1) and other information. +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, it is compiled into a separate library so there +// is no overhead if you don't use it +#define wxUSE_DEBUGREPORT 1 + +// Generic comment about debugging settings: they are very useful if you don't +// use any other memory leak detection tools such as Purify/BoundsChecker, but +// are probably redundant otherwise. Also, Visual C++ CRT has the same features +// as wxWidgets memory debugging subsystem built in since version 5.0 and you +// may prefer to use it instead of built in memory debugging code because it is +// faster and more fool proof. +// +// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG +// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0) +// and if __NO_VC_CRTDBG__ is not defined. + +// The rest of the options in this section are obsolete and not supported, +// enable them at your own risk. + +// If 1, enables wxDebugContext, for writing error messages to file, etc. If +// __WXDEBUG__ is not defined, will still use the normal memory operators. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_CONTEXT 0 + +// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF* +// __WXDEBUG__ is also defined. +// +// WARNING: this code may not work with all architectures, especially if +// alignment is an issue. This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 1 if you are not using a memory debugging tool, else 0 +#define wxUSE_MEMORY_TRACING 0 + +// In debug mode, cause new and delete to be redefined globally. +// If this causes problems (e.g. link errors which is a common problem +// especially if you use another library which also redefines the global new +// and delete), set this to 0. +// This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If +// this causes problems (e.g. link errors), set this to 0. You may need to set +// this to 0 if using templates (at least for VC++). This switch is currently +// ignored for MinGW/Cygwin. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_NEW_ALWAYS 0 + + +// ---------------------------------------------------------------------------- +// Unicode support +// ---------------------------------------------------------------------------- + +// These settings are obsolete: the library is always built in Unicode mode +// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if +// absolutely necessary -- updating it is strongly recommended as the ANSI mode +// will disappear completely in future wxWidgets releases. +#ifndef wxUSE_UNICODE + #define wxUSE_UNICODE 1 +#endif + +// wxUSE_WCHAR_T is required by wxWidgets now, don't change. +#define wxUSE_WCHAR_T 1 + +// ---------------------------------------------------------------------------- +// global features +// ---------------------------------------------------------------------------- + +// Compile library in exception-safe mode? If set to 1, the library will try to +// behave correctly in presence of exceptions (even though it still will not +// use the exceptions itself) and notify the user code about any unhandled +// exceptions. If set to 0, propagation of the exceptions through the library +// code will lead to undefined behaviour -- but the code itself will be +// slightly smaller and faster. +// +// Note that like wxUSE_THREADS this option is automatically set to 0 if +// wxNO_EXCEPTIONS is defined. +// +// Default is 1 +// +// Recommended setting: depends on whether you intend to use C++ exceptions +// in your own code (1 if you do, 0 if you don't) +#define wxUSE_EXCEPTIONS 1 + +// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI +// +// Default is 0 +// +// Recommended setting: 0 (this is still work in progress...) +#define wxUSE_EXTENDED_RTTI 0 + +// Support for message/error logging. This includes wxLogXXX() functions and +// wxLog and derived classes. Don't set this to 0 unless you really know what +// you are doing. +// +// Default is 1 +// +// Recommended setting: 1 (always) +#define wxUSE_LOG 1 + +// Recommended setting: 1 +#define wxUSE_LOGWINDOW 1 + +// Recommended setting: 1 +#define wxUSE_LOGGUI 1 + +// Recommended setting: 1 +#define wxUSE_LOG_DIALOG 1 + +// Support for command line parsing using wxCmdLineParser class. +// +// Default is 1 +// +// Recommended setting: 1 (can be set to 0 if you don't use the cmd line) +#define wxUSE_CMDLINE_PARSER 1 + +// Support for multithreaded applications: if 1, compile in thread classes +// (thread.h) and make the library a bit more thread safe. Although thread +// support is quite stable by now, you may still consider recompiling the +// library without it if you have no use for it - this will result in a +// somewhat smaller and faster operation. +// +// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset +// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in +// build/msw/config.* file this value will have no effect. +// +// Default is 1 +// +// Recommended setting: 0 unless you do plan to develop MT applications +#define wxUSE_THREADS 1 + +// If enabled, compiles wxWidgets streams classes +// +// wx stream classes are used for image IO, process IO redirection, network +// protocols implementation and much more and so disabling this results in a +// lot of other functionality being lost. +// +// Default is 1 +// +// Recommended setting: 1 as setting it to 0 disables many other things +#define wxUSE_STREAMS 1 + +// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. +// Note that if the system's implementation does not support positional +// parameters, setting this to 1 forces the use of the wxWidgets implementation +// of wxVsnprintf. The standard vsnprintf() supports positional parameters on +// many Unix systems but usually doesn't under Windows. +// +// Positional parameters are very useful when translating a program since using +// them in formatting strings allow translators to correctly reorder the +// translated sentences. +// +// Default is 1 +// +// Recommended setting: 1 if you want to support multiple languages +#define wxUSE_PRINTF_POS_PARAMS 1 + +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but is +// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets +// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under +// XP as this triggers a bug in compiler TLS support that results in crashes +// when any TLS variables are used. +// +// If you're absolutely sure that your build of wxWidgets is never going to be +// used in such situation, either because it's not going to be linked from any +// kind of plugin or because you only target Vista or later systems, you can +// set this to 2 to force the use of compiler TLS even under MSW. +// +// Default is 1 meaning that compiler TLS is used only if it's 100% safe. +// +// Recommended setting: 2 if you want to have maximal performance and don't +// care about the scenario described above. +#define wxUSE_COMPILER_TLS 1 + +// ---------------------------------------------------------------------------- +// Interoperability with the standard library. +// ---------------------------------------------------------------------------- + +// Set wxUSE_STL to 1 to enable maximal interoperability with the standard +// library, even at the cost of backwards compatibility. +// +// Default is 0 +// +// Recommended setting: 0 as the options below already provide a relatively +// good level of interoperability and changing this option arguably isn't worth +// diverging from the official builds of the library. +#define wxUSE_STL 0 + +// This is not a real option but is used as the default value for +// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library headers, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_DEFAULT 0 +#else + #define wxUSE_STD_DEFAULT 1 +#endif + +// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<> +// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but +// usually more limited) implementations are used which allows to avoid the +// dependency on the C++ run-time library. +// +// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't +// support using standard containers and that VC6 needs non-default options for +// such build to avoid getting "fatal error C1076: compiler limit : internal +// heap limit reached; use /Zm to specify a higher limit" in its own standard +// headers, so you need to ensure you do increase the heap size before enabling +// this option for this compiler. +// +// Default is 0 for compatibility reasons. +// +// Recommended setting: 1 unless compatibility with the official wxWidgets +// build and/or the existing code is a concern. +#define wxUSE_STD_CONTAINERS 0 + +// Use standard C++ streams if 1 instead of wx streams in some places. If +// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the +// standard streams library. +// +// Notice that enabling this does not replace wx streams with std streams +// everywhere, in a lot of places wx streams are used no matter what. +// +// Default is 1 if compiler supports it. +// +// Recommended setting: 1 if you use the standard streams anyhow and so +// dependency on the standard streams library is not a +// problem +#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT + +// Enable minimal interoperability with the standard C++ string class if 1. +// "Minimal" means that wxString can be constructed from std::string or +// std::wstring but can't be implicitly converted to them. You need to enable +// the option below for the latter. +// +// Default is 1 for most compilers. +// +// Recommended setting: 1 unless you want to ensure your program doesn't use +// the standard C++ library at all. +#define wxUSE_STD_STRING wxUSE_STD_DEFAULT + +// Make wxString as much interchangeable with std::[w]string as possible, in +// particular allow implicit conversion of wxString to either of these classes. +// This comes at a price (or a benefit, depending on your point of view) of not +// allowing implicit conversion to "const char *" and "const wchar_t *". +// +// Because a lot of existing code relies on these conversions, this option is +// disabled by default but can be enabled for your build if you don't care +// about compatibility. +// +// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled. +// +// Recommended setting: 0 to remain compatible with the official builds of +// wxWidgets. +#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL + +// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix +// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>. +// +// Note that newer compilers (including VC++ 7.1 and later) don't support +// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow. +// +// Default is 0. +// +// Recommended setting: 0, only set to 1 if you use a really old compiler +#define wxUSE_IOSTREAMH 0 + + +// ---------------------------------------------------------------------------- +// non GUI features selection +// ---------------------------------------------------------------------------- + +// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit +// integer which is implemented in terms of native 64 bit integers if any or +// uses emulation otherwise. +// +// This class is required by wxDateTime and so you should enable it if you want +// to use wxDateTime. For most modern platforms, it will use the native 64 bit +// integers in which case (almost) all of its functions are inline and it +// almost does not take any space, so there should be no reason to switch it +// off. +// +// Recommended setting: 1 +#define wxUSE_LONGLONG 1 + +// Set wxUSE_BASE64 to 1, to compile in Base64 support. This is required for +// storing binary data in wxConfig on most platforms. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_BASE64 1 + +// Set this to 1 to be able to use wxEventLoop even in console applications +// (i.e. using base library only, without GUI). This is mostly useful for +// processing socket events but is also necessary to use timers in console +// applications +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_CONSOLE_EVENTLOOP 1 + +// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level +// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions. +// +// Default is 1 +// +// Recommended setting: 1 (wxFile is highly recommended as it is required by +// i18n code, wxFileConfig and others) +#define wxUSE_FILE 1 +#define wxUSE_FFILE 1 + +// Use wxFSVolume class providing access to the configured/active mount points +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely disabled if you don't use it) +#define wxUSE_FSVOLUME 1 + +// Use wxStandardPaths class which allows to retrieve some standard locations +// in the file system +// +// Default is 1 +// +// Recommended setting: 1 (may be disabled to save space, but not much) +#define wxUSE_STDPATHS 1 + +// use wxTextBuffer class: required by wxTextFile +#define wxUSE_TEXTBUFFER 1 + +// use wxTextFile class: requires wxFile and wxTextBuffer, required by +// wxFileConfig +#define wxUSE_TEXTFILE 1 + +// i18n support: _() macro, wxLocale class. Requires wxTextFile. +#define wxUSE_INTL 1 + +// Provide wxFoo_l() functions similar to standard foo() functions but taking +// an extra locale parameter. +// +// Notice that this is fully implemented only for the systems providing POSIX +// xlocale support or Microsoft Visual C++ >= 8 (which provides proprietary +// almost-equivalent of xlocale functions), otherwise wxFoo_l() functions will +// only work for the current user locale and "C" locale. You can use +// wxHAS_XLOCALE_SUPPORT to test whether the full support is available. +// +// Default is 1 +// +// Recommended setting: 1 but may be disabled if you are writing programs +// running only in C locale anyhow +#define wxUSE_XLOCALE 1 + +// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which +// allow to manipulate dates, times and time intervals. wxDateTime replaces the +// old wxTime and wxDate classes which are still provided for backwards +// compatibility (and implemented in terms of wxDateTime). +// +// Note that this class is relatively new and is still officially in alpha +// stage because some features are not yet (fully) implemented. It is already +// quite useful though and should only be disabled if you are aiming at +// absolutely minimal version of the library. +// +// Requires: wxUSE_LONGLONG +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_DATETIME 1 + +// Set wxUSE_TIMER to 1 to compile wxTimer class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_TIMER 1 + +// Use wxStopWatch clas. +// +// Default is 1 +// +// Recommended setting: 1 (needed by wxSocket) +#define wxUSE_STOPWATCH 1 + +// Set wxUSE_FSWATCHER to 1 if you want to enable wxFileSystemWatcher +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FSWATCHER 1 + +// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes +// which allow the application to store its settings in the persistent +// storage. Setting this to 1 will also enable on-demand creation of the +// global config object in wxApp. +// +// See also wxUSE_CONFIG_NATIVE below. +// +// Recommended setting: 1 +#define wxUSE_CONFIG 1 + +// If wxUSE_CONFIG is 1, you may choose to use either the native config +// classes under Windows (using .INI files under Win16 and the registry under +// Win32) or the portable text file format used by the config classes under +// Unix. +// +// Default is 1 to use native classes. Note that you may still use +// wxFileConfig even if you set this to 1 - just the config object created by +// default for the applications needs will be a wxRegConfig or wxIniConfig and +// not wxFileConfig. +// +// Recommended setting: 1 +#define wxUSE_CONFIG_NATIVE 1 + +// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows +// to connect/disconnect from the network and be notified whenever the dial-up +// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DIALUP_MANAGER 1 + +// Compile in classes for run-time DLL loading and function calling. +// Required by wxUSE_DIALUP_MANAGER. +// +// This setting is for Win32 only +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DYNLIB_CLASS 1 + +// experimental, don't use for now +#define wxUSE_DYNAMIC_LOADER 1 + +// Set to 1 to use socket classes +#define wxUSE_SOCKETS 1 + +// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS) +// +// Notice that currently setting this option under Windows will result in +// programs which can only run on recent OS versions (with ws2_32.dll +// installed) which is why it is disabled by default. +// +// Default is 1. +// +// Recommended setting: 1 if you need IPv6 support +#define wxUSE_IPV6 0 + +// Set to 1 to enable virtual file systems (required by wxHTML) +#define wxUSE_FILESYSTEM 1 + +// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ZIP 1 + +// Set to 1 to enable virtual archive filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ARCHIVE 1 + +// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_INET 1 + +// wxArchive classes for accessing archives such as zip and tar +#define wxUSE_ARCHIVE_STREAMS 1 + +// Set to 1 to compile wxZipInput/OutputStream classes. +#define wxUSE_ZIPSTREAM 1 + +// Set to 1 to compile wxTarInput/OutputStream classes. +#define wxUSE_TARSTREAM 1 + +// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by +// wxUSE_LIBPNG +#define wxUSE_ZLIB 1 + +// If enabled, the code written by Apple will be used to write, in a portable +// way, float on the disk. See extended.c for the license which is different +// from wxWidgets one. +// +// Default is 1. +// +// Recommended setting: 1 unless you don't like the license terms (unlikely) +#define wxUSE_APPLE_IEEE 1 + +// Joystick support class +#define wxUSE_JOYSTICK 1 + +// wxFontEnumerator class +#define wxUSE_FONTENUM 1 + +// wxFontMapper class +#define wxUSE_FONTMAP 1 + +// wxMimeTypesManager class +#define wxUSE_MIMETYPE 1 + +// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP +// or wxURL you need to set this to 1. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_PROTOCOL 1 + +// The settings for the individual URL schemes +#define wxUSE_PROTOCOL_FILE 1 +#define wxUSE_PROTOCOL_FTP 1 +#define wxUSE_PROTOCOL_HTTP 1 + +// Define this to use wxURL class. +#define wxUSE_URL 1 + +// Define this to use native platform url and protocol support. +// Currently valid only for MS-Windows. +// Note: if you set this to 1, you can open ftp/http/gopher sites +// and obtain a valid input stream for these sites +// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0. +// Doing so reduces the code size. +// +// This code is experimental and subject to change. +#define wxUSE_URL_NATIVE 0 + +// Support for wxVariant class used in several places throughout the library, +// notably in wxDataViewCtrl API. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size as much as +// possible in which case setting this to 0 can gain up to 100KB. +#define wxUSE_VARIANT 1 + +// Support for wxAny class, the successor for wxVariant. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size by a small amount, +// or your compiler cannot for some reason cope with complexity of templates used. +#define wxUSE_ANY 1 + +// Support for regular expression matching via wxRegEx class: enable this to +// use POSIX regular expressions in your code. You need to compile regex +// library from src/regex to use it under Windows. +// +// Default is 0 +// +// Recommended setting: 1 if your compiler supports it, if it doesn't please +// contribute us a makefile for src/regex for it +#define wxUSE_REGEX 1 + +// wxSystemOptions class +#define wxUSE_SYSTEM_OPTIONS 1 + +// wxSound class +#define wxUSE_SOUND 1 + +// Use wxMediaCtrl +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_MEDIACTRL 1 + +// Use wxWidget's XRC XML-based resource system. Recommended. +// +// Default is 1 +// +// Recommended setting: 1 (requires wxUSE_XML) +#define wxUSE_XRC 1 + +// XML parsing classes. Note that their API will change in the future, so +// using wxXmlDocument and wxXmlNode in your app is not recommended. +// +// Default is the same as wxUSE_XRC, i.e. 1 by default. +// +// Recommended setting: 1 (required by XRC) +#define wxUSE_XML wxUSE_XRC + +// Use wxWidget's AUI docking system +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_AUI 1 + +// Use wxWidget's Ribbon classes for interfaces +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_RIBBON 1 + +// Use wxPropertyGrid. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_PROPGRID 1 + +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + +// Use wxWidget's web viewing classes +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW 1 + +// Use the IE wxWebView backend +// +// Default is 1 on MSW +// +// Recommended setting: 1 +#ifdef __WXMSW__ +#define wxUSE_WEBVIEW_IE 1 +#else +#define wxUSE_WEBVIEW_IE 0 +#endif + +// Use the WebKit wxWebView backend +// +// Default is 1 on GTK and OSX +// +// Recommended setting: 1 +#if defined(__WXGTK__) || defined(__WXOSX__) +#define wxUSE_WEBVIEW_WEBKIT 1 +#else +#define wxUSE_WEBVIEW_WEBKIT 0 +#endif + +// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced +// 2D drawing API. (Still somewhat experimental) +// +// Please note that on Windows gdiplus.dll is loaded dynamically which means +// that nothing special needs to be done as long as you don't use +// wxGraphicsContext at all or only use it on XP and later systems but you +// still do need to distribute it yourself for an application using +// wxGraphicsContext to be runnable on pre-XP systems. +// +// Default is 1 except if you're using a non-Microsoft compiler under Windows +// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. +// mingw32) you may need to install the headers (and just the headers) +// yourself. If you do, change the setting below manually. +// +// Recommended setting: 1 if supported by the compilation environment + +// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is +// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined +#ifdef _MSC_VER +# if _MSC_VER >= 1310 + // MSVC7.1+ comes with new enough Platform SDK, enable + // wxGraphicsContext support for it +# define wxUSE_GRAPHICS_CONTEXT 1 +# else + // MSVC 6 didn't include GDI+ headers so disable by default, enable it + // here if you use MSVC 6 with a newer SDK +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#else + // Disable support for other Windows compilers, enable it if your compiler + // comes with new enough SDK or you installed the headers manually. + // + // Notice that this will be set by configure under non-Windows platforms + // anyhow so the value there is not important. +# define wxUSE_GRAPHICS_CONTEXT 0 +#endif + +// Enable wxGraphicsContext implementation using Cairo library. +// +// This is not needed under Windows and detected automatically by configure +// under other systems, however you may set this to 1 manually if you installed +// Cairo under Windows yourself and prefer to use it instead the native GDI+ +// implementation. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_CAIRO 0 + + +// ---------------------------------------------------------------------------- +// Individual GUI controls +// ---------------------------------------------------------------------------- + +// You must set wxUSE_CONTROLS to 1 if you are using any controls at all +// (without it, wxControl class is not compiled) +// +// Default is 1 +// +// Recommended setting: 1 (don't change except for very special programs) +#define wxUSE_CONTROLS 1 + +// Support markup in control labels, i.e. provide wxControl::SetLabelMarkup(). +// Currently markup is supported only by a few controls and only some ports but +// their number will increase with time. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you want to save on code size) +#define wxUSE_MARKUP 1 + +// wxPopupWindow class is a top level transient window. It is currently used +// to implement wxTipWindow +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW) +#define wxUSE_POPUPWIN 1 + +// wxTipWindow allows to implement the custom tooltips, it is used by the +// context help classes. Requires wxUSE_POPUPWIN. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0) +#define wxUSE_TIPWINDOW 1 + +// Each of the settings below corresponds to one wxWidgets control. They are +// all switched on by default but may be disabled if you are sure that your +// program (including any standard dialogs it can show!) doesn't need them and +// if you desperately want to save some space. If you use any of these you must +// set wxUSE_CONTROLS as well. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl +#define wxUSE_BANNERWINDOW 1 // wxBannerWindow +#define wxUSE_BUTTON 1 // wxButton +#define wxUSE_BMPBUTTON 1 // wxBitmapButton +#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl +#define wxUSE_CHECKBOX 1 // wxCheckBox +#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHOICE 1 // wxChoice +#define wxUSE_COLLPANE 1 // wxCollapsiblePane +#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl +#define wxUSE_COMBOBOX 1 // wxComboBox +#define wxUSE_COMMANDLINKBUTTON 1 // wxCommandLinkButton +#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl +#define wxUSE_DATEPICKCTRL 1 // wxDatePickerCtrl +#define wxUSE_DIRPICKERCTRL 1 // wxDirPickerCtrl +#define wxUSE_EDITABLELISTBOX 1 // wxEditableListBox +#define wxUSE_FILECTRL 1 // wxFileCtrl +#define wxUSE_FILEPICKERCTRL 1 // wxFilePickerCtrl +#define wxUSE_FONTPICKERCTRL 1 // wxFontPickerCtrl +#define wxUSE_GAUGE 1 // wxGauge +#define wxUSE_HEADERCTRL 1 // wxHeaderCtrl +#define wxUSE_HYPERLINKCTRL 1 // wxHyperlinkCtrl +#define wxUSE_LISTBOX 1 // wxListBox +#define wxUSE_LISTCTRL 1 // wxListCtrl +#define wxUSE_RADIOBOX 1 // wxRadioBox +#define wxUSE_RADIOBTN 1 // wxRadioButton +#define wxUSE_RICHMSGDLG 1 // wxRichMessageDialog +#define wxUSE_SCROLLBAR 1 // wxScrollBar +#define wxUSE_SEARCHCTRL 1 // wxSearchCtrl +#define wxUSE_SLIDER 1 // wxSlider +#define wxUSE_SPINBTN 1 // wxSpinButton +#define wxUSE_SPINCTRL 1 // wxSpinCtrl +#define wxUSE_STATBOX 1 // wxStaticBox +#define wxUSE_STATLINE 1 // wxStaticLine +#define wxUSE_STATTEXT 1 // wxStaticText +#define wxUSE_STATBMP 1 // wxStaticBitmap +#define wxUSE_TEXTCTRL 1 // wxTextCtrl +#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl +#define wxUSE_TOGGLEBTN 1 // requires wxButton +#define wxUSE_TREECTRL 1 // wxTreeCtrl +#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl + +// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR +// below either wxStatusBar95 or a generic wxStatusBar will be used. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STATUSBAR 1 + +// Two status bar implementations are available under Win32: the generic one +// or the wrapper around native control. For native look and feel the native +// version should be used. +// +// Default is 1 for the platforms where native status bar is supported. +// +// Recommended setting: 1 (there is no advantage in using the generic one) +#define wxUSE_NATIVE_STATUSBAR 1 + +// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar +// classes at all. Otherwise, use the native toolbar class unless +// wxUSE_TOOLBAR_NATIVE is 0. +// +// Default is 1 for all settings. +// +// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE. +#define wxUSE_TOOLBAR 1 +#define wxUSE_TOOLBAR_NATIVE 1 + +// wxNotebook is a control with several "tabs" located on one of its sides. It +// may be used to logically organise the data presented to the user instead of +// putting everything in one huge dialog. It replaces wxTabControl and related +// classes of wxWin 1.6x. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTEBOOK 1 + +// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_LISTBOOK 1 + +// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CHOICEBOOK 1 + +// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TREEBOOK 1 + +// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of +// tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLBOOK 1 + +// wxTaskBarIcon is a small notification icon shown in the system toolbar or +// dock. +// +// Default is 1. +// +// Recommended setting: 1 (but can be set to 0 if you don't need it) +#define wxUSE_TASKBARICON 1 + +// wxGrid class +// +// Default is 1, set to 0 to cut down compilation time and binaries size if you +// don't use it. +// +// Recommended setting: 1 +// +#define wxUSE_GRID 1 + +// wxMiniFrame class: a frame with narrow title bar +// +// Default is 1. +// +// Recommended setting: 1 (it doesn't cost almost anything) +#define wxUSE_MINIFRAME 1 + +// wxComboCtrl and related classes: combobox with custom popup window and +// not necessarily a listbox. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it +// it used by wxComboBox +#define wxUSE_COMBOCTRL 1 + +// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox +// items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0, except where it is +// needed as a base class for generic wxBitmapComboBox. +#define wxUSE_ODCOMBOBOX 1 + +// wxBitmapComboBox is a combobox that can have images in front of text items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 +#define wxUSE_BITMAPCOMBOBOX 1 + +// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items +// up and down in it. It is also used as part of wxRearrangeDialog. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 (currently used only by +// wxHeaderCtrl) +#define wxUSE_REARRANGECTRL 1 + +// ---------------------------------------------------------------------------- +// Miscellaneous GUI stuff +// ---------------------------------------------------------------------------- + +// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar) +#define wxUSE_ACCEL 1 + +// Use the standard art provider. The icons returned by this provider are +// embedded into the library as XPMs so disabling it reduces the library size +// somewhat but this should only be done if you use your own custom art +// provider returning the icons or never use any icons not provided by the +// native art provider (which might not be implemented at all for some +// platforms) or by the Tango icons provider (if it's not itself disabled +// below). +// +// Default is 1. +// +// Recommended setting: 1 unless you use your own custom art provider. +#define wxUSE_ARTPROVIDER_STD 1 + +// Use art provider providing Tango icons: this art provider has higher quality +// icons than the default ones using smaller size XPM icons without +// transparency but the embedded PNG icons add to the library size. +// +// Default is 1 under non-GTK ports. Under wxGTK the native art provider using +// the GTK+ stock icons replaces it so it is normally not necessary. +// +// Recommended setting: 1 but can be turned off to reduce the library size. +#define wxUSE_ARTPROVIDER_TANGO 1 + +// Hotkey support (currently Windows only) +#define wxUSE_HOTKEY 1 + +// Use wxCaret: a class implementing a "cursor" in a text control (called caret +// under Windows). +// +// Default is 1. +// +// Recommended setting: 1 (can be safely set to 0, not used by the library) +#define wxUSE_CARET 1 + +// Use wxDisplay class: it allows enumerating all displays on a system and +// their geometries as well as finding the display on which the given point or +// window lies. +// +// Default is 1. +// +// Recommended setting: 1 if you need it, can be safely set to 0 otherwise +#define wxUSE_DISPLAY 1 + +// Miscellaneous geometry code: needed for Canvas library +#define wxUSE_GEOMETRY 1 + +// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and +// wxListCtrl. +// +// Default is 1. +// +// Recommended setting: 1 (set it to 0 if you don't use any of the controls +// enumerated above, then this class is mostly useless too) +#define wxUSE_IMAGLIST 1 + +// Use wxInfoBar class. +// +// Default is 1. +// +// Recommended setting: 1 (but can be disabled without problems as nothing +// depends on it) +#define wxUSE_INFOBAR 1 + +// Use wxMenu, wxMenuBar, wxMenuItem. +// +// Default is 1. +// +// Recommended setting: 1 (can't be disabled under MSW) +#define wxUSE_MENUS 1 + +// Use wxNotificationMessage. +// +// wxNotificationMessage allows to show non-intrusive messages to the user +// using balloons, banners, popups or whatever is the appropriate method for +// the current platform. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTIFICATION_MESSAGE 1 + +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + +// wxRichToolTip is a customizable tooltip class which has more functionality +// than the stock (but native, unlike this class) wxToolTip. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely set to 0 if you don't need it) +#define wxUSE_RICHTOOLTIP 1 + +// Use wxSashWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SASH 1 + +// Use wxSplitterWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SPLITTER 1 + +// Use wxToolTip and wxWindow::Set/GetToolTip() methods. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLTIPS 1 + +// wxValidator class and related methods +#define wxUSE_VALIDATORS 1 + +// Use reference counted ID management: this means that wxWidgets will track +// the automatically allocated ids (those used when you use wxID_ANY when +// creating a window, menu or toolbar item &c) instead of just supposing that +// the program never runs out of them. This is mostly useful only under wxMSW +// where the total ids range is limited to SHRT_MIN..SHRT_MAX and where +// long-running programs can run into problems with ids reuse without this. On +// the other platforms, where the ids have the full int range, this shouldn't +// be necessary. +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif + +// ---------------------------------------------------------------------------- +// common dialogs +// ---------------------------------------------------------------------------- + +// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g. +// file selector, printer dialog). Switching this off also switches off the +// printing architecture and interactive wxPrinterDC. +// +// Default is 1 +// +// Recommended setting: 1 (unless it really doesn't work) +#define wxUSE_COMMON_DIALOGS 1 + +// wxBusyInfo displays window with message when app is busy. Works in same way +// as wxBusyCursor +#define wxUSE_BUSYINFO 1 + +// Use single/multiple choice dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_CHOICEDLG 1 + +// Use colour picker dialog +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_COLOURDLG 1 + +// wxDirDlg class for getting a directory name from user +#define wxUSE_DIRDLG 1 + +// TODO: setting to choose the generic or native one + +// Use file open/save dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in many places in the library itself) +#define wxUSE_FILEDLG 1 + +// Use find/replace dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely set to 0) +#define wxUSE_FINDREPLDLG 1 + +// Use font picker dialog +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_FONTDLG 1 + +// Use wxMessageDialog and wxMessageBox. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_MSGDLG 1 + +// progress dialog class for lengthy operations +#define wxUSE_PROGRESSDLG 1 + +// support for startup tips (wxShowTip &c) +#define wxUSE_STARTUP_TIPS 1 + +// text entry dialog and wxGetTextFromUser function +#define wxUSE_TEXTDLG 1 + +// number entry dialog +#define wxUSE_NUMBERDLG 1 + +// splash screen class +#define wxUSE_SPLASH 1 + +// wizards +#define wxUSE_WIZARDDLG 1 + +// Compile in wxAboutBox() function showing the standard "About" dialog. +// +// Default is 1 +// +// Recommended setting: 1 but can be set to 0 to save some space if you don't +// use this function +#define wxUSE_ABOUTDLG 1 + +// wxFileHistory class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FILE_HISTORY 1 + +// ---------------------------------------------------------------------------- +// Metafiles support +// ---------------------------------------------------------------------------- + +// Windows supports the graphics format known as metafile which is, though not +// portable, is widely used under Windows and so is supported by wxWin (under +// Windows only, of course). Win16 (Win3.1) used the so-called "Window +// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in +// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by +// default, WMFs will be used under Win16 and EMFs under Win32. This may be +// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting +// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile +// in any metafile related classes at all. +// +// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS. +// +// Recommended setting: default or 0 for everything for portable programs. +#define wxUSE_METAFILE 1 +#define wxUSE_ENH_METAFILE 1 +#define wxUSE_WIN_METAFILES_ALWAYS 0 + +// ---------------------------------------------------------------------------- +// Big GUI components +// ---------------------------------------------------------------------------- + +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + +// Set to 0 to disable document/view architecture +#define wxUSE_DOC_VIEW_ARCHITECTURE 1 + +// Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 1 + +// Set to 0 to disable print/preview architecture code +#define wxUSE_PRINTING_ARCHITECTURE 1 + +// wxHTML sublibrary allows to display HTML in wxWindow programs and much, +// much more. +// +// Default is 1. +// +// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a +// smaller library. +#define wxUSE_HTML 1 + +// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL +// headers and libraries to be able to compile the library with wxUSE_GLCANVAS +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). +// +// Default is 1 unless the compiler is known to ship without the necessary +// headers (Digital Mars) or the platform doesn't support OpenGL (Windows CE). +// +// Recommended setting: 1 if you intend to use OpenGL, can be safely set to 0 +// otherwise. +#define wxUSE_GLCANVAS 1 + +// wxRichTextCtrl allows editing of styled text. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 if you want compile a +// smaller library. +#define wxUSE_RICHTEXT 1 + +// ---------------------------------------------------------------------------- +// Data transfer +// ---------------------------------------------------------------------------- + +// Use wxClipboard class for clipboard copy/paste. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CLIPBOARD 1 + +// Use wxDataObject and related classes. Needed for clipboard and OLE drag and +// drop +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DATAOBJ 1 + +// Use wxDropTarget and wxDropSource classes for drag and drop (this is +// different from "built in" drag and drop in wxTreeCtrl which is always +// available). Requires wxUSE_DATAOBJ. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DRAG_AND_DROP 1 + +// Use wxAccessible for enhanced and customisable accessibility. +// Depends on wxUSE_OLE. +// +// Default is 0. +// +// Recommended setting (at present): 0 +#define wxUSE_ACCESSIBILITY 0 + +// ---------------------------------------------------------------------------- +// miscellaneous settings +// ---------------------------------------------------------------------------- + +// wxSingleInstanceChecker class allows to verify at startup if another program +// instance is running. +// +// Default is 1 +// +// Recommended setting: 1 (the class is tiny, disabling it won't save much +// space) +#define wxUSE_SNGLINST_CHECKER 1 + +#define wxUSE_DRAGIMAGE 1 + +#define wxUSE_IPC 1 + // 0 for no interprocess comms +#define wxUSE_HELP 1 + // 0 for no help facility + +// Should we use MS HTML help for wxHelpController? If disabled, neither +// wxCHMHelpController nor wxBestHelpController are available. +// +// Default is 1 under MSW, 0 is always used for the other platforms. +// +// Recommended setting: 1, only set to 0 if you have trouble compiling +// wxCHMHelpController (could be a problem with really ancient compilers) +#define wxUSE_MS_HTML_HELP 1 + + +// Use wxHTML-based help controller? +#define wxUSE_WXHTML_HELP 1 + +#define wxUSE_CONSTRAINTS 1 + // 0 for no window layout constraint system + +#define wxUSE_SPLINES 1 + // 0 for no splines + +#define wxUSE_MOUSEWHEEL 1 + // Include mouse wheel support + +// Compile wxUIActionSimulator class? +#define wxUSE_UIACTIONSIMULATOR 1 + +// ---------------------------------------------------------------------------- +// wxDC classes for various output formats +// ---------------------------------------------------------------------------- + +// Set to 1 for PostScript device context. +#define wxUSE_POSTSCRIPT 0 + +// Set to 1 to use font metric files in GetTextExtent +#define wxUSE_AFM_FOR_POSTSCRIPT 1 + +// Set to 1 to compile in support for wxSVGFileDC, a wxDC subclass which allows +// to create files in SVG (Scalable Vector Graphics) format. +#define wxUSE_SVG 1 + +// Should wxDC provide SetTransformMatrix() and related methods? +// +// Default is 1 but can be set to 0 if this functionality is not used. Notice +// that currently only wxMSW supports this so setting this to 0 doesn't change +// much for non-MSW platforms (although it will still save a few bytes +// probably). +// +// Recommended setting: 1. +#define wxUSE_DC_TRANSFORM_MATRIX 1 + +// ---------------------------------------------------------------------------- +// image format support +// ---------------------------------------------------------------------------- + +// wxImage supports many different image formats which can be configured at +// compile-time. BMP is always supported, others are optional and can be safely +// disabled if you don't plan to use images in such format sometimes saving +// substantial amount of code in the final library. +// +// Some formats require an extra library which is included in wxWin sources +// which is mentioned if it is the case. + +// Set to 1 for wxImage support (recommended). +#define wxUSE_IMAGE 1 + +// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB. +#define wxUSE_LIBPNG 1 + +// Set to 1 for JPEG format support (requires libjpeg) +#define wxUSE_LIBJPEG 1 + +// Set to 1 for TIFF format support (requires libtiff) +#define wxUSE_LIBTIFF 1 + +// Set to 1 for TGA format support (loading only) +#define wxUSE_TGA 1 + +// Set to 1 for GIF format support +#define wxUSE_GIF 1 + +// Set to 1 for PNM format support +#define wxUSE_PNM 1 + +// Set to 1 for PCX format support +#define wxUSE_PCX 1 + +// Set to 1 for IFF format support (Amiga format) +#define wxUSE_IFF 0 + +// Set to 1 for XPM format support +#define wxUSE_XPM 1 + +// Set to 1 for MS Icons and Cursors format support +#define wxUSE_ICO_CUR 1 + +// Set to 1 to compile in wxPalette class +#define wxUSE_PALETTE 1 + +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 + + +/* --- end common options --- */ + +/* + * Unix-specific options + */ +#define wxUSE_SELECT_DISPATCHER 1 +#define wxUSE_EPOLL_DISPATCHER 0 + +#define wxUSE_UNICODE_UTF8 0 +#define wxUSE_UTF8_LOCALE_ONLY 0 + +#endif // _WX_SETUP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/size.ptr b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/size.ptr new file mode 100644 index 0000000000..c361ba01ff Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/size.ptr differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/slider.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/slider.h new file mode 100644 index 0000000000..dd53538ae3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/slider.h @@ -0,0 +1,156 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/slider.h +// Purpose: wxSlider class +// Author: David Webster +// Modified by: +// Created: 10/15/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SLIDER_H_ +#define _WX_SLIDER_H_ + +#include "wx/control.h" + +// Slider +class WXDLLIMPEXP_CORE wxSlider: public wxSliderBase +{ +public: + wxSlider(); + inline wxSlider( wxWindow* pParent + ,wxWindowID vId + ,int nValue + ,int nMinValue + ,int nMaxValue + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxSL_HORIZONTAL + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxSliderNameStr + ) + { + Create( pParent + ,vId + ,nValue + ,nMinValue + ,nMaxValue + ,rPos + ,rSize + ,lStyle + ,rValidator + ,rsName + ); + } + virtual ~wxSlider(); + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,int nValue + ,int nMinValue + ,int nMaxValue + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxSL_HORIZONTAL + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxSliderNameStr + ); + + virtual int GetValue(void) const ; + virtual void SetValue(int); + + void GetSize( int* pnX + ,int* pnY + ) const; + void GetPosition( int* pnX + ,int* pnY + ) const ; + bool Show(bool bShow = TRUE); + void SetRange( int nMinValue + ,int nMaxValue + ); + + inline int GetMin(void) const { return m_nRangeMin; } + inline int GetMax(void) const { return m_nRangeMax; } + + // + // For trackbars only + // + void ClearSel(void); + void ClearTicks(void); + + int GetLineSize(void) const; + int GetPageSize(void) const ; + int GetSelEnd(void) const; + int GetSelStart(void) const; + inline int GetTickFreq(void) const { return m_nTickFreq; } + int GetThumbLength(void) const ; + + void SetLineSize(int nLineSize); + void SetPageSize(int nPageSize); + void SetSelection( int nMinPos + ,int nMaxPos + ); + void SetThumbLength(int nLen) ; + void SetTick(int ntickPos) ; + + // + // IMPLEMENTATION + // + inline WXHWND GetStaticMin(void) const { return m_hStaticMin; } + inline WXHWND GetStaticMax(void) const { return m_hStaticMax; } + inline WXHWND GetEditValue(void) const { return m_hStaticValue; } + virtual bool ContainsHWND(WXHWND hWnd) const; + void AdjustSubControls( int nX + ,int nY + ,int nWidth + ,int nHeight + ,int nSizeFlags + ); + inline int GetSizeFlags(void) { return m_nSizeFlags; } + void Command(wxCommandEvent& rEvent); + virtual WXHBRUSH OnCtlColor( WXHDC hDC + ,WXHWND hWnd + ,WXUINT uCtlColor + ,WXUINT uMessage + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + virtual bool OS2OnScroll( int nOrientation + ,WXWORD wParam + ,WXWORD wPos + ,WXHWND hControl + ); + +protected: + WXHWND m_hStaticMin; + WXHWND m_hStaticMax; + WXHWND m_hStaticValue; + int m_nRangeMin; + int m_nRangeMax; + int m_nPageSize; + int m_nLineSize; + int m_nTickFreq; + double m_dPixelToRange; + int m_nThumbLength; + int m_nSizeFlags; + + virtual void DoGetSize( int* pnWidth + ,int* pnHeight + ) const; + virtual void DoSetSize( int nX + ,int nY + ,int nWidth + ,int nHeight + ,int nSizeFlags = wxSIZE_AUTO + ); + + // Platform-specific implementation of SetTickFreq + virtual void DoSetTickFreq(int freq); + +private: + DECLARE_DYNAMIC_CLASS(wxSlider) +}; // end of CLASS wxSlider + +#endif + // _WX_SLIDER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/sound.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/sound.h new file mode 100644 index 0000000000..e8fdad5428 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/sound.h @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/sound.h +// Purpose: wxSound class (loads and plays short Windows .wav files). +// Optional on non-Windows platforms. +// Author: David Webster +// Modified by: +// Created: 10/17/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SOUND_H_ +#define _WX_SOUND_H_ + +#include "wx/object.h" + +class wxSound : public wxSoundBase +{ +public: + wxSound(); + wxSound(const wxString& fileName, bool isResource = FALSE); + wxSound(size_t size, const void* data); + virtual ~wxSound(); + +public: + // Create from resource or file + bool Create(const wxString& fileName, bool isResource = FALSE); + // Create from data + bool Create(size_t size, const void* data); + + bool IsOk() const { return (m_waveData ? TRUE : FALSE); } + +protected: + bool Free(); + + bool DoPlay(unsigned flags) const; + +private: + wxByte* m_waveData; + int m_waveLength; + bool m_isResource; +}; + +#endif + // _WX_SOUND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/spinbutt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/spinbutt.h new file mode 100644 index 0000000000..c37381f327 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/spinbutt.h @@ -0,0 +1,79 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/spinbutt.h +// Purpose: wxSpinButton class +// Author: David Webster +// Modified by: +// Created: 10/15/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SPINBUTT_H_ +#define _WX_SPINBUTT_H_ + +#include "wx/control.h" +#include "wx/event.h" + +extern MRESULT EXPENTRY wxSpinCtrlWndProc( + HWND hWnd +, UINT uMessage +, MPARAM wParam +, MPARAM lParam +); + +class WXDLLIMPEXP_CORE wxSpinButton: public wxSpinButtonBase +{ +public: + // Construction + wxSpinButton() { } + inline wxSpinButton( wxWindow* pParent + ,wxWindowID vId = -1 + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxSP_VERTICAL + ,const wxString& rsName = wxT("wxSpinButton") + ) + { + Create(pParent, vId, rPos, rSize, lStyle, rsName); + } + virtual ~wxSpinButton(); + + + bool Create( wxWindow* pParent + ,wxWindowID vId = -1 + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxSP_VERTICAL + ,const wxString& rsName = wxT("wxSpinButton") + ); + + // Accessors + inline virtual int GetMax(void) const { return m_max; } + inline virtual int GetMin(void) const { return m_min; } + virtual int GetValue(void) const; + inline bool IsVertical(void) const {return ((m_windowStyle & wxSP_VERTICAL) != 0); } + virtual void SetValue(int nVal); + virtual void SetRange( int nMinVal + ,int nMaxVal + ); + + // + // Implementation + // + virtual bool OS2Command( WXUINT wParam + ,WXWORD wId + ); + virtual bool OS2OnScroll( int nOrientation + ,WXWORD wParam + ,WXWORD wPos + ,WXHWND hControl + ); + + inline virtual bool AcceptsFocus(void) const { return FALSE; } +protected: + virtual wxSize DoGetBestSize() const; +private: + DECLARE_DYNAMIC_CLASS(wxSpinButton) +}; // end of CLASS wxSpinButton + +#endif // _WX_SPINBUTT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/spinctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/spinctrl.h new file mode 100644 index 0000000000..ac81c63996 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/spinctrl.h @@ -0,0 +1,127 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/spinctrl.h +// Purpose: wxSpinCtrl class declaration for Win32 +// Author: David Webster +// Modified by: +// Created: 10/15/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_SPINCTRL_H_ +#define _WX_MSW_SPINCTRL_H_ + +#include "wx/spinbutt.h" // the base class +#include "wx/dynarray.h" +class WXDLLIMPEXP_FWD_CORE wxSpinCtrl; +WX_DEFINE_EXPORTED_ARRAY_PTR(wxSpinCtrl *, wxArraySpins); + +// ---------------------------------------------------------------------------- +// Under Win32 and OS2 PM, wxSpinCtrl is a wxSpinButton with a buddy +// text window whose contents is automatically updated when the spin +// control is clicked. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinButton +{ +public: + wxSpinCtrl() { } + wxSpinCtrl( wxWindow* pParent + ,wxWindowID vId = wxID_ANY + ,const wxString& rsValue = wxEmptyString + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxSP_ARROW_KEYS + ,int nMin = 0 + ,int nMax = 100 + ,int nInitial = 0 + ,const wxString& rsName = wxT("wxSpinCtrl") + ) + { + Create(pParent, vId, rsValue, rPos, rSize, lStyle, nMin, nMax, nInitial, rsName); + } + virtual ~wxSpinCtrl(); + + bool Create(wxWindow* pParent + ,wxWindowID vId = wxID_ANY + ,const wxString& rsValue = wxEmptyString + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxSP_ARROW_KEYS + ,int nMin = 0 + ,int nMax = 100 + ,int nInitial = 0 + ,const wxString& rsName = wxT("wxSpinCtrl") + ); + + // + // A wxTextCtrl-like method (but we can't have GetValue returning wxString + // because the base class already has one returning int!) + // + void SetValue(const wxString& rsText); + + // + // implementation only from now on + // ------------------------------- + // + virtual bool Enable(bool bEnable = true); + + virtual int GetValue(void) const; + + virtual bool SetFont(const wxFont &rFont); + virtual void SetFocus(void); + + inline virtual void SetValue(int nVal) { wxSpinButton::SetValue(nVal); } + + void SetSelection(long lFrom, long lTo); + + virtual bool Show(bool bShow = true); + + // + // wxSpinButton doesn't accept focus, but we do + // + inline virtual bool AcceptsFocus(void) const { return false; } + + // + // Return the spinctrl object whose buddy is the given window or NULL + // Doesn't really do much under OS/2 + // + static wxSpinCtrl* GetSpinForTextCtrl(WXHWND hWndBuddy); + + // + // Process a WM_COMMAND generated by the buddy text control + // + bool ProcessTextCommand( WXWORD wCmd + ,WXWORD wId + ); + +protected: + virtual void DoGetPosition( int* nlX + ,int* nlY + ) const; + void DoMoveWindow( int nX + ,int nY + ,int nWidth + ,int nHeight + ); + virtual wxSize DoGetBestSize(void) const; + virtual void DoGetSize( int* pnWidth + ,int* pnHeight + ) const; + + // + // The handler for wxSpinButton events + // + void OnSpinChange(wxSpinEvent& rEvent); + void OnChar(wxKeyEvent& rEvent); + void OnSetFocus(wxFocusEvent& rEvent); + + WXHWND m_hWndBuddy; + static wxArraySpins m_svAllSpins; + +private: + DECLARE_DYNAMIC_CLASS(wxSpinCtrl) + DECLARE_EVENT_TABLE() +}; // end of CLASS wxSpinCtrl + +#endif // _WX_MSW_SPINCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/statbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/statbmp.h new file mode 100644 index 0000000000..ff59f015e1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/statbmp.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/statbmp.h +// Purpose: wxStaticBitmap class +// Author: David Webster +// Modified by: +// Created: 11/27/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATBMP_H_ +#define _WX_STATBMP_H_ + +#include "wx/control.h" +#include "wx/icon.h" + +class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase +{ + public: + inline wxStaticBitmap() { Init(); } + + inline wxStaticBitmap( wxWindow* pParent + ,wxWindowID nId + ,const wxGDIImage& rLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxString& rName = wxStaticBitmapNameStr + ) + { + Create(pParent, nId, rLabel, rPos, rSize, lStyle, rName); + } + + bool Create( wxWindow* pParent + ,wxWindowID nId + ,const wxGDIImage& rLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxString& rName = wxStaticBitmapNameStr + ); + inline virtual ~wxStaticBitmap() { Free(); } + + virtual void SetIcon(const wxIcon& rIcon) { SetImage(rIcon); } + virtual void SetBitmap(const wxBitmap& rBitmap) { SetImage(rBitmap); } + + // assert failure is provoked by an attempt to get an icon from bitmap or + // vice versa + wxIcon GetIcon() const + { wxASSERT( m_bIsIcon ); return *(wxIcon *)m_pImage; } + wxBitmap GetBitmap() const + { wxASSERT( !m_bIsIcon ); return *(wxBitmap *)m_pImage; } + + // overridden base class virtuals + virtual bool AcceptsFocus() const { return FALSE; } + virtual MRESULT OS2WindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + void OnPaint(wxPaintEvent& rEvent); + +protected: + virtual wxSize DoGetBestSize() const; + + void Init() { m_bIsIcon = TRUE; m_pImage = NULL; } + void Free(); + + // TRUE if icon/bitmap is valid + bool ImageIsOk() const; + + void SetImage(const wxGDIImage& rImage); + + // we can have either an icon or a bitmap + bool m_bIsIcon; + wxGDIImage* m_pImage; +private: + DECLARE_DYNAMIC_CLASS(wxStaticBitmap) + DECLARE_EVENT_TABLE() +}; // end of wxStaticBitmap + +#endif + // _WX_STATBMP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/statbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/statbox.h new file mode 100644 index 0000000000..764fd74b07 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/statbox.h @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/statbox.h +// Purpose: wxStaticBox class +// Author: David Webster +// Modified by: +// Created: 10/15/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATBOX_H_ +#define _WX_STATBOX_H_ + +#include "wx/control.h" + +// Group box +class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase +{ +public: + inline wxStaticBox() {} + inline wxStaticBox( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxString& rsName = wxStaticBoxNameStr + ) + { + Create(pParent, vId, rsLabel, rPos, rSize, lStyle, rsName); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxString& rsName = wxStaticBoxNameStr + ); + + // + // implementation from now on + // -------------------------- + // + virtual MRESULT OS2WindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + + // + // overridden base class virtuals + // + inline virtual bool AcceptsFocus(void) const { return FALSE; } + +protected: + virtual wxSize DoGetBestSize(void) const; + +private: + DECLARE_DYNAMIC_CLASS(wxStaticBox) +}; // end of CLASS wxStaticBox + +#endif + // _WX_STATBOX_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/statline.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/statline.h new file mode 100644 index 0000000000..8d31bdcaa0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/statline.h @@ -0,0 +1,85 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/statline.h +// Purpose: MSW version of wxStaticLine class +// Author: Vadim Zeitlin +// Created: 28.06.99 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_STATLINE_H_ +#define _WX_OS2_STATLINE_H_ + +// ---------------------------------------------------------------------------- +// wxStaticLine +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase +{ + +public: + // constructors and pseudo-constructors + wxStaticLine() { } + wxStaticLine( wxWindow* pParent + ,wxWindowID vId = wxID_ANY + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxLI_HORIZONTAL + ,const wxString& rsName = wxStaticLineNameStr + ) + { + Create(pParent, vId, rPos, rSize, lStyle, rsName); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId = wxID_ANY + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxLI_HORIZONTAL + ,const wxString& rsName = wxStaticLineNameStr + ); + + inline bool IsVertical(void) const { return((GetWindowStyleFlag() & wxLI_VERTICAL) != 0); } + inline static int GetDefaultSize(void) { return 2; } + + // + // Overridden base class virtuals + // + inline virtual bool AcceptsFocus(void) const {return FALSE;} + +protected: + inline wxSize AdjustSize(const wxSize& rSize) const + { + wxSize vSizeReal( rSize.x + ,rSize.y + ); + + if (IsVertical()) + { + if (rSize.x == -1 ) + vSizeReal.x = GetDefaultSize(); + } + else + { + if (rSize.y == -1) + vSizeReal.y = GetDefaultSize(); + } + return vSizeReal; + } + + inline wxSize DoGetBestSize(void) const { return (AdjustSize(wxDefaultSize)); } + + // + // Usually overridden base class virtuals + // + virtual WXDWORD OS2GetStyle( long lStyle + ,WXDWORD* pdwExstyle + ) const; + +private: + DECLARE_DYNAMIC_CLASS(wxStaticLine) +}; // end of CLASS wxStaticLine + +#endif // _WX_OS2_STATLINE_H_ + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/stattext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/stattext.h new file mode 100644 index 0000000000..3db6fd34b3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/stattext.h @@ -0,0 +1,77 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/stattext.h +// Purpose: wxStaticText class +// Author: David Webster +// Modified by: +// Created: 10/17/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATTEXT_H_ +#define _WX_STATTEXT_H_ + +#include "wx/control.h" + +class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase +{ +public: + inline wxStaticText() { } + inline wxStaticText( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0L + ,const wxString& rsName = wxStaticTextNameStr + ) + { + Create(pParent, vId, rsLabel, rPos, rSize, lStyle, rsName); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsLabel + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0L + ,const wxString& rsName = wxStaticTextNameStr + ); + + // + // Accessors + // + virtual void SetLabel(const wxString& rsLabel); + virtual bool SetFont(const wxFont &rFont); + + // + // Overridden base class virtuals + // + virtual bool AcceptsFocus() const { return FALSE; } + + // + // Callbacks + // + virtual MRESULT OS2WindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + +protected: + virtual void DoSetSize( int nX + ,int nY + ,int nWidth + ,int nHeight + ,int nSizeFlags = wxSIZE_AUTO + ); + virtual wxSize DoGetBestSize(void) const; + + virtual void DoSetLabel(const wxString& str); + virtual wxString DoGetLabel() const; + +private: + DECLARE_DYNAMIC_CLASS(wxStaticText) +}; // end of CLASS wxStaticText + +#endif + // _WX_STATTEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/stdpaths.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/stdpaths.h new file mode 100644 index 0000000000..62d58429b8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/stdpaths.h @@ -0,0 +1,51 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/stdpaths.h +// Purpose: wxStandardPaths for OS/2 +// Author: Stefan Neis +// Modified by: +// Created: 2004-11-06 +// Copyright: (c) 2004 Stefan Neis <Stefan.Neis@t-online.de> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_STDPATHS_H_ +#define _WX_OS2_STDPATHS_H_ + +// ---------------------------------------------------------------------------- +// wxStandardPaths +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStandardPaths : public wxStandardPathsBase +{ +public: + // set the program installation directory which is /usr/local by default + // + // The program directory can be determined automatically from argv[0], + // this function is automatically called from application initialisation. + // If you override the initialisation routine, you should call it + // explicitly yourself. + static void SetInstallPrefix(const wxString& prefix); + + // get the program installation prefix + // + // if the prefix had been previously by SetInstallPrefix, returns that + // value, otherwise returns /usr/local if it failed + wxString GetInstallPrefix() const; + + // implement base class pure virtuals + virtual wxString GetConfigDir() const; + virtual wxString GetUserConfigDir() const; + virtual wxString GetDataDir() const; + virtual wxString GetUserDataDir() const; + virtual wxString GetPluginsDir() const; + +protected: + // Ctor is protected, use wxStandardPaths::Get() instead of instantiating + // objects of this class directly. + wxStandardPaths() { } + +private: + static wxString m_prefix; +}; + +#endif // _WX_OS2_STDPATHS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/textctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/textctrl.h new file mode 100644 index 0000000000..cc1d8d1e05 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/textctrl.h @@ -0,0 +1,197 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/textctrl.h +// Purpose: wxTextCtrl class +// Author: David Webster +// Modified by: +// Created: 10/17/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTCTRL_H_ +#define _WX_TEXTCTRL_H_ + +typedef int (wxCALLBACK *wxTreeCtrlCompare)(long lItem1, long lItem2, long lSortData); + +class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase +{ +public: + wxTextCtrl(); + wxTextCtrl( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsValue = wxEmptyString + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxTextCtrlNameStr + ) + { + Create(pParent, vId, rsValue, rPos, rSize, lStyle, rValidator, rsName); + } + virtual ~wxTextCtrl(); + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsValue = wxEmptyString + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxTextCtrlNameStr + ); + + // + // Implement base class pure virtuals + // ---------------------------------- + // + virtual wxString GetValue(void) const; + + virtual int GetLineLength(long nLineNo) const; + virtual wxString GetLineText(long nLineNo) const; + virtual int GetNumberOfLines(void) const; + + virtual bool IsModified(void) const; + virtual bool IsEditable(void) const; + + virtual void GetSelection( long* pFrom + ,long* pTo + ) const; + // + // Operations + // ---------- + // + virtual void Clear(void); + virtual void Replace( long lFrom + ,long lTo + ,const wxString& rsValue + ); + virtual void Remove( long lFrom + ,long lTo + ); + + virtual bool DoLoadFile(const wxString& rsFile, int fileType); + + virtual void MarkDirty(); + virtual void DiscardEdits(void); + + virtual void WriteText(const wxString& rsText); + virtual void AppendText(const wxString& rsText); + virtual bool EmulateKeyPress(const wxKeyEvent& rEvent); + + virtual bool SetStyle( long lStart + ,long lEnd + ,const wxTextAttr& rStyle + ); + virtual long XYToPosition( long lX + ,long lY + ) const; + virtual bool PositionToXY( long lPos + ,long* plX + ,long* plY + ) const; + + virtual void ShowPosition(long lPos); + + virtual void Copy(void); + virtual void Cut(void); + virtual void Paste(void); + + virtual bool CanCopy(void) const; + virtual bool CanCut(void) const; + virtual bool CanPaste(void) const; + + virtual void Undo(void); + virtual void Redo(void); + + virtual bool CanUndo(void) const; + virtual bool CanRedo(void) const; + + virtual void SetInsertionPoint(long lPos); + virtual void SetInsertionPointEnd(void); + virtual long GetInsertionPoint(void) const; + virtual wxTextPos GetLastPosition(void) const; + + virtual void SetSelection( long lFrom + ,long lTo + ); + virtual void SetEditable(bool bEditable); + virtual void SetWindowStyleFlag(long lStyle); + + // + // Implementation from now on + // -------------------------- + // + virtual void Command(wxCommandEvent& rEvent); + virtual bool OS2Command( WXUINT uParam + ,WXWORD wId + ); + + virtual WXHBRUSH OnCtlColor( WXHDC hDC + ,WXHWND pWnd + ,WXUINT nCtlColor + ,WXUINT message + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + + virtual bool SetBackgroundColour(const wxColour& colour); + virtual bool SetForegroundColour(const wxColour& colour); + + virtual void AdoptAttributesFromHWND(void); + virtual void SetupColours(void); + + virtual bool AcceptsFocus(void) const; + + // callbacks + void OnDropFiles(wxDropFilesEvent& rEvent); + void OnChar(wxKeyEvent& rEvent); // Process 'enter' if required + + void OnCut(wxCommandEvent& rEvent); + void OnCopy(wxCommandEvent& rEvent); + void OnPaste(wxCommandEvent& rEvent); + void OnUndo(wxCommandEvent& rEvent); + void OnRedo(wxCommandEvent& rEvent); + void OnDelete(wxCommandEvent& rEvent); + void OnSelectAll(wxCommandEvent& rEvent); + + void OnUpdateCut(wxUpdateUIEvent& rEvent); + void OnUpdateCopy(wxUpdateUIEvent& rEvent); + void OnUpdatePaste(wxUpdateUIEvent& rEvent); + void OnUpdateUndo(wxUpdateUIEvent& rEvent); + void OnUpdateRedo(wxUpdateUIEvent& rEvent); + void OnUpdateDelete(wxUpdateUIEvent& rEvent); + void OnUpdateSelectAll(wxUpdateUIEvent& rEvent); + + inline bool IsMLE(void) {return m_bIsMLE;} + inline void SetMLE(bool bIsMLE) {m_bIsMLE = bIsMLE;} + +protected: + // + // call this to increase the size limit (will do nothing if the current + // limit is big enough) + // + void AdjustSpaceLimit(void); + virtual wxSize DoGetBestSize(void) const; + virtual bool OS2ShouldPreProcessMessage(WXMSG* pMsg); + + virtual WXDWORD OS2GetStyle( long lStyle + ,WXDWORD* dwExstyle + ) const; + + virtual void DoSetValue(const wxString &value, int flags = 0); + + bool m_bSkipUpdate; + +private: + // implement wxTextEntry pure virtual: it implements all the operations for + // the simple EDIT controls + virtual WXHWND GetEditHWND() const { return m_hWnd; } + + bool m_bIsMLE; + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxTextCtrl) +}; // end of CLASS wxTextCtrl + +#endif + // _WX_TEXTCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/textentry.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/textentry.h new file mode 100644 index 0000000000..5f8a8f37af --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/textentry.h @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/textentry.h +// Purpose: wxOS2-specific wxTextEntry implementation +// Author: Stefan Neis +// Created: 2007-11-18 +// Copyright: (c) 2007 Stefan Neis +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_TEXTENTRY_H_ +#define _WX_OS2_TEXTENTRY_H_ + +// ---------------------------------------------------------------------------- +// wxTextEntry: common part of wxComboBox and (single line) wxTextCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase +{ +public: + wxTextEntry() { } + + // implement wxTextEntryBase pure virtual methods + virtual void WriteText(const wxString& text); + virtual void Remove(long from, long to); + + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + virtual void Undo(); + virtual void Redo(); + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + virtual void SetInsertionPoint(long pos); + virtual long GetInsertionPoint() const; + virtual long GetLastPosition() const; + + virtual void SetSelection(long from, long to) + { DoSetSelection(from, to); } + virtual void GetSelection(long *from, long *to) const; + + virtual bool IsEditable() const; + virtual void SetEditable(bool editable); + + virtual void SetMaxLength(unsigned long len); + +protected: + virtual wxString DoGetValue() const; + + // this is really a hook for multiline text controls as the single line + // ones don't need to ever scroll to show the selection but having it here + // allows us to put Remove() in the base class + enum + { + SetSel_NoScroll = 0, // don't do anything special + SetSel_Scroll = 1 // default: scroll to make the selection visible + }; + virtual void DoSetSelection(long from, long to, int flags = SetSel_Scroll); + +private: + // implement this to return the HWND of the EDIT control + virtual WXHWND GetEditHWND() const = 0; +}; + +#endif // _WX_OS2_TEXTENTRY_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tglbtn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tglbtn.h new file mode 100644 index 0000000000..959d8a2349 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tglbtn.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/tglbtn.h +// Purpose: Declaration of the wxToggleButton class, which implements a +// toggle button under wxOS2. +// Author: Dave Webster +// Modified by: +// Created: 08.02.01 +// Copyright: (c) 2005 David A Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOGGLEBUTTON_H_ +#define _WX_TOGGLEBUTTON_H_ + +// Checkbox item (single checkbox) +class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase +{ +public: + wxToggleButton() {} + wxToggleButton(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + virtual void SetValue(bool value); + virtual bool GetValue() const ; + + virtual bool OS2Command(WXUINT param, WXWORD id); + virtual void Command(wxCommandEvent& event); + +protected: + virtual wxSize DoGetBestSize() const; + virtual wxBorder GetDefaultBorder() const; + virtual WXDWORD OS2GetStyle(long flags, WXDWORD *exstyle = NULL) const; + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton) +}; + +#endif // _WX_TOGGLEBUTTON_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tick.bmp b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tick.bmp new file mode 100644 index 0000000000..3673eda5de Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tick.bmp differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tip.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tip.ico new file mode 100644 index 0000000000..6b77dcd123 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tip.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tls.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tls.h new file mode 100644 index 0000000000..4cdfdd1471 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tls.h @@ -0,0 +1,117 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/tls.h +// Purpose: OS/2 implementation of wxTlsValue<> +// Author: Stefan Neis +// Created: 2008-08-30 +// Copyright: (c) 2008 Stefan Neis +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_TLS_H_ +#define _WX_OS2_TLS_H_ + +#include "wx/os2/private.h" +#include "wx/thread.h" +#include "wx/vector.h" + +// ---------------------------------------------------------------------------- +// wxTlsKey is a helper class encapsulating a TLS slot +// ---------------------------------------------------------------------------- + +class wxTlsKey +{ +public: + // ctor allocates a new key + wxTlsKey(wxTlsDestructorFunction destructor) + { + m_destructor = destructor; + APIRET rc = ::DosAllocThreadLocalMemory(1, &m_slot); + if (rc != NO_ERROR) + m_slot = NULL; + } + + // return true if the key was successfully allocated + bool IsOk() const { return m_slot != NULL; } + + // get the key value, there is no error return + void *Get() const + { + return (void *)m_slot; + } + + // change the key value, return true if ok + bool Set(void *value) + { + void *old = Get(); + + m_slot = (ULONG*)value; + + if ( old ) + m_destructor(old); + + // update m_allValues list of all values - remove old, add new + wxCriticalSectionLocker lock(m_csAllValues); + if ( old ) + { + for ( wxVector<void*>::iterator i = m_allValues.begin(); + i != m_allValues.end(); + ++i ) + { + if ( *i == old ) + { + if ( value ) + *i = value; + else + m_allValues.erase(i); + return true; + } + } + wxFAIL_MSG( "previous wxTlsKey value not recorded in m_allValues" ); + } + + if ( value ) + m_allValues.push_back(value); + + return true; + } + + // free the key + ~wxTlsKey() + { + if ( !IsOk() ) + return; + + // Win32 and OS/2 API doesn't have the equivalent of pthread's + // destructor, so we have to keep track of all allocated values and + // destroy them manually; ideally we'd do that at thread exit time, but + // since we could only do that with wxThread and not otherwise created + // threads, we do it here. + // + // TODO: We should still call destructors for wxTlsKey used in the + // thread from wxThread's thread shutdown code, *in addition* + // to doing it in ~wxTlsKey. + // + // NB: No need to lock m_csAllValues, by the time this code is called, + // no other thread can be using this key. + for ( wxVector<void*>::iterator i = m_allValues.begin(); + i != m_allValues.end(); + ++i ) + { + m_destructor(*i); + } + + ::DosFreeThreadLocalMemory(m_slot); + } + +private: + wxTlsDestructorFunction m_destructor; + ULONG* m_slot; + + wxVector<void*> m_allValues; + wxCriticalSection m_csAllValues; + + wxDECLARE_NO_COPY_CLASS(wxTlsKey); +}; + +#endif // _WX_OS2_TLS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/toolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/toolbar.h new file mode 100644 index 0000000000..d0fc1a1c7d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/toolbar.h @@ -0,0 +1,224 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/toolbar.h +// Purpose: wxToolBar class +// Author: David Webster +// Modified by: +// Created: 10/17/98 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOOLBAR_H_ +#define _WX_TOOLBAR_H_ + +#if wxUSE_TOOLBAR +#include "wx/timer.h" +#include "wx/tbarbase.h" + +#define ID_TOOLTIMER 100 +#define ID_TOOLEXPTIMER 101 + +class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase +{ +public: + /* + * Public interface + */ + + wxToolBar() + : m_vToolTimer(this, ID_TOOLTIMER) + , m_vToolExpTimer(this, ID_TOOLEXPTIMER) + { Init(); } + + inline wxToolBar( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxTB_HORIZONTAL + ,const wxString& rName = wxToolBarNameStr + ) : m_vToolTimer(this, ID_TOOLTIMER) + , m_vToolExpTimer(this, ID_TOOLEXPTIMER) + { + Init(); + Create( pParent + ,vId + ,rPos + ,rSize + ,lStyle + ,rName + ); + } + virtual ~wxToolBar(); + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxTB_HORIZONTAL + ,const wxString& rName = wxToolBarNameStr + ); + + + // + // Override/implement base class virtuals + // + virtual wxToolBarToolBase* FindToolForPosition( wxCoord vX + ,wxCoord vY + ) const; + virtual bool Realize(void); + virtual void SetRows(int nRows); + + // + // Special overrides for OS/2 + // + virtual wxToolBarToolBase* InsertControl( size_t nPos + ,wxControl* pControl + ); + virtual wxToolBarToolBase* InsertSeparator(size_t nPos); + virtual wxToolBarToolBase* InsertTool( size_t nPos + ,int nId + ,const wxString& rsLabel + ,const wxBitmap& rBitmap + ,const wxBitmap& rBmpDisabled = wxNullBitmap + ,wxItemKind eKind = wxITEM_NORMAL + ,const wxString& rsShortHelp = wxEmptyString + ,const wxString& rsLongHelp = wxEmptyString + ,wxObject* pClientData = NULL + ); + wxToolBarToolBase* InsertTool( size_t nPos + ,int nId + ,const wxBitmap& rBitmap + ,const wxBitmap& rBmpDisabled = wxNullBitmap + ,bool bToggle = FALSE + ,wxObject* pClientData = NULL + ,const wxString& rsShortHelp = wxEmptyString + ,const wxString& rsLongHelp = wxEmptyString + ) + { + return InsertTool( nPos + ,nId + ,wxEmptyString + ,rBitmap + ,rBmpDisabled + ,bToggle ? wxITEM_CHECK : wxITEM_NORMAL + ,rsShortHelp + ,rsLongHelp + ,pClientData + ); + } + virtual bool DeleteTool(int nId); + virtual bool DeleteToolByPos(size_t nPos); + + // + // Event handlers + // + void OnPaint(wxPaintEvent& event); + void OnSize(wxSizeEvent& event); + void OnMouseEvent(wxMouseEvent& event); + void OnKillFocus(wxFocusEvent& event); + +protected: + // + // Common part of all ctors + // + void Init(); + + // + // Implement base class pure virtuals + // + virtual wxToolBarToolBase* DoAddTool( int id + ,const wxString& label + ,const wxBitmap& bitmap + ,const wxBitmap& bmpDisabled + ,wxItemKind kind + ,const wxString& shortHelp = wxEmptyString + ,const wxString& longHelp = wxEmptyString + ,wxObject *clientData = NULL + ,wxCoord xPos = -1 + ,wxCoord yPos = -1 + ); + + virtual bool DoInsertTool( size_t nPos + ,wxToolBarToolBase* pTool + ); + virtual bool DoDeleteTool( size_t nPos + , wxToolBarToolBase* pTool + ); + + virtual void DoEnableTool( wxToolBarToolBase* pTool + ,bool bEnable + ); + virtual void DoToggleTool( wxToolBarToolBase* pTool + ,bool bToggle + ); + virtual void DoSetToggle( wxToolBarToolBase* pTool + ,bool bToggle + ); + + virtual wxToolBarToolBase* CreateTool( int vId + ,const wxString& rsLabel + ,const wxBitmap& rBmpNormal + ,const wxBitmap& rBmpDisabled + ,wxItemKind eKind + ,wxObject* pClientData + ,const wxString& rsShortHelp + ,const wxString& rsLongHelp + ); + virtual wxToolBarToolBase* CreateTool(wxControl* pControl, + const wxString& label); + + // + // Helpers + // + void DrawTool(wxToolBarToolBase *tool); + virtual void DrawTool( wxDC& rDC + ,wxToolBarToolBase* pTool + ); + virtual void SpringUpButton(int nIndex); + + int m_nCurrentRowsOrColumns; + int m_nPressedTool; + int m_nCurrentTool; + wxCoord m_vLastX; + wxCoord m_vLastY; + wxCoord m_vMaxWidth; + wxCoord m_vMaxHeight; + wxCoord m_vXPos; + wxCoord m_vYPos; + wxCoord m_vTextX; + wxCoord m_vTextY; + +private: + void LowerTool( wxToolBarToolBase* pTool + ,bool bLower = TRUE + ); + void RaiseTool( wxToolBarToolBase* pTool + ,bool bRaise = TRUE + ); + void OnTimer(wxTimerEvent& rEvent); + + static bool m_bInitialized; + + wxTimer m_vToolTimer; + wxTimer m_vToolExpTimer; + wxToolTip* m_pToolTip; + wxCoord m_vXMouse; + wxCoord m_vYMouse; + + // + // Virtual function hiding supression + virtual wxToolBarToolBase *InsertTool (size_t nPos, wxToolBarToolBase* pTool) + { + return( wxToolBarBase::InsertTool( nPos + ,pTool + )); + } + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxToolBar) +}; + +#endif // wxUSE_TOOLBAR + +#endif + // _WX_TOOLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tooltip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tooltip.h new file mode 100644 index 0000000000..c94ff99a82 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/tooltip.h @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/tooltip.h +// Purpose: wxToolTip class - tooltip control +// Author: David Webster +// Modified by: +// Created: 10/17/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_TOOLTIP_H_ +#define _WX_OS2_TOOLTIP_H_ + +class wxToolTip : public wxObject +{ +public: + // ctor & dtor + wxToolTip(const wxString &rsTip); + virtual ~wxToolTip(); + + // + // Accessors + // + inline const wxString& GetTip(void) const { return m_sText; } + inline wxWindow* GetWindow(void) const { return m_pWindow; } + + void SetTip(const wxString& rsTip); + inline void SetWindow(wxWindow* pWin) { m_pWindow = pWin; } + + // controlling tooltip behaviour: globally change tooltip parameters + // enable or disable the tooltips globally + static void Enable(bool WXUNUSED(flag)) {} + // set the delay after which the tooltip appears + static void SetDelay(long WXUNUSED(milliseconds)) {} + // set the delay after which the tooltip disappears or how long the tooltip remains visible + static void SetAutoPop(long WXUNUSED(milliseconds)) {} + // set the delay between subsequent tooltips to appear + static void SetReshow(long WXUNUSED(milliseconds)) {} + + // + // Implementation + // + void DisplayToolTipWindow(const wxPoint& rPos); + void HideToolTipWindow(void); + +private: + void Create(const wxString &rsTip); + + HWND m_hWnd; + wxString m_sText; // tooltip text + wxWindow* m_pWindow; // window we're associated with +}; // end of CLASS wxToolTip + +#endif // _WX_OS2_TOOLTIP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/toplevel.h new file mode 100644 index 0000000000..9b2ccfc4d4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/toplevel.h @@ -0,0 +1,176 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/toplevel.h +// Purpose: wxTopLevelWindowOS2 is the OS2 implementation of wxTLW +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.09.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_TOPLEVEL_H_ +#define _WX_MSW_TOPLEVEL_H_ + +enum ETemplateID +{ + kResizeableDialog = 130, + kCaptionDialog, + kNoCaptionDialog +}; + +// ---------------------------------------------------------------------------- +// wxTopLevelWindowOS2 +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTopLevelWindowOS2 : public wxTopLevelWindowBase +{ +public: + // constructors and such + wxTopLevelWindowOS2() { Init(); } + + wxTopLevelWindowOS2( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxDEFAULT_FRAME_STYLE + ,const wxString& rsName = wxFrameNameStr + ) + { + Init(); + + (void)Create(pParent, vId, rsTitle, rPos, rSize, lStyle, rsName); + } + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxString& rsTitle + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxDEFAULT_FRAME_STYLE + ,const wxString& rsName = wxFrameNameStr + ); + + virtual ~wxTopLevelWindowOS2(); + + // + // Implement base class pure virtuals + // + virtual void SetTitle( const wxString& title); + virtual wxString GetTitle() const; + + virtual void Iconize(bool bIconize = true); + virtual bool IsFullScreen(void) const { return m_bFsIsShowing; } + virtual bool IsIconized(void) const; + virtual bool IsMaximized(void) const; + virtual void Maximize(bool bMaximize = true); + virtual void Restore(void); + virtual void SendSizeEvent(int flags = 0); + virtual void SetIcons(const wxIconBundle& rIcons); + + virtual bool Show(bool bShow = true); + virtual bool ShowFullScreen( bool bShow, + long lStyle = wxFULLSCREEN_ALL ); + + // + // EnableCloseButton(false) may be used to remove the "Close" + // button from the title bar + // + bool EnableCloseButton(bool bEnable = true); + HWND GetFrame(void) const { return m_hFrame; } + + // + // Implementation from now on + // -------------------------- + // + PSWP GetSwpClient(void) { return &m_vSwpClient; } + + void OnActivate(wxActivateEvent& rEvent); + + void SetLastFocus(wxWindow *pWin) { m_pWinLastFocused = pWin; } + wxWindow* GetLastFocus(void) const { return m_pWinLastFocused; } + +protected: + + // + // Common part of all ctors + // + void Init(void); + + // + // Create a new frame, return false if it couldn't be created + // + bool CreateFrame( const wxString& rsTitle + ,const wxPoint& rPos + ,const wxSize& rSize + ); + + // + // Create a new dialog using the given dialog template from resources, + // return false if it couldn't be created + // + bool CreateDialog( ULONG ulDlgTemplate + ,const wxString& rsTitle + ,const wxPoint& rPos + ,const wxSize& rSize + ); + + // + // Common part of Iconize(), Maximize() and Restore() + // + void DoShowWindow(int nShowCmd); + + // + // Implement the geometry-related methods for a top level window + // + virtual void DoSetClientSize( int nWidth + ,int nHeight + ); + virtual void DoGetClientSize( int* pnWidth + ,int* pnHeight + ) const; + + // + // Translate wxWidgets flags into OS flags + // + virtual WXDWORD OS2GetStyle( long lFlag + ,WXDWORD* pdwExstyle + ) const; + + // + // Choose the right parent to use with CreateWindow() + // + virtual WXHWND OS2GetParent(void) const; + + // + // Is the frame currently iconized? + // + bool m_bIconized; + + // + // Should the frame be maximized when it will be shown? set by Maximize() + // when it is called while the frame is hidden + // + bool m_bMaximizeOnShow; + + // + // Data to save/restore when calling ShowFullScreen + // + long m_lFsStyle; // Passed to ShowFullScreen + wxRect m_vFsOldSize; + long m_lFsOldWindowStyle; + bool m_bFsIsMaximized; + bool m_bFsIsShowing; + + wxWindow* m_pWinLastFocused; + + WXHWND m_hFrame; + SWP m_vSwp; + SWP m_vSwpClient; + static bool m_sbInitialized; + static wxWindow* m_spHiddenParent; + + DECLARE_EVENT_TABLE() +}; // end of CLASS wxTopLevelWindowOS2 + +#endif // _WX_MSW_TOPLEVEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/treectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/treectrl.h new file mode 100644 index 0000000000..247359dda8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/treectrl.h @@ -0,0 +1,632 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/treectrl.h +// Purpose: wxTreeCtrl class +// Author: David Webster +// Modified by: +// Created: 01/23/03 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TREECTRL_H_ +#define _WX_TREECTRL_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#if wxUSE_TREECTRL + +#include "wx/textctrl.h" +#include "wx/dynarray.h" +#include "wx/treebase.h" +#include "wx/hashmap.h" + +// the type for "untyped" data +typedef long wxDataType; + +// fwd decl +class WXDLLIMPEXP_CORE wxImageList; +class WXDLLIMPEXP_CORE wxDragImage; +struct WXDLLIMPEXP_FWD_CORE wxTreeViewItem; + +// a callback function used for sorting tree items, it should return -1 if the +// first item precedes the second, +1 if the second precedes the first or 0 if +// they're equivalent +class wxTreeItemData; + +#if WXWIN_COMPATIBILITY_2_6 + // flags for deprecated InsertItem() variant + #define wxTREE_INSERT_FIRST 0xFFFF0001 + #define wxTREE_INSERT_LAST 0xFFFF0002 +#endif + +// hash storing attributes for our items +WX_DECLARE_EXPORTED_VOIDPTR_HASH_MAP(wxTreeItemAttr *, wxMapTreeAttr); + +// ---------------------------------------------------------------------------- +// wxTreeCtrl +// ---------------------------------------------------------------------------- +class WXDLLIMPEXP_CORE wxTreeCtrl : public wxControl +{ +public: + // creation + // -------- + wxTreeCtrl() { Init(); } + + wxTreeCtrl( wxWindow* pParent + ,wxWindowID vId = wxID_ANY + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxTreeCtrlNameStr + ) + { + Create( pParent + ,vId + ,rPos + ,rSize + ,lStyle + ,rValidator + ,rsName + ); + } + virtual ~wxTreeCtrl(); + + bool Create( wxWindow* pParent + ,wxWindowID vId = wxID_ANY + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT + ,const wxValidator& rValidator = wxDefaultValidator + ,const wxString& rsName = wxTreeCtrlNameStr + ); + + // + // Accessors + // --------- + // + + // + // Get the total number of items in the control + // + virtual unsigned int GetCount(void) const; + + // + // Indent is the number of pixels the children are indented relative to + // the parents position. SetIndent() also redraws the control + // immediately. + // + unsigned int GetIndent(void) const; + void SetIndent(unsigned int uIndent); + + // + // Spacing is the number of pixels between the start and the Text + // + unsigned int GetSpacing(void) const { return 18; } // return wxGTK default + void SetSpacing(unsigned int uSpacing) { } + + // + // Image list: these functions allow to associate an image list with + // the control and retrieve it. Note that the control does _not_ delete + // the associated image list when it's deleted in order to allow image + // lists to be shared between different controls. + // + // OS/2 doesn't really use imagelists as MSW does, but since the MSW + // control is the basis for this one, until I decide how to get rid of + // the need for them they are here for now. + // + wxImageList* GetImageList(void) const; + wxImageList* GetStateImageList(void) const; + + void AssignImageList(wxImageList* pImageList); + void AssignStateImageList(wxImageList* pImageList); + void SetImageList(wxImageList* pImageList); + void SetStateImageList(wxImageList* pImageList); + + // + // Functions to work with tree ctrl items. Unfortunately, they can _not_ be + // member functions of wxTreeItem because they must know the tree the item + // belongs to for Windows implementation and storing the pointer to + // wxTreeCtrl in each wxTreeItem is just too much waste. + + // + // Item's label + // + wxString GetItemText(const wxTreeItemId& rItem) const; + void SetItemText( const wxTreeItemId& rItem + ,const wxString& rsText + ); + + // + // One of the images associated with the item (normal by default) + // + int GetItemImage( const wxTreeItemId& rItem + ,wxTreeItemIcon vWhich = wxTreeItemIcon_Normal + ) const; + void SetItemImage( const wxTreeItemId& rItem + ,int nImage + ,wxTreeItemIcon vWhich = wxTreeItemIcon_Normal + ); + + // + // Data associated with the item + // + wxTreeItemData* GetItemData(const wxTreeItemId& rItem) const; + void SetItemData( const wxTreeItemId& rItem + ,wxTreeItemData* pData + ); + + // + // Item's text colour + // + wxColour GetItemTextColour(const wxTreeItemId& rItem) const; + void SetItemTextColour( const wxTreeItemId& rItem + ,const wxColour& rColor + ); + + // + // Item's background colour + // + wxColour GetItemBackgroundColour(const wxTreeItemId& rItem) const; + void SetItemBackgroundColour( const wxTreeItemId& rItem + ,const wxColour& rColour + ); + + // + // Item's font + // + wxFont GetItemFont(const wxTreeItemId& rItem) const; + void SetItemFont( const wxTreeItemId& rItem + ,const wxFont& rFont + ); + + // + // Force appearance of [+] button near the item. This is useful to + // allow the user to expand the items which don't have any children now + // - but instead add them only when needed, thus minimizing memory + // usage and loading time. + // + void SetItemHasChildren( const wxTreeItemId& rItem + ,bool bHas = true + ); + + // + // The item will be shown in bold + // + void SetItemBold( const wxTreeItemId& rItem + ,bool bBold = true + ); + + // + // The item will be shown with a drop highlight + // + void SetItemDropHighlight( const wxTreeItemId& rItem + ,bool bHighlight = true + ); + + // + // Item status inquiries + // --------------------- + // + + // + // Is the item visible (it might be outside the view or not expanded)? + // + bool IsVisible(const wxTreeItemId& rItem) const; + + // + // Does the item has any children? + // + bool ItemHasChildren(const wxTreeItemId& rItem) const; + + // + // Is the item expanded (only makes sense if HasChildren())? + // + bool IsExpanded(const wxTreeItemId& rItem) const; + + // + // Is this item currently selected (the same as has focus)? + // + bool IsSelected(const wxTreeItemId& rItem) const; + + // + // Is item text in bold font? + // + bool IsBold(const wxTreeItemId& rItem) const; + + // + // Number of children + // ------------------ + // + + // + // If 'bRecursively' is false, only immediate children count, otherwise + // the returned number is the number of all items in this branch + // + size_t GetChildrenCount( const wxTreeItemId& rItem + ,bool bRecursively = true + ) const; + + // + // Navigation + // ---------- + // + + // + // Get the root tree item + // + wxTreeItemId GetRootItem(void) const; + + // + // Get the item currently selected (may return NULL if no selection) + // + wxTreeItemId GetSelection(void) const; + + // + // Get the items currently selected, return the number of such item + // + size_t GetSelections(wxArrayTreeItemIds& rSelections) const; + + // + // Get the parent of this item (may return NULL if root) + // + wxTreeItemId GetItemParent(const wxTreeItemId& rItem) const; + + // for this enumeration function you must pass in a "cookie" parameter + // which is opaque for the application but is necessary for the library + // to make these functions reentrant (i.e. allow more than one + // enumeration on one and the same object simultaneously). Of course, + // the "cookie" passed to GetFirstChild() and GetNextChild() should be + // the same! + + // get the first child of this item + wxTreeItemId GetFirstChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const; + // get the next child + wxTreeItemId GetNextChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const; + + // + // Get the last child of this item - this method doesn't use cookies + // + wxTreeItemId GetLastChild(const wxTreeItemId& rItem) const; + + // + // Get the next sibling of this item + // + wxTreeItemId GetNextSibling(const wxTreeItemId& rItem) const; + + // + // Get the previous sibling + // + wxTreeItemId GetPrevSibling(const wxTreeItemId& rItem) const; + + // + // Get first visible item + // + wxTreeItemId GetFirstVisibleItem(void) const; + + // + // Get the next visible item: item must be visible itself! + // see IsVisible() and wxTreeCtrl::GetFirstVisibleItem() + // + wxTreeItemId GetNextVisible(const wxTreeItemId& rItem) const; + + // + // Get the previous visible item: item must be visible itself! + // + wxTreeItemId GetPrevVisible(const wxTreeItemId& rItem) const; + + // + // Operations + // ---------- + // + + // + // Add the root node to the tree + // + wxTreeItemId AddRoot( const wxString& rsText + ,int nImage = -1 + ,int nSelectedImage = -1 + ,wxTreeItemData* pData = NULL + ); + + // + // Insert a new item in as the first child of the parent + // + wxTreeItemId PrependItem( const wxTreeItemId& rParent + ,const wxString& rsText + ,int nImage = -1 + ,int nSelectedImage = -1 + ,wxTreeItemData* pData = NULL + ); + + // + // Insert a new item after a given one + // + wxTreeItemId InsertItem( const wxTreeItemId& rParent + ,const wxTreeItemId& rIdPrevious + ,const wxString& rsText + ,int nImage = -1 + ,int nSelectedImage = -1 + ,wxTreeItemData* pData = NULL + ); + + // + // Insert a new item before the one with the given index + // + wxTreeItemId InsertItem( const wxTreeItemId& pParent + ,size_t nIndex + ,const wxString& rsText + ,int nImage = -1 + ,int nSelectedImage = -1 + ,wxTreeItemData* pData = NULL + ); + + // + // Insert a new item in as the last child of the parent + // + wxTreeItemId AppendItem( const wxTreeItemId& rParent + ,const wxString& rsText + ,int nImage = -1 + ,int nSelectedImage = -1 + ,wxTreeItemData* pData = NULL + ); + + // + // Delete this item and associated data if any + // + void Delete(const wxTreeItemId& rItem); + + // + // Delete all children (but don't delete the item itself) + // + void DeleteChildren(const wxTreeItemId& rItem); + + // + // Delete all items from the tree + // + void DeleteAllItems(void); + + // + // Expand this item + // + void Expand(const wxTreeItemId& rItem); + + // + // Collapse the item without removing its children + // + void Collapse(const wxTreeItemId& rItem); + + // + // Collapse the item and remove all children + // + void CollapseAndReset(const wxTreeItemId& rItem); + + // + // Toggles the current state + // + void Toggle(const wxTreeItemId& rItem); + + // + // Remove the selection from currently selected item (if any) + // + void Unselect(void); + + // + // Unselect all items (only makes sense for multiple selection control) + // + void UnselectAll(void); + + // + // Select this item + // + void SelectItem(const wxTreeItemId& rItem); + + // + // Make sure this item is visible (expanding the parent item and/or + // scrolling to this item if necessary) + // + void EnsureVisible(const wxTreeItemId& rItem); + + // + // Scroll to this item (but don't expand its parent) + // + void ScrollTo(const wxTreeItemId& rItem); + + // + // OS/2 does not use a separate edit field for editting text. Here for + // interface compatibility, only. + // + wxTextCtrl* EditLabel( const wxTreeItemId& rItem + ,wxClassInfo* pTextCtrlClass = wxCLASSINFO(wxTextCtrl) + ); + + // + // returns NULL for OS/2 in ALL cases + // + wxTextCtrl* GetEditControl(void) const {return NULL;} + + // + // End editing and accept or discard the changes to item label + // + void EndEditLabel( const wxTreeItemId& rItem + ,bool bDiscardChanges = false + ); + + // + // Sorting + // ------- + // + + // + // This function is called to compare 2 items and should return -1, 0 + // or +1 if the first item is less than, equal to or greater than the + // second one. The base class version performs alphabetic comparaison + // of item labels (GetText) + // + virtual int OnCompareItems( const wxTreeItemId& rItem1 + ,const wxTreeItemId& rItem2 + ); + + // + // Sort the children of this item using OnCompareItems + // + void SortChildren(const wxTreeItemId& rItem); + + // + // Helpers + // ------- + // + + // + // Determine to which item (if any) belongs the given point (the + // coordinates specified are relative to the client area of tree ctrl) + // and fill the flags parameter with a bitmask of wxTREE_HITTEST_xxx + // constants. + + // + // The first function is more portable (because easier to implement + // on other platforms), but the second one returns some extra info. + // + wxTreeItemId HitTest(const wxPoint& rPoint) + { int nDummy = 0; return HitTest(rPoint, nDummy); } + wxTreeItemId HitTest( const wxPoint& rPoint + ,int& rFlags + ); + + // + // Get the bounding rectangle of the item (or of its label only) + // + bool GetBoundingRect( const wxTreeItemId& rItem + ,wxRect& rRect + ,bool bTextOnly = false + ) const; + + // + // Implementation + // -------------- + // + + virtual MRESULT OS2WindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + virtual bool OS2Command( WXUINT uParam + ,WXWORD wId + ); +// virtual bool OMSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + + // + // Override some base class virtuals + // + virtual bool SetBackgroundColour(const wxColour& rColour); + virtual bool SetForegroundColour(const wxColour& rColour); + + // + // Get/set the check state for the item (only for wxTR_MULTIPLE) + // + bool IsItemChecked(const wxTreeItemId& rItem) const; + void SetItemCheck( const wxTreeItemId& rItem + ,bool bCheck = true + ); + +protected: + // + // SetImageList helper + // + void SetAnyImageList( wxImageList* pImageList + ,int nWhich + ); + + // + // Refresh a single item + // + void RefreshItem(const wxTreeItemId& rItem); + + wxImageList* m_pImageListNormal; // images for tree elements + wxImageList* m_pImageListState; // special images for app defined states + bool m_bOwnsImageListNormal; + bool m_bOwnsImageListState; + +private: + + // + // The common part of all ctors + // + void Init(void); + + // + // Helper functions + // + inline bool DoGetItem(wxTreeViewItem* pTvItem) const; + inline void DoSetItem(wxTreeViewItem* pTvItem); + + inline void DoExpand( const wxTreeItemId& rItem + ,int nFlag + ); + wxTreeItemId DoInsertItem( const wxTreeItemId& pParent + ,wxTreeItemId hInsertAfter + ,const wxString& rsText + ,int nImage + ,int nSelectedImage + ,wxTreeItemData* pData + ); + int DoGetItemImageFromData( const wxTreeItemId& rItem + ,wxTreeItemIcon vWhich + ) const; + void DoSetItemImageFromData( const wxTreeItemId& rItem + ,int nImage + ,wxTreeItemIcon vWhich + ) const; + void DoSetItemImages( const wxTreeItemId& rItem + ,int nImage + ,int nImageSel + ); + void DeleteTextCtrl() { } + + // + // support for additional item images which we implement using + // wxTreeItemIndirectData technique - see the comments in msw/treectrl.cpp + // + void SetIndirectItemData( const wxTreeItemId& rItem + ,class wxTreeItemIndirectData* pData + ); + bool HasIndirectData(const wxTreeItemId& rItem) const; + bool IsDataIndirect(wxTreeItemData* pData) const + { return pData && pData->GetId().m_pItem == 0; } + + // + // The hash storing the items attributes (indexed by items ids) + // + wxMapTreeAttr m_vAttrs; + + // + // true if the hash above is not empty + // + bool m_bHasAnyAttr; + + // + // Used for dragging + // + wxDragImage* m_pDragImage; + + // Virtual root item, if wxTR_HIDE_ROOT is set. +// void* m_pVirtualRoot; + + // the starting item for selection with Shift +// WXHTREEITEM m_htSelStart; +// + friend class wxTreeItemIndirectData; + friend class wxTreeSortHelper; + + DECLARE_DYNAMIC_CLASS(wxTreeCtrl) + wxDECLARE_NO_COPY_CLASS(wxTreeCtrl); +}; // end of CLASS wxTreeCtrl + +#endif // wxUSE_TREECTRL + +#endif + // _WX_TREECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/warning.ico b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/warning.ico new file mode 100644 index 0000000000..7f70ff0708 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/warning.ico differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/window.h new file mode 100644 index 0000000000..787113c405 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/window.h @@ -0,0 +1,570 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/window.h +// Purpose: wxWindow class +// Author: David Webster +// Modified by: +// Created: 10/12/99 +// Copyright: (c) David Webster +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WINDOW_H_ +#define _WX_WINDOW_H_ + +#define wxUSE_MOUSEEVENT_HACK 0 + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- +#define INCL_DOS +#define INCL_PM +#define INCL_GPI +#include <os2.h> + + +// --------------------------------------------------------------------------- +// forward declarations +// --------------------------------------------------------------------------- +#ifndef CW_USEDEFAULT +# define CW_USEDEFAULT ((int)0x80000000) +#endif + +// --------------------------------------------------------------------------- +// forward declarations +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxButton; + +// --------------------------------------------------------------------------- +// wxWindow declaration for OS/2 PM +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowOS2 : public wxWindowBase +{ +public: + wxWindowOS2() + { + Init(); + } + + wxWindowOS2( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxString& rName = wxPanelNameStr + ) + { + Init(); + Create( pParent + ,vId + ,rPos + ,rSize + ,lStyle + ,rName + ); + } + + virtual ~wxWindowOS2(); + + bool Create( wxWindow* pParent + ,wxWindowID vId + ,const wxPoint& rPos = wxDefaultPosition + ,const wxSize& rSize = wxDefaultSize + ,long lStyle = 0 + ,const wxString& rName = wxPanelNameStr + ); + + // implement base class pure virtuals + virtual void SetLabel(const wxString& label); + virtual wxString GetLabel(void) const; + virtual void Raise(void); + virtual void Lower(void); + virtual bool Show(bool bShow = true); + virtual void DoEnable(bool bEnable); + virtual void SetFocus(void); + virtual void SetFocusFromKbd(void); + virtual bool Reparent(wxWindowBase* pNewParent); + virtual void WarpPointer( int x + ,int y + ); + virtual void Refresh( bool bEraseBackground = true + ,const wxRect* pRect = (const wxRect *)NULL + ); + virtual void Update(void); + virtual void SetWindowStyleFlag(long lStyle); + virtual bool SetCursor(const wxCursor& rCursor); + virtual bool SetFont(const wxFont& rFont); + virtual int GetCharHeight(void) const; + virtual int GetCharWidth(void) const; + + virtual void SetScrollbar( int nOrient + ,int nPos + ,int nThumbVisible + ,int nRange + ,bool bRefresh = true + ); + virtual void SetScrollPos( int nOrient + ,int nPos + ,bool bRefresh = true + ); + virtual int GetScrollPos(int nOrient) const; + virtual int GetScrollThumb(int nOrient) const; + virtual int GetScrollRange(int nOrient) const; + virtual void ScrollWindow( int nDx + ,int nDy + ,const wxRect* pRect = NULL + ); + + inline HWND GetScrollBarHorz(void) const {return m_hWndScrollBarHorz;} + inline HWND GetScrollBarVert(void) const {return m_hWndScrollBarVert;} +#if wxUSE_DRAG_AND_DROP + virtual void SetDropTarget(wxDropTarget* pDropTarget); +#endif // wxUSE_DRAG_AND_DROP + + // Accept files for dragging + virtual void DragAcceptFiles(bool bAccept); + +#ifndef __WXUNIVERSAL__ + // Native resource loading (implemented in src/os2/nativdlg.cpp) + // FIXME: should they really be all virtual? + virtual bool LoadNativeDialog( wxWindow* pParent + ,wxWindowID& vId + ); + virtual bool LoadNativeDialog( wxWindow* pParent + ,const wxString& rName + ); + wxWindow* GetWindowChild1(wxWindowID vId); + wxWindow* GetWindowChild(wxWindowID vId); +#endif //__WXUNIVERSAL__ + + // implementation from now on + // -------------------------- + + // simple accessors + // ---------------- + + WXHWND GetHWND(void) const { return m_hWnd; } + void SetHWND(WXHWND hWnd) { m_hWnd = hWnd; } + virtual WXWidget GetHandle(void) const { return GetHWND(); } + bool GetUseCtl3D(void) const { return m_bUseCtl3D; } + bool GetTransparentBackground(void) const { return m_bBackgroundTransparent; } + void SetTransparentBackground(bool bT = true) { m_bBackgroundTransparent = bT; } + + // event handlers + // -------------- + void OnSetFocus(wxFocusEvent& rEvent); + void OnEraseBackground(wxEraseEvent& rEvent); + void OnIdle(wxIdleEvent& rEvent); + +public: + + // Windows subclassing + void SubclassWin(WXHWND hWnd); + void UnsubclassWin(void); + + WXFARPROC OS2GetOldWndProc(void) const { return m_fnOldWndProc; } + void OS2SetOldWndProc(WXFARPROC fnProc) { m_fnOldWndProc = fnProc; } + // + // Return true if the window is of a standard (i.e. not wxWidgets') class + // + bool IsOfStandardClass(void) const { return m_fnOldWndProc != NULL; } + + wxWindow* FindItem(long lId) const; + wxWindow* FindItemByHWND( WXHWND hWnd + ,bool bControlOnly = false + ) const; + + // Make a Windows extended style from the given wxWidgets window style ?? applicable to OS/2?? + static WXDWORD MakeExtendedStyle( long lStyle + ,bool bEliminateBorders = true + ); + + // PM only: true if this control is part of the main control + virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return false; } + + // translate wxWidgets style flags for this control into the PM style + // and optional extended style for the corresponding native control + // + // this is the function that should be overridden in the derived classes, + // but you will mostly use OS2GetCreateWindowFlags() below + virtual WXDWORD OS2GetStyle( long lFlags + ,WXDWORD* pdwExstyle = NULL + ) const; + + // get the MSW window flags corresponding to wxWidgets ones + // + // the functions returns the flags (WS_XXX) directly and puts the ext + // (WS_EX_XXX) flags into the provided pointer if not NULL + WXDWORD OS2GetCreateWindowFlags(WXDWORD* pdwExflags = NULL) const + { return OS2GetStyle(GetWindowStyle(), pdwExflags); } + + + // get the HWND to be used as parent of this window with CreateWindow() + virtual WXHWND OS2GetParent(void) const; + + // returns true if the window has been created + bool OS2Create( PSZ zClass + ,const wxChar* zTitle + ,WXDWORD dwStyle + ,const wxPoint& rPos + ,const wxSize& rSize + ,void* pCtlData + ,WXDWORD dwExStyle + ,bool bIsChild + ); + virtual bool OS2Command( WXUINT uParam + ,WXWORD nId + ); + +#ifndef __WXUNIVERSAL__ + // Create an appropriate wxWindow from a HWND + virtual wxWindow* CreateWindowFromHWND( wxWindow* pParent + ,WXHWND hWnd + ); + + // Make sure the window style reflects the HWND style (roughly) + virtual void AdoptAttributesFromHWND(void); +#endif + + // Setup background and foreground colours correctly + virtual void SetupColours(void); + + // ------------------------------------------------------------------------ + // helpers for message handlers: these perform the same function as the + // message crackers from <windowsx.h> - they unpack WPARAM and LPARAM into + // the correct parameters + // ------------------------------------------------------------------------ + + void UnpackCommand( WXWPARAM wParam + ,WXLPARAM lParam, + WXWORD* pId + ,WXHWND* pHwnd + ,WXWORD* pCmd + ); + void UnpackActivate( WXWPARAM wParam + ,WXLPARAM lParam + ,WXWORD* pState + ,WXHWND* pHwnd + ); + void UnpackScroll( WXWPARAM wParam + ,WXLPARAM lParam + ,WXWORD* pCode + ,WXWORD* pPos + ,WXHWND* pHwnd + ); + void UnpackMenuSelect( WXWPARAM wParam + ,WXLPARAM lParam + ,WXWORD* pTtem + ,WXWORD* pFlags + ,WXHMENU* pHmenu + ); + + // ------------------------------------------------------------------------ + // internal handlers for OS2 messages: all handlers return a boolen value: + // true means that the handler processed the event and false that it didn't + // ------------------------------------------------------------------------ + + // there are several cases where we have virtual functions for PM + // message processing: this is because these messages often require to be + // processed in a different manner in the derived classes. For all other + // messages, however, we do *not* have corresponding OS2OnXXX() function + // and if the derived class wants to process them, it should override + // OS2WindowProc() directly. + + // scroll event (both horizontal and vertical) + virtual bool OS2OnScroll( int nOrientation + ,WXWORD nSBCode + ,WXWORD pos + ,WXHWND control + ); + + // owner-drawn controls need to process these messages + virtual bool OS2OnDrawItem( int nId + ,WXDRAWITEMSTRUCT* pItem + ); + virtual long OS2OnMeasureItem( int nId + ,WXMEASUREITEMSTRUCT* pItem + ); + + virtual void OnPaint(wxPaintEvent& rEvent); + + // the rest are not virtual + bool HandleCreate( WXLPCREATESTRUCT vCs + ,bool* pMayCreate + ); + bool HandleInitDialog(WXHWND hWndFocus); + bool HandleDestroy(void); + bool HandlePaint(void); + bool HandleEraseBkgnd(WXHDC vDC); + bool HandleMinimize(void); + bool HandleMaximize(void); + bool HandleSize( int nX + ,int nY + ,WXUINT uFlag + ); + bool HandleGetMinMaxInfo(PSWP pMmInfo); + bool HandleShow( bool bShow + ,int nStatus + ); + bool HandleActivate( int nFlag + ,WXHWND hActivate + ); + bool HandleCommand( WXWORD nId + ,WXWORD nCmd + ,WXHWND hControl + ); + bool HandleSysCommand( WXWPARAM wParam + ,WXLPARAM lParam + ); + bool HandlePaletteChanged(void); + bool HandleQueryNewPalette(void); + bool HandleSysColorChange(void); + bool HandleDisplayChange(void); + bool HandleCaptureChanged(WXHWND hBainedCapture); + + bool HandleCtlColor(WXHBRUSH* hBrush); + bool HandleSetFocus(WXHWND hWnd); + bool HandleKillFocus(WXHWND hWnd); + bool HandleEndDrag(WXWPARAM wParam); + bool HandleMouseEvent( WXUINT uMsg + ,int nX + ,int nY + ,WXUINT uFlags + ); + bool HandleMouseMove( int nX + ,int nY + ,WXUINT uFlags + ); + bool HandleChar( WXWPARAM wParam + ,WXLPARAM lParam + ,bool bIsASCII = false + ); + bool HandleKeyDown( WXWPARAM wParam + ,WXLPARAM lParam + ); + bool HandleKeyUp( WXWPARAM wParam + ,WXLPARAM lParam + ); + bool HandleQueryDragIcon(WXHICON* phIcon); + bool HandleSetCursor( USHORT vId + ,WXHWND hWnd + ); + + bool IsMouseInWindow(void) const; + bool OS2GetCreateWindowCoords( const wxPoint& rPos + ,const wxSize& rSize + ,int& rnX + ,int& rnY + ,int& rnWidth + ,int& rnHeight + ) const; + + // Window procedure + virtual MRESULT OS2WindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + + // Calls an appropriate default window procedure + virtual MRESULT OS2DefWindowProc( WXUINT uMsg + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + virtual bool OS2ProcessMessage(WXMSG* pMsg); + virtual bool OS2ShouldPreProcessMessage(WXMSG* pMsg); + virtual bool OS2TranslateMessage(WXMSG* pMsg); + virtual void OS2DestroyWindow(void); + + // this function should return the brush to paint the window background + // with or 0 for the default brush + virtual WXHBRUSH OnCtlColor( WXHDC hDC + ,WXHWND hWnd + ,WXUINT uCtlColor + ,WXUINT uMessage + ,WXWPARAM wParam + ,WXLPARAM lParam + ); + + // Responds to colour changes: passes event on to children. + void OnSysColourChanged(wxSysColourChangedEvent& rEvent); + + // initialize various fields of wxMouseEvent (common part of OS2OnMouseXXX) + void InitMouseEvent( wxMouseEvent& rEvent + ,int nX + ,int nY + ,WXUINT uFlags + ); + + void MoveChildren(int nDiff); + PSWP GetSwp(void) {return &m_vWinSwp;} + +protected: + virtual void DoFreeze(void); + virtual void DoThaw(void); + + // PM can't create some MSW styles natively but can perform these after + // creation by sending messages + typedef enum extra_flags { kFrameToolWindow = 0x0001 + ,kVertCaption = 0x0002 + ,kHorzCaption = 0x0004 + } EExtraFlags; + // Some internal sizeing id's to make it easy for event handlers + typedef enum size_types { kSizeNormal + ,kSizeMax + ,kSizeMin + } ESizeTypes; + // the window handle + WXHWND m_hWnd; + + // the old window proc (we subclass all windows) + WXFARPROC m_fnOldWndProc; + + // additional (OS2 specific) flags + bool m_bUseCtl3D:1; // Using CTL3D for this control + bool m_bBackgroundTransparent:1; + bool m_bMouseInWindow:1; + bool m_bLastKeydownProcessed:1; + bool m_bWinCaptured:1; + WXDWORD m_dwExStyle; + + // the size of one page for scrolling + int m_nXThumbSize; + int m_nYThumbSize; + +#if wxUSE_MOUSEEVENT_HACK + // the coordinates of the last mouse event and the type of it + long m_lLastMouseX, + long m_lLastMouseY; + int m_nLastMouseEvent; +#endif // wxUSE_MOUSEEVENT_HACK + + WXHMENU m_hMenu; // Menu, if any + unsigned long m_ulMenubarId; // it's Id, if any + + // the return value of WM_GETDLGCODE handler + long m_lDlgCode; + + // implement the base class pure virtuals + virtual void GetTextExtent( const wxString& rString + ,int* pX + ,int* pY + ,int* pDescent = NULL + ,int* pExternalLeading = NULL + ,const wxFont* pTheFont = NULL + ) const; +#if wxUSE_MENUS_NATIVE + virtual bool DoPopupMenu( wxMenu* pMenu + ,int nX + ,int nY + ); +#endif // wxUSE_MENUS_NATIVE + virtual void DoClientToScreen( int* pX + ,int* pY + ) const; + virtual void DoScreenToClient( int* pX + ,int* pY + ) const; + virtual void DoGetPosition( int* pX + ,int* pY + ) const; + virtual void DoGetSize( int* pWidth + ,int* pHeight + ) const; + virtual void DoGetClientSize( int* pWidth + ,int* pHeight + ) const; + virtual void DoSetSize( int nX + ,int nY + ,int nWidth + ,int nHeight + ,int nSizeFlags = wxSIZE_AUTO + ); + virtual void DoSetClientSize( int nWidth + ,int nHeight + ); + + virtual void DoCaptureMouse(void); + virtual void DoReleaseMouse(void); + + // move the window to the specified location and resize it: this is called + // from both DoSetSize() and DoSetClientSize() and would usually just call + // ::WinSetWindowPos() except for composite controls which will want to arrange + // themselves inside the given rectangle + virtual void DoMoveWindow( int nX + ,int nY + ,int nWidth + ,int nHeight + ); + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip(wxToolTip* pTip); +#endif // wxUSE_TOOLTIPS + + int GetOS2ParentHeight(wxWindowOS2* pParent); + +private: + // common part of all ctors + void Init(void); + + // the (non-virtual) handlers for the events + bool HandleMove( int nX + ,int nY + ); + bool HandleJoystickEvent( WXUINT uMsg + ,int pX + ,int pY + ,WXUINT uFlags + ); + + bool HandleNotify( int nIdCtrl + ,WXLPARAM lParam + ,WXLPARAM* pResult + ); + // the helper functions used by HandleChar/KeyXXX methods + wxKeyEvent CreateKeyEvent( wxEventType evType + ,int nId + ,WXLPARAM lParam = 0 + ,WXWPARAM wParam = 0 + ) const; + + HWND m_hWndScrollBarHorz; + HWND m_hWndScrollBarVert; + SWP m_vWinSwp; + + DECLARE_DYNAMIC_CLASS(wxWindowOS2); + wxDECLARE_NO_COPY_CLASS(wxWindowOS2); + DECLARE_EVENT_TABLE() +}; // end of wxWindow + +class wxWindowCreationHook +{ +public: + wxWindowCreationHook(wxWindow* pWinBeingCreated); + ~wxWindowCreationHook(); +}; // end of CLASS wxWindowCreationHook + +// --------------------------------------------------------------------------- +// global functions +// --------------------------------------------------------------------------- + +// kbd code translation +WXDLLIMPEXP_CORE int wxCharCodeOS2ToWX(int nKeySym); +WXDLLIMPEXP_CORE int wxCharCodeWXToOS2( int nId + ,bool* pbIsVirtual = NULL + ); + +// ---------------------------------------------------------------------------- +// global objects +// ---------------------------------------------------------------------------- + +// notice that this hash must be defined after wxWindow declaration as it +// needs to "see" its dtor and not just forward declaration +#include "wx/hash.h" + +// pseudo-template HWND <-> wxWindow hash table +WX_DECLARE_HASH(wxWindowOS2, wxWindowList, wxWinHashTable); + +extern wxWinHashTable *wxWinHandleHash; + +#endif // _WX_WINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wx.dlg b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wx.dlg new file mode 100644 index 0000000000..e4c73f8b46 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wx.dlg @@ -0,0 +1,34 @@ +DLGINCLUDE 1 \dev\wx2\wxwindows\include\wx\os2\wxrsc.h + +DLGTEMPLATE ID_RESIZEABLEDIALOG PRELOAD MOVEABLE DISCARDABLE +BEGIN + DIALOG "" ID_RESIZEABLEDIALOG 34, 22, 144, 75 + WS_SAVEBITS | FS_SIZEBORDER | FS_NOMOVEWITHOWNER, + FCF_SIZEBORDER | FCF_TITLEBAR | FCF_SYSMENU + BEGIN + END +END + +DLGTEMPLATE ID_CAPTIONDIALOG PRELOAD MOVEABLE DISCARDABLE +BEGIN + DIALOG "Dummy Dialog" ID_CAPTIONDIALOG 34, 22, 144, 75 + WS_SAVEBITS | FS_DLGBORDER | FS_NOMOVEWITHOWNER, + FCF_DLGBORDER | FCF_TITLEBAR | FCF_SYSMENU + BEGIN + END +END + +/* +////////////////////////////////////////////////////////////////////////////// +// Dummy dialog for dialog boxes without caption & with thin frame +////////////////////////////////////////////////////////////////////////////// +*/ +DLGTEMPLATE ID_NOCAPTIONDIALOG PRELOAD MOVEABLE DISCARDABLE +BEGIN + DIALOG "" ID_NOCAPTIONDIALOG 34, 22, 144, 75 + WS_SAVEBITS | FS_NOMOVEWITHOWNER, + FCF_BORDER + BEGIN + END +END + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wx.rc b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wx.rc new file mode 100644 index 0000000000..1a8570756a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wx.rc @@ -0,0 +1,85 @@ +#include <os2.h> +#include "wxrsc.h" + + +/* +////////////////////////////////////////////////////////////////////////////// +// This is the MDI Window menu +////////////////////////////////////////////////////////////////////////////// +*/ +MENU ID_WINDOW_MENU PRELOAD +BEGIN + SUBMENU "~Window", 131 + BEGIN + MENUITEM "~Cascade", 132 + MENUITEM "Tile ~Horizontally", 133 + MENUITEM "Tile ~Vertically", 134 + MENUITEM "", -1 + MENUITEM "~Arrange Icons", 135 + MENUITEM "~Next", 136 + END +END + +/* +////////////////////////////////////////////////////////////////////////////// +// Standard winWindows Cursors +////////////////////////////////////////////////////////////////////////////// +*/ + +POINTER WXCURSOR_HAND LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\hand.ptr" +POINTER WXCURSOR_BULLSEYE LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\bullseye.ptr" +POINTER WXCURSOR_PENCIL LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\pencil.ptr" +POINTER WXCURSOR_MAGNIFIER LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\magnit1.ptr" +POINTER WXCURSOR_SIZING LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\size.ptr" +POINTER WXCURSOR_ROLLER LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\roller.ptr" +POINTER WXCURSOR_PBRUSH LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\pbrush.ptr" +POINTER WXCURSOR_PLEFT LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\pntleft.ptr" +POINTER WXCURSOR_PRIGHT LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\pntright.ptr" +POINTER WXCURSOR_QARROW LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\query.ptr" +POINTER WXCURSOR_BLANK LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\blank.ptr" + +/* +////////////////////////////////////////////////////////////////////////////// +// Default Icons +////////////////////////////////////////////////////////////////////////////// +*/ +/* Standard icons */ +ICON wxICON_TIP PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\tip.ico" + +ICON wxICON_SMALL_CLOSED_FOLDER PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\folder1.ico" +ICON wxICON_SMALL_OPEN_FOLDER PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\folder2.ico" +ICON wxICON_SMALL_FILE PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\file.ico" +ICON wxICON_SMALL_COMPUTER PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\computer.ico" +ICON wxICON_SMALL_DRIVE PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\drive.ico" +ICON wxICON_SMALL_CDROM PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\cdrom.ico" +ICON wxICON_SMALL_FLOPPY PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\floppy.ico" +ICON wxICON_SMALL_REMOVEABLE PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\removble.ico" +ICON wxICON_SMALL_ERROR PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\error.ico" +ICON wxICON_SMALL_INFO PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\info.ico" +ICON wxICON_SMALL_WARNING PRELOAD "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\warning.ico" + +/* +////////////////////////////////////////////////////////////////////////////// +// Bitmaps +////////////////////////////////////////////////////////////////////////////// +*/ +BITMAP wxDISABLE_BUTTON_BITMAP LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\disable.bmp" + +/* +// For src/generic/proplist.cpp +*/ +BITMAP wxTICK_BITMAP LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\tick.bmp" +BITMAP wxCROSS_BITMAP LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\cross.bmp" + +/* +// For kContextHelpButton +*/ +BITMAP wxCSQUERY_BITMAP LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\csquery.bmp" + +/* +// For obtaining the RGB values of standard colours +*/ +BITMAP wxBITMAP_STD_COLOURS LOADONCALL "\\dev\\wx2\\wxwindows\\include\\wx\\os2\\colours.bmp" + +RCINCLUDE \Dev\Wx2\WxWindows\INCLUDE\WX\OS2\WX.DLG + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wx.res b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wx.res new file mode 100644 index 0000000000..25c2e20f51 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wx.res differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wxrsc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wxrsc.h new file mode 100644 index 0000000000..e87843d15f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/os2/wxrsc.h @@ -0,0 +1,51 @@ +/* +// Pointer ID's +*/ +#define WXCURSOR_HAND 100 +#define WXCURSOR_BULLSEYE 101 +#define WXCURSOR_PENCIL 102 +#define WXCURSOR_MAGNIFIER 103 +#define WXCURSOR_NO_ENTRY 104 +#define WXCURSOR_SIZING 105 +#define WXCURSOR_ROLLER 106 +#define WXCURSOR_WATCH 107 +#define WXCURSOR_PBRUSH 108 +#define WXCURSOR_PLEFT 109 +#define WXCURSOR_PRIGHT 110 +#define WXCURSOR_QARROW 111 +#define WXCURSOR_BLANK 112 + +/* +// Icon Ids +*/ +#define wxICON_TIP 113 +#define wxICON_SMALL_CLOSED_FOLDER 114 +#define wxICON_SMALL_OPEN_FOLDER 115 +#define wxICON_SMALL_FILE 116 +#define wxICON_SMALL_COMPUTER 117 +#define wxICON_SMALL_DRIVE 118 +#define wxICON_SMALL_CDROM 119 +#define wxICON_SMALL_FLOPPY 120 +#define wxICON_SMALL_REMOVEABLE 121 +#define wxICON_SMALL_ERROR 122 +#define wxICON_SMALL_INFO 123 +#define wxICON_SMALL_WARNING 124 + +/* +// Bitmap Ids +*/ +#define wxDISABLE_BUTTON_BITMAP 125 +#define wxTICK_BITMAP 126 +#define wxCROSS_BITMAP 127 +#define wxCSQUERY_BITMAP 128 +#define wxBITMAP_STD_COLOURS 129 + +/* +// Dialog Ids -- must match enums in Toplevel.cpp +*/ +#define ID_RESIZEABLEDIALOG 130 +#define ID_CAPTIONDIALOG 131 +#define ID_NOCAPTIONDIALOG 132 + +#define ID_WINDOW_MENU 133 + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/accel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/accel.h new file mode 100644 index 0000000000..a6690acf5f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/accel.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/accel.h +// Purpose: wxAcceleratorTable class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ACCEL_H_ +#define _WX_ACCEL_H_ + +#include "wx/string.h" +#include "wx/event.h" + +class WXDLLIMPEXP_CORE wxAcceleratorTable: public wxObject +{ +DECLARE_DYNAMIC_CLASS(wxAcceleratorTable) +public: + wxAcceleratorTable(); + wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); // Load from array + + virtual ~wxAcceleratorTable(); + + bool Ok() const { return IsOk(); } + bool IsOk() const; + + int GetCommand( wxKeyEvent &event ); +}; + +#endif + // _WX_ACCEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/anybutton.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/anybutton.h new file mode 100644 index 0000000000..ffa28dfb6c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/anybutton.h @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: anybutton.h +// Purpose: wxAnyButton class +// Author: Stefan Csomor +// Created: 1998-01-01 (extracted from button.h) +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_ANYBUTTON_H_ +#define _WX_OSX_ANYBUTTON_H_ + +// Any button +class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase +{ +public: + wxAnyButton() {} + + static wxSize GetDefaultSize(); + + virtual void SetLabel(const wxString& label); + +protected: + virtual wxSize DoGetBestSize() const ; + + void OnEnterWindow( wxMouseEvent& event); + void OnLeaveWindow( wxMouseEvent& event); + + virtual wxBitmap DoGetBitmap(State which) const; + virtual void DoSetBitmap(const wxBitmap& bitmap, State which); + virtual void DoSetBitmapPosition(wxDirection dir); + + virtual void DoSetBitmapMargins(int x, int y) + { + m_marginX = x; + m_marginY = y; + InvalidateBestSize(); + } + +#if wxUSE_MARKUP && wxOSX_USE_COCOA + virtual bool DoSetLabelMarkup(const wxString& markup); +#endif // wxUSE_MARKUP && wxOSX_USE_COCOA + + + // the margins around the bitmap + int m_marginX; + int m_marginY; + + // the bitmaps for the different state of the buttons, all of them may be + // invalid and the button only shows a bitmap at all if State_Normal bitmap + // is valid + wxBitmap m_bitmaps[State_Max]; + + wxDECLARE_NO_COPY_CLASS(wxAnyButton); + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_OSX_ANYBUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/app.h new file mode 100644 index 0000000000..0d74d5fa76 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/app.h @@ -0,0 +1,186 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/app.h +// Purpose: wxApp class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_APP_H_ +#define _WX_APP_H_ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/gdicmn.h" +#include "wx/event.h" + +class WXDLLIMPEXP_FWD_CORE wxFrame; +class WXDLLIMPEXP_FWD_CORE wxWindowMac; +class WXDLLIMPEXP_FWD_CORE wxApp ; +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; +class WXDLLIMPEXP_FWD_BASE wxLog; +class WXDLLIMPEXP_FWD_CORE wxMacAutoreleasePool; + +// Force an exit from main loop +void WXDLLIMPEXP_CORE wxExit(); + +// Yield to other apps/messages +bool WXDLLIMPEXP_CORE wxYield(); + +// Represents the application. Derive OnInit and declare +// a new App object to start application +class WXDLLIMPEXP_CORE wxApp: public wxAppBase +{ + DECLARE_DYNAMIC_CLASS(wxApp) + + wxApp(); + virtual ~wxApp(); + + virtual void WakeUpIdle(); + + virtual void SetPrintMode(int mode) { m_printMode = mode; } + virtual int GetPrintMode() const { return m_printMode; } + + // calling OnInit with an auto-release pool ready ... + virtual bool CallOnInit(); +#if wxUSE_GUI + // setting up all MacOS Specific Event-Handlers etc + virtual bool OnInitGui(); +#endif // wxUSE_GUI + + virtual int OnRun(); + + virtual bool ProcessIdle(); + + // implementation only + void OnIdle(wxIdleEvent& event); + void OnEndSession(wxCloseEvent& event); + void OnQueryEndSession(wxCloseEvent& event); + +protected: + int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT + wxMacAutoreleasePool* m_macPool; + +public: + + static bool sm_isEmbedded; + // Implementation + virtual bool Initialize(int& argc, wxChar **argv); + virtual void CleanUp(); + + // the installed application event handler + WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; } + WXEVENTHANDLERREF MacGetCurrentEventHandlerCallRef() { return m_macCurrentEventHandlerCallRef ; } + void MacSetCurrentEvent( WXEVENTREF event , WXEVENTHANDLERCALLREF handler ) + { m_macCurrentEvent = event ; m_macCurrentEventHandlerCallRef = handler ; } + + // adding a CFType object to be released only at the end of the current event cycle (increases the + // refcount of the object passed), needed in case we are in the middle of an event concering an object + // we want to delete and cannot do it immediately + // TODO change semantics to be in line with cocoa (make autrelease NOT increase the count) + void MacAddToAutorelease( void* cfrefobj ); + void MacReleaseAutoreleasePool(); + +public: + static wxWindow* s_captureWindow ; + static long s_lastModifiers ; + + int m_nCmdShow; + + // mac specifics +protected: +#if wxOSX_USE_COCOA + // override for support of custom app controllers + virtual WX_NSObject OSXCreateAppController(); +#endif + +private: + virtual bool DoInitGui(); + virtual void DoCleanUp(); + + WXEVENTHANDLERREF m_macEventHandler ; + WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ; + WXEVENTREF m_macCurrentEvent ; + +public: + static long s_macAboutMenuItemId ; + static long s_macPreferencesMenuItemId ; + static long s_macExitMenuItemId ; + static wxString s_macHelpMenuTitleName ; + + WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; } + + // For embedded use. By default does nothing. + virtual void MacHandleUnhandledEvent( WXEVENTREF ev ); + + bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , wxChar uniChar ) ; + bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , wxChar uniChar ) ; + bool MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers , long when , wxChar uniChar ) ; + void MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymessage , long modifiers , long when , wxChar uniChar ) ; +#if wxOSX_USE_CARBON + // we only have applescript on these + virtual short MacHandleAEODoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; + virtual short MacHandleAEGURL(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; + virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; + virtual short MacHandleAEOApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; + virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; + virtual short MacHandleAERApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; +#endif + // in response of an openFiles message with Cocoa and an + // open-document apple event + virtual void MacOpenFiles(const wxArrayString &fileNames) ; + // called by MacOpenFiles for each file. + virtual void MacOpenFile(const wxString &fileName) ; + // in response of a get-url apple event + virtual void MacOpenURL(const wxString &url) ; + // in response of a print-document apple event + virtual void MacPrintFiles(const wxArrayString &fileNames) ; + // called by MacPrintFiles for each file + virtual void MacPrintFile(const wxString &fileName) ; + // in response of a open-application apple event + virtual void MacNewFile() ; + // in response of a reopen-application apple event + virtual void MacReopenApp() ; + + // Notice that this is just a placeholder and doesn't work yet! + // + // Override this to return false from a non-bundled console app in order to + // stay in background instead of being made a foreground application as + // happens by default. + virtual bool OSXIsGUIApplication() { return true; } + +#if wxOSX_USE_COCOA_OR_IPHONE + // immediately before the native event loop launches + virtual void OSXOnWillFinishLaunching(); + // immediately when the native event loop starts, no events have been served yet + virtual void OSXOnDidFinishLaunching(); + // OS asks to terminate app, return no to stay running + virtual bool OSXOnShouldTerminate(); + // before application terminates + virtual void OSXOnWillTerminate(); + +private: + bool m_onInitResult; + bool m_inited; + wxArrayString m_openFiles; + wxArrayString m_printFiles; + wxString m_getURL; + +public: + bool OSXInitWasCalled() { return m_inited; } + void OSXStoreOpenFiles(const wxArrayString &files ) { m_openFiles = files ; } + void OSXStorePrintFiles(const wxArrayString &files ) { m_printFiles = files ; } + void OSXStoreOpenURL(const wxString &url ) { m_getURL = url ; } +#endif + + // Hide the application windows the same as the system hide command would do it. + void MacHideApp(); + + DECLARE_EVENT_TABLE() +}; + +#endif + // _WX_APP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/bitmap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/bitmap.h new file mode 100644 index 0000000000..8f51d7678f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/bitmap.h @@ -0,0 +1,213 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/bitmap.h +// Purpose: wxBitmap class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BITMAP_H_ +#define _WX_BITMAP_H_ + +#include "wx/palette.h" + +// Bitmap +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class wxBitmapRefData ; +class WXDLLIMPEXP_FWD_CORE wxBitmapHandler; +class WXDLLIMPEXP_FWD_CORE wxControl; +class WXDLLIMPEXP_FWD_CORE wxCursor; +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxImage; +class WXDLLIMPEXP_FWD_CORE wxPixelDataBase; + +// A mask is a bitmap used for drawing bitmaps +// Internally it is stored as a 8 bit deep memory chunk, 0 = black means the source will be drawn +// 255 = white means the source will not be drawn, no other values will be present +// 8 bit is chosen only for performance reasons, note also that this is the inverse value range +// from alpha, where 0 = invisible , 255 = fully drawn + +class WXDLLIMPEXP_CORE wxMask: public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxMask) + +public: + wxMask(); + + // Copy constructor + wxMask(const wxMask& mask); + + // Construct a mask from a bitmap and a colour indicating + // the transparent area + wxMask(const wxBitmap& bitmap, const wxColour& colour); + + // Construct a mask from a mono bitmap (black meaning show pixels, white meaning transparent) + wxMask(const wxBitmap& bitmap); + + // implementation helper only : construct a mask from a 32 bit memory buffer + wxMask(const wxMemoryBuffer& buf, int width , int height , int bytesPerRow ) ; + + virtual ~wxMask(); + + bool Create(const wxBitmap& bitmap, const wxColour& colour); + bool Create(const wxBitmap& bitmap); + bool Create(const wxMemoryBuffer& buf, int width , int height , int bytesPerRow ) ; + + wxBitmap GetBitmap() const; + + // Implementation below + + void Init() ; + + // a 8 bit depth mask + void* GetRawAccess() const; + int GetBytesPerRow() const { return m_bytesPerRow ; } + // renders/updates native representation when necessary + void RealizeNative() ; + + WXHBITMAP GetHBITMAP() const ; + + +private: + wxMemoryBuffer m_memBuf ; + int m_bytesPerRow ; + int m_width ; + int m_height ; + + WXHBITMAP m_maskBitmap ; + +}; + +class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase +{ + DECLARE_DYNAMIC_CLASS(wxBitmap) + + friend class WXDLLIMPEXP_FWD_CORE wxBitmapHandler; + +public: + wxBitmap() {} // Platform-specific + + // Initialize with raw data. + wxBitmap(const char bits[], int width, int height, int depth = 1); + + // Initialize with XPM data + wxBitmap(const char* const* bits); + + // Load a file or resource + wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); + + // Constructor for generalised creation from data + wxBitmap(const void* data, wxBitmapType type, int width, int height, int depth = 1); + + // creates an bitmap from the native image format + wxBitmap(CGImageRef image, double scale = 1.0); + wxBitmap(WX_NSImage image); + wxBitmap(CGContextRef bitmapcontext); + + // Create a bitmap compatible with the given DC + wxBitmap(int width, int height, const wxDC& dc); + + // If depth is omitted, will create a bitmap compatible with the display + wxBitmap(int width, int height, int depth = -1) { (void)Create(width, height, depth); } + wxBitmap(const wxSize& sz, int depth = -1) { (void)Create(sz, depth); } + + // Convert from wxImage: + wxBitmap(const wxImage& image, int depth = -1, double scale = 1.0); + + // Convert from wxIcon + wxBitmap(const wxIcon& icon) { CopyFromIcon(icon); } + + virtual ~wxBitmap() {} + + wxImage ConvertToImage() const; + + // get the given part of bitmap + wxBitmap GetSubBitmap( const wxRect& rect ) const; + + virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); + virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) + { return Create(sz.GetWidth(), sz.GetHeight(), depth); } + + virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1); + bool Create( CGImageRef image, double scale = 1.0 ); + bool Create( WX_NSImage image ); + bool Create( CGContextRef bitmapcontext); + + // Create a bitmap compatible with the given DC, inheriting its magnification factor + bool Create(int width, int height, const wxDC& dc); + + // Create a bitmap with a scale factor, width and height are multiplied with that factor + bool CreateScaled(int logwidth, int logheight, int depth, double logicalScale); + + // virtual bool Create( WXHICON icon) ; + virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); + virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = NULL) const; + + wxBitmapRefData *GetBitmapData() const + { return (wxBitmapRefData *)m_refData; } + + // copies the contents and mask of the given (colour) icon to the bitmap + virtual bool CopyFromIcon(const wxIcon& icon); + + int GetWidth() const; + int GetHeight() const; + int GetDepth() const; + void SetWidth(int w); + void SetHeight(int h); + void SetDepth(int d); + void SetOk(bool isOk); + +#if wxUSE_PALETTE + wxPalette* GetPalette() const; + void SetPalette(const wxPalette& palette); +#endif // wxUSE_PALETTE + + wxMask *GetMask() const; + void SetMask(wxMask *mask) ; + + static void InitStandardHandlers(); + + // raw bitmap access support functions, for internal use only + void *GetRawData(wxPixelDataBase& data, int bpp); + void UngetRawData(wxPixelDataBase& data); + + // these functions are internal and shouldn't be used, they risk to + // disappear in the future + bool HasAlpha() const; + void UseAlpha(); + + // returns the 'native' implementation, a GWorldPtr for the content and one for the mask + WXHBITMAP GetHBITMAP( WXHBITMAP * mask = NULL ) const; + + // returns a CGImageRef which must released after usage with CGImageRelease + CGImageRef CreateCGImage() const ; + +#if wxOSX_USE_COCOA + // returns an autoreleased version of the image + WX_NSImage GetNSImage() const; +#endif +#if wxOSX_USE_IPHONE + // returns an autoreleased version of the image + WX_UIImage GetUIImage() const; +#endif + // returns a IconRef which must be retained before and released after usage + IconRef GetIconRef() const; + // returns a IconRef which must be released after usage + IconRef CreateIconRef() const; + // get read only access to the underlying buffer + void *GetRawAccess() const ; + // brackets to the underlying OS structure for read/write access + // makes sure that no cached images will be constructed until terminated + void *BeginRawAccess() ; + void EndRawAccess() ; + + double GetScaleFactor() const; +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; +}; + +#endif // _WX_BITMAP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/bmpbuttn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/bmpbuttn.h new file mode 100644 index 0000000000..4a045fe0b6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/bmpbuttn.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/bmpbuttn.h +// Purpose: wxBitmapButton class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_BMPBUTTN_H_ +#define _WX_OSX_BMPBUTTN_H_ + +#include "wx/button.h" + +#define wxDEFAULT_BUTTON_MARGIN 4 + +class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase +{ +public: + wxBitmapButton() + { + SetMargins(wxDEFAULT_BUTTON_MARGIN, wxDEFAULT_BUTTON_MARGIN); + } + + wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, 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, wxWindowID id, const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + +protected: + + virtual wxSize DoGetBestSize() const; + + DECLARE_DYNAMIC_CLASS(wxBitmapButton) +}; + +#endif // _WX_OSX_BMPBUTTN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/brush.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/brush.h new file mode 100644 index 0000000000..dc04a09b3d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/brush.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/brush.h +// Purpose: wxBrush class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BRUSH_H_ +#define _WX_BRUSH_H_ + +#include "wx/gdicmn.h" +#include "wx/gdiobj.h" +#include "wx/bitmap.h" + +class WXDLLIMPEXP_FWD_CORE wxBrush; + +// Brush +class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase +{ +public: + wxBrush(); + wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) ); +#endif + wxBrush(const wxBitmap& stipple); + virtual ~wxBrush(); + + virtual void SetColour(const wxColour& col) ; + virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ; + virtual void SetStyle(wxBrushStyle style) ; + virtual void SetStipple(const wxBitmap& stipple) ; + + bool operator==(const wxBrush& brush) const; + bool operator!=(const wxBrush& brush) const { return !(*this == brush); } + + wxColour GetColour() const; + wxBrushStyle GetStyle() const ; + wxBitmap *GetStipple() const ; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxBrushStyle)style); } +#endif + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxBrush) +}; + +#endif // _WX_BRUSH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/button.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/button.h new file mode 100644 index 0000000000..8e8752288c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/button.h @@ -0,0 +1,95 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/button.h +// Purpose: wxButton class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_BUTTON_H_ +#define _WX_OSX_BUTTON_H_ + +#include "wx/control.h" +#include "wx/gdicmn.h" + +// Pushbutton +class WXDLLIMPEXP_CORE wxButton : public wxButtonBase +{ +public: + wxButton() {} + wxButton(wxWindow *parent, + wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + virtual void SetLabel(const wxString& label); + virtual wxWindow *SetDefault(); + virtual void Command(wxCommandEvent& event); + + // osx specific event handling common for all osx-ports + + virtual bool OSXHandleClicked( double timestampsec ); + +#if wxOSX_USE_COCOA + void OSXUpdateAfterLabelChange(const wxString& label); +#endif + +protected: + DECLARE_DYNAMIC_CLASS(wxButton) +}; + +// OS X specific class, not part of public wx API +class WXDLLIMPEXP_CORE wxDisclosureTriangle : public wxControl +{ +public: + wxDisclosureTriangle(wxWindow *parent, + wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxBORDER_NONE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxBORDER_NONE, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + void SetOpen( bool open ); + bool IsOpen() const; + + // osx specific event handling common for all osx-ports + + virtual bool OSXHandleClicked( double timestampsec ); + +protected: + virtual wxSize DoGetBestSize() const ; +}; + +#endif // _WX_OSX_BUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/chkconf.h new file mode 100644 index 0000000000..9c6bc30508 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/chkconf.h @@ -0,0 +1,44 @@ +/* + * Name: wx/osx/carbon/chkconf.h + * Purpose: Compiler-specific configuration checking + * Author: Julian Smart + * Modified by: + * Created: 01/02/97 + * Copyright: (c) Julian Smart + * Licence: wxWindows licence + */ + +#ifndef _WX_OSX_CARBON_CHKCONF_H_ +#define _WX_OSX_CARBON_CHKCONF_H_ + +/* + * native (1) or emulated (0) toolbar + * also support old notation wxMAC_USE_NATIVE_TOOLBAR + */ + + + +#ifdef wxMAC_USE_NATIVE_TOOLBAR + #define wxOSX_USE_NATIVE_TOOLBAR wxMAC_USE_NATIVE_TOOLBAR +#endif + +#ifndef wxOSX_USE_NATIVE_TOOLBAR + #define wxOSX_USE_NATIVE_TOOLBAR 1 +#endif + +/* + * text rendering system + */ + +#define wxOSX_USE_ATSU_TEXT 1 + +/* + * Audio System + */ + +#define wxOSX_USE_QUICKTIME 1 +#define wxOSX_USE_AUDIOTOOLBOX 0 + +#endif + /* _WX_OSX_CARBON_CHKCONF_H_ */ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/dataview.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/dataview.h new file mode 100644 index 0000000000..75185b092c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/dataview.h @@ -0,0 +1,478 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/dataview.h +// Purpose: wxDataViewCtrl native implementation header for carbon +// Author: +// Copyright: (c) 2009 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DATAVIEWCTRL_CARBON_H_ +#define _WX_DATAVIEWCTRL_CARBON_H_ + +#include "wx/defs.h" + +#if wxUSE_GUI + +#include "wx/osx/core/dataview.h" +#include "wx/osx/private.h" + +// ============================================================================ +// wxDataViewColumnNativeData +// ============================================================================ +class wxDataViewColumnNativeData +{ +public: +// +// constructors / destructor +// + wxDataViewColumnNativeData() + { + } + wxDataViewColumnNativeData(DataBrowserPropertyID initPropertyID) + :m_PropertyID(initPropertyID) + { + } + +// +// data access methods +// + DataBrowserPropertyID GetPropertyID() const + { + return m_PropertyID; + } + + void SetPropertyID(DataBrowserPropertyID newPropertyID) + { + m_PropertyID = newPropertyID; + } + +protected: +private: +// +// variables +// + DataBrowserPropertyID m_PropertyID; // each column is identified by its unique property ID (NOT by the column's index) +}; + +// ============================================================================ +// wxDataViewRendererNativeData +// ============================================================================ +class wxDataViewRendererNativeData +{ +public: +// +// constructors / destructor +// + wxDataViewRendererNativeData() + { + } + wxDataViewRendererNativeData(DataBrowserPropertyType initPropertyType, DataBrowserItemDataRef initItemDataRef=NULL) + :m_ItemDataRef(initItemDataRef), m_PropertyType(initPropertyType) + { + } + +// +// data access methods +// + DataBrowserItemDataRef GetItemDataRef() const + { + return m_ItemDataRef; + } + DataBrowserPropertyType GetPropertyType() const + { + return m_PropertyType; + } + + void SetItemDataRef(DataBrowserItemDataRef newItemDataRef) + { + m_ItemDataRef = newItemDataRef; + } + void SetPropertyType(DataBrowserPropertyType newPropertyType) + { + m_PropertyType = newPropertyType; + } + +protected: +private: +// +// variables +// + DataBrowserItemDataRef m_ItemDataRef; + + DataBrowserPropertyType m_PropertyType; +}; + +// ============================================================================ +// wxMacDataBrowserTableViewControl +// ============================================================================ +// +// This is a wrapper class for the Mac OS X data browser environment. +// It covers all data brower functionality for the native browser's list +// and column style. +// + +// data browser's property IDs have a reserved ID range from 0 - 1023 +// therefore, the first usable property ID is 'kMinPropertyID' +DataBrowserPropertyID const kMinPropertyID = 1024; + +// array of data browser item IDs +WX_DEFINE_ARRAY_SIZE_T(size_t,wxArrayDataBrowserItemID); + +class wxMacDataBrowserTableViewControl : public wxMacControl +{ +public: +// +// constructors / destructor +// + wxMacDataBrowserTableViewControl(wxWindow* peer, const wxPoint& pos, const wxSize& size, long style); + wxMacDataBrowserTableViewControl() + { + } + ~wxMacDataBrowserTableViewControl(); + +// +// callback handling +// + OSStatus SetCallbacks (DataBrowserCallbacks const* callbacks); + OSStatus SetCustomCallbacks(DataBrowserCustomCallbacks const* customCallbacks); + +// +// DnD handling +// + OSStatus EnableAutomaticDragTracking(bool enable=true); + +// +// header handling +// + OSStatus GetHeaderDesc(DataBrowserPropertyID property, DataBrowserListViewHeaderDesc* desc) const; + + OSStatus SetHeaderDesc(DataBrowserPropertyID property, DataBrowserListViewHeaderDesc* desc); + +// +// layout handling +// + OSStatus AutoSizeColumns(); + + OSStatus EnableCellSizeModification(bool enableHeight=true, bool enableWidth=true); // enables or disables the column width and row height modification (default: false) + + OSStatus GetAttributes (OptionBits* attributes); + OSStatus GetColumnWidth (DataBrowserPropertyID column, UInt16 *width ) const; // returns the column width in pixels + OSStatus GetDefaultColumnWidth(UInt16 *width ) const; // returns the default column width in pixels + OSStatus GetDefaultRowHeight (UInt16 * height ) const; + OSStatus GetHeaderButtonHeight(UInt16 *height ); + OSStatus GetPartBounds (DataBrowserItemID item, DataBrowserPropertyID property, DataBrowserPropertyPart part, Rect* bounds); + OSStatus GetRowHeight (DataBrowserItemID item , UInt16 *height) const; + OSStatus GetScrollPosition (UInt32* top, UInt32 *left) const; + + OSStatus SetAttributes (OptionBits attributes); + OSStatus SetColumnWidth(DataBrowserPropertyID column, UInt16 width); // sets the column width in pixels + OSStatus SetDefaultColumnWidth( UInt16 width ); + OSStatus SetDefaultRowHeight( UInt16 height ); + OSStatus SetHasScrollBars( bool horiz, bool vert ); + OSStatus SetHeaderButtonHeight( UInt16 height ); + OSStatus SetHiliteStyle(DataBrowserTableViewHiliteStyle hiliteStyle); + OSStatus SetIndent(float Indent); + OSStatus SetItemRowHeight( DataBrowserItemID item , UInt16 height); + OSStatus SetScrollPosition( UInt32 top , UInt32 left ); + +// +// column handling +// + OSStatus GetColumnCount (UInt32* numColumns) const; + OSStatus GetColumnIndex (DataBrowserPropertyID propertyID, DataBrowserTableViewColumnIndex* index) const; // returns for the passed property the corresponding column index + OSStatus GetFreePropertyID(DataBrowserPropertyID* propertyID) const; // this method returns a property id that is valid and currently not used; if it cannot be found 'errDataBrowerPropertyNotSupported' is returned + OSStatus GetPropertyFlags (DataBrowserPropertyID propertyID, DataBrowserPropertyFlags *flags ) const; + OSStatus GetPropertyID (DataBrowserItemDataRef itemData, DataBrowserPropertyID* propertyID) const; // returns for the passed item data reference the corresponding property ID + OSStatus GetPropertyID (DataBrowserTableViewColumnIndex index, DataBrowserPropertyID* propertyID) const; // returns for the passed column index the corresponding property ID + + OSStatus IsUsedPropertyID(DataBrowserPropertyID propertyID) const; // checks if passed property id is used by the control; no error is returned if the id exists + + OSStatus RemoveColumnByProperty(DataBrowserTableViewColumnID propertyID); + OSStatus RemoveColumnByIndex (DataBrowserTableViewColumnIndex index); + + OSStatus SetColumnIndex (DataBrowserPropertyID propertyID, DataBrowserTableViewColumnIndex index); + OSStatus SetDisclosureColumn(DataBrowserPropertyID propertyID, Boolean expandableRows=false); + OSStatus SetPropertyFlags (DataBrowserPropertyID propertyID, DataBrowserPropertyFlags flags); + +// +// item handling +// + OSStatus AddItem(DataBrowserItemID container, DataBrowserItemID const* itemID) // adds a single item + { + return AddItems(container,1,itemID,kDataBrowserItemNoProperty); + } + OSStatus AddItems(DataBrowserItemID container, UInt32 numItems, DataBrowserItemID const* items, DataBrowserPropertyID preSortProperty); // adds items to the data browser + + OSStatus GetFreeItemID(DataBrowserItemID* id) const; // this method returns an item id that is valid and currently not used; if it cannot be found 'errDataBrowserItemNotAdded' is returned + OSStatus GetItemCount (ItemCount* numItems) const + { + return GetItemCount(kDataBrowserNoItem,true,kDataBrowserItemAnyState,numItems); + } + OSStatus GetItemCount (DataBrowserItemID container, Boolean recurse, DataBrowserItemState state, ItemCount* numItems) const; + OSStatus GetItemID (DataBrowserTableViewRowIndex row, DataBrowserItemID* item) const; + OSStatus GetItems (DataBrowserItemID container, Boolean recurse, DataBrowserItemState state, Handle items) const; + OSStatus GetItemRow (DataBrowserItemID item, DataBrowserTableViewRowIndex* row) const; + OSStatus GetItemState (DataBrowserItemID item, DataBrowserItemState* state) const; + + OSStatus IsUsedItemID(DataBrowserItemID itemID) const; // checks if the passed id is in use + + OSStatus RevealItem(DataBrowserItemID item, DataBrowserPropertyID propertyID, DataBrowserRevealOptions options) const; + + OSStatus RemoveItem(DataBrowserItemID container, DataBrowserItemID const* itemID) // removes a single item + { + return RemoveItems(container,1,itemID,kDataBrowserItemNoProperty); + } + OSStatus RemoveItems(void) // removes all items + { + return RemoveItems(kDataBrowserNoItem,0,NULL,kDataBrowserItemNoProperty); + } + OSStatus RemoveItems(DataBrowserItemID container, UInt32 numItems, DataBrowserItemID const* items, DataBrowserPropertyID preSortProperty); + + OSStatus UpdateItem(DataBrowserItemID container, DataBrowserItemID const* item) // updates all columns of the passed item + { + return UpdateItems(container,1,item,kDataBrowserItemNoProperty,kDataBrowserItemNoProperty); + } + OSStatus UpdateItems(void) // updates all items + { + return UpdateItems(kDataBrowserNoItem,0,NULL,kDataBrowserItemNoProperty,kDataBrowserItemNoProperty); + } + OSStatus UpdateItems(DataBrowserItemID container, UInt32 numItems, DataBrowserItemID const* items, DataBrowserPropertyID preSortProperty, DataBrowserPropertyID propertyID) const; + +// +// item selection +// + size_t GetSelectedItemIDs(wxArrayDataBrowserItemID& itemIDs) const; // returns the number of selected item and the item IDs in the array + OSStatus GetSelectionAnchor(DataBrowserItemID *first, DataBrowserItemID *last) const; + OSStatus GetSelectionFlags (DataBrowserSelectionFlags* flags) const; + + bool IsItemSelected(DataBrowserItemID item) const; + + OSStatus SetSelectionFlags(DataBrowserSelectionFlags flags); + OSStatus SetSelectedItems (UInt32 numItems, DataBrowserItemID const* itemIDs, DataBrowserSetOption operation); + +// +// item sorting +// + OSStatus GetSortOrder (DataBrowserSortOrder* order) const; + OSStatus GetSortProperty(DataBrowserPropertyID* propertyID) const; + + OSStatus Resort(DataBrowserItemID container=kDataBrowserNoItem, Boolean sortChildren=true); + + OSStatus SetSortOrder (DataBrowserSortOrder order); + OSStatus SetSortProperty(DataBrowserPropertyID propertyID); + +// +// container handling +// + OSStatus CloseContainer(DataBrowserItemID containerID); + + OSStatus OpenContainer(DataBrowserItemID containerID); + +protected : +// +// standard callback functions +// + static pascal Boolean DataBrowserCompareProc (ControlRef browser, DataBrowserItemID itemOneID, DataBrowserItemID itemTwoID, DataBrowserPropertyID sortProperty); + static pascal void DataBrowserGetContextualMenuProc(ControlRef browser, MenuRef* menu, UInt32* helpType, CFStringRef* helpItemString, AEDesc* selection); + static pascal OSStatus DataBrowserGetSetItemDataProc (ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID property, DataBrowserItemDataRef itemData, Boolean getValue); + static pascal void DataBrowserItemNotificationProc (ControlRef browser, DataBrowserItemID itemID, DataBrowserItemNotification message, DataBrowserItemDataRef itemData); + + virtual Boolean DataBrowserCompareProc (DataBrowserItemID itemOneID, DataBrowserItemID itemTwoID, DataBrowserPropertyID sortProperty) = 0; + virtual void DataBrowserGetContextualMenuProc(MenuRef* menu, UInt32* helpType, CFStringRef* helpItemString, AEDesc* selection) = 0; + virtual OSStatus DataBrowserGetSetItemDataProc (DataBrowserItemID itemID, DataBrowserPropertyID property, DataBrowserItemDataRef itemData, Boolean getValue) = 0; + virtual void DataBrowserItemNotificationProc (DataBrowserItemID itemID, DataBrowserItemNotification message, DataBrowserItemDataRef itemData) = 0; + +// +// callback functions for customized types +// + static pascal void DataBrowserDrawItemProc(ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID propertyID, DataBrowserItemState state, Rect const* rectangle, SInt16 bitDepth, Boolean colorDevice); + static pascal Boolean DataBrowserEditItemProc(ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID propertyID, CFStringRef theString, Rect* maxEditTextRect, Boolean* shrinkToFit); + static pascal Boolean DataBrowserHitTestProc (ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Rect const* mouseRect); + static pascal DataBrowserTrackingResult DataBrowserTrackingProc(ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Point startPt, EventModifiers modifiers); + + virtual void DataBrowserDrawItemProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, DataBrowserItemState state, Rect const* rectangle, SInt16 bitDepth, Boolean colorDevice) = 0; + virtual Boolean DataBrowserEditItemProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, CFStringRef theString, Rect* maxEditTextRect, Boolean* shrinkToFit) = 0; + virtual Boolean DataBrowserHitTestProc (DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Rect const* mouseRect) = 0; + virtual DataBrowserTrackingResult DataBrowserTrackingProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Point startPt, EventModifiers modifiers) = 0; + +// +// callback functions for drag & drop +/// + static pascal Boolean DataBrowserAcceptDragProc (ControlRef browser, DragReference dragRef, DataBrowserItemID itemID); + static pascal Boolean DataBrowserAddDragItemProc(ControlRef browser, DragReference dragRef, DataBrowserItemID itemID, ItemReference* itemRef); + static pascal Boolean DataBrowserReceiveDragProc(ControlRef browser, DragReference dragRef, DataBrowserItemID itemID); + + virtual Boolean DataBrowserAcceptDragProc (DragReference dragRef, DataBrowserItemID itemID) = 0; + virtual Boolean DataBrowserAddDragItemProc(DragReference dragRef, DataBrowserItemID itemID, ItemReference* itemRef) = 0; + virtual Boolean DataBrowserReceiveDragProc(DragReference dragRef, DataBrowserItemID itemID) = 0; + +// +// event handler for hit testing +/// + void* m_macDataViewCtrlEventHandler; + +private: +// +// wxWidget internal stuff +// + DECLARE_ABSTRACT_CLASS(wxMacDataBrowserTableViewControl) +}; + +// ============================================================================ +// wxMacDataBrowserListViewControl +// ============================================================================ +// +// This class is a wrapper for the native browser's list view style. It expands +// the inherited functionality of the table view control class. +// The term list view is in this case Mac OS X specific and is not related +// to any wxWidget naming conventions. +// +class wxMacDataBrowserListViewControl : public wxMacDataBrowserTableViewControl +{ +public: +// +// constructors / destructor +// + wxMacDataBrowserListViewControl(wxWindow* peer, wxPoint const& pos, wxSize const& size, long style) : wxMacDataBrowserTableViewControl(peer,pos,size,style) + { + } + +// +// column handling +// + OSStatus AddColumn(DataBrowserListViewColumnDesc *columnDesc, DataBrowserTableViewColumnIndex position); + +protected: +private: +}; + + +// ============================================================================ +// wxMacDataViewDataBrowserListViewControl +// ============================================================================ +// +// This is the internal interface class between wxDataViewCtrl (wxWidget) and +// the native data browser (Mac OS X carbon). +// +class wxMacDataViewDataBrowserListViewControl : public wxMacDataBrowserListViewControl, public wxDataViewWidgetImpl +{ +public: +// +// constructors / destructor +// + wxMacDataViewDataBrowserListViewControl(wxWindow* peer, wxPoint const& pos, wxSize const& size, long style); + + // + // column related methods (inherited from wxDataViewWidgetImpl) + // + virtual bool ClearColumns (); + virtual bool DeleteColumn (wxDataViewColumn* columnPtr); + virtual void DoSetExpanderColumn(wxDataViewColumn const* columnPtr); + virtual wxDataViewColumn* GetColumn (unsigned int pos) const; + virtual int GetColumnPosition (wxDataViewColumn const* columnPtr) const; + virtual bool InsertColumn (unsigned int pos, wxDataViewColumn* columnPtr); + virtual void FitColumnWidthToContent(unsigned int WXUNUSED(pos)) { /*not implemented*/ } + + // + // item related methods (inherited from wxDataViewWidgetImpl) + // + virtual bool Add (wxDataViewItem const& parent, wxDataViewItem const& item); + virtual bool Add (wxDataViewItem const& parent, wxDataViewItemArray const& items); + virtual void Collapse (wxDataViewItem const& item); + virtual void EnsureVisible(wxDataViewItem const& item, wxDataViewColumn const* columnPtr); + virtual void Expand (wxDataViewItem const& item); + virtual unsigned int GetCount () const; + virtual wxRect GetRectangle (wxDataViewItem const& item, wxDataViewColumn const* columnPtr); + virtual bool IsExpanded (wxDataViewItem const& item) const; + virtual bool Reload (); + virtual bool Remove (wxDataViewItem const& parent, wxDataViewItem const& item); + virtual bool Remove (wxDataViewItem const& parent, wxDataViewItemArray const& item); + virtual bool Update (wxDataViewColumn const* columnPtr); + virtual bool Update (wxDataViewItem const& parent, wxDataViewItem const& item); + virtual bool Update (wxDataViewItem const& parent, wxDataViewItemArray const& items); + + // + // model related methods + // + virtual bool AssociateModel(wxDataViewModel* model); + + // + // selection related methods (inherited from wxDataViewWidgetImpl) + // + virtual wxDataViewItem GetCurrentItem() const; + virtual void SetCurrentItem(const wxDataViewItem& item); + virtual wxDataViewColumn *GetCurrentColumn() const; + virtual int GetSelectedItemsCount() const; + virtual int GetSelections(wxDataViewItemArray& sel) const; + virtual bool IsSelected (wxDataViewItem const& item) const; + virtual void Select (wxDataViewItem const& item); + virtual void SelectAll (); + virtual void Unselect (wxDataViewItem const& item); + virtual void UnselectAll (); + + // + // sorting related methods + // + virtual wxDataViewColumn* GetSortingColumn () const; + virtual void Resort (); + + // + // other methods (inherited from wxDataViewWidgetImpl) + // + virtual void DoSetIndent (int indent); + virtual void HitTest (wxPoint const& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const; + virtual void SetRowHeight(wxDataViewItem const& item, unsigned int height); + virtual void OnSize (); + + virtual void StartEditor( const wxDataViewItem & item, unsigned int column ); + + // + // other methods + // + wxDataViewCtrl* GetDataViewCtrl() const + { + return dynamic_cast<wxDataViewCtrl*>(GetWXPeer()); + } + +protected: +// +// standard callback functions (inherited from wxMacDataBrowserTableViewControl) +// + virtual Boolean DataBrowserCompareProc (DataBrowserItemID itemOneID, DataBrowserItemID itemTwoID, DataBrowserPropertyID sortProperty); + virtual void DataBrowserItemNotificationProc (DataBrowserItemID itemID, DataBrowserItemNotification message, DataBrowserItemDataRef itemData); + virtual void DataBrowserGetContextualMenuProc(MenuRef* menu, UInt32* helpType, CFStringRef* helpItemString, AEDesc* selection); + virtual OSStatus DataBrowserGetSetItemDataProc (DataBrowserItemID itemID, DataBrowserPropertyID propertyID, DataBrowserItemDataRef itemData, Boolean getValue); + +// +// callback functions for customized types (inherited from wxMacDataBrowserTableViewControl) +// + virtual void DataBrowserDrawItemProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, DataBrowserItemState state, Rect const* rectangle, SInt16 bitDepth, Boolean colorDevice); + virtual Boolean DataBrowserEditItemProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, CFStringRef theString, Rect* maxEditTextRect, Boolean* shrinkToFit); + virtual Boolean DataBrowserHitTestProc (DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Rect const* mouseRect); + virtual DataBrowserTrackingResult DataBrowserTrackingProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Point startPt, EventModifiers modifiers); + +// +// callback functions for drag & drop (inherited from wxMacDataBrowserTableViewControl) +// + virtual Boolean DataBrowserAcceptDragProc (DragReference dragRef, DataBrowserItemID itemID); + virtual Boolean DataBrowserAddDragItemProc(DragReference dragRef, DataBrowserItemID itemID, ItemReference* itemRef); + virtual Boolean DataBrowserReceiveDragProc(DragReference dragRef, DataBrowserItemID itemID); + +// +// drag & drop helper methods +// + wxDataFormat GetDnDDataFormat(wxDataObjectComposite* dataObjects); + wxDataObjectComposite* GetDnDDataObjects(DragReference dragRef, ItemReference itemRef) const; // create the data objects from the native dragged object + +// +// other methods +// + wxDataViewColumn* GetColumnPtr(DataBrowserPropertyID propertyID) const; // returns for the passed property the corresponding pointer to a column; NULL is returned if not found + +private: +}; + +typedef wxMacDataViewDataBrowserListViewControl* wxMacDataViewDataBrowserListViewControlPointer; + +#endif // WX_GUI +#endif // _WX_MACCARBONDATAVIEWCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/drawer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/drawer.h new file mode 100644 index 0000000000..6edb3921d4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/drawer.h @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/drawer.h +// Purpose: Drawer child window class. +// Drawer windows appear under their parent window and +// behave like a drawer, opening and closing to reveal +// content that does not need to be visible at all times. +// Author: Jason Bagley +// Modified by: +// Created: 2004-30-01 +// Copyright: (c) Jason Bagley; Art & Logic, Inc. +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DRAWERWINDOW_H_ +#define _WX_DRAWERWINDOW_H_ + +#include "wx/toplevel.h" + +// +// NB: This is currently a private undocumented class - +// it is stable, but the API is not and will change in the +// near future +// + +class WXDLLIMPEXP_ADV wxDrawerWindow : public wxTopLevelWindow +{ + DECLARE_DYNAMIC_CLASS(wxDrawerWindow) + +public: + + wxDrawerWindow(); + + wxDrawerWindow(wxWindow* parent, + wxWindowID id, + const wxString& title, + wxSize size = wxDefaultSize, + wxDirection edge = wxLEFT, + const wxString& name = wxT("drawerwindow")) + { + this->Create(parent, id, title, size, edge, name); + } + + virtual ~wxDrawerWindow(); + + // Create a drawer window. + // If parent is NULL, create as a tool window. + // If parent is not NULL, then wxTopLevelWindow::Attach this window to parent. + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + wxSize size = wxDefaultSize, + wxDirection edge = wxLEFT, + const wxString& name = wxFrameNameStr); + + bool Open(bool show = true); // open or close the drawer, possibility for async param, i.e. animate + bool Close() { return this->Open(false); } + bool IsOpen() const; + + // Set the edge of the parent where the drawer attaches. + bool SetPreferredEdge(wxDirection edge); + wxDirection GetPreferredEdge() const; + wxDirection GetCurrentEdge() const; // not necessarily the preferred, due to screen constraints +}; + +#endif // _WX_DRAWERWINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/evtloop.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/evtloop.h new file mode 100644 index 0000000000..f18c7c9494 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/evtloop.h @@ -0,0 +1,34 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/evtloop.h +// Purpose: declaration of wxEventLoop for wxMac +// Author: Vadim Zeitlin +// Modified by: +// Created: 2006-01-12 +// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_CARBON_EVTLOOP_H_ +#define _WX_MAC_CARBON_EVTLOOP_H_ + +struct OpaqueEventRef; +typedef OpaqueEventRef *EventRef; + +class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxCFEventLoop +{ +public: + wxGUIEventLoop(); + + virtual void WakeUp(); + +protected: + virtual int DoDispatchTimeout(unsigned long timeout); + + virtual void OSXDoRun(); + virtual void OSXDoStop(); + + virtual CFRunLoopRef CFGetCurrentRunLoop() const; +}; + +#endif // _WX_MAC_CARBON_EVTLOOP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/mimetype.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/mimetype.h new file mode 100644 index 0000000000..837275285a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/mimetype.h @@ -0,0 +1,117 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/mimetype.h +// Purpose: Mac Carbon implementation for wx mime-related classes +// Author: Ryan Norton +// Modified by: +// Created: 04/16/2005 +// Copyright: (c) 2005 Ryan Norton (<wxprojects@comcast.net>) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _MIMETYPE_IMPL_H +#define _MIMETYPE_IMPL_H + +#include "wx/defs.h" +#include "wx/mimetype.h" + + +class wxMimeTypesManagerImpl +{ +public : + //kinda kooky but in wxMimeTypesManager::EnsureImpl it doesn't call + //intialize, so we do it ourselves + wxMimeTypesManagerImpl() : m_hIC(NULL) { Initialize(); } + ~wxMimeTypesManagerImpl() { ClearData(); } + + // load all data into memory - done when it is needed for the first time + void Initialize(int mailcapStyles = wxMAILCAP_STANDARD, + const wxString& extraDir = wxEmptyString); + + // and delete the data here + void ClearData(); + + // implement containing class functions + wxFileType *GetFileTypeFromExtension(const wxString& ext); + wxFileType *GetOrAllocateFileTypeFromExtension(const wxString& ext) ; + wxFileType *GetFileTypeFromMimeType(const wxString& mimeType); + + size_t EnumAllFileTypes(wxArrayString& mimetypes); + + void AddFallback(const wxFileTypeInfo& ft) { m_fallbacks.Add(ft); } + + // create a new filetype association + wxFileType *Associate(const wxFileTypeInfo& ftInfo); + // remove association + bool Unassociate(wxFileType *ft); + +private: + wxArrayFileTypeInfo m_fallbacks; + void* m_hIC; + void** m_hDatabase; + long m_lCount; + + void* pReserved1; + void* pReserved2; + void* pReserved3; + void* pReserved4; + void* pReserved5; + void* pReserved6; + + friend class wxFileTypeImpl; +}; + +class wxFileTypeImpl +{ +public: + //kind of nutty, but mimecmn.cpp creates one with an empty new + wxFileTypeImpl() : m_manager(NULL) {} + ~wxFileTypeImpl() {} //for those broken compilers + + // implement accessor functions + bool GetExtensions(wxArrayString& extensions); + bool GetMimeType(wxString *mimeType) const; + bool GetMimeTypes(wxArrayString& mimeTypes) const; + bool GetIcon(wxIconLocation *iconLoc) const; + bool GetDescription(wxString *desc) const; + bool GetOpenCommand(wxString *openCmd, + const wxFileType::MessageParameters&) const; + bool GetPrintCommand(wxString *printCmd, + const wxFileType::MessageParameters&) const; + + size_t GetAllCommands(wxArrayString * verbs, wxArrayString * commands, + const wxFileType::MessageParameters& params) const; + + // remove the record for this file type + // probably a mistake to come here, use wxMimeTypesManager.Unassociate (ft) instead + bool Unassociate(wxFileType *ft) + { + return m_manager->Unassociate(ft); + } + + // set an arbitrary command, ask confirmation if it already exists and + // overwriteprompt is TRUE + bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = true); + bool SetDefaultIcon(const wxString& strIcon = wxEmptyString, int index = 0); + + private: + void Init(wxMimeTypesManagerImpl *manager, long lIndex) + { m_manager=(manager); m_lIndex=(lIndex); } + + // helper function + wxString GetCommand(const wxString& verb) const; + + wxMimeTypesManagerImpl *m_manager; + long m_lIndex; + + void* pReserved1; + void* pReserved2; + void* pReserved3; + void* pReserved4; + void* pReserved5; + void* pReserved6; + + friend class wxMimeTypesManagerImpl; +}; + +#endif + //_MIMETYPE_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private.h new file mode 100644 index 0000000000..64fa447e14 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private.h @@ -0,0 +1,1045 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/private.h +// Purpose: Private declarations: as this header is only included by +// wxWidgets itself, it may contain identifiers which don't start +// with "wx". +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_H_ +#define _WX_PRIVATE_H_ + +#if wxUSE_GUI + +#include "wx/osx/uma.h" + +#include "wx/listbox.h" +#include "wx/osx/dc.h" +#include "wx/osx/dcclient.h" +#include "wx/osx/dcmemory.h" + +// app.h + +#endif // wxUSE_GUI + +// filefn.h +WXDLLIMPEXP_BASE wxString wxMacFSSpec2MacFilename( const FSSpec *spec ); +WXDLLIMPEXP_BASE void wxMacFilename2FSSpec( const wxString &path , FSSpec *spec ); + +// utils.h +WXDLLIMPEXP_BASE wxString wxMacFindFolderNoSeparator(short vRefNum, + OSType folderType, + Boolean createFolder); +WXDLLIMPEXP_BASE wxString wxMacFindFolder(short vRefNum, + OSType folderType, + Boolean createFolder); + +template<typename T> EventParamType wxMacGetEventParamType() { wxFAIL_MSG( wxT("Unknown Param Type") ); return 0; } +template<> inline EventParamType wxMacGetEventParamType<HIShapeRef>() { return typeHIShapeRef; } +template<> inline EventParamType wxMacGetEventParamType<RgnHandle>() { return typeQDRgnHandle; } +template<> inline EventParamType wxMacGetEventParamType<ControlRef>() { return typeControlRef; } +template<> inline EventParamType wxMacGetEventParamType<WindowRef>() { return typeWindowRef; } +template<> inline EventParamType wxMacGetEventParamType<MenuRef>() { return typeMenuRef; } +template<> inline EventParamType wxMacGetEventParamType<EventRef>() { return typeEventRef; } +template<> inline EventParamType wxMacGetEventParamType<Point>() { return typeQDPoint; } +template<> inline EventParamType wxMacGetEventParamType<Rect>() { return typeQDRectangle; } +template<> inline EventParamType wxMacGetEventParamType<Boolean>() { return typeBoolean; } +template<> inline EventParamType wxMacGetEventParamType<SInt16>() { return typeSInt16; } +template<> inline EventParamType wxMacGetEventParamType<SInt32>() { return typeSInt32; } +template<> inline EventParamType wxMacGetEventParamType<UInt32>() { return typeUInt32; } +template<> inline EventParamType wxMacGetEventParamType<RGBColor>() { return typeRGBColor; } +template<> inline EventParamType wxMacGetEventParamType<HICommand>() { return typeHICommand; } +template<> inline EventParamType wxMacGetEventParamType<HIPoint>() { return typeHIPoint; } +template<> inline EventParamType wxMacGetEventParamType<HISize>() { return typeHISize; } +template<> inline EventParamType wxMacGetEventParamType<HIRect>() { return typeHIRect; } +template<> inline EventParamType wxMacGetEventParamType<void*>() { return typeVoidPtr; } +template<> inline EventParamType wxMacGetEventParamType<CFDictionaryRef>() { return typeCFDictionaryRef; } +template<> inline EventParamType wxMacGetEventParamType<Collection>() { return typeCollection; } +template<> inline EventParamType wxMacGetEventParamType<CGContextRef>() { return typeCGContextRef; } +/* + These are ambiguous + template<> EventParamType wxMacGetEventParamType<GrafPtr>() { return typeGrafPtr; } + template<> EventParamType wxMacGetEventParamType<OSStatus>() { return typeOSStatus; } + template<> EventParamType wxMacGetEventParamType<CFIndex>() { return typeCFIndex; } + template<> EventParamType wxMacGetEventParamType<GWorldPtr>() { return typeGWorldPtr; } + */ + +class WXDLLIMPEXP_CORE wxMacCarbonEvent +{ + +public : + wxMacCarbonEvent() + { + m_eventRef = 0; + m_release = false; + } + + wxMacCarbonEvent( EventRef event , bool release = false ) + { + m_eventRef = event; + m_release = release; + } + + wxMacCarbonEvent(UInt32 inClassID,UInt32 inKind,EventTime inWhen = 0 /*now*/,EventAttributes inAttributes=kEventAttributeNone) + { + m_eventRef = NULL; + verify_noerr( MacCreateEvent( NULL , inClassID, inKind,inWhen,inAttributes,&m_eventRef) ); + m_release = true; + } + + ~wxMacCarbonEvent() + { + if ( m_release ) + ReleaseEvent( m_eventRef ); + } + + OSStatus Create(UInt32 inClassID,UInt32 inKind,EventTime inWhen = 0 /*now*/,EventAttributes inAttributes=kEventAttributeNone) + { + verify( (m_eventRef == NULL) || m_release ); + if ( m_eventRef && m_release ) + { + ReleaseEvent( m_eventRef ); + m_release = false; + m_eventRef = NULL; + } + OSStatus err = MacCreateEvent( NULL , inClassID, inKind,inWhen,inAttributes,&m_eventRef); + if ( err == noErr ) + m_release = true; + return err; + } + + OSStatus GetParameter( EventParamName inName, EventParamType inDesiredType, UInt32 inBufferSize, void * outData); + + template <typename T> OSStatus GetParameter( EventParamName inName, EventParamType type , T *data ) + { + return GetParameter( inName, type , sizeof( T ) , data ); + } + template <typename T> OSStatus GetParameter( EventParamName inName, T *data ) + { + return GetParameter<T>( inName, wxMacGetEventParamType<T>() , data ); + } + + template <typename T> T GetParameter( EventParamName inName ) + { + T value; + verify_noerr( GetParameter<T>( inName, &value ) ); + return value; + } + template <typename T> T GetParameter( EventParamName inName, EventParamType inDesiredType ) + { + T value; + verify_noerr( GetParameter<T>( inName, inDesiredType , &value ) ); + return value; + } + + OSStatus SetParameter( EventParamName inName, EventParamType inType, UInt32 inSize, const void * inData); + template <typename T> OSStatus SetParameter( EventParamName inName, EventParamType inDesiredType , const T *data ) + { + return SetParameter( inName, inDesiredType , sizeof( T ) , data ); + } + template <typename T> OSStatus SetParameter( EventParamName inName, EventParamType inDesiredType , const T& data ) + { + return SetParameter<T>( inName, inDesiredType , &data ); + } + template <typename T> OSStatus SetParameter( EventParamName inName, const T *data ) + { + return SetParameter<T>( inName, wxMacGetEventParamType<T>() , data ); + } + template <typename T> OSStatus SetParameter( EventParamName inName, const T& data ) + { + return SetParameter<T>( inName, wxMacGetEventParamType<T>() , &data ); + } + UInt32 GetClass() + { + return ::GetEventClass( m_eventRef ); + } + UInt32 GetKind() + { + return ::GetEventKind( m_eventRef ); + } + EventTime GetTime() + { + return ::GetEventTime( m_eventRef ); + } + UInt32 GetTicks() + { + return EventTimeToTicks( GetTime() ); + } + OSStatus SetCurrentTime( ) + { + return ::SetEventTime( m_eventRef , GetCurrentEventTime() ); + } + OSStatus SetTime( EventTime when ) + { + return ::SetEventTime( m_eventRef , when ); + } + operator EventRef () { return m_eventRef; } + + bool IsValid() { return m_eventRef != 0; } +protected : + EventRef m_eventRef; + bool m_release; +}; + +#if wxUSE_GUI + +class WXDLLIMPEXP_FWD_CORE wxMacToolTipTimer ; + +class WXDLLIMPEXP_CORE wxMacToolTip +{ +public : + wxMacToolTip() ; + ~wxMacToolTip() ; + + void Setup( WindowRef window , const wxString& text , const wxPoint& localPosition ) ; + void Draw() ; + void Clear() ; + + long GetMark() + { return m_mark ; } + + bool IsShown() + { return m_shown ; } + +private : + wxString m_label ; + wxPoint m_position ; + Rect m_rect ; + WindowRef m_window ; + PicHandle m_backpict ; + bool m_shown ; + long m_mark ; +#if wxUSE_TIMER + wxMacToolTipTimer* m_timer ; +#endif + wxCFStringRef m_helpTextRef ; +} ; + +// Quartz + +WXDLLIMPEXP_CORE void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType = 0 ); +WXDLLIMPEXP_CORE void wxMacReleaseBitmapButton( ControlButtonContentInfo*info ); + +#define MAC_WXHBITMAP(a) (GWorldPtr(a)) +#define MAC_WXHMETAFILE(a) (PicHandle(a)) +#define MAC_WXHICON(a) (IconRef(a)) +#define MAC_WXHCURSOR(a) (CursHandle(a)) +#define MAC_WXHRGN(a) (RgnHandle(a)) +#define MAC_WXHWND(a) (WindowPtr(a)) +#define MAC_WXRECPTR(a) ((Rect*)a) +#define MAC_WXPOINTPTR(a) ((Point*)a) +#define MAC_WXHMENU(a) ((MenuHandle)a) + +struct wxOpaqueWindowRef +{ + wxOpaqueWindowRef( WindowRef ref ) { m_data = ref; } + operator WindowRef() { return m_data; } +private : + WindowRef m_data; +}; + +WXDLLIMPEXP_CORE void wxMacRectToNative( const wxRect *wx , Rect *n ); +WXDLLIMPEXP_CORE void wxMacNativeToRect( const Rect *n , wxRect* wx ); +WXDLLIMPEXP_CORE void wxMacPointToNative( const wxPoint* wx , Point *n ); +WXDLLIMPEXP_CORE void wxMacNativeToPoint( const Point *n , wxPoint* wx ); + +WXDLLIMPEXP_CORE wxMenu* wxFindMenuFromMacMenu(MenuRef inMenuRef); + +WXDLLIMPEXP_CORE int wxMacCommandToId( UInt32 macCommandId ); +WXDLLIMPEXP_CORE UInt32 wxIdToMacCommand( int wxId ); +WXDLLIMPEXP_CORE wxMenu* wxFindMenuFromMacCommand( const HICommand &macCommandId , wxMenuItem* &item ); + +WXDLLIMPEXP_CORE pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data ); +WXDLLIMPEXP_CORE Rect wxMacGetBoundsForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin = true ); + +ControlActionUPP GetwxMacLiveScrollbarActionProc(); + +// additional optional event defines + +class WXDLLIMPEXP_CORE wxMacControl : public wxWidgetImpl +{ +public : + wxMacControl( wxWindowMac* peer , bool isRootControl = false, bool isUserPane = false ); + wxMacControl() ; + virtual ~wxMacControl(); + + void Init(); + + void SetReferenceInNativeControl(); + static wxMacControl* GetReferenceFromNativeControl(ControlRef control); + + virtual ControlRef * GetControlRefAddr() { return &m_controlRef; } + virtual ControlRef GetControlRef() const { return m_controlRef; } + + virtual WXWidget GetWXWidget() const { return (WXWidget) m_controlRef; } + + virtual bool IsVisible() const; + + virtual void Raise(); + + virtual void Lower(); + + virtual void ScrollRect( const wxRect *rect, int dx, int dy ); + + virtual void GetContentArea( int &left , int &top , int &width , int &height ) const; + virtual void Move(int x, int y, int width, int height); + virtual void GetPosition( int &x, int &y ) const; + virtual void GetSize( int &width, int &height ) const; + virtual void SetControlSize( wxWindowVariant variant ) ; + + // where is in native window relative coordinates + virtual void SetNeedsDisplay( const wxRect* where = NULL ); + virtual bool GetNeedsDisplay() const; + + virtual bool CanFocus() const; + // return true if successful + virtual bool SetFocus(); + virtual bool HasFocus() const; + + void RemoveFromParent(); + void Embed( wxWidgetImpl *parent ); + + void SetDefaultButton( bool isDefault ); + void PerformClick(); + void SetLabel( const wxString& title, wxFontEncoding encoding ); + + void SetCursor( const wxCursor & cursor ); + void CaptureMouse(); + void ReleaseMouse(); + + wxInt32 GetValue() const; + void SetValue( wxInt32 v ); + wxBitmap GetBitmap() const; + void SetBitmap( const wxBitmap& bitmap ); + void SetBitmapPosition( wxDirection dir ); + + void GetBestRect( wxRect *r ) const; + bool IsEnabled() const; + void Enable( bool enable ); + bool ButtonClickDidStateChange() { return false ;} + void SetMinimum( wxInt32 v ); + void SetMaximum( wxInt32 v ); + void PulseGauge() ; + void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ); + + // temp convenience methods + + void GetBestRect( Rect *r ) const; + /* + void operator= (ControlRef c) { m_controlRef = c; } + operator ControlRef () { return m_controlRef; } + operator ControlRef * () { return &m_controlRef; } + */ + // accessing data and values + + virtual OSStatus SetData( ControlPartCode inPartCode , ResType inTag , Size inSize , const void * inData ); + virtual OSStatus GetData( ControlPartCode inPartCode , ResType inTag , Size inBufferSize , void * inOutBuffer , Size * outActualSize ) const; + virtual OSStatus GetDataSize( ControlPartCode inPartCode , ResType inTag , Size * outActualSize ) const; + virtual OSStatus SendEvent( EventRef ref , OptionBits inOptions = 0 ); + virtual OSStatus SendHICommand( HICommand &command , OptionBits inOptions = 0 ); + + virtual OSStatus SendHICommand( UInt32 commandID , OptionBits inOptions = 0 ); + + virtual wxInt32 GetMaximum() const; + virtual wxInt32 GetMinimum() const; + + virtual void SetValueAndRange( SInt32 value , SInt32 minimum , SInt32 maximum ); + virtual void SetRange( SInt32 minimum , SInt32 maximum ); + + // templated helpers + + Size GetDataSize( ControlPartCode inPartCode , ResType inTag ) const + { + Size sz; + verify_noerr( GetDataSize( inPartCode , inTag , &sz ) ); + return sz; + } + template <typename T> OSStatus SetData( ControlPartCode inPartCode , ResType inTag , const T *data ) + { + return SetData( inPartCode , inTag , sizeof( T ) , data ); + } + template <typename T> OSStatus SetData( ControlPartCode inPartCode , ResType inTag , const T& data ) + { + return SetData( inPartCode , inTag , sizeof( T ) , &data ); + } + template <typename T> OSStatus SetData( ResType inTag , const T *data ) + { + return SetData( kControlEntireControl , inTag , sizeof( T ) , data ); + } + template <typename T> OSStatus SetData( ResType inTag , const T& data ) + { + return SetData( kControlEntireControl , inTag , sizeof( T ) , &data ); + } + template <typename T> OSStatus GetData( ControlPartCode inPartCode , ResType inTag , T *data ) const + { + Size dummy; + return GetData( inPartCode , inTag , sizeof( T ) , data , &dummy ); + } + template <typename T> T GetData( ControlPartCode inPartCode , ResType inTag ) const + { + T value; + OSStatus err = GetData<T>( inPartCode , inTag , &value ); + + if ( err != noErr ) + { + wxFAIL_MSG( wxString::Format(wxT("GetData Failed for Part [%i] and Tag [%i]"), + inPartCode, (int)inTag) ); + } + + return value; + } + template <typename T> OSStatus GetData( ResType inTag , T *data ) const + { + Size dummy; + return GetData( kControlEntireControl , inTag , sizeof( T ) , data , &dummy ); + } + template <typename T> T GetData( ResType inTag ) const + { + return GetData<T>( kControlEntireControl , inTag ); + } + + // Flash the control for the specified amount of time + + virtual void VisibilityChanged( bool shown ); + virtual void SuperChangedPosition(); + + + virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ); + virtual void SetBackgroundColour( const wxColour& col ); + virtual bool SetBackgroundStyle(wxBackgroundStyle style); + virtual ControlPartCode HandleKey( SInt16 keyCode, SInt16 charCode, EventModifiers modifiers ); + void SetActionProc( ControlActionUPP actionProc ); + SInt32 GetViewSize() const; + + virtual void SetVisibility( bool visible ); + + virtual bool IsActive() const; + + // invalidates this control and all children + virtual void InvalidateWithChildren(); + virtual void SetDrawingEnabled( bool enable ); + + // in native parent window relative coordinates + + virtual void GetRectInWindowCoords( Rect *r ); + + + virtual void GetFeatures( UInt32 *features ); + + // to be moved into a tab control class + + virtual OSStatus SetTabEnabled( SInt16 tabNo , bool enable ); + + virtual void InstallEventHandler( WXWidget control = NULL ); +protected : + WXEVENTHANDLERREF m_macControlEventHandler ; + ControlRef m_controlRef; + wxFont m_font; + long m_windowStyle; + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacControl) +}; + +// ============================================================================ +// DataBrowser Wrapper +// ============================================================================ +// +// basing on DataBrowserItemIDs +// + +class WXDLLIMPEXP_CORE wxMacDataBrowserControl : public wxMacControl +{ +public : + wxMacDataBrowserControl( wxWindow* peer, const wxPoint& pos, const wxSize& size, long style); + wxMacDataBrowserControl() {} + + OSStatus SetCallbacks( const DataBrowserCallbacks *callbacks ); + + OSStatus GetItemCount( DataBrowserItemID container, + Boolean recurse, + DataBrowserItemState state, + ItemCount *numItems) const; + + OSStatus GetItems( DataBrowserItemID container, + Boolean recurse, + DataBrowserItemState state, + Handle items) const; + + + OSStatus AddColumn( DataBrowserListViewColumnDesc *columnDesc, + DataBrowserTableViewColumnIndex position ); + + OSStatus RemoveColumn( DataBrowserTableViewColumnIndex position ); + + OSStatus AutoSizeColumns(); + + OSStatus SetHasScrollBars( bool horiz, bool vert ); + OSStatus SetHiliteStyle( DataBrowserTableViewHiliteStyle hiliteStyle ); + + OSStatus SetHeaderButtonHeight( UInt16 height ); + OSStatus GetHeaderButtonHeight( UInt16 *height ); + + OSStatus UpdateItems( DataBrowserItemID container, UInt32 numItems, + const DataBrowserItemID *items, + DataBrowserPropertyID preSortProperty, + DataBrowserPropertyID propertyID ) const; + + OSStatus AddItems( DataBrowserItemID container, UInt32 numItems, + const DataBrowserItemID *items, + DataBrowserPropertyID preSortProperty ); + OSStatus RemoveItems( DataBrowserItemID container, UInt32 numItems, + const DataBrowserItemID *items, + DataBrowserPropertyID preSortProperty ); + OSStatus RevealItem( DataBrowserItemID item, + DataBrowserPropertyID propertyID, + DataBrowserRevealOptions options ) const; + + OSStatus SetSelectionFlags( DataBrowserSelectionFlags ); + OSStatus GetSelectionAnchor( DataBrowserItemID *first, DataBrowserItemID *last ) const; + bool IsItemSelected( DataBrowserItemID item ) const; + OSStatus SetSelectedItems( UInt32 numItems, + const DataBrowserItemID *items, + DataBrowserSetOption operation ); + + OSStatus GetItemID( DataBrowserTableViewRowIndex row, + DataBrowserItemID * item ) const; + OSStatus GetItemRow( DataBrowserItemID item, + DataBrowserTableViewRowIndex * row ) const; + + OSStatus SetDefaultRowHeight( UInt16 height ); + OSStatus GetDefaultRowHeight( UInt16 * height ) const; + + OSStatus SetRowHeight( DataBrowserItemID item , UInt16 height); + OSStatus GetRowHeight( DataBrowserItemID item , UInt16 *height) const; + + OSStatus GetColumnWidth( DataBrowserPropertyID column , UInt16 *width ) const; + OSStatus SetColumnWidth( DataBrowserPropertyID column , UInt16 width ); + + OSStatus GetDefaultColumnWidth( UInt16 *width ) const; + OSStatus SetDefaultColumnWidth( UInt16 width ); + + OSStatus GetColumnCount( UInt32* numColumns) const; + + OSStatus GetColumnIDFromIndex( DataBrowserTableViewColumnIndex position, DataBrowserTableViewColumnID* id ); + + OSStatus GetColumnPosition( DataBrowserPropertyID column, DataBrowserTableViewColumnIndex *position) const; + OSStatus SetColumnPosition( DataBrowserPropertyID column, DataBrowserTableViewColumnIndex position); + + OSStatus GetScrollPosition( UInt32 *top , UInt32 *left ) const; + OSStatus SetScrollPosition( UInt32 top , UInt32 left ); + + OSStatus GetSortProperty( DataBrowserPropertyID *column ) const; + OSStatus SetSortProperty( DataBrowserPropertyID column ); + + OSStatus GetSortOrder( DataBrowserSortOrder *order ) const; + OSStatus SetSortOrder( DataBrowserSortOrder order ); + + OSStatus GetPropertyFlags( DataBrowserPropertyID property, DataBrowserPropertyFlags *flags ) const; + OSStatus SetPropertyFlags( DataBrowserPropertyID property, DataBrowserPropertyFlags flags ); + + OSStatus GetHeaderDesc( DataBrowserPropertyID property, DataBrowserListViewHeaderDesc *desc ) const; + OSStatus SetHeaderDesc( DataBrowserPropertyID property, DataBrowserListViewHeaderDesc *desc ); + + OSStatus SetDisclosureColumn( DataBrowserPropertyID property , Boolean expandableRows ); + + OSStatus GetItemPartBounds( DataBrowserItemID item, DataBrowserPropertyID property, DataBrowserPropertyPart part, Rect * bounds ); +protected : + + static pascal void DataBrowserItemNotificationProc( + ControlRef browser, + DataBrowserItemID itemID, + DataBrowserItemNotification message, + DataBrowserItemDataRef itemData ); + + virtual void ItemNotification( + DataBrowserItemID itemID, + DataBrowserItemNotification message, + DataBrowserItemDataRef itemData) = 0; + + static pascal OSStatus DataBrowserGetSetItemDataProc( + ControlRef browser, + DataBrowserItemID itemID, + DataBrowserPropertyID property, + DataBrowserItemDataRef itemData, + Boolean changeValue ); + + virtual OSStatus GetSetItemData( + DataBrowserItemID itemID, + DataBrowserPropertyID property, + DataBrowserItemDataRef itemData, + Boolean changeValue ) = 0; + + static pascal Boolean DataBrowserCompareProc( + ControlRef browser, + DataBrowserItemID itemOneID, + DataBrowserItemID itemTwoID, + DataBrowserPropertyID sortProperty); + + virtual Boolean CompareItems(DataBrowserItemID itemOneID, + DataBrowserItemID itemTwoID, + DataBrowserPropertyID sortProperty) = 0; + DECLARE_ABSTRACT_CLASS(wxMacDataBrowserControl) +}; + +// ============================================================================ +// Higher-level Databrowser +// ============================================================================ +// +// basing on data item objects +// + +// forward decl + +class wxMacDataItemBrowserControl; +class wxMacListBoxItem; + +const DataBrowserPropertyID kTextColumnId = 1024; +const DataBrowserPropertyID kNumericOrderColumnId = 1025; + +// for multi-column controls, we will use this + the column ID to identify the +// column. We don't use kTextColumnId there, and ideally the two should merge. +const DataBrowserPropertyID kMinColumnId = 1050; + +// base API for high-level databrowser operations + +// base class for databrowser items + +enum DataItemType { + DataItem_Text +}; + +/* +class WXDLLIMPEXP_CORE wxMacDataItem +{ +public : + wxMacDataItem(); + virtual ~wxMacDataItem(); +} ; +*/ + +class WXDLLIMPEXP_CORE wxMacDataItem +{ +public : + wxMacDataItem(); + virtual ~wxMacDataItem(); + + virtual bool IsLessThan(wxMacDataItemBrowserControl *owner , + const wxMacDataItem*, + DataBrowserPropertyID property) const; + + // returns true if access was successful, otherwise false + virtual OSStatus GetSetData(wxMacDataItemBrowserControl *owner , + DataBrowserPropertyID property, + DataBrowserItemDataRef itemData, + bool changeValue ); + + virtual void Notification(wxMacDataItemBrowserControl *owner , + DataBrowserItemNotification message, + DataBrowserItemDataRef itemData ) const; + + void SetOrder( SInt32 order ); + SInt32 GetOrder() const; + +protected : + SInt32 m_order; + +}; + +enum ListSortOrder { + SortOrder_None, + SortOrder_Text_Ascending, + SortOrder_Text_Descending +}; + +typedef wxMacDataItem* wxMacDataItemPtr; +const wxMacDataItemPtr wxMacDataBrowserRootContainer = NULL; +typedef void * wxListColumnId ; + +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxMacDataItemPtr, wxArrayMacDataItemPtr, class WXDLLIMPEXP_CORE); + +class WXDLLIMPEXP_CORE wxMacDataItemBrowserControl : public wxMacDataBrowserControl +{ +public : + wxMacDataItemBrowserControl( wxWindow* peer , const wxPoint& pos, const wxSize& size, long style); + wxMacDataItemBrowserControl() {} + // create a list item (can be a subclass of wxMacListBoxItem) + + unsigned int GetItemCount(const wxMacDataItem* container, bool recurse , DataBrowserItemState state) const; + void GetItems(const wxMacDataItem* container, bool recurse , + DataBrowserItemState state, wxArrayMacDataItemPtr &items ) const; + + unsigned int GetSelectedItemCount( const wxMacDataItem* container, bool recurse ) const; + + unsigned int GetLineFromItem(const wxMacDataItem *item) const; + wxMacDataItem * GetItemFromLine(unsigned int n) const; + + void UpdateItem(const wxMacDataItem *container, const wxMacDataItem *item, + DataBrowserPropertyID property) const; + void UpdateItems(const wxMacDataItem *container, wxArrayMacDataItemPtr &items, + DataBrowserPropertyID property) const; + + void InsertColumn(int colId, DataBrowserPropertyType colType, + const wxString& title, SInt16 just = teFlushDefault, int defaultWidth = -1); + + int GetColumnWidth(int colId); + void SetColumnWidth(int colId, int width); + + void AddItem(wxMacDataItem *container, wxMacDataItem *item); + void AddItems(wxMacDataItem *container, wxArrayMacDataItemPtr &items ); + + void RemoveAllItems(wxMacDataItem *container); + void RemoveItem(wxMacDataItem *container, wxMacDataItem* item); + void RemoveItems(wxMacDataItem *container, wxArrayMacDataItemPtr &items); + + void SetSelectedItem( wxMacDataItem* item , DataBrowserSetOption option); + void SetSelectedItems( wxArrayMacDataItemPtr &items , DataBrowserSetOption option); + void SetSelectedAllItems( DataBrowserSetOption option); + Boolean IsItemSelected( const wxMacDataItem* item) const; + + void RevealItem( wxMacDataItem* item, DataBrowserRevealOptions options); + + void GetSelectionAnchor( wxMacDataItemPtr* first , wxMacDataItemPtr* last) const; + + // add and remove + + virtual void MacDelete( unsigned int n ); + virtual void MacInsert( unsigned int n, wxMacDataItem* item); + virtual void MacClear(); + + // accessing content + + virtual unsigned int MacGetCount() const; + +public : + + // as we are getting the same events for human and API selection we have to suppress + // events in the latter case, since this will be used from many subclasses we keep it here + + bool IsSelectionSuppressed() const { return m_suppressSelection; } + bool SuppressSelection( bool suppress ); + + // client data + + virtual wxClientDataType GetClientDataType() const; + virtual void SetClientDataType(wxClientDataType clientDataItemsType); + //virtual ListSortOrder GetSortOrder() const; + //virtual void SetSortOrder(const ListSortOrder sort); + + + +protected: + + ListSortOrder m_sortOrder; + wxClientDataType m_clientDataItemsType; + + // ID aware base methods, should be 'final' ie not changed in subclasses + + virtual Boolean CompareItems(DataBrowserItemID itemOneID, + DataBrowserItemID itemTwoID, + DataBrowserPropertyID sortProperty); + + virtual OSStatus GetSetItemData(DataBrowserItemID itemID, + DataBrowserPropertyID property, + DataBrowserItemDataRef itemData, + Boolean changeValue ); + + virtual void ItemNotification( + DataBrowserItemID itemID, + DataBrowserItemNotification message, + DataBrowserItemDataRef itemData); + + +private : + + bool m_suppressSelection; + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacDataItemBrowserControl) +}; + +class WXDLLIMPEXP_CORE wxMacDataItemBrowserSelectionSuppressor +{ +public : + wxMacDataItemBrowserSelectionSuppressor(wxMacDataItemBrowserControl *browser); + ~wxMacDataItemBrowserSelectionSuppressor(); + +private : + + bool m_former; + wxMacDataItemBrowserControl* m_browser; +}; + +// ============================================================================ +// platform listbox implementation +// ============================================================================ + +// exposed for reuse in wxCheckListBox + +class WXDLLIMPEXP_CORE wxMacListBoxItem : public wxMacDataItem +{ +public : + wxMacListBoxItem(); + + virtual ~wxMacListBoxItem(); + + virtual OSStatus GetSetData(wxMacDataItemBrowserControl *owner , + DataBrowserPropertyID property, + DataBrowserItemDataRef itemData, + bool changeValue ); + + virtual void Notification(wxMacDataItemBrowserControl *owner , + DataBrowserItemNotification message, + DataBrowserItemDataRef itemData ) const; +protected : +}; + +class WXDLLIMPEXP_CORE wxMacDataBrowserColumn : public wxListWidgetColumn +{ +public : + wxMacDataBrowserColumn( DataBrowserPropertyID propertyId, DataBrowserPropertyType colType, bool editable ) + : m_property(propertyId), m_editable(editable), m_type( colType ) + { + } + ~wxMacDataBrowserColumn() + { + } + DataBrowserPropertyID GetProperty() const { return m_property ; } + + bool IsEditable() const { return m_editable; } + + DataBrowserPropertyType GetType() const { return m_type; } + +protected : + DataBrowserPropertyID m_property; + bool m_editable; + DataBrowserPropertyType m_type; +} ; + +WX_DEFINE_ARRAY_PTR(wxMacDataBrowserColumn *, wxArrayMacDataBrowserColumns); + + +class WXDLLIMPEXP_CORE wxMacDataBrowserCellValue : public wxListWidgetCellValue +{ +public : + wxMacDataBrowserCellValue(DataBrowserItemDataRef data) : m_data(data) {} + virtual ~wxMacDataBrowserCellValue() {} + + virtual void Set( CFStringRef value ); + virtual void Set( const wxString& value ); + virtual void Set( int value ) ; + virtual void Check( bool check ); + + virtual int GetIntValue() const ; + virtual wxString GetStringValue() const ; +protected : + DataBrowserItemDataRef m_data; +} ; + + +class WXDLLIMPEXP_CORE wxMacDataBrowserListControl : public wxMacDataItemBrowserControl, public wxListWidgetImpl +{ +public: + wxMacDataBrowserListControl( wxWindow *peer, const wxPoint& pos, const wxSize& size, long style ); + wxMacDataBrowserListControl() {} + virtual ~wxMacDataBrowserListControl(); + + // wxListWidgetImpl Methods + + wxListWidgetColumn* InsertTextColumn( unsigned int pos, const wxString& title, bool editable = false, + wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) ; + wxListWidgetColumn* InsertCheckColumn( unsigned int pos , const wxString& title, bool editable = false, + wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) ; + + wxMacDataBrowserColumn* DoInsertColumn( unsigned int pos, DataBrowserPropertyID property, + const wxString& title, bool editable, + DataBrowserPropertyType colType, SInt16 just, int width ); + // add and remove + + virtual void ListDelete( unsigned int n ); + virtual void ListInsert( unsigned int n ); + virtual void ListClear(); + + // selecting + + virtual void ListDeselectAll(); + virtual void ListSetSelection( unsigned int n, bool select, bool multi = false ); + virtual int ListGetSelection() const; + virtual int ListGetSelections( wxArrayInt& aSelections ) const; + virtual bool ListIsSelected( unsigned int n ) const; + + // display + + virtual void ListScrollTo( unsigned int n ); + + // accessing content + + virtual unsigned int ListGetCount() const; + virtual int DoListHitTest( const wxPoint& inpoint ) const; + + virtual void UpdateLine( unsigned int n, wxListWidgetColumn* col = NULL ); + virtual void UpdateLineToEnd( unsigned int n) ; + + // pointing back + + wxMacDataBrowserColumn* GetColumnFromProperty( DataBrowserPropertyID ); + +protected: + virtual void ItemNotification( + DataBrowserItemID itemID, + DataBrowserItemNotification message, + DataBrowserItemDataRef itemData); + +private: + wxArrayMacDataBrowserColumns m_columns; + int m_nextColumnId ; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacDataBrowserListControl) +}; + +// ============================================================================ +// graphics implementation +// ============================================================================ + +// draw the image 'upside down' corrected as HIViewDrawCGImage does + +OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage( + CGContextRef inContext, + const HIRect * inBounds, + CGImageRef inImage) ; + +CGColorRef WXDLLIMPEXP_CORE wxMacCreateCGColorFromHITheme( ThemeBrush brush ) ; + +#endif // wxUSE_GUI + +#define wxMAC_DEFINE_PROC_GETTER( UPP , x ) \ +UPP Get##x() \ +{ \ + static UPP sHandler = NULL; \ + if ( sHandler == NULL ) \ + sHandler = New##UPP( x ); \ + return sHandler; \ +} + +//--------------------------------------------------------------------------- +// cocoa bridging utilities +//--------------------------------------------------------------------------- + +bool wxMacInitCocoa(); + +typedef Cursor ClassicCursor; + +// ------------- +// Common to all +// ------------- + +// Cursor support + +const short kwxCursorBullseye = 0; +const short kwxCursorBlank = 1; +const short kwxCursorPencil = 2; +const short kwxCursorMagnifier = 3; +const short kwxCursorNoEntry = 4; +const short kwxCursorPaintBrush = 5; +const short kwxCursorPointRight = 6; +const short kwxCursorPointLeft = 7; +const short kwxCursorQuestionArrow = 8; +const short kwxCursorRightArrow = 9; +const short kwxCursorSizeNS = 10; +const short kwxCursorSize = 11; +const short kwxCursorSizeNESW = 12; +const short kwxCursorSizeNWSE = 13; +const short kwxCursorRoller = 14; +const short kwxCursorWatch = 15; +const short kwxCursorLast = kwxCursorWatch; + +// exposing our fallback cursor map + +extern ClassicCursor gMacCursors[]; + +// +// +// + +#if wxUSE_GUI + +class wxNonOwnedWindowCarbonImpl : public wxNonOwnedWindowImpl +{ +public : + wxNonOwnedWindowCarbonImpl( wxNonOwnedWindow* nonownedwnd) ; + + wxNonOwnedWindowCarbonImpl(); + virtual ~wxNonOwnedWindowCarbonImpl(); + + virtual void WillBeDestroyed() ; + void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size, + long style, long extraStyle, const wxString& name ) ; + void Create( wxWindow* parent, WXWindow nativeWindow ); + + WXWindow GetWXWindow() const; + void Raise(); + void Lower(); + bool Show(bool show); + bool ShowWithEffect(bool show, wxShowEffect effect, unsigned timeout); + + + void Update(); + bool SetTransparent(wxByte alpha); + bool SetBackgroundColour(const wxColour& col ); + void SetExtraStyle( long exStyle ); + bool SetBackgroundStyle(wxBackgroundStyle style); + bool CanSetTransparent(); + void MoveWindow(int x, int y, int width, int height); + void GetPosition( int &x, int &y ) const; + void GetSize( int &width, int &height ) const; + void GetContentArea( int &left , int &top , int &width , int &height ) const; + + bool SetShape(const wxRegion& region); + + virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) ; + + virtual bool IsMaximized() const; + + virtual bool IsIconized() const; + + virtual void Iconize( bool iconize ); + + virtual void Maximize(bool maximize); + + virtual bool IsFullScreen() const; + + virtual bool ShowFullScreen(bool show, long style); + + virtual void ShowWithoutActivating(); + + virtual void RequestUserAttention(int flags); + + virtual void ScreenToWindow( int *x, int *y ); + + virtual void WindowToScreen( int *x, int *y ); + virtual bool IsActive(); + + + bool MacGetUnifiedAppearance() const ; + void MacChangeWindowAttributes( wxUint32 attributesToSet , wxUint32 attributesToClear ) ; + wxUint32 MacGetWindowAttributes() const ; + void MacSetMetalAppearance( bool set ) ; + bool MacGetMetalAppearance() const ; + void MacSetUnifiedAppearance( bool set ); + + WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; } + + wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } +protected : + void MacInstallTopLevelWindowEventHandler(); + + WXEVENTHANDLERREF m_macEventHandler ; + WindowRef m_macWindow; + void * m_macFullScreenData ; + DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCarbonImpl) +}; + +#endif // wxUSE_GUI + +#endif + // _WX_PRIVATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/mactext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/mactext.h new file mode 100644 index 0000000000..d665abaa0d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/mactext.h @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/private/mactext.h +// Purpose: private wxMacTextControl base class +// Author: Stefan Csomor +// Modified by: +// Created: 03/02/99 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_PRIVATE_MACTEXT_H_ +#define _WX_MAC_PRIVATE_MACTEXT_H_ + +#include "wx/osx/private.h" + +// implementation exposed, so that search control can pull it + +class wxMacUnicodeTextControl : public wxMacControl, public wxTextWidgetImpl +{ +public : + wxMacUnicodeTextControl( wxTextCtrl *wxPeer ) ; + wxMacUnicodeTextControl( wxTextCtrl *wxPeer, + const wxString& str, + const wxPoint& pos, + const wxSize& size, long style ) ; + virtual ~wxMacUnicodeTextControl(); + + virtual bool CanFocus() const + { return true; } + virtual void VisibilityChanged(bool shown); + virtual wxString GetStringValue() const ; + virtual void SetStringValue( const wxString &str) ; + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + virtual bool CanPaste() const; + virtual void SetEditable(bool editable) ; + virtual void GetSelection( long* from, long* to) const ; + virtual void SetSelection( long from , long to ) ; + virtual void WriteText(const wxString& str) ; + +protected : + void InstallEventHandlers(); + + // contains the tag for the content (is different for password and non-password controls) + OSType m_valueTag ; + WXEVENTHANDLERREF m_macTextCtrlEventHandler ; +public : + ControlEditTextSelectionRec m_selection ; +}; + +#endif // _WX_MAC_PRIVATE_MACTEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/overlay.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/overlay.h new file mode 100644 index 0000000000..f5ebe1d83e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/overlay.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/private/overlay.h +// Purpose: wxOverlayImpl declaration +// Author: Stefan Csomor +// Modified by: +// Created: 2006-10-20 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_CARBON_PRIVATE_OVERLAY_H_ +#define _WX_MAC_CARBON_PRIVATE_OVERLAY_H_ + +#include "wx/osx/private.h" +#include "wx/toplevel.h" +#include "wx/graphics.h" + +class wxOverlayImpl +{ +public: + wxOverlayImpl() ; + ~wxOverlayImpl() ; + + + // clears the overlay without restoring the former state + // to be done eg when the window content has been changed and repainted + void Reset(); + + // returns true if it has been setup + bool IsOk(); + + void Init( wxDC* dc, int x , int y , int width , int height ); + + void BeginDrawing( wxDC* dc); + + void EndDrawing( wxDC* dc); + + void Clear( wxDC* dc); + +private: + OSStatus CreateOverlayWindow(); + + void MacGetBounds( Rect *bounds ); + + WindowRef m_overlayWindow; + WindowRef m_overlayParentWindow; + CGContextRef m_overlayContext ; + // we store the window in case we would have to issue a Refresh() + wxWindow* m_window ; + + int m_x ; + int m_y ; + int m_width ; + int m_height ; +} ; + +#endif // _WX_MAC_CARBON_PRIVATE_OVERLAY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/print.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/print.h new file mode 100644 index 0000000000..b00fd619ef --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/print.h @@ -0,0 +1,92 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/private/print.h +// Purpose: private implementation for printing on OS X +// Author: Stefan Csomor +// Modified by: +// Created: 03/02/99 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_PRIVATE_PRINT_H_ +#define _WX_MAC_PRIVATE_PRINT_H_ + +#include "wx/cmndata.h" +#include "wx/print.h" + +// for PrintingManager +#include "ApplicationServices/ApplicationServices.h" + +class WXDLLIMPEXP_CORE wxOSXPrintData : public wxPrintNativeDataBase +{ +public: + wxOSXPrintData(); + virtual ~wxOSXPrintData(); + + virtual bool TransferTo( wxPrintData &data ); + virtual bool TransferFrom( const wxPrintData &data ); + + virtual bool IsOk() const ; + + virtual void TransferFrom( wxPageSetupDialogData * ); + virtual void TransferTo( wxPageSetupDialogData * ); + + virtual void TransferFrom( wxPrintDialogData * ); + virtual void TransferTo( wxPrintDialogData * ); + + PMPrintSession GetPrintSession() { return m_macPrintSession; } + PMPageFormat GetPageFormat() { return m_macPageFormat; } + PMPrintSettings GetPrintSettings() { return m_macPrintSettings; } +protected : + virtual void TransferPrinterNameFrom( const wxPrintData &data ); + virtual void TransferPaperInfoFrom( const wxPrintData &data ); + virtual void TransferResolutionFrom( const wxPrintData &data ); + + virtual void TransferPrinterNameTo( wxPrintData &data ); + virtual void TransferPaperInfoTo( wxPrintData &data ); + virtual void TransferResolutionTo( wxPrintData &data ); + + + virtual void UpdateFromPMState(); + virtual void UpdateToPMState(); + + PMPrintSession m_macPrintSession ; + PMPageFormat m_macPageFormat ; + PMPrintSettings m_macPrintSettings ; + PMPaper m_macPaper; +private: + DECLARE_DYNAMIC_CLASS(wxOSXPrintData) +} ; + +WXDLLIMPEXP_CORE wxPrintNativeDataBase* wxOSXCreatePrintData(); + +#if wxOSX_USE_CARBON +class WXDLLIMPEXP_CORE wxOSXCarbonPrintData : public wxOSXPrintData +{ +public: + wxOSXCarbonPrintData(); + virtual ~wxOSXCarbonPrintData(); +private: + DECLARE_DYNAMIC_CLASS(wxOSXCarbonPrintData) +} ; +#endif + +#if wxOSX_USE_COCOA +class WXDLLIMPEXP_CORE wxOSXCocoaPrintData : public wxOSXPrintData +{ +public: + wxOSXCocoaPrintData(); + virtual ~wxOSXCocoaPrintData(); + + WX_NSPrintInfo GetNSPrintInfo() { return m_macPrintInfo; } +protected: + virtual void UpdateFromPMState(); + virtual void UpdateToPMState(); + + WX_NSPrintInfo m_macPrintInfo; +private: + DECLARE_DYNAMIC_CLASS(wxOSXCocoaPrintData) +} ; +#endif + +#endif // _WX_MAC_PRIVATE_PRINT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/timer.h new file mode 100644 index 0000000000..0d68d7a204 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/private/timer.h @@ -0,0 +1,32 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/private/timer.h +// Purpose: wxTimer class +// Author: Stefan Csomor +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_PRIVATE_TIMER_H_ +#define _WX_MAC_PRIVATE_TIMER_H_ + +#include "wx/private/timer.h" + +struct MacTimerInfo; + +class WXDLLIMPEXP_CORE wxCarbonTimerImpl : public wxTimerImpl +{ +public: + wxCarbonTimerImpl(wxTimer *timer); + virtual ~wxCarbonTimerImpl(); + + virtual bool Start(int milliseconds = -1, bool one_shot = false); + virtual void Stop(); + + virtual bool IsRunning() const; + +private: + MacTimerInfo *m_info; +}; + +#endif // _WX_MAC_PRIVATE_TIMER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/region.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/region.h new file mode 100644 index 0000000000..f9c3fe3dd3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/region.h @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/region.h +// Purpose: wxRegion class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_CARBON_REGION_H_ +#define _WX_MAC_CARBON_REGION_H_ + +#include "wx/list.h" + +class WXDLLIMPEXP_CORE wxRegion : public wxRegionWithCombine +{ +public: + wxRegion() { } + wxRegion(long x, long y, long w, long h); + wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight); + wxRegion(const wxRect& rect); + wxRegion( WXHRGN hRegion ); + wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); +#if wxUSE_IMAGE + wxRegion(const wxBitmap& bmp) + { + Union(bmp); + } + wxRegion(const wxBitmap& bmp, + const wxColour& transColour, int tolerance = 0) + { + Union(bmp, transColour, tolerance); + } +#endif + + virtual ~wxRegion(); + + // wxRegionBase methods + virtual void Clear(); + virtual bool IsEmpty() const; + + // Internal + WXHRGN GetWXHRGN() const ; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + virtual bool DoIsEqual(const wxRegion& region) const; + virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const; + virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const; + virtual wxRegionContain DoContainsRect(const wxRect& rect) const; + + virtual bool DoOffset(wxCoord x, wxCoord y); + virtual bool DoCombine(const wxRegion& region, wxRegionOp op); + virtual bool DoUnionWithRect(const wxRect& rect); + +private: + DECLARE_DYNAMIC_CLASS(wxRegion) + friend class WXDLLIMPEXP_FWD_CORE wxRegionIterator; +}; + +class WXDLLIMPEXP_CORE wxRegionIterator : public wxObject +{ +public: + wxRegionIterator(); + wxRegionIterator(const wxRegion& region); + wxRegionIterator(const wxRegionIterator& iterator); + virtual ~wxRegionIterator(); + + wxRegionIterator& operator=(const wxRegionIterator& iterator); + + void Reset() { m_current = 0; } + void Reset(const wxRegion& region); + + operator bool () const { return m_current < m_numRects; } + bool HaveRects() const { return m_current < m_numRects; } + + wxRegionIterator& operator++(); + wxRegionIterator operator++(int); + + long GetX() const; + long GetY() const; + long GetW() const; + long GetWidth() const { return GetW(); } + long GetH() const; + long GetHeight() const { return GetH(); } + wxRect GetRect() const { return wxRect((int)GetX(), (int)GetY(), (int)GetWidth(), (int)GetHeight()); } + +private: + void SetRects(long numRects, wxRect *rects); + + long m_current; + long m_numRects; + wxRegion m_region; + wxRect* m_rects; + + DECLARE_DYNAMIC_CLASS(wxRegionIterator) +}; + +#endif // _WX_MAC_CARBON_REGION_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/statbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/statbmp.h new file mode 100644 index 0000000000..0f9ffb1763 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/statbmp.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/statbmp.h +// Purpose: wxStaticBitmap class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATBMP_H_ +#define _WX_STATBMP_H_ + +#include "wx/icon.h" + +class WXDLLIMPEXP_CORE wxStaticBitmap: public wxStaticBitmapBase +{ + DECLARE_DYNAMIC_CLASS(wxStaticBitmap) + public: + wxStaticBitmap() { } + + wxStaticBitmap(wxWindow *parent, wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr) + { + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + 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 OnPaint( wxPaintEvent &event ) ; + + wxBitmap GetBitmap() const { return m_bitmap; } + wxIcon GetIcon() const + { + // icons and bitmaps are really the same thing in wxMac + return (const wxIcon &)m_bitmap; + } + void SetIcon(const wxIcon& icon) { SetBitmap( (const wxBitmap &)icon ) ; } + + // overridden base class virtuals + virtual bool AcceptsFocus() const { return false; } + + protected: + virtual wxSize DoGetBestSize() const; + + wxBitmap m_bitmap; + DECLARE_EVENT_TABLE() +}; + +#endif + // _WX_STATBMP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/uma.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/uma.h new file mode 100644 index 0000000000..57b77f798c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/carbon/uma.h @@ -0,0 +1,43 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/carbon/uma.h +// Purpose: Universal MacOS API +// Author: Stefan Csomor +// Modified by: +// Created: 03/02/99 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef H_UMA +#define H_UMA + +#include "wx/osx/private.h" + +#if wxUSE_GUI + +// menu manager + +MenuRef UMANewMenu( SInt16 id , const wxString& title , wxFontEncoding encoding) ; +void UMASetMenuTitle( MenuRef menu , const wxString& title , wxFontEncoding encoding) ; +void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ; + +void UMAAppendMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , wxAcceleratorEntry *entry = NULL ) ; +void UMAInsertMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , MenuItemIndex item , wxAcceleratorEntry *entry = NULL ) ; +void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEntry *entry ) ; + +void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title , wxFontEncoding encoding ) ; + +// Retrieves the Help menu handle. Warning: As a side-effect this functions also +// creates the Help menu if it didn't exist yet. +OSStatus UMAGetHelpMenu( + MenuRef * outHelpMenu, + MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */ + +// Same as UMAGetHelpMenu, but doesn't create the Help menu if UMAGetHelpMenu hasn't been called yet. +OSStatus UMAGetHelpMenuDontCreate( + MenuRef * outHelpMenu, + MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */ + +#endif // wxUSE_GUI + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/checkbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/checkbox.h new file mode 100644 index 0000000000..3ba0accc90 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/checkbox.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/checkbox.h +// Purpose: wxCheckBox class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHECKBOX_H_ +#define _WX_CHECKBOX_H_ + +// Checkbox item (single checkbox) +class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase +{ +public: + wxCheckBox() { } + wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + virtual void SetValue(bool); + virtual bool GetValue() const; + + virtual void Command(wxCommandEvent& event); + + // osx specific event handling common for all osx-ports + + virtual bool OSXHandleClicked( double timestampsec ); +protected: + void DoSet3StateValue(wxCheckBoxState val); + virtual wxCheckBoxState DoGet3StateValue() const; + + DECLARE_DYNAMIC_CLASS(wxCheckBox) +}; + +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_CORE wxBitmapCheckBox: public wxCheckBox +{ +public: + int checkWidth; + int checkHeight; + + wxBitmapCheckBox() + : checkWidth(-1), checkHeight(-1) + { } + + wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + virtual void SetValue(bool); + virtual bool GetValue() const; + virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); + virtual void SetLabel(const wxBitmap *bitmap); + virtual void SetLabel( const wxString & WXUNUSED(name) ) {} + + DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox) +}; +#endif + // _WX_CHECKBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/checklst.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/checklst.h new file mode 100644 index 0000000000..c23d36f562 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/checklst.h @@ -0,0 +1,93 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/checklst.h +// Purpose: wxCheckListBox class - a listbox with checkable items +// Note: this is an optional class. +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_CHECKLST_H_ +#define _WX_MAC_CHECKLST_H_ + +class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase +{ +public: + // ctors + wxCheckListBox() { Init(); } + wxCheckListBox(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int nStrings = 0, + const wxString *choices = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Init(); + + Create(parent, id, pos, size, nStrings, choices, style, validator, name); + } + wxCheckListBox(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Init(); + + Create(parent, id, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int nStrings = 0, + const wxString *choices = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + // items may be checked + bool IsChecked(unsigned int uiIndex) const; + void Check(unsigned int uiIndex, bool bCheck = true); + + // data callbacks + virtual void GetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value ); + virtual void SetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value ); + +protected: + // override all methods which add/delete items to update m_checks array as + // well + virtual void OnItemInserted(unsigned int pos); + virtual void DoDeleteOneItem(unsigned int n); + virtual void DoClear(); + + // the array containing the checked status of the items + wxArrayInt m_checks; + + wxListWidgetColumn* m_checkColumn ; + + void Init(); + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxCheckListBox) +}; + +#endif // _WX_MAC_CHECKLST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/chkconf.h new file mode 100644 index 0000000000..c960923cc8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/chkconf.h @@ -0,0 +1,88 @@ +/* + * Name: wx/osx/chkconf.h + * Purpose: Mac-specific config settings checks + * Author: Vadim Zeitlin + * Modified by: + * Created: 2005-04-05 (extracted from wx/chkconf.h) + * Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwidgets.org> + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_OSX_CHKCONF_H_ +#define _WX_OSX_CHKCONF_H_ + +/* + * check graphics context option, must be on for every os x platform + * we only use core graphics now on all builds, try to catch attempts + * to configure the build otherwise and give error messages + */ + +#if wxUSE_GUI && (!wxUSE_GRAPHICS_CONTEXT || \ + ( defined( wxMAC_USE_CORE_GRAPHICS ) && !wxMAC_USE_CORE_GRAPHICS )) +# error "OS X builds use CoreGraphics in this wx version, you cannot turn back to QuickDraw completely" +#endif + +/* + * using mixins of cocoa functionality + */ + +#ifdef __WXOSX_COCOA__ + #define wxOSX_USE_COCOA 1 +#else + #define wxOSX_USE_COCOA 0 +#endif + +#ifdef __WXOSX_CARBON__ + #define wxOSX_USE_CARBON 1 +#else + #define wxOSX_USE_CARBON 0 +#endif + +/* + * setting flags according to the platform + */ + +#ifdef __LP64__ + #if wxOSX_USE_COCOA == 0 + #undef wxOSX_USE_COCOA + #define wxOSX_USE_COCOA 1 + #endif + #if wxOSX_USE_CARBON + #error "Carbon does not support 64bit" + #endif + #define wxOSX_USE_IPHONE 0 +#else + #ifdef __WXOSX_IPHONE__ + #define wxOSX_USE_IPHONE 1 + #else + #define wxOSX_USE_IPHONE 0 + #endif +#endif + +/* + * combination flags + */ + +#if wxOSX_USE_COCOA || wxOSX_USE_CARBON + #define wxOSX_USE_COCOA_OR_CARBON 1 +#else + #define wxOSX_USE_COCOA_OR_CARBON 0 +#endif + +#if wxOSX_USE_COCOA || wxOSX_USE_IPHONE + #define wxOSX_USE_COCOA_OR_IPHONE 1 +#else + #define wxOSX_USE_COCOA_OR_IPHONE 0 +#endif + +#if wxOSX_USE_IPHONE + #include "wx/osx/iphone/chkconf.h" +#elif wxOSX_USE_CARBON + #include "wx/osx/carbon/chkconf.h" +#elif wxOSX_USE_COCOA + #include "wx/osx/cocoa/chkconf.h" +#endif + +#endif /* _WX_OSX_CHKCONF_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/choice.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/choice.h new file mode 100644 index 0000000000..0e108f4552 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/choice.h @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/choice.h +// Purpose: wxChoice class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CHOICE_H_ +#define _WX_CHOICE_H_ + +#include "wx/control.h" + +#include "wx/dynarray.h" +#include "wx/arrstr.h" + +WX_DEFINE_ARRAY( char * , wxChoiceDataArray ) ; + +// Choice item +class WXDLLIMPEXP_CORE wxChoice: public wxChoiceBase +{ + DECLARE_DYNAMIC_CLASS(wxChoice) + +public: + wxChoice() + : m_strings(), m_datas() + {} + + virtual ~wxChoice() ; + + wxChoice(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Create(parent, id, pos, size, n, choices, style, validator, name); + } + wxChoice(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Create(parent, id, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + + virtual unsigned int GetCount() const ; + virtual int GetSelection() const ; + virtual void SetSelection(int n); + + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual wxString GetString(unsigned int n) const ; + virtual void SetString(unsigned int pos, const wxString& s); + // osx specific event handling common for all osx-ports + + virtual bool OSXHandleClicked( double timestampsec ); + +protected: + virtual void DoDeleteOneItem(unsigned int n); + virtual void DoClear(); + + virtual wxSize DoGetBestSize() const ; + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + + wxArrayString m_strings; + wxChoiceDataArray m_datas ; + wxMenu* m_popUpMenu ; + +private: + // This should be called when the number of items in the control changes. + void DoAfterItemCountChange(); +}; + +#endif + // _WX_CHOICE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/clipbrd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/clipbrd.h new file mode 100644 index 0000000000..cba7a41e22 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/clipbrd.h @@ -0,0 +1,67 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/clipbrd.h +// Purpose: Clipboard functionality. +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CLIPBRD_H_ +#define _WX_CLIPBRD_H_ + +#if wxUSE_CLIPBOARD + +#include "wx/osx/core/cfref.h" + +//----------------------------------------------------------------------------- +// wxClipboard +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase +{ +public: + wxClipboard(); + virtual ~wxClipboard(); + + // open the clipboard before SetData() and GetData() + virtual bool Open(); + + // close the clipboard after SetData() and GetData() + virtual void Close(); + + // query whether the clipboard is opened + virtual bool IsOpened() const; + + // set the clipboard data. all other formats will be deleted. + virtual bool SetData( wxDataObject *data ); + + // add to the clipboard data. + virtual bool AddData( wxDataObject *data ); + + // ask if data in correct format is available + virtual bool IsSupported( const wxDataFormat& format ); + + // fill data with data on the clipboard (if available) + virtual bool GetData( wxDataObject& data ); + + // clears wxTheClipboard and the system's clipboard if possible + virtual void Clear(); + + // flushes the clipboard: this means that the data which is currently on + // clipboard will stay available even after the application exits (possibly + // eating memory), otherwise the clipboard will be emptied on exit + virtual bool Flush(); + +private: + wxDataObject *m_data; + bool m_open; + wxCFRef<PasteboardRef> m_pasteboard; + + DECLARE_DYNAMIC_CLASS(wxClipboard) +}; + +#endif // wxUSE_CLIPBOARD + +#endif // _WX_CLIPBRD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/chkconf.h new file mode 100644 index 0000000000..03fd501925 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/chkconf.h @@ -0,0 +1,59 @@ +/* + * Name: wx/osx/cocoa/chkconf.h + * Purpose: Compiler-specific configuration checking + * Author: Stefan Csomor + * Modified by: + * Created: 2008-07-30 + * Copyright: (c) Stefan Csomor + * Licence: wxWindows licence + */ + +#ifndef _WX_OSX_COCOA_CHKCONF_H_ +#define _WX_OSX_COCOA_CHKCONF_H_ + +/* Many wchar functions (and also strnlen(), for some reason) are only + available since 10.7 so don't use them if we want to build the applications + that would run under 10.6 and earlier. */ +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 +#define HAVE_STRNLEN 1 +#define HAVE_WCSDUP 1 +#define HAVE_WCSNLEN 1 +#define HAVE_WCSCASECMP 1 +#define HAVE_WCSNCASECMP 1 +#endif + +/* + * native (1) or emulated (0) toolbar + */ + +#ifndef wxOSX_USE_NATIVE_TOOLBAR + #define wxOSX_USE_NATIVE_TOOLBAR 1 +#endif + +/* + * leave is isFlipped and don't override + */ +#ifndef wxOSX_USE_NATIVE_FLIPPED + #define wxOSX_USE_NATIVE_FLIPPED 1 +#endif + +/* + * text rendering system + */ + +#define wxOSX_USE_ATSU_TEXT 0 + +/* + * Audio System + */ + +#define wxOSX_USE_QUICKTIME 0 +#define wxOSX_USE_AUDIOTOOLBOX 1 + +/* + * turning off capabilities that don't work under cocoa yet + */ + +#endif + /* _WX_MAC_CHKCONF_H_ */ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/dataview.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/dataview.h new file mode 100644 index 0000000000..2d33fff661 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/dataview.h @@ -0,0 +1,518 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/cocoa/dataview.h +// Purpose: wxDataViewCtrl native implementation header for carbon +// Author: +// Copyright: (c) 2009 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DATAVIEWCTRL_COCOOA_H_ +#define _WX_DATAVIEWCTRL_COCOOA_H_ + +#include "wx/defs.h" + +#import <Cocoa/Cocoa.h> + +#include "wx/osx/core/dataview.h" +#include "wx/osx/private.h" + +// Forward declaration +class wxCocoaDataViewControl; + +/* + Dramatis personae: + + [vertical arrows indicate inheritance, horizontal -- aggregation] + + + wxWindow ---> wxWidgetCocoaImpl wxDataViewWidgetImpl NSOutlineView + | \ / | + | \ / | + | \ / | + v \/ \/ v + wxDataViewCtrl -------> wxCocoaDataViewControl <-------> wxCocoaOutlineView + + + The right most classes are Objective-C only and can't be used from (pure) + C++ code. + */ + +// ============================================================================ +// wxPointerObject: simply stores a pointer, without taking its ownership +// ============================================================================ + +// Two pointer objects are equal if the containing pointers are equal. This +// means also that the hash value of a pointer object depends only on the +// stored pointer. + +@interface wxPointerObject : NSObject +{ + void* pointer; +} + + -(id) initWithPointer:(void*)initPointer; + + -(void*) pointer; + -(void) setPointer:(void*)newPointer; +@end + +// ============================================================================ +// wxSortDescriptorObject: helper class to use native sorting facilities +// ============================================================================ + +@interface wxSortDescriptorObject : NSSortDescriptor<NSCopying> +{ + wxDataViewColumn* columnPtr; // pointer to the sorting column + + wxDataViewModel* modelPtr; // pointer to model +} + + -(id) + initWithModelPtr:(wxDataViewModel*)initModelPtr + sortingColumnPtr:(wxDataViewColumn*)initColumnPtr + ascending:(BOOL)sortAscending; + + -(wxDataViewColumn*) columnPtr; + -(wxDataViewModel*) modelPtr; + + -(void) setColumnPtr:(wxDataViewColumn*)newColumnPtr; + -(void) setModelPtr:(wxDataViewModel*)newModelPtr; +@end + +// ============================================================================ +// wxDataViewColumnNativeData: extra data for wxDataViewColumn +// ============================================================================ + +class wxDataViewColumnNativeData +{ +public: + wxDataViewColumnNativeData() : m_NativeColumnPtr(NULL) + { + } + + wxDataViewColumnNativeData(NSTableColumn* initNativeColumnPtr) + : m_NativeColumnPtr(initNativeColumnPtr) + { + } + + NSTableColumn* GetNativeColumnPtr() const + { + return m_NativeColumnPtr; + } + + void SetNativeColumnPtr(NSTableColumn* newNativeColumnPtr) + { + m_NativeColumnPtr = newNativeColumnPtr; + } + +private: + // not owned by us + NSTableColumn* m_NativeColumnPtr; +}; + +// ============================================================================ +// wxDataViewRendererNativeData: extra data for wxDataViewRenderer +// ============================================================================ + +class wxDataViewRendererNativeData +{ +public: + wxDataViewRendererNativeData() + : m_Object(NULL), m_ColumnCell(NULL) + { + Init(); + } + + wxDataViewRendererNativeData(NSCell* initColumnCell) + : m_Object(NULL), m_ColumnCell([initColumnCell retain]) + { + Init(); + } + + wxDataViewRendererNativeData(NSCell* initColumnCell, id initObject) + : m_Object([initObject retain]), m_ColumnCell([initColumnCell retain]) + { + Init(); + } + + ~wxDataViewRendererNativeData() + { + [m_ColumnCell release]; + [m_Object release]; + + [m_origFont release]; + [m_origTextColour release]; + } + + NSCell* GetColumnCell() const { return m_ColumnCell; } + NSTableColumn* GetColumnPtr() const { return m_TableColumnPtr; } + id GetItem() const { return m_Item; } + NSCell* GetItemCell() const { return m_ItemCell; } + id GetObject() const { return m_Object; } + + void SetColumnCell(NSCell* newCell) + { + [newCell retain]; + [m_ColumnCell release]; + m_ColumnCell = newCell; + } + void SetColumnPtr(NSTableColumn* newColumnPtr) + { + m_TableColumnPtr = newColumnPtr; + } + void SetItem(id newItem) + { + m_Item = newItem; + } + void SetItemCell(NSCell* newCell) + { + m_ItemCell = newCell; + } + void SetObject(id newObject) + { + [newObject retain]; + [m_Object release]; + m_Object = newObject; + } + + // The original cell font and text colour stored here are NULL by default + // and are only initialized to the values retrieved from the cell when we + // change them from wxCocoaOutlineView:willDisplayCell:forTableColumn:item: + // which calls our SaveOriginalXXX() methods before changing the cell + // attributes. + // + // This allows us to avoid doing anything for the columns without any + // attributes but still be able to restore the correct attributes for the + // ones that do. + NSFont *GetOriginalFont() const { return m_origFont; } + NSColor *GetOriginalTextColour() const { return m_origTextColour; } + + void SaveOriginalFont(NSFont *font) + { + m_origFont = [font retain]; + } + + void SaveOriginalTextColour(NSColor *textColour) + { + m_origTextColour = [textColour retain]; + } + + // The ellipsization mode which we need to set for each cell being rendered. + void SetEllipsizeMode(wxEllipsizeMode mode) { m_ellipsizeMode = mode; } + wxEllipsizeMode GetEllipsizeMode() const { return m_ellipsizeMode; } + + // Set the line break mode for the given cell using our m_ellipsizeMode + void ApplyLineBreakMode(NSCell *cell); + +private: + // common part of all ctors + void Init(); + + id m_Item; // item NOT owned by renderer + + // object that can be used by renderer for storing special data (owned by + // renderer) + id m_Object; + + NSCell* m_ColumnCell; // column's cell is owned by renderer + NSCell* m_ItemCell; // item's cell is NOT owned by renderer + + NSTableColumn* m_TableColumnPtr; // column NOT owned by renderer + + // we own those if they're non-NULL + NSFont *m_origFont; + NSColor *m_origTextColour; + + wxEllipsizeMode m_ellipsizeMode; +}; + +// ============================================================================ +// wxCocoaOutlineDataSource +// ============================================================================ + +// This class implements the data source delegate for the outline view. +// As only an informal protocol exists this class inherits from NSObject only. +// +// As mentioned in the documentation for NSOutlineView the native control does +// not own any data. Therefore, it has to be done by the data source. +// Unfortunately, wxWidget's data source is a C++ data source but +// NSOutlineDataSource requires objects as data. Therefore, the data (or better +// the native item objects) have to be stored additionally in the native data +// source. +// NSOutlineView requires quick access to the item objects and quick linear +// access to an item's children. This requires normally a hash type of storage +// for the item object itself and an array structure for each item's children. +// This means that basically two times the whole structure of wxWidget's model +// class has to be stored. +// This implementation is using a compromise: all items that are in use by the +// control are stored in a set (from there they can be easily retrieved) and +// owned by the set. Furthermore, children of the last parent are stored +// in a linear list. +// +@interface wxCocoaOutlineDataSource : NSObject wxOSX_10_6_AND_LATER(<NSOutlineViewDataSource>) +{ + // descriptors specifying the sorting (currently the array only holds one + // object only) + NSArray* sortDescriptors; + + NSMutableArray* children; // buffered children + + NSMutableSet* items; // stores all items that are in use by the control + + wxCocoaDataViewControl* implementation; + + wxDataViewModel* model; + + // parent of the buffered children; the object is owned + wxPointerObject* currentParentItem; +} + + // methods of informal protocol: + -(BOOL) + outlineView:(NSOutlineView*)outlineView + acceptDrop:(id<NSDraggingInfo>)info + item:(id)item + childIndex:(NSInteger)index; + + -(id) + outlineView:(NSOutlineView*)outlineView + child:(NSInteger)index + ofItem:(id)item; + + -(id) + outlineView:(NSOutlineView*)outlineView + objectValueForTableColumn:(NSTableColumn*)tableColumn + byItem:(id)item; + + -(BOOL) + outlineView:(NSOutlineView*)outlineView + isItemExpandable:(id)item; + + -(NSInteger) + outlineView:(NSOutlineView*)outlineView + numberOfChildrenOfItem:(id)item; + + -(NSDragOperation) + outlineView:(NSOutlineView*)outlineView + validateDrop:(id<NSDraggingInfo>)info + proposedItem:(id)item + proposedChildIndex:(NSInteger)index; + + -(BOOL) + outlineView:(NSOutlineView*)outlineView + writeItems:(NSArray*)items + toPasteboard:(NSPasteboard*)pasteboard; + + // buffer for items handling + -(void) addToBuffer:(wxPointerObject*)item; + -(void) clearBuffer; + // returns the item in the buffer that has got the same pointer as "item", + // if such an item does not exist nil is returned + -(wxPointerObject*) getDataViewItemFromBuffer:(const wxDataViewItem&)item; + -(wxPointerObject*) getItemFromBuffer:(wxPointerObject*)item; + -(BOOL) isInBuffer:(wxPointerObject*)item; + -(void) removeFromBuffer:(wxPointerObject*)item; + + // buffered children handling + -(void) appendChild:(wxPointerObject*)item; + -(void) clearChildren; + -(wxPointerObject*) getChild:(NSUInteger)index; + -(NSUInteger) getChildCount; + -(void) removeChild:(NSUInteger)index; + + // buffer handling + -(void) clearBuffers; + + // sorting + -(NSArray*) sortDescriptors; + -(void) setSortDescriptors:(NSArray*)newSortDescriptors; + + // access to wxWidgets variables + -(wxPointerObject*) currentParentItem; + -(wxCocoaDataViewControl*) implementation; + -(wxDataViewModel*) model; + -(void) setCurrentParentItem:(wxPointerObject*)newCurrentParentItem; + -(void) setImplementation:(wxCocoaDataViewControl*)newImplementation; + -(void) setModel:(wxDataViewModel*)newModel; + + // other methods + -(void) + bufferItem:(wxPointerObject*)parentItem + withChildren:(wxDataViewItemArray*)dataViewChildrenPtr; +@end + +// ============================================================================ +// wxCustomCell: used for custom renderers +// ============================================================================ + +@interface wxCustomCell : NSTextFieldCell +{ +} + + -(NSSize) cellSize; +@end + +// ============================================================================ +// wxImageTextCell +// ============================================================================ +// +// As the native cocoa environment does not have a cell displaying an icon/ +// image and text at the same time, it has to be implemented by the user. +// This implementation follows the implementation of Chuck Pisula in Apple's +// DragNDropOutline sample application. +// Although in wxDataViewCtrl icons are used on OSX icons do not exist for +// display. Therefore, the cell is also called wxImageTextCell. +// Instead of displaying images of any size (which is possible) this cell uses +// a fixed size for displaying the image. Larger images are scaled to fit +// into their reserved space. Smaller or not existing images use the fixed +// reserved size and are scaled if necessary. +// +@interface wxImageTextCell : NSTextFieldCell +{ +@private + CGFloat xImageShift; // shift for the image in x-direction from border + CGFloat spaceImageText; // space between image and text + + NSImage* image; // the image itself + + NSSize imageSize; // largest size of the image; default size is (16, 16) + + // the text alignment is used to align the whole cell (image and text) + NSTextAlignment cellAlignment; +} + + -(NSTextAlignment) alignment; + -(void) setAlignment:(NSTextAlignment)newAlignment; + + -(NSImage*) image; + -(void) setImage:(NSImage*)newImage; + + -(NSSize) imageSize; + -(void) setImageSize:(NSSize) newImageSize; + + -(NSSize) cellSize; +@end + +// ============================================================================ +// wxCocoaOutlineView +// ============================================================================ + +@interface wxCocoaOutlineView : NSOutlineView wxOSX_10_6_AND_LATER(<NSOutlineViewDelegate>) +{ +@private + // column and row of the cell being edited or -1 if none + int currentlyEditedColumn, + currentlyEditedRow; + + wxCocoaDataViewControl* implementation; +} + + -(wxCocoaDataViewControl*) implementation; + -(void) setImplementation:(wxCocoaDataViewControl*) newImplementation; +@end + +// ============================================================================ +// wxCocoaDataViewControl +// ============================================================================ + +// This is the internal interface class between wxDataViewCtrl (wxWidget) and +// the native source view (Mac OS X cocoa). +class wxCocoaDataViewControl : public wxWidgetCocoaImpl, + public wxDataViewWidgetImpl +{ +public: + // constructors / destructor + wxCocoaDataViewControl(wxWindow* peer, + const wxPoint& pos, + const wxSize& size, + long style); + virtual ~wxCocoaDataViewControl(); + + wxDataViewCtrl* GetDataViewCtrl() const + { + return static_cast<wxDataViewCtrl*>(GetWXPeer()); + } + + // column related methods (inherited from wxDataViewWidgetImpl) + virtual bool ClearColumns(); + virtual bool DeleteColumn(wxDataViewColumn* columnPtr); + virtual void DoSetExpanderColumn(wxDataViewColumn const* columnPtr); + virtual wxDataViewColumn* GetColumn(unsigned int pos) const; + virtual int GetColumnPosition(wxDataViewColumn const* columnPtr) const; + virtual bool InsertColumn(unsigned int pos, wxDataViewColumn* columnPtr); + virtual void FitColumnWidthToContent(unsigned int pos); + + // item related methods (inherited from wxDataViewWidgetImpl) + virtual bool Add(const wxDataViewItem& parent, const wxDataViewItem& item); + virtual bool Add(const wxDataViewItem& parent, + const wxDataViewItemArray& items); + virtual void Collapse(const wxDataViewItem& item); + virtual void EnsureVisible(const wxDataViewItem& item, + wxDataViewColumn const* columnPtr); + virtual void Expand(const wxDataViewItem& item); + virtual unsigned int GetCount() const; + virtual wxRect GetRectangle(const wxDataViewItem& item, + wxDataViewColumn const* columnPtr); + virtual bool IsExpanded(const wxDataViewItem& item) const; + virtual bool Reload(); + virtual bool Remove(const wxDataViewItem& parent, + const wxDataViewItem& item); + virtual bool Remove(const wxDataViewItem& parent, + const wxDataViewItemArray& item); + virtual bool Update(const wxDataViewColumn* columnPtr); + virtual bool Update(const wxDataViewItem& parent, + const wxDataViewItem& item); + virtual bool Update(const wxDataViewItem& parent, + const wxDataViewItemArray& items); + + // model related methods + virtual bool AssociateModel(wxDataViewModel* model); + + // + // selection related methods (inherited from wxDataViewWidgetImpl) + // + virtual wxDataViewItem GetCurrentItem() const; + virtual void SetCurrentItem(const wxDataViewItem& item); + virtual wxDataViewColumn *GetCurrentColumn() const; + virtual int GetSelectedItemsCount() const; + virtual int GetSelections(wxDataViewItemArray& sel) const; + virtual bool IsSelected(const wxDataViewItem& item) const; + virtual void Select(const wxDataViewItem& item); + virtual void SelectAll(); + virtual void Unselect(const wxDataViewItem& item); + virtual void UnselectAll(); + + // + // sorting related methods + // + virtual wxDataViewColumn* GetSortingColumn () const; + virtual void Resort(); + + // + // other methods (inherited from wxDataViewWidgetImpl) + // + virtual void DoSetIndent(int indent); + virtual void HitTest(const wxPoint& point, + wxDataViewItem& item, + wxDataViewColumn*& columnPtr) const; + virtual void SetRowHeight(const wxDataViewItem& item, unsigned int height); + virtual void OnSize(); + + virtual void StartEditor( const wxDataViewItem & item, unsigned int column ); + + // drag & drop helper methods + wxDataFormat GetDnDDataFormat(wxDataObjectComposite* dataObjects); + wxDataObjectComposite* GetDnDDataObjects(NSData* dataObject) const; + + // Cocoa-specific helpers + id GetItemAtRow(int row) const; + +private: + void InitOutlineView(long style); + + wxCocoaOutlineDataSource* m_DataSource; + + wxCocoaOutlineView* m_OutlineView; +}; + +#endif // _WX_DATAVIEWCTRL_COCOOA_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/evtloop.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/evtloop.h new file mode 100644 index 0000000000..ab15dd94af --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/evtloop.h @@ -0,0 +1,48 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/cocoa/evtloop.h +// Purpose: declaration of wxGUIEventLoop for wxOSX/Cocoa +// Author: Vadim Zeitlin +// Created: 2008-12-28 +// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_COCOA_EVTLOOP_H_ +#define _WX_OSX_COCOA_EVTLOOP_H_ + +class WXDLLIMPEXP_BASE wxGUIEventLoop : public wxCFEventLoop +{ +public: + wxGUIEventLoop(); + ~wxGUIEventLoop(); + + void BeginModalSession( wxWindow* modalWindow ); + + void EndModalSession(); + + virtual void WakeUp(); + + void OSXUseLowLevelWakeup(bool useIt) + { m_osxLowLevelWakeUp = useIt ; } + +protected: + virtual int DoDispatchTimeout(unsigned long timeout); + + virtual void OSXDoRun(); + virtual void OSXDoStop(); + + virtual CFRunLoopRef CFGetCurrentRunLoop() const; + + void* m_modalSession; + + wxWindow* m_modalWindow; + + WXWindow m_dummyWindow; + + int m_modalNestedLevel; + + bool m_osxLowLevelWakeUp; +}; + +#endif // _WX_OSX_COCOA_EVTLOOP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private.h new file mode 100644 index 0000000000..ed731f7e72 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private.h @@ -0,0 +1,475 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/cocoa/private.h +// Purpose: Private declarations: as this header is only included by +// wxWidgets itself, it may contain identifiers which don't start +// with "wx". +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_COCOA_H_ +#define _WX_PRIVATE_COCOA_H_ + +#include <ApplicationServices/ApplicationServices.h> + +#ifdef __OBJC__ + #import <Cocoa/Cocoa.h> +#endif + +// +// shared between Cocoa and Carbon +// + +// bring in theming types without pulling in the headers + +#if wxUSE_GUI +typedef SInt16 ThemeBrush; +CGColorRef WXDLLIMPEXP_CORE wxMacCreateCGColorFromHITheme( ThemeBrush brush ) ; +OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage( + CGContextRef inContext, + const CGRect * inBounds, + CGImageRef inImage) ; +WX_NSImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromCGImage( CGImageRef image, double scale = 1.0 ); +CGImageRef WXDLLIMPEXP_CORE wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage, double *scale = NULL ); +CGContextRef WXDLLIMPEXP_CORE wxOSXCreateBitmapContextFromNSImage( WX_NSImage nsimage); + +wxBitmap WXDLLIMPEXP_CORE wxOSXCreateSystemBitmap(const wxString& id, const wxString &client, const wxSize& size); +WXWindow WXDLLIMPEXP_CORE wxOSXGetMainWindow(); + +class WXDLLIMPEXP_FWD_CORE wxDialog; + +class WXDLLIMPEXP_CORE wxWidgetCocoaImpl : public wxWidgetImpl +{ +public : + wxWidgetCocoaImpl( wxWindowMac* peer , WXWidget w, bool isRootControl = false, bool isUserPane = false ) ; + wxWidgetCocoaImpl() ; + ~wxWidgetCocoaImpl(); + + void Init(); + + virtual bool IsVisible() const ; + virtual void SetVisibility(bool); + + // we provide a static function which can be reused from + // wxNonOwnedWindowCocoaImpl too + static bool ShowViewOrWindowWithEffect(wxWindow *win, + bool show, + wxShowEffect effect, + unsigned timeout); + + virtual bool ShowWithEffect(bool show, + wxShowEffect effect, + unsigned timeout); + + virtual void Raise(); + + virtual void Lower(); + + virtual void ScrollRect( const wxRect *rect, int dx, int dy ); + + virtual WXWidget GetWXWidget() const { return m_osxView; } + + virtual void SetBackgroundColour(const wxColour&); + virtual bool SetBackgroundStyle(wxBackgroundStyle style); + + virtual void GetContentArea( int &left , int &top , int &width , int &height ) const; + virtual void Move(int x, int y, int width, int height); + virtual void GetPosition( int &x, int &y ) const; + virtual void GetSize( int &width, int &height ) const; + virtual void SetControlSize( wxWindowVariant variant ); + + virtual void SetNeedsDisplay( const wxRect* where = NULL ); + virtual bool GetNeedsDisplay() const; + + virtual void SetDrawingEnabled(bool enabled); + + virtual bool CanFocus() const; + // return true if successful + virtual bool SetFocus(); + virtual bool HasFocus() const; + + void RemoveFromParent(); + void Embed( wxWidgetImpl *parent ); + + void SetDefaultButton( bool isDefault ); + void PerformClick(); + virtual void SetLabel(const wxString& title, wxFontEncoding encoding); + + void SetCursor( const wxCursor & cursor ); + void CaptureMouse(); + void ReleaseMouse(); +#if wxUSE_DRAG_AND_DROP + void SetDropTarget(wxDropTarget* target); +#endif + wxInt32 GetValue() const; + void SetValue( wxInt32 v ); + wxBitmap GetBitmap() const; + void SetBitmap( const wxBitmap& bitmap ); + void SetBitmapPosition( wxDirection dir ); + void SetupTabs( const wxNotebook ¬ebook ); + void GetBestRect( wxRect *r ) const; + bool IsEnabled() const; + void Enable( bool enable ); + bool ButtonClickDidStateChange() { return true ;} + void SetMinimum( wxInt32 v ); + void SetMaximum( wxInt32 v ); + wxInt32 GetMinimum() const; + wxInt32 GetMaximum() const; + void PulseGauge(); + void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ); + + void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ); + void SetToolTip( wxToolTip* tooltip ); + + void InstallEventHandler( WXWidget control = NULL ); + + virtual bool DoHandleMouseEvent(NSEvent *event); + virtual bool DoHandleKeyEvent(NSEvent *event); + virtual bool DoHandleCharEvent(NSEvent *event, NSString *text); + virtual void DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow); + + virtual void SetupKeyEvent(wxKeyEvent &wxevent, NSEvent * nsEvent, NSString* charString = NULL); + virtual void SetupMouseEvent(wxMouseEvent &wxevent, NSEvent * nsEvent); + void SetupCoordinates(wxCoord &x, wxCoord &y, NSEvent *nsEvent); + virtual bool SetupCursor(NSEvent* event); + + +#if !wxOSX_USE_NATIVE_FLIPPED + void SetFlipped(bool flipped); + virtual bool IsFlipped() const { return m_isFlipped; } +#endif + + virtual double GetContentScaleFactor() const; + + // cocoa thunk connected calls + +#if wxUSE_DRAG_AND_DROP + virtual unsigned int draggingEntered(void* sender, WXWidget slf, void* _cmd); + virtual void draggingExited(void* sender, WXWidget slf, void* _cmd); + virtual unsigned int draggingUpdated(void* sender, WXWidget slf, void* _cmd); + virtual bool performDragOperation(void* sender, WXWidget slf, void* _cmd); +#endif + virtual void mouseEvent(WX_NSEvent event, WXWidget slf, void* _cmd); + virtual void cursorUpdate(WX_NSEvent event, WXWidget slf, void* _cmd); + virtual void keyEvent(WX_NSEvent event, WXWidget slf, void* _cmd); + virtual void insertText(NSString* text, WXWidget slf, void* _cmd); + virtual void doCommandBySelector(void* sel, WXWidget slf, void* _cmd); + virtual bool performKeyEquivalent(WX_NSEvent event, WXWidget slf, void* _cmd); + virtual bool acceptsFirstResponder(WXWidget slf, void* _cmd); + virtual bool becomeFirstResponder(WXWidget slf, void* _cmd); + virtual bool resignFirstResponder(WXWidget slf, void* _cmd); +#if !wxOSX_USE_NATIVE_FLIPPED + virtual bool isFlipped(WXWidget slf, void* _cmd); +#endif + virtual void drawRect(void* rect, WXWidget slf, void* _cmd); + + virtual void controlAction(WXWidget slf, void* _cmd, void* sender); + virtual void controlDoubleAction(WXWidget slf, void* _cmd, void *sender); + + // for wxTextCtrl-derived classes, put here since they don't all derive + // from the same pimpl class. + virtual void controlTextDidChange(); + +protected: + WXWidget m_osxView; + NSEvent* m_lastKeyDownEvent; +#if !wxOSX_USE_NATIVE_FLIPPED + bool m_isFlipped; +#endif + // if it the control has an editor, that editor will already send some + // events, don't resend them + bool m_hasEditor; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxWidgetCocoaImpl) +}; + +DECLARE_WXCOCOA_OBJC_CLASS( wxNSWindow ); + +class wxNonOwnedWindowCocoaImpl : public wxNonOwnedWindowImpl +{ +public : + wxNonOwnedWindowCocoaImpl( wxNonOwnedWindow* nonownedwnd) ; + wxNonOwnedWindowCocoaImpl(); + + virtual ~wxNonOwnedWindowCocoaImpl(); + + virtual void WillBeDestroyed() ; + void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size, + long style, long extraStyle, const wxString& name ) ; + void Create( wxWindow* parent, WXWindow nativeWindow ); + + WXWindow GetWXWindow() const; + void Raise(); + void Lower(); + bool Show(bool show); + + virtual bool ShowWithEffect(bool show, + wxShowEffect effect, + unsigned timeout); + + void Update(); + bool SetTransparent(wxByte alpha); + bool SetBackgroundColour(const wxColour& col ); + void SetExtraStyle( long exStyle ); + void SetWindowStyleFlag( long style ); + bool SetBackgroundStyle(wxBackgroundStyle style); + bool CanSetTransparent(); + + void MoveWindow(int x, int y, int width, int height); + void GetPosition( int &x, int &y ) const; + void GetSize( int &width, int &height ) const; + + void GetContentArea( int &left , int &top , int &width , int &height ) const; + bool SetShape(const wxRegion& region); + + virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) ; + + virtual bool IsMaximized() const; + + virtual bool IsIconized() const; + + virtual void Iconize( bool iconize ); + + virtual void Maximize(bool maximize); + + virtual bool IsFullScreen() const; + + virtual bool ShowFullScreen(bool show, long style); + + virtual void ShowWithoutActivating(); + + virtual void RequestUserAttention(int flags); + + virtual void ScreenToWindow( int *x, int *y ); + + virtual void WindowToScreen( int *x, int *y ); + + virtual bool IsActive(); + + virtual void SetModified(bool modified); + virtual bool IsModified() const; + + virtual void SetRepresentedFilename(const wxString& filename); + + wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } + + CGWindowLevel GetWindowLevel() const { return m_macWindowLevel; } + void RestoreWindowLevel(); + + static WX_NSResponder GetNextFirstResponder() ; +protected : + CGWindowLevel m_macWindowLevel; + WXWindow m_macWindow; + void * m_macFullScreenData ; + DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCocoaImpl) +}; + +DECLARE_WXCOCOA_OBJC_CLASS( wxNSButton ); + +class wxButtonCocoaImpl : public wxWidgetCocoaImpl, public wxButtonImpl +{ +public: + wxButtonCocoaImpl(wxWindowMac *wxpeer, wxNSButton *v); + virtual void SetBitmap(const wxBitmap& bitmap); +#if wxUSE_MARKUP + virtual void SetLabelMarkup(const wxString& markup); +#endif // wxUSE_MARKUP + + void SetPressedBitmap( const wxBitmap& bitmap ); + void GetLayoutInset(int &left , int &top , int &right, int &bottom) const; + void SetAcceleratorFromLabel(const wxString& label); + + NSButton *GetNSButton() const; +}; + +#ifdef __OBJC__ + typedef void (*wxOSX_TextEventHandlerPtr)(NSView* self, SEL _cmd, NSString *event); + typedef void (*wxOSX_EventHandlerPtr)(NSView* self, SEL _cmd, NSEvent *event); + typedef BOOL (*wxOSX_PerformKeyEventHandlerPtr)(NSView* self, SEL _cmd, NSEvent *event); + typedef BOOL (*wxOSX_FocusHandlerPtr)(NSView* self, SEL _cmd); + + + WXDLLIMPEXP_CORE NSScreen* wxOSXGetMenuScreen(); + WXDLLIMPEXP_CORE NSRect wxToNSRect( NSView* parent, const wxRect& r ); + WXDLLIMPEXP_CORE wxRect wxFromNSRect( NSView* parent, const NSRect& rect ); + WXDLLIMPEXP_CORE NSPoint wxToNSPoint( NSView* parent, const wxPoint& p ); + WXDLLIMPEXP_CORE wxPoint wxFromNSPoint( NSView* parent, const NSPoint& p ); + + NSRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , + bool adjustForOrigin = true ); + + WXDLLIMPEXP_CORE NSView* wxOSXGetViewFromResponder( NSResponder* responder ); + + // used for many wxControls + + @interface wxNSButton : NSButton + { + NSTrackingRectTag rectTag; + } + + @end + + @interface wxNSBox : NSBox + { + } + + @end + + @interface wxNSTextFieldEditor : NSTextView + { + NSEvent* lastKeyDownEvent; + } + + @end + + @interface wxNSTextField : NSTextField wxOSX_10_6_AND_LATER(<NSTextFieldDelegate>) + { + wxNSTextFieldEditor* fieldEditor; + } + + - (wxNSTextFieldEditor*) fieldEditor; + - (void) setFieldEditor:(wxNSTextFieldEditor*) fieldEditor; + + @end + + @interface wxNSSecureTextField : NSSecureTextField wxOSX_10_6_AND_LATER(<NSTextFieldDelegate>) + { + } + + @end + + + @interface wxNSTextView : NSTextView wxOSX_10_6_AND_LATER(<NSTextViewDelegate>) + { + } + + - (void)textDidChange:(NSNotification *)aNotification; + + @end + + @interface wxNSComboBox : NSComboBox + { + wxNSTextFieldEditor* fieldEditor; + } + + - (wxNSTextFieldEditor*) fieldEditor; + - (void) setFieldEditor:(wxNSTextFieldEditor*) fieldEditor; + + @end + + + + @interface wxNSMenu : NSMenu + { + wxMenuImpl* impl; + } + + - (void) setImplementation:(wxMenuImpl*) item; + - (wxMenuImpl*) implementation; + + @end + + @interface wxNSMenuItem : NSMenuItem + { + wxMenuItemImpl* impl; + } + + - (void) setImplementation:(wxMenuItemImpl*) item; + - (wxMenuItemImpl*) implementation; + + - (void)clickedAction:(id)sender; + - (BOOL)validateMenuItem:(NSMenuItem *)menuItem; + + @end + + void WXDLLIMPEXP_CORE wxOSXCocoaClassAddWXMethods(Class c); + + /* + We need this for ShowModal, as the sheet just disables the parent window and + returns control to the app, whereas we don't want to return from ShowModal + until the sheet has been dismissed. + */ + @interface ModalDialogDelegate : NSObject + { + BOOL sheetFinished; + int resultCode; + wxDialog* impl; + } + + - (void)setImplementation: (wxDialog *)dialog; + - (BOOL)finished; + - (int)code; + - (void)waitForSheetToFinish; + - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo; + @end + + // This interface must be exported in shared 64 bit multilib build but + // using WXEXPORT with Objective C interfaces doesn't work with old (4.0.1) + // gcc when using 10.4 SDK. It does work with newer gcc even in 32 bit + // builds but seems to be unnecessary there so to avoid the expense of a + // configure check verifying if this does work or not with the current + // compiler we just only use it for 64 bit builds where this is always + // supported. + // + // NB: Currently this is the only place where we need to export an + // interface but if we need to do it elsewhere we should define a + // WXEXPORT_OBJC macro once and reuse it in all places it's needed + // instead of duplicating this preprocessor check. +#ifdef __LP64__ + WXEXPORT +#endif // 64 bit builds + @interface wxNSAppController : NSObject wxOSX_10_6_AND_LATER(<NSApplicationDelegate>) + { + } + + @end + +#endif // __OBJC__ + +// NSCursor + +WX_NSCursor wxMacCocoaCreateStockCursor( int cursor_type ); +WX_NSCursor wxMacCocoaCreateCursorFromCGImage( CGImageRef cgImageRef, float hotSpotX, float hotSpotY ); +void wxMacCocoaSetCursor( WX_NSCursor cursor ); +void wxMacCocoaHideCursor(); +void wxMacCocoaShowCursor(); + +typedef struct tagClassicCursor +{ + wxUint16 bits[16]; + wxUint16 mask[16]; + wxInt16 hotspot[2]; +}ClassicCursor; + +const short kwxCursorBullseye = 0; +const short kwxCursorBlank = 1; +const short kwxCursorPencil = 2; +const short kwxCursorMagnifier = 3; +const short kwxCursorNoEntry = 4; +const short kwxCursorPaintBrush = 5; +const short kwxCursorPointRight = 6; +const short kwxCursorPointLeft = 7; +const short kwxCursorQuestionArrow = 8; +const short kwxCursorRightArrow = 9; +const short kwxCursorSizeNS = 10; +const short kwxCursorSize = 11; +const short kwxCursorSizeNESW = 12; +const short kwxCursorSizeNWSE = 13; +const short kwxCursorRoller = 14; +const short kwxCursorWatch = 15; +const short kwxCursorLast = kwxCursorWatch; + +// exposing our fallback cursor map + +extern ClassicCursor gMacCursors[]; + +extern NSLayoutManager* gNSLayoutManager; + +#endif + +#endif + // _WX_PRIVATE_COCOA_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/date.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/date.h new file mode 100644 index 0000000000..e7d9d40b6d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/date.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/cocoa/private/date.h +// Purpose: NSDate-related helpers +// Author: Vadim Zeitlin +// Created: 2011-12-19 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_COCOA_PRIVATE_DATE_H_ +#define _WX_OSX_COCOA_PRIVATE_DATE_H_ + +#include "wx/datetime.h" + +namespace wxOSXImpl +{ + +// Functions to convert between NSDate and wxDateTime. + +// Returns an NSDate corresponding to the given wxDateTime which can be invalid +// (in which case nil is returned). +inline NSDate* NSDateFromWX(const wxDateTime& dt) +{ + if ( !dt.IsValid() ) + return nil; + + // Get the internal representation as a double used by NSDate. + double ticks = dt.GetValue().ToDouble(); + + // wxDateTime uses milliseconds while NSDate uses (fractional) seconds. + return [NSDate dateWithTimeIntervalSince1970:ticks/1000.]; +} + + +// Returns wxDateTime corresponding to the given NSDate (which may be nil). +inline wxDateTime NSDateToWX(const NSDate* d) +{ + if ( !d ) + return wxDefaultDateTime; + + // Reverse everything done above. + wxLongLong ll; + ll.Assign([d timeIntervalSince1970]*1000); + wxDateTime dt(ll); + return dt; +} + +} // namespace wxOSXImpl + +#endif // _WX_OSX_COCOA_PRIVATE_DATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/markuptoattr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/markuptoattr.h new file mode 100644 index 0000000000..1d23d8e3b4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/markuptoattr.h @@ -0,0 +1,119 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/cocoa/private/markuptoattr.h +// Purpose: Class to convert markup to Cocoa attributed strings. +// Author: Vadim Zeitlin +// Created: 2011-02-22 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_COCOA_PRIVATE_MARKUPTOATTR_H_ +#define _WX_OSX_COCOA_PRIVATE_MARKUPTOATTR_H_ + +#include "wx/private/markupparserattr.h" + +// ---------------------------------------------------------------------------- +// wxMarkupToAttrString: create NSAttributedString from markup. +// ---------------------------------------------------------------------------- + +class wxMarkupToAttrString : public wxMarkupParserAttrOutput +{ +public: + // We don't care about the original colours because we never use them but + // we do need the correct initial font as we apply modifiers (e.g. create a + // font larger than it) to it and so it must be valid. + wxMarkupToAttrString(wxWindow *win, const wxString& markup) + : wxMarkupParserAttrOutput(win->GetFont(), wxColour(), wxColour()) + { + const wxCFStringRef + label(wxControl::RemoveMnemonics(wxMarkupParser::Strip(markup))); + m_attrString = [[NSMutableAttributedString alloc] + initWithString: label.AsNSString()]; + + m_pos = 0; + + [m_attrString beginEditing]; + + // First thing we do is change the default string font: as mentioned in + // Apple documentation, attributed strings use "Helvetica 12" font by + // default which is different from the system "Lucida Grande" font. So + // we need to explicitly change the font for the entire string. + [m_attrString addAttribute:NSFontAttributeName + value:win->GetFont().OSXGetNSFont() + range:NSMakeRange(0, [m_attrString length])]; + + // Now translate the markup tags to corresponding attributes. + wxMarkupParser parser(*this); + parser.Parse(markup); + + [m_attrString endEditing]; + } + + ~wxMarkupToAttrString() + { + [m_attrString release]; + } + + // Accessor for the users of this class. + // + // We keep ownership of the returned string. + NSMutableAttributedString *GetNSAttributedString() const + { + return m_attrString; + } + + + // Implement base class pure virtual methods to process markup tags. + virtual void OnText(const wxString& text) + { + m_pos += wxControl::RemoveMnemonics(text).length(); + } + + virtual void OnAttrStart(const Attr& WXUNUSED(attr)) + { + // Just remember the starting position of the range, we can't really + // set the attribute until we find the end of it. + m_rangeStarts.push(m_pos); + } + + virtual void OnAttrEnd(const Attr& attr) + { + unsigned start = m_rangeStarts.top(); + m_rangeStarts.pop(); + + const NSRange range = NSMakeRange(start, m_pos - start); + + [m_attrString addAttribute:NSFontAttributeName + value:attr.font.OSXGetNSFont() + range:range]; + + if ( attr.foreground.IsOk() ) + { + [m_attrString addAttribute:NSForegroundColorAttributeName + value:attr.foreground.OSXGetNSColor() + range:range]; + } + + if ( attr.background.IsOk() ) + { + [m_attrString addAttribute:NSBackgroundColorAttributeName + value:attr.background.OSXGetNSColor() + range:range]; + } + } + +private: + // The attributed string we're building. + NSMutableAttributedString *m_attrString; + + // The current position in the output string. + unsigned m_pos; + + // The positions of starting ranges. + wxStack<unsigned> m_rangeStarts; + + + wxDECLARE_NO_COPY_CLASS(wxMarkupToAttrString); +}; + +#endif // _WX_OSX_COCOA_PRIVATE_MARKUPTOATTR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/overlay.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/overlay.h new file mode 100644 index 0000000000..5a49e8104e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/overlay.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/cocoa/private/overlay.h +// Purpose: wxOverlayImpl declaration +// Author: Stefan Csomor +// Modified by: +// Created: 2006-10-20 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_COCOA_PRIVATE_OVERLAY_H_ +#define _WX_OSX_COCOA_PRIVATE_OVERLAY_H_ + +#include "wx/osx/private.h" +#include "wx/toplevel.h" +#include "wx/graphics.h" + +class wxOverlayImpl +{ +public: + wxOverlayImpl() ; + ~wxOverlayImpl() ; + + + // clears the overlay without restoring the former state + // to be done eg when the window content has been changed and repainted + void Reset(); + + // returns true if it has been setup + bool IsOk(); + + void Init( wxDC* dc, int x , int y , int width , int height ); + + void BeginDrawing( wxDC* dc); + + void EndDrawing( wxDC* dc); + + void Clear( wxDC* dc); + +private: + void CreateOverlayWindow(); + + WXWindow m_overlayWindow; + WXWindow m_overlayParentWindow; + CGContextRef m_overlayContext ; + // we store the window in case we would have to issue a Refresh() + wxWindow* m_window ; + + int m_x ; + int m_y ; + int m_width ; + int m_height ; +} ; + +#endif // _WX_MAC_CARBON_PRIVATE_OVERLAY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/textimpl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/textimpl.h new file mode 100644 index 0000000000..767f31cddb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cocoa/private/textimpl.h @@ -0,0 +1,125 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/cocoa/private/textimpl.h +// Purpose: textcontrol implementation classes that have to be exposed +// Author: Stefan Csomor +// Modified by: +// Created: 03/02/99 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_ +#define _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_ + +#include "wx/combobox.h" +#include "wx/osx/private.h" + +// implementation exposed, so that search control can pull it + +class wxNSTextFieldControl : public wxWidgetCocoaImpl, public wxTextWidgetImpl +{ +public : + // wxNSTextFieldControl must always be associated with a wxTextEntry. If + // it's associated with a wxTextCtrl then we can get the associated entry + // from it but otherwise the second ctor should be used to explicitly pass + // us the entry. + wxNSTextFieldControl( wxTextCtrl *text, WXWidget w ); + wxNSTextFieldControl( wxWindow *wxPeer, wxTextEntry *entry, WXWidget w ); + virtual ~wxNSTextFieldControl(); + + virtual bool CanClipMaxLength() const { return true; } + virtual void SetMaxLength(unsigned long len); + + virtual wxString GetStringValue() const ; + virtual void SetStringValue( const wxString &str) ; + virtual void Copy() ; + virtual void Cut() ; + virtual void Paste() ; + virtual bool CanPaste() const ; + virtual void SetEditable(bool editable) ; + virtual void GetSelection( long* from, long* to) const ; + virtual void SetSelection( long from , long to ); + virtual void WriteText(const wxString& str) ; + virtual bool HasOwnContextMenu() const { return true; } + virtual bool SetHint(const wxString& hint); + + virtual void controlAction(WXWidget slf, void* _cmd, void *sender); + virtual bool becomeFirstResponder(WXWidget slf, void *_cmd); + virtual bool resignFirstResponder(WXWidget slf, void *_cmd); + + virtual void SetInternalSelection( long from , long to ); + +protected : + NSTextField* m_textField; + long m_selStart; + long m_selEnd; + +private: + // Common part of both ctors. + void Init(WXWidget w); +}; + +class wxNSTextViewControl : public wxWidgetCocoaImpl, public wxTextWidgetImpl +{ +public: + wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w ); + virtual ~wxNSTextViewControl(); + + virtual wxString GetStringValue() const ; + virtual void SetStringValue( const wxString &str) ; + virtual void Copy() ; + virtual void Cut() ; + virtual void Paste() ; + virtual bool CanPaste() const ; + virtual void SetEditable(bool editable) ; + virtual void GetSelection( long* from, long* to) const ; + virtual void SetSelection( long from , long to ); + virtual void WriteText(const wxString& str) ; + virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ); + + virtual bool GetStyle(long position, wxTextAttr& style); + virtual void SetStyle(long start, long end, const wxTextAttr& style); + + virtual bool CanFocus() const; + + virtual bool HasOwnContextMenu() const { return true; } + + virtual void CheckSpelling(bool check); + virtual wxSize GetBestSize() const; + +protected: + NSScrollView* m_scrollView; + NSTextView* m_textView; +}; + +class wxNSComboBoxControl : public wxNSTextFieldControl, public wxComboWidgetImpl +{ +public : + wxNSComboBoxControl( wxComboBox *wxPeer, WXWidget w ); + virtual ~wxNSComboBoxControl(); + + virtual int GetSelectedItem() const; + virtual void SetSelectedItem(int item); + + virtual int GetNumberOfItems() const; + + virtual void InsertItem(int pos, const wxString& item); + virtual void RemoveItem(int pos); + + virtual void Clear(); + + virtual wxString GetStringAtIndex(int pos) const; + + virtual int FindString(const wxString& text) const; + virtual void Popup(); + virtual void Dismiss(); + + virtual void SetEditable(bool editable); + + virtual void mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd); + +private: + NSComboBox* m_comboBox; +}; + +#endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/colordlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/colordlg.h new file mode 100644 index 0000000000..832b46cf0d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/colordlg.h @@ -0,0 +1,39 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/colordlg.h +// Purpose: wxColourDialog class. Use generic version if no +// platform-specific implementation. +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLORDLG_H_ +#define _WX_COLORDLG_H_ + +#include "wx/dialog.h" + +/* + * Platform-specific colour dialog implementation + */ + +class WXDLLIMPEXP_CORE wxColourDialog: public wxDialog +{ +DECLARE_DYNAMIC_CLASS(wxColourDialog) +public: + wxColourDialog(); + wxColourDialog(wxWindow *parent, wxColourData *data = NULL); + + bool Create(wxWindow *parent, wxColourData *data = NULL); + + int ShowModal(); + wxColourData& GetColourData() { return m_colourData; } + +protected: + wxColourData m_colourData; + wxWindow* m_dialogParent; +}; + +#endif + // _WX_COLORDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/colour.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/colour.h new file mode 100644 index 0000000000..408625476d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/colour.h @@ -0,0 +1 @@ +#include "wx/osx/core/colour.h" diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/combobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/combobox.h new file mode 100644 index 0000000000..d7d16f503f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/combobox.h @@ -0,0 +1,191 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/combobox.h +// Purpose: wxComboBox class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COMBOBOX_H_ +#define _WX_COMBOBOX_H_ + +#include "wx/containr.h" +#include "wx/choice.h" +#include "wx/textctrl.h" + +WX_DEFINE_ARRAY( char * , wxComboBoxDataArray ) ; + +// forward declaration of private implementation classes + +class wxComboBoxText; +class wxComboBoxChoice; +class wxComboWidgetImpl; + +// Combobox item +class WXDLLIMPEXP_CORE wxComboBox : + public wxWindowWithItems< +#if wxOSX_USE_CARBON + wxNavigationEnabled<wxControl>, +#else + wxControl, +#endif + wxComboBoxBase> +{ + DECLARE_DYNAMIC_CLASS(wxComboBox) + + public: + virtual ~wxComboBox(); + +#if wxOSX_USE_CARBON + // forward these functions to all subcontrols + virtual bool Enable(bool enable = true); + virtual bool Show(bool show = true); +#endif + + // callback functions + virtual void DelegateTextChanged( const wxString& value ); + virtual void DelegateChoice( const wxString& value ); + + wxComboBox() { } + + wxComboBox(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + Create(parent, id, value, pos, size, n, choices, style, validator, name); + } + + wxComboBox(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + Create(parent, id, value, pos, size, choices, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + virtual int GetSelection() const; + virtual void GetSelection(long *from, long *to) const; + virtual void SetSelection(int n); + virtual void SetSelection(long from, long to); + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual wxString GetString(unsigned int n) const; + virtual wxString GetStringSelection() const; + virtual void SetString(unsigned int n, const wxString& s); + + virtual unsigned int GetCount() const; + + virtual void SetValue(const wxString& value); +// these methods are provided by wxTextEntry for the native impl. +#if wxOSX_USE_CARBON + // Text field functions + virtual wxString GetValue() const; + virtual void WriteText(const wxString& text); + + // Clipboard operations + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + virtual void SetInsertionPoint(long pos); + virtual void SetInsertionPointEnd(); + virtual long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to); + virtual void SetEditable(bool editable); + virtual bool IsEditable() const; + + virtual void Undo(); + virtual void Redo(); + virtual void SelectAll(); + + virtual bool CanCopy() const; + virtual bool CanCut() const; + virtual bool CanPaste() const; + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + virtual wxClientDataType GetClientDataType() const; + + virtual wxTextWidgetImpl* GetTextPeer() const; +#endif // wxOSX_USE_CARBON + +#if wxOSX_USE_COCOA + virtual void Popup(); + virtual void Dismiss(); +#endif // wxOSX_USE_COCOA + + + // osx specific event handling common for all osx-ports + + virtual bool OSXHandleClicked( double timestampsec ); + +#if wxOSX_USE_COCOA + wxComboWidgetImpl* GetComboPeer() const; +#endif +protected: + // List functions + virtual void DoDeleteOneItem(unsigned int n); + virtual void DoClear(); + + // wxTextEntry functions +#if wxOSX_USE_CARBON + virtual wxString DoGetValue() const; +#endif + virtual wxWindow *GetEditableWindow() { return this; } + + // override the base class virtuals involved in geometry calculations + virtual wxSize DoGetBestSize() const; +#if wxOSX_USE_CARBON + virtual void DoMoveWindow(int x, int y, int width, int height); +#endif + + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void * DoGetItemClientData(unsigned int n) const; + +#if wxOSX_USE_CARBON + virtual void SetClientDataType(wxClientDataType clientDataItemsType); +#endif + + virtual void EnableTextChangedEvents(bool enable); + + // the subcontrols + wxComboBoxText* m_text; + wxComboBoxChoice* m_choice; + + wxComboBoxDataArray m_datas; +}; + +#endif // _WX_COMBOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/config_xcode.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/config_xcode.h new file mode 100644 index 0000000000..1acc549ecf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/config_xcode.h @@ -0,0 +1,153 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/config_xcode.h +// Purpose: configurations for xcode builds +// Author: Stefan Csomor +// Modified by: +// Created: 29.04.04 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// from config.log confdefs + +#define HAVE_SSIZE_T 1 +#define STDC_HEADERS 1 +#ifdef __BIG_ENDIAN__ +#define WORDS_BIGENDIAN 1 +#endif +#define wxUSE_UNIX 1 +#define __UNIX__ 1 +#define __BSD__ 1 +#define __DARWIN__ 1 +#define wx_USE_NANOX 0 +#define TARGET_CARBON 1 + +#define HAVE_EXPLICIT 1 +#define HAVE_VA_COPY 1 +#define HAVE_VARIADIC_MACROS 1 +#define HAVE_STD_WSTRING 1 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 2 ) + #if !defined(__has_include) + #define HAVE_TR1_UNORDERED_MAP 1 + #define HAVE_TR1_UNORDERED_SET 1 + #define HAVE_TR1_TYPE_TRAITS 1 + #endif + #define HAVE_GCC_ATOMIC_BUILTINS 1 +#endif +#endif +#define HAVE_VISIBILITY 1 +#define wxHAVE_PTHREAD_CLEANUP 1 +#define CONST_COMPATIBILITY 0 +#define WX_TIMEZONE timezone +#define WX_SOCKLEN_T socklen_t +#define SOCKOPTLEN_T socklen_t +#define WX_STATFS_T struct statfs +#define wxTYPE_SA_HANDLER int +#define WX_GMTOFF_IN_TM 1 +#define HAVE_PW_GECOS 1 +#define HAVE_DLOPEN 1 +#define HAVE_CXA_DEMANGLE 1 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_FSYNC 1 +#define HAVE_ROUND 1 +#define HAVE_SCHED_YIELD 1 +#define HAVE_PTHREAD_MUTEXATTR_T 1 +#define HAVE_PTHREAD_MUTEXATTR_SETTYPE_DECL 1 +#define HAVE_PTHREAD_CANCEL 1 +#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 +#define HAVE_SNPRINTF 1 +#define HAVE_SNPRINTF_DECL 1 +#define HAVE_UNIX98_PRINTF 1 +#define HAVE_STATFS 1 +#define HAVE_STATFS_DECL 1 +#define HAVE_STRPTIME 1 +#define HAVE_STRPTIME_DECL 1 +#define HAVE_STRTOULL 1 +#define HAVE_THREAD_PRIORITY_FUNCTIONS 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_VSNPRINTF_DECL 1 +#define HAVE_VSSCANF 1 +#define HAVE_VSSCANF_DECL 1 +#define HAVE_USLEEP 1 +#define HAVE_WCSLEN 1 +#define SIZEOF_WCHAR_T 4 +#define SIZEOF_SHORT 2 +#define SIZEOF_INT 4 +#ifdef __LP64__ +#define SIZEOF_VOID_P 8 +#define SIZEOF_LONG 8 +#define SIZEOF_SIZE_T 8 +#else +#define SIZEOF_VOID_P 4 +#define SIZEOF_LONG 4 +#define SIZEOF_SIZE_T 4 +#endif +#define SIZEOF_LONG_LONG 8 +#define wxSIZE_T_IS_ULONG 1 +#define wxWCHAR_T_IS_REAL_TYPE 1 +#define HAVE_DLERROR 1 +#define HAVE_FCNTL 1 +#define HAVE_GETHOSTBYNAME 1 +#define HAVE_GETSERVBYNAME 1 +#define HAVE_GMTIME_R 1 +#define HAVE_INET_ADDR 1 +#define HAVE_INET_ATON 1 +#define HAVE_LOCALTIME_R 1 +#define HAVE_MKSTEMP 1 +#define HAVE_SETENV 1 +/* #define HAVE_PUTENV 1 */ +#define HAVE_STRTOK_R 1 +#define HAVE_UNAME 1 +#define HAVE_USLEEP 1 +#define HAVE_X11_XKBLIB_H 1 +#define HAVE_SCHED_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_WCHAR_H 1 +/* better to use the built-in CF conversions, also avoid iconv versioning problems */ +/* #undef HAVE_ICONV */ +#define ICONV_CONST +#define HAVE_LANGINFO_H 1 +#define HAVE_WCSRTOMBS 1 +#define HAVE_FPUTWS 1 +#define HAVE_WPRINTF 1 +#define HAVE_VSWPRINTF 1 +#define HAVE_VSWSCANF 1 +#define HAVE_FSEEKO 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_FDOPEN 1 +#define HAVE_SYSCONF 1 +#define HAVE_GETPWUID_R 1 +#define HAVE_GETGRGID_R 1 +#define HAVE_LOCALE_T 1 +#define wxHAS_KQUEUE 1 + +#define WXWIN_OS_DESCRIPTION "Darwin 7.9.0 Power Macintosh" +#define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org" +#define PACKAGE_NAME "wxWidgets" +#define PACKAGE_STRING "wxWidgets 3.0.1" +#define PACKAGE_TARNAME "wxwidgets" +#define PACKAGE_VERSION "3.0.1" + +// for regex +#define WX_NO_REGEX_ADVANCED 1 + +// for jpeg + +#define HAVE_STDLIB_H 1 + +// OBSOLETE ? + +#define HAVE_COS 1 +#define HAVE_FLOOR 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_MEMORY_H 1 + +#define HAVE_REGCOMP 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_X11_XLIB_H 1 +#define SOCKLEN_T socklen_t +#define _FILE_OFFSET_BITS 64 diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/control.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/control.h new file mode 100644 index 0000000000..f0d7c4606b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/control.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/control.h +// Purpose: wxControl class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CONTROL_H_ +#define _WX_CONTROL_H_ + +WXDLLIMPEXP_DATA_CORE(extern const char) wxControlNameStr[]; + +// General item class +class WXDLLIMPEXP_CORE wxControl : public wxControlBase +{ + DECLARE_ABSTRACT_CLASS(wxControl) + +public: + wxControl(); + wxControl(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr) + { + Create(parent, winid, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); + + // Simulates an event + virtual void Command(wxCommandEvent& event) { ProcessCommand(event); } + + // implementation from now on + // -------------------------- + + // Calls the callback and appropriate event handlers + bool ProcessCommand(wxCommandEvent& event); + + void OnKeyDown( wxKeyEvent &event ) ; +}; + +#endif + // _WX_CONTROL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/cfdataref.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/cfdataref.h new file mode 100644 index 0000000000..6c604cd069 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/cfdataref.h @@ -0,0 +1,96 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/cfdataref.h +// Purpose: wxCFDataRef class +// Author: Stefan Csomor +// Modified by: +// Created: 2007/05/10 +// Copyright: (c) 2007 Stefan Csomor +// Licence: wxWindows licence +// Notes: See http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBinaryData/index.html +///////////////////////////////////////////////////////////////////////////// +/*! @header wx/osx/core/cfdataref.h + @abstract wxCFDataRef template class +*/ + +#ifndef _WX_MAC_COREFOUNDATION_CFDATAREF_H__ +#define _WX_MAC_COREFOUNDATION_CFDATAREF_H__ + +#include "wx/osx/core/cfref.h" + +#include <CoreFoundation/CFData.h> + +/*! @class wxCFDataRef + @discussion Properly retains/releases reference to CoreFoundation data objects +*/ +class wxCFDataRef : public wxCFRef< CFDataRef > +{ +public: + /*! @method wxCFDataRef + @abstract Creates a NULL data ref + */ + wxCFDataRef() + {} + + typedef wxCFRef<CFDataRef> super_type; + + /*! @method wxCFDataRef + @abstract Assumes ownership of p and creates a reference to it. + @templatefield otherType Any type. + @param p The raw pointer to assume ownership of. May be NULL. + @discussion Like shared_ptr, it is assumed that the caller has a strong reference to p and intends + to transfer ownership of that reference to this ref holder. If the object comes from + a Create or Copy method then this is the correct behaviour. If the object comes from + a Get method then you must CFRetain it yourself before passing it to this constructor. + A handy way to do this is to use the non-member wxCFRefFromGet factory funcion. + This method is templated and takes an otherType *p. This prevents implicit conversion + using an operator refType() in a different ref-holding class type. + */ + explicit wxCFDataRef(CFDataRef r) + : super_type(r) + {} + + /*! @method wxCFDataRef + @abstract Copies a ref holder of the same type + @param otherRef The other ref holder to copy. + @discussion Ownership will be shared by the original ref and the newly created ref. That is, + the object will be explicitly retained by this new ref. + */ + wxCFDataRef(const wxCFDataRef& otherRef) + : super_type( otherRef ) + {} + + /*! @method wxCFDataRef + @abstract Copies raw data into a data ref + @param data The raw data. + @param length The data length. + */ + wxCFDataRef(const UInt8* data, CFIndex length) + : super_type(CFDataCreate(kCFAllocatorDefault, data, length)) + { + } + + /*! @method GetLength + @abstract returns the length in bytes of the data stored + */ + CFIndex GetLength() const + { + if ( m_ptr ) + return CFDataGetLength( *this ); + else + return 0; + } + + /*! @method GetBytes + @abstract Copies the data into an external buffer + @param range The desired range. + @param buffer The target buffer. + */ + void GetBytes( CFRange range, UInt8 *buffer ) const + { + if ( m_ptr ) + CFDataGetBytes(m_ptr, range, buffer); + } +}; + +#endif //ifndef _WX_MAC_COREFOUNDATION_CFDATAREF_H__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/cfref.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/cfref.h new file mode 100644 index 0000000000..c4a6b3c17a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/cfref.h @@ -0,0 +1,400 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/cfref.h +// Purpose: wxCFRef template class +// Author: David Elliott <dfe@cox.net> +// Modified by: Stefan Csomor +// Created: 2007/05/10 +// Copyright: (c) 2007 David Elliott <dfe@cox.net>, Stefan Csomor +// Licence: wxWindows licence +// Notes: See http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/index.html +///////////////////////////////////////////////////////////////////////////// +/*! @header wx/osx/core/cfref.h + @abstract wxCFRef template class + @discussion FIXME: Convert doc tags to something less buggy with C++ +*/ + +#ifndef _WX_MAC_COREFOUNDATION_CFREF_H__ +#define _WX_MAC_COREFOUNDATION_CFREF_H__ + +// Include unistd to ensure that NULL is defined +#include <unistd.h> +// Include AvailabilityMacros for DEPRECATED_ATTRIBUTE +#include <AvailabilityMacros.h> + +// #include <CoreFoundation/CFBase.h> +/* Don't include CFBase.h such that this header can be included from public + * headers with minimal namespace pollution. + * Note that Darwin CF uses extern for CF_EXPORT. If we need this on Win32 + * or non-Darwin Mac OS we'll need to define the appropriate __declspec. + */ +typedef const void *CFTypeRef; +extern "C" { +extern /* CF_EXPORT */ +CFTypeRef CFRetain(CFTypeRef cf); +extern /* CF_EXPORT */ +void CFRelease(CFTypeRef cf); +} // extern "C" + + +/*! @function wxCFRelease + @abstract A CFRelease variant that checks for NULL before releasing. + @discussion The parameter is template not for type safety but to ensure the argument + is a raw pointer and not a ref holder of any type. +*/ +template <class Type> +inline void wxCFRelease(Type *r) +{ + if ( r != NULL ) + ::CFRelease((CFTypeRef)r); +} + +/*! @function wxCFRetain + @abstract A typesafe CFRetain variant that checks for NULL. +*/ +template <class Type> +inline Type* wxCFRetain(Type *r) +{ + // NOTE(DE): Setting r to the result of CFRetain improves efficiency on both x86 and PPC + // Casting r to CFTypeRef ensures we are calling the real C version defined in CFBase.h + // and not any possibly templated/overloaded CFRetain. + if ( r != NULL ) + r = (Type*)::CFRetain((CFTypeRef)r); + return r; +} + +template <class refType> +class wxCFRef; + +/*! @class wxCFWeakRef + @templatefield refType The CF reference type (e.g. CFStringRef, CFRunLoopRef, etc.) + It should already be a pointer. This is different from + shared_ptr where the template parameter is the pointee type. + @discussion Wraps a raw pointer without any retain or release. + Provides a way to get what amounts to a raw pointer from a wxCFRef without + using a raw pointer. Unlike a raw pointer, constructing a wxCFRef from this + class will cause it to be retained because it is assumed that a wxCFWeakRef + does not own its pointer. +*/ +template <class refType> +class wxCFWeakRef +{ + template <class refTypeA, class otherRefType> + friend wxCFWeakRef<refTypeA> static_cfref_cast(const wxCFRef<otherRefType> &otherRef); +public: + /*! @method wxCFWeakRef + @abstract Creates a NULL reference + */ + wxCFWeakRef() + : m_ptr(NULL) + {} + + // Default copy constructor is fine. + // Default destructor is fine but we'll set NULL to avoid bugs + ~wxCFWeakRef() + { m_ptr = NULL; } + + // Do not implement a raw-pointer constructor. + + /*! @method wxCFWeakRef + @abstract Copies another ref holder where its type can be converted to ours + @templatefield otherRefType Any type held by another wxCFWeakRef. + @param otherRef The other weak ref holder to copy. + @discussion This is merely a copy or implicit cast. + */ + template <class otherRefType> + wxCFWeakRef(const wxCFWeakRef<otherRefType>& otherRef) + : m_ptr(otherRef.get()) // Implicit conversion from otherRefType to refType should occur + {} + + /*! @method wxCFWeakRef + @abstract Copies a strong ref holder where its type can be converted to ours + @templatefield otherRefType Any type held by a wxCFRef. + @param otherRef The strong ref holder to copy. + @discussion This ref is merely a pointer copy, the strong ref still holds the pointer. + */ + template <class otherRefType> + wxCFWeakRef(const wxCFRef<otherRefType>& otherRef) + : m_ptr(otherRef.get()) // Implicit conversion from otherRefType to refType should occur + {} + + /*! @method get + @abstract Explicit conversion to the underlying pointer type + @discussion Allows the caller to explicitly get the underlying pointer. + */ + refType get() const + { return m_ptr; } + + /*! @method operator refType + @abstract Implicit conversion to the underlying pointer type + @discussion Allows the ref to be used in CF function calls. + */ + operator refType() const + { return m_ptr; } + +protected: + /*! @method wxCFWeakRef + @abstract Constructs a weak reference to the raw pointer + @templatefield otherType Any type. + @param p The raw pointer to assume ownership of. May be NULL. + @discussion This method is private so that the friend static_cfref_cast can use it + */ + template <class otherType> + explicit wxCFWeakRef(otherType *p) + : m_ptr(p) // Implicit conversion from otherType* to refType should occur. + {} + + /*! @var m_ptr The raw pointer. + */ + refType m_ptr; +}; + +/*! @class wxCFRef + @templatefield refType The CF reference type (e.g. CFStringRef, CFRunLoopRef, etc.) + It should already be a pointer. This is different from + shared_ptr where the template parameter is the pointee type. + @discussion Properly retains/releases reference to CoreFoundation objects +*/ +template <class refType> +class wxCFRef +{ +public: + /*! @method wxCFRef + @abstract Creates a NULL reference + */ + wxCFRef() + : m_ptr(NULL) + {} + + /*! @method wxCFRef + @abstract Assumes ownership of p and creates a reference to it. + @templatefield otherType Any type. + @param p The raw pointer to assume ownership of. May be NULL. + @discussion Like shared_ptr, it is assumed that the caller has a strong reference to p and intends + to transfer ownership of that reference to this ref holder. If the object comes from + a Create or Copy method then this is the correct behaviour. If the object comes from + a Get method then you must CFRetain it yourself before passing it to this constructor. + A handy way to do this is to use the non-member wxCFRefFromGet factory funcion. + This method is templated and takes an otherType *p. This prevents implicit conversion + using an operator refType() in a different ref-holding class type. + */ + template <class otherType> + explicit wxCFRef(otherType *p) + : m_ptr(p) // Implicit conversion from otherType* to refType should occur. + {} + + /*! @method wxCFRef + @abstract Copies a ref holder of the same type + @param otherRef The other ref holder to copy. + @discussion Ownership will be shared by the original ref and the newly created ref. That is, + the object will be explicitly retained by this new ref. + */ + wxCFRef(const wxCFRef& otherRef) + : m_ptr(wxCFRetain(otherRef.m_ptr)) + {} + + /*! @method wxCFRef + @abstract Copies a ref holder where its type can be converted to ours + @templatefield otherRefType Any type held by another wxCFRef. + @param otherRef The other ref holder to copy. + @discussion Ownership will be shared by the original ref and the newly created ref. That is, + the object will be explicitly retained by this new ref. + */ + template <class otherRefType> + wxCFRef(const wxCFRef<otherRefType>& otherRef) + : m_ptr(wxCFRetain(otherRef.get())) // Implicit conversion from otherRefType to refType should occur + {} + + /*! @method wxCFRef + @abstract Copies a weak ref holder where its type can be converted to ours + @templatefield otherRefType Any type held by a wxCFWeakRef. + @param otherRef The weak ref holder to copy. + @discussion Ownership will be taken by this newly created ref. That is, + the object will be explicitly retained by this new ref. + Ownership is most likely shared with some other ref as well. + */ + template <class otherRefType> + wxCFRef(const wxCFWeakRef<otherRefType>& otherRef) + : m_ptr(wxCFRetain(otherRef.get())) // Implicit conversion from otherRefType to refType should occur + {} + + /*! @method ~wxCFRef + @abstract Releases (potentially shared) ownership of the ref. + @discussion A ref holder instance is always assumed to have ownership so ownership is always + released (CFRelease called) upon destruction. + */ + ~wxCFRef() + { reset(); } + + /*! @method operator= + @abstract Assigns the other ref's pointer to us when the otherRef is the same type. + @param otherRef The other ref holder to copy. + @discussion The incoming pointer is retained, the original pointer is released, and this object + is made to point to the new pointer. + */ + wxCFRef& operator=(const wxCFRef& otherRef) + { + if (this != &otherRef) + { + wxCFRetain(otherRef.m_ptr); + wxCFRelease(m_ptr); + m_ptr = otherRef.m_ptr; + } + return *this; + } + + /*! @method operator= + @abstract Assigns the other ref's pointer to us when the other ref can be converted to our type. + @templatefield otherRefType Any type held by another wxCFRef + @param otherRef The other ref holder to copy. + @discussion The incoming pointer is retained, the original pointer is released, and this object + is made to point to the new pointer. + */ + template <class otherRefType> + wxCFRef& operator=(const wxCFRef<otherRefType>& otherRef) + { + wxCFRetain(otherRef.get()); + wxCFRelease(m_ptr); + m_ptr = otherRef.get(); // Implicit conversion from otherRefType to refType should occur + return *this; + } + + /*! @method get + @abstract Explicit conversion to the underlying pointer type + @discussion Allows the caller to explicitly get the underlying pointer. + */ + refType get() const + { return m_ptr; } + + /*! @method operator refType + @abstract Implicit conversion to the underlying pointer type + @discussion Allows the ref to be used in CF function calls. + */ + operator refType() const + { return m_ptr; } + +#if 0 + < // HeaderDoc is retarded and thinks the GT from operator-> is part of a template param. + // So give it that < outside of a comment to fake it out. (if 0 is not a comment to HeaderDoc) +#endif + + /*! @method operator-> + @abstract Implicit conversion to the underlying pointer type + @discussion This is nearly useless for CF types which are nearly always opaque + */ + refType operator-> () const + { return m_ptr; } + + /*! @method reset + @abstract Nullifies the reference + @discussion Releases ownership (calls CFRelease) before nullifying the pointer. + */ + void reset() + { + wxCFRelease(m_ptr); + m_ptr = NULL; + } + + /*! @method reset + @abstract Sets this to a new reference + @templatefield otherType Any type. + @param p The raw pointer to assume ownership of + @discussion The existing reference is released (like destruction). It is assumed that the caller + has a strong reference to the new p and intends to transfer ownership of that reference + to this ref holder. Take care to call CFRetain if you received the object from a Get method. + This method is templated and takes an otherType *p. This prevents implicit conversion + using an operator refType() in a different ref-holding class type. + */ + template <class otherType> + void reset(otherType* p) + { + wxCFRelease(m_ptr); + m_ptr = p; // Automatic conversion should occur + } + + // Release the pointer, i.e. give up its ownership. + refType release() + { + refType p = m_ptr; + m_ptr = NULL; + return p; + } + +protected: + /*! @var m_ptr The raw pointer. + */ + refType m_ptr; +}; + +/*! @function wxCFRefFromGet + @abstract Factory function to create wxCFRef from a raw pointer obtained from a Get-rule function + @param p The pointer to retain and create a wxCFRef from. May be NULL. + @discussion Unlike the wxCFRef raw pointer constructor, this function explicitly retains its + argument. This can be used for functions such as CFDictionaryGetValue() or + CFAttributedStringGetString() which return a temporary reference (Get-rule functions). + FIXME: Anybody got a better name? +*/ +template <typename Type> +inline wxCFRef<Type*> wxCFRefFromGet(Type *p) +{ + return wxCFRef<Type*>(wxCFRetain(p)); +} + +/*! @function static_cfref_cast + @abstract Works like static_cast but with a wxCFRef as the argument. + @param refType Template parameter. The destination raw pointer type + @param otherRef Normal parameter. The source wxCFRef<> object. + @discussion This is intended to be a clever way to make static_cast work while allowing + the return value to be converted to either a strong ref or a raw pointer + while ensuring that the retain count is updated appropriately. + + This is modeled after shared_ptr's static_pointer_cast. Just as wxCFRef is + parameterized on a pointer to an opaque type so is this class. Note that + this differs from shared_ptr which is parameterized on the pointee type. + + FIXME: Anybody got a better name? +*/ +template <class refType, class otherRefType> +inline wxCFWeakRef<refType> static_cfref_cast(const wxCFRef<otherRefType> &otherRef); + +template <class refType, class otherRefType> +inline wxCFWeakRef<refType> static_cfref_cast(const wxCFRef<otherRefType> &otherRef) +{ + return wxCFWeakRef<refType>(static_cast<refType>(otherRef.get())); +} + +/*! @function CFRelease + @abstract Overloads CFRelease so that the user is warned of bad behaviour. + @discussion It is rarely appropriate to retain or release a wxCFRef. If one absolutely + must do it he can explicitly get() the raw pointer + Normally, this function is unimplemented resulting in a linker error if used. +*/ +template <class T> +inline void CFRelease(const wxCFRef<T*> & cfref) DEPRECATED_ATTRIBUTE; + +/*! @function CFRetain + @abstract Overloads CFRetain so that the user is warned of bad behaviour. + @discussion It is rarely appropriate to retain or release a wxCFRef. If one absolutely + must do it he can explicitly get() the raw pointer + Normally, this function is unimplemented resulting in a linker error if used. +*/ +template <class T> +inline void CFRetain(const wxCFRef<T*>& cfref) DEPRECATED_ATTRIBUTE; + +// Change the 0 to a 1 if you want the functions to work (no link errors) +// Neither function will cause retain/release side-effects if implemented. +#if 0 +template <class T> +void CFRelease(const wxCFRef<T*> & cfref) +{ + CFRelease(cfref.get()); +} + +template <class T> +void CFRetain(const wxCFRef<T*> & cfref) +{ + CFRetain(cfref.get()); +} +#endif + +#endif //ndef _WX_MAC_COREFOUNDATION_CFREF_H__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/cfstring.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/cfstring.h new file mode 100644 index 0000000000..cbe092463b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/cfstring.h @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/cfstring.h +// Purpose: wxCFStringRef and other string functions +// Author: Stefan Csomor +// Modified by: +// Created: 2004-10-29 (from code in wx/mac/carbon/private.h) +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +// Usage: Darwin (base library) +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_CFSTRINGHOLDER_H__ +#define __WX_CFSTRINGHOLDER_H__ + +#include <CoreFoundation/CFString.h> + +#include "wx/dlimpexp.h" +#include "wx/fontenc.h" +#include "wx/osx/core/cfref.h" + +#ifdef WORDS_BIGENDIAN + #define kCFStringEncodingUTF32Native kCFStringEncodingUTF32BE +#else + #define kCFStringEncodingUTF32Native kCFStringEncodingUTF32LE +#endif + +class WXDLLIMPEXP_FWD_BASE wxString; + +WXDLLIMPEXP_BASE void wxMacConvertNewlines13To10( wxString *data ) ; +WXDLLIMPEXP_BASE void wxMacConvertNewlines10To13( wxString *data ) ; + +WXDLLIMPEXP_BASE void wxMacConvertNewlines13To10( char * data ) ; +WXDLLIMPEXP_BASE void wxMacConvertNewlines10To13( char * data ) ; + +WXDLLIMPEXP_BASE wxUint32 wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding) ; +WXDLLIMPEXP_BASE wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding) ; +WXDLLIMPEXP_BASE void wxMacWakeUp() ; + +class WXDLLIMPEXP_BASE wxCFStringRef : public wxCFRef< CFStringRef > +{ +public: + wxCFStringRef() + { + } + + wxCFStringRef(const wxString &str, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) ; + +#if wxOSX_USE_COCOA_OR_IPHONE + wxCFStringRef(NSString* ref) + : wxCFRef< CFStringRef >((CFStringRef) ref) + { + } +#endif + + wxCFStringRef(CFStringRef ref) + : wxCFRef< CFStringRef >(ref) + { + } + + wxCFStringRef(const wxCFStringRef& otherRef ) + : wxCFRef< CFStringRef >(otherRef) + { + } + + ~wxCFStringRef() + { + } + + wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) const; + + static wxString AsString( CFStringRef ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; + static wxString AsStringWithNormalizationFormC( CFStringRef ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; +#if wxOSX_USE_COCOA_OR_IPHONE + static wxString AsString( NSString* ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; + static wxString AsStringWithNormalizationFormC( NSString* ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; +#endif + +#if wxOSX_USE_COCOA_OR_IPHONE + NSString* AsNSString() const { return (NSString*)(CFStringRef) *this; } +#endif +private: +} ; + +// corresponding class for holding UniChars (native unicode characters) + +class WXDLLIMPEXP_BASE wxMacUniCharBuffer +{ +public : + wxMacUniCharBuffer( const wxString &str ) ; + + ~wxMacUniCharBuffer() ; + + UniCharPtr GetBuffer() ; + + UniCharCount GetChars() ; + +private : + UniCharPtr m_ubuf ; + UniCharCount m_chars ; +}; +#endif //__WXCFSTRINGHOLDER_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/colour.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/colour.h new file mode 100644 index 0000000000..004b627f61 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/colour.h @@ -0,0 +1,87 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/colour.h +// Purpose: wxColour class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLOUR_H_ +#define _WX_COLOUR_H_ + +#include "wx/object.h" +#include "wx/string.h" + +#include "wx/osx/core/cfref.h" + +struct RGBColor; + +// Colour +class WXDLLIMPEXP_CORE wxColour: public wxColourBase +{ +public: + // constructors + // ------------ + DEFINE_STD_WXCOLOUR_CONSTRUCTORS + + // default copy ctor and dtor are ok + + // accessors + virtual bool IsOk() const { return m_cgColour != NULL; } + + virtual WXDLLIMPEXP_INLINE_CORE ChannelType Red() const { return m_red; } + virtual WXDLLIMPEXP_INLINE_CORE ChannelType Green() const { return m_green; } + virtual WXDLLIMPEXP_INLINE_CORE ChannelType Blue() const { return m_blue; } + virtual WXDLLIMPEXP_INLINE_CORE ChannelType Alpha() const { return m_alpha; } + + // comparison + bool operator == (const wxColour& colour) const; + + bool operator != (const wxColour& colour) const { return !(*this == colour); } + + CGColorRef GetPixel() const { return m_cgColour; } + + CGColorRef GetCGColor() const { return m_cgColour; } + CGColorRef CreateCGColor() const { return wxCFRetain( (CGColorRef)m_cgColour ); } + +#if wxOSX_USE_COCOA_OR_CARBON + void GetRGBColor( RGBColor *col ) const; +#endif + + // Mac-specific ctor and assignment operator from the native colour + // assumes ownership of CGColorRef + wxColour( CGColorRef col ); +#if wxOSX_USE_COCOA_OR_CARBON + wxColour(const RGBColor& col); + wxColour& operator=(const RGBColor& col); +#endif +#if wxOSX_USE_COCOA + wxColour(WX_NSColor color); + WX_NSColor OSXGetNSColor() const; +#endif + wxColour& operator=(CGColorRef col); + wxColour& operator=(const wxColour& col); + +protected : + virtual void + InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a); +#if wxOSX_USE_COCOA_OR_CARBON + void InitRGBColor( const RGBColor& col ); +#endif + void InitCGColorRef( CGColorRef col ); + void InitFromComponents(const CGFloat* components, size_t numComponents ); +private: + wxCFRef<CGColorRef> m_cgColour; + + ChannelType m_red; + ChannelType m_blue; + ChannelType m_green; + ChannelType m_alpha; + + DECLARE_DYNAMIC_CLASS(wxColour) +}; + +#endif + // _WX_COLOUR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/dataview.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/dataview.h new file mode 100644 index 0000000000..61d05bf309 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/dataview.h @@ -0,0 +1,117 @@ + +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/dataview.h +// Purpose: wxDataViewCtrl native implementation header for OSX +// Author: +// Copyright: (c) 2009 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DATAVIEWCTRL_CORE_H_ +#define _WX_DATAVIEWCTRL_CORE_H_ + +#include "wx/dataview.h" + +#if wxOSX_USE_CARBON +typedef wxMacControl wxWidgetImplType; +#else +typedef wxWidgetImpl wxWidgetImplType; +#endif + +// --------------------------------------------------------- +// Helper functions for dataview implementation on OSX +// --------------------------------------------------------- +wxWidgetImplType* CreateDataView(wxWindowMac* wxpeer, wxWindowMac* parent, wxWindowID id, + wxPoint const& pos, wxSize const& size, + long style, long extraStyle); +wxString ConcatenateDataViewItemValues(wxDataViewCtrl const* dataViewCtrlPtr, wxDataViewItem const& dataViewItem); // concatenates all data of the visible columns of the passed control + // and item TAB separated into a string and returns it + +// --------------------------------------------------------- +// wxDataViewWidgetImpl +// Common interface of the native dataview implementation +// for the carbon and cocoa environment. +// ATTENTION +// All methods assume that the passed column pointers are +// valid (unless a NULL pointer is explicitly allowed +// to be passed)! +// ATTENTION +// --------------------------------------------------------- +class WXDLLIMPEXP_CORE wxDataViewWidgetImpl +{ +public: + // + // constructors / destructor + // + virtual ~wxDataViewWidgetImpl(void) + { + } + + // + // column related methods + // + virtual bool ClearColumns (void) = 0; // deletes all columns in the native control + virtual bool DeleteColumn (wxDataViewColumn* columnPtr) = 0; // deletes the column in the native control + virtual void DoSetExpanderColumn(wxDataViewColumn const* columnPtr) = 0; // sets the disclosure column in the native control + virtual wxDataViewColumn* GetColumn (unsigned int pos) const = 0; // returns the column belonging to 'pos' in the native control + virtual int GetColumnPosition (wxDataViewColumn const* columnPtr) const = 0; // returns the position of the passed column in the native control + virtual bool InsertColumn (unsigned int pos, wxDataViewColumn* columnPtr) = 0; // inserts a column at pos in the native control; + // the method can assume that the column's owner is already set + virtual void FitColumnWidthToContent(unsigned int pos) = 0; // resizes column to fit its content + + // + // item related methods + // + virtual bool Add (wxDataViewItem const& parent, wxDataViewItem const& item) = 0; // adds an item to the native control + virtual bool Add (wxDataViewItem const& parent, wxDataViewItemArray const& itesm) = 0; // adds a items to the native control + virtual void Collapse (wxDataViewItem const& item) = 0; // collapses the passed item in the native control + virtual void EnsureVisible(wxDataViewItem const& item, wxDataViewColumn const* columnPtr) = 0; // ensures that the passed item's value in the passed column is visible (column pointer can be NULL) + virtual void Expand (wxDataViewItem const& item) = 0; // expands the passed item in the native control + virtual unsigned int GetCount (void) const = 0; // returns the number of items in the native control + virtual wxRect GetRectangle (wxDataViewItem const& item, wxDataViewColumn const* columnPtr) = 0; // returns the rectangle that is used by the passed item and column in the native control + virtual bool IsExpanded (wxDataViewItem const& item) const = 0; // checks if the passed item is expanded in the native control + virtual bool Reload (void) = 0; // clears the native control and reloads all data + virtual bool Remove (wxDataViewItem const& parent, wxDataViewItem const& item) = 0; // removes an item from the native control + virtual bool Remove (wxDataViewItem const& parent, wxDataViewItemArray const& item) = 0; // removes items from the native control + virtual bool Update (wxDataViewColumn const* columnPtr) = 0; // updates the items in the passed column of the native control + virtual bool Update (wxDataViewItem const& parent, wxDataViewItem const& item) = 0; // updates the passed item in the native control + virtual bool Update (wxDataViewItem const& parent, wxDataViewItemArray const& items) = 0; // updates the passed items in the native control + + // + // model related methods + // + virtual bool AssociateModel(wxDataViewModel* model) = 0; // informs the native control that a model is present + + // + // selection related methods + // + virtual wxDataViewItem GetCurrentItem() const = 0; + virtual void SetCurrentItem(const wxDataViewItem& item) = 0; + + virtual wxDataViewColumn *GetCurrentColumn() const = 0; + + virtual int GetSelectedItemsCount() const = 0; + virtual int GetSelections(wxDataViewItemArray& sel) const = 0; // returns all selected items in the native control + virtual bool IsSelected (wxDataViewItem const& item) const = 0; // checks if the passed item is selected in the native control + virtual void Select (wxDataViewItem const& item) = 0; // selects the passed item in the native control + virtual void SelectAll (void) = 0; // selects all items in the native control + virtual void Unselect (wxDataViewItem const& item) = 0; // unselects the passed item in the native control + virtual void UnselectAll (void) = 0; // unselects all items in the native control + + // + // sorting related methods + // + virtual wxDataViewColumn* GetSortingColumn (void) const = 0; // returns the column that is primarily responsible for sorting in the native control + virtual void Resort (void) = 0; // asks the native control to start a resorting process + + // + // other methods + // + virtual void DoSetIndent (int indent) = 0; // sets the indention in the native control + virtual void HitTest (wxPoint const& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const = 0; // return the item and column pointer that contains with the passed point + virtual void SetRowHeight(wxDataViewItem const& item, unsigned int height) = 0; // sets the height of the row containg the passed item in the native control + virtual void OnSize (void) = 0; // updates the layout of the native control after a size event + virtual void StartEditor( const wxDataViewItem & item, unsigned int column ) = 0; // starts editing the passed in item and column +}; + +#endif // _WX_DATAVIEWCTRL_CORE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/evtloop.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/evtloop.h new file mode 100644 index 0000000000..f3e181f6c4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/evtloop.h @@ -0,0 +1,114 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/evtloop.h +// Purpose: CoreFoundation-based event loop +// Author: Vadim Zeitlin +// Modified by: +// Created: 2006-01-12 +// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_CORE_EVTLOOP_H_ +#define _WX_OSX_CORE_EVTLOOP_H_ + +DECLARE_WXOSX_OPAQUE_CFREF( CFRunLoop ) +DECLARE_WXOSX_OPAQUE_CFREF( CFRunLoopObserver ) + +class WXDLLIMPEXP_FWD_BASE wxCFEventLoopPauseIdleEvents; + +class WXDLLIMPEXP_BASE wxCFEventLoop : public wxEventLoopBase +{ + friend class wxCFEventLoopPauseIdleEvents; +public: + wxCFEventLoop(); + virtual ~wxCFEventLoop(); + + // sets the "should exit" flag and wakes up the loop so that it terminates + // soon + virtual void ScheduleExit(int rc = 0); + + // return true if any events are available + virtual bool Pending() const; + + // dispatch a single event, return false if we should exit from the loop + virtual bool Dispatch(); + + // same as Dispatch() but doesn't wait for longer than the specified (in + // ms) timeout, return true if an event was processed, false if we should + // exit the loop or -1 if timeout expired + virtual int DispatchTimeout(unsigned long timeout); + + // implement this to wake up the loop: usually done by posting a dummy event + // to it (can be called from non main thread) + virtual void WakeUp(); + + virtual bool YieldFor(long eventsToProcess); + + bool ShouldProcessIdleEvents() const { return m_processIdleEvents ; } + +#if wxUSE_UIACTIONSIMULATOR + // notifies Yield and Dispatch to wait for at least one event before + // returning, this is necessary, because the synthesized events need to be + // converted by the OS before being available on the native event queue + void SetShouldWaitForEvent(bool should) { m_shouldWaitForEvent = should; } +#endif +protected: + // enters a loop calling OnNextIteration(), Pending() and Dispatch() and + // terminating when Exit() is called + virtual int DoRun(); + + void CommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity); + void DefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity); + + // set to false to avoid idling at unexpected moments - eg when having native message boxes + void SetProcessIdleEvents(bool process) { m_processIdleEvents = process; } + + static void OSXCommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info); + static void OSXDefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info); + + // get the currently executing CFRunLoop + virtual CFRunLoopRef CFGetCurrentRunLoop() const; + + virtual int DoDispatchTimeout(unsigned long timeout); + + virtual void OSXDoRun(); + virtual void OSXDoStop(); + + // the loop exit code + int m_exitcode; + + // cfrunloop + CFRunLoopRef m_runLoop; + + // common modes runloop observer + CFRunLoopObserverRef m_commonModeRunLoopObserver; + + // default mode runloop observer + CFRunLoopObserverRef m_defaultModeRunLoopObserver; + + // set to false to avoid idling at unexpected moments - eg when having native message boxes + bool m_processIdleEvents; + +#if wxUSE_UIACTIONSIMULATOR + bool m_shouldWaitForEvent; +#endif +private: + // process all already pending events and dispatch a new one (blocking + // until it appears in the event queue if necessary) + // + // returns the return value of DoDispatchTimeout() + int DoProcessEvents(); + + wxDECLARE_NO_COPY_CLASS(wxCFEventLoop); +}; + +class WXDLLIMPEXP_BASE wxCFEventLoopPauseIdleEvents : public wxObject +{ +public: + wxCFEventLoopPauseIdleEvents(); + virtual ~wxCFEventLoopPauseIdleEvents(); +private: + bool m_formerState; +}; + +#endif // _WX_OSX_EVTLOOP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/hid.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/hid.h new file mode 100644 index 0000000000..20c1a7ba41 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/hid.h @@ -0,0 +1,114 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/hid.h +// Purpose: DARWIN HID layer for WX +// Author: Ryan Norton +// Modified by: +// Created: 11/11/2003 +// Copyright: (c) Ryan Norton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// declarations +// =========================================================================== + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +#ifndef _WX_MACCARBONHID_H_ +#define _WX_MACCARBONHID_H_ + +#include "wx/defs.h" +#include "wx/string.h" + +//Mac OSX only +#ifdef __DARWIN__ + +#include <IOKit/IOKitLib.h> +#include <IOKit/IOCFPlugIn.h> +#include <IOKit/hid/IOHIDLib.h> +#include <IOKit/hid/IOHIDKeys.h> +#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h> + +//Darn apple - doesn't properly wrap their headers in extern "C"! +//http://www.macosx.com/forums/archive/index.php/t-68069.html +extern "C" { +#include <mach/mach_port.h> +} + +#include <mach/mach.h> //this actually includes mach_port.h (see above) + +// =========================================================================== +// definitions +// =========================================================================== + + +// --------------------------------------------------------------------------- +// wxHIDDevice +// +// A wrapper around OS X HID Manager procedures. +// The tutorial "Working With HID Class Device Interfaces" Is +// Quite good, as is the sample program associated with it +// (Depite the author's protests!). +// --------------------------------------------------------------------------- +class WXDLLIMPEXP_CORE wxHIDDevice +{ +public: + wxHIDDevice() : m_ppDevice(NULL), m_ppQueue(NULL), m_pCookies(NULL) {} + + bool Create (int nClass = -1, int nType = -1, int nDev = 1); + + static size_t GetCount(int nClass = -1, int nType = -1); + + void AddCookie(CFTypeRef Data, int i); + void AddCookieInQueue(CFTypeRef Data, int i); + void InitCookies(size_t dwSize, bool bQueue = false); + + //Must be implemented by derived classes + //builds the cookie array - + //first call InitCookies to initialize the cookie + //array, then AddCookie to add a cookie at a certain point in an array + virtual void BuildCookies(CFArrayRef Array) = 0; + + //checks to see whether the cookie at nIndex is active (element value != 0) + bool IsActive(int nIndex); + + //checks to see whether an element in the internal cookie array + //exists + bool HasElement(int nIndex); + + //closes the device and cleans the queue and cookies + virtual ~wxHIDDevice(); + +protected: + IOHIDDeviceInterface** m_ppDevice; //this, essentially + IOHIDQueueInterface** m_ppQueue; //queue (if we want one) + IOHIDElementCookie* m_pCookies; //cookies + + wxString m_szProductName; //product name + int m_nProductId; //product id + int m_nManufacturerId; //manufacturer id + mach_port_t m_pPort; //mach port to use +}; + +// --------------------------------------------------------------------------- +// wxHIDKeyboard +// +// Semi-simple implementation that opens a connection to the first +// keyboard of the machine. Used in wxGetKeyState. +// --------------------------------------------------------------------------- +class WXDLLIMPEXP_CORE wxHIDKeyboard : public wxHIDDevice +{ +public: + static int GetCount(); + bool Create(int nDev = 1); + void AddCookie(CFTypeRef Data, int i); + virtual void BuildCookies(CFArrayRef Array); + void DoBuildCookies(CFArrayRef Array); +}; + +#endif //__DARWIN__ + +#endif + // _WX_MACCARBONHID_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/joystick.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/joystick.h new file mode 100644 index 0000000000..36941b5b0b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/joystick.h @@ -0,0 +1,92 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/joystick.h +// Purpose: wxJoystick class +// Author: Ryan Norton +// Modified by: +// Created: 2/13/2005 +// Copyright: (c) Ryan Norton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_JOYSTICK_H_ +#define _WX_JOYSTICK_H_ + +#include "wx/event.h" + +class WXDLLIMPEXP_FWD_CORE wxJoystickThread; + +class WXDLLIMPEXP_ADV wxJoystick: public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxJoystick) + public: + + wxJoystick(int joystick = wxJOYSTICK1); + virtual ~wxJoystick(); + + // Attributes + //////////////////////////////////////////////////////////////////////////// + + wxPoint GetPosition() const; + int GetPosition(unsigned axis) const; + bool GetButtonState(unsigned button) const; + int GetZPosition() const; + int GetButtonState() const; + int GetPOVPosition() const; + int GetPOVCTSPosition() const; + int GetRudderPosition() const; + int GetUPosition() const; + int GetVPosition() const; + int GetMovementThreshold() const; + void SetMovementThreshold(int threshold) ; + + // Capabilities + //////////////////////////////////////////////////////////////////////////// + + bool IsOk() const; // Checks that the joystick is functioning + static int GetNumberJoysticks() ; + int GetManufacturerId() const ; + int GetProductId() const ; + wxString GetProductName() const ; + int GetXMin() const; + int GetYMin() const; + int GetZMin() const; + int GetXMax() const; + int GetYMax() const; + int GetZMax() const; + int GetNumberButtons() const; + int GetNumberAxes() const; + int GetMaxButtons() const; + int GetMaxAxes() const; + int GetPollingMin() const; + int GetPollingMax() const; + int GetRudderMin() const; + int GetRudderMax() const; + int GetUMin() const; + int GetUMax() const; + int GetVMin() const; + int GetVMax() const; + + bool HasRudder() const; + bool HasZ() const; + bool HasU() const; + bool HasV() const; + bool HasPOV() const; + bool HasPOV4Dir() const; + bool HasPOVCTS() 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(); + +protected: + int m_joystick; + wxJoystickThread* m_thread; + class wxHIDJoystick* m_hid; +}; + +#endif + // _WX_JOYSTICK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/mimetype.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/mimetype.h new file mode 100644 index 0000000000..7f92a990ff --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/mimetype.h @@ -0,0 +1,120 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/mimetype.h +// Purpose: Mac implementation for wx mime-related classes +// Author: Neil Perkins +// Modified by: +// Created: 2010-05-15 +// Copyright: (C) 2010 Neil Perkins +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _MIMETYPE_IMPL_H +#define _MIMETYPE_IMPL_H + +#include "wx/defs.h" + +#if wxUSE_MIMETYPE + +#include "wx/mimetype.h" +#include "wx/hashmap.h" +#include "wx/iconloc.h" + + +// This class implements mime type functionality for Mac OS X using UTIs and Launch Services +// Currently only the GetFileTypeFromXXXX public functions have been implemented +class WXDLLIMPEXP_BASE wxMimeTypesManagerImpl +{ +public: + + wxMimeTypesManagerImpl(); + virtual ~wxMimeTypesManagerImpl(); + + // These functions are not needed on Mac OS X and have no-op implementations + void Initialize(int mailcapStyles = wxMAILCAP_STANDARD, const wxString& extraDir = wxEmptyString); + void ClearData(); + + // Functions to look up types by ext, mime or UTI + wxFileType *GetFileTypeFromExtension(const wxString& ext); + wxFileType *GetFileTypeFromMimeType(const wxString& mimeType); + wxFileType *GetFileTypeFromUti(const wxString& uti); + + // These functions are only stubs on Mac OS X + size_t EnumAllFileTypes(wxArrayString& mimetypes); + wxFileType *Associate(const wxFileTypeInfo& ftInfo); + bool Unassociate(wxFileType *ft); + +private: + + // The work of querying the OS for type data is done in these two functions + void LoadTypeDataForUti(const wxString& uti); + void LoadDisplayDataForUti(const wxString& uti); + + // These functions are pass-throughs from wxFileTypeImpl + bool GetExtensions(const wxString& uti, wxArrayString& extensions); + bool GetMimeType(const wxString& uti, wxString *mimeType); + bool GetMimeTypes(const wxString& uti, wxArrayString& mimeTypes); + bool GetIcon(const wxString& uti, wxIconLocation *iconLoc); + bool GetDescription(const wxString& uti, wxString *desc); + bool GetApplication(const wxString& uti, wxString *command); + + // Structure to represent file types + typedef struct FileTypeData + { + wxArrayString extensions; + wxArrayString mimeTypes; + wxIconLocation iconLoc; + wxString application; + wxString description; + } + FileTypeInfo; + + // Map types + WX_DECLARE_STRING_HASH_MAP( wxString, TagMap ); + WX_DECLARE_STRING_HASH_MAP( FileTypeData, UtiMap ); + + // Data store + TagMap m_extMap; + TagMap m_mimeMap; + UtiMap m_utiMap; + + friend class wxFileTypeImpl; +}; + + +// This class provides the interface between wxFileType and wxMimeTypesManagerImple for Mac OS X +// Currently only extension, mimetype, description and icon information is available +// All other methods have no-op implementation +class WXDLLIMPEXP_BASE wxFileTypeImpl +{ +public: + + wxFileTypeImpl(); + virtual ~wxFileTypeImpl(); + + bool GetExtensions(wxArrayString& extensions) const ; + bool GetMimeType(wxString *mimeType) const ; + bool GetMimeTypes(wxArrayString& mimeTypes) const ; + bool GetIcon(wxIconLocation *iconLoc) const ; + bool GetDescription(wxString *desc) const ; + bool GetOpenCommand(wxString *openCmd, const wxFileType::MessageParameters& params) const; + + // These functions are only stubs on Mac OS X + bool GetPrintCommand(wxString *printCmd, const wxFileType::MessageParameters& params) const; + size_t GetAllCommands(wxArrayString *verbs, wxArrayString *commands, const wxFileType::MessageParameters& params) const; + bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = TRUE); + bool SetDefaultIcon(const wxString& strIcon = wxEmptyString, int index = 0); + bool Unassociate(wxFileType *ft); + +private: + + // All that is needed to query type info - UTI and pointer to the manager + wxString m_uti; + wxMimeTypesManagerImpl* m_manager; + + friend class wxMimeTypesManagerImpl; +}; + +#endif // wxUSE_MIMETYPE +#endif //_MIMETYPE_IMPL_H + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/objcid.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/objcid.h new file mode 100644 index 0000000000..35238bb891 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/objcid.h @@ -0,0 +1,23 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/objcid.h +// Purpose: Define wxObjCID working in both C++ and Objective-C. +// Author: Vadim Zeitlin +// Created: 2012-05-20 +// Copyright: (c) 2012 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_CORE_OBJCID_H_ +#define _WX_OSX_CORE_OBJCID_H_ + +// ---------------------------------------------------------------------------- +// wxObjCID: Equivalent of Objective-C "id" that works in C++ code. +// ---------------------------------------------------------------------------- + +#ifdef __OBJC__ + #define wxObjCID id +#else + typedef struct objc_object* wxObjCID; +#endif + +#endif // _WX_OSX_CORE_OBJCID_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private.h new file mode 100644 index 0000000000..f16850a083 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private.h @@ -0,0 +1,937 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/private.h +// Purpose: Private declarations: as this header is only included by +// wxWidgets itself, it may contain identifiers which don't start +// with "wx". +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_CORE_H_ +#define _WX_PRIVATE_CORE_H_ + +#include "wx/defs.h" + +#include <CoreFoundation/CoreFoundation.h> + +#include "wx/osx/core/cfstring.h" +#include "wx/osx/core/cfdataref.h" + +// Define helper macros allowing to insert small snippets of code to be +// compiled for high enough OS X version only: this shouldn't be abused for +// anything big but it's handy for e.g. specifying OS X 10.6-only protocols in +// the Objective C classes declarations when they're not supported under the +// previous versions +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 + #define wxOSX_10_6_AND_LATER(x) x +#else + #define wxOSX_10_6_AND_LATER(x) +#endif + +// platform specific Clang analyzer support +#ifndef NS_RETURNS_RETAINED +# if WX_HAS_CLANG_FEATURE(attribute_ns_returns_retained) +# define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) +# else +# define NS_RETURNS_RETAINED +# endif +#endif + +#ifndef CF_RETURNS_RETAINED +# if WX_HAS_CLANG_FEATURE(attribute_cf_returns_retained) +# define CF_RETURNS_RETAINED __attribute__((cf_returns_retained)) +# else +# define CF_RETURNS_RETAINED +# endif +#endif + +#if ( !wxUSE_GUI && !wxOSX_USE_IPHONE ) || wxOSX_USE_COCOA_OR_CARBON + +// Carbon functions are currently still used in wxOSX/Cocoa too (including +// wxBase part of it). +#include <Carbon/Carbon.h> + +WXDLLIMPEXP_BASE long UMAGetSystemVersion() ; + +void WXDLLIMPEXP_CORE wxMacStringToPascal( const wxString&from , unsigned char * to ); +wxString WXDLLIMPEXP_CORE wxMacMakeStringFromPascal( const unsigned char * from ); + +WXDLLIMPEXP_BASE wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathComponent = NULL ); +WXDLLIMPEXP_BASE OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef ); +WXDLLIMPEXP_BASE wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname ); + +// keycode utils from app.cpp + +WXDLLIMPEXP_BASE CGKeyCode wxCharCodeWXToOSX(wxKeyCode code); +WXDLLIMPEXP_BASE long wxMacTranslateKey(unsigned char key, unsigned char code); + +#endif + +#if wxUSE_GUI + +#if wxOSX_USE_IPHONE +#include <CoreGraphics/CoreGraphics.h> +#else +#include <ApplicationServices/ApplicationServices.h> +#endif + +#include "wx/bitmap.h" +#include "wx/window.h" + +class WXDLLIMPEXP_CORE wxMacCGContextStateSaver +{ + wxDECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver); + +public: + wxMacCGContextStateSaver( CGContextRef cg ) + { + m_cg = cg; + CGContextSaveGState( cg ); + } + ~wxMacCGContextStateSaver() + { + CGContextRestoreGState( m_cg ); + } +private: + CGContextRef m_cg; +}; + +class WXDLLIMPEXP_CORE wxDeferredObjectDeleter : public wxObject +{ +public : + wxDeferredObjectDeleter( wxObject* obj ) : m_obj(obj) + { + } + virtual ~wxDeferredObjectDeleter() + { + delete m_obj; + } +protected : + wxObject* m_obj ; +} ; + +// Quartz + +WXDLLIMPEXP_CORE CGImageRef wxMacCreateCGImageFromBitmap( const wxBitmap& bitmap ); + +WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithCFData( CFDataRef data ); +WXDLLIMPEXP_CORE CGDataConsumerRef wxMacCGDataConsumerCreateWithCFData( CFMutableDataRef data ); +WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer& buf ); + +WXDLLIMPEXP_CORE CGColorSpaceRef wxMacGetGenericRGBColorSpace(void); + +WXDLLIMPEXP_CORE double wxOSXGetMainScreenContentScaleFactor(); + +class wxWindowMac; +// to +extern wxWindow* g_MacLastWindow; +class wxNonOwnedWindow; + +// temporary typedef so that no additional casts are necessary within carbon code at the moment + +class wxMacControl; +class wxWidgetImpl; +class wxComboBox; +class wxNotebook; +class wxTextCtrl; +class wxSearchCtrl; + +WXDLLIMPEXP_CORE wxWindowMac * wxFindWindowFromWXWidget(WXWidget inControl ); + +#if wxOSX_USE_CARBON +typedef wxMacControl wxWidgetImplType; +#else +typedef wxWidgetImpl wxWidgetImplType; +#endif + +#if wxUSE_MENUS +class wxMenuItemImpl : public wxObject +{ +public : + wxMenuItemImpl( wxMenuItem* peer ) : m_peer(peer) + { + } + + virtual ~wxMenuItemImpl() ; + virtual void SetBitmap( const wxBitmap& bitmap ) = 0; + virtual void Enable( bool enable ) = 0; + virtual void Check( bool check ) = 0; + virtual void SetLabel( const wxString& text, wxAcceleratorEntry *entry ) = 0; + virtual void Hide( bool hide = true ) = 0; + + virtual void * GetHMenuItem() = 0; + + wxMenuItem* GetWXPeer() { return m_peer ; } + + static wxMenuItemImpl* Create( wxMenuItem* peer, wxMenu *pParentMenu, + int id, + const wxString& text, + wxAcceleratorEntry *entry, + const wxString& strHelp, + wxItemKind kind, + wxMenu *pSubMenu ); + + // handle OS specific menu items if they weren't handled during normal processing + virtual bool DoDefault() { return false; } +protected : + wxMenuItem* m_peer; + + DECLARE_ABSTRACT_CLASS(wxMenuItemImpl) +} ; + +class wxMenuImpl : public wxObject +{ +public : + wxMenuImpl( wxMenu* peer ) : m_peer(peer) + { + } + + virtual ~wxMenuImpl() ; + virtual void InsertOrAppend(wxMenuItem *pItem, size_t pos) = 0; + virtual void Remove( wxMenuItem *pItem ) = 0; + + virtual void MakeRoot() = 0; + + virtual void SetTitle( const wxString& text ) = 0; + + virtual WXHMENU GetHMenu() = 0; + + wxMenu* GetWXPeer() { return m_peer ; } + + virtual void PopUp( wxWindow *win, int x, int y ) = 0; + + static wxMenuImpl* Create( wxMenu* peer, const wxString& title ); + static wxMenuImpl* CreateRootMenu( wxMenu* peer ); +protected : + wxMenu* m_peer; + + DECLARE_ABSTRACT_CLASS(wxMenuItemImpl) +} ; +#endif + + +class WXDLLIMPEXP_CORE wxWidgetImpl : public wxObject +{ +public : + wxWidgetImpl( wxWindowMac* peer , bool isRootControl = false, bool isUserPane = false ); + wxWidgetImpl(); + virtual ~wxWidgetImpl(); + + void Init(); + + bool IsRootControl() const { return m_isRootControl; } + + bool IsUserPane() const { return m_isUserPane; } + + wxWindowMac* GetWXPeer() const { return m_wxPeer; } + + bool IsOk() const { return GetWXWidget() != NULL; } + + // not only the control itself, but also all its parents must be visible + // in order for this function to return true + virtual bool IsVisible() const = 0; + // set the visibility of this widget (maybe latent) + virtual void SetVisibility( bool visible ) = 0; + + virtual bool ShowWithEffect(bool WXUNUSED(show), + wxShowEffect WXUNUSED(effect), + unsigned WXUNUSED(timeout)) + { + return false; + } + + virtual void Raise() = 0; + + virtual void Lower() = 0; + + virtual void ScrollRect( const wxRect *rect, int dx, int dy ) = 0; + + virtual WXWidget GetWXWidget() const = 0; + + virtual void SetBackgroundColour( const wxColour& col ) = 0; + virtual bool SetBackgroundStyle(wxBackgroundStyle style) = 0; + + // all coordinates in native parent widget relative coordinates + virtual void GetContentArea( int &left , int &top , int &width , int &height ) const = 0; + virtual void Move(int x, int y, int width, int height) = 0; + virtual void GetPosition( int &x, int &y ) const = 0; + virtual void GetSize( int &width, int &height ) const = 0; + virtual void SetControlSize( wxWindowVariant variant ) = 0; + virtual double GetContentScaleFactor() const + { + return 1.0; + } + + // the native coordinates may have an 'aura' for shadows etc, if this is the case the layout + // inset indicates on which insets the real control is drawn + virtual void GetLayoutInset(int &left , int &top , int &right, int &bottom) const + { + left = top = right = bottom = 0; + } + + // native view coordinates are topleft to bottom right (flipped regarding CoreGraphics origin) + virtual bool IsFlipped() const { return true; } + + virtual void SetNeedsDisplay( const wxRect* where = NULL ) = 0; + virtual bool GetNeedsDisplay() const = 0; + + virtual bool NeedsFocusRect() const; + virtual void SetNeedsFocusRect( bool needs ); + + virtual bool NeedsFrame() const; + virtual void SetNeedsFrame( bool needs ); + + virtual void SetDrawingEnabled(bool enabled); + + virtual bool CanFocus() const = 0; + // return true if successful + virtual bool SetFocus() = 0; + virtual bool HasFocus() const = 0; + + virtual void RemoveFromParent() = 0; + virtual void Embed( wxWidgetImpl *parent ) = 0; + + virtual void SetDefaultButton( bool isDefault ) = 0; + virtual void PerformClick() = 0; + virtual void SetLabel( const wxString& title, wxFontEncoding encoding ) = 0; +#if wxUSE_MARKUP && wxOSX_USE_COCOA + virtual void SetLabelMarkup( const wxString& WXUNUSED(markup) ) { } +#endif + + virtual void SetCursor( const wxCursor & cursor ) = 0; + virtual void CaptureMouse() = 0; + virtual void ReleaseMouse() = 0; + + virtual void SetDropTarget( wxDropTarget * WXUNUSED(dropTarget) ) {} + + virtual wxInt32 GetValue() const = 0; + virtual void SetValue( wxInt32 v ) = 0; + virtual wxBitmap GetBitmap() const = 0; + virtual void SetBitmap( const wxBitmap& bitmap ) = 0; + virtual void SetBitmapPosition( wxDirection dir ) = 0; + virtual void SetupTabs( const wxNotebook& WXUNUSED(notebook) ) {} + virtual int TabHitTest( const wxPoint & WXUNUSED(pt), long *flags ) {*flags=1; return -1;} + virtual void GetBestRect( wxRect *r ) const = 0; + virtual bool IsEnabled() const = 0; + virtual void Enable( bool enable ) = 0; + virtual void SetMinimum( wxInt32 v ) = 0; + virtual void SetMaximum( wxInt32 v ) = 0; + virtual wxInt32 GetMinimum() const = 0; + virtual wxInt32 GetMaximum() const = 0; + virtual void PulseGauge() = 0; + virtual void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ) = 0; + + virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ) = 0; + + virtual void SetToolTip(wxToolTip* WXUNUSED(tooltip)) { } + + // is the clicked event sent AFTER the state already changed, so no additional + // state changing logic is required from the outside + virtual bool ButtonClickDidStateChange() = 0; + + virtual void InstallEventHandler( WXWidget control = NULL ) = 0; + + // Mechanism used to keep track of whether a change should send an event + // Do SendEvents(false) when starting actions that would trigger programmatic events + // and SendEvents(true) at the end of the block. + virtual void SendEvents(bool shouldSendEvents) { m_shouldSendEvents = shouldSendEvents; } + virtual bool ShouldSendEvents() { return m_shouldSendEvents; } + + // static methods for associating native controls and their implementations + + // finds the impl associated with this native control + static wxWidgetImpl* + FindFromWXWidget(WXWidget control); + + // finds the impl associated with this native control, if the native control itself is not known + // also checks whether its parent is eg a registered scrollview, ie whether the control is a native subpart + // of a known control + static wxWidgetImpl* + FindBestFromWXWidget(WXWidget control); + + static void RemoveAssociations( wxWidgetImpl* impl); + + static void Associate( WXWidget control, wxWidgetImpl *impl ); + + static WXWidget FindFocus(); + + // static creation methods, must be implemented by all toolkits + + static wxWidgetImplType* CreateUserPane( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle) ; + static wxWidgetImplType* CreateContentView( wxNonOwnedWindow* now ) ; + + static wxWidgetImplType* CreateButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle) ; + + static wxWidgetImplType* CreateDisclosureTriangle( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle) ; + + static wxWidgetImplType* CreateStaticLine( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle) ; + + static wxWidgetImplType* CreateGroupBox( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle) ; + + static wxWidgetImplType* CreateStaticText( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle) ; + + static wxWidgetImplType* CreateTextControl( wxTextCtrl* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxString& content, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle) ; + + static wxWidgetImplType* CreateSearchControl( wxSearchCtrl* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxString& content, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle) ; + + static wxWidgetImplType* CreateCheckBox( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + + static wxWidgetImplType* CreateRadioButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + + static wxWidgetImplType* CreateToggleButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + + static wxWidgetImplType* CreateBitmapToggleButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + + static wxWidgetImplType* CreateBitmapButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + + static wxWidgetImplType* CreateTabView( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + + static wxWidgetImplType* CreateGauge( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + wxInt32 value, + wxInt32 minimum, + wxInt32 maximum, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + + static wxWidgetImplType* CreateSlider( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + wxInt32 value, + wxInt32 minimum, + wxInt32 maximum, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + + static wxWidgetImplType* CreateSpinButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + wxInt32 value, + wxInt32 minimum, + wxInt32 maximum, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + + static wxWidgetImplType* CreateScrollBar( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + + static wxWidgetImplType* CreateChoice( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + wxMenu* menu, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + + static wxWidgetImplType* CreateListBox( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); + +#if wxOSX_USE_COCOA + static wxWidgetImplType* CreateComboBox( wxComboBox* wxpeer, + wxWindowMac* parent, + wxWindowID id, + wxMenu* menu, + const wxPoint& pos, + const wxSize& size, + long style, + long extraStyle); +#endif + + // converts from Toplevel-Content relative to local + static void Convert( wxPoint *pt , wxWidgetImpl *from , wxWidgetImpl *to ); +protected : + bool m_isRootControl; + bool m_isUserPane; + wxWindowMac* m_wxPeer; + bool m_needsFocusRect; + bool m_needsFrame; + bool m_shouldSendEvents; + + DECLARE_ABSTRACT_CLASS(wxWidgetImpl) +}; + +// +// the interface to be implemented eg by a listbox +// + +class WXDLLIMPEXP_CORE wxListWidgetColumn +{ +public : + virtual ~wxListWidgetColumn() {} +} ; + +class WXDLLIMPEXP_CORE wxListWidgetCellValue +{ +public : + wxListWidgetCellValue() {} + virtual ~wxListWidgetCellValue() {} + + virtual void Set( CFStringRef value ) = 0; + virtual void Set( const wxString& value ) = 0; + virtual void Set( int value ) = 0; + virtual void Check( bool check ); + + virtual bool IsChecked() const; + virtual int GetIntValue() const = 0; + virtual wxString GetStringValue() const = 0; +} ; + +class WXDLLIMPEXP_CORE wxListWidgetImpl +{ +public: + wxListWidgetImpl() {} + virtual ~wxListWidgetImpl() { } + + virtual wxListWidgetColumn* InsertTextColumn( unsigned pos, const wxString& title, bool editable = false, + wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) = 0 ; + virtual wxListWidgetColumn* InsertCheckColumn( unsigned pos , const wxString& title, bool editable = false, + wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) = 0 ; + + // add and remove + + // TODO will be replaced + virtual void ListDelete( unsigned int n ) = 0; + virtual void ListInsert( unsigned int n ) = 0; + virtual void ListClear() = 0; + + // selecting + + virtual void ListDeselectAll() = 0; + virtual void ListSetSelection( unsigned int n, bool select, bool multi ) = 0; + virtual int ListGetSelection() const = 0; + virtual int ListGetSelections( wxArrayInt& aSelections ) const = 0; + virtual bool ListIsSelected( unsigned int n ) const = 0; + + // display + + virtual void ListScrollTo( unsigned int n ) = 0; + virtual void UpdateLine( unsigned int n, wxListWidgetColumn* col = NULL ) = 0; + virtual void UpdateLineToEnd( unsigned int n) = 0; + + // accessing content + + virtual unsigned int ListGetCount() const = 0; + + virtual int DoListHitTest( const wxPoint& inpoint ) const = 0; +}; + +// +// interface to be implemented by a textcontrol +// + +class WXDLLIMPEXP_FWD_CORE wxTextAttr; +class WXDLLIMPEXP_FWD_CORE wxTextEntry; + +// common interface for all implementations +class WXDLLIMPEXP_CORE wxTextWidgetImpl + +{ +public : + // Any widgets implementing this interface must be associated with a + // wxTextEntry so instead of requiring the derived classes to implement + // another (pure) virtual function, just take the pointer to this entry in + // our ctor and implement GetTextEntry() ourselves. + wxTextWidgetImpl(wxTextEntry *entry) : m_entry(entry) {} + + virtual ~wxTextWidgetImpl() {} + + wxTextEntry *GetTextEntry() const { return m_entry; } + + virtual bool CanFocus() const { return true; } + + virtual wxString GetStringValue() const = 0 ; + virtual void SetStringValue( const wxString &val ) = 0 ; + virtual void SetSelection( long from, long to ) = 0 ; + virtual void GetSelection( long* from, long* to ) const = 0 ; + virtual void WriteText( const wxString& str ) = 0 ; + + virtual bool CanClipMaxLength() const { return false; } + virtual void SetMaxLength(unsigned long WXUNUSED(len)) {} + + virtual bool GetStyle( long position, wxTextAttr& style); + virtual void SetStyle( long start, long end, const wxTextAttr& style ) ; + virtual void Copy() ; + virtual void Cut() ; + virtual void Paste() ; + virtual bool CanPaste() const ; + virtual void SetEditable( bool editable ) ; + virtual long GetLastPosition() const ; + virtual void Replace( long from, long to, const wxString &str ) ; + virtual void Remove( long from, long to ) ; + + + virtual bool HasOwnContextMenu() const + { return false ; } + + virtual bool SetupCursor( const wxPoint& WXUNUSED(pt) ) + { return false ; } + + virtual void Clear() ; + virtual bool CanUndo() const; + virtual void Undo() ; + virtual bool CanRedo() const; + virtual void Redo() ; + virtual int GetNumberOfLines() const ; + virtual long XYToPosition(long x, long y) const; + virtual bool PositionToXY(long pos, long *x, long *y) const ; + virtual void ShowPosition(long WXUNUSED(pos)) ; + virtual int GetLineLength(long lineNo) const ; + virtual wxString GetLineText(long lineNo) const ; + virtual void CheckSpelling(bool WXUNUSED(check)) { } + + virtual wxSize GetBestSize() const { return wxDefaultSize; } + + virtual bool SetHint(const wxString& WXUNUSED(hint)) { return false; } +private: + wxTextEntry * const m_entry; + + wxDECLARE_NO_COPY_CLASS(wxTextWidgetImpl); +}; + +// common interface for all implementations +class WXDLLIMPEXP_CORE wxComboWidgetImpl + +{ +public : + wxComboWidgetImpl() {} + + virtual ~wxComboWidgetImpl() {} + + virtual int GetSelectedItem() const { return -1; } + virtual void SetSelectedItem(int WXUNUSED(item)) {} + + virtual int GetNumberOfItems() const { return -1; } + + virtual void InsertItem(int WXUNUSED(pos), const wxString& WXUNUSED(item)) {} + + virtual void RemoveItem(int WXUNUSED(pos)) {} + + virtual void Clear() {} + virtual void Popup() {} + virtual void Dismiss() {} + + virtual wxString GetStringAtIndex(int WXUNUSED(pos)) const { return wxEmptyString; } + + virtual int FindString(const wxString& WXUNUSED(text)) const { return -1; } +}; + +// +// common interface for buttons +// + +class wxButtonImpl +{ + public : + wxButtonImpl(){} + virtual ~wxButtonImpl(){} + + virtual void SetPressedBitmap( const wxBitmap& bitmap ) = 0; +} ; + +// +// common interface for search controls +// + +class wxSearchWidgetImpl +{ +public : + wxSearchWidgetImpl(){} + virtual ~wxSearchWidgetImpl(){} + + // search field options + virtual void ShowSearchButton( bool show ) = 0; + virtual bool IsSearchButtonVisible() const = 0; + + virtual void ShowCancelButton( bool show ) = 0; + virtual bool IsCancelButtonVisible() const = 0; + + virtual void SetSearchMenu( wxMenu* menu ) = 0; + + virtual void SetDescriptiveText(const wxString& text) = 0; +} ; + +// +// toplevel window implementation class +// + +class wxNonOwnedWindowImpl : public wxObject +{ +public : + wxNonOwnedWindowImpl( wxNonOwnedWindow* nonownedwnd) : m_wxPeer(nonownedwnd) + { + } + wxNonOwnedWindowImpl() + { + } + virtual ~wxNonOwnedWindowImpl() + { + } + + virtual void WillBeDestroyed() + { + } + + virtual void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size, + long style, long extraStyle, const wxString& name ) = 0; + + + virtual WXWindow GetWXWindow() const = 0; + + virtual void Raise() + { + } + + virtual void Lower() + { + } + + virtual bool Show(bool WXUNUSED(show)) + { + return false; + } + + virtual bool ShowWithEffect(bool show, wxShowEffect WXUNUSED(effect), unsigned WXUNUSED(timeout)) + { + return Show(show); + } + + virtual void Update() + { + } + + virtual bool SetTransparent(wxByte WXUNUSED(alpha)) + { + return false; + } + + virtual bool SetBackgroundColour(const wxColour& WXUNUSED(col) ) + { + return false; + } + + virtual void SetExtraStyle( long WXUNUSED(exStyle) ) + { + } + + virtual void SetWindowStyleFlag( long WXUNUSED(style) ) + { + } + + virtual bool SetBackgroundStyle(wxBackgroundStyle WXUNUSED(style)) + { + return false ; + } + + virtual bool CanSetTransparent() + { + return false; + } + + virtual void GetContentArea( int &left , int &top , int &width , int &height ) const = 0; + virtual void MoveWindow(int x, int y, int width, int height) = 0; + virtual void GetPosition( int &x, int &y ) const = 0; + virtual void GetSize( int &width, int &height ) const = 0; + + virtual bool SetShape(const wxRegion& WXUNUSED(region)) + { + return false; + } + + virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) = 0; + + virtual bool IsMaximized() const = 0; + + virtual bool IsIconized() const= 0; + + virtual void Iconize( bool iconize )= 0; + + virtual void Maximize(bool maximize) = 0; + + virtual bool IsFullScreen() const= 0; + + virtual void ShowWithoutActivating() { Show(true); } + + virtual bool ShowFullScreen(bool show, long style)= 0; + + virtual void RequestUserAttention(int flags) = 0; + + virtual void ScreenToWindow( int *x, int *y ) = 0; + + virtual void WindowToScreen( int *x, int *y ) = 0; + + virtual bool IsActive() = 0; + + wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } + + static wxNonOwnedWindowImpl* + FindFromWXWindow(WXWindow window); + + static void RemoveAssociations( wxNonOwnedWindowImpl* impl); + + static void Associate( WXWindow window, wxNonOwnedWindowImpl *impl ); + + // static creation methods, must be implemented by all toolkits + + static wxNonOwnedWindowImpl* CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, WXWindow native) ; + + static wxNonOwnedWindowImpl* CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, const wxPoint& pos, const wxSize& size, + long style, long extraStyle, const wxString& name ) ; + + virtual void SetModified(bool WXUNUSED(modified)) { } + virtual bool IsModified() const { return false; } + + virtual void SetRepresentedFilename(const wxString& WXUNUSED(filename)) { } + +#if wxOSX_USE_IPHONE + virtual CGFloat GetWindowLevel() const { return 0.0; } +#else + virtual CGWindowLevel GetWindowLevel() const { return kCGNormalWindowLevel; } +#endif + virtual void RestoreWindowLevel() {} +protected : + wxNonOwnedWindow* m_wxPeer; + DECLARE_ABSTRACT_CLASS(wxNonOwnedWindowImpl) +}; + +#endif // wxUSE_GUI + +//--------------------------------------------------------------------------- +// cocoa bridging utilities +//--------------------------------------------------------------------------- + +bool wxMacInitCocoa(); + +class WXDLLIMPEXP_CORE wxMacAutoreleasePool +{ +public : + wxMacAutoreleasePool(); + ~wxMacAutoreleasePool(); +private : + void* m_pool; +}; + +// NSObject + +void wxMacCocoaRelease( void* obj ); +void wxMacCocoaAutorelease( void* obj ); +void* wxMacCocoaRetain( void* obj ); + + +#endif + // _WX_PRIVATE_CORE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private/datetimectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private/datetimectrl.h new file mode 100644 index 0000000000..18778d7da5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private/datetimectrl.h @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/private/datetime.h +// Purpose: +// Author: Vadim Zeitlin +// Created: 2011-12-19 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_ +#define _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_ + +#if wxUSE_DATEPICKCTRL + +#include "wx/osx/private.h" + +#include "wx/datetime.h" + +enum wxDateTimeWidgetKind +{ + wxDateTimeWidget_YearMonthDay, + wxDateTimeWidget_HourMinuteSecond +}; + +// ---------------------------------------------------------------------------- +// wxDateTimeWidgetImpl: peer class for wxDateTimePickerCtrl. +// ---------------------------------------------------------------------------- + +class wxDateTimeWidgetImpl +#if wxOSX_USE_COCOA + : public wxWidgetCocoaImpl +#elif wxOSX_USE_CARBON + : public wxMacControl +#else + #error "Unsupported platform" +#endif +{ +public: + static wxDateTimeWidgetImpl* + CreateDateTimePicker(wxDateTimePickerCtrl* wxpeer, + const wxDateTime& dt, + const wxPoint& pos, + const wxSize& size, + long style, + wxDateTimeWidgetKind kind); + + virtual void SetDateTime(const wxDateTime& dt) = 0; + virtual wxDateTime GetDateTime() const = 0; + + virtual void SetDateRange(const wxDateTime& dt1, const wxDateTime& dt2) = 0; + virtual bool GetDateRange(wxDateTime* dt1, wxDateTime* dt2) = 0; + + virtual ~wxDateTimeWidgetImpl() { } + +protected: +#if wxOSX_USE_COCOA + wxDateTimeWidgetImpl(wxDateTimePickerCtrl* wxpeer, WXWidget view) + : wxWidgetCocoaImpl(wxpeer, view) + { + } +#elif wxOSX_USE_CARBON + // There is no Carbon implementation of this control yet so we don't need + // any ctor for it yet but it should be added here if Carbon version is + // written later. +#endif +}; + +#endif // wxUSE_DATEPICKCTRL + +#endif // _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private/strconv_cf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private/strconv_cf.h new file mode 100644 index 0000000000..d22c73f72f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private/strconv_cf.h @@ -0,0 +1,337 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/private/strconv_cf.h +// Purpose: Unicode conversion classes +// Author: David Elliott, Ryan Norton +// Modified by: +// Created: 2007-07-06 +// Copyright: (c) 2004 Ryan Norton +// (c) 2007 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/strconv.h" + +#include <CoreFoundation/CFString.h> +#include <CoreFoundation/CFStringEncodingExt.h> + +// ============================================================================ +// CoreFoundation conversion classes +// ============================================================================ + +inline CFStringEncoding wxCFStringEncFromFontEnc(wxFontEncoding encoding) +{ + CFStringEncoding enc = kCFStringEncodingInvalidId ; + + switch (encoding) + { + case wxFONTENCODING_DEFAULT : + enc = CFStringGetSystemEncoding(); + break ; + + case wxFONTENCODING_ISO8859_1 : + enc = kCFStringEncodingISOLatin1 ; + break ; + case wxFONTENCODING_ISO8859_2 : + enc = kCFStringEncodingISOLatin2; + break ; + case wxFONTENCODING_ISO8859_3 : + enc = kCFStringEncodingISOLatin3 ; + break ; + case wxFONTENCODING_ISO8859_4 : + enc = kCFStringEncodingISOLatin4; + break ; + case wxFONTENCODING_ISO8859_5 : + enc = kCFStringEncodingISOLatinCyrillic; + break ; + case wxFONTENCODING_ISO8859_6 : + enc = kCFStringEncodingISOLatinArabic; + break ; + case wxFONTENCODING_ISO8859_7 : + enc = kCFStringEncodingISOLatinGreek; + break ; + case wxFONTENCODING_ISO8859_8 : + enc = kCFStringEncodingISOLatinHebrew; + break ; + case wxFONTENCODING_ISO8859_9 : + enc = kCFStringEncodingISOLatin5; + break ; + case wxFONTENCODING_ISO8859_10 : + enc = kCFStringEncodingISOLatin6; + break ; + case wxFONTENCODING_ISO8859_11 : + enc = kCFStringEncodingISOLatinThai; + break ; + case wxFONTENCODING_ISO8859_13 : + enc = kCFStringEncodingISOLatin7; + break ; + case wxFONTENCODING_ISO8859_14 : + enc = kCFStringEncodingISOLatin8; + break ; + case wxFONTENCODING_ISO8859_15 : + enc = kCFStringEncodingISOLatin9; + break ; + + case wxFONTENCODING_KOI8 : + enc = kCFStringEncodingKOI8_R; + break ; + case wxFONTENCODING_ALTERNATIVE : // MS-DOS CP866 + enc = kCFStringEncodingDOSRussian; + break ; + +// case wxFONTENCODING_BULGARIAN : +// enc = ; +// break ; + + case wxFONTENCODING_CP437 : + enc = kCFStringEncodingDOSLatinUS ; + break ; + case wxFONTENCODING_CP850 : + enc = kCFStringEncodingDOSLatin1; + break ; + case wxFONTENCODING_CP852 : + enc = kCFStringEncodingDOSLatin2; + break ; + case wxFONTENCODING_CP855 : + enc = kCFStringEncodingDOSCyrillic; + break ; + case wxFONTENCODING_CP866 : + enc = kCFStringEncodingDOSRussian ; + break ; + case wxFONTENCODING_CP874 : + enc = kCFStringEncodingDOSThai; + break ; + case wxFONTENCODING_CP932 : + enc = kCFStringEncodingDOSJapanese; + break ; + case wxFONTENCODING_CP936 : + enc = kCFStringEncodingDOSChineseSimplif ; + break ; + case wxFONTENCODING_CP949 : + enc = kCFStringEncodingDOSKorean; + break ; + case wxFONTENCODING_CP950 : + enc = kCFStringEncodingDOSChineseTrad; + break ; + case wxFONTENCODING_CP1250 : + enc = kCFStringEncodingWindowsLatin2; + break ; + case wxFONTENCODING_CP1251 : + enc = kCFStringEncodingWindowsCyrillic ; + break ; + case wxFONTENCODING_CP1252 : + enc = kCFStringEncodingWindowsLatin1 ; + break ; + case wxFONTENCODING_CP1253 : + enc = kCFStringEncodingWindowsGreek; + break ; + case wxFONTENCODING_CP1254 : + enc = kCFStringEncodingWindowsLatin5; + break ; + case wxFONTENCODING_CP1255 : + enc = kCFStringEncodingWindowsHebrew ; + break ; + case wxFONTENCODING_CP1256 : + enc = kCFStringEncodingWindowsArabic ; + break ; + case wxFONTENCODING_CP1257 : + enc = kCFStringEncodingWindowsBalticRim; + break ; +// This only really encodes to UTF7 (if that) evidently +// case wxFONTENCODING_UTF7 : +// enc = kCFStringEncodingNonLossyASCII ; +// break ; + case wxFONTENCODING_UTF8 : + enc = kCFStringEncodingUTF8 ; + break ; + case wxFONTENCODING_EUC_JP : + enc = kCFStringEncodingEUC_JP; + break ; +/* Don't support conversion to/from UTF16 as wxWidgets can do this better. + * In particular, ToWChar would fail miserably using strlen on an input UTF16. + case wxFONTENCODING_UTF16 : + enc = kCFStringEncodingUnicode ; + break ; +*/ + case wxFONTENCODING_MACROMAN : + enc = kCFStringEncodingMacRoman ; + break ; + case wxFONTENCODING_MACJAPANESE : + enc = kCFStringEncodingMacJapanese ; + break ; + case wxFONTENCODING_MACCHINESETRAD : + enc = kCFStringEncodingMacChineseTrad ; + break ; + case wxFONTENCODING_MACKOREAN : + enc = kCFStringEncodingMacKorean ; + break ; + case wxFONTENCODING_MACARABIC : + enc = kCFStringEncodingMacArabic ; + break ; + case wxFONTENCODING_MACHEBREW : + enc = kCFStringEncodingMacHebrew ; + break ; + case wxFONTENCODING_MACGREEK : + enc = kCFStringEncodingMacGreek ; + break ; + case wxFONTENCODING_MACCYRILLIC : + enc = kCFStringEncodingMacCyrillic ; + break ; + case wxFONTENCODING_MACDEVANAGARI : + enc = kCFStringEncodingMacDevanagari ; + break ; + case wxFONTENCODING_MACGURMUKHI : + enc = kCFStringEncodingMacGurmukhi ; + break ; + case wxFONTENCODING_MACGUJARATI : + enc = kCFStringEncodingMacGujarati ; + break ; + case wxFONTENCODING_MACORIYA : + enc = kCFStringEncodingMacOriya ; + break ; + case wxFONTENCODING_MACBENGALI : + enc = kCFStringEncodingMacBengali ; + break ; + case wxFONTENCODING_MACTAMIL : + enc = kCFStringEncodingMacTamil ; + break ; + case wxFONTENCODING_MACTELUGU : + enc = kCFStringEncodingMacTelugu ; + break ; + case wxFONTENCODING_MACKANNADA : + enc = kCFStringEncodingMacKannada ; + break ; + case wxFONTENCODING_MACMALAJALAM : + enc = kCFStringEncodingMacMalayalam ; + break ; + case wxFONTENCODING_MACSINHALESE : + enc = kCFStringEncodingMacSinhalese ; + break ; + case wxFONTENCODING_MACBURMESE : + enc = kCFStringEncodingMacBurmese ; + break ; + case wxFONTENCODING_MACKHMER : + enc = kCFStringEncodingMacKhmer ; + break ; + case wxFONTENCODING_MACTHAI : + enc = kCFStringEncodingMacThai ; + break ; + case wxFONTENCODING_MACLAOTIAN : + enc = kCFStringEncodingMacLaotian ; + break ; + case wxFONTENCODING_MACGEORGIAN : + enc = kCFStringEncodingMacGeorgian ; + break ; + case wxFONTENCODING_MACARMENIAN : + enc = kCFStringEncodingMacArmenian ; + break ; + case wxFONTENCODING_MACCHINESESIMP : + enc = kCFStringEncodingMacChineseSimp ; + break ; + case wxFONTENCODING_MACTIBETAN : + enc = kCFStringEncodingMacTibetan ; + break ; + case wxFONTENCODING_MACMONGOLIAN : + enc = kCFStringEncodingMacMongolian ; + break ; + case wxFONTENCODING_MACETHIOPIC : + enc = kCFStringEncodingMacEthiopic ; + break ; + case wxFONTENCODING_MACCENTRALEUR : + enc = kCFStringEncodingMacCentralEurRoman ; + break ; + case wxFONTENCODING_MACVIATNAMESE : + enc = kCFStringEncodingMacVietnamese ; + break ; + case wxFONTENCODING_MACARABICEXT : + enc = kCFStringEncodingMacExtArabic ; + break ; + case wxFONTENCODING_MACSYMBOL : + enc = kCFStringEncodingMacSymbol ; + break ; + case wxFONTENCODING_MACDINGBATS : + enc = kCFStringEncodingMacDingbats ; + break ; + case wxFONTENCODING_MACTURKISH : + enc = kCFStringEncodingMacTurkish ; + break ; + case wxFONTENCODING_MACCROATIAN : + enc = kCFStringEncodingMacCroatian ; + break ; + case wxFONTENCODING_MACICELANDIC : + enc = kCFStringEncodingMacIcelandic ; + break ; + case wxFONTENCODING_MACROMANIAN : + enc = kCFStringEncodingMacRomanian ; + break ; + case wxFONTENCODING_MACCELTIC : + enc = kCFStringEncodingMacCeltic ; + break ; + case wxFONTENCODING_MACGAELIC : + enc = kCFStringEncodingMacGaelic ; + break ; + /* CFString is known to support this back to the original CarbonLib */ + /* http://developer.apple.com/samplecode/CarbonMDEF/listing2.html */ + case wxFONTENCODING_MACKEYBOARD : + /* We don't wish to pollute the namespace too much, even though we're a private header. */ + /* The constant is well-defined as 41 and is not expected to change. */ + enc = 41 /*kTextEncodingMacKeyboardGlyphs*/ ; + break ; + + default : + // because gcc is picky + break ; + } + + return enc ; +} + + +class wxMBConv_cf : public wxMBConv +{ +public: + wxMBConv_cf() + { + Init(CFStringGetSystemEncoding()) ; + } + + wxMBConv_cf(const wxMBConv_cf& conv) : wxMBConv() + { + m_encoding = conv.m_encoding; + } + +#if wxUSE_FONTMAP + wxMBConv_cf(const char* name) + { + Init( wxCFStringEncFromFontEnc(wxFontMapperBase::Get()->CharsetToEncoding(name, false) ) ) ; + } +#endif + + wxMBConv_cf(wxFontEncoding encoding) + { + Init( wxCFStringEncFromFontEnc(encoding) ); + } + + virtual ~wxMBConv_cf() + { + } + + void Init( CFStringEncoding encoding) + { + m_encoding = encoding ; + } + + virtual size_t ToWChar(wchar_t * dst, size_t dstSize, const char * src, size_t srcSize = wxNO_LEN) const; + virtual size_t FromWChar(char *dst, size_t dstSize, const wchar_t *src, size_t srcSize = wxNO_LEN) const; + + virtual wxMBConv *Clone() const { return new wxMBConv_cf(*this); } + + bool IsOk() const + { + return m_encoding != kCFStringEncodingInvalidId && + CFStringIsEncodingAvailable(m_encoding); + } + +private: + CFStringEncoding m_encoding ; +}; + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private/timer.h new file mode 100644 index 0000000000..2f191797d9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/private/timer.h @@ -0,0 +1,32 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/private/timer.h +// Purpose: wxTimer class based on core foundation +// Author: Stefan Csomor +// Created: 2008-07-16 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_CORE_PRIVATE_TIMER_H_ +#define _WX_OSX_CORE_PRIVATE_TIMER_H_ + +#include "wx/private/timer.h" + +struct wxOSXTimerInfo; + +class WXDLLIMPEXP_CORE wxOSXTimerImpl : public wxTimerImpl +{ +public: + wxOSXTimerImpl(wxTimer *timer); + virtual ~wxOSXTimerImpl(); + + virtual bool Start(int milliseconds = -1, bool one_shot = false); + virtual void Stop(); + + virtual bool IsRunning() const; + +private: + wxOSXTimerInfo *m_info; +}; + +#endif // _WX_OSX_CORE_PRIVATE_TIMER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/stdpaths.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/stdpaths.h new file mode 100644 index 0000000000..8ebe071e9c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/core/stdpaths.h @@ -0,0 +1,69 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/stdpaths.h +// Purpose: wxStandardPaths for CoreFoundation systems +// Author: David Elliott +// Modified by: +// Created: 2004-10-27 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_STDPATHS_H_ +#define _WX_MAC_STDPATHS_H_ + +struct __CFBundle; +struct __CFURL; + +typedef const __CFURL * wxCFURLRef; +typedef __CFBundle * wxCFBundleRef; + +// we inherit the GUI CF-based wxStandardPaths implementation from the Unix one +// used for console programs if possible (i.e. if we're under a Unix system at +// all) +#if defined(__UNIX__) + #include "wx/unix/stdpaths.h" + #define wxStandardPathsCFBase wxStandardPaths +#else + #define wxStandardPathsCFBase wxStandardPathsBase +#endif + +// ---------------------------------------------------------------------------- +// wxStandardPaths +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStandardPathsCF : public wxStandardPathsCFBase +{ +public: + virtual ~wxStandardPathsCF(); + + // wxMac specific: allow user to specify a different bundle + wxStandardPathsCF(wxCFBundleRef bundle); + void SetBundle(wxCFBundleRef bundle); + + // implement base class pure virtuals + virtual wxString GetExecutablePath() const; + virtual wxString GetConfigDir() const; + virtual wxString GetUserConfigDir() const; + virtual wxString GetDataDir() const; + virtual wxString GetLocalDataDir() const; + virtual wxString GetUserDataDir() const; + virtual wxString GetPluginsDir() const; + virtual wxString GetResourcesDir() const; + virtual wxString + GetLocalizedResourcesDir(const wxString& lang, + ResourceCat category = ResourceCat_None) const; + virtual wxString GetDocumentsDir() const; + +protected: + // Ctor is protected, use wxStandardPaths::Get() instead of instantiating + // objects of this class directly. + wxStandardPathsCF(); + + // this function can be called with any of CFBundleCopyXXXURL function + // pointer as parameter + wxString GetFromFunc(wxCFURLRef (*func)(wxCFBundleRef)) const; + + wxCFBundleRef m_bundle; +}; + +#endif // _WX_MAC_STDPATHS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cursor.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cursor.h new file mode 100644 index 0000000000..0dcf5be22d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/cursor.h @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/cursor.h +// Purpose: wxCursor class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CURSOR_H_ +#define _WX_CURSOR_H_ + +#include "wx/bitmap.h" + +// Cursor +class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject +{ +public: + wxCursor(); + + wxCursor(const wxImage & image) ; + wxCursor(const wxString& name, + wxBitmapType type = wxCURSOR_DEFAULT_TYPE, + int hotSpotX = 0, int hotSpotY = 0); + + wxCursor(wxStockCursor id) { InitFromStock(id); } +#if WXWIN_COMPATIBILITY_2_8 + wxCursor(int id) { InitFromStock((wxStockCursor)id); } +#endif + virtual ~wxCursor(); + + void MacInstall() const ; + + void SetHCURSOR(WXHCURSOR cursor); + WXHCURSOR GetHCURSOR() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + void InitFromStock(wxStockCursor); + + void CreateFromImage(const wxImage & image) ; + + DECLARE_DYNAMIC_CLASS(wxCursor) +}; + +extern WXDLLIMPEXP_CORE void wxSetCursor(const wxCursor& cursor); + +#endif // _WX_CURSOR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataform.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataform.h new file mode 100644 index 0000000000..a9c7ba9e3c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataform.h @@ -0,0 +1,68 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dataform.h +// Purpose: declaration of the wxDataFormat class +// Author: Stefan Csomor (lifted from dnd.h) +// Modified by: +// Created: 10/21/99 +// Copyright: (c) 1999 Stefan Csomor +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_DATAFORM_H +#define _WX_MAC_DATAFORM_H + +class WXDLLIMPEXP_CORE wxDataFormat +{ +public: + typedef unsigned long NativeFormat; + + wxDataFormat(); + wxDataFormat(wxDataFormatId vType); + wxDataFormat(const wxDataFormat& rFormat); + wxDataFormat(const wxString& rId); + wxDataFormat(const wxChar* pId); + wxDataFormat(NativeFormat vFormat); + ~wxDataFormat(); + + wxDataFormat& operator=(NativeFormat vFormat) + { SetId(vFormat); return *this; } + + // comparison (must have both versions) + bool operator==(const wxDataFormat& format) const ; + bool operator!=(const wxDataFormat& format) const + { return ! ( *this == format ); } + bool operator==(wxDataFormatId format) const + { return m_type == (wxDataFormatId)format; } + bool operator!=(wxDataFormatId format) const + { return m_type != (wxDataFormatId)format; } + + wxDataFormat& operator=(const wxDataFormat& format); + + // explicit and implicit conversions to NativeFormat which is one of + // standard data types (implicit conversion is useful for preserving the + // compatibility with old code) + NativeFormat GetFormatId() const { return m_format; } + operator NativeFormat() const { return m_format; } + + void SetId(NativeFormat format); + + // string ids are used for custom types - this SetId() must be used for + // application-specific formats + wxString GetId() const; + void SetId(const wxString& pId); + + // implementation + wxDataFormatId GetType() const { return m_type; } + void SetType( wxDataFormatId type ); + + // returns true if the format is one of those defined in wxDataFormatId + bool IsStandard() const { return m_type > 0 && m_type < wxDF_PRIVATE; } + +private: + wxDataFormatId m_type; + NativeFormat m_format; + // indicates the type in case of wxDF_PRIVATE : + wxString m_id ; +}; + +#endif // _WX_MAC_DATAFORM_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataobj.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataobj.h new file mode 100644 index 0000000000..45a73f289f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataobj.h @@ -0,0 +1,40 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dataobj.h +// Purpose: declaration of the wxDataObject +// Author: Stefan Csomor (adapted from Robert Roebling's gtk port) +// Modified by: +// Created: 10/21/99 +// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_DATAOBJ_H_ +#define _WX_MAC_DATAOBJ_H_ + +// ---------------------------------------------------------------------------- +// wxDataObject is the same as wxDataObjectBase under wxGTK +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase +{ +public: + wxDataObject(); +#ifdef __DARWIN__ + virtual ~wxDataObject() { } +#endif + + virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const; + void AddToPasteboard( void * pasteboardRef , wxIntPtr itemID ); + // returns true if the passed in format is present in the pasteboard + static bool IsFormatInPasteboard( void * pasteboardRef, const wxDataFormat &dataFormat ); + // returns true if any of the accepted formats of this dataobj is in the pasteboard + bool HasDataInPasteboard( void * pasteboardRef ); + bool GetFromPasteboard( void * pasteboardRef ); + +#if wxOSX_USE_COCOA + virtual void AddSupportedTypes( void* cfarray); +#endif +}; + +#endif // _WX_MAC_DATAOBJ_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataobj2.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataobj2.h new file mode 100644 index 0000000000..dec7fe50bf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataobj2.h @@ -0,0 +1,93 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dataobj2.h +// Purpose: declaration of standard wxDataObjectSimple-derived classes +// Author: David Webster (adapted from Robert Roebling's gtk port +// Modified by: +// Created: 10/21/99 +// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_DATAOBJ2_H_ +#define _WX_MAC_DATAOBJ2_H_ + +// ---------------------------------------------------------------------------- +// wxBitmapDataObject is a specialization of wxDataObject for bitmaps +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase +{ +public: + // ctors + wxBitmapDataObject(); + wxBitmapDataObject(const wxBitmap& bitmap); + + // destr + virtual ~wxBitmapDataObject(); + + // override base class virtual to update PNG data too + virtual void SetBitmap(const wxBitmap& bitmap); + + // implement base class pure virtuals + // ---------------------------------- + + virtual size_t GetDataSize() const ; + virtual bool GetDataHere(void *buf) const ; + virtual bool SetData(size_t len, const void *buf); + // Must provide overloads to avoid hiding them (and warnings about it) + virtual size_t GetDataSize(const wxDataFormat&) const + { + return GetDataSize(); + } + virtual bool GetDataHere(const wxDataFormat&, void *buf) const + { + return GetDataHere(buf); + } + virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) + { + return SetData(len, buf); + } + +protected : + void Init() ; + void Clear() ; + + void* m_pictHandle ; + bool m_pictCreated ; +}; + +// ---------------------------------------------------------------------------- +// wxFileDataObject is a specialization of wxDataObject for file names +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDataObject : public wxFileDataObjectBase +{ +public: + // implement base class pure virtuals + // ---------------------------------- + + void AddFile( const wxString &filename ); + + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + // Must provide overloads to avoid hiding them (and warnings about it) + virtual size_t GetDataSize(const wxDataFormat&) const + { + return GetDataSize(); + } + virtual bool GetDataHere(const wxDataFormat&, void *buf) const + { + return GetDataHere(buf); + } + virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) + { + return SetData(len, buf); + } +protected: + // translates the filenames stored into a utf8 encoded char stream + void GetFileNames(wxCharBuffer &buf) const ; +}; + +#endif // _WX_MAC_DATAOBJ2_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataview.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataview.h new file mode 100644 index 0000000000..de7bd27839 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dataview.h @@ -0,0 +1,311 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dataview.h +// Purpose: wxDataViewCtrl native implementation header for OSX +// Author: +// Copyright: (c) 2009 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DATAVIEWCTRL_OSX_H_ +#define _WX_DATAVIEWCTRL_OSX_H_ + +#ifdef __WXMAC_CLASSIC__ +# error "Native wxDataViewCtrl for classic environment not defined. Please use generic control." +#endif + +// -------------------------------------------------------- +// Class declarations to mask native types +// -------------------------------------------------------- +class wxDataViewColumnNativeData; // class storing environment dependent data for the native implementation +class wxDataViewWidgetImpl; // class used as a common interface for carbon and cocoa implementation + +// --------------------------------------------------------- +// wxDataViewColumn +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewColumn: public wxDataViewColumnBase +{ +public: + // constructors / destructor + wxDataViewColumn(const wxString& title, + wxDataViewRenderer* renderer, + unsigned int model_column, + int width = wxDVC_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE); + wxDataViewColumn(const wxBitmap& bitmap, + wxDataViewRenderer* renderer, + unsigned int model_column, + int width = wxDVC_DEFAULT_WIDTH, + wxAlignment align = wxALIGN_CENTER, + int flags = wxDATAVIEW_COL_RESIZABLE); + virtual ~wxDataViewColumn(); + + // implement wxHeaderColumnBase pure virtual methods + virtual wxAlignment GetAlignment() const { return m_alignment; } + virtual int GetFlags() const { return m_flags; } + virtual int GetMaxWidth() const { return m_maxWidth; } + virtual int GetMinWidth() const { return m_minWidth; } + virtual wxString GetTitle() const { return m_title; } + virtual int GetWidth() const; + virtual bool IsSortOrderAscending() const { return m_ascending; } + virtual bool IsSortKey() const; + virtual bool IsHidden() const; + + virtual void SetAlignment (wxAlignment align); + virtual void SetBitmap (wxBitmap const& bitmap); + virtual void SetFlags (int flags) { m_flags = flags; /*SetIndividualFlags(flags); */ } + virtual void SetHidden (bool hidden); + virtual void SetMaxWidth (int maxWidth); + virtual void SetMinWidth (int minWidth); + virtual void SetReorderable(bool reorderable); + virtual void SetResizeable (bool resizable); + virtual void SetSortable (bool sortable); + virtual void SetSortOrder (bool ascending); + virtual void SetTitle (wxString const& title); + virtual void SetWidth (int width); + + // implementation only + wxDataViewColumnNativeData* GetNativeData() const + { + return m_NativeDataPtr; + } + + void SetNativeData(wxDataViewColumnNativeData* newNativeDataPtr); // class takes ownership of pointer + int GetWidthVariable() const + { + return m_width; + } + void SetWidthVariable(int NewWidth) + { + m_width = NewWidth; + } + void SetSortOrderVariable(bool NewOrder) + { + m_ascending = NewOrder; + } + +private: + // common part of all ctors + void InitCommon(int width, wxAlignment align, int flags) + { + m_ascending = true; + m_flags = flags & ~wxDATAVIEW_COL_HIDDEN; // TODO + m_maxWidth = 30000; + m_minWidth = 0; + m_alignment = align; + SetWidth(width); + } + + bool m_ascending; // sorting order + + int m_flags; // flags for the column + int m_maxWidth; // maximum width for the column + int m_minWidth; // minimum width for the column + int m_width; // column width + + wxAlignment m_alignment; // column header alignment + + wxDataViewColumnNativeData* m_NativeDataPtr; // storing environment dependent data for the native implementation + + wxString m_title; // column title +}; + +// +// type definitions related to wxDataViewColumn +// +WX_DEFINE_ARRAY(wxDataViewColumn*,wxDataViewColumnPtrArrayType); + +// --------------------------------------------------------- +// wxDataViewCtrl +// --------------------------------------------------------- +class WXDLLIMPEXP_ADV wxDataViewCtrl: public wxDataViewCtrlBase +{ +public: + // Constructors / destructor: + wxDataViewCtrl() + { + Init(); + } + wxDataViewCtrl(wxWindow *parent, + wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDataViewCtrlNameStr ) + { + Init(); + Create(parent, winid, pos, size, style, validator, name); + } + + ~wxDataViewCtrl(); + + bool Create(wxWindow *parent, + wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDataViewCtrlNameStr); + + virtual wxWindow* GetMainWindow() // not used for the native implementation + { + return this; + } + + // inherited methods from wxDataViewCtrlBase: + virtual bool AssociateModel(wxDataViewModel* model); + + virtual bool AppendColumn (wxDataViewColumn* columnPtr); + virtual bool ClearColumns (); + virtual bool DeleteColumn (wxDataViewColumn* columnPtr); + virtual wxDataViewColumn* GetColumn (unsigned int pos) const; + virtual unsigned int GetColumnCount () const; + virtual int GetColumnPosition(const wxDataViewColumn* columnPtr) const; + virtual wxDataViewColumn* GetSortingColumn () const; + virtual bool InsertColumn (unsigned int pos, wxDataViewColumn *col); + virtual bool PrependColumn (wxDataViewColumn* columnPtr); + + virtual void Collapse( const wxDataViewItem& item); + virtual void EnsureVisible(const wxDataViewItem& item, const wxDataViewColumn* columnPtr=NULL); + virtual void Expand(const wxDataViewItem& item); + virtual bool IsExpanded(const wxDataViewItem & item) const; + + virtual unsigned int GetCount() const; + virtual wxRect GetItemRect(const wxDataViewItem& item, + const wxDataViewColumn* columnPtr = NULL) const; + virtual int GetSelectedItemsCount() const; + virtual int GetSelections(wxDataViewItemArray& sel) const; + + virtual void HitTest(const wxPoint& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const; + + virtual bool IsSelected(const wxDataViewItem& item) const; + + virtual void SelectAll(); + virtual void Select(const wxDataViewItem& item); + virtual void SetSelections(const wxDataViewItemArray& sel); + + virtual void Unselect(const wxDataViewItem& item); + virtual void UnselectAll(); + +// +// implementation +// + // returns a pointer to the native implementation + wxDataViewWidgetImpl* GetDataViewPeer() const; + + // adds all children of the passed parent to the control; if 'parentItem' is invalid the root(s) is/are added: + void AddChildren(wxDataViewItem const& parentItem); + + // finishes editing of custom items; if no custom item is currently edited the method does nothing + void FinishCustomItemEditing(); + + virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column); + + // returns the n-th pointer to a column; + // this method is different from GetColumn(unsigned int pos) because here 'n' is not a position in the control but the n-th + // position in the internal list/array of column pointers + wxDataViewColumn* GetColumnPtr(size_t n) const + { + return m_ColumnPtrs[n]; + } + // returns the current being rendered item of the customized renderer (this item is only valid during editing) + wxDataViewItem const& GetCustomRendererItem() const + { + return m_CustomRendererItem; + } + // returns a pointer to a customized renderer (this pointer is only valid during editing) + wxDataViewCustomRenderer* GetCustomRendererPtr() const + { + return m_CustomRendererPtr; + } + + // checks if currently a delete process is running + bool IsDeleting() const + { + return m_Deleting; + } + + // with CG, we need to get the context from an kEventControlDraw event + // unfortunately, the DataBrowser callbacks don't provide the context + // and we need it, so we need to set/remove it before and after draw + // events so we can access it in the callbacks. + void MacSetDrawingContext(void* context) + { + m_cgContext = context; + } + void* MacGetDrawingContext() const + { + return m_cgContext; + } + + // sets the currently being edited item of the custom renderer + void SetCustomRendererItem(wxDataViewItem const& NewItem) + { + m_CustomRendererItem = NewItem; + } + // sets the custom renderer + void SetCustomRendererPtr(wxDataViewCustomRenderer* NewCustomRendererPtr) + { + m_CustomRendererPtr = NewCustomRendererPtr; + } + // sets the flag indicating a deletion process: + void SetDeleting(bool deleting) + { + m_Deleting = deleting; + } + + virtual wxDataViewColumn *GetCurrentColumn() const; + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + // inherited methods from wxDataViewCtrlBase + virtual void DoSetExpanderColumn(); + virtual void DoSetIndent(); + + virtual wxSize DoGetBestSize() const; + + // event handling + void OnSize(wxSizeEvent &event); + void OnMouse(wxMouseEvent &event); + +private: + // initializing of local variables: + void Init(); + + virtual wxDataViewItem DoGetCurrentItem() const; + virtual void DoSetCurrentItem(const wxDataViewItem& item); + + // + // variables + // + bool m_Deleting; // flag indicating if a delete process is running; this flag is necessary because the notifier indicating an item deletion in the model may be called + // after the actual deletion of the item; then, native callback functions/delegates may try to update data of variables that are already deleted; + // if this flag is set all native variable update requests will be ignored + + void* m_cgContext; // pointer to core graphics context + + wxDataViewCustomRenderer* m_CustomRendererPtr; // pointer to a valid custom renderer while editing; this class does NOT own the pointer + + wxDataViewItem m_CustomRendererItem; // currently edited item by the customrenderer; it is invalid while not editing a custom item + + wxDataViewColumnPtrArrayType m_ColumnPtrs; // all column pointers are stored in an array + + wxDataViewModelNotifier* m_ModelNotifier; // stores the model notifier for the control (does not own the notifier) + + // wxWidget internal stuff: + DECLARE_DYNAMIC_CLASS(wxDataViewCtrl) + DECLARE_NO_COPY_CLASS(wxDataViewCtrl) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_DATAVIEWCTRL_OSX_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/datectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/datectrl.h new file mode 100644 index 0000000000..555ba68e99 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/datectrl.h @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/datectrl.h +// Purpose: Declaration of wxOSX-specific wxDatePickerCtrl class. +// Author: Vadim Zeitlin +// Created: 2011-12-18 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_DATECTRL_H_ +#define _WX_OSX_DATECTRL_H_ + +// ---------------------------------------------------------------------------- +// wxDatePickerCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlBase +{ +public: + // Constructors. + wxDatePickerCtrl() { } + + wxDatePickerCtrl(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDatePickerCtrlNameStr) + { + Create(parent, id, dt, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxDatePickerCtrlNameStr); + + // Implement the base class pure virtuals. + virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2); + virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const; + + virtual void OSXGenerateEvent(const wxDateTime& dt); + +private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl); +}; + +#endif // _WX_OSX_DATECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/datetimectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/datetimectrl.h new file mode 100644 index 0000000000..9993970125 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/datetimectrl.h @@ -0,0 +1,33 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/datetimectrl.h +// Purpose: Declaration of wxOSX-specific wxDateTimePickerCtrl class. +// Author: Vadim Zeitlin +// Created: 2011-12-18 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_DATETIMECTRL_H_ +#define _WX_OSX_DATETIMECTRL_H_ + +class wxDateTimeWidgetImpl; + +// ---------------------------------------------------------------------------- +// wxDateTimePickerCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDateTimePickerCtrl : public wxDateTimePickerCtrlBase +{ +public: + // Implement the base class pure virtuals. + virtual void SetValue(const wxDateTime& dt); + virtual wxDateTime GetValue() const; + + // Implementation only. + virtual void OSXGenerateEvent(const wxDateTime& dt) = 0; + +protected: + wxDateTimeWidgetImpl* GetDateTimePeer() const; +}; + +#endif // _WX_OSX_DATETIMECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dc.h new file mode 100644 index 0000000000..84bb59c077 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dc.h @@ -0,0 +1,14 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dc.h +// Purpose: wxDC class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DC_H_ +#define _WX_DC_H_ + +#endif // _WX_DC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcclient.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcclient.h new file mode 100644 index 0000000000..fca62cf35b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcclient.h @@ -0,0 +1,71 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dcclient.h +// Purpose: wxClientDC, wxPaintDC and wxWindowDC classes +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCCLIENT_H_ +#define _WX_DCCLIENT_H_ + +#include "wx/dc.h" +#include "wx/dcgraph.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxPaintDC; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class WXDLLIMPEXP_CORE wxWindowDCImpl: public wxGCDCImpl +{ +public: + wxWindowDCImpl( wxDC *owner ); + wxWindowDCImpl( wxDC *owner, wxWindow *window ); + virtual ~wxWindowDCImpl(); + + virtual void DoGetSize( int *width, int *height ) const; + virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const; + +protected: + bool m_release; + int m_width; + int m_height; + + DECLARE_CLASS(wxWindowDCImpl) + wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl); +}; + + +class WXDLLIMPEXP_CORE wxClientDCImpl: public wxWindowDCImpl +{ +public: + wxClientDCImpl( wxDC *owner ); + wxClientDCImpl( wxDC *owner, wxWindow *window ); + virtual ~wxClientDCImpl(); + +private: + DECLARE_CLASS(wxClientDCImpl) + wxDECLARE_NO_COPY_CLASS(wxClientDCImpl); +}; + + +class WXDLLIMPEXP_CORE wxPaintDCImpl: public wxWindowDCImpl +{ +public: + wxPaintDCImpl( wxDC *owner ); + wxPaintDCImpl( wxDC *owner, wxWindow *win ); + virtual ~wxPaintDCImpl(); + +protected: + DECLARE_CLASS(wxPaintDCImpl) + wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl); +}; + + +#endif + // _WX_DCCLIENT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcmemory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcmemory.h new file mode 100644 index 0000000000..bace3c5a95 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcmemory.h @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dcmemory.h +// Purpose: wxMemoryDC class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCMEMORY_H_ +#define _WX_DCMEMORY_H_ + +#include "wx/osx/dcclient.h" + +class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxPaintDCImpl +{ +public: + wxMemoryDCImpl( wxMemoryDC *owner ); + wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ); + wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); + + virtual ~wxMemoryDCImpl(); + + virtual void DoGetSize( int *width, int *height ) const; + virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const + { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); } + virtual void DoSelect(const wxBitmap& bitmap); + + virtual const wxBitmap& GetSelectedBitmap() const + { return m_selected; } + virtual wxBitmap& GetSelectedBitmap() + { return m_selected; } + +private: + void Init(); + + wxBitmap m_selected; + + DECLARE_CLASS(wxMemoryDCImpl) + wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl); +}; + +#endif + // _WX_DCMEMORY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcprint.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcprint.h new file mode 100644 index 0000000000..ec9f785167 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcprint.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dcprint.h +// Purpose: wxPrinterDC class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCPRINT_H_ +#define _WX_DCPRINT_H_ + +#include "wx/dc.h" +#include "wx/dcgraph.h" +#include "wx/cmndata.h" + +class wxNativePrinterDC ; + +class WXDLLIMPEXP_CORE wxPrinterDCImpl: public wxGCDCImpl +{ +public: +#if wxUSE_PRINTING_ARCHITECTURE + + wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& printdata ); + virtual ~wxPrinterDCImpl(); + + virtual bool StartDoc( const wxString& WXUNUSED(message) ) ; + virtual void EndDoc(void) ; + virtual void StartPage(void) ; + virtual void EndPage(void) ; + + wxRect GetPaperRect() const; + + wxPrintData& GetPrintData() { return m_printData; } + virtual wxSize GetPPI() const; + +protected: + virtual void DoGetSize( int *width, int *height ) const; + + wxPrintData m_printData ; + wxNativePrinterDC* m_nativePrinterDC ; + +private: + DECLARE_CLASS(wxPrinterDC) +#endif // wxUSE_PRINTING_ARCHITECTURE +}; + +#endif + // _WX_DCPRINT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcscreen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcscreen.h new file mode 100644 index 0000000000..374f0efcd8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dcscreen.h @@ -0,0 +1,34 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dcscreen.h +// Purpose: wxScreenDC class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCSCREEN_H_ +#define _WX_DCSCREEN_H_ + +#include "wx/dcclient.h" +#include "wx/osx/dcclient.h" + +class WXDLLIMPEXP_CORE wxScreenDCImpl: public wxWindowDCImpl +{ +public: + wxScreenDCImpl( wxDC *owner ); + virtual ~wxScreenDCImpl(); + + virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const; +private: + void* m_overlayWindow; + +private: + DECLARE_CLASS(wxScreenDCImpl) + wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl); +}; + +#endif + // _WX_DCSCREEN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dialog.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dialog.h new file mode 100644 index 0000000000..3b0b724fb8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dialog.h @@ -0,0 +1,95 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dialog.h +// Purpose: wxDialog class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIALOG_H_ +#define _WX_DIALOG_H_ + +#include "wx/panel.h" + +class WXDLLIMPEXP_FWD_CORE wxMacToolTip ; +class WXDLLIMPEXP_FWD_CORE wxModalEventLoop ; + +// Dialog boxes +class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase +{ + DECLARE_DYNAMIC_CLASS(wxDialog) + +public: + wxDialog() { Init(); } + + // Constructor with no modal flag - the new convention. + wxDialog(wxWindow *parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr) + { + Init(); + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr); + + virtual ~wxDialog(); + +// virtual bool Destroy(); + virtual bool Show(bool show = true); + + // return true if we're showing the dialog modally + virtual bool IsModal() const; + + // show the dialog modally and return the value passed to EndModal() + virtual int ShowModal(); + + virtual void ShowWindowModal(); + + // may be called to terminate the dialog with the given return code + virtual void EndModal(int retCode); + + static bool OSXHasModalDialogsOpen(); + static void OSXBeginModalDialog(); + static void OSXEndModalDialog(); + + // implementation + // -------------- + + wxDialogModality GetModality() const; + +#if wxOSX_USE_COCOA + virtual void ModalFinishedCallback(void* WXUNUSED(panel), int WXUNUSED(returnCode)) {} +#endif + +protected: + // show window modal dialog + void DoShowWindowModal(); + + // end window modal dialog. + void EndWindowModal(); + + // mac also takes command-period as cancel + virtual bool IsEscapeKey(const wxKeyEvent& event); + + + wxDialogModality m_modality; + + wxModalEventLoop* m_eventLoop; + +private: + void Init(); +}; + +#endif + // _WX_DIALOG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dirdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dirdlg.h new file mode 100644 index 0000000000..f355f604e8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dirdlg.h @@ -0,0 +1,70 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dirdlg.h +// Purpose: wxDirDialog class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DIRDLG_H_ +#define _WX_DIRDLG_H_ + +#if wxOSX_USE_COCOA + DECLARE_WXCOCOA_OBJC_CLASS(NSOpenPanel); +#endif + +class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase +{ +public: + wxDirDialog() { Init(); } + + wxDirDialog(wxWindow *parent, + const wxString& message = wxDirSelectorPromptStr, + const wxString& defaultPath = wxT(""), + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& name = wxDirDialogNameStr) + { + Init(); + + Create(parent,message,defaultPath,style,pos,size,name); + } + + void Create(wxWindow *parent, + const wxString& message = wxDirSelectorPromptStr, + const wxString& defaultPath = wxT(""), + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& name = wxDirDialogNameStr); + +#if wxOSX_USE_COCOA + ~wxDirDialog(); +#endif + + virtual int ShowModal(); + +#if wxOSX_USE_COCOA + virtual void ShowWindowModal(); + virtual void ModalFinishedCallback(void* panel, int returnCode); +#endif + +private: +#if wxOSX_USE_COCOA + // Create and initialize NSOpenPanel that we use in both ShowModal() and + // ShowWindowModal(). + WX_NSOpenPanel OSXCreatePanel() const; + + WX_NSObject m_sheetDelegate; +#endif + + // Common part of all ctors. + void Init(); + + DECLARE_DYNAMIC_CLASS(wxDirDialog) +}; + +#endif // _WX_DIRDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dnd.h new file mode 100644 index 0000000000..7cd8ed2242 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dnd.h @@ -0,0 +1,108 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dnd.h +// Purpose: Declaration of the wxDropTarget, wxDropSource class etc. +// Author: Stefan Csomor +// Copyright: (c) 1998 Stefan Csomor +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DND_H_ +#define _WX_DND_H_ + +#if wxUSE_DRAG_AND_DROP + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" +#include "wx/string.h" +#include "wx/dataobj.h" +#include "wx/cursor.h" + +//------------------------------------------------------------------------- +// classes +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class WXDLLIMPEXP_FWD_CORE wxDropTarget; +class WXDLLIMPEXP_FWD_CORE wxTextDropTarget; +class WXDLLIMPEXP_FWD_CORE wxFileDropTarget; + +class WXDLLIMPEXP_FWD_CORE wxDropSource; + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// this macro may be used instead for wxDropSource ctor arguments: it will use +// the icon 'name' from an XPM file under GTK, but will expand to something +// else under MSW. If you don't use it, you will have to use #ifdef in the +// application code. +#define wxDROP_ICON(X) wxCursor(X##_xpm) + +//------------------------------------------------------------------------- +// wxDropTarget +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropTarget: public wxDropTargetBase +{ + public: + + wxDropTarget(wxDataObject *dataObject = NULL ); + + virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); + virtual bool OnDrop(wxCoord x, wxCoord y); + virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def); + virtual bool GetData(); + // NOTE: This is needed by the generic wxDataViewCtrl, not sure how to implement. + virtual wxDataFormat GetMatchingPair(); + + bool CurrentDragHasSupportedFormat() ; + void SetCurrentDragPasteboard( void* dragpasteboard ) { m_currentDragPasteboard = dragpasteboard ; } + protected : + void* m_currentDragPasteboard ; +}; + +//------------------------------------------------------------------------- +// wxDropSource +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase +{ +public: + // ctors: if you use default ctor you must call SetData() later! + // + // NB: the "wxWindow *win" parameter is unused and is here only for wxGTK + // compatibility, as well as both icon parameters + wxDropSource( wxWindow *win = NULL, + const wxCursor &cursorCopy = wxNullCursor, + const wxCursor &cursorMove = wxNullCursor, + const wxCursor &cursorStop = wxNullCursor); + + /* constructor for setting one data object */ + wxDropSource( wxDataObject& data, + wxWindow *win, + const wxCursor &cursorCopy = wxNullCursor, + const wxCursor &cursorMove = wxNullCursor, + const wxCursor &cursorStop = wxNullCursor); + + virtual ~wxDropSource(); + + // do it (call this in response to a mouse button press, for example) + // params: if bAllowMove is false, data can be only copied + virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); + + wxWindow* GetWindow() { return m_window ; } + void SetCurrentDragPasteboard( void* dragpasteboard ) { m_currentDragPasteboard = dragpasteboard ; } + bool MacInstallDefaultCursor(wxDragResult effect) ; + static wxDropSource* GetCurrentDropSource(); + protected : + + wxWindow *m_window; + void* m_currentDragPasteboard ; +}; + +#endif // wxUSE_DRAG_AND_DROP + +#endif + //_WX_DND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dvrenderer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dvrenderer.h new file mode 100644 index 0000000000..d7ded78464 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dvrenderer.h @@ -0,0 +1,111 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dvrenderer.h +// Purpose: wxDataViewRenderer for OS X wxDataViewCtrl implementations +// Author: Vadim Zeitlin +// Created: 2009-11-07 (extracted from wx/osx/dataview.h) +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_DVRENDERER_H_ +#define _WX_OSX_DVRENDERER_H_ + +class wxDataViewRendererNativeData; + +// ---------------------------------------------------------------------------- +// wxDataViewRenderer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewRenderer : public wxDataViewRendererBase +{ +public: + // constructors / destructor + // ------------------------- + + wxDataViewRenderer(const wxString& varianttype, + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT); + + virtual ~wxDataViewRenderer(); + + // inherited methods from wxDataViewRendererBase + // --------------------------------------------- + + virtual int GetAlignment() const + { + return m_alignment; + } + virtual wxDataViewCellMode GetMode() const + { + return m_mode; + } + virtual bool GetValue(wxVariant& value) const + { + value = m_value; + return true; + } + + // NB: in Carbon this is always identical to the header alignment + virtual void SetAlignment(int align); + virtual void SetMode(wxDataViewCellMode mode); + virtual bool SetValue(const wxVariant& newValue) + { + m_value = newValue; + return true; + } + + virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE); + virtual wxEllipsizeMode GetEllipsizeMode() const; + + // implementation + // -------------- + + const wxVariant& GetValue() const + { + return m_value; + } + + wxDataViewRendererNativeData* GetNativeData() const + { + return m_NativeDataPtr; + } + + // a call to the native data browser function to render the data; + // returns true if the data value could be rendered, false otherwise + virtual bool MacRender() = 0; + + void SetNativeData(wxDataViewRendererNativeData* newNativeDataPtr); + + +#if wxOSX_USE_COCOA + // called when a value was edited by user + virtual void OSXOnCellChanged(NSObject *value, + const wxDataViewItem& item, + unsigned col); + + // called to ensure that the given attribute will be used for rendering the + // next cell (which had been already associated with this renderer before) + virtual void OSXApplyAttr(const wxDataViewItemAttr& attr); + + // called to set the state of the next cell to be rendered + virtual void OSXApplyEnabled(bool enabled); +#endif // Cocoa + +private: + // contains the alignment flags + int m_alignment; + + // storing the mode that determines how the cell is going to be shown + wxDataViewCellMode m_mode; + + // data used by implementation of the native renderer + wxDataViewRendererNativeData* m_NativeDataPtr; + + // value that is going to be rendered + wxVariant m_value; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer) +}; + +#endif // _WX_OSX_DVRENDERER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dvrenderers.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dvrenderers.h new file mode 100644 index 0000000000..d046b1a851 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/dvrenderers.h @@ -0,0 +1,212 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/dvrenderers.h +// Purpose: All OS X wxDataViewCtrl renderer classes +// Author: Vadim Zeitlin +// Created: 2009-11-07 (extracted from wx/osx/dataview.h) +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_DVRENDERERS_H_ +#define _WX_OSX_DVRENDERERS_H_ + +// --------------------------------------------------------- +// wxDataViewCustomRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewCustomRenderer : public wxDataViewCustomRendererBase +{ +public: + wxDataViewCustomRenderer(const wxString& varianttype = "string", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT); + + virtual ~wxDataViewCustomRenderer(); + + + // implementation only + // ------------------- + + virtual bool MacRender(); + +#if wxOSX_USE_COCOA + virtual void OSXApplyAttr(const wxDataViewItemAttr& attr); +#endif // Cocoa + + virtual wxDC* GetDC(); // creates a device context and keeps it + void SetDC(wxDC* newDCPtr); // this method takes ownership of the pointer + +private: + wxControl* m_editorCtrlPtr; // pointer to an in-place editor control + + wxDC* m_DCPtr; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewTextRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewTextRenderer: public wxDataViewRenderer +{ +public: + wxDataViewTextRenderer(const wxString& varianttype = "string", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT); + + virtual bool MacRender(); + +#if wxOSX_USE_COCOA + virtual void OSXOnCellChanged(NSObject *value, + const wxDataViewItem& item, + unsigned col); +#endif // Cocoa + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewBitmapRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewBitmapRenderer: public wxDataViewRenderer +{ +public: + wxDataViewBitmapRenderer(const wxString& varianttype = "wxBitmap", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT); + + virtual bool MacRender(); + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewBitmapRenderer) +}; + +#if wxOSX_USE_COCOA + +// ------------------------------------- +// wxDataViewChoiceRenderer +// ------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewChoiceRenderer: public wxDataViewRenderer +{ +public: + wxDataViewChoiceRenderer(const wxArrayString& choices, + wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, + int alignment = wxDVR_DEFAULT_ALIGNMENT ); + + virtual bool MacRender(); + + wxString GetChoice(size_t index) const { return m_choices[index]; } + const wxArrayString& GetChoices() const { return m_choices; } + +#if wxOSX_USE_COCOA + virtual void OSXOnCellChanged(NSObject *value, + const wxDataViewItem& item, + unsigned col); +#endif // Cocoa + +private: + wxArrayString m_choices; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewChoiceRenderer) +}; + +#endif // wxOSX_USE_COCOA + +// --------------------------------------------------------- +// wxDataViewIconTextRenderer +// --------------------------------------------------------- +class WXDLLIMPEXP_ADV wxDataViewIconTextRenderer: public wxDataViewRenderer +{ +public: + wxDataViewIconTextRenderer(const wxString& varianttype = "wxDataViewIconText", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT); + + virtual bool MacRender(); + +#if wxOSX_USE_COCOA + virtual void OSXOnCellChanged(NSObject *value, + const wxDataViewItem& item, + unsigned col); +#endif // Cocoa + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewToggleRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewToggleRenderer: public wxDataViewRenderer +{ +public: + wxDataViewToggleRenderer(const wxString& varianttype = "bool", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT); + + virtual bool MacRender(); + +#if wxOSX_USE_COCOA + virtual void OSXOnCellChanged(NSObject *value, + const wxDataViewItem& item, + unsigned col); +#endif // Cocoa + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewProgressRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewProgressRenderer: public wxDataViewRenderer +{ +public: + wxDataViewProgressRenderer(const wxString& label = wxEmptyString, + const wxString& varianttype = "long", + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT); + + virtual bool MacRender(); + +#if wxOSX_USE_COCOA + virtual void OSXOnCellChanged(NSObject *value, + const wxDataViewItem& item, + unsigned col); +#endif // Cocoa + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer) +}; + +// --------------------------------------------------------- +// wxDataViewDateRenderer +// --------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxDataViewDateRenderer: public wxDataViewRenderer +{ +public: + wxDataViewDateRenderer(const wxString& varianttype = "datetime", + wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, + int align = wxDVR_DEFAULT_ALIGNMENT); + + virtual bool MacRender(); + +#if wxOSX_USE_COCOA + virtual void OSXOnCellChanged(NSObject *value, + const wxDataViewItem& item, + unsigned col); +#endif // Cocoa + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewDateRenderer) +}; + +#endif // _WX_OSX_DVRENDERERS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/evtloop.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/evtloop.h new file mode 100644 index 0000000000..98772dd97f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/evtloop.h @@ -0,0 +1,46 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/evtloop.h +// Purpose: simply forwards to wx/osx/carbon/evtloop.h or +// wx/osx/cocoa/evtloop.h for consistency with the other Mac +// headers +// Author: Vadim Zeitlin +// Modified by: +// Created: 2006-01-12 +// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_EVTLOOP_H_ +#define _WX_OSX_EVTLOOP_H_ + +#ifdef __WXOSX_COCOA__ + #include "wx/osx/cocoa/evtloop.h" +#else + #include "wx/osx/carbon/evtloop.h" +#endif + +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxNonOwnedWindow; + +class WXDLLIMPEXP_CORE wxModalEventLoop : public wxGUIEventLoop +{ +public: + wxModalEventLoop(wxWindow *modalWindow); + wxModalEventLoop(WXWindow modalNativeWindow); + +#ifdef __WXOSX_COCOA__ + // skip wxGUIEventLoop to avoid missing Enter/Exit notifications + virtual int Run() { return wxCFEventLoop::Run(); } + + virtual bool ProcessIdle(); +#endif +protected: + virtual void OSXDoRun(); + virtual void OSXDoStop(); + + // (in case) the modal window for this event loop + wxNonOwnedWindow* m_modalWindow; + WXWindow m_modalNativeWindow; +}; + +#endif // _WX_OSX_EVTLOOP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/evtloopsrc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/evtloopsrc.h new file mode 100644 index 0000000000..291ce0f1e4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/evtloopsrc.h @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/evtloopsrc.h +// Purpose: wxCFEventLoopSource class +// Author: Vadim Zeitlin +// Created: 2009-10-21 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_EVTLOOPSRC_H_ +#define _WX_OSX_EVTLOOPSRC_H_ + +typedef struct __CFSocket* CFSocketRef; + +// ---------------------------------------------------------------------------- +// wxCFEventLoopSource: CoreFoundation-based wxEventLoopSource for OS X +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxCFEventLoopSource : public wxEventLoopSource +{ +public: + // Create a new source in uninitialized state, call InitSocketRef() later + // to associate it with the socket it is going to use. + wxCFEventLoopSource(wxEventLoopSourceHandler *handler, int flags) + : wxEventLoopSource(handler, flags) + { + m_cfSocket = NULL; + } + + // Finish initialization of the event loop source by providing the + // associated socket. This object takes ownership of it and will release it. + void InitSourceSocket(CFSocketRef cfSocket); + + // Destructor deletes the associated socket. + virtual ~wxCFEventLoopSource(); + +private: + CFSocketRef m_cfSocket; + + wxDECLARE_NO_COPY_CLASS(wxCFEventLoopSource); +}; + +#endif // _WX_OSX_EVTLOOPSRC_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/filedlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/filedlg.h new file mode 100644 index 0000000000..10342fa8a8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/filedlg.h @@ -0,0 +1,111 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/filedlg.h +// Purpose: wxFileDialog class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILEDLG_H_ +#define _WX_FILEDLG_H_ + +class WXDLLIMPEXP_FWD_CORE wxChoice; + +//------------------------------------------------------------------------- +// wxFileDialog +//------------------------------------------------------------------------- + +// set this system option to 1 in order to always show the filetypes popup in +// file open dialogs if possible + +#define wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES wxT("osx.openfiledialog.always-show-types") + +class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase +{ +DECLARE_DYNAMIC_CLASS(wxFileDialog) +protected: + wxArrayString m_fileNames; + wxArrayString m_paths; + +public: + wxFileDialog() { Init(); } + wxFileDialog(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr) + { + Init(); + + Create(parent,message,defaultDir,defaultFile,wildCard,style,pos,sz,name); + } + + void Create(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr); + +#if wxOSX_USE_COCOA + ~wxFileDialog(); +#endif + + virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; } + virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; } + + virtual int ShowModal(); + +#if wxOSX_USE_COCOA + virtual void ShowWindowModal(); + virtual void ModalFinishedCallback(void* panel, int resultCode); +#endif + + virtual bool SupportsExtraControl() const; + + // implementation only + +#if wxOSX_USE_COCOA + // returns true if the file can be shown as active + bool CheckFile( const wxString& filename ); +#endif + +protected: + // not supported for file dialog, RR + virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} + + void SetupExtraControls(WXWindow nativeWindow); + +#if wxOSX_USE_COCOA + virtual wxWindow* CreateFilterPanel(wxWindow *extracontrol); + void DoOnFilterSelected(int index); + virtual void OnFilterSelected(wxCommandEvent &event); + + wxArrayString m_filterExtensions; + wxArrayString m_filterNames; + wxChoice* m_filterChoice; + wxWindow* m_filterPanel; + bool m_useFileTypeFilter; + int m_firstFileTypeFilter; + wxArrayString m_currentExtensions; + WX_NSObject m_delegate; + WX_NSObject m_sheetDelegate; +#endif + +private: + // Common part of all ctors. + void Init(); +}; + +#endif // _WX_FILEDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/font.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/font.h new file mode 100644 index 0000000000..2c31c2daa7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/font.h @@ -0,0 +1,191 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/font.h +// Purpose: wxFont class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONT_H_ +#define _WX_FONT_H_ + +// ---------------------------------------------------------------------------- +// wxFont +// ---------------------------------------------------------------------------- + +// font styles +enum wxOSXSystemFont +{ + wxOSX_SYSTEM_FONT_NONE = 0, + wxOSX_SYSTEM_FONT_NORMAL, + wxOSX_SYSTEM_FONT_BOLD, + wxOSX_SYSTEM_FONT_SMALL, + wxOSX_SYSTEM_FONT_SMALL_BOLD, + wxOSX_SYSTEM_FONT_MINI, + wxOSX_SYSTEM_FONT_MINI_BOLD, + wxOSX_SYSTEM_FONT_LABELS, + wxOSX_SYSTEM_FONT_VIEWS +}; + + +class WXDLLIMPEXP_CORE wxFont : public wxFontBase +{ +public: + // ctors and such + wxFont() { } + + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + + wxFont( wxOSXSystemFont systemFont ); + +#if wxOSX_USE_COCOA + wxFont(WX_NSFont nsfont); +#endif + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxFont(int size, + int family, + int style, + int weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding); + } +#endif + + wxFont(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(size, family, style, weight, underlined, face, encoding); + } + + wxFont(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(10, family, style, weight, underlined, face, encoding); + SetPixelSize(pixelSize); + } + + bool Create(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + + wxFont(const wxNativeFontInfo& info) + { + (void)Create(info); + } + + wxFont(const wxString& fontDesc); + + bool Create(const wxNativeFontInfo& info); + + virtual ~wxFont(); + + // implement base class pure virtuals + virtual int GetPointSize() const; + virtual wxSize GetPixelSize() const; + virtual wxFontStyle GetStyle() const; + virtual wxFontWeight GetWeight() const; + virtual bool GetUnderlined() const; + virtual wxString GetFaceName() const; + virtual wxFontEncoding GetEncoding() const; + virtual const wxNativeFontInfo *GetNativeFontInfo() const; + + virtual bool IsFixedWidth() const; + + virtual void SetPointSize(int pointSize); + virtual void SetFamily(wxFontFamily family); + virtual void SetStyle(wxFontStyle style); + virtual void SetWeight(wxFontWeight weight); + virtual bool SetFaceName(const wxString& faceName); + virtual void SetUnderlined(bool underlined); + virtual void SetEncoding(wxFontEncoding encoding); + + wxDECLARE_COMMON_FONT_METHODS(); + + // implementation only from now on + // ------------------------------- + + virtual bool RealizeResource(); + + // Mac-specific, risks to change, don't use in portable code + +#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT + wxUint16 MacGetThemeFontID() const ; + + // 'old' Quickdraw accessors + short MacGetFontNum() const; + wxByte MacGetFontStyle() const; +#endif + +#if wxOSX_USE_COCOA_OR_CARBON + CGFontRef OSXGetCGFont() const; +#endif + + CTFontRef OSXGetCTFont() const; + +#if wxOSX_USE_ATSU_TEXT + // Returns an ATSUStyle not ATSUStyle* + void* MacGetATSUStyle() const ; + void* OSXGetATSUStyle() const { return MacGetATSUStyle() ; } + + wxDEPRECATED( wxUint32 MacGetATSUFontID() const ); + wxDEPRECATED( wxUint32 MacGetATSUAdditionalQDStyles() const ); +#endif + +#if wxOSX_USE_COCOA + WX_NSFont OSXGetNSFont() const; + static WX_NSFont OSXCreateNSFont(wxOSXSystemFont font, wxNativeFontInfo* info); + static WX_NSFont OSXCreateNSFont(const wxNativeFontInfo* info); + static void SetNativeInfoFromNSFont(WX_NSFont nsfont, wxNativeFontInfo* info); +#endif + +#if wxOSX_USE_IPHONE + WX_UIFont OSXGetUIFont() const; + static WX_UIFont OSXCreateUIFont(wxOSXSystemFont font, wxNativeFontInfo* info); + static WX_UIFont OSXCreateUIFont(const wxNativeFontInfo* info); +#endif + +protected: + virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info); + virtual wxFontFamily DoGetFamily() const; + + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + + DECLARE_DYNAMIC_CLASS(wxFont) +}; + +#endif // _WX_FONT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/fontdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/fontdlg.h new file mode 100644 index 0000000000..e271578cdf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/fontdlg.h @@ -0,0 +1,173 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/fontdlg.h +// Purpose: wxFontDialog class using fonts window services (10.2+). +// Author: Ryan Norton +// Modified by: +// Created: 2004-09-25 +// Copyright: (c) Ryan Norton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONTDLG_H_ +#define _WX_FONTDLG_H_ + +#include "wx/dialog.h" + +/* + * Font dialog + */ + +/* + * support old notation + */ +#ifdef wxMAC_USE_EXPERIMENTAL_FONTDIALOG +#define wxOSX_USE_EXPERIMENTAL_FONTDIALOG wxMAC_USE_EXPERIMENTAL_FONTDIALOG +#endif + +#ifndef wxOSX_USE_EXPERIMENTAL_FONTDIALOG +#define wxOSX_USE_EXPERIMENTAL_FONTDIALOG 1 +#endif + +#if wxOSX_USE_EXPERIMENTAL_FONTDIALOG + +class WXDLLIMPEXP_CORE wxFontDialog : public wxDialog +{ +public: + wxFontDialog(); + wxFontDialog(wxWindow *parent); + wxFontDialog(wxWindow *parent, const wxFontData& data); + virtual ~wxFontDialog(); + + bool Create(wxWindow *parent); + bool Create(wxWindow *parent, const wxFontData& data); + + int ShowModal(); + wxFontData& GetFontData() { return m_fontData; } + +protected: + wxFontData m_fontData; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxFontDialog) +}; + +extern "C" int RunMixedFontDialog(wxFontDialog* dialog) ; + +#else // wxOSX_USE_EXPERIMENTAL_FONTDIALOG + +#if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX + +/*! + * Forward declarations + */ + +class wxFontColourSwatchCtrl; +class wxFontPreviewCtrl; +class WXDLLIMPEXP_FWD_CORE wxSpinCtrl; +class WXDLLIMPEXP_FWD_CORE wxSpinEvent; +class WXDLLIMPEXP_FWD_CORE wxListBox; +class WXDLLIMPEXP_FWD_CORE wxChoice; +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxStaticText; +class WXDLLIMPEXP_FWD_CORE wxCheckBox; + +/*! + * Control identifiers + */ + +#define wxID_FONTDIALOG_FACENAME 20001 +#define wxID_FONTDIALOG_FONTSIZE 20002 +#define wxID_FONTDIALOG_BOLD 20003 +#define wxID_FONTDIALOG_ITALIC 20004 +#define wxID_FONTDIALOG_UNDERLINED 20005 +#define wxID_FONTDIALOG_COLOUR 20006 +#define wxID_FONTDIALOG_PREVIEW 20007 + +#endif + // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX + +class WXDLLIMPEXP_CORE wxFontDialog: public wxDialog +{ +DECLARE_DYNAMIC_CLASS(wxFontDialog) + +#if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX +DECLARE_EVENT_TABLE() +#endif + +public: + wxFontDialog(); + wxFontDialog(wxWindow *parent, const wxFontData& data); + virtual ~wxFontDialog(); + + bool Create(wxWindow *parent, const wxFontData& data); + + int ShowModal(); + wxFontData& GetFontData() { return m_fontData; } + bool IsShown() const; + void OnPanelClose(); + void SetData(const wxFontData& data); + +#if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX + + /// Creates the controls and sizers + void CreateControls(); + + /// Initialize font + void InitializeFont(); + + /// Set controls according to current font + void InitializeControls(); + + /// Respond to font change + void ChangeFont(); + + /// Respond to colour change + void OnColourChanged(wxCommandEvent& event); + + /// wxEVT_LISTBOX event handler for wxID_FONTDIALOG_FACENAME + void OnFontdialogFacenameSelected( wxCommandEvent& event ); + + /// wxEVT_SPINCTRL event handler for wxID_FONTDIALOG_FONTSIZE + void OnFontdialogFontsizeUpdated( wxSpinEvent& event ); + + /// wxEVT_TEXT event handler for wxID_FONTDIALOG_FONTSIZE + void OnFontdialogFontsizeTextUpdated( wxCommandEvent& event ); + + /// wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_BOLD + void OnFontdialogBoldClick( wxCommandEvent& event ); + + /// wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_ITALIC + void OnFontdialogItalicClick( wxCommandEvent& event ); + + /// wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_UNDERLINED + void OnFontdialogUnderlinedClick( wxCommandEvent& event ); + + /// wxEVT_BUTTON event handler for wxID_OK + void OnOkClick( wxCommandEvent& event ); + + /// Should we show tooltips? + static bool ShowToolTips(); + + wxListBox* m_facenameCtrl; + wxSpinCtrl* m_sizeCtrl; + wxCheckBox* m_boldCtrl; + wxCheckBox* m_italicCtrl; + wxCheckBox* m_underlinedCtrl; + wxFontColourSwatchCtrl* m_colourCtrl; + wxFontPreviewCtrl* m_previewCtrl; + + wxFont m_dialogFont; + bool m_suppressUpdates; + +#endif + // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX + +protected: + wxWindow* m_dialogParent; + wxFontData m_fontData; + void* m_pEventHandlerRef; +}; + +#endif + +#endif + // _WX_FONTDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/frame.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/frame.h new file mode 100644 index 0000000000..5902dc0c9c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/frame.h @@ -0,0 +1,118 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/frame.h +// Purpose: wxFrame class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FRAME_H_ +#define _WX_FRAME_H_ + +#include "wx/toolbar.h" +#include "wx/accel.h" +#include "wx/icon.h" + +class WXDLLIMPEXP_FWD_CORE wxMacToolTip ; + +class WXDLLIMPEXP_CORE wxFrame: public wxFrameBase +{ +public: + // construction + wxFrame() { Init(); } + wxFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxFrame(); + + // implementation only from now on + // ------------------------------- + + // get the origin of the client area (which may be different from (0, 0) + // if the frame has a toolbar) in client coordinates + virtual wxPoint GetClientAreaOrigin() const; + + // override some more virtuals + virtual bool Enable(bool enable = true) ; + + // event handlers + void OnActivate(wxActivateEvent& event); + void OnSysColourChanged(wxSysColourChangedEvent& event); + + // Toolbar +#if wxUSE_TOOLBAR + virtual wxToolBar* CreateToolBar(long style = -1, + wxWindowID id = -1, + const wxString& name = wxToolBarNameStr); + + virtual void SetToolBar(wxToolBar *toolbar); +#endif // wxUSE_TOOLBAR + + // Status bar +#if wxUSE_STATUSBAR + virtual wxStatusBar* OnCreateStatusBar(int number = 1, + long style = wxSTB_DEFAULT_STYLE, + wxWindowID id = 0, + const wxString& name = wxStatusLineNameStr); +#endif // wxUSE_STATUSBAR + + // called by wxWindow whenever it gets focus + void SetLastFocus(wxWindow *win) { m_winLastFocused = win; } + wxWindow *GetLastFocus() const { return m_winLastFocused; } + + void PositionBars(); + + // internal response to size events + virtual void MacOnInternalSize() { PositionBars(); } + +protected: + // common part of all ctors + void Init(); + +#if wxUSE_TOOLBAR + virtual void PositionToolBar(); +#endif +#if wxUSE_STATUSBAR + virtual void PositionStatusBar(); +#endif + + // override base class virtuals + virtual void DoGetClientSize(int *width, int *height) const; + virtual void DoSetClientSize(int width, int height); + +#if wxUSE_MENUS + virtual void DetachMenuBar(); + virtual void AttachMenuBar(wxMenuBar *menubar); +#endif + + // the last focused child: we restore focus to it on activation + wxWindow *m_winLastFocused; + + virtual bool MacIsChildOfClientArea( const wxWindow* child ) const ; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxFrame) +}; + +#endif + // _WX_FRAME_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/gauge.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/gauge.h new file mode 100644 index 0000000000..692c3b587a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/gauge.h @@ -0,0 +1,53 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/gauge.h +// Purpose: wxGauge class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GAUGE_H_ +#define _WX_GAUGE_H_ + +#include "wx/control.h" + +// Group box +class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase +{ + public: + inline wxGauge() { } + + inline wxGauge(wxWindow *parent, wxWindowID id, + int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + 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, wxWindowID id, + int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr); + + // set gauge range/value + virtual void SetRange(int range); + virtual void SetValue(int pos); + virtual int GetValue() const ; + + void Pulse(); + + protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxGauge) +}; + +#endif + // _WX_GAUGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/glcanvas.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/glcanvas.h new file mode 100644 index 0000000000..1789a900f0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/glcanvas.h @@ -0,0 +1,162 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/glcanvas.h +// Purpose: wxGLCanvas, for using OpenGL with wxWidgets under Macintosh +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GLCANVAS_H_ +#define _WX_GLCANVAS_H_ + +#ifdef __WXOSX_IPHONE__ +#import <OpenGLES/ES1/gl.h> +#import <OpenGLES/ES1/glext.h> +#define wxUSE_OPENGL_EMULATION 1 +#else +#include <OpenGL/gl.h> +#endif + +#include "wx/vector.h" + +// low level calls + +WXDLLIMPEXP_GL WXGLContext WXGLCreateContext( WXGLPixelFormat pixelFormat, WXGLContext shareContext ); +WXDLLIMPEXP_GL void WXGLDestroyContext( WXGLContext context ); + +WXDLLIMPEXP_GL WXGLContext WXGLGetCurrentContext(); +WXDLLIMPEXP_GL bool WXGLSetCurrentContext(WXGLContext context); + +WXDLLIMPEXP_GL WXGLPixelFormat WXGLChoosePixelFormat(const int *attribList); +WXDLLIMPEXP_GL void WXGLDestroyPixelFormat( WXGLPixelFormat pixelFormat ); + +class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase +{ +public: + wxGLContext(wxGLCanvas *win, const wxGLContext *other = NULL); + virtual ~wxGLContext(); + + virtual bool SetCurrent(const wxGLCanvas& win) const; + + // Mac-specific + WXGLContext GetWXGLContext() const { return m_glContext; } + +private: + WXGLContext m_glContext; + + wxDECLARE_NO_COPY_CLASS(wxGLContext); +}; + +class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasBase +{ +public: + wxGLCanvas(wxWindow *parent, + wxWindowID id = wxID_ANY, + const int *attribList = NULL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const wxPalette& palette = wxNullPalette); + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette); + + virtual ~wxGLCanvas(); + + // implement wxGLCanvasBase methods + virtual bool SwapBuffers(); + + + // Mac-specific functions + // ---------------------- + + // return true if multisample extension is supported + static bool IsAGLMultiSampleAvailable(); + + // return the pixel format used by this window + WXGLPixelFormat GetWXGLPixelFormat() const { return m_glFormat; } + + // update the view port of the current context to match this window + void SetViewport(); + + + // deprecated methods + // ------------------ + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( + wxGLCanvas(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); + + wxDEPRECATED( + wxGLCanvas(wxWindow *parent, + const wxGLContext *shared, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); + + wxDEPRECATED( + wxGLCanvas(wxWindow *parent, + const wxGLCanvas *shared, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette) + ); +#endif // WXWIN_COMPATIBILITY_2_8 + + // implementation-only from now on + +#if wxOSX_USE_CARBON + // Unlike some other platforms, this must get called if you override it, + // i.e. don't forget "event.Skip()" in your EVT_SIZE handler + void OnSize(wxSizeEvent& event); + + virtual void MacSuperChangedPosition(); + virtual void MacTopLevelWindowChangedPosition(); + virtual void MacVisibilityChanged(); + + void MacUpdateView(); + + GLint GetAglBufferName() const { return m_bufferName; } +#endif + +protected: + WXGLPixelFormat m_glFormat; + +#if wxOSX_USE_CARBON + bool m_macCanvasIsShown, + m_needsUpdate; + WXGLContext m_dummyContext; + GLint m_bufferName; +#endif + + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxGLCanvas) +}; + +#endif // _WX_GLCANVAS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/helpxxxx.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/helpxxxx.h new file mode 100644 index 0000000000..9a9fe4c67f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/helpxxxx.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/helpxxxx.h +// Purpose: Help system: native implementation for your system. Replace +// XXXX with suitable name. +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HELPXXXX_H_ +#define _WX_HELPXXXX_H_ + +#include "wx/wx.h" + +#include "wx/helpbase.h" + +class WXDLLIMPEXP_CORE wxXXXXHelpController: public wxHelpControllerBase +{ + DECLARE_CLASS(wxXXXXHelpController) + + public: + wxXXXXHelpController(); + virtual ~wxXXXXHelpController(); + + // Must call this to set the filename and server name + virtual bool Initialize(const wxString& file); + + // If file is "", reloads file given in Initialize + virtual bool LoadFile(const wxString& file = ""); + virtual bool DisplayContents(); + virtual bool DisplaySection(int sectionNo); + virtual bool DisplayBlock(long blockNo); + virtual bool KeywordSearch(const wxString& k, + wxHelpSearchMode mode = wxHELP_SEARCH_ALL); + + virtual bool Quit(); + virtual void OnQuit(); + + inline wxString GetHelpFile() const { return m_helpFile; } + +protected: + wxString m_helpFile; +}; + +#endif + // _WX_HELPXXXX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/icon.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/icon.h new file mode 100644 index 0000000000..bc6b721db6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/icon.h @@ -0,0 +1,96 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/icon.h +// Purpose: wxIcon class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_ICON_H_ +#define _WX_ICON_H_ + +#include "wx/bitmap.h" + +// Icon +class WXDLLIMPEXP_CORE wxIcon : public wxGDIObject +{ +public: + wxIcon(); + + wxIcon(const char* const* data); + wxIcon(const char bits[], int width , int height ); + wxIcon(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE, + int desiredWidth = -1, int desiredHeight = -1); + wxIcon(const wxIconLocation& loc) + { + LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ICON); + } + + wxIcon(WXHICON icon, const wxSize& size); + + virtual ~wxIcon(); + + bool LoadFile(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE, + int desiredWidth = -1, int desiredHeight = -1); + + + // create from bitmap (which should have a mask unless it's monochrome): + // there shouldn't be any implicit bitmap -> icon conversion (i.e. no + // ctors, assignment operators...), but it's ok to have such function + void CopyFromBitmap(const wxBitmap& bmp); + + int GetWidth() const; + int GetHeight() const; + int GetDepth() const; + void SetWidth(int w); + void SetHeight(int h); + void SetDepth(int d); + void SetOk(bool isOk); + + wxSize GetSize() const { return wxSize(GetWidth(), GetHeight()); } + + WXHICON GetHICON() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxIcon) + + bool LoadIconFromSystemResource(const wxString& resourceName, int desiredWidth, int desiredHeight); + bool LoadIconFromBundleResource(const wxString& resourceName, int desiredWidth, int desiredHeight); + bool LoadIconFromFile(const wxString& filename, int desiredWidth, int desiredHeight); + bool LoadIconAsBitmap(const wxString& filename, wxBitmapType flags = wxICON_DEFAULT_TYPE, int desiredWidth = -1, int desiredHeight = -1); +}; + +class WXDLLIMPEXP_CORE wxICONResourceHandler: public wxBitmapHandler +{ +public: + wxICONResourceHandler() + { + SetName(wxT("ICON resource")); + SetExtension(wxEmptyString); + SetType(wxBITMAP_TYPE_ICON_RESOURCE); + } + + virtual bool LoadFile(wxBitmap *bitmap, + const wxString& name, + wxBitmapType flags, + int desiredWidth = -1, + int desiredHeight = -1); + + // unhide the base class virtual + virtual bool LoadFile(wxBitmap *bitmap, + const wxString& name, + wxBitmapType flags) + { return LoadFile(bitmap, name, flags, -1, -1); } + +private: + DECLARE_DYNAMIC_CLASS(wxICONResourceHandler) +}; + +#endif + // _WX_ICON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/imaglist.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/imaglist.h new file mode 100644 index 0000000000..0405f4cd43 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/imaglist.h @@ -0,0 +1,60 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/imaglist.h +// Purpose: +// Author: Robert Roebling, Stefan Csomor +// Created: 01/02/97 +// Id: +// Copyright: (c) 1998 Robert Roebling and Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_IMAGLIST_H_ +#define _WX_IMAGLIST_H_ + +#include "wx/defs.h" +#include "wx/list.h" +#include "wx/icon.h" + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxColour; + +class WXDLLIMPEXP_CORE wxImageList: public wxObject +{ +public: + wxImageList() { m_width = m_height = 0; } + wxImageList( int width, int height, bool mask = true, int initialCount = 1 ); + virtual ~wxImageList(); + bool Create( int width, int height, bool mask = true, int initialCount = 1 ); + bool Create(); + + virtual int GetImageCount() const; + virtual bool GetSize( int index, int &width, int &height ) const; + + int Add( const wxIcon& bitmap ); + int Add( const wxBitmap& bitmap ); + int Add( const wxBitmap& bitmap, const wxBitmap& mask ); + int Add( const wxBitmap& bitmap, const wxColour& maskColour ); + wxBitmap GetBitmap(int index) const; + wxIcon GetIcon(int index) const; + bool Replace( int index, const wxIcon &bitmap ); + bool Replace( int index, const wxBitmap &bitmap ); + bool Replace( int index, const wxBitmap &bitmap, const wxBitmap &mask ); + bool Remove( int index ); + bool RemoveAll(); + + virtual bool Draw(int index, wxDC& dc, int x, int y, + int flags = wxIMAGELIST_DRAW_NORMAL, + bool solidBackground = false); + +private: + wxList m_images; + + int m_width; + int m_height; + + DECLARE_DYNAMIC_CLASS(wxImageList) +}; + +#endif // _WX_IMAGLIST_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/iphone/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/iphone/chkconf.h new file mode 100644 index 0000000000..8b925707cb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/iphone/chkconf.h @@ -0,0 +1,374 @@ +/* + * Name: wx/osx/iphone/chkconf.h + * Purpose: Compiler-specific configuration checking + * Author: Stefan Csomor + * Modified by: + * Created: 2008-07-30 + * Copyright: (c) Stefan Csomor + * Licence: wxWindows licence + */ + +#ifndef _WX_OSX_IPHONE_CHKCONF_H_ +#define _WX_OSX_IPHONE_CHKCONF_H_ + +/* + * text rendering system + */ + +/* we have different options and we turn on all that make sense + * under a certain platform + */ + +#define wxOSX_USE_ATSU_TEXT 0 +#define wxHAS_OPENGL_ES + +#define wxOSX_USE_QUICKTIME 0 +#define wxOSX_USE_AUDIOTOOLBOX 1 + +/* + * turning off capabilities that don't work under iphone yet + */ + +#if wxUSE_MIMETYPE +#undef wxUSE_MIMETYPE +#define wxUSE_MIMETYPE 0 +#endif + +#if wxUSE_MDI +#undef wxUSE_MDI +#define wxUSE_MDI 0 +#endif + +#if wxUSE_MDI_ARCHITECTURE +#undef wxUSE_MDI_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 0 +#endif + +#if wxUSE_DRAG_AND_DROP +#undef wxUSE_DRAG_AND_DROP +#define wxUSE_DRAG_AND_DROP 0 +#endif + +#if wxUSE_TASKBARICON +#undef wxUSE_TASKBARICON +#define wxUSE_TASKBARICON 0 +#endif + +#if wxUSE_TOOLTIPS +#undef wxUSE_TOOLTIPS +#define wxUSE_TOOLTIPS 0 +#endif + +#if wxUSE_DATAVIEWCTRL +#undef wxUSE_DATAVIEWCTRL +#define wxUSE_DATAVIEWCTRL 0 +#endif + +#if wxUSE_TREELISTCTRL +#undef wxUSE_TREELISTCTRL +#define wxUSE_TREELISTCTRL 0 +#endif + +#if wxUSE_DRAG_AND_DROP +#undef wxUSE_DRAG_AND_DROP +#define wxUSE_DRAG_AND_DROP 0 +#endif + +#if wxUSE_TASKBARICON +#undef wxUSE_TASKBARICON +#define wxUSE_TASKBARICON 0 +#endif + +#define wxUSE_BUTTON 1 + +#if wxUSE_CARET +#undef wxUSE_CARET +#define wxUSE_CARET 0 +#endif + +#if wxUSE_CHOICE +#undef wxUSE_CHOICE +#define wxUSE_CHOICE 0 +#endif + +#if wxUSE_COMBOBOX +#undef wxUSE_COMBOBOX +#define wxUSE_COMBOBOX 0 +#endif + +#ifndef __WXUNIVERSAL__ +#undef wxUSE_SCROLLBAR +#define wxUSE_SCROLLBAR 0 +#endif + +#undef wxUSE_STATUSBAR +#undef wxUSE_NATIVE_STATUSBAR +#undef wxUSE_ABOUTDLG +#undef wxUSE_STATLINE +#undef wxUSE_COLLPANE +#undef wxUSE_STATBMP +#undef wxUSE_STATBOX +#undef wxUSE_RADIOBTN +#undef wxUSE_RADIOBOX +#undef wxUSE_TOGGLEBTN + + +#define wxUSE_STATUSBAR 0 +#define wxUSE_NATIVE_STATUSBAR 0 +#define wxUSE_ABOUTDLG 0 +#define wxUSE_STATLINE 0 +#define wxUSE_COLLPANE 0 +#define wxUSE_STATBMP 0 +#define wxUSE_STATBOX 0 +#define wxUSE_RADIOBTN 0 +#define wxUSE_RADIOBOX 0 +#define wxUSE_TOGGLEBTN 0 + +#undef wxUSE_HTML + +#define wxUSE_HTML 0 + +#undef wxUSE_RICHTEXT +#define wxUSE_RICHTEXT 0 + +#undef wxUSE_ANIMATIONCTRL +#undef wxUSE_CALENDARCTRL +#undef wxUSE_COMBOCTRL +#undef wxUSE_ODCOMBOBOX +#undef wxUSE_BITMAPCOMBOBOX +#undef wxUSE_BMPBUTTON +#undef wxUSE_CHECKLISTBOX +#undef wxUSE_GRID +#undef wxUSE_LISTBOX +#undef wxUSE_LISTCTRL +#undef wxUSE_NOTEBOOK +#undef wxUSE_SPINBTN +#undef wxUSE_SPINCTRL +#undef wxUSE_TREECTRL +#undef wxUSE_DATEPICKCTRL +#undef wxUSE_DATAVIEWCTRL +#undef wxUSE_EDITABLELISTBOX +#undef wxUSE_FILEPICKERCTRL +#undef wxUSE_DIRPICKERCTRL +#undef wxUSE_FILECTRL +#undef wxUSE_COLOURPICKERCTRL +#undef wxUSE_FONTPICKERCTRL +#undef wxUSE_DEBUGREPORT +#undef wxUSE_HYPERLINKCTRL +#undef wxUSE_STC +#undef wxUSE_AUI +#undef wxUSE_BUSYINFO +#undef wxUSE_SEARCHCTRL + +#define wxUSE_ANIMATIONCTRL 0 +#define wxUSE_CALENDARCTRL 0 +#define wxUSE_COMBOCTRL 0 +#define wxUSE_ODCOMBOBOX 0 +#define wxUSE_BITMAPCOMBOBOX 0 +#define wxUSE_BMPBUTTON 0 +#define wxUSE_CHECKLISTBOX 0 +#define wxUSE_GRID 0 +#define wxUSE_LISTBOX 0 +#define wxUSE_LISTCTRL 0 +#define wxUSE_NOTEBOOK 0 +#define wxUSE_SPINBTN 0 +#define wxUSE_SPINCTRL 0 +#define wxUSE_TREECTRL 0 +#define wxUSE_DATEPICKCTRL 0 +#define wxUSE_DATAVIEWCTRL 0 +#define wxUSE_EDITABLELISTBOX 0 +#define wxUSE_FILEPICKERCTRL 0 +#define wxUSE_DIRPICKERCTRL 0 +#define wxUSE_FILECTRL 0 +#define wxUSE_COLOURPICKERCTRL 0 +#define wxUSE_FONTPICKERCTRL 0 +#define wxUSE_DEBUGREPORT 0 +#define wxUSE_HYPERLINKCTRL 0 +#define wxUSE_STC 0 +#define wxUSE_AUI 0 +#define wxUSE_BUSYINFO 0 +#define wxUSE_SEARCHCTRL 0 + +#undef wxUSE_LOGWINDOW +#undef wxUSE_LOG_DIALOG +#undef wxUSE_LISTBOOK +#undef wxUSE_CHOICEBOOK +#undef wxUSE_TREEBOOK +#undef wxUSE_TOOLBOOK +#undef wxUSE_CHOICEDLG +#undef wxUSE_HELP +#undef wxUSE_PROGRESSDLG +#undef wxUSE_FONTDLG +#undef wxUSE_FILEDLG +#undef wxUSE_CHOICEDLG +#undef wxUSE_NUMBERDLG +#undef wxUSE_TEXTDLG +#undef wxUSE_DIRDLG +#undef wxUSE_STARTUP_TIPS +#undef wxUSE_WIZARDDLG +#undef wxUSE_TOOLBAR_NATIVE +#undef wxUSE_FINDREPLDLG +#undef wxUSE_TASKBARICON +#undef wxUSE_REARRANGECTRL + +#define wxUSE_LOGWINDOW 0 +#define wxUSE_LOG_DIALOG 0 +#define wxUSE_LISTBOOK 0 +#define wxUSE_CHOICEBOOK 0 +#define wxUSE_TREEBOOK 0 +#define wxUSE_TOOLBOOK 0 +#define wxUSE_CHOICEDLG 0 +#define wxUSE_HELP 0 +#define wxUSE_PROGRESSDLG 0 +#define wxUSE_FONTDLG 0 +#define wxUSE_FILEDLG 0 +#define wxUSE_CHOICEDLG 0 +#define wxUSE_NUMBERDLG 0 +#define wxUSE_TEXTDLG 0 +#define wxUSE_DIRDLG 0 +#define wxUSE_STARTUP_TIPS 0 +#define wxUSE_WIZARDDLG 0 +#define wxUSE_TOOLBAR_NATIVE 0 +#define wxUSE_FINDREPLDLG 0 +#define wxUSE_TASKBARICON 0 +#define wxUSE_REARRANGECTRL 0 + +#if wxUSE_WXHTML_HELP +#undef wxUSE_WXHTML_HELP +#define wxUSE_WXHTML_HELP 0 +#endif + +#if wxUSE_DOC_VIEW_ARCHITECTURE +#undef wxUSE_DOC_VIEW_ARCHITECTURE +#define wxUSE_DOC_VIEW_ARCHITECTURE 0 +#endif + +#if wxUSE_PRINTING_ARCHITECTURE +#undef wxUSE_PRINTING_ARCHITECTURE +#define wxUSE_PRINTING_ARCHITECTURE 0 +#endif + +#if wxUSE_MENUS +#undef wxUSE_MENUS +#define wxUSE_MENUS 0 +#endif + +/* +#if wxUSE_POPUPWIN +#undef wxUSE_POPUPWIN +#define wxUSE_POPUPWIN 0 +#endif + +#if wxUSE_COMBOBOX +#undef wxUSE_COMBOBOX +#define wxUSE_COMBOBOX 0 +#endif + + + +#if wxUSE_CALENDARCTRL +#undef wxUSE_CALENDARCTRL +#define wxUSE_CALENDARCTRL 0 +#endif + +*/ + +#if wxUSE_CLIPBOARD +#undef wxUSE_CLIPBOARD +#define wxUSE_CLIPBOARD 0 +#endif // wxUSE_CLIPBOARD + +/* +#if wxUSE_GLCANVAS +#undef wxUSE_GLCANVAS +#define wxUSE_GLCANVAS 0 +#endif // wxUSE_GLCANVAS +*/ + +#if wxUSE_COLOURDLG +#undef wxUSE_COLOURDLG +#define wxUSE_COLOURDLG 0 +#endif // wxUSE_COLOURDLG + +// iphone has a toolbar that is a regular UIView + +#ifdef wxOSX_USE_NATIVE_TOOLBAR +#if wxOSX_USE_NATIVE_TOOLBAR +#undef wxOSX_USE_NATIVE_TOOLBAR +#define wxOSX_USE_NATIVE_TOOLBAR 0 +#endif +#else +#define wxOSX_USE_NATIVE_TOOLBAR 0 +#endif + +#if wxUSE_RIBBON +#undef wxUSE_RIBBON +#define wxUSE_RIBBON 0 +#endif + +#if wxUSE_INFOBAR +#undef wxUSE_INFOBAR +#define wxUSE_INFOBAR 0 +#endif + +#if wxUSE_FILE_HISTORY +#undef wxUSE_FILE_HISTORY +#define wxUSE_FILE_HISTORY 0 +#endif + +#if wxUSE_NOTIFICATION_MESSAGE +#undef wxUSE_NOTIFICATION_MESSAGE +#define wxUSE_NOTIFICATION_MESSAGE 0 +#endif + +#undef wxUSE_PREFERENCES_EDITOR +#define wxUSE_PREFERENCES_EDITOR 0 + +#if wxUSE_PROPGRID +#undef wxUSE_PROPGRID +#define wxUSE_PROPGRID 0 +#endif + +#if wxUSE_WEBKIT +#undef wxUSE_WEBKIT +#define wxUSE_WEBKIT 0 +#endif + +#if wxUSE_DATAOBJ +#undef wxUSE_DATAOBJ +#define wxUSE_DATAOBJ 0 +#endif + +#if wxUSE_UIACTIONSIMULATOR +#undef wxUSE_UIACTIONSIMULATOR +#define wxUSE_UIACTIONSIMULATOR 0 +#endif + +#if wxUSE_RICHMSGDLG +#undef wxUSE_RICHMSGDLG +#define wxUSE_RICHMSGDLG 0 +#endif + +#if wxUSE_RICHTEXT +#undef wxUSE_RICHTEXT +#define wxUSE_RICHTEXT 0 +#endif + +#if wxUSE_TIMEPICKCTRL +#undef wxUSE_TIMEPICKCTRL +#define wxUSE_TIMEPICKCTRL 0 +#endif + +#if wxUSE_RICHTOOLTIP +#undef wxUSE_RICHTOOLTIP +#define wxUSE_RICHTOOLTIP 0 +#endif + +#if wxUSE_WEBVIEW +#undef wxUSE_WEBVIEW +#define wxUSE_WEBVIEW 0 +#endif + +#endif + /* _WX_OSX_IPHONE_CHKCONF_H_ */ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/iphone/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/iphone/private.h new file mode 100644 index 0000000000..e21dd388b0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/iphone/private.h @@ -0,0 +1,221 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/iphone/private.h +// Purpose: Private declarations: as this header is only included by +// wxWidgets itself, it may contain identifiers which don't start +// with "wx". +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_IPHONE_H_ +#define _WX_PRIVATE_IPHONE_H_ + +#ifdef __OBJC__ + #import <UIKit/UIKit.h> +#endif + +#include <CoreText/CTFont.h> +#include <CoreText/CTStringAttributes.h> +#include <CoreText/CTLine.h> + + +#if wxUSE_GUI + +OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage( + CGContextRef inContext, + const CGRect * inBounds, + CGImageRef inImage) ; + +WX_UIImage WXDLLIMPEXP_CORE wxOSXGetUIImageFromCGImage( CGImageRef image ); +wxBitmap WXDLLIMPEXP_CORE wxOSXCreateSystemBitmap(const wxString& id, const wxString &client, const wxSize& size); + +class WXDLLIMPEXP_CORE wxWidgetIPhoneImpl : public wxWidgetImpl +{ +public : + wxWidgetIPhoneImpl( wxWindowMac* peer , WXWidget w, bool isRootControl = false, bool isUserPane = false ) ; + wxWidgetIPhoneImpl() ; + ~wxWidgetIPhoneImpl(); + + void Init(); + + virtual bool IsVisible() const ; + virtual void SetVisibility( bool visible ); + + virtual void Raise(); + + virtual void Lower(); + + virtual void ScrollRect( const wxRect *rect, int dx, int dy ); + + virtual WXWidget GetWXWidget() const { return m_osxView; } + + virtual void SetBackgroundColour( const wxColour& col ) ; + virtual bool SetBackgroundStyle(wxBackgroundStyle style) ; + + virtual void GetContentArea( int &left , int &top , int &width , int &height ) const; + virtual void Move(int x, int y, int width, int height); + virtual void GetPosition( int &x, int &y ) const; + virtual void GetSize( int &width, int &height ) const; + virtual void SetControlSize( wxWindowVariant variant ); + virtual double GetContentScaleFactor() const ; + + virtual void SetNeedsDisplay( const wxRect* where = NULL ); + virtual bool GetNeedsDisplay() const; + + virtual bool CanFocus() const; + // return true if successful + virtual bool SetFocus(); + virtual bool HasFocus() const; + + void RemoveFromParent(); + void Embed( wxWidgetImpl *parent ); + + void SetDefaultButton( bool isDefault ); + void PerformClick(); + virtual void SetLabel(const wxString& title, wxFontEncoding encoding); + + void SetCursor( const wxCursor & cursor ); + void CaptureMouse(); + void ReleaseMouse(); + + wxInt32 GetValue() const; + void SetValue( wxInt32 v ); + + virtual wxBitmap GetBitmap() const; + virtual void SetBitmap( const wxBitmap& bitmap ); + virtual void SetBitmapPosition( wxDirection dir ); + + void SetupTabs( const wxNotebook ¬ebook ); + void GetBestRect( wxRect *r ) const; + bool IsEnabled() const; + void Enable( bool enable ); + bool ButtonClickDidStateChange() { return true ;} + void SetMinimum( wxInt32 v ); + void SetMaximum( wxInt32 v ); + wxInt32 GetMinimum() const; + wxInt32 GetMaximum() const; + void PulseGauge(); + void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ); + + void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ); + + void InstallEventHandler( WXWidget control = NULL ); + + virtual void DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow); + + // thunk connected calls + + virtual void drawRect(CGRect* rect, WXWidget slf, void* _cmd); + virtual void touchEvent(WX_NSSet touches, WX_UIEvent event, WXWidget slf, void* _cmd); + virtual bool becomeFirstResponder(WXWidget slf, void* _cmd); + virtual bool resignFirstResponder(WXWidget slf, void* _cmd); + + // action + + virtual void controlAction(void* sender, wxUint32 controlEvent, WX_UIEvent rawEvent); + virtual void controlTextDidChange(); +protected: + WXWidget m_osxView; + DECLARE_DYNAMIC_CLASS_NO_COPY(wxWidgetIPhoneImpl) +}; + +class wxNonOwnedWindowIPhoneImpl : public wxNonOwnedWindowImpl +{ +public : + wxNonOwnedWindowIPhoneImpl( wxNonOwnedWindow* nonownedwnd) ; + wxNonOwnedWindowIPhoneImpl(); + + virtual ~wxNonOwnedWindowIPhoneImpl(); + + virtual void WillBeDestroyed() ; + void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size, + long style, long extraStyle, const wxString& name ) ; + void Create( wxWindow* parent, WXWindow nativeWindow ); + + WXWindow GetWXWindow() const; + void Raise(); + void Lower(); + bool Show(bool show); + bool ShowWithEffect(bool show, wxShowEffect effect, unsigned timeout); + + void Update(); + bool SetTransparent(wxByte alpha); + bool SetBackgroundColour(const wxColour& col ); + void SetExtraStyle( long exStyle ); + bool SetBackgroundStyle(wxBackgroundStyle style); + bool CanSetTransparent(); + + void MoveWindow(int x, int y, int width, int height); + void GetPosition( int &x, int &y ) const; + void GetSize( int &width, int &height ) const; + + void GetContentArea( int &left , int &top , int &width , int &height ) const; + bool SetShape(const wxRegion& region); + + virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) ; + + virtual bool IsMaximized() const; + + virtual bool IsIconized() const; + + virtual void Iconize( bool iconize ); + + virtual void Maximize(bool maximize); + + virtual bool IsFullScreen() const; + + virtual bool ShowFullScreen(bool show, long style); + + virtual void RequestUserAttention(int flags); + + virtual void ScreenToWindow( int *x, int *y ); + + virtual void WindowToScreen( int *x, int *y ); + + // FIXME: Does iPhone have a concept of inactive windows? + virtual bool IsActive() { return true; } + + wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } + + virtual bool InitialShowEventSent() { return m_initialShowSent; } +protected : + WX_UIWindow m_macWindow; + void * m_macFullScreenData ; + bool m_initialShowSent; + DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowIPhoneImpl) +}; + +#ifdef __OBJC__ + + WXDLLIMPEXP_CORE CGRect wxToNSRect( UIView* parent, const wxRect& r ); + WXDLLIMPEXP_CORE wxRect wxFromNSRect( UIView* parent, const CGRect& rect ); + WXDLLIMPEXP_CORE CGPoint wxToNSPoint( UIView* parent, const wxPoint& p ); + WXDLLIMPEXP_CORE wxPoint wxFromNSPoint( UIView* parent, const CGPoint& p ); + + CGRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , + bool adjustForOrigin = true ); + + @interface wxUIButton : UIButton + { + } + + @end + + @interface wxUIView : UIView + { + } + + @end // wxUIView + + + void WXDLLIMPEXP_CORE wxOSXIPhoneClassAddWXMethods(Class c); + +#endif + +#endif // wxUSE_GUI + +#endif + // _WX_PRIVATE_IPHONE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/iphone/private/textimpl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/iphone/private/textimpl.h new file mode 100644 index 0000000000..7c9e5fd109 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/iphone/private/textimpl.h @@ -0,0 +1,107 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/iphone/private/textimpl.h +// Purpose: textcontrol implementation classes that have to be exposed +// Author: Stefan Csomor +// Modified by: +// Created: 03/02/99 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_ +#define _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_ + +#include "wx/combobox.h" +#include "wx/osx/private.h" + +// implementation exposed, so that search control can pull it + +class wxUITextFieldControl : public wxWidgetIPhoneImpl, public wxTextWidgetImpl +{ +public : + wxUITextFieldControl( wxTextCtrl *wxPeer, UITextField* w ); + virtual ~wxUITextFieldControl(); + + virtual wxString GetStringValue() const ; + virtual void SetStringValue( const wxString &str) ; + virtual void Copy() ; + virtual void Cut() ; + virtual void Paste() ; + virtual bool CanPaste() const ; + virtual void SetEditable(bool editable) ; + virtual void GetSelection( long* from, long* to) const ; + virtual void SetSelection( long from , long to ); + virtual void WriteText(const wxString& str) ; + virtual bool HasOwnContextMenu() const { return true; } + + virtual wxSize GetBestSize() const; + + virtual bool SetHint(const wxString& hint); + + virtual void controlAction(WXWidget slf, void* _cmd, void *sender); +protected : + UITextField* m_textField; + NSObject<UITextFieldDelegate>* m_delegate; + long m_selStart; + long m_selEnd; +}; + +class wxUITextViewControl : public wxWidgetIPhoneImpl, public wxTextWidgetImpl +{ +public: + wxUITextViewControl( wxTextCtrl *wxPeer, UITextView* w ); + virtual ~wxUITextViewControl(); + + virtual wxString GetStringValue() const ; + virtual void SetStringValue( const wxString &str) ; + virtual void Copy() ; + virtual void Cut() ; + virtual void Paste() ; + virtual bool CanPaste() const ; + virtual void SetEditable(bool editable) ; + virtual void GetSelection( long* from, long* to) const ; + virtual void SetSelection( long from , long to ); + virtual void WriteText(const wxString& str) ; + virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ); + + virtual bool GetStyle(long position, wxTextAttr& style); + virtual void SetStyle(long start, long end, const wxTextAttr& style); + + virtual bool CanFocus() const; + + virtual bool HasOwnContextMenu() const { return true; } + + virtual void CheckSpelling(bool check); + virtual wxSize GetBestSize() const; + +protected: + NSObject<UITextViewDelegate>* m_delegate; + UITextView* m_textView; +}; + +#if 0 +class wxNSComboBoxControl : public wxUITextFieldControl, public wxComboWidgetImpl +{ +public : + wxNSComboBoxControl( wxWindow *wxPeer, WXWidget w ); + virtual ~wxNSComboBoxControl(); + + virtual int GetSelectedItem() const; + virtual void SetSelectedItem(int item); + + virtual int GetNumberOfItems() const; + + virtual void InsertItem(int pos, const wxString& item); + virtual void RemoveItem(int pos); + + virtual void Clear(); + + virtual wxString GetStringAtIndex(int pos) const; + + virtual int FindString(const wxString& text) const; +private: + NSComboBox* m_comboBox; +}; +#endif + +#endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/joystick.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/joystick.h new file mode 100644 index 0000000000..e5f834390a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/joystick.h @@ -0,0 +1,90 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/joystick.h +// Purpose: wxJoystick class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_JOYSTICK_H_ +#define _WX_JOYSTICK_H_ + +#include "wx/event.h" + +class WXDLLIMPEXP_ADV wxJoystick: public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxJoystick) + public: + /* + * Public interface + */ + + wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; } + + // Attributes + //////////////////////////////////////////////////////////////////////////// + + wxPoint GetPosition() const; + int GetPosition(unsigned axis) const; + bool GetButtonState(unsigned button) const; + int GetZPosition() const; + int GetButtonState() const; + int GetPOVPosition() const; + int GetPOVCTSPosition() const; + int GetRudderPosition() const; + int GetUPosition() const; + int GetVPosition() const; + int GetMovementThreshold() const; + void SetMovementThreshold(int threshold) ; + + // Capabilities + //////////////////////////////////////////////////////////////////////////// + + bool IsOk() const; // Checks that the joystick is functioning + static int GetNumberJoysticks() ; + int GetManufacturerId() const ; + int GetProductId() const ; + wxString GetProductName() const ; + int GetXMin() const; + int GetYMin() const; + int GetZMin() const; + int GetXMax() const; + int GetYMax() const; + int GetZMax() const; + int GetNumberButtons() const; + int GetNumberAxes() const; + int GetMaxButtons() const; + int GetMaxAxes() const; + int GetPollingMin() const; + int GetPollingMax() const; + int GetRudderMin() const; + int GetRudderMax() const; + int GetUMin() const; + int GetUMax() const; + int GetVMin() const; + int GetVMax() const; + + bool HasRudder() const; + bool HasZ() const; + bool HasU() const; + bool HasV() const; + bool HasPOV() const; + bool HasPOV4Dir() const; + bool HasPOVCTS() 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(); + +protected: + int m_joystick; +}; + +#endif + // _WX_JOYSTICK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/listbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/listbox.h new file mode 100644 index 0000000000..60f4199e74 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/listbox.h @@ -0,0 +1,179 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/listbox.h +// Purpose: wxListBox class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LISTBOX_H_ +#define _WX_LISTBOX_H_ + +// ---------------------------------------------------------------------------- +// simple types +// ---------------------------------------------------------------------------- +#include "wx/dynarray.h" +#include "wx/arrstr.h" + +// forward decl for GetSelections() +class wxArrayInt; + +// forward decl for wxListWidgetImpl implementation type. +class wxListWidgetImpl; + +// List box item + +WX_DEFINE_ARRAY( char* , wxListDataArray ); + +// ---------------------------------------------------------------------------- +// List box control +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxListWidgetColumn; + +class WXDLLIMPEXP_FWD_CORE wxListWidgetCellValue; + +class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase +{ +public: + // ctors and such + wxListBox(); + + wxListBox( + wxWindow *parent, + wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Create(parent, winid, pos, size, n, choices, style, validator, name); + } + + wxListBox( + wxWindow *parent, + wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Create(parent, winid, pos, size, choices, style, validator, name); + } + + bool Create( + wxWindow *parent, + wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + bool Create( + wxWindow *parent, + wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + virtual ~wxListBox(); + + // implement base class pure virtuals + virtual void Refresh(bool eraseBack = true, const wxRect *rect = NULL); + + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + virtual int FindString(const wxString& s, bool bCase = false) const; + + // data callbacks + virtual void GetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value ); + virtual void SetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value ); + + virtual bool IsSelected(int n) const; + virtual int GetSelection() const; + virtual int GetSelections(wxArrayInt& aSelections) const; + + virtual void EnsureVisible(int n); + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + // wxCheckListBox support + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + wxListWidgetImpl* GetListPeer() const; + + bool MacGetBlockEvents() const { return m_blockEvents; } + + virtual void HandleLineEvent( unsigned int n, bool doubleClick ); +protected: + // callback for derived classes which may have to insert additional data + // at a certain line - which cannot be predetermined for sorted list data + virtual void OnItemInserted(unsigned int pos); + + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + + // from wxItemContainer + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + + // from wxListBoxBase + virtual void DoSetSelection(int n, bool select); + virtual void DoSetFirstItem(int n); + virtual int DoListHitTest(const wxPoint& point) const; + + // free memory (common part of Clear() and dtor) + // prevent collision with some BSD definitions of macro Free() + void FreeData(); + + virtual wxSize DoGetBestSize() const; + + bool m_blockEvents; + + wxListWidgetColumn* m_textColumn; + + // data storage (copied from univ) + + // the array containing all items (it is sorted if the listbox has + // wxLB_SORT style) + union + { + wxArrayString *unsorted; + wxSortedArrayString *sorted; + } m_strings; + + // and this one the client data (either void or wxClientData) + wxArrayPtrVoid m_itemsClientData; + +private: +#ifdef __WXOSX_CARBON__ + // It needs to call our CalcAndSendEvent(). + friend class wxMacDataBrowserListControl; +#endif // Carbon + + DECLARE_DYNAMIC_CLASS(wxListBox) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_LISTBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/listctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/listctrl.h new file mode 100644 index 0000000000..9f2fdfe984 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/listctrl.h @@ -0,0 +1,410 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/listctrl.h +// Purpose: wxListCtrl class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_LISTCTRL_H_ +#define _WX_LISTCTRL_H_ + +#include "wx/defs.h" +#include "wx/generic/listctrl.h" + +#define wxMAC_ALWAYS_USE_GENERIC_LISTCTRL wxT("mac.listctrl.always_use_generic") + +class wxMacDataBrowserListCtrlControl; +class wxListCtrlTextCtrlWrapper; +class wxListCtrlRenameTimer; + +WX_DECLARE_EXPORTED_LIST(wxListItem, wxColumnList); + +class WXDLLIMPEXP_CORE wxListCtrl: public wxListCtrlBase +{ + DECLARE_DYNAMIC_CLASS(wxListCtrl) + public: + /* + * Public interface + */ + + wxListCtrl() { Init(); } + + wxListCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLC_ICON, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListCtrlNameStr) + { + Init(); + + Create(parent, id, pos, size, style, validator, name); + } + + virtual ~wxListCtrl(); + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLC_ICON, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListCtrlNameStr); + + // Attributes + //////////////////////////////////////////////////////////////////////////// + + // Gets information about this column + bool GetColumn(int col, wxListItem& item) const; + + // Sets information about this column + bool SetColumn(int col, const wxListItem& item) ; + + // Gets the column width + int GetColumnWidth(int col) const; + + // Sets the column width + bool SetColumnWidth(int col, int width) ; + + // Gets the number of items that can fit vertically in the + // visible area of the list control (list or report view) + // or the total number of items in the list control (icon + // or small icon view) + int GetCountPerPage() const; + + // Gets the edit control for editing labels. + wxTextCtrl* GetEditControl() const; + + // Gets information about the item + bool GetItem(wxListItem& info) const ; + + // Sets information about the item + bool SetItem(wxListItem& info) ; + + // Sets a string field at a particular column + long SetItem(long index, int col, const wxString& label, int imageId = -1); + + // Gets the item state + int GetItemState(long item, long stateMask) const ; + + // Sets the item state + bool SetItemState(long item, long state, long stateMask) ; + + void AssignImageList(wxImageList *imageList, int which); + + // Sets the item image + bool SetItemImage(long item, int image, int selImage = -1) ; + bool SetItemColumnImage(long item, long column, int image); + + // Gets the item text + wxString GetItemText(long item, int col = 0) const ; + + // Sets the item text + void SetItemText(long item, const wxString& str) ; + + void SetItemTextColour(long item, const wxColour& colour) ; + wxColour GetItemTextColour(long item) const; + + void SetItemBackgroundColour(long item, const wxColour& colour) ; + wxColour GetItemBackgroundColour(long item) const; + + void SetItemFont( long item, const wxFont &f); + wxFont GetItemFont( long item ) const; + + // Gets the item data + long GetItemData(long item) const ; + + // Sets the item data + bool SetItemPtrData(long item, wxUIntPtr data); + bool SetItemData(long item, long data) { return SetItemPtrData(item, data); } + + // Gets the item rectangle + bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ; + + // Gets the item rectangle of a subitem + bool GetSubItemRect( long item, long subItem, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const; + + // Gets the item position + bool GetItemPosition(long item, wxPoint& pos) const ; + + // Sets the item position + bool SetItemPosition(long item, const wxPoint& pos) ; + + // Gets the number of items in the list control + int GetItemCount() const; + + // Gets the number of columns in the list control + int GetColumnCount() const; + + void SetItemSpacing( int spacing, bool isSmall = false ); + wxSize GetItemSpacing() const; + + // Gets the number of selected items in the list control + int GetSelectedItemCount() const; + + wxRect GetViewRect() const; + + // Gets the text colour of the listview + wxColour GetTextColour() const; + + // Sets the text colour of the listview + void SetTextColour(const wxColour& col); + + // Gets the index of the topmost visible item when in + // list or report view + long GetTopItem() const ; + + // Add or remove a single window style + void SetSingleStyle(long style, bool add = true) ; + + // Set the whole window style + void SetWindowStyleFlag(long style) ; + + // Searches for an item, starting from 'item'. + // item can be -1 to find the first item that matches the + // specified flags. + // Returns the item or -1 if unsuccessful. + long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const ; + + // Implementation: converts wxWidgets style to MSW style. + // Can be a single style flag or a bit list. + // oldStyle is 'normalised' so that it doesn't contain + // conflicting styles. + long ConvertToMSWStyle(long& oldStyle, long style) const; + + // Gets one of the three image lists + wxImageList *GetImageList(int which) const ; + + // Sets the image list + // N.B. There's a quirk in the Win95 list view implementation. + // If in wxLC_LIST mode, it'll *still* display images by the labels if + // there's a small-icon image list set for the control - even though you + // haven't specified wxLIST_MASK_IMAGE when inserting. + // So you have to set a NULL small-icon image list to be sure that + // the wxLC_LIST mode works without icons. Of course, you may want icons... + void SetImageList(wxImageList *imageList, int which) ; + + // Operations + //////////////////////////////////////////////////////////////////////////// + + // Arranges the items + bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); + + // Deletes an item + bool DeleteItem(long item); + + // Deletes all items + bool DeleteAllItems() ; + + // Deletes a column + bool DeleteColumn(int col); + + // Deletes all columns + bool DeleteAllColumns(); + + // Clears items, and columns if there are any. + void ClearAll(); + + // Edit the label + wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl)); + + // End label editing, optionally cancelling the edit + bool EndEditLabel(bool cancel); + + // Ensures this item is visible + bool EnsureVisible(long item) ; + + // Find an item whose label matches this string, starting from the item after 'start' + // or the beginning if 'start' is -1. + long FindItem(long start, const wxString& str, bool partial = false); + + // Find an item whose data matches this data, starting from the item after 'start' + // or the beginning if 'start' is -1. + long FindItem(long start, long data); + + // Find an item nearest this position in the specified direction, starting from + // the item after 'start' or the beginning if 'start' is -1. + long FindItem(long start, const wxPoint& pt, int direction); + + // Determines which item (if any) is at the specified point, + // giving details in 'flags' (see wxLIST_HITTEST_... flags above) + // Request the subitem number as well at the given coordinate. + long HitTest(const wxPoint& point, int& flags, long* ptrSubItem = NULL) const; + + // Inserts an item, returning the index of the new item if successful, + // -1 otherwise. + // TOD: Should also have some further convenience functions + // which don't require setting a wxListItem object + long InsertItem(wxListItem& info); + + // Insert a string item + long InsertItem(long index, const wxString& label); + + // Insert an image item + long InsertItem(long index, int imageIndex); + + // Insert an image/string item + long InsertItem(long index, const wxString& label, int imageIndex); + + // Scrolls the list control. If in icon, small icon or report view mode, + // x specifies the number of pixels to scroll. If in list view mode, x + // specifies the number of columns to scroll. + // If in icon, small icon or list view mode, y specifies the number of pixels + // to scroll. If in report view mode, y specifies the number of lines to scroll. + bool ScrollList(int dx, int dy); + + // Sort items. + + // fn is a function which takes 3 long arguments: item1, item2, data. + // item1 is the long data associated with a first item (NOT the index). + // item2 is the long data associated with a second item (NOT the index). + // data is the same value as passed to SortItems. + // The return value is a negative number if the first item should precede the second + // item, a positive number of the second item should precede the first, + // or zero if the two items are equivalent. + + // data is arbitrary data to be passed to the sort function. + bool SortItems(wxListCtrlCompare fn, wxIntPtr data); + + wxMacDataBrowserListCtrlControl* GetListPeer() const; + + // these functions are only used for virtual list view controls, i.e. the + // ones with wxLC_VIRTUAL style + + void SetItemCount(long count); + void RefreshItem(long item); + void RefreshItems(long itemFrom, long itemTo); + + // return the text for the given column of the given item + virtual wxString OnGetItemText(long item, long column) const; + + // return the icon for the given item. In report view, OnGetItemImage will + // only be called for the first column. See OnGetItemColumnImage for + // details. + virtual int OnGetItemImage(long item) const; + + // return the icon for the given item and column. + virtual int OnGetItemColumnImage(long item, long column) const; + +/* Why should we need this function? Leave for now. + * We might need it because item data may have changed, + * but the display needs refreshing (in string callback mode) + // Updates an item. If the list control has the wxLI_AUTO_ARRANGE style, + // the items will be rearranged. + bool Update(long item); +*/ + + void Command(wxCommandEvent& event) { ProcessCommand(event); } + + wxListCtrlCompare GetCompareFunc() { return m_compareFunc; } + wxIntPtr GetCompareFuncData() { return m_compareFuncData; } + + + // public overrides needed for pimpl approach + virtual bool SetFont(const wxFont& font); + virtual bool SetForegroundColour(const wxColour& colour); + virtual bool SetBackgroundColour(const wxColour& colour); + virtual wxColour GetBackgroundColour() const; + + virtual void Freeze (); + virtual void Thaw (); + virtual void Update (); + + // functions for editing/timer + void OnRenameTimer(); + bool OnRenameAccept(long itemEdit, const wxString& value); + void OnRenameCancelled(long itemEdit); + + void ChangeCurrent(long current); + void ResetCurrent() { ChangeCurrent((long)-1); } + bool HasCurrent() const { return m_current != (long)-1; } + + void OnLeftDown(wxMouseEvent& event); + void OnDblClick(wxMouseEvent& event); + + void FinishEditing(wxTextCtrl *text) + { + delete text; + m_textctrlWrapper = NULL; + SetFocus(); + } + + virtual int GetScrollPos(int orient) const; + + void OnRightDown(wxMouseEvent& event); + void OnMiddleDown(wxMouseEvent& event); + void OnChar(wxKeyEvent& event); + virtual void SetFocus(); + void FireMouseEvent(wxEventType eventType, wxPoint position); + + virtual void SetDropTarget( wxDropTarget *dropTarget ); + virtual wxDropTarget* GetDropTarget() const; + + // with CG, we need to get the context from an kEventControlDraw event + // unfortunately, the DataBrowser callbacks don't provide the context + // and we need it, so we need to set/remove it before and after draw + // events so we can access it in the callbacks. + void MacSetDrawingContext(void* context) { m_cgContext = context; } + void* MacGetDrawingContext() { return m_cgContext; } + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + // Implement base class pure virtual methods. + long DoInsertColumn(long col, const wxListItem& info); + + // protected overrides needed for pimpl approach + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + long m_current; + wxListCtrlTextCtrlWrapper *m_textctrlWrapper; + wxListCtrlRenameTimer *m_renameTimer; + // common part of all ctors + void Init(); + + wxGenericListCtrl* m_genericImpl; // allow use of the generic impl. + wxMacDataBrowserListCtrlControl* m_dbImpl; + void* m_macListCtrlEventHandler; + void* m_cgContext; + wxListCtrlCompare m_compareFunc; + wxIntPtr m_compareFuncData; + + wxTextCtrl* m_textCtrl; // The control used for editing a label + wxImageList * m_imageListNormal; // The image list for normal icons + wxImageList * m_imageListSmall; // The image list for small icons + wxImageList * m_imageListState; // The image list state icons (not implemented yet) + + wxColumnList m_colsInfo; // for storing info about each column + wxColour m_textColor; + wxColour m_bgColor; + + // keep track of whether or not we should delete the image list ourselves. + bool m_ownsImageListNormal, + m_ownsImageListSmall, + m_ownsImageListState; + + long m_baseStyle; // Basic Windows style flags, for recreation purposes + int m_colCount; // Windows doesn't have GetColumnCount so must + // keep track of inserted/deleted columns + + int m_count; // for virtual lists, store item count + +private: + int CalcColumnAutoWidth(int col) const; + +}; + +#endif + // _WX_LISTCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/mdi.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/mdi.h new file mode 100644 index 0000000000..7a859d198d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/mdi.h @@ -0,0 +1,153 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/mdi.h +// Purpose: MDI (Multiple Document Interface) classes. +// Author: Stefan Csomor +// Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_CARBON_MDI_H_ +#define _WX_OSX_CARBON_MDI_H_ + +class WXDLLIMPEXP_CORE wxMDIParentFrame : public wxMDIParentFrameBase +{ +public: + wxMDIParentFrame() { Init(); } + wxMDIParentFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr) + { + Init(); + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, + const wxString& name = wxFrameNameStr); + + virtual ~wxMDIParentFrame(); + + // implement/override base class [pure] virtuals + // --------------------------------------------- + + static bool IsTDI() { return false; } + + virtual void AddChild(wxWindowBase *child); + virtual void RemoveChild(wxWindowBase *child); + + virtual void ActivateNext() { /* TODO */ } + virtual void ActivatePrevious() { /* TODO */ } + + virtual bool Show(bool show = true); + + + // Mac-specific implementation from now on + // --------------------------------------- + + // Mac OS activate event + virtual void MacActivate(long timestamp, bool activating); + + // wxWidgets activate event + void OnActivate(wxActivateEvent& event); + void OnSysColourChanged(wxSysColourChangedEvent& event); + + void SetMenuBar(wxMenuBar *menu_bar); + + // Get rect to be used to center top-level children + virtual void GetRectForTopLevelChildren(int *x, int *y, int *w, int *h); + +protected: + // common part of all ctors + void Init(); + + // returns true if this frame has some contents and so should be visible, + // false if it's used solely as container for its children + bool ShouldBeVisible() const; + + + wxMenu *m_windowMenu; + + // true if MDI Frame is intercepting commands, not child + bool m_parentFrameActive; + + // true if the frame should be shown but is not because it is empty and + // useless otherwise than a container for its children + bool m_shouldBeShown; + +private: + friend class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) +}; + +class WXDLLIMPEXP_CORE wxMDIChildFrame : public wxMDIChildFrameBase +{ +public: + wxMDIChildFrame() { Init(); } + wxMDIChildFrame(wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init() ; + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxMDIChildFrame(); + + // un-override the base class override + virtual bool IsTopLevel() const { return true; } + + // implement MDI operations + virtual void Activate(); + + + // Mac OS activate event + virtual void MacActivate(long timestamp, bool activating); + +protected: + // common part of all ctors + void Init(); + + DECLARE_DYNAMIC_CLASS(wxMDIChildFrame) +}; + +class WXDLLIMPEXP_CORE wxMDIClientWindow : public wxMDIClientWindowBase +{ +public: + wxMDIClientWindow() { } + virtual ~wxMDIClientWindow(); + + virtual bool CreateClient(wxMDIParentFrame *parent, + long style = wxVSCROLL | wxHSCROLL); + +protected: + virtual void DoGetClientSize(int *width, int *height) const; + + DECLARE_DYNAMIC_CLASS(wxMDIClientWindow) +}; + +#endif // _WX_OSX_CARBON_MDI_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/menu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/menu.h new file mode 100644 index 0000000000..9eded8593b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/menu.h @@ -0,0 +1,182 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/menu.h +// Purpose: wxMenu, wxMenuBar classes +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MENU_H_ +#define _WX_MENU_H_ + +class WXDLLIMPEXP_FWD_CORE wxFrame; + +#include "wx/arrstr.h" + +// ---------------------------------------------------------------------------- +// Menu +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxMenuImpl ; + +class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase +{ +public: + // ctors & dtor + wxMenu(const wxString& title, long style = 0) + : wxMenuBase(title, style) { Init(); } + + wxMenu(long style = 0) : wxMenuBase(style) { Init(); } + + virtual ~wxMenu(); + + virtual void Break(); + + virtual void SetTitle(const wxString& title); + + bool ProcessCommand(wxCommandEvent& event); + + // get the menu handle + WXHMENU GetHMenu() const ; + + // implementation only from now on + // ------------------------------- + + bool HandleCommandUpdateStatus( wxMenuItem* menuItem, wxWindow* senderWindow = NULL); + bool HandleCommandProcess( wxMenuItem* menuItem, wxWindow* senderWindow = NULL); + void HandleMenuItemHighlighted( wxMenuItem* menuItem ); + void HandleMenuOpened(); + void HandleMenuClosed(); + + wxMenuImpl* GetPeer() { return m_peer; } + + // make sure we can veto + void SetAllowRearrange( bool allow ); + bool AllowRearrange() const { return m_allowRearrange; } + + // if a menu is used purely for internal implementation reasons (eg wxChoice) + // we don't want native menu events being triggered + void SetNoEventsMode( bool noEvents ); + bool GetNoEventsMode() const { return m_noEventsMode; } +protected: + // hide special menu items like exit, preferences etc + // that are expected in the app menu + void DoRearrange() ; + + bool DoHandleMenuEvent( wxEvent& evt ); + virtual wxMenuItem* DoAppend(wxMenuItem *item); + virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); + virtual wxMenuItem* DoRemove(wxMenuItem *item); + +private: + // common part of all ctors + void Init(); + + // common part of Do{Append,Insert}(): behaves as Append if pos == -1 + bool DoInsertOrAppend(wxMenuItem *item, size_t pos = (size_t)-1); + + // Common part of HandleMenu{Opened,Closed}(). + void DoHandleMenuOpenedOrClosed(wxEventType evtType); + + + // if TRUE, insert a break before appending the next item + bool m_doBreak; + + // in this menu rearranging of menu items (esp hiding) is allowed + bool m_allowRearrange; + + // don't trigger native events + bool m_noEventsMode; + + wxMenuImpl* m_peer; + + DECLARE_DYNAMIC_CLASS(wxMenu) +}; + +#if wxOSX_USE_COCOA_OR_CARBON + +// the iphone only has popup-menus + +// ---------------------------------------------------------------------------- +// Menu Bar (a la Windows) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase +{ +public: + // ctors & dtor + // default constructor + wxMenuBar(); + // unused under MSW + wxMenuBar(long style); + // menubar takes ownership of the menus arrays but copies the titles + wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); + virtual ~wxMenuBar(); + + // menubar construction + virtual bool Append( wxMenu *menu, const wxString &title ); + virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Remove(size_t pos); + + virtual void EnableTop( size_t pos, bool flag ); + virtual bool IsEnabledTop(size_t pos) const; + virtual void SetMenuLabel( size_t pos, const wxString& label ); + virtual wxString GetMenuLabel( size_t pos ) const; + virtual bool Enable( bool enable = true ); + // for virtual function hiding + virtual void Enable( int itemid, bool enable ) + { + wxMenuBarBase::Enable( itemid, enable ); + } + + // implementation from now on + void Detach(); + + // returns TRUE if we're attached to a frame + bool IsAttached() const { return m_menuBarFrame != NULL; } + // get the frame we live in + wxFrame *GetFrame() const { return m_menuBarFrame; } + // attach to a frame + void Attach(wxFrame *frame); + + // if the menubar is modified, the display is not updated automatically, + // call this function to update it (m_menuBarFrame should be !NULL) + void Refresh(bool eraseBackground = true, const wxRect *rect = NULL); + +#if wxABI_VERSION >= 30001 + wxMenu *OSXGetAppleMenu() const { return m_appleMenu; } +#endif + + static void SetAutoWindowMenu( bool enable ) { s_macAutoWindowMenu = enable ; } + static bool GetAutoWindowMenu() { return s_macAutoWindowMenu ; } + + void MacInstallMenuBar() ; + static wxMenuBar* MacGetInstalledMenuBar() { return s_macInstalledMenuBar ; } + static void MacSetCommonMenuBar(wxMenuBar* menubar) { s_macCommonMenuBar=menubar; } + static wxMenuBar* MacGetCommonMenuBar() { return s_macCommonMenuBar; } + + + static WXHMENU MacGetWindowMenuHMenu() { return s_macWindowMenuHandle ; } +protected: + // common part of all ctors + void Init(); + + static bool s_macAutoWindowMenu ; + static WXHMENU s_macWindowMenuHandle ; + +private: + static wxMenuBar* s_macInstalledMenuBar ; + static wxMenuBar* s_macCommonMenuBar ; + + wxMenu* m_rootMenu; + wxMenu* m_appleMenu; + + DECLARE_DYNAMIC_CLASS(wxMenuBar) +}; + +#endif + +#endif // _WX_MENU_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/menuitem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/menuitem.h new file mode 100644 index 0000000000..69dc7e7bcb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/menuitem.h @@ -0,0 +1,98 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/menuitem.h +// Purpose: wxMenuItem class +// Author: Vadim Zeitlin +// Modified by: +// Created: 11.11.97 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _MENUITEM_H +#define _MENUITEM_H + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" +#include "wx/bitmap.h" + +// ---------------------------------------------------------------------------- +// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxMenuItemImpl ; + +class WXDLLIMPEXP_CORE wxMenuItem: public wxMenuItemBase +{ +public: + // ctor & dtor + wxMenuItem(wxMenu *parentMenu = NULL, + int id = wxID_SEPARATOR, + const wxString& name = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL, + wxMenu *subMenu = NULL); + virtual ~wxMenuItem(); + + // override base class virtuals + virtual void SetItemLabel(const wxString& strName); + + virtual void Enable(bool bDoEnable = true); + virtual void Check(bool bDoCheck = true); + + virtual void SetBitmap(const wxBitmap& bitmap) ; + virtual const wxBitmap& GetBitmap() const { return m_bitmap; } + + + // Implementation only from now on. + + // update the os specific representation + void UpdateItemBitmap() ; + void UpdateItemText() ; + void UpdateItemStatus() ; + + // mark item as belonging to the given radio group + void SetAsRadioGroupStart(bool start = true); + void SetRadioGroupStart(int start); + void SetRadioGroupEnd(int end); + + // return true if this is the starting item of a radio group + bool IsRadioGroupStart() const; + + // get the start of the radio group this item belongs to: should not be + // called for the starting radio group item itself because it doesn't have + // this information + int GetRadioGroupStart() const; + + // get the end of the radio group this item belongs to: should be only + // called for the starting radio group item, i.e. if IsRadioGroupStart() is + // true + int GetRadioGroupEnd() const; + + wxMenuItemImpl* GetPeer() { return m_peer; } +private: + void UncheckRadio() ; + + // the positions of the first and last items of the radio group this item + // belongs to or -1: start is the radio group start and is valid for all + // but first radio group items (m_isRadioGroupStart == FALSE), end is valid + // only for the first one + union + { + int start; + int end; + } m_radioGroup; + + // does this item start a radio group? + bool m_isRadioGroupStart; + + wxBitmap m_bitmap; // Bitmap for menuitem, if any + + wxMenuItemImpl* m_peer; + + DECLARE_DYNAMIC_CLASS(wxMenuItem) +}; + +#endif //_MENUITEM_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/metafile.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/metafile.h new file mode 100644 index 0000000000..973a5736a4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/metafile.h @@ -0,0 +1,170 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/metafile.h +// Purpose: wxMetaFile, wxMetaFileDC classes. +// This probably should be restricted to Windows platforms, +// but if there is an equivalent on your platform, great. +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef _WX_METAFIILE_H_ +#define _WX_METAFIILE_H_ + +#include "wx/dc.h" +#include "wx/gdiobj.h" + +#if wxUSE_DATAOBJ +#include "wx/dataobj.h" +#endif + +#include "wx/osx/dcclient.h" + +/* + * Metafile and metafile device context classes + * + */ + +#define wxMetaFile wxMetafile +#define wxMetaFileDC wxMetafileDC + +class WXDLLIMPEXP_FWD_CORE wxMetafile; +class wxMetafileRefData ; + +#define M_METAFILEDATA ((wxMetafileRefData *)m_refData) + +class WXDLLIMPEXP_CORE wxMetafile : public wxGDIObject +{ +public: + wxMetafile(const wxString& file = wxEmptyString); + virtual ~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); + + wxSize GetSize() const; + int GetWidth() const { return GetSize().x; } + int GetHeight() const { return GetSize().y; } + + // Implementation + WXHMETAFILE GetHMETAFILE() const ; + void SetHMETAFILE(WXHMETAFILE mf) ; +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxMetafile) +}; + + +class WXDLLIMPEXP_CORE wxMetafileDCImpl: public wxGCDCImpl +{ +public: + wxMetafileDCImpl( wxDC *owner, + const wxString& filename, + int width, int height, + const wxString& description ); + + virtual ~wxMetafileDCImpl(); + + // Should be called at end of drawing + virtual wxMetafile *Close(); + + // Implementation + wxMetafile *GetMetaFile(void) const { return m_metaFile; } + void SetMetaFile(wxMetafile *mf) { m_metaFile = mf; } + +protected: + virtual void DoGetSize(int *width, int *height) const; + + wxMetafile* m_metaFile; + +private: + DECLARE_CLASS(wxMetafileDCImpl) + wxDECLARE_NO_COPY_CLASS(wxMetafileDCImpl); +}; + +class WXDLLIMPEXP_CORE wxMetafileDC: public wxDC +{ + public: + // the ctor parameters specify the filename (empty for memory metafiles), + // the metafile picture size and the optional description/comment + wxMetafileDC( const wxString& filename = wxEmptyString, + int width = 0, int height = 0, + const wxString& description = wxEmptyString ) : + wxDC( new wxMetafileDCImpl( this, filename, width, height, description) ) + { } + + wxMetafile *GetMetafile() const + { return ((wxMetafileDCImpl*)m_pimpl)->GetMetaFile(); } + + wxMetafile *Close() + { return ((wxMetafileDCImpl*)m_pimpl)->Close(); } + +private: + DECLARE_CLASS(wxMetafileDC) + wxDECLARE_NO_COPY_CLASS(wxMetafileDC); +}; + + +/* + * 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 wxMM_TEXT mapping mode. + * + */ + +// No origin or extent +#define wxMakeMetaFilePlaceable wxMakeMetafilePlaceable +bool WXDLLIMPEXP_CORE wxMakeMetafilePlaceable(const wxString& filename, float scale = 1.0); + +// Optional origin and extent +bool WXDLLIMPEXP_CORE wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale = 1.0, bool useOriginAndExtent = true); + +// ---------------------------------------------------------------------------- +// wxMetafileDataObject is a specialization of wxDataObject for metafile data +// ---------------------------------------------------------------------------- + +#if wxUSE_DATAOBJ +class WXDLLIMPEXP_CORE wxMetafileDataObject : public wxDataObjectSimple +{ +public: + // ctors + wxMetafileDataObject() + : wxDataObjectSimple(wxDF_METAFILE) { } + wxMetafileDataObject(const wxMetafile& metafile) + : wxDataObjectSimple(wxDF_METAFILE), m_metafile(metafile) { } + + // virtual functions which you may override if you want to provide data on + // demand only - otherwise, the trivial default versions will be used + virtual void SetMetafile(const wxMetafile& metafile) + { m_metafile = metafile; } + virtual wxMetafile GetMetafile() const + { return m_metafile; } + + // implement base class pure virtuals + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + + virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const + { return GetDataSize(); } + virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format), + void *buf) const + { return GetDataHere(buf); } + virtual bool SetData(const wxDataFormat& WXUNUSED(format), + size_t len, const void *buf) + { return SetData(len, buf); } +protected: + wxMetafile m_metafile; +}; +#endif + +#endif + // _WX_METAFIILE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/mimetype.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/mimetype.h new file mode 100644 index 0000000000..e6e6eb0c81 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/mimetype.h @@ -0,0 +1 @@ +#include "wx/osx/core/mimetype.h" diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/minifram.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/minifram.h new file mode 100644 index 0000000000..00fe6e474a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/minifram.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/minifram.h +// Purpose: wxMiniFrame class. A small frame for e.g. floating toolbars. +// If there is no equivalent on your platform, just make it a +// normal frame. +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MINIFRAM_H_ +#define _WX_MINIFRAM_H_ + +#include "wx/frame.h" + +class WXDLLIMPEXP_CORE wxMiniFrame: public wxFrame { + + DECLARE_DYNAMIC_CLASS(wxMiniFrame) + +public: + inline wxMiniFrame() {} + inline wxMiniFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxCAPTION | wxRESIZE_BORDER | wxTINY_CAPTION, + const wxString& name = wxFrameNameStr) + { + // Use wxFrame constructor in absence of more specific code. + Create(parent, id, title, pos, size, style | wxFRAME_TOOL_WINDOW | wxFRAME_FLOAT_ON_PARENT , name); + } + + virtual ~wxMiniFrame() {} +protected: +}; + +#endif + // _WX_MINIFRAM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/msgdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/msgdlg.h new file mode 100644 index 0000000000..871d32f940 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/msgdlg.h @@ -0,0 +1,54 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/msgdlg.h +// Purpose: wxMessageDialog class. Use generic version if no +// platform-specific implementation. +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSGBOXDLG_H_ +#define _WX_MSGBOXDLG_H_ + +class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase +{ +public: + wxMessageDialog(wxWindow *parent, + const wxString& message, + const wxString& caption = wxMessageBoxCaptionStr, + long style = wxOK|wxCENTRE, + const wxPoint& pos = wxDefaultPosition); + +#if wxOSX_USE_COCOA + ~wxMessageDialog(); +#endif + + virtual int ShowModal(); + +#if wxOSX_USE_COCOA + virtual void ShowWindowModal(); + virtual void ModalFinishedCallback(void* panel, int resultCode); +#endif + +protected: + // not supported for message dialog + virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), + int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} + +#if wxOSX_USE_COCOA + void* ConstructNSAlert(); +#endif + + int m_buttonId[4]; + int m_buttonCount; + +#if wxOSX_USE_COCOA + WX_NSObject m_sheetDelegate; +#endif + DECLARE_DYNAMIC_CLASS(wxMessageDialog) +}; + +#endif // _WX_MSGBOXDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/nonownedwnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/nonownedwnd.h new file mode 100644 index 0000000000..edc3f04e62 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/nonownedwnd.h @@ -0,0 +1,161 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/nonownedwnd.h +// Purpose: declares wxNonOwnedWindow class +// Author: Stefan Csomor +// Modified by: +// Created: 2008-03-24 +// Copyright: (c) 2008 Stefan Csomor +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_NONOWNEDWND_H_ +#define _WX_MAC_NONOWNEDWND_H_ + +#include "wx/window.h" + +#include "wx/graphics.h" + +#if wxUSE_SYSTEM_OPTIONS + #define wxMAC_WINDOW_PLAIN_TRANSITION wxT("mac.window-plain-transition") +#endif + +//----------------------------------------------------------------------------- +// wxNonOwnedWindow +//----------------------------------------------------------------------------- + +// This class represents "non-owned" window. A window is owned by another +// window if it has a parent and is positioned within the parent. For example, +// wxFrame is non-owned, because even though it can have a parent, it's +// location is independent of it. This class is for internal use only, it's +// the base class for wxTopLevelWindow and wxPopupWindow. + +class wxNonOwnedWindowImpl; + +class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase +{ +public: + // constructors and such + wxNonOwnedWindow() { Init(); } + + wxNonOwnedWindow(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + { + Init(); + + (void)Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + + bool Create(wxWindow *parent, WXWindow nativeWindow); + + virtual ~wxNonOwnedWindow(); + + virtual void SubclassWin(WXWindow nativeWindow); + virtual void UnsubclassWin(); + + virtual wxPoint GetClientAreaOrigin() const; + + // implement base class pure virtuals + + virtual bool SetTransparent(wxByte alpha); + virtual bool CanSetTransparent(); + + virtual bool SetBackgroundStyle(wxBackgroundStyle style); + + virtual void Update(); + + WXWindow GetWXWindow() const ; + static wxNonOwnedWindow* GetFromWXWindow( WXWindow win ); + + // implementation from now on + // -------------------------- + + // These accessors are Mac-specific and don't exist in other ports. + const wxRegion& GetShape() const { return m_shape; } +#if wxUSE_GRAPHICS_CONTEXT + const wxGraphicsPath& GetShapePath() { return m_shapePath; } +#endif // wxUSE_GRAPHICS_CONTEXT + + // activation hooks only necessary for MDI Implementation + static void MacDelayedDeactivation(long timestamp); + virtual void MacActivate( long timestamp , bool inIsActivating ) ; + + virtual void SetWindowStyleFlag(long flags); + + virtual void Raise(); + virtual void Lower(); + virtual bool Show( bool show = true ); + + virtual void SetExtraStyle(long exStyle) ; + + virtual bool SetBackgroundColour( const wxColour &colour ); + + wxNonOwnedWindowImpl* GetNonOwnedPeer() const { return m_nowpeer; } + +#if wxOSX_USE_COCOA_OR_IPHONE + // override the base class method to return an NSWindow instead of NSView + virtual void *OSXGetViewOrWindow() const; +#endif // Cocoa + + // osx specific event handling common for all osx-ports + + virtual void HandleActivated( double timestampsec, bool didActivate ); + virtual void HandleResized( double timestampsec ); + virtual void HandleMoved( double timestampsec ); + virtual void HandleResizing( double timestampsec, wxRect* rect ); + + void WindowWasPainted(); + + virtual bool Destroy(); + +protected: + // common part of all ctors + void Init(); + + virtual void DoGetPosition( int *x, int *y ) const; + virtual void DoGetSize( int *width, int *height ) const; + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual void DoGetClientSize(int *width, int *height) const; + + virtual bool OSXShowWithEffect(bool show, + wxShowEffect effect, + unsigned timeout); + + virtual bool DoClearShape(); + virtual bool DoSetRegionShape(const wxRegion& region); +#if wxUSE_GRAPHICS_CONTEXT + virtual bool DoSetPathShape(const wxGraphicsPath& path); +#endif // wxUSE_GRAPHICS_CONTEXT + + virtual void WillBeDestroyed(); + + wxNonOwnedWindowImpl* m_nowpeer ; + +// wxWindowMac* m_macFocus ; + + static wxNonOwnedWindow *s_macDeactivateWindow; + +private : + static clock_t s_lastFlush; + + wxRegion m_shape; +#if wxUSE_GRAPHICS_CONTEXT + wxGraphicsPath m_shapePath; +#endif // wxUSE_GRAPHICS_CONTEXT +}; + +// list of all frames and modeless dialogs +extern WXDLLIMPEXP_DATA_CORE(wxWindowList) wxModelessWindows; + + +#endif // _WX_MAC_NONOWNEDWND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/notebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/notebook.h new file mode 100644 index 0000000000..7e0ac72291 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/notebook.h @@ -0,0 +1,141 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/notebook.h +// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet) +// Author: Stefan Csomor +// Modified by: +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_NOTEBOOK_H_ +#define _WX_NOTEBOOK_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- +#include "wx/event.h" + +// ---------------------------------------------------------------------------- +// types +// ---------------------------------------------------------------------------- + +// fwd declarations +class WXDLLIMPEXP_FWD_CORE wxImageList; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +// ---------------------------------------------------------------------------- +// wxNotebook +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase +{ +public: + // ctors + // ----- + // default for dynamic class + wxNotebook() { } + // the same arguments as for wxControl (@@@ any special styles?) + wxNotebook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr) + { Create( parent, id, pos, size, style, name ); } + // Create() function + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr); + // dtor + virtual ~wxNotebook(); + + // accessors + // --------- + // set the currently selected page, return the index of the previously + // selected one (or wxNOT_FOUND on error) + // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events + int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); } + + // changes selected page without sending events + int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); } + + // set/get the title of a page + bool SetPageText(size_t nPage, const wxString& strText); + wxString GetPageText(size_t nPage) const; + + // sets/returns item's image index in the current image list + int GetPageImage(size_t nPage) const; + bool SetPageImage(size_t nPage, int nImage); + + // control the appearance of the notebook pages + // set the size (the same for all pages) + virtual void SetPageSize(const wxSize& size); + // set the padding between tabs (in pixels) + virtual void SetPadding(const wxSize& padding); + // sets the size of the tabs (assumes all tabs are the same size) + virtual void SetTabSize(const wxSize& sz); + + // hit test + virtual int HitTest(const wxPoint& pt, long *flags = NULL) const; + + // calculate size for wxNotebookSizer + wxSize CalcSizeFromPage(const wxSize& sizePage) const; + wxRect GetPageRect() const ; + + // operations + // ---------- + // remove all pages + bool DeleteAllPages(); + // the same as AddPage(), but adds it at the specified position + bool InsertPage(size_t nPage, + wxNotebookPage *pPage, + const wxString& strText, + bool bSelect = false, + int imageId = NO_IMAGE); + + // callbacks + // --------- + void OnSize(wxSizeEvent& event); + void OnSelChange(wxBookCtrlEvent& event); + void OnSetFocus(wxFocusEvent& event); + void OnNavigationKey(wxNavigationKeyEvent& event); + + // implementation + // -------------- + +#if wxUSE_CONSTRAINTS + virtual void SetConstraintSizes(bool recurse = true); + virtual bool DoPhase(int nPhase); + +#endif + + // base class virtuals + // ------------------- + virtual void Command(wxCommandEvent& event); + // osx specific event handling common for all osx-ports + + virtual bool OSXHandleClicked( double timestampsec ); + +protected: + virtual wxNotebookPage *DoRemovePage(size_t page) ; + // common part of all ctors + void Init(); + + // helper functions + void ChangePage(int nOldSel, int nSel); // change pages + void MacSetupTabs(); + + int DoSetSelection(size_t nPage, int flags = 0); + + // the icon indices + wxArrayInt m_images; + + DECLARE_DYNAMIC_CLASS(wxNotebook) + DECLARE_EVENT_TABLE() +}; + + +#endif // _WX_NOTEBOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/palette.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/palette.h new file mode 100644 index 0000000000..86e014f80f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/palette.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/palette.h +// Purpose: wxPalette class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PALETTE_H_ +#define _WX_PALETTE_H_ + +#include "wx/gdiobj.h" + +#define M_PALETTEDATA ((wxPaletteRefData *)m_refData) + +class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase +{ +public: + wxPalette(); + + wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); + virtual ~wxPalette(); + bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); + + int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const; + bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const; + + virtual int GetColoursCount() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxPalette) +}; + +#endif // _WX_PALETTE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/pen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/pen.h new file mode 100644 index 0000000000..391344850c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/pen.h @@ -0,0 +1,76 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/pen.h +// Purpose: wxPen class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PEN_H_ +#define _WX_PEN_H_ + +#include "wx/gdiobj.h" +#include "wx/colour.h" +#include "wx/bitmap.h" + +// Pen +class WXDLLIMPEXP_CORE wxPen : public wxPenBase +{ +public: + wxPen(); + wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); +#endif + + wxPen(const wxBitmap& stipple, int width); + virtual ~wxPen(); + + bool operator==(const wxPen& pen) const; + bool operator!=(const wxPen& pen) const { return !(*this == pen); } + + // Override in order to recreate the pen + void SetColour(const wxColour& col) ; + void SetColour(unsigned char r, unsigned char g, unsigned char b) ; + + void SetWidth(int width) ; + void SetStyle(wxPenStyle style) ; + void SetStipple(const wxBitmap& stipple) ; + void SetDashes(int nb_dashes, const wxDash *dash) ; + void SetJoin(wxPenJoin join) ; + void SetCap(wxPenCap cap) ; + + wxColour GetColour() const ; + int GetWidth() const; + wxPenStyle GetStyle() const; + wxPenJoin GetJoin() const; + wxPenCap GetCap() const; + int GetDashes(wxDash **ptr) const; + int GetDashCount() const; + + wxBitmap *GetStipple() const ; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxPenStyle)style); } +#endif + + // Implementation + + // Useful helper: create the brush resource + bool RealizeResource(); + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + void Unshare(); + + DECLARE_DYNAMIC_CLASS(wxPen) +}; + +#endif + // _WX_PEN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/pnghand.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/pnghand.h new file mode 100644 index 0000000000..c040521337 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/pnghand.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/pnghand.h +// Purpose: PNG bitmap handler +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PNGHAND_H_ +#define _WX_PNGHAND_H_ + +#include "wx/defs.h" + +#if wxUSE_LIBPNG + +class WXDLLIMPEXP_CORE wxPNGFileHandler: public wxBitmapHandler +{ + DECLARE_DYNAMIC_CLASS(wxPNGFileHandler) +public: + inline wxPNGFileHandler(void) + { + SetName(wxT("PNG bitmap file")); + SetExtension(wxT("bmp")); + SetType(wxBITMAP_TYPE_PNG); + } + + virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, + int desiredWidth, int desiredHeight); + virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL); +}; + +#endif //wxUSE_LIBPNG + +#endif + // _WX_PNGHAND_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/pngread.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/pngread.h new file mode 100644 index 0000000000..bdf466b8a3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/pngread.h @@ -0,0 +1,287 @@ +/* + * File: pngread.h + * Purpose: PNG file reader + * Author: Alejandro Aguilar Sierra/Julian Smart + * Created: 1995 + * Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra@servidor.unam.mx> + * + * + */ + +#ifndef _WX_PNGREAD__ +#define _WX_PNGREAD__ + +#ifndef byte +typedef unsigned char byte; +#endif + +#define WXIMA_COLORS DIB_PAL_COLORS + +typedef byte * ImagePointerType; + +typedef struct +{ + byte red; + byte green; + byte blue; +} rgb_color_struct; + + +#define COLORTYPE_PALETTE 1 +#define COLORTYPE_COLOR 2 +#define COLORTYPE_ALPHA 4 + +class wxPNGReader +{ +protected: + int filetype; + char filename[255]; + ImagePointerType RawImage; // Image data + + int Width, Height; // Dimensions + int Depth; // (bits x pixel) + int ColorType; // Bit 1 = Palette used + // Bit 2 = Color used + // Bit 3 = Alpha used + + long EfeWidth; // Efective Width + + void *lpbi; + int bgindex; + wxPalette* m_palette; + bool imageOK; +friend class wxPNGReaderIter; +public: + wxPNGReader(void); + wxPNGReader (char* ImageFileName); // Read an image file + virtual ~wxPNGReader (); + + void Create(int width, int height, int deep, int colortype=-1); + + bool ReadFile( char* ImageFileName=0 ); + bool SaveFile( char* ImageFileName=0 ); + bool SaveXPM(char *filename, char *name = 0); + int GetWidth( void ) const { return Width; } + int GetHeight( void ) const { return Height; } + int GetDepth( void ) const { return Depth; } + int GetColorType( void ) const { return ColorType; } + + int GetIndex(int x, int y); + bool GetRGB(int x, int y, byte* r, byte* g, byte* b); + + bool SetIndex(int x, int y, int index); + bool SetRGB(int x, int y, byte r, byte g, byte b); + + // ColorMap settings + bool SetPalette(wxPalette* colourmap); + bool SetPalette(int n, rgb_color_struct *rgb_struct); + bool SetPalette(int n, byte *r, byte *g=0, byte *b=0); + wxPalette* GetPalette() const { return m_palette; } + + void NullData(); + inline int GetBGIndex(void) { return bgindex; } + + inline bool Inside(int x, int y) + { return (0<=y && y<Height && 0<=x && x<Width); } + + virtual wxBitmap *GetBitmap(void); + virtual bool InstantiateBitmap(wxBitmap *bitmap); + wxMask *CreateMask(void); + + inline bool Ok() const { return IsOk(); } + inline bool IsOk(void) { return imageOK; } +}; + +class wxPNGReaderIter +{ +protected: + int Itx, Ity; // Counters + int Stepx, Stepy; + ImagePointerType IterImage; // Image pointer + wxPNGReader *ima; +public: +// Constructors + wxPNGReaderIter ( void ); + wxPNGReaderIter ( wxPNGReader *imax ); + operator wxPNGReader* (); + +// Iterators + bool ItOK (); + void reset (); + void upset (); + void SetRow(byte *buf, int n); + void GetRow(byte *buf, int n); + byte GetByte( ) { return IterImage[Itx]; } + void SetByte(byte b) { IterImage[Itx] = b; } + ImagePointerType GetRow(void); + bool NextRow(); + bool PrevRow(); + bool NextByte(); + bool PrevByte(); + + void SetSteps(int x, int y=0) { Stepx = x; Stepy = y; } + void GetSteps(int *x, int *y) { *x = Stepx; *y = Stepy; } + bool NextStep(); + bool PrevStep(); + +////////////////////////// AD - for interlace /////////////////////////////// + void SetY(int y); +///////////////////////////////////////////////////////////////////////////// +}; + + +inline +wxPNGReaderIter::wxPNGReaderIter(void) +{ + ima = 0; + IterImage = 0; + Itx = Ity = 0; + Stepx = Stepy = 0; +} + +inline +wxPNGReaderIter::wxPNGReaderIter(wxPNGReader *imax): ima(imax) +{ + if (ima) + IterImage = ima->RawImage; + Itx = Ity = 0; + Stepx = Stepy = 0; +} + +inline +wxPNGReaderIter::operator wxPNGReader* () +{ + return ima; +} + +inline +bool wxPNGReaderIter::ItOK () +{ + if (ima) + return ima->Inside(Itx, Ity); + else + return FALSE; +} + + +inline void wxPNGReaderIter::reset() +{ + IterImage = ima->RawImage; + Itx = Ity = 0; +} + +inline void wxPNGReaderIter::upset() +{ + Itx = 0; + Ity = ima->Height-1; + IterImage = ima->RawImage + ima->EfeWidth*(ima->Height-1); +} + +inline bool wxPNGReaderIter::NextRow() +{ + if (++Ity >= ima->Height) return 0; + IterImage += ima->EfeWidth; + return 1; +} + +inline bool wxPNGReaderIter::PrevRow() +{ + if (--Ity < 0) return 0; + IterImage -= ima->EfeWidth; + return 1; +} + +////////////////////////// AD - for interlace /////////////////////////////// +inline void wxPNGReaderIter::SetY(int y) +{ + if ((y < 0) || (y > ima->Height)) return; + Ity = y; + IterImage = ima->RawImage + ima->EfeWidth*y; +} + +///////////////////////////////////////////////////////////////////////////// + +inline void wxPNGReaderIter::SetRow(byte *buf, int n) +{ +// Here should be bcopy or memcpy + //_fmemcpy(IterImage, (void far *)buf, n); + if (n<0) + n = ima->GetWidth(); + + for (int i=0; i<n; i++) IterImage[i] = buf[i]; +} + +inline void wxPNGReaderIter::GetRow(byte *buf, int n) +{ + for (int i=0; i<n; i++) buf[i] = IterImage[i]; +} + +inline ImagePointerType wxPNGReaderIter::GetRow() +{ + return IterImage; +} + +inline bool wxPNGReaderIter::NextByte() +{ + if (++Itx < ima->EfeWidth) + return 1; + else + if (++Ity < ima->Height) + { + IterImage += ima->EfeWidth; + Itx = 0; + return 1; + } else + return 0; +} + +inline bool wxPNGReaderIter::PrevByte() +{ + if (--Itx >= 0) + return 1; + else + if (--Ity >= 0) + { + IterImage -= ima->EfeWidth; + Itx = 0; + return 1; + } else + return 0; +} + +inline bool wxPNGReaderIter::NextStep() +{ + Itx += Stepx; + if (Itx < ima->EfeWidth) + return 1; + else { + Ity += Stepy; + if (Ity < ima->Height) + { + IterImage += ima->EfeWidth; + Itx = 0; + return 1; + } else + return 0; + } +} + +inline bool wxPNGReaderIter::PrevStep() +{ + Itx -= Stepx; + if (Itx >= 0) + return 1; + else { + Ity -= Stepy; + if (Ity >= 0 && Ity < ima->Height) + { + IterImage -= ima->EfeWidth; + Itx = 0; + return 1; + } else + return 0; + } +} + +#endif + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/popupwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/popupwin.h new file mode 100644 index 0000000000..ac42cd64dd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/popupwin.h @@ -0,0 +1,33 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/popupwin.h +// Purpose: wxPopupWindow class for wxMac +// Author: Stefan Csomor +// Modified by: +// Created: +// Copyright: (c) 2006 Stefan Csomor +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_POPUPWIN_H_ +#define _WX_MAC_POPUPWIN_H_ + +// ---------------------------------------------------------------------------- +// wxPopupWindow +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPopupWindow : public wxPopupWindowBase +{ +public: + wxPopupWindow() { } + ~wxPopupWindow(); + + wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE) + { (void)Create(parent, flags); } + + bool Create(wxWindow *parent, int flags = wxBORDER_NONE); + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow) +}; + +#endif // _WX_MAC_POPUPWIN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/printdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/printdlg.h new file mode 100644 index 0000000000..d2601eccbe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/printdlg.h @@ -0,0 +1,111 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/printdlg.h +// Purpose: wxPrintDialog, wxPageSetupDialog classes. +// Use generic, PostScript version if no +// platform-specific implementation. +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRINTDLG_H_ +#define _WX_PRINTDLG_H_ + +#include "wx/dialog.h" +#include "wx/cmndata.h" +#include "wx/printdlg.h" +#include "wx/prntbase.h" + +/* + * wxMacPrintDialog + * The Mac dialog for printing + */ + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_CORE wxMacPrintDialog: public wxPrintDialogBase +{ +public: + wxMacPrintDialog(); + wxMacPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); + wxMacPrintDialog(wxWindow *parent, wxPrintData* data ); + virtual ~wxMacPrintDialog(); + + bool Create(wxWindow *parent, wxPrintDialogData* data = NULL); + virtual int ShowModal(); + + virtual wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; } + virtual wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); } + virtual wxDC *GetPrintDC(); + +private: + wxPrintDialogData m_printDialogData; + wxDC* m_printerDC; + bool m_destroyDC; + wxWindow* m_dialogParent; + +private: + DECLARE_DYNAMIC_CLASS(wxPrintDialog) +}; + +/* + * wxMacPageSetupDialog + * The Mac page setup dialog + */ + +class WXDLLIMPEXP_CORE wxMacPageSetupDialog: public wxPageSetupDialogBase +{ +public: + wxMacPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL); + virtual ~wxMacPageSetupDialog(); + + virtual wxPageSetupDialogData& GetPageSetupDialogData(); + + bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL); + virtual int ShowModal(); + +private: + wxPageSetupDialogData m_pageSetupData; + wxWindow* m_dialogParent; + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageSetupDialog) +}; + +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; + +/* +* wxMacPageMarginsDialog +* A Mac dialog for setting the page margins separately from page setup since +* (native) wxMacPageSetupDialog doesn't let you set margins. +*/ + +class WXDLLIMPEXP_CORE wxMacPageMarginsDialog : public wxDialog +{ +public: + wxMacPageMarginsDialog(wxFrame* parent, wxPageSetupDialogData* data); + bool TransferToWindow(); + bool TransferDataFromWindow(); + + virtual wxPageSetupDialogData& GetPageSetupDialogData() { return *m_pageSetupDialogData; } + +private: + wxPageSetupDialogData* m_pageSetupDialogData; + + wxPoint m_MinMarginTopLeft; + wxPoint m_MinMarginBottomRight; + wxTextCtrl *m_LeftMargin; + wxTextCtrl *m_TopMargin; + wxTextCtrl *m_RightMargin; + wxTextCtrl *m_BottomMargin; + + void GetMinMargins(); + bool CheckValue(wxTextCtrl* textCtrl, int *value, int minValue, const wxString& name); + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageMarginsDialog) +}; + + +#endif // _WX_PRINTDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/printmac.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/printmac.h new file mode 100644 index 0000000000..fb68fd8d5f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/printmac.h @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/printmac.h +// Purpose: wxWindowsPrinter, wxWindowsPrintPreview classes +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRINTWIN_H_ +#define _WX_PRINTWIN_H_ + +#include "wx/prntbase.h" + +/* + * Represents the printer: manages printing a wxPrintout object + */ + +class WXDLLIMPEXP_CORE wxMacPrinter: public wxPrinterBase +{ + DECLARE_DYNAMIC_CLASS(wxMacPrinter) + + public: + wxMacPrinter(wxPrintDialogData *data = NULL); + virtual ~wxMacPrinter(); + + virtual bool Print(wxWindow *parent, + wxPrintout *printout, + bool prompt = true); + virtual wxDC* PrintDialog(wxWindow *parent); + virtual bool Setup(wxWindow *parent); + +}; + +/* + * wxPrintPreview + * Programmer creates an object of this class to preview a wxPrintout. + */ + +class WXDLLIMPEXP_CORE wxMacPrintPreview: public wxPrintPreviewBase +{ + DECLARE_CLASS(wxMacPrintPreview) + + public: + wxMacPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting = NULL, + wxPrintDialogData *data = NULL); + wxMacPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintData *data); + virtual ~wxMacPrintPreview(); + + virtual bool Print(bool interactive); + virtual void DetermineScaling(); +}; + +#endif + // _WX_PRINTWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private.h new file mode 100644 index 0000000000..5b33475f99 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private.h @@ -0,0 +1,16 @@ +#ifndef _WX_PRIVATE_OSX_H_ +#define _WX_PRIVATE_OSX_H_ + +#include "wx/osx/core/private.h" + +#if wxOSX_USE_IPHONE + #include "wx/osx/iphone/private.h" +#elif wxOSX_USE_CARBON + #include "wx/osx/carbon/private.h" +#elif wxOSX_USE_COCOA + #include "wx/osx/cocoa/private.h" +#elif wxUSE_GUI + #error "Must include wx/defs.h first" +#endif + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private/glgrab.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private/glgrab.h new file mode 100644 index 0000000000..a3ceabe689 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private/glgrab.h @@ -0,0 +1,13 @@ +#include <CoreFoundation/CoreFoundation.h> + +#if defined __cplusplus + extern "C" { +#endif + + CF_RETURNS_RETAINED CGImageRef grabViaOpenGL(CGDirectDisplayID display, + CGRect srcRect); + +#if defined __cplusplus + } +#endif + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private/print.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private/print.h new file mode 100644 index 0000000000..6f33d3ba17 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private/print.h @@ -0,0 +1,5 @@ +#ifdef __WXMAC_CLASSIC__ +#include "wx/osx/classic/private/print.h" +#else +#include "wx/osx/carbon/private/print.h" +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private/timer.h new file mode 100644 index 0000000000..cd990764c3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/private/timer.h @@ -0,0 +1,11 @@ +/* common warning snippet for all osx direct includes */ + +#ifndef wxOSX_USE_CARBON +#error "this files should only be included after platform.h was included" +#endif + +#if 1 // revert to wxOSX_USE_COCOA_OR_IPHONE in case of problems + #include "wx/osx/core/private/timer.h" +#elif wxOSX_USE_CARBON + #include "wx/osx/carbon/private/timer.h" +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/radiobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/radiobox.h new file mode 100644 index 0000000000..f591a7df9b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/radiobox.h @@ -0,0 +1,109 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/radiobox.h +// Purpose: wxRadioBox class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RADIOBOX_H_ +#define _WX_RADIOBOX_H_ + +// List box item +class WXDLLIMPEXP_FWD_CORE wxBitmap ; + +class WXDLLIMPEXP_FWD_CORE wxRadioButton ; + +class WXDLLIMPEXP_CORE wxRadioBox: public wxControl, public wxRadioBoxBase +{ + DECLARE_DYNAMIC_CLASS(wxRadioBox) +public: +// Constructors & destructor + wxRadioBox(); + inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr) + { + Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name); + } + inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint& pos, const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Create(parent, id, title, pos, size, choices, + majorDim, style, val, name); + } + virtual ~wxRadioBox(); + bool Create(wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + int majorDim = 0, long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); + bool Create(wxWindow *parent, wxWindowID id, const wxString& title, + const wxPoint& pos, const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + + // Enabling + virtual bool Enable(bool enable = true); + virtual bool Enable(unsigned int item, bool enable = true); + virtual bool IsItemEnabled(unsigned int item) const; + + // Showing + virtual bool Show(bool show = true); + virtual bool Show(unsigned int item, bool show = true); + virtual bool IsItemShown(unsigned int item) const; + + // Specific functions (in wxWidgets2 reference) + virtual void SetSelection(int item); + virtual int GetSelection() const; + + virtual unsigned int GetCount() const { return m_noItems; } + + virtual wxString GetString(unsigned int item) const; + virtual void SetString(unsigned int item, const wxString& label); + + virtual wxString GetLabel() const; + virtual void SetLabel(const wxString& label) ; + + // protect native font of box + virtual bool SetFont( const wxFont &font ); +// Other external functions + void Command(wxCommandEvent& event); + void SetFocus(); + +// Other variable access functions + inline int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; } + inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; } + + void OnRadioButton( wxCommandEvent& event ) ; + +protected: + // resolve ambiguity in base classes + virtual wxBorder GetDefaultBorder() const { return wxRadioBoxBase::GetDefaultBorder(); } + + wxRadioButton *m_radioButtonCycle; + + unsigned int m_noItems; + int m_noRowsOrCols; + +// Internal functions + virtual wxSize DoGetBestSize() const ; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + DECLARE_EVENT_TABLE() +}; + +#endif + // _WX_RADIOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/radiobut.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/radiobut.h new file mode 100644 index 0000000000..649a544c3c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/radiobut.h @@ -0,0 +1,93 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/radiobut.h +// Purpose: wxRadioButton class +// Author: Stefan Csomor +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RADIOBUT_H_ +#define _WX_RADIOBUT_H_ + +class WXDLLIMPEXP_CORE wxRadioButton: public wxControl +{ + DECLARE_DYNAMIC_CLASS(wxRadioButton) + protected: +public: + inline wxRadioButton() {} + inline wxRadioButton(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + virtual ~wxRadioButton(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr); + + virtual void SetValue(bool val); + virtual bool GetValue() const ; + + // implementation + + void Command(wxCommandEvent& event); + wxRadioButton *AddInCycle(wxRadioButton *cycle); + void RemoveFromCycle(); + inline wxRadioButton *NextInCycle() {return m_cycle;} + + // osx specific event handling common for all osx-ports + + virtual bool OSXHandleClicked( double timestampsec ); + protected: + + wxRadioButton *m_cycle; +}; + +// Not implemented +#if 0 +class WXDLLIMPEXP_FWD_CORE wxBitmap ; + +WXDLLIMPEXP_DATA_CORE(extern const wxChar) wxBitmapRadioButtonNameStr[]; + +class WXDLLIMPEXP_CORE wxBitmapRadioButton: public wxRadioButton +{ + DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton) + protected: + wxBitmap *theButtonBitmap; + public: + inline wxBitmapRadioButton() { theButtonBitmap = NULL; } + inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id, + const wxBitmap *label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapRadioButtonNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxBitmap *label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxBitmapRadioButtonNameStr); + + virtual void SetLabel(const wxBitmap *label); + virtual void SetValue(bool val) ; + virtual bool GetValue() const ; +}; +#endif + +#endif + // _WX_RADIOBUT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/region.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/region.h new file mode 100644 index 0000000000..e085282079 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/region.h @@ -0,0 +1,8 @@ +#if wxOSX_USE_COCOA_OR_CARBON +#include "wx/osx/carbon/region.h" +#else +#define wxRegionGeneric wxRegion +#define wxRegionIteratorGeneric wxRegionIterator + +#include "wx/generic/region.h" +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/scrolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/scrolbar.h new file mode 100644 index 0000000000..2115ca5479 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/scrolbar.h @@ -0,0 +1,68 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/scrolbar.h +// Purpose: wxScrollBar class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SCROLBAR_H_ +#define _WX_SCROLBAR_H_ + +// Scrollbar item +class WXDLLIMPEXP_CORE wxScrollBar : public wxScrollBarBase +{ +public: + wxScrollBar() { m_pageSize = 0; m_viewSize = 0; m_objectSize = 0; } + virtual ~wxScrollBar(); + + wxScrollBar(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr) + { + Create(parent, id, pos, size, style, validator, name); + } + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr); + + virtual int GetThumbPosition() const ; + virtual int GetThumbSize() const { return m_viewSize; } + virtual int GetPageSize() const { return m_pageSize; } + virtual int GetRange() const { return m_objectSize; } + + virtual void SetThumbPosition(int viewStart); + virtual void SetScrollbar(int position, int thumbSize, int range, + int pageSize, bool refresh = true); + + // needed for RTTI + void SetThumbSize( int s ) { SetScrollbar( GetThumbPosition() , s , GetRange() , GetPageSize() , true ) ; } + void SetPageSize( int s ) { SetScrollbar( GetThumbPosition() , GetThumbSize() , GetRange() , s , true ) ; } + void SetRange( int s ) { SetScrollbar( GetThumbPosition() , GetThumbSize() , s , GetPageSize() , true ) ; } + + // implementation only from now on + void Command(wxCommandEvent& event); + virtual void TriggerScrollEvent( wxEventType scrollEvent ) ; + virtual bool OSXHandleClicked( double timestampsec ); +protected: + virtual wxSize DoGetBestSize() const; + + int m_pageSize; + int m_viewSize; + int m_objectSize; + + DECLARE_DYNAMIC_CLASS(wxScrollBar) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_SCROLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/setup.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/setup.h new file mode 100644 index 0000000000..1fd47f6c16 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/setup.h @@ -0,0 +1,1558 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/setup.h +// Purpose: Configuration for the library +// Author: Stefan Csomor +// Modified by: Stefan Csomor +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SETUP_H_ +#define _WX_SETUP_H_ + + +/* --- start common options --- */ +// ---------------------------------------------------------------------------- +// global settings +// ---------------------------------------------------------------------------- + +// define this to 0 when building wxBase library - this can also be done from +// makefile/project file overriding the value here +#ifndef wxUSE_GUI + #define wxUSE_GUI 1 +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// compatibility settings +// ---------------------------------------------------------------------------- + +// This setting determines the compatibility with 2.6 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_6 0 + +// This setting determines the compatibility with 2.8 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_8 1 + +// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when +// default system font is used for wxWindow::GetCharWidth/Height() instead of +// the current font. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxDIALOG_UNIT_COMPATIBILITY 0 + +// ---------------------------------------------------------------------------- +// debugging settings +// ---------------------------------------------------------------------------- + +// wxDEBUG_LEVEL will be defined as 1 in wx/debug.h so normally there is no +// need to define it here. You may do it for two reasons: either completely +// disable/compile out the asserts in release version (then do it inside #ifdef +// NDEBUG) or, on the contrary, enable more asserts, including the usually +// disabled ones, in the debug build (then do it inside #ifndef NDEBUG) +// +// #ifdef NDEBUG +// #define wxDEBUG_LEVEL 0 +// #else +// #define wxDEBUG_LEVEL 2 +// #endif + +// wxHandleFatalExceptions() may be used to catch the program faults at run +// time and, instead of terminating the program with a usual GPF message box, +// call the user-defined wxApp::OnFatalException() function. If you set +// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work. +// +// This setting is for Win32 only and can only be enabled if your compiler +// supports Win32 structured exception handling (currently only VC++ does) +// +// Default is 1 +// +// Recommended setting: 1 if your compiler supports it. +#define wxUSE_ON_FATAL_EXCEPTION 1 + +// Set this to 1 to be able to generate a human-readable (unlike +// machine-readable minidump created by wxCrashReport::Generate()) stack back +// trace when your program crashes using wxStackWalker +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_STACKWALKER 1 + +// Set this to 1 to compile in wxDebugReport class which allows you to create +// and optionally upload to your web site a debug report consisting of back +// trace of the crash (if wxUSE_STACKWALKER == 1) and other information. +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, it is compiled into a separate library so there +// is no overhead if you don't use it +#define wxUSE_DEBUGREPORT 1 + +// Generic comment about debugging settings: they are very useful if you don't +// use any other memory leak detection tools such as Purify/BoundsChecker, but +// are probably redundant otherwise. Also, Visual C++ CRT has the same features +// as wxWidgets memory debugging subsystem built in since version 5.0 and you +// may prefer to use it instead of built in memory debugging code because it is +// faster and more fool proof. +// +// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG +// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0) +// and if __NO_VC_CRTDBG__ is not defined. + +// The rest of the options in this section are obsolete and not supported, +// enable them at your own risk. + +// If 1, enables wxDebugContext, for writing error messages to file, etc. If +// __WXDEBUG__ is not defined, will still use the normal memory operators. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_CONTEXT 0 + +// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF* +// __WXDEBUG__ is also defined. +// +// WARNING: this code may not work with all architectures, especially if +// alignment is an issue. This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 1 if you are not using a memory debugging tool, else 0 +#define wxUSE_MEMORY_TRACING 0 + +// In debug mode, cause new and delete to be redefined globally. +// If this causes problems (e.g. link errors which is a common problem +// especially if you use another library which also redefines the global new +// and delete), set this to 0. +// This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If +// this causes problems (e.g. link errors), set this to 0. You may need to set +// this to 0 if using templates (at least for VC++). This switch is currently +// ignored for MinGW/Cygwin. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_NEW_ALWAYS 0 + + +// ---------------------------------------------------------------------------- +// Unicode support +// ---------------------------------------------------------------------------- + +// These settings are obsolete: the library is always built in Unicode mode +// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if +// absolutely necessary -- updating it is strongly recommended as the ANSI mode +// will disappear completely in future wxWidgets releases. +#ifndef wxUSE_UNICODE + #define wxUSE_UNICODE 1 +#endif + +// wxUSE_WCHAR_T is required by wxWidgets now, don't change. +#define wxUSE_WCHAR_T 1 + +// ---------------------------------------------------------------------------- +// global features +// ---------------------------------------------------------------------------- + +// Compile library in exception-safe mode? If set to 1, the library will try to +// behave correctly in presence of exceptions (even though it still will not +// use the exceptions itself) and notify the user code about any unhandled +// exceptions. If set to 0, propagation of the exceptions through the library +// code will lead to undefined behaviour -- but the code itself will be +// slightly smaller and faster. +// +// Note that like wxUSE_THREADS this option is automatically set to 0 if +// wxNO_EXCEPTIONS is defined. +// +// Default is 1 +// +// Recommended setting: depends on whether you intend to use C++ exceptions +// in your own code (1 if you do, 0 if you don't) +#define wxUSE_EXCEPTIONS 1 + +// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI +// +// Default is 0 +// +// Recommended setting: 0 (this is still work in progress...) +#define wxUSE_EXTENDED_RTTI 0 + +// Support for message/error logging. This includes wxLogXXX() functions and +// wxLog and derived classes. Don't set this to 0 unless you really know what +// you are doing. +// +// Default is 1 +// +// Recommended setting: 1 (always) +#define wxUSE_LOG 1 + +// Recommended setting: 1 +#define wxUSE_LOGWINDOW 1 + +// Recommended setting: 1 +#define wxUSE_LOGGUI 1 + +// Recommended setting: 1 +#define wxUSE_LOG_DIALOG 1 + +// Support for command line parsing using wxCmdLineParser class. +// +// Default is 1 +// +// Recommended setting: 1 (can be set to 0 if you don't use the cmd line) +#define wxUSE_CMDLINE_PARSER 1 + +// Support for multithreaded applications: if 1, compile in thread classes +// (thread.h) and make the library a bit more thread safe. Although thread +// support is quite stable by now, you may still consider recompiling the +// library without it if you have no use for it - this will result in a +// somewhat smaller and faster operation. +// +// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset +// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in +// build/msw/config.* file this value will have no effect. +// +// Default is 1 +// +// Recommended setting: 0 unless you do plan to develop MT applications +#define wxUSE_THREADS 1 + +// If enabled, compiles wxWidgets streams classes +// +// wx stream classes are used for image IO, process IO redirection, network +// protocols implementation and much more and so disabling this results in a +// lot of other functionality being lost. +// +// Default is 1 +// +// Recommended setting: 1 as setting it to 0 disables many other things +#define wxUSE_STREAMS 1 + +// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. +// Note that if the system's implementation does not support positional +// parameters, setting this to 1 forces the use of the wxWidgets implementation +// of wxVsnprintf. The standard vsnprintf() supports positional parameters on +// many Unix systems but usually doesn't under Windows. +// +// Positional parameters are very useful when translating a program since using +// them in formatting strings allow translators to correctly reorder the +// translated sentences. +// +// Default is 1 +// +// Recommended setting: 1 if you want to support multiple languages +#define wxUSE_PRINTF_POS_PARAMS 1 + +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but is +// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets +// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under +// XP as this triggers a bug in compiler TLS support that results in crashes +// when any TLS variables are used. +// +// If you're absolutely sure that your build of wxWidgets is never going to be +// used in such situation, either because it's not going to be linked from any +// kind of plugin or because you only target Vista or later systems, you can +// set this to 2 to force the use of compiler TLS even under MSW. +// +// Default is 1 meaning that compiler TLS is used only if it's 100% safe. +// +// Recommended setting: 2 if you want to have maximal performance and don't +// care about the scenario described above. +#define wxUSE_COMPILER_TLS 1 + +// ---------------------------------------------------------------------------- +// Interoperability with the standard library. +// ---------------------------------------------------------------------------- + +// Set wxUSE_STL to 1 to enable maximal interoperability with the standard +// library, even at the cost of backwards compatibility. +// +// Default is 0 +// +// Recommended setting: 0 as the options below already provide a relatively +// good level of interoperability and changing this option arguably isn't worth +// diverging from the official builds of the library. +#define wxUSE_STL 0 + +// This is not a real option but is used as the default value for +// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library headers, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_DEFAULT 0 +#else + #define wxUSE_STD_DEFAULT 1 +#endif + +// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<> +// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but +// usually more limited) implementations are used which allows to avoid the +// dependency on the C++ run-time library. +// +// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't +// support using standard containers and that VC6 needs non-default options for +// such build to avoid getting "fatal error C1076: compiler limit : internal +// heap limit reached; use /Zm to specify a higher limit" in its own standard +// headers, so you need to ensure you do increase the heap size before enabling +// this option for this compiler. +// +// Default is 0 for compatibility reasons. +// +// Recommended setting: 1 unless compatibility with the official wxWidgets +// build and/or the existing code is a concern. +#define wxUSE_STD_CONTAINERS 0 + +// Use standard C++ streams if 1 instead of wx streams in some places. If +// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the +// standard streams library. +// +// Notice that enabling this does not replace wx streams with std streams +// everywhere, in a lot of places wx streams are used no matter what. +// +// Default is 1 if compiler supports it. +// +// Recommended setting: 1 if you use the standard streams anyhow and so +// dependency on the standard streams library is not a +// problem +#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT + +// Enable minimal interoperability with the standard C++ string class if 1. +// "Minimal" means that wxString can be constructed from std::string or +// std::wstring but can't be implicitly converted to them. You need to enable +// the option below for the latter. +// +// Default is 1 for most compilers. +// +// Recommended setting: 1 unless you want to ensure your program doesn't use +// the standard C++ library at all. +#define wxUSE_STD_STRING wxUSE_STD_DEFAULT + +// Make wxString as much interchangeable with std::[w]string as possible, in +// particular allow implicit conversion of wxString to either of these classes. +// This comes at a price (or a benefit, depending on your point of view) of not +// allowing implicit conversion to "const char *" and "const wchar_t *". +// +// Because a lot of existing code relies on these conversions, this option is +// disabled by default but can be enabled for your build if you don't care +// about compatibility. +// +// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled. +// +// Recommended setting: 0 to remain compatible with the official builds of +// wxWidgets. +#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL + +// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix +// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>. +// +// Note that newer compilers (including VC++ 7.1 and later) don't support +// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow. +// +// Default is 0. +// +// Recommended setting: 0, only set to 1 if you use a really old compiler +#define wxUSE_IOSTREAMH 0 + + +// ---------------------------------------------------------------------------- +// non GUI features selection +// ---------------------------------------------------------------------------- + +// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit +// integer which is implemented in terms of native 64 bit integers if any or +// uses emulation otherwise. +// +// This class is required by wxDateTime and so you should enable it if you want +// to use wxDateTime. For most modern platforms, it will use the native 64 bit +// integers in which case (almost) all of its functions are inline and it +// almost does not take any space, so there should be no reason to switch it +// off. +// +// Recommended setting: 1 +#define wxUSE_LONGLONG 1 + +// Set wxUSE_BASE64 to 1, to compile in Base64 support. This is required for +// storing binary data in wxConfig on most platforms. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_BASE64 1 + +// Set this to 1 to be able to use wxEventLoop even in console applications +// (i.e. using base library only, without GUI). This is mostly useful for +// processing socket events but is also necessary to use timers in console +// applications +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_CONSOLE_EVENTLOOP 1 + +// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level +// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions. +// +// Default is 1 +// +// Recommended setting: 1 (wxFile is highly recommended as it is required by +// i18n code, wxFileConfig and others) +#define wxUSE_FILE 1 +#define wxUSE_FFILE 1 + +// Use wxFSVolume class providing access to the configured/active mount points +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely disabled if you don't use it) +#define wxUSE_FSVOLUME 1 + +// Use wxStandardPaths class which allows to retrieve some standard locations +// in the file system +// +// Default is 1 +// +// Recommended setting: 1 (may be disabled to save space, but not much) +#define wxUSE_STDPATHS 1 + +// use wxTextBuffer class: required by wxTextFile +#define wxUSE_TEXTBUFFER 1 + +// use wxTextFile class: requires wxFile and wxTextBuffer, required by +// wxFileConfig +#define wxUSE_TEXTFILE 1 + +// i18n support: _() macro, wxLocale class. Requires wxTextFile. +#define wxUSE_INTL 1 + +// Provide wxFoo_l() functions similar to standard foo() functions but taking +// an extra locale parameter. +// +// Notice that this is fully implemented only for the systems providing POSIX +// xlocale support or Microsoft Visual C++ >= 8 (which provides proprietary +// almost-equivalent of xlocale functions), otherwise wxFoo_l() functions will +// only work for the current user locale and "C" locale. You can use +// wxHAS_XLOCALE_SUPPORT to test whether the full support is available. +// +// Default is 1 +// +// Recommended setting: 1 but may be disabled if you are writing programs +// running only in C locale anyhow +#define wxUSE_XLOCALE 1 + +// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which +// allow to manipulate dates, times and time intervals. wxDateTime replaces the +// old wxTime and wxDate classes which are still provided for backwards +// compatibility (and implemented in terms of wxDateTime). +// +// Note that this class is relatively new and is still officially in alpha +// stage because some features are not yet (fully) implemented. It is already +// quite useful though and should only be disabled if you are aiming at +// absolutely minimal version of the library. +// +// Requires: wxUSE_LONGLONG +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_DATETIME 1 + +// Set wxUSE_TIMER to 1 to compile wxTimer class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_TIMER 1 + +// Use wxStopWatch clas. +// +// Default is 1 +// +// Recommended setting: 1 (needed by wxSocket) +#define wxUSE_STOPWATCH 1 + +// Set wxUSE_FSWATCHER to 1 if you want to enable wxFileSystemWatcher +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FSWATCHER 1 + +// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes +// which allow the application to store its settings in the persistent +// storage. Setting this to 1 will also enable on-demand creation of the +// global config object in wxApp. +// +// See also wxUSE_CONFIG_NATIVE below. +// +// Recommended setting: 1 +#define wxUSE_CONFIG 1 + +// If wxUSE_CONFIG is 1, you may choose to use either the native config +// classes under Windows (using .INI files under Win16 and the registry under +// Win32) or the portable text file format used by the config classes under +// Unix. +// +// Default is 1 to use native classes. Note that you may still use +// wxFileConfig even if you set this to 1 - just the config object created by +// default for the applications needs will be a wxRegConfig or wxIniConfig and +// not wxFileConfig. +// +// Recommended setting: 1 +#define wxUSE_CONFIG_NATIVE 1 + +// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows +// to connect/disconnect from the network and be notified whenever the dial-up +// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DIALUP_MANAGER 1 + +// Compile in classes for run-time DLL loading and function calling. +// Required by wxUSE_DIALUP_MANAGER. +// +// This setting is for Win32 only +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DYNLIB_CLASS 1 + +// experimental, don't use for now +#define wxUSE_DYNAMIC_LOADER 1 + +// Set to 1 to use socket classes +#define wxUSE_SOCKETS 1 + +// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS) +// +// Notice that currently setting this option under Windows will result in +// programs which can only run on recent OS versions (with ws2_32.dll +// installed) which is why it is disabled by default. +// +// Default is 1. +// +// Recommended setting: 1 if you need IPv6 support +#define wxUSE_IPV6 0 + +// Set to 1 to enable virtual file systems (required by wxHTML) +#define wxUSE_FILESYSTEM 1 + +// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ZIP 1 + +// Set to 1 to enable virtual archive filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ARCHIVE 1 + +// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_INET 1 + +// wxArchive classes for accessing archives such as zip and tar +#define wxUSE_ARCHIVE_STREAMS 1 + +// Set to 1 to compile wxZipInput/OutputStream classes. +#define wxUSE_ZIPSTREAM 1 + +// Set to 1 to compile wxTarInput/OutputStream classes. +#define wxUSE_TARSTREAM 1 + +// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by +// wxUSE_LIBPNG +#define wxUSE_ZLIB 1 + +// If enabled, the code written by Apple will be used to write, in a portable +// way, float on the disk. See extended.c for the license which is different +// from wxWidgets one. +// +// Default is 1. +// +// Recommended setting: 1 unless you don't like the license terms (unlikely) +#define wxUSE_APPLE_IEEE 1 + +// Joystick support class +#define wxUSE_JOYSTICK 1 + +// wxFontEnumerator class +#define wxUSE_FONTENUM 1 + +// wxFontMapper class +#define wxUSE_FONTMAP 1 + +// wxMimeTypesManager class +#define wxUSE_MIMETYPE 1 + +// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP +// or wxURL you need to set this to 1. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_PROTOCOL 1 + +// The settings for the individual URL schemes +#define wxUSE_PROTOCOL_FILE 1 +#define wxUSE_PROTOCOL_FTP 1 +#define wxUSE_PROTOCOL_HTTP 1 + +// Define this to use wxURL class. +#define wxUSE_URL 1 + +// Define this to use native platform url and protocol support. +// Currently valid only for MS-Windows. +// Note: if you set this to 1, you can open ftp/http/gopher sites +// and obtain a valid input stream for these sites +// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0. +// Doing so reduces the code size. +// +// This code is experimental and subject to change. +#define wxUSE_URL_NATIVE 0 + +// Support for wxVariant class used in several places throughout the library, +// notably in wxDataViewCtrl API. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size as much as +// possible in which case setting this to 0 can gain up to 100KB. +#define wxUSE_VARIANT 1 + +// Support for wxAny class, the successor for wxVariant. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size by a small amount, +// or your compiler cannot for some reason cope with complexity of templates used. +#define wxUSE_ANY 1 + +// Support for regular expression matching via wxRegEx class: enable this to +// use POSIX regular expressions in your code. You need to compile regex +// library from src/regex to use it under Windows. +// +// Default is 0 +// +// Recommended setting: 1 if your compiler supports it, if it doesn't please +// contribute us a makefile for src/regex for it +#define wxUSE_REGEX 1 + +// wxSystemOptions class +#define wxUSE_SYSTEM_OPTIONS 1 + +// wxSound class +#define wxUSE_SOUND 1 + +// Use wxMediaCtrl +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_MEDIACTRL 1 + +// Use wxWidget's XRC XML-based resource system. Recommended. +// +// Default is 1 +// +// Recommended setting: 1 (requires wxUSE_XML) +#define wxUSE_XRC 1 + +// XML parsing classes. Note that their API will change in the future, so +// using wxXmlDocument and wxXmlNode in your app is not recommended. +// +// Default is the same as wxUSE_XRC, i.e. 1 by default. +// +// Recommended setting: 1 (required by XRC) +#define wxUSE_XML wxUSE_XRC + +// Use wxWidget's AUI docking system +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_AUI 1 + +// Use wxWidget's Ribbon classes for interfaces +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_RIBBON 1 + +// Use wxPropertyGrid. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_PROPGRID 1 + +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + +// Use wxWidget's web viewing classes +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW 1 + +// Use the IE wxWebView backend +// +// Default is 1 on MSW +// +// Recommended setting: 1 +#ifdef __WXMSW__ +#define wxUSE_WEBVIEW_IE 1 +#else +#define wxUSE_WEBVIEW_IE 0 +#endif + +// Use the WebKit wxWebView backend +// +// Default is 1 on GTK and OSX +// +// Recommended setting: 1 +#if defined(__WXGTK__) || defined(__WXOSX__) +#define wxUSE_WEBVIEW_WEBKIT 1 +#else +#define wxUSE_WEBVIEW_WEBKIT 0 +#endif + +// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced +// 2D drawing API. (Still somewhat experimental) +// +// Please note that on Windows gdiplus.dll is loaded dynamically which means +// that nothing special needs to be done as long as you don't use +// wxGraphicsContext at all or only use it on XP and later systems but you +// still do need to distribute it yourself for an application using +// wxGraphicsContext to be runnable on pre-XP systems. +// +// Default is 1 except if you're using a non-Microsoft compiler under Windows +// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. +// mingw32) you may need to install the headers (and just the headers) +// yourself. If you do, change the setting below manually. +// +// Recommended setting: 1 if supported by the compilation environment + +// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is +// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined +#ifdef _MSC_VER +# if _MSC_VER >= 1310 + // MSVC7.1+ comes with new enough Platform SDK, enable + // wxGraphicsContext support for it +# define wxUSE_GRAPHICS_CONTEXT 1 +# else + // MSVC 6 didn't include GDI+ headers so disable by default, enable it + // here if you use MSVC 6 with a newer SDK +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#else + // Disable support for other Windows compilers, enable it if your compiler + // comes with new enough SDK or you installed the headers manually. + // + // Notice that this will be set by configure under non-Windows platforms + // anyhow so the value there is not important. +# define wxUSE_GRAPHICS_CONTEXT 0 +#endif + +// Enable wxGraphicsContext implementation using Cairo library. +// +// This is not needed under Windows and detected automatically by configure +// under other systems, however you may set this to 1 manually if you installed +// Cairo under Windows yourself and prefer to use it instead the native GDI+ +// implementation. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_CAIRO 0 + + +// ---------------------------------------------------------------------------- +// Individual GUI controls +// ---------------------------------------------------------------------------- + +// You must set wxUSE_CONTROLS to 1 if you are using any controls at all +// (without it, wxControl class is not compiled) +// +// Default is 1 +// +// Recommended setting: 1 (don't change except for very special programs) +#define wxUSE_CONTROLS 1 + +// Support markup in control labels, i.e. provide wxControl::SetLabelMarkup(). +// Currently markup is supported only by a few controls and only some ports but +// their number will increase with time. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you want to save on code size) +#define wxUSE_MARKUP 1 + +// wxPopupWindow class is a top level transient window. It is currently used +// to implement wxTipWindow +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW) +#define wxUSE_POPUPWIN 1 + +// wxTipWindow allows to implement the custom tooltips, it is used by the +// context help classes. Requires wxUSE_POPUPWIN. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0) +#define wxUSE_TIPWINDOW 1 + +// Each of the settings below corresponds to one wxWidgets control. They are +// all switched on by default but may be disabled if you are sure that your +// program (including any standard dialogs it can show!) doesn't need them and +// if you desperately want to save some space. If you use any of these you must +// set wxUSE_CONTROLS as well. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl +#define wxUSE_BANNERWINDOW 1 // wxBannerWindow +#define wxUSE_BUTTON 1 // wxButton +#define wxUSE_BMPBUTTON 1 // wxBitmapButton +#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl +#define wxUSE_CHECKBOX 1 // wxCheckBox +#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHOICE 1 // wxChoice +#define wxUSE_COLLPANE 1 // wxCollapsiblePane +#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl +#define wxUSE_COMBOBOX 1 // wxComboBox +#define wxUSE_COMMANDLINKBUTTON 1 // wxCommandLinkButton +#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl +#define wxUSE_DATEPICKCTRL 1 // wxDatePickerCtrl +#define wxUSE_DIRPICKERCTRL 1 // wxDirPickerCtrl +#define wxUSE_EDITABLELISTBOX 1 // wxEditableListBox +#define wxUSE_FILECTRL 1 // wxFileCtrl +#define wxUSE_FILEPICKERCTRL 1 // wxFilePickerCtrl +#define wxUSE_FONTPICKERCTRL 1 // wxFontPickerCtrl +#define wxUSE_GAUGE 1 // wxGauge +#define wxUSE_HEADERCTRL 1 // wxHeaderCtrl +#define wxUSE_HYPERLINKCTRL 1 // wxHyperlinkCtrl +#define wxUSE_LISTBOX 1 // wxListBox +#define wxUSE_LISTCTRL 1 // wxListCtrl +#define wxUSE_RADIOBOX 1 // wxRadioBox +#define wxUSE_RADIOBTN 1 // wxRadioButton +#define wxUSE_RICHMSGDLG 1 // wxRichMessageDialog +#define wxUSE_SCROLLBAR 1 // wxScrollBar +#define wxUSE_SEARCHCTRL 1 // wxSearchCtrl +#define wxUSE_SLIDER 1 // wxSlider +#define wxUSE_SPINBTN 1 // wxSpinButton +#define wxUSE_SPINCTRL 1 // wxSpinCtrl +#define wxUSE_STATBOX 1 // wxStaticBox +#define wxUSE_STATLINE 1 // wxStaticLine +#define wxUSE_STATTEXT 1 // wxStaticText +#define wxUSE_STATBMP 1 // wxStaticBitmap +#define wxUSE_TEXTCTRL 1 // wxTextCtrl +#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl +#define wxUSE_TOGGLEBTN 1 // requires wxButton +#define wxUSE_TREECTRL 1 // wxTreeCtrl +#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl + +// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR +// below either wxStatusBar95 or a generic wxStatusBar will be used. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STATUSBAR 1 + +// Two status bar implementations are available under Win32: the generic one +// or the wrapper around native control. For native look and feel the native +// version should be used. +// +// Default is 1 for the platforms where native status bar is supported. +// +// Recommended setting: 1 (there is no advantage in using the generic one) +#define wxUSE_NATIVE_STATUSBAR 1 + +// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar +// classes at all. Otherwise, use the native toolbar class unless +// wxUSE_TOOLBAR_NATIVE is 0. +// +// Default is 1 for all settings. +// +// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE. +#define wxUSE_TOOLBAR 1 +#define wxUSE_TOOLBAR_NATIVE 1 + +// wxNotebook is a control with several "tabs" located on one of its sides. It +// may be used to logically organise the data presented to the user instead of +// putting everything in one huge dialog. It replaces wxTabControl and related +// classes of wxWin 1.6x. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTEBOOK 1 + +// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_LISTBOOK 1 + +// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CHOICEBOOK 1 + +// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TREEBOOK 1 + +// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of +// tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLBOOK 1 + +// wxTaskBarIcon is a small notification icon shown in the system toolbar or +// dock. +// +// Default is 1. +// +// Recommended setting: 1 (but can be set to 0 if you don't need it) +#define wxUSE_TASKBARICON 1 + +// wxGrid class +// +// Default is 1, set to 0 to cut down compilation time and binaries size if you +// don't use it. +// +// Recommended setting: 1 +// +#define wxUSE_GRID 1 + +// wxMiniFrame class: a frame with narrow title bar +// +// Default is 1. +// +// Recommended setting: 1 (it doesn't cost almost anything) +#define wxUSE_MINIFRAME 1 + +// wxComboCtrl and related classes: combobox with custom popup window and +// not necessarily a listbox. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it +// it used by wxComboBox +#define wxUSE_COMBOCTRL 1 + +// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox +// items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0, except where it is +// needed as a base class for generic wxBitmapComboBox. +#define wxUSE_ODCOMBOBOX 1 + +// wxBitmapComboBox is a combobox that can have images in front of text items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 +#define wxUSE_BITMAPCOMBOBOX 1 + +// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items +// up and down in it. It is also used as part of wxRearrangeDialog. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 (currently used only by +// wxHeaderCtrl) +#define wxUSE_REARRANGECTRL 1 + +// ---------------------------------------------------------------------------- +// Miscellaneous GUI stuff +// ---------------------------------------------------------------------------- + +// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar) +#define wxUSE_ACCEL 1 + +// Use the standard art provider. The icons returned by this provider are +// embedded into the library as XPMs so disabling it reduces the library size +// somewhat but this should only be done if you use your own custom art +// provider returning the icons or never use any icons not provided by the +// native art provider (which might not be implemented at all for some +// platforms) or by the Tango icons provider (if it's not itself disabled +// below). +// +// Default is 1. +// +// Recommended setting: 1 unless you use your own custom art provider. +#define wxUSE_ARTPROVIDER_STD 1 + +// Use art provider providing Tango icons: this art provider has higher quality +// icons than the default ones using smaller size XPM icons without +// transparency but the embedded PNG icons add to the library size. +// +// Default is 1 under non-GTK ports. Under wxGTK the native art provider using +// the GTK+ stock icons replaces it so it is normally not necessary. +// +// Recommended setting: 1 but can be turned off to reduce the library size. +#define wxUSE_ARTPROVIDER_TANGO 1 + +// Hotkey support (currently Windows only) +#define wxUSE_HOTKEY 1 + +// Use wxCaret: a class implementing a "cursor" in a text control (called caret +// under Windows). +// +// Default is 1. +// +// Recommended setting: 1 (can be safely set to 0, not used by the library) +#define wxUSE_CARET 1 + +// Use wxDisplay class: it allows enumerating all displays on a system and +// their geometries as well as finding the display on which the given point or +// window lies. +// +// Default is 1. +// +// Recommended setting: 1 if you need it, can be safely set to 0 otherwise +#define wxUSE_DISPLAY 1 + +// Miscellaneous geometry code: needed for Canvas library +#define wxUSE_GEOMETRY 1 + +// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and +// wxListCtrl. +// +// Default is 1. +// +// Recommended setting: 1 (set it to 0 if you don't use any of the controls +// enumerated above, then this class is mostly useless too) +#define wxUSE_IMAGLIST 1 + +// Use wxInfoBar class. +// +// Default is 1. +// +// Recommended setting: 1 (but can be disabled without problems as nothing +// depends on it) +#define wxUSE_INFOBAR 1 + +// Use wxMenu, wxMenuBar, wxMenuItem. +// +// Default is 1. +// +// Recommended setting: 1 (can't be disabled under MSW) +#define wxUSE_MENUS 1 + +// Use wxNotificationMessage. +// +// wxNotificationMessage allows to show non-intrusive messages to the user +// using balloons, banners, popups or whatever is the appropriate method for +// the current platform. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTIFICATION_MESSAGE 1 + +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + +// wxRichToolTip is a customizable tooltip class which has more functionality +// than the stock (but native, unlike this class) wxToolTip. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely set to 0 if you don't need it) +#define wxUSE_RICHTOOLTIP 1 + +// Use wxSashWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SASH 1 + +// Use wxSplitterWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SPLITTER 1 + +// Use wxToolTip and wxWindow::Set/GetToolTip() methods. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLTIPS 1 + +// wxValidator class and related methods +#define wxUSE_VALIDATORS 1 + +// Use reference counted ID management: this means that wxWidgets will track +// the automatically allocated ids (those used when you use wxID_ANY when +// creating a window, menu or toolbar item &c) instead of just supposing that +// the program never runs out of them. This is mostly useful only under wxMSW +// where the total ids range is limited to SHRT_MIN..SHRT_MAX and where +// long-running programs can run into problems with ids reuse without this. On +// the other platforms, where the ids have the full int range, this shouldn't +// be necessary. +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif + +// ---------------------------------------------------------------------------- +// common dialogs +// ---------------------------------------------------------------------------- + +// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g. +// file selector, printer dialog). Switching this off also switches off the +// printing architecture and interactive wxPrinterDC. +// +// Default is 1 +// +// Recommended setting: 1 (unless it really doesn't work) +#define wxUSE_COMMON_DIALOGS 1 + +// wxBusyInfo displays window with message when app is busy. Works in same way +// as wxBusyCursor +#define wxUSE_BUSYINFO 1 + +// Use single/multiple choice dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_CHOICEDLG 1 + +// Use colour picker dialog +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_COLOURDLG 1 + +// wxDirDlg class for getting a directory name from user +#define wxUSE_DIRDLG 1 + +// TODO: setting to choose the generic or native one + +// Use file open/save dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in many places in the library itself) +#define wxUSE_FILEDLG 1 + +// Use find/replace dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely set to 0) +#define wxUSE_FINDREPLDLG 1 + +// Use font picker dialog +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_FONTDLG 1 + +// Use wxMessageDialog and wxMessageBox. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_MSGDLG 1 + +// progress dialog class for lengthy operations +#define wxUSE_PROGRESSDLG 1 + +// support for startup tips (wxShowTip &c) +#define wxUSE_STARTUP_TIPS 1 + +// text entry dialog and wxGetTextFromUser function +#define wxUSE_TEXTDLG 1 + +// number entry dialog +#define wxUSE_NUMBERDLG 1 + +// splash screen class +#define wxUSE_SPLASH 1 + +// wizards +#define wxUSE_WIZARDDLG 1 + +// Compile in wxAboutBox() function showing the standard "About" dialog. +// +// Default is 1 +// +// Recommended setting: 1 but can be set to 0 to save some space if you don't +// use this function +#define wxUSE_ABOUTDLG 1 + +// wxFileHistory class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FILE_HISTORY 1 + +// ---------------------------------------------------------------------------- +// Metafiles support +// ---------------------------------------------------------------------------- + +// Windows supports the graphics format known as metafile which is, though not +// portable, is widely used under Windows and so is supported by wxWin (under +// Windows only, of course). Win16 (Win3.1) used the so-called "Window +// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in +// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by +// default, WMFs will be used under Win16 and EMFs under Win32. This may be +// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting +// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile +// in any metafile related classes at all. +// +// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS. +// +// Recommended setting: default or 0 for everything for portable programs. +#define wxUSE_METAFILE 1 +#define wxUSE_ENH_METAFILE 1 +#define wxUSE_WIN_METAFILES_ALWAYS 0 + +// ---------------------------------------------------------------------------- +// Big GUI components +// ---------------------------------------------------------------------------- + +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + +// Set to 0 to disable document/view architecture +#define wxUSE_DOC_VIEW_ARCHITECTURE 1 + +// Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 1 + +// Set to 0 to disable print/preview architecture code +#define wxUSE_PRINTING_ARCHITECTURE 1 + +// wxHTML sublibrary allows to display HTML in wxWindow programs and much, +// much more. +// +// Default is 1. +// +// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a +// smaller library. +#define wxUSE_HTML 1 + +// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL +// headers and libraries to be able to compile the library with wxUSE_GLCANVAS +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). +// +// Default is 1 unless the compiler is known to ship without the necessary +// headers (Digital Mars) or the platform doesn't support OpenGL (Windows CE). +// +// Recommended setting: 1 if you intend to use OpenGL, can be safely set to 0 +// otherwise. +#define wxUSE_GLCANVAS 1 + +// wxRichTextCtrl allows editing of styled text. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 if you want compile a +// smaller library. +#define wxUSE_RICHTEXT 1 + +// ---------------------------------------------------------------------------- +// Data transfer +// ---------------------------------------------------------------------------- + +// Use wxClipboard class for clipboard copy/paste. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CLIPBOARD 1 + +// Use wxDataObject and related classes. Needed for clipboard and OLE drag and +// drop +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DATAOBJ 1 + +// Use wxDropTarget and wxDropSource classes for drag and drop (this is +// different from "built in" drag and drop in wxTreeCtrl which is always +// available). Requires wxUSE_DATAOBJ. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DRAG_AND_DROP 1 + +// Use wxAccessible for enhanced and customisable accessibility. +// Depends on wxUSE_OLE. +// +// Default is 0. +// +// Recommended setting (at present): 0 +#define wxUSE_ACCESSIBILITY 0 + +// ---------------------------------------------------------------------------- +// miscellaneous settings +// ---------------------------------------------------------------------------- + +// wxSingleInstanceChecker class allows to verify at startup if another program +// instance is running. +// +// Default is 1 +// +// Recommended setting: 1 (the class is tiny, disabling it won't save much +// space) +#define wxUSE_SNGLINST_CHECKER 1 + +#define wxUSE_DRAGIMAGE 1 + +#define wxUSE_IPC 1 + // 0 for no interprocess comms +#define wxUSE_HELP 1 + // 0 for no help facility + +// Should we use MS HTML help for wxHelpController? If disabled, neither +// wxCHMHelpController nor wxBestHelpController are available. +// +// Default is 1 under MSW, 0 is always used for the other platforms. +// +// Recommended setting: 1, only set to 0 if you have trouble compiling +// wxCHMHelpController (could be a problem with really ancient compilers) +#define wxUSE_MS_HTML_HELP 1 + + +// Use wxHTML-based help controller? +#define wxUSE_WXHTML_HELP 1 + +#define wxUSE_CONSTRAINTS 1 + // 0 for no window layout constraint system + +#define wxUSE_SPLINES 1 + // 0 for no splines + +#define wxUSE_MOUSEWHEEL 1 + // Include mouse wheel support + +// Compile wxUIActionSimulator class? +#define wxUSE_UIACTIONSIMULATOR 1 + +// ---------------------------------------------------------------------------- +// wxDC classes for various output formats +// ---------------------------------------------------------------------------- + +// Set to 1 for PostScript device context. +#define wxUSE_POSTSCRIPT 0 + +// Set to 1 to use font metric files in GetTextExtent +#define wxUSE_AFM_FOR_POSTSCRIPT 1 + +// Set to 1 to compile in support for wxSVGFileDC, a wxDC subclass which allows +// to create files in SVG (Scalable Vector Graphics) format. +#define wxUSE_SVG 1 + +// Should wxDC provide SetTransformMatrix() and related methods? +// +// Default is 1 but can be set to 0 if this functionality is not used. Notice +// that currently only wxMSW supports this so setting this to 0 doesn't change +// much for non-MSW platforms (although it will still save a few bytes +// probably). +// +// Recommended setting: 1. +#define wxUSE_DC_TRANSFORM_MATRIX 1 + +// ---------------------------------------------------------------------------- +// image format support +// ---------------------------------------------------------------------------- + +// wxImage supports many different image formats which can be configured at +// compile-time. BMP is always supported, others are optional and can be safely +// disabled if you don't plan to use images in such format sometimes saving +// substantial amount of code in the final library. +// +// Some formats require an extra library which is included in wxWin sources +// which is mentioned if it is the case. + +// Set to 1 for wxImage support (recommended). +#define wxUSE_IMAGE 1 + +// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB. +#define wxUSE_LIBPNG 1 + +// Set to 1 for JPEG format support (requires libjpeg) +#define wxUSE_LIBJPEG 1 + +// Set to 1 for TIFF format support (requires libtiff) +#define wxUSE_LIBTIFF 1 + +// Set to 1 for TGA format support (loading only) +#define wxUSE_TGA 1 + +// Set to 1 for GIF format support +#define wxUSE_GIF 1 + +// Set to 1 for PNM format support +#define wxUSE_PNM 1 + +// Set to 1 for PCX format support +#define wxUSE_PCX 1 + +// Set to 1 for IFF format support (Amiga format) +#define wxUSE_IFF 0 + +// Set to 1 for XPM format support +#define wxUSE_XPM 1 + +// Set to 1 for MS Icons and Cursors format support +#define wxUSE_ICO_CUR 1 + +// Set to 1 to compile in wxPalette class +#define wxUSE_PALETTE 1 + +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 + + +/* --- end common options --- */ + +// ---------------------------------------------------------------------------- +// Unix-specific options settings +// ---------------------------------------------------------------------------- + +// use wxSelectDispatcher class +#define wxUSE_SELECT_DISPATCHER 1 + +// use wxEpollDispatcher class (Linux only) +#define wxUSE_EPOLL_DISPATCHER 0 + +/* + Use GStreamer for Unix. + + Default is 0 as this requires a lot of dependencies which might not be + available. + + Recommended setting: 1 (wxMediaCtrl won't work by default without it). + */ +#define wxUSE_GSTREAMER 0 + +// ---------------------------------------------------------------------------- +// Mac-specific settings +// ---------------------------------------------------------------------------- + +#undef wxUSE_GRAPHICS_CONTEXT +#define wxUSE_GRAPHICS_CONTEXT 1 + + +// things not implemented under Mac + +#undef wxUSE_STACKWALKER +#define wxUSE_STACKWALKER 0 + +// wxWebKit is a wrapper for Apple's WebKit framework, use it if you want to +// embed the Safari browser control +// 0 by default because of Jaguar compatibility problems +#define wxUSE_WEBKIT 1 + + +// Set to 0 for no libmspack +#define wxUSE_LIBMSPACK 0 + +// native toolbar does support embedding controls, but not complex panels, please test +#define wxOSX_USE_NATIVE_TOOLBAR 1 + +// make sure we have the proper dispatcher for the console event loop +#define wxUSE_SELECT_DISPATCHER 1 +#define wxUSE_EPOLL_DISPATCHER 0 + + +#endif + // _WX_SETUP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/slider.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/slider.h new file mode 100644 index 0000000000..bd99512dca --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/slider.h @@ -0,0 +1,109 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/slider.h +// Purpose: wxSlider class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SLIDER_H_ +#define _WX_SLIDER_H_ + +#include "wx/control.h" +#include "wx/slider.h" +#include "wx/stattext.h" + +// Slider +class WXDLLIMPEXP_CORE wxSlider: public wxSliderBase +{ + DECLARE_DYNAMIC_CLASS(wxSlider) + +public: + wxSlider(); + + inline wxSlider(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr) + { + Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name); + } + + virtual ~wxSlider(); + + bool Create(wxWindow *parent, wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr); + + virtual int GetValue() const ; + virtual void SetValue(int); + + void SetRange(int minValue, int maxValue); + + inline int GetMin() const { return m_rangeMin; } + inline int GetMax() const { return m_rangeMax; } + + void SetMin(int minValue) { SetRange(minValue, m_rangeMax); } + void SetMax(int maxValue) { SetRange(m_rangeMin, maxValue); } + + // For trackbars only + inline int GetTickFreq() const { return m_tickFreq; } + void SetPageSize(int pageSize); + int GetPageSize() const ; + void ClearSel() ; + void ClearTicks() ; + void SetLineSize(int lineSize); + int GetLineSize() const ; + int GetSelEnd() const ; + int GetSelStart() const ; + void SetSelection(int minPos, int maxPos); + void SetThumbLength(int len) ; + int GetThumbLength() const ; + void SetTick(int tickPos) ; + + void Command(wxCommandEvent& event); + // osx specific event handling common for all osx-ports + + virtual bool OSXHandleClicked( double timestampsec ); + virtual void TriggerScrollEvent( wxEventType scrollEvent ) ; + +protected: + // Platform-specific implementation of SetTickFreq + virtual void DoSetTickFreq(int freq); + + virtual wxSize DoGetBestSize() const; + virtual void DoSetSize(int x, int y, int w, int h, int sizeFlags); + virtual void DoMoveWindow(int x, int y, int w, int h); + + // set min/max size of the slider + virtual void DoSetSizeHints( int minW, int minH, + int maxW, int maxH, + int incW, int incH); + + // Common processing to invert slider values based on wxSL_INVERSE + virtual int ValueInvertOrNot(int value) const; + + wxStaticText* m_macMinimumStatic ; + wxStaticText* m_macMaximumStatic ; + wxStaticText* m_macValueStatic ; + + int m_rangeMin; + int m_rangeMax; + int m_pageSize; + int m_lineSize; + int m_tickFreq; +private : +DECLARE_EVENT_TABLE() +}; + +#endif + // _WX_SLIDER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/sound.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/sound.h new file mode 100644 index 0000000000..f406537927 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/sound.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/sound.h +// Purpose: wxSound class (loads and plays short Windows .wav files). +// Optional on non-Windows platforms. +// Author: Ryan Norton, Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Ryan Norton, Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SOUND_H_ +#define _WX_SOUND_H_ + +#if wxUSE_SOUND + +#include "wx/object.h" + +class WXDLLIMPEXP_FWD_ADV wxSoundTimer; + +class WXDLLIMPEXP_ADV wxSoundData +{ +public : + wxSoundData(); + virtual ~wxSoundData(); + + virtual bool Play(unsigned int flags) = 0; + // stops the sound and deletes the optional timer + virtual void Stop(); + // can be called by a timer for repeated tasks during playback + virtual void SoundTask(); + // mark this to be deleted + virtual void MarkForDeletion(); + virtual bool IsMarkedForDeletion() const { return m_markedForDeletion; } + + // does the true work of stopping and cleaning up + virtual void DoStop() = 0; +protected : + void CreateAndStartTimer(); + + unsigned int m_flags; + wxSoundTimer* m_pTimer; + bool m_markedForDeletion; +} ; + +class WXDLLIMPEXP_ADV wxSound : public wxSoundBase +{ +public: + wxSound(); + wxSound(const wxString& fileName, bool isResource = false); + wxSound(size_t size, const void* data); + virtual ~wxSound(); + + // Create from resource or file + bool Create(const wxString& fileName, bool isResource = false); + // Create from data + bool Create(size_t size, const void* data); + + bool IsOk() const { return m_data != NULL; } + + // Stop playing any sound + static void Stop(); + + // Returns true if a sound is being played + static bool IsPlaying(); + + // Notification when a sound has stopped + static void SoundStopped(const wxSoundData* data); + +protected: + bool DoPlay(unsigned flags) const; + void Init(); + +private: + // data of this object + class wxSoundData *m_data; + + wxDECLARE_NO_COPY_CLASS(wxSound); +}; + +#endif +#endif + // _WX_SOUND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/spinbutt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/spinbutt.h new file mode 100644 index 0000000000..b294851f96 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/spinbutt.h @@ -0,0 +1,76 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/spinbutt.h +// Purpose: wxSpinButton class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SPINBUTT_H_ +#define _WX_SPINBUTT_H_ + +#include "wx/control.h" +#include "wx/event.h" + +/* + 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 WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase +{ +public: + // construction + wxSpinButton(); + + wxSpinButton(wxWindow *parent, + wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, + const wxString& name = wxT("wxSpinButton")) + { + Create(parent, id, pos, size, style, name); + } + + virtual ~wxSpinButton(); + + bool Create(wxWindow *parent, + wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, + const wxString& name = wxT("wxSpinButton")); + + + // accessors + virtual void SetRange(int minVal, int maxVal); + virtual int GetValue() const ; + virtual void SetValue(int val); + + // implementation + + virtual void TriggerScrollEvent( wxEventType scrollEvent ) ; + + // osx specific event handling common for all osx-ports + + virtual bool OSXHandleClicked( double timestampsec ); + +protected: + void SendThumbTrackEvent() ; + + virtual wxSize DoGetBestSize() const; + +private: + DECLARE_DYNAMIC_CLASS(wxSpinButton) +}; + +#endif + // _WX_SPINBUTT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/srchctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/srchctrl.h new file mode 100644 index 0000000000..ee926cf5f4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/srchctrl.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/srchctrl.h +// Purpose: mac carbon wxSearchCtrl class +// Author: Vince Harron +// Created: 2006-02-19 +// Copyright: Vince Harron +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SEARCHCTRL_H_ +#define _WX_SEARCHCTRL_H_ + +#if wxUSE_SEARCHCTRL + +class wxSearchWidgetImpl; + +class WXDLLIMPEXP_CORE wxSearchCtrl : public wxSearchCtrlBase +{ +public: + // creation + // -------- + + wxSearchCtrl(); + wxSearchCtrl(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSearchCtrlNameStr); + + virtual ~wxSearchCtrl(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSearchCtrlNameStr); + + // get/set search button menu + // -------------------------- + virtual void SetMenu( wxMenu* menu ); + virtual wxMenu* GetMenu(); + + // get/set search options + // ---------------------- + virtual void ShowSearchButton( bool show ); + virtual bool IsSearchButtonVisible() const; + + virtual void ShowCancelButton( bool show ); + virtual bool IsCancelButtonVisible() const; + + // TODO: In 2.9 these should probably be virtual, and declared in the base class... + void SetDescriptiveText(const wxString& text); + wxString GetDescriptiveText() const; + + virtual bool HandleSearchFieldSearchHit() ; + virtual bool HandleSearchFieldCancelHit() ; + + wxSearchWidgetImpl * GetSearchPeer() const; + +protected: + + wxSize DoGetBestSize() const; + + void Init(); + + wxMenu *m_menu; + + wxString m_descriptiveText; + +private: + DECLARE_DYNAMIC_CLASS(wxSearchCtrl) + + DECLARE_EVENT_TABLE() +}; + +#endif // wxUSE_SEARCHCTRL + +#endif // _WX_SEARCHCTRL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statbmp.h new file mode 100644 index 0000000000..59bf91a8f0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statbmp.h @@ -0,0 +1,6 @@ +#if wxOSX_USE_CARBON +#include "wx/osx/carbon/statbmp.h" +#else +#define wxGenericStaticBitmap wxStaticBitmap +#include "wx/generic/statbmpg.h" +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statbox.h new file mode 100644 index 0000000000..5b5f049c58 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statbox.h @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/statbox.h +// Purpose: wxStaticBox class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATBOX_H_ +#define _WX_STATBOX_H_ + +#include "wx/control.h" + +// Group box +class WXDLLIMPEXP_CORE wxStaticBox: public wxControl +{ + DECLARE_DYNAMIC_CLASS(wxStaticBox) + + public: + inline wxStaticBox() {} + inline wxStaticBox(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBoxNameStr) + { + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBoxNameStr); + + virtual void Command(wxCommandEvent& WXUNUSED(event)) {} + virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {} + + virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; + + virtual bool AcceptsFocus() const { return false; } + + // protect native font of box + virtual bool SetFont( const wxFont &font ); +}; + +#endif + // _WX_STATBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statline.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statline.h new file mode 100644 index 0000000000..bd94398239 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statline.h @@ -0,0 +1,56 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/statline.h +// Purpose: a generic wxStaticLine class used for mac before adaptation +// Author: Vadim Zeitlin +// Created: 28.06.99 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_STATLINE_H_ +#define _WX_GENERIC_STATLINE_H_ + +class wxStaticBox; + +// ---------------------------------------------------------------------------- +// wxStaticLine +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase +{ +public: + // constructors and pseudo-constructors + wxStaticLine() : m_statbox(NULL) { } + + wxStaticLine( wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr ) + : m_statbox(NULL) + { + Create(parent, id, pos, size, style, name); + } + + bool Create( wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr ); + + // it's necessary to override this wxWindow function because we + // will want to return the main widget for m_statbox + // + WXWidget GetMainWidget() const; + +protected: + // we implement the static line using a static box + wxStaticBox *m_statbox; + + DECLARE_DYNAMIC_CLASS(wxStaticLine) +}; + +#endif // _WX_GENERIC_STATLINE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/stattext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/stattext.h new file mode 100644 index 0000000000..3b4b9b6637 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/stattext.h @@ -0,0 +1,57 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/stattext.h +// Purpose: wxStaticText class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATTEXT_H_ +#define _WX_STATTEXT_H_ + +class WXDLLIMPEXP_CORE wxStaticText: public wxStaticTextBase +{ +public: + wxStaticText() { } + + wxStaticText(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticTextNameStr) + { + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticTextNameStr); + + // accessors + void SetLabel( const wxString &str ) ; + bool SetFont( const wxFont &font ); + + virtual bool AcceptsFocus() const { return false; } + +protected : + + virtual wxString DoGetLabel() const; + virtual void DoSetLabel(const wxString& str); + + virtual wxSize DoGetBestSize() const ; + +#if wxUSE_MARKUP && wxOSX_USE_COCOA + virtual bool DoSetLabelMarkup(const wxString& markup); +#endif // wxUSE_MARKUP && wxOSX_USE_COCOA + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticText) +}; + +#endif + // _WX_STATTEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statusbr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statusbr.h new file mode 100644 index 0000000000..74ae67758c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/statusbr.h @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/statusbr.h +// Purpose: native implementation of wxStatusBar. +// Optional: can use generic version instead. +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATBAR_H_ +#define _WX_STATBAR_H_ + +class WXDLLIMPEXP_CORE wxStatusBarMac : public wxStatusBarGeneric +{ +public: + wxStatusBarMac(); + wxStatusBarMac(wxWindow *parent, wxWindowID id = wxID_ANY, + long style = wxSTB_DEFAULT_STYLE, + const wxString& name = wxStatusBarNameStr); + + virtual ~wxStatusBarMac(); + + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, + long style = wxSTB_DEFAULT_STYLE, + const wxString& name = wxStatusBarNameStr); + + // Implementation + virtual void MacHiliteChanged(); + void OnPaint(wxPaintEvent& event); + +protected: + virtual void DrawFieldText(wxDC& dc, const wxRect& rc, int i, int textHeight); + virtual void DrawField(wxDC& dc, int i, int textHeight); + virtual void DoUpdateStatusText(int number = 0); + + DECLARE_DYNAMIC_CLASS(wxStatusBarMac) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_STATBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/taskbarosx.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/taskbarosx.h new file mode 100644 index 0000000000..7d13df747e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/taskbarosx.h @@ -0,0 +1,43 @@ +///////////////////////////////////////////////////////////////////////// +// File: wx/mac/taskbarosx.h +// Purpose: Defines wxTaskBarIcon class for OSX +// Author: Ryan Norton +// Modified by: +// Created: 04/04/2003 +// Copyright: (c) Ryan Norton, 2003 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////// + +#ifndef _TASKBAR_H_ +#define _TASKBAR_H_ + +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxMenu; + +class WXDLLIMPEXP_ADV wxTaskBarIcon : public wxTaskBarIconBase +{ + DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon) +public: + wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE); + virtual ~wxTaskBarIcon(); + + // returns true if the taskbaricon is in the global menubar +#if wxOSX_USE_COCOA + bool OSXIsStatusItem(); +#else + bool OSXIsStatusItem() { return false; } +#endif + bool IsOk() const { return true; } + + bool IsIconInstalled() const; + bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString); + bool RemoveIcon(); + bool PopupMenu(wxMenu *menu); + +protected: + wxTaskBarIconType m_type; + class wxTaskBarIconImpl* m_impl; + friend class wxTaskBarIconImpl; +}; +#endif + // _TASKBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/textctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/textctrl.h new file mode 100644 index 0000000000..a52620b5c7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/textctrl.h @@ -0,0 +1,154 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/textctrl.h +// Purpose: wxTextCtrl class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTCTRL_H_ +#define _WX_TEXTCTRL_H_ + +#if wxUSE_SYSTEM_OPTIONS + // set this to 'true' if you want to use the 'classic' MLTE-based implementation + // instead of the HIView-based implementation in 10.3 and upwards, the former + // has more features (backgrounds etc.), but may show redraw artefacts and other + // problems depending on your usage; hence, the default is 'false'. + #define wxMAC_TEXTCONTROL_USE_MLTE wxT("mac.textcontrol-use-mlte") + // set this to 'true' if you want editable text controls to have spell checking turned + // on by default, you can change this setting individually on a control using MacCheckSpelling + #define wxMAC_TEXTCONTROL_USE_SPELL_CHECKER wxT("mac.textcontrol-use-spell-checker") +#endif + +#include "wx/control.h" +#include "wx/textctrl.h" + +class WXDLLIMPEXP_CORE wxTextCtrl: public wxTextCtrlBase +{ + DECLARE_DYNAMIC_CLASS(wxTextCtrl) + +public: + wxTextCtrl() + { Init(); } + + wxTextCtrl(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr) + { + Init(); + Create(parent, id, value, pos, size, style, validator, name); + } + + virtual ~wxTextCtrl(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr); + + // accessors + // --------- + + virtual int GetLineLength(long lineNo) const; + virtual wxString GetLineText(long lineNo) const; + virtual int GetNumberOfLines() const; + + virtual bool IsModified() const; + + // operations + // ---------- + + + // sets/clears the dirty flag + virtual void MarkDirty(); + virtual void DiscardEdits(); + + // text control under some platforms supports the text styles: these + // methods apply the given text style to the given selection or to + // set/get the style which will be used for all appended text + virtual bool SetFont( const wxFont &font ); + virtual bool GetStyle(long position, wxTextAttr& style); + virtual bool SetStyle(long start, long end, const wxTextAttr& style); + virtual bool SetDefaultStyle(const wxTextAttr& style); + + // translate between the position (which is just an index into the textctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent column and line. + virtual long XYToPosition(long x, long y) const; + virtual bool PositionToXY(long pos, long *x, long *y) const; + + virtual void ShowPosition(long pos); + + // overrides so that we can send text updated events + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + // Implementation + // -------------- + virtual void Command(wxCommandEvent& event); + + virtual bool AcceptsFocus() const; + + // callbacks + void OnDropFiles(wxDropFilesEvent& event); + void OnChar(wxKeyEvent& event); // Process 'enter' if required + void OnKeyDown(wxKeyEvent& event); // Process clipboard shortcuts + + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + void OnDelete(wxCommandEvent& event); + void OnSelectAll(wxCommandEvent& event); + + void OnUpdateCut(wxUpdateUIEvent& event); + void OnUpdateCopy(wxUpdateUIEvent& event); + void OnUpdatePaste(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + void OnUpdateDelete(wxUpdateUIEvent& event); + void OnUpdateSelectAll(wxUpdateUIEvent& event); + + void OnContextMenu(wxContextMenuEvent& event); + + virtual bool MacSetupCursor( const wxPoint& pt ); + + virtual void MacVisibilityChanged(); + virtual void MacSuperChangedPosition(); + virtual void MacCheckSpelling(bool check); + +protected: + // common part of all ctors + void Init(); + + virtual wxSize DoGetBestSize() const; + + // flag is set to true when the user edits the controls contents + bool m_dirty; + + virtual void EnableTextChangedEvents(bool WXUNUSED(enable)) + { + // nothing to do here as the events are never generated when we change + // the controls value programmatically anyhow + } + +private : + wxMenu *m_privateContextMenu; + + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_TEXTCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/textentry.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/textentry.h new file mode 100644 index 0000000000..12d780778a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/textentry.h @@ -0,0 +1,113 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/textentry.h +// Purpose: wxTextEntry class +// Author: Stefan Csomor +// Modified by: Kevin Ollivier +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_TEXTENTRY_H_ +#define _WX_OSX_TEXTENTRY_H_ + +#if wxUSE_SYSTEM_OPTIONS + // set this to 'true' if you want to use the 'classic' MLTE-based implementation + // instead of the HIView-based implementation in 10.3 and upwards, the former + // has more features (backgrounds etc.), but may show redraw artefacts and other + // problems depending on your usage; hence, the default is 'false'. + #define wxMAC_TEXTCONTROL_USE_MLTE wxT("mac.textcontrol-use-mlte") + // set this to 'true' if you want editable text controls to have spell checking turned + // on by default, you can change this setting individually on a control using MacCheckSpelling + #define wxMAC_TEXTCONTROL_USE_SPELL_CHECKER wxT("mac.textcontrol-use-spell-checker") +#endif + +#include "wx/control.h" + +// forward decl for wxListWidgetImpl implementation type. +class WXDLLIMPEXP_FWD_CORE wxTextWidgetImpl; + +class WXDLLIMPEXP_CORE wxTextEntry: public wxTextEntryBase +{ + +public: + wxTextEntry(); + virtual ~wxTextEntry(); + + virtual bool IsEditable() const; + + // If the return values from and to are the same, there is no selection. + virtual void GetSelection(long* from, long* to) const; + + // operations + // ---------- + + // editing + virtual void Clear(); + virtual void Remove(long from, long to); + + // set the max number of characters which may be entered + // in a single line text control + virtual void SetMaxLength(unsigned long len); + + // writing text inserts it at the current position; + // appending always inserts it at the end + virtual void WriteText(const wxString& text); + + // Clipboard operations + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + virtual bool CanCopy() const; + virtual bool CanCut() const; + virtual bool CanPaste() const; + + // Undo/redo + virtual void Undo(); + virtual void Redo(); + + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + // Insertion point + virtual void SetInsertionPoint(long pos); + virtual void SetInsertionPointEnd(); + virtual long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + + virtual void SetSelection(long from, long to); + virtual void SetEditable(bool editable); + + virtual bool SendMaxLenEvent(); + + // set the grayed out hint text + virtual bool SetHint(const wxString& hint); + virtual wxString GetHint() const; + + // Implementation + // -------------- + + virtual wxTextWidgetImpl * GetTextPeer() const; + wxTextCompleter *OSXGetCompleter() const { return m_completer; } + +protected: + + virtual wxString DoGetValue() const; + + virtual bool DoAutoCompleteStrings(const wxArrayString& choices); + virtual bool DoAutoCompleteCustom(wxTextCompleter *completer); + + // The object providing auto-completions or NULL if none. + wxTextCompleter *m_completer; + + bool m_editable; + + // need to make this public because of the current implementation via callbacks + unsigned long m_maxLength; + +private: + wxString m_hintString; +}; + +#endif // _WX_OSX_TEXTENTRY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/tglbtn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/tglbtn.h new file mode 100644 index 0000000000..eaa48e8b81 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/tglbtn.h @@ -0,0 +1,85 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/tglbtn.h +// Purpose: Declaration of the wxToggleButton class, which implements a +// toggle button under wxMac. +// Author: Stefan Csomor +// Modified by: +// Created: 08.02.01 +// Copyright: (c) 2004 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOGGLEBUTTON_H_ +#define _WX_TOGGLEBUTTON_H_ + +class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase +{ +public: + wxToggleButton() {} + wxToggleButton(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + virtual void SetValue(bool value); + virtual bool GetValue() const ; + + virtual bool OSXHandleClicked( double timestampsec ); + + virtual void Command(wxCommandEvent& event); + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton) +}; + + +class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButton +{ +public: + wxBitmapToggleButton() {} + wxBitmapToggleButton(wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton) +}; + +#endif // _WX_TOGGLEBUTTON_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/timectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/timectrl.h new file mode 100644 index 0000000000..6673fcce38 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/timectrl.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/timectrl.h +// Purpose: Declaration of wxOSX-specific wxTimePickerCtrl class. +// Author: Vadim Zeitlin +// Created: 2011-12-18 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_TIMECTRL_H_ +#define _WX_OSX_TIMECTRL_H_ + +// ---------------------------------------------------------------------------- +// wxTimePickerCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxTimePickerCtrl : public wxTimePickerCtrlBase +{ +public: + // Constructors. + wxTimePickerCtrl() { } + + wxTimePickerCtrl(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTP_DEFAULT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTimePickerCtrlNameStr) + { + Create(parent, id, dt, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTP_DEFAULT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTimePickerCtrlNameStr); + + virtual void OSXGenerateEvent(const wxDateTime& dt); + +private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTimePickerCtrl); +}; + +#endif // _WX_OSX_TIMECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/toolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/toolbar.h new file mode 100644 index 0000000000..2cbd0d7c6a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/toolbar.h @@ -0,0 +1,130 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/toolbar.h +// Purpose: wxToolBar class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOOLBAR_H_ +#define _WX_TOOLBAR_H_ + +#if wxUSE_TOOLBAR + +#include "wx/tbarbase.h" +#include "wx/dynarray.h" + +class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase +{ + DECLARE_DYNAMIC_CLASS(wxToolBar) + public: + /* + * Public interface + */ + + wxToolBar() { Init(); } + + inline wxToolBar(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr) + { + Init(); + Create(parent, id, pos, size, style, name); + } + virtual ~wxToolBar(); + + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr); + + virtual void SetWindowStyleFlag(long style); + + virtual bool Destroy(); + + // override/implement base class virtuals + virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const; + +#ifndef __WXOSX_IPHONE__ + virtual bool Show(bool show = true); + virtual bool IsShown() const; +#endif + virtual bool Realize(); + + virtual void SetToolBitmapSize(const wxSize& size); + virtual wxSize GetToolSize() const; + + virtual void SetRows(int nRows); + + virtual void SetToolNormalBitmap(int id, const wxBitmap& bitmap); + virtual void SetToolDisabledBitmap(int id, const wxBitmap& bitmap); + +#ifndef __WXOSX_IPHONE__ + // Add all the buttons + + virtual wxString MacGetToolTipString( wxPoint &where ) ; + void OnPaint(wxPaintEvent& event) ; + void OnMouse(wxMouseEvent& event) ; + virtual void MacSuperChangedPosition() ; +#endif + +#if wxOSX_USE_NATIVE_TOOLBAR + // make all tools selectable + void OSXSetSelectableTools(bool set); + void OSXSelectTool(int toolId); + + bool MacInstallNativeToolbar(bool usesNative); + void MacUninstallNativeToolbar(); + bool MacWantsNativeToolbar(); + bool MacTopLevelHasNativeToolbar(bool *ownToolbarInstalled) const; +#endif + + virtual wxToolBarToolBase *CreateTool(int id, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled = wxNullBitmap, + wxItemKind kind = wxITEM_NORMAL, + wxObject *clientData = NULL, + const wxString& shortHelp = wxEmptyString, + const wxString& longHelp = wxEmptyString); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); + +protected: + // common part of all ctors + void Init(); + + void DoLayout(); + + void DoSetSize(int x, int y, int width, int height, int sizeFlags); + +#ifndef __WXOSX_IPHONE__ + virtual void DoGetSize(int *width, int *height) const; + virtual wxSize DoGetBestSize() const; +#endif +#ifdef __WXOSX_COCOA__ + virtual void DoGetPosition(int*x, int *y) const; +#endif + virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); + virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); + + virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable); + virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle); + virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); + + DECLARE_EVENT_TABLE() +#if wxOSX_USE_NATIVE_TOOLBAR + bool m_macUsesNativeToolbar ; + void* m_macToolbar ; +#endif +#ifdef __WXOSX_IPHONE__ + WX_UIView m_macToolbar; +#endif +}; + +#endif // wxUSE_TOOLBAR + +#endif + // _WX_TOOLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/tooltip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/tooltip.h new file mode 100644 index 0000000000..f05122ba00 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/tooltip.h @@ -0,0 +1,57 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/tooltip.h +// Purpose: wxToolTip class - tooltip control +// Author: Stefan Csomor +// Modified by: +// Created: 31.01.99 +// Copyright: (c) 1999 Robert Roebling, Vadim Zeitlin, Stefan Csomor +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MAC_TOOLTIP_H_ +#define _WX_MAC_TOOLTIP_H_ + +#include "wx/string.h" +#include "wx/event.h" + +class WXDLLIMPEXP_CORE wxToolTip : public wxObject +{ +public: + // ctor & dtor + wxToolTip(const wxString &tip); + virtual ~wxToolTip(); + + // accessors + // tip text + void SetTip(const wxString& tip); + const wxString& GetTip() const { return m_text; } + + // the window we're associated with + void SetWindow(wxWindow *win); + wxWindow *GetWindow() const { return m_window; } + + // controlling tooltip behaviour: globally change tooltip parameters + // enable or disable the tooltips globally + static void Enable(bool flag); + // set the delay after which the tooltip appears + static void SetDelay(long milliseconds); + // set the delay after which the tooltip disappears or how long the tooltip remains visible + static void SetAutoPop(long milliseconds); + // set the delay between subsequent tooltips to appear + static void SetReshow(long milliseconds); + static void NotifyWindowDelete( WXHWND win ) ; + + // implementation only from now on + // ------------------------------- + + // should be called in response to mouse events + static void RelayEvent(wxWindow *win , wxMouseEvent &event); + static void RemoveToolTips(); + +private: + wxString m_text; // tooltip text + wxWindow *m_window; // window we're associated with + DECLARE_ABSTRACT_CLASS(wxToolTip) +}; + +#endif // _WX_MAC_TOOLTIP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/toplevel.h new file mode 100644 index 0000000000..73b218fe75 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/toplevel.h @@ -0,0 +1,98 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/toplevel.h +// Purpose: wxTopLevelWindowMac is the Mac implementation of wxTLW +// Author: Stefan Csomor +// Modified by: +// Created: 20.09.01 +// Copyright: (c) 2001 Stefan Csomor +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_TOPLEVEL_H_ +#define _WX_MSW_TOPLEVEL_H_ + +// ---------------------------------------------------------------------------- +// wxTopLevelWindowMac +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTopLevelWindowMac : public wxTopLevelWindowBase +{ +public: + // constructors and such + wxTopLevelWindowMac() { Init(); } + + wxTopLevelWindowMac(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, style, name); + } + + virtual ~wxTopLevelWindowMac(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + bool Create(wxWindow *parent, WXWindow nativeWindow); + + virtual bool Destroy(); + + virtual wxPoint GetClientAreaOrigin() const; + + // Attracts the users attention to this window if the application is + // inactive (should be called when a background event occurs) + virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); + + // implement base class pure virtuals + virtual void Maximize(bool maximize = true); + virtual bool IsMaximized() const; + virtual void Iconize(bool iconize = true); + virtual bool IsIconized() const; + virtual void Restore(); + + virtual bool IsActive(); + + virtual void ShowWithoutActivating(); + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) ; + virtual bool IsFullScreen() const ; + + // implementation from now on + // -------------------------- + + virtual void SetTitle( const wxString& title); + virtual wxString GetTitle() const; + + virtual void SetLabel(const wxString& label) { SetTitle( label ); } + virtual wxString GetLabel() const { return GetTitle(); } + + virtual void OSXSetModified(bool modified); + virtual bool OSXIsModified() const; + + virtual void SetRepresentedFilename(const wxString& filename); + +protected: + // common part of all ctors + void Init(); + + // is the frame currently iconized? + bool m_iconized; + + // should the frame be maximized when it will be shown? set by Maximize() + // when it is called while the frame is hidden + bool m_maximizeOnShow; +private : + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_MSW_TOPLEVEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/treectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/treectrl.h new file mode 100644 index 0000000000..587325b85a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/treectrl.h @@ -0,0 +1,306 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/treectrl.h +// Purpose: wxTreeCtrl class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TREECTRL_H_ +#define _WX_TREECTRL_H_ + +#include "wx/control.h" +#include "wx/event.h" +#include "wx/imaglist.h" + +#define wxTREE_MASK_HANDLE 0x0001 +#define wxTREE_MASK_STATE 0x0002 +#define wxTREE_MASK_TEXT 0x0004 +#define wxTREE_MASK_IMAGE 0x0008 +#define wxTREE_MASK_SELECTED_IMAGE 0x0010 +#define wxTREE_MASK_CHILDREN 0x0020 +#define wxTREE_MASK_DATA 0x0040 + +#define wxTREE_STATE_BOLD 0x0001 +#define wxTREE_STATE_DROPHILITED 0x0002 +#define wxTREE_STATE_EXPANDED 0x0004 +#define wxTREE_STATE_EXPANDEDONCE 0x0008 +#define wxTREE_STATE_FOCUSED 0x0010 +#define wxTREE_STATE_SELECTED 0x0020 +#define wxTREE_STATE_CUT 0x0040 + +#define wxTREE_HITTEST_ABOVE 0x0001 // Above the client area. +#define wxTREE_HITTEST_BELOW 0x0002 // Below the client area. +#define wxTREE_HITTEST_NOWHERE 0x0004 // In the client area but below the last item. +#define wxTREE_HITTEST_ONITEMBUTTON 0x0010 // On the button associated with an item. +#define wxTREE_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item. +#define wxTREE_HITTEST_ONITEMINDENT 0x0040 // In the indentation associated with an item. +#define wxTREE_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item. +#define wxTREE_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item. +#define wxTREE_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state. +#define wxTREE_HITTEST_TOLEFT 0x0400 // To the right of the client area. +#define wxTREE_HITTEST_TORIGHT 0x0800 // To the left of the client area. + +#define wxTREE_HITTEST_ONITEM (wxTREE_HITTEST_ONITEMICON | wxTREE_HITTEST_ONITEMLABEL | wxTREE_HITTEST_ONITEMSTATEICON) + +// Flags for GetNextItem +enum { + wxTREE_NEXT_CARET, // Retrieves the currently selected item. + wxTREE_NEXT_CHILD, // Retrieves the first child item. The hItem parameter must be NULL. + wxTREE_NEXT_DROPHILITE, // Retrieves the item that is the target of a drag-and-drop operation. + wxTREE_NEXT_FIRSTVISIBLE, // Retrieves the first visible item. + wxTREE_NEXT_NEXT, // Retrieves the next sibling item. + wxTREE_NEXT_NEXTVISIBLE, // Retrieves the next visible item that follows the specified item. + wxTREE_NEXT_PARENT, // Retrieves the parent of the specified item. + wxTREE_NEXT_PREVIOUS, // Retrieves the previous sibling item. + wxTREE_NEXT_PREVIOUSVISIBLE, // Retrieves the first visible item that precedes the specified item. + wxTREE_NEXT_ROOT // Retrieves the first child item of the root item of which the specified item is a part. +}; + +#if WXWIN_COMPATIBILITY_2_6 + // Flags for InsertItem + enum { + wxTREE_INSERT_LAST = -1, + wxTREE_INSERT_FIRST = -2, + wxTREE_INSERT_SORT = -3 + }; +#endif + +class WXDLLIMPEXP_CORE wxTreeItem: public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxTreeItem) + +public: + + long m_mask; + long m_itemId; + long m_state; + long m_stateMask; + wxString m_text; + int m_image; + int m_selectedImage; + int m_children; + long m_data; + + wxTreeItem(); + +// Accessors + inline long GetMask() const { return m_mask; } + inline long GetItemId() const { return m_itemId; } + inline long GetState() const { return m_state; } + inline long GetStateMask() const { return m_stateMask; } + inline wxString GetText() const { return m_text; } + inline int GetImage() const { return m_image; } + inline int GetSelectedImage() const { return m_selectedImage; } + inline int GetChildren() const { return m_children; } + inline long GetData() const { return m_data; } + + inline void SetMask(long mask) { m_mask = mask; } + inline void SetItemId(long id) { m_itemId = m_itemId = id; } + inline void SetState(long state) { m_state = state; } + inline void SetStateMask(long stateMask) { m_stateMask = stateMask; } + inline void GetText(const wxString& text) { m_text = text; } + inline void SetImage(int image) { m_image = image; } + inline void GetSelectedImage(int selImage) { m_selectedImage = selImage; } + inline void SetChildren(int children) { m_children = children; } + inline void SetData(long data) { m_data = data; } +}; + +class WXDLLIMPEXP_CORE wxTreeCtrl: public wxControl +{ +public: + /* + * Public interface + */ + + // creation + // -------- + wxTreeCtrl(); + + inline wxTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = "wxTreeCtrl") + { + Create(parent, id, pos, size, style, validator, name); + } + virtual ~wxTreeCtrl(); + + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = "wxTreeCtrl"); + + // accessors + // --------- + // + virtual unsigned int GetCount() const; + + // indent + int GetIndent() const; + void SetIndent(int indent); + // image list + wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const; + + // navigation inside the tree + long GetNextItem(long item, int code) const; + bool ItemHasChildren(long item) const; + long GetChild(long item) const; + long GetItemParent(long item) const; + long GetFirstVisibleItem() const; + long GetNextVisibleItem(long item) const; + long GetSelection() const; + long GetRootItem() const; + + // generic function for (g|s)etting item attributes + bool GetItem(wxTreeItem& info) const; + bool SetItem(wxTreeItem& info); + // item state + int GetItemState(long item, long stateMask) const; + bool SetItemState(long item, long state, long stateMask); + // item image + bool SetItemImage(long item, int image, int selImage); + // item text + wxString GetItemText(long item) const; + void SetItemText(long item, const wxString& str); + // custom data associated with the item + long GetItemData(long item) const; + bool SetItemData(long item, long data); + // convenience function + bool IsItemExpanded(long item) + { + return (GetItemState(item, wxTREE_STATE_EXPANDED) & + wxTREE_STATE_EXPANDED) != 0; + } + + // bounding rect + bool GetItemRect(long item, wxRect& rect, bool textOnly = false) const; + // + wxTextCtrl* GetEditControl() const; + + // operations + // ---------- + // adding/deleting items + bool DeleteItem(long item); + +#if WXWIN_COMPATIBILITY_2_6 + wxDEPRECATED( long InsertItem(long parent, wxTreeItem& info, + long insertAfter = wxTREE_INSERT_LAST) ); + // If image > -1 and selImage == -1, the same image is used for + // both selected and unselected items. + wxDEPRECATED( long InsertItem(long parent, const wxString& label, + int image = -1, int selImage = -1, + long insertAfter = wxTREE_INSERT_LAST) ); + + // use Expand, Collapse, CollapseAndReset or Toggle + wxDEPRECATED( bool ExpandItem(long item, int action) ); + wxDEPRECATED( void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL) ); +#endif // WXWIN_COMPATIBILITY_2_6 + + // changing item state + bool ExpandItem(long item) { return ExpandItem(item, wxTREE_EXPAND_EXPAND); } + bool CollapseItem(long item) { return ExpandItem(item, wxTREE_EXPAND_COLLAPSE); } + bool ToggleItem(long item) { return ExpandItem(item, wxTREE_EXPAND_TOGGLE); } + + // + bool SelectItem(long item); + bool ScrollTo(long item); + bool DeleteAllItems(); + + // Edit the label (tree must have the focus) + wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl)); + + // End label editing, optionally cancelling the edit + bool EndEditLabel(bool cancel); + + long HitTest(const wxPoint& point, int& flags); + // wxImageList *CreateDragImage(long item); + bool SortChildren(long item); + bool EnsureVisible(long item); + + void Command(wxCommandEvent& event) { ProcessCommand(event); } + +protected: + wxTextCtrl* m_textCtrl; + wxImageList* m_imageListNormal; + wxImageList* m_imageListState; + + DECLARE_DYNAMIC_CLASS(wxTreeCtrl) +}; + +/* + wxEVT_TREE_BEGIN_DRAG, + wxEVT_TREE_BEGIN_RDRAG, + wxEVT_TREE_BEGIN_LABEL_EDIT, + wxEVT_TREE_END_LABEL_EDIT, + wxEVT_TREE_DELETE_ITEM, + wxEVT_TREE_GET_INFO, + wxEVT_TREE_SET_INFO, + wxEVT_TREE_ITEM_EXPANDED, + wxEVT_TREE_ITEM_EXPANDING, + wxEVT_TREE_ITEM_COLLAPSED, + wxEVT_TREE_ITEM_COLLAPSING, + wxEVT_TREE_SEL_CHANGED, + wxEVT_TREE_SEL_CHANGING, + wxEVT_TREE_KEY_DOWN +*/ + +class WXDLLIMPEXP_CORE wxTreeEvent: public wxCommandEvent +{ + DECLARE_DYNAMIC_CLASS(wxTreeEvent) + +public: + wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0); + + int m_code; + wxTreeItem m_item; + long m_oldItem; + wxPoint m_pointDrag; + + inline long GetOldItem() const { return m_oldItem; } + inline wxTreeItem& GetItem() const { return (wxTreeItem&) m_item; } + inline wxPoint GetPoint() const { return m_pointDrag; } + inline int GetCode() const { return m_code; } +}; + +typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); + +#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_GET_INFO(id, fn) { wxEVT_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SET_INFO(id, fn) { wxEVT_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREE_BEGIN_DRAG wxEVT_TREE_BEGIN_DRAG +#define wxEVT_COMMAND_TREE_BEGIN_RDRAG wxEVT_TREE_BEGIN_RDRAG +#define wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT wxEVT_TREE_BEGIN_LABEL_EDIT +#define wxEVT_COMMAND_TREE_END_LABEL_EDIT wxEVT_TREE_END_LABEL_EDIT +#define wxEVT_COMMAND_TREE_DELETE_ITEM wxEVT_TREE_DELETE_ITEM +#define wxEVT_COMMAND_TREE_GET_INFO wxEVT_TREE_GET_INFO +#define wxEVT_COMMAND_TREE_SET_INFO wxEVT_TREE_SET_INFO +#define wxEVT_COMMAND_TREE_ITEM_EXPANDED wxEVT_TREE_ITEM_EXPANDED +#define wxEVT_COMMAND_TREE_ITEM_EXPANDING wxEVT_TREE_ITEM_EXPANDING +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSED wxEVT_TREE_ITEM_COLLAPSED +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSING wxEVT_TREE_ITEM_COLLAPSING +#define wxEVT_COMMAND_TREE_SEL_CHANGED wxEVT_TREE_SEL_CHANGED +#define wxEVT_COMMAND_TREE_SEL_CHANGING wxEVT_TREE_SEL_CHANGING +#define wxEVT_COMMAND_TREE_KEY_DOWN wxEVT_TREE_KEY_DOWN + +#endif + // _WX_TREECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/uma.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/uma.h new file mode 100644 index 0000000000..451f2f71f6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/uma.h @@ -0,0 +1,3 @@ +#if wxOSX_USE_CARBON +#include "wx/osx/carbon/uma.h" +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/webview_webkit.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/webview_webkit.h new file mode 100644 index 0000000000..803f8b0b29 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/webview_webkit.h @@ -0,0 +1,186 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/osx/webkit.h +// Purpose: wxWebViewWebKit - embeddable web kit control, +// OS X implementation of web view component +// Author: Jethro Grassie / Kevin Ollivier / Marianne Gagnon +// Modified by: +// Created: 2004-4-16 +// Copyright: (c) Jethro Grassie / Kevin Ollivier / Marianne Gagnon +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WEBKIT_H +#define _WX_WEBKIT_H + +#include "wx/setup.h" + +#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \ + || defined(__WXOSX_CARBON__)) + +#include "wx/control.h" +#include "wx/webview.h" + +#include "wx/osx/core/objcid.h" + +// ---------------------------------------------------------------------------- +// Web Kit Control +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_WEBVIEW wxWebViewWebKit : public wxWebView +{ +public: + wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit); + + wxWebViewWebKit() {} + wxWebViewWebKit(wxWindow *parent, + wxWindowID winID = wxID_ANY, + const wxString& strURL = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxWebViewNameStr) + { + Create(parent, winID, strURL, pos, size, style, name); + } + bool Create(wxWindow *parent, + wxWindowID winID = wxID_ANY, + const wxString& strURL = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxWebViewNameStr); + virtual ~wxWebViewWebKit(); + + virtual bool CanGoBack() const; + virtual bool CanGoForward() const; + virtual void GoBack(); + virtual void GoForward(); + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); + virtual void Stop(); + virtual wxString GetPageSource() const; + virtual wxString GetPageText() const; + + virtual void Print(); + + virtual void LoadURL(const wxString& url); + virtual wxString GetCurrentURL() const; + virtual wxString GetCurrentTitle() const; + virtual wxWebViewZoom GetZoom() const; + virtual void SetZoom(wxWebViewZoom zoom); + + virtual void SetZoomType(wxWebViewZoomType zoomType); + virtual wxWebViewZoomType GetZoomType() const; + virtual bool CanSetZoomType(wxWebViewZoomType type) const; + + virtual bool IsBusy() const { return m_busy; } + + //History functions + virtual void ClearHistory(); + virtual void EnableHistory(bool enable = true); + virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory(); + virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory(); + virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item); + + //Undo / redo functionality + virtual bool CanUndo() const; + virtual bool CanRedo() const; + virtual void Undo(); + virtual void Redo(); + + //Find function + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) + { + wxUnusedVar(text); + wxUnusedVar(flags); + return wxNOT_FOUND; + } + + //Clipboard functions + virtual bool CanCut() const { return true; } + virtual bool CanCopy() const { return true; } + virtual bool CanPaste() const { return true; } + virtual void Cut(); + virtual void Copy(); + virtual void Paste(); + + //Editing functions + virtual void SetEditable(bool enable = true); + virtual bool IsEditable() const; + + //Selection + virtual void DeleteSelection(); + virtual bool HasSelection() const; + virtual void SelectAll(); + virtual wxString GetSelectedText() const; + virtual wxString GetSelectedSource() const; + virtual void ClearSelection(); + + void RunScript(const wxString& javascript); + + //Virtual Filesystem Support + virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler); + + virtual void* GetNativeBackend() const { return m_webView; } + + // ---- methods not from the parent (common) interface + bool CanGetPageSource() const; + + void SetScrollPos(int pos); + int GetScrollPos(); + + bool CanIncreaseTextSize() const; + void IncreaseTextSize(); + bool CanDecreaseTextSize() const; + void DecreaseTextSize(); + + float GetWebkitZoom() const; + void SetWebkitZoom(float zoom); + + // don't hide base class virtuals + virtual void SetScrollPos( int orient, int pos, bool refresh = true ) + { return wxControl::SetScrollPos(orient, pos, refresh); } + virtual int GetScrollPos( int orient ) const + { return wxControl::GetScrollPos(orient); } + + //we need to resize the webview when the control size changes + void OnSize(wxSizeEvent &event); + void OnMove(wxMoveEvent &event); + void OnMouseEvents(wxMouseEvent &event); + + bool m_busy; + +protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + + DECLARE_EVENT_TABLE() + void MacVisibilityChanged(); + +private: + wxWindow *m_parent; + wxWindowID m_windowID; + wxString m_pageTitle; + + wxObjCID m_webView; + + // we may use this later to setup our own mouse events, + // so leave it in for now. + void* m_webKitCtrlEventHandler; + //It should be WebView*, but WebView is an Objective-C class + //TODO: look into using DECLARE_WXCOCOA_OBJC_CLASS rather than this. +}; + +class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryWebKit : public wxWebViewFactory +{ +public: + virtual wxWebView* Create() { return new wxWebViewWebKit; } + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { return new wxWebViewWebKit(parent, id, url, pos, size, style, name); } +}; + +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT + +#endif // _WX_WEBKIT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/webviewhistoryitem_webkit.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/webviewhistoryitem_webkit.h new file mode 100644 index 0000000000..f1c2d5f655 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/webviewhistoryitem_webkit.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/osx/webviewhistoryitem.h +// Purpose: wxWebViewHistoryItem header for OSX +// Author: Steven Lamerton +// Copyright: (c) 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_WEBVIEWHISTORYITEM_H_ +#define _WX_OSX_WEBVIEWHISTORYITEM_H_ + +#include "wx/setup.h" + +#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \ + || defined(__WXOSX_CARBON__)) + +#include "wx/osx/core/objcid.h" + +class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem +{ +public: + wxWebViewHistoryItem(const wxString& url, const wxString& title) : + m_url(url), m_title(title) {} + wxString GetUrl() { return m_url; } + wxString GetTitle() { return m_title; } + + friend class wxWebViewWebKit; + +private: + wxString m_url, m_title; + wxObjCID m_histItem; +}; + +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT + +#endif // _WX_OSX_WEBVIEWHISTORYITEM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/window.h new file mode 100644 index 0000000000..623493aa1e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/osx/window.h @@ -0,0 +1,403 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/window.h +// Purpose: wxWindowMac class +// Author: Stefan Csomor +// Modified by: +// Created: 1998-01-01 +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WINDOW_H_ +#define _WX_WINDOW_H_ + +#include "wx/brush.h" +#include "wx/dc.h" + +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxScrollBar; +class WXDLLIMPEXP_FWD_CORE wxPanel; +class WXDLLIMPEXP_FWD_CORE wxNonOwnedWindow; + +#if wxOSX_USE_CARBON + class WXDLLIMPEXP_FWD_CORE wxMacControl ; + typedef wxMacControl wxOSXWidgetImpl; +#elif wxOSX_USE_COCOA_OR_IPHONE + class WXDLLIMPEXP_FWD_CORE wxWidgetImpl ; + typedef wxWidgetImpl wxOSXWidgetImpl; +#endif + + +class WXDLLIMPEXP_CORE wxWindowMac: public wxWindowBase +{ + DECLARE_DYNAMIC_CLASS(wxWindowMac) + + friend class wxDC; + friend class wxPaintDC; + +public: + wxWindowMac(); + + wxWindowMac( wxWindowMac *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr ); + + virtual ~wxWindowMac(); + + bool Create( wxWindowMac *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr ); + + virtual void SendSizeEvent(int flags = 0); + + // implement base class pure virtuals + virtual void SetLabel( const wxString& label ); + virtual wxString GetLabel() const; + + virtual void Raise(); + virtual void Lower(); + + virtual bool Show( bool show = true ); + virtual bool ShowWithEffect(wxShowEffect effect, + unsigned timeout = 0) + { + return OSXShowWithEffect(true, effect, timeout); + } + virtual bool HideWithEffect(wxShowEffect effect, + unsigned timeout = 0) + { + return OSXShowWithEffect(false, effect, timeout); + } + + virtual bool IsShownOnScreen() const; + + virtual void SetFocus(); + + virtual void WarpPointer( int x, int y ); + + virtual void Refresh( bool eraseBackground = true, + const wxRect *rect = NULL ); + + virtual void Update() ; + virtual void ClearBackground(); + + virtual bool SetCursor( const wxCursor &cursor ); + virtual bool SetFont( const wxFont &font ); + virtual bool SetBackgroundColour( const wxColour &colour ); + virtual bool SetForegroundColour( const wxColour &colour ); + + virtual bool SetBackgroundStyle(wxBackgroundStyle style); + + virtual int GetCharHeight() const; + virtual int GetCharWidth() const; + +public: + virtual void SetScrollbar( int orient, int pos, int thumbVisible, + int range, bool refresh = true ); + virtual void SetScrollPos( int orient, int pos, bool refresh = true ); + virtual int GetScrollPos( int orient ) const; + virtual int GetScrollThumb( int orient ) const; + virtual int GetScrollRange( int orient ) const; + virtual void ScrollWindow( int dx, int dy, + const wxRect* rect = NULL ); + virtual void AlwaysShowScrollbars(bool horz = true, bool vert = true); + virtual bool IsScrollbarAlwaysShown(int orient) const + { + return orient == wxHORIZONTAL ? m_hScrollBarAlwaysShown + : m_vScrollBarAlwaysShown; + } + + virtual bool Reparent( wxWindowBase *newParent ); + +#if wxUSE_HOTKEY && wxOSX_USE_COCOA_OR_CARBON + // hot keys (system wide accelerators) + // ----------------------------------- + + virtual bool RegisterHotKey(int hotkeyId, int modifiers, int keycode); + virtual bool UnregisterHotKey(int hotkeyId); +#endif // wxUSE_HOTKEY + +#if wxUSE_DRAG_AND_DROP + virtual void SetDropTarget( wxDropTarget *dropTarget ); +#endif + + // Accept files for dragging + virtual void DragAcceptFiles( bool accept ); + + // implementation from now on + // -------------------------- + + void MacClientToRootWindow( int *x , int *y ) const; + + void MacWindowToRootWindow( int *x , int *y ) const; + + void MacRootWindowToWindow( int *x , int *y ) const; + + virtual wxString MacGetToolTipString( wxPoint &where ); + + // simple accessors + // ---------------- + + virtual WXWidget GetHandle() const; + + virtual bool SetTransparent(wxByte alpha); + virtual bool CanSetTransparent(); + virtual wxByte GetTransparent() const ; + + // event handlers + // -------------- + + void OnMouseEvent( wxMouseEvent &event ); + + void MacOnScroll( wxScrollEvent&event ); + + virtual bool AcceptsFocus() const; + + virtual bool IsDoubleBuffered() const { return true; } + +public: + static long MacRemoveBordersFromStyle( long style ) ; + +public: + // For implementation purposes: + // sometimes decorations make the client area smaller + virtual wxPoint GetClientAreaOrigin() const; + + wxWindowMac *FindItem(long id) const; + wxWindowMac *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const; + + virtual void TriggerScrollEvent( wxEventType scrollEvent ) ; + // this should not be overridden in classes above wxWindowMac + // because it is called from its destructor via DeleteChildren + virtual void RemoveChild( wxWindowBase *child ); + + virtual bool MacDoRedraw( long time ) ; + virtual void MacPaintChildrenBorders(); + virtual void MacPaintBorders( int left , int top ) ; + void MacPaintGrowBox(); + + // invalidates the borders and focus area around the control; + // must not be virtual as it will be called during destruction + void MacInvalidateBorders() ; + + WXWindow MacGetTopLevelWindowRef() const ; + wxNonOwnedWindow* MacGetTopLevelWindow() const ; + + virtual long MacGetWXBorderSize() const; + virtual long MacGetLeftBorderSize() const ; + virtual long MacGetRightBorderSize() const ; + virtual long MacGetTopBorderSize() const ; + virtual long MacGetBottomBorderSize() const ; + + virtual void MacSuperChangedPosition() ; + + // absolute coordinates of this window's root have changed + virtual void MacTopLevelWindowChangedPosition() ; + + virtual void MacChildAdded() ; + virtual void MacVisibilityChanged() ; + virtual void MacEnabledStateChanged() ; + virtual void MacHiliteChanged() ; + virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ; + + bool MacIsReallyEnabled() ; + bool MacIsReallyHilited() ; + +#if WXWIN_COMPATIBILITY_2_8 + bool MacIsUserPane(); +#endif + bool MacIsUserPane() const; + + virtual bool MacSetupCursor( const wxPoint& pt ) ; + + // return the rectangle that would be visible of this control, + // regardless whether controls are hidden + // only taking into account clipping by parent windows + const wxRect& MacGetClippedClientRect() const ; + const wxRect& MacGetClippedRect() const ; + const wxRect& MacGetClippedRectWithOuterStructure() const ; + + // returns the visible region of this control in window ie non-client coordinates + const wxRegion& MacGetVisibleRegion( bool includeOuterStructures = false ) ; + + // returns true if children have to clipped to the content area + // (e.g., scrolled windows) + bool MacClipChildren() const { return m_clipChildren ; } + void MacSetClipChildren( bool clip ) { m_clipChildren = clip ; } + + // returns true if the grandchildren need to be clipped to the children's content area + // (e.g., splitter windows) + virtual bool MacClipGrandChildren() const { return false ; } + bool MacIsWindowScrollbar( const wxWindow* sb ) const + { return ((wxWindow*)m_hScrollBar == sb || (wxWindow*)m_vScrollBar == sb) ; } + virtual bool IsClientAreaChild(const wxWindow *child) const + { + return !MacIsWindowScrollbar(child) && !((wxWindow*)m_growBox==child) && + wxWindowBase::IsClientAreaChild(child); + } + + void MacPostControlCreate(const wxPoint& pos, const wxSize& size) ; + wxList& GetSubcontrols() { return m_subControls; } + + // translate wxWidgets coords into ones suitable + // to be passed to CreateControl calls + // + // returns true if non-default coords are returned, false otherwise + bool MacGetBoundsForControl(const wxPoint& pos, + const wxSize& size, + int& x, int& y, + int& w, int& h , bool adjustForOrigin ) const ; + + // the 'true' OS level control for this wxWindow + wxOSXWidgetImpl* GetPeer() const; + + // optimization to avoid creating a user pane in wxWindow::Create if we already know + // we will replace it with our own peer + void DontCreatePeer(); + + // return true unless DontCreatePeer() had been called + bool ShouldCreatePeer() const; + + // sets the native implementation wrapper, can replace an existing peer, use peer = NULL to + // release existing peer + void SetPeer(wxOSXWidgetImpl* peer); + + // wraps the already existing peer with the wrapper + void SetWrappingPeer(wxOSXWidgetImpl* wrapper); + +#if wxOSX_USE_COCOA_OR_IPHONE + // the NSView or NSWindow of this window: can be used for both child and + // non-owned windows + // + // this is useful for a few Cocoa function which can work with either views + // or windows indiscriminately, e.g. for setting NSViewAnimationTargetKey + virtual void *OSXGetViewOrWindow() const; +#endif // Cocoa + + void * MacGetCGContextRef() { return m_cgContextRef ; } + void MacSetCGContextRef(void * cg) { m_cgContextRef = cg ; } + + // osx specific event handling common for all osx-ports + + virtual bool OSXHandleClicked( double timestampsec ); + virtual bool OSXHandleKeyEvent( wxKeyEvent& event ); + virtual void OSXSimulateFocusEvents(); + + bool IsNativeWindowWrapper() const { return m_isNativeWindowWrapper; } + + double GetContentScaleFactor() const ; + + // internal response to size events + virtual void MacOnInternalSize() {} + +protected: + // For controls like radio buttons which are genuinely composite + wxList m_subControls; + + // the peer object, allowing for cleaner API support + + void * m_cgContextRef ; + + // cache the clipped rectangles within the window hierarchy + void MacUpdateClippedRects() const ; + + mutable bool m_cachedClippedRectValid ; + mutable wxRect m_cachedClippedRectWithOuterStructure ; + mutable wxRect m_cachedClippedRect ; + mutable wxRect m_cachedClippedClientRect ; + mutable wxRegion m_cachedClippedRegionWithOuterStructure ; + mutable wxRegion m_cachedClippedRegion ; + mutable wxRegion m_cachedClippedClientRegion ; + + // insets of the mac control from the wx top left corner + wxPoint m_macTopLeftInset ; + wxPoint m_macBottomRightInset ; + wxByte m_macAlpha ; + + wxScrollBar* m_hScrollBar ; + wxScrollBar* m_vScrollBar ; + bool m_hScrollBarAlwaysShown; + bool m_vScrollBarAlwaysShown; + wxWindow* m_growBox ; + wxString m_label ; + + bool m_isNativeWindowWrapper; + + // set to true if we do a sharp clip at the content area of this window + // must be dynamic as eg a panel normally is not clipping precisely, but if + // it becomes the target window of a scrolled window it has to... + bool m_clipChildren ; + + virtual bool MacIsChildOfClientArea( const wxWindow* child ) const ; + + bool MacHasScrollBarCorner() const; + void MacCreateScrollBars( long style ) ; + void MacRepositionScrollBars() ; + void MacUpdateControlFont() ; + + // implement the base class pure virtuals + virtual void DoGetTextExtent(const wxString& string, + int *x, int *y, + int *descent = NULL, + int *externalLeading = NULL, + const wxFont *theFont = NULL ) const; + + virtual void DoEnable( bool enable ); +#if wxUSE_MENUS + virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); +#endif + + virtual void DoFreeze(); + virtual void DoThaw(); + + virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetSizeFromClientSize( const wxSize & size ) const; + virtual void DoClientToScreen( int *x, int *y ) const; + virtual void DoScreenToClient( int *x, int *y ) const; + virtual void DoGetPosition( int *x, int *y ) const; + virtual void DoGetSize( int *width, int *height ) const; + virtual void DoGetClientSize( int *width, int *height ) const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoSetClientSize(int width, int height); + + virtual void DoCaptureMouse(); + virtual void DoReleaseMouse(); + + // move the window to the specified location and resize it: this is called + // from both DoSetSize() and DoSetClientSize() and would usually just call + // ::MoveWindow() except for composite controls which will want to arrange + // themselves inside the given rectangle + virtual void DoMoveWindow( int x, int y, int width, int height ); + virtual void DoSetWindowVariant( wxWindowVariant variant ); + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip( wxToolTip *tip ); +#endif + + // common part of Show/HideWithEffect() + virtual bool OSXShowWithEffect(bool show, + wxShowEffect effect, + unsigned timeout); + +private: + wxOSXWidgetImpl * m_peer ; + // common part of all ctors + void Init(); + + // show/hide scrollbars as needed, common part of SetScrollbar() and + // AlwaysShowScrollbars() + void DoUpdateScrollbarVisibility(); + + wxDECLARE_NO_COPY_CLASS(wxWindowMac); + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_WINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/overlay.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/overlay.h new file mode 100644 index 0000000000..adde26db86 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/overlay.h @@ -0,0 +1,96 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/overlay.h +// Purpose: wxOverlay class +// Author: Stefan Csomor +// Modified by: +// Created: 2006-10-20 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OVERLAY_H_ +#define _WX_OVERLAY_H_ + +#include "wx/defs.h" + +#if defined(__WXMAC__) && wxOSX_USE_CARBON + #define wxHAS_NATIVE_OVERLAY 1 +#elif defined(__WXDFB__) + #define wxHAS_NATIVE_OVERLAY 1 +#else + // don't define wxHAS_NATIVE_OVERLAY +#endif + +// ---------------------------------------------------------------------------- +// creates an overlay over an existing window, allowing for manipulations like +// rubberbanding etc. This API is not stable yet, not to be used outside wx +// internal code +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxOverlayImpl; +class WXDLLIMPEXP_FWD_CORE wxDC; + +class WXDLLIMPEXP_CORE wxOverlay +{ +public: + wxOverlay(); + ~wxOverlay(); + + // clears the overlay without restoring the former state + // to be done eg when the window content has been changed and repainted + void Reset(); + + // returns (port-specific) implementation of the overlay + wxOverlayImpl *GetImpl() { return m_impl; } + +private: + friend class WXDLLIMPEXP_FWD_CORE wxDCOverlay; + + // returns true if it has been setup + bool IsOk(); + + void Init(wxDC* dc, int x , int y , int width , int height); + + void BeginDrawing(wxDC* dc); + + void EndDrawing(wxDC* dc); + + void Clear(wxDC* dc); + + wxOverlayImpl* m_impl; + + bool m_inDrawing; + + + wxDECLARE_NO_COPY_CLASS(wxOverlay); +}; + + +class WXDLLIMPEXP_CORE wxDCOverlay +{ +public: + // connects this overlay to the corresponding drawing dc, if the overlay is + // not initialized yet this call will do so + wxDCOverlay(wxOverlay &overlay, wxDC *dc, int x , int y , int width , int height); + + // convenience wrapper that behaves the same using the entire area of the dc + wxDCOverlay(wxOverlay &overlay, wxDC *dc); + + // removes the connection between the overlay and the dc + virtual ~wxDCOverlay(); + + // clears the layer, restoring the state at the last init + void Clear(); + +private: + void Init(wxDC *dc, int x , int y , int width , int height); + + wxOverlay& m_overlay; + + wxDC* m_dc; + + + wxDECLARE_NO_COPY_CLASS(wxDCOverlay); +}; + +#endif // _WX_OVERLAY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ownerdrw.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ownerdrw.h new file mode 100644 index 0000000000..b25f5cc71a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ownerdrw.h @@ -0,0 +1,144 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ownerdrw.h +// Purpose: interface for owner-drawn GUI elements +// Author: Vadim Zeitlin +// Modified by: Marcin Malich +// Created: 11.11.97 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OWNERDRW_H_BASE +#define _WX_OWNERDRW_H_BASE + +#include "wx/defs.h" + +#if wxUSE_OWNER_DRAWN + +#include "wx/font.h" +#include "wx/colour.h" + +class WXDLLIMPEXP_FWD_CORE wxDC; + +// ---------------------------------------------------------------------------- +// wxOwnerDrawn - a mix-in base class, derive from it to implement owner-drawn +// behaviour +// +// wxOwnerDrawn supports drawing of an item with non standard font, color and +// also supports 3 bitmaps: either a checked/unchecked bitmap for a checkable +// element or one unchangeable bitmap otherwise. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxOwnerDrawnBase +{ +public: + wxOwnerDrawnBase() + { + m_ownerDrawn = false; + m_margin = ms_defaultMargin; + } + + virtual ~wxOwnerDrawnBase() {} + + void SetFont(const wxFont& font) + { m_font = font; m_ownerDrawn = true; } + + wxFont& GetFont() const + { return (wxFont&) m_font; } + + + void SetTextColour(const wxColour& colText) + { m_colText = colText; m_ownerDrawn = true; } + + wxColour& GetTextColour() const + { return (wxColour&) m_colText; } + + void SetBackgroundColour(const wxColour& colBack) + { m_colBack = colBack; m_ownerDrawn = true; } + + wxColour& GetBackgroundColour() const + { return (wxColour&) m_colBack ; } + + + void SetMarginWidth(int width) + { m_margin = width; } + + int GetMarginWidth() const + { return m_margin; } + + static int GetDefaultMarginWidth() + { return ms_defaultMargin; } + + + // get item name (with mnemonics if exist) + virtual wxString GetName() const = 0; + + + // this function might seem strange, but if it returns false it means that + // no non-standard attribute are set, so there is no need for this control + // to be owner-drawn. Moreover, you can force owner-drawn to false if you + // want to change, say, the color for the item but only if it is owner-drawn + // (see wxMenuItem::wxMenuItem for example) + bool IsOwnerDrawn() const + { return m_ownerDrawn; } + + // switch on/off owner-drawing the item + void SetOwnerDrawn(bool ownerDrawn = true) + { m_ownerDrawn = ownerDrawn; } + + + // constants used in OnDrawItem + // (they have the same values as corresponding Win32 constants) + enum wxODAction + { + wxODDrawAll = 0x0001, // redraw entire control + wxODSelectChanged = 0x0002, // selection changed (see Status.Select) + wxODFocusChanged = 0x0004 // keyboard focus changed (see Status.Focus) + }; + + enum wxODStatus + { + wxODSelected = 0x0001, // control is currently selected + wxODGrayed = 0x0002, // item is to be grayed + wxODDisabled = 0x0004, // item is to be drawn as disabled + wxODChecked = 0x0008, // item is to be checked + wxODHasFocus = 0x0010, // item has the keyboard focus + wxODDefault = 0x0020, // item is the default item + wxODHidePrefix= 0x0100 // hide keyboard cues (w2k and xp only) + }; + + // virtual functions to implement drawing (return true if processed) + virtual bool OnMeasureItem(size_t *width, size_t *height); + virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat) = 0; + +protected: + + // get the font and colour to use, whether it is set or not + virtual void GetFontToUse(wxFont& font) const; + virtual void GetColourToUse(wxODStatus stat, wxColour& colText, wxColour& colBack) const; + +private: + bool m_ownerDrawn; // true if something is non standard + + wxFont m_font; // font to use for drawing + wxColour m_colText, // color ----"---"---"---- + m_colBack; // background color + + int m_margin; // space occupied by bitmap to the left of the item + + static int ms_defaultMargin; +}; + +// ---------------------------------------------------------------------------- +// include the platform-specific class declaration +// ---------------------------------------------------------------------------- + +#if defined(__WXMSW__) + #include "wx/msw/ownerdrw.h" +#elif defined(__WXPM__) + #include "wx/os2/ownerdrw.h" +#endif + +#endif // wxUSE_OWNER_DRAWN + +#endif // _WX_OWNERDRW_H_BASE diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/palette.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/palette.h new file mode 100644 index 0000000000..85bf7dd689 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/palette.h @@ -0,0 +1,44 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/palette.h +// Purpose: Common header and base class for wxPalette +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PALETTE_H_BASE_ +#define _WX_PALETTE_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_PALETTE + +#include "wx/object.h" +#include "wx/gdiobj.h" + +// wxPaletteBase +class WXDLLIMPEXP_CORE wxPaletteBase: public wxGDIObject +{ +public: + virtual ~wxPaletteBase() { } + + virtual int GetColoursCount() const { wxFAIL_MSG( wxT("not implemented") ); return 0; } +}; + +#if defined(__WXMSW__) + #include "wx/msw/palette.h" +#elif defined(__WXX11__) || defined(__WXMOTIF__) + #include "wx/x11/palette.h" +#elif defined(__WXGTK__) || defined(__WXCOCOA__) + #include "wx/generic/paletteg.h" +#elif defined(__WXMAC__) + #include "wx/osx/palette.h" +#elif defined(__WXPM__) + #include "wx/os2/palette.h" +#endif + +#endif // wxUSE_PALETTE + +#endif // _WX_PALETTE_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/panel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/panel.h new file mode 100644 index 0000000000..11fc2c6416 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/panel.h @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/panel.h +// Purpose: Base header for wxPanel +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PANEL_H_BASE_ +#define _WX_PANEL_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers and forward declarations +// ---------------------------------------------------------------------------- + +#include "wx/window.h" +#include "wx/containr.h" + +class WXDLLIMPEXP_FWD_CORE wxControlContainer; + +extern WXDLLIMPEXP_DATA_CORE(const char) wxPanelNameStr[]; + +// ---------------------------------------------------------------------------- +// wxPanel contains other controls and implements TAB traversal between them +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPanelBase : public wxNavigationEnabled<wxWindow> +{ +public: + wxPanelBase() { } + + // Derived classes should also provide this constructor: + /* + wxPanelBase(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, + const wxString& name = wxPanelNameStr); + */ + + // Pseudo ctor + bool Create(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, + const wxString& name = wxPanelNameStr); + + + // implementation from now on + // -------------------------- + + virtual void InitDialog(); + +private: + wxDECLARE_NO_COPY_CLASS(wxPanelBase); +}; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/panel.h" +#elif defined(__WXMSW__) + #include "wx/msw/panel.h" +#else + #define wxHAS_GENERIC_PANEL + #include "wx/generic/panelg.h" +#endif + +#endif // _WX_PANELH_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/paper.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/paper.h new file mode 100644 index 0000000000..d50d549804 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/paper.h @@ -0,0 +1,121 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/paper.h +// Purpose: Paper database types and classes +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PAPERH__ +#define _WX_PAPERH__ + +#include "wx/defs.h" +#include "wx/event.h" +#include "wx/cmndata.h" +#include "wx/intl.h" +#include "wx/hashmap.h" + +/* + * Paper type: see defs.h for wxPaperSize enum. + * A wxPrintPaperType can have an id and a name, or just a name and wxPAPER_NONE, + * so you can add further paper types without needing new ids. + */ + +#ifdef __WXMSW__ +#define WXADDPAPER(paperId, platformId, name, w, h) AddPaperType(paperId, platformId, name, w, h) +#else +#define WXADDPAPER(paperId, platformId, name, w, h) AddPaperType(paperId, 0, name, w, h) +#endif + +class WXDLLIMPEXP_CORE wxPrintPaperType: public wxObject +{ +public: + wxPrintPaperType(); + + // platformId is a platform-specific id, such as in Windows, DMPAPER_... + wxPrintPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h); + + inline wxString GetName() const { return wxGetTranslation(m_paperName); } + inline wxPaperSize GetId() const { return m_paperId; } + inline int GetPlatformId() const { return m_platformId; } + + // Get width and height in tenths of a millimetre + inline int GetWidth() const { return m_width; } + inline int GetHeight() const { return m_height; } + + // Get size in tenths of a millimetre + inline wxSize GetSize() const { return wxSize(m_width, m_height); } + + // Get size in a millimetres + inline wxSize GetSizeMM() const { return wxSize(m_width/10, m_height/10); } + + // Get width and height in device units (1/72th of an inch) + wxSize GetSizeDeviceUnits() const ; + +public: + wxPaperSize m_paperId; + int m_platformId; + int m_width; // In tenths of a millimetre + int m_height; // In tenths of a millimetre + wxString m_paperName; + +private: + DECLARE_DYNAMIC_CLASS(wxPrintPaperType) +}; + +WX_DECLARE_STRING_HASH_MAP(wxPrintPaperType*, wxStringToPrintPaperTypeHashMap); + +class WXDLLIMPEXP_FWD_CORE wxPrintPaperTypeList; + +class WXDLLIMPEXP_CORE wxPrintPaperDatabase +{ +public: + wxPrintPaperDatabase(); + ~wxPrintPaperDatabase(); + + void CreateDatabase(); + void ClearDatabase(); + + void AddPaperType(wxPaperSize paperId, const wxString& name, int w, int h); + void AddPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h); + + // Find by name + wxPrintPaperType *FindPaperType(const wxString& name); + + // Find by size id + wxPrintPaperType *FindPaperType(wxPaperSize id); + + // Find by platform id + wxPrintPaperType *FindPaperTypeByPlatformId(int id); + + // Find by size + wxPrintPaperType *FindPaperType(const wxSize& size); + + // Convert name to size id + wxPaperSize ConvertNameToId(const wxString& name); + + // Convert size id to name + wxString ConvertIdToName(wxPaperSize paperId); + + // Get the paper size + wxSize GetSize(wxPaperSize paperId); + + // Get the paper size + wxPaperSize GetSize(const wxSize& size); + + // + wxPrintPaperType* Item(size_t index) const; + size_t GetCount() const; +private: + wxStringToPrintPaperTypeHashMap* m_map; + wxPrintPaperTypeList* m_list; + // DECLARE_DYNAMIC_CLASS(wxPrintPaperDatabase) +}; + +extern WXDLLIMPEXP_DATA_CORE(wxPrintPaperDatabase*) wxThePrintPaperDatabase; + + +#endif + // _WX_PAPERH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/pen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/pen.h new file mode 100644 index 0000000000..e55b046eff --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/pen.h @@ -0,0 +1,164 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/pen.h +// Purpose: Base header for wxPen +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PEN_H_BASE_ +#define _WX_PEN_H_BASE_ + +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +enum wxPenStyle +{ + wxPENSTYLE_INVALID = -1, + + wxPENSTYLE_SOLID = wxSOLID, + wxPENSTYLE_DOT = wxDOT, + wxPENSTYLE_LONG_DASH = wxLONG_DASH, + wxPENSTYLE_SHORT_DASH = wxSHORT_DASH, + wxPENSTYLE_DOT_DASH = wxDOT_DASH, + wxPENSTYLE_USER_DASH = wxUSER_DASH, + + wxPENSTYLE_TRANSPARENT = wxTRANSPARENT, + + wxPENSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE, + wxPENSTYLE_STIPPLE_MASK = wxSTIPPLE_MASK, + wxPENSTYLE_STIPPLE = wxSTIPPLE, + + wxPENSTYLE_BDIAGONAL_HATCH = wxHATCHSTYLE_BDIAGONAL, + wxPENSTYLE_CROSSDIAG_HATCH = wxHATCHSTYLE_CROSSDIAG, + wxPENSTYLE_FDIAGONAL_HATCH = wxHATCHSTYLE_FDIAGONAL, + wxPENSTYLE_CROSS_HATCH = wxHATCHSTYLE_CROSS, + wxPENSTYLE_HORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL, + wxPENSTYLE_VERTICAL_HATCH = wxHATCHSTYLE_VERTICAL, + wxPENSTYLE_FIRST_HATCH = wxHATCHSTYLE_FIRST, + wxPENSTYLE_LAST_HATCH = wxHATCHSTYLE_LAST +}; + +enum wxPenJoin +{ + wxJOIN_INVALID = -1, + + wxJOIN_BEVEL = 120, + wxJOIN_MITER, + wxJOIN_ROUND +}; + +enum wxPenCap +{ + wxCAP_INVALID = -1, + + wxCAP_ROUND = 130, + wxCAP_PROJECTING, + wxCAP_BUTT +}; + + +class WXDLLIMPEXP_CORE wxPenBase : public wxGDIObject +{ +public: + virtual ~wxPenBase() { } + + virtual void SetColour(const wxColour& col) = 0; + virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) = 0; + + virtual void SetWidth(int width) = 0; + virtual void SetStyle(wxPenStyle style) = 0; + virtual void SetStipple(const wxBitmap& stipple) = 0; + virtual void SetDashes(int nb_dashes, const wxDash *dash) = 0; + virtual void SetJoin(wxPenJoin join) = 0; + virtual void SetCap(wxPenCap cap) = 0; + + virtual wxColour GetColour() const = 0; + virtual wxBitmap *GetStipple() const = 0; + virtual wxPenStyle GetStyle() const = 0; + virtual wxPenJoin GetJoin() const = 0; + virtual wxPenCap GetCap() const = 0; + virtual int GetWidth() const = 0; + virtual int GetDashes(wxDash **ptr) const = 0; + + // Convenient helpers for testing whether the pen is a transparent one: + // unlike GetStyle() == wxPENSTYLE_TRANSPARENT, they work correctly even if + // the pen is invalid (they both return false in this case). + bool IsTransparent() const + { + return IsOk() && GetStyle() == wxPENSTYLE_TRANSPARENT; + } + + bool IsNonTransparent() const + { + return IsOk() && GetStyle() != wxPENSTYLE_TRANSPARENT; + } +}; + +#if defined(__WXMSW__) + #include "wx/msw/pen.h" +#elif defined(__WXMOTIF__) || defined(__WXX11__) + #include "wx/x11/pen.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/pen.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/pen.h" +#elif defined(__WXDFB__) + #include "wx/dfb/pen.h" +#elif defined(__WXMAC__) + #include "wx/osx/pen.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/pen.h" +#elif defined(__WXPM__) + #include "wx/os2/pen.h" +#endif + +class WXDLLIMPEXP_CORE wxPenList: public wxGDIObjListBase +{ +public: + wxPen *FindOrCreatePen(const wxColour& colour, + int width = 1, + wxPenStyle style = wxPENSTYLE_SOLID); + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxPen *FindOrCreatePen(const wxColour& colour, int width, int style) + { return FindOrCreatePen(colour, width, (wxPenStyle)style); } +#endif +#if WXWIN_COMPATIBILITY_2_6 + wxDEPRECATED( void AddPen(wxPen*) ); + wxDEPRECATED( void RemovePen(wxPen*) ); +#endif +}; + +extern WXDLLIMPEXP_DATA_CORE(wxPenList*) wxThePenList; + +// provide comparison operators to allow code such as +// +// if ( pen.GetStyle() == wxTRANSPARENT ) +// +// to compile without warnings which it would otherwise provoke from some +// compilers as it compares elements of different enums +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + +// Unfortunately some compilers have ambiguity issues when enum comparisons are +// overloaded so we have to disable the overloads in this case, see +// wxCOMPILER_NO_OVERLOAD_ON_ENUM definition in wx/platform.h for more details. +#ifndef wxCOMPILER_NO_OVERLOAD_ON_ENUM + +inline bool operator==(wxPenStyle s, wxDeprecatedGUIConstants t) +{ + return static_cast<int>(s) == static_cast<int>(t); +} + +inline bool operator!=(wxPenStyle s, wxDeprecatedGUIConstants t) +{ + return !(s == t); +} + +#endif // wxCOMPILER_NO_OVERLOAD_ON_ENUM + +#endif // FUTURE_WXWIN_COMPATIBILITY_3_0 + +#endif // _WX_PEN_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist.h new file mode 100644 index 0000000000..45ed61eb9e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist.h @@ -0,0 +1,263 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/persist.h +// Purpose: common classes for persistence support +// Author: Vadim Zeitlin +// Created: 2009-01-18 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PERSIST_H_ +#define _WX_PERSIST_H_ + +#include "wx/string.h" +#include "wx/hashmap.h" +#include "wx/confbase.h" + +class wxPersistentObject; + +WX_DECLARE_VOIDPTR_HASH_MAP(wxPersistentObject *, wxPersistentObjectsMap); + +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +/* + We do _not_ declare this function as doing this would force us to specialize + it for the user classes deriving from the standard persistent classes. + However we do define overloads of wxCreatePersistentObject() for all the wx + classes which means that template wxPersistentObject::Restore() picks up the + right overload to use provided that the header defining the correct overload + is included before calling it. And a compilation error happens if this is + not done. + +template <class T> +wxPersistentObject *wxCreatePersistentObject(T *obj); + + */ + +// ---------------------------------------------------------------------------- +// wxPersistenceManager: global aspects of persistent windows +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPersistenceManager +{ +public: + // Call this method to specify a non-default persistence manager to use. + // This function should usually be called very early to affect creation of + // all persistent controls and the object passed to it must have a lifetime + // long enough to be still alive when the persistent controls are destroyed + // and need it to save their state so typically this would be a global or a + // wxApp member. + static void Set(wxPersistenceManager& manager); + + // accessor to the unique persistence manager object + static wxPersistenceManager& Get(); + + // trivial but virtual dtor + // + // FIXME-VC6: this only needs to be public because of VC6 bug + virtual ~wxPersistenceManager(); + + + // globally disable restoring or saving the persistent properties (both are + // enabled by default) + void DisableSaving() { m_doSave = false; } + void DisableRestoring() { m_doRestore = false; } + + + // register an object with the manager: when using the first overload, + // wxCreatePersistentObject() must be specialized for this object class; + // with the second one the persistent adapter is created by the caller + // + // the object shouldn't be already registered with us + template <class T> + wxPersistentObject *Register(T *obj) + { + return Register(obj, wxCreatePersistentObject(obj)); + } + + wxPersistentObject *Register(void *obj, wxPersistentObject *po); + + // check if the object is registered and return the associated + // wxPersistentObject if it is or NULL otherwise + wxPersistentObject *Find(void *obj) const; + + // unregister the object, this is called by wxPersistentObject itself so + // there is usually no need to do it explicitly + // + // deletes the associated wxPersistentObject + void Unregister(void *obj); + + + // save/restore the state of an object + // + // these methods do nothing if DisableSaving/Restoring() was called + // + // Restore() returns true if the object state was really restored + void Save(void *obj); + bool Restore(void *obj); + + // combines both Save() and Unregister() calls + void SaveAndUnregister(void *obj) + { + Save(obj); + Unregister(obj); + } + + // combines both Register() and Restore() calls + template <class T> + bool RegisterAndRestore(T *obj) + { + return Register(obj) && Restore(obj); + } + + bool RegisterAndRestore(void *obj, wxPersistentObject *po) + { + return Register(obj, po) && Restore(obj); + } + + + // methods used by the persistent objects to save and restore the data + // + // currently these methods simply use wxConfig::Get() but they may be + // overridden in the derived class (once we allow creating custom + // persistent managers) +#define wxPERSIST_DECLARE_SAVE_RESTORE_FOR(Type) \ + virtual bool SaveValue(const wxPersistentObject& who, \ + const wxString& name, \ + Type value); \ + \ + virtual bool \ + RestoreValue(const wxPersistentObject& who, \ + const wxString& name, \ + Type *value) + + wxPERSIST_DECLARE_SAVE_RESTORE_FOR(bool); + wxPERSIST_DECLARE_SAVE_RESTORE_FOR(int); + wxPERSIST_DECLARE_SAVE_RESTORE_FOR(long); + wxPERSIST_DECLARE_SAVE_RESTORE_FOR(wxString); + +#undef wxPERSIST_DECLARE_SAVE_RESTORE_FOR + +protected: + // ctor is private, use Get() + wxPersistenceManager() + { + m_doSave = + m_doRestore = true; + } + + + // Return the config object to use, by default just the global one but a + // different one could be used by the derived class if needed. + virtual wxConfigBase *GetConfig() const { return wxConfigBase::Get(); } + + // Return the path to use for saving the setting with the given name for + // the specified object (notice that the name is the name of the setting, + // not the name of the object itself which can be retrieved with GetName()). + virtual wxString GetKey(const wxPersistentObject& who, + const wxString& name) const; + + +private: + // map with the registered objects as keys and associated + // wxPersistentObjects as values + wxPersistentObjectsMap m_persistentObjects; + + // true if we should restore/save the settings (it doesn't make much sense + // to use this class when both of them are false but setting one of them to + // false may make sense in some situations) + bool m_doSave, + m_doRestore; + + wxDECLARE_NO_COPY_CLASS(wxPersistenceManager); +}; + +// ---------------------------------------------------------------------------- +// wxPersistentObject: ABC for anything persistent +// ---------------------------------------------------------------------------- + +class wxPersistentObject +{ +public: + // ctor associates us with the object whose options we save/restore + wxPersistentObject(void *obj) : m_obj(obj) { } + + // trivial but virtual dtor + virtual ~wxPersistentObject() { } + + + // methods used by wxPersistenceManager + // ------------------------------------ + + // save/restore the corresponding objects settings + // + // these methods shouldn't be used directly as they don't respect the + // global wxPersistenceManager::DisableSaving/Restoring() settings, use + // wxPersistenceManager methods with the same name instead + virtual void Save() const = 0; + virtual bool Restore() = 0; + + + // get the kind of the objects we correspond to, e.g. "Frame" + virtual wxString GetKind() const = 0; + + // get the name of the object we correspond to, e.g. "Main" + virtual wxString GetName() const = 0; + + + // return the associated object + void *GetObject() const { return m_obj; } + +protected: + // wrappers for wxPersistenceManager methods which don't require passing + // "this" as the first parameter all the time + template <typename T> + bool SaveValue(const wxString& name, T value) const + { + return wxPersistenceManager::Get().SaveValue(*this, name, value); + } + + template <typename T> + bool RestoreValue(const wxString& name, T *value) + { + return wxPersistenceManager::Get().RestoreValue(*this, name, value); + } + +private: + void * const m_obj; + + wxDECLARE_NO_COPY_CLASS(wxPersistentObject); +}; + +// FIXME-VC6: VC6 has troubles with template methods of DLL-exported classes, +// apparently it believes they should be defined in the DLL (which +// is, of course, impossible as the DLL doesn't know for which types +// will they be instantiated) instead of compiling them when +// building the main application itself. Because of this problem +// (which only arises in debug build!) we can't use the usual +// RegisterAndRestore(obj) with it and need to explicitly create the +// persistence adapter. To hide this ugliness we define a global +// function which does it for us. +template <typename T> +inline bool wxPersistentRegisterAndRestore(T *obj) +{ + wxPersistentObject * const pers = wxCreatePersistentObject(obj); + + return wxPersistenceManager::Get().RegisterAndRestore(obj, pers); + +} + +// A helper function which also sets the name for the (wxWindow-derived) object +// before registering and restoring it. +template <typename T> +inline bool wxPersistentRegisterAndRestore(T *obj, const wxString& name) +{ + obj->SetName(name); + + return wxPersistentRegisterAndRestore(obj); +} + +#endif // _WX_PERSIST_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/bookctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/bookctrl.h new file mode 100644 index 0000000000..38eee262e9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/bookctrl.h @@ -0,0 +1,66 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/persist/bookctrl.h +// Purpose: persistence support for wxBookCtrl +// Author: Vadim Zeitlin +// Created: 2009-01-19 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PERSIST_BOOKCTRL_H_ +#define _WX_PERSIST_BOOKCTRL_H_ + +#include "wx/persist/window.h" + +#include "wx/bookctrl.h" + +// ---------------------------------------------------------------------------- +// string constants used by wxPersistentBookCtrl +// ---------------------------------------------------------------------------- + +#define wxPERSIST_BOOK_KIND "Book" + +#define wxPERSIST_BOOK_SELECTION "Selection" + +// ---------------------------------------------------------------------------- +// wxPersistentBookCtrl: supports saving/restoring book control selection +// ---------------------------------------------------------------------------- + +class wxPersistentBookCtrl : public wxPersistentWindow<wxBookCtrlBase> +{ +public: + wxPersistentBookCtrl(wxBookCtrlBase *book) + : wxPersistentWindow<wxBookCtrlBase>(book) + { + } + + virtual void Save() const + { + SaveValue(wxPERSIST_BOOK_SELECTION, Get()->GetSelection()); + } + + virtual bool Restore() + { + long sel; + if ( RestoreValue(wxPERSIST_BOOK_SELECTION, &sel) ) + { + wxBookCtrlBase * const book = Get(); + if ( sel >= 0 && (unsigned)sel < book->GetPageCount() ) + { + book->SetSelection(sel); + return true; + } + } + + return false; + } + + virtual wxString GetKind() const { return wxPERSIST_BOOK_KIND; } +}; + +inline wxPersistentObject *wxCreatePersistentObject(wxBookCtrlBase *book) +{ + return new wxPersistentBookCtrl(book); +} + +#endif // _WX_PERSIST_BOOKCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/splitter.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/splitter.h new file mode 100644 index 0000000000..d8369c3783 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/splitter.h @@ -0,0 +1,68 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/persist/splitter.h +// Purpose: Persistence support for wxSplitterWindow. +// Author: Vadim Zeitlin +// Created: 2011-08-31 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PERSIST_SPLITTER_H_ +#define _WX_PERSIST_SPLITTER_H_ + +#include "wx/persist/window.h" + +#include "wx/splitter.h" + +// ---------------------------------------------------------------------------- +// string constants used by wxPersistentSplitter +// ---------------------------------------------------------------------------- + +#define wxPERSIST_SPLITTER_KIND "Splitter" + +// Special position value of -1 means the splitter is not split at all. +#define wxPERSIST_SPLITTER_POSITION "Position" + +// ---------------------------------------------------------------------------- +// wxPersistentSplitter: supports saving/restoring splitter position +// ---------------------------------------------------------------------------- + +class wxPersistentSplitter : public wxPersistentWindow<wxSplitterWindow> +{ +public: + wxPersistentSplitter(wxSplitterWindow* splitter) + : wxPersistentWindow<wxSplitterWindow>(splitter) + { + } + + virtual void Save() const + { + wxSplitterWindow* const splitter = Get(); + + int pos = splitter->IsSplit() ? splitter->GetSashPosition() : -1; + SaveValue(wxPERSIST_SPLITTER_POSITION, pos); + } + + virtual bool Restore() + { + int pos; + if ( !RestoreValue(wxPERSIST_SPLITTER_POSITION, &pos) ) + return false; + + if ( pos == -1 ) + Get()->Unsplit(); + else + Get()->SetSashPosition(pos); + + return true; + } + + virtual wxString GetKind() const { return wxPERSIST_SPLITTER_KIND; } +}; + +inline wxPersistentObject *wxCreatePersistentObject(wxSplitterWindow* splitter) +{ + return new wxPersistentSplitter(splitter); +} + +#endif // _WX_PERSIST_SPLITTER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/toplevel.h new file mode 100644 index 0000000000..7d79f23460 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/toplevel.h @@ -0,0 +1,128 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/persist/toplevel.h +// Purpose: persistence support for wxTLW +// Author: Vadim Zeitlin +// Created: 2009-01-19 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PERSIST_TOPLEVEL_H_ +#define _WX_PERSIST_TOPLEVEL_H_ + +#include "wx/persist/window.h" + +#include "wx/toplevel.h" +#include "wx/display.h" + +// ---------------------------------------------------------------------------- +// string constants used by wxPersistentTLW +// ---------------------------------------------------------------------------- + +// we use just "Window" to keep configuration files and such short, there +// should be no confusion with wxWindow itself as we don't have persistent +// windows, just persistent controls which have their own specific kind strings +#define wxPERSIST_TLW_KIND "Window" + +// names for various persistent options +#define wxPERSIST_TLW_X "x" +#define wxPERSIST_TLW_Y "y" +#define wxPERSIST_TLW_W "w" +#define wxPERSIST_TLW_H "h" + +#define wxPERSIST_TLW_MAXIMIZED "Maximized" +#define wxPERSIST_TLW_ICONIZED "Iconized" + +// ---------------------------------------------------------------------------- +// wxPersistentTLW: supports saving/restoring window position and size as well +// as maximized/iconized/restore state +// ---------------------------------------------------------------------------- + +class wxPersistentTLW : public wxPersistentWindow<wxTopLevelWindow> +{ +public: + wxPersistentTLW(wxTopLevelWindow *tlw) + : wxPersistentWindow<wxTopLevelWindow>(tlw) + { + } + + virtual void Save() const + { + const wxTopLevelWindow * const tlw = Get(); + + const wxPoint pos = tlw->GetScreenPosition(); + SaveValue(wxPERSIST_TLW_X, pos.x); + SaveValue(wxPERSIST_TLW_Y, pos.y); + + // notice that we use GetSize() here and not GetClientSize() because + // the latter doesn't return correct results for the minimized windows + // (at least not under Windows) + // + // of course, it shouldn't matter anyhow usually, the client size + // should be preserved as well unless the size of the decorations + // changed between the runs + const wxSize size = tlw->GetSize(); + SaveValue(wxPERSIST_TLW_W, size.x); + SaveValue(wxPERSIST_TLW_H, size.y); + + SaveValue(wxPERSIST_TLW_MAXIMIZED, tlw->IsMaximized()); + SaveValue(wxPERSIST_TLW_ICONIZED, tlw->IsIconized()); + } + + virtual bool Restore() + { + wxTopLevelWindow * const tlw = Get(); + + long x wxDUMMY_INITIALIZE(-1), + y wxDUMMY_INITIALIZE(-1), + w wxDUMMY_INITIALIZE(-1), + h wxDUMMY_INITIALIZE(-1); + const bool hasPos = RestoreValue(wxPERSIST_TLW_X, &x) && + RestoreValue(wxPERSIST_TLW_Y, &y); + const bool hasSize = RestoreValue(wxPERSIST_TLW_W, &w) && + RestoreValue(wxPERSIST_TLW_H, &h); + + if ( hasPos ) + { + // to avoid making the window completely invisible if it had been + // shown on a monitor which was disconnected since the last run + // (this is pretty common for notebook with external displays) + // + // NB: we should allow window position to be (slightly) off screen, + // it's not uncommon to position the window so that its upper + // left corner has slightly negative coordinate + if ( wxDisplay::GetFromPoint(wxPoint(x, y)) != wxNOT_FOUND || + (hasSize && wxDisplay::GetFromPoint( + wxPoint(x + w, y + h)) != wxNOT_FOUND) ) + { + tlw->Move(x, y, wxSIZE_ALLOW_MINUS_ONE); + } + //else: should we try to adjust position/size somehow? + } + + if ( hasSize ) + tlw->SetSize(w, h); + + // note that the window can be both maximized and iconized + bool maximized; + if ( RestoreValue(wxPERSIST_TLW_MAXIMIZED, &maximized) && maximized ) + tlw->Maximize(); + + bool iconized; + if ( RestoreValue(wxPERSIST_TLW_ICONIZED, &iconized) && iconized ) + tlw->Iconize(); + + // the most important property of the window that we restore is its + // size, so disregard the value of hasPos here + return hasSize; + } + + virtual wxString GetKind() const { return wxPERSIST_TLW_KIND; } +}; + +inline wxPersistentObject *wxCreatePersistentObject(wxTopLevelWindow *tlw) +{ + return new wxPersistentTLW(tlw); +} + +#endif // _WX_PERSIST_TOPLEVEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/treebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/treebook.h new file mode 100644 index 0000000000..1c0ba94631 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/treebook.h @@ -0,0 +1,96 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/persist/treebook.h +// Purpose: persistence support for wxBookCtrl +// Author: Vadim Zeitlin +// Created: 2009-01-19 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PERSIST_TREEBOOK_H_ +#define _WX_PERSIST_TREEBOOK_H_ + +#include "wx/persist/bookctrl.h" + +#include "wx/arrstr.h" +#include "wx/treebook.h" + +// ---------------------------------------------------------------------------- +// string constants used by wxPersistentTreeBookCtrl +// ---------------------------------------------------------------------------- + +#define wxPERSIST_TREEBOOK_KIND "TreeBook" + +// this key contains the indices of all expanded nodes in the tree book +// separated by wxPERSIST_TREEBOOK_EXPANDED_SEP +#define wxPERSIST_TREEBOOK_EXPANDED_BRANCHES "Expanded" +#define wxPERSIST_TREEBOOK_EXPANDED_SEP ',' + +// ---------------------------------------------------------------------------- +// wxPersistentTreeBookCtrl: supports saving/restoring open tree branches +// ---------------------------------------------------------------------------- + +class wxPersistentTreeBookCtrl : public wxPersistentBookCtrl +{ +public: + wxPersistentTreeBookCtrl(wxTreebook *book) + : wxPersistentBookCtrl(book) + { + } + + virtual void Save() const + { + const wxTreebook * const book = GetTreeBook(); + + wxString expanded; + const size_t count = book->GetPageCount(); + for ( size_t n = 0; n < count; n++ ) + { + if ( book->IsNodeExpanded(n) ) + { + if ( !expanded.empty() ) + expanded += wxPERSIST_TREEBOOK_EXPANDED_SEP; + + expanded += wxString::Format("%u", static_cast<unsigned>(n)); + } + } + + SaveValue(wxPERSIST_TREEBOOK_EXPANDED_BRANCHES, expanded); + + wxPersistentBookCtrl::Save(); + } + + virtual bool Restore() + { + wxTreebook * const book = GetTreeBook(); + + wxString expanded; + if ( RestoreValue(wxPERSIST_TREEBOOK_EXPANDED_BRANCHES, &expanded) ) + { + const wxArrayString + indices(wxSplit(expanded, wxPERSIST_TREEBOOK_EXPANDED_SEP)); + + const size_t pageCount = book->GetPageCount(); + const size_t count = indices.size(); + for ( size_t n = 0; n < count; n++ ) + { + unsigned long idx; + if ( indices[n].ToULong(&idx) && idx < pageCount ) + book->ExpandNode(idx); + } + } + + return wxPersistentBookCtrl::Restore(); + } + + virtual wxString GetKind() const { return wxPERSIST_TREEBOOK_KIND; } + + wxTreebook *GetTreeBook() const { return static_cast<wxTreebook *>(Get()); } +}; + +inline wxPersistentObject *wxCreatePersistentObject(wxTreebook *book) +{ + return new wxPersistentTreeBookCtrl(book); +} + +#endif // _WX_PERSIST_TREEBOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/window.h new file mode 100644 index 0000000000..279e11d26d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/persist/window.h @@ -0,0 +1,79 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/persist/window.h +// Purpose: wxPersistentWindow declaration +// Author: Vadim Zeitlin +// Created: 2009-01-23 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PERSIST_WINDOW_H_ +#define _WX_PERSIST_WINDOW_H_ + +#include "wx/persist.h" + +#include "wx/window.h" + +// ---------------------------------------------------------------------------- +// wxPersistentWindow: base class for persistent windows, uses the window name +// as persistent name by default and automatically reacts +// to the window destruction +// ---------------------------------------------------------------------------- + +// type-independent part of wxPersistentWindow +class wxPersistentWindowBase : + wxBIND_OR_CONNECT_HACK_BASE_CLASS + public wxPersistentObject +{ +public: + wxPersistentWindowBase(wxWindow *win) + : wxPersistentObject(win) + { + wxBIND_OR_CONNECT_HACK(win, wxEVT_DESTROY, wxWindowDestroyEventHandler, + wxPersistentWindowBase::HandleDestroy, this); + } + + virtual wxString GetName() const + { + const wxString name = GetWindow()->GetName(); + wxASSERT_MSG( !name.empty(), "persistent windows should be named!" ); + + return name; + } + +protected: + wxWindow *GetWindow() const { return static_cast<wxWindow *>(GetObject()); } + +private: + void HandleDestroy(wxWindowDestroyEvent& event) + { + event.Skip(); + + // only react to the destruction of this object itself, not of any of + // its children + if ( event.GetEventObject() == GetObject() ) + { + // this will delete this object itself + wxPersistenceManager::Get().SaveAndUnregister(GetWindow()); + } + } + + wxDECLARE_NO_COPY_CLASS(wxPersistentWindowBase); +}; + +template <class T> +class wxPersistentWindow : public wxPersistentWindowBase +{ +public: + typedef T WindowType; + + wxPersistentWindow(WindowType *win) + : wxPersistentWindowBase(win) + { + } + + WindowType *Get() const { return static_cast<WindowType *>(GetWindow()); } +}; + +#endif // _WX_PERSIST_WINDOW_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/pickerbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/pickerbase.h new file mode 100644 index 0000000000..3c761da876 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/pickerbase.h @@ -0,0 +1,188 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/pickerbase.h +// Purpose: wxPickerBase definition +// Author: Francesco Montorsi (based on Vadim Zeitlin's code) +// Modified by: +// Created: 14/4/2006 +// Copyright: (c) Vadim Zeitlin, Francesco Montorsi +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PICKERBASE_H_BASE_ +#define _WX_PICKERBASE_H_BASE_ + +#include "wx/control.h" +#include "wx/sizer.h" +#include "wx/containr.h" + +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxToolTip; + +extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[]; + +// ---------------------------------------------------------------------------- +// wxPickerBase is the base class for the picker controls which support +// a wxPB_USE_TEXTCTRL style; i.e. for those pickers which can use an auxiliary +// text control next to the 'real' picker. +// +// The wxTextPickerHelper class manages enabled/disabled state of the text control, +// its sizing and positioning. +// ---------------------------------------------------------------------------- + +#define wxPB_USE_TEXTCTRL 0x0002 +#define wxPB_SMALL 0x8000 + +class WXDLLIMPEXP_CORE wxPickerBase : public wxNavigationEnabled<wxControl> +{ +public: + // ctor: text is the associated text control + wxPickerBase() : m_text(NULL), m_picker(NULL), m_sizer(NULL) + { } + virtual ~wxPickerBase() {} + + + // if present, intercepts wxPB_USE_TEXTCTRL style and creates the text control + // The 3rd argument is the initial wxString to display in the text control + bool CreateBase(wxWindow *parent, + wxWindowID id, + const wxString& text = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + +public: // public API + + // margin between the text control and the picker + void SetInternalMargin(int newmargin) + { GetTextCtrlItem()->SetBorder(newmargin); m_sizer->Layout(); } + int GetInternalMargin() const + { return GetTextCtrlItem()->GetBorder(); } + + // proportion of the text control + void SetTextCtrlProportion(int prop) + { GetTextCtrlItem()->SetProportion(prop); m_sizer->Layout(); } + int GetTextCtrlProportion() const + { return GetTextCtrlItem()->GetProportion(); } + + // proportion of the picker control + void SetPickerCtrlProportion(int prop) + { GetPickerCtrlItem()->SetProportion(prop); m_sizer->Layout(); } + int GetPickerCtrlProportion() const + { return GetPickerCtrlItem()->GetProportion(); } + + bool IsTextCtrlGrowable() const + { return (GetTextCtrlItem()->GetFlag() & wxGROW) != 0; } + void SetTextCtrlGrowable(bool grow = true) + { + int f = GetDefaultTextCtrlFlag(); + if ( grow ) + f |= wxGROW; + else + f &= ~wxGROW; + + GetTextCtrlItem()->SetFlag(f); + } + + bool IsPickerCtrlGrowable() const + { return (GetPickerCtrlItem()->GetFlag() & wxGROW) != 0; } + void SetPickerCtrlGrowable(bool grow = true) + { + int f = GetDefaultPickerCtrlFlag(); + if ( grow ) + f |= wxGROW; + else + f &= ~wxGROW; + + GetPickerCtrlItem()->SetFlag(f); + } + + bool HasTextCtrl() const + { return m_text != NULL; } + wxTextCtrl *GetTextCtrl() + { return m_text; } + wxControl *GetPickerCtrl() + { return m_picker; } + + void SetTextCtrl(wxTextCtrl* text) + { m_text = text; } + void SetPickerCtrl(wxControl* picker) + { m_picker = picker; } + + // methods that derived class must/may override + virtual void UpdatePickerFromTextCtrl() = 0; + virtual void UpdateTextCtrlFromPicker() = 0; + +protected: + // overridden base class methods +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip(wxToolTip *tip); +#endif // wxUSE_TOOLTIPS + + + // event handlers + void OnTextCtrlDelete(wxWindowDestroyEvent &); + void OnTextCtrlUpdate(wxCommandEvent &); + void OnTextCtrlKillFocus(wxFocusEvent &); + + // returns the set of styles for the attached wxTextCtrl + // from given wxPickerBase's styles + virtual long GetTextCtrlStyle(long style) const + { return (style & wxWINDOW_STYLE_MASK); } + + // returns the set of styles for the m_picker + virtual long GetPickerStyle(long style) const + { return (style & wxWINDOW_STYLE_MASK); } + + + wxSizerItem *GetPickerCtrlItem() const + { + if (this->HasTextCtrl()) + return m_sizer->GetItem((size_t)1); + return m_sizer->GetItem((size_t)0); + } + + wxSizerItem *GetTextCtrlItem() const + { + wxASSERT(this->HasTextCtrl()); + return m_sizer->GetItem((size_t)0); + } + + int GetDefaultPickerCtrlFlag() const + { + // on macintosh, without additional borders + // there's not enough space for focus rect + return wxALIGN_CENTER_VERTICAL|wxGROW +#ifdef __WXMAC__ + | wxTOP | wxRIGHT | wxBOTTOM +#endif + ; + } + + int GetDefaultTextCtrlFlag() const + { + // on macintosh, without wxALL there's not enough space for focus rect + return wxALIGN_CENTER_VERTICAL +#ifdef __WXMAC__ + | wxALL +#else + | wxRIGHT +#endif + ; + } + + void PostCreation(); + +protected: + wxTextCtrl *m_text; // can be NULL + wxControl *m_picker; + wxBoxSizer *m_sizer; + +private: + DECLARE_ABSTRACT_CLASS(wxPickerBase) +}; + + +#endif + // _WX_PICKERBASE_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/platform.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/platform.h new file mode 100644 index 0000000000..d1c18f320d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/platform.h @@ -0,0 +1,705 @@ +/** +* Name: wx/platform.h +* Purpose: define the OS and compiler identification macros +* Author: Vadim Zeitlin +* Modified by: +* Created: 29.10.01 (extracted from wx/defs.h) +* Copyright: (c) 1997-2001 Vadim Zeitlin +* Licence: wxWindows licence +*/ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_PLATFORM_H_ +#define _WX_PLATFORM_H_ + +#ifdef __WXMAC_XCODE__ +# include <unistd.h> +# include <TargetConditionals.h> +# include <AvailabilityMacros.h> +# ifndef MAC_OS_X_VERSION_10_4 +# define MAC_OS_X_VERSION_10_4 1040 +# endif +# ifndef MAC_OS_X_VERSION_10_5 +# define MAC_OS_X_VERSION_10_5 1050 +# endif +# ifndef MAC_OS_X_VERSION_10_6 +# define MAC_OS_X_VERSION_10_6 1060 +# endif +# ifndef MAC_OS_X_VERSION_10_7 +# define MAC_OS_X_VERSION_10_7 1070 +# endif +# ifndef MAC_OS_X_VERSION_10_8 +# define MAC_OS_X_VERSION_10_8 1080 +# endif +# include "wx/osx/config_xcode.h" +# ifndef __WXOSX__ +# define __WXOSX__ 1 +# endif +# ifndef __WXMAC__ +# define __WXMAC__ 1 +# endif +#endif + +/* + We use __WINDOWS__ as our main identification symbol for Microsoft Windows + but it's actually not predefined directly by any commonly used compilers + (only Watcom defines it itself and it's not supported any longer), so we + define it ourselves if any of the following macros is defined: + + - MSVC _WIN32 (notice that this is also defined under Win64) + - Borland __WIN32__ + - Our __WXMSW__ which selects Windows as platform automatically + */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__WXMSW__) +# ifndef __WINDOWS__ +# define __WINDOWS__ +# endif /* !__WINDOWS__ */ +#endif /* Any standard symbol indicating Windows */ + +#if defined(__WINDOWS__) + /* Select wxMSW under Windows if no other port is specified. */ +# if !defined(__WXMSW__) && !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) +# define __WXMSW__ +# endif + +# if !defined(__WINDOWS__) +# define __WINDOWS__ +# endif + +# ifndef _WIN32 +# define _WIN32 +# endif + +# ifndef WIN32 +# define WIN32 +# endif + +# ifndef __WIN32__ +# define __WIN32__ +# endif + + /* MSVC predefines _WIN64 for 64 bit builds, for gcc we use generic + architecture definitions. */ +# if defined(_WIN64) || defined(__x86_64__) +# ifndef __WIN64__ +# define __WIN64__ +# endif /* !__WIN64__ */ +# endif /* _WIN64 */ + +#endif /* __WINDOWS__ */ + +/* + Don't use widget toolkit specific code in non-GUI code in the library + itself to ensure that the same base library is used for both MSW and GTK + ports. But keep __WXMSW__ defined for (console) applications using + wxWidgets for compatibility. + */ +#if defined(WXBUILDING) && defined(wxUSE_GUI) && !wxUSE_GUI +# ifdef __WXMSW__ +# undef __WXMSW__ +# endif +# ifdef __WXGTK__ +# undef __WXGTK__ +# endif +#endif + +#if defined(__WXGTK__) && defined(__WINDOWS__) + +# ifdef __WXMSW__ +# undef __WXMSW__ +# endif + +#endif /* __WXGTK__ && __WINDOWS__ */ + +/* detect MS SmartPhone */ +#if defined( WIN32_PLATFORM_WFSP ) +# ifndef __SMARTPHONE__ +# define __SMARTPHONE__ +# endif +# ifndef __WXWINCE__ +# define __WXWINCE__ +# endif +#endif + +/* detect PocketPC */ +#if defined( WIN32_PLATFORM_PSPC ) +# ifndef __POCKETPC__ +# define __POCKETPC__ +# endif +# ifndef __WXWINCE__ +# define __WXWINCE__ +# endif +#endif + +/* detect Standard WinCE SDK */ +#if defined( WCE_PLATFORM_STANDARDSDK ) +# ifndef __WINCE_STANDARDSDK__ +# define __WINCE_STANDARDSDK__ +# endif +# ifndef __WXWINCE__ +# define __WXWINCE__ +# endif +#endif + +#if defined(_WIN32_WCE) && !defined(WIN32_PLATFORM_WFSP) && !defined(WIN32_PLATFORM_PSPC) +# if (_WIN32_WCE >= 400) +# ifndef __WINCE_NET__ +# define __WINCE_NET__ +# endif +# elif (_WIN32_WCE >= 200) +# ifndef __HANDHELDPC__ +# define __HANDHELDPC__ +# endif +# endif +# ifndef __WXWINCE__ +# define __WXWINCE__ +# endif +#endif + +#if defined(__WXWINCE__) && defined(_MSC_VER) && (_MSC_VER == 1201) + #define __EVC4__ +#endif + +#if defined(__POCKETPC__) || defined(__SMARTPHONE__) || defined(__WXGPE__) +# define __WXHANDHELD__ +#endif + +#ifdef __ANDROID__ +# define __WXANDROID__ +# include "wx/android/config_android.h" +#endif + +#include "wx/compiler.h" + +/* + Include wx/setup.h for the Unix platform defines generated by configure and + the library compilation options + + Note that it must be included before defining hardware symbols below as they + could be already defined by configure but it must be included after defining + the compiler macros above as msvc/wx/setup.h relies on them under Windows. + */ +#include "wx/setup.h" + +/* + Convenience for any optional classes that use the wxAnyButton base class. + */ +#if wxUSE_TOGGLEBTN || wxUSE_BUTTON + #define wxHAS_ANY_BUTTON +#endif + + +/* + Hardware platform detection. + + VC++ defines _M_xxx symbols. + */ +#if defined(_M_IX86) || defined(i386) || defined(__i386) || defined(__i386__) + #ifndef __INTEL__ + #define __INTEL__ + #endif +#endif /* x86 */ + +#if defined(_M_IA64) + #ifndef __IA64__ + #define __IA64__ + #endif +#endif /* ia64 */ + +#if defined(_M_MPPC) || defined(__PPC__) || defined(__ppc__) + #ifndef __POWERPC__ + #define __POWERPC__ + #endif +#endif /* alpha */ + +#if defined(_M_ALPHA) || defined(__AXP__) + #ifndef __ALPHA__ + #define __ALPHA__ + #endif +#endif /* alpha */ + + +/* + adjust the Unicode setting: wxUSE_UNICODE should be defined as 0 or 1 + and is used by wxWidgets, _UNICODE and/or UNICODE may be defined or used by + the system headers so bring these settings in sync + */ + +/* set wxUSE_UNICODE to 1 if UNICODE or _UNICODE is defined */ +#if defined(_UNICODE) || defined(UNICODE) +# undef wxUSE_UNICODE +# define wxUSE_UNICODE 1 +#else /* !UNICODE */ +# ifndef wxUSE_UNICODE +# define wxUSE_UNICODE 0 +# endif +#endif /* UNICODE/!UNICODE */ + +/* and vice versa: define UNICODE and _UNICODE if wxUSE_UNICODE is 1 */ +#if wxUSE_UNICODE +# ifndef _UNICODE +# define _UNICODE +# endif +# ifndef UNICODE +# define UNICODE +# endif +#endif /* wxUSE_UNICODE */ + + +/* + test for old versions of Borland C, normally need at least 5.82, Turbo + explorer, available for free at http://www.turboexplorer.com/downloads +*/ + + +/* + Older versions of Borland C have some compiler bugs that need + workarounds. Mostly pertains to the free command line compiler 5.5.1. +*/ +#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x551) + /* + The Borland free compiler is unable to handle overloaded enum + comparisons under certain conditions e.g. when any class has a + conversion ctor for an integral type and there's an overload to + compare between an integral type and that class type. + */ +# define wxCOMPILER_NO_OVERLOAD_ON_ENUM + + /* + This is needed to overcome bugs in 5.5.1 STL, linking errors will + result if it is not defined. + */ +# define _RWSTD_COMPILE_INSTANTIATE + + /* + Preprocessor in older Borland compilers have major problems + concatenating with ##. Specifically, if the string operands being + concatenated have special meaning (e.g. L"str", 123i64 etc) + then ## will not concatenate the operands correctly. + + As a workaround, define wxPREPEND* and wxAPPEND* without using + wxCONCAT_HELPER. + */ +# define wxCOMPILER_BROKEN_CONCAT_OPER +#endif /* __BORLANDC__ */ + +/* + OS: first of all, test for MS-DOS platform. We must do this before testing + for Unix, because DJGPP compiler defines __unix__ under MS-DOS + */ +#if defined(__GO32__) || defined(__DJGPP__) || defined(__DOS__) +# ifndef __DOS__ +# define __DOS__ +# endif + /* size_t is the same as unsigned int for Watcom 11 compiler, */ + /* so define it if it hadn't been done by configure yet */ +# if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG) +# ifdef __WATCOMC__ +# define wxSIZE_T_IS_UINT +# endif +# ifdef __DJGPP__ +# define wxSIZE_T_IS_ULONG +# endif +# endif + +/* + OS: then test for generic Unix defines, then for particular flavours and + finally for Unix-like systems + Mac OS X matches this case (__MACH__), prior Mac OS do not. + */ +#elif defined(__UNIX__) || defined(__unix) || defined(__unix__) || \ + defined(____SVR4____) || defined(__LINUX__) || defined(__sgi) || \ + defined(__hpux) || defined(sun) || defined(__SUN__) || defined(_AIX) || \ + defined(__EMX__) || defined(__VMS) || defined(__BEOS__) || defined(__MACH__) + +# define __UNIX_LIKE__ + +# ifdef __SGI__ +# ifdef __GNUG__ +# else /* !gcc */ + /* + Note I use the term __SGI_CC__ for both cc and CC, its not a good + idea to mix gcc and cc/CC, the name mangling is different + */ +# define __SGI_CC__ +# endif /* gcc/!gcc */ + + /* system headers use this symbol and not __cplusplus in some places */ +# ifndef _LANGUAGE_C_PLUS_PLUS +# define _LANGUAGE_C_PLUS_PLUS +# endif +# endif /* SGI */ + +# ifdef __EMX__ +# define OS2EMX_PLAIN_CHAR +# endif +# if defined(__INNOTEK_LIBC__) + /* Ensure visibility of strnlen declaration */ +# define _GNU_SOURCE +# endif + + /* define __HPUX__ for HP-UX where standard macro is __hpux */ +# if defined(__hpux) && !defined(__HPUX__) +# define __HPUX__ +# endif /* HP-UX */ + + /* All of these should already be defined by including configure- + generated setup.h but we wish to support Xcode compilation without + requiring the user to define these himself. + */ +# if defined(__APPLE__) && defined(__MACH__) +# ifndef __UNIX__ +# define __UNIX__ 1 +# endif +# ifndef __BSD__ +# define __BSD__ 1 +# endif + /* __DARWIN__ is our own define to mean OS X or pure Darwin */ +# ifndef __DARWIN__ +# define __DARWIN__ 1 +# endif + /* NOTE: TARGET_CARBON is actually a 0/1 and must be 1 for OS X */ +# ifndef TARGET_CARBON +# define TARGET_CARBON 1 +# endif + /* OS X uses unsigned long size_t for both ILP32 and LP64 modes. */ +# if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG) +# define wxSIZE_T_IS_ULONG +# endif +# endif + +/* + OS: OS/2 + */ +#elif defined(__OS2__) + + /* wxOS2 vs. non wxOS2 ports on OS2 platform */ +# if !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) +# ifndef __WXPM__ +# define __WXPM__ +# endif +# endif + +# if defined(__IBMCPP__) +# define __VISAGEAVER__ __IBMCPP__ +# endif + + /* Place other OS/2 compiler environment defines here */ +# if defined(__VISAGECPP__) + /* VisualAge is the only thing that understands _Optlink */ +# define LINKAGEMODE _Optlink +# endif +# define wxSIZE_T_IS_UINT + +/* + OS: Windows + */ +#elif defined(__WINDOWS__) + + /* to be changed for Win64! */ +# ifndef __WIN32__ +# error "__WIN32__ should be defined for Win32 and Win64, Win16 is not supported" +# endif + + /* size_t is the same as unsigned int for all Windows compilers we know, */ + /* so define it if it hadn't been done by configure yet */ +# if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG) && !defined(__WIN64__) +# define wxSIZE_T_IS_UINT +# endif +#else +# error "Unknown platform." +#endif /* OS */ + +/* + if we're on a Unix system but didn't use configure (so that setup.h didn't + define __UNIX__), do define __UNIX__ now + */ +#if !defined(__UNIX__) && defined(__UNIX_LIKE__) +# define __UNIX__ +#endif /* Unix */ + +#if defined(__WXMOTIF__) || defined(__WXX11__) +# define __X__ +#endif + +/* + We get "Large Files (ILP32) not supported in strict ANSI mode." #error + from HP-UX standard headers when compiling with g++ without this: + */ +#if defined(__HPUX__) && !defined(__STDC_EXT__) +# define __STDC_EXT__ 1 +#endif + +/* Force linking against required libraries under Windows: */ +#ifdef __WXWINCE__ +# include "wx/msw/wince/libraries.h" +#elif defined __WINDOWS__ +# include "wx/msw/libraries.h" +#endif + +#if defined(__BORLANDC__) || (defined(__GNUC__) && __GNUC__ < 3) +#define wxNEEDS_CHARPP +#endif + +/* + Note that wx/msw/gccpriv.h must be included after defining UNICODE and + _UNICODE macros as it includes _mingw.h which relies on them being set. + */ +#if ( defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \ + ( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \ + wxCHECK_WATCOM_VERSION(1,0) ) && \ + !defined(__DOS__) && \ + !defined(__WXPM__) && \ + !defined(__WXMOTIF__) && \ + !defined(__WXX11__) +# include "wx/msw/gccpriv.h" +#else +# undef wxCHECK_W32API_VERSION +# define wxCHECK_W32API_VERSION(maj, min) (0) +# undef wxCHECK_MINGW32_VERSION +# define wxCHECK_MINGW32_VERSION( major, minor ) (0) +#endif + + +/* + Handle Darwin gcc universal compilation. Don't do this in an Apple- + specific case since no sane compiler should be defining either + __BIG_ENDIAN__ or __LITTLE_ENDIAN__ unless it really is generating + code that will be hosted on a machine with the appropriate endianness. + If a compiler defines neither, assume the user or configure set + WORDS_BIGENDIAN appropriately. + */ +#if defined(__BIG_ENDIAN__) +# undef WORDS_BIGENDIAN +# define WORDS_BIGENDIAN 1 +#elif defined(__LITTLE_ENDIAN__) +# undef WORDS_BIGENDIAN +#elif defined(__WXMAC__) && !defined(WORDS_BIGENDIAN) +/* According to Stefan even ancient Mac compilers defined __BIG_ENDIAN__ */ +# warning "Compiling wxMac with probably wrong endianness" +#endif +/* also the 32/64 bit universal builds must be handled accordingly */ +#ifdef __DARWIN__ +# ifdef __LP64__ +# undef SIZEOF_VOID_P +# undef SIZEOF_LONG +# undef SIZEOF_SIZE_T +# define SIZEOF_VOID_P 8 +# define SIZEOF_LONG 8 +# define SIZEOF_SIZE_T 8 +# else +# undef SIZEOF_VOID_P +# undef SIZEOF_LONG +# undef SIZEOF_SIZE_T +# define SIZEOF_VOID_P 4 +# define SIZEOF_LONG 4 +# define SIZEOF_SIZE_T 4 +# endif +#endif + +/* + Define various OS X symbols before including wx/chkconf.h which uses them. + + __WXOSX_MAC__ means Mac OS X, non embedded + __WXOSX_IPHONE__ means OS X iPhone + */ + +/* + Normally all of __WXOSX_XXX__, __WXOSX__ and __WXMAC__ are defined by + configure but ensure that we also define them if configure was not used for + whatever reason. + + The primary symbol remains __WXOSX_XXX__ one, __WXOSX__ exists to allow + checking for any OS X port (Carbon and Cocoa) and __WXMAC__ is an old name + for it. + */ +#if defined(__WXOSX_CARBON__) || defined(__WXOSX_COCOA__) || defined(__WXOSX_IPHONE__) +# ifndef __WXOSX__ +# define __WXOSX__ 1 +# endif +# ifndef __WXMAC__ +# define __WXMAC__ 1 +# endif +#endif + +#ifdef __WXOSX__ +/* setup precise defines according to sdk used */ +# include <TargetConditionals.h> +# if defined(__WXOSX_IPHONE__) +# if !( defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE ) +# error "incorrect SDK for an iPhone build" +# endif +# else +# if wxUSE_GUI && !(defined(__WXOSX_CARBON__) || defined(__WXOSX_COCOA__)) +# error "one of __WXOSX_IPHONE__, __WXOSX_CARBON__ or __WXOSX_COCOA__ must be defined for the GUI build" +# endif +# if !( defined(TARGET_OS_MAC) && TARGET_OS_MAC ) +# error "incorrect SDK for a Mac OS X build" +# endif +# define __WXOSX_MAC__ 1 +# endif +#endif + +#ifdef __WXOSX_MAC__ +# if defined(__MACH__) +# include <AvailabilityMacros.h> +# ifndef MAC_OS_X_VERSION_10_4 +# define MAC_OS_X_VERSION_10_4 1040 +# endif +# ifndef MAC_OS_X_VERSION_10_5 +# define MAC_OS_X_VERSION_10_5 1050 +# endif +# ifndef MAC_OS_X_VERSION_10_6 +# define MAC_OS_X_VERSION_10_6 1060 +# endif +# ifndef MAC_OS_X_VERSION_10_7 +# define MAC_OS_X_VERSION_10_7 1070 +# endif +# ifndef MAC_OS_X_VERSION_10_8 +# define MAC_OS_X_VERSION_10_8 1080 +# endif +# else +# error "only mach-o configurations are supported" +# endif +#endif + +/* + __WXOSX_OR_COCOA__ is a common define to wxOSX (Carbon or Cocoa) and wxCocoa ports under OS X. + + DO NOT use this define in base library code. Although wxMac has its own + private base library (and thus __WXOSX_OR_COCOA__,__WXMAC__ and related defines are + valid there), wxCocoa shares its library with other ports like wxGTK and wxX11. + + To keep wx authors from screwing this up, only enable __WXOSX_OR_COCOA__ for wxCocoa when + not compiling the base library. We determine this by first checking if + wxUSE_BASE is not defined. If it is not defined, then we're not buildling + the base library, and possibly not building wx at all (but actually building + user code that's using wx). If it is defined then we must check to make sure + it is not true. If it is true, we're building base. + + If you want it in the common darwin base library then use __DARWIN__. You + can use any Darwin-available libraries like CoreFoundation but please avoid + using OS X libraries like Carbon or CoreServices. + + */ +#if defined(__WXOSX__) || (defined(__WXCOCOA__) && (!defined(wxUSE_BASE) || !wxUSE_BASE)) +# define __WXOSX_OR_COCOA__ 1 +#endif + +/* + check the consistency of the settings in setup.h: note that this must be + done after setting wxUSE_UNICODE correctly as it is used in wx/chkconf.h + and after defining the compiler macros which are used in it too + */ +#include "wx/chkconf.h" + + +/* + some compilers don't support iostream.h any longer, while some of theme + are not updated with <iostream> yet, so override the users setting here + in such case. + */ +#if defined(_MSC_VER) && (_MSC_VER >= 1310) +# undef wxUSE_IOSTREAMH +# define wxUSE_IOSTREAMH 0 +#elif defined(__DMC__) || defined(__WATCOMC__) +# undef wxUSE_IOSTREAMH +# define wxUSE_IOSTREAMH 1 +#elif defined(__MINGW32__) +# undef wxUSE_IOSTREAMH +# define wxUSE_IOSTREAMH 0 +#endif /* compilers with/without iostream.h */ + +/* + old C++ headers (like <iostream.h>) declare classes in the global namespace + while the new, standard ones (like <iostream>) do it in std:: namespace, + unless it's an old gcc version. + + using this macro allows constuctions like "wxSTD iostream" to work in + either case + */ +#if !wxUSE_IOSTREAMH && (!defined(__GNUC__) || ( __GNUC__ > 2 ) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) +# define wxSTD std:: +#else +# define wxSTD +#endif + +/* On OpenVMS with the most recent HP C++ compiler some function (i.e. wscanf) + * are only available in the std-namespace. (BUG???) + */ +#if defined( __VMS ) && (__DECCXX_VER >= 70100000) && !defined(__STD_CFRONT) && !defined( __NONAMESPACE_STD ) +# define wxVMS_USE_STD std:: +#else +# define wxVMS_USE_STD +#endif + +#ifdef __VMS +#define XtDisplay XTDISPLAY +#ifdef __WXMOTIF__ +#define XtParent XTPARENT +#define XtScreen XTSCREEN +#define XtWindow XTWINDOW +#endif +#endif + +/* Choose which method we will use for updating menus + * - in OnIdle, or when we receive a wxEVT_MENU_OPEN event. + * Presently, only Windows, OS X and GTK+ support wxEVT_MENU_OPEN. + */ +#ifndef wxUSE_IDLEMENUUPDATES +# if (defined(__WXMSW__) || defined(__WXGTK__) || defined(__WXOSX__)) && !defined(__WXUNIVERSAL__) +# define wxUSE_IDLEMENUUPDATES 0 +# else +# define wxUSE_IDLEMENUUPDATES 1 +# endif +#endif + +/* + * Define symbols that are not yet in + * configure or possibly some setup.h files. + * They will need to be added. + */ + +#ifndef wxUSE_FILECONFIG +# if wxUSE_CONFIG && wxUSE_TEXTFILE +# define wxUSE_FILECONFIG 1 +# else +# define wxUSE_FILECONFIG 0 +# endif +#endif + +#ifndef wxUSE_HOTKEY +# define wxUSE_HOTKEY 0 +#endif + +#if !defined(wxUSE_WXDIB) && defined(__WXMSW__) +# define wxUSE_WXDIB 1 +#endif + +/* + Optionally supported C++ features. + */ + +/* + RTTI: if it is disabled in build/msw/makefile.* then this symbol will + already be defined but it's also possible to do it from configure (with + g++) or by editing project files with MSVC so test for it here too. + */ +#ifndef wxNO_RTTI + /* + Only 4.3 defines __GXX_RTTI by default so its absence is not an + indication of disabled RTTI with the previous versions. + */ +# if wxCHECK_GCC_VERSION(4, 3) +# ifndef __GXX_RTTI +# define wxNO_RTTI +# endif +# elif defined(_MSC_VER) +# ifndef _CPPRTTI +# define wxNO_RTTI +# endif +# endif +#endif /* wxNO_RTTI */ + +#endif /* _WX_PLATFORM_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/platinfo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/platinfo.h new file mode 100644 index 0000000000..f82080e587 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/platinfo.h @@ -0,0 +1,369 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/platinfo.h +// Purpose: declaration of the wxPlatformInfo class +// Author: Francesco Montorsi +// Modified by: +// Created: 07.07.2006 (based on wxToolkitInfo) +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PLATINFO_H_ +#define _WX_PLATINFO_H_ + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// wxPlatformInfo enums & structs +// ---------------------------------------------------------------------------- + +// VERY IMPORTANT: when changing these enum values, also change the relative +// string tables in src/common/platinfo.cpp + + +// families & sub-families of operating systems +enum wxOperatingSystemId +{ + wxOS_UNKNOWN = 0, // returned on error + + wxOS_MAC_OS = 1 << 0, // Apple Mac OS 8/9/X with Mac paths + wxOS_MAC_OSX_DARWIN = 1 << 1, // Apple Mac OS X with Unix paths + wxOS_MAC = wxOS_MAC_OS|wxOS_MAC_OSX_DARWIN, + + wxOS_WINDOWS_9X = 1 << 2, // Windows 9x family (95/98/ME) + wxOS_WINDOWS_NT = 1 << 3, // Windows NT family (NT/2000/XP) + wxOS_WINDOWS_MICRO = 1 << 4, // MicroWindows + wxOS_WINDOWS_CE = 1 << 5, // Windows CE (Window Mobile) + wxOS_WINDOWS = wxOS_WINDOWS_9X | + wxOS_WINDOWS_NT | + wxOS_WINDOWS_MICRO | + wxOS_WINDOWS_CE, + + wxOS_UNIX_LINUX = 1 << 6, // Linux + wxOS_UNIX_FREEBSD = 1 << 7, // FreeBSD + wxOS_UNIX_OPENBSD = 1 << 8, // OpenBSD + wxOS_UNIX_NETBSD = 1 << 9, // NetBSD + wxOS_UNIX_SOLARIS = 1 << 10, // SunOS + wxOS_UNIX_AIX = 1 << 11, // AIX + wxOS_UNIX_HPUX = 1 << 12, // HP/UX + wxOS_UNIX = wxOS_UNIX_LINUX | + wxOS_UNIX_FREEBSD | + wxOS_UNIX_OPENBSD | + wxOS_UNIX_NETBSD | + wxOS_UNIX_SOLARIS | + wxOS_UNIX_AIX | + wxOS_UNIX_HPUX, + + // 1<<13 and 1<<14 available for other Unix flavours + + wxOS_DOS = 1 << 15, // Microsoft DOS + wxOS_OS2 = 1 << 16 // OS/2 +}; + +// list of wxWidgets ports - some of them can be used with more than +// a single toolkit. +enum wxPortId +{ + wxPORT_UNKNOWN = 0, // returned on error + + wxPORT_BASE = 1 << 0, // wxBase, no native toolkit used + + wxPORT_MSW = 1 << 1, // wxMSW, native toolkit is Windows API + wxPORT_MOTIF = 1 << 2, // wxMotif, using [Open]Motif or Lesstif + wxPORT_GTK = 1 << 3, // wxGTK, using GTK+ 1.x, 2.x, GPE or Maemo + wxPORT_DFB = 1 << 4, // wxDFB, using wxUniversal + wxPORT_X11 = 1 << 5, // wxX11, using wxUniversal + wxPORT_PM = 1 << 6, // wxOS2, using OS/2 Presentation Manager + wxPORT_OS2 = wxPORT_PM, // wxOS2, using OS/2 Presentation Manager + wxPORT_MAC = 1 << 7, // wxOSX (former wxMac), using Cocoa, Carbon or iPhone API + wxPORT_OSX = wxPORT_MAC, // wxOSX, using Cocoa, Carbon or iPhone API + wxPORT_COCOA = 1 << 8, // wxCocoa, using Cocoa NextStep/Mac API + wxPORT_WINCE = 1 << 9 // wxWinCE, toolkit is WinCE SDK API +}; + +// architecture of the operating system +// (regardless of the build environment of wxWidgets library - see +// wxIsPlatform64bit documentation for more info) +enum wxArchitecture +{ + wxARCH_INVALID = -1, // returned on error + + wxARCH_32, // 32 bit + wxARCH_64, + + wxARCH_MAX +}; + + +// endian-ness of the machine +enum wxEndianness +{ + wxENDIAN_INVALID = -1, // returned on error + + wxENDIAN_BIG, // 4321 + wxENDIAN_LITTLE, // 1234 + wxENDIAN_PDP, // 3412 + + wxENDIAN_MAX +}; + +// informations about a linux distro returned by the lsb_release utility +struct wxLinuxDistributionInfo +{ + wxString Id; + wxString Release; + wxString CodeName; + wxString Description; + + bool operator==(const wxLinuxDistributionInfo& ldi) const + { + return Id == ldi.Id && + Release == ldi.Release && + CodeName == ldi.CodeName && + Description == ldi.Description; + } + + bool operator!=(const wxLinuxDistributionInfo& ldi) const + { return !(*this == ldi); } +}; + + +// ---------------------------------------------------------------------------- +// wxPlatformInfo +// ---------------------------------------------------------------------------- + +// Information about the toolkit that the app is running under and some basic +// platform and architecture info +class WXDLLIMPEXP_BASE wxPlatformInfo +{ +public: + wxPlatformInfo(); + wxPlatformInfo(wxPortId pid, + int tkMajor = -1, int tkMinor = -1, + wxOperatingSystemId id = wxOS_UNKNOWN, + int osMajor = -1, int osMinor = -1, + wxArchitecture arch = wxARCH_INVALID, + wxEndianness endian = wxENDIAN_INVALID, + bool usingUniversal = false); + + // default copy ctor, assignment operator and dtor are ok + + bool operator==(const wxPlatformInfo &t) const; + + bool operator!=(const wxPlatformInfo &t) const + { return !(*this == t); } + + // Gets a wxPlatformInfo already initialized with the values for + // the currently running platform. + static const wxPlatformInfo& Get(); + + + + // string -> enum conversions + // --------------------------------- + + static wxOperatingSystemId GetOperatingSystemId(const wxString &name); + static wxPortId GetPortId(const wxString &portname); + + static wxArchitecture GetArch(const wxString &arch); + static wxEndianness GetEndianness(const wxString &end); + + // enum -> string conversions + // --------------------------------- + + static wxString GetOperatingSystemFamilyName(wxOperatingSystemId os); + static wxString GetOperatingSystemIdName(wxOperatingSystemId os); + static wxString GetPortIdName(wxPortId port, bool usingUniversal); + static wxString GetPortIdShortName(wxPortId port, bool usingUniversal); + + static wxString GetArchName(wxArchitecture arch); + static wxString GetEndiannessName(wxEndianness end); + + + // getters + // ----------------- + + int GetOSMajorVersion() const + { return m_osVersionMajor; } + int GetOSMinorVersion() const + { return m_osVersionMinor; } + + // return true if the OS version >= major.minor + bool CheckOSVersion(int major, int minor) const + { + return DoCheckVersion(GetOSMajorVersion(), + GetOSMinorVersion(), + major, + minor); + } + + int GetToolkitMajorVersion() const + { return m_tkVersionMajor; } + int GetToolkitMinorVersion() const + { return m_tkVersionMinor; } + + bool CheckToolkitVersion(int major, int minor) const + { + return DoCheckVersion(GetToolkitMajorVersion(), + GetToolkitMinorVersion(), + major, + minor); + } + + bool IsUsingUniversalWidgets() const + { return m_usingUniversal; } + + wxOperatingSystemId GetOperatingSystemId() const + { return m_os; } + wxLinuxDistributionInfo GetLinuxDistributionInfo() const + { return m_ldi; } + wxPortId GetPortId() const + { return m_port; } + wxArchitecture GetArchitecture() const + { return m_arch; } + wxEndianness GetEndianness() const + { return m_endian; } + + + // string getters + // ----------------- + + wxString GetOperatingSystemFamilyName() const + { return GetOperatingSystemFamilyName(m_os); } + wxString GetOperatingSystemIdName() const + { return GetOperatingSystemIdName(m_os); } + wxString GetPortIdName() const + { return GetPortIdName(m_port, m_usingUniversal); } + wxString GetPortIdShortName() const + { return GetPortIdShortName(m_port, m_usingUniversal); } + wxString GetArchName() const + { return GetArchName(m_arch); } + wxString GetEndiannessName() const + { return GetEndiannessName(m_endian); } + wxString GetOperatingSystemDescription() const + { return m_osDesc; } + wxString GetDesktopEnvironment() const + { return m_desktopEnv; } + + static wxString GetOperatingSystemDirectory(); + // doesn't make sense to store inside wxPlatformInfo the OS directory, + // thus this function is static; note that this function simply calls + // wxGetOSDirectory() and is here just to make it easier for the user to + // find it that feature (global functions can be difficult to find in the docs) + + // setters + // ----------------- + + void SetOSVersion(int major, int minor) + { m_osVersionMajor=major; m_osVersionMinor=minor; } + void SetToolkitVersion(int major, int minor) + { m_tkVersionMajor=major; m_tkVersionMinor=minor; } + + void SetOperatingSystemId(wxOperatingSystemId n) + { m_os = n; } + void SetOperatingSystemDescription(const wxString& desc) + { m_osDesc = desc; } + void SetPortId(wxPortId n) + { m_port = n; } + void SetArchitecture(wxArchitecture n) + { m_arch = n; } + void SetEndianness(wxEndianness n) + { m_endian = n; } + + void SetDesktopEnvironment(const wxString& de) + { m_desktopEnv = de; } + void SetLinuxDistributionInfo(const wxLinuxDistributionInfo& di) + { m_ldi = di; } + + + // miscellaneous + // ----------------- + + bool IsOk() const + { + return m_osVersionMajor != -1 && m_osVersionMinor != -1 && + m_os != wxOS_UNKNOWN && + !m_osDesc.IsEmpty() && + m_tkVersionMajor != -1 && m_tkVersionMinor != -1 && + m_port != wxPORT_UNKNOWN && + m_arch != wxARCH_INVALID && + m_endian != wxENDIAN_INVALID; + + // do not check linux-specific info; it's ok to have them empty + } + + +protected: + static bool DoCheckVersion(int majorCur, int minorCur, int major, int minor) + { + return majorCur > major || (majorCur == major && minorCur >= minor); + } + + void InitForCurrentPlatform(); + + + // OS stuff + // ----------------- + + // Version of the OS; valid if m_os != wxOS_UNKNOWN + // (-1 means not initialized yet). + int m_osVersionMajor, + m_osVersionMinor; + + // Operating system ID. + wxOperatingSystemId m_os; + + // Operating system description. + wxString m_osDesc; + + + // linux-specific + // ----------------- + + wxString m_desktopEnv; + wxLinuxDistributionInfo m_ldi; + + + // toolkit + // ----------------- + + // Version of the underlying toolkit + // (-1 means not initialized yet; zero means no toolkit). + int m_tkVersionMajor, m_tkVersionMinor; + + // name of the wxWidgets port + wxPortId m_port; + + // is using wxUniversal widgets? + bool m_usingUniversal; + + + // others + // ----------------- + + // architecture of the OS/machine + wxArchitecture m_arch; + + // endianness of the machine + wxEndianness m_endian; +}; + + +#if WXWIN_COMPATIBILITY_2_6 + #define wxUNKNOWN_PLATFORM wxOS_UNKNOWN + #define wxUnix wxOS_UNIX + #define wxWin95 wxOS_WINDOWS_9X + #define wxWIN95 wxOS_WINDOWS_9X + #define wxWINDOWS_NT wxOS_WINDOWS_NT + #define wxMSW wxOS_WINDOWS + #define wxWinCE wxOS_WINDOWS_CE + #define wxWIN32S wxOS_WINDOWS_9X + + #define wxOS2 wxPORT_OS2 + #define wxCocoa wxPORT_MAC + #define wxMac wxPORT_MAC + #define wxMotif wxPORT_MOTIF + #define wxGTK wxPORT_GTK +#endif // WXWIN_COMPATIBILITY_2_6 + +#endif // _WX_PLATINFO_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/popupwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/popupwin.h new file mode 100644 index 0000000000..6b61517f39 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/popupwin.h @@ -0,0 +1,195 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/popupwin.h +// Purpose: wxPopupWindow interface declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.01.01 +// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_POPUPWIN_H_BASE_ +#define _WX_POPUPWIN_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_POPUPWIN + +#include "wx/nonownedwnd.h" + +// ---------------------------------------------------------------------------- +// wxPopupWindow: a special kind of top level window used for popup menus, +// combobox popups and such. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPopupWindowBase : public wxNonOwnedWindow +{ +public: + wxPopupWindowBase() { } + virtual ~wxPopupWindowBase(); + + // create the popup window + // + // style may only contain border flags + bool Create(wxWindow *parent, int style = wxBORDER_NONE); + + // move the popup window to the right position, i.e. such that it is + // entirely visible + // + // the popup is positioned at ptOrigin + size if it opens below and to the + // right (default), at ptOrigin - sizePopup if it opens above and to the + // left &c + // + // the point must be given in screen coordinates! + virtual void Position(const wxPoint& ptOrigin, + const wxSize& size); + + virtual bool IsTopLevel() const { return true; } + + wxDECLARE_NO_COPY_CLASS(wxPopupWindowBase); +}; + + +// include the real class declaration +#if defined(__WXMSW__) + #include "wx/msw/popupwin.h" +#elif defined(__WXPM__) + #include "wx/os2/popupwin.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/popupwin.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/popupwin.h" +#elif defined(__WXX11__) + #include "wx/x11/popupwin.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/popupwin.h" +#elif defined(__WXDFB__) + #include "wx/dfb/popupwin.h" +#elif defined(__WXMAC__) + #include "wx/osx/popupwin.h" +#else + #error "wxPopupWindow is not supported under this platform." +#endif + +// ---------------------------------------------------------------------------- +// wxPopupTransientWindow: a wxPopupWindow which disappears automatically +// when the user clicks mouse outside it or if it loses focus in any other way +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxPopupWindowHandler; +class WXDLLIMPEXP_FWD_CORE wxPopupFocusHandler; + +class WXDLLIMPEXP_CORE wxPopupTransientWindow : public wxPopupWindow +{ +public: + // ctors + wxPopupTransientWindow() { Init(); } + wxPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE); + + virtual ~wxPopupTransientWindow(); + + // popup the window (this will show it too) and keep focus at winFocus + // (or itself if it's NULL), dismiss the popup if we lose focus + virtual void Popup(wxWindow *focus = NULL); + + // hide the window + virtual void Dismiss(); + + // can the window be dismissed now? + // + // VZ: where is this used?? + virtual bool CanDismiss() + { return true; } + + // called when a mouse is pressed while the popup is shown: return true + // from here to prevent its normal processing by the popup (which consists + // in dismissing it if the mouse is clicked outside it) + virtual bool ProcessLeftDown(wxMouseEvent& event); + + // Overridden to grab the input on some plaforms + virtual bool Show( bool show = true ); + + // Override to implement delayed destruction of this window. + virtual bool Destroy(); + +protected: + // common part of all ctors + void Init(); + + // this is called when the popup is disappeared because of anything + // else but direct call to Dismiss() + virtual void OnDismiss(); + + // dismiss and notify the derived class + void DismissAndNotify(); + + // remove our event handlers + void PopHandlers(); + + // get alerted when child gets deleted from under us + void OnDestroy(wxWindowDestroyEvent& event); + +#if defined(__WXMSW__) ||(defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON) + // Check if the mouse needs to be captured or released: we must release + // when it's inside our window if we want the embedded controls to work. + void OnIdle(wxIdleEvent& event); +#endif + + // the child of this popup if any + wxWindow *m_child; + + // the window which has the focus while we're shown + wxWindow *m_focus; + + // these classes may call our DismissAndNotify() + friend class wxPopupWindowHandler; + friend class wxPopupFocusHandler; + + // the handlers we created, may be NULL (if not, must be deleted) + wxPopupWindowHandler *m_handlerPopup; + wxPopupFocusHandler *m_handlerFocus; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxPopupTransientWindow) + wxDECLARE_NO_COPY_CLASS(wxPopupTransientWindow); +}; + +#if wxUSE_COMBOBOX && defined(__WXUNIVERSAL__) + +// ---------------------------------------------------------------------------- +// wxPopupComboWindow: wxPopupTransientWindow used by wxComboBox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxComboBox; +class WXDLLIMPEXP_FWD_CORE wxComboCtrl; + +class WXDLLIMPEXP_CORE wxPopupComboWindow : public wxPopupTransientWindow +{ +public: + wxPopupComboWindow() { m_combo = NULL; } + wxPopupComboWindow(wxComboCtrl *parent); + + bool Create(wxComboCtrl *parent); + + // position the window correctly relatively to the combo + void PositionNearCombo(); + +protected: + // notify the combo here + virtual void OnDismiss(); + + // forward the key presses to the combobox + void OnKeyDown(wxKeyEvent& event); + + // the parent combobox + wxComboCtrl *m_combo; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxPopupComboWindow) +}; + +#endif // wxUSE_COMBOBOX && defined(__WXUNIVERSAL__) + +#endif // wxUSE_POPUPWIN + +#endif // _WX_POPUPWIN_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/position.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/position.h new file mode 100644 index 0000000000..bd324e2343 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/position.h @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/position.h +// Purpose: Common structure and methods for positional information. +// Author: Vadim Zeitlin, Robin Dunn, Brad Anderson, Bryan Petty +// Created: 2007-03-13 +// Copyright: (c) 2007 The wxWidgets Team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_POSITION_H_ +#define _WX_POSITION_H_ + +#include "wx/gdicmn.h" + +class WXDLLIMPEXP_CORE wxPosition +{ +public: + wxPosition() : m_row(0), m_column(0) {} + wxPosition(int row, int col) : m_row(row), m_column(col) {} + + // default copy ctor and assignment operator are okay. + + int GetRow() const { return m_row; } + int GetColumn() const { return m_column; } + int GetCol() const { return GetColumn(); } + void SetRow(int row) { m_row = row; } + void SetColumn(int column) { m_column = column; } + void SetCol(int column) { SetColumn(column); } + + bool operator==(const wxPosition& p) const + { return m_row == p.m_row && m_column == p.m_column; } + bool operator!=(const wxPosition& p) const + { return !(*this == p); } + + wxPosition& operator+=(const wxPosition& p) + { m_row += p.m_row; m_column += p.m_column; return *this; } + wxPosition& operator-=(const wxPosition& p) + { m_row -= p.m_row; m_column -= p.m_column; return *this; } + wxPosition& operator+=(const wxSize& s) + { m_row += s.y; m_column += s.x; return *this; } + wxPosition& operator-=(const wxSize& s) + { m_row -= s.y; m_column -= s.x; return *this; } + + wxPosition operator+(const wxPosition& p) const + { return wxPosition(m_row + p.m_row, m_column + p.m_column); } + wxPosition operator-(const wxPosition& p) const + { return wxPosition(m_row - p.m_row, m_column - p.m_column); } + wxPosition operator+(const wxSize& s) const + { return wxPosition(m_row + s.y, m_column + s.x); } + wxPosition operator-(const wxSize& s) const + { return wxPosition(m_row - s.y, m_column - s.x); } + +private: + int m_row; + int m_column; +}; + +#endif // _WX_POSITION_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/power.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/power.h new file mode 100644 index 0000000000..17e81b6efb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/power.h @@ -0,0 +1,108 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/power.h +// Purpose: functions and classes for system power management +// Author: Vadim Zeitlin +// Modified by: +// Created: 2006-05-27 +// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_POWER_H_ +#define _WX_POWER_H_ + +#include "wx/event.h" + +// ---------------------------------------------------------------------------- +// power management constants +// ---------------------------------------------------------------------------- + +enum wxPowerType +{ + wxPOWER_SOCKET, + wxPOWER_BATTERY, + wxPOWER_UNKNOWN +}; + +enum wxBatteryState +{ + wxBATTERY_NORMAL_STATE, // system is fully usable + wxBATTERY_LOW_STATE, // start to worry + wxBATTERY_CRITICAL_STATE, // save quickly + wxBATTERY_SHUTDOWN_STATE, // too late + wxBATTERY_UNKNOWN_STATE +}; + +// ---------------------------------------------------------------------------- +// wxPowerEvent is generated when the system online status changes +// ---------------------------------------------------------------------------- + +// currently the power events are only available under Windows, to avoid +// compiling in the code for handling them which is never going to be invoked +// under the other platforms, we define wxHAS_POWER_EVENTS symbol if this event +// is available, it should be used to guard all code using wxPowerEvent +#ifdef __WINDOWS__ + +#define wxHAS_POWER_EVENTS + +class WXDLLIMPEXP_BASE wxPowerEvent : public wxEvent +{ +public: + wxPowerEvent() // just for use by wxRTTI + : m_veto(false) { } + + wxPowerEvent(wxEventType evtType) : wxEvent(wxID_NONE, evtType) + { + m_veto = false; + } + + // Veto the operation (only makes sense with EVT_POWER_SUSPENDING) + void Veto() { m_veto = true; } + + bool IsVetoed() const { return m_veto; } + + + // default copy ctor, assignment operator and dtor are ok + + virtual wxEvent *Clone() const { return new wxPowerEvent(*this); } + +private: + bool m_veto; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPowerEvent) +}; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_SUSPENDING, wxPowerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_SUSPENDED, wxPowerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_SUSPEND_CANCEL, wxPowerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_POWER_RESUME, wxPowerEvent ); + +typedef void (wxEvtHandler::*wxPowerEventFunction)(wxPowerEvent&); + +#define wxPowerEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxPowerEventFunction, func) + +#define EVT_POWER_SUSPENDING(func) \ + wx__DECLARE_EVT0(wxEVT_POWER_SUSPENDING, wxPowerEventHandler(func)) +#define EVT_POWER_SUSPENDED(func) \ + wx__DECLARE_EVT0(wxEVT_POWER_SUSPENDED, wxPowerEventHandler(func)) +#define EVT_POWER_SUSPEND_CANCEL(func) \ + wx__DECLARE_EVT0(wxEVT_POWER_SUSPEND_CANCEL, wxPowerEventHandler(func)) +#define EVT_POWER_RESUME(func) \ + wx__DECLARE_EVT0(wxEVT_POWER_RESUME, wxPowerEventHandler(func)) + +#else // no support for power events + #undef wxHAS_POWER_EVENTS +#endif // support for power events/no support + +// ---------------------------------------------------------------------------- +// power management functions +// ---------------------------------------------------------------------------- + +// return the current system power state: online or offline +WXDLLIMPEXP_BASE wxPowerType wxGetPowerType(); + +// return approximate battery state +WXDLLIMPEXP_BASE wxBatteryState wxGetBatteryState(); + +#endif // _WX_POWER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/preferences.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/preferences.h new file mode 100644 index 0000000000..7eee648289 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/preferences.h @@ -0,0 +1,145 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/preferences.h +// Purpose: Declaration of wxPreferencesEditor class. +// Author: Vaclav Slavik +// Created: 2013-02-19 +// Copyright: (c) 2013 Vaclav Slavik <vslavik@fastmail.fm> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PREFERENCES_H_ +#define _WX_PREFERENCES_H_ + +#include "wx/defs.h" + +#if wxUSE_PREFERENCES_EDITOR + +#include "wx/bitmap.h" +#include "wx/vector.h" + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class wxPreferencesEditorImpl; + +#if defined(__WXOSX_COCOA__) + // GetLargeIcon() is used + #define wxHAS_PREF_EDITOR_ICONS + // Changes should be applied immediately + #define wxHAS_PREF_EDITOR_APPLY_IMMEDIATELY + // The dialog is shown non-modally. + #define wxHAS_PREF_EDITOR_MODELESS +#elif defined(__WXGTK__) + // Changes should be applied immediately + #define wxHAS_PREF_EDITOR_APPLY_IMMEDIATELY + // The dialog is shown non-modally. + #define wxHAS_PREF_EDITOR_MODELESS +#endif + +// ---------------------------------------------------------------------------- +// wxPreferencesEditor: Native preferences editing +// ---------------------------------------------------------------------------- + +// One page of a preferences window +class WXDLLIMPEXP_CORE wxPreferencesPage +{ +public: + wxPreferencesPage() {} + virtual ~wxPreferencesPage() {} + + // Name of the page, used e.g. for tabs + virtual wxString GetName() const = 0; + + // Return 32x32 icon used for the page. Currently only used on OS X, where + // implementation is required; unused on other platforms. Because of this, + // the method is only pure virtual on platforms that use it. +#ifdef wxHAS_PREF_EDITOR_ICONS + virtual wxBitmap GetLargeIcon() const = 0; +#else + virtual wxBitmap GetLargeIcon() const { return wxBitmap(); } +#endif + + // Create a window (usually a wxPanel) for this page. The caller takes + // ownership of the returned window. + virtual wxWindow *CreateWindow(wxWindow *parent) = 0; + + wxDECLARE_NO_COPY_CLASS(wxPreferencesPage); +}; + + +// Helper for implementing some common pages (General, Advanced) +class WXDLLIMPEXP_CORE wxStockPreferencesPage : public wxPreferencesPage +{ +public: + enum Kind + { + Kind_General, + Kind_Advanced + }; + + wxStockPreferencesPage(Kind kind) : m_kind(kind) {} + Kind GetKind() const { return m_kind; } + + virtual wxString GetName() const; +#ifdef __WXOSX_COCOA__ + virtual wxBitmap GetLargeIcon() const; +#endif + +private: + Kind m_kind; +}; + + +// Notice that this class does not inherit from wxWindow. +class WXDLLIMPEXP_CORE wxPreferencesEditor +{ +public: + // Ctor creates an empty editor, use AddPage() to add controls to it. + wxPreferencesEditor(const wxString& title = wxString()); + + // Dtor destroys the dialog if still shown. + virtual ~wxPreferencesEditor(); + + // Add a new page to the editor. The editor takes ownership of the page + // and won't delete it until it is destroyed itself. + void AddPage(wxPreferencesPage *page); + + // Show the preferences dialog or bring it to the top if it's already + // shown. Notice that this method may or may not block depending on the + // platform, i.e. depending on whether the dialog is modal or not. + virtual void Show(wxWindow* parent); + + // Hide the currently shown dialog, if any. This is typically used to + // dismiss the dialog if the object whose preferences it is editing was + // closed. + void Dismiss(); + + // Whether changes to values in the pages should be applied immediately + // (OS X, GTK+) or only when the user clicks OK/Apply (Windows) + static bool ShouldApplyChangesImmediately() + { +#ifdef wxHAS_PREF_EDITOR_APPLY_IMMEDIATELY + return true; +#else + return false; +#endif + } + + // Whether the dialog is shown modally, i.e. Show() blocks, or not. + static bool ShownModally() + { +#ifdef wxHAS_PREF_EDITOR_MODELESS + return false; +#else + return true; +#endif + } + +private: + wxPreferencesEditorImpl* m_impl; + + wxDECLARE_NO_COPY_CLASS(wxPreferencesEditor); +}; + +#endif // wxUSE_PREFERENCES_EDITOR + +#endif // _WX_PREFERENCES_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/print.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/print.h new file mode 100644 index 0000000000..56ebcf6597 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/print.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/print.h +// Purpose: Base header for printer classes +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRINT_H_BASE_ +#define _WX_PRINT_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_PRINTING_ARCHITECTURE + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + +#include "wx/msw/printwin.h" + +#elif defined(__WXMAC__) + +#include "wx/osx/printmac.h" + +#elif defined(__WXPM__) + +#include "wx/os2/printos2.h" + +#else + +#include "wx/generic/printps.h" + +#endif + +#endif // wxUSE_PRINTING_ARCHITECTURE +#endif + // _WX_PRINT_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/printdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/printdlg.h new file mode 100644 index 0000000000..d7e7e4e267 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/printdlg.h @@ -0,0 +1,121 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/printdlg.h +// Purpose: Base header and class for print dialogs +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRINTDLG_H_BASE_ +#define _WX_PRINTDLG_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/event.h" +#include "wx/dialog.h" +#include "wx/intl.h" +#include "wx/cmndata.h" + + +// --------------------------------------------------------------------------- +// wxPrintDialogBase: interface for the dialog for printing +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPrintDialogBase : public wxDialog +{ +public: + wxPrintDialogBase() { } + wxPrintDialogBase(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString &title = wxEmptyString, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE); + + virtual wxPrintDialogData& GetPrintDialogData() = 0; + virtual wxPrintData& GetPrintData() = 0; + virtual wxDC *GetPrintDC() = 0; + +private: + DECLARE_ABSTRACT_CLASS(wxPrintDialogBase) + wxDECLARE_NO_COPY_CLASS(wxPrintDialogBase); +}; + +// --------------------------------------------------------------------------- +// wxPrintDialog: the dialog for printing. +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPrintDialog : public wxObject +{ +public: + wxPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); + wxPrintDialog(wxWindow *parent, wxPrintData* data); + virtual ~wxPrintDialog(); + + virtual int ShowModal(); + + virtual wxPrintDialogData& GetPrintDialogData(); + virtual wxPrintData& GetPrintData(); + virtual wxDC *GetPrintDC(); + +private: + wxPrintDialogBase *m_pimpl; + +private: + DECLARE_DYNAMIC_CLASS(wxPrintDialog) + wxDECLARE_NO_COPY_CLASS(wxPrintDialog); +}; + +// --------------------------------------------------------------------------- +// wxPageSetupDialogBase: interface for the page setup dialog +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPageSetupDialogBase: public wxDialog +{ +public: + wxPageSetupDialogBase() { } + wxPageSetupDialogBase(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString &title = wxEmptyString, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE); + + virtual wxPageSetupDialogData& GetPageSetupDialogData() = 0; + +private: + DECLARE_ABSTRACT_CLASS(wxPageSetupDialogBase) + wxDECLARE_NO_COPY_CLASS(wxPageSetupDialogBase); +}; + +// --------------------------------------------------------------------------- +// wxPageSetupDialog: the page setup dialog +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPageSetupDialog: public wxObject +{ +public: + wxPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL); + virtual ~wxPageSetupDialog(); + + int ShowModal(); + wxPageSetupDialogData& GetPageSetupDialogData(); + // old name + wxPageSetupDialogData& GetPageSetupData(); + +private: + wxPageSetupDialogBase *m_pimpl; + +private: + DECLARE_DYNAMIC_CLASS(wxPageSetupDialog) + wxDECLARE_NO_COPY_CLASS(wxPageSetupDialog); +}; + +#endif + +#endif + // _WX_PRINTDLG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/eventloopsourcesmanager.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/eventloopsourcesmanager.h new file mode 100644 index 0000000000..54ce5b0fce --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/eventloopsourcesmanager.h @@ -0,0 +1,25 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/eventloopsourcesmanager.h +// Purpose: declares wxEventLoopSourcesManagerBase class +// Author: Rob Bresalier +// Created: 2013-06-19 +// Copyright: (c) 2013 Rob Bresalier +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_EVENTLOOPSOURCESMANAGER_H_ +#define _WX_PRIVATE_EVENTLOOPSOURCESMANAGER_H_ + +// For pulling in the value of wxUSE_EVENTLOOP_SOURCE +#include "wx/evtloop.h" + +class WXDLLIMPEXP_BASE wxEventLoopSourcesManagerBase +{ +public: +#if wxUSE_EVENTLOOP_SOURCE + virtual wxEventLoopSource* + AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags) = 0; +#endif +}; + +#endif // _WX_PRIVATE_EVENTLOOPSOURCESMANAGER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fd.h new file mode 100644 index 0000000000..3f4a604c37 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fd.h @@ -0,0 +1,53 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/fd.h +// Purpose: private stuff for working with file descriptors +// Author: Vadim Zeitlin +// Created: 2008-11-23 (moved from wx/unix/private.h) +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_FD_H_ +#define _WX_PRIVATE_FD_H_ + +// standard Linux headers produce many warnings when used with icc so define +// our own replacements for FD_XXX macros +#if defined(__INTELC__) && defined(__LINUX__) + inline void wxFD_ZERO(fd_set *fds) + { + #pragma warning(push) + #pragma warning(disable:593) + FD_ZERO(fds); + #pragma warning(pop) + } + + inline void wxFD_SET(int fd, fd_set *fds) + { + #pragma warning(push, 1) + #pragma warning(disable:1469) + FD_SET(fd, fds); + #pragma warning(pop) + } + + inline bool wxFD_ISSET(int fd, fd_set *fds) + { + #pragma warning(push, 1) + #pragma warning(disable:1469) + return FD_ISSET(fd, fds); + #pragma warning(pop) + } + inline void wxFD_CLR(int fd, fd_set *fds) + { + #pragma warning(push, 1) + #pragma warning(disable:1469) + FD_CLR(fd, fds); + #pragma warning(pop) + } +#else // !__INTELC__ + #define wxFD_ZERO(fds) FD_ZERO(fds) + #define wxFD_SET(fd, fds) FD_SET(fd, fds) + #define wxFD_ISSET(fd, fds) FD_ISSET(fd, fds) + #define wxFD_CLR(fd, fds) FD_CLR(fd, fds) +#endif // __INTELC__/!__INTELC__ + +#endif // _WX_PRIVATE_FD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdiodispatcher.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdiodispatcher.h new file mode 100644 index 0000000000..0b85505cc0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdiodispatcher.h @@ -0,0 +1,118 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/fdiodispatcher.h +// Purpose: classes for dispatching IO notifications for file descriptors +// Authors: Lukasz Michalski +// Created: December 2006 +// Copyright: (c) Lukasz Michalski +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_FDIODISPATCHER_H_ +#define _WX_PRIVATE_FDIODISPATCHER_H_ + +#include "wx/hashmap.h" +#include "wx/private/fdiohandler.h" + +// those flags describes sets where descriptor should be added +enum wxFDIODispatcherEntryFlags +{ + wxFDIO_INPUT = 1, + wxFDIO_OUTPUT = 2, + wxFDIO_EXCEPTION = 4, + wxFDIO_ALL = wxFDIO_INPUT | wxFDIO_OUTPUT | wxFDIO_EXCEPTION +}; + +// base class for wxSelectDispatcher and wxEpollDispatcher +class WXDLLIMPEXP_BASE wxFDIODispatcher +{ +public: + enum { TIMEOUT_INFINITE = -1 }; + + // return the global dispatcher to be used for IO events, can be NULL only + // if wxSelectDispatcher wasn't compiled into the library at all as + // creating it never fails + // + // don't delete the returned pointer + static wxFDIODispatcher *Get(); + + // if we have any registered handlers, check for any pending events to them + // and dispatch them -- this is used from wxX11 and wxDFB event loops + // implementation + static void DispatchPending(); + + // register handler for the given descriptor with the dispatcher, return + // true on success or false on error + virtual bool RegisterFD(int fd, wxFDIOHandler *handler, int flags) = 0; + + // modify descriptor flags or handler, return true on success + virtual bool ModifyFD(int fd, wxFDIOHandler *handler, int flags) = 0; + + // unregister descriptor previously registered with RegisterFD() + virtual bool UnregisterFD(int fd) = 0; + + // check if any events are currently available without dispatching them + virtual bool HasPending() const = 0; + + // wait for an event for at most timeout milliseconds and process it; + // return the number of events processed (possibly 0 if timeout expired) or + // -1 if an error occurred + virtual int Dispatch(int timeout = TIMEOUT_INFINITE) = 0; + + virtual ~wxFDIODispatcher() { } +}; + +//entry for wxFDIOHandlerMap +struct wxFDIOHandlerEntry +{ + wxFDIOHandlerEntry() + { + } + + wxFDIOHandlerEntry(wxFDIOHandler *handler_, int flags_) + : handler(handler_), + flags(flags_) + { + } + + wxFDIOHandler *handler; + int flags; +}; + +// this hash is used to map file descriptors to their handlers +WX_DECLARE_HASH_MAP( + int, + wxFDIOHandlerEntry, + wxIntegerHash, + wxIntegerEqual, + wxFDIOHandlerMap +); + +// FDIODispatcher that holds map fd <-> FDIOHandler, this should be used if +// this map isn't maintained elsewhere already as it is usually needed anyhow +// +// notice that all functions for FD management have implementation +// in the base class and should be called from the derived classes +class WXDLLIMPEXP_BASE wxMappedFDIODispatcher : public wxFDIODispatcher +{ +public: + // find the handler for the given fd, return NULL if none + wxFDIOHandler *FindHandler(int fd) const; + + // register handler for the given descriptor with the dispatcher, return + // true on success or false on error + virtual bool RegisterFD(int fd, wxFDIOHandler *handler, int flags); + + // modify descriptor flags or handler, return true on success + virtual bool ModifyFD(int fd, wxFDIOHandler *handler, int flags); + + // unregister descriptor previously registered with RegisterFD() + virtual bool UnregisterFD(int fd); + + virtual ~wxMappedFDIODispatcher() { } + +protected: + // the fd -> handler map containing all the registered handlers + wxFDIOHandlerMap m_handlers; +}; + +#endif // _WX_PRIVATE_FDIODISPATCHER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdioeventloopsourcehandler.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdioeventloopsourcehandler.h new file mode 100644 index 0000000000..f457a09e5c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdioeventloopsourcehandler.h @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/fdioeventloopsourcehandler.h +// Purpose: declares wxFDIOEventLoopSourceHandler class +// Author: Rob Bresalier, Vadim Zeitlin +// Created: 2013-06-13 (extracted from src/unix/evtloopunix.cpp) +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// (c) 2013 Rob Bresalier +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H +#define _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H + +#include "wx/evtloopsrc.h" + +// This class is a temporary bridge between event loop sources and +// FDIODispatcher. It is going to be removed soon, when all subject interfaces +// are modified +class wxFDIOEventLoopSourceHandler : public wxFDIOHandler +{ +public: + wxEXPLICIT wxFDIOEventLoopSourceHandler(wxEventLoopSourceHandler* handler) + : m_handler(handler) + { + } + + // Just forward to the real handler. + virtual void OnReadWaiting() { m_handler->OnReadWaiting(); } + virtual void OnWriteWaiting() { m_handler->OnWriteWaiting(); } + virtual void OnExceptionWaiting() { m_handler->OnExceptionWaiting(); } + +protected: + wxEventLoopSourceHandler* const m_handler; + + wxDECLARE_NO_COPY_CLASS(wxFDIOEventLoopSourceHandler); +}; + +#endif // _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdiohandler.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdiohandler.h new file mode 100644 index 0000000000..94e36490cd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdiohandler.h @@ -0,0 +1,53 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/fdiohandler.h +// Purpose: declares wxFDIOHandler class +// Author: Vadim Zeitlin +// Created: 2009-08-17 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_FDIOHANDLER_H_ +#define _WX_PRIVATE_FDIOHANDLER_H_ + +// ---------------------------------------------------------------------------- +// wxFDIOHandler: interface used to process events on file descriptors +// ---------------------------------------------------------------------------- + +class wxFDIOHandler +{ +public: + wxFDIOHandler() { m_regmask = 0; } + + // called when descriptor is available for non-blocking read + virtual void OnReadWaiting() = 0; + + // called when descriptor is available for non-blocking write + virtual void OnWriteWaiting() = 0; + + // called when there is exception on descriptor + virtual void OnExceptionWaiting() = 0; + + // called to check if the handler is still valid, only used by + // wxSocketImplUnix currently + virtual bool IsOk() const { return true; } + + + // get/set the mask of events for which we're currently registered for: + // it's a combination of wxFDIO_{INPUT,OUTPUT,EXCEPTION} + int GetRegisteredEvents() const { return m_regmask; } + void SetRegisteredEvent(int flag) { m_regmask |= flag; } + void ClearRegisteredEvent(int flag) { m_regmask &= ~flag; } + + + // virtual dtor for the base class + virtual ~wxFDIOHandler() { } + +private: + int m_regmask; + + wxDECLARE_NO_COPY_CLASS(wxFDIOHandler); +}; + +#endif // _WX_PRIVATE_FDIOHANDLER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdiomanager.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdiomanager.h new file mode 100644 index 0000000000..0721886f35 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fdiomanager.h @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/fdiomanager.h +// Purpose: declaration of wxFDIOManager +// Author: Vadim Zeitlin +// Created: 2009-08-17 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_FDIOMANAGER_H_ +#define _WX_PRIVATE_FDIOMANAGER_H_ + +#include "wx/private/fdiohandler.h" + +// ---------------------------------------------------------------------------- +// wxFDIOManager: register or unregister wxFDIOHandlers +// ---------------------------------------------------------------------------- + +// currently only used in wxGTK and wxMotif, see wx/unix/apptrait.h + +class wxFDIOManager +{ +public: + // identifies either input or output direction + // + // NB: the values of this enum shouldn't change + enum Direction + { + INPUT, + OUTPUT + }; + + // start or stop monitoring the events on the given file descriptor + virtual int AddInput(wxFDIOHandler *handler, int fd, Direction d) = 0; + virtual void RemoveInput(wxFDIOHandler *handler, int fd, Direction d) = 0; + + // empty but virtual dtor for the base class + virtual ~wxFDIOManager() { } +}; + +#endif // _WX_PRIVATE_FDIOMANAGER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fileback.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fileback.h new file mode 100644 index 0000000000..aaf5ab4afb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fileback.h @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/fileback.h +// Purpose: Back an input stream with memory or a file +// Author: Mike Wetherell +// Copyright: (c) 2006 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FILEBACK_H__ +#define _WX_FILEBACK_H__ + +#include "wx/defs.h" + +#if wxUSE_FILESYSTEM + +#include "wx/stream.h" + +// ---------------------------------------------------------------------------- +// Backs an input stream with memory or a file to make it seekable. +// +// One or more wxBackedInputStreams can be used to read it's data. The data is +// reference counted, so stays alive until the last wxBackingFile or +// wxBackedInputStream using it is destroyed. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxBackingFile +{ +public: + enum { DefaultBufSize = 16384 }; + + // Takes ownership of stream. If the stream is smaller than bufsize, the + // backing file is never created and the backing is done with memory. + wxBackingFile(wxInputStream *stream, + size_t bufsize = DefaultBufSize, + const wxString& prefix = wxT("wxbf")); + + wxBackingFile() : m_impl(NULL) { } + ~wxBackingFile(); + + wxBackingFile(const wxBackingFile& backer); + wxBackingFile& operator=(const wxBackingFile& backer); + + operator bool() const { return m_impl != NULL; } + +private: + class wxBackingFileImpl *m_impl; + friend class wxBackedInputStream; +}; + +// ---------------------------------------------------------------------------- +// An input stream to read from a wxBackingFile. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxBackedInputStream : public wxInputStream +{ +public: + wxBackedInputStream(const wxBackingFile& backer); + + // If the length of the backer's parent stream is unknown then GetLength() + // returns wxInvalidOffset until the parent has been read to the end. + wxFileOffset GetLength() const; + + // Returns the length, reading the parent stream to the end if necessary. + wxFileOffset FindLength() const; + + bool IsSeekable() const { return true; } + +protected: + size_t OnSysRead(void *buffer, size_t size); + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; + +private: + wxBackingFile m_backer; + wxFileOffset m_pos; + + wxDECLARE_NO_COPY_CLASS(wxBackedInputStream); +}; + +#endif // wxUSE_FILESYSTEM + +#endif // _WX_FILEBACK_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/filename.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/filename.h new file mode 100644 index 0000000000..a4ed481020 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/filename.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/filename.h +// Purpose: Internal declarations for src/common/filename.cpp +// Author: Mike Wetherell +// Modified by: +// Created: 2006-10-22 +// Copyright: (c) 2006 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_FILENAME_H_ +#define _WX_PRIVATE_FILENAME_H_ + +#include "wx/file.h" +#include "wx/ffile.h" + +// Self deleting temp files aren't supported on all platforms. Therefore +// rather than let these be in the API, they can be used internally to +// implement classes (e.g. wxTempFileStream), that will do the clean up when +// the OS doesn't support it. + +// Same usage as wxFileName::CreateTempFileName() with the extra parameter +// deleteOnClose. *deleteOnClose true on entry requests a file created with a +// delete on close flag, on exit the value of *deleteOnClose indicates whether +// available. + +#if wxUSE_FILE +wxString wxCreateTempFileName(const wxString& prefix, + wxFile *fileTemp, + bool *deleteOnClose = NULL); +#endif + +#if wxUSE_FFILE +wxString wxCreateTempFileName(const wxString& prefix, + wxFFile *fileTemp, + bool *deleteOnClose = NULL); +#endif + +// Returns an open temp file, if possible either an unlinked open file or one +// that will delete on close. Only returns the filename if neither was +// possible, so that the caller can delete the file when done. + +#if wxUSE_FILE +bool wxCreateTempFile(const wxString& prefix, + wxFile *fileTemp, + wxString *name); +#endif + +#if wxUSE_FFILE +bool wxCreateTempFile(const wxString& prefix, + wxFFile *fileTemp, + wxString *name); +#endif + +#endif // _WX_PRIVATE_FILENAME_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/flagscheck.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/flagscheck.h new file mode 100644 index 0000000000..3e3d9fbaae --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/flagscheck.h @@ -0,0 +1,116 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/flagscheck.h +// Purpose: helpers for checking that (bit)flags don't overlap +// Author: Vaclav Slavik +// Created: 2008-02-21 +// Copyright: (c) 2008 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_FLAGSCHECK_H_ +#define _WX_PRIVATE_FLAGSCHECK_H_ + +#include "wx/debug.h" + +// IBM xlC 8 can't parse the template syntax +#if !defined(__IBMCPP__) + +#include "wx/meta/if.h" + +namespace wxPrivate +{ + +// These templates are used to implement wxADD_FLAG macro below. +// +// The idea is that we want to trigger *compilation* error if the flags +// overlap, not just runtime assert failure. We can't implement the check +// using just a simple logical operation, we need checks equivalent to this +// code: +// +// mask = wxFLAG_1; +// assert( (mask & wxFLAG_2) == 0 ); // no overlap +// mask |= wxFLAG_3; +// assert( (mask & wxFLAG_3) == 0 ); // no overlap +// mask |= wxFLAG_3; +// ... +// +// This can be done at compilation time by using templates metaprogramming +// technique that makes the compiler carry on the computation. +// +// NB: If any of this doesn't compile with your compiler and would be too +// hard to make work, it's probably best to disable this code and replace +// the macros below with empty stubs, this isn't anything critical. + +template<int val> struct FlagsHaveConflictingValues +{ + // no value here - triggers compilation error +}; + +template<int val> struct FlagValue +{ + enum { value = val }; +}; + +// This template adds its template parameter integer 'add' to another integer +// 'all' and produces their OR-combination (all | add). The result is "stored" +// as constant SafelyAddToMask<>::value. Combination of many flags is achieved +// by chaining parameter lists: the 'add' parameter is value member of +// another (different) SafelyAddToMask<> instantiation. +template<int all, int add> struct SafelyAddToMask +{ + // This typedefs ensures that no flags in the list conflict. If there's + // any overlap between the already constructed part of the mask ('all') + // and the value being added to it ('add'), the test that is wxIf<>'s + // first parameter will be non-zero and so Added value will be + // FlagsHaveConflictingValues<add>. The next statement will try to use + // AddedValue::value, but there's no such thing in + // FlagsHaveConflictingValues<> and so compilation will fail. + typedef typename wxIf<(all & add) == 0, + FlagValue<add>, + FlagsHaveConflictingValues<add> >::value + AddedValue; + + enum { value = all | AddedValue::value }; +}; + +} // wxPrivate namespace + + + +// This macro is used to ensure that no two flags that can be combined in +// the same integer value have overlapping bits. This is sometimes not entirely +// trivial to ensure, for example in wxWindow styles or flags for wxSizerItem +// that span several enums, some of them used for multiple purposes. +// +// By constructing allowed flags mask using wxADD_FLAG macro and then using +// this mask to check flags passed as arguments, you can ensure that +// +// a) if any of the allowed flags overlap, you will get compilation error +// b) if invalid flag is used, there will be an assert at runtime +// +// Example usage: +// +// static const int SIZER_FLAGS_MASK = +// wxADD_FLAG(wxCENTRE, +// wxADD_FLAG(wxHORIZONTAL, +// wxADD_FLAG(wxVERTICAL, +// ... +// 0))...); +// +// And wherever flags are used: +// +// wxASSERT_VALID_FLAG( m_flag, SIZER_FLAGS_MASK ); + +#define wxADD_FLAG(f, others) \ + ::wxPrivate::SafelyAddToMask<f, others>::value + +#else + #define wxADD_FLAG(f, others) (f | others) +#endif + +// Checks if flags value 'f' is within the mask of allowed values +#define wxASSERT_VALID_FLAGS(f, mask) \ + wxASSERT_MSG( (f & mask) == f, \ + "invalid flag: not within " #mask ) + +#endif // _WX_PRIVATE_FLAGSCHECK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fontmgr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fontmgr.h new file mode 100644 index 0000000000..c00270a6b1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fontmgr.h @@ -0,0 +1,247 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/fontmgr.h +// Purpose: font management for ports that don't have their own +// Author: Vaclav Slavik +// Created: 2006-11-18 +// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) +// (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_FONTMGR_H_ +#define _WX_PRIVATE_FONTMGR_H_ + +#include "wx/list.h" +#include "wx/fontutil.h" + +class wxFontsManager; +class wxFontInstance; +class wxFontInstanceList; +class wxFontFace; +class wxFontBundle; +class wxFontBundleHash; +class wxFontMgrFontRefData; + +WX_DECLARE_LIST(wxFontBundle, wxFontBundleList); + +/** + This class represents single font face with set parameters (point size, + antialiasing). + */ +class wxFontInstanceBase +{ +protected: + wxFontInstanceBase(float ptSize, bool aa) : m_ptSize(ptSize), m_aa(aa) {} + virtual ~wxFontInstanceBase() {} + +public: + float GetPointSize() const { return m_ptSize; } + bool IsAntiAliased() const { return m_aa; } + +protected: + float m_ptSize; + bool m_aa; +}; + + +/// This class represents loaded font face (bundle+weight+italics). +class wxFontFaceBase +{ +protected: + /// Ctor. Creates object with reference count = 0, Acquire() must be + /// called after the object is created. + wxFontFaceBase(); + virtual ~wxFontFaceBase(); + +public: + /// Increases reference count of the face + virtual void Acquire(); + + /** + Decreases reference count of the face. Call this when you no longer + use the object returned by wxFontBundle. Note that this doesn't destroy + the object, but only optionally shuts it down, so it's possible to + call Acquire() and Release() more than once. + */ + virtual void Release(); + + /** + Returns instance of the font at given size. + + @param ptSize point size of the font to create; note that this is + a float and not integer, it should be wxFont's point + size multipled by wxDC's scale factor + @param aa should the font be antialiased? + */ + virtual wxFontInstance *GetFontInstance(float ptSize, bool aa); + +protected: + /// Called to create a new instance of the font by GetFontInstance() if + /// it wasn't found it cache. + virtual wxFontInstance *CreateFontInstance(float ptSize, bool aa) = 0; + +protected: + unsigned m_refCnt; + wxFontInstanceList *m_instances; +}; + +/** + This class represents font bundle. Font bundle is set of faces that have + the same name, but differ in weight and italics. + */ +class wxFontBundleBase +{ +public: + wxFontBundleBase(); + virtual ~wxFontBundleBase(); + + /// Returns name of the bundle + virtual wxString GetName() const = 0; + + /// Returns true if the font is fixe-width + virtual bool IsFixed() const = 0; + + /// Type of faces in the bundle + enum FaceType + { + // NB: values of these constants are set so that it's possible to + // make OR-combinations of them and still get valid enum element + FaceType_Regular = 0, + FaceType_Italic = 1, + FaceType_Bold = 2, + FaceType_BoldItalic = FaceType_Italic | FaceType_Bold, + + FaceType_Max + }; + + /// Returns true if the given face is available + bool HasFace(FaceType type) const { return m_faces[type] != NULL; } + + /** + Returns font face object that can be used to render font of given type. + + Note that this method can only be called if HasFace(type) returns true. + + Acquire() was called on the returned object, you must call Release() + when you stop using it. + */ + wxFontFace *GetFace(FaceType type) const; + + /** + Returns font face object that can be used to render given font. + + Acquire() was called on the returned object, you must call Release() + when you stop using it. + */ + wxFontFace *GetFaceForFont(const wxFontMgrFontRefData& font) const; + +protected: + wxFontFace *m_faces[FaceType_Max]; +}; + + +/** + Base class for wxFontsManager class, which manages the list of all + available fonts and their loaded instances. + */ +class wxFontsManagerBase +{ +protected: + wxFontsManagerBase(); + virtual ~wxFontsManagerBase(); + +public: + /// Returns the font manager singleton, creating it if it doesn't exist + static wxFontsManager *Get(); + + /// Called by wxApp to shut down the manager + static void CleanUp(); + + /// Returns list of all available font bundles + const wxFontBundleList& GetBundles() const { return *m_list; } + + /** + Returns object representing font bundle with the given name. + + The returned object is owned by wxFontsManager, you must not delete it. + */ + wxFontBundle *GetBundle(const wxString& name) const; + + /** + Returns object representing font bundle that can be used to render + given font. + + The returned object is owned by wxFontsManager, you must not delete it. + */ + wxFontBundle *GetBundleForFont(const wxFontMgrFontRefData& font) const; + + /// This method must be called by derived + void AddBundle(wxFontBundle *bundle); + + /// Returns default facename for given wxFont family + virtual wxString GetDefaultFacename(wxFontFamily family) const = 0; + +private: + wxFontBundleHash *m_hash; + wxFontBundleList *m_list; + +protected: + static wxFontsManager *ms_instance; +}; + + + +#if defined(__WXDFB__) + #include "wx/dfb/private/fontmgr.h" +#endif + + + +/// wxFontMgrFontRefData implementation using wxFontsManager classes +class wxFontMgrFontRefData : public wxGDIRefData +{ +public: + wxFontMgrFontRefData(int size = wxDEFAULT, + wxFontFamily family = wxFONTFAMILY_DEFAULT, + wxFontStyle style = wxFONTSTYLE_NORMAL, + wxFontWeight weight = wxFONTWEIGHT_NORMAL, + bool underlined = false, + const wxString& faceName = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + wxFontMgrFontRefData(const wxFontMgrFontRefData& data); + ~wxFontMgrFontRefData(); + + wxFontBundle *GetFontBundle() const; + wxFontInstance *GetFontInstance(float scale, bool antialiased) const; + + bool IsFixedWidth() const { return GetFontBundle()->IsFixed(); } + + const wxNativeFontInfo *GetNativeFontInfo() const { return &m_info; } + + int GetPointSize() const { return m_info.pointSize; } + wxString GetFaceName() const { return m_info.faceName; } + wxFontFamily GetFamily() const { return m_info.family; } + wxFontStyle GetStyle() const { return m_info.style; } + wxFontWeight GetWeight() const { return m_info.weight; } + bool GetUnderlined() const { return m_info.underlined; } + wxFontEncoding GetEncoding() const { return m_info.encoding; } + + void SetPointSize(int pointSize); + void SetFamily(wxFontFamily family); + void SetStyle(wxFontStyle style); + void SetWeight(wxFontWeight weight); + void SetFaceName(const wxString& faceName); + void SetUnderlined(bool underlined); + void SetEncoding(wxFontEncoding encoding); + +private: + void EnsureValidFont(); + + wxNativeFontInfo m_info; + + wxFontFace *m_fontFace; + wxFontBundle *m_fontBundle; + bool m_fontValid; +}; + +#endif // _WX_PRIVATE_FONTMGR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fswatcher.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fswatcher.h new file mode 100644 index 0000000000..e2bf55a89d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/fswatcher.h @@ -0,0 +1,115 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/fswatcher.h +// Purpose: File system watcher impl classes +// Author: Bartosz Bekier +// Created: 2009-05-26 +// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef WX_PRIVATE_FSWATCHER_H_ +#define WX_PRIVATE_FSWATCHER_H_ + +#include "wx/sharedptr.h" + +#ifdef wxHAS_INOTIFY + class wxFSWatchEntryUnix; + #define wxFSWatchEntry wxFSWatchEntryUnix + WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxFSWatchEntry>,wxFSWatchEntries); + #include "wx/unix/private/fswatcher_inotify.h" +#elif defined(wxHAS_KQUEUE) + class wxFSWatchEntryKq; + #define wxFSWatchEntry wxFSWatchEntryKq + WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxFSWatchEntry>,wxFSWatchEntries); + #include "wx/unix/private/fswatcher_kqueue.h" +#elif defined(__WINDOWS__) + class wxFSWatchEntryMSW; + #define wxFSWatchEntry wxFSWatchEntryMSW + WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxFSWatchEntry>,wxFSWatchEntries); + #include "wx/msw/private/fswatcher.h" +#else + #define wxFSWatchEntry wxFSWatchEntryPolling +#endif + +class wxFSWatcherImpl +{ +public: + wxFSWatcherImpl(wxFileSystemWatcherBase* watcher) : + m_watcher(watcher) + { + } + + virtual ~wxFSWatcherImpl() + { + (void) RemoveAll(); + } + + virtual bool Init() = 0; + + virtual bool Add(const wxFSWatchInfo& winfo) + { + if ( m_watches.find(winfo.GetPath()) != m_watches.end() ) + { + wxLogTrace(wxTRACE_FSWATCHER, + "Path '%s' is already watched", winfo.GetPath()); + // This can happen if a dir is watched, then a parent tree added + return true; + } + + // construct watch entry + wxSharedPtr<wxFSWatchEntry> watch(new wxFSWatchEntry(winfo)); + + if (!DoAdd(watch)) + return false; + + // add watch to our map (always succeedes, checked above) + wxFSWatchEntries::value_type val(watch->GetPath(), watch); + return m_watches.insert(val).second; + } + + virtual bool Remove(const wxFSWatchInfo& winfo) + { + wxFSWatchEntries::iterator it = m_watches.find(winfo.GetPath()); + if ( it == m_watches.end() ) + { + wxLogTrace(wxTRACE_FSWATCHER, + "Path '%s' is not watched", winfo.GetPath()); + // This can happen if a dir is watched, then a parent tree added + return true; + } + wxSharedPtr<wxFSWatchEntry> watch = it->second; + m_watches.erase(it); + return DoRemove(watch); + } + + virtual bool RemoveAll() + { + bool ret = true; + for ( wxFSWatchEntries::iterator it = m_watches.begin(); + it != m_watches.end(); + ++it ) + { + if ( !DoRemove(it->second) ) + ret = false; + } + m_watches.clear(); + return ret; + } + + // Check whether any filespec matches the file's ext (if present) + bool MatchesFilespec(const wxFileName& fn, const wxString& filespec) const + { + return filespec.empty() || wxMatchWild(filespec, fn.GetFullName()); + } + +protected: + virtual bool DoAdd(wxSharedPtr<wxFSWatchEntry> watch) = 0; + + virtual bool DoRemove(wxSharedPtr<wxFSWatchEntry> watch) = 0; + + wxFSWatchEntries m_watches; + wxFileSystemWatcherBase* m_watcher; +}; + + +#endif /* WX_PRIVATE_FSWATCHER_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/graphics.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/graphics.h new file mode 100644 index 0000000000..a5f303dd47 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/graphics.h @@ -0,0 +1,168 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/graphics.h +// Purpose: private graphics context header +// Author: Stefan Csomor +// Modified by: +// Created: +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GRAPHICS_PRIVATE_H_ +#define _WX_GRAPHICS_PRIVATE_H_ + +#if wxUSE_GRAPHICS_CONTEXT + +#include "wx/graphics.h" + +class WXDLLIMPEXP_CORE wxGraphicsObjectRefData : public wxObjectRefData +{ + public : + wxGraphicsObjectRefData( wxGraphicsRenderer* renderer ); + wxGraphicsObjectRefData( const wxGraphicsObjectRefData* data ); + wxGraphicsRenderer* GetRenderer() const ; + virtual wxGraphicsObjectRefData* Clone() const ; + + protected : + wxGraphicsRenderer* m_renderer; +} ; + +class WXDLLIMPEXP_CORE wxGraphicsBitmapData : public wxGraphicsObjectRefData +{ +public : + wxGraphicsBitmapData( wxGraphicsRenderer* renderer) : + wxGraphicsObjectRefData(renderer) {} + + virtual ~wxGraphicsBitmapData() {} + + // returns the native representation + virtual void * GetNativeBitmap() const = 0; +} ; + +class WXDLLIMPEXP_CORE wxGraphicsMatrixData : public wxGraphicsObjectRefData +{ +public : + wxGraphicsMatrixData( wxGraphicsRenderer* renderer) : + wxGraphicsObjectRefData(renderer) {} + + virtual ~wxGraphicsMatrixData() {} + + // concatenates the matrix + virtual void Concat( const wxGraphicsMatrixData *t ) = 0; + + // sets the matrix to the respective values + virtual void Set(wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, + wxDouble tx=0.0, wxDouble ty=0.0) = 0; + + // gets the component valuess of the matrix + virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL, + wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const = 0; + + // makes this the inverse matrix + virtual void Invert() = 0; + + // returns true if the elements of the transformation matrix are equal ? + virtual bool IsEqual( const wxGraphicsMatrixData* t) const = 0; + + // return true if this is the identity matrix + virtual bool IsIdentity() const = 0; + + // + // transformation + // + + // add the translation to this matrix + virtual void Translate( wxDouble dx , wxDouble dy ) = 0; + + // add the scale to this matrix + virtual void Scale( wxDouble xScale , wxDouble yScale ) = 0; + + // add the rotation to this matrix (radians) + virtual void Rotate( wxDouble angle ) = 0; + + // + // apply the transforms + // + + // applies that matrix to the point + virtual void TransformPoint( wxDouble *x, wxDouble *y ) const = 0; + + // applies the matrix except for translations + virtual void TransformDistance( wxDouble *dx, wxDouble *dy ) const =0; + + // returns the native representation + virtual void * GetNativeMatrix() const = 0; +} ; + +class WXDLLIMPEXP_CORE wxGraphicsPathData : public wxGraphicsObjectRefData +{ +public : + wxGraphicsPathData(wxGraphicsRenderer* renderer) : wxGraphicsObjectRefData(renderer) {} + virtual ~wxGraphicsPathData() {} + + // + // These are the path primitives from which everything else can be constructed + // + + // begins a new subpath at (x,y) + virtual void MoveToPoint( wxDouble x, wxDouble y ) = 0; + + // adds a straight line from the current point to (x,y) + virtual void AddLineToPoint( wxDouble x, wxDouble y ) = 0; + + // adds a cubic Bezier curve from the current point, using two control points and an end point + virtual void AddCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y ) = 0; + + // adds another path + virtual void AddPath( const wxGraphicsPathData* path ) =0; + + // closes the current sub-path + virtual void CloseSubpath() = 0; + + // gets the last point of the current path, (0,0) if not yet set + virtual void GetCurrentPoint( wxDouble* x, wxDouble* y) const = 0; + + // adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle + virtual void AddArc( wxDouble x, wxDouble y, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise ) = 0; + + // + // These are convenience functions which - if not available natively will be assembled + // using the primitives from above + // + + // adds a quadratic Bezier curve from the current point, using a control point and an end point + virtual void AddQuadCurveToPoint( wxDouble cx, wxDouble cy, wxDouble x, wxDouble y ); + + // appends a rectangle as a new closed subpath + virtual void AddRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + + // appends an ellipsis as a new closed subpath fitting the passed rectangle + virtual void AddCircle( wxDouble x, wxDouble y, wxDouble r ); + + // appends a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1) + virtual void AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r ) ; + + // appends an ellipse + virtual void AddEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h); + + // appends a rounded rectangle + virtual void AddRoundedRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h, wxDouble radius); + + // returns the native path + virtual void * GetNativePath() const = 0; + + // give the native path returned by GetNativePath() back (there might be some deallocations necessary) + virtual void UnGetNativePath(void *p) const= 0; + + // transforms each point of this path by the matrix + virtual void Transform( const wxGraphicsMatrixData* matrix ) =0; + + // gets the bounding box enclosing all points (possibly including control points) + virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h) const=0; + + virtual bool Contains( wxDouble x, wxDouble y, wxPolygonFillMode fillStyle = wxODDEVEN_RULE) const=0; +}; + +#endif + +#endif // _WX_GRAPHICS_PRIVATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/markupparser.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/markupparser.h new file mode 100644 index 0000000000..855d92ad05 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/markupparser.h @@ -0,0 +1,176 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/markupparser.h +// Purpose: Classes for parsing simple markup. +// Author: Vadim Zeitlin +// Created: 2011-02-16 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_MARKUPPARSER_H_ +#define _WX_PRIVATE_MARKUPPARSER_H_ + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// wxMarkupSpanAttributes: information about attributes for a markup span. +// ---------------------------------------------------------------------------- + +struct wxMarkupSpanAttributes +{ + enum OptionalBool + { + Unspecified = -1, + No, + Yes + }; + + wxMarkupSpanAttributes() + { + m_sizeKind = Size_Unspecified; + + m_isBold = + m_isItalic = + m_isUnderlined = + m_isStrikethrough = Unspecified; + } + + // If a string is empty, it means that the corresponding attribute is not + // set. + wxString m_fgCol, + m_bgCol, + m_fontFace; + + // There are many ways of specifying the size. First of all, the size may + // be relative in which case m_fontSize is either -1 or +1 meaning that + // it's one step smaller or larger than the current font. Second, it may be + // absolute in which case m_fontSize contains either the size in 1024th of + // a point (Pango convention) or its values are in [-3, 3] interval and map + // to [xx-small, xx-large] CSS-like font size specification. And finally it + // may be not specified at all, of course, in which case the value of + // m_fontSize doesn't matter and it shouldn't be used. + enum + { + Size_Unspecified, + Size_Relative, + Size_Symbolic, + Size_PointParts + } m_sizeKind; + int m_fontSize; + + // If the value is Unspecified, the attribute wasn't given. + OptionalBool m_isBold, + m_isItalic, + m_isUnderlined, + m_isStrikethrough; +}; + +// ---------------------------------------------------------------------------- +// wxMarkupParserOutput: gathers the results of parsing markup. +// ---------------------------------------------------------------------------- + +// A class deriving directly from this one needs to implement all the pure +// virtual functions below but as the handling of all simple tags (bold, italic +// &c) is often very similar, it is usually more convenient to inherit from +// wxMarkupParserFontOutput defined in wx/private/markupparserfont.h instead. +class wxMarkupParserOutput +{ +public: + wxMarkupParserOutput() { } + virtual ~wxMarkupParserOutput() { } + + // Virtual functions called by wxMarkupParser while parsing the markup. + + // Called for a run of normal text. + virtual void OnText(const wxString& text) = 0; + + // These functions correspond to the simple tags without parameters. + virtual void OnBoldStart() = 0; + virtual void OnBoldEnd() = 0; + + virtual void OnItalicStart() = 0; + virtual void OnItalicEnd() = 0; + + virtual void OnUnderlinedStart() = 0; + virtual void OnUnderlinedEnd() = 0; + + virtual void OnStrikethroughStart() = 0; + virtual void OnStrikethroughEnd() = 0; + + virtual void OnBigStart() = 0; + virtual void OnBigEnd() = 0; + + virtual void OnSmallStart() = 0; + virtual void OnSmallEnd() = 0; + + virtual void OnTeletypeStart() = 0; + virtual void OnTeletypeEnd() = 0; + + // The generic span start and end functions. + virtual void OnSpanStart(const wxMarkupSpanAttributes& attrs) = 0; + virtual void OnSpanEnd(const wxMarkupSpanAttributes& attrs) = 0; + +private: + wxDECLARE_NO_COPY_CLASS(wxMarkupParserOutput); +}; + +// ---------------------------------------------------------------------------- +// wxMarkupParser: parses the given markup text into wxMarkupParserOutput. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMarkupParser +{ +public: + // Initialize the parser with the object that will receive parsing results. + // This object lifetime must be greater than ours. + explicit wxMarkupParser(wxMarkupParserOutput& output) + : m_output(output) + { + } + + // Parse the entire string and call wxMarkupParserOutput methods. + // + // Return true if the string was successfully parsed or false if it failed + // (presumably because of syntax errors in the markup). + bool Parse(const wxString& text); + + // Quote a normal string, not meant to be interpreted as markup, so that it + // produces the same string when parsed as markup. This means, for example, + // replacing '<' in the input string with "<" to prevent them from being + // interpreted as tag opening characters. + static wxString Quote(const wxString& text); + + // Strip markup from a string, i.e. simply remove all tags and replace + // XML entities with their values (or with "&&" in case of "&" to + // prevent it from being interpreted as mnemonic marker). + static wxString Strip(const wxString& text); + +private: + // Simple struct combining the name of a tag and its attributes. + struct TagAndAttrs + { + TagAndAttrs(const wxString& name_) : name(name_) { } + + wxString name; + wxMarkupSpanAttributes attrs; + }; + + // Call the wxMarkupParserOutput method corresponding to the given tag. + // + // Return false if the tag doesn't match any of the known ones. + bool OutputTag(const TagAndAttrs& tagAndAttrs, bool start); + + // Parse the attributes and fill the provided TagAndAttrs object with the + // information about them. Does nothing if attrs string is empty. + // + // Returns empty string on success of a [fragment of an] error message if + // we failed to parse the attributes. + wxString ParseAttrs(wxString attrs, TagAndAttrs& tagAndAttrs); + + + wxMarkupParserOutput& m_output; + + wxDECLARE_NO_COPY_CLASS(wxMarkupParser); +}; + +#endif // _WX_PRIVATE_MARKUPPARSER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/markupparserattr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/markupparserattr.h new file mode 100644 index 0000000000..d433879daf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/markupparserattr.h @@ -0,0 +1,231 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/markupparserattr.h +// Purpose: Classes mapping markup attributes to wxFont/wxColour. +// Author: Vadim Zeitlin +// Created: 2011-02-18 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_MARKUPPARSERATTR_H_ +#define _WX_PRIVATE_MARKUPPARSERATTR_H_ + +#include "wx/private/markupparser.h" + +#include "wx/stack.h" + +#include "wx/colour.h" +#include "wx/font.h" + +// ---------------------------------------------------------------------------- +// wxMarkupParserAttrOutput: simplified wxFont-using version of the above. +// ---------------------------------------------------------------------------- + +// This class assumes that wxFont and wxColour are used to perform all the +// markup tags and implements the base class virtual functions in terms of +// OnAttr{Start,End}() only. +// +// Notice that you still must implement OnText() inherited from the base class +// when deriving from this one. +class wxMarkupParserAttrOutput : public wxMarkupParserOutput +{ +public: + // A simple container of font and colours. + struct Attr + { + Attr(const wxFont& font_, + const wxColour& foreground_ = wxColour(), + const wxColour& background_ = wxColour()) + : font(font_), foreground(foreground_), background(background_) + { + } + + wxFont font; + wxColour foreground, + background; + }; + + + // This object must be initialized with the font and colours to use + // initially, i.e. the ones used before any tags in the string. + wxMarkupParserAttrOutput(const wxFont& font, + const wxColour& foreground, + const wxColour& background) + { + m_attrs.push(Attr(font, foreground, background)); + } + + // Indicates the change of the font and/or colours used. Any of the + // fields of the argument may be invalid indicating that the corresponding + // attribute didn't actually change. + virtual void OnAttrStart(const Attr& attr) = 0; + + // Indicates the end of the region affected by the given attributes + // (the same ones that were passed to the matching OnAttrStart(), use + // GetAttr() to get the ones that will be used from now on). + virtual void OnAttrEnd(const Attr& attr) = 0; + + + // Implement all pure virtual methods inherited from the base class in + // terms of our own ones. + virtual void OnBoldStart() { DoChangeFont(&wxFont::Bold); } + virtual void OnBoldEnd() { DoEndAttr(); } + + virtual void OnItalicStart() { DoChangeFont(&wxFont::Italic); } + virtual void OnItalicEnd() { DoEndAttr(); } + + virtual void OnUnderlinedStart() { DoChangeFont(&wxFont::Underlined); } + virtual void OnUnderlinedEnd() { DoEndAttr(); } + + virtual void OnStrikethroughStart() { DoChangeFont(&wxFont::Strikethrough); } + virtual void OnStrikethroughEnd() { DoEndAttr(); } + + virtual void OnBigStart() { DoChangeFont(&wxFont::Larger); } + virtual void OnBigEnd() { DoEndAttr(); } + + virtual void OnSmallStart() { DoChangeFont(&wxFont::Smaller); } + virtual void OnSmallEnd() { DoEndAttr(); } + + virtual void OnTeletypeStart() + { + wxFont font(GetFont()); + font.SetFamily(wxFONTFAMILY_TELETYPE); + DoSetFont(font); + } + virtual void OnTeletypeEnd() { DoEndAttr(); } + + virtual void OnSpanStart(const wxMarkupSpanAttributes& spanAttr) + { + wxFont font(GetFont()); + if ( !spanAttr.m_fontFace.empty() ) + font.SetFaceName(spanAttr.m_fontFace); + + FontModifier<wxFontWeight>()(spanAttr.m_isBold, + font, &wxFont::SetWeight, + wxFONTWEIGHT_NORMAL, wxFONTWEIGHT_BOLD); + + FontModifier<wxFontStyle>()(spanAttr.m_isItalic, + font, &wxFont::SetStyle, + wxFONTSTYLE_NORMAL, wxFONTSTYLE_ITALIC); + + FontModifier<bool>()(spanAttr.m_isUnderlined, + font, &wxFont::SetUnderlined, + false, true); + + // TODO: No support for strike-through yet. + + switch ( spanAttr.m_sizeKind ) + { + case wxMarkupSpanAttributes::Size_Unspecified: + break; + + case wxMarkupSpanAttributes::Size_Relative: + if ( spanAttr.m_fontSize > 0 ) + font.MakeLarger(); + else + font.MakeSmaller(); + break; + + case wxMarkupSpanAttributes::Size_Symbolic: + // The values of font size intentionally coincide with the + // values of wxFontSymbolicSize enum elements so simply cast + // one to the other. + font.SetSymbolicSize( + static_cast<wxFontSymbolicSize>(spanAttr.m_fontSize) + ); + break; + + case wxMarkupSpanAttributes::Size_PointParts: + font.SetPointSize((spanAttr.m_fontSize + 1023)/1024); + break; + } + + + const Attr attr(font, spanAttr.m_fgCol, spanAttr.m_bgCol); + OnAttrStart(attr); + + m_attrs.push(attr); + } + + virtual void OnSpanEnd(const wxMarkupSpanAttributes& WXUNUSED(spanAttr)) + { + DoEndAttr(); + } + +protected: + // Get the current attributes, i.e. the ones that should be used for + // rendering (or measuring or whatever) the text at the current position in + // the string. + // + // It may be called from OnAttrStart() to get the old attributes used + // before and from OnAttrEnd() to get the new attributes that will be used + // from now on but is mostly meant to be used from overridden OnText() + // implementations. + const Attr& GetAttr() const { return m_attrs.top(); } + + // A shortcut for accessing the font of the current attribute. + const wxFont& GetFont() const { return GetAttr().font; } + +private: + // Change only the font to the given one. Call OnAttrStart() to notify + // about the change and update the attributes stack. + void DoSetFont(const wxFont& font) + { + const Attr attr(font); + + OnAttrStart(attr); + + m_attrs.push(attr); + } + + // Apply the given function to the font currently on top of the font stack, + // push the new font on the stack and call OnAttrStart() with it. + void DoChangeFont(wxFont (wxFont::*func)() const) + { + DoSetFont((GetFont().*func)()); + } + + void DoEndAttr() + { + const Attr attr(m_attrs.top()); + m_attrs.pop(); + + OnAttrEnd(attr); + } + + // A helper class used to apply the given function to a wxFont object + // depending on the value of an OptionalBool. + template <typename T> + struct FontModifier + { + FontModifier() { } + + void operator()(wxMarkupSpanAttributes::OptionalBool isIt, + wxFont& font, + void (wxFont::*func)(T), + T noValue, + T yesValue) + { + switch ( isIt ) + { + case wxMarkupSpanAttributes::Unspecified: + break; + + case wxMarkupSpanAttributes::No: + (font.*func)(noValue); + break; + + case wxMarkupSpanAttributes::Yes: + (font.*func)(yesValue); + break; + } + } + }; + + + wxStack<Attr> m_attrs; + + wxDECLARE_NO_COPY_CLASS(wxMarkupParserAttrOutput); +}; + +#endif // _WX_PRIVATE_MARKUPPARSERATTR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/overlay.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/overlay.h new file mode 100644 index 0000000000..1149701f7c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/overlay.h @@ -0,0 +1,66 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/overlay.h +// Purpose: wxOverlayImpl declaration +// Author: Stefan Csomor +// Modified by: +// Created: 2006-10-20 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_OVERLAY_H_ +#define _WX_PRIVATE_OVERLAY_H_ + +#include "wx/overlay.h" + +#ifdef wxHAS_NATIVE_OVERLAY + +#if defined(__WXMAC__) + #include "wx/osx/carbon/private/overlay.h" +#elif defined(__WXDFB__) + #include "wx/dfb/private/overlay.h" +#else + #error "unknown native wxOverlay implementation" +#endif + +#else // !wxHAS_NATIVE_OVERLAY + +#include "wx/bitmap.h" + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +// generic implementation of wxOverlay +class wxOverlayImpl +{ +public: + wxOverlayImpl(); + ~wxOverlayImpl(); + + + // clears the overlay without restoring the former state + // to be done eg when the window content has been changed and repainted + void Reset(); + + // returns true if it has been setup + bool IsOk(); + + void Init(wxDC* dc, int x , int y , int width , int height); + + void BeginDrawing(wxDC* dc); + + void EndDrawing(wxDC* dc); + + void Clear(wxDC* dc); + +private: + wxBitmap m_bmpSaved ; + int m_x ; + int m_y ; + int m_width ; + int m_height ; + wxWindow* m_window ; +}; + +#endif // wxHAS_NATIVE_OVERLAY/!wxHAS_NATIVE_OVERLAY + +#endif // _WX_PRIVATE_OVERLAY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/pipestream.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/pipestream.h new file mode 100644 index 0000000000..f14d9aba79 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/pipestream.h @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/pipestream.h +// Purpose: Declares wxPipeInputStream and wxPipeOutputStream. +// Author: Vadim Zeitlin +// Modified by: Rob Bresalier +// Created: 2013-04-27 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// (c) 2013 Rob Bresalier +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_PIPESTREAM_H_ +#define _WX_PRIVATE_PIPESTREAM_H_ + +#include "wx/platform.h" + +// wxPipeInputStream is a platform-dependent input stream class (i.e. deriving, +// possible indirectly, from wxInputStream) for reading from a pipe, i.e. a +// pipe FD under Unix or a pipe HANDLE under MSW. It provides a single extra +// IsOpened() method. +// +// wxPipeOutputStream is similar but has no additional methods at all. +#ifdef __UNIX__ + #include "wx/unix/private/pipestream.h" +#elif defined(__WINDOWS__) && !defined(__WXWINCE__) + #include "wx/msw/private/pipestream.h" +#endif + +#endif // _WX_PRIVATE_PIPESTREAM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/preferences.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/preferences.h new file mode 100644 index 0000000000..8b926450b9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/preferences.h @@ -0,0 +1,40 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/preferences.h +// Purpose: wxPreferencesEditorImpl declaration. +// Author: Vaclav Slavik +// Created: 2013-02-19 +// Copyright: (c) 2013 Vaclav Slavik <vslavik@fastmail.fm> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_PREFERENCES_H_ +#define _WX_PRIVATE_PREFERENCES_H_ + +#include "wx/preferences.h" + +#if wxUSE_TOOLBAR && defined(__WXOSX_COCOA__) && wxOSX_USE_NATIVE_TOOLBAR + #define wxHAS_PREF_EDITOR_NATIVE +#endif + +// ---------------------------------------------------------------------------- +// wxPreferencesEditorImpl: defines wxPreferencesEditor implementation. +// ---------------------------------------------------------------------------- + +class wxPreferencesEditorImpl +{ +public: + // This is implemented in a platform-specific way. + static wxPreferencesEditorImpl* Create(const wxString& title); + + // These methods simply mirror the public wxPreferencesEditor ones. + virtual void AddPage(wxPreferencesPage* page) = 0; + virtual void Show(wxWindow* parent) = 0; + virtual void Dismiss() = 0; + + virtual ~wxPreferencesEditorImpl() {} + +protected: + wxPreferencesEditorImpl() {} +}; + +#endif // _WX_PRIVATE_PREFERENCES_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/richtooltip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/richtooltip.h new file mode 100644 index 0000000000..89ce193fa4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/richtooltip.h @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/richtooltip.h +// Purpose: wxRichToolTipImpl declaration. +// Author: Vadim Zeitlin +// Created: 2011-10-18 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_RICHTOOLTIP_H_ +#define _WX_PRIVATE_RICHTOOLTIP_H_ + +#include "wx/richtooltip.h" + +// ---------------------------------------------------------------------------- +// wxRichToolTipImpl: defines wxRichToolTip implementation. +// ---------------------------------------------------------------------------- + +class wxRichToolTipImpl +{ +public: + // This is implemented in a platform-specific way. + static wxRichToolTipImpl* Create(const wxString& title, + const wxString& message); + + // These methods simply mirror the public wxRichToolTip ones. + virtual void SetBackgroundColour(const wxColour& col, + const wxColour& colEnd) = 0; + virtual void SetCustomIcon(const wxIcon& icon) = 0; + virtual void SetStandardIcon(int icon) = 0; + virtual void SetTimeout(unsigned milliseconds, + unsigned millisecondsShowdelay = 0) = 0; + virtual void SetTipKind(wxTipKind tipKind) = 0; + virtual void SetTitleFont(const wxFont& font) = 0; + + virtual void ShowFor(wxWindow* win, const wxRect* rect = NULL) = 0; + + virtual ~wxRichToolTipImpl() { } + +protected: + wxRichToolTipImpl() { } +}; + +#endif // _WX_PRIVATE_RICHTOOLTIP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/sckaddr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/sckaddr.h new file mode 100644 index 0000000000..ba2063ed9e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/sckaddr.h @@ -0,0 +1,323 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/sckaddr.h +// Purpose: wxSockAddressImpl +// Author: Vadim Zeitlin +// Created: 2008-12-28 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_SOCKADDR_H_ +#define _WX_PRIVATE_SOCKADDR_H_ + +#ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" + + #if wxUSE_IPV6 + #include <ws2tcpip.h> + #endif +#elif defined(__VMS__) + #include <socket.h> + + struct sockaddr_un + { + u_char sun_len; /* sockaddr len including null */ + u_char sun_family; /* AF_UNIX */ + char sun_path[108]; /* path name (gag) */ + }; + #include <in.h> +#else // generic Unix + #include <sys/types.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include <sys/un.h> +#endif // platform + +#include <stdlib.h> // for calloc() + +// this is a wrapper for sockaddr_storage if it's available or just sockaddr +// otherwise +union wxSockAddressStorage +{ +#if wxUSE_IPV6 + sockaddr_storage addr_storage; +#endif + sockaddr addr; +}; + +// ---------------------------------------------------------------------------- +// helpers for wxSockAddressImpl +// ---------------------------------------------------------------------------- + +// helper class mapping sockaddr_xxx types to corresponding AF_XXX values +// +// FIXME-VC6: we could leave the template undefined if not for VC6 which +// absolutely does need to have a generic version defining the +// template "interface" to compile the code below +template <class T> struct AddressFamily { enum { value = AF_UNSPEC }; }; + +template <> struct AddressFamily<sockaddr_in> { enum { value = AF_INET }; }; + +#if wxUSE_IPV6 +template <> struct AddressFamily<sockaddr_in6> { enum { value = AF_INET6 }; }; +#endif // wxUSE_IPV6 + +#ifdef wxHAS_UNIX_DOMAIN_SOCKETS +template <> struct AddressFamily<sockaddr_un> { enum { value = AF_UNIX }; }; +#endif // wxHAS_UNIX_DOMAIN_SOCKETS + +// ---------------------------------------------------------------------------- +// wxSockAddressImpl +// ---------------------------------------------------------------------------- + +// Represents a socket endpoint, e.g. an (address, port) pair for PF_INET +// sockets. It can be initialized from an existing sockaddr struct and also +// provides access to sockaddr stored internally so that it can be easily used +// with e.g. connect(2). +// +// This class also performs (synchronous, hence potentially long) name lookups +// if necessary, i.e. if the host name strings don't contain addresses in +// numerical form (quad dotted for IPv4 or standard hexadecimal for IPv6). +// Notice that internally the potentially Unicode host names are encoded as +// UTF-8 before being passed to the lookup function but the host names should +// really be ASCII anyhow. +class wxSockAddressImpl +{ +public: + // as this is passed to socket() it should be a PF_XXX and not AF_XXX (even + // though they're the same in practice) + enum Family + { + FAMILY_INET = PF_INET, +#if wxUSE_IPV6 + FAMILY_INET6 = PF_INET6, +#endif +#ifdef wxHAS_UNIX_DOMAIN_SOCKETS + FAMILY_UNIX = PF_UNIX, +#endif + FAMILY_UNSPEC = PF_UNSPEC + }; + + // default ctor creates uninitialized object, use one of CreateXXX() below + wxSockAddressImpl() + { + InitUnspec(); + } + + // ctor from an existing sockaddr + wxSockAddressImpl(const sockaddr& addr, int len) + { + switch ( addr.sa_family ) + { + case PF_INET: +#if wxUSE_IPV6 + case PF_INET6: +#endif +#ifdef wxHAS_UNIX_DOMAIN_SOCKETS + case PF_UNIX: +#endif + m_family = static_cast<Family>(addr.sa_family); + break; + + default: + wxFAIL_MSG( "unsupported socket address family" ); + InitUnspec(); + return; + } + + InitFromSockaddr(addr, len); + } + + // copy ctor and assignment operators + wxSockAddressImpl(const wxSockAddressImpl& other) + { + InitFromOther(other); + } + + wxSockAddressImpl& operator=(const wxSockAddressImpl& other) + { + if (this != &other) + { + free(m_addr); + InitFromOther(other); + } + return *this; + } + + // dtor frees the memory used by m_addr + ~wxSockAddressImpl() + { + free(m_addr); + } + + + // reset the address to the initial uninitialized state + void Clear() + { + free(m_addr); + + InitUnspec(); + } + + // initialize the address to be of specific address family, it must be + // currently uninitialized (you may call Clear() to achieve this) + void CreateINET(); + void CreateINET6(); +#ifdef wxHAS_UNIX_DOMAIN_SOCKETS + void CreateUnix(); +#endif // wxHAS_UNIX_DOMAIN_SOCKETS + void Create(Family family) + { + switch ( family ) + { + case FAMILY_INET: + CreateINET(); + break; + +#if wxUSE_IPV6 + case FAMILY_INET6: + CreateINET6(); + break; +#endif // wxUSE_IPV6 + +#ifdef wxHAS_UNIX_DOMAIN_SOCKETS + case FAMILY_UNIX: + CreateUnix(); + break; +#endif // wxHAS_UNIX_DOMAIN_SOCKETS + + default: + wxFAIL_MSG( "unsupported socket address family" ); + } + } + + // simple accessors + Family GetFamily() const { return m_family; } + bool Is(Family family) const { return m_family == family; } + bool IsOk() const { return m_family != FAMILY_UNSPEC; } + const sockaddr *GetAddr() const { return m_addr; } + sockaddr *GetWritableAddr() { return m_addr; } + int GetLen() const { return m_len; } + + // accessors for INET or INET6 address families +#if wxUSE_IPV6 + #define CALL_IPV4_OR_6(func, args) \ + Is(FAMILY_INET6) ? func##6(args) : func##4(args) + #define CALL_IPV4_OR_6_VOID(func) \ + Is(FAMILY_INET6) ? func##6() : func##4() +#else + #define CALL_IPV4_OR_6(func, args) func##4(args) + #define CALL_IPV4_OR_6_VOID(func) func##4() +#endif // IPv6 support on/off + + wxString GetHostName() const; + bool SetHostName(const wxString& name) + { + return CALL_IPV4_OR_6(SetHostName, (name)); + } + + wxUint16 GetPort() const { return CALL_IPV4_OR_6_VOID(GetPort); } + bool SetPort(wxUint16 port) { return CALL_IPV4_OR_6(SetPort, (port)); } + bool SetPortName(const wxString& name, const char *protocol); + + bool SetToAnyAddress() { return CALL_IPV4_OR_6_VOID(SetToAnyAddress); } + +#undef CALL_IPV4_OR_6 + + // accessors for INET addresses only + bool GetHostAddress(wxUint32 *address) const; + bool SetHostAddress(wxUint32 address); + + bool SetToBroadcastAddress() { return SetHostAddress(INADDR_BROADCAST); } + + // accessors for INET6 addresses only +#if wxUSE_IPV6 + bool GetHostAddress(in6_addr *address) const; + bool SetHostAddress(const in6_addr& address); +#endif // wxUSE_IPV6 + +#ifdef wxHAS_UNIX_DOMAIN_SOCKETS + // methods valid for Unix address family addresses only + bool SetPath(const wxString& path); + wxString GetPath() const; +#endif // wxHAS_UNIX_DOMAIN_SOCKETS + +private: + void DoAlloc(int len) + { + m_addr = static_cast<sockaddr *>(calloc(1, len)); + m_len = len; + } + + // FIXME-VC6: VC6 doesn't grok Foo<T>() call syntax so we need the extra + // dummy parameter of type T, use the macros in sckaddr.cpp to + // hide it + template <class T> + T *Alloc(T *) + { + DoAlloc(sizeof(T)); + + return reinterpret_cast<T *>(m_addr); + } + + template <class T> + T *Get(T *) const + { + wxCHECK_MSG( static_cast<int>(m_family) == AddressFamily<T>::value, + NULL, + "socket address family mismatch" ); + + return reinterpret_cast<T *>(m_addr); + } + + void InitUnspec() + { + m_family = FAMILY_UNSPEC; + m_addr = NULL; + m_len = 0; + } + + void InitFromSockaddr(const sockaddr& addr, int len) + { + DoAlloc(len); + memcpy(m_addr, &addr, len); + } + + void InitFromOther(const wxSockAddressImpl& other) + { + m_family = other.m_family; + + if ( other.m_addr ) + { + InitFromSockaddr(*other.m_addr, other.m_len); + } + else // no address to copy + { + m_addr = NULL; + m_len = 0; + } + } + + // IPv4/6 implementations of public functions + bool SetHostName4(const wxString& name); + + bool SetPort4(wxUint16 port); + wxUint16 GetPort4() const; + + bool SetToAnyAddress4() { return SetHostAddress(INADDR_ANY); } + +#if wxUSE_IPV6 + bool SetHostName6(const wxString& name); + + bool SetPort6(wxUint16 port); + wxUint16 GetPort6() const; + + bool SetToAnyAddress6(); +#endif // wxUSE_IPV6 + + Family m_family; + sockaddr *m_addr; + int m_len; +}; + +#endif // _WX_PRIVATE_SOCKADDR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/selectdispatcher.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/selectdispatcher.h new file mode 100644 index 0000000000..644377739f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/selectdispatcher.h @@ -0,0 +1,126 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/selectdispatcher.h +// Purpose: wxSelectDispatcher class +// Authors: Lukasz Michalski and Vadim Zeitlin +// Created: December 2006 +// Copyright: (c) Lukasz Michalski +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_SELECTDISPATCHER_H_ +#define _WX_PRIVATE_SELECTDISPATCHER_H_ + +#include "wx/defs.h" + +#if wxUSE_SELECT_DISPATCHER + +#if defined(HAVE_SYS_SELECT_H) || defined(__WATCOMC__) + #include <sys/time.h> + #include <sys/select.h> +#endif + +#ifdef __WATCOMC__ + #include <types.h> + #include <sys/ioctl.h> + #include <tcpustd.h> +#else + #include <sys/types.h> +#endif + +#include "wx/private/fdiodispatcher.h" + +// helper class storing all the select() fd sets +class WXDLLIMPEXP_BASE wxSelectSets +{ +public: + // ctor zeroes out all fd_sets + wxSelectSets(); + + // default copy ctor, assignment operator and dtor are ok + + + // return true if fd appears in any of the sets + bool HasFD(int fd) const; + + // add or remove FD to our sets depending on whether flags contains + // wxFDIO_INPUT/OUTPUT/EXCEPTION bits + bool SetFD(int fd, int flags); + + // same as SetFD() except it unsets the bits set in the flags for the given + // fd + bool ClearFD(int fd) + { + return SetFD(fd, 0); + } + + + // call select() with our sets: the other parameters are the same as for + // select() itself + int Select(int nfds, struct timeval *tv); + + // call the handler methods corresponding to the sets having this fd if it + // is present in any set and return true if it is + bool Handle(int fd, wxFDIOHandler& handler) const; + +private: + typedef void (wxFDIOHandler::*Callback)(); + + // the FD sets indices + enum + { + Read, + Write, + Except, + Max + }; + + // the sets used with select() + fd_set m_fds[Max]; + + // the wxFDIO_XXX flags, functions and names (used for debug messages only) + // corresponding to the FD sets above + static int ms_flags[Max]; + static const char *ms_names[Max]; + static Callback ms_handlers[Max]; +}; + +class WXDLLIMPEXP_BASE wxSelectDispatcher : public wxMappedFDIODispatcher +{ +public: + // default ctor + wxSelectDispatcher() { m_maxFD = -1; } + + // implement pure virtual methods of the base class + virtual bool RegisterFD(int fd, wxFDIOHandler *handler, int flags = wxFDIO_ALL); + virtual bool ModifyFD(int fd, wxFDIOHandler *handler, int flags = wxFDIO_ALL); + virtual bool UnregisterFD(int fd); + virtual bool HasPending() const; + virtual int Dispatch(int timeout = TIMEOUT_INFINITE); + +private: + // common part of RegisterFD() and ModifyFD() + bool DoUpdateFDAndHandler(int fd, wxFDIOHandler *handler, int flags); + + // call the handlers for the fds present in the given sets, return the + // number of handlers we called + int ProcessSets(const wxSelectSets& sets); + + // helper of ProcessSets(): call the handler if its fd is in the set + void DoProcessFD(int fd, const fd_set& fds, wxFDIOHandler *handler, + const char *name); + + // common part of HasPending() and Dispatch(): calls select() with the + // specified timeout + int DoSelect(wxSelectSets& sets, int timeout) const; + + + // the select sets containing all the registered fds + wxSelectSets m_sets; + + // the highest registered fd value or -1 if none + int m_maxFD; +}; + +#endif // wxUSE_SELECT_DISPATCHER + +#endif // _WX_PRIVATE_SOCKETEVTDISPATCH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/socket.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/socket.h new file mode 100644 index 0000000000..973b764f7d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/socket.h @@ -0,0 +1,373 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/socket.h +// Purpose: wxSocketImpl and related declarations +// Authors: Guilhem Lavaux, Vadim Zeitlin +// Created: April 1997 +// Copyright: (c) 1997 Guilhem Lavaux +// (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + Brief overview of different socket classes: + + - wxSocketBase is the public class representing a socket ("Base" here + refers to the fact that wxSocketClient and wxSocketServer are derived + from it and predates the convention of using "Base" for common base + classes for platform-specific classes in wxWidgets) with implementation + common to all platforms and forwarding methods whose implementation + differs between platforms to wxSocketImpl which it contains. + + - wxSocketImpl is actually just an abstract base class having only code + common to all platforms, the concrete implementation classes derive from + it and are created by wxSocketImpl::Create(). + + - Some socket operations have different implementations in console-mode and + GUI applications. wxSocketManager class exists to abstract this in such + way that console applications (using wxBase) don't depend on wxNet. An + object of this class is made available via wxApp and GUI applications set + up a different kind of global socket manager from console ones. + + TODO: it looks like wxSocketManager could be eliminated by providing + methods for registering/unregistering sockets directly in + wxEventLoop. + */ + +#ifndef _WX_PRIVATE_SOCKET_H_ +#define _WX_PRIVATE_SOCKET_H_ + +#include "wx/defs.h" + +#if wxUSE_SOCKETS + +#include "wx/socket.h" +#include "wx/private/sckaddr.h" + +#include <stddef.h> + +/* + Including sys/types.h under Cygwin results in the warnings about "fd_set + having been defined in sys/types.h" when winsock.h is included later and + doesn't seem to be necessary anyhow. It's not needed under Mac neither. + */ +#if !defined(__WXMAC__) && !defined(__WXMSW__) && !defined(__WXWINCE__) +#include <sys/types.h> +#endif + +#ifdef __WXWINCE__ +#include <stdlib.h> +#endif + +// include the header defining timeval: under Windows this struct is used only +// with sockets so we need to include winsock.h which we do via windows.h +#ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" +#else + #include <sys/time.h> // for timeval +#endif + +// these definitions are for MSW when we don't use configure, otherwise these +// symbols are defined by configure +#ifndef WX_SOCKLEN_T + #define WX_SOCKLEN_T int +#endif + +#ifndef SOCKOPTLEN_T + #define SOCKOPTLEN_T int +#endif + +// define some symbols which winsock.h defines but traditional BSD headers +// don't +#ifndef INVALID_SOCKET + #define INVALID_SOCKET (-1) +#endif + +#ifndef SOCKET_ERROR + #define SOCKET_ERROR (-1) +#endif + +typedef int wxSocketEventFlags; + +class wxSocketImpl; + +/* + Class providing hooks abstracting the differences between console and GUI + applications for socket code. + + We also have different implementations of this class for different platforms + allowing us to keep more things in the common code but the main reason for + its existence is that we want the same socket code work differently + depending on whether it's used from a console or a GUI program. This is + achieved by implementing the virtual methods of this class differently in + the objects returned by wxConsoleAppTraits::GetSocketManager() and the same + method in wxGUIAppTraits. + */ +class wxSocketManager +{ +public: + // set the manager to use, we don't take ownership of it + // + // this should be called before creating the first wxSocket object, + // otherwise the manager returned by wxAppTraits::GetSocketManager() will + // be used + static void Set(wxSocketManager *manager); + + // return the manager to use + // + // this initializes the manager at first use + static wxSocketManager *Get() + { + if ( !ms_manager ) + Init(); + + return ms_manager; + } + + // called before the first wxSocket is created and should do the + // initializations needed in order to use the network + // + // return true if initialized successfully; if this returns false sockets + // can't be used at all + virtual bool OnInit() = 0; + + // undo the initializations of OnInit() + virtual void OnExit() = 0; + + + // create the socket implementation object matching this manager + virtual wxSocketImpl *CreateSocket(wxSocketBase& wxsocket) = 0; + + // these functions enable or disable monitoring of the given socket for the + // specified events inside the currently running event loop (but notice + // that both BSD and Winsock implementations actually use socket->m_server + // value to determine what exactly should be monitored so it needs to be + // set before calling these functions) + // + // the default event value is used just for the convenience of wxMSW + // implementation which doesn't use this parameter anyhow, it doesn't make + // sense to pass wxSOCKET_LOST for the Unix implementation which does use + // this parameter + virtual void Install_Callback(wxSocketImpl *socket, + wxSocketNotify event = wxSOCKET_LOST) = 0; + virtual void Uninstall_Callback(wxSocketImpl *socket, + wxSocketNotify event = wxSOCKET_LOST) = 0; + + virtual ~wxSocketManager() { } + +private: + // get the manager to use if we don't have it yet + static void Init(); + + static wxSocketManager *ms_manager; +}; + +/* + Base class for all socket implementations providing functionality common to + BSD and Winsock sockets. + + Objects of this class are not created directly but only via the factory + function wxSocketManager::CreateSocket(). + */ +class wxSocketImpl +{ +public: + virtual ~wxSocketImpl(); + + // set various socket properties: all of those can only be called before + // creating the socket + void SetTimeout(unsigned long millisec); + void SetReusable() { m_reusable = true; } + void SetBroadcast() { m_broadcast = true; } + void DontDoBind() { m_dobind = false; } + void SetInitialSocketBuffers(int recv, int send) + { + m_initialRecvBufferSize = recv; + m_initialSendBufferSize = send; + } + + wxSocketError SetLocal(const wxSockAddressImpl& address); + wxSocketError SetPeer(const wxSockAddressImpl& address); + + // accessors + // --------- + + bool IsServer() const { return m_server; } + + const wxSockAddressImpl& GetLocal(); // non const as may update m_local + const wxSockAddressImpl& GetPeer() const { return m_peer; } + + wxSocketError GetError() const { return m_error; } + bool IsOk() const { return m_error == wxSOCKET_NOERROR; } + + // get the error code corresponding to the last operation + virtual wxSocketError GetLastError() const = 0; + + + // creating/closing the socket + // -------------------------- + + // notice that SetLocal() must be called before creating the socket using + // any of the functions below + // + // all of Create() functions return wxSOCKET_NOERROR if the operation + // completed successfully or one of: + // wxSOCKET_INVSOCK - the socket is in use. + // wxSOCKET_INVADDR - the local (server) or peer (client) address has not + // been set. + // wxSOCKET_IOERR - any other error. + + // create a socket listening on the local address specified by SetLocal() + // (notice that DontDoBind() is ignored by this function) + wxSocketError CreateServer(); + + // create a socket connected to the peer address specified by SetPeer() + // (notice that DontDoBind() is ignored by this function) + // + // this function may return wxSOCKET_WOULDBLOCK in addition to the return + // values listed above if wait is false + wxSocketError CreateClient(bool wait); + + // create (and bind unless DontDoBind() had been called) an UDP socket + // associated with the given local address + wxSocketError CreateUDP(); + + // may be called whether the socket was created or not, calls DoClose() if + // it was indeed created + void Close(); + + // shuts down the writing end of the socket and closes it, this is a more + // graceful way to close + // + // does nothing if the socket wasn't created + void Shutdown(); + + + // IO operations + // ------------- + + // basic IO, work for both TCP and UDP sockets + // + // return the number of bytes read/written (possibly 0) or -1 on error + int Read(void *buffer, int size); + int Write(const void *buffer, int size); + + // basically a wrapper for select(): returns the condition of the socket, + // blocking for not longer than timeout if it is specified (otherwise just + // poll without blocking at all) + // + // flags defines what kind of conditions we're interested in, the return + // value is composed of a (possibly empty) subset of the bits set in flags + wxSocketEventFlags Select(wxSocketEventFlags flags, + const timeval *timeout = NULL); + + // convenient wrapper calling Select() with our default timeout + wxSocketEventFlags SelectWithTimeout(wxSocketEventFlags flags) + { + return Select(flags, &m_timeout); + } + + // just a wrapper for accept(): it is called to create a new wxSocketImpl + // corresponding to a new server connection represented by the given + // wxSocketBase, returns NULL on error (including immediately if there are + // no pending connections as our sockets are non-blocking) + wxSocketImpl *Accept(wxSocketBase& wxsocket); + + + // notifications + // ------------- + + // notify m_wxsocket about the given socket event by calling its (inaptly + // named) OnRequest() method + void NotifyOnStateChange(wxSocketNotify event); + + // called after reading/writing the data from/to the socket and should + // enable back the wxSOCKET_INPUT/OUTPUT_FLAG notifications if they were + // turned off when this data was first detected + virtual void ReenableEvents(wxSocketEventFlags flags) = 0; + + // TODO: make these fields protected and provide accessors for those of + // them that wxSocketBase really needs +//protected: + wxSOCKET_T m_fd; + + int m_initialRecvBufferSize; + int m_initialSendBufferSize; + + wxSockAddressImpl m_local, + m_peer; + wxSocketError m_error; + + bool m_stream; + bool m_establishing; + bool m_reusable; + bool m_broadcast; + bool m_dobind; + + struct timeval m_timeout; + +protected: + wxSocketImpl(wxSocketBase& wxsocket); + + // true if we're a listening stream socket + bool m_server; + +private: + // called by Close() if we have a valid m_fd + virtual void DoClose() = 0; + + // put this socket into non-blocking mode and enable monitoring this socket + // as part of the event loop + virtual void UnblockAndRegisterWithEventLoop() = 0; + + // check that the socket wasn't created yet and that the given address + // (either m_local or m_peer depending on the socket kind) is valid and + // set m_error and return false if this is not the case + bool PreCreateCheck(const wxSockAddressImpl& addr); + + // set the given socket option: this just wraps setsockopt(SOL_SOCKET) + int SetSocketOption(int optname, int optval) + { + // although modern Unix systems use "const void *" for the 4th + // parameter here, old systems and Winsock still use "const char *" + return setsockopt(m_fd, SOL_SOCKET, optname, + reinterpret_cast<const char *>(&optval), + sizeof(optval)); + } + + // set the given socket option to true value: this is an even simpler + // wrapper for setsockopt(SOL_SOCKET) for boolean options + int EnableSocketOption(int optname) + { + return SetSocketOption(optname, 1); + } + + // apply the options to the (just created) socket and register it with the + // event loop by calling UnblockAndRegisterWithEventLoop() + void PostCreation(); + + // update local address after binding/connecting + wxSocketError UpdateLocalAddress(); + + // functions used to implement Read/Write() + int RecvStream(void *buffer, int size); + int RecvDgram(void *buffer, int size); + int SendStream(const void *buffer, int size); + int SendDgram(const void *buffer, int size); + + + // set in ctor and never changed except that it's reset to NULL when the + // socket is shut down + wxSocketBase *m_wxsocket; + + wxDECLARE_NO_COPY_CLASS(wxSocketImpl); +}; + +#if defined(__WINDOWS__) + #include "wx/msw/private/sockmsw.h" +#else + #include "wx/unix/private/sockunix.h" +#endif + +#endif /* wxUSE_SOCKETS */ + +#endif /* _WX_PRIVATE_SOCKET_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/streamtempinput.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/streamtempinput.h new file mode 100644 index 0000000000..df937cf574 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/streamtempinput.h @@ -0,0 +1,134 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/streamtempinput.h +// Purpose: defines wxStreamTempInputBuffer which is used by Unix and MSW +// implementations of wxExecute; this file is only used by the +// library and never by the user code +// Author: Vadim Zeitlin +// Modified by: Rob Bresalier +// Created: 2013-05-04 +// Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_STREAMTEMPINPUT_H +#define _WX_PRIVATE_STREAMTEMPINPUT_H + +#include "wx/private/pipestream.h" + +// ---------------------------------------------------------------------------- +// wxStreamTempInputBuffer +// ---------------------------------------------------------------------------- + +/* + wxStreamTempInputBuffer is a hack which we need to solve the problem of + executing a child process synchronously with IO redirecting: when we do + this, the child writes to a pipe we open to it but when the pipe buffer + (which has finite capacity, e.g. commonly just 4Kb) becomes full we have to + read data from it because the child blocks in its write() until then and if + it blocks we are never going to return from wxExecute() so we dead lock. + + So here is the fix: we now read the output as soon as it appears into a temp + buffer (wxStreamTempInputBuffer object) and later just stuff it back into + the stream when the process terminates. See supporting code in wxExecute() + itself as well. + + Note that this is horribly inefficient for large amounts of output (count + the number of times we copy the data around) and so a better API is badly + needed! However it's not easy to devise a way to do this keeping backwards + compatibility with the existing wxExecute(wxEXEC_SYNC)... +*/ +class wxStreamTempInputBuffer +{ +public: + wxStreamTempInputBuffer() + { + m_stream = NULL; + m_buffer = NULL; + m_size = 0; + } + + // call to associate a stream with this buffer, otherwise nothing happens + // at all + void Init(wxPipeInputStream *stream) + { + wxASSERT_MSG( !m_stream, wxS("Can only initialize once") ); + + m_stream = stream; + } + + // check for input on our stream and cache it in our buffer if any + // + // return true if anything was done + bool Update() + { + if ( !m_stream || !m_stream->CanRead() ) + return false; + + // realloc in blocks of 4Kb: this is the default (and minimal) buffer + // size of the Unix pipes so it should be the optimal step + // + // NB: don't use "static int" in this inline function, some compilers + // (e.g. IBM xlC) don't like it + enum { incSize = 4096 }; + + void *buf = realloc(m_buffer, m_size + incSize); + if ( !buf ) + return false; + + m_buffer = buf; + m_stream->Read((char *)m_buffer + m_size, incSize); + m_size += m_stream->LastRead(); + + return true; + } + + // check if can continue reading from the stream, this is used to disable + // the callback once we can't read anything more + bool Eof() const + { + // If we have no stream, always return true as we can't read any more. + return !m_stream || m_stream->Eof(); + } + + // read everything remaining until the EOF, this should only be called once + // the child process terminates and we know that no more data is coming + bool ReadAll() + { + while ( !Eof() ) + { + if ( !Update() ) + return false; + } + + return true; + } + + // dtor puts the data buffered during this object lifetime into the + // associated stream + ~wxStreamTempInputBuffer() + { + if ( m_buffer ) + { + m_stream->Ungetch(m_buffer, m_size); + free(m_buffer); + } + } + + const void *GetBuffer() const { return m_buffer; } + + size_t GetSize() const { return m_size; } + +private: + // the stream we're buffering, if NULL we don't do anything at all + wxPipeInputStream *m_stream; + + // the buffer of size m_size (NULL if m_size == 0) + void *m_buffer; + + // the size of the buffer + size_t m_size; + + wxDECLARE_NO_COPY_CLASS(wxStreamTempInputBuffer); +}; + +#endif // _WX_PRIVATE_STREAMTEMPINPUT_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/textmeasure.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/textmeasure.h new file mode 100644 index 0000000000..a4db67cb50 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/textmeasure.h @@ -0,0 +1,174 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/textmeasure.h +// Purpose: declaration of wxTextMeasure class +// Author: Manuel Martin +// Created: 2012-10-05 +// Copyright: (c) 1997-2012 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_TEXTMEASURE_H_ +#define _WX_PRIVATE_TEXTMEASURE_H_ + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxFont; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +// ---------------------------------------------------------------------------- +// wxTextMeasure: class used to measure text extent. +// ---------------------------------------------------------------------------- + +class wxTextMeasureBase +{ +public: + // The first ctor argument must be non-NULL, i.e. each object of this class + // is associated with either a valid wxDC or a valid wxWindow. The font can + // be NULL to use the current DC/window font or can be specified explicitly. + wxTextMeasureBase(const wxDC *dc, const wxFont *theFont); + wxTextMeasureBase(const wxWindow *win, const wxFont *theFont); + + // Even though this class is not supposed to be used polymorphically, give + // it a virtual dtor to avoid compiler warnings. + virtual ~wxTextMeasureBase() { } + + + // Return the extent of a single line string. + void GetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL); + + // The same for a multiline (with '\n') string. + void GetMultiLineTextExtent(const wxString& text, + wxCoord *width, + wxCoord *height, + wxCoord *heightOneLine = NULL); + + // Find the dimensions of the largest string. + wxSize GetLargestStringExtent(size_t n, const wxString* strings); + wxSize GetLargestStringExtent(const wxArrayString& strings) + { + return GetLargestStringExtent(strings.size(), &strings[0]); + } + + // Fill the array with the widths for each "0..N" substrings for N from 1 + // to text.length(). + // + // The scaleX argument is the horizontal scale used by wxDC and is only + // used in the generic implementation. + bool GetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX); + + + // These functions are called by our public methods before and after each + // call to DoGetTextExtent(). Derived classes may override them to prepare + // for -- possibly several -- subsequent calls to DoGetTextExtent(). + // + // As these calls must be always paired, they're never called directly but + // only by our friend MeasuringGuard class. + // + // NB: They're public only to allow VC6 to compile this code, there doesn't + // seem to be any way to give MeasuringGuard access to them (FIXME-VC6) + virtual void BeginMeasuring() { } + virtual void EndMeasuring() { } + + // This is another method which is only used by MeasuringGuard. + bool IsUsingDCImpl() const { return m_useDCImpl; } + +protected: + // RAII wrapper for the two methods above. + class MeasuringGuard + { + public: + MeasuringGuard(wxTextMeasureBase& tm) : m_tm(tm) + { + // BeginMeasuring() should only be called if we have a native DC, + // so don't call it if we delegate to a DC of unknown type. + if ( !m_tm.IsUsingDCImpl() ) + m_tm.BeginMeasuring(); + } + + ~MeasuringGuard() + { + if ( !m_tm.IsUsingDCImpl() ) + m_tm.EndMeasuring(); + } + + private: + wxTextMeasureBase& m_tm; + }; + + + // The main function of this class, to be implemented in platform-specific + // way used by all our public methods. + // + // The width and height pointers here are never NULL and the input string + // is not empty. + virtual void DoGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL) = 0; + + // The real implementation of GetPartialTextExtents(). + // + // On input, widths array contains text.length() zero elements and the text + // is guaranteed to be non-empty. + virtual bool DoGetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX) = 0; + + // Call either DoGetTextExtent() or wxDC::GetTextExtent() depending on the + // value of m_useDCImpl. + // + // This must be always used instead of calling DoGetTextExtent() directly! + void CallGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL); + + // Return a valid font: if one was given to us in the ctor, use this one, + // otherwise use the current font of the associated wxDC or wxWindow. + wxFont GetFont() const; + + + // Exactly one of m_dc and m_win is non-NULL for any given object of this + // class. + const wxDC* const m_dc; + const wxWindow* const m_win; + + // If this is true, simply forward to wxDC::GetTextExtent() from our + // CallGetTextExtent() instead of calling our own DoGetTextExtent(). + // + // We need this because our DoGetTextExtent() typically only works with + // native DCs, i.e. those having an HDC under Windows or using Pango under + // GTK+. However wxTextMeasure object can be constructed for any wxDC, not + // necessarily a native one and in this case we must call back into the DC + // implementation of text measuring itself. + bool m_useDCImpl; + + // This one can be NULL or not. + const wxFont* const m_font; + + wxDECLARE_NO_COPY_CLASS(wxTextMeasureBase); +}; + +// Include the platform dependent class declaration, if any. +#if defined(__WXGTK20__) + #include "wx/gtk/private/textmeasure.h" +#elif defined(__WXMSW__) + #include "wx/msw/private/textmeasure.h" +#else // no platform-specific implementation of wxTextMeasure yet + #include "wx/generic/private/textmeasure.h" + + #define wxUSE_GENERIC_TEXTMEASURE 1 +#endif + +#ifndef wxUSE_GENERIC_TEXTMEASURE + #define wxUSE_GENERIC_TEXTMEASURE 0 +#endif + +#endif // _WX_PRIVATE_TEXTMEASURE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/threadinfo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/threadinfo.h new file mode 100644 index 0000000000..27a71674b0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/threadinfo.h @@ -0,0 +1,69 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/threadinfo.h +// Purpose: declaration of wxThreadSpecificInfo: thread-specific information +// Author: Vadim Zeitlin +// Created: 2009-07-13 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_THREADINFO_H_ +#define _WX_PRIVATE_THREADINFO_H_ + +#include "wx/defs.h" + +class WXDLLIMPEXP_FWD_BASE wxLog; + +#if wxUSE_INTL +#include "wx/hashset.h" +WX_DECLARE_HASH_SET(wxString, wxStringHash, wxStringEqual, + wxLocaleUntranslatedStrings); +#endif + + +// ---------------------------------------------------------------------------- +// wxThreadSpecificInfo: contains all thread-specific information used by wx +// ---------------------------------------------------------------------------- + +// Group all thread-specific information we use (e.g. the active wxLog target) +// a in this class to avoid consuming more TLS slots than necessary as there is +// only a limited number of them. +class wxThreadSpecificInfo +{ +public: + // Return this thread's instance. + static wxThreadSpecificInfo& Get(); + + // the thread-specific logger or NULL if the thread is using the global one + // (this is not used for the main thread which always uses the global + // logger) + wxLog *logger; + + // true if logging is currently disabled for this thread (this is also not + // used for the main thread which uses wxLog::ms_doLog) + // + // NB: we use a counter-intuitive "disabled" flag instead of "enabled" one + // because the default, for 0-initialized struct, should be to enable + // logging + bool loggingDisabled; + +#if wxUSE_INTL + // Storage for wxTranslations::GetUntranslatedString() + wxLocaleUntranslatedStrings untranslatedStrings; +#endif + +#if wxUSE_THREADS + // Cleans up storage for the current thread. Should be called when a thread + // is being destroyed. If it's not called, the only bad thing that happens + // is that the memory is deallocated later, on process termination. + static void ThreadCleanUp(); +#endif + +private: + wxThreadSpecificInfo() : logger(NULL), loggingDisabled(false) {} +}; + +#define wxThreadInfo wxThreadSpecificInfo::Get() + +#endif // _WX_PRIVATE_THREADINFO_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/timer.h new file mode 100644 index 0000000000..5f4ce0d511 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/timer.h @@ -0,0 +1,72 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/timer.h +// Purpose: Base class for wxTimer implementations +// Author: Lukasz Michalski <lmichalski@sf.net> +// Created: 31.10.2006 +// Copyright: (c) 2006-2007 wxWidgets dev team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TIMERIMPL_H_BASE_ +#define _WX_TIMERIMPL_H_BASE_ + +#include "wx/defs.h" +#include "wx/event.h" +#include "wx/timer.h" + +// ---------------------------------------------------------------------------- +// wxTimerImpl: abstract base class for wxTimer implementations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxTimerImpl +{ +public: + // default ctor, SetOwner() must be called after it (wxTimer does it) + wxTimerImpl(wxTimer *owner); + + // this must be called initially but may be also called later + void SetOwner(wxEvtHandler *owner, int timerid); + + // empty but virtual base class dtor, the caller is responsible for + // stopping the timer before it's destroyed (it can't be done from here as + // it's too late) + virtual ~wxTimerImpl() { } + + + // start the timer. When overriding call base version first. + virtual bool Start(int milliseconds = -1, bool oneShot = false); + + // stop the timer, only called if the timer is really running (unlike + // wxTimer::Stop()) + virtual void Stop() = 0; + + // return true if the timer is running + virtual bool IsRunning() const = 0; + + // this should be called by the port-specific code when the timer expires + virtual void Notify() { m_timer->Notify(); } + + // the default implementation of wxTimer::Notify(): generate a wxEVT_TIMER + void SendEvent(); + + + // accessors for wxTimer: + wxEvtHandler *GetOwner() const { return m_owner; } + int GetId() const { return m_idTimer; } + int GetInterval() const { return m_milli; } + bool IsOneShot() const { return m_oneShot; } + +protected: + wxTimer *m_timer; + + wxEvtHandler *m_owner; + + int m_idTimer; // id passed to wxTimerEvent + int m_milli; // the timer interval + bool m_oneShot; // true if one shot + + + wxDECLARE_NO_COPY_CLASS(wxTimerImpl); +}; + +#endif // _WX_TIMERIMPL_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/window.h new file mode 100644 index 0000000000..1192fb97b2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/window.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/window.h +// Purpose: misc wxWindow helpers +// Author: Vaclav Slavik +// Created: 2010-01-21 +// Copyright: (c) 2010 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_WINDOW_H_ +#define _WX_PRIVATE_WINDOW_H_ + +#include "wx/gdicmn.h" + +namespace wxPrivate +{ + +// Windows' computes dialog units using average character width over upper- +// and lower-case ASCII alphabet and not using the average character width +// metadata stored in the font; see +// http://support.microsoft.com/default.aspx/kb/145994 for detailed discussion. +// +// This helper function computes font dimensions in the same way. It works with +// either wxDC or wxWindow argument. +template<typename T> +inline wxSize GetAverageASCIILetterSize(const T& of_what) +{ + const wxStringCharType *TEXT_TO_MEASURE = + wxS("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); + + wxSize s = of_what.GetTextExtent(TEXT_TO_MEASURE); + s.x = (s.x / 26 + 1) / 2; + return s; +} + +} // namespace wxPrivate + +#endif // _WX_PRIVATE_WINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/wxprintf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/wxprintf.h new file mode 100644 index 0000000000..00013c193a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/private/wxprintf.h @@ -0,0 +1,934 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/private/wxprintf.h +// Purpose: wxWidgets wxPrintf() implementation +// Author: Ove Kaven +// Modified by: Ron Lee, Francesco Montorsi +// Created: 09/04/99 +// Copyright: (c) wxWidgets copyright +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_WXPRINTF_H_ +#define _WX_PRIVATE_WXPRINTF_H_ + +// --------------------------------------------------------------------------- +// headers and macros +// --------------------------------------------------------------------------- + +#include "wx/crt.h" +#include "wx/log.h" +#include "wx/utils.h" + +#include <string.h> + +// prefer snprintf over sprintf +#if defined(__VISUALC__) || \ + (defined(__BORLANDC__) && __BORLANDC__ >= 0x540) + #define system_sprintf(buff, max, flags, data) \ + ::_snprintf(buff, max, flags, data) +#elif defined(HAVE_SNPRINTF) + #define system_sprintf(buff, max, flags, data) \ + ::snprintf(buff, max, flags, data) +#else // NB: at least sprintf() should always be available + // since 'max' is not used in this case, wxVsnprintf() should always + // ensure that 'buff' is big enough for all common needs + // (see wxMAX_SVNPRINTF_FLAGBUFFER_LEN and wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN) + #define system_sprintf(buff, max, flags, data) \ + ::sprintf(buff, flags, data) + + #define SYSTEM_SPRINTF_IS_UNSAFE +#endif + +// --------------------------------------------------------------------------- +// printf format string parsing +// --------------------------------------------------------------------------- + +// some limits of our implementation +#define wxMAX_SVNPRINTF_ARGUMENTS 64 +#define wxMAX_SVNPRINTF_FLAGBUFFER_LEN 32 +#define wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN 512 + + +// the conversion specifiers accepted by wxCRT_VsnprintfW +enum wxPrintfArgType +{ + wxPAT_INVALID = -1, + + wxPAT_INT, // %d, %i, %o, %u, %x, %X + wxPAT_LONGINT, // %ld, etc +#ifdef wxLongLong_t + wxPAT_LONGLONGINT, // %Ld, etc +#endif + wxPAT_SIZET, // %zd, etc + + wxPAT_DOUBLE, // %e, %E, %f, %g, %G + wxPAT_LONGDOUBLE, // %le, etc + + wxPAT_POINTER, // %p + + wxPAT_CHAR, // %hc (in ANSI mode: %c, too) + wxPAT_WCHAR, // %lc (in Unicode mode: %c, too) + + wxPAT_PCHAR, // %s (related to a char *) + wxPAT_PWCHAR, // %s (related to a wchar_t *) + + wxPAT_NINT, // %n + wxPAT_NSHORTINT, // %hn + wxPAT_NLONGINT, // %ln + + wxPAT_STAR // '*' used for width or precision +}; + +// an argument passed to wxCRT_VsnprintfW +union wxPrintfArg +{ + int pad_int; // %d, %i, %o, %u, %x, %X + long int pad_longint; // %ld, etc +#ifdef wxLongLong_t + wxLongLong_t pad_longlongint; // %Ld, etc +#endif + size_t pad_sizet; // %zd, etc + + double pad_double; // %e, %E, %f, %g, %G + long double pad_longdouble; // %le, etc + + void *pad_pointer; // %p + + char pad_char; // %hc (in ANSI mode: %c, too) + wchar_t pad_wchar; // %lc (in Unicode mode: %c, too) + + void *pad_str; // %s + + int *pad_nint; // %n + short int *pad_nshortint; // %hn + long int *pad_nlongint; // %ln +}; + +// helper for converting string into either char* or wchar_t* depending +// on the type of wxPrintfConvSpec<T> instantiation: +template<typename CharType> struct wxPrintfStringHelper {}; + +template<> struct wxPrintfStringHelper<char> +{ + typedef const wxWX2MBbuf ConvertedType; + static ConvertedType Convert(const wxString& s) { return s.mb_str(); } +}; + +template<> struct wxPrintfStringHelper<wchar_t> +{ + typedef const wxWX2WCbuf ConvertedType; + static ConvertedType Convert(const wxString& s) { return s.wc_str(); } +}; + + +// Contains parsed data relative to a conversion specifier given to +// wxCRT_VsnprintfW and parsed from the format string +// NOTE: in C++ there is almost no difference between struct & classes thus +// there is no performance gain by using a struct here... +template<typename CharType> +class wxPrintfConvSpec +{ +public: + + // the position of the argument relative to this conversion specifier + size_t m_pos; + + // the type of this conversion specifier + wxPrintfArgType m_type; + + // the minimum and maximum width + // when one of this var is set to -1 it means: use the following argument + // in the stack as minimum/maximum width for this conversion specifier + int m_nMinWidth, m_nMaxWidth; + + // does the argument need to the be aligned to left ? + bool m_bAlignLeft; + + // pointer to the '%' of this conversion specifier in the format string + // NOTE: this points somewhere in the string given to the Parse() function - + // it's task of the caller ensure that memory is still valid ! + const CharType *m_pArgPos; + + // pointer to the last character of this conversion specifier in the + // format string + // NOTE: this points somewhere in the string given to the Parse() function - + // it's task of the caller ensure that memory is still valid ! + const CharType *m_pArgEnd; + + // a little buffer where formatting flags like #+\.hlqLz are stored by Parse() + // for use in Process() + char m_szFlags[wxMAX_SVNPRINTF_FLAGBUFFER_LEN]; + + +public: + + // we don't declare this as a constructor otherwise it would be called + // automatically and we don't want this: to be optimized, wxCRT_VsnprintfW + // calls this function only on really-used instances of this class. + void Init(); + + // Parses the first conversion specifier in the given string, which must + // begin with a '%'. Returns false if the first '%' does not introduce a + // (valid) conversion specifier and thus should be ignored. + bool Parse(const CharType *format); + + // Process this conversion specifier and puts the result in the given + // buffer. Returns the number of characters written in 'buf' or -1 if + // there's not enough space. + int Process(CharType *buf, size_t lenMax, wxPrintfArg *p, size_t written); + + // Loads the argument of this conversion specifier from given va_list. + bool LoadArg(wxPrintfArg *p, va_list &argptr); + +private: + // An helper function of LoadArg() which is used to handle the '*' flag + void ReplaceAsteriskWith(int w); +}; + +template<typename CharType> +void wxPrintfConvSpec<CharType>::Init() +{ + m_nMinWidth = 0; + m_nMaxWidth = 0xFFFF; + m_pos = 0; + m_bAlignLeft = false; + m_pArgPos = m_pArgEnd = NULL; + m_type = wxPAT_INVALID; + + memset(m_szFlags, 0, sizeof(m_szFlags)); + // this character will never be removed from m_szFlags array and + // is important when calling sprintf() in wxPrintfConvSpec::Process() ! + m_szFlags[0] = '%'; +} + +template<typename CharType> +bool wxPrintfConvSpec<CharType>::Parse(const CharType *format) +{ + bool done = false; + + // temporary parse data + size_t flagofs = 1; + bool in_prec, // true if we found the dot in some previous iteration + prec_dot; // true if the dot has been already added to m_szFlags + int ilen = 0; + + m_bAlignLeft = in_prec = prec_dot = false; + m_pArgPos = m_pArgEnd = format; + do + { +#define CHECK_PREC \ + if (in_prec && !prec_dot) \ + { \ + m_szFlags[flagofs++] = '.'; \ + prec_dot = true; \ + } + + // what follows '%'? + const CharType ch = *(++m_pArgEnd); + switch ( ch ) + { + case wxT('\0'): + return false; // not really an argument + + case wxT('%'): + return false; // not really an argument + + case wxT('#'): + case wxT('0'): + case wxT(' '): + case wxT('+'): + case wxT('\''): + CHECK_PREC + m_szFlags[flagofs++] = char(ch); + break; + + case wxT('-'): + CHECK_PREC + m_bAlignLeft = true; + m_szFlags[flagofs++] = char(ch); + break; + + case wxT('.'): + // don't use CHECK_PREC here to avoid warning about the value + // assigned to prec_dot inside it being never used (because + // overwritten just below) from Borland in release build + if (in_prec && !prec_dot) + m_szFlags[flagofs++] = '.'; + in_prec = true; + prec_dot = false; + m_nMaxWidth = 0; + // dot will be auto-added to m_szFlags if non-negative + // number follows + break; + + case wxT('h'): + ilen = -1; + CHECK_PREC + m_szFlags[flagofs++] = char(ch); + break; + + case wxT('l'): + // NB: it's safe to use flagofs-1 as flagofs always start from 1 + if (m_szFlags[flagofs-1] == 'l') // 'll' modifier is the same as 'L' or 'q' + ilen = 2; + else + ilen = 1; + CHECK_PREC + m_szFlags[flagofs++] = char(ch); + break; + + case wxT('q'): + case wxT('L'): + ilen = 2; + CHECK_PREC + m_szFlags[flagofs++] = char(ch); + break; +#ifdef __WINDOWS__ + // under Windows we support the special '%I64' notation as longlong + // integer conversion specifier for MSVC compatibility + // (it behaves exactly as '%lli' or '%Li' or '%qi') + case wxT('I'): + if (*(m_pArgEnd+1) == wxT('6') && + *(m_pArgEnd+2) == wxT('4')) + { + m_pArgEnd++; + m_pArgEnd++; + + ilen = 2; + CHECK_PREC + m_szFlags[flagofs++] = char(ch); + m_szFlags[flagofs++] = '6'; + m_szFlags[flagofs++] = '4'; + break; + } + // else: fall-through, 'I' is MSVC equivalent of C99 'z' +#endif // __WINDOWS__ + + case wxT('z'): + case wxT('Z'): + // 'z' is C99 standard for size_t and ptrdiff_t, 'Z' was used + // for this purpose in libc5 and by wx <= 2.8 + ilen = 3; + CHECK_PREC + m_szFlags[flagofs++] = char(ch); + break; + + case wxT('*'): + if (in_prec) + { + CHECK_PREC + + // tell Process() to use the next argument + // in the stack as maxwidth... + m_nMaxWidth = -1; + } + else + { + // tell Process() to use the next argument + // in the stack as minwidth... + m_nMinWidth = -1; + } + + // save the * in our formatting buffer... + // will be replaced later by Process() + m_szFlags[flagofs++] = char(ch); + break; + + case wxT('1'): case wxT('2'): case wxT('3'): + case wxT('4'): case wxT('5'): case wxT('6'): + case wxT('7'): case wxT('8'): case wxT('9'): + { + int len = 0; + CHECK_PREC + while ( (*m_pArgEnd >= CharType('0')) && + (*m_pArgEnd <= CharType('9')) ) + { + m_szFlags[flagofs++] = char(*m_pArgEnd); + len = len*10 + (*m_pArgEnd - wxT('0')); + m_pArgEnd++; + } + + if (in_prec) + m_nMaxWidth = len; + else + m_nMinWidth = len; + + m_pArgEnd--; // the main loop pre-increments n again + } + break; + + case wxT('$'): // a positional parameter (e.g. %2$s) ? + { + if (m_nMinWidth <= 0) + break; // ignore this formatting flag as no + // numbers are preceding it + + // remove from m_szFlags all digits previously added + do { + flagofs--; + } while (m_szFlags[flagofs] >= '1' && + m_szFlags[flagofs] <= '9'); + + // re-adjust the offset making it point to the + // next free char of m_szFlags + flagofs++; + + m_pos = m_nMinWidth; + m_nMinWidth = 0; + } + break; + + case wxT('d'): + case wxT('i'): + case wxT('o'): + case wxT('u'): + case wxT('x'): + case wxT('X'): + CHECK_PREC + m_szFlags[flagofs++] = char(ch); + if (ilen == 0) + m_type = wxPAT_INT; + else if (ilen == -1) + // NB: 'short int' value passed through '...' + // is promoted to 'int', so we have to get + // an int from stack even if we need a short + m_type = wxPAT_INT; + else if (ilen == 1) + m_type = wxPAT_LONGINT; + else if (ilen == 2) +#ifdef wxLongLong_t + m_type = wxPAT_LONGLONGINT; +#else // !wxLongLong_t + m_type = wxPAT_LONGINT; +#endif // wxLongLong_t/!wxLongLong_t + else if (ilen == 3) + m_type = wxPAT_SIZET; + done = true; + break; + + case wxT('e'): + case wxT('E'): + case wxT('f'): + case wxT('g'): + case wxT('G'): + CHECK_PREC + m_szFlags[flagofs++] = char(ch); + if (ilen == 2) + m_type = wxPAT_LONGDOUBLE; + else + m_type = wxPAT_DOUBLE; + done = true; + break; + + case wxT('p'): + m_type = wxPAT_POINTER; + m_szFlags[flagofs++] = char(ch); + done = true; + break; + + case wxT('c'): + if (ilen == -1) + { + // in Unicode mode %hc == ANSI character + // and in ANSI mode, %hc == %c == ANSI... + m_type = wxPAT_CHAR; + } + else if (ilen == 1) + { + // in ANSI mode %lc == Unicode character + // and in Unicode mode, %lc == %c == Unicode... + m_type = wxPAT_WCHAR; + } + else + { +#if wxUSE_UNICODE + // in Unicode mode, %c == Unicode character + m_type = wxPAT_WCHAR; +#else + // in ANSI mode, %c == ANSI character + m_type = wxPAT_CHAR; +#endif + } + done = true; + break; + + case wxT('s'): + if (ilen == -1) + { + // Unicode mode wx extension: we'll let %hs mean non-Unicode + // strings (when in ANSI mode, %s == %hs == ANSI string) + m_type = wxPAT_PCHAR; + } + else if (ilen == 1) + { + // in Unicode mode, %ls == %s == Unicode string + // in ANSI mode, %ls == Unicode string + m_type = wxPAT_PWCHAR; + } + else + { +#if wxUSE_UNICODE + m_type = wxPAT_PWCHAR; +#else + m_type = wxPAT_PCHAR; +#endif + } + done = true; + break; + + case wxT('n'): + if (ilen == 0) + m_type = wxPAT_NINT; + else if (ilen == -1) + m_type = wxPAT_NSHORTINT; + else if (ilen >= 1) + m_type = wxPAT_NLONGINT; + done = true; + break; + + default: + // bad format, don't consider this an argument; + // leave it unchanged + return false; + } + + if (flagofs == wxMAX_SVNPRINTF_FLAGBUFFER_LEN) + { + wxLogDebug(wxT("Too many flags specified for a single conversion specifier!")); + return false; + } + } + while (!done); + + return true; // parsing was successful +} + +template<typename CharType> +void wxPrintfConvSpec<CharType>::ReplaceAsteriskWith(int width) +{ + char temp[wxMAX_SVNPRINTF_FLAGBUFFER_LEN]; + + // find the first * in our flag buffer + char *pwidth = strchr(m_szFlags, '*'); + wxCHECK_RET(pwidth, wxT("field width must be specified")); + + // save what follows the * (the +1 is to skip the asterisk itself!) + strcpy(temp, pwidth+1); + if (width < 0) + { + pwidth[0] = wxT('-'); + pwidth++; + } + + // replace * with the actual integer given as width +#ifndef SYSTEM_SPRINTF_IS_UNSAFE + int maxlen = (m_szFlags + wxMAX_SVNPRINTF_FLAGBUFFER_LEN - pwidth) / + sizeof(*m_szFlags); +#endif + int offset = system_sprintf(pwidth, maxlen, "%d", abs(width)); + + // restore after the expanded * what was following it + strcpy(pwidth+offset, temp); +} + +template<typename CharType> +bool wxPrintfConvSpec<CharType>::LoadArg(wxPrintfArg *p, va_list &argptr) +{ + // did the '*' width/precision specifier was used ? + if (m_nMaxWidth == -1) + { + // take the maxwidth specifier from the stack + m_nMaxWidth = va_arg(argptr, int); + if (m_nMaxWidth < 0) + m_nMaxWidth = 0; + else + ReplaceAsteriskWith(m_nMaxWidth); + } + + if (m_nMinWidth == -1) + { + // take the minwidth specifier from the stack + m_nMinWidth = va_arg(argptr, int); + + ReplaceAsteriskWith(m_nMinWidth); + if (m_nMinWidth < 0) + { + m_bAlignLeft = !m_bAlignLeft; + m_nMinWidth = -m_nMinWidth; + } + } + + switch (m_type) { + case wxPAT_INT: + p->pad_int = va_arg(argptr, int); + break; + case wxPAT_LONGINT: + p->pad_longint = va_arg(argptr, long int); + break; +#ifdef wxLongLong_t + case wxPAT_LONGLONGINT: + p->pad_longlongint = va_arg(argptr, wxLongLong_t); + break; +#endif // wxLongLong_t + case wxPAT_SIZET: + p->pad_sizet = va_arg(argptr, size_t); + break; + case wxPAT_DOUBLE: + p->pad_double = va_arg(argptr, double); + break; + case wxPAT_LONGDOUBLE: + p->pad_longdouble = va_arg(argptr, long double); + break; + case wxPAT_POINTER: + p->pad_pointer = va_arg(argptr, void *); + break; + + case wxPAT_CHAR: + p->pad_char = (char)va_arg(argptr, int); // char is promoted to int when passed through '...' + break; + case wxPAT_WCHAR: + p->pad_wchar = (wchar_t)va_arg(argptr, int); // char is promoted to int when passed through '...' + break; + + case wxPAT_PCHAR: + case wxPAT_PWCHAR: + p->pad_str = va_arg(argptr, void *); + break; + + case wxPAT_NINT: + p->pad_nint = va_arg(argptr, int *); + break; + case wxPAT_NSHORTINT: + p->pad_nshortint = va_arg(argptr, short int *); + break; + case wxPAT_NLONGINT: + p->pad_nlongint = va_arg(argptr, long int *); + break; + + case wxPAT_STAR: + // this will be handled as part of the next argument + return true; + + case wxPAT_INVALID: + default: + return false; + } + + return true; // loading was successful +} + +template<typename CharType> +int wxPrintfConvSpec<CharType>::Process(CharType *buf, size_t lenMax, wxPrintfArg *p, size_t written) +{ + // buffer to avoid dynamic memory allocation each time for small strings; + // note that this buffer is used only to hold results of number formatting, + // %s directly writes user's string in buf, without using szScratch + char szScratch[wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN]; + size_t lenScratch = 0, lenCur = 0; + +#define APPEND_CH(ch) \ + { \ + if ( lenCur == lenMax ) \ + return -1; \ + \ + buf[lenCur++] = ch; \ + } + + switch ( m_type ) + { + case wxPAT_INT: + lenScratch = system_sprintf(szScratch, wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN, m_szFlags, p->pad_int); + break; + + case wxPAT_LONGINT: + lenScratch = system_sprintf(szScratch, wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN, m_szFlags, p->pad_longint); + break; + +#ifdef wxLongLong_t + case wxPAT_LONGLONGINT: + lenScratch = system_sprintf(szScratch, wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN, m_szFlags, p->pad_longlongint); + break; +#endif // SIZEOF_LONG_LONG + + case wxPAT_SIZET: + lenScratch = system_sprintf(szScratch, wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN, m_szFlags, p->pad_sizet); + break; + + case wxPAT_LONGDOUBLE: + lenScratch = system_sprintf(szScratch, wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN, m_szFlags, p->pad_longdouble); + break; + + case wxPAT_DOUBLE: + lenScratch = system_sprintf(szScratch, wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN, m_szFlags, p->pad_double); + break; + + case wxPAT_POINTER: + lenScratch = system_sprintf(szScratch, wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN, m_szFlags, p->pad_pointer); + break; + + case wxPAT_CHAR: + case wxPAT_WCHAR: + { + wxUniChar ch; + if (m_type == wxPAT_CHAR) + ch = p->pad_char; + else // m_type == wxPAT_WCHAR + ch = p->pad_wchar; + + CharType val = ch; + + size_t i; + + if (!m_bAlignLeft) + for (i = 1; i < (size_t)m_nMinWidth; i++) + APPEND_CH(wxT(' ')); + + APPEND_CH(val); + + if (m_bAlignLeft) + for (i = 1; i < (size_t)m_nMinWidth; i++) + APPEND_CH(wxT(' ')); + } + break; + + case wxPAT_PCHAR: + case wxPAT_PWCHAR: + { + wxString s; + if ( !p->pad_str ) + { + if ( m_nMaxWidth >= 6 ) + s = wxT("(null)"); + } + else if (m_type == wxPAT_PCHAR) + s.assign(static_cast<const char *>(p->pad_str)); + else // m_type == wxPAT_PWCHAR + s.assign(static_cast<const wchar_t *>(p->pad_str)); + + typename wxPrintfStringHelper<CharType>::ConvertedType strbuf( + wxPrintfStringHelper<CharType>::Convert(s)); + + // at this point we are sure that m_nMaxWidth is positive or + // null (see top of wxPrintfConvSpec::LoadArg) + int len = wxMin((unsigned int)m_nMaxWidth, wxStrlen(strbuf)); + + int i; + + if (!m_bAlignLeft) + { + for (i = len; i < m_nMinWidth; i++) + APPEND_CH(wxT(' ')); + } + + len = wxMin((unsigned int)len, lenMax-lenCur); + wxStrncpy(buf+lenCur, strbuf, len); + lenCur += len; + + if (m_bAlignLeft) + { + for (i = len; i < m_nMinWidth; i++) + APPEND_CH(wxT(' ')); + } + } + break; + + case wxPAT_NINT: + *p->pad_nint = written; + break; + + case wxPAT_NSHORTINT: + *p->pad_nshortint = (short int)written; + break; + + case wxPAT_NLONGINT: + *p->pad_nlongint = written; + break; + + case wxPAT_INVALID: + default: + return -1; + } + + // if we used system's sprintf() then we now need to append the s_szScratch + // buffer to the given one... + switch (m_type) + { + case wxPAT_INT: + case wxPAT_LONGINT: +#ifdef wxLongLong_t + case wxPAT_LONGLONGINT: +#endif + case wxPAT_SIZET: + case wxPAT_LONGDOUBLE: + case wxPAT_DOUBLE: + case wxPAT_POINTER: + wxASSERT(lenScratch < wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN); + // NB: 1) we can compare lenMax (for CharType*, i.e. possibly + // wchar_t*) with lenScratch (char*) because this code is + // formatting integers and that will have the same length + // even in UTF-8 (the only case when char* length may be + // more than wchar_t* length of the same string) + // 2) wxStrncpy converts the 2nd argument to 1st argument's + // type transparently if their types differ, so this code + // works for both instantiations + if (lenMax < lenScratch) + { + // fill output buffer and then return -1 + wxStrncpy(buf, szScratch, lenMax); + return -1; + } + wxStrncpy(buf, szScratch, lenScratch); + lenCur += lenScratch; + break; + + default: + break; // all other cases were completed previously + } + + return lenCur; +} + + +// helper that parses format string +template<typename CharType> +struct wxPrintfConvSpecParser +{ + typedef wxPrintfConvSpec<CharType> ConvSpec; + + wxPrintfConvSpecParser(const CharType *fmt) + { + nargs = 0; + posarg_present = + nonposarg_present = false; + + memset(pspec, 0, sizeof(pspec)); + + // parse the format string + for ( const CharType *toparse = fmt; *toparse != wxT('\0'); toparse++ ) + { + // skip everything except format specifications + if ( *toparse != '%' ) + continue; + + // also skip escaped percent signs + if ( toparse[1] == '%' ) + { + toparse++; + continue; + } + + ConvSpec *spec = &specs[nargs]; + spec->Init(); + + // attempt to parse this format specification + if ( !spec->Parse(toparse) ) + continue; + + // advance to the end of this specifier + toparse = spec->m_pArgEnd; + + // special handling for specifications including asterisks: we need + // to reserve an extra slot (or two if asterisks were used for both + // width and precision) in specs array in this case + if ( const char *f = strchr(spec->m_szFlags, '*') ) + { + unsigned numAsterisks = 1; + if ( strchr(++f, '*') ) + numAsterisks++; + + for ( unsigned n = 0; n < numAsterisks; n++ ) + { + if ( nargs++ == wxMAX_SVNPRINTF_ARGUMENTS ) + break; + + // TODO: we need to support specifiers of the form "%2$*1$s" + // (this is the same as "%*s") as if any positional arguments + // are used all asterisks must be positional as well but this + // requires a lot of changes in this code (basically we'd need + // to rewrite Parse() to return "*" and conversion itself as + // separate entries) + if ( posarg_present ) + { + wxFAIL_MSG + ( + wxString::Format + ( + "Format string \"%s\" uses both positional " + "parameters and '*' but this is not currently " + "supported by this implementation, sorry.", + fmt + ) + ); + } + + specs[nargs] = *spec; + + // make an entry for '*' and point to it from pspec + spec->Init(); + spec->m_type = wxPAT_STAR; + pspec[nargs - 1] = spec; + + spec = &specs[nargs]; + } + } + + + // check if this is a positional or normal argument + if ( spec->m_pos > 0 ) + { + // the positional arguments start from number 1 so we need + // to adjust the index + spec->m_pos--; + posarg_present = true; + } + else // not a positional argument... + { + spec->m_pos = nargs; + nonposarg_present = true; + } + + // this conversion specifier is tied to the pos-th argument... + pspec[spec->m_pos] = spec; + + if ( nargs++ == wxMAX_SVNPRINTF_ARGUMENTS ) + break; + } + + + // warn if we lost any arguments (the program probably will crash + // anyhow because of stack corruption...) + if ( nargs == wxMAX_SVNPRINTF_ARGUMENTS ) + { + wxFAIL_MSG + ( + wxString::Format + ( + "wxVsnprintf() currently supports only %d arguments, " + "but format string \"%s\" defines more of them.\n" + "You need to change wxMAX_SVNPRINTF_ARGUMENTS and " + "recompile if more are really needed.", + fmt, wxMAX_SVNPRINTF_ARGUMENTS + ) + ); + } + } + + // total number of valid elements in specs + unsigned nargs; + + // all format specifications in this format string in order of their + // appearance (which may be different from arguments order) + ConvSpec specs[wxMAX_SVNPRINTF_ARGUMENTS]; + + // pointer to specs array element for the N-th argument + ConvSpec *pspec[wxMAX_SVNPRINTF_ARGUMENTS]; + + // true if any positional/non-positional parameters are used + bool posarg_present, + nonposarg_present; +}; + +#undef APPEND_CH +#undef CHECK_PREC + +#endif // _WX_PRIVATE_WXPRINTF_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/prntbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/prntbase.h new file mode 100644 index 0000000000..a6f22fa098 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/prntbase.h @@ -0,0 +1,758 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/prntbase.h +// Purpose: Base classes for printing framework +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRNTBASEH__ +#define _WX_PRNTBASEH__ + +#include "wx/defs.h" + +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/event.h" +#include "wx/cmndata.h" +#include "wx/panel.h" +#include "wx/scrolwin.h" +#include "wx/dialog.h" +#include "wx/frame.h" +#include "wx/dc.h" + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxChoice; +class WXDLLIMPEXP_FWD_CORE wxPrintout; +class WXDLLIMPEXP_FWD_CORE wxPrinterBase; +class WXDLLIMPEXP_FWD_CORE wxPrintDialogBase; +class WXDLLIMPEXP_FWD_CORE wxPrintDialog; +class WXDLLIMPEXP_FWD_CORE wxPageSetupDialogBase; +class WXDLLIMPEXP_FWD_CORE wxPageSetupDialog; +class WXDLLIMPEXP_FWD_CORE wxPrintPreviewBase; +class WXDLLIMPEXP_FWD_CORE wxPreviewCanvas; +class WXDLLIMPEXP_FWD_CORE wxPreviewControlBar; +class WXDLLIMPEXP_FWD_CORE wxPreviewFrame; +class WXDLLIMPEXP_FWD_CORE wxPrintFactory; +class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase; +class WXDLLIMPEXP_FWD_CORE wxPrintPreview; +class WXDLLIMPEXP_FWD_CORE wxPrintAbortDialog; +class WXDLLIMPEXP_FWD_CORE wxStaticText; +class wxPrintPageMaxCtrl; +class wxPrintPageTextCtrl; + +//---------------------------------------------------------------------------- +// error consts +//---------------------------------------------------------------------------- + +enum wxPrinterError +{ + wxPRINTER_NO_ERROR = 0, + wxPRINTER_CANCELLED, + wxPRINTER_ERROR +}; + +// Preview frame modality kind used with wxPreviewFrame::Initialize() +enum wxPreviewFrameModalityKind +{ + // Disable all the other top level windows while the preview is shown. + wxPreviewFrame_AppModal, + + // Disable only the parent window while the preview is shown. + wxPreviewFrame_WindowModal, + + // Don't disable any windows. + wxPreviewFrame_NonModal +}; + +//---------------------------------------------------------------------------- +// wxPrintFactory +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPrintFactory +{ +public: + wxPrintFactory() {} + virtual ~wxPrintFactory() {} + + virtual wxPrinterBase *CreatePrinter( wxPrintDialogData* data ) = 0; + + virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, + wxPrintout *printout = NULL, + wxPrintDialogData *data = NULL ) = 0; + virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, + wxPrintout *printout, + wxPrintData *data ) = 0; + + virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, + wxPrintDialogData *data = NULL ) = 0; + virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, + wxPrintData *data ) = 0; + + virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent, + wxPageSetupDialogData * data = NULL ) = 0; + + virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ) = 0; + + // What to do and what to show in the wxPrintDialog + // a) Use the generic print setup dialog or a native one? + virtual bool HasPrintSetupDialog() = 0; + virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data ) = 0; + // b) Provide the "print to file" option ourselves or via print setup? + virtual bool HasOwnPrintToFile() = 0; + // c) Show current printer + virtual bool HasPrinterLine() = 0; + virtual wxString CreatePrinterLine() = 0; + // d) Show Status line for current printer? + virtual bool HasStatusLine() = 0; + virtual wxString CreateStatusLine() = 0; + + + virtual wxPrintNativeDataBase *CreatePrintNativeData() = 0; + + static void SetPrintFactory( wxPrintFactory *factory ); + static wxPrintFactory *GetFactory(); +private: + static wxPrintFactory *m_factory; +}; + +class WXDLLIMPEXP_CORE wxNativePrintFactory: public wxPrintFactory +{ +public: + virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data ); + + virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, + wxPrintout *printout = NULL, + wxPrintDialogData *data = NULL ); + virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, + wxPrintout *printout, + wxPrintData *data ); + + virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, + wxPrintDialogData *data = NULL ); + virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, + wxPrintData *data ); + + virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent, + wxPageSetupDialogData * data = NULL ); + + virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ); + + virtual bool HasPrintSetupDialog(); + virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data ); + virtual bool HasOwnPrintToFile(); + virtual bool HasPrinterLine(); + virtual wxString CreatePrinterLine(); + virtual bool HasStatusLine(); + virtual wxString CreateStatusLine(); + + virtual wxPrintNativeDataBase *CreatePrintNativeData(); +}; + +//---------------------------------------------------------------------------- +// wxPrintNativeDataBase +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPrintNativeDataBase: public wxObject +{ +public: + wxPrintNativeDataBase(); + virtual ~wxPrintNativeDataBase() {} + + virtual bool TransferTo( wxPrintData &data ) = 0; + virtual bool TransferFrom( const wxPrintData &data ) = 0; + + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const = 0; + + int m_ref; + +private: + DECLARE_CLASS(wxPrintNativeDataBase) + wxDECLARE_NO_COPY_CLASS(wxPrintNativeDataBase); +}; + +//---------------------------------------------------------------------------- +// wxPrinterBase +//---------------------------------------------------------------------------- + +/* + * Represents the printer: manages printing a wxPrintout object + */ + +class WXDLLIMPEXP_CORE wxPrinterBase: public wxObject +{ +public: + wxPrinterBase(wxPrintDialogData *data = NULL); + virtual ~wxPrinterBase(); + + virtual wxPrintAbortDialog *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); + virtual void ReportError(wxWindow *parent, wxPrintout *printout, const wxString& message); + + virtual wxPrintDialogData& GetPrintDialogData() const; + bool GetAbort() const { return sm_abortIt; } + + static wxPrinterError GetLastError() { return sm_lastError; } + + /////////////////////////////////////////////////////////////////////////// + // OVERRIDES + + virtual bool Setup(wxWindow *parent) = 0; + virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true) = 0; + virtual wxDC* PrintDialog(wxWindow *parent) = 0; + +protected: + wxPrintDialogData m_printDialogData; + wxPrintout* m_currentPrintout; + + static wxPrinterError sm_lastError; + +public: + static wxWindow* sm_abortWindow; + static bool sm_abortIt; + +private: + DECLARE_CLASS(wxPrinterBase) + wxDECLARE_NO_COPY_CLASS(wxPrinterBase); +}; + +//---------------------------------------------------------------------------- +// wxPrinter +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPrinter: public wxPrinterBase +{ +public: + wxPrinter(wxPrintDialogData *data = NULL); + virtual ~wxPrinter(); + + virtual wxPrintAbortDialog *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); + virtual void ReportError(wxWindow *parent, wxPrintout *printout, const wxString& message); + + virtual bool Setup(wxWindow *parent); + virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true); + virtual wxDC* PrintDialog(wxWindow *parent); + + virtual wxPrintDialogData& GetPrintDialogData() const; + +protected: + wxPrinterBase *m_pimpl; + +private: + DECLARE_CLASS(wxPrinter) + wxDECLARE_NO_COPY_CLASS(wxPrinter); +}; + +//---------------------------------------------------------------------------- +// wxPrintout +//---------------------------------------------------------------------------- + +/* + * Represents an object via which a document may be printed. + * The programmer derives from this, overrides (at least) OnPrintPage, + * and passes it to a wxPrinter object for printing, or a wxPrintPreview + * object for previewing. + */ + +class WXDLLIMPEXP_CORE wxPrintout: public wxObject +{ +public: + wxPrintout(const wxString& title = wxGetTranslation("Printout")); + virtual ~wxPrintout(); + + virtual bool OnBeginDocument(int startPage, int endPage); + virtual void OnEndDocument(); + virtual void OnBeginPrinting(); + virtual void OnEndPrinting(); + + // Guaranteed to be before any other functions are called + virtual void OnPreparePrinting() { } + + virtual bool HasPage(int page); + virtual bool OnPrintPage(int page) = 0; + virtual void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo); + + virtual wxString GetTitle() const { return m_printoutTitle; } + + wxDC *GetDC() const { return m_printoutDC; } + void SetDC(wxDC *dc) { m_printoutDC = dc; } + + void FitThisSizeToPaper(const wxSize& imageSize); + void FitThisSizeToPage(const wxSize& imageSize); + void FitThisSizeToPageMargins(const wxSize& imageSize, const wxPageSetupDialogData& pageSetupData); + void MapScreenSizeToPaper(); + void MapScreenSizeToPage(); + void MapScreenSizeToPageMargins(const wxPageSetupDialogData& pageSetupData); + void MapScreenSizeToDevice(); + + wxRect GetLogicalPaperRect() const; + wxRect GetLogicalPageRect() const; + wxRect GetLogicalPageMarginsRect(const wxPageSetupDialogData& pageSetupData) const; + + void SetLogicalOrigin(wxCoord x, wxCoord y); + void OffsetLogicalOrigin(wxCoord xoff, wxCoord yoff); + + void SetPageSizePixels(int w, int h) { m_pageWidthPixels = w; m_pageHeightPixels = h; } + void GetPageSizePixels(int *w, int *h) const { *w = m_pageWidthPixels; *h = m_pageHeightPixels; } + void SetPageSizeMM(int w, int h) { m_pageWidthMM = w; m_pageHeightMM = h; } + void GetPageSizeMM(int *w, int *h) const { *w = m_pageWidthMM; *h = m_pageHeightMM; } + + void SetPPIScreen(int x, int y) { m_PPIScreenX = x; m_PPIScreenY = y; } + void SetPPIScreen(const wxSize& ppi) { SetPPIScreen(ppi.x, ppi.y); } + void GetPPIScreen(int *x, int *y) const { *x = m_PPIScreenX; *y = m_PPIScreenY; } + void SetPPIPrinter(int x, int y) { m_PPIPrinterX = x; m_PPIPrinterY = y; } + void SetPPIPrinter(const wxSize& ppi) { SetPPIPrinter(ppi.x, ppi.y); } + void GetPPIPrinter(int *x, int *y) const { *x = m_PPIPrinterX; *y = m_PPIPrinterY; } + + void SetPaperRectPixels(const wxRect& paperRectPixels) { m_paperRectPixels = paperRectPixels; } + wxRect GetPaperRectPixels() const { return m_paperRectPixels; } + + // This must be called by wxPrintPreview to associate itself with the + // printout it uses. + virtual void SetPreview(wxPrintPreview *preview) { m_preview = preview; } + + wxPrintPreview *GetPreview() const { return m_preview; } + virtual bool IsPreview() const { return GetPreview() != NULL; } + +private: + wxString m_printoutTitle; + wxDC* m_printoutDC; + wxPrintPreview *m_preview; + + int m_pageWidthPixels; + int m_pageHeightPixels; + + int m_pageWidthMM; + int m_pageHeightMM; + + int m_PPIScreenX; + int m_PPIScreenY; + int m_PPIPrinterX; + int m_PPIPrinterY; + + wxRect m_paperRectPixels; + +private: + DECLARE_ABSTRACT_CLASS(wxPrintout) + wxDECLARE_NO_COPY_CLASS(wxPrintout); +}; + +//---------------------------------------------------------------------------- +// wxPreviewCanvas +//---------------------------------------------------------------------------- + +/* + * Canvas upon which a preview is drawn. + */ + +class WXDLLIMPEXP_CORE wxPreviewCanvas: public wxScrolledWindow +{ +public: + wxPreviewCanvas(wxPrintPreviewBase *preview, + wxWindow *parent, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxT("canvas")); + virtual ~wxPreviewCanvas(); + + void SetPreview(wxPrintPreviewBase *preview) { m_printPreview = preview; } + + void OnPaint(wxPaintEvent& event); + void OnChar(wxKeyEvent &event); + // Responds to colour changes + void OnSysColourChanged(wxSysColourChangedEvent& event); + +private: +#if wxUSE_MOUSEWHEEL + void OnMouseWheel(wxMouseEvent& event); +#endif // wxUSE_MOUSEWHEEL + void OnIdle(wxIdleEvent& event); + + wxPrintPreviewBase* m_printPreview; + + DECLARE_CLASS(wxPreviewCanvas) + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxPreviewCanvas); +}; + +//---------------------------------------------------------------------------- +// wxPreviewFrame +//---------------------------------------------------------------------------- + +/* + * Default frame for showing preview. + */ + +class WXDLLIMPEXP_CORE wxPreviewFrame: public wxFrame +{ +public: + wxPreviewFrame(wxPrintPreviewBase *preview, + wxWindow *parent, + const wxString& title = wxGetTranslation("Print Preview"), + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT, + const wxString& name = wxFrameNameStr); + virtual ~wxPreviewFrame(); + + // Either Initialize() or InitializeWithModality() must be called before + // showing the preview frame, the former being just a particular case of + // the latter initializing the frame for being showing app-modally. + + // Notice that we must keep Initialize() with its existing signature to + // avoid breaking the old code that overrides it and we can't reuse the + // same name for the other functions to avoid virtual function hiding + // problem and the associated warnings given by some compilers (e.g. from + // g++ with -Woverloaded-virtual). + virtual void Initialize() + { + InitializeWithModality(wxPreviewFrame_AppModal); + } + + // Also note that this method is not virtual as it doesn't need to be + // overridden: it's never called by wxWidgets (of course, the same is true + // for Initialize() but, again, it must remain virtual for compatibility). + void InitializeWithModality(wxPreviewFrameModalityKind kind); + + void OnCloseWindow(wxCloseEvent& event); + virtual void CreateCanvas(); + virtual void CreateControlBar(); + + inline wxPreviewControlBar* GetControlBar() const { return m_controlBar; } + +protected: + wxPreviewCanvas* m_previewCanvas; + wxPreviewControlBar* m_controlBar; + wxPrintPreviewBase* m_printPreview; + wxWindowDisabler* m_windowDisabler; + + wxPreviewFrameModalityKind m_modalityKind; + + +private: + void OnChar(wxKeyEvent& event); + + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxPreviewFrame) + wxDECLARE_NO_COPY_CLASS(wxPreviewFrame); +}; + +//---------------------------------------------------------------------------- +// wxPreviewControlBar +//---------------------------------------------------------------------------- + +/* + * A panel with buttons for controlling a print preview. + * The programmer may wish to use other means for controlling + * the print preview. + */ + +#define wxPREVIEW_PRINT 1 +#define wxPREVIEW_PREVIOUS 2 +#define wxPREVIEW_NEXT 4 +#define wxPREVIEW_ZOOM 8 +#define wxPREVIEW_FIRST 16 +#define wxPREVIEW_LAST 32 +#define wxPREVIEW_GOTO 64 + +#define wxPREVIEW_DEFAULT (wxPREVIEW_PREVIOUS|wxPREVIEW_NEXT|wxPREVIEW_ZOOM\ + |wxPREVIEW_FIRST|wxPREVIEW_GOTO|wxPREVIEW_LAST) + +// Ids for controls +#define wxID_PREVIEW_CLOSE 1 +#define wxID_PREVIEW_NEXT 2 +#define wxID_PREVIEW_PREVIOUS 3 +#define wxID_PREVIEW_PRINT 4 +#define wxID_PREVIEW_ZOOM 5 +#define wxID_PREVIEW_FIRST 6 +#define wxID_PREVIEW_LAST 7 +#define wxID_PREVIEW_GOTO 8 +#define wxID_PREVIEW_ZOOM_IN 9 +#define wxID_PREVIEW_ZOOM_OUT 10 + +class WXDLLIMPEXP_CORE wxPreviewControlBar: public wxPanel +{ + DECLARE_CLASS(wxPreviewControlBar) + +public: + wxPreviewControlBar(wxPrintPreviewBase *preview, + long buttons, + wxWindow *parent, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL, + const wxString& name = wxT("panel")); + virtual ~wxPreviewControlBar(); + + virtual void CreateButtons(); + virtual void SetPageInfo(int minPage, int maxPage); + virtual void SetZoomControl(int zoom); + virtual int GetZoomControl(); + virtual wxPrintPreviewBase *GetPrintPreview() const + { return m_printPreview; } + + + // Implementation only from now on. + void OnWindowClose(wxCommandEvent& event); + void OnNext(); + void OnPrevious(); + void OnFirst(); + void OnLast(); + void OnGotoPage(); + void OnPrint(); + + void OnPrintButton(wxCommandEvent& WXUNUSED(event)) { OnPrint(); } + void OnNextButton(wxCommandEvent & WXUNUSED(event)) { OnNext(); } + void OnPreviousButton(wxCommandEvent & WXUNUSED(event)) { OnPrevious(); } + void OnFirstButton(wxCommandEvent & WXUNUSED(event)) { OnFirst(); } + void OnLastButton(wxCommandEvent & WXUNUSED(event)) { OnLast(); } + void OnPaint(wxPaintEvent& event); + + void OnUpdateNextButton(wxUpdateUIEvent& event) + { event.Enable(IsNextEnabled()); } + void OnUpdatePreviousButton(wxUpdateUIEvent& event) + { event.Enable(IsPreviousEnabled()); } + void OnUpdateFirstButton(wxUpdateUIEvent& event) + { event.Enable(IsFirstEnabled()); } + void OnUpdateLastButton(wxUpdateUIEvent& event) + { event.Enable(IsLastEnabled()); } + void OnUpdateZoomInButton(wxUpdateUIEvent& event) + { event.Enable(IsZoomInEnabled()); } + void OnUpdateZoomOutButton(wxUpdateUIEvent& event) + { event.Enable(IsZoomOutEnabled()); } + + // These methods are not private because they are called by wxPreviewCanvas. + void DoZoomIn(); + void DoZoomOut(); + +protected: + wxPrintPreviewBase* m_printPreview; + wxButton* m_closeButton; + wxChoice* m_zoomControl; + wxPrintPageTextCtrl* m_currentPageText; + wxPrintPageMaxCtrl* m_maxPageText; + + long m_buttonFlags; + +private: + void DoGotoPage(int page); + + void DoZoom(); + + bool IsNextEnabled() const; + bool IsPreviousEnabled() const; + bool IsFirstEnabled() const; + bool IsLastEnabled() const; + bool IsZoomInEnabled() const; + bool IsZoomOutEnabled() const; + + void OnZoomInButton(wxCommandEvent & WXUNUSED(event)) { DoZoomIn(); } + void OnZoomOutButton(wxCommandEvent & WXUNUSED(event)) { DoZoomOut(); } + void OnZoomChoice(wxCommandEvent& WXUNUSED(event)) { DoZoom(); } + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxPreviewControlBar); +}; + +//---------------------------------------------------------------------------- +// wxPrintPreviewBase +//---------------------------------------------------------------------------- + +/* + * Programmer creates an object of this class to preview a wxPrintout. + */ + +class WXDLLIMPEXP_CORE wxPrintPreviewBase: public wxObject +{ +public: + wxPrintPreviewBase(wxPrintout *printout, + wxPrintout *printoutForPrinting = NULL, + wxPrintDialogData *data = NULL); + wxPrintPreviewBase(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintData *data); + virtual ~wxPrintPreviewBase(); + + virtual bool SetCurrentPage(int pageNum); + virtual int GetCurrentPage() const; + + virtual void SetPrintout(wxPrintout *printout); + virtual wxPrintout *GetPrintout() const; + virtual wxPrintout *GetPrintoutForPrinting() const; + + virtual void SetFrame(wxFrame *frame); + virtual void SetCanvas(wxPreviewCanvas *canvas); + + virtual wxFrame *GetFrame() const; + virtual wxPreviewCanvas *GetCanvas() const; + + // This is a helper routine, used by the next 4 routines. + + virtual void CalcRects(wxPreviewCanvas *canvas, wxRect& printableAreaRect, wxRect& paperRect); + + // The preview canvas should call this from OnPaint + virtual bool PaintPage(wxPreviewCanvas *canvas, wxDC& dc); + + // Updates rendered page by calling RenderPage() if needed, returns true + // if there was some change. Preview canvas should call it at idle time + virtual bool UpdatePageRendering(); + + // This draws a blank page onto the preview canvas + virtual bool DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc); + + // Adjusts the scrollbars for the current scale + virtual void AdjustScrollbars(wxPreviewCanvas *canvas); + + // This is called by wxPrintPreview to render a page into a wxMemoryDC. + virtual bool RenderPage(int pageNum); + + + virtual void SetZoom(int percent); + virtual int GetZoom() const; + + virtual wxPrintDialogData& GetPrintDialogData(); + + virtual int GetMaxPage() const; + virtual int GetMinPage() const; + + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const; + virtual void SetOk(bool ok); + + /////////////////////////////////////////////////////////////////////////// + // OVERRIDES + + // If we own a wxPrintout that can be used for printing, this + // will invoke the actual printing procedure. Called + // by the wxPreviewControlBar. + virtual bool Print(bool interactive) = 0; + + // Calculate scaling that needs to be done to get roughly + // the right scaling for the screen pretending to be + // the currently selected printer. + virtual void DetermineScaling() = 0; + +protected: + // helpers for RenderPage(): + virtual bool RenderPageIntoDC(wxDC& dc, int pageNum); + // renders preview into m_previewBitmap + virtual bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum); + + void InvalidatePreviewBitmap(); + +protected: + wxPrintDialogData m_printDialogData; + wxPreviewCanvas* m_previewCanvas; + wxFrame* m_previewFrame; + wxBitmap* m_previewBitmap; + bool m_previewFailed; + wxPrintout* m_previewPrintout; + wxPrintout* m_printPrintout; + int m_currentPage; + int m_currentZoom; + float m_previewScaleX; + float m_previewScaleY; + int m_topMargin; + int m_leftMargin; + int m_pageWidth; + int m_pageHeight; + int m_minPage; + int m_maxPage; + + bool m_isOk; + bool m_printingPrepared; // Called OnPreparePrinting? + +private: + void Init(wxPrintout *printout, wxPrintout *printoutForPrinting); + + wxDECLARE_NO_COPY_CLASS(wxPrintPreviewBase); + DECLARE_CLASS(wxPrintPreviewBase) +}; + +//---------------------------------------------------------------------------- +// wxPrintPreview +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPrintPreview: public wxPrintPreviewBase +{ +public: + wxPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting = NULL, + wxPrintDialogData *data = NULL); + wxPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintData *data); + virtual ~wxPrintPreview(); + + virtual bool SetCurrentPage(int pageNum); + virtual int GetCurrentPage() const; + virtual void SetPrintout(wxPrintout *printout); + virtual wxPrintout *GetPrintout() const; + virtual wxPrintout *GetPrintoutForPrinting() const; + virtual void SetFrame(wxFrame *frame); + virtual void SetCanvas(wxPreviewCanvas *canvas); + + virtual wxFrame *GetFrame() const; + virtual wxPreviewCanvas *GetCanvas() const; + virtual bool PaintPage(wxPreviewCanvas *canvas, wxDC& dc); + virtual bool UpdatePageRendering(); + virtual bool DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc); + virtual void AdjustScrollbars(wxPreviewCanvas *canvas); + virtual bool RenderPage(int pageNum); + virtual void SetZoom(int percent); + virtual int GetZoom() const; + + virtual bool Print(bool interactive); + virtual void DetermineScaling(); + + virtual wxPrintDialogData& GetPrintDialogData(); + + virtual int GetMaxPage() const; + virtual int GetMinPage() const; + + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const; + virtual void SetOk(bool ok); + +private: + wxPrintPreviewBase *m_pimpl; + +private: + DECLARE_CLASS(wxPrintPreview) + wxDECLARE_NO_COPY_CLASS(wxPrintPreview); +}; + +//---------------------------------------------------------------------------- +// wxPrintAbortDialog +//---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPrintAbortDialog: public wxDialog +{ +public: + wxPrintAbortDialog(wxWindow *parent, + const wxString& documentTitle, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxT("dialog")); + + void SetProgress(int currentPage, int totalPages, + int currentCopy, int totalCopies); + + void OnCancel(wxCommandEvent& event); + +private: + wxStaticText *m_progress; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxPrintAbortDialog); +}; + +#endif // wxUSE_PRINTING_ARCHITECTURE + +#endif + // _WX_PRNTBASEH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/process.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/process.h new file mode 100644 index 0000000000..4c0018e6a6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/process.h @@ -0,0 +1,187 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/process.h +// Purpose: wxProcess class +// Author: Guilhem Lavaux +// Modified by: Vadim Zeitlin to check error codes, added Detach() method +// Created: 24/06/98 +// Copyright: (c) 1998 Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROCESSH__ +#define _WX_PROCESSH__ + +#include "wx/event.h" + +#if wxUSE_STREAMS + #include "wx/stream.h" +#endif + +#include "wx/utils.h" // for wxSignal + +// the wxProcess creation flags +enum +{ + // no redirection + wxPROCESS_DEFAULT = 0, + + // redirect the IO of the child process + wxPROCESS_REDIRECT = 1 +}; + +// ---------------------------------------------------------------------------- +// A wxProcess object should be passed to wxExecute - than its OnTerminate() +// function will be called when the process terminates. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxProcess : public wxEvtHandler +{ +public: + // kill the process with the given PID + static wxKillError Kill(int pid, wxSignal sig = wxSIGTERM, int flags = wxKILL_NOCHILDREN); + + // test if the given process exists + static bool Exists(int pid); + + // this function replaces the standard popen() one: it launches a process + // asynchronously and allows the caller to get the streams connected to its + // std{in|out|err} + // + // on error NULL is returned, in any case the process object will be + // deleted automatically when the process terminates and should *not* be + // deleted by the caller + static wxProcess *Open(const wxString& cmd, int flags = wxEXEC_ASYNC); + + + // ctors + wxProcess(wxEvtHandler *parent = NULL, int nId = wxID_ANY) + { Init(parent, nId, wxPROCESS_DEFAULT); } + + wxProcess(int flags) { Init(NULL, wxID_ANY, flags); } + + virtual ~wxProcess(); + + // get the process ID of the process executed by Open() + long GetPid() const { return m_pid; } + + // may be overridden to be notified about process termination + virtual void OnTerminate(int pid, int status); + + // call this before passing the object to wxExecute() to redirect the + // launched process stdin/stdout, then use GetInputStream() and + // GetOutputStream() to get access to them + void Redirect() { m_redirect = true; } + bool IsRedirected() const { return m_redirect; } + + // detach from the parent - should be called by the parent if it's deleted + // before the process it started terminates + void Detach(); + +#if wxUSE_STREAMS + // Pipe handling + wxInputStream *GetInputStream() const { return m_inputStream; } + wxInputStream *GetErrorStream() const { return m_errorStream; } + wxOutputStream *GetOutputStream() const { return m_outputStream; } + + // close the output stream indicating that nothing more will be written + void CloseOutput() { delete m_outputStream; m_outputStream = NULL; } + + // return true if the child process stdout is not closed + bool IsInputOpened() const; + + // return true if any input is available on the child process stdout/err + bool IsInputAvailable() const; + bool IsErrorAvailable() const; + + // implementation only (for wxExecute) + // + // NB: the streams passed here should correspond to the child process + // stdout, stdin and stderr and here the normal naming convention is + // used unlike elsewhere in this class + void SetPipeStreams(wxInputStream *outStream, + wxOutputStream *inStream, + wxInputStream *errStream); +#endif // wxUSE_STREAMS + + // priority + // Sets the priority to the given value: see wxPRIORITY_XXX constants. + // + // NB: the priority can only be set before the process is created + void SetPriority(unsigned priority); + + // Get the current priority. + unsigned GetPriority() const { return m_priority; } + + // implementation only - don't use! + // -------------------------------- + + // needs to be public since it needs to be used from wxExecute() global func + void SetPid(long pid) { m_pid = pid; } + +protected: + void Init(wxEvtHandler *parent, int id, int flags); + + int m_id; + long m_pid; + + unsigned m_priority; + +#if wxUSE_STREAMS + // these streams are connected to stdout, stderr and stdin of the child + // process respectively (yes, m_inputStream corresponds to stdout -- very + // confusing but too late to change now) + wxInputStream *m_inputStream, + *m_errorStream; + wxOutputStream *m_outputStream; +#endif // wxUSE_STREAMS + + bool m_redirect; + + DECLARE_DYNAMIC_CLASS(wxProcess) + wxDECLARE_NO_COPY_CLASS(wxProcess); +}; + +// ---------------------------------------------------------------------------- +// wxProcess events +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxProcessEvent; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_BASE, wxEVT_END_PROCESS, wxProcessEvent ); + +class WXDLLIMPEXP_BASE wxProcessEvent : public wxEvent +{ +public: + wxProcessEvent(int nId = 0, int pid = 0, int exitcode = 0) : wxEvent(nId) + { + m_eventType = wxEVT_END_PROCESS; + m_pid = pid; + m_exitcode = exitcode; + } + + // accessors + // PID of process which terminated + int GetPid() { return m_pid; } + + // the exit code + int GetExitCode() { return m_exitcode; } + + // implement the base class pure virtual + virtual wxEvent *Clone() const { return new wxProcessEvent(*this); } + +public: + int m_pid, + m_exitcode; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxProcessEvent) +}; + +typedef void (wxEvtHandler::*wxProcessEventFunction)(wxProcessEvent&); + +#define wxProcessEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxProcessEventFunction, func) + +#define EVT_END_PROCESS(id, func) \ + wx__DECLARE_EVT1(wxEVT_END_PROCESS, id, wxProcessEventHandler(func)) + +#endif // _WX_PROCESSH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/progdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/progdlg.h new file mode 100644 index 0000000000..e17d37ea3e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/progdlg.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/progdlg.h +// Purpose: Base header for wxProgressDialog +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROGDLG_H_BASE_ +#define _WX_PROGDLG_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_PROGRESSDLG + +/* + * wxProgressDialog flags + */ +#define wxPD_CAN_ABORT 0x0001 +#define wxPD_APP_MODAL 0x0002 +#define wxPD_AUTO_HIDE 0x0004 +#define wxPD_ELAPSED_TIME 0x0008 +#define wxPD_ESTIMATED_TIME 0x0010 +#define wxPD_SMOOTH 0x0020 +#define wxPD_REMAINING_TIME 0x0040 +#define wxPD_CAN_SKIP 0x0080 + + +#include "wx/generic/progdlgg.h" + +#if defined(__WXMSW__) && wxUSE_THREADS && !defined(__WXUNIVERSAL__) + #include "wx/msw/progdlg.h" +#else + class WXDLLIMPEXP_CORE wxProgressDialog + : public wxGenericProgressDialog + { + public: + wxProgressDialog( const wxString& title, const wxString& message, + int maximum = 100, + wxWindow *parent = NULL, + int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE ) + : wxGenericProgressDialog( title, message, maximum, + parent, style ) + { } + + private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxProgressDialog ); + }; +#endif // defined(__WXMSW__) && wxUSE_THREADS + +#endif // wxUSE_PROGRESSDLG + +#endif // _WX_PROGDLG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/propdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propdlg.h new file mode 100644 index 0000000000..1f91c6fbc3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propdlg.h @@ -0,0 +1,18 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/propdlg.h +// Purpose: wxPropertySheetDialog base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROPDLG_H_BASE_ +#define _WX_PROPDLG_H_BASE_ + +#include "wx/generic/propdlg.h" + +#endif + // _WX_PROPDLG_H_BASE_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/advprops.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/advprops.h new file mode 100644 index 0000000000..16930c4bb9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/advprops.h @@ -0,0 +1,519 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/propgrid/advprops.h +// Purpose: wxPropertyGrid Advanced Properties (font, colour, etc.) +// Author: Jaakko Salli +// Modified by: +// Created: 2004-09-25 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROPGRID_ADVPROPS_H_ +#define _WX_PROPGRID_ADVPROPS_H_ + +#include "wx/defs.h" + +#if wxUSE_PROPGRID + +#include "wx/propgrid/props.h" + +// ----------------------------------------------------------------------- + +// +// Additional Value Type Handlers +// +bool WXDLLIMPEXP_PROPGRID +operator==(const wxArrayInt& array1, const wxArrayInt& array2); + +// +// Additional Property Editors +// +#if wxUSE_SPINBTN +WX_PG_DECLARE_EDITOR_WITH_DECL(SpinCtrl,WXDLLIMPEXP_PROPGRID) +#endif + +#if wxUSE_DATEPICKCTRL +WX_PG_DECLARE_EDITOR_WITH_DECL(DatePickerCtrl,WXDLLIMPEXP_PROPGRID) +#endif + +// ----------------------------------------------------------------------- + + +// Web colour is currently unsupported +#define wxPG_COLOUR_WEB_BASE 0x10000 +//#define wxPG_TO_WEB_COLOUR(A) ((wxUint32)(A+wxPG_COLOUR_WEB_BASE)) + + +#define wxPG_COLOUR_CUSTOM 0xFFFFFF +#define wxPG_COLOUR_UNSPECIFIED (wxPG_COLOUR_CUSTOM+1) + +/** @class wxColourPropertyValue + + Because text, background and other colours tend to differ between + platforms, wxSystemColourProperty must be able to select between system + colour and, when necessary, to pick a custom one. wxSystemColourProperty + value makes this possible. +*/ +class WXDLLIMPEXP_PROPGRID wxColourPropertyValue : public wxObject +{ +public: + /** An integer value relating to the colour, and which exact + meaning depends on the property with which it is used. + + For wxSystemColourProperty: + + Any of wxSYS_COLOUR_XXX, or any web-colour ( use wxPG_TO_WEB_COLOUR + macro - (currently unsupported) ), or wxPG_COLOUR_CUSTOM. + + For custom colour properties without values array specified: + + index or wxPG_COLOUR_CUSTOM + + For custom colour properties <b>with</b> values array specified: + + m_arrValues[index] or wxPG_COLOUR_CUSTOM + */ + wxUint32 m_type; + + /** Resulting colour. Should be correct regardless of type. */ + wxColour m_colour; + + wxColourPropertyValue() + : wxObject() + { + m_type = 0; + } + + virtual ~wxColourPropertyValue() + { + } + + wxColourPropertyValue( const wxColourPropertyValue& v ) + : wxObject() + { + m_type = v.m_type; + m_colour = v.m_colour; + } + + void Init( wxUint32 type, const wxColour& colour ) + { + m_type = type; + m_colour = colour; + } + + wxColourPropertyValue( const wxColour& colour ) + : wxObject() + { + m_type = wxPG_COLOUR_CUSTOM; + m_colour = colour; + } + + wxColourPropertyValue( wxUint32 type ) + : wxObject() + { + m_type = type; + } + + wxColourPropertyValue( wxUint32 type, const wxColour& colour ) + : wxObject() + { + Init( type, colour ); + } + + void operator=(const wxColourPropertyValue& cpv) + { + if (this != &cpv) + Init( cpv.m_type, cpv.m_colour ); + } + +private: + DECLARE_DYNAMIC_CLASS(wxColourPropertyValue) +}; + + +bool WXDLLIMPEXP_PROPGRID +operator==(const wxColourPropertyValue&, const wxColourPropertyValue&); + +DECLARE_VARIANT_OBJECT_EXPORTED(wxColourPropertyValue, WXDLLIMPEXP_PROPGRID) + +// ----------------------------------------------------------------------- +// Declare part of custom colour property macro pairs. + +#if wxUSE_IMAGE + #include "wx/image.h" +#endif + +// ----------------------------------------------------------------------- + +/** @class wxFontProperty + @ingroup classes + Property representing wxFont. +*/ +class WXDLLIMPEXP_PROPGRID wxFontProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxFontProperty) +public: + + wxFontProperty(const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxFont& value = wxFont()); + virtual ~wxFontProperty(); + virtual void OnSetValue(); + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool OnEvent( wxPropertyGrid* propgrid, + wxWindow* primary, wxEvent& event ); + virtual wxVariant ChildChanged( wxVariant& thisValue, + int childIndex, + wxVariant& childValue ) const; + virtual void RefreshChildren(); + +protected: +}; + +// ----------------------------------------------------------------------- + + +/** If set, then match from list is searched for a custom colour. */ +#define wxPG_PROP_TRANSLATE_CUSTOM wxPG_PROP_CLASS_SPECIFIC_1 + + +/** @class wxSystemColourProperty + @ingroup classes + Has dropdown list of wxWidgets system colours. Value used is + of wxColourPropertyValue type. +*/ +class WXDLLIMPEXP_PROPGRID wxSystemColourProperty : public wxEnumProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxSystemColourProperty) +public: + + wxSystemColourProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxColourPropertyValue& + value = wxColourPropertyValue() ); + virtual ~wxSystemColourProperty(); + + virtual void OnSetValue(); + virtual bool IntToValue(wxVariant& variant, + int number, + int argFlags = 0) const; + + /** + Override in derived class to customize how colours are printed as + strings. + */ + virtual wxString ColourToString( const wxColour& col, int index, + int argFlags = 0 ) const; + + /** Returns index of entry that triggers colour picker dialog + (default is last). + */ + virtual int GetCustomColourIndex() const; + + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int argFlags = 0 ) const; + virtual bool OnEvent( wxPropertyGrid* propgrid, + wxWindow* primary, wxEvent& event ); + virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); + virtual wxSize OnMeasureImage( int item ) const; + virtual void OnCustomPaint( wxDC& dc, + const wxRect& rect, wxPGPaintData& paintdata ); + + // Helper function to show the colour dialog + bool QueryColourFromUser( wxVariant& variant ) const; + + /** Default is to use wxSystemSettings::GetColour(index). Override to use + custom colour tables etc. + */ + virtual wxColour GetColour( int index ) const; + + wxColourPropertyValue GetVal( const wxVariant* pVariant = NULL ) const; + +protected: + + // Special constructors to be used by derived classes. + wxSystemColourProperty( const wxString& label, const wxString& name, + const wxChar* const* labels, const long* values, wxPGChoices* choicesCache, + const wxColourPropertyValue& value ); + wxSystemColourProperty( const wxString& label, const wxString& name, + const wxChar* const* labels, const long* values, wxPGChoices* choicesCache, + const wxColour& value ); + + void Init( int type, const wxColour& colour ); + + // Utility functions for internal use + virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const; + wxVariant TranslateVal( wxColourPropertyValue& v ) const + { + return DoTranslateVal( v ); + } + wxVariant TranslateVal( int type, const wxColour& colour ) const + { + wxColourPropertyValue v(type, colour); + return DoTranslateVal( v ); + } + + // Translates colour to a int value, return wxNOT_FOUND if no match. + int ColToInd( const wxColour& colour ) const; +}; + +// ----------------------------------------------------------------------- + +class WXDLLIMPEXP_PROPGRID wxColourProperty : public wxSystemColourProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxColourProperty) +public: + wxColourProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxColour& value = *wxWHITE ); + virtual ~wxColourProperty(); + + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual wxColour GetColour( int index ) const; + +protected: + virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const; + +private: + void Init( wxColour colour ); +}; + +// ----------------------------------------------------------------------- + +/** @class wxCursorProperty + @ingroup classes + Property representing wxCursor. +*/ +class WXDLLIMPEXP_PROPGRID wxCursorProperty : public wxEnumProperty +{ + DECLARE_DYNAMIC_CLASS(wxCursorProperty) + + wxCursorProperty( const wxString& label= wxPG_LABEL, + const wxString& name= wxPG_LABEL, + int value = 0 ); + virtual ~wxCursorProperty(); + + virtual wxSize OnMeasureImage( int item ) const; + virtual void OnCustomPaint( wxDC& dc, + const wxRect& rect, wxPGPaintData& paintdata ); +}; + +// ----------------------------------------------------------------------- + +#if wxUSE_IMAGE + +WXDLLIMPEXP_PROPGRID const wxString& wxPGGetDefaultImageWildcard(); + +/** @class wxImageFileProperty + @ingroup classes + Property representing image file(name). +*/ +class WXDLLIMPEXP_PROPGRID wxImageFileProperty : public wxFileProperty +{ + DECLARE_DYNAMIC_CLASS(wxImageFileProperty) +public: + + wxImageFileProperty( const wxString& label= wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxString& value = wxEmptyString); + virtual ~wxImageFileProperty(); + + virtual void OnSetValue(); + + virtual wxSize OnMeasureImage( int item ) const; + virtual void OnCustomPaint( wxDC& dc, + const wxRect& rect, wxPGPaintData& paintdata ); + +protected: + wxBitmap* m_pBitmap; // final thumbnail area + wxImage* m_pImage; // intermediate thumbnail area + +private: + // Initialize m_pImage using the current file name. + void LoadImageFromFile(); +}; + +#endif + +#if wxUSE_CHOICEDLG + +/** @class wxMultiChoiceProperty + @ingroup classes + Property that manages a value resulting from wxMultiChoiceDialog. Value is + array of strings. You can get value as array of choice values/indices by + calling wxMultiChoiceProperty::GetValueAsArrayInt(). + + <b>Supported special attributes:</b> + - "UserStringMode": If > 0, allow user to manually enter strings that are + not in the list of choices. If this value is 1, user strings are + preferably placed in front of valid choices. If value is 2, then those + strings will placed behind valid choices. +*/ +class WXDLLIMPEXP_PROPGRID wxMultiChoiceProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxMultiChoiceProperty) +public: + + wxMultiChoiceProperty( const wxString& label, + const wxString& name, + const wxArrayString& strings, + const wxArrayString& value ); + wxMultiChoiceProperty( const wxString& label, + const wxString& name, + const wxPGChoices& choices, + const wxArrayString& value = wxArrayString() ); + + wxMultiChoiceProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxArrayString& value = wxArrayString() ); + + virtual ~wxMultiChoiceProperty(); + + virtual void OnSetValue(); + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue(wxVariant& variant, + const wxString& text, + int argFlags = 0) const; + virtual bool OnEvent( wxPropertyGrid* propgrid, + wxWindow* primary, wxEvent& event ); + + wxArrayInt GetValueAsArrayInt() const + { + return m_choices.GetValuesForStrings(m_value.GetArrayString()); + } + +protected: + + void GenerateValueAsString( wxVariant& value, wxString* target ) const; + + // Returns translation of values into string indices. + wxArrayInt GetValueAsIndices() const; + + wxArrayString m_valueAsStrings; // Value as array of strings + + // Cache displayed text since generating it is relatively complicated. + wxString m_display; +}; + +#endif // wxUSE_CHOICEDLG + +// ----------------------------------------------------------------------- + +#if wxUSE_DATETIME + +/** @class wxDateProperty + @ingroup classes + Property representing wxDateTime. + + <b>Supported special attributes:</b> + - "DateFormat": Determines displayed date format. + - "PickerStyle": Determines window style used with wxDatePickerCtrl. + Default is wxDP_DEFAULT | wxDP_SHOWCENTURY. Using wxDP_ALLOWNONE + enables additional support for unspecified property value. +*/ +class WXDLLIMPEXP_PROPGRID wxDateProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxDateProperty) +public: + + wxDateProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxDateTime& value = wxDateTime() ); + virtual ~wxDateProperty(); + + virtual void OnSetValue(); + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue(wxVariant& variant, + const wxString& text, + int argFlags = 0) const; + + virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); + + void SetFormat( const wxString& format ) + { + m_format = format; + } + + const wxString& GetFormat() const + { + return m_format; + } + + void SetDateValue( const wxDateTime& dt ) + { + //m_valueDateTime = dt; + m_value = dt; + } + + wxDateTime GetDateValue() const + { + //return m_valueDateTime; + return m_value; + } + + long GetDatePickerStyle() const + { + return m_dpStyle; + } + +protected: + wxString m_format; + long m_dpStyle; // DatePicker style + + static wxString ms_defaultDateFormat; + static wxString DetermineDefaultDateFormat( bool showCentury ); +}; + +#endif // wxUSE_DATETIME + +// ----------------------------------------------------------------------- + +#if wxUSE_SPINBTN + +// +// Implement an editor control that allows using wxSpinCtrl (actually, a +// combination of wxTextCtrl and wxSpinButton) to edit value of wxIntProperty +// and wxFloatProperty (and similar). +// +// Note that new editor classes needs to be registered before use. This can be +// accomplished using wxPGRegisterEditorClass macro, which is used for SpinCtrl +// in wxPropertyGridInterface::RegisterAdditionalEditors (see below). +// Registration can also be performed in a constructor of a property that is +// likely to require the editor in question. +// + + +#include "wx/spinbutt.h" +#include "wx/propgrid/editors.h" + + +// NOTE: Regardless that this class inherits from a working editor, it has +// all necessary methods to work independently. wxTextCtrl stuff is only +// used for event handling here. +class WXDLLIMPEXP_PROPGRID wxPGSpinCtrlEditor : public wxPGTextCtrlEditor +{ + DECLARE_DYNAMIC_CLASS(wxPGSpinCtrlEditor) +public: + virtual ~wxPGSpinCtrlEditor(); + + wxString GetName() const; + virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, + wxPGProperty* property, + const wxPoint& pos, + const wxSize& size) const; + virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, + wxWindow* wnd, wxEvent& event ) const; + +private: + mutable wxString m_tempString; +}; + +#endif // wxUSE_SPINBTN + +// ----------------------------------------------------------------------- + +#endif // wxUSE_PROPGRID + +#endif // _WX_PROPGRID_ADVPROPS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/editors.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/editors.h new file mode 100644 index 0000000000..475d274998 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/editors.h @@ -0,0 +1,559 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/propgrid/editors.h +// Purpose: wxPropertyGrid editors +// Author: Jaakko Salli +// Modified by: +// Created: 2007-04-14 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROPGRID_EDITORS_H_ +#define _WX_PROPGRID_EDITORS_H_ + +#include "wx/defs.h" + +#if wxUSE_PROPGRID + +class WXDLLIMPEXP_FWD_PROPGRID wxPGCell; +class WXDLLIMPEXP_FWD_PROPGRID wxPGProperty; +class WXDLLIMPEXP_FWD_PROPGRID wxPropertyGrid; + +// ----------------------------------------------------------------------- +// wxPGWindowList contains list of editor windows returned by CreateControls. + +class wxPGWindowList +{ +public: + wxPGWindowList() + { + m_primary = m_secondary = NULL; + } + + void SetSecondary( wxWindow* secondary ) { m_secondary = secondary; } + + wxWindow* m_primary; + wxWindow* m_secondary; + + wxPGWindowList( wxWindow* a ) + { + m_primary = a; + m_secondary = NULL; + } + wxPGWindowList( wxWindow* a, wxWindow* b ) + { + m_primary = a; + m_secondary = b; + } +}; + +// ----------------------------------------------------------------------- + +/** @class wxPGEditor + + Base class for custom wxPropertyGrid editors. + + @remarks + - Names of builtin property editors are: TextCtrl, Choice, + ComboBox, CheckBox, TextCtrlAndButton, and ChoiceAndButton. Additional + editors include SpinCtrl and DatePickerCtrl, but using them requires + calling wxPropertyGrid::RegisterAdditionalEditors() prior use. + + - Pointer to builtin editor is available as wxPGEditor_EditorName + (eg. wxPGEditor_TextCtrl). + + - To add new editor you need to register it first using static function + wxPropertyGrid::RegisterEditorClass(), with code like this: + @code + wxPGEditor *editorPointer = wxPropertyGrid::RegisterEditorClass( + new MyEditorClass(), "MyEditor"); + @endcode + After that, wxPropertyGrid will take ownership of the given object, but + you should still store editorPointer somewhere, so you can pass it to + wxPGProperty::SetEditor(), or return it from + wxPGEditor::DoGetEditorClass(). + + @library{wxpropgrid} + @category{propgrid} +*/ +class WXDLLIMPEXP_PROPGRID wxPGEditor : public wxObject +{ + DECLARE_ABSTRACT_CLASS(wxPGEditor) +public: + + /** Constructor. */ + wxPGEditor() + : wxObject() + { + m_clientData = NULL; + } + + /** Destructor. */ + virtual ~wxPGEditor(); + + /** + Returns pointer to the name of the editor. For example, + wxPGEditor_TextCtrl has name "TextCtrl". If you dont' need to access + your custom editor by string name, then you do not need to implement + this function. + */ + virtual wxString GetName() const; + + /** + Instantiates editor controls. + + @param propgrid + wxPropertyGrid to which the property belongs (use as parent for + control). + @param property + Property for which this method is called. + @param pos + Position, inside wxPropertyGrid, to create control(s) to. + @param size + Initial size for control(s). + + @remarks + - Primary control shall use id wxPG_SUBID1, and secondary (button) + control shall use wxPG_SUBID2. + - Unlike in previous version of wxPropertyGrid, it is no longer + necessary to call wxEvtHandler::Connect() for interesting editor + events. Instead, all events from control are now automatically + forwarded to wxPGEditor::OnEvent() and wxPGProperty::OnEvent(). + */ + virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, + wxPGProperty* property, + const wxPoint& pos, + const wxSize& size) const = 0; + + /** Loads value from property to the control. */ + virtual void UpdateControl( wxPGProperty* property, + wxWindow* ctrl ) const = 0; + + /** + Used to get the renderer to draw the value with when the control is + hidden. + + Default implementation returns g_wxPGDefaultRenderer. + */ + //virtual wxPGCellRenderer* GetCellRenderer() const; + + /** Draws value for given property. + */ + virtual void DrawValue( wxDC& dc, + const wxRect& rect, + wxPGProperty* property, + const wxString& text ) const; + + /** Handles events. Returns true if value in control was modified + (see wxPGProperty::OnEvent for more information). + + @remarks wxPropertyGrid will automatically unfocus the editor when + wxEVT_TEXT_ENTER is received and when it results in + property value being modified. This happens regardless of + editor type (ie. behaviour is same for any wxTextCtrl and + wxComboBox based editor). + */ + virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, + wxWindow* wnd_primary, wxEvent& event ) const = 0; + + /** Returns value from control, via parameter 'variant'. + Usually ends up calling property's StringToValue or IntToValue. + Returns true if value was different. + */ + virtual bool GetValueFromControl( wxVariant& variant, + wxPGProperty* property, + wxWindow* ctrl ) const; + + /** + Sets new appearance for the control. Default implementation + sets foreground colour, background colour, font, plus text + for wxTextCtrl and wxComboCtrl. + + @param appearance + New appearance to be applied. + + @param oldAppearance + Previously applied appearance. Used to detect which + control attributes need to be changed (e.g. so we only + change background colour if really needed). + + @param unspecified + @true if the new appearance represents an unspecified + property value. + */ + virtual void SetControlAppearance( wxPropertyGrid* pg, + wxPGProperty* property, + wxWindow* ctrl, + const wxPGCell& appearance, + const wxPGCell& oldAppearance, + bool unspecified ) const; + + /** + Sets value in control to unspecified. + */ + virtual void SetValueToUnspecified( wxPGProperty* property, + wxWindow* ctrl ) const; + + /** Sets control's value specifically from string. */ + virtual void SetControlStringValue( wxPGProperty* property, + wxWindow* ctrl, + const wxString& txt ) const; + + /** Sets control's value specifically from int (applies to choice etc.). */ + virtual void SetControlIntValue( wxPGProperty* property, + wxWindow* ctrl, + int value ) const; + + /** Inserts item to existing control. Index -1 means appending. + Default implementation does nothing. Returns index of item added. + */ + virtual int InsertItem( wxWindow* ctrl, + const wxString& label, + int index ) const; + + /** Deletes item from existing control. + Default implementation does nothing. + */ + virtual void DeleteItem( wxWindow* ctrl, int index ) const; + + /** Extra processing when control gains focus. For example, wxTextCtrl + based controls should select all text. + */ + virtual void OnFocus( wxPGProperty* property, wxWindow* wnd ) const; + + /** Returns true if control itself can contain the custom image. Default is + to return false. + */ + virtual bool CanContainCustomImage() const; + + // + // This member is public so scripting language bindings + // wrapper code can access it freely. + void* m_clientData; +}; + + +#define WX_PG_IMPLEMENT_INTERNAL_EDITOR_CLASS(EDITOR,CLASSNAME,BASECLASS) \ +IMPLEMENT_DYNAMIC_CLASS(CLASSNAME, BASECLASS) \ +wxString CLASSNAME::GetName() const \ +{ \ + return wxS(#EDITOR); \ +} \ +wxPGEditor* wxPGEditor_##EDITOR = NULL; + + +// +// Following are the built-in editor classes. +// + +class WXDLLIMPEXP_PROPGRID wxPGTextCtrlEditor : public wxPGEditor +{ + DECLARE_DYNAMIC_CLASS(wxPGTextCtrlEditor) +public: + wxPGTextCtrlEditor() {} + virtual ~wxPGTextCtrlEditor(); + + virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, + wxPGProperty* property, + const wxPoint& pos, + const wxSize& size) const; + virtual void UpdateControl( wxPGProperty* property, + wxWindow* ctrl ) const; + virtual bool OnEvent( wxPropertyGrid* propgrid, + wxPGProperty* property, + wxWindow* primaryCtrl, + wxEvent& event ) const; + virtual bool GetValueFromControl( wxVariant& variant, + wxPGProperty* property, + wxWindow* ctrl ) const; + + virtual wxString GetName() const; + + //virtual wxPGCellRenderer* GetCellRenderer() const; + virtual void SetControlStringValue( wxPGProperty* property, + wxWindow* ctrl, + const wxString& txt ) const; + virtual void OnFocus( wxPGProperty* property, wxWindow* wnd ) const; + + // Provided so that, for example, ComboBox editor can use the same code + // (multiple inheritance would get way too messy). + static bool OnTextCtrlEvent( wxPropertyGrid* propgrid, + wxPGProperty* property, + wxWindow* ctrl, + wxEvent& event ); + + static bool GetTextCtrlValueFromControl( wxVariant& variant, + wxPGProperty* property, + wxWindow* ctrl ); + +}; + + +class WXDLLIMPEXP_PROPGRID wxPGChoiceEditor : public wxPGEditor +{ + DECLARE_DYNAMIC_CLASS(wxPGChoiceEditor) +public: + wxPGChoiceEditor() {} + virtual ~wxPGChoiceEditor(); + + virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, + wxPGProperty* property, + const wxPoint& pos, + const wxSize& size) const; + virtual void UpdateControl( wxPGProperty* property, + wxWindow* ctrl ) const; + virtual bool OnEvent( wxPropertyGrid* propgrid, + wxPGProperty* property, + wxWindow* primaryCtrl, + wxEvent& event ) const; + virtual bool GetValueFromControl( wxVariant& variant, + wxPGProperty* property, + wxWindow* ctrl ) const; + virtual void SetValueToUnspecified( wxPGProperty* property, + wxWindow* ctrl ) const; + virtual wxString GetName() const; + + virtual void SetControlIntValue( wxPGProperty* property, + wxWindow* ctrl, + int value ) const; + virtual void SetControlStringValue( wxPGProperty* property, + wxWindow* ctrl, + const wxString& txt ) const; + + virtual int InsertItem( wxWindow* ctrl, + const wxString& label, + int index ) const; + virtual void DeleteItem( wxWindow* ctrl, int index ) const; + virtual bool CanContainCustomImage() const; + + // CreateControls calls this with CB_READONLY in extraStyle + wxWindow* CreateControlsBase( wxPropertyGrid* propgrid, + wxPGProperty* property, + const wxPoint& pos, + const wxSize& sz, + long extraStyle ) const; + +}; + + +class WXDLLIMPEXP_PROPGRID wxPGComboBoxEditor : public wxPGChoiceEditor +{ + DECLARE_DYNAMIC_CLASS(wxPGComboBoxEditor) +public: + wxPGComboBoxEditor() {} + virtual ~wxPGComboBoxEditor(); + + virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, + wxPGProperty* property, + const wxPoint& pos, + const wxSize& size) const; + + virtual wxString GetName() const; + + virtual void UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const; + + virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, + wxWindow* ctrl, wxEvent& event ) const; + + virtual bool GetValueFromControl( wxVariant& variant, + wxPGProperty* property, + wxWindow* ctrl ) const; + + virtual void OnFocus( wxPGProperty* property, wxWindow* wnd ) const; + +}; + + +class WXDLLIMPEXP_PROPGRID wxPGChoiceAndButtonEditor : public wxPGChoiceEditor +{ +public: + wxPGChoiceAndButtonEditor() {} + virtual ~wxPGChoiceAndButtonEditor(); + virtual wxString GetName() const; + + virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, + wxPGProperty* property, + const wxPoint& pos, + const wxSize& size) const; + + DECLARE_DYNAMIC_CLASS(wxPGChoiceAndButtonEditor) +}; + +class WXDLLIMPEXP_PROPGRID +wxPGTextCtrlAndButtonEditor : public wxPGTextCtrlEditor +{ +public: + wxPGTextCtrlAndButtonEditor() {} + virtual ~wxPGTextCtrlAndButtonEditor(); + virtual wxString GetName() const; + + virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, + wxPGProperty* property, + const wxPoint& pos, + const wxSize& size) const; + + DECLARE_DYNAMIC_CLASS(wxPGTextCtrlAndButtonEditor) +}; + + +#if wxPG_INCLUDE_CHECKBOX + +// +// Use custom check box code instead of native control +// for cleaner (ie. more integrated) look. +// +class WXDLLIMPEXP_PROPGRID wxPGCheckBoxEditor : public wxPGEditor +{ + DECLARE_DYNAMIC_CLASS(wxPGCheckBoxEditor) +public: + wxPGCheckBoxEditor() {} + virtual ~wxPGCheckBoxEditor(); + + virtual wxString GetName() const; + virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, + wxPGProperty* property, + const wxPoint& pos, + const wxSize& size) const; + virtual void UpdateControl( wxPGProperty* property, + wxWindow* ctrl ) const; + virtual bool OnEvent( wxPropertyGrid* propgrid, + wxPGProperty* property, + wxWindow* primaryCtrl, + wxEvent& event ) const; + virtual bool GetValueFromControl( wxVariant& variant, + wxPGProperty* property, + wxWindow* ctrl ) const; + virtual void SetValueToUnspecified( wxPGProperty* property, + wxWindow* ctrl ) const; + + virtual void DrawValue( wxDC& dc, + const wxRect& rect, + wxPGProperty* property, + const wxString& text ) const; + //virtual wxPGCellRenderer* GetCellRenderer() const; + + virtual void SetControlIntValue( wxPGProperty* property, + wxWindow* ctrl, + int value ) const; +}; + +#endif + + +// ----------------------------------------------------------------------- +// Editor class registeration macro (mostly for internal use) + +#define wxPGRegisterEditorClass(EDITOR) \ + if ( wxPGEditor_##EDITOR == NULL ) \ + { \ + wxPGEditor_##EDITOR = wxPropertyGrid::RegisterEditorClass( \ + new wxPG##EDITOR##Editor ); \ + } + +// ----------------------------------------------------------------------- + +/** @class wxPGEditorDialogAdapter + + Derive a class from this to adapt an existing editor dialog or function to + be used when editor button of a property is pushed. + + You only need to derive class and implement DoShowDialog() to create and + show the dialog, and finally submit the value returned by the dialog + via SetValue(). + + @library{wxpropgrid} + @category{propgrid} +*/ +class WXDLLIMPEXP_PROPGRID wxPGEditorDialogAdapter : public wxObject +{ + DECLARE_ABSTRACT_CLASS(wxPGEditorDialogAdapter) +public: + wxPGEditorDialogAdapter() + : wxObject() + { + m_clientData = NULL; + } + + virtual ~wxPGEditorDialogAdapter() { } + + bool ShowDialog( wxPropertyGrid* propGrid, wxPGProperty* property ); + + virtual bool DoShowDialog( wxPropertyGrid* propGrid, + wxPGProperty* property ) = 0; + + void SetValue( wxVariant value ) + { + m_value = value; + } + + /** + This method is typically only used if deriving class from existing + adapter with value conversion purposes. + */ + wxVariant& GetValue() { return m_value; } + + // + // This member is public so scripting language bindings + // wrapper code can access it freely. + void* m_clientData; + +private: + wxVariant m_value; +}; + +// ----------------------------------------------------------------------- + + +/** @class wxPGMultiButton + + This class can be used to have multiple buttons in a property editor. + You will need to create a new property editor class, override + CreateControls, and have it return wxPGMultiButton instance in + wxPGWindowList::SetSecondary(). +*/ +class WXDLLIMPEXP_PROPGRID wxPGMultiButton : public wxWindow +{ +public: + wxPGMultiButton( wxPropertyGrid* pg, const wxSize& sz ); + virtual ~wxPGMultiButton() {} + + wxWindow* GetButton( unsigned int i ) { return (wxWindow*) m_buttons[i]; } + const wxWindow* GetButton( unsigned int i ) const + { return (const wxWindow*) m_buttons[i]; } + + /** Utility function to be used in event handlers. + */ + int GetButtonId( unsigned int i ) const { return GetButton(i)->GetId(); } + + /** Returns number of buttons. + */ + unsigned int GetCount() const { return (unsigned int) m_buttons.size(); } + + void Add( const wxString& label, int id = -2 ); +#if wxUSE_BMPBUTTON + void Add( const wxBitmap& bitmap, int id = -2 ); +#endif + + wxSize GetPrimarySize() const + { + return wxSize(m_fullEditorSize.x - m_buttonsWidth, m_fullEditorSize.y); + } + + void Finalize( wxPropertyGrid* propGrid, const wxPoint& pos ); + +protected: + + void DoAddButton( wxWindow* button, const wxSize& sz ); + + int GenId( int id ) const; + + wxArrayPtrVoid m_buttons; + wxSize m_fullEditorSize; + int m_buttonsWidth; +}; + +// ----------------------------------------------------------------------- + +#endif // wxUSE_PROPGRID + +#endif // _WX_PROPGRID_EDITORS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/manager.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/manager.h new file mode 100644 index 0000000000..12e977b667 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/manager.h @@ -0,0 +1,768 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/propgrid/manager.h +// Purpose: wxPropertyGridManager +// Author: Jaakko Salli +// Modified by: +// Created: 2005-01-14 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROPGRID_MANAGER_H_ +#define _WX_PROPGRID_MANAGER_H_ + +#include "wx/defs.h" + +#if wxUSE_PROPGRID + +#include "wx/propgrid/propgrid.h" + +#include "wx/dcclient.h" +#include "wx/scrolwin.h" +#include "wx/toolbar.h" +#include "wx/stattext.h" +#include "wx/button.h" +#include "wx/textctrl.h" +#include "wx/dialog.h" +#include "wx/headerctrl.h" + +// ----------------------------------------------------------------------- + +#ifndef SWIG +extern WXDLLIMPEXP_DATA_PROPGRID(const char) wxPropertyGridManagerNameStr[]; +#endif + +/** @class wxPropertyGridPage + + Holder of property grid page information. You can subclass this and + give instance in wxPropertyGridManager::AddPage. It inherits from + wxEvtHandler and can be used to process events specific to this + page (id of events will still be same as manager's). If you don't + want to use it to process all events of the page, you need to + return false in the derived wxPropertyGridPage::IsHandlingAllEvents. + + Please note that wxPropertyGridPage lacks many non-const property + manipulation functions found in wxPropertyGridManager. Please use + parent manager (m_manager member variable) when needed. + + Please note that most member functions are inherited and as such not + documented on this page. This means you will probably also want to read + wxPropertyGridInterface class reference. + + @section propgridpage_event_handling Event Handling + + wxPropertyGridPage receives events emitted by its wxPropertyGridManager, but + only those events that are specific to that page. If + wxPropertyGridPage::IsHandlingAllEvents returns false, then unhandled + events are sent to the manager's parent, as usual. + + See @ref propgrid_event_handling "wxPropertyGrid Event Handling" + for more information. + + @library{wxpropgrid} + @category{propgrid} +*/ +class WXDLLIMPEXP_PROPGRID wxPropertyGridPage : public wxEvtHandler, + public wxPropertyGridInterface, + public wxPropertyGridPageState +{ + friend class wxPropertyGridManager; + DECLARE_CLASS(wxPropertyGridPage) +public: + + wxPropertyGridPage(); + virtual ~wxPropertyGridPage(); + + /** Deletes all properties on page. + */ + virtual void Clear(); + + /** + Reduces column sizes to minimum possible that contents are still + visibly (naturally some margin space will be applied as well). + + @return + Minimum size for the page to still display everything. + + @remarks + This function only works properly if size of containing grid was + already fairly large. + + Note that you can also get calculated column widths by calling + GetColumnWidth() immediately after this function returns. + */ + wxSize FitColumns(); + + /** Returns page index in manager; + */ + inline int GetIndex() const; + + /** Returns x-coordinate position of splitter on a page. + */ + int GetSplitterPosition( int col = 0 ) const + { return GetStatePtr()->DoGetSplitterPosition(col); } + + /** Returns "root property". It does not have name, etc. and it is not + visible. It is only useful for accessing its children. + */ + wxPGProperty* GetRoot() const { return GetStatePtr()->DoGetRoot(); } + + /** Return pointer to contained property grid state. + */ + wxPropertyGridPageState* GetStatePtr() + { + return this; + } + + /** Return pointer to contained property grid state. + */ + const wxPropertyGridPageState* GetStatePtr() const + { + return this; + } + + /** + Returns id of the tool bar item that represents this page on + wxPropertyGridManager's wxToolBar. + */ + int GetToolId() const + { + return m_toolId; + } + + /** Do any member initialization in this method. + @remarks + - Called every time the page is added into a manager. + - You can add properties to the page here. + */ + virtual void Init() {} + + /** Return false here to indicate unhandled events should be + propagated to manager's parent, as normal. + */ + virtual bool IsHandlingAllEvents() const { return true; } + + /** Called every time page is about to be shown. + Useful, for instance, creating properties just-in-time. + */ + virtual void OnShow(); + + virtual void RefreshProperty( wxPGProperty* p ); + + /** Sets splitter position on page. + @remarks + Splitter position cannot exceed grid size, and therefore setting it + during form creation may fail as initial grid size is often smaller + than desired splitter position, especially when sizers are being used. + */ + void SetSplitterPosition( int splitterPos, int col = 0 ); + +protected: + + /** Propagate to other pages. + */ + virtual void DoSetSplitterPosition( int pos, + int splitterColumn = 0, + int flags = wxPG_SPLITTER_REFRESH ); + + /** Page label (may be referred as name in some parts of documentation). + Can be set in constructor, or passed in + wxPropertyGridManager::AddPage(), but *not* in both. + */ + wxString m_label; + + //virtual bool ProcessEvent( wxEvent& event ); + + wxPropertyGridManager* m_manager; + + // Toolbar tool id. Note that this is only valid when the tool bar + // exists. + int m_toolId; + +private: + bool m_isDefault; // is this base page object? + + DECLARE_EVENT_TABLE() +}; + +// ----------------------------------------------------------------------- + +#if wxUSE_HEADERCTRL +class wxPGHeaderCtrl; +#endif + + +/** @class wxPropertyGridManager + + wxPropertyGridManager is an efficient multi-page version of wxPropertyGrid, + which can optionally have toolbar for mode and page selection, and help + text box. + Use window flags to select components to include. + + @section propgridmanager_window_styles_ Window Styles + + See @ref propgrid_window_styles. + + @section propgridmanager_event_handling Event Handling + + See @ref propgrid_event_handling "wxPropertyGrid Event Handling" + for more information. + + @library{wxpropgrid} + @category{propgrid} +*/ +class WXDLLIMPEXP_PROPGRID + wxPropertyGridManager : public wxPanel, public wxPropertyGridInterface +{ + DECLARE_CLASS(wxPropertyGridManager) + friend class wxPropertyGridPage; +public: + +#ifndef SWIG + /** + Two step constructor. + Call Create when this constructor is called to build up the + wxPropertyGridManager. + */ + wxPropertyGridManager(); +#endif + + /** The default constructor. The styles to be used are styles valid for + the wxWindow. + @see @link wndflags Additional Window Styles@endlink + */ + wxPropertyGridManager( wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxPGMAN_DEFAULT_STYLE, + const wxString& name = wxPropertyGridManagerNameStr ); + + /** Destructor */ + virtual ~wxPropertyGridManager(); + + /** Creates new property page. Note that the first page is not created + automatically. + @param label + A label for the page. This may be shown as a toolbar tooltip etc. + @param bmp + Bitmap image for toolbar. If wxNullBitmap is used, then a built-in + default image is used. + @param pageObj + wxPropertyGridPage instance. Manager will take ownership of this object. + NULL indicates that a default page instance should be created. + + @return + Returns pointer to created page. + + @remarks + If toolbar is used, it is highly recommended that the pages are + added when the toolbar is not turned off using window style flag + switching. + */ + wxPropertyGridPage* AddPage( const wxString& label = wxEmptyString, + const wxBitmap& bmp = wxPG_NULL_BITMAP, + wxPropertyGridPage* pageObj = NULL ) + { + return InsertPage(-1, label, bmp, pageObj); + } + + /** Deletes all all properties and all pages. + */ + virtual void Clear(); + + /** Deletes all properties on given page. + */ + void ClearPage( int page ); + + /** Forces updating the value of property from the editor control. + Returns true if DoPropertyChanged was actually called. + */ + bool CommitChangesFromEditor( wxUint32 flags = 0 ) + { + return m_pPropGrid->CommitChangesFromEditor(flags); + } + + /** + Two step creation. + Whenever the control is created without any parameters, use Create to + actually create it. Don't access the control's public methods before + this is called. + @see @link wndflags Additional Window Styles@endlink + */ + bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxPGMAN_DEFAULT_STYLE, + const wxString& name = wxPropertyGridManagerNameStr ); + + /** + Enables or disables (shows/hides) categories according to parameter + enable. + + WARNING: Not tested properly, use at your own risk. + */ + bool EnableCategories( bool enable ) + { + long fl = m_windowStyle | wxPG_HIDE_CATEGORIES; + if ( enable ) fl = m_windowStyle & ~(wxPG_HIDE_CATEGORIES); + SetWindowStyleFlag(fl); + return true; + } + + /** Selects page, scrolls and/or expands items to ensure that the + given item is visible. Returns true if something was actually done. + */ + bool EnsureVisible( wxPGPropArg id ); + + /** Returns number of columns on given page. By the default, + returns number of columns on current page. */ + int GetColumnCount( int page = -1 ) const; + + /** Returns height of the description text box. */ + int GetDescBoxHeight() const; + + /** Returns pointer to the contained wxPropertyGrid. This does not change + after wxPropertyGridManager has been created, so you can safely obtain + pointer once and use it for the entire lifetime of the instance. + */ + wxPropertyGrid* GetGrid() + { + wxASSERT(m_pPropGrid); + return m_pPropGrid; + } + + const wxPropertyGrid* GetGrid() const + { + wxASSERT(m_pPropGrid); + return (const wxPropertyGrid*)m_pPropGrid; + } + + /** Returns iterator class instance. + @remarks + Calling this method in wxPropertyGridManager causes run-time assertion + failure. Please only iterate through individual pages or use + CreateVIterator(). + */ + wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT, + wxPGProperty* firstProp = NULL ) + { + wxFAIL_MSG( "Please only iterate through individual pages " + "or use CreateVIterator()" ); + return wxPropertyGridInterface::GetIterator( flags, firstProp ); + } + + wxPropertyGridConstIterator + GetIterator(int flags = wxPG_ITERATE_DEFAULT, + wxPGProperty* firstProp = NULL) const + { + wxFAIL_MSG( "Please only iterate through individual pages " + " or use CreateVIterator()" ); + return wxPropertyGridInterface::GetIterator( flags, firstProp ); + } + + /** Returns iterator class instance. + @remarks + Calling this method in wxPropertyGridManager causes run-time assertion + failure. Please only iterate through individual pages or use + CreateVIterator(). + */ + wxPropertyGridIterator GetIterator( int flags, int startPos ) + { + wxFAIL_MSG( "Please only iterate through individual pages " + "or use CreateVIterator()" ); + + return wxPropertyGridInterface::GetIterator( flags, startPos ); + } + + wxPropertyGridConstIterator GetIterator( int flags, int startPos ) const + { + wxFAIL_MSG( "Please only iterate through individual pages " + "or use CreateVIterator()" ); + return wxPropertyGridInterface::GetIterator( flags, startPos ); + } + + /** Similar to GetIterator, but instead returns wxPGVIterator instance, + which can be useful for forward-iterating through arbitrary property + containers. + */ + virtual wxPGVIterator GetVIterator( int flags ) const; + + /** Returns currently selected page. + */ + wxPropertyGridPage* GetCurrentPage() const + { + return GetPage(m_selPage); + } + + /** Returns page object for given page index. + */ + wxPropertyGridPage* GetPage( unsigned int ind ) const + { + return m_arrPages[ind]; + } + + /** Returns page object for given page name. + */ + wxPropertyGridPage* GetPage( const wxString& name ) const + { + return GetPage(GetPageByName(name)); + } + + /** + Returns index for a page name. + + If no match is found, wxNOT_FOUND is returned. + */ + int GetPageByName( const wxString& name ) const; + + /** Returns index for a relevant propertygrid state. + + If no match is found, wxNOT_FOUND is returned. + */ + int GetPageByState( const wxPropertyGridPageState* pstate ) const; + +protected: + /** Returns wxPropertyGridPageState of given page, current page's for -1. + */ + virtual wxPropertyGridPageState* GetPageState( int page ) const; + +public: + /** Returns number of managed pages. */ + size_t GetPageCount() const; + + /** Returns name of given page. */ + const wxString& GetPageName( int index ) const; + + /** Returns "root property" of the given page. It does not have name, etc. + and it is not visible. It is only useful for accessing its children. + */ + wxPGProperty* GetPageRoot( int index ) const; + + /** Returns index to currently selected page. */ + int GetSelectedPage() const { return m_selPage; } + + /** Alias for GetSelection(). */ + wxPGProperty* GetSelectedProperty() const + { + return GetSelection(); + } + + /** Shortcut for GetGrid()->GetSelection(). */ + wxPGProperty* GetSelection() const + { + return m_pPropGrid->GetSelection(); + } + + /** Returns a pointer to the toolbar currently associated with the + wxPropertyGridManager (if any). */ + wxToolBar* GetToolBar() const { return m_pToolbar; } + + /** Creates new property page. Note that the first page is not created + automatically. + @param index + Add to this position. -1 will add as the last item. + @param label + A label for the page. This may be shown as a toolbar tooltip etc. + @param bmp + Bitmap image for toolbar. If wxNullBitmap is used, then a built-in + default image is used. + @param pageObj + wxPropertyGridPage instance. Manager will take ownership of this object. + If NULL, default page object is constructed. + + @return + Returns pointer to created page. + */ + virtual wxPropertyGridPage* InsertPage( int index, + const wxString& label, + const wxBitmap& bmp = wxNullBitmap, + wxPropertyGridPage* pageObj = NULL ); + + /** + Returns true if any property on any page has been modified by the user. + */ + bool IsAnyModified() const; + + /** + Returns true if updating is frozen (ie Freeze() called but not yet + Thaw() ). + */ + bool IsFrozen() const { return m_pPropGrid->m_frozen > 0; } + + /** + Returns true if any property on given page has been modified by the + user. + */ + bool IsPageModified( size_t index ) const; + + /** + Returns true if property is selected. Since selection is page + based, this function checks every page in the manager. + */ + virtual bool IsPropertySelected( wxPGPropArg id ) const; + + virtual void Refresh( bool eraseBackground = true, + const wxRect* rect = (const wxRect*) NULL ); + + /** Removes a page. + @return + Returns false if it was not possible to remove page in question. + */ + virtual bool RemovePage( int page ); + + /** Select and displays a given page. + + @param index + Index of page being seleced. Can be -1 to select nothing. + */ + void SelectPage( int index ); + + /** Select and displays a given page (by label). */ + void SelectPage( const wxString& label ) + { + int index = GetPageByName(label); + wxCHECK_RET( index >= 0, wxT("No page with such name") ); + SelectPage( index ); + } + + /** Select and displays a given page. */ + void SelectPage( wxPropertyGridPage* ptr ) + { + SelectPage( GetPageByState(ptr) ); + } + + /** Select a property. */ + bool SelectProperty( wxPGPropArg id, bool focus = false ) + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) + return p->GetParentState()->DoSelectProperty(p, focus); + } + + /** + Sets a column title. Default title for column 0 is "Property", + and "Value" for column 1. + + @remarks If header is not shown yet, then calling this + member function will make it visible. + */ + void SetColumnTitle( int idx, const wxString& title ); + + /** + Sets number of columns on given page (default is current page). + + @remarks If you use header, then you should always use this + member function to set the column count, instead of + ones present in wxPropertyGrid or wxPropertyGridPage. + */ + void SetColumnCount( int colCount, int page = -1 ); + + /** Sets label and text in description box. + */ + void SetDescription( const wxString& label, const wxString& content ); + + /** Sets y coordinate of the description box splitter. */ + void SetDescBoxHeight( int ht, bool refresh = true ); + + /** Moves splitter as left as possible, while still allowing all + labels to be shown in full. + @param subProps + If false, will still allow sub-properties (ie. properties which + parent is not root or category) to be cropped. + @param allPages + If true, takes labels on all pages into account. + */ + void SetSplitterLeft( bool subProps = false, bool allPages = true ); + + /** Moves splitter as left as possible on an individual page, while still allowing all + labels to be shown in full. + */ + void SetPageSplitterLeft(int page, bool subProps = false); + + /** + Sets splitter position on individual page. + + @remarks If you use header, then you should always use this + member function to set the splitter position, instead of + ones present in wxPropertyGrid or wxPropertyGridPage. + */ + void SetPageSplitterPosition( int page, int pos, int column = 0 ); + + /** + Sets splitter position for all pages. + + @remarks Splitter position cannot exceed grid size, and therefore + setting it during form creation may fail as initial grid + size is often smaller than desired splitter position, + especially when sizers are being used. + + If you use header, then you should always use this + member function to set the splitter position, instead of + ones present in wxPropertyGrid or wxPropertyGridPage. + */ + void SetSplitterPosition( int pos, int column = 0 ); + +#if wxUSE_HEADERCTRL + /** + Show or hide the property grid header control. It is hidden + by the default. + + @remarks Grid may look better if you use wxPG_NO_INTERNAL_BORDER + window style when showing a header. + */ + void ShowHeader(bool show = true); +#endif + +protected: + + // + // Subclassing helpers + // + + /** + Creates property grid for the manager. Reimplement in derived class to + use subclassed wxPropertyGrid. However, if you do this then you + must also use the two-step construction (ie. default constructor and + Create() instead of constructor with arguments) when creating the + manager. + */ + virtual wxPropertyGrid* CreatePropertyGrid() const; + +public: + virtual void RefreshProperty( wxPGProperty* p ); + + // + // Overridden functions - no documentation required. + // + + void SetId( wxWindowID winid ); + + virtual void Freeze(); + virtual void Thaw(); + virtual void SetExtraStyle ( long exStyle ); + virtual bool SetFont ( const wxFont& font ); + virtual void SetWindowStyleFlag ( long style ); + virtual bool Reparent( wxWindowBase *newParent ); + +protected: + virtual wxSize DoGetBestSize() const; + + // + // Event handlers + // + void OnMouseMove( wxMouseEvent &event ); + void OnMouseClick( wxMouseEvent &event ); + void OnMouseUp( wxMouseEvent &event ); + void OnMouseEntry( wxMouseEvent &event ); + + void OnPaint( wxPaintEvent &event ); + + void OnToolbarClick( wxCommandEvent &event ); + void OnResize( wxSizeEvent& event ); + void OnPropertyGridSelect( wxPropertyGridEvent& event ); + void OnPGColDrag( wxPropertyGridEvent& event ); + + + wxPropertyGrid* m_pPropGrid; + + wxVector<wxPropertyGridPage*> m_arrPages; + +#if wxUSE_TOOLBAR + wxToolBar* m_pToolbar; +#endif +#if wxUSE_HEADERCTRL + wxPGHeaderCtrl* m_pHeaderCtrl; +#endif + wxStaticText* m_pTxtHelpCaption; + wxStaticText* m_pTxtHelpContent; + + wxPropertyGridPage* m_emptyPage; + + wxArrayString m_columnLabels; + + long m_iFlags; + + // Selected page index. + int m_selPage; + + int m_width; + + int m_height; + + int m_extraHeight; + + int m_splitterY; + + int m_splitterHeight; + + int m_dragOffset; + + wxCursor m_cursorSizeNS; + + int m_nextDescBoxSize; + + // Toolbar tool ids for categorized and alphabetic mode selectors. + int m_categorizedModeToolId; + int m_alphabeticModeToolId; + + unsigned char m_dragStatus; + + unsigned char m_onSplitter; + + bool m_showHeader; + + virtual wxPGProperty* DoGetPropertyByName( const wxString& name ) const; + + /** Select and displays a given page. */ + virtual bool DoSelectPage( int index ); + + // Sets some members to defaults. + void Init1(); + + // Initializes some members. + void Init2( int style ); + +/*#ifdef __WXMSW__ + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const; +#endif*/ + + virtual bool ProcessEvent( wxEvent& event ); + + /** Recalculates new positions for components, according to the + given size. + */ + void RecalculatePositions( int width, int height ); + + /** (Re)creates/destroys controls, according to the window style bits. */ + void RecreateControls(); + + void UpdateDescriptionBox( int new_splittery, int new_width, int new_height ); + + void RepaintDescBoxDecorations( wxDC& dc, + int newSplitterY, + int newWidth, + int newHeight ); + + void SetDescribedProperty( wxPGProperty* p ); + + // Reimplement these to handle "descboxheight" state item + virtual bool SetEditableStateItem( const wxString& name, wxVariant value ); + virtual wxVariant GetEditableStateItem( const wxString& name ) const; + +private: + DECLARE_EVENT_TABLE() +}; + +// ----------------------------------------------------------------------- + +inline int wxPropertyGridPage::GetIndex() const +{ + if ( !m_manager ) + return wxNOT_FOUND; + return m_manager->GetPageByState(this); +} + +// ----------------------------------------------------------------------- + +#endif // wxUSE_PROPGRID + +#endif // _WX_PROPGRID_MANAGER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/property.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/property.h new file mode 100644 index 0000000000..36356ddd63 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/property.h @@ -0,0 +1,2584 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/propgrid/property.h +// Purpose: wxPGProperty and related support classes +// Author: Jaakko Salli +// Modified by: +// Created: 2008-08-23 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROPGRID_PROPERTY_H_ +#define _WX_PROPGRID_PROPERTY_H_ + +#include "wx/defs.h" + +#if wxUSE_PROPGRID + +#include "wx/propgrid/propgriddefs.h" + +// ----------------------------------------------------------------------- + +#define wxNullProperty ((wxPGProperty*)NULL) + + +/** @class wxPGPaintData + + Contains information relayed to property's OnCustomPaint. +*/ +struct wxPGPaintData +{ + /** wxPropertyGrid. */ + const wxPropertyGrid* m_parent; + + /** + Normally -1, otherwise index to drop-down list item that has to be + drawn. + */ + int m_choiceItem; + + /** Set to drawn width in OnCustomPaint (optional). */ + int m_drawnWidth; + + /** + In a measure item call, set this to the height of item at m_choiceItem + index. + */ + int m_drawnHeight; +}; + + +// space between vertical sides of a custom image +#define wxPG_CUSTOM_IMAGE_SPACINGY 1 + +// space between caption and selection rectangle, +#define wxPG_CAPRECTXMARGIN 2 + +// horizontally and vertically +#define wxPG_CAPRECTYMARGIN 1 + + +/** @class wxPGCellRenderer + + Base class for wxPropertyGrid cell renderers. +*/ +class WXDLLIMPEXP_PROPGRID wxPGCellRenderer : public wxObjectRefData +{ +public: + + wxPGCellRenderer() + : wxObjectRefData() { } + virtual ~wxPGCellRenderer() { } + + // Render flags + enum + { + // We are painting selected item + Selected = 0x00010000, + + // We are painting item in choice popup + ChoicePopup = 0x00020000, + + // We are rendering wxOwnerDrawnComboBox control + // (or other owner drawn control, but that is only + // officially supported one ATM). + Control = 0x00040000, + + // We are painting a disable property + Disabled = 0x00080000, + + // We are painting selected, disabled, or similar + // item that dictates fore- and background colours, + // overriding any cell values. + DontUseCellFgCol = 0x00100000, + DontUseCellBgCol = 0x00200000, + DontUseCellColours = DontUseCellFgCol | + DontUseCellBgCol + }; + + /** + Returns @true if rendered something in the foreground (text or + bitmap. + */ + virtual bool Render( wxDC& dc, + const wxRect& rect, + const wxPropertyGrid* propertyGrid, + wxPGProperty* property, + int column, + int item, + int flags ) const = 0; + + /** Returns size of the image in front of the editable area. + @remarks + If property is NULL, then this call is for a custom value. In that case + the item is index to wxPropertyGrid's custom values. + */ + virtual wxSize GetImageSize( const wxPGProperty* property, + int column, + int item ) const; + + /** Paints property category selection rectangle. + */ + virtual void DrawCaptionSelectionRect( wxDC& dc, + int x, int y, + int w, int h ) const; + + /** Utility to draw vertically centered text. + */ + void DrawText( wxDC& dc, + const wxRect& rect, + int imageWidth, + const wxString& text ) const; + + /** + Utility to draw editor's value, or vertically aligned text if editor is + NULL. + */ + void DrawEditorValue( wxDC& dc, const wxRect& rect, + int xOffset, const wxString& text, + wxPGProperty* property, + const wxPGEditor* editor ) const; + + /** Utility to render cell bitmap and set text colour plus bg brush + colour. + + @return Returns image width, which, for instance, can be passed to + DrawText. + */ + int PreDrawCell( wxDC& dc, + const wxRect& rect, + const wxPGCell& cell, + int flags ) const; + + /** + Utility to be called after drawing is done, to revert whatever + changes PreDrawCell() did. + + @param flags + Same as those passed to PreDrawCell(). + */ + void PostDrawCell( wxDC& dc, + const wxPropertyGrid* propGrid, + const wxPGCell& cell, + int flags ) const; +}; + + +/** + @class wxPGDefaultRenderer + + Default cell renderer, that can handles the common + scenarios. +*/ +class WXDLLIMPEXP_PROPGRID wxPGDefaultRenderer : public wxPGCellRenderer +{ +public: + virtual bool Render( wxDC& dc, + const wxRect& rect, + const wxPropertyGrid* propertyGrid, + wxPGProperty* property, + int column, + int item, + int flags ) const; + + virtual wxSize GetImageSize( const wxPGProperty* property, + int column, + int item ) const; + +protected: +}; + + +class WXDLLIMPEXP_PROPGRID wxPGCellData : public wxObjectRefData +{ + friend class wxPGCell; +public: + wxPGCellData(); + + void SetText( const wxString& text ) + { + m_text = text; + m_hasValidText = true; + } + void SetBitmap( const wxBitmap& bitmap ) { m_bitmap = bitmap; } + void SetFgCol( const wxColour& col ) { m_fgCol = col; } + void SetBgCol( const wxColour& col ) { m_bgCol = col; } + void SetFont( const wxFont& font ) { m_font = font; } + +protected: + virtual ~wxPGCellData() { } + + wxString m_text; + wxBitmap m_bitmap; + wxColour m_fgCol; + wxColour m_bgCol; + wxFont m_font; + + // True if m_text is valid and specified + bool m_hasValidText; +}; + + +/** + @class wxPGCell + + Base class for wxPropertyGrid cell information. +*/ +class WXDLLIMPEXP_PROPGRID wxPGCell : public wxObject +{ +public: + wxPGCell(); + wxPGCell(const wxPGCell& other) + : wxObject(other) + { + } + + wxPGCell( const wxString& text, + const wxBitmap& bitmap = wxNullBitmap, + const wxColour& fgCol = wxNullColour, + const wxColour& bgCol = wxNullColour ); + + virtual ~wxPGCell() { } + + wxPGCellData* GetData() + { + return (wxPGCellData*) m_refData; + } + + const wxPGCellData* GetData() const + { + return (const wxPGCellData*) m_refData; + } + + bool HasText() const + { + return (m_refData && GetData()->m_hasValidText); + } + + /** + Sets empty but valid data to this cell object. + */ + void SetEmptyData(); + + /** + Merges valid data from srcCell into this. + */ + void MergeFrom( const wxPGCell& srcCell ); + + void SetText( const wxString& text ); + void SetBitmap( const wxBitmap& bitmap ); + void SetFgCol( const wxColour& col ); + + /** + Sets font of the cell. + + @remarks Because wxPropertyGrid does not support rows of + different height, it makes little sense to change + size of the font. Therefore it is recommended + to use return value of wxPropertyGrid::GetFont() + or wxPropertyGrid::GetCaptionFont() as a basis + for the font that, after modifications, is passed + to this member function. + */ + void SetFont( const wxFont& font ); + + void SetBgCol( const wxColour& col ); + + const wxString& GetText() const { return GetData()->m_text; } + const wxBitmap& GetBitmap() const { return GetData()->m_bitmap; } + const wxColour& GetFgCol() const { return GetData()->m_fgCol; } + + /** + Returns font of the cell. If no specific font is set for this + cell, then the font will be invalid. + */ + const wxFont& GetFont() const { return GetData()->m_font; } + + const wxColour& GetBgCol() const { return GetData()->m_bgCol; } + + wxPGCell& operator=( const wxPGCell& other ) + { + if ( this != &other ) + { + Ref(other); + } + return *this; + } + + // Used mostly internally to figure out if this cell is supposed + // to have default values when attached to a grid. + bool IsInvalid() const + { + return ( m_refData == NULL ); + } + +private: + virtual wxObjectRefData *CreateRefData() const + { return new wxPGCellData(); } + + virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; +}; + +// ----------------------------------------------------------------------- + +/** @class wxPGAttributeStorage + + wxPGAttributeStorage is somewhat optimized storage for + key=variant pairs (ie. a map). +*/ +class WXDLLIMPEXP_PROPGRID wxPGAttributeStorage +{ +public: + wxPGAttributeStorage(); + ~wxPGAttributeStorage(); + + void Set( const wxString& name, const wxVariant& value ); + unsigned int GetCount() const { return (unsigned int) m_map.size(); } + wxVariant FindValue( const wxString& name ) const + { + wxPGHashMapS2P::const_iterator it = m_map.find(name); + if ( it != m_map.end() ) + { + wxVariantData* data = (wxVariantData*) it->second; + data->IncRef(); + return wxVariant(data, it->first); + } + return wxVariant(); + } + + typedef wxPGHashMapS2P::const_iterator const_iterator; + const_iterator StartIteration() const + { + return m_map.begin(); + } + bool GetNext( const_iterator& it, wxVariant& variant ) const + { + if ( it == m_map.end() ) + return false; + + wxVariantData* data = (wxVariantData*) it->second; + data->IncRef(); + variant.SetData(data); + variant.SetName(it->first); + ++it; + return true; + } + +protected: + wxPGHashMapS2P m_map; +}; + + +// ----------------------------------------------------------------------- + +/** @section propgrid_propflags wxPGProperty Flags + @{ +*/ + +enum wxPGPropertyFlags +{ + +/** Indicates bold font. +*/ +wxPG_PROP_MODIFIED = 0x0001, + +/** Disables ('greyed' text and editor does not activate) property. +*/ +wxPG_PROP_DISABLED = 0x0002, + +/** Hider button will hide this property. +*/ +wxPG_PROP_HIDDEN = 0x0004, + +/** This property has custom paint image just in front of its value. + If property only draws custom images into a popup list, then this + flag should not be set. +*/ +wxPG_PROP_CUSTOMIMAGE = 0x0008, + +/** Do not create text based editor for this property (but button-triggered + dialog and choice are ok). +*/ +wxPG_PROP_NOEDITOR = 0x0010, + +/** Property is collapsed, ie. it's children are hidden. +*/ +wxPG_PROP_COLLAPSED = 0x0020, + +/** + If property is selected, then indicates that validation failed for pending + value. + + If property is not selected, that indicates that the actual property + value has failed validation (NB: this behaviour is not currently supported, + but may be used in future). +*/ +wxPG_PROP_INVALID_VALUE = 0x0040, + +// 0x0080, + +/** Switched via SetWasModified(). Temporary flag - only used when + setting/changing property value. +*/ +wxPG_PROP_WAS_MODIFIED = 0x0200, + +/** + If set, then child properties (if any) are private, and should be + "invisible" to the application. +*/ +wxPG_PROP_AGGREGATE = 0x0400, + +/** If set, then child properties (if any) are copies and should not + be deleted in dtor. +*/ +wxPG_PROP_CHILDREN_ARE_COPIES = 0x0800, + +/** + Classifies this item as a non-category. + + Used for faster item type identification. +*/ +wxPG_PROP_PROPERTY = 0x1000, + +/** + Classifies this item as a category. + + Used for faster item type identification. +*/ +wxPG_PROP_CATEGORY = 0x2000, + +/** Classifies this item as a property that has children, but is not aggregate + (ie children are not private). +*/ +wxPG_PROP_MISC_PARENT = 0x4000, + +/** Property is read-only. Editor is still created for wxTextCtrl-based + property editors. For others, editor is not usually created because + they do implement wxTE_READONLY style or equivalent. +*/ +wxPG_PROP_READONLY = 0x8000, + +// +// NB: FLAGS ABOVE 0x8000 CANNOT BE USED WITH PROPERTY ITERATORS +// + +/** Property's value is composed from values of child properties. + @remarks + This flag cannot be used with property iterators. +*/ +wxPG_PROP_COMPOSED_VALUE = 0x00010000, + +/** Common value of property is selectable in editor. + @remarks + This flag cannot be used with property iterators. +*/ +wxPG_PROP_USES_COMMON_VALUE = 0x00020000, + +/** Property can be set to unspecified value via editor. + Currently, this applies to following properties: + - wxIntProperty, wxUIntProperty, wxFloatProperty, wxEditEnumProperty: + Clear the text field + + @remarks + This flag cannot be used with property iterators. + + @see wxPGProperty::SetAutoUnspecified() +*/ +wxPG_PROP_AUTO_UNSPECIFIED = 0x00040000, + +/** Indicates the bit useable by derived properties. +*/ +wxPG_PROP_CLASS_SPECIFIC_1 = 0x00080000, + +/** Indicates the bit useable by derived properties. +*/ +wxPG_PROP_CLASS_SPECIFIC_2 = 0x00100000, + +/** Indicates that the property is being deleted and should be ignored. +*/ +wxPG_PROP_BEING_DELETED = 0x00200000 + +}; + +/** Topmost flag. +*/ +#define wxPG_PROP_MAX wxPG_PROP_AUTO_UNSPECIFIED + +/** Property with children must have one of these set, otherwise iterators + will not work correctly. + Code should automatically take care of this, however. +*/ +#define wxPG_PROP_PARENTAL_FLAGS \ + ((wxPGPropertyFlags)(wxPG_PROP_AGGREGATE | \ + wxPG_PROP_CATEGORY | \ + wxPG_PROP_MISC_PARENT)) + +/** @} +*/ + +// Combination of flags that can be stored by GetFlagsAsString +#define wxPG_STRING_STORED_FLAGS \ + (wxPG_PROP_DISABLED|wxPG_PROP_HIDDEN|wxPG_PROP_NOEDITOR|wxPG_PROP_COLLAPSED) + +// ----------------------------------------------------------------------- + +/** + @section propgrid_property_attributes wxPropertyGrid Property Attribute + Identifiers. + + wxPGProperty::SetAttribute() and + wxPropertyGridInterface::SetPropertyAttribute() accept one of these as + attribute name argument. + + You can use strings instead of constants. However, some of these + constants are redefined to use cached strings which may reduce + your binary size by some amount. + + @{ +*/ + +/** Set default value for property. +*/ +#define wxPG_ATTR_DEFAULT_VALUE wxS("DefaultValue") + +/** Universal, int or double. Minimum value for numeric properties. +*/ +#define wxPG_ATTR_MIN wxS("Min") + +/** Universal, int or double. Maximum value for numeric properties. +*/ +#define wxPG_ATTR_MAX wxS("Max") + +/** Universal, string. When set, will be shown as text after the displayed + text value. Alternatively, if third column is enabled, text will be shown + there (for any type of property). +*/ +#define wxPG_ATTR_UNITS wxS("Units") + +/** When set, will be shown as 'greyed' text in property's value cell when + the actual displayed value is blank. +*/ +#define wxPG_ATTR_HINT wxS("Hint") + +#if wxPG_COMPATIBILITY_1_4 +/** + @deprecated Use "Hint" (wxPG_ATTR_HINT) instead. +*/ +#define wxPG_ATTR_INLINE_HELP wxS("InlineHelp") +#endif + +/** Universal, wxArrayString. Set to enable auto-completion in any + wxTextCtrl-based property editor. +*/ +#define wxPG_ATTR_AUTOCOMPLETE wxS("AutoComplete") + +/** wxBoolProperty and wxFlagsProperty specific. Value type is bool. + Default value is False. + + When set to True, bool property will use check box instead of a + combo box as its editor control. If you set this attribute + for a wxFlagsProperty, it is automatically applied to child + bool properties. +*/ +#define wxPG_BOOL_USE_CHECKBOX wxS("UseCheckbox") + +/** wxBoolProperty and wxFlagsProperty specific. Value type is bool. + Default value is False. + + Set to True for the bool property to cycle value on double click + (instead of showing the popup listbox). If you set this attribute + for a wxFlagsProperty, it is automatically applied to child + bool properties. +*/ +#define wxPG_BOOL_USE_DOUBLE_CLICK_CYCLING wxS("UseDClickCycling") + +/** + wxFloatProperty (and similar) specific, int, default -1. + + Sets the (max) precision used when floating point value is rendered as + text. The default -1 means infinite precision. +*/ +#define wxPG_FLOAT_PRECISION wxS("Precision") + +/** + The text will be echoed as asterisks (wxTE_PASSWORD will be passed to + textctrl etc). +*/ +#define wxPG_STRING_PASSWORD wxS("Password") + +/** Define base used by a wxUIntProperty. Valid constants are + wxPG_BASE_OCT, wxPG_BASE_DEC, wxPG_BASE_HEX and wxPG_BASE_HEXL + (lowercase characters). +*/ +#define wxPG_UINT_BASE wxS("Base") + +/** Define prefix rendered to wxUIntProperty. Accepted constants + wxPG_PREFIX_NONE, wxPG_PREFIX_0x, and wxPG_PREFIX_DOLLAR_SIGN. + <b>Note:</b> Only wxPG_PREFIX_NONE works with Decimal and Octal + numbers. +*/ +#define wxPG_UINT_PREFIX wxS("Prefix") + +/** + wxFileProperty/wxImageFileProperty specific, wxChar*, default is + detected/varies. + Sets the wildcard used in the triggered wxFileDialog. Format is the same. +*/ +#define wxPG_FILE_WILDCARD wxS("Wildcard") + +/** wxFileProperty/wxImageFileProperty specific, int, default 1. + When 0, only the file name is shown (i.e. drive and directory are hidden). +*/ +#define wxPG_FILE_SHOW_FULL_PATH wxS("ShowFullPath") + +/** Specific to wxFileProperty and derived properties, wxString, default empty. + If set, then the filename is shown relative to the given path string. +*/ +#define wxPG_FILE_SHOW_RELATIVE_PATH wxS("ShowRelativePath") + +/** + Specific to wxFileProperty and derived properties, wxString, default is + empty. + + Sets the initial path of where to look for files. +*/ +#define wxPG_FILE_INITIAL_PATH wxS("InitialPath") + +/** Specific to wxFileProperty and derivatives, wxString, default is empty. + Sets a specific title for the dir dialog. +*/ +#define wxPG_FILE_DIALOG_TITLE wxS("DialogTitle") + +/** Specific to wxFileProperty and derivatives, long, default is 0. + Sets a specific wxFileDialog style for the file dialog. +*/ +#define wxPG_FILE_DIALOG_STYLE wxS("DialogStyle") + +/** Specific to wxDirProperty, wxString, default is empty. + Sets a specific message for the dir dialog. +*/ +#define wxPG_DIR_DIALOG_MESSAGE wxS("DialogMessage") + +/** + wxArrayStringProperty's string delimiter character. If this is a quotation + mark or hyphen, then strings will be quoted instead (with given + character). + + Default delimiter is quotation mark. +*/ +#define wxPG_ARRAY_DELIMITER wxS("Delimiter") + +/** Sets displayed date format for wxDateProperty. +*/ +#define wxPG_DATE_FORMAT wxS("DateFormat") + +/** Sets wxDatePickerCtrl window style used with wxDateProperty. Default + is wxDP_DEFAULT | wxDP_SHOWCENTURY. +*/ +#define wxPG_DATE_PICKER_STYLE wxS("PickerStyle") + +/** SpinCtrl editor, int or double. How much number changes when button is + pressed (or up/down on keyboard). +*/ +#define wxPG_ATTR_SPINCTRL_STEP wxS("Step") + +/** SpinCtrl editor, bool. If true, value wraps at Min/Max. +*/ +#define wxPG_ATTR_SPINCTRL_WRAP wxS("Wrap") + +/** + wxMultiChoiceProperty, int. + If 0, no user strings allowed. If 1, user strings appear before list + strings. If 2, user strings appear after list string. +*/ +#define wxPG_ATTR_MULTICHOICE_USERSTRINGMODE wxS("UserStringMode") + +/** + wxColourProperty and its kind, int, default 1. + + Setting this attribute to 0 hides custom colour from property's list of + choices. +*/ +#define wxPG_COLOUR_ALLOW_CUSTOM wxS("AllowCustom") + +/** + wxColourProperty and its kind: Set to True in order to support editing + alpha colour component. +*/ +#define wxPG_COLOUR_HAS_ALPHA wxS("HasAlpha") + +/** @} +*/ + +// Redefine attribute macros to use cached strings +#undef wxPG_ATTR_DEFAULT_VALUE +#define wxPG_ATTR_DEFAULT_VALUE wxPGGlobalVars->m_strDefaultValue +#undef wxPG_ATTR_MIN +#define wxPG_ATTR_MIN wxPGGlobalVars->m_strMin +#undef wxPG_ATTR_MAX +#define wxPG_ATTR_MAX wxPGGlobalVars->m_strMax +#undef wxPG_ATTR_UNITS +#define wxPG_ATTR_UNITS wxPGGlobalVars->m_strUnits +#undef wxPG_ATTR_HINT +#define wxPG_ATTR_HINT wxPGGlobalVars->m_strHint +#if wxPG_COMPATIBILITY_1_4 +#undef wxPG_ATTR_INLINE_HELP +#define wxPG_ATTR_INLINE_HELP wxPGGlobalVars->m_strInlineHelp +#endif + +// ----------------------------------------------------------------------- + +/** @class wxPGChoiceEntry + Data of a single wxPGChoices choice. +*/ +class WXDLLIMPEXP_PROPGRID wxPGChoiceEntry : public wxPGCell +{ +public: + wxPGChoiceEntry(); + wxPGChoiceEntry(const wxPGChoiceEntry& other) + : wxPGCell(other) + { + m_value = other.m_value; + } + wxPGChoiceEntry( const wxString& label, + int value = wxPG_INVALID_VALUE ) + : wxPGCell(), m_value(value) + { + SetText(label); + } + + virtual ~wxPGChoiceEntry() { } + + void SetValue( int value ) { m_value = value; } + int GetValue() const { return m_value; } + + wxPGChoiceEntry& operator=( const wxPGChoiceEntry& other ) + { + if ( this != &other ) + { + Ref(other); + } + m_value = other.m_value; + return *this; + } + +protected: + int m_value; +}; + + +typedef void* wxPGChoicesId; + +class WXDLLIMPEXP_PROPGRID wxPGChoicesData : public wxObjectRefData +{ + friend class wxPGChoices; +public: + // Constructor sets m_refCount to 1. + wxPGChoicesData(); + + void CopyDataFrom( wxPGChoicesData* data ); + + wxPGChoiceEntry& Insert( int index, const wxPGChoiceEntry& item ); + + // Delete all entries + void Clear(); + + unsigned int GetCount() const + { + return (unsigned int) m_items.size(); + } + + const wxPGChoiceEntry& Item( unsigned int i ) const + { + wxASSERT_MSG( i < GetCount(), "invalid index" ); + return m_items[i]; + } + + wxPGChoiceEntry& Item( unsigned int i ) + { + wxASSERT_MSG( i < GetCount(), "invalid index" ); + return m_items[i]; + } + +private: + wxVector<wxPGChoiceEntry> m_items; + + virtual ~wxPGChoicesData(); +}; + +#define wxPGChoicesEmptyData ((wxPGChoicesData*)NULL) + + +/** @class wxPGChoices + + Helper class for managing choices of wxPropertyGrid properties. + Each entry can have label, value, bitmap, text colour, and background + colour. + + wxPGChoices uses reference counting, similar to other wxWidgets classes. + This means that assignment operator and copy constructor only copy the + reference and not the actual data. Use Copy() member function to create a + real copy. + + @remarks If you do not specify value for entry, index is used. + + @library{wxpropgrid} + @category{propgrid} +*/ +class WXDLLIMPEXP_PROPGRID wxPGChoices +{ +public: + typedef long ValArrItem; + + /** Default constructor. */ + wxPGChoices() + { + Init(); + } + + /** + Copy constructor, uses reference counting. To create a real copy, + use Copy() member function instead. + */ + wxPGChoices( const wxPGChoices& a ) + { + if ( a.m_data != wxPGChoicesEmptyData ) + { + m_data = a.m_data; + m_data->IncRef(); + } + } + + /** + Constructor. + + @param labels + Labels for choices + + @param values + Values for choices. If NULL, indexes are used. + */ + wxPGChoices( const wxChar* const* labels, const long* values = NULL ) + { + Init(); + Set(labels,values); + } + + /** + Constructor. + + @param labels + Labels for choices + + @param values + Values for choices. If empty, indexes are used. + */ + wxPGChoices( const wxArrayString& labels, + const wxArrayInt& values = wxArrayInt() ) + { + Init(); + Set(labels,values); + } + + /** Simple interface constructor. */ + wxPGChoices( wxPGChoicesData* data ) + { + wxASSERT(data); + m_data = data; + data->IncRef(); + } + + /** Destructor. */ + ~wxPGChoices() + { + Free(); + } + + /** + Adds to current. + + If did not have own copies, creates them now. If was empty, identical + to set except that creates copies. + + @param labels + Labels for added choices. + + @param values + Values for added choices. If empty, relevant entry indexes are used. + */ + void Add( const wxChar* const* labels, const ValArrItem* values = NULL ); + + /** Version that works with wxArrayString and wxArrayInt. */ + void Add( const wxArrayString& arr, const wxArrayInt& arrint = wxArrayInt() ); + + /** + Adds a single choice. + + @param label + Label for added choice. + + @param value + Value for added choice. If unspecified, index is used. + */ + wxPGChoiceEntry& Add( const wxString& label, + int value = wxPG_INVALID_VALUE ); + + /** Adds a single item, with bitmap. */ + wxPGChoiceEntry& Add( const wxString& label, + const wxBitmap& bitmap, + int value = wxPG_INVALID_VALUE ); + + /** Adds a single item with full entry information. */ + wxPGChoiceEntry& Add( const wxPGChoiceEntry& entry ) + { + return Insert(entry, -1); + } + + /** Adds single item. */ + wxPGChoiceEntry& AddAsSorted( const wxString& label, + int value = wxPG_INVALID_VALUE ); + + /** + Assigns choices data, using reference counting. To create a real copy, + use Copy() member function instead. + */ + void Assign( const wxPGChoices& a ) + { + AssignData(a.m_data); + } + + void AssignData( wxPGChoicesData* data ); + + /** Delete all choices. */ + void Clear(); + + /** + Returns a real copy of the choices. + */ + wxPGChoices Copy() const + { + wxPGChoices dst; + dst.EnsureData(); + dst.m_data->CopyDataFrom(m_data); + return dst; + } + + void EnsureData() + { + if ( m_data == wxPGChoicesEmptyData ) + m_data = new wxPGChoicesData(); + } + + /** Gets a unsigned number identifying this list. */ + wxPGChoicesId GetId() const { return (wxPGChoicesId) m_data; } + + const wxString& GetLabel( unsigned int ind ) const + { + return Item(ind).GetText(); + } + + unsigned int GetCount () const + { + if ( !m_data ) + return 0; + + return m_data->GetCount(); + } + + int GetValue( unsigned int ind ) const { return Item(ind).GetValue(); } + + /** Returns array of values matching the given strings. Unmatching strings + result in wxPG_INVALID_VALUE entry in array. + */ + wxArrayInt GetValuesForStrings( const wxArrayString& strings ) const; + + /** Returns array of indices matching given strings. Unmatching strings + are added to 'unmatched', if not NULL. + */ + wxArrayInt GetIndicesForStrings( const wxArrayString& strings, + wxArrayString* unmatched = NULL ) const; + + int Index( const wxString& str ) const; + int Index( int val ) const; + + /** Inserts single item. */ + wxPGChoiceEntry& Insert( const wxString& label, + int index, + int value = wxPG_INVALID_VALUE ); + + /** Inserts a single item with full entry information. */ + wxPGChoiceEntry& Insert( const wxPGChoiceEntry& entry, int index ); + + /** Returns false if this is a constant empty set of choices, + which should not be modified. + */ + bool IsOk() const + { + return ( m_data != wxPGChoicesEmptyData ); + } + + const wxPGChoiceEntry& Item( unsigned int i ) const + { + wxASSERT( IsOk() ); + return m_data->Item(i); + } + + wxPGChoiceEntry& Item( unsigned int i ) + { + wxASSERT( IsOk() ); + return m_data->Item(i); + } + + /** Removes count items starting at position nIndex. */ + void RemoveAt(size_t nIndex, size_t count = 1); + + /** Does not create copies for itself. + TODO: Deprecate. + */ + void Set( const wxChar* const* labels, const long* values = NULL ) + { + Free(); + Add(labels,values); + } + + /** Version that works with wxArrayString and wxArrayInt. */ + void Set( const wxArrayString& labels, + const wxArrayInt& values = wxArrayInt() ) + { + Free(); + if ( &values ) + Add(labels,values); + else + Add(labels); + } + + // Creates exclusive copy of current choices + void AllocExclusive(); + + // Returns data, increases refcount. + wxPGChoicesData* GetData() + { + wxASSERT( m_data->GetRefCount() != -1 ); + m_data->IncRef(); + return m_data; + } + + // Returns plain data ptr - no refcounting stuff is done. + wxPGChoicesData* GetDataPtr() const { return m_data; } + + // Changes ownership of data to you. + wxPGChoicesData* ExtractData() + { + wxPGChoicesData* data = m_data; + m_data = wxPGChoicesEmptyData; + return data; + } + + wxArrayString GetLabels() const; + + void operator= (const wxPGChoices& a) + { + if (this != &a) + AssignData(a.m_data); + } + + wxPGChoiceEntry& operator[](unsigned int i) + { + return Item(i); + } + + const wxPGChoiceEntry& operator[](unsigned int i) const + { + return Item(i); + } + +protected: + wxPGChoicesData* m_data; + + void Init(); + void Free(); +}; + +// ----------------------------------------------------------------------- + +/** @class wxPGProperty + + wxPGProperty is base class for all wxPropertyGrid properties. + + NB: Full class overview is now only present in + interface/wx/propgrid/property.h. + + @library{wxpropgrid} + @category{propgrid} +*/ +class WXDLLIMPEXP_PROPGRID wxPGProperty : public wxObject +{ + friend class wxPropertyGrid; + friend class wxPropertyGridInterface; + friend class wxPropertyGridPageState; + friend class wxPropertyGridPopulator; + friend class wxStringProperty; // Proper "<composed>" support requires this + + DECLARE_ABSTRACT_CLASS(wxPGProperty) +public: + typedef wxUint32 FlagType; + + /** + Default constructor. + */ + wxPGProperty(); + + /** + Constructor. + + All non-abstract property classes should have a constructor with + the same first two arguments as this one. + */ + wxPGProperty( const wxString& label, const wxString& name ); + + /** + Virtual destructor. + It is customary for derived properties to implement this. + */ + virtual ~wxPGProperty(); + + /** This virtual function is called after m_value has been set. + + @remarks + - If m_value was set to Null variant (ie. unspecified value), + OnSetValue() will not be called. + - m_value may be of any variant type. Typically properties internally + support only one variant type, and as such OnSetValue() provides a + good opportunity to convert + supported values into internal type. + - Default implementation does nothing. + */ + virtual void OnSetValue(); + + /** Override this to return something else than m_value as the value. + */ + virtual wxVariant DoGetValue() const { return m_value; } + + /** Implement this function in derived class to check the value. + Return true if it is ok. Returning false prevents property change events + from occurring. + + @remarks + - Default implementation always returns true. + */ + virtual bool ValidateValue( wxVariant& value, + wxPGValidationInfo& validationInfo ) const; + + /** + Converts text into wxVariant value appropriate for this property. + + @param variant + On function entry this is the old value (should not be wxNullVariant + in normal cases). Translated value must be assigned back to it. + + @param text + Text to be translated into variant. + + @param argFlags + If wxPG_FULL_VALUE is set, returns complete, storable value instead + of displayable one (they may be different). + If wxPG_COMPOSITE_FRAGMENT is set, text is interpreted as a part of + composite property string value (as generated by ValueToString() + called with this same flag). + + @return Returns @true if resulting wxVariant value was different. + + @remarks Default implementation converts semicolon delimited tokens into + child values. Only works for properties with children. + + You might want to take into account that m_value is Null variant + if property value is unspecified (which is usually only case if + you explicitly enabled that sort behaviour). + */ + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int argFlags = 0 ) const; + + /** + Converts integer (possibly a choice selection) into wxVariant value + appropriate for this property. + + @param variant + On function entry this is the old value (should not be wxNullVariant + in normal cases). Translated value must be assigned back to it. + + @param number + Integer to be translated into variant. + + @param argFlags + If wxPG_FULL_VALUE is set, returns complete, storable value instead + of displayable one. + + @return Returns @true if resulting wxVariant value was different. + + @remarks + - If property is not supposed to use choice or spinctrl or other editor + with int-based value, it is not necessary to implement this method. + - Default implementation simply assign given int to m_value. + - If property uses choice control, and displays a dialog on some choice + items, then it is preferred to display that dialog in IntToValue + instead of OnEvent. + - You might want to take into account that m_value is Null variant if + property value is unspecified (which is usually only case if you + explicitly enabled that sort behaviour). + */ + virtual bool IntToValue( wxVariant& value, + int number, + int argFlags = 0 ) const; + + /** + Converts property value into a text representation. + + @param value + Value to be converted. + + @param argFlags + If 0 (default value), then displayed string is returned. + If wxPG_FULL_VALUE is set, returns complete, storable string value + instead of displayable. If wxPG_EDITABLE_VALUE is set, returns + string value that must be editable in textctrl. If + wxPG_COMPOSITE_FRAGMENT is set, returns text that is appropriate to + display as a part of string property's composite text + representation. + + @remarks Default implementation calls GenerateComposedValue(). + */ + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + + /** Converts string to a value, and if successful, calls SetValue() on it. + Default behaviour is to do nothing. + @param text + String to get the value from. + @return + true if value was changed. + */ + bool SetValueFromString( const wxString& text, int flags = wxPG_PROGRAMMATIC_VALUE ); + + /** Converts integer to a value, and if successful, calls SetValue() on it. + Default behaviour is to do nothing. + @param value + Int to get the value from. + @param flags + If has wxPG_FULL_VALUE, then the value given is a actual value and + not an index. + @return + True if value was changed. + */ + bool SetValueFromInt( long value, int flags = 0 ); + + /** + Returns size of the custom painted image in front of property. + + This method must be overridden to return non-default value if + OnCustomPaint is to be called. + @param item + Normally -1, but can be an index to the property's list of items. + @remarks + - Default behaviour is to return wxSize(0,0), which means no image. + - Default image width or height is indicated with dimension -1. + - You can also return wxPG_DEFAULT_IMAGE_SIZE, i.e. wxSize(-1, -1). + */ + virtual wxSize OnMeasureImage( int item = -1 ) const; + + /** + Events received by editor widgets are processed here. + + Note that editor class usually processes most events. Some, such as + button press events of TextCtrlAndButton class, can be handled here. + Also, if custom handling for regular events is desired, then that can + also be done (for example, wxSystemColourProperty custom handles + wxEVT_CHOICE to display colour picker dialog when + 'custom' selection is made). + + If the event causes value to be changed, SetValueInEvent() + should be called to set the new value. + + @param event + Associated wxEvent. + @return + Should return true if any changes in value should be reported. + @remarks + If property uses choice control, and displays a dialog on some choice + items, then it is preferred to display that dialog in IntToValue + instead of OnEvent. + */ + virtual bool OnEvent( wxPropertyGrid* propgrid, + wxWindow* wnd_primary, + wxEvent& event ); + + /** + Called after value of a child property has been altered. Must return + new value of the whole property (after any alterations warranted by + child's new value). + + Note that this function is usually called at the time that value of + this property, or given child property, is still pending for change, + and as such, result of GetValue() or m_value should not be relied + on. + + Sample pseudo-code implementation: + + @code + wxVariant MyProperty::ChildChanged( wxVariant& thisValue, + int childIndex, + wxVariant& childValue ) const + { + // Acquire reference to actual type of data stored in variant + // (TFromVariant only exists if wxPropertyGrid's wxVariant-macros + // were used to create the variant class). + T& data = TFromVariant(thisValue); + + // Copy childValue into data. + switch ( childIndex ) + { + case 0: + data.SetSubProp1( childvalue.GetLong() ); + break; + case 1: + data.SetSubProp2( childvalue.GetString() ); + break; + ... + } + + // Return altered data + return data; + } + @endcode + + @param thisValue + Value of this property. Changed value should be returned (in + previous versions of wxPropertyGrid it was only necessary to + write value back to this argument). + @param childIndex + Index of child changed (you can use Item(childIndex) to get + child property). + @param childValue + (Pending) value of the child property. + + @return + Modified value of the whole property. + */ + virtual wxVariant ChildChanged( wxVariant& thisValue, + int childIndex, + wxVariant& childValue ) const; + + /** Returns pointer to an instance of used editor. + */ + virtual const wxPGEditor* DoGetEditorClass() const; + + /** Returns pointer to the wxValidator that should be used + with the editor of this property (NULL for no validator). + Setting validator explicitly via SetPropertyValidator + will override this. + + In most situations, code like this should work well + (macros are used to maintain one actual validator instance, + so on the second call the function exits within the first + macro): + + @code + + wxValidator* wxMyPropertyClass::DoGetValidator () const + { + WX_PG_DOGETVALIDATOR_ENTRY() + + wxMyValidator* validator = new wxMyValidator(...); + + ... prepare validator... + + WX_PG_DOGETVALIDATOR_EXIT(validator) + } + + @endcode + + @remarks + You can get common filename validator by returning + wxFileProperty::GetClassValidator(). wxDirProperty, + for example, uses it. + */ + virtual wxValidator* DoGetValidator () const; + + /** + Override to paint an image in front of the property value text or + drop-down list item (but only if wxPGProperty::OnMeasureImage is + overridden as well). + + If property's OnMeasureImage() returns size that has height != 0 but + less than row height ( < 0 has special meanings), wxPropertyGrid calls + this method to draw a custom image in a limited area in front of the + editor control or value text/graphics, and if control has drop-down + list, then the image is drawn there as well (even in the case + OnMeasureImage() returned higher height than row height). + + NOTE: Following applies when OnMeasureImage() returns a "flexible" + height ( using wxPG_FLEXIBLE_SIZE(W,H) macro), which implies variable + height items: If rect.x is < 0, then this is a measure item call, which + means that dc is invalid and only thing that should be done is to set + paintdata.m_drawnHeight to the height of the image of item at index + paintdata.m_choiceItem. This call may be done even as often as once + every drop-down popup show. + + @param dc + wxDC to paint on. + @param rect + Box reserved for custom graphics. Includes surrounding rectangle, + if any. If x is < 0, then this is a measure item call (see above). + @param paintdata + wxPGPaintData structure with much useful data. + + @remarks + - You can actually exceed rect width, but if you do so then + paintdata.m_drawnWidth must be set to the full width drawn in + pixels. + - Due to technical reasons, rect's height will be default even if + custom height was reported during measure call. + - Brush is guaranteed to be default background colour. It has been + already used to clear the background of area being painted. It + can be modified. + - Pen is guaranteed to be 1-wide 'black' (or whatever is the proper + colour) pen for drawing framing rectangle. It can be changed as + well. + + @see ValueToString() + */ + virtual void OnCustomPaint( wxDC& dc, + const wxRect& rect, + wxPGPaintData& paintdata ); + + /** + Returns used wxPGCellRenderer instance for given property column + (label=0, value=1). + + Default implementation returns editor's renderer for all columns. + */ + virtual wxPGCellRenderer* GetCellRenderer( int column ) const; + + /** Returns which choice is currently selected. Only applies to properties + which have choices. + + Needs to reimplemented in derived class if property value does not + map directly to a choice. Integer as index, bool, and string usually do. + */ + virtual int GetChoiceSelection() const; + + /** + Refresh values of child properties. + + Automatically called after value is set. + */ + virtual void RefreshChildren(); + + /** + Reimplement this member function to add special handling for + attributes of this property. + + @return Return @false to have the attribute automatically stored in + m_attributes. Default implementation simply does that and + nothing else. + + @remarks To actually set property attribute values from the + application, use wxPGProperty::SetAttribute() instead. + */ + virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); + + /** Returns value of an attribute. + + Override if custom handling of attributes is needed. + + Default implementation simply return NULL variant. + */ + virtual wxVariant DoGetAttribute( const wxString& name ) const; + + /** Returns instance of a new wxPGEditorDialogAdapter instance, which is + used when user presses the (optional) button next to the editor control; + + Default implementation returns NULL (ie. no action is generated when + button is pressed). + */ + virtual wxPGEditorDialogAdapter* GetEditorDialog() const; + + /** + Called whenever validation has failed with given pending value. + + @remarks If you implement this in your custom property class, please + remember to call the baser implementation as well, since they + may use it to revert property into pre-change state. + */ + virtual void OnValidationFailure( wxVariant& pendingValue ); + + /** Append a new choice to property's list of choices. + */ + int AddChoice( const wxString& label, int value = wxPG_INVALID_VALUE ) + { + return InsertChoice(label, wxNOT_FOUND, value); + } + + /** + Returns true if children of this property are component values (for + instance, points size, face name, and is_underlined are component + values of a font). + */ + bool AreChildrenComponents() const + { + if ( m_flags & (wxPG_PROP_COMPOSED_VALUE|wxPG_PROP_AGGREGATE) ) + return true; + + return false; + } + + /** + Deletes children of the property. + */ + void DeleteChildren(); + + /** + Removes entry from property's wxPGChoices and editor control (if it is + active). + + If selected item is deleted, then the value is set to unspecified. + */ + void DeleteChoice( int index ); + + /** + Enables or disables the property. Disabled property usually appears + as having grey text. + + @param enable + If @false, property is disabled instead. + + @see wxPropertyGridInterface::EnableProperty() + */ + void Enable( bool enable = true ); + + /** + Call to enable or disable usage of common value (integer value that can + be selected for properties instead of their normal values) for this + property. + + Common values are disabled by the default for all properties. + */ + void EnableCommonValue( bool enable = true ) + { + if ( enable ) SetFlag( wxPG_PROP_USES_COMMON_VALUE ); + else ClearFlag( wxPG_PROP_USES_COMMON_VALUE ); + } + + /** + Composes text from values of child properties. + */ + wxString GenerateComposedValue() const + { + wxString s; + DoGenerateComposedValue(s); + return s; + } + + /** Returns property's label. */ + const wxString& GetLabel() const { return m_label; } + + /** Returns property's name with all (non-category, non-root) parents. */ + wxString GetName() const; + + /** + Returns property's base name (ie parent's name is not added in any + case) + */ + const wxString& GetBaseName() const { return m_name; } + + /** Returns read-only reference to property's list of choices. + */ + const wxPGChoices& GetChoices() const + { + return m_choices; + } + + /** Returns coordinate to the top y of the property. Note that the + position of scrollbars is not taken into account. + */ + int GetY() const; + + wxVariant GetValue() const + { + return DoGetValue(); + } + + /** Returns reference to the internal stored value. GetValue is preferred + way to get the actual value, since GetValueRef ignores DoGetValue, + which may override stored value. + */ + wxVariant& GetValueRef() + { + return m_value; + } + + const wxVariant& GetValueRef() const + { + return m_value; + } + + // Helper function (for wxPython bindings and such) for settings protected + // m_value. + wxVariant GetValuePlain() const + { + return m_value; + } + + /** Returns text representation of property's value. + + @param argFlags + If 0 (default value), then displayed string is returned. + If wxPG_FULL_VALUE is set, returns complete, storable string value + instead of displayable. If wxPG_EDITABLE_VALUE is set, returns + string value that must be editable in textctrl. If + wxPG_COMPOSITE_FRAGMENT is set, returns text that is appropriate to + display as a part of string property's composite text + representation. + + @remarks In older versions, this function used to be overridden to convert + property's value into a string representation. This function is + now handled by ValueToString(), and overriding this function now + will result in run-time assertion failure. + */ + virtual wxString GetValueAsString( int argFlags = 0 ) const; + + /** Synonymous to GetValueAsString(). + + @deprecated Use GetValueAsString() instead. + + @see GetValueAsString() + */ + wxDEPRECATED( wxString GetValueString( int argFlags = 0 ) const ); + + /** + Returns wxPGCell of given column. + + @remarks const version of this member function returns 'default' + wxPGCell object if the property itself didn't hold + cell data. + */ + const wxPGCell& GetCell( unsigned int column ) const; + + /** + Returns wxPGCell of given column, creating one if necessary. + */ + wxPGCell& GetCell( unsigned int column ) + { + return GetOrCreateCell(column); + } + + /** + Returns wxPGCell of given column, creating one if necessary. + */ + wxPGCell& GetOrCreateCell( unsigned int column ); + + /** Return number of displayed common values for this property. + */ + int GetDisplayedCommonValueCount() const; + + wxString GetDisplayedString() const + { + return GetValueAsString(0); + } + + /** + Returns property's hint text (shown in empty value cell). + */ + inline wxString GetHintText() const; + + /** Returns property grid where property lies. */ + wxPropertyGrid* GetGrid() const; + + /** Returns owner wxPropertyGrid, but only if one is currently on a page + displaying this property. */ + wxPropertyGrid* GetGridIfDisplayed() const; + + /** Returns highest level non-category, non-root parent. Useful when you + have nested wxCustomProperties/wxParentProperties. + @remarks + Thus, if immediate parent is root or category, this will return the + property itself. + */ + wxPGProperty* GetMainParent() const; + + /** Return parent of property */ + wxPGProperty* GetParent() const { return m_parent; } + + /** Returns true if property has editable wxTextCtrl when selected. + + @remarks + Although disabled properties do not displayed editor, they still + return True here as being disabled is considered a temporary + condition (unlike being read-only or having limited editing enabled). + */ + bool IsTextEditable() const; + + bool IsValueUnspecified() const + { + return m_value.IsNull(); + } + + /** + Returns non-zero if property has given flag set. + + @see propgrid_propflags + */ + FlagType HasFlag( wxPGPropertyFlags flag ) const + { + return ( m_flags & flag ); + } + + /** Returns comma-delimited string of property attributes. + */ + const wxPGAttributeStorage& GetAttributes() const + { + return m_attributes; + } + + /** Returns m_attributes as list wxVariant. + */ + wxVariant GetAttributesAsList() const; + + /** + Returns property flags. + */ + FlagType GetFlags() const + { + return m_flags; + } + + const wxPGEditor* GetEditorClass() const; + + wxString GetValueType() const + { + return m_value.GetType(); + } + + /** Returns editor used for given column. NULL for no editor. + */ + const wxPGEditor* GetColumnEditor( int column ) const + { + if ( column == 1 ) + return GetEditorClass(); + + return NULL; + } + + /** Returns common value selected for this property. -1 for none. + */ + int GetCommonValue() const + { + return m_commonValue; + } + + /** Returns true if property has even one visible child. + */ + bool HasVisibleChildren() const; + + /** + Use this member function to add independent (ie. regular) children to + a property. + + @return Inserted childProperty. + + @remarks wxPropertyGrid is not automatically refreshed by this + function. + + @see AddPrivateChild() + */ + wxPGProperty* InsertChild( int index, wxPGProperty* childProperty ); + + /** Inserts a new choice to property's list of choices. + */ + int InsertChoice( const wxString& label, int index, int value = wxPG_INVALID_VALUE ); + + /** + Returns true if this property is actually a wxPropertyCategory. + */ + bool IsCategory() const { return HasFlag(wxPG_PROP_CATEGORY)?true:false; } + + /** Returns true if this property is actually a wxRootProperty. + */ + bool IsRoot() const { return (m_parent == NULL); } + + /** Returns true if this is a sub-property. */ + bool IsSubProperty() const + { + wxPGProperty* parent = (wxPGProperty*)m_parent; + if ( parent && !parent->IsCategory() ) + return true; + return false; + } + + /** Returns last visible sub-property, recursively. + */ + const wxPGProperty* GetLastVisibleSubItem() const; + + wxVariant GetDefaultValue() const; + + int GetMaxLength() const + { + return (int) m_maxLen; + } + + /** + Determines, recursively, if all children are not unspecified. + + @param pendingList + Assumes members in this wxVariant list as pending + replacement values. + */ + bool AreAllChildrenSpecified( wxVariant* pendingList = NULL ) const; + + /** Updates composed values of parent non-category properties, recursively. + Returns topmost property updated. + + @remarks + - Must not call SetValue() (as can be called in it). + */ + wxPGProperty* UpdateParentValues(); + + /** Returns true if containing grid uses wxPG_EX_AUTO_UNSPECIFIED_VALUES. + */ + bool UsesAutoUnspecified() const + { + return HasFlag(wxPG_PROP_AUTO_UNSPECIFIED)?true:false; + } + + wxBitmap* GetValueImage() const + { + return m_valueBitmap; + } + + wxVariant GetAttribute( const wxString& name ) const; + + /** + Returns named attribute, as string, if found. + + Otherwise defVal is returned. + */ + wxString GetAttribute( const wxString& name, const wxString& defVal ) const; + + /** + Returns named attribute, as long, if found. + + Otherwise defVal is returned. + */ + long GetAttributeAsLong( const wxString& name, long defVal ) const; + + /** + Returns named attribute, as double, if found. + + Otherwise defVal is returned. + */ + double GetAttributeAsDouble( const wxString& name, double defVal ) const; + + unsigned int GetDepth() const { return (unsigned int)m_depth; } + + /** Gets flags as a'|' delimited string. Note that flag names are not + prepended with 'wxPG_PROP_'. + @param flagsMask + String will only be made to include flags combined by this parameter. + */ + wxString GetFlagsAsString( FlagType flagsMask ) const; + + /** Returns position in parent's array. */ + unsigned int GetIndexInParent() const + { + return (unsigned int)m_arrIndex; + } + + /** Hides or reveals the property. + @param hide + true for hide, false for reveal. + @param flags + By default changes are applied recursively. Set this paramter + wxPG_DONT_RECURSE to prevent this. + */ + bool Hide( bool hide, int flags = wxPG_RECURSE ); + + bool IsExpanded() const + { return (!(m_flags & wxPG_PROP_COLLAPSED) && GetChildCount()); } + + /** Returns true if all parents expanded. + */ + bool IsVisible() const; + + bool IsEnabled() const { return !(m_flags & wxPG_PROP_DISABLED); } + + /** If property's editor is created this forces its recreation. + Useful in SetAttribute etc. Returns true if actually did anything. + */ + bool RecreateEditor(); + + /** If property's editor is active, then update it's value. + */ + void RefreshEditor(); + + /** Sets an attribute for this property. + @param name + Text identifier of attribute. See @ref propgrid_property_attributes. + @param value + Value of attribute. + */ + void SetAttribute( const wxString& name, wxVariant value ); + + void SetAttributes( const wxPGAttributeStorage& attributes ); + + /** + Set if user can change the property's value to unspecified by + modifying the value of the editor control (usually by clearing + it). Currently, this can work with following properties: + wxIntProperty, wxUIntProperty, wxFloatProperty, wxEditEnumProperty. + + @param enable + Whether to enable or disable this behaviour (it is disabled by + default). + */ + void SetAutoUnspecified( bool enable = true ) + { + ChangeFlag(wxPG_PROP_AUTO_UNSPECIFIED, enable); + } + + /** + Sets property's background colour. + + @param colour + Background colour to use. + + @param flags + Default is wxPG_RECURSE which causes colour to be set recursively. + Omit this flag to only set colour for the property in question + and not any of its children. + */ + void SetBackgroundColour( const wxColour& colour, + int flags = wxPG_RECURSE ); + + /** + Sets property's text colour. + + @param colour + Text colour to use. + + @param flags + Default is wxPG_RECURSE which causes colour to be set recursively. + Omit this flag to only set colour for the property in question + and not any of its children. + */ + void SetTextColour( const wxColour& colour, + int flags = wxPG_RECURSE ); + + /** Set default value of a property. Synonymous to + + @code + SetAttribute("DefaultValue", value); + @endcode + */ + void SetDefaultValue( wxVariant& value ); + + /** Sets editor for a property. + + @param editor + For builtin editors, use wxPGEditor_X, where X is builtin editor's + name (TextCtrl, Choice, etc. see wxPGEditor documentation for full + list). + + For custom editors, use pointer you received from + wxPropertyGrid::RegisterEditorClass(). + */ + void SetEditor( const wxPGEditor* editor ) + { + m_customEditor = editor; + } + + /** Sets editor for a property. + */ + inline void SetEditor( const wxString& editorName ); + + /** + Sets cell information for given column. + */ + void SetCell( int column, const wxPGCell& cell ); + + /** Sets common value selected for this property. -1 for none. + */ + void SetCommonValue( int commonValue ) + { + m_commonValue = commonValue; + } + + /** Sets flags from a '|' delimited string. Note that flag names are not + prepended with 'wxPG_PROP_'. + */ + void SetFlagsFromString( const wxString& str ); + + /** Sets property's "is it modified?" flag. Affects children recursively. + */ + void SetModifiedStatus( bool modified ) + { + SetFlagRecursively(wxPG_PROP_MODIFIED, modified); + } + + /** Call in OnEvent(), OnButtonClick() etc. to change the property value + based on user input. + + @remarks + This method is const since it doesn't actually modify value, but posts + given variant as pending value, stored in wxPropertyGrid. + */ + void SetValueInEvent( wxVariant value ) const; + + /** + Call this to set value of the property. + + Unlike methods in wxPropertyGrid, this does not automatically update + the display. + + @remarks + Use wxPropertyGrid::ChangePropertyValue() instead if you need to run + through validation process and send property change event. + + If you need to change property value in event, based on user input, use + SetValueInEvent() instead. + + @param pList + Pointer to list variant that contains child values. Used to + indicate which children should be marked as modified. + + @param flags + Various flags (for instance, wxPG_SETVAL_REFRESH_EDITOR, which is + enabled by default). + */ + void SetValue( wxVariant value, wxVariant* pList = NULL, + int flags = wxPG_SETVAL_REFRESH_EDITOR ); + + /** Set wxBitmap in front of the value. This bitmap may be ignored + by custom cell renderers. + */ + void SetValueImage( wxBitmap& bmp ); + + /** Sets selected choice and changes property value. + + Tries to retain value type, although currently if it is not string, + then it is forced to integer. + */ + void SetChoiceSelection( int newValue ); + + void SetExpanded( bool expanded ) + { + if ( !expanded ) m_flags |= wxPG_PROP_COLLAPSED; + else m_flags &= ~wxPG_PROP_COLLAPSED; + } + + /** + Sets or clears given property flag. Mainly for internal use. + + @remarks Setting a property flag never has any side-effect, and is + intended almost exclusively for internal use. So, for + example, if you want to disable a property, call + Enable(false) instead of setting wxPG_PROP_DISABLED flag. + + @see HasFlag(), GetFlags() + */ + void ChangeFlag( wxPGPropertyFlags flag, bool set ) + { + if ( set ) + m_flags |= flag; + else + m_flags &= ~flag; + } + + /** + Sets or clears given property flag, recursively. This function is + primarily intended for internal use. + + @see ChangeFlag() + */ + void SetFlagRecursively( wxPGPropertyFlags flag, bool set ); + + void SetHelpString( const wxString& helpString ) + { + m_helpString = helpString; + } + + void SetLabel( const wxString& label ) { m_label = label; } + + void SetName( const wxString& newName ); + + /** + Changes what sort of parent this property is for its children. + + @param flag + Use one of the following values: wxPG_PROP_MISC_PARENT (for + generic parents), wxPG_PROP_CATEGORY (for categories), or + wxPG_PROP_AGGREGATE (for derived property classes with private + children). + + @remarks You generally do not need to call this function. + */ + void SetParentalType( int flag ) + { + m_flags &= ~(wxPG_PROP_PROPERTY|wxPG_PROP_PARENTAL_FLAGS); + m_flags |= flag; + } + + void SetValueToUnspecified() + { + wxVariant val; // Create NULL variant + SetValue(val, NULL, wxPG_SETVAL_REFRESH_EDITOR); + } + + // Helper function (for wxPython bindings and such) for settings protected + // m_value. + void SetValuePlain( wxVariant value ) + { + m_value = value; + } + +#if wxUSE_VALIDATORS + /** Sets wxValidator for a property*/ + void SetValidator( const wxValidator& validator ) + { + m_validator = wxDynamicCast(validator.Clone(),wxValidator); + } + + /** Gets assignable version of property's validator. */ + wxValidator* GetValidator() const + { + if ( m_validator ) + return m_validator; + return DoGetValidator(); + } +#endif // wxUSE_VALIDATORS + + /** Returns client data (void*) of a property. + */ + void* GetClientData() const + { + return m_clientData; + } + + /** Sets client data (void*) of a property. + @remarks + This untyped client data has to be deleted manually. + */ + void SetClientData( void* clientData ) + { + m_clientData = clientData; + } + + /** Returns client object of a property. + */ + void SetClientObject(wxClientData* clientObject) + { + delete m_clientObject; + m_clientObject = clientObject; + } + + /** Sets managed client object of a property. + */ + wxClientData *GetClientObject() const { return m_clientObject; } + + /** + Sets new set of choices for the property. + + @remarks This operation deselects the property and clears its + value. + */ + bool SetChoices( const wxPGChoices& choices ); + + /** Set max length of text in text editor. + */ + inline bool SetMaxLength( int maxLen ); + + /** Call with 'false' in OnSetValue to cancel value changes after all + (ie. cancel 'true' returned by StringToValue() or IntToValue()). + */ + void SetWasModified( bool set = true ) + { + if ( set ) m_flags |= wxPG_PROP_WAS_MODIFIED; + else m_flags &= ~wxPG_PROP_WAS_MODIFIED; + } + + const wxString& GetHelpString() const + { + return m_helpString; + } + + // Use, for example, to detect if item is inside collapsed section. + bool IsSomeParent( wxPGProperty* candidate_parent ) const; + + /** + Adapts list variant into proper value using consecutive + ChildChanged-calls. + */ + void AdaptListToValue( wxVariant& list, wxVariant* value ) const; + +#if wxPG_COMPATIBILITY_1_4 + /** + Adds a private child property. + + @deprecated Use AddPrivateChild() instead. + + @see AddPrivateChild() + */ + wxDEPRECATED( void AddChild( wxPGProperty* prop ) ); +#endif + + /** + Adds a private child property. If you use this instead of + wxPropertyGridInterface::Insert() or + wxPropertyGridInterface::AppendIn(), then property's parental + type will automatically be set up to wxPG_PROP_AGGREGATE. In other + words, all properties of this property will become private. + */ + void AddPrivateChild( wxPGProperty* prop ); + + /** + Appends a new child property. + */ + wxPGProperty* AppendChild( wxPGProperty* prop ) + { + return InsertChild(-1, prop); + } + + /** Returns height of children, recursively, and + by taking expanded/collapsed status into account. + + iMax is used when finding property y-positions. + */ + int GetChildrenHeight( int lh, int iMax = -1 ) const; + + /** Returns number of child properties */ + unsigned int GetChildCount() const + { + return (unsigned int) m_children.size(); + } + + /** Returns sub-property at index i. */ + wxPGProperty* Item( unsigned int i ) const + { return m_children[i]; } + + /** Returns last sub-property. + */ + wxPGProperty* Last() const { return m_children.back(); } + + /** Returns index of given child property. */ + int Index( const wxPGProperty* p ) const; + + // Puts correct indexes to children + void FixIndicesOfChildren( unsigned int starthere = 0 ); + + /** + Converts image width into full image offset, with margins. + */ + int GetImageOffset( int imageWidth ) const; + + // Returns wxPropertyGridPageState in which this property resides. + wxPropertyGridPageState* GetParentState() const { return m_parentState; } + + wxPGProperty* GetItemAtY( unsigned int y, + unsigned int lh, + unsigned int* nextItemY ) const; + + /** Returns property at given virtual y coordinate. + */ + wxPGProperty* GetItemAtY( unsigned int y ) const; + + /** Returns (direct) child property with given name (or NULL if not found). + */ + wxPGProperty* GetPropertyByName( const wxString& name ) const; + + // Returns various display-related information for given column + void GetDisplayInfo( unsigned int column, + int choiceIndex, + int flags, + wxString* pString, + const wxPGCell** pCell ); + + static wxString* sm_wxPG_LABEL; + + /** This member is public so scripting language bindings + wrapper code can access it freely. + */ + void* m_clientData; + +protected: + + /** + Sets property cell in fashion that reduces number of exclusive + copies of cell data. Used when setting, for instance, same + background colour for a number of properties. + + @param firstCol + First column to affect. + + @param lastCol + Last column to affect. + + @param preparedCell + Pre-prepared cell that is used for those which cell data + before this matched unmodCellData. + + @param srcData + If unmodCellData did not match, valid cell data from this + is merged into cell (usually generating new exclusive copy + of cell's data). + + @param unmodCellData + If cell's cell data matches this, its cell is now set to + preparedCell. + + @param ignoreWithFlags + Properties with any one of these flags are skipped. + + @param recursively + If @true, apply this operation recursively in child properties. + */ + void AdaptiveSetCell( unsigned int firstCol, + unsigned int lastCol, + const wxPGCell& preparedCell, + const wxPGCell& srcData, + wxPGCellData* unmodCellData, + FlagType ignoreWithFlags, + bool recursively ); + + /** + Makes sure m_cells has size of column+1 (or more). + */ + void EnsureCells( unsigned int column ); + + /** Returns (direct) child property with given name (or NULL if not found), + with hint index. + + @param hintIndex + Start looking for the child at this index. + + @remarks + Does not support scope (ie. Parent.Child notation). + */ + wxPGProperty* GetPropertyByNameWH( const wxString& name, + unsigned int hintIndex ) const; + + /** This is used by Insert etc. */ + void DoAddChild( wxPGProperty* prop, + int index = -1, + bool correct_mode = true ); + + void DoGenerateComposedValue( wxString& text, + int argFlags = wxPG_VALUE_IS_CURRENT, + const wxVariantList* valueOverrides = NULL, + wxPGHashMapS2S* childResults = NULL ) const; + + bool DoHide( bool hide, int flags ); + + void DoSetName(const wxString& str) { m_name = str; } + + /** Deletes all sub-properties. */ + void Empty(); + + bool HasCell( unsigned int column ) const + { + if ( m_cells.size() > column ) + return true; + return false; + } + + void InitAfterAdded( wxPropertyGridPageState* pageState, + wxPropertyGrid* propgrid ); + + /** + Returns true if child property is selected. + */ + bool IsChildSelected( bool recursive = false ) const; + + // Removes child property with given pointer. Does not delete it. + void RemoveChild( wxPGProperty* p ); + + void DoEnable( bool enable ); + + void DoPreAddChild( int index, wxPGProperty* prop ); + + void SetParentState( wxPropertyGridPageState* pstate ) + { m_parentState = pstate; } + + void SetFlag( wxPGPropertyFlags flag ) + { + // + // NB: While using wxPGPropertyFlags here makes it difficult to + // combine different flags, it usefully prevents user from + // using incorrect flags (say, wxWindow styles). + m_flags |= flag; + } + + void ClearFlag( FlagType flag ) { m_flags &= ~(flag); } + + // Called when the property is being removed from the grid and/or + // page state (but *not* when it is also deleted). + void OnDetached(wxPropertyGridPageState* state, + wxPropertyGrid* propgrid); + + // Call after fixed sub-properties added/removed after creation. + // if oldSelInd >= 0 and < new max items, then selection is + // moved to it. + void SubPropsChanged( int oldSelInd = -1 ); + + int GetY2( int lh ) const; + + wxString m_label; + wxString m_name; + wxPGProperty* m_parent; + wxPropertyGridPageState* m_parentState; + + wxClientData* m_clientObject; + + // Overrides editor returned by property class + const wxPGEditor* m_customEditor; +#if wxUSE_VALIDATORS + // Editor is going to get this validator + wxValidator* m_validator; +#endif + // Show this in front of the value + // + // TODO: Can bitmap be implemented with wxPGCell? + wxBitmap* m_valueBitmap; + + wxVariant m_value; + wxPGAttributeStorage m_attributes; + wxArrayPGProperty m_children; + + // Extended cell information + wxVector<wxPGCell> m_cells; + + // Choices shown in drop-down list of editor control. + wxPGChoices m_choices; + + // Help shown in statusbar or help box. + wxString m_helpString; + + // Index in parent's property array. + unsigned int m_arrIndex; + + // If not -1, then overrides m_value + int m_commonValue; + + FlagType m_flags; + + // Maximum length (mainly for string properties). Could be in some sort of + // wxBaseStringProperty, but currently, for maximum flexibility and + // compatibility, we'll stick it here. Anyway, we had 3 excess bytes to use + // so short int will fit in just fine. + short m_maxLen; + + // Root has 0, categories etc. at that level 1, etc. + unsigned char m_depth; + + // m_depthBgCol indicates width of background colour between margin and item + // (essentially this is category's depth, if none then equals m_depth). + unsigned char m_depthBgCol; + +private: + // Called in constructors. + void Init(); + void Init( const wxString& label, const wxString& name ); +}; + +// ----------------------------------------------------------------------- + +// +// Property class declaration helper macros +// (wxPGRootPropertyClass and wxPropertyCategory require this). +// + +#define WX_PG_DECLARE_DOGETEDITORCLASS \ + virtual const wxPGEditor* DoGetEditorClass() const; + +#ifndef WX_PG_DECLARE_PROPERTY_CLASS + #define WX_PG_DECLARE_PROPERTY_CLASS(CLASSNAME) \ + public: \ + DECLARE_DYNAMIC_CLASS(CLASSNAME) \ + WX_PG_DECLARE_DOGETEDITORCLASS \ + private: +#endif + +// Implements sans constructor function. Also, first arg is class name, not +// property name. +#define WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(PROPNAME,T,EDITOR) \ +const wxPGEditor* PROPNAME::DoGetEditorClass() const \ +{ \ + return wxPGEditor_##EDITOR; \ +} + +// ----------------------------------------------------------------------- + +/** @class wxPGRootProperty + @ingroup classes + Root parent property. +*/ +class WXDLLIMPEXP_PROPGRID wxPGRootProperty : public wxPGProperty +{ +public: + WX_PG_DECLARE_PROPERTY_CLASS(wxPGRootProperty) +public: + + /** Constructor. */ + wxPGRootProperty( const wxString& name = wxS("<Root>") ); + virtual ~wxPGRootProperty(); + + virtual bool StringToValue( wxVariant&, const wxString&, int ) const + { + return false; + } + +protected: +}; + +// ----------------------------------------------------------------------- + +/** @class wxPropertyCategory + @ingroup classes + Category (caption) property. +*/ +class WXDLLIMPEXP_PROPGRID wxPropertyCategory : public wxPGProperty +{ + friend class wxPropertyGrid; + friend class wxPropertyGridPageState; + WX_PG_DECLARE_PROPERTY_CLASS(wxPropertyCategory) +public: + + /** Default constructor is only used in special cases. */ + wxPropertyCategory(); + + wxPropertyCategory( const wxString& label, + const wxString& name = wxPG_LABEL ); + ~wxPropertyCategory(); + + int GetTextExtent( const wxWindow* wnd, const wxFont& font ) const; + + virtual wxString ValueToString( wxVariant& value, int argFlags ) const; + virtual wxString GetValueAsString( int argFlags = 0 ) const; + +protected: + void SetTextColIndex( unsigned int colInd ) + { m_capFgColIndex = (wxByte) colInd; } + unsigned int GetTextColIndex() const + { return (unsigned int) m_capFgColIndex; } + + void CalculateTextExtent( wxWindow* wnd, const wxFont& font ); + + int m_textExtent; // pre-calculated length of text + wxByte m_capFgColIndex; // caption text colour index + +private: + void Init(); +}; + +// ----------------------------------------------------------------------- + +#endif // wxUSE_PROPGRID + +#endif // _WX_PROPGRID_PROPERTY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgrid.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgrid.h new file mode 100644 index 0000000000..9b12b2eb71 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgrid.h @@ -0,0 +1,2698 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/propgrid/propgrid.h +// Purpose: wxPropertyGrid +// Author: Jaakko Salli +// Modified by: +// Created: 2004-09-25 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROPGRID_PROPGRID_H_ +#define _WX_PROPGRID_PROPGRID_H_ + +#include "wx/defs.h" + +#if wxUSE_PROPGRID + +#include "wx/thread.h" +#include "wx/dcclient.h" +#include "wx/control.h" +#include "wx/scrolwin.h" +#include "wx/tooltip.h" +#include "wx/datetime.h" +#include "wx/recguard.h" + +#include "wx/propgrid/property.h" +#include "wx/propgrid/propgridiface.h" + + +#ifndef SWIG +extern WXDLLIMPEXP_DATA_PROPGRID(const char) wxPropertyGridNameStr[]; +#endif + +class wxPGComboBox; + +#if wxUSE_STATUSBAR +class WXDLLIMPEXP_FWD_CORE wxStatusBar; +#endif + +// ----------------------------------------------------------------------- +// Global variables +// ----------------------------------------------------------------------- + +// This is required for sharing common global variables. +class WXDLLIMPEXP_PROPGRID wxPGGlobalVarsClass +{ +public: + + wxPGGlobalVarsClass(); + ~wxPGGlobalVarsClass(); + +#if wxUSE_THREADS + // Critical section for handling the globals. Generally it is not needed + // since GUI code is supposed to be in single thread. However, + // we do want the user to be able to convey wxPropertyGridEvents to other + // threads. + wxCriticalSection m_critSect; +#endif + + // Used by advprops, but here to make things easier. + wxString m_pDefaultImageWildcard; + + // Map of editor class instances (keys are name string). + wxPGHashMapS2P m_mapEditorClasses; + +#if wxUSE_VALIDATORS + wxVector<wxValidator*> m_arrValidators; // These wxValidators need to be freed +#endif + + wxPGHashMapS2P m_dictPropertyClassInfo; // PropertyName -> ClassInfo + + wxPGChoices* m_fontFamilyChoices; + + // Replace with your own to affect all properties using default renderer. + wxPGCellRenderer* m_defaultRenderer; + + wxPGChoices m_boolChoices; + + wxVariant m_vEmptyString; + wxVariant m_vZero; + wxVariant m_vMinusOne; + wxVariant m_vTrue; + wxVariant m_vFalse; + + // Cached constant strings + wxPGCachedString m_strstring; + wxPGCachedString m_strlong; + wxPGCachedString m_strbool; + wxPGCachedString m_strlist; + + wxPGCachedString m_strDefaultValue; + wxPGCachedString m_strMin; + wxPGCachedString m_strMax; + wxPGCachedString m_strUnits; + wxPGCachedString m_strHint; +#if wxPG_COMPATIBILITY_1_4 + wxPGCachedString m_strInlineHelp; +#endif + + // If true then some things are automatically translated + bool m_autoGetTranslation; + + // > 0 if errors cannot or should not be shown in statusbar etc. + int m_offline; + + int m_extraStyle; // global extra style + + int m_warnings; + + int HasExtraStyle( int style ) const { return (m_extraStyle & style); } +}; + +extern WXDLLIMPEXP_DATA_PROPGRID(wxPGGlobalVarsClass*) wxPGGlobalVars; + +#define wxPGVariant_EmptyString (wxPGGlobalVars->m_vEmptyString) +#define wxPGVariant_Zero (wxPGGlobalVars->m_vZero) +#define wxPGVariant_MinusOne (wxPGGlobalVars->m_vMinusOne) +#define wxPGVariant_True (wxPGGlobalVars->m_vTrue) +#define wxPGVariant_False (wxPGGlobalVars->m_vFalse) + +#define wxPGVariant_Bool(A) (A?wxPGVariant_True:wxPGVariant_False) + +// When wxPG is loaded dynamically after the application is already running +// then the built-in module system won't pick this one up. Add it manually. +WXDLLIMPEXP_PROPGRID void wxPGInitResourceModule(); + +// ----------------------------------------------------------------------- + +/** @section propgrid_window_styles wxPropertyGrid Window Styles + + SetWindowStyleFlag method can be used to modify some of these at run-time. + @{ +*/ +enum wxPG_WINDOW_STYLES +{ + +/** This will cause Sort() automatically after an item is added. + When inserting a lot of items in this mode, it may make sense to + use Freeze() before operations and Thaw() afterwards to increase + performance. +*/ +wxPG_AUTO_SORT = 0x00000010, + +/** Categories are not initially shown (even if added). + IMPORTANT NOTE: If you do not plan to use categories, then this + style will waste resources. + This flag can also be changed using wxPropertyGrid::EnableCategories method. +*/ +wxPG_HIDE_CATEGORIES = 0x00000020, + +/* This style combines non-categoric mode and automatic sorting. +*/ +wxPG_ALPHABETIC_MODE = (wxPG_HIDE_CATEGORIES|wxPG_AUTO_SORT), + +/** Modified values are shown in bold font. Changing this requires Refresh() + to show changes. +*/ +wxPG_BOLD_MODIFIED = 0x00000040, + +/** Using this style, the column splitters move automatically based on column + proportions (default is equal proportion for every column). This behaviour + stops once the user manually moves a splitter, and returns when a + splitter is double-clicked. + + @see wxPropertyGridInterface::SetColumnProportion(). +*/ +wxPG_SPLITTER_AUTO_CENTER = 0x00000080, + +/** Display tooltips for cell text that cannot be shown completely. If + wxUSE_TOOLTIPS is 0, then this doesn't have any effect. +*/ +wxPG_TOOLTIPS = 0x00000100, + +/** Disables margin and hides all expand/collapse buttons that would appear + outside the margin (for sub-properties). Toggling this style automatically + expands all collapsed items. +*/ +wxPG_HIDE_MARGIN = 0x00000200, + +/** This style prevents user from moving the splitter. +*/ +wxPG_STATIC_SPLITTER = 0x00000400, + +/** Combination of other styles that make it impossible for user to modify + the layout. +*/ +wxPG_STATIC_LAYOUT = (wxPG_HIDE_MARGIN|wxPG_STATIC_SPLITTER), + +/** Disables wxTextCtrl based editors for properties which + can be edited in another way. + + Equals calling wxPropertyGrid::LimitPropertyEditing for all added + properties. +*/ +wxPG_LIMITED_EDITING = 0x00000800, + +/** wxPropertyGridManager only: Show toolbar for mode and page selection. */ +wxPG_TOOLBAR = 0x00001000, + +/** wxPropertyGridManager only: Show adjustable text box showing description + or help text, if available, for currently selected property. +*/ +wxPG_DESCRIPTION = 0x00002000, + +/** wxPropertyGridManager only: don't show an internal border around the + property grid. Recommended if you use a header. +*/ +wxPG_NO_INTERNAL_BORDER = 0x00004000 +}; + +#if wxPG_COMPATIBILITY_1_4 + // In wxPG 1.4 this was used to enable now-default theme border support + // in wxPropertyGridManager. + #define wxPG_THEME_BORDER 0x00000000 +#endif + + +enum wxPG_EX_WINDOW_STYLES +{ + +/** + NOTE: wxPG_EX_xxx are extra window styles and must be set using + SetExtraStyle() member function. + + Speeds up switching to wxPG_HIDE_CATEGORIES mode. Initially, if + wxPG_HIDE_CATEGORIES is not defined, the non-categorized data storage is + not activated, and switching the mode first time becomes somewhat slower. + wxPG_EX_INIT_NOCAT activates the non-categorized data storage right away. + IMPORTANT NOTE: If you do plan not switching to non-categoric mode, or if + you don't plan to use categories at all, then using this style will result + in waste of resources. + +*/ +wxPG_EX_INIT_NOCAT = 0x00001000, + +/** Extended window style that sets wxPropertyGridManager toolbar to not + use flat style. +*/ +wxPG_EX_NO_FLAT_TOOLBAR = 0x00002000, + +/** Shows alphabetic/categoric mode buttons from toolbar. +*/ +wxPG_EX_MODE_BUTTONS = 0x00008000, + +/** Show property help strings as tool tips instead as text on the status bar. + You can set the help strings using SetPropertyHelpString member function. +*/ +wxPG_EX_HELP_AS_TOOLTIPS = 0x00010000, + +/** Prevent TAB from focusing to wxButtons. This behaviour was default + in version 1.2.0 and earlier. + NOTE! Tabbing to button doesn't work yet. Problem seems to be that on wxMSW + atleast the button doesn't properly propagate key events (yes, I'm using + wxWANTS_CHARS). +*/ +//wxPG_EX_NO_TAB_TO_BUTTON = 0x00020000, + +/** Allows relying on native double-buffering. +*/ +wxPG_EX_NATIVE_DOUBLE_BUFFERING = 0x00080000, + +/** Set this style to let user have ability to set values of properties to + unspecified state. Same as setting wxPG_PROP_AUTO_UNSPECIFIED for + all properties. +*/ +wxPG_EX_AUTO_UNSPECIFIED_VALUES = 0x00200000, + +/** + If this style is used, built-in attributes (such as wxPG_FLOAT_PRECISION + and wxPG_STRING_PASSWORD) are not stored into property's attribute storage + (thus they are not readable). + + Note that this option is global, and applies to all wxPG property + containers. +*/ +wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES = 0x00400000, + +/** Hides page selection buttons from toolbar. +*/ +wxPG_EX_HIDE_PAGE_BUTTONS = 0x01000000, + +/** Allows multiple properties to be selected by user (by pressing SHIFT + when clicking on a property, or by dragging with left mouse button + down). + + You can get array of selected properties with + wxPropertyGridInterface::GetSelectedProperties(). In multiple selection + mode wxPropertyGridInterface::GetSelection() returns + property which has editor active (usually the first one + selected). Other useful member functions are ClearSelection(), + AddToSelection() and RemoveFromSelection(). +*/ +wxPG_EX_MULTIPLE_SELECTION = 0x02000000, + +/** + This enables top-level window tracking which allows wxPropertyGrid to + notify the application of last-minute property value changes by user. + + This style is not enabled by default because it may cause crashes when + wxPropertyGrid is used in with wxAUI or similar system. + + @remarks If you are not in fact using any system that may change + wxPropertyGrid's top-level parent window on its own, then you + are recommended to enable this style. +*/ +wxPG_EX_ENABLE_TLP_TRACKING = 0x04000000, + +/** Don't show divider above toolbar, on Windows. +*/ +wxPG_EX_NO_TOOLBAR_DIVIDER = 0x08000000, + +/** Show a separator below the toolbar. +*/ +wxPG_EX_TOOLBAR_SEPARATOR = 0x10000000 + +}; + +#if wxPG_COMPATIBILITY_1_4 + #define wxPG_EX_DISABLE_TLP_TRACKING 0x00000000 +#endif + +/** Combines various styles. +*/ +#define wxPG_DEFAULT_STYLE (0) + +/** Combines various styles. +*/ +#define wxPGMAN_DEFAULT_STYLE (0) + +/** @} +*/ + +// ----------------------------------------------------------------------- + +// +// Ids for sub-controls +// NB: It should not matter what these are. +#define wxPG_SUBID1 2 +#define wxPG_SUBID2 3 +#define wxPG_SUBID_TEMP1 4 + +// ----------------------------------------------------------------------- + +/** @class wxPGCommonValue + + wxPropertyGrid stores information about common values in these + records. + + NB: Common value feature is not complete, and thus not mentioned in + documentation. +*/ +class WXDLLIMPEXP_PROPGRID wxPGCommonValue +{ +public: + + wxPGCommonValue( const wxString& label, wxPGCellRenderer* renderer ) + { + m_label = label; + m_renderer = renderer; + renderer->IncRef(); + } + virtual ~wxPGCommonValue() + { + m_renderer->DecRef(); + } + + virtual wxString GetEditableText() const { return m_label; } + const wxString& GetLabel() const { return m_label; } + wxPGCellRenderer* GetRenderer() const { return m_renderer; } + +protected: + wxString m_label; + wxPGCellRenderer* m_renderer; +}; + +// ----------------------------------------------------------------------- + +/** @section propgrid_vfbflags wxPropertyGrid Validation Failure behaviour Flags + @{ +*/ + +enum wxPG_VALIDATION_FAILURE_BEHAVIOR_FLAGS +{ + +/** Prevents user from leaving property unless value is valid. If this + behaviour flag is not used, then value change is instead cancelled. +*/ +wxPG_VFB_STAY_IN_PROPERTY = 0x01, + +/** Calls wxBell() on validation failure. +*/ +wxPG_VFB_BEEP = 0x02, + +/** Cell with invalid value will be marked (with red colour). +*/ +wxPG_VFB_MARK_CELL = 0x04, + +/** + Display a text message explaining the situation. + + To customize the way the message is displayed, you need to + reimplement wxPropertyGrid::DoShowPropertyError() in a + derived class. Default behaviour is to display the text on + the top-level frame's status bar, if present, and otherwise + using wxMessageBox. +*/ +wxPG_VFB_SHOW_MESSAGE = 0x08, + +/** + Similar to wxPG_VFB_SHOW_MESSAGE, except always displays the + message using wxMessageBox. +*/ +wxPG_VFB_SHOW_MESSAGEBOX = 0x10, + +/** + Similar to wxPG_VFB_SHOW_MESSAGE, except always displays the + message on the status bar (when present - you can reimplement + wxPropertyGrid::GetStatusBar() in a derived class to specify + this yourself). +*/ +wxPG_VFB_SHOW_MESSAGE_ON_STATUSBAR = 0x20, + +/** Defaults. */ +wxPG_VFB_DEFAULT = wxPG_VFB_MARK_CELL | + wxPG_VFB_SHOW_MESSAGEBOX, + +/** Only used internally. */ +wxPG_VFB_UNDEFINED = 0x80 + +}; + +/** @} +*/ + +// Having this as define instead of wxByte typedef makes things easier for +// wxPython bindings (ignoring and redefining it in SWIG interface file +// seemed rather tricky) +#define wxPGVFBFlags unsigned char + +/** + wxPGValidationInfo + + Used to convey validation information to and from functions that + actually perform validation. Mostly used in custom property + classes. +*/ +class WXDLLIMPEXP_PROPGRID wxPGValidationInfo +{ + friend class wxPropertyGrid; +public: + wxPGValidationInfo() + { + m_failureBehavior = 0; + m_isFailing = false; + } + + ~wxPGValidationInfo() + { + } + + /** + @return Returns failure behaviour which is a combination of + @ref propgrid_vfbflags. + */ + wxPGVFBFlags GetFailureBehavior() const + { return m_failureBehavior; } + + /** + Returns current failure message. + */ + const wxString& GetFailureMessage() const + { return m_failureMessage; } + + /** + Returns reference to pending value. + */ + wxVariant& GetValue() + { + wxASSERT(m_pValue); + return *m_pValue; + } + + /** Set validation failure behaviour + + @param failureBehavior + Mixture of @ref propgrid_vfbflags. + */ + void SetFailureBehavior(wxPGVFBFlags failureBehavior) + { m_failureBehavior = failureBehavior; } + + /** + Set current failure message. + */ + void SetFailureMessage(const wxString& message) + { m_failureMessage = message; } + +private: + /** Value to be validated. + */ + wxVariant* m_pValue; + + /** Message displayed on validation failure. + */ + wxString m_failureMessage; + + /** Validation failure behaviour. Use wxPG_VFB_XXX flags. + */ + wxPGVFBFlags m_failureBehavior; + + // True when validation is currently failing. + bool m_isFailing; +}; + +// ----------------------------------------------------------------------- + +/** @section propgrid_pgactions wxPropertyGrid Action Identifiers + + These are used with wxPropertyGrid::AddActionTrigger() and + wxPropertyGrid::ClearActionTriggers(). + @{ +*/ + +enum wxPG_KEYBOARD_ACTIONS +{ + wxPG_ACTION_INVALID = 0, + + /** Select the next property. */ + wxPG_ACTION_NEXT_PROPERTY, + + /** Select the previous property. */ + wxPG_ACTION_PREV_PROPERTY, + + /** Expand the selected property, if it has child items. */ + wxPG_ACTION_EXPAND_PROPERTY, + + /** Collapse the selected property, if it has child items. */ + wxPG_ACTION_COLLAPSE_PROPERTY, + + /** Cancel and undo any editing done in the currently active property + editor. + */ + wxPG_ACTION_CANCEL_EDIT, + + /** Move focus to the editor control of the currently selected + property. + */ + wxPG_ACTION_EDIT, + + /** Causes editor's button (if any) to be pressed. */ + wxPG_ACTION_PRESS_BUTTON, + + wxPG_ACTION_MAX +}; + +/** @} +*/ + +// ----------------------------------------------------------------------- + + +// wxPropertyGrid::DoSelectProperty flags (selFlags) + +// Focuses to created editor +#define wxPG_SEL_FOCUS 0x0001 +// Forces deletion and recreation of editor +#define wxPG_SEL_FORCE 0x0002 +// For example, doesn't cause EnsureVisible +#define wxPG_SEL_NONVISIBLE 0x0004 +// Do not validate editor's value before selecting +#define wxPG_SEL_NOVALIDATE 0x0008 +// Property being deselected is about to be deleted +#define wxPG_SEL_DELETING 0x0010 +// Property's values was set to unspecified by the user +#define wxPG_SEL_SETUNSPEC 0x0020 +// Property's event handler changed the value +#define wxPG_SEL_DIALOGVAL 0x0040 +// Set to disable sending of wxEVT_PG_SELECTED event +#define wxPG_SEL_DONT_SEND_EVENT 0x0080 +// Don't make any graphics updates +#define wxPG_SEL_NO_REFRESH 0x0100 + +// ----------------------------------------------------------------------- + +// DoSetSplitterPosition() flags + +enum wxPG_SET_SPLITTER_POSITION_SPLITTER_FLAGS +{ + wxPG_SPLITTER_REFRESH = 0x0001, + wxPG_SPLITTER_ALL_PAGES = 0x0002, + wxPG_SPLITTER_FROM_EVENT = 0x0004, + wxPG_SPLITTER_FROM_AUTO_CENTER = 0x0008 +}; + + +// ----------------------------------------------------------------------- + +// Internal flags +#define wxPG_FL_INITIALIZED 0x0001 +// Set when creating editor controls if it was clicked on. +#define wxPG_FL_ACTIVATION_BY_CLICK 0x0002 +#define wxPG_FL_DONT_CENTER_SPLITTER 0x0004 +#define wxPG_FL_FOCUSED 0x0008 +#define wxPG_FL_MOUSE_CAPTURED 0x0010 +#define wxPG_FL_MOUSE_INSIDE 0x0020 +#define wxPG_FL_VALUE_MODIFIED 0x0040 +// don't clear background of m_wndEditor +#define wxPG_FL_PRIMARY_FILLS_ENTIRE 0x0080 +// currently active editor uses custom image +#define wxPG_FL_CUR_USES_CUSTOM_IMAGE 0x0100 +// cell colours override selection colours for selected cell +#define wxPG_FL_CELL_OVERRIDES_SEL 0x0200 +#define wxPG_FL_SCROLLED 0x0400 +// set when all added/inserted properties get hideable flag +#define wxPG_FL_ADDING_HIDEABLES 0x0800 +// Disables showing help strings on statusbar. +#define wxPG_FL_NOSTATUSBARHELP 0x1000 +// Marks that we created the state, so we have to destroy it too. +#define wxPG_FL_CREATEDSTATE 0x2000 +// Set if scrollbar's existence was detected in last onresize. +#define wxPG_FL_SCROLLBAR_DETECTED 0x4000 +// Set if wxPGMan requires redrawing of description text box. +#define wxPG_FL_DESC_REFRESH_REQUIRED 0x8000 +// Set if contained in wxPropertyGridManager +#define wxPG_FL_IN_MANAGER 0x00020000 +// Set after wxPropertyGrid is shown in its initial good size +#define wxPG_FL_GOOD_SIZE_SET 0x00040000 +// Set when in SelectProperty. +#define wxPG_FL_IN_SELECT_PROPERTY 0x00100000 +// Set when help string is shown in status bar +#define wxPG_FL_STRING_IN_STATUSBAR 0x00200000 +// Auto sort is enabled (for categorized mode) +#define wxPG_FL_CATMODE_AUTO_SORT 0x01000000 +// Set after page has been inserted to manager +#define wxPG_MAN_FL_PAGE_INSERTED 0x02000000 +// Active editor control is abnormally large +#define wxPG_FL_ABNORMAL_EDITOR 0x04000000 +// Recursion guard for HandleCustomEditorEvent +#define wxPG_FL_IN_HANDLECUSTOMEDITOREVENT 0x08000000 +#define wxPG_FL_VALUE_CHANGE_IN_EVENT 0x10000000 +// Editor control width should not change on resize +#define wxPG_FL_FIXED_WIDTH_EDITOR 0x20000000 +// Width of panel can be different than width of grid +#define wxPG_FL_HAS_VIRTUAL_WIDTH 0x40000000 +// Prevents RecalculateVirtualSize re-entrancy +#define wxPG_FL_RECALCULATING_VIRTUAL_SIZE 0x80000000 + +#if !defined(__wxPG_SOURCE_FILE__) + // Reduce compile time, but still include in user app + #include "wx/propgrid/props.h" +#endif + +// ----------------------------------------------------------------------- + +/** @class wxPropertyGrid + + wxPropertyGrid is a specialized grid for editing properties + such as strings, numbers, flagsets, fonts, and colours. wxPropertySheet + used to do the very same thing, but it hasn't been updated for a while + and it is currently deprecated. + + Please note that most member functions are inherited and as such not + documented on this page. This means you will probably also want to read + wxPropertyGridInterface class reference. + + See also @ref overview_propgrid. + + @section propgrid_window_styles_ Window Styles + + See @ref propgrid_window_styles. + + @section propgrid_event_handling Event Handling + + To process input from a propertygrid control, use these event handler + macros to direct input to member functions that take a wxPropertyGridEvent + argument. + + @beginEventTable{wxPropertyGridEvent} + @event{EVT_PG_SELECTED (id, func)} + Respond to wxEVT_PG_SELECTED event, generated when a property selection + has been changed, either by user action or by indirect program + function. For instance, collapsing a parent property programmatically + causes any selected child property to become unselected, and may + therefore cause this event to be generated. + @event{EVT_PG_CHANGING(id, func)} + Respond to wxEVT_PG_CHANGING event, generated when property value + is about to be changed by user. Use wxPropertyGridEvent::GetValue() + to take a peek at the pending value, and wxPropertyGridEvent::Veto() + to prevent change from taking place, if necessary. + @event{EVT_PG_HIGHLIGHTED(id, func)} + Respond to wxEVT_PG_HIGHLIGHTED event, which occurs when mouse + moves over a property. Event's property is NULL if hovered area does + not belong to any property. + @event{EVT_PG_RIGHT_CLICK(id, func)} + Respond to wxEVT_PG_RIGHT_CLICK event, which occurs when property is + clicked on with right mouse button. + @event{EVT_PG_DOUBLE_CLICK(id, func)} + Respond to wxEVT_PG_DOUBLE_CLICK event, which occurs when property is + double-clicked onwith left mouse button. + @event{EVT_PG_ITEM_COLLAPSED(id, func)} + Respond to wxEVT_PG_ITEM_COLLAPSED event, generated when user collapses + a property or category.. + @event{EVT_PG_ITEM_EXPANDED(id, func)} + Respond to wxEVT_PG_ITEM_EXPANDED event, generated when user expands + a property or category.. + @event{EVT_PG_LABEL_EDIT_BEGIN(id, func)} + Respond to wxEVT_PG_LABEL_EDIT_BEGIN event, generated when is about to + begin editing a property label. You can veto this event to prevent the + action. + @event{EVT_PG_LABEL_EDIT_ENDING(id, func)} + Respond to wxEVT_PG_LABEL_EDIT_ENDING event, generated when is about to + end editing of a property label. You can veto this event to prevent the + action. + @event{EVT_PG_COL_BEGIN_DRAG(id, func)} + Respond to wxEVT_PG_COL_BEGIN_DRAG event, generated when user + starts resizing a column - can be vetoed. + @event{EVT_PG_COL_DRAGGING,(id, func)} + Respond to wxEVT_PG_COL_DRAGGING, event, generated when a + column resize by user is in progress. This event is also generated + when user double-clicks the splitter in order to recenter + it. + @event{EVT_PG_COL_END_DRAG(id, func)} + Respond to wxEVT_PG_COL_END_DRAG event, generated after column + resize by user has finished. + @endEventTable + + @remarks + + - Use Freeze() and Thaw() respectively to disable and enable drawing. This + will also delay sorting etc. miscellaneous calculations to the last + possible moment. + + @library{wxpropgrid} + @category{propgrid} +*/ +class WXDLLIMPEXP_PROPGRID wxPropertyGrid : public wxControl, + public wxScrollHelper, + public wxPropertyGridInterface +{ + friend class wxPropertyGridEvent; + friend class wxPropertyGridPageState; + friend class wxPropertyGridInterface; + friend class wxPropertyGridManager; + friend class wxPGHeaderCtrl; + + DECLARE_DYNAMIC_CLASS(wxPropertyGrid) +public: + +#ifndef SWIG + /** + Two step constructor. + + Call Create when this constructor is called to build up the + wxPropertyGrid + */ + wxPropertyGrid(); +#endif + + /** The default constructor. The styles to be used are styles valid for + the wxWindow. + + @see @link wndflags Additional Window Styles @endlink + */ + wxPropertyGrid( wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxPG_DEFAULT_STYLE, + const wxString& name = wxPropertyGridNameStr ); + + /** Destructor */ + virtual ~wxPropertyGrid(); + + /** Adds given key combination to trigger given action. + + Here is a sample code to make Enter key press move focus to + the next property. + + @code + propGrid->AddActionTrigger(wxPG_ACTION_NEXT_PROPERTY, + WXK_RETURN); + propGrid->DedicateKey(WXK_RETURN); + @endcode + + @param action + Which action to trigger. See @ref propgrid_keyboard_actions. + @param keycode + Which keycode triggers the action. + @param modifiers + Which key event modifiers, in addition to keycode, are needed to + trigger the action. + */ + void AddActionTrigger( int action, int keycode, int modifiers = 0 ); + + /** + Dedicates a specific keycode to wxPropertyGrid. This means that such + key presses will not be redirected to editor controls. + + Using this function allows, for example, navigation between + properties using arrow keys even when the focus is in the editor + control. + */ + void DedicateKey( int keycode ) + { + m_dedicatedKeys.push_back(keycode); + } + + /** + This static function enables or disables automatic use of + wxGetTranslation for following strings: wxEnumProperty list labels, + wxFlagsProperty sub-property labels. + + Default is false. + */ + static void AutoGetTranslation( bool enable ); + + /** + Changes value of a property, as if from an editor. + + Use this instead of SetPropertyValue() if you need the value to run + through validation process, and also send the property change event. + + @return + Returns true if value was successfully changed. + */ + bool ChangePropertyValue( wxPGPropArg id, wxVariant newValue ); + + /** + Centers the splitter. + + @param enableAutoResizing + If @true, automatic column resizing is enabled (only applicapple + if window style wxPG_SPLITTER_AUTO_CENTER is used). + */ + void CenterSplitter( bool enableAutoResizing = false ); + + /** Deletes all properties. + */ + virtual void Clear(); + + /** Clears action triggers for given action. + @param action + Which action to trigger. See @link pgactions List of list of + wxPropertyGrid actions@endlink. + */ + void ClearActionTriggers( int action ); + + /** Forces updating the value of property from the editor control. + + Note that wxEVT_PG_CHANGING and wxEVT_PG_CHANGED are dispatched using + ProcessEvent, meaning your event handlers will be called immediately. + + @return + Returns true if anything was changed. + */ + virtual bool CommitChangesFromEditor( wxUint32 flags = 0 ); + + /** + Two step creation. + + Whenever the control is created without any parameters, use Create to + actually create it. Don't access the control's public methods before + this is called @see @link wndflags Additional Window Styles@endlink + */ + bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxPG_DEFAULT_STYLE, + const wxString& name = wxPropertyGridNameStr ); + + /** + Call when editor widget's contents is modified. + + For example, this is called when changes text in wxTextCtrl (used in + wxStringProperty and wxIntProperty). + + @remarks + This function should only be called by custom properties. + + @see wxPGProperty::OnEvent() + */ + void EditorsValueWasModified() { m_iFlags |= wxPG_FL_VALUE_MODIFIED; } + + /** Reverse of EditorsValueWasModified(). + + @remarks + This function should only be called by custom properties. + */ + void EditorsValueWasNotModified() + { + m_iFlags &= ~(wxPG_FL_VALUE_MODIFIED); + } + + /** + Enables or disables (shows/hides) categories according to parameter + enable. + */ + bool EnableCategories( bool enable ); + + /** Scrolls and/or expands items to ensure that the given item is visible. + Returns true if something was actually done. + */ + bool EnsureVisible( wxPGPropArg id ); + + /** + Reduces column sizes to minimum possible that contents are still + visibly (naturally some margin space will be applied as well). + + @return + Minimum size for the grid to still display everything. + + @remarks + Does not work well with wxPG_SPLITTER_AUTO_CENTER window style. + + This function only works properly if grid size prior to call was already + fairly large. + + Note that you can also get calculated column widths by calling + GetState->GetColumnWidth() immediately after this function returns. + */ + wxSize FitColumns() + { + wxSize sz = m_pState->DoFitColumns(); + return sz; + } + + /** + Returns wxWindow that the properties are painted on, and which should + be used as the parent for editor controls. + */ + wxWindow* GetPanel() + { + return this; + } + + /** Returns current category caption background colour. */ + wxColour GetCaptionBackgroundColour() const { return m_colCapBack; } + + wxFont& GetCaptionFont() { return m_captionFont; } + + const wxFont& GetCaptionFont() const { return m_captionFont; } + + /** Returns current category caption text colour. */ + wxColour GetCaptionForegroundColour() const { return m_colCapFore; } + + /** Returns current cell background colour. */ + wxColour GetCellBackgroundColour() const { return m_colPropBack; } + + /** Returns current cell text colour when disabled. */ + wxColour GetCellDisabledTextColour() const { return m_colDisPropFore; } + + /** Returns current cell text colour. */ + wxColour GetCellTextColour() const { return m_colPropFore; } + + /** + Returns number of columns currently on grid. + */ + unsigned int GetColumnCount() const + { + return (unsigned int) m_pState->m_colWidths.size(); + } + + /** Returns colour of empty space below properties. */ + wxColour GetEmptySpaceColour() const { return m_colEmptySpace; } + + /** Returns height of highest characters of used font. */ + int GetFontHeight() const { return m_fontHeight; } + + /** Returns pointer to itself. Dummy function that enables same kind + of code to use wxPropertyGrid and wxPropertyGridManager. + */ + wxPropertyGrid* GetGrid() { return this; } + + /** Returns rectangle of custom paint image. + */ + wxRect GetImageRect( wxPGProperty* p, int item ) const; + + /** Returns size of the custom paint image in front of property. + If no argument is given, returns preferred size. + */ + wxSize GetImageSize( wxPGProperty* p = NULL, int item = -1 ) const; + + //@{ + /** Returns last item which could be iterated using given flags. + @param flags + See @ref propgrid_iterator_flags. + */ + wxPGProperty* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ) + { + return m_pState->GetLastItem(flags); + } + + const wxPGProperty* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ) const + { + return m_pState->GetLastItem(flags); + } + //@} + + /** Returns colour of lines between cells. */ + wxColour GetLineColour() const { return m_colLine; } + + /** Returns background colour of margin. */ + wxColour GetMarginColour() const { return m_colMargin; } + + /** Returns margin width. */ + int GetMarginWidth() const { return m_marginWidth; } + + /** + Returns most up-to-date value of selected property. This will return + value different from GetSelectedProperty()->GetValue() only when text + editor is activate and string edited by user represents valid, + uncommitted property value. + */ + wxVariant GetUncommittedPropertyValue(); + + /** Returns "root property". It does not have name, etc. and it is not + visible. It is only useful for accessing its children. + */ + wxPGProperty* GetRoot() const { return m_pState->m_properties; } + + /** Returns height of a single grid row (in pixels). */ + int GetRowHeight() const { return m_lineHeight; } + + /** Returns currently selected property. */ + wxPGProperty* GetSelectedProperty() const { return GetSelection(); } + + /** Returns current selection background colour. */ + wxColour GetSelectionBackgroundColour() const { return m_colSelBack; } + + /** Returns current selection text colour. */ + wxColour GetSelectionForegroundColour() const { return m_colSelFore; } + + /** + Returns current splitter x position. + */ + int GetSplitterPosition( unsigned int splitterIndex = 0 ) const + { + return m_pState->DoGetSplitterPosition(splitterIndex); + } + + /** Returns wxTextCtrl active in currently selected property, if any. Takes + into account wxOwnerDrawnComboBox. + */ + wxTextCtrl* GetEditorTextCtrl() const; + + wxPGValidationInfo& GetValidationInfo() + { + return m_validationInfo; + } + + /** Returns current vertical spacing. */ + int GetVerticalSpacing() const { return (int)m_vspacing; } + + /** + Returns @true if a property editor control has focus. + */ + bool IsEditorFocused() const; + + /** Returns true if editor's value was marked modified. + */ + bool IsEditorsValueModified() const + { return ( m_iFlags & wxPG_FL_VALUE_MODIFIED ) ? true : false; } + + /** + Returns information about arbitrary position in the grid. + + @param pt + Coordinates in the virtual grid space. You may need to use + wxScrolled<T>::CalcScrolledPosition() for translating + wxPropertyGrid client coordinates into something this member + function can use. + */ + wxPropertyGridHitTestResult HitTest( const wxPoint& pt ) const; + + /** Returns true if any property has been modified by the user. */ + bool IsAnyModified() const { return (m_pState->m_anyModified>0); } + + /** + Returns true if updating is frozen (ie Freeze() called but not yet + Thaw() ). + */ + bool IsFrozen() const { return (m_frozen>0)?true:false; } + + /** + It is recommended that you call this function any time your code causes + wxPropertyGrid's top-level parent to change. wxPropertyGrid's OnIdle() + handler should be able to detect most changes, but it is not perfect. + + @param newTLP + New top-level parent that is about to be set. Old top-level parent + window should still exist as the current one. + + @remarks This function is automatically called from wxPropertyGrid:: + Reparent() and wxPropertyGridManager::Reparent(). You only + need to use it if you reparent wxPropertyGrid indirectly. + */ + void OnTLPChanging( wxWindow* newTLP ); + + /** Redraws given property. + */ + virtual void RefreshProperty( wxPGProperty* p ); + + /** Registers a new editor class. + @return + Pointer to the editor class instance that should be used. + */ + static wxPGEditor* RegisterEditorClass( wxPGEditor* editor, + bool noDefCheck = false ) + { + return DoRegisterEditorClass(editor, wxEmptyString, noDefCheck); + } + + static wxPGEditor* DoRegisterEditorClass( wxPGEditor* editorClass, + const wxString& editorName, + bool noDefCheck = false ); + + /** Resets all colours to the original system values. + */ + void ResetColours(); + + /** + Resets column sizes and splitter positions, based on proportions. + + @param enableAutoResizing + If @true, automatic column resizing is enabled (only applicapple + if window style wxPG_SPLITTER_AUTO_CENTER is used). + + @see wxPropertyGridInterface::SetColumnProportion() + */ + void ResetColumnSizes( bool enableAutoResizing = false ); + + /** + Selects a property. + Editor widget is automatically created, but not focused unless focus is + true. + + @param id + Property to select. + + @return + True if selection finished successfully. Usually only fails if + current value in editor is not valid. + + @remarks In wxPropertyGrid 1.4, this member function used to generate + wxEVT_PG_SELECTED. In wxWidgets 2.9 and later, it no longer + does that. + + @remarks This clears any previous selection. + */ + bool SelectProperty( wxPGPropArg id, bool focus = false ); + + /** + Set entire new selection from given list of properties. + */ + void SetSelection( const wxArrayPGProperty& newSelection ) + { + DoSetSelection( newSelection, wxPG_SEL_DONT_SEND_EVENT ); + } + + /** + Adds given property into selection. If wxPG_EX_MULTIPLE_SELECTION + extra style is not used, then this has same effect as + calling SelectProperty(). + + @remarks Multiple selection is not supported for categories. This + means that if you have properties selected, you cannot + add category to selection, and also if you have category + selected, you cannot add other properties to selection. + This member function will fail silently in these cases, + even returning true. + */ + bool AddToSelection( wxPGPropArg id ) + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) + return DoAddToSelection(p, wxPG_SEL_DONT_SEND_EVENT); + } + + /** + Removes given property from selection. If property is not selected, + an assertion failure will occur. + */ + bool RemoveFromSelection( wxPGPropArg id ) + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) + return DoRemoveFromSelection(p, wxPG_SEL_DONT_SEND_EVENT); + } + + /** + Makes given column editable by user. + + @param editable + Using @false here will disable column from being editable. + */ + void MakeColumnEditable( unsigned int column, bool editable = true ); + + /** + Creates label editor wxTextCtrl for given column, for property + that is currently selected. When multiple selection is + enabled, this applies to whatever property GetSelection() + returns. + + @param colIndex + Which column's label to edit. Note that you should not + use value 1, which is reserved for property value + column. + + @see EndLabelEdit(), MakeColumnEditable() + */ + void BeginLabelEdit( unsigned int column = 0 ) + { + DoBeginLabelEdit(column, wxPG_SEL_DONT_SEND_EVENT); + } + + /** + Destroys label editor wxTextCtrl, if any. + + @param commit + Use @true (default) to store edited label text in + property cell data. + + @see BeginLabelEdit(), MakeColumnEditable() + */ + void EndLabelEdit( bool commit = true ) + { + DoEndLabelEdit(commit, wxPG_SEL_DONT_SEND_EVENT); + } + + /** + Returns currently active label editor, NULL if none. + */ + wxTextCtrl* GetLabelEditor() const + { + return m_labelEditor; + } + + /** Sets category caption background colour. */ + void SetCaptionBackgroundColour(const wxColour& col); + + /** Sets category caption text colour. */ + void SetCaptionTextColour(const wxColour& col); + + /** Sets default cell background colour - applies to property cells. + Note that appearance of editor widgets may not be affected. + */ + void SetCellBackgroundColour(const wxColour& col); + + /** Sets cell text colour for disabled properties. + */ + void SetCellDisabledTextColour(const wxColour& col); + + /** Sets default cell text colour - applies to property name and value text. + Note that appearance of editor widgets may not be affected. + */ + void SetCellTextColour(const wxColour& col); + + /** Set number of columns (2 or more). + */ + void SetColumnCount( int colCount ) + { + m_pState->SetColumnCount(colCount); + Refresh(); + } + + /** + Sets the 'current' category - Append will add non-category properties + under it. + */ + void SetCurrentCategory( wxPGPropArg id ) + { + wxPG_PROP_ARG_CALL_PROLOG() + wxPropertyCategory* pc = wxDynamicCast(p, wxPropertyCategory); + wxASSERT(pc); + m_pState->m_currentCategory = pc; + } + + /** Sets colour of empty space below properties. */ + void SetEmptySpaceColour(const wxColour& col); + + /** Sets colour of lines between cells. */ + void SetLineColour(const wxColour& col); + + /** Sets background colour of margin. */ + void SetMarginColour(const wxColour& col); + + /** + Sets selection background colour - applies to selected property name + background. + */ + void SetSelectionBackgroundColour(const wxColour& col); + + /** + Sets selection foreground colour - applies to selected property name + text. + */ + void SetSelectionTextColour(const wxColour& col); + + /** Sets x coordinate of the splitter. + @remarks + Splitter position cannot exceed grid size, and therefore setting it + during form creation may fail as initial grid size is often smaller + than desired splitter position, especially when sizers are being used. + */ + void SetSplitterPosition( int newXPos, int col = 0 ) + { + DoSetSplitterPosition(newXPos, col, wxPG_SPLITTER_REFRESH); + } + + /** + Sets the property sorting function. + + @param sortFunction + The sorting function to be used. It should return a value greater + than 0 if position of p1 is after p2. So, for instance, when + comparing property names, you can use following implementation: + + @code + int MyPropertySortFunction(wxPropertyGrid* propGrid, + wxPGProperty* p1, + wxPGProperty* p2) + { + return p1->GetBaseName().compare( p2->GetBaseName() ); + } + @endcode + + @remarks + Default property sort function sorts properties by their labels + (case-insensitively). + + @see GetSortFunction, wxPropertyGridInterface::Sort, + wxPropertyGridInterface::SortChildren + */ + void SetSortFunction( wxPGSortCallback sortFunction ) + { + m_sortFunction = sortFunction; + } + + /** + Returns the property sort function (default is @NULL). + + @see SetSortFunction + */ + wxPGSortCallback GetSortFunction() const + { + return m_sortFunction; + } + + /** + Sets appearance of value cells representing an unspecified property + value. Default appearance is blank. + + @remarks If you set the unspecified value to have any + textual representation, then that will override + "InlineHelp" attribute. + + @see wxPGProperty::SetValueToUnspecified(), + wxPGProperty::IsValueUnspecified() + */ + void SetUnspecifiedValueAppearance( const wxPGCell& cell ) + { + m_unspecifiedAppearance = m_propertyDefaultCell; + m_unspecifiedAppearance.MergeFrom(cell); + } + + /** + Returns current appearance of unspecified value cells. + + @see SetUnspecifiedValueAppearance() + */ + const wxPGCell& GetUnspecifiedValueAppearance() const + { + return m_unspecifiedAppearance; + } + + /** + Returns (visual) text representation of the unspecified + property value. + + @param argFlags For internal use only. + */ + wxString GetUnspecifiedValueText( int argFlags = 0 ) const; + + /** Set virtual width for this particular page. Width -1 indicates that the + virtual width should be disabled. */ + void SetVirtualWidth( int width ); + + /** + Moves splitter as left as possible, while still allowing all + labels to be shown in full. + + @param privateChildrenToo + If @false, will still allow private children to be cropped. + */ + void SetSplitterLeft( bool privateChildrenToo = false ) + { + m_pState->SetSplitterLeft(privateChildrenToo); + } + + /** Sets vertical spacing. Can be 1, 2, or 3 - a value relative to font + height. Value of 2 should be default on most platforms. + */ + void SetVerticalSpacing( int vspacing ) + { + m_vspacing = (unsigned char)vspacing; + CalculateFontAndBitmapStuff( vspacing ); + if ( !m_pState->m_itemsAdded ) Refresh(); + } + + /** Shows an brief error message that is related to a property. */ + void ShowPropertyError( wxPGPropArg id, const wxString& msg ) + { + wxPG_PROP_ARG_CALL_PROLOG() + DoShowPropertyError(p, msg); + } + + ///////////////////////////////////////////////////////////////// + // + // Following methods do not need to be (currently) documented + // + ///////////////////////////////////////////////////////////////// + + bool HasVirtualWidth() const + { return (m_iFlags & wxPG_FL_HAS_VIRTUAL_WIDTH) ? true : false; } + + const wxPGCommonValue* GetCommonValue( unsigned int i ) const + { + return (wxPGCommonValue*) m_commonValues[i]; + } + + /** Returns number of common values. + */ + unsigned int GetCommonValueCount() const + { + return (unsigned int) m_commonValues.size(); + } + + /** Returns label of given common value. + */ + wxString GetCommonValueLabel( unsigned int i ) const + { + wxASSERT( GetCommonValue(i) ); + return GetCommonValue(i)->GetLabel(); + } + + /** + Returns index of common value that will truly change value to + unspecified. + */ + int GetUnspecifiedCommonValue() const { return m_cvUnspecified; } + + /** Set index of common value that will truly change value to unspecified. + Using -1 will set none to have such effect. + Default is 0. + */ + void SetUnspecifiedCommonValue( int index ) { m_cvUnspecified = index; } + + /** + Shortcut for creating dialog-caller button. Used, for example, by + wxFontProperty. + @remarks + This should only be called by properties. + */ + wxWindow* GenerateEditorButton( const wxPoint& pos, const wxSize& sz ); + + /** Fixes position of wxTextCtrl-like control (wxSpinCtrl usually + fits as one). Call after control has been created (but before + shown). + */ + void FixPosForTextCtrl( wxWindow* ctrl, + unsigned int forColumn = 1, + const wxPoint& offset = wxPoint(0, 0) ); + + /** Shortcut for creating text editor widget. + @param pos + Same as pos given for CreateEditor. + @param sz + Same as sz given for CreateEditor. + @param value + Initial text for wxTextCtrl. + @param secondary + If right-side control, such as button, also created, then create it + first and pass it as this parameter. + @param extraStyle + Extra style flags to pass for wxTextCtrl. + @remarks + Note that this should generally be called only by new classes derived + from wxPGProperty. + */ + wxWindow* GenerateEditorTextCtrl( const wxPoint& pos, + const wxSize& sz, + const wxString& value, + wxWindow* secondary, + int extraStyle = 0, + int maxLen = 0, + unsigned int forColumn = 1 ); + + /* Generates both textctrl and button. + */ + wxWindow* GenerateEditorTextCtrlAndButton( const wxPoint& pos, + const wxSize& sz, wxWindow** psecondary, int limited_editing, + wxPGProperty* property ); + + /** Generates position for a widget editor dialog box. + @param p + Property for which dialog is positioned. + @param sz + Known or over-approximated size of the dialog. + @return + Position for dialog. + */ + wxPoint GetGoodEditorDialogPosition( wxPGProperty* p, + const wxSize& sz ); + + // Converts escape sequences in src_str to newlines, + // tabs, etc. and copies result to dst_str. + static wxString& ExpandEscapeSequences( wxString& dst_str, + wxString& src_str ); + + // Converts newlines, tabs, etc. in src_str to escape + // sequences, and copies result to dst_str. + static wxString& CreateEscapeSequences( wxString& dst_str, + wxString& src_str ); + + /** + Returns rectangle that fully contains properties between and including + p1 and p2. Rectangle is in virtual scrolled window coordinates. + */ + wxRect GetPropertyRect( const wxPGProperty* p1, + const wxPGProperty* p2 ) const; + + /** Returns pointer to current active primary editor control (NULL if none). + */ + wxWindow* GetEditorControl() const; + + wxWindow* GetPrimaryEditor() const + { + return GetEditorControl(); + } + + /** + Returns pointer to current active secondary editor control (NULL if + none). + */ + wxWindow* GetEditorControlSecondary() const + { + return m_wndEditor2; + } + + /** + Refreshes any active editor control. + */ + void RefreshEditor(); + + // Events from editor controls are forward to this function + bool HandleCustomEditorEvent( wxEvent &event ); + + // Mostly useful for page switching. + void SwitchState( wxPropertyGridPageState* pNewState ); + + long GetInternalFlags() const { return m_iFlags; } + bool HasInternalFlag( long flag ) const + { return (m_iFlags & flag) ? true : false; } + void SetInternalFlag( long flag ) { m_iFlags |= flag; } + void ClearInternalFlag( long flag ) { m_iFlags &= ~(flag); } + void IncFrozen() { m_frozen++; } + void DecFrozen() { m_frozen--; } + + void OnComboItemPaint( const wxPGComboBox* pCb, + int item, + wxDC* pDc, + wxRect& rect, + int flags ); + + /** Standardized double-to-string conversion. + */ + static const wxString& DoubleToString( wxString& target, + double value, + int precision, + bool removeZeroes, + wxString* precTemplate = NULL ); + + /** + Call this from wxPGProperty::OnEvent() to cause property value to be + changed after the function returns (with true as return value). + ValueChangeInEvent() must be used if you wish the application to be + able to use wxEVT_PG_CHANGING to potentially veto the given value. + */ + void ValueChangeInEvent( wxVariant variant ) + { + m_changeInEventValue = variant; + m_iFlags |= wxPG_FL_VALUE_CHANGE_IN_EVENT; + } + + /** + You can use this member function, for instance, to detect in + wxPGProperty::OnEvent() if wxPGProperty::SetValueInEvent() was + already called in wxPGEditor::OnEvent(). It really only detects + if was value was changed using wxPGProperty::SetValueInEvent(), which + is usually used when a 'picker' dialog is displayed. If value was + written by "normal means" in wxPGProperty::StringToValue() or + IntToValue(), then this function will return false (on the other hand, + wxPGProperty::OnEvent() is not even called in those cases). + */ + bool WasValueChangedInEvent() const + { + return (m_iFlags & wxPG_FL_VALUE_CHANGE_IN_EVENT) ? true : false; + } + + /** Returns true if given event is from first of an array of buttons + (as can be in case when wxPGMultiButton is used). + */ + bool IsMainButtonEvent( const wxEvent& event ) + { + return (event.GetEventType() == wxEVT_BUTTON) + && (m_wndSecId == event.GetId()); + } + + /** Pending value is expected to be passed in PerformValidation(). + */ + virtual bool DoPropertyChanged( wxPGProperty* p, + unsigned int selFlags = 0 ); + + /** Called when validation for given property fails. + @param invalidValue + Value which failed in validation. + @return + Return true if user is allowed to change to another property even + if current has invalid value. + @remarks + To add your own validation failure behaviour, override + wxPropertyGrid::DoOnValidationFailure(). + */ + bool OnValidationFailure( wxPGProperty* property, + wxVariant& invalidValue ); + + /** Called to indicate property and editor has valid value now. + */ + void OnValidationFailureReset( wxPGProperty* property ) + { + if ( property && property->HasFlag(wxPG_PROP_INVALID_VALUE) ) + { + DoOnValidationFailureReset(property); + property->ClearFlag(wxPG_PROP_INVALID_VALUE); + } + m_validationInfo.m_failureMessage.clear(); + } + + /** + Override in derived class to display error messages in custom manner + (these message usually only result from validation failure). + + @remarks If you implement this, then you also need to implement + DoHidePropertyError() - possibly to do nothing, if error + does not need hiding (e.g. it was logged or shown in a + message box). + + @see DoHidePropertyError() + */ + virtual void DoShowPropertyError( wxPGProperty* property, + const wxString& msg ); + + /** + Override in derived class to hide an error displayed by + DoShowPropertyError(). + + @see DoShowPropertyError() + */ + virtual void DoHidePropertyError( wxPGProperty* property ); + +#if wxUSE_STATUSBAR + /** + Return wxStatusBar that is used by this wxPropertyGrid. You can + reimplement this member function in derived class to override + the default behaviour of using the top-level wxFrame's status + bar, if any. + */ + virtual wxStatusBar* GetStatusBar(); +#endif + + /** Override to customize property validation failure behaviour. + @param invalidValue + Value which failed in validation. + @return + Return true if user is allowed to change to another property even + if current has invalid value. + */ + virtual bool DoOnValidationFailure( wxPGProperty* property, + wxVariant& invalidValue ); + + /** Override to customize resetting of property validation failure status. + @remarks + Property is guaranteed to have flag wxPG_PROP_INVALID_VALUE set. + */ + virtual void DoOnValidationFailureReset( wxPGProperty* property ); + + int GetSpacingY() const { return m_spacingy; } + + /** + Must be called in wxPGEditor::CreateControls() if primary editor window + is wxTextCtrl, just before textctrl is created. + @param text + Initial text value of created wxTextCtrl. + */ + void SetupTextCtrlValue( const wxString text ) { m_prevTcValue = text; } + + /** + Unfocuses or closes editor if one was open, but does not deselect + property. + */ + bool UnfocusEditor(); + + virtual void SetWindowStyleFlag( long style ); + + void DrawItems( const wxPGProperty* p1, const wxPGProperty* p2 ); + + void DrawItem( wxPGProperty* p ) + { + DrawItems(p,p); + } + + virtual void DrawItemAndChildren( wxPGProperty* p ); + + /** + Draws item, children, and consequtive parents as long as category is + not met. + */ + void DrawItemAndValueRelated( wxPGProperty* p ); + +protected: + + /** + wxPropertyGridPageState used by the grid is created here. + + If grid is used in wxPropertyGridManager, there is no point overriding + this - instead, set custom wxPropertyGridPage classes. + */ + virtual wxPropertyGridPageState* CreateState() const; + + enum PerformValidationFlags + { + SendEvtChanging = 0x0001, + IsStandaloneValidation = 0x0002 // Not called in response to event + }; + + /** + Runs all validation functionality (includes sending wxEVT_PG_CHANGING). + Returns true if all tests passed. Implement in derived class to + add additional validation behaviour. + */ + virtual bool PerformValidation( wxPGProperty* p, + wxVariant& pendingValue, + int flags = SendEvtChanging ); + +public: + + // Control font changer helper. + void SetCurControlBoldFont(); + + wxPGCell& GetPropertyDefaultCell() + { + return m_propertyDefaultCell; + } + + wxPGCell& GetCategoryDefaultCell() + { + return m_categoryDefaultCell; + } + + // + // Public methods for semi-public use + // + bool DoSelectProperty( wxPGProperty* p, unsigned int flags = 0 ); + + // Overridden functions. + virtual bool Destroy(); + // Returns property at given y coordinate (relative to grid's top left). + wxPGProperty* GetItemAtY( int y ) const { return DoGetItemAtY(y); } + + virtual void Refresh( bool eraseBackground = true, + const wxRect *rect = (const wxRect *) NULL ); + virtual bool SetFont( const wxFont& font ); + virtual void Freeze(); + virtual void SetExtraStyle( long exStyle ); + virtual void Thaw(); + virtual bool Reparent( wxWindowBase *newParent ); + +protected: + virtual wxSize DoGetBestSize() const; + +#ifndef wxPG_ICON_WIDTH + wxBitmap *m_expandbmp, *m_collbmp; +#endif + + wxCursor *m_cursorSizeWE; + + /** wxWindow pointers to editor control(s). */ + wxWindow *m_wndEditor; + wxWindow *m_wndEditor2; + + wxBitmap *m_doubleBuffer; + + /** Local time ms when control was created. */ + wxLongLong m_timeCreated; + + /** wxPGProperty::OnEvent can change value by setting this. */ + wxVariant m_changeInEventValue; + + /** Id of m_wndEditor2, or its first child, if any. */ + int m_wndSecId; + + /** Extra Y spacing between the items. */ + int m_spacingy; + + /** Control client area width; updated on resize. */ + int m_width; + + /** Control client area height; updated on resize. */ + int m_height; + + /** Current non-client width (needed when auto-centering). */ + int m_ncWidth; + + /** Non-client width (auto-centering helper). */ + //int m_fWidth; + + /** Previously recorded scroll start position. */ + int m_prevVY; + + /** + The gutter spacing in front and back of the image. + This determines the amount of spacing in front of each item + */ + int m_gutterWidth; + + /** Includes separator line. */ + int m_lineHeight; + + /** Gutter*2 + image width. */ + int m_marginWidth; + + // y spacing for expand/collapse button. + int m_buttonSpacingY; + + /** Extra margin for expanded sub-group items. */ + int m_subgroup_extramargin; + + /** + The image width of the [+] icon. + + This is also calculated in the gutter + */ + int m_iconWidth; + +#ifndef wxPG_ICON_WIDTH + + /** + The image height of the [+] icon. + + This is calculated as minimal size and to align + */ + int m_iconHeight; +#endif + + /** Current cursor id. */ + int m_curcursor; + + // Caption font. Same as normal font plus bold style. + wxFont m_captionFont; + + int m_fontHeight; // Height of the font. + + /** m_splitterx when drag began. */ + int m_startingSplitterX; + + /** + Index to splitter currently being dragged (0=one after the first + column). + */ + int m_draggedSplitter; + + /** Changed property, calculated in PerformValidation(). */ + wxPGProperty* m_chgInfo_changedProperty; + + /** + Lowest property for which editing happened, but which does not have + aggregate parent + */ + wxPGProperty* m_chgInfo_baseChangedProperty; + + /** Changed property value, calculated in PerformValidation(). */ + wxVariant m_chgInfo_pendingValue; + + /** Passed to SetValue. */ + wxVariant m_chgInfo_valueList; + + /** Validation information. */ + wxPGValidationInfo m_validationInfo; + + /** Actions and keys that trigger them. */ + wxPGHashMapI2I m_actionTriggers; + + /** Appearance of currently active editor. */ + wxPGCell m_editorAppearance; + + /** Appearance of a unspecified value cell. */ + wxPGCell m_unspecifiedAppearance; + + /** List of properties to be deleted/removed in idle event handler. */ + wxArrayPGProperty m_deletedProperties; + wxArrayPGProperty m_removedProperties; + + /** List of key codes that will not be handed over to editor controls. */ + // FIXME: Make this a hash set once there is template-based wxHashSet. + wxVector<int> m_dedicatedKeys; + + // + // Temporary values + // + + /** Bits are used to indicate which colours are customized. */ + unsigned short m_coloursCustomized; + + /** x - m_splitterx. */ + signed char m_dragOffset; + + /** 0 = not dragging, 1 = drag just started, 2 = drag in progress */ + unsigned char m_dragStatus; + + /** 0 = margin, 1 = label, 2 = value. */ + unsigned char m_mouseSide; + + /** True when editor control is focused. */ + unsigned char m_editorFocused; + + /** 1 if m_latsCaption is also the bottommost caption. */ + //unsigned char m_lastCaptionBottomnest; + + /** Set to 1 when graphics frozen. */ + unsigned char m_frozen; + + unsigned char m_vspacing; + + // Used to track when Alt/Ctrl+Key was consumed. + unsigned char m_keyComboConsumed; + + /** 1 if in DoPropertyChanged() */ + bool m_inDoPropertyChanged; + + /** 1 if in CommitChangesFromEditor() */ + bool m_inCommitChangesFromEditor; + + /** 1 if in DoSelectProperty() */ + bool m_inDoSelectProperty; + + bool m_inOnValidationFailure; + + wxPGVFBFlags m_permanentValidationFailureBehavior; // Set by app + + // DoEditorValidate() recursion guard + wxRecursionGuardFlag m_validatingEditor; + + /** Internal flags - see wxPG_FL_XXX constants. */ + wxUint32 m_iFlags; + + /** When drawing next time, clear this many item slots at the end. */ + int m_clearThisMany; + + // Mouse is hovering over this column (index) + unsigned int m_colHover; + + // pointer to property that has mouse hovering + wxPGProperty* m_propHover; + + // Active label editor + wxTextCtrl* m_labelEditor; + + // For which property the label editor is active + wxPGProperty* m_labelEditorProperty; + + // EventObject for wxPropertyGridEvents + wxWindow* m_eventObject; + + // What (global) window is currently focused (needed to resolve event + // handling mess). + wxWindow* m_curFocused; + + // Event currently being sent - NULL if none at the moment + wxPropertyGridEvent* m_processedEvent; + + // Last known top-level parent + wxWindow* m_tlp; + + // Last closed top-level parent + wxWindow* m_tlpClosed; + + // Local time ms when tlp was closed. + wxLongLong m_tlpClosedTime; + + // Sort function + wxPGSortCallback m_sortFunction; + + // y coordinate of property that mouse hovering + int m_propHoverY; + + // Which column's editor is selected (usually 1)? + unsigned int m_selColumn; + + // x relative to splitter (needed for resize). + int m_ctrlXAdjust; + + // lines between cells + wxColour m_colLine; + // property labels and values are written in this colour + wxColour m_colPropFore; + // or with this colour when disabled + wxColour m_colDisPropFore; + // background for m_colPropFore + wxColour m_colPropBack; + // text color for captions + wxColour m_colCapFore; + // background color for captions + wxColour m_colCapBack; + // foreground for selected property + wxColour m_colSelFore; + // background for selected property (actually use background color when + // control out-of-focus) + wxColour m_colSelBack; + // background colour for margin + wxColour m_colMargin; + // background colour for empty space below the grid + wxColour m_colEmptySpace; + + // Default property colours + wxPGCell m_propertyDefaultCell; + + // Default property category + wxPGCell m_categoryDefaultCell; + + // Backup of selected property's cells + wxVector<wxPGCell> m_propCellsBackup; + + // NB: These *cannot* be moved to globals. + + // labels when properties use common values + wxVector<wxPGCommonValue*> m_commonValues; + + // array of live events + wxVector<wxPropertyGridEvent*> m_liveEvents; + + // Which cv selection really sets value to unspecified? + int m_cvUnspecified; + + // Used to skip excess text editor events + wxString m_prevTcValue; + +protected: + + // Sets some members to defaults (called constructors). + void Init1(); + + // Initializes some members (called by Create and complex constructor). + void Init2(); + + void OnPaint(wxPaintEvent &event ); + + // main event receivers + void OnMouseMove( wxMouseEvent &event ); + void OnMouseClick( wxMouseEvent &event ); + void OnMouseRightClick( wxMouseEvent &event ); + void OnMouseDoubleClick( wxMouseEvent &event ); + void OnMouseUp( wxMouseEvent &event ); + void OnKey( wxKeyEvent &event ); + void OnResize( wxSizeEvent &event ); + + // event handlers + bool HandleMouseMove( int x, unsigned int y, wxMouseEvent &event ); + bool HandleMouseClick( int x, unsigned int y, wxMouseEvent &event ); + bool HandleMouseRightClick( int x, unsigned int y, wxMouseEvent &event ); + bool HandleMouseDoubleClick( int x, unsigned int y, wxMouseEvent &event ); + bool HandleMouseUp( int x, unsigned int y, wxMouseEvent &event ); + void HandleKeyEvent( wxKeyEvent &event, bool fromChild ); + + void OnMouseEntry( wxMouseEvent &event ); + + void OnIdle( wxIdleEvent &event ); + void OnFocusEvent( wxFocusEvent &event ); + void OnChildFocusEvent( wxChildFocusEvent& event ); + + bool OnMouseCommon( wxMouseEvent &event, int* px, int *py ); + bool OnMouseChildCommon( wxMouseEvent &event, int* px, int *py ); + + // sub-control event handlers + void OnMouseClickChild( wxMouseEvent &event ); + void OnMouseRightClickChild( wxMouseEvent &event ); + void OnMouseMoveChild( wxMouseEvent &event ); + void OnMouseUpChild( wxMouseEvent &event ); + void OnChildKeyDown( wxKeyEvent &event ); + + void OnCaptureChange( wxMouseCaptureChangedEvent &event ); + + void OnScrollEvent( wxScrollWinEvent &event ); + + void OnSysColourChanged( wxSysColourChangedEvent &event ); + + void OnTLPClose( wxCloseEvent& event ); + +protected: + + bool AddToSelectionFromInputEvent( wxPGProperty* prop, + unsigned int colIndex, + wxMouseEvent* event = NULL, + int selFlags = 0 ); + + /** + Adjust the centering of the bitmap icons (collapse / expand) when the + caption font changes. + + They need to be centered in the middle of the font, so a bit of deltaY + adjustment is needed. On entry, m_captionFont must be set to window + font. It will be modified properly. + */ + void CalculateFontAndBitmapStuff( int vspacing ); + + wxRect GetEditorWidgetRect( wxPGProperty* p, int column ) const; + + void CorrectEditorWidgetSizeX(); + + /** Called in RecalculateVirtualSize() to reposition control + on virtual height changes. + */ + void CorrectEditorWidgetPosY(); + + int DoDrawItems( wxDC& dc, + const wxRect* itemsRect, + bool isBuffered ) const; + + /** Draws an expand/collapse (ie. +/-) button. + */ + virtual void DrawExpanderButton( wxDC& dc, const wxRect& rect, + wxPGProperty* property ) const; + + /** Draws items from topitemy to bottomitemy */ + void DrawItems( wxDC& dc, + unsigned int topItemY, + unsigned int bottomItemY, + const wxRect* itemsRect = NULL ); + + // Translate wxKeyEvent to wxPG_ACTION_XXX + int KeyEventToActions(wxKeyEvent &event, int* pSecond) const; + + int KeyEventToAction(wxKeyEvent &event) const + { + return KeyEventToActions(event, NULL); + } + + void ImprovedClientToScreen( int* px, int* py ); + + // Called by focus event handlers. newFocused is the window that becomes + // focused. + void HandleFocusChange( wxWindow* newFocused ); + + /** Reloads all non-customized colours from system settings. */ + void RegainColours(); + + virtual bool DoEditorValidate(); + + // Similar to DoSelectProperty() but also works on columns + // other than 1. Does not active editor if column is not + // editable. + bool DoSelectAndEdit( wxPGProperty* prop, + unsigned int colIndex, + unsigned int selFlags ); + + void DoSetSelection( const wxArrayPGProperty& newSelection, + int selFlags = 0 ); + + void DoSetSplitterPosition( int newxpos, + int splitterIndex = 0, + int flags = wxPG_SPLITTER_REFRESH ); + + bool DoAddToSelection( wxPGProperty* prop, + int selFlags = 0 ); + + bool DoRemoveFromSelection( wxPGProperty* prop, + int selFlags = 0 ); + + void DoBeginLabelEdit( unsigned int colIndex, int selFlags = 0 ); + void DoEndLabelEdit( bool commit, int selFlags = 0 ); + void OnLabelEditorEnterPress( wxCommandEvent& event ); + void OnLabelEditorKeyPress( wxKeyEvent& event ); + + wxPGProperty* DoGetItemAtY( int y ) const; + + void DestroyEditorWnd( wxWindow* wnd ); + void FreeEditors(); + + virtual bool DoExpand( wxPGProperty* p, bool sendEvent = false ); + + virtual bool DoCollapse( wxPGProperty* p, bool sendEvent = false ); + + // Returns nearest paint visible property (such that will be painted unless + // window is scrolled or resized). If given property is paint visible, then + // it itself will be returned. + wxPGProperty* GetNearestPaintVisible( wxPGProperty* p ) const; + + static void RegisterDefaultEditors(); + + // Sets up basic event handling for child control + void SetupChildEventHandling( wxWindow* wnd ); + + void CustomSetCursor( int type, bool override = false ); + + /** + Repositions scrollbar and underlying panel according to changed virtual + size. + */ + void RecalculateVirtualSize( int forceXPos = -1 ); + + void SetEditorAppearance( const wxPGCell& cell, + bool unspecified = false ); + + void ResetEditorAppearance() + { + wxPGCell cell; + cell.SetEmptyData(); + SetEditorAppearance(cell, false); + } + + void PrepareAfterItemsAdded(); + + /** + Send event from the property grid. + + Omit the wxPG_SEL_NOVALIDATE flag to allow vetoing the event + */ + bool SendEvent( int eventType, wxPGProperty* p, + wxVariant* pValue = NULL, + unsigned int selFlags = wxPG_SEL_NOVALIDATE, + unsigned int column = 1 ); + + // This function only moves focus to the wxPropertyGrid if it already + // was on one of its child controls. + void SetFocusOnCanvas(); + + bool DoHideProperty( wxPGProperty* p, bool hide, int flags ); + +private: + + bool ButtonTriggerKeyTest( int action, wxKeyEvent& event ); + + DECLARE_EVENT_TABLE() +}; + +// ----------------------------------------------------------------------- +// +// Bunch of inlines that need to resolved after all classes have been defined. +// + +inline bool wxPropertyGridPageState::IsDisplayed() const +{ + return ( this == m_pPropGrid->GetState() ); +} + +inline unsigned int wxPropertyGridPageState::GetActualVirtualHeight() const +{ + return DoGetRoot()->GetChildrenHeight(GetGrid()->GetRowHeight()); +} + +inline wxString wxPGProperty::GetHintText() const +{ + wxVariant vHintText = GetAttribute(wxPGGlobalVars->m_strHint); + +#if wxPG_COMPATIBILITY_1_4 + // Try the old, deprecated "InlineHelp" + if ( vHintText.IsNull() ) + vHintText = GetAttribute(wxPGGlobalVars->m_strInlineHelp); +#endif + + if ( !vHintText.IsNull() ) + return vHintText.GetString(); + + return wxEmptyString; +} + +inline int wxPGProperty::GetDisplayedCommonValueCount() const +{ + if ( HasFlag(wxPG_PROP_USES_COMMON_VALUE) ) + { + wxPropertyGrid* pg = GetGrid(); + if ( pg ) + return (int) pg->GetCommonValueCount(); + } + return 0; +} + +inline void wxPGProperty::SetDefaultValue( wxVariant& value ) +{ + SetAttribute(wxPG_ATTR_DEFAULT_VALUE, value); +} + +inline void wxPGProperty::SetEditor( const wxString& editorName ) +{ + m_customEditor = wxPropertyGridInterface::GetEditorByName(editorName); +} + +inline bool wxPGProperty::SetMaxLength( int maxLen ) +{ + return GetGrid()->SetPropertyMaxLength(this,maxLen); +} + +// ----------------------------------------------------------------------- + +#define wxPG_BASE_EVT_PRE_ID 1775 + +#ifndef SWIG + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_SELECTED, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_CHANGING, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_CHANGED, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_HIGHLIGHTED, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_RIGHT_CLICK, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_PAGE_CHANGED, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_ITEM_COLLAPSED, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_ITEM_EXPANDED, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_DOUBLE_CLICK, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, + wxEVT_PG_LABEL_EDIT_BEGIN, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, + wxEVT_PG_LABEL_EDIT_ENDING, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, + wxEVT_PG_COL_BEGIN_DRAG, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, + wxEVT_PG_COL_DRAGGING, wxPropertyGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, + wxEVT_PG_COL_END_DRAG, wxPropertyGridEvent ); + +#else + enum { + wxEVT_PG_SELECTED = wxPG_BASE_EVT_PRE_ID, + wxEVT_PG_CHANGING, + wxEVT_PG_CHANGED, + wxEVT_PG_HIGHLIGHTED, + wxEVT_PG_RIGHT_CLICK, + wxEVT_PG_PAGE_CHANGED, + wxEVT_PG_ITEM_COLLAPSED, + wxEVT_PG_ITEM_EXPANDED, + wxEVT_PG_DOUBLE_CLICK, + wxEVT_PG_LABEL_EDIT_BEGIN, + wxEVT_PG_LABEL_EDIT_ENDING, + wxEVT_PG_COL_BEGIN_DRAG, + wxEVT_PG_COL_DRAGGING, + wxEVT_PG_COL_END_DRAG + }; +#endif + + +#define wxPG_BASE_EVT_TYPE wxEVT_PG_SELECTED +#define wxPG_MAX_EVT_TYPE (wxPG_BASE_EVT_TYPE+30) + + +#ifndef SWIG +typedef void (wxEvtHandler::*wxPropertyGridEventFunction)(wxPropertyGridEvent&); + +#define EVT_PG_SELECTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_SELECTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_CHANGING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_HIGHLIGHTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_HIGHLIGHTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_RIGHT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_RIGHT_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_DOUBLE_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_DOUBLE_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_PAGE_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_PAGE_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_ITEM_COLLAPSED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_COLLAPSED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_ITEM_EXPANDED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_EXPANDED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_LABEL_EDIT_BEGIN(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_LABEL_EDIT_BEGIN, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_LABEL_EDIT_ENDING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_LABEL_EDIT_ENDING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_COL_BEGIN_DRAG(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_BEGIN_DRAG, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_COL_DRAGGING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_DRAGGING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), +#define EVT_PG_COL_END_DRAG(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_COL_END_DRAG, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ), + +#define wxPropertyGridEventHandler(fn) \ + wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ) + +#endif + + +/** @class wxPropertyGridEvent + + A propertygrid event holds information about events associated with + wxPropertyGrid objects. + + @library{wxpropgrid} + @category{propgrid} +*/ +class WXDLLIMPEXP_PROPGRID wxPropertyGridEvent : public wxCommandEvent +{ +public: + + /** Constructor. */ + wxPropertyGridEvent(wxEventType commandType=0, int id=0); + + /** Copy constructor. */ + wxPropertyGridEvent(const wxPropertyGridEvent& event); + + /** Destructor. */ + ~wxPropertyGridEvent(); + + /** Copyer. */ + virtual wxEvent* Clone() const; + + /** + Returns the column index associated with this event. + For the column dragging events, it is the column to the left + of the splitter being dragged + */ + unsigned int GetColumn() const + { + return m_column; + } + + wxPGProperty* GetMainParent() const + { + wxASSERT(m_property); + return m_property->GetMainParent(); + } + + /** Returns id of associated property. */ + wxPGProperty* GetProperty() const + { + return m_property; + } + + wxPGValidationInfo& GetValidationInfo() + { + wxASSERT(m_validationInfo); + return *m_validationInfo; + } + + /** Returns true if you can veto the action that the event is signaling. + */ + bool CanVeto() const { return m_canVeto; } + + /** + Call this from your event handler to veto action that the event is + signaling. + + You can only veto a shutdown if wxPropertyGridEvent::CanVeto returns + true. + @remarks + Currently only wxEVT_PG_CHANGING supports vetoing. + */ + void Veto( bool veto = true ) { m_wasVetoed = veto; } + + /** + Returns name of the associated property. + + @remarks Property name is stored in event, so it remains + accessible even after the associated property or + the property grid has been deleted. + */ + wxString GetPropertyName() const + { + return m_propertyName; + } + + /** + Returns value of the associated property. Works for all event + types, but for wxEVT_PG_CHANGING this member function returns + the value that is pending, so you can call Veto() if the + value is not satisfactory. + + @remarks Property value is stored in event, so it remains + accessible even after the associated property or + the property grid has been deleted. + */ + wxVariant GetPropertyValue() const + { + if ( m_validationInfo ) + return m_validationInfo->GetValue(); + return m_value; + } + + /** + Returns value of the associated property. + + @see GetPropertyValue + */ + wxVariant GetValue() const + { + return GetPropertyValue(); + } + + /** + Set override validation failure behaviour. + + Only effective if Veto was also called, and only allowed if event type + is wxEVT_PG_CHANGING. + */ + void SetValidationFailureBehavior( wxPGVFBFlags flags ) + { + wxASSERT( GetEventType() == wxEVT_PG_CHANGING ); + m_validationInfo->SetFailureBehavior( flags ); + } + + /** Sets custom failure message for this time only. Only applies if + wxPG_VFB_SHOW_MESSAGE is set in validation failure flags. + */ + void SetValidationFailureMessage( const wxString& message ) + { + wxASSERT( GetEventType() == wxEVT_PG_CHANGING ); + m_validationInfo->SetFailureMessage( message ); + } + + wxPGVFBFlags GetValidationFailureBehavior() const + { + wxASSERT( GetEventType() == wxEVT_PG_CHANGING ); + return m_validationInfo->GetFailureBehavior(); + } + + void SetColumn( unsigned int column ) + { + m_column = column; + } + + void SetCanVeto( bool canVeto ) { m_canVeto = canVeto; } + bool WasVetoed() const { return m_wasVetoed; } + + /** Changes the associated property. */ + void SetProperty( wxPGProperty* p ) + { + m_property = p; + if ( p ) + m_propertyName = p->GetName(); + } + + void SetPropertyValue( wxVariant value ) + { + m_value = value; + } + + void SetPropertyGrid( wxPropertyGrid* pg ) + { + m_pg = pg; + OnPropertyGridSet(); + } + + void SetupValidationInfo() + { + wxASSERT(m_pg); + wxASSERT( GetEventType() == wxEVT_PG_CHANGING ); + m_validationInfo = &m_pg->GetValidationInfo(); + m_value = m_validationInfo->GetValue(); + } + +private: + void Init(); + void OnPropertyGridSet(); + DECLARE_DYNAMIC_CLASS(wxPropertyGridEvent) + + wxPGProperty* m_property; + wxPropertyGrid* m_pg; + wxPGValidationInfo* m_validationInfo; + + wxString m_propertyName; + wxVariant m_value; + + unsigned int m_column; + + bool m_canVeto; + bool m_wasVetoed; +}; + + +// ----------------------------------------------------------------------- + +/** @class wxPropertyGridPopulator + @ingroup classes + Allows populating wxPropertyGrid from arbitrary text source. +*/ +class WXDLLIMPEXP_PROPGRID wxPropertyGridPopulator +{ +public: + /** Default constructor. + */ + wxPropertyGridPopulator(); + + /** Destructor. */ + virtual ~wxPropertyGridPopulator(); + + void SetState( wxPropertyGridPageState* state ); + + void SetGrid( wxPropertyGrid* pg ); + + /** Appends a new property under bottommost parent. + @param propClass + Property class as string. + */ + wxPGProperty* Add( const wxString& propClass, + const wxString& propLabel, + const wxString& propName, + const wxString* propValue, + wxPGChoices* pChoices = NULL ); + + /** + Pushes property to the back of parent array (ie it becomes bottommost + parent), and starts scanning/adding children for it. + + When finished, parent array is returned to the original state. + */ + void AddChildren( wxPGProperty* property ); + + /** Adds attribute to the bottommost property. + @param type + Allowed values: "string", (same as string), "int", "bool". Empty string + mean autodetect. + */ + bool AddAttribute( const wxString& name, + const wxString& type, + const wxString& value ); + + /** Called once in AddChildren. + */ + virtual void DoScanForChildren() = 0; + + /** + Returns id of parent property for which children can currently be + added. + */ + wxPGProperty* GetCurParent() const + { + return (wxPGProperty*) m_propHierarchy[m_propHierarchy.size()-1]; + } + + wxPropertyGridPageState* GetState() { return m_state; } + const wxPropertyGridPageState* GetState() const { return m_state; } + + /** Like wxString::ToLong, except allows N% in addition of N. + */ + static bool ToLongPCT( const wxString& s, long* pval, long max ); + + /** Parses strings of format "choice1"[=value1] ... "choiceN"[=valueN] into + wxPGChoices. Registers parsed result using idString (if not empty). + Also, if choices with given id already registered, then don't parse but + return those choices instead. + */ + wxPGChoices ParseChoices( const wxString& choicesString, + const wxString& idString ); + + /** Implement in derived class to do custom process when an error occurs. + Default implementation uses wxLogError. + */ + virtual void ProcessError( const wxString& msg ); + +protected: + + /** Used property grid. */ + wxPropertyGrid* m_pg; + + /** Used property grid state. */ + wxPropertyGridPageState* m_state; + + /** Tree-hierarchy of added properties (that can have children). */ + wxArrayPGProperty m_propHierarchy; + + /** Hashmap for string-id to wxPGChoicesData mapping. */ + wxPGHashMapS2P m_dictIdChoices; +}; + +// ----------------------------------------------------------------------- + +// +// Undefine macros that are not needed outside propertygrid sources +// +#ifndef __wxPG_SOURCE_FILE__ + #undef wxPG_FL_DESC_REFRESH_REQUIRED + #undef wxPG_FL_SCROLLBAR_DETECTED + #undef wxPG_FL_CREATEDSTATE + #undef wxPG_FL_NOSTATUSBARHELP + #undef wxPG_FL_SCROLLED + #undef wxPG_FL_FOCUS_INSIDE_CHILD + #undef wxPG_FL_FOCUS_INSIDE + #undef wxPG_FL_MOUSE_INSIDE_CHILD + #undef wxPG_FL_CUR_USES_CUSTOM_IMAGE + #undef wxPG_FL_PRIMARY_FILLS_ENTIRE + #undef wxPG_FL_VALUE_MODIFIED + #undef wxPG_FL_MOUSE_INSIDE + #undef wxPG_FL_FOCUSED + #undef wxPG_FL_MOUSE_CAPTURED + #undef wxPG_FL_INITIALIZED + #undef wxPG_FL_ACTIVATION_BY_CLICK + #undef wxPG_SUPPORT_TOOLTIPS + #undef wxPG_ICON_WIDTH + #undef wxPG_USE_RENDERER_NATIVE +// Following are needed by the manager headers +// #undef const wxString& +#endif + +// ----------------------------------------------------------------------- + +#endif + +#endif // _WX_PROPGRID_PROPGRID_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgriddefs.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgriddefs.h new file mode 100644 index 0000000000..ae2e462bf4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgriddefs.h @@ -0,0 +1,714 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/propgrid/propgriddefs.h +// Purpose: wxPropertyGrid miscellaneous definitions +// Author: Jaakko Salli +// Modified by: +// Created: 2008-08-31 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROPGRID_PROPGRIDDEFS_H_ +#define _WX_PROPGRID_PROPGRIDDEFS_H_ + +#include "wx/defs.h" + +#if wxUSE_PROPGRID + +#include "wx/dynarray.h" +#include "wx/vector.h" +#include "wx/hashmap.h" +#include "wx/variant.h" +#include "wx/any.h" +#include "wx/longlong.h" +#include "wx/clntdata.h" + +// ----------------------------------------------------------------------- + +// +// Here are some platform dependent defines +// NOTE: More in propertygrid.cpp +// + +#if defined(__WXMSW__) + + // space between vertical line and value text + #define wxPG_XBEFORETEXT 4 + // space between vertical line and value editor control + #define wxPG_XBEFOREWIDGET 1 + + // comment to use bitmap buttons + #define wxPG_ICON_WIDTH 9 + // 1 if wxRendererNative should be employed + #define wxPG_USE_RENDERER_NATIVE 0 + + // Enable tooltips + #define wxPG_SUPPORT_TOOLTIPS 1 + + // width of optional bitmap/image in front of property + #define wxPG_CUSTOM_IMAGE_WIDTH 20 + + // 1 if splitter drag detect margin and control cannot overlap + #define wxPG_NO_CHILD_EVT_MOTION 0 + + #define wxPG_NAT_BUTTON_BORDER_ANY 1 + #define wxPG_NAT_BUTTON_BORDER_X 1 + #define wxPG_NAT_BUTTON_BORDER_Y 1 + + // If 1 then controls are refreshed explicitly in a few places + #define wxPG_REFRESH_CONTROLS 0 + +#elif defined(__WXGTK__) + + // space between vertical line and value text + #define wxPG_XBEFORETEXT 5 + // space between vertical line and value editor control + #define wxPG_XBEFOREWIDGET 1 + + // x position adjustment for wxTextCtrl (and like) + // NB: Only define wxPG_TEXTCTRLXADJUST for platforms that do not + // (yet) support wxTextEntry::SetMargins() for the left margin. + //#define wxPG_TEXTCTRLXADJUST 3 + + // comment to use bitmap buttons + #define wxPG_ICON_WIDTH 9 + // 1 if wxRendererNative should be employed + #define wxPG_USE_RENDERER_NATIVE 1 + + // Enable tooltips + #define wxPG_SUPPORT_TOOLTIPS 1 + + // width of optional bitmap/image in front of property + #define wxPG_CUSTOM_IMAGE_WIDTH 20 + + // 1 if splitter drag detect margin and control cannot overlap + #define wxPG_NO_CHILD_EVT_MOTION 1 + + #define wxPG_NAT_BUTTON_BORDER_ANY 1 + #define wxPG_NAT_BUTTON_BORDER_X 1 + #define wxPG_NAT_BUTTON_BORDER_Y 1 + + // If 1 then controls are refreshed after selected was drawn. + #define wxPG_REFRESH_CONTROLS 1 + +#elif defined(__WXMAC__) + + // space between vertical line and value text + #define wxPG_XBEFORETEXT 4 + // space between vertical line and value editor widget + #define wxPG_XBEFOREWIDGET 1 + + // x position adjustment for wxTextCtrl (and like) + #define wxPG_TEXTCTRLXADJUST 0 + + // comment to use bitmap buttons + #define wxPG_ICON_WIDTH 11 + // 1 if wxRendererNative should be employed + #define wxPG_USE_RENDERER_NATIVE 1 + + // Enable tooltips + #define wxPG_SUPPORT_TOOLTIPS 1 + + // width of optional bitmap/image in front of property + #define wxPG_CUSTOM_IMAGE_WIDTH 20 + + // 1 if splitter drag detect margin and control cannot overlap + #define wxPG_NO_CHILD_EVT_MOTION 0 + + #define wxPG_NAT_BUTTON_BORDER_ANY 0 + #define wxPG_NAT_BUTTON_BORDER_X 0 + #define wxPG_NAT_BUTTON_BORDER_Y 0 + + // If 1 then controls are refreshed after selected was drawn. + #define wxPG_REFRESH_CONTROLS 0 + +#else // defaults + + // space between vertical line and value text + #define wxPG_XBEFORETEXT 5 + // space between vertical line and value editor widget + #define wxPG_XBEFOREWIDGET 1 + + // x position adjustment for wxTextCtrl (and like) + #define wxPG_TEXTCTRLXADJUST 3 + + // comment to use bitmap buttons + #define wxPG_ICON_WIDTH 9 + // 1 if wxRendererNative should be employed + #define wxPG_USE_RENDERER_NATIVE 0 + + // Enable tooltips + #define wxPG_SUPPORT_TOOLTIPS 0 + + // width of optional bitmap/image in front of property + #define wxPG_CUSTOM_IMAGE_WIDTH 20 + + // 1 if splitter drag detect margin and control cannot overlap + #define wxPG_NO_CHILD_EVT_MOTION 1 + + #define wxPG_NAT_BUTTON_BORDER_ANY 0 + #define wxPG_NAT_BUTTON_BORDER_X 0 + #define wxPG_NAT_BUTTON_BORDER_Y 0 + + // If 1 then controls are refreshed after selected was drawn. + #define wxPG_REFRESH_CONTROLS 0 +#endif // platform + + +#define wxPG_CONTROL_MARGIN 0 // space between splitter and control + +#define wxCC_CUSTOM_IMAGE_MARGIN1 4 // before image +#define wxCC_CUSTOM_IMAGE_MARGIN2 5 // after image + +#define DEFAULT_IMAGE_OFFSET_INCREMENT \ + (wxCC_CUSTOM_IMAGE_MARGIN1 + wxCC_CUSTOM_IMAGE_MARGIN2) + +#define wxPG_DRAG_MARGIN 30 + +#if wxPG_NO_CHILD_EVT_MOTION + #define wxPG_SPLITTERX_DETECTMARGIN1 3 // this much on left + #define wxPG_SPLITTERX_DETECTMARGIN2 2 // this much on right +#else + #define wxPG_SPLITTERX_DETECTMARGIN1 3 // this much on left + #define wxPG_SPLITTERX_DETECTMARGIN2 2 // this much on right +#endif + +// Use this macro to generate standard custom image height from +#define wxPG_STD_CUST_IMAGE_HEIGHT(LINEHEIGHT) (LINEHEIGHT-3) + + +#if defined(__WXWINCE__) + #define wxPG_SMALL_SCREEN 1 +#else + #define wxPG_SMALL_SCREEN 0 +#endif + + +// Undefine wxPG_ICON_WIDTH to use supplied xpm bitmaps instead +// (for tree buttons) +//#undef wxPG_ICON_WIDTH + +#if WXWIN_COMPATIBILITY_2_6 || WXWIN_COMPATIBILITY_2_8 + #define wxPG_COMPATIBILITY_1_4 1 +#else + #define wxPG_COMPATIBILITY_1_4 0 +#endif + +// Need to force disable tooltips? +#if !wxUSE_TOOLTIPS + #undef wxPG_SUPPORT_TOOLTIPS + #define wxPG_SUPPORT_TOOLTIPS 0 +#endif + +// Set 1 to include advanced properties (wxFontProperty, wxColourProperty, etc.) +#ifndef wxPG_INCLUDE_ADVPROPS + #define wxPG_INCLUDE_ADVPROPS 1 +#endif + +// Set 1 to include checkbox editor class +#define wxPG_INCLUDE_CHECKBOX 1 + +// ----------------------------------------------------------------------- + + +class wxPGEditor; +class wxPGProperty; +class wxPropertyCategory; +class wxPGChoices; +class wxPropertyGridPageState; +class wxPGCell; +class wxPGCellRenderer; +class wxPGChoiceEntry; +class wxPGPropArgCls; +class wxPropertyGridInterface; +class wxPropertyGrid; +class wxPropertyGridEvent; +class wxPropertyGridManager; +class wxPGOwnerDrawnComboBox; +class wxPGEditorDialogAdapter; +class wxPGValidationInfo; + + +// ----------------------------------------------------------------------- + +/** @section propgrid_misc wxPropertyGrid Miscellanous + + This section describes some miscellanous values, types and macros. + @{ +*/ + +// Used to tell wxPGProperty to use label as name as well +#define wxPG_LABEL (*wxPGProperty::sm_wxPG_LABEL) + +// This is the value placed in wxPGProperty::sm_wxPG_LABEL +#define wxPG_LABEL_STRING wxS("@!") +#define wxPG_NULL_BITMAP wxNullBitmap +#define wxPG_COLOUR_BLACK (*wxBLACK) + +/** Convert Red, Green and Blue to a single 32-bit value. +*/ +#define wxPG_COLOUR(R,G,B) ((wxUint32)(R+(G<<8)+(B<<16))) + + +/** If property is supposed to have custom-painted image, then returning + this in OnMeasureImage() will usually be enough. +*/ +#define wxPG_DEFAULT_IMAGE_SIZE wxSize(-1, -1) + + +/** This callback function is used for sorting properties. + + Call wxPropertyGrid::SetSortFunction() to set it. + + Sort function should return a value greater than 0 if position of p1 is + after p2. So, for instance, when comparing property names, you can use + following implementation: + + @code + int MyPropertySortFunction(wxPropertyGrid* propGrid, + wxPGProperty* p1, + wxPGProperty* p2) + { + return p1->GetBaseName().compare( p2->GetBaseName() ); + } + @endcode +*/ +typedef int (*wxPGSortCallback)(wxPropertyGrid* propGrid, + wxPGProperty* p1, + wxPGProperty* p2); + + + +typedef wxString wxPGCachedString; + +/** @} +*/ + +// ----------------------------------------------------------------------- + +// Used to indicate wxPGChoices::Add etc that the value is actually not given +// by the caller. +#define wxPG_INVALID_VALUE INT_MAX + +// ----------------------------------------------------------------------- + +WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(wxPGProperty*, wxArrayPGProperty, + wxBaseArrayPtrVoid, + class WXDLLIMPEXP_PROPGRID); + +WX_DECLARE_STRING_HASH_MAP_WITH_DECL(void*, + wxPGHashMapS2P, + class WXDLLIMPEXP_PROPGRID); + +WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxString, + wxPGHashMapS2S, + class WXDLLIMPEXP_PROPGRID); + +WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL(void*, + wxPGHashMapP2P, + class WXDLLIMPEXP_PROPGRID); + +WX_DECLARE_HASH_MAP_WITH_DECL(wxInt32, + wxInt32, + wxIntegerHash, + wxIntegerEqual, + wxPGHashMapI2I, + class WXDLLIMPEXP_PROPGRID); + +// Utility to find if specific item is in a vector. Returns index to +// the item, or wxNOT_FOUND if not present. +template<typename CONTAINER, typename T> +int wxPGFindInVector( CONTAINER vector, const T& item ) +{ + for ( unsigned int i=0; i<vector.size(); i++ ) + { + if ( vector[i] == item ) + return (int) i; + } + return wxNOT_FOUND; +} + +// ----------------------------------------------------------------------- + +enum wxPG_GETPROPERTYVALUES_FLAGS +{ + +/** Flags for wxPropertyGridInterface::GetPropertyValues */ +wxPG_KEEP_STRUCTURE = 0x00000010, + +/** Flags for wxPropertyGrid::SetPropertyAttribute() etc */ +wxPG_RECURSE = 0x00000020, + +/** Include attributes for GetPropertyValues. */ +wxPG_INC_ATTRIBUTES = 0x00000040, + +/** Used when first starting recursion. */ +wxPG_RECURSE_STARTS = 0x00000080, + +/** Force value change. */ +wxPG_FORCE = 0x00000100, + +/** Only sort categories and their immediate children. + Sorting done by wxPG_AUTO_SORT option uses this. +*/ +wxPG_SORT_TOP_LEVEL_ONLY = 0x00000200 + +}; + +/** Flags for wxPropertyGrid::SetPropertyAttribute() etc */ +#define wxPG_DONT_RECURSE 0x00000000 + +// ----------------------------------------------------------------------- + +// Misc argument flags. +enum wxPG_MISC_ARG_FLAGS +{ + // Get/Store full value instead of displayed value. + wxPG_FULL_VALUE = 0x00000001, + + wxPG_REPORT_ERROR = 0x00000002, + + wxPG_PROPERTY_SPECIFIC = 0x00000004, + + // Get/Store editable value instead of displayed one (should only be + // different in the case of common values) + wxPG_EDITABLE_VALUE = 0x00000008, + + // Used when dealing with fragments of composite string value + wxPG_COMPOSITE_FRAGMENT = 0x00000010, + + // Means property for which final string value is for cannot really be + // edited. + wxPG_UNEDITABLE_COMPOSITE_FRAGMENT = 0x00000020, + + // ValueToString() called from GetValueAsString() + // (guarantees that input wxVariant value is current own value) + wxPG_VALUE_IS_CURRENT = 0x00000040, + + // Value is being set programmatically (ie. not by user) + wxPG_PROGRAMMATIC_VALUE = 0x00000080 +}; + +// ----------------------------------------------------------------------- + +// wxPGProperty::SetValue() flags +enum wxPG_SETVALUE_FLAGS +{ + wxPG_SETVAL_REFRESH_EDITOR = 0x0001, + wxPG_SETVAL_AGGREGATED = 0x0002, + wxPG_SETVAL_FROM_PARENT = 0x0004, + wxPG_SETVAL_BY_USER = 0x0008 // Set if value changed by user +}; + +// ----------------------------------------------------------------------- + +// +// Valid constants for wxPG_UINT_BASE attribute +// (long because of wxVariant constructor) +#define wxPG_BASE_OCT (long)8 +#define wxPG_BASE_DEC (long)10 +#define wxPG_BASE_HEX (long)16 +#define wxPG_BASE_HEXL (long)32 + +// +// Valid constants for wxPG_UINT_PREFIX attribute +#define wxPG_PREFIX_NONE (long)0 +#define wxPG_PREFIX_0x (long)1 +#define wxPG_PREFIX_DOLLAR_SIGN (long)2 + +// ----------------------------------------------------------------------- +// Editor class. + +// Editor accessor (for backwards compatiblity use only). +#define wxPG_EDITOR(T) wxPGEditor_##T + +// Macro for declaring editor class, with optional impexpdecl part. +#ifndef WX_PG_DECLARE_EDITOR_WITH_DECL + + #define WX_PG_DECLARE_EDITOR_WITH_DECL(EDITOR,DECL) \ + extern DECL wxPGEditor* wxPGEditor_##EDITOR; \ + extern DECL wxPGEditor* wxPGConstruct##EDITOR##EditorClass(); + +#endif + +// Declare editor class. +#define WX_PG_DECLARE_EDITOR(EDITOR) \ +extern wxPGEditor* wxPGEditor_##EDITOR; \ +extern wxPGEditor* wxPGConstruct##EDITOR##EditorClass(); + +// Declare builtin editor classes. +WX_PG_DECLARE_EDITOR_WITH_DECL(TextCtrl,WXDLLIMPEXP_PROPGRID) +WX_PG_DECLARE_EDITOR_WITH_DECL(Choice,WXDLLIMPEXP_PROPGRID) +WX_PG_DECLARE_EDITOR_WITH_DECL(ComboBox,WXDLLIMPEXP_PROPGRID) +WX_PG_DECLARE_EDITOR_WITH_DECL(TextCtrlAndButton,WXDLLIMPEXP_PROPGRID) +#if wxPG_INCLUDE_CHECKBOX +WX_PG_DECLARE_EDITOR_WITH_DECL(CheckBox,WXDLLIMPEXP_PROPGRID) +#endif +WX_PG_DECLARE_EDITOR_WITH_DECL(ChoiceAndButton,WXDLLIMPEXP_PROPGRID) + +// ----------------------------------------------------------------------- + +#ifndef SWIG + +// +// Macro WXVARIANT allows creation of wxVariant from any type supported by +// wxWidgets internally, and of all types created using +// WX_PG_DECLARE_VARIANT_DATA. +template<class T> +wxVariant WXVARIANT( const T& WXUNUSED(value) ) +{ + wxFAIL_MSG("Code should always call specializations of this template"); + return wxVariant(); +} + +template<> inline wxVariant WXVARIANT( const int& value ) + { return wxVariant((long)value); } +template<> inline wxVariant WXVARIANT( const long& value ) + { return wxVariant(value); } +template<> inline wxVariant WXVARIANT( const bool& value ) + { return wxVariant(value); } +template<> inline wxVariant WXVARIANT( const double& value ) + { return wxVariant(value); } +template<> inline wxVariant WXVARIANT( const wxArrayString& value ) + { return wxVariant(value); } +template<> inline wxVariant WXVARIANT( const wxString& value ) + { return wxVariant(value); } +#if wxUSE_LONGLONG +template<> inline wxVariant WXVARIANT( const wxLongLong& value ) + { return wxVariant(value); } +template<> inline wxVariant WXVARIANT( const wxULongLong& value ) + { return wxVariant(value); } +#endif +#if wxUSE_DATETIME +template<> inline wxVariant WXVARIANT( const wxDateTime& value ) + { return wxVariant(value); } +#endif + + +// +// These are modified versions of DECLARE/WX_PG_IMPLEMENT_VARIANT_DATA +// macros found in variant.h. Difference are as follows: +// * These support non-wxObject data +// * These implement classname##RefFromVariant function which returns +// reference to data within. +// * const char* classname##_VariantType which equals classname. +// * WXVARIANT +// +#define WX_PG_DECLARE_VARIANT_DATA(classname) \ + WX_PG_DECLARE_VARIANT_DATA_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE) + +#define WX_PG_DECLARE_VARIANT_DATA_EXPORTED(classname,expdecl) \ +expdecl classname& operator << ( classname &object, const wxVariant &variant ); \ +expdecl wxVariant& operator << ( wxVariant &variant, const classname &object ); \ +expdecl const classname& classname##RefFromVariant( const wxVariant& variant ); \ +expdecl classname& classname##RefFromVariant( wxVariant& variant ); \ +template<> inline wxVariant WXVARIANT( const classname& value ) \ +{ \ + wxVariant variant; \ + variant << value; \ + return variant; \ +} \ +extern expdecl const char* classname##_VariantType; + + +#define WX_PG_IMPLEMENT_VARIANT_DATA(classname) \ + WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE) + +// Add getter (ie. classname << variant) separately to allow +// custom implementations. +#define WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_NO_EQ_NO_GETTER(classname,expdecl) \ +const char* classname##_VariantType = #classname; \ +class classname##VariantData: public wxVariantData \ +{ \ +public:\ + classname##VariantData() {} \ + classname##VariantData( const classname &value ) { m_value = value; } \ +\ + classname &GetValue() { return m_value; } \ +\ + const classname &GetValue() const { return m_value; } \ +\ + virtual bool Eq(wxVariantData& data) const; \ +\ + virtual wxString GetType() const; \ +\ + virtual wxVariantData* Clone() const { return new classname##VariantData(m_value); } \ +\ + DECLARE_WXANY_CONVERSION() \ +protected:\ + classname m_value; \ +};\ +\ +IMPLEMENT_TRIVIAL_WXANY_CONVERSION(classname, classname##VariantData) \ +\ +wxString classname##VariantData::GetType() const\ +{\ + return wxS(#classname);\ +}\ +\ +expdecl wxVariant& operator << ( wxVariant &variant, const classname &value )\ +{\ + classname##VariantData *data = new classname##VariantData( value );\ + variant.SetData( data );\ + return variant;\ +} \ +expdecl classname& classname##RefFromVariant( wxVariant& variant ) \ +{ \ + wxASSERT_MSG( variant.GetType() == wxS(#classname), \ + wxString::Format("Variant type should have been '%s'" \ + "instead of '%s'", \ + wxS(#classname), \ + variant.GetType().c_str())); \ + classname##VariantData *data = \ + (classname##VariantData*) variant.GetData(); \ + return data->GetValue();\ +} \ +expdecl const classname& classname##RefFromVariant( const wxVariant& variant ) \ +{ \ + wxASSERT_MSG( variant.GetType() == wxS(#classname), \ + wxString::Format("Variant type should have been '%s'" \ + "instead of '%s'", \ + wxS(#classname), \ + variant.GetType().c_str())); \ + classname##VariantData *data = \ + (classname##VariantData*) variant.GetData(); \ + return data->GetValue();\ +} + +#define WX_PG_IMPLEMENT_VARIANT_DATA_GETTER(classname, expdecl) \ +expdecl classname& operator << ( classname &value, const wxVariant &variant )\ +{\ + wxASSERT( variant.GetType() == #classname );\ + \ + classname##VariantData *data = (classname##VariantData*) variant.GetData();\ + value = data->GetValue();\ + return value;\ +} + +#define WX_PG_IMPLEMENT_VARIANT_DATA_EQ(classname, expdecl) \ +bool classname##VariantData::Eq(wxVariantData& data) const \ +{\ + wxASSERT( GetType() == data.GetType() );\ +\ + classname##VariantData & otherData = (classname##VariantData &) data;\ +\ + return otherData.m_value == m_value;\ +} + +// implements a wxVariantData-derived class using for the Eq() method the +// operator== which must have been provided by "classname" +#define WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED(classname,expdecl) \ +WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_NO_EQ_NO_GETTER(classname,wxEMPTY_PARAMETER_VALUE expdecl) \ +WX_PG_IMPLEMENT_VARIANT_DATA_GETTER(classname,wxEMPTY_PARAMETER_VALUE expdecl) \ +WX_PG_IMPLEMENT_VARIANT_DATA_EQ(classname,wxEMPTY_PARAMETER_VALUE expdecl) + +#define WX_PG_IMPLEMENT_VARIANT_DATA(classname) \ +WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE) + +// with Eq() implementation that always returns false +#define WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_DUMMY_EQ(classname,expdecl) \ +WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_NO_EQ_NO_GETTER(classname,wxEMPTY_PARAMETER_VALUE expdecl) \ +WX_PG_IMPLEMENT_VARIANT_DATA_GETTER(classname,wxEMPTY_PARAMETER_VALUE expdecl) \ +\ +bool classname##VariantData::Eq(wxVariantData& WXUNUSED(data)) const \ +{\ + return false; \ +} + +#define WX_PG_IMPLEMENT_VARIANT_DATA_DUMMY_EQ(classname) \ +WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_DUMMY_EQ(classname, wxEMPTY_PARAMETER_VALUE) + +WX_PG_DECLARE_VARIANT_DATA_EXPORTED(wxPoint, WXDLLIMPEXP_PROPGRID) +WX_PG_DECLARE_VARIANT_DATA_EXPORTED(wxSize, WXDLLIMPEXP_PROPGRID) +WX_PG_DECLARE_VARIANT_DATA_EXPORTED(wxArrayInt, WXDLLIMPEXP_PROPGRID) +DECLARE_VARIANT_OBJECT_EXPORTED(wxFont, WXDLLIMPEXP_PROPGRID) +template<> inline wxVariant WXVARIANT( const wxFont& value ) +{ + wxVariant variant; + variant << value; + return variant; +} + +template<> inline wxVariant WXVARIANT( const wxColour& value ) +{ + wxVariant variant; + variant << value; + return variant; +} + +// Define constants for common wxVariant type strings + +#define wxPG_VARIANT_TYPE_STRING wxPGGlobalVars->m_strstring +#define wxPG_VARIANT_TYPE_LONG wxPGGlobalVars->m_strlong +#define wxPG_VARIANT_TYPE_BOOL wxPGGlobalVars->m_strbool +#define wxPG_VARIANT_TYPE_LIST wxPGGlobalVars->m_strlist +#define wxPG_VARIANT_TYPE_DOUBLE wxS("double") +#define wxPG_VARIANT_TYPE_ARRSTRING wxS("arrstring") +#define wxPG_VARIANT_TYPE_DATETIME wxS("datetime") +#define wxPG_VARIANT_TYPE_LONGLONG wxS("longlong") +#define wxPG_VARIANT_TYPE_ULONGLONG wxS("ulonglong") + +#endif // !SWIG + +// ----------------------------------------------------------------------- + +// +// Tokenizer macros. +// NOTE: I have made two versions - worse ones (performance and consistency +// wise) use wxStringTokenizer and better ones (may have unfound bugs) +// use custom code. +// + +#include "wx/tokenzr.h" + +// TOKENIZER1 can be done with wxStringTokenizer +#define WX_PG_TOKENIZER1_BEGIN(WXSTRING,DELIMITER) \ + wxStringTokenizer tkz(WXSTRING,DELIMITER,wxTOKEN_RET_EMPTY); \ + while ( tkz.HasMoreTokens() ) \ + { \ + wxString token = tkz.GetNextToken(); \ + token.Trim(true); \ + token.Trim(false); + +#define WX_PG_TOKENIZER1_END() \ + } + + +// +// 2nd version: tokens are surrounded by DELIMITERs (for example, C-style +// strings). TOKENIZER2 must use custom code (a class) for full compliance with +// " surrounded strings with \" inside. +// +// class implementation is in propgrid.cpp +// + +class WXDLLIMPEXP_PROPGRID wxPGStringTokenizer +{ +public: + wxPGStringTokenizer( const wxString& str, wxChar delimeter ); + ~wxPGStringTokenizer(); + + bool HasMoreTokens(); // not const so we can do some stuff in it + wxString GetNextToken(); + +protected: + const wxString* m_str; + wxString::const_iterator m_curPos; + wxString m_readyToken; + wxUniChar m_delimeter; +}; + +#define WX_PG_TOKENIZER2_BEGIN(WXSTRING,DELIMITER) \ + wxPGStringTokenizer tkz(WXSTRING,DELIMITER); \ + while ( tkz.HasMoreTokens() ) \ + { \ + wxString token = tkz.GetNextToken(); + +#define WX_PG_TOKENIZER2_END() \ + } + +// ----------------------------------------------------------------------- + +#endif // wxUSE_PROPGRID + +#endif // _WX_PROPGRID_PROPGRIDDEFS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgridiface.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgridiface.h new file mode 100644 index 0000000000..a553d6dba1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgridiface.h @@ -0,0 +1,1396 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/propgrid/propgridiface.h +// Purpose: wxPropertyGridInterface class +// Author: Jaakko Salli +// Modified by: +// Created: 2008-08-24 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_PROPGRID_PROPGRIDIFACE_H__ +#define __WX_PROPGRID_PROPGRIDIFACE_H__ + +#include "wx/defs.h" + +#if wxUSE_PROPGRID + +#include "wx/propgrid/property.h" +#include "wx/propgrid/propgridpagestate.h" + +// ----------------------------------------------------------------------- + +/** @section wxPGPropArgCls + + Most property grid functions have this type as their argument, as it can + convey a property by either a pointer or name. +*/ +class WXDLLIMPEXP_PROPGRID wxPGPropArgCls +{ +public: + wxPGPropArgCls( const wxPGProperty* property ) + { + m_ptr.property = (wxPGProperty*) property; + m_flags = IsProperty; + } + wxPGPropArgCls( const wxString& str ) + { + m_ptr.stringName = &str; + m_flags = IsWxString; + } + wxPGPropArgCls( const wxPGPropArgCls& id ) + { + m_ptr = id.m_ptr; + m_flags = id.m_flags; + } + // This is only needed for wxPython bindings + wxPGPropArgCls( wxString* str, bool WXUNUSED(deallocPtr) ) + { + m_ptr.stringName = str; + m_flags = IsWxString | OwnsWxString; + } + ~wxPGPropArgCls() + { + if ( m_flags & OwnsWxString ) + delete m_ptr.stringName; + } + wxPGProperty* GetPtr() const + { + wxCHECK( m_flags == IsProperty, NULL ); + return m_ptr.property; + } + wxPGPropArgCls( const char* str ) + { + m_ptr.charName = str; + m_flags = IsCharPtr; + } + wxPGPropArgCls( const wchar_t* str ) + { + m_ptr.wcharName = str; + m_flags = IsWCharPtr; + } + /** This constructor is required for NULL. */ + wxPGPropArgCls( int ) + { + m_ptr.property = NULL; + m_flags = IsProperty; + } + wxPGProperty* GetPtr( wxPropertyGridInterface* iface ) const; + wxPGProperty* GetPtr( const wxPropertyGridInterface* iface ) const + { + return GetPtr((wxPropertyGridInterface*)iface); + } + wxPGProperty* GetPtr0() const { return m_ptr.property; } + bool HasName() const { return (m_flags != IsProperty); } + const wxString& GetName() const { return *m_ptr.stringName; } +private: + + enum + { + IsProperty = 0x00, + IsWxString = 0x01, + IsCharPtr = 0x02, + IsWCharPtr = 0x04, + OwnsWxString = 0x10 + }; + + union + { + wxPGProperty* property; + const char* charName; + const wchar_t* wcharName; + const wxString* stringName; + } m_ptr; + unsigned char m_flags; +}; + +typedef const wxPGPropArgCls& wxPGPropArg; + +// ----------------------------------------------------------------------- + +WXDLLIMPEXP_PROPGRID +void wxPGTypeOperationFailed( const wxPGProperty* p, + const wxString& typestr, + const wxString& op ); +WXDLLIMPEXP_PROPGRID +void wxPGGetFailed( const wxPGProperty* p, const wxString& typestr ); + +// ----------------------------------------------------------------------- + +// Helper macro that does necessary preparations when calling +// some wxPGProperty's member function. +#define wxPG_PROP_ARG_CALL_PROLOG_0(PROPERTY) \ + PROPERTY *p = (PROPERTY*)id.GetPtr(this); \ + if ( !p ) return; + +#define wxPG_PROP_ARG_CALL_PROLOG_RETVAL_0(PROPERTY, RETVAL) \ + PROPERTY *p = (PROPERTY*)id.GetPtr(this); \ + if ( !p ) return RETVAL; + +#define wxPG_PROP_ARG_CALL_PROLOG() \ + wxPG_PROP_ARG_CALL_PROLOG_0(wxPGProperty) + +#define wxPG_PROP_ARG_CALL_PROLOG_RETVAL(RVAL) \ + wxPG_PROP_ARG_CALL_PROLOG_RETVAL_0(wxPGProperty, RVAL) + +#define wxPG_PROP_ID_CONST_CALL_PROLOG() \ + wxPG_PROP_ARG_CALL_PROLOG_0(const wxPGProperty) + +#define wxPG_PROP_ID_CONST_CALL_PROLOG_RETVAL(RVAL) \ + wxPG_PROP_ARG_CALL_PROLOG_RETVAL_0(const wxPGProperty, RVAL) + +// ----------------------------------------------------------------------- + + +/** @class wxPropertyGridInterface + + Most of the shared property manipulation interface shared by wxPropertyGrid, + wxPropertyGridPage, and wxPropertyGridManager is defined in this class. + + @remarks + - In separate wxPropertyGrid component this class was known as + wxPropertyContainerMethods. + + @library{wxpropgrid} + @category{propgrid} +*/ +class WXDLLIMPEXP_PROPGRID wxPropertyGridInterface +{ +public: + + /** Destructor */ + virtual ~wxPropertyGridInterface() { } + + /** + Appends property to the list. + + wxPropertyGrid assumes ownership of the object. + Becomes child of most recently added category. + @remarks + - wxPropertyGrid takes the ownership of the property pointer. + - If appending a category with name identical to a category already in + the wxPropertyGrid, then newly created category is deleted, and most + recently added category (under which properties are appended) is set + to the one with same name. This allows easier adding of items to same + categories in multiple passes. + - Does not automatically redraw the control, so you may need to call + Refresh when calling this function after control has been shown for + the first time. + */ + wxPGProperty* Append( wxPGProperty* property ); + + wxPGProperty* AppendIn( wxPGPropArg id, wxPGProperty* newproperty ); + + /** + In order to add new items into a property with fixed children (for + instance, wxFlagsProperty), you need to call this method. After + populating has been finished, you need to call EndAddChildren. + */ + void BeginAddChildren( wxPGPropArg id ); + + /** Deletes all properties. + */ + virtual void Clear() = 0; + + /** + Clears current selection, if any. + + @param validation + If set to @false, deselecting the property will always work, + even if its editor had invalid value in it. + + @return Returns @true if successful or if there was no selection. May + fail if validation was enabled and active editor had invalid + value. + + @remarks In wxPropertyGrid 1.4, this member function used to send + wxPG_EVT_SELECTED. In wxWidgets 2.9 and later, it no longer + does that. + */ + bool ClearSelection( bool validation = false ); + + /** Resets modified status of all properties. + */ + void ClearModifiedStatus(); + + /** Collapses given category or property with children. + Returns true if actually collapses. + */ + bool Collapse( wxPGPropArg id ); + + /** Collapses all items that can be collapsed. + + @return + Return false if failed (may fail if editor value cannot be validated). + */ + bool CollapseAll() { return ExpandAll(false); } + + /** + Changes value of a property, as if from an editor. + Use this instead of SetPropertyValue() if you need the value to run + through validation process, and also send the property change event. + + @return + Returns true if value was successfully changed. + */ + bool ChangePropertyValue( wxPGPropArg id, wxVariant newValue ); + + /** + Removes and deletes a property and any children. + + @param id + Pointer or name of a property. + + @remarks If you delete a property in a wxPropertyGrid event + handler, the actual deletion is postponed until the next + idle event. + + This functions deselects selected property, if any. + Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not + respected, ie. selection is cleared even if editor had + invalid value. + */ + void DeleteProperty( wxPGPropArg id ); + + /** + Removes a property. Does not delete the property object, but + instead returns it. + + @param id + Pointer or name of a property. + + @remarks Removed property cannot have any children. + + Also, if you remove property in a wxPropertyGrid event + handler, the actual removal is postponed until the next + idle event. + */ + wxPGProperty* RemoveProperty( wxPGPropArg id ); + + /** + Disables a property. + + @see EnableProperty(), wxPGProperty::Enable() + */ + bool DisableProperty( wxPGPropArg id ) { return EnableProperty(id,false); } + + /** + Returns true if all property grid data changes have been committed. + + Usually only returns false if value in active editor has been + invalidated by a wxValidator. + */ + bool EditorValidate(); + + /** + Enables or disables property, depending on whether enable is true or + false. Disabled property usually appears as having grey text. + + @param id + Name or pointer to a property. + @param enable + If @false, property is disabled instead. + + @see wxPGProperty::Enable() + */ + bool EnableProperty( wxPGPropArg id, bool enable = true ); + + /** Called after population of property with fixed children has finished. + */ + void EndAddChildren( wxPGPropArg id ); + + /** Expands given category or property with children. + Returns true if actually expands. + */ + bool Expand( wxPGPropArg id ); + + /** Expands all items that can be expanded. + */ + bool ExpandAll( bool expand = true ); + + /** Returns id of first child of given property. + @remarks + Does not return sub-properties! + */ + wxPGProperty* GetFirstChild( wxPGPropArg id ) + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxNullProperty) + + if ( !p->GetChildCount() || p->HasFlag(wxPG_PROP_AGGREGATE) ) + return wxNullProperty; + + return p->Item(0); + } + + //@{ + /** Returns iterator class instance. + @param flags + See @ref propgrid_iterator_flags. Value wxPG_ITERATE_DEFAULT causes + iteration over everything except private child properties. + @param firstProp + Property to start iteration from. If NULL, then first child of root + is used. + @param startPos + Either wxTOP or wxBOTTOM. wxTOP will indicate that iterations start + from the first property from the top, and wxBOTTOM means that the + iteration will instead begin from bottommost valid item. + */ + wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT, + wxPGProperty* firstProp = NULL ) + { + return wxPropertyGridIterator( m_pState, flags, firstProp ); + } + + wxPropertyGridConstIterator + GetIterator( int flags = wxPG_ITERATE_DEFAULT, + wxPGProperty* firstProp = NULL ) const + { + return wxPropertyGridConstIterator( m_pState, flags, firstProp ); + } + + wxPropertyGridIterator GetIterator( int flags, int startPos ) + { + return wxPropertyGridIterator( m_pState, flags, startPos ); + } + + wxPropertyGridConstIterator GetIterator( int flags, int startPos ) const + { + return wxPropertyGridConstIterator( m_pState, flags, startPos ); + } + //@} + + /** Returns id of first item, whether it is a category or property. + @param flags + @link iteratorflags List of iterator flags@endlink + */ + wxPGProperty* GetFirst( int flags = wxPG_ITERATE_ALL ) + { + wxPropertyGridIterator it( m_pState, flags, wxNullProperty, 1 ); + return *it; + } + + const wxPGProperty* GetFirst( int flags = wxPG_ITERATE_ALL ) const + { + return ((wxPropertyGridInterface*)this)->GetFirst(flags); + } + + /** + Returns pointer to a property with given name (case-sensitive). + If there is no property with such name, @NULL pointer is returned. + + @remarks Properties which have non-category, non-root parent + cannot be accessed globally by their name. Instead, use + "<property>.<subproperty>" instead of "<subproperty>". + */ + wxPGProperty* GetProperty( const wxString& name ) const + { + return GetPropertyByName(name); + } + + /** Returns map-like storage of property's attributes. + @remarks + Note that if extra style wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES is set, + then builtin-attributes are not included in the storage. + */ + const wxPGAttributeStorage& GetPropertyAttributes( wxPGPropArg id ) const + { + // If 'id' refers to invalid property, then we will return dummy + // attributes (ie. root property's attributes, which contents should + // should always be empty and of no consequence). + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(m_pState->DoGetRoot()->GetAttributes()); + return p->GetAttributes(); + } + + /** Adds to 'targetArr' pointers to properties that have given + flags 'flags' set. However, if 'inverse' is set to true, then + only properties without given flags are stored. + @param flags + Property flags to use. + @param iterFlags + Iterator flags to use. Default is everything expect private children. + */ + void GetPropertiesWithFlag( wxArrayPGProperty* targetArr, + wxPGProperty::FlagType flags, + bool inverse = false, + int iterFlags = wxPG_ITERATE_PROPERTIES | + wxPG_ITERATE_HIDDEN | + wxPG_ITERATE_CATEGORIES) const; + + /** Returns value of given attribute. If none found, returns NULL-variant. + */ + wxVariant GetPropertyAttribute( wxPGPropArg id, + const wxString& attrName ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxNullVariant) + return p->GetAttribute(attrName); + } + + /** Returns pointer of property's nearest parent category. If no category + found, returns NULL. + */ + wxPropertyCategory* GetPropertyCategory( wxPGPropArg id ) const + { + wxPG_PROP_ID_CONST_CALL_PROLOG_RETVAL(NULL) + return m_pState->GetPropertyCategory(p); + } + + /** Returns client data (void*) of a property. */ + void* GetPropertyClientData( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(NULL) + return p->GetClientData(); + } + + /** + Returns first property which label matches given string. + + NULL if none found. Note that this operation is extremely slow when + compared to GetPropertyByName(). + */ + wxPGProperty* GetPropertyByLabel( const wxString& label ) const; + + /** Returns property with given name. NULL if none found. + */ + wxPGProperty* GetPropertyByName( const wxString& name ) const; + + /** Returns child property 'subname' of property 'name'. Same as + calling GetPropertyByName("name.subname"), albeit slightly faster. + */ + wxPGProperty* GetPropertyByName( const wxString& name, + const wxString& subname ) const; + + /** Returns property's editor. */ + const wxPGEditor* GetPropertyEditor( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(NULL) + return p->GetEditorClass(); + } + + /** Returns help string associated with a property. */ + wxString GetPropertyHelpString( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(m_emptyString) + return p->GetHelpString(); + } + + /** Returns property's custom value image (NULL of none). */ + wxBitmap* GetPropertyImage( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(NULL) + return p->GetValueImage(); + } + + /** Returns label of a property. */ + const wxString& GetPropertyLabel( wxPGPropArg id ) + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(m_emptyString) + return p->GetLabel(); + } + + /** Returns name of a property, by which it is globally accessible. */ + wxString GetPropertyName( wxPGProperty* property ) + { + return property->GetName(); + } + + /** Returns parent item of a property. */ + wxPGProperty* GetPropertyParent( wxPGPropArg id ) + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxNullProperty) + return p->GetParent(); + } + +#if wxUSE_VALIDATORS + /** Returns validator of a property as a reference, which you + can pass to any number of SetPropertyValidator. + */ + wxValidator* GetPropertyValidator( wxPGPropArg id ) + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(NULL) + return p->GetValidator(); + } +#endif + + /** Returns value as wxVariant. To get wxObject pointer from it, + you will have to use WX_PG_VARIANT_TO_WXOBJECT(VARIANT,CLASSNAME) macro. + + If property value is unspecified, Null variant is returned. + */ + wxVariant GetPropertyValue( wxPGPropArg id ) + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxVariant()) + return p->GetValue(); + } + + wxString GetPropertyValueAsString( wxPGPropArg id ) const; + long GetPropertyValueAsLong( wxPGPropArg id ) const; + unsigned long GetPropertyValueAsULong( wxPGPropArg id ) const + { + return (unsigned long) GetPropertyValueAsLong(id); + } + int GetPropertyValueAsInt( wxPGPropArg id ) const + { return (int)GetPropertyValueAsLong(id); } + bool GetPropertyValueAsBool( wxPGPropArg id ) const; + double GetPropertyValueAsDouble( wxPGPropArg id ) const; + +#define wxPG_PROP_ID_GETPROPVAL_CALL_PROLOG_RETVAL(TYPENAME, DEFVAL) \ + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(DEFVAL) \ + wxString typeName(wxS(TYPENAME)); \ + wxVariant value = p->GetValue(); \ + if ( value.GetType() != typeName ) \ + { \ + wxPGGetFailed(p, typeName); \ + return DEFVAL; \ + } + +#define wxPG_PROP_ID_GETPROPVAL_CALL_PROLOG_RETVAL_WFALLBACK(TYPENAME, DEFVAL) \ + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(DEFVAL) \ + wxVariant value = p->GetValue(); \ + if ( value.GetType() != wxS(TYPENAME) ) \ + return DEFVAL; \ + + wxArrayString GetPropertyValueAsArrayString( wxPGPropArg id ) const + { + wxPG_PROP_ID_GETPROPVAL_CALL_PROLOG_RETVAL("arrstring", + wxArrayString()) + return value.GetArrayString(); + } + +#ifdef wxLongLong_t + wxLongLong_t GetPropertyValueAsLongLong( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(0) + return p->GetValue().GetLongLong().GetValue(); + } + + wxULongLong_t GetPropertyValueAsULongLong( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(0) + return p->GetValue().GetULongLong().GetValue(); + } +#endif + + wxArrayInt GetPropertyValueAsArrayInt( wxPGPropArg id ) const + { + wxPG_PROP_ID_GETPROPVAL_CALL_PROLOG_RETVAL("wxArrayInt", + wxArrayInt()) + wxArrayInt arr; + arr << value; + return arr; + } + +#if wxUSE_DATETIME + wxDateTime GetPropertyValueAsDateTime( wxPGPropArg id ) const + { + wxPG_PROP_ID_GETPROPVAL_CALL_PROLOG_RETVAL("datetime", + wxDateTime()) + return value.GetDateTime(); + } +#endif + + /** Returns a wxVariant list containing wxVariant versions of all + property values. Order is not guaranteed. + @param flags + Use wxPG_KEEP_STRUCTURE to retain category structure; each sub + category will be its own wxVariantList of wxVariant. + Use wxPG_INC_ATTRIBUTES to include property attributes as well. + Each attribute will be stored as list variant named + "@@<propname>@@attr." + @remarks + */ + wxVariant GetPropertyValues( const wxString& listname = wxEmptyString, + wxPGProperty* baseparent = NULL, long flags = 0 ) const + { + return m_pState->DoGetPropertyValues(listname, baseparent, flags); + } + + /** + Returns currently selected property. NULL if none. + + @remarks When wxPG_EX_MULTIPLE_SELECTION extra style is used, this + member function returns the focused property, that is the + one which can have active editor. + */ + wxPGProperty* GetSelection() const; + + /** + Returns list of currently selected properties. + + @remarks wxArrayPGProperty should be compatible with std::vector API. + */ + const wxArrayPGProperty& GetSelectedProperties() const + { + return m_pState->m_selection; + } + + wxPropertyGridPageState* GetState() const { return m_pState; } + + /** Similar to GetIterator(), but instead returns wxPGVIterator instance, + which can be useful for forward-iterating through arbitrary property + containers. + + @param flags + See @ref propgrid_iterator_flags. + */ + virtual wxPGVIterator GetVIterator( int flags ) const; + + /** Hides or reveals a property. + @param hide + If true, hides property, otherwise reveals it. + @param flags + By default changes are applied recursively. Set this paramter + wxPG_DONT_RECURSE to prevent this. + */ + bool HideProperty( wxPGPropArg id, + bool hide = true, + int flags = wxPG_RECURSE ); + +#if wxPG_INCLUDE_ADVPROPS + /** Initializes *all* property types. Causes references to most object + files in the library, so calling this may cause significant increase + in executable size when linking with static library. + */ + static void InitAllTypeHandlers(); +#else + static void InitAllTypeHandlers() { } +#endif + + //@{ + /** Inserts property to the property container. + + @param priorThis + New property is inserted just prior to this. Available only + in the first variant. There are two versions of this function + to allow this parameter to be either an id or name to + a property. + + @param newproperty + Pointer to the inserted property. wxPropertyGrid will take + ownership of this object. + + @param parent + New property is inserted under this category. Available only + in the second variant. There are two versions of this function + to allow this parameter to be either an id or name to + a property. + + @param index + Index under category. Available only in the second variant. + If index is < 0, property is appended in category. + + @return + Returns id for the property, + + @remarks + + - wxPropertyGrid takes the ownership of the property pointer. + + - While Append may be faster way to add items, make note that when + both types of data storage (categoric and + non-categoric) are active, Insert becomes even more slow. This is + especially true if current mode is non-categoric. + + Example of use: + + @code + + // append category + wxPGProperty* my_cat_id = propertygrid->Append( + new wxPropertyCategory("My Category") ); + + ... + + // insert into category - using second variant + wxPGProperty* my_item_id_1 = propertygrid->Insert( + my_cat_id, 0, new wxStringProperty("My String 1") ); + + // insert before to first item - using first variant + wxPGProperty* my_item_id_2 = propertygrid->Insert( + my_item_id, new wxStringProperty("My String 2") ); + + @endcode + + */ + wxPGProperty* Insert( wxPGPropArg priorThis, wxPGProperty* newproperty ); + wxPGProperty* Insert( wxPGPropArg parent, + int index, + wxPGProperty* newproperty ); + //@} + + /** Returns true if property is a category. */ + bool IsPropertyCategory( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) + return p->IsCategory(); + } + + /** Returns true if property is enabled. */ + bool IsPropertyEnabled( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) + return (!(p->GetFlags() & wxPG_PROP_DISABLED))?true:false; + } + + /** + Returns true if given property is expanded. + + Naturally, always returns false for properties that cannot be expanded. + */ + bool IsPropertyExpanded( wxPGPropArg id ) const; + + /** + Returns true if property has been modified after value set or modify + flag clear by software. + */ + bool IsPropertyModified( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) + return ( (p->GetFlags() & wxPG_PROP_MODIFIED) ? true : false ); + } + + /** + Returns true if property is selected. + */ + bool IsPropertySelected( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) + return m_pState->DoIsPropertySelected(p); + } + + /** + Returns true if property is shown (ie hideproperty with true not + called for it). + */ + bool IsPropertyShown( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) + return (!(p->GetFlags() & wxPG_PROP_HIDDEN))?true:false; + } + + /** Returns true if property value is set to unspecified. + */ + bool IsPropertyValueUnspecified( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false) + return p->IsValueUnspecified(); + } + + /** + Disables (limit = true) or enables (limit = false) wxTextCtrl editor of + a property, if it is not the sole mean to edit the value. + */ + void LimitPropertyEditing( wxPGPropArg id, bool limit = true ); + + /** If state is shown in it's grid, refresh it now. + */ + virtual void RefreshGrid( wxPropertyGridPageState* state = NULL ); + +#if wxPG_INCLUDE_ADVPROPS + /** + Initializes additional property editors (SpinCtrl etc.). Causes + references to most object files in the library, so calling this may + cause significant increase in executable size when linking with static + library. + */ + static void RegisterAdditionalEditors(); +#else + static void RegisterAdditionalEditors() { } +#endif + + /** Replaces property with id with newly created property. For example, + this code replaces existing property named "Flags" with one that + will have different set of items: + @code + pg->ReplaceProperty("Flags", + wxFlagsProperty("Flags", wxPG_LABEL, newItems)) + @endcode + For more info, see wxPropertyGrid::Insert. + */ + wxPGProperty* ReplaceProperty( wxPGPropArg id, wxPGProperty* property ); + + /** @anchor propgridinterface_editablestate_flags + + Flags for wxPropertyGridInterface::SaveEditableState() and + wxPropertyGridInterface::RestoreEditableState(). + */ + enum EditableStateFlags + { + /** Include selected property. */ + SelectionState = 0x01, + /** Include expanded/collapsed property information. */ + ExpandedState = 0x02, + /** Include scrolled position. */ + ScrollPosState = 0x04, + /** Include selected page information. + Only applies to wxPropertyGridManager. */ + PageState = 0x08, + /** Include splitter position. Stored for each page. */ + SplitterPosState = 0x10, + /** Include description box size. + Only applies to wxPropertyGridManager. */ + DescBoxState = 0x20, + + /** + Include all supported user editable state information. + This is usually the default value. */ + AllStates = SelectionState | + ExpandedState | + ScrollPosState | + PageState | + SplitterPosState | + DescBoxState + }; + + /** + Restores user-editable state. + + See also wxPropertyGridInterface::SaveEditableState(). + + @param src + String generated by SaveEditableState. + + @param restoreStates + Which parts to restore from source string. See @ref + propgridinterface_editablestate_flags "list of editable state + flags". + + @return + False if there was problem reading the string. + + @remarks + If some parts of state (such as scrolled or splitter position) fail to + restore correctly, please make sure that you call this function after + wxPropertyGrid size has been set (this may sometimes be tricky when + sizers are used). + */ + bool RestoreEditableState( const wxString& src, + int restoreStates = AllStates ); + + /** + Used to acquire user-editable state (selected property, expanded + properties, scrolled position, splitter positions). + + @param includedStates + Which parts of state to include. See @ref + propgridinterface_editablestate_flags "list of editable state flags". + */ + wxString SaveEditableState( int includedStates = AllStates ) const; + + /** + Lets user set the strings listed in the choice dropdown of a + wxBoolProperty. Defaults are "True" and "False", so changing them to, + say, "Yes" and "No" may be useful in some less technical applications. + */ + static void SetBoolChoices( const wxString& trueChoice, + const wxString& falseChoice ); + + /** + Set proportion of a auto-stretchable column. wxPG_SPLITTER_AUTO_CENTER + window style needs to be used to indicate that columns are auto- + resizable. + + @returns Returns @false on failure. + + @remarks You should call this for individual pages of + wxPropertyGridManager (if used). + + @see GetColumnProportion() + */ + bool SetColumnProportion( unsigned int column, int proportion ); + + /** + Returns auto-resize proportion of the given column. + + @see SetColumnProportion() + */ + int GetColumnProportion( unsigned int column ) const + { + return m_pState->DoGetColumnProportion(column); + } + + /** Sets an attribute for this property. + @param name + Text identifier of attribute. See @ref propgrid_property_attributes. + @param value + Value of attribute. + @param argFlags + Optional. Use wxPG_RECURSE to set the attribute to child properties + recursively. + */ + void SetPropertyAttribute( wxPGPropArg id, + const wxString& attrName, + wxVariant value, + long argFlags = 0 ) + { + DoSetPropertyAttribute(id,attrName,value,argFlags); + } + + /** Sets property attribute for all applicapple properties. + Be sure to use this method only after all properties have been + added to the grid. + */ + void SetPropertyAttributeAll( const wxString& attrName, wxVariant value ); + + /** + Sets background colour of a property. + + @param id + Property name or pointer. + + @param colour + New background colour. + + @param flags + Default is wxPG_RECURSE which causes colour to be set recursively. + Omit this flag to only set colour for the property in question + and not any of its children. + */ + void SetPropertyBackgroundColour( wxPGPropArg id, + const wxColour& colour, + int flags = wxPG_RECURSE ); + + /** Resets text and background colours of given property. + */ + void SetPropertyColoursToDefault( wxPGPropArg id ); + + /** + Sets text colour of a property. + + @param id + Property name or pointer. + + @param colour + New background colour. + + @param flags + Default is wxPG_RECURSE which causes colour to be set recursively. + Omit this flag to only set colour for the property in question + and not any of its children. + */ + void SetPropertyTextColour( wxPGPropArg id, + const wxColour& col, + int flags = wxPG_RECURSE ); + + /** + Returns background colour of first cell of a property. + */ + wxColour GetPropertyBackgroundColour( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxColour()) + return p->GetCell(0).GetBgCol(); + } + + /** + Returns text colour of first cell of a property. + */ + wxColour GetPropertyTextColour( wxPGPropArg id ) const + { + wxPG_PROP_ARG_CALL_PROLOG_RETVAL(wxColour()) + return p->GetCell(0).GetFgCol(); + } + + /** Sets text, bitmap, and colours for given column's cell. + + @remarks + - You can set label cell by setting column to 0. + - You can use wxPG_LABEL as text to use default text for column. + */ + void SetPropertyCell( wxPGPropArg id, + int column, + const wxString& text = wxEmptyString, + const wxBitmap& bitmap = wxNullBitmap, + const wxColour& fgCol = wxNullColour, + const wxColour& bgCol = wxNullColour ); + + /** Sets client data (void*) of a property. + @remarks + This untyped client data has to be deleted manually. + */ + void SetPropertyClientData( wxPGPropArg id, void* clientData ) + { + wxPG_PROP_ARG_CALL_PROLOG() + p->SetClientData(clientData); + } + + /** Sets editor for a property. + + @param editor + For builtin editors, use wxPGEditor_X, where X is builtin editor's + name (TextCtrl, Choice, etc. see wxPGEditor documentation for full + list). + + For custom editors, use pointer you received from + wxPropertyGrid::RegisterEditorClass(). + */ + void SetPropertyEditor( wxPGPropArg id, const wxPGEditor* editor ) + { + wxPG_PROP_ARG_CALL_PROLOG() + wxCHECK_RET( editor, wxT("unknown/NULL editor") ); + p->SetEditor(editor); + RefreshProperty(p); + } + + /** Sets editor control of a property. As editor argument, use + editor name string, such as "TextCtrl" or "Choice". + */ + void SetPropertyEditor( wxPGPropArg id, const wxString& editorName ) + { + SetPropertyEditor(id,GetEditorByName(editorName)); + } + + /** Sets label of a property. + */ + void SetPropertyLabel( wxPGPropArg id, const wxString& newproplabel ); + + /** + Sets name of a property. + + @param id + Name or pointer of property which name to change. + + @param newName + New name for property. + */ + void SetPropertyName( wxPGPropArg id, const wxString& newName ) + { + wxPG_PROP_ARG_CALL_PROLOG() + m_pState->DoSetPropertyName( p, newName ); + } + + /** + Sets property (and, recursively, its children) to have read-only value. + In other words, user cannot change the value in the editor, but they + can still copy it. + @remarks + This is mainly for use with textctrl editor. Not all other editors fully + support it. + @param flags + By default changes are applied recursively. Set this paramter + wxPG_DONT_RECURSE to prevent this. + */ + void SetPropertyReadOnly( wxPGPropArg id, + bool set = true, + int flags = wxPG_RECURSE ) + { + wxPG_PROP_ARG_CALL_PROLOG() + if ( flags & wxPG_RECURSE ) + p->SetFlagRecursively(wxPG_PROP_READONLY, set); + else + p->ChangeFlag(wxPG_PROP_READONLY, set); + } + + /** Sets property's value to unspecified. + If it has children (it may be category), then the same thing is done to + them. + */ + void SetPropertyValueUnspecified( wxPGPropArg id ) + { + wxPG_PROP_ARG_CALL_PROLOG() + p->SetValueToUnspecified(); + } + + /** + Sets property values from a list of wxVariants. + */ + void SetPropertyValues( const wxVariantList& list, + wxPGPropArg defaultCategory = wxNullProperty ) + { + wxPGProperty *p; + if ( defaultCategory.HasName() ) p = defaultCategory.GetPtr(this); + else p = defaultCategory.GetPtr0(); + m_pState->DoSetPropertyValues(list, p); + } + + /** + Sets property values from a list of wxVariants. + */ + void SetPropertyValues( const wxVariant& list, + wxPGPropArg defaultCategory = wxNullProperty ) + { + SetPropertyValues(list.GetList(),defaultCategory); + } + + /** Associates the help string with property. + @remarks + By default, text is shown either in the manager's "description" + text box or in the status bar. If extra window style + wxPG_EX_HELP_AS_TOOLTIPS is used, then the text will appear as a + tooltip. + */ + void SetPropertyHelpString( wxPGPropArg id, const wxString& helpString ) + { + wxPG_PROP_ARG_CALL_PROLOG() + p->SetHelpString(helpString); + } + + /** Set wxBitmap in front of the value. + @remarks + - Bitmap will be scaled to a size returned by + wxPropertyGrid::GetImageSize(); + */ + void SetPropertyImage( wxPGPropArg id, wxBitmap& bmp ) + { + wxPG_PROP_ARG_CALL_PROLOG() + p->SetValueImage(bmp); + RefreshProperty(p); + } + + /** Sets max length of property's text. + */ + bool SetPropertyMaxLength( wxPGPropArg id, int maxLen ); + +#if wxUSE_VALIDATORS + /** Sets validator of a property. + */ + void SetPropertyValidator( wxPGPropArg id, const wxValidator& validator ) + { + wxPG_PROP_ARG_CALL_PROLOG() + p->SetValidator(validator); + } +#endif + + /** Sets value (long integer) of a property. + */ + void SetPropertyValue( wxPGPropArg id, long value ) + { + wxVariant v(value); + SetPropVal( id, v ); + } + + /** Sets value (integer) of a property. + */ + void SetPropertyValue( wxPGPropArg id, int value ) + { + wxVariant v((long)value); + SetPropVal( id, v ); + } + /** Sets value (floating point) of a property. + */ + void SetPropertyValue( wxPGPropArg id, double value ) + { + wxVariant v(value); + SetPropVal( id, v ); + } + /** Sets value (bool) of a property. + */ + void SetPropertyValue( wxPGPropArg id, bool value ) + { + wxVariant v(value); + SetPropVal( id, v ); + } + void SetPropertyValue( wxPGPropArg id, const wchar_t* value ) + { + SetPropertyValueString( id, wxString(value) ); + } + void SetPropertyValue( wxPGPropArg id, const char* value ) + { + SetPropertyValueString( id, wxString(value) ); + } + void SetPropertyValue( wxPGPropArg id, const wxString& value ) + { + SetPropertyValueString( id, value ); + } + + /** Sets value (wxArrayString) of a property. + */ + void SetPropertyValue( wxPGPropArg id, const wxArrayString& value ) + { + wxVariant v(value); + SetPropVal( id, v ); + } + +#if wxUSE_DATETIME + void SetPropertyValue( wxPGPropArg id, const wxDateTime& value ) + { + wxVariant v(value); + SetPropVal( id, v ); + } +#endif + + /** Sets value (wxObject*) of a property. + */ + void SetPropertyValue( wxPGPropArg id, wxObject* value ) + { + wxVariant v(value); + SetPropVal( id, v ); + } + + void SetPropertyValue( wxPGPropArg id, wxObject& value ) + { + wxVariant v(&value); + SetPropVal( id, v ); + } + +#ifdef wxLongLong_t + /** Sets value (wxLongLong&) of a property. + */ + void SetPropertyValue( wxPGPropArg id, wxLongLong_t value ) + { + wxVariant v = WXVARIANT(wxLongLong(value)); + SetPropVal( id, v ); + } + /** Sets value (wxULongLong&) of a property. + */ + void SetPropertyValue( wxPGPropArg id, wxULongLong_t value ) + { + wxVariant v = WXVARIANT(wxULongLong(value)); + SetPropVal( id, v ); + } +#endif + + /** Sets value (wxArrayInt&) of a property. + */ + void SetPropertyValue( wxPGPropArg id, const wxArrayInt& value ) + { + wxVariant v = WXVARIANT(value); + SetPropVal( id, v ); + } + + /** Sets value (wxString) of a property. + + @remarks + This method uses wxPGProperty::SetValueFromString, which all properties + should implement. This means that there should not be a type error, + and instead the string is converted to property's actual value type. + */ + void SetPropertyValueString( wxPGPropArg id, const wxString& value ); + + /** Sets value (wxVariant&) of a property. + + @remarks + Use wxPropertyGrid::ChangePropertyValue() instead if you need to run + through validation process and send property change event. + */ + void SetPropertyValue( wxPGPropArg id, wxVariant value ) + { + SetPropVal( id, value ); + } + + /** Sets value (wxVariant&) of a property. Same as SetPropertyValue, but + accepts reference. */ + void SetPropVal( wxPGPropArg id, wxVariant& value ); + + /** Adjusts how wxPropertyGrid behaves when invalid value is entered + in a property. + @param vfbFlags + See @link vfbflags list of valid flags values@endlink + */ + void SetValidationFailureBehavior( int vfbFlags ); + + /** + Sorts all properties recursively. + + @param flags + This can contain any of the following options: + wxPG_SORT_TOP_LEVEL_ONLY: Only sort categories and their + immediate children. Sorting done by wxPG_AUTO_SORT option + uses this. + + @see SortChildren, wxPropertyGrid::SetSortFunction + */ + void Sort( int flags = 0 ); + + /** + Sorts children of a property. + + @param id + Name or pointer to a property. + + @param flags + This can contain any of the following options: + wxPG_RECURSE: Sorts recursively. + + @see Sort, wxPropertyGrid::SetSortFunction + */ + void SortChildren( wxPGPropArg id, int flags = 0 ) + { + wxPG_PROP_ARG_CALL_PROLOG() + m_pState->DoSortChildren(p, flags); + } + + // GetPropertyByName With nice assertion error message. + wxPGProperty* GetPropertyByNameA( const wxString& name ) const; + + static wxPGEditor* GetEditorByName( const wxString& editorName ); + + // NOTE: This function reselects the property and may cause + // excess flicker, so to just call Refresh() on a rect + // of single property, call DrawItem() instead. + virtual void RefreshProperty( wxPGProperty* p ) = 0; + +protected: + + bool DoClearSelection( bool validation = false, + int selFlags = 0 ); + + /** + In derived class, implement to set editable state component with + given name to given value. + */ + virtual bool SetEditableStateItem( const wxString& name, wxVariant value ) + { + wxUnusedVar(name); + wxUnusedVar(value); + return false; + } + + /** + In derived class, implement to return editable state component with + given name. + */ + virtual wxVariant GetEditableStateItem( const wxString& name ) const + { + wxUnusedVar(name); + return wxNullVariant; + } + + // Returns page state data for given (sub) page (-1 means current page). + virtual wxPropertyGridPageState* GetPageState( int pageIndex ) const + { + if ( pageIndex <= 0 ) + return m_pState; + return NULL; + } + + virtual bool DoSelectPage( int WXUNUSED(index) ) { return true; } + + // Default call's m_pState's BaseGetPropertyByName + virtual wxPGProperty* DoGetPropertyByName( const wxString& name ) const; + + // Deriving classes must set this (it must be only or current page). + wxPropertyGridPageState* m_pState; + + // Intermediate version needed due to wxVariant copying inefficiency + void DoSetPropertyAttribute( wxPGPropArg id, + const wxString& name, + wxVariant& value, long argFlags ); + + // Empty string object to return from member functions returning const + // wxString&. + wxString m_emptyString; + +private: + // Cannot be GetGrid() due to ambiguity issues. + wxPropertyGrid* GetPropertyGrid() + { + if ( !m_pState ) + return NULL; + return m_pState->GetGrid(); + } + + // Cannot be GetGrid() due to ambiguity issues. + const wxPropertyGrid* GetPropertyGrid() const + { + if ( !m_pState ) + return NULL; + + return m_pState->GetGrid(); + } + + friend class wxPropertyGrid; + friend class wxPropertyGridManager; +}; + +#endif // wxUSE_PROPGRID + +#endif // __WX_PROPGRID_PROPGRIDIFACE_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgridpagestate.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgridpagestate.h new file mode 100644 index 0000000000..77f38b2891 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/propgridpagestate.h @@ -0,0 +1,763 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/propgrid/propgridpagestate.h +// Purpose: wxPropertyGridPageState class +// Author: Jaakko Salli +// Modified by: +// Created: 2008-08-24 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROPGRID_PROPGRIDPAGESTATE_H_ +#define _WX_PROPGRID_PROPGRIDPAGESTATE_H_ + +#include "wx/defs.h" + +#if wxUSE_PROPGRID + +#include "wx/propgrid/property.h" + +// ----------------------------------------------------------------------- + +/** @section propgrid_hittestresult wxPropertyGridHitTestResult + + A return value from wxPropertyGrid::HitTest(), + contains all you need to know about an arbitrary location on the grid. +*/ +class WXDLLIMPEXP_PROPGRID wxPropertyGridHitTestResult +{ + friend class wxPropertyGridPageState; +public: + wxPropertyGridHitTestResult() + { + m_property = NULL; + m_column = -1; + m_splitter = -1; + m_splitterHitOffset = 0; + } + + ~wxPropertyGridHitTestResult() + { + } + + /** + Returns column hit. -1 for margin. + */ + int GetColumn() const { return m_column; } + + /** + Returns property hit. NULL if empty space below + properties was hit instead. + */ + wxPGProperty* GetProperty() const + { + return m_property; + } + + /** + Returns index of splitter hit, -1 for none. + */ + int GetSplitter() const { return m_splitter; } + + /** + If splitter hit, then this member function + returns offset to the exact splitter position. + */ + int GetSplitterHitOffset() const { return m_splitterHitOffset; } + +private: + /** Property. NULL if empty space below properties was hit */ + wxPGProperty* m_property; + + /** Column. -1 for margin. */ + int m_column; + + /** Index of splitter hit, -1 for none. */ + int m_splitter; + + /** If splitter hit, offset to that */ + int m_splitterHitOffset; +}; + +// ----------------------------------------------------------------------- + +#define wxPG_IT_CHILDREN(A) ((A)<<16) + +/** @section propgrid_iterator_flags wxPropertyGridIterator Flags + @{ + + NOTES: At lower 16-bits, there are flags to check if item will be included. + At higher 16-bits, there are same flags, but to instead check if children + will be included. +*/ + +enum wxPG_ITERATOR_FLAGS +{ + +/** + Iterate through 'normal' property items (does not include children of + aggregate or hidden items by default). +*/ +wxPG_ITERATE_PROPERTIES = wxPG_PROP_PROPERTY | + wxPG_PROP_MISC_PARENT | + wxPG_PROP_AGGREGATE | + wxPG_PROP_COLLAPSED | + wxPG_IT_CHILDREN(wxPG_PROP_MISC_PARENT) | + wxPG_IT_CHILDREN(wxPG_PROP_CATEGORY), + +/** Iterate children of collapsed parents, and individual items that are hidden. +*/ +wxPG_ITERATE_HIDDEN = wxPG_PROP_HIDDEN | + wxPG_IT_CHILDREN(wxPG_PROP_COLLAPSED), + +/** + Iterate children of parent that is an aggregate property (ie has fixed + children). +*/ +wxPG_ITERATE_FIXED_CHILDREN = wxPG_IT_CHILDREN(wxPG_PROP_AGGREGATE) | + wxPG_ITERATE_PROPERTIES, + +/** Iterate categories. + Note that even without this flag, children of categories are still iterated + through. +*/ +wxPG_ITERATE_CATEGORIES = wxPG_PROP_CATEGORY | + wxPG_IT_CHILDREN(wxPG_PROP_CATEGORY) | + wxPG_PROP_COLLAPSED, + +wxPG_ITERATE_ALL_PARENTS = wxPG_PROP_MISC_PARENT | + wxPG_PROP_AGGREGATE | + wxPG_PROP_CATEGORY, + +wxPG_ITERATE_ALL_PARENTS_RECURSIVELY = wxPG_ITERATE_ALL_PARENTS | + wxPG_IT_CHILDREN( + wxPG_ITERATE_ALL_PARENTS), + +wxPG_ITERATOR_FLAGS_ALL = wxPG_PROP_PROPERTY | + wxPG_PROP_MISC_PARENT | + wxPG_PROP_AGGREGATE | + wxPG_PROP_HIDDEN | + wxPG_PROP_CATEGORY | + wxPG_PROP_COLLAPSED, + +wxPG_ITERATOR_MASK_OP_ITEM = wxPG_ITERATOR_FLAGS_ALL, + +// (wxPG_PROP_MISC_PARENT|wxPG_PROP_AGGREGATE|wxPG_PROP_CATEGORY) +wxPG_ITERATOR_MASK_OP_PARENT = wxPG_ITERATOR_FLAGS_ALL, + +/** Combines all flags needed to iterate through visible properties + (ie hidden properties and children of collapsed parents are skipped). +*/ +wxPG_ITERATE_VISIBLE = wxPG_ITERATE_PROPERTIES | + wxPG_PROP_CATEGORY | + wxPG_IT_CHILDREN(wxPG_PROP_AGGREGATE), + +/** Iterate all items. +*/ +wxPG_ITERATE_ALL = wxPG_ITERATE_VISIBLE | + wxPG_ITERATE_HIDDEN, + +/** Iterate through individual properties (ie categories and children of + aggregate properties are skipped). +*/ +wxPG_ITERATE_NORMAL = wxPG_ITERATE_PROPERTIES | + wxPG_ITERATE_HIDDEN, + +/** Default iterator flags. +*/ +wxPG_ITERATE_DEFAULT = wxPG_ITERATE_NORMAL + +}; + +/** @} +*/ + + +#define wxPG_ITERATOR_CREATE_MASKS(FLAGS, A, B) \ + A = (FLAGS ^ wxPG_ITERATOR_MASK_OP_ITEM) & \ + wxPG_ITERATOR_MASK_OP_ITEM & 0xFFFF; \ + B = ((FLAGS>>16) ^ wxPG_ITERATOR_MASK_OP_PARENT) & \ + wxPG_ITERATOR_MASK_OP_PARENT & 0xFFFF; + + +// Macro to test if children of PWC should be iterated through +#define wxPG_ITERATOR_PARENTEXMASK_TEST(PWC, PARENTMASK) \ + ( \ + !(PWC->GetFlags() & PARENTMASK) && \ + PWC->GetChildCount() \ + ) + + +// Base for wxPropertyGridIterator classes. +class WXDLLIMPEXP_PROPGRID wxPropertyGridIteratorBase +{ +public: + wxPropertyGridIteratorBase() + { + } + + void Assign( const wxPropertyGridIteratorBase& it ); + + bool AtEnd() const { return m_property == NULL; } + + /** Get current property. + */ + wxPGProperty* GetProperty() const { return m_property; } + + void Init( wxPropertyGridPageState* state, + int flags, + wxPGProperty* property, + int dir = 1 ); + + void Init( wxPropertyGridPageState* state, + int flags, + int startPos = wxTOP, + int dir = 0 ); + + /** Iterate to the next property. + */ + void Next( bool iterateChildren = true ); + + /** Iterate to the previous property. + */ + void Prev(); + + /** + Set base parent, ie a property when, in which iteration returns, it + ends. + + Default base parent is the root of the used wxPropertyGridPageState. + */ + void SetBaseParent( wxPGProperty* baseParent ) + { m_baseParent = baseParent; } + +protected: + + wxPGProperty* m_property; + +private: + wxPropertyGridPageState* m_state; + wxPGProperty* m_baseParent; + + // Masks are used to quickly exclude items + int m_itemExMask; + int m_parentExMask; +}; + + +#define wxPG_IMPLEMENT_ITERATOR(CLASS, PROPERTY, STATE) \ + CLASS( STATE* state, int flags = wxPG_ITERATE_DEFAULT, \ + PROPERTY* property = NULL, int dir = 1 ) \ + : wxPropertyGridIteratorBase() \ + { Init( (wxPropertyGridPageState*)state, flags, \ + (wxPGProperty*)property, dir ); } \ + CLASS( STATE* state, int flags, int startPos, int dir = 0 ) \ + : wxPropertyGridIteratorBase() \ + { Init( (wxPropertyGridPageState*)state, flags, startPos, dir ); } \ + CLASS() \ + : wxPropertyGridIteratorBase() \ + { \ + m_property = NULL; \ + } \ + CLASS( const CLASS& it ) \ + : wxPropertyGridIteratorBase( ) \ + { \ + Assign(it); \ + } \ + ~CLASS() \ + { \ + } \ + const CLASS& operator=( const CLASS& it ) \ + { \ + if (this != &it) \ + Assign(it); \ + return *this; \ + } \ + CLASS& operator++() { Next(); return *this; } \ + CLASS operator++(int) { CLASS it=*this;Next();return it; } \ + CLASS& operator--() { Prev(); return *this; } \ + CLASS operator--(int) { CLASS it=*this;Prev();return it; } \ + PROPERTY* operator *() const { return (PROPERTY*)m_property; } \ + static PROPERTY* OneStep( STATE* state, \ + int flags = wxPG_ITERATE_DEFAULT, \ + PROPERTY* property = NULL, \ + int dir = 1 ) \ + { \ + CLASS it( state, flags, property, dir ); \ + if ( property ) \ + { \ + if ( dir == 1 ) it.Next(); \ + else it.Prev(); \ + } \ + return *it; \ + } + + +/** @class wxPropertyGridIterator + + Preferable way to iterate through contents of wxPropertyGrid, + wxPropertyGridManager, and wxPropertyGridPage. + + See wxPropertyGridInterface::GetIterator() for more information about usage. + + @library{wxpropgrid} + @category{propgrid} +*/ +class WXDLLIMPEXP_PROPGRID + wxPropertyGridIterator : public wxPropertyGridIteratorBase +{ +public: + + wxPG_IMPLEMENT_ITERATOR(wxPropertyGridIterator, + wxPGProperty, + wxPropertyGridPageState) + +protected: +}; + + +// Const version of wxPropertyGridIterator. +class WXDLLIMPEXP_PROPGRID + wxPropertyGridConstIterator : public wxPropertyGridIteratorBase +{ +public: + wxPG_IMPLEMENT_ITERATOR(wxPropertyGridConstIterator, + const wxPGProperty, + const wxPropertyGridPageState) + + /** + Additional copy constructor. + */ + wxPropertyGridConstIterator( const wxPropertyGridIterator& other ) + { + Assign(other); + } + + /** + Additional assignment operator. + */ + const wxPropertyGridConstIterator& operator=( const wxPropertyGridIterator& it ) + { + Assign(it); + return *this; + } + +protected: +}; + +// ----------------------------------------------------------------------- + +/** Base class to derive new viterators. +*/ +class WXDLLIMPEXP_PROPGRID wxPGVIteratorBase : public wxObjectRefData +{ + friend class wxPGVIterator; +public: + wxPGVIteratorBase() { } + virtual void Next() = 0; +protected: + virtual ~wxPGVIteratorBase() { } + + wxPropertyGridIterator m_it; +}; + +/** @class wxPGVIterator + + Abstract implementation of a simple iterator. Can only be used + to iterate in forward order, and only through the entire container. + Used to have functions dealing with all properties work with both + wxPropertyGrid and wxPropertyGridManager. +*/ +class WXDLLIMPEXP_PROPGRID wxPGVIterator +{ +public: + wxPGVIterator() { m_pIt = NULL; } + wxPGVIterator( wxPGVIteratorBase* obj ) { m_pIt = obj; } + ~wxPGVIterator() { UnRef(); } + void UnRef() { if (m_pIt) m_pIt->DecRef(); } + wxPGVIterator( const wxPGVIterator& it ) + { + m_pIt = it.m_pIt; + m_pIt->IncRef(); + } + const wxPGVIterator& operator=( const wxPGVIterator& it ) + { + if (this != &it) + { + UnRef(); + m_pIt = it.m_pIt; + m_pIt->IncRef(); + } + return *this; + } + void Next() { m_pIt->Next(); } + bool AtEnd() const { return m_pIt->m_it.AtEnd(); } + wxPGProperty* GetProperty() const { return m_pIt->m_it.GetProperty(); } +protected: + wxPGVIteratorBase* m_pIt; +}; + +// ----------------------------------------------------------------------- + +/** @class wxPropertyGridPageState + + Contains low-level property page information (properties, column widths, + etc) of a single wxPropertyGrid or single wxPropertyGridPage. Generally you + should not use this class directly, but instead member functions in + wxPropertyGridInterface, wxPropertyGrid, wxPropertyGridPage, and + wxPropertyGridManager. + + @remarks + - In separate wxPropertyGrid component this class was known as + wxPropertyGridState. + - Currently this class is not implemented in wxPython. + + @library{wxpropgrid} + @category{propgrid} +*/ +class WXDLLIMPEXP_PROPGRID wxPropertyGridPageState +{ + friend class wxPGProperty; + friend class wxPropertyGrid; + friend class wxPGCanvas; + friend class wxPropertyGridInterface; + friend class wxPropertyGridPage; + friend class wxPropertyGridManager; +public: + + /** Default constructor. */ + wxPropertyGridPageState(); + + /** Destructor. */ + virtual ~wxPropertyGridPageState(); + + /** Makes sure all columns have minimum width. + */ + void CheckColumnWidths( int widthChange = 0 ); + + /** + Override this member function to add custom behaviour on property + deletion. + */ + virtual void DoDelete( wxPGProperty* item, bool doDelete = true ); + + wxSize DoFitColumns( bool allowGridResize = false ); + + wxPGProperty* DoGetItemAtY( int y ) const; + + /** + Override this member function to add custom behaviour on property + insertion. + */ + virtual wxPGProperty* DoInsert( wxPGProperty* parent, + int index, + wxPGProperty* property ); + + /** + This needs to be overridden in grid used the manager so that splitter + changes can be propagated to other pages. + */ + virtual void DoSetSplitterPosition( int pos, + int splitterColumn = 0, + int flags = 0 ); + + bool EnableCategories( bool enable ); + + /** Make sure virtual height is up-to-date. + */ + void EnsureVirtualHeight() + { + if ( m_vhCalcPending ) + { + RecalculateVirtualHeight(); + m_vhCalcPending = 0; + } + } + + /** Returns (precalculated) height of contained visible properties. + */ + unsigned int GetVirtualHeight() const + { + wxASSERT( !m_vhCalcPending ); + return m_virtualHeight; + } + + /** Returns (precalculated) height of contained visible properties. + */ + unsigned int GetVirtualHeight() + { + EnsureVirtualHeight(); + return m_virtualHeight; + } + + /** Returns actual height of contained visible properties. + @remarks + Mostly used for internal diagnostic purposes. + */ + inline unsigned int GetActualVirtualHeight() const; + + unsigned int GetColumnCount() const + { + return (unsigned int) m_colWidths.size(); + } + + int GetColumnMinWidth( int column ) const; + + int GetColumnWidth( unsigned int column ) const + { + return m_colWidths[column]; + } + + wxPropertyGrid* GetGrid() const { return m_pPropGrid; } + + /** Returns last item which could be iterated using given flags. + @param flags + @link iteratorflags List of iterator flags@endlink + */ + wxPGProperty* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ); + + const wxPGProperty* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ) const + { + return ((wxPropertyGridPageState*)this)->GetLastItem(flags); + } + + /** + Returns currently selected property. + */ + wxPGProperty* GetSelection() const + { + if ( m_selection.size() == 0 ) + return NULL; + return m_selection[0]; + } + + void DoSetSelection( wxPGProperty* prop ) + { + m_selection.clear(); + if ( prop ) + m_selection.push_back(prop); + } + + bool DoClearSelection() + { + return DoSelectProperty(NULL); + } + + void DoRemoveFromSelection( wxPGProperty* prop ); + + void DoSetColumnProportion( unsigned int column, int proportion ); + + int DoGetColumnProportion( unsigned int column ) const + { + return m_columnProportions[column]; + } + + void ResetColumnSizes( int setSplitterFlags ); + + wxPropertyCategory* GetPropertyCategory( const wxPGProperty* p ) const; + + wxPGProperty* GetPropertyByLabel( const wxString& name, + wxPGProperty* parent = NULL ) const; + + wxVariant DoGetPropertyValues( const wxString& listname, + wxPGProperty* baseparent, + long flags ) const; + + wxPGProperty* DoGetRoot() const { return m_properties; } + + void DoSetPropertyName( wxPGProperty* p, const wxString& newName ); + + // Returns combined width of margin and all the columns + int GetVirtualWidth() const + { + return m_width; + } + + /** + Returns minimal width for given column so that all images and texts + will fit entirely. + + Used by SetSplitterLeft() and DoFitColumns(). + */ + int GetColumnFitWidth(wxClientDC& dc, + wxPGProperty* pwc, + unsigned int col, + bool subProps) const; + + int GetColumnFullWidth(wxClientDC &dc, wxPGProperty *p, unsigned int col); + + /** + Returns information about arbitrary position in the grid. + + @param pt + Logical coordinates in the virtual grid space. Use + wxScrolled<T>::CalcUnscrolledPosition() if you need to + translate a scrolled position into a logical one. + */ + wxPropertyGridHitTestResult HitTest( const wxPoint& pt ) const; + + /** Returns true if page is visibly displayed. + */ + inline bool IsDisplayed() const; + + bool IsInNonCatMode() const { return (bool)(m_properties == m_abcArray); } + + void DoLimitPropertyEditing( wxPGProperty* p, bool limit = true ) + { + p->SetFlagRecursively(wxPG_PROP_NOEDITOR, limit); + } + + bool DoSelectProperty( wxPGProperty* p, unsigned int flags = 0 ); + + /** widthChange is non-client. + */ + void OnClientWidthChange( int newWidth, + int widthChange, + bool fromOnResize = false ); + + /** Recalculates m_virtualHeight. + */ + void RecalculateVirtualHeight() + { + m_virtualHeight = GetActualVirtualHeight(); + } + + void SetColumnCount( int colCount ); + + void PropagateColSizeDec( int column, int decrease, int dir ); + + bool DoHideProperty( wxPGProperty* p, bool hide, int flags = wxPG_RECURSE ); + + bool DoSetPropertyValueString( wxPGProperty* p, const wxString& value ); + + bool DoSetPropertyValue( wxPGProperty* p, wxVariant& value ); + + bool DoSetPropertyValueWxObjectPtr( wxPGProperty* p, wxObject* value ); + void DoSetPropertyValues( const wxVariantList& list, + wxPGProperty* default_category ); + + void SetSplitterLeft( bool subProps = false ); + + /** Set virtual width for this particular page. */ + void SetVirtualWidth( int width ); + + void DoSortChildren( wxPGProperty* p, int flags = 0 ); + void DoSort( int flags = 0 ); + + bool PrepareAfterItemsAdded(); + + /** Called after virtual height needs to be recalculated. + */ + void VirtualHeightChanged() + { + m_vhCalcPending = 1; + } + + /** Base append. */ + wxPGProperty* DoAppend( wxPGProperty* property ); + + /** Returns property by its name. */ + wxPGProperty* BaseGetPropertyByName( const wxString& name ) const; + + /** Called in, for example, wxPropertyGrid::Clear. */ + void DoClear(); + + bool DoIsPropertySelected( wxPGProperty* prop ) const; + + bool DoCollapse( wxPGProperty* p ); + + bool DoExpand( wxPGProperty* p ); + + void CalculateFontAndBitmapStuff( int vspacing ); + +protected: + + // Utility to check if two properties are visibly next to each other + bool ArePropertiesAdjacent( wxPGProperty* prop1, + wxPGProperty* prop2, + int iterFlags = wxPG_ITERATE_VISIBLE ) const; + + int DoGetSplitterPosition( int splitterIndex = 0 ) const; + + /** Returns column at x coordinate (in GetGrid()->GetPanel()). + @param pSplitterHit + Give pointer to int that receives index to splitter that is at x. + @param pSplitterHitOffset + Distance from said splitter. + */ + int HitTestH( int x, int* pSplitterHit, int* pSplitterHitOffset ) const; + + bool PrepareToAddItem( wxPGProperty* property, + wxPGProperty* scheduledParent ); + + /** If visible, then this is pointer to wxPropertyGrid. + This shall *never* be NULL to indicate that this state is not visible. + */ + wxPropertyGrid* m_pPropGrid; + + /** Pointer to currently used array. */ + wxPGProperty* m_properties; + + /** Array for categoric mode. */ + wxPGRootProperty m_regularArray; + + /** Array for root of non-categoric mode. */ + wxPGRootProperty* m_abcArray; + + /** Dictionary for name-based access. */ + wxPGHashMapS2P m_dictName; + + /** List of column widths (first column does not include margin). */ + wxArrayInt m_colWidths; + + /** List of indices of columns the user can edit by clicking it. */ + wxArrayInt m_editableColumns; + + /** Column proportions */ + wxArrayInt m_columnProportions; + + double m_fSplitterX; + + /** Most recently added category. */ + wxPropertyCategory* m_currentCategory; + + /** Array of selected property. */ + wxArrayPGProperty m_selection; + + /** Virtual width. */ + int m_width; + + /** Indicates total virtual height of visible properties. */ + unsigned int m_virtualHeight; + + /** 1 if m_lastCaption is also the bottommost caption. */ + unsigned char m_lastCaptionBottomnest; + + /** 1 items appended/inserted, so stuff needs to be done before drawing; + If m_virtualHeight == 0, then calcylatey's must be done. + Otherwise just sort. + */ + unsigned char m_itemsAdded; + + /** 1 if any value is modified. */ + unsigned char m_anyModified; + + unsigned char m_vhCalcPending; + + /** True if splitter has been pre-set by the application. */ + bool m_isSplitterPreSet; + + /** Used to (temporarily) disable splitter centering. */ + bool m_dontCenterSplitter; + +private: + /** Only inits arrays, doesn't migrate things or such. */ + void InitNonCatMode(); +}; + +// ----------------------------------------------------------------------- + +#endif // wxUSE_PROPGRID + +#endif // _WX_PROPGRID_PROPGRIDPAGESTATE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/props.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/props.h new file mode 100644 index 0000000000..ea902d13e6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/propgrid/props.h @@ -0,0 +1,1029 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/propgrid/props.h +// Purpose: wxPropertyGrid Property Classes +// Author: Jaakko Salli +// Modified by: +// Created: 2007-03-28 +// Copyright: (c) Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROPGRID_PROPS_H_ +#define _WX_PROPGRID_PROPS_H_ + +#include "wx/defs.h" + +#if wxUSE_PROPGRID + +// ----------------------------------------------------------------------- + +class wxPGArrayEditorDialog; + +#include "wx/propgrid/editors.h" + +#include "wx/filename.h" +#include "wx/dialog.h" +#include "wx/textctrl.h" +#include "wx/button.h" +#include "wx/listbox.h" +#include "wx/valtext.h" + +// ----------------------------------------------------------------------- + +// +// Property class implementation helper macros. +// + +#define WX_PG_IMPLEMENT_PROPERTY_CLASS(NAME, UPCLASS, T, T_AS_ARG, EDITOR) \ +IMPLEMENT_DYNAMIC_CLASS(NAME, UPCLASS) \ +WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(NAME, T, EDITOR) + +// ----------------------------------------------------------------------- + +// +// These macros help creating DoGetValidator +#define WX_PG_DOGETVALIDATOR_ENTRY() \ + static wxValidator* s_ptr = NULL; \ + if ( s_ptr ) return s_ptr; + +// Common function exit +#define WX_PG_DOGETVALIDATOR_EXIT(VALIDATOR) \ + s_ptr = VALIDATOR; \ + wxPGGlobalVars->m_arrValidators.push_back( VALIDATOR ); \ + return VALIDATOR; + +// ----------------------------------------------------------------------- + +/** @class wxPGInDialogValidator + @ingroup classes + Creates and manages a temporary wxTextCtrl for validation purposes. + Uses wxPropertyGrid's current editor, if available. +*/ +class WXDLLIMPEXP_PROPGRID wxPGInDialogValidator +{ +public: + wxPGInDialogValidator() + { + m_textCtrl = NULL; + } + + ~wxPGInDialogValidator() + { + if ( m_textCtrl ) + m_textCtrl->Destroy(); + } + + bool DoValidate( wxPropertyGrid* propGrid, + wxValidator* validator, + const wxString& value ); + +private: + wxTextCtrl* m_textCtrl; +}; + + +// ----------------------------------------------------------------------- +// Property classes +// ----------------------------------------------------------------------- + +#define wxPG_PROP_PASSWORD wxPG_PROP_CLASS_SPECIFIC_2 + +/** @class wxStringProperty + @ingroup classes + Basic property with string value. + + <b>Supported special attributes:</b> + - "Password": set to 1 in order to enable wxTE_PASSWORD on the editor. + + @remarks + - If value "<composed>" is set, then actual value is formed (or composed) + from values of child properties. +*/ +class WXDLLIMPEXP_PROPGRID wxStringProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxStringProperty) +public: + wxStringProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxString& value = wxEmptyString ); + virtual ~wxStringProperty(); + + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int argFlags = 0 ) const; + + virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); + + /** This is updated so "<composed>" special value can be handled. + */ + virtual void OnSetValue(); + +protected: +}; + +// ----------------------------------------------------------------------- + +/** Constants used with NumericValidation<>(). +*/ +enum wxPGNumericValidationConstants +{ + /** Instead of modifying the value, show an error message. + */ + wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE = 0, + + /** Modify value, but stick with the limitations. + */ + wxPG_PROPERTY_VALIDATION_SATURATE = 1, + + /** Modify value, wrap around on overflow. + */ + wxPG_PROPERTY_VALIDATION_WRAP = 2 +}; + +// ----------------------------------------------------------------------- + +#if wxUSE_VALIDATORS + +/** + A more comprehensive numeric validator class. +*/ +class WXDLLIMPEXP_PROPGRID wxNumericPropertyValidator : public wxTextValidator +{ +public: + enum NumericType + { + Signed = 0, + Unsigned, + Float + }; + + wxNumericPropertyValidator( NumericType numericType, int base = 10 ); + virtual ~wxNumericPropertyValidator() { } + virtual bool Validate(wxWindow* parent); +}; + +#endif // wxUSE_VALIDATORS + + +/** @class wxIntProperty + @ingroup classes + Basic property with integer value. + + Seamlessly supports 64-bit integer (wxLongLong) on overflow. + + <b>Example how to use seamless 64-bit integer support</b> + + Getting value: + + @code + wxLongLong_t value = pg->GetPropertyValueAsLongLong(); + @endcode + + or + + @code + wxLongLong_t value; + wxVariant variant = property->GetValue(); + if ( variant.GetType() == "wxLongLong" ) + value = wxLongLongFromVariant(variant); + else + value = variant.GetLong(); + @endcode + + Setting value: + + @code + pg->SetPropertyValue(longLongVal); + @endcode + + or + + @code + property->SetValue(WXVARIANT(longLongVal)); + @endcode + + + <b>Supported special attributes:</b> + - "Min", "Max": Specify acceptable value range. +*/ +class WXDLLIMPEXP_PROPGRID wxIntProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxIntProperty) +public: + wxIntProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + long value = 0 ); + virtual ~wxIntProperty(); + + wxIntProperty( const wxString& label, + const wxString& name, + const wxLongLong& value ); + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int argFlags = 0 ) const; + virtual bool ValidateValue( wxVariant& value, + wxPGValidationInfo& validationInfo ) const; + virtual bool IntToValue( wxVariant& variant, + int number, + int argFlags = 0 ) const; + static wxValidator* GetClassValidator(); + virtual wxValidator* DoGetValidator() const; + + /** Validation helper. + */ + static bool DoValidation( const wxPGProperty* property, + wxLongLong_t& value, + wxPGValidationInfo* pValidationInfo, + int mode = + wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE ); + +protected: +}; + +// ----------------------------------------------------------------------- + +/** @class wxUIntProperty + @ingroup classes + Basic property with unsigned integer value. + Seamlessly supports 64-bit integer (wxULongLong) on overflow. + + <b>Supported special attributes:</b> + - "Min", "Max": Specify acceptable value range. + - "Base": Define base. Valid constants are wxPG_BASE_OCT, wxPG_BASE_DEC, + wxPG_BASE_HEX and wxPG_BASE_HEXL (lowercase characters). Arbitrary bases + are <b>not</b> supported. + - "Prefix": Possible values are wxPG_PREFIX_NONE, wxPG_PREFIX_0x, and + wxPG_PREFIX_DOLLAR_SIGN. Only wxPG_PREFIX_NONE works with Decimal and Octal + numbers. + + @remarks + - For example how to use seamless 64-bit integer support, see wxIntProperty + documentation (just use wxULongLong instead of wxLongLong). +*/ +class WXDLLIMPEXP_PROPGRID wxUIntProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxUIntProperty) +public: + wxUIntProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + unsigned long value = 0 ); + virtual ~wxUIntProperty(); + wxUIntProperty( const wxString& label, + const wxString& name, + const wxULongLong& value ); + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int argFlags = 0 ) const; + virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); + virtual bool ValidateValue( wxVariant& value, + wxPGValidationInfo& validationInfo ) const; + virtual wxValidator* DoGetValidator () const; + virtual bool IntToValue( wxVariant& variant, + int number, + int argFlags = 0 ) const; +protected: + wxByte m_base; + wxByte m_realBase; // translated to 8,16,etc. + wxByte m_prefix; +private: + void Init(); +}; + +// ----------------------------------------------------------------------- + +/** @class wxFloatProperty + @ingroup classes + Basic property with double-precision floating point value. + + <b>Supported special attributes:</b> + - "Precision": Sets the (max) precision used when floating point value is + rendered as text. The default -1 means infinite precision. +*/ +class WXDLLIMPEXP_PROPGRID wxFloatProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxFloatProperty) +public: + wxFloatProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + double value = 0.0 ); + virtual ~wxFloatProperty(); + + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int argFlags = 0 ) const; + virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); + virtual bool ValidateValue( wxVariant& value, + wxPGValidationInfo& validationInfo ) const; + + /** Validation helper. + */ + static bool DoValidation( const wxPGProperty* property, + double& value, + wxPGValidationInfo* pValidationInfo, + int mode = + wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE ); + static wxValidator* GetClassValidator(); + virtual wxValidator* DoGetValidator () const; + +protected: + int m_precision; +}; + +// ----------------------------------------------------------------------- + +/** @class wxBoolProperty + @ingroup classes + Basic property with boolean value. + + <b>Supported special attributes:</b> + - "UseCheckbox": Set to 1 to use check box editor instead of combo box. + - "UseDClickCycling": Set to 1 to cycle combo box instead showing the list. +*/ +class WXDLLIMPEXP_PROPGRID wxBoolProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxBoolProperty) +public: + wxBoolProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + bool value = false ); + virtual ~wxBoolProperty(); + + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int argFlags = 0 ) const; + virtual bool IntToValue( wxVariant& variant, + int number, int argFlags = 0 ) const; + virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); +}; + +// ----------------------------------------------------------------------- + +// If set, then selection of choices is static and should not be +// changed (i.e. returns NULL in GetPropertyChoices). +#define wxPG_PROP_STATIC_CHOICES wxPG_PROP_CLASS_SPECIFIC_1 + +/** @class wxEnumProperty + @ingroup classes + You can derive custom properties with choices from this class. See + wxBaseEnumProperty for remarks. + + @remarks + - Updating private index is important. You can do this either by calling + SetIndex() in IntToValue, and then letting wxBaseEnumProperty::OnSetValue + be called (by not implementing it, or by calling super class function in + it) -OR- you can just call SetIndex in OnSetValue. +*/ +class WXDLLIMPEXP_PROPGRID wxEnumProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxEnumProperty) +public: + +#ifndef SWIG + wxEnumProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxChar* const* labels = NULL, + const long* values = NULL, + int value = 0 ); + wxEnumProperty( const wxString& label, + const wxString& name, + wxPGChoices& choices, + int value = 0 ); + + // Special constructor for caching choices (used by derived class) + wxEnumProperty( const wxString& label, + const wxString& name, + const wxChar* const* labels, + const long* values, + wxPGChoices* choicesCache, + int value = 0 ); + + wxEnumProperty( const wxString& label, + const wxString& name, + const wxArrayString& labels, + const wxArrayInt& values = wxArrayInt(), + int value = 0 ); +#else + wxEnumProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxArrayString& labels = wxArrayString(), + const wxArrayInt& values = wxArrayInt(), + int value = 0 ); +#endif + + virtual ~wxEnumProperty(); + + size_t GetItemCount() const { return m_choices.GetCount(); } + + virtual void OnSetValue(); + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int argFlags = 0 ) const; + virtual bool ValidateValue( wxVariant& value, + wxPGValidationInfo& validationInfo ) const; + + // If wxPG_FULL_VALUE is not set in flags, then the value is interpreted + // as index to choices list. Otherwise, it is actual value. + virtual bool IntToValue( wxVariant& variant, + int number, + int argFlags = 0 ) const; + + // + // Additional virtuals + + // This must be overridden to have non-index based value + virtual int GetIndexForValue( int value ) const; + + // GetChoiceSelection needs to overridden since m_index is + // the true index, and various property classes derived from + // this take advantage of it. + virtual int GetChoiceSelection() const { return m_index; } + + virtual void OnValidationFailure( wxVariant& pendingValue ); + +protected: + + int GetIndex() const; + void SetIndex( int index ); + + bool ValueFromString_( wxVariant& value, + const wxString& text, + int argFlags ) const; + bool ValueFromInt_( wxVariant& value, int intVal, int argFlags ) const; + + static void ResetNextIndex() { ms_nextIndex = -2; } + +private: + // This is private so that classes are guaranteed to use GetIndex + // for up-to-date index value. + int m_index; + + // Relies on ValidateValue being called always before OnSetValue + static int ms_nextIndex; +}; + +// ----------------------------------------------------------------------- + +/** @class wxEditEnumProperty + @ingroup classes + wxEnumProperty with wxString value and writable combo box editor. + + @remarks + Uses int value, similar to wxEnumProperty, unless text entered by user is + is not in choices (in which case string value is used). +*/ +class WXDLLIMPEXP_PROPGRID wxEditEnumProperty : public wxEnumProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxEditEnumProperty) +public: + + wxEditEnumProperty( const wxString& label, + const wxString& name, + const wxChar* const* labels, + const long* values, + const wxString& value ); + wxEditEnumProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxArrayString& labels = wxArrayString(), + const wxArrayInt& values = wxArrayInt(), + const wxString& value = wxEmptyString ); + wxEditEnumProperty( const wxString& label, + const wxString& name, + wxPGChoices& choices, + const wxString& value = wxEmptyString ); + + // Special constructor for caching choices (used by derived class) + wxEditEnumProperty( const wxString& label, + const wxString& name, + const wxChar* const* labels, + const long* values, + wxPGChoices* choicesCache, + const wxString& value ); + + virtual ~wxEditEnumProperty(); + +protected: +}; + +// ----------------------------------------------------------------------- + +/** @class wxFlagsProperty + @ingroup classes + Represents a bit set that fits in a long integer. wxBoolProperty + sub-properties are created for editing individual bits. Textctrl is created + to manually edit the flags as a text; a continuous sequence of spaces, + commas and semicolons is considered as a flag id separator. + <b>Note:</b> When changing "choices" (ie. flag labels) of wxFlagsProperty, + you will need to use SetPropertyChoices - otherwise they will not get + updated properly. +*/ +class WXDLLIMPEXP_PROPGRID wxFlagsProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxFlagsProperty) +public: + +#ifndef SWIG + wxFlagsProperty( const wxString& label, + const wxString& name, + const wxChar* const* labels, + const long* values = NULL, + long value = 0 ); + wxFlagsProperty( const wxString& label, + const wxString& name, + wxPGChoices& choices, + long value = 0 ); +#endif + wxFlagsProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxArrayString& labels = wxArrayString(), + const wxArrayInt& values = wxArrayInt(), + int value = 0 ); + virtual ~wxFlagsProperty (); + + virtual void OnSetValue(); + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int flags ) const; + virtual wxVariant ChildChanged( wxVariant& thisValue, + int childIndex, + wxVariant& childValue ) const; + virtual void RefreshChildren(); + virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); + + // GetChoiceSelection needs to overridden since m_choices is + // used and value is integer, but it is not index. + virtual int GetChoiceSelection() const { return wxNOT_FOUND; } + + // helpers + size_t GetItemCount() const { return m_choices.GetCount(); } + const wxString& GetLabel( size_t ind ) const + { return m_choices.GetLabel(static_cast<int>(ind)); } + +protected: + // Used to detect if choices have been changed + wxPGChoicesData* m_oldChoicesData; + + // Needed to properly mark changed sub-properties + long m_oldValue; + + // Converts string id to a relevant bit. + long IdToBit( const wxString& id ) const; + + // Creates children and sets value. + void Init(); +}; + +// ----------------------------------------------------------------------- + +/** @class wxPGFileDialogAdapter + @ingroup classes +*/ +class WXDLLIMPEXP_PROPGRID + wxPGFileDialogAdapter : public wxPGEditorDialogAdapter +{ +public: + virtual bool DoShowDialog( wxPropertyGrid* propGrid, + wxPGProperty* property ); +}; + +// ----------------------------------------------------------------------- + +// Indicates first bit useable by derived properties. +#define wxPG_PROP_SHOW_FULL_FILENAME wxPG_PROP_CLASS_SPECIFIC_1 + +/** @class wxFileProperty + @ingroup classes + Like wxLongStringProperty, but the button triggers file selector instead. + + <b>Supported special attributes:</b> + - "Wildcard": Sets wildcard (see wxFileDialog for format details), "All + files..." is default. + - "ShowFullPath": Default 1. When 0, only the file name is shown (i.e. drive + and directory are hidden). + - "ShowRelativePath": If set, then the filename is shown relative to the + given path string. + - "InitialPath": Sets the initial path of where to look for files. + - "DialogTitle": Sets a specific title for the dir dialog. +*/ +class WXDLLIMPEXP_PROPGRID wxFileProperty : public wxPGProperty +{ + friend class wxPGFileDialogAdapter; + WX_PG_DECLARE_PROPERTY_CLASS(wxFileProperty) +public: + + wxFileProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxString& value = wxEmptyString ); + virtual ~wxFileProperty (); + + virtual void OnSetValue(); + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int argFlags = 0 ) const; + virtual wxPGEditorDialogAdapter* GetEditorDialog() const; + virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); + + static wxValidator* GetClassValidator(); + virtual wxValidator* DoGetValidator() const; + + /** + Returns filename to file represented by current value. + */ + wxFileName GetFileName() const; + +protected: + wxString m_wildcard; + wxString m_basePath; // If set, then show path relative to it + wxString m_initialPath; // If set, start the file dialog here + wxString m_dlgTitle; // If set, used as title for file dialog + int m_indFilter; // index to the selected filter +}; + +// ----------------------------------------------------------------------- + +#define wxPG_PROP_NO_ESCAPE wxPG_PROP_CLASS_SPECIFIC_1 + + +/** @class wxPGLongStringDialogAdapter + @ingroup classes +*/ +class WXDLLIMPEXP_PROPGRID + wxPGLongStringDialogAdapter : public wxPGEditorDialogAdapter +{ +public: + virtual bool DoShowDialog( wxPropertyGrid* propGrid, + wxPGProperty* property ); +}; + + +/** @class wxLongStringProperty + @ingroup classes + Like wxStringProperty, but has a button that triggers a small text + editor dialog. +*/ +class WXDLLIMPEXP_PROPGRID wxLongStringProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxLongStringProperty) +public: + + wxLongStringProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxString& value = wxEmptyString ); + virtual ~wxLongStringProperty(); + + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int argFlags = 0 ) const; + virtual bool OnEvent( wxPropertyGrid* propgrid, + wxWindow* primary, wxEvent& event ); + + // Shows string editor dialog. Value to be edited should be read from + // value, and if dialog is not cancelled, it should be stored back and true + // should be returned if that was the case. + virtual bool OnButtonClick( wxPropertyGrid* propgrid, wxString& value ); + + static bool DisplayEditorDialog( wxPGProperty* prop, + wxPropertyGrid* propGrid, + wxString& value ); + +protected: +}; + +// ----------------------------------------------------------------------- + + +/** @class wxDirProperty + @ingroup classes + Like wxLongStringProperty, but the button triggers dir selector instead. + + <b>Supported special attributes:</b> + - "DialogMessage": Sets specific message in the dir selector. +*/ +class WXDLLIMPEXP_PROPGRID wxDirProperty : public wxLongStringProperty +{ + DECLARE_DYNAMIC_CLASS(wxDirProperty) +public: + wxDirProperty( const wxString& name = wxPG_LABEL, + const wxString& label = wxPG_LABEL, + const wxString& value = wxEmptyString ); + virtual ~wxDirProperty(); + + virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); + virtual wxValidator* DoGetValidator() const; + + virtual bool OnButtonClick ( wxPropertyGrid* propGrid, wxString& value ); + +protected: + wxString m_dlgMessage; +}; + +// ----------------------------------------------------------------------- + +// wxBoolProperty specific flags +#define wxPG_PROP_USE_CHECKBOX wxPG_PROP_CLASS_SPECIFIC_1 +// DCC = Double Click Cycles +#define wxPG_PROP_USE_DCC wxPG_PROP_CLASS_SPECIFIC_2 + + +// ----------------------------------------------------------------------- + +/** @class wxArrayStringProperty + @ingroup classes + Property that manages a list of strings. +*/ +class WXDLLIMPEXP_PROPGRID wxArrayStringProperty : public wxPGProperty +{ + WX_PG_DECLARE_PROPERTY_CLASS(wxArrayStringProperty) +public: + wxArrayStringProperty( const wxString& label = wxPG_LABEL, + const wxString& name = wxPG_LABEL, + const wxArrayString& value = wxArrayString() ); + virtual ~wxArrayStringProperty(); + + virtual void OnSetValue(); + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; + virtual bool StringToValue( wxVariant& variant, + const wxString& text, + int argFlags = 0 ) const; + virtual bool OnEvent( wxPropertyGrid* propgrid, + wxWindow* primary, wxEvent& event ); + virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); + + // Implement in derived class for custom array-to-string conversion. + virtual void ConvertArrayToString(const wxArrayString& arr, + wxString* pString, + const wxUniChar& delimiter) const; + + // Shows string editor dialog. Value to be edited should be read from + // value, and if dialog is not cancelled, it should be stored back and true + // should be returned if that was the case. + virtual bool OnCustomStringEdit( wxWindow* parent, wxString& value ); + + // Helper. + virtual bool OnButtonClick( wxPropertyGrid* propgrid, + wxWindow* primary, + const wxChar* cbt ); + + // Creates wxPGArrayEditorDialog for string editing. Called in OnButtonClick. + virtual wxPGArrayEditorDialog* CreateEditorDialog(); + + enum ConversionFlags + { + Escape = 0x01, + QuoteStrings = 0x02 + }; + + /** + Generates contents for string dst based on the contents of + wxArrayString src. + */ + static void ArrayStringToString( wxString& dst, const wxArrayString& src, + wxUniChar delimiter, int flags ); + +protected: + // Previously this was to be implemented in derived class for array-to- + // string conversion. Now you should implement ConvertValueToString() + // instead. + virtual void GenerateValueAsString(); + + wxString m_display; // Cache for displayed text. + wxUniChar m_delimiter; +}; + +// ----------------------------------------------------------------------- + +#define WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR_WITH_DECL(PROPNAME, \ + DECL) \ +DECL PROPNAME : public wxArrayStringProperty \ +{ \ + WX_PG_DECLARE_PROPERTY_CLASS(PROPNAME) \ +public: \ + PROPNAME( const wxString& label = wxPG_LABEL, \ + const wxString& name = wxPG_LABEL, \ + const wxArrayString& value = wxArrayString() ); \ + ~PROPNAME(); \ + virtual bool OnEvent( wxPropertyGrid* propgrid, \ + wxWindow* primary, wxEvent& event ); \ + virtual bool OnCustomStringEdit( wxWindow* parent, wxString& value ); \ + virtual wxValidator* DoGetValidator() const; \ +}; + +#define WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAM) \ +WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAM, class) + +#define WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME, \ + DELIMCHAR, \ + CUSTBUTTXT) \ +WX_PG_IMPLEMENT_PROPERTY_CLASS(PROPNAME, wxArrayStringProperty, \ + wxArrayString, const wxArrayString&, \ + TextCtrlAndButton) \ +PROPNAME::PROPNAME( const wxString& label, \ + const wxString& name, \ + const wxArrayString& value ) \ + : wxArrayStringProperty(label,name,value) \ +{ \ + PROPNAME::GenerateValueAsString(); \ + m_delimiter = DELIMCHAR; \ +} \ +PROPNAME::~PROPNAME() { } \ +bool PROPNAME::OnEvent( wxPropertyGrid* propgrid, \ + wxWindow* primary, wxEvent& event ) \ +{ \ + if ( event.GetEventType() == wxEVT_BUTTON ) \ + return OnButtonClick(propgrid,primary,(const wxChar*) CUSTBUTTXT); \ + return false; \ +} + +#define WX_PG_DECLARE_ARRAYSTRING_PROPERTY(PROPNAME) \ +WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME) + +#define WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_DECL(PROPNAME, DECL) \ +WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR_WITH_DECL(PROPNAME, DECL) + +#define WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY(PROPNAME,DELIMCHAR,CUSTBUTTXT) \ +WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME, \ + DELIMCHAR, \ + CUSTBUTTXT) \ +wxValidator* PROPNAME::DoGetValidator () const \ +{ return NULL; } + + +// ----------------------------------------------------------------------- +// wxPGArrayEditorDialog +// ----------------------------------------------------------------------- + +#if wxUSE_EDITABLELISTBOX + +class WXDLLIMPEXP_FWD_ADV wxEditableListBox; +class WXDLLIMPEXP_FWD_CORE wxListEvent; + +#define wxAEDIALOG_STYLE \ + (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE) + +class WXDLLIMPEXP_PROPGRID wxPGArrayEditorDialog : public wxDialog +{ +public: + wxPGArrayEditorDialog(); + virtual ~wxPGArrayEditorDialog() { } + + void Init(); + + wxPGArrayEditorDialog( wxWindow *parent, + const wxString& message, + const wxString& caption, + long style = wxAEDIALOG_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize ); + + bool Create( wxWindow *parent, + const wxString& message, + const wxString& caption, + long style = wxAEDIALOG_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize ); + + void EnableCustomNewAction() + { + m_hasCustomNewAction = true; + } + + /** Set value modified by dialog. + */ + virtual void SetDialogValue( const wxVariant& WXUNUSED(value) ) + { + wxFAIL_MSG(wxT("re-implement this member function in derived class")); + } + + /** Return value modified by dialog. + */ + virtual wxVariant GetDialogValue() const + { + wxFAIL_MSG(wxT("re-implement this member function in derived class")); + return wxVariant(); + } + + /** Override to return wxValidator to be used with the wxTextCtrl + in dialog. Note that the validator is used in the standard + wx way, ie. it immediately prevents user from entering invalid + input. + + @remarks + Dialog frees the validator. + */ + virtual wxValidator* GetTextCtrlValidator() const + { + return NULL; + } + + // Returns true if array was actually modified + bool IsModified() const { return m_modified; } + + // wxEditableListBox utilities + int GetSelection() const; + + // implementation from now on + void OnAddClick(wxCommandEvent& event); + void OnDeleteClick(wxCommandEvent& event); + void OnUpClick(wxCommandEvent& event); + void OnDownClick(wxCommandEvent& event); + void OnEndLabelEdit(wxListEvent& event); + void OnIdle(wxIdleEvent& event); + +protected: + wxEditableListBox* m_elb; + + // These are used for focus repair + wxWindow* m_elbSubPanel; + wxWindow* m_lastFocused; + + // A new item, edited by user, is pending at this index. + // It will be committed once list ctrl item editing is done. + int m_itemPendingAtIndex; + + bool m_modified; + bool m_hasCustomNewAction; + + // These must be overridden - must return true on success. + virtual wxString ArrayGet( size_t index ) = 0; + virtual size_t ArrayGetCount() = 0; + virtual bool ArrayInsert( const wxString& str, int index ) = 0; + virtual bool ArraySet( size_t index, const wxString& str ) = 0; + virtual void ArrayRemoveAt( int index ) = 0; + virtual void ArraySwap( size_t first, size_t second ) = 0; + virtual bool OnCustomNewAction(wxString* WXUNUSED(resString)) + { + return false; + } + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxPGArrayEditorDialog) + DECLARE_EVENT_TABLE() +}; + +#endif // wxUSE_EDITABLELISTBOX + +// ----------------------------------------------------------------------- +// wxPGArrayStringEditorDialog +// ----------------------------------------------------------------------- + +class WXDLLIMPEXP_PROPGRID + wxPGArrayStringEditorDialog : public wxPGArrayEditorDialog +{ +public: + wxPGArrayStringEditorDialog(); + virtual ~wxPGArrayStringEditorDialog() { } + + void Init(); + + virtual void SetDialogValue( const wxVariant& value ) + { + m_array = value.GetArrayString(); + } + + virtual wxVariant GetDialogValue() const + { + return m_array; + } + + void SetCustomButton( const wxString& custBtText, + wxArrayStringProperty* pcc ) + { + if ( !custBtText.empty() ) + { + EnableCustomNewAction(); + m_pCallingClass = pcc; + } + } + + virtual bool OnCustomNewAction(wxString* resString); + +protected: + wxArrayString m_array; + + wxArrayStringProperty* m_pCallingClass; + + virtual wxString ArrayGet( size_t index ); + virtual size_t ArrayGetCount(); + virtual bool ArrayInsert( const wxString& str, int index ); + virtual bool ArraySet( size_t index, const wxString& str ); + virtual void ArrayRemoveAt( int index ); + virtual void ArraySwap( size_t first, size_t second ); + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxPGArrayStringEditorDialog) + DECLARE_EVENT_TABLE() +}; + +// ----------------------------------------------------------------------- + +#endif // wxUSE_PROPGRID + +#endif // _WX_PROPGRID_PROPS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/file.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/file.h new file mode 100644 index 0000000000..fd44ce593a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/file.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/protocol/file.h +// Purpose: File protocol +// Author: Guilhem Lavaux +// Modified by: +// Created: 1997 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_PROTO_FILE_H__ +#define __WX_PROTO_FILE_H__ + +#include "wx/defs.h" + +#if wxUSE_PROTOCOL_FILE + +#include "wx/protocol/protocol.h" + +class WXDLLIMPEXP_NET wxFileProto: public wxProtocol +{ +public: + wxFileProto(); + virtual ~wxFileProto(); + + bool Abort() { return true; } + wxString GetContentType() const { return wxEmptyString; } + + wxInputStream *GetInputStream(const wxString& path); + +protected: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxFileProto) + DECLARE_PROTOCOL(wxFileProto) +}; + +#endif // wxUSE_PROTOCOL_FILE + +#endif // __WX_PROTO_FILE_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/ftp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/ftp.h new file mode 100644 index 0000000000..a87a638066 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/ftp.h @@ -0,0 +1,176 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/protocol/ftp.h +// Purpose: FTP protocol +// Author: Vadim Zeitlin +// Modified by: Mark Johnson, wxWindows@mj10777.de +// 20000917 : RmDir, GetLastResult, GetList +// Created: 07/07/1997 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WX_FTP_H__ +#define __WX_FTP_H__ + +#include "wx/defs.h" + +#if wxUSE_PROTOCOL_FTP + +#include "wx/sckaddr.h" +#include "wx/protocol/protocol.h" +#include "wx/url.h" + +class WXDLLIMPEXP_NET wxFTP : public wxProtocol +{ +public: + enum TransferMode + { + NONE, // not set by user explicitly + ASCII, + BINARY + }; + + wxFTP(); + virtual ~wxFTP(); + + // Connecting and disconnecting + virtual bool Connect(const wxSockAddress& addr, bool wait = true); + virtual bool Connect(const wxString& host) { return Connect(host, 0); } + virtual bool Connect(const wxString& host, unsigned short port); + + // disconnect + virtual bool Close(); + + // Parameters set up + + // set transfer mode now + void SetPassive(bool pasv) { m_bPassive = pasv; } + bool SetBinary() { return SetTransferMode(BINARY); } + bool SetAscii() { return SetTransferMode(ASCII); } + bool SetTransferMode(TransferMode mode); + + // Generic FTP interface + + // FTP doesn't know the MIME type of the last downloaded/uploaded file + virtual wxString GetContentType() const { return wxEmptyString; } + + // the last FTP server reply + const wxString& GetLastResult() const { return m_lastResult; } + + // send any FTP command (should be full FTP command line but without + // trailing "\r\n") and return its return code + char SendCommand(const wxString& command); + + // check that the command returned the given code + bool CheckCommand(const wxString& command, char expectedReturn) + { + // SendCommand() does updates m_lastError + return SendCommand(command) == expectedReturn; + } + + // Filesystem commands + bool ChDir(const wxString& dir); + bool MkDir(const wxString& dir); + bool RmDir(const wxString& dir); + wxString Pwd(); + bool Rename(const wxString& src, const wxString& dst); + bool RmFile(const wxString& path); + + // Get the size of a file in the current dir. + // this function tries its best to deliver the size in bytes using BINARY + // (the SIZE command reports different sizes depending on whether + // type is set to ASCII or BINARY) + // returns -1 if file is non-existent or size could not be found + int GetFileSize(const wxString& fileName); + + // Check to see if a file exists in the current dir + bool FileExists(const wxString& fileName); + + // Download methods + bool Abort(); + + virtual wxInputStream *GetInputStream(const wxString& path); + virtual wxOutputStream *GetOutputStream(const wxString& path); + + // Directory listing + + // get the list of full filenames, the format is fixed: one file name per + // line + bool GetFilesList(wxArrayString& files, + const wxString& wildcard = wxEmptyString) + { + return GetList(files, wildcard, false); + } + + // get a directory list in server dependent format - this can be shown + // directly to the user + bool GetDirList(wxArrayString& files, + const wxString& wildcard = wxEmptyString) + { + return GetList(files, wildcard, true); + } + + // equivalent to either GetFilesList() (default) or GetDirList() + bool GetList(wxArrayString& files, + const wxString& wildcard = wxEmptyString, + bool details = false); + +protected: + // this executes a simple ftp command with the given argument and returns + // true if it its return code starts with '2' + bool DoSimpleCommand(const wxChar *command, + const wxString& arg = wxEmptyString); + + // get the server reply, return the first character of the reply code, + // '1'..'5' for normal FTP replies, 0 (*not* '0') if an error occurred + char GetResult(); + + // check that the result is equal to expected value + bool CheckResult(char ch) { return GetResult() == ch; } + + // return the socket to be used, Passive/Active versions are used only by + // GetPort() + wxSocketBase *GetPort(); + wxSocketBase *GetPassivePort(); + wxSocketBase *GetActivePort(); + + // helper for GetPort() + wxString GetPortCmdArgument(const wxIPV4address& Local, const wxIPV4address& New); + + // accept connection from server in active mode, returns the same socket as + // passed in passive mode + wxSocketBase *AcceptIfActive(wxSocketBase *sock); + + + // internal variables: + + wxString m_lastResult; + + // true if there is an FTP transfer going on + bool m_streaming; + + // although this should be set to ASCII by default according to STD9, + // we will use BINARY transfer mode by default for backwards compatibility + TransferMode m_currentTransfermode; + + bool m_bPassive; + + // following is true when a read or write times out, we then assume + // the connection is dead and abort. we avoid additional delays this way + bool m_bEncounteredError; + + + friend class wxInputFTPStream; + friend class wxOutputFTPStream; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxFTP) + DECLARE_PROTOCOL(wxFTP) +}; + +// the trace mask used by assorted wxLogTrace() in ftp code, do +// wxLog::AddTraceMask(FTP_TRACE_MASK) to see them in output +#define FTP_TRACE_MASK wxT("ftp") + +#endif // wxUSE_PROTOCOL_FTP + +#endif // __WX_FTP_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/http.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/http.h new file mode 100644 index 0000000000..cfa2e6f944 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/http.h @@ -0,0 +1,96 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/protocol/http.h +// Purpose: HTTP protocol +// Author: Guilhem Lavaux +// Modified by: Simo Virokannas (authentication, Dec 2005) +// Created: August 1997 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// +#ifndef _WX_HTTP_H +#define _WX_HTTP_H + +#include "wx/defs.h" + +#if wxUSE_PROTOCOL_HTTP + +#include "wx/hashmap.h" +#include "wx/protocol/protocol.h" +#include "wx/buffer.h" + +class WXDLLIMPEXP_NET wxHTTP : public wxProtocol +{ +public: + wxHTTP(); + virtual ~wxHTTP(); + + virtual bool Connect(const wxString& host, unsigned short port); + virtual bool Connect(const wxString& host) { return Connect(host, 0); } + virtual bool Connect(const wxSockAddress& addr, bool wait); + bool Abort(); + + wxInputStream *GetInputStream(const wxString& path); + + wxString GetContentType() const; + wxString GetHeader(const wxString& header) const; + int GetResponse() const { return m_http_response; } + + void SetMethod(const wxString& method) { m_method = method; } + void SetHeader(const wxString& header, const wxString& h_data); + bool SetPostText(const wxString& contentType, + const wxString& data, + const wxMBConv& conv = wxConvUTF8); + bool SetPostBuffer(const wxString& contentType, const wxMemoryBuffer& data); + void SetProxyMode(bool on); + + /* Cookies */ + wxString GetCookie(const wxString& cookie) const; + bool HasCookies() const { return m_cookies.size() > 0; } + + // Use the other SetPostBuffer() overload or SetPostText() instead. + wxDEPRECATED(void SetPostBuffer(const wxString& post_buf)); + +protected: + typedef wxStringToStringHashMap::iterator wxHeaderIterator; + typedef wxStringToStringHashMap::const_iterator wxHeaderConstIterator; + typedef wxStringToStringHashMap::iterator wxCookieIterator; + typedef wxStringToStringHashMap::const_iterator wxCookieConstIterator; + + bool BuildRequest(const wxString& path, const wxString& method); + void SendHeaders(); + bool ParseHeaders(); + + wxString GenerateAuthString(const wxString& user, const wxString& pass) const; + + // find the header in m_headers + wxHeaderIterator FindHeader(const wxString& header); + wxHeaderConstIterator FindHeader(const wxString& header) const; + wxCookieIterator FindCookie(const wxString& cookie); + wxCookieConstIterator FindCookie(const wxString& cookie) const; + + // deletes the header value strings + void ClearHeaders(); + void ClearCookies(); + + // internal variables: + + wxString m_method; + wxStringToStringHashMap m_cookies; + + wxStringToStringHashMap m_headers; + bool m_read, + m_proxy_mode; + wxSockAddress *m_addr; + wxMemoryBuffer m_postBuffer; + wxString m_contentType; + int m_http_response; + + DECLARE_DYNAMIC_CLASS(wxHTTP) + DECLARE_PROTOCOL(wxHTTP) + wxDECLARE_NO_COPY_CLASS(wxHTTP); +}; + +#endif // wxUSE_PROTOCOL_HTTP + +#endif // _WX_HTTP_H + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/log.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/log.h new file mode 100644 index 0000000000..df373b928f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/log.h @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/protocol/log.h +// Purpose: wxProtocolLog class for logging network exchanges +// Author: Troelsk, Vadim Zeitlin +// Created: 2009-03-06 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROTOCOL_LOG_H_ +#define _WX_PROTOCOL_LOG_H_ + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// wxProtocolLog: simple class for logging network requests and responses +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_NET wxProtocolLog +{ +public: + // Create object doing the logging using wxLogTrace() with the specified + // trace mask. + wxProtocolLog(const wxString& traceMask) + : m_traceMask(traceMask) + { + } + + // Virtual dtor for the base class + virtual ~wxProtocolLog() { } + + // Called by wxProtocol-derived classes to actually log something + virtual void LogRequest(const wxString& str) + { + DoLogString("==> " + str); + } + + virtual void LogResponse(const wxString& str) + { + DoLogString("<== " + str); + } + +protected: + // Can be overridden by the derived classes. + virtual void DoLogString(const wxString& str); + +private: + const wxString m_traceMask; + + wxDECLARE_NO_COPY_CLASS(wxProtocolLog); +}; + +#endif // _WX_PROTOCOL_LOG_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/protocol.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/protocol.h new file mode 100644 index 0000000000..e6a32ef55c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/protocol/protocol.h @@ -0,0 +1,177 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/protocol/protocol.h +// Purpose: Protocol base class +// Author: Guilhem Lavaux +// Modified by: +// Created: 10/07/1997 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PROTOCOL_PROTOCOL_H +#define _WX_PROTOCOL_PROTOCOL_H + +#include "wx/defs.h" + +#if wxUSE_PROTOCOL + +#include "wx/object.h" +#include "wx/string.h" +#include "wx/stream.h" + +#if wxUSE_SOCKETS + #include "wx/socket.h" +#endif + +class WXDLLIMPEXP_FWD_NET wxProtocolLog; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +typedef enum +{ + wxPROTO_NOERR = 0, + wxPROTO_NETERR, + wxPROTO_PROTERR, + wxPROTO_CONNERR, + wxPROTO_INVVAL, + wxPROTO_NOHNDLR, + wxPROTO_NOFILE, + wxPROTO_ABRT, + wxPROTO_RCNCT, + wxPROTO_STREAMING +} wxProtocolError; + +// ---------------------------------------------------------------------------- +// wxProtocol: abstract base class for all protocols +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_NET wxProtocol +#if wxUSE_SOCKETS + : public wxSocketClient +#else + : public wxObject +#endif +{ +public: + wxProtocol(); + virtual ~wxProtocol(); + +#if wxUSE_SOCKETS + bool Reconnect(); + virtual bool Connect( const wxString& WXUNUSED(host) ) { return false; } + virtual bool Connect( const wxSockAddress& addr, bool WXUNUSED(wait) = true) + { return wxSocketClient::Connect(addr); } + + // read a '\r\n' terminated line from the given socket and put it in + // result (without the terminators) + static wxProtocolError ReadLine(wxSocketBase *socket, wxString& result); + + // read a line from this socket - this one can be overridden in the + // derived classes if different line termination convention is to be used + virtual wxProtocolError ReadLine(wxString& result); +#endif // wxUSE_SOCKETS + + virtual bool Abort() = 0; + virtual wxInputStream *GetInputStream(const wxString& path) = 0; + virtual wxString GetContentType() const = 0; + + // the error code + virtual wxProtocolError GetError() const { return m_lastError; } + + void SetUser(const wxString& user) { m_username = user; } + void SetPassword(const wxString& passwd) { m_password = passwd; } + + virtual void SetDefaultTimeout(wxUint32 Value); + + // override wxSocketBase::SetTimeout function to avoid that the internal + // m_uiDefaultTimeout goes out-of-sync: + virtual void SetTimeout(long seconds) + { SetDefaultTimeout(seconds); } + + + // logging support: each wxProtocol object may have the associated logger + // (by default there is none) which is used to log network requests and + // responses + + // set the logger, deleting the old one and taking ownership of this one + void SetLog(wxProtocolLog *log); + + // return the current logger, may be NULL + wxProtocolLog *GetLog() const { return m_log; } + + // detach the existing logger without deleting it, the caller is + // responsible for deleting the returned pointer if it's non-NULL + wxProtocolLog *DetachLog() + { + wxProtocolLog * const log = m_log; + m_log = NULL; + return log; + } + + // these functions forward to the same functions with the same names in + // wxProtocolLog if we have a valid logger and do nothing otherwise + void LogRequest(const wxString& str); + void LogResponse(const wxString& str); + +protected: + // the timeout associated with the protocol: + wxUint32 m_uiDefaultTimeout; + + wxString m_username; + wxString m_password; + + // this must be always updated by the derived classes! + wxProtocolError m_lastError; + +private: + wxProtocolLog *m_log; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxProtocol) +}; + +// ---------------------------------------------------------------------------- +// macros for protocol classes +// ---------------------------------------------------------------------------- + +#define DECLARE_PROTOCOL(class) \ +public: \ + static wxProtoInfo g_proto_##class; + +#define IMPLEMENT_PROTOCOL(class, name, serv, host) \ +wxProtoInfo class::g_proto_##class(name, serv, host, wxCLASSINFO(class)); \ +bool wxProtocolUse##class = true; + +#define USE_PROTOCOL(class) \ + extern bool wxProtocolUse##class ; \ + static struct wxProtocolUserFor##class \ + { \ + wxProtocolUserFor##class() { wxProtocolUse##class = true; } \ + } wxProtocolDoUse##class; + +class WXDLLIMPEXP_NET wxProtoInfo : public wxObject +{ +public: + wxProtoInfo(const wxChar *name, + const wxChar *serv_name, + const bool need_host1, + wxClassInfo *info); + +protected: + wxProtoInfo *next; + wxString m_protoname; + wxString prefix; + wxString m_servname; + wxClassInfo *m_cinfo; + bool m_needhost; + + friend class wxURL; + + DECLARE_DYNAMIC_CLASS(wxProtoInfo) + wxDECLARE_NO_COPY_CLASS(wxProtoInfo); +}; + +#endif // wxUSE_PROTOCOL + +#endif // _WX_PROTOCOL_PROTOCOL_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ptr_scpd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ptr_scpd.h new file mode 100644 index 0000000000..76d8e42146 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ptr_scpd.h @@ -0,0 +1,13 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ptr_scpd.h +// Purpose: compatibility wrapper for wxScoped{Ptr,Array} +// Author: Vadim Zeitlin +// Created: 2009-02-03 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// do not include this file in any new code, include either wx/scopedptr.h or +// wx/scopedarray.h (or both) instead +#include "wx/scopedarray.h" +#include "wx/scopedptr.h" diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ptr_shrd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ptr_shrd.h new file mode 100644 index 0000000000..635cfe36e0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ptr_shrd.h @@ -0,0 +1,11 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ptr_shrd.h +// Purpose: compatibility wrapper for wx/sharedptr.h +// Author: Vadim Zeitlin +// Created: 2009-02-03 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// do not include this file in any new code, include wx/sharedptr.h instead +#include "wx/sharedptr.h" diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/quantize.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/quantize.h new file mode 100644 index 0000000000..d323a3504c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/quantize.h @@ -0,0 +1,75 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/quantize.h +// Purpose: wxQuantizer class +// Author: Julian Smart +// Modified by: +// Created: 22/6/2000 +// Copyright: (c) Julian Smart +// Licence: +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_QUANTIZE_H_ +#define _WX_QUANTIZE_H_ + +#include "wx/object.h" + +/* + * From jquant2.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + */ + +class WXDLLIMPEXP_FWD_CORE wxImage; +class WXDLLIMPEXP_FWD_CORE wxPalette; + +/* + * wxQuantize + * Based on the JPEG quantization code. Reduces the number of colours in a wxImage. + */ + +#define wxQUANTIZE_INCLUDE_WINDOWS_COLOURS 0x01 +#define wxQUANTIZE_RETURN_8BIT_DATA 0x02 +#define wxQUANTIZE_FILL_DESTINATION_IMAGE 0x04 + +class WXDLLIMPEXP_CORE wxQuantize: public wxObject +{ +public: +DECLARE_DYNAMIC_CLASS(wxQuantize) + +//// Constructor + + wxQuantize() {} + virtual ~wxQuantize() {} + +//// Operations + + // Reduce the colours in the source image and put the result into the + // destination image. Both images may be the same, to overwrite the source image. + // Specify an optional palette pointer to receive the resulting palette. + // This palette may be passed to ConvertImageToBitmap, for example. + // If you pass a palette pointer, you must free the palette yourself. + + static bool Quantize(const wxImage& src, wxImage& dest, wxPalette** pPalette, int desiredNoColours = 236, + unsigned char** eightBitData = 0, int flags = wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE|wxQUANTIZE_RETURN_8BIT_DATA); + + // This version sets a palette in the destination image so you don't + // have to manage it yourself. + + static bool Quantize(const wxImage& src, wxImage& dest, int desiredNoColours = 236, + unsigned char** eightBitData = 0, int flags = wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE|wxQUANTIZE_RETURN_8BIT_DATA); + +//// Helpers + + // Converts input bitmap(s) into 8bit representation with custom palette + + // in_rows and out_rows are arrays [0..h-1] of pointer to rows + // (in_rows contains w * 3 bytes per row, out_rows w bytes per row) + // fills out_rows with indexes into palette (which is also stored into palette variable) + static void DoQuantize(unsigned w, unsigned h, unsigned char **in_rows, unsigned char **out_rows, unsigned char *palette, int desiredNoColours); + +}; + +#endif + // _WX_QUANTIZE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/radiobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/radiobox.h new file mode 100644 index 0000000000..acfa9e8f8a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/radiobox.h @@ -0,0 +1,174 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/radiobox.h +// Purpose: wxRadioBox declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 10.09.00 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RADIOBOX_H_BASE_ +#define _WX_RADIOBOX_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_RADIOBOX + +#include "wx/ctrlsub.h" + +#if wxUSE_TOOLTIPS + +#include "wx/dynarray.h" + +class WXDLLIMPEXP_FWD_CORE wxToolTip; + +WX_DEFINE_EXPORTED_ARRAY_PTR(wxToolTip *, wxToolTipArray); + +#endif // wxUSE_TOOLTIPS + +extern WXDLLIMPEXP_DATA_CORE(const char) wxRadioBoxNameStr[]; + +// ---------------------------------------------------------------------------- +// wxRadioBoxBase is not a normal base class, but rather a mix-in because the +// real wxRadioBox derives from different classes on different platforms: for +// example, it is a wxStaticBox in wxUniv and wxMSW but not in other ports +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRadioBoxBase : public wxItemContainerImmutable +{ +public: + virtual ~wxRadioBoxBase(); + + // change/query the individual radio button state + virtual bool Enable(unsigned int n, bool enable = true) = 0; + virtual bool Show(unsigned int n, bool show = true) = 0; + virtual bool IsItemEnabled(unsigned int n) const = 0; + virtual bool IsItemShown(unsigned int n) const = 0; + + // return number of columns/rows in this radiobox + unsigned int GetColumnCount() const { return m_numCols; } + unsigned int GetRowCount() const { return m_numRows; } + + // return the next active (i.e. shown and not disabled) item above/below/to + // the left/right of the given one + int GetNextItem(int item, wxDirection dir, long style) const; + +#if wxUSE_TOOLTIPS + // set the tooltip text for a radio item, empty string unsets any tooltip + void SetItemToolTip(unsigned int item, const wxString& text); + + // get the individual items tooltip; returns NULL if none + wxToolTip *GetItemToolTip(unsigned int item) const + { return m_itemsTooltips ? (*m_itemsTooltips)[item] : NULL; } +#endif // wxUSE_TOOLTIPS + +#if wxUSE_HELP + // set helptext for a particular item, pass an empty string to erase it + void SetItemHelpText(unsigned int n, const wxString& helpText); + + // retrieve helptext for a particular item, empty string means no help text + wxString GetItemHelpText(unsigned int n) const; +#else // wxUSE_HELP + // just silently ignore the help text, it's better than requiring using + // conditional compilation in all code using this function + void SetItemHelpText(unsigned int WXUNUSED(n), + const wxString& WXUNUSED(helpText)) + { + } +#endif // wxUSE_HELP + + // returns the radio item at the given position or wxNOT_FOUND if none + // (currently implemented only under MSW and GTK) + virtual int GetItemFromPoint(const wxPoint& WXUNUSED(pt)) const + { + return wxNOT_FOUND; + } + + +protected: + wxRadioBoxBase() + { + m_numCols = + m_numRows = + m_majorDim = 0; + +#if wxUSE_TOOLTIPS + m_itemsTooltips = NULL; +#endif // wxUSE_TOOLTIPS + } + + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // return the number of items in major direction (which depends on whether + // we have wxRA_SPECIFY_COLS or wxRA_SPECIFY_ROWS style) + unsigned int GetMajorDim() const { return m_majorDim; } + + // sets m_majorDim and also updates m_numCols/Rows + // + // the style parameter should be the style of the radiobox itself + void SetMajorDim(unsigned int majorDim, long style); + +#if wxUSE_TOOLTIPS + // called from SetItemToolTip() to really set the tooltip for the specified + // item in the box (or, if tooltip is NULL, to remove any existing one). + // + // NB: this function should really be pure virtual but to avoid breaking + // the build of the ports for which it's not implemented yet we provide + // an empty stub in the base class for now + virtual void DoSetItemToolTip(unsigned int item, wxToolTip *tooltip); + + // returns true if we have any item tooltips + bool HasItemToolTips() const { return m_itemsTooltips != NULL; } +#endif // wxUSE_TOOLTIPS + +#if wxUSE_HELP + // Retrieve help text for an item: this is a helper for the implementation + // of wxWindow::GetHelpTextAtPoint() in the real radiobox class + wxString DoGetHelpTextAtPoint(const wxWindow *derived, + const wxPoint& pt, + wxHelpEvent::Origin origin) const; +#endif // wxUSE_HELP + +private: + // the number of elements in major dimension (i.e. number of columns if + // wxRA_SPECIFY_COLS or the number of rows if wxRA_SPECIFY_ROWS) and also + // the number of rows/columns calculated from it + unsigned int m_majorDim, + m_numCols, + m_numRows; + +#if wxUSE_TOOLTIPS + // array of tooltips for the individual items + // + // this array is initially NULL and initialized on first use + wxToolTipArray *m_itemsTooltips; +#endif + +#if wxUSE_HELP + // help text associated with a particular item or empty string if none + wxArrayString m_itemsHelpTexts; +#endif // wxUSE_HELP +}; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/radiobox.h" +#elif defined(__WXMSW__) + #include "wx/msw/radiobox.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/radiobox.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/radiobox.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/radiobox.h" +#elif defined(__WXMAC__) + #include "wx/osx/radiobox.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/radiobox.h" +#elif defined(__WXPM__) + #include "wx/os2/radiobox.h" +#endif + +#endif // wxUSE_RADIOBOX + +#endif // _WX_RADIOBOX_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/radiobut.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/radiobut.h new file mode 100644 index 0000000000..427787341e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/radiobut.h @@ -0,0 +1,58 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/radiobut.h +// Purpose: wxRadioButton declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 07.09.00 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RADIOBUT_H_BASE_ +#define _WX_RADIOBUT_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_RADIOBTN + +/* + There is no wxRadioButtonBase class as wxRadioButton interface is the same + as wxCheckBox(Base), but under some platforms wxRadioButton really + derives from wxCheckBox and on the others it doesn't. + + The pseudo-declaration of wxRadioButtonBase would look like this: + + class wxRadioButtonBase : public ... + { + public: + virtual void SetValue(bool value); + virtual bool GetValue() const; + }; + */ + +#include "wx/control.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxRadioButtonNameStr[]; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/radiobut.h" +#elif defined(__WXMSW__) + #include "wx/msw/radiobut.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/radiobut.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/radiobut.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/radiobut.h" +#elif defined(__WXMAC__) + #include "wx/osx/radiobut.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/radiobut.h" +#elif defined(__WXPM__) + #include "wx/os2/radiobut.h" +#endif + +#endif // wxUSE_RADIOBTN + +#endif + // _WX_RADIOBUT_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/range.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/range.h new file mode 100644 index 0000000000..d59646e12a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/range.h @@ -0,0 +1,28 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/range.h +// Purpose: Range Value Class +// Author: Stefan Csomor +// Modified by: +// Created: 2011-01-07 +// Copyright: (c) 2011 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RANGE_H_ +#define _WX_RANGE_H_ + +#include "wx/defs.h" + +class wxRange +{ +public : + wxRange(): m_minVal(0), m_maxVal(0) {} + wxRange( int minVal, int maxVal) : m_minVal(minVal), m_maxVal(maxVal) {} + int GetMin() const { return m_minVal; } + int GetMax() const { return m_maxVal; } +private : + int m_minVal; + int m_maxVal; +}; + +#endif // _WX_RANGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/rawbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/rawbmp.h new file mode 100644 index 0000000000..adcf81f398 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/rawbmp.h @@ -0,0 +1,758 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/rawbmp.h +// Purpose: macros for fast, raw bitmap data access +// Author: Eric Kidd, Vadim Zeitlin +// Modified by: +// Created: 10.03.03 +// Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RAWBMP_H_ +#define _WX_RAWBMP_H_ + +#include "wx/defs.h" + +#ifdef wxHAS_RAW_BITMAP + +#include "wx/image.h" +#include "wx/bitmap.h" + +// ---------------------------------------------------------------------------- +// Abstract Pixel API +// +// We need to access our raw bitmap data (1) portably and (2) efficiently. +// We do this using a two-dimensional "iteration" interface. Performance +// is extremely important here: these functions will be called hundreds +// of thousands of times in a row, and even small inefficiencies will +// make applications seem slow. +// +// We can't always rely on inline functions, because not all compilers actually +// bother to inline them unless we crank the optimization levels way up. +// Therefore, we also provide macros to wring maximum speed out of compiler +// unconditionally (e.g. even in debug builds). Of course, if the performance +// isn't absolutely crucial for you you shouldn't be using them but the inline +// functions instead. +// ---------------------------------------------------------------------------- + +/* + Usage example: + + typedef wxPixelData<wxBitmap, wxNativePixelFormat> PixelData; + + wxBitmap bmp; + PixelData data(bmp); + if ( !data ) + { + ... raw access to bitmap data unavailable, do something else ... + return; + } + + if ( data.GetWidth() < 20 || data.GetHeight() < 20 ) + { + ... complain: the bitmap it too small ... + return; + } + + PixelData::Iterator p(data); + + // we draw a (10, 10)-(20, 20) rect manually using the given r, g, b + p.Offset(data, 10, 10); + + for ( int y = 0; y < 10; ++y ) + { + PixelData::Iterator rowStart = p; + + for ( int x = 0; x < 10; ++x, ++p ) + { + p.Red() = r; + p.Green() = g; + p.Blue() = b; + } + + p = rowStart; + p.OffsetY(data, 1); + } + */ + +/* + Note: we do not use WXDLLIMPEXP_CORE with classes in this file because VC++ has + problems with exporting inner class defined inside a specialization of a + template class from a DLL. Besides, as all the methods are inline it's not + really necessary to put them in DLL at all. + */ + +// ---------------------------------------------------------------------------- +// wxPixelFormat +// ---------------------------------------------------------------------------- + +/* + wxPixelFormat is a template class describing the bitmap data format. It + contains the constants describing the format of pixel data, but does not + describe how the entire bitmap is stored (i.e. top-to-bottom, + bottom-to-top, ...). It is also a "traits"-like class, i.e. it only + contains some constants and maybe static methods but nothing more, so it + can be safely used without incurring any overhead as all accesses to it are + done at compile-time. + + Current limitations: we don't support RAGABA and ARAGAB formats supported + by Mac OS X. If there is sufficient interest, these classes could be + extended to deal with them. Neither do we support alpha channel having + different representation from the RGB ones (happens under QNX/Photon I + think), but again this could be achieved with some small extra effort. + + Template parameters are: + - type of a single pixel component + - size of the single pixel in bits + - indices of red, green and blue pixel components inside the pixel + - index of the alpha component or -1 if none + - type which can contain the full pixel value (all channels) + */ + +template <class Channel, + size_t Bpp, int R, int G, int B, int A = -1, + class Pixel = wxUint32> + +struct wxPixelFormat +{ + // iterator over pixels is usually of type "ChannelType *" + typedef Channel ChannelType; + + // the type which may hold the entire pixel value + typedef Pixel PixelType; + + // NB: using static ints initialized inside the class declaration is not + // portable as it doesn't work with VC++ 6, so we must use enums + + // size of one pixel in bits + enum { BitsPerPixel = Bpp }; + + // size of one pixel in ChannelType units (usually bytes) + enum { SizePixel = Bpp / (8 * sizeof(Channel)) }; + + // the channels indices inside the pixel + enum + { + RED = R, + GREEN = G, + BLUE = B, + ALPHA = A + }; + + // true if we have an alpha channel (together with the other channels, this + // doesn't cover the case of wxImage which stores alpha separately) + enum { HasAlpha = A != -1 }; +}; + +// some "predefined" pixel formats +// ------------------------------- + +// wxImage format is common to all platforms +typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxImagePixelFormat; + +// the (most common) native bitmap format without alpha support +#if defined(__WXMSW__) + // under MSW the RGB components are reversed, they're in BGR order + typedef wxPixelFormat<unsigned char, 24, 2, 1, 0> wxNativePixelFormat; + + #define wxPIXEL_FORMAT_ALPHA 3 +#elif defined(__WXMAC__) + // under Mac, first component is unused but still present, hence we use + // 32bpp, not 24 + typedef wxPixelFormat<unsigned char, 32, 1, 2, 3> wxNativePixelFormat; + + #define wxPIXEL_FORMAT_ALPHA 0 +#elif defined(__WXCOCOA__) + // Cocoa is standard RGB or RGBA (normally it is RGBA) + typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxNativePixelFormat; + + #define wxPIXEL_FORMAT_ALPHA 3 +#elif defined(__WXGTK__) + // Under GTK+ 2.X we use GdkPixbuf, which is standard RGB or RGBA + typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxNativePixelFormat; + + #define wxPIXEL_FORMAT_ALPHA 3 +#elif defined(__WXPM__) + // Under PM, we can use standard RGB or RGBA + typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxNativePixelFormat; + + #define wxPIXEL_FORMAT_ALPHA 3 +#elif defined(__WXDFB__) + // Under DirectFB, RGB components are reversed, they're in BGR order + typedef wxPixelFormat<unsigned char, 24, 2, 1, 0> wxNativePixelFormat; + + #define wxPIXEL_FORMAT_ALPHA 3 +#endif + +// the (most common) native format for bitmaps with alpha channel +#ifdef wxPIXEL_FORMAT_ALPHA + typedef wxPixelFormat<unsigned char, 32, + wxNativePixelFormat::RED, + wxNativePixelFormat::GREEN, + wxNativePixelFormat::BLUE, + wxPIXEL_FORMAT_ALPHA> wxAlphaPixelFormat; +#endif // wxPIXEL_FORMAT_ALPHA + +// we also define the (default/best) pixel format for the given class: this is +// used as default value for the pixel format in wxPixelIterator template +template <class T> struct wxPixelFormatFor; + +#if wxUSE_IMAGE +// wxPixelFormatFor is only defined for wxImage, attempt to use it with other +// classes (wxBitmap...) will result in compile errors which is exactly what we +// want +template <> +struct wxPixelFormatFor<wxImage> +{ + typedef wxImagePixelFormat Format; +}; +#endif //wxUSE_IMAGE + +// ---------------------------------------------------------------------------- +// wxPixelData +// ---------------------------------------------------------------------------- + +/* + wxPixelDataBase is just a helper for wxPixelData: it contains things common + to both wxImage and wxBitmap specializations. + */ +class wxPixelDataBase +{ +public: + // origin of the rectangular region we represent + wxPoint GetOrigin() const { return m_ptOrigin; } + + // width and height of the region we represent + int GetWidth() const { return m_width; } + int GetHeight() const { return m_height; } + + wxSize GetSize() const { return wxSize(m_width, m_height); } + + // the distance between two rows + int GetRowStride() const { return m_stride; } + +// private: -- see comment in the beginning of the file + + // the origin of this image inside the bigger bitmap (usually (0, 0)) + wxPoint m_ptOrigin; + + // the size of the image we address, in pixels + int m_width, + m_height; + + // this parameter is the offset of the start of the (N+1)st row from the + // Nth one and can be different from m_bypp*width in some cases: + // a) the most usual one is to force 32/64 bit alignment of rows + // b) another one is for bottom-to-top images where it's negative + // c) finally, it could conceivably be 0 for the images with all + // lines being identical + int m_stride; + +protected: + // ctor is protected because this class is only meant to be used as the + // base class by wxPixelData + wxPixelDataBase() + { + m_width = + m_height = + m_stride = 0; + } +}; + +/* + wxPixelData represents the entire bitmap data, i.e. unlike + wxPixelFormat (which it uses) it also stores the global bitmap + characteristics such as its size, inter-row separation and so on. + + Because of this it can be used to move the pixel iterators (which don't + have enough information about the bitmap themselves). This may seem a bit + unnatural but must be done in this way to keep the iterator objects as + small as possible for maximum efficiency as otherwise they wouldn't be put + into the CPU registers by the compiler any more. + + Implementation note: we use the standard workaround for lack of partial + template specialization support in VC (both 6 and 7): instead of partly + specializing the class Foo<T, U> for some T we introduce FooOut<T> and + FooIn<U> nested in it, make Foo<T, U> equivalent to FooOut<T>::FooIn<U> and + fully specialize FooOut. + + Also note that this class doesn't have any default definition because we + can't really do anything without knowing the exact image class. We do + provide wxPixelDataBase to make it simpler to write new wxPixelData + specializations. + */ + +// we need to define this skeleton template to mollify VC++ +template <class Image> +struct wxPixelDataOut +{ + template <class PixelFormat> + class wxPixelDataIn + { + public: + class Iterator { }; + }; +}; + +#if wxUSE_IMAGE +// wxPixelData specialization for wxImage: this is the simplest case as we +// don't have to care about different pixel formats here +template <> +struct wxPixelDataOut<wxImage> +{ + // NB: this is a template class even though it doesn't use its template + // parameter because otherwise wxPixelData couldn't compile + template <class dummyPixelFormat> + class wxPixelDataIn : public wxPixelDataBase + { + public: + // the type of the class we're working with + typedef wxImage ImageType; + + // the iterator which should be used for working with data in this + // format + class Iterator + { + public: + // the pixel format we use + typedef wxImagePixelFormat PixelFormat; + + // the pixel data we're working with + typedef + wxPixelDataOut<wxImage>::wxPixelDataIn<PixelFormat> PixelData; + + // go back to (0, 0) + void Reset(const PixelData& data) + { + *this = data.GetPixels(); + } + + // creates the iterator pointing to the beginning of data + Iterator(PixelData& data) + { + Reset(data); + } + + // creates the iterator initially pointing to the image origin + Iterator(const wxImage& image) + { + m_pRGB = image.GetData(); + + if ( image.HasAlpha() ) + { + m_pAlpha = image.GetAlpha(); + } + else // alpha is not used at all + { + m_pAlpha = NULL; + } + } + + // true if the iterator is valid + bool IsOk() const { return m_pRGB != NULL; } + + + // navigation + // ---------- + + // advance the iterator to the next pixel, prefix version + Iterator& operator++() + { + m_pRGB += PixelFormat::SizePixel; + if ( m_pAlpha ) + ++m_pAlpha; + + return *this; + } + + // postfix (hence less efficient -- don't use it unless you + // absolutely must) version + Iterator operator++(int) + { + Iterator p(*this); + ++*this; + return p; + } + + // move x pixels to the right and y down + // + // note that the rows don't wrap! + void Offset(const PixelData& data, int x, int y) + { + m_pRGB += data.GetRowStride()*y + PixelFormat::SizePixel*x; + if ( m_pAlpha ) + m_pAlpha += data.GetWidth() + x; + } + + // move x pixels to the right (again, no row wrapping) + void OffsetX(const PixelData& WXUNUSED(data), int x) + { + m_pRGB += PixelFormat::SizePixel*x; + if ( m_pAlpha ) + m_pAlpha += x; + } + + // move y rows to the bottom + void OffsetY(const PixelData& data, int y) + { + m_pRGB += data.GetRowStride()*y; + if ( m_pAlpha ) + m_pAlpha += data.GetWidth(); + } + + // go to the given position + void MoveTo(const PixelData& data, int x, int y) + { + Reset(data); + Offset(data, x, y); + } + + + // data access + // ----------- + + // access to individual colour components + PixelFormat::ChannelType& Red() { return m_pRGB[PixelFormat::RED]; } + PixelFormat::ChannelType& Green() { return m_pRGB[PixelFormat::GREEN]; } + PixelFormat::ChannelType& Blue() { return m_pRGB[PixelFormat::BLUE]; } + PixelFormat::ChannelType& Alpha() { return *m_pAlpha; } + + // address the pixel contents directly (always RGB, without alpha) + // + // this can't be used to modify the image as assigning a 32bpp + // value to 24bpp pixel would overwrite an extra byte in the next + // pixel or beyond the end of image + const typename PixelFormat::PixelType& Data() + { return *(typename PixelFormat::PixelType *)m_pRGB; } + + // private: -- see comment in the beginning of the file + + // pointer into RGB buffer + unsigned char *m_pRGB; + + // pointer into alpha buffer or NULL if alpha isn't used + unsigned char *m_pAlpha; + }; + + // initializes us with the data of the given image + wxPixelDataIn(ImageType& image) : m_image(image), m_pixels(image) + { + m_width = image.GetWidth(); + m_height = image.GetHeight(); + m_stride = Iterator::PixelFormat::SizePixel * m_width; + } + + // initializes us with the given region of the specified image + wxPixelDataIn(ImageType& image, + const wxPoint& pt, + const wxSize& sz) : m_image(image), m_pixels(image) + { + m_stride = Iterator::PixelFormat::SizePixel * m_width; + + InitRect(pt, sz); + } + + // initializes us with the given region of the specified image + wxPixelDataIn(ImageType& image, + const wxRect& rect) : m_image(image), m_pixels(image) + { + m_stride = Iterator::PixelFormat::SizePixel * m_width; + + InitRect(rect.GetPosition(), rect.GetSize()); + } + + // we evaluate to true only if we could get access to bitmap data + // successfully + operator bool() const { return m_pixels.IsOk(); } + + // get the iterator pointing to the origin + Iterator GetPixels() const { return m_pixels; } + + private: + void InitRect(const wxPoint& pt, const wxSize& sz) + { + m_width = sz.x; + m_height = sz.y; + + m_ptOrigin = pt; + m_pixels.Offset(*this, pt.x, pt.y); + } + + // the image we're working with + ImageType& m_image; + + // the iterator pointing to the image origin + Iterator m_pixels; + }; +}; +#endif //wxUSE_IMAGE + +#if wxUSE_GUI +// wxPixelData specialization for wxBitmap: here things are more interesting as +// we also have to support different pixel formats +template <> +struct wxPixelDataOut<wxBitmap> +{ + template <class Format> + class wxPixelDataIn : public wxPixelDataBase + { + public: + // the type of the class we're working with + typedef wxBitmap ImageType; + + class Iterator + { + public: + // the pixel format we use + typedef Format PixelFormat; + + // the type of the pixel components + typedef typename PixelFormat::ChannelType ChannelType; + + // the pixel data we're working with + typedef wxPixelDataOut<wxBitmap>::wxPixelDataIn<Format> PixelData; + + + // go back to (0, 0) + void Reset(const PixelData& data) + { + *this = data.GetPixels(); + } + + // initializes the iterator to point to the origin of the given + // pixel data + Iterator(PixelData& data) + { + Reset(data); + } + + // initializes the iterator to point to the origin of the given + // bitmap + Iterator(wxBitmap& bmp, PixelData& data) + { + // using cast here is ugly but it should be safe as + // GetRawData() real return type should be consistent with + // BitsPerPixel (which is in turn defined by ChannelType) and + // this is the only thing we can do without making GetRawData() + // a template function which is undesirable + m_ptr = (ChannelType *) + bmp.GetRawData(data, PixelFormat::BitsPerPixel); + } + + // default constructor + Iterator() + { + m_ptr = NULL; + } + + // return true if this iterator is valid + bool IsOk() const { return m_ptr != NULL; } + + + // navigation + // ---------- + + // advance the iterator to the next pixel, prefix version + Iterator& operator++() + { + m_ptr += PixelFormat::SizePixel; + + return *this; + } + + // postfix (hence less efficient -- don't use it unless you + // absolutely must) version + Iterator operator++(int) + { + Iterator p(*this); + ++*this; + return p; + } + + // move x pixels to the right and y down + // + // note that the rows don't wrap! + void Offset(const PixelData& data, int x, int y) + { + m_ptr += data.GetRowStride()*y + PixelFormat::SizePixel*x; + } + + // move x pixels to the right (again, no row wrapping) + void OffsetX(const PixelData& WXUNUSED(data), int x) + { + m_ptr += PixelFormat::SizePixel*x; + } + + // move y rows to the bottom + void OffsetY(const PixelData& data, int y) + { + m_ptr += data.GetRowStride()*y; + } + + // go to the given position + void MoveTo(const PixelData& data, int x, int y) + { + Reset(data); + Offset(data, x, y); + } + + + // data access + // ----------- + + // access to individual colour components + ChannelType& Red() { return m_ptr[PixelFormat::RED]; } + ChannelType& Green() { return m_ptr[PixelFormat::GREEN]; } + ChannelType& Blue() { return m_ptr[PixelFormat::BLUE]; } + ChannelType& Alpha() { return m_ptr[PixelFormat::ALPHA]; } + + // address the pixel contents directly + // + // warning: the format is platform dependent + // + // warning 2: assigning to Data() only works correctly for 16bpp or + // 32bpp formats but using it for 24bpp ones overwrites + // one extra byte and so can't be done + typename PixelFormat::PixelType& Data() + { return *(typename PixelFormat::PixelType *)m_ptr; } + + // private: -- see comment in the beginning of the file + + // for efficiency reasons this class should not have any other + // fields, otherwise it won't be put into a CPU register (as it + // should inside the inner loops) by some compilers, notably gcc + ChannelType *m_ptr; + }; + + // ctor associates this pointer with a bitmap and locks the bitmap for + // raw access, it will be unlocked only by our dtor and so these + // objects should normally be only created on the stack, i.e. have + // limited life-time + wxPixelDataIn(wxBitmap& bmp) : m_bmp(bmp), m_pixels(bmp, *this) + { + } + + wxPixelDataIn(wxBitmap& bmp, const wxRect& rect) + : m_bmp(bmp), m_pixels(bmp, *this) + { + InitRect(rect.GetPosition(), rect.GetSize()); + } + + wxPixelDataIn(wxBitmap& bmp, const wxPoint& pt, const wxSize& sz) + : m_bmp(bmp), m_pixels(bmp, *this) + { + InitRect(pt, sz); + } + + // we evaluate to true only if we could get access to bitmap data + // successfully + operator bool() const { return m_pixels.IsOk(); } + + // get the iterator pointing to the origin + Iterator GetPixels() const { return m_pixels; } + + // dtor unlocks the bitmap + ~wxPixelDataIn() + { + if ( m_pixels.IsOk() ) + { +#if defined(__WXMSW__) || defined(__WXMAC__) + // this is a hack to mark wxBitmap as using alpha channel + if ( Format::HasAlpha ) + m_bmp.UseAlpha(); +#endif + m_bmp.UngetRawData(*this); + } + // else: don't call UngetRawData() if GetRawData() failed + } + +#if WXWIN_COMPATIBILITY_2_8 + // not needed anymore, calls to it should be simply removed + wxDEPRECATED_INLINE( void UseAlpha(), wxEMPTY_PARAMETER_VALUE ) +#endif + + // private: -- see comment in the beginning of the file + + // the bitmap we're associated with + wxBitmap m_bmp; + + // the iterator pointing to the image origin + Iterator m_pixels; + + private: + void InitRect(const wxPoint& pt, const wxSize& sz) + { + m_pixels.Offset(*this, pt.x, pt.y); + + m_ptOrigin = pt; + m_width = sz.x; + m_height = sz.y; + } + }; +}; + +#endif //wxUSE_GUI + +// FIXME-VC6: VC6 doesn't like typename in default template parameters while +// it is necessary with standard-conforming compilers, remove this +// #define and just use typename when we drop VC6 support +#if defined(__VISUALC__) && !wxCHECK_VISUALC_VERSION(7) + #define wxTYPENAME_IN_TEMPLATE_DEFAULT_PARAM +#else + #define wxTYPENAME_IN_TEMPLATE_DEFAULT_PARAM typename +#endif + +template <class Image, + class PixelFormat = wxTYPENAME_IN_TEMPLATE_DEFAULT_PARAM + wxPixelFormatFor<Image>::Format > +class wxPixelData : + public wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat> +{ +public: + typedef + typename wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat> + Base; + + wxPixelData(Image& image) : Base(image) { } + + wxPixelData(Image& i, const wxRect& rect) : Base(i, rect) { } + + wxPixelData(Image& i, const wxPoint& pt, const wxSize& sz) + : Base(i, pt, sz) + { + } +}; + +// some "predefined" pixel data classes +#if wxUSE_IMAGE +typedef wxPixelData<wxImage> wxImagePixelData; +#endif //wxUSE_IMAGE +#if wxUSE_GUI +typedef wxPixelData<wxBitmap, wxNativePixelFormat> wxNativePixelData; +typedef wxPixelData<wxBitmap, wxAlphaPixelFormat> wxAlphaPixelData; + +#endif //wxUSE_GUI + +// ---------------------------------------------------------------------------- +// wxPixelIterator +// ---------------------------------------------------------------------------- + +/* + wxPixel::Iterator represents something which points to the pixel data and + allows us to iterate over it. In the simplest case of wxBitmap it is, + indeed, just a pointer, but it can be something more complicated and, + moreover, you are free to specialize it for other image classes and bitmap + formats. + + Note that although it would have been much more intuitive to have a real + class here instead of what we have now, this class would need two template + parameters, and this can't be done because we'd need compiler support for + partial template specialization then and neither VC6 nor VC7 provide it. + */ +template < class Image, class PixelFormat = wxPixelFormatFor<Image> > +struct wxPixelIterator : public wxPixelData<Image, PixelFormat>::Iterator +{ +}; + +#endif // wxHAS_RAW_BITMAP +#endif // _WX_RAWBMP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/rearrangectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/rearrangectrl.h new file mode 100644 index 0000000000..b54b04fa11 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/rearrangectrl.h @@ -0,0 +1,232 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/rearrangectrl.h +// Purpose: various controls for rearranging the items interactively +// Author: Vadim Zeitlin +// Created: 2008-12-15 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_REARRANGECTRL_H_ +#define _WX_REARRANGECTRL_H_ + +#include "wx/checklst.h" + +#if wxUSE_REARRANGECTRL + +#include "wx/panel.h" +#include "wx/dialog.h" + +#include "wx/arrstr.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxRearrangeListNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxRearrangeDialogNameStr[]; + +// ---------------------------------------------------------------------------- +// wxRearrangeList: a (check) list box allowing to move items around +// ---------------------------------------------------------------------------- + +// This class works allows to change the order of the items shown in it as well +// as to check or uncheck them individually. The data structure used to allow +// this is the order array which contains the items indices indexed by their +// position with an added twist that the unchecked items are represented by the +// bitwise complement of the corresponding index (for any architecture using +// two's complement for negative numbers representation (i.e. just about any at +// all) this means that a checked item N is represented by -N-1 in unchecked +// state). +// +// So, for example, the array order [1 -3 0] used in conjunction with the items +// array ["first", "second", "third"] means that the items are displayed in the +// order "second", "third", "first" and the "third" item is unchecked while the +// other two are checked. +class WXDLLIMPEXP_CORE wxRearrangeList : public wxCheckListBox +{ +public: + // ctors and such + // -------------- + + // default ctor, call Create() later + wxRearrangeList() { } + + // ctor creating the control, the arguments are the same as for + // wxCheckListBox except for the extra order array which defines the + // (initial) display order of the items as well as their statuses, see the + // description above + wxRearrangeList(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayInt& order, + const wxArrayString& items, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRearrangeListNameStr) + { + Create(parent, id, pos, size, order, items, style, validator, name); + } + + // Create() function takes the same parameters as the base class one and + // the order array determining the initial display order + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayInt& order, + const wxArrayString& items, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRearrangeListNameStr); + + + // items order + // ----------- + + // get the current items order; the returned array uses the same convention + // as the one passed to the ctor + const wxArrayInt& GetCurrentOrder() const { return m_order; } + + // return true if the current item can be moved up or down (i.e. just that + // it's not the first or the last one) + bool CanMoveCurrentUp() const; + bool CanMoveCurrentDown() const; + + // move the current item one position up or down, return true if it was moved + // or false if the current item was the first/last one and so nothing was done + bool MoveCurrentUp(); + bool MoveCurrentDown(); + +private: + // swap two items at the given positions in the listbox + void Swap(int pos1, int pos2); + + // event handler for item checking/unchecking + void OnCheck(wxCommandEvent& event); + + + // the current order array + wxArrayInt m_order; + + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxRearrangeList); +}; + +// ---------------------------------------------------------------------------- +// wxRearrangeCtrl: composite control containing a wxRearrangeList and buttons +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRearrangeCtrl : public wxPanel +{ +public: + // ctors/Create function are the same as for wxRearrangeList + wxRearrangeCtrl() + { + Init(); + } + + wxRearrangeCtrl(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayInt& order, + const wxArrayString& items, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRearrangeListNameStr) + { + Init(); + + Create(parent, id, pos, size, order, items, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayInt& order, + const wxArrayString& items, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRearrangeListNameStr); + + // get the underlying listbox + wxRearrangeList *GetList() const { return m_list; } + +private: + // common part of all ctors + void Init(); + + // event handlers for the buttons + void OnUpdateButtonUI(wxUpdateUIEvent& event); + void OnButton(wxCommandEvent& event); + + + wxRearrangeList *m_list; + + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxRearrangeCtrl); +}; + +// ---------------------------------------------------------------------------- +// wxRearrangeDialog: dialog containing a wxRearrangeCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRearrangeDialog : public wxDialog +{ +public: + // default ctor, use Create() later + wxRearrangeDialog() { Init(); } + + // ctor for the dialog: message is shown inside the dialog itself, order + // and items are passed to wxRearrangeList used internally + wxRearrangeDialog(wxWindow *parent, + const wxString& message, + const wxString& title, + const wxArrayInt& order, + const wxArrayString& items, + const wxPoint& pos = wxDefaultPosition, + const wxString& name = wxRearrangeDialogNameStr) + { + Init(); + + Create(parent, message, title, order, items, pos, name); + } + + bool Create(wxWindow *parent, + const wxString& message, + const wxString& title, + const wxArrayInt& order, + const wxArrayString& items, + const wxPoint& pos = wxDefaultPosition, + const wxString& name = wxRearrangeDialogNameStr); + + + // methods for the dialog customization + + // add extra contents to the dialog below the wxRearrangeCtrl part: the + // given window (usually a wxPanel containing more control inside it) must + // have the dialog as its parent and will be inserted into it at the right + // place by this method + void AddExtraControls(wxWindow *win); + + // return the wxRearrangeList control used by the dialog + wxRearrangeList *GetList() const; + + + // get the order of items after it was modified by the user + wxArrayInt GetOrder() const; + +private: + // common part of all ctors + void Init() { m_ctrl = NULL; } + + wxRearrangeCtrl *m_ctrl; + + wxDECLARE_NO_COPY_CLASS(wxRearrangeDialog); +}; + +#endif // wxUSE_REARRANGECTRL + +#endif // _WX_REARRANGECTRL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/recguard.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/recguard.h new file mode 100644 index 0000000000..d7775b995b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/recguard.h @@ -0,0 +1,52 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/recguard.h +// Purpose: declaration and implementation of wxRecursionGuard class +// Author: Vadim Zeitlin +// Modified by: +// Created: 14.08.2003 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RECGUARD_H_ +#define _WX_RECGUARD_H_ + +#include "wx/defs.h" + +// ---------------------------------------------------------------------------- +// wxRecursionGuardFlag is used with wxRecursionGuard +// ---------------------------------------------------------------------------- + +typedef int wxRecursionGuardFlag; + +// ---------------------------------------------------------------------------- +// wxRecursionGuard is the simplest way to protect a function from reentrancy +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxRecursionGuard +{ +public: + wxRecursionGuard(wxRecursionGuardFlag& flag) + : m_flag(flag) + { + m_isInside = flag++ != 0; + } + + ~wxRecursionGuard() + { + wxASSERT_MSG( m_flag > 0, wxT("unbalanced wxRecursionGuards!?") ); + + m_flag--; + } + + bool IsInside() const { return m_isInside; } + +private: + wxRecursionGuardFlag& m_flag; + + // true if the flag had been already set when we were created + bool m_isInside; +}; + +#endif // _WX_RECGUARD_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/regex.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/regex.h new file mode 100644 index 0000000000..0b1836e344 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/regex.h @@ -0,0 +1,164 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/regex.h +// Purpose: regular expression matching +// Author: Karsten Ballueder +// Modified by: VZ at 13.07.01 (integrated to wxWin) +// Created: 05.02.2000 +// Copyright: (c) 2000 Karsten Ballueder <ballueder@gmx.net> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_REGEX_H_ +#define _WX_REGEX_H_ + +#include "wx/defs.h" + +#if wxUSE_REGEX + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// flags for regex compilation: these can be used with Compile() +enum +{ + // use extended regex syntax + wxRE_EXTENDED = 0, + + // use advanced RE syntax (built-in regex only) +#ifdef wxHAS_REGEX_ADVANCED + wxRE_ADVANCED = 1, +#endif + + // use basic RE syntax + wxRE_BASIC = 2, + + // ignore case in match + wxRE_ICASE = 4, + + // only check match, don't set back references + wxRE_NOSUB = 8, + + // if not set, treat '\n' as an ordinary character, otherwise it is + // special: it is not matched by '.' and '^' and '$' always match + // after/before it regardless of the setting of wxRE_NOT[BE]OL + wxRE_NEWLINE = 16, + + // default flags + wxRE_DEFAULT = wxRE_EXTENDED +}; + +// flags for regex matching: these can be used with Matches() +// +// these flags are mainly useful when doing several matches in a long string, +// they can be used to prevent erroneous matches for '^' and '$' +enum +{ + // '^' doesn't match at the start of line + wxRE_NOTBOL = 32, + + // '$' doesn't match at the end of line + wxRE_NOTEOL = 64 +}; + +// ---------------------------------------------------------------------------- +// wxRegEx: a regular expression +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxRegExImpl; + +class WXDLLIMPEXP_BASE wxRegEx +{ +public: + // default ctor: use Compile() later + wxRegEx() { Init(); } + + // create and compile + wxRegEx(const wxString& expr, int flags = wxRE_DEFAULT) + { + Init(); + (void)Compile(expr, flags); + } + + // return true if this is a valid compiled regular expression + bool IsValid() const { return m_impl != NULL; } + + // compile the string into regular expression, return true if ok or false + // if string has a syntax error + bool Compile(const wxString& pattern, int flags = wxRE_DEFAULT); + + // matches the precompiled regular expression against a string, return + // true if matches and false otherwise + // + // flags may be combination of wxRE_NOTBOL and wxRE_NOTEOL + // len may be the length of text (ignored by most system regex libs) + // + // may only be called after successful call to Compile() + bool Matches(const wxString& text, int flags = 0) const; + bool Matches(const wxChar *text, int flags, size_t len) const + { return Matches(wxString(text, len), flags); } + + // get the start index and the length of the match of the expression + // (index 0) or a bracketed subexpression (index != 0) + // + // may only be called after successful call to Matches() + // + // return false if no match or on error + bool GetMatch(size_t *start, size_t *len, size_t index = 0) const; + + // return the part of string corresponding to the match, empty string is + // returned if match failed + // + // may only be called after successful call to Matches() + wxString GetMatch(const wxString& text, size_t index = 0) const; + + // return the size of the array of matches, i.e. the number of bracketed + // subexpressions plus one for the expression itself, or 0 on error. + // + // may only be called after successful call to Compile() + size_t GetMatchCount() const; + + // replaces the current regular expression in the string pointed to by + // pattern, with the text in replacement and return number of matches + // replaced (maybe 0 if none found) or -1 on error + // + // the replacement text may contain backreferences (\number) which will be + // replaced with the value of the corresponding subexpression in the + // pattern match + // + // maxMatches may be used to limit the number of replacements made, setting + // it to 1, for example, will only replace first occurrence (if any) of the + // pattern in the text while default value of 0 means replace all + int Replace(wxString *text, const wxString& replacement, + size_t maxMatches = 0) const; + + // replace the first occurrence + int ReplaceFirst(wxString *text, const wxString& replacement) const + { return Replace(text, replacement, 1); } + + // replace all occurrences: this is actually a synonym for Replace() + int ReplaceAll(wxString *text, const wxString& replacement) const + { return Replace(text, replacement, 0); } + + // dtor not virtual, don't derive from this class + ~wxRegEx(); + +private: + // common part of all ctors + void Init(); + + // the real guts of this class + wxRegExImpl *m_impl; + + // as long as the class wxRegExImpl is not ref-counted, + // instances of the handle wxRegEx must not be copied. + wxRegEx(const wxRegEx&); + wxRegEx &operator=(const wxRegEx&); +}; + +#endif // wxUSE_REGEX + +#endif // _WX_REGEX_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/region.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/region.h new file mode 100644 index 0000000000..64a8e05532 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/region.h @@ -0,0 +1,291 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/region.h +// Purpose: Base header for wxRegion +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_REGION_H_BASE_ +#define _WX_REGION_H_BASE_ + +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" + +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxColour; +class WXDLLIMPEXP_FWD_CORE wxRegion; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// result of wxRegion::Contains() call +enum wxRegionContain +{ + wxOutRegion = 0, + wxPartRegion = 1, + wxInRegion = 2 +}; + +// these constants are used with wxRegion::Combine() in the ports which have +// this method +enum wxRegionOp +{ + // Creates the intersection of the two combined regions. + wxRGN_AND, + + // Creates a copy of the region + wxRGN_COPY, + + // Combines the parts of first region that are not in the second one + wxRGN_DIFF, + + // Creates the union of two combined regions. + wxRGN_OR, + + // Creates the union of two regions except for any overlapping areas. + wxRGN_XOR +}; + +// ---------------------------------------------------------------------------- +// wxRegionBase defines wxRegion API +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRegionBase : public wxGDIObject +{ +public: + // ctors + // ----- + + // none are defined here but the following should be available: +#if 0 + wxRegion(); + wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight); + wxRegion(const wxRect& rect); + wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + wxRegion(const wxBitmap& bmp); + wxRegion(const wxBitmap& bmp, const wxColour& transp, int tolerance = 0); +#endif // 0 + + // operators + // --------- + + bool operator==(const wxRegion& region) const { return IsEqual(region); } + bool operator!=(const wxRegion& region) const { return !(*this == region); } + + + // accessors + // --------- + + // Is region empty? + virtual bool IsEmpty() const = 0; + bool Empty() const { return IsEmpty(); } + + // Is region equal (i.e. covers the same area as another one)? + bool IsEqual(const wxRegion& region) const; + + // Get the bounding box + bool GetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const + { return DoGetBox(x, y, w, h); } + wxRect GetBox() const + { + wxCoord x, y, w, h; + return DoGetBox(x, y, w, h) ? wxRect(x, y, w, h) : wxRect(); + } + + // Test if the given point or rectangle is inside this region + wxRegionContain Contains(wxCoord x, wxCoord y) const + { return DoContainsPoint(x, y); } + wxRegionContain Contains(const wxPoint& pt) const + { return DoContainsPoint(pt.x, pt.y); } + wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h) const + { return DoContainsRect(wxRect(x, y, w, h)); } + wxRegionContain Contains(const wxRect& rect) const + { return DoContainsRect(rect); } + + + // operations + // ---------- + + virtual void Clear() = 0; + + // Move the region + bool Offset(wxCoord x, wxCoord y) + { return DoOffset(x, y); } + bool Offset(const wxPoint& pt) + { return DoOffset(pt.x, pt.y); } + + // Union rectangle or region with this region. + bool Union(wxCoord x, wxCoord y, wxCoord w, wxCoord h) + { return DoUnionWithRect(wxRect(x, y, w, h)); } + bool Union(const wxRect& rect) + { return DoUnionWithRect(rect); } + bool Union(const wxRegion& region) + { return DoUnionWithRegion(region); } + +#if wxUSE_IMAGE + // Use the non-transparent pixels of a wxBitmap for the region to combine + // with this region. First version takes transparency from bitmap's mask, + // second lets the user specify the colour to be treated as transparent + // along with an optional tolerance value. + // NOTE: implemented in common/rgncmn.cpp + bool Union(const wxBitmap& bmp); + bool Union(const wxBitmap& bmp, const wxColour& transp, int tolerance = 0); +#endif // wxUSE_IMAGE + + // Intersect rectangle or region with this one. + bool Intersect(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + bool Intersect(const wxRect& rect); + bool Intersect(const wxRegion& region) + { return DoIntersect(region); } + + // Subtract rectangle or region from this: + // Combines the parts of 'this' that are not part of the second region. + bool Subtract(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + bool Subtract(const wxRect& rect); + bool Subtract(const wxRegion& region) + { return DoSubtract(region); } + + // XOR: the union of two combined regions except for any overlapping areas. + bool Xor(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + bool Xor(const wxRect& rect); + bool Xor(const wxRegion& region) + { return DoXor(region); } + + + // Convert the region to a B&W bitmap with the white pixels being inside + // the region. + wxBitmap ConvertToBitmap() const; + +protected: + virtual bool DoIsEqual(const wxRegion& region) const = 0; + virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const = 0; + virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const = 0; + virtual wxRegionContain DoContainsRect(const wxRect& rect) const = 0; + + virtual bool DoOffset(wxCoord x, wxCoord y) = 0; + + virtual bool DoUnionWithRect(const wxRect& rect) = 0; + virtual bool DoUnionWithRegion(const wxRegion& region) = 0; + + virtual bool DoIntersect(const wxRegion& region) = 0; + virtual bool DoSubtract(const wxRegion& region) = 0; + virtual bool DoXor(const wxRegion& region) = 0; +}; + +// some ports implement a generic Combine() function while others only +// implement individual wxRegion operations, factor out the common code for the +// ports with Combine() in this class +#if defined(__WXMSW__) || \ + ( defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON ) || \ + defined(__WXPM__) + +#define wxHAS_REGION_COMBINE + +class WXDLLIMPEXP_CORE wxRegionWithCombine : public wxRegionBase +{ +public: + // these methods are not part of public API as they're not implemented on + // all ports + bool Combine(wxCoord x, wxCoord y, wxCoord w, wxCoord h, wxRegionOp op); + bool Combine(const wxRect& rect, wxRegionOp op); + bool Combine(const wxRegion& region, wxRegionOp op) + { return DoCombine(region, op); } + + +protected: + // the real Combine() method, to be defined in the derived class + virtual bool DoCombine(const wxRegion& region, wxRegionOp op) = 0; + + // implement some wxRegionBase pure virtuals in terms of Combine() + virtual bool DoUnionWithRect(const wxRect& rect); + virtual bool DoUnionWithRegion(const wxRegion& region); + virtual bool DoIntersect(const wxRegion& region); + virtual bool DoSubtract(const wxRegion& region); + virtual bool DoXor(const wxRegion& region); +}; + +#endif // ports with wxRegion::Combine() + +#if defined(__WXMSW__) + #include "wx/msw/region.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/region.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/region.h" +#elif defined(__WXMOTIF__) || defined(__WXX11__) + #include "wx/x11/region.h" +#elif defined(__WXDFB__) + #include "wx/dfb/region.h" +#elif defined(__WXMAC__) + #include "wx/osx/region.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/region.h" +#elif defined(__WXPM__) + #include "wx/os2/region.h" +#endif + +// ---------------------------------------------------------------------------- +// inline functions implementation +// ---------------------------------------------------------------------------- + +// NB: these functions couldn't be defined in the class declaration as they use +// wxRegion and so can be only defined after including the header declaring +// the real class + +inline bool wxRegionBase::Intersect(const wxRect& rect) +{ + return DoIntersect(wxRegion(rect)); +} + +inline bool wxRegionBase::Subtract(const wxRect& rect) +{ + return DoSubtract(wxRegion(rect)); +} + +inline bool wxRegionBase::Xor(const wxRect& rect) +{ + return DoXor(wxRegion(rect)); +} + +// ...and these functions are here because they call the ones above, and its +// not really proper to call an inline function before its defined inline. + +inline bool wxRegionBase::Intersect(wxCoord x, wxCoord y, wxCoord w, wxCoord h) +{ + return Intersect(wxRect(x, y, w, h)); +} + +inline bool wxRegionBase::Subtract(wxCoord x, wxCoord y, wxCoord w, wxCoord h) +{ + return Subtract(wxRect(x, y, w, h)); +} + +inline bool wxRegionBase::Xor(wxCoord x, wxCoord y, wxCoord w, wxCoord h) +{ + return Xor(wxRect(x, y, w, h)); +} + +#ifdef wxHAS_REGION_COMBINE + +inline bool wxRegionWithCombine::Combine(wxCoord x, + wxCoord y, + wxCoord w, + wxCoord h, + wxRegionOp op) +{ + return DoCombine(wxRegion(x, y, w, h), op); +} + +inline bool wxRegionWithCombine::Combine(const wxRect& rect, wxRegionOp op) +{ + return DoCombine(wxRegion(rect), op); +} + +#endif // wxHAS_REGION_COMBINE + +#endif // _WX_REGION_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/renderer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/renderer.h new file mode 100644 index 0000000000..97152e32e3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/renderer.h @@ -0,0 +1,529 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/renderer.h +// Purpose: wxRendererNative class declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.07.2003 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +/* + Renderers are used in wxWidgets for two similar but different things: + (a) wxUniversal uses them to draw everything, i.e. all the control + (b) all the native ports use them to draw generic controls only + + wxUniversal needs more functionality than what is included in the base class + as it needs to draw stuff like scrollbars which are never going to be + generic. So we put the bare minimum needed by the native ports here and the + full wxRenderer class is declared in wx/univ/renderer.h and is only used by + wxUniveral (although note that native ports can load wxRenderer objects from + theme DLLs and use them as wxRendererNative ones, of course). + */ + +#ifndef _WX_RENDERER_H_ +#define _WX_RENDERER_H_ + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +#include "wx/gdicmn.h" // for wxPoint, wxSize +#include "wx/colour.h" +#include "wx/font.h" +#include "wx/bitmap.h" +#include "wx/string.h" + +// some platforms have their own renderers, others use the generic one +#if defined(__WXMSW__) || ( defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON ) || defined(__WXGTK__) + #define wxHAS_NATIVE_RENDERER +#else + #undef wxHAS_NATIVE_RENDERER +#endif + +// only MSW and OS X currently provides DrawTitleBarBitmap() method +#if defined(__WXMSW__) || (defined(__WXMAC__) && wxUSE_LIBPNG && wxUSE_IMAGE) + #define wxHAS_DRAW_TITLE_BAR_BITMAP +#endif + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// control state flags used in wxRenderer and wxColourScheme +enum +{ + wxCONTROL_DISABLED = 0x00000001, // control is disabled + wxCONTROL_FOCUSED = 0x00000002, // currently has keyboard focus + wxCONTROL_PRESSED = 0x00000004, // (button) is pressed + wxCONTROL_SPECIAL = 0x00000008, // control-specific bit: + wxCONTROL_ISDEFAULT = wxCONTROL_SPECIAL, // only for the buttons + wxCONTROL_ISSUBMENU = wxCONTROL_SPECIAL, // only for the menu items + wxCONTROL_EXPANDED = wxCONTROL_SPECIAL, // only for the tree items + wxCONTROL_SIZEGRIP = wxCONTROL_SPECIAL, // only for the status bar panes + wxCONTROL_FLAT = wxCONTROL_SPECIAL, // checkboxes only: flat border + wxCONTROL_CURRENT = 0x00000010, // mouse is currently over the control + wxCONTROL_SELECTED = 0x00000020, // selected item in e.g. listbox + wxCONTROL_CHECKED = 0x00000040, // (check/radio button) is checked + wxCONTROL_CHECKABLE = 0x00000080, // (menu) item can be checked + wxCONTROL_UNDETERMINED = wxCONTROL_CHECKABLE, // (check) undetermined state + + wxCONTROL_FLAGS_MASK = 0x000000ff, + + // this is a pseudo flag not used directly by wxRenderer but rather by some + // controls internally + wxCONTROL_DIRTY = 0x80000000 +}; + +// title bar buttons supported by DrawTitleBarBitmap() +// +// NB: they have the same values as wxTOPLEVEL_BUTTON_XXX constants in +// wx/univ/toplevel.h as they really represent the same things +enum wxTitleBarButton +{ + wxTITLEBAR_BUTTON_CLOSE = 0x01000000, + wxTITLEBAR_BUTTON_MAXIMIZE = 0x02000000, + wxTITLEBAR_BUTTON_ICONIZE = 0x04000000, + wxTITLEBAR_BUTTON_RESTORE = 0x08000000, + wxTITLEBAR_BUTTON_HELP = 0x10000000 +}; + +// ---------------------------------------------------------------------------- +// helper structs +// ---------------------------------------------------------------------------- + +// wxSplitterWindow parameters +struct WXDLLIMPEXP_CORE wxSplitterRenderParams +{ + // the only way to initialize this struct is by using this ctor + wxSplitterRenderParams(wxCoord widthSash_, wxCoord border_, bool isSens_) + : widthSash(widthSash_), border(border_), isHotSensitive(isSens_) + { + } + + // the width of the splitter sash + const wxCoord widthSash; + + // the width of the border of the splitter window + const wxCoord border; + + // true if the splitter changes its appearance when the mouse is over it + const bool isHotSensitive; +}; + + +// extra optional parameters for DrawHeaderButton +struct WXDLLIMPEXP_CORE wxHeaderButtonParams +{ + wxHeaderButtonParams() + : m_labelAlignment(wxALIGN_LEFT) + { } + + wxColour m_arrowColour; + wxColour m_selectionColour; + wxString m_labelText; + wxFont m_labelFont; + wxColour m_labelColour; + wxBitmap m_labelBitmap; + int m_labelAlignment; +}; + +enum wxHeaderSortIconType +{ + wxHDR_SORT_ICON_NONE, // Header button has no sort arrow + wxHDR_SORT_ICON_UP, // Header button an up sort arrow icon + wxHDR_SORT_ICON_DOWN // Header button a down sort arrow icon +}; + + +// wxRendererNative interface version +struct WXDLLIMPEXP_CORE wxRendererVersion +{ + wxRendererVersion(int version_, int age_) : version(version_), age(age_) { } + + // default copy ctor, assignment operator and dtor are ok + + // the current version and age of wxRendererNative interface: different + // versions are incompatible (in both ways) while the ages inside the same + // version are upwards compatible, i.e. the version of the renderer must + // match the version of the main program exactly while the age may be + // highergreater or equal to it + // + // NB: don't forget to increment age after adding any new virtual function! + enum + { + Current_Version = 1, + Current_Age = 5 + }; + + + // check if the given version is compatible with the current one + static bool IsCompatible(const wxRendererVersion& ver) + { + return ver.version == Current_Version && ver.age >= Current_Age; + } + + const int version; + const int age; +}; + +// ---------------------------------------------------------------------------- +// wxRendererNative: abstracts drawing methods needed by the native controls +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRendererNative +{ +public: + // drawing functions + // ----------------- + + // draw the header control button (used by wxListCtrl) Returns optimal + // width for the label contents. + virtual int DrawHeaderButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0, + wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, + wxHeaderButtonParams* params=NULL) = 0; + + + // Draw the contents of a header control button (label, sort arrows, etc.) + // Normally only called by DrawHeaderButton. + virtual int DrawHeaderButtonContents(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0, + wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, + wxHeaderButtonParams* params=NULL) = 0; + + // Returns the default height of a header button, either a fixed platform + // height if available, or a generic height based on the window's font. + virtual int GetHeaderButtonHeight(wxWindow *win) = 0; + + // Returns the margin on left and right sides of header button's label + virtual int GetHeaderButtonMargin(wxWindow *win) = 0; + + + // draw the expanded/collapsed icon for a tree control item + virtual void DrawTreeItemButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + + // draw the border for sash window: this border must be such that the sash + // drawn by DrawSash() blends into it well + virtual void DrawSplitterBorder(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + + // draw a (vertical) sash + virtual void DrawSplitterSash(wxWindow *win, + wxDC& dc, + const wxSize& size, + wxCoord position, + wxOrientation orient, + int flags = 0) = 0; + + // draw a combobox dropdown button + // + // flags may use wxCONTROL_PRESSED and wxCONTROL_CURRENT + virtual void DrawComboBoxDropButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + + // draw a dropdown arrow + // + // flags may use wxCONTROL_PRESSED and wxCONTROL_CURRENT + virtual void DrawDropArrow(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + + // draw check button + // + // flags may use wxCONTROL_CHECKED, wxCONTROL_UNDETERMINED and wxCONTROL_CURRENT + virtual void DrawCheckBox(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + + // Returns the default size of a check box. + virtual wxSize GetCheckBoxSize(wxWindow *win) = 0; + + // draw blank button + // + // flags may use wxCONTROL_PRESSED, wxCONTROL_CURRENT and wxCONTROL_ISDEFAULT + virtual void DrawPushButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + + // draw rectangle indicating that an item in e.g. a list control + // has been selected or focused + // + // flags may use + // wxCONTROL_SELECTED (item is selected, e.g. draw background) + // wxCONTROL_CURRENT (item is the current item, e.g. dotted border) + // wxCONTROL_FOCUSED (the whole control has focus, e.g. blue background vs. grey otherwise) + virtual void DrawItemSelectionRect(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + + // draw the focus rectangle around the label contained in the given rect + // + // only wxCONTROL_SELECTED makes sense in flags here + virtual void DrawFocusRect(wxWindow* win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + + // Draw a native wxChoice + virtual void DrawChoice(wxWindow* win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + + // Draw a native wxComboBox + virtual void DrawComboBox(wxWindow* win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + + // Draw a native wxTextCtrl frame + virtual void DrawTextCtrl(wxWindow* win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + + // Draw a native wxRadioButton bitmap + virtual void DrawRadioBitmap(wxWindow* win, + wxDC& dc, + const wxRect& rect, + int flags = 0) = 0; + +#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP + // Draw one of the standard title bar buttons + // + // This is currently implemented only for MSW and OS X (for the close + // button only) because there is no way to render standard title bar + // buttons under the other platforms, the best can be done is to use normal + // (only) images which wxArtProvider provides for wxART_HELP and + // wxART_CLOSE (but not any other title bar buttons) + // + // NB: make sure PNG handler is enabled if using this function under OS X + virtual void DrawTitleBarBitmap(wxWindow *win, + wxDC& dc, + const wxRect& rect, + wxTitleBarButton button, + int flags = 0) = 0; +#endif // wxHAS_DRAW_TITLE_BAR_BITMAP + + + // geometry functions + // ------------------ + + // get the splitter parameters: the x field of the returned point is the + // sash width and the y field is the border width + virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win) = 0; + + + // pseudo constructors + // ------------------- + + // return the currently used renderer + static wxRendererNative& Get(); + + // return the generic implementation of the renderer + static wxRendererNative& GetGeneric(); + + // return the default (native) implementation for this platform + static wxRendererNative& GetDefault(); + + + // changing the global renderer + // ---------------------------- + +#if wxUSE_DYNLIB_CLASS + // load the renderer from the specified DLL, the returned pointer must be + // deleted by caller if not NULL when it is not used any more + static wxRendererNative *Load(const wxString& name); +#endif // wxUSE_DYNLIB_CLASS + + // set the renderer to use, passing NULL reverts to using the default + // renderer + // + // return the previous renderer used with Set() or NULL if none + static wxRendererNative *Set(wxRendererNative *renderer); + + + // miscellaneous stuff + // ------------------- + + // this function is used for version checking: Load() refuses to load any + // DLLs implementing an older or incompatible version; it should be + // implemented simply by returning wxRendererVersion::Current_XXX values + virtual wxRendererVersion GetVersion() const = 0; + + // virtual dtor for any base class + virtual ~wxRendererNative(); +}; + +// ---------------------------------------------------------------------------- +// wxDelegateRendererNative: allows reuse of renderers code +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDelegateRendererNative : public wxRendererNative +{ +public: + wxDelegateRendererNative() + : m_rendererNative(GetGeneric()) { } + + wxDelegateRendererNative(wxRendererNative& rendererNative) + : m_rendererNative(rendererNative) { } + + + virtual int DrawHeaderButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0, + wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, + wxHeaderButtonParams* params = NULL) + { return m_rendererNative.DrawHeaderButton(win, dc, rect, flags, sortArrow, params); } + + virtual int DrawHeaderButtonContents(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0, + wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, + wxHeaderButtonParams* params = NULL) + { return m_rendererNative.DrawHeaderButtonContents(win, dc, rect, flags, sortArrow, params); } + + virtual int GetHeaderButtonHeight(wxWindow *win) + { return m_rendererNative.GetHeaderButtonHeight(win); } + + virtual int GetHeaderButtonMargin(wxWindow *win) + { return m_rendererNative.GetHeaderButtonMargin(win); } + + virtual void DrawTreeItemButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawTreeItemButton(win, dc, rect, flags); } + + virtual void DrawSplitterBorder(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawSplitterBorder(win, dc, rect, flags); } + + virtual void DrawSplitterSash(wxWindow *win, + wxDC& dc, + const wxSize& size, + wxCoord position, + wxOrientation orient, + int flags = 0) + { m_rendererNative.DrawSplitterSash(win, dc, size, + position, orient, flags); } + + virtual void DrawComboBoxDropButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawComboBoxDropButton(win, dc, rect, flags); } + + virtual void DrawDropArrow(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawDropArrow(win, dc, rect, flags); } + + virtual void DrawCheckBox(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawCheckBox( win, dc, rect, flags ); } + + virtual wxSize GetCheckBoxSize(wxWindow *win) + { return m_rendererNative.GetCheckBoxSize(win); } + + virtual void DrawPushButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawPushButton( win, dc, rect, flags ); } + + virtual void DrawItemSelectionRect(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawItemSelectionRect( win, dc, rect, flags ); } + + virtual void DrawFocusRect(wxWindow* win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawFocusRect( win, dc, rect, flags ); } + + virtual void DrawChoice(wxWindow* win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawChoice( win, dc, rect, flags); } + + virtual void DrawComboBox(wxWindow* win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawComboBox( win, dc, rect, flags); } + + virtual void DrawTextCtrl(wxWindow* win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawTextCtrl( win, dc, rect, flags); } + + virtual void DrawRadioBitmap(wxWindow* win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_rendererNative.DrawRadioBitmap(win, dc, rect, flags); } + +#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP + virtual void DrawTitleBarBitmap(wxWindow *win, + wxDC& dc, + const wxRect& rect, + wxTitleBarButton button, + int flags = 0) + { m_rendererNative.DrawTitleBarBitmap(win, dc, rect, button, flags); } +#endif // wxHAS_DRAW_TITLE_BAR_BITMAP + + virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win) + { return m_rendererNative.GetSplitterParams(win); } + + virtual wxRendererVersion GetVersion() const + { return m_rendererNative.GetVersion(); } + +protected: + wxRendererNative& m_rendererNative; + + wxDECLARE_NO_COPY_CLASS(wxDelegateRendererNative); +}; + +// ---------------------------------------------------------------------------- +// inline functions implementation +// ---------------------------------------------------------------------------- + +#ifndef wxHAS_NATIVE_RENDERER + +// default native renderer is the generic one then +/* static */ inline +wxRendererNative& wxRendererNative::GetDefault() +{ + return GetGeneric(); +} + +#endif // !wxHAS_NATIVE_RENDERER + +#endif // _WX_RENDERER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/art.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/art.h new file mode 100644 index 0000000000..b951412999 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/art.h @@ -0,0 +1,943 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ribbon/art.h +// Purpose: Art providers for ribbon-bar-style interface +// Author: Peter Cawley +// Modified by: +// Created: 2009-05-25 +// Copyright: (C) Peter Cawley +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RIBBON_ART_H_ +#define _WX_RIBBON_ART_H_ + +#include "wx/defs.h" + +#if wxUSE_RIBBON + +#include "wx/brush.h" +#include "wx/colour.h" +#include "wx/font.h" +#include "wx/pen.h" +#include "wx/bitmap.h" +#include "wx/ribbon/bar.h" + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +enum wxRibbonArtSetting +{ + wxRIBBON_ART_TAB_SEPARATION_SIZE, + wxRIBBON_ART_PAGE_BORDER_LEFT_SIZE, + wxRIBBON_ART_PAGE_BORDER_TOP_SIZE, + wxRIBBON_ART_PAGE_BORDER_RIGHT_SIZE, + wxRIBBON_ART_PAGE_BORDER_BOTTOM_SIZE, + wxRIBBON_ART_PANEL_X_SEPARATION_SIZE, + wxRIBBON_ART_PANEL_Y_SEPARATION_SIZE, + wxRIBBON_ART_TOOL_GROUP_SEPARATION_SIZE, + wxRIBBON_ART_GALLERY_BITMAP_PADDING_LEFT_SIZE, + wxRIBBON_ART_GALLERY_BITMAP_PADDING_RIGHT_SIZE, + wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE, + wxRIBBON_ART_GALLERY_BITMAP_PADDING_BOTTOM_SIZE, + wxRIBBON_ART_PANEL_LABEL_FONT, + wxRIBBON_ART_BUTTON_BAR_LABEL_FONT, + wxRIBBON_ART_TAB_LABEL_FONT, + wxRIBBON_ART_BUTTON_BAR_LABEL_COLOUR, + wxRIBBON_ART_BUTTON_BAR_HOVER_BORDER_COLOUR, + wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR, + wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_COLOUR, + wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_BUTTON_BAR_ACTIVE_BORDER_COLOUR, + wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR, + wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_COLOUR, + wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_GALLERY_BORDER_COLOUR, + wxRIBBON_ART_GALLERY_HOVER_BACKGROUND_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_FACE_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_HOVER_FACE_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_FACE_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_GALLERY_BUTTON_DISABLED_FACE_COLOUR, + wxRIBBON_ART_GALLERY_ITEM_BORDER_COLOUR, + wxRIBBON_ART_TAB_LABEL_COLOUR, + wxRIBBON_ART_TAB_SEPARATOR_COLOUR, + wxRIBBON_ART_TAB_SEPARATOR_GRADIENT_COLOUR, + wxRIBBON_ART_TAB_CTRL_BACKGROUND_COLOUR, + wxRIBBON_ART_TAB_CTRL_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_TAB_HOVER_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_TAB_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR, + wxRIBBON_ART_TAB_HOVER_BACKGROUND_COLOUR, + wxRIBBON_ART_TAB_HOVER_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR, + wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_COLOUR, + wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_TAB_BORDER_COLOUR, + wxRIBBON_ART_PANEL_BORDER_COLOUR, + wxRIBBON_ART_PANEL_BORDER_GRADIENT_COLOUR, + wxRIBBON_ART_PANEL_MINIMISED_BORDER_COLOUR, + wxRIBBON_ART_PANEL_MINIMISED_BORDER_GRADIENT_COLOUR, + wxRIBBON_ART_PANEL_LABEL_BACKGROUND_COLOUR, + wxRIBBON_ART_PANEL_LABEL_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_PANEL_LABEL_COLOUR, + wxRIBBON_ART_PANEL_HOVER_LABEL_BACKGROUND_COLOUR, + wxRIBBON_ART_PANEL_HOVER_LABEL_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_PANEL_HOVER_LABEL_COLOUR, + wxRIBBON_ART_PANEL_MINIMISED_LABEL_COLOUR, + wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR, + wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_COLOUR, + wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_PANEL_BUTTON_FACE_COLOUR, + wxRIBBON_ART_PANEL_BUTTON_HOVER_FACE_COLOUR, + + wxRIBBON_ART_PAGE_TOGGLE_FACE_COLOUR, + wxRIBBON_ART_PAGE_TOGGLE_HOVER_FACE_COLOUR, + + wxRIBBON_ART_PAGE_BORDER_COLOUR, + wxRIBBON_ART_PAGE_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_PAGE_BACKGROUND_TOP_GRADIENT_COLOUR, + wxRIBBON_ART_PAGE_BACKGROUND_COLOUR, + wxRIBBON_ART_PAGE_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR, + wxRIBBON_ART_PAGE_HOVER_BACKGROUND_COLOUR, + wxRIBBON_ART_PAGE_HOVER_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_TOOLBAR_BORDER_COLOUR, + wxRIBBON_ART_TOOLBAR_HOVER_BORDER_COLOUR, + wxRIBBON_ART_TOOLBAR_FACE_COLOUR, + wxRIBBON_ART_TOOL_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_TOOL_BACKGROUND_TOP_GRADIENT_COLOUR, + wxRIBBON_ART_TOOL_BACKGROUND_COLOUR, + wxRIBBON_ART_TOOL_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR, + wxRIBBON_ART_TOOL_HOVER_BACKGROUND_COLOUR, + wxRIBBON_ART_TOOL_HOVER_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_COLOUR, + wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR, + wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_COLOUR, + wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_GRADIENT_COLOUR, + wxRIBBON_ART_BUTTON_BAR_LABEL_DISABLED_COLOUR +}; + +enum wxRibbonScrollButtonStyle +{ + wxRIBBON_SCROLL_BTN_LEFT = 0, + wxRIBBON_SCROLL_BTN_RIGHT = 1, + wxRIBBON_SCROLL_BTN_UP = 2, + wxRIBBON_SCROLL_BTN_DOWN = 3, + + wxRIBBON_SCROLL_BTN_DIRECTION_MASK = 3, + + wxRIBBON_SCROLL_BTN_NORMAL = 0, + wxRIBBON_SCROLL_BTN_HOVERED = 4, + wxRIBBON_SCROLL_BTN_ACTIVE = 8, + + wxRIBBON_SCROLL_BTN_STATE_MASK = 12, + + wxRIBBON_SCROLL_BTN_FOR_OTHER = 0, + wxRIBBON_SCROLL_BTN_FOR_TABS = 16, + wxRIBBON_SCROLL_BTN_FOR_PAGE = 32, + + wxRIBBON_SCROLL_BTN_FOR_MASK = 48 +}; + +enum wxRibbonButtonKind +{ + wxRIBBON_BUTTON_NORMAL = 1 << 0, + wxRIBBON_BUTTON_DROPDOWN = 1 << 1, + wxRIBBON_BUTTON_HYBRID = wxRIBBON_BUTTON_NORMAL | wxRIBBON_BUTTON_DROPDOWN, + wxRIBBON_BUTTON_TOGGLE = 1 << 2 +}; + +enum wxRibbonButtonBarButtonState +{ + wxRIBBON_BUTTONBAR_BUTTON_SMALL = 0 << 0, + wxRIBBON_BUTTONBAR_BUTTON_MEDIUM = 1 << 0, + wxRIBBON_BUTTONBAR_BUTTON_LARGE = 2 << 0, + wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK = 3 << 0, + + wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED = 1 << 3, + wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED = 1 << 4, + wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK = wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED | wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED, + wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE = 1 << 5, + wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE = 1 << 6, + wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK = wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE | wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE, + wxRIBBON_BUTTONBAR_BUTTON_DISABLED = 1 << 7, + wxRIBBON_BUTTONBAR_BUTTON_TOGGLED = 1 << 8, + wxRIBBON_BUTTONBAR_BUTTON_STATE_MASK = 0x1F8 +}; + +enum wxRibbonGalleryButtonState +{ + wxRIBBON_GALLERY_BUTTON_NORMAL, + wxRIBBON_GALLERY_BUTTON_HOVERED, + wxRIBBON_GALLERY_BUTTON_ACTIVE, + wxRIBBON_GALLERY_BUTTON_DISABLED +}; + +class wxRibbonBar; +class wxRibbonPage; +class wxRibbonPanel; +class wxRibbonGallery; +class wxRibbonGalleryItem; +class wxRibbonPageTabInfo; +class wxRibbonPageTabInfoArray; + +class WXDLLIMPEXP_RIBBON wxRibbonArtProvider +{ +public: + wxRibbonArtProvider(); + virtual ~wxRibbonArtProvider(); + + virtual wxRibbonArtProvider* Clone() const = 0; + virtual void SetFlags(long flags) = 0; + virtual long GetFlags() const = 0; + + virtual int GetMetric(int id) const = 0; + virtual void SetMetric(int id, int new_val) = 0; + virtual void SetFont(int id, const wxFont& font) = 0; + virtual wxFont GetFont(int id) const = 0; + virtual wxColour GetColour(int id) const = 0; + virtual void SetColour(int id, const wxColor& colour) = 0; + wxColour GetColor(int id) const { return GetColour(id); } + void SetColor(int id, const wxColour& color) { SetColour(id, color); } + virtual void GetColourScheme(wxColour* primary, + wxColour* secondary, + wxColour* tertiary) const = 0; + virtual void SetColourScheme(const wxColour& primary, + const wxColour& secondary, + const wxColour& tertiary) = 0; + + virtual void DrawTabCtrlBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawTab(wxDC& dc, + wxWindow* wnd, + const wxRibbonPageTabInfo& tab) = 0; + + virtual void DrawTabSeparator(wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + double visibility) = 0; + + virtual void DrawPageBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawScrollButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + long style) = 0; + + virtual void DrawPanelBackground( + wxDC& dc, + wxRibbonPanel* wnd, + const wxRect& rect) = 0; + + virtual void DrawGalleryBackground( + wxDC& dc, + wxRibbonGallery* wnd, + const wxRect& rect) = 0; + + virtual void DrawGalleryItemBackground( + wxDC& dc, + wxRibbonGallery* wnd, + const wxRect& rect, + wxRibbonGalleryItem* item) = 0; + + virtual void DrawMinimisedPanel( + wxDC& dc, + wxRibbonPanel* wnd, + const wxRect& rect, + wxBitmap& bitmap) = 0; + + virtual void DrawButtonBarBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawButtonBarButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + wxRibbonButtonKind kind, + long state, + const wxString& label, + const wxBitmap& bitmap_large, + const wxBitmap& bitmap_small) = 0; + + virtual void DrawToolBarBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawToolGroupBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawTool( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + const wxBitmap& bitmap, + wxRibbonButtonKind kind, + long state) = 0; + + virtual void DrawToggleButton( + wxDC& dc, + wxRibbonBar* wnd, + const wxRect& rect, + wxRibbonDisplayMode mode) = 0; + + virtual void DrawHelpButton( + wxDC& dc, + wxRibbonBar* wnd, + const wxRect& rect) = 0; + + virtual void GetBarTabWidth( + wxDC& dc, + wxWindow* wnd, + const wxString& label, + const wxBitmap& bitmap, + int* ideal, + int* small_begin_need_separator, + int* small_must_have_separator, + int* minimum) = 0; + + virtual int GetTabCtrlHeight( + wxDC& dc, + wxWindow* wnd, + const wxRibbonPageTabInfoArray& pages) = 0; + + virtual wxSize GetScrollButtonMinimumSize( + wxDC& dc, + wxWindow* wnd, + long style) = 0; + + virtual wxSize GetPanelSize( + wxDC& dc, + const wxRibbonPanel* wnd, + wxSize client_size, + wxPoint* client_offset) = 0; + + virtual wxSize GetPanelClientSize( + wxDC& dc, + const wxRibbonPanel* wnd, + wxSize size, + wxPoint* client_offset) = 0; + + virtual wxRect GetPanelExtButtonArea( + wxDC& dc, + const wxRibbonPanel* wnd, + wxRect rect) = 0; + + virtual wxSize GetGallerySize( + wxDC& dc, + const wxRibbonGallery* wnd, + wxSize client_size) = 0; + + virtual wxSize GetGalleryClientSize( + wxDC& dc, + const wxRibbonGallery* wnd, + wxSize size, + wxPoint* client_offset, + wxRect* scroll_up_button, + wxRect* scroll_down_button, + wxRect* extension_button) = 0; + + virtual wxRect GetPageBackgroundRedrawArea( + wxDC& dc, + const wxRibbonPage* wnd, + wxSize page_old_size, + wxSize page_new_size) = 0; + + virtual bool GetButtonBarButtonSize( + wxDC& dc, + wxWindow* wnd, + wxRibbonButtonKind kind, + wxRibbonButtonBarButtonState size, + const wxString& label, + wxSize bitmap_size_large, + wxSize bitmap_size_small, + wxSize* button_size, + wxRect* normal_region, + wxRect* dropdown_region) = 0; + + virtual wxSize GetMinimisedPanelMinimumSize( + wxDC& dc, + const wxRibbonPanel* wnd, + wxSize* desired_bitmap_size, + wxDirection* expanded_panel_direction) = 0; + + virtual wxSize GetToolSize( + wxDC& dc, + wxWindow* wnd, + wxSize bitmap_size, + wxRibbonButtonKind kind, + bool is_first, + bool is_last, + wxRect* dropdown_region) = 0; + + virtual wxRect GetBarToggleButtonArea(const wxRect& rect)= 0; + + virtual wxRect GetRibbonHelpButtonArea(const wxRect& rect) = 0; +}; + +class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider : public wxRibbonArtProvider +{ +public: + wxRibbonMSWArtProvider(bool set_colour_scheme = true); + virtual ~wxRibbonMSWArtProvider(); + + wxRibbonArtProvider* Clone() const; + void SetFlags(long flags); + long GetFlags() const; + + int GetMetric(int id) const; + void SetMetric(int id, int new_val); + void SetFont(int id, const wxFont& font); + wxFont GetFont(int id) const; + wxColour GetColour(int id) const; + void SetColour(int id, const wxColor& colour); + void GetColourScheme(wxColour* primary, + wxColour* secondary, + wxColour* tertiary) const; + void SetColourScheme(const wxColour& primary, + const wxColour& secondary, + const wxColour& tertiary); + + int GetTabCtrlHeight( + wxDC& dc, + wxWindow* wnd, + const wxRibbonPageTabInfoArray& pages); + + void DrawTabCtrlBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawTab(wxDC& dc, + wxWindow* wnd, + const wxRibbonPageTabInfo& tab); + + void DrawTabSeparator( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + double visibility); + + void DrawPageBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawScrollButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + long style); + + void DrawPanelBackground( + wxDC& dc, + wxRibbonPanel* wnd, + const wxRect& rect); + + void DrawGalleryBackground( + wxDC& dc, + wxRibbonGallery* wnd, + const wxRect& rect); + + void DrawGalleryItemBackground( + wxDC& dc, + wxRibbonGallery* wnd, + const wxRect& rect, + wxRibbonGalleryItem* item); + + void DrawMinimisedPanel( + wxDC& dc, + wxRibbonPanel* wnd, + const wxRect& rect, + wxBitmap& bitmap); + + void DrawButtonBarBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawButtonBarButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + wxRibbonButtonKind kind, + long state, + const wxString& label, + const wxBitmap& bitmap_large, + const wxBitmap& bitmap_small); + + void DrawToolBarBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawToolGroupBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawTool( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + const wxBitmap& bitmap, + wxRibbonButtonKind kind, + long state); + + void DrawToggleButton( + wxDC& dc, + wxRibbonBar* wnd, + const wxRect& rect, + wxRibbonDisplayMode mode); + + void DrawHelpButton(wxDC& dc, + wxRibbonBar* wnd, + const wxRect& rect); + + void GetBarTabWidth( + wxDC& dc, + wxWindow* wnd, + const wxString& label, + const wxBitmap& bitmap, + int* ideal, + int* small_begin_need_separator, + int* small_must_have_separator, + int* minimum); + + wxSize GetScrollButtonMinimumSize( + wxDC& dc, + wxWindow* wnd, + long style); + + wxSize GetPanelSize( + wxDC& dc, + const wxRibbonPanel* wnd, + wxSize client_size, + wxPoint* client_offset); + + wxSize GetPanelClientSize( + wxDC& dc, + const wxRibbonPanel* wnd, + wxSize size, + wxPoint* client_offset); + + wxRect GetPanelExtButtonArea( + wxDC& dc, + const wxRibbonPanel* wnd, + wxRect rect); + + wxSize GetGallerySize( + wxDC& dc, + const wxRibbonGallery* wnd, + wxSize client_size); + + wxSize GetGalleryClientSize( + wxDC& dc, + const wxRibbonGallery* wnd, + wxSize size, + wxPoint* client_offset, + wxRect* scroll_up_button, + wxRect* scroll_down_button, + wxRect* extension_button); + + wxRect GetPageBackgroundRedrawArea( + wxDC& dc, + const wxRibbonPage* wnd, + wxSize page_old_size, + wxSize page_new_size); + + bool GetButtonBarButtonSize( + wxDC& dc, + wxWindow* wnd, + wxRibbonButtonKind kind, + wxRibbonButtonBarButtonState size, + const wxString& label, + wxSize bitmap_size_large, + wxSize bitmap_size_small, + wxSize* button_size, + wxRect* normal_region, + wxRect* dropdown_region); + + wxSize GetMinimisedPanelMinimumSize( + wxDC& dc, + const wxRibbonPanel* wnd, + wxSize* desired_bitmap_size, + wxDirection* expanded_panel_direction); + + wxSize GetToolSize( + wxDC& dc, + wxWindow* wnd, + wxSize bitmap_size, + wxRibbonButtonKind kind, + bool is_first, + bool is_last, + wxRect* dropdown_region); + + wxRect GetBarToggleButtonArea(const wxRect& rect); + + wxRect GetRibbonHelpButtonArea(const wxRect& rect); + +protected: + void ReallyDrawTabSeparator(wxWindow* wnd, const wxRect& rect, double visibility); + void DrawPartialPageBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect, + bool allow_hovered = true); + void DrawPartialPageBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect, + wxRibbonPage* page, wxPoint offset, bool hovered = false); + void DrawPanelBorder(wxDC& dc, const wxRect& rect, wxPen& primary_colour, + wxPen& secondary_colour); + void RemovePanelPadding(wxRect* rect); + void DrawDropdownArrow(wxDC& dc, int x, int y, const wxColour& colour); + void DrawGalleryBackgroundCommon(wxDC& dc, wxRibbonGallery* wnd, + const wxRect& rect); + virtual void DrawGalleryButton(wxDC& dc, wxRect rect, + wxRibbonGalleryButtonState state, wxBitmap* bitmaps); + void DrawButtonBarButtonForeground( + wxDC& dc, + const wxRect& rect, + wxRibbonButtonKind kind, + long state, + const wxString& label, + const wxBitmap& bitmap_large, + const wxBitmap& bitmap_small); + void DrawMinimisedPanelCommon( + wxDC& dc, + wxRibbonPanel* wnd, + const wxRect& rect, + wxRect* preview_rect); + void CloneTo(wxRibbonMSWArtProvider* copy) const; + + wxBitmap m_cached_tab_separator; + wxBitmap m_gallery_up_bitmap[4]; + wxBitmap m_gallery_down_bitmap[4]; + wxBitmap m_gallery_extension_bitmap[4]; + wxBitmap m_toolbar_drop_bitmap; + wxBitmap m_panel_extension_bitmap[2]; + wxBitmap m_ribbon_toggle_up_bitmap[2]; + wxBitmap m_ribbon_toggle_down_bitmap[2]; + wxBitmap m_ribbon_toggle_pin_bitmap[2]; + wxBitmap m_ribbon_bar_help_button_bitmap[2]; + + wxColour m_primary_scheme_colour; + wxColour m_secondary_scheme_colour; + wxColour m_tertiary_scheme_colour; + + wxColour m_button_bar_label_colour; + wxColour m_button_bar_label_disabled_colour; + wxColour m_tab_label_colour; + wxColour m_tab_separator_colour; + wxColour m_tab_separator_gradient_colour; + wxColour m_tab_active_background_colour; + wxColour m_tab_active_background_gradient_colour; + wxColour m_tab_hover_background_colour; + wxColour m_tab_hover_background_gradient_colour; + wxColour m_tab_hover_background_top_colour; + wxColour m_tab_hover_background_top_gradient_colour; + wxColour m_panel_label_colour; + wxColour m_panel_minimised_label_colour; + wxColour m_panel_hover_label_colour; + wxColour m_panel_active_background_colour; + wxColour m_panel_active_background_gradient_colour; + wxColour m_panel_active_background_top_colour; + wxColour m_panel_active_background_top_gradient_colour; + wxColour m_panel_button_face_colour; + wxColour m_panel_button_hover_face_colour; + wxColour m_page_toggle_face_colour; + wxColour m_page_toggle_hover_face_colour; + wxColour m_page_background_colour; + wxColour m_page_background_gradient_colour; + wxColour m_page_background_top_colour; + wxColour m_page_background_top_gradient_colour; + wxColour m_page_hover_background_colour; + wxColour m_page_hover_background_gradient_colour; + wxColour m_page_hover_background_top_colour; + wxColour m_page_hover_background_top_gradient_colour; + wxColour m_button_bar_hover_background_colour; + wxColour m_button_bar_hover_background_gradient_colour; + wxColour m_button_bar_hover_background_top_colour; + wxColour m_button_bar_hover_background_top_gradient_colour; + wxColour m_button_bar_active_background_colour; + wxColour m_button_bar_active_background_gradient_colour; + wxColour m_button_bar_active_background_top_colour; + wxColour m_button_bar_active_background_top_gradient_colour; + wxColour m_gallery_button_background_colour; + wxColour m_gallery_button_background_gradient_colour; + wxColour m_gallery_button_hover_background_colour; + wxColour m_gallery_button_hover_background_gradient_colour; + wxColour m_gallery_button_active_background_colour; + wxColour m_gallery_button_active_background_gradient_colour; + wxColour m_gallery_button_disabled_background_colour; + wxColour m_gallery_button_disabled_background_gradient_colour; + wxColour m_gallery_button_face_colour; + wxColour m_gallery_button_hover_face_colour; + wxColour m_gallery_button_active_face_colour; + wxColour m_gallery_button_disabled_face_colour; + + wxColour m_tool_face_colour; + wxColour m_tool_background_top_colour; + wxColour m_tool_background_top_gradient_colour; + wxColour m_tool_background_colour; + wxColour m_tool_background_gradient_colour; + wxColour m_tool_hover_background_top_colour; + wxColour m_tool_hover_background_top_gradient_colour; + wxColour m_tool_hover_background_colour; + wxColour m_tool_hover_background_gradient_colour; + wxColour m_tool_active_background_top_colour; + wxColour m_tool_active_background_top_gradient_colour; + wxColour m_tool_active_background_colour; + wxColour m_tool_active_background_gradient_colour; + + wxBrush m_tab_ctrl_background_brush; + wxBrush m_panel_label_background_brush; + wxBrush m_panel_hover_label_background_brush; + wxBrush m_panel_hover_button_background_brush; + wxBrush m_gallery_hover_background_brush; + wxBrush m_gallery_button_background_top_brush; + wxBrush m_gallery_button_hover_background_top_brush; + wxBrush m_gallery_button_active_background_top_brush; + wxBrush m_gallery_button_disabled_background_top_brush; + wxBrush m_ribbon_toggle_brush; + + wxFont m_tab_label_font; + wxFont m_panel_label_font; + wxFont m_button_bar_label_font; + + wxPen m_page_border_pen; + wxPen m_panel_border_pen; + wxPen m_panel_border_gradient_pen; + wxPen m_panel_minimised_border_pen; + wxPen m_panel_minimised_border_gradient_pen; + wxPen m_panel_hover_button_border_pen; + wxPen m_tab_border_pen; + wxPen m_button_bar_hover_border_pen; + wxPen m_button_bar_active_border_pen; + wxPen m_gallery_border_pen; + wxPen m_gallery_item_border_pen; + wxPen m_toolbar_border_pen; + wxPen m_ribbon_toggle_pen; + + double m_cached_tab_separator_visibility; + long m_flags; + + int m_tab_separation_size; + int m_page_border_left; + int m_page_border_top; + int m_page_border_right; + int m_page_border_bottom; + int m_panel_x_separation_size; + int m_panel_y_separation_size; + int m_tool_group_separation_size; + int m_gallery_bitmap_padding_left_size; + int m_gallery_bitmap_padding_right_size; + int m_gallery_bitmap_padding_top_size; + int m_gallery_bitmap_padding_bottom_size; + int m_toggle_button_offset; + int m_help_button_offset; +}; + +class WXDLLIMPEXP_RIBBON wxRibbonAUIArtProvider : public wxRibbonMSWArtProvider +{ +public: + wxRibbonAUIArtProvider(); + virtual ~wxRibbonAUIArtProvider(); + + wxRibbonArtProvider* Clone() const; + + wxColour GetColour(int id) const; + void SetColour(int id, const wxColor& colour); + void SetColourScheme(const wxColour& primary, + const wxColour& secondary, + const wxColour& tertiary); + void SetFont(int id, const wxFont& font); + + wxSize GetScrollButtonMinimumSize( + wxDC& dc, + wxWindow* wnd, + long style); + + void DrawScrollButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + long style); + + wxSize GetPanelSize( + wxDC& dc, + const wxRibbonPanel* wnd, + wxSize client_size, + wxPoint* client_offset); + + wxSize GetPanelClientSize( + wxDC& dc, + const wxRibbonPanel* wnd, + wxSize size, + wxPoint* client_offset); + + wxRect GetPanelExtButtonArea( + wxDC& dc, + const wxRibbonPanel* wnd, + wxRect rect); + + void DrawTabCtrlBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + int GetTabCtrlHeight( + wxDC& dc, + wxWindow* wnd, + const wxRibbonPageTabInfoArray& pages); + + void GetBarTabWidth( + wxDC& dc, + wxWindow* wnd, + const wxString& label, + const wxBitmap& bitmap, + int* ideal, + int* small_begin_need_separator, + int* small_must_have_separator, + int* minimum); + + void DrawTab(wxDC& dc, + wxWindow* wnd, + const wxRibbonPageTabInfo& tab); + + void DrawTabSeparator( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + double visibility); + + void DrawPageBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawPanelBackground( + wxDC& dc, + wxRibbonPanel* wnd, + const wxRect& rect); + + void DrawMinimisedPanel( + wxDC& dc, + wxRibbonPanel* wnd, + const wxRect& rect, + wxBitmap& bitmap); + + void DrawGalleryBackground( + wxDC& dc, + wxRibbonGallery* wnd, + const wxRect& rect); + + void DrawGalleryItemBackground( + wxDC& dc, + wxRibbonGallery* wnd, + const wxRect& rect, + wxRibbonGalleryItem* item); + + void DrawButtonBarBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawButtonBarButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + wxRibbonButtonKind kind, + long state, + const wxString& label, + const wxBitmap& bitmap_large, + const wxBitmap& bitmap_small); + + void DrawToolBarBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawToolGroupBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawTool( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect, + const wxBitmap& bitmap, + wxRibbonButtonKind kind, + long state); + +protected: + void DrawPartialPanelBackground(wxDC& dc, wxWindow* wnd, + const wxRect& rect); + void DrawGalleryButton(wxDC& dc, wxRect rect, + wxRibbonGalleryButtonState state, wxBitmap* bitmaps); + + wxColour m_tab_ctrl_background_colour; + wxColour m_tab_ctrl_background_gradient_colour; + wxColour m_panel_label_background_colour; + wxColour m_panel_label_background_gradient_colour; + wxColour m_panel_hover_label_background_colour; + wxColour m_panel_hover_label_background_gradient_colour; + + wxBrush m_background_brush; + wxBrush m_tab_active_top_background_brush; + wxBrush m_tab_hover_background_brush; + wxBrush m_button_bar_hover_background_brush; + wxBrush m_button_bar_active_background_brush; + wxBrush m_gallery_button_active_background_brush; + wxBrush m_gallery_button_hover_background_brush; + wxBrush m_gallery_button_disabled_background_brush; + wxBrush m_tool_hover_background_brush; + wxBrush m_tool_active_background_brush; + + wxPen m_toolbar_hover_borden_pen; + + wxFont m_tab_active_label_font; +}; + +#if defined(__WXMSW__) +typedef wxRibbonMSWArtProvider wxRibbonDefaultArtProvider; +#elif defined(__WXOSX_CARBON__) || \ + defined(__WXOSX_COCOA__) || \ + defined(__WXOSX_IPHONE__) || \ + defined(__WXCOCOA__) +// TODO: Once implemented, change typedef to OSX +// typedef wxRibbonOSXArtProvider wxRibbonDefaultArtProvider; +typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider; +#else +// TODO: Once implemented, change typedef to AUI +typedef wxRibbonAUIArtProvider wxRibbonDefaultArtProvider; +#endif + +#endif // wxUSE_RIBBON + +#endif // _WX_RIBBON_ART_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/art_internal.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/art_internal.h new file mode 100644 index 0000000000..879b22d866 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/art_internal.h @@ -0,0 +1,81 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ribbon/art_internal.h +// Purpose: Helper functions & classes used by ribbon art providers +// Author: Peter Cawley +// Modified by: +// Created: 2009-08-04 +// Copyright: (C) Peter Cawley +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RIBBON_ART_INTERNAL_H_ +#define _WX_RIBBON_ART_INTERNAL_H_ + +#include "wx/defs.h" + +#if wxUSE_RIBBON + +WXDLLIMPEXP_RIBBON wxColour wxRibbonInterpolateColour( + const wxColour& start_colour, + const wxColour& end_colour, + int position, + int start_position, + int end_position); + +WXDLLIMPEXP_RIBBON bool wxRibbonCanLabelBreakAtPosition( + const wxString& label, + size_t pos); + +WXDLLIMPEXP_RIBBON void wxRibbonDrawParallelGradientLines( + wxDC& dc, + int nlines, + const wxPoint* line_origins, + int stepx, + int stepy, + int numsteps, + int offset_x, + int offset_y, + const wxColour& start_colour, + const wxColour& end_colour); + +WXDLLIMPEXP_RIBBON wxBitmap wxRibbonLoadPixmap( + const char* const* bits, + wxColour fore); + +/* + HSL colour class, using interface as discussed in wx-dev. Provided mainly + for art providers to perform colour scheme calculations in the HSL colour + space. If such a class makes it into base / core, then this class should be + removed and users switched over to the one in base / core. + + 0.0 <= Hue < 360.0 + 0.0 <= Saturation <= 1.0 + 0.0 <= Luminance <= 1.0 +*/ +class WXDLLIMPEXP_RIBBON wxRibbonHSLColour +{ +public: + wxRibbonHSLColour() + : hue(0.0), saturation(0.0), luminance(0.0) {} + wxRibbonHSLColour(float H, float S, float L) + : hue(H), saturation(S), luminance(L) { } + wxRibbonHSLColour(const wxColour& C); + + wxColour ToRGB() const; + + wxRibbonHSLColour& MakeDarker(float delta); + wxRibbonHSLColour Darker(float delta) const; + wxRibbonHSLColour Lighter(float delta) const; + wxRibbonHSLColour Saturated(float delta) const; + wxRibbonHSLColour Desaturated(float delta) const; + wxRibbonHSLColour ShiftHue(float delta) const; + + float hue, saturation, luminance; +}; + +WXDLLIMPEXP_RIBBON wxRibbonHSLColour wxRibbonShiftLuminance( + wxRibbonHSLColour colour, float amount); + +#endif // wxUSE_RIBBON + +#endif // _WX_RIBBON_ART_INTERNAL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/bar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/bar.h new file mode 100644 index 0000000000..2b454543fd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/bar.h @@ -0,0 +1,296 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ribbon/bar.h +// Purpose: Top-level component of the ribbon-bar-style interface +// Author: Peter Cawley +// Modified by: +// Created: 2009-05-23 +// Copyright: (C) Peter Cawley +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RIBBON_BAR_H_ +#define _WX_RIBBON_BAR_H_ + +#include "wx/defs.h" + +#if wxUSE_RIBBON + +#include "wx/ribbon/control.h" +#include "wx/ribbon/page.h" + +enum wxRibbonBarOption +{ + wxRIBBON_BAR_SHOW_PAGE_LABELS = 1 << 0, + wxRIBBON_BAR_SHOW_PAGE_ICONS = 1 << 1, + wxRIBBON_BAR_FLOW_HORIZONTAL = 0, + wxRIBBON_BAR_FLOW_VERTICAL = 1 << 2, + wxRIBBON_BAR_SHOW_PANEL_EXT_BUTTONS = 1 << 3, + wxRIBBON_BAR_SHOW_PANEL_MINIMISE_BUTTONS = 1 << 4, + wxRIBBON_BAR_ALWAYS_SHOW_TABS = 1 << 5, + wxRIBBON_BAR_SHOW_TOGGLE_BUTTON = 1 << 6, + wxRIBBON_BAR_SHOW_HELP_BUTTON = 1 << 7, + + wxRIBBON_BAR_DEFAULT_STYLE = wxRIBBON_BAR_FLOW_HORIZONTAL + | wxRIBBON_BAR_SHOW_PAGE_LABELS + | wxRIBBON_BAR_SHOW_PANEL_EXT_BUTTONS + | wxRIBBON_BAR_SHOW_TOGGLE_BUTTON + | wxRIBBON_BAR_SHOW_HELP_BUTTON, + + wxRIBBON_BAR_FOLDBAR_STYLE = wxRIBBON_BAR_FLOW_VERTICAL + | wxRIBBON_BAR_SHOW_PAGE_ICONS + | wxRIBBON_BAR_SHOW_PANEL_EXT_BUTTONS + | wxRIBBON_BAR_SHOW_PANEL_MINIMISE_BUTTONS +}; + +enum wxRibbonDisplayMode +{ + wxRIBBON_BAR_PINNED, + wxRIBBON_BAR_MINIMIZED, + wxRIBBON_BAR_EXPANDED +}; + +class WXDLLIMPEXP_RIBBON wxRibbonBarEvent : public wxNotifyEvent +{ +public: + wxRibbonBarEvent(wxEventType command_type = wxEVT_NULL, + int win_id = 0, + wxRibbonPage* page = NULL) + : wxNotifyEvent(command_type, win_id) + , m_page(page) + { + } +#ifndef SWIG + wxRibbonBarEvent(const wxRibbonBarEvent& c) : wxNotifyEvent(c) + { + m_page = c.m_page; + } +#endif + wxEvent *Clone() const { return new wxRibbonBarEvent(*this); } + + wxRibbonPage* GetPage() {return m_page;} + void SetPage(wxRibbonPage* page) {m_page = page;} + +protected: + wxRibbonPage* m_page; + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxRibbonBarEvent) +#endif +}; + +class WXDLLIMPEXP_RIBBON wxRibbonPageTabInfo +{ +public: + wxRect rect; + wxRibbonPage *page; + int ideal_width; + int small_begin_need_separator_width; + int small_must_have_separator_width; + int minimum_width; + bool active; + bool hovered; + bool highlight; + bool shown; +}; + +#ifndef SWIG +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxRibbonPageTabInfo, wxRibbonPageTabInfoArray, WXDLLIMPEXP_RIBBON); +#endif + +class WXDLLIMPEXP_RIBBON wxRibbonBar : public wxRibbonControl +{ +public: + wxRibbonBar(); + + wxRibbonBar(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxRIBBON_BAR_DEFAULT_STYLE); + + virtual ~wxRibbonBar(); + + bool Create(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxRIBBON_BAR_DEFAULT_STYLE); + + void SetTabCtrlMargins(int left, int right); + + void SetArtProvider(wxRibbonArtProvider* art); + + bool SetActivePage(size_t page); + bool SetActivePage(wxRibbonPage* page); + int GetActivePage() const; + wxRibbonPage* GetPage(int n); + size_t GetPageCount() const; + bool DismissExpandedPanel(); + int GetPageNumber(wxRibbonPage* page) const; + + void DeletePage(size_t n); + void ClearPages(); + + bool IsPageShown(size_t page) const; + void ShowPage(size_t page, bool show = true); + void HidePage(size_t page) { ShowPage(page, false); } + + bool IsPageHighlighted(size_t page) const; + void AddPageHighlight(size_t page, bool highlight = true); + void RemovePageHighlight(size_t page) { AddPageHighlight(page, false); } + + void ShowPanels(bool show = true); + void HidePanels() { ShowPanels(false); } + bool ArePanelsShown() const { return m_arePanelsShown; } + + virtual bool HasMultiplePages() const { return true; } + + void SetWindowStyleFlag(long style); + long GetWindowStyleFlag() const; + virtual bool Realize(); + + // Implementation only. + bool IsToggleButtonHovered() const { return m_toggle_button_hovered; } + bool IsHelpButtonHovered() const { return m_help_button_hovered; } + + void HideIfExpanded(); + +protected: + friend class wxRibbonPage; + + virtual wxSize DoGetBestSize() const; + wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + wxRibbonPageTabInfo* HitTestTabs(wxPoint position, int* index = NULL); + void HitTestRibbonButton(const wxRect& rect, const wxPoint& position, bool &hover_flag); + + void CommonInit(long style); + void AddPage(wxRibbonPage *page); + void RecalculateTabSizes(); + void RecalculateMinSize(); + void ScrollTabBar(int npixels); + void RefreshTabBar(); + void RepositionPage(wxRibbonPage *page); + + void OnPaint(wxPaintEvent& evt); + void OnEraseBackground(wxEraseEvent& evt); + void DoEraseBackground(wxDC& dc); + void OnSize(wxSizeEvent& evt); + void OnMouseLeftDown(wxMouseEvent& evt); + void OnMouseLeftUp(wxMouseEvent& evt); + void OnMouseMiddleDown(wxMouseEvent& evt); + void OnMouseMiddleUp(wxMouseEvent& evt); + void OnMouseRightDown(wxMouseEvent& evt); + void OnMouseRightUp(wxMouseEvent& evt); + void OnMouseMove(wxMouseEvent& evt); + void OnMouseLeave(wxMouseEvent& evt); + void OnMouseDoubleClick(wxMouseEvent& evt); + void DoMouseButtonCommon(wxMouseEvent& evt, wxEventType tab_event_type); + void OnKillFocus(wxFocusEvent& evt); + + wxRibbonPageTabInfoArray m_pages; + wxRect m_tab_scroll_left_button_rect; + wxRect m_tab_scroll_right_button_rect; + wxRect m_toggle_button_rect; + wxRect m_help_button_rect; + long m_flags; + int m_tabs_total_width_ideal; + int m_tabs_total_width_minimum; + int m_tab_margin_left; + int m_tab_margin_right; + int m_tab_height; + int m_tab_scroll_amount; + int m_current_page; + int m_current_hovered_page; + int m_tab_scroll_left_button_state; + int m_tab_scroll_right_button_state; + bool m_tab_scroll_buttons_shown; + bool m_arePanelsShown; + bool m_bar_hovered; + bool m_toggle_button_hovered; + bool m_help_button_hovered; + + wxRibbonDisplayMode m_ribbon_state; + +#ifndef SWIG + DECLARE_CLASS(wxRibbonBar) + DECLARE_EVENT_TABLE() +#endif +}; + +#ifndef SWIG + +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_PAGE_CHANGED, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_PAGE_CHANGING, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_MIDDLE_UP, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_RIGHT_DOWN, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_RIGHT_UP, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TAB_LEFT_DCLICK, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_TOGGLED, wxRibbonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBAR_HELP_CLICK, wxRibbonBarEvent); + +typedef void (wxEvtHandler::*wxRibbonBarEventFunction)(wxRibbonBarEvent&); + +#define wxRibbonBarEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxRibbonBarEventFunction, func) + +#define EVT_RIBBONBAR_PAGE_CHANGED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_PAGE_CHANGED, winid, wxRibbonBarEventHandler(fn)) +#define EVT_RIBBONBAR_PAGE_CHANGING(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_PAGE_CHANGING, winid, wxRibbonBarEventHandler(fn)) +#define EVT_RIBBONBAR_TAB_MIDDLE_DOWN(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN, winid, wxRibbonBarEventHandler(fn)) +#define EVT_RIBBONBAR_TAB_MIDDLE_UP(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_MIDDLE_UP, winid, wxRibbonBarEventHandler(fn)) +#define EVT_RIBBONBAR_TAB_RIGHT_DOWN(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_RIGHT_DOWN, winid, wxRibbonBarEventHandler(fn)) +#define EVT_RIBBONBAR_TAB_RIGHT_UP(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_RIGHT_UP, winid, wxRibbonBarEventHandler(fn)) +#define EVT_RIBBONBAR_TAB_LEFT_DCLICK(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TAB_LEFT_DCLICK, winid, wxRibbonBarEventHandler(fn)) +#define EVT_RIBBONBAR_TOGGLED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_TOGGLED, winid, wxRibbonBarEventHandler(fn)) +#define EVT_RIBBONBAR_HELP_CLICK(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONBAR_HELP_CLICK, winid, wxRibbonBarEventHandler(fn)) +#else + +// wxpython/swig event work +%constant wxEventType wxEVT_RIBBONBAR_PAGE_CHANGED; +%constant wxEventType wxEVT_RIBBONBAR_PAGE_CHANGING; +%constant wxEventType wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN; +%constant wxEventType wxEVT_RIBBONBAR_TAB_MIDDLE_UP; +%constant wxEventType wxEVT_RIBBONBAR_TAB_RIGHT_DOWN; +%constant wxEventType wxEVT_RIBBONBAR_TAB_RIGHT_UP; +%constant wxEventType wxEVT_RIBBONBAR_TAB_LEFT_DCLICK; +%constant wxEventType wxEVT_RIBBONBAR_TOGGLED; +%constant wxEventType wxEVT_RIBBONBAR_HELP_CLICK; + +%pythoncode { + EVT_RIBBONBAR_PAGE_CHANGED = wx.PyEventBinder( wxEVT_RIBBONBAR_PAGE_CHANGED, 1 ) + EVT_RIBBONBAR_PAGE_CHANGING = wx.PyEventBinder( wxEVT_RIBBONBAR_PAGE_CHANGING, 1 ) + EVT_RIBBONBAR_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN, 1 ) + EVT_RIBBONBAR_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_MIDDLE_UP, 1 ) + EVT_RIBBONBAR_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_RIGHT_DOWN, 1 ) + EVT_RIBBONBAR_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_RIGHT_UP, 1 ) + EVT_RIBBONBAR_TAB_LEFT_DCLICK = wx.PyEventBinder( wxEVT_RIBBONBAR_TAB_LEFT_DCLICK, 1 ) + EVT_RIBBONBAR_TOGGLED = wx.PyEventBinder( wxEVT_RIBBONBAR_TOGGLED, 1 ) + EVT_RIBBONBAR_HELP_CLICK = wx.PyEventBinder( wxEVT_RIBBONBAR_HELP_CLICK, 1 ) +} +#endif + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED wxEVT_RIBBONBAR_PAGE_CHANGED +#define wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING wxEVT_RIBBONBAR_PAGE_CHANGING +#define wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_DOWN wxEVT_RIBBONBAR_TAB_MIDDLE_DOWN +#define wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP wxEVT_RIBBONBAR_TAB_MIDDLE_UP +#define wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN wxEVT_RIBBONBAR_TAB_RIGHT_DOWN +#define wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP wxEVT_RIBBONBAR_TAB_RIGHT_UP +#define wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK wxEVT_RIBBONBAR_TAB_LEFT_DCLICK +#define wxEVT_COMMAND_RIBBONBAR_TOGGLED wxEVT_RIBBONBAR_TOGGLED +#define wxEVT_COMMAND_RIBBONBAR_HELP_CLICKED wxEVT_RIBBONBAR_HELP_CLICK + +#endif // wxUSE_RIBBON + +#endif // _WX_RIBBON_BAR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/buttonbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/buttonbar.h new file mode 100644 index 0000000000..ab637a104e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/buttonbar.h @@ -0,0 +1,268 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ribbon/buttonbar.h +// Purpose: Ribbon control similar to a tool bar +// Author: Peter Cawley +// Modified by: +// Created: 2009-07-01 +// Copyright: (C) Peter Cawley +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// +#ifndef _WX_RIBBON_BUTTON_BAR_H_ +#define _WX_RIBBON_BUTTON_BAR_H_ + +#include "wx/defs.h" + +#if wxUSE_RIBBON + +#include "wx/ribbon/art.h" +#include "wx/ribbon/control.h" +#include "wx/dynarray.h" + +class wxRibbonButtonBarButtonBase; +class wxRibbonButtonBarLayout; +class wxRibbonButtonBarButtonInstance; + +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonButtonBarLayout*, wxArrayRibbonButtonBarLayout, class WXDLLIMPEXP_RIBBON); +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonButtonBarButtonBase*, wxArrayRibbonButtonBarButtonBase, class WXDLLIMPEXP_RIBBON); + +class WXDLLIMPEXP_RIBBON wxRibbonButtonBar : public wxRibbonControl +{ +public: + wxRibbonButtonBar(); + + wxRibbonButtonBar(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + + virtual ~wxRibbonButtonBar(); + + bool Create(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + + virtual wxRibbonButtonBarButtonBase* AddButton( + int button_id, + const wxString& label, + const wxBitmap& bitmap, + const wxString& help_string, + wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL); + // NB: help_string cannot be optional as that would cause the signature + // to be identical to the full version of AddButton when 3 arguments are + // given. + + virtual wxRibbonButtonBarButtonBase* AddDropdownButton( + int button_id, + const wxString& label, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonButtonBarButtonBase* AddHybridButton( + int button_id, + const wxString& label, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonButtonBarButtonBase* AddToggleButton( + int button_id, + const wxString& label, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonButtonBarButtonBase* AddButton( + int button_id, + const wxString& label, + const wxBitmap& bitmap, + const wxBitmap& bitmap_small = wxNullBitmap, + const wxBitmap& bitmap_disabled = wxNullBitmap, + const wxBitmap& bitmap_small_disabled = wxNullBitmap, + wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonButtonBarButtonBase* InsertButton( + size_t pos, + int button_id, + const wxString& label, + const wxBitmap& bitmap, + const wxString& help_string, + wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL); + + virtual wxRibbonButtonBarButtonBase* InsertDropdownButton( + size_t pos, + int button_id, + const wxString& label, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonButtonBarButtonBase* InsertHybridButton( + size_t pos, + int button_id, + const wxString& label, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonButtonBarButtonBase* InsertToggleButton( + size_t pos, + int button_id, + const wxString& label, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonButtonBarButtonBase* InsertButton( + size_t pos, + int button_id, + const wxString& label, + const wxBitmap& bitmap, + const wxBitmap& bitmap_small = wxNullBitmap, + const wxBitmap& bitmap_disabled = wxNullBitmap, + const wxBitmap& bitmap_small_disabled = wxNullBitmap, + wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL, + const wxString& help_string = wxEmptyString); + + void SetItemClientObject(wxRibbonButtonBarButtonBase* item, wxClientData* data); + wxClientData* GetItemClientObject(const wxRibbonButtonBarButtonBase* item) const; + void SetItemClientData(wxRibbonButtonBarButtonBase* item, void* data); + void* GetItemClientData(const wxRibbonButtonBarButtonBase* item) const; + + virtual size_t GetButtonCount() const; + virtual wxRibbonButtonBarButtonBase *GetItem(size_t n) const; + virtual wxRibbonButtonBarButtonBase *GetItemById(int id) const; + virtual int GetItemId(wxRibbonButtonBarButtonBase *button) const; + + + virtual bool Realize(); + virtual void ClearButtons(); + virtual bool DeleteButton(int button_id); + virtual void EnableButton(int button_id, bool enable = true); + virtual void ToggleButton(int button_id, bool checked); + + virtual wxRibbonButtonBarButtonBase *GetActiveItem() const; + virtual wxRibbonButtonBarButtonBase *GetHoveredItem() const; + + virtual void SetArtProvider(wxRibbonArtProvider* art); + virtual bool IsSizingContinuous() const; + + virtual wxSize GetMinSize() const; + + void SetShowToolTipsForDisabled(bool show); + bool GetShowToolTipsForDisabled() const; + +protected: + friend class wxRibbonButtonBarEvent; + virtual wxSize DoGetBestSize() const; + wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + void OnEraseBackground(wxEraseEvent& evt); + void OnPaint(wxPaintEvent& evt); + void OnSize(wxSizeEvent& evt); + void OnMouseMove(wxMouseEvent& evt); + void OnMouseEnter(wxMouseEvent& evt); + void OnMouseLeave(wxMouseEvent& evt); + void OnMouseDown(wxMouseEvent& evt); + void OnMouseUp(wxMouseEvent& evt); + + virtual wxSize DoGetNextSmallerSize(wxOrientation direction, + wxSize relative_to) const; + virtual wxSize DoGetNextLargerSize(wxOrientation direction, + wxSize relative_to) const; + + void CommonInit(long style); + void MakeLayouts(); + bool TryCollapseLayout(wxRibbonButtonBarLayout* original, size_t first_btn, size_t* last_button); + static wxBitmap MakeResizedBitmap(const wxBitmap& original, wxSize size); + static wxBitmap MakeDisabledBitmap(const wxBitmap& original); + void FetchButtonSizeInfo(wxRibbonButtonBarButtonBase* button, + wxRibbonButtonBarButtonState size, wxDC& dc); + virtual void UpdateWindowUI(long flags); + + wxArrayRibbonButtonBarLayout m_layouts; + wxArrayRibbonButtonBarButtonBase m_buttons; + wxRibbonButtonBarButtonInstance* m_hovered_button; + wxRibbonButtonBarButtonInstance* m_active_button; + + wxPoint m_layout_offset; + wxSize m_bitmap_size_large; + wxSize m_bitmap_size_small; + int m_current_layout; + bool m_layouts_valid; + bool m_lock_active_state; + bool m_show_tooltips_for_disabled; + +#ifndef SWIG + DECLARE_CLASS(wxRibbonButtonBar) + DECLARE_EVENT_TABLE() +#endif +}; + +class WXDLLIMPEXP_RIBBON wxRibbonButtonBarEvent : public wxCommandEvent +{ +public: + wxRibbonButtonBarEvent(wxEventType command_type = wxEVT_NULL, + int win_id = 0, + wxRibbonButtonBar* bar = NULL, + wxRibbonButtonBarButtonBase* button = NULL) + : wxCommandEvent(command_type, win_id) + , m_bar(bar), m_button(button) + { + } +#ifndef SWIG + wxRibbonButtonBarEvent(const wxRibbonButtonBarEvent& e) : wxCommandEvent(e) + { + m_bar = e.m_bar; + m_button = e.m_button; + } +#endif + wxEvent *Clone() const { return new wxRibbonButtonBarEvent(*this); } + + wxRibbonButtonBar* GetBar() {return m_bar;} + wxRibbonButtonBarButtonBase *GetButton() { return m_button; } + void SetBar(wxRibbonButtonBar* bar) {m_bar = bar;} + void SetButton(wxRibbonButtonBarButtonBase* button) { m_button = button; } + bool PopupMenu(wxMenu* menu); + +protected: + wxRibbonButtonBar* m_bar; + wxRibbonButtonBarButtonBase *m_button; + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxRibbonButtonBarEvent) +#endif +}; + +#ifndef SWIG + +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBUTTONBAR_CLICKED, wxRibbonButtonBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, wxRibbonButtonBarEvent); + +typedef void (wxEvtHandler::*wxRibbonButtonBarEventFunction)(wxRibbonButtonBarEvent&); + +#define wxRibbonButtonBarEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxRibbonButtonBarEventFunction, func) + +#define EVT_RIBBONBUTTONBAR_CLICKED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONBUTTONBAR_CLICKED, winid, wxRibbonButtonBarEventHandler(fn)) +#define EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, winid, wxRibbonButtonBarEventHandler(fn)) +#else + +// wxpython/swig event work +%constant wxEventType wxEVT_RIBBONBUTTONBAR_CLICKED; +%constant wxEventType wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED; + +%pythoncode { + EVT_RIBBONBUTTONBAR_CLICKED = wx.PyEventBinder( wxEVT_RIBBONBUTTONBAR_CLICKED, 1 ) + EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED = wx.PyEventBinder( wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, 1 ) +} +#endif + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RIBBONBUTTON_CLICKED wxEVT_RIBBONBUTTONBAR_CLICKED +#define wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED wxEVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED + +#endif // wxUSE_RIBBON + +#endif // _WX_RIBBON_BUTTON_BAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/control.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/control.h new file mode 100644 index 0000000000..cbd445b8d3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/control.h @@ -0,0 +1,83 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ribbon/control.h +// Purpose: Extension of wxControl with common ribbon methods +// Author: Peter Cawley +// Modified by: +// Created: 2009-06-05 +// Copyright: (C) Peter Cawley +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RIBBON_CONTROL_H_ +#define _WX_RIBBON_CONTROL_H_ + +#include "wx/defs.h" + +#if wxUSE_RIBBON + +#include "wx/control.h" +#include "wx/dynarray.h" + +class wxRibbonBar; +class wxRibbonArtProvider; + +class WXDLLIMPEXP_RIBBON wxRibbonControl : public wxControl +{ +public: + wxRibbonControl() { Init(); } + + wxRibbonControl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr) + { + Init(); + + Create(parent, id, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); + + virtual void SetArtProvider(wxRibbonArtProvider* art); + wxRibbonArtProvider* GetArtProvider() const {return m_art;} + + virtual bool IsSizingContinuous() const {return true;} + wxSize GetNextSmallerSize(wxOrientation direction, wxSize relative_to) const; + wxSize GetNextLargerSize(wxOrientation direction, wxSize relative_to) const; + wxSize GetNextSmallerSize(wxOrientation direction) const; + wxSize GetNextLargerSize(wxOrientation direction) const; + + virtual bool Realize(); + bool Realise() {return Realize();} + + virtual wxRibbonBar* GetAncestorRibbonBar()const; + + // Finds the best width and height given the parent's width and height + virtual wxSize GetBestSizeForParentSize(const wxSize& WXUNUSED(parentSize)) const { return GetBestSize(); } + +protected: + wxRibbonArtProvider* m_art; + + virtual wxSize DoGetNextSmallerSize(wxOrientation direction, + wxSize relative_to) const; + virtual wxSize DoGetNextLargerSize(wxOrientation direction, + wxSize relative_to) const; + +private: + void Init() { m_art = NULL; } + +#ifndef SWIG + DECLARE_CLASS(wxRibbonControl) +#endif +}; + +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonControl*, wxArrayRibbonControl, class WXDLLIMPEXP_RIBBON); + +#endif // wxUSE_RIBBON + +#endif // _WX_RIBBON_CONTROL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/gallery.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/gallery.h new file mode 100644 index 0000000000..665c69420d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/gallery.h @@ -0,0 +1,196 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ribbon/gallery.h +// Purpose: Ribbon control which displays a gallery of items to choose from +// Author: Peter Cawley +// Modified by: +// Created: 2009-07-22 +// Copyright: (C) Peter Cawley +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// +#ifndef _WX_RIBBON_GALLERY_H_ +#define _WX_RIBBON_GALLERY_H_ + +#include "wx/defs.h" + +#if wxUSE_RIBBON + +#include "wx/ribbon/art.h" +#include "wx/ribbon/control.h" + +class wxRibbonGalleryItem; + +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonGalleryItem*, wxArrayRibbonGalleryItem, class WXDLLIMPEXP_RIBBON); + +class WXDLLIMPEXP_RIBBON wxRibbonGallery : public wxRibbonControl +{ +public: + wxRibbonGallery(); + + wxRibbonGallery(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + + virtual ~wxRibbonGallery(); + + bool Create(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + + void Clear(); + + bool IsEmpty() const; + unsigned int GetCount() const; + wxRibbonGalleryItem* GetItem(unsigned int n); + wxRibbonGalleryItem* Append(const wxBitmap& bitmap, int id); + wxRibbonGalleryItem* Append(const wxBitmap& bitmap, int id, void* clientData); + wxRibbonGalleryItem* Append(const wxBitmap& bitmap, int id, wxClientData* clientData); + + void SetItemClientObject(wxRibbonGalleryItem* item, wxClientData* data); + wxClientData* GetItemClientObject(const wxRibbonGalleryItem* item) const; + void SetItemClientData(wxRibbonGalleryItem* item, void* data); + void* GetItemClientData(const wxRibbonGalleryItem* item) const; + + void SetSelection(wxRibbonGalleryItem* item); + wxRibbonGalleryItem* GetSelection() const; + wxRibbonGalleryItem* GetHoveredItem() const; + wxRibbonGalleryItem* GetActiveItem() const; + wxRibbonGalleryButtonState GetUpButtonState() const; + wxRibbonGalleryButtonState GetDownButtonState() const; + wxRibbonGalleryButtonState GetExtensionButtonState() const; + + bool IsHovered() const; + virtual bool IsSizingContinuous() const; + virtual bool Realize(); + virtual bool Layout(); + + virtual bool ScrollLines(int lines); + bool ScrollPixels(int pixels); + void EnsureVisible(const wxRibbonGalleryItem* item); + +protected: + wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + void CommonInit(long style); + void CalculateMinSize(); + bool TestButtonHover(const wxRect& rect, wxPoint pos, + wxRibbonGalleryButtonState* state); + + void OnEraseBackground(wxEraseEvent& evt); + void OnMouseEnter(wxMouseEvent& evt); + void OnMouseMove(wxMouseEvent& evt); + void OnMouseLeave(wxMouseEvent& evt); + void OnMouseDown(wxMouseEvent& evt); + void OnMouseUp(wxMouseEvent& evt); + void OnMouseDClick(wxMouseEvent& evt); + void OnPaint(wxPaintEvent& evt); + void OnSize(wxSizeEvent& evt); + int GetScrollLineSize() const; + + virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetNextSmallerSize(wxOrientation direction, + wxSize relative_to) const; + virtual wxSize DoGetNextLargerSize(wxOrientation direction, + wxSize relative_to) const; + + wxArrayRibbonGalleryItem m_items; + wxRibbonGalleryItem* m_selected_item; + wxRibbonGalleryItem* m_hovered_item; + wxRibbonGalleryItem* m_active_item; + wxSize m_bitmap_size; + wxSize m_bitmap_padded_size; + wxSize m_best_size; + wxRect m_client_rect; + wxRect m_scroll_up_button_rect; + wxRect m_scroll_down_button_rect; + wxRect m_extension_button_rect; + const wxRect* m_mouse_active_rect; + int m_item_separation_x; + int m_item_separation_y; + int m_scroll_amount; + int m_scroll_limit; + wxRibbonGalleryButtonState m_up_button_state; + wxRibbonGalleryButtonState m_down_button_state; + wxRibbonGalleryButtonState m_extension_button_state; + bool m_hovered; + +#ifndef SWIG + DECLARE_CLASS(wxRibbonGallery) + DECLARE_EVENT_TABLE() +#endif +}; + +class WXDLLIMPEXP_RIBBON wxRibbonGalleryEvent : public wxCommandEvent +{ +public: + wxRibbonGalleryEvent(wxEventType command_type = wxEVT_NULL, + int win_id = 0, + wxRibbonGallery* gallery = NULL, + wxRibbonGalleryItem* item = NULL) + : wxCommandEvent(command_type, win_id) + , m_gallery(gallery), m_item(item) + { + } +#ifndef SWIG + wxRibbonGalleryEvent(const wxRibbonGalleryEvent& e) : wxCommandEvent(e) + { + m_gallery = e.m_gallery; + m_item = e.m_item; + } +#endif + wxEvent *Clone() const { return new wxRibbonGalleryEvent(*this); } + + wxRibbonGallery* GetGallery() {return m_gallery;} + wxRibbonGalleryItem* GetGalleryItem() {return m_item;} + void SetGallery(wxRibbonGallery* gallery) {m_gallery = gallery;} + void SetGalleryItem(wxRibbonGalleryItem* item) {m_item = item;} + +protected: + wxRibbonGallery* m_gallery; + wxRibbonGalleryItem* m_item; + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxRibbonGalleryEvent) +#endif +}; + +#ifndef SWIG + +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONGALLERY_HOVER_CHANGED, wxRibbonGalleryEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONGALLERY_SELECTED, wxRibbonGalleryEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONGALLERY_CLICKED, wxRibbonGalleryEvent); + +typedef void (wxEvtHandler::*wxRibbonGalleryEventFunction)(wxRibbonGalleryEvent&); + +#define wxRibbonGalleryEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxRibbonGalleryEventFunction, func) + +#define EVT_RIBBONGALLERY_HOVER_CHANGED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONGALLERY_HOVER_CHANGED, winid, wxRibbonGalleryEventHandler(fn)) +#define EVT_RIBBONGALLERY_SELECTED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONGALLERY_SELECTED, winid, wxRibbonGalleryEventHandler(fn)) +#define EVT_RIBBONGALLERY_CLICKED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONGALLERY_CLICKED, winid, wxRibbonGalleryEventHandler(fn)) +#else + +// wxpython/swig event work +%constant wxEventType wxEVT_RIBBONGALLERY_HOVER_CHANGED; +%constant wxEventType wxEVT_RIBBONGALLERY_SELECTED; + +%pythoncode { + EVT_RIBBONGALLERY_HOVER_CHANGED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_HOVER_CHANGED, 1 ) + EVT_RIBBONGALLERY_SELECTED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_SELECTED, 1 ) +} +#endif // SWIG + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED wxEVT_RIBBONGALLERY_HOVER_CHANGED +#define wxEVT_COMMAND_RIBBONGALLERY_SELECTED wxEVT_RIBBONGALLERY_SELECTED +#define wxEVT_COMMAND_RIBBONGALLERY_CLICKED wxEVT_RIBBONGALLERY_CLICKED + +#endif // wxUSE_RIBBON + +#endif // _WX_RIBBON_GALLERY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/page.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/page.h new file mode 100644 index 0000000000..33a961412f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/page.h @@ -0,0 +1,105 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ribbon/page.h +// Purpose: Container for ribbon-bar-style interface panels +// Author: Peter Cawley +// Modified by: +// Created: 2009-05-25 +// Copyright: (C) Peter Cawley +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RIBBON_PAGE_H_ +#define _WX_RIBBON_PAGE_H_ + +#include "wx/defs.h" + +#if wxUSE_RIBBON + +#include "wx/ribbon/control.h" +#include "wx/ribbon/panel.h" +#include "wx/bitmap.h" + +class wxRibbonBar; +class wxRibbonPageScrollButton; + +class WXDLLIMPEXP_RIBBON wxRibbonPage : public wxRibbonControl +{ +public: + wxRibbonPage(); + + wxRibbonPage(wxRibbonBar* parent, + wxWindowID id = wxID_ANY, + const wxString& label = wxEmptyString, + const wxBitmap& icon = wxNullBitmap, + long style = 0); + + virtual ~wxRibbonPage(); + + bool Create(wxRibbonBar* parent, + wxWindowID id = wxID_ANY, + const wxString& label = wxEmptyString, + const wxBitmap& icon = wxNullBitmap, + long style = 0); + + void SetArtProvider(wxRibbonArtProvider* art); + + wxBitmap& GetIcon() {return m_icon;} + virtual wxSize GetMinSize() const; + void SetSizeWithScrollButtonAdjustment(int x, int y, int width, int height); + void AdjustRectToIncludeScrollButtons(wxRect* rect) const; + + bool DismissExpandedPanel(); + + virtual bool Realize(); + virtual bool Show(bool show = true); + virtual bool Layout(); + virtual bool ScrollLines(int lines); + bool ScrollPixels(int pixels); + bool ScrollSections(int sections); + + wxOrientation GetMajorAxis() const; + + virtual void RemoveChild(wxWindowBase *child); + + void HideIfExpanded(); + +protected: + virtual wxSize DoGetBestSize() const; + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); + bool DoActualLayout(); + void OnEraseBackground(wxEraseEvent& evt); + void OnPaint(wxPaintEvent& evt); + void OnSize(wxSizeEvent& evt); + + bool ExpandPanels(wxOrientation direction, int maximum_amount); + bool CollapsePanels(wxOrientation direction, int minimum_amount); + void ShowScrollButtons(); + void HideScrollButtons(); + + void CommonInit(const wxString& label, const wxBitmap& icon); + void PopulateSizeCalcArray(wxSize (wxWindow::*get_size)(void) const); + + wxArrayRibbonControl m_collapse_stack; + wxBitmap m_icon; + wxSize m_old_size; + // NB: Scroll button windows are siblings rather than children (to get correct clipping of children) + wxRibbonPageScrollButton* m_scroll_left_btn; + wxRibbonPageScrollButton* m_scroll_right_btn; + wxSize* m_size_calc_array; + size_t m_size_calc_array_size; + int m_scroll_amount; + int m_scroll_amount_limit; + int m_size_in_major_axis_for_children; + bool m_scroll_buttons_visible; + +#ifndef SWIG + DECLARE_CLASS(wxRibbonPage) + DECLARE_EVENT_TABLE() +#endif +}; + +#endif // wxUSE_RIBBON + +#endif // _WX_RIBBON_PAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/panel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/panel.h new file mode 100644 index 0000000000..fded272c4a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/panel.h @@ -0,0 +1,199 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ribbon/panel.h +// Purpose: Ribbon-style container for a group of related tools / controls +// Author: Peter Cawley +// Modified by: +// Created: 2009-05-25 +// Copyright: (C) Peter Cawley +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// +#ifndef _WX_RIBBON_PANEL_H_ +#define _WX_RIBBON_PANEL_H_ + +#include "wx/defs.h" + +#if wxUSE_RIBBON + +#include "wx/bitmap.h" +#include "wx/ribbon/control.h" + +enum wxRibbonPanelOption +{ + wxRIBBON_PANEL_NO_AUTO_MINIMISE = 1 << 0, + wxRIBBON_PANEL_EXT_BUTTON = 1 << 3, + wxRIBBON_PANEL_MINIMISE_BUTTON = 1 << 4, + wxRIBBON_PANEL_STRETCH = 1 << 5, + wxRIBBON_PANEL_FLEXIBLE = 1 << 6, + + wxRIBBON_PANEL_DEFAULT_STYLE = 0 +}; + +class WXDLLIMPEXP_RIBBON wxRibbonPanel : public wxRibbonControl +{ +public: + wxRibbonPanel(); + + wxRibbonPanel(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxString& label = wxEmptyString, + const wxBitmap& minimised_icon = wxNullBitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxRIBBON_PANEL_DEFAULT_STYLE); + + virtual ~wxRibbonPanel(); + + bool Create(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxString& label = wxEmptyString, + const wxBitmap& icon = wxNullBitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxRIBBON_PANEL_DEFAULT_STYLE); + + wxBitmap& GetMinimisedIcon() {return m_minimised_icon;} + const wxBitmap& GetMinimisedIcon() const {return m_minimised_icon;} + bool IsMinimised() const; + bool IsMinimised(wxSize at_size) const; + bool IsHovered() const; + bool IsExtButtonHovered() const; + bool CanAutoMinimise() const; + + bool ShowExpanded(); + bool HideExpanded(); + + void SetArtProvider(wxRibbonArtProvider* art); + + virtual bool Realize(); + virtual bool Layout(); + virtual wxSize GetMinSize() const; + + virtual bool IsSizingContinuous() const; + + virtual void AddChild(wxWindowBase *child); + virtual void RemoveChild(wxWindowBase *child); + + virtual bool HasExtButton() const; + + wxRibbonPanel* GetExpandedDummy(); + wxRibbonPanel* GetExpandedPanel(); + + // Finds the best width and height given the parent's width and height + virtual wxSize GetBestSizeForParentSize(const wxSize& parentSize) const; + + long GetFlags() { return m_flags; } + + void HideIfExpanded(); + +protected: + virtual wxSize DoGetBestSize() const; + virtual wxSize GetPanelSizerBestSize() const; + wxSize GetPanelSizerMinSize() const; + wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + wxSize GetMinNotMinimisedSize() const; + + virtual wxSize DoGetNextSmallerSize(wxOrientation direction, + wxSize relative_to) const; + virtual wxSize DoGetNextLargerSize(wxOrientation direction, + wxSize relative_to) const; + + void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); + void OnSize(wxSizeEvent& evt); + void OnEraseBackground(wxEraseEvent& evt); + void OnPaint(wxPaintEvent& evt); + void OnMouseEnter(wxMouseEvent& evt); + void OnMouseEnterChild(wxMouseEvent& evt); + void OnMouseLeave(wxMouseEvent& evt); + void OnMouseLeaveChild(wxMouseEvent& evt); + void OnMouseClick(wxMouseEvent& evt); + void OnMotion(wxMouseEvent& evt); + void OnKillFocus(wxFocusEvent& evt); + void OnChildKillFocus(wxFocusEvent& evt); + + void TestPositionForHover(const wxPoint& pos); + bool ShouldSendEventToDummy(wxEvent& evt); + virtual bool TryAfter(wxEvent& evt); + + void CommonInit(const wxString& label, const wxBitmap& icon, long style); + static wxRect GetExpandedPosition(wxRect panel, + wxSize expanded_size, + wxDirection direction); + + wxBitmap m_minimised_icon; + wxBitmap m_minimised_icon_resized; + wxSize m_smallest_unminimised_size; + wxSize m_minimised_size; + wxDirection m_preferred_expand_direction; + wxRibbonPanel* m_expanded_dummy; + wxRibbonPanel* m_expanded_panel; + wxWindow* m_child_with_focus; + long m_flags; + bool m_minimised; + bool m_hovered; + bool m_ext_button_hovered; + wxRect m_ext_button_rect; + +#ifndef SWIG + DECLARE_CLASS(wxRibbonPanel) + DECLARE_EVENT_TABLE() +#endif +}; + + +class WXDLLIMPEXP_RIBBON wxRibbonPanelEvent : public wxCommandEvent +{ +public: + wxRibbonPanelEvent(wxEventType command_type = wxEVT_NULL, + int win_id = 0, + wxRibbonPanel* panel = NULL) + : wxCommandEvent(command_type, win_id) + , m_panel(panel) + { + } +#ifndef SWIG + wxRibbonPanelEvent(const wxRibbonPanelEvent& e) : wxCommandEvent(e) + { + m_panel = e.m_panel; + } +#endif + wxEvent *Clone() const { return new wxRibbonPanelEvent(*this); } + + wxRibbonPanel* GetPanel() {return m_panel;} + void SetPanel(wxRibbonPanel* panel) {m_panel = panel;} + +protected: + wxRibbonPanel* m_panel; + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxRibbonPanelEvent) +#endif +}; + +#ifndef SWIG + +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, wxRibbonPanelEvent); + +typedef void (wxEvtHandler::*wxRibbonPanelEventFunction)(wxRibbonPanelEvent&); + +#define wxRibbonPanelEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxRibbonPanelEventFunction, func) + +#define EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, winid, wxRibbonPanelEventHandler(fn)) +#else + +// wxpython/swig event work +%constant wxEventType wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED; + +%pythoncode { + EVT_RIBBONPANEL_EXTBUTTON_ACTIVATED = wx.PyEventBinder( wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED, 1 ) +} +#endif + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED wxEVT_RIBBONPANEL_EXTBUTTON_ACTIVATED + +#endif // wxUSE_RIBBON + +#endif // _WX_RIBBON_PANEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/toolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/toolbar.h new file mode 100644 index 0000000000..467de94463 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ribbon/toolbar.h @@ -0,0 +1,263 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/ribbon/toolbar.h +// Purpose: Ribbon-style tool bar +// Author: Peter Cawley +// Modified by: +// Created: 2009-07-06 +// Copyright: (C) Peter Cawley +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// +#ifndef _WX_RIBBON_TOOLBAR_H_ +#define _WX_RIBBON_TOOLBAR_H_ + +#include "wx/defs.h" + +#if wxUSE_RIBBON + +#include "wx/ribbon/control.h" +#include "wx/ribbon/art.h" + +class wxRibbonToolBarToolBase; +class wxRibbonToolBarToolGroup; +WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonToolBarToolGroup*, wxArrayRibbonToolBarToolGroup, class WXDLLIMPEXP_RIBBON); + +enum wxRibbonToolBarToolState +{ + wxRIBBON_TOOLBAR_TOOL_FIRST = 1 << 0, + wxRIBBON_TOOLBAR_TOOL_LAST = 1 << 1, + wxRIBBON_TOOLBAR_TOOL_POSITION_MASK = wxRIBBON_TOOLBAR_TOOL_FIRST | wxRIBBON_TOOLBAR_TOOL_LAST, + + wxRIBBON_TOOLBAR_TOOL_NORMAL_HOVERED = 1 << 3, + wxRIBBON_TOOLBAR_TOOL_DROPDOWN_HOVERED = 1 << 4, + wxRIBBON_TOOLBAR_TOOL_HOVER_MASK = wxRIBBON_TOOLBAR_TOOL_NORMAL_HOVERED | wxRIBBON_TOOLBAR_TOOL_DROPDOWN_HOVERED, + wxRIBBON_TOOLBAR_TOOL_NORMAL_ACTIVE = 1 << 5, + wxRIBBON_TOOLBAR_TOOL_DROPDOWN_ACTIVE = 1 << 6, + wxRIBBON_TOOLBAR_TOOL_ACTIVE_MASK = wxRIBBON_TOOLBAR_TOOL_NORMAL_ACTIVE | wxRIBBON_TOOLBAR_TOOL_DROPDOWN_ACTIVE, + wxRIBBON_TOOLBAR_TOOL_DISABLED = 1 << 7, + wxRIBBON_TOOLBAR_TOOL_TOGGLED = 1 << 8, + wxRIBBON_TOOLBAR_TOOL_STATE_MASK = 0x1F8 +}; + + +class WXDLLIMPEXP_RIBBON wxRibbonToolBar : public wxRibbonControl +{ +public: + wxRibbonToolBar(); + + wxRibbonToolBar(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + + virtual ~wxRibbonToolBar(); + + bool Create(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0); + + virtual wxRibbonToolBarToolBase* AddTool( + int tool_id, + const wxBitmap& bitmap, + const wxString& help_string, + wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL); + + virtual wxRibbonToolBarToolBase* AddDropdownTool( + int tool_id, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonToolBarToolBase* AddHybridTool( + int tool_id, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonToolBarToolBase* AddToggleTool( + int tool_id, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonToolBarToolBase* AddTool( + int tool_id, + const wxBitmap& bitmap, + const wxBitmap& bitmap_disabled = wxNullBitmap, + const wxString& help_string = wxEmptyString, + wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL, + wxObject* client_data = NULL); + + virtual wxRibbonToolBarToolBase* AddSeparator(); + + virtual wxRibbonToolBarToolBase* InsertTool( + size_t pos, + int tool_id, + const wxBitmap& bitmap, + const wxString& help_string, + wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL); + + virtual wxRibbonToolBarToolBase* InsertDropdownTool( + size_t pos, + int tool_id, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonToolBarToolBase* InsertHybridTool( + size_t pos, + int tool_id, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonToolBarToolBase* InsertToggleTool( + size_t pos, + int tool_id, + const wxBitmap& bitmap, + const wxString& help_string = wxEmptyString); + + virtual wxRibbonToolBarToolBase* InsertTool( + size_t pos, + int tool_id, + const wxBitmap& bitmap, + const wxBitmap& bitmap_disabled = wxNullBitmap, + const wxString& help_string = wxEmptyString, + wxRibbonButtonKind kind = wxRIBBON_BUTTON_NORMAL, + wxObject* client_data = NULL); + + virtual wxRibbonToolBarToolBase* InsertSeparator(size_t pos); + + virtual void ClearTools(); + virtual bool DeleteTool(int tool_id); + virtual bool DeleteToolByPos(size_t pos); + + virtual wxRibbonToolBarToolBase* FindById(int tool_id)const; + virtual wxRibbonToolBarToolBase* GetToolByPos(size_t pos)const; + virtual size_t GetToolCount() const; + virtual int GetToolId(const wxRibbonToolBarToolBase* tool)const; + + virtual wxObject* GetToolClientData(int tool_id)const; + virtual bool GetToolEnabled(int tool_id)const; + virtual wxString GetToolHelpString(int tool_id)const; + virtual wxRibbonButtonKind GetToolKind(int tool_id)const; + virtual int GetToolPos(int tool_id)const; + virtual bool GetToolState(int tool_id)const; + + virtual bool Realize(); + virtual void SetRows(int nMin, int nMax = -1); + + virtual void SetToolClientData(int tool_id, wxObject* clientData); + virtual void SetToolDisabledBitmap(int tool_id, const wxBitmap &bitmap); + virtual void SetToolHelpString(int tool_id, const wxString& helpString); + virtual void SetToolNormalBitmap(int tool_id, const wxBitmap &bitmap); + + virtual bool IsSizingContinuous() const; + + virtual void EnableTool(int tool_id, bool enable = true); + virtual void ToggleTool(int tool_id, bool checked); + + // Finds the best width and height given the parent's width and height + virtual wxSize GetBestSizeForParentSize(const wxSize& parentSize) const; + +protected: + friend class wxRibbonToolBarEvent; + virtual wxSize DoGetBestSize() const; + wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + void OnEraseBackground(wxEraseEvent& evt); + void OnMouseDown(wxMouseEvent& evt); + void OnMouseEnter(wxMouseEvent& evt); + void OnMouseLeave(wxMouseEvent& evt); + void OnMouseMove(wxMouseEvent& evt); + void OnMouseUp(wxMouseEvent& evt); + void OnPaint(wxPaintEvent& evt); + void OnSize(wxSizeEvent& evt); + + virtual wxSize DoGetNextSmallerSize(wxOrientation direction, + wxSize relative_to) const; + virtual wxSize DoGetNextLargerSize(wxOrientation direction, + wxSize relative_to) const; + + void CommonInit(long style); + void AppendGroup(); + wxRibbonToolBarToolGroup* InsertGroup(size_t pos); + virtual void UpdateWindowUI(long flags); + + static wxBitmap MakeDisabledBitmap(const wxBitmap& original); + + wxArrayRibbonToolBarToolGroup m_groups; + wxRibbonToolBarToolBase* m_hover_tool; + wxRibbonToolBarToolBase* m_active_tool; + wxSize* m_sizes; + int m_nrows_min; + int m_nrows_max; + +#ifndef SWIG + DECLARE_CLASS(wxRibbonToolBar) + DECLARE_EVENT_TABLE() +#endif +}; + + +class WXDLLIMPEXP_RIBBON wxRibbonToolBarEvent : public wxCommandEvent +{ +public: + wxRibbonToolBarEvent(wxEventType command_type = wxEVT_NULL, + int win_id = 0, + wxRibbonToolBar* bar = NULL) + : wxCommandEvent(command_type, win_id) + , m_bar(bar) + { + } +#ifndef SWIG + wxRibbonToolBarEvent(const wxRibbonToolBarEvent& e) : wxCommandEvent(e) + { + m_bar = e.m_bar; + } +#endif + wxEvent *Clone() const { return new wxRibbonToolBarEvent(*this); } + + wxRibbonToolBar* GetBar() {return m_bar;} + void SetBar(wxRibbonToolBar* bar) {m_bar = bar;} + bool PopupMenu(wxMenu* menu); + +protected: + wxRibbonToolBar* m_bar; + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxRibbonToolBarEvent) +#endif +}; + +#ifndef SWIG + +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONTOOLBAR_CLICKED, wxRibbonToolBarEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, wxRibbonToolBarEvent); + +typedef void (wxEvtHandler::*wxRibbonToolBarEventFunction)(wxRibbonToolBarEvent&); + +#define wxRibbonToolBarEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxRibbonToolBarEventFunction, func) + +#define EVT_RIBBONTOOLBAR_CLICKED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONTOOLBAR_CLICKED, winid, wxRibbonToolBarEventHandler(fn)) +#define EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, winid, wxRibbonToolBarEventHandler(fn)) +#else + +// wxpython/swig event work +%constant wxEventType wxEVT_RIBBONTOOLBAR_CLICKED; +%constant wxEventType wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED; + +%pythoncode { + EVT_RIBBONTOOLBAR_CLICKED = wx.PyEventBinder( wxEVT_RIBBONTOOLBAR_CLICKED, 1 ) + EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED = wx.PyEventBinder( wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, 1 ) +} +#endif + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RIBBONTOOL_CLICKED wxEVT_RIBBONTOOLBAR_CLICKED +#define wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED wxEVT_RIBBONTOOLBAR_DROPDOWN_CLICKED + +#endif // wxUSE_RIBBON + +#endif // _WX_RIBBON_TOOLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richmsgdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richmsgdlg.h new file mode 100644 index 0000000000..1fbc96428f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richmsgdlg.h @@ -0,0 +1,88 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richmsgdlg.h +// Purpose: wxRichMessageDialogBase +// Author: Rickard Westerlund +// Created: 2010-07-03 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RICHMSGDLG_H_BASE_ +#define _WX_RICHMSGDLG_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_RICHMSGDLG + +#include "wx/msgdlg.h" + +// Extends a message dialog with an optional checkbox and user-expandable +// detailed text. +class WXDLLIMPEXP_CORE wxRichMessageDialogBase : public wxGenericMessageDialog +{ +public: + wxRichMessageDialogBase( wxWindow *parent, + const wxString& message, + const wxString& caption, + long style ) + : wxGenericMessageDialog( parent, message, caption, style ), + m_detailsExpanderCollapsedLabel( wxGetTranslation("&See details") ), + m_detailsExpanderExpandedLabel( wxGetTranslation("&Hide details") ), + m_checkBoxValue( false ) + { } + + void ShowCheckBox(const wxString& checkBoxText, bool checked = false) + { + m_checkBoxText = checkBoxText; + m_checkBoxValue = checked; + } + + wxString GetCheckBoxText() const { return m_checkBoxText; } + + void ShowDetailedText(const wxString& detailedText) + { m_detailedText = detailedText; } + + wxString GetDetailedText() const { return m_detailedText; } + + virtual bool IsCheckBoxChecked() const { return m_checkBoxValue; } + +protected: + const wxString m_detailsExpanderCollapsedLabel; + const wxString m_detailsExpanderExpandedLabel; + + wxString m_checkBoxText; + bool m_checkBoxValue; + wxString m_detailedText; + +private: + void ShowDetails(bool shown); + + wxDECLARE_NO_COPY_CLASS(wxRichMessageDialogBase); +}; + +// Always include the generic version as it's currently used as the base class +// by the MSW native implementation too. +#include "wx/generic/richmsgdlgg.h" + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + #include "wx/msw/richmsgdlg.h" +#else + class WXDLLIMPEXP_CORE wxRichMessageDialog + : public wxGenericRichMessageDialog + { + public: + wxRichMessageDialog( wxWindow *parent, + const wxString& message, + const wxString& caption, + long style ) + : wxGenericRichMessageDialog( parent, message, caption, style ) + { } + + private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxRichMessageDialog); + }; +#endif + +#endif // wxUSE_RICHMSGDLG + +#endif // _WX_RICHMSGDLG_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextbackgroundpage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextbackgroundpage.h new file mode 100644 index 0000000000..e73b427882 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextbackgroundpage.h @@ -0,0 +1,110 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextbackgroundpage.h +// Purpose: +// Author: Julian Smart +// Modified by: +// Created: 13/11/2010 11:17:25 +// RCS-ID: +// Copyright: (c) Julian Smart +// Licence: +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTBACKGROUNDPAGE_H_ +#define _RICHTEXTBACKGROUNDPAGE_H_ + +/*! + * Includes + */ + +#include "wx/richtext/richtextdialogpage.h" + +////@begin includes +#include "wx/statline.h" +////@end includes + +/*! + * Forward declarations + */ + +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextColourSwatchCtrl; + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_STYLE wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_TITLE wxEmptyString +#define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_IDNAME ID_RICHTEXTBACKGROUNDPAGE +#define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTBACKGROUNDPAGE_POSITION wxDefaultPosition +////@end control identifiers + + +/*! + * wxRichTextBackgroundPage class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextBackgroundPage: public wxRichTextDialogPage +{ + DECLARE_DYNAMIC_CLASS( wxRichTextBackgroundPage ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxRichTextBackgroundPage(); + wxRichTextBackgroundPage( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBACKGROUNDPAGE_STYLE ); + + /// Destructor + ~wxRichTextBackgroundPage(); + + /// Initialises member variables + void Init(); + + /// Creates the controls and sizers + void CreateControls(); + + /// Gets the attributes from the formatting dialog + wxRichTextAttr* GetAttributes(); + + /// Data transfer + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); + + /// Respond to colour swatch click + void OnColourSwatch(wxCommandEvent& event); + +////@begin wxRichTextBackgroundPage event handler declarations + +////@end wxRichTextBackgroundPage event handler declarations + +////@begin wxRichTextBackgroundPage member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextBackgroundPage member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin wxRichTextBackgroundPage member variables + wxCheckBox* m_backgroundColourCheckBox; + wxRichTextColourSwatchCtrl* m_backgroundColourSwatch; + /// Control identifiers + enum { + ID_RICHTEXTBACKGROUNDPAGE = 10845, + ID_RICHTEXT_BACKGROUND_COLOUR_CHECKBOX = 10846, + ID_RICHTEXT_BACKGROUND_COLOUR_SWATCH = 10847 + }; +////@end wxRichTextBackgroundPage member variables +}; + +#endif + // _RICHTEXTBACKGROUNDPAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextborderspage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextborderspage.h new file mode 100644 index 0000000000..347f154fd2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextborderspage.h @@ -0,0 +1,293 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextborderspage.h +// Purpose: A border editing page for the wxRTC formatting dialog. +// Author: Julian Smart +// Modified by: +// Created: 21/10/2010 11:34:24 +// RCS-ID: +// Copyright: (c) Julian Smart +// Licence: +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTBORDERSPAGE_H_ +#define _RICHTEXTBORDERSPAGE_H_ + +/*! + * Includes + */ + +#include "wx/richtext/richtextdialogpage.h" + +////@begin includes +#include "wx/notebook.h" +#include "wx/statline.h" +////@end includes + +/*! + * Forward declarations + */ + +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextColourSwatchCtrl; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextBorderPreviewCtrl; + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define SYMBOL_WXRICHTEXTBORDERSPAGE_STYLE wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTBORDERSPAGE_TITLE wxEmptyString +#define SYMBOL_WXRICHTEXTBORDERSPAGE_IDNAME ID_RICHTEXTBORDERSPAGE +#define SYMBOL_WXRICHTEXTBORDERSPAGE_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTBORDERSPAGE_POSITION wxDefaultPosition +////@end control identifiers + + +/*! + * wxRichTextBordersPage class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextBordersPage: public wxRichTextDialogPage +{ + DECLARE_DYNAMIC_CLASS( wxRichTextBordersPage ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxRichTextBordersPage(); + wxRichTextBordersPage( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTBORDERSPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTBORDERSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBORDERSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBORDERSPAGE_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTBORDERSPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTBORDERSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBORDERSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBORDERSPAGE_STYLE ); + + /// Destructor + ~wxRichTextBordersPage(); + + /// Initialises member variables + void Init(); + + /// Creates the controls and sizers + void CreateControls(); + + /// Gets the attributes from the formatting dialog + wxRichTextAttr* GetAttributes(); + + /// Data transfer + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); + + /// Updates the synchronization checkboxes to reflect the state of the attributes + void UpdateSyncControls(); + + /// Updates the preview + void OnCommand(wxCommandEvent& event); + + /// Fill style combo + virtual void FillStyleComboBox(wxComboBox* styleComboBox); + + /// Set the border controls + static void SetBorderValue(wxTextAttrBorder& border, wxTextCtrl* widthValueCtrl, wxComboBox* widthUnitsCtrl, wxCheckBox* checkBox, + wxComboBox* styleCtrl, wxRichTextColourSwatchCtrl* colourCtrl, const wxArrayInt& borderStyles); + + /// Get data from the border controls + static void GetBorderValue(wxTextAttrBorder& border, wxTextCtrl* widthValueCtrl, wxComboBox* widthUnitsCtrl, wxCheckBox* checkBox, + wxComboBox* styleCtrl, wxRichTextColourSwatchCtrl* colourCtrl, const wxArrayInt& borderStyles); + +////@begin wxRichTextBordersPage event handler declarations + + /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXT_BORDER_LEFT_CHECKBOX + void OnRichtextBorderCheckboxClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXT_BORDER_LEFT + void OnRichtextBorderLeftValueTextUpdated( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BORDER_LEFT + void OnRichtextBorderLeftUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXT_BORDER_LEFT_UNITS + void OnRichtextBorderLeftUnitsSelected( wxCommandEvent& event ); + + /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXT_BORDER_LEFT_STYLE + void OnRichtextBorderLeftStyleSelected( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BORDER_RIGHT_CHECKBOX + void OnRichtextBorderOtherCheckboxUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BORDER_RIGHT + void OnRichtextBorderRightUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BORDER_TOP + void OnRichtextBorderTopUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BORDER_BOTTOM + void OnRichtextBorderBottomUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXT_BORDER_SYNCHRONIZE + void OnRichtextBorderSynchronizeClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BORDER_SYNCHRONIZE + void OnRichtextBorderSynchronizeUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXT_OUTLINE_LEFT + void OnRichtextOutlineLeftTextUpdated( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_OUTLINE_LEFT + void OnRichtextOutlineLeftUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXT_OUTLINE_LEFT_UNITS + void OnRichtextOutlineLeftUnitsSelected( wxCommandEvent& event ); + + /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXT_OUTLINE_LEFT_STYLE + void OnRichtextOutlineLeftStyleSelected( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_OUTLINE_RIGHT_CHECKBOX + void OnRichtextOutlineOtherCheckboxUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_OUTLINE_RIGHT + void OnRichtextOutlineRightUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_OUTLINE_TOP + void OnRichtextOutlineTopUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_OUTLINE_BOTTOM + void OnRichtextOutlineBottomUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXT_OUTLINE_SYNCHRONIZE + void OnRichtextOutlineSynchronizeClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_OUTLINE_SYNCHRONIZE + void OnRichtextOutlineSynchronizeUpdate( wxUpdateUIEvent& event ); + +////@end wxRichTextBordersPage event handler declarations + +////@begin wxRichTextBordersPage member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextBordersPage member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin wxRichTextBordersPage member variables + wxCheckBox* m_leftBorderCheckbox; + wxTextCtrl* m_leftBorderWidth; + wxComboBox* m_leftBorderWidthUnits; + wxComboBox* m_leftBorderStyle; + wxRichTextColourSwatchCtrl* m_leftBorderColour; + wxCheckBox* m_rightBorderCheckbox; + wxTextCtrl* m_rightBorderWidth; + wxComboBox* m_rightBorderWidthUnits; + wxComboBox* m_rightBorderStyle; + wxRichTextColourSwatchCtrl* m_rightBorderColour; + wxCheckBox* m_topBorderCheckbox; + wxTextCtrl* m_topBorderWidth; + wxComboBox* m_topBorderWidthUnits; + wxComboBox* m_topBorderStyle; + wxRichTextColourSwatchCtrl* m_topBorderColour; + wxCheckBox* m_bottomBorderCheckbox; + wxTextCtrl* m_bottomBorderWidth; + wxComboBox* m_bottomBorderWidthUnits; + wxComboBox* m_bottomBorderStyle; + wxRichTextColourSwatchCtrl* m_bottomBorderColour; + wxCheckBox* m_borderSyncCtrl; + wxCheckBox* m_leftOutlineCheckbox; + wxTextCtrl* m_leftOutlineWidth; + wxComboBox* m_leftOutlineWidthUnits; + wxComboBox* m_leftOutlineStyle; + wxRichTextColourSwatchCtrl* m_leftOutlineColour; + wxCheckBox* m_rightOutlineCheckbox; + wxTextCtrl* m_rightOutlineWidth; + wxComboBox* m_rightOutlineWidthUnits; + wxComboBox* m_rightOutlineStyle; + wxRichTextColourSwatchCtrl* m_rightOutlineColour; + wxCheckBox* m_topOutlineCheckbox; + wxTextCtrl* m_topOutlineWidth; + wxComboBox* m_topOutlineWidthUnits; + wxComboBox* m_topOutlineStyle; + wxRichTextColourSwatchCtrl* m_topOutlineColour; + wxCheckBox* m_bottomOutlineCheckbox; + wxTextCtrl* m_bottomOutlineWidth; + wxComboBox* m_bottomOutlineWidthUnits; + wxComboBox* m_bottomOutlineStyle; + wxRichTextColourSwatchCtrl* m_bottomOutlineColour; + wxCheckBox* m_outlineSyncCtrl; + wxRichTextBorderPreviewCtrl* m_borderPreviewCtrl; + /// Control identifiers + enum { + ID_RICHTEXTBORDERSPAGE = 10800, + ID_RICHTEXTBORDERSPAGE_NOTEBOOK = 10801, + ID_RICHTEXTBORDERSPAGE_BORDERS = 10802, + ID_RICHTEXT_BORDER_LEFT_CHECKBOX = 10803, + ID_RICHTEXT_BORDER_LEFT = 10804, + ID_RICHTEXT_BORDER_LEFT_UNITS = 10805, + ID_RICHTEXT_BORDER_LEFT_STYLE = 10806, + ID_RICHTEXT_BORDER_LEFT_COLOUR = 10807, + ID_RICHTEXT_BORDER_RIGHT_CHECKBOX = 10808, + ID_RICHTEXT_BORDER_RIGHT = 10809, + ID_RICHTEXT_BORDER_RIGHT_UNITS = 10810, + ID_RICHTEXT_BORDER_RIGHT_STYLE = 10811, + ID_RICHTEXT_BORDER_RIGHT_COLOUR = 10812, + ID_RICHTEXT_BORDER_TOP_CHECKBOX = 10813, + ID_RICHTEXT_BORDER_TOP = 10814, + ID_RICHTEXT_BORDER_TOP_UNITS = 10815, + ID_RICHTEXT_BORDER_TOP_STYLE = 10816, + ID_RICHTEXT_BORDER_TOP_COLOUR = 10817, + ID_RICHTEXT_BORDER_BOTTOM_CHECKBOX = 10818, + ID_RICHTEXT_BORDER_BOTTOM = 10819, + ID_RICHTEXT_BORDER_BOTTOM_UNITS = 10820, + ID_RICHTEXT_BORDER_BOTTOM_STYLE = 10821, + ID_RICHTEXT_BORDER_BOTTOM_COLOUR = 10822, + ID_RICHTEXT_BORDER_SYNCHRONIZE = 10845, + ID_RICHTEXTBORDERSPAGE_OUTLINE = 10823, + ID_RICHTEXT_OUTLINE_LEFT_CHECKBOX = 10824, + ID_RICHTEXT_OUTLINE_LEFT = 10825, + ID_RICHTEXT_OUTLINE_LEFT_UNITS = 10826, + ID_RICHTEXT_OUTLINE_LEFT_STYLE = 10827, + ID_RICHTEXT_OUTLINE_LEFT_COLOUR = 10828, + ID_RICHTEXT_OUTLINE_RIGHT_CHECKBOX = 10829, + ID_RICHTEXT_OUTLINE_RIGHT = 10830, + ID_RICHTEXT_OUTLINE_RIGHT_UNITS = 10831, + ID_RICHTEXT_OUTLINE_RIGHT_STYLE = 10832, + ID_RICHTEXT_OUTLINE_RIGHT_COLOUR = 10833, + ID_RICHTEXT_OUTLINE_TOP_CHECKBOX = 10834, + ID_RICHTEXT_OUTLINE_TOP = 10835, + ID_RICHTEXT_OUTLINE_TOP_UNITS = 10836, + ID_RICHTEXT_OUTLINE_TOP_STYLE = 10837, + ID_RICHTEXT_OUTLINE_TOP_COLOUR = 10838, + ID_RICHTEXT_OUTLINE_BOTTOM_CHECKBOX = 10839, + ID_RICHTEXT_OUTLINE_BOTTOM = 10840, + ID_RICHTEXT_OUTLINE_BOTTOM_UNITS = 10841, + ID_RICHTEXT_OUTLINE_BOTTOM_STYLE = 10842, + ID_RICHTEXT_OUTLINE_BOTTOM_COLOUR = 10843, + ID_RICHTEXT_OUTLINE_SYNCHRONIZE = 10846, + ID_RICHTEXT_BORDER_PREVIEW = 10844 + }; +////@end wxRichTextBordersPage member variables + + wxArrayInt m_borderStyles; + wxArrayString m_borderStyleNames; + bool m_ignoreUpdates; +}; + +class WXDLLIMPEXP_RICHTEXT wxRichTextBorderPreviewCtrl : public wxWindow +{ +public: + wxRichTextBorderPreviewCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = 0); + + void SetAttributes(wxRichTextAttr* attr) { m_attributes = attr; } + wxRichTextAttr* GetAttributes() const { return m_attributes; } + +private: + wxRichTextAttr* m_attributes; + + void OnPaint(wxPaintEvent& event); + DECLARE_EVENT_TABLE() +}; + +#endif + // _RICHTEXTBORDERSPAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextbuffer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextbuffer.h new file mode 100644 index 0000000000..6b94fdaf49 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextbuffer.h @@ -0,0 +1,6715 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextbuffer.h +// Purpose: Buffer for wxRichTextCtrl +// Author: Julian Smart +// Modified by: +// Created: 2005-09-30 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RICHTEXTBUFFER_H_ +#define _WX_RICHTEXTBUFFER_H_ + +/* + + Data structures + =============== + + Data is represented by a hierarchy of objects, all derived from + wxRichTextObject. + + The top of the hierarchy is the buffer, a kind of wxRichTextParagraphLayoutBox. + These boxes will allow flexible placement of text boxes on a page, but + for now there is a single box representing the document, and this box is + a wxRichTextParagraphLayoutBox which contains further wxRichTextParagraph + objects, each of which can include text and images. + + Each object maintains a range (start and end position) measured + from the start of the main parent box. + A paragraph object knows its range, and a text fragment knows its range + too. So, a character or image in a page has a position relative to the + start of the document, and a character in an embedded text box has + a position relative to that text box. For now, we will not be dealing with + embedded objects but it's something to bear in mind for later. + + Note that internally, a range (5,5) represents a range of one character. + In the public wx[Rich]TextCtrl API, this would be passed to e.g. SetSelection + as (5,6). A paragraph with one character might have an internal range of (0, 1) + since the end of the paragraph takes up one position. + + Layout + ====== + + When Layout is called on an object, it is given a size which the object + must limit itself to, or one or more flexible directions (vertical + or horizontal). So for example a centered paragraph is given the page + width to play with (minus any margins), but can extend indefinitely + in the vertical direction. The implementation of Layout can then + cache the calculated size and position within the parent. + + */ + +/*! + * Includes + */ + +#include "wx/defs.h" + +#if wxUSE_RICHTEXT + +#include "wx/list.h" +#include "wx/textctrl.h" +#include "wx/bitmap.h" +#include "wx/image.h" +#include "wx/cmdproc.h" +#include "wx/txtstrm.h" +#include "wx/variant.h" +#include "wx/position.h" + +#if wxUSE_DATAOBJ +#include "wx/dataobj.h" +#endif + +// Compatibility +//#define wxRichTextAttr wxTextAttr +#define wxTextAttrEx wxTextAttr + +// Setting wxRICHTEXT_USE_OWN_CARET to 1 implements a +// caret reliably without using wxClientDC in case there +// are platform-specific problems with the generic caret. +#if defined(__WXGTK__) || defined(__WXMAC__) +#define wxRICHTEXT_USE_OWN_CARET 1 +#else +#define wxRICHTEXT_USE_OWN_CARET 0 +#endif + +// Switch off for binary compatibility, on for faster drawing +// Note: this seems to be buggy (overzealous use of extents) so +// don't use for now +#define wxRICHTEXT_USE_OPTIMIZED_LINE_DRAWING 0 + +// The following two symbols determine whether an output implementation +// is present. To switch the relevant one on, set wxRICHTEXT_USE_XMLDOCUMENT_OUTPUT in +// richtextxml.cpp. By default, the faster direct output implementation is used. + +// Include the wxXmlDocument implementation for output +#define wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT 1 + +// Include the faster, direct implementation for output +#define wxRICHTEXT_HAVE_DIRECT_OUTPUT 1 + +/** + The line break character that can be embedded in content. + */ + +extern WXDLLIMPEXP_RICHTEXT const wxChar wxRichTextLineBreakChar; + +/** + File types in wxRichText context. + */ +enum wxRichTextFileType +{ + wxRICHTEXT_TYPE_ANY = 0, + wxRICHTEXT_TYPE_TEXT, + wxRICHTEXT_TYPE_XML, + wxRICHTEXT_TYPE_HTML, + wxRICHTEXT_TYPE_RTF, + wxRICHTEXT_TYPE_PDF +}; + +/* + * Forward declarations + */ + +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextCtrl; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextObject; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextImage; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextPlainText; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextCacheObject; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextObjectList; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextLine; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextParagraph; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextFileHandler; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextDrawingHandler; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextField; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextFieldType; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextStyleSheet; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextListStyleDefinition; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextEvent; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextRenderer; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextBuffer; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextXMLHandler; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextParagraphLayoutBox; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextImageBlock; +class WXDLLIMPEXP_FWD_XML wxXmlNode; +class wxRichTextFloatCollector; +class WXDLLIMPEXP_FWD_BASE wxDataInputStream; +class WXDLLIMPEXP_FWD_BASE wxDataOutputStream; + +/** + Flags determining the available space, passed to Layout. + */ + +#define wxRICHTEXT_FIXED_WIDTH 0x01 +#define wxRICHTEXT_FIXED_HEIGHT 0x02 +#define wxRICHTEXT_VARIABLE_WIDTH 0x04 +#define wxRICHTEXT_VARIABLE_HEIGHT 0x08 + +// Only lay out the part of the buffer that lies within +// the rect passed to Layout. +#define wxRICHTEXT_LAYOUT_SPECIFIED_RECT 0x10 + +/** + Flags to pass to Draw + */ + +// Ignore paragraph cache optimization, e.g. for printing purposes +// where one line may be drawn higher (on the next page) compared +// with the previous line +#define wxRICHTEXT_DRAW_IGNORE_CACHE 0x01 +#define wxRICHTEXT_DRAW_SELECTED 0x02 +#define wxRICHTEXT_DRAW_PRINT 0x04 +#define wxRICHTEXT_DRAW_GUIDELINES 0x08 + +/** + Flags returned from hit-testing, or passed to hit-test function. + */ +enum wxRichTextHitTestFlags +{ + // The point was not on this object + wxRICHTEXT_HITTEST_NONE = 0x01, + + // The point was before the position returned from HitTest + wxRICHTEXT_HITTEST_BEFORE = 0x02, + + // The point was after the position returned from HitTest + wxRICHTEXT_HITTEST_AFTER = 0x04, + + // The point was on the position returned from HitTest + wxRICHTEXT_HITTEST_ON = 0x08, + + // The point was on space outside content + wxRICHTEXT_HITTEST_OUTSIDE = 0x10, + + // Only do hit-testing at the current level (don't traverse into top-level objects) + wxRICHTEXT_HITTEST_NO_NESTED_OBJECTS = 0x20, + + // Ignore floating objects + wxRICHTEXT_HITTEST_NO_FLOATING_OBJECTS = 0x40, + + // Don't recurse into objects marked as atomic + wxRICHTEXT_HITTEST_HONOUR_ATOMIC = 0x80 +}; + +/** + Flags for GetRangeSize. + */ + +#define wxRICHTEXT_FORMATTED 0x01 +#define wxRICHTEXT_UNFORMATTED 0x02 +#define wxRICHTEXT_CACHE_SIZE 0x04 +#define wxRICHTEXT_HEIGHT_ONLY 0x08 + +/** + Flags for SetStyle/SetListStyle. + */ + +#define wxRICHTEXT_SETSTYLE_NONE 0x00 + +// Specifies that this operation should be undoable +#define wxRICHTEXT_SETSTYLE_WITH_UNDO 0x01 + +// Specifies that the style should not be applied if the +// combined style at this point is already the style in question. +#define wxRICHTEXT_SETSTYLE_OPTIMIZE 0x02 + +// Specifies that the style should only be applied to paragraphs, +// and not the content. This allows content styling to be +// preserved independently from that of e.g. a named paragraph style. +#define wxRICHTEXT_SETSTYLE_PARAGRAPHS_ONLY 0x04 + +// Specifies that the style should only be applied to characters, +// and not the paragraph. This allows content styling to be +// preserved independently from that of e.g. a named paragraph style. +#define wxRICHTEXT_SETSTYLE_CHARACTERS_ONLY 0x08 + +// For SetListStyle only: specifies starting from the given number, otherwise +// deduces number from existing attributes +#define wxRICHTEXT_SETSTYLE_RENUMBER 0x10 + +// For SetListStyle only: specifies the list level for all paragraphs, otherwise +// the current indentation will be used +#define wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL 0x20 + +// Resets the existing style before applying the new style +#define wxRICHTEXT_SETSTYLE_RESET 0x40 + +// Removes the given style instead of applying it +#define wxRICHTEXT_SETSTYLE_REMOVE 0x80 + +/** + Flags for SetProperties. + */ + +#define wxRICHTEXT_SETPROPERTIES_NONE 0x00 + +// Specifies that this operation should be undoable +#define wxRICHTEXT_SETPROPERTIES_WITH_UNDO 0x01 + +// Specifies that the properties should only be applied to paragraphs, +// and not the content. +#define wxRICHTEXT_SETPROPERTIES_PARAGRAPHS_ONLY 0x02 + +// Specifies that the properties should only be applied to characters, +// and not the paragraph. +#define wxRICHTEXT_SETPROPERTIES_CHARACTERS_ONLY 0x04 + +// Resets the existing properties before applying the new properties. +#define wxRICHTEXT_SETPROPERTIES_RESET 0x08 + +// Removes the given properties instead of applying them. +#define wxRICHTEXT_SETPROPERTIES_REMOVE 0x10 + +/** + Flags for object insertion. + */ + +#define wxRICHTEXT_INSERT_NONE 0x00 +#define wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE 0x01 +#define wxRICHTEXT_INSERT_INTERACTIVE 0x02 + +// A special flag telling the buffer to keep the first paragraph style +// as-is, when deleting a paragraph marker. In future we might pass a +// flag to InsertFragment and DeleteRange to indicate the appropriate mode. +#define wxTEXT_ATTR_KEEP_FIRST_PARA_STYLE 0x20000000 + +/** + Default superscript/subscript font multiplication factor. + */ + +#define wxSCRIPT_MUL_FACTOR 1.5 + +/** + The type for wxTextAttrDimension flags. + */ +typedef unsigned short wxTextAttrDimensionFlags; + +/** + Miscellaneous text box flags + */ +enum wxTextBoxAttrFlags +{ + wxTEXT_BOX_ATTR_FLOAT = 0x00000001, + wxTEXT_BOX_ATTR_CLEAR = 0x00000002, + wxTEXT_BOX_ATTR_COLLAPSE_BORDERS = 0x00000004, + wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT = 0x00000008, + wxTEXT_BOX_ATTR_BOX_STYLE_NAME = 0x00000010 +}; + +/** + Whether a value is present, used in dimension flags. + */ +enum wxTextAttrValueFlags +{ + wxTEXT_ATTR_VALUE_VALID = 0x1000, + wxTEXT_ATTR_VALUE_VALID_MASK = 0x1000 +}; + +/** + Units, included in the dimension value. + */ +enum wxTextAttrUnits +{ + wxTEXT_ATTR_UNITS_TENTHS_MM = 0x0001, + wxTEXT_ATTR_UNITS_PIXELS = 0x0002, + wxTEXT_ATTR_UNITS_PERCENTAGE = 0x0004, + wxTEXT_ATTR_UNITS_POINTS = 0x0008, + wxTEXT_ATTR_UNITS_HUNDREDTHS_POINT = 0x0100, + + wxTEXT_ATTR_UNITS_MASK = 0x010F +}; + +/** + Position alternatives, included in the dimension flags. + */ +enum wxTextBoxAttrPosition +{ + wxTEXT_BOX_ATTR_POSITION_STATIC = 0x0000, // Default is static, i.e. as per normal layout + wxTEXT_BOX_ATTR_POSITION_RELATIVE = 0x0010, // Relative to the relevant edge + wxTEXT_BOX_ATTR_POSITION_ABSOLUTE = 0x0020, // Relative to the parent + wxTEXT_BOX_ATTR_POSITION_FIXED = 0x0040, // Relative to the top-level window + + wxTEXT_BOX_ATTR_POSITION_MASK = 0x00F0 +}; + +/** + @class wxTextAttrDimension + + A class representing a rich text dimension, including units and position. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextAttr, wxRichTextCtrl, wxTextAttrDimensions +*/ + +class WXDLLIMPEXP_RICHTEXT wxTextAttrDimension +{ +public: + /** + Default constructor. + */ + wxTextAttrDimension() { Reset(); } + /** + Constructor taking value and units flag. + */ + wxTextAttrDimension(int value, wxTextAttrUnits units = wxTEXT_ATTR_UNITS_TENTHS_MM) { m_value = value; m_flags = units|wxTEXT_ATTR_VALUE_VALID; } + + /** + Resets the dimension value and flags. + */ + void Reset() { m_value = 0; m_flags = 0; } + + /** + Partial equality test. If @a weakTest is @true, attributes of this object do not + have to be present if those attributes of @a dim are present. If @a weakTest is + @false, the function will fail if an attribute is present in @a dim but not + in this object. + */ + bool EqPartial(const wxTextAttrDimension& dim, bool weakTest = true) const; + + /** Apply the dimension, but not those identical to @a compareWith if present. + */ + bool Apply(const wxTextAttrDimension& dim, const wxTextAttrDimension* compareWith = NULL); + + /** Collects the attributes that are common to a range of content, building up a note of + which attributes are absent in some objects and which clash in some objects. + */ + void CollectCommonAttributes(const wxTextAttrDimension& attr, wxTextAttrDimension& clashingAttr, wxTextAttrDimension& absentAttr); + + /** + Equality operator. + */ + bool operator==(const wxTextAttrDimension& dim) const { return m_value == dim.m_value && m_flags == dim.m_flags; } + + /** + Returns the integer value of the dimension. + */ + int GetValue() const { return m_value; } + + /** + Returns the floating-pointing value of the dimension in mm. + + */ + float GetValueMM() const { return m_value / 10.0f; } + + /** + Sets the value of the dimension in mm. + */ + void SetValueMM(float value) { m_value = (int) ((value * 10.0f) + 0.5f); m_flags |= wxTEXT_ATTR_VALUE_VALID; } + + /** + Sets the integer value of the dimension. + */ + void SetValue(int value) { m_value = value; m_flags |= wxTEXT_ATTR_VALUE_VALID; } + + /** + Sets the integer value of the dimension, passing dimension flags. + */ + void SetValue(int value, wxTextAttrDimensionFlags flags) { SetValue(value); m_flags = flags; } + + /** + Sets the integer value and units. + */ + void SetValue(int value, wxTextAttrUnits units) { m_value = value; m_flags = units | wxTEXT_ATTR_VALUE_VALID; } + + /** + Sets the dimension. + */ + void SetValue(const wxTextAttrDimension& dim) { (*this) = dim; } + + /** + Gets the units of the dimension. + */ + wxTextAttrUnits GetUnits() const { return (wxTextAttrUnits) (m_flags & wxTEXT_ATTR_UNITS_MASK); } + + /** + Sets the units of the dimension. + */ + void SetUnits(wxTextAttrUnits units) { m_flags &= ~wxTEXT_ATTR_UNITS_MASK; m_flags |= units; } + + /** + Gets the position flags. + */ + wxTextBoxAttrPosition GetPosition() const { return (wxTextBoxAttrPosition) (m_flags & wxTEXT_BOX_ATTR_POSITION_MASK); } + + /** + Sets the position flags. + */ + void SetPosition(wxTextBoxAttrPosition pos) { m_flags &= ~wxTEXT_BOX_ATTR_POSITION_MASK; m_flags |= pos; } + + /** + Returns @true if the dimension is valid. + */ + bool IsValid() const { return (m_flags & wxTEXT_ATTR_VALUE_VALID) != 0; } + + /** + Sets the valid flag. + */ + void SetValid(bool b) { m_flags &= ~wxTEXT_ATTR_VALUE_VALID_MASK; m_flags |= (b ? wxTEXT_ATTR_VALUE_VALID : 0); } + + /** + Gets the dimension flags. + */ + wxTextAttrDimensionFlags GetFlags() const { return m_flags; } + + /** + Sets the dimension flags. + */ + void SetFlags(wxTextAttrDimensionFlags flags) { m_flags = flags; } + + int m_value; + wxTextAttrDimensionFlags m_flags; +}; + +/** + @class wxTextAttrDimensions + A class for left, right, top and bottom dimensions. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextAttr, wxRichTextCtrl, wxTextAttrDimension +*/ + +class WXDLLIMPEXP_RICHTEXT wxTextAttrDimensions +{ +public: + /** + Default constructor. + */ + wxTextAttrDimensions() {} + + /** + Resets the value and flags for all dimensions. + */ + void Reset() { m_left.Reset(); m_top.Reset(); m_right.Reset(); m_bottom.Reset(); } + + /** + Equality operator. + */ + bool operator==(const wxTextAttrDimensions& dims) const { return m_left == dims.m_left && m_top == dims.m_top && m_right == dims.m_right && m_bottom == dims.m_bottom; } + + /** + Partial equality test. If @a weakTest is @true, attributes of this object do not + have to be present if those attributes of @a dim sare present. If @a weakTest is + @false, the function will fail if an attribute is present in @a dims but not + in this object. + + */ + bool EqPartial(const wxTextAttrDimensions& dims, bool weakTest = true) const; + + /** + Apply to 'this', but not if the same as @a compareWith. + + */ + bool Apply(const wxTextAttrDimensions& dims, const wxTextAttrDimensions* compareWith = NULL); + + /** + Collects the attributes that are common to a range of content, building up a note of + which attributes are absent in some objects and which clash in some objects. + + */ + void CollectCommonAttributes(const wxTextAttrDimensions& attr, wxTextAttrDimensions& clashingAttr, wxTextAttrDimensions& absentAttr); + + /** + Remove specified attributes from this object. + */ + bool RemoveStyle(const wxTextAttrDimensions& attr); + + /** + Gets the left dimension. + */ + const wxTextAttrDimension& GetLeft() const { return m_left; } + wxTextAttrDimension& GetLeft() { return m_left; } + + /** + Gets the right dimension. + + */ + const wxTextAttrDimension& GetRight() const { return m_right; } + wxTextAttrDimension& GetRight() { return m_right; } + + /** + Gets the top dimension. + + */ + const wxTextAttrDimension& GetTop() const { return m_top; } + wxTextAttrDimension& GetTop() { return m_top; } + + /** + Gets the bottom dimension. + + */ + const wxTextAttrDimension& GetBottom() const { return m_bottom; } + wxTextAttrDimension& GetBottom() { return m_bottom; } + + /** + Are all dimensions valid? + + */ + bool IsValid() const { return m_left.IsValid() && m_top.IsValid() && m_right.IsValid() && m_bottom.IsValid(); } + + wxTextAttrDimension m_left; + wxTextAttrDimension m_top; + wxTextAttrDimension m_right; + wxTextAttrDimension m_bottom; +}; + +/** + @class wxTextAttrSize + A class for representing width and height. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextAttr, wxRichTextCtrl, wxTextAttrDimension +*/ + +class WXDLLIMPEXP_RICHTEXT wxTextAttrSize +{ +public: + /** + Default constructor. + */ + wxTextAttrSize() {} + + /** + Resets the width and height dimensions. + */ + void Reset() { m_width.Reset(); m_height.Reset(); } + + /** + Equality operator. + */ + bool operator==(const wxTextAttrSize& size) const { return m_width == size.m_width && m_height == size.m_height ; } + + /** + Partial equality test. If @a weakTest is @true, attributes of this object do not + have to be present if those attributes of @a size are present. If @a weakTest is + @false, the function will fail if an attribute is present in @a size but not + in this object. + */ + bool EqPartial(const wxTextAttrSize& size, bool weakTest = true) const; + + /** + Apply to this object, but not if the same as @a compareWith. + */ + bool Apply(const wxTextAttrSize& dims, const wxTextAttrSize* compareWith = NULL); + + /** + Collects the attributes that are common to a range of content, building up a note of + which attributes are absent in some objects and which clash in some objects. + */ + void CollectCommonAttributes(const wxTextAttrSize& attr, wxTextAttrSize& clashingAttr, wxTextAttrSize& absentAttr); + + /** + Removes the specified attributes from this object. + */ + bool RemoveStyle(const wxTextAttrSize& attr); + + /** + Returns the width. + */ + wxTextAttrDimension& GetWidth() { return m_width; } + const wxTextAttrDimension& GetWidth() const { return m_width; } + + /** + Sets the width. + */ + void SetWidth(int value, wxTextAttrDimensionFlags flags) { m_width.SetValue(value, flags); } + + /** + Sets the width. + */ + void SetWidth(int value, wxTextAttrUnits units) { m_width.SetValue(value, units); } + + /** + Sets the width. + */ + void SetWidth(const wxTextAttrDimension& dim) { m_width.SetValue(dim); } + + /** + Gets the height. + */ + wxTextAttrDimension& GetHeight() { return m_height; } + const wxTextAttrDimension& GetHeight() const { return m_height; } + + /** + Sets the height. + */ + void SetHeight(int value, wxTextAttrDimensionFlags flags) { m_height.SetValue(value, flags); } + + /** + Sets the height. + */ + void SetHeight(int value, wxTextAttrUnits units) { m_height.SetValue(value, units); } + + /** + Sets the height. + */ + void SetHeight(const wxTextAttrDimension& dim) { m_height.SetValue(dim); } + + /** + Is the size valid? + */ + bool IsValid() const { return m_width.IsValid() && m_height.IsValid(); } + + wxTextAttrDimension m_width; + wxTextAttrDimension m_height; +}; + +/** + @class wxTextAttrDimensionConverter + A class to make it easier to convert dimensions. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextAttr, wxRichTextCtrl, wxTextAttrDimension +*/ + +class WXDLLIMPEXP_RICHTEXT wxTextAttrDimensionConverter +{ +public: + /** + Constructor. + */ + wxTextAttrDimensionConverter(wxDC& dc, double scale = 1.0, const wxSize& parentSize = wxDefaultSize); + /** + Constructor. + */ + wxTextAttrDimensionConverter(int ppi, double scale = 1.0, const wxSize& parentSize = wxDefaultSize); + + /** + Gets the pixel size for the given dimension. + */ + int GetPixels(const wxTextAttrDimension& dim, int direction = wxHORIZONTAL) const; + /** + Gets the mm size for the given dimension. + */ + int GetTenthsMM(const wxTextAttrDimension& dim) const; + + /** + Converts tenths of a mm to pixels. + */ + int ConvertTenthsMMToPixels(int units) const; + /** + Converts pixels to tenths of a mm. + */ + int ConvertPixelsToTenthsMM(int pixels) const; + + /** + Sets the scale factor. + */ + void SetScale(double scale) { m_scale = scale; } + /** + Returns the scale factor. + */ + double GetScale() const { return m_scale; } + + /** + Sets the ppi. + */ + void SetPPI(int ppi) { m_ppi = ppi; } + /** + Returns the ppi. + */ + int GetPPI() const { return m_ppi; } + + /** + Sets the parent size. + */ + void SetParentSize(const wxSize& parentSize) { m_parentSize = parentSize; } + /** + Returns the parent size. + */ + const wxSize& GetParentSize() const { return m_parentSize; } + + int m_ppi; + double m_scale; + wxSize m_parentSize; +}; + +/** + Border styles, used with wxTextAttrBorder. + */ +enum wxTextAttrBorderStyle +{ + wxTEXT_BOX_ATTR_BORDER_NONE = 0, + wxTEXT_BOX_ATTR_BORDER_SOLID = 1, + wxTEXT_BOX_ATTR_BORDER_DOTTED = 2, + wxTEXT_BOX_ATTR_BORDER_DASHED = 3, + wxTEXT_BOX_ATTR_BORDER_DOUBLE = 4, + wxTEXT_BOX_ATTR_BORDER_GROOVE = 5, + wxTEXT_BOX_ATTR_BORDER_RIDGE = 6, + wxTEXT_BOX_ATTR_BORDER_INSET = 7, + wxTEXT_BOX_ATTR_BORDER_OUTSET = 8 +}; + +/** + Border style presence flags, used with wxTextAttrBorder. + */ +enum wxTextAttrBorderFlags +{ + wxTEXT_BOX_ATTR_BORDER_STYLE = 0x0001, + wxTEXT_BOX_ATTR_BORDER_COLOUR = 0x0002 +}; + +/** + Border width symbols for qualitative widths, used with wxTextAttrBorder. + */ +enum wxTextAttrBorderWidth +{ + wxTEXT_BOX_ATTR_BORDER_THIN = -1, + wxTEXT_BOX_ATTR_BORDER_MEDIUM = -2, + wxTEXT_BOX_ATTR_BORDER_THICK = -3 +}; + +/** + Float styles. + */ +enum wxTextBoxAttrFloatStyle +{ + wxTEXT_BOX_ATTR_FLOAT_NONE = 0, + wxTEXT_BOX_ATTR_FLOAT_LEFT = 1, + wxTEXT_BOX_ATTR_FLOAT_RIGHT = 2 +}; + +/** + Clear styles. + */ +enum wxTextBoxAttrClearStyle +{ + wxTEXT_BOX_ATTR_CLEAR_NONE = 0, + wxTEXT_BOX_ATTR_CLEAR_LEFT = 1, + wxTEXT_BOX_ATTR_CLEAR_RIGHT = 2, + wxTEXT_BOX_ATTR_CLEAR_BOTH = 3 +}; + +/** + Collapse mode styles. TODO: can they be switched on per side? + */ +enum wxTextBoxAttrCollapseMode +{ + wxTEXT_BOX_ATTR_COLLAPSE_NONE = 0, + wxTEXT_BOX_ATTR_COLLAPSE_FULL = 1 +}; + +/** + Vertical alignment values. + */ +enum wxTextBoxAttrVerticalAlignment +{ + wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT_NONE = 0, + wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT_TOP = 1, + wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT_CENTRE = 2, + wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT_BOTTOM = 3 +}; + +/** + @class wxTextAttrBorder + A class representing a rich text object border. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextAttr, wxRichTextCtrl, wxRichTextAttrBorders +*/ + +class WXDLLIMPEXP_RICHTEXT wxTextAttrBorder +{ +public: + /** + Default constructor. + */ + wxTextAttrBorder() { Reset(); } + + /** + Equality operator. + */ + bool operator==(const wxTextAttrBorder& border) const + { + return m_flags == border.m_flags && m_borderStyle == border.m_borderStyle && + m_borderColour == border.m_borderColour && m_borderWidth == border.m_borderWidth; + } + + /** + Resets the border style, colour, width and flags. + */ + void Reset() { m_borderStyle = 0; m_borderColour = 0; m_flags = 0; m_borderWidth.Reset(); } + + /** + Partial equality test. If @a weakTest is @true, attributes of this object do not + have to be present if those attributes of @a border are present. If @a weakTest is + @false, the function will fail if an attribute is present in @a border but not + in this object. + */ + bool EqPartial(const wxTextAttrBorder& border, bool weakTest = true) const; + + /** + Applies the border to this object, but not if the same as @a compareWith. + + */ + bool Apply(const wxTextAttrBorder& border, const wxTextAttrBorder* compareWith = NULL); + + /** + Removes the specified attributes from this object. + */ + bool RemoveStyle(const wxTextAttrBorder& attr); + + /** + Collects the attributes that are common to a range of content, building up a note of + which attributes are absent in some objects and which clash in some objects. + */ + void CollectCommonAttributes(const wxTextAttrBorder& attr, wxTextAttrBorder& clashingAttr, wxTextAttrBorder& absentAttr); + + /** + Sets the border style. + */ + void SetStyle(int style) { m_borderStyle = style; m_flags |= wxTEXT_BOX_ATTR_BORDER_STYLE; } + + /** + Gets the border style. + + */ + int GetStyle() const { return m_borderStyle; } + + /** + Sets the border colour. + */ + void SetColour(unsigned long colour) { m_borderColour = colour; m_flags |= wxTEXT_BOX_ATTR_BORDER_COLOUR; } + + /** + Sets the border colour. + */ + void SetColour(const wxColour& colour) { m_borderColour = colour.GetRGB(); m_flags |= wxTEXT_BOX_ATTR_BORDER_COLOUR; } + + /** + Gets the colour as a long. + */ + unsigned long GetColourLong() const { return m_borderColour; } + + /** + Gets the colour. + */ + wxColour GetColour() const { return wxColour(m_borderColour); } + + /** + Gets the border width. + */ + wxTextAttrDimension& GetWidth() { return m_borderWidth; } + const wxTextAttrDimension& GetWidth() const { return m_borderWidth; } + + /** + Sets the border width. + */ + void SetWidth(const wxTextAttrDimension& width) { m_borderWidth = width; } + /** + Sets the border width. + */ + void SetWidth(int value, wxTextAttrUnits units = wxTEXT_ATTR_UNITS_TENTHS_MM) { SetWidth(wxTextAttrDimension(value, units)); } + + /** + True if the border has a valid style. + */ + bool HasStyle() const { return (m_flags & wxTEXT_BOX_ATTR_BORDER_STYLE) != 0; } + + /** + True if the border has a valid colour. + */ + bool HasColour() const { return (m_flags & wxTEXT_BOX_ATTR_BORDER_COLOUR) != 0; } + + /** + True if the border has a valid width. + */ + bool HasWidth() const { return m_borderWidth.IsValid(); } + + /** + True if the border is valid. + */ + bool IsValid() const { return HasWidth(); } + + /** + Set the valid flag for this border. + */ + void MakeValid() { m_borderWidth.SetValid(true); } + + /** + True if the border has no attributes set. + */ + bool IsDefault() const { return (m_flags == 0); } + + /** + Returns the border flags. + */ + int GetFlags() const { return m_flags; } + + /** + Sets the border flags. + */ + void SetFlags(int flags) { m_flags = flags; } + + /** + Adds a border flag. + */ + void AddFlag(int flag) { m_flags |= flag; } + + /** + Removes a border flag. + */ + void RemoveFlag(int flag) { m_flags &= ~flag; } + + int m_borderStyle; + unsigned long m_borderColour; + wxTextAttrDimension m_borderWidth; + int m_flags; +}; + +/** + @class wxTextAttrBorders + A class representing a rich text object's borders. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextAttr, wxRichTextCtrl, wxRichTextAttrBorder +*/ + +class WXDLLIMPEXP_RICHTEXT wxTextAttrBorders +{ +public: + /** + Default constructor. + */ + wxTextAttrBorders() { } + + /** + Equality operator. + */ + bool operator==(const wxTextAttrBorders& borders) const + { + return m_left == borders.m_left && m_right == borders.m_right && + m_top == borders.m_top && m_bottom == borders.m_bottom; + } + + /** + Sets the style of all borders. + */ + void SetStyle(int style); + + /** + Sets colour of all borders. + */ + void SetColour(unsigned long colour); + + /** + Sets the colour for all borders. + */ + void SetColour(const wxColour& colour); + + /** + Sets the width of all borders. + */ + void SetWidth(const wxTextAttrDimension& width); + + /** + Sets the width of all borders. + */ + void SetWidth(int value, wxTextAttrUnits units = wxTEXT_ATTR_UNITS_TENTHS_MM) { SetWidth(wxTextAttrDimension(value, units)); } + + /** + Resets all borders. + */ + void Reset() { m_left.Reset(); m_right.Reset(); m_top.Reset(); m_bottom.Reset(); } + + /** + Partial equality test. If @a weakTest is @true, attributes of this object do not + have to be present if those attributes of @a borders are present. If @a weakTest is + @false, the function will fail if an attribute is present in @a borders but not + in this object. + */ + bool EqPartial(const wxTextAttrBorders& borders, bool weakTest = true) const; + + /** + Applies border to this object, but not if the same as @a compareWith. + */ + bool Apply(const wxTextAttrBorders& borders, const wxTextAttrBorders* compareWith = NULL); + + /** + Removes the specified attributes from this object. + */ + bool RemoveStyle(const wxTextAttrBorders& attr); + + /** + Collects the attributes that are common to a range of content, building up a note of + which attributes are absent in some objects and which clash in some objects. + */ + void CollectCommonAttributes(const wxTextAttrBorders& attr, wxTextAttrBorders& clashingAttr, wxTextAttrBorders& absentAttr); + + /** + Returns @true if at least one border is valid. + */ + bool IsValid() const { return m_left.IsValid() || m_right.IsValid() || m_top.IsValid() || m_bottom.IsValid(); } + + /** + Returns @true if no border attributes were set. + */ + bool IsDefault() const { return m_left.IsDefault() && m_right.IsDefault() && m_top.IsDefault() && m_bottom.IsDefault(); } + + /** + Returns the left border. + */ + const wxTextAttrBorder& GetLeft() const { return m_left; } + wxTextAttrBorder& GetLeft() { return m_left; } + + /** + Returns the right border. + */ + const wxTextAttrBorder& GetRight() const { return m_right; } + wxTextAttrBorder& GetRight() { return m_right; } + + /** + Returns the top border. + */ + const wxTextAttrBorder& GetTop() const { return m_top; } + wxTextAttrBorder& GetTop() { return m_top; } + + /** + Returns the bottom border. + */ + const wxTextAttrBorder& GetBottom() const { return m_bottom; } + wxTextAttrBorder& GetBottom() { return m_bottom; } + + wxTextAttrBorder m_left, m_right, m_top, m_bottom; + +}; + +/** + @class wxTextBoxAttr + A class representing the box attributes of a rich text object. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextAttr, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxTextBoxAttr +{ +public: + /** + Default constructor. + */ + wxTextBoxAttr() { Init(); } + + /** + Copy constructor. + */ + wxTextBoxAttr(const wxTextBoxAttr& attr) { Init(); (*this) = attr; } + + /** + Initialises this object. + */ + void Init() { Reset(); } + + /** + Resets this object. + */ + void Reset(); + + // Copy. Unnecessary since we let it do a binary copy + //void Copy(const wxTextBoxAttr& attr); + + // Assignment + //void operator= (const wxTextBoxAttr& attr); + + /** + Equality test. + */ + bool operator== (const wxTextBoxAttr& attr) const; + + /** + Partial equality test, ignoring unset attributes. If @a weakTest is @true, attributes of this object do not + have to be present if those attributes of @a attr are present. If @a weakTest is + @false, the function will fail if an attribute is present in @a attr but not + in this object. + + */ + bool EqPartial(const wxTextBoxAttr& attr, bool weakTest = true) const; + + /** + Merges the given attributes. If @a compareWith is non-NULL, then it will be used + to mask out those attributes that are the same in style and @a compareWith, for + situations where we don't want to explicitly set inherited attributes. + */ + bool Apply(const wxTextBoxAttr& style, const wxTextBoxAttr* compareWith = NULL); + + /** + Collects the attributes that are common to a range of content, building up a note of + which attributes are absent in some objects and which clash in some objects. + */ + void CollectCommonAttributes(const wxTextBoxAttr& attr, wxTextBoxAttr& clashingAttr, wxTextBoxAttr& absentAttr); + + /** + Removes the specified attributes from this object. + */ + bool RemoveStyle(const wxTextBoxAttr& attr); + + /** + Sets the flags. + */ + void SetFlags(int flags) { m_flags = flags; } + + /** + Returns the flags. + */ + int GetFlags() const { return m_flags; } + + /** + Is this flag present? + */ + bool HasFlag(wxTextBoxAttrFlags flag) const { return (m_flags & flag) != 0; } + + /** + Removes this flag. + */ + void RemoveFlag(wxTextBoxAttrFlags flag) { m_flags &= ~flag; } + + /** + Adds this flag. + */ + void AddFlag(wxTextBoxAttrFlags flag) { m_flags |= flag; } + + /** + Returns @true if no attributes are set. + */ + bool IsDefault() const; + + /** + Returns the float mode. + */ + wxTextBoxAttrFloatStyle GetFloatMode() const { return m_floatMode; } + + /** + Sets the float mode. + */ + void SetFloatMode(wxTextBoxAttrFloatStyle mode) { m_floatMode = mode; m_flags |= wxTEXT_BOX_ATTR_FLOAT; } + + /** + Returns @true if float mode is active. + */ + bool HasFloatMode() const { return HasFlag(wxTEXT_BOX_ATTR_FLOAT); } + + /** + Returns @true if this object is floating. + */ + bool IsFloating() const { return HasFloatMode() && GetFloatMode() != wxTEXT_BOX_ATTR_FLOAT_NONE; } + + /** + Returns the clear mode - whether to wrap text after object. Currently unimplemented. + */ + wxTextBoxAttrClearStyle GetClearMode() const { return m_clearMode; } + + /** + Set the clear mode. Currently unimplemented. + */ + void SetClearMode(wxTextBoxAttrClearStyle mode) { m_clearMode = mode; m_flags |= wxTEXT_BOX_ATTR_CLEAR; } + + /** + Returns @true if we have a clear flag. + */ + bool HasClearMode() const { return HasFlag(wxTEXT_BOX_ATTR_CLEAR); } + + /** + Returns the collapse mode - whether to collapse borders. + */ + wxTextBoxAttrCollapseMode GetCollapseBorders() const { return m_collapseMode; } + + /** + Sets the collapse mode - whether to collapse borders. + */ + void SetCollapseBorders(wxTextBoxAttrCollapseMode collapse) { m_collapseMode = collapse; m_flags |= wxTEXT_BOX_ATTR_COLLAPSE_BORDERS; } + + /** + Returns @true if the collapse borders flag is present. + */ + bool HasCollapseBorders() const { return HasFlag(wxTEXT_BOX_ATTR_COLLAPSE_BORDERS); } + + /** + Returns the vertical alignment. + */ + wxTextBoxAttrVerticalAlignment GetVerticalAlignment() const { return m_verticalAlignment; } + + /** + Sets the vertical alignment. + */ + void SetVerticalAlignment(wxTextBoxAttrVerticalAlignment verticalAlignment) { m_verticalAlignment = verticalAlignment; m_flags |= wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT; } + + /** + Returns @true if a vertical alignment flag is present. + */ + bool HasVerticalAlignment() const { return HasFlag(wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT); } + + /** + Returns the margin values. + */ + wxTextAttrDimensions& GetMargins() { return m_margins; } + const wxTextAttrDimensions& GetMargins() const { return m_margins; } + + /** + Returns the left margin. + */ + wxTextAttrDimension& GetLeftMargin() { return m_margins.m_left; } + const wxTextAttrDimension& GetLeftMargin() const { return m_margins.m_left; } + + /** + Returns the right margin. + */ + wxTextAttrDimension& GetRightMargin() { return m_margins.m_right; } + const wxTextAttrDimension& GetRightMargin() const { return m_margins.m_right; } + + /** + Returns the top margin. + */ + wxTextAttrDimension& GetTopMargin() { return m_margins.m_top; } + const wxTextAttrDimension& GetTopMargin() const { return m_margins.m_top; } + + /** + Returns the bottom margin. + */ + wxTextAttrDimension& GetBottomMargin() { return m_margins.m_bottom; } + const wxTextAttrDimension& GetBottomMargin() const { return m_margins.m_bottom; } + + /** + Returns the position. + */ + wxTextAttrDimensions& GetPosition() { return m_position; } + const wxTextAttrDimensions& GetPosition() const { return m_position; } + + /** + Returns the left position. + */ + wxTextAttrDimension& GetLeft() { return m_position.m_left; } + const wxTextAttrDimension& GetLeft() const { return m_position.m_left; } + + /** + Returns the right position. + */ + wxTextAttrDimension& GetRight() { return m_position.m_right; } + const wxTextAttrDimension& GetRight() const { return m_position.m_right; } + + /** + Returns the top position. + */ + wxTextAttrDimension& GetTop() { return m_position.m_top; } + const wxTextAttrDimension& GetTop() const { return m_position.m_top; } + + /** + Returns the bottom position. + */ + wxTextAttrDimension& GetBottom() { return m_position.m_bottom; } + const wxTextAttrDimension& GetBottom() const { return m_position.m_bottom; } + + /** + Returns the padding values. + */ + wxTextAttrDimensions& GetPadding() { return m_padding; } + const wxTextAttrDimensions& GetPadding() const { return m_padding; } + + /** + Returns the left padding value. + */ + wxTextAttrDimension& GetLeftPadding() { return m_padding.m_left; } + const wxTextAttrDimension& GetLeftPadding() const { return m_padding.m_left; } + + /** + Returns the right padding value. + */ + wxTextAttrDimension& GetRightPadding() { return m_padding.m_right; } + const wxTextAttrDimension& GetRightPadding() const { return m_padding.m_right; } + + /** + Returns the top padding value. + */ + wxTextAttrDimension& GetTopPadding() { return m_padding.m_top; } + const wxTextAttrDimension& GetTopPadding() const { return m_padding.m_top; } + + /** + Returns the bottom padding value. + */ + wxTextAttrDimension& GetBottomPadding() { return m_padding.m_bottom; } + const wxTextAttrDimension& GetBottomPadding() const { return m_padding.m_bottom; } + + /** + Returns the borders. + */ + wxTextAttrBorders& GetBorder() { return m_border; } + const wxTextAttrBorders& GetBorder() const { return m_border; } + + /** + Returns the left border. + */ + wxTextAttrBorder& GetLeftBorder() { return m_border.m_left; } + const wxTextAttrBorder& GetLeftBorder() const { return m_border.m_left; } + + /** + Returns the top border. + */ + wxTextAttrBorder& GetTopBorder() { return m_border.m_top; } + const wxTextAttrBorder& GetTopBorder() const { return m_border.m_top; } + + /** + Returns the right border. + */ + wxTextAttrBorder& GetRightBorder() { return m_border.m_right; } + const wxTextAttrBorder& GetRightBorder() const { return m_border.m_right; } + + /** + Returns the bottom border. + */ + wxTextAttrBorder& GetBottomBorder() { return m_border.m_bottom; } + const wxTextAttrBorder& GetBottomBorder() const { return m_border.m_bottom; } + + /** + Returns the outline. + */ + wxTextAttrBorders& GetOutline() { return m_outline; } + const wxTextAttrBorders& GetOutline() const { return m_outline; } + + /** + Returns the left outline. + */ + wxTextAttrBorder& GetLeftOutline() { return m_outline.m_left; } + const wxTextAttrBorder& GetLeftOutline() const { return m_outline.m_left; } + + /** + Returns the top outline. + */ + wxTextAttrBorder& GetTopOutline() { return m_outline.m_top; } + const wxTextAttrBorder& GetTopOutline() const { return m_outline.m_top; } + + /** + Returns the right outline. + */ + wxTextAttrBorder& GetRightOutline() { return m_outline.m_right; } + const wxTextAttrBorder& GetRightOutline() const { return m_outline.m_right; } + + /** + Returns the bottom outline. + */ + wxTextAttrBorder& GetBottomOutline() { return m_outline.m_bottom; } + const wxTextAttrBorder& GetBottomOutline() const { return m_outline.m_bottom; } + + /** + Returns the object size. + */ + wxTextAttrSize& GetSize() { return m_size; } + const wxTextAttrSize& GetSize() const { return m_size; } + + /** + Returns the object minimum size. + */ + + wxTextAttrSize& GetMinSize() { return m_minSize; } + const wxTextAttrSize& GetMinSize() const { return m_minSize; } + + /** + Returns the object maximum size. + */ + + wxTextAttrSize& GetMaxSize() { return m_maxSize; } + const wxTextAttrSize& GetMaxSize() const { return m_maxSize; } + + /** + Sets the object size. + */ + void SetSize(const wxTextAttrSize& sz) { m_size = sz; } + + /** + Sets the object minimum size. + */ + void SetMinSize(const wxTextAttrSize& sz) { m_minSize = sz; } + + /** + Sets the object maximum size. + */ + void SetMaxSize(const wxTextAttrSize& sz) { m_maxSize = sz; } + + /** + Returns the object width. + */ + wxTextAttrDimension& GetWidth() { return m_size.m_width; } + const wxTextAttrDimension& GetWidth() const { return m_size.m_width; } + + /** + Returns the object height. + */ + wxTextAttrDimension& GetHeight() { return m_size.m_height; } + const wxTextAttrDimension& GetHeight() const { return m_size.m_height; } + + /** + Returns the box style name. + */ + const wxString& GetBoxStyleName() const { return m_boxStyleName; } + + /** + Sets the box style name. + */ + void SetBoxStyleName(const wxString& name) { m_boxStyleName = name; AddFlag(wxTEXT_BOX_ATTR_BOX_STYLE_NAME); } + + /** + Returns @true if the box style name is present. + */ + bool HasBoxStyleName() const { return HasFlag(wxTEXT_BOX_ATTR_BOX_STYLE_NAME); } + +public: + + int m_flags; + + wxTextAttrDimensions m_margins; + wxTextAttrDimensions m_padding; + wxTextAttrDimensions m_position; + + wxTextAttrSize m_size; + wxTextAttrSize m_minSize; + wxTextAttrSize m_maxSize; + + wxTextAttrBorders m_border; + wxTextAttrBorders m_outline; + + wxTextBoxAttrFloatStyle m_floatMode; + wxTextBoxAttrClearStyle m_clearMode; + wxTextBoxAttrCollapseMode m_collapseMode; + wxTextBoxAttrVerticalAlignment m_verticalAlignment; + wxString m_boxStyleName; +}; + +/** + @class wxRichTextAttr + A class representing enhanced attributes for rich text objects. + This adds a wxTextBoxAttr member to the basic wxTextAttr class. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextAttr, wxTextBoxAttr, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextAttr: public wxTextAttr +{ +public: + /** + Constructor taking a wxTextAttr. + */ + wxRichTextAttr(const wxTextAttr& attr) { wxTextAttr::Copy(attr); } + + /** + Copy constructor. + */ + wxRichTextAttr(const wxRichTextAttr& attr): wxTextAttr() { Copy(attr); } + + /** + Default constructor. + */ + wxRichTextAttr() {} + + /** + Copy function. + */ + void Copy(const wxRichTextAttr& attr); + + /** + Assignment operator. + */ + void operator=(const wxRichTextAttr& attr) { Copy(attr); } + + /** + Assignment operator. + */ + void operator=(const wxTextAttr& attr) { wxTextAttr::Copy(attr); } + + /** + Equality test. + */ + bool operator==(const wxRichTextAttr& attr) const; + + /** + Partial equality test. If @a weakTest is @true, attributes of this object do not + have to be present if those attributes of @a attr are present. If @a weakTest is + @false, the function will fail if an attribute is present in @a attr but not + in this object. + */ + bool EqPartial(const wxRichTextAttr& attr, bool weakTest = true) const; + + /** + Merges the given attributes. If @a compareWith + is non-NULL, then it will be used to mask out those attributes that are the same in style + and @a compareWith, for situations where we don't want to explicitly set inherited attributes. + */ + bool Apply(const wxRichTextAttr& style, const wxRichTextAttr* compareWith = NULL); + + /** + Collects the attributes that are common to a range of content, building up a note of + which attributes are absent in some objects and which clash in some objects. + */ + void CollectCommonAttributes(const wxRichTextAttr& attr, wxRichTextAttr& clashingAttr, wxRichTextAttr& absentAttr); + + /** + Removes the specified attributes from this object. + */ + bool RemoveStyle(const wxRichTextAttr& attr); + + /** + Returns the text box attributes. + */ + wxTextBoxAttr& GetTextBoxAttr() { return m_textBoxAttr; } + const wxTextBoxAttr& GetTextBoxAttr() const { return m_textBoxAttr; } + + /** + Set the text box attributes. + */ + void SetTextBoxAttr(const wxTextBoxAttr& attr) { m_textBoxAttr = attr; } + + /** + Returns @true if no attributes are set. + */ + bool IsDefault() const { return (GetFlags() == 0) && m_textBoxAttr.IsDefault(); } + + wxTextBoxAttr m_textBoxAttr; +}; + +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxRichTextAttr, wxRichTextAttrArray, WXDLLIMPEXP_RICHTEXT); + +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxVariant, wxRichTextVariantArray, WXDLLIMPEXP_RICHTEXT); + +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxRect, wxRichTextRectArray, WXDLLIMPEXP_RICHTEXT); + +/** + @class wxRichTextProperties + A simple property class using wxVariants. This is used to give each rich text object the + ability to store custom properties that can be used by the application. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextObject, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextProperties: public wxObject +{ +DECLARE_DYNAMIC_CLASS(wxRichTextProperties) +public: + + /** + Default constructor. + */ + wxRichTextProperties() {} + + /** + Copy constructor. + */ + wxRichTextProperties(const wxRichTextProperties& props): wxObject() { Copy(props); } + + /** + Assignment operator. + */ + void operator=(const wxRichTextProperties& props) { Copy(props); } + + /** + Equality operator. + */ + bool operator==(const wxRichTextProperties& props) const; + + /** + Copies from @a props. + */ + void Copy(const wxRichTextProperties& props) { m_properties = props.m_properties; } + + /** + Returns the variant at the given index. + */ + const wxVariant& operator[](size_t idx) const { return m_properties[idx]; } + + /** + Returns the variant at the given index. + */ + wxVariant& operator[](size_t idx) { return m_properties[idx]; } + + /** + Clears the properties. + */ + void Clear() { m_properties.Clear(); } + + /** + Returns the array of variants implementing the properties. + */ + const wxRichTextVariantArray& GetProperties() const { return m_properties; } + + /** + Returns the array of variants implementing the properties. + */ + wxRichTextVariantArray& GetProperties() { return m_properties; } + + /** + Sets the array of variants. + */ + void SetProperties(const wxRichTextVariantArray& props) { m_properties = props; } + + /** + Returns all the property names. + */ + wxArrayString GetPropertyNames() const; + + /** + Returns a count of the properties. + */ + size_t GetCount() const { return m_properties.GetCount(); } + + /** + Returns @true if the given property is found. + */ + bool HasProperty(const wxString& name) const { return Find(name) != -1; } + + /** + Finds the given property. + */ + int Find(const wxString& name) const; + + /** + Removes the given property. + */ + bool Remove(const wxString& name); + + /** + Gets the property variant by name. + */ + const wxVariant& GetProperty(const wxString& name) const; + + /** + Finds or creates a property with the given name, returning a pointer to the variant. + */ + wxVariant* FindOrCreateProperty(const wxString& name); + + /** + Gets the value of the named property as a string. + */ + wxString GetPropertyString(const wxString& name) const; + + /** + Gets the value of the named property as a long integer. + */ + long GetPropertyLong(const wxString& name) const; + + /** + Gets the value of the named property as a boolean. + */ + bool GetPropertyBool(const wxString& name) const; + + /** + Gets the value of the named property as a double. + */ + double GetPropertyDouble(const wxString& name) const; + + /** + Sets the property by passing a variant which contains a name and value. + */ + void SetProperty(const wxVariant& variant); + + /** + Sets a property by name and variant. + */ + void SetProperty(const wxString& name, const wxVariant& variant); + + /** + Sets a property by name and string value. + */ + void SetProperty(const wxString& name, const wxString& value); + + /** + Sets a property by name and wxChar* value. + */ + void SetProperty(const wxString& name, const wxChar* value) { SetProperty(name, wxString(value)); } + + /** + Sets property by name and long integer value. + */ + void SetProperty(const wxString& name, long value); + + /** + Sets property by name and double value. + */ + void SetProperty(const wxString& name, double value); + + /** + Sets property by name and boolean value. + */ + void SetProperty(const wxString& name, bool value); + + /** + Removes the given properties from these properties. + */ + void RemoveProperties(const wxRichTextProperties& properties); + + /** + Merges the given properties with these properties. + */ + void MergeProperties(const wxRichTextProperties& properties); + +protected: + wxRichTextVariantArray m_properties; +}; + + +/** + @class wxRichTextFontTable + Manages quick access to a pool of fonts for rendering rich text. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextFontTable: public wxObject +{ +public: + /** + Default constructor. + */ + wxRichTextFontTable(); + + /** + Copy constructor. + */ + wxRichTextFontTable(const wxRichTextFontTable& table); + virtual ~wxRichTextFontTable(); + + /** + Returns @true if the font table is valid. + */ + bool IsOk() const { return m_refData != NULL; } + + /** + Finds a font for the given attribute object. + */ + wxFont FindFont(const wxRichTextAttr& fontSpec); + + /** + Clears the font table. + */ + void Clear(); + + /** + Assignment operator. + */ + void operator= (const wxRichTextFontTable& table); + + /** + Equality operator. + */ + bool operator == (const wxRichTextFontTable& table) const; + + /** + Inequality operator. + */ + bool operator != (const wxRichTextFontTable& table) const { return !(*this == table); } + + /** + Set the font scale factor. + */ + void SetFontScale(double fontScale); + +protected: + + double m_fontScale; + + DECLARE_DYNAMIC_CLASS(wxRichTextFontTable) +}; + +/** + @class wxRichTextRange + + This stores beginning and end positions for a range of data. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextRange +{ +public: +// Constructors + + /** + Default constructor. + */ + wxRichTextRange() { m_start = 0; m_end = 0; } + + /** + Constructor taking start and end positions. + */ + wxRichTextRange(long start, long end) { m_start = start; m_end = end; } + + /** + Copy constructor. + */ + wxRichTextRange(const wxRichTextRange& range) { m_start = range.m_start; m_end = range.m_end; } + ~wxRichTextRange() {} + + /** + Assigns @a range to this range. + */ + void operator =(const wxRichTextRange& range) { m_start = range.m_start; m_end = range.m_end; } + + /** + Equality operator. Returns @true if @a range is the same as this range. + */ + bool operator ==(const wxRichTextRange& range) const { return (m_start == range.m_start && m_end == range.m_end); } + + /** + Inequality operator. + */ + bool operator !=(const wxRichTextRange& range) const { return (m_start != range.m_start || m_end != range.m_end); } + + /** + Subtracts a range from this range. + */ + wxRichTextRange operator -(const wxRichTextRange& range) const { return wxRichTextRange(m_start - range.m_start, m_end - range.m_end); } + + /** + Adds a range to this range. + */ + wxRichTextRange operator +(const wxRichTextRange& range) const { return wxRichTextRange(m_start + range.m_start, m_end + range.m_end); } + + /** + Sets the range start and end positions. + */ + void SetRange(long start, long end) { m_start = start; m_end = end; } + + /** + Sets the start position. + */ + void SetStart(long start) { m_start = start; } + + /** + Returns the start position. + */ + long GetStart() const { return m_start; } + + /** + Sets the end position. + */ + void SetEnd(long end) { m_end = end; } + + /** + Gets the end position. + */ + long GetEnd() const { return m_end; } + + /** + Returns true if this range is completely outside @a range. + */ + bool IsOutside(const wxRichTextRange& range) const { return range.m_start > m_end || range.m_end < m_start; } + + /** + Returns true if this range is completely within @a range. + */ + bool IsWithin(const wxRichTextRange& range) const { return m_start >= range.m_start && m_end <= range.m_end; } + + /** + Returns true if @a pos was within the range. Does not match if the range is empty. + */ + bool Contains(long pos) const { return pos >= m_start && pos <= m_end ; } + + /** + Limit this range to be within @a range. + */ + bool LimitTo(const wxRichTextRange& range) ; + + /** + Gets the length of the range. + */ + long GetLength() const { return m_end - m_start + 1; } + + /** + Swaps the start and end. + */ + void Swap() { long tmp = m_start; m_start = m_end; m_end = tmp; } + + /** + Converts the API-standard range, whose end is one past the last character in + the range, to the internal form, which uses the first and last character + positions of the range. In other words, one is subtracted from the end position. + (n, n) is the range of a single character. + */ + wxRichTextRange ToInternal() const { return wxRichTextRange(m_start, m_end-1); } + + /** + Converts the internal range, which uses the first and last character positions + of the range, to the API-standard range, whose end is one past the last + character in the range. In other words, one is added to the end position. + (n, n+1) is the range of a single character. + */ + wxRichTextRange FromInternal() const { return wxRichTextRange(m_start, m_end+1); } + +protected: + long m_start; + long m_end; +}; + +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxRichTextRange, wxRichTextRangeArray, WXDLLIMPEXP_RICHTEXT); + +#define wxRICHTEXT_ALL wxRichTextRange(-2, -2) +#define wxRICHTEXT_NONE wxRichTextRange(-1, -1) + +#define wxRICHTEXT_NO_SELECTION wxRichTextRange(-2, -2) + +/** + @class wxRichTextSelection + + Stores selection information. The selection does not have to be contiguous, though currently non-contiguous + selections are only supported for a range of table cells (a geometric block of cells can consist + of a set of non-contiguous positions). + + The selection consists of an array of ranges, and the container that is the context for the selection. It + follows that a single selection object can only represent ranges with the same parent container. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextSelection +{ +public: + /** + Copy constructor. + */ + wxRichTextSelection(const wxRichTextSelection& sel) { Copy(sel); } + + /** + Creates a selection from a range and a container. + */ + wxRichTextSelection(const wxRichTextRange& range, wxRichTextParagraphLayoutBox* container) { m_ranges.Add(range); m_container = container; } + + /** + Default constructor. + */ + wxRichTextSelection() { Reset(); } + + /** + Resets the selection. + */ + void Reset() { m_ranges.Clear(); m_container = NULL; } + + /** + Sets the selection. + */ + + void Set(const wxRichTextRange& range, wxRichTextParagraphLayoutBox* container) + { m_ranges.Clear(); m_ranges.Add(range); m_container = container; } + + /** + Adds a range to the selection. + */ + void Add(const wxRichTextRange& range) + { m_ranges.Add(range); } + + /** + Sets the selections from an array of ranges and a container object. + */ + void Set(const wxRichTextRangeArray& ranges, wxRichTextParagraphLayoutBox* container) + { m_ranges = ranges; m_container = container; } + + /** + Copies from @a sel. + */ + void Copy(const wxRichTextSelection& sel) + { m_ranges = sel.m_ranges; m_container = sel.m_container; } + + /** + Assignment operator. + */ + void operator=(const wxRichTextSelection& sel) { Copy(sel); } + + /** + Equality operator. + */ + bool operator==(const wxRichTextSelection& sel) const; + + /** + Index operator. + */ + wxRichTextRange operator[](size_t i) const { return GetRange(i); } + + /** + Returns the selection ranges. + */ + wxRichTextRangeArray& GetRanges() { return m_ranges; } + + /** + Returns the selection ranges. + */ + const wxRichTextRangeArray& GetRanges() const { return m_ranges; } + + /** + Sets the selection ranges. + */ + void SetRanges(const wxRichTextRangeArray& ranges) { m_ranges = ranges; } + + /** + Returns the number of ranges in the selection. + */ + size_t GetCount() const { return m_ranges.GetCount(); } + + /** + Returns the range at the given index. + + */ + wxRichTextRange GetRange(size_t i) const { return m_ranges[i]; } + + /** + Returns the first range if there is one, otherwise wxRICHTEXT_NO_SELECTION. + */ + wxRichTextRange GetRange() const { return (m_ranges.GetCount() > 0) ? (m_ranges[0]) : wxRICHTEXT_NO_SELECTION; } + + /** + Sets a single range. + */ + void SetRange(const wxRichTextRange& range) { m_ranges.Clear(); m_ranges.Add(range); } + + /** + Returns the container for which the selection is valid. + */ + wxRichTextParagraphLayoutBox* GetContainer() const { return m_container; } + + /** + Sets the container for which the selection is valid. + */ + void SetContainer(wxRichTextParagraphLayoutBox* container) { m_container = container; } + + /** + Returns @true if the selection is valid. + */ + bool IsValid() const { return m_ranges.GetCount() > 0 && GetContainer(); } + + /** + Returns the selection appropriate to the specified object, if any; returns an empty array if none + at the level of the object's container. + */ + wxRichTextRangeArray GetSelectionForObject(wxRichTextObject* obj) const; + + /** + Returns @true if the given position is within the selection. + */ + bool WithinSelection(long pos, wxRichTextObject* obj) const; + + /** + Returns @true if the given position is within the selection. + + */ + bool WithinSelection(long pos) const { return WithinSelection(pos, m_ranges); } + + /** + Returns @true if the given position is within the selection range. + */ + static bool WithinSelection(long pos, const wxRichTextRangeArray& ranges); + + /** + Returns @true if the given range is within the selection range. + */ + static bool WithinSelection(const wxRichTextRange& range, const wxRichTextRangeArray& ranges); + + wxRichTextRangeArray m_ranges; + wxRichTextParagraphLayoutBox* m_container; +}; + +/** + @class wxRichTextDrawingContext + + A class for passing information to drawing and measuring functions. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextDrawingContext: public wxObject +{ + DECLARE_CLASS(wxRichTextDrawingContext) +public: + + /** + Pass the buffer to the context so the context can retrieve information + such as virtual attributes. + */ + wxRichTextDrawingContext(wxRichTextBuffer* buffer); + + void Init() { m_buffer = NULL; m_enableVirtualAttributes = true; } + + /** + Does this object have virtual attributes? + Virtual attributes can be provided for visual cues without + affecting the actual styling. + */ + bool HasVirtualAttributes(wxRichTextObject* obj) const; + + /** + Returns the virtual attributes for this object. + Virtual attributes can be provided for visual cues without + affecting the actual styling. + */ + wxRichTextAttr GetVirtualAttributes(wxRichTextObject* obj) const; + + /** + Applies any virtual attributes relevant to this object. + */ + bool ApplyVirtualAttributes(wxRichTextAttr& attr, wxRichTextObject* obj) const; + + /** + Gets the count for mixed virtual attributes for individual positions within the object. + For example, individual characters within a text object may require special highlighting. + */ + int GetVirtualSubobjectAttributesCount(wxRichTextObject* obj) const; + + /** + Gets the mixed virtual attributes for individual positions within the object. + For example, individual characters within a text object may require special highlighting. + The function is passed the count returned by GetVirtualSubobjectAttributesCount. + */ + int GetVirtualSubobjectAttributes(wxRichTextObject* obj, wxArrayInt& positions, wxRichTextAttrArray& attributes) const; + + /** + Do we have virtual text for this object? Virtual text allows an application + to replace characters in an object for editing and display purposes, for example + for highlighting special characters. + */ + bool HasVirtualText(const wxRichTextPlainText* obj) const; + + /** + Gets the virtual text for this object. + */ + bool GetVirtualText(const wxRichTextPlainText* obj, wxString& text) const; + + /** + Enables virtual attribute processing. + */ + + void EnableVirtualAttributes(bool b) { m_enableVirtualAttributes = b; } + + /** + Returns @true if virtual attribute processing is enabled. + */ + + bool GetVirtualAttributesEnabled() const { return m_enableVirtualAttributes; } + + wxRichTextBuffer* m_buffer; + bool m_enableVirtualAttributes; +}; + +/** + @class wxRichTextObject + + This is the base for drawable rich text objects. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextObject: public wxObject +{ + DECLARE_CLASS(wxRichTextObject) +public: + /** + Constructor, taking an optional parent pointer. + */ + wxRichTextObject(wxRichTextObject* parent = NULL); + + virtual ~wxRichTextObject(); + +// Overridables + + /** + Draw the item, within the given range. Some objects may ignore the range (for + example paragraphs) while others must obey it (lines, to implement wrapping) + */ + virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style) = 0; + + /** + Lay the item out at the specified position with the given size constraint. + Layout must set the cached size. @rect is the available space for the object, + and @a parentRect is the container that is used to determine a relative size + or position (for example if a text box must be 50% of the parent text box). + */ + virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) = 0; + + /** + Hit-testing: returns a flag indicating hit test details, plus + information about position. @a contextObj is returned to specify what object + position is relevant to, since otherwise there's an ambiguity. + @ obj might not be a child of @a contextObj, since we may be referring to the container itself + if we have no hit on a child - for example if we click outside an object. + + The function puts the position in @a textPosition if one is found. + @a pt is in logical units (a zero y position is at the beginning of the buffer). + + Pass wxRICHTEXT_HITTEST_NO_NESTED_OBJECTS if you only want to consider objects + directly under the object you are calling HitTest on. Otherwise, it will recurse + and potentially find a nested object. + + @return One of the ::wxRichTextHitTestFlags values. + */ + + virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0); + + /** + Finds the absolute position and row height for the given character position. + */ + virtual bool FindPosition(wxDC& WXUNUSED(dc), wxRichTextDrawingContext& WXUNUSED(context), long WXUNUSED(index), wxPoint& WXUNUSED(pt), int* WXUNUSED(height), bool WXUNUSED(forceLineStart)) { return false; } + + /** + Returns the best size, i.e. the ideal starting size for this object irrespective + of available space. For a short text string, it will be the size that exactly encloses + the text. For a longer string, it might use the parent width for example. + */ + virtual wxSize GetBestSize() const { return m_size; } + + /** + Returns the object size for the given range. Returns @false if the range + is invalid for this object. + */ + + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = NULL) const = 0; + + /** + Do a split from @a pos, returning an object containing the second part, and setting + the first part in 'this'. + */ + virtual wxRichTextObject* DoSplit(long WXUNUSED(pos)) { return NULL; } + + /** + Calculates the range of the object. By default, guess that the object is 1 unit long. + */ + virtual void CalculateRange(long start, long& end) { end = start ; m_range.SetRange(start, end); } + + /** + Deletes the given range. + */ + virtual bool DeleteRange(const wxRichTextRange& WXUNUSED(range)) { return false; } + + /** + Returns @true if the object is empty. + */ + virtual bool IsEmpty() const { return false; } + + /** + Returns @true if this class of object is floatable. + */ + virtual bool IsFloatable() const { return false; } + + /** + Returns @true if this object is currently floating. + */ + virtual bool IsFloating() const { return GetAttributes().GetTextBoxAttr().IsFloating(); } + + /** + Returns the floating direction. + */ + virtual int GetFloatDirection() const { return GetAttributes().GetTextBoxAttr().GetFloatMode(); } + + /** + Returns any text in this object for the given range. + */ + virtual wxString GetTextForRange(const wxRichTextRange& WXUNUSED(range)) const { return wxEmptyString; } + + /** + Returns @true if this object can merge itself with the given one. + */ + virtual bool CanMerge(wxRichTextObject* WXUNUSED(object), wxRichTextDrawingContext& WXUNUSED(context)) const { return false; } + + /** + Returns @true if this object merged itself with the given one. + The calling code will then delete the given object. + */ + virtual bool Merge(wxRichTextObject* WXUNUSED(object), wxRichTextDrawingContext& WXUNUSED(context)) { return false; } + + /** + JACS + Returns @true if this object can potentially be split, by virtue of having + different virtual attributes for individual sub-objects. + */ + virtual bool CanSplit(wxRichTextDrawingContext& WXUNUSED(context)) const { return false; } + + /** + Returns the final object in the split objects if this object was split due to differences between sub-object virtual attributes. + Returns itself if it was not split. + */ + virtual wxRichTextObject* Split(wxRichTextDrawingContext& WXUNUSED(context)) { return this; } + + /** + Dump object data to the given output stream for debugging. + */ + virtual void Dump(wxTextOutputStream& stream); + + /** + Returns @true if we can edit the object's properties via a GUI. + */ + virtual bool CanEditProperties() const { return false; } + + /** + Edits the object's properties via a GUI. + */ + virtual bool EditProperties(wxWindow* WXUNUSED(parent), wxRichTextBuffer* WXUNUSED(buffer)) { return false; } + + /** + Returns the label to be used for the properties context menu item. + */ + virtual wxString GetPropertiesMenuLabel() const { return wxEmptyString; } + + /** + Returns @true if objects of this class can accept the focus, i.e. a call to SetFocusObject + is possible. For example, containers supporting text, such as a text box object, can accept the focus, + but a table can't (set the focus to individual cells instead). + */ + virtual bool AcceptsFocus() const { return false; } + +#if wxUSE_XML + /** + Imports this object from XML. + */ + virtual bool ImportFromXML(wxRichTextBuffer* buffer, wxXmlNode* node, wxRichTextXMLHandler* handler, bool* recurse); +#endif + +#if wxRICHTEXT_HAVE_DIRECT_OUTPUT + /** + Exports this object directly to the given stream, bypassing the creation of a wxXmlNode hierarchy. + This method is considerably faster than creating a tree first. However, both versions of ExportXML must be + implemented so that if the tree method is made efficient in the future, we can deprecate the + more verbose direct output method. Compiled only if wxRICHTEXT_HAVE_DIRECT_OUTPUT is defined (on by default). + */ + virtual bool ExportXML(wxOutputStream& stream, int indent, wxRichTextXMLHandler* handler); +#endif + +#if wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT + /** + Exports this object to the given parent node, usually creating at least one child node. + This method is less efficient than the direct-to-stream method but is retained to allow for + switching to this method if we make it more efficient. Compiled only if wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT is defined + (on by default). + */ + virtual bool ExportXML(wxXmlNode* parent, wxRichTextXMLHandler* handler); +#endif + + /** + Returns @true if this object takes note of paragraph attributes (text and image objects don't). + */ + virtual bool UsesParagraphAttributes() const { return true; } + + /** + Returns the XML node name of this object. This must be overridden for wxXmlNode-base XML export to work. + */ + virtual wxString GetXMLNodeName() const { return wxT("unknown"); } + + /** + Invalidates the object at the given range. With no argument, invalidates the whole object. + */ + virtual void Invalidate(const wxRichTextRange& invalidRange = wxRICHTEXT_ALL); + + /** + Returns @true if this object can handle the selections of its children, fOr example a table. + Required for composite selection handling to work. + */ + virtual bool HandlesChildSelections() const { return false; } + + /** + Returns a selection object specifying the selections between start and end character positions. + For example, a table would deduce what cells (of range length 1) are selected when dragging across the table. + */ + virtual wxRichTextSelection GetSelection(long WXUNUSED(start), long WXUNUSED(end)) const { return wxRichTextSelection(); } + +// Accessors + + /** + Gets the cached object size as calculated by Layout. + */ + virtual wxSize GetCachedSize() const { return m_size; } + + /** + Sets the cached object size as calculated by Layout. + */ + virtual void SetCachedSize(const wxSize& sz) { m_size = sz; } + + /** + Gets the maximum object size as calculated by Layout. This allows + us to fit an object to its contents or allocate extra space if required. + */ + virtual wxSize GetMaxSize() const { return m_maxSize; } + + /** + Sets the maximum object size as calculated by Layout. This allows + us to fit an object to its contents or allocate extra space if required. + */ + virtual void SetMaxSize(const wxSize& sz) { m_maxSize = sz; } + + /** + Gets the minimum object size as calculated by Layout. This allows + us to constrain an object to its absolute minimum size if necessary. + */ + virtual wxSize GetMinSize() const { return m_minSize; } + + /** + Sets the minimum object size as calculated by Layout. This allows + us to constrain an object to its absolute minimum size if necessary. + */ + virtual void SetMinSize(const wxSize& sz) { m_minSize = sz; } + + /** + Gets the 'natural' size for an object. For an image, it would be the + image size. + */ + virtual wxTextAttrSize GetNaturalSize() const { return wxTextAttrSize(); } + + /** + Returns the object position in pixels. + */ + virtual wxPoint GetPosition() const { return m_pos; } + + /** + Sets the object position in pixels. + */ + virtual void SetPosition(const wxPoint& pos) { m_pos = pos; } + + /** + Returns the absolute object position, by traversing up the child/parent hierarchy. + TODO: may not be needed, if all object positions are in fact relative to the + top of the coordinate space. + */ + virtual wxPoint GetAbsolutePosition() const; + + /** + Returns the rectangle enclosing the object. + */ + virtual wxRect GetRect() const { return wxRect(GetPosition(), GetCachedSize()); } + + /** + Sets the object's range within its container. + */ + void SetRange(const wxRichTextRange& range) { m_range = range; } + + /** + Returns the object's range. + */ + const wxRichTextRange& GetRange() const { return m_range; } + + /** + Returns the object's range. + */ + wxRichTextRange& GetRange() { return m_range; } + + /** + Set the object's own range, for a top-level object with its own position space. + */ + void SetOwnRange(const wxRichTextRange& range) { m_ownRange = range; } + + /** + Returns the object's own range (valid if top-level). + */ + const wxRichTextRange& GetOwnRange() const { return m_ownRange; } + + /** + Returns the object's own range (valid if top-level). + */ + wxRichTextRange& GetOwnRange() { return m_ownRange; } + + /** + Returns the object's own range only if a top-level object. + */ + wxRichTextRange GetOwnRangeIfTopLevel() const { return IsTopLevel() ? m_ownRange : m_range; } + + /** + Returns @true if this object is composite. + */ + virtual bool IsComposite() const { return false; } + + /** + Returns @true if no user editing can be done inside the object. This returns @true for simple objects, + @false for most composite objects, but @true for fields, which if composite, should not be user-edited. + */ + virtual bool IsAtomic() const { return true; } + + /** + Returns a pointer to the parent object. + */ + virtual wxRichTextObject* GetParent() const { return m_parent; } + + /** + Sets the pointer to the parent object. + */ + virtual void SetParent(wxRichTextObject* parent) { m_parent = parent; } + + /** + Returns the top-level container of this object. + May return itself if it's a container; use GetParentContainer to return + a different container. + */ + virtual wxRichTextParagraphLayoutBox* GetContainer() const; + + /** + Returns the top-level container of this object. + Returns a different container than itself, unless there's no parent, in which case it will return NULL. + */ + virtual wxRichTextParagraphLayoutBox* GetParentContainer() const { return GetParent() ? GetParent()->GetContainer() : GetContainer(); } + + /** + Set the margin around the object, in pixels. + */ + virtual void SetMargins(int margin); + + /** + Set the margin around the object, in pixels. + */ + virtual void SetMargins(int leftMargin, int rightMargin, int topMargin, int bottomMargin); + + /** + Returns the left margin of the object, in pixels. + */ + virtual int GetLeftMargin() const; + + /** + Returns the right margin of the object, in pixels. + */ + virtual int GetRightMargin() const; + + /** + Returns the top margin of the object, in pixels. + */ + virtual int GetTopMargin() const; + + /** + Returns the bottom margin of the object, in pixels. + */ + virtual int GetBottomMargin() const; + + /** + Calculates the available content space in the given rectangle, given the + margins, border and padding specified in the object's attributes. + */ + virtual wxRect GetAvailableContentArea(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& outerRect) const; + + /** + Lays out the object first with a given amount of space, and then if no width was specified in attr, + lays out the object again using the minimum size. @a availableParentSpace is the maximum space + for the object, whereas @a availableContainerSpace is the container with which relative positions and + sizes should be computed. For example, a text box whose space has already been constrained + in a previous layout pass to @a availableParentSpace, but should have a width of 50% of @a availableContainerSpace. + (If these two rects were the same, a 2nd pass could see the object getting too small.) + */ + virtual bool LayoutToBestSize(wxDC& dc, wxRichTextDrawingContext& context, wxRichTextBuffer* buffer, + const wxRichTextAttr& parentAttr, const wxRichTextAttr& attr, + const wxRect& availableParentSpace, const wxRect& availableContainerSpace, int style); + + /** + Adjusts the attributes for virtual attribute provision, collapsed borders, etc. + */ + virtual bool AdjustAttributes(wxRichTextAttr& attr, wxRichTextDrawingContext& context); + + /** + Sets the object's attributes. + */ + void SetAttributes(const wxRichTextAttr& attr) { m_attributes = attr; } + + /** + Returns the object's attributes. + */ + const wxRichTextAttr& GetAttributes() const { return m_attributes; } + + /** + Returns the object's attributes. + */ + wxRichTextAttr& GetAttributes() { return m_attributes; } + + /** + Returns the object's properties. + */ + wxRichTextProperties& GetProperties() { return m_properties; } + + /** + Returns the object's properties. + */ + const wxRichTextProperties& GetProperties() const { return m_properties; } + + /** + Sets the object's properties. + */ + void SetProperties(const wxRichTextProperties& props) { m_properties = props; } + + /** + Sets the stored descent value. + */ + void SetDescent(int descent) { m_descent = descent; } + + /** + Returns the stored descent value. + */ + int GetDescent() const { return m_descent; } + + /** + Returns the containing buffer. + */ + wxRichTextBuffer* GetBuffer() const; + + /** + Sets the identifying name for this object as a property using the "name" key. + */ + void SetName(const wxString& name) { m_properties.SetProperty(wxT("name"), name); } + + /** + Returns the identifying name for this object from the properties, using the "name" key. + */ + wxString GetName() const { return m_properties.GetPropertyString(wxT("name")); } + + /** + Returns @true if this object is top-level, i.e. contains its own paragraphs, such as a text box. + */ + virtual bool IsTopLevel() const { return false; } + + /** + Returns @true if the object will be shown, @false otherwise. + */ + bool IsShown() const { return m_show; } + +// Operations + + /** + Call to show or hide this object. This function does not cause the content to be + laid out or redrawn. + */ + virtual void Show(bool show) { m_show = show; } + + /** + Clones the object. + */ + virtual wxRichTextObject* Clone() const { return NULL; } + + /** + Copies the object. + */ + void Copy(const wxRichTextObject& obj); + + /** + Reference-counting allows us to use the same object in multiple + lists (not yet used). + */ + + void Reference() { m_refCount ++; } + + /** + Reference-counting allows us to use the same object in multiple + lists (not yet used). + */ + void Dereference(); + + /** + Moves the object recursively, by adding the offset from old to new. + */ + virtual void Move(const wxPoint& pt); + + /** + Converts units in tenths of a millimetre to device units. + */ + int ConvertTenthsMMToPixels(wxDC& dc, int units) const; + + /** + Converts units in tenths of a millimetre to device units. + */ + static int ConvertTenthsMMToPixels(int ppi, int units, double scale = 1.0); + + /** + Convert units in pixels to tenths of a millimetre. + */ + int ConvertPixelsToTenthsMM(wxDC& dc, int pixels) const; + + /** + Convert units in pixels to tenths of a millimetre. + */ + static int ConvertPixelsToTenthsMM(int ppi, int pixels, double scale = 1.0); + + /** + Draws the borders and background for the given rectangle and attributes. + @a boxRect is taken to be the outer margin box, not the box around the content. + */ + static bool DrawBoxAttributes(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& attr, const wxRect& boxRect, int flags = 0, wxRichTextObject* obj = NULL); + + /** + Draws a border. + */ + static bool DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxTextAttrBorders& attr, const wxRect& rect, int flags = 0); + + /** + Returns the various rectangles of the box model in pixels. You can either specify @a contentRect (inner) + or @a marginRect (outer), and the other must be the default rectangle (no width or height). + Note that the outline doesn't affect the position of the rectangle, it's drawn in whatever space + is available. + */ + static bool GetBoxRects(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& attr, wxRect& marginRect, wxRect& borderRect, wxRect& contentRect, wxRect& paddingRect, wxRect& outlineRect); + + /** + Returns the total margin for the object in pixels, taking into account margin, padding and border size. + */ + static bool GetTotalMargin(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& attr, int& leftMargin, int& rightMargin, + int& topMargin, int& bottomMargin); + + /** + Returns the rectangle which the child has available to it given restrictions specified in the + child attribute, e.g. 50% width of the parent, 400 pixels, x position 20% of the parent, etc. + availableContainerSpace might be a parent that the cell has to compute its width relative to. + E.g. a cell that's 50% of its parent. + */ + static wxRect AdjustAvailableSpace(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& parentAttr, const wxRichTextAttr& childAttr, + const wxRect& availableParentSpace, const wxRect& availableContainerSpace); + +protected: + wxSize m_size; + wxSize m_maxSize; + wxSize m_minSize; + wxPoint m_pos; + int m_descent; // Descent for this object (if any) + int m_refCount; + bool m_show; + wxRichTextObject* m_parent; + + // The range of this object (start position to end position) + wxRichTextRange m_range; + + // The internal range of this object, if it's a top-level object with its own range space + wxRichTextRange m_ownRange; + + // Attributes + wxRichTextAttr m_attributes; + + // Properties + wxRichTextProperties m_properties; +}; + +WX_DECLARE_LIST_WITH_DECL( wxRichTextObject, wxRichTextObjectList, class WXDLLIMPEXP_RICHTEXT ); + +/** + @class wxRichTextCompositeObject + + Objects of this class can contain other objects. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextObject, wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextCompositeObject: public wxRichTextObject +{ + DECLARE_CLASS(wxRichTextCompositeObject) +public: +// Constructors + + wxRichTextCompositeObject(wxRichTextObject* parent = NULL); + virtual ~wxRichTextCompositeObject(); + +// Overridables + + virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0); + + virtual bool FindPosition(wxDC& dc, wxRichTextDrawingContext& context, long index, wxPoint& pt, int* height, bool forceLineStart); + + virtual void CalculateRange(long start, long& end); + + virtual bool DeleteRange(const wxRichTextRange& range); + + virtual wxString GetTextForRange(const wxRichTextRange& range) const; + + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = NULL) const; + + virtual void Dump(wxTextOutputStream& stream); + + virtual void Invalidate(const wxRichTextRange& invalidRange = wxRICHTEXT_ALL); + +// Accessors + + /** + Returns the children. + */ + wxRichTextObjectList& GetChildren() { return m_children; } + /** + Returns the children. + */ + const wxRichTextObjectList& GetChildren() const { return m_children; } + + /** + Returns the number of children. + */ + size_t GetChildCount() const ; + + /** + Returns the nth child. + */ + wxRichTextObject* GetChild(size_t n) const ; + + /** + Returns @true if this object is composite. + */ + virtual bool IsComposite() const { return true; } + + /** + Returns @true if no user editing can be done inside the object. This returns @true for simple objects, + @false for most composite objects, but @true for fields, which if composite, should not be user-edited. + */ + virtual bool IsAtomic() const { return false; } + + /** + Returns true if the buffer is empty. + */ + virtual bool IsEmpty() const { return GetChildCount() == 0; } + + /** + Returns the child object at the given character position. + */ + virtual wxRichTextObject* GetChildAtPosition(long pos) const; + +// Operations + + void Copy(const wxRichTextCompositeObject& obj); + + void operator= (const wxRichTextCompositeObject& obj) { Copy(obj); } + + /** + Appends a child, returning the position. + */ + size_t AppendChild(wxRichTextObject* child) ; + + /** + Inserts the child in front of the given object, or at the beginning. + */ + bool InsertChild(wxRichTextObject* child, wxRichTextObject* inFrontOf) ; + + /** + Removes and optionally deletes the specified child. + */ + bool RemoveChild(wxRichTextObject* child, bool deleteChild = false) ; + + /** + Deletes all the children. + */ + bool DeleteChildren() ; + + /** + Recursively merges all pieces that can be merged. + */ + bool Defragment(wxRichTextDrawingContext& context, const wxRichTextRange& range = wxRICHTEXT_ALL); + + /** + Moves the object recursively, by adding the offset from old to new. + */ + virtual void Move(const wxPoint& pt); + +protected: + wxRichTextObjectList m_children; +}; + +/** + @class wxRichTextParagraphLayoutBox + + This class knows how to lay out paragraphs. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextCompositeObject, wxRichTextObject, wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextParagraphLayoutBox: public wxRichTextCompositeObject +{ + DECLARE_DYNAMIC_CLASS(wxRichTextParagraphLayoutBox) +public: +// Constructors + + wxRichTextParagraphLayoutBox(wxRichTextObject* parent = NULL); + wxRichTextParagraphLayoutBox(const wxRichTextParagraphLayoutBox& obj): wxRichTextCompositeObject() { Init(); Copy(obj); } + ~wxRichTextParagraphLayoutBox(); + +// Overridables + + virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0); + + virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style); + + virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style); + + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = NULL) const; + + virtual bool DeleteRange(const wxRichTextRange& range); + + virtual wxString GetTextForRange(const wxRichTextRange& range) const; + +#if wxUSE_XML + virtual bool ImportFromXML(wxRichTextBuffer* buffer, wxXmlNode* node, wxRichTextXMLHandler* handler, bool* recurse); +#endif + +#if wxRICHTEXT_HAVE_DIRECT_OUTPUT + virtual bool ExportXML(wxOutputStream& stream, int indent, wxRichTextXMLHandler* handler); +#endif + +#if wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT + virtual bool ExportXML(wxXmlNode* parent, wxRichTextXMLHandler* handler); +#endif + + virtual wxString GetXMLNodeName() const { return wxT("paragraphlayout"); } + + virtual bool AcceptsFocus() const { return true; } + +// Accessors + + /** + Associates a control with the buffer, for operations that for example require refreshing the window. + */ + void SetRichTextCtrl(wxRichTextCtrl* ctrl) { m_ctrl = ctrl; } + + /** + Returns the associated control. + */ + wxRichTextCtrl* GetRichTextCtrl() const { return m_ctrl; } + + /** + Sets a flag indicating whether the last paragraph is partial or complete. + */ + void SetPartialParagraph(bool partialPara) { m_partialParagraph = partialPara; } + + /** + Returns a flag indicating whether the last paragraph is partial or complete. + */ + bool GetPartialParagraph() const { return m_partialParagraph; } + + /** + Returns the style sheet associated with the overall buffer. + */ + virtual wxRichTextStyleSheet* GetStyleSheet() const; + + virtual bool IsTopLevel() const { return true; } + +// Operations + + /** + Submits a command to insert paragraphs. + */ + bool InsertParagraphsWithUndo(wxRichTextBuffer* buffer, long pos, const wxRichTextParagraphLayoutBox& paragraphs, wxRichTextCtrl* ctrl, int flags = 0); + + /** + Submits a command to insert the given text. + */ + bool InsertTextWithUndo(wxRichTextBuffer* buffer, long pos, const wxString& text, wxRichTextCtrl* ctrl, int flags = 0); + + /** + Submits a command to insert the given text. + */ + bool InsertNewlineWithUndo(wxRichTextBuffer* buffer, long pos, wxRichTextCtrl* ctrl, int flags = 0); + + /** + Submits a command to insert the given image. + */ + bool InsertImageWithUndo(wxRichTextBuffer* buffer, long pos, const wxRichTextImageBlock& imageBlock, + wxRichTextCtrl* ctrl, int flags, const wxRichTextAttr& textAttr); + + /** + Submits a command to insert the given field. Field data can be included in properties. + + @see wxRichTextField, wxRichTextFieldType, wxRichTextFieldTypeStandard + */ + wxRichTextField* InsertFieldWithUndo(wxRichTextBuffer* buffer, long pos, const wxString& fieldType, + const wxRichTextProperties& properties, + wxRichTextCtrl* ctrl, int flags, + const wxRichTextAttr& textAttr); + + /** + Returns the style that is appropriate for a new paragraph at this position. + If the previous paragraph has a paragraph style name, looks up the next-paragraph + style. + */ + wxRichTextAttr GetStyleForNewParagraph(wxRichTextBuffer* buffer, long pos, bool caretPosition = false, bool lookUpNewParaStyle=false) const; + + /** + Inserts an object. + */ + wxRichTextObject* InsertObjectWithUndo(wxRichTextBuffer* buffer, long pos, wxRichTextObject *object, wxRichTextCtrl* ctrl, int flags = 0); + + /** + Submits a command to delete this range. + */ + bool DeleteRangeWithUndo(const wxRichTextRange& range, wxRichTextCtrl* ctrl, wxRichTextBuffer* buffer); + + /** + Draws the floating objects in this buffer. + */ + void DrawFloats(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style); + + /** + Moves an anchored object to another paragraph. + */ + void MoveAnchoredObjectToParagraph(wxRichTextParagraph* from, wxRichTextParagraph* to, wxRichTextObject* obj); + + /** + Initializes the object. + */ + void Init(); + + /** + Clears all the children. + */ + virtual void Clear(); + + /** + Clears and initializes with one blank paragraph. + */ + virtual void Reset(); + + /** + Convenience function to add a paragraph of text. + */ + virtual wxRichTextRange AddParagraph(const wxString& text, wxRichTextAttr* paraStyle = NULL); + + /** + Convenience function to add an image. + */ + virtual wxRichTextRange AddImage(const wxImage& image, wxRichTextAttr* paraStyle = NULL); + + /** + Adds multiple paragraphs, based on newlines. + */ + virtual wxRichTextRange AddParagraphs(const wxString& text, wxRichTextAttr* paraStyle = NULL); + + /** + Returns the line at the given position. If @a caretPosition is true, the position is + a caret position, which is normally a smaller number. + */ + virtual wxRichTextLine* GetLineAtPosition(long pos, bool caretPosition = false) const; + + /** + Returns the line at the given y pixel position, or the last line. + */ + virtual wxRichTextLine* GetLineAtYPosition(int y) const; + + /** + Returns the paragraph at the given character or caret position. + */ + virtual wxRichTextParagraph* GetParagraphAtPosition(long pos, bool caretPosition = false) const; + + /** + Returns the line size at the given position. + */ + virtual wxSize GetLineSizeAtPosition(long pos, bool caretPosition = false) const; + + /** + Given a position, returns the number of the visible line (potentially many to a paragraph), + starting from zero at the start of the buffer. We also have to pass a bool (@a startOfLine) + that indicates whether the caret is being shown at the end of the previous line or at the start + of the next, since the caret can be shown at two visible positions for the same underlying + position. + */ + virtual long GetVisibleLineNumber(long pos, bool caretPosition = false, bool startOfLine = false) const; + + /** + Given a line number, returns the corresponding wxRichTextLine object. + */ + virtual wxRichTextLine* GetLineForVisibleLineNumber(long lineNumber) const; + + /** + Returns the leaf object in a paragraph at this position. + */ + virtual wxRichTextObject* GetLeafObjectAtPosition(long position) const; + + /** + Returns the paragraph by number. + */ + virtual wxRichTextParagraph* GetParagraphAtLine(long paragraphNumber) const; + + /** + Returns the paragraph for a given line. + */ + virtual wxRichTextParagraph* GetParagraphForLine(wxRichTextLine* line) const; + + /** + Returns the length of the paragraph. + */ + virtual int GetParagraphLength(long paragraphNumber) const; + + /** + Returns the number of paragraphs. + */ + virtual int GetParagraphCount() const { return static_cast<int>(GetChildCount()); } + + /** + Returns the number of visible lines. + */ + virtual int GetLineCount() const; + + /** + Returns the text of the paragraph. + */ + virtual wxString GetParagraphText(long paragraphNumber) const; + + /** + Converts zero-based line column and paragraph number to a position. + */ + virtual long XYToPosition(long x, long y) const; + + /** + Converts a zero-based position to line column and paragraph number. + */ + virtual bool PositionToXY(long pos, long* x, long* y) const; + + /** + Sets the attributes for the given range. Pass flags to determine how the + attributes are set. + + The end point of range is specified as the last character position of the span + of text. So, for example, to set the style for a character at position 5, + use the range (5,5). + This differs from the wxRichTextCtrl API, where you would specify (5,6). + + @a flags may contain a bit list of the following values: + - wxRICHTEXT_SETSTYLE_NONE: no style flag. + - wxRICHTEXT_SETSTYLE_WITH_UNDO: specifies that this operation should be + undoable. + - wxRICHTEXT_SETSTYLE_OPTIMIZE: specifies that the style should not be applied + if the combined style at this point is already the style in question. + - wxRICHTEXT_SETSTYLE_PARAGRAPHS_ONLY: specifies that the style should only be + applied to paragraphs, and not the content. + This allows content styling to be preserved independently from that + of e.g. a named paragraph style. + - wxRICHTEXT_SETSTYLE_CHARACTERS_ONLY: specifies that the style should only be + applied to characters, and not the paragraph. + This allows content styling to be preserved independently from that + of e.g. a named paragraph style. + - wxRICHTEXT_SETSTYLE_RESET: resets (clears) the existing style before applying + the new style. + - wxRICHTEXT_SETSTYLE_REMOVE: removes the specified style. + Only the style flags are used in this operation. + */ + virtual bool SetStyle(const wxRichTextRange& range, const wxRichTextAttr& style, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO); + + /** + Sets the attributes for the given object only, for example the box attributes for a text box. + */ + virtual void SetStyle(wxRichTextObject *obj, const wxRichTextAttr& textAttr, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO); + + /** + Returns the combined text attributes for this position. + + This function gets the @e uncombined style - that is, the attributes associated + with the paragraph or character content, and not necessarily the combined + attributes you see on the screen. To get the combined attributes, use GetStyle(). + If you specify (any) paragraph attribute in @e style's flags, this function + will fetch the paragraph attributes. + Otherwise, it will return the character attributes. + */ + virtual bool GetStyle(long position, wxRichTextAttr& style); + + /** + Returns the content (uncombined) attributes for this position. + */ + virtual bool GetUncombinedStyle(long position, wxRichTextAttr& style); + + /** + Implementation helper for GetStyle. If combineStyles is true, combine base, paragraph and + context attributes. + */ + virtual bool DoGetStyle(long position, wxRichTextAttr& style, bool combineStyles = true); + + /** + This function gets a style representing the common, combined attributes in the + given range. + Attributes which have different values within the specified range will not be + included the style flags. + + The function is used to get the attributes to display in the formatting dialog: + the user can edit the attributes common to the selection, and optionally specify the + values of further attributes to be applied uniformly. + + To apply the edited attributes, you can use SetStyle() specifying + the wxRICHTEXT_SETSTYLE_OPTIMIZE flag, which will only apply attributes that + are different from the @e combined attributes within the range. + So, the user edits the effective, displayed attributes for the range, + but his choice won't be applied unnecessarily to content. As an example, + say the style for a paragraph specifies bold, but the paragraph text doesn't + specify a weight. + The combined style is bold, and this is what the user will see on-screen and + in the formatting dialog. The user now specifies red text, in addition to bold. + When applying with SetStyle(), the content font weight attributes won't be + changed to bold because this is already specified by the paragraph. + However the text colour attributes @e will be changed to show red. + */ + virtual bool GetStyleForRange(const wxRichTextRange& range, wxRichTextAttr& style); + + /** + Combines @a style with @a currentStyle for the purpose of summarising the attributes of a range of + content. + */ + bool CollectStyle(wxRichTextAttr& currentStyle, const wxRichTextAttr& style, wxRichTextAttr& clashingAttr, wxRichTextAttr& absentAttr); + + //@{ + /** + Sets the list attributes for the given range, passing flags to determine how + the attributes are set. + Either the style definition or the name of the style definition (in the current + sheet) can be passed. + + @a flags is a bit list of the following: + - wxRICHTEXT_SETSTYLE_WITH_UNDO: specifies that this command will be undoable. + - wxRICHTEXT_SETSTYLE_RENUMBER: specifies that numbering should start from + @a startFrom, otherwise existing attributes are used. + - wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL: specifies that @a listLevel should be used + as the level for all paragraphs, otherwise the current indentation will be used. + + @see NumberList(), PromoteList(), ClearListStyle(). + */ + virtual bool SetListStyle(const wxRichTextRange& range, wxRichTextListStyleDefinition* def, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1); + virtual bool SetListStyle(const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1); + //@} + + /** + Clears the list style from the given range, clearing list-related attributes + and applying any named paragraph style associated with each paragraph. + + @a flags is a bit list of the following: + - wxRICHTEXT_SETSTYLE_WITH_UNDO: specifies that this command will be undoable. + + @see SetListStyle(), PromoteList(), NumberList() + */ + virtual bool ClearListStyle(const wxRichTextRange& range, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO); + + //@{ + /** + Numbers the paragraphs in the given range. + + Pass flags to determine how the attributes are set. + Either the style definition or the name of the style definition (in the current + sheet) can be passed. + + @a flags is a bit list of the following: + - wxRICHTEXT_SETSTYLE_WITH_UNDO: specifies that this command will be undoable. + - wxRICHTEXT_SETSTYLE_RENUMBER: specifies that numbering should start from + @a startFrom, otherwise existing attributes are used. + - wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL: specifies that @a listLevel should be used + as the level for all paragraphs, otherwise the current indentation will be used. + + @a def can be NULL to indicate that the existing list style should be used. + + @see SetListStyle(), PromoteList(), ClearListStyle() + */ + virtual bool NumberList(const wxRichTextRange& range, wxRichTextListStyleDefinition* def = NULL, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1); + virtual bool NumberList(const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1); + //@} + + //@{ + /** + Promotes the list items within the given range. + A positive @a promoteBy produces a smaller indent, and a negative number + produces a larger indent. Pass flags to determine how the attributes are set. + Either the style definition or the name of the style definition (in the current + sheet) can be passed. + + @a flags is a bit list of the following: + - wxRICHTEXT_SETSTYLE_WITH_UNDO: specifies that this command will be undoable. + - wxRICHTEXT_SETSTYLE_RENUMBER: specifies that numbering should start from + @a startFrom, otherwise existing attributes are used. + - wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL: specifies that @a listLevel should be used + as the level for all paragraphs, otherwise the current indentation will be used. + + @see SetListStyle(), SetListStyle(), ClearListStyle() + */ + virtual bool PromoteList(int promoteBy, const wxRichTextRange& range, wxRichTextListStyleDefinition* def = NULL, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int specifiedLevel = -1); + virtual bool PromoteList(int promoteBy, const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int specifiedLevel = -1); + //@} + + /** + Helper for NumberList and PromoteList, that does renumbering and promotion simultaneously + @a def can be NULL/empty to indicate that the existing list style should be used. + */ + virtual bool DoNumberList(const wxRichTextRange& range, const wxRichTextRange& promotionRange, int promoteBy, wxRichTextListStyleDefinition* def, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1); + + /** + Fills in the attributes for numbering a paragraph after previousParagraph. + */ + virtual bool FindNextParagraphNumber(wxRichTextParagraph* previousParagraph, wxRichTextAttr& attr) const; + + /** + Sets the properties for the given range, passing flags to determine how the + attributes are set. You can merge properties or replace them. + + The end point of range is specified as the last character position of the span + of text, plus one. So, for example, to set the properties for a character at + position 5, use the range (5,6). + + @a flags may contain a bit list of the following values: + - wxRICHTEXT_SETPROPERTIES_NONE: no flag. + - wxRICHTEXT_SETPROPERTIES_WITH_UNDO: specifies that this operation should be + undoable. + - wxRICHTEXT_SETPROPERTIES_PARAGRAPHS_ONLY: specifies that the properties should only be + applied to paragraphs, and not the content. + - wxRICHTEXT_SETPROPERTIES_CHARACTERS_ONLY: specifies that the properties should only be + applied to characters, and not the paragraph. + - wxRICHTEXT_SETPROPERTIES_RESET: resets (clears) the existing properties before applying + the new properties. + - wxRICHTEXT_SETPROPERTIES_REMOVE: removes the specified properties. + */ + virtual bool SetProperties(const wxRichTextRange& range, const wxRichTextProperties& properties, int flags = wxRICHTEXT_SETPROPERTIES_WITH_UNDO); + + /** + Sets with undo the properties for the given object. + */ + virtual bool SetObjectPropertiesWithUndo(wxRichTextObject& obj, const wxRichTextProperties& properties, wxRichTextObject* objToSet = NULL); + + /** + Test if this whole range has character attributes of the specified kind. If any + of the attributes are different within the range, the test fails. You + can use this to implement, for example, bold button updating. style must have + flags indicating which attributes are of interest. + */ + virtual bool HasCharacterAttributes(const wxRichTextRange& range, const wxRichTextAttr& style) const; + + /** + Test if this whole range has paragraph attributes of the specified kind. If any + of the attributes are different within the range, the test fails. You + can use this to implement, for example, centering button updating. style must have + flags indicating which attributes are of interest. + */ + virtual bool HasParagraphAttributes(const wxRichTextRange& range, const wxRichTextAttr& style) const; + + virtual wxRichTextObject* Clone() const { return new wxRichTextParagraphLayoutBox(*this); } + + /** + Prepares the content just before insertion (or after buffer reset). + Currently is only called if undo mode is on. + */ + virtual void PrepareContent(wxRichTextParagraphLayoutBox& container); + + /** + Insert fragment into this box at the given position. If partialParagraph is true, + it is assumed that the last (or only) paragraph is just a piece of data with no paragraph + marker. + */ + virtual bool InsertFragment(long position, wxRichTextParagraphLayoutBox& fragment); + + /** + Make a copy of the fragment corresponding to the given range, putting it in @a fragment. + */ + virtual bool CopyFragment(const wxRichTextRange& range, wxRichTextParagraphLayoutBox& fragment); + + /** + Apply the style sheet to the buffer, for example if the styles have changed. + */ + virtual bool ApplyStyleSheet(wxRichTextStyleSheet* styleSheet); + + void Copy(const wxRichTextParagraphLayoutBox& obj); + + void operator= (const wxRichTextParagraphLayoutBox& obj) { Copy(obj); } + + /** + Calculate ranges. + */ + virtual void UpdateRanges(); + + /** + Get all the text. + */ + virtual wxString GetText() const; + + /** + Sets the default style, affecting the style currently being applied + (for example, setting the default style to bold will cause subsequently + inserted text to be bold). + + This is not cumulative - setting the default style will replace the previous + default style. + + Setting it to a default attribute object makes new content take on the 'basic' style. + */ + virtual bool SetDefaultStyle(const wxRichTextAttr& style); + + /** + Returns the current default style, affecting the style currently being applied + (for example, setting the default style to bold will cause subsequently + inserted text to be bold). + */ + virtual const wxRichTextAttr& GetDefaultStyle() const { return m_defaultAttributes; } + + /** + Sets the basic (overall) style. This is the style of the whole + buffer before further styles are applied, unlike the default style, which + only affects the style currently being applied (for example, setting the default + style to bold will cause subsequently inserted text to be bold). + */ + virtual void SetBasicStyle(const wxRichTextAttr& style) { m_attributes = style; } + + /** + Returns the basic (overall) style. + + This is the style of the whole buffer before further styles are applied, + unlike the default style, which only affects the style currently being + applied (for example, setting the default style to bold will cause + subsequently inserted text to be bold). + */ + virtual const wxRichTextAttr& GetBasicStyle() const { return m_attributes; } + + /** + Invalidates the buffer. With no argument, invalidates whole buffer. + */ + virtual void Invalidate(const wxRichTextRange& invalidRange = wxRICHTEXT_ALL); + + /** + Do the (in)validation for this object only. + */ + virtual void DoInvalidate(const wxRichTextRange& invalidRange); + + /** + Do the (in)validation both up and down the hierarchy. + */ + virtual void InvalidateHierarchy(const wxRichTextRange& invalidRange = wxRICHTEXT_ALL); + + /** + Gather information about floating objects. If untilObj is non-NULL, + will stop getting information if the current object is this, since we + will collect the rest later. + */ + virtual bool UpdateFloatingObjects(const wxRect& availableRect, wxRichTextObject* untilObj = NULL); + + /** + Get invalid range, rounding to entire paragraphs if argument is true. + */ + wxRichTextRange GetInvalidRange(bool wholeParagraphs = false) const; + + /** + Returns @true if this object needs layout. + */ + bool IsDirty() const { return m_invalidRange != wxRICHTEXT_NONE; } + + /** + Returns the wxRichTextFloatCollector of this object. + */ + wxRichTextFloatCollector* GetFloatCollector() { return m_floatCollector; } + + /** + Returns the number of floating objects at this level. + */ + int GetFloatingObjectCount() const; + + /** + Returns a list of floating objects. + */ + bool GetFloatingObjects(wxRichTextObjectList& objects) const; + +protected: + wxRichTextCtrl* m_ctrl; + wxRichTextAttr m_defaultAttributes; + + // The invalidated range that will need full layout + wxRichTextRange m_invalidRange; + + // Is the last paragraph partial or complete? + bool m_partialParagraph; + + // The floating layout state + wxRichTextFloatCollector* m_floatCollector; +}; + +/** + @class wxRichTextBox + + This class implements a floating or inline text box, containing paragraphs. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextParagraphLayoutBox, wxRichTextObject, wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextBox: public wxRichTextParagraphLayoutBox +{ + DECLARE_DYNAMIC_CLASS(wxRichTextBox) +public: +// Constructors + + /** + Default constructor; optionally pass the parent object. + */ + + wxRichTextBox(wxRichTextObject* parent = NULL); + + /** + Copy constructor. + */ + + wxRichTextBox(const wxRichTextBox& obj): wxRichTextParagraphLayoutBox() { Copy(obj); } + +// Overridables + + virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style); + + virtual wxString GetXMLNodeName() const { return wxT("textbox"); } + + virtual bool CanEditProperties() const { return true; } + + virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer); + + virtual wxString GetPropertiesMenuLabel() const { return wxGetTranslation("&Box"); } + +// Accessors + +// Operations + + virtual wxRichTextObject* Clone() const { return new wxRichTextBox(*this); } + + void Copy(const wxRichTextBox& obj); + +protected: +}; + +/** + @class wxRichTextField + + This class implements the general concept of a field, an object that represents + additional functionality such as a footnote, a bookmark, a page number, a table + of contents, and so on. Extra information (such as a bookmark name) can be stored + in the object properties. + + Drawing, layout, and property editing is delegated to classes derived + from wxRichTextFieldType, such as instances of wxRichTextFieldTypeStandard; this makes + the use of fields an efficient method of introducing extra functionality, since + most of the information required to draw a field (such as a bitmap) is kept centrally + in a single field type definition. + + The FieldType property, accessed by SetFieldType/GetFieldType, is used to retrieve + the field type definition. So be careful not to overwrite this property. + + wxRichTextField is derived from wxRichTextParagraphLayoutBox, which means that it + can contain its own read-only content, refreshed when the application calls the UpdateField + function. Whether a field is treated as a composite or a single graphic is determined + by the field type definition. If using wxRichTextFieldTypeStandard, passing the display + type wxRICHTEXT_FIELD_STYLE_COMPOSITE to the field type definition causes the field + to behave like a composite; the other display styles display a simple graphic. + When implementing a composite field, you will still need to derive from wxRichTextFieldTypeStandard + or wxRichTextFieldType, if only to implement UpdateField to refresh the field content + appropriately. wxRichTextFieldTypeStandard is only one possible implementation, but + covers common needs especially for simple, static fields using text or a bitmap. + + Register field types on application initialisation with the static function + wxRichTextBuffer::AddFieldType. They will be deleted automatically on + application exit. + + An application can write a field to a control with wxRichTextCtrl::WriteField, + taking a field type, the properties for the field, and optional attributes. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextFieldTypeStandard, wxRichTextFieldType, wxRichTextParagraphLayoutBox, wxRichTextProperties, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextField: public wxRichTextParagraphLayoutBox +{ + DECLARE_DYNAMIC_CLASS(wxRichTextField) +public: +// Constructors + + /** + Default constructor; optionally pass the parent object. + */ + + wxRichTextField(const wxString& fieldType = wxEmptyString, wxRichTextObject* parent = NULL); + + /** + Copy constructor. + */ + + wxRichTextField(const wxRichTextField& obj): wxRichTextParagraphLayoutBox() { Copy(obj); } + +// Overridables + + virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style); + + virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style); + + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = NULL) const; + + virtual wxString GetXMLNodeName() const { return wxT("field"); } + + virtual bool CanEditProperties() const; + + virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer); + + virtual wxString GetPropertiesMenuLabel() const; + + virtual bool AcceptsFocus() const { return false; } + + virtual void CalculateRange(long start, long& end); + + /** + If a field has children, we don't want the user to be able to edit it. + */ + virtual bool IsAtomic() const { return true; } + + virtual bool IsEmpty() const { return false; } + + virtual bool IsTopLevel() const; + +// Accessors + + void SetFieldType(const wxString& fieldType) { GetProperties().SetProperty(wxT("FieldType"), fieldType); } + wxString GetFieldType() const { return GetProperties().GetPropertyString(wxT("FieldType")); } + +// Operations + + /** + Update the field; delegated to the associated field type. This would typically expand the field to its value, + if this is a dynamically changing and/or composite field. + */ + virtual bool UpdateField(wxRichTextBuffer* buffer); + + virtual wxRichTextObject* Clone() const { return new wxRichTextField(*this); } + + void Copy(const wxRichTextField& obj); + +protected: +}; + +/** + @class wxRichTextFieldType + + The base class for custom field types. Each type definition handles one + field type. Override functions to provide drawing, layout, updating and + property editing functionality for a field. + + Register field types on application initialisation with the static function + wxRichTextBuffer::AddFieldType. They will be deleted automatically on + application exit. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextFieldTypeStandard, wxRichTextField, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextFieldType: public wxObject +{ + DECLARE_CLASS(wxRichTextFieldType) +public: + /** + Creates a field type definition. + */ + wxRichTextFieldType(const wxString& name = wxEmptyString) + : m_name(name) + { } + + /** + Copy constructor. + */ + wxRichTextFieldType(const wxRichTextFieldType& fieldType) + : wxObject(fieldType) + { Copy(fieldType); } + + void Copy(const wxRichTextFieldType& fieldType) { m_name = fieldType.m_name; } + + /** + Draw the item, within the given range. Some objects may ignore the range (for + example paragraphs) while others must obey it (lines, to implement wrapping) + */ + virtual bool Draw(wxRichTextField* obj, wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style) = 0; + + /** + Lay the item out at the specified position with the given size constraint. + Layout must set the cached size. @rect is the available space for the object, + and @a parentRect is the container that is used to determine a relative size + or position (for example if a text box must be 50% of the parent text box). + */ + virtual bool Layout(wxRichTextField* obj, wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) = 0; + + /** + Returns the object size for the given range. Returns @false if the range + is invalid for this object. + */ + virtual bool GetRangeSize(wxRichTextField* obj, const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = NULL) const = 0; + + /** + Returns @true if we can edit the object's properties via a GUI. + */ + virtual bool CanEditProperties(wxRichTextField* WXUNUSED(obj)) const { return false; } + + /** + Edits the object's properties via a GUI. + */ + virtual bool EditProperties(wxRichTextField* WXUNUSED(obj), wxWindow* WXUNUSED(parent), wxRichTextBuffer* WXUNUSED(buffer)) { return false; } + + /** + Returns the label to be used for the properties context menu item. + */ + virtual wxString GetPropertiesMenuLabel(wxRichTextField* WXUNUSED(obj)) const { return wxEmptyString; } + + /** + Update the field. This would typically expand the field to its value, + if this is a dynamically changing and/or composite field. + */ + virtual bool UpdateField(wxRichTextBuffer* WXUNUSED(buffer), wxRichTextField* WXUNUSED(obj)) { return false; } + + /** + Returns @true if this object is top-level, i.e. contains its own paragraphs, such as a text box. + */ + virtual bool IsTopLevel(wxRichTextField* WXUNUSED(obj)) const { return true; } + + /** + Sets the field type name. There should be a unique name per field type object. + */ + void SetName(const wxString& name) { m_name = name; } + + /** + Returns the field type name. There should be a unique name per field type object. + */ + wxString GetName() const { return m_name; } + +protected: + + wxString m_name; +}; + +WX_DECLARE_STRING_HASH_MAP(wxRichTextFieldType*, wxRichTextFieldTypeHashMap); + +/** + @class wxRichTextFieldTypeStandard + + A field type that can handle fields with text or bitmap labels, with a small range + of styles for implementing rectangular fields and fields that can be used for start + and end tags. + + The border, text and background colours can be customised; the default is + white text on a black background. + + The following display styles can be used. + + @beginStyleTable + @style{wxRICHTEXT_FIELD_STYLE_COMPOSITE} + Creates a composite field; you will probably need to derive a new class to implement UpdateField. + @style{wxRICHTEXT_FIELD_STYLE_RECTANGLE} + Shows a rounded rectangle background. + @style{wxRICHTEXT_FIELD_STYLE_NO_BORDER} + Suppresses the background and border; mostly used with a bitmap label. + @style{wxRICHTEXT_FIELD_STYLE_START_TAG} + Shows a start tag background, with the pointy end facing right. + @style{wxRICHTEXT_FIELD_STYLE_END_TAG} + Shows an end tag background, with the pointy end facing left. + @endStyleTable + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextFieldType, wxRichTextField, wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextFieldTypeStandard: public wxRichTextFieldType +{ + DECLARE_CLASS(wxRichTextFieldTypeStandard) +public: + + // Display style types + enum { wxRICHTEXT_FIELD_STYLE_COMPOSITE = 0x01, + wxRICHTEXT_FIELD_STYLE_RECTANGLE = 0x02, + wxRICHTEXT_FIELD_STYLE_NO_BORDER = 0x04, + wxRICHTEXT_FIELD_STYLE_START_TAG = 0x08, + wxRICHTEXT_FIELD_STYLE_END_TAG = 0x10 + }; + + /** + Constructor, creating a field type definition with a text label. + + @param parent + The name of the type definition. This must be unique, and is the type + name used when adding a field to a control. + @param label + The text label to be shown on the field. + @param displayStyle + The display style: one of wxRICHTEXT_FIELD_STYLE_RECTANGLE, + wxRICHTEXT_FIELD_STYLE_NO_BORDER, wxRICHTEXT_FIELD_STYLE_START_TAG, + wxRICHTEXT_FIELD_STYLE_END_TAG. + + */ + wxRichTextFieldTypeStandard(const wxString& name, const wxString& label, int displayStyle = wxRICHTEXT_FIELD_STYLE_RECTANGLE); + + /** + Constructor, creating a field type definition with a bitmap label. + + @param parent + The name of the type definition. This must be unique, and is the type + name used when adding a field to a control. + @param label + The bitmap label to be shown on the field. + @param displayStyle + The display style: one of wxRICHTEXT_FIELD_STYLE_RECTANGLE, + wxRICHTEXT_FIELD_STYLE_NO_BORDER, wxRICHTEXT_FIELD_STYLE_START_TAG, + wxRICHTEXT_FIELD_STYLE_END_TAG. + + */ + wxRichTextFieldTypeStandard(const wxString& name, const wxBitmap& bitmap, int displayStyle = wxRICHTEXT_FIELD_STYLE_NO_BORDER); + + /** + The default constructor. + + */ + wxRichTextFieldTypeStandard() { Init(); } + + /** + The copy constructor. + + */ + wxRichTextFieldTypeStandard(const wxRichTextFieldTypeStandard& field) + : wxRichTextFieldType(field) + { Copy(field); } + + /** + Initialises the object. + */ + void Init(); + + /** + Copies the object. + */ + void Copy(const wxRichTextFieldTypeStandard& field); + + /** + The assignment operator. + */ + void operator=(const wxRichTextFieldTypeStandard& field) { Copy(field); } + + /** + Draw the item, within the given range. Some objects may ignore the range (for + example paragraphs) while others must obey it (lines, to implement wrapping) + */ + virtual bool Draw(wxRichTextField* obj, wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style); + + /** + Lay the item out at the specified position with the given size constraint. + Layout must set the cached size. @rect is the available space for the object, + and @a parentRect is the container that is used to determine a relative size + or position (for example if a text box must be 50% of the parent text box). + */ + virtual bool Layout(wxRichTextField* obj, wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style); + + /** + Returns the object size for the given range. Returns @false if the range + is invalid for this object. + */ + virtual bool GetRangeSize(wxRichTextField* obj, const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = NULL) const; + + /** + Get the size of the field, given the label, font size, and so on. + */ + wxSize GetSize(wxRichTextField* obj, wxDC& dc, wxRichTextDrawingContext& context, int style) const; + + /** + Returns @true if the display type is wxRICHTEXT_FIELD_STYLE_COMPOSITE, @false otherwise. + */ + virtual bool IsTopLevel(wxRichTextField* WXUNUSED(obj)) const { return (GetDisplayStyle() & wxRICHTEXT_FIELD_STYLE_COMPOSITE) != 0; } + + /** + Sets the text label for fields of this type. + */ + void SetLabel(const wxString& label) { m_label = label; } + + /** + Returns the text label for fields of this type. + */ + const wxString& GetLabel() const { return m_label; } + + /** + Sets the bitmap label for fields of this type. + */ + void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } + + /** + Gets the bitmap label for fields of this type. + */ + const wxBitmap& GetBitmap() const { return m_bitmap; } + + /** + Gets the display style for fields of this type. + */ + int GetDisplayStyle() const { return m_displayStyle; } + + /** + Sets the display style for fields of this type. + */ + void SetDisplayStyle(int displayStyle) { m_displayStyle = displayStyle; } + + /** + Gets the font used for drawing the text label. + */ + const wxFont& GetFont() const { return m_font; } + + /** + Sets the font used for drawing the text label. + */ + void SetFont(const wxFont& font) { m_font = font; } + + /** + Gets the colour used for drawing the text label. + */ + const wxColour& GetTextColour() const { return m_textColour; } + + /** + Sets the colour used for drawing the text label. + */ + void SetTextColour(const wxColour& colour) { m_textColour = colour; } + + /** + Gets the colour used for drawing the field border. + */ + const wxColour& GetBorderColour() const { return m_borderColour; } + + /** + Sets the colour used for drawing the field border. + */ + void SetBorderColour(const wxColour& colour) { m_borderColour = colour; } + + /** + Gets the colour used for drawing the field background. + */ + const wxColour& GetBackgroundColour() const { return m_backgroundColour; } + + /** + Sets the colour used for drawing the field background. + */ + void SetBackgroundColour(const wxColour& colour) { m_backgroundColour = colour; } + + /** + Sets the vertical padding (the distance between the border and the text). + */ + void SetVerticalPadding(int padding) { m_verticalPadding = padding; } + + /** + Gets the vertical padding (the distance between the border and the text). + */ + int GetVerticalPadding() const { return m_verticalPadding; } + + /** + Sets the horizontal padding (the distance between the border and the text). + */ + void SetHorizontalPadding(int padding) { m_horizontalPadding = padding; } + + /** + Sets the horizontal padding (the distance between the border and the text). + */ + int GetHorizontalPadding() const { return m_horizontalPadding; } + + /** + Sets the horizontal margin surrounding the field object. + */ + void SetHorizontalMargin(int margin) { m_horizontalMargin = margin; } + + /** + Gets the horizontal margin surrounding the field object. + */ + int GetHorizontalMargin() const { return m_horizontalMargin; } + + /** + Sets the vertical margin surrounding the field object. + */ + void SetVerticalMargin(int margin) { m_verticalMargin = margin; } + + /** + Gets the vertical margin surrounding the field object. + */ + int GetVerticalMargin() const { return m_verticalMargin; } + +protected: + + wxString m_label; + int m_displayStyle; + wxFont m_font; + wxColour m_textColour; + wxColour m_borderColour; + wxColour m_backgroundColour; + int m_verticalPadding; + int m_horizontalPadding; + int m_horizontalMargin; + int m_verticalMargin; + wxBitmap m_bitmap; +}; + +/** + @class wxRichTextLine + + This object represents a line in a paragraph, and stores + offsets from the start of the paragraph representing the + start and end positions of the line. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextLine +{ +public: +// Constructors + + wxRichTextLine(wxRichTextParagraph* parent); + wxRichTextLine(const wxRichTextLine& obj) { Init( NULL); Copy(obj); } + virtual ~wxRichTextLine() {} + +// Overridables + +// Accessors + + /** + Sets the range associated with this line. + */ + void SetRange(const wxRichTextRange& range) { m_range = range; } + /** + Sets the range associated with this line. + */ + void SetRange(long from, long to) { m_range = wxRichTextRange(from, to); } + + /** + Returns the parent paragraph. + */ + wxRichTextParagraph* GetParent() { return m_parent; } + + /** + Returns the range. + */ + const wxRichTextRange& GetRange() const { return m_range; } + /** + Returns the range. + */ + wxRichTextRange& GetRange() { return m_range; } + + /** + Returns the absolute range. + */ + wxRichTextRange GetAbsoluteRange() const; + + /** + Returns the line size as calculated by Layout. + */ + virtual wxSize GetSize() const { return m_size; } + + /** + Sets the line size as calculated by Layout. + */ + virtual void SetSize(const wxSize& sz) { m_size = sz; } + + /** + Returns the object position relative to the parent. + */ + virtual wxPoint GetPosition() const { return m_pos; } + + /** + Sets the object position relative to the parent. + */ + virtual void SetPosition(const wxPoint& pos) { m_pos = pos; } + + /** + Returns the absolute object position. + */ + virtual wxPoint GetAbsolutePosition() const; + + /** + Returns the rectangle enclosing the line. + */ + virtual wxRect GetRect() const { return wxRect(GetAbsolutePosition(), GetSize()); } + + /** + Sets the stored descent. + */ + void SetDescent(int descent) { m_descent = descent; } + + /** + Returns the stored descent. + */ + int GetDescent() const { return m_descent; } + +#if wxRICHTEXT_USE_OPTIMIZED_LINE_DRAWING + wxArrayInt& GetObjectSizes() { return m_objectSizes; } + const wxArrayInt& GetObjectSizes() const { return m_objectSizes; } +#endif + +// Operations + + /** + Initialises the object. + */ + void Init(wxRichTextParagraph* parent); + + /** + Copies from @a obj. + */ + void Copy(const wxRichTextLine& obj); + + virtual wxRichTextLine* Clone() const { return new wxRichTextLine(*this); } + +protected: + + // The range of the line (start position to end position) + // This is relative to the parent paragraph. + wxRichTextRange m_range; + + // Size and position measured relative to top of paragraph + wxPoint m_pos; + wxSize m_size; + + // Maximum descent for this line (location of text baseline) + int m_descent; + + // The parent object + wxRichTextParagraph* m_parent; + +#if wxRICHTEXT_USE_OPTIMIZED_LINE_DRAWING + wxArrayInt m_objectSizes; +#endif +}; + +WX_DECLARE_LIST_WITH_DECL( wxRichTextLine, wxRichTextLineList , class WXDLLIMPEXP_RICHTEXT ); + +/** + @class wxRichTextParagraph + + This object represents a single paragraph containing various objects such as text content, images, and further paragraph layout objects. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextParagraph: public wxRichTextCompositeObject +{ + DECLARE_DYNAMIC_CLASS(wxRichTextParagraph) +public: +// Constructors + + /** + Constructor taking a parent and style. + */ + wxRichTextParagraph(wxRichTextObject* parent = NULL, wxRichTextAttr* style = NULL); + /** + Constructor taking a text string, a parent and paragraph and character attributes. + */ + wxRichTextParagraph(const wxString& text, wxRichTextObject* parent = NULL, wxRichTextAttr* paraStyle = NULL, wxRichTextAttr* charStyle = NULL); + virtual ~wxRichTextParagraph(); + wxRichTextParagraph(const wxRichTextParagraph& obj): wxRichTextCompositeObject() { Copy(obj); } + +// Overridables + + virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style); + + virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style); + + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = NULL) const; + + virtual bool FindPosition(wxDC& dc, wxRichTextDrawingContext& context, long index, wxPoint& pt, int* height, bool forceLineStart); + + virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0); + + virtual void CalculateRange(long start, long& end); + + virtual wxString GetXMLNodeName() const { return wxT("paragraph"); } + +// Accessors + + /** + Returns the cached lines. + */ + wxRichTextLineList& GetLines() { return m_cachedLines; } + +// Operations + + /** + Copies the object. + */ + void Copy(const wxRichTextParagraph& obj); + + virtual wxRichTextObject* Clone() const { return new wxRichTextParagraph(*this); } + + /** + Clears the cached lines. + */ + void ClearLines(); + +// Implementation + + /** + Applies paragraph styles such as centering to the wrapped lines. + */ + virtual void ApplyParagraphStyle(wxRichTextLine* line, const wxRichTextAttr& attr, const wxRect& rect, wxDC& dc); + + /** + Inserts text at the given position. + */ + virtual bool InsertText(long pos, const wxString& text); + + /** + Splits an object at this position if necessary, and returns + the previous object, or NULL if inserting at the beginning. + */ + virtual wxRichTextObject* SplitAt(long pos, wxRichTextObject** previousObject = NULL); + + /** + Moves content to a list from this point. + */ + virtual void MoveToList(wxRichTextObject* obj, wxList& list); + + /** + Adds content back from a list. + */ + virtual void MoveFromList(wxList& list); + + /** + Returns the plain text searching from the start or end of the range. + The resulting string may be shorter than the range given. + */ + bool GetContiguousPlainText(wxString& text, const wxRichTextRange& range, bool fromStart = true); + + /** + Finds a suitable wrap position. @a wrapPosition is the last position in the line to the left + of the split. + */ + bool FindWrapPosition(const wxRichTextRange& range, wxDC& dc, wxRichTextDrawingContext& context, int availableSpace, long& wrapPosition, wxArrayInt* partialExtents); + + /** + Finds the object at the given position. + */ + wxRichTextObject* FindObjectAtPosition(long position); + + /** + Returns the bullet text for this paragraph. + */ + wxString GetBulletText(); + + /** + Allocates or reuses a line object. + */ + wxRichTextLine* AllocateLine(int pos); + + /** + Clears remaining unused line objects, if any. + */ + bool ClearUnusedLines(int lineCount); + + /** + Returns combined attributes of the base style, paragraph style and character style. We use this to dynamically + retrieve the actual style. + */ + wxRichTextAttr GetCombinedAttributes(const wxRichTextAttr& contentStyle, bool includingBoxAttr = false) const; + + /** + Returns the combined attributes of the base style and paragraph style. + */ + wxRichTextAttr GetCombinedAttributes(bool includingBoxAttr = false) const; + + /** + Returns the first position from pos that has a line break character. + */ + long GetFirstLineBreakPosition(long pos); + + /** + Creates a default tabstop array. + */ + static void InitDefaultTabs(); + + /** + Clears the default tabstop array. + */ + static void ClearDefaultTabs(); + + /** + Returns the default tabstop array. + */ + static const wxArrayInt& GetDefaultTabs() { return sm_defaultTabs; } + + /** + Lays out the floating objects. + */ + void LayoutFloat(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style, wxRichTextFloatCollector* floatCollector); + +protected: + + // The lines that make up the wrapped paragraph + wxRichTextLineList m_cachedLines; + + // Default tabstops + static wxArrayInt sm_defaultTabs; + +friend class wxRichTextFloatCollector; +}; + +/** + @class wxRichTextPlainText + + This object represents a single piece of text. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextPlainText: public wxRichTextObject +{ + DECLARE_DYNAMIC_CLASS(wxRichTextPlainText) +public: +// Constructors + + /** + Constructor. + */ + wxRichTextPlainText(const wxString& text = wxEmptyString, wxRichTextObject* parent = NULL, wxRichTextAttr* style = NULL); + + /** + Copy constructor. + */ + wxRichTextPlainText(const wxRichTextPlainText& obj): wxRichTextObject() { Copy(obj); } + +// Overridables + + virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style); + + virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style); + + virtual bool AdjustAttributes(wxRichTextAttr& attr, wxRichTextDrawingContext& context); + + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = NULL) const; + + virtual wxString GetTextForRange(const wxRichTextRange& range) const; + + virtual wxRichTextObject* DoSplit(long pos); + + virtual void CalculateRange(long start, long& end); + + virtual bool DeleteRange(const wxRichTextRange& range); + + virtual bool IsEmpty() const { return m_text.empty(); } + + virtual bool CanMerge(wxRichTextObject* object, wxRichTextDrawingContext& context) const; + + virtual bool Merge(wxRichTextObject* object, wxRichTextDrawingContext& context); + + virtual void Dump(wxTextOutputStream& stream); + + virtual bool CanSplit(wxRichTextDrawingContext& context) const; + + virtual wxRichTextObject* Split(wxRichTextDrawingContext& context); + + /** + Get the first position from pos that has a line break character. + */ + long GetFirstLineBreakPosition(long pos); + + /// Does this object take note of paragraph attributes? Text and image objects don't. + virtual bool UsesParagraphAttributes() const { return false; } + +#if wxUSE_XML + virtual bool ImportFromXML(wxRichTextBuffer* buffer, wxXmlNode* node, wxRichTextXMLHandler* handler, bool* recurse); +#endif + +#if wxRICHTEXT_HAVE_DIRECT_OUTPUT + virtual bool ExportXML(wxOutputStream& stream, int indent, wxRichTextXMLHandler* handler); +#endif + +#if wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT + virtual bool ExportXML(wxXmlNode* parent, wxRichTextXMLHandler* handler); +#endif + + virtual wxString GetXMLNodeName() const { return wxT("text"); } + +// Accessors + + /** + Returns the text. + */ + const wxString& GetText() const { return m_text; } + + /** + Sets the text. + */ + void SetText(const wxString& text) { m_text = text; } + +// Operations + + // Copies the text object, + void Copy(const wxRichTextPlainText& obj); + + // Clones the text object. + virtual wxRichTextObject* Clone() const { return new wxRichTextPlainText(*this); } + +private: + bool DrawTabbedString(wxDC& dc, const wxRichTextAttr& attr, const wxRect& rect, wxString& str, wxCoord& x, wxCoord& y, bool selected); + +protected: + wxString m_text; +}; + +/** + @class wxRichTextImageBlock + + This class stores information about an image, in binary in-memory form. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextImageBlock: public wxObject +{ +public: + /** + Constructor. + */ + wxRichTextImageBlock(); + + /** + Copy constructor. + */ + wxRichTextImageBlock(const wxRichTextImageBlock& block); + virtual ~wxRichTextImageBlock(); + + /** + Initialises the block. + */ + void Init(); + + /** + Clears the block. + */ + + void Clear(); + + /** + Load the original image into a memory block. + If the image is not a JPEG, we must convert it into a JPEG + to conserve space. + If it's not a JPEG we can make use of @a image, already scaled, so we don't have to + load the image a second time. + */ + virtual bool MakeImageBlock(const wxString& filename, wxBitmapType imageType, + wxImage& image, bool convertToJPEG = true); + + /** + Make an image block from the wxImage in the given + format. + */ + virtual bool MakeImageBlock(wxImage& image, wxBitmapType imageType, int quality = 80); + + /** + Uses a const wxImage for efficiency, but can't set quality (only relevant for JPEG) + */ + virtual bool MakeImageBlockDefaultQuality(const wxImage& image, wxBitmapType imageType); + + /** + Makes the image block. + */ + virtual bool DoMakeImageBlock(const wxImage& image, wxBitmapType imageType); + + /** + Writes the block to a file. + */ + bool Write(const wxString& filename); + + /** + Writes the data in hex to a stream. + */ + bool WriteHex(wxOutputStream& stream); + + /** + Reads the data in hex from a stream. + */ + bool ReadHex(wxInputStream& stream, int length, wxBitmapType imageType); + + /** + Copy from @a block. + */ + void Copy(const wxRichTextImageBlock& block); + + // Load a wxImage from the block + /** + */ + bool Load(wxImage& image); + +// Operators + + /** + Assignment operation. + */ + void operator=(const wxRichTextImageBlock& block); + +// Accessors + + /** + Returns the raw data. + */ + unsigned char* GetData() const { return m_data; } + + /** + Returns the data size in bytes. + */ + size_t GetDataSize() const { return m_dataSize; } + + /** + Returns the image type. + */ + wxBitmapType GetImageType() const { return m_imageType; } + + /** + */ + void SetData(unsigned char* image) { m_data = image; } + + /** + Sets the data size. + */ + void SetDataSize(size_t size) { m_dataSize = size; } + + /** + Sets the image type. + */ + void SetImageType(wxBitmapType imageType) { m_imageType = imageType; } + + /** + Returns @true if the data is non-NULL. + */ + bool IsOk() const { return GetData() != NULL; } + bool Ok() const { return IsOk(); } + + /** + Gets the extension for the block's type. + */ + wxString GetExtension() const; + +/// Implementation + + /** + Allocates and reads from a stream as a block of memory. + */ + static unsigned char* ReadBlock(wxInputStream& stream, size_t size); + + /** + Allocates and reads from a file as a block of memory. + */ + static unsigned char* ReadBlock(const wxString& filename, size_t size); + + /** + Writes a memory block to stream. + */ + static bool WriteBlock(wxOutputStream& stream, unsigned char* block, size_t size); + + /** + Writes a memory block to a file. + */ + static bool WriteBlock(const wxString& filename, unsigned char* block, size_t size); + +protected: + // Size in bytes of the image stored. + // This is in the raw, original form such as a JPEG file. + unsigned char* m_data; + size_t m_dataSize; + wxBitmapType m_imageType; +}; + +/** + @class wxRichTextImage + + This class implements a graphic object. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl, wxRichTextImageBlock +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextImage: public wxRichTextObject +{ + DECLARE_DYNAMIC_CLASS(wxRichTextImage) +public: +// Constructors + + /** + Default constructor. + */ + wxRichTextImage(wxRichTextObject* parent = NULL): wxRichTextObject(parent) { Init(); } + + /** + Creates a wxRichTextImage from a wxImage. + */ + wxRichTextImage(const wxImage& image, wxRichTextObject* parent = NULL, wxRichTextAttr* charStyle = NULL); + + /** + Creates a wxRichTextImage from an image block. + */ + wxRichTextImage(const wxRichTextImageBlock& imageBlock, wxRichTextObject* parent = NULL, wxRichTextAttr* charStyle = NULL); + + /** + Copy constructor. + */ + wxRichTextImage(const wxRichTextImage& obj): wxRichTextObject(obj) { Copy(obj); } + + /** + Destructor. + */ + ~wxRichTextImage(); + + /** + Initialisation. + */ + void Init(); + +// Overridables + + virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style); + + virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style); + + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = NULL) const; + + /** + Returns the 'natural' size for this object - the image size. + */ + virtual wxTextAttrSize GetNaturalSize() const; + + virtual bool IsEmpty() const { return false; /* !m_imageBlock.IsOk(); */ } + + virtual bool CanEditProperties() const { return true; } + + virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer); + + virtual wxString GetPropertiesMenuLabel() const { return wxGetTranslation("&Picture"); } + + virtual bool UsesParagraphAttributes() const { return false; } + +#if wxUSE_XML + virtual bool ImportFromXML(wxRichTextBuffer* buffer, wxXmlNode* node, wxRichTextXMLHandler* handler, bool* recurse); +#endif + +#if wxRICHTEXT_HAVE_DIRECT_OUTPUT + virtual bool ExportXML(wxOutputStream& stream, int indent, wxRichTextXMLHandler* handler); +#endif + +#if wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT + virtual bool ExportXML(wxXmlNode* parent, wxRichTextXMLHandler* handler); +#endif + + // Images can be floatable (optionally). + virtual bool IsFloatable() const { return true; } + + virtual wxString GetXMLNodeName() const { return wxT("image"); } + +// Accessors + + /** + Returns the image cache (a scaled bitmap). + */ + const wxBitmap& GetImageCache() const { return m_imageCache; } + + /** + Sets the image cache. + */ + void SetImageCache(const wxBitmap& bitmap) { m_imageCache = bitmap; m_originalImageSize = wxSize(bitmap.GetWidth(), bitmap.GetHeight()); } + + /** + Resets the image cache. + */ + void ResetImageCache() { m_imageCache = wxNullBitmap; m_originalImageSize = wxSize(-1, -1); } + + /** + Returns the image block containing the raw data. + */ + wxRichTextImageBlock& GetImageBlock() { return m_imageBlock; } + +// Operations + + /** + Copies the image object. + */ + void Copy(const wxRichTextImage& obj); + + /** + Clones the image object. + */ + virtual wxRichTextObject* Clone() const { return new wxRichTextImage(*this); } + + /** + Creates a cached image at the required size. + */ + virtual bool LoadImageCache(wxDC& dc, bool resetCache = false, const wxSize& parentSize = wxDefaultSize); + + /** + Gets the original image size. + */ + wxSize GetOriginalImageSize() const { return m_originalImageSize; } + + /** + Sets the original image size. + */ + void SetOriginalImageSize(const wxSize& sz) { m_originalImageSize = sz; } + +protected: + wxRichTextImageBlock m_imageBlock; + wxBitmap m_imageCache; + wxSize m_originalImageSize; +}; + +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextCommand; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextAction; + +/** + @class wxRichTextBuffer + + This is a kind of paragraph layout box, used to represent the whole buffer. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextParagraphLayoutBox, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextBuffer: public wxRichTextParagraphLayoutBox +{ + DECLARE_DYNAMIC_CLASS(wxRichTextBuffer) +public: +// Constructors + + /** + Default constructor. + */ + wxRichTextBuffer() { Init(); } + + /** + Copy constructor. + */ + wxRichTextBuffer(const wxRichTextBuffer& obj): wxRichTextParagraphLayoutBox() { Init(); Copy(obj); } + + virtual ~wxRichTextBuffer() ; + +// Accessors + + /** + Returns the command processor. + A text buffer always creates its own command processor when it is initialized. + */ + wxCommandProcessor* GetCommandProcessor() const { return m_commandProcessor; } + + /** + Sets style sheet, if any. This will allow the application to use named character and paragraph + styles found in the style sheet. + + Neither the buffer nor the control owns the style sheet so must be deleted by the application. + */ + void SetStyleSheet(wxRichTextStyleSheet* styleSheet) { m_styleSheet = styleSheet; } + + /** + Returns the style sheet. + */ + virtual wxRichTextStyleSheet* GetStyleSheet() const { return m_styleSheet; } + + /** + Sets the style sheet and sends a notification of the change. + */ + bool SetStyleSheetAndNotify(wxRichTextStyleSheet* sheet); + + /** + Pushes the style sheet to the top of the style sheet stack. + */ + bool PushStyleSheet(wxRichTextStyleSheet* styleSheet); + + /** + Pops the style sheet from the top of the style sheet stack. + */ + wxRichTextStyleSheet* PopStyleSheet(); + + /** + Returns the table storing fonts, for quick access and font reuse. + */ + wxRichTextFontTable& GetFontTable() { return m_fontTable; } + + /** + Returns the table storing fonts, for quick access and font reuse. + */ + const wxRichTextFontTable& GetFontTable() const { return m_fontTable; } + + /** + Sets table storing fonts, for quick access and font reuse. + */ + void SetFontTable(const wxRichTextFontTable& table) { m_fontTable = table; } + + /** + Sets the scale factor for displaying fonts, for example for more comfortable + editing. + */ + void SetFontScale(double fontScale); + + /** + Returns the scale factor for displaying fonts, for example for more comfortable + editing. + */ + double GetFontScale() const { return m_fontScale; } + + /** + Sets the scale factor for displaying certain dimensions such as indentation and + inter-paragraph spacing. This can be useful when editing in a small control + where you still want legible text, but a minimum of wasted white space. + */ + void SetDimensionScale(double dimScale); + + /** + Returns the scale factor for displaying certain dimensions such as indentation + and inter-paragraph spacing. + */ + double GetDimensionScale() const { return m_dimensionScale; } + +// Operations + + /** + Initialisation. + */ + void Init(); + + /** + Clears the buffer, adds an empty paragraph, and clears the command processor. + */ + virtual void ResetAndClearCommands(); + +#if wxUSE_FFILE && wxUSE_STREAMS + //@{ + /** + Loads content from a file. + Not all handlers will implement file loading. + */ + virtual bool LoadFile(const wxString& filename, wxRichTextFileType type = wxRICHTEXT_TYPE_ANY); + //@} + + //@{ + /** + Saves content to a file. + Not all handlers will implement file saving. + */ + virtual bool SaveFile(const wxString& filename, wxRichTextFileType type = wxRICHTEXT_TYPE_ANY); + //@} +#endif // wxUSE_FFILE + +#if wxUSE_STREAMS + //@{ + /** + Loads content from a stream. + Not all handlers will implement loading from a stream. + */ + virtual bool LoadFile(wxInputStream& stream, wxRichTextFileType type = wxRICHTEXT_TYPE_ANY); + //@} + + //@{ + /** + Saves content to a stream. + Not all handlers will implement saving to a stream. + */ + virtual bool SaveFile(wxOutputStream& stream, wxRichTextFileType type = wxRICHTEXT_TYPE_ANY); + //@} +#endif // wxUSE_STREAMS + + /** + Sets the handler flags, controlling loading and saving. + */ + void SetHandlerFlags(int flags) { m_handlerFlags = flags; } + + /** + Gets the handler flags, controlling loading and saving. + */ + int GetHandlerFlags() const { return m_handlerFlags; } + + /** + Convenience function to add a paragraph of text. + */ + virtual wxRichTextRange AddParagraph(const wxString& text, wxRichTextAttr* paraStyle = NULL) { Modify(); return wxRichTextParagraphLayoutBox::AddParagraph(text, paraStyle); } + + /** + Begin collapsing undo/redo commands. Note that this may not work properly + if combining commands that delete or insert content, changing ranges for + subsequent actions. + + @a cmdName should be the name of the combined command that will appear + next to Undo and Redo in the edit menu. + */ + virtual bool BeginBatchUndo(const wxString& cmdName); + + /** + End collapsing undo/redo commands. + */ + virtual bool EndBatchUndo(); + + /** + Returns @true if we are collapsing commands. + */ + virtual bool BatchingUndo() const { return m_batchedCommandDepth > 0; } + + /** + Submit the action immediately, or delay according to whether collapsing is on. + */ + virtual bool SubmitAction(wxRichTextAction* action); + + /** + Returns the collapsed command. + */ + virtual wxRichTextCommand* GetBatchedCommand() const { return m_batchedCommand; } + + /** + Begin suppressing undo/redo commands. The way undo is suppressed may be implemented + differently by each command. If not dealt with by a command implementation, then + it will be implemented automatically by not storing the command in the undo history + when the action is submitted to the command processor. + */ + virtual bool BeginSuppressUndo(); + + /** + End suppressing undo/redo commands. + */ + virtual bool EndSuppressUndo(); + + /** + Are we suppressing undo?? + */ + virtual bool SuppressingUndo() const { return m_suppressUndo > 0; } + + /** + Copy the range to the clipboard. + */ + virtual bool CopyToClipboard(const wxRichTextRange& range); + + /** + Paste the clipboard content to the buffer. + */ + virtual bool PasteFromClipboard(long position); + + /** + Returns @true if we can paste from the clipboard. + */ + virtual bool CanPasteFromClipboard() const; + + /** + Begin using a style. + */ + virtual bool BeginStyle(const wxRichTextAttr& style); + + /** + End the style. + */ + virtual bool EndStyle(); + + /** + End all styles. + */ + virtual bool EndAllStyles(); + + /** + Clears the style stack. + */ + virtual void ClearStyleStack(); + + /** + Returns the size of the style stack, for example to check correct nesting. + */ + virtual size_t GetStyleStackSize() const { return m_attributeStack.GetCount(); } + + /** + Begins using bold. + */ + bool BeginBold(); + + /** + Ends using bold. + */ + bool EndBold() { return EndStyle(); } + + /** + Begins using italic. + */ + bool BeginItalic(); + + /** + Ends using italic. + */ + bool EndItalic() { return EndStyle(); } + + /** + Begins using underline. + */ + bool BeginUnderline(); + + /** + Ends using underline. + */ + bool EndUnderline() { return EndStyle(); } + + /** + Begins using point size. + */ + bool BeginFontSize(int pointSize); + + /** + Ends using point size. + */ + bool EndFontSize() { return EndStyle(); } + + /** + Begins using this font. + */ + bool BeginFont(const wxFont& font); + + /** + Ends using a font. + */ + bool EndFont() { return EndStyle(); } + + /** + Begins using this colour. + */ + bool BeginTextColour(const wxColour& colour); + + /** + Ends using a colour. + */ + bool EndTextColour() { return EndStyle(); } + + /** + Begins using alignment. + */ + bool BeginAlignment(wxTextAttrAlignment alignment); + + /** + Ends alignment. + */ + bool EndAlignment() { return EndStyle(); } + + /** + Begins using @a leftIndent for the left indent, and optionally @a leftSubIndent for + the sub-indent. Both are expressed in tenths of a millimetre. + + The sub-indent is an offset from the left of the paragraph, and is used for all + but the first line in a paragraph. A positive value will cause the first line to appear + to the left of the subsequent lines, and a negative value will cause the first line to be + indented relative to the subsequent lines. + */ + bool BeginLeftIndent(int leftIndent, int leftSubIndent = 0); + + /** + Ends left indent. + */ + bool EndLeftIndent() { return EndStyle(); } + + /** + Begins a right indent, specified in tenths of a millimetre. + */ + bool BeginRightIndent(int rightIndent); + + /** + Ends right indent. + */ + bool EndRightIndent() { return EndStyle(); } + + /** + Begins paragraph spacing; pass the before-paragraph and after-paragraph spacing + in tenths of a millimetre. + */ + bool BeginParagraphSpacing(int before, int after); + + /** + Ends paragraph spacing. + */ + bool EndParagraphSpacing() { return EndStyle(); } + + /** + Begins line spacing using the specified value. @e spacing is a multiple, where + 10 means single-spacing, 15 means 1.5 spacing, and 20 means double spacing. + + The ::wxTextAttrLineSpacing enumeration values are defined for convenience. + */ + bool BeginLineSpacing(int lineSpacing); + + /** + Ends line spacing. + */ + bool EndLineSpacing() { return EndStyle(); } + + /** + Begins numbered bullet. + + This call will be needed for each item in the list, and the + application should take care of incrementing the numbering. + + @a bulletNumber is a number, usually starting with 1. + @a leftIndent and @a leftSubIndent are values in tenths of a millimetre. + @a bulletStyle is a bitlist of the following values: + + wxRichTextBuffer uses indentation to render a bulleted item. + The left indent is the distance between the margin and the bullet. + The content of the paragraph, including the first line, starts + at leftMargin + leftSubIndent. + So the distance between the left edge of the bullet and the + left of the actual paragraph is leftSubIndent. + */ + bool BeginNumberedBullet(int bulletNumber, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_ARABIC|wxTEXT_ATTR_BULLET_STYLE_PERIOD); + + /** + Ends numbered bullet. + */ + bool EndNumberedBullet() { return EndStyle(); } + + /** + Begins applying a symbol bullet, using a character from the current font. + + See BeginNumberedBullet() for an explanation of how indentation is used + to render the bulleted paragraph. + */ + bool BeginSymbolBullet(const wxString& symbol, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_SYMBOL); + + /** + Ends symbol bullet. + */ + bool EndSymbolBullet() { return EndStyle(); } + + /** + Begins applying a standard bullet, using one of the standard bullet names + (currently @c standard/circle or @c standard/square. + + See BeginNumberedBullet() for an explanation of how indentation is used to + render the bulleted paragraph. + */ + bool BeginStandardBullet(const wxString& bulletName, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_STANDARD); + + /** + Ends standard bullet. + */ + bool EndStandardBullet() { return EndStyle(); } + + /** + Begins named character style. + */ + bool BeginCharacterStyle(const wxString& characterStyle); + + /** + Ends named character style. + */ + bool EndCharacterStyle() { return EndStyle(); } + + /** + Begins named paragraph style. + */ + bool BeginParagraphStyle(const wxString& paragraphStyle); + + /** + Ends named character style. + */ + bool EndParagraphStyle() { return EndStyle(); } + + /** + Begins named list style. + + Optionally, you can also pass a level and a number. + */ + bool BeginListStyle(const wxString& listStyle, int level = 1, int number = 1); + + /** + Ends named character style. + */ + bool EndListStyle() { return EndStyle(); } + + /** + Begins applying wxTEXT_ATTR_URL to the content. + + Pass a URL and optionally, a character style to apply, since it is common + to mark a URL with a familiar style such as blue text with underlining. + */ + bool BeginURL(const wxString& url, const wxString& characterStyle = wxEmptyString); + + /** + Ends URL. + */ + bool EndURL() { return EndStyle(); } + +// Event handling + + /** + Adds an event handler. + + A buffer associated with a control has the control as the only event handler, + but the application is free to add more if further notification is required. + All handlers are notified of an event originating from the buffer, such as + the replacement of a style sheet during loading. + + The buffer never deletes any of the event handlers, unless RemoveEventHandler() + is called with @true as the second argument. + */ + bool AddEventHandler(wxEvtHandler* handler); + + /** + Removes an event handler from the buffer's list of handlers, deleting the + object if @a deleteHandler is @true. + */ + bool RemoveEventHandler(wxEvtHandler* handler, bool deleteHandler = false); + + /** + Clear event handlers. + */ + void ClearEventHandlers(); + + /** + Send event to event handlers. If sendToAll is true, will send to all event handlers, + otherwise will stop at the first successful one. + */ + bool SendEvent(wxEvent& event, bool sendToAll = true); + +// Implementation + + virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0); + + /** + Copies the buffer. + */ + void Copy(const wxRichTextBuffer& obj); + + /** + Assignment operator. + */ + void operator= (const wxRichTextBuffer& obj) { Copy(obj); } + + /** + Clones the buffer. + */ + virtual wxRichTextObject* Clone() const { return new wxRichTextBuffer(*this); } + + /** + Submits a command to insert paragraphs. + */ + bool InsertParagraphsWithUndo(long pos, const wxRichTextParagraphLayoutBox& paragraphs, wxRichTextCtrl* ctrl, int flags = 0); + + /** + Submits a command to insert the given text. + */ + bool InsertTextWithUndo(long pos, const wxString& text, wxRichTextCtrl* ctrl, int flags = 0); + + /** + Submits a command to insert a newline. + */ + bool InsertNewlineWithUndo(long pos, wxRichTextCtrl* ctrl, int flags = 0); + + /** + Submits a command to insert the given image. + */ + bool InsertImageWithUndo(long pos, const wxRichTextImageBlock& imageBlock, wxRichTextCtrl* ctrl, int flags = 0, + const wxRichTextAttr& textAttr = wxRichTextAttr()); + + /** + Submits a command to insert an object. + */ + wxRichTextObject* InsertObjectWithUndo(long pos, wxRichTextObject *object, wxRichTextCtrl* ctrl, int flags); + + /** + Submits a command to delete this range. + */ + bool DeleteRangeWithUndo(const wxRichTextRange& range, wxRichTextCtrl* ctrl); + + /** + Mark modified. + */ + void Modify(bool modify = true) { m_modified = modify; } + + /** + Returns @true if the buffer was modified. + */ + bool IsModified() const { return m_modified; } + + //@{ + /** + Dumps contents of buffer for debugging purposes. + */ + virtual void Dump(); + virtual void Dump(wxTextOutputStream& stream) { wxRichTextParagraphLayoutBox::Dump(stream); } + //@} + + /** + Returns the file handlers. + */ + static wxList& GetHandlers() { return sm_handlers; } + + /** + Adds a file handler to the end. + */ + static void AddHandler(wxRichTextFileHandler *handler); + + /** + Inserts a file handler at the front. + */ + static void InsertHandler(wxRichTextFileHandler *handler); + + /** + Removes a file handler. + */ + static bool RemoveHandler(const wxString& name); + + /** + Finds a file handler by name. + */ + static wxRichTextFileHandler *FindHandler(const wxString& name); + + /** + Finds a file handler by extension and type. + */ + static wxRichTextFileHandler *FindHandler(const wxString& extension, wxRichTextFileType imageType); + + /** + Finds a handler by filename or, if supplied, type. + */ + static wxRichTextFileHandler *FindHandlerFilenameOrType(const wxString& filename, + wxRichTextFileType imageType); + + /** + Finds a handler by type. + */ + static wxRichTextFileHandler *FindHandler(wxRichTextFileType imageType); + + /** + Gets a wildcard incorporating all visible handlers. If @a types is present, + it will be filled with the file type corresponding to each filter. This can be + used to determine the type to pass to LoadFile given a selected filter. + */ + static wxString GetExtWildcard(bool combine = false, bool save = false, wxArrayInt* types = NULL); + + /** + Clean up file handlers. + */ + static void CleanUpHandlers(); + + /** + Initialise the standard file handlers. + Currently, only the plain text loading/saving handler is initialised by default. + */ + static void InitStandardHandlers(); + + /** + Returns the drawing handlers. + */ + static wxList& GetDrawingHandlers() { return sm_drawingHandlers; } + + /** + Adds a drawing handler to the end. + */ + static void AddDrawingHandler(wxRichTextDrawingHandler *handler); + + /** + Inserts a drawing handler at the front. + */ + static void InsertDrawingHandler(wxRichTextDrawingHandler *handler); + + /** + Removes a drawing handler. + */ + static bool RemoveDrawingHandler(const wxString& name); + + /** + Finds a drawing handler by name. + */ + static wxRichTextDrawingHandler *FindDrawingHandler(const wxString& name); + + /** + Clean up drawing handlers. + */ + static void CleanUpDrawingHandlers(); + + /** + Returns the field types. + */ + static wxRichTextFieldTypeHashMap& GetFieldTypes() { return sm_fieldTypes; } + + /** + Adds a field type. + + @see RemoveFieldType(), FindFieldType(), wxRichTextField, wxRichTextFieldType, wxRichTextFieldTypeStandard + + */ + static void AddFieldType(wxRichTextFieldType *fieldType); + + /** + Removes a field type by name. + + @see AddFieldType(), FindFieldType(), wxRichTextField, wxRichTextFieldType, wxRichTextFieldTypeStandard + */ + static bool RemoveFieldType(const wxString& name); + + /** + Finds a field type by name. + + @see RemoveFieldType(), AddFieldType(), wxRichTextField, wxRichTextFieldType, wxRichTextFieldTypeStandard + */ + static wxRichTextFieldType *FindFieldType(const wxString& name); + + /** + Cleans up field types. + */ + static void CleanUpFieldTypes(); + + /** + Returns the renderer object. + */ + static wxRichTextRenderer* GetRenderer() { return sm_renderer; } + + /** + Sets @a renderer as the object to be used to render certain aspects of the + content, such as bullets. + + You can override default rendering by deriving a new class from + wxRichTextRenderer or wxRichTextStdRenderer, overriding one or more + virtual functions, and setting an instance of the class using this function. + */ + static void SetRenderer(wxRichTextRenderer* renderer); + + /** + Returns the minimum margin between bullet and paragraph in 10ths of a mm. + */ + static int GetBulletRightMargin() { return sm_bulletRightMargin; } + + /** + Sets the minimum margin between bullet and paragraph in 10ths of a mm. + */ + static void SetBulletRightMargin(int margin) { sm_bulletRightMargin = margin; } + + /** + Returns the factor to multiply by character height to get a reasonable bullet size. + */ + static float GetBulletProportion() { return sm_bulletProportion; } + + /** + Sets the factor to multiply by character height to get a reasonable bullet size. + */ + static void SetBulletProportion(float prop) { sm_bulletProportion = prop; } + + /** + Returns the scale factor for calculating dimensions. + */ + double GetScale() const { return m_scale; } + + /** + Sets the scale factor for calculating dimensions. + */ + void SetScale(double scale) { m_scale = scale; } + + /** + Sets the floating layout mode. Pass @false to speed up editing by not performing + floating layout. This setting affects all buffers. + + */ + static void SetFloatingLayoutMode(bool mode) { sm_floatingLayoutMode = mode; } + + /** + Returns the floating layout mode. The default is @true, where objects + are laid out according to their floating status. + */ + static bool GetFloatingLayoutMode() { return sm_floatingLayoutMode; } + +protected: + + /// Command processor + wxCommandProcessor* m_commandProcessor; + + /// Table storing fonts + wxRichTextFontTable m_fontTable; + + /// Has been modified? + bool m_modified; + + /// Collapsed command stack + int m_batchedCommandDepth; + + /// Name for collapsed command + wxString m_batchedCommandsName; + + /// Current collapsed command accumulating actions + wxRichTextCommand* m_batchedCommand; + + /// Whether to suppress undo + int m_suppressUndo; + + /// Style sheet, if any + wxRichTextStyleSheet* m_styleSheet; + + /// List of event handlers that will be notified of events + wxList m_eventHandlers; + + /// Stack of attributes for convenience functions + wxList m_attributeStack; + + /// Flags to be passed to handlers + int m_handlerFlags; + + /// File handlers + static wxList sm_handlers; + + /// Drawing handlers + static wxList sm_drawingHandlers; + + /// Field types + static wxRichTextFieldTypeHashMap sm_fieldTypes; + + /// Renderer + static wxRichTextRenderer* sm_renderer; + + /// Minimum margin between bullet and paragraph in 10ths of a mm + static int sm_bulletRightMargin; + + /// Factor to multiply by character height to get a reasonable bullet size + static float sm_bulletProportion; + + /// Floating layout mode, @true by default + static bool sm_floatingLayoutMode; + + /// Scaling factor in use: needed to calculate correct dimensions when printing + double m_scale; + + /// Font scale for adjusting the text size when editing + double m_fontScale; + + /// Dimension scale for reducing redundant whitespace when editing + double m_dimensionScale; +}; + +/** + @class wxRichTextCell + + wxRichTextCell is the cell in a table. + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextCell: public wxRichTextBox +{ + DECLARE_DYNAMIC_CLASS(wxRichTextCell) +public: +// Constructors + + /** + Default constructor; optionally pass the parent object. + */ + + wxRichTextCell(wxRichTextObject* parent = NULL); + + /** + Copy constructor. + */ + + wxRichTextCell(const wxRichTextCell& obj): wxRichTextBox() { Copy(obj); } + +// Overridables + + virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style); + + virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0); + + virtual bool AdjustAttributes(wxRichTextAttr& attr, wxRichTextDrawingContext& context); + + virtual wxString GetXMLNodeName() const { return wxT("cell"); } + + virtual bool CanEditProperties() const { return true; } + + virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer); + + virtual wxString GetPropertiesMenuLabel() const { return wxGetTranslation("&Cell"); } + +// Accessors + + int GetColSpan() const; + + void SetColSpan(long span) { GetProperties().SetProperty(wxT("colspan"), span); } + + int GetRowSpan() const; + + void SetRowSpan(long span) { GetProperties().SetProperty(wxT("rowspan"), span); } + +// Operations + + virtual wxRichTextObject* Clone() const { return new wxRichTextCell(*this); } + + void Copy(const wxRichTextCell& obj); + +protected: +}; + +/** + @class wxRichTextTable + + wxRichTextTable represents a table with arbitrary columns and rows. + */ + +WX_DEFINE_ARRAY_PTR(wxRichTextObject*, wxRichTextObjectPtrArray); +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxRichTextObjectPtrArray, wxRichTextObjectPtrArrayArray, WXDLLIMPEXP_RICHTEXT); + +class WXDLLIMPEXP_RICHTEXT wxRichTextTable: public wxRichTextBox +{ + DECLARE_DYNAMIC_CLASS(wxRichTextTable) +public: + +// Constructors + + /** + Default constructor; optionally pass the parent object. + */ + + wxRichTextTable(wxRichTextObject* parent = NULL); + + /** + Copy constructor. + */ + + wxRichTextTable(const wxRichTextTable& obj): wxRichTextBox() { Copy(obj); } + +// Overridables + + virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style); + + virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0); + + virtual bool AdjustAttributes(wxRichTextAttr& attr, wxRichTextDrawingContext& context); + + virtual wxString GetXMLNodeName() const { return wxT("table"); } + + virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style); + + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = NULL) const; + + virtual bool DeleteRange(const wxRichTextRange& range); + + virtual wxString GetTextForRange(const wxRichTextRange& range) const; + +#if wxUSE_XML + virtual bool ImportFromXML(wxRichTextBuffer* buffer, wxXmlNode* node, wxRichTextXMLHandler* handler, bool* recurse); +#endif + +#if wxRICHTEXT_HAVE_DIRECT_OUTPUT + virtual bool ExportXML(wxOutputStream& stream, int indent, wxRichTextXMLHandler* handler); +#endif + +#if wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT + virtual bool ExportXML(wxXmlNode* parent, wxRichTextXMLHandler* handler); +#endif + + virtual bool FindPosition(wxDC& dc, wxRichTextDrawingContext& context, long index, wxPoint& pt, int* height, bool forceLineStart); + + virtual void CalculateRange(long start, long& end); + + // Can this object handle the selections of its children? FOr example, a table. + virtual bool HandlesChildSelections() const { return true; } + + /// Returns a selection object specifying the selections between start and end character positions. + /// For example, a table would deduce what cells (of range length 1) are selected when dragging across the table. + virtual wxRichTextSelection GetSelection(long start, long end) const; + + virtual bool CanEditProperties() const { return true; } + + virtual bool EditProperties(wxWindow* parent, wxRichTextBuffer* buffer); + + virtual wxString GetPropertiesMenuLabel() const { return wxGetTranslation("&Table"); } + + // Returns true if objects of this class can accept the focus, i.e. a call to SetFocusObject + // is possible. For example, containers supporting text, such as a text box object, can accept the focus, + // but a table can't (set the focus to individual cells instead). + virtual bool AcceptsFocus() const { return false; } + +// Accessors + + /** + Returns the cells array. + */ + const wxRichTextObjectPtrArrayArray& GetCells() const { return m_cells; } + + /** + Returns the cells array. + */ + wxRichTextObjectPtrArrayArray& GetCells() { return m_cells; } + + /** + Returns the row count. + */ + int GetRowCount() const { return m_rowCount; } + + /** + Sets the row count. + */ + void SetRowCount(int count) { m_rowCount = count; } + + /** + Returns the column count. + */ + int GetColumnCount() const { return m_colCount; } + + /** + Sets the column count. + */ + void SetColumnCount(int count) { m_colCount = count; } + + /** + Returns the cell at the given row/column position. + */ + virtual wxRichTextCell* GetCell(int row, int col) const; + + /** + Returns the cell at the given character position (in the range of the table). + */ + virtual wxRichTextCell* GetCell(long pos) const; + + /** + Returns the row/column for a given character position. + */ + virtual bool GetCellRowColumnPosition(long pos, int& row, int& col) const; + + /** + Returns the coordinates of the cell with keyboard focus, or (-1,-1) if none. + */ + virtual wxPosition GetFocusedCell() const; + +// Operations + + /** + Clears the table. + */ + + virtual void ClearTable(); + + /** + Creates a table of the given dimensions. + */ + + virtual bool CreateTable(int rows, int cols); + + /** + Sets the attributes for the cells specified by the selection. + */ + + virtual bool SetCellStyle(const wxRichTextSelection& selection, const wxRichTextAttr& style, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO); + + /** + Deletes rows from the given row position. + */ + + virtual bool DeleteRows(int startRow, int noRows = 1); + + /** + Deletes columns from the given column position. + */ + + virtual bool DeleteColumns(int startCol, int noCols = 1); + + /** + Adds rows from the given row position. + */ + + virtual bool AddRows(int startRow, int noRows = 1, const wxRichTextAttr& attr = wxRichTextAttr()); + + /** + Adds columns from the given column position. + */ + + virtual bool AddColumns(int startCol, int noCols = 1, const wxRichTextAttr& attr = wxRichTextAttr()); + + // Makes a clone of this object. + virtual wxRichTextObject* Clone() const { return new wxRichTextTable(*this); } + + // Copies this object. + void Copy(const wxRichTextTable& obj); + +protected: + + int m_rowCount; + int m_colCount; + + // An array of rows, each of which is a wxRichTextObjectPtrArray containing + // the cell objects. The cell objects are also children of this object. + // Problem: if boxes are immediate children of a box, this will cause problems + // with wxRichTextParagraphLayoutBox functions (and functions elsewhere) that + // expect to find just paragraphs. May have to adjust the way we handle the + // hierarchy to accept non-paragraph objects in a paragraph layout box. + // We'll be overriding much wxRichTextParagraphLayoutBox functionality so this + // may not be such a problem. Perhaps the table should derive from a different + // class? + wxRichTextObjectPtrArrayArray m_cells; +}; + +/** @class wxRichTextTableBlock + + Stores the coordinates for a block of cells. + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextTableBlock +{ +public: + wxRichTextTableBlock() { Init(); } + wxRichTextTableBlock(int colStart, int colEnd, int rowStart, int rowEnd) + { Init(); m_colStart = colStart; m_colEnd = colEnd; m_rowStart = rowStart; m_rowEnd = rowEnd; } + wxRichTextTableBlock(const wxRichTextTableBlock& block) { Copy(block); } + + void Init() { m_colStart = 0; m_colEnd = 0; m_rowStart = 0; m_rowEnd = 0; } + + void Copy(const wxRichTextTableBlock& block) + { + m_colStart = block.m_colStart; m_colEnd = block.m_colEnd; m_rowStart = block.m_rowStart; m_rowEnd = block.m_rowEnd; + } + void operator=(const wxRichTextTableBlock& block) { Copy(block); } + bool operator==(const wxRichTextTableBlock& block) + { return m_colStart == block.m_colStart && m_colEnd == block.m_colEnd && m_rowStart == block.m_rowStart && m_rowEnd == block.m_rowEnd; } + + /// Computes the block given a table (perhaps about to be edited) and a rich text control + /// that may have a selection. If no selection, the whole table is used. If just the whole content + /// of one cell is selected, this cell only is used. If the cell contents is not selected and + /// requireCellSelection is @false, the focused cell will count as a selected cell. + bool ComputeBlockForSelection(wxRichTextTable* table, wxRichTextCtrl* ctrl, bool requireCellSelection = true); + + /// Does this block represent the whole table? + bool IsWholeTable(wxRichTextTable* table) const; + + /// Returns the cell focused in the table, if any + static wxRichTextCell* GetFocusedCell(wxRichTextCtrl* ctrl); + + int& ColStart() { return m_colStart; } + int ColStart() const { return m_colStart; } + + int& ColEnd() { return m_colEnd; } + int ColEnd() const { return m_colEnd; } + + int& RowStart() { return m_rowStart; } + int RowStart() const { return m_rowStart; } + + int& RowEnd() { return m_rowEnd; } + int RowEnd() const { return m_rowEnd; } + + int m_colStart, m_colEnd, m_rowStart, m_rowEnd; +}; + +/** + The command identifiers for Do/Undo. +*/ + +enum wxRichTextCommandId +{ + wxRICHTEXT_INSERT, + wxRICHTEXT_DELETE, + wxRICHTEXT_CHANGE_ATTRIBUTES, + wxRICHTEXT_CHANGE_STYLE, + wxRICHTEXT_CHANGE_PROPERTIES, + wxRICHTEXT_CHANGE_OBJECT +}; + +/** + @class wxRichTextObjectAddress + + A class for specifying an object anywhere in an object hierarchy, + without using a pointer, necessary since wxRTC commands may delete + and recreate sub-objects so physical object addresses change. An array + of positions (one per hierarchy level) is used. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextCommand +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextObjectAddress +{ +public: + /** + Creates the address given a container and an object. + */ + wxRichTextObjectAddress(wxRichTextParagraphLayoutBox* topLevelContainer, wxRichTextObject* obj) { Create(topLevelContainer, obj); } + /** + */ + wxRichTextObjectAddress() { Init(); } + /** + */ + wxRichTextObjectAddress(const wxRichTextObjectAddress& address) { Copy(address); } + + void Init() {} + + /** + Copies the address. + */ + void Copy(const wxRichTextObjectAddress& address) { m_address = address.m_address; } + + /** + Assignment operator. + */ + void operator=(const wxRichTextObjectAddress& address) { Copy(address); } + + /** + Returns the object specified by the address, given a top level container. + */ + wxRichTextObject* GetObject(wxRichTextParagraphLayoutBox* topLevelContainer) const; + + /** + Creates the address given a container and an object. + */ + bool Create(wxRichTextParagraphLayoutBox* topLevelContainer, wxRichTextObject* obj); + + /** + Returns the array of integers representing the object address. + */ + wxArrayInt& GetAddress() { return m_address; } + + /** + Returns the array of integers representing the object address. + */ + const wxArrayInt& GetAddress() const { return m_address; } + + /** + Sets the address from an array of integers. + */ + void SetAddress(const wxArrayInt& address) { m_address = address; } + +protected: + + wxArrayInt m_address; +}; + +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextAction; + +/** + @class wxRichTextCommand + + Implements a command on the undo/redo stack. A wxRichTextCommand object contains one or more wxRichTextAction + objects, allowing aggregation of a number of operations into one command. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextAction +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextCommand: public wxCommand +{ +public: + /** + Constructor for one action. + */ + wxRichTextCommand(const wxString& name, wxRichTextCommandId id, wxRichTextBuffer* buffer, + wxRichTextParagraphLayoutBox* container, wxRichTextCtrl* ctrl, bool ignoreFirstTime = false); + + /** + Constructor for multiple actions. + */ + wxRichTextCommand(const wxString& name); + + virtual ~wxRichTextCommand(); + + /** + Performs the command. + */ + bool Do(); + + /** + Undoes the command. + */ + bool Undo(); + + /** + Adds an action to the action list. + */ + void AddAction(wxRichTextAction* action); + + /** + Clears the action list. + */ + void ClearActions(); + + /** + Returns the action list. + */ + wxList& GetActions() { return m_actions; } + +protected: + + wxList m_actions; +}; + +/** + @class wxRichTextAction + + Implements a part of a command. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextCommand +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextAction: public wxObject +{ +public: + /** + Constructor. @a buffer is the top-level buffer, while @a container is the object within + which the action is taking place. In the simplest case, they are the same. + */ + wxRichTextAction(wxRichTextCommand* cmd, const wxString& name, wxRichTextCommandId id, + wxRichTextBuffer* buffer, wxRichTextParagraphLayoutBox* container, + wxRichTextCtrl* ctrl, bool ignoreFirstTime = false); + + virtual ~wxRichTextAction(); + + /** + Performs the action. + */ + bool Do(); + + /** + Undoes the action. + */ + bool Undo(); + + /** + Updates the control appearance, optimizing if possible given information from the call to Layout. + */ + void UpdateAppearance(long caretPosition, bool sendUpdateEvent = false, + wxArrayInt* optimizationLineCharPositions = NULL, wxArrayInt* optimizationLineYPositions = NULL, bool isDoCmd = true); + + /** + Replaces the buffer paragraphs with the given fragment. + */ + void ApplyParagraphs(const wxRichTextParagraphLayoutBox& fragment); + + /** + Returns the new fragments. + */ + wxRichTextParagraphLayoutBox& GetNewParagraphs() { return m_newParagraphs; } + + /** + Returns the old fragments. + */ + wxRichTextParagraphLayoutBox& GetOldParagraphs() { return m_oldParagraphs; } + + /** + Returns the attributes, for single-object commands. + */ + wxRichTextAttr& GetAttributes() { return m_attributes; } + + /** + Returns the object to replace the one at the position defined by the container address + and the action's range start position. + */ + wxRichTextObject* GetObject() const { return m_object; } + + /** + Stores the object to replace the one at the position defined by the container address + without making an address for it (cf SetObject() and MakeObject()). + */ + void StoreObject(wxRichTextObject* obj) { m_object = obj; } + + /** + Sets the object to replace the one at the position defined by the container address + and the action's range start position. + */ + void SetObject(wxRichTextObject* obj) { m_object = obj; m_objectAddress.Create(m_buffer, m_object); } + + /** + Makes an address from the given object. + */ + void MakeObject(wxRichTextObject* obj) { m_objectAddress.Create(m_buffer, obj); } + + /** + Sets the existing and new objects, for use with wxRICHTEXT_CHANGE_OBJECT. + */ + void SetOldAndNewObjects(wxRichTextObject* oldObj, wxRichTextObject* newObj) { SetObject(oldObj); StoreObject(newObj); } + + /** + Calculate arrays for refresh optimization. + */ + void CalculateRefreshOptimizations(wxArrayInt& optimizationLineCharPositions, wxArrayInt& optimizationLineYPositions); + + /** + Sets the position used for e.g. insertion. + */ + void SetPosition(long pos) { m_position = pos; } + + /** + Returns the position used for e.g. insertion. + */ + long GetPosition() const { return m_position; } + + /** + Sets the range for e.g. deletion. + */ + void SetRange(const wxRichTextRange& range) { m_range = range; } + + /** + Returns the range for e.g. deletion. + */ + const wxRichTextRange& GetRange() const { return m_range; } + + /** + Returns the address (nested position) of the container within the buffer being manipulated. + */ + wxRichTextObjectAddress& GetContainerAddress() { return m_containerAddress; } + + /** + Returns the address (nested position) of the container within the buffer being manipulated. + */ + const wxRichTextObjectAddress& GetContainerAddress() const { return m_containerAddress; } + + /** + Sets the address (nested position) of the container within the buffer being manipulated. + */ + void SetContainerAddress(const wxRichTextObjectAddress& address) { m_containerAddress = address; } + + /** + Sets the address (nested position) of the container within the buffer being manipulated. + */ + void SetContainerAddress(wxRichTextParagraphLayoutBox* container, wxRichTextObject* obj) { m_containerAddress.Create(container, obj); } + + /** + Returns the container that this action refers to, using the container address and top-level buffer. + */ + wxRichTextParagraphLayoutBox* GetContainer() const; + + /** + Returns the action name. + */ + const wxString& GetName() const { return m_name; } + + /** + Instructs the first Do() command should be skipped as it's already been applied. + */ + void SetIgnoreFirstTime(bool b) { m_ignoreThis = b; } + + /** + Returns true if the first Do() command should be skipped as it's already been applied. + */ + bool GetIgnoreFirstTime() const { return m_ignoreThis; } + +protected: + // Action name + wxString m_name; + + // Buffer + wxRichTextBuffer* m_buffer; + + // The address (nested position) of the container being manipulated. + // This is necessary because objects are deleted, and we can't + // therefore store actual pointers. + wxRichTextObjectAddress m_containerAddress; + + // Control + wxRichTextCtrl* m_ctrl; + + // Stores the new paragraphs + wxRichTextParagraphLayoutBox m_newParagraphs; + + // Stores the old paragraphs + wxRichTextParagraphLayoutBox m_oldParagraphs; + + // Stores an object to replace the one at the position + // defined by the container address and the action's range start position. + wxRichTextObject* m_object; + + // Stores the attributes + wxRichTextAttr m_attributes; + + // The address of the object being manipulated (used for changing an individual object or its attributes) + wxRichTextObjectAddress m_objectAddress; + + // Stores the old attributes + // wxRichTextAttr m_oldAttributes; + + // The affected range + wxRichTextRange m_range; + + // The insertion point for this command + long m_position; + + // Ignore 1st 'Do' operation because we already did it + bool m_ignoreThis; + + // The command identifier + wxRichTextCommandId m_cmdId; +}; + +/*! + * Handler flags + */ + +// Include style sheet when loading and saving +#define wxRICHTEXT_HANDLER_INCLUDE_STYLESHEET 0x0001 + +// Save images to memory file system in HTML handler +#define wxRICHTEXT_HANDLER_SAVE_IMAGES_TO_MEMORY 0x0010 + +// Save images to files in HTML handler +#define wxRICHTEXT_HANDLER_SAVE_IMAGES_TO_FILES 0x0020 + +// Save images as inline base64 data in HTML handler +#define wxRICHTEXT_HANDLER_SAVE_IMAGES_TO_BASE64 0x0040 + +// Don't write header and footer (or BODY), so we can include the fragment +// in a larger document +#define wxRICHTEXT_HANDLER_NO_HEADER_FOOTER 0x0080 + +// Convert the more common face names to names that will work on the current platform +// in a larger document +#define wxRICHTEXT_HANDLER_CONVERT_FACENAMES 0x0100 + +/** + @class wxRichTextFileHandler + + The base class for file handlers. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextFileHandler: public wxObject +{ + DECLARE_CLASS(wxRichTextFileHandler) +public: + /** + Creates a file handler object. + */ + wxRichTextFileHandler(const wxString& name = wxEmptyString, const wxString& ext = wxEmptyString, int type = 0) + : m_name(name), m_extension(ext), m_type(type), m_flags(0), m_visible(true) + { } + +#if wxUSE_STREAMS + /** + Loads the buffer from a stream. + Not all handlers will implement file loading. + */ + bool LoadFile(wxRichTextBuffer *buffer, wxInputStream& stream) + { return DoLoadFile(buffer, stream); } + + /** + Saves the buffer to a stream. + Not all handlers will implement file saving. + */ + bool SaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream) + { return DoSaveFile(buffer, stream); } +#endif + +#if wxUSE_FFILE && wxUSE_STREAMS + /** + Loads the buffer from a file. + */ + virtual bool LoadFile(wxRichTextBuffer *buffer, const wxString& filename); + + /** + Saves the buffer to a file. + */ + virtual bool SaveFile(wxRichTextBuffer *buffer, const wxString& filename); +#endif // wxUSE_STREAMS && wxUSE_STREAMS + + /** + Returns @true if we handle this filename (if using files). By default, checks the extension. + */ + virtual bool CanHandle(const wxString& filename) const; + + /** + Returns @true if we can save using this handler. + */ + virtual bool CanSave() const { return false; } + + /** + Returns @true if we can load using this handler. + */ + virtual bool CanLoad() const { return false; } + + /** + Returns @true if this handler should be visible to the user. + */ + virtual bool IsVisible() const { return m_visible; } + + /** + Sets whether the handler should be visible to the user (via the application's + load and save dialogs). + */ + virtual void SetVisible(bool visible) { m_visible = visible; } + + /** + Sets the name of the handler. + */ + void SetName(const wxString& name) { m_name = name; } + + /** + Returns the name of the handler. + */ + wxString GetName() const { return m_name; } + + /** + Sets the default extension to recognise. + */ + void SetExtension(const wxString& ext) { m_extension = ext; } + + /** + Returns the default extension to recognise. + */ + wxString GetExtension() const { return m_extension; } + + /** + Sets the handler type. + */ + void SetType(int type) { m_type = type; } + + /** + Returns the handler type. + */ + int GetType() const { return m_type; } + + /** + Sets flags that change the behaviour of loading or saving. + See the documentation for each handler class to see what flags are relevant + for each handler. + + You call this function directly if you are using a file handler explicitly + (without going through the text control or buffer LoadFile/SaveFile API). + Or, you can call the control or buffer's SetHandlerFlags function to set + the flags that will be used for subsequent load and save operations. + */ + void SetFlags(int flags) { m_flags = flags; } + + /** + Returns flags controlling how loading and saving is done. + */ + int GetFlags() const { return m_flags; } + + /** + Sets the encoding to use when saving a file. If empty, a suitable encoding is chosen. + */ + void SetEncoding(const wxString& encoding) { m_encoding = encoding; } + + /** + Returns the encoding to use when saving a file. If empty, a suitable encoding is chosen. + */ + const wxString& GetEncoding() const { return m_encoding; } + +protected: + +#if wxUSE_STREAMS + /** + Override to load content from @a stream into @a buffer. + */ + virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream) = 0; + + /** + Override to save content to @a stream from @a buffer. + */ + virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream) = 0; +#endif + + wxString m_name; + wxString m_encoding; + wxString m_extension; + int m_type; + int m_flags; + bool m_visible; +}; + +/** + @class wxRichTextPlainTextHandler + + Implements saving a buffer to plain text. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextFileHandler, wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextPlainTextHandler: public wxRichTextFileHandler +{ + DECLARE_CLASS(wxRichTextPlainTextHandler) +public: + wxRichTextPlainTextHandler(const wxString& name = wxT("Text"), + const wxString& ext = wxT("txt"), + wxRichTextFileType type = wxRICHTEXT_TYPE_TEXT) + : wxRichTextFileHandler(name, ext, type) + { } + + // Can we save using this handler? + virtual bool CanSave() const { return true; } + + // Can we load using this handler? + virtual bool CanLoad() const { return true; } + +protected: + +#if wxUSE_STREAMS + virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream); + virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream); +#endif + +}; + +/** + @class wxRichTextDrawingHandler + + The base class for custom drawing handlers. + Currently, drawing handlers can provide virtual attributes. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextDrawingHandler: public wxObject +{ + DECLARE_CLASS(wxRichTextDrawingHandler) +public: + /** + Creates a drawing handler object. + */ + wxRichTextDrawingHandler(const wxString& name = wxEmptyString) + : m_name(name) + { } + + /** + Returns @true if this object has virtual attributes that we can provide. + */ + virtual bool HasVirtualAttributes(wxRichTextObject* obj) const = 0; + + /** + Provides virtual attributes that we can provide. + */ + virtual bool GetVirtualAttributes(wxRichTextAttr& attr, wxRichTextObject* obj) const = 0; + + /** + Gets the count for mixed virtual attributes for individual positions within the object. + For example, individual characters within a text object may require special highlighting. + */ + virtual int GetVirtualSubobjectAttributesCount(wxRichTextObject* obj) const = 0; + + /** + Gets the mixed virtual attributes for individual positions within the object. + For example, individual characters within a text object may require special highlighting. + Returns the number of virtual attributes found. + */ + virtual int GetVirtualSubobjectAttributes(wxRichTextObject* obj, wxArrayInt& positions, wxRichTextAttrArray& attributes) const = 0; + + /** + Do we have virtual text for this object? Virtual text allows an application + to replace characters in an object for editing and display purposes, for example + for highlighting special characters. + */ + virtual bool HasVirtualText(const wxRichTextPlainText* obj) const = 0; + + /** + Gets the virtual text for this object. + */ + virtual bool GetVirtualText(const wxRichTextPlainText* obj, wxString& text) const = 0; + + /** + Sets the name of the handler. + */ + void SetName(const wxString& name) { m_name = name; } + + /** + Returns the name of the handler. + */ + wxString GetName() const { return m_name; } + +protected: + + wxString m_name; +}; + +#if wxUSE_DATAOBJ + +/** + @class wxRichTextBufferDataObject + + Implements a rich text data object for clipboard transfer. + + @library{wxrichtext} + @category{richtext} + + @see wxDataObjectSimple, wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextBufferDataObject: public wxDataObjectSimple +{ +public: + /** + The constructor doesn't copy the pointer, so it shouldn't go away while this object + is alive. + */ + wxRichTextBufferDataObject(wxRichTextBuffer* richTextBuffer = NULL); + virtual ~wxRichTextBufferDataObject(); + + /** + After a call to this function, the buffer is owned by the caller and it + is responsible for deleting it. + */ + wxRichTextBuffer* GetRichTextBuffer(); + + /** + Returns the id for the new data format. + */ + static const wxChar* GetRichTextBufferFormatId() { return ms_richTextBufferFormatId; } + + // base class pure virtuals + + virtual wxDataFormat GetPreferredFormat(Direction dir) const; + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *pBuf) const; + virtual bool SetData(size_t len, const void *buf); + + // prevent warnings + + virtual size_t GetDataSize(const wxDataFormat&) const { return GetDataSize(); } + virtual bool GetDataHere(const wxDataFormat&, void *buf) const { return GetDataHere(buf); } + virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) { return SetData(len, buf); } + +private: + wxDataFormat m_formatRichTextBuffer; // our custom format + wxRichTextBuffer* m_richTextBuffer; // our data + static const wxChar* ms_richTextBufferFormatId; // our format id +}; + +#endif + +/** + @class wxRichTextRenderer + + This class isolates some common drawing functionality. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextRenderer: public wxObject +{ +public: + /** + Constructor. + */ + wxRichTextRenderer() {} + virtual ~wxRichTextRenderer() {} + + /** + Draws a standard bullet, as specified by the value of GetBulletName. This function should be overridden. + */ + virtual bool DrawStandardBullet(wxRichTextParagraph* paragraph, wxDC& dc, const wxRichTextAttr& attr, const wxRect& rect) = 0; + + /** + Draws a bullet that can be described by text, such as numbered or symbol bullets. This function should be overridden. + */ + virtual bool DrawTextBullet(wxRichTextParagraph* paragraph, wxDC& dc, const wxRichTextAttr& attr, const wxRect& rect, const wxString& text) = 0; + + /** + Draws a bitmap bullet, where the bullet bitmap is specified by the value of GetBulletName. This function should be overridden. + */ + virtual bool DrawBitmapBullet(wxRichTextParagraph* paragraph, wxDC& dc, const wxRichTextAttr& attr, const wxRect& rect) = 0; + + /** + Enumerate the standard bullet names currently supported. This function should be overridden. + */ + virtual bool EnumerateStandardBulletNames(wxArrayString& bulletNames) = 0; +}; + +/** + @class wxRichTextStdRenderer + + The standard renderer for drawing bullets. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextRenderer, wxRichTextBuffer, wxRichTextCtrl +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextStdRenderer: public wxRichTextRenderer +{ +public: + /** + Constructor. + */ + wxRichTextStdRenderer() {} + + // Draw a standard bullet, as specified by the value of GetBulletName + virtual bool DrawStandardBullet(wxRichTextParagraph* paragraph, wxDC& dc, const wxRichTextAttr& attr, const wxRect& rect); + + // Draw a bullet that can be described by text, such as numbered or symbol bullets + virtual bool DrawTextBullet(wxRichTextParagraph* paragraph, wxDC& dc, const wxRichTextAttr& attr, const wxRect& rect, const wxString& text); + + // Draw a bitmap bullet, where the bullet bitmap is specified by the value of GetBulletName + virtual bool DrawBitmapBullet(wxRichTextParagraph* paragraph, wxDC& dc, const wxRichTextAttr& attr, const wxRect& rect); + + // Enumerate the standard bullet names currently supported + virtual bool EnumerateStandardBulletNames(wxArrayString& bulletNames); +}; + +/*! + * Utilities + * + */ + +inline bool wxRichTextHasStyle(int flags, int style) +{ + return ((flags & style) == style); +} + +/// Compare two attribute objects +WXDLLIMPEXP_RICHTEXT bool wxTextAttrEq(const wxRichTextAttr& attr1, const wxRichTextAttr& attr2); +WXDLLIMPEXP_RICHTEXT bool wxTextAttrEq(const wxRichTextAttr& attr1, const wxRichTextAttr& attr2); + +/// Apply one style to another +WXDLLIMPEXP_RICHTEXT bool wxRichTextApplyStyle(wxRichTextAttr& destStyle, const wxRichTextAttr& style, wxRichTextAttr* compareWith = NULL); + +// Remove attributes +WXDLLIMPEXP_RICHTEXT bool wxRichTextRemoveStyle(wxRichTextAttr& destStyle, const wxRichTextAttr& style); + +/// Combine two bitlists +WXDLLIMPEXP_RICHTEXT bool wxRichTextCombineBitlists(int& valueA, int valueB, int& flagsA, int flagsB); + +/// Compare two bitlists +WXDLLIMPEXP_RICHTEXT bool wxRichTextBitlistsEqPartial(int valueA, int valueB, int flags); + +/// Split into paragraph and character styles +WXDLLIMPEXP_RICHTEXT bool wxRichTextSplitParaCharStyles(const wxRichTextAttr& style, wxRichTextAttr& parStyle, wxRichTextAttr& charStyle); + +/// Compare tabs +WXDLLIMPEXP_RICHTEXT bool wxRichTextTabsEq(const wxArrayInt& tabs1, const wxArrayInt& tabs2); + +/// Convert a decimal to Roman numerals +WXDLLIMPEXP_RICHTEXT wxString wxRichTextDecimalToRoman(long n); + +// Collects the attributes that are common to a range of content, building up a note of +// which attributes are absent in some objects and which clash in some objects. +WXDLLIMPEXP_RICHTEXT void wxTextAttrCollectCommonAttributes(wxTextAttr& currentStyle, const wxTextAttr& attr, wxTextAttr& clashingAttr, wxTextAttr& absentAttr); + +WXDLLIMPEXP_RICHTEXT void wxRichTextModuleInit(); + +#endif + // wxUSE_RICHTEXT + +#endif + // _WX_RICHTEXTBUFFER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextbulletspage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextbulletspage.h new file mode 100644 index 0000000000..4cf6b7745a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextbulletspage.h @@ -0,0 +1,220 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextbulletspage.h +// Purpose: +// Author: Julian Smart +// Modified by: +// Created: 10/4/2006 10:32:31 AM +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTBULLETSPAGE_H_ +#define _RICHTEXTBULLETSPAGE_H_ + +/*! + * Includes + */ + +#include "wx/richtext/richtextdialogpage.h" +#include "wx/spinbutt.h" // for wxSpinEvent + +/*! + * Forward declarations + */ + +////@begin forward declarations +class wxSpinCtrl; +class wxRichTextCtrl; +////@end forward declarations + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTBULLETSPAGE_TITLE wxEmptyString +#define SYMBOL_WXRICHTEXTBULLETSPAGE_IDNAME ID_RICHTEXTBULLETSPAGE +#define SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition +////@end control identifiers + +/*! + * wxRichTextBulletsPage class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextBulletsPage: public wxRichTextDialogPage +{ + DECLARE_DYNAMIC_CLASS( wxRichTextBulletsPage ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxRichTextBulletsPage( ); + wxRichTextBulletsPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE ); + + /// Initialise members + void Init(); + + /// Creates the controls and sizers + void CreateControls(); + + /// Updates the bullets preview + void UpdatePreview(); + + /// Transfer data from/to window + virtual bool TransferDataFromWindow(); + virtual bool TransferDataToWindow(); + + /// Gets the attributes associated with the main formatting dialog + wxRichTextAttr* GetAttributes(); + + /// Update for symbol-related controls + void OnSymbolUpdate( wxUpdateUIEvent& event ); + + /// Update for number-related controls + void OnNumberUpdate( wxUpdateUIEvent& event ); + + /// Update for standard bullet-related controls + void OnStandardBulletUpdate( wxUpdateUIEvent& event ); + +////@begin wxRichTextBulletsPage event handler declarations + + /// wxEVT_LISTBOX event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX + void OnStylelistboxSelected( wxCommandEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL + void OnPeriodctrlClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL + void OnPeriodctrlUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL + void OnParenthesesctrlClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL + void OnParenthesesctrlUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL + void OnRightParenthesisCtrlClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL + void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL + void OnBulletAlignmentCtrlSelected( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC + void OnSymbolstaticUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + void OnSymbolctrlSelected( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + void OnSymbolctrlUpdated( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + void OnSymbolctrlUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL + void OnChooseSymbolClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL + void OnChooseSymbolUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL + void OnSymbolfontctrlSelected( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL + void OnSymbolfontctrlUpdated( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL + void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC + void OnNamestaticUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL + void OnNamectrlSelected( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL + void OnNamectrlUpdated( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL + void OnNamectrlUIUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC + void OnNumberstaticUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_SPINCTRL event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL + void OnNumberctrlUpdated( wxSpinEvent& event ); + + /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL + void OnNumberctrlUp( wxSpinEvent& event ); + + /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL + void OnNumberctrlDown( wxSpinEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL + void OnNumberctrlTextUpdated( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL + void OnNumberctrlUpdate( wxUpdateUIEvent& event ); + +////@end wxRichTextBulletsPage event handler declarations + +////@begin wxRichTextBulletsPage member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextBulletsPage member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin wxRichTextBulletsPage member variables + wxListBox* m_styleListBox; + wxCheckBox* m_periodCtrl; + wxCheckBox* m_parenthesesCtrl; + wxCheckBox* m_rightParenthesisCtrl; + wxComboBox* m_bulletAlignmentCtrl; + wxComboBox* m_symbolCtrl; + wxComboBox* m_symbolFontCtrl; + wxComboBox* m_bulletNameCtrl; + wxSpinCtrl* m_numberCtrl; + wxRichTextCtrl* m_previewCtrl; + /// Control identifiers + enum { + ID_RICHTEXTBULLETSPAGE = 10300, + ID_RICHTEXTBULLETSPAGE_STYLELISTBOX = 10305, + ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313, + ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311, + ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL = 10306, + ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL = 10315, + ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC = 10301, + ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10307, + ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10308, + ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL = 10309, + ID_RICHTEXTBULLETSPAGE_NAMESTATIC = 10303, + ID_RICHTEXTBULLETSPAGE_NAMECTRL = 10304, + ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC = 10302, + ID_RICHTEXTBULLETSPAGE_NUMBERCTRL = 10310, + ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL = 10314 + }; +////@end wxRichTextBulletsPage member variables + + bool m_hasBulletStyle; + bool m_hasBulletNumber; + bool m_hasBulletSymbol; + bool m_dontUpdate; +}; + +#endif + // _RICHTEXTBULLETSPAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextctrl.h new file mode 100644 index 0000000000..93e26d6bc9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextctrl.h @@ -0,0 +1,2638 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextctrl.h +// Purpose: A rich edit control +// Author: Julian Smart +// Modified by: +// Created: 2005-09-30 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RICHTEXTCTRL_H_ +#define _WX_RICHTEXTCTRL_H_ + +#include "wx/richtext/richtextbuffer.h" + +#if wxUSE_RICHTEXT + +#include "wx/scrolwin.h" +#include "wx/caret.h" + +#include "wx/textctrl.h" + +#if wxUSE_DRAG_AND_DROP +#include "wx/dnd.h" +#endif + +#if !defined(__WXGTK__) && !defined(__WXMAC__) +#define wxRICHTEXT_BUFFERED_PAINTING 1 +#else +#define wxRICHTEXT_BUFFERED_PAINTING 0 +#endif + +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextStyleDefinition; + +/* + * Styles and flags + */ + +/** + Styles +*/ + +#define wxRE_READONLY 0x0010 +#define wxRE_MULTILINE 0x0020 +#define wxRE_CENTRE_CARET 0x8000 +#define wxRE_CENTER_CARET wxRE_CENTRE_CARET + +/** + Flags +*/ + +#define wxRICHTEXT_SHIFT_DOWN 0x01 +#define wxRICHTEXT_CTRL_DOWN 0x02 +#define wxRICHTEXT_ALT_DOWN 0x04 + +/** + Extra flags +*/ + +// Don't draw guide lines around boxes and tables +#define wxRICHTEXT_EX_NO_GUIDELINES 0x00000100 + + +/* + Defaults +*/ + +#define wxRICHTEXT_DEFAULT_OVERALL_SIZE wxSize(-1, -1) +#define wxRICHTEXT_DEFAULT_IMAGE_SIZE wxSize(80, 80) +#define wxRICHTEXT_DEFAULT_SPACING 3 +#define wxRICHTEXT_DEFAULT_MARGIN 3 +#define wxRICHTEXT_DEFAULT_UNFOCUSSED_BACKGROUND wxColour(175, 175, 175) +#define wxRICHTEXT_DEFAULT_FOCUSSED_BACKGROUND wxColour(140, 140, 140) +#define wxRICHTEXT_DEFAULT_UNSELECTED_BACKGROUND wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE) +#define wxRICHTEXT_DEFAULT_TYPE_COLOUR wxColour(0, 0, 200) +#define wxRICHTEXT_DEFAULT_FOCUS_RECT_COLOUR wxColour(100, 80, 80) +#define wxRICHTEXT_DEFAULT_CARET_WIDTH 2 +// Minimum buffer size before delayed layout kicks in +#define wxRICHTEXT_DEFAULT_DELAYED_LAYOUT_THRESHOLD 20000 +// Milliseconds before layout occurs after resize +#define wxRICHTEXT_DEFAULT_LAYOUT_INTERVAL 50 + +/* Identifiers + */ +#define wxID_RICHTEXT_PROPERTIES1 (wxID_HIGHEST + 1) +#define wxID_RICHTEXT_PROPERTIES2 (wxID_HIGHEST + 2) +#define wxID_RICHTEXT_PROPERTIES3 (wxID_HIGHEST + 3) + +/* + Normal selection occurs initially and as user drags within one container. + Common ancestor selection occurs when the user starts dragging across containers + that have a common ancestor, for example the cells in a table. + */ + +enum wxRichTextCtrlSelectionState +{ + wxRichTextCtrlSelectionState_Normal, + wxRichTextCtrlSelectionState_CommonAncestor +}; + +/** + @class wxRichTextContextMenuPropertiesInfo + + wxRichTextContextMenuPropertiesInfo keeps track of objects that appear in the context menu, + whose properties are available to be edited. + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextContextMenuPropertiesInfo +{ +public: + /** + Constructor. + */ + wxRichTextContextMenuPropertiesInfo() { Init(); } + +// Operations + + /** + Initialisation. + */ + void Init() {} + + /** + Adds an item. + */ + bool AddItem(const wxString& label, wxRichTextObject* obj); + + /** + Returns the number of menu items that were added. + */ + int AddMenuItems(wxMenu* menu, int startCmd = wxID_RICHTEXT_PROPERTIES1) const; + + /** + Adds appropriate menu items for the current container and clicked on object + (and container's parent, if appropriate). + */ + int AddItems(wxRichTextCtrl* ctrl, wxRichTextObject* container, wxRichTextObject* obj); + + /** + Clears the items. + */ + void Clear() { m_objects.Clear(); m_labels.Clear(); } + +// Accessors + + /** + Returns the nth label. + */ + wxString GetLabel(int n) const { return m_labels[n]; } + + /** + Returns the nth object. + */ + wxRichTextObject* GetObject(int n) const { return m_objects[n]; } + + /** + Returns the array of objects. + */ + wxRichTextObjectPtrArray& GetObjects() { return m_objects; } + + /** + Returns the array of objects. + */ + const wxRichTextObjectPtrArray& GetObjects() const { return m_objects; } + + /** + Returns the array of labels. + */ + wxArrayString& GetLabels() { return m_labels; } + + /** + Returns the array of labels. + */ + const wxArrayString& GetLabels() const { return m_labels; } + + /** + Returns the number of items. + */ + int GetCount() const { return m_objects.GetCount(); } + + wxRichTextObjectPtrArray m_objects; + wxArrayString m_labels; +}; + +/** + @class wxRichTextCtrl + + wxRichTextCtrl provides a generic, ground-up implementation of a text control + capable of showing multiple styles and images. + + wxRichTextCtrl sends notification events: see wxRichTextEvent. + + It also sends the standard wxTextCtrl events @c wxEVT_TEXT_ENTER and + @c wxEVT_TEXT, and wxTextUrlEvent when URL content is clicked. + + For more information, see the @ref overview_richtextctrl. + + @beginStyleTable + @style{wxRE_CENTRE_CARET} + The control will try to keep the caret line centred vertically while editing. + wxRE_CENTER_CARET is a synonym for this style. + @style{wxRE_MULTILINE} + The control will be multiline (mandatory). + @style{wxRE_READONLY} + The control will not be editable. + @endStyleTable + + @library{wxrichtext} + @category{richtext} + @appearance{richtextctrl.png} + + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextCtrl : public wxControl, + public wxTextCtrlIface, + public wxScrollHelper +{ + DECLARE_DYNAMIC_CLASS( wxRichTextCtrl ) + DECLARE_EVENT_TABLE() + +public: +// Constructors + + /** + Default constructor. + */ + wxRichTextCtrl( ); + + /** + Constructor, creating and showing a rich text control. + + @param parent + Parent window. Must not be @NULL. + @param id + Window identifier. The value @c wxID_ANY indicates a default value. + @param value + Default string. + @param pos + Window position. + @param size + Window size. + @param style + Window style. + @param validator + Window validator. + @param name + Window name. + + @see Create(), wxValidator + */ + wxRichTextCtrl( wxWindow* parent, wxWindowID id = -1, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxRE_MULTILINE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr); + + /** + Destructor. + */ + virtual ~wxRichTextCtrl( ); + +// Operations + + /** + Creates the underlying window. + */ + bool Create( wxWindow* parent, wxWindowID id = -1, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxRE_MULTILINE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr ); + + /** + Initialises the members of the control. + */ + void Init(); + +// Accessors + + /** + Gets the text for the given range. + The end point of range is specified as the last character position of + the span of text, plus one. + */ + virtual wxString GetRange(long from, long to) const; + + /** + Returns the length of the specified line in characters. + */ + virtual int GetLineLength(long lineNo) const ; + + /** + Returns the text for the given line. + */ + virtual wxString GetLineText(long lineNo) const ; + + /** + Returns the number of lines in the buffer. + */ + virtual int GetNumberOfLines() const ; + + /** + Returns @true if the buffer has been modified. + */ + virtual bool IsModified() const ; + + /** + Returns @true if the control is editable. + */ + virtual bool IsEditable() const ; + + /** + Returns @true if the control is single-line. + Currently wxRichTextCtrl does not support single-line editing. + */ + bool IsSingleLine() const { return !HasFlag(wxRE_MULTILINE); } + + /** + Returns @true if the control is multiline. + */ + bool IsMultiLine() const { return !IsSingleLine(); } + + //@{ + /** + Returns the range of the current selection. + The end point of range is specified as the last character position of the span + of text, plus one. + If the return values @a from and @a to are the same, there is no selection. + */ + virtual void GetSelection(long* from, long* to) const; + const wxRichTextSelection& GetSelection() const { return m_selection; } + wxRichTextSelection& GetSelection() { return m_selection; } + //@} + + /** + Returns the text within the current selection range, if any. + */ + virtual wxString GetStringSelection() const; + + /** + Gets the current filename associated with the control. + */ + wxString GetFilename() const { return m_filename; } + + /** + Sets the current filename. + */ + void SetFilename(const wxString& filename) { m_filename = filename; } + + /** + Sets the size of the buffer beyond which layout is delayed during resizing. + This optimizes sizing for large buffers. The default is 20000. + */ + void SetDelayedLayoutThreshold(long threshold) { m_delayedLayoutThreshold = threshold; } + + /** + Gets the size of the buffer beyond which layout is delayed during resizing. + This optimizes sizing for large buffers. The default is 20000. + */ + long GetDelayedLayoutThreshold() const { return m_delayedLayoutThreshold; } + + /** + Gets the flag indicating that full layout is required. + */ + bool GetFullLayoutRequired() const { return m_fullLayoutRequired; } + + /** + Sets the flag indicating that full layout is required. + */ + void SetFullLayoutRequired(bool b) { m_fullLayoutRequired = b; } + + /** + Returns the last time full layout was performed. + */ + wxLongLong GetFullLayoutTime() const { return m_fullLayoutTime; } + + /** + Sets the last time full layout was performed. + */ + void SetFullLayoutTime(wxLongLong t) { m_fullLayoutTime = t; } + + /** + Returns the position that should be shown when full (delayed) layout is performed. + */ + long GetFullLayoutSavedPosition() const { return m_fullLayoutSavedPosition; } + + /** + Sets the position that should be shown when full (delayed) layout is performed. + */ + void SetFullLayoutSavedPosition(long p) { m_fullLayoutSavedPosition = p; } + + /** + Forces any pending layout due to delayed, partial layout when the control + was resized. + */ + void ForceDelayedLayout(); + + /** + Sets the text (normal) cursor. + */ + void SetTextCursor(const wxCursor& cursor ) { m_textCursor = cursor; } + + /** + Returns the text (normal) cursor. + */ + wxCursor GetTextCursor() const { return m_textCursor; } + + /** + Sets the cursor to be used over URLs. + */ + void SetURLCursor(const wxCursor& cursor ) { m_urlCursor = cursor; } + + /** + Returns the cursor to be used over URLs. + */ + wxCursor GetURLCursor() const { return m_urlCursor; } + + /** + Returns @true if we are showing the caret position at the start of a line + instead of at the end of the previous one. + */ + bool GetCaretAtLineStart() const { return m_caretAtLineStart; } + + /** + Sets a flag to remember that we are showing the caret position at the start of a line + instead of at the end of the previous one. + */ + void SetCaretAtLineStart(bool atStart) { m_caretAtLineStart = atStart; } + + /** + Returns @true if we are dragging a selection. + */ + bool GetDragging() const { return m_dragging; } + + /** + Sets a flag to remember if we are dragging a selection. + */ + void SetDragging(bool dragging) { m_dragging = dragging; } + +#if wxUSE_DRAG_AND_DROP + /** + Are we trying to start Drag'n'Drop? + */ + bool GetPreDrag() const { return m_preDrag; } + + /** + Set if we're trying to start Drag'n'Drop + */ + void SetPreDrag(bool pd) { m_preDrag = pd; } + + /** + Get the possible Drag'n'Drop start point + */ + const wxPoint GetDragStartPoint() const { return m_dragStartPoint; } + + /** + Set the possible Drag'n'Drop start point + */ + void SetDragStartPoint(wxPoint sp) { m_dragStartPoint = sp; } + +#if wxUSE_DATETIME + /** + Get the possible Drag'n'Drop start time + */ + const wxDateTime GetDragStartTime() const { return m_dragStartTime; } + + /** + Set the possible Drag'n'Drop start time + */ + void SetDragStartTime(wxDateTime st) { m_dragStartTime = st; } +#endif // wxUSE_DATETIME + +#endif // wxUSE_DRAG_AND_DROP + +#if wxRICHTEXT_BUFFERED_PAINTING + //@{ + /** + Returns the buffer bitmap if using buffered painting. + */ + const wxBitmap& GetBufferBitmap() const { return m_bufferBitmap; } + wxBitmap& GetBufferBitmap() { return m_bufferBitmap; } + //@} +#endif + + /** + Returns the current context menu. + */ + wxMenu* GetContextMenu() const { return m_contextMenu; } + + /** + Sets the current context menu. + */ + void SetContextMenu(wxMenu* menu); + + /** + Returns an anchor so we know how to extend the selection. + It's a caret position since it's between two characters. + */ + long GetSelectionAnchor() const { return m_selectionAnchor; } + + /** + Sets an anchor so we know how to extend the selection. + It's a caret position since it's between two characters. + */ + void SetSelectionAnchor(long anchor) { m_selectionAnchor = anchor; } + + /** + Returns the anchor object if selecting multiple containers. + */ + wxRichTextObject* GetSelectionAnchorObject() const { return m_selectionAnchorObject; } + + /** + Sets the anchor object if selecting multiple containers. + */ + void SetSelectionAnchorObject(wxRichTextObject* anchor) { m_selectionAnchorObject = anchor; } + + //@{ + /** + Returns an object that stores information about context menu property item(s), + in order to communicate between the context menu event handler and the code + that responds to it. The wxRichTextContextMenuPropertiesInfo stores one + item for each object that could respond to a property-editing event. If + objects are nested, several might be editable. + */ + wxRichTextContextMenuPropertiesInfo& GetContextMenuPropertiesInfo() { return m_contextMenuPropertiesInfo; } + const wxRichTextContextMenuPropertiesInfo& GetContextMenuPropertiesInfo() const { return m_contextMenuPropertiesInfo; } + //@} + + /** + Returns the wxRichTextObject object that currently has the editing focus. + If there are no composite objects, this will be the top-level buffer. + */ + wxRichTextParagraphLayoutBox* GetFocusObject() const { return m_focusObject; } + + /** + Sets m_focusObject without making any alterations. + */ + void StoreFocusObject(wxRichTextParagraphLayoutBox* obj) { m_focusObject = obj; } + + /** + Sets the wxRichTextObject object that currently has the editing focus. + */ + bool SetFocusObject(wxRichTextParagraphLayoutBox* obj, bool setCaretPosition = true); + +// Operations + + /** + Invalidates the whole buffer to trigger painting later. + */ + void Invalidate() { GetBuffer().Invalidate(wxRICHTEXT_ALL); } + + /** + Clears the buffer content, leaving a single empty paragraph. Cannot be undone. + */ + virtual void Clear(); + + /** + Replaces the content in the specified range with the string specified by + @a value. + */ + virtual void Replace(long from, long to, const wxString& value); + + /** + Removes the content in the specified range. + */ + virtual void Remove(long from, long to); + +#ifdef DOXYGEN + /** + Loads content into the control's buffer using the given type. + + If the specified type is wxRICHTEXT_TYPE_ANY, the type is deduced from + the filename extension. + + This function looks for a suitable wxRichTextFileHandler object. + */ + bool LoadFile(const wxString& file, + int type = wxRICHTEXT_TYPE_ANY); +#endif + +#if wxUSE_FFILE && wxUSE_STREAMS + /** + Helper function for LoadFile(). Loads content into the control's buffer using the given type. + + If the specified type is wxRICHTEXT_TYPE_ANY, the type is deduced from + the filename extension. + + This function looks for a suitable wxRichTextFileHandler object. + */ + virtual bool DoLoadFile(const wxString& file, int fileType); +#endif // wxUSE_FFILE && wxUSE_STREAMS + +#ifdef DOXYGEN + /** + Saves the buffer content using the given type. + + If the specified type is wxRICHTEXT_TYPE_ANY, the type is deduced from + the filename extension. + + This function looks for a suitable wxRichTextFileHandler object. + */ + bool SaveFile(const wxString& file = wxEmptyString, + int type = wxRICHTEXT_TYPE_ANY); +#endif + +#if wxUSE_FFILE && wxUSE_STREAMS + /** + Helper function for SaveFile(). Saves the buffer content using the given type. + + If the specified type is wxRICHTEXT_TYPE_ANY, the type is deduced from + the filename extension. + + This function looks for a suitable wxRichTextFileHandler object. + */ + virtual bool DoSaveFile(const wxString& file = wxEmptyString, + int fileType = wxRICHTEXT_TYPE_ANY); +#endif // wxUSE_FFILE && wxUSE_STREAMS + + /** + Sets flags that change the behaviour of loading or saving. + + See the documentation for each handler class to see what flags are + relevant for each handler. + */ + void SetHandlerFlags(int flags) { GetBuffer().SetHandlerFlags(flags); } + + /** + Returns flags that change the behaviour of loading or saving. + See the documentation for each handler class to see what flags are + relevant for each handler. + */ + int GetHandlerFlags() const { return GetBuffer().GetHandlerFlags(); } + + /** + Marks the buffer as modified. + */ + virtual void MarkDirty(); + + /** + Sets the buffer's modified status to @false, and clears the buffer's command + history. + */ + virtual void DiscardEdits(); + + /** + Sets the maximum number of characters that may be entered in a single line + text control. For compatibility only; currently does nothing. + */ + virtual void SetMaxLength(unsigned long WXUNUSED(len)) { } + + /** + Writes text at the current position. + */ + virtual void WriteText(const wxString& text); + + /** + Sets the insertion point to the end of the buffer and writes the text. + */ + virtual void AppendText(const wxString& text); + + //@{ + /** + Gets the attributes at the given position. + This function gets the combined style - that is, the style you see on the + screen as a result of combining base style, paragraph style and character + style attributes. + + To get the character or paragraph style alone, use GetUncombinedStyle(). + + @beginWxPerlOnly + In wxPerl this method is implemented as GetStyle(@a position) + returning a 2-element list (ok, attr). + @endWxPerlOnly + */ + virtual bool GetStyle(long position, wxTextAttr& style); + virtual bool GetStyle(long position, wxRichTextAttr& style); + virtual bool GetStyle(long position, wxRichTextAttr& style, wxRichTextParagraphLayoutBox* container); + //@} + + //@{ + /** + Sets the attributes for the given range. + The end point of range is specified as the last character position of the span + of text, plus one. + + So, for example, to set the style for a character at position 5, use the range + (5,6). + */ + virtual bool SetStyle(long start, long end, const wxTextAttr& style); + virtual bool SetStyle(long start, long end, const wxRichTextAttr& style); + virtual bool SetStyle(const wxRichTextRange& range, const wxTextAttr& style); + virtual bool SetStyle(const wxRichTextRange& range, const wxRichTextAttr& style); + //@} + + /** + Sets the attributes for a single object + */ + virtual void SetStyle(wxRichTextObject *obj, const wxRichTextAttr& textAttr, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO); + + //@{ + /** + Gets the attributes common to the specified range. + Attributes that differ in value within the range will not be included + in @a style flags. + + @beginWxPerlOnly + In wxPerl this method is implemented as GetStyleForRange(@a position) + returning a 2-element list (ok, attr). + @endWxPerlOnly + */ + virtual bool GetStyleForRange(const wxRichTextRange& range, wxTextAttr& style); + virtual bool GetStyleForRange(const wxRichTextRange& range, wxRichTextAttr& style); + virtual bool GetStyleForRange(const wxRichTextRange& range, wxRichTextAttr& style, wxRichTextParagraphLayoutBox* container); + //@} + + /** + Sets the attributes for the given range, passing flags to determine how the + attributes are set. + + The end point of range is specified as the last character position of the span + of text, plus one. So, for example, to set the style for a character at + position 5, use the range (5,6). + + @a flags may contain a bit list of the following values: + - wxRICHTEXT_SETSTYLE_NONE: no style flag. + - wxRICHTEXT_SETSTYLE_WITH_UNDO: specifies that this operation should be + undoable. + - wxRICHTEXT_SETSTYLE_OPTIMIZE: specifies that the style should not be applied + if the combined style at this point is already the style in question. + - wxRICHTEXT_SETSTYLE_PARAGRAPHS_ONLY: specifies that the style should only be + applied to paragraphs, and not the content. + This allows content styling to be preserved independently from that + of e.g. a named paragraph style. + - wxRICHTEXT_SETSTYLE_CHARACTERS_ONLY: specifies that the style should only be + applied to characters, and not the paragraph. + This allows content styling to be preserved independently from that + of e.g. a named paragraph style. + - wxRICHTEXT_SETSTYLE_RESET: resets (clears) the existing style before applying + the new style. + - wxRICHTEXT_SETSTYLE_REMOVE: removes the specified style. Only the style flags + are used in this operation. + */ + virtual bool SetStyleEx(const wxRichTextRange& range, const wxRichTextAttr& style, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO); + + //@{ + /** + Gets the attributes at the given position. + This function gets the @e uncombined style - that is, the attributes associated + with the paragraph or character content, and not necessarily the combined + attributes you see on the screen. + To get the combined attributes, use GetStyle(). + + If you specify (any) paragraph attribute in @e style's flags, this function + will fetch the paragraph attributes. + Otherwise, it will return the character attributes. + + @beginWxPerlOnly + In wxPerl this method is implemented as GetUncombinedStyle(@a position) + returning a 2-element list (ok, attr). + @endWxPerlOnly + */ + virtual bool GetUncombinedStyle(long position, wxRichTextAttr& style); + virtual bool GetUncombinedStyle(long position, wxRichTextAttr& style, wxRichTextParagraphLayoutBox* container); + //@} + + //@{ + /** + Sets the current default style, which can be used to change how subsequently + inserted text is displayed. + */ + virtual bool SetDefaultStyle(const wxTextAttr& style); + virtual bool SetDefaultStyle(const wxRichTextAttr& style); + //@} + + /** + Returns the current default style, which can be used to change how subsequently + inserted text is displayed. + */ + virtual const wxRichTextAttr& GetDefaultStyleEx() const; + + //virtual const wxTextAttr& GetDefaultStyle() const; + + //@{ + /** + Sets the list attributes for the given range, passing flags to determine how + the attributes are set. + + Either the style definition or the name of the style definition (in the current + sheet) can be passed. + @a flags is a bit list of the following: + - wxRICHTEXT_SETSTYLE_WITH_UNDO: specifies that this command will be undoable. + - wxRICHTEXT_SETSTYLE_RENUMBER: specifies that numbering should start from + @a startFrom, otherwise existing attributes are used. + - wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL: specifies that @a listLevel should be used + as the level for all paragraphs, otherwise the current indentation will be used. + + @see NumberList(), PromoteList(), ClearListStyle(). + */ + virtual bool SetListStyle(const wxRichTextRange& range, wxRichTextListStyleDefinition* def, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1); + virtual bool SetListStyle(const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1); + //@} + + /** + Clears the list style from the given range, clearing list-related attributes + and applying any named paragraph style associated with each paragraph. + + @a flags is a bit list of the following: + - wxRICHTEXT_SETSTYLE_WITH_UNDO: specifies that this command will be undoable. + + @see SetListStyle(), PromoteList(), NumberList(). + */ + virtual bool ClearListStyle(const wxRichTextRange& range, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO); + + //@{ + /** + Numbers the paragraphs in the given range. + Pass flags to determine how the attributes are set. + + Either the style definition or the name of the style definition (in the current + sheet) can be passed. + + @a flags is a bit list of the following: + - wxRICHTEXT_SETSTYLE_WITH_UNDO: specifies that this command will be undoable. + - wxRICHTEXT_SETSTYLE_RENUMBER: specifies that numbering should start from + @a startFrom, otherwise existing attributes are used. + - wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL: specifies that @a listLevel should be used + as the level for all paragraphs, otherwise the current indentation will be used. + + @see SetListStyle(), PromoteList(), ClearListStyle(). + */ + virtual bool NumberList(const wxRichTextRange& range, wxRichTextListStyleDefinition* def = NULL, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1); + virtual bool NumberList(const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1); + //@} + + //@{ + /** + Promotes or demotes the paragraphs in the given range. + A positive @a promoteBy produces a smaller indent, and a negative number + produces a larger indent. Pass flags to determine how the attributes are set. + Either the style definition or the name of the style definition (in the current + sheet) can be passed. + + @a flags is a bit list of the following: + - wxRICHTEXT_SETSTYLE_WITH_UNDO: specifies that this command will be undoable. + - wxRICHTEXT_SETSTYLE_RENUMBER: specifies that numbering should start from + @a startFrom, otherwise existing attributes are used. + - wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL: specifies that @a listLevel should be used + as the level for all paragraphs, otherwise the current indentation will be used. + + @see SetListStyle(), @see SetListStyle(), ClearListStyle(). + */ + virtual bool PromoteList(int promoteBy, const wxRichTextRange& range, wxRichTextListStyleDefinition* def = NULL, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int specifiedLevel = -1); + virtual bool PromoteList(int promoteBy, const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int specifiedLevel = -1); + //@} + + /** + Sets the properties for the given range, passing flags to determine how the + attributes are set. You can merge properties or replace them. + + The end point of range is specified as the last character position of the span + of text, plus one. So, for example, to set the properties for a character at + position 5, use the range (5,6). + + @a flags may contain a bit list of the following values: + - wxRICHTEXT_SETSPROPERTIES_NONE: no flag. + - wxRICHTEXT_SETPROPERTIES_WITH_UNDO: specifies that this operation should be + undoable. + - wxRICHTEXT_SETPROPERTIES_PARAGRAPHS_ONLY: specifies that the properties should only be + applied to paragraphs, and not the content. + - wxRICHTEXT_SETPROPERTIES_CHARACTERS_ONLY: specifies that the properties should only be + applied to characters, and not the paragraph. + - wxRICHTEXT_SETPROPERTIES_RESET: resets (clears) the existing properties before applying + the new properties. + - wxRICHTEXT_SETPROPERTIES_REMOVE: removes the specified properties. + */ + virtual bool SetProperties(const wxRichTextRange& range, const wxRichTextProperties& properties, int flags = wxRICHTEXT_SETPROPERTIES_WITH_UNDO); + + /** + Deletes the content within the given range. + */ + virtual bool Delete(const wxRichTextRange& range); + + /** + Translates from column and line number to position. + */ + virtual long XYToPosition(long x, long y) const; + + /** + Converts a text position to zero-based column and line numbers. + */ + virtual bool PositionToXY(long pos, long *x, long *y) const; + + /** + Scrolls the buffer so that the given position is in view. + */ + virtual void ShowPosition(long pos); + + //@{ + /** + Finds the character at the given position in pixels. + @a pt is in device coords (not adjusted for the client area origin nor for + scrolling). + */ + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const; + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const; + + /** + Finds the container at the given point, which is in screen coordinates. + */ + wxRichTextParagraphLayoutBox* FindContainerAtPoint(const wxPoint pt, long& position, int& hit, wxRichTextObject* hitObj, int flags = 0); + //@} + +#if wxUSE_DRAG_AND_DROP + /** + Does the 'drop' of Drag'n'Drop. + */ + void OnDrop(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxDragResult def, wxDataObject* DataObj); +#endif + +// Clipboard operations + + /** + Copies the selected content (if any) to the clipboard. + */ + virtual void Copy(); + + /** + Copies the selected content (if any) to the clipboard and deletes the selection. + This is undoable. + */ + virtual void Cut(); + + /** + Pastes content from the clipboard to the buffer. + */ + virtual void Paste(); + + /** + Deletes the content in the selection, if any. This is undoable. + */ + virtual void DeleteSelection(); + + /** + Returns @true if selected content can be copied to the clipboard. + */ + virtual bool CanCopy() const; + + /** + Returns @true if selected content can be copied to the clipboard and deleted. + */ + virtual bool CanCut() const; + + /** + Returns @true if the clipboard content can be pasted to the buffer. + */ + virtual bool CanPaste() const; + + /** + Returns @true if selected content can be deleted. + */ + virtual bool CanDeleteSelection() const; + + /** + Undoes the command at the top of the command history, if there is one. + */ + virtual void Undo(); + + /** + Redoes the current command. + */ + virtual void Redo(); + + /** + Returns @true if there is a command in the command history that can be undone. + */ + virtual bool CanUndo() const; + + /** + Returns @true if there is a command in the command history that can be redone. + */ + virtual bool CanRedo() const; + + /** + Sets the insertion point and causes the current editing style to be taken from + the new position (unlike wxRichTextCtrl::SetCaretPosition). + */ + virtual void SetInsertionPoint(long pos); + + /** + Sets the insertion point to the end of the text control. + */ + virtual void SetInsertionPointEnd(); + + /** + Returns the current insertion point. + */ + virtual long GetInsertionPoint() const; + + /** + Returns the last position in the buffer. + */ + virtual wxTextPos GetLastPosition() const; + + //@{ + /** + Sets the selection to the given range. + The end point of range is specified as the last character position of the span + of text, plus one. + + So, for example, to set the selection for a character at position 5, use the + range (5,6). + */ + virtual void SetSelection(long from, long to); + void SetSelection(const wxRichTextSelection& sel) { m_selection = sel; } + //@} + + /** + Makes the control editable, or not. + */ + virtual void SetEditable(bool editable); + + /** + Returns @true if there is a selection and the object containing the selection + was the same as the current focus object. + */ + virtual bool HasSelection() const; + + /** + Returns @true if there was a selection, whether or not the current focus object + is the same as the selection's container object. + */ + virtual bool HasUnfocusedSelection() const; + + //@{ + /** + Write a bitmap or image at the current insertion point. + Supply an optional type to use for internal and file storage of the raw data. + */ + virtual bool WriteImage(const wxImage& image, wxBitmapType bitmapType = wxBITMAP_TYPE_PNG, + const wxRichTextAttr& textAttr = wxRichTextAttr()); + + virtual bool WriteImage(const wxBitmap& bitmap, wxBitmapType bitmapType = wxBITMAP_TYPE_PNG, + const wxRichTextAttr& textAttr = wxRichTextAttr()); + //@} + + /** + Loads an image from a file and writes it at the current insertion point. + */ + virtual bool WriteImage(const wxString& filename, wxBitmapType bitmapType, + const wxRichTextAttr& textAttr = wxRichTextAttr()); + + /** + Writes an image block at the current insertion point. + */ + virtual bool WriteImage(const wxRichTextImageBlock& imageBlock, + const wxRichTextAttr& textAttr = wxRichTextAttr()); + + /** + Write a text box at the current insertion point, returning the text box. + You can then call SetFocusObject() to set the focus to the new object. + */ + virtual wxRichTextBox* WriteTextBox(const wxRichTextAttr& textAttr = wxRichTextAttr()); + + /** + Writes a field at the current insertion point. + + @param fieldType + The field type, matching an existing field type definition. + @param properties + Extra data for the field. + @param textAttr + Optional attributes. + + @see wxRichTextField, wxRichTextFieldType, wxRichTextFieldTypeStandard + */ + virtual wxRichTextField* WriteField(const wxString& fieldType, const wxRichTextProperties& properties, + const wxRichTextAttr& textAttr = wxRichTextAttr()); + + /** + Write a table at the current insertion point, returning the table. + You can then call SetFocusObject() to set the focus to the new object. + */ + virtual wxRichTextTable* WriteTable(int rows, int cols, const wxRichTextAttr& tableAttr = wxRichTextAttr(), const wxRichTextAttr& cellAttr = wxRichTextAttr()); + + /** + Inserts a new paragraph at the current insertion point. @see LineBreak(). + */ + virtual bool Newline(); + + /** + Inserts a line break at the current insertion point. + + A line break forces wrapping within a paragraph, and can be introduced by + using this function, by appending the wxChar value @b wxRichTextLineBreakChar + to text content, or by typing Shift-Return. + */ + virtual bool LineBreak(); + + /** + Sets the basic (overall) style. + + This is the style of the whole buffer before further styles are applied, + unlike the default style, which only affects the style currently being + applied (for example, setting the default style to bold will cause + subsequently inserted text to be bold). + */ + virtual void SetBasicStyle(const wxRichTextAttr& style) { GetBuffer().SetBasicStyle(style); } + + /** + Gets the basic (overall) style. + + This is the style of the whole buffer before further styles are applied, + unlike the default style, which only affects the style currently being + applied (for example, setting the default style to bold will cause + subsequently inserted text to be bold). + */ + virtual const wxRichTextAttr& GetBasicStyle() const { return GetBuffer().GetBasicStyle(); } + + /** + Begins applying a style. + */ + virtual bool BeginStyle(const wxRichTextAttr& style) { return GetBuffer().BeginStyle(style); } + + /** + Ends the current style. + */ + virtual bool EndStyle() { return GetBuffer().EndStyle(); } + + /** + Ends application of all styles in the current style stack. + */ + virtual bool EndAllStyles() { return GetBuffer().EndAllStyles(); } + + /** + Begins using bold. + */ + bool BeginBold() { return GetBuffer().BeginBold(); } + + /** + Ends using bold. + */ + bool EndBold() { return GetBuffer().EndBold(); } + + /** + Begins using italic. + */ + bool BeginItalic() { return GetBuffer().BeginItalic(); } + + /** + Ends using italic. + */ + bool EndItalic() { return GetBuffer().EndItalic(); } + + /** + Begins using underlining. + */ + bool BeginUnderline() { return GetBuffer().BeginUnderline(); } + + /** + End applying underlining. + */ + bool EndUnderline() { return GetBuffer().EndUnderline(); } + + /** + Begins using the given point size. + */ + bool BeginFontSize(int pointSize) { return GetBuffer().BeginFontSize(pointSize); } + + /** + Ends using a point size. + */ + bool EndFontSize() { return GetBuffer().EndFontSize(); } + + /** + Begins using this font. + */ + bool BeginFont(const wxFont& font) { return GetBuffer().BeginFont(font); } + + /** + Ends using a font. + */ + bool EndFont() { return GetBuffer().EndFont(); } + + /** + Begins using this colour. + */ + bool BeginTextColour(const wxColour& colour) { return GetBuffer().BeginTextColour(colour); } + + /** + Ends applying a text colour. + */ + bool EndTextColour() { return GetBuffer().EndTextColour(); } + + /** + Begins using alignment. + For alignment values, see wxTextAttr. + */ + bool BeginAlignment(wxTextAttrAlignment alignment) { return GetBuffer().BeginAlignment(alignment); } + + /** + Ends alignment. + */ + bool EndAlignment() { return GetBuffer().EndAlignment(); } + + /** + Begins applying a left indent and subindent in tenths of a millimetre. + The subindent is an offset from the left edge of the paragraph, and is + used for all but the first line in a paragraph. A positive value will + cause the first line to appear to the left of the subsequent lines, and + a negative value will cause the first line to be indented to the right + of the subsequent lines. + + wxRichTextBuffer uses indentation to render a bulleted item. The + content of the paragraph, including the first line, starts at the + @a leftIndent plus the @a leftSubIndent. + + @param leftIndent + The distance between the margin and the bullet. + @param leftSubIndent + The distance between the left edge of the bullet and the left edge + of the actual paragraph. + */ + bool BeginLeftIndent(int leftIndent, int leftSubIndent = 0) { return GetBuffer().BeginLeftIndent(leftIndent, leftSubIndent); } + + /** + Ends left indent. + */ + bool EndLeftIndent() { return GetBuffer().EndLeftIndent(); } + + /** + Begins a right indent, specified in tenths of a millimetre. + */ + bool BeginRightIndent(int rightIndent) { return GetBuffer().BeginRightIndent(rightIndent); } + + /** + Ends right indent. + */ + bool EndRightIndent() { return GetBuffer().EndRightIndent(); } + + /** + Begins paragraph spacing; pass the before-paragraph and after-paragraph spacing + in tenths of a millimetre. + */ + bool BeginParagraphSpacing(int before, int after) { return GetBuffer().BeginParagraphSpacing(before, after); } + + /** + Ends paragraph spacing. + */ + bool EndParagraphSpacing() { return GetBuffer().EndParagraphSpacing(); } + + /** + Begins appling line spacing. @e spacing is a multiple, where 10 means + single-spacing, 15 means 1.5 spacing, and 20 means double spacing. + + The ::wxTextAttrLineSpacing constants are defined for convenience. + */ + bool BeginLineSpacing(int lineSpacing) { return GetBuffer().BeginLineSpacing(lineSpacing); } + + /** + Ends line spacing. + */ + bool EndLineSpacing() { return GetBuffer().EndLineSpacing(); } + + /** + Begins a numbered bullet. + + This call will be needed for each item in the list, and the + application should take care of incrementing the numbering. + + @a bulletNumber is a number, usually starting with 1. + @a leftIndent and @a leftSubIndent are values in tenths of a millimetre. + @a bulletStyle is a bitlist of the ::wxTextAttrBulletStyle values. + + wxRichTextBuffer uses indentation to render a bulleted item. + The left indent is the distance between the margin and the bullet. + The content of the paragraph, including the first line, starts + at leftMargin + leftSubIndent. + So the distance between the left edge of the bullet and the + left of the actual paragraph is leftSubIndent. + */ + bool BeginNumberedBullet(int bulletNumber, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_ARABIC|wxTEXT_ATTR_BULLET_STYLE_PERIOD) + { return GetBuffer().BeginNumberedBullet(bulletNumber, leftIndent, leftSubIndent, bulletStyle); } + + /** + Ends application of a numbered bullet. + */ + bool EndNumberedBullet() { return GetBuffer().EndNumberedBullet(); } + + /** + Begins applying a symbol bullet, using a character from the current font. + See BeginNumberedBullet() for an explanation of how indentation is used + to render the bulleted paragraph. + */ + bool BeginSymbolBullet(const wxString& symbol, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_SYMBOL) + { return GetBuffer().BeginSymbolBullet(symbol, leftIndent, leftSubIndent, bulletStyle); } + + /** + Ends applying a symbol bullet. + */ + bool EndSymbolBullet() { return GetBuffer().EndSymbolBullet(); } + + /** + Begins applying a symbol bullet. + */ + bool BeginStandardBullet(const wxString& bulletName, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_STANDARD) + { return GetBuffer().BeginStandardBullet(bulletName, leftIndent, leftSubIndent, bulletStyle); } + + /** + Begins applying a standard bullet. + */ + bool EndStandardBullet() { return GetBuffer().EndStandardBullet(); } + + /** + Begins using the named character style. + */ + bool BeginCharacterStyle(const wxString& characterStyle) { return GetBuffer().BeginCharacterStyle(characterStyle); } + + /** + Ends application of a named character style. + */ + bool EndCharacterStyle() { return GetBuffer().EndCharacterStyle(); } + + /** + Begins applying the named paragraph style. + */ + bool BeginParagraphStyle(const wxString& paragraphStyle) { return GetBuffer().BeginParagraphStyle(paragraphStyle); } + + /** + Ends application of a named paragraph style. + */ + bool EndParagraphStyle() { return GetBuffer().EndParagraphStyle(); } + + /** + Begins using a specified list style. + Optionally, you can also pass a level and a number. + */ + bool BeginListStyle(const wxString& listStyle, int level = 1, int number = 1) { return GetBuffer().BeginListStyle(listStyle, level, number); } + + /** + Ends using a specified list style. + */ + bool EndListStyle() { return GetBuffer().EndListStyle(); } + + /** + Begins applying wxTEXT_ATTR_URL to the content. + + Pass a URL and optionally, a character style to apply, since it is common + to mark a URL with a familiar style such as blue text with underlining. + */ + bool BeginURL(const wxString& url, const wxString& characterStyle = wxEmptyString) { return GetBuffer().BeginURL(url, characterStyle); } + + /** + Ends applying a URL. + */ + bool EndURL() { return GetBuffer().EndURL(); } + + /** + Sets the default style to the style under the cursor. + */ + bool SetDefaultStyleToCursorStyle(); + + /** + Cancels any selection. + */ + virtual void SelectNone(); + + /** + Selects the word at the given character position. + */ + virtual bool SelectWord(long position); + + /** + Returns the selection range in character positions. -1, -1 means no selection. + + The range is in API convention, i.e. a single character selection is denoted + by (n, n+1) + */ + wxRichTextRange GetSelectionRange() const; + + /** + Sets the selection to the given range. + The end point of range is specified as the last character position of the span + of text, plus one. + + So, for example, to set the selection for a character at position 5, use the + range (5,6). + */ + void SetSelectionRange(const wxRichTextRange& range); + + /** + Returns the selection range in character positions. -2, -2 means no selection + -1, -1 means select everything. + The range is in internal format, i.e. a single character selection is denoted + by (n, n) + */ + wxRichTextRange GetInternalSelectionRange() const { return m_selection.GetRange(); } + + /** + Sets the selection range in character positions. -2, -2 means no selection + -1, -1 means select everything. + The range is in internal format, i.e. a single character selection is denoted + by (n, n) + */ + void SetInternalSelectionRange(const wxRichTextRange& range) { m_selection.Set(range, GetFocusObject()); } + + /** + Adds a new paragraph of text to the end of the buffer. + */ + virtual wxRichTextRange AddParagraph(const wxString& text); + + /** + Adds an image to the control's buffer. + */ + virtual wxRichTextRange AddImage(const wxImage& image); + + /** + Lays out the buffer, which must be done before certain operations, such as + setting the caret position. + This function should not normally be required by the application. + */ + virtual bool LayoutContent(bool onlyVisibleRect = false); + + /** + Move the caret to the given character position. + + Please note that this does not update the current editing style + from the new position; to do that, call wxRichTextCtrl::SetInsertionPoint instead. + */ + virtual bool MoveCaret(long pos, bool showAtLineStart = false, wxRichTextParagraphLayoutBox* container = NULL); + + /** + Moves right. + */ + virtual bool MoveRight(int noPositions = 1, int flags = 0); + + /** + Moves left. + */ + virtual bool MoveLeft(int noPositions = 1, int flags = 0); + + /** + Moves to the start of the paragraph. + */ + virtual bool MoveUp(int noLines = 1, int flags = 0); + + /** + Moves the caret down. + */ + virtual bool MoveDown(int noLines = 1, int flags = 0); + + /** + Moves to the end of the line. + */ + virtual bool MoveToLineEnd(int flags = 0); + + /** + Moves to the start of the line. + */ + virtual bool MoveToLineStart(int flags = 0); + + /** + Moves to the end of the paragraph. + */ + virtual bool MoveToParagraphEnd(int flags = 0); + + /** + Moves to the start of the paragraph. + */ + virtual bool MoveToParagraphStart(int flags = 0); + + /** + Moves to the start of the buffer. + */ + virtual bool MoveHome(int flags = 0); + + /** + Moves to the end of the buffer. + */ + virtual bool MoveEnd(int flags = 0); + + /** + Moves one or more pages up. + */ + virtual bool PageUp(int noPages = 1, int flags = 0); + + /** + Moves one or more pages down. + */ + virtual bool PageDown(int noPages = 1, int flags = 0); + + /** + Moves a number of words to the left. + */ + virtual bool WordLeft(int noPages = 1, int flags = 0); + + /** + Move a nuber of words to the right. + */ + virtual bool WordRight(int noPages = 1, int flags = 0); + + //@{ + /** + Returns the buffer associated with the control. + */ + wxRichTextBuffer& GetBuffer() { return m_buffer; } + const wxRichTextBuffer& GetBuffer() const { return m_buffer; } + //@} + + /** + Starts batching undo history for commands. + */ + virtual bool BeginBatchUndo(const wxString& cmdName) { return m_buffer.BeginBatchUndo(cmdName); } + + /** + Ends batching undo command history. + */ + virtual bool EndBatchUndo() { return m_buffer.EndBatchUndo(); } + + /** + Returns @true if undo commands are being batched. + */ + virtual bool BatchingUndo() const { return m_buffer.BatchingUndo(); } + + /** + Starts suppressing undo history for commands. + */ + virtual bool BeginSuppressUndo() { return m_buffer.BeginSuppressUndo(); } + + /** + Ends suppressing undo command history. + */ + virtual bool EndSuppressUndo() { return m_buffer.EndSuppressUndo(); } + + /** + Returns @true if undo history suppression is on. + */ + virtual bool SuppressingUndo() const { return m_buffer.SuppressingUndo(); } + + /** + Test if this whole range has character attributes of the specified kind. + If any of the attributes are different within the range, the test fails. + + You can use this to implement, for example, bold button updating. + @a style must have flags indicating which attributes are of interest. + */ + virtual bool HasCharacterAttributes(const wxRichTextRange& range, const wxRichTextAttr& style) const + { + return GetFocusObject()->HasCharacterAttributes(range.ToInternal(), style); + } + + /** + Test if this whole range has paragraph attributes of the specified kind. + If any of the attributes are different within the range, the test fails. + You can use this to implement, for example, centering button updating. + @a style must have flags indicating which attributes are of interest. + */ + virtual bool HasParagraphAttributes(const wxRichTextRange& range, const wxRichTextAttr& style) const + { + return GetFocusObject()->HasParagraphAttributes(range.ToInternal(), style); + } + + /** + Returns @true if all of the selection, or the content at the caret position, is bold. + */ + virtual bool IsSelectionBold(); + + /** + Returns @true if all of the selection, or the content at the caret position, is italic. + */ + virtual bool IsSelectionItalics(); + + /** + Returns @true if all of the selection, or the content at the caret position, is underlined. + */ + virtual bool IsSelectionUnderlined(); + + /** + Returns @true if all of the selection, or the content at the current caret position, has the supplied wxTextAttrEffects flag(s). + */ + virtual bool DoesSelectionHaveTextEffectFlag(int flag); + + /** + Returns @true if all of the selection, or the content at the caret position, is aligned according to the specified flag. + */ + virtual bool IsSelectionAligned(wxTextAttrAlignment alignment); + + /** + Apples bold to the selection or default style (undoable). + */ + virtual bool ApplyBoldToSelection(); + + /** + Applies italic to the selection or default style (undoable). + */ + virtual bool ApplyItalicToSelection(); + + /** + Applies underline to the selection or default style (undoable). + */ + virtual bool ApplyUnderlineToSelection(); + + /** + Applies one or more wxTextAttrEffects flags to the selection (undoable). + If there is no selection, it is applied to the default style. + */ + virtual bool ApplyTextEffectToSelection(int flags); + + /** + Applies the given alignment to the selection or the default style (undoable). + For alignment values, see wxTextAttr. + */ + virtual bool ApplyAlignmentToSelection(wxTextAttrAlignment alignment); + + /** + Applies the style sheet to the buffer, matching paragraph styles in the sheet + against named styles in the buffer. + + This might be useful if the styles have changed. + If @a sheet is @NULL, the sheet set with SetStyleSheet() is used. + Currently this applies paragraph styles only. + */ + virtual bool ApplyStyle(wxRichTextStyleDefinition* def); + + /** + Sets the style sheet associated with the control. + A style sheet allows named character and paragraph styles to be applied. + */ + void SetStyleSheet(wxRichTextStyleSheet* styleSheet) { GetBuffer().SetStyleSheet(styleSheet); } + + /** + Returns the style sheet associated with the control, if any. + A style sheet allows named character and paragraph styles to be applied. + */ + wxRichTextStyleSheet* GetStyleSheet() const { return GetBuffer().GetStyleSheet(); } + + /** + Push the style sheet to top of stack. + */ + bool PushStyleSheet(wxRichTextStyleSheet* styleSheet) { return GetBuffer().PushStyleSheet(styleSheet); } + + /** + Pops the style sheet from top of stack. + */ + wxRichTextStyleSheet* PopStyleSheet() { return GetBuffer().PopStyleSheet(); } + + /** + Applies the style sheet to the buffer, for example if the styles have changed. + */ + bool ApplyStyleSheet(wxRichTextStyleSheet* styleSheet = NULL); + + /** + Shows the given context menu, optionally adding appropriate property-editing commands for the current position in the object hierarchy. + */ + virtual bool ShowContextMenu(wxMenu* menu, const wxPoint& pt, bool addPropertyCommands = true); + + /** + Prepares the context menu, optionally adding appropriate property-editing commands. + Returns the number of property commands added. + */ + virtual int PrepareContextMenu(wxMenu* menu, const wxPoint& pt, bool addPropertyCommands = true); + + /** + Returns @true if we can edit the object's properties via a GUI. + */ + virtual bool CanEditProperties(wxRichTextObject* obj) const { return obj->CanEditProperties(); } + + /** + Edits the object's properties via a GUI. + */ + virtual bool EditProperties(wxRichTextObject* obj, wxWindow* parent) { return obj->EditProperties(parent, & GetBuffer()); } + + /** + Gets the object's properties menu label. + */ + virtual wxString GetPropertiesMenuLabel(wxRichTextObject* obj) { return obj->GetPropertiesMenuLabel(); } + + /** + Prepares the content just before insertion (or after buffer reset). Called by the same function in wxRichTextBuffer. + Currently is only called if undo mode is on. + */ + virtual void PrepareContent(wxRichTextParagraphLayoutBox& WXUNUSED(container)) {} + + /** + Can we delete this range? + Sends an event to the control. + */ + virtual bool CanDeleteRange(wxRichTextParagraphLayoutBox& container, const wxRichTextRange& range) const; + + /** + Can we insert content at this position? + Sends an event to the control. + */ + virtual bool CanInsertContent(wxRichTextParagraphLayoutBox& container, long pos) const; + + /** + Enable or disable the vertical scrollbar. + */ + virtual void EnableVerticalScrollbar(bool enable); + + /** + Returns @true if the vertical scrollbar is enabled. + */ + virtual bool GetVerticalScrollbarEnabled() const { return m_verticalScrollbarEnabled; } + + /** + Sets the scale factor for displaying fonts, for example for more comfortable + editing. + */ + void SetFontScale(double fontScale, bool refresh = false); + + /** + Returns the scale factor for displaying fonts, for example for more comfortable + editing. + */ + double GetFontScale() const { return GetBuffer().GetFontScale(); } + + /** + Sets the scale factor for displaying certain dimensions such as indentation and + inter-paragraph spacing. This can be useful when editing in a small control + where you still want legible text, but a minimum of wasted white space. + */ + void SetDimensionScale(double dimScale, bool refresh = false); + + /** + Returns the scale factor for displaying certain dimensions such as indentation + and inter-paragraph spacing. + */ + double GetDimensionScale() const { return GetBuffer().GetDimensionScale(); } + + /** + Sets an overall scale factor for displaying and editing the content. + */ + void SetScale(double scale, bool refresh = false); + + /** + Returns an overall scale factor for displaying and editing the content. + */ + double GetScale() const { return m_scale; } + + /** + Returns an unscaled point. + */ + wxPoint GetUnscaledPoint(const wxPoint& pt) const; + + /** + Returns a scaled point. + */ + wxPoint GetScaledPoint(const wxPoint& pt) const; + + /** + Returns an unscaled size. + */ + wxSize GetUnscaledSize(const wxSize& sz) const; + + /** + Returns a scaled size. + */ + wxSize GetScaledSize(const wxSize& sz) const; + + /** + Returns an unscaled rectangle. + */ + wxRect GetUnscaledRect(const wxRect& rect) const; + + /** + Returns a scaled rectangle. + */ + wxRect GetScaledRect(const wxRect& rect) const; + + /** + Returns @true if this control can use virtual attributes and virtual text. + The default is @false. + */ + bool GetVirtualAttributesEnabled() const { return m_useVirtualAttributes; } + + /** + Pass @true to let the control use virtual attributes. + The default is @false. + */ + void EnableVirtualAttributes(bool b) { m_useVirtualAttributes = b; } + +// Command handlers + + /** + Sends the event to the control. + */ + void Command(wxCommandEvent& event); + + /** + Loads the first dropped file. + */ + void OnDropFiles(wxDropFilesEvent& event); + + void OnCaptureLost(wxMouseCaptureLostEvent& event); + void OnSysColourChanged(wxSysColourChangedEvent& event); + + /** + Standard handler for the wxID_CUT command. + */ + void OnCut(wxCommandEvent& event); + + /** + Standard handler for the wxID_COPY command. + */ + void OnCopy(wxCommandEvent& event); + + /** + Standard handler for the wxID_PASTE command. + */ + void OnPaste(wxCommandEvent& event); + + /** + Standard handler for the wxID_UNDO command. + */ + void OnUndo(wxCommandEvent& event); + + /** + Standard handler for the wxID_REDO command. + */ + void OnRedo(wxCommandEvent& event); + + /** + Standard handler for the wxID_SELECTALL command. + */ + void OnSelectAll(wxCommandEvent& event); + + /** + Standard handler for property commands. + */ + void OnProperties(wxCommandEvent& event); + + /** + Standard handler for the wxID_CLEAR command. + */ + void OnClear(wxCommandEvent& event); + + /** + Standard update handler for the wxID_CUT command. + */ + void OnUpdateCut(wxUpdateUIEvent& event); + + /** + Standard update handler for the wxID_COPY command. + */ + void OnUpdateCopy(wxUpdateUIEvent& event); + + /** + Standard update handler for the wxID_PASTE command. + */ + void OnUpdatePaste(wxUpdateUIEvent& event); + + /** + Standard update handler for the wxID_UNDO command. + */ + void OnUpdateUndo(wxUpdateUIEvent& event); + + /** + Standard update handler for the wxID_REDO command. + */ + void OnUpdateRedo(wxUpdateUIEvent& event); + + /** + Standard update handler for the wxID_SELECTALL command. + */ + void OnUpdateSelectAll(wxUpdateUIEvent& event); + + /** + Standard update handler for property commands. + */ + + void OnUpdateProperties(wxUpdateUIEvent& event); + + /** + Standard update handler for the wxID_CLEAR command. + */ + void OnUpdateClear(wxUpdateUIEvent& event); + + /** + Shows a standard context menu with undo, redo, cut, copy, paste, clear, and + select all commands. + */ + void OnContextMenu(wxContextMenuEvent& event); + +// Event handlers + + // Painting + void OnPaint(wxPaintEvent& event); + void OnEraseBackground(wxEraseEvent& event); + + // Left-click + void OnLeftClick(wxMouseEvent& event); + + // Left-up + void OnLeftUp(wxMouseEvent& event); + + // Motion + void OnMoveMouse(wxMouseEvent& event); + + // Left-double-click + void OnLeftDClick(wxMouseEvent& event); + + // Middle-click + void OnMiddleClick(wxMouseEvent& event); + + // Right-click + void OnRightClick(wxMouseEvent& event); + + // Key press + void OnChar(wxKeyEvent& event); + + // Sizing + void OnSize(wxSizeEvent& event); + + // Setting/losing focus + void OnSetFocus(wxFocusEvent& event); + void OnKillFocus(wxFocusEvent& event); + + // Idle-time processing + void OnIdle(wxIdleEvent& event); + + // Scrolling + void OnScroll(wxScrollWinEvent& event); + + /** + Sets the font, and also the basic and default attributes + (see wxRichTextCtrl::SetDefaultStyle). + */ + virtual bool SetFont(const wxFont& font); + + /** + A helper function setting up scrollbars, for example after a resize. + */ + virtual void SetupScrollbars(bool atTop = false); + + /** + Helper function implementing keyboard navigation. + */ + virtual bool KeyboardNavigate(int keyCode, int flags); + + /** + Paints the background. + */ + virtual void PaintBackground(wxDC& dc); + + /** + Other user defined painting after everything else (i.e. all text) is painted. + + @since 2.9.1 + */ + virtual void PaintAboveContent(wxDC& WXUNUSED(dc)) {} + +#if wxRICHTEXT_BUFFERED_PAINTING + /** + Recreates the buffer bitmap if necessary. + */ + virtual bool RecreateBuffer(const wxSize& size = wxDefaultSize); +#endif + + // Write text + virtual void DoWriteText(const wxString& value, int flags = 0); + + // Should we inherit colours? + virtual bool ShouldInheritColours() const { return false; } + + /** + Internal function to position the visible caret according to the current caret + position. + */ + virtual void PositionCaret(wxRichTextParagraphLayoutBox* container = NULL); + + /** + Helper function for extending the selection, returning @true if the selection + was changed. Selections are in caret positions. + */ + virtual bool ExtendSelection(long oldPosition, long newPosition, int flags); + + /** + Scrolls @a position into view. This function takes a caret position. + */ + virtual bool ScrollIntoView(long position, int keyCode); + + /** + Refreshes the area affected by a selection change. + */ + bool RefreshForSelectionChange(const wxRichTextSelection& oldSelection, const wxRichTextSelection& newSelection); + + /** + Sets the caret position. + + The caret position is the character position just before the caret. + A value of -1 means the caret is at the start of the buffer. + Please note that this does not update the current editing style + from the new position or cause the actual caret to be refreshed; to do that, + call wxRichTextCtrl::SetInsertionPoint instead. + */ + void SetCaretPosition(long position, bool showAtLineStart = false) ; + + /** + Returns the current caret position. + */ + long GetCaretPosition() const { return m_caretPosition; } + + /** + The adjusted caret position is the character position adjusted to take + into account whether we're at the start of a paragraph, in which case + style information should be taken from the next position, not current one. + */ + long GetAdjustedCaretPosition(long caretPos) const; + + /** + Move the caret one visual step forward: this may mean setting a flag + and keeping the same position if we're going from the end of one line + to the start of the next, which may be the exact same caret position. + */ + void MoveCaretForward(long oldPosition) ; + + /** + Move the caret one visual step forward: this may mean setting a flag + and keeping the same position if we're going from the end of one line + to the start of the next, which may be the exact same caret position. + */ + void MoveCaretBack(long oldPosition) ; + + /** + Returns the caret height and position for the given character position. + If container is null, the current focus object will be used. + + @beginWxPerlOnly + In wxPerl this method is implemented as + GetCaretPositionForIndex(@a position) returning a + 2-element list (ok, rect). + @endWxPerlOnly + */ + bool GetCaretPositionForIndex(long position, wxRect& rect, wxRichTextParagraphLayoutBox* container = NULL); + + /** + Internal helper function returning the line for the visible caret position. + If the caret is shown at the very end of the line, it means the next character + is actually on the following line. + So this function gets the line we're expecting to find if this is the case. + */ + wxRichTextLine* GetVisibleLineForCaretPosition(long caretPosition) const; + + /** + Gets the command processor associated with the control's buffer. + */ + wxCommandProcessor* GetCommandProcessor() const { return GetBuffer().GetCommandProcessor(); } + + /** + Deletes content if there is a selection, e.g. when pressing a key. + Returns the new caret position in @e newPos, or leaves it if there + was no action. This is undoable. + + @beginWxPerlOnly + In wxPerl this method takes no arguments and returns a 2-element + list (ok, newPos). + @endWxPerlOnly + */ + bool DeleteSelectedContent(long* newPos= NULL); + + /** + Transforms logical (unscrolled) position to physical window position. + */ + wxPoint GetPhysicalPoint(const wxPoint& ptLogical) const; + + /** + Transforms physical window position to logical (unscrolled) position. + */ + wxPoint GetLogicalPoint(const wxPoint& ptPhysical) const; + + /** + Helper function for finding the caret position for the next word. + Direction is 1 (forward) or -1 (backwards). + */ + virtual long FindNextWordPosition(int direction = 1) const; + + /** + Returns @true if the given position is visible on the screen. + */ + bool IsPositionVisible(long pos) const; + + /** + Returns the first visible position in the current view. + */ + long GetFirstVisiblePosition() const; + + /** + Returns the caret position since the default formatting was changed. As + soon as this position changes, we no longer reflect the default style + in the UI. A value of -2 means that we should only reflect the style of the + content under the caret. + */ + long GetCaretPositionForDefaultStyle() const { return m_caretPositionForDefaultStyle; } + + /** + Set the caret position for the default style that the user is selecting. + */ + void SetCaretPositionForDefaultStyle(long pos) { m_caretPositionForDefaultStyle = pos; } + + /** + Returns @true if the user has recently set the default style without moving + the caret, and therefore the UI needs to reflect the default style and not + the style at the caret. + + Below is an example of code that uses this function to determine whether the UI + should show that the current style is bold. + + @see SetAndShowDefaultStyle(). + */ + bool IsDefaultStyleShowing() const { return m_caretPositionForDefaultStyle != -2; } + + /** + Sets @a attr as the default style and tells the control that the UI should + reflect this attribute until the user moves the caret. + + @see IsDefaultStyleShowing(). + */ + void SetAndShowDefaultStyle(const wxRichTextAttr& attr) + { + SetDefaultStyle(attr); + SetCaretPositionForDefaultStyle(GetCaretPosition()); + } + + /** + Returns the first visible point in the window. + */ + wxPoint GetFirstVisiblePoint() const; + +#ifdef DOXYGEN + /** + Returns the content of the entire control as a string. + */ + virtual wxString GetValue() const; + + /** + Replaces existing content with the given text. + */ + virtual void SetValue(const wxString& value); + + /** + Call this function to prevent refresh and allow fast updates, and then Thaw() to + refresh the control. + */ + void Freeze(); + + /** + Call this function to end a Freeze and refresh the display. + */ + void Thaw(); + + /** + Returns @true if Freeze has been called without a Thaw. + */ + bool IsFrozen() const; + +#endif + +// Implementation + + /** + Processes the back key. + */ + virtual bool ProcessBackKey(wxKeyEvent& event, int flags); + + /** + Given a character position at which there is a list style, find the range + encompassing the same list style by looking backwards and forwards. + */ + virtual wxRichTextRange FindRangeForList(long pos, bool& isNumberedList); + + /** + Sets up the caret for the given position and container, after a mouse click. + */ + bool SetCaretPositionAfterClick(wxRichTextParagraphLayoutBox* container, long position, int hitTestFlags, bool extendSelection = false); + + /** + Find the caret position for the combination of hit-test flags and character position. + Returns the caret position and also an indication of where to place the caret (caretLineStart) + since this is ambiguous (same position used for end of line and start of next). + */ + long FindCaretPositionForCharacterPosition(long position, int hitTestFlags, wxRichTextParagraphLayoutBox* container, + bool& caretLineStart); + + /** + Processes mouse movement in order to change the cursor + */ + virtual bool ProcessMouseMovement(wxRichTextParagraphLayoutBox* container, wxRichTextObject* obj, long position, const wxPoint& pos); + + /** + Font names take a long time to retrieve, so cache them (on demand). + */ + static const wxArrayString& GetAvailableFontNames(); + + /** + Clears the cache of available font names. + */ + static void ClearAvailableFontNames(); + + WX_FORWARD_TO_SCROLL_HELPER() + + // implement wxTextEntry methods + virtual wxString DoGetValue() const; + +protected: + // implement the wxTextEntry pure virtual method + virtual wxWindow *GetEditableWindow() { return this; } + + // margins functions + virtual bool DoSetMargins(const wxPoint& pt); + virtual wxPoint DoGetMargins() const; + + // FIXME: this does not work, it allows this code to compile but will fail + // during run-time +#ifndef __WXUNIVERSAL__ +#ifdef __WXMSW__ + virtual WXHWND GetEditHWND() const { return GetHWND(); } +#endif +#ifdef __WXMOTIF__ + virtual WXWidget GetTextWidget() const { return NULL; } +#endif +#ifdef __WXGTK20__ + virtual GtkEditable *GetEditable() const { return NULL; } + virtual GtkEntry *GetEntry() const { return NULL; } +#endif +#endif // !__WXUNIVERSAL__ + +// Overrides +protected: + + /** + Currently this simply returns @c wxSize(10, 10). + */ + virtual wxSize DoGetBestSize() const ; + + virtual void DoSetValue(const wxString& value, int flags = 0); + + virtual void DoThaw(); + + +// Data members +protected: +#if wxRICHTEXT_BUFFERED_PAINTING + /// Buffer bitmap + wxBitmap m_bufferBitmap; +#endif + + /// Text buffer + wxRichTextBuffer m_buffer; + + wxMenu* m_contextMenu; + + /// Caret position (1 less than the character position, so -1 is the + /// first caret position). + long m_caretPosition; + + /// Caret position when the default formatting has been changed. As + /// soon as this position changes, we no longer reflect the default style + /// in the UI. + long m_caretPositionForDefaultStyle; + + /// Selection range in character positions. -2, -2 means no selection. + wxRichTextSelection m_selection; + + wxRichTextCtrlSelectionState m_selectionState; + + /// Anchor so we know how to extend the selection + /// It's a caret position since it's between two characters. + long m_selectionAnchor; + + /// Anchor object if selecting multiple container objects, such as grid cells. + wxRichTextObject* m_selectionAnchorObject; + + /// Are we editable? + bool m_editable; + + /// Can we use virtual attributes and virtual text? + bool m_useVirtualAttributes; + + /// Is the vertical scrollbar enabled? + bool m_verticalScrollbarEnabled; + + /// Are we showing the caret position at the start of a line + /// instead of at the end of the previous one? + bool m_caretAtLineStart; + + /// Are we dragging (i.e. extending) a selection? + bool m_dragging; + +#if wxUSE_DRAG_AND_DROP + /// Are we trying to start Drag'n'Drop? + bool m_preDrag; + + /// Initial position when starting Drag'n'Drop + wxPoint m_dragStartPoint; + +#if wxUSE_DATETIME + /// Initial time when starting Drag'n'Drop + wxDateTime m_dragStartTime; +#endif // wxUSE_DATETIME +#endif // wxUSE_DRAG_AND_DROP + + /// Do we need full layout in idle? + bool m_fullLayoutRequired; + wxLongLong m_fullLayoutTime; + long m_fullLayoutSavedPosition; + + /// Threshold for doing delayed layout + long m_delayedLayoutThreshold; + + /// Cursors + wxCursor m_textCursor; + wxCursor m_urlCursor; + + static wxArrayString sm_availableFontNames; + + wxRichTextContextMenuPropertiesInfo m_contextMenuPropertiesInfo; + + /// The object that currently has the editing focus + wxRichTextParagraphLayoutBox* m_focusObject; + + /// An overall scale factor + double m_scale; +}; + +#if wxUSE_DRAG_AND_DROP +class WXDLLIMPEXP_RICHTEXT wxRichTextDropSource : public wxDropSource +{ +public: + wxRichTextDropSource(wxDataObject& data, wxRichTextCtrl* tc) + : wxDropSource(data, tc), m_rtc(tc) {} + +protected: + bool GiveFeedback(wxDragResult effect); + + wxRichTextCtrl* m_rtc; +}; + +class WXDLLIMPEXP_RICHTEXT wxRichTextDropTarget : public wxDropTarget +{ +public: + wxRichTextDropTarget(wxRichTextCtrl* tc) + : wxDropTarget(new wxRichTextBufferDataObject(new wxRichTextBuffer)), m_rtc(tc) {} + + virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def) + { + if ( !GetData() ) + return wxDragNone; + m_rtc->OnDrop(x, y, def, m_dataObject); + return def; + } + +protected: + wxRichTextCtrl* m_rtc; +}; +#endif // wxUSE_DRAG_AND_DROP + +/** + @class wxRichTextEvent + + This is the event class for wxRichTextCtrl notifications. + + @beginEventTable{wxRichTextEvent} + @event{EVT_RICHTEXT_LEFT_CLICK(id, func)} + Process a @c wxEVT_RICHTEXT_LEFT_CLICK event, generated when the user + releases the left mouse button over an object. + @event{EVT_RICHTEXT_RIGHT_CLICK(id, func)} + Process a @c wxEVT_RICHTEXT_RIGHT_CLICK event, generated when the user + releases the right mouse button over an object. + @event{EVT_RICHTEXT_MIDDLE_CLICK(id, func)} + Process a @c wxEVT_RICHTEXT_MIDDLE_CLICK event, generated when the user + releases the middle mouse button over an object. + @event{EVT_RICHTEXT_LEFT_DCLICK(id, func)} + Process a @c wxEVT_RICHTEXT_LEFT_DCLICK event, generated when the user + double-clicks an object. + @event{EVT_RICHTEXT_RETURN(id, func)} + Process a @c wxEVT_RICHTEXT_RETURN event, generated when the user + presses the return key. Valid event functions: GetFlags, GetPosition. + @event{EVT_RICHTEXT_CHARACTER(id, func)} + Process a @c wxEVT_RICHTEXT_CHARACTER event, generated when the user + presses a character key. Valid event functions: GetFlags, GetPosition, GetCharacter. + @event{EVT_RICHTEXT_CONSUMING_CHARACTER(id, func)} + Process a @c wxEVT_RICHTEXT_CONSUMING_CHARACTER event, generated when the user + presses a character key but before it is processed and inserted into the control. + Call Veto to prevent normal processing. Valid event functions: GetFlags, GetPosition, + GetCharacter, Veto. + @event{EVT_RICHTEXT_DELETE(id, func)} + Process a @c wxEVT_RICHTEXT_DELETE event, generated when the user + presses the backspace or delete key. Valid event functions: GetFlags, GetPosition. + @event{EVT_RICHTEXT_STYLE_CHANGED(id, func)} + Process a @c wxEVT_RICHTEXT_STYLE_CHANGED event, generated when + styling has been applied to the control. Valid event functions: GetPosition, GetRange. + @event{EVT_RICHTEXT_STYLESHEET_CHANGED(id, func)} + Process a @c wxEVT_RICHTEXT_STYLESHEET_CHANGING event, generated + when the control's stylesheet has changed, for example the user added, + edited or deleted a style. Valid event functions: GetRange, GetPosition. + @event{EVT_RICHTEXT_STYLESHEET_REPLACING(id, func)} + Process a @c wxEVT_RICHTEXT_STYLESHEET_REPLACING event, generated + when the control's stylesheet is about to be replaced, for example when + a file is loaded into the control. + Valid event functions: Veto, GetOldStyleSheet, GetNewStyleSheet. + @event{EVT_RICHTEXT_STYLESHEET_REPLACED(id, func)} + Process a @c wxEVT_RICHTEXT_STYLESHEET_REPLACED event, generated + when the control's stylesheet has been replaced, for example when a file + is loaded into the control. + Valid event functions: GetOldStyleSheet, GetNewStyleSheet. + @event{EVT_RICHTEXT_PROPERTIES_CHANGED(id, func)} + Process a @c wxEVT_RICHTEXT_PROPERTIES_CHANGED event, generated when + properties have been applied to the control. Valid event functions: GetPosition, GetRange. + @event{EVT_RICHTEXT_CONTENT_INSERTED(id, func)} + Process a @c wxEVT_RICHTEXT_CONTENT_INSERTED event, generated when + content has been inserted into the control. + Valid event functions: GetPosition, GetRange. + @event{EVT_RICHTEXT_CONTENT_DELETED(id, func)} + Process a @c wxEVT_RICHTEXT_CONTENT_DELETED event, generated when + content has been deleted from the control. + Valid event functions: GetPosition, GetRange. + @event{EVT_RICHTEXT_BUFFER_RESET(id, func)} + Process a @c wxEVT_RICHTEXT_BUFFER_RESET event, generated when the + buffer has been reset by deleting all content. + You can use this to set a default style for the first new paragraph. + @event{EVT_RICHTEXT_SELECTION_CHANGED(id, func)} + Process a @c wxEVT_RICHTEXT_SELECTION_CHANGED event, generated when the + selection range has changed. + @event{EVT_RICHTEXT_FOCUS_OBJECT_CHANGED(id, func)} + Process a @c wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED event, generated when the + current focus object has changed. + @endEventTable + + @library{wxrichtext} + @category{events,richtext} +*/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextEvent : public wxNotifyEvent +{ +public: + /** + Constructor. + + @param commandType + The type of the event. + @param id + Window identifier. The value @c wxID_ANY indicates a default value. + */ + wxRichTextEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) + : wxNotifyEvent(commandType, winid), + m_flags(0), m_position(-1), m_oldStyleSheet(NULL), m_newStyleSheet(NULL), + m_char((wxChar) 0), m_container(NULL), m_oldContainer(NULL) + { } + + /** + Copy constructor. + */ + wxRichTextEvent(const wxRichTextEvent& event) + : wxNotifyEvent(event), + m_flags(event.m_flags), m_position(-1), + m_oldStyleSheet(event.m_oldStyleSheet), m_newStyleSheet(event.m_newStyleSheet), + m_char((wxChar) 0), m_container(event.m_container), m_oldContainer(event.m_oldContainer) + { } + + /** + Returns the buffer position at which the event occured. + */ + long GetPosition() const { return m_position; } + + /** + Sets the buffer position variable. + */ + void SetPosition(long pos) { m_position = pos; } + + /** + Returns flags indicating modifier keys pressed. + + Possible values are @c wxRICHTEXT_CTRL_DOWN, @c wxRICHTEXT_SHIFT_DOWN, and @c wxRICHTEXT_ALT_DOWN. + */ + int GetFlags() const { return m_flags; } + + /** + Sets flags indicating modifier keys pressed. + + Possible values are @c wxRICHTEXT_CTRL_DOWN, @c wxRICHTEXT_SHIFT_DOWN, and @c wxRICHTEXT_ALT_DOWN. + */ + void SetFlags(int flags) { m_flags = flags; } + + /** + Returns the old style sheet. + + Can be used in a @c wxEVT_RICHTEXT_STYLESHEET_CHANGING or + @c wxEVT_RICHTEXT_STYLESHEET_CHANGED event handler. + */ + wxRichTextStyleSheet* GetOldStyleSheet() const { return m_oldStyleSheet; } + + /** + Sets the old style sheet variable. + */ + void SetOldStyleSheet(wxRichTextStyleSheet* sheet) { m_oldStyleSheet = sheet; } + + /** + Returns the new style sheet. + + Can be used in a @c wxEVT_RICHTEXT_STYLESHEET_CHANGING or + @c wxEVT_RICHTEXT_STYLESHEET_CHANGED event handler. + */ + wxRichTextStyleSheet* GetNewStyleSheet() const { return m_newStyleSheet; } + + /** + Sets the new style sheet variable. + */ + void SetNewStyleSheet(wxRichTextStyleSheet* sheet) { m_newStyleSheet = sheet; } + + /** + Gets the range for the current operation. + */ + const wxRichTextRange& GetRange() const { return m_range; } + + /** + Sets the range variable. + */ + void SetRange(const wxRichTextRange& range) { m_range = range; } + + /** + Returns the character pressed, within a @c wxEVT_RICHTEXT_CHARACTER event. + */ + wxChar GetCharacter() const { return m_char; } + + /** + Sets the character variable. + */ + void SetCharacter(wxChar ch) { m_char = ch; } + + /** + Returns the container for which the event is relevant. + */ + wxRichTextParagraphLayoutBox* GetContainer() const { return m_container; } + + /** + Sets the container for which the event is relevant. + */ + void SetContainer(wxRichTextParagraphLayoutBox* container) { m_container = container; } + + /** + Returns the old container, for a focus change event. + */ + wxRichTextParagraphLayoutBox* GetOldContainer() const { return m_oldContainer; } + + /** + Sets the old container, for a focus change event. + */ + void SetOldContainer(wxRichTextParagraphLayoutBox* container) { m_oldContainer = container; } + + virtual wxEvent *Clone() const { return new wxRichTextEvent(*this); } + +protected: + int m_flags; + long m_position; + wxRichTextStyleSheet* m_oldStyleSheet; + wxRichTextStyleSheet* m_newStyleSheet; + wxRichTextRange m_range; + wxChar m_char; + wxRichTextParagraphLayoutBox* m_container; + wxRichTextParagraphLayoutBox* m_oldContainer; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxRichTextEvent) +}; + +/*! + * wxRichTextCtrl events + */ +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_LEFT_CLICK, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_RIGHT_CLICK, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_MIDDLE_CLICK, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_LEFT_DCLICK, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_RETURN, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_CHARACTER, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_CONSUMING_CHARACTER, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_DELETE, wxRichTextEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_STYLESHEET_CHANGING, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_STYLESHEET_CHANGED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_STYLESHEET_REPLACING, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_STYLESHEET_REPLACED, wxRichTextEvent ); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_CONTENT_INSERTED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_CONTENT_DELETED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_STYLE_CHANGED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_PROPERTIES_CHANGED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_SELECTION_CHANGED, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_BUFFER_RESET, wxRichTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_RICHTEXT, wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED, wxRichTextEvent ); + +typedef void (wxEvtHandler::*wxRichTextEventFunction)(wxRichTextEvent&); + +#define wxRichTextEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxRichTextEventFunction, func) + +#define EVT_RICHTEXT_LEFT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_LEFT_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_RIGHT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_RIGHT_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_MIDDLE_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_MIDDLE_CLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_LEFT_DCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_LEFT_DCLICK, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_RETURN(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_RETURN, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_CHARACTER(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_CHARACTER, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_CONSUMING_CHARACTER(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_CONSUMING_CHARACTER, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_DELETE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_DELETE, id, -1, wxRichTextEventHandler( fn ), NULL ), + +#define EVT_RICHTEXT_STYLESHEET_CHANGING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_STYLESHEET_CHANGING, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_STYLESHEET_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_STYLESHEET_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_STYLESHEET_REPLACING(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_STYLESHEET_REPLACING, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_STYLESHEET_REPLACED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_STYLESHEET_REPLACED, id, -1, wxRichTextEventHandler( fn ), NULL ), + +#define EVT_RICHTEXT_CONTENT_INSERTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_CONTENT_INSERTED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_CONTENT_DELETED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_CONTENT_DELETED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_STYLE_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_STYLE_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_PROPERTIES_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_PROPERTIES_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_SELECTION_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_SELECTION_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_BUFFER_RESET(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_BUFFER_RESET, id, -1, wxRichTextEventHandler( fn ), NULL ), +#define EVT_RICHTEXT_FOCUS_OBJECT_CHANGED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED, id, -1, wxRichTextEventHandler( fn ), NULL ), + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_RICHTEXT_LEFT_CLICK wxEVT_RICHTEXT_LEFT_CLICK +#define wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK wxEVT_RICHTEXT_RIGHT_CLICK +#define wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK wxEVT_RICHTEXT_MIDDLE_CLICK +#define wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK wxEVT_RICHTEXT_LEFT_DCLICK +#define wxEVT_COMMAND_RICHTEXT_RETURN wxEVT_RICHTEXT_RETURN +#define wxEVT_COMMAND_RICHTEXT_CHARACTER wxEVT_RICHTEXT_CHARACTER +#define wxEVT_COMMAND_RICHTEXT_DELETE wxEVT_RICHTEXT_DELETE +#define wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING wxEVT_RICHTEXT_STYLESHEET_CHANGING +#define wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED wxEVT_RICHTEXT_STYLESHEET_CHANGED +#define wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING wxEVT_RICHTEXT_STYLESHEET_REPLACING +#define wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED wxEVT_RICHTEXT_STYLESHEET_REPLACED +#define wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED wxEVT_RICHTEXT_CONTENT_INSERTED +#define wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED wxEVT_RICHTEXT_CONTENT_DELETED +#define wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED wxEVT_RICHTEXT_STYLE_CHANGED +#define wxEVT_COMMAND_RICHTEXT_PROPERTIES_CHANGED wxEVT_RICHTEXT_PROPERTIES_CHANGED +#define wxEVT_COMMAND_RICHTEXT_SELECTION_CHANGED wxEVT_RICHTEXT_SELECTION_CHANGED +#define wxEVT_COMMAND_RICHTEXT_BUFFER_RESET wxEVT_RICHTEXT_BUFFER_RESET +#define wxEVT_COMMAND_RICHTEXT_FOCUS_OBJECT_CHANGED wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED + +#endif + // wxUSE_RICHTEXT + +#endif + // _WX_RICHTEXTCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextdialogpage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextdialogpage.h new file mode 100644 index 0000000000..206fd3e915 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextdialogpage.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextdialogpage.h +// Purpose: Formatting dialog page base class for wxRTC +// Author: Julian Smart +// Modified by: +// Created: 2010-11-14 +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RICHTEXTDIALOGPAGE_H_ +#define _WX_RICHTEXTDIALOGPAGE_H_ + +#if wxUSE_RICHTEXT + +#include "wx/panel.h" +#include "wx/richtext/richtextuicustomization.h" + +/** + @class wxRichTextDialogPage + The base class for formatting dialog pages. + **/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextDialogPage: public wxPanel +{ +public: + DECLARE_CLASS(wxRichTextDialogPage) + wxRichTextDialogPage() {} + wxRichTextDialogPage(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0) + { + Create(parent, id, pos, size, style); + } + + DECLARE_BASE_CLASS_HELP_PROVISION() +}; + +#endif + // wxUSE_RICHTEXT + +#endif + // _WX_RICHTEXTDIALOGPAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextfontpage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextfontpage.h new file mode 100644 index 0000000000..25e8e5e98d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextfontpage.h @@ -0,0 +1,195 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextfontpage.h +// Purpose: Font page for wxRichTextFormattingDialog +// Author: Julian Smart +// Modified by: +// Created: 2006-10-02 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTFONTPAGE_H_ +#define _RICHTEXTFONTPAGE_H_ + +/*! + * Includes + */ + +#include "wx/richtext/richtextdialogpage.h" + +////@begin includes +#include "wx/spinbutt.h" +////@end includes + +/*! + * Forward declarations + */ + +////@begin forward declarations +class wxSpinButton; +class wxBoxSizer; +class wxRichTextFontListBox; +class wxRichTextColourSwatchCtrl; +class wxRichTextFontPreviewCtrl; +////@end forward declarations + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define SYMBOL_WXRICHTEXTFONTPAGE_STYLE wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTFONTPAGE_TITLE wxEmptyString +#define SYMBOL_WXRICHTEXTFONTPAGE_IDNAME ID_RICHTEXTFONTPAGE +#define SYMBOL_WXRICHTEXTFONTPAGE_SIZE wxSize(200, 100) +#define SYMBOL_WXRICHTEXTFONTPAGE_POSITION wxDefaultPosition +////@end control identifiers + +/*! + * wxRichTextFontPage class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextFontPage: public wxRichTextDialogPage +{ + DECLARE_DYNAMIC_CLASS( wxRichTextFontPage ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxRichTextFontPage( ); + wxRichTextFontPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTFONTPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTFONTPAGE_SIZE, long style = SYMBOL_WXRICHTEXTFONTPAGE_STYLE ); + + /// Initialise members + void Init(); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTFONTPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTFONTPAGE_SIZE, long style = SYMBOL_WXRICHTEXTFONTPAGE_STYLE ); + + /// Creates the controls and sizers + void CreateControls(); + + /// Transfer data from/to window + virtual bool TransferDataFromWindow(); + virtual bool TransferDataToWindow(); + + /// Updates the font preview + void UpdatePreview(); + + void OnFaceListBoxSelected( wxCommandEvent& event ); + void OnColourClicked( wxCommandEvent& event ); + + /// Gets the attributes associated with the main formatting dialog + wxRichTextAttr* GetAttributes(); + +////@begin wxRichTextFontPage event handler declarations + + /// wxEVT_IDLE event handler for ID_RICHTEXTFONTPAGE + void OnIdle( wxIdleEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTFONTPAGE_FACETEXTCTRL + void OnFaceTextCtrlUpdated( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTFONTPAGE_SIZETEXTCTRL + void OnSizeTextCtrlUpdated( wxCommandEvent& event ); + + /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTFONTPAGE_SPINBUTTONS + void OnRichtextfontpageSpinbuttonsUp( wxSpinEvent& event ); + + /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTFONTPAGE_SPINBUTTONS + void OnRichtextfontpageSpinbuttonsDown( wxSpinEvent& event ); + + /// wxEVT_CHOICE event handler for ID_RICHTEXTFONTPAGE_SIZE_UNITS + void OnRichtextfontpageSizeUnitsSelected( wxCommandEvent& event ); + + /// wxEVT_LISTBOX event handler for ID_RICHTEXTFONTPAGE_SIZELISTBOX + void OnSizeListBoxSelected( wxCommandEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTFONTPAGE_STYLECTRL + void OnStyleCtrlSelected( wxCommandEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTFONTPAGE_WEIGHTCTRL + void OnWeightCtrlSelected( wxCommandEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL + void OnUnderliningCtrlSelected( wxCommandEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL + void OnStrikethroughctrlClick( wxCommandEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_CAPSCTRL + void OnCapsctrlClick( wxCommandEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_SUPERSCRIPT + void OnRichtextfontpageSuperscriptClick( wxCommandEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTFONTPAGE_SUBSCRIPT + void OnRichtextfontpageSubscriptClick( wxCommandEvent& event ); + +////@end wxRichTextFontPage event handler declarations + +////@begin wxRichTextFontPage member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextFontPage member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin wxRichTextFontPage member variables + wxTextCtrl* m_faceTextCtrl; + wxTextCtrl* m_sizeTextCtrl; + wxSpinButton* m_fontSizeSpinButtons; + wxChoice* m_sizeUnitsCtrl; + wxBoxSizer* m_fontListBoxParent; + wxRichTextFontListBox* m_faceListBox; + wxListBox* m_sizeListBox; + wxComboBox* m_styleCtrl; + wxComboBox* m_weightCtrl; + wxComboBox* m_underliningCtrl; + wxCheckBox* m_textColourLabel; + wxRichTextColourSwatchCtrl* m_colourCtrl; + wxCheckBox* m_bgColourLabel; + wxRichTextColourSwatchCtrl* m_bgColourCtrl; + wxCheckBox* m_strikethroughCtrl; + wxCheckBox* m_capitalsCtrl; + wxCheckBox* m_smallCapitalsCtrl; + wxCheckBox* m_superscriptCtrl; + wxCheckBox* m_subscriptCtrl; + wxRichTextFontPreviewCtrl* m_previewCtrl; + /// Control identifiers + enum { + ID_RICHTEXTFONTPAGE = 10000, + ID_RICHTEXTFONTPAGE_FACETEXTCTRL = 10001, + ID_RICHTEXTFONTPAGE_SIZETEXTCTRL = 10002, + ID_RICHTEXTFONTPAGE_SPINBUTTONS = 10003, + ID_RICHTEXTFONTPAGE_SIZE_UNITS = 10004, + ID_RICHTEXTFONTPAGE_FACELISTBOX = 10005, + ID_RICHTEXTFONTPAGE_SIZELISTBOX = 10006, + ID_RICHTEXTFONTPAGE_STYLECTRL = 10007, + ID_RICHTEXTFONTPAGE_WEIGHTCTRL = 10008, + ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL = 10009, + ID_RICHTEXTFONTPAGE_COLOURCTRL_LABEL = 10010, + ID_RICHTEXTFONTPAGE_COLOURCTRL = 10011, + ID_RICHTEXTFONTPAGE_BGCOLOURCTRL_LABEL = 10012, + ID_RICHTEXTFONTPAGE_BGCOLOURCTRL = 10013, + ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL = 10014, + ID_RICHTEXTFONTPAGE_CAPSCTRL = 10015, + ID_RICHTEXTFONTPAGE_SMALLCAPSCTRL = 10016, + ID_RICHTEXTFONTPAGE_SUPERSCRIPT = 10017, + ID_RICHTEXTFONTPAGE_SUBSCRIPT = 10018, + ID_RICHTEXTFONTPAGE_PREVIEWCTRL = 10019 + }; +////@end wxRichTextFontPage member variables + + bool m_dontUpdate; + bool m_colourPresent; + bool m_bgColourPresent; +}; + +#endif + // _RICHTEXTFONTPAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextformatdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextformatdlg.h new file mode 100644 index 0000000000..18a91bbceb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextformatdlg.h @@ -0,0 +1,360 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextformatdlg.h +// Purpose: Formatting dialog for wxRichTextCtrl +// Author: Julian Smart +// Modified by: +// Created: 2006-10-01 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RICHTEXTFORMATDLG_H_ +#define _WX_RICHTEXTFORMATDLG_H_ + +/*! + * Includes + */ + +#include "wx/defs.h" + +#if wxUSE_RICHTEXT + +#include "wx/propdlg.h" +#include "wx/bookctrl.h" +#include "wx/withimages.h" + +#if wxUSE_HTML +#include "wx/htmllbox.h" +#endif + +#include "wx/richtext/richtextbuffer.h" +#include "wx/richtext/richtextstyles.h" +#include "wx/richtext/richtextuicustomization.h" + +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextFormattingDialog; +class WXDLLIMPEXP_FWD_CORE wxComboBox; +class WXDLLIMPEXP_FWD_CORE wxCheckBox; + +/*! + * Flags determining the pages and buttons to be created in the dialog + */ + +#define wxRICHTEXT_FORMAT_STYLE_EDITOR 0x0001 +#define wxRICHTEXT_FORMAT_FONT 0x0002 +#define wxRICHTEXT_FORMAT_TABS 0x0004 +#define wxRICHTEXT_FORMAT_BULLETS 0x0008 +#define wxRICHTEXT_FORMAT_INDENTS_SPACING 0x0010 +#define wxRICHTEXT_FORMAT_LIST_STYLE 0x0020 +#define wxRICHTEXT_FORMAT_MARGINS 0x0040 +#define wxRICHTEXT_FORMAT_SIZE 0x0080 +#define wxRICHTEXT_FORMAT_BORDERS 0x0100 +#define wxRICHTEXT_FORMAT_BACKGROUND 0x0200 + +#define wxRICHTEXT_FORMAT_HELP_BUTTON 0x1000 + +/*! + * Indices for bullet styles in list control + */ + +enum { + wxRICHTEXT_BULLETINDEX_NONE = 0, + wxRICHTEXT_BULLETINDEX_ARABIC, + wxRICHTEXT_BULLETINDEX_UPPER_CASE, + wxRICHTEXT_BULLETINDEX_LOWER_CASE, + wxRICHTEXT_BULLETINDEX_UPPER_CASE_ROMAN, + wxRICHTEXT_BULLETINDEX_LOWER_CASE_ROMAN, + wxRICHTEXT_BULLETINDEX_OUTLINE, + wxRICHTEXT_BULLETINDEX_SYMBOL, + wxRICHTEXT_BULLETINDEX_BITMAP, + wxRICHTEXT_BULLETINDEX_STANDARD +}; + +/*! + * Shorthand for common combinations of pages + */ + +#define wxRICHTEXT_FORMAT_PARAGRAPH (wxRICHTEXT_FORMAT_INDENTS_SPACING | wxRICHTEXT_FORMAT_BULLETS | wxRICHTEXT_FORMAT_TABS | wxRICHTEXT_FORMAT_FONT) +#define wxRICHTEXT_FORMAT_CHARACTER (wxRICHTEXT_FORMAT_FONT) +#define wxRICHTEXT_FORMAT_STYLE (wxRICHTEXT_FORMAT_PARAGRAPH | wxRICHTEXT_FORMAT_STYLE_EDITOR) + +/*! + * Factory for formatting dialog + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextFormattingDialogFactory: public wxObject +{ +public: + wxRichTextFormattingDialogFactory() {} + virtual ~wxRichTextFormattingDialogFactory() {} + +// Overridables + + /// Create all pages, under the dialog's book control, also calling AddPage + virtual bool CreatePages(long pages, wxRichTextFormattingDialog* dialog); + + /// Create a page, given a page identifier + virtual wxPanel* CreatePage(int page, wxString& title, wxRichTextFormattingDialog* dialog); + + /// Enumerate all available page identifiers + virtual int GetPageId(int i) const; + + /// Get the number of available page identifiers + virtual int GetPageIdCount() const; + + /// Get the image index for the given page identifier + virtual int GetPageImage(int WXUNUSED(id)) const { return -1; } + + /// Invoke help for the dialog + virtual bool ShowHelp(int page, wxRichTextFormattingDialog* dialog); + + /// Set the sheet style, called at the start of wxRichTextFormattingDialog::Create + virtual bool SetSheetStyle(wxRichTextFormattingDialog* dialog); + + /// Create the main dialog buttons + virtual bool CreateButtons(wxRichTextFormattingDialog* dialog); +}; + +/*! + * Formatting dialog for a wxRichTextCtrl + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextFormattingDialog: public wxPropertySheetDialog, + public wxWithImages +{ +DECLARE_CLASS(wxRichTextFormattingDialog) +DECLARE_HELP_PROVISION() + +public: + enum { Option_AllowPixelFontSize = 0x0001 }; + + wxRichTextFormattingDialog() { Init(); } + + wxRichTextFormattingDialog(long flags, wxWindow* parent, const wxString& title = wxGetTranslation(wxT("Formatting")), wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE) + { + Init(); + Create(flags, parent, title, id, pos, sz, style); + } + + ~wxRichTextFormattingDialog(); + + void Init(); + + bool Create(long flags, wxWindow* parent, const wxString& title = wxGetTranslation(wxT("Formatting")), wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE); + + /// Get attributes from the given range + virtual bool GetStyle(wxRichTextCtrl* ctrl, const wxRichTextRange& range); + + /// Set the attributes and optionally update the display + virtual bool SetStyle(const wxRichTextAttr& style, bool update = true); + + /// Set the style definition and optionally update the display + virtual bool SetStyleDefinition(const wxRichTextStyleDefinition& styleDef, wxRichTextStyleSheet* sheet, bool update = true); + + /// Get the style definition, if any + virtual wxRichTextStyleDefinition* GetStyleDefinition() const { return m_styleDefinition; } + + /// Get the style sheet, if any + virtual wxRichTextStyleSheet* GetStyleSheet() const { return m_styleSheet; } + + /// Update the display + virtual bool UpdateDisplay(); + + /// Apply attributes to the given range + virtual bool ApplyStyle(wxRichTextCtrl* ctrl, const wxRichTextRange& range, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO|wxRICHTEXT_SETSTYLE_OPTIMIZE); + + /// Apply attributes to the object being edited, if any + virtual bool ApplyStyle(wxRichTextCtrl* ctrl, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO); + + /// Gets and sets the attributes + const wxRichTextAttr& GetAttributes() const { return m_attributes; } + wxRichTextAttr& GetAttributes() { return m_attributes; } + void SetAttributes(const wxRichTextAttr& attr) { m_attributes = attr; } + + /// Sets the dialog options, determining what the interface presents to the user. + /// Currently the only option is Option_AllowPixelFontSize. + void SetOptions(int options) { m_options = options; } + + /// Gets the dialog options, determining what the interface presents to the user. + /// Currently the only option is Option_AllowPixelFontSize. + int GetOptions() const { return m_options; } + + /// Returns @true if the given option is present. + bool HasOption(int option) const { return (m_options & option) != 0; } + + /// If editing the attributes for a particular object, such as an image, + /// set the object so the code can initialize attributes such as size correctly. + wxRichTextObject* GetObject() const { return m_object; } + void SetObject(wxRichTextObject* obj) { m_object = obj; } + + /// Transfers the data and from to the window + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); + + /// Apply the styles when a different tab is selected, so the previews are + /// up to date + void OnTabChanged(wxBookCtrlEvent& event); + + /// Respond to help command + void OnHelp(wxCommandEvent& event); + void OnUpdateHelp(wxUpdateUIEvent& event); + + /// Get/set formatting factory object + static void SetFormattingDialogFactory(wxRichTextFormattingDialogFactory* factory); + static wxRichTextFormattingDialogFactory* GetFormattingDialogFactory() { return ms_FormattingDialogFactory; } + + /// Helper for pages to get the top-level dialog + static wxRichTextFormattingDialog* GetDialog(wxWindow* win); + + /// Helper for pages to get the attributes + static wxRichTextAttr* GetDialogAttributes(wxWindow* win); + + /// Helper for pages to get the reset attributes + static wxRichTextAttr* GetDialogResetAttributes(wxWindow* win); + + /// Helper for pages to get the style + static wxRichTextStyleDefinition* GetDialogStyleDefinition(wxWindow* win); + + /// Should we show tooltips? + static bool ShowToolTips() { return sm_showToolTips; } + + /// Determines whether tooltips will be shown + static void SetShowToolTips(bool show) { sm_showToolTips = show; } + + /// Set the dimension into the value and units controls. Optionally pass units to + /// specify the ordering of units in the combobox. + static void SetDimensionValue(wxTextAttrDimension& dim, wxTextCtrl* valueCtrl, wxComboBox* unitsCtrl, wxCheckBox* checkBox, wxArrayInt* units = NULL); + + /// Get the dimension from the value and units controls Optionally pass units to + /// specify the ordering of units in the combobox. + static void GetDimensionValue(wxTextAttrDimension& dim, wxTextCtrl* valueCtrl, wxComboBox* unitsCtrl, wxCheckBox* checkBox, wxArrayInt* units = NULL); + + /// Convert from a string to a dimension integer. + static bool ConvertFromString(const wxString& str, int& ret, int unit); + + /// Map book control page index to our page id + void AddPageId(int id) { m_pageIds.Add(id); } + + /// Find a page by class + wxWindow* FindPage(wxClassInfo* info) const; + +protected: + + wxRichTextAttr m_attributes; + wxRichTextStyleDefinition* m_styleDefinition; + wxRichTextStyleSheet* m_styleSheet; + wxRichTextObject* m_object; + wxArrayInt m_pageIds; // mapping of book control indexes to page ids + int m_options; // UI options + + static wxRichTextFormattingDialogFactory* ms_FormattingDialogFactory; + static bool sm_showToolTips; + +DECLARE_EVENT_TABLE() +}; + +//----------------------------------------------------------------------------- +// helper class - wxRichTextFontPreviewCtrl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_RICHTEXT wxRichTextFontPreviewCtrl : public wxWindow +{ +public: + wxRichTextFontPreviewCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = 0); + + void SetTextEffects(int effects) { m_textEffects = effects; } + int GetTextEffects() const { return m_textEffects; } + +private: + int m_textEffects; + + void OnPaint(wxPaintEvent& event); + DECLARE_EVENT_TABLE() +}; + +/* + * A control for displaying a small preview of a colour or bitmap + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextColourSwatchCtrl: public wxControl +{ + DECLARE_CLASS(wxRichTextColourSwatchCtrl) +public: + wxRichTextColourSwatchCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); + ~wxRichTextColourSwatchCtrl(); + + void OnMouseEvent(wxMouseEvent& event); + + void SetColour(const wxColour& colour) { m_colour = colour; SetBackgroundColour(m_colour); } + + wxColour& GetColour() { return m_colour; } + + virtual wxSize DoGetBestSize() const { return GetSize(); } + +protected: + wxColour m_colour; + +DECLARE_EVENT_TABLE() +}; + +/*! + * wxRichTextFontListBox class declaration + * A listbox to display fonts. + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextFontListBox: public wxHtmlListBox +{ + DECLARE_CLASS(wxRichTextFontListBox) + DECLARE_EVENT_TABLE() + +public: + wxRichTextFontListBox() + { + Init(); + } + wxRichTextFontListBox(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0); + virtual ~wxRichTextFontListBox(); + + void Init() + { + } + + bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0); + + /// Creates a suitable HTML fragment for a font + wxString CreateHTML(const wxString& facename) const; + + /// Get font name for index + wxString GetFaceName(size_t i) const ; + + /// Set selection for string, returning the index. + int SetFaceNameSelection(const wxString& name); + + /// Updates the font list + void UpdateFonts(); + + /// Does this face name exist? + bool HasFaceName(const wxString& faceName) const { return m_faceNames.Index(faceName) != wxNOT_FOUND; } + + /// Returns the array of face names + const wxArrayString& GetFaceNames() const { return m_faceNames; } + +protected: + /// Returns the HTML for this item + virtual wxString OnGetItem(size_t n) const; + +private: + + wxArrayString m_faceNames; +}; + +#endif + // wxUSE_RICHTEXT + +#endif + // _WX_RICHTEXTFORMATDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtexthtml.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtexthtml.h new file mode 100644 index 0000000000..9761384f81 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtexthtml.h @@ -0,0 +1,147 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtexthtml.h +// Purpose: HTML I/O for wxRichTextCtrl +// Author: Julian Smart +// Modified by: +// Created: 2005-09-30 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RICHTEXTHTML_H_ +#define _WX_RICHTEXTHTML_H_ + +/*! + * Includes + */ + +#include "wx/richtext/richtextbuffer.h" + +// Use CSS styles where applicable, otherwise use non-CSS workarounds +#define wxRICHTEXT_HANDLER_USE_CSS 0x1000 + +/*! + * wxRichTextHTMLHandler + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextHTMLHandler: public wxRichTextFileHandler +{ + DECLARE_DYNAMIC_CLASS(wxRichTextHTMLHandler) +public: + wxRichTextHTMLHandler(const wxString& name = wxT("HTML"), const wxString& ext = wxT("html"), int type = wxRICHTEXT_TYPE_HTML); + + /// Can we save using this handler? + virtual bool CanSave() const { return true; } + + /// Can we load using this handler? + virtual bool CanLoad() const { return false; } + + /// Can we handle this filename (if using files)? By default, checks the extension. + virtual bool CanHandle(const wxString& filename) const; + +// Accessors and operations unique to this handler + + /// Set and get the list of image locations generated by the last operation + void SetTemporaryImageLocations(const wxArrayString& locations) { m_imageLocations = locations; } + const wxArrayString& GetTemporaryImageLocations() const { return m_imageLocations; } + + /// Clear the image locations generated by the last operation + void ClearTemporaryImageLocations() { m_imageLocations.Clear(); } + + /// Delete the in-memory or temporary files generated by the last operation + bool DeleteTemporaryImages(); + + /// Delete the in-memory or temporary files generated by the last operation. This is a static + /// function that can be used to delete the saved locations from an earlier operation, + /// for example after the user has viewed the HTML file. + static bool DeleteTemporaryImages(int flags, const wxArrayString& imageLocations); + + /// Reset the file counter, in case, for example, the same names are required each time + static void SetFileCounter(int counter) { sm_fileCounter = counter; } + + /// Set and get the directory for storing temporary files. If empty, the system + /// temporary directory will be used. + void SetTempDir(const wxString& tempDir) { m_tempDir = tempDir; } + const wxString& GetTempDir() const { return m_tempDir; } + + /// Set and get mapping from point size to HTML font size. There should be 7 elements, + /// one for each HTML font size, each element specifying the maximum point size for that + /// HTML font size. E.g. 8, 10, 13, 17, 22, 29, 100 + void SetFontSizeMapping(const wxArrayInt& fontSizeMapping) { m_fontSizeMapping = fontSizeMapping; } + wxArrayInt GetFontSizeMapping() const { return m_fontSizeMapping; } + +protected: + +// Implementation + +#if wxUSE_STREAMS + virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream); + virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream); + + /// Output character formatting + void BeginCharacterFormatting(const wxRichTextAttr& currentStyle, const wxRichTextAttr& thisStyle, const wxRichTextAttr& paraStyle, wxTextOutputStream& stream ); + void EndCharacterFormatting(const wxRichTextAttr& currentStyle, const wxRichTextAttr& thisStyle, const wxRichTextAttr& paraStyle, wxTextOutputStream& stream ); + + /// Output paragraph formatting + void BeginParagraphFormatting(const wxRichTextAttr& currentStyle, const wxRichTextAttr& thisStyle, wxTextOutputStream& stream); + void EndParagraphFormatting(const wxRichTextAttr& currentStyle, const wxRichTextAttr& thisStyle, wxTextOutputStream& stream); + + /// Output font tag + void OutputFont(const wxRichTextAttr& style, wxTextOutputStream& stream); + + /// Closes lists to level (-1 means close all) + void CloseLists(int level, wxTextOutputStream& str); + + /// Writes an image to its base64 equivalent, or to the memory filesystem, or to a file + void WriteImage(wxRichTextImage* image, wxOutputStream& stream); + + /// Converts from pt to size property compatible height + long PtToSize(long size); + + /// Typical base64 encoder + wxChar* b64enc(unsigned char* input, size_t in_len); + + /// Gets the mime type of the given wxBITMAP_TYPE + const wxChar* GetMimeType(int imageType); + + /// Gets the html equivalent of the specified value + wxString GetAlignment(const wxRichTextAttr& thisStyle); + + /// Generates   array for indentations + wxString SymbolicIndent(long indent); + + /// Finds the html equivalent of the specified bullet + int TypeOfList(const wxRichTextAttr& thisStyle, wxString& tag); +#endif + +// Data members + + wxRichTextBuffer* m_buffer; + + /// Indentation values of the table tags + wxArrayInt m_indents; + + /// Stack of list types: 0 = ol, 1 = ul + wxArrayInt m_listTypes; + + /// Is there any opened font tag? + bool m_font; + + /// Are we in a table? + bool m_inTable; + + /// A list of the image files or in-memory images created by the last operation. + wxArrayString m_imageLocations; + + /// A location for the temporary files + wxString m_tempDir; + + /// A mapping from point size to HTML font size + wxArrayInt m_fontSizeMapping; + + /// A counter for generating filenames + static int sm_fileCounter; +}; + +#endif + // _WX_RICHTEXTXML_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextimagedlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextimagedlg.h new file mode 100644 index 0000000000..96d67aecc0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextimagedlg.h @@ -0,0 +1,94 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextimagedlg.h +// Purpose: +// Author: Mingquan Yang +// Modified by: Julian Smart +// Created: Wed 02 Jun 2010 11:27:23 CST +// RCS-ID: +// Copyright: (c) Mingquan Yang, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/dialog.h" + +#ifndef _RICHTEXTIMAGEDLG_H_ +#define _RICHTEXTIMAGEDLG_H_ + +/*! + * Forward declarations + */ + +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxComboBox; +class WXDLLIMPEXP_FWD_CORE wxCheckBox; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; + +/*! + * Includes + */ + +#include "wx/richtext/richtextbuffer.h" +#include "wx/richtext/richtextformatdlg.h" + +/*! + * Control identifiers + */ + +#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_TITLE wxGetTranslation("Object Properties") +#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_IDNAME ID_RICHTEXTOBJECTPROPERTIESDIALOG +#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_POSITION wxDefaultPosition + +/*! + * wxRichTextObjectPropertiesDialog class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextObjectPropertiesDialog: public wxRichTextFormattingDialog +{ + DECLARE_DYNAMIC_CLASS( wxRichTextObjectPropertiesDialog ) + DECLARE_EVENT_TABLE() + +public: + /// Constructors + wxRichTextObjectPropertiesDialog(); + wxRichTextObjectPropertiesDialog( wxRichTextObject* obj, wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_IDNAME, const wxString& caption = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_SIZE, long style = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_STYLE ); + + /// Creation + bool Create( wxRichTextObject* obj, wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_IDNAME, const wxString& caption = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_SIZE, long style = SYMBOL_WXRICHTEXTOBJECTPROPERTIESDIALOG_STYLE ); + + /// Destructor + ~wxRichTextObjectPropertiesDialog(); + + /// Initialises member variables + void Init(); + + /// Creates the controls and sizers + void CreateControls(); + +////@begin wxRichTextObjectPropertiesDialog event handler declarations + +////@end wxRichTextObjectPropertiesDialog event handler declarations + +////@begin wxRichTextObjectPropertiesDialog member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextObjectPropertiesDialog member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin wxRichTextObjectPropertiesDialog member variables + /// Control identifiers + enum { + ID_RICHTEXTOBJECTPROPERTIESDIALOG = 10650 + }; +////@end wxRichTextObjectPropertiesDialog member variables +}; + +#endif + // _RICHTEXTIMAGEDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextindentspage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextindentspage.h new file mode 100644 index 0000000000..8a5f3cb31c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextindentspage.h @@ -0,0 +1,169 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextindentspage.h +// Purpose: +// Author: Julian Smart +// Modified by: +// Created: 10/3/2006 2:28:21 PM +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTINDENTSPAGE_H_ +#define _RICHTEXTINDENTSPAGE_H_ + +/*! + * Includes + */ + +#include "wx/richtext/richtextdialogpage.h" + +////@begin includes +#include "wx/statline.h" +////@end includes + +/*! + * Forward declarations + */ + +////@begin forward declarations +class wxRichTextCtrl; +////@end forward declarations + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_TITLE wxEmptyString +#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_IDNAME ID_RICHTEXTINDENTSSPACINGPAGE +#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition +////@end control identifiers + +/*! + * wxRichTextIndentsSpacingPage class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextIndentsSpacingPage: public wxRichTextDialogPage +{ + DECLARE_DYNAMIC_CLASS( wxRichTextIndentsSpacingPage ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxRichTextIndentsSpacingPage( ); + wxRichTextIndentsSpacingPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE, long style = SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE, long style = SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE ); + + /// Initialise members + void Init(); + + /// Creates the controls and sizers + void CreateControls(); + + /// Transfer data from/to window + virtual bool TransferDataFromWindow(); + virtual bool TransferDataToWindow(); + + /// Updates the paragraph preview + void UpdatePreview(); + + /// Gets the attributes associated with the main formatting dialog + wxRichTextAttr* GetAttributes(); + +////@begin wxRichTextIndentsSpacingPage event handler declarations + + /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT + void OnAlignmentLeftSelected( wxCommandEvent& event ); + + /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT + void OnAlignmentRightSelected( wxCommandEvent& event ); + + /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED + void OnAlignmentJustifiedSelected( wxCommandEvent& event ); + + /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED + void OnAlignmentCentredSelected( wxCommandEvent& event ); + + /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE + void OnAlignmentIndeterminateSelected( wxCommandEvent& event ); + + /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT + void OnIndentLeftUpdated( wxCommandEvent& event ); + + /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST + void OnIndentLeftFirstUpdated( wxCommandEvent& event ); + + /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT + void OnIndentRightUpdated( wxCommandEvent& event ); + + /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL + void OnRichtextOutlinelevelSelected( wxCommandEvent& event ); + + /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE + void OnSpacingBeforeUpdated( wxCommandEvent& event ); + + /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER + void OnSpacingAfterUpdated( wxCommandEvent& event ); + + /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE + void OnSpacingLineSelected( wxCommandEvent& event ); + +////@end wxRichTextIndentsSpacingPage event handler declarations + +////@begin wxRichTextIndentsSpacingPage member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextIndentsSpacingPage member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin wxRichTextIndentsSpacingPage member variables + wxRadioButton* m_alignmentLeft; + wxRadioButton* m_alignmentRight; + wxRadioButton* m_alignmentJustified; + wxRadioButton* m_alignmentCentred; + wxRadioButton* m_alignmentIndeterminate; + wxTextCtrl* m_indentLeft; + wxTextCtrl* m_indentLeftFirst; + wxTextCtrl* m_indentRight; + wxComboBox* m_outlineLevelCtrl; + wxTextCtrl* m_spacingBefore; + wxTextCtrl* m_spacingAfter; + wxComboBox* m_spacingLine; + wxCheckBox* m_pageBreakCtrl; + wxRichTextCtrl* m_previewCtrl; + /// Control identifiers + enum { + ID_RICHTEXTINDENTSSPACINGPAGE = 10100, + ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT = 10102, + ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT = 10110, + ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED = 10111, + ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED = 10112, + ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE = 10101, + ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT = 10103, + ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST = 10104, + ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT = 10113, + ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL = 10105, + ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE = 10114, + ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER = 10116, + ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE = 10115, + ID_RICHTEXTINDENTSSPACINGPAGE_PAGEBREAK = 10106, + ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL = 10109 + }; +////@end wxRichTextIndentsSpacingPage member variables + + bool m_dontUpdate; +}; + +#endif + // _RICHTEXTINDENTSPAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextliststylepage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextliststylepage.h new file mode 100644 index 0000000000..c63b7f6dc8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextliststylepage.h @@ -0,0 +1,278 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextliststylepage.h +// Purpose: +// Author: Julian Smart +// Modified by: +// Created: 10/18/2006 11:36:37 AM +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTLISTSTYLEPAGE_H_ +#define _RICHTEXTLISTSTYLEPAGE_H_ + +/*! + * Includes + */ + +#include "wx/richtext/richtextdialogpage.h" + +////@begin includes +#include "wx/spinctrl.h" +#include "wx/notebook.h" +#include "wx/statline.h" +////@end includes + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_TITLE wxEmptyString +#define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_IDNAME ID_RICHTEXTLISTSTYLEPAGE +#define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_POSITION wxDefaultPosition +////@end control identifiers + +/*! + * wxRichTextListStylePage class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextListStylePage: public wxRichTextDialogPage +{ + DECLARE_DYNAMIC_CLASS( wxRichTextListStylePage ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxRichTextListStylePage( ); + wxRichTextListStylePage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_STYLE ); + + /// Initialises member variables + void Init(); + + /// Creates the controls and sizers + void CreateControls(); + + /// Updates the bullets preview + void UpdatePreview(); + + /// Transfer data from/to window + virtual bool TransferDataFromWindow(); + virtual bool TransferDataToWindow(); + + /// Get attributes for selected level + wxRichTextAttr* GetAttributesForSelection(); + + /// Update for symbol-related controls + void OnSymbolUpdate( wxUpdateUIEvent& event ); + + /// Update for number-related controls + void OnNumberUpdate( wxUpdateUIEvent& event ); + + /// Update for standard bullet-related controls + void OnStandardBulletUpdate( wxUpdateUIEvent& event ); + + /// Just transfer to the window + void DoTransferDataToWindow(); + + /// Transfer from the window and preview + void TransferAndPreview(); + +////@begin wxRichTextListStylePage event handler declarations + + /// wxEVT_SPINCTRL event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL + void OnLevelUpdated( wxSpinEvent& event ); + + /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL + void OnLevelUp( wxSpinEvent& event ); + + /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL + void OnLevelDown( wxSpinEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL + void OnLevelTextUpdated( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL + void OnLevelUIUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT + void OnChooseFontClick( wxCommandEvent& event ); + + /// wxEVT_LISTBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX + void OnStylelistboxSelected( wxCommandEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL + void OnPeriodctrlClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL + void OnPeriodctrlUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL + void OnParenthesesctrlClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL + void OnParenthesesctrlUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL + void OnRightParenthesisCtrlClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL + void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL + void OnBulletAlignmentCtrlSelected( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC + void OnSymbolstaticUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL + void OnSymbolctrlSelected( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL + void OnSymbolctrlUpdated( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL + void OnSymbolctrlUIUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL + void OnChooseSymbolClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL + void OnChooseSymbolUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL + void OnSymbolfontctrlSelected( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL + void OnSymbolfontctrlUpdated( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL + void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMESTATIC + void OnNamestaticUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + void OnNamectrlSelected( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + void OnNamectrlUpdated( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + void OnNamectrlUIUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT + void OnRichtextliststylepageAlignleftSelected( wxCommandEvent& event ); + + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT + void OnRichtextliststylepageAlignrightSelected( wxCommandEvent& event ); + + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED + void OnRichtextliststylepageJustifiedSelected( wxCommandEvent& event ); + + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CENTERED + void OnRichtextliststylepageCenteredSelected( wxCommandEvent& event ); + + /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE + void OnRichtextliststylepageAlignindeterminateSelected( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT + void OnIndentLeftUpdated( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE + void OnIndentFirstLineUpdated( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT + void OnIndentRightUpdated( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE + void OnSpacingBeforeUpdated( wxCommandEvent& event ); + + /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER + void OnSpacingAfterUpdated( wxCommandEvent& event ); + + /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_LINESPACING + void OnLineSpacingSelected( wxCommandEvent& event ); + +////@end wxRichTextListStylePage event handler declarations + +////@begin wxRichTextListStylePage member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextListStylePage member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin wxRichTextListStylePage member variables + wxSpinCtrl* m_levelCtrl; + wxListBox* m_styleListBox; + wxCheckBox* m_periodCtrl; + wxCheckBox* m_parenthesesCtrl; + wxCheckBox* m_rightParenthesisCtrl; + wxComboBox* m_bulletAlignmentCtrl; + wxComboBox* m_symbolCtrl; + wxComboBox* m_symbolFontCtrl; + wxComboBox* m_bulletNameCtrl; + wxRadioButton* m_alignmentLeft; + wxRadioButton* m_alignmentRight; + wxRadioButton* m_alignmentJustified; + wxRadioButton* m_alignmentCentred; + wxRadioButton* m_alignmentIndeterminate; + wxTextCtrl* m_indentLeft; + wxTextCtrl* m_indentLeftFirst; + wxTextCtrl* m_indentRight; + wxTextCtrl* m_spacingBefore; + wxTextCtrl* m_spacingAfter; + wxComboBox* m_spacingLine; + wxRichTextCtrl* m_previewCtrl; + /// Control identifiers + enum { + ID_RICHTEXTLISTSTYLEPAGE = 10616, + ID_RICHTEXTLISTSTYLEPAGE_LEVEL = 10617, + ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT = 10604, + ID_RICHTEXTLISTSTYLEPAGE_NOTEBOOK = 10618, + ID_RICHTEXTLISTSTYLEPAGE_BULLETS = 10619, + ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX = 10620, + ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL = 10627, + ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL = 10626, + ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL = 10602, + ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL = 10603, + ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC = 10621, + ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL = 10622, + ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL = 10623, + ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL = 10625, + ID_RICHTEXTLISTSTYLEPAGE_NAMESTATIC = 10600, + ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL = 10601, + ID_RICHTEXTLISTSTYLEPAGE_SPACING = 10628, + ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT = 10629, + ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT = 10630, + ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED = 10631, + ID_RICHTEXTLISTSTYLEPAGE_CENTERED = 10632, + ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE = 10633, + ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT = 10634, + ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE = 10635, + ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT = 10636, + ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE = 10637, + ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER = 10638, + ID_RICHTEXTLISTSTYLEPAGE_LINESPACING = 10639, + ID_RICHTEXTLISTSTYLEPAGE_RICHTEXTCTRL = 10640 + }; +////@end wxRichTextListStylePage member variables + + bool m_dontUpdate; + int m_currentLevel; +}; + +#endif + // _RICHTEXTLISTSTYLEPAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextmarginspage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextmarginspage.h new file mode 100644 index 0000000000..336316c269 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextmarginspage.h @@ -0,0 +1,179 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextmarginspage.h +// Purpose: +// Author: Julian Smart +// Modified by: +// Created: 20/10/2010 10:27:34 +// RCS-ID: +// Copyright: (c) Julian Smart +// Licence: +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTMARGINSPAGE_H_ +#define _RICHTEXTMARGINSPAGE_H_ + + +/*! + * Includes + */ + +#include "wx/richtext/richtextdialogpage.h" + +////@begin includes +#include "wx/statline.h" +////@end includes + +/*! + * Forward declarations + */ + +////@begin forward declarations +////@end forward declarations + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define SYMBOL_WXRICHTEXTMARGINSPAGE_STYLE wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTMARGINSPAGE_TITLE wxEmptyString +#define SYMBOL_WXRICHTEXTMARGINSPAGE_IDNAME ID_WXRICHTEXTMARGINSPAGE +#define SYMBOL_WXRICHTEXTMARGINSPAGE_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTMARGINSPAGE_POSITION wxDefaultPosition +////@end control identifiers + + +/*! + * wxRichTextMarginsPage class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextMarginsPage: public wxRichTextDialogPage +{ + DECLARE_DYNAMIC_CLASS( wxRichTextMarginsPage ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxRichTextMarginsPage(); + wxRichTextMarginsPage( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTMARGINSPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTMARGINSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTMARGINSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTMARGINSPAGE_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTMARGINSPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTMARGINSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTMARGINSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTMARGINSPAGE_STYLE ); + + /// Destructor + ~wxRichTextMarginsPage(); + + /// Initialises member variables + void Init(); + + /// Creates the controls and sizers + void CreateControls(); + + /// Gets the attributes from the formatting dialog + wxRichTextAttr* GetAttributes(); + + /// Data transfer + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); + +////@begin wxRichTextMarginsPage event handler declarations + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_LEFT_MARGIN + void OnRichtextLeftMarginUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_RIGHT_MARGIN + void OnRichtextRightMarginUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_TOP_MARGIN + void OnRichtextTopMarginUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BOTTOM_MARGIN + void OnRichtextBottomMarginUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_LEFT_PADDING + void OnRichtextLeftPaddingUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_RIGHT_PADDING + void OnRichtextRightPaddingUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_TOP_PADDING + void OnRichtextTopPaddingUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BOTTOM_PADDING + void OnRichtextBottomPaddingUpdate( wxUpdateUIEvent& event ); + +////@end wxRichTextMarginsPage event handler declarations + +////@begin wxRichTextMarginsPage member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextMarginsPage member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin wxRichTextMarginsPage member variables + wxCheckBox* m_leftMarginCheckbox; + wxTextCtrl* m_marginLeft; + wxComboBox* m_unitsMarginLeft; + wxCheckBox* m_rightMarginCheckbox; + wxTextCtrl* m_marginRight; + wxComboBox* m_unitsMarginRight; + wxCheckBox* m_topMarginCheckbox; + wxTextCtrl* m_marginTop; + wxComboBox* m_unitsMarginTop; + wxCheckBox* m_bottomMarginCheckbox; + wxTextCtrl* m_marginBottom; + wxComboBox* m_unitsMarginBottom; + wxCheckBox* m_leftPaddingCheckbox; + wxTextCtrl* m_paddingLeft; + wxComboBox* m_unitsPaddingLeft; + wxCheckBox* m_rightPaddingCheckbox; + wxTextCtrl* m_paddingRight; + wxComboBox* m_unitsPaddingRight; + wxCheckBox* m_topPaddingCheckbox; + wxTextCtrl* m_paddingTop; + wxComboBox* m_unitsPaddingTop; + wxCheckBox* m_bottomPaddingCheckbox; + wxTextCtrl* m_paddingBottom; + wxComboBox* m_unitsPaddingBottom; + /// Control identifiers + enum { + ID_WXRICHTEXTMARGINSPAGE = 10750, + ID_RICHTEXT_LEFT_MARGIN_CHECKBOX = 10751, + ID_RICHTEXT_LEFT_MARGIN = 10752, + ID_RICHTEXT_LEFT_MARGIN_UNITS = 10753, + ID_RICHTEXT_RIGHT_MARGIN_CHECKBOX = 10754, + ID_RICHTEXT_RIGHT_MARGIN = 10755, + ID_RICHTEXT_RIGHT_MARGIN_UNITS = 10756, + ID_RICHTEXT_TOP_MARGIN_CHECKBOX = 10757, + ID_RICHTEXT_TOP_MARGIN = 10758, + ID_RICHTEXT_TOP_MARGIN_UNITS = 10759, + ID_RICHTEXT_BOTTOM_MARGIN_CHECKBOX = 10760, + ID_RICHTEXT_BOTTOM_MARGIN = 10761, + ID_RICHTEXT_BOTTOM_MARGIN_UNITS = 10762, + ID_RICHTEXT_LEFT_PADDING_CHECKBOX = 10763, + ID_RICHTEXT_LEFT_PADDING = 10764, + ID_RICHTEXT_LEFT_PADDING_UNITS = 10765, + ID_RICHTEXT_RIGHT_PADDING_CHECKBOX = 10766, + ID_RICHTEXT_RIGHT_PADDING = 10767, + ID_RICHTEXT_RIGHT_PADDING_UNITS = 10768, + ID_RICHTEXT_TOP_PADDING_CHECKBOX = 10769, + ID_RICHTEXT_TOP_PADDING = 10770, + ID_RICHTEXT_TOP_PADDING_UNITS = 10771, + ID_RICHTEXT_BOTTOM_PADDING_CHECKBOX = 10772, + ID_RICHTEXT_BOTTOM_PADDING = 10773, + ID_RICHTEXT_BOTTOM_PADDING_UNITS = 10774 + }; +////@end wxRichTextMarginsPage member variables + + bool m_ignoreUpdates; +}; + +#endif + // _RICHTEXTMARGINSPAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextprint.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextprint.h new file mode 100644 index 0000000000..5dceccf319 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextprint.h @@ -0,0 +1,251 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextprint.h +// Purpose: Rich text printing classes +// Author: Julian Smart +// Created: 2006-10-23 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RICHTEXTPRINT_H_ +#define _WX_RICHTEXTPRINT_H_ + +#include "wx/defs.h" + +#if wxUSE_RICHTEXT & wxUSE_PRINTING_ARCHITECTURE + +#include "wx/richtext/richtextbuffer.h" + +#include "wx/print.h" +#include "wx/printdlg.h" + +#define wxRICHTEXT_PRINT_MAX_PAGES 99999 + +// Header/footer page identifiers +enum wxRichTextOddEvenPage { + wxRICHTEXT_PAGE_ODD, + wxRICHTEXT_PAGE_EVEN, + wxRICHTEXT_PAGE_ALL +}; + +// Header/footer text locations +enum wxRichTextPageLocation { + wxRICHTEXT_PAGE_LEFT, + wxRICHTEXT_PAGE_CENTRE, + wxRICHTEXT_PAGE_RIGHT +}; + +/*! + * Header/footer data + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextHeaderFooterData: public wxObject +{ +public: + wxRichTextHeaderFooterData() { Init(); } + wxRichTextHeaderFooterData(const wxRichTextHeaderFooterData& data): wxObject() { Copy(data); } + + /// Initialise + void Init() { m_headerMargin = 20; m_footerMargin = 20; m_showOnFirstPage = true; } + + /// Copy + void Copy(const wxRichTextHeaderFooterData& data); + + /// Assignment + void operator= (const wxRichTextHeaderFooterData& data) { Copy(data); } + + /// Set/get header text, e.g. wxRICHTEXT_PAGE_ODD, wxRICHTEXT_PAGE_LEFT + void SetHeaderText(const wxString& text, wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); + wxString GetHeaderText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; + + /// Set/get footer text, e.g. wxRICHTEXT_PAGE_ODD, wxRICHTEXT_PAGE_LEFT + void SetFooterText(const wxString& text, wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); + wxString GetFooterText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; + + /// Set/get text + void SetText(const wxString& text, int headerFooter, wxRichTextOddEvenPage page, wxRichTextPageLocation location); + wxString GetText(int headerFooter, wxRichTextOddEvenPage page, wxRichTextPageLocation location) const; + + /// Set/get margins between text and header or footer, in tenths of a millimeter + void SetMargins(int headerMargin, int footerMargin) { m_headerMargin = headerMargin; m_footerMargin = footerMargin; } + int GetHeaderMargin() const { return m_headerMargin; } + int GetFooterMargin() const { return m_footerMargin; } + + /// Set/get whether to show header or footer on first page + void SetShowOnFirstPage(bool showOnFirstPage) { m_showOnFirstPage = showOnFirstPage; } + bool GetShowOnFirstPage() const { return m_showOnFirstPage; } + + /// Clear all text + void Clear(); + + /// Set/get font + void SetFont(const wxFont& font) { m_font = font; } + const wxFont& GetFont() const { return m_font; } + + /// Set/get colour + void SetTextColour(const wxColour& col) { m_colour = col; } + const wxColour& GetTextColour() const { return m_colour; } + + DECLARE_CLASS(wxRichTextHeaderFooterData) + +private: + + // Strings for left, centre, right, top, bottom, odd, even + wxString m_text[12]; + wxFont m_font; + wxColour m_colour; + int m_headerMargin; + int m_footerMargin; + bool m_showOnFirstPage; +}; + +/*! + * wxRichTextPrintout + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextPrintout : public wxPrintout +{ +public: + wxRichTextPrintout(const wxString& title = wxGetTranslation("Printout")); + virtual ~wxRichTextPrintout(); + + /// The buffer to print + void SetRichTextBuffer(wxRichTextBuffer* buffer) { m_richTextBuffer = buffer; } + wxRichTextBuffer* GetRichTextBuffer() const { return m_richTextBuffer; } + + /// Set/get header/footer data + void SetHeaderFooterData(const wxRichTextHeaderFooterData& data) { m_headerFooterData = data; } + const wxRichTextHeaderFooterData& GetHeaderFooterData() const { return m_headerFooterData; } + + /// Sets margins in 10ths of millimetre. Defaults to 1 inch for margins. + void SetMargins(int top = 254, int bottom = 254, int left = 254, int right = 254); + + /// Calculate scaling and rectangles, setting the device context scaling + void CalculateScaling(wxDC* dc, wxRect& textRect, wxRect& headerRect, wxRect& footerRect); + + // wxPrintout virtual functions + virtual bool OnPrintPage(int page); + virtual bool HasPage(int page); + virtual void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); + virtual bool OnBeginDocument(int startPage, int endPage); + virtual void OnPreparePrinting(); + +private: + + /// Renders one page into dc + void RenderPage(wxDC *dc, int page); + + /// Substitute keywords + static bool SubstituteKeywords(wxString& str, const wxString& title, int pageNum, int pageCount); + +private: + + wxRichTextBuffer* m_richTextBuffer; + int m_numPages; + wxArrayInt m_pageBreaksStart; + wxArrayInt m_pageBreaksEnd; + wxArrayInt m_pageYOffsets; + int m_marginLeft, m_marginTop, m_marginRight, m_marginBottom; + + wxRichTextHeaderFooterData m_headerFooterData; + + wxDECLARE_NO_COPY_CLASS(wxRichTextPrintout); +}; + +/* + *! wxRichTextPrinting + * A simple interface to perform wxRichTextBuffer printing. + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextPrinting : public wxObject +{ +public: + wxRichTextPrinting(const wxString& name = wxGetTranslation("Printing"), wxWindow *parentWindow = NULL); + virtual ~wxRichTextPrinting(); + + /// Preview the file or buffer +#if wxUSE_FFILE && wxUSE_STREAMS + bool PreviewFile(const wxString& richTextFile); +#endif + bool PreviewBuffer(const wxRichTextBuffer& buffer); + + /// Print the file or buffer +#if wxUSE_FFILE && wxUSE_STREAMS + bool PrintFile(const wxString& richTextFile, bool showPrintDialog = true); +#endif + bool PrintBuffer(const wxRichTextBuffer& buffer, bool showPrintDialog = true); + + /// Shows page setup dialog + void PageSetup(); + + /// Set/get header/footer data + void SetHeaderFooterData(const wxRichTextHeaderFooterData& data) { m_headerFooterData = data; } + const wxRichTextHeaderFooterData& GetHeaderFooterData() const { return m_headerFooterData; } + + /// Set/get header text, e.g. wxRICHTEXT_PAGE_ODD, wxRICHTEXT_PAGE_LEFT + void SetHeaderText(const wxString& text, wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); + wxString GetHeaderText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; + + /// Set/get footer text, e.g. wxRICHTEXT_PAGE_ODD, wxRICHTEXT_PAGE_LEFT + void SetFooterText(const wxString& text, wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); + wxString GetFooterText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; + + /// Show header/footer on first page, or not + void SetShowOnFirstPage(bool show) { m_headerFooterData.SetShowOnFirstPage(show); } + + /// Set the font + void SetHeaderFooterFont(const wxFont& font) { m_headerFooterData.SetFont(font); } + + /// Set the colour + void SetHeaderFooterTextColour(const wxColour& font) { m_headerFooterData.SetTextColour(font); } + + /// Get print and page setup data + wxPrintData *GetPrintData(); + wxPageSetupDialogData *GetPageSetupData() { return m_pageSetupData; } + + /// Set print and page setup data + void SetPrintData(const wxPrintData& printData); + void SetPageSetupData(const wxPageSetupDialogData& pageSetupData); + + /// Set the rich text buffer pointer, deleting the existing object if present + void SetRichTextBufferPreview(wxRichTextBuffer* buf); + wxRichTextBuffer* GetRichTextBufferPreview() const { return m_richTextBufferPreview; } + + void SetRichTextBufferPrinting(wxRichTextBuffer* buf); + wxRichTextBuffer* GetRichTextBufferPrinting() const { return m_richTextBufferPrinting; } + + /// Set/get the parent window + void SetParentWindow(wxWindow* parent) { m_parentWindow = parent; } + wxWindow* GetParentWindow() const { return m_parentWindow; } + + /// Set/get the title + void SetTitle(const wxString& title) { m_title = title; } + const wxString& GetTitle() const { return m_title; } + + /// Set/get the preview rect + void SetPreviewRect(const wxRect& rect) { m_previewRect = rect; } + const wxRect& GetPreviewRect() const { return m_previewRect; } + +protected: + virtual wxRichTextPrintout *CreatePrintout(); + virtual bool DoPreview(wxRichTextPrintout *printout1, wxRichTextPrintout *printout2); + virtual bool DoPrint(wxRichTextPrintout *printout, bool showPrintDialog); + +private: + wxPrintData* m_printData; + wxPageSetupDialogData* m_pageSetupData; + + wxRichTextHeaderFooterData m_headerFooterData; + wxString m_title; + wxWindow* m_parentWindow; + wxRichTextBuffer* m_richTextBufferPreview; + wxRichTextBuffer* m_richTextBufferPrinting; + wxRect m_previewRect; + + wxDECLARE_NO_COPY_CLASS(wxRichTextPrinting); +}; + +#endif // wxUSE_RICHTEXT & wxUSE_PRINTING_ARCHITECTURE + +#endif // _WX_RICHTEXTPRINT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextsizepage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextsizepage.h new file mode 100644 index 0000000000..dfba99fd6a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextsizepage.h @@ -0,0 +1,301 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextsizepage.h +// Purpose: +// Author: Julian Smart +// Modified by: +// Created: 20/10/2010 10:23:24 +// RCS-ID: +// Copyright: (c) Julian Smart +// Licence: +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTSIZEPAGE_H_ +#define _RICHTEXTSIZEPAGE_H_ + +/*! + * Includes + */ + +#include "wx/richtext/richtextdialogpage.h" +#include "wx/sizer.h" + +////@begin includes +#include "wx/statline.h" +#include "wx/valgen.h" +////@end includes +#include "wx/stattext.h" + +/*! + * Forward declarations + */ + + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define SYMBOL_WXRICHTEXTSIZEPAGE_STYLE wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTSIZEPAGE_TITLE wxEmptyString +#define SYMBOL_WXRICHTEXTSIZEPAGE_IDNAME ID_WXRICHTEXTSIZEPAGE +#define SYMBOL_WXRICHTEXTSIZEPAGE_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTSIZEPAGE_POSITION wxDefaultPosition +////@end control identifiers + + +/*! + * wxRichTextSizePage class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextSizePage: public wxRichTextDialogPage +{ + DECLARE_DYNAMIC_CLASS( wxRichTextSizePage ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxRichTextSizePage(); + wxRichTextSizePage( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTSIZEPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTSIZEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSIZEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSIZEPAGE_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTSIZEPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTSIZEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSIZEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSIZEPAGE_STYLE ); + + /// Destructor + ~wxRichTextSizePage(); + + /// Initialises member variables + void Init(); + + /// Creates the controls and sizers + void CreateControls(); + + /// Gets the attributes from the formatting dialog + wxRichTextAttr* GetAttributes(); + + /// Data transfer + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); + + /// Show/hide position controls + static void ShowPositionControls(bool show) { sm_showPositionControls = show; } + + /// Show/hide minimum and maximum size controls + static void ShowMinMaxSizeControls(bool show) { sm_showMinMaxSizeControls = show; } + + /// Show/hide position mode controls + static void ShowPositionModeControls(bool show) { sm_showPositionModeControls = show; } + + /// Show/hide right/bottom position controls + static void ShowRightBottomPositionControls(bool show) { sm_showRightBottomPositionControls = show; } + + /// Show/hide floating and alignment controls + static void ShowFloatingAndAlignmentControls(bool show) { sm_showFloatingAndAlignmentControls = show; } + + /// Show/hide floating controls + static void ShowFloatingControls(bool show) { sm_showFloatingControls = show; } + + /// Show/hide alignment controls + static void ShowAlignmentControls(bool show) { sm_showAlignmentControls = show; } + + /// Enable the position and size units + static void EnablePositionAndSizeUnits(bool enable) { sm_enablePositionAndSizeUnits = enable; } + + /// Enable the checkboxes for position and size + static void EnablePositionAndSizeCheckboxes(bool enable) { sm_enablePositionAndSizeCheckboxes = enable; } + +////@begin wxRichTextSizePage event handler declarations + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_VERTICAL_ALIGNMENT_COMBOBOX + void OnRichtextVerticalAlignmentComboboxUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_WIDTH + void OnRichtextWidthUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_UNITS_W + void OnRichtextWidthUnitsUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_HEIGHT + void OnRichtextHeightUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_UNITS_H + void OnRichtextHeightUnitsUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MIN_WIDTH + void OnRichtextMinWidthUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MIN_HEIGHT + void OnRichtextMinHeightUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MAX_WIDTH + void OnRichtextMaxWidthUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MAX_HEIGHT + void OnRichtextMaxHeightUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_LEFT + void OnRichtextLeftUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_LEFT_UNITS + void OnRichtextLeftUnitsUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_TOP + void OnRichtextTopUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_TOP_UNITS + void OnRichtextTopUnitsUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_RIGHT + void OnRichtextRightUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_RIGHT_UNITS + void OnRichtextRightUnitsUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BOTTOM + void OnRichtextBottomUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BOTTOM_UNITS + void OnRichtextBottomUnitsUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_PARA_UP + void OnRichtextParaUpClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_PARA_DOWN + void OnRichtextParaDownClick( wxCommandEvent& event ); + +////@end wxRichTextSizePage event handler declarations + +////@begin wxRichTextSizePage member function declarations + + int GetPositionMode() const { return m_positionMode ; } + void SetPositionMode(int value) { m_positionMode = value ; } + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextSizePage member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin wxRichTextSizePage member variables + wxBoxSizer* m_parentSizer; + wxBoxSizer* m_floatingAlignmentSizer; + wxBoxSizer* m_floatingSizer; + wxChoice* m_float; + wxBoxSizer* m_alignmentSizer; + wxCheckBox* m_verticalAlignmentCheckbox; + wxChoice* m_verticalAlignmentComboBox; + wxFlexGridSizer* m_sizeSizer; + wxBoxSizer* m_widthSizer; + wxCheckBox* m_widthCheckbox; + wxStaticText* m_widthLabel; + wxTextCtrl* m_width; + wxComboBox* m_unitsW; + wxBoxSizer* m_heightSizer; + wxCheckBox* m_heightCheckbox; + wxStaticText* m_heightLabel; + wxTextCtrl* m_height; + wxComboBox* m_unitsH; + wxCheckBox* m_minWidthCheckbox; + wxBoxSizer* m_minWidthSizer; + wxTextCtrl* m_minWidth; + wxComboBox* m_unitsMinW; + wxCheckBox* m_minHeightCheckbox; + wxBoxSizer* m_minHeightSizer; + wxTextCtrl* m_minHeight; + wxComboBox* m_unitsMinH; + wxCheckBox* m_maxWidthCheckbox; + wxBoxSizer* m_maxWidthSizer; + wxTextCtrl* m_maxWidth; + wxComboBox* m_unitsMaxW; + wxCheckBox* m_maxHeightCheckbox; + wxBoxSizer* m_maxHeightSizer; + wxTextCtrl* m_maxHeight; + wxComboBox* m_unitsMaxH; + wxBoxSizer* m_positionControls; + wxBoxSizer* m_moveObjectParentSizer; + wxBoxSizer* m_positionModeSizer; + wxChoice* m_positionModeCtrl; + wxFlexGridSizer* m_positionGridSizer; + wxBoxSizer* m_leftSizer; + wxCheckBox* m_positionLeftCheckbox; + wxStaticText* m_leftLabel; + wxTextCtrl* m_left; + wxComboBox* m_unitsLeft; + wxBoxSizer* m_topSizer; + wxCheckBox* m_positionTopCheckbox; + wxStaticText* m_topLabel; + wxTextCtrl* m_top; + wxComboBox* m_unitsTop; + wxBoxSizer* m_rightSizer; + wxCheckBox* m_positionRightCheckbox; + wxStaticText* m_rightLabel; + wxBoxSizer* m_rightPositionSizer; + wxTextCtrl* m_right; + wxComboBox* m_unitsRight; + wxBoxSizer* m_bottomSizer; + wxCheckBox* m_positionBottomCheckbox; + wxStaticText* m_bottomLabel; + wxBoxSizer* m_bottomPositionSizer; + wxTextCtrl* m_bottom; + wxComboBox* m_unitsBottom; + wxBoxSizer* m_moveObjectSizer; + int m_positionMode; + /// Control identifiers + enum { + ID_WXRICHTEXTSIZEPAGE = 10700, + ID_RICHTEXT_FLOATING_MODE = 10701, + ID_RICHTEXT_VERTICAL_ALIGNMENT_CHECKBOX = 10708, + ID_RICHTEXT_VERTICAL_ALIGNMENT_COMBOBOX = 10709, + ID_RICHTEXT_WIDTH_CHECKBOX = 10702, + ID_RICHTEXT_WIDTH = 10703, + ID_RICHTEXT_UNITS_W = 10704, + ID_RICHTEXT_HEIGHT_CHECKBOX = 10705, + ID_RICHTEXT_HEIGHT = 10706, + ID_RICHTEXT_UNITS_H = 10707, + ID_RICHTEXT_MIN_WIDTH_CHECKBOX = 10715, + ID_RICHTEXT_MIN_WIDTH = 10716, + ID_RICHTEXT_UNITS_MIN_W = 10717, + ID_RICHTEXT_MIN_HEIGHT_CHECKBOX = 10718, + ID_RICHTEXT_MIN_HEIGHT = 10719, + ID_RICHTEXT_UNITS_MIN_H = 10720, + ID_RICHTEXT_MAX_WIDTH_CHECKBOX = 10721, + ID_RICHTEXT_MAX_WIDTH = 10722, + ID_RICHTEXT_UNITS_MAX_W = 10723, + ID_RICHTEXT_MAX_HEIGHT_CHECKBOX = 10724, + ID_RICHTEXT_MAX_HEIGHT = 10725, + ID_RICHTEXT_UNITS_MAX_H = 10726, + ID_RICHTEXT_POSITION_MODE = 10735, + ID_RICHTEXT_LEFT_CHECKBOX = 10710, + ID_RICHTEXT_LEFT = 10711, + ID_RICHTEXT_LEFT_UNITS = 10712, + ID_RICHTEXT_TOP_CHECKBOX = 10710, + ID_RICHTEXT_TOP = 10728, + ID_RICHTEXT_TOP_UNITS = 10729, + ID_RICHTEXT_RIGHT_CHECKBOX = 10727, + ID_RICHTEXT_RIGHT = 10730, + ID_RICHTEXT_RIGHT_UNITS = 10731, + ID_RICHTEXT_BOTTOM_CHECKBOX = 10732, + ID_RICHTEXT_BOTTOM = 10733, + ID_RICHTEXT_BOTTOM_UNITS = 10734, + ID_RICHTEXT_PARA_UP = 10713, + ID_RICHTEXT_PARA_DOWN = 10714 + }; +////@end wxRichTextSizePage member variables + + static bool sm_showFloatingControls; + static bool sm_showPositionControls; + static bool sm_showMinMaxSizeControls; + static bool sm_showPositionModeControls; + static bool sm_showRightBottomPositionControls; + static bool sm_showAlignmentControls; + static bool sm_showFloatingAndAlignmentControls; + static bool sm_enablePositionAndSizeUnits; + static bool sm_enablePositionAndSizeCheckboxes; +}; + +#endif + // _RICHTEXTSIZEPAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextstyledlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextstyledlg.h new file mode 100644 index 0000000000..f3d002bae6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextstyledlg.h @@ -0,0 +1,255 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextstyledlg.h +// Purpose: +// Author: Julian Smart +// Modified by: +// Created: 10/5/2006 12:05:31 PM +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTSTYLEDLG_H_ +#define _RICHTEXTSTYLEDLG_H_ + +/*! + * Includes + */ + +#include "wx/richtext/richtextuicustomization.h" + +////@begin includes +////@end includes + +#include "wx/richtext/richtextbuffer.h" +#include "wx/richtext/richtextstyles.h" +#include "wx/richtext/richtextctrl.h" + +/*! + * Forward declarations + */ + +////@begin forward declarations +class wxBoxSizer; +class wxRichTextStyleListCtrl; +class wxRichTextCtrl; +class wxStdDialogButtonSizer; +////@end forward declarations + +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxCheckBox; + +/*! + * Control identifiers + */ + +#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX +#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_TITLE wxGetTranslation("Style Organiser") +#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_IDNAME ID_RICHTEXTSTYLEORGANISERDIALOG +#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION wxDefaultPosition + +/*! + * Flags for specifying permitted operations + */ + +#define wxRICHTEXT_ORGANISER_DELETE_STYLES 0x0001 +#define wxRICHTEXT_ORGANISER_CREATE_STYLES 0x0002 +#define wxRICHTEXT_ORGANISER_APPLY_STYLES 0x0004 +#define wxRICHTEXT_ORGANISER_EDIT_STYLES 0x0008 +#define wxRICHTEXT_ORGANISER_RENAME_STYLES 0x0010 +#define wxRICHTEXT_ORGANISER_OK_CANCEL 0x0020 +#define wxRICHTEXT_ORGANISER_RENUMBER 0x0040 + +// The permitted style types to show +#define wxRICHTEXT_ORGANISER_SHOW_CHARACTER 0x0100 +#define wxRICHTEXT_ORGANISER_SHOW_PARAGRAPH 0x0200 +#define wxRICHTEXT_ORGANISER_SHOW_LIST 0x0400 +#define wxRICHTEXT_ORGANISER_SHOW_BOX 0x0800 +#define wxRICHTEXT_ORGANISER_SHOW_ALL 0x1000 + +// Common combinations +#define wxRICHTEXT_ORGANISER_ORGANISE (wxRICHTEXT_ORGANISER_SHOW_ALL|wxRICHTEXT_ORGANISER_DELETE_STYLES|wxRICHTEXT_ORGANISER_CREATE_STYLES|wxRICHTEXT_ORGANISER_APPLY_STYLES|wxRICHTEXT_ORGANISER_EDIT_STYLES|wxRICHTEXT_ORGANISER_RENAME_STYLES) +#define wxRICHTEXT_ORGANISER_BROWSE (wxRICHTEXT_ORGANISER_SHOW_ALL|wxRICHTEXT_ORGANISER_OK_CANCEL) +#define wxRICHTEXT_ORGANISER_BROWSE_NUMBERING (wxRICHTEXT_ORGANISER_SHOW_LIST|wxRICHTEXT_ORGANISER_OK_CANCEL|wxRICHTEXT_ORGANISER_RENUMBER) + +/*! + * wxRichTextStyleOrganiserDialog class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextStyleOrganiserDialog: public wxDialog +{ + DECLARE_DYNAMIC_CLASS( wxRichTextStyleOrganiserDialog ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxRichTextStyleOrganiserDialog( ); + wxRichTextStyleOrganiserDialog( int flags, wxRichTextStyleSheet* sheet, wxRichTextCtrl* ctrl, wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_STYLE ); + + /// Creation + bool Create( int flags, wxRichTextStyleSheet* sheet, wxRichTextCtrl* ctrl, wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_STYLE ); + + /// Creates the controls and sizers + void CreateControls(); + + /// Initialise member variables + void Init(); + + /// Transfer data from/to window + virtual bool TransferDataFromWindow(); + virtual bool TransferDataToWindow(); + + /// Set/get style sheet + void SetStyleSheet(wxRichTextStyleSheet* sheet) { m_richTextStyleSheet = sheet; } + wxRichTextStyleSheet* GetStyleSheet() const { return m_richTextStyleSheet; } + + /// Set/get control + void SetRichTextCtrl(wxRichTextCtrl* ctrl) { m_richTextCtrl = ctrl; } + wxRichTextCtrl* GetRichTextCtrl() const { return m_richTextCtrl; } + + /// Set/get flags + void SetFlags(int flags) { m_flags = flags; } + int GetFlags() const { return m_flags; } + + /// Show preview for given or selected preview + void ShowPreview(int sel = -1); + + /// Clears the preview + void ClearPreview(); + + /// List selection + void OnListSelection(wxCommandEvent& event); + + /// Get/set restart numbering boolean + bool GetRestartNumbering() const { return m_restartNumbering; } + void SetRestartNumbering(bool restartNumbering) { m_restartNumbering = restartNumbering; } + + /// Get selected style name or definition + wxString GetSelectedStyle() const; + wxRichTextStyleDefinition* GetSelectedStyleDefinition() const; + + /// Apply the style + bool ApplyStyle(wxRichTextCtrl* ctrl = NULL); + + /// Should we show tooltips? + static bool ShowToolTips() { return sm_showToolTips; } + + /// Determines whether tooltips will be shown + static void SetShowToolTips(bool show) { sm_showToolTips = show; } + +////@begin wxRichTextStyleOrganiserDialog event handler declarations + + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_CHAR + void OnNewCharClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_CHAR + void OnNewCharUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_PARA + void OnNewParaClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_PARA + void OnNewParaUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_LIST + void OnNewListClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_LIST + void OnNewListUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_BOX + void OnNewBoxClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_BOX + void OnNewBoxUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_APPLY + void OnApplyClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_APPLY + void OnApplyUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_RENAME + void OnRenameClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_RENAME + void OnRenameUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_EDIT + void OnEditClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_EDIT + void OnEditUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_DELETE + void OnDeleteClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_DELETE + void OnDeleteUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for wxID_HELP + void OnHelpClick( wxCommandEvent& event ); + +////@end wxRichTextStyleOrganiserDialog event handler declarations + +////@begin wxRichTextStyleOrganiserDialog member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextStyleOrganiserDialog member function declarations + +////@begin wxRichTextStyleOrganiserDialog member variables + wxBoxSizer* m_innerSizer; + wxBoxSizer* m_buttonSizerParent; + wxRichTextStyleListCtrl* m_stylesListBox; + wxRichTextCtrl* m_previewCtrl; + wxBoxSizer* m_buttonSizer; + wxButton* m_newCharacter; + wxButton* m_newParagraph; + wxButton* m_newList; + wxButton* m_newBox; + wxButton* m_applyStyle; + wxButton* m_renameStyle; + wxButton* m_editStyle; + wxButton* m_deleteStyle; + wxButton* m_closeButton; + wxBoxSizer* m_bottomButtonSizer; + wxCheckBox* m_restartNumberingCtrl; + wxStdDialogButtonSizer* m_stdButtonSizer; + wxButton* m_okButton; + wxButton* m_cancelButton; + /// Control identifiers + enum { + ID_RICHTEXTSTYLEORGANISERDIALOG = 10500, + ID_RICHTEXTSTYLEORGANISERDIALOG_STYLES = 10501, + ID_RICHTEXTSTYLEORGANISERDIALOG_CURRENT_STYLE = 10510, + ID_RICHTEXTSTYLEORGANISERDIALOG_PREVIEW = 10509, + ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_CHAR = 10504, + ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_PARA = 10505, + ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_LIST = 10508, + ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_BOX = 10512, + ID_RICHTEXTSTYLEORGANISERDIALOG_APPLY = 10503, + ID_RICHTEXTSTYLEORGANISERDIALOG_RENAME = 10502, + ID_RICHTEXTSTYLEORGANISERDIALOG_EDIT = 10506, + ID_RICHTEXTSTYLEORGANISERDIALOG_DELETE = 10507, + ID_RICHTEXTSTYLEORGANISERDIALOG_RESTART_NUMBERING = 10511 + }; +////@end wxRichTextStyleOrganiserDialog member variables + +private: + + wxRichTextCtrl* m_richTextCtrl; + wxRichTextStyleSheet* m_richTextStyleSheet; + + bool m_dontUpdate; + int m_flags; + static bool sm_showToolTips; + bool m_restartNumbering; +}; + +#endif + // _RICHTEXTSTYLEDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextstylepage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextstylepage.h new file mode 100644 index 0000000000..fe45ba045b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextstylepage.h @@ -0,0 +1,93 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextstylepage.h +// Purpose: +// Author: Julian Smart +// Modified by: +// Created: 10/5/2006 11:34:55 AM +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTSTYLEPAGE_H_ +#define _RICHTEXTSTYLEPAGE_H_ + +#include "wx/richtext/richtextdialogpage.h" + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTSTYLEPAGE_TITLE wxEmptyString +#define SYMBOL_WXRICHTEXTSTYLEPAGE_IDNAME ID_RICHTEXTSTYLEPAGE +#define SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION wxDefaultPosition +////@end control identifiers + +/*! + * wxRichTextStylePage class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextStylePage: public wxRichTextDialogPage +{ + DECLARE_DYNAMIC_CLASS( wxRichTextStylePage ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxRichTextStylePage( ); + wxRichTextStylePage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEPAGE_STYLE ); + + /// Initialise members + void Init(); + + /// Creates the controls and sizers + void CreateControls(); + + /// Transfer data from/to window + virtual bool TransferDataFromWindow(); + virtual bool TransferDataToWindow(); + + /// Gets the attributes associated with the main formatting dialog + wxRichTextAttr* GetAttributes(); + +////@begin wxRichTextStylePage event handler declarations + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEPAGE_NEXT_STYLE + void OnNextStyleUpdate( wxUpdateUIEvent& event ); + +////@end wxRichTextStylePage event handler declarations + +////@begin wxRichTextStylePage member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextStylePage member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin wxRichTextStylePage member variables + wxTextCtrl* m_styleName; + wxComboBox* m_basedOn; + wxComboBox* m_nextStyle; + /// Control identifiers + enum { + ID_RICHTEXTSTYLEPAGE = 10403, + ID_RICHTEXTSTYLEPAGE_STYLE_NAME = 10404, + ID_RICHTEXTSTYLEPAGE_BASED_ON = 10405, + ID_RICHTEXTSTYLEPAGE_NEXT_STYLE = 10406 + }; +////@end wxRichTextStylePage member variables +}; + +#endif + // _RICHTEXTSTYLEPAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextstyles.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextstyles.h new file mode 100644 index 0000000000..4293ccf76c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextstyles.h @@ -0,0 +1,760 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextstyles.h +// Purpose: Style management for wxRichTextCtrl +// Author: Julian Smart +// Modified by: +// Created: 2005-09-30 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RICHTEXTSTYLES_H_ +#define _WX_RICHTEXTSTYLES_H_ + +/*! + * Includes + */ + +#include "wx/defs.h" + +#if wxUSE_RICHTEXT + +#include "wx/richtext/richtextbuffer.h" + +#if wxUSE_HTML +#include "wx/htmllbox.h" +#endif + +#if wxUSE_COMBOCTRL +#include "wx/combo.h" +#endif + +#include "wx/choice.h" + +/*! + * Forward declarations + */ + +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextCtrl; +class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextBuffer; + +/*! + * wxRichTextStyleDefinition class declaration + * A base class for paragraph and character styles. + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextStyleDefinition: public wxObject +{ + DECLARE_CLASS(wxRichTextStyleDefinition) +public: + + /// Copy constructors + wxRichTextStyleDefinition(const wxRichTextStyleDefinition& def) + : wxObject() + { + Init(); + Copy(def); + } + + /// Default constructor + wxRichTextStyleDefinition(const wxString& name = wxEmptyString) { Init(); m_name = name; } + + /// Destructor + virtual ~wxRichTextStyleDefinition() {} + + /// Initialises members + void Init() {} + + /// Copies from def + void Copy(const wxRichTextStyleDefinition& def); + + /// Equality test + bool Eq(const wxRichTextStyleDefinition& def) const; + + /// Assignment operator + void operator =(const wxRichTextStyleDefinition& def) { Copy(def); } + + /// Equality operator + bool operator ==(const wxRichTextStyleDefinition& def) const { return Eq(def); } + + /// Override to clone the object + virtual wxRichTextStyleDefinition* Clone() const = 0; + + /// Sets and gets the name of the style + void SetName(const wxString& name) { m_name = name; } + const wxString& GetName() const { return m_name; } + + /// Sets and gets the style description + void SetDescription(const wxString& descr) { m_description = descr; } + const wxString& GetDescription() const { return m_description; } + + /// Sets and gets the name of the style that this style is based on + void SetBaseStyle(const wxString& name) { m_baseStyle = name; } + const wxString& GetBaseStyle() const { return m_baseStyle; } + + /// Sets and gets the style + void SetStyle(const wxRichTextAttr& style) { m_style = style; } + const wxRichTextAttr& GetStyle() const { return m_style; } + wxRichTextAttr& GetStyle() { return m_style; } + + /// Gets the style combined with the base style + virtual wxRichTextAttr GetStyleMergedWithBase(const wxRichTextStyleSheet* sheet) const; + + /** + Returns the definition's properties. + */ + wxRichTextProperties& GetProperties() { return m_properties; } + + /** + Returns the definition's properties. + */ + const wxRichTextProperties& GetProperties() const { return m_properties; } + + /** + Sets the definition's properties. + */ + void SetProperties(const wxRichTextProperties& props) { m_properties = props; } + +protected: + wxString m_name; + wxString m_baseStyle; + wxString m_description; + wxRichTextAttr m_style; + wxRichTextProperties m_properties; +}; + +/*! + * wxRichTextCharacterStyleDefinition class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextCharacterStyleDefinition: public wxRichTextStyleDefinition +{ + DECLARE_DYNAMIC_CLASS(wxRichTextCharacterStyleDefinition) +public: + + /// Copy constructor + wxRichTextCharacterStyleDefinition(const wxRichTextCharacterStyleDefinition& def): wxRichTextStyleDefinition(def) {} + + /// Default constructor + wxRichTextCharacterStyleDefinition(const wxString& name = wxEmptyString): + wxRichTextStyleDefinition(name) {} + + /// Destructor + virtual ~wxRichTextCharacterStyleDefinition() {} + + /// Clones the object + virtual wxRichTextStyleDefinition* Clone() const { return new wxRichTextCharacterStyleDefinition(*this); } + +protected: +}; + +/*! + * wxRichTextParagraphStyleDefinition class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextParagraphStyleDefinition: public wxRichTextStyleDefinition +{ + DECLARE_DYNAMIC_CLASS(wxRichTextParagraphStyleDefinition) +public: + + /// Copy constructor + wxRichTextParagraphStyleDefinition(const wxRichTextParagraphStyleDefinition& def): wxRichTextStyleDefinition(def) { m_nextStyle = def.m_nextStyle; } + + /// Default constructor + wxRichTextParagraphStyleDefinition(const wxString& name = wxEmptyString): + wxRichTextStyleDefinition(name) {} + + // Destructor + virtual ~wxRichTextParagraphStyleDefinition() {} + + /// Sets and gets the next style + void SetNextStyle(const wxString& name) { m_nextStyle = name; } + const wxString& GetNextStyle() const { return m_nextStyle; } + + /// Copies from def + void Copy(const wxRichTextParagraphStyleDefinition& def); + + /// Assignment operator + void operator =(const wxRichTextParagraphStyleDefinition& def) { Copy(def); } + + /// Equality operator + bool operator ==(const wxRichTextParagraphStyleDefinition& def) const; + + /// Clones the object + virtual wxRichTextStyleDefinition* Clone() const { return new wxRichTextParagraphStyleDefinition(*this); } + +protected: + + /// The next style to use when adding a paragraph after this style. + wxString m_nextStyle; +}; + +/*! + * wxRichTextListStyleDefinition class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextListStyleDefinition: public wxRichTextParagraphStyleDefinition +{ + DECLARE_DYNAMIC_CLASS(wxRichTextListStyleDefinition) +public: + + /// Copy constructor + wxRichTextListStyleDefinition(const wxRichTextListStyleDefinition& def): wxRichTextParagraphStyleDefinition(def) { Init(); Copy(def); } + + /// Default constructor + wxRichTextListStyleDefinition(const wxString& name = wxEmptyString): + wxRichTextParagraphStyleDefinition(name) { Init(); } + + /// Destructor + virtual ~wxRichTextListStyleDefinition() {} + + /// Copies from def + void Copy(const wxRichTextListStyleDefinition& def); + + /// Assignment operator + void operator =(const wxRichTextListStyleDefinition& def) { Copy(def); } + + /// Equality operator + bool operator ==(const wxRichTextListStyleDefinition& def) const; + + /// Clones the object + virtual wxRichTextStyleDefinition* Clone() const { return new wxRichTextListStyleDefinition(*this); } + + /// Sets/gets the attributes for the given level + void SetLevelAttributes(int i, const wxRichTextAttr& attr); + wxRichTextAttr* GetLevelAttributes(int i); + const wxRichTextAttr* GetLevelAttributes(int i) const; + + /// Convenience function for setting the major attributes for a list level specification + void SetAttributes(int i, int leftIndent, int leftSubIndent, int bulletStyle, const wxString& bulletSymbol = wxEmptyString); + + /// Finds the level corresponding to the given indentation + int FindLevelForIndent(int indent) const; + + /// Combine the base and list style with a paragraph style, using the given indent (from which + /// an appropriate level is found) + wxRichTextAttr CombineWithParagraphStyle(int indent, const wxRichTextAttr& paraStyle, wxRichTextStyleSheet* styleSheet = NULL); + + /// Combine the base and list style, using the given indent (from which + /// an appropriate level is found) + wxRichTextAttr GetCombinedStyle(int indent, wxRichTextStyleSheet* styleSheet = NULL); + + /// Combine the base and list style, using the given level from which + /// an appropriate level is found) + wxRichTextAttr GetCombinedStyleForLevel(int level, wxRichTextStyleSheet* styleSheet = NULL); + + /// Gets the number of available levels + int GetLevelCount() const { return 10; } + + /// Is this a numbered list? + bool IsNumbered(int i) const; + +protected: + + /// The styles for each level (up to 10) + wxRichTextAttr m_levelStyles[10]; +}; + +/*! + * wxRichTextBoxStyleDefinition class declaration, for box attributes in objects such as wxRichTextBox. + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextBoxStyleDefinition: public wxRichTextStyleDefinition +{ + DECLARE_DYNAMIC_CLASS(wxRichTextBoxStyleDefinition) +public: + + /// Copy constructor + wxRichTextBoxStyleDefinition(const wxRichTextBoxStyleDefinition& def): wxRichTextStyleDefinition(def) { Copy(def); } + + /// Default constructor + wxRichTextBoxStyleDefinition(const wxString& name = wxEmptyString): + wxRichTextStyleDefinition(name) {} + + // Destructor + virtual ~wxRichTextBoxStyleDefinition() {} + + /// Copies from def + void Copy(const wxRichTextBoxStyleDefinition& def); + + /// Assignment operator + void operator =(const wxRichTextBoxStyleDefinition& def) { Copy(def); } + + /// Equality operator + bool operator ==(const wxRichTextBoxStyleDefinition& def) const; + + /// Clones the object + virtual wxRichTextStyleDefinition* Clone() const { return new wxRichTextBoxStyleDefinition(*this); } + +protected: +}; + +/*! + * The style sheet + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextStyleSheet: public wxObject +{ + DECLARE_CLASS( wxRichTextStyleSheet ) + +public: + /// Constructors + wxRichTextStyleSheet(const wxRichTextStyleSheet& sheet) + : wxObject() + { + Init(); + Copy(sheet); + } + wxRichTextStyleSheet() { Init(); } + virtual ~wxRichTextStyleSheet(); + + /// Initialisation + void Init(); + + /// Copy + void Copy(const wxRichTextStyleSheet& sheet); + + /// Assignment + void operator=(const wxRichTextStyleSheet& sheet) { Copy(sheet); } + + /// Equality + bool operator==(const wxRichTextStyleSheet& sheet) const; + + /// Add a definition to the character style list + bool AddCharacterStyle(wxRichTextCharacterStyleDefinition* def); + + /// Add a definition to the paragraph style list + bool AddParagraphStyle(wxRichTextParagraphStyleDefinition* def); + + /// Add a definition to the list style list + bool AddListStyle(wxRichTextListStyleDefinition* def); + + /// Add a definition to the box style list + bool AddBoxStyle(wxRichTextBoxStyleDefinition* def); + + /// Add a definition to the appropriate style list + bool AddStyle(wxRichTextStyleDefinition* def); + + /// Remove a character style + bool RemoveCharacterStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false) { return RemoveStyle(m_characterStyleDefinitions, def, deleteStyle); } + + /// Remove a paragraph style + bool RemoveParagraphStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false) { return RemoveStyle(m_paragraphStyleDefinitions, def, deleteStyle); } + + /// Remove a list style + bool RemoveListStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false) { return RemoveStyle(m_listStyleDefinitions, def, deleteStyle); } + + /// Remove a box style + bool RemoveBoxStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false) { return RemoveStyle(m_boxStyleDefinitions, def, deleteStyle); } + + /// Remove a style + bool RemoveStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false); + + /// Find a character definition by name + wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name, bool recurse = true) const { return (wxRichTextCharacterStyleDefinition*) FindStyle(m_characterStyleDefinitions, name, recurse); } + + /// Find a paragraph definition by name + wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name, bool recurse = true) const { return (wxRichTextParagraphStyleDefinition*) FindStyle(m_paragraphStyleDefinitions, name, recurse); } + + /// Find a list definition by name + wxRichTextListStyleDefinition* FindListStyle(const wxString& name, bool recurse = true) const { return (wxRichTextListStyleDefinition*) FindStyle(m_listStyleDefinitions, name, recurse); } + + /// Find a box definition by name + wxRichTextBoxStyleDefinition* FindBoxStyle(const wxString& name, bool recurse = true) const { return (wxRichTextBoxStyleDefinition*) FindStyle(m_boxStyleDefinitions, name, recurse); } + + /// Find any definition by name + wxRichTextStyleDefinition* FindStyle(const wxString& name, bool recurse = true) const; + + /// Return the number of character styles + size_t GetCharacterStyleCount() const { return m_characterStyleDefinitions.GetCount(); } + + /// Return the number of paragraph styles + size_t GetParagraphStyleCount() const { return m_paragraphStyleDefinitions.GetCount(); } + + /// Return the number of list styles + size_t GetListStyleCount() const { return m_listStyleDefinitions.GetCount(); } + + /// Return the number of box styles + size_t GetBoxStyleCount() const { return m_boxStyleDefinitions.GetCount(); } + + /// Return the nth character style + wxRichTextCharacterStyleDefinition* GetCharacterStyle(size_t n) const { return (wxRichTextCharacterStyleDefinition*) m_characterStyleDefinitions.Item(n)->GetData(); } + + /// Return the nth paragraph style + wxRichTextParagraphStyleDefinition* GetParagraphStyle(size_t n) const { return (wxRichTextParagraphStyleDefinition*) m_paragraphStyleDefinitions.Item(n)->GetData(); } + + /// Return the nth list style + wxRichTextListStyleDefinition* GetListStyle(size_t n) const { return (wxRichTextListStyleDefinition*) m_listStyleDefinitions.Item(n)->GetData(); } + + /// Return the nth box style + wxRichTextBoxStyleDefinition* GetBoxStyle(size_t n) const { return (wxRichTextBoxStyleDefinition*) m_boxStyleDefinitions.Item(n)->GetData(); } + + /// Delete all styles + void DeleteStyles(); + + /// Insert into list of style sheets + bool InsertSheet(wxRichTextStyleSheet* before); + + /// Append to list of style sheets + bool AppendSheet(wxRichTextStyleSheet* after); + + /// Unlink from the list of style sheets + void Unlink(); + + /// Get/set next sheet + wxRichTextStyleSheet* GetNextSheet() const { return m_nextSheet; } + void SetNextSheet(wxRichTextStyleSheet* sheet) { m_nextSheet = sheet; } + + /// Get/set previous sheet + wxRichTextStyleSheet* GetPreviousSheet() const { return m_previousSheet; } + void SetPreviousSheet(wxRichTextStyleSheet* sheet) { m_previousSheet = sheet; } + + /// Sets and gets the name of the style sheet + void SetName(const wxString& name) { m_name = name; } + const wxString& GetName() const { return m_name; } + + /// Sets and gets the style description + void SetDescription(const wxString& descr) { m_description = descr; } + const wxString& GetDescription() const { return m_description; } + + /** + Returns the sheet's properties. + */ + wxRichTextProperties& GetProperties() { return m_properties; } + + /** + Returns the sheet's properties. + */ + const wxRichTextProperties& GetProperties() const { return m_properties; } + + /** + Sets the sheet's properties. + */ + void SetProperties(const wxRichTextProperties& props) { m_properties = props; } + +/// Implementation + + /// Add a definition to one of the style lists + bool AddStyle(wxList& list, wxRichTextStyleDefinition* def); + + /// Remove a style + bool RemoveStyle(wxList& list, wxRichTextStyleDefinition* def, bool deleteStyle); + + /// Find a definition by name + wxRichTextStyleDefinition* FindStyle(const wxList& list, const wxString& name, bool recurse = true) const; + +protected: + + wxString m_description; + wxString m_name; + + wxList m_characterStyleDefinitions; + wxList m_paragraphStyleDefinitions; + wxList m_listStyleDefinitions; + wxList m_boxStyleDefinitions; + + wxRichTextStyleSheet* m_previousSheet; + wxRichTextStyleSheet* m_nextSheet; + wxRichTextProperties m_properties; +}; + +#if wxUSE_HTML +/*! + * wxRichTextStyleListBox class declaration + * A listbox to display styles. + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextStyleListBox: public wxHtmlListBox +{ + DECLARE_CLASS(wxRichTextStyleListBox) + DECLARE_EVENT_TABLE() + +public: + /// Which type of style definition is currently showing? + enum wxRichTextStyleType + { + wxRICHTEXT_STYLE_ALL, + wxRICHTEXT_STYLE_PARAGRAPH, + wxRICHTEXT_STYLE_CHARACTER, + wxRICHTEXT_STYLE_LIST, + wxRICHTEXT_STYLE_BOX + }; + + wxRichTextStyleListBox() + { + Init(); + } + wxRichTextStyleListBox(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0); + virtual ~wxRichTextStyleListBox(); + + void Init() + { + m_styleSheet = NULL; + m_richTextCtrl = NULL; + m_applyOnSelection = false; + m_styleType = wxRICHTEXT_STYLE_PARAGRAPH; + m_autoSetSelection = true; + } + + bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0); + + /// Creates a suitable HTML fragment for a definition + wxString CreateHTML(wxRichTextStyleDefinition* def) const; + + /// Associates the control with a style sheet + void SetStyleSheet(wxRichTextStyleSheet* styleSheet) { m_styleSheet = styleSheet; } + wxRichTextStyleSheet* GetStyleSheet() const { return m_styleSheet; } + + /// Associates the control with a wxRichTextCtrl + void SetRichTextCtrl(wxRichTextCtrl* ctrl) { m_richTextCtrl = ctrl; } + wxRichTextCtrl* GetRichTextCtrl() const { return m_richTextCtrl; } + + /// Get style for index + wxRichTextStyleDefinition* GetStyle(size_t i) const ; + + /// Get index for style name + int GetIndexForStyle(const wxString& name) const ; + + /// Set selection for string, returning the index. + int SetStyleSelection(const wxString& name); + + /// Updates the list + void UpdateStyles(); + + /// Apply the style + void ApplyStyle(int i); + + /// Left click + void OnLeftDown(wxMouseEvent& event); + + /// Left double-click + void OnLeftDoubleClick(wxMouseEvent& event); + + /// Auto-select from style under caret in idle time + void OnIdle(wxIdleEvent& event); + + /// Convert units in tends of a millimetre to device units + int ConvertTenthsMMToPixels(wxDC& dc, int units) const; + + /// Can we set the selection based on the editor caret position? + /// Need to override this if being used in a combobox popup + virtual bool CanAutoSetSelection() { return m_autoSetSelection; } + virtual void SetAutoSetSelection(bool autoSet) { m_autoSetSelection = autoSet; } + + /// Set whether the style should be applied as soon as the item is selected (the default) + void SetApplyOnSelection(bool applyOnSel) { m_applyOnSelection = applyOnSel; } + bool GetApplyOnSelection() const { return m_applyOnSelection; } + + /// Set the style type to display + void SetStyleType(wxRichTextStyleType styleType) { m_styleType = styleType; UpdateStyles(); } + wxRichTextStyleType GetStyleType() const { return m_styleType; } + + /// Helper for listbox and combo control + static wxString GetStyleToShowInIdleTime(wxRichTextCtrl* ctrl, wxRichTextStyleType styleType); + +protected: + /// Returns the HTML for this item + virtual wxString OnGetItem(size_t n) const; + +private: + + wxRichTextStyleSheet* m_styleSheet; + wxRichTextCtrl* m_richTextCtrl; + bool m_applyOnSelection; // if true, applies style on selection + wxRichTextStyleType m_styleType; // style type to display + bool m_autoSetSelection; + wxArrayString m_styleNames; +}; + +/*! + * wxRichTextStyleListCtrl class declaration + * This is a container for the list control plus a combobox to switch between + * style types. + */ + +#define wxRICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR 0x1000 + +class WXDLLIMPEXP_RICHTEXT wxRichTextStyleListCtrl: public wxControl +{ + DECLARE_CLASS(wxRichTextStyleListCtrl) + DECLARE_EVENT_TABLE() + +public: + + /// Constructors + wxRichTextStyleListCtrl() + { + Init(); + } + + wxRichTextStyleListCtrl(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0); + + /// Constructors + virtual ~wxRichTextStyleListCtrl(); + + /// Member initialisation + void Init() + { + m_styleListBox = NULL; + m_styleChoice = NULL; + m_dontUpdate = false; + } + + /// Creates the windows + bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0); + + /// Updates the style list box + void UpdateStyles(); + + /// Associates the control with a style sheet + void SetStyleSheet(wxRichTextStyleSheet* styleSheet); + wxRichTextStyleSheet* GetStyleSheet() const; + + /// Associates the control with a wxRichTextCtrl + void SetRichTextCtrl(wxRichTextCtrl* ctrl); + wxRichTextCtrl* GetRichTextCtrl() const; + + /// Set/get the style type to display + void SetStyleType(wxRichTextStyleListBox::wxRichTextStyleType styleType); + wxRichTextStyleListBox::wxRichTextStyleType GetStyleType() const; + + /// Get the choice index for style type + int StyleTypeToIndex(wxRichTextStyleListBox::wxRichTextStyleType styleType); + + /// Get the style type for choice index + wxRichTextStyleListBox::wxRichTextStyleType StyleIndexToType(int i); + + /// Get the listbox + wxRichTextStyleListBox* GetStyleListBox() const { return m_styleListBox; } + + /// Get the choice + wxChoice* GetStyleChoice() const { return m_styleChoice; } + + /// React to style type choice + void OnChooseType(wxCommandEvent& event); + + /// Lay out the controls + void OnSize(wxSizeEvent& event); + +private: + + wxRichTextStyleListBox* m_styleListBox; + wxChoice* m_styleChoice; + bool m_dontUpdate; +}; + +#if wxUSE_COMBOCTRL + +/*! + * Style drop-down for a wxComboCtrl + */ + +class wxRichTextStyleComboPopup : public wxRichTextStyleListBox, public wxComboPopup +{ +public: + virtual void Init() + { + m_itemHere = -1; // hot item in list + m_value = -1; + } + + virtual bool Create( wxWindow* parent ); + + virtual wxWindow *GetControl() { return this; } + + virtual void SetStringValue( const wxString& s ); + + virtual wxString GetStringValue() const; + + /// Can we set the selection based on the editor caret position? + // virtual bool CanAutoSetSelection() { return ((m_combo == NULL) || !m_combo->IsPopupShown()); } + virtual bool CanAutoSetSelection() { return false; } + + // + // Popup event handlers + // + + // Mouse hot-tracking + void OnMouseMove(wxMouseEvent& event); + + // On mouse left, set the value and close the popup + void OnMouseClick(wxMouseEvent& WXUNUSED(event)); + +protected: + + int m_itemHere; // hot item in popup + int m_value; + +private: + DECLARE_EVENT_TABLE() +}; + +/*! + * wxRichTextStyleComboCtrl + * A combo for applying styles. + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextStyleComboCtrl: public wxComboCtrl +{ + DECLARE_CLASS(wxRichTextStyleComboCtrl) + DECLARE_EVENT_TABLE() + +public: + wxRichTextStyleComboCtrl() + { + Init(); + } + + wxRichTextStyleComboCtrl(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxCB_READONLY) + { + Init(); + Create(parent, id, pos, size, style); + } + + virtual ~wxRichTextStyleComboCtrl() {} + + void Init() + { + m_stylePopup = NULL; + } + + bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0); + + /// Updates the list + void UpdateStyles() { m_stylePopup->UpdateStyles(); } + + /// Associates the control with a style sheet + void SetStyleSheet(wxRichTextStyleSheet* styleSheet) { m_stylePopup->SetStyleSheet(styleSheet); } + wxRichTextStyleSheet* GetStyleSheet() const { return m_stylePopup->GetStyleSheet(); } + + /// Associates the control with a wxRichTextCtrl + void SetRichTextCtrl(wxRichTextCtrl* ctrl) { m_stylePopup->SetRichTextCtrl(ctrl); } + wxRichTextCtrl* GetRichTextCtrl() const { return m_stylePopup->GetRichTextCtrl(); } + + /// Gets the style popup + wxRichTextStyleComboPopup* GetStylePopup() const { return m_stylePopup; } + + /// Auto-select from style under caret in idle time + void OnIdle(wxIdleEvent& event); + +protected: + wxRichTextStyleComboPopup* m_stylePopup; +}; + +#endif + // wxUSE_COMBOCTRL + +#endif + // wxUSE_HTML + +#endif + // wxUSE_RICHTEXT + +#endif + // _WX_RICHTEXTSTYLES_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextsymboldlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextsymboldlg.h new file mode 100644 index 0000000000..1dedf65960 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextsymboldlg.h @@ -0,0 +1,375 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextsymboldlg.h +// Purpose: +// Author: Julian Smart +// Modified by: +// Created: 10/5/2006 3:11:58 PM +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTSYMBOLDLG_H_ +#define _RICHTEXTSYMBOLDLG_H_ + +/*! + * Includes + */ + +#include "wx/richtext/richtextuicustomization.h" +#include "wx/dialog.h" +#include "wx/vscroll.h" + +/*! + * Forward declarations + */ + +class WXDLLIMPEXP_FWD_CORE wxStaticText; +class WXDLLIMPEXP_FWD_CORE wxComboBox; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; + +////@begin forward declarations +class wxSymbolListCtrl; +class wxStdDialogButtonSizer; +////@end forward declarations + +// __UNICODE__ is a symbol used by DialogBlocks-generated code. +#ifndef __UNICODE__ +#if wxUSE_UNICODE +#define __UNICODE__ +#endif +#endif + +/*! + * Symbols + */ + +#define SYMBOL_WXSYMBOLPICKERDIALOG_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxCLOSE_BOX) +#define SYMBOL_WXSYMBOLPICKERDIALOG_TITLE wxGetTranslation("Symbols") +#define SYMBOL_WXSYMBOLPICKERDIALOG_IDNAME ID_SYMBOLPICKERDIALOG +#define SYMBOL_WXSYMBOLPICKERDIALOG_SIZE wxSize(400, 300) +#define SYMBOL_WXSYMBOLPICKERDIALOG_POSITION wxDefaultPosition + +/*! + * wxSymbolPickerDialog class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxSymbolPickerDialog: public wxDialog +{ + DECLARE_DYNAMIC_CLASS( wxSymbolPickerDialog ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxSymbolPickerDialog( ); + wxSymbolPickerDialog( const wxString& symbol, const wxString& fontName, const wxString& normalTextFont, + wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = SYMBOL_WXSYMBOLPICKERDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXSYMBOLPICKERDIALOG_POSITION, const wxSize& size = SYMBOL_WXSYMBOLPICKERDIALOG_SIZE, long style = SYMBOL_WXSYMBOLPICKERDIALOG_STYLE ); + + /// Creation + bool Create( const wxString& symbol, const wxString& fontName, const wxString& normalTextFont, + wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = SYMBOL_WXSYMBOLPICKERDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXSYMBOLPICKERDIALOG_POSITION, const wxSize& size = SYMBOL_WXSYMBOLPICKERDIALOG_SIZE, long style = SYMBOL_WXSYMBOLPICKERDIALOG_STYLE ); + + /// Initialises members variables + void Init(); + + /// Creates the controls and sizers + void CreateControls(); + + /// Update the display + void UpdateSymbolDisplay(bool updateSymbolList = true, bool showAtSubset = true); + + /// Respond to symbol selection + void OnSymbolSelected( wxCommandEvent& event ); + + /// Set Unicode mode + void SetUnicodeMode(bool unicodeMode); + + /// Show at the current subset selection + void ShowAtSubset(); + + /// Get the selected symbol character + int GetSymbolChar() const; + + /// Is there a selection? + bool HasSelection() const { return !m_symbol.IsEmpty(); } + + /// Specifying normal text? + bool UseNormalFont() const { return m_fontName.IsEmpty(); } + + /// Should we show tooltips? + static bool ShowToolTips() { return sm_showToolTips; } + + /// Determines whether tooltips will be shown + static void SetShowToolTips(bool show) { sm_showToolTips = show; } + + /// Data transfer + virtual bool TransferDataToWindow(); + +////@begin wxSymbolPickerDialog event handler declarations + + /// wxEVT_COMBOBOX event handler for ID_SYMBOLPICKERDIALOG_FONT + void OnFontCtrlSelected( wxCommandEvent& event ); + +#if defined(__UNICODE__) + /// wxEVT_COMBOBOX event handler for ID_SYMBOLPICKERDIALOG_SUBSET + void OnSubsetSelected( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_SYMBOLPICKERDIALOG_SUBSET + void OnSymbolpickerdialogSubsetUpdate( wxUpdateUIEvent& event ); + +#endif +#if defined(__UNICODE__) + /// wxEVT_COMBOBOX event handler for ID_SYMBOLPICKERDIALOG_FROM + void OnFromUnicodeSelected( wxCommandEvent& event ); + +#endif + /// wxEVT_UPDATE_UI event handler for wxID_OK + void OnOkUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for wxID_HELP + void OnHelpClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for wxID_HELP + void OnHelpUpdate( wxUpdateUIEvent& event ); + +////@end wxSymbolPickerDialog event handler declarations + +////@begin wxSymbolPickerDialog member function declarations + + wxString GetFontName() const { return m_fontName ; } + void SetFontName(wxString value) { m_fontName = value ; } + + bool GetFromUnicode() const { return m_fromUnicode ; } + void SetFromUnicode(bool value) { m_fromUnicode = value ; } + + wxString GetNormalTextFontName() const { return m_normalTextFontName ; } + void SetNormalTextFontName(wxString value) { m_normalTextFontName = value ; } + + wxString GetSymbol() const { return m_symbol ; } + void SetSymbol(wxString value) { m_symbol = value ; } + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxSymbolPickerDialog member function declarations + +////@begin wxSymbolPickerDialog member variables + wxComboBox* m_fontCtrl; +#if defined(__UNICODE__) + wxComboBox* m_subsetCtrl; +#endif + wxSymbolListCtrl* m_symbolsCtrl; + wxStaticText* m_symbolStaticCtrl; + wxTextCtrl* m_characterCodeCtrl; +#if defined(__UNICODE__) + wxComboBox* m_fromUnicodeCtrl; +#endif + wxStdDialogButtonSizer* m_stdButtonSizer; + wxString m_fontName; + bool m_fromUnicode; + wxString m_normalTextFontName; + wxString m_symbol; + /// Control identifiers + enum { + ID_SYMBOLPICKERDIALOG = 10600, + ID_SYMBOLPICKERDIALOG_FONT = 10602, + ID_SYMBOLPICKERDIALOG_SUBSET = 10605, + ID_SYMBOLPICKERDIALOG_LISTCTRL = 10608, + ID_SYMBOLPICKERDIALOG_CHARACTERCODE = 10601, + ID_SYMBOLPICKERDIALOG_FROM = 10603 + }; +////@end wxSymbolPickerDialog member variables + + bool m_dontUpdate; + static bool sm_showToolTips; +}; + +/*! + * The scrolling symbol list. + */ + +class WXDLLIMPEXP_RICHTEXT wxSymbolListCtrl : public wxVScrolledWindow +{ +public: + // constructors and such + // --------------------- + + // default constructor, you must call Create() later + wxSymbolListCtrl() { Init(); } + + // normal constructor which calls Create() internally + wxSymbolListCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + { + Init(); + + (void)Create(parent, id, pos, size, style, name); + } + + // really creates the control and sets the initial number of items in it + // (which may be changed later with SetItemCount()) + // + // returns true on success or false if the control couldn't be created + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + + // dtor does some internal cleanup + virtual ~wxSymbolListCtrl(); + + + // accessors + // --------- + + // set the current font + virtual bool SetFont(const wxFont& font); + + // set Unicode/ASCII mode + void SetUnicodeMode(bool unicodeMode); + + // get the index of the currently selected item or wxNOT_FOUND if there is no selection + int GetSelection() const; + + // is this item selected? + bool IsSelected(int item) const; + + // is this item the current one? + bool IsCurrentItem(int item) const { return item == m_current; } + + // get the margins around each cell + wxPoint GetMargins() const { return m_ptMargins; } + + // get the background colour of selected cells + const wxColour& GetSelectionBackground() const { return m_colBgSel; } + + // operations + // ---------- + + // set the selection to the specified item, if it is wxNOT_FOUND the + // selection is unset + void SetSelection(int selection); + + // make this item visible + void EnsureVisible(int item); + + // set the margins: horizontal margin is the distance between the window + // border and the item contents while vertical margin is half of the + // distance between items + // + // by default both margins are 0 + void SetMargins(const wxPoint& pt); + void SetMargins(wxCoord x, wxCoord y) { SetMargins(wxPoint(x, y)); } + + // set the cell size + void SetCellSize(const wxSize& sz) { m_cellSize = sz; } + const wxSize& GetCellSize() const { return m_cellSize; } + + // change the background colour of the selected cells + void SetSelectionBackground(const wxColour& col); + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // Get min/max symbol values + int GetMinSymbolValue() const { return m_minSymbolValue; } + int GetMaxSymbolValue() const { return m_maxSymbolValue; } + + // Respond to size change + void OnSize(wxSizeEvent& event); + +protected: + + // draws a line of symbols + virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const; + + // gets the line height + virtual wxCoord OnGetRowHeight(size_t line) const; + + // event handlers + void OnPaint(wxPaintEvent& event); + void OnKeyDown(wxKeyEvent& event); + void OnLeftDown(wxMouseEvent& event); + void OnLeftDClick(wxMouseEvent& event); + + // common part of all ctors + void Init(); + + // send the wxEVT_LISTBOX event + void SendSelectedEvent(); + + // change the current item (in single selection listbox it also implicitly + // changes the selection); current may be wxNOT_FOUND in which case there + // will be no current item any more + // + // return true if the current item changed, false otherwise + bool DoSetCurrent(int current); + + // flags for DoHandleItemClick + enum + { + ItemClick_Shift = 1, // item shift-clicked + ItemClick_Ctrl = 2, // ctrl + ItemClick_Kbd = 4 // item selected from keyboard + }; + + // common part of keyboard and mouse handling processing code + void DoHandleItemClick(int item, int flags); + + // calculate line number from symbol value + int SymbolValueToLineNumber(int item); + + // initialise control from current min/max values + void SetupCtrl(bool scrollToSelection = true); + + // hit testing + int HitTest(const wxPoint& pt); + +private: + // the current item or wxNOT_FOUND + int m_current; + + // margins + wxPoint m_ptMargins; + + // the selection bg colour + wxColour m_colBgSel; + + // double buffer + wxBitmap* m_doubleBuffer; + + // cell size + wxSize m_cellSize; + + // minimum and maximum symbol value + int m_minSymbolValue; + + // minimum and maximum symbol value + int m_maxSymbolValue; + + // number of items per line + int m_symbolsPerLine; + + // Unicode/ASCII mode + bool m_unicodeMode; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxSymbolListCtrl); + DECLARE_ABSTRACT_CLASS(wxSymbolListCtrl) +}; + +#endif + // _RICHTEXTSYMBOLDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtexttabspage.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtexttabspage.h new file mode 100644 index 0000000000..e1beb426f1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtexttabspage.h @@ -0,0 +1,131 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtexttabspage.h +// Purpose: +// Author: Julian Smart +// Modified by: +// Created: 10/4/2006 8:03:20 AM +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _RICHTEXTTABSPAGE_H_ +#define _RICHTEXTTABSPAGE_H_ + +/*! + * Includes + */ + +#include "wx/richtext/richtextdialogpage.h" + +////@begin includes +////@end includes + +/*! + * Forward declarations + */ + +////@begin forward declarations +////@end forward declarations + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define SYMBOL_WXRICHTEXTTABSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL +#define SYMBOL_WXRICHTEXTTABSPAGE_TITLE wxEmptyString +#define SYMBOL_WXRICHTEXTTABSPAGE_IDNAME ID_RICHTEXTTABSPAGE +#define SYMBOL_WXRICHTEXTTABSPAGE_SIZE wxSize(400, 300) +#define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition +////@end control identifiers + +/*! + * wxRichTextTabsPage class declaration + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextTabsPage: public wxRichTextDialogPage +{ + DECLARE_DYNAMIC_CLASS( wxRichTextTabsPage ) + DECLARE_EVENT_TABLE() + DECLARE_HELP_PROVISION() + +public: + /// Constructors + wxRichTextTabsPage( ); + wxRichTextTabsPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTTABSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTTABSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTTABSPAGE_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTTABSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTTABSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTTABSPAGE_STYLE ); + + /// Creates the controls and sizers + void CreateControls(); + + /// Initialise members + void Init(); + + /// Transfer data from/to window + virtual bool TransferDataFromWindow(); + virtual bool TransferDataToWindow(); + + /// Sorts the tab array + virtual void SortTabs(); + + /// Gets the attributes associated with the main formatting dialog + wxRichTextAttr* GetAttributes(); + +////@begin wxRichTextTabsPage event handler declarations + + /// wxEVT_LISTBOX event handler for ID_RICHTEXTTABSPAGE_TABLIST + void OnTablistSelected( wxCommandEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_NEW_TAB + void OnNewTabClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_NEW_TAB + void OnNewTabUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB + void OnDeleteTabClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB + void OnDeleteTabUpdate( wxUpdateUIEvent& event ); + + /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS + void OnDeleteAllTabsClick( wxCommandEvent& event ); + + /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS + void OnDeleteAllTabsUpdate( wxUpdateUIEvent& event ); + +////@end wxRichTextTabsPage event handler declarations + +////@begin wxRichTextTabsPage member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end wxRichTextTabsPage member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin wxRichTextTabsPage member variables + wxTextCtrl* m_tabEditCtrl; + wxListBox* m_tabListCtrl; + /// Control identifiers + enum { + ID_RICHTEXTTABSPAGE = 10200, + ID_RICHTEXTTABSPAGE_TABEDIT = 10213, + ID_RICHTEXTTABSPAGE_TABLIST = 10214, + ID_RICHTEXTTABSPAGE_NEW_TAB = 10201, + ID_RICHTEXTTABSPAGE_DELETE_TAB = 10202, + ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS = 10203 + }; +////@end wxRichTextTabsPage member variables + + bool m_tabsPresent; +}; + +#endif + // _RICHTEXTTABSPAGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextuicustomization.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextuicustomization.h new file mode 100644 index 0000000000..92c42d7b1f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextuicustomization.h @@ -0,0 +1,126 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextuicustomization.h +// Purpose: UI customization base class for wxRTC +// Author: Julian Smart +// Modified by: +// Created: 2010-11-14 +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RICHTEXTUICUSTOMIZATION_H_ +#define _WX_RICHTEXTUICUSTOMIZATION_H_ + +#if wxUSE_RICHTEXT + +#include "wx/window.h" + +/** + @class wxRichTextUICustomization + The base class for functionality to plug in to various rich text control dialogs, + currently allowing the application to respond to Help button clicks without the + need to derive new dialog classes. + + The application will typically have calls like this in its initialisation: + + wxRichTextFormattingDialog::GetHelpInfo().SetHelpId(ID_HELP_FORMATTINGDIALOG); + wxRichTextFormattingDialog::GetHelpInfo().SetUICustomization(& wxGetApp().GetRichTextUICustomization()); + wxRichTextBordersPage::GetHelpInfo().SetHelpId(ID_HELP_BORDERSPAGE); + + Only the wxRichTextFormattingDialog class needs to have its customization object and help id set, + though the application set them for individual pages if it wants. + **/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextUICustomization +{ +public: + wxRichTextUICustomization() {} + virtual ~wxRichTextUICustomization() {} + + /// Show the help given the current active window, and a help topic id. + virtual bool ShowHelp(wxWindow* win, long id) = 0; +}; + +/** + @class wxRichTextHelpInfo + This class is used as a static member of dialogs, to store the help topic for the dialog + and also the customization object that will allow help to be shown appropriately for the application. + **/ + +class WXDLLIMPEXP_RICHTEXT wxRichTextHelpInfo +{ +public: + wxRichTextHelpInfo() + { + m_helpTopic = -1; + m_uiCustomization = NULL; + } + virtual ~wxRichTextHelpInfo() {} + + virtual bool ShowHelp(wxWindow* win) + { + if ( !m_uiCustomization || m_helpTopic == -1 ) + return false; + + return m_uiCustomization->ShowHelp(win, m_helpTopic); + } + + /// Get the help topic identifier. + long GetHelpId() const { return m_helpTopic; } + + /// Set the help topic identifier. + void SetHelpId(long id) { m_helpTopic = id; } + + /// Get the UI customization object. + wxRichTextUICustomization* GetUICustomization() const { return m_uiCustomization; } + + /// Set the UI customization object. + void SetUICustomization(wxRichTextUICustomization* customization) { m_uiCustomization = customization; } + + /// Is there a valid help topic id? + bool HasHelpId() const { return m_helpTopic != -1; } + + /// Is there a valid customization object? + bool HasUICustomization() const { return m_uiCustomization != NULL; } + +protected: + wxRichTextUICustomization* m_uiCustomization; + long m_helpTopic; +}; + +/// Add this to the base class of dialogs + +#define DECLARE_BASE_CLASS_HELP_PROVISION() \ + virtual long GetHelpId() const = 0; \ + virtual wxRichTextUICustomization* GetUICustomization() const = 0; \ + virtual bool ShowHelp(wxWindow* win) = 0; + +/// A macro to make it easy to add help topic provision and UI customization +/// to a class. Optionally, add virtual functions to a base class +/// using DECLARE_BASE_CLASS_HELP_PROVISION. This means that the formatting dialog +/// can obtain help topics from its individual pages without needing +/// to know in advance what page classes are being used, allowing for extension +/// of the formatting dialog. + +#define DECLARE_HELP_PROVISION() \ + virtual long GetHelpId() const { return sm_helpInfo.GetHelpId(); } \ + virtual void SetHelpId(long id) { sm_helpInfo.SetHelpId(id); } \ + virtual wxRichTextUICustomization* GetUICustomization() const { return sm_helpInfo.GetUICustomization(); } \ + virtual void SetUICustomization(wxRichTextUICustomization* customization) { sm_helpInfo.SetUICustomization(customization); } \ + virtual bool ShowHelp(wxWindow* win) { return sm_helpInfo.ShowHelp(win); } \ +public: \ + static wxRichTextHelpInfo& GetHelpInfo() { return sm_helpInfo; }\ +protected: \ + static wxRichTextHelpInfo sm_helpInfo; \ +public: + +/// Add this to the implementation file for each dialog that needs help provision. + +#define IMPLEMENT_HELP_PROVISION(theClass) \ + wxRichTextHelpInfo theClass::sm_helpInfo; + +#endif + // wxUSE_RICHTEXT + +#endif + // _WX_RICHTEXTUICUSTOMIZATION_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextxml.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextxml.h new file mode 100644 index 0000000000..013aa97693 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtext/richtextxml.h @@ -0,0 +1,237 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/richtext/richtextxml.h +// Purpose: XML and HTML I/O for wxRichTextCtrl +// Author: Julian Smart +// Modified by: +// Created: 2005-09-30 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RICHTEXTXML_H_ +#define _WX_RICHTEXTXML_H_ + +/*! + * Includes + */ + +#include "wx/hashmap.h" +#include "wx/richtext/richtextbuffer.h" +#include "wx/richtext/richtextstyles.h" + +#if wxUSE_RICHTEXT && wxUSE_XML + +/*! + @class wxRichTextXMLHelper + A utility class to help with XML import/export, that can be used outside + saving a buffer if needed. + */ + +class WXDLLIMPEXP_RICHTEXT wxRichTextXMLHelper: public wxObject +{ +public: + wxRichTextXMLHelper() { Init(); } + wxRichTextXMLHelper(const wxString& enc) { Init(); SetupForSaving(enc); } + ~wxRichTextXMLHelper(); + + void Init(); + + void SetupForSaving(const wxString& enc); + + void Clear(); + + void SetFileEncoding(const wxString& encoding) { m_fileEncoding = encoding; } + const wxString& GetFileEncoding() const { return m_fileEncoding; } + + // Convert a colour to a 6-digit hex string + static wxString ColourToHexString(const wxColour& col); + + // Convert 6-digit hex string to a colour + static wxColour HexStringToColour(const wxString& hex); + + static wxString MakeString(const int& v) { return wxString::Format(wxT("%d"), v); } + static wxString MakeString(const long& v) { return wxString::Format(wxT("%ld"), v); } + static wxString MakeString(const double& v) { return wxString::Format(wxT("%.2f"), (float) v); } + static wxString MakeString(const wxString& s) { return s; } + static wxString MakeString(const wxColour& col) { return wxT("#") + ColourToHexString(col); } + + static bool HasParam(wxXmlNode* node, const wxString& param); + static wxXmlNode *GetParamNode(wxXmlNode* node, const wxString& param); + static wxString GetNodeContent(wxXmlNode *node); + static wxString GetParamValue(wxXmlNode *node, const wxString& param); + static wxString GetText(wxXmlNode *node, const wxString& param = wxEmptyString); + static wxXmlNode* FindNode(wxXmlNode* node, const wxString& name); + + static wxString AttributeToXML(const wxString& str); + + static bool RichTextFixFaceName(wxString& facename); + static long ColourStringToLong(const wxString& colStr); + static wxTextAttrDimension ParseDimension(const wxString& dimStr); + + // Make a string from the given property. This can be overridden for custom variants. + virtual wxString MakeStringFromProperty(const wxVariant& var); + + // Create a proprty from the string read from the XML file. + virtual wxVariant MakePropertyFromString(const wxString& name, const wxString& value, const wxString& type); + + // Import properties + virtual bool ImportProperties(wxRichTextProperties& properties, wxXmlNode* node); + + virtual bool ImportStyle(wxRichTextAttr& attr, wxXmlNode* node, bool isPara = false); + virtual bool ImportStyleDefinition(wxRichTextStyleSheet* sheet, wxXmlNode* node); + + // Get flags, as per handler flags + int GetFlags() const { return m_flags; } + void SetFlags(int flags) { m_flags = flags; } + +#if wxRICHTEXT_HAVE_DIRECT_OUTPUT + // write string to output + static void OutputString(wxOutputStream& stream, const wxString& str, + wxMBConv *convMem, wxMBConv *convFile); + + static void OutputIndentation(wxOutputStream& stream, int indent); + + // Same as above, but create entities first. + // Translates '<' to "<", '>' to ">" and '&' to "&" + static void OutputStringEnt(wxOutputStream& stream, const wxString& str, + wxMBConv *convMem, wxMBConv *convFile); + + void OutputString(wxOutputStream& stream, const wxString& str); + void OutputStringEnt(wxOutputStream& stream, const wxString& str); + + static void AddString(wxString& str, const int& v) { str << wxString::Format(wxT("%d"), v); } + static void AddString(wxString& str, const long& v) { str << wxString::Format(wxT("%ld"), v); } + static void AddString(wxString& str, const double& v) { str << wxString::Format(wxT("%.2f"), (float) v); } + static void AddString(wxString& str, const wxChar* s) { str << s; } + static void AddString(wxString& str, const wxString& s) { str << s; } + static void AddString(wxString& str, const wxColour& col) { str << wxT("#") << ColourToHexString(col); } + + static void AddAttribute(wxString& str, const wxString& name, const int& v); + static void AddAttribute(wxString& str, const wxString& name, const long& v); + static void AddAttribute(wxString& str, const wxString& name, const double& v); + static void AddAttribute(wxString& str, const wxString& name, const wxChar* s); + static void AddAttribute(wxString& str, const wxString& name, const wxString& s); + static void AddAttribute(wxString& str, const wxString& name, const wxColour& col); + static void AddAttribute(wxString& str, const wxString& name, const wxTextAttrDimension& dim); + static void AddAttribute(wxString& str, const wxString& rootName, const wxTextAttrDimensions& dims); + static void AddAttribute(wxString& str, const wxString& rootName, const wxTextAttrBorder& border); + static void AddAttribute(wxString& str, const wxString& rootName, const wxTextAttrBorders& borders); + + /// Create a string containing style attributes + static wxString AddAttributes(const wxRichTextAttr& attr, bool isPara = false); + virtual bool ExportStyleDefinition(wxOutputStream& stream, wxRichTextStyleDefinition* def, int level); + + virtual bool WriteProperties(wxOutputStream& stream, const wxRichTextProperties& properties, int level); +#endif + +#if wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT + static void AddAttribute(wxXmlNode* node, const wxString& name, const int& v); + static void AddAttribute(wxXmlNode* node, const wxString& name, const long& v); + static void AddAttribute(wxXmlNode* node, const wxString& name, const double& v); + static void AddAttribute(wxXmlNode* node, const wxString& name, const wxString& s); + static void AddAttribute(wxXmlNode* node, const wxString& name, const wxColour& col); + static void AddAttribute(wxXmlNode* node, const wxString& name, const wxTextAttrDimension& dim); + static void AddAttribute(wxXmlNode* node, const wxString& rootName, const wxTextAttrDimensions& dims); + static void AddAttribute(wxXmlNode* node, const wxString& rootName, const wxTextAttrBorder& border); + static void AddAttribute(wxXmlNode* node, const wxString& rootName, const wxTextAttrBorders& borders); + + static bool AddAttributes(wxXmlNode* node, wxRichTextAttr& attr, bool isPara = false); + + virtual bool ExportStyleDefinition(wxXmlNode* parent, wxRichTextStyleDefinition* def); + + // Write the properties + virtual bool WriteProperties(wxXmlNode* node, const wxRichTextProperties& properties); +#endif + +public: + +#if wxRICHTEXT_HAVE_DIRECT_OUTPUT + // Used during saving + wxMBConv* m_convMem; + wxMBConv* m_convFile; + bool m_deleteConvFile; +#endif + + wxString m_fileEncoding; + int m_flags; +}; + +/*! + @class wxRichTextXMLHandler + + Implements XML loading and saving. Two methods of saving are included: + writing directly to a text stream, and populating an wxXmlDocument + before writing it. The former method is considerably faster, so we favour + that one, even though the code is a little less elegant. + */ + +class WXDLLIMPEXP_FWD_XML wxXmlNode; +class WXDLLIMPEXP_FWD_XML wxXmlDocument; + +class WXDLLIMPEXP_RICHTEXT wxRichTextXMLHandler: public wxRichTextFileHandler +{ + DECLARE_DYNAMIC_CLASS(wxRichTextXMLHandler) +public: + wxRichTextXMLHandler(const wxString& name = wxT("XML"), const wxString& ext = wxT("xml"), int type = wxRICHTEXT_TYPE_XML) + : wxRichTextFileHandler(name, ext, type) + { Init(); } + + void Init(); + +#if wxUSE_STREAMS + +#if wxRICHTEXT_HAVE_DIRECT_OUTPUT + /// Recursively export an object + bool ExportXML(wxOutputStream& stream, wxRichTextObject& obj, int level); +#endif + +#if wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT + bool ExportXML(wxXmlNode* parent, wxRichTextObject& obj); +#endif + + /// Recursively import an object + bool ImportXML(wxRichTextBuffer* buffer, wxRichTextObject* obj, wxXmlNode* node); +#endif + + /// Creates an object given an XML element name + virtual wxRichTextObject* CreateObjectForXMLName(wxRichTextObject* parent, const wxString& name) const; + + /// Can we save using this handler? + virtual bool CanSave() const { return true; } + + /// Can we load using this handler? + virtual bool CanLoad() const { return true; } + + /// Returns the XML helper object, implementing functionality + /// that can be reused elsewhere. + wxRichTextXMLHelper& GetHelper() { return m_helper; } + +// Implementation + + /** + Call with XML node name, C++ class name so that wxRTC can read in the node. + If you add a custom object, call this. + */ + static void RegisterNodeName(const wxString& nodeName, const wxString& className) { sm_nodeNameToClassMap[nodeName] = className; } + + /** + Cleans up the mapping between node name and C++ class. + */ + static void ClearNodeToClassMap() { sm_nodeNameToClassMap.clear(); } + +protected: +#if wxUSE_STREAMS + virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream); + virtual bool DoSaveFile(wxRichTextBuffer *buffer, wxOutputStream& stream); +#endif + + wxRichTextXMLHelper m_helper; + + static wxStringToStringHashMap sm_nodeNameToClassMap; +}; + +#endif + // wxUSE_RICHTEXT && wxUSE_XML + +#endif + // _WX_RICHTEXTXML_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtooltip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtooltip.h new file mode 100644 index 0000000000..1187e67ed1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/richtooltip.h @@ -0,0 +1,103 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/richtooltip.h +// Purpose: Declaration of wxRichToolTip class. +// Author: Vadim Zeitlin +// Created: 2011-10-07 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RICHTOOLTIP_H_ +#define _WX_RICHTOOLTIP_H_ + +#include "wx/defs.h" + +#if wxUSE_RICHTOOLTIP + +#include "wx/colour.h" + +class WXDLLIMPEXP_FWD_CORE wxFont; +class WXDLLIMPEXP_FWD_CORE wxIcon; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class wxRichToolTipImpl; + +// This enum describes the kind of the tip shown which combines both the tip +// position and appearance because the two are related (when the tip is +// positioned asymmetrically, a right handed triangle is used but an +// equilateral one when it's in the middle of a side). +// +// Automatic selects the tip appearance best suited for the current platform +// and the position best suited for the window the tooltip is shown for, i.e. +// chosen in such a way that the tooltip is always fully on screen. +// +// Other values describe the position of the tooltip itself, not the window it +// relates to. E.g. wxTipKind_Top places the tip on the top of the tooltip and +// so the tooltip itself is located beneath its associated window. +enum wxTipKind +{ + wxTipKind_None, + wxTipKind_TopLeft, + wxTipKind_Top, + wxTipKind_TopRight, + wxTipKind_BottomLeft, + wxTipKind_Bottom, + wxTipKind_BottomRight, + wxTipKind_Auto +}; + +// ---------------------------------------------------------------------------- +// wxRichToolTip: a customizable but not necessarily native tooltip. +// ---------------------------------------------------------------------------- + +// Notice that this class does not inherit from wxWindow. +class WXDLLIMPEXP_ADV wxRichToolTip +{ +public: + // Ctor must specify the tooltip title and main message, additional + // attributes can be set later. + wxRichToolTip(const wxString& title, const wxString& message); + + // Set the background colour: if two colours are specified, the background + // is drawn using a gradient from top to bottom, otherwise a single solid + // colour is used. + void SetBackgroundColour(const wxColour& col, + const wxColour& colEnd = wxColour()); + + // Set the small icon to show: either one of the standard information/ + // warning/error ones (the question icon doesn't make sense for a tooltip) + // or a custom icon. + void SetIcon(int icon = wxICON_INFORMATION); + void SetIcon(const wxIcon& icon); + + // Set timeout after which the tooltip should disappear, in milliseconds. + // By default the tooltip is hidden after system-dependent interval of time + // elapses but this method can be used to change this or also disable + // hiding the tooltip automatically entirely by passing 0 in this parameter + // (but doing this can result in native version not being used). + // Optionally specify a show delay. + void SetTimeout(unsigned milliseconds, unsigned millisecondsShowdelay = 0); + + // Choose the tip kind, possibly none. By default the tip is positioned + // automatically, as if wxTipKind_Auto was used. + void SetTipKind(wxTipKind tipKind); + + // Set the title text font. By default it's emphasized using the font style + // or colour appropriate for the current platform. + void SetTitleFont(const wxFont& font); + + // Show the tooltip for the given window and optionally a specified area. + void ShowFor(wxWindow* win, const wxRect* rect = NULL); + + // Non-virtual dtor as this class is not supposed to be derived from. + ~wxRichToolTip(); + +private: + wxRichToolTipImpl* const m_impl; + + wxDECLARE_NO_COPY_CLASS(wxRichToolTip); +}; + +#endif // wxUSE_RICHTOOLTIP + +#endif // _WX_RICHTOOLTIP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/rtti.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/rtti.h new file mode 100644 index 0000000000..51017baa2f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/rtti.h @@ -0,0 +1,319 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/rtti.h +// Purpose: old RTTI macros (use XTI when possible instead) +// Author: Julian Smart +// Modified by: Ron Lee +// Created: 01/02/97 +// Copyright: (c) 1997 Julian Smart +// (c) 2001 Ron Lee <ron@debian.org> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_RTTIH__ +#define _WX_RTTIH__ + +#if !wxUSE_EXTENDED_RTTI // XTI system is meant to replace these macros + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/memory.h" + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxObject; +class WXDLLIMPEXP_FWD_BASE wxString; +class WXDLLIMPEXP_FWD_BASE wxClassInfo; +class WXDLLIMPEXP_FWD_BASE wxHashTable; +class WXDLLIMPEXP_FWD_BASE wxObject; +class WXDLLIMPEXP_FWD_BASE wxPluginLibrary; +class WXDLLIMPEXP_FWD_BASE wxHashTable_Node; + +// ---------------------------------------------------------------------------- +// wxClassInfo +// ---------------------------------------------------------------------------- + +typedef wxObject *(*wxObjectConstructorFn)(void); + +class WXDLLIMPEXP_BASE wxClassInfo +{ + friend class WXDLLIMPEXP_FWD_BASE wxObject; + friend WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxString& name); +public: + wxClassInfo( const wxChar *className, + const wxClassInfo *baseInfo1, + const wxClassInfo *baseInfo2, + int size, + wxObjectConstructorFn ctor ) + : m_className(className) + , m_objectSize(size) + , m_objectConstructor(ctor) + , m_baseInfo1(baseInfo1) + , m_baseInfo2(baseInfo2) + , m_next(sm_first) + { + sm_first = this; + Register(); + } + + ~wxClassInfo(); + + wxObject *CreateObject() const + { return m_objectConstructor ? (*m_objectConstructor)() : 0; } + bool IsDynamic() const { return (NULL != m_objectConstructor); } + + const wxChar *GetClassName() const { return m_className; } + const wxChar *GetBaseClassName1() const + { return m_baseInfo1 ? m_baseInfo1->GetClassName() : NULL; } + const wxChar *GetBaseClassName2() const + { return m_baseInfo2 ? m_baseInfo2->GetClassName() : NULL; } + const wxClassInfo *GetBaseClass1() const { return m_baseInfo1; } + const wxClassInfo *GetBaseClass2() const { return m_baseInfo2; } + int GetSize() const { return m_objectSize; } + + wxObjectConstructorFn GetConstructor() const + { return m_objectConstructor; } + static const wxClassInfo *GetFirst() { return sm_first; } + const wxClassInfo *GetNext() const { return m_next; } + static wxClassInfo *FindClass(const wxString& className); + + // Climb upwards through inheritance hierarchy. + // Dual inheritance is catered for. + + bool IsKindOf(const wxClassInfo *info) const + { + return info != 0 && + ( info == this || + ( m_baseInfo1 && m_baseInfo1->IsKindOf(info) ) || + ( m_baseInfo2 && m_baseInfo2->IsKindOf(info) ) ); + } + + wxDECLARE_CLASS_INFO_ITERATORS(); + +private: + const wxChar *m_className; + int m_objectSize; + wxObjectConstructorFn m_objectConstructor; + + // Pointers to base wxClassInfos + + const wxClassInfo *m_baseInfo1; + const wxClassInfo *m_baseInfo2; + + // class info object live in a linked list: + // pointers to its head and the next element in it + + static wxClassInfo *sm_first; + wxClassInfo *m_next; + + static wxHashTable *sm_classTable; + +protected: + // registers the class + void Register(); + void Unregister(); + + wxDECLARE_NO_COPY_CLASS(wxClassInfo); +}; + +WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxString& name); + +// ---------------------------------------------------------------------------- +// Dynamic class macros +// ---------------------------------------------------------------------------- + +#define wxDECLARE_ABSTRACT_CLASS(name) \ + public: \ + static wxClassInfo ms_classInfo; \ + virtual wxClassInfo *GetClassInfo() const + +#define wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(name) \ + wxDECLARE_NO_ASSIGN_CLASS(name); \ + wxDECLARE_DYNAMIC_CLASS(name) + +#define wxDECLARE_DYNAMIC_CLASS_NO_COPY(name) \ + wxDECLARE_NO_COPY_CLASS(name); \ + wxDECLARE_DYNAMIC_CLASS(name) + +#define wxDECLARE_DYNAMIC_CLASS(name) \ + wxDECLARE_ABSTRACT_CLASS(name); \ + static wxObject* wxCreateObject() + +#define wxDECLARE_CLASS(name) \ + wxDECLARE_ABSTRACT_CLASS(name) + + +// common part of the macros below +#define wxIMPLEMENT_CLASS_COMMON(name, basename, baseclsinfo2, func) \ + wxClassInfo name::ms_classInfo(wxT(#name), \ + &basename::ms_classInfo, \ + baseclsinfo2, \ + (int) sizeof(name), \ + func); \ + \ + wxClassInfo *name::GetClassInfo() const \ + { return &name::ms_classInfo; } + +#define wxIMPLEMENT_CLASS_COMMON1(name, basename, func) \ + wxIMPLEMENT_CLASS_COMMON(name, basename, NULL, func) + +#define wxIMPLEMENT_CLASS_COMMON2(name, basename1, basename2, func) \ + wxIMPLEMENT_CLASS_COMMON(name, basename1, &basename2::ms_classInfo, func) + +// ----------------------------------- +// for concrete classes +// ----------------------------------- + + // Single inheritance with one base class +#define wxIMPLEMENT_DYNAMIC_CLASS(name, basename) \ + wxIMPLEMENT_CLASS_COMMON1(name, basename, name::wxCreateObject) \ + wxObject* name::wxCreateObject() \ + { return new name; } + + // Multiple inheritance with two base classes +#define wxIMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) \ + wxIMPLEMENT_CLASS_COMMON2(name, basename1, basename2, \ + name::wxCreateObject) \ + wxObject* name::wxCreateObject() \ + { return new name; } + +// ----------------------------------- +// for abstract classes +// ----------------------------------- + + // Single inheritance with one base class +#define wxIMPLEMENT_ABSTRACT_CLASS(name, basename) \ + wxIMPLEMENT_CLASS_COMMON1(name, basename, NULL) + + // Multiple inheritance with two base classes +#define wxIMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \ + wxIMPLEMENT_CLASS_COMMON2(name, basename1, basename2, NULL) + +// ----------------------------------- +// XTI-compatible macros +// ----------------------------------- + +#include "wx/flags.h" + +// these macros only do something when wxUSE_EXTENDED_RTTI=1 +// (and in that case they are defined by xti.h); however to avoid +// to be forced to wrap these macros (in user's source files) with +// +// #if wxUSE_EXTENDED_RTTI +// ... +// #endif +// +// blocks, we define them here as empty. + +#define wxEMPTY_PARAMETER_VALUE /**/ + +#define wxBEGIN_ENUM( e ) wxEMPTY_PARAMETER_VALUE +#define wxENUM_MEMBER( v ) wxEMPTY_PARAMETER_VALUE +#define wxEND_ENUM( e ) wxEMPTY_PARAMETER_VALUE + +#define wxIMPLEMENT_SET_STREAMING(SetName,e) wxEMPTY_PARAMETER_VALUE + +#define wxBEGIN_FLAGS( e ) wxEMPTY_PARAMETER_VALUE +#define wxFLAGS_MEMBER( v ) wxEMPTY_PARAMETER_VALUE +#define wxEND_FLAGS( e ) wxEMPTY_PARAMETER_VALUE + +#define wxCOLLECTION_TYPE_INFO( element, collection ) wxEMPTY_PARAMETER_VALUE + +#define wxHANDLER(name,eventClassType) wxEMPTY_PARAMETER_VALUE +#define wxBEGIN_HANDLERS_TABLE(theClass) wxEMPTY_PARAMETER_VALUE +#define wxEND_HANDLERS_TABLE() wxEMPTY_PARAMETER_VALUE + +#define wxIMPLEMENT_DYNAMIC_CLASS_XTI( name, basename, unit ) \ + wxIMPLEMENT_DYNAMIC_CLASS( name, basename ) +#define wxIMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK( name, basename, unit, callback ) \ + wxIMPLEMENT_DYNAMIC_CLASS( name, basename ) + +#define wxIMPLEMENT_DYNAMIC_CLASS_WITH_COPY_XTI( name, basename, unit ) \ + wxIMPLEMENT_DYNAMIC_CLASS( name, basename) + +#define wxIMPLEMENT_DYNAMIC_CLASS_WITH_COPY_AND_STREAMERS_XTI( name, basename, \ + unit, toString, \ + fromString ) wxEMPTY_PARAMETER_VALUE +#define wxIMPLEMENT_DYNAMIC_CLASS_NO_WXOBJECT_NO_BASE_XTI( name, unit ) wxEMPTY_PARAMETER_VALUE +#define wxIMPLEMENT_DYNAMIC_CLASS_NO_WXOBJECT_XTI( name, basename, unit ) wxEMPTY_PARAMETER_VALUE + +#define wxIMPLEMENT_DYNAMIC_CLASS2_XTI( name, basename, basename2, unit) wxIMPLEMENT_DYNAMIC_CLASS2( name, basename, basename2 ) + +#define wxCONSTRUCTOR_0(klass) \ + wxEMPTY_PARAMETER_VALUE +#define wxCONSTRUCTOR_DUMMY(klass) \ + wxEMPTY_PARAMETER_VALUE +#define wxDIRECT_CONSTRUCTOR_0(klass) \ + wxEMPTY_PARAMETER_VALUE +#define wxCONSTRUCTOR_1(klass,t0,v0) \ + wxEMPTY_PARAMETER_VALUE +#define wxDIRECT_CONSTRUCTOR_1(klass,t0,v0) \ + wxEMPTY_PARAMETER_VALUE +#define wxCONSTRUCTOR_2(klass,t0,v0,t1,v1) \ + wxEMPTY_PARAMETER_VALUE +#define wxDIRECT_CONSTRUCTOR_2(klass,t0,v0,t1,v1) \ + wxEMPTY_PARAMETER_VALUE +#define wxCONSTRUCTOR_3(klass,t0,v0,t1,v1,t2,v2) \ + wxEMPTY_PARAMETER_VALUE +#define wxDIRECT_CONSTRUCTOR_3(klass,t0,v0,t1,v1,t2,v2) \ + wxEMPTY_PARAMETER_VALUE +#define wxCONSTRUCTOR_4(klass,t0,v0,t1,v1,t2,v2,t3,v3) \ + wxEMPTY_PARAMETER_VALUE +#define wxDIRECT_CONSTRUCTOR_4(klass,t0,v0,t1,v1,t2,v2,t3,v3) \ + wxEMPTY_PARAMETER_VALUE +#define wxCONSTRUCTOR_5(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4) \ + wxEMPTY_PARAMETER_VALUE +#define wxDIRECT_CONSTRUCTOR_5(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4) \ + wxEMPTY_PARAMETER_VALUE +#define wxCONSTRUCTOR_6(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5) \ + wxEMPTY_PARAMETER_VALUE +#define wxDIRECT_CONSTRUCTOR_6(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5) \ + wxEMPTY_PARAMETER_VALUE +#define wxCONSTRUCTOR_7(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6) \ + wxEMPTY_PARAMETER_VALUE +#define wxDIRECT_CONSTRUCTOR_7(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6) \ + wxEMPTY_PARAMETER_VALUE +#define wxCONSTRUCTOR_8(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6,t7,v7) \ + wxEMPTY_PARAMETER_VALUE +#define wxDIRECT_CONSTRUCTOR_8(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6,t7,v7) \ + wxEMPTY_PARAMETER_VALUE + +#define wxSETTER( property, Klass, valueType, setterMethod ) wxEMPTY_PARAMETER_VALUE +#define wxGETTER( property, Klass, valueType, gettermethod ) wxEMPTY_PARAMETER_VALUE +#define wxADDER( property, Klass, valueType, addermethod ) wxEMPTY_PARAMETER_VALUE +#define wxCOLLECTION_GETTER( property, Klass, valueType, gettermethod ) wxEMPTY_PARAMETER_VALUE + +#define wxBEGIN_PROPERTIES_TABLE(theClass) wxEMPTY_PARAMETER_VALUE +#define wxEND_PROPERTIES_TABLE() wxEMPTY_PARAMETER_VALUE +#define wxHIDE_PROPERTY( pname ) wxEMPTY_PARAMETER_VALUE + +#define wxPROPERTY( pname, type, setter, getter, defaultValue, flags, help, group) \ + wxEMPTY_PARAMETER_VALUE + +#define wxPROPERTY_FLAGS( pname, flags, type, setter, getter,defaultValue, \ + pflags, help, group) wxEMPTY_PARAMETER_VALUE + +#define wxREADONLY_PROPERTY( pname, type, getter,defaultValue, flags, help, group) \ + wxGETTER( pname, class_t, type, getter ) wxEMPTY_PARAMETER_VALUE + +#define wxREADONLY_PROPERTY_FLAGS( pname, flags, type, getter,defaultValue, \ + pflags, help, group) wxEMPTY_PARAMETER_VALUE + +#define wxPROPERTY_COLLECTION( pname, colltype, addelemtype, adder, getter, \ + flags, help, group ) wxEMPTY_PARAMETER_VALUE + +#define wxREADONLY_PROPERTY_COLLECTION( pname, colltype, addelemtype, getter, \ + flags, help, group) wxEMPTY_PARAMETER_VALUE +#define wxEVENT_PROPERTY( name, eventType, eventClass ) wxEMPTY_PARAMETER_VALUE + +#define wxEVENT_RANGE_PROPERTY( name, eventType, lastEventType, eventClass ) wxEMPTY_PARAMETER_VALUE + +#define wxIMPLEMENT_PROPERTY(name, type) wxEMPTY_PARAMETER_VALUE + +#define wxEMPTY_HANDLERS_TABLE(name) wxEMPTY_PARAMETER_VALUE + +#endif // !wxUSE_EXTENDED_RTTI +#endif // _WX_RTTIH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/sashwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sashwin.h new file mode 100644 index 0000000000..21967a5c7e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sashwin.h @@ -0,0 +1,17 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/sashwin.h +// Purpose: Base header for wxSashWindow +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SASHWIN_H_BASE_ +#define _WX_SASHWIN_H_BASE_ + +#include "wx/generic/sashwin.h" + +#endif + // _WX_SASHWIN_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/sckaddr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sckaddr.h new file mode 100644 index 0000000000..4ceefdf35c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sckaddr.h @@ -0,0 +1,222 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/sckaddr.h +// Purpose: Network address classes +// Author: Guilhem Lavaux +// Modified by: Vadim Zeitlin to switch to wxSockAddressImpl implementation +// Created: 26/04/1997 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// (c) 2008, 2009 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SCKADDR_H_ +#define _WX_SCKADDR_H_ + +#include "wx/defs.h" + +#if wxUSE_SOCKETS + +#include "wx/string.h" + +class wxSockAddressImpl; + +// forward declare it instead of including the system headers defining it which +// can bring in <windows.h> under Windows which we don't want to include from +// public wx headers +struct sockaddr; + +// Any socket address kind +class WXDLLIMPEXP_NET wxSockAddress : public wxObject +{ +public: + enum Family + { + NONE, + IPV4, + IPV6, + UNIX + }; + + wxSockAddress(); + wxSockAddress(const wxSockAddress& other); + virtual ~wxSockAddress(); + + wxSockAddress& operator=(const wxSockAddress& other); + + virtual void Clear(); + virtual Family Type() = 0; + + // accessors for the low level address represented by this object + const sockaddr *GetAddressData() const; + int GetAddressDataLen() const; + + // we need to be able to create copies of the addresses polymorphically + // (i.e. without knowing the exact address class) + virtual wxSockAddress *Clone() const = 0; + + + // implementation only, don't use + const wxSockAddressImpl& GetAddress() const { return *m_impl; } + void SetAddress(const wxSockAddressImpl& address); + +protected: + wxSockAddressImpl *m_impl; + +private: + void Init(); + DECLARE_ABSTRACT_CLASS(wxSockAddress) +}; + +// An IP address (either IPv4 or IPv6) +class WXDLLIMPEXP_NET wxIPaddress : public wxSockAddress +{ +public: + wxIPaddress() : wxSockAddress() { } + wxIPaddress(const wxIPaddress& other) + : wxSockAddress(other), + m_origHostname(other.m_origHostname) + { + } + + bool operator==(const wxIPaddress& addr) const; + + bool Hostname(const wxString& name); + bool Service(const wxString& name); + bool Service(unsigned short port); + + bool LocalHost(); + virtual bool IsLocalHost() const = 0; + + bool AnyAddress(); + + virtual wxString IPAddress() const = 0; + + wxString Hostname() const; + unsigned short Service() const; + + wxString OrigHostname() const { return m_origHostname; } + +protected: + // get m_impl initialized to the right family if it hadn't been done yet + wxSockAddressImpl& GetImpl(); + const wxSockAddressImpl& GetImpl() const + { + return const_cast<wxIPaddress *>(this)->GetImpl(); + } + + // host name originally passed to Hostname() + wxString m_origHostname; + +private: + // create the wxSockAddressImpl object of the correct family if it's + // currently uninitialized + virtual void DoInitImpl() = 0; + + + DECLARE_ABSTRACT_CLASS(wxIPaddress) +}; + +// An IPv4 address +class WXDLLIMPEXP_NET wxIPV4address : public wxIPaddress +{ +public: + wxIPV4address() : wxIPaddress() { } + wxIPV4address(const wxIPV4address& other) : wxIPaddress(other) { } + + // implement wxSockAddress pure virtuals: + virtual Family Type() { return IPV4; } + virtual wxSockAddress *Clone() const { return new wxIPV4address(*this); } + + + // implement wxIPaddress pure virtuals: + virtual bool IsLocalHost() const; + + virtual wxString IPAddress() const; + + + // IPv4-specific methods: + bool Hostname(unsigned long addr); + + // make base class methods hidden by our overload visible + // + // FIXME-VC6: replace this with "using IPAddress::Hostname" (not supported + // by VC6) when support for it is dropped + wxString Hostname() const { return wxIPaddress::Hostname(); } + bool Hostname(const wxString& name) { return wxIPaddress::Hostname(name); } + + bool BroadcastAddress(); + +private: + virtual void DoInitImpl(); + + DECLARE_DYNAMIC_CLASS(wxIPV4address) +}; + + +#if wxUSE_IPV6 + +// An IPv6 address +class WXDLLIMPEXP_NET wxIPV6address : public wxIPaddress +{ +public: + wxIPV6address() : wxIPaddress() { } + wxIPV6address(const wxIPV6address& other) : wxIPaddress(other) { } + + // implement wxSockAddress pure virtuals: + virtual Family Type() { return IPV6; } + virtual wxSockAddress *Clone() const { return new wxIPV6address(*this); } + + + // implement wxIPaddress pure virtuals: + virtual bool IsLocalHost() const; + + virtual wxString IPAddress() const; + + // IPv6-specific methods: + bool Hostname(unsigned char addr[16]); + + using wxIPaddress::Hostname; + +private: + virtual void DoInitImpl(); + + DECLARE_DYNAMIC_CLASS(wxIPV6address) +}; + +#endif // wxUSE_IPV6 + +// Unix domain sockets are only available under, well, Unix +#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) + #define wxHAS_UNIX_DOMAIN_SOCKETS +#endif + +#ifdef wxHAS_UNIX_DOMAIN_SOCKETS + +// A Unix domain socket address +class WXDLLIMPEXP_NET wxUNIXaddress : public wxSockAddress +{ +public: + wxUNIXaddress() : wxSockAddress() { } + wxUNIXaddress(const wxUNIXaddress& other) : wxSockAddress(other) { } + + void Filename(const wxString& name); + wxString Filename() const; + + virtual Family Type() { return UNIX; } + virtual wxSockAddress *Clone() const { return new wxUNIXaddress(*this); } + +private: + wxSockAddressImpl& GetUNIX(); + const wxSockAddressImpl& GetUNIX() const + { + return const_cast<wxUNIXaddress *>(this)->GetUNIX(); + } + + DECLARE_DYNAMIC_CLASS(wxUNIXaddress) +}; + +#endif // wxHAS_UNIX_DOMAIN_SOCKETS + +#endif // wxUSE_SOCKETS + +#endif // _WX_SCKADDR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/sckipc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sckipc.h new file mode 100644 index 0000000000..3801da8cf9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sckipc.h @@ -0,0 +1,159 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/sckipc.h +// Purpose: Interprocess communication implementation (wxSocket version) +// Author: Julian Smart +// Modified by: Guilhem Lavaux (big rewrite) May 1997, 1998 +// Guillermo Rodriguez (updated for wxSocket v2) Jan 2000 +// (callbacks deprecated) Mar 2000 +// Created: 1993 +// Copyright: (c) Julian Smart 1993 +// (c) Guilhem Lavaux 1997, 1998 +// (c) 2000 Guillermo Rodriguez <guille@iies.es> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SCKIPC_H +#define _WX_SCKIPC_H + +#include "wx/defs.h" + +#if wxUSE_SOCKETS && wxUSE_IPC + +#include "wx/ipcbase.h" +#include "wx/socket.h" +#include "wx/sckstrm.h" +#include "wx/datstrm.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 WXDLLIMPEXP_FWD_NET wxTCPServer; +class WXDLLIMPEXP_FWD_NET wxTCPClient; + +class wxIPCSocketStreams; + +class WXDLLIMPEXP_NET wxTCPConnection : public wxConnectionBase +{ +public: + wxTCPConnection() { Init(); } + wxTCPConnection(void *buffer, size_t size) + : wxConnectionBase(buffer, size) + { + Init(); + } + + virtual ~wxTCPConnection(); + + // implement base class pure virtual methods + virtual const void *Request(const wxString& item, + size_t *size = NULL, + wxIPCFormat format = wxIPC_TEXT); + virtual bool StartAdvise(const wxString& item); + virtual bool StopAdvise(const wxString& item); + virtual bool Disconnect(void); + + // Will be used in the future to enable the compression but does nothing + // for now. + void Compress(bool on); + + +protected: + virtual bool DoExecute(const void *data, size_t size, wxIPCFormat format); + virtual bool DoPoke(const wxString& item, const void *data, size_t size, + wxIPCFormat format); + virtual bool DoAdvise(const wxString& item, const void *data, size_t size, + wxIPCFormat format); + + + // notice that all the members below are only initialized once the + // connection is made, i.e. in MakeConnection() for the client objects and + // after OnAcceptConnection() in the server ones + + // the underlying socket (wxSocketClient for IPC client and wxSocketServer + // for IPC server) + wxSocketBase *m_sock; + + // various streams that we use + wxIPCSocketStreams *m_streams; + + // the topic of this connection + wxString m_topic; + +private: + // common part of both ctors + void Init(); + + friend class wxTCPServer; + friend class wxTCPClient; + friend class wxTCPEventHandler; + + wxDECLARE_NO_COPY_CLASS(wxTCPConnection); + DECLARE_DYNAMIC_CLASS(wxTCPConnection) +}; + +class WXDLLIMPEXP_NET wxTCPServer : public wxServerBase +{ +public: + wxTCPServer(); + virtual ~wxTCPServer(); + + // Returns false on error (e.g. port number is already in use) + virtual bool Create(const wxString& serverName); + + virtual wxConnectionBase *OnAcceptConnection(const wxString& topic); + +protected: + wxSocketServer *m_server; + +#ifdef __UNIX_LIKE__ + // the name of the file associated to the Unix domain socket, may be empty + wxString m_filename; +#endif // __UNIX_LIKE__ + + wxDECLARE_NO_COPY_CLASS(wxTCPServer); + DECLARE_DYNAMIC_CLASS(wxTCPServer) +}; + +class WXDLLIMPEXP_NET wxTCPClient : public wxClientBase +{ +public: + wxTCPClient(); + + virtual bool ValidHost(const wxString& host); + + // Call this to make a connection. Returns NULL if cannot. + virtual wxConnectionBase *MakeConnection(const wxString& host, + const wxString& server, + const wxString& topic); + + // Callbacks to CLIENT - override at will + virtual wxConnectionBase *OnMakeConnection(); + +private: + DECLARE_DYNAMIC_CLASS(wxTCPClient) +}; + +#endif // wxUSE_SOCKETS && wxUSE_IPC + +#endif // _WX_SCKIPC_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/sckstrm.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sckstrm.h new file mode 100644 index 0000000000..31f32706e9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sckstrm.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/sckstrm.h +// Purpose: wxSocket*Stream +// Author: Guilhem Lavaux +// Modified by: +// Created: 17/07/97 +// Copyright: (c) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// +#ifndef __SCK_STREAM_H__ +#define __SCK_STREAM_H__ + +#include "wx/stream.h" + +#if wxUSE_SOCKETS && wxUSE_STREAMS + +#include "wx/socket.h" + +class WXDLLIMPEXP_NET wxSocketOutputStream : public wxOutputStream +{ +public: + wxSocketOutputStream(wxSocketBase& s); + virtual ~wxSocketOutputStream(); + +protected: + wxSocketBase *m_o_socket; + + size_t OnSysWrite(const void *buffer, size_t bufsize); + + // socket streams are both un-seekable and size-less streams: + wxFileOffset OnSysTell() const + { return wxInvalidOffset; } + wxFileOffset OnSysSeek(wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode)) + { return wxInvalidOffset; } + + wxDECLARE_NO_COPY_CLASS(wxSocketOutputStream); +}; + +class WXDLLIMPEXP_NET wxSocketInputStream : public wxInputStream +{ +public: + wxSocketInputStream(wxSocketBase& s); + virtual ~wxSocketInputStream(); + +protected: + wxSocketBase *m_i_socket; + + size_t OnSysRead(void *buffer, size_t bufsize); + + // socket streams are both un-seekable and size-less streams: + + wxFileOffset OnSysTell() const + { return wxInvalidOffset; } + wxFileOffset OnSysSeek(wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode)) + { return wxInvalidOffset; } + + wxDECLARE_NO_COPY_CLASS(wxSocketInputStream); +}; + +class WXDLLIMPEXP_NET wxSocketStream : public wxSocketInputStream, + public wxSocketOutputStream +{ +public: + wxSocketStream(wxSocketBase& s); + virtual ~wxSocketStream(); + + wxDECLARE_NO_COPY_CLASS(wxSocketStream); +}; + +#endif + // wxUSE_SOCKETS && wxUSE_STREAMS + +#endif + // __SCK_STREAM_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/scopedarray.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/scopedarray.h new file mode 100644 index 0000000000..e6246a235e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/scopedarray.h @@ -0,0 +1,119 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/scopedarray.h +// Purpose: scoped smart pointer class +// Author: Vadim Zeitlin +// Created: 2009-02-03 +// Copyright: (c) Jesse Lovelace and original Boost authors (see below) +// (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SCOPED_ARRAY_H_ +#define _WX_SCOPED_ARRAY_H_ + +#include "wx/defs.h" +#include "wx/checkeddelete.h" + +// ---------------------------------------------------------------------------- +// wxScopedArray: A scoped array +// ---------------------------------------------------------------------------- + +template <class T> +class wxScopedArray +{ +public: + typedef T element_type; + + wxEXPLICIT wxScopedArray(T * array = NULL) : m_array(array) { } + + ~wxScopedArray() { delete [] m_array; } + + // test for pointer validity: defining conversion to unspecified_bool_type + // and not more obvious bool to avoid implicit conversions to integer types + typedef T *(wxScopedArray<T>::*unspecified_bool_type)() const; + operator unspecified_bool_type() const + { + return m_array ? &wxScopedArray<T>::get : NULL; + } + + void reset(T *array = NULL) + { + if ( array != m_array ) + { + delete [] m_array; + m_array = array; + } + } + + T& operator[](size_t n) const { return m_array[n]; } + + T *get() const { return m_array; } + + void swap(wxScopedArray &other) + { + T * const tmp = other.m_array; + other.m_array = m_array; + m_array = tmp; + } + +private: + T *m_array; + + DECLARE_NO_COPY_TEMPLATE_CLASS(wxScopedArray, T) +}; + +// ---------------------------------------------------------------------------- +// old macro based implementation +// ---------------------------------------------------------------------------- + +// the same but for arrays instead of simple pointers +#define wxDECLARE_SCOPED_ARRAY(T, name)\ +class name \ +{ \ +private: \ + T * m_ptr; \ + name(name const &); \ + name & operator=(name const &); \ + \ +public: \ + wxEXPLICIT name(T * p = NULL) : m_ptr(p) \ + {} \ + \ + ~name(); \ + void reset(T * p = NULL); \ + \ + T & operator[](long int i) const\ + { \ + wxASSERT(m_ptr != NULL); \ + wxASSERT(i >= 0); \ + return m_ptr[i]; \ + } \ + \ + T * get() const \ + { \ + return m_ptr; \ + } \ + \ + void swap(name & ot) \ + { \ + T * tmp = ot.m_ptr; \ + ot.m_ptr = m_ptr; \ + m_ptr = tmp; \ + } \ +}; + +#define wxDEFINE_SCOPED_ARRAY(T, name) \ +name::~name() \ +{ \ + wxCHECKED_DELETE_ARRAY(m_ptr); \ +} \ +void name::reset(T * p){ \ + if (m_ptr != p) \ + { \ + wxCHECKED_DELETE_ARRAY(m_ptr); \ + m_ptr = p; \ + } \ +} + +#endif // _WX_SCOPED_ARRAY_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/scopedptr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/scopedptr.h new file mode 100644 index 0000000000..5cc0c0770d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/scopedptr.h @@ -0,0 +1,214 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/scopedptr.h +// Purpose: scoped smart pointer class +// Author: Jesse Lovelace <jllovela@eos.ncsu.edu> +// Created: 06/01/02 +// Copyright: (c) Jesse Lovelace and original Boost authors (see below) +// (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// This class closely follows the implementation of the boost +// library scoped_ptr and is an adaption for c++ macro's in +// the wxWidgets project. The original authors of the boost +// scoped_ptr are given below with their respective copyrights. + +// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. +// Copyright (c) 2001, 2002 Peter Dimov +// +// Permission to copy, use, modify, sell and distribute this software +// is granted provided this copyright notice appears in all copies. +// This software is provided "as is" without express or implied +// warranty, and with no claim as to its suitability for any purpose. +// +// See http://www.boost.org/libs/smart_ptr/scoped_ptr.htm for documentation. +// + +#ifndef _WX_SCOPED_PTR_H_ +#define _WX_SCOPED_PTR_H_ + +#include "wx/defs.h" +#include "wx/checkeddelete.h" + +// ---------------------------------------------------------------------------- +// wxScopedPtr: A scoped pointer +// ---------------------------------------------------------------------------- + +template <class T> +class wxScopedPtr +{ +public: + typedef T element_type; + + wxEXPLICIT wxScopedPtr(T * ptr = NULL) : m_ptr(ptr) { } + + ~wxScopedPtr() { wxCHECKED_DELETE(m_ptr); } + + // test for pointer validity: defining conversion to unspecified_bool_type + // and not more obvious bool to avoid implicit conversions to integer types +#ifdef __BORLANDC__ + // this compiler is too dumb to use unspecified_bool_type operator in tests + // of the form "if ( !ptr )" + typedef bool unspecified_bool_type; +#else + typedef T *(wxScopedPtr<T>::*unspecified_bool_type)() const; +#endif // __BORLANDC__ + operator unspecified_bool_type() const + { + return m_ptr ? &wxScopedPtr<T>::get : NULL; + } + + void reset(T * ptr = NULL) + { + if ( ptr != m_ptr ) + { + wxCHECKED_DELETE(m_ptr); + m_ptr = ptr; + } + } + + T *release() + { + T *ptr = m_ptr; + m_ptr = NULL; + return ptr; + } + + T & operator*() const + { + wxASSERT(m_ptr != NULL); + return *m_ptr; + } + + T * operator->() const + { + wxASSERT(m_ptr != NULL); + return m_ptr; + } + + T * get() const + { + return m_ptr; + } + + void swap(wxScopedPtr& other) + { + T * const tmp = other.m_ptr; + other.m_ptr = m_ptr; + m_ptr = tmp; + } + +private: + T * m_ptr; + + DECLARE_NO_COPY_TEMPLATE_CLASS(wxScopedPtr, T) +}; + +// ---------------------------------------------------------------------------- +// old macro based implementation +// ---------------------------------------------------------------------------- + +/* The type being used *must* be complete at the time + that wxDEFINE_SCOPED_* is called or a compiler error will result. + This is because the class checks for the completeness of the type + being used. */ + +#define wxDECLARE_SCOPED_PTR(T, name) \ +class name \ +{ \ +private: \ + T * m_ptr; \ + \ + name(name const &); \ + name & operator=(name const &); \ + \ +public: \ + wxEXPLICIT name(T * ptr = NULL) \ + : m_ptr(ptr) { } \ + \ + ~name(); \ + \ + void reset(T * ptr = NULL); \ + \ + T *release() \ + { \ + T *ptr = m_ptr; \ + m_ptr = NULL; \ + return ptr; \ + } \ + \ + T & operator*() const \ + { \ + wxASSERT(m_ptr != NULL); \ + return *m_ptr; \ + } \ + \ + T * operator->() const \ + { \ + wxASSERT(m_ptr != NULL); \ + return m_ptr; \ + } \ + \ + T * get() const \ + { \ + return m_ptr; \ + } \ + \ + void swap(name & ot) \ + { \ + T * tmp = ot.m_ptr; \ + ot.m_ptr = m_ptr; \ + m_ptr = tmp; \ + } \ +}; + +#define wxDEFINE_SCOPED_PTR(T, name)\ +void name::reset(T * ptr) \ +{ \ + if (m_ptr != ptr) \ + { \ + wxCHECKED_DELETE(m_ptr); \ + m_ptr = ptr; \ + } \ +} \ +name::~name() \ +{ \ + wxCHECKED_DELETE(m_ptr); \ +} + +// this macro can be used for the most common case when you want to declare and +// define the scoped pointer at the same time and want to use the standard +// naming convention: auto pointer to Foo is called FooPtr +#define wxDEFINE_SCOPED_PTR_TYPE(T) \ + wxDECLARE_SCOPED_PTR(T, T ## Ptr) \ + wxDEFINE_SCOPED_PTR(T, T ## Ptr) + +// ---------------------------------------------------------------------------- +// "Tied" scoped pointer: same as normal one but also sets the value of +// some other variable to the pointer value +// ---------------------------------------------------------------------------- + +#define wxDEFINE_TIED_SCOPED_PTR_TYPE(T) \ + wxDEFINE_SCOPED_PTR_TYPE(T) \ + class T ## TiedPtr : public T ## Ptr \ + { \ + public: \ + T ## TiedPtr(T **pp, T *p) \ + : T ## Ptr(p), m_pp(pp) \ + { \ + m_pOld = *pp; \ + *pp = p; \ + } \ + \ + ~ T ## TiedPtr() \ + { \ + *m_pp = m_pOld; \ + } \ + \ + private: \ + T **m_pp; \ + T *m_pOld; \ + }; + +#endif // _WX_SCOPED_PTR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/scopeguard.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/scopeguard.h new file mode 100644 index 0000000000..83bc1b5180 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/scopeguard.h @@ -0,0 +1,550 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/scopeguard.h +// Purpose: declares wxwxScopeGuard and related macros +// Author: Vadim Zeitlin +// Modified by: +// Created: 03.07.2003 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +/* + Acknowledgements: this header is heavily based on (well, almost the exact + copy of) ScopeGuard.h by Andrei Alexandrescu and Petru Marginean published + in December 2000 issue of C/C++ Users Journal. + http://www.cuj.com/documents/cujcexp1812alexandr/ + */ + +#ifndef _WX_SCOPEGUARD_H_ +#define _WX_SCOPEGUARD_H_ + +#include "wx/defs.h" + +#include "wx/except.h" + +// ---------------------------------------------------------------------------- +// helpers +// ---------------------------------------------------------------------------- + +#ifdef __WATCOMC__ + +// WATCOM-FIXME: C++ of Open Watcom 1.3 doesn't like OnScopeExit() created +// through template so it must be workarounded with dedicated inlined macro. +// For compatibility with Watcom compilers wxPrivate::OnScopeExit must be +// replaced with wxPrivateOnScopeExit but in user code (for everyone who +// doesn't care about OW compatibility) wxPrivate::OnScopeExit still works. + +#define wxPrivateOnScopeExit(guard) \ + { \ + if ( !(guard).WasDismissed() ) \ + { \ + wxTRY \ + { \ + (guard).Execute(); \ + } \ + wxCATCH_ALL(;) \ + } \ + } + +#define wxPrivateUse(n) wxUnusedVar(n) + +#else + +namespace wxPrivate +{ + // in the original implementation this was a member template function of + // ScopeGuardImplBase but gcc 2.8 which is still used for OS/2 doesn't + // support member templates and so we must make it global + template <class ScopeGuardImpl> + void OnScopeExit(ScopeGuardImpl& guard) + { + if ( !guard.WasDismissed() ) + { + // we're called from ScopeGuardImpl dtor and so we must not throw + wxTRY + { + guard.Execute(); + } + wxCATCH_ALL(;) // do nothing, just eat the exception + } + } + + // just to avoid the warning about unused variables + template <class T> + void Use(const T& WXUNUSED(t)) + { + } +} // namespace wxPrivate + +#define wxPrivateOnScopeExit(n) wxPrivate::OnScopeExit(n) +#define wxPrivateUse(n) wxPrivate::Use(n) + +#endif + +// ============================================================================ +// wxScopeGuard for functions and functors +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxScopeGuardImplBase: used by wxScopeGuardImpl[0..N] below +// ---------------------------------------------------------------------------- + +class wxScopeGuardImplBase +{ +public: + wxScopeGuardImplBase() : m_wasDismissed(false) { } + + wxScopeGuardImplBase(const wxScopeGuardImplBase& other) + : m_wasDismissed(other.m_wasDismissed) + { + other.Dismiss(); + } + + void Dismiss() const { m_wasDismissed = true; } + + // for OnScopeExit() only (we can't make it friend, unfortunately)! + bool WasDismissed() const { return m_wasDismissed; } + +protected: + ~wxScopeGuardImplBase() { } + + // must be mutable for copy ctor to work + mutable bool m_wasDismissed; + +private: + wxScopeGuardImplBase& operator=(const wxScopeGuardImplBase&); +}; + +// wxScopeGuard is just a reference, see the explanation in CUJ article +typedef const wxScopeGuardImplBase& wxScopeGuard; + +// ---------------------------------------------------------------------------- +// wxScopeGuardImpl0: scope guard for actions without parameters +// ---------------------------------------------------------------------------- + +template <class F> +class wxScopeGuardImpl0 : public wxScopeGuardImplBase +{ +public: + static wxScopeGuardImpl0<F> MakeGuard(F fun) + { + return wxScopeGuardImpl0<F>(fun); + } + + ~wxScopeGuardImpl0() { wxPrivateOnScopeExit(*this); } + + void Execute() { m_fun(); } + +protected: + wxScopeGuardImpl0(F fun) : m_fun(fun) { } + + F m_fun; + + wxScopeGuardImpl0& operator=(const wxScopeGuardImpl0&); +}; + +template <class F> +inline wxScopeGuardImpl0<F> wxMakeGuard(F fun) +{ + return wxScopeGuardImpl0<F>::MakeGuard(fun); +} + +// ---------------------------------------------------------------------------- +// wxScopeGuardImpl1: scope guard for actions with 1 parameter +// ---------------------------------------------------------------------------- + +template <class F, class P1> +class wxScopeGuardImpl1 : public wxScopeGuardImplBase +{ +public: + static wxScopeGuardImpl1<F, P1> MakeGuard(F fun, P1 p1) + { + return wxScopeGuardImpl1<F, P1>(fun, p1); + } + + ~wxScopeGuardImpl1() { wxPrivateOnScopeExit(* this); } + + void Execute() { m_fun(m_p1); } + +protected: + wxScopeGuardImpl1(F fun, P1 p1) : m_fun(fun), m_p1(p1) { } + + F m_fun; + const P1 m_p1; + + wxScopeGuardImpl1& operator=(const wxScopeGuardImpl1&); +}; + +template <class F, class P1> +inline wxScopeGuardImpl1<F, P1> wxMakeGuard(F fun, P1 p1) +{ + return wxScopeGuardImpl1<F, P1>::MakeGuard(fun, p1); +} + +// ---------------------------------------------------------------------------- +// wxScopeGuardImpl2: scope guard for actions with 2 parameters +// ---------------------------------------------------------------------------- + +template <class F, class P1, class P2> +class wxScopeGuardImpl2 : public wxScopeGuardImplBase +{ +public: + static wxScopeGuardImpl2<F, P1, P2> MakeGuard(F fun, P1 p1, P2 p2) + { + return wxScopeGuardImpl2<F, P1, P2>(fun, p1, p2); + } + + ~wxScopeGuardImpl2() { wxPrivateOnScopeExit(*this); } + + void Execute() { m_fun(m_p1, m_p2); } + +protected: + wxScopeGuardImpl2(F fun, P1 p1, P2 p2) : m_fun(fun), m_p1(p1), m_p2(p2) { } + + F m_fun; + const P1 m_p1; + const P2 m_p2; + + wxScopeGuardImpl2& operator=(const wxScopeGuardImpl2&); +}; + +template <class F, class P1, class P2> +inline wxScopeGuardImpl2<F, P1, P2> wxMakeGuard(F fun, P1 p1, P2 p2) +{ + return wxScopeGuardImpl2<F, P1, P2>::MakeGuard(fun, p1, p2); +} + +// ---------------------------------------------------------------------------- +// wxScopeGuardImpl3: scope guard for actions with 3 parameters +// ---------------------------------------------------------------------------- + +template <class F, class P1, class P2, class P3> +class wxScopeGuardImpl3 : public wxScopeGuardImplBase +{ +public: + static wxScopeGuardImpl3<F, P1, P2, P3> MakeGuard(F fun, P1 p1, P2 p2, P3 p3) + { + return wxScopeGuardImpl3<F, P1, P2, P3>(fun, p1, p2, p3); + } + + ~wxScopeGuardImpl3() { wxPrivateOnScopeExit(*this); } + + void Execute() { m_fun(m_p1, m_p2, m_p3); } + +protected: + wxScopeGuardImpl3(F fun, P1 p1, P2 p2, P3 p3) + : m_fun(fun), m_p1(p1), m_p2(p2), m_p3(p3) { } + + F m_fun; + const P1 m_p1; + const P2 m_p2; + const P3 m_p3; + + wxScopeGuardImpl3& operator=(const wxScopeGuardImpl3&); +}; + +template <class F, class P1, class P2, class P3> +inline wxScopeGuardImpl3<F, P1, P2, P3> wxMakeGuard(F fun, P1 p1, P2 p2, P3 p3) +{ + return wxScopeGuardImpl3<F, P1, P2, P3>::MakeGuard(fun, p1, p2, p3); +} + +// ============================================================================ +// wxScopeGuards for object methods +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxObjScopeGuardImpl0 +// ---------------------------------------------------------------------------- + +template <class Obj, class MemFun> +class wxObjScopeGuardImpl0 : public wxScopeGuardImplBase +{ +public: + static wxObjScopeGuardImpl0<Obj, MemFun> + MakeObjGuard(Obj& obj, MemFun memFun) + { + return wxObjScopeGuardImpl0<Obj, MemFun>(obj, memFun); + } + + ~wxObjScopeGuardImpl0() { wxPrivateOnScopeExit(*this); } + + void Execute() { (m_obj.*m_memfun)(); } + +protected: + wxObjScopeGuardImpl0(Obj& obj, MemFun memFun) + : m_obj(obj), m_memfun(memFun) { } + + Obj& m_obj; + MemFun m_memfun; +}; + +template <class Obj, class MemFun> +inline wxObjScopeGuardImpl0<Obj, MemFun> wxMakeObjGuard(Obj& obj, MemFun memFun) +{ + return wxObjScopeGuardImpl0<Obj, MemFun>::MakeObjGuard(obj, memFun); +} + +template <class Obj, class MemFun, class P1> +class wxObjScopeGuardImpl1 : public wxScopeGuardImplBase +{ +public: + static wxObjScopeGuardImpl1<Obj, MemFun, P1> + MakeObjGuard(Obj& obj, MemFun memFun, P1 p1) + { + return wxObjScopeGuardImpl1<Obj, MemFun, P1>(obj, memFun, p1); + } + + ~wxObjScopeGuardImpl1() { wxPrivateOnScopeExit(*this); } + + void Execute() { (m_obj.*m_memfun)(m_p1); } + +protected: + wxObjScopeGuardImpl1(Obj& obj, MemFun memFun, P1 p1) + : m_obj(obj), m_memfun(memFun), m_p1(p1) { } + + Obj& m_obj; + MemFun m_memfun; + const P1 m_p1; +}; + +template <class Obj, class MemFun, class P1> +inline wxObjScopeGuardImpl1<Obj, MemFun, P1> +wxMakeObjGuard(Obj& obj, MemFun memFun, P1 p1) +{ + return wxObjScopeGuardImpl1<Obj, MemFun, P1>::MakeObjGuard(obj, memFun, p1); +} + +template <class Obj, class MemFun, class P1, class P2> +class wxObjScopeGuardImpl2 : public wxScopeGuardImplBase +{ +public: + static wxObjScopeGuardImpl2<Obj, MemFun, P1, P2> + MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2) + { + return wxObjScopeGuardImpl2<Obj, MemFun, P1, P2>(obj, memFun, p1, p2); + } + + ~wxObjScopeGuardImpl2() { wxPrivateOnScopeExit(*this); } + + void Execute() { (m_obj.*m_memfun)(m_p1, m_p2); } + +protected: + wxObjScopeGuardImpl2(Obj& obj, MemFun memFun, P1 p1, P2 p2) + : m_obj(obj), m_memfun(memFun), m_p1(p1), m_p2(p2) { } + + Obj& m_obj; + MemFun m_memfun; + const P1 m_p1; + const P2 m_p2; +}; + +template <class Obj, class MemFun, class P1, class P2> +inline wxObjScopeGuardImpl2<Obj, MemFun, P1, P2> +wxMakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2) +{ + return wxObjScopeGuardImpl2<Obj, MemFun, P1, P2>:: + MakeObjGuard(obj, memFun, p1, p2); +} + +template <class Obj, class MemFun, class P1, class P2, class P3> +class wxObjScopeGuardImpl3 : public wxScopeGuardImplBase +{ +public: + static wxObjScopeGuardImpl3<Obj, MemFun, P1, P2, P3> + MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3) + { + return wxObjScopeGuardImpl3<Obj, MemFun, P1, P2, P3>(obj, memFun, p1, p2, p3); + } + + ~wxObjScopeGuardImpl3() { wxPrivateOnScopeExit(*this); } + + void Execute() { (m_obj.*m_memfun)(m_p1, m_p2, m_p3); } + +protected: + wxObjScopeGuardImpl3(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3) + : m_obj(obj), m_memfun(memFun), m_p1(p1), m_p2(p2), m_p3(p3) { } + + Obj& m_obj; + MemFun m_memfun; + const P1 m_p1; + const P2 m_p2; + const P3 m_p3; +}; + +template <class Obj, class MemFun, class P1, class P2, class P3> +inline wxObjScopeGuardImpl3<Obj, MemFun, P1, P2, P3> +wxMakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3) +{ + return wxObjScopeGuardImpl3<Obj, MemFun, P1, P2, P3>:: + MakeObjGuard(obj, memFun, p1, p2, p3); +} + +// ---------------------------------------------------------------------------- +// wxVariableSetter: use the same technique as for wxScopeGuard to allow +// setting a variable to some value on block exit +// ---------------------------------------------------------------------------- + +namespace wxPrivate +{ + +// empty class just to be able to define a reference to it +class VariableSetterBase : public wxScopeGuardImplBase { }; + +typedef const VariableSetterBase& VariableSetter; + +template <typename T, typename U> +class VariableSetterImpl : public VariableSetterBase +{ +public: + VariableSetterImpl(T& var, U value) + : m_var(var), + m_value(value) + { + } + + ~VariableSetterImpl() { wxPrivateOnScopeExit(*this); } + + void Execute() { m_var = m_value; } + +private: + T& m_var; + const U m_value; + + // suppress the warning about assignment operator not being generated + VariableSetterImpl<T, U>& operator=(const VariableSetterImpl<T, U>&); +}; + +template <typename T> +class VariableNullerImpl : public VariableSetterBase +{ +public: + VariableNullerImpl(T& var) + : m_var(var) + { + } + + ~VariableNullerImpl() { wxPrivateOnScopeExit(*this); } + + void Execute() { m_var = NULL; } + +private: + T& m_var; + + VariableNullerImpl<T>& operator=(const VariableNullerImpl<T>&); +}; + +} // namespace wxPrivate + +template <typename T, typename U> +inline +wxPrivate::VariableSetterImpl<T, U> wxMakeVarSetter(T& var, U value) +{ + return wxPrivate::VariableSetterImpl<T, U>(var, value); +} + +// calling wxMakeVarSetter(ptr, NULL) doesn't work because U is deduced to be +// "int" and subsequent assignment of "U" to "T *" fails, so provide a special +// function for this special case +template <typename T> +inline +wxPrivate::VariableNullerImpl<T> wxMakeVarNuller(T& var) +{ + return wxPrivate::VariableNullerImpl<T>(var); +} + +// ============================================================================ +// macros for declaring unnamed scoped guards (which can't be dismissed) +// ============================================================================ + +// NB: the original code has a single (and much nicer) ON_BLOCK_EXIT macro +// but this results in compiler warnings about unused variables and I +// didn't find a way to work around this other than by having different +// macros with different names or using a less natural syntax for passing +// the arguments (e.g. as Boost preprocessor sequences, which would mean +// having to write wxON_BLOCK_EXIT(fwrite, (buf)(size)(n)(fp)) instead of +// wxON_BLOCK_EXIT4(fwrite, buf, size, n, fp)). + +#define wxGuardName wxMAKE_UNIQUE_NAME(wxScopeGuard) + +#define wxON_BLOCK_EXIT0_IMPL(n, f) \ + wxScopeGuard n = wxMakeGuard(f); \ + wxPrivateUse(n) +#define wxON_BLOCK_EXIT0(f) \ + wxON_BLOCK_EXIT0_IMPL(wxGuardName, f) + +#define wxON_BLOCK_EXIT_OBJ0_IMPL(n, o, m) \ + wxScopeGuard n = wxMakeObjGuard(o, m); \ + wxPrivateUse(n) +#define wxON_BLOCK_EXIT_OBJ0(o, m) \ + wxON_BLOCK_EXIT_OBJ0_IMPL(wxGuardName, o, &m) + +#define wxON_BLOCK_EXIT_THIS0(m) \ + wxON_BLOCK_EXIT_OBJ0(*this, m) + + +#define wxON_BLOCK_EXIT1_IMPL(n, f, p1) \ + wxScopeGuard n = wxMakeGuard(f, p1); \ + wxPrivateUse(n) +#define wxON_BLOCK_EXIT1(f, p1) \ + wxON_BLOCK_EXIT1_IMPL(wxGuardName, f, p1) + +#define wxON_BLOCK_EXIT_OBJ1_IMPL(n, o, m, p1) \ + wxScopeGuard n = wxMakeObjGuard(o, m, p1); \ + wxPrivateUse(n) +#define wxON_BLOCK_EXIT_OBJ1(o, m, p1) \ + wxON_BLOCK_EXIT_OBJ1_IMPL(wxGuardName, o, &m, p1) + +#define wxON_BLOCK_EXIT_THIS1(m, p1) \ + wxON_BLOCK_EXIT_OBJ1(*this, m, p1) + + +#define wxON_BLOCK_EXIT2_IMPL(n, f, p1, p2) \ + wxScopeGuard n = wxMakeGuard(f, p1, p2); \ + wxPrivateUse(n) +#define wxON_BLOCK_EXIT2(f, p1, p2) \ + wxON_BLOCK_EXIT2_IMPL(wxGuardName, f, p1, p2) + +#define wxON_BLOCK_EXIT_OBJ2_IMPL(n, o, m, p1, p2) \ + wxScopeGuard n = wxMakeObjGuard(o, m, p1, p2); \ + wxPrivateUse(n) +#define wxON_BLOCK_EXIT_OBJ2(o, m, p1, p2) \ + wxON_BLOCK_EXIT_OBJ2_IMPL(wxGuardName, o, &m, p1, p2) + +#define wxON_BLOCK_EXIT_THIS2(m, p1, p2) \ + wxON_BLOCK_EXIT_OBJ2(*this, m, p1, p2) + + +#define wxON_BLOCK_EXIT3_IMPL(n, f, p1, p2, p3) \ + wxScopeGuard n = wxMakeGuard(f, p1, p2, p3); \ + wxPrivateUse(n) +#define wxON_BLOCK_EXIT3(f, p1, p2, p3) \ + wxON_BLOCK_EXIT3_IMPL(wxGuardName, f, p1, p2, p3) + +#define wxON_BLOCK_EXIT_OBJ3_IMPL(n, o, m, p1, p2, p3) \ + wxScopeGuard n = wxMakeObjGuard(o, m, p1, p2, p3); \ + wxPrivateUse(n) +#define wxON_BLOCK_EXIT_OBJ3(o, m, p1, p2, p3) \ + wxON_BLOCK_EXIT_OBJ3_IMPL(wxGuardName, o, &m, p1, p2, p3) + +#define wxON_BLOCK_EXIT_THIS3(m, p1, p2, p3) \ + wxON_BLOCK_EXIT_OBJ3(*this, m, p1, p2, p3) + + +#define wxSetterName wxMAKE_UNIQUE_NAME(wxVarSetter) + +#define wxON_BLOCK_EXIT_SET_IMPL(n, var, value) \ + wxPrivate::VariableSetter n = wxMakeVarSetter(var, value); \ + wxPrivateUse(n) + +#define wxON_BLOCK_EXIT_SET(var, value) \ + wxON_BLOCK_EXIT_SET_IMPL(wxSetterName, var, value) + +#define wxON_BLOCK_EXIT_NULL_IMPL(n, var) \ + wxPrivate::VariableSetter n = wxMakeVarNuller(var); \ + wxPrivateUse(n) + +#define wxON_BLOCK_EXIT_NULL(ptr) \ + wxON_BLOCK_EXIT_NULL_IMPL(wxSetterName, ptr) + +#endif // _WX_SCOPEGUARD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/scrolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/scrolbar.h new file mode 100644 index 0000000000..21f2d75a8a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/scrolbar.h @@ -0,0 +1,86 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/scrolbar.h +// Purpose: wxScrollBar base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SCROLBAR_H_BASE_ +#define _WX_SCROLBAR_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_SCROLLBAR + +#include "wx/control.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxScrollBarNameStr[]; + +// ---------------------------------------------------------------------------- +// wxScrollBar: a scroll bar control +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScrollBarBase : public wxControl +{ +public: + wxScrollBarBase() { } + + /* + Derived classes should provide the following method and ctor with the + same parameters: + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr); + */ + + // accessors + virtual int GetThumbPosition() const = 0; + virtual int GetThumbSize() const = 0; + virtual int GetPageSize() const = 0; + virtual int GetRange() const = 0; + + bool IsVertical() const { return (m_windowStyle & wxVERTICAL) != 0; } + + // operations + virtual void SetThumbPosition(int viewStart) = 0; + virtual void SetScrollbar(int position, int thumbSize, + int range, int pageSize, + bool refresh = true) = 0; + + // implementation-only + bool IsNeeded() const { return GetRange() > GetThumbSize(); } + +private: + wxDECLARE_NO_COPY_CLASS(wxScrollBarBase); +}; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/scrolbar.h" +#elif defined(__WXMSW__) + #include "wx/msw/scrolbar.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/scrolbar.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/scrolbar.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/scrolbar.h" +#elif defined(__WXMAC__) + #include "wx/osx/scrolbar.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/scrolbar.h" +#elif defined(__WXPM__) + #include "wx/os2/scrolbar.h" +#endif + +#endif // wxUSE_SCROLLBAR + +#endif + // _WX_SCROLBAR_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/scrolwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/scrolwin.h new file mode 100644 index 0000000000..370969929e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/scrolwin.h @@ -0,0 +1,494 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/scrolwin.h +// Purpose: wxScrolledWindow, wxScrolledControl and wxScrollHelper +// Author: Vadim Zeitlin +// Modified by: +// Created: 30.08.00 +// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SCROLWIN_H_BASE_ +#define _WX_SCROLWIN_H_BASE_ + +#include "wx/panel.h" + +class WXDLLIMPEXP_FWD_CORE wxScrollHelperEvtHandler; +class WXDLLIMPEXP_FWD_BASE wxTimer; + +// default scrolled window style: scroll in both directions +#define wxScrolledWindowStyle (wxHSCROLL | wxVSCROLL) + +// values for the second argument of wxScrollHelper::ShowScrollbars() +enum wxScrollbarVisibility +{ + wxSHOW_SB_NEVER = -1, // never show the scrollbar at all + wxSHOW_SB_DEFAULT, // show scrollbar only if it is needed + wxSHOW_SB_ALWAYS // always show scrollbar, even if not needed +}; + +// ---------------------------------------------------------------------------- +// The hierarchy of scrolling classes is a bit complicated because we want to +// put as much functionality as possible in a mix-in class not deriving from +// wxWindow so that other classes could derive from the same base class on all +// platforms irrespectively of whether they are native controls (and hence +// don't use our scrolling) or not. +// +// So we have +// +// wxAnyScrollHelperBase +// | +// | +// \|/ +// wxScrollHelperBase +// | +// | +// \|/ +// wxWindow wxScrollHelper +// | \ / / +// | \ / / +// | _| |_ / +// | wxScrolledWindow / +// | / +// \|/ / +// wxControl / +// \ / +// \ / +// _| |_ +// wxScrolledControl +// +// ---------------------------------------------------------------------------- + +// This class allows reusing some of wxScrollHelperBase functionality in +// wxVarScrollHelperBase in wx/vscroll.h without duplicating its code. +class WXDLLIMPEXP_CORE wxAnyScrollHelperBase +{ +public: + wxEXPLICIT wxAnyScrollHelperBase(wxWindow* win); + virtual ~wxAnyScrollHelperBase() {} + + // Disable use of keyboard keys for scrolling. By default cursor movement + // keys (including Home, End, Page Up and Down) are used to scroll the + // window appropriately. If the derived class uses these keys for something + // else, e.g. changing the currently selected item, this function can be + // used to disable this behaviour as it's not only not necessary then but + // can actually be actively harmful if another object forwards a keyboard + // event corresponding to one of the above keys to us using + // ProcessWindowEvent() because the event will always be processed which + // can be undesirable. + void DisableKeyboardScrolling() { m_kbdScrollingEnabled = false; } + + // Override this function to draw the graphic (or just process EVT_PAINT) + virtual void OnDraw(wxDC& WXUNUSED(dc)) { } + + // change the DC origin according to the scroll position. + virtual void DoPrepareDC(wxDC& dc) = 0; + + // Simple accessor for the window that is really being scrolled. + wxWindow *GetTargetWindow() const { return m_targetWindow; } + + + // The methods called from the window event handlers. + void HandleOnChar(wxKeyEvent& event); + void HandleOnPaint(wxPaintEvent& event); + +protected: + // the window that receives the scroll events and the window to actually + // scroll, respectively + wxWindow *m_win, + *m_targetWindow; + + // whether cursor keys should scroll the window + bool m_kbdScrollingEnabled; +}; + +// This is the class containing the guts of (uniform) scrolling logic. +class WXDLLIMPEXP_CORE wxScrollHelperBase : public wxAnyScrollHelperBase +{ +public: + // ctor must be given the associated window + wxScrollHelperBase(wxWindow *winToScroll); + virtual ~wxScrollHelperBase(); + + // configure the scrolling + virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, + int noUnitsX, int noUnitsY, + int xPos = 0, int yPos = 0, + bool noRefresh = false ); + + // scroll to the given (in logical coords) position + // + // notice that for backwards compatibility reasons Scroll() is virtual as + // the existing code could override it but new code should override + // DoScroll() instead + virtual void Scroll(int x, int y) { DoScroll(x, y); } + virtual void Scroll(const wxPoint& pt) { DoScroll(pt.x, pt.y); } + + // get/set the page size for this orientation (wxVERTICAL/wxHORIZONTAL) + int GetScrollPageSize(int orient) const; + void SetScrollPageSize(int orient, int pageSize); + + // get the number of lines the window can scroll, + // returns 0 if no scrollbars are there. + int GetScrollLines( int orient ) const; + + // Set the x, y scrolling increments. + void SetScrollRate( int xstep, int ystep ); + + // get the size of one logical unit in physical ones + void GetScrollPixelsPerUnit(int *pixelsPerUnitX, int *pixelsPerUnitY) const; + + // Set scrollbar visibility: it is possible to show scrollbar only if it is + // needed (i.e. if our virtual size is greater than the current size of the + // associated window), always (as wxALWAYS_SHOW_SB style does) or never (in + // which case you should provide some other way to scroll the window as the + // user wouldn't be able to do it at all) + void ShowScrollbars(wxScrollbarVisibility horz, wxScrollbarVisibility vert) + { + DoShowScrollbars(horz, vert); + } + + // Test whether the specified scrollbar is shown. + virtual bool IsScrollbarShown(int orient) const = 0; + + // Enable/disable Windows scrolling in either direction. If true, wxWidgets + // scrolls the canvas and only a bit of the canvas is invalidated; no + // Clear() is necessary. If false, the whole canvas is invalidated and a + // Clear() is necessary. Disable for when the scroll increment is used to + // actually scroll a non-constant distance + // + // Notice that calling this method with a false argument doesn't disable + // scrolling the window in this direction, it just changes the mechanism by + // which it is implemented to not use wxWindow::ScrollWindow(). + virtual void EnableScrolling(bool x_scrolling, bool y_scrolling); + + // Get the view start + void GetViewStart(int *x, int *y) const { DoGetViewStart(x, y); } + + wxPoint GetViewStart() const + { + wxPoint pt; + DoGetViewStart(&pt.x, &pt.y); + return pt; + } + + // Set the scale factor, used in PrepareDC + void SetScale(double xs, double ys) { m_scaleX = xs; m_scaleY = ys; } + double GetScaleX() const { return m_scaleX; } + double GetScaleY() const { return m_scaleY; } + + // translate between scrolled and unscrolled coordinates + void CalcScrolledPosition(int x, int y, int *xx, int *yy) const + { DoCalcScrolledPosition(x, y, xx, yy); } + wxPoint CalcScrolledPosition(const wxPoint& pt) const + { + wxPoint p2; + DoCalcScrolledPosition(pt.x, pt.y, &p2.x, &p2.y); + return p2; + } + + void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const + { DoCalcUnscrolledPosition(x, y, xx, yy); } + wxPoint CalcUnscrolledPosition(const wxPoint& pt) const + { + wxPoint p2; + DoCalcUnscrolledPosition(pt.x, pt.y, &p2.x, &p2.y); + return p2; + } + + void DoCalcScrolledPosition(int x, int y, int *xx, int *yy) const; + void DoCalcUnscrolledPosition(int x, int y, int *xx, int *yy) const; + + // Adjust the scrollbars + virtual void AdjustScrollbars() = 0; + + // Calculate scroll increment + int CalcScrollInc(wxScrollWinEvent& event); + + // Normally the wxScrolledWindow will scroll itself, but in some rare + // occasions you might want it to scroll [part of] another window (e.g. a + // child of it in order to scroll only a portion the area between the + // scrollbars (spreadsheet: only cell area will move). + void SetTargetWindow(wxWindow *target); + + void SetTargetRect(const wxRect& rect) { m_rectToScroll = rect; } + wxRect GetTargetRect() const { return m_rectToScroll; } + + virtual void DoPrepareDC(wxDC& dc); + + // are we generating the autoscroll events? + bool IsAutoScrolling() const { return m_timerAutoScroll != NULL; } + + // stop generating the scroll events when mouse is held outside the window + void StopAutoScrolling(); + + // this method can be overridden in a derived class to forbid sending the + // auto scroll events - note that unlike StopAutoScrolling() it doesn't + // stop the timer, so it will be called repeatedly and will typically + // return different values depending on the current mouse position + // + // the base class version just returns true + virtual bool SendAutoScrollEvents(wxScrollWinEvent& event) const; + + // the methods to be called from the window event handlers + void HandleOnScroll(wxScrollWinEvent& event); + void HandleOnSize(wxSizeEvent& event); + void HandleOnMouseEnter(wxMouseEvent& event); + void HandleOnMouseLeave(wxMouseEvent& event); +#if wxUSE_MOUSEWHEEL + void HandleOnMouseWheel(wxMouseEvent& event); +#endif // wxUSE_MOUSEWHEEL + void HandleOnChildFocus(wxChildFocusEvent& event); + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( + void OnScroll(wxScrollWinEvent& event) { HandleOnScroll(event); } + ) +#endif // WXWIN_COMPATIBILITY_2_8 + +protected: + // get pointer to our scroll rect if we use it or NULL + const wxRect *GetScrollRect() const + { + return m_rectToScroll.width != 0 ? &m_rectToScroll : NULL; + } + + // get the size of the target window + wxSize GetTargetSize() const + { + return m_rectToScroll.width != 0 ? m_rectToScroll.GetSize() + : m_targetWindow->GetClientSize(); + } + + void GetTargetSize(int *w, int *h) const + { + wxSize size = GetTargetSize(); + if ( w ) + *w = size.x; + if ( h ) + *h = size.y; + } + + // implementation of public methods with the same name + virtual void DoGetViewStart(int *x, int *y) const; + virtual void DoScroll(int x, int y) = 0; + virtual void DoShowScrollbars(wxScrollbarVisibility horz, + wxScrollbarVisibility vert) = 0; + + // implementations of various wxWindow virtual methods which should be + // forwarded to us (this can be done by WX_FORWARD_TO_SCROLL_HELPER()) + bool ScrollLayout(); + void ScrollDoSetVirtualSize(int x, int y); + wxSize ScrollGetBestVirtualSize() const; + + // change just the target window (unlike SetWindow which changes m_win as + // well) + void DoSetTargetWindow(wxWindow *target); + + // delete the event handler we installed + void DeleteEvtHandler(); + + // this function should be overridden to return the size available for + // m_targetWindow inside m_win of the given size + // + // the default implementation is only good for m_targetWindow == m_win + // case, if we're scrolling a subwindow you must override this method + virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size) + { + // returning just size from here is wrong but it was decided that it is + // not wrong enough to break the existing code (which doesn't override + // this recently added function at all) by adding this assert + // + // wxASSERT_MSG( m_targetWindow == m_win, "must be overridden" ); + + return size; + } + + + double m_scaleX; + double m_scaleY; + + wxRect m_rectToScroll; + + wxTimer *m_timerAutoScroll; + + // The number of pixels to scroll in horizontal and vertical directions + // respectively. + // + // If 0, means that the scrolling in the given direction is disabled. + int m_xScrollPixelsPerLine; + int m_yScrollPixelsPerLine; + int m_xScrollPosition; + int m_yScrollPosition; + int m_xScrollLines; + int m_yScrollLines; + int m_xScrollLinesPerPage; + int m_yScrollLinesPerPage; + + bool m_xScrollingEnabled; + bool m_yScrollingEnabled; + +#if wxUSE_MOUSEWHEEL + int m_wheelRotation; +#endif // wxUSE_MOUSEWHEEL + + wxScrollHelperEvtHandler *m_handler; + + wxDECLARE_NO_COPY_CLASS(wxScrollHelperBase); +}; + +// this macro can be used in a wxScrollHelper-derived class to forward wxWindow +// methods to corresponding wxScrollHelper methods +#define WX_FORWARD_TO_SCROLL_HELPER() \ +public: \ + virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); } \ + virtual bool Layout() { return ScrollLayout(); } \ + virtual bool CanScroll(int orient) const \ + { return IsScrollbarShown(orient); } \ + virtual void DoSetVirtualSize(int x, int y) \ + { ScrollDoSetVirtualSize(x, y); } \ + virtual wxSize GetBestVirtualSize() const \ + { return ScrollGetBestVirtualSize(); } + +// include the declaration of the real wxScrollHelper +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) + #include "wx/gtk/scrolwin.h" +#elif defined(__WXGTK__) && !defined(__WXUNIVERSAL__) + #include "wx/gtk1/scrolwin.h" +#else + #define wxHAS_GENERIC_SCROLLWIN + #include "wx/generic/scrolwin.h" +#endif + +// ---------------------------------------------------------------------------- +// wxScrolled<T>: a wxWindow which knows how to scroll +// ---------------------------------------------------------------------------- + +// helper class for wxScrolled<T> below +struct WXDLLIMPEXP_CORE wxScrolledT_Helper +{ + static wxSize FilterBestSize(const wxWindow *win, + const wxScrollHelper *helper, + const wxSize& origBest); +#ifdef __WXMSW__ + static WXLRESULT FilterMSWWindowProc(WXUINT nMsg, WXLRESULT origResult); +#endif +}; + +// Scrollable window base on window type T. This used to be wxScrolledWindow, +// but wxScrolledWindow includes wxControlContainer functionality and that's +// not always desirable. +template<class T> +class wxScrolled : public T, + public wxScrollHelper, + private wxScrolledT_Helper +{ +public: + wxScrolled() : wxScrollHelper(this) { } + wxScrolled(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxScrolledWindowStyle, + const wxString& name = wxPanelNameStr) + : wxScrollHelper(this) + { + Create(parent, winid, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxScrolledWindowStyle, + const wxString& name = wxPanelNameStr) + { + m_targetWindow = this; + +#ifdef __WXMAC__ + this->MacSetClipChildren(true); +#endif + + // by default, we're scrollable in both directions (but if one of the + // styles is specified explicitly, we shouldn't add the other one + // automatically) + if ( !(style & (wxHSCROLL | wxVSCROLL)) ) + style |= wxHSCROLL | wxVSCROLL; + +#ifdef __WXOSX__ + bool retval = T::Create(parent, winid, pos, size, style, name); + if ( retval && (style & wxALWAYS_SHOW_SB) ) + ShowScrollbars(wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS); + return retval; +#else + if ( style & wxALWAYS_SHOW_SB ) + ShowScrollbars(wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS); + + return T::Create(parent, winid, pos, size, style, name); +#endif + } + +#ifdef __WXMSW__ + // we need to return a special WM_GETDLGCODE value to process just the + // arrows but let the other navigation characters through + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) + { + return FilterMSWWindowProc(nMsg, T::MSWWindowProc(nMsg, wParam, lParam)); + } + + // Take into account the scroll origin. + virtual void MSWAdjustBrushOrg(int* xOrg, int* yOrg) const + { + CalcUnscrolledPosition(*xOrg, *yOrg, xOrg, yOrg); + } +#endif // __WXMSW__ + + WX_FORWARD_TO_SCROLL_HELPER() + +protected: + virtual wxSize DoGetBestSize() const + { + return FilterBestSize(this, this, T::DoGetBestSize()); + } + +private: + // VC++ 6 gives warning for the declaration of template member function + // without definition +#ifndef __VISUALC6__ + wxDECLARE_NO_COPY_CLASS(wxScrolled); +#endif +}; + +#ifdef __VISUALC6__ + // disable the warning about non dll-interface class used as base for + // dll-interface class: it's harmless in this case + #pragma warning(push) + #pragma warning(disable:4275) +#endif + +// for compatibility with existing code, we provide wxScrolledWindow +// "typedef" for wxScrolled<wxPanel>. It's not a real typedef because we +// want wxScrolledWindow to show in wxRTTI information (the class is widely +// used and likelihood of its wxRTTI information being used too is high): +class WXDLLIMPEXP_CORE wxScrolledWindow : public wxScrolled<wxPanel> +{ +public: + wxScrolledWindow() : wxScrolled<wxPanel>() {} + wxScrolledWindow(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxScrolledWindowStyle, + const wxString& name = wxPanelNameStr) + : wxScrolled<wxPanel>(parent, winid, pos, size, style, name) {} + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxScrolledWindow) +}; + +typedef wxScrolled<wxWindow> wxScrolledCanvas; + +#ifdef __VISUALC6__ + #pragma warning(pop) +#endif + +#endif // _WX_SCROLWIN_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/selstore.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/selstore.h new file mode 100644 index 0000000000..62ff2298ce --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/selstore.h @@ -0,0 +1,100 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/selstore.h +// Purpose: wxSelectionStore stores selected items in a control +// Author: Vadim Zeitlin +// Modified by: +// Created: 08.06.03 (extracted from src/generic/listctrl.cpp) +// Copyright: (c) 2000-2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SELSTORE_H_ +#define _WX_SELSTORE_H_ + +#include "wx/dynarray.h" + +// ---------------------------------------------------------------------------- +// wxSelectedIndices is just a sorted array of indices +// ---------------------------------------------------------------------------- + +inline int CMPFUNC_CONV wxUIntCmp(unsigned n1, unsigned n2) +{ + return (int)(n1 - n2); +} + +WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_INT(unsigned, wxUIntCmp, wxSelectedIndices); + +// ---------------------------------------------------------------------------- +// wxSelectionStore is used to store the selected items in the virtual +// controls, i.e. it is well suited for storing even when the control contains +// a huge (practically infinite) number of items. +// +// Of course, internally it still has to store the selected items somehow (as +// an array currently) but the advantage is that it can handle the selection +// of all items (common operation) efficiently and that it could be made even +// smarter in the future (e.g. store the selections as an array of ranges + +// individual items) without changing its API. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSelectionStore +{ +public: + wxSelectionStore() : m_itemsSel(wxUIntCmp) { Init(); } + + // set the total number of items we handle + void SetItemCount(unsigned count); + + // special case of SetItemCount(0) + void Clear() { m_itemsSel.Clear(); m_count = 0; m_defaultState = false; } + + // must be called when a new item is inserted/added + void OnItemAdd(unsigned WXUNUSED(item)) { wxFAIL_MSG( wxT("TODO") ); } + + // must be called when an item is deleted + void OnItemDelete(unsigned item); + + // select one item, use SelectRange() insted if possible! + // + // returns true if the items selection really changed + bool SelectItem(unsigned item, bool select = true); + + // select the range of items (inclusive) + // + // return true and fill the itemsChanged array with the indices of items + // which have changed state if "few" of them did, otherwise return false + // (meaning that too many items changed state to bother counting them + // individually) + bool SelectRange(unsigned itemFrom, unsigned itemTo, + bool select = true, + wxArrayInt *itemsChanged = NULL); + + // return true if the given item is selected + bool IsSelected(unsigned item) const; + + // return the total number of selected items + unsigned GetSelectedCount() const + { + return m_defaultState ? m_count - m_itemsSel.GetCount() + : m_itemsSel.GetCount(); + } + +private: + // (re)init + void Init() { m_count = 0; m_defaultState = false; } + + // the total number of items we handle + unsigned m_count; + + // the default state: normally, false (i.e. off) but maybe set to true if + // there are more selected items than non selected ones - this allows to + // handle selection of all items efficiently + bool m_defaultState; + + // the array of items whose selection state is different from default + wxSelectedIndices m_itemsSel; + + wxDECLARE_NO_COPY_CLASS(wxSelectionStore); +}; + +#endif // _WX_SELSTORE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/settings.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/settings.h new file mode 100644 index 0000000000..f90ae071ba --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/settings.h @@ -0,0 +1,221 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/settings.h +// Purpose: wxSystemSettings class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SETTINGS_H_BASE_ +#define _WX_SETTINGS_H_BASE_ + +#include "wx/colour.h" +#include "wx/font.h" + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +// possible values for wxSystemSettings::GetFont() parameter +// +// NB: wxMSW assumes that they have the same values as the parameters of +// Windows GetStockObject() API, don't change the values! +enum wxSystemFont +{ + wxSYS_OEM_FIXED_FONT = 10, + wxSYS_ANSI_FIXED_FONT, + wxSYS_ANSI_VAR_FONT, + wxSYS_SYSTEM_FONT, + wxSYS_DEVICE_DEFAULT_FONT, + + // don't use: this is here just to make the values of enum elements + // coincide with the corresponding MSW constants + wxSYS_DEFAULT_PALETTE, + + // don't use: MSDN says that this is a stock object provided only + // for compatibility with 16-bit Windows versions earlier than 3.0! + wxSYS_SYSTEM_FIXED_FONT, + + wxSYS_DEFAULT_GUI_FONT, + + // this was just a temporary aberration, do not use it any more + wxSYS_ICONTITLE_FONT = wxSYS_DEFAULT_GUI_FONT +}; + +// possible values for wxSystemSettings::GetColour() parameter +// +// NB: wxMSW assumes that they have the same values as the parameters of +// Windows GetSysColor() API, don't change the values! +enum wxSystemColour +{ + wxSYS_COLOUR_SCROLLBAR, + wxSYS_COLOUR_DESKTOP, + wxSYS_COLOUR_ACTIVECAPTION, + wxSYS_COLOUR_INACTIVECAPTION, + wxSYS_COLOUR_MENU, + wxSYS_COLOUR_WINDOW, + wxSYS_COLOUR_WINDOWFRAME, + wxSYS_COLOUR_MENUTEXT, + wxSYS_COLOUR_WINDOWTEXT, + wxSYS_COLOUR_CAPTIONTEXT, + wxSYS_COLOUR_ACTIVEBORDER, + wxSYS_COLOUR_INACTIVEBORDER, + wxSYS_COLOUR_APPWORKSPACE, + wxSYS_COLOUR_HIGHLIGHT, + wxSYS_COLOUR_HIGHLIGHTTEXT, + wxSYS_COLOUR_BTNFACE, + wxSYS_COLOUR_BTNSHADOW, + wxSYS_COLOUR_GRAYTEXT, + wxSYS_COLOUR_BTNTEXT, + wxSYS_COLOUR_INACTIVECAPTIONTEXT, + wxSYS_COLOUR_BTNHIGHLIGHT, + wxSYS_COLOUR_3DDKSHADOW, + wxSYS_COLOUR_3DLIGHT, + wxSYS_COLOUR_INFOTEXT, + wxSYS_COLOUR_INFOBK, + wxSYS_COLOUR_LISTBOX, + wxSYS_COLOUR_HOTLIGHT, + wxSYS_COLOUR_GRADIENTACTIVECAPTION, + wxSYS_COLOUR_GRADIENTINACTIVECAPTION, + wxSYS_COLOUR_MENUHILIGHT, + wxSYS_COLOUR_MENUBAR, + wxSYS_COLOUR_LISTBOXTEXT, + wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT, + + wxSYS_COLOUR_MAX, + + // synonyms + wxSYS_COLOUR_BACKGROUND = wxSYS_COLOUR_DESKTOP, + wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE, + wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW, + wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, + wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, + wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, + wxSYS_COLOUR_FRAMEBK = wxSYS_COLOUR_BTNFACE +}; + +// possible values for wxSystemSettings::GetMetric() index parameter +// +// NB: update the conversion table in msw/settings.cpp if you change the values +// of the elements of this enum +enum wxSystemMetric +{ + wxSYS_MOUSE_BUTTONS = 1, + wxSYS_BORDER_X, + wxSYS_BORDER_Y, + wxSYS_CURSOR_X, + wxSYS_CURSOR_Y, + wxSYS_DCLICK_X, + wxSYS_DCLICK_Y, + wxSYS_DRAG_X, + wxSYS_DRAG_Y, + wxSYS_EDGE_X, + wxSYS_EDGE_Y, + wxSYS_HSCROLL_ARROW_X, + wxSYS_HSCROLL_ARROW_Y, + wxSYS_HTHUMB_X, + wxSYS_ICON_X, + wxSYS_ICON_Y, + wxSYS_ICONSPACING_X, + wxSYS_ICONSPACING_Y, + wxSYS_WINDOWMIN_X, + wxSYS_WINDOWMIN_Y, + wxSYS_SCREEN_X, + wxSYS_SCREEN_Y, + wxSYS_FRAMESIZE_X, + wxSYS_FRAMESIZE_Y, + wxSYS_SMALLICON_X, + wxSYS_SMALLICON_Y, + wxSYS_HSCROLL_Y, + wxSYS_VSCROLL_X, + wxSYS_VSCROLL_ARROW_X, + wxSYS_VSCROLL_ARROW_Y, + wxSYS_VTHUMB_Y, + wxSYS_CAPTION_Y, + wxSYS_MENU_Y, + wxSYS_NETWORK_PRESENT, + wxSYS_PENWINDOWS_PRESENT, + wxSYS_SHOW_SOUNDS, + wxSYS_SWAP_BUTTONS, + wxSYS_DCLICK_MSEC +}; + +// possible values for wxSystemSettings::HasFeature() parameter +enum wxSystemFeature +{ + wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1, + wxSYS_CAN_ICONIZE_FRAME, + wxSYS_TABLET_PRESENT +}; + +// values for different screen designs +enum wxSystemScreenType +{ + wxSYS_SCREEN_NONE = 0, // not yet defined + + wxSYS_SCREEN_TINY, // < + wxSYS_SCREEN_PDA, // >= 320x240 + wxSYS_SCREEN_SMALL, // >= 640x480 + wxSYS_SCREEN_DESKTOP // >= 800x600 +}; + +// ---------------------------------------------------------------------------- +// wxSystemSettingsNative: defines the API for wxSystemSettings class +// ---------------------------------------------------------------------------- + +// this is a namespace rather than a class: it has only non virtual static +// functions +// +// also note that the methods are implemented in the platform-specific source +// files (i.e. this is not a real base class as we can't override its virtual +// functions because it doesn't have any) + +class WXDLLIMPEXP_CORE wxSystemSettingsNative +{ +public: + // get a standard system colour + static wxColour GetColour(wxSystemColour index); + + // get a standard system font + static wxFont GetFont(wxSystemFont index); + + // get a system-dependent metric + static int GetMetric(wxSystemMetric index, wxWindow * win = NULL); + + // return true if the port has certain feature + static bool HasFeature(wxSystemFeature index); +}; + +// ---------------------------------------------------------------------------- +// include the declaration of the real platform-dependent class +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSystemSettings : public wxSystemSettingsNative +{ +public: +#ifdef __WXUNIVERSAL__ + // in wxUniversal we want to use the theme standard colours instead of the + // system ones, otherwise wxSystemSettings is just the same as + // wxSystemSettingsNative + static wxColour GetColour(wxSystemColour index); + + // some metrics are toolkit-dependent and provided by wxUniv, some are + // lowlevel + static int GetMetric(wxSystemMetric index, wxWindow *win = NULL); +#endif // __WXUNIVERSAL__ + + // Get system screen design (desktop, pda, ..) used for + // laying out various dialogs. + static wxSystemScreenType GetScreenType(); + + // Override default. + static void SetScreenType( wxSystemScreenType screen ); + + // Value + static wxSystemScreenType ms_screen; + +}; + +#endif + // _WX_SETTINGS_H_BASE_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/setup_inc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/setup_inc.h new file mode 100644 index 0000000000..dbca6a4c70 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/setup_inc.h @@ -0,0 +1,1499 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/setup_inc.h +// Purpose: setup.h settings +// Author: Vadim Zeitlin +// Modified by: +// Created: +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// global settings +// ---------------------------------------------------------------------------- + +// define this to 0 when building wxBase library - this can also be done from +// makefile/project file overriding the value here +#ifndef wxUSE_GUI + #define wxUSE_GUI 1 +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// compatibility settings +// ---------------------------------------------------------------------------- + +// This setting determines the compatibility with 2.6 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_6 0 + +// This setting determines the compatibility with 2.8 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_8 1 + +// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when +// default system font is used for wxWindow::GetCharWidth/Height() instead of +// the current font. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxDIALOG_UNIT_COMPATIBILITY 0 + +// ---------------------------------------------------------------------------- +// debugging settings +// ---------------------------------------------------------------------------- + +// wxDEBUG_LEVEL will be defined as 1 in wx/debug.h so normally there is no +// need to define it here. You may do it for two reasons: either completely +// disable/compile out the asserts in release version (then do it inside #ifdef +// NDEBUG) or, on the contrary, enable more asserts, including the usually +// disabled ones, in the debug build (then do it inside #ifndef NDEBUG) +// +// #ifdef NDEBUG +// #define wxDEBUG_LEVEL 0 +// #else +// #define wxDEBUG_LEVEL 2 +// #endif + +// wxHandleFatalExceptions() may be used to catch the program faults at run +// time and, instead of terminating the program with a usual GPF message box, +// call the user-defined wxApp::OnFatalException() function. If you set +// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work. +// +// This setting is for Win32 only and can only be enabled if your compiler +// supports Win32 structured exception handling (currently only VC++ does) +// +// Default is 1 +// +// Recommended setting: 1 if your compiler supports it. +#define wxUSE_ON_FATAL_EXCEPTION 1 + +// Set this to 1 to be able to generate a human-readable (unlike +// machine-readable minidump created by wxCrashReport::Generate()) stack back +// trace when your program crashes using wxStackWalker +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_STACKWALKER 1 + +// Set this to 1 to compile in wxDebugReport class which allows you to create +// and optionally upload to your web site a debug report consisting of back +// trace of the crash (if wxUSE_STACKWALKER == 1) and other information. +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, it is compiled into a separate library so there +// is no overhead if you don't use it +#define wxUSE_DEBUGREPORT 1 + +// Generic comment about debugging settings: they are very useful if you don't +// use any other memory leak detection tools such as Purify/BoundsChecker, but +// are probably redundant otherwise. Also, Visual C++ CRT has the same features +// as wxWidgets memory debugging subsystem built in since version 5.0 and you +// may prefer to use it instead of built in memory debugging code because it is +// faster and more fool proof. +// +// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG +// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0) +// and if __NO_VC_CRTDBG__ is not defined. + +// The rest of the options in this section are obsolete and not supported, +// enable them at your own risk. + +// If 1, enables wxDebugContext, for writing error messages to file, etc. If +// __WXDEBUG__ is not defined, will still use the normal memory operators. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_CONTEXT 0 + +// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF* +// __WXDEBUG__ is also defined. +// +// WARNING: this code may not work with all architectures, especially if +// alignment is an issue. This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 1 if you are not using a memory debugging tool, else 0 +#define wxUSE_MEMORY_TRACING 0 + +// In debug mode, cause new and delete to be redefined globally. +// If this causes problems (e.g. link errors which is a common problem +// especially if you use another library which also redefines the global new +// and delete), set this to 0. +// This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If +// this causes problems (e.g. link errors), set this to 0. You may need to set +// this to 0 if using templates (at least for VC++). This switch is currently +// ignored for MinGW/Cygwin. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_NEW_ALWAYS 0 + + +// ---------------------------------------------------------------------------- +// Unicode support +// ---------------------------------------------------------------------------- + +// These settings are obsolete: the library is always built in Unicode mode +// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if +// absolutely necessary -- updating it is strongly recommended as the ANSI mode +// will disappear completely in future wxWidgets releases. +#ifndef wxUSE_UNICODE + #define wxUSE_UNICODE 1 +#endif + +// wxUSE_WCHAR_T is required by wxWidgets now, don't change. +#define wxUSE_WCHAR_T 1 + +// ---------------------------------------------------------------------------- +// global features +// ---------------------------------------------------------------------------- + +// Compile library in exception-safe mode? If set to 1, the library will try to +// behave correctly in presence of exceptions (even though it still will not +// use the exceptions itself) and notify the user code about any unhandled +// exceptions. If set to 0, propagation of the exceptions through the library +// code will lead to undefined behaviour -- but the code itself will be +// slightly smaller and faster. +// +// Note that like wxUSE_THREADS this option is automatically set to 0 if +// wxNO_EXCEPTIONS is defined. +// +// Default is 1 +// +// Recommended setting: depends on whether you intend to use C++ exceptions +// in your own code (1 if you do, 0 if you don't) +#define wxUSE_EXCEPTIONS 1 + +// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI +// +// Default is 0 +// +// Recommended setting: 0 (this is still work in progress...) +#define wxUSE_EXTENDED_RTTI 0 + +// Support for message/error logging. This includes wxLogXXX() functions and +// wxLog and derived classes. Don't set this to 0 unless you really know what +// you are doing. +// +// Default is 1 +// +// Recommended setting: 1 (always) +#define wxUSE_LOG 1 + +// Recommended setting: 1 +#define wxUSE_LOGWINDOW 1 + +// Recommended setting: 1 +#define wxUSE_LOGGUI 1 + +// Recommended setting: 1 +#define wxUSE_LOG_DIALOG 1 + +// Support for command line parsing using wxCmdLineParser class. +// +// Default is 1 +// +// Recommended setting: 1 (can be set to 0 if you don't use the cmd line) +#define wxUSE_CMDLINE_PARSER 1 + +// Support for multithreaded applications: if 1, compile in thread classes +// (thread.h) and make the library a bit more thread safe. Although thread +// support is quite stable by now, you may still consider recompiling the +// library without it if you have no use for it - this will result in a +// somewhat smaller and faster operation. +// +// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset +// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in +// build/msw/config.* file this value will have no effect. +// +// Default is 1 +// +// Recommended setting: 0 unless you do plan to develop MT applications +#define wxUSE_THREADS 1 + +// If enabled, compiles wxWidgets streams classes +// +// wx stream classes are used for image IO, process IO redirection, network +// protocols implementation and much more and so disabling this results in a +// lot of other functionality being lost. +// +// Default is 1 +// +// Recommended setting: 1 as setting it to 0 disables many other things +#define wxUSE_STREAMS 1 + +// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. +// Note that if the system's implementation does not support positional +// parameters, setting this to 1 forces the use of the wxWidgets implementation +// of wxVsnprintf. The standard vsnprintf() supports positional parameters on +// many Unix systems but usually doesn't under Windows. +// +// Positional parameters are very useful when translating a program since using +// them in formatting strings allow translators to correctly reorder the +// translated sentences. +// +// Default is 1 +// +// Recommended setting: 1 if you want to support multiple languages +#define wxUSE_PRINTF_POS_PARAMS 1 + +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but is +// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets +// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under +// XP as this triggers a bug in compiler TLS support that results in crashes +// when any TLS variables are used. +// +// If you're absolutely sure that your build of wxWidgets is never going to be +// used in such situation, either because it's not going to be linked from any +// kind of plugin or because you only target Vista or later systems, you can +// set this to 2 to force the use of compiler TLS even under MSW. +// +// Default is 1 meaning that compiler TLS is used only if it's 100% safe. +// +// Recommended setting: 2 if you want to have maximal performance and don't +// care about the scenario described above. +#define wxUSE_COMPILER_TLS 1 + +// ---------------------------------------------------------------------------- +// Interoperability with the standard library. +// ---------------------------------------------------------------------------- + +// Set wxUSE_STL to 1 to enable maximal interoperability with the standard +// library, even at the cost of backwards compatibility. +// +// Default is 0 +// +// Recommended setting: 0 as the options below already provide a relatively +// good level of interoperability and changing this option arguably isn't worth +// diverging from the official builds of the library. +#define wxUSE_STL 0 + +// This is not a real option but is used as the default value for +// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library headers, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_DEFAULT 0 +#else + #define wxUSE_STD_DEFAULT 1 +#endif + +// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<> +// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but +// usually more limited) implementations are used which allows to avoid the +// dependency on the C++ run-time library. +// +// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't +// support using standard containers and that VC6 needs non-default options for +// such build to avoid getting "fatal error C1076: compiler limit : internal +// heap limit reached; use /Zm to specify a higher limit" in its own standard +// headers, so you need to ensure you do increase the heap size before enabling +// this option for this compiler. +// +// Default is 0 for compatibility reasons. +// +// Recommended setting: 1 unless compatibility with the official wxWidgets +// build and/or the existing code is a concern. +#define wxUSE_STD_CONTAINERS 0 + +// Use standard C++ streams if 1 instead of wx streams in some places. If +// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the +// standard streams library. +// +// Notice that enabling this does not replace wx streams with std streams +// everywhere, in a lot of places wx streams are used no matter what. +// +// Default is 1 if compiler supports it. +// +// Recommended setting: 1 if you use the standard streams anyhow and so +// dependency on the standard streams library is not a +// problem +#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT + +// Enable minimal interoperability with the standard C++ string class if 1. +// "Minimal" means that wxString can be constructed from std::string or +// std::wstring but can't be implicitly converted to them. You need to enable +// the option below for the latter. +// +// Default is 1 for most compilers. +// +// Recommended setting: 1 unless you want to ensure your program doesn't use +// the standard C++ library at all. +#define wxUSE_STD_STRING wxUSE_STD_DEFAULT + +// Make wxString as much interchangeable with std::[w]string as possible, in +// particular allow implicit conversion of wxString to either of these classes. +// This comes at a price (or a benefit, depending on your point of view) of not +// allowing implicit conversion to "const char *" and "const wchar_t *". +// +// Because a lot of existing code relies on these conversions, this option is +// disabled by default but can be enabled for your build if you don't care +// about compatibility. +// +// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled. +// +// Recommended setting: 0 to remain compatible with the official builds of +// wxWidgets. +#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL + +// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix +// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>. +// +// Note that newer compilers (including VC++ 7.1 and later) don't support +// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow. +// +// Default is 0. +// +// Recommended setting: 0, only set to 1 if you use a really old compiler +#define wxUSE_IOSTREAMH 0 + + +// ---------------------------------------------------------------------------- +// non GUI features selection +// ---------------------------------------------------------------------------- + +// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit +// integer which is implemented in terms of native 64 bit integers if any or +// uses emulation otherwise. +// +// This class is required by wxDateTime and so you should enable it if you want +// to use wxDateTime. For most modern platforms, it will use the native 64 bit +// integers in which case (almost) all of its functions are inline and it +// almost does not take any space, so there should be no reason to switch it +// off. +// +// Recommended setting: 1 +#define wxUSE_LONGLONG 1 + +// Set wxUSE_BASE64 to 1, to compile in Base64 support. This is required for +// storing binary data in wxConfig on most platforms. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_BASE64 1 + +// Set this to 1 to be able to use wxEventLoop even in console applications +// (i.e. using base library only, without GUI). This is mostly useful for +// processing socket events but is also necessary to use timers in console +// applications +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_CONSOLE_EVENTLOOP 1 + +// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level +// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions. +// +// Default is 1 +// +// Recommended setting: 1 (wxFile is highly recommended as it is required by +// i18n code, wxFileConfig and others) +#define wxUSE_FILE 1 +#define wxUSE_FFILE 1 + +// Use wxFSVolume class providing access to the configured/active mount points +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely disabled if you don't use it) +#define wxUSE_FSVOLUME 1 + +// Use wxStandardPaths class which allows to retrieve some standard locations +// in the file system +// +// Default is 1 +// +// Recommended setting: 1 (may be disabled to save space, but not much) +#define wxUSE_STDPATHS 1 + +// use wxTextBuffer class: required by wxTextFile +#define wxUSE_TEXTBUFFER 1 + +// use wxTextFile class: requires wxFile and wxTextBuffer, required by +// wxFileConfig +#define wxUSE_TEXTFILE 1 + +// i18n support: _() macro, wxLocale class. Requires wxTextFile. +#define wxUSE_INTL 1 + +// Provide wxFoo_l() functions similar to standard foo() functions but taking +// an extra locale parameter. +// +// Notice that this is fully implemented only for the systems providing POSIX +// xlocale support or Microsoft Visual C++ >= 8 (which provides proprietary +// almost-equivalent of xlocale functions), otherwise wxFoo_l() functions will +// only work for the current user locale and "C" locale. You can use +// wxHAS_XLOCALE_SUPPORT to test whether the full support is available. +// +// Default is 1 +// +// Recommended setting: 1 but may be disabled if you are writing programs +// running only in C locale anyhow +#define wxUSE_XLOCALE 1 + +// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which +// allow to manipulate dates, times and time intervals. wxDateTime replaces the +// old wxTime and wxDate classes which are still provided for backwards +// compatibility (and implemented in terms of wxDateTime). +// +// Note that this class is relatively new and is still officially in alpha +// stage because some features are not yet (fully) implemented. It is already +// quite useful though and should only be disabled if you are aiming at +// absolutely minimal version of the library. +// +// Requires: wxUSE_LONGLONG +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_DATETIME 1 + +// Set wxUSE_TIMER to 1 to compile wxTimer class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_TIMER 1 + +// Use wxStopWatch clas. +// +// Default is 1 +// +// Recommended setting: 1 (needed by wxSocket) +#define wxUSE_STOPWATCH 1 + +// Set wxUSE_FSWATCHER to 1 if you want to enable wxFileSystemWatcher +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FSWATCHER 1 + +// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes +// which allow the application to store its settings in the persistent +// storage. Setting this to 1 will also enable on-demand creation of the +// global config object in wxApp. +// +// See also wxUSE_CONFIG_NATIVE below. +// +// Recommended setting: 1 +#define wxUSE_CONFIG 1 + +// If wxUSE_CONFIG is 1, you may choose to use either the native config +// classes under Windows (using .INI files under Win16 and the registry under +// Win32) or the portable text file format used by the config classes under +// Unix. +// +// Default is 1 to use native classes. Note that you may still use +// wxFileConfig even if you set this to 1 - just the config object created by +// default for the applications needs will be a wxRegConfig or wxIniConfig and +// not wxFileConfig. +// +// Recommended setting: 1 +#define wxUSE_CONFIG_NATIVE 1 + +// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows +// to connect/disconnect from the network and be notified whenever the dial-up +// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DIALUP_MANAGER 1 + +// Compile in classes for run-time DLL loading and function calling. +// Required by wxUSE_DIALUP_MANAGER. +// +// This setting is for Win32 only +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DYNLIB_CLASS 1 + +// experimental, don't use for now +#define wxUSE_DYNAMIC_LOADER 1 + +// Set to 1 to use socket classes +#define wxUSE_SOCKETS 1 + +// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS) +// +// Notice that currently setting this option under Windows will result in +// programs which can only run on recent OS versions (with ws2_32.dll +// installed) which is why it is disabled by default. +// +// Default is 1. +// +// Recommended setting: 1 if you need IPv6 support +#define wxUSE_IPV6 0 + +// Set to 1 to enable virtual file systems (required by wxHTML) +#define wxUSE_FILESYSTEM 1 + +// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ZIP 1 + +// Set to 1 to enable virtual archive filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ARCHIVE 1 + +// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_INET 1 + +// wxArchive classes for accessing archives such as zip and tar +#define wxUSE_ARCHIVE_STREAMS 1 + +// Set to 1 to compile wxZipInput/OutputStream classes. +#define wxUSE_ZIPSTREAM 1 + +// Set to 1 to compile wxTarInput/OutputStream classes. +#define wxUSE_TARSTREAM 1 + +// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by +// wxUSE_LIBPNG +#define wxUSE_ZLIB 1 + +// If enabled, the code written by Apple will be used to write, in a portable +// way, float on the disk. See extended.c for the license which is different +// from wxWidgets one. +// +// Default is 1. +// +// Recommended setting: 1 unless you don't like the license terms (unlikely) +#define wxUSE_APPLE_IEEE 1 + +// Joystick support class +#define wxUSE_JOYSTICK 1 + +// wxFontEnumerator class +#define wxUSE_FONTENUM 1 + +// wxFontMapper class +#define wxUSE_FONTMAP 1 + +// wxMimeTypesManager class +#define wxUSE_MIMETYPE 1 + +// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP +// or wxURL you need to set this to 1. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_PROTOCOL 1 + +// The settings for the individual URL schemes +#define wxUSE_PROTOCOL_FILE 1 +#define wxUSE_PROTOCOL_FTP 1 +#define wxUSE_PROTOCOL_HTTP 1 + +// Define this to use wxURL class. +#define wxUSE_URL 1 + +// Define this to use native platform url and protocol support. +// Currently valid only for MS-Windows. +// Note: if you set this to 1, you can open ftp/http/gopher sites +// and obtain a valid input stream for these sites +// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0. +// Doing so reduces the code size. +// +// This code is experimental and subject to change. +#define wxUSE_URL_NATIVE 0 + +// Support for wxVariant class used in several places throughout the library, +// notably in wxDataViewCtrl API. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size as much as +// possible in which case setting this to 0 can gain up to 100KB. +#define wxUSE_VARIANT 1 + +// Support for wxAny class, the successor for wxVariant. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size by a small amount, +// or your compiler cannot for some reason cope with complexity of templates used. +#define wxUSE_ANY 1 + +// Support for regular expression matching via wxRegEx class: enable this to +// use POSIX regular expressions in your code. You need to compile regex +// library from src/regex to use it under Windows. +// +// Default is 0 +// +// Recommended setting: 1 if your compiler supports it, if it doesn't please +// contribute us a makefile for src/regex for it +#define wxUSE_REGEX 1 + +// wxSystemOptions class +#define wxUSE_SYSTEM_OPTIONS 1 + +// wxSound class +#define wxUSE_SOUND 1 + +// Use wxMediaCtrl +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_MEDIACTRL 1 + +// Use wxWidget's XRC XML-based resource system. Recommended. +// +// Default is 1 +// +// Recommended setting: 1 (requires wxUSE_XML) +#define wxUSE_XRC 1 + +// XML parsing classes. Note that their API will change in the future, so +// using wxXmlDocument and wxXmlNode in your app is not recommended. +// +// Default is the same as wxUSE_XRC, i.e. 1 by default. +// +// Recommended setting: 1 (required by XRC) +#define wxUSE_XML wxUSE_XRC + +// Use wxWidget's AUI docking system +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_AUI 1 + +// Use wxWidget's Ribbon classes for interfaces +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_RIBBON 1 + +// Use wxPropertyGrid. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_PROPGRID 1 + +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + +// Use wxWidget's web viewing classes +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW 1 + +// Use the IE wxWebView backend +// +// Default is 1 on MSW +// +// Recommended setting: 1 +#ifdef __WXMSW__ +#define wxUSE_WEBVIEW_IE 1 +#else +#define wxUSE_WEBVIEW_IE 0 +#endif + +// Use the WebKit wxWebView backend +// +// Default is 1 on GTK and OSX +// +// Recommended setting: 1 +#if defined(__WXGTK__) || defined(__WXOSX__) +#define wxUSE_WEBVIEW_WEBKIT 1 +#else +#define wxUSE_WEBVIEW_WEBKIT 0 +#endif + +// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced +// 2D drawing API. (Still somewhat experimental) +// +// Please note that on Windows gdiplus.dll is loaded dynamically which means +// that nothing special needs to be done as long as you don't use +// wxGraphicsContext at all or only use it on XP and later systems but you +// still do need to distribute it yourself for an application using +// wxGraphicsContext to be runnable on pre-XP systems. +// +// Default is 1 except if you're using a non-Microsoft compiler under Windows +// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. +// mingw32) you may need to install the headers (and just the headers) +// yourself. If you do, change the setting below manually. +// +// Recommended setting: 1 if supported by the compilation environment + +// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is +// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined +#ifdef _MSC_VER +# if _MSC_VER >= 1310 + // MSVC7.1+ comes with new enough Platform SDK, enable + // wxGraphicsContext support for it +# define wxUSE_GRAPHICS_CONTEXT 1 +# else + // MSVC 6 didn't include GDI+ headers so disable by default, enable it + // here if you use MSVC 6 with a newer SDK +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#else + // Disable support for other Windows compilers, enable it if your compiler + // comes with new enough SDK or you installed the headers manually. + // + // Notice that this will be set by configure under non-Windows platforms + // anyhow so the value there is not important. +# define wxUSE_GRAPHICS_CONTEXT 0 +#endif + +// Enable wxGraphicsContext implementation using Cairo library. +// +// This is not needed under Windows and detected automatically by configure +// under other systems, however you may set this to 1 manually if you installed +// Cairo under Windows yourself and prefer to use it instead the native GDI+ +// implementation. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_CAIRO 0 + + +// ---------------------------------------------------------------------------- +// Individual GUI controls +// ---------------------------------------------------------------------------- + +// You must set wxUSE_CONTROLS to 1 if you are using any controls at all +// (without it, wxControl class is not compiled) +// +// Default is 1 +// +// Recommended setting: 1 (don't change except for very special programs) +#define wxUSE_CONTROLS 1 + +// Support markup in control labels, i.e. provide wxControl::SetLabelMarkup(). +// Currently markup is supported only by a few controls and only some ports but +// their number will increase with time. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you want to save on code size) +#define wxUSE_MARKUP 1 + +// wxPopupWindow class is a top level transient window. It is currently used +// to implement wxTipWindow +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW) +#define wxUSE_POPUPWIN 1 + +// wxTipWindow allows to implement the custom tooltips, it is used by the +// context help classes. Requires wxUSE_POPUPWIN. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0) +#define wxUSE_TIPWINDOW 1 + +// Each of the settings below corresponds to one wxWidgets control. They are +// all switched on by default but may be disabled if you are sure that your +// program (including any standard dialogs it can show!) doesn't need them and +// if you desperately want to save some space. If you use any of these you must +// set wxUSE_CONTROLS as well. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl +#define wxUSE_BANNERWINDOW 1 // wxBannerWindow +#define wxUSE_BUTTON 1 // wxButton +#define wxUSE_BMPBUTTON 1 // wxBitmapButton +#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl +#define wxUSE_CHECKBOX 1 // wxCheckBox +#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHOICE 1 // wxChoice +#define wxUSE_COLLPANE 1 // wxCollapsiblePane +#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl +#define wxUSE_COMBOBOX 1 // wxComboBox +#define wxUSE_COMMANDLINKBUTTON 1 // wxCommandLinkButton +#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl +#define wxUSE_DATEPICKCTRL 1 // wxDatePickerCtrl +#define wxUSE_DIRPICKERCTRL 1 // wxDirPickerCtrl +#define wxUSE_EDITABLELISTBOX 1 // wxEditableListBox +#define wxUSE_FILECTRL 1 // wxFileCtrl +#define wxUSE_FILEPICKERCTRL 1 // wxFilePickerCtrl +#define wxUSE_FONTPICKERCTRL 1 // wxFontPickerCtrl +#define wxUSE_GAUGE 1 // wxGauge +#define wxUSE_HEADERCTRL 1 // wxHeaderCtrl +#define wxUSE_HYPERLINKCTRL 1 // wxHyperlinkCtrl +#define wxUSE_LISTBOX 1 // wxListBox +#define wxUSE_LISTCTRL 1 // wxListCtrl +#define wxUSE_RADIOBOX 1 // wxRadioBox +#define wxUSE_RADIOBTN 1 // wxRadioButton +#define wxUSE_RICHMSGDLG 1 // wxRichMessageDialog +#define wxUSE_SCROLLBAR 1 // wxScrollBar +#define wxUSE_SEARCHCTRL 1 // wxSearchCtrl +#define wxUSE_SLIDER 1 // wxSlider +#define wxUSE_SPINBTN 1 // wxSpinButton +#define wxUSE_SPINCTRL 1 // wxSpinCtrl +#define wxUSE_STATBOX 1 // wxStaticBox +#define wxUSE_STATLINE 1 // wxStaticLine +#define wxUSE_STATTEXT 1 // wxStaticText +#define wxUSE_STATBMP 1 // wxStaticBitmap +#define wxUSE_TEXTCTRL 1 // wxTextCtrl +#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl +#define wxUSE_TOGGLEBTN 1 // requires wxButton +#define wxUSE_TREECTRL 1 // wxTreeCtrl +#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl + +// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR +// below either wxStatusBar95 or a generic wxStatusBar will be used. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STATUSBAR 1 + +// Two status bar implementations are available under Win32: the generic one +// or the wrapper around native control. For native look and feel the native +// version should be used. +// +// Default is 1 for the platforms where native status bar is supported. +// +// Recommended setting: 1 (there is no advantage in using the generic one) +#define wxUSE_NATIVE_STATUSBAR 1 + +// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar +// classes at all. Otherwise, use the native toolbar class unless +// wxUSE_TOOLBAR_NATIVE is 0. +// +// Default is 1 for all settings. +// +// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE. +#define wxUSE_TOOLBAR 1 +#define wxUSE_TOOLBAR_NATIVE 1 + +// wxNotebook is a control with several "tabs" located on one of its sides. It +// may be used to logically organise the data presented to the user instead of +// putting everything in one huge dialog. It replaces wxTabControl and related +// classes of wxWin 1.6x. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTEBOOK 1 + +// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_LISTBOOK 1 + +// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CHOICEBOOK 1 + +// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TREEBOOK 1 + +// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of +// tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLBOOK 1 + +// wxTaskBarIcon is a small notification icon shown in the system toolbar or +// dock. +// +// Default is 1. +// +// Recommended setting: 1 (but can be set to 0 if you don't need it) +#define wxUSE_TASKBARICON 1 + +// wxGrid class +// +// Default is 1, set to 0 to cut down compilation time and binaries size if you +// don't use it. +// +// Recommended setting: 1 +// +#define wxUSE_GRID 1 + +// wxMiniFrame class: a frame with narrow title bar +// +// Default is 1. +// +// Recommended setting: 1 (it doesn't cost almost anything) +#define wxUSE_MINIFRAME 1 + +// wxComboCtrl and related classes: combobox with custom popup window and +// not necessarily a listbox. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it +// it used by wxComboBox +#define wxUSE_COMBOCTRL 1 + +// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox +// items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0, except where it is +// needed as a base class for generic wxBitmapComboBox. +#define wxUSE_ODCOMBOBOX 1 + +// wxBitmapComboBox is a combobox that can have images in front of text items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 +#define wxUSE_BITMAPCOMBOBOX 1 + +// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items +// up and down in it. It is also used as part of wxRearrangeDialog. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 (currently used only by +// wxHeaderCtrl) +#define wxUSE_REARRANGECTRL 1 + +// ---------------------------------------------------------------------------- +// Miscellaneous GUI stuff +// ---------------------------------------------------------------------------- + +// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar) +#define wxUSE_ACCEL 1 + +// Use the standard art provider. The icons returned by this provider are +// embedded into the library as XPMs so disabling it reduces the library size +// somewhat but this should only be done if you use your own custom art +// provider returning the icons or never use any icons not provided by the +// native art provider (which might not be implemented at all for some +// platforms) or by the Tango icons provider (if it's not itself disabled +// below). +// +// Default is 1. +// +// Recommended setting: 1 unless you use your own custom art provider. +#define wxUSE_ARTPROVIDER_STD 1 + +// Use art provider providing Tango icons: this art provider has higher quality +// icons than the default ones using smaller size XPM icons without +// transparency but the embedded PNG icons add to the library size. +// +// Default is 1 under non-GTK ports. Under wxGTK the native art provider using +// the GTK+ stock icons replaces it so it is normally not necessary. +// +// Recommended setting: 1 but can be turned off to reduce the library size. +#define wxUSE_ARTPROVIDER_TANGO 1 + +// Hotkey support (currently Windows only) +#define wxUSE_HOTKEY 1 + +// Use wxCaret: a class implementing a "cursor" in a text control (called caret +// under Windows). +// +// Default is 1. +// +// Recommended setting: 1 (can be safely set to 0, not used by the library) +#define wxUSE_CARET 1 + +// Use wxDisplay class: it allows enumerating all displays on a system and +// their geometries as well as finding the display on which the given point or +// window lies. +// +// Default is 1. +// +// Recommended setting: 1 if you need it, can be safely set to 0 otherwise +#define wxUSE_DISPLAY 1 + +// Miscellaneous geometry code: needed for Canvas library +#define wxUSE_GEOMETRY 1 + +// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and +// wxListCtrl. +// +// Default is 1. +// +// Recommended setting: 1 (set it to 0 if you don't use any of the controls +// enumerated above, then this class is mostly useless too) +#define wxUSE_IMAGLIST 1 + +// Use wxInfoBar class. +// +// Default is 1. +// +// Recommended setting: 1 (but can be disabled without problems as nothing +// depends on it) +#define wxUSE_INFOBAR 1 + +// Use wxMenu, wxMenuBar, wxMenuItem. +// +// Default is 1. +// +// Recommended setting: 1 (can't be disabled under MSW) +#define wxUSE_MENUS 1 + +// Use wxNotificationMessage. +// +// wxNotificationMessage allows to show non-intrusive messages to the user +// using balloons, banners, popups or whatever is the appropriate method for +// the current platform. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTIFICATION_MESSAGE 1 + +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + +// wxRichToolTip is a customizable tooltip class which has more functionality +// than the stock (but native, unlike this class) wxToolTip. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely set to 0 if you don't need it) +#define wxUSE_RICHTOOLTIP 1 + +// Use wxSashWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SASH 1 + +// Use wxSplitterWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SPLITTER 1 + +// Use wxToolTip and wxWindow::Set/GetToolTip() methods. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLTIPS 1 + +// wxValidator class and related methods +#define wxUSE_VALIDATORS 1 + +// Use reference counted ID management: this means that wxWidgets will track +// the automatically allocated ids (those used when you use wxID_ANY when +// creating a window, menu or toolbar item &c) instead of just supposing that +// the program never runs out of them. This is mostly useful only under wxMSW +// where the total ids range is limited to SHRT_MIN..SHRT_MAX and where +// long-running programs can run into problems with ids reuse without this. On +// the other platforms, where the ids have the full int range, this shouldn't +// be necessary. +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif + +// ---------------------------------------------------------------------------- +// common dialogs +// ---------------------------------------------------------------------------- + +// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g. +// file selector, printer dialog). Switching this off also switches off the +// printing architecture and interactive wxPrinterDC. +// +// Default is 1 +// +// Recommended setting: 1 (unless it really doesn't work) +#define wxUSE_COMMON_DIALOGS 1 + +// wxBusyInfo displays window with message when app is busy. Works in same way +// as wxBusyCursor +#define wxUSE_BUSYINFO 1 + +// Use single/multiple choice dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_CHOICEDLG 1 + +// Use colour picker dialog +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_COLOURDLG 1 + +// wxDirDlg class for getting a directory name from user +#define wxUSE_DIRDLG 1 + +// TODO: setting to choose the generic or native one + +// Use file open/save dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in many places in the library itself) +#define wxUSE_FILEDLG 1 + +// Use find/replace dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely set to 0) +#define wxUSE_FINDREPLDLG 1 + +// Use font picker dialog +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_FONTDLG 1 + +// Use wxMessageDialog and wxMessageBox. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_MSGDLG 1 + +// progress dialog class for lengthy operations +#define wxUSE_PROGRESSDLG 1 + +// support for startup tips (wxShowTip &c) +#define wxUSE_STARTUP_TIPS 1 + +// text entry dialog and wxGetTextFromUser function +#define wxUSE_TEXTDLG 1 + +// number entry dialog +#define wxUSE_NUMBERDLG 1 + +// splash screen class +#define wxUSE_SPLASH 1 + +// wizards +#define wxUSE_WIZARDDLG 1 + +// Compile in wxAboutBox() function showing the standard "About" dialog. +// +// Default is 1 +// +// Recommended setting: 1 but can be set to 0 to save some space if you don't +// use this function +#define wxUSE_ABOUTDLG 1 + +// wxFileHistory class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FILE_HISTORY 1 + +// ---------------------------------------------------------------------------- +// Metafiles support +// ---------------------------------------------------------------------------- + +// Windows supports the graphics format known as metafile which is, though not +// portable, is widely used under Windows and so is supported by wxWin (under +// Windows only, of course). Win16 (Win3.1) used the so-called "Window +// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in +// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by +// default, WMFs will be used under Win16 and EMFs under Win32. This may be +// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting +// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile +// in any metafile related classes at all. +// +// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS. +// +// Recommended setting: default or 0 for everything for portable programs. +#define wxUSE_METAFILE 1 +#define wxUSE_ENH_METAFILE 1 +#define wxUSE_WIN_METAFILES_ALWAYS 0 + +// ---------------------------------------------------------------------------- +// Big GUI components +// ---------------------------------------------------------------------------- + +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + +// Set to 0 to disable document/view architecture +#define wxUSE_DOC_VIEW_ARCHITECTURE 1 + +// Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 1 + +// Set to 0 to disable print/preview architecture code +#define wxUSE_PRINTING_ARCHITECTURE 1 + +// wxHTML sublibrary allows to display HTML in wxWindow programs and much, +// much more. +// +// Default is 1. +// +// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a +// smaller library. +#define wxUSE_HTML 1 + +// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL +// headers and libraries to be able to compile the library with wxUSE_GLCANVAS +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). +// +// Default is 1 unless the compiler is known to ship without the necessary +// headers (Digital Mars) or the platform doesn't support OpenGL (Windows CE). +// +// Recommended setting: 1 if you intend to use OpenGL, can be safely set to 0 +// otherwise. +#define wxUSE_GLCANVAS 1 + +// wxRichTextCtrl allows editing of styled text. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 if you want compile a +// smaller library. +#define wxUSE_RICHTEXT 1 + +// ---------------------------------------------------------------------------- +// Data transfer +// ---------------------------------------------------------------------------- + +// Use wxClipboard class for clipboard copy/paste. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CLIPBOARD 1 + +// Use wxDataObject and related classes. Needed for clipboard and OLE drag and +// drop +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DATAOBJ 1 + +// Use wxDropTarget and wxDropSource classes for drag and drop (this is +// different from "built in" drag and drop in wxTreeCtrl which is always +// available). Requires wxUSE_DATAOBJ. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DRAG_AND_DROP 1 + +// Use wxAccessible for enhanced and customisable accessibility. +// Depends on wxUSE_OLE. +// +// Default is 0. +// +// Recommended setting (at present): 0 +#define wxUSE_ACCESSIBILITY 0 + +// ---------------------------------------------------------------------------- +// miscellaneous settings +// ---------------------------------------------------------------------------- + +// wxSingleInstanceChecker class allows to verify at startup if another program +// instance is running. +// +// Default is 1 +// +// Recommended setting: 1 (the class is tiny, disabling it won't save much +// space) +#define wxUSE_SNGLINST_CHECKER 1 + +#define wxUSE_DRAGIMAGE 1 + +#define wxUSE_IPC 1 + // 0 for no interprocess comms +#define wxUSE_HELP 1 + // 0 for no help facility + +// Should we use MS HTML help for wxHelpController? If disabled, neither +// wxCHMHelpController nor wxBestHelpController are available. +// +// Default is 1 under MSW, 0 is always used for the other platforms. +// +// Recommended setting: 1, only set to 0 if you have trouble compiling +// wxCHMHelpController (could be a problem with really ancient compilers) +#define wxUSE_MS_HTML_HELP 1 + + +// Use wxHTML-based help controller? +#define wxUSE_WXHTML_HELP 1 + +#define wxUSE_CONSTRAINTS 1 + // 0 for no window layout constraint system + +#define wxUSE_SPLINES 1 + // 0 for no splines + +#define wxUSE_MOUSEWHEEL 1 + // Include mouse wheel support + +// Compile wxUIActionSimulator class? +#define wxUSE_UIACTIONSIMULATOR 1 + +// ---------------------------------------------------------------------------- +// wxDC classes for various output formats +// ---------------------------------------------------------------------------- + +// Set to 1 for PostScript device context. +#define wxUSE_POSTSCRIPT 0 + +// Set to 1 to use font metric files in GetTextExtent +#define wxUSE_AFM_FOR_POSTSCRIPT 1 + +// Set to 1 to compile in support for wxSVGFileDC, a wxDC subclass which allows +// to create files in SVG (Scalable Vector Graphics) format. +#define wxUSE_SVG 1 + +// Should wxDC provide SetTransformMatrix() and related methods? +// +// Default is 1 but can be set to 0 if this functionality is not used. Notice +// that currently only wxMSW supports this so setting this to 0 doesn't change +// much for non-MSW platforms (although it will still save a few bytes +// probably). +// +// Recommended setting: 1. +#define wxUSE_DC_TRANSFORM_MATRIX 1 + +// ---------------------------------------------------------------------------- +// image format support +// ---------------------------------------------------------------------------- + +// wxImage supports many different image formats which can be configured at +// compile-time. BMP is always supported, others are optional and can be safely +// disabled if you don't plan to use images in such format sometimes saving +// substantial amount of code in the final library. +// +// Some formats require an extra library which is included in wxWin sources +// which is mentioned if it is the case. + +// Set to 1 for wxImage support (recommended). +#define wxUSE_IMAGE 1 + +// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB. +#define wxUSE_LIBPNG 1 + +// Set to 1 for JPEG format support (requires libjpeg) +#define wxUSE_LIBJPEG 1 + +// Set to 1 for TIFF format support (requires libtiff) +#define wxUSE_LIBTIFF 1 + +// Set to 1 for TGA format support (loading only) +#define wxUSE_TGA 1 + +// Set to 1 for GIF format support +#define wxUSE_GIF 1 + +// Set to 1 for PNM format support +#define wxUSE_PNM 1 + +// Set to 1 for PCX format support +#define wxUSE_PCX 1 + +// Set to 1 for IFF format support (Amiga format) +#define wxUSE_IFF 0 + +// Set to 1 for XPM format support +#define wxUSE_XPM 1 + +// Set to 1 for MS Icons and Cursors format support +#define wxUSE_ICO_CUR 1 + +// Set to 1 to compile in wxPalette class +#define wxUSE_PALETTE 1 + +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/setup_redirect.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/setup_redirect.h new file mode 100644 index 0000000000..7648c198ba --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/setup_redirect.h @@ -0,0 +1,17 @@ +/* + * wx/setup.h + * + * This file should not normally be used, except where makefiles + * have not yet been adjusted to take into account of the new scheme + * whereby a setup.h is created under the lib directory. + * + * Copyright: (c) Vadim Zeitlin + * Licence: wxWindows Licence + */ + +#ifdef __WXMSW__ +#include "wx/msw/setup.h" +#else +#error Please adjust your include path to pick up the wx/setup.h file under lib first. +#endif + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/sharedptr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sharedptr.h new file mode 100644 index 0000000000..a9b6442c09 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sharedptr.h @@ -0,0 +1,169 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/sharedptr.h +// Purpose: Shared pointer based on the counted_ptr<> template, which +// is in the public domain +// Author: Robert Roebling, Yonat Sharon +// Copyright: Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SHAREDPTR_H_ +#define _WX_SHAREDPTR_H_ + +#include "wx/defs.h" +#include "wx/atomic.h" + +// ---------------------------------------------------------------------------- +// wxSharedPtr: A smart pointer with non-intrusive reference counting. +// ---------------------------------------------------------------------------- + +template <class T> +class wxSharedPtr +{ +public: + typedef T element_type; + + wxEXPLICIT wxSharedPtr( T* ptr = NULL ) + : m_ref(NULL) + { + if (ptr) + m_ref = new reftype(ptr); + } + + template<typename Deleter> + wxEXPLICIT wxSharedPtr(T* ptr, Deleter d) + : m_ref(NULL) + { + if (ptr) + m_ref = new reftype_with_deleter<Deleter>(ptr, d); + } + + ~wxSharedPtr() { Release(); } + wxSharedPtr(const wxSharedPtr& tocopy) { Acquire(tocopy.m_ref); } + + wxSharedPtr& operator=( const wxSharedPtr& tocopy ) + { + if (this != &tocopy) + { + Release(); + Acquire(tocopy.m_ref); + } + return *this; + } + + wxSharedPtr& operator=( T* ptr ) + { + if (get() != ptr) + { + Release(); + if (ptr) + m_ref = new reftype(ptr); + } + return *this; + } + + // test for pointer validity: defining conversion to unspecified_bool_type + // and not more obvious bool to avoid implicit conversions to integer types + typedef T *(wxSharedPtr<T>::*unspecified_bool_type)() const; + operator unspecified_bool_type() const + { + if (m_ref && m_ref->m_ptr) + return &wxSharedPtr<T>::get; + else + return NULL; + } + + T& operator*() const + { + wxASSERT(m_ref != NULL); + wxASSERT(m_ref->m_ptr != NULL); + return *(m_ref->m_ptr); + } + + T* operator->() const + { + wxASSERT(m_ref != NULL); + wxASSERT(m_ref->m_ptr != NULL); + return m_ref->m_ptr; + } + + T* get() const + { + return m_ref ? m_ref->m_ptr : NULL; + } + + void reset( T* ptr = NULL ) + { + Release(); + if (ptr) + m_ref = new reftype(ptr); + } + + template<typename Deleter> + void reset(T* ptr, Deleter d) + { + Release(); + if (ptr) + m_ref = new reftype_with_deleter<Deleter>(ptr, d); + } + + bool unique() const { return (m_ref ? m_ref->m_count == 1 : true); } + long use_count() const { return (m_ref ? (long)m_ref->m_count : 0); } + +private: + + struct reftype + { + reftype(T* ptr) : m_ptr(ptr), m_count(1) {} + virtual ~reftype() {} + virtual void delete_ptr() { delete m_ptr; } + + T* m_ptr; + wxAtomicInt m_count; + }; + + template<typename Deleter> + struct reftype_with_deleter : public reftype + { + reftype_with_deleter(T* ptr, Deleter d) : reftype(ptr), m_deleter(d) {} + virtual void delete_ptr() { m_deleter(this->m_ptr); } + + Deleter m_deleter; + }; + + reftype* m_ref; + + void Acquire(reftype* ref) + { + m_ref = ref; + if (ref) + wxAtomicInc( ref->m_count ); + } + + void Release() + { + if (m_ref) + { + if (!wxAtomicDec( m_ref->m_count )) + { + m_ref->delete_ptr(); + delete m_ref; + } + m_ref = NULL; + } + } +}; + +template <class T, class U> +bool operator == (wxSharedPtr<T> const &a, wxSharedPtr<U> const &b ) +{ + return a.get() == b.get(); +} + +template <class T, class U> +bool operator != (wxSharedPtr<T> const &a, wxSharedPtr<U> const &b ) +{ + return a.get() != b.get(); +} + +#endif // _WX_SHAREDPTR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/simplebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/simplebook.h new file mode 100644 index 0000000000..5ca253ac10 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/simplebook.h @@ -0,0 +1,212 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/simplebook.h +// Purpose: wxBookCtrlBase-derived class without any controller. +// Author: Vadim Zeitlin +// Created: 2012-08-21 +// Copyright: (c) 2012 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SIMPLEBOOK_H_ +#define _WX_SIMPLEBOOK_H_ + +#include "wx/bookctrl.h" + +#if wxUSE_BOOKCTRL + +#include "wx/vector.h" + +// ---------------------------------------------------------------------------- +// wxSimplebook: a book control without any user-actionable controller. +// ---------------------------------------------------------------------------- + +// NB: This class doesn't use DLL export declaration as it's fully inline. + +class wxSimplebook : public wxBookCtrlBase +{ +public: + wxSimplebook() + { + Init(); + } + + wxSimplebook(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxEmptyString) + : wxBookCtrlBase(parent, winid, pos, size, style | wxBK_TOP, name) + { + Init(); + } + + + // Methods specific to this class. + + // A method allowing to add a new page without any label (which is unused + // by this control) and show it immediately. + bool ShowNewPage(wxWindow* page) + { + return AddPage(page, wxString(), true /* select it */); + } + + + // Set effect to use for showing/hiding pages. + void SetEffects(wxShowEffect showEffect, wxShowEffect hideEffect) + { + m_showEffect = showEffect; + m_hideEffect = hideEffect; + } + + // Or the same effect for both of them. + void SetEffect(wxShowEffect effect) + { + SetEffects(effect, effect); + } + + // And the same for time outs. + void SetEffectsTimeouts(unsigned showTimeout, unsigned hideTimeout) + { + m_showTimeout = showTimeout; + m_hideTimeout = hideTimeout; + } + + void SetEffectTimeout(unsigned timeout) + { + SetEffectsTimeouts(timeout, timeout); + } + + + // Implement base class pure virtual methods. + + // Page management + virtual bool InsertPage(size_t n, + wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE) + { + if ( !wxBookCtrlBase::InsertPage(n, page, text, bSelect, imageId) ) + return false; + + m_pageTexts.insert(m_pageTexts.begin() + n, text); + + if ( !DoSetSelectionAfterInsertion(n, bSelect) ) + page->Hide(); + + return true; + } + + virtual int SetSelection(size_t n) + { + return DoSetSelection(n, SetSelection_SendEvent); + } + + virtual int ChangeSelection(size_t n) + { + return DoSetSelection(n); + } + + // Neither labels nor images are supported but we still store the labels + // just in case the user code attaches some importance to them. + virtual bool SetPageText(size_t n, const wxString& strText) + { + wxCHECK_MSG( n < GetPageCount(), false, wxS("Invalid page") ); + + m_pageTexts[n] = strText; + + return true; + } + + virtual wxString GetPageText(size_t n) const + { + wxCHECK_MSG( n < GetPageCount(), wxString(), wxS("Invalid page") ); + + return m_pageTexts[n]; + } + + virtual bool SetPageImage(size_t WXUNUSED(n), int WXUNUSED(imageId)) + { + return false; + } + + virtual int GetPageImage(size_t WXUNUSED(n)) const + { + return NO_IMAGE; + } + +protected: + virtual void UpdateSelectedPage(size_t newsel) + { + m_selection = (int)newsel; + } + + virtual wxBookCtrlEvent* CreatePageChangingEvent() const + { + return new wxBookCtrlEvent(wxEVT_BOOKCTRL_PAGE_CHANGING, + GetId()); + } + + virtual void MakeChangedEvent(wxBookCtrlEvent& event) + { + event.SetEventType(wxEVT_BOOKCTRL_PAGE_CHANGED); + } + + virtual wxWindow *DoRemovePage(size_t page) + { + wxWindow* const win = wxBookCtrlBase::DoRemovePage(page); + if ( win ) + { + m_pageTexts.erase(m_pageTexts.begin() + page); + + DoSetSelectionAfterRemoval(page); + } + + return win; + } + + virtual void DoSize() + { + wxWindow* const page = GetCurrentPage(); + if ( page ) + page->SetSize(GetPageRect()); + } + + virtual void DoShowPage(wxWindow* page, bool show) + { + if ( show ) + page->ShowWithEffect(m_showEffect, m_showTimeout); + else + page->HideWithEffect(m_hideEffect, m_hideTimeout); + } + +private: + void Init() + { + // We don't need any border as we don't have anything to separate the + // page contents from. + SetInternalBorder(0); + + // No effects by default. + m_showEffect = + m_hideEffect = wxSHOW_EFFECT_NONE; + + m_showTimeout = + m_hideTimeout = 0; + } + + wxVector<wxString> m_pageTexts; + + wxShowEffect m_showEffect, + m_hideEffect; + + unsigned m_showTimeout, + m_hideTimeout; + + wxDECLARE_NO_COPY_CLASS(wxSimplebook); +}; + +#endif // wxUSE_BOOKCTRL + +#endif // _WX_SIMPLEBOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/sizer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sizer.h new file mode 100644 index 0000000000..7d20b548c8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sizer.h @@ -0,0 +1,1315 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/sizer.h +// Purpose: provide wxSizer class for layout +// Author: Robert Roebling and Robin Dunn +// Modified by: Ron Lee, Vadim Zeitlin (wxSizerFlags) +// Created: +// Copyright: (c) Robin Dunn, Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WXSIZER_H__ +#define __WXSIZER_H__ + +#include "wx/defs.h" + +#include "wx/window.h" + +//--------------------------------------------------------------------------- +// classes +//--------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxBoxSizer; +class WXDLLIMPEXP_FWD_CORE wxSizerItem; +class WXDLLIMPEXP_FWD_CORE wxSizer; + +#ifndef wxUSE_BORDER_BY_DEFAULT + #ifdef __SMARTPHONE__ + // no borders by default on limited size screen + #define wxUSE_BORDER_BY_DEFAULT 0 + #else + #define wxUSE_BORDER_BY_DEFAULT 1 + #endif +#endif + +// ---------------------------------------------------------------------------- +// wxSizerFlags: flags used for an item in the sizer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSizerFlags +{ +public: + // construct the flags object initialized with the given proportion (0 by + // default) + wxSizerFlags(int proportion = 0) : m_proportion(proportion) + { + m_flags = 0; + m_borderInPixels = 0; + } + + // setters for all sizer flags, they all return the object itself so that + // calls to them can be chained + + wxSizerFlags& Proportion(int proportion) + { + m_proportion = proportion; + return *this; + } + + wxSizerFlags& Expand() + { + m_flags |= wxEXPAND; + return *this; + } + + // notice that Align() replaces the current alignment flags, use specific + // methods below such as Top(), Left() &c if you want to set just the + // vertical or horizontal alignment + wxSizerFlags& Align(int alignment) // combination of wxAlignment values + { + m_flags &= ~wxALIGN_MASK; + m_flags |= alignment; + + return *this; + } + + // some shortcuts for Align() + wxSizerFlags& Centre() { return Align(wxALIGN_CENTRE); } + wxSizerFlags& Center() { return Centre(); } + + wxSizerFlags& Top() + { + m_flags &= ~(wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL); + return *this; + } + + wxSizerFlags& Left() + { + m_flags &= ~(wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL); + return *this; + } + + wxSizerFlags& Right() + { + m_flags = (m_flags & ~wxALIGN_CENTRE_HORIZONTAL) | wxALIGN_RIGHT; + return *this; + } + + wxSizerFlags& Bottom() + { + m_flags = (m_flags & ~wxALIGN_CENTRE_VERTICAL) | wxALIGN_BOTTOM; + return *this; + } + + + // default border size used by Border() below + static int GetDefaultBorder() + { +#if wxUSE_BORDER_BY_DEFAULT + #ifdef __WXGTK20__ + // GNOME HIG says to use 6px as the base unit: + // http://library.gnome.org/devel/hig-book/stable/design-window.html.en + return 6; + #else + // FIXME: default border size shouldn't be hardcoded and at the very + // least they should depend on the current font size + return 5; + #endif +#else + return 0; +#endif + } + + + wxSizerFlags& Border(int direction, int borderInPixels) + { + wxCHECK_MSG( !(direction & ~wxALL), *this, + wxS("direction must be a combination of wxDirection ") + wxS("enum values.") ); + + m_flags &= ~wxALL; + m_flags |= direction; + + m_borderInPixels = borderInPixels; + + return *this; + } + + wxSizerFlags& Border(int direction = wxALL) + { +#if wxUSE_BORDER_BY_DEFAULT + return Border(direction, GetDefaultBorder()); +#else + // no borders by default on limited size screen + wxUnusedVar(direction); + + return *this; +#endif + } + + wxSizerFlags& DoubleBorder(int direction = wxALL) + { +#if wxUSE_BORDER_BY_DEFAULT + return Border(direction, 2*GetDefaultBorder()); +#else + wxUnusedVar(direction); + + return *this; +#endif + } + + wxSizerFlags& TripleBorder(int direction = wxALL) + { +#if wxUSE_BORDER_BY_DEFAULT + return Border(direction, 3*GetDefaultBorder()); +#else + wxUnusedVar(direction); + + return *this; +#endif + } + + wxSizerFlags& HorzBorder() + { +#if wxUSE_BORDER_BY_DEFAULT + return Border(wxLEFT | wxRIGHT, GetDefaultBorder()); +#else + return *this; +#endif + } + + wxSizerFlags& DoubleHorzBorder() + { +#if wxUSE_BORDER_BY_DEFAULT + return Border(wxLEFT | wxRIGHT, 2*GetDefaultBorder()); +#else + return *this; +#endif + } + + // setters for the others flags + wxSizerFlags& Shaped() + { + m_flags |= wxSHAPED; + + return *this; + } + + wxSizerFlags& FixedMinSize() + { + m_flags |= wxFIXED_MINSIZE; + + return *this; + } + + // makes the item ignore window's visibility status + wxSizerFlags& ReserveSpaceEvenIfHidden() + { + m_flags |= wxRESERVE_SPACE_EVEN_IF_HIDDEN; + return *this; + } + + // accessors for wxSizer only + int GetProportion() const { return m_proportion; } + int GetFlags() const { return m_flags; } + int GetBorderInPixels() const { return m_borderInPixels; } + +private: + int m_proportion; + int m_flags; + int m_borderInPixels; +}; + + +// ---------------------------------------------------------------------------- +// wxSizerSpacer: used by wxSizerItem to represent a spacer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSizerSpacer +{ +public: + wxSizerSpacer(const wxSize& size) : m_size(size), m_isShown(true) { } + + void SetSize(const wxSize& size) { m_size = size; } + const wxSize& GetSize() const { return m_size; } + + void Show(bool show) { m_isShown = show; } + bool IsShown() const { return m_isShown; } + +private: + // the size, in pixel + wxSize m_size; + + // is the spacer currently shown? + bool m_isShown; +}; + +// ---------------------------------------------------------------------------- +// wxSizerItem +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSizerItem : public wxObject +{ +public: + // window + wxSizerItem( wxWindow *window, + int proportion=0, + int flag=0, + int border=0, + wxObject* userData=NULL ); + + // window with flags + wxSizerItem(wxWindow *window, const wxSizerFlags& flags) + { + Init(flags); + + DoSetWindow(window); + } + + // subsizer + wxSizerItem( wxSizer *sizer, + int proportion=0, + int flag=0, + int border=0, + wxObject* userData=NULL ); + + // sizer with flags + wxSizerItem(wxSizer *sizer, const wxSizerFlags& flags) + { + Init(flags); + + DoSetSizer(sizer); + } + + // spacer + wxSizerItem( int width, + int height, + int proportion=0, + int flag=0, + int border=0, + wxObject* userData=NULL); + + // spacer with flags + wxSizerItem(int width, int height, const wxSizerFlags& flags) + { + Init(flags); + + DoSetSpacer(wxSize(width, height)); + } + + wxSizerItem(); + virtual ~wxSizerItem(); + + virtual void DeleteWindows(); + + // Enable deleting the SizerItem without destroying the contained sizer. + void DetachSizer() { m_sizer = NULL; } + + virtual wxSize GetSize() const; + virtual wxSize CalcMin(); + virtual void SetDimension( const wxPoint& pos, const wxSize& size ); + + wxSize GetMinSize() const + { return m_minSize; } + wxSize GetMinSizeWithBorder() const; + + wxSize GetMaxSize() const + { return IsWindow() ? m_window->GetMaxSize() : wxDefaultSize; } + wxSize GetMaxSizeWithBorder() const; + + void SetMinSize(const wxSize& size) + { + if ( IsWindow() ) + m_window->SetMinSize(size); + m_minSize = size; + } + void SetMinSize( int x, int y ) + { SetMinSize(wxSize(x, y)); } + void SetInitSize( int x, int y ) + { SetMinSize(wxSize(x, y)); } + + // if either of dimensions is zero, ratio is assumed to be 1 + // to avoid "divide by zero" errors + void SetRatio(int width, int height) + { m_ratio = (width && height) ? ((float) width / (float) height) : 1; } + void SetRatio(const wxSize& size) + { SetRatio(size.x, size.y); } + void SetRatio(float ratio) + { m_ratio = ratio; } + float GetRatio() const + { return m_ratio; } + + virtual wxRect GetRect() { return m_rect; } + + // set a sizer item id (different from a window id, all sizer items, + // including spacers, can have an associated id) + void SetId(int id) { m_id = id; } + int GetId() const { return m_id; } + + bool IsWindow() const { return m_kind == Item_Window; } + bool IsSizer() const { return m_kind == Item_Sizer; } + bool IsSpacer() const { return m_kind == Item_Spacer; } + +#if WXWIN_COMPATIBILITY_2_6 + // Deprecated in 2.6, use {G,S}etProportion instead. + wxDEPRECATED( void SetOption( int option ) ); + wxDEPRECATED( int GetOption() const ); +#endif // WXWIN_COMPATIBILITY_2_6 + + void SetProportion( int proportion ) + { m_proportion = proportion; } + int GetProportion() const + { return m_proportion; } + void SetFlag( int flag ) + { m_flag = flag; } + int GetFlag() const + { return m_flag; } + void SetBorder( int border ) + { m_border = border; } + int GetBorder() const + { return m_border; } + + wxWindow *GetWindow() const + { return m_kind == Item_Window ? m_window : NULL; } + wxSizer *GetSizer() const + { return m_kind == Item_Sizer ? m_sizer : NULL; } + wxSize GetSpacer() const; + + // This function behaves obviously for the windows and spacers but for the + // sizers it returns true if any sizer element is shown and only returns + // false if all of them are hidden. Also, it always returns true if + // wxRESERVE_SPACE_EVEN_IF_HIDDEN flag was used. + bool IsShown() const; + + void Show(bool show); + + void SetUserData(wxObject* userData) + { delete m_userData; m_userData = userData; } + wxObject* GetUserData() const + { return m_userData; } + wxPoint GetPosition() const + { return m_pos; } + + // Called once the first component of an item has been decided. This is + // used in algorithms that depend on knowing the size in one direction + // before the min size in the other direction can be known. + // Returns true if it made use of the information (and min size was changed). + bool InformFirstDirection( int direction, int size, int availableOtherDir=-1 ); + + // these functions delete the current contents of the item if it's a sizer + // or a spacer but not if it is a window + void AssignWindow(wxWindow *window) + { + Free(); + DoSetWindow(window); + } + + void AssignSizer(wxSizer *sizer) + { + Free(); + DoSetSizer(sizer); + } + + void AssignSpacer(const wxSize& size) + { + Free(); + DoSetSpacer(size); + } + + void AssignSpacer(int w, int h) { AssignSpacer(wxSize(w, h)); } + +#if WXWIN_COMPATIBILITY_2_8 + // these functions do not free the old sizer/spacer and so can easily + // provoke the memory leaks and so shouldn't be used, use Assign() instead + wxDEPRECATED( void SetWindow(wxWindow *window) ); + wxDEPRECATED( void SetSizer(wxSizer *sizer) ); + wxDEPRECATED( void SetSpacer(const wxSize& size) ); + wxDEPRECATED( void SetSpacer(int width, int height) ); +#endif // WXWIN_COMPATIBILITY_2_8 + +protected: + // common part of several ctors + void Init() { m_userData = NULL; m_kind = Item_None; } + + // common part of ctors taking wxSizerFlags + void Init(const wxSizerFlags& flags); + + // free current contents + void Free(); + + // common parts of Set/AssignXXX() + void DoSetWindow(wxWindow *window); + void DoSetSizer(wxSizer *sizer); + void DoSetSpacer(const wxSize& size); + + // Add the border specified for this item to the given size + // if it's != wxDefaultSize, just return wxDefaultSize otherwise. + wxSize AddBorderToSize(const wxSize& size) const; + + // discriminated union: depending on m_kind one of the fields is valid + enum + { + Item_None, + Item_Window, + Item_Sizer, + Item_Spacer, + Item_Max + } m_kind; + union + { + wxWindow *m_window; + wxSizer *m_sizer; + wxSizerSpacer *m_spacer; + }; + + wxPoint m_pos; + wxSize m_minSize; + int m_proportion; + int m_border; + int m_flag; + int m_id; + + // on screen rectangle of this item (not including borders) + wxRect m_rect; + + // Aspect ratio can always be calculated from m_size, + // but this would cause precision loss when the window + // is shrunk. It is safer to preserve the initial value. + float m_ratio; + + wxObject *m_userData; + +private: + DECLARE_CLASS(wxSizerItem) + wxDECLARE_NO_COPY_CLASS(wxSizerItem); +}; + +WX_DECLARE_EXPORTED_LIST( wxSizerItem, wxSizerItemList ); + + +//--------------------------------------------------------------------------- +// wxSizer +//--------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSizer: public wxObject, public wxClientDataContainer +{ +public: + wxSizer() { m_containingWindow = NULL; } + virtual ~wxSizer(); + + // methods for adding elements to the sizer: there are Add/Insert/Prepend + // overloads for each of window/sizer/spacer/wxSizerItem + wxSizerItem* Add(wxWindow *window, + int proportion = 0, + int flag = 0, + int border = 0, + wxObject* userData = NULL); + wxSizerItem* Add(wxSizer *sizer, + int proportion = 0, + int flag = 0, + int border = 0, + wxObject* userData = NULL); + wxSizerItem* Add(int width, + int height, + int proportion = 0, + int flag = 0, + int border = 0, + wxObject* userData = NULL); + wxSizerItem* Add( wxWindow *window, const wxSizerFlags& flags); + wxSizerItem* Add( wxSizer *sizer, const wxSizerFlags& flags); + wxSizerItem* Add( int width, int height, const wxSizerFlags& flags); + wxSizerItem* Add( wxSizerItem *item); + + virtual wxSizerItem *AddSpacer(int size); + wxSizerItem* AddStretchSpacer(int prop = 1); + + wxSizerItem* Insert(size_t index, + wxWindow *window, + int proportion = 0, + int flag = 0, + int border = 0, + wxObject* userData = NULL); + wxSizerItem* Insert(size_t index, + wxSizer *sizer, + int proportion = 0, + int flag = 0, + int border = 0, + wxObject* userData = NULL); + wxSizerItem* Insert(size_t index, + int width, + int height, + int proportion = 0, + int flag = 0, + int border = 0, + wxObject* userData = NULL); + wxSizerItem* Insert(size_t index, + wxWindow *window, + const wxSizerFlags& flags); + wxSizerItem* Insert(size_t index, + wxSizer *sizer, + const wxSizerFlags& flags); + wxSizerItem* Insert(size_t index, + int width, + int height, + const wxSizerFlags& flags); + + // NB: do _not_ override this function in the derived classes, this one is + // virtual for compatibility reasons only to allow old code overriding + // it to continue to work, override DoInsert() instead in the new code + virtual wxSizerItem* Insert(size_t index, wxSizerItem *item); + + wxSizerItem* InsertSpacer(size_t index, int size); + wxSizerItem* InsertStretchSpacer(size_t index, int prop = 1); + + wxSizerItem* Prepend(wxWindow *window, + int proportion = 0, + int flag = 0, + int border = 0, + wxObject* userData = NULL); + wxSizerItem* Prepend(wxSizer *sizer, + int proportion = 0, + int flag = 0, + int border = 0, + wxObject* userData = NULL); + wxSizerItem* Prepend(int width, + int height, + int proportion = 0, + int flag = 0, + int border = 0, + wxObject* userData = NULL); + wxSizerItem* Prepend(wxWindow *window, const wxSizerFlags& flags); + wxSizerItem* Prepend(wxSizer *sizer, const wxSizerFlags& flags); + wxSizerItem* Prepend(int width, int height, const wxSizerFlags& flags); + wxSizerItem* Prepend(wxSizerItem *item); + + wxSizerItem* PrependSpacer(int size); + wxSizerItem* PrependStretchSpacer(int prop = 1); + + // set (or possibly unset if window is NULL) or get the window this sizer + // is used in + void SetContainingWindow(wxWindow *window); + wxWindow *GetContainingWindow() const { return m_containingWindow; } + +#if WXWIN_COMPATIBILITY_2_6 + // Deprecated in 2.6 since historically it does not delete the window, + // use Detach instead. + wxDEPRECATED( virtual bool Remove( wxWindow *window ) ); +#endif // WXWIN_COMPATIBILITY_2_6 + + virtual bool Remove( wxSizer *sizer ); + virtual bool Remove( int index ); + + virtual bool Detach( wxWindow *window ); + virtual bool Detach( wxSizer *sizer ); + virtual bool Detach( int index ); + + virtual bool Replace( wxWindow *oldwin, wxWindow *newwin, bool recursive = false ); + virtual bool Replace( wxSizer *oldsz, wxSizer *newsz, bool recursive = false ); + virtual bool Replace( size_t index, wxSizerItem *newitem ); + + virtual void Clear( bool delete_windows = false ); + virtual void DeleteWindows(); + + // Inform sizer about the first direction that has been decided (by parent item) + // Returns true if it made use of the information (and recalculated min size) + virtual bool InformFirstDirection( int WXUNUSED(direction), int WXUNUSED(size), int WXUNUSED(availableOtherDir) ) + { return false; } + + void SetMinSize( int width, int height ) + { DoSetMinSize( width, height ); } + void SetMinSize( const wxSize& size ) + { DoSetMinSize( size.x, size.y ); } + + // Searches recursively + bool SetItemMinSize( wxWindow *window, int width, int height ) + { return DoSetItemMinSize( window, width, height ); } + bool SetItemMinSize( wxWindow *window, const wxSize& size ) + { return DoSetItemMinSize( window, size.x, size.y ); } + + // Searches recursively + bool SetItemMinSize( wxSizer *sizer, int width, int height ) + { return DoSetItemMinSize( sizer, width, height ); } + bool SetItemMinSize( wxSizer *sizer, const wxSize& size ) + { return DoSetItemMinSize( sizer, size.x, size.y ); } + + bool SetItemMinSize( size_t index, int width, int height ) + { return DoSetItemMinSize( index, width, height ); } + bool SetItemMinSize( size_t index, const wxSize& size ) + { return DoSetItemMinSize( index, size.x, size.y ); } + + wxSize GetSize() const + { return m_size; } + wxPoint GetPosition() const + { return m_position; } + + // Calculate the minimal size or return m_minSize if bigger. + wxSize GetMinSize(); + + // These virtual functions are used by the layout algorithm: first + // CalcMin() is called to calculate the minimal size of the sizer and + // prepare for laying it out and then RecalcSizes() is called to really + // update all the sizer items + virtual wxSize CalcMin() = 0; + virtual void RecalcSizes() = 0; + + virtual void Layout(); + + wxSize ComputeFittingClientSize(wxWindow *window); + wxSize ComputeFittingWindowSize(wxWindow *window); + + wxSize Fit( wxWindow *window ); + void FitInside( wxWindow *window ); + void SetSizeHints( wxWindow *window ); +#if WXWIN_COMPATIBILITY_2_8 + // This only calls FitInside() since 2.9 + wxDEPRECATED( void SetVirtualSizeHints( wxWindow *window ) ); +#endif + + wxSizerItemList& GetChildren() + { return m_children; } + const wxSizerItemList& GetChildren() const + { return m_children; } + + void SetDimension(const wxPoint& pos, const wxSize& size) + { + m_position = pos; + m_size = size; + Layout(); + + // This call is required for wxWrapSizer to be able to calculate its + // minimal size correctly. + InformFirstDirection(wxHORIZONTAL, size.x, size.y); + } + void SetDimension(int x, int y, int width, int height) + { SetDimension(wxPoint(x, y), wxSize(width, height)); } + + size_t GetItemCount() const { return m_children.GetCount(); } + bool IsEmpty() const { return m_children.IsEmpty(); } + + wxSizerItem* GetItem( wxWindow *window, bool recursive = false ); + wxSizerItem* GetItem( wxSizer *sizer, bool recursive = false ); + wxSizerItem* GetItem( size_t index ); + wxSizerItem* GetItemById( int id, bool recursive = false ); + + // Manage whether individual scene items are considered + // in the layout calculations or not. + bool Show( wxWindow *window, bool show = true, bool recursive = false ); + bool Show( wxSizer *sizer, bool show = true, bool recursive = false ); + bool Show( size_t index, bool show = true ); + + bool Hide( wxSizer *sizer, bool recursive = false ) + { return Show( sizer, false, recursive ); } + bool Hide( wxWindow *window, bool recursive = false ) + { return Show( window, false, recursive ); } + bool Hide( size_t index ) + { return Show( index, false ); } + + bool IsShown( wxWindow *window ) const; + bool IsShown( wxSizer *sizer ) const; + bool IsShown( size_t index ) const; + + // Recursively call wxWindow::Show () on all sizer items. + virtual void ShowItems (bool show); + + void Show(bool show) { ShowItems(show); } + + // This is the ShowItems() counterpart and returns true if any of the sizer + // items are shown. + virtual bool AreAnyItemsShown() const; + +protected: + wxSize m_size; + wxSize m_minSize; + wxPoint m_position; + wxSizerItemList m_children; + + // the window this sizer is used in, can be NULL + wxWindow *m_containingWindow; + + wxSize GetMaxClientSize( wxWindow *window ) const; + wxSize GetMinClientSize( wxWindow *window ); + wxSize VirtualFitSize( wxWindow *window ); + + virtual void DoSetMinSize( int width, int height ); + virtual bool DoSetItemMinSize( wxWindow *window, int width, int height ); + virtual bool DoSetItemMinSize( wxSizer *sizer, int width, int height ); + virtual bool DoSetItemMinSize( size_t index, int width, int height ); + + // insert a new item into m_children at given index and return the item + // itself + virtual wxSizerItem* DoInsert(size_t index, wxSizerItem *item); + +private: + DECLARE_CLASS(wxSizer) +}; + +//--------------------------------------------------------------------------- +// wxGridSizer +//--------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGridSizer: public wxSizer +{ +public: + // ctors specifying the number of columns only: number of rows will be + // deduced automatically depending on the number of sizer elements + wxGridSizer( int cols, int vgap, int hgap ); + wxGridSizer( int cols, const wxSize& gap = wxSize(0, 0) ); + + // ctors specifying the number of rows and columns + wxGridSizer( int rows, int cols, int vgap, int hgap ); + wxGridSizer( int rows, int cols, const wxSize& gap ); + + virtual void RecalcSizes(); + virtual wxSize CalcMin(); + + void SetCols( int cols ) + { + wxASSERT_MSG( cols >= 0, "Number of columns must be non-negative"); + m_cols = cols; + } + + void SetRows( int rows ) + { + wxASSERT_MSG( rows >= 0, "Number of rows must be non-negative"); + m_rows = rows; + } + + void SetVGap( int gap ) { m_vgap = gap; } + void SetHGap( int gap ) { m_hgap = gap; } + int GetCols() const { return m_cols; } + int GetRows() const { return m_rows; } + int GetVGap() const { return m_vgap; } + int GetHGap() const { return m_hgap; } + + int GetEffectiveColsCount() const { return m_cols ? m_cols : CalcCols(); } + int GetEffectiveRowsCount() const { return m_rows ? m_rows : CalcRows(); } + + // return the number of total items and the number of columns and rows + // (for internal use only) + int CalcRowsCols(int& rows, int& cols) const; + +protected: + // the number of rows/columns in the sizer, if 0 then it is determined + // dynamically depending on the total number of items + int m_rows; + int m_cols; + + // gaps between rows and columns + int m_vgap; + int m_hgap; + + virtual wxSizerItem *DoInsert(size_t index, wxSizerItem *item); + + void SetItemBounds( wxSizerItem *item, int x, int y, int w, int h ); + + // returns the number of columns/rows needed for the current total number + // of children (and the fixed number of rows/columns) + int CalcCols() const + { + wxCHECK_MSG + ( + m_rows, 0, + "Can't calculate number of cols if number of rows is not specified" + ); + + return int(m_children.GetCount() + m_rows - 1) / m_rows; + } + + int CalcRows() const + { + wxCHECK_MSG + ( + m_cols, 0, + "Can't calculate number of cols if number of rows is not specified" + ); + + return int(m_children.GetCount() + m_cols - 1) / m_cols; + } + +private: + DECLARE_CLASS(wxGridSizer) +}; + +//--------------------------------------------------------------------------- +// wxFlexGridSizer +//--------------------------------------------------------------------------- + +// values which define the behaviour for resizing wxFlexGridSizer cells in the +// "non-flexible" direction +enum wxFlexSizerGrowMode +{ + // don't resize the cells in non-flexible direction at all + wxFLEX_GROWMODE_NONE, + + // uniformly resize only the specified ones (default) + wxFLEX_GROWMODE_SPECIFIED, + + // uniformly resize all cells + wxFLEX_GROWMODE_ALL +}; + +class WXDLLIMPEXP_CORE wxFlexGridSizer: public wxGridSizer +{ +public: + // ctors specifying the number of columns only: number of rows will be + // deduced automatically depending on the number of sizer elements + wxFlexGridSizer( int cols, int vgap, int hgap ); + wxFlexGridSizer( int cols, const wxSize& gap = wxSize(0, 0) ); + + // ctors specifying the number of rows and columns + wxFlexGridSizer( int rows, int cols, int vgap, int hgap ); + wxFlexGridSizer( int rows, int cols, const wxSize& gap ); + + // dtor + virtual ~wxFlexGridSizer(); + + // set the rows/columns which will grow (the others will remain of the + // constant initial size) + void AddGrowableRow( size_t idx, int proportion = 0 ); + void RemoveGrowableRow( size_t idx ); + void AddGrowableCol( size_t idx, int proportion = 0 ); + void RemoveGrowableCol( size_t idx ); + + bool IsRowGrowable( size_t idx ); + bool IsColGrowable( size_t idx ); + + // the sizer cells may grow in both directions, not grow at all or only + // grow in one direction but not the other + + // the direction may be wxVERTICAL, wxHORIZONTAL or wxBOTH (default) + void SetFlexibleDirection(int direction) { m_flexDirection = direction; } + int GetFlexibleDirection() const { return m_flexDirection; } + + // note that the grow mode only applies to the direction which is not + // flexible + void SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode) { m_growMode = mode; } + wxFlexSizerGrowMode GetNonFlexibleGrowMode() const { return m_growMode; } + + // Read-only access to the row heights and col widths arrays + const wxArrayInt& GetRowHeights() const { return m_rowHeights; } + const wxArrayInt& GetColWidths() const { return m_colWidths; } + + // implementation + virtual void RecalcSizes(); + virtual wxSize CalcMin(); + +protected: + void AdjustForFlexDirection(); + void AdjustForGrowables(const wxSize& sz); + void FindWidthsAndHeights(int nrows, int ncols); + + // the heights/widths of all rows/columns + wxArrayInt m_rowHeights, + m_colWidths; + + // indices of the growable columns and rows + wxArrayInt m_growableRows, + m_growableCols; + + // proportion values of the corresponding growable rows and columns + wxArrayInt m_growableRowsProportions, + m_growableColsProportions; + + // parameters describing whether the growable cells should be resized in + // both directions or only one + int m_flexDirection; + wxFlexSizerGrowMode m_growMode; + + // saves CalcMin result to optimize RecalcSizes + wxSize m_calculatedMinSize; + +private: + DECLARE_CLASS(wxFlexGridSizer) + wxDECLARE_NO_COPY_CLASS(wxFlexGridSizer); +}; + +//--------------------------------------------------------------------------- +// wxBoxSizer +//--------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBoxSizer: public wxSizer +{ +public: + wxBoxSizer(int orient) + { + m_orient = orient; + m_totalProportion = 0; + + wxASSERT_MSG( m_orient == wxHORIZONTAL || m_orient == wxVERTICAL, + wxT("invalid value for wxBoxSizer orientation") ); + } + + virtual wxSizerItem *AddSpacer(int size); + + int GetOrientation() const { return m_orient; } + + bool IsVertical() const { return m_orient == wxVERTICAL; } + + void SetOrientation(int orient) { m_orient = orient; } + + // implementation of our resizing logic + virtual wxSize CalcMin(); + virtual void RecalcSizes(); + +protected: + // helpers for our code: this returns the component of the given wxSize in + // the direction of the sizer and in the other direction, respectively + int GetSizeInMajorDir(const wxSize& sz) const + { + return m_orient == wxHORIZONTAL ? sz.x : sz.y; + } + + int& SizeInMajorDir(wxSize& sz) + { + return m_orient == wxHORIZONTAL ? sz.x : sz.y; + } + + int& PosInMajorDir(wxPoint& pt) + { + return m_orient == wxHORIZONTAL ? pt.x : pt.y; + } + + int GetSizeInMinorDir(const wxSize& sz) const + { + return m_orient == wxHORIZONTAL ? sz.y : sz.x; + } + + int& SizeInMinorDir(wxSize& sz) + { + return m_orient == wxHORIZONTAL ? sz.y : sz.x; + } + + int& PosInMinorDir(wxPoint& pt) + { + return m_orient == wxHORIZONTAL ? pt.y : pt.x; + } + + // another helper: creates wxSize from major and minor components + wxSize SizeFromMajorMinor(int major, int minor) const + { + if ( m_orient == wxHORIZONTAL ) + { + return wxSize(major, minor); + } + else // wxVERTICAL + { + return wxSize(minor, major); + } + } + + + // either wxHORIZONTAL or wxVERTICAL + int m_orient; + + // the sum of proportion of all of our elements + int m_totalProportion; + + // the minimal size needed for this sizer as calculated by the last call to + // our CalcMin() + wxSize m_minSize; + +private: + DECLARE_CLASS(wxBoxSizer) +}; + +//--------------------------------------------------------------------------- +// wxStaticBoxSizer +//--------------------------------------------------------------------------- + +#if wxUSE_STATBOX + +class WXDLLIMPEXP_FWD_CORE wxStaticBox; + +class WXDLLIMPEXP_CORE wxStaticBoxSizer: public wxBoxSizer +{ +public: + wxStaticBoxSizer(wxStaticBox *box, int orient); + wxStaticBoxSizer(int orient, wxWindow *win, const wxString& label = wxEmptyString); + virtual ~wxStaticBoxSizer(); + + void RecalcSizes(); + wxSize CalcMin(); + + wxStaticBox *GetStaticBox() const + { return m_staticBox; } + + // override to hide/show the static box as well + virtual void ShowItems (bool show); + virtual bool AreAnyItemsShown() const; + + virtual bool Detach( wxWindow *window ); + virtual bool Detach( wxSizer *sizer ) { return wxBoxSizer::Detach(sizer); } + virtual bool Detach( int index ) { return wxBoxSizer::Detach(index); } + +protected: + wxStaticBox *m_staticBox; + +private: + DECLARE_CLASS(wxStaticBoxSizer) + wxDECLARE_NO_COPY_CLASS(wxStaticBoxSizer); +}; + +#endif // wxUSE_STATBOX + +//--------------------------------------------------------------------------- +// wxStdDialogButtonSizer +//--------------------------------------------------------------------------- + +#if wxUSE_BUTTON + +class WXDLLIMPEXP_CORE wxStdDialogButtonSizer: public wxBoxSizer +{ +public: + // Constructor just creates a new wxBoxSizer, not much else. + // Box sizer orientation is automatically determined here: + // vertical for PDAs, horizontal for everything else? + wxStdDialogButtonSizer(); + + // Checks button ID against system IDs and sets one of the pointers below + // to this button. Does not do any sizer-related things here. + void AddButton(wxButton *button); + + // Use these if no standard ID can/should be used + void SetAffirmativeButton( wxButton *button ); + void SetNegativeButton( wxButton *button ); + void SetCancelButton( wxButton *button ); + + // All platform-specific code here, checks which buttons exist and add + // them to the sizer accordingly. + // Note - one potential hack on Mac we could use here, + // if m_buttonAffirmative is wxID_SAVE then ensure wxID_SAVE + // is set to _("Save") and m_buttonNegative is set to _("Don't Save") + // I wouldn't add any other hacks like that into here, + // but this one I can see being useful. + void Realize(); + + wxButton *GetAffirmativeButton() const { return m_buttonAffirmative; } + wxButton *GetApplyButton() const { return m_buttonApply; } + wxButton *GetNegativeButton() const { return m_buttonNegative; } + wxButton *GetCancelButton() const { return m_buttonCancel; } + wxButton *GetHelpButton() const { return m_buttonHelp; } + +protected: + wxButton *m_buttonAffirmative; // wxID_OK, wxID_YES, wxID_SAVE go here + wxButton *m_buttonApply; // wxID_APPLY + wxButton *m_buttonNegative; // wxID_NO + wxButton *m_buttonCancel; // wxID_CANCEL, wxID_CLOSE + wxButton *m_buttonHelp; // wxID_HELP, wxID_CONTEXT_HELP + +private: + DECLARE_CLASS(wxStdDialogButtonSizer) + wxDECLARE_NO_COPY_CLASS(wxStdDialogButtonSizer); +}; + +#endif // wxUSE_BUTTON + + +// ---------------------------------------------------------------------------- +// inline functions implementation +// ---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_8 + +inline void wxSizerItem::SetWindow(wxWindow *window) +{ + DoSetWindow(window); +} + +inline void wxSizerItem::SetSizer(wxSizer *sizer) +{ + DoSetSizer(sizer); +} + +inline void wxSizerItem::SetSpacer(const wxSize& size) +{ + DoSetSpacer(size); +} + +inline void wxSizerItem::SetSpacer(int width, int height) +{ + DoSetSpacer(wxSize(width, height)); +} + +#endif // WXWIN_COMPATIBILITY_2_8 + +inline wxSizerItem* +wxSizer::Insert(size_t index, wxSizerItem *item) +{ + return DoInsert(index, item); +} + + +inline wxSizerItem* +wxSizer::Add( wxSizerItem *item ) +{ + return Insert( m_children.GetCount(), item ); +} + +inline wxSizerItem* +wxSizer::Add( wxWindow *window, int proportion, int flag, int border, wxObject* userData ) +{ + return Add( new wxSizerItem( window, proportion, flag, border, userData ) ); +} + +inline wxSizerItem* +wxSizer::Add( wxSizer *sizer, int proportion, int flag, int border, wxObject* userData ) +{ + return Add( new wxSizerItem( sizer, proportion, flag, border, userData ) ); +} + +inline wxSizerItem* +wxSizer::Add( int width, int height, int proportion, int flag, int border, wxObject* userData ) +{ + return Add( new wxSizerItem( width, height, proportion, flag, border, userData ) ); +} + +inline wxSizerItem* +wxSizer::Add( wxWindow *window, const wxSizerFlags& flags ) +{ + return Add( new wxSizerItem(window, flags) ); +} + +inline wxSizerItem* +wxSizer::Add( wxSizer *sizer, const wxSizerFlags& flags ) +{ + return Add( new wxSizerItem(sizer, flags) ); +} + +inline wxSizerItem* +wxSizer::Add( int width, int height, const wxSizerFlags& flags ) +{ + return Add( new wxSizerItem(width, height, flags) ); +} + +inline wxSizerItem* +wxSizer::AddSpacer(int size) +{ + return Add(size, size); +} + +inline wxSizerItem* +wxSizer::AddStretchSpacer(int prop) +{ + return Add(0, 0, prop); +} + +inline wxSizerItem* +wxSizer::Prepend( wxSizerItem *item ) +{ + return Insert( 0, item ); +} + +inline wxSizerItem* +wxSizer::Prepend( wxWindow *window, int proportion, int flag, int border, wxObject* userData ) +{ + return Prepend( new wxSizerItem( window, proportion, flag, border, userData ) ); +} + +inline wxSizerItem* +wxSizer::Prepend( wxSizer *sizer, int proportion, int flag, int border, wxObject* userData ) +{ + return Prepend( new wxSizerItem( sizer, proportion, flag, border, userData ) ); +} + +inline wxSizerItem* +wxSizer::Prepend( int width, int height, int proportion, int flag, int border, wxObject* userData ) +{ + return Prepend( new wxSizerItem( width, height, proportion, flag, border, userData ) ); +} + +inline wxSizerItem* +wxSizer::PrependSpacer(int size) +{ + return Prepend(size, size); +} + +inline wxSizerItem* +wxSizer::PrependStretchSpacer(int prop) +{ + return Prepend(0, 0, prop); +} + +inline wxSizerItem* +wxSizer::Prepend( wxWindow *window, const wxSizerFlags& flags ) +{ + return Prepend( new wxSizerItem(window, flags) ); +} + +inline wxSizerItem* +wxSizer::Prepend( wxSizer *sizer, const wxSizerFlags& flags ) +{ + return Prepend( new wxSizerItem(sizer, flags) ); +} + +inline wxSizerItem* +wxSizer::Prepend( int width, int height, const wxSizerFlags& flags ) +{ + return Prepend( new wxSizerItem(width, height, flags) ); +} + +inline wxSizerItem* +wxSizer::Insert( size_t index, + wxWindow *window, + int proportion, + int flag, + int border, + wxObject* userData ) +{ + return Insert( index, new wxSizerItem( window, proportion, flag, border, userData ) ); +} + +inline wxSizerItem* +wxSizer::Insert( size_t index, + wxSizer *sizer, + int proportion, + int flag, + int border, + wxObject* userData ) +{ + return Insert( index, new wxSizerItem( sizer, proportion, flag, border, userData ) ); +} + +inline wxSizerItem* +wxSizer::Insert( size_t index, + int width, + int height, + int proportion, + int flag, + int border, + wxObject* userData ) +{ + return Insert( index, new wxSizerItem( width, height, proportion, flag, border, userData ) ); +} + +inline wxSizerItem* +wxSizer::Insert( size_t index, wxWindow *window, const wxSizerFlags& flags ) +{ + return Insert( index, new wxSizerItem(window, flags) ); +} + +inline wxSizerItem* +wxSizer::Insert( size_t index, wxSizer *sizer, const wxSizerFlags& flags ) +{ + return Insert( index, new wxSizerItem(sizer, flags) ); +} + +inline wxSizerItem* +wxSizer::Insert( size_t index, int width, int height, const wxSizerFlags& flags ) +{ + return Insert( index, new wxSizerItem(width, height, flags) ); +} + +inline wxSizerItem* +wxSizer::InsertSpacer(size_t index, int size) +{ + return Insert(index, size, size); +} + +inline wxSizerItem* +wxSizer::InsertStretchSpacer(size_t index, int prop) +{ + return Insert(index, 0, 0, prop); +} + +#endif // __WXSIZER_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/slider.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/slider.h new file mode 100644 index 0000000000..e3ab597b0c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/slider.h @@ -0,0 +1,156 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/slider.h +// Purpose: wxSlider interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 09.02.01 +// Copyright: (c) 1996-2001 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SLIDER_H_BASE_ +#define _WX_SLIDER_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_SLIDER + +#include "wx/control.h" + +// ---------------------------------------------------------------------------- +// wxSlider flags +// ---------------------------------------------------------------------------- + +#define wxSL_HORIZONTAL wxHORIZONTAL /* 0x0004 */ +#define wxSL_VERTICAL wxVERTICAL /* 0x0008 */ + +#define wxSL_TICKS 0x0010 +#define wxSL_AUTOTICKS wxSL_TICKS // we don't support manual ticks +#define wxSL_LEFT 0x0040 +#define wxSL_TOP 0x0080 +#define wxSL_RIGHT 0x0100 +#define wxSL_BOTTOM 0x0200 +#define wxSL_BOTH 0x0400 +#define wxSL_SELRANGE 0x0800 +#define wxSL_INVERSE 0x1000 +#define wxSL_MIN_MAX_LABELS 0x2000 +#define wxSL_VALUE_LABEL 0x4000 +#define wxSL_LABELS (wxSL_MIN_MAX_LABELS|wxSL_VALUE_LABEL) + +#if WXWIN_COMPATIBILITY_2_6 + // obsolete + #define wxSL_NOTIFY_DRAG 0x0000 +#endif // WXWIN_COMPATIBILITY_2_6 + +extern WXDLLIMPEXP_DATA_CORE(const char) wxSliderNameStr[]; + +// ---------------------------------------------------------------------------- +// wxSliderBase: define wxSlider interface +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSliderBase : public wxControl +{ +public: + /* the ctor of the derived class should have the following form: + + wxSlider(wxWindow *parent, + wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr); + */ + wxSliderBase() { } + + // get/set the current slider value (should be in range) + virtual int GetValue() const = 0; + virtual void SetValue(int value) = 0; + + // retrieve/change the range + virtual void SetRange(int minValue, int maxValue) = 0; + virtual int GetMin() const = 0; + virtual int GetMax() const = 0; + void SetMin( int minValue ) { SetRange( minValue , GetMax() ) ; } + void SetMax( int maxValue ) { SetRange( GetMin() , maxValue ) ; } + + // the line/page size is the increment by which the slider moves when + // cursor arrow key/page up or down are pressed (clicking the mouse is like + // pressing PageUp/Down) and are by default set to 1 and 1/10 of the range + virtual void SetLineSize(int lineSize) = 0; + virtual void SetPageSize(int pageSize) = 0; + virtual int GetLineSize() const = 0; + virtual int GetPageSize() const = 0; + + // these methods get/set the length of the slider pointer in pixels + virtual void SetThumbLength(int lenPixels) = 0; + virtual int GetThumbLength() const = 0; + + // warning: most of subsequent methods are currently only implemented in + // wxMSW under Win95 and are silently ignored on other platforms + + void SetTickFreq(int freq) { DoSetTickFreq(freq); } + virtual int GetTickFreq() const { return 0; } + virtual void ClearTicks() { } + virtual void SetTick(int WXUNUSED(tickPos)) { } + + virtual void ClearSel() { } + virtual int GetSelEnd() const { return GetMin(); } + virtual int GetSelStart() const { return GetMax(); } + virtual void SetSelection(int WXUNUSED(min), int WXUNUSED(max)) { } + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_INLINE( void SetTickFreq(int freq, int), DoSetTickFreq(freq); ) +#endif + +protected: + // Platform-specific implementation of SetTickFreq + virtual void DoSetTickFreq(int WXUNUSED(freq)) { /* unsupported by default */ } + + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // adjust value according to wxSL_INVERSE style + virtual int ValueInvertOrNot(int value) const + { + if (HasFlag(wxSL_INVERSE)) + return (GetMax() + GetMin()) - value; + else + return value; + } + +private: + wxDECLARE_NO_COPY_CLASS(wxSliderBase); +}; + +// ---------------------------------------------------------------------------- +// include the real class declaration +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/slider.h" +#elif defined(__WXMSW__) + #include "wx/msw/slider.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/slider.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/slider.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/slider.h" +#elif defined(__WXMAC__) + #include "wx/osx/slider.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/slider.h" +#elif defined(__WXPM__) + #include "wx/os2/slider.h" +#endif + +#endif // wxUSE_SLIDER + +#endif + // _WX_SLIDER_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/snglinst.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/snglinst.h new file mode 100644 index 0000000000..61213a86cf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/snglinst.h @@ -0,0 +1,96 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/snglinst.h +// Purpose: wxSingleInstanceChecker can be used to restrict the number of +// simultaneously running copies of a program to one +// Author: Vadim Zeitlin +// Modified by: +// Created: 08.06.01 +// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SNGLINST_H_ +#define _WX_SNGLINST_H_ + +#if wxUSE_SNGLINST_CHECKER + +#include "wx/app.h" +#include "wx/utils.h" + +// ---------------------------------------------------------------------------- +// wxSingleInstanceChecker +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxSingleInstanceChecker +{ +public: + // default ctor, use Create() after it + wxSingleInstanceChecker() { Init(); } + + // like Create() but no error checking (dangerous!) + wxSingleInstanceChecker(const wxString& name, + const wxString& path = wxEmptyString) + { + Init(); + Create(name, path); + } + + // notice that calling Create() is optional now, if you don't do it before + // calling IsAnotherRunning(), CreateDefault() is used automatically + // + // name it is used as the mutex name under Win32 and the lock file name + // under Unix so it should be as unique as possible and must be non-empty + // + // path is optional and is ignored under Win32 and used as the directory to + // create the lock file in under Unix (default is wxGetHomeDir()) + // + // returns false if initialization failed, it doesn't mean that another + // instance is running - use IsAnotherRunning() to check it + bool Create(const wxString& name, const wxString& path = wxEmptyString); + + // use the default name, which is a combination of wxTheApp->GetAppName() + // and wxGetUserId() for mutex/lock file + // + // this is called implicitly by IsAnotherRunning() if the checker hadn't + // been created until then + bool CreateDefault() + { + wxCHECK_MSG( wxTheApp, false, "must have application instance" ); + return Create(wxTheApp->GetAppName() + '-' + wxGetUserId()); + } + + // is another copy of this program already running? + bool IsAnotherRunning() const + { + if ( !m_impl ) + { + if ( !const_cast<wxSingleInstanceChecker *>(this)->CreateDefault() ) + { + // if creation failed, return false as it's better to not + // prevent this instance from starting up if there is an error + return false; + } + } + + return DoIsAnotherRunning(); + } + + // dtor is not virtual, this class is not meant to be used polymorphically + ~wxSingleInstanceChecker(); + +private: + // common part of all ctors + void Init() { m_impl = NULL; } + + // do check if another instance is running, called only if m_impl != NULL + bool DoIsAnotherRunning() const; + + // the implementation details (platform specific) + class WXDLLIMPEXP_FWD_BASE wxSingleInstanceCheckerImpl *m_impl; + + wxDECLARE_NO_COPY_CLASS(wxSingleInstanceChecker); +}; + +#endif // wxUSE_SNGLINST_CHECKER + +#endif // _WX_SNGLINST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/socket.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/socket.h new file mode 100644 index 0000000000..35ff266216 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/socket.h @@ -0,0 +1,435 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/socket.h +// Purpose: Socket handling classes +// Authors: Guilhem Lavaux, Guillermo Rodriguez Garcia +// Modified by: +// Created: April 1997 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SOCKET_H_ +#define _WX_SOCKET_H_ + +#include "wx/defs.h" + +#if wxUSE_SOCKETS + +// --------------------------------------------------------------------------- +// wxSocket headers +// --------------------------------------------------------------------------- + +#include "wx/event.h" +#include "wx/sckaddr.h" +#include "wx/list.h" + +class wxSocketImpl; + +// ------------------------------------------------------------------------ +// Types and constants +// ------------------------------------------------------------------------ + +// Define the type of native sockets. +#if defined(__WINDOWS__) + // Although socket descriptors are still 32 bit values, even under Win64, + // the socket type is 64 bit there. + typedef wxUIntPtr wxSOCKET_T; +#else + typedef int wxSOCKET_T; +#endif + + +// Types of different socket notifications or events. +// +// NB: the values here should be consecutive and start with 0 as they are +// used to construct the wxSOCKET_XXX_FLAG bit mask values below +enum wxSocketNotify +{ + wxSOCKET_INPUT, + wxSOCKET_OUTPUT, + wxSOCKET_CONNECTION, + wxSOCKET_LOST +}; + +enum +{ + wxSOCKET_INPUT_FLAG = 1 << wxSOCKET_INPUT, + wxSOCKET_OUTPUT_FLAG = 1 << wxSOCKET_OUTPUT, + wxSOCKET_CONNECTION_FLAG = 1 << wxSOCKET_CONNECTION, + wxSOCKET_LOST_FLAG = 1 << wxSOCKET_LOST +}; + +// this is a combination of the bit masks defined above +typedef int wxSocketEventFlags; + +enum wxSocketError +{ + wxSOCKET_NOERROR = 0, + wxSOCKET_INVOP, + wxSOCKET_IOERR, + wxSOCKET_INVADDR, + wxSOCKET_INVSOCK, + wxSOCKET_NOHOST, + wxSOCKET_INVPORT, + wxSOCKET_WOULDBLOCK, + wxSOCKET_TIMEDOUT, + wxSOCKET_MEMERR, + wxSOCKET_OPTERR +}; + +// socket options/flags bit masks +enum +{ + wxSOCKET_NONE = 0x0000, + wxSOCKET_NOWAIT_READ = 0x0001, + wxSOCKET_NOWAIT_WRITE = 0x0002, + wxSOCKET_NOWAIT = wxSOCKET_NOWAIT_READ | wxSOCKET_NOWAIT_WRITE, + wxSOCKET_WAITALL_READ = 0x0004, + wxSOCKET_WAITALL_WRITE = 0x0008, + wxSOCKET_WAITALL = wxSOCKET_WAITALL_READ | wxSOCKET_WAITALL_WRITE, + wxSOCKET_BLOCK = 0x0010, + wxSOCKET_REUSEADDR = 0x0020, + wxSOCKET_BROADCAST = 0x0040, + wxSOCKET_NOBIND = 0x0080 +}; + +typedef int wxSocketFlags; + +// socket kind values (badly defined, don't use) +enum wxSocketType +{ + wxSOCKET_UNINIT, + wxSOCKET_CLIENT, + wxSOCKET_SERVER, + wxSOCKET_BASE, + wxSOCKET_DATAGRAM +}; + + +// event +class WXDLLIMPEXP_FWD_NET wxSocketEvent; +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_NET, wxEVT_SOCKET, wxSocketEvent); + +// -------------------------------------------------------------------------- +// wxSocketBase +// -------------------------------------------------------------------------- + +class WXDLLIMPEXP_NET wxSocketBase : public wxObject +{ +public: + // Public interface + // ---------------- + + // ctors and dtors + wxSocketBase(); + wxSocketBase(wxSocketFlags flags, wxSocketType type); + virtual ~wxSocketBase(); + void Init(); + bool Destroy(); + + // state + bool Ok() const { return IsOk(); } + bool IsOk() const { return m_impl != NULL; } + bool Error() const { return LastError() != wxSOCKET_NOERROR; } + bool IsClosed() const { return m_closed; } + bool IsConnected() const { return m_connected; } + bool IsData() { return WaitForRead(0, 0); } + bool IsDisconnected() const { return !IsConnected(); } + wxUint32 LastCount() const { return m_lcount; } + wxUint32 LastReadCount() const { return m_lcount_read; } + wxUint32 LastWriteCount() const { return m_lcount_write; } + wxSocketError LastError() const; + void SaveState(); + void RestoreState(); + + // addresses + virtual bool GetLocal(wxSockAddress& addr_man) const; + virtual bool GetPeer(wxSockAddress& addr_man) const; + virtual bool SetLocal(const wxIPV4address& local); + + // base IO + virtual bool Close(); + void ShutdownOutput(); + wxSocketBase& Discard(); + wxSocketBase& Peek(void* buffer, wxUint32 nbytes); + wxSocketBase& Read(void* buffer, wxUint32 nbytes); + wxSocketBase& ReadMsg(void *buffer, wxUint32 nbytes); + wxSocketBase& Unread(const void *buffer, wxUint32 nbytes); + wxSocketBase& Write(const void *buffer, wxUint32 nbytes); + wxSocketBase& WriteMsg(const void *buffer, wxUint32 nbytes); + + // all Wait() functions wait until their condition is satisfied or the + // timeout expires; if seconds == -1 (default) then m_timeout value is used + // + // it is also possible to call InterruptWait() to cancel any current Wait() + + // wait for anything at all to happen with this socket + bool Wait(long seconds = -1, long milliseconds = 0); + + // wait until we can read from or write to the socket without blocking + // (notice that this does not mean that the operation will succeed but only + // that it will return immediately) + bool WaitForRead(long seconds = -1, long milliseconds = 0); + bool WaitForWrite(long seconds = -1, long milliseconds = 0); + + // wait until the connection is terminated + bool WaitForLost(long seconds = -1, long milliseconds = 0); + + void InterruptWait() { m_interrupt = true; } + + + wxSocketFlags GetFlags() const { return m_flags; } + void SetFlags(wxSocketFlags flags); + virtual void SetTimeout(long seconds); + long GetTimeout() const { return m_timeout; } + + bool GetOption(int level, int optname, void *optval, int *optlen); + bool SetOption(int level, int optname, const void *optval, int optlen); + wxUint32 GetLastIOSize() const { return m_lcount; } + wxUint32 GetLastIOReadSize() const { return m_lcount_read; } + wxUint32 GetLastIOWriteSize() const { return m_lcount_write; } + + // event handling + void *GetClientData() const { return m_clientData; } + void SetClientData(void *data) { m_clientData = data; } + void SetEventHandler(wxEvtHandler& handler, int id = wxID_ANY); + void SetNotify(wxSocketEventFlags flags); + void Notify(bool notify); + + // Get the underlying socket descriptor. + wxSOCKET_T GetSocket() const; + + // initialize/shutdown the sockets (done automatically so there is no need + // to call these functions usually) + // + // should always be called from the main thread only so one of the cases + // where they should indeed be called explicitly is when the first wxSocket + // object in the application is created in a different thread + static bool Initialize(); + static void Shutdown(); + + // check if wxSocket had been already initialized + // + // notice that this function should be only called from the main thread as + // otherwise it is inherently unsafe because Initialize/Shutdown() may be + // called concurrently with it in the main thread + static bool IsInitialized(); + + // Implementation from now on + // -------------------------- + + // do not use, should be private (called from wxSocketImpl only) + void OnRequest(wxSocketNotify notify); + + // do not use, not documented nor supported + bool IsNoWait() const { return ((m_flags & wxSOCKET_NOWAIT) != 0); } + wxSocketType GetType() const { return m_type; } + +private: + friend class wxSocketClient; + friend class wxSocketServer; + friend class wxDatagramSocket; + + // low level IO + wxUint32 DoRead(void* buffer, wxUint32 nbytes); + wxUint32 DoWrite(const void *buffer, wxUint32 nbytes); + + // wait until the given flags are set for this socket or the given timeout + // (or m_timeout) expires + // + // notice that wxSOCKET_LOST_FLAG is always taken into account and the + // function returns -1 if the connection was lost; otherwise it returns + // true if any of the events specified by flags argument happened or false + // if the timeout expired + int DoWait(long timeout, wxSocketEventFlags flags); + + // a helper calling DoWait() using the same convention as the public + // WaitForXXX() functions use, i.e. use our timeout if seconds == -1 or the + // specified timeout otherwise + int DoWait(long seconds, long milliseconds, wxSocketEventFlags flags); + + // another helper calling DoWait() using our m_timeout + int DoWaitWithTimeout(wxSocketEventFlags flags) + { + return DoWait(m_timeout*1000, flags); + } + + // pushback buffer + void Pushback(const void *buffer, wxUint32 size); + wxUint32 GetPushback(void *buffer, wxUint32 size, bool peek); + + // store the given error as the LastError() + void SetError(wxSocketError error); + +private: + // socket + wxSocketImpl *m_impl; // port-specific implementation + wxSocketType m_type; // wxSocket type + + // state + wxSocketFlags m_flags; // wxSocket flags + bool m_connected; // connected? + bool m_establishing; // establishing connection? + bool m_reading; // busy reading? + bool m_writing; // busy writing? + bool m_closed; // was the other end closed? + wxUint32 m_lcount; // last IO transaction size + wxUint32 m_lcount_read; // last IO transaction size of Read() direction. + wxUint32 m_lcount_write; // last IO transaction size of Write() direction. + unsigned long m_timeout; // IO timeout value in seconds + // (TODO: remove, wxSocketImpl has it too) + wxList m_states; // stack of states (TODO: remove!) + bool m_interrupt; // interrupt ongoing wait operations? + bool m_beingDeleted; // marked for delayed deletion? + wxIPV4address m_localAddress; // bind to local address? + + // pushback buffer + void *m_unread; // pushback buffer + wxUint32 m_unrd_size; // pushback buffer size + wxUint32 m_unrd_cur; // pushback pointer (index into buffer) + + // events + int m_id; // socket id + wxEvtHandler *m_handler; // event handler + void *m_clientData; // client data for events + bool m_notify; // notify events to users? + wxSocketEventFlags m_eventmask; // which events to notify? + wxSocketEventFlags m_eventsgot; // collects events received in OnRequest() + + + friend class wxSocketReadGuard; + friend class wxSocketWriteGuard; + + wxDECLARE_NO_COPY_CLASS(wxSocketBase); + DECLARE_CLASS(wxSocketBase) +}; + + +// -------------------------------------------------------------------------- +// wxSocketServer +// -------------------------------------------------------------------------- + +class WXDLLIMPEXP_NET wxSocketServer : public wxSocketBase +{ +public: + wxSocketServer(const wxSockAddress& addr, + wxSocketFlags flags = wxSOCKET_NONE); + + wxSocketBase* Accept(bool wait = true); + bool AcceptWith(wxSocketBase& socket, bool wait = true); + + bool WaitForAccept(long seconds = -1, long milliseconds = 0); + + wxDECLARE_NO_COPY_CLASS(wxSocketServer); + DECLARE_CLASS(wxSocketServer) +}; + + +// -------------------------------------------------------------------------- +// wxSocketClient +// -------------------------------------------------------------------------- + +class WXDLLIMPEXP_NET wxSocketClient : public wxSocketBase +{ +public: + wxSocketClient(wxSocketFlags flags = wxSOCKET_NONE); + + virtual bool Connect(const wxSockAddress& addr, bool wait = true); + bool Connect(const wxSockAddress& addr, + const wxSockAddress& local, + bool wait = true); + + bool WaitOnConnect(long seconds = -1, long milliseconds = 0); + + // Sets initial socket buffer sizes using the SO_SNDBUF and SO_RCVBUF + // options before calling connect (either one can be -1 to leave it + // unchanged) + void SetInitialSocketBuffers(int recv, int send) + { + m_initialRecvBufferSize = recv; + m_initialSendBufferSize = send; + } + +private: + virtual bool DoConnect(const wxSockAddress& addr, + const wxSockAddress* local, + bool wait = true); + + // buffer sizes, -1 if unset and defaults should be used + int m_initialRecvBufferSize; + int m_initialSendBufferSize; + + wxDECLARE_NO_COPY_CLASS(wxSocketClient); + DECLARE_CLASS(wxSocketClient) +}; + + +// -------------------------------------------------------------------------- +// wxDatagramSocket +// -------------------------------------------------------------------------- + +// WARNING: still in alpha stage + +class WXDLLIMPEXP_NET wxDatagramSocket : public wxSocketBase +{ +public: + wxDatagramSocket(const wxSockAddress& addr, + wxSocketFlags flags = wxSOCKET_NONE); + + wxDatagramSocket& RecvFrom(wxSockAddress& addr, + void *buf, + wxUint32 nBytes); + wxDatagramSocket& SendTo(const wxSockAddress& addr, + const void* buf, + wxUint32 nBytes); + + /* TODO: + bool Connect(wxSockAddress& addr); + */ + +private: + wxDECLARE_NO_COPY_CLASS(wxDatagramSocket); + DECLARE_CLASS(wxDatagramSocket) +}; + + +// -------------------------------------------------------------------------- +// wxSocketEvent +// -------------------------------------------------------------------------- + +class WXDLLIMPEXP_NET wxSocketEvent : public wxEvent +{ +public: + wxSocketEvent(int id = 0) + : wxEvent(id, wxEVT_SOCKET) + { + } + + wxSocketNotify GetSocketEvent() const { return m_event; } + wxSocketBase *GetSocket() const + { return (wxSocketBase *) GetEventObject(); } + void *GetClientData() const { return m_clientData; } + + virtual wxEvent *Clone() const { return new wxSocketEvent(*this); } + virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_SOCKET; } + +public: + wxSocketNotify m_event; + void *m_clientData; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSocketEvent) +}; + + +typedef void (wxEvtHandler::*wxSocketEventFunction)(wxSocketEvent&); + +#define wxSocketEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxSocketEventFunction, func) + +#define EVT_SOCKET(id, func) \ + wx__DECLARE_EVT1(wxEVT_SOCKET, id, wxSocketEventHandler(func)) + +#endif // wxUSE_SOCKETS + +#endif // _WX_SOCKET_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/sound.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sound.h new file mode 100644 index 0000000000..b81a11cb46 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sound.h @@ -0,0 +1,81 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/sound.h +// Purpose: wxSoundBase class +// Author: Vaclav Slavik +// Modified by: +// Created: 2004/02/01 +// Copyright: (c) 2004, Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SOUND_H_BASE_ +#define _WX_SOUND_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_SOUND + +#include "wx/object.h" + +// ---------------------------------------------------------------------------- +// wxSoundBase: common wxSound code and interface +// ---------------------------------------------------------------------------- + +// Flags for wxSound::Play + +// NB: We can't use enum with some compilers, because they keep reporting +// nonexistent ambiguities between Play(unsigned) and static Play(const +// wxString&, unsigned). +#define wxSOUND_SYNC ((unsigned)0) +#define wxSOUND_ASYNC ((unsigned)1) +#define wxSOUND_LOOP ((unsigned)2) + +// Base class for wxSound implementations +class WXDLLIMPEXP_ADV wxSoundBase : public wxObject +{ +public: + // Play the sound: + bool Play(unsigned flags = wxSOUND_ASYNC) const + { + wxASSERT_MSG( (flags & wxSOUND_LOOP) == 0 || + (flags & wxSOUND_ASYNC) != 0, + wxT("sound can only be looped asynchronously") ); + return DoPlay(flags); + } + + // Plays sound from filename: + static bool Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC); + +protected: + virtual bool DoPlay(unsigned flags) const = 0; +}; + +// ---------------------------------------------------------------------------- +// wxSound class implementation +// ---------------------------------------------------------------------------- + +#if defined(__WINDOWS__) + #include "wx/msw/sound.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/sound.h" +#elif defined(__WXMAC__) + #include "wx/osx/sound.h" +#elif defined(__WXPM__) + #include "wx/os2/sound.h" +#elif defined(__UNIX__) + #include "wx/unix/sound.h" +#endif + +// ---------------------------------------------------------------------------- +// wxSoundBase methods +// ---------------------------------------------------------------------------- + +inline bool wxSoundBase::Play(const wxString& filename, unsigned flags) +{ + wxSound snd(filename); + return snd.IsOk() ? snd.Play(flags) : false; +} + +#endif // wxUSE_SOUND + +#endif // _WX_SOUND_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/spinbutt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/spinbutt.h new file mode 100644 index 0000000000..cb11e29833 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/spinbutt.h @@ -0,0 +1,142 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/spinbutt.h +// Purpose: wxSpinButtonBase class +// Author: Julian Smart, Vadim Zeitlin +// Modified by: +// Created: 23.07.99 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SPINBUTT_H_BASE_ +#define _WX_SPINBUTT_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_SPINBTN + +#include "wx/control.h" +#include "wx/event.h" +#include "wx/range.h" + +#define wxSPIN_BUTTON_NAME wxT("wxSpinButton") + +// ---------------------------------------------------------------------------- +// The wxSpinButton is like a small scrollbar than is often placed next +// to a text control. +// +// Styles: +// 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 WXDLLIMPEXP_CORE wxSpinButtonBase : public wxControl +{ +public: + // ctor initializes the range with the default (0..100) values + wxSpinButtonBase() { m_min = 0; m_max = 100; } + + // accessors + virtual int GetValue() const = 0; + virtual int GetMin() const { return m_min; } + virtual int GetMax() const { return m_max; } + wxRange GetRange() const { return wxRange( GetMin(), GetMax() );} + + // operations + virtual void SetValue(int val) = 0; + virtual void SetMin(int minVal) { SetRange ( minVal , m_max ) ; } + virtual void SetMax(int maxVal) { SetRange ( m_min , maxVal ) ; } + virtual void SetRange(int minVal, int maxVal) + { + m_min = minVal; + m_max = maxVal; + } + void SetRange( const wxRange& range) { SetRange( range.GetMin(), range.GetMax()); } + + // is this spin button vertically oriented? + bool IsVertical() const { return (m_windowStyle & wxSP_VERTICAL) != 0; } + +protected: + // the range value + int m_min; + int m_max; + + wxDECLARE_NO_COPY_CLASS(wxSpinButtonBase); +}; + +// ---------------------------------------------------------------------------- +// include the declaration of the real class +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/spinbutt.h" +#elif defined(__WXMSW__) + #include "wx/msw/spinbutt.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/spinbutt.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/spinbutt.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/spinbutt.h" +#elif defined(__WXMAC__) + #include "wx/osx/spinbutt.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/spinbutt.h" +#elif defined(__WXPM__) + #include "wx/os2/spinbutt.h" +#endif + +// ---------------------------------------------------------------------------- +// the wxSpinButton event +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinEvent : public wxNotifyEvent +{ +public: + wxSpinEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) + : wxNotifyEvent(commandType, winid) + { + } + + wxSpinEvent(const wxSpinEvent& event) : wxNotifyEvent(event) {} + + // get the current value of the control + int GetValue() const { return m_commandInt; } + void SetValue(int value) { m_commandInt = value; } + + int GetPosition() const { return m_commandInt; } + void SetPosition(int pos) { m_commandInt = pos; } + + virtual wxEvent *Clone() const { return new wxSpinEvent(*this); } + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSpinEvent) +}; + +typedef void (wxEvtHandler::*wxSpinEventFunction)(wxSpinEvent&); + +#define wxSpinEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxSpinEventFunction, func) + +// macros for handling spin events: notice that we must use the real values of +// the event type constants and not their references (wxEVT_SPIN[_UP/DOWN]) +// here as otherwise the event tables could end up with non-initialized +// (because of undefined initialization order of the globals defined in +// different translation units) references in them +#define EVT_SPIN_UP(winid, func) \ + wx__DECLARE_EVT1(wxEVT_SPIN_UP, winid, wxSpinEventHandler(func)) +#define EVT_SPIN_DOWN(winid, func) \ + wx__DECLARE_EVT1(wxEVT_SPIN_DOWN, winid, wxSpinEventHandler(func)) +#define EVT_SPIN(winid, func) \ + wx__DECLARE_EVT1(wxEVT_SPIN, winid, wxSpinEventHandler(func)) + +#endif // wxUSE_SPINBTN + +#endif + // _WX_SPINBUTT_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/spinctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/spinctrl.h new file mode 100644 index 0000000000..7a7b3a4bd9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/spinctrl.h @@ -0,0 +1,155 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/spinctrl.h +// Purpose: wxSpinCtrlBase class +// Author: Vadim Zeitlin +// Modified by: +// Created: 22.07.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SPINCTRL_H_ +#define _WX_SPINCTRL_H_ + +#include "wx/defs.h" + +#if wxUSE_SPINCTRL + +#include "wx/spinbutt.h" // should make wxSpinEvent visible to the app + +// Events +class WXDLLIMPEXP_FWD_CORE wxSpinDoubleEvent; + +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SPINCTRL, wxSpinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SPINCTRLDOUBLE, wxSpinDoubleEvent); + +// ---------------------------------------------------------------------------- +// A spin ctrl is a text control with a spin button which is usually used to +// prompt the user for a numeric input. +// There are two kinds for number types T=integer or T=double. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinCtrlBase : public wxControl +{ +public: + wxSpinCtrlBase() {} + + // accessor functions that derived classes are expected to have + // T GetValue() const + // T GetMin() const + // T GetMax() const + // T GetIncrement() const + virtual bool GetSnapToTicks() const = 0; + // unsigned GetDigits() const - wxSpinCtrlDouble only + + // operation functions that derived classes are expected to have + virtual void SetValue(const wxString& value) = 0; + // void SetValue(T val) + // void SetRange(T minVal, T maxVal) + // void SetIncrement(T inc) + virtual void SetSnapToTicks(bool snap_to_ticks) = 0; + // void SetDigits(unsigned digits) - wxSpinCtrlDouble only + + // The base for numbers display, e.g. 10 or 16. + virtual int GetBase() const = 0; + virtual bool SetBase(int base) = 0; + + // Select text in the textctrl + virtual void SetSelection(long from, long to) = 0; + +private: + wxDECLARE_NO_COPY_CLASS(wxSpinCtrlBase); +}; + +// ---------------------------------------------------------------------------- +// wxSpinDoubleEvent - a wxSpinEvent for double valued controls +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSpinDoubleEvent : public wxNotifyEvent +{ +public: + wxSpinDoubleEvent(wxEventType commandType = wxEVT_NULL, int winid = 0, + double value = 0) + : wxNotifyEvent(commandType, winid), m_value(value) + { + } + + wxSpinDoubleEvent(const wxSpinDoubleEvent& event) + : wxNotifyEvent(event), m_value(event.GetValue()) + { + } + + double GetValue() const { return m_value; } + void SetValue(double value) { m_value = value; } + + virtual wxEvent *Clone() const { return new wxSpinDoubleEvent(*this); } + +protected: + double m_value; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSpinDoubleEvent) +}; + +// ---------------------------------------------------------------------------- +// wxSpinDoubleEvent event type, see also wxSpinEvent in wx/spinbutt.h +// ---------------------------------------------------------------------------- + +typedef void (wxEvtHandler::*wxSpinDoubleEventFunction)(wxSpinDoubleEvent&); + +#define wxSpinDoubleEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxSpinDoubleEventFunction, func) + +// macros for handling spinctrl events + +#define EVT_SPINCTRL(id, fn) \ + wx__DECLARE_EVT1(wxEVT_SPINCTRL, id, wxSpinEventHandler(fn)) + +#define EVT_SPINCTRLDOUBLE(id, fn) \ + wx__DECLARE_EVT1(wxEVT_SPINCTRLDOUBLE, id, wxSpinDoubleEventHandler(fn)) + +// ---------------------------------------------------------------------------- +// include the platform-dependent class implementation +// ---------------------------------------------------------------------------- + +// we may have a native wxSpinCtrl implementation, native wxSpinCtrl and +// wxSpinCtrlDouble implementations or neither, define the appropriate symbols +// and include the generic version if necessary to provide the missing class(es) + +#if defined(__WXUNIVERSAL__) + // nothing, use generic controls +#elif defined(__WXMSW__) + #define wxHAS_NATIVE_SPINCTRL + #include "wx/msw/spinctrl.h" +#elif defined(__WXPM__) + #define wxHAS_NATIVE_SPINCTRL + #include "wx/os2/spinctrl.h" +#elif defined(__WXGTK20__) + #define wxHAS_NATIVE_SPINCTRL + #define wxHAS_NATIVE_SPINCTRLDOUBLE + #include "wx/gtk/spinctrl.h" +#elif defined(__WXGTK__) + #define wxHAS_NATIVE_SPINCTRL + #include "wx/gtk1/spinctrl.h" +#endif // platform + +#if !defined(wxHAS_NATIVE_SPINCTRL) || !defined(wxHAS_NATIVE_SPINCTRLDOUBLE) + #include "wx/generic/spinctlg.h" +#endif + +namespace wxPrivate +{ + +// This is an internal helper function currently used by all ports: return the +// string containing hexadecimal representation of the given number. +extern wxString wxSpinCtrlFormatAsHex(long val, long maxVal); + +} // namespace wxPrivate + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_SPINCTRL_UPDATED wxEVT_SPINCTRL +#define wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED wxEVT_SPINCTRLDOUBLE + +#endif // wxUSE_SPINCTRL + +#endif // _WX_SPINCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/splash.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/splash.h new file mode 100644 index 0000000000..e4fb0c21ee --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/splash.h @@ -0,0 +1,17 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/splash.h +// Purpose: Base header for wxSplashScreen +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SPLASH_H_BASE_ +#define _WX_SPLASH_H_BASE_ + +#include "wx/generic/splash.h" + +#endif + // _WX_SPLASH_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/splitter.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/splitter.h new file mode 100644 index 0000000000..f36d2923df --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/splitter.h @@ -0,0 +1,46 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/splitter.h +// Purpose: Base header for wxSplitterWindow +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SPLITTER_H_BASE_ +#define _WX_SPLITTER_H_BASE_ + +#include "wx/event.h" + +// ---------------------------------------------------------------------------- +// wxSplitterWindow flags +// ---------------------------------------------------------------------------- + +#define wxSP_NOBORDER 0x0000 +#define wxSP_THIN_SASH 0x0000 // NB: the default is 3D sash +#define wxSP_NOSASH 0x0010 +#define wxSP_PERMIT_UNSPLIT 0x0040 +#define wxSP_LIVE_UPDATE 0x0080 +#define wxSP_3DSASH 0x0100 +#define wxSP_3DBORDER 0x0200 +#define wxSP_NO_XP_THEME 0x0400 +#define wxSP_BORDER wxSP_3DBORDER +#define wxSP_3D (wxSP_3DBORDER | wxSP_3DSASH) + +#if WXWIN_COMPATIBILITY_2_6 + // obsolete styles, don't do anything + #define wxSP_SASH_AQUA 0 + #define wxSP_FULLSASH 0 +#endif // WXWIN_COMPATIBILITY_2_6 + +class WXDLLIMPEXP_FWD_CORE wxSplitterEvent; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_SASH_POS_CHANGED, wxSplitterEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_SASH_POS_CHANGING, wxSplitterEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_DOUBLECLICKED, wxSplitterEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_UNSPLIT, wxSplitterEvent ); + +#include "wx/generic/splitter.h" + +#endif // _WX_SPLITTER_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/srchctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/srchctrl.h new file mode 100644 index 0000000000..3ca462258c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/srchctrl.h @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/srchctrl.h +// Purpose: wxSearchCtrlBase class +// Author: Vince Harron +// Created: 2006-02-18 +// Copyright: (c) Vince Harron +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SEARCHCTRL_H_BASE_ +#define _WX_SEARCHCTRL_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_SEARCHCTRL + +#include "wx/textctrl.h" + +#if !defined(__WXUNIVERSAL__) && defined(__WXMAC__) + // search control was introduced in Mac OS X 10.3 Panther + #define wxUSE_NATIVE_SEARCH_CONTROL 1 + + #define wxSearchCtrlBaseBaseClass wxTextCtrl +#else + // no native version, use the generic one + #define wxUSE_NATIVE_SEARCH_CONTROL 0 + + #include "wx/compositewin.h" + #include "wx/containr.h" + + class WXDLLIMPEXP_CORE wxSearchCtrlBaseBaseClass + : public wxCompositeWindow< wxNavigationEnabled<wxControl> >, + public wxTextCtrlIface + { + }; +#endif + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_CORE(const char) wxSearchCtrlNameStr[]; + +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SEARCHCTRL_CANCEL_BTN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SEARCHCTRL_SEARCH_BTN, wxCommandEvent); + +// ---------------------------------------------------------------------------- +// a search ctrl is a text control with a search button and a cancel button +// it is based on the MacOSX 10.3 control HISearchFieldCreate +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSearchCtrlBase : public wxSearchCtrlBaseBaseClass +{ +public: + wxSearchCtrlBase() { } + virtual ~wxSearchCtrlBase() { } + + // search control +#if wxUSE_MENUS + virtual void SetMenu(wxMenu *menu) = 0; + virtual wxMenu *GetMenu() = 0; +#endif // wxUSE_MENUS + + // get/set options + virtual void ShowSearchButton( bool show ) = 0; + virtual bool IsSearchButtonVisible() const = 0; + + virtual void ShowCancelButton( bool show ) = 0; + virtual bool IsCancelButtonVisible() const = 0; + +private: + // implement wxTextEntry pure virtual method + virtual wxWindow *GetEditableWindow() { return this; } +}; + + +// include the platform-dependent class implementation +#if wxUSE_NATIVE_SEARCH_CONTROL + #if defined(__WXMAC__) + #include "wx/osx/srchctrl.h" + #endif +#else + #include "wx/generic/srchctlg.h" +#endif + +// ---------------------------------------------------------------------------- +// macros for handling search events +// ---------------------------------------------------------------------------- + +#define EVT_SEARCHCTRL_CANCEL_BTN(id, fn) \ + wx__DECLARE_EVT1(wxEVT_SEARCHCTRL_CANCEL_BTN, id, wxCommandEventHandler(fn)) + +#define EVT_SEARCHCTRL_SEARCH_BTN(id, fn) \ + wx__DECLARE_EVT1(wxEVT_SEARCHCTRL_SEARCH_BTN, id, wxCommandEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN wxEVT_SEARCHCTRL_CANCEL_BTN +#define wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN wxEVT_SEARCHCTRL_SEARCH_BTN + +#endif // wxUSE_SEARCHCTRL + +#endif // _WX_SEARCHCTRL_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/sstream.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sstream.h new file mode 100644 index 0000000000..b0b2290fbc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sstream.h @@ -0,0 +1,111 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/sstream.h +// Purpose: string-based streams +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-09-19 +// Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SSTREAM_H_ +#define _WX_SSTREAM_H_ + +#include "wx/stream.h" + +#if wxUSE_STREAMS + +// ---------------------------------------------------------------------------- +// wxStringInputStream is a stream reading from the given (fixed size) string +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStringInputStream : public wxInputStream +{ +public: + // ctor associates the stream with the given string which makes a copy of + // it + wxStringInputStream(const wxString& s); + + virtual wxFileOffset GetLength() const; + virtual bool IsSeekable() const { return true; } + +protected: + virtual wxFileOffset OnSysSeek(wxFileOffset ofs, wxSeekMode mode); + virtual wxFileOffset OnSysTell() const; + virtual size_t OnSysRead(void *buffer, size_t size); + +private: + // the string that was passed in the ctor + wxString m_str; + + // the buffer we're reading from + wxCharBuffer m_buf; + + // length of the buffer we're reading from + size_t m_len; + + // position in the stream in bytes, *not* in chars + size_t m_pos; + + wxDECLARE_NO_COPY_CLASS(wxStringInputStream); +}; + +// ---------------------------------------------------------------------------- +// wxStringOutputStream writes data to the given string, expanding it as needed +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStringOutputStream : public wxOutputStream +{ +public: + // The stream will write data either to the provided string or to an + // internal string which can be retrieved using GetString() + // + // Note that the conversion object should have the life time greater than + // this stream. + wxStringOutputStream(wxString *pString = NULL, + wxMBConv& conv = wxConvUTF8) + : m_conv(conv) +#if wxUSE_UNICODE + , m_unconv(0) +#endif // wxUSE_UNICODE + { + m_str = pString ? pString : &m_strInternal; + m_pos = m_str->length() / sizeof(wxChar); + } + + // get the string containing current output + const wxString& GetString() const { return *m_str; } + + virtual bool IsSeekable() const { return true; } + +protected: + virtual wxFileOffset OnSysTell() const; + virtual size_t OnSysWrite(const void *buffer, size_t size); + +private: + // internal string, not used if caller provided his own string + wxString m_strInternal; + + // pointer given by the caller or just pointer to m_strInternal + wxString *m_str; + + // position in the stream in bytes, *not* in chars + size_t m_pos; + + // converter to use: notice that with the default UTF-8 one the input + // stream must contain valid UTF-8 data, use wxConvISO8859_1 to work with + // arbitrary 8 bit data + wxMBConv& m_conv; + +#if wxUSE_UNICODE + // unconverted data from the last call to OnSysWrite() + wxMemoryBuffer m_unconv; +#endif // wxUSE_UNICODE + + wxDECLARE_NO_COPY_CLASS(wxStringOutputStream); +}; + +#endif // wxUSE_STREAMS + +#endif // _WX_SSTREAM_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stack.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stack.h new file mode 100644 index 0000000000..b4e8ed2f8a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stack.h @@ -0,0 +1,85 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/stack.h +// Purpose: STL stack clone +// Author: Lindsay Mathieson, Vadim Zeitlin +// Created: 30.07.2001 +// Copyright: (c) 2001 Lindsay Mathieson <lindsay@mathieson.org> (WX_DECLARE_STACK) +// 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STACK_H_ +#define _WX_STACK_H_ + +#include "wx/vector.h" + +#if wxUSE_STD_CONTAINERS + +#include <stack> +#define wxStack std::stack + +#else // !wxUSE_STD_CONTAINERS + +// Notice that unlike std::stack, wxStack currently always uses wxVector and +// can't be used with any other underlying container type. +// +// Another difference is that comparison operators between stacks are not +// implemented (but they should be, see 23.2.3.3 of ISO/IEC 14882:1998). + +template <typename T> +class wxStack +{ +public: + typedef wxVector<T> container_type; + typedef typename container_type::size_type size_type; + typedef typename container_type::value_type value_type; + + wxStack() { } + explicit wxStack(const container_type& cont) : m_cont(cont) { } + + // Default copy ctor, assignment operator and dtor are ok. + + + bool empty() const { return m_cont.empty(); } + size_type size() const { return m_cont.size(); } + + value_type& top() { return m_cont.back(); } + const value_type& top() const { return m_cont.back(); } + + void push(const value_type& val) { m_cont.push_back(val); } + void pop() { m_cont.pop_back(); } + +private: + container_type m_cont; +}; + +#endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS + + +// Deprecated macro-based class for compatibility only, don't use any more. +#define WX_DECLARE_STACK(obj, cls) \ +class cls : public wxVector<obj> \ +{\ +public:\ + void push(const obj& o)\ + {\ + push_back(o); \ + };\ +\ + void pop()\ + {\ + pop_back(); \ + };\ +\ + obj& top()\ + {\ + return at(size() - 1);\ + };\ + const obj& top() const\ + {\ + return at(size() - 1); \ + };\ +} + +#endif // _WX_STACK_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stackwalk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stackwalk.h new file mode 100644 index 0000000000..1133d6ef7c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stackwalk.h @@ -0,0 +1,159 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/stackwalk.h +// Purpose: wxStackWalker and related classes, common part +// Author: Vadim Zeitlin +// Modified by: +// Created: 2005-01-07 +// Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STACKWALK_H_ +#define _WX_STACKWALK_H_ + +#include "wx/defs.h" + +#if wxUSE_STACKWALKER + +class WXDLLIMPEXP_FWD_BASE wxStackFrame; + +#define wxSTACKWALKER_MAX_DEPTH (200) + +// ---------------------------------------------------------------------------- +// wxStackFrame: a single stack level +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStackFrameBase +{ +private: + // put this inline function here so that it is defined before use + wxStackFrameBase *ConstCast() const + { return const_cast<wxStackFrameBase *>(this); } + +public: + wxStackFrameBase(size_t level, void *address = NULL) + { + m_level = level; + + m_line = + m_offset = 0; + + m_address = address; + } + + // get the level of this frame (deepest/innermost one is 0) + size_t GetLevel() const { return m_level; } + + // return the address of this frame + void *GetAddress() const { return m_address; } + + + // return the unmangled (if possible) name of the function containing this + // frame + wxString GetName() const { ConstCast()->OnGetName(); return m_name; } + + // return the instruction pointer offset from the start of the function + size_t GetOffset() const { ConstCast()->OnGetName(); return m_offset; } + + // get the module this function belongs to (not always available) + wxString GetModule() const { ConstCast()->OnGetName(); return m_module; } + + + // return true if we have the filename and line number for this frame + bool HasSourceLocation() const { return !GetFileName().empty(); } + + // return the name of the file containing this frame, empty if + // unavailable (typically because debug info is missing) + wxString GetFileName() const + { ConstCast()->OnGetLocation(); return m_filename; } + + // return the line number of this frame, 0 if unavailable + size_t GetLine() const { ConstCast()->OnGetLocation(); return m_line; } + + + // return the number of parameters of this function (may return 0 if we + // can't retrieve the parameters info even although the function does have + // parameters) + virtual size_t GetParamCount() const { return 0; } + + // get the name, type and value (in text form) of the given parameter + // + // any pointer may be NULL + // + // return true if at least some values could be retrieved + virtual bool GetParam(size_t WXUNUSED(n), + wxString * WXUNUSED(type), + wxString * WXUNUSED(name), + wxString * WXUNUSED(value)) const + { + return false; + } + + + // although this class is not supposed to be used polymorphically, give it + // a virtual dtor to silence compiler warnings + virtual ~wxStackFrameBase() { } + +protected: + // hooks for derived classes to initialize some fields on demand + virtual void OnGetName() { } + virtual void OnGetLocation() { } + + + // fields are protected, not private, so that OnGetXXX() could modify them + // directly + size_t m_level; + + wxString m_name, + m_module, + m_filename; + + size_t m_line; + + void *m_address; + size_t m_offset; +}; + +// ---------------------------------------------------------------------------- +// wxStackWalker: class for enumerating stack frames +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStackWalkerBase +{ +public: + // ctor does nothing, use Walk() to walk the stack + wxStackWalkerBase() { } + + // dtor does nothing neither but should be virtual + virtual ~wxStackWalkerBase() { } + + // enumerate stack frames from the current location, skipping the initial + // number of them (this can be useful when Walk() is called from some known + // location and you don't want to see the first few frames anyhow; also + // notice that Walk() frame itself is not included if skip >= 1) + virtual void Walk(size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH) = 0; + +#if wxUSE_ON_FATAL_EXCEPTION + // enumerate stack frames from the location of uncaught exception + // + // this version can only be called from wxApp::OnFatalException() + virtual void WalkFromException(size_t maxDepth = wxSTACKWALKER_MAX_DEPTH) = 0; +#endif // wxUSE_ON_FATAL_EXCEPTION + +protected: + // this function must be overrided to process the given frame + virtual void OnStackFrame(const wxStackFrame& frame) = 0; +}; + +#ifdef __WINDOWS__ + #include "wx/msw/stackwalk.h" +#elif defined(__UNIX__) + #include "wx/unix/stackwalk.h" +#else + #error "wxStackWalker is not supported, set wxUSE_STACKWALKER to 0" +#endif + +#endif // wxUSE_STACKWALKER + +#endif // _WX_STACKWALK_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/statbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/statbmp.h new file mode 100644 index 0000000000..e86f45b59c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/statbmp.h @@ -0,0 +1,76 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/statbmp.h +// Purpose: wxStaticBitmap class interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 25.08.00 +// Copyright: (c) 2000 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATBMP_H_BASE_ +#define _WX_STATBMP_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_STATBMP + +#include "wx/control.h" +#include "wx/bitmap.h" +#include "wx/icon.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBitmapNameStr[]; + +// a control showing an icon or a bitmap +class WXDLLIMPEXP_CORE wxStaticBitmapBase : public wxControl +{ +public: + wxStaticBitmapBase() { } + virtual ~wxStaticBitmapBase(); + + // our interface + virtual void SetIcon(const wxIcon& icon) = 0; + virtual void SetBitmap(const wxBitmap& bitmap) = 0; + virtual wxBitmap GetBitmap() const = 0; + virtual wxIcon GetIcon() const /* = 0 -- should be pure virtual */ + { + // stub it out here for now as not all ports implement it (but they + // should) + return wxIcon(); + } + + // overridden base class virtuals + virtual bool AcceptsFocus() const { return false; } + virtual bool HasTransparentBackground() { return true; } + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + virtual wxSize DoGetBestSize() const; + + wxDECLARE_NO_COPY_CLASS(wxStaticBitmapBase); +}; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/statbmp.h" +#elif defined(__WXMSW__) + #include "wx/msw/statbmp.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/statbmp.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/statbmp.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/statbmp.h" +#elif defined(__WXMAC__) + #include "wx/osx/statbmp.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/statbmp.h" +#elif defined(__WXPM__) + #include "wx/os2/statbmp.h" +#endif + +#endif // wxUSE_STATBMP + +#endif + // _WX_STATBMP_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/statbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/statbox.h new file mode 100644 index 0000000000..d01f257969 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/statbox.h @@ -0,0 +1,76 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/statbox.h +// Purpose: wxStaticBox base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATBOX_H_BASE_ +#define _WX_STATBOX_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_STATBOX + +#include "wx/control.h" +#include "wx/containr.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[]; + +// ---------------------------------------------------------------------------- +// wxStaticBox: a grouping box with a label +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticBoxBase : public wxNavigationEnabled<wxControl> +{ +public: + wxStaticBoxBase(); + + // overridden base class virtuals + virtual bool HasTransparentBackground() { return true; } + + // implementation only: this is used by wxStaticBoxSizer to account for the + // need for extra space taken by the static box + // + // the top border is the margin at the top (where the title is), + // borderOther is the margin on all other sides + virtual void GetBordersForSizer(int *borderTop, int *borderOther) const + { + const int BORDER = 5; // FIXME: hardcoded value + + *borderTop = GetLabel().empty() ? BORDER : GetCharHeight(); + *borderOther = BORDER; + } + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + wxDECLARE_NO_COPY_CLASS(wxStaticBoxBase); +}; + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/statbox.h" +#elif defined(__WXMSW__) + #include "wx/msw/statbox.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/statbox.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/statbox.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/statbox.h" +#elif defined(__WXMAC__) + #include "wx/osx/statbox.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/statbox.h" +#elif defined(__WXPM__) + #include "wx/os2/statbox.h" +#endif + +#endif // wxUSE_STATBOX + +#endif + // _WX_STATBOX_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/statline.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/statline.h new file mode 100644 index 0000000000..4f9e0f1561 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/statline.h @@ -0,0 +1,105 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/statline.h +// Purpose: wxStaticLine class interface +// Author: Vadim Zeitlin +// Created: 28.06.99 +// Copyright: (c) 1999 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATLINE_H_BASE_ +#define _WX_STATLINE_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// this defines wxUSE_STATLINE +#include "wx/defs.h" + +#if wxUSE_STATLINE + +// the base class declaration +#include "wx/control.h" + +// ---------------------------------------------------------------------------- +// global variables +// ---------------------------------------------------------------------------- + +// the default name for objects of class wxStaticLine +extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticLineNameStr[]; + +// ---------------------------------------------------------------------------- +// wxStaticLine - a line in a dialog +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticLineBase : public wxControl +{ +public: + // constructor + wxStaticLineBase() { } + + // is the line vertical? + bool IsVertical() const { return (GetWindowStyle() & wxLI_VERTICAL) != 0; } + + // get the default size for the "lesser" dimension of the static line + static int GetDefaultSize() { return 2; } + + // overridden base class virtuals + virtual bool AcceptsFocus() const { return false; } + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // set the right size for the right dimension + wxSize AdjustSize(const wxSize& size) const + { + wxSize sizeReal(size); + if ( IsVertical() ) + { + if ( size.x == wxDefaultCoord ) + sizeReal.x = GetDefaultSize(); + } + else + { + if ( size.y == wxDefaultCoord ) + sizeReal.y = GetDefaultSize(); + } + + return sizeReal; + } + + virtual wxSize DoGetBestSize() const + { + return AdjustSize(wxDefaultSize); + } + + wxDECLARE_NO_COPY_CLASS(wxStaticLineBase); +}; + +// ---------------------------------------------------------------------------- +// now include the actual class declaration +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/statline.h" +#elif defined(__WXMSW__) + #include "wx/msw/statline.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/statline.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/statline.h" +#elif defined(__WXPM__) + #include "wx/os2/statline.h" +#elif defined(__WXMAC__) + #include "wx/osx/statline.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/statline.h" +#else // use generic implementation for all other platforms + #include "wx/generic/statline.h" +#endif + +#endif // wxUSE_STATLINE + +#endif // _WX_STATLINE_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stattext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stattext.h new file mode 100644 index 0000000000..fa29077526 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stattext.h @@ -0,0 +1,110 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/stattext.h +// Purpose: wxStaticText base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATTEXT_H_BASE_ +#define _WX_STATTEXT_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_STATTEXT + +#include "wx/control.h" + +/* + * wxStaticText flags + */ +#define wxST_NO_AUTORESIZE 0x0001 +// free 0x0002 bit +#define wxST_ELLIPSIZE_START 0x0004 +#define wxST_ELLIPSIZE_MIDDLE 0x0008 +#define wxST_ELLIPSIZE_END 0x0010 + +extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticTextNameStr[]; + +class WXDLLIMPEXP_CORE wxStaticTextBase : public wxControl +{ +public: + wxStaticTextBase() { } + + // wrap the text of the control so that no line is longer than the given + // width (if possible: this function won't break words) + // This function will modify the value returned by GetLabel()! + void Wrap(int width); + + // overridden base virtuals + virtual bool AcceptsFocus() const { return false; } + virtual bool HasTransparentBackground() { return true; } + + bool IsEllipsized() const + { + return HasFlag(wxST_ELLIPSIZE_START) || + HasFlag(wxST_ELLIPSIZE_MIDDLE) || + HasFlag(wxST_ELLIPSIZE_END); + } + +protected: // functions required for wxST_ELLIPSIZE_* support + + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // Calls Ellipsize() on the real label if necessary. Unlike GetLabelText(), + // keeps the mnemonics instead of removing them. + virtual wxString GetEllipsizedLabel() const; + + // Replaces parts of the string with ellipsis according to the ellipsize + // style. Shouldn't be called if we don't have any. + wxString Ellipsize(const wxString& label) const; + + // to be called when updating the size of the static text: + // updates the label redoing ellipsization calculations + void UpdateLabel(); + + // These functions are platform-specific and must be overridden in ports + // which do not natively support ellipsization and they must be implemented + // in a way so that the m_labelOrig member of wxControl is not touched: + + // returns the real label currently displayed inside the control. + virtual wxString DoGetLabel() const { return wxEmptyString; } + + // sets the real label currently displayed inside the control, + // _without_ invalidating the size. The text passed is always markup-free + // but may contain the mnemonic characters. + virtual void DoSetLabel(const wxString& WXUNUSED(str)) { } + +private: + wxDECLARE_NO_COPY_CLASS(wxStaticTextBase); +}; + +// see wx/generic/stattextg.h for the explanation +#ifndef wxNO_PORT_STATTEXT_INCLUDE + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/stattext.h" +#elif defined(__WXMSW__) + #include "wx/msw/stattext.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/stattext.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/stattext.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/stattext.h" +#elif defined(__WXMAC__) + #include "wx/osx/stattext.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/stattext.h" +#elif defined(__WXPM__) + #include "wx/os2/stattext.h" +#endif + +#endif // !wxNO_PORT_STATTEXT_INCLUDE + +#endif // wxUSE_STATTEXT + +#endif // _WX_STATTEXT_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/statusbr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/statusbr.h new file mode 100644 index 0000000000..17e033ffc3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/statusbr.h @@ -0,0 +1,248 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/statusbr.h +// Purpose: wxStatusBar class interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 05.02.00 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STATUSBR_H_BASE_ +#define _WX_STATUSBR_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_STATUSBAR + +#include "wx/control.h" +#include "wx/list.h" +#include "wx/dynarray.h" + +extern WXDLLIMPEXP_DATA_CORE(const char) wxStatusBarNameStr[]; + +// ---------------------------------------------------------------------------- +// wxStatusBar constants +// ---------------------------------------------------------------------------- + +// wxStatusBar styles +#define wxSTB_SIZEGRIP 0x0010 +#define wxSTB_SHOW_TIPS 0x0020 + +#define wxSTB_ELLIPSIZE_START 0x0040 +#define wxSTB_ELLIPSIZE_MIDDLE 0x0080 +#define wxSTB_ELLIPSIZE_END 0x0100 + +#define wxSTB_DEFAULT_STYLE (wxSTB_SIZEGRIP|wxSTB_ELLIPSIZE_END|wxSTB_SHOW_TIPS|wxFULL_REPAINT_ON_RESIZE) + + +// old compat style name: +#define wxST_SIZEGRIP wxSTB_SIZEGRIP + + +// style flags for wxStatusBar fields +#define wxSB_NORMAL 0x0000 +#define wxSB_FLAT 0x0001 +#define wxSB_RAISED 0x0002 +#define wxSB_SUNKEN 0x0003 + +// ---------------------------------------------------------------------------- +// wxStatusBarPane: an helper for wxStatusBar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStatusBarPane +{ +public: + wxStatusBarPane(int style = wxSB_NORMAL, int width = 0) + : m_nStyle(style), m_nWidth(width) + { m_bEllipsized = false; } + + int GetWidth() const { return m_nWidth; } + int GetStyle() const { return m_nStyle; } + wxString GetText() const { return m_text; } + + + // implementation-only from now on + // ------------------------------- + + bool IsEllipsized() const + { return m_bEllipsized; } + void SetIsEllipsized(bool isEllipsized) { m_bEllipsized = isEllipsized; } + + void SetWidth(int width) { m_nWidth = width; } + void SetStyle(int style) { m_nStyle = style; } + + // set text, return true if it changed or false if it was already set to + // this value + bool SetText(const wxString& text); + + // save the existing text on top of our stack and make the new text + // current; return true if the text really changed + bool PushText(const wxString& text); + + // restore the message saved by the last call to Push() (unless it was + // changed by an intervening call to SetText()) and return true if we + // really restored anything + bool PopText(); + +private: + int m_nStyle; + int m_nWidth; // may be negative, indicating a variable-width field + wxString m_text; + + // the array used to keep the previous values of this pane after a + // PushStatusText() call, its top element is the value to restore after the + // next PopStatusText() call while the currently shown value is always in + // m_text + wxArrayString m_arrStack; + + // is the currently shown value shown with ellipsis in the status bar? + bool m_bEllipsized; +}; + +WX_DECLARE_EXPORTED_OBJARRAY(wxStatusBarPane, wxStatusBarPaneArray); + +// ---------------------------------------------------------------------------- +// wxStatusBar: a window near the bottom of the frame used for status info +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStatusBarBase : public wxControl +{ +public: + wxStatusBarBase(); + + virtual ~wxStatusBarBase(); + + // field count + // ----------- + + // set the number of fields and call SetStatusWidths(widths) if widths are + // given + virtual void SetFieldsCount(int number = 1, const int *widths = NULL); + int GetFieldsCount() const { return (int)m_panes.GetCount(); } + + // field text + // ---------- + + // just change or get the currently shown text + void SetStatusText(const wxString& text, int number = 0); + wxString GetStatusText(int number = 0) const; + + // change the currently shown text to the new one and save the current + // value to be restored by the next call to PopStatusText() + void PushStatusText(const wxString& text, int number = 0); + void PopStatusText(int number = 0); + + // fields widths + // ------------- + + // set status field widths as absolute numbers: positive widths mean that + // the field has the specified absolute width, negative widths are + // interpreted as the sizer options, i.e. the extra space (total space + // minus the sum of fixed width fields) is divided between the fields with + // negative width according to the abs value of the width (field with width + // -2 grows twice as much as one with width -1 &c) + virtual void SetStatusWidths(int n, const int widths[]); + + int GetStatusWidth(int n) const + { return m_panes[n].GetWidth(); } + + // field styles + // ------------ + + // Set the field border style to one of wxSB_XXX values. + virtual void SetStatusStyles(int n, const int styles[]); + + int GetStatusStyle(int n) const + { return m_panes[n].GetStyle(); } + + // geometry + // -------- + + // Get the position and size of the field's internal bounding rectangle + virtual bool GetFieldRect(int i, wxRect& rect) const = 0; + + // sets the minimal vertical size of the status bar + virtual void SetMinHeight(int height) = 0; + + // get the dimensions of the horizontal and vertical borders + virtual int GetBorderX() const = 0; + virtual int GetBorderY() const = 0; + + wxSize GetBorders() const + { return wxSize(GetBorderX(), GetBorderY()); } + + // miscellaneous + // ------------- + + const wxStatusBarPane& GetField(int n) const + { return m_panes[n]; } + + // wxWindow overrides: + + // don't want status bars to accept the focus at all + virtual bool AcceptsFocus() const { return false; } + + // the client size of a toplevel window doesn't include the status bar + virtual bool CanBeOutsideClientArea() const { return true; } + +protected: + // called after the status bar pane text changed and should update its + // display + virtual void DoUpdateStatusText(int number) = 0; + + + // wxWindow overrides: + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip( wxToolTip *tip ) + { + wxASSERT_MSG(!HasFlag(wxSTB_SHOW_TIPS), + "Do not set tooltip(s) manually when using wxSTB_SHOW_TIPS!"); + wxWindow::DoSetToolTip(tip); + } +#endif // wxUSE_TOOLTIPS + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + + // internal helpers & data: + + // calculate the real field widths for the given total available size + wxArrayInt CalculateAbsWidths(wxCoord widthTotal) const; + + // should be called to remember if the pane text is currently being show + // ellipsized or not + void SetEllipsizedFlag(int n, bool isEllipsized); + + + // the array with the pane infos: + wxStatusBarPaneArray m_panes; + + // if true overrides the width info of the wxStatusBarPanes + bool m_bSameWidthForAllPanes; + + wxDECLARE_NO_COPY_CLASS(wxStatusBarBase); +}; + +// ---------------------------------------------------------------------------- +// include the actual wxStatusBar class declaration +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + #define wxStatusBarUniv wxStatusBar + #include "wx/univ/statusbr.h" +#elif defined(__WXMSW__) && wxUSE_NATIVE_STATUSBAR + #include "wx/msw/statusbar.h" +#elif defined(__WXMAC__) + #define wxStatusBarMac wxStatusBar + #include "wx/generic/statusbr.h" + #include "wx/osx/statusbr.h" +#else + #define wxStatusBarGeneric wxStatusBar + #include "wx/generic/statusbr.h" +#endif + +#endif // wxUSE_STATUSBAR + +#endif + // _WX_STATUSBR_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stc/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stc/private.h new file mode 100644 index 0000000000..3624bb779f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stc/private.h @@ -0,0 +1,54 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: wx/stc/private.h +// Purpose: Private declarations for wxSTC +// Author: Robin Dunn +// Created: 2007-07-15 +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STC_PRIVATE_H_ +#define _WX_STC_PRIVATE_H_ + +#include "wx/defs.h" +#include "wx/string.h" + +//---------------------------------------------------------------------- +// Utility functions used within wxSTC + +#if wxUSE_UNICODE + +extern wxString stc2wx(const char* str); +extern wxString stc2wx(const char* str, size_t len); +extern wxCharBuffer wx2stc(const wxString& str); + +// This function takes both wxString and wxCharBuffer because it uses either +// one or the other of them depending on the build mode. In Unicode it uses the +// length of the already converted buffer to avoid doing the conversion again +// just to compute the length. +inline size_t wx2stclen(const wxString& WXUNUSED(str), const wxCharBuffer& buf) +{ + return buf.length() - 1; +} + +#else // not UNICODE + +inline wxString stc2wx(const char* str) { + return wxString(str); +} +inline wxString stc2wx(const char* str, size_t len) { + return wxString(str, len); +} +inline const char* wx2stc(const wxString& str) { + return str.mbc_str(); +} + +// As explained above, the buffer argument is only used in Unicode build. +inline size_t wx2stclen(const wxString& str, const char* WXUNUSED(buf)) +{ + return str.length(); +} + +#endif // UNICODE + +#endif // _WX_STC_PRIVATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stc/stc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stc/stc.h new file mode 100644 index 0000000000..7ffab648bd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stc/stc.h @@ -0,0 +1,5013 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: wx/stc/stc.h +// Purpose: A wxWidgets implementation of Scintilla. This class is the +// one meant to be used directly by wx applications. It does not +// derive directly from the Scintilla classes, and in fact there +// is no mention of Scintilla classes at all in this header. +// This class delegates all method calls and events to the +// Scintilla objects and so forth. This allows the use of +// Scintilla without polluting the namespace with all the +// classes and itentifiers from Scintilla. +// +// Author: Robin Dunn +// +// Created: 13-Jan-2000 +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + IMPORTANT: include/wx/stc/stc.h is generated by src/stc/gen_iface.py from + src/stc/stc.h.in, don't edit stc.h file as your changes will be + lost after the next regeneration, edit stc.h.in and rerun the + gen_iface.py script instead! + + Parts of this file generated by the script are found in between + the special "{{{" and "}}}" markers, the rest of it is copied + verbatim from src.h.in. + */ + +#ifndef _WX_STC_STC_H_ +#define _WX_STC_STC_H_ + +#include "wx/defs.h" + +#if wxUSE_STC + +#include "wx/control.h" +#include "wx/dnd.h" +#include "wx/stopwatch.h" +#include "wx/versioninfo.h" + +#include "wx/textentry.h" +#if wxUSE_TEXTCTRL + #include "wx/textctrl.h" +#endif // wxUSE_TEXTCTRL + +class WXDLLIMPEXP_FWD_CORE wxScrollBar; + +// SWIG can't handle "#if" type of conditionals, only "#ifdef" +#ifdef SWIG +#define STC_USE_DND 1 +#else +#if wxUSE_DRAG_AND_DROP +#define STC_USE_DND 1 +#endif +#endif + +//---------------------------------------------------------------------- +// STC constants generated section {{{ + +#define wxSTC_INVALID_POSITION -1 + +/// Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages +/// as many EM_ messages can be used although that use is deprecated. +#define wxSTC_START 2000 +#define wxSTC_OPTIONAL_START 3000 +#define wxSTC_LEXER_START 4000 +#define wxSTC_WS_INVISIBLE 0 +#define wxSTC_WS_VISIBLEALWAYS 1 +#define wxSTC_WS_VISIBLEAFTERINDENT 2 +#define wxSTC_EOL_CRLF 0 +#define wxSTC_EOL_CR 1 +#define wxSTC_EOL_LF 2 + +/// The SC_CP_UTF8 value can be used to enter Unicode mode. +/// This is the same value as CP_UTF8 in Windows +#define wxSTC_CP_UTF8 65001 +#define wxSTC_MARKER_MAX 31 +#define wxSTC_MARK_CIRCLE 0 +#define wxSTC_MARK_ROUNDRECT 1 +#define wxSTC_MARK_ARROW 2 +#define wxSTC_MARK_SMALLRECT 3 +#define wxSTC_MARK_SHORTARROW 4 +#define wxSTC_MARK_EMPTY 5 +#define wxSTC_MARK_ARROWDOWN 6 +#define wxSTC_MARK_MINUS 7 +#define wxSTC_MARK_PLUS 8 + +/// Shapes used for outlining column. +#define wxSTC_MARK_VLINE 9 +#define wxSTC_MARK_LCORNER 10 +#define wxSTC_MARK_TCORNER 11 +#define wxSTC_MARK_BOXPLUS 12 +#define wxSTC_MARK_BOXPLUSCONNECTED 13 +#define wxSTC_MARK_BOXMINUS 14 +#define wxSTC_MARK_BOXMINUSCONNECTED 15 +#define wxSTC_MARK_LCORNERCURVE 16 +#define wxSTC_MARK_TCORNERCURVE 17 +#define wxSTC_MARK_CIRCLEPLUS 18 +#define wxSTC_MARK_CIRCLEPLUSCONNECTED 19 +#define wxSTC_MARK_CIRCLEMINUS 20 +#define wxSTC_MARK_CIRCLEMINUSCONNECTED 21 + +/// Invisible mark that only sets the line background colour. +#define wxSTC_MARK_BACKGROUND 22 +#define wxSTC_MARK_DOTDOTDOT 23 +#define wxSTC_MARK_ARROWS 24 +#define wxSTC_MARK_PIXMAP 25 +#define wxSTC_MARK_FULLRECT 26 +#define wxSTC_MARK_LEFTRECT 27 +#define wxSTC_MARK_AVAILABLE 28 +#define wxSTC_MARK_UNDERLINE 29 +#define wxSTC_MARK_RGBAIMAGE 30 +#define wxSTC_MARK_CHARACTER 10000 + +/// Markers used for outlining column. +#define wxSTC_MARKNUM_FOLDEREND 25 +#define wxSTC_MARKNUM_FOLDEROPENMID 26 +#define wxSTC_MARKNUM_FOLDERMIDTAIL 27 +#define wxSTC_MARKNUM_FOLDERTAIL 28 +#define wxSTC_MARKNUM_FOLDERSUB 29 +#define wxSTC_MARKNUM_FOLDER 30 +#define wxSTC_MARKNUM_FOLDEROPEN 31 +#define wxSTC_MASK_FOLDERS 0xFE000000 +#define wxSTC_MARGIN_SYMBOL 0 +#define wxSTC_MARGIN_NUMBER 1 +#define wxSTC_MARGIN_BACK 2 +#define wxSTC_MARGIN_FORE 3 +#define wxSTC_MARGIN_TEXT 4 +#define wxSTC_MARGIN_RTEXT 5 + +/// Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles. +/// Style 39 is for future use. +#define wxSTC_STYLE_DEFAULT 32 +#define wxSTC_STYLE_LINENUMBER 33 +#define wxSTC_STYLE_BRACELIGHT 34 +#define wxSTC_STYLE_BRACEBAD 35 +#define wxSTC_STYLE_CONTROLCHAR 36 +#define wxSTC_STYLE_INDENTGUIDE 37 +#define wxSTC_STYLE_CALLTIP 38 +#define wxSTC_STYLE_LASTPREDEFINED 39 +#define wxSTC_STYLE_MAX 255 + +/// Character set identifiers are used in StyleSetCharacterSet. +/// The values are the same as the Windows *_CHARSET values. +#define wxSTC_CHARSET_ANSI 0 +#define wxSTC_CHARSET_DEFAULT 1 +#define wxSTC_CHARSET_BALTIC 186 +#define wxSTC_CHARSET_CHINESEBIG5 136 +#define wxSTC_CHARSET_EASTEUROPE 238 +#define wxSTC_CHARSET_GB2312 134 +#define wxSTC_CHARSET_GREEK 161 +#define wxSTC_CHARSET_HANGUL 129 +#define wxSTC_CHARSET_MAC 77 +#define wxSTC_CHARSET_OEM 255 +#define wxSTC_CHARSET_RUSSIAN 204 +#define wxSTC_CHARSET_CYRILLIC 1251 +#define wxSTC_CHARSET_SHIFTJIS 128 +#define wxSTC_CHARSET_SYMBOL 2 +#define wxSTC_CHARSET_TURKISH 162 +#define wxSTC_CHARSET_JOHAB 130 +#define wxSTC_CHARSET_HEBREW 177 +#define wxSTC_CHARSET_ARABIC 178 +#define wxSTC_CHARSET_VIETNAMESE 163 +#define wxSTC_CHARSET_THAI 222 +#define wxSTC_CHARSET_8859_15 1000 +#define wxSTC_CASE_MIXED 0 +#define wxSTC_CASE_UPPER 1 +#define wxSTC_CASE_LOWER 2 +#define wxSTC_FONT_SIZE_MULTIPLIER 100 +#define wxSTC_WEIGHT_NORMAL 400 +#define wxSTC_WEIGHT_SEMIBOLD 600 +#define wxSTC_WEIGHT_BOLD 700 + +/// Indicator style enumeration and some constants +#define wxSTC_INDIC_PLAIN 0 +#define wxSTC_INDIC_SQUIGGLE 1 +#define wxSTC_INDIC_TT 2 +#define wxSTC_INDIC_DIAGONAL 3 +#define wxSTC_INDIC_STRIKE 4 +#define wxSTC_INDIC_HIDDEN 5 +#define wxSTC_INDIC_BOX 6 +#define wxSTC_INDIC_ROUNDBOX 7 +#define wxSTC_INDIC_STRAIGHTBOX 8 +#define wxSTC_INDIC_DASH 9 +#define wxSTC_INDIC_DOTS 10 +#define wxSTC_INDIC_SQUIGGLELOW 11 +#define wxSTC_INDIC_DOTBOX 12 +#define wxSTC_INDIC_MAX 31 +#define wxSTC_INDIC_CONTAINER 8 +#define wxSTC_INDIC0_MASK 0x20 +#define wxSTC_INDIC1_MASK 0x40 +#define wxSTC_INDIC2_MASK 0x80 +#define wxSTC_INDICS_MASK 0xE0 +#define wxSTC_IV_NONE 0 +#define wxSTC_IV_REAL 1 +#define wxSTC_IV_LOOKFORWARD 2 +#define wxSTC_IV_LOOKBOTH 3 + +/// PrintColourMode - use same colours as screen. +#define wxSTC_PRINT_NORMAL 0 + +/// PrintColourMode - invert the light value of each style for printing. +#define wxSTC_PRINT_INVERTLIGHT 1 + +/// PrintColourMode - force black text on white background for printing. +#define wxSTC_PRINT_BLACKONWHITE 2 + +/// PrintColourMode - text stays coloured, but all background is forced to be white for printing. +#define wxSTC_PRINT_COLOURONWHITE 3 + +/// PrintColourMode - only the default-background is forced to be white for printing. +#define wxSTC_PRINT_COLOURONWHITEDEFAULTBG 4 +#define wxSTC_FIND_WHOLEWORD 2 +#define wxSTC_FIND_MATCHCASE 4 +#define wxSTC_FIND_WORDSTART 0x00100000 +#define wxSTC_FIND_REGEXP 0x00200000 +#define wxSTC_FIND_POSIX 0x00400000 +#define wxSTC_FOLDLEVELBASE 0x400 +#define wxSTC_FOLDLEVELWHITEFLAG 0x1000 +#define wxSTC_FOLDLEVELHEADERFLAG 0x2000 +#define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF +#define wxSTC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 +#define wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 +#define wxSTC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 +#define wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010 +#define wxSTC_FOLDFLAG_LEVELNUMBERS 0x0040 +#define wxSTC_TIME_FOREVER 10000000 +#define wxSTC_WRAP_NONE 0 +#define wxSTC_WRAP_WORD 1 +#define wxSTC_WRAP_CHAR 2 +#define wxSTC_WRAPVISUALFLAG_NONE 0x0000 +#define wxSTC_WRAPVISUALFLAG_END 0x0001 +#define wxSTC_WRAPVISUALFLAG_START 0x0002 +#define wxSTC_WRAPVISUALFLAG_MARGIN 0x0004 +#define wxSTC_WRAPVISUALFLAGLOC_DEFAULT 0x0000 +#define wxSTC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001 +#define wxSTC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002 +#define wxSTC_WRAPINDENT_FIXED 0 +#define wxSTC_WRAPINDENT_SAME 1 +#define wxSTC_WRAPINDENT_INDENT 2 +#define wxSTC_CACHE_NONE 0 +#define wxSTC_CACHE_CARET 1 +#define wxSTC_CACHE_PAGE 2 +#define wxSTC_CACHE_DOCUMENT 3 + +/// Control font anti-aliasing. +#define wxSTC_EFF_QUALITY_MASK 0xF +#define wxSTC_EFF_QUALITY_DEFAULT 0 +#define wxSTC_EFF_QUALITY_NON_ANTIALIASED 1 +#define wxSTC_EFF_QUALITY_ANTIALIASED 2 +#define wxSTC_EFF_QUALITY_LCD_OPTIMIZED 3 +#define wxSTC_MULTIPASTE_ONCE 0 +#define wxSTC_MULTIPASTE_EACH 1 +#define wxSTC_EDGE_NONE 0 +#define wxSTC_EDGE_LINE 1 +#define wxSTC_EDGE_BACKGROUND 2 +#define wxSTC_STATUS_OK 0 +#define wxSTC_STATUS_FAILURE 1 +#define wxSTC_STATUS_BADALLOC 2 +#define wxSTC_CURSORNORMAL -1 +#define wxSTC_CURSORARROW 2 +#define wxSTC_CURSORWAIT 4 +#define wxSTC_CURSORREVERSEARROW 7 + +/// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy. +#define wxSTC_VISIBLE_SLOP 0x01 +#define wxSTC_VISIBLE_STRICT 0x04 + +/// Caret policy, used by SetXCaretPolicy and SetYCaretPolicy. +/// If CARET_SLOP is set, we can define a slop value: caretSlop. +/// This value defines an unwanted zone (UZ) where the caret is... unwanted. +/// This zone is defined as a number of pixels near the vertical margins, +/// and as a number of lines near the horizontal margins. +/// By keeping the caret away from the edges, it is seen within its context, +/// so it is likely that the identifier that the caret is on can be completely seen, +/// and that the current line is seen with some of the lines following it which are +/// often dependent on that line. +#define wxSTC_CARET_SLOP 0x01 + +/// If CARET_STRICT is set, the policy is enforced... strictly. +/// The caret is centred on the display if slop is not set, +/// and cannot go in the UZ if slop is set. +#define wxSTC_CARET_STRICT 0x04 + +/// If CARET_JUMPS is set, the display is moved more energetically +/// so the caret can move in the same direction longer before the policy is applied again. +#define wxSTC_CARET_JUMPS 0x10 + +/// If CARET_EVEN is not set, instead of having symmetrical UZs, +/// the left and bottom UZs are extended up to right and top UZs respectively. +/// This way, we favour the displaying of useful information: the begining of lines, +/// where most code reside, and the lines after the caret, eg. the body of a function. +#define wxSTC_CARET_EVEN 0x08 +#define wxSTC_SEL_STREAM 0 +#define wxSTC_SEL_RECTANGLE 1 +#define wxSTC_SEL_LINES 2 +#define wxSTC_SEL_THIN 3 +#define wxSTC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE 0 +#define wxSTC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE 1 +#define wxSTC_CARETSTICKY_OFF 0 +#define wxSTC_CARETSTICKY_ON 1 +#define wxSTC_CARETSTICKY_WHITESPACE 2 +#define wxSTC_ALPHA_TRANSPARENT 0 +#define wxSTC_ALPHA_OPAQUE 255 +#define wxSTC_ALPHA_NOALPHA 256 +#define wxSTC_CARETSTYLE_INVISIBLE 0 +#define wxSTC_CARETSTYLE_LINE 1 +#define wxSTC_CARETSTYLE_BLOCK 2 +#define wxSTC_MARGINOPTION_NONE 0 +#define wxSTC_MARGINOPTION_SUBLINESELECT 1 +#define wxSTC_ANNOTATION_HIDDEN 0 +#define wxSTC_ANNOTATION_STANDARD 1 +#define wxSTC_ANNOTATION_BOXED 2 +#define wxSTC_UNDO_MAY_COALESCE 1 +#define wxSTC_SCVS_NONE 0 +#define wxSTC_SCVS_RECTANGULARSELECTION 1 +#define wxSTC_SCVS_USERACCESSIBLE 2 +#define wxSTC_TECHNOLOGY_DEFAULT 0 +#define wxSTC_TECHNOLOGY_DIRECTWRITE 1 + +/// Maximum value of keywordSet parameter of SetKeyWords. +#define wxSTC_KEYWORDSET_MAX 8 +#define wxSTC_TYPE_BOOLEAN 0 +#define wxSTC_TYPE_INTEGER 1 +#define wxSTC_TYPE_STRING 2 + +/// Notifications +/// Type of modification and the action which caused the modification. +/// These are defined as a bit mask to make it easy to specify which notifications are wanted. +/// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. +#define wxSTC_MOD_INSERTTEXT 0x1 +#define wxSTC_MOD_DELETETEXT 0x2 +#define wxSTC_MOD_CHANGESTYLE 0x4 +#define wxSTC_MOD_CHANGEFOLD 0x8 +#define wxSTC_PERFORMED_USER 0x10 +#define wxSTC_PERFORMED_UNDO 0x20 +#define wxSTC_PERFORMED_REDO 0x40 +#define wxSTC_MULTISTEPUNDOREDO 0x80 +#define wxSTC_LASTSTEPINUNDOREDO 0x100 +#define wxSTC_MOD_CHANGEMARKER 0x200 +#define wxSTC_MOD_BEFOREINSERT 0x400 +#define wxSTC_MOD_BEFOREDELETE 0x800 +#define wxSTC_MULTILINEUNDOREDO 0x1000 +#define wxSTC_STARTACTION 0x2000 +#define wxSTC_MOD_CHANGEINDICATOR 0x4000 +#define wxSTC_MOD_CHANGELINESTATE 0x8000 +#define wxSTC_MOD_CHANGEMARGIN 0x10000 +#define wxSTC_MOD_CHANGEANNOTATION 0x20000 +#define wxSTC_MOD_CONTAINER 0x40000 +#define wxSTC_MOD_LEXERSTATE 0x80000 +#define wxSTC_MODEVENTMASKALL 0xFFFFF +#define wxSTC_UPDATE_CONTENT 0x1 +#define wxSTC_UPDATE_SELECTION 0x2 +#define wxSTC_UPDATE_V_SCROLL 0x4 +#define wxSTC_UPDATE_H_SCROLL 0x8 + +/// Symbolic key codes and modifier flags. +/// ASCII and other printable characters below 256. +/// Extended keys above 300. +#define wxSTC_KEY_DOWN 300 +#define wxSTC_KEY_UP 301 +#define wxSTC_KEY_LEFT 302 +#define wxSTC_KEY_RIGHT 303 +#define wxSTC_KEY_HOME 304 +#define wxSTC_KEY_END 305 +#define wxSTC_KEY_PRIOR 306 +#define wxSTC_KEY_NEXT 307 +#define wxSTC_KEY_DELETE 308 +#define wxSTC_KEY_INSERT 309 +#define wxSTC_KEY_ESCAPE 7 +#define wxSTC_KEY_BACK 8 +#define wxSTC_KEY_TAB 9 +#define wxSTC_KEY_RETURN 13 +#define wxSTC_KEY_ADD 310 +#define wxSTC_KEY_SUBTRACT 311 +#define wxSTC_KEY_DIVIDE 312 +#define wxSTC_KEY_WIN 313 +#define wxSTC_KEY_RWIN 314 +#define wxSTC_KEY_MENU 315 +#define wxSTC_SCMOD_NORM 0 +#define wxSTC_SCMOD_SHIFT 1 +#define wxSTC_SCMOD_CTRL 2 +#define wxSTC_SCMOD_ALT 4 +#define wxSTC_SCMOD_SUPER 8 +#define wxSTC_SCMOD_META 16 + +/// For SciLexer.h +#define wxSTC_LEX_CONTAINER 0 +#define wxSTC_LEX_NULL 1 +#define wxSTC_LEX_PYTHON 2 +#define wxSTC_LEX_CPP 3 +#define wxSTC_LEX_HTML 4 +#define wxSTC_LEX_XML 5 +#define wxSTC_LEX_PERL 6 +#define wxSTC_LEX_SQL 7 +#define wxSTC_LEX_VB 8 +#define wxSTC_LEX_PROPERTIES 9 +#define wxSTC_LEX_ERRORLIST 10 +#define wxSTC_LEX_MAKEFILE 11 +#define wxSTC_LEX_BATCH 12 +#define wxSTC_LEX_XCODE 13 +#define wxSTC_LEX_LATEX 14 +#define wxSTC_LEX_LUA 15 +#define wxSTC_LEX_DIFF 16 +#define wxSTC_LEX_CONF 17 +#define wxSTC_LEX_PASCAL 18 +#define wxSTC_LEX_AVE 19 +#define wxSTC_LEX_ADA 20 +#define wxSTC_LEX_LISP 21 +#define wxSTC_LEX_RUBY 22 +#define wxSTC_LEX_EIFFEL 23 +#define wxSTC_LEX_EIFFELKW 24 +#define wxSTC_LEX_TCL 25 +#define wxSTC_LEX_NNCRONTAB 26 +#define wxSTC_LEX_BULLANT 27 +#define wxSTC_LEX_VBSCRIPT 28 +#define wxSTC_LEX_BAAN 31 +#define wxSTC_LEX_MATLAB 32 +#define wxSTC_LEX_SCRIPTOL 33 +#define wxSTC_LEX_ASM 34 +#define wxSTC_LEX_CPPNOCASE 35 +#define wxSTC_LEX_FORTRAN 36 +#define wxSTC_LEX_F77 37 +#define wxSTC_LEX_CSS 38 +#define wxSTC_LEX_POV 39 +#define wxSTC_LEX_LOUT 40 +#define wxSTC_LEX_ESCRIPT 41 +#define wxSTC_LEX_PS 42 +#define wxSTC_LEX_NSIS 43 +#define wxSTC_LEX_MMIXAL 44 +#define wxSTC_LEX_CLW 45 +#define wxSTC_LEX_CLWNOCASE 46 +#define wxSTC_LEX_LOT 47 +#define wxSTC_LEX_YAML 48 +#define wxSTC_LEX_TEX 49 +#define wxSTC_LEX_METAPOST 50 +#define wxSTC_LEX_POWERBASIC 51 +#define wxSTC_LEX_FORTH 52 +#define wxSTC_LEX_ERLANG 53 +#define wxSTC_LEX_OCTAVE 54 +#define wxSTC_LEX_MSSQL 55 +#define wxSTC_LEX_VERILOG 56 +#define wxSTC_LEX_KIX 57 +#define wxSTC_LEX_GUI4CLI 58 +#define wxSTC_LEX_SPECMAN 59 +#define wxSTC_LEX_AU3 60 +#define wxSTC_LEX_APDL 61 +#define wxSTC_LEX_BASH 62 +#define wxSTC_LEX_ASN1 63 +#define wxSTC_LEX_VHDL 64 +#define wxSTC_LEX_CAML 65 +#define wxSTC_LEX_BLITZBASIC 66 +#define wxSTC_LEX_PUREBASIC 67 +#define wxSTC_LEX_HASKELL 68 +#define wxSTC_LEX_PHPSCRIPT 69 +#define wxSTC_LEX_TADS3 70 +#define wxSTC_LEX_REBOL 71 +#define wxSTC_LEX_SMALLTALK 72 +#define wxSTC_LEX_FLAGSHIP 73 +#define wxSTC_LEX_CSOUND 74 +#define wxSTC_LEX_FREEBASIC 75 +#define wxSTC_LEX_INNOSETUP 76 +#define wxSTC_LEX_OPAL 77 +#define wxSTC_LEX_SPICE 78 +#define wxSTC_LEX_D 79 +#define wxSTC_LEX_CMAKE 80 +#define wxSTC_LEX_GAP 81 +#define wxSTC_LEX_PLM 82 +#define wxSTC_LEX_PROGRESS 83 +#define wxSTC_LEX_ABAQUS 84 +#define wxSTC_LEX_ASYMPTOTE 85 +#define wxSTC_LEX_R 86 +#define wxSTC_LEX_MAGIK 87 +#define wxSTC_LEX_POWERSHELL 88 +#define wxSTC_LEX_MYSQL 89 +#define wxSTC_LEX_PO 90 +#define wxSTC_LEX_TAL 91 +#define wxSTC_LEX_COBOL 92 +#define wxSTC_LEX_TACL 93 +#define wxSTC_LEX_SORCUS 94 +#define wxSTC_LEX_POWERPRO 95 +#define wxSTC_LEX_NIMROD 96 +#define wxSTC_LEX_SML 97 +#define wxSTC_LEX_MARKDOWN 98 +#define wxSTC_LEX_TXT2TAGS 99 +#define wxSTC_LEX_A68K 100 +#define wxSTC_LEX_MODULA 101 +#define wxSTC_LEX_COFFEESCRIPT 102 +#define wxSTC_LEX_TCMD 103 +#define wxSTC_LEX_AVS 104 +#define wxSTC_LEX_ECL 105 +#define wxSTC_LEX_OSCRIPT 106 +#define wxSTC_LEX_VISUALPROLOG 107 + +/// When a lexer specifies its language as SCLEX_AUTOMATIC it receives a +/// value assigned in sequence from SCLEX_AUTOMATIC+1. +#define wxSTC_LEX_AUTOMATIC 1000 + +/// Lexical states for SCLEX_PYTHON +#define wxSTC_P_DEFAULT 0 +#define wxSTC_P_COMMENTLINE 1 +#define wxSTC_P_NUMBER 2 +#define wxSTC_P_STRING 3 +#define wxSTC_P_CHARACTER 4 +#define wxSTC_P_WORD 5 +#define wxSTC_P_TRIPLE 6 +#define wxSTC_P_TRIPLEDOUBLE 7 +#define wxSTC_P_CLASSNAME 8 +#define wxSTC_P_DEFNAME 9 +#define wxSTC_P_OPERATOR 10 +#define wxSTC_P_IDENTIFIER 11 +#define wxSTC_P_COMMENTBLOCK 12 +#define wxSTC_P_STRINGEOL 13 +#define wxSTC_P_WORD2 14 +#define wxSTC_P_DECORATOR 15 + +/// Lexical states for SCLEX_CPP +#define wxSTC_C_DEFAULT 0 +#define wxSTC_C_COMMENT 1 +#define wxSTC_C_COMMENTLINE 2 +#define wxSTC_C_COMMENTDOC 3 +#define wxSTC_C_NUMBER 4 +#define wxSTC_C_WORD 5 +#define wxSTC_C_STRING 6 +#define wxSTC_C_CHARACTER 7 +#define wxSTC_C_UUID 8 +#define wxSTC_C_PREPROCESSOR 9 +#define wxSTC_C_OPERATOR 10 +#define wxSTC_C_IDENTIFIER 11 +#define wxSTC_C_STRINGEOL 12 +#define wxSTC_C_VERBATIM 13 +#define wxSTC_C_REGEX 14 +#define wxSTC_C_COMMENTLINEDOC 15 +#define wxSTC_C_WORD2 16 +#define wxSTC_C_COMMENTDOCKEYWORD 17 +#define wxSTC_C_COMMENTDOCKEYWORDERROR 18 +#define wxSTC_C_GLOBALCLASS 19 +#define wxSTC_C_STRINGRAW 20 +#define wxSTC_C_TRIPLEVERBATIM 21 +#define wxSTC_C_HASHQUOTEDSTRING 22 +#define wxSTC_C_PREPROCESSORCOMMENT 23 + +/// Lexical states for SCLEX_D +#define wxSTC_D_DEFAULT 0 +#define wxSTC_D_COMMENT 1 +#define wxSTC_D_COMMENTLINE 2 +#define wxSTC_D_COMMENTDOC 3 +#define wxSTC_D_COMMENTNESTED 4 +#define wxSTC_D_NUMBER 5 +#define wxSTC_D_WORD 6 +#define wxSTC_D_WORD2 7 +#define wxSTC_D_WORD3 8 +#define wxSTC_D_TYPEDEF 9 +#define wxSTC_D_STRING 10 +#define wxSTC_D_STRINGEOL 11 +#define wxSTC_D_CHARACTER 12 +#define wxSTC_D_OPERATOR 13 +#define wxSTC_D_IDENTIFIER 14 +#define wxSTC_D_COMMENTLINEDOC 15 +#define wxSTC_D_COMMENTDOCKEYWORD 16 +#define wxSTC_D_COMMENTDOCKEYWORDERROR 17 +#define wxSTC_D_STRINGB 18 +#define wxSTC_D_STRINGR 19 +#define wxSTC_D_WORD5 20 +#define wxSTC_D_WORD6 21 +#define wxSTC_D_WORD7 22 + +/// Lexical states for SCLEX_TCL +#define wxSTC_TCL_DEFAULT 0 +#define wxSTC_TCL_COMMENT 1 +#define wxSTC_TCL_COMMENTLINE 2 +#define wxSTC_TCL_NUMBER 3 +#define wxSTC_TCL_WORD_IN_QUOTE 4 +#define wxSTC_TCL_IN_QUOTE 5 +#define wxSTC_TCL_OPERATOR 6 +#define wxSTC_TCL_IDENTIFIER 7 +#define wxSTC_TCL_SUBSTITUTION 8 +#define wxSTC_TCL_SUB_BRACE 9 +#define wxSTC_TCL_MODIFIER 10 +#define wxSTC_TCL_EXPAND 11 +#define wxSTC_TCL_WORD 12 +#define wxSTC_TCL_WORD2 13 +#define wxSTC_TCL_WORD3 14 +#define wxSTC_TCL_WORD4 15 +#define wxSTC_TCL_WORD5 16 +#define wxSTC_TCL_WORD6 17 +#define wxSTC_TCL_WORD7 18 +#define wxSTC_TCL_WORD8 19 +#define wxSTC_TCL_COMMENT_BOX 20 +#define wxSTC_TCL_BLOCK_COMMENT 21 + +/// Lexical states for SCLEX_HTML, SCLEX_XML +#define wxSTC_H_DEFAULT 0 +#define wxSTC_H_TAG 1 +#define wxSTC_H_TAGUNKNOWN 2 +#define wxSTC_H_ATTRIBUTE 3 +#define wxSTC_H_ATTRIBUTEUNKNOWN 4 +#define wxSTC_H_NUMBER 5 +#define wxSTC_H_DOUBLESTRING 6 +#define wxSTC_H_SINGLESTRING 7 +#define wxSTC_H_OTHER 8 +#define wxSTC_H_COMMENT 9 +#define wxSTC_H_ENTITY 10 + +/// XML and ASP +#define wxSTC_H_TAGEND 11 +#define wxSTC_H_XMLSTART 12 +#define wxSTC_H_XMLEND 13 +#define wxSTC_H_SCRIPT 14 +#define wxSTC_H_ASP 15 +#define wxSTC_H_ASPAT 16 +#define wxSTC_H_CDATA 17 +#define wxSTC_H_QUESTION 18 + +/// More HTML +#define wxSTC_H_VALUE 19 + +/// X-Code +#define wxSTC_H_XCCOMMENT 20 + +/// SGML +#define wxSTC_H_SGML_DEFAULT 21 +#define wxSTC_H_SGML_COMMAND 22 +#define wxSTC_H_SGML_1ST_PARAM 23 +#define wxSTC_H_SGML_DOUBLESTRING 24 +#define wxSTC_H_SGML_SIMPLESTRING 25 +#define wxSTC_H_SGML_ERROR 26 +#define wxSTC_H_SGML_SPECIAL 27 +#define wxSTC_H_SGML_ENTITY 28 +#define wxSTC_H_SGML_COMMENT 29 +#define wxSTC_H_SGML_1ST_PARAM_COMMENT 30 +#define wxSTC_H_SGML_BLOCK_DEFAULT 31 + +/// Embedded Javascript +#define wxSTC_HJ_START 40 +#define wxSTC_HJ_DEFAULT 41 +#define wxSTC_HJ_COMMENT 42 +#define wxSTC_HJ_COMMENTLINE 43 +#define wxSTC_HJ_COMMENTDOC 44 +#define wxSTC_HJ_NUMBER 45 +#define wxSTC_HJ_WORD 46 +#define wxSTC_HJ_KEYWORD 47 +#define wxSTC_HJ_DOUBLESTRING 48 +#define wxSTC_HJ_SINGLESTRING 49 +#define wxSTC_HJ_SYMBOLS 50 +#define wxSTC_HJ_STRINGEOL 51 +#define wxSTC_HJ_REGEX 52 + +/// ASP Javascript +#define wxSTC_HJA_START 55 +#define wxSTC_HJA_DEFAULT 56 +#define wxSTC_HJA_COMMENT 57 +#define wxSTC_HJA_COMMENTLINE 58 +#define wxSTC_HJA_COMMENTDOC 59 +#define wxSTC_HJA_NUMBER 60 +#define wxSTC_HJA_WORD 61 +#define wxSTC_HJA_KEYWORD 62 +#define wxSTC_HJA_DOUBLESTRING 63 +#define wxSTC_HJA_SINGLESTRING 64 +#define wxSTC_HJA_SYMBOLS 65 +#define wxSTC_HJA_STRINGEOL 66 +#define wxSTC_HJA_REGEX 67 + +/// Embedded VBScript +#define wxSTC_HB_START 70 +#define wxSTC_HB_DEFAULT 71 +#define wxSTC_HB_COMMENTLINE 72 +#define wxSTC_HB_NUMBER 73 +#define wxSTC_HB_WORD 74 +#define wxSTC_HB_STRING 75 +#define wxSTC_HB_IDENTIFIER 76 +#define wxSTC_HB_STRINGEOL 77 + +/// ASP VBScript +#define wxSTC_HBA_START 80 +#define wxSTC_HBA_DEFAULT 81 +#define wxSTC_HBA_COMMENTLINE 82 +#define wxSTC_HBA_NUMBER 83 +#define wxSTC_HBA_WORD 84 +#define wxSTC_HBA_STRING 85 +#define wxSTC_HBA_IDENTIFIER 86 +#define wxSTC_HBA_STRINGEOL 87 + +/// Embedded Python +#define wxSTC_HP_START 90 +#define wxSTC_HP_DEFAULT 91 +#define wxSTC_HP_COMMENTLINE 92 +#define wxSTC_HP_NUMBER 93 +#define wxSTC_HP_STRING 94 +#define wxSTC_HP_CHARACTER 95 +#define wxSTC_HP_WORD 96 +#define wxSTC_HP_TRIPLE 97 +#define wxSTC_HP_TRIPLEDOUBLE 98 +#define wxSTC_HP_CLASSNAME 99 +#define wxSTC_HP_DEFNAME 100 +#define wxSTC_HP_OPERATOR 101 +#define wxSTC_HP_IDENTIFIER 102 + +/// PHP +#define wxSTC_HPHP_COMPLEX_VARIABLE 104 + +/// ASP Python +#define wxSTC_HPA_START 105 +#define wxSTC_HPA_DEFAULT 106 +#define wxSTC_HPA_COMMENTLINE 107 +#define wxSTC_HPA_NUMBER 108 +#define wxSTC_HPA_STRING 109 +#define wxSTC_HPA_CHARACTER 110 +#define wxSTC_HPA_WORD 111 +#define wxSTC_HPA_TRIPLE 112 +#define wxSTC_HPA_TRIPLEDOUBLE 113 +#define wxSTC_HPA_CLASSNAME 114 +#define wxSTC_HPA_DEFNAME 115 +#define wxSTC_HPA_OPERATOR 116 +#define wxSTC_HPA_IDENTIFIER 117 + +/// PHP +#define wxSTC_HPHP_DEFAULT 118 +#define wxSTC_HPHP_HSTRING 119 +#define wxSTC_HPHP_SIMPLESTRING 120 +#define wxSTC_HPHP_WORD 121 +#define wxSTC_HPHP_NUMBER 122 +#define wxSTC_HPHP_VARIABLE 123 +#define wxSTC_HPHP_COMMENT 124 +#define wxSTC_HPHP_COMMENTLINE 125 +#define wxSTC_HPHP_HSTRING_VARIABLE 126 +#define wxSTC_HPHP_OPERATOR 127 + +/// Lexical states for SCLEX_PERL +#define wxSTC_PL_DEFAULT 0 +#define wxSTC_PL_ERROR 1 +#define wxSTC_PL_COMMENTLINE 2 +#define wxSTC_PL_POD 3 +#define wxSTC_PL_NUMBER 4 +#define wxSTC_PL_WORD 5 +#define wxSTC_PL_STRING 6 +#define wxSTC_PL_CHARACTER 7 +#define wxSTC_PL_PUNCTUATION 8 +#define wxSTC_PL_PREPROCESSOR 9 +#define wxSTC_PL_OPERATOR 10 +#define wxSTC_PL_IDENTIFIER 11 +#define wxSTC_PL_SCALAR 12 +#define wxSTC_PL_ARRAY 13 +#define wxSTC_PL_HASH 14 +#define wxSTC_PL_SYMBOLTABLE 15 +#define wxSTC_PL_VARIABLE_INDEXER 16 +#define wxSTC_PL_REGEX 17 +#define wxSTC_PL_REGSUBST 18 +#define wxSTC_PL_LONGQUOTE 19 +#define wxSTC_PL_BACKTICKS 20 +#define wxSTC_PL_DATASECTION 21 +#define wxSTC_PL_HERE_DELIM 22 +#define wxSTC_PL_HERE_Q 23 +#define wxSTC_PL_HERE_QQ 24 +#define wxSTC_PL_HERE_QX 25 +#define wxSTC_PL_STRING_Q 26 +#define wxSTC_PL_STRING_QQ 27 +#define wxSTC_PL_STRING_QX 28 +#define wxSTC_PL_STRING_QR 29 +#define wxSTC_PL_STRING_QW 30 +#define wxSTC_PL_POD_VERB 31 +#define wxSTC_PL_SUB_PROTOTYPE 40 +#define wxSTC_PL_FORMAT_IDENT 41 +#define wxSTC_PL_FORMAT 42 +#define wxSTC_PL_STRING_VAR 43 +#define wxSTC_PL_XLAT 44 +#define wxSTC_PL_REGEX_VAR 54 +#define wxSTC_PL_REGSUBST_VAR 55 +#define wxSTC_PL_BACKTICKS_VAR 57 +#define wxSTC_PL_HERE_QQ_VAR 61 +#define wxSTC_PL_HERE_QX_VAR 62 +#define wxSTC_PL_STRING_QQ_VAR 64 +#define wxSTC_PL_STRING_QX_VAR 65 +#define wxSTC_PL_STRING_QR_VAR 66 + +/// Lexical states for SCLEX_RUBY +#define wxSTC_RB_DEFAULT 0 +#define wxSTC_RB_ERROR 1 +#define wxSTC_RB_COMMENTLINE 2 +#define wxSTC_RB_POD 3 +#define wxSTC_RB_NUMBER 4 +#define wxSTC_RB_WORD 5 +#define wxSTC_RB_STRING 6 +#define wxSTC_RB_CHARACTER 7 +#define wxSTC_RB_CLASSNAME 8 +#define wxSTC_RB_DEFNAME 9 +#define wxSTC_RB_OPERATOR 10 +#define wxSTC_RB_IDENTIFIER 11 +#define wxSTC_RB_REGEX 12 +#define wxSTC_RB_GLOBAL 13 +#define wxSTC_RB_SYMBOL 14 +#define wxSTC_RB_MODULE_NAME 15 +#define wxSTC_RB_INSTANCE_VAR 16 +#define wxSTC_RB_CLASS_VAR 17 +#define wxSTC_RB_BACKTICKS 18 +#define wxSTC_RB_DATASECTION 19 +#define wxSTC_RB_HERE_DELIM 20 +#define wxSTC_RB_HERE_Q 21 +#define wxSTC_RB_HERE_QQ 22 +#define wxSTC_RB_HERE_QX 23 +#define wxSTC_RB_STRING_Q 24 +#define wxSTC_RB_STRING_QQ 25 +#define wxSTC_RB_STRING_QX 26 +#define wxSTC_RB_STRING_QR 27 +#define wxSTC_RB_STRING_QW 28 +#define wxSTC_RB_WORD_DEMOTED 29 +#define wxSTC_RB_STDIN 30 +#define wxSTC_RB_STDOUT 31 +#define wxSTC_RB_STDERR 40 +#define wxSTC_RB_UPPER_BOUND 41 + +/// Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC +#define wxSTC_B_DEFAULT 0 +#define wxSTC_B_COMMENT 1 +#define wxSTC_B_NUMBER 2 +#define wxSTC_B_KEYWORD 3 +#define wxSTC_B_STRING 4 +#define wxSTC_B_PREPROCESSOR 5 +#define wxSTC_B_OPERATOR 6 +#define wxSTC_B_IDENTIFIER 7 +#define wxSTC_B_DATE 8 +#define wxSTC_B_STRINGEOL 9 +#define wxSTC_B_KEYWORD2 10 +#define wxSTC_B_KEYWORD3 11 +#define wxSTC_B_KEYWORD4 12 +#define wxSTC_B_CONSTANT 13 +#define wxSTC_B_ASM 14 +#define wxSTC_B_LABEL 15 +#define wxSTC_B_ERROR 16 +#define wxSTC_B_HEXNUMBER 17 +#define wxSTC_B_BINNUMBER 18 + +/// Lexical states for SCLEX_PROPERTIES +#define wxSTC_PROPS_DEFAULT 0 +#define wxSTC_PROPS_COMMENT 1 +#define wxSTC_PROPS_SECTION 2 +#define wxSTC_PROPS_ASSIGNMENT 3 +#define wxSTC_PROPS_DEFVAL 4 +#define wxSTC_PROPS_KEY 5 + +/// Lexical states for SCLEX_LATEX +#define wxSTC_L_DEFAULT 0 +#define wxSTC_L_COMMAND 1 +#define wxSTC_L_TAG 2 +#define wxSTC_L_MATH 3 +#define wxSTC_L_COMMENT 4 +#define wxSTC_L_TAG2 5 +#define wxSTC_L_MATH2 6 +#define wxSTC_L_COMMENT2 7 +#define wxSTC_L_VERBATIM 8 +#define wxSTC_L_SHORTCMD 9 +#define wxSTC_L_SPECIAL 10 +#define wxSTC_L_CMDOPT 11 +#define wxSTC_L_ERROR 12 + +/// Lexical states for SCLEX_LUA +#define wxSTC_LUA_DEFAULT 0 +#define wxSTC_LUA_COMMENT 1 +#define wxSTC_LUA_COMMENTLINE 2 +#define wxSTC_LUA_COMMENTDOC 3 +#define wxSTC_LUA_NUMBER 4 +#define wxSTC_LUA_WORD 5 +#define wxSTC_LUA_STRING 6 +#define wxSTC_LUA_CHARACTER 7 +#define wxSTC_LUA_LITERALSTRING 8 +#define wxSTC_LUA_PREPROCESSOR 9 +#define wxSTC_LUA_OPERATOR 10 +#define wxSTC_LUA_IDENTIFIER 11 +#define wxSTC_LUA_STRINGEOL 12 +#define wxSTC_LUA_WORD2 13 +#define wxSTC_LUA_WORD3 14 +#define wxSTC_LUA_WORD4 15 +#define wxSTC_LUA_WORD5 16 +#define wxSTC_LUA_WORD6 17 +#define wxSTC_LUA_WORD7 18 +#define wxSTC_LUA_WORD8 19 +#define wxSTC_LUA_LABEL 20 + +/// Lexical states for SCLEX_ERRORLIST +#define wxSTC_ERR_DEFAULT 0 +#define wxSTC_ERR_PYTHON 1 +#define wxSTC_ERR_GCC 2 +#define wxSTC_ERR_MS 3 +#define wxSTC_ERR_CMD 4 +#define wxSTC_ERR_BORLAND 5 +#define wxSTC_ERR_PERL 6 +#define wxSTC_ERR_NET 7 +#define wxSTC_ERR_LUA 8 +#define wxSTC_ERR_CTAG 9 +#define wxSTC_ERR_DIFF_CHANGED 10 +#define wxSTC_ERR_DIFF_ADDITION 11 +#define wxSTC_ERR_DIFF_DELETION 12 +#define wxSTC_ERR_DIFF_MESSAGE 13 +#define wxSTC_ERR_PHP 14 +#define wxSTC_ERR_ELF 15 +#define wxSTC_ERR_IFC 16 +#define wxSTC_ERR_IFORT 17 +#define wxSTC_ERR_ABSF 18 +#define wxSTC_ERR_TIDY 19 +#define wxSTC_ERR_JAVA_STACK 20 +#define wxSTC_ERR_VALUE 21 + +/// Lexical states for SCLEX_BATCH +#define wxSTC_BAT_DEFAULT 0 +#define wxSTC_BAT_COMMENT 1 +#define wxSTC_BAT_WORD 2 +#define wxSTC_BAT_LABEL 3 +#define wxSTC_BAT_HIDE 4 +#define wxSTC_BAT_COMMAND 5 +#define wxSTC_BAT_IDENTIFIER 6 +#define wxSTC_BAT_OPERATOR 7 + +/// Lexical states for SCLEX_TCMD +#define wxSTC_TCMD_DEFAULT 0 +#define wxSTC_TCMD_COMMENT 1 +#define wxSTC_TCMD_WORD 2 +#define wxSTC_TCMD_LABEL 3 +#define wxSTC_TCMD_HIDE 4 +#define wxSTC_TCMD_COMMAND 5 +#define wxSTC_TCMD_IDENTIFIER 6 +#define wxSTC_TCMD_OPERATOR 7 +#define wxSTC_TCMD_ENVIRONMENT 8 +#define wxSTC_TCMD_EXPANSION 9 +#define wxSTC_TCMD_CLABEL 10 + +/// Lexical states for SCLEX_MAKEFILE +#define wxSTC_MAKE_DEFAULT 0 +#define wxSTC_MAKE_COMMENT 1 +#define wxSTC_MAKE_PREPROCESSOR 2 +#define wxSTC_MAKE_IDENTIFIER 3 +#define wxSTC_MAKE_OPERATOR 4 +#define wxSTC_MAKE_TARGET 5 +#define wxSTC_MAKE_IDEOL 9 + +/// Lexical states for SCLEX_DIFF +#define wxSTC_DIFF_DEFAULT 0 +#define wxSTC_DIFF_COMMENT 1 +#define wxSTC_DIFF_COMMAND 2 +#define wxSTC_DIFF_HEADER 3 +#define wxSTC_DIFF_POSITION 4 +#define wxSTC_DIFF_DELETED 5 +#define wxSTC_DIFF_ADDED 6 +#define wxSTC_DIFF_CHANGED 7 + +/// Lexical states for SCLEX_CONF (Apache Configuration Files Lexer) +#define wxSTC_CONF_DEFAULT 0 +#define wxSTC_CONF_COMMENT 1 +#define wxSTC_CONF_NUMBER 2 +#define wxSTC_CONF_IDENTIFIER 3 +#define wxSTC_CONF_EXTENSION 4 +#define wxSTC_CONF_PARAMETER 5 +#define wxSTC_CONF_STRING 6 +#define wxSTC_CONF_OPERATOR 7 +#define wxSTC_CONF_IP 8 +#define wxSTC_CONF_DIRECTIVE 9 + +/// Lexical states for SCLEX_AVE, Avenue +#define wxSTC_AVE_DEFAULT 0 +#define wxSTC_AVE_COMMENT 1 +#define wxSTC_AVE_NUMBER 2 +#define wxSTC_AVE_WORD 3 +#define wxSTC_AVE_STRING 6 +#define wxSTC_AVE_ENUM 7 +#define wxSTC_AVE_STRINGEOL 8 +#define wxSTC_AVE_IDENTIFIER 9 +#define wxSTC_AVE_OPERATOR 10 +#define wxSTC_AVE_WORD1 11 +#define wxSTC_AVE_WORD2 12 +#define wxSTC_AVE_WORD3 13 +#define wxSTC_AVE_WORD4 14 +#define wxSTC_AVE_WORD5 15 +#define wxSTC_AVE_WORD6 16 + +/// Lexical states for SCLEX_ADA +#define wxSTC_ADA_DEFAULT 0 +#define wxSTC_ADA_WORD 1 +#define wxSTC_ADA_IDENTIFIER 2 +#define wxSTC_ADA_NUMBER 3 +#define wxSTC_ADA_DELIMITER 4 +#define wxSTC_ADA_CHARACTER 5 +#define wxSTC_ADA_CHARACTEREOL 6 +#define wxSTC_ADA_STRING 7 +#define wxSTC_ADA_STRINGEOL 8 +#define wxSTC_ADA_LABEL 9 +#define wxSTC_ADA_COMMENTLINE 10 +#define wxSTC_ADA_ILLEGAL 11 + +/// Lexical states for SCLEX_BAAN +#define wxSTC_BAAN_DEFAULT 0 +#define wxSTC_BAAN_COMMENT 1 +#define wxSTC_BAAN_COMMENTDOC 2 +#define wxSTC_BAAN_NUMBER 3 +#define wxSTC_BAAN_WORD 4 +#define wxSTC_BAAN_STRING 5 +#define wxSTC_BAAN_PREPROCESSOR 6 +#define wxSTC_BAAN_OPERATOR 7 +#define wxSTC_BAAN_IDENTIFIER 8 +#define wxSTC_BAAN_STRINGEOL 9 +#define wxSTC_BAAN_WORD2 10 + +/// Lexical states for SCLEX_LISP +#define wxSTC_LISP_DEFAULT 0 +#define wxSTC_LISP_COMMENT 1 +#define wxSTC_LISP_NUMBER 2 +#define wxSTC_LISP_KEYWORD 3 +#define wxSTC_LISP_KEYWORD_KW 4 +#define wxSTC_LISP_SYMBOL 5 +#define wxSTC_LISP_STRING 6 +#define wxSTC_LISP_STRINGEOL 8 +#define wxSTC_LISP_IDENTIFIER 9 +#define wxSTC_LISP_OPERATOR 10 +#define wxSTC_LISP_SPECIAL 11 +#define wxSTC_LISP_MULTI_COMMENT 12 + +/// Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW +#define wxSTC_EIFFEL_DEFAULT 0 +#define wxSTC_EIFFEL_COMMENTLINE 1 +#define wxSTC_EIFFEL_NUMBER 2 +#define wxSTC_EIFFEL_WORD 3 +#define wxSTC_EIFFEL_STRING 4 +#define wxSTC_EIFFEL_CHARACTER 5 +#define wxSTC_EIFFEL_OPERATOR 6 +#define wxSTC_EIFFEL_IDENTIFIER 7 +#define wxSTC_EIFFEL_STRINGEOL 8 + +/// Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer) +#define wxSTC_NNCRONTAB_DEFAULT 0 +#define wxSTC_NNCRONTAB_COMMENT 1 +#define wxSTC_NNCRONTAB_TASK 2 +#define wxSTC_NNCRONTAB_SECTION 3 +#define wxSTC_NNCRONTAB_KEYWORD 4 +#define wxSTC_NNCRONTAB_MODIFIER 5 +#define wxSTC_NNCRONTAB_ASTERISK 6 +#define wxSTC_NNCRONTAB_NUMBER 7 +#define wxSTC_NNCRONTAB_STRING 8 +#define wxSTC_NNCRONTAB_ENVIRONMENT 9 +#define wxSTC_NNCRONTAB_IDENTIFIER 10 + +/// Lexical states for SCLEX_FORTH (Forth Lexer) +#define wxSTC_FORTH_DEFAULT 0 +#define wxSTC_FORTH_COMMENT 1 +#define wxSTC_FORTH_COMMENT_ML 2 +#define wxSTC_FORTH_IDENTIFIER 3 +#define wxSTC_FORTH_CONTROL 4 +#define wxSTC_FORTH_KEYWORD 5 +#define wxSTC_FORTH_DEFWORD 6 +#define wxSTC_FORTH_PREWORD1 7 +#define wxSTC_FORTH_PREWORD2 8 +#define wxSTC_FORTH_NUMBER 9 +#define wxSTC_FORTH_STRING 10 +#define wxSTC_FORTH_LOCALE 11 + +/// Lexical states for SCLEX_MATLAB +#define wxSTC_MATLAB_DEFAULT 0 +#define wxSTC_MATLAB_COMMENT 1 +#define wxSTC_MATLAB_COMMAND 2 +#define wxSTC_MATLAB_NUMBER 3 +#define wxSTC_MATLAB_KEYWORD 4 + +/// single quoted string +#define wxSTC_MATLAB_STRING 5 +#define wxSTC_MATLAB_OPERATOR 6 +#define wxSTC_MATLAB_IDENTIFIER 7 +#define wxSTC_MATLAB_DOUBLEQUOTESTRING 8 + +/// Lexical states for SCLEX_SCRIPTOL +#define wxSTC_SCRIPTOL_DEFAULT 0 +#define wxSTC_SCRIPTOL_WHITE 1 +#define wxSTC_SCRIPTOL_COMMENTLINE 2 +#define wxSTC_SCRIPTOL_PERSISTENT 3 +#define wxSTC_SCRIPTOL_CSTYLE 4 +#define wxSTC_SCRIPTOL_COMMENTBLOCK 5 +#define wxSTC_SCRIPTOL_NUMBER 6 +#define wxSTC_SCRIPTOL_STRING 7 +#define wxSTC_SCRIPTOL_CHARACTER 8 +#define wxSTC_SCRIPTOL_STRINGEOL 9 +#define wxSTC_SCRIPTOL_KEYWORD 10 +#define wxSTC_SCRIPTOL_OPERATOR 11 +#define wxSTC_SCRIPTOL_IDENTIFIER 12 +#define wxSTC_SCRIPTOL_TRIPLE 13 +#define wxSTC_SCRIPTOL_CLASSNAME 14 +#define wxSTC_SCRIPTOL_PREPROCESSOR 15 + +/// Lexical states for SCLEX_ASM +#define wxSTC_ASM_DEFAULT 0 +#define wxSTC_ASM_COMMENT 1 +#define wxSTC_ASM_NUMBER 2 +#define wxSTC_ASM_STRING 3 +#define wxSTC_ASM_OPERATOR 4 +#define wxSTC_ASM_IDENTIFIER 5 +#define wxSTC_ASM_CPUINSTRUCTION 6 +#define wxSTC_ASM_MATHINSTRUCTION 7 +#define wxSTC_ASM_REGISTER 8 +#define wxSTC_ASM_DIRECTIVE 9 +#define wxSTC_ASM_DIRECTIVEOPERAND 10 +#define wxSTC_ASM_COMMENTBLOCK 11 +#define wxSTC_ASM_CHARACTER 12 +#define wxSTC_ASM_STRINGEOL 13 +#define wxSTC_ASM_EXTINSTRUCTION 14 +#define wxSTC_ASM_COMMENTDIRECTIVE 15 + +/// Lexical states for SCLEX_FORTRAN +#define wxSTC_F_DEFAULT 0 +#define wxSTC_F_COMMENT 1 +#define wxSTC_F_NUMBER 2 +#define wxSTC_F_STRING1 3 +#define wxSTC_F_STRING2 4 +#define wxSTC_F_STRINGEOL 5 +#define wxSTC_F_OPERATOR 6 +#define wxSTC_F_IDENTIFIER 7 +#define wxSTC_F_WORD 8 +#define wxSTC_F_WORD2 9 +#define wxSTC_F_WORD3 10 +#define wxSTC_F_PREPROCESSOR 11 +#define wxSTC_F_OPERATOR2 12 +#define wxSTC_F_LABEL 13 +#define wxSTC_F_CONTINUATION 14 + +/// Lexical states for SCLEX_CSS +#define wxSTC_CSS_DEFAULT 0 +#define wxSTC_CSS_TAG 1 +#define wxSTC_CSS_CLASS 2 +#define wxSTC_CSS_PSEUDOCLASS 3 +#define wxSTC_CSS_UNKNOWN_PSEUDOCLASS 4 +#define wxSTC_CSS_OPERATOR 5 +#define wxSTC_CSS_IDENTIFIER 6 +#define wxSTC_CSS_UNKNOWN_IDENTIFIER 7 +#define wxSTC_CSS_VALUE 8 +#define wxSTC_CSS_COMMENT 9 +#define wxSTC_CSS_ID 10 +#define wxSTC_CSS_IMPORTANT 11 +#define wxSTC_CSS_DIRECTIVE 12 +#define wxSTC_CSS_DOUBLESTRING 13 +#define wxSTC_CSS_SINGLESTRING 14 +#define wxSTC_CSS_IDENTIFIER2 15 +#define wxSTC_CSS_ATTRIBUTE 16 +#define wxSTC_CSS_IDENTIFIER3 17 +#define wxSTC_CSS_PSEUDOELEMENT 18 +#define wxSTC_CSS_EXTENDED_IDENTIFIER 19 +#define wxSTC_CSS_EXTENDED_PSEUDOCLASS 20 +#define wxSTC_CSS_EXTENDED_PSEUDOELEMENT 21 +#define wxSTC_CSS_MEDIA 22 +#define wxSTC_CSS_VARIABLE 23 + +/// Lexical states for SCLEX_POV +#define wxSTC_POV_DEFAULT 0 +#define wxSTC_POV_COMMENT 1 +#define wxSTC_POV_COMMENTLINE 2 +#define wxSTC_POV_NUMBER 3 +#define wxSTC_POV_OPERATOR 4 +#define wxSTC_POV_IDENTIFIER 5 +#define wxSTC_POV_STRING 6 +#define wxSTC_POV_STRINGEOL 7 +#define wxSTC_POV_DIRECTIVE 8 +#define wxSTC_POV_BADDIRECTIVE 9 +#define wxSTC_POV_WORD2 10 +#define wxSTC_POV_WORD3 11 +#define wxSTC_POV_WORD4 12 +#define wxSTC_POV_WORD5 13 +#define wxSTC_POV_WORD6 14 +#define wxSTC_POV_WORD7 15 +#define wxSTC_POV_WORD8 16 + +/// Lexical states for SCLEX_LOUT +#define wxSTC_LOUT_DEFAULT 0 +#define wxSTC_LOUT_COMMENT 1 +#define wxSTC_LOUT_NUMBER 2 +#define wxSTC_LOUT_WORD 3 +#define wxSTC_LOUT_WORD2 4 +#define wxSTC_LOUT_WORD3 5 +#define wxSTC_LOUT_WORD4 6 +#define wxSTC_LOUT_STRING 7 +#define wxSTC_LOUT_OPERATOR 8 +#define wxSTC_LOUT_IDENTIFIER 9 +#define wxSTC_LOUT_STRINGEOL 10 + +/// Lexical states for SCLEX_ESCRIPT +#define wxSTC_ESCRIPT_DEFAULT 0 +#define wxSTC_ESCRIPT_COMMENT 1 +#define wxSTC_ESCRIPT_COMMENTLINE 2 +#define wxSTC_ESCRIPT_COMMENTDOC 3 +#define wxSTC_ESCRIPT_NUMBER 4 +#define wxSTC_ESCRIPT_WORD 5 +#define wxSTC_ESCRIPT_STRING 6 +#define wxSTC_ESCRIPT_OPERATOR 7 +#define wxSTC_ESCRIPT_IDENTIFIER 8 +#define wxSTC_ESCRIPT_BRACE 9 +#define wxSTC_ESCRIPT_WORD2 10 +#define wxSTC_ESCRIPT_WORD3 11 + +/// Lexical states for SCLEX_PS +#define wxSTC_PS_DEFAULT 0 +#define wxSTC_PS_COMMENT 1 +#define wxSTC_PS_DSC_COMMENT 2 +#define wxSTC_PS_DSC_VALUE 3 +#define wxSTC_PS_NUMBER 4 +#define wxSTC_PS_NAME 5 +#define wxSTC_PS_KEYWORD 6 +#define wxSTC_PS_LITERAL 7 +#define wxSTC_PS_IMMEVAL 8 +#define wxSTC_PS_PAREN_ARRAY 9 +#define wxSTC_PS_PAREN_DICT 10 +#define wxSTC_PS_PAREN_PROC 11 +#define wxSTC_PS_TEXT 12 +#define wxSTC_PS_HEXSTRING 13 +#define wxSTC_PS_BASE85STRING 14 +#define wxSTC_PS_BADSTRINGCHAR 15 + +/// Lexical states for SCLEX_NSIS +#define wxSTC_NSIS_DEFAULT 0 +#define wxSTC_NSIS_COMMENT 1 +#define wxSTC_NSIS_STRINGDQ 2 +#define wxSTC_NSIS_STRINGLQ 3 +#define wxSTC_NSIS_STRINGRQ 4 +#define wxSTC_NSIS_FUNCTION 5 +#define wxSTC_NSIS_VARIABLE 6 +#define wxSTC_NSIS_LABEL 7 +#define wxSTC_NSIS_USERDEFINED 8 +#define wxSTC_NSIS_SECTIONDEF 9 +#define wxSTC_NSIS_SUBSECTIONDEF 10 +#define wxSTC_NSIS_IFDEFINEDEF 11 +#define wxSTC_NSIS_MACRODEF 12 +#define wxSTC_NSIS_STRINGVAR 13 +#define wxSTC_NSIS_NUMBER 14 +#define wxSTC_NSIS_SECTIONGROUP 15 +#define wxSTC_NSIS_PAGEEX 16 +#define wxSTC_NSIS_FUNCTIONDEF 17 +#define wxSTC_NSIS_COMMENTBOX 18 + +/// Lexical states for SCLEX_MMIXAL +#define wxSTC_MMIXAL_LEADWS 0 +#define wxSTC_MMIXAL_COMMENT 1 +#define wxSTC_MMIXAL_LABEL 2 +#define wxSTC_MMIXAL_OPCODE 3 +#define wxSTC_MMIXAL_OPCODE_PRE 4 +#define wxSTC_MMIXAL_OPCODE_VALID 5 +#define wxSTC_MMIXAL_OPCODE_UNKNOWN 6 +#define wxSTC_MMIXAL_OPCODE_POST 7 +#define wxSTC_MMIXAL_OPERANDS 8 +#define wxSTC_MMIXAL_NUMBER 9 +#define wxSTC_MMIXAL_REF 10 +#define wxSTC_MMIXAL_CHAR 11 +#define wxSTC_MMIXAL_STRING 12 +#define wxSTC_MMIXAL_REGISTER 13 +#define wxSTC_MMIXAL_HEX 14 +#define wxSTC_MMIXAL_OPERATOR 15 +#define wxSTC_MMIXAL_SYMBOL 16 +#define wxSTC_MMIXAL_INCLUDE 17 + +/// Lexical states for SCLEX_CLW +#define wxSTC_CLW_DEFAULT 0 +#define wxSTC_CLW_LABEL 1 +#define wxSTC_CLW_COMMENT 2 +#define wxSTC_CLW_STRING 3 +#define wxSTC_CLW_USER_IDENTIFIER 4 +#define wxSTC_CLW_INTEGER_CONSTANT 5 +#define wxSTC_CLW_REAL_CONSTANT 6 +#define wxSTC_CLW_PICTURE_STRING 7 +#define wxSTC_CLW_KEYWORD 8 +#define wxSTC_CLW_COMPILER_DIRECTIVE 9 +#define wxSTC_CLW_RUNTIME_EXPRESSIONS 10 +#define wxSTC_CLW_BUILTIN_PROCEDURES_FUNCTION 11 +#define wxSTC_CLW_STRUCTURE_DATA_TYPE 12 +#define wxSTC_CLW_ATTRIBUTE 13 +#define wxSTC_CLW_STANDARD_EQUATE 14 +#define wxSTC_CLW_ERROR 15 +#define wxSTC_CLW_DEPRECATED 16 + +/// Lexical states for SCLEX_LOT +#define wxSTC_LOT_DEFAULT 0 +#define wxSTC_LOT_HEADER 1 +#define wxSTC_LOT_BREAK 2 +#define wxSTC_LOT_SET 3 +#define wxSTC_LOT_PASS 4 +#define wxSTC_LOT_FAIL 5 +#define wxSTC_LOT_ABORT 6 + +/// Lexical states for SCLEX_YAML +#define wxSTC_YAML_DEFAULT 0 +#define wxSTC_YAML_COMMENT 1 +#define wxSTC_YAML_IDENTIFIER 2 +#define wxSTC_YAML_KEYWORD 3 +#define wxSTC_YAML_NUMBER 4 +#define wxSTC_YAML_REFERENCE 5 +#define wxSTC_YAML_DOCUMENT 6 +#define wxSTC_YAML_TEXT 7 +#define wxSTC_YAML_ERROR 8 +#define wxSTC_YAML_OPERATOR 9 + +/// Lexical states for SCLEX_TEX +#define wxSTC_TEX_DEFAULT 0 +#define wxSTC_TEX_SPECIAL 1 +#define wxSTC_TEX_GROUP 2 +#define wxSTC_TEX_SYMBOL 3 +#define wxSTC_TEX_COMMAND 4 +#define wxSTC_TEX_TEXT 5 +#define wxSTC_METAPOST_DEFAULT 0 +#define wxSTC_METAPOST_SPECIAL 1 +#define wxSTC_METAPOST_GROUP 2 +#define wxSTC_METAPOST_SYMBOL 3 +#define wxSTC_METAPOST_COMMAND 4 +#define wxSTC_METAPOST_TEXT 5 +#define wxSTC_METAPOST_EXTRA 6 + +/// Lexical states for SCLEX_ERLANG +#define wxSTC_ERLANG_DEFAULT 0 +#define wxSTC_ERLANG_COMMENT 1 +#define wxSTC_ERLANG_VARIABLE 2 +#define wxSTC_ERLANG_NUMBER 3 +#define wxSTC_ERLANG_KEYWORD 4 +#define wxSTC_ERLANG_STRING 5 +#define wxSTC_ERLANG_OPERATOR 6 +#define wxSTC_ERLANG_ATOM 7 +#define wxSTC_ERLANG_FUNCTION_NAME 8 +#define wxSTC_ERLANG_CHARACTER 9 +#define wxSTC_ERLANG_MACRO 10 +#define wxSTC_ERLANG_RECORD 11 +#define wxSTC_ERLANG_PREPROC 12 +#define wxSTC_ERLANG_NODE_NAME 13 +#define wxSTC_ERLANG_COMMENT_FUNCTION 14 +#define wxSTC_ERLANG_COMMENT_MODULE 15 +#define wxSTC_ERLANG_COMMENT_DOC 16 +#define wxSTC_ERLANG_COMMENT_DOC_MACRO 17 +#define wxSTC_ERLANG_ATOM_QUOTED 18 +#define wxSTC_ERLANG_MACRO_QUOTED 19 +#define wxSTC_ERLANG_RECORD_QUOTED 20 +#define wxSTC_ERLANG_NODE_NAME_QUOTED 21 +#define wxSTC_ERLANG_BIFS 22 +#define wxSTC_ERLANG_MODULES 23 +#define wxSTC_ERLANG_MODULES_ATT 24 +#define wxSTC_ERLANG_UNKNOWN 31 + +/// Lexical states for SCLEX_OCTAVE are identical to MatLab +/// Lexical states for SCLEX_MSSQL +#define wxSTC_MSSQL_DEFAULT 0 +#define wxSTC_MSSQL_COMMENT 1 +#define wxSTC_MSSQL_LINE_COMMENT 2 +#define wxSTC_MSSQL_NUMBER 3 +#define wxSTC_MSSQL_STRING 4 +#define wxSTC_MSSQL_OPERATOR 5 +#define wxSTC_MSSQL_IDENTIFIER 6 +#define wxSTC_MSSQL_VARIABLE 7 +#define wxSTC_MSSQL_COLUMN_NAME 8 +#define wxSTC_MSSQL_STATEMENT 9 +#define wxSTC_MSSQL_DATATYPE 10 +#define wxSTC_MSSQL_SYSTABLE 11 +#define wxSTC_MSSQL_GLOBAL_VARIABLE 12 +#define wxSTC_MSSQL_FUNCTION 13 +#define wxSTC_MSSQL_STORED_PROCEDURE 14 +#define wxSTC_MSSQL_DEFAULT_PREF_DATATYPE 15 +#define wxSTC_MSSQL_COLUMN_NAME_2 16 + +/// Lexical states for SCLEX_VERILOG +#define wxSTC_V_DEFAULT 0 +#define wxSTC_V_COMMENT 1 +#define wxSTC_V_COMMENTLINE 2 +#define wxSTC_V_COMMENTLINEBANG 3 +#define wxSTC_V_NUMBER 4 +#define wxSTC_V_WORD 5 +#define wxSTC_V_STRING 6 +#define wxSTC_V_WORD2 7 +#define wxSTC_V_WORD3 8 +#define wxSTC_V_PREPROCESSOR 9 +#define wxSTC_V_OPERATOR 10 +#define wxSTC_V_IDENTIFIER 11 +#define wxSTC_V_STRINGEOL 12 +#define wxSTC_V_USER 19 + +/// Lexical states for SCLEX_KIX +#define wxSTC_KIX_DEFAULT 0 +#define wxSTC_KIX_COMMENT 1 +#define wxSTC_KIX_STRING1 2 +#define wxSTC_KIX_STRING2 3 +#define wxSTC_KIX_NUMBER 4 +#define wxSTC_KIX_VAR 5 +#define wxSTC_KIX_MACRO 6 +#define wxSTC_KIX_KEYWORD 7 +#define wxSTC_KIX_FUNCTIONS 8 +#define wxSTC_KIX_OPERATOR 9 +#define wxSTC_KIX_IDENTIFIER 31 + +/// Lexical states for SCLEX_GUI4CLI +#define wxSTC_GC_DEFAULT 0 +#define wxSTC_GC_COMMENTLINE 1 +#define wxSTC_GC_COMMENTBLOCK 2 +#define wxSTC_GC_GLOBAL 3 +#define wxSTC_GC_EVENT 4 +#define wxSTC_GC_ATTRIBUTE 5 +#define wxSTC_GC_CONTROL 6 +#define wxSTC_GC_COMMAND 7 +#define wxSTC_GC_STRING 8 +#define wxSTC_GC_OPERATOR 9 + +/// Lexical states for SCLEX_SPECMAN +#define wxSTC_SN_DEFAULT 0 +#define wxSTC_SN_CODE 1 +#define wxSTC_SN_COMMENTLINE 2 +#define wxSTC_SN_COMMENTLINEBANG 3 +#define wxSTC_SN_NUMBER 4 +#define wxSTC_SN_WORD 5 +#define wxSTC_SN_STRING 6 +#define wxSTC_SN_WORD2 7 +#define wxSTC_SN_WORD3 8 +#define wxSTC_SN_PREPROCESSOR 9 +#define wxSTC_SN_OPERATOR 10 +#define wxSTC_SN_IDENTIFIER 11 +#define wxSTC_SN_STRINGEOL 12 +#define wxSTC_SN_REGEXTAG 13 +#define wxSTC_SN_SIGNAL 14 +#define wxSTC_SN_USER 19 + +/// Lexical states for SCLEX_AU3 +#define wxSTC_AU3_DEFAULT 0 +#define wxSTC_AU3_COMMENT 1 +#define wxSTC_AU3_COMMENTBLOCK 2 +#define wxSTC_AU3_NUMBER 3 +#define wxSTC_AU3_FUNCTION 4 +#define wxSTC_AU3_KEYWORD 5 +#define wxSTC_AU3_MACRO 6 +#define wxSTC_AU3_STRING 7 +#define wxSTC_AU3_OPERATOR 8 +#define wxSTC_AU3_VARIABLE 9 +#define wxSTC_AU3_SENT 10 +#define wxSTC_AU3_PREPROCESSOR 11 +#define wxSTC_AU3_SPECIAL 12 +#define wxSTC_AU3_EXPAND 13 +#define wxSTC_AU3_COMOBJ 14 +#define wxSTC_AU3_UDF 15 + +/// Lexical states for SCLEX_APDL +#define wxSTC_APDL_DEFAULT 0 +#define wxSTC_APDL_COMMENT 1 +#define wxSTC_APDL_COMMENTBLOCK 2 +#define wxSTC_APDL_NUMBER 3 +#define wxSTC_APDL_STRING 4 +#define wxSTC_APDL_OPERATOR 5 +#define wxSTC_APDL_WORD 6 +#define wxSTC_APDL_PROCESSOR 7 +#define wxSTC_APDL_COMMAND 8 +#define wxSTC_APDL_SLASHCOMMAND 9 +#define wxSTC_APDL_STARCOMMAND 10 +#define wxSTC_APDL_ARGUMENT 11 +#define wxSTC_APDL_FUNCTION 12 + +/// Lexical states for SCLEX_BASH +#define wxSTC_SH_DEFAULT 0 +#define wxSTC_SH_ERROR 1 +#define wxSTC_SH_COMMENTLINE 2 +#define wxSTC_SH_NUMBER 3 +#define wxSTC_SH_WORD 4 +#define wxSTC_SH_STRING 5 +#define wxSTC_SH_CHARACTER 6 +#define wxSTC_SH_OPERATOR 7 +#define wxSTC_SH_IDENTIFIER 8 +#define wxSTC_SH_SCALAR 9 +#define wxSTC_SH_PARAM 10 +#define wxSTC_SH_BACKTICKS 11 +#define wxSTC_SH_HERE_DELIM 12 +#define wxSTC_SH_HERE_Q 13 + +/// Lexical states for SCLEX_ASN1 +#define wxSTC_ASN1_DEFAULT 0 +#define wxSTC_ASN1_COMMENT 1 +#define wxSTC_ASN1_IDENTIFIER 2 +#define wxSTC_ASN1_STRING 3 +#define wxSTC_ASN1_OID 4 +#define wxSTC_ASN1_SCALAR 5 +#define wxSTC_ASN1_KEYWORD 6 +#define wxSTC_ASN1_ATTRIBUTE 7 +#define wxSTC_ASN1_DESCRIPTOR 8 +#define wxSTC_ASN1_TYPE 9 +#define wxSTC_ASN1_OPERATOR 10 + +/// Lexical states for SCLEX_VHDL +#define wxSTC_VHDL_DEFAULT 0 +#define wxSTC_VHDL_COMMENT 1 +#define wxSTC_VHDL_COMMENTLINEBANG 2 +#define wxSTC_VHDL_NUMBER 3 +#define wxSTC_VHDL_STRING 4 +#define wxSTC_VHDL_OPERATOR 5 +#define wxSTC_VHDL_IDENTIFIER 6 +#define wxSTC_VHDL_STRINGEOL 7 +#define wxSTC_VHDL_KEYWORD 8 +#define wxSTC_VHDL_STDOPERATOR 9 +#define wxSTC_VHDL_ATTRIBUTE 10 +#define wxSTC_VHDL_STDFUNCTION 11 +#define wxSTC_VHDL_STDPACKAGE 12 +#define wxSTC_VHDL_STDTYPE 13 +#define wxSTC_VHDL_USERWORD 14 + +/// Lexical states for SCLEX_CAML +#define wxSTC_CAML_DEFAULT 0 +#define wxSTC_CAML_IDENTIFIER 1 +#define wxSTC_CAML_TAGNAME 2 +#define wxSTC_CAML_KEYWORD 3 +#define wxSTC_CAML_KEYWORD2 4 +#define wxSTC_CAML_KEYWORD3 5 +#define wxSTC_CAML_LINENUM 6 +#define wxSTC_CAML_OPERATOR 7 +#define wxSTC_CAML_NUMBER 8 +#define wxSTC_CAML_CHAR 9 +#define wxSTC_CAML_WHITE 10 +#define wxSTC_CAML_STRING 11 +#define wxSTC_CAML_COMMENT 12 +#define wxSTC_CAML_COMMENT1 13 +#define wxSTC_CAML_COMMENT2 14 +#define wxSTC_CAML_COMMENT3 15 + +/// Lexical states for SCLEX_HASKELL +#define wxSTC_HA_DEFAULT 0 +#define wxSTC_HA_IDENTIFIER 1 +#define wxSTC_HA_KEYWORD 2 +#define wxSTC_HA_NUMBER 3 +#define wxSTC_HA_STRING 4 +#define wxSTC_HA_CHARACTER 5 +#define wxSTC_HA_CLASS 6 +#define wxSTC_HA_MODULE 7 +#define wxSTC_HA_CAPITAL 8 +#define wxSTC_HA_DATA 9 +#define wxSTC_HA_IMPORT 10 +#define wxSTC_HA_OPERATOR 11 +#define wxSTC_HA_INSTANCE 12 +#define wxSTC_HA_COMMENTLINE 13 +#define wxSTC_HA_COMMENTBLOCK 14 +#define wxSTC_HA_COMMENTBLOCK2 15 +#define wxSTC_HA_COMMENTBLOCK3 16 + +/// Lexical states of SCLEX_TADS3 +#define wxSTC_T3_DEFAULT 0 +#define wxSTC_T3_X_DEFAULT 1 +#define wxSTC_T3_PREPROCESSOR 2 +#define wxSTC_T3_BLOCK_COMMENT 3 +#define wxSTC_T3_LINE_COMMENT 4 +#define wxSTC_T3_OPERATOR 5 +#define wxSTC_T3_KEYWORD 6 +#define wxSTC_T3_NUMBER 7 +#define wxSTC_T3_IDENTIFIER 8 +#define wxSTC_T3_S_STRING 9 +#define wxSTC_T3_D_STRING 10 +#define wxSTC_T3_X_STRING 11 +#define wxSTC_T3_LIB_DIRECTIVE 12 +#define wxSTC_T3_MSG_PARAM 13 +#define wxSTC_T3_HTML_TAG 14 +#define wxSTC_T3_HTML_DEFAULT 15 +#define wxSTC_T3_HTML_STRING 16 +#define wxSTC_T3_USER1 17 +#define wxSTC_T3_USER2 18 +#define wxSTC_T3_USER3 19 +#define wxSTC_T3_BRACE 20 + +/// Lexical states for SCLEX_REBOL +#define wxSTC_REBOL_DEFAULT 0 +#define wxSTC_REBOL_COMMENTLINE 1 +#define wxSTC_REBOL_COMMENTBLOCK 2 +#define wxSTC_REBOL_PREFACE 3 +#define wxSTC_REBOL_OPERATOR 4 +#define wxSTC_REBOL_CHARACTER 5 +#define wxSTC_REBOL_QUOTEDSTRING 6 +#define wxSTC_REBOL_BRACEDSTRING 7 +#define wxSTC_REBOL_NUMBER 8 +#define wxSTC_REBOL_PAIR 9 +#define wxSTC_REBOL_TUPLE 10 +#define wxSTC_REBOL_BINARY 11 +#define wxSTC_REBOL_MONEY 12 +#define wxSTC_REBOL_ISSUE 13 +#define wxSTC_REBOL_TAG 14 +#define wxSTC_REBOL_FILE 15 +#define wxSTC_REBOL_EMAIL 16 +#define wxSTC_REBOL_URL 17 +#define wxSTC_REBOL_DATE 18 +#define wxSTC_REBOL_TIME 19 +#define wxSTC_REBOL_IDENTIFIER 20 +#define wxSTC_REBOL_WORD 21 +#define wxSTC_REBOL_WORD2 22 +#define wxSTC_REBOL_WORD3 23 +#define wxSTC_REBOL_WORD4 24 +#define wxSTC_REBOL_WORD5 25 +#define wxSTC_REBOL_WORD6 26 +#define wxSTC_REBOL_WORD7 27 +#define wxSTC_REBOL_WORD8 28 + +/// Lexical states for SCLEX_SQL +#define wxSTC_SQL_DEFAULT 0 +#define wxSTC_SQL_COMMENT 1 +#define wxSTC_SQL_COMMENTLINE 2 +#define wxSTC_SQL_COMMENTDOC 3 +#define wxSTC_SQL_NUMBER 4 +#define wxSTC_SQL_WORD 5 +#define wxSTC_SQL_STRING 6 +#define wxSTC_SQL_CHARACTER 7 +#define wxSTC_SQL_SQLPLUS 8 +#define wxSTC_SQL_SQLPLUS_PROMPT 9 +#define wxSTC_SQL_OPERATOR 10 +#define wxSTC_SQL_IDENTIFIER 11 +#define wxSTC_SQL_SQLPLUS_COMMENT 13 +#define wxSTC_SQL_COMMENTLINEDOC 15 +#define wxSTC_SQL_WORD2 16 +#define wxSTC_SQL_COMMENTDOCKEYWORD 17 +#define wxSTC_SQL_COMMENTDOCKEYWORDERROR 18 +#define wxSTC_SQL_USER1 19 +#define wxSTC_SQL_USER2 20 +#define wxSTC_SQL_USER3 21 +#define wxSTC_SQL_USER4 22 +#define wxSTC_SQL_QUOTEDIDENTIFIER 23 + +/// Lexical states for SCLEX_SMALLTALK +#define wxSTC_ST_DEFAULT 0 +#define wxSTC_ST_STRING 1 +#define wxSTC_ST_NUMBER 2 +#define wxSTC_ST_COMMENT 3 +#define wxSTC_ST_SYMBOL 4 +#define wxSTC_ST_BINARY 5 +#define wxSTC_ST_BOOL 6 +#define wxSTC_ST_SELF 7 +#define wxSTC_ST_SUPER 8 +#define wxSTC_ST_NIL 9 +#define wxSTC_ST_GLOBAL 10 +#define wxSTC_ST_RETURN 11 +#define wxSTC_ST_SPECIAL 12 +#define wxSTC_ST_KWSEND 13 +#define wxSTC_ST_ASSIGN 14 +#define wxSTC_ST_CHARACTER 15 +#define wxSTC_ST_SPEC_SEL 16 + +/// Lexical states for SCLEX_FLAGSHIP (clipper) +#define wxSTC_FS_DEFAULT 0 +#define wxSTC_FS_COMMENT 1 +#define wxSTC_FS_COMMENTLINE 2 +#define wxSTC_FS_COMMENTDOC 3 +#define wxSTC_FS_COMMENTLINEDOC 4 +#define wxSTC_FS_COMMENTDOCKEYWORD 5 +#define wxSTC_FS_COMMENTDOCKEYWORDERROR 6 +#define wxSTC_FS_KEYWORD 7 +#define wxSTC_FS_KEYWORD2 8 +#define wxSTC_FS_KEYWORD3 9 +#define wxSTC_FS_KEYWORD4 10 +#define wxSTC_FS_NUMBER 11 +#define wxSTC_FS_STRING 12 +#define wxSTC_FS_PREPROCESSOR 13 +#define wxSTC_FS_OPERATOR 14 +#define wxSTC_FS_IDENTIFIER 15 +#define wxSTC_FS_DATE 16 +#define wxSTC_FS_STRINGEOL 17 +#define wxSTC_FS_CONSTANT 18 +#define wxSTC_FS_WORDOPERATOR 19 +#define wxSTC_FS_DISABLEDCODE 20 +#define wxSTC_FS_DEFAULT_C 21 +#define wxSTC_FS_COMMENTDOC_C 22 +#define wxSTC_FS_COMMENTLINEDOC_C 23 +#define wxSTC_FS_KEYWORD_C 24 +#define wxSTC_FS_KEYWORD2_C 25 +#define wxSTC_FS_NUMBER_C 26 +#define wxSTC_FS_STRING_C 27 +#define wxSTC_FS_PREPROCESSOR_C 28 +#define wxSTC_FS_OPERATOR_C 29 +#define wxSTC_FS_IDENTIFIER_C 30 +#define wxSTC_FS_STRINGEOL_C 31 + +/// Lexical states for SCLEX_CSOUND +#define wxSTC_CSOUND_DEFAULT 0 +#define wxSTC_CSOUND_COMMENT 1 +#define wxSTC_CSOUND_NUMBER 2 +#define wxSTC_CSOUND_OPERATOR 3 +#define wxSTC_CSOUND_INSTR 4 +#define wxSTC_CSOUND_IDENTIFIER 5 +#define wxSTC_CSOUND_OPCODE 6 +#define wxSTC_CSOUND_HEADERSTMT 7 +#define wxSTC_CSOUND_USERKEYWORD 8 +#define wxSTC_CSOUND_COMMENTBLOCK 9 +#define wxSTC_CSOUND_PARAM 10 +#define wxSTC_CSOUND_ARATE_VAR 11 +#define wxSTC_CSOUND_KRATE_VAR 12 +#define wxSTC_CSOUND_IRATE_VAR 13 +#define wxSTC_CSOUND_GLOBAL_VAR 14 +#define wxSTC_CSOUND_STRINGEOL 15 + +/// Lexical states for SCLEX_INNOSETUP +#define wxSTC_INNO_DEFAULT 0 +#define wxSTC_INNO_COMMENT 1 +#define wxSTC_INNO_KEYWORD 2 +#define wxSTC_INNO_PARAMETER 3 +#define wxSTC_INNO_SECTION 4 +#define wxSTC_INNO_PREPROC 5 +#define wxSTC_INNO_INLINE_EXPANSION 6 +#define wxSTC_INNO_COMMENT_PASCAL 7 +#define wxSTC_INNO_KEYWORD_PASCAL 8 +#define wxSTC_INNO_KEYWORD_USER 9 +#define wxSTC_INNO_STRING_DOUBLE 10 +#define wxSTC_INNO_STRING_SINGLE 11 +#define wxSTC_INNO_IDENTIFIER 12 + +/// Lexical states for SCLEX_OPAL +#define wxSTC_OPAL_SPACE 0 +#define wxSTC_OPAL_COMMENT_BLOCK 1 +#define wxSTC_OPAL_COMMENT_LINE 2 +#define wxSTC_OPAL_INTEGER 3 +#define wxSTC_OPAL_KEYWORD 4 +#define wxSTC_OPAL_SORT 5 +#define wxSTC_OPAL_STRING 6 +#define wxSTC_OPAL_PAR 7 +#define wxSTC_OPAL_BOOL_CONST 8 +#define wxSTC_OPAL_DEFAULT 32 + +/// Lexical states for SCLEX_SPICE +#define wxSTC_SPICE_DEFAULT 0 +#define wxSTC_SPICE_IDENTIFIER 1 +#define wxSTC_SPICE_KEYWORD 2 +#define wxSTC_SPICE_KEYWORD2 3 +#define wxSTC_SPICE_KEYWORD3 4 +#define wxSTC_SPICE_NUMBER 5 +#define wxSTC_SPICE_DELIMITER 6 +#define wxSTC_SPICE_VALUE 7 +#define wxSTC_SPICE_COMMENTLINE 8 + +/// Lexical states for SCLEX_CMAKE +#define wxSTC_CMAKE_DEFAULT 0 +#define wxSTC_CMAKE_COMMENT 1 +#define wxSTC_CMAKE_STRINGDQ 2 +#define wxSTC_CMAKE_STRINGLQ 3 +#define wxSTC_CMAKE_STRINGRQ 4 +#define wxSTC_CMAKE_COMMANDS 5 +#define wxSTC_CMAKE_PARAMETERS 6 +#define wxSTC_CMAKE_VARIABLE 7 +#define wxSTC_CMAKE_USERDEFINED 8 +#define wxSTC_CMAKE_WHILEDEF 9 +#define wxSTC_CMAKE_FOREACHDEF 10 +#define wxSTC_CMAKE_IFDEFINEDEF 11 +#define wxSTC_CMAKE_MACRODEF 12 +#define wxSTC_CMAKE_STRINGVAR 13 +#define wxSTC_CMAKE_NUMBER 14 + +/// Lexical states for SCLEX_GAP +#define wxSTC_GAP_DEFAULT 0 +#define wxSTC_GAP_IDENTIFIER 1 +#define wxSTC_GAP_KEYWORD 2 +#define wxSTC_GAP_KEYWORD2 3 +#define wxSTC_GAP_KEYWORD3 4 +#define wxSTC_GAP_KEYWORD4 5 +#define wxSTC_GAP_STRING 6 +#define wxSTC_GAP_CHAR 7 +#define wxSTC_GAP_OPERATOR 8 +#define wxSTC_GAP_COMMENT 9 +#define wxSTC_GAP_NUMBER 10 +#define wxSTC_GAP_STRINGEOL 11 + +/// Lexical state for SCLEX_PLM +#define wxSTC_PLM_DEFAULT 0 +#define wxSTC_PLM_COMMENT 1 +#define wxSTC_PLM_STRING 2 +#define wxSTC_PLM_NUMBER 3 +#define wxSTC_PLM_IDENTIFIER 4 +#define wxSTC_PLM_OPERATOR 5 +#define wxSTC_PLM_CONTROL 6 +#define wxSTC_PLM_KEYWORD 7 + +/// Lexical state for SCLEX_PROGRESS +#define wxSTC_4GL_DEFAULT 0 +#define wxSTC_4GL_NUMBER 1 +#define wxSTC_4GL_WORD 2 +#define wxSTC_4GL_STRING 3 +#define wxSTC_4GL_CHARACTER 4 +#define wxSTC_4GL_PREPROCESSOR 5 +#define wxSTC_4GL_OPERATOR 6 +#define wxSTC_4GL_IDENTIFIER 7 +#define wxSTC_4GL_BLOCK 8 +#define wxSTC_4GL_END 9 +#define wxSTC_4GL_COMMENT1 10 +#define wxSTC_4GL_COMMENT2 11 +#define wxSTC_4GL_COMMENT3 12 +#define wxSTC_4GL_COMMENT4 13 +#define wxSTC_4GL_COMMENT5 14 +#define wxSTC_4GL_COMMENT6 15 +#define wxSTC_4GL_DEFAULT_ 16 +#define wxSTC_4GL_NUMBER_ 17 +#define wxSTC_4GL_WORD_ 18 +#define wxSTC_4GL_STRING_ 19 +#define wxSTC_4GL_CHARACTER_ 20 +#define wxSTC_4GL_PREPROCESSOR_ 21 +#define wxSTC_4GL_OPERATOR_ 22 +#define wxSTC_4GL_IDENTIFIER_ 23 +#define wxSTC_4GL_BLOCK_ 24 +#define wxSTC_4GL_END_ 25 +#define wxSTC_4GL_COMMENT1_ 26 +#define wxSTC_4GL_COMMENT2_ 27 +#define wxSTC_4GL_COMMENT3_ 28 +#define wxSTC_4GL_COMMENT4_ 29 +#define wxSTC_4GL_COMMENT5_ 30 +#define wxSTC_4GL_COMMENT6_ 31 + +/// Lexical states for SCLEX_ABAQUS +#define wxSTC_ABAQUS_DEFAULT 0 +#define wxSTC_ABAQUS_COMMENT 1 +#define wxSTC_ABAQUS_COMMENTBLOCK 2 +#define wxSTC_ABAQUS_NUMBER 3 +#define wxSTC_ABAQUS_STRING 4 +#define wxSTC_ABAQUS_OPERATOR 5 +#define wxSTC_ABAQUS_WORD 6 +#define wxSTC_ABAQUS_PROCESSOR 7 +#define wxSTC_ABAQUS_COMMAND 8 +#define wxSTC_ABAQUS_SLASHCOMMAND 9 +#define wxSTC_ABAQUS_STARCOMMAND 10 +#define wxSTC_ABAQUS_ARGUMENT 11 +#define wxSTC_ABAQUS_FUNCTION 12 + +/// Lexical states for SCLEX_ASYMPTOTE +#define wxSTC_ASY_DEFAULT 0 +#define wxSTC_ASY_COMMENT 1 +#define wxSTC_ASY_COMMENTLINE 2 +#define wxSTC_ASY_NUMBER 3 +#define wxSTC_ASY_WORD 4 +#define wxSTC_ASY_STRING 5 +#define wxSTC_ASY_CHARACTER 6 +#define wxSTC_ASY_OPERATOR 7 +#define wxSTC_ASY_IDENTIFIER 8 +#define wxSTC_ASY_STRINGEOL 9 +#define wxSTC_ASY_COMMENTLINEDOC 10 +#define wxSTC_ASY_WORD2 11 + +/// Lexical states for SCLEX_R +#define wxSTC_R_DEFAULT 0 +#define wxSTC_R_COMMENT 1 +#define wxSTC_R_KWORD 2 +#define wxSTC_R_BASEKWORD 3 +#define wxSTC_R_OTHERKWORD 4 +#define wxSTC_R_NUMBER 5 +#define wxSTC_R_STRING 6 +#define wxSTC_R_STRING2 7 +#define wxSTC_R_OPERATOR 8 +#define wxSTC_R_IDENTIFIER 9 +#define wxSTC_R_INFIX 10 +#define wxSTC_R_INFIXEOL 11 + +/// Lexical state for SCLEX_MAGIKSF +#define wxSTC_MAGIK_DEFAULT 0 +#define wxSTC_MAGIK_COMMENT 1 +#define wxSTC_MAGIK_HYPER_COMMENT 16 +#define wxSTC_MAGIK_STRING 2 +#define wxSTC_MAGIK_CHARACTER 3 +#define wxSTC_MAGIK_NUMBER 4 +#define wxSTC_MAGIK_IDENTIFIER 5 +#define wxSTC_MAGIK_OPERATOR 6 +#define wxSTC_MAGIK_FLOW 7 +#define wxSTC_MAGIK_CONTAINER 8 +#define wxSTC_MAGIK_BRACKET_BLOCK 9 +#define wxSTC_MAGIK_BRACE_BLOCK 10 +#define wxSTC_MAGIK_SQBRACKET_BLOCK 11 +#define wxSTC_MAGIK_UNKNOWN_KEYWORD 12 +#define wxSTC_MAGIK_KEYWORD 13 +#define wxSTC_MAGIK_PRAGMA 14 +#define wxSTC_MAGIK_SYMBOL 15 + +/// Lexical state for SCLEX_POWERSHELL +#define wxSTC_POWERSHELL_DEFAULT 0 +#define wxSTC_POWERSHELL_COMMENT 1 +#define wxSTC_POWERSHELL_STRING 2 +#define wxSTC_POWERSHELL_CHARACTER 3 +#define wxSTC_POWERSHELL_NUMBER 4 +#define wxSTC_POWERSHELL_VARIABLE 5 +#define wxSTC_POWERSHELL_OPERATOR 6 +#define wxSTC_POWERSHELL_IDENTIFIER 7 +#define wxSTC_POWERSHELL_KEYWORD 8 +#define wxSTC_POWERSHELL_CMDLET 9 +#define wxSTC_POWERSHELL_ALIAS 10 +#define wxSTC_POWERSHELL_FUNCTION 11 +#define wxSTC_POWERSHELL_USER1 12 +#define wxSTC_POWERSHELL_COMMENTSTREAM 13 + +/// Lexical state for SCLEX_MYSQL +#define wxSTC_MYSQL_DEFAULT 0 +#define wxSTC_MYSQL_COMMENT 1 +#define wxSTC_MYSQL_COMMENTLINE 2 +#define wxSTC_MYSQL_VARIABLE 3 +#define wxSTC_MYSQL_SYSTEMVARIABLE 4 +#define wxSTC_MYSQL_KNOWNSYSTEMVARIABLE 5 +#define wxSTC_MYSQL_NUMBER 6 +#define wxSTC_MYSQL_MAJORKEYWORD 7 +#define wxSTC_MYSQL_KEYWORD 8 +#define wxSTC_MYSQL_DATABASEOBJECT 9 +#define wxSTC_MYSQL_PROCEDUREKEYWORD 10 +#define wxSTC_MYSQL_STRING 11 +#define wxSTC_MYSQL_SQSTRING 12 +#define wxSTC_MYSQL_DQSTRING 13 +#define wxSTC_MYSQL_OPERATOR 14 +#define wxSTC_MYSQL_FUNCTION 15 +#define wxSTC_MYSQL_IDENTIFIER 16 +#define wxSTC_MYSQL_QUOTEDIDENTIFIER 17 +#define wxSTC_MYSQL_USER1 18 +#define wxSTC_MYSQL_USER2 19 +#define wxSTC_MYSQL_USER3 20 +#define wxSTC_MYSQL_HIDDENCOMMAND 21 + +/// Lexical state for SCLEX_PO +#define wxSTC_PO_DEFAULT 0 +#define wxSTC_PO_COMMENT 1 +#define wxSTC_PO_MSGID 2 +#define wxSTC_PO_MSGID_TEXT 3 +#define wxSTC_PO_MSGSTR 4 +#define wxSTC_PO_MSGSTR_TEXT 5 +#define wxSTC_PO_MSGCTXT 6 +#define wxSTC_PO_MSGCTXT_TEXT 7 +#define wxSTC_PO_FUZZY 8 + +/// Lexical states for SCLEX_PASCAL +#define wxSTC_PAS_DEFAULT 0 +#define wxSTC_PAS_IDENTIFIER 1 +#define wxSTC_PAS_COMMENT 2 +#define wxSTC_PAS_COMMENT2 3 +#define wxSTC_PAS_COMMENTLINE 4 +#define wxSTC_PAS_PREPROCESSOR 5 +#define wxSTC_PAS_PREPROCESSOR2 6 +#define wxSTC_PAS_NUMBER 7 +#define wxSTC_PAS_HEXNUMBER 8 +#define wxSTC_PAS_WORD 9 +#define wxSTC_PAS_STRING 10 +#define wxSTC_PAS_STRINGEOL 11 +#define wxSTC_PAS_CHARACTER 12 +#define wxSTC_PAS_OPERATOR 13 +#define wxSTC_PAS_ASM 14 + +/// Lexical state for SCLEX_SORCUS +#define wxSTC_SORCUS_DEFAULT 0 +#define wxSTC_SORCUS_COMMAND 1 +#define wxSTC_SORCUS_PARAMETER 2 +#define wxSTC_SORCUS_COMMENTLINE 3 +#define wxSTC_SORCUS_STRING 4 +#define wxSTC_SORCUS_STRINGEOL 5 +#define wxSTC_SORCUS_IDENTIFIER 6 +#define wxSTC_SORCUS_OPERATOR 7 +#define wxSTC_SORCUS_NUMBER 8 +#define wxSTC_SORCUS_CONSTANT 9 + +/// Lexical state for SCLEX_POWERPRO +#define wxSTC_POWERPRO_DEFAULT 0 +#define wxSTC_POWERPRO_COMMENTBLOCK 1 +#define wxSTC_POWERPRO_COMMENTLINE 2 +#define wxSTC_POWERPRO_NUMBER 3 +#define wxSTC_POWERPRO_WORD 4 +#define wxSTC_POWERPRO_WORD2 5 +#define wxSTC_POWERPRO_WORD3 6 +#define wxSTC_POWERPRO_WORD4 7 +#define wxSTC_POWERPRO_DOUBLEQUOTEDSTRING 8 +#define wxSTC_POWERPRO_SINGLEQUOTEDSTRING 9 +#define wxSTC_POWERPRO_LINECONTINUE 10 +#define wxSTC_POWERPRO_OPERATOR 11 +#define wxSTC_POWERPRO_IDENTIFIER 12 +#define wxSTC_POWERPRO_STRINGEOL 13 +#define wxSTC_POWERPRO_VERBATIM 14 +#define wxSTC_POWERPRO_ALTQUOTE 15 +#define wxSTC_POWERPRO_FUNCTION 16 + +/// Lexical states for SCLEX_SML +#define wxSTC_SML_DEFAULT 0 +#define wxSTC_SML_IDENTIFIER 1 +#define wxSTC_SML_TAGNAME 2 +#define wxSTC_SML_KEYWORD 3 +#define wxSTC_SML_KEYWORD2 4 +#define wxSTC_SML_KEYWORD3 5 +#define wxSTC_SML_LINENUM 6 +#define wxSTC_SML_OPERATOR 7 +#define wxSTC_SML_NUMBER 8 +#define wxSTC_SML_CHAR 9 +#define wxSTC_SML_STRING 11 +#define wxSTC_SML_COMMENT 12 +#define wxSTC_SML_COMMENT1 13 +#define wxSTC_SML_COMMENT2 14 +#define wxSTC_SML_COMMENT3 15 + +/// Lexical state for SCLEX_MARKDOWN +#define wxSTC_MARKDOWN_DEFAULT 0 +#define wxSTC_MARKDOWN_LINE_BEGIN 1 +#define wxSTC_MARKDOWN_STRONG1 2 +#define wxSTC_MARKDOWN_STRONG2 3 +#define wxSTC_MARKDOWN_EM1 4 +#define wxSTC_MARKDOWN_EM2 5 +#define wxSTC_MARKDOWN_HEADER1 6 +#define wxSTC_MARKDOWN_HEADER2 7 +#define wxSTC_MARKDOWN_HEADER3 8 +#define wxSTC_MARKDOWN_HEADER4 9 +#define wxSTC_MARKDOWN_HEADER5 10 +#define wxSTC_MARKDOWN_HEADER6 11 +#define wxSTC_MARKDOWN_PRECHAR 12 +#define wxSTC_MARKDOWN_ULIST_ITEM 13 +#define wxSTC_MARKDOWN_OLIST_ITEM 14 +#define wxSTC_MARKDOWN_BLOCKQUOTE 15 +#define wxSTC_MARKDOWN_STRIKEOUT 16 +#define wxSTC_MARKDOWN_HRULE 17 +#define wxSTC_MARKDOWN_LINK 18 +#define wxSTC_MARKDOWN_CODE 19 +#define wxSTC_MARKDOWN_CODE2 20 +#define wxSTC_MARKDOWN_CODEBK 21 + +/// Lexical state for SCLEX_TXT2TAGS +#define wxSTC_TXT2TAGS_DEFAULT 0 +#define wxSTC_TXT2TAGS_LINE_BEGIN 1 +#define wxSTC_TXT2TAGS_STRONG1 2 +#define wxSTC_TXT2TAGS_STRONG2 3 +#define wxSTC_TXT2TAGS_EM1 4 +#define wxSTC_TXT2TAGS_EM2 5 +#define wxSTC_TXT2TAGS_HEADER1 6 +#define wxSTC_TXT2TAGS_HEADER2 7 +#define wxSTC_TXT2TAGS_HEADER3 8 +#define wxSTC_TXT2TAGS_HEADER4 9 +#define wxSTC_TXT2TAGS_HEADER5 10 +#define wxSTC_TXT2TAGS_HEADER6 11 +#define wxSTC_TXT2TAGS_PRECHAR 12 +#define wxSTC_TXT2TAGS_ULIST_ITEM 13 +#define wxSTC_TXT2TAGS_OLIST_ITEM 14 +#define wxSTC_TXT2TAGS_BLOCKQUOTE 15 +#define wxSTC_TXT2TAGS_STRIKEOUT 16 +#define wxSTC_TXT2TAGS_HRULE 17 +#define wxSTC_TXT2TAGS_LINK 18 +#define wxSTC_TXT2TAGS_CODE 19 +#define wxSTC_TXT2TAGS_CODE2 20 +#define wxSTC_TXT2TAGS_CODEBK 21 +#define wxSTC_TXT2TAGS_COMMENT 22 +#define wxSTC_TXT2TAGS_OPTION 23 +#define wxSTC_TXT2TAGS_PREPROC 24 +#define wxSTC_TXT2TAGS_POSTPROC 25 + +/// Lexical states for SCLEX_A68K +#define wxSTC_A68K_DEFAULT 0 +#define wxSTC_A68K_COMMENT 1 +#define wxSTC_A68K_NUMBER_DEC 2 +#define wxSTC_A68K_NUMBER_BIN 3 +#define wxSTC_A68K_NUMBER_HEX 4 +#define wxSTC_A68K_STRING1 5 +#define wxSTC_A68K_OPERATOR 6 +#define wxSTC_A68K_CPUINSTRUCTION 7 +#define wxSTC_A68K_EXTINSTRUCTION 8 +#define wxSTC_A68K_REGISTER 9 +#define wxSTC_A68K_DIRECTIVE 10 +#define wxSTC_A68K_MACRO_ARG 11 +#define wxSTC_A68K_LABEL 12 +#define wxSTC_A68K_STRING2 13 +#define wxSTC_A68K_IDENTIFIER 14 +#define wxSTC_A68K_MACRO_DECLARATION 15 +#define wxSTC_A68K_COMMENT_WORD 16 +#define wxSTC_A68K_COMMENT_SPECIAL 17 +#define wxSTC_A68K_COMMENT_DOXYGEN 18 + +/// Lexical states for SCLEX_MODULA +#define wxSTC_MODULA_DEFAULT 0 +#define wxSTC_MODULA_COMMENT 1 +#define wxSTC_MODULA_DOXYCOMM 2 +#define wxSTC_MODULA_DOXYKEY 3 +#define wxSTC_MODULA_KEYWORD 4 +#define wxSTC_MODULA_RESERVED 5 +#define wxSTC_MODULA_NUMBER 6 +#define wxSTC_MODULA_BASENUM 7 +#define wxSTC_MODULA_FLOAT 8 +#define wxSTC_MODULA_STRING 9 +#define wxSTC_MODULA_STRSPEC 10 +#define wxSTC_MODULA_CHAR 11 +#define wxSTC_MODULA_CHARSPEC 12 +#define wxSTC_MODULA_PROC 13 +#define wxSTC_MODULA_PRAGMA 14 +#define wxSTC_MODULA_PRGKEY 15 +#define wxSTC_MODULA_OPERATOR 16 +#define wxSTC_MODULA_BADSTR 17 + +/// Lexical states for SCLEX_COFFEESCRIPT +#define wxSTC_COFFEESCRIPT_DEFAULT 0 +#define wxSTC_COFFEESCRIPT_COMMENT 1 +#define wxSTC_COFFEESCRIPT_COMMENTLINE 2 +#define wxSTC_COFFEESCRIPT_COMMENTDOC 3 +#define wxSTC_COFFEESCRIPT_NUMBER 4 +#define wxSTC_COFFEESCRIPT_WORD 5 +#define wxSTC_COFFEESCRIPT_STRING 6 +#define wxSTC_COFFEESCRIPT_CHARACTER 7 +#define wxSTC_COFFEESCRIPT_UUID 8 +#define wxSTC_COFFEESCRIPT_PREPROCESSOR 9 +#define wxSTC_COFFEESCRIPT_OPERATOR 10 +#define wxSTC_COFFEESCRIPT_IDENTIFIER 11 +#define wxSTC_COFFEESCRIPT_STRINGEOL 12 +#define wxSTC_COFFEESCRIPT_VERBATIM 13 +#define wxSTC_COFFEESCRIPT_REGEX 14 +#define wxSTC_COFFEESCRIPT_COMMENTLINEDOC 15 +#define wxSTC_COFFEESCRIPT_WORD2 16 +#define wxSTC_COFFEESCRIPT_COMMENTDOCKEYWORD 17 +#define wxSTC_COFFEESCRIPT_COMMENTDOCKEYWORDERROR 18 +#define wxSTC_COFFEESCRIPT_GLOBALCLASS 19 +#define wxSTC_COFFEESCRIPT_STRINGRAW 20 +#define wxSTC_COFFEESCRIPT_TRIPLEVERBATIM 21 +#define wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING 22 +#define wxSTC_COFFEESCRIPT_COMMENTBLOCK 22 +#define wxSTC_COFFEESCRIPT_VERBOSE_REGEX 23 +#define wxSTC_COFFEESCRIPT_VERBOSE_REGEX_COMMENT 24 + +/// Lexical states for SCLEX_AVS +#define wxSTC_AVS_DEFAULT 0 +#define wxSTC_AVS_COMMENTBLOCK 1 +#define wxSTC_AVS_COMMENTBLOCKN 2 +#define wxSTC_AVS_COMMENTLINE 3 +#define wxSTC_AVS_NUMBER 4 +#define wxSTC_AVS_OPERATOR 5 +#define wxSTC_AVS_IDENTIFIER 6 +#define wxSTC_AVS_STRING 7 +#define wxSTC_AVS_TRIPLESTRING 8 +#define wxSTC_AVS_KEYWORD 9 +#define wxSTC_AVS_FILTER 10 +#define wxSTC_AVS_PLUGIN 11 +#define wxSTC_AVS_FUNCTION 12 +#define wxSTC_AVS_CLIPPROP 13 +#define wxSTC_AVS_USERDFN 14 + +/// Lexical states for SCLEX_ECL +#define wxSTC_ECL_DEFAULT 0 +#define wxSTC_ECL_COMMENT 1 +#define wxSTC_ECL_COMMENTLINE 2 +#define wxSTC_ECL_NUMBER 3 +#define wxSTC_ECL_STRING 4 +#define wxSTC_ECL_WORD0 5 +#define wxSTC_ECL_OPERATOR 6 +#define wxSTC_ECL_CHARACTER 7 +#define wxSTC_ECL_UUID 8 +#define wxSTC_ECL_PREPROCESSOR 9 +#define wxSTC_ECL_UNKNOWN 10 +#define wxSTC_ECL_IDENTIFIER 11 +#define wxSTC_ECL_STRINGEOL 12 +#define wxSTC_ECL_VERBATIM 13 +#define wxSTC_ECL_REGEX 14 +#define wxSTC_ECL_COMMENTLINEDOC 15 +#define wxSTC_ECL_WORD1 16 +#define wxSTC_ECL_COMMENTDOCKEYWORD 17 +#define wxSTC_ECL_COMMENTDOCKEYWORDERROR 18 +#define wxSTC_ECL_WORD2 19 +#define wxSTC_ECL_WORD3 20 +#define wxSTC_ECL_WORD4 21 +#define wxSTC_ECL_WORD5 22 +#define wxSTC_ECL_COMMENTDOC 23 +#define wxSTC_ECL_ADDED 24 +#define wxSTC_ECL_DELETED 25 +#define wxSTC_ECL_CHANGED 26 +#define wxSTC_ECL_MOVED 27 + +/// Lexical states for SCLEX_OSCRIPT +#define wxSTC_OSCRIPT_DEFAULT 0 +#define wxSTC_OSCRIPT_LINE_COMMENT 1 +#define wxSTC_OSCRIPT_BLOCK_COMMENT 2 +#define wxSTC_OSCRIPT_DOC_COMMENT 3 +#define wxSTC_OSCRIPT_PREPROCESSOR 4 +#define wxSTC_OSCRIPT_NUMBER 5 +#define wxSTC_OSCRIPT_SINGLEQUOTE_STRING 6 +#define wxSTC_OSCRIPT_DOUBLEQUOTE_STRING 7 +#define wxSTC_OSCRIPT_CONSTANT 8 +#define wxSTC_OSCRIPT_IDENTIFIER 9 +#define wxSTC_OSCRIPT_GLOBAL 10 +#define wxSTC_OSCRIPT_KEYWORD 11 +#define wxSTC_OSCRIPT_OPERATOR 12 +#define wxSTC_OSCRIPT_LABEL 13 +#define wxSTC_OSCRIPT_TYPE 14 +#define wxSTC_OSCRIPT_FUNCTION 15 +#define wxSTC_OSCRIPT_OBJECT 16 +#define wxSTC_OSCRIPT_PROPERTY 17 +#define wxSTC_OSCRIPT_METHOD 18 + +/// Lexical states for SCLEX_VISUALPROLOG +#define wxSTC_VISUALPROLOG_DEFAULT 0 +#define wxSTC_VISUALPROLOG_KEY_MAJOR 1 +#define wxSTC_VISUALPROLOG_KEY_MINOR 2 +#define wxSTC_VISUALPROLOG_KEY_DIRECTIVE 3 +#define wxSTC_VISUALPROLOG_COMMENT_BLOCK 4 +#define wxSTC_VISUALPROLOG_COMMENT_LINE 5 +#define wxSTC_VISUALPROLOG_COMMENT_KEY 6 +#define wxSTC_VISUALPROLOG_COMMENT_KEY_ERROR 7 +#define wxSTC_VISUALPROLOG_IDENTIFIER 8 +#define wxSTC_VISUALPROLOG_VARIABLE 9 +#define wxSTC_VISUALPROLOG_ANONYMOUS 10 +#define wxSTC_VISUALPROLOG_NUMBER 11 +#define wxSTC_VISUALPROLOG_OPERATOR 12 +#define wxSTC_VISUALPROLOG_CHARACTER 13 +#define wxSTC_VISUALPROLOG_CHARACTER_TOO_MANY 14 +#define wxSTC_VISUALPROLOG_CHARACTER_ESCAPE_ERROR 15 +#define wxSTC_VISUALPROLOG_STRING 16 +#define wxSTC_VISUALPROLOG_STRING_ESCAPE 17 +#define wxSTC_VISUALPROLOG_STRING_ESCAPE_ERROR 18 +#define wxSTC_VISUALPROLOG_STRING_EOL_OPEN 19 +#define wxSTC_VISUALPROLOG_STRING_VERBATIM 20 +#define wxSTC_VISUALPROLOG_STRING_VERBATIM_SPECIAL 21 +#define wxSTC_VISUALPROLOG_STRING_VERBATIM_EOL 22 + +//}}} +//---------------------------------------------------------------------- + +//---------------------------------------------------------------------- +// Commands that can be bound to keystrokes section {{{ + + +/// Redoes the next action on the undo history. +#define wxSTC_CMD_REDO 2011 + +/// Select all the text in the document. +#define wxSTC_CMD_SELECTALL 2013 + +/// Undo one action in the undo history. +#define wxSTC_CMD_UNDO 2176 + +/// Cut the selection to the clipboard. +#define wxSTC_CMD_CUT 2177 + +/// Copy the selection to the clipboard. +#define wxSTC_CMD_COPY 2178 + +/// Paste the contents of the clipboard into the document replacing the selection. +#define wxSTC_CMD_PASTE 2179 + +/// Clear the selection. +#define wxSTC_CMD_CLEAR 2180 + +/// Move caret down one line. +#define wxSTC_CMD_LINEDOWN 2300 + +/// Move caret down one line extending selection to new caret position. +#define wxSTC_CMD_LINEDOWNEXTEND 2301 + +/// Move caret up one line. +#define wxSTC_CMD_LINEUP 2302 + +/// Move caret up one line extending selection to new caret position. +#define wxSTC_CMD_LINEUPEXTEND 2303 + +/// Move caret left one character. +#define wxSTC_CMD_CHARLEFT 2304 + +/// Move caret left one character extending selection to new caret position. +#define wxSTC_CMD_CHARLEFTEXTEND 2305 + +/// Move caret right one character. +#define wxSTC_CMD_CHARRIGHT 2306 + +/// Move caret right one character extending selection to new caret position. +#define wxSTC_CMD_CHARRIGHTEXTEND 2307 + +/// Move caret left one word. +#define wxSTC_CMD_WORDLEFT 2308 + +/// Move caret left one word extending selection to new caret position. +#define wxSTC_CMD_WORDLEFTEXTEND 2309 + +/// Move caret right one word. +#define wxSTC_CMD_WORDRIGHT 2310 + +/// Move caret right one word extending selection to new caret position. +#define wxSTC_CMD_WORDRIGHTEXTEND 2311 + +/// Move caret to first position on line. +#define wxSTC_CMD_HOME 2312 + +/// Move caret to first position on line extending selection to new caret position. +#define wxSTC_CMD_HOMEEXTEND 2313 + +/// Move caret to last position on line. +#define wxSTC_CMD_LINEEND 2314 + +/// Move caret to last position on line extending selection to new caret position. +#define wxSTC_CMD_LINEENDEXTEND 2315 + +/// Move caret to first position in document. +#define wxSTC_CMD_DOCUMENTSTART 2316 + +/// Move caret to first position in document extending selection to new caret position. +#define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317 + +/// Move caret to last position in document. +#define wxSTC_CMD_DOCUMENTEND 2318 + +/// Move caret to last position in document extending selection to new caret position. +#define wxSTC_CMD_DOCUMENTENDEXTEND 2319 + +/// Move caret one page up. +#define wxSTC_CMD_PAGEUP 2320 + +/// Move caret one page up extending selection to new caret position. +#define wxSTC_CMD_PAGEUPEXTEND 2321 + +/// Move caret one page down. +#define wxSTC_CMD_PAGEDOWN 2322 + +/// Move caret one page down extending selection to new caret position. +#define wxSTC_CMD_PAGEDOWNEXTEND 2323 + +/// Switch from insert to overtype mode or the reverse. +#define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324 + +/// Cancel any modes such as call tip or auto-completion list display. +#define wxSTC_CMD_CANCEL 2325 + +/// Delete the selection or if no selection, the character before the caret. +#define wxSTC_CMD_DELETEBACK 2326 + +/// If selection is empty or all on one line replace the selection with a tab character. +/// If more than one line selected, indent the lines. +#define wxSTC_CMD_TAB 2327 + +/// Dedent the selected lines. +#define wxSTC_CMD_BACKTAB 2328 + +/// Insert a new line, may use a CRLF, CR or LF depending on EOL mode. +#define wxSTC_CMD_NEWLINE 2329 + +/// Insert a Form Feed character. +#define wxSTC_CMD_FORMFEED 2330 + +/// Move caret to before first visible character on line. +/// If already there move to first character on line. +#define wxSTC_CMD_VCHOME 2331 + +/// Like VCHome but extending selection to new caret position. +#define wxSTC_CMD_VCHOMEEXTEND 2332 + +/// Magnify the displayed text by increasing the sizes by 1 point. +#define wxSTC_CMD_ZOOMIN 2333 + +/// Make the displayed text smaller by decreasing the sizes by 1 point. +#define wxSTC_CMD_ZOOMOUT 2334 + +/// Delete the word to the left of the caret. +#define wxSTC_CMD_DELWORDLEFT 2335 + +/// Delete the word to the right of the caret. +#define wxSTC_CMD_DELWORDRIGHT 2336 + +/// Delete the word to the right of the caret, but not the trailing non-word characters. +#define wxSTC_CMD_DELWORDRIGHTEND 2518 + +/// Cut the line containing the caret. +#define wxSTC_CMD_LINECUT 2337 + +/// Delete the line containing the caret. +#define wxSTC_CMD_LINEDELETE 2338 + +/// Switch the current line with the previous. +#define wxSTC_CMD_LINETRANSPOSE 2339 + +/// Duplicate the current line. +#define wxSTC_CMD_LINEDUPLICATE 2404 + +/// Transform the selection to lower case. +#define wxSTC_CMD_LOWERCASE 2340 + +/// Transform the selection to upper case. +#define wxSTC_CMD_UPPERCASE 2341 + +/// Scroll the document down, keeping the caret visible. +#define wxSTC_CMD_LINESCROLLDOWN 2342 + +/// Scroll the document up, keeping the caret visible. +#define wxSTC_CMD_LINESCROLLUP 2343 + +/// Delete the selection or if no selection, the character before the caret. +/// Will not delete the character before at the start of a line. +#define wxSTC_CMD_DELETEBACKNOTLINE 2344 + +/// Move caret to first position on display line. +#define wxSTC_CMD_HOMEDISPLAY 2345 + +/// Move caret to first position on display line extending selection to +/// new caret position. +#define wxSTC_CMD_HOMEDISPLAYEXTEND 2346 + +/// Move caret to last position on display line. +#define wxSTC_CMD_LINEENDDISPLAY 2347 + +/// Move caret to last position on display line extending selection to new +/// caret position. +#define wxSTC_CMD_LINEENDDISPLAYEXTEND 2348 + +/// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? +/// except they behave differently when word-wrap is enabled: +/// They go first to the start / end of the display line, like (Home|LineEnd)Display +/// The difference is that, the cursor is already at the point, it goes on to the start +/// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?. +#define wxSTC_CMD_HOMEWRAP 2349 +#define wxSTC_CMD_HOMEWRAPEXTEND 2450 +#define wxSTC_CMD_LINEENDWRAP 2451 +#define wxSTC_CMD_LINEENDWRAPEXTEND 2452 +#define wxSTC_CMD_VCHOMEWRAP 2453 +#define wxSTC_CMD_VCHOMEWRAPEXTEND 2454 + +/// Copy the line containing the caret. +#define wxSTC_CMD_LINECOPY 2455 + +/// Move to the previous change in capitalisation. +#define wxSTC_CMD_WORDPARTLEFT 2390 + +/// Move to the previous change in capitalisation extending selection +/// to new caret position. +#define wxSTC_CMD_WORDPARTLEFTEXTEND 2391 + +/// Move to the change next in capitalisation. +#define wxSTC_CMD_WORDPARTRIGHT 2392 + +/// Move to the next change in capitalisation extending selection +/// to new caret position. +#define wxSTC_CMD_WORDPARTRIGHTEXTEND 2393 + +/// Delete back from the current position to the start of the line. +#define wxSTC_CMD_DELLINELEFT 2395 + +/// Delete forwards from the current position to the end of the line. +#define wxSTC_CMD_DELLINERIGHT 2396 + +/// Move caret between paragraphs (delimited by empty lines). +#define wxSTC_CMD_PARADOWN 2413 +#define wxSTC_CMD_PARADOWNEXTEND 2414 +#define wxSTC_CMD_PARAUP 2415 +#define wxSTC_CMD_PARAUPEXTEND 2416 + +/// Move caret down one line, extending rectangular selection to new caret position. +#define wxSTC_CMD_LINEDOWNRECTEXTEND 2426 + +/// Move caret up one line, extending rectangular selection to new caret position. +#define wxSTC_CMD_LINEUPRECTEXTEND 2427 + +/// Move caret left one character, extending rectangular selection to new caret position. +#define wxSTC_CMD_CHARLEFTRECTEXTEND 2428 + +/// Move caret right one character, extending rectangular selection to new caret position. +#define wxSTC_CMD_CHARRIGHTRECTEXTEND 2429 + +/// Move caret to first position on line, extending rectangular selection to new caret position. +#define wxSTC_CMD_HOMERECTEXTEND 2430 + +/// Move caret to before first visible character on line. +/// If already there move to first character on line. +/// In either case, extend rectangular selection to new caret position. +#define wxSTC_CMD_VCHOMERECTEXTEND 2431 + +/// Move caret to last position on line, extending rectangular selection to new caret position. +#define wxSTC_CMD_LINEENDRECTEXTEND 2432 + +/// Move caret one page up, extending rectangular selection to new caret position. +#define wxSTC_CMD_PAGEUPRECTEXTEND 2433 + +/// Move caret one page down, extending rectangular selection to new caret position. +#define wxSTC_CMD_PAGEDOWNRECTEXTEND 2434 + +/// Move caret to top of page, or one page up if already at top of page. +#define wxSTC_CMD_STUTTEREDPAGEUP 2435 + +/// Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. +#define wxSTC_CMD_STUTTEREDPAGEUPEXTEND 2436 + +/// Move caret to bottom of page, or one page down if already at bottom of page. +#define wxSTC_CMD_STUTTEREDPAGEDOWN 2437 + +/// Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. +#define wxSTC_CMD_STUTTEREDPAGEDOWNEXTEND 2438 + +/// Move caret left one word, position cursor at end of word. +#define wxSTC_CMD_WORDLEFTEND 2439 + +/// Move caret left one word, position cursor at end of word, extending selection to new caret position. +#define wxSTC_CMD_WORDLEFTENDEXTEND 2440 + +/// Move caret right one word, position cursor at end of word. +#define wxSTC_CMD_WORDRIGHTEND 2441 + +/// Move caret right one word, position cursor at end of word, extending selection to new caret position. +#define wxSTC_CMD_WORDRIGHTENDEXTEND 2442 + +/// Centre current line in window. +#define wxSTC_CMD_VERTICALCENTRECARET 2619 + +/// Move the selected lines up one line, shifting the line above after the selection +#define wxSTC_CMD_MOVESELECTEDLINESUP 2620 + +/// Move the selected lines down one line, shifting the line below before the selection +#define wxSTC_CMD_MOVESELECTEDLINESDOWN 2621 + +/// Scroll to start of document. +#define wxSTC_CMD_SCROLLTOSTART 2628 + +/// Scroll to end of document. +#define wxSTC_CMD_SCROLLTOEND 2629 + +//}}} +//---------------------------------------------------------------------- + +class ScintillaWX; // forward declare +class WordList; +struct SCNotification; + +#ifndef SWIG +extern WXDLLIMPEXP_DATA_STC(const char) wxSTCNameStr[]; +class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl; +class WXDLLIMPEXP_FWD_STC wxStyledTextEvent; +#endif + +//---------------------------------------------------------------------- + +class WXDLLIMPEXP_STC wxStyledTextCtrl : public wxControl, +#if wxUSE_TEXTCTRL + public wxTextCtrlIface +#else // !wxUSE_TEXTCTRL + public wxTextEntryBase +#endif // wxUSE_TEXTCTRL/!wxUSE_TEXTCTRL +{ +public: + +#ifdef SWIG + %pythonAppend wxStyledTextCtrl "self._setOORInfo(self)" + %pythonAppend wxStyledTextCtrl() "" + + wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxPySTCNameStr); + %RenameCtor(PreStyledTextCtrl, wxStyledTextCtrl()); + +#else + wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxSTCNameStr); + wxStyledTextCtrl() { m_swx = NULL; } + ~wxStyledTextCtrl(); + +#endif + + bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxSTCNameStr); + + + //---------------------------------------------------------------------- + // Generated method declaration section {{{ + + + // Add text to the document at current position. + void AddText(const wxString& text); + + // Add array of cells to document. + void AddStyledText(const wxMemoryBuffer& data); + + // Insert string at a position. + void InsertText(int pos, const wxString& text); + + // Delete all text in the document. + void ClearAll(); + + // Delete a range of text in the document. + void DeleteRange(int pos, int deleteLength); + + // Set all style bytes to 0, remove all folding information. + void ClearDocumentStyle(); + + // Returns the number of bytes in the document. + int GetLength() const; + + // Returns the character byte at the position. + int GetCharAt(int pos) const; + + // Returns the position of the caret. + int GetCurrentPos() const; + + // Returns the position of the opposite end of the selection to the caret. + int GetAnchor() const; + + // Returns the style byte at the position. + int GetStyleAt(int pos) const; + + // Redoes the next action on the undo history. + void Redo(); + + // Choose between collecting actions into the undo + // history and discarding them. + void SetUndoCollection(bool collectUndo); + + // Select all the text in the document. + void SelectAll(); + + // Remember the current position in the undo history as the position + // at which the document was saved. + void SetSavePoint(); + + // Retrieve a buffer of cells. + wxMemoryBuffer GetStyledText(int startPos, int endPos); + + // Are there any redoable actions in the undo history? + bool CanRedo() const; + + // Retrieve the line number at which a particular marker is located. + int MarkerLineFromHandle(int handle); + + // Delete a marker. + void MarkerDeleteHandle(int handle); + + // Is undo history being collected? + bool GetUndoCollection() const; + + // Are white space characters currently visible? + // Returns one of SCWS_* constants. + int GetViewWhiteSpace() const; + + // Make white space characters invisible, always visible or visible outside indentation. + void SetViewWhiteSpace(int viewWS); + + // Find the position from a point within the window. + int PositionFromPoint(wxPoint pt) const; + + // Find the position from a point within the window but return + // INVALID_POSITION if not close to text. + int PositionFromPointClose(int x, int y); + + // Set caret to start of a line and ensure it is visible. + void GotoLine(int line); + + // Set caret to a position and ensure it is visible. + void GotoPos(int pos); + + // Set the selection anchor to a position. The anchor is the opposite + // end of the selection from the caret. + void SetAnchor(int posAnchor); + + // Retrieve the text of the line containing the caret. + // Returns the index of the caret on the line. + #ifdef SWIG + wxString GetCurLine(int* OUTPUT); +#else + wxString GetCurLine(int* linePos=NULL); +#endif + + // Retrieve the position of the last correctly styled character. + int GetEndStyled() const; + + // Convert all line endings in the document to one mode. + void ConvertEOLs(int eolMode); + + // Retrieve the current end of line mode - one of CRLF, CR, or LF. + int GetEOLMode() const; + + // Set the current end of line mode. + void SetEOLMode(int eolMode); + + // Set the current styling position to pos and the styling mask to mask. + // The styling mask can be used to protect some bits in each styling byte from modification. + void StartStyling(int pos, int mask); + + // Change style from current styling position for length characters to a style + // and move the current styling position to after this newly styled segment. + void SetStyling(int length, int style); + + // Is drawing done first into a buffer or direct to the screen? + bool GetBufferedDraw() const; + + // If drawing is buffered then each line of text is drawn into a bitmap buffer + // before drawing it to the screen to avoid flicker. + void SetBufferedDraw(bool buffered); + + // Change the visible size of a tab to be a multiple of the width of a space character. + void SetTabWidth(int tabWidth); + + // Retrieve the visible size of a tab. + int GetTabWidth() const; + + // Set the code page used to interpret the bytes of the document as characters. + void SetCodePage(int codePage); + + // Set the symbol used for a particular marker number, + // and optionally the fore and background colours. + void MarkerDefine(int markerNumber, int markerSymbol, + const wxColour& foreground = wxNullColour, + const wxColour& background = wxNullColour); + + // Set the foreground colour used for a particular marker number. + void MarkerSetForeground(int markerNumber, const wxColour& fore); + + // Set the background colour used for a particular marker number. + void MarkerSetBackground(int markerNumber, const wxColour& back); + + // Set the background colour used for a particular marker number when its folding block is selected. + void MarkerSetBackgroundSelected(int markerNumber, const wxColour& back); + + // Enable/disable highlight for current folding bloc (smallest one that contains the caret) + void MarkerEnableHighlight(bool enabled); + + // Add a marker to a line, returning an ID which can be used to find or delete the marker. + int MarkerAdd(int line, int markerNumber); + + // Delete a marker from a line. + void MarkerDelete(int line, int markerNumber); + + // Delete all markers with a particular number from all lines. + void MarkerDeleteAll(int markerNumber); + + // Get a bit mask of all the markers set on a line. + int MarkerGet(int line); + + // Find the next line at or after lineStart that includes a marker in mask. + // Return -1 when no more lines. + int MarkerNext(int lineStart, int markerMask); + + // Find the previous line before lineStart that includes a marker in mask. + int MarkerPrevious(int lineStart, int markerMask); + + // Define a marker from a bitmap + void MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp); + + // Add a set of markers to a line. + void MarkerAddSet(int line, int set); + + // Set the alpha used for a marker that is drawn in the text area, not the margin. + void MarkerSetAlpha(int markerNumber, int alpha); + + // Set a margin to be either numeric or symbolic. + void SetMarginType(int margin, int marginType); + + // Retrieve the type of a margin. + int GetMarginType(int margin) const; + + // Set the width of a margin to a width expressed in pixels. + void SetMarginWidth(int margin, int pixelWidth); + + // Retrieve the width of a margin in pixels. + int GetMarginWidth(int margin) const; + + // Set a mask that determines which markers are displayed in a margin. + void SetMarginMask(int margin, int mask); + + // Retrieve the marker mask of a margin. + int GetMarginMask(int margin) const; + + // Make a margin sensitive or insensitive to mouse clicks. + void SetMarginSensitive(int margin, bool sensitive); + + // Retrieve the mouse click sensitivity of a margin. + bool GetMarginSensitive(int margin) const; + + // Set the cursor shown when the mouse is inside a margin. + void SetMarginCursor(int margin, int cursor); + + // Retrieve the cursor shown in a margin. + int GetMarginCursor(int margin) const; + + // Clear all the styles and make equivalent to the global default style. + void StyleClearAll(); + + // Set the foreground colour of a style. + void StyleSetForeground(int style, const wxColour& fore); + + // Set the background colour of a style. + void StyleSetBackground(int style, const wxColour& back); + + // Set a style to be bold or not. + void StyleSetBold(int style, bool bold); + + // Set a style to be italic or not. + void StyleSetItalic(int style, bool italic); + + // Set the size of characters of a style. + void StyleSetSize(int style, int sizePoints); + + // Set the font of a style. + void StyleSetFaceName(int style, const wxString& fontName); + + // Set a style to have its end of line filled or not. + void StyleSetEOLFilled(int style, bool filled); + + // Reset the default style to its state at startup + void StyleResetDefault(); + + // Set a style to be underlined or not. + void StyleSetUnderline(int style, bool underline); + + // Get the foreground colour of a style. + wxColour StyleGetForeground(int style) const; + + // Get the background colour of a style. + wxColour StyleGetBackground(int style) const; + + // Get is a style bold or not. + bool StyleGetBold(int style) const; + + // Get is a style italic or not. + bool StyleGetItalic(int style) const; + + // Get the size of characters of a style. + int StyleGetSize(int style) const; + + // Get the font facename of a style + wxString StyleGetFaceName(int style); + + // Get is a style to have its end of line filled or not. + bool StyleGetEOLFilled(int style) const; + + // Get is a style underlined or not. + bool StyleGetUnderline(int style) const; + + // Get is a style mixed case, or to force upper or lower case. + int StyleGetCase(int style) const; + + // Get the character set of the font in a style. + int StyleGetCharacterSet(int style) const; + + // Get is a style visible or not. + bool StyleGetVisible(int style) const; + + // Get is a style changeable or not (read only). + // Experimental feature, currently buggy. + bool StyleGetChangeable(int style) const; + + // Get is a style a hotspot or not. + bool StyleGetHotSpot(int style) const; + + // Set a style to be mixed case, or to force upper or lower case. + void StyleSetCase(int style, int caseForce); + + // Set the size of characters of a style. Size is in points multiplied by 100. + void StyleSetSizeFractional(int style, int caseForce); + + // Get the size of characters of a style in points multiplied by 100 + int StyleGetSizeFractional(int style) const; + + // Set the weight of characters of a style. + void StyleSetWeight(int style, int weight); + + // Get the weight of characters of a style. + int StyleGetWeight(int style) const; + + // Set a style to be a hotspot or not. + void StyleSetHotSpot(int style, bool hotspot); + + // Set the foreground colour of the main and additional selections and whether to use this setting. + void SetSelForeground(bool useSetting, const wxColour& fore); + + // Set the background colour of the main and additional selections and whether to use this setting. + void SetSelBackground(bool useSetting, const wxColour& back); + + // Get the alpha of the selection. + int GetSelAlpha() const; + + // Set the alpha of the selection. + void SetSelAlpha(int alpha); + + // Is the selection end of line filled? + bool GetSelEOLFilled() const; + + // Set the selection to have its end of line filled or not. + void SetSelEOLFilled(bool filled); + + // Set the foreground colour of the caret. + void SetCaretForeground(const wxColour& fore); + + // When key+modifier combination km is pressed perform msg. + void CmdKeyAssign(int key, int modifiers, int cmd); + + // When key+modifier combination km is pressed do nothing. + void CmdKeyClear(int key, int modifiers); + + // Drop all key mappings. + void CmdKeyClearAll(); + + // Set the styles for a segment of the document. + void SetStyleBytes(int length, char* styleBytes); + + // Set a style to be visible or not. + void StyleSetVisible(int style, bool visible); + + // Get the time in milliseconds that the caret is on and off. + int GetCaretPeriod() const; + + // Get the time in milliseconds that the caret is on and off. 0 = steady on. + void SetCaretPeriod(int periodMilliseconds); + + // Set the set of characters making up words for when moving or selecting by word. + // First sets defaults like SetCharsDefault. + void SetWordChars(const wxString& characters); + + // Get the set of characters making up words for when moving or selecting by word. + wxString GetWordChars() const; + + // Start a sequence of actions that is undone and redone as a unit. + // May be nested. + void BeginUndoAction(); + + // End a sequence of actions that is undone and redone as a unit. + void EndUndoAction(); + + // Set an indicator to plain, squiggle or TT. + void IndicatorSetStyle(int indic, int style); + + // Retrieve the style of an indicator. + int IndicatorGetStyle(int indic) const; + + // Set the foreground colour of an indicator. + void IndicatorSetForeground(int indic, const wxColour& fore); + + // Retrieve the foreground colour of an indicator. + wxColour IndicatorGetForeground(int indic) const; + + // Set an indicator to draw under text or over(default). + void IndicatorSetUnder(int indic, bool under); + + // Retrieve whether indicator drawn under or over text. + bool IndicatorGetUnder(int indic) const; + + // Set the foreground colour of all whitespace and whether to use this setting. + void SetWhitespaceForeground(bool useSetting, const wxColour& fore); + + // Set the background colour of all whitespace and whether to use this setting. + void SetWhitespaceBackground(bool useSetting, const wxColour& back); + + // Set the size of the dots used to mark space characters. + void SetWhitespaceSize(int size); + + // Get the size of the dots used to mark space characters. + int GetWhitespaceSize() const; + + // Divide each styling byte into lexical class bits (default: 5) and indicator + // bits (default: 3). If a lexer requires more than 32 lexical states, then this + // is used to expand the possible states. + void SetStyleBits(int bits); + + // Retrieve number of bits in style bytes used to hold the lexical state. + int GetStyleBits() const; + + // Used to hold extra styling information for each line. + void SetLineState(int line, int state); + + // Retrieve the extra styling information for a line. + int GetLineState(int line) const; + + // Retrieve the last line number that has line state. + int GetMaxLineState() const; + + // Is the background of the line containing the caret in a different colour? + bool GetCaretLineVisible() const; + + // Display the background of the line containing the caret in a different colour. + void SetCaretLineVisible(bool show); + + // Get the colour of the background of the line containing the caret. + wxColour GetCaretLineBackground() const; + + // Set the colour of the background of the line containing the caret. + void SetCaretLineBackground(const wxColour& back); + + // Set a style to be changeable or not (read only). + // Experimental feature, currently buggy. + void StyleSetChangeable(int style, bool changeable); + + // Display a auto-completion list. + // The lenEntered parameter indicates how many characters before + // the caret should be used to provide context. + void AutoCompShow(int lenEntered, const wxString& itemList); + + // Remove the auto-completion list from the screen. + void AutoCompCancel(); + + // Is there an auto-completion list visible? + bool AutoCompActive(); + + // Retrieve the position of the caret when the auto-completion list was displayed. + int AutoCompPosStart(); + + // User has selected an item so remove the list and insert the selection. + void AutoCompComplete(); + + // Define a set of character that when typed cancel the auto-completion list. + void AutoCompStops(const wxString& characterSet); + + // Change the separator character in the string setting up an auto-completion list. + // Default is space but can be changed if items contain space. + void AutoCompSetSeparator(int separatorCharacter); + + // Retrieve the auto-completion list separator character. + int AutoCompGetSeparator() const; + + // Select the item in the auto-completion list that starts with a string. + void AutoCompSelect(const wxString& text); + + // Should the auto-completion list be cancelled if the user backspaces to a + // position before where the box was created. + void AutoCompSetCancelAtStart(bool cancel); + + // Retrieve whether auto-completion cancelled by backspacing before start. + bool AutoCompGetCancelAtStart() const; + + // Define a set of characters that when typed will cause the autocompletion to + // choose the selected item. + void AutoCompSetFillUps(const wxString& characterSet); + + // Should a single item auto-completion list automatically choose the item. + void AutoCompSetChooseSingle(bool chooseSingle); + + // Retrieve whether a single item auto-completion list automatically choose the item. + bool AutoCompGetChooseSingle() const; + + // Set whether case is significant when performing auto-completion searches. + void AutoCompSetIgnoreCase(bool ignoreCase); + + // Retrieve state of ignore case flag. + bool AutoCompGetIgnoreCase() const; + + // Display a list of strings and send notification when user chooses one. + void UserListShow(int listType, const wxString& itemList); + + // Set whether or not autocompletion is hidden automatically when nothing matches. + void AutoCompSetAutoHide(bool autoHide); + + // Retrieve whether or not autocompletion is hidden automatically when nothing matches. + bool AutoCompGetAutoHide() const; + + // Set whether or not autocompletion deletes any word characters + // after the inserted text upon completion. + void AutoCompSetDropRestOfWord(bool dropRestOfWord); + + // Retrieve whether or not autocompletion deletes any word characters + // after the inserted text upon completion. + bool AutoCompGetDropRestOfWord() const; + + // Register an image for use in autocompletion lists. + void RegisterImage(int type, const wxBitmap& bmp); + + // Clear all the registered images. + void ClearRegisteredImages(); + + // Retrieve the auto-completion list type-separator character. + int AutoCompGetTypeSeparator() const; + + // Change the type-separator character in the string setting up an auto-completion list. + // Default is '?' but can be changed if items contain '?'. + void AutoCompSetTypeSeparator(int separatorCharacter); + + // Set the maximum width, in characters, of auto-completion and user lists. + // Set to 0 to autosize to fit longest item, which is the default. + void AutoCompSetMaxWidth(int characterCount); + + // Get the maximum width, in characters, of auto-completion and user lists. + int AutoCompGetMaxWidth() const; + + // Set the maximum height, in rows, of auto-completion and user lists. + // The default is 5 rows. + void AutoCompSetMaxHeight(int rowCount); + + // Set the maximum height, in rows, of auto-completion and user lists. + int AutoCompGetMaxHeight() const; + + // Set the number of spaces used for one level of indentation. + void SetIndent(int indentSize); + + // Retrieve indentation size. + int GetIndent() const; + + // Indentation will only use space characters if useTabs is false, otherwise + // it will use a combination of tabs and spaces. + void SetUseTabs(bool useTabs); + + // Retrieve whether tabs will be used in indentation. + bool GetUseTabs() const; + + // Change the indentation of a line to a number of columns. + void SetLineIndentation(int line, int indentSize); + + // Retrieve the number of columns that a line is indented. + int GetLineIndentation(int line) const; + + // Retrieve the position before the first non indentation character on a line. + int GetLineIndentPosition(int line) const; + + // Retrieve the column number of a position, taking tab width into account. + int GetColumn(int pos) const; + + // Count characters between two positions. + int CountCharacters(int startPos, int endPos); + + // Show or hide the horizontal scroll bar. + void SetUseHorizontalScrollBar(bool show); + + // Is the horizontal scroll bar visible? + bool GetUseHorizontalScrollBar() const; + + // Show or hide indentation guides. + void SetIndentationGuides(int indentView); + + // Are the indentation guides visible? + int GetIndentationGuides() const; + + // Set the highlighted indentation guide column. + // 0 = no highlighted guide. + void SetHighlightGuide(int column); + + // Get the highlighted indentation guide column. + int GetHighlightGuide() const; + + // Get the position after the last visible characters on a line. + int GetLineEndPosition(int line) const; + + // Get the code page used to interpret the bytes of the document as characters. + int GetCodePage() const; + + // Get the foreground colour of the caret. + wxColour GetCaretForeground() const; + + // In read-only mode? + bool GetReadOnly() const; + + // Sets the position of the caret. + void SetCurrentPos(int pos); + + // Sets the position that starts the selection - this becomes the anchor. + void SetSelectionStart(int pos); + + // Returns the position at the start of the selection. + int GetSelectionStart() const; + + // Sets the position that ends the selection - this becomes the currentPosition. + void SetSelectionEnd(int pos); + + // Returns the position at the end of the selection. + int GetSelectionEnd() const; + + // Set caret to a position, while removing any existing selection. + void SetEmptySelection(int pos); + + // Sets the print magnification added to the point size of each style for printing. + void SetPrintMagnification(int magnification); + + // Returns the print magnification. + int GetPrintMagnification() const; + + // Modify colours when printing for clearer printed text. + void SetPrintColourMode(int mode); + + // Returns the print colour mode. + int GetPrintColourMode() const; + + // Find some text in the document. + int FindText(int minPos, int maxPos, const wxString& text, int flags=0); + + // On Windows, will draw the document into a display context such as a printer. + int FormatRange(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, + wxRect renderRect, + wxRect pageRect); + + // Retrieve the display line at the top of the display. + int GetFirstVisibleLine() const; + + // Retrieve the contents of a line. + wxString GetLine(int line) const; + + // Returns the number of lines in the document. There is always at least one. + int GetLineCount() const; + + // Sets the size in pixels of the left margin. + void SetMarginLeft(int pixelWidth); + + // Returns the size in pixels of the left margin. + int GetMarginLeft() const; + + // Sets the size in pixels of the right margin. + void SetMarginRight(int pixelWidth); + + // Returns the size in pixels of the right margin. + int GetMarginRight() const; + + // Is the document different from when it was last saved? + bool GetModify() const; + + // Retrieve the selected text. + wxString GetSelectedText(); + + // Retrieve a range of text. + wxString GetTextRange(int startPos, int endPos); + + // Draw the selection in normal style or with selection highlighted. + void HideSelection(bool normal); + + // Retrieve the line containing a position. + int LineFromPosition(int pos) const; + + // Retrieve the position at the start of a line. + int PositionFromLine(int line) const; + + // Scroll horizontally and vertically. + void LineScroll(int columns, int lines); + + // Ensure the caret is visible. + void EnsureCaretVisible(); + + // Replace the selected text with the argument text. + void ReplaceSelection(const wxString& text); + + // Set to read only or read write. + void SetReadOnly(bool readOnly); + + // Will a paste succeed? + bool CanPaste() const; + + // Are there any undoable actions in the undo history? + bool CanUndo() const; + + // Delete the undo history. + void EmptyUndoBuffer(); + + // Undo one action in the undo history. + void Undo(); + + // Cut the selection to the clipboard. + void Cut(); + + // Copy the selection to the clipboard. + void Copy(); + + // Paste the contents of the clipboard into the document replacing the selection. + void Paste(); + + // Clear the selection. + void Clear(); + + // Replace the contents of the document with the argument text. + void SetText(const wxString& text); + + // Retrieve all the text in the document. + wxString GetText() const; + + // Retrieve the number of characters in the document. + int GetTextLength() const; + + // Set to overtype (true) or insert mode. + void SetOvertype(bool overtype); + + // Returns true if overtype mode is active otherwise false is returned. + bool GetOvertype() const; + + // Set the width of the insert mode caret. + void SetCaretWidth(int pixelWidth); + + // Returns the width of the insert mode caret. + int GetCaretWidth() const; + + // Sets the position that starts the target which is used for updating the + // document without affecting the scroll position. + void SetTargetStart(int pos); + + // Get the position that starts the target. + int GetTargetStart() const; + + // Sets the position that ends the target which is used for updating the + // document without affecting the scroll position. + void SetTargetEnd(int pos); + + // Get the position that ends the target. + int GetTargetEnd() const; + + // Replace the target text with the argument text. + // Text is counted so it can contain NULs. + // Returns the length of the replacement text. + int ReplaceTarget(const wxString& text); + + // Replace the target text with the argument text after \\d processing. + // Text is counted so it can contain NULs. + // Looks for \\d where d is between 1 and 9 and replaces these with the strings + // matched in the last search operation which were surrounded by \( and \). + // Returns the length of the replacement text including any change + // caused by processing the \\d patterns. + int ReplaceTargetRE(const wxString& text); + + // Search for a counted string in the target and set the target to the found + // range. Text is counted so it can contain NULs. + // Returns length of range or -1 for failure in which case target is not moved. + int SearchInTarget(const wxString& text); + + // Set the search flags used by SearchInTarget. + void SetSearchFlags(int flags); + + // Get the search flags used by SearchInTarget. + int GetSearchFlags() const; + + // Show a call tip containing a definition near position pos. + void CallTipShow(int pos, const wxString& definition); + + // Remove the call tip from the screen. + void CallTipCancel(); + + // Is there an active call tip? + bool CallTipActive(); + + // Retrieve the position where the caret was before displaying the call tip. + int CallTipPosAtStart(); + + // Highlight a segment of the definition. + void CallTipSetHighlight(int start, int end); + + // Set the background colour for the call tip. + void CallTipSetBackground(const wxColour& back); + + // Set the foreground colour for the call tip. + void CallTipSetForeground(const wxColour& fore); + + // Set the foreground colour for the highlighted part of the call tip. + void CallTipSetForegroundHighlight(const wxColour& fore); + + // Enable use of STYLE_CALLTIP and set call tip tab size in pixels. + void CallTipUseStyle(int tabSize); + + // Set position of calltip, above or below text. + void CallTipSetPosition(bool above); + + // Find the display line of a document line taking hidden lines into account. + int VisibleFromDocLine(int line); + + // Find the document line of a display line taking hidden lines into account. + int DocLineFromVisible(int lineDisplay); + + // The number of display lines needed to wrap a document line + int WrapCount(int line); + + // Set the fold level of a line. + // This encodes an integer level along with flags indicating whether the + // line is a header and whether it is effectively white space. + void SetFoldLevel(int line, int level); + + // Retrieve the fold level of a line. + int GetFoldLevel(int line) const; + + // Find the last child line of a header line. + int GetLastChild(int line, int level) const; + + // Find the parent line of a child line. + int GetFoldParent(int line) const; + + // Make a range of lines visible. + void ShowLines(int lineStart, int lineEnd); + + // Make a range of lines invisible. + void HideLines(int lineStart, int lineEnd); + + // Is a line visible? + bool GetLineVisible(int line) const; + + // Are all lines visible? + bool GetAllLinesVisible() const; + + // Show the children of a header line. + void SetFoldExpanded(int line, bool expanded); + + // Is a header line expanded? + bool GetFoldExpanded(int line) const; + + // Switch a header line between expanded and contracted. + void ToggleFold(int line); + + // Ensure a particular line is visible by expanding any header line hiding it. + void EnsureVisible(int line); + + // Set some style options for folding. + void SetFoldFlags(int flags); + + // Ensure a particular line is visible by expanding any header line hiding it. + // Use the currently set visibility policy to determine which range to display. + void EnsureVisibleEnforcePolicy(int line); + + // Sets whether a tab pressed when caret is within indentation indents. + void SetTabIndents(bool tabIndents); + + // Does a tab pressed when caret is within indentation indent? + bool GetTabIndents() const; + + // Sets whether a backspace pressed when caret is within indentation unindents. + void SetBackSpaceUnIndents(bool bsUnIndents); + + // Does a backspace pressed when caret is within indentation unindent? + bool GetBackSpaceUnIndents() const; + + // Sets the time the mouse must sit still to generate a mouse dwell event. + void SetMouseDwellTime(int periodMilliseconds); + + // Retrieve the time the mouse must sit still to generate a mouse dwell event. + int GetMouseDwellTime() const; + + // Get position of start of word. + int WordStartPosition(int pos, bool onlyWordCharacters); + + // Get position of end of word. + int WordEndPosition(int pos, bool onlyWordCharacters); + + // Sets whether text is word wrapped. + void SetWrapMode(int mode); + + // Retrieve whether text is word wrapped. + int GetWrapMode() const; + + // Set the display mode of visual flags for wrapped lines. + void SetWrapVisualFlags(int wrapVisualFlags); + + // Retrive the display mode of visual flags for wrapped lines. + int GetWrapVisualFlags() const; + + // Set the location of visual flags for wrapped lines. + void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation); + + // Retrive the location of visual flags for wrapped lines. + int GetWrapVisualFlagsLocation() const; + + // Set the start indent for wrapped lines. + void SetWrapStartIndent(int indent); + + // Retrive the start indent for wrapped lines. + int GetWrapStartIndent() const; + + // Sets how wrapped sublines are placed. Default is fixed. + void SetWrapIndentMode(int mode); + + // Retrieve how wrapped sublines are placed. Default is fixed. + int GetWrapIndentMode() const; + + // Sets the degree of caching of layout information. + void SetLayoutCache(int mode); + + // Retrieve the degree of caching of layout information. + int GetLayoutCache() const; + + // Sets the document width assumed for scrolling. + void SetScrollWidth(int pixelWidth); + + // Retrieve the document width assumed for scrolling. + int GetScrollWidth() const; + + // Sets whether the maximum width line displayed is used to set scroll width. + void SetScrollWidthTracking(bool tracking); + + // Retrieve whether the scroll width tracks wide lines. + bool GetScrollWidthTracking() const; + + // Measure the pixel width of some text in a particular style. + // NUL terminated text argument. + // Does not handle tab or control characters. + int TextWidth(int style, const wxString& text); + + // Sets the scroll range so that maximum scroll position has + // the last line at the bottom of the view (default). + // Setting this to false allows scrolling one page below the last line. + void SetEndAtLastLine(bool endAtLastLine); + + // Retrieve whether the maximum scroll position has the last + // line at the bottom of the view. + bool GetEndAtLastLine() const; + + // Retrieve the height of a particular line of text in pixels. + int TextHeight(int line); + + // Show or hide the vertical scroll bar. + void SetUseVerticalScrollBar(bool show); + + // Is the vertical scroll bar visible? + bool GetUseVerticalScrollBar() const; + + // Append a string to the end of the document without changing the selection. + void AppendText(const wxString& text); + + // Is drawing done in two phases with backgrounds drawn before foregrounds? + bool GetTwoPhaseDraw() const; + + // In twoPhaseDraw mode, drawing is performed in two phases, first the background + // and then the foreground. This avoids chopping off characters that overlap the next run. + void SetTwoPhaseDraw(bool twoPhase); + + // Scroll so that a display line is at the top of the display. + void SetFirstVisibleLine(int lineDisplay); + + // Change the effect of pasting when there are multiple selections. + void SetMultiPaste(int multiPaste); + + // Retrieve the effect of pasting when there are multiple selections. + int GetMultiPaste() const; + + // Retrieve the value of a tag from a regular expression search. + wxString GetTag(int tagNumber) const; + + // Make the target range start and end be the same as the selection range start and end. + void TargetFromSelection(); + + // Join the lines in the target. + void LinesJoin(); + + // Split the lines in the target into lines that are less wide than pixelWidth + // where possible. + void LinesSplit(int pixelWidth); + + // Set the colours used as a chequerboard pattern in the fold margin + void SetFoldMarginColour(bool useSetting, const wxColour& back); + void SetFoldMarginHiColour(bool useSetting, const wxColour& fore); + + // Move caret down one line. + void LineDown(); + + // Move caret down one line extending selection to new caret position. + void LineDownExtend(); + + // Move caret up one line. + void LineUp(); + + // Move caret up one line extending selection to new caret position. + void LineUpExtend(); + + // Move caret left one character. + void CharLeft(); + + // Move caret left one character extending selection to new caret position. + void CharLeftExtend(); + + // Move caret right one character. + void CharRight(); + + // Move caret right one character extending selection to new caret position. + void CharRightExtend(); + + // Move caret left one word. + void WordLeft(); + + // Move caret left one word extending selection to new caret position. + void WordLeftExtend(); + + // Move caret right one word. + void WordRight(); + + // Move caret right one word extending selection to new caret position. + void WordRightExtend(); + + // Move caret to first position on line. + void Home(); + + // Move caret to first position on line extending selection to new caret position. + void HomeExtend(); + + // Move caret to last position on line. + void LineEnd(); + + // Move caret to last position on line extending selection to new caret position. + void LineEndExtend(); + + // Move caret to first position in document. + void DocumentStart(); + + // Move caret to first position in document extending selection to new caret position. + void DocumentStartExtend(); + + // Move caret to last position in document. + void DocumentEnd(); + + // Move caret to last position in document extending selection to new caret position. + void DocumentEndExtend(); + + // Move caret one page up. + void PageUp(); + + // Move caret one page up extending selection to new caret position. + void PageUpExtend(); + + // Move caret one page down. + void PageDown(); + + // Move caret one page down extending selection to new caret position. + void PageDownExtend(); + + // Switch from insert to overtype mode or the reverse. + void EditToggleOvertype(); + + // Cancel any modes such as call tip or auto-completion list display. + void Cancel(); + + // Delete the selection or if no selection, the character before the caret. + void DeleteBack(); + + // If selection is empty or all on one line replace the selection with a tab character. + // If more than one line selected, indent the lines. + void Tab(); + + // Dedent the selected lines. + void BackTab(); + + // Insert a new line, may use a CRLF, CR or LF depending on EOL mode. + void NewLine(); + + // Insert a Form Feed character. + void FormFeed(); + + // Move caret to before first visible character on line. + // If already there move to first character on line. + void VCHome(); + + // Like VCHome but extending selection to new caret position. + void VCHomeExtend(); + + // Magnify the displayed text by increasing the sizes by 1 point. + void ZoomIn(); + + // Make the displayed text smaller by decreasing the sizes by 1 point. + void ZoomOut(); + + // Delete the word to the left of the caret. + void DelWordLeft(); + + // Delete the word to the right of the caret. + void DelWordRight(); + + // Delete the word to the right of the caret, but not the trailing non-word characters. + void DelWordRightEnd(); + + // Cut the line containing the caret. + void LineCut(); + + // Delete the line containing the caret. + void LineDelete(); + + // Switch the current line with the previous. + void LineTranspose(); + + // Duplicate the current line. + void LineDuplicate(); + + // Transform the selection to lower case. + void LowerCase(); + + // Transform the selection to upper case. + void UpperCase(); + + // Scroll the document down, keeping the caret visible. + void LineScrollDown(); + + // Scroll the document up, keeping the caret visible. + void LineScrollUp(); + + // Delete the selection or if no selection, the character before the caret. + // Will not delete the character before at the start of a line. + void DeleteBackNotLine(); + + // Move caret to first position on display line. + void HomeDisplay(); + + // Move caret to first position on display line extending selection to + // new caret position. + void HomeDisplayExtend(); + + // Move caret to last position on display line. + void LineEndDisplay(); + + // Move caret to last position on display line extending selection to new + // caret position. + void LineEndDisplayExtend(); + + // These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? + // except they behave differently when word-wrap is enabled: + // They go first to the start / end of the display line, like (Home|LineEnd)Display + // The difference is that, the cursor is already at the point, it goes on to the start + // or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?. + void HomeWrap(); + void HomeWrapExtend(); + void LineEndWrap(); + void LineEndWrapExtend(); + void VCHomeWrap(); + void VCHomeWrapExtend(); + + // Copy the line containing the caret. + void LineCopy(); + + // Move the caret inside current view if it's not there already. + void MoveCaretInsideView(); + + // How many characters are on a line, including end of line characters? + int LineLength(int line) const; + + // Highlight the characters at two positions. + void BraceHighlight(int pos1, int pos2); + + // Use specified indicator to highlight matching braces instead of changing their style. + void BraceHighlightIndicator(bool useBraceHighlightIndicator, int indicator); + + // Highlight the character at a position indicating there is no matching brace. + void BraceBadLight(int pos); + + // Use specified indicator to highlight non matching brace instead of changing its style. + void BraceBadLightIndicator(bool useBraceBadLightIndicator, int indicator); + + // Find the position of a matching brace or INVALID_POSITION if no match. + int BraceMatch(int pos); + + // Are the end of line characters visible? + bool GetViewEOL() const; + + // Make the end of line characters visible or invisible. + void SetViewEOL(bool visible); + + // Retrieve a pointer to the document object. + void* GetDocPointer(); + + // Change the document object used. + void SetDocPointer(void* docPointer); + + // Set which document modification events are sent to the container. + void SetModEventMask(int mask); + + // Retrieve the column number which text should be kept within. + int GetEdgeColumn() const; + + // Set the column number of the edge. + // If text goes past the edge then it is highlighted. + void SetEdgeColumn(int column); + + // Retrieve the edge highlight mode. + int GetEdgeMode() const; + + // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that + // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). + void SetEdgeMode(int mode); + + // Retrieve the colour used in edge indication. + wxColour GetEdgeColour() const; + + // Change the colour used in edge indication. + void SetEdgeColour(const wxColour& edgeColour); + + // Sets the current caret position to be the search anchor. + void SearchAnchor(); + + // Find some text starting at the search anchor. + // Does not ensure the selection is visible. + int SearchNext(int flags, const wxString& text); + + // Find some text starting at the search anchor and moving backwards. + // Does not ensure the selection is visible. + int SearchPrev(int flags, const wxString& text); + + // Retrieves the number of lines completely visible. + int LinesOnScreen() const; + + // Set whether a pop up menu is displayed automatically when the user presses + // the wrong mouse button. + void UsePopUp(bool allowPopUp); + + // Is the selection rectangular? The alternative is the more common stream selection. + bool SelectionIsRectangle() const; + + // Set the zoom level. This number of points is added to the size of all fonts. + // It may be positive to magnify or negative to reduce. + void SetZoom(int zoom); + + // Retrieve the zoom level. + int GetZoom() const; + + // Create a new document object. + // Starts with reference count of 1 and not selected into editor. + void* CreateDocument(); + + // Extend life of document. + void AddRefDocument(void* docPointer); + + // Release a reference to the document, deleting document if it fades to black. + void ReleaseDocument(void* docPointer); + + // Get which document modification events are sent to the container. + int GetModEventMask() const; + + // Change internal focus flag. + void SetSTCFocus(bool focus); + + // Get internal focus flag. + bool GetSTCFocus() const; + + // Change error status - 0 = OK. + void SetStatus(int statusCode); + + // Get error status. + int GetStatus() const; + + // Set whether the mouse is captured when its button is pressed. + void SetMouseDownCaptures(bool captures); + + // Get whether mouse gets captured. + bool GetMouseDownCaptures() const; + + // Sets the cursor to one of the SC_CURSOR* values. + void SetSTCCursor(int cursorType); + + // Get cursor type. + int GetSTCCursor() const; + + // Change the way control characters are displayed: + // If symbol is < 32, keep the drawn way, else, use the given character. + void SetControlCharSymbol(int symbol); + + // Get the way control characters are displayed. + int GetControlCharSymbol() const; + + // Move to the previous change in capitalisation. + void WordPartLeft(); + + // Move to the previous change in capitalisation extending selection + // to new caret position. + void WordPartLeftExtend(); + + // Move to the change next in capitalisation. + void WordPartRight(); + + // Move to the next change in capitalisation extending selection + // to new caret position. + void WordPartRightExtend(); + + // Set the way the display area is determined when a particular line + // is to be moved to by Find, FindNext, GotoLine, etc. + void SetVisiblePolicy(int visiblePolicy, int visibleSlop); + + // Delete back from the current position to the start of the line. + void DelLineLeft(); + + // Delete forwards from the current position to the end of the line. + void DelLineRight(); + + // Get and Set the xOffset (ie, horizontal scroll position). + void SetXOffset(int newOffset); + int GetXOffset() const; + + // Set the last x chosen value to be the caret x position. + void ChooseCaretX(); + + // Set the way the caret is kept visible when going sideways. + // The exclusion zone is given in pixels. + void SetXCaretPolicy(int caretPolicy, int caretSlop); + + // Set the way the line the caret is on is kept visible. + // The exclusion zone is given in lines. + void SetYCaretPolicy(int caretPolicy, int caretSlop); + + // Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). + void SetPrintWrapMode(int mode); + + // Is printing line wrapped? + int GetPrintWrapMode() const; + + // Set a fore colour for active hotspots. + void SetHotspotActiveForeground(bool useSetting, const wxColour& fore); + + // Get the fore colour for active hotspots. + wxColour GetHotspotActiveForeground() const; + + // Set a back colour for active hotspots. + void SetHotspotActiveBackground(bool useSetting, const wxColour& back); + + // Get the back colour for active hotspots. + wxColour GetHotspotActiveBackground() const; + + // Enable / Disable underlining active hotspots. + void SetHotspotActiveUnderline(bool underline); + + // Get whether underlining for active hotspots. + bool GetHotspotActiveUnderline() const; + + // Limit hotspots to single line so hotspots on two lines don't merge. + void SetHotspotSingleLine(bool singleLine); + + // Get the HotspotSingleLine property + bool GetHotspotSingleLine() const; + + // Move caret between paragraphs (delimited by empty lines). + void ParaDown(); + void ParaDownExtend(); + void ParaUp(); + void ParaUpExtend(); + + // Given a valid document position, return the previous position taking code + // page into account. Returns 0 if passed 0. + int PositionBefore(int pos); + + // Given a valid document position, return the next position taking code + // page into account. Maximum value returned is the last position in the document. + int PositionAfter(int pos); + + // Copy a range of text to the clipboard. Positions are clipped into the document. + void CopyRange(int start, int end); + + // Copy argument text to the clipboard. + void CopyText(int length, const wxString& text); + + // Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or + // by lines (SC_SEL_LINES). + void SetSelectionMode(int mode); + + // Get the mode of the current selection. + int GetSelectionMode() const; + + // Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). + int GetLineSelStartPosition(int line); + + // Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). + int GetLineSelEndPosition(int line); + + // Move caret down one line, extending rectangular selection to new caret position. + void LineDownRectExtend(); + + // Move caret up one line, extending rectangular selection to new caret position. + void LineUpRectExtend(); + + // Move caret left one character, extending rectangular selection to new caret position. + void CharLeftRectExtend(); + + // Move caret right one character, extending rectangular selection to new caret position. + void CharRightRectExtend(); + + // Move caret to first position on line, extending rectangular selection to new caret position. + void HomeRectExtend(); + + // Move caret to before first visible character on line. + // If already there move to first character on line. + // In either case, extend rectangular selection to new caret position. + void VCHomeRectExtend(); + + // Move caret to last position on line, extending rectangular selection to new caret position. + void LineEndRectExtend(); + + // Move caret one page up, extending rectangular selection to new caret position. + void PageUpRectExtend(); + + // Move caret one page down, extending rectangular selection to new caret position. + void PageDownRectExtend(); + + // Move caret to top of page, or one page up if already at top of page. + void StutteredPageUp(); + + // Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. + void StutteredPageUpExtend(); + + // Move caret to bottom of page, or one page down if already at bottom of page. + void StutteredPageDown(); + + // Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. + void StutteredPageDownExtend(); + + // Move caret left one word, position cursor at end of word. + void WordLeftEnd(); + + // Move caret left one word, position cursor at end of word, extending selection to new caret position. + void WordLeftEndExtend(); + + // Move caret right one word, position cursor at end of word. + void WordRightEnd(); + + // Move caret right one word, position cursor at end of word, extending selection to new caret position. + void WordRightEndExtend(); + + // Set the set of characters making up whitespace for when moving or selecting by word. + // Should be called after SetWordChars. + void SetWhitespaceChars(const wxString& characters); + + // Get the set of characters making up whitespace for when moving or selecting by word. + wxString GetWhitespaceChars() const; + + // Set the set of characters making up punctuation characters + // Should be called after SetWordChars. + void SetPunctuationChars(const wxString& characters); + + // Get the set of characters making up punctuation characters + wxString GetPunctuationChars() const; + + // Reset the set of characters for whitespace and word characters to the defaults. + void SetCharsDefault(); + + // Get currently selected item position in the auto-completion list + int AutoCompGetCurrent() const; + + // Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. + void AutoCompSetCaseInsensitiveBehaviour(int behaviour); + + // Get auto-completion case insensitive behaviour. + int AutoCompGetCaseInsensitiveBehaviour() const; + + // Enlarge the document to a particular size of text bytes. + void Allocate(int bytes); + + // Find the position of a column on a line taking into account tabs and + // multi-byte characters. If beyond end of line, return line end position. + int FindColumn(int line, int column); + + // Can the caret preferred x position only be changed by explicit movement commands? + int GetCaretSticky() const; + + // Stop the caret preferred x position changing when the user types. + void SetCaretSticky(int useCaretStickyBehaviour); + + // Switch between sticky and non-sticky: meant to be bound to a key. + void ToggleCaretSticky(); + + // Enable/Disable convert-on-paste for line endings + void SetPasteConvertEndings(bool convert); + + // Get convert-on-paste setting + bool GetPasteConvertEndings() const; + + // Duplicate the selection. If selection empty duplicate the line containing the caret. + void SelectionDuplicate(); + + // Set background alpha of the caret line. + void SetCaretLineBackAlpha(int alpha); + + // Get the background alpha of the caret line. + int GetCaretLineBackAlpha() const; + + // Set the style of the caret to be drawn. + void SetCaretStyle(int caretStyle); + + // Returns the current style of the caret. + int GetCaretStyle() const; + + // Set the indicator used for IndicatorFillRange and IndicatorClearRange + void SetIndicatorCurrent(int indicator); + + // Get the current indicator + int GetIndicatorCurrent() const; + + // Set the value used for IndicatorFillRange + void SetIndicatorValue(int value); + + // Get the current indicator value + int GetIndicatorValue() const; + + // Turn a indicator on over a range. + void IndicatorFillRange(int position, int fillLength); + + // Turn a indicator off over a range. + void IndicatorClearRange(int position, int clearLength); + + // Are any indicators present at position? + int IndicatorAllOnFor(int position); + + // What value does a particular indicator have at at a position? + int IndicatorValueAt(int indicator, int position); + + // Where does a particular indicator start? + int IndicatorStart(int indicator, int position); + + // Where does a particular indicator end? + int IndicatorEnd(int indicator, int position); + + // Set number of entries in position cache + void SetPositionCacheSize(int size); + + // How many entries are allocated to the position cache? + int GetPositionCacheSize() const; + + // Copy the selection, if selection empty copy the line with the caret + void CopyAllowLine(); + + // Compact the document buffer and return a read-only pointer to the + // characters in the document. + const char* GetCharacterPointer() const; + + // Return a read-only pointer to a range of characters in the document. + // May move the gap so that the range is contiguous, but will only move up + // to rangeLength bytes. + const char* GetRangePointer(int position, int rangeLength) const; + + // Return a position which, to avoid performance costs, should not be within + // the range of a call to GetRangePointer. + int GetGapPosition() const; + + // Always interpret keyboard input as Unicode + void SetKeysUnicode(bool keysUnicode); + + // Are keys always interpreted as Unicode? + bool GetKeysUnicode() const; + + // Set the alpha fill colour of the given indicator. + void IndicatorSetAlpha(int indicator, int alpha); + + // Get the alpha fill colour of the given indicator. + int IndicatorGetAlpha(int indicator) const; + + // Set the alpha outline colour of the given indicator. + void IndicatorSetOutlineAlpha(int indicator, int alpha); + + // Get the alpha outline colour of the given indicator. + int IndicatorGetOutlineAlpha(int indicator) const; + + // Set extra ascent for each line + void SetExtraAscent(int extraAscent); + + // Get extra ascent for each line + int GetExtraAscent() const; + + // Set extra descent for each line + void SetExtraDescent(int extraDescent); + + // Get extra descent for each line + int GetExtraDescent() const; + + // Which symbol was defined for markerNumber with MarkerDefine + int GetMarkerSymbolDefined(int markerNumber); + + // Set the text in the text margin for a line + void MarginSetText(int line, const wxString& text); + + // Get the text in the text margin for a line + wxString MarginGetText(int line) const; + + // Set the style number for the text margin for a line + void MarginSetStyle(int line, int style); + + // Get the style number for the text margin for a line + int MarginGetStyle(int line) const; + + // Set the style in the text margin for a line + void MarginSetStyles(int line, const wxString& styles); + + // Get the styles in the text margin for a line + wxString MarginGetStyles(int line) const; + + // Clear the margin text on all lines + void MarginTextClearAll(); + + // Get the start of the range of style numbers used for margin text + void MarginSetStyleOffset(int style); + + // Get the start of the range of style numbers used for margin text + int MarginGetStyleOffset() const; + + // Set the margin options. + void SetMarginOptions(int marginOptions); + + // Get the margin options. + int GetMarginOptions() const; + + // Set the annotation text for a line + void AnnotationSetText(int line, const wxString& text); + + // Get the annotation text for a line + wxString AnnotationGetText(int line) const; + + // Set the style number for the annotations for a line + void AnnotationSetStyle(int line, int style); + + // Get the style number for the annotations for a line + int AnnotationGetStyle(int line) const; + + // Set the annotation styles for a line + void AnnotationSetStyles(int line, const wxString& styles); + + // Get the annotation styles for a line + wxString AnnotationGetStyles(int line) const; + + // Get the number of annotation lines for a line + int AnnotationGetLines(int line) const; + + // Clear the annotations from all lines + void AnnotationClearAll(); + + // Set the visibility for the annotations for a view + void AnnotationSetVisible(int visible); + + // Get the visibility for the annotations for a view + int AnnotationGetVisible() const; + + // Get the start of the range of style numbers used for annotations + void AnnotationSetStyleOffset(int style); + + // Get the start of the range of style numbers used for annotations + int AnnotationGetStyleOffset() const; + + // Add a container action to the undo stack + void AddUndoAction(int token, int flags); + + // Find the position of a character from a point within the window. + int CharPositionFromPoint(int x, int y); + + // Find the position of a character from a point within the window. + // Return INVALID_POSITION if not close to text. + int CharPositionFromPointClose(int x, int y); + + // Set whether multiple selections can be made + void SetMultipleSelection(bool multipleSelection); + + // Whether multiple selections can be made + bool GetMultipleSelection() const; + + // Set whether typing can be performed into multiple selections + void SetAdditionalSelectionTyping(bool additionalSelectionTyping); + + // Whether typing can be performed into multiple selections + bool GetAdditionalSelectionTyping() const; + + // Set whether additional carets will blink + void SetAdditionalCaretsBlink(bool additionalCaretsBlink); + + // Whether additional carets will blink + bool GetAdditionalCaretsBlink() const; + + // Set whether additional carets are visible + void SetAdditionalCaretsVisible(bool additionalCaretsBlink); + + // Whether additional carets are visible + bool GetAdditionalCaretsVisible() const; + + // How many selections are there? + int GetSelections() const; + + // Clear selections to a single empty stream selection + void ClearSelections(); + + // Add a selection + int AddSelection(int caret, int anchor); + + // Set the main selection + void SetMainSelection(int selection); + + // Which selection is the main selection + int GetMainSelection() const; + void SetSelectionNCaret(int selection, int pos); + int GetSelectionNCaret(int selection) const; + void SetSelectionNAnchor(int selection, int posAnchor); + int GetSelectionNAnchor(int selection) const; + void SetSelectionNCaretVirtualSpace(int selection, int space); + int GetSelectionNCaretVirtualSpace(int selection) const; + void SetSelectionNAnchorVirtualSpace(int selection, int space); + int GetSelectionNAnchorVirtualSpace(int selection) const; + + // Sets the position that starts the selection - this becomes the anchor. + void SetSelectionNStart(int selection, int pos); + + // Returns the position at the start of the selection. + int GetSelectionNStart(int selection) const; + + // Sets the position that ends the selection - this becomes the currentPosition. + void SetSelectionNEnd(int selection, int pos); + + // Returns the position at the end of the selection. + int GetSelectionNEnd(int selection) const; + void SetRectangularSelectionCaret(int pos); + int GetRectangularSelectionCaret() const; + void SetRectangularSelectionAnchor(int posAnchor); + int GetRectangularSelectionAnchor() const; + void SetRectangularSelectionCaretVirtualSpace(int space); + int GetRectangularSelectionCaretVirtualSpace() const; + void SetRectangularSelectionAnchorVirtualSpace(int space); + int GetRectangularSelectionAnchorVirtualSpace() const; + void SetVirtualSpaceOptions(int virtualSpaceOptions); + int GetVirtualSpaceOptions() const; + + // On GTK+, allow selecting the modifier key to use for mouse-based + // rectangular selection. Often the window manager requires Alt+Mouse Drag + // for moving windows. + // Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. + void SetRectangularSelectionModifier(int modifier); + + // Get the modifier key used for rectangular selection. + int GetRectangularSelectionModifier() const; + + // Set the foreground colour of additional selections. + // Must have previously called SetSelFore with non-zero first argument for this to have an effect. + void SetAdditionalSelForeground(const wxColour& fore); + + // Set the background colour of additional selections. + // Must have previously called SetSelBack with non-zero first argument for this to have an effect. + void SetAdditionalSelBackground(const wxColour& back); + + // Set the alpha of the selection. + void SetAdditionalSelAlpha(int alpha); + + // Get the alpha of the selection. + int GetAdditionalSelAlpha() const; + + // Set the foreground colour of additional carets. + void SetAdditionalCaretForeground(const wxColour& fore); + + // Get the foreground colour of additional carets. + wxColour GetAdditionalCaretForeground() const; + + // Set the main selection to the next selection. + void RotateSelection(); + + // Swap that caret and anchor of the main selection. + void SwapMainAnchorCaret(); + + // Indicate that the internal state of a lexer has changed over a range and therefore + // there may be a need to redraw. + int ChangeLexerState(int start, int end); + + // Find the next line at or after lineStart that is a contracted fold header line. + // Return -1 when no more lines. + int ContractedFoldNext(int lineStart); + + // Centre current line in window. + void VerticalCentreCaret(); + + // Move the selected lines up one line, shifting the line above after the selection + void MoveSelectedLinesUp(); + + // Move the selected lines down one line, shifting the line below before the selection + void MoveSelectedLinesDown(); + + // Set the identifier reported as idFrom in notification messages. + void SetIdentifier(int identifier); + + // Get the identifier. + int GetIdentifier() const; + + // Set the width for future RGBA image data. + void RGBAImageSetWidth(int width); + + // Set the height for future RGBA image data. + void RGBAImageSetHeight(int height); + + // Define a marker from RGBA data. + // It has the width and height from RGBAImageSetWidth/Height + void MarkerDefineRGBAImage(int markerNumber, const unsigned char* pixels); + + // Register an RGBA image for use in autocompletion lists. + // It has the width and height from RGBAImageSetWidth/Height + void RegisterRGBAImage(int type, const unsigned char* pixels); + + // Scroll to start of document. + void ScrollToStart(); + + // Scroll to end of document. + void ScrollToEnd(); + + // Set the technology used. + void SetTechnology(int technology); + + // Get the tech. + int GetTechnology() const; + + // Create an ILoader*. + void* CreateLoader(int bytes) const; + + // Start notifying the container of all key presses and commands. + void StartRecord(); + + // Stop notifying the container of all key presses and commands. + void StopRecord(); + + // Set the lexing language of the document. + void SetLexer(int lexer); + + // Retrieve the lexing language of the document. + int GetLexer() const; + + // Colourise a segment of the document using the current lexing language. + void Colourise(int start, int end); + + // Set up a value that may be used by a lexer for some optional feature. + void SetProperty(const wxString& key, const wxString& value); + + // Set up the key words used by the lexer. + void SetKeyWords(int keywordSet, const wxString& keyWords); + + // Set the lexing language of the document based on string name. + void SetLexerLanguage(const wxString& language); + + // Retrieve a 'property' value previously set with SetProperty. + wxString GetProperty(const wxString& key); + + // Retrieve a 'property' value previously set with SetProperty, + // with '$()' variable replacement on returned buffer. + wxString GetPropertyExpanded(const wxString& key); + + // Retrieve a 'property' value previously set with SetProperty, + // interpreted as an int AFTER any '$()' variable replacement. + int GetPropertyInt(const wxString& key) const; + + // Retrieve the number of bits the current lexer needs for styling. + int GetStyleBitsNeeded() const; + + // For private communication between an application and a known lexer. + void* PrivateLexerCall(int operation, void* pointer); + + // Retrieve a '\n' separated list of properties understood by the current lexer. + wxString PropertyNames() const; + + // Retrieve the type of a property. + int PropertyType(const wxString& name); + + // Describe a property. + wxString DescribeProperty(const wxString& name) const; + + // Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. + wxString DescribeKeyWordSets() const; + + //}}} + //---------------------------------------------------------------------- + + // Manually declared methods + + // Returns the line number of the line with the caret. + int GetCurrentLine(); + + // Extract style settings from a spec-string which is composed of one or + // more of the following comma separated elements: + // + // bold turns on bold + // italic turns on italics + // fore:[name or #RRGGBB] sets the foreground colour + // back:[name or #RRGGBB] sets the background colour + // face:[facename] sets the font face name to use + // size:[num] sets the font size in points + // eol turns on eol filling + // underline turns on underlining + // + void StyleSetSpec(int styleNum, const wxString& spec); + + + // Get the font of a style. + wxFont StyleGetFont(int style); + + + // Set style size, face, bold, italic, and underline attributes from + // a wxFont's attributes. + void StyleSetFont(int styleNum, wxFont& font); + + + + // Set all font style attributes at once. + void StyleSetFontAttr(int styleNum, int size, + const wxString& faceName, + bool bold, bool italic, + bool underline, + wxFontEncoding encoding=wxFONTENCODING_DEFAULT); + + + // Set the character set of the font in a style. Converts the Scintilla + // character set values to a wxFontEncoding. + void StyleSetCharacterSet(int style, int characterSet); + + // Set the font encoding to be used by a style. + void StyleSetFontEncoding(int style, wxFontEncoding encoding); + + + // Perform one of the operations defined by the wxSTC_CMD_* constants. + void CmdKeyExecute(int cmd); + + + // Set the left and right margin in the edit area, measured in pixels. + void SetMargins(int left, int right); + + + // Retrieve the point in the window where a position is displayed. + wxPoint PointFromPosition(int pos); + + + // Scroll enough to make the given line visible + void ScrollToLine(int line); + + + // Scroll enough to make the given column visible + void ScrollToColumn(int column); + + + // Send a message to Scintilla + // + // NB: this method is not really const as it can modify the control but it + // has to be declared as such as it's called from both const and + // non-const methods and we can't distinguish between the two + wxIntPtr SendMsg(int msg, wxUIntPtr wp=0, wxIntPtr lp=0) const; + + + // Set the vertical scrollbar to use instead of the ont that's built-in. + void SetVScrollBar(wxScrollBar* bar); + + + // Set the horizontal scrollbar to use instead of the ont that's built-in. + void SetHScrollBar(wxScrollBar* bar); + + // Can be used to prevent the EVT_CHAR handler from adding the char + bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; } + void SetLastKeydownProcessed(bool val) { m_lastKeyDownConsumed = val; } + + // if we derive from wxTextAreaBase it already provides these methods +#if !wxUSE_TEXTCTRL + // Write the contents of the editor to filename + bool SaveFile(const wxString& filename); + + // Load the contents of filename into the editor + bool LoadFile(const wxString& filename); +#endif // !wxUSE_TEXTCTRL + +#ifdef STC_USE_DND + // Allow for simulating a DnD DragOver + wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); + + // Allow for simulating a DnD DropText + bool DoDropText(long x, long y, const wxString& data); +#endif + + // Specify whether anti-aliased fonts should be used. Will have no effect + // on some platforms, but on some (wxMac for example) can greatly improve + // performance. + void SetUseAntiAliasing(bool useAA); + + // Returns the current UseAntiAliasing setting. + bool GetUseAntiAliasing(); + + // Clear annotations from the given line. + void AnnotationClearLine(int line); + + + + // The following methods are nearly equivalent to their similarly named + // cousins above. The difference is that these methods bypass wxString + // and always use a char* even if used in a unicode build of wxWidgets. + // In that case the character data will be utf-8 encoded since that is + // what is used internally by Scintilla in unicode builds. + + // Add text to the document at current position. + void AddTextRaw(const char* text, int length=-1); + + // Insert string at a position. + void InsertTextRaw(int pos, const char* text); + + // Retrieve the text of the line containing the caret. + // Returns the index of the caret on the line. +#ifdef SWIG + wxCharBuffer GetCurLineRaw(int* OUTPUT); +#else + wxCharBuffer GetCurLineRaw(int* linePos=NULL); +#endif + + // Retrieve the contents of a line. + wxCharBuffer GetLineRaw(int line); + + // Retrieve the selected text. + wxCharBuffer GetSelectedTextRaw(); + + // Retrieve a range of text. + wxCharBuffer GetTextRangeRaw(int startPos, int endPos); + + // Replace the contents of the document with the argument text. + void SetTextRaw(const char* text); + + // Retrieve all the text in the document. + wxCharBuffer GetTextRaw(); + + // Append a string to the end of the document without changing the selection. + void AppendTextRaw(const char* text, int length=-1); + +#ifdef SWIG + %pythoncode "_stc_utf8_methods.py" +#endif + + + // implement wxTextEntryBase pure virtual methods + // ---------------------------------------------- + + virtual void WriteText(const wxString& text) + { + ReplaceSelection(text); + } + + virtual void Remove(long from, long to) + { + Replace(from, to, ""); + } + virtual void Replace(long from, long to, const wxString& text) + { + SetTargetStart((int)from); + SetTargetEnd((int)to); + ReplaceTarget(text); + } + + /* + These functions are already declared in the generated section. + + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + virtual void Undo(); + virtual void Redo(); + + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + */ + + virtual void SetInsertionPoint(long pos) + { + SetCurrentPos(int(pos == -1 ? GetLastPosition() : pos)); + } + virtual long GetInsertionPoint() const { return GetCurrentPos(); } + virtual long GetLastPosition() const { return GetTextLength(); } + + virtual void SetSelection(long from, long to) + { + if ( from == -1 && to == -1 ) + { + SelectAll(); + } + else + { + SetSelectionStart((int)from); + SetSelectionEnd((int)to); + } + } + + virtual void SelectNone() + { + ClearSelections(); + } + +#ifdef SWIG + void GetSelection(long* OUTPUT, long* OUTPUT) const; +#else + virtual void GetSelection(long *from, long *to) const + { + if ( from ) + *from = GetSelectionStart(); + if ( to ) + *to = GetSelectionEnd(); + } + + // kept for compatibility only + void GetSelection(int *from, int *to) + { + long f, t; + GetSelection(&f, &t); + if ( from ) + *from = (int)f; + if ( to ) + *to = (int)t; + } +#endif + + virtual bool IsEditable() const { return !GetReadOnly(); } + virtual void SetEditable(bool editable) { SetReadOnly(!editable); } + + // implement wxTextAreaBase pure virtual methods + // --------------------------------------------- + + virtual int GetLineLength(long lineNo) const { return static_cast<int>(GetLineText(lineNo).length()); } + virtual wxString GetLineText(long lineNo) const + { + wxString text = GetLine(static_cast<int>(lineNo)); + size_t lastNewLine = text.find_last_not_of(wxS("\r\n")); + + if ( lastNewLine != wxString::npos ) + text.erase(lastNewLine + 1); // remove trailing cr+lf + else + text.clear(); + return text; + } + virtual int GetNumberOfLines() const { return GetLineCount(); } + + virtual bool IsModified() const { return GetModify(); } + virtual void MarkDirty() { wxFAIL_MSG("not implemented"); } + virtual void DiscardEdits() { SetSavePoint(); } + + virtual bool SetStyle(long WXUNUSED(start), long WXUNUSED(end), + const wxTextAttr& WXUNUSED(style)) + { + wxFAIL_MSG("not implemented"); + + return false; + } + + virtual bool GetStyle(long WXUNUSED(position), wxTextAttr& WXUNUSED(style)) + { + wxFAIL_MSG("not implemented"); + + return false; + } + + virtual bool SetDefaultStyle(const wxTextAttr& WXUNUSED(style)) + { + wxFAIL_MSG("not implemented"); + + return false; + } + + virtual long XYToPosition(long x, long y) const + { + long pos = PositionFromLine((int)y); + pos += x; + return pos; + } + + virtual bool PositionToXY(long pos, long *x, long *y) const + { + int l = LineFromPosition((int)pos); + if ( l == -1 ) + return false; + + if ( x ) + *x = pos - PositionFromLine(l); + + if ( y ) + *y = l; + + return true; + } + + virtual void ShowPosition(long pos) { GotoPos((int)pos); } + + // FIXME-VC6: can't use wxWindow here because of "error C2603: illegal + // access declaration: 'wxWindow' is not a direct base of + // 'wxStyledTextCtrl'" with VC6 + using wxControl::HitTest; + + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const + { + const long l = PositionFromPoint(pt); + if ( l == -1 ) + return wxTE_HT_BELOW; // we don't really know where it was + + if ( pos ) + *pos = l; + + return wxTE_HT_ON_TEXT; + } + + // just unhide it + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const + { + return wxTextAreaBase::HitTest(pt, col, row); + } + + static wxVersionInfo GetLibraryVersionInfo(); + +protected: + virtual void DoSetValue(const wxString& value, int flags); + virtual wxString DoGetValue() const { return GetText(); } + virtual wxWindow *GetEditableWindow() { return this; } + +#ifndef SWIG + virtual bool DoLoadFile(const wxString& file, int fileType); + virtual bool DoSaveFile(const wxString& file, int fileType); + + // Event handlers + void OnPaint(wxPaintEvent& evt); + void OnScrollWin(wxScrollWinEvent& evt); + void OnScroll(wxScrollEvent& evt); + void OnSize(wxSizeEvent& evt); + void OnMouseLeftDown(wxMouseEvent& evt); + void OnMouseMove(wxMouseEvent& evt); + void OnMouseLeftUp(wxMouseEvent& evt); + void OnMouseRightUp(wxMouseEvent& evt); + void OnMouseMiddleUp(wxMouseEvent& evt); + void OnContextMenu(wxContextMenuEvent& evt); + void OnMouseWheel(wxMouseEvent& evt); + void OnChar(wxKeyEvent& evt); + void OnKeyDown(wxKeyEvent& evt); + void OnLoseFocus(wxFocusEvent& evt); + void OnGainFocus(wxFocusEvent& evt); + void OnSysColourChanged(wxSysColourChangedEvent& evt); + void OnEraseBackground(wxEraseEvent& evt); + void OnMenu(wxCommandEvent& evt); + void OnListBox(wxCommandEvent& evt); + void OnIdle(wxIdleEvent& evt); + + virtual wxSize DoGetBestSize() const; + + // Turn notifications from Scintilla into events + void NotifyChange(); + void NotifyParent(SCNotification* scn); + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl) + +protected: + + ScintillaWX* m_swx; + wxStopWatch m_stopWatch; + wxScrollBar* m_vScrollBar; + wxScrollBar* m_hScrollBar; + + bool m_lastKeyDownConsumed; + + friend class ScintillaWX; + friend class Platform; +#endif // !SWIG +}; + +//---------------------------------------------------------------------- + +class WXDLLIMPEXP_STC wxStyledTextEvent : public wxCommandEvent { +public: + wxStyledTextEvent(wxEventType commandType=0, int id=0); +#ifndef SWIG + wxStyledTextEvent(const wxStyledTextEvent& event); +#endif + ~wxStyledTextEvent() {} + + void SetPosition(int pos) { m_position = pos; } + void SetKey(int k) { m_key = k; } + void SetModifiers(int m) { m_modifiers = m; } + void SetModificationType(int t) { m_modificationType = t; } + void SetText(const wxString& t) { m_text = t; } + void SetLength(int len) { m_length = len; } + void SetLinesAdded(int num) { m_linesAdded = num; } + void SetLine(int val) { m_line = val; } + void SetFoldLevelNow(int val) { m_foldLevelNow = val; } + void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; } + void SetMargin(int val) { m_margin = val; } + void SetMessage(int val) { m_message = val; } + void SetWParam(int val) { m_wParam = val; } + void SetLParam(int val) { m_lParam = val; } + void SetListType(int val) { m_listType = val; } + void SetX(int val) { m_x = val; } + void SetY(int val) { m_y = val; } + void SetToken(int val) { m_token = val; } + void SetAnnotationLinesAdded(int val) { m_annotationLinesAdded = val; } + void SetUpdated(int val) { m_updated = val; } +#ifdef STC_USE_DND + void SetDragText(const wxString& val) { m_dragText = val; } + void SetDragFlags(int flags) { m_dragFlags = flags; } + void SetDragResult(wxDragResult val) { m_dragResult = val; } + + // This method is kept mainly for backwards compatibility, use + // SetDragFlags() in the new code. + void SetDragAllowMove(bool allow) + { + if ( allow ) + m_dragFlags |= wxDrag_AllowMove; + else + m_dragFlags &= ~(wxDrag_AllowMove | wxDrag_DefaultMove); + } +#endif + + int GetPosition() const { return m_position; } + int GetKey() const { return m_key; } + int GetModifiers() const { return m_modifiers; } + int GetModificationType() const { return m_modificationType; } + wxString GetText() const { return m_text; } + int GetLength() const { return m_length; } + int GetLinesAdded() const { return m_linesAdded; } + int GetLine() const { return m_line; } + int GetFoldLevelNow() const { return m_foldLevelNow; } + int GetFoldLevelPrev() const { return m_foldLevelPrev; } + int GetMargin() const { return m_margin; } + int GetMessage() const { return m_message; } + int GetWParam() const { return m_wParam; } + int GetLParam() const { return m_lParam; } + int GetListType() const { return m_listType; } + int GetX() const { return m_x; } + int GetY() const { return m_y; } + int GetToken() const { return m_token; } + int GetAnnotationsLinesAdded() const { return m_annotationLinesAdded; } + int GetUpdated() const { return m_updated; } + +#ifdef STC_USE_DND + wxString GetDragText() { return m_dragText; } + int GetDragFlags() { return m_dragFlags; } + wxDragResult GetDragResult() { return m_dragResult; } + + bool GetDragAllowMove() { return (GetDragFlags() & wxDrag_AllowMove) != 0; } +#endif + + bool GetShift() const; + bool GetControl() const; + bool GetAlt() const; + + virtual wxEvent* Clone() const { return new wxStyledTextEvent(*this); } + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS(wxStyledTextEvent) + + int m_position; + int m_key; + int m_modifiers; + + int m_modificationType; // wxEVT_STC_MODIFIED + wxString m_text; + int m_length; + int m_linesAdded; + int m_line; + int m_foldLevelNow; + int m_foldLevelPrev; + + int m_margin; // wxEVT_STC_MARGINCLICK + + int m_message; // wxEVT_STC_MACRORECORD + int m_wParam; + int m_lParam; + + int m_listType; + int m_x; + int m_y; + + int m_token; // wxEVT_STC__MODIFIED with SC_MOD_CONTAINER + int m_annotationLinesAdded; // wxEVT_STC_MODIFIED with SC_MOD_CHANGEANNOTATION + int m_updated; // wxEVT_STC_UPDATEUI + + +#if wxUSE_DRAG_AND_DROP + wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP + int m_dragFlags; // wxEVT_STC_START_DRAG + wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP +#endif +#endif +}; + + + +#ifndef SWIG +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_CHANGE, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_STYLENEEDED, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_CHARADDED, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTREACHED, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTLEFT, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_ROMODIFYATTEMPT, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_KEY, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_DOUBLECLICK, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_UPDATEUI, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_MODIFIED, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_MACRORECORD, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_MARGINCLICK, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_NEEDSHOWN, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_PAINTED, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_USERLISTSELECTION, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_URIDROPPED, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_DWELLSTART, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_DWELLEND, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_START_DRAG, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_DRAG_OVER, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_DO_DROP, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_ZOOM, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_HOTSPOT_CLICK, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_HOTSPOT_DCLICK, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_CALLTIP_CLICK, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_AUTOCOMP_SELECTION, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_INDICATOR_CLICK, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_INDICATOR_RELEASE, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_AUTOCOMP_CANCELLED, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_AUTOCOMP_CHAR_DELETED, wxStyledTextEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC, wxEVT_STC_HOTSPOT_RELEASE_CLICK, wxStyledTextEvent ); +#else + enum { + wxEVT_STC_CHANGE, + wxEVT_STC_STYLENEEDED, + wxEVT_STC_CHARADDED, + wxEVT_STC_SAVEPOINTREACHED, + wxEVT_STC_SAVEPOINTLEFT, + wxEVT_STC_ROMODIFYATTEMPT, + wxEVT_STC_KEY, + wxEVT_STC_DOUBLECLICK, + wxEVT_STC_UPDATEUI, + wxEVT_STC_MODIFIED, + wxEVT_STC_MACRORECORD, + wxEVT_STC_MARGINCLICK, + wxEVT_STC_NEEDSHOWN, + wxEVT_STC_PAINTED, + wxEVT_STC_USERLISTSELECTION, + wxEVT_STC_URIDROPPED, + wxEVT_STC_DWELLSTART, + wxEVT_STC_DWELLEND, + wxEVT_STC_START_DRAG, + wxEVT_STC_DRAG_OVER, + wxEVT_STC_DO_DROP, + wxEVT_STC_ZOOM, + wxEVT_STC_HOTSPOT_CLICK, + wxEVT_STC_HOTSPOT_DCLICK, + wxEVT_STC_CALLTIP_CLICK, + wxEVT_STC_AUTOCOMP_SELECTION, + wxEVT_STC_INDICATOR_CLICK, + wxEVT_STC_INDICATOR_RELEASE, + wxEVT_STC_AUTOCOMP_CANCELLED, + wxEVT_STC_AUTOCOMP_CHAR_DELETED, + wxEVT_STC_HOTSPOT_RELEASE_CLICK + }; +#endif + + + +#ifndef SWIG +typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); + +#define wxStyledTextEventHandler( func ) \ + wxEVENT_HANDLER_CAST( wxStyledTextEventFunction, func ) + +#define EVT_STC_CHANGE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_STYLENEEDED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_CHARADDED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_SAVEPOINTREACHED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_SAVEPOINTLEFT(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_ROMODIFYATTEMPT(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_KEY(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_DOUBLECLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_UPDATEUI(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_MODIFIED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_MACRORECORD(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_MARGINCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_NEEDSHOWN(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_PAINTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_USERLISTSELECTION(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_URIDROPPED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_DWELLSTART(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_DWELLEND(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_START_DRAG(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_DRAG_OVER(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_DO_DROP(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_ZOOM(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_HOTSPOT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_HOTSPOT_DCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_CALLTIP_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_AUTOCOMP_SELECTION(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_INDICATOR_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_INDICATOR_RELEASE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_RELEASE, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_AUTOCOMP_CANCELLED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_CANCELLED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_CHAR_DELETED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_HOTSPOT_RELEASE_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_RELEASE_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), + +#endif + +#endif // wxUSE_STC + +#endif // _WX_STC_STC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stdpaths.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stdpaths.h new file mode 100644 index 0000000000..9d92044457 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stdpaths.h @@ -0,0 +1,225 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/stdpaths.h +// Purpose: declaration of wxStandardPaths class +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-10-17 +// Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STDPATHS_H_ +#define _WX_STDPATHS_H_ + +#include "wx/defs.h" + +#include "wx/string.h" +#include "wx/filefn.h" + +class WXDLLIMPEXP_FWD_BASE wxStandardPaths; + +// ---------------------------------------------------------------------------- +// wxStandardPaths returns the standard locations in the file system +// ---------------------------------------------------------------------------- + +// NB: This is always compiled in, wxUSE_STDPATHS=0 only disables native +// wxStandardPaths class, but a minimal version is always available +class WXDLLIMPEXP_BASE wxStandardPathsBase +{ +public: + // possible resources categories + enum ResourceCat + { + // no special category + ResourceCat_None, + + // message catalog resources + ResourceCat_Messages, + + // end of enum marker + ResourceCat_Max + }; + + // what should we use to construct paths unique to this application: + // (AppInfo_AppName and AppInfo_VendorName can be combined together) + enum + { + AppInfo_None = 0, // nothing + AppInfo_AppName = 1, // the application name + AppInfo_VendorName = 2 // the vendor name + }; + + + // return the global standard paths object + static wxStandardPaths& Get(); + + // return the path (directory+filename) of the running executable or + // wxEmptyString if it couldn't be determined. + // The path is returned as an absolute path whenever possible. + // Default implementation only try to use wxApp->argv[0]. + virtual wxString GetExecutablePath() const; + + // return the directory with system config files: + // /etc under Unix, c:\Documents and Settings\All Users\Application Data + // under Windows, /Library/Preferences for Mac + virtual wxString GetConfigDir() const = 0; + + // return the directory for the user config files: + // $HOME under Unix, c:\Documents and Settings\username under Windows, + // ~/Library/Preferences under Mac + // + // only use this if you have a single file to put there, otherwise + // GetUserDataDir() is more appropriate + virtual wxString GetUserConfigDir() const = 0; + + // return the location of the applications global, i.e. not user-specific, + // data files + // + // prefix/share/appname under Unix, c:\Program Files\appname under Windows, + // appname.app/Contents/SharedSupport app bundle directory under Mac + virtual wxString GetDataDir() const = 0; + + // return the location for application data files which are host-specific + // + // same as GetDataDir() except under Unix where it is /etc/appname + virtual wxString GetLocalDataDir() const; + + // return the directory for the user-dependent application data files + // + // $HOME/.appname under Unix, + // c:\Documents and Settings\username\Application Data\appname under Windows + // and ~/Library/Application Support/appname under Mac + virtual wxString GetUserDataDir() const = 0; + + // return the directory for user data files which shouldn't be shared with + // the other machines + // + // same as GetUserDataDir() for all platforms except Windows where it is + // the "Local Settings\Application Data\appname" directory + virtual wxString GetUserLocalDataDir() const; + + // return the directory where the loadable modules (plugins) live + // + // prefix/lib/appname under Unix, program directory under Windows and + // Contents/Plugins app bundle subdirectory under Mac + virtual wxString GetPluginsDir() const = 0; + + // get resources directory: resources are auxiliary files used by the + // application and include things like image and sound files + // + // same as GetDataDir() for all platforms except Mac where it returns + // Contents/Resources subdirectory of the app bundle + virtual wxString GetResourcesDir() const { return GetDataDir(); } + + // get localized resources directory containing the resource files of the + // specified category for the given language + // + // in general this is just GetResourcesDir()/lang under Windows and Unix + // and GetResourcesDir()/lang.lproj under Mac but is something quite + // different under Unix for message catalog category (namely the standard + // prefix/share/locale/lang/LC_MESSAGES) + virtual wxString + GetLocalizedResourcesDir(const wxString& lang, + ResourceCat WXUNUSED(category) + = ResourceCat_None) const + { + return GetResourcesDir() + wxFILE_SEP_PATH + lang; + } + + // return the "Documents" directory for the current user + // + // C:\Documents and Settings\username\My Documents under Windows, + // $HOME under Unix and ~/Documents under Mac + virtual wxString GetDocumentsDir() const; + + // return the directory for the documents files used by this application: + // it's a subdirectory of GetDocumentsDir() constructed using the + // application name/vendor if it exists or just GetDocumentsDir() otherwise + virtual wxString GetAppDocumentsDir() const; + + // return the temporary directory for the current user + virtual wxString GetTempDir() const; + + + // virtual dtor for the base class + virtual ~wxStandardPathsBase(); + + // Information used by AppendAppInfo + void UseAppInfo(int info) + { + m_usedAppInfo = info; + } + + bool UsesAppInfo(int info) const { return (m_usedAppInfo & info) != 0; } + + +protected: + // Ctor is protected as this is a base class which should never be created + // directly. + wxStandardPathsBase(); + + // append the path component, with a leading path separator if a + // path separator or dot (.) is not already at the end of dir + static wxString AppendPathComponent(const wxString& dir, const wxString& component); + + // append application information determined by m_usedAppInfo to dir + wxString AppendAppInfo(const wxString& dir) const; + + + // combination of AppInfo_XXX flags used by AppendAppInfo() + int m_usedAppInfo; +}; + +#if wxUSE_STDPATHS + #if defined(__WINDOWS__) + #include "wx/msw/stdpaths.h" + #define wxHAS_NATIVE_STDPATHS + // We want CoreFoundation paths on both CarbonLib and Darwin (for all ports) + #elif defined(__WXMAC__) || defined(__DARWIN__) + #include "wx/osx/core/stdpaths.h" + #define wxHAS_NATIVE_STDPATHS + #elif defined(__OS2__) + #include "wx/os2/stdpaths.h" + #define wxHAS_NATIVE_STDPATHS + #elif defined(__UNIX__) + #include "wx/unix/stdpaths.h" + #define wxHAS_NATIVE_STDPATHS + #endif +#endif + +// ---------------------------------------------------------------------------- +// Minimal generic implementation +// ---------------------------------------------------------------------------- + +// NB: Note that this minimal implementation is compiled in even if +// wxUSE_STDPATHS=0, so that our code can still use wxStandardPaths. + +#ifndef wxHAS_NATIVE_STDPATHS +class WXDLLIMPEXP_BASE wxStandardPaths : public wxStandardPathsBase +{ +public: + void SetInstallPrefix(const wxString& prefix) { m_prefix = prefix; } + wxString GetInstallPrefix() const { return m_prefix; } + + virtual wxString GetExecutablePath() const { return m_prefix; } + virtual wxString GetConfigDir() const { return m_prefix; } + virtual wxString GetUserConfigDir() const { return m_prefix; } + virtual wxString GetDataDir() const { return m_prefix; } + virtual wxString GetLocalDataDir() const { return m_prefix; } + virtual wxString GetUserDataDir() const { return m_prefix; } + virtual wxString GetPluginsDir() const { return m_prefix; } + virtual wxString GetDocumentsDir() const { return m_prefix; } + +protected: + // Ctor is protected because wxStandardPaths::Get() should always be used + // to access the global wxStandardPaths object of the correct type instead + // of creating one of a possibly wrong type yourself. + wxStandardPaths() { } + +private: + wxString m_prefix; +}; +#endif // !wxHAS_NATIVE_STDPATHS + +#endif // _WX_STDPATHS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stdstream.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stdstream.h new file mode 100644 index 0000000000..73ac0ac260 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stdstream.h @@ -0,0 +1,122 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/stdstream.h +// Purpose: Header of std::istream and std::ostream derived wrappers for +// wxInputStream and wxOutputStream +// Author: Jonathan Liu <net147@gmail.com> +// Created: 2009-05-02 +// Copyright: (c) 2009 Jonathan Liu +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STDSTREAM_H_ +#define _WX_STDSTREAM_H_ + +#include "wx/defs.h" // wxUSE_STD_IOSTREAM + +#if wxUSE_STREAMS && wxUSE_STD_IOSTREAM + +#include "wx/defs.h" +#include "wx/stream.h" +#include "wx/ioswrap.h" + +// ========================================================================== +// wxStdInputStreamBuffer +// ========================================================================== + +class WXDLLIMPEXP_BASE wxStdInputStreamBuffer : public std::streambuf +{ +public: + wxStdInputStreamBuffer(wxInputStream& stream); + virtual ~wxStdInputStreamBuffer() { } + +protected: + virtual std::streambuf *setbuf(char *s, std::streamsize n); + virtual std::streampos seekoff(std::streamoff off, + std::ios_base::seekdir way, + std::ios_base::openmode which = + std::ios_base::in | + std::ios_base::out); + virtual std::streampos seekpos(std::streampos sp, + std::ios_base::openmode which = + std::ios_base::in | + std::ios_base::out); + virtual std::streamsize showmanyc(); + virtual std::streamsize xsgetn(char *s, std::streamsize n); + virtual int underflow(); + virtual int uflow(); + virtual int pbackfail(int c = EOF); + + // Special work around for VC8/9 (this bug was fixed in VC10 and later): + // these versions have non-standard _Xsgetn_s() that it being called from + // the stream code instead of xsgetn() and so our overridden implementation + // never actually gets used. To work around this, forward to it explicitly. +#if defined(__VISUALC8__) || defined(__VISUALC9__) + virtual std::streamsize + _Xsgetn_s(char *s, size_t WXUNUSED(size), std::streamsize n) + { + return xsgetn(s, n); + } +#endif // VC8 or VC9 + + wxInputStream& m_stream; + int m_lastChar; +}; + +// ========================================================================== +// wxStdInputStream +// ========================================================================== + +class WXDLLIMPEXP_BASE wxStdInputStream : public std::istream +{ +public: + wxStdInputStream(wxInputStream& stream); + virtual ~wxStdInputStream() { } + +protected: + wxStdInputStreamBuffer m_streamBuffer; +}; + +// ========================================================================== +// wxStdOutputStreamBuffer +// ========================================================================== + +class WXDLLIMPEXP_BASE wxStdOutputStreamBuffer : public std::streambuf +{ +public: + wxStdOutputStreamBuffer(wxOutputStream& stream); + virtual ~wxStdOutputStreamBuffer() { } + +protected: + virtual std::streambuf *setbuf(char *s, std::streamsize n); + virtual std::streampos seekoff(std::streamoff off, + std::ios_base::seekdir way, + std::ios_base::openmode which = + std::ios_base::in | + std::ios_base::out); + virtual std::streampos seekpos(std::streampos sp, + std::ios_base::openmode which = + std::ios_base::in | + std::ios_base::out); + virtual std::streamsize xsputn(const char *s, std::streamsize n); + virtual int overflow(int c); + + wxOutputStream& m_stream; +}; + +// ========================================================================== +// wxStdOutputStream +// ========================================================================== + +class WXDLLIMPEXP_BASE wxStdOutputStream : public std::ostream +{ +public: + wxStdOutputStream(wxOutputStream& stream); + virtual ~wxStdOutputStream() { } + +protected: + wxStdOutputStreamBuffer m_streamBuffer; +}; + +#endif // wxUSE_STREAMS && wxUSE_STD_IOSTREAM + +#endif // _WX_STDSTREAM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stockitem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stockitem.h new file mode 100644 index 0000000000..72d3e714d8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stockitem.h @@ -0,0 +1,80 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/stockitem.h +// Purpose: stock items helpers (privateh header) +// Author: Vaclav Slavik +// Modified by: +// Created: 2004-08-15 +// Copyright: (c) Vaclav Slavik, 2004 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STOCKITEM_H_ +#define _WX_STOCKITEM_H_ + +#include "wx/defs.h" +#include "wx/chartype.h" +#include "wx/string.h" +#include "wx/accel.h" + +// ---------------------------------------------------------------------------- +// Helper functions for stock items handling: +// ---------------------------------------------------------------------------- + +// Returns true if the ID is in the list of recognized stock actions +WXDLLIMPEXP_CORE bool wxIsStockID(wxWindowID id); + +// Returns true of the label is empty or label of a stock button with +// given ID +WXDLLIMPEXP_CORE bool wxIsStockLabel(wxWindowID id, const wxString& label); + +enum wxStockLabelQueryFlag +{ + wxSTOCK_NOFLAGS = 0, + + wxSTOCK_WITH_MNEMONIC = 1, + wxSTOCK_WITH_ACCELERATOR = 2, + + // by default, stock items text is returned with ellipsis, if appropriate, + // this flag allows to avoid having it + wxSTOCK_WITHOUT_ELLIPSIS = 4, + + // return label for button, not menu item: buttons should always use + // mnemonics and never use ellipsis + wxSTOCK_FOR_BUTTON = wxSTOCK_WITHOUT_ELLIPSIS | wxSTOCK_WITH_MNEMONIC +}; + +// Returns label that should be used for given stock UI element (e.g. "&OK" +// for wxSTOCK_OK); if wxSTOCK_WITH_MNEMONIC is given, the & character +// is included; if wxSTOCK_WITH_ACCELERATOR is given, the stock accelerator +// for given ID is concatenated to the label using \t as separator +WXDLLIMPEXP_CORE wxString wxGetStockLabel(wxWindowID id, + long flags = wxSTOCK_WITH_MNEMONIC); + +#if wxUSE_ACCEL + + // Returns the accelerator that should be used for given stock UI element + // (e.g. "Ctrl+x" for wxSTOCK_EXIT) + WXDLLIMPEXP_CORE wxAcceleratorEntry wxGetStockAccelerator(wxWindowID id); + +#endif + +// wxStockHelpStringClient conceptually works like wxArtClient: it gives a hint to +// wxGetStockHelpString() about the context where the help string is to be used +enum wxStockHelpStringClient +{ + wxSTOCK_MENU // help string to use for menu items +}; + +// Returns an help string for the given stock UI element and for the given "context". +WXDLLIMPEXP_CORE wxString wxGetStockHelpString(wxWindowID id, + wxStockHelpStringClient client = wxSTOCK_MENU); + + +#ifdef __WXGTK20__ + +// Translates stock ID to GTK+'s stock item string identifier: +WXDLLIMPEXP_CORE const char *wxGetStockGtkID(wxWindowID id); + +#endif + +#endif // _WX_STOCKITEM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stopwatch.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stopwatch.h new file mode 100644 index 0000000000..248f757520 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stopwatch.h @@ -0,0 +1,104 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/stopwatch.h +// Purpose: wxStopWatch and global time-related functions +// Author: Julian Smart (wxTimer), Sylvain Bougnoux (wxStopWatch), +// Vadim Zeitlin (time functions, current wxStopWatch) +// Created: 26.06.03 (extracted from wx/timer.h) +// Copyright: (c) 1998-2003 Julian Smart, Sylvain Bougnoux +// (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STOPWATCH_H_ +#define _WX_STOPWATCH_H_ + +#include "wx/defs.h" +#include "wx/longlong.h" + +// Time-related functions are also available via this header for compatibility +// but you should include wx/time.h directly if you need only them and not +// wxStopWatch itself. +#include "wx/time.h" + +// ---------------------------------------------------------------------------- +// wxStopWatch: measure time intervals with up to 1ms resolution +// ---------------------------------------------------------------------------- + +#if wxUSE_STOPWATCH + +class WXDLLIMPEXP_BASE wxStopWatch +{ +public: + // ctor starts the stop watch + wxStopWatch() { m_pauseCount = 0; Start(); } + + // Start the stop watch at the moment t0 expressed in milliseconds (i.e. + // calling Time() immediately afterwards returns t0). This can be used to + // restart an existing stopwatch. + void Start(long t0 = 0); + + // pause the stop watch + void Pause() + { + if ( m_pauseCount++ == 0 ) + m_elapsedBeforePause = GetCurrentClockValue() - m_t0; + } + + // resume it + void Resume() + { + wxASSERT_MSG( m_pauseCount > 0, + wxT("Resuming stop watch which is not paused") ); + + if ( --m_pauseCount == 0 ) + { + DoStart(); + m_t0 -= m_elapsedBeforePause; + } + } + + // Get elapsed time since the last Start() in microseconds. + wxLongLong TimeInMicro() const; + + // get elapsed time since the last Start() in milliseconds + long Time() const { return (TimeInMicro()/1000).ToLong(); } + +private: + // Really starts the stop watch. The initial time is set to current clock + // value. + void DoStart(); + + // Returns the current clock value in its native units. + wxLongLong GetCurrentClockValue() const; + + // Return the frequency of the clock used in its ticks per second. + wxLongLong GetClockFreq() const; + + + // The clock value when the stop watch was last started. Its units vary + // depending on the platform. + wxLongLong m_t0; + + // The elapsed time as of last Pause() call (only valid if m_pauseCount > + // 0) in the same units as m_t0. + wxLongLong m_elapsedBeforePause; + + // if > 0, the stop watch is paused, otherwise it is running + int m_pauseCount; +}; + +#endif // wxUSE_STOPWATCH + +#if wxUSE_LONGLONG && WXWIN_COMPATIBILITY_2_6 + + // Starts a global timer + // -- DEPRECATED: use wxStopWatch instead + wxDEPRECATED( void WXDLLIMPEXP_BASE wxStartTimer() ); + + // Gets elapsed milliseconds since last wxStartTimer or wxGetElapsedTime + // -- DEPRECATED: use wxStopWatch instead + wxDEPRECATED( long WXDLLIMPEXP_BASE wxGetElapsedTime(bool resetTimer = true) ); + +#endif // wxUSE_LONGLONG && WXWIN_COMPATIBILITY_2_6 + +#endif // _WX_STOPWATCH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/strconv.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/strconv.h new file mode 100644 index 0000000000..3dc3752186 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/strconv.h @@ -0,0 +1,675 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/strconv.h +// Purpose: conversion routines for char sets any Unicode +// Author: Ove Kaaven, Robert Roebling, Vadim Zeitlin +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Ove Kaaven, Robert Roebling +// (c) 1998-2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STRCONV_H_ +#define _WX_STRCONV_H_ + +#include "wx/defs.h" +#include "wx/chartype.h" +#include "wx/buffer.h" + +#ifdef __DIGITALMARS__ +#include "typeinfo.h" +#endif + +#if defined(__VISAGECPP__) && __IBMCPP__ >= 400 +# undef __BSEXCPT__ +#endif + +#include <stdlib.h> + +class WXDLLIMPEXP_FWD_BASE wxString; + +// the error value returned by wxMBConv methods +#define wxCONV_FAILED ((size_t)-1) + +// ---------------------------------------------------------------------------- +// wxMBConv (abstract base class for conversions) +// ---------------------------------------------------------------------------- + +// When deriving a new class from wxMBConv you must reimplement ToWChar() and +// FromWChar() methods which are not pure virtual only for historical reasons, +// don't let the fact that the existing classes implement MB2WC/WC2MB() instead +// confuse you. +// +// You also have to implement Clone() to allow copying the conversions +// polymorphically. +// +// And you might need to override GetMBNulLen() as well. +class WXDLLIMPEXP_BASE wxMBConv +{ +public: + // The functions doing actual conversion from/to narrow to/from wide + // character strings. + // + // On success, the return value is the length (i.e. the number of + // characters, not bytes) of the converted string including any trailing + // L'\0' or (possibly multiple) '\0'(s). If the conversion fails or if + // there is not enough space for everything, including the trailing NUL + // character(s), in the output buffer, wxCONV_FAILED is returned. + // + // In the special case when dst is NULL (the value of dstLen is ignored + // then) the return value is the length of the needed buffer but nothing + // happens otherwise. If srcLen is wxNO_LEN, the entire string, up to and + // including the trailing NUL(s), is converted, otherwise exactly srcLen + // bytes are. + // + // Typical usage: + // + // size_t dstLen = conv.ToWChar(NULL, 0, src); + // if ( dstLen == wxCONV_FAILED ) + // ... handle error ... + // wchar_t *wbuf = new wchar_t[dstLen]; + // conv.ToWChar(wbuf, dstLen, src); + // ... work with wbuf ... + // delete [] wbuf; + // + virtual size_t ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN) const; + + virtual size_t FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen = wxNO_LEN) const; + + + // Convenience functions for translating NUL-terminated strings: returns + // the buffer containing the converted string or NULL pointer if the + // conversion failed. + const wxWCharBuffer cMB2WC(const char *in) const; + const wxCharBuffer cWC2MB(const wchar_t *in) const; + + // Convenience functions for converting strings which may contain embedded + // NULs and don't have to be NUL-terminated. + // + // inLen is the length of the buffer including trailing NUL if any or + // wxNO_LEN if the input is NUL-terminated. + // + // outLen receives, if not NULL, the length of the converted string or 0 if + // the conversion failed (returning 0 and not -1 in this case makes it + // difficult to distinguish between failed conversion and empty input but + // this is done for backwards compatibility). Notice that the rules for + // whether outLen accounts or not for the last NUL are the same as for + // To/FromWChar() above: if inLen is specified, outLen is exactly the + // number of characters converted, whether the last one of them was NUL or + // not. But if inLen == wxNO_LEN then outLen doesn't account for the last + // NUL even though it is present. + const wxWCharBuffer + cMB2WC(const char *in, size_t inLen, size_t *outLen) const; + const wxCharBuffer + cWC2MB(const wchar_t *in, size_t inLen, size_t *outLen) const; + + // And yet more convenience functions for converting the entire buffers: + // these are the simplest and least error-prone as you never need to bother + // with lengths/sizes directly. + const wxWCharBuffer cMB2WC(const wxScopedCharBuffer& in) const; + const wxCharBuffer cWC2MB(const wxScopedWCharBuffer& in) const; + + // convenience functions for converting MB or WC to/from wxWin default +#if wxUSE_UNICODE + const wxWCharBuffer cMB2WX(const char *psz) const { return cMB2WC(psz); } + const wxCharBuffer cWX2MB(const wchar_t *psz) const { return cWC2MB(psz); } + const wchar_t* cWC2WX(const wchar_t *psz) const { return psz; } + const wchar_t* cWX2WC(const wchar_t *psz) const { return psz; } +#else // ANSI + const char* cMB2WX(const char *psz) const { return psz; } + const char* cWX2MB(const char *psz) const { return psz; } + const wxCharBuffer cWC2WX(const wchar_t *psz) const { return cWC2MB(psz); } + const wxWCharBuffer cWX2WC(const char *psz) const { return cMB2WC(psz); } +#endif // Unicode/ANSI + + // this function is used in the implementation of cMB2WC() to distinguish + // between the following cases: + // + // a) var width encoding with strings terminated by a single NUL + // (usual multibyte encodings): return 1 in this case + // b) fixed width encoding with 2 bytes/char and so terminated by + // 2 NULs (UTF-16/UCS-2 and variants): return 2 in this case + // c) fixed width encoding with 4 bytes/char and so terminated by + // 4 NULs (UTF-32/UCS-4 and variants): return 4 in this case + // + // anything else is not supported currently and -1 should be returned + virtual size_t GetMBNulLen() const { return 1; } + + // return the maximal value currently returned by GetMBNulLen() for any + // encoding + static size_t GetMaxMBNulLen() { return 4 /* for UTF-32 */; } + +#if wxUSE_UNICODE_UTF8 + // return true if the converter's charset is UTF-8, i.e. char* strings + // decoded using this object can be directly copied to wxString's internal + // storage without converting to WC and than back to UTF-8 MB string + virtual bool IsUTF8() const { return false; } +#endif + + // The old conversion functions. The existing classes currently mostly + // implement these ones but we're in transition to using To/FromWChar() + // instead and any new classes should implement just the new functions. + // For now, however, we provide default implementation of To/FromWChar() in + // this base class in terms of MB2WC/WC2MB() to avoid having to rewrite all + // the conversions at once. + // + // On success, the return value is the length (i.e. the number of + // characters, not bytes) not counting the trailing NUL(s) of the converted + // string. On failure, (size_t)-1 is returned. In the special case when + // outputBuf is NULL the return value is the same one but nothing is + // written to the buffer. + // + // Note that outLen is the length of the output buffer, not the length of + // the input (which is always supposed to be terminated by one or more + // NULs, as appropriate for the encoding)! + virtual size_t MB2WC(wchar_t *out, const char *in, size_t outLen) const; + virtual size_t WC2MB(char *out, const wchar_t *in, size_t outLen) const; + + + // make a heap-allocated copy of this object + virtual wxMBConv *Clone() const = 0; + + // virtual dtor for any base class + virtual ~wxMBConv(); +}; + +// ---------------------------------------------------------------------------- +// wxMBConvLibc uses standard mbstowcs() and wcstombs() functions for +// conversion (hence it depends on the current locale) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMBConvLibc : public wxMBConv +{ +public: + virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const; + virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const; + + virtual wxMBConv *Clone() const { return new wxMBConvLibc; } + +#if wxUSE_UNICODE_UTF8 + virtual bool IsUTF8() const { return wxLocaleIsUtf8; } +#endif +}; + +#ifdef __UNIX__ + +// ---------------------------------------------------------------------------- +// wxConvBrokenFileNames is made for Unix in Unicode mode when +// files are accidentally written in an encoding which is not +// the system encoding. Typically, the system encoding will be +// UTF8 but there might be files stored in ISO8859-1 on disk. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxConvBrokenFileNames : public wxMBConv +{ +public: + wxConvBrokenFileNames(const wxString& charset); + wxConvBrokenFileNames(const wxConvBrokenFileNames& conv) + : wxMBConv(), + m_conv(conv.m_conv ? conv.m_conv->Clone() : NULL) + { + } + virtual ~wxConvBrokenFileNames() { delete m_conv; } + + virtual size_t MB2WC(wchar_t *out, const char *in, size_t outLen) const + { + return m_conv->MB2WC(out, in, outLen); + } + + virtual size_t WC2MB(char *out, const wchar_t *in, size_t outLen) const + { + return m_conv->WC2MB(out, in, outLen); + } + + virtual size_t GetMBNulLen() const + { + // cast needed to call a private function + return m_conv->GetMBNulLen(); + } + +#if wxUSE_UNICODE_UTF8 + virtual bool IsUTF8() const { return m_conv->IsUTF8(); } +#endif + + virtual wxMBConv *Clone() const { return new wxConvBrokenFileNames(*this); } + +private: + // the conversion object we forward to + wxMBConv *m_conv; + + wxDECLARE_NO_ASSIGN_CLASS(wxConvBrokenFileNames); +}; + +#endif // __UNIX__ + +// ---------------------------------------------------------------------------- +// wxMBConvUTF7 (for conversion using UTF7 encoding) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMBConvUTF7 : public wxMBConv +{ +public: + wxMBConvUTF7() { } + + // compiler-generated copy ctor, assignment operator and dtor are ok + // (assuming it's ok to copy the shift state -- not really sure about it) + + virtual size_t ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN) const; + virtual size_t FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen = wxNO_LEN) const; + + virtual wxMBConv *Clone() const { return new wxMBConvUTF7; } + +private: + // UTF-7 decoder/encoder may be in direct mode or in shifted mode after a + // '+' (and until the '-' or any other non-base64 character) + struct StateMode + { + enum Mode + { + Direct, // pass through state + Shifted // after a '+' (and before '-') + }; + }; + + // the current decoder state: this is only used by ToWChar() if srcLen + // parameter is not wxNO_LEN, when working on the entire NUL-terminated + // strings we neither update nor use the state + class DecoderState : private StateMode + { + private: + // current state: this one is private as we want to enforce the use of + // ToDirect/ToShifted() methods below + Mode mode; + + public: + // the initial state is direct + DecoderState() { mode = Direct; } + + // switch to/from shifted mode + void ToDirect() { mode = Direct; } + void ToShifted() { mode = Shifted; accum = bit = 0; isLSB = false; } + + bool IsDirect() const { return mode == Direct; } + bool IsShifted() const { return mode == Shifted; } + + + // these variables are only used in shifted mode + + unsigned int accum; // accumulator of the bit we've already got + unsigned int bit; // the number of bits consumed mod 8 + unsigned char msb; // the high byte of UTF-16 word + bool isLSB; // whether we're decoding LSB or MSB of UTF-16 word + }; + + DecoderState m_stateDecoder; + + + // encoder state is simpler as we always receive entire Unicode characters + // on input + class EncoderState : private StateMode + { + private: + Mode mode; + + public: + EncoderState() { mode = Direct; } + + void ToDirect() { mode = Direct; } + void ToShifted() { mode = Shifted; accum = bit = 0; } + + bool IsDirect() const { return mode == Direct; } + bool IsShifted() const { return mode == Shifted; } + + unsigned int accum; + unsigned int bit; + }; + + EncoderState m_stateEncoder; +}; + +// ---------------------------------------------------------------------------- +// wxMBConvUTF8 (for conversion using UTF8 encoding) +// ---------------------------------------------------------------------------- + +// this is the real UTF-8 conversion class, it has to be called "strict UTF-8" +// for compatibility reasons: the wxMBConvUTF8 class below also supports lossy +// conversions if it is created with non default options +class WXDLLIMPEXP_BASE wxMBConvStrictUTF8 : public wxMBConv +{ +public: + // compiler-generated default ctor and other methods are ok + + virtual size_t ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN) const; + virtual size_t FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen = wxNO_LEN) const; + + virtual wxMBConv *Clone() const { return new wxMBConvStrictUTF8(); } + +#if wxUSE_UNICODE_UTF8 + // NB: other mapping modes are not, strictly speaking, UTF-8, so we can't + // take the shortcut in that case + virtual bool IsUTF8() const { return true; } +#endif +}; + +class WXDLLIMPEXP_BASE wxMBConvUTF8 : public wxMBConvStrictUTF8 +{ +public: + enum + { + MAP_INVALID_UTF8_NOT = 0, + MAP_INVALID_UTF8_TO_PUA = 1, + MAP_INVALID_UTF8_TO_OCTAL = 2 + }; + + wxMBConvUTF8(int options = MAP_INVALID_UTF8_NOT) : m_options(options) { } + + virtual size_t ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN) const; + virtual size_t FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen = wxNO_LEN) const; + + virtual wxMBConv *Clone() const { return new wxMBConvUTF8(m_options); } + +#if wxUSE_UNICODE_UTF8 + // NB: other mapping modes are not, strictly speaking, UTF-8, so we can't + // take the shortcut in that case + virtual bool IsUTF8() const { return m_options == MAP_INVALID_UTF8_NOT; } +#endif + +private: + int m_options; +}; + +// ---------------------------------------------------------------------------- +// wxMBConvUTF16Base: for both LE and BE variants +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMBConvUTF16Base : public wxMBConv +{ +public: + enum { BYTES_PER_CHAR = 2 }; + + virtual size_t GetMBNulLen() const { return BYTES_PER_CHAR; } + +protected: + // return the length of the buffer using srcLen if it's not wxNO_LEN and + // computing the length ourselves if it is; also checks that the length is + // even if specified as we need an entire number of UTF-16 characters and + // returns wxNO_LEN which indicates error if it is odd + static size_t GetLength(const char *src, size_t srcLen); +}; + +// ---------------------------------------------------------------------------- +// wxMBConvUTF16LE (for conversion using UTF16 Little Endian encoding) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMBConvUTF16LE : public wxMBConvUTF16Base +{ +public: + virtual size_t ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN) const; + virtual size_t FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen = wxNO_LEN) const; + virtual wxMBConv *Clone() const { return new wxMBConvUTF16LE; } +}; + +// ---------------------------------------------------------------------------- +// wxMBConvUTF16BE (for conversion using UTF16 Big Endian encoding) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMBConvUTF16BE : public wxMBConvUTF16Base +{ +public: + virtual size_t ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN) const; + virtual size_t FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen = wxNO_LEN) const; + virtual wxMBConv *Clone() const { return new wxMBConvUTF16BE; } +}; + +// ---------------------------------------------------------------------------- +// wxMBConvUTF32Base: base class for both LE and BE variants +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMBConvUTF32Base : public wxMBConv +{ +public: + enum { BYTES_PER_CHAR = 4 }; + + virtual size_t GetMBNulLen() const { return BYTES_PER_CHAR; } + +protected: + // this is similar to wxMBConvUTF16Base method with the same name except + // that, of course, it verifies that length is divisible by 4 if given and + // not by 2 + static size_t GetLength(const char *src, size_t srcLen); +}; + +// ---------------------------------------------------------------------------- +// wxMBConvUTF32LE (for conversion using UTF32 Little Endian encoding) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMBConvUTF32LE : public wxMBConvUTF32Base +{ +public: + virtual size_t ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN) const; + virtual size_t FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen = wxNO_LEN) const; + virtual wxMBConv *Clone() const { return new wxMBConvUTF32LE; } +}; + +// ---------------------------------------------------------------------------- +// wxMBConvUTF32BE (for conversion using UTF32 Big Endian encoding) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMBConvUTF32BE : public wxMBConvUTF32Base +{ +public: + virtual size_t ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN) const; + virtual size_t FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen = wxNO_LEN) const; + virtual wxMBConv *Clone() const { return new wxMBConvUTF32BE; } +}; + +// ---------------------------------------------------------------------------- +// wxCSConv (for conversion based on loadable char sets) +// ---------------------------------------------------------------------------- + +#include "wx/fontenc.h" + +class WXDLLIMPEXP_BASE wxCSConv : public wxMBConv +{ +public: + // we can be created either from charset name or from an encoding constant + // but we can't have both at once + wxCSConv(const wxString& charset); + wxCSConv(wxFontEncoding encoding); + + wxCSConv(const wxCSConv& conv); + virtual ~wxCSConv(); + + wxCSConv& operator=(const wxCSConv& conv); + + virtual size_t ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN) const; + virtual size_t FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen = wxNO_LEN) const; + virtual size_t GetMBNulLen() const; + +#if wxUSE_UNICODE_UTF8 + virtual bool IsUTF8() const; +#endif + + virtual wxMBConv *Clone() const { return new wxCSConv(*this); } + + void Clear(); + + // return true if the conversion could be initialized successfully + bool IsOk() const; + +private: + // common part of all ctors + void Init(); + + // Creates the conversion to use, called from all ctors to initialize + // m_convReal. + wxMBConv *DoCreate() const; + + // Set the name (may be only called when m_name == NULL), makes copy of + // the charset string. + void SetName(const char *charset); + + // Set m_encoding field respecting the rules below, i.e. making sure it has + // a valid value if m_name == NULL (thus this should be always called after + // SetName()). + // + // Input encoding may be valid or not. + void SetEncoding(wxFontEncoding encoding); + + + // The encoding we use is specified by the two fields below: + // + // 1. If m_name != NULL, m_encoding corresponds to it if it's one of + // encodings we know about (i.e. member of wxFontEncoding) or is + // wxFONTENCODING_SYSTEM otherwise. + // + // 2. If m_name == NULL, m_encoding is always valid, i.e. not one of + // wxFONTENCODING_{SYSTEM,DEFAULT,MAX}. + char *m_name; + wxFontEncoding m_encoding; + + // The conversion object for our encoding or NULL if we failed to create it + // in which case we fall back to hard-coded ISO8859-1 conversion. + wxMBConv *m_convReal; +}; + + +// ---------------------------------------------------------------------------- +// declare predefined conversion objects +// ---------------------------------------------------------------------------- + +// Note: this macro is an implementation detail (see the comment in +// strconv.cpp). The wxGet_XXX() and wxGet_XXXPtr() functions shouldn't be +// used by user code and neither should XXXPtr, use the wxConvXXX macro +// instead. +#define WX_DECLARE_GLOBAL_CONV(klass, name) \ + extern WXDLLIMPEXP_DATA_BASE(klass*) name##Ptr; \ + extern WXDLLIMPEXP_BASE klass* wxGet_##name##Ptr(); \ + inline klass& wxGet_##name() \ + { \ + if ( !name##Ptr ) \ + name##Ptr = wxGet_##name##Ptr(); \ + return *name##Ptr; \ + } + + +// conversion to be used with all standard functions affected by locale, e.g. +// strtol(), strftime(), ... +WX_DECLARE_GLOBAL_CONV(wxMBConv, wxConvLibc) +#define wxConvLibc wxGet_wxConvLibc() + +// conversion ISO-8859-1/UTF-7/UTF-8 <-> wchar_t +WX_DECLARE_GLOBAL_CONV(wxCSConv, wxConvISO8859_1) +#define wxConvISO8859_1 wxGet_wxConvISO8859_1() + +WX_DECLARE_GLOBAL_CONV(wxMBConvStrictUTF8, wxConvUTF8) +#define wxConvUTF8 wxGet_wxConvUTF8() + +WX_DECLARE_GLOBAL_CONV(wxMBConvUTF7, wxConvUTF7) +#define wxConvUTF7 wxGet_wxConvUTF7() + +// conversion used for the file names on the systems where they're not Unicode +// (basically anything except Windows) +// +// this is used by all file functions, can be changed by the application +// +// by default UTF-8 under Mac OS X and wxConvLibc elsewhere (but it's not used +// under Windows normally) +extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvFileName; + +// backwards compatible define +#define wxConvFile (*wxConvFileName) + +// the current conversion object, may be set to any conversion, is used by +// default in a couple of places inside wx (initially same as wxConvLibc) +extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvCurrent; + +// the conversion corresponding to the current locale +WX_DECLARE_GLOBAL_CONV(wxCSConv, wxConvLocal) +#define wxConvLocal wxGet_wxConvLocal() + +// the conversion corresponding to the encoding of the standard UI elements +// +// by default this is the same as wxConvLocal but may be changed if the program +// needs to use a fixed encoding +extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvUI; + +#undef WX_DECLARE_GLOBAL_CONV + +// ---------------------------------------------------------------------------- +// endianness-dependent conversions +// ---------------------------------------------------------------------------- + +#ifdef WORDS_BIGENDIAN + typedef wxMBConvUTF16BE wxMBConvUTF16; + typedef wxMBConvUTF32BE wxMBConvUTF32; +#else + typedef wxMBConvUTF16LE wxMBConvUTF16; + typedef wxMBConvUTF32LE wxMBConvUTF32; +#endif + +// ---------------------------------------------------------------------------- +// filename conversion macros +// ---------------------------------------------------------------------------- + +// filenames are multibyte on Unix and widechar on Windows +#if wxMBFILES && wxUSE_UNICODE + #define wxFNCONV(name) wxConvFileName->cWX2MB(name) + #define wxFNSTRINGCAST wxMBSTRINGCAST +#else +#if defined( __WXOSX_OR_COCOA__ ) && wxMBFILES + #define wxFNCONV(name) wxConvFileName->cWC2MB( wxConvLocal.cWX2WC(name) ) +#else + #define wxFNCONV(name) name +#endif + #define wxFNSTRINGCAST WXSTRINGCAST +#endif + +// ---------------------------------------------------------------------------- +// macros for the most common conversions +// ---------------------------------------------------------------------------- + +#if wxUSE_UNICODE + #define wxConvertWX2MB(s) wxConvCurrent->cWX2MB(s) + #define wxConvertMB2WX(s) wxConvCurrent->cMB2WX(s) + + // these functions should be used when the conversions really, really have + // to succeed (usually because we pass their results to a standard C + // function which would crash if we passed NULL to it), so these functions + // always return a valid pointer if their argument is non-NULL + + // this function safety is achieved by trying wxConvLibc first, wxConvUTF8 + // next if it fails and, finally, wxConvISO8859_1 which always succeeds + extern WXDLLIMPEXP_BASE wxWCharBuffer wxSafeConvertMB2WX(const char *s); + + // this function uses wxConvLibc and wxConvUTF8(MAP_INVALID_UTF8_TO_OCTAL) + // if it fails + extern WXDLLIMPEXP_BASE wxCharBuffer wxSafeConvertWX2MB(const wchar_t *ws); +#else // ANSI + // no conversions to do + #define wxConvertWX2MB(s) (s) + #define wxConvertMB2WX(s) (s) + #define wxSafeConvertMB2WX(s) (s) + #define wxSafeConvertWX2MB(s) (s) +#endif // Unicode/ANSI + +#endif // _WX_STRCONV_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stream.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stream.h new file mode 100644 index 0000000000..0c380d6aaf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stream.h @@ -0,0 +1,704 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/stream.h +// Purpose: stream classes +// Author: Guilhem Lavaux, Guillermo Rodriguez Garcia, Vadim Zeitlin +// Modified by: +// Created: 11/07/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WXSTREAM_H__ +#define _WX_WXSTREAM_H__ + +#include "wx/defs.h" + +#if wxUSE_STREAMS + +#include <stdio.h> +#include "wx/object.h" +#include "wx/string.h" +#include "wx/filefn.h" // for wxFileOffset, wxInvalidOffset and wxSeekMode + +class WXDLLIMPEXP_FWD_BASE wxStreamBase; +class WXDLLIMPEXP_FWD_BASE wxInputStream; +class WXDLLIMPEXP_FWD_BASE wxOutputStream; + +typedef wxInputStream& (*__wxInputManip)(wxInputStream&); +typedef wxOutputStream& (*__wxOutputManip)(wxOutputStream&); + +WXDLLIMPEXP_BASE wxOutputStream& wxEndL(wxOutputStream& o_stream); + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +enum wxStreamError +{ + wxSTREAM_NO_ERROR = 0, // stream is in good state + wxSTREAM_EOF, // EOF reached in Read() or similar + wxSTREAM_WRITE_ERROR, // generic write error + wxSTREAM_READ_ERROR // generic read error +}; + +const int wxEOF = -1; + +// ============================================================================ +// base stream classes: wxInputStream and wxOutputStream +// ============================================================================ + +// --------------------------------------------------------------------------- +// wxStreamBase: common (but non virtual!) base for all stream classes +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStreamBase : public wxObject +{ +public: + wxStreamBase(); + virtual ~wxStreamBase(); + + // error testing + wxStreamError GetLastError() const { return m_lasterror; } + virtual bool IsOk() const { return GetLastError() == wxSTREAM_NO_ERROR; } + bool operator!() const { return !IsOk(); } + + // reset the stream state + void Reset(wxStreamError error = wxSTREAM_NO_ERROR) { m_lasterror = error; } + + // this doesn't make sense for all streams, always test its return value + virtual size_t GetSize() const; + virtual wxFileOffset GetLength() const { return wxInvalidOffset; } + + // returns true if the streams supports seeking to arbitrary offsets + virtual bool IsSeekable() const { return false; } + +protected: + virtual wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode); + virtual wxFileOffset OnSysTell() const; + + size_t m_lastcount; + wxStreamError m_lasterror; + + friend class wxStreamBuffer; + + DECLARE_ABSTRACT_CLASS(wxStreamBase) + wxDECLARE_NO_COPY_CLASS(wxStreamBase); +}; + +// ---------------------------------------------------------------------------- +// wxInputStream: base class for the input streams +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxInputStream : public wxStreamBase +{ +public: + // ctor and dtor, nothing exciting + wxInputStream(); + virtual ~wxInputStream(); + + + // IO functions + // ------------ + + // return a character from the stream without removing it, i.e. it will + // still be returned by the next call to GetC() + // + // blocks until something appears in the stream if necessary, if nothing + // ever does (i.e. EOF) LastRead() will return 0 (and the return value is + // undefined), otherwise 1 + virtual char Peek(); + + // return one byte from the stream, blocking until it appears if + // necessary + // + // on success returns a value between 0 - 255, or wxEOF on EOF or error. + int GetC(); + + // read at most the given number of bytes from the stream + // + // there are 2 possible situations here: either there is nothing at all in + // the stream right now in which case Read() blocks until something appears + // (use CanRead() to avoid this) or there is already some data available in + // the stream and then Read() doesn't block but returns just the data it + // can read without waiting for more + // + // in any case, if there are not enough bytes in the stream right now, + // LastRead() value will be less than size but greater than 0. If it is 0, + // it means that EOF has been reached. + virtual wxInputStream& Read(void *buffer, size_t size); + + // Read exactly the given number of bytes, unlike Read(), which may read + // less than the requested amount of data without returning an error, this + // method either reads all the data or returns false. + bool ReadAll(void *buffer, size_t size); + + // copy the entire contents of this stream into streamOut, stopping only + // when EOF is reached or an error occurs + wxInputStream& Read(wxOutputStream& streamOut); + + + // status functions + // ---------------- + + // returns the number of bytes read by the last call to Read(), GetC() or + // Peek() + // + // this should be used to discover whether that call succeeded in reading + // all the requested data or not + virtual size_t LastRead() const { return wxStreamBase::m_lastcount; } + + // returns true if some data is available in the stream right now, so that + // calling Read() wouldn't block + virtual bool CanRead() const; + + // is the stream at EOF? + // + // note that this cannot be really implemented for all streams and + // CanRead() is more reliable than Eof() + virtual bool Eof() const; + + + // write back buffer + // ----------------- + + // put back the specified number of bytes into the stream, they will be + // fetched by the next call to the read functions + // + // returns the number of bytes really stuffed back + size_t Ungetch(const void *buffer, size_t size); + + // put back the specified character in the stream + // + // returns true if ok, false on error + bool Ungetch(char c); + + + // position functions + // ------------------ + + // move the stream pointer to the given position (if the stream supports + // it) + // + // returns wxInvalidOffset on error + virtual wxFileOffset SeekI(wxFileOffset pos, wxSeekMode mode = wxFromStart); + + // return the current position of the stream pointer or wxInvalidOffset + virtual wxFileOffset TellI() const; + + + // stream-like operators + // --------------------- + + wxInputStream& operator>>(wxOutputStream& out) { return Read(out); } + wxInputStream& operator>>(__wxInputManip func) { return func(*this); } + +protected: + // do read up to size bytes of data into the provided buffer + // + // this method should return 0 if EOF has been reached or an error occurred + // (m_lasterror should be set accordingly as well) or the number of bytes + // read + virtual size_t OnSysRead(void *buffer, size_t size) = 0; + + // write-back buffer support + // ------------------------- + + // return the pointer to a buffer big enough to hold sizeNeeded bytes + char *AllocSpaceWBack(size_t sizeNeeded); + + // read up to size data from the write back buffer, return the number of + // bytes read + size_t GetWBack(void *buf, size_t size); + + // write back buffer or NULL if none + char *m_wback; + + // the size of the buffer + size_t m_wbacksize; + + // the current position in the buffer + size_t m_wbackcur; + + friend class wxStreamBuffer; + + DECLARE_ABSTRACT_CLASS(wxInputStream) + wxDECLARE_NO_COPY_CLASS(wxInputStream); +}; + +// ---------------------------------------------------------------------------- +// wxOutputStream: base for the output streams +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxOutputStream : public wxStreamBase +{ +public: + wxOutputStream(); + virtual ~wxOutputStream(); + + void PutC(char c); + virtual wxOutputStream& Write(const void *buffer, size_t size); + + // This is ReadAll() equivalent for Write(): it either writes exactly the + // given number of bytes or returns false, unlike Write() which can write + // less data than requested but still return without error. + bool WriteAll(const void *buffer, size_t size); + + wxOutputStream& Write(wxInputStream& stream_in); + + virtual wxFileOffset SeekO(wxFileOffset pos, wxSeekMode mode = wxFromStart); + virtual wxFileOffset TellO() const; + + virtual size_t LastWrite() const { return wxStreamBase::m_lastcount; } + + virtual void Sync(); + virtual bool Close() { return true; } + + wxOutputStream& operator<<(wxInputStream& out) { return Write(out); } + wxOutputStream& operator<<( __wxOutputManip func) { return func(*this); } + +protected: + // to be implemented in the derived classes (it should have been pure + // virtual) + virtual size_t OnSysWrite(const void *buffer, size_t bufsize); + + friend class wxStreamBuffer; + + DECLARE_ABSTRACT_CLASS(wxOutputStream) + wxDECLARE_NO_COPY_CLASS(wxOutputStream); +}; + +// ============================================================================ +// helper stream classes +// ============================================================================ + +// --------------------------------------------------------------------------- +// A stream for measuring streamed output +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxCountingOutputStream : public wxOutputStream +{ +public: + wxCountingOutputStream(); + + virtual wxFileOffset GetLength() const; + bool Ok() const { return IsOk(); } + virtual bool IsOk() const { return true; } + +protected: + virtual size_t OnSysWrite(const void *buffer, size_t size); + virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + virtual wxFileOffset OnSysTell() const; + + size_t m_currentPos, + m_lastPos; + + DECLARE_DYNAMIC_CLASS(wxCountingOutputStream) + wxDECLARE_NO_COPY_CLASS(wxCountingOutputStream); +}; + +// --------------------------------------------------------------------------- +// "Filter" streams +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFilterInputStream : public wxInputStream +{ +public: + wxFilterInputStream(); + wxFilterInputStream(wxInputStream& stream); + wxFilterInputStream(wxInputStream *stream); + virtual ~wxFilterInputStream(); + + char Peek() { return m_parent_i_stream->Peek(); } + + wxFileOffset GetLength() const { return m_parent_i_stream->GetLength(); } + + wxInputStream *GetFilterInputStream() const { return m_parent_i_stream; } + +protected: + wxInputStream *m_parent_i_stream; + bool m_owns; + + DECLARE_ABSTRACT_CLASS(wxFilterInputStream) + wxDECLARE_NO_COPY_CLASS(wxFilterInputStream); +}; + +class WXDLLIMPEXP_BASE wxFilterOutputStream : public wxOutputStream +{ +public: + wxFilterOutputStream(); + wxFilterOutputStream(wxOutputStream& stream); + wxFilterOutputStream(wxOutputStream *stream); + virtual ~wxFilterOutputStream(); + + wxFileOffset GetLength() const { return m_parent_o_stream->GetLength(); } + + wxOutputStream *GetFilterOutputStream() const { return m_parent_o_stream; } + + bool Close(); + +protected: + wxOutputStream *m_parent_o_stream; + bool m_owns; + + DECLARE_ABSTRACT_CLASS(wxFilterOutputStream) + wxDECLARE_NO_COPY_CLASS(wxFilterOutputStream); +}; + +enum wxStreamProtocolType +{ + wxSTREAM_PROTOCOL, // wxFileSystem protocol (should be only one) + wxSTREAM_MIMETYPE, // MIME types the stream handles + wxSTREAM_ENCODING, // The HTTP Content-Encodings the stream handles + wxSTREAM_FILEEXT // File extensions the stream handles +}; + +void WXDLLIMPEXP_BASE wxUseFilterClasses(); + +class WXDLLIMPEXP_BASE wxFilterClassFactoryBase : public wxObject +{ +public: + virtual ~wxFilterClassFactoryBase() { } + + wxString GetProtocol() const { return wxString(*GetProtocols()); } + wxString PopExtension(const wxString& location) const; + + virtual const wxChar * const *GetProtocols(wxStreamProtocolType type + = wxSTREAM_PROTOCOL) const = 0; + + bool CanHandle(const wxString& protocol, + wxStreamProtocolType type + = wxSTREAM_PROTOCOL) const; + +protected: + wxString::size_type FindExtension(const wxString& location) const; + + DECLARE_ABSTRACT_CLASS(wxFilterClassFactoryBase) +}; + +class WXDLLIMPEXP_BASE wxFilterClassFactory : public wxFilterClassFactoryBase +{ +public: + virtual ~wxFilterClassFactory() { } + + virtual wxFilterInputStream *NewStream(wxInputStream& stream) const = 0; + virtual wxFilterOutputStream *NewStream(wxOutputStream& stream) const = 0; + virtual wxFilterInputStream *NewStream(wxInputStream *stream) const = 0; + virtual wxFilterOutputStream *NewStream(wxOutputStream *stream) const = 0; + + static const wxFilterClassFactory *Find(const wxString& protocol, + wxStreamProtocolType type + = wxSTREAM_PROTOCOL); + + static const wxFilterClassFactory *GetFirst(); + const wxFilterClassFactory *GetNext() const { return m_next; } + + void PushFront() { Remove(); m_next = sm_first; sm_first = this; } + void Remove(); + +protected: + wxFilterClassFactory() : m_next(this) { } + + wxFilterClassFactory& operator=(const wxFilterClassFactory&) + { return *this; } + +private: + static wxFilterClassFactory *sm_first; + wxFilterClassFactory *m_next; + + DECLARE_ABSTRACT_CLASS(wxFilterClassFactory) +}; + +// ============================================================================ +// buffered streams +// ============================================================================ + +// --------------------------------------------------------------------------- +// Stream buffer: this class can be derived from and passed to +// wxBufferedStreams to implement custom buffering +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStreamBuffer +{ +public: + enum BufMode + { + read, + write, + read_write + }; + + wxStreamBuffer(wxStreamBase& stream, BufMode mode) + { + InitWithStream(stream, mode); + } + + wxStreamBuffer(size_t bufsize, wxInputStream& stream) + { + InitWithStream(stream, read); + SetBufferIO(bufsize); + } + + wxStreamBuffer(size_t bufsize, wxOutputStream& stream) + { + InitWithStream(stream, write); + SetBufferIO(bufsize); + } + + wxStreamBuffer(const wxStreamBuffer& buf); + virtual ~wxStreamBuffer(); + + // Filtered IO + virtual size_t Read(void *buffer, size_t size); + size_t Read(wxStreamBuffer *buf); + virtual size_t Write(const void *buffer, size_t size); + size_t Write(wxStreamBuffer *buf); + + virtual char Peek(); + virtual char GetChar(); + virtual void PutChar(char c); + virtual wxFileOffset Tell() const; + virtual wxFileOffset Seek(wxFileOffset pos, wxSeekMode mode); + + // Buffer control + void ResetBuffer(); + void Truncate(); + + // NB: the buffer must always be allocated with malloc() if takeOwn is + // true as it will be deallocated by free() + void SetBufferIO(void *start, void *end, bool takeOwnership = false); + void SetBufferIO(void *start, size_t len, bool takeOwnership = false); + void SetBufferIO(size_t bufsize); + void *GetBufferStart() const { return m_buffer_start; } + void *GetBufferEnd() const { return m_buffer_end; } + void *GetBufferPos() const { return m_buffer_pos; } + size_t GetBufferSize() const { return m_buffer_end - m_buffer_start; } + size_t GetIntPosition() const { return m_buffer_pos - m_buffer_start; } + void SetIntPosition(size_t pos) { m_buffer_pos = m_buffer_start + pos; } + size_t GetLastAccess() const { return m_buffer_end - m_buffer_start; } + size_t GetBytesLeft() const { return m_buffer_end - m_buffer_pos; } + + void Fixed(bool fixed) { m_fixed = fixed; } + void Flushable(bool f) { m_flushable = f; } + + bool FlushBuffer(); + bool FillBuffer(); + size_t GetDataLeft(); + + // misc accessors + wxStreamBase *GetStream() const { return m_stream; } + bool HasBuffer() const { return m_buffer_start != m_buffer_end; } + + bool IsFixed() const { return m_fixed; } + bool IsFlushable() const { return m_flushable; } + + // only for input/output buffers respectively, returns NULL otherwise + wxInputStream *GetInputStream() const; + wxOutputStream *GetOutputStream() const; + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated, for compatibility only + wxDEPRECATED( wxStreamBase *Stream() ); +#endif // WXWIN_COMPATIBILITY_2_6 + + // this constructs a dummy wxStreamBuffer, used by (and exists for) + // wxMemoryStreams only, don't use! + wxStreamBuffer(BufMode mode); + +protected: + void GetFromBuffer(void *buffer, size_t size); + void PutToBuffer(const void *buffer, size_t size); + + // set the last error to the specified value if we didn't have it before + void SetError(wxStreamError err); + + // common part of several ctors + void Init(); + + // common part of ctors taking wxStreamBase parameter + void InitWithStream(wxStreamBase& stream, BufMode mode); + + // init buffer variables to be empty + void InitBuffer(); + + // free the buffer (always safe to call) + void FreeBuffer(); + + // the buffer itself: the pointers to its start and end and the current + // position in the buffer + char *m_buffer_start, + *m_buffer_end, + *m_buffer_pos; + + // the stream we're associated with + wxStreamBase *m_stream; + + // its mode + BufMode m_mode; + + // flags + bool m_destroybuf, // deallocate buffer? + m_fixed, + m_flushable; + + + wxDECLARE_NO_ASSIGN_CLASS(wxStreamBuffer); +}; + +// --------------------------------------------------------------------------- +// wxBufferedInputStream +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxBufferedInputStream : public wxFilterInputStream +{ +public: + // create a buffered stream on top of the specified low-level stream + // + // if a non NULL buffer is given to the stream, it will be deleted by it, + // otherwise a default 1KB buffer will be used + wxBufferedInputStream(wxInputStream& stream, + wxStreamBuffer *buffer = NULL); + + // ctor allowing to specify the buffer size, it's just a more convenient + // alternative to creating wxStreamBuffer, calling its SetBufferIO(bufsize) + // and using the ctor above + wxBufferedInputStream(wxInputStream& stream, size_t bufsize); + + + virtual ~wxBufferedInputStream(); + + char Peek(); + wxInputStream& Read(void *buffer, size_t size); + + // Position functions + wxFileOffset SeekI(wxFileOffset pos, wxSeekMode mode = wxFromStart); + wxFileOffset TellI() const; + bool IsSeekable() const { return m_parent_i_stream->IsSeekable(); } + + // the buffer given to the stream will be deleted by it + void SetInputStreamBuffer(wxStreamBuffer *buffer); + wxStreamBuffer *GetInputStreamBuffer() const { return m_i_streambuf; } + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated, for compatibility only + wxDEPRECATED( wxStreamBuffer *InputStreamBuffer() const ); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + virtual size_t OnSysRead(void *buffer, size_t bufsize); + virtual wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode); + virtual wxFileOffset OnSysTell() const; + + wxStreamBuffer *m_i_streambuf; + + wxDECLARE_NO_COPY_CLASS(wxBufferedInputStream); +}; + +// ---------------------------------------------------------------------------- +// wxBufferedOutputStream +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxBufferedOutputStream : public wxFilterOutputStream +{ +public: + // create a buffered stream on top of the specified low-level stream + // + // if a non NULL buffer is given to the stream, it will be deleted by it, + // otherwise a default 1KB buffer will be used + wxBufferedOutputStream(wxOutputStream& stream, + wxStreamBuffer *buffer = NULL); + + // ctor allowing to specify the buffer size, it's just a more convenient + // alternative to creating wxStreamBuffer, calling its SetBufferIO(bufsize) + // and using the ctor above + wxBufferedOutputStream(wxOutputStream& stream, size_t bufsize); + + virtual ~wxBufferedOutputStream(); + + wxOutputStream& Write(const void *buffer, size_t size); + + // Position functions + wxFileOffset SeekO(wxFileOffset pos, wxSeekMode mode = wxFromStart); + wxFileOffset TellO() const; + bool IsSeekable() const { return m_parent_o_stream->IsSeekable(); } + + void Sync(); + bool Close(); + + wxFileOffset GetLength() const; + + // the buffer given to the stream will be deleted by it + void SetOutputStreamBuffer(wxStreamBuffer *buffer); + wxStreamBuffer *GetOutputStreamBuffer() const { return m_o_streambuf; } + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated, for compatibility only + wxDEPRECATED( wxStreamBuffer *OutputStreamBuffer() const ); +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + virtual size_t OnSysWrite(const void *buffer, size_t bufsize); + virtual wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode); + virtual wxFileOffset OnSysTell() const; + + wxStreamBuffer *m_o_streambuf; + + wxDECLARE_NO_COPY_CLASS(wxBufferedOutputStream); +}; + +#if WXWIN_COMPATIBILITY_2_6 + inline wxStreamBase *wxStreamBuffer::Stream() { return m_stream; } + inline wxStreamBuffer *wxBufferedInputStream::InputStreamBuffer() const { return m_i_streambuf; } + inline wxStreamBuffer *wxBufferedOutputStream::OutputStreamBuffer() const { return m_o_streambuf; } +#endif // WXWIN_COMPATIBILITY_2_6 + +// --------------------------------------------------------------------------- +// wxWrapperInputStream: forwards all IO to another stream. +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxWrapperInputStream : public wxFilterInputStream +{ +public: + // Constructor fully initializing the stream. The overload taking pointer + // takes ownership of the parent stream, the one taking reference does not. + // + // Notice that this class also has a default ctor but it's protected as the + // derived class is supposed to take care of calling InitParentStream() if + // it's used. + wxWrapperInputStream(wxInputStream& stream); + wxWrapperInputStream(wxInputStream* stream); + + // Override the base class methods to forward to the wrapped stream. + virtual wxFileOffset GetLength() const; + virtual bool IsSeekable() const; + +protected: + virtual size_t OnSysRead(void *buffer, size_t size); + virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + virtual wxFileOffset OnSysTell() const; + + // Ensure that our own last error is the same as that of the real stream. + // + // This method is const because the error must be updated even from const + // methods (in other words, it really should have been mutable in the first + // place). + void SynchronizeLastError() const + { + const_cast<wxWrapperInputStream*>(this)-> + Reset(m_parent_i_stream->GetLastError()); + } + + // Default constructor, use InitParentStream() later. + wxWrapperInputStream(); + + // Set up the wrapped stream for an object initialized using the default + // constructor. The ownership logic is the same as above. + void InitParentStream(wxInputStream& stream); + void InitParentStream(wxInputStream* stream); + + wxDECLARE_NO_COPY_CLASS(wxWrapperInputStream); +}; + + +#endif // wxUSE_STREAMS + +#endif // _WX_WXSTREAM_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/string.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/string.h new file mode 100644 index 0000000000..ef1a8d9aa8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/string.h @@ -0,0 +1,4323 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/string.h +// Purpose: wxString class +// Author: Vadim Zeitlin +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +/* + Efficient string class [more or less] compatible with MFC CString, + wxWidgets version 1 wxString and std::string and some handy functions + missing from string.h. +*/ + +#ifndef _WX_WXSTRING_H__ +#define _WX_WXSTRING_H__ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" // everybody should include this + +#if defined(__WXMAC__) || defined(__VISAGECPP__) + #include <ctype.h> +#endif + +#if defined(__VISAGECPP__) && __IBMCPP__ >= 400 + // problem in VACPP V4 with including stdlib.h multiple times + // strconv includes it anyway +# include <stdio.h> +# include <string.h> +# include <stdarg.h> +# include <limits.h> +#else +# include <string.h> +# include <stdio.h> +# include <stdarg.h> +# include <limits.h> +# include <stdlib.h> +#endif + +#include "wx/wxcrtbase.h" // for wxChar, wxStrlen() etc. +#include "wx/strvararg.h" +#include "wx/buffer.h" // for wxCharBuffer +#include "wx/strconv.h" // for wxConvertXXX() macros and wxMBConv classes +#include "wx/stringimpl.h" +#include "wx/stringops.h" +#include "wx/unichar.h" + +// by default we cache the mapping of the positions in UTF-8 string to the byte +// offset as this results in noticeable performance improvements for loops over +// strings using indices; comment out this line to disable this +// +// notice that this optimization is well worth using even in debug builds as it +// changes asymptotic complexity of algorithms using indices to iterate over +// wxString back to expected linear from quadratic +// +// also notice that wxTLS_TYPE() (__declspec(thread) in this case) is unsafe to +// use in DLL build under pre-Vista Windows so we disable this code for now, if +// anybody really needs to use UTF-8 build under Windows with this optimization +// it would have to be re-tested and probably corrected +// CS: under OSX release builds the string destructor/cache cleanup sometimes +// crashes, disable until we find the true reason or a better workaround +#if wxUSE_UNICODE_UTF8 && !defined(__WINDOWS__) && !defined(__WXOSX__) + #define wxUSE_STRING_POS_CACHE 1 +#else + #define wxUSE_STRING_POS_CACHE 0 +#endif + +#if wxUSE_STRING_POS_CACHE + #include "wx/tls.h" + + // change this 0 to 1 to enable additional (very expensive) asserts + // verifying that string caching logic works as expected + #if 0 + #define wxSTRING_CACHE_ASSERT(cond) wxASSERT(cond) + #else + #define wxSTRING_CACHE_ASSERT(cond) + #endif +#endif // wxUSE_STRING_POS_CACHE + +class WXDLLIMPEXP_FWD_BASE wxString; + +// unless this symbol is predefined to disable the compatibility functions, do +// use them +#ifndef WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER + #define WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER 1 +#endif + +namespace wxPrivate +{ + template <typename T> struct wxStringAsBufHelper; +} + +// --------------------------------------------------------------------------- +// macros +// --------------------------------------------------------------------------- + +// casts [unfortunately!] needed to call some broken functions which require +// "char *" instead of "const char *" +#define WXSTRINGCAST (wxChar *)(const wxChar *) +#define wxCSTRINGCAST (wxChar *)(const wxChar *) +#define wxMBSTRINGCAST (char *)(const char *) +#define wxWCSTRINGCAST (wchar_t *)(const wchar_t *) + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_6 + +// deprecated in favour of wxString::npos, don't use in new code +// +// maximum possible length for a string means "take all string" everywhere +#define wxSTRING_MAXLEN wxString::npos + +#endif // WXWIN_COMPATIBILITY_2_6 + +// --------------------------------------------------------------------------- +// global functions complementing standard C string library replacements for +// strlen() and portable strcasecmp() +//--------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_8 +// Use wxXXX() functions from wxcrt.h instead! These functions are for +// backwards compatibility only. + +// checks whether the passed in pointer is NULL and if the string is empty +wxDEPRECATED_MSG("use wxIsEmpty() instead") +inline bool IsEmpty(const char *p) { return (!p || !*p); } + +// safe version of strlen() (returns 0 if passed NULL pointer) +wxDEPRECATED_MSG("use wxStrlen() instead") +inline size_t Strlen(const char *psz) + { return psz ? strlen(psz) : 0; } + +// portable strcasecmp/_stricmp +wxDEPRECATED_MSG("use wxStricmp() instead") +inline int Stricmp(const char *psz1, const char *psz2) + { return wxCRT_StricmpA(psz1, psz2); } + +#endif // WXWIN_COMPATIBILITY_2_8 + +// ---------------------------------------------------------------------------- +// wxCStrData +// ---------------------------------------------------------------------------- + +// Lightweight object returned by wxString::c_str() and implicitly convertible +// to either const char* or const wchar_t*. +class wxCStrData +{ +private: + // Ctors; for internal use by wxString and wxCStrData only + wxCStrData(const wxString *str, size_t offset = 0, bool owned = false) + : m_str(str), m_offset(offset), m_owned(owned) {} + +public: + // Ctor constructs the object from char literal; they are needed to make + // operator?: compile and they intentionally take char*, not const char* + inline wxCStrData(char *buf); + inline wxCStrData(wchar_t *buf); + inline wxCStrData(const wxCStrData& data); + + inline ~wxCStrData(); + + // AsWChar() and AsChar() can't be defined here as they use wxString and so + // must come after it and because of this won't be inlined when called from + // wxString methods (without a lot of work to extract these wxString methods + // from inside the class itself). But we still define them being inline + // below to let compiler inline them from elsewhere. And because of this we + // must declare them as inline here because otherwise some compilers give + // warnings about them, e.g. mingw32 3.4.5 warns about "<symbol> defined + // locally after being referenced with dllimport linkage" while IRIX + // mipsPro 7.4 warns about "function declared inline after being called". + inline const wchar_t* AsWChar() const; + operator const wchar_t*() const { return AsWChar(); } + + inline const char* AsChar() const; + const unsigned char* AsUnsignedChar() const + { return (const unsigned char *) AsChar(); } + operator const char*() const { return AsChar(); } + operator const unsigned char*() const { return AsUnsignedChar(); } + + operator const void*() const { return AsChar(); } + + // returns buffers that are valid as long as the associated wxString exists + const wxScopedCharBuffer AsCharBuf() const + { + return wxScopedCharBuffer::CreateNonOwned(AsChar()); + } + + const wxScopedWCharBuffer AsWCharBuf() const + { + return wxScopedWCharBuffer::CreateNonOwned(AsWChar()); + } + + inline wxString AsString() const; + + // returns the value as C string in internal representation (equivalent + // to AsString().wx_str(), but more efficient) + const wxStringCharType *AsInternal() const; + + // allow expressions like "c_str()[0]": + inline wxUniChar operator[](size_t n) const; + wxUniChar operator[](int n) const { return operator[](size_t(n)); } + wxUniChar operator[](long n) const { return operator[](size_t(n)); } +#ifndef wxSIZE_T_IS_UINT + wxUniChar operator[](unsigned int n) const { return operator[](size_t(n)); } +#endif // size_t != unsigned int + + // These operators are needed to emulate the pointer semantics of c_str(): + // expressions like "wxChar *p = str.c_str() + 1;" should continue to work + // (we need both versions to resolve ambiguities). Note that this means + // the 'n' value is interpreted as addition to char*/wchar_t* pointer, it + // is *not* number of Unicode characters in wxString. + wxCStrData operator+(int n) const + { return wxCStrData(m_str, m_offset + n, m_owned); } + wxCStrData operator+(long n) const + { return wxCStrData(m_str, m_offset + n, m_owned); } + wxCStrData operator+(size_t n) const + { return wxCStrData(m_str, m_offset + n, m_owned); } + + // and these for "str.c_str() + (p2 - p1)" (it also works for any integer + // expression but it must be ptrdiff_t and not e.g. int to work in this + // example): + wxCStrData operator-(ptrdiff_t n) const + { + wxASSERT_MSG( n <= (ptrdiff_t)m_offset, + wxT("attempt to construct address before the beginning of the string") ); + return wxCStrData(m_str, m_offset - n, m_owned); + } + + // this operator is needed to make expressions like "*c_str()" or + // "*(c_str() + 2)" work + inline wxUniChar operator*() const; + +private: + // the wxString this object was returned for + const wxString *m_str; + // Offset into c_str() return value. Note that this is *not* offset in + // m_str in Unicode characters. Instead, it is index into the + // char*/wchar_t* buffer returned by c_str(). It's interpretation depends + // on how is the wxCStrData instance used: if it is eventually cast to + // const char*, m_offset will be in bytes form string's start; if it is + // cast to const wchar_t*, it will be in wchar_t values. + size_t m_offset; + // should m_str be deleted, i.e. is it owned by us? + bool m_owned; + + friend class WXDLLIMPEXP_FWD_BASE wxString; +}; + +// ---------------------------------------------------------------------------- +// wxStringPrintfMixin +// --------------------------------------------------------------------------- + +// NB: VC6 has a bug that causes linker errors if you have template methods +// in a class using __declspec(dllimport). The solution is to split such +// class into two classes, one that contains the template methods and does +// *not* use WXDLLIMPEXP_BASE and another class that contains the rest +// (with DLL linkage). +// +// We only do this for VC6 here, because the code is less efficient +// (Printf() has to use dynamic_cast<>) and because OpenWatcom compiler +// cannot compile this code. + +#if defined(__VISUALC__) && __VISUALC__ < 1300 + #define wxNEEDS_WXSTRING_PRINTF_MIXIN +#endif + +#ifdef wxNEEDS_WXSTRING_PRINTF_MIXIN +// this class contains implementation of wxString's vararg methods, it's +// exported from wxBase DLL +class WXDLLIMPEXP_BASE wxStringPrintfMixinBase +{ +protected: + wxStringPrintfMixinBase() {} + +#if !wxUSE_UTF8_LOCALE_ONLY + int DoPrintfWchar(const wxChar *format, ...); + static wxString DoFormatWchar(const wxChar *format, ...); +#endif +#if wxUSE_UNICODE_UTF8 + int DoPrintfUtf8(const char *format, ...); + static wxString DoFormatUtf8(const char *format, ...); +#endif +}; + +// this class contains template wrappers for wxString's vararg methods, it's +// intentionally *not* exported from the DLL in order to fix the VC6 bug +// described above +class wxStringPrintfMixin : public wxStringPrintfMixinBase +{ +private: + // to further complicate things, we can't return wxString from + // wxStringPrintfMixin::Format() because wxString is not yet declared at + // this point; the solution is to use this fake type trait template - this + // way the compiler won't know the return type until Format() is used + // (this doesn't compile with Watcom, but VC6 compiles it just fine): + template<typename T> struct StringReturnType + { + typedef wxString type; + }; + +public: + // these are duplicated wxString methods, they're also declared below + // if !wxNEEDS_WXSTRING_PRINTF_MIXIN: + + // static wxString Format(const wString& format, ...) WX_ATTRIBUTE_PRINTF_1; + WX_DEFINE_VARARG_FUNC_SANS_N0(static typename StringReturnType<T1>::type, + Format, 1, (const wxFormatString&), + DoFormatWchar, DoFormatUtf8) + // We have to implement the version without template arguments manually + // because of the StringReturnType<> hack, although WX_DEFINE_VARARG_FUNC + // normally does it itself. It has to be a template so that we can use + // the hack, even though there's no real template parameter. We can't move + // it to wxStrig, because it would shadow these versions of Format() then. + template<typename T> + inline static typename StringReturnType<T>::type + Format(const T& fmt) + { + // NB: this doesn't compile if T is not (some form of) a string; + // this makes Format's prototype equivalent to + // Format(const wxFormatString& fmt) + return DoFormatWchar(wxFormatString(fmt)); + } + + // int Printf(const wxString& format, ...); + WX_DEFINE_VARARG_FUNC(int, Printf, 1, (const wxFormatString&), + DoPrintfWchar, DoPrintfUtf8) + // int sprintf(const wxString& format, ...) WX_ATTRIBUTE_PRINTF_2; + WX_DEFINE_VARARG_FUNC(int, sprintf, 1, (const wxFormatString&), + DoPrintfWchar, DoPrintfUtf8) + +protected: + wxStringPrintfMixin() : wxStringPrintfMixinBase() {} +}; +#endif // wxNEEDS_WXSTRING_PRINTF_MIXIN + + +// ---------------------------------------------------------------------------- +// wxString: string class trying to be compatible with std::string, MFC +// CString and wxWindows 1.x wxString all at once +// --------------------------------------------------------------------------- + +#ifdef wxNEEDS_WXSTRING_PRINTF_MIXIN + // "non dll-interface class 'wxStringPrintfMixin' used as base interface + // for dll-interface class 'wxString'" -- this is OK in our case + #pragma warning (push) + #pragma warning (disable:4275) +#endif + +#if wxUSE_UNICODE_UTF8 +// see the comment near wxString::iterator for why we need this +class WXDLLIMPEXP_BASE wxStringIteratorNode +{ +public: + wxStringIteratorNode() + : m_str(NULL), m_citer(NULL), m_iter(NULL), m_prev(NULL), m_next(NULL) {} + wxStringIteratorNode(const wxString *str, + wxStringImpl::const_iterator *citer) + { DoSet(str, citer, NULL); } + wxStringIteratorNode(const wxString *str, wxStringImpl::iterator *iter) + { DoSet(str, NULL, iter); } + ~wxStringIteratorNode() + { clear(); } + + inline void set(const wxString *str, wxStringImpl::const_iterator *citer) + { clear(); DoSet(str, citer, NULL); } + inline void set(const wxString *str, wxStringImpl::iterator *iter) + { clear(); DoSet(str, NULL, iter); } + + const wxString *m_str; + wxStringImpl::const_iterator *m_citer; + wxStringImpl::iterator *m_iter; + wxStringIteratorNode *m_prev, *m_next; + +private: + inline void clear(); + inline void DoSet(const wxString *str, + wxStringImpl::const_iterator *citer, + wxStringImpl::iterator *iter); + + // the node belongs to a particular iterator instance, it's not copied + // when a copy of the iterator is made + wxDECLARE_NO_COPY_CLASS(wxStringIteratorNode); +}; +#endif // wxUSE_UNICODE_UTF8 + +class WXDLLIMPEXP_BASE wxString +#ifdef wxNEEDS_WXSTRING_PRINTF_MIXIN + : public wxStringPrintfMixin +#endif +{ + // NB: special care was taken in arranging the member functions in such order + // that all inline functions can be effectively inlined, verify that all + // performance critical functions are still inlined if you change order! +public: + // an 'invalid' value for string index, moved to this place due to a CW bug + static const size_t npos; + +private: + // if we hadn't made these operators private, it would be possible to + // compile "wxString s; s = 17;" without any warnings as 17 is implicitly + // converted to char in C and we do have operator=(char) + // + // NB: we don't need other versions (short/long and unsigned) as attempt + // to assign another numeric type to wxString will now result in + // ambiguity between operator=(char) and operator=(int) + wxString& operator=(int); + + // these methods are not implemented - there is _no_ conversion from int to + // string, you're doing something wrong if the compiler wants to call it! + // + // try `s << i' or `s.Printf("%d", i)' instead + wxString(int); + + + // buffer for holding temporary substring when using any of the methods + // that take (char*,size_t) or (wchar_t*,size_t) arguments: + template<typename T> + struct SubstrBufFromType + { + T data; + size_t len; + + SubstrBufFromType(const T& data_, size_t len_) + : data(data_), len(len_) + { + wxASSERT_MSG( len != npos, "must have real length" ); + } + }; + +#if wxUSE_UNICODE_UTF8 + // even char* -> char* needs conversion, from locale charset to UTF-8 + typedef SubstrBufFromType<wxScopedCharBuffer> SubstrBufFromWC; + typedef SubstrBufFromType<wxScopedCharBuffer> SubstrBufFromMB; +#elif wxUSE_UNICODE_WCHAR + typedef SubstrBufFromType<const wchar_t*> SubstrBufFromWC; + typedef SubstrBufFromType<wxScopedWCharBuffer> SubstrBufFromMB; +#else + typedef SubstrBufFromType<const char*> SubstrBufFromMB; + typedef SubstrBufFromType<wxScopedCharBuffer> SubstrBufFromWC; +#endif + + + // Functions implementing primitive operations on string data; wxString + // methods and iterators are implemented in terms of it. The differences + // between UTF-8 and wchar_t* representations of the string are mostly + // contained here. + +#if wxUSE_UNICODE_UTF8 + static SubstrBufFromMB ConvertStr(const char *psz, size_t nLength, + const wxMBConv& conv); + static SubstrBufFromWC ConvertStr(const wchar_t *pwz, size_t nLength, + const wxMBConv& conv); +#elif wxUSE_UNICODE_WCHAR + static SubstrBufFromMB ConvertStr(const char *psz, size_t nLength, + const wxMBConv& conv); +#else + static SubstrBufFromWC ConvertStr(const wchar_t *pwz, size_t nLength, + const wxMBConv& conv); +#endif + +#if !wxUSE_UNICODE_UTF8 // wxUSE_UNICODE_WCHAR or !wxUSE_UNICODE + // returns C string encoded as the implementation expects: + #if wxUSE_UNICODE + static const wchar_t* ImplStr(const wchar_t* str) + { return str ? str : wxT(""); } + static const SubstrBufFromWC ImplStr(const wchar_t* str, size_t n) + { return SubstrBufFromWC(str, (str && n == npos) ? wxWcslen(str) : n); } + static wxScopedWCharBuffer ImplStr(const char* str, + const wxMBConv& conv = wxConvLibc) + { return ConvertStr(str, npos, conv).data; } + static SubstrBufFromMB ImplStr(const char* str, size_t n, + const wxMBConv& conv = wxConvLibc) + { return ConvertStr(str, n, conv); } + #else + static const char* ImplStr(const char* str, + const wxMBConv& WXUNUSED(conv) = wxConvLibc) + { return str ? str : ""; } + static const SubstrBufFromMB ImplStr(const char* str, size_t n, + const wxMBConv& WXUNUSED(conv) = wxConvLibc) + { return SubstrBufFromMB(str, (str && n == npos) ? wxStrlen(str) : n); } + static wxScopedCharBuffer ImplStr(const wchar_t* str) + { return ConvertStr(str, npos, wxConvLibc).data; } + static SubstrBufFromWC ImplStr(const wchar_t* str, size_t n) + { return ConvertStr(str, n, wxConvLibc); } + #endif + + // translates position index in wxString to/from index in underlying + // wxStringImpl: + static size_t PosToImpl(size_t pos) { return pos; } + static void PosLenToImpl(size_t pos, size_t len, + size_t *implPos, size_t *implLen) + { *implPos = pos; *implLen = len; } + static size_t LenToImpl(size_t len) { return len; } + static size_t PosFromImpl(size_t pos) { return pos; } + + // we don't want to define these as empty inline functions as it could + // result in noticeable (and quite unnecessary in non-UTF-8 build) slowdown + // in debug build where the inline functions are not effectively inlined + #define wxSTRING_INVALIDATE_CACHE() + #define wxSTRING_INVALIDATE_CACHED_LENGTH() + #define wxSTRING_UPDATE_CACHED_LENGTH(n) + #define wxSTRING_SET_CACHED_LENGTH(n) + +#else // wxUSE_UNICODE_UTF8 + + static wxScopedCharBuffer ImplStr(const char* str, + const wxMBConv& conv = wxConvLibc) + { return ConvertStr(str, npos, conv).data; } + static SubstrBufFromMB ImplStr(const char* str, size_t n, + const wxMBConv& conv = wxConvLibc) + { return ConvertStr(str, n, conv); } + + static wxScopedCharBuffer ImplStr(const wchar_t* str) + { return ConvertStr(str, npos, wxMBConvUTF8()).data; } + static SubstrBufFromWC ImplStr(const wchar_t* str, size_t n) + { return ConvertStr(str, n, wxMBConvUTF8()); } + +#if wxUSE_STRING_POS_CACHE + // this is an extremely simple cache used by PosToImpl(): each cache element + // contains the string it applies to and the index corresponding to the last + // used position in this wxString in its m_impl string + // + // NB: notice that this struct (and nested Element one) must be a POD or we + // wouldn't be able to use a thread-local variable of this type, in + // particular it should have no ctor -- we rely on statics being + // initialized to 0 instead + struct Cache + { + enum { SIZE = 8 }; + + struct Element + { + const wxString *str; // the string to which this element applies + size_t pos, // the cached index in this string + impl, // the corresponding position in its m_impl + len; // cached length or npos if unknown + + // reset cached index to 0 + void ResetPos() { pos = impl = 0; } + + // reset position and length + void Reset() { ResetPos(); len = npos; } + }; + + // cache the indices mapping for the last few string used + Element cached[SIZE]; + + // the last used index + unsigned lastUsed; + }; + +#ifndef wxHAS_COMPILER_TLS + // we must use an accessor function and not a static variable when the TLS + // variables support is implemented in the library (and not by the compiler) + // because the global s_cache variable could be not yet initialized when a + // ctor of another global object is executed and if that ctor uses any + // wxString methods, bad things happen + // + // however notice that this approach does not work when compiler TLS is used, + // at least not with g++ 4.1.2 under amd64 as it apparently compiles code + // using this accessor incorrectly when optimizations are enabled (-O2 is + // enough) -- luckily we don't need it then neither as static __thread + // variables are initialized by 0 anyhow then and so we can use the variable + // directly + WXEXPORT static Cache& GetCache() + { + static wxTLS_TYPE(Cache) s_cache; + + return wxTLS_VALUE(s_cache); + } + + // this helper struct is used to ensure that GetCache() is called during + // static initialization time, i.e. before any threads creation, as otherwise + // the static s_cache construction inside GetCache() wouldn't be MT-safe + friend struct wxStrCacheInitializer; +#else // wxHAS_COMPILER_TLS + static wxTLS_TYPE(Cache) ms_cache; + static Cache& GetCache() { return wxTLS_VALUE(ms_cache); } +#endif // !wxHAS_COMPILER_TLS/wxHAS_COMPILER_TLS + + static Cache::Element *GetCacheBegin() { return GetCache().cached; } + static Cache::Element *GetCacheEnd() { return GetCacheBegin() + Cache::SIZE; } + static unsigned& LastUsedCacheElement() { return GetCache().lastUsed; } + + // this is used in debug builds only to provide a convenient function, + // callable from a debugger, to show the cache contents + friend struct wxStrCacheDumper; + + // uncomment this to have access to some profiling statistics on program + // termination + //#define wxPROFILE_STRING_CACHE + +#ifdef wxPROFILE_STRING_CACHE + static struct PosToImplCacheStats + { + unsigned postot, // total non-trivial calls to PosToImpl + poshits, // cache hits from PosToImpl() + mishits, // cached position beyond the needed one + sumpos, // sum of all positions, used to compute the + // average position after dividing by postot + sumofs, // sum of all offsets after using the cache, used to + // compute the average after dividing by hits + lentot, // number of total calls to length() + lenhits; // number of cache hits in length() + } ms_cacheStats; + + friend struct wxStrCacheStatsDumper; + + #define wxCACHE_PROFILE_FIELD_INC(field) ms_cacheStats.field++ + #define wxCACHE_PROFILE_FIELD_ADD(field, val) ms_cacheStats.field += (val) +#else // !wxPROFILE_STRING_CACHE + #define wxCACHE_PROFILE_FIELD_INC(field) + #define wxCACHE_PROFILE_FIELD_ADD(field, val) +#endif // wxPROFILE_STRING_CACHE/!wxPROFILE_STRING_CACHE + + // note: it could seem that the functions below shouldn't be inline because + // they are big, contain loops and so the compiler shouldn't be able to + // inline them anyhow, however moving them into string.cpp does decrease the + // code performance by ~5%, at least when using g++ 4.1 so do keep them here + // unless tests show that it's not advantageous any more + + // return the pointer to the cache element for this string or NULL if not + // cached + Cache::Element *FindCacheElement() const + { + // profiling seems to show a small but consistent gain if we use this + // simple loop instead of starting from the last used element (there are + // a lot of misses in this function...) + Cache::Element * const cacheBegin = GetCacheBegin(); +#ifndef wxHAS_COMPILER_TLS + // during destruction tls calls may return NULL, in this case return NULL + // immediately without accessing anything else + if ( cacheBegin == NULL ) + return NULL; +#endif + Cache::Element * const cacheEnd = GetCacheEnd(); + for ( Cache::Element *c = cacheBegin; c != cacheEnd; c++ ) + { + if ( c->str == this ) + return c; + } + + return NULL; + } + + // unlike FindCacheElement(), this one always returns a valid pointer to the + // cache element for this string, it may have valid last cached position and + // its corresponding index in the byte string or not + Cache::Element *GetCacheElement() const + { + Cache::Element * const cacheBegin = GetCacheBegin(); + Cache::Element * const cacheEnd = GetCacheEnd(); + Cache::Element * const cacheStart = cacheBegin + LastUsedCacheElement(); + + // check the last used first, this does no (measurable) harm for a miss + // but does help for simple loops addressing the same string all the time + if ( cacheStart->str == this ) + return cacheStart; + + // notice that we're going to check cacheStart again inside this call but + // profiling shows that it's still faster to use a simple loop like + // inside FindCacheElement() than manually looping with wrapping starting + // from the cache entry after the start one + Cache::Element *c = FindCacheElement(); + if ( !c ) + { + // claim the next cache entry for this string + c = cacheStart; + if ( ++c == cacheEnd ) + c = cacheBegin; + + c->str = this; + c->Reset(); + + // and remember the last used element + LastUsedCacheElement() = c - cacheBegin; + } + + return c; + } + + size_t DoPosToImpl(size_t pos) const + { + wxCACHE_PROFILE_FIELD_INC(postot); + + // NB: although the case of pos == 1 (and offset from cached position + // equal to 1) are common, nothing is gained by writing special code + // for handling them, the compiler (at least g++ 4.1 used) seems to + // optimize the code well enough on its own + + wxCACHE_PROFILE_FIELD_ADD(sumpos, pos); + + Cache::Element * const cache = GetCacheElement(); + + // cached position can't be 0 so if it is, it means that this entry was + // used for length caching only so far, i.e. it doesn't count as a hit + // from our point of view + if ( cache->pos ) + { + wxCACHE_PROFILE_FIELD_INC(poshits); + } + + if ( pos == cache->pos ) + return cache->impl; + + // this seems to happen only rarely so just reset the cache in this case + // instead of complicating code even further by seeking backwards in this + // case + if ( cache->pos > pos ) + { + wxCACHE_PROFILE_FIELD_INC(mishits); + + cache->ResetPos(); + } + + wxCACHE_PROFILE_FIELD_ADD(sumofs, pos - cache->pos); + + + wxStringImpl::const_iterator i(m_impl.begin() + cache->impl); + for ( size_t n = cache->pos; n < pos; n++ ) + wxStringOperations::IncIter(i); + + cache->pos = pos; + cache->impl = i - m_impl.begin(); + + wxSTRING_CACHE_ASSERT( + (int)cache->impl == (begin() + pos).impl() - m_impl.begin() ); + + return cache->impl; + } + + void InvalidateCache() + { + Cache::Element * const cache = FindCacheElement(); + if ( cache ) + cache->Reset(); + } + + void InvalidateCachedLength() + { + Cache::Element * const cache = FindCacheElement(); + if ( cache ) + cache->len = npos; + } + + void SetCachedLength(size_t len) + { + // we optimistically cache the length here even if the string wasn't + // present in the cache before, this seems to do no harm and the + // potential for avoiding length recomputation for long strings looks + // interesting + GetCacheElement()->len = len; + } + + void UpdateCachedLength(ptrdiff_t delta) + { + Cache::Element * const cache = FindCacheElement(); + if ( cache && cache->len != npos ) + { + wxSTRING_CACHE_ASSERT( (ptrdiff_t)cache->len + delta >= 0 ); + + cache->len += delta; + } + } + + #define wxSTRING_INVALIDATE_CACHE() InvalidateCache() + #define wxSTRING_INVALIDATE_CACHED_LENGTH() InvalidateCachedLength() + #define wxSTRING_UPDATE_CACHED_LENGTH(n) UpdateCachedLength(n) + #define wxSTRING_SET_CACHED_LENGTH(n) SetCachedLength(n) +#else // !wxUSE_STRING_POS_CACHE + size_t DoPosToImpl(size_t pos) const + { + return (begin() + pos).impl() - m_impl.begin(); + } + + #define wxSTRING_INVALIDATE_CACHE() + #define wxSTRING_INVALIDATE_CACHED_LENGTH() + #define wxSTRING_UPDATE_CACHED_LENGTH(n) + #define wxSTRING_SET_CACHED_LENGTH(n) +#endif // wxUSE_STRING_POS_CACHE/!wxUSE_STRING_POS_CACHE + + size_t PosToImpl(size_t pos) const + { + return pos == 0 || pos == npos ? pos : DoPosToImpl(pos); + } + + void PosLenToImpl(size_t pos, size_t len, size_t *implPos, size_t *implLen) const; + + size_t LenToImpl(size_t len) const + { + size_t pos, len2; + PosLenToImpl(0, len, &pos, &len2); + return len2; + } + + size_t PosFromImpl(size_t pos) const + { + if ( pos == 0 || pos == npos ) + return pos; + else + return const_iterator(this, m_impl.begin() + pos) - begin(); + } +#endif // !wxUSE_UNICODE_UTF8/wxUSE_UNICODE_UTF8 + +public: + // standard types + typedef wxUniChar value_type; + typedef wxUniChar char_type; + typedef wxUniCharRef reference; + typedef wxChar* pointer; + typedef const wxChar* const_pointer; + + typedef size_t size_type; + typedef wxUniChar const_reference; + +#if wxUSE_STD_STRING + #if wxUSE_UNICODE_UTF8 + // random access is not O(1), as required by Random Access Iterator + #define WX_STR_ITERATOR_TAG std::bidirectional_iterator_tag + #else + #define WX_STR_ITERATOR_TAG std::random_access_iterator_tag + #endif + #define WX_DEFINE_ITERATOR_CATEGORY(cat) typedef cat iterator_category; +#else + // not defining iterator_category at all in this case is better than defining + // it as some dummy type -- at least it results in more intelligible error + // messages + #define WX_DEFINE_ITERATOR_CATEGORY(cat) +#endif + + #define WX_STR_ITERATOR_IMPL(iterator_name, pointer_type, reference_type) \ + private: \ + typedef wxStringImpl::iterator_name underlying_iterator; \ + public: \ + WX_DEFINE_ITERATOR_CATEGORY(WX_STR_ITERATOR_TAG) \ + typedef wxUniChar value_type; \ + typedef ptrdiff_t difference_type; \ + typedef reference_type reference; \ + typedef pointer_type pointer; \ + \ + reference operator[](size_t n) const { return *(*this + n); } \ + \ + iterator_name& operator++() \ + { wxStringOperations::IncIter(m_cur); return *this; } \ + iterator_name& operator--() \ + { wxStringOperations::DecIter(m_cur); return *this; } \ + iterator_name operator++(int) \ + { \ + iterator_name tmp = *this; \ + wxStringOperations::IncIter(m_cur); \ + return tmp; \ + } \ + iterator_name operator--(int) \ + { \ + iterator_name tmp = *this; \ + wxStringOperations::DecIter(m_cur); \ + return tmp; \ + } \ + \ + iterator_name& operator+=(ptrdiff_t n) \ + { \ + m_cur = wxStringOperations::AddToIter(m_cur, n); \ + return *this; \ + } \ + iterator_name& operator-=(ptrdiff_t n) \ + { \ + m_cur = wxStringOperations::AddToIter(m_cur, -n); \ + return *this; \ + } \ + \ + difference_type operator-(const iterator_name& i) const \ + { return wxStringOperations::DiffIters(m_cur, i.m_cur); } \ + \ + bool operator==(const iterator_name& i) const \ + { return m_cur == i.m_cur; } \ + bool operator!=(const iterator_name& i) const \ + { return m_cur != i.m_cur; } \ + \ + bool operator<(const iterator_name& i) const \ + { return m_cur < i.m_cur; } \ + bool operator>(const iterator_name& i) const \ + { return m_cur > i.m_cur; } \ + bool operator<=(const iterator_name& i) const \ + { return m_cur <= i.m_cur; } \ + bool operator>=(const iterator_name& i) const \ + { return m_cur >= i.m_cur; } \ + \ + private: \ + /* for internal wxString use only: */ \ + underlying_iterator impl() const { return m_cur; } \ + \ + friend class wxString; \ + friend class wxCStrData; \ + \ + private: \ + underlying_iterator m_cur + + class WXDLLIMPEXP_FWD_BASE const_iterator; + +#if wxUSE_UNICODE_UTF8 + // NB: In UTF-8 build, (non-const) iterator needs to keep reference + // to the underlying wxStringImpl, because UTF-8 is variable-length + // encoding and changing the value pointer to by an iterator (using + // its operator*) requires calling wxStringImpl::replace() if the old + // and new values differ in their encoding's length. + // + // Furthermore, the replace() call may invalid all iterators for the + // string, so we have to keep track of outstanding iterators and update + // them if replace() happens. + // + // This is implemented by maintaining linked list of iterators for every + // string and traversing it in wxUniCharRef::operator=(). Head of the + // list is stored in wxString. (FIXME-UTF8) + + class WXDLLIMPEXP_BASE iterator + { + WX_STR_ITERATOR_IMPL(iterator, wxChar*, wxUniCharRef); + + public: + iterator() {} + iterator(const iterator& i) + : m_cur(i.m_cur), m_node(i.str(), &m_cur) {} + iterator& operator=(const iterator& i) + { + if (&i != this) + { + m_cur = i.m_cur; + m_node.set(i.str(), &m_cur); + } + return *this; + } + + reference operator*() + { return wxUniCharRef::CreateForString(*str(), m_cur); } + + iterator operator+(ptrdiff_t n) const + { return iterator(str(), wxStringOperations::AddToIter(m_cur, n)); } + iterator operator-(ptrdiff_t n) const + { return iterator(str(), wxStringOperations::AddToIter(m_cur, -n)); } + + // Normal iterators need to be comparable with the const_iterators so + // declare the comparison operators and implement them below after the + // full const_iterator declaration. + bool operator==(const const_iterator& i) const; + bool operator!=(const const_iterator& i) const; + bool operator<(const const_iterator& i) const; + bool operator>(const const_iterator& i) const; + bool operator<=(const const_iterator& i) const; + bool operator>=(const const_iterator& i) const; + + private: + iterator(wxString *wxstr, underlying_iterator ptr) + : m_cur(ptr), m_node(wxstr, &m_cur) {} + + wxString* str() const { return const_cast<wxString*>(m_node.m_str); } + + wxStringIteratorNode m_node; + + friend class const_iterator; + }; + + class WXDLLIMPEXP_BASE const_iterator + { + // NB: reference_type is intentionally value, not reference, the character + // may be encoded differently in wxString data: + WX_STR_ITERATOR_IMPL(const_iterator, const wxChar*, wxUniChar); + + public: + const_iterator() {} + const_iterator(const const_iterator& i) + : m_cur(i.m_cur), m_node(i.str(), &m_cur) {} + const_iterator(const iterator& i) + : m_cur(i.m_cur), m_node(i.str(), &m_cur) {} + + const_iterator& operator=(const const_iterator& i) + { + if (&i != this) + { + m_cur = i.m_cur; + m_node.set(i.str(), &m_cur); + } + return *this; + } + const_iterator& operator=(const iterator& i) + { m_cur = i.m_cur; m_node.set(i.str(), &m_cur); return *this; } + + reference operator*() const + { return wxStringOperations::DecodeChar(m_cur); } + + const_iterator operator+(ptrdiff_t n) const + { return const_iterator(str(), wxStringOperations::AddToIter(m_cur, n)); } + const_iterator operator-(ptrdiff_t n) const + { return const_iterator(str(), wxStringOperations::AddToIter(m_cur, -n)); } + + // Notice that comparison operators taking non-const iterator are not + // needed here because of the implicit conversion from non-const iterator + // to const ones ensure that the versions for const_iterator declared + // inside WX_STR_ITERATOR_IMPL can be used. + + private: + // for internal wxString use only: + const_iterator(const wxString *wxstr, underlying_iterator ptr) + : m_cur(ptr), m_node(wxstr, &m_cur) {} + + const wxString* str() const { return m_node.m_str; } + + wxStringIteratorNode m_node; + }; + + size_t IterToImplPos(wxString::iterator i) const + { return wxStringImpl::const_iterator(i.impl()) - m_impl.begin(); } + + iterator GetIterForNthChar(size_t n) + { return iterator(this, m_impl.begin() + PosToImpl(n)); } + const_iterator GetIterForNthChar(size_t n) const + { return const_iterator(this, m_impl.begin() + PosToImpl(n)); } +#else // !wxUSE_UNICODE_UTF8 + + class WXDLLIMPEXP_BASE iterator + { + WX_STR_ITERATOR_IMPL(iterator, wxChar*, wxUniCharRef); + + public: + iterator() {} + iterator(const iterator& i) : m_cur(i.m_cur) {} + + reference operator*() + { return wxUniCharRef::CreateForString(m_cur); } + + iterator operator+(ptrdiff_t n) const + { return iterator(wxStringOperations::AddToIter(m_cur, n)); } + iterator operator-(ptrdiff_t n) const + { return iterator(wxStringOperations::AddToIter(m_cur, -n)); } + + // As in UTF-8 case above, define comparison operators taking + // const_iterator too. + bool operator==(const const_iterator& i) const; + bool operator!=(const const_iterator& i) const; + bool operator<(const const_iterator& i) const; + bool operator>(const const_iterator& i) const; + bool operator<=(const const_iterator& i) const; + bool operator>=(const const_iterator& i) const; + + private: + // for internal wxString use only: + iterator(underlying_iterator ptr) : m_cur(ptr) {} + iterator(wxString *WXUNUSED(str), underlying_iterator ptr) : m_cur(ptr) {} + + friend class const_iterator; + }; + + class WXDLLIMPEXP_BASE const_iterator + { + // NB: reference_type is intentionally value, not reference, the character + // may be encoded differently in wxString data: + WX_STR_ITERATOR_IMPL(const_iterator, const wxChar*, wxUniChar); + + public: + const_iterator() {} + const_iterator(const const_iterator& i) : m_cur(i.m_cur) {} + const_iterator(const iterator& i) : m_cur(i.m_cur) {} + + reference operator*() const + { return wxStringOperations::DecodeChar(m_cur); } + + const_iterator operator+(ptrdiff_t n) const + { return const_iterator(wxStringOperations::AddToIter(m_cur, n)); } + const_iterator operator-(ptrdiff_t n) const + { return const_iterator(wxStringOperations::AddToIter(m_cur, -n)); } + + // As in UTF-8 case above, we don't need comparison operators taking + // iterator because we have an implicit conversion from iterator to + // const_iterator so the operators declared by WX_STR_ITERATOR_IMPL will + // be used. + + private: + // for internal wxString use only: + const_iterator(underlying_iterator ptr) : m_cur(ptr) {} + const_iterator(const wxString *WXUNUSED(str), underlying_iterator ptr) + : m_cur(ptr) {} + }; + + iterator GetIterForNthChar(size_t n) { return begin() + n; } + const_iterator GetIterForNthChar(size_t n) const { return begin() + n; } +#endif // wxUSE_UNICODE_UTF8/!wxUSE_UNICODE_UTF8 + + #undef WX_STR_ITERATOR_TAG + #undef WX_STR_ITERATOR_IMPL + + // This method is mostly used by wxWidgets itself and return the offset of + // the given iterator in bytes relative to the start of the buffer + // representing the current string contents in the current locale encoding. + // + // It is inefficient as it involves converting part of the string to this + // encoding (and also unsafe as it simply returns 0 if the conversion fails) + // and so should be avoided if possible, wx itself only uses it to implement + // backwards-compatible API. + ptrdiff_t IterOffsetInMBStr(const const_iterator& i) const + { + const wxString str(begin(), i); + + // This is logically equivalent to strlen(str.mb_str()) but avoids + // actually converting the string to multibyte and just computes the + // length that it would have after conversion. + size_t ofs = wxConvLibc.FromWChar(NULL, 0, str.wc_str(), str.length()); + return ofs == wxCONV_FAILED ? 0 : static_cast<ptrdiff_t>(ofs); + } + + friend class iterator; + friend class const_iterator; + + template <typename T> + class reverse_iterator_impl + { + public: + typedef T iterator_type; + + WX_DEFINE_ITERATOR_CATEGORY(typename T::iterator_category) + typedef typename T::value_type value_type; + typedef typename T::difference_type difference_type; + typedef typename T::reference reference; + typedef typename T::pointer *pointer; + + reverse_iterator_impl() {} + reverse_iterator_impl(iterator_type i) : m_cur(i) {} + reverse_iterator_impl(const reverse_iterator_impl& ri) + : m_cur(ri.m_cur) {} + + iterator_type base() const { return m_cur; } + + reference operator*() const { return *(m_cur-1); } + reference operator[](size_t n) const { return *(*this + n); } + + reverse_iterator_impl& operator++() + { --m_cur; return *this; } + reverse_iterator_impl operator++(int) + { reverse_iterator_impl tmp = *this; --m_cur; return tmp; } + reverse_iterator_impl& operator--() + { ++m_cur; return *this; } + reverse_iterator_impl operator--(int) + { reverse_iterator_impl tmp = *this; ++m_cur; return tmp; } + + // NB: explicit <T> in the functions below is to keep BCC 5.5 happy + reverse_iterator_impl operator+(ptrdiff_t n) const + { return reverse_iterator_impl<T>(m_cur - n); } + reverse_iterator_impl operator-(ptrdiff_t n) const + { return reverse_iterator_impl<T>(m_cur + n); } + reverse_iterator_impl operator+=(ptrdiff_t n) + { m_cur -= n; return *this; } + reverse_iterator_impl operator-=(ptrdiff_t n) + { m_cur += n; return *this; } + + unsigned operator-(const reverse_iterator_impl& i) const + { return i.m_cur - m_cur; } + + bool operator==(const reverse_iterator_impl& ri) const + { return m_cur == ri.m_cur; } + bool operator!=(const reverse_iterator_impl& ri) const + { return !(*this == ri); } + + bool operator<(const reverse_iterator_impl& i) const + { return m_cur > i.m_cur; } + bool operator>(const reverse_iterator_impl& i) const + { return m_cur < i.m_cur; } + bool operator<=(const reverse_iterator_impl& i) const + { return m_cur >= i.m_cur; } + bool operator>=(const reverse_iterator_impl& i) const + { return m_cur <= i.m_cur; } + + private: + iterator_type m_cur; + }; + + typedef reverse_iterator_impl<iterator> reverse_iterator; + typedef reverse_iterator_impl<const_iterator> const_reverse_iterator; + +private: + // used to transform an expression built using c_str() (and hence of type + // wxCStrData) to an iterator into the string + static const_iterator CreateConstIterator(const wxCStrData& data) + { + return const_iterator(data.m_str, + (data.m_str->begin() + data.m_offset).impl()); + } + + // in UTF-8 STL build, creation from std::string requires conversion under + // non-UTF8 locales, so we can't have and use wxString(wxStringImpl) ctor; + // instead we define dummy type that lets us have wxString ctor for creation + // from wxStringImpl that couldn't be used by user code (in all other builds, + // "standard" ctors can be used): +#if wxUSE_UNICODE_UTF8 && wxUSE_STL_BASED_WXSTRING + struct CtorFromStringImplTag {}; + + wxString(CtorFromStringImplTag* WXUNUSED(dummy), const wxStringImpl& src) + : m_impl(src) {} + + static wxString FromImpl(const wxStringImpl& src) + { return wxString((CtorFromStringImplTag*)NULL, src); } +#else + #if !wxUSE_STL_BASED_WXSTRING + wxString(const wxStringImpl& src) : m_impl(src) { } + // else: already defined as wxString(wxStdString) below + #endif + static wxString FromImpl(const wxStringImpl& src) { return wxString(src); } +#endif + +public: + // constructors and destructor + // ctor for an empty string + wxString() {} + + // copy ctor + wxString(const wxString& stringSrc) : m_impl(stringSrc.m_impl) { } + + // string containing nRepeat copies of ch + wxString(wxUniChar ch, size_t nRepeat = 1 ) + { assign(nRepeat, ch); } + wxString(size_t nRepeat, wxUniChar ch) + { assign(nRepeat, ch); } + wxString(wxUniCharRef ch, size_t nRepeat = 1) + { assign(nRepeat, ch); } + wxString(size_t nRepeat, wxUniCharRef ch) + { assign(nRepeat, ch); } + wxString(char ch, size_t nRepeat = 1) + { assign(nRepeat, ch); } + wxString(size_t nRepeat, char ch) + { assign(nRepeat, ch); } + wxString(wchar_t ch, size_t nRepeat = 1) + { assign(nRepeat, ch); } + wxString(size_t nRepeat, wchar_t ch) + { assign(nRepeat, ch); } + + // ctors from char* strings: + wxString(const char *psz) + : m_impl(ImplStr(psz)) {} + wxString(const char *psz, const wxMBConv& conv) + : m_impl(ImplStr(psz, conv)) {} + wxString(const char *psz, size_t nLength) + { assign(psz, nLength); } + wxString(const char *psz, const wxMBConv& conv, size_t nLength) + { + SubstrBufFromMB str(ImplStr(psz, nLength, conv)); + m_impl.assign(str.data, str.len); + } + + // and unsigned char*: + wxString(const unsigned char *psz) + : m_impl(ImplStr((const char*)psz)) {} + wxString(const unsigned char *psz, const wxMBConv& conv) + : m_impl(ImplStr((const char*)psz, conv)) {} + wxString(const unsigned char *psz, size_t nLength) + { assign((const char*)psz, nLength); } + wxString(const unsigned char *psz, const wxMBConv& conv, size_t nLength) + { + SubstrBufFromMB str(ImplStr((const char*)psz, nLength, conv)); + m_impl.assign(str.data, str.len); + } + + // ctors from wchar_t* strings: + wxString(const wchar_t *pwz) + : m_impl(ImplStr(pwz)) {} + wxString(const wchar_t *pwz, const wxMBConv& WXUNUSED(conv)) + : m_impl(ImplStr(pwz)) {} + wxString(const wchar_t *pwz, size_t nLength) + { assign(pwz, nLength); } + wxString(const wchar_t *pwz, const wxMBConv& WXUNUSED(conv), size_t nLength) + { assign(pwz, nLength); } + + wxString(const wxScopedCharBuffer& buf) + { assign(buf.data(), buf.length()); } + wxString(const wxScopedWCharBuffer& buf) + { assign(buf.data(), buf.length()); } + + // NB: this version uses m_impl.c_str() to force making a copy of the + // string, so that "wxString(str.c_str())" idiom for passing strings + // between threads works + wxString(const wxCStrData& cstr) + : m_impl(cstr.AsString().m_impl.c_str()) { } + + // as we provide both ctors with this signature for both char and unsigned + // char string, we need to provide one for wxCStrData to resolve ambiguity + wxString(const wxCStrData& cstr, size_t nLength) + : m_impl(cstr.AsString().Mid(0, nLength).m_impl) {} + + // and because wxString is convertible to wxCStrData and const wxChar * + // we also need to provide this one + wxString(const wxString& str, size_t nLength) + { assign(str, nLength); } + + +#if wxUSE_STRING_POS_CACHE + ~wxString() + { + // we need to invalidate our cache entry as another string could be + // recreated at the same address (unlikely, but still possible, with the + // heap-allocated strings but perfectly common with stack-allocated ones) + InvalidateCache(); + } +#endif // wxUSE_STRING_POS_CACHE + + // even if we're not built with wxUSE_STD_STRING_CONV_IN_WXSTRING == 1 it is + // very convenient to allow implicit conversions from std::string to wxString + // and vice verse as this allows to use the same strings in non-GUI and GUI + // code, however we don't want to unconditionally add this ctor as it would + // make wx lib dependent on libstdc++ on some Linux versions which is bad, so + // instead we ask the client code to define this wxUSE_STD_STRING symbol if + // they need it +#if wxUSE_STD_STRING + #if wxUSE_UNICODE_WCHAR + wxString(const wxStdWideString& str) : m_impl(str) {} + #else // UTF-8 or ANSI + wxString(const wxStdWideString& str) + { assign(str.c_str(), str.length()); } + #endif + + #if !wxUSE_UNICODE // ANSI build + // FIXME-UTF8: do this in UTF8 build #if wxUSE_UTF8_LOCALE_ONLY, too + wxString(const std::string& str) : m_impl(str) {} + #else // Unicode + wxString(const std::string& str) + { assign(str.c_str(), str.length()); } + #endif +#endif // wxUSE_STD_STRING + + // Also always provide explicit conversions to std::[w]string in any case, + // see below for the implicit ones. +#if wxUSE_STD_STRING + // We can avoid a copy if we already use this string type internally, + // otherwise we create a copy on the fly: + #if wxUSE_UNICODE_WCHAR && wxUSE_STL_BASED_WXSTRING + #define wxStringToStdWstringRetType const wxStdWideString& + const wxStdWideString& ToStdWstring() const { return m_impl; } + #else + // wxStringImpl is either not std::string or needs conversion + #define wxStringToStdWstringRetType wxStdWideString + wxStdWideString ToStdWstring() const + { +#if wxUSE_UNICODE_WCHAR + wxScopedWCharBuffer buf = + wxScopedWCharBuffer::CreateNonOwned(m_impl.c_str(), m_impl.length()); +#else // !wxUSE_UNICODE_WCHAR + wxScopedWCharBuffer buf(wc_str()); +#endif + + return wxStdWideString(buf.data(), buf.length()); + } + #endif + + #if (!wxUSE_UNICODE || wxUSE_UTF8_LOCALE_ONLY) && wxUSE_STL_BASED_WXSTRING + // wxStringImpl is std::string in the encoding we want + #define wxStringToStdStringRetType const std::string& + const std::string& ToStdString() const { return m_impl; } + #else + // wxStringImpl is either not std::string or needs conversion + #define wxStringToStdStringRetType std::string + std::string ToStdString() const + { + wxScopedCharBuffer buf(mb_str()); + return std::string(buf.data(), buf.length()); + } + #endif + +#if wxUSE_STD_STRING_CONV_IN_WXSTRING + // Implicit conversions to std::[w]string are not provided by default as + // they conflict with the implicit conversions to "const char/wchar_t *" + // which we use for backwards compatibility but do provide them if + // explicitly requested. + operator wxStringToStdStringRetType() const { return ToStdString(); } + operator wxStringToStdWstringRetType() const { return ToStdWstring(); } +#endif // wxUSE_STD_STRING_CONV_IN_WXSTRING + +#undef wxStringToStdStringRetType +#undef wxStringToStdWstringRetType + +#endif // wxUSE_STD_STRING + + wxString Clone() const + { + // make a deep copy of the string, i.e. the returned string will have + // ref count = 1 with refcounted implementation + return wxString::FromImpl(wxStringImpl(m_impl.c_str(), m_impl.length())); + } + + // first valid index position + const_iterator begin() const { return const_iterator(this, m_impl.begin()); } + iterator begin() { return iterator(this, m_impl.begin()); } + // position one after the last valid one + const_iterator end() const { return const_iterator(this, m_impl.end()); } + iterator end() { return iterator(this, m_impl.end()); } + + // first element of the reversed string + const_reverse_iterator rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator rbegin() + { return reverse_iterator(end()); } + // one beyond the end of the reversed string + const_reverse_iterator rend() const + { return const_reverse_iterator(begin()); } + reverse_iterator rend() + { return reverse_iterator(begin()); } + + // std::string methods: +#if wxUSE_UNICODE_UTF8 + size_t length() const + { +#if wxUSE_STRING_POS_CACHE + wxCACHE_PROFILE_FIELD_INC(lentot); + + Cache::Element * const cache = GetCacheElement(); + + if ( cache->len == npos ) + { + // it's probably not worth trying to be clever and using cache->pos + // here as it's probably 0 anyhow -- you usually call length() before + // starting to index the string + cache->len = end() - begin(); + } + else + { + wxCACHE_PROFILE_FIELD_INC(lenhits); + + wxSTRING_CACHE_ASSERT( (int)cache->len == end() - begin() ); + } + + return cache->len; +#else // !wxUSE_STRING_POS_CACHE + return end() - begin(); +#endif // wxUSE_STRING_POS_CACHE/!wxUSE_STRING_POS_CACHE + } +#else + size_t length() const { return m_impl.length(); } +#endif + + size_type size() const { return length(); } + size_type max_size() const { return npos; } + + bool empty() const { return m_impl.empty(); } + + // NB: these methods don't have a well-defined meaning in UTF-8 case + size_type capacity() const { return m_impl.capacity(); } + void reserve(size_t sz) { m_impl.reserve(sz); } + + void resize(size_t nSize, wxUniChar ch = wxT('\0')) + { + const size_t len = length(); + if ( nSize == len) + return; + +#if wxUSE_UNICODE_UTF8 + if ( nSize < len ) + { + wxSTRING_INVALIDATE_CACHE(); + + // we can't use wxStringImpl::resize() for truncating the string as it + // counts in bytes, not characters + erase(nSize); + return; + } + + // we also can't use (presumably more efficient) resize() if we have to + // append characters taking more than one byte + if ( !ch.IsAscii() ) + { + append(nSize - len, ch); + } + else // can use (presumably faster) resize() version +#endif // wxUSE_UNICODE_UTF8 + { + wxSTRING_INVALIDATE_CACHED_LENGTH(); + + m_impl.resize(nSize, (wxStringCharType)ch); + } + } + + wxString substr(size_t nStart = 0, size_t nLen = npos) const + { + size_t pos, len; + PosLenToImpl(nStart, nLen, &pos, &len); + return FromImpl(m_impl.substr(pos, len)); + } + + // generic attributes & operations + // as standard strlen() + size_t Len() const { return length(); } + // string contains any characters? + bool IsEmpty() const { return empty(); } + // empty string is "false", so !str will return true + bool operator!() const { return empty(); } + // truncate the string to given length + wxString& Truncate(size_t uiLen); + // empty string contents + void Empty() { clear(); } + // empty the string and free memory + void Clear() { clear(); } + + // contents test + // Is an ascii value + bool IsAscii() const; + // Is a number + bool IsNumber() const; + // Is a word + bool IsWord() const; + + // data access (all indexes are 0 based) + // read access + wxUniChar at(size_t n) const + { return wxStringOperations::DecodeChar(m_impl.begin() + PosToImpl(n)); } + wxUniChar GetChar(size_t n) const + { return at(n); } + // read/write access + wxUniCharRef at(size_t n) + { return *GetIterForNthChar(n); } + wxUniCharRef GetWritableChar(size_t n) + { return at(n); } + // write access + void SetChar(size_t n, wxUniChar ch) + { at(n) = ch; } + + // get last character + wxUniChar Last() const + { + wxASSERT_MSG( !empty(), wxT("wxString: index out of bounds") ); + return *rbegin(); + } + + // get writable last character + wxUniCharRef Last() + { + wxASSERT_MSG( !empty(), wxT("wxString: index out of bounds") ); + return *rbegin(); + } + + /* + Note that we we must define all of the overloads below to avoid + ambiguity when using str[0]. + */ + wxUniChar operator[](int n) const + { return at(n); } + wxUniChar operator[](long n) const + { return at(n); } + wxUniChar operator[](size_t n) const + { return at(n); } +#ifndef wxSIZE_T_IS_UINT + wxUniChar operator[](unsigned int n) const + { return at(n); } +#endif // size_t != unsigned int + + // operator versions of GetWriteableChar() + wxUniCharRef operator[](int n) + { return at(n); } + wxUniCharRef operator[](long n) + { return at(n); } + wxUniCharRef operator[](size_t n) + { return at(n); } +#ifndef wxSIZE_T_IS_UINT + wxUniCharRef operator[](unsigned int n) + { return at(n); } +#endif // size_t != unsigned int + + + /* + Overview of wxString conversions, implicit and explicit: + + - wxString has a std::[w]string-like c_str() method, however it does + not return a C-style string directly but instead returns wxCStrData + helper object which is convertible to either "char *" narrow string + or "wchar_t *" wide string. Usually the correct conversion will be + applied by the compiler automatically but if this doesn't happen you + need to explicitly choose one using wxCStrData::AsChar() or AsWChar() + methods or another wxString conversion function. + + - One of the places where the conversion does *NOT* happen correctly is + when c_str() is passed to a vararg function such as printf() so you + must *NOT* use c_str() with them. Either use wxPrintf() (all wx + functions do handle c_str() correctly, even if they appear to be + vararg (but they're not, really)) or add an explicit AsChar() or, if + compatibility with previous wxWidgets versions is important, add a + cast to "const char *". + + - In non-STL mode only, wxString is also implicitly convertible to + wxCStrData. The same warning as above applies. + + - c_str() is polymorphic as it can be converted to either narrow or + wide string. If you explicitly need one or the other, choose to use + mb_str() (for narrow) or wc_str() (for wide) instead. Notice that + these functions can return either the pointer to string directly (if + this is what the string uses internally) or a temporary buffer + containing the string and convertible to it. Again, conversion will + usually be done automatically by the compiler but beware of the + vararg functions: you need an explicit cast when using them. + + - There are also non-const versions of mb_str() and wc_str() called + char_str() and wchar_str(). They are only meant to be used with + non-const-correct functions and they always return buffers. + + - Finally wx_str() returns whatever string representation is used by + wxString internally. It may be either a narrow or wide string + depending on wxWidgets build mode but it will always be a raw pointer + (and not a buffer). + */ + + // explicit conversion to wxCStrData + wxCStrData c_str() const { return wxCStrData(this); } + wxCStrData data() const { return c_str(); } + + // implicit conversion to wxCStrData + operator wxCStrData() const { return c_str(); } + + // the first two operators conflict with operators for conversion to + // std::string and they must be disabled if those conversions are enabled; + // the next one only makes sense if conversions to char* are also defined + // and not defining it in STL build also helps us to get more clear error + // messages for the code which relies on implicit conversion to char* in + // STL build +#if !wxUSE_STD_STRING_CONV_IN_WXSTRING + operator const char*() const { return c_str(); } + operator const wchar_t*() const { return c_str(); } + + // implicit conversion to untyped pointer for compatibility with previous + // wxWidgets versions: this is the same as conversion to const char * so it + // may fail! + operator const void*() const { return c_str(); } +#endif // !wxUSE_STD_STRING_CONV_IN_WXSTRING + + // identical to c_str(), for MFC compatibility + const wxCStrData GetData() const { return c_str(); } + + // explicit conversion to C string in internal representation (char*, + // wchar_t*, UTF-8-encoded char*, depending on the build): + const wxStringCharType *wx_str() const { return m_impl.c_str(); } + + // conversion to *non-const* multibyte or widestring buffer; modifying + // returned buffer won't affect the string, these methods are only useful + // for passing values to const-incorrect functions + wxWritableCharBuffer char_str(const wxMBConv& conv = wxConvLibc) const + { return mb_str(conv); } + wxWritableWCharBuffer wchar_str() const { return wc_str(); } + + // conversion to the buffer of the given type T (= char or wchar_t) and + // also optionally return the buffer length + // + // this is mostly/only useful for the template functions + // + // FIXME-VC6: the second argument only exists for VC6 which doesn't support + // explicit template function selection, do not use it unless + // you must support VC6! + template <typename T> + wxCharTypeBuffer<T> tchar_str(size_t *len = NULL, + T * WXUNUSED(dummy) = NULL) const + { +#if wxUSE_UNICODE + // we need a helper dispatcher depending on type + return wxPrivate::wxStringAsBufHelper<T>::Get(*this, len); +#else // ANSI + // T can only be char in ANSI build + if ( len ) + *len = length(); + + return wxCharTypeBuffer<T>::CreateNonOwned(wx_str(), length()); +#endif // Unicode build kind + } + + // conversion to/from plain (i.e. 7 bit) ASCII: this is useful for + // converting numbers or strings which are certain not to contain special + // chars (typically system functions, X atoms, environment variables etc.) + // + // the behaviour of these functions with the strings containing anything + // else than 7 bit ASCII characters is undefined, use at your own risk. +#if wxUSE_UNICODE + static wxString FromAscii(const char *ascii, size_t len); + static wxString FromAscii(const char *ascii); + static wxString FromAscii(char ascii); + const wxScopedCharBuffer ToAscii() const; +#else // ANSI + static wxString FromAscii(const char *ascii) { return wxString( ascii ); } + static wxString FromAscii(const char *ascii, size_t len) + { return wxString( ascii, len ); } + static wxString FromAscii(char ascii) { return wxString( ascii ); } + const char *ToAscii() const { return c_str(); } +#endif // Unicode/!Unicode + + // also provide unsigned char overloads as signed/unsigned doesn't matter + // for 7 bit ASCII characters + static wxString FromAscii(const unsigned char *ascii) + { return FromAscii((const char *)ascii); } + static wxString FromAscii(const unsigned char *ascii, size_t len) + { return FromAscii((const char *)ascii, len); } + + // conversion to/from UTF-8: +#if wxUSE_UNICODE_UTF8 + static wxString FromUTF8Unchecked(const char *utf8) + { + if ( !utf8 ) + return wxEmptyString; + + wxASSERT( wxStringOperations::IsValidUtf8String(utf8) ); + return FromImpl(wxStringImpl(utf8)); + } + static wxString FromUTF8Unchecked(const char *utf8, size_t len) + { + if ( !utf8 ) + return wxEmptyString; + if ( len == npos ) + return FromUTF8Unchecked(utf8); + + wxASSERT( wxStringOperations::IsValidUtf8String(utf8, len) ); + return FromImpl(wxStringImpl(utf8, len)); + } + + static wxString FromUTF8(const char *utf8) + { + if ( !utf8 || !wxStringOperations::IsValidUtf8String(utf8) ) + return ""; + + return FromImpl(wxStringImpl(utf8)); + } + static wxString FromUTF8(const char *utf8, size_t len) + { + if ( len == npos ) + return FromUTF8(utf8); + + if ( !utf8 || !wxStringOperations::IsValidUtf8String(utf8, len) ) + return ""; + + return FromImpl(wxStringImpl(utf8, len)); + } + + const wxScopedCharBuffer utf8_str() const + { return wxCharBuffer::CreateNonOwned(m_impl.c_str(), m_impl.length()); } + + // this function exists in UTF-8 build only and returns the length of the + // internal UTF-8 representation + size_t utf8_length() const { return m_impl.length(); } +#elif wxUSE_UNICODE_WCHAR + static wxString FromUTF8(const char *utf8, size_t len = npos) + { return wxString(utf8, wxMBConvUTF8(), len); } + static wxString FromUTF8Unchecked(const char *utf8, size_t len = npos) + { + const wxString s(utf8, wxMBConvUTF8(), len); + wxASSERT_MSG( !utf8 || !*utf8 || !s.empty(), + "string must be valid UTF-8" ); + return s; + } + const wxScopedCharBuffer utf8_str() const { return mb_str(wxMBConvUTF8()); } +#else // ANSI + static wxString FromUTF8(const char *utf8) + { return wxString(wxMBConvUTF8().cMB2WC(utf8)); } + static wxString FromUTF8(const char *utf8, size_t len) + { + size_t wlen; + wxScopedWCharBuffer buf(wxMBConvUTF8().cMB2WC(utf8, len == npos ? wxNO_LEN : len, &wlen)); + return wxString(buf.data(), wlen); + } + static wxString FromUTF8Unchecked(const char *utf8, size_t len = npos) + { + size_t wlen; + wxScopedWCharBuffer buf + ( + wxMBConvUTF8().cMB2WC + ( + utf8, + len == npos ? wxNO_LEN : len, + &wlen + ) + ); + wxASSERT_MSG( !utf8 || !*utf8 || wlen, + "string must be valid UTF-8" ); + + return wxString(buf.data(), wlen); + } + const wxScopedCharBuffer utf8_str() const + { return wxMBConvUTF8().cWC2MB(wc_str()); } +#endif + + const wxScopedCharBuffer ToUTF8() const { return utf8_str(); } + + // functions for storing binary data in wxString: +#if wxUSE_UNICODE + static wxString From8BitData(const char *data, size_t len) + { return wxString(data, wxConvISO8859_1, len); } + // version for NUL-terminated data: + static wxString From8BitData(const char *data) + { return wxString(data, wxConvISO8859_1); } + const wxScopedCharBuffer To8BitData() const + { return mb_str(wxConvISO8859_1); } +#else // ANSI + static wxString From8BitData(const char *data, size_t len) + { return wxString(data, len); } + // version for NUL-terminated data: + static wxString From8BitData(const char *data) + { return wxString(data); } + const wxScopedCharBuffer To8BitData() const + { return wxScopedCharBuffer::CreateNonOwned(wx_str(), length()); } +#endif // Unicode/ANSI + + // conversions with (possible) format conversions: have to return a + // buffer with temporary data + // + // the functions defined (in either Unicode or ANSI) mode are mb_str() to + // return an ANSI (multibyte) string, wc_str() to return a wide string and + // fn_str() to return a string which should be used with the OS APIs + // accepting the file names. The return value is always the same, but the + // type differs because a function may either return pointer to the buffer + // directly or have to use intermediate buffer for translation. + +#if wxUSE_UNICODE + + // this is an optimization: even though using mb_str(wxConvLibc) does the + // same thing (i.e. returns pointer to internal representation as locale is + // always an UTF-8 one) in wxUSE_UTF8_LOCALE_ONLY case, we can avoid the + // extra checks and the temporary buffer construction by providing a + // separate mb_str() overload +#if wxUSE_UTF8_LOCALE_ONLY + const char* mb_str() const { return wx_str(); } + const wxScopedCharBuffer mb_str(const wxMBConv& conv) const + { + return AsCharBuf(conv); + } +#else // !wxUSE_UTF8_LOCALE_ONLY + const wxScopedCharBuffer mb_str(const wxMBConv& conv = wxConvLibc) const + { + return AsCharBuf(conv); + } +#endif // wxUSE_UTF8_LOCALE_ONLY/!wxUSE_UTF8_LOCALE_ONLY + + const wxWX2MBbuf mbc_str() const { return mb_str(*wxConvCurrent); } + +#if wxUSE_UNICODE_WCHAR + const wchar_t* wc_str() const { return wx_str(); } +#elif wxUSE_UNICODE_UTF8 + const wxScopedWCharBuffer wc_str() const + { return AsWCharBuf(wxMBConvStrictUTF8()); } +#endif + // for compatibility with !wxUSE_UNICODE version + const wxWX2WCbuf wc_str(const wxMBConv& WXUNUSED(conv)) const + { return wc_str(); } + +#if wxMBFILES + const wxScopedCharBuffer fn_str() const { return mb_str(wxConvFile); } +#else // !wxMBFILES + const wxWX2WCbuf fn_str() const { return wc_str(); } +#endif // wxMBFILES/!wxMBFILES + +#else // ANSI + const char* mb_str() const { return wx_str(); } + + // for compatibility with wxUSE_UNICODE version + const char* mb_str(const wxMBConv& WXUNUSED(conv)) const { return wx_str(); } + + const wxWX2MBbuf mbc_str() const { return mb_str(); } + + const wxScopedWCharBuffer wc_str(const wxMBConv& conv = wxConvLibc) const + { return AsWCharBuf(conv); } + + const wxScopedCharBuffer fn_str() const + { return wxConvFile.cWC2WX( wc_str( wxConvLibc ) ); } +#endif // Unicode/ANSI + +#if wxUSE_UNICODE_UTF8 + const wxScopedWCharBuffer t_str() const { return wc_str(); } +#elif wxUSE_UNICODE_WCHAR + const wchar_t* t_str() const { return wx_str(); } +#else + const char* t_str() const { return wx_str(); } +#endif + + + // overloaded assignment + // from another wxString + wxString& operator=(const wxString& stringSrc) + { + if ( this != &stringSrc ) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl = stringSrc.m_impl; + } + + return *this; + } + + wxString& operator=(const wxCStrData& cstr) + { return *this = cstr.AsString(); } + // from a character + wxString& operator=(wxUniChar ch) + { + wxSTRING_INVALIDATE_CACHE(); + +#if wxUSE_UNICODE_UTF8 + if ( !ch.IsAscii() ) + m_impl = wxStringOperations::EncodeChar(ch); + else +#endif // wxUSE_UNICODE_UTF8 + m_impl = (wxStringCharType)ch; + return *this; + } + + wxString& operator=(wxUniCharRef ch) + { return operator=((wxUniChar)ch); } + wxString& operator=(char ch) + { return operator=(wxUniChar(ch)); } + wxString& operator=(unsigned char ch) + { return operator=(wxUniChar(ch)); } + wxString& operator=(wchar_t ch) + { return operator=(wxUniChar(ch)); } + // from a C string - STL probably will crash on NULL, + // so we need to compensate in that case +#if wxUSE_STL_BASED_WXSTRING + wxString& operator=(const char *psz) + { + wxSTRING_INVALIDATE_CACHE(); + + if ( psz ) + m_impl = ImplStr(psz); + else + clear(); + + return *this; + } + + wxString& operator=(const wchar_t *pwz) + { + wxSTRING_INVALIDATE_CACHE(); + + if ( pwz ) + m_impl = ImplStr(pwz); + else + clear(); + + return *this; + } +#else // !wxUSE_STL_BASED_WXSTRING + wxString& operator=(const char *psz) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl = ImplStr(psz); + + return *this; + } + + wxString& operator=(const wchar_t *pwz) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl = ImplStr(pwz); + + return *this; + } +#endif // wxUSE_STL_BASED_WXSTRING/!wxUSE_STL_BASED_WXSTRING + + wxString& operator=(const unsigned char *psz) + { return operator=((const char*)psz); } + + // from wxScopedWCharBuffer + wxString& operator=(const wxScopedWCharBuffer& s) + { return assign(s); } + // from wxScopedCharBuffer + wxString& operator=(const wxScopedCharBuffer& s) + { return assign(s); } + + // string concatenation + // in place concatenation + /* + Concatenate and return the result. Note that the left to right + associativity of << allows to write things like "str << str1 << str2 + << ..." (unlike with +=) + */ + // string += string + wxString& operator<<(const wxString& s) + { +#if WXWIN_COMPATIBILITY_2_8 && !wxUSE_STL_BASED_WXSTRING && !wxUSE_UNICODE_UTF8 + wxASSERT_MSG( s.IsValid(), + wxT("did you forget to call UngetWriteBuf()?") ); +#endif + + append(s); + return *this; + } + // string += C string + wxString& operator<<(const char *psz) + { append(psz); return *this; } + wxString& operator<<(const wchar_t *pwz) + { append(pwz); return *this; } + wxString& operator<<(const wxCStrData& psz) + { append(psz.AsString()); return *this; } + // string += char + wxString& operator<<(wxUniChar ch) { append(1, ch); return *this; } + wxString& operator<<(wxUniCharRef ch) { append(1, ch); return *this; } + wxString& operator<<(char ch) { append(1, ch); return *this; } + wxString& operator<<(unsigned char ch) { append(1, ch); return *this; } + wxString& operator<<(wchar_t ch) { append(1, ch); return *this; } + + // string += buffer (i.e. from wxGetString) + wxString& operator<<(const wxScopedWCharBuffer& s) + { return append(s); } + wxString& operator<<(const wxScopedCharBuffer& s) + { return append(s); } + + // string += C string + wxString& Append(const wxString& s) + { + // test for empty() to share the string if possible + if ( empty() ) + *this = s; + else + append(s); + return *this; + } + wxString& Append(const char* psz) + { append(psz); return *this; } + wxString& Append(const wchar_t* pwz) + { append(pwz); return *this; } + wxString& Append(const wxCStrData& psz) + { append(psz); return *this; } + wxString& Append(const wxScopedCharBuffer& psz) + { append(psz); return *this; } + wxString& Append(const wxScopedWCharBuffer& psz) + { append(psz); return *this; } + wxString& Append(const char* psz, size_t nLen) + { append(psz, nLen); return *this; } + wxString& Append(const wchar_t* pwz, size_t nLen) + { append(pwz, nLen); return *this; } + wxString& Append(const wxCStrData& psz, size_t nLen) + { append(psz, nLen); return *this; } + wxString& Append(const wxScopedCharBuffer& psz, size_t nLen) + { append(psz, nLen); return *this; } + wxString& Append(const wxScopedWCharBuffer& psz, size_t nLen) + { append(psz, nLen); return *this; } + // append count copies of given character + wxString& Append(wxUniChar ch, size_t count = 1u) + { append(count, ch); return *this; } + wxString& Append(wxUniCharRef ch, size_t count = 1u) + { append(count, ch); return *this; } + wxString& Append(char ch, size_t count = 1u) + { append(count, ch); return *this; } + wxString& Append(unsigned char ch, size_t count = 1u) + { append(count, ch); return *this; } + wxString& Append(wchar_t ch, size_t count = 1u) + { append(count, ch); return *this; } + + // prepend a string, return the string itself + wxString& Prepend(const wxString& str) + { *this = str + *this; return *this; } + + // non-destructive concatenation + // two strings + friend wxString WXDLLIMPEXP_BASE operator+(const wxString& string1, + const wxString& string2); + // string with a single char + friend wxString WXDLLIMPEXP_BASE operator+(const wxString& string, wxUniChar ch); + // char with a string + friend wxString WXDLLIMPEXP_BASE operator+(wxUniChar ch, const wxString& string); + // string with C string + friend wxString WXDLLIMPEXP_BASE operator+(const wxString& string, + const char *psz); + friend wxString WXDLLIMPEXP_BASE operator+(const wxString& string, + const wchar_t *pwz); + // C string with string + friend wxString WXDLLIMPEXP_BASE operator+(const char *psz, + const wxString& string); + friend wxString WXDLLIMPEXP_BASE operator+(const wchar_t *pwz, + const wxString& string); + + // stream-like functions + // insert an int into string + wxString& operator<<(int i) + { return (*this) << Format(wxT("%d"), i); } + // insert an unsigned int into string + wxString& operator<<(unsigned int ui) + { return (*this) << Format(wxT("%u"), ui); } + // insert a long into string + wxString& operator<<(long l) + { return (*this) << Format(wxT("%ld"), l); } + // insert an unsigned long into string + wxString& operator<<(unsigned long ul) + { return (*this) << Format(wxT("%lu"), ul); } +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + // insert a long long if they exist and aren't longs + wxString& operator<<(wxLongLong_t ll) + { + return (*this) << Format("%" wxLongLongFmtSpec "d", ll); + } + // insert an unsigned long long + wxString& operator<<(wxULongLong_t ull) + { + return (*this) << Format("%" wxLongLongFmtSpec "u" , ull); + } +#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + // insert a float into string + wxString& operator<<(float f) + { return (*this) << Format(wxT("%f"), f); } + // insert a double into string + wxString& operator<<(double d) + { return (*this) << Format(wxT("%g"), d); } + + // string comparison + // case-sensitive comparison (returns a value < 0, = 0 or > 0) + int Cmp(const char *psz) const + { return compare(psz); } + int Cmp(const wchar_t *pwz) const + { return compare(pwz); } + int Cmp(const wxString& s) const + { return compare(s); } + int Cmp(const wxCStrData& s) const + { return compare(s); } + int Cmp(const wxScopedCharBuffer& s) const + { return compare(s); } + int Cmp(const wxScopedWCharBuffer& s) const + { return compare(s); } + // same as Cmp() but not case-sensitive + int CmpNoCase(const wxString& s) const; + + // test for the string equality, either considering case or not + // (if compareWithCase then the case matters) + bool IsSameAs(const wxString& str, bool compareWithCase = true) const + { +#if !wxUSE_UNICODE_UTF8 + // in UTF-8 build, length() is O(n) and doing this would be _slower_ + if ( length() != str.length() ) + return false; +#endif + return (compareWithCase ? Cmp(str) : CmpNoCase(str)) == 0; + } + bool IsSameAs(const char *str, bool compareWithCase = true) const + { return (compareWithCase ? Cmp(str) : CmpNoCase(str)) == 0; } + bool IsSameAs(const wchar_t *str, bool compareWithCase = true) const + { return (compareWithCase ? Cmp(str) : CmpNoCase(str)) == 0; } + + bool IsSameAs(const wxCStrData& str, bool compareWithCase = true) const + { return IsSameAs(str.AsString(), compareWithCase); } + bool IsSameAs(const wxScopedCharBuffer& str, bool compareWithCase = true) const + { return IsSameAs(str.data(), compareWithCase); } + bool IsSameAs(const wxScopedWCharBuffer& str, bool compareWithCase = true) const + { return IsSameAs(str.data(), compareWithCase); } + // comparison with a single character: returns true if equal + bool IsSameAs(wxUniChar c, bool compareWithCase = true) const; + // FIXME-UTF8: remove these overloads + bool IsSameAs(wxUniCharRef c, bool compareWithCase = true) const + { return IsSameAs(wxUniChar(c), compareWithCase); } + bool IsSameAs(char c, bool compareWithCase = true) const + { return IsSameAs(wxUniChar(c), compareWithCase); } + bool IsSameAs(unsigned char c, bool compareWithCase = true) const + { return IsSameAs(wxUniChar(c), compareWithCase); } + bool IsSameAs(wchar_t c, bool compareWithCase = true) const + { return IsSameAs(wxUniChar(c), compareWithCase); } + bool IsSameAs(int c, bool compareWithCase = true) const + { return IsSameAs(wxUniChar(c), compareWithCase); } + + // simple sub-string extraction + // return substring starting at nFirst of length nCount (or till the end + // if nCount = default value) + wxString Mid(size_t nFirst, size_t nCount = npos) const; + + // operator version of Mid() + wxString operator()(size_t start, size_t len) const + { return Mid(start, len); } + + // check if the string starts with the given prefix and return the rest + // of the string in the provided pointer if it is not NULL; otherwise + // return false + bool StartsWith(const wxString& prefix, wxString *rest = NULL) const; + // check if the string ends with the given suffix and return the + // beginning of the string before the suffix in the provided pointer if + // it is not NULL; otherwise return false + bool EndsWith(const wxString& suffix, wxString *rest = NULL) const; + + // get first nCount characters + wxString Left(size_t nCount) const; + // get last nCount characters + wxString Right(size_t nCount) const; + // get all characters before the first occurrence of ch + // (returns the whole string if ch not found) and also put everything + // following the first occurrence of ch into rest if it's non-NULL + wxString BeforeFirst(wxUniChar ch, wxString *rest = NULL) const; + // get all characters before the last occurrence of ch + // (returns empty string if ch not found) and also put everything + // following the last occurrence of ch into rest if it's non-NULL + wxString BeforeLast(wxUniChar ch, wxString *rest = NULL) const; + // get all characters after the first occurrence of ch + // (returns empty string if ch not found) + wxString AfterFirst(wxUniChar ch) const; + // get all characters after the last occurrence of ch + // (returns the whole string if ch not found) + wxString AfterLast(wxUniChar ch) const; + + // for compatibility only, use more explicitly named functions above + wxString Before(wxUniChar ch) const { return BeforeLast(ch); } + wxString After(wxUniChar ch) const { return AfterFirst(ch); } + + // case conversion + // convert to upper case in place, return the string itself + wxString& MakeUpper(); + // convert to upper case, return the copy of the string + wxString Upper() const { return wxString(*this).MakeUpper(); } + // convert to lower case in place, return the string itself + wxString& MakeLower(); + // convert to lower case, return the copy of the string + wxString Lower() const { return wxString(*this).MakeLower(); } + // convert the first character to the upper case and the rest to the + // lower one, return the modified string itself + wxString& MakeCapitalized(); + // convert the first character to the upper case and the rest to the + // lower one, return the copy of the string + wxString Capitalize() const { return wxString(*this).MakeCapitalized(); } + + // trimming/padding whitespace (either side) and truncating + // remove spaces from left or from right (default) side + wxString& Trim(bool bFromRight = true); + // add nCount copies chPad in the beginning or at the end (default) + wxString& Pad(size_t nCount, wxUniChar chPad = wxT(' '), bool bFromRight = true); + + // searching and replacing + // searching (return starting index, or -1 if not found) + int Find(wxUniChar ch, bool bFromEnd = false) const; // like strchr/strrchr + int Find(wxUniCharRef ch, bool bFromEnd = false) const + { return Find(wxUniChar(ch), bFromEnd); } + int Find(char ch, bool bFromEnd = false) const + { return Find(wxUniChar(ch), bFromEnd); } + int Find(unsigned char ch, bool bFromEnd = false) const + { return Find(wxUniChar(ch), bFromEnd); } + int Find(wchar_t ch, bool bFromEnd = false) const + { return Find(wxUniChar(ch), bFromEnd); } + // searching (return starting index, or -1 if not found) + int Find(const wxString& sub) const // like strstr + { + size_type idx = find(sub); + return (idx == npos) ? wxNOT_FOUND : (int)idx; + } + int Find(const char *sub) const // like strstr + { + size_type idx = find(sub); + return (idx == npos) ? wxNOT_FOUND : (int)idx; + } + int Find(const wchar_t *sub) const // like strstr + { + size_type idx = find(sub); + return (idx == npos) ? wxNOT_FOUND : (int)idx; + } + + int Find(const wxCStrData& sub) const + { return Find(sub.AsString()); } + int Find(const wxScopedCharBuffer& sub) const + { return Find(sub.data()); } + int Find(const wxScopedWCharBuffer& sub) const + { return Find(sub.data()); } + + // replace first (or all of bReplaceAll) occurrences of substring with + // another string, returns the number of replacements made + size_t Replace(const wxString& strOld, + const wxString& strNew, + bool bReplaceAll = true); + + // check if the string contents matches a mask containing '*' and '?' + bool Matches(const wxString& mask) const; + + // conversion to numbers: all functions return true only if the whole + // string is a number and put the value of this number into the pointer + // provided, the base is the numeric base in which the conversion should be + // done and must be comprised between 2 and 36 or be 0 in which case the + // standard C rules apply (leading '0' => octal, "0x" => hex) + // convert to a signed integer + bool ToLong(long *val, int base = 10) const; + // convert to an unsigned integer + bool ToULong(unsigned long *val, int base = 10) const; + // convert to wxLongLong +#if defined(wxLongLong_t) + bool ToLongLong(wxLongLong_t *val, int base = 10) const; + // convert to wxULongLong + bool ToULongLong(wxULongLong_t *val, int base = 10) const; +#endif // wxLongLong_t + // convert to a double + bool ToDouble(double *val) const; + + // conversions to numbers using C locale + // convert to a signed integer + bool ToCLong(long *val, int base = 10) const; + // convert to an unsigned integer + bool ToCULong(unsigned long *val, int base = 10) const; + // convert to a double + bool ToCDouble(double *val) const; + + // create a string representing the given floating point number with the + // default (like %g) or fixed (if precision >=0) precision + // in the current locale + static wxString FromDouble(double val, int precision = -1); + // in C locale + static wxString FromCDouble(double val, int precision = -1); + +#ifndef wxNEEDS_WXSTRING_PRINTF_MIXIN + // formatted input/output + // as sprintf(), returns the number of characters written or < 0 on error + // (take 'this' into account in attribute parameter count) + // int Printf(const wxString& format, ...); + WX_DEFINE_VARARG_FUNC(int, Printf, 1, (const wxFormatString&), + DoPrintfWchar, DoPrintfUtf8) +#ifdef __WATCOMC__ + // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351 + WX_VARARG_WATCOM_WORKAROUND(int, Printf, 1, (const wxString&), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(int, Printf, 1, (const wxCStrData&), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(int, Printf, 1, (const char*), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(int, Printf, 1, (const wchar_t*), + (wxFormatString(f1))); +#endif +#endif // !wxNEEDS_WXSTRING_PRINTF_MIXIN + // as vprintf(), returns the number of characters written or < 0 on error + int PrintfV(const wxString& format, va_list argptr); + +#ifndef wxNEEDS_WXSTRING_PRINTF_MIXIN + // returns the string containing the result of Printf() to it + // static wxString Format(const wxString& format, ...) WX_ATTRIBUTE_PRINTF_1; + WX_DEFINE_VARARG_FUNC(static wxString, Format, 1, (const wxFormatString&), + DoFormatWchar, DoFormatUtf8) +#ifdef __WATCOMC__ + // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351 + WX_VARARG_WATCOM_WORKAROUND(static wxString, Format, 1, (const wxString&), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(static wxString, Format, 1, (const wxCStrData&), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(static wxString, Format, 1, (const char*), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(static wxString, Format, 1, (const wchar_t*), + (wxFormatString(f1))); +#endif +#endif + // the same as above, but takes a va_list + static wxString FormatV(const wxString& format, va_list argptr); + + // raw access to string memory + // ensure that string has space for at least nLen characters + // only works if the data of this string is not shared + bool Alloc(size_t nLen) { reserve(nLen); return capacity() >= nLen; } + // minimize the string's memory + // only works if the data of this string is not shared + bool Shrink(); +#if WXWIN_COMPATIBILITY_2_8 && !wxUSE_STL_BASED_WXSTRING && !wxUSE_UNICODE_UTF8 + // These are deprecated, use wxStringBuffer or wxStringBufferLength instead + // + // get writable buffer of at least nLen bytes. Unget() *must* be called + // a.s.a.p. to put string back in a reasonable state! + wxDEPRECATED( wxStringCharType *GetWriteBuf(size_t nLen) ); + // call this immediately after GetWriteBuf() has been used + wxDEPRECATED( void UngetWriteBuf() ); + wxDEPRECATED( void UngetWriteBuf(size_t nLen) ); +#endif // WXWIN_COMPATIBILITY_2_8 && !wxUSE_STL_BASED_WXSTRING && wxUSE_UNICODE_UTF8 + + // wxWidgets version 1 compatibility functions + + // use Mid() + wxString SubString(size_t from, size_t to) const + { return Mid(from, (to - from + 1)); } + // values for second parameter of CompareTo function + enum caseCompare {exact, ignoreCase}; + // values for first parameter of Strip function + enum stripType {leading = 0x1, trailing = 0x2, both = 0x3}; + +#ifndef wxNEEDS_WXSTRING_PRINTF_MIXIN + // use Printf() + // (take 'this' into account in attribute parameter count) + // int sprintf(const wxString& format, ...) WX_ATTRIBUTE_PRINTF_2; + WX_DEFINE_VARARG_FUNC(int, sprintf, 1, (const wxFormatString&), + DoPrintfWchar, DoPrintfUtf8) +#ifdef __WATCOMC__ + // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351 + WX_VARARG_WATCOM_WORKAROUND(int, sprintf, 1, (const wxString&), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(int, sprintf, 1, (const wxCStrData&), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(int, sprintf, 1, (const char*), + (wxFormatString(f1))); + WX_VARARG_WATCOM_WORKAROUND(int, sprintf, 1, (const wchar_t*), + (wxFormatString(f1))); +#endif +#endif // wxNEEDS_WXSTRING_PRINTF_MIXIN + + // use Cmp() + int CompareTo(const wxChar* psz, caseCompare cmp = exact) const + { return cmp == exact ? Cmp(psz) : CmpNoCase(psz); } + + // use length() + size_t Length() const { return length(); } + // Count the number of characters + int Freq(wxUniChar ch) const; + // use MakeLower + void LowerCase() { MakeLower(); } + // use MakeUpper + void UpperCase() { MakeUpper(); } + // use Trim except that it doesn't change this string + wxString Strip(stripType w = trailing) const; + + // use Find (more general variants not yet supported) + size_t Index(const wxChar* psz) const { return Find(psz); } + size_t Index(wxUniChar ch) const { return Find(ch); } + // use Truncate + wxString& Remove(size_t pos) { return Truncate(pos); } + wxString& RemoveLast(size_t n = 1) { return Truncate(length() - n); } + + wxString& Remove(size_t nStart, size_t nLen) + { return (wxString&)erase( nStart, nLen ); } + + // use Find() + int First( wxUniChar ch ) const { return Find(ch); } + int First( wxUniCharRef ch ) const { return Find(ch); } + int First( char ch ) const { return Find(ch); } + int First( unsigned char ch ) const { return Find(ch); } + int First( wchar_t ch ) const { return Find(ch); } + int First( const wxString& str ) const { return Find(str); } + int Last( wxUniChar ch ) const { return Find(ch, true); } + bool Contains(const wxString& str) const { return Find(str) != wxNOT_FOUND; } + + // use empty() + bool IsNull() const { return empty(); } + + // std::string compatibility functions + + // take nLen chars starting at nPos + wxString(const wxString& str, size_t nPos, size_t nLen) + { assign(str, nPos, nLen); } + // take all characters from first to last + wxString(const_iterator first, const_iterator last) + : m_impl(first.impl(), last.impl()) { } +#if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER + // the 2 overloads below are for compatibility with the existing code using + // pointers instead of iterators + wxString(const char *first, const char *last) + { + SubstrBufFromMB str(ImplStr(first, last - first)); + m_impl.assign(str.data, str.len); + } + wxString(const wchar_t *first, const wchar_t *last) + { + SubstrBufFromWC str(ImplStr(first, last - first)); + m_impl.assign(str.data, str.len); + } + // and this one is needed to compile code adding offsets to c_str() result + wxString(const wxCStrData& first, const wxCStrData& last) + : m_impl(CreateConstIterator(first).impl(), + CreateConstIterator(last).impl()) + { + wxASSERT_MSG( first.m_str == last.m_str, + wxT("pointers must be into the same string") ); + } +#endif // WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER + + // lib.string.modifiers + // append elements str[pos], ..., str[pos+n] + wxString& append(const wxString& str, size_t pos, size_t n) + { + wxSTRING_UPDATE_CACHED_LENGTH(n); + + size_t from, len; + str.PosLenToImpl(pos, n, &from, &len); + m_impl.append(str.m_impl, from, len); + return *this; + } + // append a string + wxString& append(const wxString& str) + { + wxSTRING_UPDATE_CACHED_LENGTH(str.length()); + + m_impl.append(str.m_impl); + return *this; + } + + // append first n (or all if n == npos) characters of sz + wxString& append(const char *sz) + { + wxSTRING_INVALIDATE_CACHED_LENGTH(); + + m_impl.append(ImplStr(sz)); + return *this; + } + + wxString& append(const wchar_t *sz) + { + wxSTRING_INVALIDATE_CACHED_LENGTH(); + + m_impl.append(ImplStr(sz)); + return *this; + } + + wxString& append(const char *sz, size_t n) + { + wxSTRING_INVALIDATE_CACHED_LENGTH(); + + SubstrBufFromMB str(ImplStr(sz, n)); + m_impl.append(str.data, str.len); + return *this; + } + wxString& append(const wchar_t *sz, size_t n) + { + wxSTRING_UPDATE_CACHED_LENGTH(n); + + SubstrBufFromWC str(ImplStr(sz, n)); + m_impl.append(str.data, str.len); + return *this; + } + + wxString& append(const wxCStrData& str) + { return append(str.AsString()); } + wxString& append(const wxScopedCharBuffer& str) + { return append(str.data(), str.length()); } + wxString& append(const wxScopedWCharBuffer& str) + { return append(str.data(), str.length()); } + wxString& append(const wxCStrData& str, size_t n) + { return append(str.AsString(), 0, n); } + wxString& append(const wxScopedCharBuffer& str, size_t n) + { return append(str.data(), n); } + wxString& append(const wxScopedWCharBuffer& str, size_t n) + { return append(str.data(), n); } + + // append n copies of ch + wxString& append(size_t n, wxUniChar ch) + { +#if wxUSE_UNICODE_UTF8 + if ( !ch.IsAscii() ) + { + wxSTRING_INVALIDATE_CACHED_LENGTH(); + + m_impl.append(wxStringOperations::EncodeNChars(n, ch)); + } + else // ASCII +#endif + { + wxSTRING_UPDATE_CACHED_LENGTH(n); + + m_impl.append(n, (wxStringCharType)ch); + } + + return *this; + } + + wxString& append(size_t n, wxUniCharRef ch) + { return append(n, wxUniChar(ch)); } + wxString& append(size_t n, char ch) + { return append(n, wxUniChar(ch)); } + wxString& append(size_t n, unsigned char ch) + { return append(n, wxUniChar(ch)); } + wxString& append(size_t n, wchar_t ch) + { return append(n, wxUniChar(ch)); } + + // append from first to last + wxString& append(const_iterator first, const_iterator last) + { + wxSTRING_INVALIDATE_CACHED_LENGTH(); + + m_impl.append(first.impl(), last.impl()); + return *this; + } +#if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER + wxString& append(const char *first, const char *last) + { return append(first, last - first); } + wxString& append(const wchar_t *first, const wchar_t *last) + { return append(first, last - first); } + wxString& append(const wxCStrData& first, const wxCStrData& last) + { return append(CreateConstIterator(first), CreateConstIterator(last)); } +#endif // WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER + + // same as `this_string = str' + wxString& assign(const wxString& str) + { + wxSTRING_SET_CACHED_LENGTH(str.length()); + + m_impl = str.m_impl; + + return *this; + } + + // This is a non-standard-compliant overload taking the first "len" + // characters of the source string. + wxString& assign(const wxString& str, size_t len) + { +#if wxUSE_STRING_POS_CACHE + // It is legal to pass len > str.length() to wxStringImpl::assign() but + // by restricting it here we save some work for that function so it's not + // really less efficient and, at the same time, ensure that we don't + // cache invalid length. + const size_t lenSrc = str.length(); + if ( len > lenSrc ) + len = lenSrc; + + wxSTRING_SET_CACHED_LENGTH(len); +#endif // wxUSE_STRING_POS_CACHE + + m_impl.assign(str.m_impl, 0, str.LenToImpl(len)); + + return *this; + } + + // same as ` = str[pos..pos + n] + wxString& assign(const wxString& str, size_t pos, size_t n) + { + size_t from, len; + str.PosLenToImpl(pos, n, &from, &len); + m_impl.assign(str.m_impl, from, len); + + // it's important to call this after PosLenToImpl() above in case str is + // the same string as this one + wxSTRING_SET_CACHED_LENGTH(n); + + return *this; + } + + // same as `= first n (or all if n == npos) characters of sz' + wxString& assign(const char *sz) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.assign(ImplStr(sz)); + + return *this; + } + + wxString& assign(const wchar_t *sz) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.assign(ImplStr(sz)); + + return *this; + } + + wxString& assign(const char *sz, size_t n) + { + wxSTRING_INVALIDATE_CACHE(); + + SubstrBufFromMB str(ImplStr(sz, n)); + m_impl.assign(str.data, str.len); + + return *this; + } + + wxString& assign(const wchar_t *sz, size_t n) + { + wxSTRING_SET_CACHED_LENGTH(n); + + SubstrBufFromWC str(ImplStr(sz, n)); + m_impl.assign(str.data, str.len); + + return *this; + } + + wxString& assign(const wxCStrData& str) + { return assign(str.AsString()); } + wxString& assign(const wxScopedCharBuffer& str) + { return assign(str.data(), str.length()); } + wxString& assign(const wxScopedWCharBuffer& str) + { return assign(str.data(), str.length()); } + wxString& assign(const wxCStrData& str, size_t len) + { return assign(str.AsString(), len); } + wxString& assign(const wxScopedCharBuffer& str, size_t len) + { return assign(str.data(), len); } + wxString& assign(const wxScopedWCharBuffer& str, size_t len) + { return assign(str.data(), len); } + + // same as `= n copies of ch' + wxString& assign(size_t n, wxUniChar ch) + { + wxSTRING_SET_CACHED_LENGTH(n); + +#if wxUSE_UNICODE_UTF8 + if ( !ch.IsAscii() ) + m_impl.assign(wxStringOperations::EncodeNChars(n, ch)); + else +#endif + m_impl.assign(n, (wxStringCharType)ch); + + return *this; + } + + wxString& assign(size_t n, wxUniCharRef ch) + { return assign(n, wxUniChar(ch)); } + wxString& assign(size_t n, char ch) + { return assign(n, wxUniChar(ch)); } + wxString& assign(size_t n, unsigned char ch) + { return assign(n, wxUniChar(ch)); } + wxString& assign(size_t n, wchar_t ch) + { return assign(n, wxUniChar(ch)); } + + // assign from first to last + wxString& assign(const_iterator first, const_iterator last) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.assign(first.impl(), last.impl()); + + return *this; + } +#if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER + wxString& assign(const char *first, const char *last) + { return assign(first, last - first); } + wxString& assign(const wchar_t *first, const wchar_t *last) + { return assign(first, last - first); } + wxString& assign(const wxCStrData& first, const wxCStrData& last) + { return assign(CreateConstIterator(first), CreateConstIterator(last)); } +#endif // WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER + + // string comparison + int compare(const wxString& str) const; + int compare(const char* sz) const; + int compare(const wchar_t* sz) const; + int compare(const wxCStrData& str) const + { return compare(str.AsString()); } + int compare(const wxScopedCharBuffer& str) const + { return compare(str.data()); } + int compare(const wxScopedWCharBuffer& str) const + { return compare(str.data()); } + // comparison with a substring + int compare(size_t nStart, size_t nLen, const wxString& str) const; + // comparison of 2 substrings + int compare(size_t nStart, size_t nLen, + const wxString& str, size_t nStart2, size_t nLen2) const; + // substring comparison with first nCount characters of sz + int compare(size_t nStart, size_t nLen, + const char* sz, size_t nCount = npos) const; + int compare(size_t nStart, size_t nLen, + const wchar_t* sz, size_t nCount = npos) const; + + // insert another string + wxString& insert(size_t nPos, const wxString& str) + { insert(GetIterForNthChar(nPos), str.begin(), str.end()); return *this; } + // insert n chars of str starting at nStart (in str) + wxString& insert(size_t nPos, const wxString& str, size_t nStart, size_t n) + { + wxSTRING_UPDATE_CACHED_LENGTH(n); + + size_t from, len; + str.PosLenToImpl(nStart, n, &from, &len); + m_impl.insert(PosToImpl(nPos), str.m_impl, from, len); + + return *this; + } + + // insert first n (or all if n == npos) characters of sz + wxString& insert(size_t nPos, const char *sz) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.insert(PosToImpl(nPos), ImplStr(sz)); + + return *this; + } + + wxString& insert(size_t nPos, const wchar_t *sz) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.insert(PosToImpl(nPos), ImplStr(sz)); return *this; + } + + wxString& insert(size_t nPos, const char *sz, size_t n) + { + wxSTRING_UPDATE_CACHED_LENGTH(n); + + SubstrBufFromMB str(ImplStr(sz, n)); + m_impl.insert(PosToImpl(nPos), str.data, str.len); + + return *this; + } + + wxString& insert(size_t nPos, const wchar_t *sz, size_t n) + { + wxSTRING_UPDATE_CACHED_LENGTH(n); + + SubstrBufFromWC str(ImplStr(sz, n)); + m_impl.insert(PosToImpl(nPos), str.data, str.len); + + return *this; + } + + // insert n copies of ch + wxString& insert(size_t nPos, size_t n, wxUniChar ch) + { + wxSTRING_UPDATE_CACHED_LENGTH(n); + +#if wxUSE_UNICODE_UTF8 + if ( !ch.IsAscii() ) + m_impl.insert(PosToImpl(nPos), wxStringOperations::EncodeNChars(n, ch)); + else +#endif + m_impl.insert(PosToImpl(nPos), n, (wxStringCharType)ch); + return *this; + } + + iterator insert(iterator it, wxUniChar ch) + { + wxSTRING_UPDATE_CACHED_LENGTH(1); + +#if wxUSE_UNICODE_UTF8 + if ( !ch.IsAscii() ) + { + size_t pos = IterToImplPos(it); + m_impl.insert(pos, wxStringOperations::EncodeChar(ch)); + return iterator(this, m_impl.begin() + pos); + } + else +#endif + return iterator(this, m_impl.insert(it.impl(), (wxStringCharType)ch)); + } + + void insert(iterator it, const_iterator first, const_iterator last) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.insert(it.impl(), first.impl(), last.impl()); + } + +#if WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER + void insert(iterator it, const char *first, const char *last) + { insert(it - begin(), first, last - first); } + void insert(iterator it, const wchar_t *first, const wchar_t *last) + { insert(it - begin(), first, last - first); } + void insert(iterator it, const wxCStrData& first, const wxCStrData& last) + { insert(it, CreateConstIterator(first), CreateConstIterator(last)); } +#endif // WXWIN_COMPATIBILITY_STRING_PTR_AS_ITER + + void insert(iterator it, size_type n, wxUniChar ch) + { + wxSTRING_UPDATE_CACHED_LENGTH(n); + +#if wxUSE_UNICODE_UTF8 + if ( !ch.IsAscii() ) + m_impl.insert(IterToImplPos(it), wxStringOperations::EncodeNChars(n, ch)); + else +#endif + m_impl.insert(it.impl(), n, (wxStringCharType)ch); + } + + // delete characters from nStart to nStart + nLen + wxString& erase(size_type pos = 0, size_type n = npos) + { + wxSTRING_INVALIDATE_CACHE(); + + size_t from, len; + PosLenToImpl(pos, n, &from, &len); + m_impl.erase(from, len); + + return *this; + } + + // delete characters from first up to last + iterator erase(iterator first, iterator last) + { + wxSTRING_INVALIDATE_CACHE(); + + return iterator(this, m_impl.erase(first.impl(), last.impl())); + } + + iterator erase(iterator first) + { + wxSTRING_UPDATE_CACHED_LENGTH(-1); + + return iterator(this, m_impl.erase(first.impl())); + } + +#ifdef wxSTRING_BASE_HASNT_CLEAR + void clear() { erase(); } +#else + void clear() + { + wxSTRING_SET_CACHED_LENGTH(0); + + m_impl.clear(); + } +#endif + + // replaces the substring of length nLen starting at nStart + wxString& replace(size_t nStart, size_t nLen, const char* sz) + { + wxSTRING_INVALIDATE_CACHE(); + + size_t from, len; + PosLenToImpl(nStart, nLen, &from, &len); + m_impl.replace(from, len, ImplStr(sz)); + + return *this; + } + + wxString& replace(size_t nStart, size_t nLen, const wchar_t* sz) + { + wxSTRING_INVALIDATE_CACHE(); + + size_t from, len; + PosLenToImpl(nStart, nLen, &from, &len); + m_impl.replace(from, len, ImplStr(sz)); + + return *this; + } + + // replaces the substring of length nLen starting at nStart + wxString& replace(size_t nStart, size_t nLen, const wxString& str) + { + wxSTRING_INVALIDATE_CACHE(); + + size_t from, len; + PosLenToImpl(nStart, nLen, &from, &len); + m_impl.replace(from, len, str.m_impl); + + return *this; + } + + // replaces the substring with nCount copies of ch + wxString& replace(size_t nStart, size_t nLen, size_t nCount, wxUniChar ch) + { + wxSTRING_INVALIDATE_CACHE(); + + size_t from, len; + PosLenToImpl(nStart, nLen, &from, &len); +#if wxUSE_UNICODE_UTF8 + if ( !ch.IsAscii() ) + m_impl.replace(from, len, wxStringOperations::EncodeNChars(nCount, ch)); + else +#endif + m_impl.replace(from, len, nCount, (wxStringCharType)ch); + + return *this; + } + + // replaces a substring with another substring + wxString& replace(size_t nStart, size_t nLen, + const wxString& str, size_t nStart2, size_t nLen2) + { + wxSTRING_INVALIDATE_CACHE(); + + size_t from, len; + PosLenToImpl(nStart, nLen, &from, &len); + + size_t from2, len2; + str.PosLenToImpl(nStart2, nLen2, &from2, &len2); + + m_impl.replace(from, len, str.m_impl, from2, len2); + + return *this; + } + + // replaces the substring with first nCount chars of sz + wxString& replace(size_t nStart, size_t nLen, + const char* sz, size_t nCount) + { + wxSTRING_INVALIDATE_CACHE(); + + size_t from, len; + PosLenToImpl(nStart, nLen, &from, &len); + + SubstrBufFromMB str(ImplStr(sz, nCount)); + + m_impl.replace(from, len, str.data, str.len); + + return *this; + } + + wxString& replace(size_t nStart, size_t nLen, + const wchar_t* sz, size_t nCount) + { + wxSTRING_INVALIDATE_CACHE(); + + size_t from, len; + PosLenToImpl(nStart, nLen, &from, &len); + + SubstrBufFromWC str(ImplStr(sz, nCount)); + + m_impl.replace(from, len, str.data, str.len); + + return *this; + } + + wxString& replace(size_t nStart, size_t nLen, + const wxString& s, size_t nCount) + { + wxSTRING_INVALIDATE_CACHE(); + + size_t from, len; + PosLenToImpl(nStart, nLen, &from, &len); + m_impl.replace(from, len, s.m_impl.c_str(), s.LenToImpl(nCount)); + + return *this; + } + + wxString& replace(iterator first, iterator last, const char* s) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.replace(first.impl(), last.impl(), ImplStr(s)); + + return *this; + } + + wxString& replace(iterator first, iterator last, const wchar_t* s) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.replace(first.impl(), last.impl(), ImplStr(s)); + + return *this; + } + + wxString& replace(iterator first, iterator last, const char* s, size_type n) + { + wxSTRING_INVALIDATE_CACHE(); + + SubstrBufFromMB str(ImplStr(s, n)); + m_impl.replace(first.impl(), last.impl(), str.data, str.len); + + return *this; + } + + wxString& replace(iterator first, iterator last, const wchar_t* s, size_type n) + { + wxSTRING_INVALIDATE_CACHE(); + + SubstrBufFromWC str(ImplStr(s, n)); + m_impl.replace(first.impl(), last.impl(), str.data, str.len); + + return *this; + } + + wxString& replace(iterator first, iterator last, const wxString& s) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.replace(first.impl(), last.impl(), s.m_impl); + + return *this; + } + + wxString& replace(iterator first, iterator last, size_type n, wxUniChar ch) + { + wxSTRING_INVALIDATE_CACHE(); + +#if wxUSE_UNICODE_UTF8 + if ( !ch.IsAscii() ) + m_impl.replace(first.impl(), last.impl(), + wxStringOperations::EncodeNChars(n, ch)); + else +#endif + m_impl.replace(first.impl(), last.impl(), n, (wxStringCharType)ch); + + return *this; + } + + wxString& replace(iterator first, iterator last, + const_iterator first1, const_iterator last1) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.replace(first.impl(), last.impl(), first1.impl(), last1.impl()); + + return *this; + } + + wxString& replace(iterator first, iterator last, + const char *first1, const char *last1) + { replace(first, last, first1, last1 - first1); return *this; } + wxString& replace(iterator first, iterator last, + const wchar_t *first1, const wchar_t *last1) + { replace(first, last, first1, last1 - first1); return *this; } + + // swap two strings + void swap(wxString& str) + { +#if wxUSE_STRING_POS_CACHE + // we modify not only this string but also the other one directly so we + // need to invalidate cache for both of them (we could also try to + // exchange their cache entries but it seems unlikely to be worth it) + InvalidateCache(); + str.InvalidateCache(); +#endif // wxUSE_STRING_POS_CACHE + + m_impl.swap(str.m_impl); + } + + // find a substring + size_t find(const wxString& str, size_t nStart = 0) const + { return PosFromImpl(m_impl.find(str.m_impl, PosToImpl(nStart))); } + + // find first n characters of sz + size_t find(const char* sz, size_t nStart = 0, size_t n = npos) const + { + SubstrBufFromMB str(ImplStr(sz, n)); + return PosFromImpl(m_impl.find(str.data, PosToImpl(nStart), str.len)); + } + size_t find(const wchar_t* sz, size_t nStart = 0, size_t n = npos) const + { + SubstrBufFromWC str(ImplStr(sz, n)); + return PosFromImpl(m_impl.find(str.data, PosToImpl(nStart), str.len)); + } + size_t find(const wxScopedCharBuffer& s, size_t nStart = 0, size_t n = npos) const + { return find(s.data(), nStart, n); } + size_t find(const wxScopedWCharBuffer& s, size_t nStart = 0, size_t n = npos) const + { return find(s.data(), nStart, n); } + size_t find(const wxCStrData& s, size_t nStart = 0, size_t n = npos) const + { return find(s.AsWChar(), nStart, n); } + + // find the first occurrence of character ch after nStart + size_t find(wxUniChar ch, size_t nStart = 0) const + { +#if wxUSE_UNICODE_UTF8 + if ( !ch.IsAscii() ) + return PosFromImpl(m_impl.find(wxStringOperations::EncodeChar(ch), + PosToImpl(nStart))); + else +#endif + return PosFromImpl(m_impl.find((wxStringCharType)ch, + PosToImpl(nStart))); + + } + size_t find(wxUniCharRef ch, size_t nStart = 0) const + { return find(wxUniChar(ch), nStart); } + size_t find(char ch, size_t nStart = 0) const + { return find(wxUniChar(ch), nStart); } + size_t find(unsigned char ch, size_t nStart = 0) const + { return find(wxUniChar(ch), nStart); } + size_t find(wchar_t ch, size_t nStart = 0) const + { return find(wxUniChar(ch), nStart); } + + // rfind() family is exactly like find() but works right to left + + // as find, but from the end + size_t rfind(const wxString& str, size_t nStart = npos) const + { return PosFromImpl(m_impl.rfind(str.m_impl, PosToImpl(nStart))); } + + // as find, but from the end + size_t rfind(const char* sz, size_t nStart = npos, size_t n = npos) const + { + SubstrBufFromMB str(ImplStr(sz, n)); + return PosFromImpl(m_impl.rfind(str.data, PosToImpl(nStart), str.len)); + } + size_t rfind(const wchar_t* sz, size_t nStart = npos, size_t n = npos) const + { + SubstrBufFromWC str(ImplStr(sz, n)); + return PosFromImpl(m_impl.rfind(str.data, PosToImpl(nStart), str.len)); + } + size_t rfind(const wxScopedCharBuffer& s, size_t nStart = npos, size_t n = npos) const + { return rfind(s.data(), nStart, n); } + size_t rfind(const wxScopedWCharBuffer& s, size_t nStart = npos, size_t n = npos) const + { return rfind(s.data(), nStart, n); } + size_t rfind(const wxCStrData& s, size_t nStart = npos, size_t n = npos) const + { return rfind(s.AsWChar(), nStart, n); } + // as find, but from the end + size_t rfind(wxUniChar ch, size_t nStart = npos) const + { +#if wxUSE_UNICODE_UTF8 + if ( !ch.IsAscii() ) + return PosFromImpl(m_impl.rfind(wxStringOperations::EncodeChar(ch), + PosToImpl(nStart))); + else +#endif + return PosFromImpl(m_impl.rfind((wxStringCharType)ch, + PosToImpl(nStart))); + } + size_t rfind(wxUniCharRef ch, size_t nStart = npos) const + { return rfind(wxUniChar(ch), nStart); } + size_t rfind(char ch, size_t nStart = npos) const + { return rfind(wxUniChar(ch), nStart); } + size_t rfind(unsigned char ch, size_t nStart = npos) const + { return rfind(wxUniChar(ch), nStart); } + size_t rfind(wchar_t ch, size_t nStart = npos) const + { return rfind(wxUniChar(ch), nStart); } + + // find first/last occurrence of any character (not) in the set: +#if wxUSE_STL_BASED_WXSTRING && !wxUSE_UNICODE_UTF8 + // FIXME-UTF8: this is not entirely correct, because it doesn't work if + // sizeof(wchar_t)==2 and surrogates are present in the string; + // should we care? Probably not. + size_t find_first_of(const wxString& str, size_t nStart = 0) const + { return m_impl.find_first_of(str.m_impl, nStart); } + size_t find_first_of(const char* sz, size_t nStart = 0) const + { return m_impl.find_first_of(ImplStr(sz), nStart); } + size_t find_first_of(const wchar_t* sz, size_t nStart = 0) const + { return m_impl.find_first_of(ImplStr(sz), nStart); } + size_t find_first_of(const char* sz, size_t nStart, size_t n) const + { return m_impl.find_first_of(ImplStr(sz), nStart, n); } + size_t find_first_of(const wchar_t* sz, size_t nStart, size_t n) const + { return m_impl.find_first_of(ImplStr(sz), nStart, n); } + size_t find_first_of(wxUniChar c, size_t nStart = 0) const + { return m_impl.find_first_of((wxChar)c, nStart); } + + size_t find_last_of(const wxString& str, size_t nStart = npos) const + { return m_impl.find_last_of(str.m_impl, nStart); } + size_t find_last_of(const char* sz, size_t nStart = npos) const + { return m_impl.find_last_of(ImplStr(sz), nStart); } + size_t find_last_of(const wchar_t* sz, size_t nStart = npos) const + { return m_impl.find_last_of(ImplStr(sz), nStart); } + size_t find_last_of(const char* sz, size_t nStart, size_t n) const + { return m_impl.find_last_of(ImplStr(sz), nStart, n); } + size_t find_last_of(const wchar_t* sz, size_t nStart, size_t n) const + { return m_impl.find_last_of(ImplStr(sz), nStart, n); } + size_t find_last_of(wxUniChar c, size_t nStart = npos) const + { return m_impl.find_last_of((wxChar)c, nStart); } + + size_t find_first_not_of(const wxString& str, size_t nStart = 0) const + { return m_impl.find_first_not_of(str.m_impl, nStart); } + size_t find_first_not_of(const char* sz, size_t nStart = 0) const + { return m_impl.find_first_not_of(ImplStr(sz), nStart); } + size_t find_first_not_of(const wchar_t* sz, size_t nStart = 0) const + { return m_impl.find_first_not_of(ImplStr(sz), nStart); } + size_t find_first_not_of(const char* sz, size_t nStart, size_t n) const + { return m_impl.find_first_not_of(ImplStr(sz), nStart, n); } + size_t find_first_not_of(const wchar_t* sz, size_t nStart, size_t n) const + { return m_impl.find_first_not_of(ImplStr(sz), nStart, n); } + size_t find_first_not_of(wxUniChar c, size_t nStart = 0) const + { return m_impl.find_first_not_of((wxChar)c, nStart); } + + size_t find_last_not_of(const wxString& str, size_t nStart = npos) const + { return m_impl.find_last_not_of(str.m_impl, nStart); } + size_t find_last_not_of(const char* sz, size_t nStart = npos) const + { return m_impl.find_last_not_of(ImplStr(sz), nStart); } + size_t find_last_not_of(const wchar_t* sz, size_t nStart = npos) const + { return m_impl.find_last_not_of(ImplStr(sz), nStart); } + size_t find_last_not_of(const char* sz, size_t nStart, size_t n) const + { return m_impl.find_last_not_of(ImplStr(sz), nStart, n); } + size_t find_last_not_of(const wchar_t* sz, size_t nStart, size_t n) const + { return m_impl.find_last_not_of(ImplStr(sz), nStart, n); } + size_t find_last_not_of(wxUniChar c, size_t nStart = npos) const + { return m_impl.find_last_not_of((wxChar)c, nStart); } +#else + // we can't use std::string implementation in UTF-8 build, because the + // character sets would be interpreted wrongly: + + // as strpbrk() but starts at nStart, returns npos if not found + size_t find_first_of(const wxString& str, size_t nStart = 0) const +#if wxUSE_UNICODE // FIXME-UTF8: temporary + { return find_first_of(str.wc_str(), nStart); } +#else + { return find_first_of(str.mb_str(), nStart); } +#endif + // same as above + size_t find_first_of(const char* sz, size_t nStart = 0) const; + size_t find_first_of(const wchar_t* sz, size_t nStart = 0) const; + size_t find_first_of(const char* sz, size_t nStart, size_t n) const; + size_t find_first_of(const wchar_t* sz, size_t nStart, size_t n) const; + // same as find(char, size_t) + size_t find_first_of(wxUniChar c, size_t nStart = 0) const + { return find(c, nStart); } + // find the last (starting from nStart) char from str in this string + size_t find_last_of (const wxString& str, size_t nStart = npos) const +#if wxUSE_UNICODE // FIXME-UTF8: temporary + { return find_last_of(str.wc_str(), nStart); } +#else + { return find_last_of(str.mb_str(), nStart); } +#endif + // same as above + size_t find_last_of (const char* sz, size_t nStart = npos) const; + size_t find_last_of (const wchar_t* sz, size_t nStart = npos) const; + size_t find_last_of(const char* sz, size_t nStart, size_t n) const; + size_t find_last_of(const wchar_t* sz, size_t nStart, size_t n) const; + // same as above + size_t find_last_of(wxUniChar c, size_t nStart = npos) const + { return rfind(c, nStart); } + + // find first/last occurrence of any character not in the set + + // as strspn() (starting from nStart), returns npos on failure + size_t find_first_not_of(const wxString& str, size_t nStart = 0) const +#if wxUSE_UNICODE // FIXME-UTF8: temporary + { return find_first_not_of(str.wc_str(), nStart); } +#else + { return find_first_not_of(str.mb_str(), nStart); } +#endif + // same as above + size_t find_first_not_of(const char* sz, size_t nStart = 0) const; + size_t find_first_not_of(const wchar_t* sz, size_t nStart = 0) const; + size_t find_first_not_of(const char* sz, size_t nStart, size_t n) const; + size_t find_first_not_of(const wchar_t* sz, size_t nStart, size_t n) const; + // same as above + size_t find_first_not_of(wxUniChar ch, size_t nStart = 0) const; + // as strcspn() + size_t find_last_not_of(const wxString& str, size_t nStart = npos) const +#if wxUSE_UNICODE // FIXME-UTF8: temporary + { return find_last_not_of(str.wc_str(), nStart); } +#else + { return find_last_not_of(str.mb_str(), nStart); } +#endif + // same as above + size_t find_last_not_of(const char* sz, size_t nStart = npos) const; + size_t find_last_not_of(const wchar_t* sz, size_t nStart = npos) const; + size_t find_last_not_of(const char* sz, size_t nStart, size_t n) const; + size_t find_last_not_of(const wchar_t* sz, size_t nStart, size_t n) const; + // same as above + size_t find_last_not_of(wxUniChar ch, size_t nStart = npos) const; +#endif // wxUSE_STL_BASED_WXSTRING && !wxUSE_UNICODE_UTF8 or not + + // provide char/wchar_t/wxUniCharRef overloads for char-finding functions + // above to resolve ambiguities: + size_t find_first_of(wxUniCharRef ch, size_t nStart = 0) const + { return find_first_of(wxUniChar(ch), nStart); } + size_t find_first_of(char ch, size_t nStart = 0) const + { return find_first_of(wxUniChar(ch), nStart); } + size_t find_first_of(unsigned char ch, size_t nStart = 0) const + { return find_first_of(wxUniChar(ch), nStart); } + size_t find_first_of(wchar_t ch, size_t nStart = 0) const + { return find_first_of(wxUniChar(ch), nStart); } + size_t find_last_of(wxUniCharRef ch, size_t nStart = npos) const + { return find_last_of(wxUniChar(ch), nStart); } + size_t find_last_of(char ch, size_t nStart = npos) const + { return find_last_of(wxUniChar(ch), nStart); } + size_t find_last_of(unsigned char ch, size_t nStart = npos) const + { return find_last_of(wxUniChar(ch), nStart); } + size_t find_last_of(wchar_t ch, size_t nStart = npos) const + { return find_last_of(wxUniChar(ch), nStart); } + size_t find_first_not_of(wxUniCharRef ch, size_t nStart = 0) const + { return find_first_not_of(wxUniChar(ch), nStart); } + size_t find_first_not_of(char ch, size_t nStart = 0) const + { return find_first_not_of(wxUniChar(ch), nStart); } + size_t find_first_not_of(unsigned char ch, size_t nStart = 0) const + { return find_first_not_of(wxUniChar(ch), nStart); } + size_t find_first_not_of(wchar_t ch, size_t nStart = 0) const + { return find_first_not_of(wxUniChar(ch), nStart); } + size_t find_last_not_of(wxUniCharRef ch, size_t nStart = npos) const + { return find_last_not_of(wxUniChar(ch), nStart); } + size_t find_last_not_of(char ch, size_t nStart = npos) const + { return find_last_not_of(wxUniChar(ch), nStart); } + size_t find_last_not_of(unsigned char ch, size_t nStart = npos) const + { return find_last_not_of(wxUniChar(ch), nStart); } + size_t find_last_not_of(wchar_t ch, size_t nStart = npos) const + { return find_last_not_of(wxUniChar(ch), nStart); } + + // and additional overloads for the versions taking strings: + size_t find_first_of(const wxCStrData& sz, size_t nStart = 0) const + { return find_first_of(sz.AsString(), nStart); } + size_t find_first_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const + { return find_first_of(sz.data(), nStart); } + size_t find_first_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const + { return find_first_of(sz.data(), nStart); } + size_t find_first_of(const wxCStrData& sz, size_t nStart, size_t n) const + { return find_first_of(sz.AsWChar(), nStart, n); } + size_t find_first_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const + { return find_first_of(sz.data(), nStart, n); } + size_t find_first_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const + { return find_first_of(sz.data(), nStart, n); } + + size_t find_last_of(const wxCStrData& sz, size_t nStart = 0) const + { return find_last_of(sz.AsString(), nStart); } + size_t find_last_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const + { return find_last_of(sz.data(), nStart); } + size_t find_last_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const + { return find_last_of(sz.data(), nStart); } + size_t find_last_of(const wxCStrData& sz, size_t nStart, size_t n) const + { return find_last_of(sz.AsWChar(), nStart, n); } + size_t find_last_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const + { return find_last_of(sz.data(), nStart, n); } + size_t find_last_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const + { return find_last_of(sz.data(), nStart, n); } + + size_t find_first_not_of(const wxCStrData& sz, size_t nStart = 0) const + { return find_first_not_of(sz.AsString(), nStart); } + size_t find_first_not_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const + { return find_first_not_of(sz.data(), nStart); } + size_t find_first_not_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const + { return find_first_not_of(sz.data(), nStart); } + size_t find_first_not_of(const wxCStrData& sz, size_t nStart, size_t n) const + { return find_first_not_of(sz.AsWChar(), nStart, n); } + size_t find_first_not_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const + { return find_first_not_of(sz.data(), nStart, n); } + size_t find_first_not_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const + { return find_first_not_of(sz.data(), nStart, n); } + + size_t find_last_not_of(const wxCStrData& sz, size_t nStart = 0) const + { return find_last_not_of(sz.AsString(), nStart); } + size_t find_last_not_of(const wxScopedCharBuffer& sz, size_t nStart = 0) const + { return find_last_not_of(sz.data(), nStart); } + size_t find_last_not_of(const wxScopedWCharBuffer& sz, size_t nStart = 0) const + { return find_last_not_of(sz.data(), nStart); } + size_t find_last_not_of(const wxCStrData& sz, size_t nStart, size_t n) const + { return find_last_not_of(sz.AsWChar(), nStart, n); } + size_t find_last_not_of(const wxScopedCharBuffer& sz, size_t nStart, size_t n) const + { return find_last_not_of(sz.data(), nStart, n); } + size_t find_last_not_of(const wxScopedWCharBuffer& sz, size_t nStart, size_t n) const + { return find_last_not_of(sz.data(), nStart, n); } + + // string += string + wxString& operator+=(const wxString& s) + { + wxSTRING_INVALIDATE_CACHED_LENGTH(); + + m_impl += s.m_impl; + return *this; + } + // string += C string + wxString& operator+=(const char *psz) + { + wxSTRING_INVALIDATE_CACHED_LENGTH(); + + m_impl += ImplStr(psz); + return *this; + } + wxString& operator+=(const wchar_t *pwz) + { + wxSTRING_INVALIDATE_CACHED_LENGTH(); + + m_impl += ImplStr(pwz); + return *this; + } + wxString& operator+=(const wxCStrData& s) + { + wxSTRING_INVALIDATE_CACHED_LENGTH(); + + m_impl += s.AsString().m_impl; + return *this; + } + wxString& operator+=(const wxScopedCharBuffer& s) + { return append(s); } + wxString& operator+=(const wxScopedWCharBuffer& s) + { return append(s); } + // string += char + wxString& operator+=(wxUniChar ch) + { + wxSTRING_UPDATE_CACHED_LENGTH(1); + +#if wxUSE_UNICODE_UTF8 + if ( !ch.IsAscii() ) + m_impl += wxStringOperations::EncodeChar(ch); + else +#endif + m_impl += (wxStringCharType)ch; + return *this; + } + wxString& operator+=(wxUniCharRef ch) { return *this += wxUniChar(ch); } + wxString& operator+=(int ch) { return *this += wxUniChar(ch); } + wxString& operator+=(char ch) { return *this += wxUniChar(ch); } + wxString& operator+=(unsigned char ch) { return *this += wxUniChar(ch); } + wxString& operator+=(wchar_t ch) { return *this += wxUniChar(ch); } + +private: +#if !wxUSE_STL_BASED_WXSTRING + // helpers for wxStringBuffer and wxStringBufferLength + wxStringCharType *DoGetWriteBuf(size_t nLen) + { + return m_impl.DoGetWriteBuf(nLen); + } + + void DoUngetWriteBuf() + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.DoUngetWriteBuf(); + } + + void DoUngetWriteBuf(size_t nLen) + { + wxSTRING_INVALIDATE_CACHE(); + + m_impl.DoUngetWriteBuf(nLen); + } +#endif // !wxUSE_STL_BASED_WXSTRING + +#ifndef wxNEEDS_WXSTRING_PRINTF_MIXIN + #if !wxUSE_UTF8_LOCALE_ONLY + int DoPrintfWchar(const wxChar *format, ...); + static wxString DoFormatWchar(const wxChar *format, ...); + #endif + #if wxUSE_UNICODE_UTF8 + int DoPrintfUtf8(const char *format, ...); + static wxString DoFormatUtf8(const char *format, ...); + #endif +#endif + +#if !wxUSE_STL_BASED_WXSTRING + // check string's data validity + bool IsValid() const { return m_impl.GetStringData()->IsValid(); } +#endif + +private: + wxStringImpl m_impl; + + // buffers for compatibility conversion from (char*)c_str() and + // (wchar_t*)c_str(): the pointers returned by these functions should remain + // valid until the string itself is modified for compatibility with the + // existing code and consistency with std::string::c_str() so returning a + // temporary buffer won't do and we need to cache the conversion results + + // TODO-UTF8: benchmark various approaches to keeping compatibility buffers + template<typename T> + struct ConvertedBuffer + { + // notice that there is no need to initialize m_len here as it's unused + // as long as m_str is NULL + ConvertedBuffer() : m_str(NULL) {} + ~ConvertedBuffer() + { free(m_str); } + + bool Extend(size_t len) + { + // add extra 1 for the trailing NUL + void * const str = realloc(m_str, sizeof(T)*(len + 1)); + if ( !str ) + return false; + + m_str = static_cast<T *>(str); + m_len = len; + + return true; + } + + const wxScopedCharTypeBuffer<T> AsScopedBuffer() const + { + return wxScopedCharTypeBuffer<T>::CreateNonOwned(m_str, m_len); + } + + T *m_str; // pointer to the string data + size_t m_len; // length, not size, i.e. in chars and without last NUL + }; + + +#if wxUSE_UNICODE + // common mb_str() and wxCStrData::AsChar() helper: performs the conversion + // and returns either m_convertedToChar.m_str (in which case its m_len is + // also updated) or NULL if it failed + // + // there is an important exception: in wxUSE_UNICODE_UTF8 build if conv is a + // UTF-8 one, we return m_impl.c_str() directly, without doing any conversion + // as optimization and so the caller needs to check for this before using + // m_convertedToChar + // + // NB: AsChar() returns char* in any build, unlike mb_str() + const char *AsChar(const wxMBConv& conv) const; + + // mb_str() implementation helper + wxScopedCharBuffer AsCharBuf(const wxMBConv& conv) const + { +#if wxUSE_UNICODE_UTF8 + // avoid conversion if we can + if ( conv.IsUTF8() ) + { + return wxScopedCharBuffer::CreateNonOwned(m_impl.c_str(), + m_impl.length()); + } +#endif // wxUSE_UNICODE_UTF8 + + // call this solely in order to fill in m_convertedToChar as AsChar() + // updates it as a side effect: this is a bit ugly but it's a completely + // internal function so the users of this class shouldn't care or know + // about it and doing it like this, i.e. having a separate AsChar(), + // allows us to avoid the creation and destruction of a temporary buffer + // when using wxCStrData without duplicating any code + if ( !AsChar(conv) ) + { + // although it would be probably more correct to return NULL buffer + // from here if the conversion fails, a lot of existing code doesn't + // expect mb_str() (or wc_str()) to ever return NULL so return an + // empty string otherwise to avoid crashes in it + // + // also, some existing code does check for the conversion success and + // so asserting here would be bad too -- even if it does mean that + // silently losing data is possible for badly written code + return wxScopedCharBuffer::CreateNonOwned("", 0); + } + + return m_convertedToChar.AsScopedBuffer(); + } + + ConvertedBuffer<char> m_convertedToChar; +#endif // !wxUSE_UNICODE + +#if !wxUSE_UNICODE_WCHAR + // common wc_str() and wxCStrData::AsWChar() helper for both UTF-8 and ANSI + // builds: converts the string contents into m_convertedToWChar and returns + // NULL if the conversion failed (this can only happen in ANSI build) + // + // NB: AsWChar() returns wchar_t* in any build, unlike wc_str() + const wchar_t *AsWChar(const wxMBConv& conv) const; + + // wc_str() implementation helper + wxScopedWCharBuffer AsWCharBuf(const wxMBConv& conv) const + { + if ( !AsWChar(conv) ) + return wxScopedWCharBuffer::CreateNonOwned(L"", 0); + + return m_convertedToWChar.AsScopedBuffer(); + } + + ConvertedBuffer<wchar_t> m_convertedToWChar; +#endif // !wxUSE_UNICODE_WCHAR + +#if wxUSE_UNICODE_UTF8 + // FIXME-UTF8: (try to) move this elsewhere (TLS) or solve differently + // assigning to character pointer to by wxString::iterator may + // change the underlying wxStringImpl iterator, so we have to + // keep track of all iterators and update them as necessary: + struct wxStringIteratorNodeHead + { + wxStringIteratorNodeHead() : ptr(NULL) {} + wxStringIteratorNode *ptr; + + // copying is disallowed as it would result in more than one pointer into + // the same linked list + wxDECLARE_NO_COPY_CLASS(wxStringIteratorNodeHead); + }; + + wxStringIteratorNodeHead m_iterators; + + friend class WXDLLIMPEXP_FWD_BASE wxStringIteratorNode; + friend class WXDLLIMPEXP_FWD_BASE wxUniCharRef; +#endif // wxUSE_UNICODE_UTF8 + + friend class WXDLLIMPEXP_FWD_BASE wxCStrData; + friend class wxStringInternalBuffer; + friend class wxStringInternalBufferLength; +}; + +#ifdef wxNEEDS_WXSTRING_PRINTF_MIXIN + #pragma warning (pop) +#endif + +// string iterator operators that satisfy STL Random Access Iterator +// requirements: +inline wxString::iterator operator+(ptrdiff_t n, wxString::iterator i) + { return i + n; } +inline wxString::const_iterator operator+(ptrdiff_t n, wxString::const_iterator i) + { return i + n; } +inline wxString::reverse_iterator operator+(ptrdiff_t n, wxString::reverse_iterator i) + { return i + n; } +inline wxString::const_reverse_iterator operator+(ptrdiff_t n, wxString::const_reverse_iterator i) + { return i + n; } + +// notice that even though for many compilers the friend declarations above are +// enough, from the point of view of C++ standard we must have the declarations +// here as friend ones are not injected in the enclosing namespace and without +// them the code fails to compile with conforming compilers such as xlC or g++4 +wxString WXDLLIMPEXP_BASE operator+(const wxString& string1, const wxString& string2); +wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const char *psz); +wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const wchar_t *pwz); +wxString WXDLLIMPEXP_BASE operator+(const char *psz, const wxString& string); +wxString WXDLLIMPEXP_BASE operator+(const wchar_t *pwz, const wxString& string); + +wxString WXDLLIMPEXP_BASE operator+(const wxString& string, wxUniChar ch); +wxString WXDLLIMPEXP_BASE operator+(wxUniChar ch, const wxString& string); + +inline wxString operator+(const wxString& string, wxUniCharRef ch) + { return string + (wxUniChar)ch; } +inline wxString operator+(const wxString& string, char ch) + { return string + wxUniChar(ch); } +inline wxString operator+(const wxString& string, wchar_t ch) + { return string + wxUniChar(ch); } +inline wxString operator+(wxUniCharRef ch, const wxString& string) + { return (wxUniChar)ch + string; } +inline wxString operator+(char ch, const wxString& string) + { return wxUniChar(ch) + string; } +inline wxString operator+(wchar_t ch, const wxString& string) + { return wxUniChar(ch) + string; } + + +#define wxGetEmptyString() wxString() + +// ---------------------------------------------------------------------------- +// helper functions which couldn't be defined inline +// ---------------------------------------------------------------------------- + +namespace wxPrivate +{ + +#if wxUSE_UNICODE_WCHAR + +template <> +struct wxStringAsBufHelper<char> +{ + static wxScopedCharBuffer Get(const wxString& s, size_t *len) + { + wxScopedCharBuffer buf(s.mb_str()); + if ( len ) + *len = buf ? strlen(buf) : 0; + return buf; + } +}; + +template <> +struct wxStringAsBufHelper<wchar_t> +{ + static wxScopedWCharBuffer Get(const wxString& s, size_t *len) + { + const size_t length = s.length(); + if ( len ) + *len = length; + return wxScopedWCharBuffer::CreateNonOwned(s.wx_str(), length); + } +}; + +#elif wxUSE_UNICODE_UTF8 + +template <> +struct wxStringAsBufHelper<char> +{ + static wxScopedCharBuffer Get(const wxString& s, size_t *len) + { + const size_t length = s.utf8_length(); + if ( len ) + *len = length; + return wxScopedCharBuffer::CreateNonOwned(s.wx_str(), length); + } +}; + +template <> +struct wxStringAsBufHelper<wchar_t> +{ + static wxScopedWCharBuffer Get(const wxString& s, size_t *len) + { + wxScopedWCharBuffer wbuf(s.wc_str()); + if ( len ) + *len = wxWcslen(wbuf); + return wbuf; + } +}; + +#endif // Unicode build kind + +} // namespace wxPrivate + +// ---------------------------------------------------------------------------- +// wxStringBuffer: a tiny class allowing to get a writable pointer into string +// ---------------------------------------------------------------------------- + +#if !wxUSE_STL_BASED_WXSTRING +// string buffer for direct access to string data in their native +// representation: +class wxStringInternalBuffer +{ +public: + typedef wxStringCharType CharType; + + wxStringInternalBuffer(wxString& str, size_t lenWanted = 1024) + : m_str(str), m_buf(NULL) + { m_buf = m_str.DoGetWriteBuf(lenWanted); } + + ~wxStringInternalBuffer() { m_str.DoUngetWriteBuf(); } + + operator wxStringCharType*() const { return m_buf; } + +private: + wxString& m_str; + wxStringCharType *m_buf; + + wxDECLARE_NO_COPY_CLASS(wxStringInternalBuffer); +}; + +class wxStringInternalBufferLength +{ +public: + typedef wxStringCharType CharType; + + wxStringInternalBufferLength(wxString& str, size_t lenWanted = 1024) + : m_str(str), m_buf(NULL), m_len(0), m_lenSet(false) + { + m_buf = m_str.DoGetWriteBuf(lenWanted); + wxASSERT(m_buf != NULL); + } + + ~wxStringInternalBufferLength() + { + wxASSERT(m_lenSet); + m_str.DoUngetWriteBuf(m_len); + } + + operator wxStringCharType*() const { return m_buf; } + void SetLength(size_t length) { m_len = length; m_lenSet = true; } + +private: + wxString& m_str; + wxStringCharType *m_buf; + size_t m_len; + bool m_lenSet; + + wxDECLARE_NO_COPY_CLASS(wxStringInternalBufferLength); +}; + +#endif // !wxUSE_STL_BASED_WXSTRING + +template<typename T> +class wxStringTypeBufferBase +{ +public: + typedef T CharType; + + wxStringTypeBufferBase(wxString& str, size_t lenWanted = 1024) + : m_str(str), m_buf(lenWanted) + { + // for compatibility with old wxStringBuffer which provided direct + // access to wxString internal buffer, initialize ourselves with the + // string initial contents + + // FIXME-VC6: remove the ugly (CharType *)NULL and use normal + // tchar_str<CharType> + size_t len; + const wxCharTypeBuffer<CharType> buf(str.tchar_str(&len, (CharType *)NULL)); + if ( buf ) + { + if ( len > lenWanted ) + { + // in this case there is not enough space for terminating NUL, + // ensure that we still put it there + m_buf.data()[lenWanted] = 0; + len = lenWanted - 1; + } + + memcpy(m_buf.data(), buf, (len + 1)*sizeof(CharType)); + } + //else: conversion failed, this can happen when trying to get Unicode + // string contents into a char string + } + + operator CharType*() { return m_buf.data(); } + +protected: + wxString& m_str; + wxCharTypeBuffer<CharType> m_buf; +}; + +template<typename T> +class wxStringTypeBufferLengthBase : public wxStringTypeBufferBase<T> +{ +public: + wxStringTypeBufferLengthBase(wxString& str, size_t lenWanted = 1024) + : wxStringTypeBufferBase<T>(str, lenWanted), + m_len(0), + m_lenSet(false) + { } + + ~wxStringTypeBufferLengthBase() + { + wxASSERT_MSG( this->m_lenSet, "forgot to call SetLength()" ); + } + + void SetLength(size_t length) { m_len = length; m_lenSet = true; } + +protected: + size_t m_len; + bool m_lenSet; +}; + +template<typename T> +class wxStringTypeBuffer : public wxStringTypeBufferBase<T> +{ +public: + wxStringTypeBuffer(wxString& str, size_t lenWanted = 1024) + : wxStringTypeBufferBase<T>(str, lenWanted) + { } + + ~wxStringTypeBuffer() + { + this->m_str.assign(this->m_buf.data()); + } + + wxDECLARE_NO_COPY_CLASS(wxStringTypeBuffer); +}; + +template<typename T> +class wxStringTypeBufferLength : public wxStringTypeBufferLengthBase<T> +{ +public: + wxStringTypeBufferLength(wxString& str, size_t lenWanted = 1024) + : wxStringTypeBufferLengthBase<T>(str, lenWanted) + { } + + ~wxStringTypeBufferLength() + { + this->m_str.assign(this->m_buf.data(), this->m_len); + } + + wxDECLARE_NO_COPY_CLASS(wxStringTypeBufferLength); +}; + +#if wxUSE_STL_BASED_WXSTRING + +WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxStringTypeBufferBase<wxStringCharType> ) + +class wxStringInternalBuffer : public wxStringTypeBufferBase<wxStringCharType> +{ +public: + wxStringInternalBuffer(wxString& str, size_t lenWanted = 1024) + : wxStringTypeBufferBase<wxStringCharType>(str, lenWanted) {} + ~wxStringInternalBuffer() + { m_str.m_impl.assign(m_buf.data()); } + + wxDECLARE_NO_COPY_CLASS(wxStringInternalBuffer); +}; + +WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( + wxStringTypeBufferLengthBase<wxStringCharType> ) + +class wxStringInternalBufferLength + : public wxStringTypeBufferLengthBase<wxStringCharType> +{ +public: + wxStringInternalBufferLength(wxString& str, size_t lenWanted = 1024) + : wxStringTypeBufferLengthBase<wxStringCharType>(str, lenWanted) {} + + ~wxStringInternalBufferLength() + { + m_str.m_impl.assign(m_buf.data(), m_len); + } + + wxDECLARE_NO_COPY_CLASS(wxStringInternalBufferLength); +}; + +#endif // wxUSE_STL_BASED_WXSTRING + + +#if wxUSE_STL_BASED_WXSTRING || wxUSE_UNICODE_UTF8 +typedef wxStringTypeBuffer<wxChar> wxStringBuffer; +typedef wxStringTypeBufferLength<wxChar> wxStringBufferLength; +#else // if !wxUSE_STL_BASED_WXSTRING && !wxUSE_UNICODE_UTF8 +typedef wxStringInternalBuffer wxStringBuffer; +typedef wxStringInternalBufferLength wxStringBufferLength; +#endif // !wxUSE_STL_BASED_WXSTRING && !wxUSE_UNICODE_UTF8 + +#if wxUSE_UNICODE_UTF8 +typedef wxStringInternalBuffer wxUTF8StringBuffer; +typedef wxStringInternalBufferLength wxUTF8StringBufferLength; +#elif wxUSE_UNICODE_WCHAR + +WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxStringTypeBufferBase<char> ) + +// Note about inlined dtors in the classes below: this is done not for +// performance reasons but just to avoid linking errors in the MSVC DLL build +// under Windows: if a class has non-inline methods it must be declared as +// being DLL-exported but, due to an extremely interesting feature of MSVC 7 +// and later, any template class which is used as a base of a DLL-exported +// class is implicitly made DLL-exported too, as explained at the bottom of +// http://msdn.microsoft.com/en-us/library/twa2aw10.aspx (just to confirm: yes, +// _inheriting_ from a class can change whether it is being exported from DLL) +// +// But this results in link errors because the base template class is not DLL- +// exported, whether it is declared with WXDLLIMPEXP_BASE or not, because it +// does have only inline functions. So the simplest fix is to just make all the +// functions of these classes inline too. + +class wxUTF8StringBuffer : public wxStringTypeBufferBase<char> +{ +public: + wxUTF8StringBuffer(wxString& str, size_t lenWanted = 1024) + : wxStringTypeBufferBase<char>(str, lenWanted) {} + ~wxUTF8StringBuffer() + { + wxMBConvStrictUTF8 conv; + size_t wlen = conv.ToWChar(NULL, 0, m_buf); + wxCHECK_RET( wlen != wxCONV_FAILED, "invalid UTF-8 data in string buffer?" ); + + wxStringInternalBuffer wbuf(m_str, wlen); + conv.ToWChar(wbuf, wlen, m_buf); + } + + wxDECLARE_NO_COPY_CLASS(wxUTF8StringBuffer); +}; + +WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxStringTypeBufferLengthBase<char> ) + +class wxUTF8StringBufferLength : public wxStringTypeBufferLengthBase<char> +{ +public: + wxUTF8StringBufferLength(wxString& str, size_t lenWanted = 1024) + : wxStringTypeBufferLengthBase<char>(str, lenWanted) {} + ~wxUTF8StringBufferLength() + { + wxCHECK_RET(m_lenSet, "length not set"); + + wxMBConvStrictUTF8 conv; + size_t wlen = conv.ToWChar(NULL, 0, m_buf, m_len); + wxCHECK_RET( wlen != wxCONV_FAILED, "invalid UTF-8 data in string buffer?" ); + + wxStringInternalBufferLength wbuf(m_str, wlen); + conv.ToWChar(wbuf, wlen, m_buf, m_len); + wbuf.SetLength(wlen); + } + + wxDECLARE_NO_COPY_CLASS(wxUTF8StringBufferLength); +}; +#endif // wxUSE_UNICODE_UTF8/wxUSE_UNICODE_WCHAR + + +// --------------------------------------------------------------------------- +// wxString comparison functions: operator versions are always case sensitive +// --------------------------------------------------------------------------- + +#define wxCMP_WXCHAR_STRING(p, s, op) 0 op s.Cmp(p) + +wxDEFINE_ALL_COMPARISONS(const wxChar *, const wxString&, wxCMP_WXCHAR_STRING) + +#undef wxCMP_WXCHAR_STRING + +inline bool operator==(const wxString& s1, const wxString& s2) + { return s1.IsSameAs(s2); } +inline bool operator!=(const wxString& s1, const wxString& s2) + { return !s1.IsSameAs(s2); } +inline bool operator< (const wxString& s1, const wxString& s2) + { return s1.Cmp(s2) < 0; } +inline bool operator> (const wxString& s1, const wxString& s2) + { return s1.Cmp(s2) > 0; } +inline bool operator<=(const wxString& s1, const wxString& s2) + { return s1.Cmp(s2) <= 0; } +inline bool operator>=(const wxString& s1, const wxString& s2) + { return s1.Cmp(s2) >= 0; } + +inline bool operator==(const wxString& s1, const wxCStrData& s2) + { return s1 == s2.AsString(); } +inline bool operator==(const wxCStrData& s1, const wxString& s2) + { return s1.AsString() == s2; } +inline bool operator!=(const wxString& s1, const wxCStrData& s2) + { return s1 != s2.AsString(); } +inline bool operator!=(const wxCStrData& s1, const wxString& s2) + { return s1.AsString() != s2; } + +inline bool operator==(const wxString& s1, const wxScopedWCharBuffer& s2) + { return (s1.Cmp((const wchar_t *)s2) == 0); } +inline bool operator==(const wxScopedWCharBuffer& s1, const wxString& s2) + { return (s2.Cmp((const wchar_t *)s1) == 0); } +inline bool operator!=(const wxString& s1, const wxScopedWCharBuffer& s2) + { return (s1.Cmp((const wchar_t *)s2) != 0); } +inline bool operator!=(const wxScopedWCharBuffer& s1, const wxString& s2) + { return (s2.Cmp((const wchar_t *)s1) != 0); } + +inline bool operator==(const wxString& s1, const wxScopedCharBuffer& s2) + { return (s1.Cmp((const char *)s2) == 0); } +inline bool operator==(const wxScopedCharBuffer& s1, const wxString& s2) + { return (s2.Cmp((const char *)s1) == 0); } +inline bool operator!=(const wxString& s1, const wxScopedCharBuffer& s2) + { return (s1.Cmp((const char *)s2) != 0); } +inline bool operator!=(const wxScopedCharBuffer& s1, const wxString& s2) + { return (s2.Cmp((const char *)s1) != 0); } + +inline wxString operator+(const wxString& string, const wxScopedWCharBuffer& buf) + { return string + (const wchar_t *)buf; } +inline wxString operator+(const wxScopedWCharBuffer& buf, const wxString& string) + { return (const wchar_t *)buf + string; } + +inline wxString operator+(const wxString& string, const wxScopedCharBuffer& buf) + { return string + (const char *)buf; } +inline wxString operator+(const wxScopedCharBuffer& buf, const wxString& string) + { return (const char *)buf + string; } + +// comparison with char +inline bool operator==(const wxUniChar& c, const wxString& s) { return s.IsSameAs(c); } +inline bool operator==(const wxUniCharRef& c, const wxString& s) { return s.IsSameAs(c); } +inline bool operator==(char c, const wxString& s) { return s.IsSameAs(c); } +inline bool operator==(wchar_t c, const wxString& s) { return s.IsSameAs(c); } +inline bool operator==(int c, const wxString& s) { return s.IsSameAs(c); } +inline bool operator==(const wxString& s, const wxUniChar& c) { return s.IsSameAs(c); } +inline bool operator==(const wxString& s, const wxUniCharRef& c) { return s.IsSameAs(c); } +inline bool operator==(const wxString& s, char c) { return s.IsSameAs(c); } +inline bool operator==(const wxString& s, wchar_t c) { return s.IsSameAs(c); } +inline bool operator!=(const wxUniChar& c, const wxString& s) { return !s.IsSameAs(c); } +inline bool operator!=(const wxUniCharRef& c, const wxString& s) { return !s.IsSameAs(c); } +inline bool operator!=(char c, const wxString& s) { return !s.IsSameAs(c); } +inline bool operator!=(wchar_t c, const wxString& s) { return !s.IsSameAs(c); } +inline bool operator!=(int c, const wxString& s) { return !s.IsSameAs(c); } +inline bool operator!=(const wxString& s, const wxUniChar& c) { return !s.IsSameAs(c); } +inline bool operator!=(const wxString& s, const wxUniCharRef& c) { return !s.IsSameAs(c); } +inline bool operator!=(const wxString& s, char c) { return !s.IsSameAs(c); } +inline bool operator!=(const wxString& s, wchar_t c) { return !s.IsSameAs(c); } + + +// wxString iterators comparisons +inline bool wxString::iterator::operator==(const const_iterator& i) const + { return i == *this; } +inline bool wxString::iterator::operator!=(const const_iterator& i) const + { return i != *this; } +inline bool wxString::iterator::operator<(const const_iterator& i) const + { return i > *this; } +inline bool wxString::iterator::operator>(const const_iterator& i) const + { return i < *this; } +inline bool wxString::iterator::operator<=(const const_iterator& i) const + { return i >= *this; } +inline bool wxString::iterator::operator>=(const const_iterator& i) const + { return i <= *this; } + +// comparison with C string in Unicode build +#if wxUSE_UNICODE + +#define wxCMP_CHAR_STRING(p, s, op) wxString(p) op s + +wxDEFINE_ALL_COMPARISONS(const char *, const wxString&, wxCMP_CHAR_STRING) + +#undef wxCMP_CHAR_STRING + +#endif // wxUSE_UNICODE + +// we also need to provide the operators for comparison with wxCStrData to +// resolve ambiguity between operator(const wxChar *,const wxString &) and +// operator(const wxChar *, const wxChar *) for "p == s.c_str()" +// +// notice that these are (shallow) pointer comparisons, not (deep) string ones +#define wxCMP_CHAR_CSTRDATA(p, s, op) p op s.AsChar() +#define wxCMP_WCHAR_CSTRDATA(p, s, op) p op s.AsWChar() + +wxDEFINE_ALL_COMPARISONS(const wchar_t *, const wxCStrData&, wxCMP_WCHAR_CSTRDATA) +wxDEFINE_ALL_COMPARISONS(const char *, const wxCStrData&, wxCMP_CHAR_CSTRDATA) + +#undef wxCMP_CHAR_CSTRDATA +#undef wxCMP_WCHAR_CSTRDATA + +// --------------------------------------------------------------------------- +// Implementation only from here until the end of file +// --------------------------------------------------------------------------- + +#if wxUSE_STD_IOSTREAM + +#include "wx/iosfwrap.h" + +WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxString&); +WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxCStrData&); +WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxScopedCharBuffer&); +#ifndef __BORLANDC__ +WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxScopedWCharBuffer&); +#endif + +#if wxUSE_UNICODE && defined(HAVE_WOSTREAM) + +WXDLLIMPEXP_BASE wxSTD wostream& operator<<(wxSTD wostream&, const wxString&); +WXDLLIMPEXP_BASE wxSTD wostream& operator<<(wxSTD wostream&, const wxCStrData&); +WXDLLIMPEXP_BASE wxSTD wostream& operator<<(wxSTD wostream&, const wxScopedWCharBuffer&); + +#endif // wxUSE_UNICODE && defined(HAVE_WOSTREAM) + +#endif // wxUSE_STD_IOSTREAM + +// --------------------------------------------------------------------------- +// wxCStrData implementation +// --------------------------------------------------------------------------- + +inline wxCStrData::wxCStrData(char *buf) + : m_str(new wxString(buf)), m_offset(0), m_owned(true) {} +inline wxCStrData::wxCStrData(wchar_t *buf) + : m_str(new wxString(buf)), m_offset(0), m_owned(true) {} + +inline wxCStrData::wxCStrData(const wxCStrData& data) + : m_str(data.m_owned ? new wxString(*data.m_str) : data.m_str), + m_offset(data.m_offset), + m_owned(data.m_owned) +{ +} + +inline wxCStrData::~wxCStrData() +{ + if ( m_owned ) + delete const_cast<wxString*>(m_str); // cast to silence warnings +} + +// AsChar() and AsWChar() implementations simply forward to wxString methods + +inline const wchar_t* wxCStrData::AsWChar() const +{ + const wchar_t * const p = +#if wxUSE_UNICODE_WCHAR + m_str->wc_str(); +#elif wxUSE_UNICODE_UTF8 + m_str->AsWChar(wxMBConvStrictUTF8()); +#else + m_str->AsWChar(wxConvLibc); +#endif + + // in Unicode build the string always has a valid Unicode representation + // and even if a conversion is needed (as in UTF8 case) it can't fail + // + // but in ANSI build the string contents might be not convertible to + // Unicode using the current locale encoding so we do need to check for + // errors +#if !wxUSE_UNICODE + if ( !p ) + { + // if conversion fails, return empty string and not NULL to avoid + // crashes in code written with either wxWidgets 2 wxString or + // std::string behaviour in mind: neither of them ever returns NULL + // from its c_str() and so we shouldn't neither + // + // notice that the same is done in AsChar() below and + // wxString::wc_str() and mb_str() for the same reasons + return L""; + } +#endif // !wxUSE_UNICODE + + return p + m_offset; +} + +inline const char* wxCStrData::AsChar() const +{ +#if wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY + const char * const p = m_str->AsChar(wxConvLibc); + if ( !p ) + return ""; +#else // !wxUSE_UNICODE || wxUSE_UTF8_LOCALE_ONLY + const char * const p = m_str->mb_str(); +#endif // wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY + + return p + m_offset; +} + +inline wxString wxCStrData::AsString() const +{ + if ( m_offset == 0 ) + return *m_str; + else + return m_str->Mid(m_offset); +} + +inline const wxStringCharType *wxCStrData::AsInternal() const +{ +#if wxUSE_UNICODE_UTF8 + return wxStringOperations::AddToIter(m_str->wx_str(), m_offset); +#else + return m_str->wx_str() + m_offset; +#endif +} + +inline wxUniChar wxCStrData::operator*() const +{ + if ( m_str->empty() ) + return wxUniChar(wxT('\0')); + else + return (*m_str)[m_offset]; +} + +inline wxUniChar wxCStrData::operator[](size_t n) const +{ + // NB: we intentionally use operator[] and not at() here because the former + // works for the terminating NUL while the latter does not + return (*m_str)[m_offset + n]; +} + +// ---------------------------------------------------------------------------- +// more wxCStrData operators +// ---------------------------------------------------------------------------- + +// we need to define those to allow "size_t pos = p - s.c_str()" where p is +// some pointer into the string +inline size_t operator-(const char *p, const wxCStrData& cs) +{ + return p - cs.AsChar(); +} + +inline size_t operator-(const wchar_t *p, const wxCStrData& cs) +{ + return p - cs.AsWChar(); +} + +// ---------------------------------------------------------------------------- +// implementation of wx[W]CharBuffer inline methods using wxCStrData +// ---------------------------------------------------------------------------- + +// FIXME-UTF8: move this to buffer.h +inline wxCharBuffer::wxCharBuffer(const wxCStrData& cstr) + : wxCharTypeBufferBase(cstr.AsCharBuf()) +{ +} + +inline wxWCharBuffer::wxWCharBuffer(const wxCStrData& cstr) + : wxCharTypeBufferBase(cstr.AsWCharBuf()) +{ +} + +#if wxUSE_UNICODE_UTF8 +// ---------------------------------------------------------------------------- +// implementation of wxStringIteratorNode inline methods +// ---------------------------------------------------------------------------- + +void wxStringIteratorNode::DoSet(const wxString *str, + wxStringImpl::const_iterator *citer, + wxStringImpl::iterator *iter) +{ + m_prev = NULL; + m_iter = iter; + m_citer = citer; + m_str = str; + if ( str ) + { + m_next = str->m_iterators.ptr; + const_cast<wxString*>(m_str)->m_iterators.ptr = this; + if ( m_next ) + m_next->m_prev = this; + } + else + { + m_next = NULL; + } +} + +void wxStringIteratorNode::clear() +{ + if ( m_next ) + m_next->m_prev = m_prev; + if ( m_prev ) + m_prev->m_next = m_next; + else if ( m_str ) // first in the list + const_cast<wxString*>(m_str)->m_iterators.ptr = m_next; + + m_next = m_prev = NULL; + m_citer = NULL; + m_iter = NULL; + m_str = NULL; +} +#endif // wxUSE_UNICODE_UTF8 + +#if WXWIN_COMPATIBILITY_2_8 + // lot of code out there doesn't explicitly include wx/crt.h, but uses + // CRT wrappers that are now declared in wx/wxcrt.h and wx/wxcrtvararg.h, + // so let's include this header now that wxString is defined and it's safe + // to do it: + #include "wx/crt.h" +#endif + +// ---------------------------------------------------------------------------- +// Checks on wxString characters +// ---------------------------------------------------------------------------- + +template<bool (T)(const wxUniChar& c)> + inline bool wxStringCheck(const wxString& val) + { + for ( wxString::const_iterator i = val.begin(); + i != val.end(); + ++i ) + if (T(*i) == 0) + return false; + return true; + } + +#endif // _WX_WXSTRING_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stringimpl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stringimpl.h new file mode 100644 index 0000000000..50d4af9c64 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stringimpl.h @@ -0,0 +1,564 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/stringimpl.h +// Purpose: wxStringImpl class, implementation of wxString +// Author: Vadim Zeitlin +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +/* + This header implements std::string-like string class, wxStringImpl, that is + used by wxString to store the data. Alternatively, if wxUSE_STD_STRING=1, + wxStringImpl is just a typedef to std:: string class. +*/ + +#ifndef _WX_WXSTRINGIMPL_H__ +#define _WX_WXSTRINGIMPL_H__ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" // everybody should include this +#include "wx/chartype.h" // for wxChar +#include "wx/wxcrtbase.h" // for wxStrlen() etc. + +#include <stdlib.h> + +// --------------------------------------------------------------------------- +// macros +// --------------------------------------------------------------------------- + +// implementation only +#define wxASSERT_VALID_INDEX(i) \ + wxASSERT_MSG( (size_t)(i) <= length(), wxT("invalid index in wxString") ) + + +// ---------------------------------------------------------------------------- +// global data +// ---------------------------------------------------------------------------- + +// global pointer to empty string +extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxEmptyString; +#if wxUSE_UNICODE_UTF8 +// FIXME-UTF8: we should have only one wxEmptyString +extern WXDLLIMPEXP_DATA_BASE(const wxStringCharType*) wxEmptyStringImpl; +#endif + + +// ---------------------------------------------------------------------------- +// deal with various build options +// ---------------------------------------------------------------------------- + +// we use STL-based string internally if we use std::string at all now, there +// should be no reason to prefer our internal implement but if you really need +// it you can predefine wxUSE_STL_BASED_WXSTRING as 0 when building the library +#ifndef wxUSE_STL_BASED_WXSTRING + #define wxUSE_STL_BASED_WXSTRING wxUSE_STD_STRING +#endif + +// in both cases we need to define wxStdString +#if wxUSE_STL_BASED_WXSTRING || wxUSE_STD_STRING + +#include "wx/beforestd.h" +#include <string> +#include "wx/afterstd.h" + +#ifdef HAVE_STD_WSTRING + typedef std::wstring wxStdWideString; +#else + typedef std::basic_string<wchar_t> wxStdWideString; +#endif + +#if wxUSE_UNICODE_WCHAR + typedef wxStdWideString wxStdString; +#else + typedef std::string wxStdString; +#endif + +#endif // wxUSE_STL_BASED_WXSTRING || wxUSE_STD_STRING + + +#if wxUSE_STL_BASED_WXSTRING + + // we always want ctor from std::string when using std::string internally + #undef wxUSE_STD_STRING + #define wxUSE_STD_STRING 1 + + // the versions of std::string included with gcc 2.95 and VC6 (for which + // _MSC_VER == 1200) and eVC4 (_MSC_VER == 1201) lack clear() method + #if (defined(__GNUG__) && (__GNUG__ < 3)) || \ + !wxCHECK_VISUALC_VERSION(7) || defined(__EVC4__) + #define wxSTRING_BASE_HASNT_CLEAR + #endif + + typedef wxStdString wxStringImpl; +#else // if !wxUSE_STL_BASED_WXSTRING + +// in non-STL mode, compare() is implemented in wxString and not wxStringImpl +#undef HAVE_STD_STRING_COMPARE + +// --------------------------------------------------------------------------- +// string data prepended with some housekeeping info (used by wxString class), +// is never used directly (but had to be put here to allow inlining) +// --------------------------------------------------------------------------- + +struct WXDLLIMPEXP_BASE wxStringData +{ + int nRefs; // reference count + size_t nDataLength, // actual string length + nAllocLength; // allocated memory size + + // mimics declaration 'wxStringCharType data[nAllocLength]' + wxStringCharType* data() const { return (wxStringCharType*)(this + 1); } + + // empty string has a special ref count so it's never deleted + bool IsEmpty() const { return (nRefs == -1); } + bool IsShared() const { return (nRefs > 1); } + + // lock/unlock + void Lock() { if ( !IsEmpty() ) nRefs++; } + + // VC++ will refuse to inline Unlock but profiling shows that it is wrong +#if defined(__VISUALC__) && (__VISUALC__ >= 1200) + __forceinline +#endif + // VC++ free must take place in same DLL as allocation when using non dll + // run-time library (e.g. Multithreaded instead of Multithreaded DLL) +#if defined(__VISUALC__) && defined(_MT) && !defined(_DLL) + void Unlock() { if ( !IsEmpty() && --nRefs == 0) Free(); } + // we must not inline deallocation since allocation is not inlined + void Free(); +#else + void Unlock() { if ( !IsEmpty() && --nRefs == 0) free(this); } +#endif + + // if we had taken control over string memory (GetWriteBuf), it's + // intentionally put in invalid state + void Validate(bool b) { nRefs = (b ? 1 : 0); } + bool IsValid() const { return (nRefs != 0); } +}; + +class WXDLLIMPEXP_BASE wxStringImpl +{ +public: + // an 'invalid' value for string index, moved to this place due to a CW bug + static const size_t npos; + +protected: + // points to data preceded by wxStringData structure with ref count info + wxStringCharType *m_pchData; + + // accessor to string data + wxStringData* GetStringData() const { return (wxStringData*)m_pchData - 1; } + + // string (re)initialization functions + // initializes the string to the empty value (must be called only from + // ctors, use Reinit() otherwise) +#if wxUSE_UNICODE_UTF8 + void Init() { m_pchData = (wxStringCharType *)wxEmptyStringImpl; } // FIXME-UTF8 +#else + void Init() { m_pchData = (wxStringCharType *)wxEmptyString; } +#endif + // initializes the string with (a part of) C-string + void InitWith(const wxStringCharType *psz, size_t nPos = 0, size_t nLen = npos); + // as Init, but also frees old data + void Reinit() { GetStringData()->Unlock(); Init(); } + + // memory allocation + // allocates memory for string of length nLen + bool AllocBuffer(size_t nLen); + // effectively copies data to string + bool AssignCopy(size_t, const wxStringCharType *); + + // append a (sub)string + bool ConcatSelf(size_t nLen, const wxStringCharType *src, size_t nMaxLen); + bool ConcatSelf(size_t nLen, const wxStringCharType *src) + { return ConcatSelf(nLen, src, nLen); } + + // functions called before writing to the string: they copy it if there + // are other references to our data (should be the only owner when writing) + bool CopyBeforeWrite(); + bool AllocBeforeWrite(size_t); + + // compatibility with wxString + bool Alloc(size_t nLen); + +public: + // standard types + typedef wxStringCharType value_type; + typedef wxStringCharType char_type; + typedef size_t size_type; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef value_type* pointer; + typedef const value_type* const_pointer; + + // macro to define the bulk of iterator and const_iterator classes + #define WX_DEFINE_STRINGIMPL_ITERATOR(iterator_name, ref_type, ptr_type) \ + public: \ + typedef wxStringCharType value_type; \ + typedef ref_type reference; \ + typedef ptr_type pointer; \ + typedef int difference_type; \ + \ + iterator_name() : m_ptr(NULL) { } \ + iterator_name(pointer ptr) : m_ptr(ptr) { } \ + \ + reference operator*() const { return *m_ptr; } \ + \ + iterator_name& operator++() { m_ptr++; return *this; } \ + iterator_name operator++(int) \ + { \ + const iterator_name tmp(*this); \ + m_ptr++; \ + return tmp; \ + } \ + \ + iterator_name& operator--() { m_ptr--; return *this; } \ + iterator_name operator--(int) \ + { \ + const iterator_name tmp(*this); \ + m_ptr--; \ + return tmp; \ + } \ + \ + iterator_name operator+(ptrdiff_t n) const \ + { return iterator_name(m_ptr + n); } \ + iterator_name operator-(ptrdiff_t n) const \ + { return iterator_name(m_ptr - n); } \ + iterator_name& operator+=(ptrdiff_t n) \ + { m_ptr += n; return *this; } \ + iterator_name& operator-=(ptrdiff_t n) \ + { m_ptr -= n; return *this; } \ + \ + difference_type operator-(const iterator_name& i) const \ + { return m_ptr - i.m_ptr; } \ + \ + bool operator==(const iterator_name& i) const \ + { return m_ptr == i.m_ptr; } \ + bool operator!=(const iterator_name& i) const \ + { return m_ptr != i.m_ptr; } \ + \ + bool operator<(const iterator_name& i) const \ + { return m_ptr < i.m_ptr; } \ + bool operator>(const iterator_name& i) const \ + { return m_ptr > i.m_ptr; } \ + bool operator<=(const iterator_name& i) const \ + { return m_ptr <= i.m_ptr; } \ + bool operator>=(const iterator_name& i) const \ + { return m_ptr >= i.m_ptr; } \ + \ + private: \ + /* for wxStringImpl use only */ \ + pointer GetPtr() const { return m_ptr; } \ + \ + friend class wxStringImpl; \ + \ + pointer m_ptr + + // we need to declare const_iterator in wxStringImpl scope, the friend + // declaration inside iterator class itself is not enough, or at least not + // for g++ 3.4 (g++ 4 is ok) + class WXDLLIMPEXP_FWD_BASE const_iterator; + + class WXDLLIMPEXP_BASE iterator + { + WX_DEFINE_STRINGIMPL_ITERATOR(iterator, + wxStringCharType&, + wxStringCharType*); + + friend class const_iterator; + }; + + class WXDLLIMPEXP_BASE const_iterator + { + public: + const_iterator(iterator i) : m_ptr(i.m_ptr) { } + + WX_DEFINE_STRINGIMPL_ITERATOR(const_iterator, + const wxStringCharType&, + const wxStringCharType*); + }; + + #undef WX_DEFINE_STRINGIMPL_ITERATOR + + + // constructors and destructor + // ctor for an empty string + wxStringImpl() { Init(); } + // copy ctor + wxStringImpl(const wxStringImpl& stringSrc) + { + wxASSERT_MSG( stringSrc.GetStringData()->IsValid(), + wxT("did you forget to call UngetWriteBuf()?") ); + + if ( stringSrc.empty() ) { + // nothing to do for an empty string + Init(); + } + else { + m_pchData = stringSrc.m_pchData; // share same data + GetStringData()->Lock(); // => one more copy + } + } + // string containing nRepeat copies of ch + wxStringImpl(size_type nRepeat, wxStringCharType ch); + // ctor takes first nLength characters from C string + // (default value of npos means take all the string) + wxStringImpl(const wxStringCharType *psz) + { InitWith(psz, 0, npos); } + wxStringImpl(const wxStringCharType *psz, size_t nLength) + { InitWith(psz, 0, nLength); } + // take nLen chars starting at nPos + wxStringImpl(const wxStringImpl& str, size_t nPos, size_t nLen) + { + wxASSERT_MSG( str.GetStringData()->IsValid(), + wxT("did you forget to call UngetWriteBuf()?") ); + Init(); + size_t strLen = str.length() - nPos; nLen = strLen < nLen ? strLen : nLen; + InitWith(str.c_str(), nPos, nLen); + } + // take everything between start and end + wxStringImpl(const_iterator start, const_iterator end); + + + // ctor from and conversion to std::string +#if wxUSE_STD_STRING + wxStringImpl(const wxStdString& impl) + { InitWith(impl.c_str(), 0, impl.length()); } + + operator wxStdString() const + { return wxStdString(c_str(), length()); } +#endif + +#if defined(__VISUALC__) && (__VISUALC__ >= 1200) + // disable warning about Unlock() below not being inlined (first, it + // seems to be inlined nevertheless and second, even if it isn't, there + // is nothing we can do about this + #pragma warning(push) + #pragma warning (disable:4714) +#endif + + // dtor is not virtual, this class must not be inherited from! + ~wxStringImpl() + { + GetStringData()->Unlock(); + } + +#if defined(__VISUALC__) && (__VISUALC__ >= 1200) + #pragma warning(pop) +#endif + + // overloaded assignment + // from another wxString + wxStringImpl& operator=(const wxStringImpl& stringSrc); + // from a character + wxStringImpl& operator=(wxStringCharType ch); + // from a C string + wxStringImpl& operator=(const wxStringCharType *psz); + + // return the length of the string + size_type length() const { return GetStringData()->nDataLength; } + // return the length of the string + size_type size() const { return length(); } + // return the maximum size of the string + size_type max_size() const { return npos; } + // resize the string, filling the space with c if c != 0 + void resize(size_t nSize, wxStringCharType ch = '\0'); + // delete the contents of the string + void clear() { erase(0, npos); } + // returns true if the string is empty + bool empty() const { return length() == 0; } + // inform string about planned change in size + void reserve(size_t sz) { Alloc(sz); } + size_type capacity() const { return GetStringData()->nAllocLength; } + + // lib.string.access + // return the character at position n + value_type operator[](size_type n) const { return m_pchData[n]; } + value_type at(size_type n) const + { wxASSERT_VALID_INDEX( n ); return m_pchData[n]; } + // returns the writable character at position n + reference operator[](size_type n) { CopyBeforeWrite(); return m_pchData[n]; } + reference at(size_type n) + { + wxASSERT_VALID_INDEX( n ); + CopyBeforeWrite(); + return m_pchData[n]; + } // FIXME-UTF8: not useful for us...? + + // lib.string.modifiers + // append elements str[pos], ..., str[pos+n] + wxStringImpl& append(const wxStringImpl& str, size_t pos, size_t n) + { + wxASSERT(pos <= str.length()); + ConcatSelf(n, str.c_str() + pos, str.length() - pos); + return *this; + } + // append a string + wxStringImpl& append(const wxStringImpl& str) + { ConcatSelf(str.length(), str.c_str()); return *this; } + // append first n (or all if n == npos) characters of sz + wxStringImpl& append(const wxStringCharType *sz) + { ConcatSelf(wxStrlen(sz), sz); return *this; } + wxStringImpl& append(const wxStringCharType *sz, size_t n) + { ConcatSelf(n, sz); return *this; } + // append n copies of ch + wxStringImpl& append(size_t n, wxStringCharType ch); + // append from first to last + wxStringImpl& append(const_iterator first, const_iterator last) + { ConcatSelf(last - first, first.GetPtr()); return *this; } + + // same as `this_string = str' + wxStringImpl& assign(const wxStringImpl& str) + { return *this = str; } + // same as ` = str[pos..pos + n] + wxStringImpl& assign(const wxStringImpl& str, size_t pos, size_t n) + { return replace(0, npos, str, pos, n); } + // same as `= first n (or all if n == npos) characters of sz' + wxStringImpl& assign(const wxStringCharType *sz) + { return replace(0, npos, sz, wxStrlen(sz)); } + wxStringImpl& assign(const wxStringCharType *sz, size_t n) + { return replace(0, npos, sz, n); } + // same as `= n copies of ch' + wxStringImpl& assign(size_t n, wxStringCharType ch) + { return replace(0, npos, n, ch); } + // assign from first to last + wxStringImpl& assign(const_iterator first, const_iterator last) + { return replace(begin(), end(), first, last); } + + // first valid index position + const_iterator begin() const { return m_pchData; } + iterator begin(); + // position one after the last valid one + const_iterator end() const { return m_pchData + length(); } + iterator end(); + + // insert another string + wxStringImpl& insert(size_t nPos, const wxStringImpl& str) + { + wxASSERT( str.GetStringData()->IsValid() ); + return insert(nPos, str.c_str(), str.length()); + } + // insert n chars of str starting at nStart (in str) + wxStringImpl& insert(size_t nPos, const wxStringImpl& str, size_t nStart, size_t n) + { + wxASSERT( str.GetStringData()->IsValid() ); + wxASSERT( nStart < str.length() ); + size_t strLen = str.length() - nStart; + n = strLen < n ? strLen : n; + return insert(nPos, str.c_str() + nStart, n); + } + // insert first n (or all if n == npos) characters of sz + wxStringImpl& insert(size_t nPos, const wxStringCharType *sz, size_t n = npos); + // insert n copies of ch + wxStringImpl& insert(size_t nPos, size_t n, wxStringCharType ch) + { return insert(nPos, wxStringImpl(n, ch)); } + iterator insert(iterator it, wxStringCharType ch) + { size_t idx = it - begin(); insert(idx, 1, ch); return begin() + idx; } + void insert(iterator it, const_iterator first, const_iterator last) + { insert(it - begin(), first.GetPtr(), last - first); } + void insert(iterator it, size_type n, wxStringCharType ch) + { insert(it - begin(), n, ch); } + + // delete characters from nStart to nStart + nLen + wxStringImpl& erase(size_type pos = 0, size_type n = npos); + iterator erase(iterator first, iterator last) + { + size_t idx = first - begin(); + erase(idx, last - first); + return begin() + idx; + } + iterator erase(iterator first); + + // explicit conversion to C string (use this with printf()!) + const wxStringCharType* c_str() const { return m_pchData; } + const wxStringCharType* data() const { return m_pchData; } + + // replaces the substring of length nLen starting at nStart + wxStringImpl& replace(size_t nStart, size_t nLen, const wxStringCharType* sz) + { return replace(nStart, nLen, sz, npos); } + // replaces the substring of length nLen starting at nStart + wxStringImpl& replace(size_t nStart, size_t nLen, const wxStringImpl& str) + { return replace(nStart, nLen, str.c_str(), str.length()); } + // replaces the substring with nCount copies of ch + wxStringImpl& replace(size_t nStart, size_t nLen, + size_t nCount, wxStringCharType ch) + { return replace(nStart, nLen, wxStringImpl(nCount, ch)); } + // replaces a substring with another substring + wxStringImpl& replace(size_t nStart, size_t nLen, + const wxStringImpl& str, size_t nStart2, size_t nLen2) + { return replace(nStart, nLen, str.substr(nStart2, nLen2)); } + // replaces the substring with first nCount chars of sz + wxStringImpl& replace(size_t nStart, size_t nLen, + const wxStringCharType* sz, size_t nCount); + + wxStringImpl& replace(iterator first, iterator last, const_pointer s) + { return replace(first - begin(), last - first, s); } + wxStringImpl& replace(iterator first, iterator last, const_pointer s, + size_type n) + { return replace(first - begin(), last - first, s, n); } + wxStringImpl& replace(iterator first, iterator last, const wxStringImpl& s) + { return replace(first - begin(), last - first, s); } + wxStringImpl& replace(iterator first, iterator last, size_type n, wxStringCharType c) + { return replace(first - begin(), last - first, n, c); } + wxStringImpl& replace(iterator first, iterator last, + const_iterator first1, const_iterator last1) + { return replace(first - begin(), last - first, first1.GetPtr(), last1 - first1); } + + // swap two strings + void swap(wxStringImpl& str); + + // All find() functions take the nStart argument which specifies the + // position to start the search on, the default value is 0. All functions + // return npos if there were no match. + + // find a substring + size_t find(const wxStringImpl& str, size_t nStart = 0) const; + + // find first n characters of sz + size_t find(const wxStringCharType* sz, size_t nStart = 0, size_t n = npos) const; + + // find the first occurrence of character ch after nStart + size_t find(wxStringCharType ch, size_t nStart = 0) const; + + // rfind() family is exactly like find() but works right to left + + // as find, but from the end + size_t rfind(const wxStringImpl& str, size_t nStart = npos) const; + + // as find, but from the end + size_t rfind(const wxStringCharType* sz, size_t nStart = npos, + size_t n = npos) const; + // as find, but from the end + size_t rfind(wxStringCharType ch, size_t nStart = npos) const; + + size_type copy(wxStringCharType* s, size_type n, size_type pos = 0); + + // substring extraction + wxStringImpl substr(size_t nStart = 0, size_t nLen = npos) const; + + // string += string + wxStringImpl& operator+=(const wxStringImpl& s) { return append(s); } + // string += C string + wxStringImpl& operator+=(const wxStringCharType *psz) { return append(psz); } + // string += char + wxStringImpl& operator+=(wxStringCharType ch) { return append(1, ch); } + + // helpers for wxStringBuffer and wxStringBufferLength + wxStringCharType *DoGetWriteBuf(size_t nLen); + void DoUngetWriteBuf(); + void DoUngetWriteBuf(size_t nLen); + + friend class WXDLLIMPEXP_FWD_BASE wxString; +}; + +#endif // !wxUSE_STL_BASED_WXSTRING + +// don't pollute the library user's name space +#undef wxASSERT_VALID_INDEX + +#endif // _WX_WXSTRINGIMPL_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/stringops.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stringops.h new file mode 100644 index 0000000000..21c6121787 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/stringops.h @@ -0,0 +1,172 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/stringops.h +// Purpose: implementation of wxString primitive operations +// Author: Vaclav Slavik +// Modified by: +// Created: 2007-04-16 +// Copyright: (c) 2007 REA Elektronik GmbH +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WXSTRINGOPS_H__ +#define _WX_WXSTRINGOPS_H__ + +#include "wx/chartype.h" +#include "wx/stringimpl.h" +#include "wx/unichar.h" +#include "wx/buffer.h" + +// This header contains wxStringOperations "namespace" class that implements +// elementary operations on string data as static methods; wxString methods and +// iterators are implemented in terms of it. Two implementations are available, +// one for UTF-8 encoded char* string and one for "raw" wchar_t* strings (or +// char* in ANSI build). + +// FIXME-UTF8: only wchar after we remove ANSI build +#if wxUSE_UNICODE_WCHAR || !wxUSE_UNICODE +struct WXDLLIMPEXP_BASE wxStringOperationsWchar +{ + // moves the iterator to the next Unicode character + template <typename Iterator> + static void IncIter(Iterator& i) { ++i; } + + // moves the iterator to the previous Unicode character + template <typename Iterator> + static void DecIter(Iterator& i) { --i; } + + // moves the iterator by n Unicode characters + template <typename Iterator> + static Iterator AddToIter(const Iterator& i, ptrdiff_t n) + { return i + n; } + + // returns distance of the two iterators in Unicode characters + template <typename Iterator> + static ptrdiff_t DiffIters(const Iterator& i1, const Iterator& i2) + { return i1 - i2; } + + // encodes the character to a form used to represent it in internal + // representation (returns a string in UTF8 version) + static wxChar EncodeChar(const wxUniChar& ch) { return (wxChar)ch; } + + static wxUniChar DecodeChar(const wxStringImpl::const_iterator& i) + { return *i; } +}; +#endif // wxUSE_UNICODE_WCHAR || !wxUSE_UNICODE + + +#if wxUSE_UNICODE_UTF8 +struct WXDLLIMPEXP_BASE wxStringOperationsUtf8 +{ + // checks correctness of UTF-8 sequence + static bool IsValidUtf8String(const char *c, + size_t len = wxStringImpl::npos); + static bool IsValidUtf8LeadByte(unsigned char c) + { + return (c <= 0x7F) || (c >= 0xC2 && c <= 0xF4); + } + + // table of offsets to skip forward when iterating over UTF-8 sequence + static const unsigned char ms_utf8IterTable[256]; + + + template<typename Iterator> + static void IncIter(Iterator& i) + { + wxASSERT( IsValidUtf8LeadByte(*i) ); + i += ms_utf8IterTable[(unsigned char)*i]; + } + + template<typename Iterator> + static void DecIter(Iterator& i) + { + // Non-lead bytes are all in the 0x80..0xBF range (i.e. 10xxxxxx in + // binary), so we just have to go back until we hit a byte that is + // either < 0x80 (i.e. 0xxxxxxx in binary) or 0xC0..0xFF (11xxxxxx in + // binary; this includes some invalid values, but we can ignore it + // here, because we assume valid UTF-8 input for the purpose of + // efficient implementation). + --i; + while ( ((*i) & 0xC0) == 0x80 /* 2 highest bits are '10' */ ) + --i; + } + + template<typename Iterator> + static Iterator AddToIter(const Iterator& i, ptrdiff_t n) + { + Iterator out(i); + + if ( n > 0 ) + { + for ( ptrdiff_t j = 0; j < n; ++j ) + IncIter(out); + } + else if ( n < 0 ) + { + for ( ptrdiff_t j = 0; j > n; --j ) + DecIter(out); + } + + return out; + } + + template<typename Iterator> + static ptrdiff_t DiffIters(Iterator i1, Iterator i2) + { + ptrdiff_t dist = 0; + + if ( i1 < i2 ) + { + while ( i1 != i2 ) + { + IncIter(i1); + dist--; + } + } + else if ( i2 < i1 ) + { + while ( i2 != i1 ) + { + IncIter(i2); + dist++; + } + } + + return dist; + } + + // encodes the character as UTF-8: + typedef wxUniChar::Utf8CharBuffer Utf8CharBuffer; + static Utf8CharBuffer EncodeChar(const wxUniChar& ch) + { return ch.AsUTF8(); } + + // returns n copies of ch encoded in UTF-8 string + static wxCharBuffer EncodeNChars(size_t n, const wxUniChar& ch); + + // returns the length of UTF-8 encoding of the character with lead byte 'c' + static size_t GetUtf8CharLength(char c) + { + wxASSERT( IsValidUtf8LeadByte(c) ); + return ms_utf8IterTable[(unsigned char)c]; + } + + // decodes single UTF-8 character from UTF-8 string + static wxUniChar DecodeChar(wxStringImpl::const_iterator i) + { + if ( (unsigned char)*i < 0x80 ) + return (int)*i; + return DecodeNonAsciiChar(i); + } + +private: + static wxUniChar DecodeNonAsciiChar(wxStringImpl::const_iterator i); +}; +#endif // wxUSE_UNICODE_UTF8 + + +#if wxUSE_UNICODE_UTF8 +typedef wxStringOperationsUtf8 wxStringOperations; +#else +typedef wxStringOperationsWchar wxStringOperations; +#endif + +#endif // _WX_WXSTRINGOPS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/strvararg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/strvararg.h new file mode 100644 index 0000000000..b26a89f69c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/strvararg.h @@ -0,0 +1,1227 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/strvararg.h +// Purpose: macros for implementing type-safe vararg passing of strings +// Author: Vaclav Slavik +// Created: 2007-02-19 +// Copyright: (c) 2007 REA Elektronik GmbH +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STRVARARG_H_ +#define _WX_STRVARARG_H_ + +#include "wx/platform.h" +#if wxONLY_WATCOM_EARLIER_THAN(1,4) + #error "OpenWatcom version >= 1.4 is required to compile this code" +#endif + +#include "wx/cpp.h" +#include "wx/chartype.h" +#include "wx/strconv.h" +#include "wx/buffer.h" +#include "wx/unichar.h" + +#if defined(HAVE_TYPE_TRAITS) + #include <type_traits> +#elif defined(HAVE_TR1_TYPE_TRAITS) + #ifdef __VISUALC__ + #include <type_traits> + #else + #include <tr1/type_traits> + #endif +#endif + +class WXDLLIMPEXP_FWD_BASE wxCStrData; +class WXDLLIMPEXP_FWD_BASE wxString; + +// ---------------------------------------------------------------------------- +// WX_DEFINE_VARARG_FUNC* macros +// ---------------------------------------------------------------------------- + +// This macro is used to implement type-safe wrappers for variadic functions +// that accept strings as arguments. This makes it possible to pass char*, +// wchar_t* or even wxString (as opposed to having to use wxString::c_str()) +// to e.g. wxPrintf(). +// +// This is done by defining a set of N template function taking 1..N arguments +// (currently, N is set to 30 in this header). These functions are just thin +// wrappers around another variadic function ('impl' or 'implUtf8' arguments, +// see below) and the only thing the wrapper does is that it normalizes the +// arguments passed in so that they are of the type expected by variadic +// functions taking string arguments, i.e., char* or wchar_t*, depending on the +// build: +// * char* in the current locale's charset in ANSI build +// * char* with UTF-8 encoding if wxUSE_UNICODE_UTF8 and the app is running +// under an UTF-8 locale +// * wchar_t* if wxUSE_UNICODE_WCHAR or if wxUSE_UNICODE_UTF8 and the current +// locale is not UTF-8 +// +// Note that wxFormatString *must* be used for the format parameter of these +// functions, otherwise the implementation won't work correctly. Furthermore, +// it must be passed by value, not reference, because it's modified by the +// vararg templates internally. +// +// Parameters: +// [ there are examples in square brackets showing values of the parameters +// for the wxFprintf() wrapper for fprintf() function with the following +// prototype: +// int wxFprintf(FILE *stream, const wxString& format, ...); ] +// +// rettype Functions' return type [int] +// name Name of the function [fprintf] +// numfixed The number of leading "fixed" (i.e., not variadic) +// arguments of the function (e.g. "stream" and "format" +// arguments of fprintf()); their type is _not_ converted +// using wxArgNormalizer<T>, unlike the rest of +// the function's arguments [2] +// fixed List of types of the leading "fixed" arguments, in +// parenthesis [(FILE*,const wxString&)] +// impl Name of the variadic function that implements 'name' for +// the native strings representation (wchar_t* if +// wxUSE_UNICODE_WCHAR or wxUSE_UNICODE_UTF8 when running under +// non-UTF8 locale, char* in ANSI build) [wxCrt_Fprintf] +// implUtf8 Like 'impl', but for the UTF-8 char* version to be used +// if wxUSE_UNICODE_UTF8 and running under UTF-8 locale +// (ignored otherwise) [fprintf] +// +#define WX_DEFINE_VARARG_FUNC(rettype, name, numfixed, fixed, impl, implUtf8) \ + _WX_VARARG_DEFINE_FUNC_N0(rettype, name, impl, implUtf8, numfixed, fixed) \ + WX_DEFINE_VARARG_FUNC_SANS_N0(rettype, name, numfixed, fixed, impl, implUtf8) + +// ditto, but without the version with 0 template/vararg arguments +#define WX_DEFINE_VARARG_FUNC_SANS_N0(rettype, name, \ + numfixed, fixed, impl, implUtf8) \ + _WX_VARARG_ITER(_WX_VARARG_MAX_ARGS, \ + _WX_VARARG_DEFINE_FUNC, \ + rettype, name, impl, implUtf8, numfixed, fixed) + +// Like WX_DEFINE_VARARG_FUNC, but for variadic functions that don't return +// a value. +#define WX_DEFINE_VARARG_FUNC_VOID(name, numfixed, fixed, impl, implUtf8) \ + _WX_VARARG_DEFINE_FUNC_VOID_N0(name, impl, implUtf8, numfixed, fixed) \ + _WX_VARARG_ITER(_WX_VARARG_MAX_ARGS, \ + _WX_VARARG_DEFINE_FUNC_VOID, \ + void, name, impl, implUtf8, numfixed, fixed) + +// Like WX_DEFINE_VARARG_FUNC_VOID, but instead of wrapping an implementation +// function, does nothing in defined functions' bodies. +// +// Used to implement wxLogXXX functions if wxUSE_LOG=0. +#define WX_DEFINE_VARARG_FUNC_NOP(name, numfixed, fixed) \ + _WX_VARARG_DEFINE_FUNC_NOP_N0(name, numfixed, fixed) \ + _WX_VARARG_ITER(_WX_VARARG_MAX_ARGS, \ + _WX_VARARG_DEFINE_FUNC_NOP, \ + void, name, dummy, dummy, numfixed, fixed) + +// Like WX_DEFINE_VARARG_FUNC_CTOR, but for defining template constructors +#define WX_DEFINE_VARARG_FUNC_CTOR(name, numfixed, fixed, impl, implUtf8) \ + _WX_VARARG_DEFINE_FUNC_CTOR_N0(name, impl, implUtf8, numfixed, fixed) \ + _WX_VARARG_ITER(_WX_VARARG_MAX_ARGS, \ + _WX_VARARG_DEFINE_FUNC_CTOR, \ + void, name, impl, implUtf8, numfixed, fixed) + + +// ---------------------------------------------------------------------------- +// wxFormatString +// ---------------------------------------------------------------------------- + +// This class must be used for format string argument of the functions +// defined using WX_DEFINE_VARARG_FUNC_* macros. It converts the string to +// char* or wchar_t* for passing to implementation function efficiently (i.e. +// without keeping the converted string in memory for longer than necessary, +// like c_str()). It also converts format string to the correct form that +// accounts for string changes done by wxArgNormalizer<> +// +// Note that this class can _only_ be used for function arguments! +class WXDLLIMPEXP_BASE wxFormatString +{ +public: + wxFormatString(const char *str) + : m_char(wxScopedCharBuffer::CreateNonOwned(str)), m_str(NULL), m_cstr(NULL) {} + wxFormatString(const wchar_t *str) + : m_wchar(wxScopedWCharBuffer::CreateNonOwned(str)), m_str(NULL), m_cstr(NULL) {} + wxFormatString(const wxString& str) + : m_str(&str), m_cstr(NULL) {} + wxFormatString(const wxCStrData& str) + : m_str(NULL), m_cstr(&str) {} + wxFormatString(const wxScopedCharBuffer& str) + : m_char(str), m_str(NULL), m_cstr(NULL) {} + wxFormatString(const wxScopedWCharBuffer& str) + : m_wchar(str), m_str(NULL), m_cstr(NULL) {} + + // Possible argument types. These are or-combinable for wxASSERT_ARG_TYPE + // convenience. Some of the values are or-combined with another value, this + // expresses "supertypes" for use with wxASSERT_ARG_TYPE masks. For example, + // a char* string is also a pointer and an integer is also a char. + enum ArgumentType + { +#if wxABI_VERSION >= 30001 + Arg_Unused = 0, // not used at all; the value of 0 is chosen to + // conveniently pass wxASSERT_ARG_TYPE's check +#endif + + Arg_Char = 0x0001, // character as char %c + Arg_Pointer = 0x0002, // %p + Arg_String = 0x0004 | Arg_Pointer, // any form of string (%s and %p too) + + Arg_Int = 0x0008 | Arg_Char, // (ints can be used with %c) +#if SIZEOF_INT == SIZEOF_LONG + Arg_LongInt = Arg_Int, +#else + Arg_LongInt = 0x0010, +#endif +#if defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG == SIZEOF_LONG + Arg_LongLongInt = Arg_LongInt, +#elif defined(wxLongLong_t) + Arg_LongLongInt = 0x0020, +#endif + + Arg_Double = 0x0040, + Arg_LongDouble = 0x0080, + +#if defined(wxSIZE_T_IS_UINT) + Arg_Size_t = Arg_Int, +#elif defined(wxSIZE_T_IS_ULONG) + Arg_Size_t = Arg_LongInt, +#elif defined(SIZEOF_LONG_LONG) && SIZEOF_SIZE_T == SIZEOF_LONG_LONG + Arg_Size_t = Arg_LongLongInt, +#else + Arg_Size_t = 0x0100, +#endif + + Arg_IntPtr = 0x0200, // %n -- store # of chars written + Arg_ShortIntPtr = 0x0400, + Arg_LongIntPtr = 0x0800, + + Arg_Unknown = 0x8000 // unrecognized specifier (likely error) + }; + + // returns the type of format specifier for n-th variadic argument (this is + // not necessarily n-th format specifier if positional specifiers are used); + // called by wxArgNormalizer<> specializations to get information about + // n-th variadic argument desired representation + ArgumentType GetArgumentType(unsigned n) const; + + // returns the value passed to ctor, only converted to wxString, similarly + // to other InputAsXXX() methods + wxString InputAsString() const; + +#if !wxUSE_UNICODE_WCHAR + operator const char*() const + { return const_cast<wxFormatString*>(this)->AsChar(); } +private: + // InputAsChar() returns the value passed to ctor, only converted + // to char, while AsChar() takes the string returned by InputAsChar() + // and does format string conversion on it as well (and similarly for + // ..AsWChar() below) + const char* InputAsChar(); + const char* AsChar(); + wxScopedCharBuffer m_convertedChar; +#endif // !wxUSE_UNICODE_WCHAR + +#if wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY +public: + operator const wchar_t*() const + { return const_cast<wxFormatString*>(this)->AsWChar(); } +private: + const wchar_t* InputAsWChar(); + const wchar_t* AsWChar(); + wxScopedWCharBuffer m_convertedWChar; +#endif // wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY + +private: + wxScopedCharBuffer m_char; + wxScopedWCharBuffer m_wchar; + + // NB: we can use a pointer here, because wxFormatString is only used + // as function argument, so it has shorter life than the string + // passed to the ctor + const wxString * const m_str; + const wxCStrData * const m_cstr; + + wxDECLARE_NO_ASSIGN_CLASS(wxFormatString); +}; + +// these two helper classes are used to find wxFormatString argument among fixed +// arguments passed to a vararg template +struct wxFormatStringArgument +{ + wxFormatStringArgument(const wxFormatString *s = NULL) : m_str(s) {} + const wxFormatString *m_str; + + // overriding this operator allows us to reuse _WX_VARARG_JOIN macro + wxFormatStringArgument operator,(const wxFormatStringArgument& a) const + { + wxASSERT_MSG( m_str == NULL || a.m_str == NULL, + "can't have two format strings in vararg function" ); + return wxFormatStringArgument(m_str ? m_str : a.m_str); + } + + operator const wxFormatString*() const { return m_str; } +}; + +template<typename T> +struct wxFormatStringArgumentFinder +{ + static wxFormatStringArgument find(T) + { + // by default, arguments are not format strings, so return "not found" + return wxFormatStringArgument(); + } +}; + +template<> +struct wxFormatStringArgumentFinder<const wxFormatString&> +{ + static wxFormatStringArgument find(const wxFormatString& arg) + { return wxFormatStringArgument(&arg); } +}; + +template<> +struct wxFormatStringArgumentFinder<wxFormatString> + : public wxFormatStringArgumentFinder<const wxFormatString&> {}; + +// avoid passing big objects by value to wxFormatStringArgumentFinder::find() +// (and especially wx[W]CharBuffer with its auto_ptr<> style semantics!): +template<> +struct wxFormatStringArgumentFinder<wxString> + : public wxFormatStringArgumentFinder<const wxString&> {}; + +template<> +struct wxFormatStringArgumentFinder<wxScopedCharBuffer> + : public wxFormatStringArgumentFinder<const wxScopedCharBuffer&> {}; + +template<> +struct wxFormatStringArgumentFinder<wxScopedWCharBuffer> + : public wxFormatStringArgumentFinder<const wxScopedWCharBuffer&> {}; + +template<> +struct wxFormatStringArgumentFinder<wxCharBuffer> + : public wxFormatStringArgumentFinder<const wxCharBuffer&> {}; + +template<> +struct wxFormatStringArgumentFinder<wxWCharBuffer> + : public wxFormatStringArgumentFinder<const wxWCharBuffer&> {}; + + +// ---------------------------------------------------------------------------- +// wxArgNormalizer*<T> converters +// ---------------------------------------------------------------------------- + +#if wxDEBUG_LEVEL + // Check that the format specifier for index-th argument in 'fmt' has + // the correct type (one of wxFormatString::Arg_XXX or-combination in + // 'expected_mask'). + #define wxASSERT_ARG_TYPE(fmt, index, expected_mask) \ + wxSTATEMENT_MACRO_BEGIN \ + if ( !fmt ) \ + break; \ + const int argtype = fmt->GetArgumentType(index); \ + wxASSERT_MSG( (argtype & (expected_mask)) == argtype, \ + "format specifier doesn't match argument type" ); \ + wxSTATEMENT_MACRO_END +#else + // Just define it to suppress "unused parameter" warnings for the + // parameters which we don't use otherwise + #define wxASSERT_ARG_TYPE(fmt, index, expected_mask) \ + wxUnusedVar(fmt); \ + wxUnusedVar(index) +#endif // wxDEBUG_LEVEL/!wxDEBUG_LEVEL + + +#if defined(HAVE_TYPE_TRAITS) || defined(HAVE_TR1_TYPE_TRAITS) + +// Note: this type is misnamed, so that the error message is easier to +// understand (no error happens for enums, because the IsEnum=true case is +// specialized). +template<bool IsEnum> +struct wxFormatStringSpecifierNonPodType {}; + +template<> +struct wxFormatStringSpecifierNonPodType<true> +{ + enum { value = wxFormatString::Arg_Int }; +}; + +template<typename T> +struct wxFormatStringSpecifier +{ +#ifdef HAVE_TYPE_TRAITS + typedef std::is_enum<T> is_enum; +#elif defined HAVE_TR1_TYPE_TRAITS + typedef std::tr1::is_enum<T> is_enum; +#endif + enum { value = wxFormatStringSpecifierNonPodType<is_enum::value>::value }; +}; + +#else // !HAVE_(TR1_)TYPE_TRAITS + +template<typename T> +struct wxFormatStringSpecifier +{ + // We can't detect enums without is_enum, so the only thing we can + // do is to accept unknown types. However, the only acceptable unknown + // types still are enums, which are promoted to ints, so return Arg_Int + // here. This will at least catch passing of non-POD types through ... at + // runtime. + // + // Furthermore, if the compiler doesn't have partial template + // specialization, we didn't cover pointers either. +#ifdef HAVE_PARTIAL_SPECIALIZATION + enum { value = wxFormatString::Arg_Int }; +#else + enum { value = wxFormatString::Arg_Int | wxFormatString::Arg_Pointer }; +#endif +}; + +#endif // HAVE_TR1_TYPE_TRAITS/!HAVE_TR1_TYPE_TRAITS + + +#ifdef HAVE_PARTIAL_SPECIALIZATION +template<typename T> +struct wxFormatStringSpecifier<T*> +{ + enum { value = wxFormatString::Arg_Pointer }; +}; + +template<typename T> +struct wxFormatStringSpecifier<const T*> +{ + enum { value = wxFormatString::Arg_Pointer }; +}; +#endif // !HAVE_PARTIAL_SPECIALIZATION + + +#define wxFORMAT_STRING_SPECIFIER(T, arg) \ + template<> struct wxFormatStringSpecifier<T> \ + { \ + enum { value = arg }; \ + }; + +wxFORMAT_STRING_SPECIFIER(bool, wxFormatString::Arg_Int) +wxFORMAT_STRING_SPECIFIER(int, wxFormatString::Arg_Int) +wxFORMAT_STRING_SPECIFIER(unsigned int, wxFormatString::Arg_Int) +wxFORMAT_STRING_SPECIFIER(short int, wxFormatString::Arg_Int) +wxFORMAT_STRING_SPECIFIER(short unsigned int, wxFormatString::Arg_Int) +wxFORMAT_STRING_SPECIFIER(long int, wxFormatString::Arg_LongInt) +wxFORMAT_STRING_SPECIFIER(long unsigned int, wxFormatString::Arg_LongInt) +#ifdef wxLongLong_t +wxFORMAT_STRING_SPECIFIER(wxLongLong_t, wxFormatString::Arg_LongLongInt) +wxFORMAT_STRING_SPECIFIER(wxULongLong_t, wxFormatString::Arg_LongLongInt) +#endif +wxFORMAT_STRING_SPECIFIER(float, wxFormatString::Arg_Double) +wxFORMAT_STRING_SPECIFIER(double, wxFormatString::Arg_Double) +wxFORMAT_STRING_SPECIFIER(long double, wxFormatString::Arg_LongDouble) + +#if wxWCHAR_T_IS_REAL_TYPE +wxFORMAT_STRING_SPECIFIER(wchar_t, wxFormatString::Arg_Char | wxFormatString::Arg_Int) +#endif + +#if !wxUSE_UNICODE +wxFORMAT_STRING_SPECIFIER(char, wxFormatString::Arg_Char | wxFormatString::Arg_Int) +wxFORMAT_STRING_SPECIFIER(signed char, wxFormatString::Arg_Char | wxFormatString::Arg_Int) +wxFORMAT_STRING_SPECIFIER(unsigned char, wxFormatString::Arg_Char | wxFormatString::Arg_Int) +#endif + +wxFORMAT_STRING_SPECIFIER(char*, wxFormatString::Arg_String) +wxFORMAT_STRING_SPECIFIER(unsigned char*, wxFormatString::Arg_String) +wxFORMAT_STRING_SPECIFIER(signed char*, wxFormatString::Arg_String) +wxFORMAT_STRING_SPECIFIER(const char*, wxFormatString::Arg_String) +wxFORMAT_STRING_SPECIFIER(const unsigned char*, wxFormatString::Arg_String) +wxFORMAT_STRING_SPECIFIER(const signed char*, wxFormatString::Arg_String) +wxFORMAT_STRING_SPECIFIER(wchar_t*, wxFormatString::Arg_String) +wxFORMAT_STRING_SPECIFIER(const wchar_t*, wxFormatString::Arg_String) + +wxFORMAT_STRING_SPECIFIER(int*, wxFormatString::Arg_IntPtr | wxFormatString::Arg_Pointer) +wxFORMAT_STRING_SPECIFIER(short int*, wxFormatString::Arg_ShortIntPtr | wxFormatString::Arg_Pointer) +wxFORMAT_STRING_SPECIFIER(long int*, wxFormatString::Arg_LongIntPtr | wxFormatString::Arg_Pointer) + +#undef wxFORMAT_STRING_SPECIFIER + + +// Converts an argument passed to wxPrint etc. into standard form expected, +// by wxXXX functions, e.g. all strings (wxString, char*, wchar_t*) are +// converted into wchar_t* or char* depending on the build. +template<typename T> +struct wxArgNormalizer +{ + // Ctor. 'value' is the value passed as variadic argument, 'fmt' is pointer + // to printf-like format string or NULL if the variadic function doesn't + // use format string and 'index' is index of 'value' in variadic arguments + // list (starting at 1) + wxArgNormalizer(T value, + const wxFormatString *fmt, unsigned index) + : m_value(value) + { + wxASSERT_ARG_TYPE( fmt, index, wxFormatStringSpecifier<T>::value ); + } + + // Returns the value in a form that can be safely passed to real vararg + // functions. In case of strings, this is char* in ANSI build and wchar_t* + // in Unicode build. + T get() const { return m_value; } + + T m_value; +}; + +// normalizer for passing arguments to functions working with wchar_t* (and +// until ANSI build is removed, char* in ANSI build as well - FIXME-UTF8) +// string representation +#if !wxUSE_UTF8_LOCALE_ONLY +template<typename T> +struct wxArgNormalizerWchar : public wxArgNormalizer<T> +{ + wxArgNormalizerWchar(T value, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizer<T>(value, fmt, index) {} +}; +#endif // !wxUSE_UTF8_LOCALE_ONLY + +// normalizer for passing arguments to functions working with UTF-8 encoded +// char* strings +#if wxUSE_UNICODE_UTF8 + template<typename T> + struct wxArgNormalizerUtf8 : public wxArgNormalizer<T> + { + wxArgNormalizerUtf8(T value, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizer<T>(value, fmt, index) {} + }; + + #define wxArgNormalizerNative wxArgNormalizerUtf8 +#else // wxUSE_UNICODE_WCHAR + #define wxArgNormalizerNative wxArgNormalizerWchar +#endif // wxUSE_UNICODE_UTF8 // wxUSE_UNICODE_UTF8 + + + +// special cases for converting strings: + + +// base class for wxArgNormalizer<T> specializations that need to do conversion; +// CharType is either wxStringCharType or wchar_t in UTF-8 build when wrapping +// widechar CRT function +template<typename CharType> +struct wxArgNormalizerWithBuffer +{ + typedef wxScopedCharTypeBuffer<CharType> CharBuffer; + + wxArgNormalizerWithBuffer() {} + wxArgNormalizerWithBuffer(const CharBuffer& buf, + const wxFormatString *fmt, + unsigned index) + : m_value(buf) + { + wxASSERT_ARG_TYPE( fmt, index, wxFormatString::Arg_String ); + } + + const CharType *get() const { return m_value; } + + CharBuffer m_value; +}; + +// string objects: +template<> +struct WXDLLIMPEXP_BASE wxArgNormalizerNative<const wxString&> +{ + wxArgNormalizerNative(const wxString& s, + const wxFormatString *fmt, + unsigned index) + : m_value(s) + { + wxASSERT_ARG_TYPE( fmt, index, wxFormatString::Arg_String ); + } + + const wxStringCharType *get() const; + + const wxString& m_value; +}; + +// c_str() values: +template<> +struct WXDLLIMPEXP_BASE wxArgNormalizerNative<const wxCStrData&> +{ + wxArgNormalizerNative(const wxCStrData& value, + const wxFormatString *fmt, + unsigned index) + : m_value(value) + { + wxASSERT_ARG_TYPE( fmt, index, wxFormatString::Arg_String ); + } + + const wxStringCharType *get() const; + + const wxCStrData& m_value; +}; + +// wxString/wxCStrData conversion to wchar_t* value +#if wxUSE_UNICODE_UTF8 && !wxUSE_UTF8_LOCALE_ONLY +template<> +struct WXDLLIMPEXP_BASE wxArgNormalizerWchar<const wxString&> + : public wxArgNormalizerWithBuffer<wchar_t> +{ + wxArgNormalizerWchar(const wxString& s, + const wxFormatString *fmt, unsigned index); +}; + +template<> +struct WXDLLIMPEXP_BASE wxArgNormalizerWchar<const wxCStrData&> + : public wxArgNormalizerWithBuffer<wchar_t> +{ + wxArgNormalizerWchar(const wxCStrData& s, + const wxFormatString *fmt, unsigned index); +}; +#endif // wxUSE_UNICODE_UTF8 && !wxUSE_UTF8_LOCALE_ONLY + + +// C string pointers of the wrong type (wchar_t* for ANSI or UTF8 build, +// char* for wchar_t Unicode build or UTF8): +#if wxUSE_UNICODE_WCHAR + +template<> +struct wxArgNormalizerWchar<const char*> + : public wxArgNormalizerWithBuffer<wchar_t> +{ + wxArgNormalizerWchar(const char* s, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerWithBuffer<wchar_t>(wxConvLibc.cMB2WC(s), fmt, index) {} +}; + +#elif wxUSE_UNICODE_UTF8 + +template<> +struct wxArgNormalizerUtf8<const wchar_t*> + : public wxArgNormalizerWithBuffer<char> +{ + wxArgNormalizerUtf8(const wchar_t* s, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerWithBuffer<char>(wxConvUTF8.cWC2MB(s), fmt, index) {} +}; + +template<> +struct wxArgNormalizerUtf8<const char*> + : public wxArgNormalizerWithBuffer<char> +{ + wxArgNormalizerUtf8(const char* s, + const wxFormatString *fmt, + unsigned index) + { + wxASSERT_ARG_TYPE( fmt, index, wxFormatString::Arg_String ); + + if ( wxLocaleIsUtf8 ) + { + m_value = wxScopedCharBuffer::CreateNonOwned(s); + } + else + { + // convert to widechar string first: + wxScopedWCharBuffer buf(wxConvLibc.cMB2WC(s)); + + // then to UTF-8: + if ( buf ) + m_value = wxConvUTF8.cWC2MB(buf); + } + } +}; + +// UTF-8 build needs conversion to wchar_t* too: +#if !wxUSE_UTF8_LOCALE_ONLY +template<> +struct wxArgNormalizerWchar<const char*> + : public wxArgNormalizerWithBuffer<wchar_t> +{ + wxArgNormalizerWchar(const char* s, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerWithBuffer<wchar_t>(wxConvLibc.cMB2WC(s), fmt, index) {} +}; +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#else // ANSI - FIXME-UTF8 + +template<> +struct wxArgNormalizerWchar<const wchar_t*> + : public wxArgNormalizerWithBuffer<char> +{ + wxArgNormalizerWchar(const wchar_t* s, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerWithBuffer<char>(wxConvLibc.cWC2MB(s), fmt, index) {} +}; + +#endif // wxUSE_UNICODE_WCHAR/wxUSE_UNICODE_UTF8/ANSI + + +// this macro is used to implement specialization that are exactly same as +// some other specialization, i.e. to "forward" the implementation (e.g. for +// T=wxString and T=const wxString&). Note that the ctor takes BaseT argument, +// not T! +#if wxUSE_UNICODE_UTF8 + #if wxUSE_UTF8_LOCALE_ONLY + #define WX_ARG_NORMALIZER_FORWARD(T, BaseT) \ + _WX_ARG_NORMALIZER_FORWARD_IMPL(wxArgNormalizerUtf8, T, BaseT) + #else // possibly non-UTF8 locales + #define WX_ARG_NORMALIZER_FORWARD(T, BaseT) \ + _WX_ARG_NORMALIZER_FORWARD_IMPL(wxArgNormalizerWchar, T, BaseT); \ + _WX_ARG_NORMALIZER_FORWARD_IMPL(wxArgNormalizerUtf8, T, BaseT) + #endif +#else // wxUSE_UNICODE_WCHAR + #define WX_ARG_NORMALIZER_FORWARD(T, BaseT) \ + _WX_ARG_NORMALIZER_FORWARD_IMPL(wxArgNormalizerWchar, T, BaseT) +#endif // wxUSE_UNICODE_UTF8/wxUSE_UNICODE_WCHAR + +#define _WX_ARG_NORMALIZER_FORWARD_IMPL(Normalizer, T, BaseT) \ + template<> \ + struct Normalizer<T> : public Normalizer<BaseT> \ + { \ + Normalizer(BaseT value, \ + const wxFormatString *fmt, unsigned index) \ + : Normalizer<BaseT>(value, fmt, index) {} \ + } + +// non-reference versions of specializations for string objects +WX_ARG_NORMALIZER_FORWARD(wxString, const wxString&); +WX_ARG_NORMALIZER_FORWARD(wxCStrData, const wxCStrData&); + +// versions for passing non-const pointers: +WX_ARG_NORMALIZER_FORWARD(char*, const char*); +WX_ARG_NORMALIZER_FORWARD(wchar_t*, const wchar_t*); + +// versions for passing wx[W]CharBuffer: +WX_ARG_NORMALIZER_FORWARD(wxScopedCharBuffer, const char*); +WX_ARG_NORMALIZER_FORWARD(const wxScopedCharBuffer&, const char*); +WX_ARG_NORMALIZER_FORWARD(wxScopedWCharBuffer, const wchar_t*); +WX_ARG_NORMALIZER_FORWARD(const wxScopedWCharBuffer&, const wchar_t*); +WX_ARG_NORMALIZER_FORWARD(wxCharBuffer, const char*); +WX_ARG_NORMALIZER_FORWARD(const wxCharBuffer&, const char*); +WX_ARG_NORMALIZER_FORWARD(wxWCharBuffer, const wchar_t*); +WX_ARG_NORMALIZER_FORWARD(const wxWCharBuffer&, const wchar_t*); + +// versions for std::[w]string: +#if wxUSE_STD_STRING + +#include "wx/stringimpl.h" + +#if !wxUSE_UTF8_LOCALE_ONLY +template<> +struct wxArgNormalizerWchar<const std::string&> + : public wxArgNormalizerWchar<const char*> +{ + wxArgNormalizerWchar(const std::string& s, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerWchar<const char*>(s.c_str(), fmt, index) {} +}; + +template<> +struct wxArgNormalizerWchar<const wxStdWideString&> + : public wxArgNormalizerWchar<const wchar_t*> +{ + wxArgNormalizerWchar(const wxStdWideString& s, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerWchar<const wchar_t*>(s.c_str(), fmt, index) {} +}; +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#if wxUSE_UNICODE_UTF8 +template<> +struct wxArgNormalizerUtf8<const std::string&> + : public wxArgNormalizerUtf8<const char*> +{ + wxArgNormalizerUtf8(const std::string& s, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerUtf8<const char*>(s.c_str(), fmt, index) {} +}; + +template<> +struct wxArgNormalizerUtf8<const wxStdWideString&> + : public wxArgNormalizerUtf8<const wchar_t*> +{ + wxArgNormalizerUtf8(const wxStdWideString& s, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerUtf8<const wchar_t*>(s.c_str(), fmt, index) {} +}; +#endif // wxUSE_UNICODE_UTF8 + +WX_ARG_NORMALIZER_FORWARD(std::string, const std::string&); +WX_ARG_NORMALIZER_FORWARD(wxStdWideString, const wxStdWideString&); + +#endif // wxUSE_STD_STRING + + +// versions for wxUniChar, wxUniCharRef: +// (this is same for UTF-8 and Wchar builds, we just convert to wchar_t) +template<> +struct wxArgNormalizer<const wxUniChar&> : public wxArgNormalizer<wchar_t> +{ + wxArgNormalizer(const wxUniChar& s, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizer<wchar_t>(wx_truncate_cast(wchar_t, s.GetValue()), fmt, index) {} +}; + +// for wchar_t, default handler does the right thing + +// char has to be treated differently in Unicode builds: a char argument may +// be used either for a character value (which should be converted into +// wxUniChar) or as an integer value (which should be left as-is). We take +// advantage of the fact that both char and wchar_t are converted into int +// in variadic arguments here. +#if wxUSE_UNICODE +template<typename T> +struct wxArgNormalizerNarrowChar +{ + wxArgNormalizerNarrowChar(T value, + const wxFormatString *fmt, unsigned index) + { + wxASSERT_ARG_TYPE( fmt, index, + wxFormatString::Arg_Char | wxFormatString::Arg_Int ); + + // FIXME-UTF8: which one is better default in absence of fmt string + // (i.e. when used like e.g. Foo("foo", "bar", 'c', NULL)? + if ( !fmt || fmt->GetArgumentType(index) == wxFormatString::Arg_Char ) + m_value = wx_truncate_cast(T, wxUniChar(value).GetValue()); + else + m_value = value; + } + + int get() const { return m_value; } + + T m_value; +}; + +template<> +struct wxArgNormalizer<char> : public wxArgNormalizerNarrowChar<char> +{ + wxArgNormalizer(char value, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerNarrowChar<char>(value, fmt, index) {} +}; + +template<> +struct wxArgNormalizer<unsigned char> + : public wxArgNormalizerNarrowChar<unsigned char> +{ + wxArgNormalizer(unsigned char value, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerNarrowChar<unsigned char>(value, fmt, index) {} +}; + +template<> +struct wxArgNormalizer<signed char> + : public wxArgNormalizerNarrowChar<signed char> +{ + wxArgNormalizer(signed char value, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerNarrowChar<signed char>(value, fmt, index) {} +}; + +#endif // wxUSE_UNICODE + +// convert references: +WX_ARG_NORMALIZER_FORWARD(wxUniChar, const wxUniChar&); +WX_ARG_NORMALIZER_FORWARD(const wxUniCharRef&, const wxUniChar&); +WX_ARG_NORMALIZER_FORWARD(wxUniCharRef, const wxUniChar&); +WX_ARG_NORMALIZER_FORWARD(const wchar_t&, wchar_t); + +WX_ARG_NORMALIZER_FORWARD(const char&, char); +WX_ARG_NORMALIZER_FORWARD(const unsigned char&, unsigned char); +WX_ARG_NORMALIZER_FORWARD(const signed char&, signed char); + + +#undef WX_ARG_NORMALIZER_FORWARD +#undef _WX_ARG_NORMALIZER_FORWARD_IMPL + +// NB: Don't #undef wxASSERT_ARG_TYPE here as it's also used in wx/longlong.h. + +// ---------------------------------------------------------------------------- +// WX_VA_ARG_STRING +// ---------------------------------------------------------------------------- + +// Replacement for va_arg() for use with strings in functions that accept +// strings normalized by wxArgNormalizer<T>: + +struct WXDLLIMPEXP_BASE wxArgNormalizedString +{ + wxArgNormalizedString(const void* ptr) : m_ptr(ptr) {} + + // returns true if non-NULL string was passed in + bool IsValid() const { return m_ptr != NULL; } + operator bool() const { return IsValid(); } + + // extracts the string, returns empty string if NULL was passed in + wxString GetString() const; + operator wxString() const; + +private: + const void *m_ptr; +}; + +#define WX_VA_ARG_STRING(ap) wxArgNormalizedString(va_arg(ap, const void*)) + +// ---------------------------------------------------------------------------- +// implementation of the WX_DEFINE_VARARG_* macros +// ---------------------------------------------------------------------------- + +// NB: The vararg emulation code is limited to 30 variadic and 4 fixed +// arguments at the moment. +// If you need more variadic arguments, you need to +// 1) increase the value of _WX_VARARG_MAX_ARGS +// 2) add _WX_VARARG_JOIN_* and _WX_VARARG_ITER_* up to the new +// _WX_VARARG_MAX_ARGS value to the lists below +// If you need more fixed arguments, you need to +// 1) increase the value of _WX_VARARG_MAX_FIXED_ARGS +// 2) add _WX_VARARG_FIXED_EXPAND_* and _WX_VARARG_FIXED_UNUSED_EXPAND_* +// macros below +#define _WX_VARARG_MAX_ARGS 30 +#define _WX_VARARG_MAX_FIXED_ARGS 4 + +#define _WX_VARARG_JOIN_1(m) m(1) +#define _WX_VARARG_JOIN_2(m) _WX_VARARG_JOIN_1(m), m(2) +#define _WX_VARARG_JOIN_3(m) _WX_VARARG_JOIN_2(m), m(3) +#define _WX_VARARG_JOIN_4(m) _WX_VARARG_JOIN_3(m), m(4) +#define _WX_VARARG_JOIN_5(m) _WX_VARARG_JOIN_4(m), m(5) +#define _WX_VARARG_JOIN_6(m) _WX_VARARG_JOIN_5(m), m(6) +#define _WX_VARARG_JOIN_7(m) _WX_VARARG_JOIN_6(m), m(7) +#define _WX_VARARG_JOIN_8(m) _WX_VARARG_JOIN_7(m), m(8) +#define _WX_VARARG_JOIN_9(m) _WX_VARARG_JOIN_8(m), m(9) +#define _WX_VARARG_JOIN_10(m) _WX_VARARG_JOIN_9(m), m(10) +#define _WX_VARARG_JOIN_11(m) _WX_VARARG_JOIN_10(m), m(11) +#define _WX_VARARG_JOIN_12(m) _WX_VARARG_JOIN_11(m), m(12) +#define _WX_VARARG_JOIN_13(m) _WX_VARARG_JOIN_12(m), m(13) +#define _WX_VARARG_JOIN_14(m) _WX_VARARG_JOIN_13(m), m(14) +#define _WX_VARARG_JOIN_15(m) _WX_VARARG_JOIN_14(m), m(15) +#define _WX_VARARG_JOIN_16(m) _WX_VARARG_JOIN_15(m), m(16) +#define _WX_VARARG_JOIN_17(m) _WX_VARARG_JOIN_16(m), m(17) +#define _WX_VARARG_JOIN_18(m) _WX_VARARG_JOIN_17(m), m(18) +#define _WX_VARARG_JOIN_19(m) _WX_VARARG_JOIN_18(m), m(19) +#define _WX_VARARG_JOIN_20(m) _WX_VARARG_JOIN_19(m), m(20) +#define _WX_VARARG_JOIN_21(m) _WX_VARARG_JOIN_20(m), m(21) +#define _WX_VARARG_JOIN_22(m) _WX_VARARG_JOIN_21(m), m(22) +#define _WX_VARARG_JOIN_23(m) _WX_VARARG_JOIN_22(m), m(23) +#define _WX_VARARG_JOIN_24(m) _WX_VARARG_JOIN_23(m), m(24) +#define _WX_VARARG_JOIN_25(m) _WX_VARARG_JOIN_24(m), m(25) +#define _WX_VARARG_JOIN_26(m) _WX_VARARG_JOIN_25(m), m(26) +#define _WX_VARARG_JOIN_27(m) _WX_VARARG_JOIN_26(m), m(27) +#define _WX_VARARG_JOIN_28(m) _WX_VARARG_JOIN_27(m), m(28) +#define _WX_VARARG_JOIN_29(m) _WX_VARARG_JOIN_28(m), m(29) +#define _WX_VARARG_JOIN_30(m) _WX_VARARG_JOIN_29(m), m(30) + +#define _WX_VARARG_ITER_1(m,a,b,c,d,e,f) m(1,a,b,c,d,e,f) +#define _WX_VARARG_ITER_2(m,a,b,c,d,e,f) _WX_VARARG_ITER_1(m,a,b,c,d,e,f) m(2,a,b,c,d,e,f) +#define _WX_VARARG_ITER_3(m,a,b,c,d,e,f) _WX_VARARG_ITER_2(m,a,b,c,d,e,f) m(3,a,b,c,d,e,f) +#define _WX_VARARG_ITER_4(m,a,b,c,d,e,f) _WX_VARARG_ITER_3(m,a,b,c,d,e,f) m(4,a,b,c,d,e,f) +#define _WX_VARARG_ITER_5(m,a,b,c,d,e,f) _WX_VARARG_ITER_4(m,a,b,c,d,e,f) m(5,a,b,c,d,e,f) +#define _WX_VARARG_ITER_6(m,a,b,c,d,e,f) _WX_VARARG_ITER_5(m,a,b,c,d,e,f) m(6,a,b,c,d,e,f) +#define _WX_VARARG_ITER_7(m,a,b,c,d,e,f) _WX_VARARG_ITER_6(m,a,b,c,d,e,f) m(7,a,b,c,d,e,f) +#define _WX_VARARG_ITER_8(m,a,b,c,d,e,f) _WX_VARARG_ITER_7(m,a,b,c,d,e,f) m(8,a,b,c,d,e,f) +#define _WX_VARARG_ITER_9(m,a,b,c,d,e,f) _WX_VARARG_ITER_8(m,a,b,c,d,e,f) m(9,a,b,c,d,e,f) +#define _WX_VARARG_ITER_10(m,a,b,c,d,e,f) _WX_VARARG_ITER_9(m,a,b,c,d,e,f) m(10,a,b,c,d,e,f) +#define _WX_VARARG_ITER_11(m,a,b,c,d,e,f) _WX_VARARG_ITER_10(m,a,b,c,d,e,f) m(11,a,b,c,d,e,f) +#define _WX_VARARG_ITER_12(m,a,b,c,d,e,f) _WX_VARARG_ITER_11(m,a,b,c,d,e,f) m(12,a,b,c,d,e,f) +#define _WX_VARARG_ITER_13(m,a,b,c,d,e,f) _WX_VARARG_ITER_12(m,a,b,c,d,e,f) m(13,a,b,c,d,e,f) +#define _WX_VARARG_ITER_14(m,a,b,c,d,e,f) _WX_VARARG_ITER_13(m,a,b,c,d,e,f) m(14,a,b,c,d,e,f) +#define _WX_VARARG_ITER_15(m,a,b,c,d,e,f) _WX_VARARG_ITER_14(m,a,b,c,d,e,f) m(15,a,b,c,d,e,f) +#define _WX_VARARG_ITER_16(m,a,b,c,d,e,f) _WX_VARARG_ITER_15(m,a,b,c,d,e,f) m(16,a,b,c,d,e,f) +#define _WX_VARARG_ITER_17(m,a,b,c,d,e,f) _WX_VARARG_ITER_16(m,a,b,c,d,e,f) m(17,a,b,c,d,e,f) +#define _WX_VARARG_ITER_18(m,a,b,c,d,e,f) _WX_VARARG_ITER_17(m,a,b,c,d,e,f) m(18,a,b,c,d,e,f) +#define _WX_VARARG_ITER_19(m,a,b,c,d,e,f) _WX_VARARG_ITER_18(m,a,b,c,d,e,f) m(19,a,b,c,d,e,f) +#define _WX_VARARG_ITER_20(m,a,b,c,d,e,f) _WX_VARARG_ITER_19(m,a,b,c,d,e,f) m(20,a,b,c,d,e,f) +#define _WX_VARARG_ITER_21(m,a,b,c,d,e,f) _WX_VARARG_ITER_20(m,a,b,c,d,e,f) m(21,a,b,c,d,e,f) +#define _WX_VARARG_ITER_22(m,a,b,c,d,e,f) _WX_VARARG_ITER_21(m,a,b,c,d,e,f) m(22,a,b,c,d,e,f) +#define _WX_VARARG_ITER_23(m,a,b,c,d,e,f) _WX_VARARG_ITER_22(m,a,b,c,d,e,f) m(23,a,b,c,d,e,f) +#define _WX_VARARG_ITER_24(m,a,b,c,d,e,f) _WX_VARARG_ITER_23(m,a,b,c,d,e,f) m(24,a,b,c,d,e,f) +#define _WX_VARARG_ITER_25(m,a,b,c,d,e,f) _WX_VARARG_ITER_24(m,a,b,c,d,e,f) m(25,a,b,c,d,e,f) +#define _WX_VARARG_ITER_26(m,a,b,c,d,e,f) _WX_VARARG_ITER_25(m,a,b,c,d,e,f) m(26,a,b,c,d,e,f) +#define _WX_VARARG_ITER_27(m,a,b,c,d,e,f) _WX_VARARG_ITER_26(m,a,b,c,d,e,f) m(27,a,b,c,d,e,f) +#define _WX_VARARG_ITER_28(m,a,b,c,d,e,f) _WX_VARARG_ITER_27(m,a,b,c,d,e,f) m(28,a,b,c,d,e,f) +#define _WX_VARARG_ITER_29(m,a,b,c,d,e,f) _WX_VARARG_ITER_28(m,a,b,c,d,e,f) m(29,a,b,c,d,e,f) +#define _WX_VARARG_ITER_30(m,a,b,c,d,e,f) _WX_VARARG_ITER_29(m,a,b,c,d,e,f) m(30,a,b,c,d,e,f) + + +#define _WX_VARARG_FIXED_EXPAND_1(t1) \ + t1 f1 +#define _WX_VARARG_FIXED_EXPAND_2(t1,t2) \ + t1 f1, t2 f2 +#define _WX_VARARG_FIXED_EXPAND_3(t1,t2,t3) \ + t1 f1, t2 f2, t3 f3 +#define _WX_VARARG_FIXED_EXPAND_4(t1,t2,t3,t4) \ + t1 f1, t2 f2, t3 f3, t4 f4 + +#define _WX_VARARG_FIXED_UNUSED_EXPAND_1(t1) \ + t1 WXUNUSED(f1) +#define _WX_VARARG_FIXED_UNUSED_EXPAND_2(t1,t2) \ + t1 WXUNUSED(f1), t2 WXUNUSED(f2) +#define _WX_VARARG_FIXED_UNUSED_EXPAND_3(t1,t2,t3) \ + t1 WXUNUSED(f1), t2 WXUNUSED(f2), t3 WXUNUSED(f3) +#define _WX_VARARG_FIXED_UNUSED_EXPAND_4(t1,t2,t3,t4) \ + t1 WXUNUSED(f1), t2 WXUNUSED(f2), t3 WXUNUSED(f3), t4 WXUNUSED(f4) + +#define _WX_VARARG_FIXED_TYPEDEFS_1(t1) \ + typedef t1 TF1 +#define _WX_VARARG_FIXED_TYPEDEFS_2(t1,t2) \ + _WX_VARARG_FIXED_TYPEDEFS_1(t1); typedef t2 TF2 +#define _WX_VARARG_FIXED_TYPEDEFS_3(t1,t2,t3) \ + _WX_VARARG_FIXED_TYPEDEFS_2(t1,t2); typedef t3 TF3 +#define _WX_VARARG_FIXED_TYPEDEFS_4(t1,t2,t3,t4) \ + _WX_VARARG_FIXED_TYPEDEFS_3(t1,t2,t3); typedef t4 TF4 + +// This macro expands N-items tuple of fixed arguments types into part of +// function's declaration. For example, +// "_WX_VARARG_FIXED_EXPAND(3, (int, char*, int))" expands into +// "int f1, char* f2, int f3". +#define _WX_VARARG_FIXED_EXPAND(N, args) \ + _WX_VARARG_FIXED_EXPAND_IMPL(N, args) +#define _WX_VARARG_FIXED_EXPAND_IMPL(N, args) \ + _WX_VARARG_FIXED_EXPAND_##N args + +// Ditto for unused arguments +#define _WX_VARARG_FIXED_UNUSED_EXPAND(N, args) \ + _WX_VARARG_FIXED_UNUSED_EXPAND_IMPL(N, args) +#define _WX_VARARG_FIXED_UNUSED_EXPAND_IMPL(N, args) \ + _WX_VARARG_FIXED_UNUSED_EXPAND_##N args + +// Declarates typedefs for fixed arguments types; i-th fixed argument types +// will have TFi typedef. +#define _WX_VARARG_FIXED_TYPEDEFS(N, args) \ + _WX_VARARG_FIXED_TYPEDEFS_IMPL(N, args) +#define _WX_VARARG_FIXED_TYPEDEFS_IMPL(N, args) \ + _WX_VARARG_FIXED_TYPEDEFS_##N args + + +// This macro calls another macro 'm' passed as second argument 'N' times, +// with its only argument set to 1..N, and concatenates the results using +// comma as separator. +// +// An example: +// #define foo(i) x##i +// // this expands to "x1,x2,x3,x4" +// _WX_VARARG_JOIN(4, foo) +// +// +// N must not be greater than _WX_VARARG_MAX_ARGS (=30). +#define _WX_VARARG_JOIN(N, m) _WX_VARARG_JOIN_IMPL(N, m) +#define _WX_VARARG_JOIN_IMPL(N, m) _WX_VARARG_JOIN_##N(m) + + +// This macro calls another macro 'm' passed as second argument 'N' times, with +// its first argument set to 1..N and the remaining arguments set to 'a', 'b', +// 'c', 'd', 'e' and 'f'. The results are separated with whitespace in the +// expansion. +// +// An example: +// // this macro expands to: +// // foo(1,a,b,c,d,e,f) +// // foo(2,a,b,c,d,e,f) +// // foo(3,a,b,c,d,e,f) +// _WX_VARARG_ITER(3, foo, a, b, c, d, e, f) +// +// N must not be greater than _WX_VARARG_MAX_ARGS (=30). +#define _WX_VARARG_ITER(N,m,a,b,c,d,e,f) \ + _WX_VARARG_ITER_IMPL(N,m,a,b,c,d,e,f) +#define _WX_VARARG_ITER_IMPL(N,m,a,b,c,d,e,f) \ + _WX_VARARG_ITER_##N(m,a,b,c,d,e,f) + +// Generates code snippet for i-th "variadic" argument in vararg function's +// prototype: +#define _WX_VARARG_ARG(i) T##i a##i + +// Like _WX_VARARG_ARG_UNUSED, but outputs argument's type with WXUNUSED: +#define _WX_VARARG_ARG_UNUSED(i) T##i WXUNUSED(a##i) + +// Generates code snippet for i-th type in vararg function's template<...>: +#define _WX_VARARG_TEMPL(i) typename T##i + +// Generates code snippet for passing i-th argument of vararg function +// wrapper to its implementation, normalizing it in the process: +#define _WX_VARARG_PASS_WCHAR(i) \ + wxArgNormalizerWchar<T##i>(a##i, fmt, i).get() +#define _WX_VARARG_PASS_UTF8(i) \ + wxArgNormalizerUtf8<T##i>(a##i, fmt, i).get() + + +// And the same for fixed arguments, _not_ normalizing it: +#define _WX_VARARG_PASS_FIXED(i) f##i + +#define _WX_VARARG_FIND_FMT(i) \ + (wxFormatStringArgumentFinder<TF##i>::find(f##i)) + +#define _WX_VARARG_FORMAT_STRING(numfixed, fixed) \ + _WX_VARARG_FIXED_TYPEDEFS(numfixed, fixed); \ + const wxFormatString *fmt = \ + (_WX_VARARG_JOIN(numfixed, _WX_VARARG_FIND_FMT)) + +#if wxUSE_UNICODE_UTF8 + #define _WX_VARARG_DO_CALL_UTF8(return_kw, impl, implUtf8, N, numfixed) \ + return_kw implUtf8(_WX_VARARG_JOIN(numfixed, _WX_VARARG_PASS_FIXED), \ + _WX_VARARG_JOIN(N, _WX_VARARG_PASS_UTF8)) + #define _WX_VARARG_DO_CALL0_UTF8(return_kw, impl, implUtf8, numfixed) \ + return_kw implUtf8(_WX_VARARG_JOIN(numfixed, _WX_VARARG_PASS_FIXED)) +#endif // wxUSE_UNICODE_UTF8 + +#define _WX_VARARG_DO_CALL_WCHAR(return_kw, impl, implUtf8, N, numfixed) \ + return_kw impl(_WX_VARARG_JOIN(numfixed, _WX_VARARG_PASS_FIXED), \ + _WX_VARARG_JOIN(N, _WX_VARARG_PASS_WCHAR)) +#define _WX_VARARG_DO_CALL0_WCHAR(return_kw, impl, implUtf8, numfixed) \ + return_kw impl(_WX_VARARG_JOIN(numfixed, _WX_VARARG_PASS_FIXED)) + +#if wxUSE_UNICODE_UTF8 + #if wxUSE_UTF8_LOCALE_ONLY + #define _WX_VARARG_DO_CALL _WX_VARARG_DO_CALL_UTF8 + #define _WX_VARARG_DO_CALL0 _WX_VARARG_DO_CALL0_UTF8 + #else // possibly non-UTF8 locales + #define _WX_VARARG_DO_CALL(return_kw, impl, implUtf8, N, numfixed) \ + if ( wxLocaleIsUtf8 ) \ + _WX_VARARG_DO_CALL_UTF8(return_kw, impl, implUtf8, N, numfixed);\ + else \ + _WX_VARARG_DO_CALL_WCHAR(return_kw, impl, implUtf8, N, numfixed) + + #define _WX_VARARG_DO_CALL0(return_kw, impl, implUtf8, numfixed) \ + if ( wxLocaleIsUtf8 ) \ + _WX_VARARG_DO_CALL0_UTF8(return_kw, impl, implUtf8, numfixed); \ + else \ + _WX_VARARG_DO_CALL0_WCHAR(return_kw, impl, implUtf8, numfixed) + #endif // wxUSE_UTF8_LOCALE_ONLY or not +#else // wxUSE_UNICODE_WCHAR or ANSI + #define _WX_VARARG_DO_CALL _WX_VARARG_DO_CALL_WCHAR + #define _WX_VARARG_DO_CALL0 _WX_VARARG_DO_CALL0_WCHAR +#endif // wxUSE_UNICODE_UTF8 / wxUSE_UNICODE_WCHAR + + +// Macro to be used with _WX_VARARG_ITER in the implementation of +// WX_DEFINE_VARARG_FUNC (see its documentation for the meaning of arguments) +#define _WX_VARARG_DEFINE_FUNC(N, rettype, name, \ + impl, implUtf8, numfixed, fixed) \ + template<_WX_VARARG_JOIN(N, _WX_VARARG_TEMPL)> \ + rettype name(_WX_VARARG_FIXED_EXPAND(numfixed, fixed), \ + _WX_VARARG_JOIN(N, _WX_VARARG_ARG)) \ + { \ + _WX_VARARG_FORMAT_STRING(numfixed, fixed); \ + _WX_VARARG_DO_CALL(return, impl, implUtf8, N, numfixed); \ + } + +#define _WX_VARARG_DEFINE_FUNC_N0(rettype, name, \ + impl, implUtf8, numfixed, fixed) \ + inline rettype name(_WX_VARARG_FIXED_EXPAND(numfixed, fixed)) \ + { \ + _WX_VARARG_DO_CALL0(return, impl, implUtf8, numfixed); \ + } + +// Macro to be used with _WX_VARARG_ITER in the implementation of +// WX_DEFINE_VARARG_FUNC_VOID (see its documentation for the meaning of +// arguments; rettype is ignored and is used only to satisfy _WX_VARARG_ITER's +// requirements). +#define _WX_VARARG_DEFINE_FUNC_VOID(N, rettype, name, \ + impl, implUtf8, numfixed, fixed) \ + template<_WX_VARARG_JOIN(N, _WX_VARARG_TEMPL)> \ + void name(_WX_VARARG_FIXED_EXPAND(numfixed, fixed), \ + _WX_VARARG_JOIN(N, _WX_VARARG_ARG)) \ + { \ + _WX_VARARG_FORMAT_STRING(numfixed, fixed); \ + _WX_VARARG_DO_CALL(wxEMPTY_PARAMETER_VALUE, \ + impl, implUtf8, N, numfixed); \ + } + +#define _WX_VARARG_DEFINE_FUNC_VOID_N0(name, impl, implUtf8, numfixed, fixed) \ + inline void name(_WX_VARARG_FIXED_EXPAND(numfixed, fixed)) \ + { \ + _WX_VARARG_DO_CALL0(wxEMPTY_PARAMETER_VALUE, \ + impl, implUtf8, numfixed); \ + } + +// Macro to be used with _WX_VARARG_ITER in the implementation of +// WX_DEFINE_VARARG_FUNC_CTOR (see its documentation for the meaning of +// arguments; rettype is ignored and is used only to satisfy _WX_VARARG_ITER's +// requirements). +#define _WX_VARARG_DEFINE_FUNC_CTOR(N, rettype, name, \ + impl, implUtf8, numfixed, fixed) \ + template<_WX_VARARG_JOIN(N, _WX_VARARG_TEMPL)> \ + name(_WX_VARARG_FIXED_EXPAND(numfixed, fixed), \ + _WX_VARARG_JOIN(N, _WX_VARARG_ARG)) \ + { \ + _WX_VARARG_FORMAT_STRING(numfixed, fixed); \ + _WX_VARARG_DO_CALL(wxEMPTY_PARAMETER_VALUE, \ + impl, implUtf8, N, numfixed); \ + } + +#define _WX_VARARG_DEFINE_FUNC_CTOR_N0(name, impl, implUtf8, numfixed, fixed) \ + inline name(_WX_VARARG_FIXED_EXPAND(numfixed, fixed)) \ + { \ + _WX_VARARG_DO_CALL0(wxEMPTY_PARAMETER_VALUE, \ + impl, implUtf8, numfixed); \ + } + +// Macro to be used with _WX_VARARG_ITER in the implementation of +// WX_DEFINE_VARARG_FUNC_NOP, i.e. empty stub for a disabled vararg function. +// The rettype and impl arguments are ignored. +#define _WX_VARARG_DEFINE_FUNC_NOP(N, rettype, name, \ + impl, implUtf8, numfixed, fixed) \ + template<_WX_VARARG_JOIN(N, _WX_VARARG_TEMPL)> \ + void name(_WX_VARARG_FIXED_UNUSED_EXPAND(numfixed, fixed), \ + _WX_VARARG_JOIN(N, _WX_VARARG_ARG_UNUSED)) \ + {} + +#define _WX_VARARG_DEFINE_FUNC_NOP_N0(name, numfixed, fixed) \ + inline void name(_WX_VARARG_FIXED_UNUSED_EXPAND(numfixed, fixed)) \ + {} + + +// ---------------------------------------------------------------------------- +// workaround for OpenWatcom bug #351 +// ---------------------------------------------------------------------------- + +#ifdef __WATCOMC__ +// workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351 + +// This macro can be used to forward a 'vararg' template to another one with +// different fixed arguments types. Parameters are same as for +// WX_DEFINE_VARARG_FUNC (rettype=void can be used here), 'convfixed' is how +// to convert fixed arguments. For example, this is typical code for dealing +// with different forms of format string: +// +// WX_DEFINE_VARARG_FUNC_VOID(Printf, 1, (const wxFormatString&), +// DoPrintfWchar, DoPrintfUtf8) +// #ifdef __WATCOMC__ +// WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const wxString&), +// (wxFormatString(f1))) +// WX_VARARG_WATCOM_WORKAROUND(void, Printf, 1, (const char*), +// (wxFormatString(f1))) +// ... +#define WX_VARARG_WATCOM_WORKAROUND(rettype, name, numfixed, fixed, convfixed)\ + _WX_VARARG_ITER(_WX_VARARG_MAX_ARGS, \ + _WX_VARARG_WATCOM_WORKAROUND, \ + rettype, name, convfixed, dummy, numfixed, fixed) + +#define WX_VARARG_WATCOM_WORKAROUND_CTOR(name, numfixed, fixed, convfixed) \ + _WX_VARARG_ITER(_WX_VARARG_MAX_ARGS, \ + _WX_VARARG_WATCOM_WORKAROUND_CTOR, \ + dummy, name, convfixed, dummy, numfixed, fixed) + +#define _WX_VARARG_WATCOM_UNPACK_1(a1) a1 +#define _WX_VARARG_WATCOM_UNPACK_2(a1, a2) a1, a2 +#define _WX_VARARG_WATCOM_UNPACK_3(a1, a2, a3) a1, a2, a3 +#define _WX_VARARG_WATCOM_UNPACK_4(a1, a2, a3, a4) a1, a2, a3, a4 +#define _WX_VARARG_WATCOM_UNPACK(N, convfixed) \ + _WX_VARARG_WATCOM_UNPACK_##N convfixed + +#define _WX_VARARG_PASS_WATCOM(i) a##i + +#define _WX_VARARG_WATCOM_WORKAROUND(N, rettype, name, \ + convfixed, dummy, numfixed, fixed) \ + template<_WX_VARARG_JOIN(N, _WX_VARARG_TEMPL)> \ + rettype name(_WX_VARARG_FIXED_EXPAND(numfixed, fixed), \ + _WX_VARARG_JOIN(N, _WX_VARARG_ARG)) \ + { \ + return name(_WX_VARARG_WATCOM_UNPACK(numfixed, convfixed), \ + _WX_VARARG_JOIN(N, _WX_VARARG_PASS_WATCOM)); \ + } + +#define _WX_VARARG_WATCOM_WORKAROUND_CTOR(N, dummy1, name, \ + convfixed, dummy2, numfixed, fixed) \ + template<_WX_VARARG_JOIN(N, _WX_VARARG_TEMPL)> \ + name(_WX_VARARG_FIXED_EXPAND(numfixed, fixed), \ + _WX_VARARG_JOIN(N, _WX_VARARG_ARG)) \ + { \ + name(_WX_VARARG_WATCOM_UNPACK(numfixed, convfixed), \ + _WX_VARARG_JOIN(N, _WX_VARARG_PASS_WATCOM)); \ + } + +#endif // __WATCOMC__ + +#endif // _WX_STRVARARG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/sysopt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sysopt.h new file mode 100644 index 0000000000..63474c0660 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/sysopt.h @@ -0,0 +1,74 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/sysopt.h +// Purpose: wxSystemOptions +// Author: Julian Smart +// Modified by: +// Created: 2001-07-10 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SYSOPT_H_ +#define _WX_SYSOPT_H_ + +#include "wx/object.h" + +// ---------------------------------------------------------------------------- +// Enables an application to influence the wxWidgets implementation +// ---------------------------------------------------------------------------- + +class +#if wxUSE_SYSTEM_OPTIONS +WXDLLIMPEXP_BASE +#endif +wxSystemOptions : public wxObject +{ +public: + wxSystemOptions() { } + + // User-customizable hints to wxWidgets or associated libraries + // These could also be used to influence GetSystem... calls, indeed + // to implement SetSystemColour/Font/Metric + +#if wxUSE_SYSTEM_OPTIONS + static void SetOption(const wxString& name, const wxString& value); + static void SetOption(const wxString& name, int value); +#endif // wxUSE_SYSTEM_OPTIONS + static wxString GetOption(const wxString& name); + static int GetOptionInt(const wxString& name); + static bool HasOption(const wxString& name); + + static bool IsFalse(const wxString& name) + { + return HasOption(name) && GetOptionInt(name) == 0; + } +}; + +#if !wxUSE_SYSTEM_OPTIONS + +// define inline stubs for accessors to make it possible to use wxSystemOptions +// in the library itself without checking for wxUSE_SYSTEM_OPTIONS all the time + +/* static */ inline +wxString wxSystemOptions::GetOption(const wxString& WXUNUSED(name)) +{ + return wxEmptyString; +} + +/* static */ inline +int wxSystemOptions::GetOptionInt(const wxString& WXUNUSED(name)) +{ + return 0; +} + +/* static */ inline +bool wxSystemOptions::HasOption(const wxString& WXUNUSED(name)) +{ + return false; +} + +#endif // !wxUSE_SYSTEM_OPTIONS + +#endif + // _WX_SYSOPT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/tarstrm.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tarstrm.h new file mode 100644 index 0000000000..906d4383ec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tarstrm.h @@ -0,0 +1,353 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/tarstrm.h +// Purpose: Streams for Tar files +// Author: Mike Wetherell +// Copyright: (c) 2004 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WXTARSTREAM_H__ +#define _WX_WXTARSTREAM_H__ + +#include "wx/defs.h" + +#if wxUSE_TARSTREAM + +#include "wx/archive.h" +#include "wx/hashmap.h" + + +///////////////////////////////////////////////////////////////////////////// +// Constants + +// TypeFlag values +enum wxTarType +{ + wxTAR_REGTYPE = '0', // regular file + wxTAR_LNKTYPE = '1', // hard link + wxTAR_SYMTYPE = '2', // symbolic link + wxTAR_CHRTYPE = '3', // character special + wxTAR_BLKTYPE = '4', // block special + wxTAR_DIRTYPE = '5', // directory + wxTAR_FIFOTYPE = '6', // named pipe + wxTAR_CONTTYPE = '7' // contiguous file +}; + +// Archive Formats (use wxTAR_PAX, it's backward compatible) +enum wxTarFormat +{ + wxTAR_USTAR, // POSIX.1-1990 tar format + wxTAR_PAX // POSIX.1-2001 tar format +}; + + +///////////////////////////////////////////////////////////////////////////// +// wxTarNotifier + +class WXDLLIMPEXP_BASE wxTarNotifier +{ +public: + virtual ~wxTarNotifier() { } + + virtual void OnEntryUpdated(class wxTarEntry& entry) = 0; +}; + + +///////////////////////////////////////////////////////////////////////////// +// Tar Entry - hold the meta data for a file in the tar + +class WXDLLIMPEXP_BASE wxTarEntry : public wxArchiveEntry +{ +public: + wxTarEntry(const wxString& name = wxEmptyString, + const wxDateTime& dt = wxDateTime::Now(), + wxFileOffset size = wxInvalidOffset); + virtual ~wxTarEntry(); + + wxTarEntry(const wxTarEntry& entry); + wxTarEntry& operator=(const wxTarEntry& entry); + + // Get accessors + wxString GetName(wxPathFormat format = wxPATH_NATIVE) const; + wxString GetInternalName() const { return m_Name; } + wxPathFormat GetInternalFormat() const { return wxPATH_UNIX; } + int GetMode() const; + int GetUserId() const { return m_UserId; } + int GetGroupId() const { return m_GroupId; } + wxFileOffset GetSize() const { return m_Size; } + wxFileOffset GetOffset() const { return m_Offset; } + wxDateTime GetDateTime() const { return m_ModifyTime; } + wxDateTime GetAccessTime() const { return m_AccessTime; } + wxDateTime GetCreateTime() const { return m_CreateTime; } + int GetTypeFlag() const { return m_TypeFlag; } + wxString GetLinkName() const { return m_LinkName; } + wxString GetUserName() const { return m_UserName; } + wxString GetGroupName() const { return m_GroupName; } + int GetDevMajor() const { return m_DevMajor; } + int GetDevMinor() const { return m_DevMinor; } + + // is accessors + bool IsDir() const; + bool IsReadOnly() const { return !(m_Mode & 0222); } + + // set accessors + void SetName(const wxString& name, wxPathFormat format = wxPATH_NATIVE); + void SetUserId(int id) { m_UserId = id; } + void SetGroupId(int id) { m_GroupId = id; } + void SetMode(int mode); + void SetSize(wxFileOffset size) { m_Size = size; } + void SetDateTime(const wxDateTime& dt) { m_ModifyTime = dt; } + void SetAccessTime(const wxDateTime& dt) { m_AccessTime = dt; } + void SetCreateTime(const wxDateTime& dt) { m_CreateTime = dt; } + void SetTypeFlag(int type) { m_TypeFlag = type; } + void SetLinkName(const wxString& link) { m_LinkName = link; } + void SetUserName(const wxString& user) { m_UserName = user; } + void SetGroupName(const wxString& group) { m_GroupName = group; } + void SetDevMajor(int dev) { m_DevMajor = dev; } + void SetDevMinor(int dev) { m_DevMinor = dev; } + + // set is accessors + void SetIsDir(bool isDir = true); + void SetIsReadOnly(bool isReadOnly = true); + + static wxString GetInternalName(const wxString& name, + wxPathFormat format = wxPATH_NATIVE, + bool *pIsDir = NULL); + + wxTarEntry *Clone() const { return new wxTarEntry(*this); } + + void SetNotifier(wxTarNotifier& WXUNUSED(notifier)) { } + +private: + void SetOffset(wxFileOffset offset) { m_Offset = offset; } + + virtual wxArchiveEntry* DoClone() const { return Clone(); } + + wxString m_Name; + int m_Mode; + bool m_IsModeSet; + int m_UserId; + int m_GroupId; + wxFileOffset m_Size; + wxFileOffset m_Offset; + wxDateTime m_ModifyTime; + wxDateTime m_AccessTime; + wxDateTime m_CreateTime; + int m_TypeFlag; + wxString m_LinkName; + wxString m_UserName; + wxString m_GroupName; + int m_DevMajor; + int m_DevMinor; + + friend class wxTarInputStream; + + DECLARE_DYNAMIC_CLASS(wxTarEntry) +}; + + +///////////////////////////////////////////////////////////////////////////// +// wxTarInputStream + +WX_DECLARE_STRING_HASH_MAP(wxString, wxTarHeaderRecords); + +class WXDLLIMPEXP_BASE wxTarInputStream : public wxArchiveInputStream +{ +public: + typedef wxTarEntry entry_type; + + wxTarInputStream(wxInputStream& stream, wxMBConv& conv = wxConvLocal); + wxTarInputStream(wxInputStream *stream, wxMBConv& conv = wxConvLocal); + virtual ~wxTarInputStream(); + + bool OpenEntry(wxTarEntry& entry); + bool CloseEntry(); + + wxTarEntry *GetNextEntry(); + + wxFileOffset GetLength() const { return m_size; } + bool IsSeekable() const { return m_parent_i_stream->IsSeekable(); } + +protected: + size_t OnSysRead(void *buffer, size_t size); + wxFileOffset OnSysTell() const { return m_pos; } + wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode); + +private: + void Init(); + + wxArchiveEntry *DoGetNextEntry() { return GetNextEntry(); } + bool OpenEntry(wxArchiveEntry& entry); + bool IsOpened() const { return m_pos != wxInvalidOffset; } + + wxStreamError ReadHeaders(); + bool ReadExtendedHeader(wxTarHeaderRecords*& recs); + + wxString GetExtendedHeader(const wxString& key) const; + wxString GetHeaderPath() const; + wxFileOffset GetHeaderNumber(int id) const; + wxString GetHeaderString(int id) const; + wxDateTime GetHeaderDate(const wxString& key) const; + + wxFileOffset m_pos; // position within the current entry + wxFileOffset m_offset; // offset to the start of the entry's data + wxFileOffset m_size; // size of the current entry's data + + int m_sumType; + int m_tarType; + class wxTarHeaderBlock *m_hdr; + wxTarHeaderRecords *m_HeaderRecs; + wxTarHeaderRecords *m_GlobalHeaderRecs; + + wxDECLARE_NO_COPY_CLASS(wxTarInputStream); +}; + + +///////////////////////////////////////////////////////////////////////////// +// wxTarOutputStream + +class WXDLLIMPEXP_BASE wxTarOutputStream : public wxArchiveOutputStream +{ +public: + wxTarOutputStream(wxOutputStream& stream, + wxTarFormat format = wxTAR_PAX, + wxMBConv& conv = wxConvLocal); + wxTarOutputStream(wxOutputStream *stream, + wxTarFormat format = wxTAR_PAX, + wxMBConv& conv = wxConvLocal); + virtual ~wxTarOutputStream(); + + bool PutNextEntry(wxTarEntry *entry); + + bool PutNextEntry(const wxString& name, + const wxDateTime& dt = wxDateTime::Now(), + wxFileOffset size = wxInvalidOffset); + + bool PutNextDirEntry(const wxString& name, + const wxDateTime& dt = wxDateTime::Now()); + + bool CopyEntry(wxTarEntry *entry, wxTarInputStream& inputStream); + bool CopyArchiveMetaData(wxTarInputStream& WXUNUSED(s)) { return true; } + + void Sync(); + bool CloseEntry(); + bool Close(); + + bool IsSeekable() const { return m_parent_o_stream->IsSeekable(); } + + void SetBlockingFactor(int factor) { m_BlockingFactor = factor; } + int GetBlockingFactor() const { return m_BlockingFactor; } + +protected: + size_t OnSysWrite(const void *buffer, size_t size); + wxFileOffset OnSysTell() const { return m_pos; } + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + +private: + void Init(wxTarFormat format); + + bool PutNextEntry(wxArchiveEntry *entry); + bool CopyEntry(wxArchiveEntry *entry, wxArchiveInputStream& stream); + bool CopyArchiveMetaData(wxArchiveInputStream& WXUNUSED(s)) { return true; } + bool IsOpened() const { return m_pos != wxInvalidOffset; } + + bool WriteHeaders(wxTarEntry& entry); + bool ModifyHeader(); + wxString PaxHeaderPath(const wxString& format, const wxString& path); + + void SetExtendedHeader(const wxString& key, const wxString& value); + void SetHeaderPath(const wxString& name); + bool SetHeaderNumber(int id, wxFileOffset n); + void SetHeaderString(int id, const wxString& str); + void SetHeaderDate(const wxString& key, const wxDateTime& datetime); + + wxFileOffset m_pos; // position within the current entry + wxFileOffset m_maxpos; // max pos written + wxFileOffset m_size; // expected entry size + + wxFileOffset m_headpos; // offset within the file to the entry's header + wxFileOffset m_datapos; // offset within the file to the entry's data + + wxFileOffset m_tarstart;// offset within the file to the tar + wxFileOffset m_tarsize; // size of tar so far + + bool m_pax; + int m_BlockingFactor; + wxUint32 m_chksum; + bool m_large; + class wxTarHeaderBlock *m_hdr; + class wxTarHeaderBlock *m_hdr2; + char *m_extendedHdr; + size_t m_extendedSize; + wxString m_badfit; + bool m_endrecWritten; + + wxDECLARE_NO_COPY_CLASS(wxTarOutputStream); +}; + + +///////////////////////////////////////////////////////////////////////////// +// Iterators + +#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR +typedef wxArchiveIterator<wxTarInputStream> wxTarIter; +typedef wxArchiveIterator<wxTarInputStream, + std::pair<wxString, wxTarEntry*> > wxTarPairIter; +#endif + + +///////////////////////////////////////////////////////////////////////////// +// wxTarClassFactory + +class WXDLLIMPEXP_BASE wxTarClassFactory : public wxArchiveClassFactory +{ +public: + typedef wxTarEntry entry_type; + typedef wxTarInputStream instream_type; + typedef wxTarOutputStream outstream_type; + typedef wxTarNotifier notifier_type; +#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR + typedef wxTarIter iter_type; + typedef wxTarPairIter pairiter_type; +#endif + + wxTarClassFactory(); + + wxTarEntry *NewEntry() const + { return new wxTarEntry; } + wxTarInputStream *NewStream(wxInputStream& stream) const + { return new wxTarInputStream(stream, GetConv()); } + wxTarOutputStream *NewStream(wxOutputStream& stream) const + { return new wxTarOutputStream(stream, wxTAR_PAX, GetConv()); } + wxTarInputStream *NewStream(wxInputStream *stream) const + { return new wxTarInputStream(stream, GetConv()); } + wxTarOutputStream *NewStream(wxOutputStream *stream) const + { return new wxTarOutputStream(stream, wxTAR_PAX, GetConv()); } + + wxString GetInternalName(const wxString& name, + wxPathFormat format = wxPATH_NATIVE) const + { return wxTarEntry::GetInternalName(name, format); } + + const wxChar * const *GetProtocols(wxStreamProtocolType type + = wxSTREAM_PROTOCOL) const; + +protected: + wxArchiveEntry *DoNewEntry() const + { return NewEntry(); } + wxArchiveInputStream *DoNewStream(wxInputStream& stream) const + { return NewStream(stream); } + wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const + { return NewStream(stream); } + wxArchiveInputStream *DoNewStream(wxInputStream *stream) const + { return NewStream(stream); } + wxArchiveOutputStream *DoNewStream(wxOutputStream *stream) const + { return NewStream(stream); } + +private: + DECLARE_DYNAMIC_CLASS(wxTarClassFactory) +}; + + +#endif // wxUSE_TARSTREAM + +#endif // _WX_WXTARSTREAM_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/taskbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/taskbar.h new file mode 100644 index 0000000000..4a81088b01 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/taskbar.h @@ -0,0 +1,154 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/taskbar.h +// Purpose: wxTaskBarIcon base header and class +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TASKBAR_H_BASE_ +#define _WX_TASKBAR_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_TASKBARICON + +#include "wx/event.h" + +class WXDLLIMPEXP_FWD_ADV wxTaskBarIconEvent; + +// ---------------------------------------------------------------------------- + +// type of taskbar item to create. Only applicable in wxOSX_COCOA +enum wxTaskBarIconType +{ + wxTBI_DOCK, + wxTBI_CUSTOM_STATUSITEM, +#if defined(wxOSX_USE_COCOA) && wxOSX_USE_COCOA + wxTBI_DEFAULT_TYPE = wxTBI_CUSTOM_STATUSITEM +#else + wxTBI_DEFAULT_TYPE = wxTBI_DOCK +#endif +}; + + +// ---------------------------------------------------------------------------- +// wxTaskBarIconBase: define wxTaskBarIcon interface +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxTaskBarIconBase : public wxEvtHandler +{ +public: + wxTaskBarIconBase() { } + +#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) + static bool IsAvailable(); +#else + static bool IsAvailable() { return true; } +#endif + + // Operations: + virtual bool SetIcon(const wxIcon& icon, + const wxString& tooltip = wxEmptyString) = 0; + virtual bool RemoveIcon() = 0; + virtual bool PopupMenu(wxMenu *menu) = 0; + + // delayed destruction (similarly to wxWindow::Destroy()) + void Destroy(); + +protected: + // creates menu to be displayed when user clicks on the icon + virtual wxMenu *CreatePopupMenu() { return NULL; } + +private: + // default events handling, calls CreatePopupMenu: + void OnRightButtonDown(wxTaskBarIconEvent& event); + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxTaskBarIconBase); +}; + + +// ---------------------------------------------------------------------------- +// now include the actual class declaration +// ---------------------------------------------------------------------------- + +#if defined(__WXMSW__) + #include "wx/msw/taskbar.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/taskbar.h" +#elif defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) + #include "wx/unix/taskbarx11.h" +#elif defined (__WXMAC__) + #include "wx/osx/taskbarosx.h" +#elif defined (__WXCOCOA__) + #include "wx/cocoa/taskbar.h" +#endif + +// ---------------------------------------------------------------------------- +// wxTaskBarIcon events +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxTaskBarIconEvent : public wxEvent +{ +public: + wxTaskBarIconEvent(wxEventType evtType, wxTaskBarIcon *tbIcon) + : wxEvent(wxID_ANY, evtType) + { + SetEventObject(tbIcon); + } + + virtual wxEvent *Clone() const { return new wxTaskBarIconEvent(*this); } + +private: + wxDECLARE_NO_ASSIGN_CLASS(wxTaskBarIconEvent); +}; + +typedef void (wxEvtHandler::*wxTaskBarIconEventFunction)(wxTaskBarIconEvent&); + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_TASKBAR_MOVE, wxTaskBarIconEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_TASKBAR_LEFT_DOWN, wxTaskBarIconEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_TASKBAR_LEFT_UP, wxTaskBarIconEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_TASKBAR_RIGHT_DOWN, wxTaskBarIconEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_TASKBAR_RIGHT_UP, wxTaskBarIconEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_TASKBAR_LEFT_DCLICK, wxTaskBarIconEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_TASKBAR_RIGHT_DCLICK, wxTaskBarIconEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_TASKBAR_BALLOON_TIMEOUT, wxTaskBarIconEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_TASKBAR_BALLOON_CLICK, wxTaskBarIconEvent ); + +#define wxTaskBarIconEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxTaskBarIconEventFunction, func) + +#define wx__DECLARE_TASKBAREVT(evt, fn) \ + wx__DECLARE_EVT0(wxEVT_TASKBAR_ ## evt, wxTaskBarIconEventHandler(fn)) + +#define EVT_TASKBAR_MOVE(fn) wx__DECLARE_TASKBAREVT(MOVE, fn) +#define EVT_TASKBAR_LEFT_DOWN(fn) wx__DECLARE_TASKBAREVT(LEFT_DOWN, fn) +#define EVT_TASKBAR_LEFT_UP(fn) wx__DECLARE_TASKBAREVT(LEFT_UP, fn) +#define EVT_TASKBAR_RIGHT_DOWN(fn) wx__DECLARE_TASKBAREVT(RIGHT_DOWN, fn) +#define EVT_TASKBAR_RIGHT_UP(fn) wx__DECLARE_TASKBAREVT(RIGHT_UP, fn) +#define EVT_TASKBAR_LEFT_DCLICK(fn) wx__DECLARE_TASKBAREVT(LEFT_DCLICK, fn) +#define EVT_TASKBAR_RIGHT_DCLICK(fn) wx__DECLARE_TASKBAREVT(RIGHT_DCLICK, fn) + +// taskbar menu is shown on right button press under all platforms except MSW +// where it's shown on right button release, using this event type and macro +// allows to write code which works correctly on all platforms +#ifdef __WXMSW__ + #define wxEVT_TASKBAR_CLICK wxEVT_TASKBAR_RIGHT_UP +#else + #define wxEVT_TASKBAR_CLICK wxEVT_TASKBAR_RIGHT_DOWN +#endif +#define EVT_TASKBAR_CLICK(fn) wx__DECLARE_TASKBAREVT(CLICK, fn) + +// these events are currently generated only under wxMSW and only after (MSW- +// specific) ShowBalloon() had been called, don't use them in portable code +#define EVT_TASKBAR_BALLOON_TIMEOUT(fn) \ + wx__DECLARE_TASKBAREVT(BALLOON_TIMEOUT, fn) +#define EVT_TASKBAR_BALLOON_CLICK(fn) \ + wx__DECLARE_TASKBAREVT(BALLOON_CLICK, fn) + +#endif // wxUSE_TASKBARICON + +#endif // _WX_TASKBAR_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/tbarbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tbarbase.h new file mode 100644 index 0000000000..c9ff7f430c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tbarbase.h @@ -0,0 +1,715 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/tbarbase.h +// Purpose: Base class for toolbar classes +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TBARBASE_H_ +#define _WX_TBARBASE_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_TOOLBAR + +#include "wx/bitmap.h" +#include "wx/list.h" +#include "wx/control.h" + +class WXDLLIMPEXP_FWD_CORE wxToolBarBase; +class WXDLLIMPEXP_FWD_CORE wxToolBarToolBase; +class WXDLLIMPEXP_FWD_CORE wxImage; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_CORE(const char) wxToolBarNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const wxSize) wxDefaultSize; +extern WXDLLIMPEXP_DATA_CORE(const wxPoint) wxDefaultPosition; + +enum wxToolBarToolStyle +{ + wxTOOL_STYLE_BUTTON = 1, + wxTOOL_STYLE_SEPARATOR = 2, + wxTOOL_STYLE_CONTROL +}; + +// ---------------------------------------------------------------------------- +// wxToolBarTool is a toolbar element. +// +// It has a unique id (except for the separators which always have id wxID_ANY), the +// style (telling whether it is a normal button, separator or a control), the +// state (toggled or not, enabled or not) and short and long help strings. The +// default implementations use the short help string for the tooltip text which +// is popped up when the mouse pointer enters the tool and the long help string +// for the applications status bar. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToolBarToolBase : public wxObject +{ +public: + // ctors & dtor + // ------------ + + // generic ctor for any kind of tool + wxToolBarToolBase(wxToolBarBase *tbar = NULL, + int toolid = wxID_SEPARATOR, + const wxString& label = wxEmptyString, + const wxBitmap& bmpNormal = wxNullBitmap, + const wxBitmap& bmpDisabled = wxNullBitmap, + wxItemKind kind = wxITEM_NORMAL, + wxObject *clientData = NULL, + const wxString& shortHelpString = wxEmptyString, + const wxString& longHelpString = wxEmptyString) + : m_label(label), + m_shortHelpString(shortHelpString), + m_longHelpString(longHelpString) + { + Init + ( + tbar, + toolid == wxID_SEPARATOR ? wxTOOL_STYLE_SEPARATOR + : wxTOOL_STYLE_BUTTON, + toolid == wxID_ANY ? wxWindow::NewControlId() + : toolid, + kind + ); + + m_clientData = clientData; + + m_bmpNormal = bmpNormal; + m_bmpDisabled = bmpDisabled; + } + + // ctor for controls only + wxToolBarToolBase(wxToolBarBase *tbar, + wxControl *control, + const wxString& label) + : m_label(label) + { + Init(tbar, wxTOOL_STYLE_CONTROL, control->GetId(), wxITEM_MAX); + + m_control = control; + } + + virtual ~wxToolBarToolBase(); + + // accessors + // --------- + + // general + int GetId() const { return m_id; } + + wxControl *GetControl() const + { + wxASSERT_MSG( IsControl(), wxT("this toolbar tool is not a control") ); + + return m_control; + } + + wxToolBarBase *GetToolBar() const { return m_tbar; } + + // style/kind + bool IsStretchable() const { return m_stretchable; } + bool IsButton() const { return m_toolStyle == wxTOOL_STYLE_BUTTON; } + bool IsControl() const { return m_toolStyle == wxTOOL_STYLE_CONTROL; } + bool IsSeparator() const { return m_toolStyle == wxTOOL_STYLE_SEPARATOR; } + bool IsStretchableSpace() const { return IsSeparator() && IsStretchable(); } + int GetStyle() const { return m_toolStyle; } + wxItemKind GetKind() const + { + wxASSERT_MSG( IsButton(), wxT("only makes sense for buttons") ); + + return m_kind; + } + + void MakeStretchable() + { + wxASSERT_MSG( IsSeparator(), "only separators can be stretchable" ); + + m_stretchable = true; + } + + // state + bool IsEnabled() const { return m_enabled; } + bool IsToggled() const { return m_toggled; } + bool CanBeToggled() const + { return m_kind == wxITEM_CHECK || m_kind == wxITEM_RADIO; } + + // attributes + const wxBitmap& GetNormalBitmap() const { return m_bmpNormal; } + const wxBitmap& GetDisabledBitmap() const { return m_bmpDisabled; } + + const wxBitmap& GetBitmap() const + { return IsEnabled() ? GetNormalBitmap() : GetDisabledBitmap(); } + + const wxString& GetLabel() const { return m_label; } + + const wxString& GetShortHelp() const { return m_shortHelpString; } + const wxString& GetLongHelp() const { return m_longHelpString; } + + wxObject *GetClientData() const + { + if ( m_toolStyle == wxTOOL_STYLE_CONTROL ) + { + return (wxObject*)m_control->GetClientData(); + } + else + { + return m_clientData; + } + } + + // modifiers: return true if the state really changed + virtual bool Enable(bool enable); + virtual bool Toggle(bool toggle); + virtual bool SetToggle(bool toggle); + virtual bool SetShortHelp(const wxString& help); + virtual bool SetLongHelp(const wxString& help); + + void Toggle() { Toggle(!IsToggled()); } + + virtual void SetNormalBitmap(const wxBitmap& bmp) { m_bmpNormal = bmp; } + virtual void SetDisabledBitmap(const wxBitmap& bmp) { m_bmpDisabled = bmp; } + + virtual void SetLabel(const wxString& label) { m_label = label; } + + void SetClientData(wxObject *clientData) + { + if ( m_toolStyle == wxTOOL_STYLE_CONTROL ) + { + m_control->SetClientData(clientData); + } + else + { + m_clientData = clientData; + } + } + + // add tool to/remove it from a toolbar + virtual void Detach() { m_tbar = NULL; } + virtual void Attach(wxToolBarBase *tbar) { m_tbar = tbar; } + +#if wxUSE_MENUS + // these methods are only for tools of wxITEM_DROPDOWN kind (but even such + // tools can have a NULL associated menu) + virtual void SetDropdownMenu(wxMenu *menu); + wxMenu *GetDropdownMenu() const { return m_dropdownMenu; } +#endif + +protected: + // common part of all ctors + void Init(wxToolBarBase *tbar, + wxToolBarToolStyle style, + int toolid, + wxItemKind kind) + { + m_tbar = tbar; + m_toolStyle = style; + m_id = toolid; + m_kind = kind; + + m_clientData = NULL; + + m_stretchable = false; + m_toggled = false; + m_enabled = true; + +#if wxUSE_MENUS + m_dropdownMenu = NULL; +#endif + + } + + wxToolBarBase *m_tbar; // the toolbar to which we belong (may be NULL) + + // tool parameters + wxToolBarToolStyle m_toolStyle; + wxWindowIDRef m_id; // the tool id, wxID_SEPARATOR for separator + wxItemKind m_kind; // for normal buttons may be wxITEM_NORMAL/CHECK/RADIO + + // as controls have their own client data, no need to waste memory + union + { + wxObject *m_clientData; + wxControl *m_control; + }; + + // true if this tool is stretchable: currently is only value for separators + bool m_stretchable; + + // tool state + bool m_toggled; + bool m_enabled; + + // normal and disabled bitmaps for the tool, both can be invalid + wxBitmap m_bmpNormal; + wxBitmap m_bmpDisabled; + + // the button label + wxString m_label; + + // short and long help strings + wxString m_shortHelpString; + wxString m_longHelpString; + +#if wxUSE_MENUS + wxMenu *m_dropdownMenu; +#endif + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxToolBarToolBase) +}; + +// a list of toolbar tools +WX_DECLARE_EXPORTED_LIST(wxToolBarToolBase, wxToolBarToolsList); + +// ---------------------------------------------------------------------------- +// the base class for all toolbars +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToolBarBase : public wxControl +{ +public: + wxToolBarBase(); + virtual ~wxToolBarBase(); + + // toolbar construction + // -------------------- + + // the full AddTool() function + // + // If bmpDisabled is wxNullBitmap, a shadowed version of the normal bitmap + // is created and used as the disabled image. + wxToolBarToolBase *AddTool(int toolid, + const wxString& label, + const wxBitmap& bitmap, + const wxBitmap& bmpDisabled, + wxItemKind kind = wxITEM_NORMAL, + const wxString& shortHelp = wxEmptyString, + const wxString& longHelp = wxEmptyString, + wxObject *data = NULL) + { + return DoAddTool(toolid, label, bitmap, bmpDisabled, kind, + shortHelp, longHelp, data); + } + + // the most common AddTool() version + wxToolBarToolBase *AddTool(int toolid, + const wxString& label, + const wxBitmap& bitmap, + const wxString& shortHelp = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL) + { + return AddTool(toolid, label, bitmap, wxNullBitmap, kind, shortHelp); + } + + // add a check tool, i.e. a tool which can be toggled + wxToolBarToolBase *AddCheckTool(int toolid, + const wxString& label, + const wxBitmap& bitmap, + const wxBitmap& bmpDisabled = wxNullBitmap, + const wxString& shortHelp = wxEmptyString, + const wxString& longHelp = wxEmptyString, + wxObject *data = NULL) + { + return AddTool(toolid, label, bitmap, bmpDisabled, wxITEM_CHECK, + shortHelp, longHelp, data); + } + + // add a radio tool, i.e. a tool which can be toggled and releases any + // other toggled radio tools in the same group when it happens + wxToolBarToolBase *AddRadioTool(int toolid, + const wxString& label, + const wxBitmap& bitmap, + const wxBitmap& bmpDisabled = wxNullBitmap, + const wxString& shortHelp = wxEmptyString, + const wxString& longHelp = wxEmptyString, + wxObject *data = NULL) + { + return AddTool(toolid, label, bitmap, bmpDisabled, wxITEM_RADIO, + shortHelp, longHelp, data); + } + + + // insert the new tool at the given position, if pos == GetToolsCount(), it + // is equivalent to AddTool() + virtual wxToolBarToolBase *InsertTool + ( + size_t pos, + int toolid, + const wxString& label, + const wxBitmap& bitmap, + const wxBitmap& bmpDisabled = wxNullBitmap, + wxItemKind kind = wxITEM_NORMAL, + const wxString& shortHelp = wxEmptyString, + const wxString& longHelp = wxEmptyString, + wxObject *clientData = NULL + ); + + virtual wxToolBarToolBase *AddTool (wxToolBarToolBase *tool); + virtual wxToolBarToolBase *InsertTool (size_t pos, wxToolBarToolBase *tool); + + // add an arbitrary control to the toolbar (notice that the control will be + // deleted by the toolbar and that it will also adjust its position/size) + // + // the label is optional and, if specified, will be shown near the control + // NB: the control should have toolbar as its parent + virtual wxToolBarToolBase * + AddControl(wxControl *control, const wxString& label = wxEmptyString); + + virtual wxToolBarToolBase * + InsertControl(size_t pos, wxControl *control, + const wxString& label = wxEmptyString); + + // get the control with the given id or return NULL + virtual wxControl *FindControl( int toolid ); + + // add a separator to the toolbar + virtual wxToolBarToolBase *AddSeparator(); + virtual wxToolBarToolBase *InsertSeparator(size_t pos); + + // add a stretchable space to the toolbar: this is similar to a separator + // except that it's always blank and that all the extra space the toolbar + // has is [equally] distributed among the stretchable spaces in it + virtual wxToolBarToolBase *AddStretchableSpace(); + virtual wxToolBarToolBase *InsertStretchableSpace(size_t pos); + + // remove the tool from the toolbar: the caller is responsible for actually + // deleting the pointer + virtual wxToolBarToolBase *RemoveTool(int toolid); + + // delete tool either by index or by position + virtual bool DeleteToolByPos(size_t pos); + virtual bool DeleteTool(int toolid); + + // delete all tools + virtual void ClearTools(); + + // must be called after all buttons have been created to finish toolbar + // initialisation + // + // derived class versions should call the base one first, before doing + // platform-specific stuff + virtual bool Realize(); + + // tools state + // ----------- + + virtual void EnableTool(int toolid, bool enable); + virtual void ToggleTool(int toolid, bool toggle); + + // Set this to be togglable (or not) + virtual void SetToggle(int toolid, bool toggle); + + // set/get tools client data (not for controls) + virtual wxObject *GetToolClientData(int toolid) const; + virtual void SetToolClientData(int toolid, wxObject *clientData); + + // returns tool pos, or wxNOT_FOUND if tool isn't found + virtual int GetToolPos(int id) const; + + // return true if the tool is toggled + virtual bool GetToolState(int toolid) const; + + virtual bool GetToolEnabled(int toolid) const; + + virtual void SetToolShortHelp(int toolid, const wxString& helpString); + virtual wxString GetToolShortHelp(int toolid) const; + virtual void SetToolLongHelp(int toolid, const wxString& helpString); + virtual wxString GetToolLongHelp(int toolid) const; + + virtual void SetToolNormalBitmap(int WXUNUSED(id), + const wxBitmap& WXUNUSED(bitmap)) {} + virtual void SetToolDisabledBitmap(int WXUNUSED(id), + const wxBitmap& WXUNUSED(bitmap)) {} + + + // margins/packing/separation + // -------------------------- + + virtual void SetMargins(int x, int y); + void SetMargins(const wxSize& size) + { SetMargins((int) size.x, (int) size.y); } + virtual void SetToolPacking(int packing) + { m_toolPacking = packing; } + virtual void SetToolSeparation(int separation) + { m_toolSeparation = separation; } + + virtual wxSize GetToolMargins() const { return wxSize(m_xMargin, m_yMargin); } + virtual int GetToolPacking() const { return m_toolPacking; } + virtual int GetToolSeparation() const { return m_toolSeparation; } + + // toolbar geometry + // ---------------- + + // set the number of toolbar rows + virtual void SetRows(int nRows); + + // the toolbar can wrap - limit the number of columns or rows it may take + void SetMaxRowsCols(int rows, int cols) + { m_maxRows = rows; m_maxCols = cols; } + int GetMaxRows() const { return m_maxRows; } + int GetMaxCols() const { return m_maxCols; } + + // get/set the size of the bitmaps used by the toolbar: should be called + // before adding any tools to the toolbar + virtual void SetToolBitmapSize(const wxSize& size) + { m_defaultWidth = size.x; m_defaultHeight = size.y; } + virtual wxSize GetToolBitmapSize() const + { return wxSize(m_defaultWidth, m_defaultHeight); } + + // the button size in some implementations is bigger than the bitmap size: + // get the total button size (by default the same as bitmap size) + virtual wxSize GetToolSize() const + { return GetToolBitmapSize(); } + + // returns a (non separator) tool containing the point (x, y) or NULL if + // there is no tool at this point (coordinates are client) + virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, + wxCoord y) const = 0; + + // find the tool by id + wxToolBarToolBase *FindById(int toolid) const; + + // return true if this is a vertical toolbar, otherwise false + bool IsVertical() const; + + // these methods allow to access tools by their index in the toolbar + size_t GetToolsCount() const { return m_tools.GetCount(); } + const wxToolBarToolBase *GetToolByPos(int pos) const { return m_tools[pos]; } + +#if WXWIN_COMPATIBILITY_2_8 + // the old versions of the various methods kept for compatibility + // don't use in the new code! + // -------------------------------------------------------------- + wxDEPRECATED_INLINE( + wxToolBarToolBase *AddTool(int toolid, + const wxBitmap& bitmap, + const wxBitmap& bmpDisabled, + bool toggle = false, + wxObject *clientData = NULL, + const wxString& shortHelpString = wxEmptyString, + const wxString& longHelpString = wxEmptyString) + , + return AddTool(toolid, wxEmptyString, + bitmap, bmpDisabled, + toggle ? wxITEM_CHECK : wxITEM_NORMAL, + shortHelpString, longHelpString, clientData); + ) + wxDEPRECATED_INLINE( + wxToolBarToolBase *AddTool(int toolid, + const wxBitmap& bitmap, + const wxString& shortHelpString = wxEmptyString, + const wxString& longHelpString = wxEmptyString) + , + return AddTool(toolid, wxEmptyString, + bitmap, wxNullBitmap, wxITEM_NORMAL, + shortHelpString, longHelpString, NULL); + ) + wxDEPRECATED_INLINE( + wxToolBarToolBase *AddTool(int toolid, + const wxBitmap& bitmap, + const wxBitmap& bmpDisabled, + bool toggle, + wxCoord xPos, + wxCoord yPos = wxDefaultCoord, + wxObject *clientData = NULL, + const wxString& shortHelp = wxEmptyString, + const wxString& longHelp = wxEmptyString) + , + return DoAddTool(toolid, wxEmptyString, bitmap, bmpDisabled, + toggle ? wxITEM_CHECK : wxITEM_NORMAL, + shortHelp, longHelp, clientData, xPos, yPos); + ) + wxDEPRECATED_INLINE( + wxToolBarToolBase *InsertTool(size_t pos, + int toolid, + const wxBitmap& bitmap, + const wxBitmap& bmpDisabled = wxNullBitmap, + bool toggle = false, + wxObject *clientData = NULL, + const wxString& shortHelp = wxEmptyString, + const wxString& longHelp = wxEmptyString) + , + return InsertTool(pos, toolid, wxEmptyString, bitmap, bmpDisabled, + toggle ? wxITEM_CHECK : wxITEM_NORMAL, + shortHelp, longHelp, clientData); + ) +#endif // WXWIN_COMPATIBILITY_2_8 + + // event handlers + // -------------- + + // NB: these functions are deprecated, use EVT_TOOL_XXX() instead! + + // Only allow toggle if returns true. Call when left button up. + virtual bool OnLeftClick(int toolid, bool toggleDown); + + // Call when right button down. + virtual void OnRightClick(int toolid, long x, long y); + + // Called when the mouse cursor enters a tool bitmap. + // Argument is wxID_ANY if mouse is exiting the toolbar. + virtual void OnMouseEnter(int toolid); + + // more deprecated functions + // ------------------------- + + // use GetToolMargins() instead + wxSize GetMargins() const { return GetToolMargins(); } + + // Tool factories, + // helper functions to create toolbar tools + // ------------------------- + virtual wxToolBarToolBase *CreateTool(int toolid, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled = wxNullBitmap, + wxItemKind kind = wxITEM_NORMAL, + wxObject *clientData = NULL, + const wxString& shortHelp = wxEmptyString, + const wxString& longHelp = wxEmptyString) = 0; + + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label) = 0; + + // this one is not virtual but just a simple helper/wrapper around + // CreateTool() for separators + wxToolBarToolBase *CreateSeparator() + { + return CreateTool(wxID_SEPARATOR, + wxEmptyString, + wxNullBitmap, wxNullBitmap, + wxITEM_SEPARATOR, NULL, + wxEmptyString, wxEmptyString); + } + + + // implementation only from now on + // ------------------------------- + + // Do the toolbar button updates (check for EVT_UPDATE_UI handlers) + virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE) ; + + // don't want toolbars to accept the focus + virtual bool AcceptsFocus() const { return false; } + +#if wxUSE_MENUS + // Set dropdown menu + bool SetDropdownMenu(int toolid, wxMenu *menu); +#endif + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // to implement in derived classes + // ------------------------------- + + // create a new toolbar tool and add it to the toolbar, this is typically + // implemented by just calling InsertTool() + virtual wxToolBarToolBase *DoAddTool + ( + int toolid, + const wxString& label, + const wxBitmap& bitmap, + const wxBitmap& bmpDisabled, + wxItemKind kind, + const wxString& shortHelp = wxEmptyString, + const wxString& longHelp = wxEmptyString, + wxObject *clientData = NULL, + wxCoord xPos = wxDefaultCoord, + wxCoord yPos = wxDefaultCoord + ); + + // the tool is not yet inserted into m_tools list when this function is + // called and will only be added to it if this function succeeds + virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool) = 0; + + // the tool is still in m_tools list when this function is called, it will + // only be deleted from it if it succeeds + virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool) = 0; + + // called when the tools enabled flag changes + virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable) = 0; + + // called when the tool is toggled + virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle) = 0; + + // called when the tools "can be toggled" flag changes + virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle) = 0; + + + // helper functions + // ---------------- + + // call this from derived class ctor/Create() to ensure that we have either + // wxTB_HORIZONTAL or wxTB_VERTICAL style, there is a lot of existing code + // which randomly checks either one or the other of them and gets confused + // if neither is set (and making one of them 0 is not an option neither as + // then the existing tests would break down) + void FixupStyle(); + + // un-toggle all buttons in the same radio group + void UnToggleRadioGroup(wxToolBarToolBase *tool); + + // make the size of the buttons big enough to fit the largest bitmap size + void AdjustToolBitmapSize(); + + // calls InsertTool() and deletes the tool if inserting it failed + wxToolBarToolBase *DoInsertNewTool(size_t pos, wxToolBarToolBase *tool) + { + if ( !InsertTool(pos, tool) ) + { + delete tool; + return NULL; + } + + return tool; + } + + // the list of all our tools + wxToolBarToolsList m_tools; + + // the offset of the first tool + int m_xMargin; + int m_yMargin; + + // the maximum number of toolbar rows/columns + int m_maxRows; + int m_maxCols; + + // the tool packing and separation + int m_toolPacking, + m_toolSeparation; + + // the size of the toolbar bitmaps + wxCoord m_defaultWidth, m_defaultHeight; + +private: + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxToolBarBase); +}; + +// deprecated function for creating the image for disabled buttons, use +// wxImage::ConvertToGreyscale() instead +#if WXWIN_COMPATIBILITY_2_8 + +wxDEPRECATED( bool wxCreateGreyedImage(const wxImage& in, wxImage& out) ); + +#endif // WXWIN_COMPATIBILITY_2_8 + + +#endif // wxUSE_TOOLBAR + +#endif + // _WX_TBARBASE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/testing.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/testing.h new file mode 100644 index 0000000000..57d9d0990c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/testing.h @@ -0,0 +1,351 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/testing.h +// Purpose: helpers for GUI testing +// Author: Vaclav Slavik +// Created: 2012-08-28 +// Copyright: (c) 2012 Vaclav Slavik +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TESTING_H_ +#define _WX_TESTING_H_ + +#include "wx/debug.h" +#include "wx/string.h" +#include "wx/modalhook.h" + +class WXDLLIMPEXP_FWD_CORE wxMessageDialogBase; +class WXDLLIMPEXP_FWD_CORE wxFileDialogBase; + +// ---------------------------------------------------------------------------- +// testing API +// ---------------------------------------------------------------------------- + +// Don't include this code when building the library itself +#ifndef WXBUILDING + +#include "wx/beforestd.h" +#include <algorithm> +#include <iterator> +#include <queue> +#include "wx/afterstd.h" +#include "wx/cpp.h" +#include "wx/dialog.h" +#include "wx/msgdlg.h" +#include "wx/filedlg.h" + +class wxTestingModalHook; + +// Non-template base class for wxExpectModal<T> (via wxExpectModalBase). +// Only used internally. +class wxModalExpectation +{ +public: + wxModalExpectation() : m_isOptional(false) {} + virtual ~wxModalExpectation() {} + + bool IsOptional() const { return m_isOptional; } + + virtual int Invoke(wxDialog *dlg) const = 0; + + virtual wxString GetDescription() const = 0; + +protected: + // Is this dialog optional, i.e. not required to be shown? + bool m_isOptional; +}; + + +// This must be specialized for each type. The specialization MUST be derived +// from wxExpectModalBase<T>. +template<class T> class wxExpectModal {}; + + +/** + Base class for wxExpectModal<T> specializations. + + Every such specialization must be derived from wxExpectModalBase; there's + no other use for this class than to serve as wxExpectModal<T>'s base class. + + T must be a class derived from wxDialog. + */ +template<class T> +class wxExpectModalBase : public wxModalExpectation +{ +public: + typedef T DialogType; + typedef wxExpectModal<DialogType> ExpectationType; + + /** + Returns a copy of the expectation where the expected dialog is marked + as optional. + + Optional dialogs aren't required to appear, it's not an error if they + don't. + */ + ExpectationType Optional() const + { + ExpectationType e(*static_cast<const ExpectationType*>(this)); + e.m_isOptional = true; + return e; + } + +protected: + virtual int Invoke(wxDialog *dlg) const + { + DialogType *t = dynamic_cast<DialogType*>(dlg); + if ( t ) + return OnInvoked(t); + else + return wxID_NONE; // not handled + } + + /// Returns description of the expected dialog (by default, its class). + virtual wxString GetDescription() const + { + return wxCLASSINFO(T)->GetClassName(); + } + + /** + This method is called when ShowModal() was invoked on a dialog of type T. + + @return Return value is used as ShowModal()'s return value. + */ + virtual int OnInvoked(DialogType *dlg) const = 0; +}; + + +// wxExpectModal<T> specializations for common dialogs: + +template<> +class wxExpectModal<wxMessageDialog> : public wxExpectModalBase<wxMessageDialog> +{ +public: + wxExpectModal(int id) + { + switch ( id ) + { + case wxYES: + m_id = wxID_YES; + break; + case wxNO: + m_id = wxID_NO; + break; + case wxCANCEL: + m_id = wxID_CANCEL; + break; + case wxOK: + m_id = wxID_OK; + break; + case wxHELP: + m_id = wxID_HELP; + break; + default: + m_id = id; + break; + } + } + +protected: + virtual int OnInvoked(wxMessageDialog *WXUNUSED(dlg)) const + { + return m_id; + } + + int m_id; +}; + +#if wxUSE_FILEDLG + +template<> +class wxExpectModal<wxFileDialog> : public wxExpectModalBase<wxFileDialog> +{ +public: + wxExpectModal(const wxString& path, int id = wxID_OK) + : m_path(path), m_id(id) + { + } + +protected: + virtual int OnInvoked(wxFileDialog *dlg) const + { + dlg->SetPath(m_path); + return m_id; + } + + wxString m_path; + int m_id; +}; + +#endif + +// Implementation of wxModalDialogHook for use in testing, with +// wxExpectModal<T> and the wxTEST_DIALOG() macro. It is not intended for +// direct use, use the macro instead. +class wxTestingModalHook : public wxModalDialogHook +{ +public: + wxTestingModalHook() + { + Register(); + } + + // Called to verify that all expectations were met. This cannot be done in + // the destructor, because ReportFailure() may throw (either because it's + // overriden or because wx's assertions handling is, globally). And + // throwing from the destructor would introduce all sort of problems, + // including messing up the order of errors in some cases. + void CheckUnmetExpectations() + { + while ( !m_expectations.empty() ) + { + const wxModalExpectation *expect = m_expectations.front(); + m_expectations.pop(); + if ( expect->IsOptional() ) + continue; + + ReportFailure + ( + wxString::Format + ( + "Expected %s dialog was not shown.", + expect->GetDescription() + ) + ); + break; + } + } + + void AddExpectation(const wxModalExpectation& e) + { + m_expectations.push(&e); + } + +protected: + virtual int Enter(wxDialog *dlg) + { + while ( !m_expectations.empty() ) + { + const wxModalExpectation *expect = m_expectations.front(); + m_expectations.pop(); + + int ret = expect->Invoke(dlg); + if ( ret != wxID_NONE ) + return ret; // dialog shown as expected + + // not showing an optional dialog is OK, but showing an unexpected + // one definitely isn't: + if ( !expect->IsOptional() ) + { + ReportFailure + ( + wxString::Format + ( + "A %s dialog was shown unexpectedly, expected %s.", + dlg->GetClassInfo()->GetClassName(), + expect->GetDescription() + ) + ); + return wxID_NONE; + } + // else: try the next expectation in the chain + } + + ReportFailure + ( + wxString::Format + ( + "A dialog (%s) was shown unexpectedly.", + dlg->GetClassInfo()->GetClassName() + ) + ); + return wxID_NONE; + } + +protected: + virtual void ReportFailure(const wxString& msg) + { + wxFAIL_MSG( msg ); + } + +private: + std::queue<const wxModalExpectation*> m_expectations; + + wxDECLARE_NO_COPY_CLASS(wxTestingModalHook); +}; + + +// Redefining this value makes it possible to customize the hook class, +// including e.g. its error reporting. +#define wxTEST_DIALOG_HOOK_CLASS wxTestingModalHook + +#define WX_TEST_IMPL_ADD_EXPECTATION(pos, expect) \ + const wxModalExpectation& wx_exp##pos = expect; \ + wx_hook.AddExpectation(wx_exp##pos); + +/** + Runs given code with all modal dialogs redirected to wxExpectModal<T> + hooks, instead of being shown to the user. + + The first argument is any valid expression, typically a function call. The + remaining arguments are wxExpectModal<T> instances defining the dialogs + that are expected to be shown, in order of appearance. + + Some typical examples: + + @code + wxTEST_DIALOG + ( + rc = dlg.ShowModal(), + wxExpectModal<wxFileDialog>(wxGetCwd() + "/test.txt") + ); + @endcode + + Sometimes, the code may show more than one dialog: + + @code + wxTEST_DIALOG + ( + RunSomeFunction(), + wxExpectModal<wxMessageDialog>(wxNO), + wxExpectModal<MyConfirmationDialog>(wxYES), + wxExpectModal<wxFileDialog>(wxGetCwd() + "/test.txt") + ); + @endcode + + Notice that wxExpectModal<T> has some convenience methods for further + tweaking the expectations. For example, it's possible to mark an expected + dialog as @em optional for situations when a dialog may be shown, but isn't + required to, by calling the Optional() method: + + @code + wxTEST_DIALOG + ( + RunSomeFunction(), + wxExpectModal<wxMessageDialog>(wxNO), + wxExpectModal<wxFileDialog>(wxGetCwd() + "/test.txt").Optional() + ); + @endcode + + @note By default, errors are reported with wxFAIL_MSG(). You may customize this by + implementing a class derived from wxTestingModalHook, overriding its + ReportFailure() method and redefining the wxTEST_DIALOG_HOOK_CLASS + macro to be the name of this class. + + @note Custom dialogs are supported too. All you have to do is to specialize + wxExpectModal<> for your dialog type and implement its OnInvoked() + method. + */ +#ifdef HAVE_VARIADIC_MACROS +#define wxTEST_DIALOG(codeToRun, ...) \ + { \ + wxTEST_DIALOG_HOOK_CLASS wx_hook; \ + wxCALL_FOR_EACH(WX_TEST_IMPL_ADD_EXPECTATION, __VA_ARGS__) \ + codeToRun; \ + wx_hook.CheckUnmetExpectations(); \ + } +#endif /* HAVE_VARIADIC_MACROS */ + +#endif // !WXBUILDING + +#endif // _WX_TESTING_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/textbuf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textbuf.h new file mode 100644 index 0000000000..a2511b427d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textbuf.h @@ -0,0 +1,210 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/textbuf.h +// Purpose: class wxTextBuffer to work with text buffers of _small_ size +// (buffer is fully loaded in memory) and which understands CR/LF +// differences between platforms. +// Created: 14.11.01 +// Author: Morten Hanssen, Vadim Zeitlin +// Copyright: (c) 1998-2001 Morten Hanssen, Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTBUFFER_H +#define _WX_TEXTBUFFER_H + +#include "wx/defs.h" +#include "wx/arrstr.h" +#include "wx/convauto.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// the line termination type (kept wxTextFileType name for compatibility) +enum wxTextFileType +{ + wxTextFileType_None, // incomplete (the last line of the file only) + wxTextFileType_Unix, // line is terminated with 'LF' = 0xA = 10 = '\n' + wxTextFileType_Dos, // 'CR' 'LF' + wxTextFileType_Mac, // 'CR' = 0xD = 13 = '\r' + wxTextFileType_Os2 // 'CR' 'LF' +}; + +#include "wx/string.h" + +#if wxUSE_TEXTBUFFER + +#include "wx/dynarray.h" + +// ---------------------------------------------------------------------------- +// wxTextBuffer +// ---------------------------------------------------------------------------- + +WX_DEFINE_USER_EXPORTED_ARRAY_INT(wxTextFileType, + wxArrayLinesType, + class WXDLLIMPEXP_BASE); + +#endif // wxUSE_TEXTBUFFER + +class WXDLLIMPEXP_BASE wxTextBuffer +{ +public: + // constants and static functions + // default type for current platform (determined at compile time) + static const wxTextFileType typeDefault; + + // this function returns a string which is identical to "text" passed in + // except that the line terminator characters are changed to correspond the + // given type. Called with the default argument, the function translates + // the string to the native format (Unix for Unix, DOS for Windows, ...). + static wxString Translate(const wxString& text, + wxTextFileType type = typeDefault); + + // get the buffer termination string + static const wxChar *GetEOL(wxTextFileType type = typeDefault); + + // the static methods of this class are compiled in even when + // !wxUSE_TEXTBUFFER because they are used by the library itself, but the + // rest can be left out +#if wxUSE_TEXTBUFFER + + // buffer operations + // ----------------- + + // buffer exists? + bool Exists() const; + + // create the buffer if it doesn't already exist + bool Create(); + + // same as Create() but with (another) buffer name + bool Create(const wxString& strBufferName); + + // Open() also loads buffer in memory on success + bool Open(const wxMBConv& conv = wxConvAuto()); + + // same as Open() but with (another) buffer name + bool Open(const wxString& strBufferName, const wxMBConv& conv = wxConvAuto()); + + // closes the buffer and frees memory, losing all changes + bool Close(); + + // is buffer currently opened? + bool IsOpened() const { return m_isOpened; } + + // accessors + // --------- + + // get the number of lines in the buffer + size_t GetLineCount() const { return m_aLines.size(); } + + // the returned line may be modified (but don't add CR/LF at the end!) + wxString& GetLine(size_t n) { return m_aLines[n]; } + const wxString& GetLine(size_t n) const { return m_aLines[n]; } + wxString& operator[](size_t n) { return m_aLines[n]; } + const wxString& operator[](size_t n) const { return m_aLines[n]; } + + // the current line has meaning only when you're using + // GetFirstLine()/GetNextLine() functions, it doesn't get updated when + // you're using "direct access" i.e. GetLine() + size_t GetCurrentLine() const { return m_nCurLine; } + void GoToLine(size_t n) { m_nCurLine = n; } + bool Eof() const { return m_nCurLine == m_aLines.size(); } + + // these methods allow more "iterator-like" traversal of the list of + // lines, i.e. you may write something like: + // for ( str = GetFirstLine(); !Eof(); str = GetNextLine() ) { ... } + + // NB: const is commented out because not all compilers understand + // 'mutable' keyword yet (m_nCurLine should be mutable) + wxString& GetFirstLine() /* const */ + { return m_aLines.empty() ? ms_eof : m_aLines[m_nCurLine = 0]; } + wxString& GetNextLine() /* const */ + { return ++m_nCurLine == m_aLines.size() ? ms_eof + : m_aLines[m_nCurLine]; } + wxString& GetPrevLine() /* const */ + { wxASSERT(m_nCurLine > 0); return m_aLines[--m_nCurLine]; } + wxString& GetLastLine() /* const */ + { m_nCurLine = m_aLines.size() - 1; return m_aLines.Last(); } + + // get the type of the line (see also GetEOL) + wxTextFileType GetLineType(size_t n) const { return m_aTypes[n]; } + + // guess the type of buffer + wxTextFileType GuessType() const; + + // get the name of the buffer + const wxString& GetName() const { return m_strBufferName; } + + // add/remove lines + // ---------------- + + // add a line to the end + void AddLine(const wxString& str, wxTextFileType type = typeDefault) + { m_aLines.push_back(str); m_aTypes.push_back(type); } + // insert a line before the line number n + void InsertLine(const wxString& str, + size_t n, + wxTextFileType type = typeDefault) + { + m_aLines.insert(m_aLines.begin() + n, str); + m_aTypes.insert(m_aTypes.begin()+n, type); + } + + // delete one line + void RemoveLine(size_t n) + { + m_aLines.erase(m_aLines.begin() + n); + m_aTypes.erase(m_aTypes.begin() + n); + } + + // remove all lines + void Clear() { m_aLines.clear(); m_aTypes.clear(); m_nCurLine = 0; } + + // change the buffer (default argument means "don't change type") + // possibly in another format + bool Write(wxTextFileType typeNew = wxTextFileType_None, + const wxMBConv& conv = wxConvAuto()); + + // dtor + virtual ~wxTextBuffer(); + +protected: + // ctors + // ----- + + // default ctor, use Open(string) + wxTextBuffer() { m_nCurLine = 0; m_isOpened = false; } + + // ctor from filename + wxTextBuffer(const wxString& strBufferName); + + enum wxTextBufferOpenMode { ReadAccess, WriteAccess }; + + // Must implement these in derived classes. + virtual bool OnExists() const = 0; + virtual bool OnOpen(const wxString &strBufferName, + wxTextBufferOpenMode openmode) = 0; + virtual bool OnClose() = 0; + virtual bool OnRead(const wxMBConv& conv) = 0; + virtual bool OnWrite(wxTextFileType typeNew, const wxMBConv& conv) = 0; + + static wxString ms_eof; // dummy string returned at EOF + wxString m_strBufferName; // name of the buffer + +private: + wxArrayLinesType m_aTypes; // type of each line + wxArrayString m_aLines; // lines of file + + size_t m_nCurLine; // number of current line in the buffer + + bool m_isOpened; // was the buffer successfully opened the last time? +#endif // wxUSE_TEXTBUFFER + + // copy ctor/assignment operator not implemented + wxTextBuffer(const wxTextBuffer&); + wxTextBuffer& operator=(const wxTextBuffer&); +}; + +#endif // _WX_TEXTBUFFER_H + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/textcompleter.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textcompleter.h new file mode 100644 index 0000000000..bc4135f8bf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textcompleter.h @@ -0,0 +1,86 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/textcompleter.h +// Purpose: Declaration of wxTextCompleter class. +// Author: Vadim Zeitlin +// Created: 2011-04-13 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTCOMPLETER_H_ +#define _WX_TEXTCOMPLETER_H_ + +// ---------------------------------------------------------------------------- +// wxTextCompleter: used by wxTextEnter::AutoComplete() +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextCompleter +{ +public: + wxTextCompleter() { } + + // The virtual functions to be implemented by the derived classes: the + // first one is called to start preparing for completions for the given + // prefix and, if it returns true, GetNext() is called until it returns an + // empty string indicating that there are no more completions. + virtual bool Start(const wxString& prefix) = 0; + virtual wxString GetNext() = 0; + + virtual ~wxTextCompleter(); + +private: + wxDECLARE_NO_COPY_CLASS(wxTextCompleter); +}; + +// ---------------------------------------------------------------------------- +// wxTextCompleterSimple: returns the entire set of completions at once +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextCompleterSimple : public wxTextCompleter +{ +public: + wxTextCompleterSimple() { } + + // Must be implemented to return all the completions for the given prefix. + virtual void GetCompletions(const wxString& prefix, wxArrayString& res) = 0; + + virtual bool Start(const wxString& prefix); + virtual wxString GetNext(); + +private: + wxArrayString m_completions; + unsigned m_index; + + wxDECLARE_NO_COPY_CLASS(wxTextCompleterSimple); +}; + +// ---------------------------------------------------------------------------- +// wxTextCompleterFixed: Trivial wxTextCompleter implementation which always +// returns the same fixed array of completions. +// ---------------------------------------------------------------------------- + +// NB: This class is private and intentionally not documented as it is +// currently used only for implementation of completion with the fixed list +// of strings only by wxWidgets itself, do not use it outside of wxWidgets. + +class wxTextCompleterFixed : public wxTextCompleterSimple +{ +public: + void SetCompletions(const wxArrayString& strings) + { + m_strings = strings; + } + + virtual void GetCompletions(const wxString& WXUNUSED(prefix), + wxArrayString& res) + { + res = m_strings; + } + +private: + wxArrayString m_strings; +}; + + +#endif // _WX_TEXTCOMPLETER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/textctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textctrl.h new file mode 100644 index 0000000000..83634e1885 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textctrl.h @@ -0,0 +1,920 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/textctrl.h +// Purpose: wxTextAttr and wxTextCtrlBase class - the interface of wxTextCtrl +// Author: Vadim Zeitlin +// Modified by: +// Created: 13.07.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTCTRL_H_BASE_ +#define _WX_TEXTCTRL_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_TEXTCTRL + +#include "wx/control.h" // the base class +#include "wx/textentry.h" // single-line text entry interface +#include "wx/dynarray.h" // wxArrayInt +#include "wx/gdicmn.h" // wxPoint + +// some compilers don't have standard compliant rdbuf() (and MSVC has it only +// in its new iostream library, not in the old one used with iostream.h) +#if defined(__WATCOMC__) || \ + ((defined(__VISUALC5__) || defined(__VISUALC6__)) && wxUSE_IOSTREAMH) + #define wxHAS_TEXT_WINDOW_STREAM 0 +#elif wxUSE_STD_IOSTREAM + #include "wx/ioswrap.h" + #define wxHAS_TEXT_WINDOW_STREAM 1 +#else + #define wxHAS_TEXT_WINDOW_STREAM 0 +#endif + +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxTextCtrlBase; + +// ---------------------------------------------------------------------------- +// wxTextCtrl types +// ---------------------------------------------------------------------------- + +// wxTextCoord is the line or row number (which should have been unsigned but +// is long for backwards compatibility) +typedef long wxTextCoord; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_CORE(const char) wxTextCtrlNameStr[]; + +// this is intentionally not enum to avoid warning fixes with +// typecasting from enum type to wxTextCoord +const wxTextCoord wxOutOfRangeTextCoord = -1; +const wxTextCoord wxInvalidTextCoord = -2; + +// ---------------------------------------------------------------------------- +// wxTextCtrl style flags +// ---------------------------------------------------------------------------- + +#define wxTE_NO_VSCROLL 0x0002 + +#define wxTE_READONLY 0x0010 +#define wxTE_MULTILINE 0x0020 +#define wxTE_PROCESS_TAB 0x0040 + +// alignment flags +#define wxTE_LEFT 0x0000 // 0x0000 +#define wxTE_CENTER wxALIGN_CENTER_HORIZONTAL // 0x0100 +#define wxTE_RIGHT wxALIGN_RIGHT // 0x0200 +#define wxTE_CENTRE wxTE_CENTER + +// this style means to use RICHEDIT control and does something only under wxMSW +// and Win32 and is silently ignored under all other platforms +#define wxTE_RICH 0x0080 + +#define wxTE_PROCESS_ENTER 0x0400 +#define wxTE_PASSWORD 0x0800 + +// automatically detect the URLs and generate the events when mouse is +// moved/clicked over an URL +// +// this is for Win32 richedit and wxGTK2 multiline controls only so far +#define wxTE_AUTO_URL 0x1000 + +// by default, the Windows text control doesn't show the selection when it +// doesn't have focus - use this style to force it to always show it +#define wxTE_NOHIDESEL 0x2000 + +// use wxHSCROLL to not wrap text at all, wxTE_CHARWRAP to wrap it at any +// position and wxTE_WORDWRAP to wrap at words boundary +// +// if no wrapping style is given at all, the control wraps at word boundary +#define wxTE_DONTWRAP wxHSCROLL +#define wxTE_CHARWRAP 0x4000 // wrap at any position +#define wxTE_WORDWRAP 0x0001 // wrap only at words boundaries +#define wxTE_BESTWRAP 0x0000 // this is the default + +#if WXWIN_COMPATIBILITY_2_6 + // obsolete synonym + #define wxTE_LINEWRAP wxTE_CHARWRAP +#endif // WXWIN_COMPATIBILITY_2_6 + +#if WXWIN_COMPATIBILITY_2_8 + // this style is (or at least should be) on by default now, don't use it + #define wxTE_AUTO_SCROLL 0 +#endif // WXWIN_COMPATIBILITY_2_8 + +// force using RichEdit version 2.0 or 3.0 instead of 1.0 (default) for +// wxTE_RICH controls - can be used together with or instead of wxTE_RICH +#define wxTE_RICH2 0x8000 + +// reuse wxTE_RICH2's value for CAPEDIT control on Windows CE +#if defined(__SMARTPHONE__) || defined(__POCKETPC__) +#define wxTE_CAPITALIZE wxTE_RICH2 +#else +#define wxTE_CAPITALIZE 0 +#endif + +// ---------------------------------------------------------------------------- +// wxTextCtrl file types +// ---------------------------------------------------------------------------- + +#define wxTEXT_TYPE_ANY 0 + +// ---------------------------------------------------------------------------- +// wxTextCtrl::HitTest return values +// ---------------------------------------------------------------------------- + +// the point asked is ... +enum wxTextCtrlHitTestResult +{ + wxTE_HT_UNKNOWN = -2, // this means HitTest() is simply not implemented + wxTE_HT_BEFORE, // either to the left or upper + wxTE_HT_ON_TEXT, // directly on + wxTE_HT_BELOW, // below [the last line] + wxTE_HT_BEYOND // after [the end of line] +}; +// ... the character returned + +// ---------------------------------------------------------------------------- +// Types for wxTextAttr +// ---------------------------------------------------------------------------- + +// Alignment + +enum wxTextAttrAlignment +{ + wxTEXT_ALIGNMENT_DEFAULT, + wxTEXT_ALIGNMENT_LEFT, + wxTEXT_ALIGNMENT_CENTRE, + wxTEXT_ALIGNMENT_CENTER = wxTEXT_ALIGNMENT_CENTRE, + wxTEXT_ALIGNMENT_RIGHT, + wxTEXT_ALIGNMENT_JUSTIFIED +}; + +// Flags to indicate which attributes are being applied +enum wxTextAttrFlags +{ + wxTEXT_ATTR_TEXT_COLOUR = 0x00000001, + wxTEXT_ATTR_BACKGROUND_COLOUR = 0x00000002, + + wxTEXT_ATTR_FONT_FACE = 0x00000004, + wxTEXT_ATTR_FONT_POINT_SIZE = 0x00000008, + wxTEXT_ATTR_FONT_PIXEL_SIZE = 0x10000000, + wxTEXT_ATTR_FONT_WEIGHT = 0x00000010, + wxTEXT_ATTR_FONT_ITALIC = 0x00000020, + wxTEXT_ATTR_FONT_UNDERLINE = 0x00000040, + wxTEXT_ATTR_FONT_STRIKETHROUGH = 0x08000000, + wxTEXT_ATTR_FONT_ENCODING = 0x02000000, + wxTEXT_ATTR_FONT_FAMILY = 0x04000000, + wxTEXT_ATTR_FONT_SIZE = \ + ( wxTEXT_ATTR_FONT_POINT_SIZE | wxTEXT_ATTR_FONT_PIXEL_SIZE ), + wxTEXT_ATTR_FONT = \ + ( wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT | \ + wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE | wxTEXT_ATTR_FONT_STRIKETHROUGH | wxTEXT_ATTR_FONT_ENCODING | wxTEXT_ATTR_FONT_FAMILY ), + + wxTEXT_ATTR_ALIGNMENT = 0x00000080, + wxTEXT_ATTR_LEFT_INDENT = 0x00000100, + wxTEXT_ATTR_RIGHT_INDENT = 0x00000200, + wxTEXT_ATTR_TABS = 0x00000400, + wxTEXT_ATTR_PARA_SPACING_AFTER = 0x00000800, + wxTEXT_ATTR_PARA_SPACING_BEFORE = 0x00001000, + wxTEXT_ATTR_LINE_SPACING = 0x00002000, + wxTEXT_ATTR_CHARACTER_STYLE_NAME = 0x00004000, + wxTEXT_ATTR_PARAGRAPH_STYLE_NAME = 0x00008000, + wxTEXT_ATTR_LIST_STYLE_NAME = 0x00010000, + + wxTEXT_ATTR_BULLET_STYLE = 0x00020000, + wxTEXT_ATTR_BULLET_NUMBER = 0x00040000, + wxTEXT_ATTR_BULLET_TEXT = 0x00080000, + wxTEXT_ATTR_BULLET_NAME = 0x00100000, + + wxTEXT_ATTR_BULLET = \ + ( wxTEXT_ATTR_BULLET_STYLE | wxTEXT_ATTR_BULLET_NUMBER | wxTEXT_ATTR_BULLET_TEXT | \ + wxTEXT_ATTR_BULLET_NAME ), + + + wxTEXT_ATTR_URL = 0x00200000, + wxTEXT_ATTR_PAGE_BREAK = 0x00400000, + wxTEXT_ATTR_EFFECTS = 0x00800000, + wxTEXT_ATTR_OUTLINE_LEVEL = 0x01000000, + + /*! + * Character and paragraph combined styles + */ + + wxTEXT_ATTR_CHARACTER = \ + (wxTEXT_ATTR_FONT|wxTEXT_ATTR_EFFECTS| \ + wxTEXT_ATTR_BACKGROUND_COLOUR|wxTEXT_ATTR_TEXT_COLOUR|wxTEXT_ATTR_CHARACTER_STYLE_NAME|wxTEXT_ATTR_URL), + + wxTEXT_ATTR_PARAGRAPH = \ + (wxTEXT_ATTR_ALIGNMENT|wxTEXT_ATTR_LEFT_INDENT|wxTEXT_ATTR_RIGHT_INDENT|wxTEXT_ATTR_TABS|\ + wxTEXT_ATTR_PARA_SPACING_BEFORE|wxTEXT_ATTR_PARA_SPACING_AFTER|wxTEXT_ATTR_LINE_SPACING|\ + wxTEXT_ATTR_BULLET|wxTEXT_ATTR_PARAGRAPH_STYLE_NAME|wxTEXT_ATTR_LIST_STYLE_NAME|wxTEXT_ATTR_OUTLINE_LEVEL|wxTEXT_ATTR_PAGE_BREAK), + + wxTEXT_ATTR_ALL = (wxTEXT_ATTR_CHARACTER|wxTEXT_ATTR_PARAGRAPH) +}; + +/*! + * Styles for wxTextAttr::SetBulletStyle + */ +enum wxTextAttrBulletStyle +{ + wxTEXT_ATTR_BULLET_STYLE_NONE = 0x00000000, + wxTEXT_ATTR_BULLET_STYLE_ARABIC = 0x00000001, + wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER = 0x00000002, + wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER = 0x00000004, + wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER = 0x00000008, + wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER = 0x00000010, + wxTEXT_ATTR_BULLET_STYLE_SYMBOL = 0x00000020, + wxTEXT_ATTR_BULLET_STYLE_BITMAP = 0x00000040, + wxTEXT_ATTR_BULLET_STYLE_PARENTHESES = 0x00000080, + wxTEXT_ATTR_BULLET_STYLE_PERIOD = 0x00000100, + wxTEXT_ATTR_BULLET_STYLE_STANDARD = 0x00000200, + wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS = 0x00000400, + wxTEXT_ATTR_BULLET_STYLE_OUTLINE = 0x00000800, + + wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT = 0x00000000, + wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT = 0x00001000, + wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE = 0x00002000, + + wxTEXT_ATTR_BULLET_STYLE_CONTINUATION = 0x00004000 +}; + +/*! + * Styles for wxTextAttr::SetTextEffects + */ +enum wxTextAttrEffects +{ + wxTEXT_ATTR_EFFECT_NONE = 0x00000000, + wxTEXT_ATTR_EFFECT_CAPITALS = 0x00000001, + wxTEXT_ATTR_EFFECT_SMALL_CAPITALS = 0x00000002, + wxTEXT_ATTR_EFFECT_STRIKETHROUGH = 0x00000004, + wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH = 0x00000008, + wxTEXT_ATTR_EFFECT_SHADOW = 0x00000010, + wxTEXT_ATTR_EFFECT_EMBOSS = 0x00000020, + wxTEXT_ATTR_EFFECT_OUTLINE = 0x00000040, + wxTEXT_ATTR_EFFECT_ENGRAVE = 0x00000080, + wxTEXT_ATTR_EFFECT_SUPERSCRIPT = 0x00000100, + wxTEXT_ATTR_EFFECT_SUBSCRIPT = 0x00000200 +}; + +/*! + * Line spacing values + */ +enum wxTextAttrLineSpacing +{ + wxTEXT_ATTR_LINE_SPACING_NORMAL = 10, + wxTEXT_ATTR_LINE_SPACING_HALF = 15, + wxTEXT_ATTR_LINE_SPACING_TWICE = 20 +}; + +// ---------------------------------------------------------------------------- +// wxTextAttr: a structure containing the visual attributes of a text +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextAttr +{ +public: + // ctors + wxTextAttr() { Init(); } + wxTextAttr(const wxTextAttr& attr) { Init(); Copy(attr); } + wxTextAttr(const wxColour& colText, + const wxColour& colBack = wxNullColour, + const wxFont& font = wxNullFont, + wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT); + + // Initialise this object. + void Init(); + + // Copy + void Copy(const wxTextAttr& attr); + + // Assignment + void operator= (const wxTextAttr& attr); + + // Equality test + bool operator== (const wxTextAttr& attr) const; + + // Partial equality test. If @a weakTest is @true, attributes of this object do not + // have to be present if those attributes of @a attr are present. If @a weakTest is + // @false, the function will fail if an attribute is present in @a attr but not + // in this object. + bool EqPartial(const wxTextAttr& attr, bool weakTest = true) const; + + // Get attributes from font. + bool GetFontAttributes(const wxFont& font, int flags = wxTEXT_ATTR_FONT); + + // setters + void SetTextColour(const wxColour& colText) { m_colText = colText; m_flags |= wxTEXT_ATTR_TEXT_COLOUR; } + void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; m_flags |= wxTEXT_ATTR_BACKGROUND_COLOUR; } + void SetAlignment(wxTextAttrAlignment alignment) { m_textAlignment = alignment; m_flags |= wxTEXT_ATTR_ALIGNMENT; } + void SetTabs(const wxArrayInt& tabs) { m_tabs = tabs; m_flags |= wxTEXT_ATTR_TABS; } + void SetLeftIndent(int indent, int subIndent = 0) { m_leftIndent = indent; m_leftSubIndent = subIndent; m_flags |= wxTEXT_ATTR_LEFT_INDENT; } + void SetRightIndent(int indent) { m_rightIndent = indent; m_flags |= wxTEXT_ATTR_RIGHT_INDENT; } + + void SetFontSize(int pointSize) { m_fontSize = pointSize; m_flags &= ~wxTEXT_ATTR_FONT_SIZE; m_flags |= wxTEXT_ATTR_FONT_POINT_SIZE; } + void SetFontPointSize(int pointSize) { m_fontSize = pointSize; m_flags &= ~wxTEXT_ATTR_FONT_SIZE; m_flags |= wxTEXT_ATTR_FONT_POINT_SIZE; } + void SetFontPixelSize(int pixelSize) { m_fontSize = pixelSize; m_flags &= ~wxTEXT_ATTR_FONT_SIZE; m_flags |= wxTEXT_ATTR_FONT_PIXEL_SIZE; } + void SetFontStyle(wxFontStyle fontStyle) { m_fontStyle = fontStyle; m_flags |= wxTEXT_ATTR_FONT_ITALIC; } + void SetFontWeight(wxFontWeight fontWeight) { m_fontWeight = fontWeight; m_flags |= wxTEXT_ATTR_FONT_WEIGHT; } + void SetFontFaceName(const wxString& faceName) { m_fontFaceName = faceName; m_flags |= wxTEXT_ATTR_FONT_FACE; } + void SetFontUnderlined(bool underlined) { m_fontUnderlined = underlined; m_flags |= wxTEXT_ATTR_FONT_UNDERLINE; } + void SetFontStrikethrough(bool strikethrough) { m_fontStrikethrough = strikethrough; m_flags |= wxTEXT_ATTR_FONT_STRIKETHROUGH; } + void SetFontEncoding(wxFontEncoding encoding) { m_fontEncoding = encoding; m_flags |= wxTEXT_ATTR_FONT_ENCODING; } + void SetFontFamily(wxFontFamily family) { m_fontFamily = family; m_flags |= wxTEXT_ATTR_FONT_FAMILY; } + + // Set font + void SetFont(const wxFont& font, int flags = (wxTEXT_ATTR_FONT & ~wxTEXT_ATTR_FONT_PIXEL_SIZE)) { GetFontAttributes(font, flags); } + + void SetFlags(long flags) { m_flags = flags; } + + void SetCharacterStyleName(const wxString& name) { m_characterStyleName = name; m_flags |= wxTEXT_ATTR_CHARACTER_STYLE_NAME; } + void SetParagraphStyleName(const wxString& name) { m_paragraphStyleName = name; m_flags |= wxTEXT_ATTR_PARAGRAPH_STYLE_NAME; } + void SetListStyleName(const wxString& name) { m_listStyleName = name; SetFlags(GetFlags() | wxTEXT_ATTR_LIST_STYLE_NAME); } + void SetParagraphSpacingAfter(int spacing) { m_paragraphSpacingAfter = spacing; m_flags |= wxTEXT_ATTR_PARA_SPACING_AFTER; } + void SetParagraphSpacingBefore(int spacing) { m_paragraphSpacingBefore = spacing; m_flags |= wxTEXT_ATTR_PARA_SPACING_BEFORE; } + void SetLineSpacing(int spacing) { m_lineSpacing = spacing; m_flags |= wxTEXT_ATTR_LINE_SPACING; } + void SetBulletStyle(int style) { m_bulletStyle = style; m_flags |= wxTEXT_ATTR_BULLET_STYLE; } + void SetBulletNumber(int n) { m_bulletNumber = n; m_flags |= wxTEXT_ATTR_BULLET_NUMBER; } + void SetBulletText(const wxString& text) { m_bulletText = text; m_flags |= wxTEXT_ATTR_BULLET_TEXT; } + void SetBulletFont(const wxString& bulletFont) { m_bulletFont = bulletFont; } + void SetBulletName(const wxString& name) { m_bulletName = name; m_flags |= wxTEXT_ATTR_BULLET_NAME; } + void SetURL(const wxString& url) { m_urlTarget = url; m_flags |= wxTEXT_ATTR_URL; } + void SetPageBreak(bool pageBreak = true) { SetFlags(pageBreak ? (GetFlags() | wxTEXT_ATTR_PAGE_BREAK) : (GetFlags() & ~wxTEXT_ATTR_PAGE_BREAK)); } + void SetTextEffects(int effects) { m_textEffects = effects; SetFlags(GetFlags() | wxTEXT_ATTR_EFFECTS); } + void SetTextEffectFlags(int effects) { m_textEffectFlags = effects; } + void SetOutlineLevel(int level) { m_outlineLevel = level; SetFlags(GetFlags() | wxTEXT_ATTR_OUTLINE_LEVEL); } + + const wxColour& GetTextColour() const { return m_colText; } + const wxColour& GetBackgroundColour() const { return m_colBack; } + wxTextAttrAlignment GetAlignment() const { return m_textAlignment; } + const wxArrayInt& GetTabs() const { return m_tabs; } + long GetLeftIndent() const { return m_leftIndent; } + long GetLeftSubIndent() const { return m_leftSubIndent; } + long GetRightIndent() const { return m_rightIndent; } + long GetFlags() const { return m_flags; } + + int GetFontSize() const { return m_fontSize; } + wxFontStyle GetFontStyle() const { return m_fontStyle; } + wxFontWeight GetFontWeight() const { return m_fontWeight; } + bool GetFontUnderlined() const { return m_fontUnderlined; } + bool GetFontStrikethrough() const { return m_fontStrikethrough; } + const wxString& GetFontFaceName() const { return m_fontFaceName; } + wxFontEncoding GetFontEncoding() const { return m_fontEncoding; } + wxFontFamily GetFontFamily() const { return m_fontFamily; } + + wxFont GetFont() const; + + const wxString& GetCharacterStyleName() const { return m_characterStyleName; } + const wxString& GetParagraphStyleName() const { return m_paragraphStyleName; } + const wxString& GetListStyleName() const { return m_listStyleName; } + int GetParagraphSpacingAfter() const { return m_paragraphSpacingAfter; } + int GetParagraphSpacingBefore() const { return m_paragraphSpacingBefore; } + + int GetLineSpacing() const { return m_lineSpacing; } + int GetBulletStyle() const { return m_bulletStyle; } + int GetBulletNumber() const { return m_bulletNumber; } + const wxString& GetBulletText() const { return m_bulletText; } + const wxString& GetBulletFont() const { return m_bulletFont; } + const wxString& GetBulletName() const { return m_bulletName; } + const wxString& GetURL() const { return m_urlTarget; } + int GetTextEffects() const { return m_textEffects; } + int GetTextEffectFlags() const { return m_textEffectFlags; } + int GetOutlineLevel() const { return m_outlineLevel; } + + // accessors + bool HasTextColour() const { return m_colText.IsOk() && HasFlag(wxTEXT_ATTR_TEXT_COLOUR) ; } + bool HasBackgroundColour() const { return m_colBack.IsOk() && HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) ; } + bool HasAlignment() const { return (m_textAlignment != wxTEXT_ALIGNMENT_DEFAULT) && HasFlag(wxTEXT_ATTR_ALIGNMENT) ; } + bool HasTabs() const { return HasFlag(wxTEXT_ATTR_TABS) ; } + bool HasLeftIndent() const { return HasFlag(wxTEXT_ATTR_LEFT_INDENT); } + bool HasRightIndent() const { return HasFlag(wxTEXT_ATTR_RIGHT_INDENT); } + bool HasFontWeight() const { return HasFlag(wxTEXT_ATTR_FONT_WEIGHT); } + bool HasFontSize() const { return HasFlag(wxTEXT_ATTR_FONT_SIZE); } + bool HasFontPointSize() const { return HasFlag(wxTEXT_ATTR_FONT_POINT_SIZE); } + bool HasFontPixelSize() const { return HasFlag(wxTEXT_ATTR_FONT_PIXEL_SIZE); } + bool HasFontItalic() const { return HasFlag(wxTEXT_ATTR_FONT_ITALIC); } + bool HasFontUnderlined() const { return HasFlag(wxTEXT_ATTR_FONT_UNDERLINE); } + bool HasFontStrikethrough() const { return HasFlag(wxTEXT_ATTR_FONT_STRIKETHROUGH); } + bool HasFontFaceName() const { return HasFlag(wxTEXT_ATTR_FONT_FACE); } + bool HasFontEncoding() const { return HasFlag(wxTEXT_ATTR_FONT_ENCODING); } + bool HasFontFamily() const { return HasFlag(wxTEXT_ATTR_FONT_FAMILY); } + bool HasFont() const { return HasFlag(wxTEXT_ATTR_FONT); } + + bool HasParagraphSpacingAfter() const { return HasFlag(wxTEXT_ATTR_PARA_SPACING_AFTER); } + bool HasParagraphSpacingBefore() const { return HasFlag(wxTEXT_ATTR_PARA_SPACING_BEFORE); } + bool HasLineSpacing() const { return HasFlag(wxTEXT_ATTR_LINE_SPACING); } + bool HasCharacterStyleName() const { return HasFlag(wxTEXT_ATTR_CHARACTER_STYLE_NAME) && !m_characterStyleName.IsEmpty(); } + bool HasParagraphStyleName() const { return HasFlag(wxTEXT_ATTR_PARAGRAPH_STYLE_NAME) && !m_paragraphStyleName.IsEmpty(); } + bool HasListStyleName() const { return HasFlag(wxTEXT_ATTR_LIST_STYLE_NAME) || !m_listStyleName.IsEmpty(); } + bool HasBulletStyle() const { return HasFlag(wxTEXT_ATTR_BULLET_STYLE); } + bool HasBulletNumber() const { return HasFlag(wxTEXT_ATTR_BULLET_NUMBER); } + bool HasBulletText() const { return HasFlag(wxTEXT_ATTR_BULLET_TEXT); } + bool HasBulletName() const { return HasFlag(wxTEXT_ATTR_BULLET_NAME); } + bool HasURL() const { return HasFlag(wxTEXT_ATTR_URL); } + bool HasPageBreak() const { return HasFlag(wxTEXT_ATTR_PAGE_BREAK); } + bool HasTextEffects() const { return HasFlag(wxTEXT_ATTR_EFFECTS); } + bool HasTextEffect(int effect) const { return HasFlag(wxTEXT_ATTR_EFFECTS) && ((GetTextEffectFlags() & effect) != 0); } + bool HasOutlineLevel() const { return HasFlag(wxTEXT_ATTR_OUTLINE_LEVEL); } + + bool HasFlag(long flag) const { return (m_flags & flag) != 0; } + void RemoveFlag(long flag) { m_flags &= ~flag; } + void AddFlag(long flag) { m_flags |= flag; } + + // Is this a character style? + bool IsCharacterStyle() const { return HasFlag(wxTEXT_ATTR_CHARACTER); } + bool IsParagraphStyle() const { return HasFlag(wxTEXT_ATTR_PARAGRAPH); } + + // returns false if we have any attributes set, true otherwise + bool IsDefault() const + { + return GetFlags() == 0; + } + + // Merges the given attributes. If compareWith + // is non-NULL, then it will be used to mask out those attributes that are the same in style + // and compareWith, for situations where we don't want to explicitly set inherited attributes. + bool Apply(const wxTextAttr& style, const wxTextAttr* compareWith = NULL); + + // merges the attributes of the base and the overlay objects and returns + // the result; the parameter attributes take precedence + // + // WARNING: the order of arguments is the opposite of Combine() + static wxTextAttr Merge(const wxTextAttr& base, const wxTextAttr& overlay) + { + return Combine(overlay, base, NULL); + } + + // merges the attributes of this object and overlay + void Merge(const wxTextAttr& overlay) + { + *this = Merge(*this, overlay); + } + + // return the attribute having the valid font and colours: it uses the + // attributes set in attr and falls back first to attrDefault and then to + // the text control font/colours for those attributes which are not set + static wxTextAttr Combine(const wxTextAttr& attr, + const wxTextAttr& attrDef, + const wxTextCtrlBase *text); + + // Compare tabs + static bool TabsEq(const wxArrayInt& tabs1, const wxArrayInt& tabs2); + + // Remove attributes + static bool RemoveStyle(wxTextAttr& destStyle, const wxTextAttr& style); + + // Combine two bitlists, specifying the bits of interest with separate flags. + static bool CombineBitlists(int& valueA, int valueB, int& flagsA, int flagsB); + + // Compare two bitlists + static bool BitlistsEqPartial(int valueA, int valueB, int flags); + + // Split into paragraph and character styles + static bool SplitParaCharStyles(const wxTextAttr& style, wxTextAttr& parStyle, wxTextAttr& charStyle); + +private: + long m_flags; + + // Paragraph styles + wxArrayInt m_tabs; // array of int: tab stops in 1/10 mm + int m_leftIndent; // left indent in 1/10 mm + int m_leftSubIndent; // left indent for all but the first + // line in a paragraph relative to the + // first line, in 1/10 mm + int m_rightIndent; // right indent in 1/10 mm + wxTextAttrAlignment m_textAlignment; + + int m_paragraphSpacingAfter; + int m_paragraphSpacingBefore; + int m_lineSpacing; + int m_bulletStyle; + int m_bulletNumber; + int m_textEffects; + int m_textEffectFlags; + int m_outlineLevel; + wxString m_bulletText; + wxString m_bulletFont; + wxString m_bulletName; + wxString m_urlTarget; + wxFontEncoding m_fontEncoding; + + // Character styles + wxColour m_colText, + m_colBack; + int m_fontSize; + wxFontStyle m_fontStyle; + wxFontWeight m_fontWeight; + wxFontFamily m_fontFamily; + bool m_fontUnderlined; + bool m_fontStrikethrough; + wxString m_fontFaceName; + + // Character style + wxString m_characterStyleName; + + // Paragraph style + wxString m_paragraphStyleName; + + // List style + wxString m_listStyleName; +}; + +// ---------------------------------------------------------------------------- +// wxTextAreaBase: multiline text control specific methods +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextAreaBase +{ +public: + wxTextAreaBase() { } + virtual ~wxTextAreaBase() { } + + // lines access + // ------------ + + virtual int GetLineLength(long lineNo) const = 0; + virtual wxString GetLineText(long lineNo) const = 0; + virtual int GetNumberOfLines() const = 0; + + + // file IO + // ------- + + bool LoadFile(const wxString& file, int fileType = wxTEXT_TYPE_ANY) + { return DoLoadFile(file, fileType); } + bool SaveFile(const wxString& file = wxEmptyString, + int fileType = wxTEXT_TYPE_ANY); + + // dirty flag handling + // ------------------- + + virtual bool IsModified() const = 0; + virtual void MarkDirty() = 0; + virtual void DiscardEdits() = 0; + void SetModified(bool modified) + { + if ( modified ) + MarkDirty(); + else + DiscardEdits(); + } + + + // styles handling + // --------------- + + // text control under some platforms supports the text styles: these + // methods allow to apply the given text style to the given selection or to + // set/get the style which will be used for all appended text + virtual bool SetStyle(long start, long end, const wxTextAttr& style) = 0; + virtual bool GetStyle(long position, wxTextAttr& style) = 0; + virtual bool SetDefaultStyle(const wxTextAttr& style) = 0; + virtual const wxTextAttr& GetDefaultStyle() const { return m_defaultStyle; } + + + // coordinates translation + // ----------------------- + + // translate between the position (which is just an index in the text ctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent column and line. + virtual long XYToPosition(long x, long y) const = 0; + virtual bool PositionToXY(long pos, long *x, long *y) const = 0; + + // translate the given position (which is just an index in the text control) + // to client coordinates + wxPoint PositionToCoords(long pos) const; + + + virtual void ShowPosition(long pos) = 0; + + // find the character at position given in pixels + // + // NB: pt is in device coords (not adjusted for the client area origin nor + // scrolling) + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const; + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const; + virtual wxString GetValue() const = 0; + virtual void SetValue(const wxString& value) = 0; + +protected: + // implementation of loading/saving + virtual bool DoLoadFile(const wxString& file, int fileType); + virtual bool DoSaveFile(const wxString& file, int fileType); + + // Return true if the given position is valid, i.e. positive and less than + // the last position. + virtual bool IsValidPosition(long pos) const = 0; + + // Default stub implementation of PositionToCoords() always returns + // wxDefaultPosition. + virtual wxPoint DoPositionToCoords(long pos) const; + + // the name of the last file loaded with LoadFile() which will be used by + // SaveFile() by default + wxString m_filename; + + // the text style which will be used for any new text added to the control + wxTextAttr m_defaultStyle; + + + wxDECLARE_NO_COPY_CLASS(wxTextAreaBase); +}; + +// this class defines wxTextCtrl interface, wxTextCtrlBase actually implements +// too much things because it derives from wxTextEntry and not wxTextEntryBase +// and so any classes which "look like" wxTextCtrl (such as wxRichTextCtrl) +// but don't need the (native) implementation bits from wxTextEntry should +// actually derive from this one and not wxTextCtrlBase +class WXDLLIMPEXP_CORE wxTextCtrlIface : public wxTextAreaBase, + public wxTextEntryBase +{ +public: + wxTextCtrlIface() { } + + // wxTextAreaBase overrides + virtual wxString GetValue() const + { + return wxTextEntryBase::GetValue(); + } + virtual void SetValue(const wxString& value) + { + wxTextEntryBase::SetValue(value); + } + +protected: + virtual bool IsValidPosition(long pos) const + { + return pos >= 0 && pos <= GetLastPosition(); + } + +private: + wxDECLARE_NO_COPY_CLASS(wxTextCtrlIface); +}; + +// ---------------------------------------------------------------------------- +// wxTextCtrl: a single or multiple line text zone where user can edit text +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextCtrlBase : public wxControl, +#if wxHAS_TEXT_WINDOW_STREAM + public wxSTD streambuf, +#endif + public wxTextAreaBase, + public wxTextEntry +{ +public: + // creation + // -------- + + wxTextCtrlBase() { } + virtual ~wxTextCtrlBase() { } + + + // more readable flag testing methods + bool IsSingleLine() const { return !HasFlag(wxTE_MULTILINE); } + bool IsMultiLine() const { return !IsSingleLine(); } + + // stream-like insertion operators: these are always available, whether we + // were, or not, compiled with streambuf support + wxTextCtrl& operator<<(const wxString& s); + wxTextCtrl& operator<<(int i); + wxTextCtrl& operator<<(long i); + wxTextCtrl& operator<<(float f) { return *this << double(f); } + wxTextCtrl& operator<<(double d); + wxTextCtrl& operator<<(char c) { return *this << wxString(c); } + wxTextCtrl& operator<<(wchar_t c) { return *this << wxString(c); } + + // insert the character which would have resulted from this key event, + // return true if anything has been inserted + virtual bool EmulateKeyPress(const wxKeyEvent& event); + + + // do the window-specific processing after processing the update event + virtual void DoUpdateWindowUI(wxUpdateUIEvent& event); + + virtual bool ShouldInheritColours() const { return false; } + + // work around the problem with having HitTest() both in wxControl and + // wxTextAreaBase base classes + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const + { + return wxTextAreaBase::HitTest(pt, pos); + } + + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const + { + return wxTextAreaBase::HitTest(pt, col, row); + } + + // we provide stubs for these functions as not all platforms have styles + // support, but we really should leave them pure virtual here + virtual bool SetStyle(long start, long end, const wxTextAttr& style); + virtual bool GetStyle(long position, wxTextAttr& style); + virtual bool SetDefaultStyle(const wxTextAttr& style); + + // wxTextAreaBase overrides + virtual wxString GetValue() const + { + return wxTextEntry::GetValue(); + } + virtual void SetValue(const wxString& value) + { + wxTextEntry::SetValue(value); + } + + // wxTextEntry overrides + virtual bool SetHint(const wxString& hint); + + // wxWindow overrides + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL) + { + return GetCompositeControlsDefaultAttributes(variant); + } + +protected: + // override streambuf method +#if wxHAS_TEXT_WINDOW_STREAM + int overflow(int i); +#endif // wxHAS_TEXT_WINDOW_STREAM + + // Another wxTextAreaBase override. + virtual bool IsValidPosition(long pos) const + { + return pos >= 0 && pos <= GetLastPosition(); + } + + // implement the wxTextEntry pure virtual method + virtual wxWindow *GetEditableWindow() { return this; } + + wxDECLARE_NO_COPY_CLASS(wxTextCtrlBase); + DECLARE_ABSTRACT_CLASS(wxTextCtrlBase) +}; + +// ---------------------------------------------------------------------------- +// include the platform-dependent class definition +// ---------------------------------------------------------------------------- + +#if defined(__WXX11__) + #include "wx/x11/textctrl.h" +#elif defined(__WXUNIVERSAL__) + #include "wx/univ/textctrl.h" +#elif defined(__SMARTPHONE__) && defined(__WXWINCE__) + #include "wx/msw/wince/textctrlce.h" +#elif defined(__WXMSW__) + #include "wx/msw/textctrl.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/textctrl.h" +#elif defined(__WXGTK20__) + #include "wx/gtk/textctrl.h" +#elif defined(__WXGTK__) + #include "wx/gtk1/textctrl.h" +#elif defined(__WXMAC__) + #include "wx/osx/textctrl.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/textctrl.h" +#elif defined(__WXPM__) + #include "wx/os2/textctrl.h" +#endif + +// ---------------------------------------------------------------------------- +// wxTextCtrl events +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxTextUrlEvent; + +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_ENTER, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_URL, wxTextUrlEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_MAXLEN, wxCommandEvent); + +class WXDLLIMPEXP_CORE wxTextUrlEvent : public wxCommandEvent +{ +public: + wxTextUrlEvent(int winid, const wxMouseEvent& evtMouse, + long start, long end) + : wxCommandEvent(wxEVT_TEXT_URL, winid), + m_evtMouse(evtMouse), m_start(start), m_end(end) + { } + wxTextUrlEvent(const wxTextUrlEvent& event) + : wxCommandEvent(event), + m_evtMouse(event.m_evtMouse), + m_start(event.m_start), + m_end(event.m_end) { } + + // get the mouse event which happened over the URL + const wxMouseEvent& GetMouseEvent() const { return m_evtMouse; } + + // get the start of the URL + long GetURLStart() const { return m_start; } + + // get the end of the URL + long GetURLEnd() const { return m_end; } + + virtual wxEvent *Clone() const { return new wxTextUrlEvent(*this); } + +protected: + // the corresponding mouse event + wxMouseEvent m_evtMouse; + + // the start and end indices of the URL in the text control + long m_start, + m_end; + +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxTextUrlEvent) + +public: + // for wxWin RTTI only, don't use + wxTextUrlEvent() : m_evtMouse(), m_start(0), m_end(0) { } +}; + +typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&); + +#define wxTextEventHandler(func) wxCommandEventHandler(func) +#define wxTextUrlEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxTextUrlEventFunction, func) + +#define wx__DECLARE_TEXTEVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_TEXT_ ## evt, id, wxTextEventHandler(fn)) + +#define wx__DECLARE_TEXTURLEVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_TEXT_ ## evt, id, wxTextUrlEventHandler(fn)) + +#define EVT_TEXT(id, fn) wx__DECLARE_EVT1(wxEVT_TEXT, id, wxTextEventHandler(fn)) +#define EVT_TEXT_ENTER(id, fn) wx__DECLARE_TEXTEVT(ENTER, id, fn) +#define EVT_TEXT_URL(id, fn) wx__DECLARE_TEXTURLEVT(URL, id, fn) +#define EVT_TEXT_MAXLEN(id, fn) wx__DECLARE_TEXTEVT(MAXLEN, id, fn) + +#if wxHAS_TEXT_WINDOW_STREAM + +// ---------------------------------------------------------------------------- +// wxStreamToTextRedirector: this class redirects all data sent to the given +// C++ stream to the wxTextCtrl given to its ctor during its lifetime. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStreamToTextRedirector +{ +private: + void Init(wxTextCtrl *text) + { + m_sbufOld = m_ostr.rdbuf(); + m_ostr.rdbuf(text); + } + +public: + wxStreamToTextRedirector(wxTextCtrl *text) + : m_ostr(wxSTD cout) + { + Init(text); + } + + wxStreamToTextRedirector(wxTextCtrl *text, wxSTD ostream *ostr) + : m_ostr(*ostr) + { + Init(text); + } + + ~wxStreamToTextRedirector() + { + m_ostr.rdbuf(m_sbufOld); + } + +private: + // the stream we're redirecting + wxSTD ostream& m_ostr; + + // the old streambuf (before we changed it) + wxSTD streambuf *m_sbufOld; +}; + +#endif // wxHAS_TEXT_WINDOW_STREAM + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TEXT_UPDATED wxEVT_TEXT +#define wxEVT_COMMAND_TEXT_ENTER wxEVT_TEXT_ENTER +#define wxEVT_COMMAND_TEXT_URL wxEVT_TEXT_URL +#define wxEVT_COMMAND_TEXT_MAXLEN wxEVT_TEXT_MAXLEN + +#endif // wxUSE_TEXTCTRL + +#endif + // _WX_TEXTCTRL_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/textdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textdlg.h new file mode 100644 index 0000000000..509b700ba6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textdlg.h @@ -0,0 +1,17 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/textdlg.h +// Purpose: wxTextEntryDialog class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTDLG_H_BASE_ +#define _WX_TEXTDLG_H_BASE_ + +#include "wx/generic/textdlgg.h" + +#endif // _WX_TEXTDLG_H_BASE_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/textentry.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textentry.h new file mode 100644 index 0000000000..2707afa203 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textentry.h @@ -0,0 +1,332 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/textentry.h +// Purpose: declares wxTextEntry interface defining a simple text entry +// Author: Vadim Zeitlin +// Created: 2007-09-24 +// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTENTRY_H_ +#define _WX_TEXTENTRY_H_ + +// wxTextPos is the position in the text (currently it's hardly used anywhere +// and should probably be replaced with int anyhow) +typedef long wxTextPos; + +class WXDLLIMPEXP_FWD_BASE wxArrayString; +class WXDLLIMPEXP_FWD_CORE wxTextCompleter; +class WXDLLIMPEXP_FWD_CORE wxTextEntryHintData; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +#include "wx/filefn.h" // for wxFILE and wxDIR only +#include "wx/gdicmn.h" // for wxPoint + +// ---------------------------------------------------------------------------- +// wxTextEntryBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextEntryBase +{ +public: + wxTextEntryBase() { m_eventsBlock = 0; m_hintData = NULL; } + virtual ~wxTextEntryBase(); + + + // accessing the value + // ------------------- + + // SetValue() generates a text change event, ChangeValue() doesn't + virtual void SetValue(const wxString& value) + { DoSetValue(value, SetValue_SendEvent); } + virtual void ChangeValue(const wxString& value); + + // writing text inserts it at the current position replacing any current + // selection, appending always inserts it at the end and doesn't remove any + // existing text (but it will reset the selection if there is any) + virtual void WriteText(const wxString& text) = 0; + virtual void AppendText(const wxString& text); + + virtual wxString GetValue() const; + virtual wxString GetRange(long from, long to) const; + bool IsEmpty() const { return GetLastPosition() <= 0; } + + + // editing operations + // ------------------ + + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to) = 0; + virtual void Clear() { SetValue(wxString()); } + void RemoveSelection(); + + + // clipboard operations + // -------------------- + + virtual void Copy() = 0; + virtual void Cut() = 0; + virtual void Paste() = 0; + + virtual bool CanCopy() const; + virtual bool CanCut() const; + virtual bool CanPaste() const; + + // undo/redo + // --------- + + virtual void Undo() = 0; + virtual void Redo() = 0; + + virtual bool CanUndo() const = 0; + virtual bool CanRedo() const = 0; + + + // insertion point + // --------------- + + // note that moving insertion point removes any current selection + virtual void SetInsertionPoint(long pos) = 0; + virtual void SetInsertionPointEnd() { SetInsertionPoint(-1); } + virtual long GetInsertionPoint() const = 0; + virtual long GetLastPosition() const = 0; + + + // selection + // --------- + + virtual void SetSelection(long from, long to) = 0; + virtual void SelectAll() { SetSelection(-1, -1); } + virtual void SelectNone() + { const long pos = GetInsertionPoint(); SetSelection(pos, pos); } + virtual void GetSelection(long *from, long *to) const = 0; + bool HasSelection() const; + virtual wxString GetStringSelection() const; + + + // auto-completion + // --------------- + + // these functions allow to auto-complete the text already entered into the + // control using either the given fixed list of strings, the paths from the + // file system or an arbitrary user-defined completer + // + // they all return true if completion was enabled or false on error (most + // commonly meaning that this functionality is not available under the + // current platform) + + bool AutoComplete(const wxArrayString& choices) + { return DoAutoCompleteStrings(choices); } + + bool AutoCompleteFileNames() + { return DoAutoCompleteFileNames(wxFILE); } + + bool AutoCompleteDirectories() + { return DoAutoCompleteFileNames(wxDIR); } + + // notice that we take ownership of the pointer and will delete it + // + // if the pointer is NULL auto-completion is disabled + bool AutoComplete(wxTextCompleter *completer) + { return DoAutoCompleteCustom(completer); } + + + // status + // ------ + + virtual bool IsEditable() const = 0; + virtual void SetEditable(bool editable) = 0; + + + // set the max number of characters which may be entered in a single line + // text control + virtual void SetMaxLength(unsigned long WXUNUSED(len)) { } + + + // hints + // ----- + + // hint is the (usually greyed out) text shown in the control as long as + // it's empty and doesn't have focus, it is typically used in controls used + // for searching to let the user know what is supposed to be entered there + + virtual bool SetHint(const wxString& hint); + virtual wxString GetHint() const; + + + // margins + // ------- + + // margins are the empty space between borders of control and the text + // itself. When setting margin, use value -1 to indicate that specific + // margin should not be changed. + + bool SetMargins(const wxPoint& pt) + { return DoSetMargins(pt); } + bool SetMargins(wxCoord left, wxCoord top = -1) + { return DoSetMargins(wxPoint(left, top)); } + wxPoint GetMargins() const + { return DoGetMargins(); } + + + // implementation only + // ------------------- + + // generate the wxEVT_TEXT event for GetEditableWindow(), + // like SetValue() does and return true if the event was processed + // + // NB: this is public for wxRichTextCtrl use only right now, do not call it + static bool SendTextUpdatedEvent(wxWindow *win); + + // generate the wxEVT_TEXT event for this window + bool SendTextUpdatedEvent() + { + return SendTextUpdatedEvent(GetEditableWindow()); + } + + + // generate the wxEVT_TEXT event for this window if the + // events are not currently disabled + void SendTextUpdatedEventIfAllowed() + { + if ( EventsAllowed() ) + SendTextUpdatedEvent(); + } + + // this function is provided solely for the purpose of forwarding text + // change notifications state from one control to another, e.g. it can be + // used by a wxComboBox which derives from wxTextEntry if it delegates all + // of its methods to another wxTextCtrl + void ForwardEnableTextChangedEvents(bool enable) + { + // it's important to call the functions which update m_eventsBlock here + // and not just our own EnableTextChangedEvents() because our state + // (i.e. the result of EventsAllowed()) must change as well + if ( enable ) + ResumeTextChangedEvents(); + else + SuppressTextChangedEvents(); + } + +protected: + // flags for DoSetValue(): common part of SetValue() and ChangeValue() and + // also used to implement WriteText() in wxMSW + enum + { + SetValue_NoEvent = 0, + SetValue_SendEvent = 1, + SetValue_SelectionOnly = 2 + }; + + virtual void DoSetValue(const wxString& value, int flags); + virtual wxString DoGetValue() const = 0; + + // override this to return the associated window, it will be used for event + // generation and also by generic hints implementation + virtual wxWindow *GetEditableWindow() = 0; + + // margins functions + virtual bool DoSetMargins(const wxPoint& pt); + virtual wxPoint DoGetMargins() const; + + // the derived classes should override these virtual methods to implement + // auto-completion, they do the same thing as their public counterparts but + // have different names to allow overriding just one of them without hiding + // the other one(s) + virtual bool DoAutoCompleteStrings(const wxArrayString& WXUNUSED(choices)) + { return false; } + virtual bool DoAutoCompleteFileNames(int WXUNUSED(flags)) // wxFILE | wxDIR + { return false; } + virtual bool DoAutoCompleteCustom(wxTextCompleter *completer); + + + // class which should be used to temporarily disable text change events + // + // if suppress argument in ctor is false, nothing is done + class EventsSuppressor + { + public: + EventsSuppressor(wxTextEntryBase *text, bool suppress = true) + : m_text(text), + m_suppress(suppress) + { + if ( m_suppress ) + m_text->SuppressTextChangedEvents(); + } + + ~EventsSuppressor() + { + if ( m_suppress ) + m_text->ResumeTextChangedEvents(); + } + + private: + wxTextEntryBase *m_text; + bool m_suppress; + }; + + friend class EventsSuppressor; + +private: + // suppress or resume the text changed events generation: don't use these + // functions directly, use EventsSuppressor class above instead + void SuppressTextChangedEvents() + { + if ( !m_eventsBlock++ ) + EnableTextChangedEvents(false); + } + + void ResumeTextChangedEvents() + { + if ( !--m_eventsBlock ) + EnableTextChangedEvents(true); + } + + + // this must be overridden in the derived classes if our implementation of + // SetValue() or Replace() is used to disable (and enable back) generation + // of the text changed events + // + // initially the generation of the events is enabled + virtual void EnableTextChangedEvents(bool WXUNUSED(enable)) { } + + // return true if the events are currently not suppressed + bool EventsAllowed() const { return m_eventsBlock == 0; } + + + // if this counter is non-null, events are blocked + unsigned m_eventsBlock; + + // hint-related stuff, only allocated if/when SetHint() is used + wxTextEntryHintData *m_hintData; + + // It needs to call our Do{Get,Set}Value() to work with the real control + // contents. + friend class wxTextEntryHintData; +}; + +#ifdef __WXUNIVERSAL__ + // TODO: we need to use wxTextEntryDelegate here, but for now just prevent + // the GTK/MSW classes from being used in wxUniv build + class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase + { + }; +#elif defined(__WXGTK20__) + #include "wx/gtk/textentry.h" +#elif defined(__WXMAC__) + #include "wx/osx/textentry.h" +#elif defined(__WXMSW__) + #include "wx/msw/textentry.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/textentry.h" +#elif defined(__WXPM__) + #include "wx/os2/textentry.h" +#else + // no platform-specific implementation of wxTextEntry yet + class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase + { + }; +#endif + +#endif // _WX_TEXTENTRY_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/textfile.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textfile.h new file mode 100644 index 0000000000..e6aa3ba663 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textfile.h @@ -0,0 +1,61 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/textfile.h +// Purpose: class wxTextFile to work with text files of _small_ size +// (file is fully loaded in memory) and which understands CR/LF +// differences between platforms. +// Author: Vadim Zeitlin +// Modified by: +// Created: 03.04.98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTFILE_H +#define _WX_TEXTFILE_H + +#include "wx/defs.h" + +#include "wx/textbuf.h" + +#if wxUSE_TEXTFILE + +#include "wx/file.h" + +// ---------------------------------------------------------------------------- +// wxTextFile +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxTextFile : public wxTextBuffer +{ +public: + // constructors + wxTextFile() { } + wxTextFile(const wxString& strFileName); + +protected: + // implement the base class pure virtuals + virtual bool OnExists() const; + virtual bool OnOpen(const wxString &strBufferName, + wxTextBufferOpenMode OpenMode); + virtual bool OnClose(); + virtual bool OnRead(const wxMBConv& conv); + virtual bool OnWrite(wxTextFileType typeNew, const wxMBConv& conv); + +private: + + wxFile m_file; + + wxDECLARE_NO_COPY_CLASS(wxTextFile); +}; + +#else // !wxUSE_TEXTFILE + +// old code relies on the static methods of wxTextFile being always available +// and they still are available in wxTextBuffer (even if !wxUSE_TEXTBUFFER), so +// make it possible to use them in a backwards compatible way +typedef wxTextBuffer wxTextFile; + +#endif // wxUSE_TEXTFILE/!wxUSE_TEXTFILE + +#endif // _WX_TEXTFILE_H + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/textwrapper.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textwrapper.h new file mode 100644 index 0000000000..a708cebd75 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/textwrapper.h @@ -0,0 +1,128 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/textwrapper.h +// Purpose: declaration of wxTextWrapper class +// Author: Vadim Zeitlin +// Created: 2009-05-31 (extracted from dlgcmn.cpp via wx/private/stattext.h) +// Copyright: (c) 1999, 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TEXTWRAPPER_H_ +#define _WX_TEXTWRAPPER_H_ + +#include "wx/window.h" + +// ---------------------------------------------------------------------------- +// wxTextWrapper +// ---------------------------------------------------------------------------- + +// this class is used to wrap the text on word boundary: wrapping is done by +// calling OnStartLine() and OnOutputLine() functions +class WXDLLIMPEXP_CORE wxTextWrapper +{ +public: + wxTextWrapper() { m_eol = false; } + + // win is used for getting the font, text is the text to wrap, width is the + // max line width or -1 to disable wrapping + void Wrap(wxWindow *win, const wxString& text, int widthMax); + + // we don't need it, but just to avoid compiler warnings + virtual ~wxTextWrapper() { } + +protected: + // line may be empty + virtual void OnOutputLine(const wxString& line) = 0; + + // called at the start of every new line (except the very first one) + virtual void OnNewLine() { } + +private: + // call OnOutputLine() and set m_eol to true + void DoOutputLine(const wxString& line) + { + OnOutputLine(line); + + m_eol = true; + } + + // this function is a destructive inspector: when it returns true it also + // resets the flag to false so calling it again wouldn't return true any + // more + bool IsStartOfNewLine() + { + if ( !m_eol ) + return false; + + m_eol = false; + + return true; + } + + + bool m_eol; + + wxDECLARE_NO_COPY_CLASS(wxTextWrapper); +}; + +#if wxUSE_STATTEXT + +#include "wx/sizer.h" +#include "wx/stattext.h" + +// A class creating a sizer with one static text per line of text. Creation of +// the controls used for each line can be customized by overriding +// OnCreateLine() function. +// +// This class is currently private to wxWidgets and used only by wxDialog +// itself. We may make it public later if there is sufficient interest. +class wxTextSizerWrapper : public wxTextWrapper +{ +public: + wxTextSizerWrapper(wxWindow *win) + { + m_win = win; + m_hLine = 0; + } + + wxSizer *CreateSizer(const wxString& text, int widthMax) + { + m_sizer = new wxBoxSizer(wxVERTICAL); + Wrap(m_win, text, widthMax); + return m_sizer; + } + + wxWindow *GetParent() const { return m_win; } + +protected: + virtual wxWindow *OnCreateLine(const wxString& line) + { + return new wxStaticText(m_win, wxID_ANY, + wxControl::EscapeMnemonics(line)); + } + + virtual void OnOutputLine(const wxString& line) + { + if ( !line.empty() ) + { + m_sizer->Add(OnCreateLine(line)); + } + else // empty line, no need to create a control for it + { + if ( !m_hLine ) + m_hLine = m_win->GetCharHeight(); + + m_sizer->Add(5, m_hLine); + } + } + +private: + wxWindow *m_win; + wxSizer *m_sizer; + int m_hLine; +}; + +#endif // wxUSE_STATTEXT + +#endif // _WX_TEXTWRAPPER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/tglbtn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tglbtn.h new file mode 100644 index 0000000000..8cb2a2e891 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tglbtn.h @@ -0,0 +1,101 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/tglbtn.h +// Purpose: This dummy header includes the proper header file for the +// system we're compiling under. +// Author: John Norris, minor changes by Axel Schlueter +// Modified by: +// Created: 08.02.01 +// Copyright: (c) 2000 Johnny C. Norris II +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOGGLEBUTTON_H_BASE_ +#define _WX_TOGGLEBUTTON_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_TOGGLEBTN + +#include "wx/event.h" +#include "wx/anybutton.h" // base class + +extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[]; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TOGGLEBUTTON, wxCommandEvent ); + +// ---------------------------------------------------------------------------- +// wxToggleButtonBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToggleButtonBase : public wxAnyButton +{ +public: + wxToggleButtonBase() { } + + // Get/set the value + virtual void SetValue(bool state) = 0; + virtual bool GetValue() const = 0; + + void UpdateWindowUI(long flags) + { + wxControl::UpdateWindowUI(flags); + + if ( !IsShown() ) + return; + + wxWindow *tlw = wxGetTopLevelParent( this ); + if (tlw && wxPendingDelete.Member( tlw )) + return; + + wxUpdateUIEvent event( GetId() ); + event.SetEventObject(this); + + if (GetEventHandler()->ProcessEvent(event) ) + { + if ( event.GetSetChecked() ) + SetValue( event.GetChecked() ); + } + } + + // Buttons on MSW can look bad if they are not native colours, because + // then they become owner-drawn and not theme-drawn. Disable it here + // in wxToggleButtonBase to make it consistent. + virtual bool ShouldInheritColours() const { return false; } + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + wxDECLARE_NO_COPY_CLASS(wxToggleButtonBase); +}; + + +#define EVT_TOGGLEBUTTON(id, fn) \ + wx__DECLARE_EVT1(wxEVT_TOGGLEBUTTON, id, wxCommandEventHandler(fn)) + +#if defined(__WXUNIVERSAL__) + #include "wx/univ/tglbtn.h" +#elif defined(__WXMSW__) + #include "wx/msw/tglbtn.h" + #define wxHAS_BITMAPTOGGLEBUTTON +#elif defined(__WXGTK20__) + #include "wx/gtk/tglbtn.h" + #define wxHAS_BITMAPTOGGLEBUTTON +#elif defined(__WXGTK__) + #include "wx/gtk1/tglbtn.h" +# elif defined(__WXMOTIF__) + #include "wx/motif/tglbtn.h" +#elif defined(__WXMAC__) + #include "wx/osx/tglbtn.h" + #define wxHAS_BITMAPTOGGLEBUTTON +#elif defined(__WXPM__) + #include "wx/os2/tglbtn.h" +#endif + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TOGGLEBUTTON_CLICKED wxEVT_TOGGLEBUTTON + +#endif // wxUSE_TOGGLEBTN + +#endif // _WX_TOGGLEBUTTON_H_BASE_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/thread.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/thread.h new file mode 100644 index 0000000000..6806d82fea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/thread.h @@ -0,0 +1,879 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/thread.h +// Purpose: Thread API +// Author: Guilhem Lavaux +// Modified by: Vadim Zeitlin (modifications partly inspired by omnithreads +// package from Olivetti & Oracle Research Laboratory) +// Created: 04/13/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_THREAD_H_ +#define _WX_THREAD_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// get the value of wxUSE_THREADS configuration flag +#include "wx/defs.h" + +#if wxUSE_THREADS + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +enum wxMutexError +{ + wxMUTEX_NO_ERROR = 0, // operation completed successfully + wxMUTEX_INVALID, // mutex hasn't been initialized + wxMUTEX_DEAD_LOCK, // mutex is already locked by the calling thread + wxMUTEX_BUSY, // mutex is already locked by another thread + wxMUTEX_UNLOCKED, // attempt to unlock a mutex which is not locked + wxMUTEX_TIMEOUT, // LockTimeout() has timed out + wxMUTEX_MISC_ERROR // any other error +}; + +enum wxCondError +{ + wxCOND_NO_ERROR = 0, + wxCOND_INVALID, + wxCOND_TIMEOUT, // WaitTimeout() has timed out + wxCOND_MISC_ERROR +}; + +enum wxSemaError +{ + wxSEMA_NO_ERROR = 0, + wxSEMA_INVALID, // semaphore hasn't been initialized successfully + wxSEMA_BUSY, // returned by TryWait() if Wait() would block + wxSEMA_TIMEOUT, // returned by WaitTimeout() + wxSEMA_OVERFLOW, // Post() would increase counter past the max + wxSEMA_MISC_ERROR +}; + +enum wxThreadError +{ + wxTHREAD_NO_ERROR = 0, // No error + wxTHREAD_NO_RESOURCE, // No resource left to create a new thread + wxTHREAD_RUNNING, // The thread is already running + wxTHREAD_NOT_RUNNING, // The thread isn't running + wxTHREAD_KILLED, // Thread we waited for had to be killed + wxTHREAD_MISC_ERROR // Some other error +}; + +enum wxThreadKind +{ + wxTHREAD_DETACHED, + wxTHREAD_JOINABLE +}; + +enum wxThreadWait +{ + wxTHREAD_WAIT_BLOCK, + wxTHREAD_WAIT_YIELD, // process events while waiting; MSW only + + // For compatibility reasons we use wxTHREAD_WAIT_YIELD by default as this + // was the default behaviour of wxMSW 2.8 but it should be avoided as it's + // dangerous and not portable. +#if WXWIN_COMPATIBILITY_2_8 + wxTHREAD_WAIT_DEFAULT = wxTHREAD_WAIT_YIELD +#else + wxTHREAD_WAIT_DEFAULT = wxTHREAD_WAIT_BLOCK +#endif +}; + +// Obsolete synonyms for wxPRIORITY_XXX for backwards compatibility-only +enum +{ + WXTHREAD_MIN_PRIORITY = wxPRIORITY_MIN, + WXTHREAD_DEFAULT_PRIORITY = wxPRIORITY_DEFAULT, + WXTHREAD_MAX_PRIORITY = wxPRIORITY_MAX +}; + +// There are 2 types of mutexes: normal mutexes and recursive ones. The attempt +// to lock a normal mutex by a thread which already owns it results in +// undefined behaviour (it always works under Windows, it will almost always +// result in a deadlock under Unix). Locking a recursive mutex in such +// situation always succeeds and it must be unlocked as many times as it has +// been locked. +// +// However recursive mutexes have several important drawbacks: first, in the +// POSIX implementation, they're less efficient. Second, and more importantly, +// they CAN NOT BE USED WITH CONDITION VARIABLES under Unix! Using them with +// wxCondition will work under Windows and some Unices (notably Linux) but will +// deadlock under other Unix versions (e.g. Solaris). As it might be difficult +// to ensure that a recursive mutex is not used with wxCondition, it is a good +// idea to avoid using recursive mutexes at all. Also, the last problem with +// them is that some (older) Unix versions don't support this at all -- which +// results in a configure warning when building and a deadlock when using them. +enum wxMutexType +{ + // normal mutex: try to always use this one + wxMUTEX_DEFAULT, + + // recursive mutex: don't use these ones with wxCondition + wxMUTEX_RECURSIVE +}; + +// forward declarations +class WXDLLIMPEXP_FWD_BASE wxThreadHelper; +class WXDLLIMPEXP_FWD_BASE wxConditionInternal; +class WXDLLIMPEXP_FWD_BASE wxMutexInternal; +class WXDLLIMPEXP_FWD_BASE wxSemaphoreInternal; +class WXDLLIMPEXP_FWD_BASE wxThreadInternal; + +// ---------------------------------------------------------------------------- +// A mutex object is a synchronization object whose state is set to signaled +// when it is not owned by any thread, and nonsignaled when it is owned. Its +// name comes from its usefulness in coordinating mutually-exclusive access to +// a shared resource. Only one thread at a time can own a mutex object. +// ---------------------------------------------------------------------------- + +// you should consider wxMutexLocker whenever possible instead of directly +// working with wxMutex class - it is safer +class WXDLLIMPEXP_BASE wxMutex +{ +public: + // constructor & destructor + // ------------------------ + + // create either default (always safe) or recursive mutex + wxMutex(wxMutexType mutexType = wxMUTEX_DEFAULT); + + // destroys the mutex kernel object + ~wxMutex(); + + // test if the mutex has been created successfully + bool IsOk() const; + + // mutex operations + // ---------------- + + // Lock the mutex, blocking on it until it is unlocked by the other thread. + // The result of locking a mutex already locked by the current thread + // depend on the mutex type. + // + // The caller must call Unlock() later if Lock() returned wxMUTEX_NO_ERROR. + wxMutexError Lock(); + + // Same as Lock() but return wxMUTEX_TIMEOUT if the mutex can't be locked + // during the given number of milliseconds + wxMutexError LockTimeout(unsigned long ms); + + // Try to lock the mutex: if it is currently locked, return immediately + // with an error. Otherwise the caller must call Unlock(). + wxMutexError TryLock(); + + // Unlock the mutex. It is an error to unlock an already unlocked mutex + wxMutexError Unlock(); + +protected: + wxMutexInternal *m_internal; + + friend class wxConditionInternal; + + wxDECLARE_NO_COPY_CLASS(wxMutex); +}; + +// a helper class which locks the mutex in the ctor and unlocks it in the dtor: +// this ensures that mutex is always unlocked, even if the function returns or +// throws an exception before it reaches the end +class WXDLLIMPEXP_BASE wxMutexLocker +{ +public: + // lock the mutex in the ctor + wxMutexLocker(wxMutex& mutex) + : m_isOk(false), m_mutex(mutex) + { m_isOk = ( m_mutex.Lock() == wxMUTEX_NO_ERROR ); } + + // returns true if mutex was successfully locked in ctor + bool IsOk() const + { return m_isOk; } + + // unlock the mutex in dtor + ~wxMutexLocker() + { if ( IsOk() ) m_mutex.Unlock(); } + +private: + // no assignment operator nor copy ctor + wxMutexLocker(const wxMutexLocker&); + wxMutexLocker& operator=(const wxMutexLocker&); + + bool m_isOk; + wxMutex& m_mutex; +}; + +// ---------------------------------------------------------------------------- +// Critical section: this is the same as mutex but is only visible to the +// threads of the same process. For the platforms which don't have native +// support for critical sections, they're implemented entirely in terms of +// mutexes. +// +// NB: wxCriticalSection object does not allocate any memory in its ctor +// which makes it possible to have static globals of this class +// ---------------------------------------------------------------------------- + +// in order to avoid any overhead under platforms where critical sections are +// just mutexes make all wxCriticalSection class functions inline +#if !defined(__WINDOWS__) + #define wxCRITSECT_IS_MUTEX 1 + + #define wxCRITSECT_INLINE WXEXPORT inline +#else // MSW + #define wxCRITSECT_IS_MUTEX 0 + + #define wxCRITSECT_INLINE +#endif // MSW/!MSW + +enum wxCriticalSectionType +{ + // recursive critical section + wxCRITSEC_DEFAULT, + + // non-recursive critical section + wxCRITSEC_NON_RECURSIVE +}; + +// you should consider wxCriticalSectionLocker whenever possible instead of +// directly working with wxCriticalSection class - it is safer +class WXDLLIMPEXP_BASE wxCriticalSection +{ +public: + // ctor & dtor + wxCRITSECT_INLINE wxCriticalSection( wxCriticalSectionType critSecType = wxCRITSEC_DEFAULT ); + wxCRITSECT_INLINE ~wxCriticalSection(); + // enter the section (the same as locking a mutex) + wxCRITSECT_INLINE void Enter(); + + // try to enter the section (the same as trying to lock a mutex) + wxCRITSECT_INLINE bool TryEnter(); + + // leave the critical section (same as unlocking a mutex) + wxCRITSECT_INLINE void Leave(); + +private: +#if wxCRITSECT_IS_MUTEX + wxMutex m_mutex; +#elif defined(__WINDOWS__) + // we can't allocate any memory in the ctor, so use placement new - + // unfortunately, we have to hardcode the sizeof() here because we can't + // include windows.h from this public header and we also have to use the + // union to force the correct (i.e. maximal) alignment + // + // if CRITICAL_SECTION size changes in Windows, you'll get an assert from + // thread.cpp and will need to increase the buffer size +#ifdef __WIN64__ + typedef char wxCritSectBuffer[40]; +#else // __WIN32__ + typedef char wxCritSectBuffer[24]; +#endif + union + { + unsigned long m_dummy1; + void *m_dummy2; + + wxCritSectBuffer m_buffer; + }; +#endif // Unix&OS2/Win32 + + wxDECLARE_NO_COPY_CLASS(wxCriticalSection); +}; + +#if wxCRITSECT_IS_MUTEX + // implement wxCriticalSection using mutexes + inline wxCriticalSection::wxCriticalSection( wxCriticalSectionType critSecType ) + : m_mutex( critSecType == wxCRITSEC_DEFAULT ? wxMUTEX_RECURSIVE : wxMUTEX_DEFAULT ) { } + inline wxCriticalSection::~wxCriticalSection() { } + + inline void wxCriticalSection::Enter() { (void)m_mutex.Lock(); } + inline bool wxCriticalSection::TryEnter() { return m_mutex.TryLock() == wxMUTEX_NO_ERROR; } + inline void wxCriticalSection::Leave() { (void)m_mutex.Unlock(); } +#endif // wxCRITSECT_IS_MUTEX + +#undef wxCRITSECT_INLINE +#undef wxCRITSECT_IS_MUTEX + +// wxCriticalSectionLocker is the same to critical sections as wxMutexLocker is +// to mutexes +class WXDLLIMPEXP_BASE wxCriticalSectionLocker +{ +public: + wxCriticalSectionLocker(wxCriticalSection& cs) + : m_critsect(cs) + { + m_critsect.Enter(); + } + + ~wxCriticalSectionLocker() + { + m_critsect.Leave(); + } + +private: + wxCriticalSection& m_critsect; + + wxDECLARE_NO_COPY_CLASS(wxCriticalSectionLocker); +}; + +// ---------------------------------------------------------------------------- +// wxCondition models a POSIX condition variable which allows one (or more) +// thread(s) to wait until some condition is fulfilled +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxCondition +{ +public: + // Each wxCondition object is associated with a (single) wxMutex object. + // The mutex object MUST be locked before calling Wait() + wxCondition(wxMutex& mutex); + + // dtor is not virtual, don't use this class polymorphically + ~wxCondition(); + + // return true if the condition has been created successfully + bool IsOk() const; + + // NB: the associated mutex MUST be locked beforehand by the calling thread + // + // it atomically releases the lock on the associated mutex + // and starts waiting to be woken up by a Signal()/Broadcast() + // once its signaled, then it will wait until it can reacquire + // the lock on the associated mutex object, before returning. + wxCondError Wait(); + + // std::condition_variable-like variant that evaluates the associated condition + template<typename Functor> + wxCondError Wait(const Functor& predicate) + { + while ( !predicate() ) + { + wxCondError e = Wait(); + if ( e != wxCOND_NO_ERROR ) + return e; + } + return wxCOND_NO_ERROR; + } + + // exactly as Wait() except that it may also return if the specified + // timeout elapses even if the condition hasn't been signalled: in this + // case, the return value is wxCOND_TIMEOUT, otherwise (i.e. in case of a + // normal return) it is wxCOND_NO_ERROR. + // + // the timeout parameter specifies an interval that needs to be waited for + // in milliseconds + wxCondError WaitTimeout(unsigned long milliseconds); + + // NB: the associated mutex may or may not be locked by the calling thread + // + // this method unblocks one thread if any are blocking on the condition. + // if no thread is blocking in Wait(), then the signal is NOT remembered + // The thread which was blocking on Wait() will then reacquire the lock + // on the associated mutex object before returning + wxCondError Signal(); + + // NB: the associated mutex may or may not be locked by the calling thread + // + // this method unblocks all threads if any are blocking on the condition. + // if no thread is blocking in Wait(), then the signal is NOT remembered + // The threads which were blocking on Wait() will then reacquire the lock + // on the associated mutex object before returning. + wxCondError Broadcast(); + + +#if WXWIN_COMPATIBILITY_2_6 + // deprecated version, don't use + wxDEPRECATED( bool Wait(unsigned long milliseconds) ); +#endif // WXWIN_COMPATIBILITY_2_6 + +private: + wxConditionInternal *m_internal; + + wxDECLARE_NO_COPY_CLASS(wxCondition); +}; + +#if WXWIN_COMPATIBILITY_2_6 + inline bool wxCondition::Wait(unsigned long milliseconds) + { return WaitTimeout(milliseconds) == wxCOND_NO_ERROR; } +#endif // WXWIN_COMPATIBILITY_2_6 + +// ---------------------------------------------------------------------------- +// wxSemaphore: a counter limiting the number of threads concurrently accessing +// a shared resource +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxSemaphore +{ +public: + // specifying a maxcount of 0 actually makes wxSemaphore behave as if there + // is no upper limit, if maxcount is 1 the semaphore behaves as a mutex + wxSemaphore( int initialcount = 0, int maxcount = 0 ); + + // dtor is not virtual, don't use this class polymorphically + ~wxSemaphore(); + + // return true if the semaphore has been created successfully + bool IsOk() const; + + // wait indefinitely, until the semaphore count goes beyond 0 + // and then decrement it and return (this method might have been called + // Acquire()) + wxSemaError Wait(); + + // same as Wait(), but does not block, returns wxSEMA_NO_ERROR if + // successful and wxSEMA_BUSY if the count is currently zero + wxSemaError TryWait(); + + // same as Wait(), but as a timeout limit, returns wxSEMA_NO_ERROR if the + // semaphore was acquired and wxSEMA_TIMEOUT if the timeout has elapsed + wxSemaError WaitTimeout(unsigned long milliseconds); + + // increments the semaphore count and signals one of the waiting threads + wxSemaError Post(); + +private: + wxSemaphoreInternal *m_internal; + + wxDECLARE_NO_COPY_CLASS(wxSemaphore); +}; + +// ---------------------------------------------------------------------------- +// wxThread: class encapsulating a thread of execution +// ---------------------------------------------------------------------------- + +// there are two different kinds of threads: joinable and detached (default) +// ones. Only joinable threads can return a return code and only detached +// threads auto-delete themselves - the user should delete the joinable +// threads manually. + +// NB: in the function descriptions the words "this thread" mean the thread +// created by the wxThread object while "main thread" is the thread created +// during the process initialization (a.k.a. the GUI thread) + +// On VMS thread pointers are 64 bits (also needed for other systems??? +#ifdef __VMS + typedef unsigned long long wxThreadIdType; +#else + typedef unsigned long wxThreadIdType; +#endif + +class WXDLLIMPEXP_BASE wxThread +{ +public: + // the return type for the thread function + typedef void *ExitCode; + + // static functions + // Returns the wxThread object for the calling thread. NULL is returned + // if the caller is the main thread (but it's recommended to use + // IsMain() and only call This() for threads other than the main one + // because NULL is also returned on error). If the thread wasn't + // created with wxThread class, the returned value is undefined. + static wxThread *This(); + + // Returns true if current thread is the main thread. + // + // Notice that it also returns true if main thread id hadn't been + // initialized yet on the assumption that it's too early in wx startup + // process for any other threads to have been created in this case. + static bool IsMain() + { + return !ms_idMainThread || GetCurrentId() == ms_idMainThread; + } + + // Return the main thread id + static wxThreadIdType GetMainId() { return ms_idMainThread; } + + // Release the rest of our time slice letting the other threads run + static void Yield(); + + // Sleep during the specified period of time in milliseconds + // + // This is the same as wxMilliSleep(). + static void Sleep(unsigned long milliseconds); + + // get the number of system CPUs - useful with SetConcurrency() + // (the "best" value for it is usually number of CPUs + 1) + // + // Returns -1 if unknown, number of CPUs otherwise + static int GetCPUCount(); + + // Get the platform specific thread ID and return as a long. This + // can be used to uniquely identify threads, even if they are not + // wxThreads. This is used by wxPython. + static wxThreadIdType GetCurrentId(); + + // sets the concurrency level: this is, roughly, the number of threads + // the system tries to schedule to run in parallel. 0 means the + // default value (usually acceptable, but may not yield the best + // performance for this process) + // + // Returns true on success, false otherwise (if not implemented, for + // example) + static bool SetConcurrency(size_t level); + + // constructor only creates the C++ thread object and doesn't create (or + // start) the real thread + wxThread(wxThreadKind kind = wxTHREAD_DETACHED); + + // functions that change the thread state: all these can only be called + // from _another_ thread (typically the thread that created this one, e.g. + // the main thread), not from the thread itself + + // create a new thread and optionally set the stack size on + // platforms that support that - call Run() to start it + // (special cased for watcom which won't accept 0 default) + + wxThreadError Create(unsigned int stackSize = 0); + + // starts execution of the thread - from the moment Run() is called + // the execution of wxThread::Entry() may start at any moment, caller + // shouldn't suppose that it starts after (or before) Run() returns. + wxThreadError Run(); + + // stops the thread if it's running and deletes the wxThread object if + // this is a detached thread freeing its memory - otherwise (for + // joinable threads) you still need to delete wxThread object + // yourself. + // + // this function only works if the thread calls TestDestroy() + // periodically - the thread will only be deleted the next time it + // does it! + // + // will fill the rc pointer with the thread exit code if it's !NULL + wxThreadError Delete(ExitCode *rc = NULL, + wxThreadWait waitMode = wxTHREAD_WAIT_DEFAULT); + + // waits for a joinable thread to finish and returns its exit code + // + // Returns (ExitCode)-1 on error (for example, if the thread is not + // joinable) + ExitCode Wait(wxThreadWait waitMode = wxTHREAD_WAIT_DEFAULT); + + // kills the thread without giving it any chance to clean up - should + // not be used under normal circumstances, use Delete() instead. + // It is a dangerous function that should only be used in the most + // extreme cases! + // + // The wxThread object is deleted by Kill() if the thread is + // detachable, but you still have to delete it manually for joinable + // threads. + wxThreadError Kill(); + + // pause a running thread: as Delete(), this only works if the thread + // calls TestDestroy() regularly + wxThreadError Pause(); + + // resume a paused thread + wxThreadError Resume(); + + // priority + // Sets the priority to "prio" which must be in 0..100 range (see + // also wxPRIORITY_XXX constants). + // + // NB: the priority can only be set before the thread is created + void SetPriority(unsigned int prio); + + // Get the current priority. + unsigned int GetPriority() const; + + // thread status inquiries + // Returns true if the thread is alive: i.e. running or suspended + bool IsAlive() const; + // Returns true if the thread is running (not paused, not killed). + bool IsRunning() const; + // Returns true if the thread is suspended + bool IsPaused() const; + + // is the thread of detached kind? + bool IsDetached() const { return m_isDetached; } + + // Get the thread ID - a platform dependent number which uniquely + // identifies a thread inside a process + wxThreadIdType GetId() const; + + wxThreadKind GetKind() const + { return m_isDetached ? wxTHREAD_DETACHED : wxTHREAD_JOINABLE; } + + // Returns true if the thread was asked to terminate: this function should + // be called by the thread from time to time, otherwise the main thread + // will be left forever in Delete()! + virtual bool TestDestroy(); + + // dtor is public, but the detached threads should never be deleted - use + // Delete() instead (or leave the thread terminate by itself) + virtual ~wxThread(); + +protected: + // exits from the current thread - can be called only from this thread + void Exit(ExitCode exitcode = 0); + + // entry point for the thread - called by Run() and executes in the context + // of this thread. + virtual void *Entry() = 0; + + // use this to call the Entry() virtual method + void *CallEntry(); + + // Callbacks which may be overridden by the derived class to perform some + // specific actions when the thread is deleted or killed. By default they + // do nothing. + + // This one is called by Delete() before actually deleting the thread and + // is executed in the context of the thread that called Delete(). + virtual void OnDelete() {} + + // This one is called by Kill() before killing the thread and is executed + // in the context of the thread that called Kill(). + virtual void OnKill() {} + +private: + // no copy ctor/assignment operator + wxThread(const wxThread&); + wxThread& operator=(const wxThread&); + + // called when the thread exits - in the context of this thread + // + // NB: this function will not be called if the thread is Kill()ed + virtual void OnExit() { } + + friend class wxThreadInternal; + friend class wxThreadModule; + + + // the main thread identifier, should be set on startup + static wxThreadIdType ms_idMainThread; + + // the (platform-dependent) thread class implementation + wxThreadInternal *m_internal; + + // protects access to any methods of wxThreadInternal object + wxCriticalSection m_critsect; + + // true if the thread is detached, false if it is joinable + bool m_isDetached; +}; + +// wxThreadHelperThread class +// -------------------------- + +class WXDLLIMPEXP_BASE wxThreadHelperThread : public wxThread +{ +public: + // constructor only creates the C++ thread object and doesn't create (or + // start) the real thread + wxThreadHelperThread(wxThreadHelper& owner, wxThreadKind kind) + : wxThread(kind), m_owner(owner) + { } + +protected: + // entry point for the thread -- calls Entry() in owner. + virtual void *Entry(); + +private: + // the owner of the thread + wxThreadHelper& m_owner; + + // no copy ctor/assignment operator + wxThreadHelperThread(const wxThreadHelperThread&); + wxThreadHelperThread& operator=(const wxThreadHelperThread&); +}; + +// ---------------------------------------------------------------------------- +// wxThreadHelper: this class implements the threading logic to run a +// background task in another object (such as a window). It is a mix-in: just +// derive from it to implement a threading background task in your class. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxThreadHelper +{ +private: + void KillThread() + { + // If wxThreadHelperThread is detached and is about to finish, it will + // set m_thread to NULL so don't delete it then. + // But if KillThread is called before wxThreadHelperThread (in detached mode) + // sets it to NULL, then the thread object still exists and can be killed + wxCriticalSectionLocker locker(m_critSection); + + if ( m_thread ) + { + m_thread->Kill(); + + if ( m_kind == wxTHREAD_JOINABLE ) + delete m_thread; + + m_thread = NULL; + } + } + +public: + // constructor only initializes m_thread to NULL + wxThreadHelper(wxThreadKind kind = wxTHREAD_JOINABLE) + : m_thread(NULL), m_kind(kind) { } + + // destructor deletes m_thread + virtual ~wxThreadHelper() { KillThread(); } + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( wxThreadError Create(unsigned int stackSize = 0) ); +#endif + + // create a new thread (and optionally set the stack size on platforms that + // support/need that), call Run() to start it + wxThreadError CreateThread(wxThreadKind kind = wxTHREAD_JOINABLE, + unsigned int stackSize = 0) + { + KillThread(); + + m_kind = kind; + m_thread = new wxThreadHelperThread(*this, m_kind); + + return m_thread->Create(stackSize); + } + + // entry point for the thread - called by Run() and executes in the context + // of this thread. + virtual void *Entry() = 0; + + // returns a pointer to the thread which can be used to call Run() + wxThread *GetThread() const + { + wxCriticalSectionLocker locker((wxCriticalSection&)m_critSection); + + wxThread* thread = m_thread; + + return thread; + } + +protected: + wxThread *m_thread; + wxThreadKind m_kind; + wxCriticalSection m_critSection; // To guard the m_thread variable + + friend class wxThreadHelperThread; +}; + +#if WXWIN_COMPATIBILITY_2_8 +inline wxThreadError wxThreadHelper::Create(unsigned int stackSize) +{ return CreateThread(m_kind, stackSize); } +#endif + +// call Entry() in owner, put it down here to avoid circular declarations +inline void *wxThreadHelperThread::Entry() +{ + void * const result = m_owner.Entry(); + + wxCriticalSectionLocker locker(m_owner.m_critSection); + + // Detached thread will be deleted after returning, so make sure + // wxThreadHelper::GetThread will not return an invalid pointer. + // And that wxThreadHelper::KillThread will not try to kill + // an already deleted thread + if ( m_owner.m_kind == wxTHREAD_DETACHED ) + m_owner.m_thread = NULL; + + return result; +} + +// ---------------------------------------------------------------------------- +// Automatic initialization +// ---------------------------------------------------------------------------- + +// GUI mutex handling. +void WXDLLIMPEXP_BASE wxMutexGuiEnter(); +void WXDLLIMPEXP_BASE wxMutexGuiLeave(); + +// macros for entering/leaving critical sections which may be used without +// having to take them inside "#if wxUSE_THREADS" +#define wxENTER_CRIT_SECT(cs) (cs).Enter() +#define wxLEAVE_CRIT_SECT(cs) (cs).Leave() +#define wxCRIT_SECT_DECLARE(cs) static wxCriticalSection cs +#define wxCRIT_SECT_DECLARE_MEMBER(cs) wxCriticalSection cs +#define wxCRIT_SECT_LOCKER(name, cs) wxCriticalSectionLocker name(cs) + +// function for checking if we're in the main thread which may be used whether +// wxUSE_THREADS is 0 or 1 +inline bool wxIsMainThread() { return wxThread::IsMain(); } + +#else // !wxUSE_THREADS + +// no thread support +inline void wxMutexGuiEnter() { } +inline void wxMutexGuiLeave() { } + +// macros for entering/leaving critical sections which may be used without +// having to take them inside "#if wxUSE_THREADS" +// (the implementation uses dummy structs to force semicolon after the macro; +// also notice that Watcom doesn't like declaring a struct as a member so we +// need to actually define it in wxCRIT_SECT_DECLARE_MEMBER) +#define wxENTER_CRIT_SECT(cs) do {} while (0) +#define wxLEAVE_CRIT_SECT(cs) do {} while (0) +#define wxCRIT_SECT_DECLARE(cs) struct wxDummyCS##cs +#define wxCRIT_SECT_DECLARE_MEMBER(cs) struct wxDummyCSMember##cs { } +#define wxCRIT_SECT_LOCKER(name, cs) struct wxDummyCSLocker##name + +// if there is only one thread, it is always the main one +inline bool wxIsMainThread() { return true; } + +#endif // wxUSE_THREADS/!wxUSE_THREADS + +// mark part of code as being a critical section: this macro declares a +// critical section with the given name and enters it immediately and leaves +// it at the end of the current scope +// +// example: +// +// int Count() +// { +// static int s_counter = 0; +// +// wxCRITICAL_SECTION(counter); +// +// return ++s_counter; +// } +// +// this function is MT-safe in presence of the threads but there is no +// overhead when the library is compiled without threads +#define wxCRITICAL_SECTION(name) \ + wxCRIT_SECT_DECLARE(s_cs##name); \ + wxCRIT_SECT_LOCKER(cs##name##Locker, s_cs##name) + +// automatically lock GUI mutex in ctor and unlock it in dtor +class WXDLLIMPEXP_BASE wxMutexGuiLocker +{ +public: + wxMutexGuiLocker() { wxMutexGuiEnter(); } + ~wxMutexGuiLocker() { wxMutexGuiLeave(); } +}; + +// ----------------------------------------------------------------------------- +// implementation only until the end of file +// ----------------------------------------------------------------------------- + +#if wxUSE_THREADS + +#if defined(__WINDOWS__) || defined(__OS2__) || defined(__EMX__) || defined(__DARWIN__) + // unlock GUI if there are threads waiting for and lock it back when + // there are no more of them - should be called periodically by the main + // thread + extern void WXDLLIMPEXP_BASE wxMutexGuiLeaveOrEnter(); + + // returns true if the main thread has GUI lock + extern bool WXDLLIMPEXP_BASE wxGuiOwnedByMainThread(); + + // wakes up the main thread if it's sleeping inside ::GetMessage() + extern void WXDLLIMPEXP_BASE wxWakeUpMainThread(); + +#ifndef __DARWIN__ + // return true if the main thread is waiting for some other to terminate: + // wxApp then should block all "dangerous" messages + extern bool WXDLLIMPEXP_BASE wxIsWaitingForThread(); +#endif +#endif // MSW, OS/2 + +#endif // wxUSE_THREADS + +#endif // _WX_THREAD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/thrimpl.cpp b/3rdparty/wxwidgets3.0-3.0.1/include/wx/thrimpl.cpp new file mode 100644 index 0000000000..000b24d589 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/thrimpl.cpp @@ -0,0 +1,357 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/thrimpl.cpp +// Purpose: common part of wxThread Implementations +// Author: Vadim Zeitlin +// Modified by: +// Created: 04.06.02 (extracted from src/*/thread.cpp files) +// Copyright: (c) Vadim Zeitlin (2002) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// this file is supposed to be included only by the various thread.cpp + +// ---------------------------------------------------------------------------- +// wxMutex +// ---------------------------------------------------------------------------- + +wxMutex::wxMutex(wxMutexType mutexType) +{ + m_internal = new wxMutexInternal(mutexType); + + if ( !m_internal->IsOk() ) + { + delete m_internal; + m_internal = NULL; + } +} + +wxMutex::~wxMutex() +{ + delete m_internal; +} + +bool wxMutex::IsOk() const +{ + return m_internal != NULL; +} + +wxMutexError wxMutex::Lock() +{ + wxCHECK_MSG( m_internal, wxMUTEX_INVALID, + wxT("wxMutex::Lock(): not initialized") ); + + return m_internal->Lock(); +} + +wxMutexError wxMutex::LockTimeout(unsigned long ms) +{ + wxCHECK_MSG( m_internal, wxMUTEX_INVALID, + wxT("wxMutex::Lock(): not initialized") ); + + return m_internal->Lock(ms); +} + +wxMutexError wxMutex::TryLock() +{ + wxCHECK_MSG( m_internal, wxMUTEX_INVALID, + wxT("wxMutex::TryLock(): not initialized") ); + + return m_internal->TryLock(); +} + +wxMutexError wxMutex::Unlock() +{ + wxCHECK_MSG( m_internal, wxMUTEX_INVALID, + wxT("wxMutex::Unlock(): not initialized") ); + + return m_internal->Unlock(); +} + +// -------------------------------------------------------------------------- +// wxConditionInternal +// -------------------------------------------------------------------------- + +// Win32 and OS/2 don't have explicit support for the POSIX condition +// variables and their events/event semaphores have quite different semantics, +// so we reimplement the conditions from scratch using the mutexes and +// semaphores +#if defined(__WINDOWS__) || defined(__OS2__) || defined(__EMX__) + +class wxConditionInternal +{ +public: + wxConditionInternal(wxMutex& mutex); + + bool IsOk() const { return m_mutex.IsOk() && m_semaphore.IsOk(); } + + wxCondError Wait(); + wxCondError WaitTimeout(unsigned long milliseconds); + + wxCondError Signal(); + wxCondError Broadcast(); + +private: + // the number of threads currently waiting for this condition + LONG m_numWaiters; + + // the critical section protecting m_numWaiters + wxCriticalSection m_csWaiters; + + wxMutex& m_mutex; + wxSemaphore m_semaphore; + + wxDECLARE_NO_COPY_CLASS(wxConditionInternal); +}; + +wxConditionInternal::wxConditionInternal(wxMutex& mutex) + : m_mutex(mutex) +{ + // another thread can't access it until we return from ctor, so no need to + // protect access to m_numWaiters here + m_numWaiters = 0; +} + +wxCondError wxConditionInternal::Wait() +{ + // increment the number of waiters + { + wxCriticalSectionLocker lock(m_csWaiters); + m_numWaiters++; + } + + m_mutex.Unlock(); + + // after unlocking the mutex other threads may Signal() us, but it is ok + // now as we had already incremented m_numWaiters so Signal() will post the + // semaphore and decrement m_numWaiters back even if it is called before we + // start to Wait() + const wxSemaError err = m_semaphore.Wait(); + + m_mutex.Lock(); + + if ( err == wxSEMA_NO_ERROR ) + { + // m_numWaiters was decremented by Signal() + return wxCOND_NO_ERROR; + } + + // but in case of an error we need to do it manually + { + wxCriticalSectionLocker lock(m_csWaiters); + m_numWaiters--; + } + + return err == wxSEMA_TIMEOUT ? wxCOND_TIMEOUT : wxCOND_MISC_ERROR; +} + +wxCondError wxConditionInternal::WaitTimeout(unsigned long milliseconds) +{ + { + wxCriticalSectionLocker lock(m_csWaiters); + m_numWaiters++; + } + + m_mutex.Unlock(); + + wxSemaError err = m_semaphore.WaitTimeout(milliseconds); + + m_mutex.Lock(); + + if ( err == wxSEMA_NO_ERROR ) + return wxCOND_NO_ERROR; + + if ( err == wxSEMA_TIMEOUT ) + { + // a potential race condition exists here: it happens when a waiting + // thread times out but doesn't have time to decrement m_numWaiters yet + // before Signal() is called in another thread + // + // to handle this particular case, check the semaphore again after + // acquiring m_csWaiters lock -- this will catch the signals missed + // during this window + wxCriticalSectionLocker lock(m_csWaiters); + + err = m_semaphore.WaitTimeout(0); + if ( err == wxSEMA_NO_ERROR ) + return wxCOND_NO_ERROR; + + // we need to decrement m_numWaiters ourselves as it wasn't done by + // Signal() + m_numWaiters--; + + return err == wxSEMA_TIMEOUT ? wxCOND_TIMEOUT : wxCOND_MISC_ERROR; + } + + // undo m_numWaiters++ above in case of an error + { + wxCriticalSectionLocker lock(m_csWaiters); + m_numWaiters--; + } + + return wxCOND_MISC_ERROR; +} + +wxCondError wxConditionInternal::Signal() +{ + wxCriticalSectionLocker lock(m_csWaiters); + + if ( m_numWaiters > 0 ) + { + // increment the semaphore by 1 + if ( m_semaphore.Post() != wxSEMA_NO_ERROR ) + return wxCOND_MISC_ERROR; + + m_numWaiters--; + } + + return wxCOND_NO_ERROR; +} + +wxCondError wxConditionInternal::Broadcast() +{ + wxCriticalSectionLocker lock(m_csWaiters); + + while ( m_numWaiters > 0 ) + { + if ( m_semaphore.Post() != wxSEMA_NO_ERROR ) + return wxCOND_MISC_ERROR; + + m_numWaiters--; + } + + return wxCOND_NO_ERROR; +} + +#endif // __WINDOWS__ || __OS2__ || __EMX__ + +// ---------------------------------------------------------------------------- +// wxCondition +// ---------------------------------------------------------------------------- + +wxCondition::wxCondition(wxMutex& mutex) +{ + m_internal = new wxConditionInternal(mutex); + + if ( !m_internal->IsOk() ) + { + delete m_internal; + m_internal = NULL; + } +} + +wxCondition::~wxCondition() +{ + delete m_internal; +} + +bool wxCondition::IsOk() const +{ + return m_internal != NULL; +} + +wxCondError wxCondition::Wait() +{ + wxCHECK_MSG( m_internal, wxCOND_INVALID, + wxT("wxCondition::Wait(): not initialized") ); + + return m_internal->Wait(); +} + +wxCondError wxCondition::WaitTimeout(unsigned long milliseconds) +{ + wxCHECK_MSG( m_internal, wxCOND_INVALID, + wxT("wxCondition::Wait(): not initialized") ); + + return m_internal->WaitTimeout(milliseconds); +} + +wxCondError wxCondition::Signal() +{ + wxCHECK_MSG( m_internal, wxCOND_INVALID, + wxT("wxCondition::Signal(): not initialized") ); + + return m_internal->Signal(); +} + +wxCondError wxCondition::Broadcast() +{ + wxCHECK_MSG( m_internal, wxCOND_INVALID, + wxT("wxCondition::Broadcast(): not initialized") ); + + return m_internal->Broadcast(); +} + +// -------------------------------------------------------------------------- +// wxSemaphore +// -------------------------------------------------------------------------- + +wxSemaphore::wxSemaphore(int initialcount, int maxcount) +{ + m_internal = new wxSemaphoreInternal( initialcount, maxcount ); + if ( !m_internal->IsOk() ) + { + delete m_internal; + m_internal = NULL; + } +} + +wxSemaphore::~wxSemaphore() +{ + delete m_internal; +} + +bool wxSemaphore::IsOk() const +{ + return m_internal != NULL; +} + +wxSemaError wxSemaphore::Wait() +{ + wxCHECK_MSG( m_internal, wxSEMA_INVALID, + wxT("wxSemaphore::Wait(): not initialized") ); + + return m_internal->Wait(); +} + +wxSemaError wxSemaphore::TryWait() +{ + wxCHECK_MSG( m_internal, wxSEMA_INVALID, + wxT("wxSemaphore::TryWait(): not initialized") ); + + return m_internal->TryWait(); +} + +wxSemaError wxSemaphore::WaitTimeout(unsigned long milliseconds) +{ + wxCHECK_MSG( m_internal, wxSEMA_INVALID, + wxT("wxSemaphore::WaitTimeout(): not initialized") ); + + return m_internal->WaitTimeout(milliseconds); +} + +wxSemaError wxSemaphore::Post() +{ + wxCHECK_MSG( m_internal, wxSEMA_INVALID, + wxT("wxSemaphore::Post(): not initialized") ); + + return m_internal->Post(); +} + +// ---------------------------------------------------------------------------- +// wxThread +// ---------------------------------------------------------------------------- + +#include "wx/utils.h" +#include "wx/private/threadinfo.h" +#include "wx/scopeguard.h" + +void wxThread::Sleep(unsigned long milliseconds) +{ + wxMilliSleep(milliseconds); +} + +void *wxThread::CallEntry() +{ + wxON_BLOCK_EXIT0(wxThreadSpecificInfo::ThreadCleanUp); + return Entry(); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/time.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/time.h new file mode 100644 index 0000000000..644422392f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/time.h @@ -0,0 +1,76 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/time.h +// Purpose: Miscellaneous time-related functions. +// Author: Vadim Zeitlin +// Created: 2011-11-26 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TIME_H_ +#define _WX_TIME_H_ + +#include "wx/longlong.h" + +// Returns the difference between UTC and local time in seconds. +WXDLLIMPEXP_BASE int wxGetTimeZone(); + +// Get number of seconds since local time 00:00:00 Jan 1st 1970. +extern long WXDLLIMPEXP_BASE wxGetLocalTime(); + +// Get number of seconds since GMT 00:00:00, Jan 1st 1970. +extern long WXDLLIMPEXP_BASE wxGetUTCTime(); + +#if wxUSE_LONGLONG + typedef wxLongLong wxMilliClock_t; + inline long wxMilliClockToLong(wxLongLong ll) { return ll.ToLong(); } +#else + typedef double wxMilliClock_t; + inline long wxMilliClockToLong(double d) { return wx_truncate_cast(long, d); } +#endif // wxUSE_LONGLONG + +// Get number of milliseconds since local time 00:00:00 Jan 1st 1970 +extern wxMilliClock_t WXDLLIMPEXP_BASE wxGetLocalTimeMillis(); + +#if wxUSE_LONGLONG + +// Get the number of milliseconds or microseconds since the Epoch. +wxLongLong WXDLLIMPEXP_BASE wxGetUTCTimeMillis(); +wxLongLong WXDLLIMPEXP_BASE wxGetUTCTimeUSec(); + +#endif // wxUSE_LONGLONG + +#define wxGetCurrentTime() wxGetLocalTime() + +// on some really old systems gettimeofday() doesn't have the second argument, +// define wxGetTimeOfDay() to hide this difference +#ifdef HAVE_GETTIMEOFDAY + #ifdef WX_GETTIMEOFDAY_NO_TZ + #define wxGetTimeOfDay(tv) gettimeofday(tv) + #else + #define wxGetTimeOfDay(tv) gettimeofday((tv), NULL) + #endif +#endif // HAVE_GETTIMEOFDAY + +/* Two wrapper functions for thread safety */ +#ifdef HAVE_LOCALTIME_R +#define wxLocaltime_r localtime_r +#else +WXDLLIMPEXP_BASE struct tm *wxLocaltime_r(const time_t*, struct tm*); +#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__) + // On Windows, localtime _is_ threadsafe! +#warning using pseudo thread-safe wrapper for localtime to emulate localtime_r +#endif +#endif + +#ifdef HAVE_GMTIME_R +#define wxGmtime_r gmtime_r +#else +WXDLLIMPEXP_BASE struct tm *wxGmtime_r(const time_t*, struct tm*); +#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__) + // On Windows, gmtime _is_ threadsafe! +#warning using pseudo thread-safe wrapper for gmtime to emulate gmtime_r +#endif +#endif + +#endif // _WX_TIME_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/timectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/timectrl.h new file mode 100644 index 0000000000..928d9aedf3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/timectrl.h @@ -0,0 +1,124 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/timectrl.h +// Purpose: Declaration of wxTimePickerCtrl class. +// Author: Vadim Zeitlin +// Created: 2011-09-22 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TIMECTRL_H_ +#define _WX_TIMECTRL_H_ + +#include "wx/defs.h" + +#if wxUSE_TIMEPICKCTRL + +#include "wx/datetimectrl.h" + +#define wxTimePickerCtrlNameStr wxS("timectrl") + +// No special styles are currently defined for this control but still define a +// symbolic constant for the default style for consistency. +enum +{ + wxTP_DEFAULT = 0 +}; + +// ---------------------------------------------------------------------------- +// wxTimePickerCtrl: Allow the user to enter the time. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxTimePickerCtrlBase : public wxDateTimePickerCtrl +{ +public: + /* + The derived classes should implement ctor and Create() method with the + following signature: + + bool Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTP_DEFAULT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTimePickerCtrlNameStr); + */ + + /* + We also inherit Set/GetValue() methods from the base class which define + our public API. Notice that the date portion of the date passed as + input or received as output is or should be ignored, only the time part + of wxDateTime objects is really significant here. Use Set/GetTime() + below for possibly simpler interface. + */ + + // Set the given time. + bool SetTime(int hour, int min, int sec) + { + // Notice that we should use a date on which DST doesn't change to + // avoid any problems with time discontinuity so use a fixed date (on + // which nobody changes DST) instead of e.g. today. + wxDateTime dt(1, wxDateTime::Jan, 2012, hour, min, sec); + if ( !dt.IsValid() ) + { + // No need to assert here, wxDateTime already does it for us. + return false; + } + + SetValue(dt); + + return true; + } + + // Get the current time components. All pointers must be non-NULL. + bool GetTime(int* hour, int* min, int* sec) const + { + wxCHECK_MSG( hour && min && sec, false, + wxS("Time component pointers must be non-NULL") ); + + const wxDateTime::Tm tm = GetValue().GetTm(); + *hour = tm.hour; + *min = tm.min; + *sec = tm.sec; + + return true; + } +}; + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + #include "wx/msw/timectrl.h" + + #define wxHAS_NATIVE_TIMEPICKERCTRL +#elif defined(__WXOSX_COCOA__) && !defined(__WXUNIVERSAL__) + #include "wx/osx/timectrl.h" + + #define wxHAS_NATIVE_TIMEPICKERCTRL +#else + #include "wx/generic/timectrl.h" + + class WXDLLIMPEXP_ADV wxTimePickerCtrl : public wxTimePickerCtrlGeneric + { + public: + wxTimePickerCtrl() { } + wxTimePickerCtrl(wxWindow *parent, + wxWindowID id, + const wxDateTime& date = wxDefaultDateTime, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTP_DEFAULT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTimePickerCtrlNameStr) + : wxTimePickerCtrlGeneric(parent, id, date, pos, size, style, validator, name) + { + } + + private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTimePickerCtrl); + }; +#endif + +#endif // wxUSE_TIMEPICKCTRL + +#endif // _WX_TIMECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/timer.h new file mode 100644 index 0000000000..8ee5684e00 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/timer.h @@ -0,0 +1,196 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/timer.h +// Purpose: wxTimer, wxStopWatch and global time-related functions +// Author: Julian Smart +// Modified by: Vadim Zeitlin (wxTimerBase) +// Guillermo Rodriguez (global clean up) +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TIMER_H_BASE_ +#define _WX_TIMER_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_TIMER + +#include "wx/object.h" +#include "wx/longlong.h" +#include "wx/event.h" +#include "wx/stopwatch.h" // for backwards compatibility +#include "wx/utils.h" + + +// more readable flags for Start(): + +// generate notifications periodically until the timer is stopped (default) +#define wxTIMER_CONTINUOUS false + +// only send the notification once and then stop the timer +#define wxTIMER_ONE_SHOT true + +class WXDLLIMPEXP_FWD_BASE wxTimerImpl; +class WXDLLIMPEXP_FWD_BASE wxTimerEvent; + +// timer event type +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_TIMER, wxTimerEvent); + +// the interface of wxTimer class +class WXDLLIMPEXP_BASE wxTimer : public wxEvtHandler +{ +public: + // ctors and initializers + // ---------------------- + + // default: if you don't call SetOwner(), your only chance to get timer + // notifications is to override Notify() in the derived class + wxTimer() + { + Init(); + SetOwner(this); + } + + // ctor which allows to avoid having to override Notify() in the derived + // class: the owner will get timer notifications which can be handled with + // EVT_TIMER + wxTimer(wxEvtHandler *owner, int timerid = wxID_ANY) + { + Init(); + SetOwner(owner, timerid); + } + + // same as ctor above + void SetOwner(wxEvtHandler *owner, int timerid = wxID_ANY); + + virtual ~wxTimer(); + + + // working with the timer + // ---------------------- + + // NB: Start() and Stop() are not supposed to be overridden, they are only + // virtual for historical reasons, only Notify() can be overridden + + // start the timer: if milliseconds == -1, use the same value as for the + // last Start() + // + // it is now valid to call Start() multiple times: this just restarts the + // timer if it is already running + virtual bool Start(int milliseconds = -1, bool oneShot = false); + + // start the timer for one iteration only, this is just a simple wrapper + // for Start() + bool StartOnce(int milliseconds = -1) { return Start(milliseconds, true); } + + // stop the timer, does nothing if the timer is not running + virtual void Stop(); + + // override this in your wxTimer-derived class if you want to process timer + // messages in it, use non default ctor or SetOwner() otherwise + virtual void Notify(); + + + // accessors + // --------- + + // get the object notified about the timer events + wxEvtHandler *GetOwner() const; + + // return true if the timer is running + bool IsRunning() const; + + // return the timer ID + int GetId() const; + + // get the (last) timer interval in milliseconds + int GetInterval() const; + + // return true if the timer is one shot + bool IsOneShot() const; + +protected: + // common part of all ctors + void Init(); + + wxTimerImpl *m_impl; + + wxDECLARE_NO_COPY_CLASS(wxTimer); +}; + +// ---------------------------------------------------------------------------- +// wxTimerRunner: starts the timer in its ctor, stops in the dtor +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxTimerRunner +{ +public: + wxTimerRunner(wxTimer& timer) : m_timer(timer) { } + wxTimerRunner(wxTimer& timer, int milli, bool oneShot = false) + : m_timer(timer) + { + m_timer.Start(milli, oneShot); + } + + void Start(int milli, bool oneShot = false) + { + m_timer.Start(milli, oneShot); + } + + ~wxTimerRunner() + { + if ( m_timer.IsRunning() ) + { + m_timer.Stop(); + } + } + +private: + wxTimer& m_timer; + + wxDECLARE_NO_COPY_CLASS(wxTimerRunner); +}; + +// ---------------------------------------------------------------------------- +// wxTimerEvent +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxTimerEvent : public wxEvent +{ +public: + wxTimerEvent() + : wxEvent(wxID_ANY, wxEVT_TIMER) { m_timer=NULL; } + + wxTimerEvent(wxTimer& timer) + : wxEvent(timer.GetId(), wxEVT_TIMER), + m_timer(&timer) + { + SetEventObject(timer.GetOwner()); + } + + // accessors + int GetInterval() const { return m_timer->GetInterval(); } + wxTimer& GetTimer() const { return *m_timer; } + + // implement the base class pure virtual + virtual wxEvent *Clone() const { return new wxTimerEvent(*this); } + virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_TIMER; } + +private: + wxTimer* m_timer; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxTimerEvent) +}; + +typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&); + +#define wxTimerEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxTimerEventFunction, func) + +#define EVT_TIMER(timerid, func) \ + wx__DECLARE_EVT1(wxEVT_TIMER, timerid, wxTimerEventHandler(func)) + +#endif // wxUSE_TIMER + +#endif // _WX_TIMER_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/tipdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tipdlg.h new file mode 100644 index 0000000000..e0093855fb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tipdlg.h @@ -0,0 +1,85 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/tipdlg.h +// Purpose: declaration of wxTipDialog +// Author: Vadim Zeitlin +// Modified by: +// Created: 28.06.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TIPDLG_H_ +#define _WX_TIPDLG_H_ + +// ---------------------------------------------------------------------------- +// headers which we must include here +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_STARTUP_TIPS + +#include "wx/textfile.h" + +// ---------------------------------------------------------------------------- +// wxTipProvider - a class which is used by wxTipDialog to get the text of the +// tips +// ---------------------------------------------------------------------------- + +// the abstract base class: it provides the tips, i.e. implements the GetTip() +// function which returns the new tip each time it's called. To support this, +// wxTipProvider evidently needs some internal state which is the tip "index" +// and which should be saved/restored by the program to not always show one and +// the same tip (of course, you may use random starting position as well...) +class WXDLLIMPEXP_ADV wxTipProvider +{ +public: + wxTipProvider(size_t currentTip) { m_currentTip = currentTip; } + + // get the current tip and update the internal state to return the next tip + // when called for the next time + virtual wxString GetTip() = 0; + + // get the current tip "index" (or whatever allows the tip provider to know + // from where to start the next time) + size_t GetCurrentTip() const { return m_currentTip; } + + // Allows any user-derived class to optionally override this function to + // modify the tip as soon as it is read. If return wxEmptyString, then + // the tip is skipped, and the next one is read. + virtual wxString PreprocessTip(const wxString& tip) { return tip; } + + // virtual dtor for the base class + virtual ~wxTipProvider() { } + +protected: + size_t m_currentTip; +}; + +// a function which returns an implementation of wxTipProvider using the +// specified text file as the source of tips (each line is a tip). +// +// NB: the caller is responsible for deleting the pointer! +#if wxUSE_TEXTFILE +WXDLLIMPEXP_ADV wxTipProvider *wxCreateFileTipProvider(const wxString& filename, + size_t currentTip); +#endif // wxUSE_TEXTFILE + +// ---------------------------------------------------------------------------- +// wxTipDialog +// ---------------------------------------------------------------------------- + +// A dialog which shows a "tip" - a short and helpful messages describing to +// the user some program characteristic. Many programs show the tips at +// startup, so the dialog has "Show tips on startup" checkbox which allows to +// the user to disable this (however, it's the program which should show, or +// not, the dialog on startup depending on its value, not this class). +// +// The function returns true if this checkbox is checked, false otherwise. +WXDLLIMPEXP_ADV bool wxShowTip(wxWindow *parent, + wxTipProvider *tipProvider, + bool showAtStartup = true); + +#endif // wxUSE_STARTUP_TIPS + +#endif // _WX_TIPDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/tipwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tipwin.h new file mode 100644 index 0000000000..a2ca0f13e2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tipwin.h @@ -0,0 +1,97 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/tipwin.h +// Purpose: wxTipWindow is a window like the one typically used for +// showing the tooltips +// Author: Vadim Zeitlin +// Modified by: +// Created: 10.09.00 +// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TIPWIN_H_ +#define _WX_TIPWIN_H_ + +#if wxUSE_TIPWINDOW + +#if wxUSE_POPUPWIN + #include "wx/popupwin.h" + + #define wxTipWindowBase wxPopupTransientWindow +#else + #include "wx/frame.h" + + #define wxTipWindowBase wxFrame +#endif +#include "wx/arrstr.h" + +class WXDLLIMPEXP_FWD_CORE wxTipWindowView; + +// ---------------------------------------------------------------------------- +// wxTipWindow +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTipWindow : public wxTipWindowBase +{ +public: + // the mandatory ctor parameters are: the parent window and the text to + // show + // + // optionally you may also specify the length at which the lines are going + // to be broken in rows (100 pixels by default) + // + // windowPtr and rectBound are just passed to SetTipWindowPtr() and + // SetBoundingRect() - see below + wxTipWindow(wxWindow *parent, + const wxString& text, + wxCoord maxLength = 100, + wxTipWindow** windowPtr = NULL, + wxRect *rectBound = NULL); + + virtual ~wxTipWindow(); + + // If windowPtr is not NULL the given address will be NULLed when the + // window has closed + void SetTipWindowPtr(wxTipWindow** windowPtr) { m_windowPtr = windowPtr; } + + // If rectBound is not NULL, the window will disappear automatically when + // the mouse leave the specified rect: note that rectBound should be in the + // screen coordinates! + void SetBoundingRect(const wxRect& rectBound); + + // Hide and destroy the window + void Close(); + +protected: + // called by wxTipWindowView only + bool CheckMouseInBounds(const wxPoint& pos); + + // event handlers + void OnMouseClick(wxMouseEvent& event); + +#if !wxUSE_POPUPWIN + void OnActivate(wxActivateEvent& event); + void OnKillFocus(wxFocusEvent& event); +#else // wxUSE_POPUPWIN + virtual void OnDismiss(); +#endif // wxUSE_POPUPWIN/!wxUSE_POPUPWIN + +private: + wxArrayString m_textLines; + wxCoord m_heightLine; + + wxTipWindowView *m_view; + + wxTipWindow** m_windowPtr; + wxRect m_rectBound; + + DECLARE_EVENT_TABLE() + + friend class wxTipWindowView; + + wxDECLARE_NO_COPY_CLASS(wxTipWindow); +}; + +#endif // wxUSE_TIPWINDOW + +#endif // _WX_TIPWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/tls.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tls.h new file mode 100644 index 0000000000..f05a3f42d5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tls.h @@ -0,0 +1,145 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/tls.h +// Purpose: Implementation of thread local storage +// Author: Vadim Zeitlin +// Created: 2008-08-08 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TLS_H_ +#define _WX_TLS_H_ + +#include "wx/defs.h" + +// ---------------------------------------------------------------------------- +// check for compiler support of thread-specific variables +// ---------------------------------------------------------------------------- + +// when not using threads at all, there is no need for thread-specific +// values to be really thread-specific +#if !wxUSE_THREADS + #define wxHAS_COMPILER_TLS + #define wxTHREAD_SPECIFIC_DECL +// otherwise try to find the compiler-specific way to handle TLS unless +// explicitly disabled by setting wxUSE_COMPILER_TLS to 0 (it is 1 by default). +#elif wxUSE_COMPILER_TLS +// __thread keyword is not supported correctly by MinGW, at least in some +// configurations, see http://sourceforge.net/support/tracker.php?aid=2837047 +// and when in doubt we prefer to not use it at all. +#if defined(HAVE___THREAD_KEYWORD) && !defined(__MINGW32__) + #define wxHAS_COMPILER_TLS + #define wxTHREAD_SPECIFIC_DECL __thread +// MSVC has its own version which might be supported by some other Windows +// compilers, to be tested +#elif wxCHECK_VISUALC_VERSION(7) + #define wxHAS_COMPILER_TLS + #define wxTHREAD_SPECIFIC_DECL __declspec(thread) +#endif // compilers +#endif // wxUSE_COMPILER_TLS + +// ---------------------------------------------------------------------------- +// define wxTLS_TYPE() +// ---------------------------------------------------------------------------- + +#ifdef wxHAS_COMPILER_TLS + #define wxTLS_TYPE(T) wxTHREAD_SPECIFIC_DECL T + #define wxTLS_TYPE_REF(T) T& + #define wxTLS_PTR(var) (&(var)) + #define wxTLS_VALUE(var) (var) +#else // !wxHAS_COMPILER_TLS + + extern "C" + { + typedef void (*wxTlsDestructorFunction)(void*); + } + + #if defined(__WINDOWS__) + #include "wx/msw/tls.h" + #elif defined(__OS2__) + #include "wx/os2/tls.h" + #elif defined(__UNIX__) + #include "wx/unix/tls.h" + #else + // TODO: we could emulate TLS for such platforms... + #error Neither compiler nor OS support thread-specific variables. + #endif + + #include <stdlib.h> // for calloc() + + // wxTlsValue<T> represents a thread-specific value of type T but, unlike + // with native compiler thread-specific variables, it behaves like a + // (never NULL) pointer to T and so needs to be dereferenced before use + // + // Note: T must be a POD! + // + // Note: On Unix, thread-specific T value is freed when the thread exits. + // On Windows, thread-specific values are freed later, when given + // wxTlsValue<T> is destroyed. The only exception to this is the + // value for the main thread, which is always freed when + // wxTlsValue<T> is destroyed. + template <typename T> + class wxTlsValue + { + public: + typedef T ValueType; + + // ctor doesn't do anything, the object is created on first access + wxTlsValue() : m_key(free) {} + + // dtor is only called in the main thread context and so is not enough + // to free memory allocated by us for the other threads, we use + // destructor function when using Pthreads for this (which is not + // called for the main thread as it doesn't call pthread_exit() but + // just to be safe we also reset the key anyhow) + ~wxTlsValue() + { + if ( m_key.Get() ) + m_key.Set(NULL); // this deletes the value + } + + // access the object creating it on demand + ValueType *Get() + { + void *value = m_key.Get(); + if ( !value ) + { + // ValueType must be POD to be used in wxHAS_COMPILER_TLS case + // anyhow (at least gcc doesn't accept non-POD values being + // declared with __thread) so initialize it as a POD too + value = calloc(1, sizeof(ValueType)); + + if ( !m_key.Set(value) ) + { + free(value); + + // this will probably result in a crash in the caller but + // it's arguably better to crash immediately instead of + // slowly dying from out-of-memory errors which would + // happen as the next access to this object would allocate + // another ValueType instance and so on forever + value = NULL; + } + } + + return static_cast<ValueType *>(value); + } + + // pointer-like accessors + ValueType *operator->() { return Get(); } + ValueType& operator*() { return *Get(); } + + private: + wxTlsKey m_key; + + DECLARE_NO_COPY_TEMPLATE_CLASS(wxTlsValue, T) + }; + + #define wxTLS_TYPE(T) wxTlsValue<T> + #define wxTLS_TYPE_REF(T) wxTLS_TYPE(T)& + #define wxTLS_PTR(var) ((var).Get()) + #define wxTLS_VALUE(var) (*(var)) +#endif // wxHAS_COMPILER_TLS/!wxHAS_COMPILER_TLS + +#endif // _WX_TLS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/tokenzr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tokenzr.h new file mode 100644 index 0000000000..2eb6519709 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tokenzr.h @@ -0,0 +1,148 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/tokenzr.h +// Purpose: String tokenizer - a C++ replacement for strtok(3) +// Author: Guilhem Lavaux +// Modified by: (or rather rewritten by) Vadim Zeitlin +// Created: 04/22/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOKENZRH +#define _WX_TOKENZRH + +#include "wx/object.h" +#include "wx/string.h" +#include "wx/arrstr.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// default: delimiters are usual white space characters +#define wxDEFAULT_DELIMITERS (wxT(" \t\r\n")) + +// wxStringTokenizer mode flags which determine its behaviour +enum wxStringTokenizerMode +{ + wxTOKEN_INVALID = -1, // set by def ctor until SetString() is called + wxTOKEN_DEFAULT, // strtok() for whitespace delims, RET_EMPTY else + wxTOKEN_RET_EMPTY, // return empty token in the middle of the string + wxTOKEN_RET_EMPTY_ALL, // return trailing empty tokens too + wxTOKEN_RET_DELIMS, // return the delim with token (implies RET_EMPTY) + wxTOKEN_STRTOK // behave exactly like strtok(3) +}; + +// ---------------------------------------------------------------------------- +// wxStringTokenizer: replaces infamous strtok() and has some other features +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStringTokenizer : public wxObject +{ +public: + // ctors and initializers + // default ctor, call SetString() later + wxStringTokenizer() { m_mode = wxTOKEN_INVALID; } + // ctor which gives us the string + wxStringTokenizer(const wxString& str, + const wxString& delims = wxDEFAULT_DELIMITERS, + wxStringTokenizerMode mode = wxTOKEN_DEFAULT); + + // args are same as for the non default ctor above + void SetString(const wxString& str, + const wxString& delims = wxDEFAULT_DELIMITERS, + wxStringTokenizerMode mode = wxTOKEN_DEFAULT); + + // reinitialize the tokenizer with the same delimiters/mode + void Reinit(const wxString& str); + + // tokens access + // return the number of remaining tokens + size_t CountTokens() const; + // did we reach the end of the string? + bool HasMoreTokens() const; + // get the next token, will return empty string if !HasMoreTokens() + wxString GetNextToken(); + // get the delimiter which terminated the token last retrieved by + // GetNextToken() or NUL if there had been no tokens yet or the last + // one wasn't terminated (but ran to the end of the string) + wxChar GetLastDelimiter() const { return m_lastDelim; } + + // get current tokenizer state + // returns the part of the string which remains to tokenize (*not* the + // initial string) + wxString GetString() const { return wxString(m_pos, m_string.end()); } + + // returns the current position (i.e. one index after the last + // returned token or 0 if GetNextToken() has never been called) in the + // original string + size_t GetPosition() const { return m_pos - m_string.begin(); } + + // misc + // get the current mode - can be different from the one passed to the + // ctor if it was wxTOKEN_DEFAULT + wxStringTokenizerMode GetMode() const { return m_mode; } + // do we return empty tokens? + bool AllowEmpty() const { return m_mode != wxTOKEN_STRTOK; } + + + // backwards compatibility section from now on + // ------------------------------------------- + + // for compatibility only, use GetNextToken() instead + wxString NextToken() { return GetNextToken(); } + + // compatibility only, don't use + void SetString(const wxString& to_tokenize, + const wxString& delims, + bool WXUNUSED(ret_delim)) + { + SetString(to_tokenize, delims, wxTOKEN_RET_DELIMS); + } + + wxStringTokenizer(const wxString& to_tokenize, + const wxString& delims, + bool ret_delim) + { + SetString(to_tokenize, delims, ret_delim); + } + +protected: + bool IsOk() const { return m_mode != wxTOKEN_INVALID; } + + bool DoHasMoreTokens() const; + + enum MoreTokensState + { + MoreTokens_Unknown, + MoreTokens_Yes, + MoreTokens_No + }; + + MoreTokensState m_hasMoreTokens; + + wxString m_string; // the string we tokenize + wxString::const_iterator m_stringEnd; + // FIXME-UTF8: use wxWcharBuffer + wxWxCharBuffer m_delims; // all possible delimiters + size_t m_delimsLen; + + wxString::const_iterator m_pos; // the current position in m_string + + wxStringTokenizerMode m_mode; // see wxTOKEN_XXX values + + wxChar m_lastDelim; // delimiter after last token or '\0' +}; + +// ---------------------------------------------------------------------------- +// convenience function which returns all tokens at once +// ---------------------------------------------------------------------------- + +// the function takes the same parameters as wxStringTokenizer ctor and returns +// the array containing all tokens +wxArrayString WXDLLIMPEXP_BASE +wxStringTokenize(const wxString& str, + const wxString& delims = wxDEFAULT_DELIMITERS, + wxStringTokenizerMode mode = wxTOKEN_DEFAULT); + +#endif // _WX_TOKENZRH diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/toolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/toolbar.h new file mode 100644 index 0000000000..49a446e777 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/toolbar.h @@ -0,0 +1,92 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/toolbar.h +// Purpose: wxToolBar interface declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.11.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOOLBAR_H_BASE_ +#define _WX_TOOLBAR_H_BASE_ + +#include "wx/defs.h" + +// ---------------------------------------------------------------------------- +// wxToolBar style flags +// ---------------------------------------------------------------------------- + +enum +{ + // lay out the toolbar horizontally + wxTB_HORIZONTAL = wxHORIZONTAL, // == 0x0004 + wxTB_TOP = wxTB_HORIZONTAL, + + // lay out the toolbar vertically + wxTB_VERTICAL = wxVERTICAL, // == 0x0008 + wxTB_LEFT = wxTB_VERTICAL, + + // show 3D buttons (wxToolBarSimple only) + wxTB_3DBUTTONS = 0x0010, + + // "flat" buttons (Win32/GTK only) + wxTB_FLAT = 0x0020, + + // dockable toolbar (GTK only) + wxTB_DOCKABLE = 0x0040, + + // don't show the icons (they're shown by default) + wxTB_NOICONS = 0x0080, + + // show the text (not shown by default) + wxTB_TEXT = 0x0100, + + // don't show the divider between toolbar and the window (Win32 only) + wxTB_NODIVIDER = 0x0200, + + // no automatic alignment (Win32 only, useless) + wxTB_NOALIGN = 0x0400, + + // show the text and the icons alongside, not vertically stacked (Win32/GTK) + wxTB_HORZ_LAYOUT = 0x0800, + wxTB_HORZ_TEXT = wxTB_HORZ_LAYOUT | wxTB_TEXT, + + // don't show the toolbar short help tooltips + wxTB_NO_TOOLTIPS = 0x1000, + + // lay out toolbar at the bottom of the window + wxTB_BOTTOM = 0x2000, + + // lay out toolbar at the right edge of the window + wxTB_RIGHT = 0x4000, + + wxTB_DEFAULT_STYLE = wxTB_HORIZONTAL | wxTB_FLAT +}; + +#if wxUSE_TOOLBAR + #include "wx/tbarbase.h" // the base class for all toolbars + + #if defined(__WXUNIVERSAL__) + #include "wx/univ/toolbar.h" + #elif defined(__WXMSW__) && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 400 && !defined(__POCKETPC__) && !defined(__SMARTPHONE__))) + #include "wx/msw/toolbar.h" + #elif defined(__WXWINCE__) + #include "wx/msw/wince/tbarwce.h" + #elif defined(__WXMOTIF__) + #include "wx/motif/toolbar.h" + #elif defined(__WXGTK20__) + #include "wx/gtk/toolbar.h" + #elif defined(__WXGTK__) + #include "wx/gtk1/toolbar.h" + #elif defined(__WXMAC__) + #include "wx/osx/toolbar.h" + #elif defined(__WXCOCOA__) + #include "wx/cocoa/toolbar.h" + #elif defined(__WXPM__) + #include "wx/os2/toolbar.h" + #endif +#endif // wxUSE_TOOLBAR + +#endif + // _WX_TOOLBAR_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/toolbook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/toolbook.h new file mode 100644 index 0000000000..45730cd9c4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/toolbook.h @@ -0,0 +1,148 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/toolbook.h +// Purpose: wxToolbook: wxToolBar and wxNotebook combination +// Author: Julian Smart +// Modified by: +// Created: 2006-01-29 +// Copyright: (c) 2006 Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOOLBOOK_H_ +#define _WX_TOOLBOOK_H_ + +#include "wx/defs.h" + +#if wxUSE_TOOLBOOK + +#include "wx/bookctrl.h" +#include "wx/containr.h" + +class WXDLLIMPEXP_FWD_CORE wxToolBarBase; +class WXDLLIMPEXP_FWD_CORE wxCommandEvent; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TOOLBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TOOLBOOK_PAGE_CHANGING, wxBookCtrlEvent ); + + +// Use wxButtonToolBar +#define wxTBK_BUTTONBAR 0x0100 + +// Use wxTB_HORZ_LAYOUT style for the controlling toolbar +#define wxTBK_HORZ_LAYOUT 0x8000 + +// deprecated synonym, don't use +#if WXWIN_COMPATIBILITY_2_8 + #define wxBK_BUTTONBAR wxTBK_BUTTONBAR +#endif + +// ---------------------------------------------------------------------------- +// wxToolbook +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToolbook : public wxNavigationEnabled<wxBookCtrlBase> +{ +public: + wxToolbook() + { + Init(); + } + + wxToolbook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxEmptyString) + { + Init(); + + (void)Create(parent, id, pos, size, style, name); + } + + // quasi ctor + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxEmptyString); + + + // implement base class virtuals + virtual bool SetPageText(size_t n, const wxString& strText); + virtual wxString GetPageText(size_t n) const; + virtual int GetPageImage(size_t n) const; + virtual bool SetPageImage(size_t n, int imageId); + virtual bool InsertPage(size_t n, + wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE); + virtual int SetSelection(size_t n) { return DoSetSelection(n, SetSelection_SendEvent); } + virtual int ChangeSelection(size_t n) { return DoSetSelection(n); } + virtual void SetImageList(wxImageList *imageList); + + virtual bool DeleteAllPages(); + virtual int HitTest(const wxPoint& pt, long *flags = NULL) const; + + + // methods which are not part of base wxBookctrl API + + // get the underlying toolbar + wxToolBarBase* GetToolBar() const { return (wxToolBarBase*)m_bookctrl; } + + // must be called in OnIdle or by application to realize the toolbar and + // select the initial page. + void Realize(); + +protected: + virtual wxWindow *DoRemovePage(size_t page); + + // event handlers + void OnToolSelected(wxCommandEvent& event); + void OnSize(wxSizeEvent& event); + void OnIdle(wxIdleEvent& event); + + void UpdateSelectedPage(size_t newsel); + + wxBookCtrlEvent* CreatePageChangingEvent() const; + void MakeChangedEvent(wxBookCtrlEvent &event); + + // whether the toolbar needs to be realized + bool m_needsRealizing; + + // maximum bitmap size + wxSize m_maxBitmapSize; + +private: + // common part of all constructors + void Init(); + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxToolbook) +}; + +// ---------------------------------------------------------------------------- +// listbook event class and related stuff +// ---------------------------------------------------------------------------- + +// wxToolbookEvent is obsolete and defined for compatibility only +#define wxToolbookEvent wxBookCtrlEvent +typedef wxBookCtrlEventFunction wxToolbookEventFunction; +#define wxToolbookEventHandler(func) wxBookCtrlEventHandler(func) + + +#define EVT_TOOLBOOK_PAGE_CHANGED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_TOOLBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + +#define EVT_TOOLBOOK_PAGE_CHANGING(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_TOOLBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED wxEVT_TOOLBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING wxEVT_TOOLBOOK_PAGE_CHANGING + +#endif // wxUSE_TOOLBOOK + +#endif // _WX_TOOLBOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/tooltip.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tooltip.h new file mode 100644 index 0000000000..0948e65eff --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tooltip.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/tooltip.h +// Purpose: wxToolTip base header +// Author: Robert Roebling +// Modified by: +// Created: +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOOLTIP_H_BASE_ +#define _WX_TOOLTIP_H_BASE_ + +#include "wx/defs.h" + +#if wxUSE_TOOLTIPS + +#if defined(__WXMSW__) +#include "wx/msw/tooltip.h" +#elif defined(__WXMOTIF__) +// #include "wx/motif/tooltip.h" +#elif defined(__WXGTK20__) +#include "wx/gtk/tooltip.h" +#elif defined(__WXGTK__) +#include "wx/gtk1/tooltip.h" +#elif defined(__WXMAC__) +#include "wx/osx/tooltip.h" +#elif defined(__WXCOCOA__) +#include "wx/cocoa/tooltip.h" +#elif defined(__WXPM__) +#include "wx/os2/tooltip.h" +#endif + +#endif + // wxUSE_TOOLTIPS + +#endif + // _WX_TOOLTIP_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/toplevel.h new file mode 100644 index 0000000000..b36b30e6cf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/toplevel.h @@ -0,0 +1,416 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/toplevel.h +// Purpose: declares wxTopLevelWindow class, the base class for all +// top level windows (such as frames and dialogs) +// Author: Vadim Zeitlin, Vaclav Slavik +// Modified by: +// Created: 06.08.01 +// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Vaclav Slavik <vaclav@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TOPLEVEL_BASE_H_ +#define _WX_TOPLEVEL_BASE_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/nonownedwnd.h" +#include "wx/iconbndl.h" +#include "wx/weakref.h" + +// the default names for various classes +extern WXDLLIMPEXP_DATA_CORE(const char) wxFrameNameStr[]; + +class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +/* + Summary of the bits used (some of them are defined in wx/frame.h and + wx/dialog.h and not here): + + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0| + +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + | | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | \_ wxCENTRE + | | | | | | | | | | | | | | \____ wxFRAME_NO_TASKBAR + | | | | | | | | | | | | | \_______ wxFRAME_TOOL_WINDOW + | | | | | | | | | | | | \__________ wxFRAME_FLOAT_ON_PARENT + | | | | | | | | | | | \_____________ wxFRAME_SHAPED + | | | | | | | | | | \________________ wxDIALOG_NO_PARENT + | | | | | | | | | \___________________ wxRESIZE_BORDER + | | | | | | | | \______________________ wxTINY_CAPTION_VERT + | | | | | | | \_________________________ + | | | | | | \____________________________ wxMAXIMIZE_BOX + | | | | | \_______________________________ wxMINIMIZE_BOX + | | | | \__________________________________ wxSYSTEM_MENU + | | | \_____________________________________ wxCLOSE_BOX + | | \________________________________________ wxMAXIMIZE + | \___________________________________________ wxMINIMIZE + \______________________________________________ wxSTAY_ON_TOP + + + Notice that the 8 lower bits overlap with wxCENTRE and the button selection + bits (wxYES, wxOK wxNO, wxCANCEL, wxAPPLY, wxCLOSE and wxNO_DEFAULT) which + can be combined with the dialog style for several standard dialogs and + hence shouldn't overlap with any styles which can be used for the dialogs. + Additionally, wxCENTRE can be used with frames also. + */ + +// style common to both wxFrame and wxDialog +#define wxSTAY_ON_TOP 0x8000 +#define wxICONIZE 0x4000 +#define wxMINIMIZE wxICONIZE +#define wxMAXIMIZE 0x2000 +#define wxCLOSE_BOX 0x1000 // == wxHELP so can't be used with it + +#define wxSYSTEM_MENU 0x0800 +#define wxMINIMIZE_BOX 0x0400 +#define wxMAXIMIZE_BOX 0x0200 + +#define wxTINY_CAPTION 0x0080 // clashes with wxNO_DEFAULT +#define wxRESIZE_BORDER 0x0040 // == wxCLOSE + +#if WXWIN_COMPATIBILITY_2_8 + // HORIZ and VERT styles are equivalent anyhow so don't use different names + // for them + #define wxTINY_CAPTION_HORIZ wxTINY_CAPTION + #define wxTINY_CAPTION_VERT wxTINY_CAPTION +#endif + +#if WXWIN_COMPATIBILITY_2_6 + + // deprecated versions defined for compatibility reasons + #define wxRESIZE_BOX wxMAXIMIZE_BOX + #define wxTHICK_FRAME wxRESIZE_BORDER + + // obsolete styles, unused any more + #define wxDIALOG_MODAL 0 + #define wxDIALOG_MODELESS 0 + #define wxNO_3D 0 + #define wxUSER_COLOURS 0 + +#endif // WXWIN_COMPATIBILITY_2_6 + +// default style +// +// under Windows CE (at least when compiling with eVC 4) we should create +// top level windows without any styles at all for them to appear +// "correctly", i.e. as full screen windows with a "hide" button (same as +// "close" but round instead of squared and just hides the applications +// instead of closing it) in the title bar +#if defined(__WXWINCE__) + #if defined(__SMARTPHONE__) + #define wxDEFAULT_FRAME_STYLE (wxMAXIMIZE) + #elif defined(__WINCE_STANDARDSDK__) + #define wxDEFAULT_FRAME_STYLE (wxMAXIMIZE|wxCLOSE_BOX) + #else + #define wxDEFAULT_FRAME_STYLE (wxNO_BORDER) + #endif +#else // !__WXWINCE__ + #define wxDEFAULT_FRAME_STYLE \ + (wxSYSTEM_MENU | \ + wxRESIZE_BORDER | \ + wxMINIMIZE_BOX | \ + wxMAXIMIZE_BOX | \ + wxCLOSE_BOX | \ + wxCAPTION | \ + wxCLIP_CHILDREN) +#endif + + +// Dialogs are created in a special way +#define wxTOPLEVEL_EX_DIALOG 0x00000008 + +// Styles for ShowFullScreen +// (note that wxTopLevelWindow only handles wxFULLSCREEN_NOBORDER and +// wxFULLSCREEN_NOCAPTION; the rest is handled by wxTopLevelWindow) +enum +{ + wxFULLSCREEN_NOMENUBAR = 0x0001, + wxFULLSCREEN_NOTOOLBAR = 0x0002, + wxFULLSCREEN_NOSTATUSBAR = 0x0004, + wxFULLSCREEN_NOBORDER = 0x0008, + wxFULLSCREEN_NOCAPTION = 0x0010, + + wxFULLSCREEN_ALL = wxFULLSCREEN_NOMENUBAR | wxFULLSCREEN_NOTOOLBAR | + wxFULLSCREEN_NOSTATUSBAR | wxFULLSCREEN_NOBORDER | + wxFULLSCREEN_NOCAPTION +}; + +// Styles for RequestUserAttention +enum +{ + wxUSER_ATTENTION_INFO = 1, + wxUSER_ATTENTION_ERROR = 2 +}; + +// ---------------------------------------------------------------------------- +// wxTopLevelWindow: a top level (as opposed to child) window +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTopLevelWindowBase : public wxNonOwnedWindow +{ +public: + // construction + wxTopLevelWindowBase(); + virtual ~wxTopLevelWindowBase(); + + // top level wnd state + // -------------------- + + // maximize = true => maximize, otherwise - restore + virtual void Maximize(bool maximize = true) = 0; + + // undo Maximize() or Iconize() + virtual void Restore() = 0; + + // iconize = true => iconize, otherwise - restore + virtual void Iconize(bool iconize = true) = 0; + + // return true if the frame is maximized + virtual bool IsMaximized() const = 0; + + // return true if the frame is always maximized + // due to native guidelines or current policy + virtual bool IsAlwaysMaximized() const; + + // return true if the frame is iconized + virtual bool IsIconized() const = 0; + + // get the frame icon + wxIcon GetIcon() const; + + // get the frame icons + const wxIconBundle& GetIcons() const { return m_icons; } + + // set the frame icon: implemented in terms of SetIcons() + void SetIcon(const wxIcon& icon); + + // set the frame icons + virtual void SetIcons(const wxIconBundle& icons) { m_icons = icons; } + + // maximize the window to cover entire screen + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) = 0; + + // shows the window, but doesn't activate it. If the base code is being run, + // it means the port doesn't implement this method yet and so alert the user. + virtual void ShowWithoutActivating() { + wxFAIL_MSG("ShowWithoutActivating not implemented on this platform."); + } + + // return true if the frame is in fullscreen mode + virtual bool IsFullScreen() const = 0; + + // the title of the top level window: the text which the + // window shows usually at the top of the frame/dialog in dedicated bar + virtual void SetTitle(const wxString& title) = 0; + virtual wxString GetTitle() const = 0; + + // enable/disable close button [x] + virtual bool EnableCloseButton(bool WXUNUSED(enable) ) { return false; } + + // Attracts the users attention to this window if the application is + // inactive (should be called when a background event occurs) + virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); + + // Is this the active frame (highlighted in the taskbar)? + // + // A TLW is active only if it contains the currently focused window. + virtual bool IsActive() { return IsDescendant(FindFocus()); } + + // this function may be overridden to return false to allow closing the + // application even when this top level window is still open + // + // notice that the window is still closed prior to the application exit and + // so it can still veto it even if it returns false from here + virtual bool ShouldPreventAppExit() const { return true; } + + +#if defined(__SMARTPHONE__) + virtual void SetLeftMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL) = 0; + virtual void SetRightMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu *subMenu = NULL) = 0; +#endif // __SMARTPHONE__ + + // centre the window on screen: this is just a shortcut + void CentreOnScreen(int dir = wxBOTH) { DoCentre(dir | wxCENTRE_ON_SCREEN); } + void CenterOnScreen(int dir = wxBOTH) { CentreOnScreen(dir); } + + // Get the default size for a new top level window. This is used when + // creating a wxTLW under some platforms if no explicit size given. + static wxSize GetDefaultSize(); + + + // default item access: we have a permanent default item which is the one + // set by the user code but we may also have a temporary default item which + // would be chosen if the user pressed "Enter" now but the default action + // reverts to the "permanent" default as soon as this temporary default + // item loses focus + + // get the default item, temporary or permanent + wxWindow *GetDefaultItem() const + { return m_winTmpDefault ? m_winTmpDefault : m_winDefault; } + + // set the permanent default item, return the old default + wxWindow *SetDefaultItem(wxWindow *win) + { wxWindow *old = GetDefaultItem(); m_winDefault = win; return old; } + + // return the temporary default item, can be NULL + wxWindow *GetTmpDefaultItem() const { return m_winTmpDefault; } + + // set a temporary default item, SetTmpDefaultItem(NULL) should be called + // soon after a call to SetTmpDefaultItem(window), return the old default + wxWindow *SetTmpDefaultItem(wxWindow *win) + { wxWindow *old = GetDefaultItem(); m_winTmpDefault = win; return old; } + + // implementation only from now on + // ------------------------------- + + // override some base class virtuals + virtual bool Destroy(); + virtual bool IsTopLevel() const { return true; } + virtual bool IsTopNavigationDomain() const { return true; } + virtual bool IsVisible() const { return IsShown(); } + + // event handlers + void OnCloseWindow(wxCloseEvent& event); + void OnSize(wxSizeEvent& WXUNUSED(event)) { DoLayout(); } + + // Get rect to be used to center top-level children + virtual void GetRectForTopLevelChildren(int *x, int *y, int *w, int *h); + + // this should go away, but for now it's called from docview.cpp, + // so should be there for all platforms + void OnActivate(wxActivateEvent &WXUNUSED(event)) { } + + // do the window-specific processing after processing the update event + virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ; + + // a different API for SetSizeHints + virtual void SetMinSize(const wxSize& minSize); + virtual void SetMaxSize(const wxSize& maxSize); + + virtual void OSXSetModified(bool modified) { m_modified = modified; } + virtual bool OSXIsModified() const { return m_modified; } + + virtual void SetRepresentedFilename(const wxString& WXUNUSED(filename)) { } + +#if wxUSE_MENUS || wxUSE_TOOLBAR + // show help text for the currently selected menu or toolbar item + // (typically in the status bar) or hide it and restore the status bar text + // originally shown before the menu was opened if show == false + virtual void DoGiveHelp(const wxString& WXUNUSED(text), bool WXUNUSED(show)) {} +#endif + +protected: + // the frame client to screen translation should take account of the + // toolbar which may shift the origin of the client area + virtual void DoClientToScreen(int *x, int *y) const; + virtual void DoScreenToClient(int *x, int *y) const; + + // add support for wxCENTRE_ON_SCREEN + virtual void DoCentre(int dir); + + // no need to do client to screen translation to get our position in screen + // coordinates: this is already the case + virtual void DoGetScreenPosition(int *x, int *y) const + { + DoGetPosition(x, y); + } + + // test whether this window makes part of the frame + // (menubar, toolbar and statusbar are excluded from automatic layout) + virtual bool IsOneOfBars(const wxWindow *WXUNUSED(win)) const + { return false; } + + // check if we should exit the program after deleting this window + bool IsLastBeforeExit() const; + + // send the iconize event, return true if processed + bool SendIconizeEvent(bool iconized = true); + + // do TLW-specific layout: we resize our unique child to fill the entire + // client area + void DoLayout(); + + static int WidthDefault(int w) { return w == wxDefaultCoord ? GetDefaultSize().x : w; } + static int HeightDefault(int h) { return h == wxDefaultCoord ? GetDefaultSize().y : h; } + + + // the frame icon + wxIconBundle m_icons; + + // a default window (usually a button) or NULL + wxWindowRef m_winDefault; + + // a temporary override of m_winDefault, use the latter if NULL + wxWindowRef m_winTmpDefault; + + bool m_modified; + + wxDECLARE_NO_COPY_CLASS(wxTopLevelWindowBase); + DECLARE_EVENT_TABLE() +}; + + +// include the real class declaration +#if defined(__WXMSW__) + #include "wx/msw/toplevel.h" + #define wxTopLevelWindowNative wxTopLevelWindowMSW +#elif defined(__WXGTK20__) + #include "wx/gtk/toplevel.h" + #define wxTopLevelWindowNative wxTopLevelWindowGTK +#elif defined(__WXGTK__) + #include "wx/gtk1/toplevel.h" + #define wxTopLevelWindowNative wxTopLevelWindowGTK +#elif defined(__WXX11__) + #include "wx/x11/toplevel.h" + #define wxTopLevelWindowNative wxTopLevelWindowX11 +#elif defined(__WXDFB__) + #include "wx/dfb/toplevel.h" + #define wxTopLevelWindowNative wxTopLevelWindowDFB +#elif defined(__WXMAC__) + #include "wx/osx/toplevel.h" + #define wxTopLevelWindowNative wxTopLevelWindowMac +#elif defined(__WXCOCOA__) + #include "wx/cocoa/toplevel.h" + #define wxTopLevelWindowNative wxTopLevelWindowCocoa +#elif defined(__WXPM__) + #include "wx/os2/toplevel.h" + #define wxTopLevelWindowNative wxTopLevelWindowOS2 +#elif defined(__WXMOTIF__) + #include "wx/motif/toplevel.h" + #define wxTopLevelWindowNative wxTopLevelWindowMotif +#endif + +#ifdef __WXUNIVERSAL__ + #include "wx/univ/toplevel.h" +#else // !__WXUNIVERSAL__ + class WXDLLIMPEXP_CORE wxTopLevelWindow : public wxTopLevelWindowNative + { + public: + // construction + wxTopLevelWindow() { } + wxTopLevelWindow(wxWindow *parent, + wxWindowID winid, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + : wxTopLevelWindowNative(parent, winid, title, + pos, size, style, name) + { + } + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxTopLevelWindow) + }; +#endif // __WXUNIVERSAL__/!__WXUNIVERSAL__ + +#endif // _WX_TOPLEVEL_BASE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/tracker.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tracker.h new file mode 100644 index 0000000000..d8f272822c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/tracker.h @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/tracker.h +// Purpose: Support class for object lifetime tracking (wxWeakRef<T>) +// Author: Arne Steinarson +// Created: 28 Dec 07 +// Copyright: (c) 2007 Arne Steinarson +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TRACKER_H_ +#define _WX_TRACKER_H_ + +#include "wx/defs.h" + +class wxEventConnectionRef; + +// This class represents an object tracker and is stored in a linked list +// in the tracked object. It is only used in one of its derived forms. +class WXDLLIMPEXP_BASE wxTrackerNode +{ +public: + wxTrackerNode() : m_nxt(NULL) { } + virtual ~wxTrackerNode() { } + + virtual void OnObjectDestroy() = 0; + + virtual wxEventConnectionRef *ToEventConnection() { return NULL; } + +private: + wxTrackerNode *m_nxt; + + friend class wxTrackable; // For list access + friend class wxEvtHandler; // For list access +}; + +// Add-on base class for a trackable object. +class WXDLLIMPEXP_BASE wxTrackable +{ +public: + void AddNode(wxTrackerNode *prn) + { + prn->m_nxt = m_first; + m_first = prn; + } + + void RemoveNode(wxTrackerNode *prn) + { + for ( wxTrackerNode **pprn = &m_first; *pprn; pprn = &(*pprn)->m_nxt ) + { + if ( *pprn == prn ) + { + *pprn = prn->m_nxt; + return; + } + } + + wxFAIL_MSG( "removing invalid tracker node" ); + } + + wxTrackerNode *GetFirst() const { return m_first; } + +protected: + // this class is only supposed to be used as a base class but never be + // created nor destroyed directly so all ctors and dtor are protected + + wxTrackable() : m_first(NULL) { } + + // copy ctor and assignment operator intentionally do not copy m_first: the + // objects which track the original trackable shouldn't track the new copy + wxTrackable(const wxTrackable& WXUNUSED(other)) : m_first(NULL) { } + wxTrackable& operator=(const wxTrackable& WXUNUSED(other)) { return *this; } + + // dtor is not virtual: this class is not supposed to be used + // polymorphically and adding a virtual table to it would add unwanted + // overhead + ~wxTrackable() + { + // Notify all registered refs + while ( m_first ) + { + wxTrackerNode * const first = m_first; + m_first = first->m_nxt; + first->OnObjectDestroy(); + } + } + + wxTrackerNode *m_first; +}; + +#endif // _WX_TRACKER_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/translation.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/translation.h new file mode 100644 index 0000000000..187caf366b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/translation.h @@ -0,0 +1,323 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/translation.h +// Purpose: Internationalization and localisation for wxWidgets +// Author: Vadim Zeitlin, Vaclav Slavik, +// Michael N. Filippov <michael@idisys.iae.nsk.su> +// Created: 2010-04-23 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// (c) 2010 Vaclav Slavik <vslavik@fastmail.fm> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TRANSLATION_H_ +#define _WX_TRANSLATION_H_ + +#include "wx/defs.h" +#include "wx/string.h" + +#if wxUSE_INTL + +#include "wx/buffer.h" +#include "wx/language.h" +#include "wx/hashmap.h" +#include "wx/strconv.h" +#include "wx/scopedptr.h" + +// ============================================================================ +// global decls +// ============================================================================ + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// gettext() style macros (notice that xgettext should be invoked with +// --keyword="_" --keyword="wxPLURAL:1,2" options +// to extract the strings from the sources) +#ifndef WXINTL_NO_GETTEXT_MACRO + #define _(s) wxGetTranslation((s)) + #define wxPLURAL(sing, plur, n) wxGetTranslation((sing), (plur), n) +#endif + +// another one which just marks the strings for extraction, but doesn't +// perform the translation (use -kwxTRANSLATE with xgettext!) +#define wxTRANSLATE(str) str + +// ---------------------------------------------------------------------------- +// forward decls +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxArrayString; +class WXDLLIMPEXP_FWD_BASE wxTranslationsLoader; +class WXDLLIMPEXP_FWD_BASE wxLocale; + +class wxPluralFormsCalculator; +wxDECLARE_SCOPED_PTR(wxPluralFormsCalculator, wxPluralFormsCalculatorPtr) + +// ---------------------------------------------------------------------------- +// wxMsgCatalog corresponds to one loaded message catalog. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxMsgCatalog +{ +public: + // Ctor is protected, because CreateFromXXX functions must be used, + // but destruction should be unrestricted +#if !wxUSE_UNICODE + ~wxMsgCatalog(); +#endif + + // load the catalog from disk or from data; caller is responsible for + // deleting them if not NULL + static wxMsgCatalog *CreateFromFile(const wxString& filename, + const wxString& domain); + + static wxMsgCatalog *CreateFromData(const wxScopedCharBuffer& data, + const wxString& domain); + + // get name of the catalog + wxString GetDomain() const { return m_domain; } + + // get the translated string: returns NULL if not found + const wxString *GetString(const wxString& sz, unsigned n = UINT_MAX) const; + +protected: + wxMsgCatalog(const wxString& domain) + : m_pNext(NULL), m_domain(domain) +#if !wxUSE_UNICODE + , m_conv(NULL) +#endif + {} + +private: + // variable pointing to the next element in a linked list (or NULL) + wxMsgCatalog *m_pNext; + friend class wxTranslations; + + wxStringToStringHashMap m_messages; // all messages in the catalog + wxString m_domain; // name of the domain + +#if !wxUSE_UNICODE + // the conversion corresponding to this catalog charset if we installed it + // as the global one + wxCSConv *m_conv; +#endif + + wxPluralFormsCalculatorPtr m_pluralFormsCalculator; +}; + +// ---------------------------------------------------------------------------- +// wxTranslations: message catalogs +// ---------------------------------------------------------------------------- + +// this class allows to get translations for strings +class WXDLLIMPEXP_BASE wxTranslations +{ +public: + wxTranslations(); + ~wxTranslations(); + + // returns current translations object, may return NULL + static wxTranslations *Get(); + // sets current translations object (takes ownership; may be NULL) + static void Set(wxTranslations *t); + + // changes loader to non-default one; takes ownership of 'loader' + void SetLoader(wxTranslationsLoader *loader); + + void SetLanguage(wxLanguage lang); + void SetLanguage(const wxString& lang); + + // get languages available for this app + wxArrayString GetAvailableTranslations(const wxString& domain) const; + + // find best translation language for given domain + wxString GetBestTranslation(const wxString& domain, wxLanguage msgIdLanguage); + wxString GetBestTranslation(const wxString& domain, + const wxString& msgIdLanguage = "en"); + + // add standard wxWidgets catalog ("wxstd") + bool AddStdCatalog(); + + // add catalog with given domain name and language, looking it up via + // wxTranslationsLoader + bool AddCatalog(const wxString& domain); + bool AddCatalog(const wxString& domain, wxLanguage msgIdLanguage); +#if !wxUSE_UNICODE + bool AddCatalog(const wxString& domain, + wxLanguage msgIdLanguage, + const wxString& msgIdCharset); +#endif + + // check if the given catalog is loaded + bool IsLoaded(const wxString& domain) const; + + // access to translations + const wxString *GetTranslatedString(const wxString& origString, + const wxString& domain = wxEmptyString) const; + const wxString *GetTranslatedString(const wxString& origString, + unsigned n, + const wxString& domain = wxEmptyString) const; + + wxString GetHeaderValue(const wxString& header, + const wxString& domain = wxEmptyString) const; + + // this is hack to work around a problem with wxGetTranslation() which + // returns const wxString& and not wxString, so when it returns untranslated + // string, it needs to have a copy of it somewhere + static const wxString& GetUntranslatedString(const wxString& str); + +private: + // perform loading of the catalog via m_loader + bool LoadCatalog(const wxString& domain, const wxString& lang, const wxString& msgIdLang); + + // find catalog by name in a linked list, return NULL if !found + wxMsgCatalog *FindCatalog(const wxString& domain) const; + + // same as Set(), without taking ownership; only for wxLocale + static void SetNonOwned(wxTranslations *t); + friend class wxLocale; + +private: + wxString m_lang; + wxTranslationsLoader *m_loader; + + wxMsgCatalog *m_pMsgCat; // pointer to linked list of catalogs +}; + + +// abstraction of translations discovery and loading +class WXDLLIMPEXP_BASE wxTranslationsLoader +{ +public: + wxTranslationsLoader() {} + virtual ~wxTranslationsLoader() {} + + virtual wxMsgCatalog *LoadCatalog(const wxString& domain, + const wxString& lang) = 0; + + virtual wxArrayString GetAvailableTranslations(const wxString& domain) const = 0; +}; + + +// standard wxTranslationsLoader implementation, using filesystem +class WXDLLIMPEXP_BASE wxFileTranslationsLoader + : public wxTranslationsLoader +{ +public: + static void AddCatalogLookupPathPrefix(const wxString& prefix); + + virtual wxMsgCatalog *LoadCatalog(const wxString& domain, + const wxString& lang); + + virtual wxArrayString GetAvailableTranslations(const wxString& domain) const; +}; + + +#ifdef __WINDOWS__ +// loads translations from win32 resources +class WXDLLIMPEXP_BASE wxResourceTranslationsLoader + : public wxTranslationsLoader +{ +public: + virtual wxMsgCatalog *LoadCatalog(const wxString& domain, + const wxString& lang); + + virtual wxArrayString GetAvailableTranslations(const wxString& domain) const; + +protected: + // returns resource type to use for translations + virtual wxString GetResourceType() const { return "MOFILE"; } + + // returns module to load resources from + virtual WXHINSTANCE GetModule() const { return 0; } +}; +#endif // __WINDOWS__ + + +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +// get the translation of the string in the current locale +inline const wxString& wxGetTranslation(const wxString& str, + const wxString& domain = wxString()) +{ + wxTranslations *trans = wxTranslations::Get(); + const wxString *transStr = trans ? trans->GetTranslatedString(str, domain) + : NULL; + if ( transStr ) + return *transStr; + else + // NB: this function returns reference to a string, so we have to keep + // a copy of it somewhere + return wxTranslations::GetUntranslatedString(str); +} + +inline const wxString& wxGetTranslation(const wxString& str1, + const wxString& str2, + unsigned n, + const wxString& domain = wxString()) +{ + wxTranslations *trans = wxTranslations::Get(); + const wxString *transStr = trans ? trans->GetTranslatedString(str1, n, domain) + : NULL; + if ( transStr ) + return *transStr; + else + // NB: this function returns reference to a string, so we have to keep + // a copy of it somewhere + return n == 1 + ? wxTranslations::GetUntranslatedString(str1) + : wxTranslations::GetUntranslatedString(str2); +} + +#else // !wxUSE_INTL + +// the macros should still be defined - otherwise compilation would fail + +#if !defined(WXINTL_NO_GETTEXT_MACRO) + #if !defined(_) + #define _(s) (s) + #endif + #define wxPLURAL(sing, plur, n) ((n) == 1 ? (sing) : (plur)) +#endif + +#define wxTRANSLATE(str) str + +// NB: we use a template here in order to avoid using +// wxLocale::GetUntranslatedString() above, which would be required if +// we returned const wxString&; this way, the compiler should be able to +// optimize wxGetTranslation() away + +template<typename TString> +inline TString wxGetTranslation(TString str) + { return str; } + +template<typename TString, typename TDomain> +inline TString wxGetTranslation(TString str, TDomain WXUNUSED(domain)) + { return str; } + +template<typename TString, typename TDomain> +inline TString wxGetTranslation(TString str1, TString str2, size_t n) + { return n == 1 ? str1 : str2; } + +template<typename TString, typename TDomain> +inline TString wxGetTranslation(TString str1, TString str2, size_t n, + TDomain WXUNUSED(domain)) + { return n == 1 ? str1 : str2; } + +#endif // wxUSE_INTL/!wxUSE_INTL + +// define this one just in case it occurs somewhere (instead of preferred +// wxTRANSLATE) too +#if !defined(WXINTL_NO_GETTEXT_MACRO) + #if !defined(gettext_noop) + #define gettext_noop(str) (str) + #endif + #if !defined(N_) + #define N_(s) (s) + #endif +#endif + +#endif // _WX_TRANSLATION_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/treebase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/treebase.h new file mode 100644 index 0000000000..4efbf05074 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/treebase.h @@ -0,0 +1,423 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/treebase.h +// Purpose: wxTreeCtrl base classes and types +// Author: Julian Smart et al +// Modified by: +// Created: 01/02/97 +// Copyright: (c) 1997,1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TREEBASE_H_ +#define _WX_TREEBASE_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_TREECTRL + +#include "wx/window.h" // for wxClientData +#include "wx/event.h" +#include "wx/dynarray.h" +#include "wx/itemid.h" + +#if WXWIN_COMPATIBILITY_2_6 + +// flags for deprecated `Expand(int action)', will be removed in next versions +enum +{ + wxTREE_EXPAND_EXPAND, + wxTREE_EXPAND_COLLAPSE, + wxTREE_EXPAND_COLLAPSE_RESET, + wxTREE_EXPAND_TOGGLE +}; + +#endif // WXWIN_COMPATIBILITY_2_6 + +// ---------------------------------------------------------------------------- +// wxTreeItemId identifies an element of the tree. It's opaque for the +// application and the only method which can be used by user code is IsOk(). +// ---------------------------------------------------------------------------- + +// This is a class and not a typedef because existing code may forward declare +// wxTreeItemId as a class and we don't want to break it without good reason. +class wxTreeItemId : public wxItemId<void*> +{ +public: + wxTreeItemId() : wxItemId<void*>() { } + wxTreeItemId(void* pItem) : wxItemId<void*>(pItem) { } +}; + +// ---------------------------------------------------------------------------- +// wxTreeItemData is some (arbitrary) user class associated with some item. The +// main advantage of having this class (compared to old untyped interface) is +// that wxTreeItemData's are destroyed automatically by the tree and, as this +// class has virtual dtor, it means that the memory will be automatically +// freed. OTOH, we don't just use wxObject instead of wxTreeItemData because +// the size of this class is critical: in any real application, each tree leaf +// will have wxTreeItemData associated with it and number of leaves may be +// quite big. +// +// Because the objects of this class are deleted by the tree, they should +// always be allocated on the heap! +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTreeItemData: public wxClientData +{ +friend class WXDLLIMPEXP_FWD_CORE wxTreeCtrl; +friend class WXDLLIMPEXP_FWD_CORE wxGenericTreeCtrl; +public: + // creation/destruction + // -------------------- + // default ctor + wxTreeItemData() { } + + // default copy ctor/assignment operator are ok + + // accessor: get the item associated with us + const wxTreeItemId& GetId() const { return m_pItem; } + void SetId(const wxTreeItemId& id) { m_pItem = id; } + +protected: + wxTreeItemId m_pItem; +}; + +typedef void *wxTreeItemIdValue; + +WX_DEFINE_EXPORTED_ARRAY_PTR(wxTreeItemIdValue, wxArrayTreeItemIdsBase); + +// this is a wrapper around the array class defined above which allow to wok +// with values of natural wxTreeItemId type instead of using wxTreeItemIdValue +// and does it without any loss of efficiency +class WXDLLIMPEXP_CORE wxArrayTreeItemIds : public wxArrayTreeItemIdsBase +{ +public: + void Add(const wxTreeItemId& id) + { wxArrayTreeItemIdsBase::Add(id.m_pItem); } + void Insert(const wxTreeItemId& id, size_t pos) + { wxArrayTreeItemIdsBase::Insert(id.m_pItem, pos); } + wxTreeItemId Item(size_t i) const + { return wxTreeItemId(wxArrayTreeItemIdsBase::Item(i)); } + wxTreeItemId operator[](size_t i) const { return Item(i); } +}; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// enum for different images associated with a treectrl item +enum wxTreeItemIcon +{ + wxTreeItemIcon_Normal, // not selected, not expanded + wxTreeItemIcon_Selected, // selected, not expanded + wxTreeItemIcon_Expanded, // not selected, expanded + wxTreeItemIcon_SelectedExpanded, // selected, expanded + wxTreeItemIcon_Max +}; + +// special values for the 'state' parameter of wxTreeCtrl::SetItemState() +static const int wxTREE_ITEMSTATE_NONE = -1; // not state (no display state image) +static const int wxTREE_ITEMSTATE_NEXT = -2; // cycle to the next state +static const int wxTREE_ITEMSTATE_PREV = -3; // cycle to the previous state + +// ---------------------------------------------------------------------------- +// wxTreeCtrl flags +// ---------------------------------------------------------------------------- + +#define wxTR_NO_BUTTONS 0x0000 // for convenience +#define wxTR_HAS_BUTTONS 0x0001 // draw collapsed/expanded btns +#define wxTR_NO_LINES 0x0004 // don't draw lines at all +#define wxTR_LINES_AT_ROOT 0x0008 // connect top-level nodes +#define wxTR_TWIST_BUTTONS 0x0010 // still used by wxTreeListCtrl + +#define wxTR_SINGLE 0x0000 // for convenience +#define wxTR_MULTIPLE 0x0020 // can select multiple items + +#if WXWIN_COMPATIBILITY_2_8 + #define wxTR_EXTENDED 0x0040 // deprecated, don't use +#endif // WXWIN_COMPATIBILITY_2_8 + +#define wxTR_HAS_VARIABLE_ROW_HEIGHT 0x0080 // what it says + +#define wxTR_EDIT_LABELS 0x0200 // can edit item labels +#define wxTR_ROW_LINES 0x0400 // put border around items +#define wxTR_HIDE_ROOT 0x0800 // don't display root node + +#define wxTR_FULL_ROW_HIGHLIGHT 0x2000 // highlight full horz space + +// make the default control appearance look more native-like depending on the +// platform +#if defined(__WXGTK20__) + #define wxTR_DEFAULT_STYLE (wxTR_HAS_BUTTONS | wxTR_NO_LINES) +#elif defined(__WXMAC__) + #define wxTR_DEFAULT_STYLE \ + (wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxTR_FULL_ROW_HIGHLIGHT) +#else + #define wxTR_DEFAULT_STYLE (wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT) +#endif + +#if WXWIN_COMPATIBILITY_2_6 +// deprecated, don't use +#define wxTR_MAC_BUTTONS 0 +#define wxTR_AQUA_BUTTONS 0 +#endif // WXWIN_COMPATIBILITY_2_6 + + +// values for the `flags' parameter of wxTreeCtrl::HitTest() which determine +// where exactly the specified point is situated: + +static const int wxTREE_HITTEST_ABOVE = 0x0001; +static const int wxTREE_HITTEST_BELOW = 0x0002; +static const int wxTREE_HITTEST_NOWHERE = 0x0004; + // on the button associated with an item. +static const int wxTREE_HITTEST_ONITEMBUTTON = 0x0008; + // on the bitmap associated with an item. +static const int wxTREE_HITTEST_ONITEMICON = 0x0010; + // on the indent associated with an item. +static const int wxTREE_HITTEST_ONITEMINDENT = 0x0020; + // on the label (string) associated with an item. +static const int wxTREE_HITTEST_ONITEMLABEL = 0x0040; + // on the right of the label associated with an item. +static const int wxTREE_HITTEST_ONITEMRIGHT = 0x0080; + // on the label (string) associated with an item. +static const int wxTREE_HITTEST_ONITEMSTATEICON = 0x0100; + // on the left of the wxTreeCtrl. +static const int wxTREE_HITTEST_TOLEFT = 0x0200; + // on the right of the wxTreeCtrl. +static const int wxTREE_HITTEST_TORIGHT = 0x0400; + // on the upper part (first half) of the item. +static const int wxTREE_HITTEST_ONITEMUPPERPART = 0x0800; + // on the lower part (second half) of the item. +static const int wxTREE_HITTEST_ONITEMLOWERPART = 0x1000; + + // anywhere on the item +static const int wxTREE_HITTEST_ONITEM = wxTREE_HITTEST_ONITEMICON | + wxTREE_HITTEST_ONITEMLABEL; + +// tree ctrl default name +extern WXDLLIMPEXP_DATA_CORE(const char) wxTreeCtrlNameStr[]; + +// ---------------------------------------------------------------------------- +// wxTreeItemAttr: a structure containing the visual attributes of an item +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTreeItemAttr +{ +public: + // ctors + wxTreeItemAttr() { } + wxTreeItemAttr(const wxColour& colText, + const wxColour& colBack, + const wxFont& font) + : m_colText(colText), m_colBack(colBack), m_font(font) { } + + // setters + void SetTextColour(const wxColour& colText) { m_colText = colText; } + void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; } + void SetFont(const wxFont& font) { m_font = font; } + + // accessors + bool HasTextColour() const { return m_colText.IsOk(); } + bool HasBackgroundColour() const { return m_colBack.IsOk(); } + bool HasFont() const { return m_font.IsOk(); } + + const wxColour& GetTextColour() const { return m_colText; } + const wxColour& GetBackgroundColour() const { return m_colBack; } + const wxFont& GetFont() const { return m_font; } + +private: + wxColour m_colText, + m_colBack; + wxFont m_font; +}; + +// ---------------------------------------------------------------------------- +// wxTreeEvent is a special class for all events associated with tree controls +// +// NB: note that not all accessors make sense for all events, see the event +// descriptions below +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxTreeCtrlBase; + +class WXDLLIMPEXP_CORE wxTreeEvent : public wxNotifyEvent +{ +public: + wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0); + wxTreeEvent(wxEventType commandType, + wxTreeCtrlBase *tree, + const wxTreeItemId &item = wxTreeItemId()); + wxTreeEvent(const wxTreeEvent& event); + + virtual wxEvent *Clone() const { return new wxTreeEvent(*this); } + + // accessors + // get the item on which the operation was performed or the newly + // selected item for wxEVT_TREE_SEL_CHANGED/ING events + wxTreeItemId GetItem() const { return m_item; } + void SetItem(const wxTreeItemId& item) { m_item = item; } + + // for wxEVT_TREE_SEL_CHANGED/ING events, get the previously + // selected item + wxTreeItemId GetOldItem() const { return m_itemOld; } + void SetOldItem(const wxTreeItemId& item) { m_itemOld = item; } + + // the point where the mouse was when the drag operation started (for + // wxEVT_TREE_BEGIN_(R)DRAG events only) or click position + wxPoint GetPoint() const { return m_pointDrag; } + void SetPoint(const wxPoint& pt) { m_pointDrag = pt; } + + // keyboard data (for wxEVT_TREE_KEY_DOWN only) + const wxKeyEvent& GetKeyEvent() const { return m_evtKey; } + int GetKeyCode() const { return m_evtKey.GetKeyCode(); } + void SetKeyEvent(const wxKeyEvent& evt) { m_evtKey = evt; } + + // label (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only) + const wxString& GetLabel() const { return m_label; } + void SetLabel(const wxString& label) { m_label = label; } + + // edit cancel flag (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only) + bool IsEditCancelled() const { return m_editCancelled; } + void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; } + + // Set the tooltip for the item (for EVT\_TREE\_ITEM\_GETTOOLTIP events) + void SetToolTip(const wxString& toolTip) { m_label = toolTip; } + wxString GetToolTip() { return m_label; } + +private: + // not all of the members are used (or initialized) for all events + wxKeyEvent m_evtKey; + wxTreeItemId m_item, + m_itemOld; + wxPoint m_pointDrag; + wxString m_label; + bool m_editCancelled; + + friend class WXDLLIMPEXP_FWD_CORE wxTreeCtrl; + friend class WXDLLIMPEXP_FWD_CORE wxGenericTreeCtrl; + + DECLARE_DYNAMIC_CLASS(wxTreeEvent) +}; + +typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); + +// ---------------------------------------------------------------------------- +// tree control events and macros for handling them +// ---------------------------------------------------------------------------- + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_DRAG, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_RDRAG, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_LABEL_EDIT, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_END_LABEL_EDIT, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_DELETE_ITEM, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_GET_INFO, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SET_INFO, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_EXPANDED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_EXPANDING, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_COLLAPSED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_COLLAPSING, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SEL_CHANGED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SEL_CHANGING, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_KEY_DOWN, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_ACTIVATED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_RIGHT_CLICK, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_MIDDLE_CLICK, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_END_DRAG, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_STATE_IMAGE_CLICK, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_GETTOOLTIP, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_MENU, wxTreeEvent ); + +#define wxTreeEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxTreeEventFunction, func) + +#define wx__DECLARE_TREEEVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_TREE_ ## evt, id, wxTreeEventHandler(fn)) + +// GetItem() returns the item being dragged, GetPoint() the mouse coords +// +// if you call event.Allow(), the drag operation will start and a +// EVT_TREE_END_DRAG event will be sent when the drag is over. +#define EVT_TREE_BEGIN_DRAG(id, fn) wx__DECLARE_TREEEVT(BEGIN_DRAG, id, fn) +#define EVT_TREE_BEGIN_RDRAG(id, fn) wx__DECLARE_TREEEVT(BEGIN_RDRAG, id, fn) + +// GetItem() is the item on which the drop occurred (if any) and GetPoint() the +// current mouse coords +#define EVT_TREE_END_DRAG(id, fn) wx__DECLARE_TREEEVT(END_DRAG, id, fn) + +// GetItem() returns the itme whose label is being edited, GetLabel() returns +// the current item label for BEGIN and the would be new one for END. +// +// Vetoing BEGIN event means that label editing won't happen at all, +// vetoing END means that the new value is discarded and the old one kept +#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) wx__DECLARE_TREEEVT(BEGIN_LABEL_EDIT, id, fn) +#define EVT_TREE_END_LABEL_EDIT(id, fn) wx__DECLARE_TREEEVT(END_LABEL_EDIT, id, fn) + +// provide/update information about GetItem() item +#define EVT_TREE_GET_INFO(id, fn) wx__DECLARE_TREEEVT(GET_INFO, id, fn) +#define EVT_TREE_SET_INFO(id, fn) wx__DECLARE_TREEEVT(SET_INFO, id, fn) + +// GetItem() is the item being expanded/collapsed, the "ING" versions can use +#define EVT_TREE_ITEM_EXPANDED(id, fn) wx__DECLARE_TREEEVT(ITEM_EXPANDED, id, fn) +#define EVT_TREE_ITEM_EXPANDING(id, fn) wx__DECLARE_TREEEVT(ITEM_EXPANDING, id, fn) +#define EVT_TREE_ITEM_COLLAPSED(id, fn) wx__DECLARE_TREEEVT(ITEM_COLLAPSED, id, fn) +#define EVT_TREE_ITEM_COLLAPSING(id, fn) wx__DECLARE_TREEEVT(ITEM_COLLAPSING, id, fn) + +// GetOldItem() is the item which had the selection previously, GetItem() is +// the item which acquires selection +#define EVT_TREE_SEL_CHANGED(id, fn) wx__DECLARE_TREEEVT(SEL_CHANGED, id, fn) +#define EVT_TREE_SEL_CHANGING(id, fn) wx__DECLARE_TREEEVT(SEL_CHANGING, id, fn) + +// GetKeyCode() returns the key code +// NB: this is the only message for which GetItem() is invalid (you may get the +// item from GetSelection()) +#define EVT_TREE_KEY_DOWN(id, fn) wx__DECLARE_TREEEVT(KEY_DOWN, id, fn) + +// GetItem() returns the item being deleted, the associated data (if any) will +// be deleted just after the return of this event handler (if any) +#define EVT_TREE_DELETE_ITEM(id, fn) wx__DECLARE_TREEEVT(DELETE_ITEM, id, fn) + +// GetItem() returns the item that was activated (double click, enter, space) +#define EVT_TREE_ITEM_ACTIVATED(id, fn) wx__DECLARE_TREEEVT(ITEM_ACTIVATED, id, fn) + +// GetItem() returns the item for which the context menu shall be shown +#define EVT_TREE_ITEM_MENU(id, fn) wx__DECLARE_TREEEVT(ITEM_MENU, id, fn) + +// GetItem() returns the item that was clicked on +#define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) wx__DECLARE_TREEEVT(ITEM_RIGHT_CLICK, id, fn) +#define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) wx__DECLARE_TREEEVT(ITEM_MIDDLE_CLICK, id, fn) + +// GetItem() returns the item whose state image was clicked on +#define EVT_TREE_STATE_IMAGE_CLICK(id, fn) wx__DECLARE_TREEEVT(STATE_IMAGE_CLICK, id, fn) + +// GetItem() is the item for which the tooltip is being requested +#define EVT_TREE_ITEM_GETTOOLTIP(id, fn) wx__DECLARE_TREEEVT(ITEM_GETTOOLTIP, id, fn) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREE_BEGIN_DRAG wxEVT_TREE_BEGIN_DRAG +#define wxEVT_COMMAND_TREE_BEGIN_RDRAG wxEVT_TREE_BEGIN_RDRAG +#define wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT wxEVT_TREE_BEGIN_LABEL_EDIT +#define wxEVT_COMMAND_TREE_END_LABEL_EDIT wxEVT_TREE_END_LABEL_EDIT +#define wxEVT_COMMAND_TREE_DELETE_ITEM wxEVT_TREE_DELETE_ITEM +#define wxEVT_COMMAND_TREE_GET_INFO wxEVT_TREE_GET_INFO +#define wxEVT_COMMAND_TREE_SET_INFO wxEVT_TREE_SET_INFO +#define wxEVT_COMMAND_TREE_ITEM_EXPANDED wxEVT_TREE_ITEM_EXPANDED +#define wxEVT_COMMAND_TREE_ITEM_EXPANDING wxEVT_TREE_ITEM_EXPANDING +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSED wxEVT_TREE_ITEM_COLLAPSED +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSING wxEVT_TREE_ITEM_COLLAPSING +#define wxEVT_COMMAND_TREE_SEL_CHANGED wxEVT_TREE_SEL_CHANGED +#define wxEVT_COMMAND_TREE_SEL_CHANGING wxEVT_TREE_SEL_CHANGING +#define wxEVT_COMMAND_TREE_KEY_DOWN wxEVT_TREE_KEY_DOWN +#define wxEVT_COMMAND_TREE_ITEM_ACTIVATED wxEVT_TREE_ITEM_ACTIVATED +#define wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK wxEVT_TREE_ITEM_RIGHT_CLICK +#define wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK wxEVT_TREE_ITEM_MIDDLE_CLICK +#define wxEVT_COMMAND_TREE_END_DRAG wxEVT_TREE_END_DRAG +#define wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK wxEVT_TREE_STATE_IMAGE_CLICK +#define wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP wxEVT_TREE_ITEM_GETTOOLTIP +#define wxEVT_COMMAND_TREE_ITEM_MENU wxEVT_TREE_ITEM_MENU + +#endif // wxUSE_TREECTRL + +#endif // _WX_TREEBASE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/treebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/treebook.h new file mode 100644 index 0000000000..bd59338952 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/treebook.h @@ -0,0 +1,263 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/treebook.h +// Purpose: wxTreebook: wxNotebook-like control presenting pages in a tree +// Author: Evgeniy Tarassov, Vadim Zeitlin +// Modified by: +// Created: 2005-09-15 +// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TREEBOOK_H_ +#define _WX_TREEBOOK_H_ + +#include "wx/defs.h" + +#if wxUSE_TREEBOOK + +#include "wx/bookctrl.h" +#include "wx/containr.h" +#include "wx/treectrl.h" // for wxArrayTreeItemIds + +typedef wxWindow wxTreebookPage; + +class WXDLLIMPEXP_FWD_CORE wxTreeEvent; + +// ---------------------------------------------------------------------------- +// wxTreebook +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTreebook : public wxNavigationEnabled<wxBookCtrlBase> +{ +public: + // Constructors and such + // --------------------- + + // Default ctor doesn't create the control, use Create() afterwards + wxTreebook() + { + Init(); + } + + // This ctor creates the tree book control + wxTreebook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxBK_DEFAULT, + const wxString& name = wxEmptyString) + { + Init(); + + (void)Create(parent, id, pos, size, style, name); + } + + // Really creates the control + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxBK_DEFAULT, + const wxString& name = wxEmptyString); + + + // Page insertion operations + // ------------------------- + + // Notice that page pointer may be NULL in which case the next non NULL + // page (usually the first child page of a node) is shown when this page is + // selected + + // Inserts a new page just before the page indicated by page. + // The new page is placed on the same level as page. + virtual bool InsertPage(size_t pos, + wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE); + + // Inserts a new sub-page to the end of children of the page at given pos. + virtual bool InsertSubPage(size_t pos, + wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE); + + // Adds a new page at top level after all other pages. + virtual bool AddPage(wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE); + + // Adds a new child-page to the last top-level page inserted. + // Useful when constructing 1 level tree structure. + virtual bool AddSubPage(wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE); + + // Deletes the page and ALL its children. Could trigger page selection + // change in a case when selected page is removed. In that case its parent + // is selected (or the next page if no parent). + virtual bool DeletePage(size_t pos); + + + // Tree operations + // --------------- + + // Gets the page node state -- node is expanded or collapsed + virtual bool IsNodeExpanded(size_t pos) const; + + // Expands or collapses the page node. Returns the previous state. + // May generate page changing events (if selected page + // is under the collapsed branch, then parent is autoselected). + virtual bool ExpandNode(size_t pos, bool expand = true); + + // shortcut for ExpandNode(pos, false) + bool CollapseNode(size_t pos) { return ExpandNode(pos, false); } + + // get the parent page or wxNOT_FOUND if this is a top level page + int GetPageParent(size_t pos) const; + + // the tree control we use for showing the pages index tree + wxTreeCtrl* GetTreeCtrl() const { return (wxTreeCtrl*)m_bookctrl; } + + + // Standard operations inherited from wxBookCtrlBase + // ------------------------------------------------- + + virtual bool SetPageText(size_t n, const wxString& strText); + virtual wxString GetPageText(size_t n) const; + virtual int GetPageImage(size_t n) const; + virtual bool SetPageImage(size_t n, int imageId); + virtual int SetSelection(size_t n) { return DoSetSelection(n, SetSelection_SendEvent); } + virtual int ChangeSelection(size_t n) { return DoSetSelection(n); } + virtual int HitTest(const wxPoint& pt, long *flags = NULL) const; + virtual void SetImageList(wxImageList *imageList); + virtual void AssignImageList(wxImageList *imageList); + virtual bool DeleteAllPages(); + +protected: + // Implementation of a page removal. See DeletPage for comments. + wxTreebookPage *DoRemovePage(size_t pos); + + // This subclass of wxBookCtrlBase accepts NULL page pointers (empty pages) + virtual bool AllowNullPage() const { return true; } + + // event handlers + void OnTreeSelectionChange(wxTreeEvent& event); + void OnTreeNodeExpandedCollapsed(wxTreeEvent& event); + + // array of page ids and page windows + wxArrayTreeItemIds m_treeIds; + + // in the situation when m_selection page is not wxNOT_FOUND but page is + // NULL this is the first (sub)child that has a non-NULL page + int m_actualSelection; + +private: + // common part of all constructors + void Init(); + + // The real implementations of page insertion functions + // ------------------------------------------------------ + // All DoInsert/Add(Sub)Page functions add the page into : + // - the base class + // - the tree control + // - update the index/TreeItemId corespondance array + bool DoInsertPage(size_t pos, + wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE); + bool DoInsertSubPage(size_t pos, + wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE); + bool DoAddSubPage(wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE); + + // Sets selection in the tree control and updates the page being shown. + int DoSetSelection(size_t pos, int flags = 0); + + // Returns currently shown page. In a case when selected the node + // has empty (NULL) page finds first (sub)child with not-empty page. + wxTreebookPage *DoGetCurrentPage() const; + + // Does the selection update. Called from page insertion functions + // to update selection if the selected page was pushed by the newly inserted + void DoUpdateSelection(bool bSelect, int page); + + + // Operations on the internal private members of the class + // ------------------------------------------------------- + // Returns the page TreeItemId for the page. + // Or, if the page index is incorrect, a fake one (fakePage.IsOk() == false) + wxTreeItemId DoInternalGetPage(size_t pos) const; + + // Linear search for a page with the id specified. If no page + // found wxNOT_FOUND is returned. The function is used when we catch an event + // from m_tree (wxTreeCtrl) component. + int DoInternalFindPageById(wxTreeItemId page) const; + + // Updates page and wxTreeItemId correspondance. + void DoInternalAddPage(size_t newPos, wxWindow *page, wxTreeItemId pageId); + + // Removes the page from internal structure. + void DoInternalRemovePage(size_t pos) + { DoInternalRemovePageRange(pos, 0); } + + // Removes the page and all its children designated by subCount + // from internal structures of the control. + void DoInternalRemovePageRange(size_t pos, size_t subCount); + + // Returns internal number of pages which can be different from + // GetPageCount() while performing a page insertion or removal. + size_t DoInternalGetPageCount() const { return m_treeIds.GetCount(); } + + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxTreebook) +}; + + +// ---------------------------------------------------------------------------- +// treebook event class and related stuff +// ---------------------------------------------------------------------------- + +// wxTreebookEvent is obsolete and defined for compatibility only +#define wxTreebookEvent wxBookCtrlEvent +typedef wxBookCtrlEventFunction wxTreebookEventFunction; +#define wxTreebookEventHandler(func) wxBookCtrlEventHandler(func) + + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_NODE_COLLAPSED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_NODE_EXPANDED, wxBookCtrlEvent ); + +#define EVT_TREEBOOK_PAGE_CHANGED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_TREEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + +#define EVT_TREEBOOK_PAGE_CHANGING(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_TREEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + +#define EVT_TREEBOOK_NODE_COLLAPSED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_TREEBOOK_NODE_COLLAPSED, winid, wxBookCtrlEventHandler(fn)) + +#define EVT_TREEBOOK_NODE_EXPANDED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_TREEBOOK_NODE_EXPANDED, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED wxEVT_TREEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING wxEVT_TREEBOOK_PAGE_CHANGING +#define wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED wxEVT_TREEBOOK_NODE_COLLAPSED +#define wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED wxEVT_TREEBOOK_NODE_EXPANDED + + +#endif // wxUSE_TREEBOOK + +#endif // _WX_TREEBOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/treectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/treectrl.h new file mode 100644 index 0000000000..89493c3bbb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/treectrl.h @@ -0,0 +1,477 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/treectrl.h +// Purpose: wxTreeCtrl base header +// Author: Karsten Ballueder +// Modified by: +// Created: +// Copyright: (c) Karsten Ballueder +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TREECTRL_H_BASE_ +#define _WX_TREECTRL_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_TREECTRL + +#include "wx/control.h" +#include "wx/treebase.h" +#include "wx/textctrl.h" // wxTextCtrl::ms_classinfo used through wxCLASSINFO macro + +class WXDLLIMPEXP_FWD_CORE wxImageList; + +// ---------------------------------------------------------------------------- +// wxTreeCtrlBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTreeCtrlBase : public wxControl +{ +public: + wxTreeCtrlBase(); + virtual ~wxTreeCtrlBase(); + + // accessors + // --------- + + // get the total number of items in the control + virtual unsigned int GetCount() const = 0; + + // indent is the number of pixels the children are indented relative to + // the parents position. SetIndent() also redraws the control + // immediately. + virtual unsigned int GetIndent() const = 0; + virtual void SetIndent(unsigned int indent) = 0; + + // spacing is the number of pixels between the start and the Text + // (has no effect under wxMSW) + unsigned int GetSpacing() const { return m_spacing; } + void SetSpacing(unsigned int spacing) { m_spacing = spacing; } + + // image list: these functions allow to associate an image list with + // the control and retrieve it. Note that the control does _not_ delete + // the associated image list when it's deleted in order to allow image + // lists to be shared between different controls. + // + // The normal image list is for the icons which correspond to the + // normal tree item state (whether it is selected or not). + // Additionally, the application might choose to show a state icon + // which corresponds to an app-defined item state (for example, + // checked/unchecked) which are taken from the state image list. + wxImageList *GetImageList() const { return m_imageListNormal; } + wxImageList *GetStateImageList() const { return m_imageListState; } + + virtual void SetImageList(wxImageList *imageList) = 0; + virtual void SetStateImageList(wxImageList *imageList) = 0; + void AssignImageList(wxImageList *imageList) + { + SetImageList(imageList); + m_ownsImageListNormal = true; + } + void AssignStateImageList(wxImageList *imageList) + { + SetStateImageList(imageList); + m_ownsImageListState = true; + } + + + // Functions to work with tree ctrl items. Unfortunately, they can _not_ be + // member functions of wxTreeItem because they must know the tree the item + // belongs to for Windows implementation and storing the pointer to + // wxTreeCtrl in each wxTreeItem is just too much waste. + + // accessors + // --------- + + // retrieve items label + virtual wxString GetItemText(const wxTreeItemId& item) const = 0; + // get one of the images associated with the item (normal by default) + virtual int GetItemImage(const wxTreeItemId& item, + wxTreeItemIcon which = wxTreeItemIcon_Normal) const = 0; + // get the data associated with the item + virtual wxTreeItemData *GetItemData(const wxTreeItemId& item) const = 0; + + // get the item's text colour + virtual wxColour GetItemTextColour(const wxTreeItemId& item) const = 0; + + // get the item's background colour + virtual wxColour GetItemBackgroundColour(const wxTreeItemId& item) const = 0; + + // get the item's font + virtual wxFont GetItemFont(const wxTreeItemId& item) const = 0; + + // get the items state + int GetItemState(const wxTreeItemId& item) const + { + return DoGetItemState(item); + } + + // modifiers + // --------- + + // set items label + virtual void SetItemText(const wxTreeItemId& item, const wxString& text) = 0; + // set one of the images associated with the item (normal by default) + virtual void SetItemImage(const wxTreeItemId& item, + int image, + wxTreeItemIcon which = wxTreeItemIcon_Normal) = 0; + // associate some data with the item + virtual void SetItemData(const wxTreeItemId& item, wxTreeItemData *data) = 0; + + // force appearance of [+] button near the item. This is useful to + // allow the user to expand the items which don't have any children now + // - but instead add them only when needed, thus minimizing memory + // usage and loading time. + virtual void SetItemHasChildren(const wxTreeItemId& item, + bool has = true) = 0; + + // the item will be shown in bold + virtual void SetItemBold(const wxTreeItemId& item, bool bold = true) = 0; + + // the item will be shown with a drop highlight + virtual void SetItemDropHighlight(const wxTreeItemId& item, + bool highlight = true) = 0; + + // set the items text colour + virtual void SetItemTextColour(const wxTreeItemId& item, + const wxColour& col) = 0; + + // set the items background colour + virtual void SetItemBackgroundColour(const wxTreeItemId& item, + const wxColour& col) = 0; + + // set the items font (should be of the same height for all items) + virtual void SetItemFont(const wxTreeItemId& item, + const wxFont& font) = 0; + + // set the items state (special state values: wxTREE_ITEMSTATE_NONE/NEXT/PREV) + void SetItemState(const wxTreeItemId& item, int state); + + // item status inquiries + // --------------------- + + // is the item visible (it might be outside the view or not expanded)? + virtual bool IsVisible(const wxTreeItemId& item) const = 0; + // does the item has any children? + virtual bool ItemHasChildren(const wxTreeItemId& item) const = 0; + // same as above + bool HasChildren(const wxTreeItemId& item) const + { return ItemHasChildren(item); } + // is the item expanded (only makes sense if HasChildren())? + virtual bool IsExpanded(const wxTreeItemId& item) const = 0; + // is this item currently selected (the same as has focus)? + virtual bool IsSelected(const wxTreeItemId& item) const = 0; + // is item text in bold font? + virtual bool IsBold(const wxTreeItemId& item) const = 0; + // is the control empty? + bool IsEmpty() const; + + + // number of children + // ------------------ + + // if 'recursively' is false, only immediate children count, otherwise + // the returned number is the number of all items in this branch + virtual size_t GetChildrenCount(const wxTreeItemId& item, + bool recursively = true) const = 0; + + // navigation + // ---------- + + // wxTreeItemId.IsOk() will return false if there is no such item + + // get the root tree item + virtual wxTreeItemId GetRootItem() const = 0; + + // get the item currently selected (may return NULL if no selection) + virtual wxTreeItemId GetSelection() const = 0; + + // get the items currently selected, return the number of such item + // + // NB: this operation is expensive and can take a long time for a + // control with a lot of items (~ O(number of items)). + virtual size_t GetSelections(wxArrayTreeItemIds& selections) const = 0; + + // get the last item to be clicked when the control has wxTR_MULTIPLE + // equivalent to GetSelection() if not wxTR_MULTIPLE + virtual wxTreeItemId GetFocusedItem() const = 0; + + + // Clears the currently focused item + virtual void ClearFocusedItem() = 0; + // Sets the currently focused item. Item should be valid + virtual void SetFocusedItem(const wxTreeItemId& item) = 0; + + + // get the parent of this item (may return NULL if root) + virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const = 0; + + // for this enumeration function you must pass in a "cookie" parameter + // which is opaque for the application but is necessary for the library + // to make these functions reentrant (i.e. allow more than one + // enumeration on one and the same object simultaneously). Of course, + // the "cookie" passed to GetFirstChild() and GetNextChild() should be + // the same! + + // get the first child of this item + virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const = 0; + // get the next child + virtual wxTreeItemId GetNextChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const = 0; + // get the last child of this item - this method doesn't use cookies + virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const = 0; + + // get the next sibling of this item + virtual wxTreeItemId GetNextSibling(const wxTreeItemId& item) const = 0; + // get the previous sibling + virtual wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const = 0; + + // get first visible item + virtual wxTreeItemId GetFirstVisibleItem() const = 0; + // get the next visible item: item must be visible itself! + // see IsVisible() and wxTreeCtrl::GetFirstVisibleItem() + virtual wxTreeItemId GetNextVisible(const wxTreeItemId& item) const = 0; + // get the previous visible item: item must be visible itself! + virtual wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const = 0; + + // operations + // ---------- + + // add the root node to the tree + virtual wxTreeItemId AddRoot(const wxString& text, + int image = -1, int selImage = -1, + wxTreeItemData *data = NULL) = 0; + + // insert a new item in as the first child of the parent + wxTreeItemId PrependItem(const wxTreeItemId& parent, + const wxString& text, + int image = -1, int selImage = -1, + wxTreeItemData *data = NULL) + { + return DoInsertItem(parent, 0u, text, image, selImage, data); + } + + // insert a new item after a given one + wxTreeItemId InsertItem(const wxTreeItemId& parent, + const wxTreeItemId& idPrevious, + const wxString& text, + int image = -1, int selImage = -1, + wxTreeItemData *data = NULL) + { + return DoInsertAfter(parent, idPrevious, text, image, selImage, data); + } + + // insert a new item before the one with the given index + wxTreeItemId InsertItem(const wxTreeItemId& parent, + size_t pos, + const wxString& text, + int image = -1, int selImage = -1, + wxTreeItemData *data = NULL) + { + return DoInsertItem(parent, pos, text, image, selImage, data); + } + + // insert a new item in as the last child of the parent + wxTreeItemId AppendItem(const wxTreeItemId& parent, + const wxString& text, + int image = -1, int selImage = -1, + wxTreeItemData *data = NULL) + { + return DoInsertItem(parent, (size_t)-1, text, image, selImage, data); + } + + // delete this item and associated data if any + virtual void Delete(const wxTreeItemId& item) = 0; + // delete all children (but don't delete the item itself) + // NB: this won't send wxEVT_TREE_ITEM_DELETED events + virtual void DeleteChildren(const wxTreeItemId& item) = 0; + // delete all items from the tree + // NB: this won't send wxEVT_TREE_ITEM_DELETED events + virtual void DeleteAllItems() = 0; + + // expand this item + virtual void Expand(const wxTreeItemId& item) = 0; + // expand the item and all its children recursively + void ExpandAllChildren(const wxTreeItemId& item); + // expand all items + void ExpandAll(); + // collapse the item without removing its children + virtual void Collapse(const wxTreeItemId& item) = 0; + // collapse the item and all its children + void CollapseAllChildren(const wxTreeItemId& item); + // collapse all items + void CollapseAll(); + // collapse the item and remove all children + virtual void CollapseAndReset(const wxTreeItemId& item) = 0; + // toggles the current state + virtual void Toggle(const wxTreeItemId& item) = 0; + + // remove the selection from currently selected item (if any) + virtual void Unselect() = 0; + // unselect all items (only makes sense for multiple selection control) + virtual void UnselectAll() = 0; + // select this item + virtual void SelectItem(const wxTreeItemId& item, bool select = true) = 0; + // selects all (direct) children for given parent (only for + // multiselection controls) + virtual void SelectChildren(const wxTreeItemId& parent) = 0; + // unselect this item + void UnselectItem(const wxTreeItemId& item) { SelectItem(item, false); } + // toggle item selection + void ToggleItemSelection(const wxTreeItemId& item) + { + SelectItem(item, !IsSelected(item)); + } + + // make sure this item is visible (expanding the parent item and/or + // scrolling to this item if necessary) + virtual void EnsureVisible(const wxTreeItemId& item) = 0; + // scroll to this item (but don't expand its parent) + virtual void ScrollTo(const wxTreeItemId& item) = 0; + + // start editing the item label: this (temporarily) replaces the item + // with a one line edit control. The item will be selected if it hadn't + // been before. textCtrlClass parameter allows you to create an edit + // control of arbitrary user-defined class deriving from wxTextCtrl. + virtual wxTextCtrl *EditLabel(const wxTreeItemId& item, + wxClassInfo* textCtrlClass = wxCLASSINFO(wxTextCtrl)) = 0; + // returns the same pointer as StartEdit() if the item is being edited, + // NULL otherwise (it's assumed that no more than one item may be + // edited simultaneously) + virtual wxTextCtrl *GetEditControl() const = 0; + // end editing and accept or discard the changes to item label + virtual void EndEditLabel(const wxTreeItemId& item, + bool discardChanges = false) = 0; + + // Enable or disable beep when incremental match doesn't find any item. + // Only implemented in the generic version currently. + virtual void EnableBellOnNoMatch(bool WXUNUSED(on) = true) { } + + // sorting + // ------- + + // this function is called to compare 2 items and should return -1, 0 + // or +1 if the first item is less than, equal to or greater than the + // second one. The base class version performs alphabetic comparaison + // of item labels (GetText) + virtual int OnCompareItems(const wxTreeItemId& item1, + const wxTreeItemId& item2) + { + return wxStrcmp(GetItemText(item1), GetItemText(item2)); + } + + // sort the children of this item using OnCompareItems + // + // NB: this function is not reentrant and not MT-safe (FIXME)! + virtual void SortChildren(const wxTreeItemId& item) = 0; + + // items geometry + // -------------- + + // determine to which item (if any) belongs the given point (the + // coordinates specified are relative to the client area of tree ctrl) + // and, in the second variant, fill the flags parameter with a bitmask + // of wxTREE_HITTEST_xxx constants. + wxTreeItemId HitTest(const wxPoint& point) const + { int dummy; return DoTreeHitTest(point, dummy); } + wxTreeItemId HitTest(const wxPoint& point, int& flags) const + { return DoTreeHitTest(point, flags); } + + // get the bounding rectangle of the item (or of its label only) + virtual bool GetBoundingRect(const wxTreeItemId& item, + wxRect& rect, + bool textOnly = false) const = 0; + + + // implementation + // -------------- + + virtual bool ShouldInheritColours() const { return false; } + + // hint whether to calculate best size quickly or accurately + void SetQuickBestSize(bool q) { m_quickBestSize = q; } + bool GetQuickBestSize() const { return m_quickBestSize; } + +protected: + virtual wxSize DoGetBestSize() const; + + // common part of Get/SetItemState() + virtual int DoGetItemState(const wxTreeItemId& item) const = 0; + virtual void DoSetItemState(const wxTreeItemId& item, int state) = 0; + + // common part of Append/Prepend/InsertItem() + // + // pos is the position at which to insert the item or (size_t)-1 to append + // it to the end + virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent, + size_t pos, + const wxString& text, + int image, int selImage, + wxTreeItemData *data) = 0; + + // and this function implements overloaded InsertItem() taking wxTreeItemId + // (it can't be called InsertItem() as we'd have virtual function hiding + // problem in derived classes then) + virtual wxTreeItemId DoInsertAfter(const wxTreeItemId& parent, + const wxTreeItemId& idPrevious, + const wxString& text, + int image = -1, int selImage = -1, + wxTreeItemData *data = NULL) = 0; + + // real HitTest() implementation: again, can't be called just HitTest() + // because it's overloaded and so the non-virtual overload would be hidden + // (and can't be called DoHitTest() because this is already in wxWindow) + virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, + int& flags) const = 0; + + + wxImageList *m_imageListNormal, // images for tree elements + *m_imageListState; // special images for app defined states + bool m_ownsImageListNormal, + m_ownsImageListState; + + // spacing between left border and the text + unsigned int m_spacing; + + // whether full or quick calculation is done in DoGetBestSize + bool m_quickBestSize; + + +private: + // Intercept Escape and Return keys to ensure that our in-place edit + // control always gets them before they're used for dialog navigation or + // anything else. + void OnCharHook(wxKeyEvent& event); + + + wxDECLARE_NO_COPY_CLASS(wxTreeCtrlBase); +}; + +// ---------------------------------------------------------------------------- +// include the platform-dependent wxTreeCtrl class +// ---------------------------------------------------------------------------- + +#if defined(__WXUNIVERSAL__) + #include "wx/generic/treectlg.h" +#elif defined(__WXMSW__) + #include "wx/msw/treectrl.h" +#elif defined(__WXMOTIF__) + #include "wx/generic/treectlg.h" +#elif defined(__WXGTK__) + #include "wx/generic/treectlg.h" +#elif defined(__WXMAC__) + #include "wx/generic/treectlg.h" +#elif defined(__WXCOCOA__) + #include "wx/generic/treectlg.h" +#elif defined(__WXPM__) + #include "wx/generic/treectlg.h" +#endif + +#endif // wxUSE_TREECTRL + +#endif // _WX_TREECTRL_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/treelist.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/treelist.h new file mode 100644 index 0000000000..d06e35e869 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/treelist.h @@ -0,0 +1,576 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/treelist.h +// Purpose: wxTreeListCtrl class declaration. +// Author: Vadim Zeitlin +// Created: 2011-08-17 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TREELIST_H_ +#define _WX_TREELIST_H_ + +#include "wx/defs.h" + +#if wxUSE_TREELISTCTRL + +#include "wx/compositewin.h" +#include "wx/containr.h" +#include "wx/headercol.h" +#include "wx/itemid.h" +#include "wx/vector.h" +#include "wx/window.h" +#include "wx/withimages.h" + +class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl; +class WXDLLIMPEXP_FWD_ADV wxDataViewEvent; + +extern WXDLLIMPEXP_DATA_ADV(const char) wxTreeListCtrlNameStr[]; + +class wxTreeListCtrl; +class wxTreeListModel; +class wxTreeListModelNode; + +// ---------------------------------------------------------------------------- +// Constants. +// ---------------------------------------------------------------------------- + +// wxTreeListCtrl styles. +// +// Notice that using wxTL_USER_3STATE implies wxTL_3STATE and wxTL_3STATE in +// turn implies wxTL_CHECKBOX. +enum +{ + wxTL_SINGLE = 0x0000, // This is the default anyhow. + wxTL_MULTIPLE = 0x0001, // Allow multiple selection. + wxTL_CHECKBOX = 0x0002, // Show checkboxes in the first column. + wxTL_3STATE = 0x0004, // Allow 3rd state in checkboxes. + wxTL_USER_3STATE = 0x0008, // Allow user to set 3rd state. + wxTL_NO_HEADER = 0x0010, // Column titles not visible. + + wxTL_DEFAULT_STYLE = wxTL_SINGLE, + wxTL_STYLE_MASK = wxTL_SINGLE | + wxTL_MULTIPLE | + wxTL_CHECKBOX | + wxTL_3STATE | + wxTL_USER_3STATE +}; + +// ---------------------------------------------------------------------------- +// wxTreeListItem: unique identifier of an item in wxTreeListCtrl. +// ---------------------------------------------------------------------------- + +// Make wxTreeListItem a forward-declarable class even though it's simple +// enough to possibly be declared as a simple typedef. +class wxTreeListItem : public wxItemId<wxTreeListModelNode*> +{ +public: + wxTreeListItem(wxTreeListModelNode* item = NULL) + : wxItemId<wxTreeListModelNode*>(item) + { + } +}; + +// Container of multiple items. +typedef wxVector<wxTreeListItem> wxTreeListItems; + +// Some special "items" that can be used with InsertItem(): +extern WXDLLIMPEXP_DATA_ADV(const wxTreeListItem) wxTLI_FIRST; +extern WXDLLIMPEXP_DATA_ADV(const wxTreeListItem) wxTLI_LAST; + +// ---------------------------------------------------------------------------- +// wxTreeListItemComparator: defines order of wxTreeListCtrl items. +// ---------------------------------------------------------------------------- + +class wxTreeListItemComparator +{ +public: + wxTreeListItemComparator() { } + + // The comparison function should return negative, null or positive value + // depending on whether the first item is less than, equal to or greater + // than the second one. The items should be compared using their values for + // the given column. + virtual int + Compare(wxTreeListCtrl* treelist, + unsigned column, + wxTreeListItem first, + wxTreeListItem second) = 0; + + // Although this class is not used polymorphically by wxWidgets itself, + // provide virtual dtor in case it's used like this in the user code. + virtual ~wxTreeListItemComparator() { } + +private: + wxDECLARE_NO_COPY_CLASS(wxTreeListItemComparator); +}; + +// ---------------------------------------------------------------------------- +// wxTreeListCtrl: a control combining wxTree- and wxListCtrl features. +// ---------------------------------------------------------------------------- + +// This control also provides easy to use high level interface. Although the +// implementation uses wxDataViewCtrl internally, this class is intentionally +// simpler than wxDataViewCtrl and doesn't provide all of its functionality. +// +// If you need extra features you can always use GetDataView() accessor to work +// with wxDataViewCtrl directly but doing this makes your unportable to possible +// future non-wxDataViewCtrl-based implementations of this class. + +class WXDLLIMPEXP_ADV wxTreeListCtrl + : public wxCompositeWindow< wxNavigationEnabled<wxWindow> >, + public wxWithImages +{ +public: + // Constructors and such + // --------------------- + + wxTreeListCtrl() { Init(); } + wxTreeListCtrl(wxWindow* parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTL_DEFAULT_STYLE, + const wxString& name = wxTreeListCtrlNameStr) + { + Init(); + + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow* parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTL_DEFAULT_STYLE, + const wxString& name = wxTreeListCtrlNameStr); + + + virtual ~wxTreeListCtrl(); + + // Columns methods + // --------------- + + // Add a column with the given title and attributes, returns the index of + // the new column or -1 on failure. + int AppendColumn(const wxString& title, + int width = wxCOL_WIDTH_AUTOSIZE, + wxAlignment align = wxALIGN_LEFT, + int flags = wxCOL_RESIZABLE) + { + return DoInsertColumn(title, -1, width, align, flags); + } + + // Return the total number of columns. + unsigned GetColumnCount() const; + + // Delete the column with the given index, returns false if index is + // invalid or deleting the column failed for some other reason. + bool DeleteColumn(unsigned col); + + // Delete all columns. + void ClearColumns(); + + // Set column width to either the given value in pixels or to the value + // large enough to fit all of the items if width == wxCOL_WIDTH_AUTOSIZE. + void SetColumnWidth(unsigned col, int width); + + // Get the current width of the given column in pixels. + int GetColumnWidth(unsigned col) const; + + // Get the width appropriate for showing the given text. This is typically + // used as second argument for AppendColumn() or with SetColumnWidth(). + int WidthFor(const wxString& text) const; + + + // Item methods + // ------------ + + // Adding items. The parent and text of the first column of the new item + // must always be specified, the rest is optional. + // + // Each item can have two images: one used for closed state and another for + // opened one. Only the first one is ever used for the items that don't + // have children. And both are not set by default. + // + // It is also possible to associate arbitrary client data pointer with the + // new item. It will be deleted by the control when the item is deleted + // (either by an explicit DeleteItem() call or because the entire control + // is destroyed). + + wxTreeListItem AppendItem(wxTreeListItem parent, + const wxString& text, + int imageClosed = NO_IMAGE, + int imageOpened = NO_IMAGE, + wxClientData* data = NULL) + { + return DoInsertItem(parent, wxTLI_LAST, text, + imageClosed, imageOpened, data); + } + + wxTreeListItem InsertItem(wxTreeListItem parent, + wxTreeListItem previous, + const wxString& text, + int imageClosed = NO_IMAGE, + int imageOpened = NO_IMAGE, + wxClientData* data = NULL) + { + return DoInsertItem(parent, previous, text, + imageClosed, imageOpened, data); + } + + wxTreeListItem PrependItem(wxTreeListItem parent, + const wxString& text, + int imageClosed = NO_IMAGE, + int imageOpened = NO_IMAGE, + wxClientData* data = NULL) + { + return DoInsertItem(parent, wxTLI_FIRST, text, + imageClosed, imageOpened, data); + } + + // Deleting items. + void DeleteItem(wxTreeListItem item); + void DeleteAllItems(); + + + // Tree navigation + // --------------- + + // Return the (never shown) root item. + wxTreeListItem GetRootItem() const; + + // The parent item may be invalid for the root-level items. + wxTreeListItem GetItemParent(wxTreeListItem item) const; + + // Iterate over the given item children: start by calling GetFirstChild() + // and then call GetNextSibling() for as long as it returns valid item. + wxTreeListItem GetFirstChild(wxTreeListItem item) const; + wxTreeListItem GetNextSibling(wxTreeListItem item) const; + + // Return the first child of the root item, which is also the first item of + // the tree in depth-first traversal order. + wxTreeListItem GetFirstItem() const { return GetFirstChild(GetRootItem()); } + + // Get item after the given one in the depth-first tree-traversal order. + // Calling this function starting with the result of GetFirstItem() allows + // iterating over all items in the tree. + wxTreeListItem GetNextItem(wxTreeListItem item) const; + + + // Items attributes + // ---------------- + + const wxString& GetItemText(wxTreeListItem item, unsigned col = 0) const; + + // The convenience overload below sets the text for the first column. + void SetItemText(wxTreeListItem item, unsigned col, const wxString& text); + void SetItemText(wxTreeListItem item, const wxString& text) + { + SetItemText(item, 0, text); + } + + // By default the opened image is the same as the normal, closed one (if + // it's used at all). + void SetItemImage(wxTreeListItem item, int closed, int opened = NO_IMAGE); + + // Retrieve or set the data associated with the item. + wxClientData* GetItemData(wxTreeListItem item) const; + void SetItemData(wxTreeListItem item, wxClientData* data); + + + // Expanding and collapsing + // ------------------------ + + void Expand(wxTreeListItem item); + void Collapse(wxTreeListItem item); + bool IsExpanded(wxTreeListItem item) const; + + + // Selection handling + // ------------------ + + // This function can be used with single selection controls, use + // GetSelections() with the multi-selection ones. + wxTreeListItem GetSelection() const; + + // This one can be used with either single or multi-selection controls. + unsigned GetSelections(wxTreeListItems& selections) const; + + // In single selection mode Select() deselects any other selected items, in + // multi-selection case it adds to the selection. + void Select(wxTreeListItem item); + + // Can be used in multiple selection mode only, single selected item in the + // single selection mode can't be unselected. + void Unselect(wxTreeListItem item); + + // Return true if the item is selected, can be used in both single and + // multiple selection modes. + bool IsSelected(wxTreeListItem item) const; + + // Select or unselect all items, only valid in multiple selection mode. + void SelectAll(); + void UnselectAll(); + + + // Checkbox handling + // ----------------- + + // Methods in this section can only be used with the controls created with + // wxTL_CHECKBOX style. + + // Simple set, unset or query the checked state. + void CheckItem(wxTreeListItem item, wxCheckBoxState state = wxCHK_CHECKED); + void UncheckItem(wxTreeListItem item) { CheckItem(item, wxCHK_UNCHECKED); } + + // The same but do it recursively for this item itself and its children. + void CheckItemRecursively(wxTreeListItem item, + wxCheckBoxState state = wxCHK_CHECKED); + + // Update the parent of this item recursively: if this item and all its + // siblings are checked, the parent will become checked as well. If this + // item and all its siblings are unchecked, the parent will be unchecked. + // And if the siblings of this item are not all in the same state, the + // parent will be switched to indeterminate state. And then the same logic + // will be applied to the parents parent and so on recursively. + // + // This is typically called when the state of the given item has changed + // from EVT_TREELIST_ITEM_CHECKED() handler in the controls which have + // wxTL_3STATE flag. Notice that without this flag this function can't work + // as it would be unable to set the state of a parent with both checked and + // unchecked items so it's only allowed to call it when this flag is set. + void UpdateItemParentStateRecursively(wxTreeListItem item); + + // Return the current state. + wxCheckBoxState GetCheckedState(wxTreeListItem item) const; + + // Return true if all item children (if any) are in the given state. + bool AreAllChildrenInState(wxTreeListItem item, + wxCheckBoxState state) const; + + + + // Sorting. + // -------- + + // Sort by the given column, either in ascending (default) or descending + // sort order. + // + // By default, simple alphabetical sorting is done by this column contents + // but SetItemComparator() may be called to perform comparison in some + // other way. + void SetSortColumn(unsigned col, bool ascendingOrder = true); + + // If the control contents is sorted, return true and fill the output + // parameters with the column which is currently used for sorting and + // whether we sort using ascending or descending order. Otherwise, i.e. if + // the control contents is unsorted, simply return false. + bool GetSortColumn(unsigned* col, bool* ascendingOrder = NULL); + + // Set the object to use for comparing the items. It will be called when + // the control is being sorted because the user clicked on a sortable + // column. + // + // The provided pointer is stored by the control so the object it points to + // must have a life-time equal or greater to that of the control itself. In + // addition, the pointer can be NULL to stop using custom comparator and + // revert to the default alphabetical comparison. + void SetItemComparator(wxTreeListItemComparator* comparator); + + + // View window functions. + // ---------------------- + + // This control itself is entirely covered by the "view window" which is + // currently a wxDataViewCtrl but if you want to avoid relying on this to + // allow your code to work with later versions which might not be + // wxDataViewCtrl-based, use the first function only and only use the + // second one if you really need to call wxDataViewCtrl methods on it. + wxWindow* GetView() const; + wxDataViewCtrl* GetDataView() const { return m_view; } + +private: + // Common part of all ctors. + void Init(); + + // Pure virtual method inherited from wxCompositeWindow. + virtual wxWindowList GetCompositeWindowParts() const; + + // Implementation of AppendColumn(). + int DoInsertColumn(const wxString& title, + int pos, // May be -1 meaning "append". + int width, + wxAlignment align, + int flags); + + // Common part of {Append,Insert,Prepend}Item(). + wxTreeListItem DoInsertItem(wxTreeListItem parent, + wxTreeListItem previous, + const wxString& text, + int imageClosed, + int imageOpened, + wxClientData* data); + + // Send wxTreeListEvent corresponding to the given wxDataViewEvent for an + // item (as opposed for column-oriented events). + // + // Also updates the original event "skipped" and "vetoed" flags. + void SendItemEvent(wxEventType evt, wxDataViewEvent& event); + + // Send wxTreeListEvent corresponding to the given column wxDataViewEvent. + void SendColumnEvent(wxEventType evt, wxDataViewEvent& event); + + + // Called by wxTreeListModel when an item is toggled by the user. + void OnItemToggled(wxTreeListItem item, wxCheckBoxState stateOld); + + // Event handlers. + void OnSelectionChanged(wxDataViewEvent& event); + void OnItemExpanding(wxDataViewEvent& event); + void OnItemExpanded(wxDataViewEvent& event); + void OnItemActivated(wxDataViewEvent& event); + void OnItemContextMenu(wxDataViewEvent& event); + void OnColumnSorted(wxDataViewEvent& event); + void OnSize(wxSizeEvent& event); + + wxDECLARE_EVENT_TABLE(); + + + wxDataViewCtrl* m_view; + wxTreeListModel* m_model; + + wxTreeListItemComparator* m_comparator; + + + // It calls our inherited protected wxWithImages::GetImage() method. + friend class wxTreeListModel; + + wxDECLARE_NO_COPY_CLASS(wxTreeListCtrl); +}; + +// ---------------------------------------------------------------------------- +// wxTreeListEvent: event generated by wxTreeListCtrl. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxTreeListEvent : public wxNotifyEvent +{ +public: + // Default ctor is provided for wxRTTI needs only but should never be used. + wxTreeListEvent() { Init(); } + + // The item affected by the event. Valid for all events except + // column-specific ones such as COLUMN_SORTED. + wxTreeListItem GetItem() const { return m_item; } + + // The previous state of the item checkbox for ITEM_CHECKED events only. + wxCheckBoxState GetOldCheckedState() const { return m_oldCheckedState; } + + // The index of the column affected by the event. Currently only used by + // COLUMN_SORTED event. + unsigned GetColumn() const { return m_column; } + + virtual wxEvent* Clone() const { return new wxTreeListEvent(*this); } + +private: + // Common part of all ctors. + void Init() + { + m_column = static_cast<unsigned>(-1); + + m_oldCheckedState = wxCHK_UNDETERMINED; + } + + // Ctor is private, only wxTreeListCtrl can create events of this type. + wxTreeListEvent(wxEventType evtType, + wxTreeListCtrl* treelist, + wxTreeListItem item) + : wxNotifyEvent(evtType, treelist->GetId()), + m_item(item) + { + SetEventObject(treelist); + + Init(); + } + + // Set the checkbox state before this event for ITEM_CHECKED events. + void SetOldCheckedState(wxCheckBoxState state) + { + m_oldCheckedState = state; + } + + // Set the column affected by this event for COLUMN_SORTED events. + void SetColumn(unsigned column) + { + m_column = column; + } + + + const wxTreeListItem m_item; + + wxCheckBoxState m_oldCheckedState; + + unsigned m_column; + + friend class wxTreeListCtrl; + + wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxTreeListEvent); +}; + +// Event types and event table macros. + +typedef void (wxEvtHandler::*wxTreeListEventFunction)(wxTreeListEvent&); + +#define wxTreeListEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxTreeListEventFunction, func) + +#define wxEVT_TREELIST_GENERIC(name, id, fn) \ + wx__DECLARE_EVT1(wxEVT_TREELIST_##name, id, wxTreeListEventHandler(fn)) + +#define wxDECLARE_TREELIST_EVENT(name) \ + wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, \ + wxEVT_TREELIST_##name, \ + wxTreeListEvent) + +wxDECLARE_TREELIST_EVENT(SELECTION_CHANGED); +#define EVT_TREELIST_SELECTION_CHANGED(id, fn) \ + wxEVT_TREELIST_GENERIC(SELECTION_CHANGED, id, fn) + +wxDECLARE_TREELIST_EVENT(ITEM_EXPANDING); +#define EVT_TREELIST_ITEM_EXPANDING(id, fn) \ + wxEVT_TREELIST_GENERIC(ITEM_EXPANDING, id, fn) + +wxDECLARE_TREELIST_EVENT(ITEM_EXPANDED); +#define EVT_TREELIST_ITEM_EXPANDED(id, fn) \ + wxEVT_TREELIST_GENERIC(ITEM_EXPANDED, id, fn) + +wxDECLARE_TREELIST_EVENT(ITEM_CHECKED); +#define EVT_TREELIST_ITEM_CHECKED(id, fn) \ + wxEVT_TREELIST_GENERIC(ITEM_CHECKED, id, fn) + +wxDECLARE_TREELIST_EVENT(ITEM_ACTIVATED); +#define EVT_TREELIST_ITEM_ACTIVATED(id, fn) \ + wxEVT_TREELIST_GENERIC(ITEM_ACTIVATED, id, fn) + +wxDECLARE_TREELIST_EVENT(ITEM_CONTEXT_MENU); +#define EVT_TREELIST_ITEM_CONTEXT_MENU(id, fn) \ + wxEVT_TREELIST_GENERIC(ITEM_CONTEXT_MENU, id, fn) + +wxDECLARE_TREELIST_EVENT(COLUMN_SORTED); +#define EVT_TREELIST_COLUMN_SORTED(id, fn) \ + wxEVT_TREELIST_GENERIC(COLUMN_SORTED, id, fn) + +#undef wxDECLARE_TREELIST_EVENT + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREELIST_SELECTION_CHANGED wxEVT_TREELIST_SELECTION_CHANGED +#define wxEVT_COMMAND_TREELIST_ITEM_EXPANDING wxEVT_TREELIST_ITEM_EXPANDING +#define wxEVT_COMMAND_TREELIST_ITEM_EXPANDED wxEVT_TREELIST_ITEM_EXPANDED +#define wxEVT_COMMAND_TREELIST_ITEM_CHECKED wxEVT_TREELIST_ITEM_CHECKED +#define wxEVT_COMMAND_TREELIST_ITEM_ACTIVATED wxEVT_TREELIST_ITEM_ACTIVATED +#define wxEVT_COMMAND_TREELIST_ITEM_CONTEXT_MENU wxEVT_TREELIST_ITEM_CONTEXT_MENU +#define wxEVT_COMMAND_TREELIST_COLUMN_SORTED wxEVT_TREELIST_COLUMN_SORTED + +#endif // wxUSE_TREELISTCTRL + +#endif // _WX_TREELIST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/txtstrm.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/txtstrm.h new file mode 100644 index 0000000000..90e6bbb22a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/txtstrm.h @@ -0,0 +1,164 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/txtstrm.h +// Purpose: Text stream classes +// Author: Guilhem Lavaux +// Modified by: +// Created: 28/06/1998 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TXTSTREAM_H_ +#define _WX_TXTSTREAM_H_ + +#include "wx/stream.h" +#include "wx/convauto.h" + +#if wxUSE_STREAMS + +class WXDLLIMPEXP_FWD_BASE wxTextInputStream; +class WXDLLIMPEXP_FWD_BASE wxTextOutputStream; + +typedef wxTextInputStream& (*__wxTextInputManip)(wxTextInputStream&); +typedef wxTextOutputStream& (*__wxTextOutputManip)(wxTextOutputStream&); + +WXDLLIMPEXP_BASE wxTextOutputStream &endl( wxTextOutputStream &stream ); + + +#define wxEOT wxT('\4') // the End-Of-Text control code (used only inside wxTextInputStream) + +// If you're scanning through a file using wxTextInputStream, you should check for EOF _before_ +// reading the next item (word / number), because otherwise the last item may get lost. +// You should however be prepared to receive an empty item (empty string / zero number) at the +// end of file, especially on Windows systems. This is unavoidable because most (but not all) files end +// with whitespace (i.e. usually a newline). +class WXDLLIMPEXP_BASE wxTextInputStream +{ +public: +#if wxUSE_UNICODE + wxTextInputStream(wxInputStream& s, + const wxString &sep=wxT(" \t"), + const wxMBConv& conv = wxConvAuto()); +#else + wxTextInputStream(wxInputStream& s, const wxString &sep=wxT(" \t")); +#endif + ~wxTextInputStream(); + + const wxInputStream& GetInputStream() const { return m_input; } + + wxUint32 Read32(int base = 10); // base may be between 2 and 36, inclusive, or the special 0 (= C format) + wxUint16 Read16(int base = 10); + wxUint8 Read8(int base = 10); + wxInt32 Read32S(int base = 10); + wxInt16 Read16S(int base = 10); + wxInt8 Read8S(int base = 10); + double ReadDouble(); + wxString ReadLine(); + wxString ReadWord(); + wxChar GetChar() { wxChar c = NextChar(); return (wxChar)(c != wxEOT ? c : 0); } + + wxString GetStringSeparators() const { return m_separators; } + void SetStringSeparators(const wxString &c) { m_separators = c; } + + // Operators + wxTextInputStream& operator>>(wxString& word); + wxTextInputStream& operator>>(char& c); +#if wxUSE_UNICODE && wxWCHAR_T_IS_REAL_TYPE + wxTextInputStream& operator>>(wchar_t& wc); +#endif // wxUSE_UNICODE + wxTextInputStream& operator>>(wxInt16& i); + wxTextInputStream& operator>>(wxInt32& i); + wxTextInputStream& operator>>(wxUint16& i); + wxTextInputStream& operator>>(wxUint32& i); + wxTextInputStream& operator>>(double& i); + wxTextInputStream& operator>>(float& f); + + wxTextInputStream& operator>>( __wxTextInputManip func) { return func(*this); } + +#if WXWIN_COMPATIBILITY_2_6 + wxDEPRECATED( wxString ReadString() ); // use ReadLine or ReadWord instead +#endif // WXWIN_COMPATIBILITY_2_6 + +protected: + wxInputStream &m_input; + wxString m_separators; + char m_lastBytes[10]; // stores the bytes that were read for the last character + +#if wxUSE_UNICODE + wxMBConv *m_conv; +#endif + + bool EatEOL(const wxChar &c); + void UngetLast(); // should be used instead of wxInputStream::Ungetch() because of Unicode issues + // returns EOT (\4) if there is a stream error, or end of file + wxChar NextChar(); // this should be used instead of GetC() because of Unicode issues + wxChar NextNonSeparators(); + + wxDECLARE_NO_COPY_CLASS(wxTextInputStream); +}; + +typedef enum +{ + wxEOL_NATIVE, + wxEOL_UNIX, + wxEOL_MAC, + wxEOL_DOS +} wxEOL; + +class WXDLLIMPEXP_BASE wxTextOutputStream +{ +public: +#if wxUSE_UNICODE + wxTextOutputStream(wxOutputStream& s, + wxEOL mode = wxEOL_NATIVE, + const wxMBConv& conv = wxConvAuto()); +#else + wxTextOutputStream(wxOutputStream& s, wxEOL mode = wxEOL_NATIVE); +#endif + virtual ~wxTextOutputStream(); + + const wxOutputStream& GetOutputStream() const { return m_output; } + + void SetMode( wxEOL mode = wxEOL_NATIVE ); + wxEOL GetMode() { return m_mode; } + + void Write32(wxUint32 i); + void Write16(wxUint16 i); + void Write8(wxUint8 i); + virtual void WriteDouble(double d); + virtual void WriteString(const wxString& string); + + wxTextOutputStream& PutChar(wxChar c); + + void Flush(); + + wxTextOutputStream& operator<<(const wxString& string); + wxTextOutputStream& operator<<(char c); +#if wxUSE_UNICODE && wxWCHAR_T_IS_REAL_TYPE + wxTextOutputStream& operator<<(wchar_t wc); +#endif // wxUSE_UNICODE + wxTextOutputStream& operator<<(wxInt16 c); + wxTextOutputStream& operator<<(wxInt32 c); + wxTextOutputStream& operator<<(wxUint16 c); + wxTextOutputStream& operator<<(wxUint32 c); + wxTextOutputStream& operator<<(double f); + wxTextOutputStream& operator<<(float f); + + wxTextOutputStream& operator<<( __wxTextOutputManip func) { return func(*this); } + +protected: + wxOutputStream &m_output; + wxEOL m_mode; + +#if wxUSE_UNICODE + wxMBConv *m_conv; +#endif + + wxDECLARE_NO_COPY_CLASS(wxTextOutputStream); +}; + +#endif + // wxUSE_STREAMS + +#endif + // _WX_DATSTREAM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/typeinfo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/typeinfo.h new file mode 100644 index 0000000000..a783af5d56 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/typeinfo.h @@ -0,0 +1,147 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/typeinfo.h +// Purpose: wxTypeId implementation +// Author: Jaakko Salli +// Created: 2009-11-19 +// Copyright: (c) wxWidgets Team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TYPEINFO_H_ +#define _WX_TYPEINFO_H_ + +// +// This file defines wxTypeId macro that should be used internally in +// wxWidgets instead of typeid(), for compatibility with builds that do +// not implement C++ RTTI. Also, type defining macros in this file are +// intended for internal use only at this time and may change in future +// versions. +// +// The reason why we need this simple RTTI system in addition to the older +// wxObject-based one is that the latter does not work in template +// classes. +// + +#include "wx/defs.h" + +#ifndef wxNO_RTTI + +// +// Let's trust that Visual C++ versions 9.0 and later implement C++ +// RTTI well enough, so we can use it and work around harmless memory +// leaks reported by the static run-time libraries. +// +#if wxCHECK_VISUALC_VERSION(9) + #define wxTRUST_CPP_RTTI 1 +#else + #define wxTRUST_CPP_RTTI 0 +#endif + +#include <typeinfo> +#include <string.h> + +#define _WX_DECLARE_TYPEINFO_CUSTOM(CLS, IDENTFUNC) +#define WX_DECLARE_TYPEINFO_INLINE(CLS) +#define WX_DECLARE_TYPEINFO(CLS) +#define WX_DEFINE_TYPEINFO(CLS) +#define WX_DECLARE_ABSTRACT_TYPEINFO(CLS) + +#if wxTRUST_CPP_RTTI + +#define wxTypeId typeid + +#else /* !wxTRUST_CPP_RTTI */ + +// +// For improved type-safety, let's make the check using class name +// comparison. Most modern compilers already do this, but we cannot +// rely on all supported compilers to work this well. However, in +// cases where we'd know that typeid() would be flawless (as such), +// wxTypeId could of course simply be defined as typeid. +// + +class wxTypeIdentifier +{ +public: + wxTypeIdentifier(const char* className) + { + m_className = className; + } + + bool operator==(const wxTypeIdentifier& other) + { + return strcmp(m_className, other.m_className) == 0; + } + + bool operator!=(const wxTypeIdentifier& other) + { + return strcmp(m_className, other.m_className) != 0; + } +private: + const char* m_className; +}; + +#define wxTypeId(OBJ) wxTypeIdentifier(typeid(OBJ).name()) + +#endif /* wxTRUST_CPP_RTTI/!wxTRUST_CPP_RTTI */ + +#else // if !wxNO_RTTI + +#define wxTRUST_CPP_RTTI 0 + +// +// When C++ RTTI is not available, we will have to make the type comparison +// using pointer to a dummy static member function. This will fail if +// declared type is used across DLL boundaries, although using +// WX_DECLARE_TYPEINFO() and WX_DEFINE_TYPEINFO() pair instead of +// WX_DECLARE_TYPEINFO_INLINE() should fix this. However, that approach is +// usually not possible when type info needs to be declared for a template +// class. +// + +typedef void (*wxTypeIdentifier)(); + +// Use this macro to declare type info with specified static function +// IDENTFUNC used as type identifier. Usually you should only use +// WX_DECLARE_TYPEINFO() or WX_DECLARE_TYPEINFO_INLINE() however. +#define _WX_DECLARE_TYPEINFO_CUSTOM(CLS, IDENTFUNC) \ +public: \ + virtual wxTypeIdentifier GetWxTypeId() const \ + { \ + return reinterpret_cast<wxTypeIdentifier> \ + (&IDENTFUNC); \ + } + +// Use this macro to declare type info with externally specified +// type identifier, defined with WX_DEFINE_TYPEINFO(). +#define WX_DECLARE_TYPEINFO(CLS) \ +private: \ + static CLS sm_wxClassInfo(); \ +_WX_DECLARE_TYPEINFO_CUSTOM(CLS, sm_wxClassInfo) + +// Use this macro to implement type identifier function required by +// WX_DECLARE_TYPEINFO(). +// NOTE: CLS is required to have default ctor. If it doesn't +// already, you should provide a private dummy one. +#define WX_DEFINE_TYPEINFO(CLS) \ +CLS CLS::sm_wxClassInfo() { return CLS(); } + +// Use this macro to declare type info fully inline in class. +// NOTE: CLS is required to have default ctor. If it doesn't +// already, you should provide a private dummy one. +#define WX_DECLARE_TYPEINFO_INLINE(CLS) \ +private: \ + static CLS sm_wxClassInfo() { return CLS(); } \ +_WX_DECLARE_TYPEINFO_CUSTOM(CLS, sm_wxClassInfo) + +#define wxTypeId(OBJ) (OBJ).GetWxTypeId() + +// Because abstract classes cannot be instantiated, we use +// this macro to define pure virtual type interface for them. +#define WX_DECLARE_ABSTRACT_TYPEINFO(CLS) \ +public: \ + virtual wxTypeIdentifier GetWxTypeId() const = 0; + +#endif // wxNO_RTTI/!wxNO_RTTI + +#endif // _WX_TYPEINFO_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/types.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/types.h new file mode 100644 index 0000000000..2e58582168 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/types.h @@ -0,0 +1,92 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/types.h +// Purpose: Type identifiers, used by resource system +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TYPESH__ +#define _WX_TYPESH__ + +// Types of objects +#define wxTYPE_ANY 0 +#define wxTYPE_OBJECT wxTYPE_ANY +#define wxTYPE_WINDOW 1 +#define wxTYPE_DIALOG_BOX 2 +#define wxTYPE_ITEM 3 +#define wxTYPE_PANEL 4 +#define wxTYPE_CANVAS 5 +#define wxTYPE_TEXT_WINDOW 6 +#define wxTYPE_FRAME 7 + +#define wxTYPE_BUTTON 8 +#define wxTYPE_TEXT 9 +#define wxTYPE_MESSAGE 10 +#define wxTYPE_CHOICE 11 +#define wxTYPE_LIST_BOX 12 +#define wxTYPE_SLIDER 13 +#define wxTYPE_CHECK_BOX 14 +#define wxTYPE_MENU 15 +#define wxTYPE_MENU_BAR 16 +#define wxTYPE_MULTI_TEXT 17 +#define wxTYPE_RADIO_BOX 18 +#define wxTYPE_GROUP_BOX 19 +#define wxTYPE_GAUGE 20 +#define wxTYPE_SCROLL_BAR 21 +#define wxTYPE_VIRT_LIST_BOX 22 +#define wxTYPE_COMBO_BOX 23 +#define wxTYPE_RADIO_BUTTON 24 + +#define wxTYPE_EVENT 25 +#define wxTYPE_DC 26 +#define wxTYPE_DC_CANVAS 27 +#define wxTYPE_DC_POSTSCRIPT 28 +#define wxTYPE_DC_PRINTER 29 +#define wxTYPE_DC_METAFILE 30 +#define wxTYPE_DC_MEMORY 31 +#define wxTYPE_MOUSE_EVENT 32 +#define wxTYPE_KEY_EVENT 33 +#define wxTYPE_COMMAND_EVENT 34 +#define wxTYPE_DC_PANEL 35 + +#define wxTYPE_PEN 40 +#define wxTYPE_BRUSH 41 +#define wxTYPE_FONT 42 +#define wxTYPE_ICON 42 +#define wxTYPE_BITMAP 43 +#define wxTYPE_METAFILE 44 +#define wxTYPE_TIMER 45 +#define wxTYPE_COLOUR 46 +#define wxTYPE_COLOURMAP 47 +#define wxTYPE_CURSOR 48 + +#define wxTYPE_DDE_CLIENT 60 +#define wxTYPE_DDE_SERVER 61 +#define wxTYPE_DDE_CONNECTION 62 + +#define wxTYPE_HELP_INSTANCE 63 + +#define wxTYPE_LIST 70 +#define wxTYPE_STRING_LIST 71 +#define wxTYPE_HASH_TABLE 72 +#define wxTYPE_NODE 73 +#define wxTYPE_APP 74 +#define wxTYPE_DATE 75 + +#define wxTYPE_ENHANCED_DIALOG 80 +#define wxTYPE_TOOLBAR 81 +#define wxTYPE_BUTTONBAR 82 + +#define wxTYPE_DATABASE 90 +#define wxTYPE_QUERY_FIELD 91 +#define wxTYPE_QUERY_COL 92 +#define wxTYPE_RECORDSET 93 + +#define wxTYPE_USER 500 + +#endif + // _WX_TYPESH__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/uiaction.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/uiaction.h new file mode 100644 index 0000000000..fb96523544 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/uiaction.h @@ -0,0 +1,90 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/uiaction.h +// Purpose: wxUIActionSimulator interface +// Author: Kevin Ollivier, Steven Lamerton, Vadim Zeitlin +// Modified by: +// Created: 2010-03-06 +// Copyright: (c) Kevin Ollivier +// (c) 2010 Steven Lamerton +// (c) 2010 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UIACTIONSIMULATOR_H_ +#define _WX_UIACTIONSIMULATOR_H_ + +#include "wx/defs.h" + +#if wxUSE_UIACTIONSIMULATOR + +#include "wx/mousestate.h" // for wxMOUSE_BTN_XXX constants + +class WXDLLIMPEXP_CORE wxUIActionSimulator +{ +public: + wxUIActionSimulator() { } + + + // Default dtor, copy ctor and assignment operator are ok (even though the + // last two don't make much sense for this class). + + + // Mouse simulation + // ---------------- + + // Low level methods + bool MouseMove(long x, long y); + bool MouseMove(const wxPoint& point) { return MouseMove(point.x, point.y); } + + bool MouseDown(int button = wxMOUSE_BTN_LEFT); + bool MouseUp(int button = wxMOUSE_BTN_LEFT); + + // Higher level interface, use it if possible instead + bool MouseClick(int button = wxMOUSE_BTN_LEFT); + bool MouseDblClick(int button = wxMOUSE_BTN_LEFT); + bool MouseDragDrop(long x1, long y1, long x2, long y2, + int button = wxMOUSE_BTN_LEFT); + bool MouseDragDrop(const wxPoint& p1, const wxPoint& p2, + int button = wxMOUSE_BTN_LEFT) + { return MouseDragDrop(p1.x, p1.y, p2.x, p2.y, button); } + + // Keyboard simulation + // ------------------- + + // Low level methods for generating key presses and releases + bool KeyDown(int keycode, int modifiers = wxMOD_NONE) + { return Key(keycode, modifiers, true); } + + bool KeyUp(int keycode, int modifiers = wxMOD_NONE) + { return Key(keycode, modifiers, false); } + + // Higher level methods for generating both the key press and release for a + // single key or for all characters in the ASCII string "text" which can currently + // contain letters, digits and characters for the definition of numbers [+-., ]. + bool Char(int keycode, int modifiers = wxMOD_NONE); + + bool Text(const char *text); + +private: + // This is the common part of Key{Down,Up}() methods: while we keep them + // separate at public API level for consistency with Mouse{Down,Up}(), at + // implementation level it makes more sense to have them in a single + // function. + // + // It calls DoModifiers() to simulate pressing the modifier keys if + // necessary and then DoKey() for the key itself. + bool Key(int keycode, int modifiers, bool isDown); + + // Call DoKey() for all modifier keys whose bits are set in the parameter. + void SimulateModifiers(int modifier, bool isDown); + + + // The low-level port-specific function which really generates the key + // presses. It should generate exactly one key event with the given + // parameters. + bool DoKey(int keycode, int modifiers, bool isDown); +}; + +#endif // wxUSE_UIACTIONSIMULATOR + +#endif // _WX_UIACTIONSIMULATOR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unichar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unichar.h new file mode 100644 index 0000000000..e9726943ab --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unichar.h @@ -0,0 +1,308 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unichar.h +// Purpose: wxUniChar and wxUniCharRef classes +// Author: Vaclav Slavik +// Created: 2007-03-19 +// Copyright: (c) 2007 REA Elektronik GmbH +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNICHAR_H_ +#define _WX_UNICHAR_H_ + +#include "wx/defs.h" +#include "wx/chartype.h" +#include "wx/stringimpl.h" + +class WXDLLIMPEXP_FWD_BASE wxUniCharRef; +class WXDLLIMPEXP_FWD_BASE wxString; + +// This class represents single Unicode character. It can be converted to +// and from char or wchar_t and implements commonly used character operations. +class WXDLLIMPEXP_BASE wxUniChar +{ +public: + // NB: this is not wchar_t on purpose, it needs to represent the entire + // Unicode code points range and wchar_t may be too small for that + // (e.g. on Win32 where wchar_t* is encoded in UTF-16) + typedef wxUint32 value_type; + + wxUniChar() : m_value(0) {} + + // Create the character from 8bit character value encoded in the current + // locale's charset. + wxUniChar(char c) { m_value = From8bit(c); } + wxUniChar(unsigned char c) { m_value = From8bit((char)c); } + +#define wxUNICHAR_DEFINE_CTOR(type) \ + wxUniChar(type c) { m_value = (value_type)c; } + wxDO_FOR_INT_TYPES(wxUNICHAR_DEFINE_CTOR) +#undef wxUNICHAR_DEFINE_CTOR + + wxUniChar(const wxUniCharRef& c); + + // Returns Unicode code point value of the character + value_type GetValue() const { return m_value; } + +#if wxUSE_UNICODE_UTF8 + // buffer for single UTF-8 character + struct Utf8CharBuffer + { + char data[5]; + operator const char*() const { return data; } + }; + + // returns the character encoded as UTF-8 + // (NB: implemented in stringops.cpp) + Utf8CharBuffer AsUTF8() const; +#endif // wxUSE_UNICODE_UTF8 + + // Returns true if the character is an ASCII character: + bool IsAscii() const { return m_value < 0x80; } + + // Returns true if the character is representable as a single byte in the + // current locale encoding and return this byte in output argument c (which + // must be non-NULL) + bool GetAsChar(char *c) const + { +#if wxUSE_UNICODE + if ( !IsAscii() ) + { +#if !wxUSE_UTF8_LOCALE_ONLY + if ( GetAsHi8bit(m_value, c) ) + return true; +#endif // !wxUSE_UTF8_LOCALE_ONLY + + return false; + } +#endif // wxUSE_UNICODE + + *c = wx_truncate_cast(char, m_value); + return true; + } + + // Conversions to char and wchar_t types: all of those are needed to be + // able to pass wxUniChars to verious standard narrow and wide character + // functions + operator char() const { return To8bit(m_value); } + operator unsigned char() const { return (unsigned char)To8bit(m_value); } + +#define wxUNICHAR_DEFINE_OPERATOR_PAREN(type) \ + operator type() const { return (type)m_value; } + wxDO_FOR_INT_TYPES(wxUNICHAR_DEFINE_OPERATOR_PAREN) +#undef wxUNICHAR_DEFINE_OPERATOR_PAREN + + // We need this operator for the "*p" part of expressions like "for ( + // const_iterator p = begin() + nStart; *p; ++p )". In this case, + // compilation would fail without it because the conversion to bool would + // be ambiguous (there are all these int types conversions...). (And adding + // operator unspecified_bool_type() would only makes the ambiguity worse.) + operator bool() const { return m_value != 0; } + bool operator!() const { return !((bool)*this); } + + // And this one is needed by some (not all, but not using ifdefs makes the + // code easier) compilers to parse "str[0] && *p" successfully + bool operator&&(bool v) const { return (bool)*this && v; } + + // Assignment operators: + wxUniChar& operator=(const wxUniChar& c) { if (&c != this) m_value = c.m_value; return *this; } + wxUniChar& operator=(const wxUniCharRef& c); + wxUniChar& operator=(char c) { m_value = From8bit(c); return *this; } + wxUniChar& operator=(unsigned char c) { m_value = From8bit((char)c); return *this; } + +#define wxUNICHAR_DEFINE_OPERATOR_EQUAL(type) \ + wxUniChar& operator=(type c) { m_value = (value_type)c; return *this; } + wxDO_FOR_INT_TYPES(wxUNICHAR_DEFINE_OPERATOR_EQUAL) +#undef wxUNICHAR_DEFINE_OPERATOR_EQUAL + + // Comparison operators: +#define wxDEFINE_UNICHAR_CMP_WITH_INT(T, op) \ + bool operator op(T c) const { return m_value op (value_type)c; } + + // define the given comparison operator for all the types +#define wxDEFINE_UNICHAR_OPERATOR(op) \ + bool operator op(const wxUniChar& c) const { return m_value op c.m_value; }\ + bool operator op(char c) const { return m_value op From8bit(c); } \ + bool operator op(unsigned char c) const { return m_value op From8bit((char)c); } \ + wxDO_FOR_INT_TYPES_1(wxDEFINE_UNICHAR_CMP_WITH_INT, op) + + wxFOR_ALL_COMPARISONS(wxDEFINE_UNICHAR_OPERATOR) + +#undef wxDEFINE_UNICHAR_OPERATOR +#undef wxDEFINE_UNCHAR_CMP_WITH_INT + + // this is needed for expressions like 'Z'-c + int operator-(const wxUniChar& c) const { return m_value - c.m_value; } + int operator-(char c) const { return m_value - From8bit(c); } + int operator-(unsigned char c) const { return m_value - From8bit((char)c); } + int operator-(wchar_t c) const { return m_value - (value_type)c; } + + +private: + // notice that we implement these functions inline for 7-bit ASCII + // characters purely for performance reasons + static value_type From8bit(char c) + { +#if wxUSE_UNICODE + if ( (unsigned char)c < 0x80 ) + return c; + + return FromHi8bit(c); +#else + return c; +#endif + } + + static char To8bit(value_type c) + { +#if wxUSE_UNICODE + if ( c < 0x80 ) + return wx_truncate_cast(char, c); + + return ToHi8bit(c); +#else + return wx_truncate_cast(char, c); +#endif + } + + // helpers of the functions above called to deal with non-ASCII chars + static value_type FromHi8bit(char c); + static char ToHi8bit(value_type v); + static bool GetAsHi8bit(value_type v, char *c); + +private: + value_type m_value; +}; + + +// Writeable reference to a character in wxString. +// +// This class can be used in the same way wxChar is used, except that changing +// its value updates the underlying string object. +class WXDLLIMPEXP_BASE wxUniCharRef +{ +private: + typedef wxStringImpl::iterator iterator; + + // create the reference +#if wxUSE_UNICODE_UTF8 + wxUniCharRef(wxString& str, iterator pos) : m_str(str), m_pos(pos) {} +#else + wxUniCharRef(iterator pos) : m_pos(pos) {} +#endif + +public: + // NB: we have to make this public, because we don't have wxString + // declaration available here and so can't declare wxString::iterator + // as friend; so at least don't use a ctor but a static function + // that must be used explicitly (this is more than using 'explicit' + // keyword on ctor!): +#if wxUSE_UNICODE_UTF8 + static wxUniCharRef CreateForString(wxString& str, iterator pos) + { return wxUniCharRef(str, pos); } +#else + static wxUniCharRef CreateForString(iterator pos) + { return wxUniCharRef(pos); } +#endif + + wxUniChar::value_type GetValue() const { return UniChar().GetValue(); } + +#if wxUSE_UNICODE_UTF8 + wxUniChar::Utf8CharBuffer AsUTF8() const { return UniChar().AsUTF8(); } +#endif // wxUSE_UNICODE_UTF8 + + bool IsAscii() const { return UniChar().IsAscii(); } + bool GetAsChar(char *c) const { return UniChar().GetAsChar(c); } + + // Assignment operators: +#if wxUSE_UNICODE_UTF8 + wxUniCharRef& operator=(const wxUniChar& c); +#else + wxUniCharRef& operator=(const wxUniChar& c) { *m_pos = c; return *this; } +#endif + + wxUniCharRef& operator=(const wxUniCharRef& c) + { if (&c != this) *this = c.UniChar(); return *this; } + +#define wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL(type) \ + wxUniCharRef& operator=(type c) { return *this = wxUniChar(c); } + wxDO_FOR_CHAR_INT_TYPES(wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL) +#undef wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL + + // Conversions to the same types as wxUniChar is convertible too: +#define wxUNICHAR_REF_DEFINE_OPERATOR_PAREN(type) \ + operator type() const { return UniChar(); } + wxDO_FOR_CHAR_INT_TYPES(wxUNICHAR_REF_DEFINE_OPERATOR_PAREN) +#undef wxUNICHAR_REF_DEFINE_OPERATOR_PAREN + + // see wxUniChar::operator bool etc. for explanation + operator bool() const { return (bool)UniChar(); } + bool operator!() const { return !UniChar(); } + bool operator&&(bool v) const { return UniChar() && v; } + +#define wxDEFINE_UNICHARREF_CMP_WITH_INT(T, op) \ + bool operator op(T c) const { return UniChar() op c; } + + // Comparison operators: +#define wxDEFINE_UNICHARREF_OPERATOR(op) \ + bool operator op(const wxUniCharRef& c) const { return UniChar() op c.UniChar(); }\ + bool operator op(const wxUniChar& c) const { return UniChar() op c; } \ + wxDO_FOR_CHAR_INT_TYPES_1(wxDEFINE_UNICHARREF_CMP_WITH_INT, op) + + wxFOR_ALL_COMPARISONS(wxDEFINE_UNICHARREF_OPERATOR) + +#undef wxDEFINE_UNICHARREF_OPERATOR +#undef wxDEFINE_UNICHARREF_CMP_WITH_INT + + // for expressions like c-'A': + int operator-(const wxUniCharRef& c) const { return UniChar() - c.UniChar(); } + int operator-(const wxUniChar& c) const { return UniChar() - c; } + int operator-(char c) const { return UniChar() - c; } + int operator-(unsigned char c) const { return UniChar() - c; } + int operator-(wchar_t c) const { return UniChar() - c; } + +private: +#if wxUSE_UNICODE_UTF8 + wxUniChar UniChar() const; +#else + wxUniChar UniChar() const { return *m_pos; } +#endif + + friend class WXDLLIMPEXP_FWD_BASE wxUniChar; + +private: + // reference to the string and pointer to the character in string +#if wxUSE_UNICODE_UTF8 + wxString& m_str; +#endif + iterator m_pos; +}; + +inline wxUniChar::wxUniChar(const wxUniCharRef& c) +{ + m_value = c.UniChar().m_value; +} + +inline wxUniChar& wxUniChar::operator=(const wxUniCharRef& c) +{ + m_value = c.UniChar().m_value; + return *this; +} + +// Comparison operators for the case when wxUniChar(Ref) is the second operand +// implemented in terms of member comparison functions + +wxDEFINE_COMPARISONS_BY_REV(char, const wxUniChar&) +wxDEFINE_COMPARISONS_BY_REV(char, const wxUniCharRef&) + +wxDEFINE_COMPARISONS_BY_REV(wchar_t, const wxUniChar&) +wxDEFINE_COMPARISONS_BY_REV(wchar_t, const wxUniCharRef&) + +wxDEFINE_COMPARISONS_BY_REV(const wxUniChar&, const wxUniCharRef&) + +// for expressions like c-'A': +inline int operator-(char c1, const wxUniCharRef& c2) { return -(c2 - c1); } +inline int operator-(const wxUniChar& c1, const wxUniCharRef& c2) { return -(c2 - c1); } +inline int operator-(wchar_t c1, const wxUniCharRef& c2) { return -(c2 - c1); } + +#endif /* _WX_UNICHAR_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/anybutton.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/anybutton.h new file mode 100644 index 0000000000..d519e6a468 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/anybutton.h @@ -0,0 +1,32 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/anybutton.h +// Purpose: wxAnyButton class +// Author: Vadim Zeitlin +// Created: 2000-08-15 (extracted from button.h) +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_ANYBUTTON_H_ +#define _WX_UNIV_ANYBUTTON_H_ + +// ---------------------------------------------------------------------------- +// Common button functionality +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase +{ +public: + wxAnyButton() {} + + virtual ~wxAnyButton() {} + +protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_STATIC; } + +private: + wxDECLARE_NO_COPY_CLASS(wxAnyButton); +}; + +#endif // _WX_UNIV_ANYBUTTON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/app.h new file mode 100644 index 0000000000..2d946d54e2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/app.h @@ -0,0 +1,20 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/app.h +// Purpose: wxUniversalApp class extends wxApp for wxUniv port +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_APP_H_ +#define _WX_UNIX_APP_H_ + +class WXDLLIMPEXP_CORE wxUniversalApp : public wxApp +{ +public: +}; + +#endif // _WX_UNIX_APP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/bmpbuttn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/bmpbuttn.h new file mode 100644 index 0000000000..832f199b1a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/bmpbuttn.h @@ -0,0 +1,71 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/bmpbuttn.h +// Purpose: wxBitmapButton class for wxUniversal +// Author: Vadim Zeitlin +// Modified by: +// Created: 25.08.00 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_BMPBUTTN_H_ +#define _WX_UNIV_BMPBUTTN_H_ + +class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase +{ +public: + wxBitmapButton() { } + + wxBitmapButton(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Create(parent, id, bitmap, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + virtual void SetMargins(int x, int y) + { + SetBitmapMargins(x, y); + + wxBitmapButtonBase::SetMargins(x, y); + } + + virtual bool Enable(bool enable = true); + + virtual bool SetCurrent(bool doit = true); + + virtual void Press(); + virtual void Release(); + +protected: + void OnSetFocus(wxFocusEvent& event); + void OnKillFocus(wxFocusEvent& event); + + // called when one of the bitmap is changed by user + virtual void OnSetBitmap(); + + // set bitmap to the given one if it's ok or to the normal bitmap and + // return true if the bitmap really changed + bool ChangeBitmap(const wxBitmap& bmp); + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxBitmapButton) +}; + +#endif // _WX_UNIV_BMPBUTTN_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/button.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/button.h new file mode 100644 index 0000000000..56e66c5db5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/button.h @@ -0,0 +1,139 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/button.h +// Purpose: wxButton for wxUniversal +// Author: Vadim Zeitlin +// Modified by: +// Created: 15.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_BUTTON_H_ +#define _WX_UNIV_BUTTON_H_ + +class WXDLLIMPEXP_FWD_CORE wxInputHandler; + +#include "wx/bitmap.h" + +// ---------------------------------------------------------------------------- +// the actions supported by this control +// ---------------------------------------------------------------------------- + +#define wxACTION_BUTTON_TOGGLE wxT("toggle") // press/release the button +#define wxACTION_BUTTON_PRESS wxT("press") // press the button +#define wxACTION_BUTTON_RELEASE wxT("release") // release the button +#define wxACTION_BUTTON_CLICK wxT("click") // generate button click event + +// ---------------------------------------------------------------------------- +// wxButton: a push button +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxButton : public wxButtonBase +{ +public: + wxButton() { Init(); } + wxButton(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Init(); + + Create(parent, id, bitmap, label, pos, size, style, validator, name); + } + + wxButton(wxWindow *parent, + wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Init(); + + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + return Create(parent, id, wxNullBitmap, label, + pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + + virtual ~wxButton(); + + virtual wxWindow *SetDefault(); + + virtual bool IsPressed() const { return m_isPressed; } + virtual bool IsDefault() const { return m_isDefault; } + + // wxButton actions + virtual void Toggle(); + virtual void Press(); + virtual void Release(); + virtual void Click(); + + virtual bool PerformAction(const wxControlAction& action, + long numArg = -1, + const wxString& strArg = wxEmptyString); + + virtual bool CanBeHighlighted() const { return true; } + + static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return GetStdInputHandler(handlerDef); + } + + +protected: + virtual wxSize DoGetBestClientSize() const; + + virtual bool DoDrawBackground(wxDC& dc); + virtual void DoDraw(wxControlRenderer *renderer); + + virtual void DoSetBitmap(const wxBitmap& bitmap, State which); + virtual void DoSetBitmapMargins(wxCoord x, wxCoord y); + + // common part of all ctors + void Init(); + + // current state + bool m_isPressed, + m_isDefault; + + // the (optional) image to show and the margins around it + wxBitmap m_bitmap; + wxCoord m_marginBmpX, + m_marginBmpY; + +private: + DECLARE_DYNAMIC_CLASS(wxButton) +}; + +#endif // _WX_UNIV_BUTTON_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/checkbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/checkbox.h new file mode 100644 index 0000000000..b10fa93712 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/checkbox.h @@ -0,0 +1,149 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/checkbox.h +// Purpose: wxCheckBox declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 07.09.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_CHECKBOX_H_ +#define _WX_UNIV_CHECKBOX_H_ + +#include "wx/button.h" // for wxStdButtonInputHandler + +// ---------------------------------------------------------------------------- +// the actions supported by wxCheckBox +// ---------------------------------------------------------------------------- + +#define wxACTION_CHECKBOX_CHECK wxT("check") // SetValue(true) +#define wxACTION_CHECKBOX_CLEAR wxT("clear") // SetValue(false) +#define wxACTION_CHECKBOX_TOGGLE wxT("toggle") // toggle the check state + +// additionally it accepts wxACTION_BUTTON_PRESS and RELEASE + +// ---------------------------------------------------------------------------- +// wxCheckBox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase +{ +public: + // checkbox constants + enum State + { + State_Normal, + State_Pressed, + State_Disabled, + State_Current, + State_Max + }; + + enum Status + { + Status_Checked, + Status_Unchecked, + Status_3rdState, + Status_Max + }; + + // constructors + wxCheckBox() { Init(); } + + wxCheckBox(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) + { + Init(); + + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + // implement the checkbox interface + virtual void SetValue(bool value); + virtual bool GetValue() const; + + // set/get the bitmaps to use for the checkbox indicator + void SetBitmap(const wxBitmap& bmp, State state, Status status); + virtual wxBitmap GetBitmap(State state, Status status) const; + + // wxCheckBox actions + void Toggle(); + virtual void Press(); + virtual void Release(); + virtual void ChangeValue(bool value); + + // overridden base class virtuals + virtual bool IsPressed() const { return m_isPressed; } + + virtual bool PerformAction(const wxControlAction& action, + long numArg = -1, + const wxString& strArg = wxEmptyString); + + virtual bool CanBeHighlighted() const { return true; } + virtual wxInputHandler *CreateStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return CreateStdInputHandler(handlerDef); + } + +protected: + virtual void DoSet3StateValue(wxCheckBoxState WXUNUSED(state)); + virtual wxCheckBoxState DoGet3StateValue() const; + + virtual void DoDraw(wxControlRenderer *renderer); + virtual wxSize DoGetBestClientSize() const; + + // get the size of the bitmap using either the current one or the default + // one (query renderer then) + virtual wxSize GetBitmapSize() const; + + // common part of all ctors + void Init(); + + // send command event notifying about the checkbox state change + virtual void SendEvent(); + + // called when the checkbox becomes checked - radio button hook + virtual void OnCheck(); + + // get the state corresponding to the flags (combination of wxCONTROL_XXX) + wxCheckBox::State GetState(int flags) const; + + // directly access the bitmaps array without trying to find a valid bitmap + // to use as GetBitmap() does + wxBitmap DoGetBitmap(State state, Status status) const + { return m_bitmaps[state][status]; } + + // get the current status + Status GetStatus() const { return m_status; } + +private: + // the current check status + Status m_status; + + // the bitmaps to use for the different states + wxBitmap m_bitmaps[State_Max][Status_Max]; + + // is the checkbox currently pressed? + bool m_isPressed; + + DECLARE_DYNAMIC_CLASS(wxCheckBox) +}; + +#endif // _WX_UNIV_CHECKBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/checklst.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/checklst.h new file mode 100644 index 0000000000..68030084d9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/checklst.h @@ -0,0 +1,110 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/checklst.h +// Purpose: wxCheckListBox class for wxUniversal +// Author: Vadim Zeitlin +// Modified by: +// Created: 12.09.00 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_CHECKLST_H_ +#define _WX_UNIV_CHECKLST_H_ + +// ---------------------------------------------------------------------------- +// actions +// ---------------------------------------------------------------------------- + +#define wxACTION_CHECKLISTBOX_TOGGLE wxT("toggle") + +// ---------------------------------------------------------------------------- +// wxCheckListBox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase +{ +public: + // ctors + wxCheckListBox() { Init(); } + + wxCheckListBox(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int nStrings = 0, + const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr) + { + Init(); + + Create(parent, id, pos, size, nStrings, choices, style, validator, name); + } + wxCheckListBox(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int nStrings = 0, + const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + // implement check list box methods + virtual bool IsChecked(unsigned int item) const; + virtual void Check(unsigned int item, bool check = true); + + // and input handling + virtual bool PerformAction(const wxControlAction& action, + long numArg = -1l, + const wxString& strArg = wxEmptyString); + + static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return GetStdInputHandler(handlerDef); + } + +protected: + // override all methods which add/delete items to update m_checks array as + // well + virtual void OnItemInserted(unsigned int pos); + virtual void DoDeleteOneItem(unsigned int n); + virtual void DoClear(); + + // draw the check items instead of the usual ones + virtual void DoDrawRange(wxControlRenderer *renderer, + int itemFirst, int itemLast); + + // take them also into account for size calculation + virtual wxSize DoGetBestClientSize() const; + + // common part of all ctors + void Init(); + +private: + // the array containing the checked status of the items + wxArrayInt m_checks; + + DECLARE_DYNAMIC_CLASS(wxCheckListBox) +}; + +#endif // _WX_UNIV_CHECKLST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/chkconf.h new file mode 100644 index 0000000000..45667dc31e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/chkconf.h @@ -0,0 +1,127 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/chkconf.h +// Purpose: wxUniversal-specific configuration options checks +// Author: Vadim Zeitlin +// Created: 2006-09-28 (extracted from wx/chkconf.h) +// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_CHKCONF_H_ +#define _WX_UNIV_CHKCONF_H_ + +#if wxUSE_OWNER_DRAWN + /* + It is not clear if owner-drawn code makes much sense for wxUniv in the + first place but in any case it doesn't link currently (at least under + wxMSW but probably elsewhere too) as there is no wxUniv-specific + wxOwnerDrawnBase implementation so disable it for now. + */ + #undef wxUSE_OWNER_DRAWN + #define wxUSE_OWNER_DRAWN 0 +#endif /* wxUSE_OWNER_DRAWN */ + +#if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_POPUPWIN must be defined to use comboboxes/menus" +# else +# undef wxUSE_POPUPWIN +# define wxUSE_POPUPWIN 1 +# endif +#endif + +#if wxUSE_COMBOBOX +# if !wxUSE_LISTBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxComboBox requires wxListBox in wxUniversal" +# else +# undef wxUSE_LISTBOX +# define wxUSE_LISTBOX 1 +# endif +# endif +#endif /* wxUSE_COMBOBOX */ + +#if wxUSE_RADIOBTN +# if !wxUSE_CHECKBOX +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal" +# else +# undef wxUSE_CHECKBOX +# define wxUSE_CHECKBOX 1 +# endif +# endif +#endif /* wxUSE_RADIOBTN */ + +#if wxUSE_TEXTCTRL +# if !wxUSE_CARET +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxTextCtrl requires wxCaret in wxUniversal" +# else +# undef wxUSE_CARET +# define wxUSE_CARET 1 +# endif +# endif /* wxUSE_CARET */ + +# if !wxUSE_SCROLLBAR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxTextCtrl requires wxScrollBar in wxUniversal" +# else +# undef wxUSE_SCROLLBAR +# define wxUSE_SCROLLBAR 1 +# endif +# endif /* wxUSE_SCROLLBAR */ +#endif /* wxUSE_TEXTCTRL */ + + +/* Themes checks */ +#ifndef wxUSE_ALL_THEMES +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_ALL_THEMES must be defined" +# else +# define wxUSE_ALL_THEMES 1 +# endif +#endif /* wxUSE_ALL_THEMES */ + +#ifndef wxUSE_THEME_GTK +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_THEME_GTK must be defined" +# else +# define wxUSE_THEME_GTK 1 +# endif +#endif /* wxUSE_THEME_GTK */ + +#ifndef wxUSE_THEME_METAL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_THEME_METAL must be defined" +# else +# define wxUSE_THEME_METAL 1 +# endif +#endif /* wxUSE_THEME_METAL */ + +#ifndef wxUSE_THEME_MONO +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_THEME_MONO must be defined" +# else +# define wxUSE_THEME_MONO 1 +# endif +#endif /* wxUSE_THEME_MONO */ + +#ifndef wxUSE_THEME_WIN32 +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_THEME_WIN32 must be defined" +# else +# define wxUSE_THEME_WIN32 1 +# endif +#endif /* wxUSE_THEME_WIN32 */ + +#if !wxUSE_ALL_THEMES && wxUSE_THEME_METAL && !wxUSE_THEME_WIN32 +# ifdef wxABORT_ON_CONFIG_ERROR +# error "Metal theme requires Win32 one" +# else +# undef wxUSE_THEME_WIN32 +# define wxUSE_THEME_WIN32 1 +# endif +#endif /* wxUSE_THEME_METAL && !wxUSE_THEME_WIN32 */ + +#endif /* _WX_UNIV_CHKCONF_H_ */ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/choice.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/choice.h new file mode 100644 index 0000000000..3578198331 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/choice.h @@ -0,0 +1,63 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/choice.h +// Purpose: the universal choice +// Author: Vadim Zeitlin +// Modified by: +// Created: 30.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_CHOICE_H_ +#define _WX_UNIV_CHOICE_H_ + +#include "wx/combobox.h" + +// VS: This is only a *temporary* implementation, real wxChoice should not +// derive from wxComboBox and may have different l&f +class WXDLLIMPEXP_CORE wxChoice : public wxComboBox +{ +public: + wxChoice() {} + wxChoice(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr) + { + Create(parent, id, pos, size, n, choices, style, validator, name); + } + wxChoice(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxChoiceNameStr); + +private: + void OnComboBox(wxCommandEvent &event); + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxChoice) +}; + + +#endif // _WX_UNIV_CHOICE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/colschem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/colschem.h new file mode 100644 index 0000000000..5c5ea7c73f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/colschem.h @@ -0,0 +1,102 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/colschem.h +// Purpose: wxColourScheme class provides the colours to use for drawing +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_COLSCHEM_H_ +#define _WX_UNIV_COLSCHEM_H_ + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +#include "wx/colour.h" +#include "wx/checkbox.h" + +// ---------------------------------------------------------------------------- +// wxColourScheme +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxColourScheme +{ +public: + // the standard colours + enum StdColour + { + // the background colour for a window + WINDOW, + + // the different background and text colours for the control + CONTROL, + CONTROL_PRESSED, + CONTROL_CURRENT, + + // the label text for the normal and the disabled state + CONTROL_TEXT, + CONTROL_TEXT_DISABLED, + CONTROL_TEXT_DISABLED_SHADOW, + + // the scrollbar background colour for the normal and pressed states + SCROLLBAR, + SCROLLBAR_PRESSED, + + // the background and text colour for the highlighted item + HIGHLIGHT, + HIGHLIGHT_TEXT, + + // these colours are used for drawing the shadows of 3D objects + SHADOW_DARK, + SHADOW_HIGHLIGHT, + SHADOW_IN, + SHADOW_OUT, + + // the titlebar background colours for the normal and focused states + TITLEBAR, + TITLEBAR_ACTIVE, + + // the titlebar text colours + TITLEBAR_TEXT, + TITLEBAR_ACTIVE_TEXT, + + // the default gauge fill colour + GAUGE, + + // desktop background colour (only used by framebuffer ports) + DESKTOP, + + // wxFrame's background colour + FRAME, + + MAX + }; + + // get a standard colour + virtual wxColour Get(StdColour col) const = 0; + + // get the background colour for the given window + virtual wxColour GetBackground(wxWindow *win) const = 0; + + // virtual dtor for any base class + virtual ~wxColourScheme() {} +}; + +// some people just can't spell it correctly :-) +typedef wxColourScheme wxColorScheme; + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// retrieve the default colour from the theme or the given scheme +#define wxSCHEME_COLOUR(scheme, what) scheme->Get(wxColorScheme::what) +#define wxTHEME_COLOUR(what) \ + wxSCHEME_COLOUR(wxTheme::Get()->GetColourScheme(), what) + +// get the background colour for the window in the current theme +#define wxTHEME_BG_COLOUR(win) \ + wxTheme::Get()->GetColourScheme()->GetBackground(win) + +#endif // _WX_UNIV_COLSCHEM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/combobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/combobox.h new file mode 100644 index 0000000000..44b0406b2d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/combobox.h @@ -0,0 +1,193 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/combobox.h +// Purpose: the universal combobox +// Author: Vadim Zeitlin +// Modified by: +// Created: 30.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + + +#ifndef _WX_UNIV_COMBOBOX_H_ +#define _WX_UNIV_COMBOBOX_H_ + +#include "wx/combo.h" + +class WXDLLIMPEXP_FWD_CORE wxListBox; + +// ---------------------------------------------------------------------------- +// NB: some actions supported by this control are in wx/generic/combo.h +// ---------------------------------------------------------------------------- + +// choose the next/prev/specified (by numArg) item +#define wxACTION_COMBOBOX_SELECT_NEXT wxT("next") +#define wxACTION_COMBOBOX_SELECT_PREV wxT("prev") +#define wxACTION_COMBOBOX_SELECT wxT("select") + + +// ---------------------------------------------------------------------------- +// wxComboBox: a combination of text control and a listbox +// ---------------------------------------------------------------------------- + +// NB: Normally we'd like wxComboBox to inherit from wxComboBoxBase, but here +// we can't really do that since both wxComboBoxBase and wxComboCtrl inherit +// from wxTextCtrl. +class WXDLLIMPEXP_CORE wxComboBox : + public wxWindowWithItems<wxComboCtrl, wxItemContainer> +{ +public: + // ctors and such + wxComboBox() { Init(); } + + wxComboBox(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr) + { + Init(); + + (void)Create(parent, id, value, pos, size, n, choices, + style, validator, name); + } + wxComboBox(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, + const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxComboBoxNameStr); + + virtual ~wxComboBox(); + + // the wxUniversal-specific methods + // -------------------------------- + + // implement the combobox interface + + // wxTextCtrl methods + virtual wxString GetValue() const { return DoGetValue(); } + virtual void SetValue(const wxString& value); + virtual void WriteText(const wxString& value); + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + virtual void SetInsertionPoint(long pos); + virtual void SetInsertionPointEnd(); + virtual long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to); + virtual void SetSelection(long from, long to); + virtual void GetSelection(long *from, long *to) const; + virtual void SetEditable(bool editable); + virtual bool IsEditable() const; + + virtual void Undo(); + virtual void Redo(); + virtual void SelectAll(); + + virtual bool CanCopy() const; + virtual bool CanCut() const; + virtual bool CanPaste() const; + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + // override these methods to disambiguate between two base classes versions + virtual void Clear() + { + wxComboCtrl::Clear(); + wxItemContainer::Clear(); + } + + // See wxComboBoxBase discussion of IsEmpty(). + bool IsListEmpty() const { return wxItemContainer::IsEmpty(); } + bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); } + + // wxControlWithItems methods + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual void SetSelection(int n); + virtual int GetSelection() const; + virtual wxString GetStringSelection() const; + + // we have our own input handler and our own actions + // (but wxComboCtrl already handled Popup/Dismiss) + /* + virtual bool PerformAction(const wxControlAction& action, + long numArg = 0l, + const wxString& strArg = wxEmptyString); + */ + + static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return GetStdInputHandler(handlerDef); + } + + // we delegate our client data handling to wxListBox which we use for the + // items, so override this and other methods dealing with the client data + virtual wxClientDataType GetClientDataType() const; + virtual void SetClientDataType(wxClientDataType clientDataItemsType); + +protected: + virtual wxString DoGetValue() const; + + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type); + + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + + + // common part of all ctors + void Init(); + + // get the associated listbox + wxListBox *GetLBox() const { return m_lbox; } + +private: + // implement wxTextEntry pure virtual method + virtual wxWindow *GetEditableWindow() { return this; } + + // the popup listbox + wxListBox *m_lbox; + + //DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxComboBox) +}; + +#endif // _WX_UNIV_COMBOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/control.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/control.h new file mode 100644 index 0000000000..442946d048 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/control.h @@ -0,0 +1,103 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/control.h +// Purpose: universal wxControl: adds handling of mnemonics +// Author: Vadim Zeitlin +// Modified by: +// Created: 14.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_CONTROL_H_ +#define _WX_UNIV_CONTROL_H_ + +class WXDLLIMPEXP_FWD_CORE wxControlRenderer; +class WXDLLIMPEXP_FWD_CORE wxInputHandler; +class WXDLLIMPEXP_FWD_CORE wxRenderer; + +// we must include it as most/all control classes derive their handlers from +// it +#include "wx/univ/inphand.h" + +#include "wx/univ/inpcons.h" + +// ---------------------------------------------------------------------------- +// wxControlAction: the action is currently just a string which identifies it, +// later it might become an atom (i.e. an opaque handler to string). +// ---------------------------------------------------------------------------- + +typedef wxString wxControlAction; + +// the list of actions which apply to all controls (other actions are defined +// in the controls headers) + +#define wxACTION_NONE wxT("") // no action to perform + +// ---------------------------------------------------------------------------- +// wxControl: the base class for all GUI controls +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxControl : public wxControlBase, public wxInputConsumer +{ +public: + wxControl() { Init(); } + + wxControl(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr) + { + Init(); + + Create(parent, id, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); + + // this function will filter out '&' characters and will put the + // accelerator char (the one immediately after '&') into m_chAccel + virtual void SetLabel(const wxString& label); + + // return the current label + virtual wxString GetLabel() const { return m_label; } + + // wxUniversal-specific methods + + // return the index of the accel char in the label or -1 if none + int GetAccelIndex() const { return m_indexAccel; } + + // return the accel char itself or 0 if none + wxChar GetAccelChar() const + { + return m_indexAccel == -1 ? wxT('\0') : (wxChar)m_label[m_indexAccel]; + } + + virtual wxWindow *GetInputWindow() const { return (wxWindow*)this; } + +protected: + // common part of all ctors + void Init(); + + // set m_label and m_indexAccel and refresh the control to show the new + // label (but, unlike SetLabel(), don't call the base class SetLabel() thus + // avoiding to change wxControlBase::m_labelOrig) + void UnivDoSetLabel(const wxString& label); + +private: + // label and accel info + wxString m_label; + int m_indexAccel; + + DECLARE_DYNAMIC_CLASS(wxControl) + DECLARE_EVENT_TABLE() + WX_DECLARE_INPUT_CONSUMER() +}; + +#endif // _WX_UNIV_CONTROL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/custombgwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/custombgwin.h new file mode 100644 index 0000000000..61d236f7b6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/custombgwin.h @@ -0,0 +1,36 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/custombgwin.h +// Purpose: wxUniv implementation of wxCustomBackgroundWindow. +// Author: Vadim Zeitlin +// Created: 2011-10-10 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_CUSTOMBGWIN_H_ +#define _WX_UNIV_CUSTOMBGWIN_H_ + +// ---------------------------------------------------------------------------- +// wxCustomBackgroundWindow +// ---------------------------------------------------------------------------- + +template <class W> +class wxCustomBackgroundWindow : public W, + public wxCustomBackgroundWindowBase +{ +public: + typedef W BaseWindowClass; + + wxCustomBackgroundWindow() { } + +protected: + virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) + { + // We have support for background bitmap even at the base class level. + BaseWindowClass::SetBackground(bmp, wxALIGN_NOT, wxTILE); + } + + wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCustomBackgroundWindow, W); +}; + +#endif // _WX_UNIV_CUSTOMBGWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/dialog.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/dialog.h new file mode 100644 index 0000000000..d4f860b6fe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/dialog.h @@ -0,0 +1,87 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/dialog.h +// Purpose: wxDialog class +// Author: Vaclav Slavik +// Created: 2001/09/16 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_DIALOG_H_ +#define _WX_UNIV_DIALOG_H_ + +extern WXDLLIMPEXP_DATA_CORE(const char) wxDialogNameStr[]; +class WXDLLIMPEXP_FWD_CORE wxWindowDisabler; +class WXDLLIMPEXP_FWD_CORE wxEventLoop; + +// Dialog boxes +class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase +{ +public: + wxDialog() { Init(); } + + // Constructor with no modal flag - the new convention. + wxDialog(wxWindow *parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr) + { + Init(); + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxDialogNameStr); + + virtual ~wxDialog(); + + // is the dialog in modal state right now? + virtual bool IsModal() const; + + // For now, same as Show(true) but returns return code + virtual int ShowModal(); + + // may be called to terminate the dialog with the given return code + virtual void EndModal(int retCode); + + // returns true if we're in a modal loop + bool IsModalShowing() const; + + virtual bool Show(bool show = true); + + // implementation only from now on + // ------------------------------- + + // event handlers + void OnCloseWindow(wxCloseEvent& event); + void OnOK(wxCommandEvent& event); + void OnApply(wxCommandEvent& event); + void OnCancel(wxCommandEvent& event); + +protected: + // common part of all ctors + void Init(); + +private: + // while we are showing a modal dialog we disable the other windows using + // this object + wxWindowDisabler *m_windowDisabler; + + // modal dialog runs its own event loop + wxEventLoop *m_eventLoop; + + // is modal right now? + bool m_isShowingModal; + + DECLARE_DYNAMIC_CLASS(wxDialog) + DECLARE_EVENT_TABLE() +}; + +#endif + // _WX_UNIV_DIALOG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/frame.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/frame.h new file mode 100644 index 0000000000..526640f4dc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/frame.h @@ -0,0 +1,88 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/frame.h +// Purpose: wxFrame class for wxUniversal +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.05.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_FRAME_H_ +#define _WX_UNIV_FRAME_H_ + +// ---------------------------------------------------------------------------- +// wxFrame +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase +{ +public: + wxFrame() {} + wxFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual wxPoint GetClientAreaOrigin() const; + virtual bool Enable(bool enable = true); + +#if wxUSE_STATUSBAR + virtual wxStatusBar* CreateStatusBar(int number = 1, + long style = wxSTB_DEFAULT_STYLE, + wxWindowID id = 0, + const wxString& name = wxStatusLineNameStr); +#endif // wxUSE_STATUSBAR + +#if wxUSE_TOOLBAR + // create main toolbar bycalling OnCreateToolBar() + virtual wxToolBar* CreateToolBar(long style = -1, + wxWindowID id = wxID_ANY, + const wxString& name = wxToolBarNameStr); +#endif // wxUSE_TOOLBAR + + virtual wxSize GetMinSize() const; + +protected: + void OnSize(wxSizeEvent& event); + void OnSysColourChanged(wxSysColourChangedEvent& event); + + virtual void DoGetClientSize(int *width, int *height) const; + virtual void DoSetClientSize(int width, int height); + +#if wxUSE_MENUS + // override to update menu bar position when the frame size changes + virtual void PositionMenuBar(); + virtual void DetachMenuBar(); + virtual void AttachMenuBar(wxMenuBar *menubar); +#endif // wxUSE_MENUS + +#if wxUSE_STATUSBAR + // override to update statusbar position when the frame size changes + virtual void PositionStatusBar(); +#endif // wxUSE_MENUS + +protected: +#if wxUSE_TOOLBAR + virtual void PositionToolBar(); +#endif // wxUSE_TOOLBAR + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxFrame) +}; + +#endif // _WX_UNIV_FRAME_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/gauge.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/gauge.h new file mode 100644 index 0000000000..4b88175f39 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/gauge.h @@ -0,0 +1,74 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/gauge.h +// Purpose: wxUniversal wxGauge declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.02.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_GAUGE_H_ +#define _WX_UNIV_GAUGE_H_ + +// ---------------------------------------------------------------------------- +// wxGauge: a progress bar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase +{ +public: + wxGauge() { Init(); } + + wxGauge(wxWindow *parent, + wxWindowID id, + int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr) + { + Init(); + + (void)Create(parent, id, range, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + int range, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxGA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxGaugeNameStr); + + // implement base class virtuals + virtual void SetRange(int range); + virtual void SetValue(int pos); + + // wxUniv-specific methods + + // is it a smooth progress bar or a discrete one? + bool IsSmooth() const { return (GetWindowStyle() & wxGA_SMOOTH) != 0; } + + // is it a vertica; progress bar or a horizontal one? + bool IsVertical() const { return (GetWindowStyle() & wxGA_VERTICAL) != 0; } + +protected: + // common part of all ctors + void Init(); + + // return the def border for a progress bar + virtual wxBorder GetDefaultBorder() const; + + // return the default size + virtual wxSize DoGetBestClientSize() const; + + // draw the control + virtual void DoDraw(wxControlRenderer *renderer); + + DECLARE_DYNAMIC_CLASS(wxGauge) +}; + +#endif // _WX_UNIV_GAUGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/inpcons.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/inpcons.h new file mode 100644 index 0000000000..033d17b0ce --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/inpcons.h @@ -0,0 +1,152 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/inpcons.h +// Purpose: wxInputConsumer: mix-in class for input handling +// Author: Vadim Zeitlin +// Modified by: +// Created: 14.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_INPCONS_H_ +#define _WX_UNIV_INPCONS_H_ + +class WXDLLIMPEXP_FWD_CORE wxInputHandler; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +#include "wx/object.h" +#include "wx/event.h" + +// ---------------------------------------------------------------------------- +// wxControlAction: the action is currently just a string which identifies it, +// later it might become an atom (i.e. an opaque handler to string). +// ---------------------------------------------------------------------------- + +typedef wxString wxControlAction; + +// the list of actions which apply to all controls (other actions are defined +// in the controls headers) + +#define wxACTION_NONE wxT("") // no action to perform + +// ---------------------------------------------------------------------------- +// wxInputConsumer: mix-in class for handling wxControlActions (used by +// wxControl and wxTopLevelWindow). +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxInputConsumer +{ +public: + wxInputConsumer() { m_inputHandler = NULL; } + virtual ~wxInputConsumer() { } + + // get the input handler + wxInputHandler *GetInputHandler() const { return m_inputHandler; } + + // perform a control-dependent action: an action may have an optional + // numeric and another (also optional) string argument whose interpretation + // depends on the action + // + // NB: we might use ellipsis in PerformAction() declaration but this + // wouldn't be more efficient than always passing 2 unused parameters + // but would be more difficult. Another solution would be to have + // several overloaded versions but this will expose the problem of + // virtual function hiding we don't have here. + virtual bool PerformAction(const wxControlAction& action, + long numArg = -1l, + const wxString& strArg = wxEmptyString); + + // get the window to work with (usually the class wxInputConsumer was mixed into) + virtual wxWindow *GetInputWindow() const = 0; + + // this function must be implemented in any classes process input (i.e. not + // static controls) to create the standard input handler for the concrete + // class deriving from this mix-in + // + // the parameter is the default input handler which should receive all + // unprocessed input (i.e. typically handlerDef is passed to + // wxStdInputHandler ctor) or it may be NULL + // + // the returned pointer will not be deleted by caller so it must either + // point to a static object or be deleted on program termination + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef); + + +protected: + // event handlers + void OnMouse(wxMouseEvent& event); + void OnKeyDown(wxKeyEvent& event); + void OnKeyUp(wxKeyEvent& event); + void OnFocus(wxFocusEvent& event); + void OnActivate(wxActivateEvent& event); + + // create input handler by name, fall back to GetStdInputHandler() if + // the current theme doesn't define any specific handler of this type + void CreateInputHandler(const wxString& inphandler); + +private: + // the input processor (we never delete it) + wxInputHandler *m_inputHandler; +}; + + +// ---------------------------------------------------------------------------- +// macros which must be used by the classes derived from wxInputConsumer mix-in +// ---------------------------------------------------------------------------- + +// declare the methods to be forwarded +#define WX_DECLARE_INPUT_CONSUMER() \ +private: \ + void OnMouse(wxMouseEvent& event); \ + void OnKeyDown(wxKeyEvent& event); \ + void OnKeyUp(wxKeyEvent& event); \ + void OnFocus(wxFocusEvent& event); \ +public: /* because of docview :-( */ \ + void OnActivate(wxActivateEvent& event); \ +private: + +// implement the event table entries for wxControlContainer +#define WX_EVENT_TABLE_INPUT_CONSUMER(classname) \ + EVT_KEY_DOWN(classname::OnKeyDown) \ + EVT_KEY_UP(classname::OnKeyUp) \ + EVT_MOUSE_EVENTS(classname::OnMouse) \ + EVT_SET_FOCUS(classname::OnFocus) \ + EVT_KILL_FOCUS(classname::OnFocus) \ + EVT_ACTIVATE(classname::OnActivate) + +// Forward event handlers to wxInputConsumer +// +// (We can't use them directly, because wxIC has virtual methods, which forces +// the compiler to include (at least) two vtables into wxControl, one for the +// wxWindow-wxControlBase-wxControl branch and one for the wxIC mix-in. +// Consequently, the "this" pointer has different value when in wxControl's +// and wxIC's method, even though the instance stays same. This doesn't matter +// so far as member pointers aren't used, but that's not wxControl's case. +// When we add an event table entry (= use a member pointer) pointing to +// wxIC's OnXXX method, GCC compiles code that executes wxIC::OnXXX with the +// version of "this" that belongs to wxControl, not wxIC! In our particular +// case, the effect is that m_handler is NULL (probably same memory +// area as the_other_vtable's_this->m_refObj) and input handling doesn't work.) +#define WX_FORWARD_TO_INPUT_CONSUMER(classname) \ + void classname::OnMouse(wxMouseEvent& event) \ + { \ + wxInputConsumer::OnMouse(event); \ + } \ + void classname::OnKeyDown(wxKeyEvent& event) \ + { \ + wxInputConsumer::OnKeyDown(event); \ + } \ + void classname::OnKeyUp(wxKeyEvent& event) \ + { \ + wxInputConsumer::OnKeyUp(event); \ + } \ + void classname::OnFocus(wxFocusEvent& event) \ + { \ + wxInputConsumer::OnFocus(event); \ + } \ + void classname::OnActivate(wxActivateEvent& event) \ + { \ + wxInputConsumer::OnActivate(event); \ + } + +#endif // _WX_UNIV_INPCONS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/inphand.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/inphand.h new file mode 100644 index 0000000000..00604afaa2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/inphand.h @@ -0,0 +1,115 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/inphand.h +// Purpose: wxInputHandler class maps the keyboard and mouse events to the +// actions which then are performed by the control +// Author: Vadim Zeitlin +// Modified by: +// Created: 18.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_INPHAND_H_ +#define _WX_UNIV_INPHAND_H_ + +#include "wx/univ/inpcons.h" // for wxControlAction(s) + +// ---------------------------------------------------------------------------- +// types of the standard input handlers which can be passed to +// wxTheme::GetInputHandler() +// ---------------------------------------------------------------------------- + +#define wxINP_HANDLER_DEFAULT wxT("") +#define wxINP_HANDLER_BUTTON wxT("button") +#define wxINP_HANDLER_CHECKBOX wxT("checkbox") +#define wxINP_HANDLER_CHECKLISTBOX wxT("checklistbox") +#define wxINP_HANDLER_COMBOBOX wxT("combobox") +#define wxINP_HANDLER_LISTBOX wxT("listbox") +#define wxINP_HANDLER_NOTEBOOK wxT("notebook") +#define wxINP_HANDLER_RADIOBTN wxT("radiobtn") +#define wxINP_HANDLER_SCROLLBAR wxT("scrollbar") +#define wxINP_HANDLER_SLIDER wxT("slider") +#define wxINP_HANDLER_SPINBTN wxT("spinbtn") +#define wxINP_HANDLER_STATUSBAR wxT("statusbar") +#define wxINP_HANDLER_TEXTCTRL wxT("textctrl") +#define wxINP_HANDLER_TOOLBAR wxT("toolbar") +#define wxINP_HANDLER_TOPLEVEL wxT("toplevel") + +// ---------------------------------------------------------------------------- +// wxInputHandler: maps the events to the actions +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxInputHandler : public wxObject +{ +public: + // map a keyboard event to one or more actions (pressed == true if the key + // was pressed, false if released), returns true if something was done + virtual bool HandleKey(wxInputConsumer *consumer, + const wxKeyEvent& event, + bool pressed) = 0; + + // map a mouse (click) event to one or more actions + virtual bool HandleMouse(wxInputConsumer *consumer, + const wxMouseEvent& event) = 0; + + // handle mouse movement (or enter/leave) event: it is separated from + // HandleMouse() for convenience as many controls don't care about mouse + // movements at all + virtual bool HandleMouseMove(wxInputConsumer *consumer, + const wxMouseEvent& event); + + // do something with focus set/kill event: this is different from + // HandleMouseMove() as the mouse maybe over the control without it having + // focus + // + // return true to refresh the control, false otherwise + virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event); + + // react to the app getting/losing activation + // + // return true to refresh the control, false otherwise + virtual bool HandleActivation(wxInputConsumer *consumer, bool activated); + + // virtual dtor for any base class + virtual ~wxInputHandler(); +}; + +// ---------------------------------------------------------------------------- +// wxStdInputHandler is just a base class for all other "standard" handlers +// and also provides the way to chain input handlers together +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStdInputHandler : public wxInputHandler +{ +public: + wxStdInputHandler(wxInputHandler *handler) : m_handler(handler) { } + + virtual bool HandleKey(wxInputConsumer *consumer, + const wxKeyEvent& event, + bool pressed) + { + return m_handler ? m_handler->HandleKey(consumer, event, pressed) + : false; + } + + virtual bool HandleMouse(wxInputConsumer *consumer, + const wxMouseEvent& event) + { + return m_handler ? m_handler->HandleMouse(consumer, event) : false; + } + + virtual bool HandleMouseMove(wxInputConsumer *consumer, const wxMouseEvent& event) + { + return m_handler ? m_handler->HandleMouseMove(consumer, event) : false; + } + + virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event) + { + return m_handler ? m_handler->HandleFocus(consumer, event) : false; + } + +private: + wxInputHandler *m_handler; +}; + +#endif // _WX_UNIV_INPHAND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/listbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/listbox.h new file mode 100644 index 0000000000..2a94ffae9d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/listbox.h @@ -0,0 +1,304 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/listbox.h +// Purpose: the universal listbox +// Author: Vadim Zeitlin +// Modified by: +// Created: 30.08.00 +// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_LISTBOX_H_ +#define _WX_UNIV_LISTBOX_H_ + +#include "wx/scrolwin.h" // for wxScrollHelper +#include "wx/dynarray.h" +#include "wx/arrstr.h" + +// ---------------------------------------------------------------------------- +// the actions supported by this control +// ---------------------------------------------------------------------------- + +// change the current item +#define wxACTION_LISTBOX_SETFOCUS wxT("setfocus") // select the item +#define wxACTION_LISTBOX_MOVEDOWN wxT("down") // select item below +#define wxACTION_LISTBOX_MOVEUP wxT("up") // select item above +#define wxACTION_LISTBOX_PAGEDOWN wxT("pagedown") // go page down +#define wxACTION_LISTBOX_PAGEUP wxT("pageup") // go page up +#define wxACTION_LISTBOX_START wxT("start") // go to first item +#define wxACTION_LISTBOX_END wxT("end") // go to last item +#define wxACTION_LISTBOX_FIND wxT("find") // find item by 1st letter + +// do something with the current item +#define wxACTION_LISTBOX_ACTIVATE wxT("activate") // activate (choose) +#define wxACTION_LISTBOX_TOGGLE wxT("toggle") // togglee selected state +#define wxACTION_LISTBOX_SELECT wxT("select") // sel this, unsel others +#define wxACTION_LISTBOX_SELECTADD wxT("selectadd") // add to selection +#define wxACTION_LISTBOX_UNSELECT wxT("unselect") // unselect +#define wxACTION_LISTBOX_ANCHOR wxT("selanchor") // anchor selection + +// do something with the selection globally (not for single selection ones) +#define wxACTION_LISTBOX_SELECTALL wxT("selectall") // select all items +#define wxACTION_LISTBOX_UNSELECTALL wxT("unselectall") // unselect all items +#define wxACTION_LISTBOX_SELTOGGLE wxT("togglesel") // invert the selection +#define wxACTION_LISTBOX_EXTENDSEL wxT("extend") // extend to item + +// ---------------------------------------------------------------------------- +// wxListBox: a list of selectable items +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase, public wxScrollHelper +{ +public: + // ctors and such + wxListBox() : wxScrollHelper(this) { Init(); } + wxListBox(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr ) + : wxScrollHelper(this) + { + Init(); + + Create(parent, id, pos, size, n, choices, style, validator, name); + } + wxListBox(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr ); + + virtual ~wxListBox(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr); + + // implement the listbox interface defined by wxListBoxBase + virtual void DoClear(); + virtual void DoDeleteOneItem(unsigned int n); + + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + virtual int FindString(const wxString& s, bool bCase = false) const; + + virtual bool IsSelected(int n) const + { return m_selections.Index(n) != wxNOT_FOUND; } + virtual int GetSelection() const; + virtual int GetSelections(wxArrayInt& aSelections) const; + +protected: + virtual void DoSetSelection(int n, bool select); + + virtual int DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, + wxClientDataType type); + + // universal wxComboBox implementation internally uses wxListBox + friend class WXDLLIMPEXP_FWD_CORE wxComboBox; + + virtual void DoSetFirstItem(int n); + + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + +public: + // override some more base class methods + virtual bool SetFont(const wxFont& font); + + // the wxUniversal-specific methods + // -------------------------------- + + // the current item is the same as the selected one for wxLB_SINGLE + // listboxes but for the other ones it is just the focused item which may + // be selected or not + int GetCurrentItem() const { return m_current; } + void SetCurrentItem(int n); + + // select the item which is diff items below the current one + void ChangeCurrent(int diff); + + // activate (i.e. send a LISTBOX_DOUBLECLICKED message) the specified or + // current (if -1) item + void Activate(int item = -1); + + // select or unselect the specified or current (if -1) item + void DoSelect(int item = -1, bool sel = true); + + // more readable wrapper + void DoUnselect(int item) { DoSelect(item, false); } + + // select an item and send a notification about it + void SelectAndNotify(int item); + + // ensure that the given item is visible by scrolling it into view + virtual void EnsureVisible(int n); + + // find the first item [strictly] after the current one which starts with + // the given string and make it the current one, return true if the current + // item changed + bool FindItem(const wxString& prefix, bool strictlyAfter = false); + bool FindNextItem(const wxString& prefix) { return FindItem(prefix, true); } + + // extend the selection to span the range from the anchor (see below) to + // the specified or current item + void ExtendSelection(int itemTo = -1); + + // make this item the new selection anchor: extending selection with + // ExtendSelection() will work with it + void AnchorSelection(int itemFrom) { m_selAnchor = itemFrom; } + + // get, calculating it if necessary, the number of items per page, the + // height of each line and the max width of an item + int GetItemsPerPage() const; + wxCoord GetLineHeight() const; + wxCoord GetMaxWidth() const; + + // override the wxControl virtual methods + virtual bool PerformAction(const wxControlAction& action, + long numArg = 0l, + const wxString& strArg = wxEmptyString); + + static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return GetStdInputHandler(handlerDef); + } + + // idle processing + virtual void OnInternalIdle(); + +protected: + // geometry + virtual wxSize DoGetBestClientSize() const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + virtual void DoDraw(wxControlRenderer *renderer); + virtual wxBorder GetDefaultBorder() const; + + // special hook for wxCheckListBox which allows it to update its internal + // data when a new item is inserted into the listbox + virtual void OnItemInserted(unsigned int WXUNUSED(pos)) { } + + + // common part of all ctors + void Init(); + + // event handlers + void OnSize(wxSizeEvent& event); + + // refresh the given item(s) or everything + void RefreshItems(int from, int count); + void RefreshItem(int n); + void RefreshFromItemToEnd(int n); + void RefreshAll(); + + // send an event of the given type (using m_current by default) + bool SendEvent(wxEventType type, int item = -1); + + // calculate the number of items per page using our current size + void CalcItemsPerPage(); + + // can/should we have a horz scrollbar? + bool HasHorzScrollbar() const + { return (m_windowStyle & wxLB_HSCROLL) != 0; } + + // redraw the items in the given range only: called from DoDraw() + virtual void DoDrawRange(wxControlRenderer *renderer, + int itemFirst, int itemLast); + + // update the scrollbars and then ensure that the item is visible + void DoEnsureVisible(int n); + + // mark horz scrollbar for updating + void RefreshHorzScrollbar(); + + // update (show/hide/adjust) the scrollbars + void UpdateScrollbars(); + + // refresh the items specified by m_updateCount and m_updateFrom + void UpdateItems(); + + // the array containing all items (it is sorted if the listbox has + // wxLB_SORT style) + union + { + wxArrayString *unsorted; + wxSortedArrayString *sorted; + } m_strings; + + // this array contains the indices of the selected items (for the single + // selection listboxes only the first element of it is used and contains + // the current selection) + wxArrayInt m_selections; + + // and this one the client data (either void or wxClientData) + wxArrayPtrVoid m_itemsClientData; + + // the current item + int m_current; + +private: + // the range of elements which must be updated: if m_updateCount is 0 no + // update is needed, if it is -1 everything must be updated, otherwise + // m_updateCount items starting from m_updateFrom have to be redrawn + int m_updateFrom, + m_updateCount; + + // the height of one line in the listbox (all lines have the same height) + wxCoord m_lineHeight; + + // the maximal width of a listbox item and the item which has it + wxCoord m_maxWidth; + int m_maxWidthItem; + + // the extents of horz and vert scrollbars + int m_scrollRangeX, + m_scrollRangeY; + + // the number of items per page + size_t m_itemsPerPage; + + // if the number of items has changed we may need to show/hide the + // scrollbar + bool m_updateScrollbarX, m_updateScrollbarY, + m_showScrollbarX, m_showScrollbarY; + + // if the current item has changed, we might need to scroll if it went out + // of the window + bool m_currentChanged; + + // the anchor from which the selection is extended for the listboxes with + // wxLB_EXTENDED style - this is set to the last item which was selected + // by not extending the selection but by choosing it directly + int m_selAnchor; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxListBox) +}; + +#endif // _WX_UNIV_LISTBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/menu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/menu.h new file mode 100644 index 0000000000..4525825ec5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/menu.h @@ -0,0 +1,274 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/menu.h +// Purpose: wxMenu and wxMenuBar classes for wxUniversal +// Author: Vadim Zeitlin +// Modified by: +// Created: 05.05.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_MENU_H_ +#define _WX_UNIV_MENU_H_ + +#if wxUSE_ACCEL + #include "wx/accel.h" +#endif // wxUSE_ACCEL + +#include "wx/dynarray.h" + +// fwd declarations +class WXDLLIMPEXP_FWD_CORE wxMenuInfo; +WX_DECLARE_EXPORTED_OBJARRAY(wxMenuInfo, wxMenuInfoArray); + +class WXDLLIMPEXP_FWD_CORE wxMenuGeometryInfo; +class WXDLLIMPEXP_FWD_CORE wxPopupMenuWindow; +class WXDLLIMPEXP_FWD_CORE wxRenderer; + +// ---------------------------------------------------------------------------- +// wxMenu +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase +{ +public: + // ctors and dtor + wxMenu(const wxString& title, long style = 0) + : wxMenuBase(title, style) { Init(); } + + wxMenu(long style = 0) : wxMenuBase(style) { Init(); } + + virtual ~wxMenu(); + + // called by wxMenuItem when an item of this menu changes + void RefreshItem(wxMenuItem *item); + + // does the menu have any items? + bool IsEmpty() const { return !GetMenuItems().GetFirst(); } + + // show this menu at the given position (in screen coords) and optionally + // select its first item + void Popup(const wxPoint& pos, const wxSize& size, + bool selectFirst = true); + + // dismiss the menu + void Dismiss(); + + // override the base class methods to connect/disconnect event handlers + virtual void Attach(wxMenuBarBase *menubar); + virtual void Detach(); + + // implementation only from here + + // do as if this item were clicked, return true if the resulting event was + // processed, false otherwise + bool ClickItem(wxMenuItem *item); + + // process the key event, return true if done + bool ProcessKeyDown(int key); + +#if wxUSE_ACCEL + // find the item for the given accel and generate an event if found + bool ProcessAccelEvent(const wxKeyEvent& event); +#endif // wxUSE_ACCEL + +protected: + // implement base class virtuals + virtual wxMenuItem* DoAppend(wxMenuItem *item); + virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); + virtual wxMenuItem* DoRemove(wxMenuItem *item); + + // common part of DoAppend and DoInsert + void OnItemAdded(wxMenuItem *item); + + // called by wxPopupMenuWindow when the window is hidden + void OnDismiss(bool dismissParent); + + // return true if the menu is currently shown on screen + bool IsShown() const; + + // get the menu geometry info + const wxMenuGeometryInfo& GetGeometryInfo() const; + + // forget old menu geometry info + void InvalidateGeometryInfo(); + + // return either the menubar or the invoking window, normally never NULL + wxWindow *GetRootWindow() const; + + // get the renderer we use for drawing: either the one of the menu bar or + // the one of the window if we're a popup menu + wxRenderer *GetRenderer() const; + +#if wxUSE_ACCEL + // add/remove accel for the given menu item + void AddAccelFor(wxMenuItem *item); + void RemoveAccelFor(wxMenuItem *item); +#endif // wxUSE_ACCEL + +private: + // common part of all ctors + void Init(); + + // terminate the current radio group, if any + void EndRadioGroup(); + + // the exact menu geometry is defined by a struct derived from this one + // which is opaque and defined by the renderer + wxMenuGeometryInfo *m_geometry; + + // the menu shown on screen or NULL if not currently shown + wxPopupMenuWindow *m_popupMenu; + +#if wxUSE_ACCEL + // the accel table for this menu + wxAcceleratorTable m_accelTable; +#endif // wxUSE_ACCEL + + // the position of the first item in the current radio group or -1 + int m_startRadioGroup; + + // it calls out OnDismiss() + friend class wxPopupMenuWindow; + DECLARE_DYNAMIC_CLASS(wxMenu) +}; + +// ---------------------------------------------------------------------------- +// wxMenuBar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase +{ +public: + // ctors and dtor + wxMenuBar(long WXUNUSED(style) = 0) { Init(); } + wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); + virtual ~wxMenuBar(); + + // implement base class virtuals + virtual bool Append( wxMenu *menu, const wxString &title ); + virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); + virtual wxMenu *Remove(size_t pos); + + virtual void EnableTop(size_t pos, bool enable); + virtual bool IsEnabledTop(size_t pos) const; + + virtual void SetMenuLabel(size_t pos, const wxString& label); + virtual wxString GetMenuLabel(size_t pos) const; + + virtual void Attach(wxFrame *frame); + virtual void Detach(); + + // get the next item for the givan accel letter (used by wxFrame), return + // -1 if none + // + // if unique is not NULL, filled with true if there is only one item with + // this accel, false if two or more + int FindNextItemForAccel(int idxStart, + int keycode, + bool *unique = NULL) const; + + // called by wxFrame to set focus to or open the given menu + void SelectMenu(size_t pos); + void PopupMenu(size_t pos); + +#if wxUSE_ACCEL + // find the item for the given accel and generate an event if found + bool ProcessAccelEvent(const wxKeyEvent& event); +#endif // wxUSE_ACCEL + + // called by wxMenu when it is dismissed + void OnDismissMenu(bool dismissMenuBar = false); + +protected: + // common part of all ctors + void Init(); + + // event handlers + void OnLeftDown(wxMouseEvent& event); + void OnMouseMove(wxMouseEvent& event); + void OnKeyDown(wxKeyEvent& event); + void OnKillFocus(wxFocusEvent& event); + + // process the mouse move event, return true if we did, false to continue + // processing as usual + // + // the coordinates are client coordinates of menubar, convert if necessary + bool ProcessMouseEvent(const wxPoint& pt); + + // called when the menu bar loses mouse capture - it is not hidden unlike + // menus, but it doesn't have modal status any longer + void OnDismiss(); + + // draw the menubar + virtual void DoDraw(wxControlRenderer *renderer); + + // menubar geometry + virtual wxSize DoGetBestClientSize() const; + + // has the menubar been created already? + bool IsCreated() const { return m_frameLast != NULL; } + + // "fast" version of GetMenuCount() + size_t GetCount() const { return m_menuInfos.GetCount(); } + + // get the (total) width of the specified menu + wxCoord GetItemWidth(size_t pos) const; + + // get the rect of the item + wxRect GetItemRect(size_t pos) const; + + // get the menu from the given point or -1 if none + int GetMenuFromPoint(const wxPoint& pos) const; + + // refresh the given item + void RefreshItem(size_t pos); + + // refresh all items after this one (including it) + void RefreshAllItemsAfter(size_t pos); + + // hide the currently shown menu and show this one + void DoSelectMenu(size_t pos); + + // popup the currently selected menu + void PopupCurrentMenu(bool selectFirst = true); + + // hide the currently selected menu + void DismissMenu(); + + // do we show a menu currently? + bool IsShowingMenu() const { return m_menuShown != 0; } + + // we don't want to have focus except while selecting from menu + void GiveAwayFocus(); + + // Release the mouse capture if we have it + bool ReleaseMouseCapture(); + + // the array containing extra menu info we need + wxMenuInfoArray m_menuInfos; + + // the current item (only used when menubar has focus) + int m_current; + +private: + // the last frame to which we were attached, NULL initially + wxFrame *m_frameLast; + + // the currently shown menu or NULL + wxMenu *m_menuShown; + + // should be showing the menu? this is subtly different from m_menuShown != + // NULL as the menu which should be shown may be disabled in which case we + // don't show it - but will do as soon as the focus shifts to another menu + bool m_shouldShowMenu; + + // it calls out ProcessMouseEvent() + friend class wxPopupMenuWindow; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxMenuBar) +}; + +#endif // _WX_UNIV_MENU_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/menuitem.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/menuitem.h new file mode 100644 index 0000000000..e6a11ea44a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/menuitem.h @@ -0,0 +1,126 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/menuitem.h +// Purpose: wxMenuItem class for wxUniversal +// Author: Vadim Zeitlin +// Modified by: +// Created: 05.05.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_MENUITEM_H_ +#define _WX_UNIV_MENUITEM_H_ + +// ---------------------------------------------------------------------------- +// wxMenuItem implements wxMenuItemBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase +{ +public: + // ctor & dtor + wxMenuItem(wxMenu *parentMenu = NULL, + int id = wxID_SEPARATOR, + const wxString& name = wxEmptyString, + const wxString& help = wxEmptyString, + wxItemKind kind = wxITEM_NORMAL, + wxMenu *subMenu = NULL); + virtual ~wxMenuItem(); + + // override base class virtuals to update the item appearance on screen + virtual void SetItemLabel(const wxString& text); + virtual void SetCheckable(bool checkable); + + virtual void Enable(bool enable = true); + virtual void Check(bool check = true); + + // we add some extra functions which are also available under MSW from + // wxOwnerDrawn class - they will be moved to wxMenuItemBase later + // hopefully + void SetBitmaps(const wxBitmap& bmpChecked, + const wxBitmap& bmpUnchecked = wxNullBitmap); + void SetBitmap(const wxBitmap& bmp) { SetBitmaps(bmp); } + const wxBitmap& GetBitmap(bool checked = true) const + { return checked ? m_bmpChecked : m_bmpUnchecked; } + + void SetDisabledBitmap( const wxBitmap& bmpDisabled ) + { m_bmpDisabled = bmpDisabled; } + const wxBitmap& GetDisabledBitmap() const + { return m_bmpDisabled; } + + // mark item as belonging to the given radio group + void SetAsRadioGroupStart(); + void SetRadioGroupStart(int start); + void SetRadioGroupEnd(int end); + + // wxUniv-specific methods for implementation only starting from here + + // get the accel index of our label or -1 if none + int GetAccelIndex() const { return m_indexAccel; } + + // get the accel string (displayed to the right of the label) + const wxString& GetAccelString() const { return m_strAccel; } + + // set/get the y coord and the height of this item: note that it must be + // set first and retrieved later, the item doesn't calculate it itself + void SetGeometry(wxCoord y, wxCoord height) + { + m_posY = y; + m_height = height; + } + + wxCoord GetPosition() const + { + wxASSERT_MSG( m_posY != wxDefaultCoord, wxT("must call SetHeight first!") ); + + return m_posY; + } + + wxCoord GetHeight() const + { + wxASSERT_MSG( m_height != wxDefaultCoord, wxT("must call SetHeight first!") ); + + return m_height; + } + +protected: + // notify the menu about the change in this item + inline void NotifyMenu(); + + // set the accel index and string from text + void UpdateAccelInfo(); + + // the bitmaps (may be invalid, then they're not used) + wxBitmap m_bmpChecked, + m_bmpUnchecked, + m_bmpDisabled; + + // the positions of the first and last items of the radio group this item + // belongs to or -1: start is the radio group start and is valid for all + // but first radio group items (m_isRadioGroupStart == false), end is valid + // only for the first one + union + { + int start; + int end; + } m_radioGroup; + + // does this item start a radio group? + bool m_isRadioGroupStart; + + // the position of the accelerator in our label, -1 if none + int m_indexAccel; + + // the accel string (i.e. "Ctrl-Q" or "Alt-F1") + wxString m_strAccel; + + // the position and height of the displayed item + wxCoord m_posY, + m_height; + +private: + DECLARE_DYNAMIC_CLASS(wxMenuItem) +}; + +#endif // _WX_UNIV_MENUITEM_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/notebook.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/notebook.h new file mode 100644 index 0000000000..2c7a161c1f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/notebook.h @@ -0,0 +1,251 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/notebook.h +// Purpose: universal version of wxNotebook +// Author: Vadim Zeitlin +// Modified by: +// Created: 01.02.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_NOTEBOOK_H_ +#define _WX_UNIV_NOTEBOOK_H_ + +#include "wx/arrstr.h" + +class WXDLLIMPEXP_FWD_CORE wxSpinButton; + +// ---------------------------------------------------------------------------- +// the actions supported by this control +// ---------------------------------------------------------------------------- + +// change the page: to the next/previous/given one +#define wxACTION_NOTEBOOK_NEXT wxT("nexttab") +#define wxACTION_NOTEBOOK_PREV wxT("prevtab") +#define wxACTION_NOTEBOOK_GOTO wxT("gototab") + +// ---------------------------------------------------------------------------- +// wxNotebook +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase +{ +public: + // ctors and such + // -------------- + + wxNotebook() { Init(); } + + wxNotebook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr) + { + Init(); + + (void)Create(parent, id, pos, size, style, name); + } + + // quasi ctor + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxNotebookNameStr); + + // dtor + virtual ~wxNotebook(); + + // implement wxNotebookBase pure virtuals + // -------------------------------------- + + virtual int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); } + + // changes selected page without sending events + int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); } + + virtual bool SetPageText(size_t nPage, const wxString& strText); + virtual wxString GetPageText(size_t nPage) const; + + virtual int GetPageImage(size_t nPage) const; + virtual bool SetPageImage(size_t nPage, int nImage); + + virtual void SetPageSize(const wxSize& size); + virtual void SetPadding(const wxSize& padding); + virtual void SetTabSize(const wxSize& sz); + + virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; + + virtual bool DeleteAllPages(); + + virtual bool InsertPage(size_t nPage, + wxNotebookPage *pPage, + const wxString& strText, + bool bSelect = false, + int imageId = NO_IMAGE); + + // style tests + // ----------- + + // return true if all tabs have the same width + bool FixedSizeTabs() const { return HasFlag(wxNB_FIXEDWIDTH); } + + // return wxTOP/wxBOTTOM/wxRIGHT/wxLEFT + wxDirection GetTabOrientation() const; + + // return true if the notebook has tabs at the sidesand not at the top (or + // bottom) as usual + bool IsVertical() const; + + // hit testing + // ----------- + + virtual int HitTest(const wxPoint& pt, long *flags = NULL) const; + + // input handling + // -------------- + + virtual bool PerformAction(const wxControlAction& action, + long numArg = 0l, + const wxString& strArg = wxEmptyString); + + static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return GetStdInputHandler(handlerDef); + } + + // refresh the currently selected tab + void RefreshCurrent(); + +protected: + virtual wxNotebookPage *DoRemovePage(size_t nPage); + + // drawing + virtual void DoDraw(wxControlRenderer *renderer); + void DoDrawTab(wxDC& dc, const wxRect& rect, size_t n); + + // resizing + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + int DoSetSelection(size_t nPage, int flags = 0); + + // common part of all ctors + void Init(); + + // resize the tab to fit its title (and icon if any) + void ResizeTab(int page); + + // recalculate the geometry of the notebook completely + void Relayout(); + + // is the spin button currently shown? + bool HasSpinBtn() const; + + // calculate last (fully) visible tab: updates m_lastVisible + void CalcLastVisibleTab(); + + // show or hide the spin control for tabs scrolling depending on whether it + // is needed or not + void UpdateSpinBtn(); + + // position the spin button + void PositionSpinBtn(); + + // refresh the given tab only + void RefreshTab(int page, bool forceSelected = false); + + // refresh all tabs + void RefreshAllTabs(); + + // get the tab rect (inefficient, don't use this in a loop) + wxRect GetTabRect(int page) const; + + // get the rectangle containing all tabs + wxRect GetAllTabsRect() const; + + // get the part occupied by the tabs - slightly smaller than + // GetAllTabsRect() because the tabs may be indented from it + wxRect GetTabsPart() const; + + // calculate the tab size (without padding) + wxSize CalcTabSize(int page) const; + + // get the (cached) size of a tab + void GetTabSize(int page, wxCoord *w, wxCoord *h) const; + + // get the (cached) width of the tab + wxCoord GetTabWidth(int page) const + { return FixedSizeTabs() ? m_widthMax : m_widths[page]; } + + // return true if the tab has an associated image + bool HasImage(int page) const + { return HasImageList() && m_images[page] != -1; } + + // get the part of the notebook reserved for the pages (slightly larger + // than GetPageRect() as we draw a border and leave marginin between) + wxRect GetPagePart() const; + + // get the page rect in our client coords + wxRect GetPageRect() const; + + // get our client size from the page size + wxSize GetSizeForPage(const wxSize& size) const; + + // scroll the tabs so that the first page shown becomes the given one + void ScrollTo(size_t page); + + // scroll the tabs so that the first page shown becomes the given one + void ScrollLastTo(size_t page); + + // the pages titles + wxArrayString m_titles; + + // the spin button to change the pages + wxSpinButton *m_spinbtn; + + // the offset of the first page shown (may be changed with m_spinbtn) + wxCoord m_offset; + + // the first and last currently visible tabs: the name is not completely + // accurate as m_lastVisible is, in fact, the first tab which is *not* + // visible: so the visible tabs are those with indexes such that + // m_firstVisible <= n < m_lastVisible + size_t m_firstVisible, + m_lastVisible; + + // the last fully visible item, usually just m_lastVisible - 1 but may be + // different from it + size_t m_lastFullyVisible; + + // the height of tabs in a normal notebook or the width of tabs in a + // notebook with tabs on a side + wxCoord m_heightTab; + + // the biggest height (or width) of a notebook tab (used only if + // FixedSizeTabs()) or -1 if not calculated yet + wxCoord m_widthMax; + + // the cached widths (or heights) of tabs + wxArrayInt m_widths; + + // the icon indices + wxArrayInt m_images; + + // the accel indexes for labels + wxArrayInt m_accels; + + // the padding + wxSize m_sizePad; + + DECLARE_DYNAMIC_CLASS(wxNotebook) +}; + +#endif // _WX_UNIV_NOTEBOOK_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/panel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/panel.h new file mode 100644 index 0000000000..626a6c3577 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/panel.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/panel.h +// Purpose: wxUniversal-specific wxPanel class. +// Author: Vadim Zeitlin +// Created: 2011-03-18 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_PANEL_H_ +#define _WX_UNIV_PANEL_H_ + +// ---------------------------------------------------------------------------- +// wxPanel +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase +{ +public: + wxPanel() { } + + wxPanel(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, + const wxString& name = wxPanelNameStr) + { + Create(parent, winid, pos, size, style, name); + } + + virtual bool IsCanvasWindow() const { return true; } + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_CONSTRUCTOR( + wxPanel(wxWindow *parent, + int x, int y, int width, int height, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, + const wxString& name = wxPanelNameStr) + { + Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name); + } + ) +#endif // WXWIN_COMPATIBILITY_2_8 + +private: + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel); +}; + +#endif // _WX_UNIV_PANEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/radiobox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/radiobox.h new file mode 100644 index 0000000000..a0e3fd9832 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/radiobox.h @@ -0,0 +1,152 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/radiobox.h +// Purpose: wxRadioBox declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 11.09.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_RADIOBOX_H_ +#define _WX_UNIV_RADIOBOX_H_ + +class WXDLLIMPEXP_FWD_CORE wxRadioButton; + +#include "wx/statbox.h" +#include "wx/dynarray.h" + +WX_DEFINE_EXPORTED_ARRAY_PTR(wxRadioButton *, wxArrayRadioButtons); + +// ---------------------------------------------------------------------------- +// wxRadioBox: a box full of radio buttons +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRadioBox : public wxStaticBox, + public wxRadioBoxBase +{ +public: + // wxRadioBox construction + wxRadioBox() { Init(); } + + wxRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString *choices = NULL, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, n, choices, + majorDim, style, val, name); + } + wxRadioBox(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString *choices = NULL, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + int majorDim = 0, + long style = wxRA_SPECIFY_COLS, + const wxValidator& val = wxDefaultValidator, + const wxString& name = wxRadioBoxNameStr); + + virtual ~wxRadioBox(); + + // implement wxRadioBox interface + virtual void SetSelection(int n); + virtual int GetSelection() const; + + virtual unsigned int GetCount() const + { return (unsigned int)m_buttons.GetCount(); } + + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& label); + + virtual bool Enable(unsigned int n, bool enable = true); + virtual bool Show(unsigned int n, bool show = true); + + virtual bool IsItemEnabled(unsigned int n) const; + virtual bool IsItemShown(unsigned int n) const; + + // we also override the wxControl methods to avoid virtual function hiding + virtual bool Enable(bool enable = true); + virtual bool Show(bool show = true); + virtual wxString GetLabel() const; + virtual void SetLabel(const wxString& label); + + // we inherit a version always returning false from wxStaticBox, override + // it to behave normally + virtual bool AcceptsFocus() const { return wxControl::AcceptsFocus(); } + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip( wxToolTip *tip ); +#endif // wxUSE_TOOLTIPS + + // wxUniversal-only methods + + // another Append() version + void Append(int n, const wxString *choices); + + // implementation only: called by wxRadioHookHandler + void OnRadioButton(wxEvent& event); + bool OnKeyDown(wxKeyEvent& event); + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // override the base class methods dealing with window positioning/sizing + // as we must move/size the buttons as well + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual wxSize DoGetBestClientSize() const; + + // generate a radiobutton click event for the current item + void SendRadioEvent(); + + // common part of all ctors + void Init(); + + // calculate the max size of all buttons + wxSize GetMaxButtonSize() const; + + // the currently selected radio button or -1 + int m_selection; + + // all radio buttons + wxArrayRadioButtons m_buttons; + + // the event handler which is used to translate radiobutton events into + // radiobox one + wxEvtHandler *m_evtRadioHook; + +private: + DECLARE_DYNAMIC_CLASS(wxRadioBox) +}; + +#endif // _WX_UNIV_RADIOBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/radiobut.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/radiobut.h new file mode 100644 index 0000000000..d7423d0c07 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/radiobut.h @@ -0,0 +1,77 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/radiobut.h +// Purpose: wxRadioButton declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 10.09.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_RADIOBUT_H_ +#define _WX_UNIV_RADIOBUT_H_ + +#include "wx/checkbox.h" + +// ---------------------------------------------------------------------------- +// wxRadioButton +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRadioButton : public wxCheckBox +{ +public: + // constructors + wxRadioButton() { Init(); } + + wxRadioButton(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr) + { + Init(); + + Create(parent, id, label, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxRadioButtonNameStr); + + // override some base class methods + virtual void ChangeValue(bool value); + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // implement our own drawing + virtual void DoDraw(wxControlRenderer *renderer); + + // we use the radio button bitmaps for size calculation + virtual wxSize GetBitmapSize() const; + + // the radio button can only be cleared using this method, not + // ChangeValue() above - and it is protected as it can only be called by + // another radiobutton + void ClearValue(); + + // called when the radio button becomes checked: we clear all the buttons + // in the same group with us here + virtual void OnCheck(); + + // send event about radio button selection + virtual void SendEvent(); + +private: + DECLARE_DYNAMIC_CLASS(wxRadioButton) +}; + +#endif // _WX_UNIV_RADIOBUT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/renderer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/renderer.h new file mode 100644 index 0000000000..46f31682cf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/renderer.h @@ -0,0 +1,926 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/renderer.h +// Purpose: wxRenderer class declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_RENDERER_H_ +#define _WX_UNIV_RENDERER_H_ + +/* + wxRenderer class is used to draw all wxWidgets controls. This is an ABC and + the look of the application is determined by the concrete derivation of + wxRenderer used in the program. + + It also contains a few static methods which may be used by the concrete + renderers and provide the functionality which is often similar or identical + in all renderers (using inheritance here would be more restrictive as the + given concrete renderer may need an arbitrary subset of the base class + methods). + + Finally note that wxRenderer supersedes wxRendererNative in wxUniv build and + includes the latters functionality (which it may delegate to the generic + implementation of the latter or reimplement itself). + */ + +#include "wx/renderer.h" + +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxCheckListBox; + +#if wxUSE_LISTBOX + class WXDLLIMPEXP_FWD_CORE wxListBox; +#endif // wxUSE_LISTBOX + +#if wxUSE_MENUS + class WXDLLIMPEXP_FWD_CORE wxMenu; + class WXDLLIMPEXP_FWD_CORE wxMenuGeometryInfo; +#endif // wxUSE_MENUS + +class WXDLLIMPEXP_FWD_CORE wxScrollBar; + +#if wxUSE_TEXTCTRL + class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +#endif + +#if wxUSE_GAUGE + class WXDLLIMPEXP_FWD_CORE wxGauge; +#endif // wxUSE_GAUGE + +#include "wx/string.h" +#include "wx/gdicmn.h" +#include "wx/icon.h" + +// helper class used by wxMenu-related functions +class WXDLLIMPEXP_CORE wxMenuGeometryInfo +{ +public: + // get the total size of the menu + virtual wxSize GetSize() const = 0; + + virtual ~wxMenuGeometryInfo(); +}; + +// ---------------------------------------------------------------------------- +// wxRenderer: abstract renderers interface +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRenderer : public wxDelegateRendererNative +{ +public: + // drawing functions + // ----------------- + + // draw the controls background + virtual void DrawBackground(wxDC& dc, + const wxColour& col, + const wxRect& rect, + int flags, + wxWindow *window = NULL) = 0; + + // draw the button surface + virtual void DrawButtonSurface(wxDC& dc, + const wxColour& col, + const wxRect& rect, + int flags) = 0; + + // draw the label inside the given rectangle with the specified alignment + // and optionally emphasize the character with the given index + virtual void DrawLabel(wxDC& dc, + const wxString& label, + const wxRect& rect, + int flags = 0, + int alignment = wxALIGN_LEFT | wxALIGN_TOP, + int indexAccel = -1, + wxRect *rectBounds = NULL) = 0; + + // same but also draw a bitmap if it is valid + virtual void DrawButtonLabel(wxDC& dc, + const wxString& label, + const wxBitmap& image, + const wxRect& rect, + int flags = 0, + int alignment = wxALIGN_LEFT | wxALIGN_TOP, + int indexAccel = -1, + wxRect *rectBounds = NULL) = 0; + + + // draw the border and optionally return the rectangle containing the + // region inside the border + virtual void DrawBorder(wxDC& dc, + wxBorder border, + const wxRect& rect, + int flags = 0, + wxRect *rectIn = NULL) = 0; + + // draw text control border (I hate to have a separate method for this but + // it is needed to accommodate GTK+) + virtual void DrawTextBorder(wxDC& dc, + wxBorder border, + const wxRect& rect, + int flags = 0, + wxRect *rectIn = NULL) = 0; + + // draw push button border and return the rectangle left for the label + virtual void DrawButtonBorder(wxDC& dc, + const wxRect& rect, + int flags = 0, + wxRect *rectIn = NULL) = 0; + + // draw a horizontal line + virtual void DrawHorizontalLine(wxDC& dc, + wxCoord y, wxCoord x1, wxCoord x2) = 0; + + // draw a vertical line + virtual void DrawVerticalLine(wxDC& dc, + wxCoord x, wxCoord y1, wxCoord y2) = 0; + + // draw a frame with the label (horizontal alignment can be specified) + virtual void DrawFrame(wxDC& dc, + const wxString& label, + const wxRect& rect, + int flags = 0, + int alignment = wxALIGN_LEFT, + int indexAccel = -1) = 0; + + // draw an arrow in the given direction + virtual void DrawArrow(wxDC& dc, + wxDirection dir, + const wxRect& rect, + int flags = 0) = 0; + + // draw a scrollbar arrow (may be the same as arrow but may be not) + virtual void DrawScrollbarArrow(wxDC& dc, + wxDirection dir, + const wxRect& rect, + int flags = 0) = 0; + + // draw the scrollbar thumb + virtual void DrawScrollbarThumb(wxDC& dc, + wxOrientation orient, + const wxRect& rect, + int flags = 0) = 0; + + // draw a (part of) scrollbar shaft + virtual void DrawScrollbarShaft(wxDC& dc, + wxOrientation orient, + const wxRect& rect, + int flags = 0) = 0; + + // draw the rectangle in the corner between two scrollbars + virtual void DrawScrollCorner(wxDC& dc, + const wxRect& rect) = 0; + + // draw an item of a wxListBox + virtual void DrawItem(wxDC& dc, + const wxString& label, + const wxRect& rect, + int flags = 0) = 0; + + // draw an item of a wxCheckListBox + virtual void DrawCheckItem(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags = 0) = 0; + + // draw a checkbutton (bitmap may be invalid to use default one) + virtual void DrawCheckButton(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags = 0, + wxAlignment align = wxALIGN_LEFT, + int indexAccel = -1) = 0; + + // draw a radio button + virtual void DrawRadioButton(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags = 0, + wxAlignment align = wxALIGN_LEFT, + int indexAccel = -1) = 0; + +#if wxUSE_TOOLBAR + // draw a toolbar button (label may be empty, bitmap may be invalid, if + // both conditions are true this function draws a separator) + virtual void DrawToolBarButton(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags = 0, + long style = 0, + int tbarStyle = 0) = 0; +#endif // wxUSE_TOOLBAR + +#if wxUSE_TEXTCTRL + // draw a (part of) line in the text control + virtual void DrawTextLine(wxDC& dc, + const wxString& text, + const wxRect& rect, + int selStart = -1, + int selEnd = -1, + int flags = 0) = 0; + + // draw a line wrap indicator + virtual void DrawLineWrapMark(wxDC& dc, const wxRect& rect) = 0; +#endif // wxUSE_TEXTCTRL + +#if wxUSE_NOTEBOOK + // draw a notebook tab + virtual void DrawTab(wxDC& dc, + const wxRect& rect, + wxDirection dir, + const wxString& label, + const wxBitmap& bitmap = wxNullBitmap, + int flags = 0, + int indexAccel = -1) = 0; +#endif // wxUSE_NOTEBOOK + +#if wxUSE_SLIDER + + // draw the slider shaft + virtual void DrawSliderShaft(wxDC& dc, + const wxRect& rect, + int lenThumb, + wxOrientation orient, + int flags = 0, + long style = 0, + wxRect *rectShaft = NULL) = 0; + + // draw the slider thumb + virtual void DrawSliderThumb(wxDC& dc, + const wxRect& rect, + wxOrientation orient, + int flags = 0, + long style = 0) = 0; + + // draw the slider ticks + virtual void DrawSliderTicks(wxDC& dc, + const wxRect& rect, + int lenThumb, + wxOrientation orient, + int start, + int end, + int step = 1, + int flags = 0, + long style = 0) = 0; +#endif // wxUSE_SLIDER + +#if wxUSE_MENUS + // draw a menu bar item + virtual void DrawMenuBarItem(wxDC& dc, + const wxRect& rect, + const wxString& label, + int flags = 0, + int indexAccel = -1) = 0; + + // draw a menu item (also used for submenus if flags has ISSUBMENU flag) + // + // the geometryInfo is calculated by GetMenuGeometry() function from below + virtual void DrawMenuItem(wxDC& dc, + wxCoord y, + const wxMenuGeometryInfo& geometryInfo, + const wxString& label, + const wxString& accel, + const wxBitmap& bitmap = wxNullBitmap, + int flags = 0, + int indexAccel = -1) = 0; + + // draw a menu bar separator + virtual void DrawMenuSeparator(wxDC& dc, + wxCoord y, + const wxMenuGeometryInfo& geomInfo) = 0; +#endif // wxUSE_MENUS + +#if wxUSE_STATUSBAR + // draw a status bar field: wxCONTROL_ISDEFAULT bit in the flags is + // interpreted specially and means "draw the status bar grip" here + virtual void DrawStatusField(wxDC& dc, + const wxRect& rect, + const wxString& label, + int flags = 0, int style = 0) = 0; +#endif // wxUSE_STATUSBAR + + // draw complete frame/dialog titlebar + virtual void DrawFrameTitleBar(wxDC& dc, + const wxRect& rect, + const wxString& title, + const wxIcon& icon, + int flags, + int specialButton = 0, + int specialButtonFlags = 0) = 0; + + // draw frame borders + virtual void DrawFrameBorder(wxDC& dc, + const wxRect& rect, + int flags) = 0; + + // draw frame titlebar background + virtual void DrawFrameBackground(wxDC& dc, + const wxRect& rect, + int flags) = 0; + + // draw frame title + virtual void DrawFrameTitle(wxDC& dc, + const wxRect& rect, + const wxString& title, + int flags) = 0; + + // draw frame icon + virtual void DrawFrameIcon(wxDC& dc, + const wxRect& rect, + const wxIcon& icon, + int flags) = 0; + + // draw frame buttons + virtual void DrawFrameButton(wxDC& dc, + wxCoord x, wxCoord y, + int button, + int flags = 0) = 0; + + // misc functions + // -------------- + +#if wxUSE_COMBOBOX + // return the bitmaps to use for combobox button + virtual void GetComboBitmaps(wxBitmap *bmpNormal, + wxBitmap *bmpFocus, + wxBitmap *bmpPressed, + wxBitmap *bmpDisabled) = 0; +#endif // wxUSE_COMBOBOX + + // geometry functions + // ------------------ + + // get the dimensions of the border: rect.x/y contain the width/height of + // the left/top side, width/heigh - of the right/bottom one + virtual wxRect GetBorderDimensions(wxBorder border) const = 0; + + // the scrollbars may be drawn either inside the window border or outside + // it - this function is used to decide how to draw them + virtual bool AreScrollbarsInsideBorder() const = 0; + + // adjust the size of the control of the given class: for most controls, + // this just takes into account the border, but for some (buttons, for + // example) it is more complicated - the result being, in any case, that + // the control looks "nice" if it uses the adjusted rectangle + virtual void AdjustSize(wxSize *size, const wxWindow *window) = 0; + +#if wxUSE_SCROLLBAR + // get the size of a scrollbar arrow + virtual wxSize GetScrollbarArrowSize() const = 0; +#endif // wxUSE_SCROLLBAR + + // get the height of a listbox item from the base font height + virtual wxCoord GetListboxItemHeight(wxCoord fontHeight) = 0; + + // get the size of a checkbox/radio button bitmap + virtual wxSize GetCheckBitmapSize() const = 0; + virtual wxSize GetRadioBitmapSize() const = 0; + virtual wxCoord GetCheckItemMargin() const = 0; + +#if wxUSE_TOOLBAR + // get the standard size of a toolbar button and also return the size of + // a toolbar separator in the provided pointer + virtual wxSize GetToolBarButtonSize(wxCoord *separator) const = 0; + + // get the margins between/around the toolbar buttons + virtual wxSize GetToolBarMargin() const = 0; +#endif // wxUSE_TOOLBAR + +#if wxUSE_TEXTCTRL + // convert between text rectangle and client rectangle for text controls: + // the former is typicall smaller to leave margins around text + virtual wxRect GetTextTotalArea(const wxTextCtrl *text, + const wxRect& rectText) const = 0; + + // extra space is for line indicators + virtual wxRect GetTextClientArea(const wxTextCtrl *text, + const wxRect& rectTotal, + wxCoord *extraSpaceBeyond) const = 0; +#endif // wxUSE_TEXTCTRL + +#if wxUSE_NOTEBOOK + // get the overhang of a selected tab + virtual wxSize GetTabIndent() const = 0; + + // get the padding around the text in a tab + virtual wxSize GetTabPadding() const = 0; +#endif // wxUSE_NOTEBOOK + +#if wxUSE_SLIDER + // get the default size of the slider in lesser dimension (i.e. height of a + // horizontal slider or width of a vertical one) + virtual wxCoord GetSliderDim() const = 0; + + // get the length of the slider ticks displayed along side slider + virtual wxCoord GetSliderTickLen() const = 0; + + // get the slider shaft rect from the total slider rect + virtual wxRect GetSliderShaftRect(const wxRect& rect, + int lenThumb, + wxOrientation orient, + long style = 0) const = 0; + + // get the size of the slider thumb for the given total slider rect + virtual wxSize GetSliderThumbSize(const wxRect& rect, + int lenThumb, + wxOrientation orient) const = 0; +#endif // wxUSE_SLIDER + + // get the size of one progress bar step (in horz and vertical directions) + virtual wxSize GetProgressBarStep() const = 0; + +#if wxUSE_MENUS + // get the size of rectangle to use in the menubar for the given text rect + virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const = 0; + + // get the struct storing all layout info needed to draw all menu items + // (this can't be calculated for each item separately as they should be + // aligned) + // + // the returned pointer must be deleted by the caller + virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win, + const wxMenu& menu) const = 0; +#endif // wxUSE_MENUS + +#if wxUSE_STATUSBAR + // get the borders around the status bar fields (x and y fields of the + // return value) + virtual wxSize GetStatusBarBorders() const = 0; + + // get the border between the status bar fields + virtual wxCoord GetStatusBarBorderBetweenFields() const = 0; + + // get the mergin between a field and its border + virtual wxSize GetStatusBarFieldMargins() const = 0; +#endif // wxUSE_STATUSBAR + + // get client area rectangle of top level window (i.e. subtract + // decorations from given rectangle) + virtual wxRect GetFrameClientArea(const wxRect& rect, int flags) const = 0; + + // get size of whole top level window, given size of its client area size + virtual wxSize GetFrameTotalSize(const wxSize& clientSize, int flags) const = 0; + + // get the minimal size of top level window + virtual wxSize GetFrameMinSize(int flags) const = 0; + + // get titlebar icon size + virtual wxSize GetFrameIconSize() const = 0; + + // returns one of wxHT_TOPLEVEL_XXX constants + virtual int HitTestFrame(const wxRect& rect, + const wxPoint& pt, + int flags = 0) const = 0; + + // virtual dtor for any base class + virtual ~wxRenderer(); +}; + +// ---------------------------------------------------------------------------- +// wxDelegateRenderer: it is impossible to inherit from any of standard +// renderers as their declarations are in private code, but you can use this +// class to override only some of the Draw() functions - all the other ones +// will be left to the original renderer +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDelegateRenderer : public wxRenderer +{ +public: + wxDelegateRenderer(wxRenderer *renderer) : m_renderer(renderer) { } + + virtual void DrawBackground(wxDC& dc, + const wxColour& col, + const wxRect& rect, + int flags, + wxWindow *window = NULL ) + { m_renderer->DrawBackground(dc, col, rect, flags, window ); } + virtual void DrawButtonSurface(wxDC& dc, + const wxColour& col, + const wxRect& rect, + int flags) + { m_renderer->DrawButtonSurface(dc, col, rect, flags); } + virtual void DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0) + { m_renderer->DrawFocusRect(win, dc, rect, flags); } + virtual void DrawLabel(wxDC& dc, + const wxString& label, + const wxRect& rect, + int flags = 0, + int align = wxALIGN_LEFT | wxALIGN_TOP, + int indexAccel = -1, + wxRect *rectBounds = NULL) + { m_renderer->DrawLabel(dc, label, rect, + flags, align, indexAccel, rectBounds); } + virtual void DrawButtonLabel(wxDC& dc, + const wxString& label, + const wxBitmap& image, + const wxRect& rect, + int flags = 0, + int align = wxALIGN_LEFT | wxALIGN_TOP, + int indexAccel = -1, + wxRect *rectBounds = NULL) + { m_renderer->DrawButtonLabel(dc, label, image, rect, + flags, align, indexAccel, rectBounds); } + virtual void DrawBorder(wxDC& dc, + wxBorder border, + const wxRect& rect, + int flags = 0, + wxRect *rectIn = NULL) + { m_renderer->DrawBorder(dc, border, rect, flags, rectIn); } + virtual void DrawTextBorder(wxDC& dc, + wxBorder border, + const wxRect& rect, + int flags = 0, + wxRect *rectIn = NULL) + { m_renderer->DrawTextBorder(dc, border, rect, flags, rectIn); } + virtual void DrawButtonBorder(wxDC& dc, + const wxRect& rect, + int flags = 0, + wxRect *rectIn = NULL) + { m_renderer->DrawButtonBorder(dc, rect, flags, rectIn); } + virtual void DrawFrame(wxDC& dc, + const wxString& label, + const wxRect& rect, + int flags = 0, + int align = wxALIGN_LEFT, + int indexAccel = -1) + { m_renderer->DrawFrame(dc, label, rect, flags, align, indexAccel); } + virtual void DrawHorizontalLine(wxDC& dc, + wxCoord y, wxCoord x1, wxCoord x2) + { m_renderer->DrawHorizontalLine(dc, y, x1, x2); } + virtual void DrawVerticalLine(wxDC& dc, + wxCoord x, wxCoord y1, wxCoord y2) + { m_renderer->DrawVerticalLine(dc, x, y1, y2); } + virtual void DrawArrow(wxDC& dc, + wxDirection dir, + const wxRect& rect, + int flags = 0) + { m_renderer->DrawArrow(dc, dir, rect, flags); } + virtual void DrawScrollbarArrow(wxDC& dc, + wxDirection dir, + const wxRect& rect, + int flags = 0) + { m_renderer->DrawScrollbarArrow(dc, dir, rect, flags); } + virtual void DrawScrollbarThumb(wxDC& dc, + wxOrientation orient, + const wxRect& rect, + int flags = 0) + { m_renderer->DrawScrollbarThumb(dc, orient, rect, flags); } + virtual void DrawScrollbarShaft(wxDC& dc, + wxOrientation orient, + const wxRect& rect, + int flags = 0) + { m_renderer->DrawScrollbarShaft(dc, orient, rect, flags); } + virtual void DrawScrollCorner(wxDC& dc, + const wxRect& rect) + { m_renderer->DrawScrollCorner(dc, rect); } + virtual void DrawItem(wxDC& dc, + const wxString& label, + const wxRect& rect, + int flags = 0) + { m_renderer->DrawItem(dc, label, rect, flags); } + virtual void DrawCheckItem(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags = 0) + { m_renderer->DrawCheckItem(dc, label, bitmap, rect, flags); } + virtual void DrawCheckButton(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags = 0, + wxAlignment align = wxALIGN_LEFT, + int indexAccel = -1) + { m_renderer->DrawCheckButton(dc, label, bitmap, rect, + flags, align, indexAccel); } + virtual void DrawRadioButton(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags = 0, + wxAlignment align = wxALIGN_LEFT, + int indexAccel = -1) + { m_renderer->DrawRadioButton(dc, label, bitmap, rect, + flags, align, indexAccel); } +#if wxUSE_TOOLBAR + virtual void DrawToolBarButton(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags = 0, + long style = 0, + int tbarStyle = 0) + { m_renderer->DrawToolBarButton(dc, label, bitmap, rect, flags, style, tbarStyle); } +#endif // wxUSE_TOOLBAR + +#if wxUSE_TEXTCTRL + virtual void DrawTextLine(wxDC& dc, + const wxString& text, + const wxRect& rect, + int selStart = -1, + int selEnd = -1, + int flags = 0) + { m_renderer->DrawTextLine(dc, text, rect, selStart, selEnd, flags); } + virtual void DrawLineWrapMark(wxDC& dc, const wxRect& rect) + { m_renderer->DrawLineWrapMark(dc, rect); } +#endif // wxUSE_TEXTCTRL + +#if wxUSE_NOTEBOOK + virtual void DrawTab(wxDC& dc, + const wxRect& rect, + wxDirection dir, + const wxString& label, + const wxBitmap& bitmap = wxNullBitmap, + int flags = 0, + int accel = -1) + { m_renderer->DrawTab(dc, rect, dir, label, bitmap, flags, accel); } +#endif // wxUSE_NOTEBOOK + +#if wxUSE_SLIDER + + virtual void DrawSliderShaft(wxDC& dc, + const wxRect& rect, + int lenThumb, + wxOrientation orient, + int flags = 0, + long style = 0, + wxRect *rectShaft = NULL) + { m_renderer->DrawSliderShaft(dc, rect, lenThumb, orient, flags, style, rectShaft); } + virtual void DrawSliderThumb(wxDC& dc, + const wxRect& rect, + wxOrientation orient, + int flags = 0, + long style = 0) + { m_renderer->DrawSliderThumb(dc, rect, orient, flags, style); } + virtual void DrawSliderTicks(wxDC& dc, + const wxRect& rect, + int lenThumb, + wxOrientation orient, + int start, + int end, + int WXUNUSED(step) = 1, + int flags = 0, + long style = 0) + { m_renderer->DrawSliderTicks(dc, rect, lenThumb, orient, + start, end, start, flags, style); } +#endif // wxUSE_SLIDER + +#if wxUSE_MENUS + virtual void DrawMenuBarItem(wxDC& dc, + const wxRect& rect, + const wxString& label, + int flags = 0, + int indexAccel = -1) + { m_renderer->DrawMenuBarItem(dc, rect, label, flags, indexAccel); } + virtual void DrawMenuItem(wxDC& dc, + wxCoord y, + const wxMenuGeometryInfo& gi, + const wxString& label, + const wxString& accel, + const wxBitmap& bitmap = wxNullBitmap, + int flags = 0, + int indexAccel = -1) + { m_renderer->DrawMenuItem(dc, y, gi, label, accel, + bitmap, flags, indexAccel); } + virtual void DrawMenuSeparator(wxDC& dc, + wxCoord y, + const wxMenuGeometryInfo& geomInfo) + { m_renderer->DrawMenuSeparator(dc, y, geomInfo); } +#endif // wxUSE_MENUS + +#if wxUSE_STATUSBAR + virtual void DrawStatusField(wxDC& dc, + const wxRect& rect, + const wxString& label, + int flags = 0, int style = 0) + { m_renderer->DrawStatusField(dc, rect, label, flags, style); } +#endif // wxUSE_STATUSBAR + + virtual void DrawFrameTitleBar(wxDC& dc, + const wxRect& rect, + const wxString& title, + const wxIcon& icon, + int flags, + int specialButton = 0, + int specialButtonFlag = 0) + { m_renderer->DrawFrameTitleBar(dc, rect, title, icon, flags, + specialButton, specialButtonFlag); } + virtual void DrawFrameBorder(wxDC& dc, + const wxRect& rect, + int flags) + { m_renderer->DrawFrameBorder(dc, rect, flags); } + virtual void DrawFrameBackground(wxDC& dc, + const wxRect& rect, + int flags) + { m_renderer->DrawFrameBackground(dc, rect, flags); } + virtual void DrawFrameTitle(wxDC& dc, + const wxRect& rect, + const wxString& title, + int flags) + { m_renderer->DrawFrameTitle(dc, rect, title, flags); } + virtual void DrawFrameIcon(wxDC& dc, + const wxRect& rect, + const wxIcon& icon, + int flags) + { m_renderer->DrawFrameIcon(dc, rect, icon, flags); } + virtual void DrawFrameButton(wxDC& dc, + wxCoord x, wxCoord y, + int button, + int flags = 0) + { m_renderer->DrawFrameButton(dc, x, y, button, flags); } + +#if wxUSE_COMBOBOX + virtual void GetComboBitmaps(wxBitmap *bmpNormal, + wxBitmap *bmpFocus, + wxBitmap *bmpPressed, + wxBitmap *bmpDisabled) + { m_renderer->GetComboBitmaps(bmpNormal, bmpFocus, + bmpPressed, bmpDisabled); } +#endif // wxUSE_COMBOBOX + + virtual void AdjustSize(wxSize *size, const wxWindow *window) + { m_renderer->AdjustSize(size, window); } + virtual wxRect GetBorderDimensions(wxBorder border) const + { return m_renderer->GetBorderDimensions(border); } + virtual bool AreScrollbarsInsideBorder() const + { return m_renderer->AreScrollbarsInsideBorder(); } + +#if wxUSE_SCROLLBAR + virtual wxSize GetScrollbarArrowSize() const + { return m_renderer->GetScrollbarArrowSize(); } +#endif // wxUSE_SCROLLBAR + + virtual wxCoord GetListboxItemHeight(wxCoord fontHeight) + { return m_renderer->GetListboxItemHeight(fontHeight); } + virtual wxSize GetCheckBitmapSize() const + { return m_renderer->GetCheckBitmapSize(); } + virtual wxSize GetRadioBitmapSize() const + { return m_renderer->GetRadioBitmapSize(); } + virtual wxCoord GetCheckItemMargin() const + { return m_renderer->GetCheckItemMargin(); } + +#if wxUSE_TOOLBAR + virtual wxSize GetToolBarButtonSize(wxCoord *separator) const + { return m_renderer->GetToolBarButtonSize(separator); } + virtual wxSize GetToolBarMargin() const + { return m_renderer->GetToolBarMargin(); } +#endif // wxUSE_TOOLBAR + +#if wxUSE_TEXTCTRL + virtual wxRect GetTextTotalArea(const wxTextCtrl *text, + const wxRect& rect) const + { return m_renderer->GetTextTotalArea(text, rect); } + virtual wxRect GetTextClientArea(const wxTextCtrl *text, + const wxRect& rect, + wxCoord *extraSpaceBeyond) const + { return m_renderer->GetTextClientArea(text, rect, extraSpaceBeyond); } +#endif // wxUSE_TEXTCTRL + +#if wxUSE_NOTEBOOK + virtual wxSize GetTabIndent() const { return m_renderer->GetTabIndent(); } + virtual wxSize GetTabPadding() const { return m_renderer->GetTabPadding(); } +#endif // wxUSE_NOTEBOOK + +#if wxUSE_SLIDER + virtual wxCoord GetSliderDim() const + { return m_renderer->GetSliderDim(); } + virtual wxCoord GetSliderTickLen() const + { return m_renderer->GetSliderTickLen(); } + + virtual wxRect GetSliderShaftRect(const wxRect& rect, + int lenThumb, + wxOrientation orient, + long style = 0) const + { return m_renderer->GetSliderShaftRect(rect, lenThumb, orient, style); } + virtual wxSize GetSliderThumbSize(const wxRect& rect, + int lenThumb, + wxOrientation orient) const + { return m_renderer->GetSliderThumbSize(rect, lenThumb, orient); } +#endif // wxUSE_SLIDER + + virtual wxSize GetProgressBarStep() const + { return m_renderer->GetProgressBarStep(); } + +#if wxUSE_MENUS + virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const + { return m_renderer->GetMenuBarItemSize(sizeText); } + virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win, + const wxMenu& menu) const + { return m_renderer->GetMenuGeometry(win, menu); } +#endif // wxUSE_MENUS + +#if wxUSE_STATUSBAR + virtual wxSize GetStatusBarBorders() const + { return m_renderer->GetStatusBarBorders(); } + virtual wxCoord GetStatusBarBorderBetweenFields() const + { return m_renderer->GetStatusBarBorderBetweenFields(); } + virtual wxSize GetStatusBarFieldMargins() const + { return m_renderer->GetStatusBarFieldMargins(); } +#endif // wxUSE_STATUSBAR + + virtual wxRect GetFrameClientArea(const wxRect& rect, int flags) const + { return m_renderer->GetFrameClientArea(rect, flags); } + virtual wxSize GetFrameTotalSize(const wxSize& clientSize, int flags) const + { return m_renderer->GetFrameTotalSize(clientSize, flags); } + virtual wxSize GetFrameMinSize(int flags) const + { return m_renderer->GetFrameMinSize(flags); } + virtual wxSize GetFrameIconSize() const + { return m_renderer->GetFrameIconSize(); } + virtual int HitTestFrame(const wxRect& rect, + const wxPoint& pt, + int flags) const + { return m_renderer->HitTestFrame(rect, pt, flags); } + + virtual int DrawHeaderButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0, + wxHeaderSortIconType sortIcon = wxHDR_SORT_ICON_NONE, + wxHeaderButtonParams* params = NULL) + { return m_renderer->DrawHeaderButton(win, dc, rect, flags, sortIcon, params); } + virtual void DrawTreeItemButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0) + { m_renderer->DrawTreeItemButton(win, dc, rect, flags); } + +protected: + wxRenderer *m_renderer; +}; + +// ---------------------------------------------------------------------------- +// wxControlRenderer: wraps the wxRenderer functions in a form easy to use from +// OnPaint() +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxControlRenderer +{ +public: + // create a renderer for this dc with this "fundamental" renderer + wxControlRenderer(wxWindow *control, wxDC& dc, wxRenderer *renderer); + + // operations + void DrawLabel(); + void DrawButtonLabel(const wxBitmap& bitmap = wxNullBitmap, + wxCoord marginX = 0, wxCoord marginY = 0); +#if wxUSE_LISTBOX + void DrawItems(const wxListBox *listbox, + size_t itemFirst, size_t itemLast); +#endif // wxUSE_LISTBOX +#if wxUSE_CHECKLISTBOX + void DrawCheckItems(const wxCheckListBox *listbox, + size_t itemFirst, size_t itemLast); +#endif // wxUSE_CHECKLISTBOX + void DrawButtonBorder(); + // the line must be either horizontal or vertical + void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); + void DrawFrame(); + void DrawBitmap(const wxBitmap& bitmap); + void DrawBackgroundBitmap(); + void DrawScrollbar(const wxScrollBar *scrollbar, int thumbPosOld); +#if wxUSE_GAUGE + void DrawProgressBar(const wxGauge *gauge); +#endif // wxUSE_GAUGE + + // accessors + wxWindow *GetWindow() const { return m_window; } + wxRenderer *GetRenderer() const { return m_renderer; } + + wxDC& GetDC() { return m_dc; } + + const wxRect& GetRect() const { return m_rect; } + wxRect& GetRect() { return m_rect; } + + // static helpers + static void DrawBitmap(wxDC &dc, + const wxBitmap& bitmap, + const wxRect& rect, + int alignment = wxALIGN_CENTRE | + wxALIGN_CENTRE_VERTICAL, + wxStretch stretch = wxSTRETCH_NOT); + +private: + +#if wxUSE_LISTBOX + // common part of DrawItems() and DrawCheckItems() + void DoDrawItems(const wxListBox *listbox, + size_t itemFirst, size_t itemLast, + bool isCheckLbox = false); +#endif // wxUSE_LISTBOX + + wxWindow *m_window; + wxRenderer *m_renderer; + wxDC& m_dc; + wxRect m_rect; +}; + +#endif // _WX_UNIV_RENDERER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrarrow.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrarrow.h new file mode 100644 index 0000000000..6e6997c687 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrarrow.h @@ -0,0 +1,111 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/scrarrow.h +// Purpose: wxScrollArrows class +// Author: Vadim Zeitlin +// Modified by: +// Created: 22.01.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_SCRARROW_H_ +#define _WX_UNIV_SCRARROW_H_ + +// ---------------------------------------------------------------------------- +// wxScrollArrows is not a control but just a class containing the common +// functionality of scroll arrows, whether part of scrollbars, spin ctrls or +// anything else. +// +// To customize its behaviour, wxScrollArrows doesn't use any virtual methods +// but instead a callback pointer to a wxControlWithArrows object which is used +// for all control-dependent stuff. Thus, to use wxScrollArrows, you just need +// to derive from the wxControlWithArrows interface and implement its methods. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxControlWithArrows; +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxMouseEvent; +class WXDLLIMPEXP_FWD_CORE wxRect; +class WXDLLIMPEXP_FWD_CORE wxRenderer; + +// ---------------------------------------------------------------------------- +// wxScrollArrows: an abstraction of scrollbar arrow +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScrollArrows +{ +public: + enum Arrow + { + Arrow_None = -1, + Arrow_First, // left or top + Arrow_Second, // right or bottom + Arrow_Max + }; + + // ctor requires a back pointer to wxControlWithArrows + wxScrollArrows(wxControlWithArrows *control); + + // draws the arrow on the given DC in the given rectangle, uses + // wxControlWithArrows::GetArrowState() to get its current state + void DrawArrow(Arrow arrow, wxDC& dc, const wxRect& rect, + bool scrollbarLike = false) const; + + // process a mouse move, enter or leave event, possibly calling + // wxControlWithArrows::SetArrowState() if + // wxControlWithArrows::HitTestArrow() says that the mouse has left/entered + // an arrow + bool HandleMouseMove(const wxMouseEvent& event) const; + + // process a mouse click event + bool HandleMouse(const wxMouseEvent& event) const; + + // dtor + ~wxScrollArrows(); + +private: + // set or clear the wxCONTROL_CURRENT flag for the arrow + void UpdateCurrentFlag(Arrow arrow, Arrow arrowCur) const; + + // the main control + wxControlWithArrows *m_control; + + // the data for the mouse capture + struct wxScrollArrowCaptureData *m_captureData; +}; + +// ---------------------------------------------------------------------------- +// wxControlWithArrows: interface implemented by controls using wxScrollArrows +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxControlWithArrows +{ +public: + virtual ~wxControlWithArrows() {} + + // get the renderer to use for drawing the arrows + virtual wxRenderer *GetRenderer() const = 0; + + // get the controls window (used for mouse capturing) + virtual wxWindow *GetWindow() = 0; + + // get the orientation of the arrows (vertical or horizontal) + virtual bool IsVertical() const = 0; + + // get the state of this arrow as combination of wxCONTROL_XXX flags + virtual int GetArrowState(wxScrollArrows::Arrow arrow) const = 0; + + // set or clear the specified flag in the arrow state: this function is + // responsible for refreshing the control + virtual void SetArrowFlag(wxScrollArrows::Arrow arrow, + int flag, bool set = true) = 0; + + // hit testing: return on which arrow the point is (or Arrow_None) + virtual wxScrollArrows::Arrow HitTestArrow(const wxPoint& pt) const = 0; + + // called when the arrow is pressed, return true to continue scrolling and + // false to stop it + virtual bool OnArrow(wxScrollArrows::Arrow arrow) = 0; +}; + +#endif // _WX_UNIV_SCRARROW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrolbar.h new file mode 100644 index 0000000000..c82692f9fe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrolbar.h @@ -0,0 +1,282 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/scrolbar.h +// Purpose: wxScrollBar for wxUniversal +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_SCROLBAR_H_ +#define _WX_UNIV_SCROLBAR_H_ + +class WXDLLIMPEXP_FWD_CORE wxScrollTimer; + +#include "wx/univ/scrarrow.h" +#include "wx/renderer.h" + +// ---------------------------------------------------------------------------- +// the actions supported by this control +// ---------------------------------------------------------------------------- + +// scroll the bar +#define wxACTION_SCROLL_START wxT("start") // to the beginning +#define wxACTION_SCROLL_END wxT("end") // to the end +#define wxACTION_SCROLL_LINE_UP wxT("lineup") // one line up/left +#define wxACTION_SCROLL_PAGE_UP wxT("pageup") // one page up/left +#define wxACTION_SCROLL_LINE_DOWN wxT("linedown") // one line down/right +#define wxACTION_SCROLL_PAGE_DOWN wxT("pagedown") // one page down/right + +// the scrollbar thumb may be dragged +#define wxACTION_SCROLL_THUMB_DRAG wxT("thumbdrag") +#define wxACTION_SCROLL_THUMB_MOVE wxT("thumbmove") +#define wxACTION_SCROLL_THUMB_RELEASE wxT("thumbrelease") + +// ---------------------------------------------------------------------------- +// wxScrollBar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScrollBar : public wxScrollBarBase, + public wxControlWithArrows +{ +public: + // scrollbar elements: they correspond to wxHT_SCROLLBAR_XXX constants but + // start from 0 which allows to use them as array indices + enum Element + { + Element_Arrow_Line_1, + Element_Arrow_Line_2, + Element_Arrow_Page_1, + Element_Arrow_Page_2, + Element_Thumb, + Element_Bar_1, + Element_Bar_2, + Element_Max + }; + + wxScrollBar(); + wxScrollBar(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSB_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxScrollBarNameStr); + + virtual ~wxScrollBar(); + + // implement base class pure virtuals + virtual int GetThumbPosition() const; + virtual int GetThumbSize() const; + virtual int GetPageSize() const; + virtual int GetRange() const; + + virtual void SetThumbPosition(int thumbPos); + virtual void SetScrollbar(int position, int thumbSize, + int range, int pageSize, + bool refresh = true); + + // wxScrollBar actions + void ScrollToStart(); + void ScrollToEnd(); + bool ScrollLines(int nLines); + bool ScrollPages(int nPages); + + virtual bool PerformAction(const wxControlAction& action, + long numArg = 0, + const wxString& strArg = wxEmptyString); + + static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return GetStdInputHandler(handlerDef); + } + + // scrollbars around a normal window should not receive the focus + virtual bool AcceptsFocus() const; + + // wxScrollBar sub elements state (combination of wxCONTROL_XXX) + void SetState(Element which, int flags); + int GetState(Element which) const; + + // implement wxControlWithArrows methods + virtual wxRenderer *GetRenderer() const { return m_renderer; } + virtual wxWindow *GetWindow() { return this; } + virtual bool IsVertical() const { return wxScrollBarBase::IsVertical(); } + virtual int GetArrowState(wxScrollArrows::Arrow arrow) const; + virtual void SetArrowFlag(wxScrollArrows::Arrow arrow, int flag, bool set); + virtual bool OnArrow(wxScrollArrows::Arrow arrow); + virtual wxScrollArrows::Arrow HitTestArrow(const wxPoint& pt) const; + + // for wxControlRenderer::DrawScrollbar() only + const wxScrollArrows& GetArrows() const { return m_arrows; } + + // returns one of wxHT_SCROLLBAR_XXX constants + wxHitTest HitTestBar(const wxPoint& pt) const; + + // idle processing + virtual void OnInternalIdle(); + +protected: + virtual wxSize DoGetBestClientSize() const; + virtual void DoDraw(wxControlRenderer *renderer); + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // forces update of thumb's visual appearence (does nothing if m_dirty=false) + void UpdateThumb(); + + // SetThumbPosition() helper + void DoSetThumb(int thumbPos); + + // common part of all ctors + void Init(); + + // is this scrollbar attached to a window or a standalone control? + bool IsStandalone() const; + + // scrollbar geometry methods: + + // gets the bounding box for a scrollbar element for the given (by default + // - current) thumb position + wxRect GetScrollbarRect(wxScrollBar::Element elem, int thumbPos = -1) const; + + // returns the size of the scrollbar shaft excluding the arrows + wxCoord GetScrollbarSize() const; + + // translate the scrollbar position (in logical units) into physical + // coordinate (in pixels) and the other way round + wxCoord ScrollbarToPixel(int thumbPos = -1); + int PixelToScrollbar(wxCoord coord); + + // return the starting and ending positions, in pixels, of the thumb of a + // scrollbar with the given logical position, thumb size and range and the + // given physical length + static void GetScrollBarThumbSize(wxCoord length, + int thumbPos, + int thumbSize, + int range, + wxCoord *thumbStart, + wxCoord *thumbEnd); + +private: + // total range of the scrollbar in logical units + int m_range; + + // the current and previous (after last refresh - this is used for + // repainting optimisation) size of the thumb in logical units (from 0 to + // m_range) and its position (from 0 to m_range - m_thumbSize) + int m_thumbSize, + m_thumbPos, + m_thumbPosOld; + + // the page size, i.e. the number of lines by which to scroll when page + // up/down action is performed + int m_pageSize; + + // the state of the sub elements + int m_elementsState[Element_Max]; + + // the dirty flag: if set, scrollbar must be updated + bool m_dirty; + + // the object handling the arrows + wxScrollArrows m_arrows; + + friend WXDLLIMPEXP_CORE class wxControlRenderer; // for geometry methods + friend class wxStdScrollBarInputHandler; // for geometry methods + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxScrollBar) +}; + +// ---------------------------------------------------------------------------- +// Standard scrollbar input handler which can be used as a base class +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStdScrollBarInputHandler : public wxStdInputHandler +{ +public: + // constructor takes a renderer (used for scrollbar hit testing) and the + // base handler to which all unhandled events are forwarded + wxStdScrollBarInputHandler(wxRenderer *renderer, + wxInputHandler *inphand); + + virtual bool HandleKey(wxInputConsumer *consumer, + const wxKeyEvent& event, + bool pressed); + virtual bool HandleMouse(wxInputConsumer *consumer, + const wxMouseEvent& event); + virtual bool HandleMouseMove(wxInputConsumer *consumer, const wxMouseEvent& event); + + virtual ~wxStdScrollBarInputHandler(); + + // this method is called by wxScrollBarTimer only and may be overridden + // + // return true to continue scrolling, false to stop the timer + virtual bool OnScrollTimer(wxScrollBar *scrollbar, + const wxControlAction& action); + +protected: + // return true if the mouse button can be used to activate scrollbar, false + // if not (any button under GTK+ unlike left button only which is default) + virtual bool IsAllowedButton(int button) const + { return button == wxMOUSE_BTN_LEFT; } + + // set or clear the specified flag on the scrollbar element corresponding + // to m_htLast + void SetElementState(wxScrollBar *scrollbar, int flag, bool doIt); + + // [un]highlight the scrollbar element corresponding to m_htLast + virtual void Highlight(wxScrollBar *scrollbar, bool doIt) + { SetElementState(scrollbar, wxCONTROL_CURRENT, doIt); } + + // [un]press the scrollbar element corresponding to m_htLast + virtual void Press(wxScrollBar *scrollbar, bool doIt) + { SetElementState(scrollbar, wxCONTROL_PRESSED, doIt); } + + // stop scrolling because we reached the end point + void StopScrolling(wxScrollBar *scrollbar); + + // get the mouse coordinates in the scrollbar direction from the event + wxCoord GetMouseCoord(const wxScrollBar *scrollbar, + const wxMouseEvent& event) const; + + // generate a "thumb move" action for this mouse event + void HandleThumbMove(wxScrollBar *scrollbar, const wxMouseEvent& event); + + + // the window (scrollbar) which has capture or NULL and the flag telling if + // the mouse is inside the element which captured it or not + wxWindow *m_winCapture; + bool m_winHasMouse; + int m_btnCapture; // the mouse button which has captured mouse + + // the position where we started scrolling by page + wxPoint m_ptStartScrolling; + + // one of wxHT_SCROLLBAR_XXX value: where has the mouse been last time? + wxHitTest m_htLast; + + // the renderer (we use it only for hit testing) + wxRenderer *m_renderer; + + // the offset of the top/left of the scrollbar relative to the mouse to + // keep during the thumb drag + int m_ofsMouse; + + // the timer for generating scroll events when the mouse stays pressed on + // a scrollbar + wxScrollTimer *m_timerScroll; +}; + +#endif // _WX_UNIV_SCROLBAR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrthumb.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrthumb.h new file mode 100644 index 0000000000..3da2e716e4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrthumb.h @@ -0,0 +1,139 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/scrthumb.h +// Purpose: wxScrollThumb class +// Author: Vadim Zeitlin +// Modified by: +// Created: 12.02.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_SCRTHUMB_H_ +#define _WX_UNIV_SCRTHUMB_H_ + +// ---------------------------------------------------------------------------- +// wxScrollThumb is not a control but just a class containing the common +// functionality of scroll thumb such as used by scrollbars, sliders and maybe +// other (user) controls +// +// This class is similar to wxScrollThumb. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxControlWithThumb; +class WXDLLIMPEXP_FWD_CORE wxMouseEvent; +class WXDLLIMPEXP_FWD_CORE wxRect; +class WXDLLIMPEXP_FWD_CORE wxScrollTimer; + +#include "wx/timer.h" + +// ---------------------------------------------------------------------------- +// wxScrollThumb: an abstraction of scrollbar thumb +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScrollThumb +{ +public: + enum Shaft + { + Shaft_None = -1, + Shaft_Above, // or to the left of the thumb + Shaft_Below, // or to the right of the thumb + Shaft_Thumb, // on the thumb + Shaft_Max + }; + + // ctor requires a back pointer to wxControlWithThumb + wxScrollThumb(wxControlWithThumb *control); + + // process a mouse click: will capture the mouse if the button was pressed + // on either the thumb (start dragging it then) or the shaft (start + // scrolling) + bool HandleMouse(const wxMouseEvent& event) const; + + // process a mouse move + bool HandleMouseMove(const wxMouseEvent& event) const; + + // dtor + ~wxScrollThumb(); + +private: + // do we have the mouse capture? + bool HasCapture() const { return m_captureData != NULL; } + + // get the coord of this event in the direction we're interested in (y for + // vertical shaft or x for horizontal ones) + wxCoord GetMouseCoord(const wxMouseEvent& event) const; + + // get the position of the thumb corresponding to the current mouse + // position (can only be called while we're dragging the thumb!) + int GetThumbPos(const wxMouseEvent& event) const; + + // the main control + wxControlWithThumb *m_control; + + // the part of it where the mouse currently is + Shaft m_shaftPart; + + // the data for the mouse capture + struct WXDLLIMPEXP_FWD_CORE wxScrollThumbCaptureData *m_captureData; +}; + +// ---------------------------------------------------------------------------- +// wxControlWithThumb: interface implemented by controls using wxScrollThumb +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxControlWithThumb +{ +public: + virtual ~wxControlWithThumb() {} + + // simple accessors + // ---------------- + + // get the controls window (used for mouse capturing) + virtual wxWindow *GetWindow() = 0; + + // get the orientation of the shaft (vertical or horizontal) + virtual bool IsVertical() const = 0; + + // geometry functions + // ------------------ + + // hit testing: return part of the shaft the point is in (or Shaft_None) + virtual wxScrollThumb::Shaft HitTest(const wxPoint& pt) const = 0; + + // get the current position in pixels of the thumb + virtual wxCoord ThumbPosToPixel() const = 0; + + // transform from pixel offset to the thumb logical position + virtual int PixelToThumbPos(wxCoord x) const = 0; + + // callbacks + // --------- + + // set or clear the specified flag in the arrow state: this function is + // responsible for refreshing the control + virtual void SetShaftPartState(wxScrollThumb::Shaft shaftPart, + int flag, + bool set = true) = 0; + + // called when the user starts dragging the thumb + virtual void OnThumbDragStart(int pos) = 0; + + // called while the user drags the thumb + virtual void OnThumbDrag(int pos) = 0; + + // called when the user stops dragging the thumb + virtual void OnThumbDragEnd(int pos) = 0; + + // called before starting to call OnPageScroll() - gives the control the + // possibility to remember its current state + virtual void OnPageScrollStart() = 0; + + // called while the user keeps the mouse pressed above/below the thumb, + // return true to continue scrollign and false to stop it (e.g. because the + // scrollbar has reached the top/bottom) + virtual bool OnPageScroll(int pageInc) = 0; +}; + +#endif // _WX_UNIV_SCRTHUMB_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrtimer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrtimer.h new file mode 100644 index 0000000000..3d3f059dc5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/scrtimer.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/scrtimer.h +// Purpose: wxScrollTimer: small helper class for wxScrollArrow/Thumb +// Author: Vadim Zeitlin +// Modified by: +// Created: 18.02.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_SCRTIMER_H +#define _WX_UNIV_SCRTIMER_H + +// NB: this class is implemented in scrolbar.cpp + +#include "wx/defs.h" + +#if wxUSE_TIMER + +#include "wx/timer.h" + +// ---------------------------------------------------------------------------- +// wxScrollTimer: the timer used when the arrow or scrollbar shaft is kept +// pressed +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScrollTimer : public wxTimer +{ +public: + // default ctor + wxScrollTimer(); + + // start generating the events + void StartAutoScroll(); + + // the base class method + virtual void Notify(); + +protected: + // to implement in derived classes: perform the scroll action and return + // true to continue scrolling or false to stop + virtual bool DoNotify() = 0; + + // should we skip the next timer event? + bool m_skipNext; +}; + +#endif // wxUSE_TIMER + +#endif // _WX_UNIV_SCRTIMER_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/setup.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/setup.h new file mode 100644 index 0000000000..f9dc3951e3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/setup.h @@ -0,0 +1,1673 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/setup.h +// Purpose: Configuration for the universal build of the library +// Author: Julian Smart +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SETUP_H_ +#define _WX_SETUP_H_ + +/* --- start common options --- */ +// ---------------------------------------------------------------------------- +// global settings +// ---------------------------------------------------------------------------- + +// define this to 0 when building wxBase library - this can also be done from +// makefile/project file overriding the value here +#ifndef wxUSE_GUI + #define wxUSE_GUI 1 +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// compatibility settings +// ---------------------------------------------------------------------------- + +// This setting determines the compatibility with 2.6 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_6 0 + +// This setting determines the compatibility with 2.8 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_8 1 + +// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when +// default system font is used for wxWindow::GetCharWidth/Height() instead of +// the current font. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxDIALOG_UNIT_COMPATIBILITY 0 + +// ---------------------------------------------------------------------------- +// debugging settings +// ---------------------------------------------------------------------------- + +// wxDEBUG_LEVEL will be defined as 1 in wx/debug.h so normally there is no +// need to define it here. You may do it for two reasons: either completely +// disable/compile out the asserts in release version (then do it inside #ifdef +// NDEBUG) or, on the contrary, enable more asserts, including the usually +// disabled ones, in the debug build (then do it inside #ifndef NDEBUG) +// +// #ifdef NDEBUG +// #define wxDEBUG_LEVEL 0 +// #else +// #define wxDEBUG_LEVEL 2 +// #endif + +// wxHandleFatalExceptions() may be used to catch the program faults at run +// time and, instead of terminating the program with a usual GPF message box, +// call the user-defined wxApp::OnFatalException() function. If you set +// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work. +// +// This setting is for Win32 only and can only be enabled if your compiler +// supports Win32 structured exception handling (currently only VC++ does) +// +// Default is 1 +// +// Recommended setting: 1 if your compiler supports it. +#define wxUSE_ON_FATAL_EXCEPTION 1 + +// Set this to 1 to be able to generate a human-readable (unlike +// machine-readable minidump created by wxCrashReport::Generate()) stack back +// trace when your program crashes using wxStackWalker +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_STACKWALKER 1 + +// Set this to 1 to compile in wxDebugReport class which allows you to create +// and optionally upload to your web site a debug report consisting of back +// trace of the crash (if wxUSE_STACKWALKER == 1) and other information. +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, it is compiled into a separate library so there +// is no overhead if you don't use it +#define wxUSE_DEBUGREPORT 1 + +// Generic comment about debugging settings: they are very useful if you don't +// use any other memory leak detection tools such as Purify/BoundsChecker, but +// are probably redundant otherwise. Also, Visual C++ CRT has the same features +// as wxWidgets memory debugging subsystem built in since version 5.0 and you +// may prefer to use it instead of built in memory debugging code because it is +// faster and more fool proof. +// +// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG +// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0) +// and if __NO_VC_CRTDBG__ is not defined. + +// The rest of the options in this section are obsolete and not supported, +// enable them at your own risk. + +// If 1, enables wxDebugContext, for writing error messages to file, etc. If +// __WXDEBUG__ is not defined, will still use the normal memory operators. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_CONTEXT 0 + +// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF* +// __WXDEBUG__ is also defined. +// +// WARNING: this code may not work with all architectures, especially if +// alignment is an issue. This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 1 if you are not using a memory debugging tool, else 0 +#define wxUSE_MEMORY_TRACING 0 + +// In debug mode, cause new and delete to be redefined globally. +// If this causes problems (e.g. link errors which is a common problem +// especially if you use another library which also redefines the global new +// and delete), set this to 0. +// This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If +// this causes problems (e.g. link errors), set this to 0. You may need to set +// this to 0 if using templates (at least for VC++). This switch is currently +// ignored for MinGW/Cygwin. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_NEW_ALWAYS 0 + + +// ---------------------------------------------------------------------------- +// Unicode support +// ---------------------------------------------------------------------------- + +// These settings are obsolete: the library is always built in Unicode mode +// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if +// absolutely necessary -- updating it is strongly recommended as the ANSI mode +// will disappear completely in future wxWidgets releases. +#ifndef wxUSE_UNICODE + #define wxUSE_UNICODE 1 +#endif + +// wxUSE_WCHAR_T is required by wxWidgets now, don't change. +#define wxUSE_WCHAR_T 1 + +// ---------------------------------------------------------------------------- +// global features +// ---------------------------------------------------------------------------- + +// Compile library in exception-safe mode? If set to 1, the library will try to +// behave correctly in presence of exceptions (even though it still will not +// use the exceptions itself) and notify the user code about any unhandled +// exceptions. If set to 0, propagation of the exceptions through the library +// code will lead to undefined behaviour -- but the code itself will be +// slightly smaller and faster. +// +// Note that like wxUSE_THREADS this option is automatically set to 0 if +// wxNO_EXCEPTIONS is defined. +// +// Default is 1 +// +// Recommended setting: depends on whether you intend to use C++ exceptions +// in your own code (1 if you do, 0 if you don't) +#define wxUSE_EXCEPTIONS 1 + +// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI +// +// Default is 0 +// +// Recommended setting: 0 (this is still work in progress...) +#define wxUSE_EXTENDED_RTTI 0 + +// Support for message/error logging. This includes wxLogXXX() functions and +// wxLog and derived classes. Don't set this to 0 unless you really know what +// you are doing. +// +// Default is 1 +// +// Recommended setting: 1 (always) +#define wxUSE_LOG 1 + +// Recommended setting: 1 +#define wxUSE_LOGWINDOW 1 + +// Recommended setting: 1 +#define wxUSE_LOGGUI 1 + +// Recommended setting: 1 +#define wxUSE_LOG_DIALOG 1 + +// Support for command line parsing using wxCmdLineParser class. +// +// Default is 1 +// +// Recommended setting: 1 (can be set to 0 if you don't use the cmd line) +#define wxUSE_CMDLINE_PARSER 1 + +// Support for multithreaded applications: if 1, compile in thread classes +// (thread.h) and make the library a bit more thread safe. Although thread +// support is quite stable by now, you may still consider recompiling the +// library without it if you have no use for it - this will result in a +// somewhat smaller and faster operation. +// +// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset +// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in +// build/msw/config.* file this value will have no effect. +// +// Default is 1 +// +// Recommended setting: 0 unless you do plan to develop MT applications +#define wxUSE_THREADS 1 + +// If enabled, compiles wxWidgets streams classes +// +// wx stream classes are used for image IO, process IO redirection, network +// protocols implementation and much more and so disabling this results in a +// lot of other functionality being lost. +// +// Default is 1 +// +// Recommended setting: 1 as setting it to 0 disables many other things +#define wxUSE_STREAMS 1 + +// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. +// Note that if the system's implementation does not support positional +// parameters, setting this to 1 forces the use of the wxWidgets implementation +// of wxVsnprintf. The standard vsnprintf() supports positional parameters on +// many Unix systems but usually doesn't under Windows. +// +// Positional parameters are very useful when translating a program since using +// them in formatting strings allow translators to correctly reorder the +// translated sentences. +// +// Default is 1 +// +// Recommended setting: 1 if you want to support multiple languages +#define wxUSE_PRINTF_POS_PARAMS 1 + +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but is +// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets +// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under +// XP as this triggers a bug in compiler TLS support that results in crashes +// when any TLS variables are used. +// +// If you're absolutely sure that your build of wxWidgets is never going to be +// used in such situation, either because it's not going to be linked from any +// kind of plugin or because you only target Vista or later systems, you can +// set this to 2 to force the use of compiler TLS even under MSW. +// +// Default is 1 meaning that compiler TLS is used only if it's 100% safe. +// +// Recommended setting: 2 if you want to have maximal performance and don't +// care about the scenario described above. +#define wxUSE_COMPILER_TLS 1 + +// ---------------------------------------------------------------------------- +// Interoperability with the standard library. +// ---------------------------------------------------------------------------- + +// Set wxUSE_STL to 1 to enable maximal interoperability with the standard +// library, even at the cost of backwards compatibility. +// +// Default is 0 +// +// Recommended setting: 0 as the options below already provide a relatively +// good level of interoperability and changing this option arguably isn't worth +// diverging from the official builds of the library. +#define wxUSE_STL 0 + +// This is not a real option but is used as the default value for +// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library headers, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_DEFAULT 0 +#else + #define wxUSE_STD_DEFAULT 1 +#endif + +// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<> +// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but +// usually more limited) implementations are used which allows to avoid the +// dependency on the C++ run-time library. +// +// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't +// support using standard containers and that VC6 needs non-default options for +// such build to avoid getting "fatal error C1076: compiler limit : internal +// heap limit reached; use /Zm to specify a higher limit" in its own standard +// headers, so you need to ensure you do increase the heap size before enabling +// this option for this compiler. +// +// Default is 0 for compatibility reasons. +// +// Recommended setting: 1 unless compatibility with the official wxWidgets +// build and/or the existing code is a concern. +#define wxUSE_STD_CONTAINERS 0 + +// Use standard C++ streams if 1 instead of wx streams in some places. If +// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the +// standard streams library. +// +// Notice that enabling this does not replace wx streams with std streams +// everywhere, in a lot of places wx streams are used no matter what. +// +// Default is 1 if compiler supports it. +// +// Recommended setting: 1 if you use the standard streams anyhow and so +// dependency on the standard streams library is not a +// problem +#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT + +// Enable minimal interoperability with the standard C++ string class if 1. +// "Minimal" means that wxString can be constructed from std::string or +// std::wstring but can't be implicitly converted to them. You need to enable +// the option below for the latter. +// +// Default is 1 for most compilers. +// +// Recommended setting: 1 unless you want to ensure your program doesn't use +// the standard C++ library at all. +#define wxUSE_STD_STRING wxUSE_STD_DEFAULT + +// Make wxString as much interchangeable with std::[w]string as possible, in +// particular allow implicit conversion of wxString to either of these classes. +// This comes at a price (or a benefit, depending on your point of view) of not +// allowing implicit conversion to "const char *" and "const wchar_t *". +// +// Because a lot of existing code relies on these conversions, this option is +// disabled by default but can be enabled for your build if you don't care +// about compatibility. +// +// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled. +// +// Recommended setting: 0 to remain compatible with the official builds of +// wxWidgets. +#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL + +// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix +// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>. +// +// Note that newer compilers (including VC++ 7.1 and later) don't support +// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow. +// +// Default is 0. +// +// Recommended setting: 0, only set to 1 if you use a really old compiler +#define wxUSE_IOSTREAMH 0 + + +// ---------------------------------------------------------------------------- +// non GUI features selection +// ---------------------------------------------------------------------------- + +// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit +// integer which is implemented in terms of native 64 bit integers if any or +// uses emulation otherwise. +// +// This class is required by wxDateTime and so you should enable it if you want +// to use wxDateTime. For most modern platforms, it will use the native 64 bit +// integers in which case (almost) all of its functions are inline and it +// almost does not take any space, so there should be no reason to switch it +// off. +// +// Recommended setting: 1 +#define wxUSE_LONGLONG 1 + +// Set wxUSE_BASE64 to 1, to compile in Base64 support. This is required for +// storing binary data in wxConfig on most platforms. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_BASE64 1 + +// Set this to 1 to be able to use wxEventLoop even in console applications +// (i.e. using base library only, without GUI). This is mostly useful for +// processing socket events but is also necessary to use timers in console +// applications +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_CONSOLE_EVENTLOOP 1 + +// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level +// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions. +// +// Default is 1 +// +// Recommended setting: 1 (wxFile is highly recommended as it is required by +// i18n code, wxFileConfig and others) +#define wxUSE_FILE 1 +#define wxUSE_FFILE 1 + +// Use wxFSVolume class providing access to the configured/active mount points +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely disabled if you don't use it) +#define wxUSE_FSVOLUME 1 + +// Use wxStandardPaths class which allows to retrieve some standard locations +// in the file system +// +// Default is 1 +// +// Recommended setting: 1 (may be disabled to save space, but not much) +#define wxUSE_STDPATHS 1 + +// use wxTextBuffer class: required by wxTextFile +#define wxUSE_TEXTBUFFER 1 + +// use wxTextFile class: requires wxFile and wxTextBuffer, required by +// wxFileConfig +#define wxUSE_TEXTFILE 1 + +// i18n support: _() macro, wxLocale class. Requires wxTextFile. +#define wxUSE_INTL 1 + +// Provide wxFoo_l() functions similar to standard foo() functions but taking +// an extra locale parameter. +// +// Notice that this is fully implemented only for the systems providing POSIX +// xlocale support or Microsoft Visual C++ >= 8 (which provides proprietary +// almost-equivalent of xlocale functions), otherwise wxFoo_l() functions will +// only work for the current user locale and "C" locale. You can use +// wxHAS_XLOCALE_SUPPORT to test whether the full support is available. +// +// Default is 1 +// +// Recommended setting: 1 but may be disabled if you are writing programs +// running only in C locale anyhow +#define wxUSE_XLOCALE 1 + +// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which +// allow to manipulate dates, times and time intervals. wxDateTime replaces the +// old wxTime and wxDate classes which are still provided for backwards +// compatibility (and implemented in terms of wxDateTime). +// +// Note that this class is relatively new and is still officially in alpha +// stage because some features are not yet (fully) implemented. It is already +// quite useful though and should only be disabled if you are aiming at +// absolutely minimal version of the library. +// +// Requires: wxUSE_LONGLONG +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_DATETIME 1 + +// Set wxUSE_TIMER to 1 to compile wxTimer class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_TIMER 1 + +// Use wxStopWatch clas. +// +// Default is 1 +// +// Recommended setting: 1 (needed by wxSocket) +#define wxUSE_STOPWATCH 1 + +// Set wxUSE_FSWATCHER to 1 if you want to enable wxFileSystemWatcher +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FSWATCHER 1 + +// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes +// which allow the application to store its settings in the persistent +// storage. Setting this to 1 will also enable on-demand creation of the +// global config object in wxApp. +// +// See also wxUSE_CONFIG_NATIVE below. +// +// Recommended setting: 1 +#define wxUSE_CONFIG 1 + +// If wxUSE_CONFIG is 1, you may choose to use either the native config +// classes under Windows (using .INI files under Win16 and the registry under +// Win32) or the portable text file format used by the config classes under +// Unix. +// +// Default is 1 to use native classes. Note that you may still use +// wxFileConfig even if you set this to 1 - just the config object created by +// default for the applications needs will be a wxRegConfig or wxIniConfig and +// not wxFileConfig. +// +// Recommended setting: 1 +#define wxUSE_CONFIG_NATIVE 1 + +// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows +// to connect/disconnect from the network and be notified whenever the dial-up +// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DIALUP_MANAGER 1 + +// Compile in classes for run-time DLL loading and function calling. +// Required by wxUSE_DIALUP_MANAGER. +// +// This setting is for Win32 only +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DYNLIB_CLASS 1 + +// experimental, don't use for now +#define wxUSE_DYNAMIC_LOADER 1 + +// Set to 1 to use socket classes +#define wxUSE_SOCKETS 1 + +// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS) +// +// Notice that currently setting this option under Windows will result in +// programs which can only run on recent OS versions (with ws2_32.dll +// installed) which is why it is disabled by default. +// +// Default is 1. +// +// Recommended setting: 1 if you need IPv6 support +#define wxUSE_IPV6 0 + +// Set to 1 to enable virtual file systems (required by wxHTML) +#define wxUSE_FILESYSTEM 1 + +// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ZIP 1 + +// Set to 1 to enable virtual archive filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ARCHIVE 1 + +// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_INET 1 + +// wxArchive classes for accessing archives such as zip and tar +#define wxUSE_ARCHIVE_STREAMS 1 + +// Set to 1 to compile wxZipInput/OutputStream classes. +#define wxUSE_ZIPSTREAM 1 + +// Set to 1 to compile wxTarInput/OutputStream classes. +#define wxUSE_TARSTREAM 1 + +// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by +// wxUSE_LIBPNG +#define wxUSE_ZLIB 1 + +// If enabled, the code written by Apple will be used to write, in a portable +// way, float on the disk. See extended.c for the license which is different +// from wxWidgets one. +// +// Default is 1. +// +// Recommended setting: 1 unless you don't like the license terms (unlikely) +#define wxUSE_APPLE_IEEE 1 + +// Joystick support class +#define wxUSE_JOYSTICK 1 + +// wxFontEnumerator class +#define wxUSE_FONTENUM 1 + +// wxFontMapper class +#define wxUSE_FONTMAP 1 + +// wxMimeTypesManager class +#define wxUSE_MIMETYPE 1 + +// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP +// or wxURL you need to set this to 1. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_PROTOCOL 1 + +// The settings for the individual URL schemes +#define wxUSE_PROTOCOL_FILE 1 +#define wxUSE_PROTOCOL_FTP 1 +#define wxUSE_PROTOCOL_HTTP 1 + +// Define this to use wxURL class. +#define wxUSE_URL 1 + +// Define this to use native platform url and protocol support. +// Currently valid only for MS-Windows. +// Note: if you set this to 1, you can open ftp/http/gopher sites +// and obtain a valid input stream for these sites +// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0. +// Doing so reduces the code size. +// +// This code is experimental and subject to change. +#define wxUSE_URL_NATIVE 0 + +// Support for wxVariant class used in several places throughout the library, +// notably in wxDataViewCtrl API. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size as much as +// possible in which case setting this to 0 can gain up to 100KB. +#define wxUSE_VARIANT 1 + +// Support for wxAny class, the successor for wxVariant. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size by a small amount, +// or your compiler cannot for some reason cope with complexity of templates used. +#define wxUSE_ANY 1 + +// Support for regular expression matching via wxRegEx class: enable this to +// use POSIX regular expressions in your code. You need to compile regex +// library from src/regex to use it under Windows. +// +// Default is 0 +// +// Recommended setting: 1 if your compiler supports it, if it doesn't please +// contribute us a makefile for src/regex for it +#define wxUSE_REGEX 1 + +// wxSystemOptions class +#define wxUSE_SYSTEM_OPTIONS 1 + +// wxSound class +#define wxUSE_SOUND 1 + +// Use wxMediaCtrl +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_MEDIACTRL 1 + +// Use wxWidget's XRC XML-based resource system. Recommended. +// +// Default is 1 +// +// Recommended setting: 1 (requires wxUSE_XML) +#define wxUSE_XRC 1 + +// XML parsing classes. Note that their API will change in the future, so +// using wxXmlDocument and wxXmlNode in your app is not recommended. +// +// Default is the same as wxUSE_XRC, i.e. 1 by default. +// +// Recommended setting: 1 (required by XRC) +#define wxUSE_XML wxUSE_XRC + +// Use wxWidget's AUI docking system +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_AUI 1 + +// Use wxWidget's Ribbon classes for interfaces +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_RIBBON 1 + +// Use wxPropertyGrid. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_PROPGRID 1 + +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + +// Use wxWidget's web viewing classes +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW 1 + +// Use the IE wxWebView backend +// +// Default is 1 on MSW +// +// Recommended setting: 1 +#ifdef __WXMSW__ +#define wxUSE_WEBVIEW_IE 1 +#else +#define wxUSE_WEBVIEW_IE 0 +#endif + +// Use the WebKit wxWebView backend +// +// Default is 1 on GTK and OSX +// +// Recommended setting: 1 +#if defined(__WXGTK__) || defined(__WXOSX__) +#define wxUSE_WEBVIEW_WEBKIT 1 +#else +#define wxUSE_WEBVIEW_WEBKIT 0 +#endif + +// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced +// 2D drawing API. (Still somewhat experimental) +// +// Please note that on Windows gdiplus.dll is loaded dynamically which means +// that nothing special needs to be done as long as you don't use +// wxGraphicsContext at all or only use it on XP and later systems but you +// still do need to distribute it yourself for an application using +// wxGraphicsContext to be runnable on pre-XP systems. +// +// Default is 1 except if you're using a non-Microsoft compiler under Windows +// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. +// mingw32) you may need to install the headers (and just the headers) +// yourself. If you do, change the setting below manually. +// +// Recommended setting: 1 if supported by the compilation environment + +// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is +// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined +#ifdef _MSC_VER +# if _MSC_VER >= 1310 + // MSVC7.1+ comes with new enough Platform SDK, enable + // wxGraphicsContext support for it +# define wxUSE_GRAPHICS_CONTEXT 1 +# else + // MSVC 6 didn't include GDI+ headers so disable by default, enable it + // here if you use MSVC 6 with a newer SDK +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#else + // Disable support for other Windows compilers, enable it if your compiler + // comes with new enough SDK or you installed the headers manually. + // + // Notice that this will be set by configure under non-Windows platforms + // anyhow so the value there is not important. +# define wxUSE_GRAPHICS_CONTEXT 0 +#endif + +// Enable wxGraphicsContext implementation using Cairo library. +// +// This is not needed under Windows and detected automatically by configure +// under other systems, however you may set this to 1 manually if you installed +// Cairo under Windows yourself and prefer to use it instead the native GDI+ +// implementation. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_CAIRO 0 + + +// ---------------------------------------------------------------------------- +// Individual GUI controls +// ---------------------------------------------------------------------------- + +// You must set wxUSE_CONTROLS to 1 if you are using any controls at all +// (without it, wxControl class is not compiled) +// +// Default is 1 +// +// Recommended setting: 1 (don't change except for very special programs) +#define wxUSE_CONTROLS 1 + +// Support markup in control labels, i.e. provide wxControl::SetLabelMarkup(). +// Currently markup is supported only by a few controls and only some ports but +// their number will increase with time. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you want to save on code size) +#define wxUSE_MARKUP 1 + +// wxPopupWindow class is a top level transient window. It is currently used +// to implement wxTipWindow +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW) +#define wxUSE_POPUPWIN 1 + +// wxTipWindow allows to implement the custom tooltips, it is used by the +// context help classes. Requires wxUSE_POPUPWIN. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0) +#define wxUSE_TIPWINDOW 1 + +// Each of the settings below corresponds to one wxWidgets control. They are +// all switched on by default but may be disabled if you are sure that your +// program (including any standard dialogs it can show!) doesn't need them and +// if you desperately want to save some space. If you use any of these you must +// set wxUSE_CONTROLS as well. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl +#define wxUSE_BANNERWINDOW 1 // wxBannerWindow +#define wxUSE_BUTTON 1 // wxButton +#define wxUSE_BMPBUTTON 1 // wxBitmapButton +#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl +#define wxUSE_CHECKBOX 1 // wxCheckBox +#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHOICE 1 // wxChoice +#define wxUSE_COLLPANE 1 // wxCollapsiblePane +#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl +#define wxUSE_COMBOBOX 1 // wxComboBox +#define wxUSE_COMMANDLINKBUTTON 1 // wxCommandLinkButton +#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl +#define wxUSE_DATEPICKCTRL 1 // wxDatePickerCtrl +#define wxUSE_DIRPICKERCTRL 1 // wxDirPickerCtrl +#define wxUSE_EDITABLELISTBOX 1 // wxEditableListBox +#define wxUSE_FILECTRL 1 // wxFileCtrl +#define wxUSE_FILEPICKERCTRL 1 // wxFilePickerCtrl +#define wxUSE_FONTPICKERCTRL 1 // wxFontPickerCtrl +#define wxUSE_GAUGE 1 // wxGauge +#define wxUSE_HEADERCTRL 1 // wxHeaderCtrl +#define wxUSE_HYPERLINKCTRL 1 // wxHyperlinkCtrl +#define wxUSE_LISTBOX 1 // wxListBox +#define wxUSE_LISTCTRL 1 // wxListCtrl +#define wxUSE_RADIOBOX 1 // wxRadioBox +#define wxUSE_RADIOBTN 1 // wxRadioButton +#define wxUSE_RICHMSGDLG 1 // wxRichMessageDialog +#define wxUSE_SCROLLBAR 1 // wxScrollBar +#define wxUSE_SEARCHCTRL 1 // wxSearchCtrl +#define wxUSE_SLIDER 1 // wxSlider +#define wxUSE_SPINBTN 1 // wxSpinButton +#define wxUSE_SPINCTRL 1 // wxSpinCtrl +#define wxUSE_STATBOX 1 // wxStaticBox +#define wxUSE_STATLINE 1 // wxStaticLine +#define wxUSE_STATTEXT 1 // wxStaticText +#define wxUSE_STATBMP 1 // wxStaticBitmap +#define wxUSE_TEXTCTRL 1 // wxTextCtrl +#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl +#define wxUSE_TOGGLEBTN 1 // requires wxButton +#define wxUSE_TREECTRL 1 // wxTreeCtrl +#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl + +// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR +// below either wxStatusBar95 or a generic wxStatusBar will be used. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STATUSBAR 1 + +// Two status bar implementations are available under Win32: the generic one +// or the wrapper around native control. For native look and feel the native +// version should be used. +// +// Default is 1 for the platforms where native status bar is supported. +// +// Recommended setting: 1 (there is no advantage in using the generic one) +#define wxUSE_NATIVE_STATUSBAR 1 + +// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar +// classes at all. Otherwise, use the native toolbar class unless +// wxUSE_TOOLBAR_NATIVE is 0. +// +// Default is 1 for all settings. +// +// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE. +#define wxUSE_TOOLBAR 1 +#define wxUSE_TOOLBAR_NATIVE 1 + +// wxNotebook is a control with several "tabs" located on one of its sides. It +// may be used to logically organise the data presented to the user instead of +// putting everything in one huge dialog. It replaces wxTabControl and related +// classes of wxWin 1.6x. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTEBOOK 1 + +// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_LISTBOOK 1 + +// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CHOICEBOOK 1 + +// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TREEBOOK 1 + +// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of +// tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLBOOK 1 + +// wxTaskBarIcon is a small notification icon shown in the system toolbar or +// dock. +// +// Default is 1. +// +// Recommended setting: 1 (but can be set to 0 if you don't need it) +#define wxUSE_TASKBARICON 1 + +// wxGrid class +// +// Default is 1, set to 0 to cut down compilation time and binaries size if you +// don't use it. +// +// Recommended setting: 1 +// +#define wxUSE_GRID 1 + +// wxMiniFrame class: a frame with narrow title bar +// +// Default is 1. +// +// Recommended setting: 1 (it doesn't cost almost anything) +#define wxUSE_MINIFRAME 1 + +// wxComboCtrl and related classes: combobox with custom popup window and +// not necessarily a listbox. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it +// it used by wxComboBox +#define wxUSE_COMBOCTRL 1 + +// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox +// items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0, except where it is +// needed as a base class for generic wxBitmapComboBox. +#define wxUSE_ODCOMBOBOX 1 + +// wxBitmapComboBox is a combobox that can have images in front of text items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 +#define wxUSE_BITMAPCOMBOBOX 1 + +// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items +// up and down in it. It is also used as part of wxRearrangeDialog. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 (currently used only by +// wxHeaderCtrl) +#define wxUSE_REARRANGECTRL 1 + +// ---------------------------------------------------------------------------- +// Miscellaneous GUI stuff +// ---------------------------------------------------------------------------- + +// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar) +#define wxUSE_ACCEL 1 + +// Use the standard art provider. The icons returned by this provider are +// embedded into the library as XPMs so disabling it reduces the library size +// somewhat but this should only be done if you use your own custom art +// provider returning the icons or never use any icons not provided by the +// native art provider (which might not be implemented at all for some +// platforms) or by the Tango icons provider (if it's not itself disabled +// below). +// +// Default is 1. +// +// Recommended setting: 1 unless you use your own custom art provider. +#define wxUSE_ARTPROVIDER_STD 1 + +// Use art provider providing Tango icons: this art provider has higher quality +// icons than the default ones using smaller size XPM icons without +// transparency but the embedded PNG icons add to the library size. +// +// Default is 1 under non-GTK ports. Under wxGTK the native art provider using +// the GTK+ stock icons replaces it so it is normally not necessary. +// +// Recommended setting: 1 but can be turned off to reduce the library size. +#define wxUSE_ARTPROVIDER_TANGO 1 + +// Hotkey support (currently Windows only) +#define wxUSE_HOTKEY 1 + +// Use wxCaret: a class implementing a "cursor" in a text control (called caret +// under Windows). +// +// Default is 1. +// +// Recommended setting: 1 (can be safely set to 0, not used by the library) +#define wxUSE_CARET 1 + +// Use wxDisplay class: it allows enumerating all displays on a system and +// their geometries as well as finding the display on which the given point or +// window lies. +// +// Default is 1. +// +// Recommended setting: 1 if you need it, can be safely set to 0 otherwise +#define wxUSE_DISPLAY 1 + +// Miscellaneous geometry code: needed for Canvas library +#define wxUSE_GEOMETRY 1 + +// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and +// wxListCtrl. +// +// Default is 1. +// +// Recommended setting: 1 (set it to 0 if you don't use any of the controls +// enumerated above, then this class is mostly useless too) +#define wxUSE_IMAGLIST 1 + +// Use wxInfoBar class. +// +// Default is 1. +// +// Recommended setting: 1 (but can be disabled without problems as nothing +// depends on it) +#define wxUSE_INFOBAR 1 + +// Use wxMenu, wxMenuBar, wxMenuItem. +// +// Default is 1. +// +// Recommended setting: 1 (can't be disabled under MSW) +#define wxUSE_MENUS 1 + +// Use wxNotificationMessage. +// +// wxNotificationMessage allows to show non-intrusive messages to the user +// using balloons, banners, popups or whatever is the appropriate method for +// the current platform. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTIFICATION_MESSAGE 1 + +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + +// wxRichToolTip is a customizable tooltip class which has more functionality +// than the stock (but native, unlike this class) wxToolTip. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely set to 0 if you don't need it) +#define wxUSE_RICHTOOLTIP 1 + +// Use wxSashWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SASH 1 + +// Use wxSplitterWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SPLITTER 1 + +// Use wxToolTip and wxWindow::Set/GetToolTip() methods. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLTIPS 1 + +// wxValidator class and related methods +#define wxUSE_VALIDATORS 1 + +// Use reference counted ID management: this means that wxWidgets will track +// the automatically allocated ids (those used when you use wxID_ANY when +// creating a window, menu or toolbar item &c) instead of just supposing that +// the program never runs out of them. This is mostly useful only under wxMSW +// where the total ids range is limited to SHRT_MIN..SHRT_MAX and where +// long-running programs can run into problems with ids reuse without this. On +// the other platforms, where the ids have the full int range, this shouldn't +// be necessary. +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif + +// ---------------------------------------------------------------------------- +// common dialogs +// ---------------------------------------------------------------------------- + +// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g. +// file selector, printer dialog). Switching this off also switches off the +// printing architecture and interactive wxPrinterDC. +// +// Default is 1 +// +// Recommended setting: 1 (unless it really doesn't work) +#define wxUSE_COMMON_DIALOGS 1 + +// wxBusyInfo displays window with message when app is busy. Works in same way +// as wxBusyCursor +#define wxUSE_BUSYINFO 1 + +// Use single/multiple choice dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_CHOICEDLG 1 + +// Use colour picker dialog +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_COLOURDLG 1 + +// wxDirDlg class for getting a directory name from user +#define wxUSE_DIRDLG 1 + +// TODO: setting to choose the generic or native one + +// Use file open/save dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in many places in the library itself) +#define wxUSE_FILEDLG 1 + +// Use find/replace dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely set to 0) +#define wxUSE_FINDREPLDLG 1 + +// Use font picker dialog +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_FONTDLG 1 + +// Use wxMessageDialog and wxMessageBox. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_MSGDLG 1 + +// progress dialog class for lengthy operations +#define wxUSE_PROGRESSDLG 1 + +// support for startup tips (wxShowTip &c) +#define wxUSE_STARTUP_TIPS 1 + +// text entry dialog and wxGetTextFromUser function +#define wxUSE_TEXTDLG 1 + +// number entry dialog +#define wxUSE_NUMBERDLG 1 + +// splash screen class +#define wxUSE_SPLASH 1 + +// wizards +#define wxUSE_WIZARDDLG 1 + +// Compile in wxAboutBox() function showing the standard "About" dialog. +// +// Default is 1 +// +// Recommended setting: 1 but can be set to 0 to save some space if you don't +// use this function +#define wxUSE_ABOUTDLG 1 + +// wxFileHistory class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FILE_HISTORY 1 + +// ---------------------------------------------------------------------------- +// Metafiles support +// ---------------------------------------------------------------------------- + +// Windows supports the graphics format known as metafile which is, though not +// portable, is widely used under Windows and so is supported by wxWin (under +// Windows only, of course). Win16 (Win3.1) used the so-called "Window +// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in +// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by +// default, WMFs will be used under Win16 and EMFs under Win32. This may be +// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting +// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile +// in any metafile related classes at all. +// +// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS. +// +// Recommended setting: default or 0 for everything for portable programs. +#define wxUSE_METAFILE 1 +#define wxUSE_ENH_METAFILE 1 +#define wxUSE_WIN_METAFILES_ALWAYS 0 + +// ---------------------------------------------------------------------------- +// Big GUI components +// ---------------------------------------------------------------------------- + +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + +// Set to 0 to disable document/view architecture +#define wxUSE_DOC_VIEW_ARCHITECTURE 1 + +// Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 1 + +// Set to 0 to disable print/preview architecture code +#define wxUSE_PRINTING_ARCHITECTURE 1 + +// wxHTML sublibrary allows to display HTML in wxWindow programs and much, +// much more. +// +// Default is 1. +// +// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a +// smaller library. +#define wxUSE_HTML 1 + +// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL +// headers and libraries to be able to compile the library with wxUSE_GLCANVAS +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). +// +// Default is 1 unless the compiler is known to ship without the necessary +// headers (Digital Mars) or the platform doesn't support OpenGL (Windows CE). +// +// Recommended setting: 1 if you intend to use OpenGL, can be safely set to 0 +// otherwise. +#define wxUSE_GLCANVAS 1 + +// wxRichTextCtrl allows editing of styled text. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 if you want compile a +// smaller library. +#define wxUSE_RICHTEXT 1 + +// ---------------------------------------------------------------------------- +// Data transfer +// ---------------------------------------------------------------------------- + +// Use wxClipboard class for clipboard copy/paste. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CLIPBOARD 1 + +// Use wxDataObject and related classes. Needed for clipboard and OLE drag and +// drop +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DATAOBJ 1 + +// Use wxDropTarget and wxDropSource classes for drag and drop (this is +// different from "built in" drag and drop in wxTreeCtrl which is always +// available). Requires wxUSE_DATAOBJ. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DRAG_AND_DROP 1 + +// Use wxAccessible for enhanced and customisable accessibility. +// Depends on wxUSE_OLE. +// +// Default is 0. +// +// Recommended setting (at present): 0 +#define wxUSE_ACCESSIBILITY 0 + +// ---------------------------------------------------------------------------- +// miscellaneous settings +// ---------------------------------------------------------------------------- + +// wxSingleInstanceChecker class allows to verify at startup if another program +// instance is running. +// +// Default is 1 +// +// Recommended setting: 1 (the class is tiny, disabling it won't save much +// space) +#define wxUSE_SNGLINST_CHECKER 1 + +#define wxUSE_DRAGIMAGE 1 + +#define wxUSE_IPC 1 + // 0 for no interprocess comms +#define wxUSE_HELP 1 + // 0 for no help facility + +// Should we use MS HTML help for wxHelpController? If disabled, neither +// wxCHMHelpController nor wxBestHelpController are available. +// +// Default is 1 under MSW, 0 is always used for the other platforms. +// +// Recommended setting: 1, only set to 0 if you have trouble compiling +// wxCHMHelpController (could be a problem with really ancient compilers) +#define wxUSE_MS_HTML_HELP 1 + + +// Use wxHTML-based help controller? +#define wxUSE_WXHTML_HELP 1 + +#define wxUSE_CONSTRAINTS 1 + // 0 for no window layout constraint system + +#define wxUSE_SPLINES 1 + // 0 for no splines + +#define wxUSE_MOUSEWHEEL 1 + // Include mouse wheel support + +// Compile wxUIActionSimulator class? +#define wxUSE_UIACTIONSIMULATOR 1 + +// ---------------------------------------------------------------------------- +// wxDC classes for various output formats +// ---------------------------------------------------------------------------- + +// Set to 1 for PostScript device context. +#define wxUSE_POSTSCRIPT 0 + +// Set to 1 to use font metric files in GetTextExtent +#define wxUSE_AFM_FOR_POSTSCRIPT 1 + +// Set to 1 to compile in support for wxSVGFileDC, a wxDC subclass which allows +// to create files in SVG (Scalable Vector Graphics) format. +#define wxUSE_SVG 1 + +// Should wxDC provide SetTransformMatrix() and related methods? +// +// Default is 1 but can be set to 0 if this functionality is not used. Notice +// that currently only wxMSW supports this so setting this to 0 doesn't change +// much for non-MSW platforms (although it will still save a few bytes +// probably). +// +// Recommended setting: 1. +#define wxUSE_DC_TRANSFORM_MATRIX 1 + +// ---------------------------------------------------------------------------- +// image format support +// ---------------------------------------------------------------------------- + +// wxImage supports many different image formats which can be configured at +// compile-time. BMP is always supported, others are optional and can be safely +// disabled if you don't plan to use images in such format sometimes saving +// substantial amount of code in the final library. +// +// Some formats require an extra library which is included in wxWin sources +// which is mentioned if it is the case. + +// Set to 1 for wxImage support (recommended). +#define wxUSE_IMAGE 1 + +// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB. +#define wxUSE_LIBPNG 1 + +// Set to 1 for JPEG format support (requires libjpeg) +#define wxUSE_LIBJPEG 1 + +// Set to 1 for TIFF format support (requires libtiff) +#define wxUSE_LIBTIFF 1 + +// Set to 1 for TGA format support (loading only) +#define wxUSE_TGA 1 + +// Set to 1 for GIF format support +#define wxUSE_GIF 1 + +// Set to 1 for PNM format support +#define wxUSE_PNM 1 + +// Set to 1 for PCX format support +#define wxUSE_PCX 1 + +// Set to 1 for IFF format support (Amiga format) +#define wxUSE_IFF 0 + +// Set to 1 for XPM format support +#define wxUSE_XPM 1 + +// Set to 1 for MS Icons and Cursors format support +#define wxUSE_ICO_CUR 1 + +// Set to 1 to compile in wxPalette class +#define wxUSE_PALETTE 1 + +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 + + +/* --- end common options --- */ + +/* --- start MSW options --- */ +// ---------------------------------------------------------------------------- +// Windows-only settings +// ---------------------------------------------------------------------------- + +// Set wxUSE_UNICODE_MSLU to 1 if you're compiling wxWidgets in Unicode mode +// and want to run your programs under Windows 9x and not only NT/2000/XP. +// This setting enables use of unicows.dll from MSLU (MS Layer for Unicode, see +// http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx). Note +// that you will have to modify the makefiles to include unicows.lib import +// library as the first library (see installation instructions in install.txt +// to learn how to do it when building the library or samples). +// +// If your compiler doesn't have unicows.lib, you can get a version of it at +// http://libunicows.sourceforge.net +// +// Default is 0 +// +// Recommended setting: 0 (1 if you want to deploy Unicode apps on 9x systems) +#ifndef wxUSE_UNICODE_MSLU + #define wxUSE_UNICODE_MSLU 0 +#endif + +// Set this to 1 if you want to use wxWidgets and MFC in the same program. This +// will override some other settings (see below) +// +// Default is 0. +// +// Recommended setting: 0 unless you really have to use MFC +#define wxUSE_MFC 0 + +// Set this to 1 for generic OLE support: this is required for drag-and-drop, +// clipboard, OLE Automation. Only set it to 0 if your compiler is very old and +// can't compile/doesn't have the OLE headers. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_OLE 1 + +// Set this to 1 to enable wxAutomationObject class. +// +// Default is 1. +// +// Recommended setting: 1 if you need to control other applications via OLE +// Automation, can be safely set to 0 otherwise +#define wxUSE_OLE_AUTOMATION 1 + +// Set this to 1 to enable wxActiveXContainer class allowing to embed OLE +// controls in wx. +// +// Default is 1. +// +// Recommended setting: 1, required by wxMediaCtrl +#define wxUSE_ACTIVEX 1 + +// wxDC caching implementation +#define wxUSE_DC_CACHEING 1 + +// Set this to 1 to enable wxDIB class used internally for manipulating +// wxBitmap data. +// +// Default is 1, set it to 0 only if you don't use wxImage neither +// +// Recommended setting: 1 (without it conversion to/from wxImage won't work) +#define wxUSE_WXDIB 1 + +// Set to 0 to disable PostScript print/preview architecture code under Windows +// (just use Windows printing). +#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1 + +// Set this to 1 to compile in wxRegKey class. +// +// Default is 1 +// +// Recommended setting: 1, this is used internally by wx in a few places +#define wxUSE_REGKEY 1 + +// Set this to 1 to use RICHEDIT controls for wxTextCtrl with style wxTE_RICH +// which allows to put more than ~32Kb of text in it even under Win9x (NT +// doesn't have such limitation). +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1, only set it to 0 if your compiler doesn't have +// or can't compile <richedit.h> +#define wxUSE_RICHEDIT 1 + +// Set this to 1 to use extra features of richedit v2 and later controls +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1 +#define wxUSE_RICHEDIT2 1 + +// Set this to 1 to enable support for the owner-drawn menu and listboxes. This +// is required by wxUSE_CHECKLISTBOX. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 for a small library size reduction +#define wxUSE_OWNER_DRAWN 1 + +// Set this to 1 to enable MSW-specific wxTaskBarIcon::ShowBalloon() method. It +// is required by native wxNotificationMessage implementation. +// +// Default is 1 but disabled in wx/msw/chkconf.h if SDK is too old to contain +// the necessary declarations. +// +// Recommended setting: 1, set to 0 for a tiny library size reduction +#define wxUSE_TASKBARICON_BALLOONS 1 + +// Set to 1 to compile MS Windows XP theme engine support +#define wxUSE_UXTHEME 1 + +// Set to 1 to use InkEdit control (Tablet PC), if available +#define wxUSE_INKEDIT 0 + +// Set to 1 to enable .INI files based wxConfig implementation (wxIniConfig) +// +// Default is 0. +// +// Recommended setting: 0, nobody uses .INI files any more +#define wxUSE_INICONF 0 + +// ---------------------------------------------------------------------------- +// Generic versions of native controls +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxDatePickerCtrlGeneric in addition to the +// native wxDatePickerCtrl +// +// Default is 0. +// +// Recommended setting: 0, this is mainly used for testing +#define wxUSE_DATEPICKCTRL_GENERIC 0 + +// ---------------------------------------------------------------------------- +// Crash debugging helpers +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxCrashReport::Generate() to create mini +// dumps of your program when it crashes (or at any other moment) +// +// Default is 1 if supported by the compiler (VC++ and recent BC++ only). +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_CRASHREPORT 1 +/* --- end MSW options --- */ + +/* --- start wxUniv options --- */ +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 +/* --- end wxUniv options --- */ + +#endif // _WX_SETUP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/setup_inc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/setup_inc.h new file mode 100644 index 0000000000..79d524e5f7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/setup_inc.h @@ -0,0 +1,25 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/setup_inc.h +// Purpose: wxUniversal-specific setup.h options (this file is not used +// directly, it is injected by build/update-setup-h in the +// generated include/wx/univ/setup0.h) +// Author: Vadim Zeitlin +// Created: 2008-02-03 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/slider.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/slider.h new file mode 100644 index 0000000000..fadab4d12f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/slider.h @@ -0,0 +1,227 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/slider.h +// Purpose: wxSlider control for wxUniversal +// Author: Vadim Zeitlin +// Modified by: +// Created: 09.02.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_SLIDER_H_ +#define _WX_UNIV_SLIDER_H_ + +#include "wx/univ/scrthumb.h" + +// ---------------------------------------------------------------------------- +// the actions supported by this control +// ---------------------------------------------------------------------------- + +// our actions are the same as scrollbars + +#define wxACTION_SLIDER_START wxT("start") // to the beginning +#define wxACTION_SLIDER_END wxT("end") // to the end +#define wxACTION_SLIDER_LINE_UP wxT("lineup") // one line up/left +#define wxACTION_SLIDER_PAGE_UP wxT("pageup") // one page up/left +#define wxACTION_SLIDER_LINE_DOWN wxT("linedown") // one line down/right +#define wxACTION_SLIDER_PAGE_DOWN wxT("pagedown") // one page down/right +#define wxACTION_SLIDER_PAGE_CHANGE wxT("pagechange")// change page by numArg + +#define wxACTION_SLIDER_THUMB_DRAG wxT("thumbdrag") +#define wxACTION_SLIDER_THUMB_MOVE wxT("thumbmove") +#define wxACTION_SLIDER_THUMB_RELEASE wxT("thumbrelease") + +// ---------------------------------------------------------------------------- +// wxSlider +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase, + public wxControlWithThumb +{ +public: + // ctors and such + wxSlider(); + + wxSlider(wxWindow *parent, + wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr); + + bool Create(wxWindow *parent, + wxWindowID id, + int value, int minValue, int maxValue, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSL_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSliderNameStr); + + // implement base class pure virtuals + virtual int GetValue() const; + virtual void SetValue(int value); + + virtual void SetRange(int minValue, int maxValue); + virtual int GetMin() const; + virtual int GetMax() const; + + virtual void SetLineSize(int lineSize); + virtual void SetPageSize(int pageSize); + virtual int GetLineSize() const; + virtual int GetPageSize() const; + + virtual void SetThumbLength(int lenPixels); + virtual int GetThumbLength() const; + + virtual int GetTickFreq() const { return m_tickFreq; } + + // wxUniv-specific methods + // ----------------------- + + // is this a vertical slider? + bool IsVert() const { return (GetWindowStyle() & wxSL_VERTICAL) != 0; } + + // get the slider orientation + wxOrientation GetOrientation() const + { return IsVert() ? wxVERTICAL : wxHORIZONTAL; } + + // do we have labels? + bool HasLabels() const + { return ((GetWindowStyle() & wxSL_LABELS) != 0) && + ((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT)) != 0); } + + // do we have ticks? + bool HasTicks() const + { return ((GetWindowStyle() & wxSL_TICKS) != 0) && + ((GetWindowStyle() & (wxSL_TOP|wxSL_BOTTOM|wxSL_LEFT|wxSL_RIGHT|wxSL_BOTH)) != 0); } + + // implement wxControlWithThumb interface + virtual wxWindow *GetWindow() { return this; } + virtual bool IsVertical() const { return IsVert(); } + + virtual wxScrollThumb::Shaft HitTest(const wxPoint& pt) const; + virtual wxCoord ThumbPosToPixel() const; + virtual int PixelToThumbPos(wxCoord x) const; + + virtual void SetShaftPartState(wxScrollThumb::Shaft shaftPart, + int flag, + bool set = true); + + virtual void OnThumbDragStart(int pos); + virtual void OnThumbDrag(int pos); + virtual void OnThumbDragEnd(int pos); + virtual void OnPageScrollStart(); + virtual bool OnPageScroll(int pageInc); + + // for wxStdSliderInputHandler + wxScrollThumb& GetThumb() { return m_thumb; } + + virtual bool PerformAction(const wxControlAction& action, + long numArg = 0, + const wxString& strArg = wxEmptyString); + + static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return GetStdInputHandler(handlerDef); + } + +protected: + enum + { + INVALID_THUMB_VALUE = -0xffff + }; + + // Platform-specific implementation of SetTickFreq + virtual void DoSetTickFreq(int freq); + + // overridden base class virtuals + virtual wxSize DoGetBestClientSize() const; + virtual void DoDraw(wxControlRenderer *renderer); + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // event handlers + void OnSize(wxSizeEvent& event); + + // common part of all ctors + void Init(); + + // normalize the value to fit in the range + int NormalizeValue(int value) const; + + // change the value by the given increment, return true if really changed + bool ChangeValueBy(int inc); + + // change the value to the given one + bool ChangeValueTo(int value); + + // is the value inside the range? + bool IsInRange(int value) { return (value >= m_min) && (value <= m_max); } + + // format the value for printing as label + virtual wxString FormatValue(int value) const; + + // calculate max label size + wxSize CalcLabelSize() const; + + // calculate m_rectLabel/Slider + void CalcGeometry(); + + // get the thumb size + wxSize GetThumbSize() const; + + // get the shaft rect (uses m_rectSlider which is supposed to be calculated) + wxRect GetShaftRect() const; + + // calc the current thumb position using the shaft rect (if the pointer is + // NULL, we calculate it here too) + void CalcThumbRect(const wxRect *rectShaft, + wxRect *rectThumbOut, + wxRect *rectLabelOut, + int value = INVALID_THUMB_VALUE) const; + + // return the slider rect calculating it if needed + const wxRect& GetSliderRect() const; + + // refresh the current thumb position + void RefreshThumb(); + +private: + // get the default thumb size (without using m_thumbSize) + wxSize GetDefaultThumbSize() const; + + // the object which manages our thumb + wxScrollThumb m_thumb; + + // the slider range and value + int m_min, + m_max, + m_value; + + // the tick frequence (default is 1) + int m_tickFreq; + + // the line and page increments (logical units) + int m_lineSize, + m_pageSize; + + // the size of the thumb (in pixels) + int m_thumbSize; + + // the part of the client area reserved for the label, the ticks and the + // part for the slider itself + wxRect m_rectLabel, + m_rectTicks, + m_rectSlider; + + // the state of the thumb (wxCONTROL_XXX constants sum) + int m_thumbFlags; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxSlider) +}; + +#endif // _WX_UNIV_SLIDER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/spinbutt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/spinbutt.h new file mode 100644 index 0000000000..1ae4ccba7c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/spinbutt.h @@ -0,0 +1,121 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/spinbutt.h +// Purpose: universal version of wxSpinButton +// Author: Vadim Zeitlin +// Modified by: +// Created: 21.01.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_SPINBUTT_H_ +#define _WX_UNIV_SPINBUTT_H_ + +#include "wx/univ/scrarrow.h" + +// ---------------------------------------------------------------------------- +// wxSpinButton +// ---------------------------------------------------------------------------- + +// actions supported by this control +#define wxACTION_SPIN_INC wxT("inc") +#define wxACTION_SPIN_DEC wxT("dec") + +class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase, + public wxControlWithArrows +{ +public: + wxSpinButton(); + wxSpinButton(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, + const wxString& name = wxSPIN_BUTTON_NAME); + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, + const wxString& name = wxSPIN_BUTTON_NAME); + + // implement wxSpinButtonBase methods + virtual int GetValue() const; + virtual void SetValue(int val); + virtual void SetRange(int minVal, int maxVal); + + // implement wxControlWithArrows methods + virtual wxRenderer *GetRenderer() const { return m_renderer; } + virtual wxWindow *GetWindow() { return this; } + virtual bool IsVertical() const { return wxSpinButtonBase::IsVertical(); } + virtual int GetArrowState(wxScrollArrows::Arrow arrow) const; + virtual void SetArrowFlag(wxScrollArrows::Arrow arrow, int flag, bool set); + virtual bool OnArrow(wxScrollArrows::Arrow arrow); + virtual wxScrollArrows::Arrow HitTestArrow(const wxPoint& pt) const; + + // for wxStdSpinButtonInputHandler + const wxScrollArrows& GetArrows() { return m_arrows; } + + virtual bool PerformAction(const wxControlAction& action, + long numArg = 0, + const wxString& strArg = wxEmptyString); + + static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return GetStdInputHandler(handlerDef); + } + +protected: + virtual wxSize DoGetBestClientSize() const; + virtual void DoDraw(wxControlRenderer *renderer); + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // the common part of all ctors + void Init(); + + // normalize the value to fit into min..max range + int NormalizeValue(int value) const; + + // change the value by +1/-1 and send the event, return true if value was + // changed + bool ChangeValue(int inc); + + // get the rectangles for our 2 arrows + void CalcArrowRects(wxRect *rect1, wxRect *rect2) const; + + // the current controls value + int m_value; + +private: + // the object which manages our arrows + wxScrollArrows m_arrows; + + // the state (combination of wxCONTROL_XXX flags) of the arrows + int m_arrowsState[wxScrollArrows::Arrow_Max]; + + DECLARE_DYNAMIC_CLASS(wxSpinButton) +}; + +// ---------------------------------------------------------------------------- +// wxStdSpinButtonInputHandler: manages clicks on them (use arrows like +// wxStdScrollBarInputHandler) and processes keyboard events too +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStdSpinButtonInputHandler : public wxStdInputHandler +{ +public: + wxStdSpinButtonInputHandler(wxInputHandler *inphand); + + virtual bool HandleKey(wxInputConsumer *consumer, + const wxKeyEvent& event, + bool pressed); + virtual bool HandleMouse(wxInputConsumer *consumer, + const wxMouseEvent& event); + virtual bool HandleMouseMove(wxInputConsumer *consumer, + const wxMouseEvent& event); +}; + +#endif // _WX_UNIV_SPINBUTT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statbmp.h new file mode 100644 index 0000000000..c649653915 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statbmp.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/statbmp.h +// Purpose: wxStaticBitmap class for wxUniversal +// Author: Vadim Zeitlin +// Modified by: +// Created: 25.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_STATBMP_H_ +#define _WX_UNIV_STATBMP_H_ + +#include "wx/bitmap.h" + +// ---------------------------------------------------------------------------- +// wxStaticBitmap +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase +{ +public: + wxStaticBitmap() + { + } + + wxStaticBitmap(wxWindow *parent, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0) + { + Create(parent, wxID_ANY, label, pos, size, style); + } + + wxStaticBitmap(wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr) + { + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxBitmap& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBitmapNameStr); + + virtual void SetBitmap(const wxBitmap& bitmap); + virtual void SetIcon(const wxIcon& icon); + virtual wxBitmap GetBitmap() const { return m_bitmap; } + + wxIcon GetIcon() const; + + virtual bool HasTransparentBackground() { return true; } + +protected: + virtual void DoDraw(wxControlRenderer *renderer); + +private: + // the bitmap which we show + wxBitmap m_bitmap; + + DECLARE_DYNAMIC_CLASS(wxStaticBitmap) +}; + +#endif // _WX_UNIV_STATBMP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statbox.h new file mode 100644 index 0000000000..081c9d6e66 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statbox.h @@ -0,0 +1,64 @@ +////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/statbox.h +// Purpose: wxStaticBox declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 15.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_STATBOX_H_ +#define _WX_UNIV_STATBOX_H_ + +class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase +{ +public: + wxStaticBox() { } + + wxStaticBox(wxWindow *parent, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize) + { + Create(parent, wxID_ANY, label, pos, size); + } + + wxStaticBox(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBoxNameStr) + { + Create(parent, id, label, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxStaticBoxNameStr); + + // the origin of the static box is inside the border and under the label: + // take account of this + virtual wxPoint GetBoxAreaOrigin() const; + + // returning true from here ensures that we act as a container window for + // our children + virtual bool IsStaticBox() const { return true; } + +protected: + // draw the control + virtual void DoDraw(wxControlRenderer *renderer); + + // get the size of the border + wxRect GetBorderGeometry() const; + +private: + DECLARE_DYNAMIC_CLASS(wxStaticBox) +}; + +#endif // _WX_UNIV_STATBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statline.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statline.h new file mode 100644 index 0000000000..6801d6c124 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statline.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/statline.h +// Purpose: wxStaticLine class for wxUniversal +// Author: Vadim Zeitlin +// Created: 28.06.99 +// Copyright: (c) 1999 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_STATLINE_H_ +#define _WX_UNIV_STATLINE_H_ + +class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase +{ +public: + // constructors and pseudo-constructors + wxStaticLine() { } + + wxStaticLine(wxWindow *parent, + const wxPoint &pos, + wxCoord length, + long style = wxLI_HORIZONTAL) + { + Create(parent, wxID_ANY, pos, + style & wxLI_VERTICAL ? wxSize(wxDefaultCoord, length) + : wxSize(length, wxDefaultCoord), + style); + } + + wxStaticLine(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr ) + { + Create(parent, id, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticLineNameStr ); + +protected: + virtual void DoDraw(wxControlRenderer *renderer); + +private: + DECLARE_DYNAMIC_CLASS(wxStaticLine) +}; + +#endif // _WX_UNIV_STATLINE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/stattext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/stattext.h new file mode 100644 index 0000000000..f2e27bb3b5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/stattext.h @@ -0,0 +1,67 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/stattext.h +// Purpose: wxStaticText +// Author: Vadim Zeitlin +// Modified by: +// Created: 14.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_STATTEXT_H_ +#define _WX_UNIV_STATTEXT_H_ + +#include "wx/generic/stattextg.h" + +class WXDLLIMPEXP_CORE wxStaticText : public wxGenericStaticText +{ +public: + wxStaticText() { } + + // usual ctor + wxStaticText(wxWindow *parent, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize) + { + Create(parent, wxID_ANY, label, pos, size, 0, wxStaticTextNameStr); + } + + // full form + wxStaticText(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString &name = wxStaticTextNameStr) + { + Create(parent, id, label, pos, size, style, name); + } + + // function ctor + bool Create(wxWindow *parent, + wxWindowID id, + const wxString &label, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = wxStaticTextNameStr); + + // implementation only from now on + + virtual void SetLabel(const wxString& label); + + virtual bool IsFocused() const { return false; } + +protected: + // draw the control + virtual void DoDraw(wxControlRenderer *renderer); + + virtual void DoSetLabel(const wxString& str); + virtual wxString DoGetLabel() const; + + DECLARE_DYNAMIC_CLASS(wxStaticText) +}; + +#endif // _WX_UNIV_STATTEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statusbr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statusbr.h new file mode 100644 index 0000000000..89dd8bf255 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/statusbr.h @@ -0,0 +1,99 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/statusbr.h +// Purpose: wxStatusBarUniv: wxStatusBar for wxUniversal declaration +// Author: Vadim Zeitlin +// Modified by: +// Created: 14.10.01 +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_STATUSBR_H_ +#define _WX_UNIV_STATUSBR_H_ + +#include "wx/univ/inpcons.h" +#include "wx/arrstr.h" + +// ---------------------------------------------------------------------------- +// wxStatusBarUniv: a window near the bottom of the frame used for status info +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStatusBarUniv : public wxStatusBarBase +{ +public: + wxStatusBarUniv() { Init(); } + + wxStatusBarUniv(wxWindow *parent, + wxWindowID id = wxID_ANY, + long style = wxSTB_DEFAULT_STYLE, + const wxString& name = wxPanelNameStr) + { + Init(); + + (void)Create(parent, id, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + long style = wxSTB_DEFAULT_STYLE, + const wxString& name = wxPanelNameStr); + + // implement base class methods + virtual void SetFieldsCount(int number = 1, const int *widths = NULL); + virtual void SetStatusWidths(int n, const int widths[]); + + virtual bool GetFieldRect(int i, wxRect& rect) const; + virtual void SetMinHeight(int height); + + virtual int GetBorderX() const; + virtual int GetBorderY() const; + + // wxInputConsumer pure virtual + virtual wxWindow *GetInputWindow() const + { return const_cast<wxStatusBar*>(this); } + +protected: + virtual void DoUpdateStatusText(int i); + + // recalculate the field widths + void OnSize(wxSizeEvent& event); + + // draw the statusbar + virtual void DoDraw(wxControlRenderer *renderer); + + // tell them about our preferred height + virtual wxSize DoGetBestSize() const; + + // override DoSetSize() to prevent the status bar height from changing + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + // get the (fixed) status bar height + wxCoord GetHeight() const; + + // get the rectangle containing all the fields and the border between them + // + // also updates m_widthsAbs if necessary + wxRect GetTotalFieldRect(wxCoord *borderBetweenFields); + + // get the rect for this field without ani side effects (see code) + wxRect DoGetFieldRect(int n) const; + + // common part of all ctors + void Init(); + +private: + // the current status fields strings + //wxArrayString m_statusText; + + // the absolute status fields widths + wxArrayInt m_widthsAbs; + + DECLARE_DYNAMIC_CLASS(wxStatusBarUniv) + DECLARE_EVENT_TABLE() + WX_DECLARE_INPUT_CONSUMER() +}; + +#endif // _WX_UNIV_STATUSBR_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/stdrend.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/stdrend.h new file mode 100644 index 0000000000..66ca413218 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/stdrend.h @@ -0,0 +1,352 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/stdrend.h +// Purpose: wxStdRenderer class declaration +// Author: Vadim Zeitlin +// Created: 2006-09-18 +// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_STDREND_H_ +#define _WX_UNIV_STDREND_H_ + +#include "wx/univ/renderer.h" +#include "wx/pen.h" + +class WXDLLIMPEXP_FWD_CORE wxColourScheme; + +// ---------------------------------------------------------------------------- +// wxStdRenderer: implements as much of wxRenderer API as possible generically +// ---------------------------------------------------------------------------- + +class wxStdRenderer : public wxRenderer +{ +public: + // the renderer will use the given scheme, whose lifetime must be at least + // as long as of this object itself, to choose the colours for drawing + wxStdRenderer(const wxColourScheme *scheme); + + virtual void DrawBackground(wxDC& dc, + const wxColour& col, + const wxRect& rect, + int flags = 0, + wxWindow *window = NULL); + virtual void DrawButtonSurface(wxDC& dc, + const wxColour& col, + const wxRect& rect, + int flags); + + + virtual void DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0); + + virtual void DrawLabel(wxDC& dc, + const wxString& label, + const wxRect& rect, + int flags = 0, + int alignment = wxALIGN_LEFT | wxALIGN_TOP, + int indexAccel = -1, + wxRect *rectBounds = NULL); + virtual void DrawButtonLabel(wxDC& dc, + const wxString& label, + const wxBitmap& image, + const wxRect& rect, + int flags = 0, + int alignment = wxALIGN_LEFT | wxALIGN_TOP, + int indexAccel = -1, + wxRect *rectBounds = NULL); + + + virtual void DrawBorder(wxDC& dc, + wxBorder border, + const wxRect& rect, + int flags = 0, + wxRect *rectIn = NULL); + virtual void DrawTextBorder(wxDC& dc, + wxBorder border, + const wxRect& rect, + int flags = 0, + wxRect *rectIn = NULL); + + virtual void DrawHorizontalLine(wxDC& dc, + wxCoord y, wxCoord x1, wxCoord x2); + virtual void DrawVerticalLine(wxDC& dc, + wxCoord x, wxCoord y1, wxCoord y2); + virtual void DrawFrame(wxDC& dc, + const wxString& label, + const wxRect& rect, + int flags = 0, + int alignment = wxALIGN_LEFT, + int indexAccel = -1); + + + virtual void DrawItem(wxDC& dc, + const wxString& label, + const wxRect& rect, + int flags = 0); + virtual void DrawCheckItem(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags = 0); + + virtual void DrawCheckButton(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags = 0, + wxAlignment align = wxALIGN_LEFT, + int indexAccel = -1); + virtual void DrawRadioButton(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags = 0, + wxAlignment align = wxALIGN_LEFT, + int indexAccel = -1); + + virtual void DrawScrollbarArrow(wxDC& dc, + wxDirection dir, + const wxRect& rect, + int flags = 0); + virtual void DrawScrollCorner(wxDC& dc, + const wxRect& rect); + +#if wxUSE_TEXTCTRL + virtual void DrawTextLine(wxDC& dc, + const wxString& text, + const wxRect& rect, + int selStart = -1, + int selEnd = -1, + int flags = 0); + + virtual void DrawLineWrapMark(wxDC& dc, const wxRect& rect); + + virtual wxRect GetTextTotalArea(const wxTextCtrl *text, + const wxRect& rect) const; + virtual wxRect GetTextClientArea(const wxTextCtrl *text, + const wxRect& rect, + wxCoord *extraSpaceBeyond) const; +#endif // wxUSE_TEXTCTRL + + virtual wxRect GetBorderDimensions(wxBorder border) const; + + virtual bool AreScrollbarsInsideBorder() const; + + virtual void AdjustSize(wxSize *size, const wxWindow *window); + + virtual wxCoord GetListboxItemHeight(wxCoord fontHeight); + +#if wxUSE_STATUSBAR + virtual void DrawStatusField(wxDC& dc, + const wxRect& rect, + const wxString& label, + int flags = 0, int style = 0); + + virtual wxSize GetStatusBarBorders() const; + + virtual wxCoord GetStatusBarBorderBetweenFields() const; + + virtual wxSize GetStatusBarFieldMargins() const; +#endif // wxUSE_STATUSBAR + + virtual wxCoord GetCheckItemMargin() const { return 0; } + + + virtual void DrawFrameTitleBar(wxDC& dc, + const wxRect& rect, + const wxString& title, + const wxIcon& icon, + int flags, + int specialButton = 0, + int specialButtonFlag = 0); + virtual void DrawFrameBorder(wxDC& dc, + const wxRect& rect, + int flags); + virtual void DrawFrameBackground(wxDC& dc, + const wxRect& rect, + int flags); + virtual void DrawFrameTitle(wxDC& dc, + const wxRect& rect, + const wxString& title, + int flags); + virtual void DrawFrameIcon(wxDC& dc, + const wxRect& rect, + const wxIcon& icon, + int flags); + virtual void DrawFrameButton(wxDC& dc, + wxCoord x, wxCoord y, + int button, + int flags = 0); + + virtual wxRect GetFrameClientArea(const wxRect& rect, int flags) const; + + virtual wxSize GetFrameTotalSize(const wxSize& clientSize, int flags) const; + + virtual wxSize GetFrameMinSize(int flags) const; + + virtual wxSize GetFrameIconSize() const; + + virtual int HitTestFrame(const wxRect& rect, + const wxPoint& pt, + int flags = 0) const; +protected: + // various constants + enum ArrowDirection + { + Arrow_Left, + Arrow_Right, + Arrow_Up, + Arrow_Down, + Arrow_Max + }; + + enum ArrowStyle + { + Arrow_Normal, + Arrow_Disabled, + Arrow_Pressed, + Arrow_Inverted, + Arrow_InvertedDisabled, + Arrow_StateMax + }; + + enum FrameButtonType + { + FrameButton_Close, + FrameButton_Minimize, + FrameButton_Maximize, + FrameButton_Restore, + FrameButton_Help, + FrameButton_Max + }; + + enum IndicatorType + { + IndicatorType_Check, + IndicatorType_Radio, + IndicatorType_MaxCtrl, + IndicatorType_Menu = IndicatorType_MaxCtrl, + IndicatorType_Max + }; + + enum IndicatorState + { + IndicatorState_Normal, + IndicatorState_Pressed, // this one is for check/radioboxes + IndicatorState_Disabled, + IndicatorState_MaxCtrl, + + // the rest of the states are valid for menu items only + IndicatorState_Selected = IndicatorState_Pressed, + IndicatorState_SelectedDisabled = IndicatorState_MaxCtrl, + IndicatorState_MaxMenu + }; + + enum IndicatorStatus + { + IndicatorStatus_Checked, + IndicatorStatus_Unchecked, + IndicatorStatus_Undetermined, + IndicatorStatus_Max + }; + + // translate the appropriate bits in flags to the above enum elements + static void GetIndicatorsFromFlags(int flags, + IndicatorState& state, + IndicatorStatus& status); + + // translate wxDirection to ArrowDirection + static ArrowDirection GetArrowDirection(wxDirection dir); + + + // fill the rectangle with a brush of given colour (must be valid) + void DrawSolidRect(wxDC& dc, const wxColour& col, const wxRect& rect); + + + // all the functions in this section adjust the rect parameter to + // correspond to the interiour of the drawn area + + // draw complete rectangle + void DrawRect(wxDC& dc, wxRect *rect, const wxPen& pen); + + // draw the rectange using the first pen for the left and top sides + // and the second one for the bottom and right ones + void DrawShadedRect(wxDC& dc, wxRect *rect, + const wxPen& pen1, const wxPen& pen2); + + // border drawing routines, may be overridden in the derived class + virtual void DrawRaisedBorder(wxDC& dc, wxRect *rect); + virtual void DrawSunkenBorder(wxDC& dc, wxRect *rect); + virtual void DrawAntiSunkenBorder(wxDC& dc, wxRect *rect); + virtual void DrawBoxBorder(wxDC& dc, wxRect *rect); + virtual void DrawStaticBorder(wxDC& dc, wxRect *rect); + virtual void DrawExtraBorder(wxDC& dc, wxRect *rect); + + + // draw the frame with non-empty label inside the given rectText + virtual void DrawFrameWithLabel(wxDC& dc, + const wxString& label, + const wxRect& rectFrame, + const wxRect& rectText, + int flags, + int alignment, + int indexAccel); + + // draw the (static box) frame without the part corresponding to rectLabel + void DrawFrameWithoutLabel(wxDC& dc, + const wxRect& rectFrame, + const wxRect& rectLabel); + + + // draw the bitmap for a check item (which is by default the same as check + // box one but may be different) + virtual void DrawCheckItemBitmap(wxDC& dc, + const wxBitmap& bitmap, + const wxRect& rect, + int flags); + + // common routine for drawing check and radio buttons + void DrawCheckOrRadioButton(wxDC& dc, + const wxString& label, + const wxBitmap& bitmap, + const wxRect& rect, + int flags, + wxAlignment align, + int indexAccel); + + // return the check/radio bitmap for the given flags + virtual wxBitmap GetRadioBitmap(int flags) = 0; + virtual wxBitmap GetCheckBitmap(int flags) = 0; + + // return the frame icon bitmap + virtual wxBitmap GetFrameButtonBitmap(FrameButtonType type) = 0; + + // get the width of either normal or resizable frame border depending on + // whether flags contains wxTOPLEVEL_RESIZEABLE bit + // + // notice that these methods only make sense with standard border drawing + // code which uses the borders of the same width on all sides, this is why + // they are only present here and not in wxRenderer itself + virtual int GetFrameBorderWidth(int flags) const; + +#if wxUSE_TEXTCTRL + // return the width of the border around the text area in the text control + virtual int GetTextBorderWidth(const wxTextCtrl *text) const; +#endif // wxUSE_TEXTCTRL + + // GDI objects we often use + wxPen m_penBlack, + m_penDarkGrey, + m_penLightGrey, + m_penHighlight; + + wxFont m_titlebarFont; + + // the colours we use, they never change currently so we don't have to ever + // update m_penXXX objects above + const wxColourScheme * const m_scheme; + + wxDECLARE_NO_COPY_CLASS(wxStdRenderer); +}; + +#endif // _WX_UNIV_STDREND_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/textctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/textctrl.h new file mode 100644 index 0000000000..1c2565a852 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/textctrl.h @@ -0,0 +1,532 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/textctrl.h +// Purpose: wxTextCtrl class +// Author: Vadim Zeitlin +// Modified by: +// Created: 15.09.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_TEXTCTRL_H_ +#define _WX_UNIV_TEXTCTRL_H_ + +class WXDLLIMPEXP_FWD_CORE wxCaret; +class WXDLLIMPEXP_FWD_CORE wxTextCtrlCommandProcessor; + +#include "wx/scrolwin.h" // for wxScrollHelper + +#include "wx/univ/inphand.h" + +// ---------------------------------------------------------------------------- +// wxTextCtrl actions +// ---------------------------------------------------------------------------- + +// cursor movement and also selection and delete operations +#define wxACTION_TEXT_GOTO wxT("goto") // to pos in numArg +#define wxACTION_TEXT_FIRST wxT("first") // go to pos 0 +#define wxACTION_TEXT_LAST wxT("last") // go to last pos +#define wxACTION_TEXT_HOME wxT("home") +#define wxACTION_TEXT_END wxT("end") +#define wxACTION_TEXT_LEFT wxT("left") +#define wxACTION_TEXT_RIGHT wxT("right") +#define wxACTION_TEXT_UP wxT("up") +#define wxACTION_TEXT_DOWN wxT("down") +#define wxACTION_TEXT_WORD_LEFT wxT("wordleft") +#define wxACTION_TEXT_WORD_RIGHT wxT("wordright") +#define wxACTION_TEXT_PAGE_UP wxT("pageup") +#define wxACTION_TEXT_PAGE_DOWN wxT("pagedown") + +// clipboard operations +#define wxACTION_TEXT_COPY wxT("copy") +#define wxACTION_TEXT_CUT wxT("cut") +#define wxACTION_TEXT_PASTE wxT("paste") + +// insert text at the cursor position: the text is in strArg of PerformAction +#define wxACTION_TEXT_INSERT wxT("insert") + +// if the action starts with either of these prefixes and the rest of the +// string is one of the movement commands, it means to select/delete text from +// the current cursor position to the new one +#define wxACTION_TEXT_PREFIX_SEL wxT("sel") +#define wxACTION_TEXT_PREFIX_DEL wxT("del") + +// mouse selection +#define wxACTION_TEXT_ANCHOR_SEL wxT("anchorsel") +#define wxACTION_TEXT_EXTEND_SEL wxT("extendsel") +#define wxACTION_TEXT_SEL_WORD wxT("wordsel") +#define wxACTION_TEXT_SEL_LINE wxT("linesel") + +// undo or redo +#define wxACTION_TEXT_UNDO wxT("undo") +#define wxACTION_TEXT_REDO wxT("redo") + +// ---------------------------------------------------------------------------- +// wxTextCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextCtrl : public wxTextCtrlBase, + public wxScrollHelper +{ +public: + // creation + // -------- + + wxTextCtrl() : wxScrollHelper(this) { Init(); } + + wxTextCtrl(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr) + : wxScrollHelper(this) + { + Init(); + + Create(parent, id, value, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr); + + virtual ~wxTextCtrl(); + + // implement base class pure virtuals + // ---------------------------------- + + virtual int GetLineLength(wxTextCoord lineNo) const; + virtual wxString GetLineText(wxTextCoord lineNo) const; + virtual int GetNumberOfLines() const; + + virtual bool IsModified() const; + virtual bool IsEditable() const; + + // If the return values from and to are the same, there is no selection. + virtual void GetSelection(wxTextPos* from, wxTextPos* to) const; + + // operations + // ---------- + + // editing + virtual void Clear(); + virtual void Replace(wxTextPos from, wxTextPos to, const wxString& value); + virtual void Remove(wxTextPos from, wxTextPos to); + + // sets/clears the dirty flag + virtual void MarkDirty(); + virtual void DiscardEdits(); + + // writing text inserts it at the current position, appending always + // inserts it at the end + virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text); + + // translate between the position (which is just an index in the text ctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent (logical, i.e. unwrapped) column and line. + virtual wxTextPos XYToPosition(wxTextCoord x, wxTextCoord y) const; + virtual bool PositionToXY(wxTextPos pos, + wxTextCoord *x, wxTextCoord *y) const; + + // wxUniv-specific: find a screen position (in client coordinates) of the + // given text position or of the caret + bool PositionToLogicalXY(wxTextPos pos, wxCoord *x, wxCoord *y) const; + bool PositionToDeviceXY(wxTextPos pos, wxCoord *x, wxCoord *y) const; + wxPoint GetCaretPosition() const; + + virtual void ShowPosition(wxTextPos pos); + + // Clipboard operations + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + // Undo/redo + virtual void Undo(); + virtual void Redo(); + + virtual bool CanUndo() const; + virtual bool CanRedo() const; + + // Insertion point + virtual void SetInsertionPoint(wxTextPos pos); + virtual void SetInsertionPointEnd(); + virtual wxTextPos GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + + virtual void SetSelection(wxTextPos from, wxTextPos to); + virtual void SetEditable(bool editable); + + // wxUniv-specific methods + // ----------------------- + + // caret stuff + virtual void ShowCaret(bool show = true); + void HideCaret() { ShowCaret(false); } + void CreateCaret(); // for the current font size + + // helpers for cursor movement + wxTextPos GetWordStart() const; + wxTextPos GetWordEnd() const; + + // selection helpers + bool HasSelection() const + { return m_selStart != -1 && m_selEnd > m_selStart; } + void ClearSelection(); + void RemoveSelection(); + wxString GetSelectionText() const; + + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const; + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const; + + // find the character at this position in the given line, return value as + // for HitTest() + // + // NB: x is the logical coord (client and unscrolled) + wxTextCtrlHitTestResult HitTestLine(const wxString& line, + wxCoord x, + wxTextCoord *colOut) const; + + // bring the given position into view + void ShowHorzPosition(wxCoord pos); + + // scroll the window horizontally so that the first character shown is in + // position pos + void ScrollText(wxTextCoord col); + + // adjust the DC for horz text control scrolling too + virtual void DoPrepareDC(wxDC& dc); + + // implementation only from now on + // ------------------------------- + + // override this to take into account our scrollbar-less scrolling + virtual void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const; + virtual void CalcScrolledPosition(int x, int y, int *xx, int *yy) const; + + // perform an action + virtual bool PerformAction(const wxControlAction& action, + long numArg = -1, + const wxString& strArg = wxEmptyString); + + static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return GetStdInputHandler(handlerDef); + } + + // override these methods to handle the caret + virtual bool SetFont(const wxFont &font); + virtual bool Enable(bool enable = true); + + // more readable flag testing methods + bool IsPassword() const { return HasFlag(wxTE_PASSWORD); } + bool WrapLines() const { return m_wrapLines; } + + // only for wxStdTextCtrlInputHandler + void RefreshSelection(); + + // override wxScrollHelper method to prevent (auto)scrolling beyond the end + // of line + virtual bool SendAutoScrollEvents(wxScrollWinEvent& event) const; + + // idle processing + virtual void OnInternalIdle(); + +protected: + // ensure we have correct default border + virtual wxBorder GetDefaultBorder() const { return wxBORDER_SUNKEN; } + + // override base class methods + virtual void DoDrawBorder(wxDC& dc, const wxRect& rect); + virtual void DoDraw(wxControlRenderer *renderer); + + // calc the size from the text extent + virtual wxSize DoGetBestClientSize() const; + + // implements Set/ChangeValue() + virtual void DoSetValue(const wxString& value, int flags = 0); + virtual wxString DoGetValue() const; + + // common part of all ctors + void Init(); + + // drawing + // ------- + + // draw the text in the given rectangle + void DoDrawTextInRect(wxDC& dc, const wxRect& rectUpdate); + + // draw the line wrap marks in this rect + void DoDrawLineWrapMarks(wxDC& dc, const wxRect& rectUpdate); + + // line/row geometry calculations + // ------------------------------ + + // get the extent (width) of the text + wxCoord GetTextWidth(const wxString& text) const; + + // get the logical text width (accounting for scrolling) + wxCoord GetTotalWidth() const; + + // get total number of rows (different from number of lines if the lines + // can be wrapped) + wxTextCoord GetRowCount() const; + + // find the number of rows in this line (only if WrapLines()) + wxTextCoord GetRowsPerLine(wxTextCoord line) const; + + // get the starting row of the given line + wxTextCoord GetFirstRowOfLine(wxTextCoord line) const; + + // get the row following this line + wxTextCoord GetRowAfterLine(wxTextCoord line) const; + + // refresh functions + // ----------------- + + // the text area is the part of the window in which the text can be + // displayed, i.e. part of it inside the margins and the real text area is + // the area in which the text *is* currently displayed: for example, in the + // multiline control case the text area can have extra space at the bottom + // which is not tall enough for another line and which is then not included + // into the real text area + wxRect GetRealTextArea() const; + + // refresh the text in the given (in logical coords) rect + void RefreshTextRect(const wxRect& rect, bool textOnly = true); + + // refresh the line wrap marks for the given range of lines (inclusive) + void RefreshLineWrapMarks(wxTextCoord rowFirst, wxTextCoord rowLast); + + // refresh the text in the given range (in logical coords) of this line, if + // width is 0, refresh to the end of line + void RefreshPixelRange(wxTextCoord line, wxCoord start, wxCoord width); + + // refresh the text in the given range (in text coords) in this line + void RefreshColRange(wxTextCoord line, wxTextPos start, size_t count); + + // refresh the text from in the given line range (inclusive) + void RefreshLineRange(wxTextCoord lineFirst, wxTextCoord lineLast); + + // refresh the text in the given range which can span multiple lines + // (this method accepts arguments in any order) + void RefreshTextRange(wxTextPos start, wxTextPos end); + + // get the text to show: either the text itself or the text replaced with + // starts for wxTE_PASSWORD control + wxString GetTextToShow(const wxString& text) const; + + // find the row in this line where the given position (counted from the + // start of line) is + wxTextCoord GetRowInLine(wxTextCoord line, + wxTextCoord col, + wxTextCoord *colRowStart = NULL) const; + + // find the number of characters of a line before it wraps + // (and optionally also the real width of the line) + size_t GetPartOfWrappedLine(const wxChar* text, + wxCoord *widthReal = NULL) const; + + // get the start and end of the selection for this line: if the line is + // outside the selection, both will be -1 and false will be returned + bool GetSelectedPartOfLine(wxTextCoord line, + wxTextPos *start, wxTextPos *end) const; + + // update the text rect: the zone inside our client rect (its coords are + // client coords) which contains the text + void UpdateTextRect(); + + // calculate the last visible position + void UpdateLastVisible(); + + // move caret to the given position unconditionally + // (SetInsertionPoint() does nothing if the position didn't change) + void DoSetInsertionPoint(wxTextPos pos); + + // move caret to the new position without updating the display (for + // internal use only) + void MoveInsertionPoint(wxTextPos pos); + + // set the caret to its initial (default) position + void InitInsertionPoint(); + + // get the width of the longest line in pixels + wxCoord GetMaxWidth() const; + + // force recalculation of the max line width + void RecalcMaxWidth(); + + // update the max width after the given line was modified + void UpdateMaxWidth(wxTextCoord line); + + // hit testing + // ----------- + + // HitTest2() is more efficient than 2 consecutive HitTest()s with the same + // line (i.e. y) and it also returns the offset of the starting position in + // pixels + // + // as the last hack, this function accepts either logical or device (by + // default) coords depending on devCoords flag + wxTextCtrlHitTestResult HitTest2(wxCoord y, + wxCoord x1, + wxCoord x2, + wxTextCoord *row, + wxTextCoord *colStart, + wxTextCoord *colEnd, + wxTextCoord *colRowStart, + bool devCoords = true) const; + + // HitTest() version which takes the logical text coordinates and not the + // device ones + wxTextCtrlHitTestResult HitTestLogical(const wxPoint& pos, + wxTextCoord *col, + wxTextCoord *row) const; + + // get the line and the row in this line corresponding to the given row, + // return true if ok and false if row is out of range + // + // NB: this function can only be called for controls which wrap lines + bool GetLineAndRow(wxTextCoord row, + wxTextCoord *line, + wxTextCoord *rowInLine) const; + + // get the height of one line (the same for all lines) + wxCoord GetLineHeight() const + { + // this one should be already precalculated + wxASSERT_MSG( m_heightLine != -1, wxT("should have line height") ); + + return m_heightLine; + } + + // get the average char width + wxCoord GetAverageWidth() const { return m_widthAvg; } + + // recalc the line height and char width (to call when the font changes) + void RecalcFontMetrics(); + + // vertical scrolling helpers + // -------------------------- + + // all these functions are for multi line controls only + + // get the number of visible lines + size_t GetLinesPerPage() const; + + // return the position above the cursor or INVALID_POS_VALUE + wxTextPos GetPositionAbove(); + + // return the position below the cursor or INVALID_POS_VALUE + wxTextPos GetPositionBelow(); + + // event handlers + // -------------- + void OnChar(wxKeyEvent& event); + void OnSize(wxSizeEvent& event); + + // return the struct containing control-type dependent data + struct wxTextSingleLineData& SData() { return *m_data.sdata; } + struct wxTextMultiLineData& MData() { return *m_data.mdata; } + struct wxTextWrappedData& WData() { return *m_data.wdata; } + const wxTextSingleLineData& SData() const { return *m_data.sdata; } + const wxTextMultiLineData& MData() const { return *m_data.mdata; } + const wxTextWrappedData& WData() const { return *m_data.wdata; } + + // clipboard operations (unlike the versions without Do prefix, they have a + // return code) + bool DoCut(); + bool DoPaste(); + +private: + // all these methods are for multiline text controls only + + // update the scrollbars (only called from OnIdle) + void UpdateScrollbars(); + + // get read only access to the lines of multiline control + inline const wxArrayString& GetLines() const; + inline size_t GetLineCount() const; + + // replace a line (returns true if the number of rows in thel ine changed) + bool ReplaceLine(wxTextCoord line, const wxString& text); + + // remove a line + void RemoveLine(wxTextCoord line); + + // insert a line at this position + void InsertLine(wxTextCoord line, const wxString& text); + + // calculate geometry of this line + void LayoutLine(wxTextCoord line, class wxWrappedLineData& lineData) const; + + // calculate geometry of all lines until the given one + void LayoutLines(wxTextCoord lineLast) const; + + // the initially specified control size + wxSize m_sizeInitial; + + // the global control text + wxString m_value; + + // current position + wxTextPos m_curPos; + wxTextCoord m_curCol, + m_curRow; + + // last position (only used by GetLastPosition()) + wxTextPos m_posLast; + + // selection + wxTextPos m_selAnchor, + m_selStart, + m_selEnd; + + // flags + bool m_isModified:1, + m_isEditable:1, + m_hasCaret:1, + m_wrapLines:1; // can't be changed after creation + + // the rectangle (in client coordinates) to draw text inside + wxRect m_rectText; + + // the height of one line (cached value of GetCharHeight) + wxCoord m_heightLine; + + // and the average char width (cached value of GetCharWidth) + wxCoord m_widthAvg; + + // we have some data which depends on the kind of control (single or multi + // line) + union + { + wxTextSingleLineData *sdata; + wxTextMultiLineData *mdata; + wxTextWrappedData *wdata; + void *data; + } m_data; + + // the object to which we delegate our undo/redo implementation + wxTextCtrlCommandProcessor *m_cmdProcessor; + + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxTextCtrl) + + friend class wxWrappedLineData; +}; + +#endif // _WX_UNIV_TEXTCTRL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/tglbtn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/tglbtn.h new file mode 100644 index 0000000000..7485c19c5b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/tglbtn.h @@ -0,0 +1,69 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/tglbtn.h +// Purpose: wxToggleButton for wxUniversal +// Author: Vadim Zeitlin +// Modified by: David Bjorkevik +// Created: 16.05.06 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_TGLBTN_H_ +#define _WX_UNIV_TGLBTN_H_ + +#include "wx/button.h" + +// ---------------------------------------------------------------------------- +// wxToggleButton: a push button +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToggleButton: public wxButton +{ +public: + wxToggleButton(); + + wxToggleButton(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + wxToggleButton(wxWindow *parent, + wxWindowID id, + const wxString& label = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr); + + virtual ~wxToggleButton(); + + virtual bool IsPressed() const { return m_isPressed || m_value; } + + // wxToggleButton actions + virtual void Toggle(); + virtual void Click(); + + // Get/set the value + void SetValue(bool state); + bool GetValue() const { return m_value; } + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + + // the current value + bool m_value; + +private: + // common part of all ctors + void Init(); + + DECLARE_DYNAMIC_CLASS(wxToggleButton) +}; + +#endif // _WX_UNIV_TGLBTN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/theme.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/theme.h new file mode 100644 index 0000000000..6d18deeb6a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/theme.h @@ -0,0 +1,201 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/theme.h +// Purpose: wxTheme class manages all configurable aspects of the +// application including the look (wxRenderer), feel +// (wxInputHandler) and the colours (wxColourScheme) +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_THEME_H_ +#define _WX_UNIV_THEME_H_ + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// wxTheme +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxArtProvider; +class WXDLLIMPEXP_FWD_CORE wxColourScheme; +class WXDLLIMPEXP_FWD_CORE wxInputConsumer; +class WXDLLIMPEXP_FWD_CORE wxInputHandler; +class WXDLLIMPEXP_FWD_CORE wxRenderer; +struct WXDLLIMPEXP_FWD_CORE wxThemeInfo; + +class WXDLLIMPEXP_CORE wxTheme +{ +public: + // static methods + // -------------- + + // create the default theme + static bool CreateDefault(); + + // create the theme by name (will return NULL if not found) + static wxTheme *Create(const wxString& name); + + // change the current scheme + static wxTheme *Set(wxTheme *theme); + + // get the current theme (never NULL) + static wxTheme *Get() { return ms_theme; } + + // the theme methods + // ----------------- + + // get the renderer implementing all the control-drawing operations in + // this theme + virtual wxRenderer *GetRenderer() = 0; + + // get the art provider to be used together with this theme + virtual wxArtProvider *GetArtProvider() = 0; + + // get the input handler of the given type, forward to the standard one + virtual wxInputHandler *GetInputHandler(const wxString& handlerType, + wxInputConsumer *consumer) = 0; + + // get the colour scheme for the control with this name + virtual wxColourScheme *GetColourScheme() = 0; + + // implementation only from now on + // ------------------------------- + + virtual ~wxTheme(); + +private: + // the list of descriptions of all known themes + static wxThemeInfo *ms_allThemes; + + // the current theme + static wxTheme *ms_theme; + friend struct wxThemeInfo; +}; + +// ---------------------------------------------------------------------------- +// wxDelegateTheme: it is impossible to inherit from any of standard +// themes as their declarations are in private code, but you can use this +// class to override only some of their functions - all the other ones +// will be left to the original theme +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDelegateTheme : public wxTheme +{ +public: + wxDelegateTheme(const wxString& theme); + virtual ~wxDelegateTheme(); + + virtual wxRenderer *GetRenderer(); + virtual wxArtProvider *GetArtProvider(); + virtual wxInputHandler *GetInputHandler(const wxString& control, + wxInputConsumer *consumer); + virtual wxColourScheme *GetColourScheme(); + +protected: + // gets or creates theme and sets m_theme to point to it, + // returns true on success + bool GetOrCreateTheme(); + + wxString m_themeName; + wxTheme *m_theme; +}; + +// ---------------------------------------------------------------------------- +// dynamic theme creation helpers +// ---------------------------------------------------------------------------- + +struct WXDLLIMPEXP_CORE wxThemeInfo +{ + typedef wxTheme *(*Constructor)(); + + // theme name and (user readable) description + wxString name, desc; + + // the function to create a theme object + Constructor ctor; + + // next node in the linked list or NULL + wxThemeInfo *next; + + // constructor for the struct itself + wxThemeInfo(Constructor ctor, const wxString& name, const wxString& desc); +}; + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// to use a standard theme insert this macro into one of the application files: +// without it, an over optimizing linker may discard the object module +// containing the theme implementation entirely +#define WX_USE_THEME(themename) \ + /* this indirection makes it possible to pass macro as the argument */ \ + WX_USE_THEME_IMPL(themename) + +#define WX_USE_THEME_IMPL(themename) \ + extern WXDLLIMPEXP_DATA_CORE(bool) wxThemeUse##themename; \ + static struct wxThemeUserFor##themename \ + { \ + wxThemeUserFor##themename() { wxThemeUse##themename = true; } \ + } wxThemeDoUse##themename + +// to declare a new theme, this macro must be used in the class declaration +#define WX_DECLARE_THEME(themename) \ + private: \ + static wxThemeInfo ms_info##themename; \ + public: \ + const wxThemeInfo *GetThemeInfo() const \ + { return &ms_info##themename; } + +// and this one must be inserted in the source file +#define WX_IMPLEMENT_THEME(classname, themename, themedesc) \ + WXDLLIMPEXP_DATA_CORE(bool) wxThemeUse##themename = true; \ + wxTheme *wxCtorFor##themename() { return new classname; } \ + wxThemeInfo classname::ms_info##themename(wxCtorFor##themename, \ + wxT( #themename ), themedesc) + +// ---------------------------------------------------------------------------- +// determine default theme +// ---------------------------------------------------------------------------- + +#if wxUSE_ALL_THEMES + #undef wxUSE_THEME_WIN32 + #define wxUSE_THEME_WIN32 1 + #undef wxUSE_THEME_GTK + #define wxUSE_THEME_GTK 1 + #undef wxUSE_THEME_MONO + #define wxUSE_THEME_MONO 1 + #undef wxUSE_THEME_METAL + #define wxUSE_THEME_METAL 1 +#endif // wxUSE_ALL_THEMES + +// determine the default theme to use: +#if defined(__WXGTK__) && wxUSE_THEME_GTK + #define wxUNIV_DEFAULT_THEME gtk +#elif defined(__WXDFB__) && wxUSE_THEME_MONO + // use mono theme for DirectFB port because it cannot correctly + // render neither win32 nor gtk themes yet: + #define wxUNIV_DEFAULT_THEME mono +#endif + +// if no theme was picked, get any theme compiled in (sorted by +// quality/completeness of the theme): +#ifndef wxUNIV_DEFAULT_THEME + #if wxUSE_THEME_WIN32 + #define wxUNIV_DEFAULT_THEME win32 + #elif wxUSE_THEME_GTK + #define wxUNIV_DEFAULT_THEME gtk + #elif wxUSE_THEME_MONO + #define wxUNIV_DEFAULT_THEME mono + #endif + // If nothing matches, no themes are compiled and the app must provide + // some theme itself + // (note that wxUSE_THEME_METAL depends on win32 theme, so we don't have to + // try it) + // +#endif // !wxUNIV_DEFAULT_THEME + +#endif // _WX_UNIV_THEME_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/toolbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/toolbar.h new file mode 100644 index 0000000000..2ff1831800 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/toolbar.h @@ -0,0 +1,138 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/toolbar.h +// Purpose: wxToolBar declaration +// Author: Robert Roebling +// Modified by: +// Created: 10.09.00 +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_TOOLBAR_H_ +#define _WX_UNIV_TOOLBAR_H_ + +#include "wx/button.h" // for wxStdButtonInputHandler + +class WXDLLIMPEXP_FWD_CORE wxToolBarTool; + +// ---------------------------------------------------------------------------- +// the actions supported by this control +// ---------------------------------------------------------------------------- + +#define wxACTION_TOOLBAR_TOGGLE wxACTION_BUTTON_TOGGLE +#define wxACTION_TOOLBAR_PRESS wxACTION_BUTTON_PRESS +#define wxACTION_TOOLBAR_RELEASE wxACTION_BUTTON_RELEASE +#define wxACTION_TOOLBAR_CLICK wxACTION_BUTTON_CLICK +#define wxACTION_TOOLBAR_ENTER wxT("enter") // highlight the tool +#define wxACTION_TOOLBAR_LEAVE wxT("leave") // unhighlight the tool + +// ---------------------------------------------------------------------------- +// wxToolBar +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase +{ +public: + // construction/destruction + wxToolBar() { Init(); } + wxToolBar(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxToolBarNameStr) + { + Init(); + + Create(parent, id, pos, size, style, name); + } + + bool Create( wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxToolBarNameStr ); + + virtual ~wxToolBar(); + + virtual bool Realize(); + + virtual void SetWindowStyleFlag( long style ); + + virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const; + + virtual void SetToolShortHelp(int id, const wxString& helpString); + + virtual void SetMargins(int x, int y); + void SetMargins(const wxSize& size) + { SetMargins((int) size.x, (int) size.y); } + + virtual bool PerformAction(const wxControlAction& action, + long numArg = -1, + const wxString& strArg = wxEmptyString); + static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return GetStdInputHandler(handlerDef); + } + +protected: + // common part of all ctors + void Init(); + + // implement base class pure virtuals + virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); + virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); + + virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable); + virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle); + virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); + + virtual wxToolBarToolBase *CreateTool(int id, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled, + wxItemKind kind, + wxObject *clientData, + const wxString& shortHelp, + const wxString& longHelp); + virtual wxToolBarToolBase *CreateTool(wxControl *control, + const wxString& label); + + virtual wxSize DoGetBestClientSize() const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoDraw(wxControlRenderer *renderer); + + // get the bounding rect for the given tool + wxRect GetToolRect(wxToolBarToolBase *tool) const; + + // redraw the given tool + void RefreshTool(wxToolBarToolBase *tool); + + // (re)calculate the tool positions, should only be called if it is + // necessary to do it, i.e. m_needsLayout == true + void DoLayout(); + + // get the rect limits depending on the orientation: top/bottom for a + // vertical toolbar, left/right for a horizontal one + void GetRectLimits(const wxRect& rect, wxCoord *start, wxCoord *end) const; + +private: + // have we calculated the positions of our tools? + bool m_needsLayout; + + // the width of a separator + wxCoord m_widthSeparator; + + // the total size of all toolbar elements + wxCoord m_maxWidth, + m_maxHeight; + +private: + DECLARE_DYNAMIC_CLASS(wxToolBar) +}; + +#endif // _WX_UNIV_TOOLBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/toplevel.h new file mode 100644 index 0000000000..84fc34c49a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/toplevel.h @@ -0,0 +1,195 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/toplevel.h +// Purpose: Top level window, abstraction of wxFrame and wxDialog +// Author: Vaclav Slavik +// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef __WX_UNIV_TOPLEVEL_H__ +#define __WX_UNIV_TOPLEVEL_H__ + +#include "wx/univ/inpcons.h" +#include "wx/univ/inphand.h" +#include "wx/icon.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// frame decorations type flags used in wxRenderer and wxColourScheme +enum +{ + wxTOPLEVEL_ACTIVE = 0x00000001, + wxTOPLEVEL_MAXIMIZED = 0x00000002, + wxTOPLEVEL_TITLEBAR = 0x00000004, + wxTOPLEVEL_ICON = 0x00000008, + wxTOPLEVEL_RESIZEABLE = 0x00000010, + wxTOPLEVEL_BORDER = 0x00000020, + wxTOPLEVEL_BUTTON_CLOSE = 0x01000000, + wxTOPLEVEL_BUTTON_MAXIMIZE = 0x02000000, + wxTOPLEVEL_BUTTON_ICONIZE = 0x04000000, + wxTOPLEVEL_BUTTON_RESTORE = 0x08000000, + wxTOPLEVEL_BUTTON_HELP = 0x10000000 +}; + +// frame hit test return values: +enum +{ + wxHT_TOPLEVEL_NOWHERE = 0x00000000, + wxHT_TOPLEVEL_CLIENT_AREA = 0x00000001, + wxHT_TOPLEVEL_ICON = 0x00000002, + wxHT_TOPLEVEL_TITLEBAR = 0x00000004, + + wxHT_TOPLEVEL_BORDER_N = 0x00000010, + wxHT_TOPLEVEL_BORDER_S = 0x00000020, + wxHT_TOPLEVEL_BORDER_E = 0x00000040, + wxHT_TOPLEVEL_BORDER_W = 0x00000080, + wxHT_TOPLEVEL_BORDER_NE = wxHT_TOPLEVEL_BORDER_N | wxHT_TOPLEVEL_BORDER_E, + wxHT_TOPLEVEL_BORDER_SE = wxHT_TOPLEVEL_BORDER_S | wxHT_TOPLEVEL_BORDER_E, + wxHT_TOPLEVEL_BORDER_NW = wxHT_TOPLEVEL_BORDER_N | wxHT_TOPLEVEL_BORDER_W, + wxHT_TOPLEVEL_BORDER_SW = wxHT_TOPLEVEL_BORDER_S | wxHT_TOPLEVEL_BORDER_W, + wxHT_TOPLEVEL_ANY_BORDER = 0x000000F0, + + wxHT_TOPLEVEL_BUTTON_CLOSE = /*0x01000000*/ wxTOPLEVEL_BUTTON_CLOSE, + wxHT_TOPLEVEL_BUTTON_MAXIMIZE = /*0x02000000*/ wxTOPLEVEL_BUTTON_MAXIMIZE, + wxHT_TOPLEVEL_BUTTON_ICONIZE = /*0x04000000*/ wxTOPLEVEL_BUTTON_ICONIZE, + wxHT_TOPLEVEL_BUTTON_RESTORE = /*0x08000000*/ wxTOPLEVEL_BUTTON_RESTORE, + wxHT_TOPLEVEL_BUTTON_HELP = /*0x10000000*/ wxTOPLEVEL_BUTTON_HELP, + wxHT_TOPLEVEL_ANY_BUTTON = 0x1F000000 +}; + +// Flags for interactive frame manipulation functions (only in wxUniversal): +enum +{ + wxINTERACTIVE_MOVE = 0x00000001, + wxINTERACTIVE_RESIZE = 0x00000002, + wxINTERACTIVE_RESIZE_S = 0x00000010, + wxINTERACTIVE_RESIZE_N = 0x00000020, + wxINTERACTIVE_RESIZE_W = 0x00000040, + wxINTERACTIVE_RESIZE_E = 0x00000080, + wxINTERACTIVE_WAIT_FOR_INPUT = 0x10000000 +}; + +// ---------------------------------------------------------------------------- +// the actions supported by this control +// ---------------------------------------------------------------------------- + +#define wxACTION_TOPLEVEL_ACTIVATE wxT("activate") // (de)activate the frame +#define wxACTION_TOPLEVEL_BUTTON_PRESS wxT("pressbtn") // press titlebar btn +#define wxACTION_TOPLEVEL_BUTTON_RELEASE wxT("releasebtn") // press titlebar btn +#define wxACTION_TOPLEVEL_BUTTON_CLICK wxT("clickbtn") // press titlebar btn +#define wxACTION_TOPLEVEL_MOVE wxT("move") // move the frame +#define wxACTION_TOPLEVEL_RESIZE wxT("resize") // resize the frame + +//----------------------------------------------------------------------------- +// wxTopLevelWindow +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTopLevelWindow : public wxTopLevelWindowNative, + public wxInputConsumer +{ +public: + // construction + wxTopLevelWindow() { Init(); } + wxTopLevelWindow(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + // wxUniv-specific methods: do [not] use native decorations for this (or + // all) window(s) + // + // notice that this has no effect if the system doesn't support any native + // decorations anyhow and that by default native decorations are used + // + // if UseNativeDecorations() is used, it must be called before Create() + static void UseNativeDecorationsByDefault(bool native = true); + void UseNativeDecorations(bool native = true); + bool IsUsingNativeDecorations() const; + + + // implement base class pure virtuals + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); + virtual wxPoint GetClientAreaOrigin() const; + virtual void SetIcons(const wxIconBundle& icons); + + // implementation from now on + // -------------------------- + + // tests for frame's part at given point + long HitTest(const wxPoint& pt) const; + + virtual bool PerformAction(const wxControlAction& action, + long numArg = -1, + const wxString& strArg = wxEmptyString); + + static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef); + virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef) + { + return GetStdInputHandler(handlerDef); + } + + // move/resize the frame interactively, i.e. let the user do it + virtual void InteractiveMove(int flags = wxINTERACTIVE_MOVE); + + virtual wxSize GetMinSize() const; + + virtual wxWindow *GetInputWindow() const { return const_cast<wxTopLevelWindow*>(this); } + +protected: + virtual void DoGetClientSize(int *width, int *height) const; + virtual void DoSetClientSize(int width, int height); + + // handle titlebar button click event + virtual void ClickTitleBarButton(long button); + + // return wxTOPLEVEL_xxx combination based on current state of the frame + long GetDecorationsStyle() const; + + // common part of all ctors + void Init(); + + void RefreshTitleBar(); + void OnNcPaint(wxNcPaintEvent& event); + void OnSystemMenu(wxCommandEvent& event); + + // true if wxTLW should render decorations (aka titlebar) itself + static int ms_drawDecorations; + // true if wxTLW can be iconized + static int ms_canIconize; + + // true if we're using native decorations + bool m_usingNativeDecorations; + // true for currently active frame + bool m_isActive; + // version of icon for titlebar (16x16) + wxIcon m_titlebarIcon; + // saved window style in fullscreen mdoe + long m_fsSavedStyle; + // currently pressed titlebar button + long m_pressedButton; + + DECLARE_DYNAMIC_CLASS(wxTopLevelWindow) + DECLARE_EVENT_TABLE() + WX_DECLARE_INPUT_CONSUMER() +}; + +#endif // __WX_UNIV_TOPLEVEL_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/window.h new file mode 100644 index 0000000000..d34077af92 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/univ/window.h @@ -0,0 +1,291 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/univ/window.h +// Purpose: wxWindow class which is the base class for all +// wxUniv port controls, it supports the customization of the +// window drawing and input processing. +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.08.00 +// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIV_WINDOW_H_ +#define _WX_UNIV_WINDOW_H_ + +#include "wx/bitmap.h" // for m_bitmapBg + +class WXDLLIMPEXP_FWD_CORE wxControlRenderer; +class WXDLLIMPEXP_FWD_CORE wxEventLoop; + +#if wxUSE_MENUS + class WXDLLIMPEXP_FWD_CORE wxMenu; + class WXDLLIMPEXP_FWD_CORE wxMenuBar; +#endif // wxUSE_MENUS + +class WXDLLIMPEXP_FWD_CORE wxRenderer; + +#if wxUSE_SCROLLBAR + class WXDLLIMPEXP_FWD_CORE wxScrollBar; +#endif // wxUSE_SCROLLBAR + +#ifdef __WXX11__ +#define wxUSE_TWO_WINDOWS 1 +#else +#define wxUSE_TWO_WINDOWS 0 +#endif + +// ---------------------------------------------------------------------------- +// wxWindow +// ---------------------------------------------------------------------------- + +#if defined(__WXMSW__) +#define wxWindowNative wxWindowMSW +#elif defined(__WXGTK__) +#define wxWindowNative wxWindowGTK +#elif defined(__WXX11__) +#define wxWindowNative wxWindowX11 +#elif defined(__WXMAC__) +#define wxWindowNative wxWindowMac +#endif + +class WXDLLIMPEXP_CORE wxWindow : public wxWindowNative +{ +public: + // ctors and create functions + // --------------------------- + + wxWindow() { Init(); } + + wxWindow(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + : wxWindowNative(parent, id, pos, size, style | wxCLIP_CHILDREN, name) + { Init(); } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + + virtual ~wxWindow(); + + // background pixmap support + // ------------------------- + + virtual void SetBackground(const wxBitmap& bitmap, + int alignment = wxALIGN_CENTRE, + wxStretch stretch = wxSTRETCH_NOT); + + const wxBitmap& GetBackgroundBitmap(int *alignment = NULL, + wxStretch *stretch = NULL) const; + + // scrollbars: we (re)implement it ourselves using our own scrollbars + // instead of the native ones + // ------------------------------------------------------------------ + + virtual void SetScrollbar(int orient, + int pos, + int page, + int range, + bool refresh = true ); + virtual void SetScrollPos(int orient, int pos, bool refresh = true); + virtual int GetScrollPos(int orient) const; + virtual int GetScrollThumb(int orient) const; + virtual int GetScrollRange(int orient) const; + virtual void ScrollWindow(int dx, int dy, + const wxRect* rect = NULL); + + // take into account the borders here + virtual wxPoint GetClientAreaOrigin() const; + + // popup menu support + // ------------------ + + // NB: all menu related functions are implemented in menu.cpp + +#if wxUSE_MENUS + // this is wxUniv-specific private method to be used only by wxMenu + void DismissPopupMenu(); +#endif // wxUSE_MENUS + + // miscellaneous other methods + // --------------------------- + + // get the state information + virtual bool IsFocused() const; + virtual bool IsCurrent() const; + virtual bool IsPressed() const; + virtual bool IsDefault() const; + + // return all state flags at once (combination of wxCONTROL_XXX values) + int GetStateFlags() const; + + // set the "highlighted" flag and return true if it changed + virtual bool SetCurrent(bool doit = true); + +#if wxUSE_SCROLLBAR + // get the scrollbar (may be NULL) for the given orientation + wxScrollBar *GetScrollbar(int orient) const + { + return orient & wxVERTICAL ? m_scrollbarVert : m_scrollbarHorz; + } +#endif // wxUSE_SCROLLBAR + + // methods used by wxColourScheme to choose the colours for this window + // -------------------------------------------------------------------- + + // return true if this is a panel/canvas window which contains other + // controls only + virtual bool IsCanvasWindow() const { return false; } + + // return true if this control can be highlighted when the mouse is over + // it (the theme decides itself whether it is really highlighted or not) + virtual bool CanBeHighlighted() const { return false; } + + // return true if we should use the colours/fonts returned by the + // corresponding GetXXX() methods instead of the default ones + bool UseFgCol() const { return m_hasFgCol; } + bool UseFont() const { return m_hasFont; } + + // return true if this window serves as a container for the other windows + // only and doesn't get any input itself + virtual bool IsStaticBox() const { return false; } + + // returns the (low level) renderer to use for drawing the control by + // querying the current theme + wxRenderer *GetRenderer() const { return m_renderer; } + + // scrolling helper: like ScrollWindow() except that it doesn't refresh the + // uncovered window areas but returns the rectangle to update (don't call + // this with both dx and dy non zero) + wxRect ScrollNoRefresh(int dx, int dy, const wxRect *rect = NULL); + + // after scrollbars are added or removed they must be refreshed by calling + // this function + void RefreshScrollbars(); + + // erase part of the control + virtual void EraseBackground(wxDC& dc, const wxRect& rect); + + // overridden base class methods + // ----------------------------- + + // the rect coordinates are, for us, in client coords, but if no rect is + // specified, the entire window is refreshed + virtual void Refresh(bool eraseBackground = true, + const wxRect *rect = (const wxRect *) NULL); + + // we refresh the window when it is dis/enabled + virtual bool Enable(bool enable = true); + + // should we use the standard control colours or not? + virtual bool ShouldInheritColours() const { return false; } + + virtual bool IsClientAreaChild(const wxWindow *child) const + { +#if wxUSE_SCROLLBAR + if ( child == (wxWindow*)m_scrollbarHorz || + child == (wxWindow*)m_scrollbarVert ) + return false; +#endif + return wxWindowNative::IsClientAreaChild(child); + } + +protected: + // common part of all ctors + void Init(); + +#if wxUSE_MENUS + virtual bool DoPopupMenu(wxMenu *menu, int x, int y); +#endif // wxUSE_MENUS + + // we deal with the scrollbars in these functions + virtual void DoSetClientSize(int width, int height); + virtual void DoGetClientSize(int *width, int *height) const; + virtual wxHitTest DoHitTest(wxCoord x, wxCoord y) const; + + // event handlers + void OnSize(wxSizeEvent& event); + void OnNcPaint(wxNcPaintEvent& event); + void OnPaint(wxPaintEvent& event); + void OnErase(wxEraseEvent& event); + +#if wxUSE_ACCEL || wxUSE_MENUS + void OnKeyDown(wxKeyEvent& event); +#endif // wxUSE_ACCEL + +#if wxUSE_MENUS + void OnChar(wxKeyEvent& event); + void OnKeyUp(wxKeyEvent& event); +#endif // wxUSE_MENUS + + // draw the control background, return true if done + virtual bool DoDrawBackground(wxDC& dc); + + // draw the controls border + virtual void DoDrawBorder(wxDC& dc, const wxRect& rect); + + // draw the controls contents + virtual void DoDraw(wxControlRenderer *renderer); + + // override the base class method to return the size of the window borders + virtual wxSize DoGetBorderSize() const; + + // adjust the size of the window to take into account its borders + wxSize AdjustSize(const wxSize& size) const; + + // put the scrollbars along the edges of the window + void PositionScrollbars(); + +#if wxUSE_MENUS + // return the menubar of the parent frame or NULL + wxMenuBar *GetParentFrameMenuBar() const; +#endif // wxUSE_MENUS + + // the renderer we use + wxRenderer *m_renderer; + + // background bitmap info + wxBitmap m_bitmapBg; + int m_alignBgBitmap; + wxStretch m_stretchBgBitmap; + + // old size + wxSize m_oldSize; + + // is the mouse currently inside the window? + bool m_isCurrent:1; + +#ifdef __WXMSW__ +public: + // override MSWWindowProc() to process WM_NCHITTEST + WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); +#endif // __WXMSW__ + +private: + +#if wxUSE_SCROLLBAR + // the window scrollbars + wxScrollBar *m_scrollbarHorz, + *m_scrollbarVert; +#endif // wxUSE_SCROLLBAR + +#if wxUSE_MENUS + // the current modal event loop for the popup menu we show or NULL + static wxEventLoop *ms_evtLoopPopup; + + // the last window over which Alt was pressed (used by OnKeyUp) + static wxWindow *ms_winLastAltPress; +#endif // wxUSE_MENUS + + DECLARE_DYNAMIC_CLASS(wxWindow) + DECLARE_EVENT_TABLE() +}; + +#endif // _WX_UNIV_WINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/app.h new file mode 100644 index 0000000000..f14df9ec3f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/app.h @@ -0,0 +1,73 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/app.h +// Purpose: wxAppConsole implementation for Unix +// Author: Lukasz Michalski +// Created: 28/01/2005 +// Copyright: (c) Lukasz Michalski +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +//Ensure that sigset_t is being defined +#include <signal.h> + +class wxFDIODispatcher; +class wxFDIOHandler; +class wxWakeUpPipe; + +// wxApp subclass implementing event processing for console applications +class WXDLLIMPEXP_BASE wxAppConsole : public wxAppConsoleBase +{ +public: + wxAppConsole(); + virtual ~wxAppConsole(); + + // override base class initialization + virtual bool Initialize(int& argc, wxChar** argv); + + + // Unix-specific: Unix signal handling + // ----------------------------------- + + // type of the function which can be registered as signal handler: notice + // that it isn't really a signal handler, i.e. it's not subject to the + // usual signal handlers constraints, because it is called later from + // CheckSignal() and not when the signal really occurs + typedef void (*SignalHandler)(int); + + // Set signal handler for the given signal, SIG_DFL or SIG_IGN can be used + // instead of a function pointer + // + // Return true if handler was installed, false on error + bool SetSignalHandler(int signal, SignalHandler handler); + + // Check if any Unix signals arrived since the last call and execute + // handlers for them + void CheckSignal(); + + // Register the signal wake up pipe with the given dispatcher. + // + // This is used by wxExecute(wxEXEC_NOEVENTS) implementation only. + // + // The pointer to the handler used for processing events on this descriptor + // is returned so that it can be deleted when we no longer needed it. + wxFDIOHandler* RegisterSignalWakeUpPipe(wxFDIODispatcher& dispatcher); + +private: + // signal handler set up by SetSignalHandler() for all signals we handle, + // it just adds the signal to m_signalsCaught -- the real processing is + // done later, when CheckSignal() is called + static void HandleSignal(int signal); + + + // signals for which HandleSignal() had been called (reset from + // CheckSignal()) + sigset_t m_signalsCaught; + + // the signal handlers + WX_DECLARE_HASH_MAP(int, SignalHandler, wxIntegerHash, wxIntegerEqual, SignalHandlerHash); + SignalHandlerHash m_signalHandlerHash; + + // pipe used for wake up signal handling: if a signal arrives while we're + // blocking for input, writing to this pipe triggers a call to our CheckSignal() + wxWakeUpPipe *m_signalWakeUpPipe; +}; diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/apptbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/apptbase.h new file mode 100644 index 0000000000..6ce6f152c3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/apptbase.h @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/apptbase.h +// Purpose: declaration of wxAppTraits for Unix systems +// Author: Vadim Zeitlin +// Modified by: +// Created: 23.06.2003 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_APPTBASE_H_ +#define _WX_UNIX_APPTBASE_H_ + +#include "wx/evtloop.h" +#include "wx/evtloopsrc.h" + +class wxExecuteData; +class wxFDIOManager; +class wxEventLoopSourcesManagerBase; + +// ---------------------------------------------------------------------------- +// wxAppTraits: the Unix version adds extra hooks needed by Unix code +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase +{ +public: + // wxExecute() support methods + // --------------------------- + + // Wait for the process termination and return its exit code or -1 on error. + // + // Notice that this is only used when execData.flags contains wxEXEC_SYNC + // and does not contain wxEXEC_NOEVENTS, i.e. when we need to really wait + // until the child process exit and dispatch the events while doing it. + virtual int WaitForChild(wxExecuteData& execData); + +#if wxUSE_SOCKETS + // return a pointer to the object which should be used to integrate + // monitoring of the file descriptors to the event loop (currently this is + // used for the sockets only but should be used for arbitrary event loop + // sources in the future) + // + // this object may be different for the console and GUI applications + // + // the pointer is not deleted by the caller as normally it points to a + // static variable + virtual wxFDIOManager *GetFDIOManager(); +#endif // wxUSE_SOCKETS + +#if wxUSE_CONSOLE_EVENTLOOP + // Return a non-NULL pointer to the object responsible for managing the + // event loop sources in this kind of application. + virtual wxEventLoopSourcesManagerBase* GetEventLoopSourcesManager(); +#endif // wxUSE_CONSOLE_EVENTLOOP + +protected: + // Wait for the process termination by running the given event loop until + // this happens. + // + // This is used by the public WaitForChild() after creating the event loop + // of the appropriate kind. + int RunLoopUntilChildExit(wxExecuteData& execData, wxEventLoopBase& loop); +}; + +#endif // _WX_UNIX_APPTBASE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/apptrait.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/apptrait.h new file mode 100644 index 0000000000..3fbe4d82da --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/apptrait.h @@ -0,0 +1,94 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/apptrait.h +// Purpose: standard implementations of wxAppTraits for Unix +// Author: Vadim Zeitlin +// Modified by: +// Created: 23.06.2003 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_APPTRAIT_H_ +#define _WX_UNIX_APPTRAIT_H_ + +// ---------------------------------------------------------------------------- +// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase +{ +public: +#if wxUSE_CONSOLE_EVENTLOOP + virtual wxEventLoopBase *CreateEventLoop(); +#endif // wxUSE_CONSOLE_EVENTLOOP +#if wxUSE_TIMER + virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); +#endif +}; + +#if wxUSE_GUI + +// GTK+ and Motif integrate sockets and child processes monitoring directly in +// their main loop, the other Unix ports do it at wxEventLoop level and so use +// the non-GUI traits and don't need anything here +// +// TODO: Should we use XtAddInput() for wxX11 too? Or, vice versa, if there is +// no advantage in doing this compared to the generic way currently used +// by wxX11, should we continue to use GTK/Motif-specific stuff? +#if defined(__WXGTK__) || defined(__WXMOTIF__) + #define wxHAS_GUI_FDIOMANAGER + #define wxHAS_GUI_PROCESS_CALLBACKS +#endif // ports using wxFDIOManager + +#if defined(__WXMAC__) + #define wxHAS_GUI_PROCESS_CALLBACKS + #define wxHAS_GUI_SOCKET_MANAGER +#endif + +class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase +{ +public: + virtual wxEventLoopBase *CreateEventLoop(); + virtual int WaitForChild(wxExecuteData& execData); +#if wxUSE_TIMER + virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); +#endif +#if wxUSE_THREADS && defined(__WXGTK20__) + virtual void MutexGuiEnter(); + virtual void MutexGuiLeave(); +#endif + +#if (defined(__WXMAC__) || defined(__WXCOCOA__)) && wxUSE_STDPATHS + virtual wxStandardPaths& GetStandardPaths(); +#endif + virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const; + +#ifdef __WXGTK20__ + virtual wxString GetDesktopEnvironment() const; + virtual wxString GetStandardCmdLineOptions(wxArrayString& names, + wxArrayString& desc) const; +#endif // __WXGTK20____ + +#if defined(__WXGTK20__) + virtual bool ShowAssertDialog(const wxString& msg); +#endif + +#if wxUSE_SOCKETS + +#ifdef wxHAS_GUI_SOCKET_MANAGER + virtual wxSocketManager *GetSocketManager(); +#endif + +#ifdef wxHAS_GUI_FDIOMANAGER + virtual wxFDIOManager *GetFDIOManager(); +#endif + +#endif // wxUSE_SOCKETS + + virtual wxEventLoopSourcesManagerBase* GetEventLoopSourcesManager(); +}; + +#endif // wxUSE_GUI + +#endif // _WX_UNIX_APPTRAIT_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/chkconf.h new file mode 100644 index 0000000000..b8a1904133 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/chkconf.h @@ -0,0 +1,43 @@ +/* + * Name: wx/unix/chkconf.h + * Purpose: Unix-specific config settings consistency checks + * Author: Vadim Zeitlin + * Created: 2007-07-14 + * Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwidgets.org> + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#if wxUSE_CONSOLE_EVENTLOOP +# if !wxUSE_SELECT_DISPATCHER && !wxUSE_EPOLL_DISPATCHER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxSelect/EpollDispatcher needed for console event loop" +# else +# undef wxUSE_SELECT_DISPATCHER +# define wxUSE_SELECT_DISPATCHER 1 +# endif +# endif +#endif /* wxUSE_CONSOLE_EVENTLOOP */ + +#if wxUSE_FSWATCHER +# if !defined(wxHAS_INOTIFY) && !defined(wxHAS_KQUEUE) +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxFileSystemWatcher requires either inotify() or kqueue()" +# else +# undef wxUSE_FSWATCHER +# define wxUSE_FSWATCHER 0 +# endif +# endif +#endif /* wxUSE_FSWATCHER */ + +#if wxUSE_GSTREAMER +# if !wxUSE_THREADS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "GStreamer requires threads" +# else +# undef wxUSE_GSTREAMER +# define wxUSE_GSTREAMER 0 +# endif +# endif +#endif /* wxUSE_GSTREAMER */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/evtloop.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/evtloop.h new file mode 100644 index 0000000000..2b91c72375 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/evtloop.h @@ -0,0 +1,62 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/evtloop.h +// Purpose: declares wxEventLoop class +// Author: Lukasz Michalski (lm@zork.pl) +// Created: 2007-05-07 +// Copyright: (c) 2007 Lukasz Michalski +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_EVTLOOP_H_ +#define _WX_UNIX_EVTLOOP_H_ + +#if wxUSE_CONSOLE_EVENTLOOP + +// ---------------------------------------------------------------------------- +// wxConsoleEventLoop +// ---------------------------------------------------------------------------- + +class wxEventLoopSource; +class wxFDIODispatcher; +class wxWakeUpPipeMT; + +class WXDLLIMPEXP_BASE wxConsoleEventLoop +#ifdef __WXOSX__ +: public wxCFEventLoop +#else +: public wxEventLoopManual +#endif +{ +public: + // initialize the event loop, use IsOk() to check if we were successful + wxConsoleEventLoop(); + virtual ~wxConsoleEventLoop(); + + // implement base class pure virtuals + virtual bool Pending() const; + virtual bool Dispatch(); + virtual int DispatchTimeout(unsigned long timeout); + virtual void WakeUp(); + virtual bool IsOk() const { return m_dispatcher != NULL; } + virtual bool YieldFor(long WXUNUSED(eventsToProcess)) { return true; } + +protected: + virtual void OnNextIteration(); + +private: + // pipe used for wake up messages: when a child thread wants to wake up + // the event loop in the main thread it writes to this pipe + wxWakeUpPipeMT *m_wakeupPipe; + + // the event loop source used to monitor this pipe + wxEventLoopSource* m_wakeupSource; + + // either wxSelectDispatcher or wxEpollDispatcher + wxFDIODispatcher *m_dispatcher; + + wxDECLARE_NO_COPY_CLASS(wxConsoleEventLoop); +}; + +#endif // wxUSE_CONSOLE_EVENTLOOP + +#endif // _WX_UNIX_EVTLOOP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/evtloopsrc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/evtloopsrc.h new file mode 100644 index 0000000000..4c2cfec167 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/evtloopsrc.h @@ -0,0 +1,48 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/evtloopsrc.h +// Purpose: wxUnixEventLoopSource class +// Author: Vadim Zeitlin +// Created: 2009-10-21 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_EVTLOOPSRC_H_ +#define _WX_UNIX_EVTLOOPSRC_H_ + +class wxFDIODispatcher; +class wxFDIOHandler; + +// ---------------------------------------------------------------------------- +// wxUnixEventLoopSource: wxEventLoopSource for Unix-like toolkits using fds +// ---------------------------------------------------------------------------- + +class wxUnixEventLoopSource : public wxEventLoopSource +{ +public: + // dispatcher and fdioHandler are only used here to allow us to unregister + // from the event loop when we're destroyed + wxUnixEventLoopSource(wxFDIODispatcher *dispatcher, + wxFDIOHandler *fdioHandler, + int fd, + wxEventLoopSourceHandler *handler, + int flags) + : wxEventLoopSource(handler, flags), + m_dispatcher(dispatcher), + m_fdioHandler(fdioHandler), + m_fd(fd) + { + } + + virtual ~wxUnixEventLoopSource(); + +private: + wxFDIODispatcher * const m_dispatcher; + wxFDIOHandler * const m_fdioHandler; + const int m_fd; + + wxDECLARE_NO_COPY_CLASS(wxUnixEventLoopSource); +}; + +#endif // _WX_UNIX_EVTLOOPSRC_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/execute.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/execute.h new file mode 100644 index 0000000000..9756c00a7d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/execute.h @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/execute.h +// Purpose: private details of wxExecute() implementation +// Author: Vadim Zeitlin +// Copyright: (c) 1998 Robert Roebling, Julian Smart, Vadim Zeitlin +// (c) 2013 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_EXECUTE_H +#define _WX_UNIX_EXECUTE_H + +#include "wx/app.h" +#include "wx/hashmap.h" +#include "wx/process.h" + +#if wxUSE_STREAMS + #include "wx/unix/pipe.h" + #include "wx/private/streamtempinput.h" +#endif + +class wxEventLoopBase; + +// Information associated with a running child process. +class wxExecuteData +{ +public: + wxExecuteData() + { + flags = + pid = 0; + exitcode = -1; + + process = NULL; + + syncEventLoop = NULL; + +#if wxUSE_STREAMS + fdOut = + fdErr = wxPipe::INVALID_FD; +#endif // wxUSE_STREAMS + } + + // This must be called in the parent process as soon as fork() returns to + // update us with the effective child PID. It also ensures that we handle + // SIGCHLD to be able to detect when this PID exits, so wxTheApp must be + // available. + void OnStart(int pid); + + // Called when the child process exits. + void OnExit(int exitcode); + + // Return true if we should (or already did) redirect the child IO. + bool IsRedirected() const { return process && process->IsRedirected(); } + + + // wxExecute() flags + int flags; + + // the pid of the child process + int pid; + + // The exit code of the process, set once the child terminates. + int exitcode; + + // the associated process object or NULL + wxProcess *process; + + // Local event loop used to wait for the child process termination in + // synchronous execution case. We can't create it ourselves as its exact + // type depends on the application kind (console/GUI), so we rely on + // wxAppTraits setting up this pointer to point to the appropriate object. + wxEventLoopBase *syncEventLoop; + +#if wxUSE_STREAMS + // the input buffer bufOut is connected to stdout, this is why it is + // called bufOut and not bufIn + wxStreamTempInputBuffer bufOut, + bufErr; + + // the corresponding FDs, -1 if not redirected + int fdOut, + fdErr; +#endif // wxUSE_STREAMS + + +private: + // SIGCHLD signal handler that checks whether any of the currently running + // children have exited. + static void OnSomeChildExited(int sig); + + // All currently running child processes indexed by their PID. + // + // Notice that the container doesn't own its elements. + WX_DECLARE_HASH_MAP(int, wxExecuteData*, wxIntegerHash, wxIntegerEqual, + ChildProcessesData); + static ChildProcessesData ms_childProcesses; + + wxDECLARE_NO_COPY_CLASS(wxExecuteData); +}; + +#endif // _WX_UNIX_EXECUTE_H diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/fontutil.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/fontutil.h new file mode 100644 index 0000000000..64cb3a3ccd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/fontutil.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/fontutil.h +// Purpose: font-related helper functions for Unix/X11 +// Author: Vadim Zeitlin +// Modified by: +// Created: 05.11.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_FONTUTIL_H_ +#define _WX_UNIX_FONTUTIL_H_ + +#ifdef __X__ + typedef WXFontStructPtr wxNativeFont; +#elif defined(__WXGTK__) + typedef GdkFont *wxNativeFont; +#else + #error "Unsupported toolkit" +#endif + +// returns the handle of the nearest available font or 0 +extern wxNativeFont +wxLoadQueryNearestFont(int pointSize, + int family, + int style, + int weight, + bool underlined, + const wxString &facename, + wxFontEncoding encoding, + wxString* xFontName = NULL); + +// returns the font specified by the given XLFD +extern wxNativeFont wxLoadFont(const wxString& fontSpec); + +#endif // _WX_UNIX_FONTUTIL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/fswatcher_inotify.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/fswatcher_inotify.h new file mode 100644 index 0000000000..1881966053 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/fswatcher_inotify.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/fswatcher_inotify.h +// Purpose: wxInotifyFileSystemWatcher +// Author: Bartosz Bekier +// Created: 2009-05-26 +// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FSWATCHER_UNIX_H_ +#define _WX_FSWATCHER_UNIX_H_ + +#include "wx/defs.h" + +#if wxUSE_FSWATCHER + +class WXDLLIMPEXP_BASE wxInotifyFileSystemWatcher : + public wxFileSystemWatcherBase +{ +public: + wxInotifyFileSystemWatcher(); + + wxInotifyFileSystemWatcher(const wxFileName& path, + int events = wxFSW_EVENT_ALL); + + virtual ~wxInotifyFileSystemWatcher(); + + void OnDirDeleted(const wxString& path); + +protected: + bool Init(); +}; + +#endif + +#endif /* _WX_FSWATCHER_UNIX_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/fswatcher_kqueue.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/fswatcher_kqueue.h new file mode 100644 index 0000000000..a324eb7efd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/fswatcher_kqueue.h @@ -0,0 +1,34 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/fswatcher_kqueue.h +// Purpose: wxKqueueFileSystemWatcher +// Author: Bartosz Bekier +// Created: 2009-05-26 +// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FSWATCHER_KQUEUE_H_ +#define _WX_FSWATCHER_KQUEUE_H_ + +#include "wx/defs.h" + +#if wxUSE_FSWATCHER + +class WXDLLIMPEXP_BASE wxKqueueFileSystemWatcher : + public wxFileSystemWatcherBase +{ +public: + wxKqueueFileSystemWatcher(); + + wxKqueueFileSystemWatcher(const wxFileName& path, + int events = wxFSW_EVENT_ALL); + + virtual ~wxKqueueFileSystemWatcher(); + +protected: + bool Init(); +}; + +#endif + +#endif /* _WX_FSWATCHER_OSX_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/glx11.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/glx11.h new file mode 100644 index 0000000000..34ed4dd46d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/glx11.h @@ -0,0 +1,164 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/glx11.h +// Purpose: class common for all X11-based wxGLCanvas implementations +// Author: Vadim Zeitlin +// Created: 2007-04-15 +// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_GLX11_H_ +#define _WX_UNIX_GLX11_H_ + +#include <GL/glx.h> + +// ---------------------------------------------------------------------------- +// wxGLContext +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase +{ +public: + wxGLContext(wxGLCanvas *win, const wxGLContext *other = NULL); + virtual ~wxGLContext(); + + virtual bool SetCurrent(const wxGLCanvas& win) const; + +private: + // attach context to the drawable or unset it (if NULL) + static bool MakeCurrent(GLXDrawable drawable, GLXContext context); + + GLXContext m_glContext; + + DECLARE_CLASS(wxGLContext) +}; + +// ---------------------------------------------------------------------------- +// wxGLCanvasX11 +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_GL wxGLCanvasX11 : public wxGLCanvasBase +{ +public: + // initialization and dtor + // ----------------------- + + // default ctor doesn't do anything, InitVisual() must be called + wxGLCanvasX11(); + + // initializes the XVisualInfo corresponding to the given attributes + bool InitVisual(const int *attribList); + + // frees XVisualInfo info + virtual ~wxGLCanvasX11(); + + + // implement wxGLCanvasBase methods + // -------------------------------- + + virtual bool SwapBuffers(); + + + // X11-specific methods + // -------------------- + + // return GLX version: 13 means 1.3 &c + static int GetGLXVersion(); + + // return true if multisample extension is available + static bool IsGLXMultiSampleAvailable(); + + // get the X11 handle of this window + virtual Window GetXWindow() const = 0; + + + // override some wxWindow methods + // ------------------------------ + + // return true only if the window is realized: OpenGL context can't be + // created until we are + virtual bool IsShownOnScreen() const; + + + // implementation only from now on + // ------------------------------- + + // get the GLXFBConfig/XVisualInfo we use + GLXFBConfig *GetGLXFBConfig() const { return m_fbc; } + XVisualInfo *GetXVisualInfo() const { return m_vi; } + + // initialize the global default GL visual, return false if matching visual + // not found + static bool InitDefaultVisualInfo(const int *attribList); + + // get the default GL X11 visual (may be NULL, shouldn't be freed by caller) + static XVisualInfo *GetDefaultXVisualInfo() { return ms_glVisualInfo; } + + // free the global GL visual, called by wxGLApp + static void FreeDefaultVisualInfo(); + + // initializes XVisualInfo (in any case) and, if supported, GLXFBConfig + // + // returns false if XVisualInfo couldn't be initialized, otherwise caller + // is responsible for freeing the pointers + static bool InitXVisualInfo(const int *attribList, + GLXFBConfig **pFBC, XVisualInfo **pXVisual); + +private: + // fills in glattrs with attributes defined by wxattrs which must be + // 0-terminated if it is non-NULL + // + // n is the max size of glattrs, false is returned if we overflow it, it + // should be at least 16 to accommodate the default attributes + static bool ConvertWXAttrsToGL(const int *wxattrs, int *glattrs, size_t n); + + + // this is only used if it's supported i.e. if GL >= 1.3 + GLXFBConfig *m_fbc; + + // used for all GL versions, obtained from GLXFBConfig for GL >= 1.3 + XVisualInfo *m_vi; + + // the global/default versions of the above + static GLXFBConfig *ms_glFBCInfo; + static XVisualInfo *ms_glVisualInfo; +}; + +// ---------------------------------------------------------------------------- +// wxGLApp +// ---------------------------------------------------------------------------- + +// this is used in wx/glcanvas.h, prevent it from defining a generic wxGLApp +#define wxGL_APP_DEFINED + +class WXDLLIMPEXP_GL wxGLApp : public wxGLAppBase +{ +public: + wxGLApp() : wxGLAppBase() { } + + // implement wxGLAppBase method + virtual bool InitGLVisual(const int *attribList) + { + return wxGLCanvasX11::InitDefaultVisualInfo(attribList); + } + + // and implement this wxGTK::wxApp method too + virtual void *GetXVisualInfo() + { + return wxGLCanvasX11::GetDefaultXVisualInfo(); + } + + // and override this wxApp method to clean up + virtual int OnExit() + { + wxGLCanvasX11::FreeDefaultVisualInfo(); + + return wxGLAppBase::OnExit(); + } + +private: + DECLARE_DYNAMIC_CLASS(wxGLApp) +}; + +#endif // _WX_UNIX_GLX11_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/joystick.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/joystick.h new file mode 100644 index 0000000000..ef7a5db223 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/joystick.h @@ -0,0 +1,94 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/joystick.h +// Purpose: wxJoystick class +// Author: Guilhem Lavaux +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_JOYSTICK_H_ +#define _WX_UNIX_JOYSTICK_H_ + +#include "wx/event.h" + +class WXDLLIMPEXP_FWD_CORE wxJoystickThread; + +class WXDLLIMPEXP_ADV wxJoystick: public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxJoystick) + public: + /* + * Public interface + */ + + wxJoystick(int joystick = wxJOYSTICK1); + virtual ~wxJoystick(); + + // Attributes + //////////////////////////////////////////////////////////////////////////// + + wxPoint GetPosition() const; + int GetPosition(unsigned axis) const; + bool GetButtonState(unsigned button) const; + int GetZPosition() const; + int GetButtonState() const; + int GetPOVPosition() const; + int GetPOVCTSPosition() const; + int GetRudderPosition() const; + int GetUPosition() const; + int GetVPosition() const; + int GetMovementThreshold() const; + void SetMovementThreshold(int threshold) ; + + // Capabilities + //////////////////////////////////////////////////////////////////////////// + + bool IsOk() const; // Checks that the joystick is functioning + static int GetNumberJoysticks() ; + int GetManufacturerId() const ; + int GetProductId() const ; + wxString GetProductName() const ; + int GetXMin() const; + int GetYMin() const; + int GetZMin() const; + int GetXMax() const; + int GetYMax() const; + int GetZMax() const; + int GetNumberButtons() const; + int GetNumberAxes() const; + int GetMaxButtons() const; + int GetMaxAxes() const; + int GetPollingMin() const; + int GetPollingMax() const; + int GetRudderMin() const; + int GetRudderMax() const; + int GetUMin() const; + int GetUMax() const; + int GetVMin() const; + int GetVMax() const; + + bool HasRudder() const; + bool HasZ() const; + bool HasU() const; + bool HasV() const; + bool HasPOV() const; + bool HasPOV4Dir() const; + bool HasPOVCTS() 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(); + +protected: + int m_device; + int m_joystick; + wxJoystickThread* m_thread; +}; + +#endif // _WX_UNIX_JOYSTICK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/mimetype.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/mimetype.h new file mode 100644 index 0000000000..df76534aa5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/mimetype.h @@ -0,0 +1,173 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/mimetype.h +// Purpose: classes and functions to manage MIME types +// Author: Vadim Zeitlin +// Modified by: +// Created: 23.09.98 +// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence (part of wxExtra library) +///////////////////////////////////////////////////////////////////////////// + +#ifndef _MIMETYPE_IMPL_H +#define _MIMETYPE_IMPL_H + +#include "wx/mimetype.h" + +#if wxUSE_MIMETYPE + +class wxMimeTypeCommands; + +WX_DEFINE_ARRAY_PTR(wxMimeTypeCommands *, wxMimeCommandsArray); + +// this is the real wxMimeTypesManager for Unix +class WXDLLIMPEXP_BASE wxMimeTypesManagerImpl +{ +public: + // ctor and dtor + wxMimeTypesManagerImpl(); + virtual ~wxMimeTypesManagerImpl(); + + // load all data into memory - done when it is needed for the first time + void Initialize(int mailcapStyles = wxMAILCAP_ALL, + const wxString& extraDir = wxEmptyString); + + // and delete the data here + void ClearData(); + + // implement containing class functions + wxFileType *GetFileTypeFromExtension(const wxString& ext); + wxFileType *GetFileTypeFromMimeType(const wxString& mimeType); + + size_t EnumAllFileTypes(wxArrayString& mimetypes); + + void AddFallback(const wxFileTypeInfo& filetype); + + // add information about the given mimetype + void AddMimeTypeInfo(const wxString& mimetype, + const wxString& extensions, + const wxString& description); + void AddMailcapInfo(const wxString& strType, + const wxString& strOpenCmd, + const wxString& strPrintCmd, + const wxString& strTest, + const wxString& strDesc); + + // add a new record to the user .mailcap/.mime.types files + wxFileType *Associate(const wxFileTypeInfo& ftInfo); + // remove association + bool Unassociate(wxFileType *ft); + + // accessors + // get the string containing space separated extensions for the given + // file type + wxString GetExtension(size_t index) { return m_aExtensions[index]; } + +protected: + void InitIfNeeded(); + + wxArrayString m_aTypes, // MIME types + m_aDescriptions, // descriptions (just some text) + m_aExtensions, // space separated list of extensions + m_aIcons; // Icon filenames + + // verb=command pairs for this file type + wxMimeCommandsArray m_aEntries; + + // are we initialized? + bool m_initialized; + + wxString GetCommand(const wxString &verb, size_t nIndex) const; + + // Read XDG *.desktop file + void LoadXDGApp(const wxString& filename); + // Scan XDG directory + void LoadXDGAppsFilesFromDir(const wxString& dirname); + + // Load XDG globs files + void LoadXDGGlobs(const wxString& filename); + + // functions used to do associations + virtual int AddToMimeData(const wxString& strType, + const wxString& strIcon, + wxMimeTypeCommands *entry, + const wxArrayString& strExtensions, + const wxString& strDesc, + bool replaceExisting = true); + virtual bool DoAssociation(const wxString& strType, + const wxString& strIcon, + wxMimeTypeCommands *entry, + const wxArrayString& strExtensions, + const wxString& strDesc); + + // give it access to m_aXXX variables + friend class WXDLLIMPEXP_FWD_BASE wxFileTypeImpl; +}; + +class WXDLLIMPEXP_BASE wxFileTypeImpl +{ +public: + // initialization functions + // this is used to construct a list of mimetypes which match; + // if built with GetFileTypeFromMimetype index 0 has the exact match and + // index 1 the type / * match + // if built with GetFileTypeFromExtension, index 0 has the mimetype for + // the first extension found, index 1 for the second and so on + + void Init(wxMimeTypesManagerImpl *manager, size_t index) + { m_manager = manager; m_index.Add(index); } + + // accessors + bool GetExtensions(wxArrayString& extensions); + bool GetMimeType(wxString *mimeType) const + { *mimeType = m_manager->m_aTypes[m_index[0]]; return true; } + bool GetMimeTypes(wxArrayString& mimeTypes) const; + bool GetIcon(wxIconLocation *iconLoc) const; + + bool GetDescription(wxString *desc) const + { *desc = m_manager->m_aDescriptions[m_index[0]]; return true; } + + bool GetOpenCommand(wxString *openCmd, + const wxFileType::MessageParameters& params) const + { + *openCmd = GetExpandedCommand(wxT("open"), params); + return (! openCmd -> IsEmpty() ); + } + + bool GetPrintCommand(wxString *printCmd, + const wxFileType::MessageParameters& params) const + { + *printCmd = GetExpandedCommand(wxT("print"), params); + return (! printCmd -> IsEmpty() ); + } + + // return the number of commands defined for this file type, 0 if none + size_t GetAllCommands(wxArrayString *verbs, wxArrayString *commands, + const wxFileType::MessageParameters& params) const; + + + // remove the record for this file type + // probably a mistake to come here, use wxMimeTypesManager.Unassociate (ft) instead + bool Unassociate(wxFileType *ft) + { + return m_manager->Unassociate(ft); + } + + // set an arbitrary command, ask confirmation if it already exists and + // overwriteprompt is TRUE + bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = true); + bool SetDefaultIcon(const wxString& strIcon = wxEmptyString, int index = 0); + +private: + wxString + GetExpandedCommand(const wxString & verb, + const wxFileType::MessageParameters& params) const; + + wxMimeTypesManagerImpl *m_manager; + wxArrayInt m_index; // in the wxMimeTypesManagerImpl arrays +}; + +#endif // wxUSE_MIMETYPE + +#endif // _MIMETYPE_IMPL_H + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/pipe.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/pipe.h new file mode 100644 index 0000000000..1bde4228a7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/pipe.h @@ -0,0 +1,102 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/pipe.h +// Purpose: wxPipe class +// Author: Vadim Zeitlin +// Modified by: +// Created: 24.06.2003 (extracted from src/unix/utilsunx.cpp) +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_PIPE_H_ +#define _WX_UNIX_PIPE_H_ + +#include <unistd.h> +#include <fcntl.h> + +#include "wx/log.h" +#include "wx/intl.h" + +// ---------------------------------------------------------------------------- +// wxPipe: this class encapsulates pipe() system call +// ---------------------------------------------------------------------------- + +class wxPipe +{ +public: + // the symbolic names for the pipe ends + enum Direction + { + Read, + Write + }; + + enum + { + INVALID_FD = -1 + }; + + // default ctor doesn't do anything + wxPipe() { m_fds[Read] = m_fds[Write] = INVALID_FD; } + + // create the pipe, return TRUE if ok, FALSE on error + bool Create() + { + if ( pipe(m_fds) == -1 ) + { + wxLogSysError(wxGetTranslation("Pipe creation failed")); + + return false; + } + + return true; + } + + // switch the given end of the pipe to non-blocking IO + bool MakeNonBlocking(Direction which) + { + const int flags = fcntl(m_fds[which], F_GETFL, 0); + if ( flags == -1 ) + return false; + + return fcntl(m_fds[which], F_SETFL, flags | O_NONBLOCK) == 0; + } + + // return TRUE if we were created successfully + bool IsOk() const { return m_fds[Read] != INVALID_FD; } + + // return the descriptor for one of the pipe ends + int operator[](Direction which) const { return m_fds[which]; } + + // detach a descriptor, meaning that the pipe dtor won't close it, and + // return it + int Detach(Direction which) + { + int fd = m_fds[which]; + m_fds[which] = INVALID_FD; + + return fd; + } + + // close the pipe descriptors + void Close() + { + for ( size_t n = 0; n < WXSIZEOF(m_fds); n++ ) + { + if ( m_fds[n] != INVALID_FD ) + { + close(m_fds[n]); + m_fds[n] = INVALID_FD; + } + } + } + + // dtor closes the pipe descriptors + ~wxPipe() { Close(); } + +private: + int m_fds[2]; +}; + +#endif // _WX_UNIX_PIPE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private.h new file mode 100644 index 0000000000..fafc5435db --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private.h @@ -0,0 +1,19 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private.h +// Purpose: miscellaneous private things for Unix wx ports +// Author: Vadim Zeitlin +// Created: 2005-09-25 +// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_PRIVATE_H_ +#define _WX_UNIX_PRIVATE_H_ + +// this file is currently empty as its original contents was moved to +// include/wx/private/fd.h but let's keep it for now in case we need it for +// something again in the future +#include "wx/private/fd.h" + +#endif // _WX_UNIX_PRIVATE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/epolldispatcher.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/epolldispatcher.h new file mode 100644 index 0000000000..c73411f221 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/epolldispatcher.h @@ -0,0 +1,53 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/epolldispatcher.h +// Purpose: wxEpollDispatcher class +// Authors: Lukasz Michalski +// Created: April 2007 +// Copyright: (c) Lukasz Michalski +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_EPOLLDISPATCHER_H_ +#define _WX_PRIVATE_EPOLLDISPATCHER_H_ + +#include "wx/defs.h" + +#ifdef wxUSE_EPOLL_DISPATCHER + +#include "wx/private/fdiodispatcher.h" + +struct epoll_event; + +class WXDLLIMPEXP_BASE wxEpollDispatcher : public wxFDIODispatcher +{ +public: + // create a new instance of this class, can return NULL if + // epoll() is not supported on this system + // + // the caller should delete the returned pointer + static wxEpollDispatcher *Create(); + + virtual ~wxEpollDispatcher(); + + // implement base class pure virtual methods + virtual bool RegisterFD(int fd, wxFDIOHandler* handler, int flags = wxFDIO_ALL); + virtual bool ModifyFD(int fd, wxFDIOHandler* handler, int flags = wxFDIO_ALL); + virtual bool UnregisterFD(int fd); + virtual bool HasPending() const; + virtual int Dispatch(int timeout = TIMEOUT_INFINITE); + +private: + // ctor is private, use Create() + wxEpollDispatcher(int epollDescriptor); + + // common part of HasPending() and Dispatch(): calls epoll_wait() with the + // given timeout + int DoPoll(epoll_event *events, int numEvents, int timeout) const; + + + int m_epollDescriptor; +}; + +#endif // wxUSE_EPOLL_DISPATCHER + +#endif // _WX_PRIVATE_SOCKETEVTDISPATCH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/executeiohandler.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/executeiohandler.h new file mode 100644 index 0000000000..2a7c2d7aa3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/executeiohandler.h @@ -0,0 +1,136 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/executeiohandler.h +// Purpose: IO handler class for the FD used by wxExecute() under Unix +// Author: Rob Bresalier, Vadim Zeitlin +// Created: 2013-01-06 +// Copyright: (c) 2013 Rob Bresalier, Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_PRIVATE_EXECUTEIOHANDLER_H_ +#define _WX_UNIX_PRIVATE_EXECUTEIOHANDLER_H_ + +#include "wx/private/streamtempinput.h" + +// This class handles IO events on the pipe FD connected to the child process +// stdout/stderr and is used by wxExecute(). +// +// Currently it can derive from either wxEventLoopSourceHandler or +// wxFDIOHandler depending on the kind of dispatcher/event loop it is used +// with. In the future, when we get rid of wxFDIOHandler entirely, it will +// derive from wxEventLoopSourceHandler only. +template <class T> +class wxExecuteIOHandlerBase : public T +{ +public: + wxExecuteIOHandlerBase(int fd, wxStreamTempInputBuffer& buf) + : m_fd(fd), + m_buf(buf) + { + m_callbackDisabled = false; + } + + // Called when the associated descriptor is available for reading. + virtual void OnReadWaiting() + { + // Sync process, process all data coming at us from the pipe so that + // the pipe does not get full and cause a deadlock situation. + m_buf.Update(); + + if ( m_buf.Eof() ) + DisableCallback(); + } + + // These methods are never called as we only monitor the associated FD for + // reading, but we still must implement them as they're pure virtual in the + // base class. + virtual void OnWriteWaiting() { } + virtual void OnExceptionWaiting() { } + + // Disable any future calls to our OnReadWaiting(), can be called when + // we're sure that no more input is forthcoming. + void DisableCallback() + { + if ( !m_callbackDisabled ) + { + m_callbackDisabled = true; + + DoDisable(); + } + } + +protected: + const int m_fd; + +private: + virtual void DoDisable() = 0; + + wxStreamTempInputBuffer& m_buf; + + // If true, DisableCallback() had been already called. + bool m_callbackDisabled; + + wxDECLARE_NO_COPY_CLASS(wxExecuteIOHandlerBase); +}; + +// This is the version used with wxFDIODispatcher, which must be passed to the +// ctor in order to register this handler with it. +class wxExecuteFDIOHandler : public wxExecuteIOHandlerBase<wxFDIOHandler> +{ +public: + wxExecuteFDIOHandler(wxFDIODispatcher& dispatcher, + int fd, + wxStreamTempInputBuffer& buf) + : wxExecuteIOHandlerBase<wxFDIOHandler>(fd, buf), + m_dispatcher(dispatcher) + { + dispatcher.RegisterFD(fd, this, wxFDIO_INPUT); + } + + virtual ~wxExecuteFDIOHandler() + { + DisableCallback(); + } + +private: + virtual void DoDisable() + { + m_dispatcher.UnregisterFD(m_fd); + } + + wxFDIODispatcher& m_dispatcher; + + wxDECLARE_NO_COPY_CLASS(wxExecuteFDIOHandler); +}; + +// And this is the version used with an event loop. As AddSourceForFD() is +// static, we don't require passing the event loop to the ctor but an event +// loop must be running to handle our events. +class wxExecuteEventLoopSourceHandler + : public wxExecuteIOHandlerBase<wxEventLoopSourceHandler> +{ +public: + wxExecuteEventLoopSourceHandler(int fd, wxStreamTempInputBuffer& buf) + : wxExecuteIOHandlerBase<wxEventLoopSourceHandler>(fd, buf) + { + m_source = wxEventLoop::AddSourceForFD(fd, this, wxEVENT_SOURCE_INPUT); + } + + virtual ~wxExecuteEventLoopSourceHandler() + { + DisableCallback(); + } + +private: + virtual void DoDisable() + { + delete m_source; + m_source = NULL; + } + + wxEventLoopSource* m_source; + + wxDECLARE_NO_COPY_CLASS(wxExecuteEventLoopSourceHandler); +}; + +#endif // _WX_UNIX_PRIVATE_EXECUTEIOHANDLER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/fdiounix.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/fdiounix.h new file mode 100644 index 0000000000..2807821e19 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/fdiounix.h @@ -0,0 +1,27 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/fdiounix.h +// Purpose: wxFDIOManagerUnix class used by console Unix applications +// Author: Vadim Zeitlin +// Created: 2009-08-17 +// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _UNIX_PRIVATE_FDIOUNIX_H_ +#define _UNIX_PRIVATE_FDIOUNIX_H_ + +#include "wx/private/fdiomanager.h" + +// ---------------------------------------------------------------------------- +// wxFDIOManagerUnix: implement wxFDIOManager interface using wxFDIODispatcher +// ---------------------------------------------------------------------------- + +class wxFDIOManagerUnix : public wxFDIOManager +{ +public: + virtual int AddInput(wxFDIOHandler *handler, int fd, Direction d); + virtual void RemoveInput(wxFDIOHandler *handler, int fd, Direction d); +}; + +#endif // _UNIX_PRIVATE_FDIOUNIX_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/fswatcher_inotify.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/fswatcher_inotify.h new file mode 100644 index 0000000000..249450eb50 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/fswatcher_inotify.h @@ -0,0 +1,71 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/fswatcher_inotify.h +// Purpose: File system watcher impl classes +// Author: Bartosz Bekier +// Created: 2009-05-26 +// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef WX_UNIX_PRIVATE_FSWATCHER_INOTIFY_H_ +#define WX_UNIX_PRIVATE_FSWATCHER_INOTIFY_H_ + +#include "wx/filename.h" +#include "wx/evtloopsrc.h" + +// ============================================================================ +// wxFSWatcherEntry implementation & helper declarations +// ============================================================================ + +class wxFSWatcherImplUNIX; + +class wxFSWatchEntry : public wxFSWatchInfo +{ +public: + wxFSWatchEntry(const wxFSWatchInfo& winfo) : + wxFSWatchInfo(winfo) + { + } + + int GetWatchDescriptor() const + { + return m_wd; + } + + void SetWatchDescriptor(int wd) + { + m_wd = wd; + } + +private: + int m_wd; + + wxDECLARE_NO_COPY_CLASS(wxFSWatchEntry); +}; + + +// ============================================================================ +// wxFSWSourceHandler helper class +// ============================================================================ + +class wxFSWatcherImplUnix; + +/** + * Handler for handling i/o from inotify descriptor + */ +class wxFSWSourceHandler : public wxEventLoopSourceHandler +{ +public: + wxFSWSourceHandler(wxFSWatcherImplUnix* service) : + m_service(service) + { } + + virtual void OnReadWaiting(); + virtual void OnWriteWaiting(); + virtual void OnExceptionWaiting(); + +protected: + wxFSWatcherImplUnix* m_service; +}; + +#endif /* WX_UNIX_PRIVATE_FSWATCHER_INOTIFY_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/fswatcher_kqueue.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/fswatcher_kqueue.h new file mode 100644 index 0000000000..de3d489a38 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/fswatcher_kqueue.h @@ -0,0 +1,108 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/fswatcher_kqueue.h +// Purpose: File system watcher impl classes +// Author: Bartosz Bekier +// Created: 2009-05-26 +// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef WX_UNIX_PRIVATE_FSWATCHER_KQUEUE_H_ +#define WX_UNIX_PRIVATE_FSWATCHER_KQUEUE_H_ + +#include <fcntl.h> +#include <unistd.h> +#include "wx/dir.h" +#include "wx/debug.h" +#include "wx/arrstr.h" + +// ============================================================================ +// wxFSWatcherEntry implementation & helper declarations +// ============================================================================ + +class wxFSWatcherImplKqueue; + +class wxFSWatchEntryKq : public wxFSWatchInfo +{ +public: + struct wxDirState + { + wxDirState(const wxFSWatchInfo& winfo) + { + if (!wxDir::Exists(winfo.GetPath())) + return; + + wxDir dir(winfo.GetPath()); + wxCHECK_RET( dir.IsOpened(), + wxString::Format("Unable to open dir '%s'", winfo.GetPath())); + + wxString filename; + bool ret = dir.GetFirst(&filename); + while (ret) + { + files.push_back(filename); + ret = dir.GetNext(&filename); + } + } + + wxSortedArrayString files; + }; + + wxFSWatchEntryKq(const wxFSWatchInfo& winfo) : + wxFSWatchInfo(winfo), m_lastState(winfo) + { + m_fd = wxOpen(m_path, O_RDONLY, 0); + if (m_fd == -1) + { + wxLogSysError(_("Unable to open path '%s'"), m_path); + } + } + + virtual ~wxFSWatchEntryKq() + { + (void) Close(); + } + + bool Close() + { + if (!IsOk()) + return false; + + int ret = close(m_fd); + if (ret == -1) + { + wxLogSysError(_("Unable to close path '%s'"), m_path); + } + m_fd = -1; + + return ret != -1; + } + + bool IsOk() const + { + return m_fd != -1; + } + + int GetFileDescriptor() const + { + return m_fd; + } + + void RefreshState() + { + m_lastState = wxDirState(*this); + } + + const wxDirState& GetLastState() const + { + return m_lastState; + } + +private: + int m_fd; + wxDirState m_lastState; + + wxDECLARE_NO_COPY_CLASS(wxFSWatchEntryKq); +}; + +#endif /* WX_UNIX_PRIVATE_FSWATCHER_KQUEUE_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/pipestream.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/pipestream.h new file mode 100644 index 0000000000..313a271741 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/pipestream.h @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/pipestream.h +// Purpose: Unix wxPipeInputStream and wxPipeOutputStream declarations +// Author: Vadim Zeitlin +// Created: 2013-06-08 (extracted from wx/unix/pipe.h) +// Copyright: (c) 2013 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_PRIVATE_PIPESTREAM_H_ +#define _WX_UNIX_PRIVATE_PIPESTREAM_H_ + +#include "wx/wfstream.h" + +class wxPipeInputStream : public wxFileInputStream +{ +public: + wxEXPLICIT wxPipeInputStream(int fd) : wxFileInputStream(fd) { } + + // return true if the pipe is still opened + bool IsOpened() const { return !Eof(); } + + // return true if we have anything to read, don't block + virtual bool CanRead() const; +}; + +class wxPipeOutputStream : public wxFileOutputStream +{ +public: + wxPipeOutputStream(int fd) : wxFileOutputStream(fd) { } + + // Override the base class version to ignore "pipe full" errors: this is + // not an error for this class. + size_t OnSysWrite(const void *buffer, size_t size); +}; + +#endif // _WX_UNIX_PRIVATE_PIPESTREAM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/sockunix.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/sockunix.h new file mode 100644 index 0000000000..642ef43bfa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/sockunix.h @@ -0,0 +1,144 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/sockunix.h +// Purpose: wxSocketImpl implementation for Unix systems +// Authors: Guilhem Lavaux, Vadim Zeitlin +// Created: April 1997 +// Copyright: (c) 1997 Guilhem Lavaux +// (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_GSOCKUNX_H_ +#define _WX_UNIX_GSOCKUNX_H_ + +#include <unistd.h> +#include <sys/ioctl.h> + +// Under older (Open)Solaris versions FIONBIO is declared in this header only. +// In the newer versions it's included by sys/ioctl.h but it's simpler to just +// include it always instead of testing for whether it is or not. +#ifdef __SOLARIS__ + #include <sys/filio.h> +#endif + +#include "wx/private/fdiomanager.h" + +class wxSocketImplUnix : public wxSocketImpl, + public wxFDIOHandler +{ +public: + wxSocketImplUnix(wxSocketBase& wxsocket) + : wxSocketImpl(wxsocket) + { + m_fds[0] = + m_fds[1] = -1; + } + + virtual wxSocketError GetLastError() const; + + virtual void ReenableEvents(wxSocketEventFlags flags) + { + // enable the notifications about input/output being available again in + // case they were disabled by OnRead/WriteWaiting() + // + // notice that we'd like to enable the events here only if there is + // nothing more left on the socket right now as otherwise we're going + // to get a "ready for whatever" notification immediately (well, during + // the next event loop iteration) and disable the event back again + // which is rather inefficient but unfortunately doing it like this + // doesn't work because the existing code (e.g. src/common/sckipc.cpp) + // expects to keep getting notifications about the data available from + // the socket even if it didn't read all the data the last time, so we + // absolutely have to continue generating them + EnableEvents(flags); + } + + // wxFDIOHandler methods + virtual void OnReadWaiting(); + virtual void OnWriteWaiting(); + virtual void OnExceptionWaiting(); + virtual bool IsOk() const { return m_fd != INVALID_SOCKET; } + +private: + virtual void DoClose() + { + DisableEvents(); + + close(m_fd); + } + + virtual void UnblockAndRegisterWithEventLoop() + { + int trueArg = 1; + ioctl(m_fd, FIONBIO, &trueArg); + + EnableEvents(); + } + + // enable or disable notifications for socket input/output events + void EnableEvents(int flags = wxSOCKET_INPUT_FLAG | wxSOCKET_OUTPUT_FLAG) + { DoEnableEvents(flags, true); } + void DisableEvents(int flags = wxSOCKET_INPUT_FLAG | wxSOCKET_OUTPUT_FLAG) + { DoEnableEvents(flags, false); } + + // really enable or disable socket input/output events + void DoEnableEvents(int flags, bool enable); + +protected: + // descriptors for input and output event notification channels associated + // with the socket + int m_fds[2]; + +private: + // notify the associated wxSocket about a change in socket state and shut + // down the socket if the event is wxSOCKET_LOST + void OnStateChange(wxSocketNotify event); + + // check if there is any input available, return 1 if yes, 0 if no or -1 on + // error + int CheckForInput(); + + + // give it access to our m_fds + friend class wxSocketFDBasedManager; +}; + +// A version of wxSocketManager which uses FDs for socket IO: it is used by +// Unix console applications and some X11-like ports (wxGTK and wxMotif but not +// wxX11 currently) which implement their own port-specific wxFDIOManagers +class wxSocketFDBasedManager : public wxSocketManager +{ +public: + wxSocketFDBasedManager() + { + m_fdioManager = NULL; + } + + virtual bool OnInit(); + virtual void OnExit() { } + + virtual wxSocketImpl *CreateSocket(wxSocketBase& wxsocket) + { + return new wxSocketImplUnix(wxsocket); + } + + virtual void Install_Callback(wxSocketImpl *socket_, wxSocketNotify event); + virtual void Uninstall_Callback(wxSocketImpl *socket_, wxSocketNotify event); + +protected: + // get the FD index corresponding to the given wxSocketNotify + wxFDIOManager::Direction + GetDirForEvent(wxSocketImpl *socket, wxSocketNotify event); + + // access the FDs we store + int& FD(wxSocketImplUnix *socket, wxFDIOManager::Direction d) + { + return socket->m_fds[d]; + } + + wxFDIOManager *m_fdioManager; + + wxDECLARE_NO_COPY_CLASS(wxSocketFDBasedManager); +}; + +#endif /* _WX_UNIX_GSOCKUNX_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/timer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/timer.h new file mode 100644 index 0000000000..6275b53d91 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/timer.h @@ -0,0 +1,138 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/timer.h +// Purpose: wxTimer for wxBase (unix) +// Author: Lukasz Michalski +// Created: 15/01/2005 +// Copyright: (c) Lukasz Michalski +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_PRIVATE_TIMER_H_ +#define _WX_UNIX_PRIVATE_TIMER_H_ + +#if wxUSE_TIMER + +#include "wx/private/timer.h" + +// the type used for milliseconds is large enough for microseconds too but +// introduce a synonym for it to avoid confusion +typedef wxMilliClock_t wxUsecClock_t; + +// ---------------------------------------------------------------------------- +// wxTimer implementation class for Unix platforms +// ---------------------------------------------------------------------------- + +// NB: we have to export at least this symbol from the shared library, because +// it's used by wxDFB's wxCore +class WXDLLIMPEXP_BASE wxUnixTimerImpl : public wxTimerImpl +{ +public: + wxUnixTimerImpl(wxTimer *timer); + virtual ~wxUnixTimerImpl(); + + virtual bool IsRunning() const; + virtual bool Start(int milliseconds = -1, bool oneShot = false); + virtual void Stop(); + + // for wxTimerScheduler only: resets the internal flag indicating that the + // timer is running + void MarkStopped() + { + wxASSERT_MSG( m_isRunning, wxT("stopping non-running timer?") ); + + m_isRunning = false; + } + +private: + bool m_isRunning; +}; + +// ---------------------------------------------------------------------------- +// wxTimerSchedule: information about a single timer, used by wxTimerScheduler +// ---------------------------------------------------------------------------- + +struct wxTimerSchedule +{ + wxTimerSchedule(wxUnixTimerImpl *timer, wxUsecClock_t expiration) + : m_timer(timer), + m_expiration(expiration) + { + } + + // the timer itself (we don't own this pointer) + wxUnixTimerImpl *m_timer; + + // the time of its next expiration, in usec + wxUsecClock_t m_expiration; +}; + +// the linked list of all active timers, we keep it sorted by expiration time +WX_DECLARE_LIST(wxTimerSchedule, wxTimerList); + +// ---------------------------------------------------------------------------- +// wxTimerScheduler: class responsible for updating all timers +// ---------------------------------------------------------------------------- + +class wxTimerScheduler +{ +public: + // get the unique timer scheduler instance + static wxTimerScheduler& Get() + { + if ( !ms_instance ) + ms_instance = new wxTimerScheduler; + + return *ms_instance; + } + + // must be called on shutdown to delete the global timer scheduler + static void Shutdown() + { + if ( ms_instance ) + { + delete ms_instance; + ms_instance = NULL; + } + } + + // adds timer which should expire at the given absolute time to the list + void AddTimer(wxUnixTimerImpl *timer, wxUsecClock_t expiration); + + // remove timer from the list, called automatically from timer dtor + void RemoveTimer(wxUnixTimerImpl *timer); + + + // the functions below are used by the event loop implementation to monitor + // and notify timers: + + // if this function returns true, the time remaining until the next time + // expiration is returned in the provided parameter (always positive or 0) + // + // it returns false if there are no timers + bool GetNext(wxUsecClock_t *remaining) const; + + // trigger the timer event for all timers which have expired, return true + // if any did + bool NotifyExpired(); + +private: + // ctor and dtor are private, this is a singleton class only created by + // Get() and destroyed by Shutdown() + wxTimerScheduler() { } + ~wxTimerScheduler(); + + // add the given timer schedule to the list in the right place + // + // we take ownership of the pointer "s" which must be heap-allocated + void DoAddTimer(wxTimerSchedule *s); + + + // the list of all currently active timers sorted by expiration + wxTimerList m_timers; + + static wxTimerScheduler *ms_instance; +}; + +#endif // wxUSE_TIMER + +#endif // _WX_UNIX_PRIVATE_TIMER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/wakeuppipe.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/wakeuppipe.h new file mode 100644 index 0000000000..5bd6db870a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/private/wakeuppipe.h @@ -0,0 +1,97 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/wakeuppipe.h +// Purpose: Helper class allowing to wake up the main thread. +// Author: Vadim Zeitlin +// Created: 2013-06-09 (extracted from src/unix/evtloopunix.cpp) +// Copyright: (c) 2013 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_PRIVATE_WAKEUPPIPE_H_ +#define _WX_UNIX_PRIVATE_WAKEUPPIPE_H_ + +#include "wx/unix/pipe.h" +#include "wx/evtloopsrc.h" + +// ---------------------------------------------------------------------------- +// wxWakeUpPipe: allows to wake up the event loop by writing to it +// ---------------------------------------------------------------------------- + +// This class is not MT-safe, see wxWakeUpPipeMT below for a wake up pipe +// usable from other threads. + +class wxWakeUpPipe : public wxEventLoopSourceHandler +{ +public: + // Create and initialize the pipe. + // + // It's the callers responsibility to add the read end of this pipe, + // returned by GetReadFd(), to the code blocking on input. + wxWakeUpPipe(); + + // Wake up the blocking operation involving this pipe. + // + // It simply writes to the write end of the pipe. + // + // As indicated by its name, this method does no locking and so can be + // called only from the main thread. + void WakeUpNoLock(); + + // Same as WakeUp() but without locking. + + // Return the read end of the pipe. + int GetReadFd() { return m_pipe[wxPipe::Read]; } + + + // Implement wxEventLoopSourceHandler pure virtual methods + virtual void OnReadWaiting(); + virtual void OnWriteWaiting() { } + virtual void OnExceptionWaiting() { } + +private: + wxPipe m_pipe; + + // This flag is set to true after writing to the pipe and reset to false + // after reading from it in the main thread. Having it allows us to avoid + // overflowing the pipe with too many writes if the main thread can't keep + // up with reading from it. + bool m_pipeIsEmpty; +}; + +// ---------------------------------------------------------------------------- +// wxWakeUpPipeMT: thread-safe version of wxWakeUpPipe +// ---------------------------------------------------------------------------- + +// This class can be used from multiple threads, i.e. its WakeUp() can be +// called concurrently. + +class wxWakeUpPipeMT : public wxWakeUpPipe +{ +#if wxUSE_THREADS +public: + wxWakeUpPipeMT() { } + + // Thread-safe wrapper around WakeUpNoLock(): can be called from another + // thread to wake up the main one. + void WakeUp() + { + wxCriticalSectionLocker lock(m_pipeLock); + + WakeUpNoLock(); + } + + virtual void OnReadWaiting() + { + wxCriticalSectionLocker lock(m_pipeLock); + + wxWakeUpPipe::OnReadWaiting(); + } + +private: + // Protects access to m_pipeIsEmpty. + wxCriticalSection m_pipeLock; + +#endif // wxUSE_THREADS +}; + +#endif // _WX_UNIX_PRIVATE_WAKEUPPIPE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/sound.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/sound.h new file mode 100644 index 0000000000..76efeae3dc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/sound.h @@ -0,0 +1,160 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/sound.h +// Purpose: wxSound class +// Author: Julian Smart, Vaclav Slavik +// Modified by: +// Created: 25/10/98 +// Copyright: (c) Julian Smart, Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SOUND_H_ +#define _WX_SOUND_H_ + +#include "wx/defs.h" + +#if wxUSE_SOUND + +#include "wx/object.h" + +// ---------------------------------------------------------------------------- +// wxSound: simple audio playback class +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_ADV wxSoundBackend; +class WXDLLIMPEXP_FWD_ADV wxSound; +class WXDLLIMPEXP_FWD_BASE wxDynamicLibrary; + +/// Sound data, as loaded from .wav file: +class WXDLLIMPEXP_ADV wxSoundData +{ +public: + wxSoundData() : m_refCnt(1) {} + void IncRef(); + void DecRef(); + + // .wav header information: + unsigned m_channels; // num of channels (mono:1, stereo:2) + unsigned m_samplingRate; + unsigned m_bitsPerSample; // if 8, then m_data contains unsigned 8bit + // samples (wxUint8), if 16 then signed 16bit + // (wxInt16) + unsigned m_samples; // length in samples: + + // wave data: + size_t m_dataBytes; + wxUint8 *m_data; // m_dataBytes bytes of data + +private: + ~wxSoundData(); + unsigned m_refCnt; + wxUint8 *m_dataWithHeader; // ditto, but prefixed with .wav header + friend class wxSound; +}; + + +/// Simple sound class: +class WXDLLIMPEXP_ADV wxSound : public wxSoundBase +{ +public: + wxSound(); + wxSound(const wxString& fileName, bool isResource = false); + wxSound(size_t size, const void* data); + virtual ~wxSound(); + + // Create from resource or file + bool Create(const wxString& fileName, bool isResource = false); + // Create from data + bool Create(size_t size, const void* data); + + bool IsOk() const { return m_data != NULL; } + + // Stop playing any sound + static void Stop(); + + // Returns true if a sound is being played + static bool IsPlaying(); + + // for internal use + static void UnloadBackend(); + +protected: + bool DoPlay(unsigned flags) const; + + static void EnsureBackend(); + void Free(); + bool LoadWAV(const void* data, size_t length, bool copyData); + + static wxSoundBackend *ms_backend; +#if wxUSE_LIBSDL && wxUSE_PLUGINS + // FIXME - temporary, until we have plugins architecture + static wxDynamicLibrary *ms_backendSDL; +#endif + +private: + wxSoundData *m_data; +}; + + +// ---------------------------------------------------------------------------- +// wxSoundBackend: +// ---------------------------------------------------------------------------- + +// This is interface to sound playing implementation. There are multiple +// sound architectures in use on Unix platforms and wxWidgets can use several +// of them for playback, depending on their availability at runtime; hence +// the need for backends. This class is for use by wxWidgets and people writing +// additional backends only, it is _not_ for use by applications! + +// Structure that holds playback status information +struct wxSoundPlaybackStatus +{ + // playback is in progress + bool m_playing; + // main thread called wxSound::Stop() + bool m_stopRequested; +}; + +// Audio backend interface +class WXDLLIMPEXP_ADV wxSoundBackend +{ +public: + virtual ~wxSoundBackend() {} + + // Returns the name of the backend (e.g. "Open Sound System") + virtual wxString GetName() const = 0; + + // Returns priority (higher priority backends are tried first) + virtual int GetPriority() const = 0; + + // Checks if the backend's audio system is available and the backend can + // be used for playback + virtual bool IsAvailable() const = 0; + + // Returns true if the backend is capable of playing sound asynchronously. + // If false, then wxWidgets creates a playback thread and handles async + // playback, otherwise it is left up to the backend (will usually be more + // effective). + virtual bool HasNativeAsyncPlayback() const = 0; + + // Plays the sound. flags are same flags as those passed to wxSound::Play. + // The function should periodically check the value of + // status->m_stopRequested and terminate if it is set to true (it may + // be modified by another thread) + virtual bool Play(wxSoundData *data, unsigned flags, + volatile wxSoundPlaybackStatus *status) = 0; + + // Stops playback (if something is played). + virtual void Stop() = 0; + + // Returns true if the backend is playing anything at the moment. + // (This method is never called for backends that don't support async + // playback.) + virtual bool IsPlaying() const = 0; +}; + + +#endif // wxUSE_SOUND + +#endif // _WX_SOUND_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/stackwalk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/stackwalk.h new file mode 100644 index 0000000000..e99741934a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/stackwalk.h @@ -0,0 +1,98 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/stackwalk.h +// Purpose: declaration of wxStackWalker for Unix +// Author: Vadim Zeitlin +// Modified by: +// Created: 2005-01-19 +// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_STACKWALK_H_ +#define _WX_UNIX_STACKWALK_H_ + +// ---------------------------------------------------------------------------- +// wxStackFrame +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStackFrame : public wxStackFrameBase +{ + friend class wxStackWalker; + +public: + // arguments are the stack depth of this frame, its address and the return + // value of backtrace_symbols() for it + // + // NB: we don't copy syminfo pointer so it should have lifetime at least as + // long as ours + wxStackFrame(size_t level = 0, void *address = NULL, const char *syminfo = NULL) + : wxStackFrameBase(level, address) + { + m_syminfo = syminfo; + } + +protected: + virtual void OnGetName(); + + // optimized for the 2 step initialization done by wxStackWalker + void Set(const wxString &name, const wxString &filename, const char* syminfo, + size_t level, size_t numLine, void *address) + { + m_level = level; + m_name = name; + m_filename = filename; + m_syminfo = syminfo; + + m_line = numLine; + m_address = address; + } + +private: + const char *m_syminfo; +}; + +// ---------------------------------------------------------------------------- +// wxStackWalker +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStackWalker : public wxStackWalkerBase +{ +public: + // we need the full path to the program executable to be able to use + // addr2line, normally we can retrieve it from wxTheApp but if wxTheApp + // doesn't exist or doesn't have the correct value, the path may be given + // explicitly + wxStackWalker(const char *argv0 = NULL) + { + ms_exepath = wxString::FromAscii(argv0); + } + + ~wxStackWalker() + { + FreeStack(); + } + + virtual void Walk(size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH); +#if wxUSE_ON_FATAL_EXCEPTION + virtual void WalkFromException(size_t maxDepth = wxSTACKWALKER_MAX_DEPTH) { Walk(2, maxDepth); } +#endif // wxUSE_ON_FATAL_EXCEPTION + + static const wxString& GetExePath() { return ms_exepath; } + + + // these two may be used to save the stack at some point (fast operation) + // and then process it later (slow operation) + void SaveStack(size_t maxDepth); + void ProcessFrames(size_t skip); + void FreeStack(); + +private: + int InitFrames(wxStackFrame *arr, size_t n, void **addresses, char **syminfo); + + static wxString ms_exepath; + static void *ms_addresses[]; + static char **ms_symbols; + static int m_depth; +}; + +#endif // _WX_UNIX_STACKWALK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/stdpaths.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/stdpaths.h new file mode 100644 index 0000000000..2f111992a3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/stdpaths.h @@ -0,0 +1,63 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/stdpaths.h +// Purpose: wxStandardPaths for Unix systems +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-10-19 +// Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_STDPATHS_H_ +#define _WX_UNIX_STDPATHS_H_ + +// ---------------------------------------------------------------------------- +// wxStandardPaths +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxStandardPaths : public wxStandardPathsBase +{ +public: + // tries to determine the installation prefix automatically (Linux only right + // now) and returns /usr/local if it failed + void DetectPrefix(); + + // set the program installation directory which is /usr/local by default + // + // under some systems (currently only Linux) the program directory can be + // determined automatically but for portable programs you should always set + // it explicitly + void SetInstallPrefix(const wxString& prefix); + + // get the program installation prefix + // + // if the prefix had been previously by SetInstallPrefix, returns that + // value, otherwise calls DetectPrefix() + wxString GetInstallPrefix() const; + + + // implement base class pure virtuals + virtual wxString GetExecutablePath() const; + virtual wxString GetConfigDir() const; + virtual wxString GetUserConfigDir() const; + virtual wxString GetDataDir() const; + virtual wxString GetLocalDataDir() const; + virtual wxString GetUserDataDir() const; + virtual wxString GetPluginsDir() const; + virtual wxString GetLocalizedResourcesDir(const wxString& lang, + ResourceCat category) const; +#ifndef __VMS + virtual wxString GetDocumentsDir() const; +#endif + +protected: + // Ctor is protected, use wxStandardPaths::Get() instead of instantiating + // objects of this class directly. + wxStandardPaths() { } + +private: + wxString m_prefix; +}; + +#endif // _WX_UNIX_STDPATHS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/taskbarx11.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/taskbarx11.h new file mode 100644 index 0000000000..02a9200941 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/taskbarx11.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////// +// File: wx/unix/taskbarx11.h +// Purpose: Defines wxTaskBarIcon class for most common X11 desktops +// Author: Vaclav Slavik +// Modified by: +// Created: 04/04/2003 +// Copyright: (c) Vaclav Slavik, 2003 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_TASKBAR_H_ +#define _WX_UNIX_TASKBAR_H_ + +class WXDLLIMPEXP_FWD_ADV wxTaskBarIconArea; + +class WXDLLIMPEXP_ADV wxTaskBarIcon: public wxTaskBarIconBase +{ +public: + wxTaskBarIcon(); + virtual ~wxTaskBarIcon(); + + // Accessors: + bool IsOk() const; + bool IsIconInstalled() const; + + // Operations: + bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString); + bool RemoveIcon(); + bool PopupMenu(wxMenu *menu); + +protected: + wxTaskBarIconArea *m_iconWnd; + +private: + void OnDestroy(wxWindowDestroyEvent&); + + DECLARE_DYNAMIC_CLASS(wxTaskBarIcon) +}; + +#endif // _WX_UNIX_TASKBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/tls.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/tls.h new file mode 100644 index 0000000000..ce61e6fff7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/tls.h @@ -0,0 +1,65 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/tls.h +// Purpose: Pthreads implementation of wxTlsValue<> +// Author: Vadim Zeitlin +// Created: 2008-08-08 +// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_TLS_H_ +#define _WX_UNIX_TLS_H_ + +#include <pthread.h> + +// ---------------------------------------------------------------------------- +// wxTlsKey is a helper class encapsulating the TLS value index +// ---------------------------------------------------------------------------- + +class wxTlsKey +{ +public: + // ctor allocates a new key and possibly registering a destructor function + // for it + wxTlsKey(wxTlsDestructorFunction destructor) + { + m_destructor = destructor; + if ( pthread_key_create(&m_key, destructor) != 0 ) + m_key = 0; + } + + // return true if the key was successfully allocated + bool IsOk() const { return m_key != 0; } + + // get the key value, there is no error return + void *Get() const + { + return pthread_getspecific(m_key); + } + + // change the key value, return true if ok + bool Set(void *value) + { + void *old = Get(); + if ( old ) + m_destructor(old); + + return pthread_setspecific(m_key, value) == 0; + } + + // free the key + ~wxTlsKey() + { + if ( IsOk() ) + pthread_key_delete(m_key); + } + +private: + wxTlsDestructorFunction m_destructor; + pthread_key_t m_key; + + wxDECLARE_NO_COPY_CLASS(wxTlsKey); +}; + +#endif // _WX_UNIX_TLS_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/utilsx11.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/utilsx11.h new file mode 100644 index 0000000000..29898372fa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/unix/utilsx11.h @@ -0,0 +1,78 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/utilsx11.h +// Purpose: Miscellaneous X11 functions +// Author: Mattia Barbon, Vaclav Slavik, Vadim Zeitlin +// Modified by: +// Created: 25.03.02 +// Copyright: (c) wxWidgets team +// (c) 2010 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_UTILSX11_H_ +#define _WX_UNIX_UTILSX11_H_ + +#include "wx/defs.h" +#include "wx/gdicmn.h" + +#include <X11/Xlib.h> + +// NB: Content of this header is for wxWidgets' private use! It is not +// part of public API and may be modified or even disappear in the future! + +#if defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXX11__) + +#if defined(__WXGTK__) +typedef void WXDisplay; +typedef void* WXWindow; +#endif +typedef unsigned long WXKeySym; + +int wxCharCodeXToWX(WXKeySym keySym); +WXKeySym wxCharCodeWXToX(int id); + +class wxIconBundle; + +void wxSetIconsX11( WXDisplay* display, WXWindow window, + const wxIconBundle& ib ); + + +enum wxX11FullScreenMethod +{ + wxX11_FS_AUTODETECT = 0, + wxX11_FS_WMSPEC, + wxX11_FS_KDE, + wxX11_FS_GENERIC +}; + +wxX11FullScreenMethod wxGetFullScreenMethodX11(WXDisplay* display, + WXWindow rootWindow); + +void wxSetFullScreenStateX11(WXDisplay* display, WXWindow rootWindow, + WXWindow window, bool show, wxRect *origSize, + wxX11FullScreenMethod method); + + +// Class wrapping X11 Display: it opens it in ctor and closes it in dtor. +class wxX11Display +{ +public: + wxX11Display() { m_dpy = XOpenDisplay(NULL); } + ~wxX11Display() { if ( m_dpy ) XCloseDisplay(m_dpy); } + + operator Display *() const { return m_dpy; } + + // Using DefaultRootWindow() with an object of wxX11Display class doesn't + // compile because it is a macro which tries to cast wxX11Display so + // provide a convenient helper. + Window DefaultRoot() const { return DefaultRootWindow(m_dpy); } + +private: + Display *m_dpy; + + wxDECLARE_NO_COPY_CLASS(wxX11Display); +}; + +#endif // __WXMOTIF__, __WXGTK__, __WXX11__ + +#endif // _WX_UNIX_UTILSX11_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/uri.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/uri.h new file mode 100644 index 0000000000..758bd72e27 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/uri.h @@ -0,0 +1,187 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/uri.h +// Purpose: wxURI - Class for parsing URIs +// Author: Ryan Norton +// Vadim Zeitlin (UTF-8 URI support, many other changes) +// Created: 07/01/2004 +// Copyright: (c) 2004 Ryan Norton +// 2008 Vadim Zeitlin +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_URI_H_ +#define _WX_URI_H_ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" +#include "wx/arrstr.h" + +// Host Type that the server component can be +enum wxURIHostType +{ + wxURI_REGNAME, // Host is a normal register name (www.mysite.com etc.) + wxURI_IPV4ADDRESS, // Host is a version 4 ip address (192.168.1.100) + wxURI_IPV6ADDRESS, // Host is a version 6 ip address [aa:aa:aa:aa::aa:aa]:5050 + wxURI_IPVFUTURE // Host is a future ip address (wxURI is unsure what kind) +}; + +// Component Flags +enum wxURIFieldType +{ + wxURI_SCHEME = 1, + wxURI_USERINFO = 2, + wxURI_SERVER = 4, + wxURI_PORT = 8, + wxURI_PATH = 16, + wxURI_QUERY = 32, + wxURI_FRAGMENT = 64 +}; + +// Miscellaneous other flags +enum wxURIFlags +{ + wxURI_STRICT = 1 +}; + + +// Generic class for parsing URIs. +// +// See RFC 3986 +class WXDLLIMPEXP_BASE wxURI : public wxObject +{ +public: + wxURI(); + wxURI(const wxString& uri); + + // default copy ctor, assignment operator and dtor are ok + + bool Create(const wxString& uri); + + wxURI& operator=(const wxString& string) + { + Create(string); + return *this; + } + + bool operator==(const wxURI& uri) const; + + // various accessors + + bool HasScheme() const { return (m_fields & wxURI_SCHEME) != 0; } + bool HasUserInfo() const { return (m_fields & wxURI_USERINFO) != 0; } + bool HasServer() const { return (m_fields & wxURI_SERVER) != 0; } + bool HasPort() const { return (m_fields & wxURI_PORT) != 0; } + bool HasPath() const { return (m_fields & wxURI_PATH) != 0; } + bool HasQuery() const { return (m_fields & wxURI_QUERY) != 0; } + bool HasFragment() const { return (m_fields & wxURI_FRAGMENT) != 0; } + + const wxString& GetScheme() const { return m_scheme; } + const wxString& GetPath() const { return m_path; } + const wxString& GetQuery() const { return m_query; } + const wxString& GetFragment() const { return m_fragment; } + const wxString& GetPort() const { return m_port; } + const wxString& GetUserInfo() const { return m_userinfo; } + const wxString& GetServer() const { return m_server; } + wxURIHostType GetHostType() const { return m_hostType; } + + // these functions only work if the user information part of the URI is in + // the usual (but insecure and hence explicitly recommended against by the + // RFC) "user:password" form + wxString GetUser() const; + wxString GetPassword() const; + + + // combine all URI components into a single string + // + // BuildURI() returns the real URI suitable for use with network libraries, + // for example, while BuildUnescapedURI() returns a string suitable to be + // shown to the user. + wxString BuildURI() const { return DoBuildURI(&wxURI::Nothing); } + wxString BuildUnescapedURI() const { return DoBuildURI(&wxURI::Unescape); } + + // the escaped URI should contain only ASCII characters, including possible + // escape sequences + static wxString Unescape(const wxString& escapedURI); + + + void Resolve(const wxURI& base, int flags = wxURI_STRICT); + bool IsReference() const; + +protected: + void Clear(); + + // common part of BuildURI() and BuildUnescapedURI() + wxString DoBuildURI(wxString (*funcDecode)(const wxString&)) const; + + // function which returns its argument unmodified, this is used by + // BuildURI() to tell DoBuildURI() that nothing needs to be done with the + // URI components + static wxString Nothing(const wxString& value) { return value; } + + bool Parse(const char* uri); + + const char* ParseAuthority (const char* uri); + const char* ParseScheme (const char* uri); + const char* ParseUserInfo (const char* uri); + const char* ParseServer (const char* uri); + const char* ParsePort (const char* uri); + const char* ParsePath (const char* uri); + const char* ParseQuery (const char* uri); + const char* ParseFragment (const char* uri); + + + static bool ParseH16(const char*& uri); + static bool ParseIPv4address(const char*& uri); + static bool ParseIPv6address(const char*& uri); + static bool ParseIPvFuture(const char*& uri); + + // should be called with i pointing to '%', returns the encoded character + // following it or -1 if invalid and advances i past it (so that it points + // to the last character consumed on return) + static int DecodeEscape(wxString::const_iterator& i); + + // append next character pointer to by p to the string in an escaped form + // and advance p past it + // + // if the next character is '%' and it's followed by 2 hex digits, they are + // not escaped (again) by this function, this allows to keep (backwards- + // compatible) ambiguity about the input format to wxURI::Create(): it can + // be either already escaped or not + void AppendNextEscaped(wxString& s, const char *& p); + + // convert hexadecimal digit to its value; return -1 if c isn't valid + static int CharToHex(char c); + + // split an URI path string in its component segments (including empty and + // "." ones, no post-processing is done) + static wxArrayString SplitInSegments(const wxString& path); + + // various URI grammar helpers + static bool IsUnreserved(char c); + static bool IsReserved(char c); + static bool IsGenDelim(char c); + static bool IsSubDelim(char c); + static bool IsHex(char c); + static bool IsAlpha(char c); + static bool IsDigit(char c); + static bool IsEndPath(char c); + + wxString m_scheme; + wxString m_path; + wxString m_query; + wxString m_fragment; + + wxString m_userinfo; + wxString m_server; + wxString m_port; + + wxURIHostType m_hostType; + + size_t m_fields; + + DECLARE_DYNAMIC_CLASS(wxURI) +}; + +#endif // _WX_URI_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/url.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/url.h new file mode 100644 index 0000000000..572cae8b11 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/url.h @@ -0,0 +1,116 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/url.h +// Purpose: URL parser +// Author: Guilhem Lavaux +// Modified by: Ryan Norton +// Created: 20/07/1997 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_URL_H +#define _WX_URL_H + +#include "wx/defs.h" + +#if wxUSE_URL + +#include "wx/uri.h" +#include "wx/protocol/protocol.h" + +#if wxUSE_PROTOCOL_HTTP + #include "wx/protocol/http.h" +#endif + +typedef enum { + wxURL_NOERR = 0, + wxURL_SNTXERR, + wxURL_NOPROTO, + wxURL_NOHOST, + wxURL_NOPATH, + wxURL_CONNERR, + wxURL_PROTOERR +} wxURLError; + +#if wxUSE_URL_NATIVE +class WXDLLIMPEXP_FWD_NET wxURL; + +class WXDLLIMPEXP_NET wxURLNativeImp : public wxObject +{ +public: + virtual ~wxURLNativeImp() { } + virtual wxInputStream *GetInputStream(wxURL *owner) = 0; +}; +#endif // wxUSE_URL_NATIVE + +class WXDLLIMPEXP_NET wxURL : public wxURI +{ +public: + wxURL(const wxString& sUrl = wxEmptyString); + wxURL(const wxURI& uri); + wxURL(const wxURL& url); + virtual ~wxURL(); + + wxURL& operator = (const wxString& url); + wxURL& operator = (const wxURI& uri); + wxURL& operator = (const wxURL& url); + + wxProtocol& GetProtocol() { return *m_protocol; } + wxURLError GetError() const { return m_error; } + wxString GetURL() const { return m_url; } + + wxURLError SetURL(const wxString &url) + { *this = url; return m_error; } + + bool IsOk() const + { return m_error == wxURL_NOERR; } + + wxInputStream *GetInputStream(); + +#if wxUSE_PROTOCOL_HTTP + static void SetDefaultProxy(const wxString& url_proxy); + void SetProxy(const wxString& url_proxy); +#endif // wxUSE_PROTOCOL_HTTP + +protected: + static wxProtoInfo *ms_protocols; + +#if wxUSE_PROTOCOL_HTTP + static wxHTTP *ms_proxyDefault; + static bool ms_useDefaultProxy; + wxHTTP *m_proxy; + bool m_useProxy; +#endif // wxUSE_PROTOCOL_HTTP + +#if wxUSE_URL_NATIVE + friend class wxURLNativeImp; + // pointer to a native URL implementation object + wxURLNativeImp *m_nativeImp; + // Creates on the heap and returns a native + // implementation object for the current platform. + static wxURLNativeImp *CreateNativeImpObject(); +#endif // wxUSE_URL_NATIVE + + wxProtoInfo *m_protoinfo; + wxProtocol *m_protocol; + + wxURLError m_error; + wxString m_url; + + void Init(const wxString&); + bool ParseURL(); + void CleanData(); + void Free(); + bool FetchProtocol(); + + friend class wxProtoInfo; + friend class wxURLModule; + +private: + DECLARE_DYNAMIC_CLASS(wxURL) +}; + +#endif // wxUSE_URL + +#endif // _WX_URL_H + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/ustring.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ustring.h new file mode 100644 index 0000000000..7c58fddd8a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/ustring.h @@ -0,0 +1,749 @@ + +// Name: wx/ustring.h +// Purpose: 32-bit string (UCS-4) +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_USTRING_H_ +#define _WX_USTRING_H_ + +#include "wx/defs.h" +#include "wx/string.h" + +#include <string> + +#if SIZEOF_WCHAR_T == 2 +typedef wxWCharBuffer wxU16CharBuffer; +typedef wxScopedWCharBuffer wxScopedU16CharBuffer; +#else +typedef wxCharTypeBuffer<wxChar16> wxU16CharBuffer; +typedef wxScopedCharTypeBuffer<wxChar16> wxScopedU16CharBuffer; +#endif + +#if SIZEOF_WCHAR_T == 4 +typedef wxWCharBuffer wxU32CharBuffer; +typedef wxScopedWCharBuffer wxScopedU32CharBuffer; +#else +typedef wxCharTypeBuffer<wxChar32> wxU32CharBuffer; +typedef wxScopedCharTypeBuffer<wxChar32> wxScopedU32CharBuffer; +#endif + +#ifdef __VISUALC__ + // "non dll-interface class 'std::basic_string<wxChar32>' used as base + // interface for dll-interface class 'wxString'" -- this is OK in our case + // (and warning is unavoidable anyhow) + #pragma warning(push) + #pragma warning(disable:4275) +#endif + +class WXDLLIMPEXP_BASE wxUString: public std::basic_string<wxChar32> +{ +public: + wxUString() { } + + wxUString( const wxChar32 *str ) { assign(str); } + wxUString( const wxScopedU32CharBuffer &buf ) { assign(buf); } + + wxUString( const char *str ) { assign(str); } + wxUString( const wxScopedCharBuffer &buf ) { assign(buf); } + wxUString( const char *str, const wxMBConv &conv ) { assign(str,conv); } + wxUString( const wxScopedCharBuffer &buf, const wxMBConv &conv ) { assign(buf,conv); } + + wxUString( const wxChar16 *str ) { assign(str); } + wxUString( const wxScopedU16CharBuffer &buf ) { assign(buf); } + + wxUString( const wxCStrData *cstr ) { assign(cstr); } + wxUString( const wxString &str ) { assign(str); } + + wxUString( char ch ) { assign(ch); } + wxUString( wxChar16 ch ) { assign(ch); } + wxUString( wxChar32 ch ) { assign(ch); } + wxUString( wxUniChar ch ) { assign(ch); } + wxUString( wxUniCharRef ch ) { assign(ch); } + wxUString( size_type n, char ch ) { assign(n,ch); } + wxUString( size_type n, wxChar16 ch ) { assign(n,ch); } + wxUString( size_type n, wxChar32 ch ) { assign(n,ch); } + wxUString( size_type n, wxUniChar ch ) { assign(n,ch); } + wxUString( size_type n, wxUniCharRef ch ) { assign(n,ch); } + + // static construction + + static wxUString FromAscii( const char *str, size_type n ) + { + wxUString ret; + ret.assignFromAscii( str, n ); + return ret; + } + + static wxUString FromAscii( const char *str ) + { + wxUString ret; + ret.assignFromAscii( str ); + return ret; + } + + static wxUString FromUTF8( const char *str, size_type n ) + { + wxUString ret; + ret.assignFromUTF8( str, n ); + return ret; + } + + static wxUString FromUTF8( const char *str ) + { + wxUString ret; + ret.assignFromUTF8( str ); + return ret; + } + + static wxUString FromUTF16( const wxChar16 *str, size_type n ) + { + wxUString ret; + ret.assignFromUTF16( str, n ); + return ret; + } + + static wxUString FromUTF16( const wxChar16 *str ) + { + wxUString ret; + ret.assignFromUTF16( str ); + return ret; + } + + // assign from encoding + + wxUString &assignFromAscii( const char *str ); + wxUString &assignFromAscii( const char *str, size_type n ); + wxUString &assignFromUTF8( const char *str ); + wxUString &assignFromUTF8( const char *str, size_type n ); + wxUString &assignFromUTF16( const wxChar16* str ); + wxUString &assignFromUTF16( const wxChar16* str, size_type n ); + wxUString &assignFromCString( const char* str ); + wxUString &assignFromCString( const char* str, const wxMBConv &conv ); + + // conversions + + wxScopedCharBuffer utf8_str() const; + wxScopedU16CharBuffer utf16_str() const; + +#if SIZEOF_WCHAR_T == 2 + wxScopedWCharBuffer wc_str() const + { + return utf16_str(); + } +#else + wchar_t *wc_str() const + { + return (wchar_t*) c_str(); + } +#endif + + operator wxString() const + { +#if wxUSE_UNICODE_UTF8 + return wxString::FromUTF8( utf8_str() ); +#else +#if SIZEOF_WCHAR_T == 2 + return wxString( utf16_str() ); +#else + return wxString( c_str() ); +#endif +#endif + } + +#if wxUSE_UNICODE_UTF8 + wxScopedCharBuffer wx_str() + { + return utf8_str(); + } +#else +#if SIZEOF_WCHAR_T == 2 + wxScopedWCharBuffer wx_str() + { + return utf16_str(); + } +#else + const wchar_t* wx_str() + { + return c_str(); + } +#endif +#endif + + // assign + + wxUString &assign( const wxChar32* str ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->assign( str ); + } + + wxUString &assign( const wxChar32* str, size_type n ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->assign( str, n ); + } + + wxUString &assign( const wxUString &str ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->assign( str ); + } + + wxUString &assign( const wxUString &str, size_type pos, size_type n ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->assign( str, pos, n ); + } + + // FIXME-VC6: VC 6.0 stl does not support all types of assign functions + #ifdef __VISUALC6__ + wxUString &assign( wxChar32 ch ) + { + wxChar32 chh[1]; + chh[0] = ch; + std::basic_string<wxChar32> *base = this; + return (wxUString &)base->assign(chh); + } + + wxUString &assign( size_type n, wxChar32 ch ) + { + wxU32CharBuffer buffer(n); + wxChar32 *p = buffer.data(); + size_type i; + for (i = 0; i < n; i++) + { + *p = ch; + p++; + } + + std::basic_string<wxChar32> *base = this; + return (wxUString &)base->assign(buffer.data()); + } + #else + wxUString &assign( wxChar32 ch ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->assign( (size_type) 1, ch ); + } + + wxUString &assign( size_type n, wxChar32 ch ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->assign( n, ch ); + } + #endif // __VISUALC6__ + + wxUString &assign( const wxScopedU32CharBuffer &buf ) + { + return assign( buf.data() ); + } + + wxUString &assign( const char *str ) + { + return assignFromCString( str ); + } + + wxUString &assign( const wxScopedCharBuffer &buf ) + { + return assignFromCString( buf.data() ); + } + + wxUString &assign( const char *str, const wxMBConv &conv ) + { + return assignFromCString( str, conv ); + } + + wxUString &assign( const wxScopedCharBuffer &buf, const wxMBConv &conv ) + { + return assignFromCString( buf.data(), conv ); + } + + wxUString &assign( const wxChar16 *str ) + { + return assignFromUTF16( str ); + } + + wxUString &assign( const wxScopedU16CharBuffer &buf ) + { + return assignFromUTF16( buf.data() ); + } + + wxUString &assign( const wxCStrData *cstr ) + { +#if SIZEOF_WCHAR_T == 2 + return assignFromUTF16( cstr->AsWChar() ); +#else + return assign( cstr->AsWChar() ); +#endif + } + + wxUString &assign( const wxString &str ) + { +#if wxUSE_UNICODE_UTF8 + return assignFromUTF8( str.wx_str() ); +#else + #if SIZEOF_WCHAR_T == 2 + return assignFromUTF16( str.wc_str() ); + #else + return assign( str.wc_str() ); + #endif +#endif + } + + wxUString &assign( char ch ) + { + char buf[2]; + buf[0] = ch; + buf[1] = 0; + return assignFromCString( buf ); + } + + wxUString &assign( size_type n, char ch ) + { + wxCharBuffer buffer(n); + char *p = buffer.data(); + size_type i; + for (i = 0; i < n; i++) + { + *p = ch; + p++; + } + return assignFromCString( buffer.data() ); + } + + wxUString &assign( wxChar16 ch ) + { + wxChar16 buf[2]; + buf[0] = ch; + buf[1] = 0; + return assignFromUTF16( buf ); + } + + wxUString &assign( size_type n, wxChar16 ch ) + { + wxU16CharBuffer buffer(n); + wxChar16 *p = buffer.data(); + size_type i; + for (i = 0; i < n; i++) + { + *p = ch; + p++; + } + return assignFromUTF16( buffer.data() ); + } + + wxUString &assign( wxUniChar ch ) + { + return assign( (wxChar32) ch.GetValue() ); + } + + wxUString &assign( size_type n, wxUniChar ch ) + { + return assign( n, (wxChar32) ch.GetValue() ); + } + + wxUString &assign( wxUniCharRef ch ) + { + return assign( (wxChar32) ch.GetValue() ); + } + + wxUString &assign( size_type n, wxUniCharRef ch ) + { + return assign( n, (wxChar32) ch.GetValue() ); + } + + // append [STL overload] + + wxUString &append( const wxUString &s ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->append( s ); + } + + wxUString &append( const wxUString &s, size_type pos, size_type n ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->append( s, pos, n ); + } + + wxUString &append( const wxChar32* s ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->append( s ); + } + + wxUString &append( const wxChar32* s, size_type n ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->append( s, n ); + } + + // FIXME-VC6: VC 6.0 stl does not support all types of append functions + #ifdef __VISUALC6__ + wxUString &append( size_type n, wxChar32 c ) + { + wxU32CharBuffer buffer(n); + wxChar32 *p = buffer.data(); + size_type i; + for (i = 0; i < n; i++) + { + *p = c; + p++; + } + + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->append(buffer.data()); + } + #else + wxUString &append( size_type n, wxChar32 c ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->append( n, c ); + } + #endif // __VISUALC6__ + + wxUString &append( wxChar32 c ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->append( 1, c ); + } + + // append [wx overload] + + wxUString &append( const wxScopedU16CharBuffer &buf ) + { + return append( buf.data() ); + } + + wxUString &append( const wxScopedU32CharBuffer &buf ) + { + return append( buf.data() ); + } + + wxUString &append( const char *str ) + { + return append( wxUString( str ) ); + } + + wxUString &append( const wxScopedCharBuffer &buf ) + { + return append( wxUString( buf ) ); + } + + wxUString &append( const wxChar16 *str ) + { + return append( wxUString( str ) ); + } + + wxUString &append( const wxString &str ) + { + return append( wxUString( str ) ); + } + + wxUString &append( const wxCStrData *cstr ) + { + return append( wxUString( cstr ) ); + } + + wxUString &append( char ch ) + { + char buf[2]; + buf[0] = ch; + buf[1] = 0; + return append( buf ); + } + + wxUString &append( wxChar16 ch ) + { + wxChar16 buf[2]; + buf[0] = ch; + buf[1] = 0; + return append( buf ); + } + + wxUString &append( wxUniChar ch ) + { + return append( (size_type) 1, (wxChar32) ch.GetValue() ); + } + + wxUString &append( wxUniCharRef ch ) + { + return append( (size_type) 1, (wxChar32) ch.GetValue() ); + } + + + // insert [STL overloads] + + wxUString &insert( size_type pos, const wxUString &s ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->insert( pos, s ); + } + + wxUString &insert( size_type pos, const wxUString &s, size_type pos1, size_type n ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->insert( pos, s, pos1, n ); + } + + wxUString &insert( size_type pos, const wxChar32 *s ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->insert( pos, s ); + } + + wxUString &insert( size_type pos, const wxChar32 *s, size_type n ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->insert( pos, s, n ); + } + + wxUString &insert( size_type pos, size_type n, wxChar32 c ) + { + std::basic_string<wxChar32> *base = this; + return (wxUString &) base->insert( pos, n, c ); + } + + + // insert [STL overloads] + + wxUString &insert( size_type n, const char *s ) + { + return insert( n, wxUString( s ) ); + } + + wxUString &insert( size_type n, const wxChar16 *s ) + { + return insert( n, wxUString( s ) ); + } + + wxUString &insert( size_type n, const wxScopedCharBuffer &buf ) + { + return insert( n, wxUString( buf ) ); + } + + wxUString &insert( size_type n, const wxScopedU16CharBuffer &buf ) + { + return insert( n, wxUString( buf ) ); + } + + wxUString &insert( size_type n, const wxScopedU32CharBuffer &buf ) + { + return insert( n, buf.data() ); + } + + wxUString &insert( size_type n, const wxString &s ) + { + return insert( n, wxUString( s ) ); + } + + wxUString &insert( size_type n, const wxCStrData *cstr ) + { + return insert( n, wxUString( cstr ) ); + } + + wxUString &insert( size_type n, char ch ) + { + char buf[2]; + buf[0] = ch; + buf[1] = 0; + return insert( n, buf ); + } + + wxUString &insert( size_type n, wchar_t ch ) + { + wchar_t buf[2]; + buf[0] = ch; + buf[1] = 0; + return insert( n, buf ); + } + + // insert iterator + + iterator insert( iterator it, wxChar32 ch ) + { + std::basic_string<wxChar32> *base = this; + return base->insert( it, ch ); + } + + void insert(iterator it, const_iterator first, const_iterator last) + { + std::basic_string<wxChar32> *base = this; + base->insert( it, first, last ); + } + + + // operator = + wxUString& operator=(const wxString& s) + { return assign( s ); } + wxUString& operator=(const wxCStrData* s) + { return assign( s ); } + wxUString& operator=(const char *s) + { return assign( s ); } + wxUString& operator=(const wxChar16 *s) + { return assign( s ); } + wxUString& operator=(const wxChar32 *s) + { return assign( s ); } + wxUString& operator=(const wxScopedCharBuffer &s) + { return assign( s ); } + wxUString& operator=(const wxScopedU16CharBuffer &s) + { return assign( s ); } + wxUString& operator=(const wxScopedU32CharBuffer &s) + { return assign( s ); } + wxUString& operator=(const char ch) + { return assign( ch ); } + wxUString& operator=(const wxChar16 ch) + { return assign( ch ); } + wxUString& operator=(const wxChar32 ch) + { return assign( ch ); } + wxUString& operator=(const wxUniChar ch) + { return assign( ch ); } + wxUString& operator=(const wxUniCharRef ch) + { return assign( ch ); } + + // operator += + wxUString& operator+=(const wxUString& s) + { return append( s ); } + wxUString& operator+=(const wxString& s) + { return append( s ); } + wxUString& operator+=(const wxCStrData* s) + { return append( s ); } + wxUString& operator+=(const char *s) + { return append( s ); } + wxUString& operator+=(const wxChar16 *s) + { return append( s ); } + wxUString& operator+=(const wxChar32 *s) + { return append( s ); } + wxUString& operator+=(const wxScopedCharBuffer &s) + { return append( s ); } + wxUString& operator+=(const wxScopedU16CharBuffer &s) + { return append( s ); } + wxUString& operator+=(const wxScopedU32CharBuffer &s) + { return append( s ); } + wxUString& operator+=(const char ch) + { return append( ch ); } + wxUString& operator+=(const wxChar16 ch) + { return append( ch ); } + wxUString& operator+=(const wxChar32 ch) + { return append( ch ); } + wxUString& operator+=(const wxUniChar ch) + { return append( ch ); } + wxUString& operator+=(const wxUniCharRef ch) + { return append( ch ); } + +}; + +#ifdef __VISUALC__ + #pragma warning(pop) +#endif + +inline wxUString operator+(const wxUString &s1, const wxUString &s2) + { wxUString ret( s1 ); ret.append( s2 ); return ret; } +inline wxUString operator+(const wxUString &s1, const char *s2) + { return s1 + wxUString(s2); } +inline wxUString operator+(const wxUString &s1, const wxString &s2) + { return s1 + wxUString(s2); } +inline wxUString operator+(const wxUString &s1, const wxCStrData *s2) + { return s1 + wxUString(s2); } +inline wxUString operator+(const wxUString &s1, const wxChar16* s2) + { return s1 + wxUString(s2); } +inline wxUString operator+(const wxUString &s1, const wxChar32 *s2) + { return s1 + wxUString(s2); } +inline wxUString operator+(const wxUString &s1, const wxScopedCharBuffer &s2) + { return s1 + wxUString(s2); } +inline wxUString operator+(const wxUString &s1, const wxScopedU16CharBuffer &s2) + { return s1 + wxUString(s2); } +inline wxUString operator+(const wxUString &s1, const wxScopedU32CharBuffer &s2) + { return s1 + wxUString(s2); } +inline wxUString operator+(const wxUString &s1, char s2) + { return s1 + wxUString(s2); } +inline wxUString operator+(const wxUString &s1, wxChar32 s2) + { wxUString ret( s1 ); ret.append( s2 ); return ret; } +inline wxUString operator+(const wxUString &s1, wxChar16 s2) + { wxUString ret( s1 ); ret.append( (wxChar32) s2 ); return ret; } +inline wxUString operator+(const wxUString &s1, wxUniChar s2) + { wxUString ret( s1 ); ret.append( (wxChar32) s2.GetValue() ); return ret; } +inline wxUString operator+(const wxUString &s1, wxUniCharRef s2) + { wxUString ret( s1 ); ret.append( (wxChar32) s2.GetValue() ); return ret; } + +inline wxUString operator+(const char *s1, const wxUString &s2) + { return wxUString(s1) + s2; } +inline wxUString operator+(const wxString &s1, const wxUString &s2) + { return wxUString(s1) + s2; } +inline wxUString operator+(const wxCStrData *s1, const wxUString &s2) + { return wxUString(s1) + s2; } +inline wxUString operator+(const wxChar16* s1, const wxUString &s2) + { return wxUString(s1) + s2; } +inline wxUString operator+(const wxChar32 *s1, const wxUString &s2) + { return wxUString(s1) + s2; } +inline wxUString operator+(const wxScopedCharBuffer &s1, const wxUString &s2) + { return wxUString(s1) + s2; } +inline wxUString operator+(const wxScopedU16CharBuffer &s1, const wxUString &s2) + { return wxUString(s1) + s2; } +inline wxUString operator+(const wxScopedU32CharBuffer &s1, const wxUString &s2) + { return wxUString(s1) + s2; } +inline wxUString operator+(char s1, const wxUString &s2) + { return wxUString(s1) + s2; } +inline wxUString operator+(wxChar32 s1, const wxUString &s2 ) + { return wxUString(s1) + s2; } +inline wxUString operator+(wxChar16 s1, const wxUString &s2) + { return wxUString(s1) + s2; } +inline wxUString operator+(wxUniChar s1, const wxUString &s2) + { return wxUString(s1) + s2; } +inline wxUString operator+(wxUniCharRef s1, const wxUString &s2) + { return wxUString(s1) + s2; } + + +inline bool operator==(const wxUString& s1, const wxUString& s2) + { return s1.compare( s2 ) == 0; } +inline bool operator!=(const wxUString& s1, const wxUString& s2) + { return s1.compare( s2 ) != 0; } +inline bool operator< (const wxUString& s1, const wxUString& s2) + { return s1.compare( s2 ) < 0; } +inline bool operator> (const wxUString& s1, const wxUString& s2) + { return s1.compare( s2 ) > 0; } +inline bool operator<=(const wxUString& s1, const wxUString& s2) + { return s1.compare( s2 ) <= 0; } +inline bool operator>=(const wxUString& s1, const wxUString& s2) + { return s1.compare( s2 ) >= 0; } + +#define wxUSTRING_COMP_OPERATORS( T ) \ +inline bool operator==(const wxUString& s1, T s2) \ + { return s1.compare( wxUString(s2) ) == 0; } \ +inline bool operator!=(const wxUString& s1, T s2) \ + { return s1.compare( wxUString(s2) ) != 0; } \ +inline bool operator< (const wxUString& s1, T s2) \ + { return s1.compare( wxUString(s2) ) < 0; } \ +inline bool operator> (const wxUString& s1, T s2) \ + { return s1.compare( wxUString(s2) ) > 0; } \ +inline bool operator<=(const wxUString& s1, T s2) \ + { return s1.compare( wxUString(s2) ) <= 0; } \ +inline bool operator>=(const wxUString& s1, T s2) \ + { return s1.compare( wxUString(s2) ) >= 0; } \ +\ +inline bool operator==(T s2, const wxUString& s1) \ + { return s1.compare( wxUString(s2) ) == 0; } \ +inline bool operator!=(T s2, const wxUString& s1) \ + { return s1.compare( wxUString(s2) ) != 0; } \ +inline bool operator< (T s2, const wxUString& s1) \ + { return s1.compare( wxUString(s2) ) > 0; } \ +inline bool operator> (T s2, const wxUString& s1) \ + { return s1.compare( wxUString(s2) ) < 0; } \ +inline bool operator<=(T s2, const wxUString& s1) \ + { return s1.compare( wxUString(s2) ) >= 0; } \ +inline bool operator>=(T s2, const wxUString& s1) \ + { return s1.compare( wxUString(s2) ) <= 0; } + +wxUSTRING_COMP_OPERATORS( const wxString & ) +wxUSTRING_COMP_OPERATORS( const char * ) +wxUSTRING_COMP_OPERATORS( const wxChar16 * ) +wxUSTRING_COMP_OPERATORS( const wxChar32 * ) +wxUSTRING_COMP_OPERATORS( const wxScopedCharBuffer & ) +wxUSTRING_COMP_OPERATORS( const wxScopedU16CharBuffer & ) +wxUSTRING_COMP_OPERATORS( const wxScopedU32CharBuffer & ) +wxUSTRING_COMP_OPERATORS( const wxCStrData * ) + +#endif // _WX_USTRING_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/utils.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/utils.h new file mode 100644 index 0000000000..91688f5fad --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/utils.h @@ -0,0 +1,843 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/utils.h +// Purpose: Miscellaneous utilities +// Author: Julian Smart +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UTILS_H_ +#define _WX_UTILS_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/object.h" +#include "wx/list.h" +#include "wx/filefn.h" +#include "wx/hashmap.h" +#include "wx/versioninfo.h" +#include "wx/meta/implicitconversion.h" + +#if wxUSE_GUI + #include "wx/gdicmn.h" + #include "wx/mousestate.h" +#endif + +class WXDLLIMPEXP_FWD_BASE wxArrayString; +class WXDLLIMPEXP_FWD_BASE wxArrayInt; + +// need this for wxGetDiskSpace() as we can't, unfortunately, forward declare +// wxLongLong +#include "wx/longlong.h" + +// needed for wxOperatingSystemId, wxLinuxDistributionInfo +#include "wx/platinfo.h" + +#ifdef __WATCOMC__ + #include <direct.h> +#elif defined(__X__) + #include <dirent.h> + #include <unistd.h> +#endif + +#include <stdio.h> + +// ---------------------------------------------------------------------------- +// Forward declaration +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_BASE wxProcess; +class WXDLLIMPEXP_FWD_CORE wxFrame; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class wxWindowList; +class WXDLLIMPEXP_FWD_CORE wxEventLoop; + +// ---------------------------------------------------------------------------- +// Arithmetic functions +// ---------------------------------------------------------------------------- + +template<typename T1, typename T2> +inline typename wxImplicitConversionType<T1,T2>::value +wxMax(T1 a, T2 b) +{ + typedef typename wxImplicitConversionType<T1,T2>::value ResultType; + + // Cast both operands to the same type before comparing them to avoid + // warnings about signed/unsigned comparisons from some compilers: + return static_cast<ResultType>(a) > static_cast<ResultType>(b) ? a : b; +} + +template<typename T1, typename T2> +inline typename wxImplicitConversionType<T1,T2>::value +wxMin(T1 a, T2 b) +{ + typedef typename wxImplicitConversionType<T1,T2>::value ResultType; + + return static_cast<ResultType>(a) < static_cast<ResultType>(b) ? a : b; +} + +template<typename T1, typename T2, typename T3> +inline typename wxImplicitConversionType3<T1,T2,T3>::value +wxClip(T1 a, T2 b, T3 c) +{ + typedef typename wxImplicitConversionType3<T1,T2,T3>::value ResultType; + + if ( static_cast<ResultType>(a) < static_cast<ResultType>(b) ) + return b; + + if ( static_cast<ResultType>(a) > static_cast<ResultType>(c) ) + return c; + + return a; +} + +// ---------------------------------------------------------------------------- +// wxMemorySize +// ---------------------------------------------------------------------------- + +// wxGetFreeMemory can return huge amount of memory on 32-bit platforms as well +// so to always use long long for its result type on all platforms which +// support it +#if wxUSE_LONGLONG + typedef wxLongLong wxMemorySize; +#else + typedef long wxMemorySize; +#endif + +// ---------------------------------------------------------------------------- +// String functions (deprecated, use wxString) +// ---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_8 +// A shorter way of using strcmp +wxDEPRECATED_INLINE(inline bool wxStringEq(const char *s1, const char *s2), + return wxCRT_StrcmpA(s1, s2) == 0; ) + +#if wxUSE_UNICODE +wxDEPRECATED_INLINE(inline bool wxStringEq(const wchar_t *s1, const wchar_t *s2), + return wxCRT_StrcmpW(s1, s2) == 0; ) +#endif // wxUSE_UNICODE + +#endif // WXWIN_COMPATIBILITY_2_8 + +// ---------------------------------------------------------------------------- +// Miscellaneous functions +// ---------------------------------------------------------------------------- + +// Sound the bell +WXDLLIMPEXP_CORE void wxBell(); + +#if wxUSE_MSGDLG +// Show wxWidgets information +WXDLLIMPEXP_CORE void wxInfoMessageBox(wxWindow* parent); +#endif // wxUSE_MSGDLG + +WXDLLIMPEXP_CORE wxVersionInfo wxGetLibraryVersionInfo(); + +// Get OS description as a user-readable string +WXDLLIMPEXP_BASE wxString wxGetOsDescription(); + +// Get OS version +WXDLLIMPEXP_BASE wxOperatingSystemId wxGetOsVersion(int *majorVsn = NULL, + int *minorVsn = NULL); + +// Get platform endianness +WXDLLIMPEXP_BASE bool wxIsPlatformLittleEndian(); + +// Get platform architecture +WXDLLIMPEXP_BASE bool wxIsPlatform64Bit(); + +#ifdef __LINUX__ +// Get linux-distro informations +WXDLLIMPEXP_BASE wxLinuxDistributionInfo wxGetLinuxDistributionInfo(); +#endif + +// Return a string with the current date/time +WXDLLIMPEXP_BASE wxString wxNow(); + +// Return path where wxWidgets is installed (mostly useful in Unices) +WXDLLIMPEXP_BASE const wxChar *wxGetInstallPrefix(); +// Return path to wxWin data (/usr/share/wx/%{version}) (Unices) +WXDLLIMPEXP_BASE wxString wxGetDataDir(); + +#if wxUSE_GUI + +// Get the state of a key (true if pressed, false if not) +// This is generally most useful getting the state of +// the modifier or toggle keys. +WXDLLIMPEXP_CORE bool wxGetKeyState(wxKeyCode key); + +// Don't synthesize KeyUp events holding down a key and producing +// KeyDown events with autorepeat. On by default and always on +// in wxMSW. +WXDLLIMPEXP_CORE bool wxSetDetectableAutoRepeat( bool flag ); + +// Returns the current state of the mouse position, buttons and modifers +WXDLLIMPEXP_CORE wxMouseState wxGetMouseState(); + +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// wxPlatform +// ---------------------------------------------------------------------------- + +/* + * Class to make it easier to specify platform-dependent values + * + * Examples: + * long val = wxPlatform::If(wxMac, 1).ElseIf(wxGTK, 2).ElseIf(stPDA, 5).Else(3); + * wxString strVal = wxPlatform::If(wxMac, wxT("Mac")).ElseIf(wxMSW, wxT("MSW")).Else(wxT("Other")); + * + * A custom platform symbol: + * + * #define stPDA 100 + * #ifdef __WXWINCE__ + * wxPlatform::AddPlatform(stPDA); + * #endif + * + * long windowStyle = wxCAPTION | (long) wxPlatform::IfNot(stPDA, wxRESIZE_BORDER); + * + */ + +class WXDLLIMPEXP_BASE wxPlatform +{ +public: + wxPlatform() { Init(); } + wxPlatform(const wxPlatform& platform) { Copy(platform); } + void operator = (const wxPlatform& platform) { if (&platform != this) Copy(platform); } + void Copy(const wxPlatform& platform); + + // Specify an optional default value + wxPlatform(int defValue) { Init(); m_longValue = (long)defValue; } + wxPlatform(long defValue) { Init(); m_longValue = defValue; } + wxPlatform(const wxString& defValue) { Init(); m_stringValue = defValue; } + wxPlatform(double defValue) { Init(); m_doubleValue = defValue; } + + static wxPlatform If(int platform, long value); + static wxPlatform IfNot(int platform, long value); + wxPlatform& ElseIf(int platform, long value); + wxPlatform& ElseIfNot(int platform, long value); + wxPlatform& Else(long value); + + static wxPlatform If(int platform, int value) { return If(platform, (long)value); } + static wxPlatform IfNot(int platform, int value) { return IfNot(platform, (long)value); } + wxPlatform& ElseIf(int platform, int value) { return ElseIf(platform, (long) value); } + wxPlatform& ElseIfNot(int platform, int value) { return ElseIfNot(platform, (long) value); } + wxPlatform& Else(int value) { return Else((long) value); } + + static wxPlatform If(int platform, double value); + static wxPlatform IfNot(int platform, double value); + wxPlatform& ElseIf(int platform, double value); + wxPlatform& ElseIfNot(int platform, double value); + wxPlatform& Else(double value); + + static wxPlatform If(int platform, const wxString& value); + static wxPlatform IfNot(int platform, const wxString& value); + wxPlatform& ElseIf(int platform, const wxString& value); + wxPlatform& ElseIfNot(int platform, const wxString& value); + wxPlatform& Else(const wxString& value); + + long GetInteger() const { return m_longValue; } + const wxString& GetString() const { return m_stringValue; } + double GetDouble() const { return m_doubleValue; } + + operator int() const { return (int) GetInteger(); } + operator long() const { return GetInteger(); } + operator double() const { return GetDouble(); } + operator const wxString&() const { return GetString(); } + + static void AddPlatform(int platform); + static bool Is(int platform); + static void ClearPlatforms(); + +private: + + void Init() { m_longValue = 0; m_doubleValue = 0.0; } + + long m_longValue; + double m_doubleValue; + wxString m_stringValue; + static wxArrayInt* sm_customPlatforms; +}; + +/// Function for testing current platform +inline bool wxPlatformIs(int platform) { return wxPlatform::Is(platform); } + +// ---------------------------------------------------------------------------- +// Window ID management +// ---------------------------------------------------------------------------- + +// Ensure subsequent IDs don't clash with this one +WXDLLIMPEXP_BASE void wxRegisterId(int id); + +// Return the current ID +WXDLLIMPEXP_BASE int wxGetCurrentId(); + +// Generate a unique ID +WXDLLIMPEXP_BASE int wxNewId(); + +// ---------------------------------------------------------------------------- +// Various conversions +// ---------------------------------------------------------------------------- + +// Convert 2-digit hex number to decimal +WXDLLIMPEXP_BASE int wxHexToDec(const wxString& buf); + +// Convert 2-digit hex number to decimal +inline int wxHexToDec(const char* buf) +{ + int firstDigit, secondDigit; + + if (buf[0] >= 'A') + firstDigit = buf[0] - 'A' + 10; + else + firstDigit = buf[0] - '0'; + + if (buf[1] >= 'A') + secondDigit = buf[1] - 'A' + 10; + else + secondDigit = buf[1] - '0'; + + return (firstDigit & 0xF) * 16 + (secondDigit & 0xF ); +} + + +// Convert decimal integer to 2-character hex string +WXDLLIMPEXP_BASE void wxDecToHex(int dec, wxChar *buf); +WXDLLIMPEXP_BASE void wxDecToHex(int dec, char* ch1, char* ch2); +WXDLLIMPEXP_BASE wxString wxDecToHex(int dec); + +// ---------------------------------------------------------------------------- +// Process management +// ---------------------------------------------------------------------------- + +// NB: for backwards compatibility reasons the values of wxEXEC_[A]SYNC *must* +// be 0 and 1, don't change! + +enum +{ + // execute the process asynchronously + wxEXEC_ASYNC = 0, + + // execute it synchronously, i.e. wait until it finishes + wxEXEC_SYNC = 1, + + // under Windows, don't hide the child even if it's IO is redirected (this + // is done by default) + wxEXEC_SHOW_CONSOLE = 2, + + // deprecated synonym for wxEXEC_SHOW_CONSOLE, use the new name as it's + // more clear + wxEXEC_NOHIDE = wxEXEC_SHOW_CONSOLE, + + // under Unix, if the process is the group leader then passing wxKILL_CHILDREN to wxKill + // kills all children as well as pid + // under Windows (NT family only), sets the CREATE_NEW_PROCESS_GROUP flag, + // which allows to target Ctrl-Break signal to the spawned process. + // applies to console processes only. + wxEXEC_MAKE_GROUP_LEADER = 4, + + // by default synchronous execution disables all program windows to avoid + // that the user interacts with the program while the child process is + // running, you can use this flag to prevent this from happening + wxEXEC_NODISABLE = 8, + + // by default, the event loop is run while waiting for synchronous execution + // to complete and this flag can be used to simply block the main process + // until the child process finishes + wxEXEC_NOEVENTS = 16, + + // under Windows, hide the console of the child process if it has one, even + // if its IO is not redirected + wxEXEC_HIDE_CONSOLE = 32, + + // convenient synonym for flags given system()-like behaviour + wxEXEC_BLOCK = wxEXEC_SYNC | wxEXEC_NOEVENTS +}; + +// Map storing environment variables. +typedef wxStringToStringHashMap wxEnvVariableHashMap; + +// Used to pass additional parameters for child process to wxExecute(). Could +// be extended with other fields later. +struct wxExecuteEnv +{ + wxString cwd; // If empty, CWD is not changed. + wxEnvVariableHashMap env; // If empty, environment is unchanged. +}; + +// Execute another program. +// +// If flags contain wxEXEC_SYNC, return -1 on failure and the exit code of the +// process if everything was ok. Otherwise (i.e. if wxEXEC_ASYNC), return 0 on +// failure and the PID of the launched process if ok. +WXDLLIMPEXP_BASE long wxExecute(const wxString& command, + int flags = wxEXEC_ASYNC, + wxProcess *process = NULL, + const wxExecuteEnv *env = NULL); +WXDLLIMPEXP_BASE long wxExecute(char **argv, + int flags = wxEXEC_ASYNC, + wxProcess *process = NULL, + const wxExecuteEnv *env = NULL); +#if wxUSE_UNICODE +WXDLLIMPEXP_BASE long wxExecute(wchar_t **argv, + int flags = wxEXEC_ASYNC, + wxProcess *process = NULL, + const wxExecuteEnv *env = NULL); +#endif // wxUSE_UNICODE + +// execute the command capturing its output into an array line by line, this is +// always synchronous +WXDLLIMPEXP_BASE long wxExecute(const wxString& command, + wxArrayString& output, + int flags = 0, + const wxExecuteEnv *env = NULL); + +// also capture stderr (also synchronous) +WXDLLIMPEXP_BASE long wxExecute(const wxString& command, + wxArrayString& output, + wxArrayString& error, + int flags = 0, + const wxExecuteEnv *env = NULL); + +#if defined(__WINDOWS__) && wxUSE_IPC +// ask a DDE server to execute the DDE request with given parameters +WXDLLIMPEXP_BASE bool wxExecuteDDE(const wxString& ddeServer, + const wxString& ddeTopic, + const wxString& ddeCommand); +#endif // __WINDOWS__ && wxUSE_IPC + +enum wxSignal +{ + wxSIGNONE = 0, // verify if the process exists under Unix + wxSIGHUP, + wxSIGINT, + wxSIGQUIT, + wxSIGILL, + wxSIGTRAP, + wxSIGABRT, + wxSIGIOT = wxSIGABRT, // another name + wxSIGEMT, + wxSIGFPE, + wxSIGKILL, + wxSIGBUS, + wxSIGSEGV, + wxSIGSYS, + wxSIGPIPE, + wxSIGALRM, + wxSIGTERM + + // further signals are different in meaning between different Unix systems +}; + +enum wxKillError +{ + wxKILL_OK, // no error + wxKILL_BAD_SIGNAL, // no such signal + wxKILL_ACCESS_DENIED, // permission denied + wxKILL_NO_PROCESS, // no such process + wxKILL_ERROR // another, unspecified error +}; + +enum wxKillFlags +{ + wxKILL_NOCHILDREN = 0, // don't kill children + wxKILL_CHILDREN = 1 // kill children +}; + +enum wxShutdownFlags +{ + wxSHUTDOWN_FORCE = 1,// can be combined with other flags (MSW-only) + wxSHUTDOWN_POWEROFF = 2,// power off the computer + wxSHUTDOWN_REBOOT = 4,// shutdown and reboot + wxSHUTDOWN_LOGOFF = 8 // close session (currently MSW-only) +}; + +// Shutdown or reboot the PC +WXDLLIMPEXP_BASE bool wxShutdown(int flags = wxSHUTDOWN_POWEROFF); + +// send the given signal to the process (only NONE and KILL are supported under +// Windows, all others mean TERM), return 0 if ok and -1 on error +// +// return detailed error in rc if not NULL +WXDLLIMPEXP_BASE int wxKill(long pid, + wxSignal sig = wxSIGTERM, + wxKillError *rc = NULL, + int flags = wxKILL_NOCHILDREN); + +// Execute a command in an interactive shell window (always synchronously) +// If no command then just the shell +WXDLLIMPEXP_BASE bool wxShell(const wxString& command = wxEmptyString); + +// As wxShell(), but must give a (non interactive) command and its output will +// be returned in output array +WXDLLIMPEXP_BASE bool wxShell(const wxString& command, wxArrayString& output); + +// Sleep for nSecs seconds +WXDLLIMPEXP_BASE void wxSleep(int nSecs); + +// Sleep for a given amount of milliseconds +WXDLLIMPEXP_BASE void wxMilliSleep(unsigned long milliseconds); + +// Sleep for a given amount of microseconds +WXDLLIMPEXP_BASE void wxMicroSleep(unsigned long microseconds); + +#if WXWIN_COMPATIBILITY_2_8 +// Sleep for a given amount of milliseconds (old, bad name), use wxMilliSleep +wxDEPRECATED( WXDLLIMPEXP_BASE void wxUsleep(unsigned long milliseconds) ); +#endif + +// Get the process id of the current process +WXDLLIMPEXP_BASE unsigned long wxGetProcessId(); + +// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX) +WXDLLIMPEXP_BASE wxMemorySize wxGetFreeMemory(); + +#if wxUSE_ON_FATAL_EXCEPTION + +// should wxApp::OnFatalException() be called? +WXDLLIMPEXP_BASE bool wxHandleFatalExceptions(bool doit = true); + +#endif // wxUSE_ON_FATAL_EXCEPTION + +// ---------------------------------------------------------------------------- +// Environment variables +// ---------------------------------------------------------------------------- + +// returns true if variable exists (value may be NULL if you just want to check +// for this) +WXDLLIMPEXP_BASE bool wxGetEnv(const wxString& var, wxString *value); + +// set the env var name to the given value, return true on success +WXDLLIMPEXP_BASE bool wxSetEnv(const wxString& var, const wxString& value); + +// remove the env var from environment +WXDLLIMPEXP_BASE bool wxUnsetEnv(const wxString& var); + +#if WXWIN_COMPATIBILITY_2_8 +inline bool wxSetEnv(const wxString& var, const char *value) + { return wxSetEnv(var, wxString(value)); } +inline bool wxSetEnv(const wxString& var, const wchar_t *value) + { return wxSetEnv(var, wxString(value)); } +template<typename T> +inline bool wxSetEnv(const wxString& var, const wxScopedCharTypeBuffer<T>& value) + { return wxSetEnv(var, wxString(value)); } +inline bool wxSetEnv(const wxString& var, const wxCStrData& value) + { return wxSetEnv(var, wxString(value)); } + +// this one is for passing NULL directly - don't use it, use wxUnsetEnv instead +wxDEPRECATED( inline bool wxSetEnv(const wxString& var, int value) ); +inline bool wxSetEnv(const wxString& var, int value) +{ + wxASSERT_MSG( value == 0, "using non-NULL integer as string?" ); + + wxUnusedVar(value); // fix unused parameter warning in release build + + return wxUnsetEnv(var); +} +#endif // WXWIN_COMPATIBILITY_2_8 + +// Retrieve the complete environment by filling specified map. +// Returns true on success or false if an error occurred. +WXDLLIMPEXP_BASE bool wxGetEnvMap(wxEnvVariableHashMap *map); + +// ---------------------------------------------------------------------------- +// Network and username functions. +// ---------------------------------------------------------------------------- + +// NB: "char *" functions are deprecated, use wxString ones! + +// Get eMail address +WXDLLIMPEXP_BASE bool wxGetEmailAddress(wxChar *buf, int maxSize); +WXDLLIMPEXP_BASE wxString wxGetEmailAddress(); + +// Get hostname. +WXDLLIMPEXP_BASE bool wxGetHostName(wxChar *buf, int maxSize); +WXDLLIMPEXP_BASE wxString wxGetHostName(); + +// Get FQDN +WXDLLIMPEXP_BASE wxString wxGetFullHostName(); +WXDLLIMPEXP_BASE bool wxGetFullHostName(wxChar *buf, int maxSize); + +// Get user ID e.g. jacs (this is known as login name under Unix) +WXDLLIMPEXP_BASE bool wxGetUserId(wxChar *buf, int maxSize); +WXDLLIMPEXP_BASE wxString wxGetUserId(); + +// Get user name e.g. Julian Smart +WXDLLIMPEXP_BASE bool wxGetUserName(wxChar *buf, int maxSize); +WXDLLIMPEXP_BASE wxString wxGetUserName(); + +// Get current Home dir and copy to dest (returns pstr->c_str()) +WXDLLIMPEXP_BASE wxString wxGetHomeDir(); +WXDLLIMPEXP_BASE const wxChar* wxGetHomeDir(wxString *pstr); + +// Get the user's (by default use the current user name) home dir, +// return empty string on error +WXDLLIMPEXP_BASE wxString wxGetUserHome(const wxString& user = wxEmptyString); + + +#if wxUSE_LONGLONG + typedef wxLongLong wxDiskspaceSize_t; +#else + typedef long wxDiskspaceSize_t; +#endif + +// get number of total/free bytes on the disk where path belongs +WXDLLIMPEXP_BASE bool wxGetDiskSpace(const wxString& path, + wxDiskspaceSize_t *pTotal = NULL, + wxDiskspaceSize_t *pFree = NULL); + + + +typedef int (*wxSortCallback)(const void* pItem1, + const void* pItem2, + const void* user_data); + + +WXDLLIMPEXP_BASE void wxQsort(void* pbase, size_t total_elems, + size_t size, wxSortCallback cmp, + const void* user_data); + + +#if wxUSE_GUI // GUI only things from now on + +// ---------------------------------------------------------------------------- +// Launch default browser +// ---------------------------------------------------------------------------- + +// flags for wxLaunchDefaultBrowser +enum +{ + wxBROWSER_NEW_WINDOW = 0x01, + wxBROWSER_NOBUSYCURSOR = 0x02 +}; + +// Launch url in the user's default internet browser +WXDLLIMPEXP_CORE bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0); + +// Launch document in the user's default application +WXDLLIMPEXP_CORE bool wxLaunchDefaultApplication(const wxString& path, int flags = 0); + +// ---------------------------------------------------------------------------- +// Menu accelerators related things +// ---------------------------------------------------------------------------- + +// flags for wxStripMenuCodes +enum +{ + // strip '&' characters + wxStrip_Mnemonics = 1, + + // strip everything after '\t' + wxStrip_Accel = 2, + + // strip everything (this is the default) + wxStrip_All = wxStrip_Mnemonics | wxStrip_Accel +}; + +// strip mnemonics and/or accelerators from the label +WXDLLIMPEXP_CORE wxString +wxStripMenuCodes(const wxString& str, int flags = wxStrip_All); + +#if WXWIN_COMPATIBILITY_2_6 +// obsolete and deprecated version, do not use, use the above overload instead +wxDEPRECATED( + WXDLLIMPEXP_CORE wxChar* wxStripMenuCodes(const wxChar *in, wxChar *out = NULL) +); + +#if wxUSE_ACCEL +class WXDLLIMPEXP_FWD_CORE wxAcceleratorEntry; + +// use wxAcceleratorEntry::Create() or FromString() methods instead +wxDEPRECATED( + WXDLLIMPEXP_CORE wxAcceleratorEntry *wxGetAccelFromString(const wxString& label) +); +#endif // wxUSE_ACCEL + +#endif // WXWIN_COMPATIBILITY_2_6 + +// ---------------------------------------------------------------------------- +// Window search +// ---------------------------------------------------------------------------- + +// Returns menu item id or wxNOT_FOUND if none. +WXDLLIMPEXP_CORE int wxFindMenuItemId(wxFrame *frame, const wxString& menuString, const wxString& itemString); + +// Find the wxWindow at the given point. wxGenericFindWindowAtPoint +// is always present but may be less reliable than a native version. +WXDLLIMPEXP_CORE wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt); +WXDLLIMPEXP_CORE wxWindow* wxFindWindowAtPoint(const wxPoint& pt); + +// NB: this function is obsolete, use wxWindow::FindWindowByLabel() instead +// +// Find the window/widget with the given title or label. +// Pass a parent to begin the search from, or NULL to look through +// all windows. +WXDLLIMPEXP_CORE wxWindow* wxFindWindowByLabel(const wxString& title, wxWindow *parent = NULL); + +// NB: this function is obsolete, use wxWindow::FindWindowByName() instead +// +// Find window by name, and if that fails, by label. +WXDLLIMPEXP_CORE wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent = NULL); + +// ---------------------------------------------------------------------------- +// Message/event queue helpers +// ---------------------------------------------------------------------------- + +// Yield to other apps/messages and disable user input +WXDLLIMPEXP_CORE bool wxSafeYield(wxWindow *win = NULL, bool onlyIfNeeded = false); + +// Enable or disable input to all top level windows +WXDLLIMPEXP_CORE void wxEnableTopLevelWindows(bool enable = true); + +// Check whether this window wants to process messages, e.g. Stop button +// in long calculations. +WXDLLIMPEXP_CORE bool wxCheckForInterrupt(wxWindow *wnd); + +// Consume all events until no more left +WXDLLIMPEXP_CORE void wxFlushEvents(); + +// a class which disables all windows (except, may be, the given one) in its +// ctor and enables them back in its dtor +class WXDLLIMPEXP_CORE wxWindowDisabler +{ +public: + // this ctor conditionally disables all windows: if the argument is false, + // it doesn't do anything + wxWindowDisabler(bool disable = true); + + // ctor disables all windows except winToSkip + wxWindowDisabler(wxWindow *winToSkip); + + // dtor enables back all windows disabled by the ctor + ~wxWindowDisabler(); + +private: + // disable all windows except the given one (used by both ctors) + void DoDisable(wxWindow *winToSkip = NULL); + +#if defined(__WXOSX__) && wxOSX_USE_COCOA + wxEventLoop* m_modalEventLoop; +#endif + wxWindowList *m_winDisabled; + bool m_disabled; + + wxDECLARE_NO_COPY_CLASS(wxWindowDisabler); +}; + +// ---------------------------------------------------------------------------- +// Cursors +// ---------------------------------------------------------------------------- + +// Set the cursor to the busy cursor for all windows +WXDLLIMPEXP_CORE void wxBeginBusyCursor(const wxCursor *cursor = wxHOURGLASS_CURSOR); + +// Restore cursor to normal +WXDLLIMPEXP_CORE void wxEndBusyCursor(); + +// true if we're between the above two calls +WXDLLIMPEXP_CORE bool wxIsBusy(); + +// Convenience class so we can just create a wxBusyCursor object on the stack +class WXDLLIMPEXP_CORE wxBusyCursor +{ +public: + wxBusyCursor(const wxCursor* cursor = wxHOURGLASS_CURSOR) + { wxBeginBusyCursor(cursor); } + ~wxBusyCursor() + { wxEndBusyCursor(); } + + // Obsolete internal methods, do not use. + static const wxCursor &GetStoredCursor(); + static const wxCursor GetBusyCursor(); +}; + +void WXDLLIMPEXP_CORE wxGetMousePosition( int* x, int* y ); + +// ---------------------------------------------------------------------------- +// X11 Display access +// ---------------------------------------------------------------------------- + +#if defined(__X__) || defined(__WXGTK__) + +#ifdef __WXGTK__ + WXDLLIMPEXP_CORE void *wxGetDisplay(); +#endif + +#ifdef __X__ + WXDLLIMPEXP_CORE WXDisplay *wxGetDisplay(); + WXDLLIMPEXP_CORE bool wxSetDisplay(const wxString& display_name); + WXDLLIMPEXP_CORE wxString wxGetDisplayName(); +#endif // X or GTK+ + +// use this function instead of the functions above in implementation code +inline struct _XDisplay *wxGetX11Display() +{ + return (_XDisplay *)wxGetDisplay(); +} + +#endif // X11 || wxGTK + +#endif // wxUSE_GUI + +// ---------------------------------------------------------------------------- +// wxYield(): these functions are obsolete, please use wxApp methods instead! +// ---------------------------------------------------------------------------- + +// avoid redeclaring this function here if it had been already declated by +// wx/app.h, this results in warnings from g++ with -Wredundant-decls +#ifndef wx_YIELD_DECLARED +#define wx_YIELD_DECLARED + +// Yield to other apps/messages +WXDLLIMPEXP_CORE bool wxYield(); + +#endif // wx_YIELD_DECLARED + +// Like wxYield, but fails silently if the yield is recursive. +WXDLLIMPEXP_CORE bool wxYieldIfNeeded(); + +// ---------------------------------------------------------------------------- +// Windows resources access +// ---------------------------------------------------------------------------- + +// Windows only: get user-defined resource from the .res file. +#ifdef __WINDOWS__ + // default resource type for wxLoadUserResource() + extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxUserResourceStr; + + // Return the pointer to the resource data. This pointer is read-only, use + // the overload below if you need to modify the data. + // + // Notice that the resource type can be either a real string or an integer + // produced by MAKEINTRESOURCE(). In particular, any standard resource type, + // i.e any RT_XXX constant, could be passed here. + // + // Returns true on success, false on failure. Doesn't log an error message + // if the resource is not found (because this could be expected) but does + // log one if any other error occurs. + WXDLLIMPEXP_BASE bool + wxLoadUserResource(const void **outData, + size_t *outLen, + const wxString& resourceName, + const wxChar* resourceType = wxUserResourceStr, + WXHINSTANCE module = 0); + + // This function allocates a new buffer and makes a copy of the resource + // data, remember to delete[] the buffer. And avoid using it entirely if + // the overload above can be used. + // + // Returns NULL on failure. + WXDLLIMPEXP_BASE char* + wxLoadUserResource(const wxString& resourceName, + const wxChar* resourceType = wxUserResourceStr, + int* pLen = NULL, + WXHINSTANCE module = 0); +#endif // __WINDOWS__ + +#endif + // _WX_UTILSH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/valgen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/valgen.h new file mode 100644 index 0000000000..c24142e791 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/valgen.h @@ -0,0 +1,94 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/valgen.h +// Purpose: wxGenericValidator class +// Author: Kevin Smith +// Created: Jan 22 1999 +// Copyright: (c) 1999 Julian Smart (assigned from Kevin) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_VALGENH__ +#define _WX_VALGENH__ + +#include "wx/validate.h" + +#if wxUSE_VALIDATORS + +class WXDLLIMPEXP_FWD_BASE wxDateTime; +class WXDLLIMPEXP_FWD_BASE wxFileName; + +// ---------------------------------------------------------------------------- +// wxGenericValidator performs data transfer between many standard controls and +// variables of the type corresponding to their values. +// +// It doesn't do any validation so its name is a slight misnomer. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGenericValidator: public wxValidator +{ +public: + // Different constructors: each of them creates a validator which can only + // be used with some controls, the comments before each constructor + // indicate which ones: + // wxCheckBox, wxRadioButton, wx(Bitmap)ToggleButton + wxGenericValidator(bool* val); + // wxChoice, wxGauge, wxRadioBox, wxScrollBar, wxSlider, wxSpinButton + wxGenericValidator(int* val); + // wxComboBox, wxTextCtrl, wxButton, wxStaticText (read-only) + wxGenericValidator(wxString* val); + // wxListBox, wxCheckListBox + wxGenericValidator(wxArrayInt* val); +#if wxUSE_DATETIME + // wxDatePickerCtrl + wxGenericValidator(wxDateTime* val); +#endif // wxUSE_DATETIME + // wxTextCtrl + wxGenericValidator(wxFileName* val); + // wxTextCtrl + wxGenericValidator(float* val); + // wxTextCtrl + wxGenericValidator(double* val); + + wxGenericValidator(const wxGenericValidator& copyFrom); + + virtual ~wxGenericValidator(){} + + // Make a clone of this validator (or return NULL) - currently necessary + // if you're passing a reference to a validator. + // Another possibility is to always pass a pointer to a new validator + // (so the calling code can use a copy constructor of the relevant class). + virtual wxObject *Clone() const { return new wxGenericValidator(*this); } + bool Copy(const wxGenericValidator& val); + + // Called when the value in the window must be validated: this is not used + // by this class + virtual bool Validate(wxWindow * WXUNUSED(parent)) { return true; } + + // Called to transfer data to the window + virtual bool TransferToWindow(); + + // Called to transfer data to the window + virtual bool TransferFromWindow(); + +protected: + void Initialize(); + + bool* m_pBool; + int* m_pInt; + wxString* m_pString; + wxArrayInt* m_pArrayInt; +#if wxUSE_DATETIME + wxDateTime* m_pDateTime; +#endif // wxUSE_DATETIME + wxFileName* m_pFileName; + float* m_pFloat; + double* m_pDouble; + +private: + DECLARE_CLASS(wxGenericValidator) + wxDECLARE_NO_ASSIGN_CLASS(wxGenericValidator); +}; + +#endif // wxUSE_VALIDATORS + +#endif // _WX_VALGENH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/validate.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/validate.h new file mode 100644 index 0000000000..44633f940c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/validate.h @@ -0,0 +1,116 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/validate.h +// Purpose: wxValidator class +// Author: Julian Smart +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_VALIDATE_H_ +#define _WX_VALIDATE_H_ + +#include "wx/defs.h" + +#if wxUSE_VALIDATORS + +#include "wx/event.h" + +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxWindowBase; + +/* + A validator has up to three purposes: + + 1) To validate the data in the window that's associated + with the validator. + 2) To transfer data to and from the window. + 3) To filter input, using its role as a wxEvtHandler + to intercept e.g. OnChar. + + Note that wxValidator and derived classes use reference counting. +*/ + +class WXDLLIMPEXP_CORE wxValidator : public wxEvtHandler +{ +public: + wxValidator(); + wxValidator(const wxValidator& other) + : wxEvtHandler() + , m_validatorWindow(other.m_validatorWindow) + { + } + virtual ~wxValidator(); + + // Make a clone of this validator (or return NULL) - currently necessary + // if you're passing a reference to a validator. + // Another possibility is to always pass a pointer to a new validator + // (so the calling code can use a copy constructor of the relevant class). + virtual wxObject *Clone() const + { return NULL; } + bool Copy(const wxValidator& val) + { m_validatorWindow = val.m_validatorWindow; return true; } + + // Called when the value in the window must be validated. + // This function can pop up an error message. + virtual bool Validate(wxWindow *WXUNUSED(parent)) { return false; } + + // Called to transfer data to the window + virtual bool TransferToWindow() { return false; } + + // Called to transfer data from the window + virtual bool TransferFromWindow() { return false; } + + // accessors + wxWindow *GetWindow() const { return (wxWindow *)m_validatorWindow; } + void SetWindow(wxWindowBase *win) { m_validatorWindow = win; } + + // validators beep by default if invalid key is pressed, this function + // allows to change this + static void SuppressBellOnError(bool suppress = true) + { ms_isSilent = suppress; } + + // test if beep is currently disabled + static bool IsSilent() { return ms_isSilent; } + + // this function is deprecated because it handled its parameter + // unnaturally: it disabled the bell when it was true, not false as could + // be expected; use SuppressBellOnError() instead +#if WXWIN_COMPATIBILITY_2_8 + static wxDEPRECATED_INLINE( + void SetBellOnError(bool doIt = true), + ms_isSilent = doIt; + ) +#endif + +protected: + wxWindowBase *m_validatorWindow; + +private: + static bool ms_isSilent; + + DECLARE_DYNAMIC_CLASS(wxValidator) + wxDECLARE_NO_ASSIGN_CLASS(wxValidator); +}; + +extern WXDLLIMPEXP_DATA_CORE(const wxValidator) wxDefaultValidator; + +#define wxVALIDATOR_PARAM(val) val + +#else // !wxUSE_VALIDATORS + // wxWidgets is compiled without support for wxValidator, but we still + // want to be able to pass wxDefaultValidator to the functions which take + // a wxValidator parameter to avoid using "#if wxUSE_VALIDATORS" + // everywhere + class WXDLLIMPEXP_FWD_CORE wxValidator; + static const wxValidator* const wxDefaultValidatorPtr = NULL; + #define wxDefaultValidator (*wxDefaultValidatorPtr) + + // this macro allows to avoid warnings about unused parameters when + // wxUSE_VALIDATORS == 0 + #define wxVALIDATOR_PARAM(val) +#endif // wxUSE_VALIDATORS/!wxUSE_VALIDATORS + +#endif // _WX_VALIDATE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/valnum.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/valnum.h new file mode 100644 index 0000000000..2fbfe607b8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/valnum.h @@ -0,0 +1,463 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/valnum.h +// Purpose: Numeric validator classes. +// Author: Vadim Zeitlin based on the submission of Fulvio Senore +// Created: 2010-11-06 +// Copyright: (c) 2010 wxWidgets team +// (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_VALNUM_H_ +#define _WX_VALNUM_H_ + +#include "wx/defs.h" + +#if wxUSE_VALIDATORS + +#include "wx/validate.h" + +#include <limits> + +// Bit masks used for numeric validator styles. +enum wxNumValidatorStyle +{ + wxNUM_VAL_DEFAULT = 0x0, + wxNUM_VAL_THOUSANDS_SEPARATOR = 0x1, + wxNUM_VAL_ZERO_AS_BLANK = 0x2, + wxNUM_VAL_NO_TRAILING_ZEROES = 0x4 +}; + +// ---------------------------------------------------------------------------- +// Base class for all numeric validators. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNumValidatorBase : public wxValidator +{ +public: + // Change the validator style. Usually it's specified during construction. + void SetStyle(int style) { m_style = style; } + + + // Override base class method to not do anything but always return success: + // we don't need this as we do our validation on the fly here. + virtual bool Validate(wxWindow * WXUNUSED(parent)) { return true; } + +protected: + wxNumValidatorBase(int style) + { + m_style = style; + } + + wxNumValidatorBase(const wxNumValidatorBase& other) : wxValidator() + { + m_style = other.m_style; + } + + bool HasFlag(wxNumValidatorStyle style) const + { + return (m_style & style) != 0; + } + + // Get the text entry of the associated control. Normally shouldn't ever + // return NULL (and will assert if it does return it) but the caller should + // still test the return value for safety. + wxTextEntry *GetTextEntry() const; + + // Convert wxNUM_VAL_THOUSANDS_SEPARATOR and wxNUM_VAL_NO_TRAILING_ZEROES + // bits of our style to the corresponding wxNumberFormatter::Style values. + int GetFormatFlags() const; + + // Return true if pressing a '-' key is acceptable for the current control + // contents and insertion point. This is meant to be called from the + // derived class IsCharOk() implementation. + bool IsMinusOk(const wxString& val, int pos) const; + + // Return the string which would result from inserting the given character + // at the specified position. + wxString GetValueAfterInsertingChar(wxString val, int pos, wxChar ch) const + { + val.insert(pos, ch); + return val; + } + +private: + // Check whether the specified character can be inserted in the control at + // the given position in the string representing the current controls + // contents. + // + // Notice that the base class checks for '-' itself so it's never passed to + // this function. + virtual bool IsCharOk(const wxString& val, int pos, wxChar ch) const = 0; + + // NormalizeString the contents of the string if it's a valid number, return + // empty string otherwise. + virtual wxString NormalizeString(const wxString& s) const = 0; + + + // Event handlers. + void OnChar(wxKeyEvent& event); + void OnKillFocus(wxFocusEvent& event); + + + // Determine the current insertion point and text in the associated control. + void GetCurrentValueAndInsertionPoint(wxString& val, int& pos) const; + + + // Combination of wxVAL_NUM_XXX values. + int m_style; + + + wxDECLARE_EVENT_TABLE(); + + wxDECLARE_NO_ASSIGN_CLASS(wxNumValidatorBase); +}; + +namespace wxPrivate +{ + +// This is a helper class used by wxIntegerValidator and wxFloatingPointValidator +// below that implements Transfer{To,From}Window() adapted to the type of the +// variable. +// +// The template argument B is the name of the base class which must derive from +// wxNumValidatorBase and define LongestValueType type and {To,As}String() +// methods i.e. basically be one of wx{Integer,Number}ValidatorBase classes. +// +// The template argument T is just the type handled by the validator that will +// inherit from this one. +template <class B, typename T> +class wxNumValidator : public B +{ +public: + typedef B BaseValidator; + typedef T ValueType; + + typedef typename BaseValidator::LongestValueType LongestValueType; + + // FIXME-VC6: This compiler fails to compile the assert below with a + // nonsensical error C2248: "'LongestValueType' : cannot access protected + // typedef declared in class 'wxIntegerValidatorBase'" so just disable the + // check for it. +#ifndef __VISUALC6__ + wxCOMPILE_TIME_ASSERT + ( + sizeof(ValueType) <= sizeof(LongestValueType), + UnsupportedType + ); +#endif // __VISUALC6__ + + void SetMin(ValueType min) + { + this->DoSetMin(min); + } + + void SetMax(ValueType max) + { + this->DoSetMax(max); + } + + void SetRange(ValueType min, ValueType max) + { + SetMin(min); + SetMax(max); + } + + virtual bool TransferToWindow() + { + if ( m_value ) + { + wxTextEntry * const control = BaseValidator::GetTextEntry(); + if ( !control ) + return false; + + control->SetValue(NormalizeValue(*m_value)); + } + + return true; + } + + virtual bool TransferFromWindow() + { + if ( m_value ) + { + wxTextEntry * const control = BaseValidator::GetTextEntry(); + if ( !control ) + return false; + + const wxString s(control->GetValue()); + LongestValueType value; + if ( s.empty() && BaseValidator::HasFlag(wxNUM_VAL_ZERO_AS_BLANK) ) + value = 0; + else if ( !BaseValidator::FromString(s, &value) ) + return false; + + if ( !this->IsInRange(value) ) + return false; + + *m_value = static_cast<ValueType>(value); + } + + return true; + } + +protected: + wxNumValidator(ValueType *value, int style) + : BaseValidator(style), + m_value(value) + { + } + + // Implement wxNumValidatorBase virtual method which is the same for + // both integer and floating point numbers. + virtual wxString NormalizeString(const wxString& s) const + { + LongestValueType value; + return BaseValidator::FromString(s, &value) ? NormalizeValue(value) + : wxString(); + } + +private: + // Just a helper which is a common part of TransferToWindow() and + // NormalizeString(): returns string representation of a number honouring + // wxNUM_VAL_ZERO_AS_BLANK flag. + wxString NormalizeValue(LongestValueType value) const + { + wxString s; + if ( value != 0 || !BaseValidator::HasFlag(wxNUM_VAL_ZERO_AS_BLANK) ) + s = this->ToString(value); + + return s; + } + + + ValueType * const m_value; + + wxDECLARE_NO_ASSIGN_CLASS(wxNumValidator); +}; + +} // namespace wxPrivate + +// ---------------------------------------------------------------------------- +// Validators for integer numbers. +// ---------------------------------------------------------------------------- + +// Base class for integer numbers validator. This class contains all non +// type-dependent code of wxIntegerValidator<> and always works with values of +// type LongestValueType. It is not meant to be used directly, please use +// wxIntegerValidator<> only instead. +class WXDLLIMPEXP_CORE wxIntegerValidatorBase : public wxNumValidatorBase +{ +protected: + // Define the type we use here, it should be the maximal-sized integer type + // we support to make it possible to base wxIntegerValidator<> for any type + // on it. +#ifdef wxLongLong_t + typedef wxLongLong_t LongestValueType; +#else + typedef long LongestValueType; +#endif + + wxIntegerValidatorBase(int style) + : wxNumValidatorBase(style) + { + wxASSERT_MSG( !(style & wxNUM_VAL_NO_TRAILING_ZEROES), + "This style doesn't make sense for integers." ); + } + + wxIntegerValidatorBase(const wxIntegerValidatorBase& other) + : wxNumValidatorBase(other) + { + m_min = other.m_min; + m_max = other.m_max; + } + + // Provide methods for wxNumValidator use. + wxString ToString(LongestValueType value) const; + static bool FromString(const wxString& s, LongestValueType *value); + + void DoSetMin(LongestValueType min) { m_min = min; } + void DoSetMax(LongestValueType max) { m_max = max; } + + bool IsInRange(LongestValueType value) const + { + return m_min <= value && value <= m_max; + } + + // Implement wxNumValidatorBase pure virtual method. + virtual bool IsCharOk(const wxString& val, int pos, wxChar ch) const; + +private: + // Minimal and maximal values accepted (inclusive). + LongestValueType m_min, m_max; + + wxDECLARE_NO_ASSIGN_CLASS(wxIntegerValidatorBase); +}; + +// Validator for integer numbers. It can actually work with any integer type +// (short, int or long and long long if supported) and their unsigned versions +// as well. +template <typename T> +class wxIntegerValidator + : public wxPrivate::wxNumValidator<wxIntegerValidatorBase, T> +{ +public: + typedef T ValueType; + + typedef + wxPrivate::wxNumValidator<wxIntegerValidatorBase, T> Base; + + // Ctor for an integer validator. + // + // Sets the range appropriately for the type, including setting 0 as the + // minimal value for the unsigned types. + wxIntegerValidator(ValueType *value = NULL, int style = wxNUM_VAL_DEFAULT) + : Base(value, style) + { + this->DoSetMin(std::numeric_limits<ValueType>::min()); + this->DoSetMax(std::numeric_limits<ValueType>::max()); + } + + virtual wxObject *Clone() const { return new wxIntegerValidator(*this); } + +private: + wxDECLARE_NO_ASSIGN_CLASS(wxIntegerValidator); +}; + +// Helper function for creating integer validators which allows to avoid +// explicitly specifying the type as it deduces it from its parameter. +template <typename T> +inline wxIntegerValidator<T> +wxMakeIntegerValidator(T *value, int style = wxNUM_VAL_DEFAULT) +{ + return wxIntegerValidator<T>(value, style); +} + +// ---------------------------------------------------------------------------- +// Validators for floating point numbers. +// ---------------------------------------------------------------------------- + +// Similar to wxIntegerValidatorBase, this class is not meant to be used +// directly, only wxFloatingPointValidator<> should be used in the user code. +class WXDLLIMPEXP_CORE wxFloatingPointValidatorBase : public wxNumValidatorBase +{ +public: + // Set precision i.e. the number of digits shown (and accepted on input) + // after the decimal point. By default this is set to the maximal precision + // supported by the type handled by the validator. + void SetPrecision(unsigned precision) { m_precision = precision; } + +protected: + // Notice that we can't use "long double" here because it's not supported + // by wxNumberFormatter yet, so restrict ourselves to just double (and + // float). + typedef double LongestValueType; + + wxFloatingPointValidatorBase(int style) + : wxNumValidatorBase(style) + { + } + + wxFloatingPointValidatorBase(const wxFloatingPointValidatorBase& other) + : wxNumValidatorBase(other) + { + m_precision = other.m_precision; + + m_min = other.m_min; + m_max = other.m_max; + } + + // Provide methods for wxNumValidator use. + wxString ToString(LongestValueType value) const; + static bool FromString(const wxString& s, LongestValueType *value); + + void DoSetMin(LongestValueType min) { m_min = min; } + void DoSetMax(LongestValueType max) { m_max = max; } + + bool IsInRange(LongestValueType value) const + { + return m_min <= value && value <= m_max; + } + + // Implement wxNumValidatorBase pure virtual method. + virtual bool IsCharOk(const wxString& val, int pos, wxChar ch) const; + +private: + // Maximum number of decimals digits after the decimal separator. + unsigned m_precision; + + // Minimal and maximal values accepted (inclusive). + LongestValueType m_min, m_max; + + wxDECLARE_NO_ASSIGN_CLASS(wxFloatingPointValidatorBase); +}; + +// Validator for floating point numbers. It can be used with float, double or +// long double values. +template <typename T> +class wxFloatingPointValidator + : public wxPrivate::wxNumValidator<wxFloatingPointValidatorBase, T> +{ +public: + typedef T ValueType; + typedef wxPrivate::wxNumValidator<wxFloatingPointValidatorBase, T> Base; + + // Ctor using implicit (maximal) precision for this type. + wxFloatingPointValidator(ValueType *value = NULL, + int style = wxNUM_VAL_DEFAULT) + : Base(value, style) + { + DoSetMinMax(); + + this->SetPrecision(std::numeric_limits<ValueType>::digits10); + } + + // Ctor specifying an explicit precision. + wxFloatingPointValidator(int precision, + ValueType *value = NULL, + int style = wxNUM_VAL_DEFAULT) + : Base(value, style) + { + DoSetMinMax(); + + this->SetPrecision(precision); + } + + virtual wxObject *Clone() const + { + return new wxFloatingPointValidator(*this); + } + +private: + void DoSetMinMax() + { + // NB: Do not use min(), it's not the smallest representable value for + // the floating point types but rather the smallest representable + // positive value. + this->DoSetMin(-std::numeric_limits<ValueType>::max()); + this->DoSetMax( std::numeric_limits<ValueType>::max()); + } +}; + +// Helper similar to wxMakeIntValidator(). +// +// NB: Unfortunately we can't just have a wxMakeNumericValidator() which would +// return either wxIntegerValidator<> or wxFloatingPointValidator<> so we +// do need two different functions. +template <typename T> +inline wxFloatingPointValidator<T> +wxMakeFloatingPointValidator(T *value, int style = wxNUM_VAL_DEFAULT) +{ + return wxFloatingPointValidator<T>(value, style); +} + +template <typename T> +inline wxFloatingPointValidator<T> +wxMakeFloatingPointValidator(int precision, T *value, int style = wxNUM_VAL_DEFAULT) +{ + return wxFloatingPointValidator<T>(precision, value, style); +} + +#endif // wxUSE_VALIDATORS + +#endif // _WX_VALNUM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/valtext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/valtext.h new file mode 100644 index 0000000000..93f5dd614e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/valtext.h @@ -0,0 +1,108 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/valtext.h +// Purpose: wxTextValidator class +// Author: Julian Smart +// Modified by: Francesco Montorsi +// Created: 29/01/98 +// Copyright: (c) 1998 Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_VALTEXT_H_ +#define _WX_VALTEXT_H_ + +#include "wx/defs.h" + +#if wxUSE_VALIDATORS && (wxUSE_TEXTCTRL || wxUSE_COMBOBOX) + +class WXDLLIMPEXP_FWD_CORE wxTextEntry; + +#include "wx/validate.h" + +enum wxTextValidatorStyle +{ + wxFILTER_NONE = 0x0, + wxFILTER_EMPTY = 0x1, + wxFILTER_ASCII = 0x2, + wxFILTER_ALPHA = 0x4, + wxFILTER_ALPHANUMERIC = 0x8, + wxFILTER_DIGITS = 0x10, + wxFILTER_NUMERIC = 0x20, + wxFILTER_INCLUDE_LIST = 0x40, + wxFILTER_INCLUDE_CHAR_LIST = 0x80, + wxFILTER_EXCLUDE_LIST = 0x100, + wxFILTER_EXCLUDE_CHAR_LIST = 0x200 +}; + +class WXDLLIMPEXP_CORE wxTextValidator: public wxValidator +{ +public: + wxTextValidator(long style = wxFILTER_NONE, wxString *val = NULL); + wxTextValidator(const wxTextValidator& val); + + virtual ~wxTextValidator(){} + + // Make a clone of this validator (or return NULL) - currently necessary + // if you're passing a reference to a validator. + // Another possibility is to always pass a pointer to a new validator + // (so the calling code can use a copy constructor of the relevant class). + virtual wxObject *Clone() const { return new wxTextValidator(*this); } + bool Copy(const wxTextValidator& val); + + // Called when the value in the window must be validated. + // This function can pop up an error message. + virtual bool Validate(wxWindow *parent); + + // Called to transfer data to the window + virtual bool TransferToWindow(); + + // Called to transfer data from the window + virtual bool TransferFromWindow(); + + // Filter keystrokes + void OnChar(wxKeyEvent& event); + + // ACCESSORS + inline long GetStyle() const { return m_validatorStyle; } + void SetStyle(long style); + + wxTextEntry *GetTextEntry(); + + void SetCharIncludes(const wxString& chars); + void SetIncludes(const wxArrayString& includes) { m_includes = includes; } + inline wxArrayString& GetIncludes() { return m_includes; } + + void SetCharExcludes(const wxString& chars); + void SetExcludes(const wxArrayString& excludes) { m_excludes = excludes; } + inline wxArrayString& GetExcludes() { return m_excludes; } + + bool HasFlag(wxTextValidatorStyle style) const + { return (m_validatorStyle & style) != 0; } + +protected: + + // returns true if all characters of the given string are present in m_includes + bool ContainsOnlyIncludedCharacters(const wxString& val) const; + + // returns true if at least one character of the given string is present in m_excludes + bool ContainsExcludedCharacters(const wxString& val) const; + + // returns the error message if the contents of 'val' are invalid + virtual wxString IsValid(const wxString& val) const; + +protected: + long m_validatorStyle; + wxString* m_stringValue; + wxArrayString m_includes; + wxArrayString m_excludes; + +private: + wxDECLARE_NO_ASSIGN_CLASS(wxTextValidator); + DECLARE_DYNAMIC_CLASS(wxTextValidator) + DECLARE_EVENT_TABLE() +}; + +#endif + // wxUSE_VALIDATORS && (wxUSE_TEXTCTRL || wxUSE_COMBOBOX) + +#endif // _WX_VALTEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/variant.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/variant.h new file mode 100644 index 0000000000..39adc729b9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/variant.h @@ -0,0 +1,582 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/variant.h +// Purpose: wxVariant class, container for any type +// Author: Julian Smart +// Modified by: +// Created: 10/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_VARIANT_H_ +#define _WX_VARIANT_H_ + +#include "wx/defs.h" + +#if wxUSE_VARIANT + +#include "wx/object.h" +#include "wx/string.h" +#include "wx/arrstr.h" +#include "wx/list.h" +#include "wx/cpp.h" +#include "wx/longlong.h" + +#if wxUSE_DATETIME + #include "wx/datetime.h" +#endif // wxUSE_DATETIME + +#include "wx/iosfwrap.h" + +class wxAny; + +/* + * wxVariantData stores the actual data in a wxVariant object, + * to allow it to store any type of data. + * Derive from this to provide custom data handling. + * + * NB: When you construct a wxVariantData, it will have refcount + * of one. Refcount will not be further increased when + * it is passed to wxVariant. This simulates old common + * scenario where wxVariant took ownership of wxVariantData + * passed to it. + * If you create wxVariantData for other reasons than passing + * it to wxVariant, technically you are not required to call + * DecRef() before deleting it. + * + * TODO: in order to replace wxPropertyValue, we would need + * to consider adding constructors that take pointers to C++ variables, + * or removing that functionality from the wxProperty library. + * Essentially wxPropertyValue takes on some of the wxValidator functionality + * by storing pointers and not just actual values, allowing update of C++ data + * to be handled automatically. Perhaps there's another way of doing this without + * overloading wxVariant with unnecessary functionality. + */ + +class WXDLLIMPEXP_BASE wxVariantData : public wxObjectRefData +{ + friend class wxVariant; +public: + wxVariantData() { } + + // Override these to provide common functionality + virtual bool Eq(wxVariantData& data) const = 0; + +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& WXUNUSED(str)) const { return false; } +#endif + virtual bool Write(wxString& WXUNUSED(str)) const { return false; } +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& WXUNUSED(str)) { return false; } +#endif + virtual bool Read(wxString& WXUNUSED(str)) { return false; } + // What type is it? Return a string name. + virtual wxString GetType() const = 0; + // If it based on wxObject return the ClassInfo. + virtual wxClassInfo* GetValueClassInfo() { return NULL; } + + // Implement this to make wxVariant::UnShare work. Returns + // a copy of the data. + virtual wxVariantData* Clone() const { return NULL; } + +#if wxUSE_ANY + // Converts value to wxAny, if possible. Return true if successful. + virtual bool GetAsAny(wxAny* WXUNUSED(any)) const { return false; } +#endif + +protected: + // Protected dtor should make some incompatible code + // break more louder. That is, they should do data->DecRef() + // instead of delete data. + virtual ~wxVariantData() { } +}; + +/* + * wxVariant can store any kind of data, but has some basic types + * built in. + */ + +class WXDLLIMPEXP_FWD_BASE wxVariant; + +WX_DECLARE_LIST_WITH_DECL(wxVariant, wxVariantList, class WXDLLIMPEXP_BASE); + +class WXDLLIMPEXP_BASE wxVariant: public wxObject +{ +public: + wxVariant(); + + wxVariant(const wxVariant& variant); + wxVariant(wxVariantData* data, const wxString& name = wxEmptyString); +#if wxUSE_ANY + wxVariant(const wxAny& any); +#endif + virtual ~wxVariant(); + + // generic assignment + void operator= (const wxVariant& variant); + + // Assignment using data, e.g. + // myVariant = new wxStringVariantData("hello"); + void operator= (wxVariantData* variantData); + + bool operator== (const wxVariant& variant) const; + bool operator!= (const wxVariant& variant) const; + + // Sets/gets name + inline void SetName(const wxString& name) { m_name = name; } + inline const wxString& GetName() const { return m_name; } + + // Tests whether there is data + bool IsNull() const; + + // For compatibility with wxWidgets <= 2.6, this doesn't increase + // reference count. + wxVariantData* GetData() const + { + return (wxVariantData*) m_refData; + } + void SetData(wxVariantData* data) ; + + // make a 'clone' of the object + void Ref(const wxVariant& clone) { wxObject::Ref(clone); } + + // ensure that the data is exclusive to this variant, and not shared + bool Unshare(); + + // Make NULL (i.e. delete the data) + void MakeNull(); + + // Delete data and name + void Clear(); + + // Returns a string representing the type of the variant, + // e.g. "string", "bool", "stringlist", "list", "double", "long" + wxString GetType() const; + + bool IsType(const wxString& type) const; + bool IsValueKindOf(const wxClassInfo* type) const; + + // write contents to a string (e.g. for debugging) + wxString MakeString() const; + +#if wxUSE_ANY + wxAny GetAny() const; +#endif + + // double + wxVariant(double val, const wxString& name = wxEmptyString); + bool operator== (double value) const; + bool operator!= (double value) const; + void operator= (double value) ; + inline operator double () const { return GetDouble(); } + inline double GetReal() const { return GetDouble(); } + double GetDouble() const; + + // long + wxVariant(long val, const wxString& name = wxEmptyString); + wxVariant(int val, const wxString& name = wxEmptyString); + wxVariant(short val, const wxString& name = wxEmptyString); + bool operator== (long value) const; + bool operator!= (long value) const; + void operator= (long value) ; + inline operator long () const { return GetLong(); } + inline long GetInteger() const { return GetLong(); } + long GetLong() const; + + // bool + wxVariant(bool val, const wxString& name = wxEmptyString); + bool operator== (bool value) const; + bool operator!= (bool value) const; + void operator= (bool value) ; + inline operator bool () const { return GetBool(); } + bool GetBool() const ; + + // wxDateTime +#if wxUSE_DATETIME + wxVariant(const wxDateTime& val, const wxString& name = wxEmptyString); + bool operator== (const wxDateTime& value) const; + bool operator!= (const wxDateTime& value) const; + void operator= (const wxDateTime& value) ; + inline operator wxDateTime () const { return GetDateTime(); } + wxDateTime GetDateTime() const; +#endif + + // wxString + wxVariant(const wxString& val, const wxString& name = wxEmptyString); + // these overloads are necessary to prevent the compiler from using bool + // version instead of wxString one: + wxVariant(const char* val, const wxString& name = wxEmptyString); + wxVariant(const wchar_t* val, const wxString& name = wxEmptyString); + wxVariant(const wxCStrData& val, const wxString& name = wxEmptyString); + wxVariant(const wxScopedCharBuffer& val, const wxString& name = wxEmptyString); + wxVariant(const wxScopedWCharBuffer& val, const wxString& name = wxEmptyString); + + bool operator== (const wxString& value) const; + bool operator!= (const wxString& value) const; + wxVariant& operator=(const wxString& value); + // these overloads are necessary to prevent the compiler from using bool + // version instead of wxString one: + wxVariant& operator=(const char* value) + { return *this = wxString(value); } + wxVariant& operator=(const wchar_t* value) + { return *this = wxString(value); } + wxVariant& operator=(const wxCStrData& value) + { return *this = value.AsString(); } + template<typename T> + wxVariant& operator=(const wxScopedCharTypeBuffer<T>& value) + { return *this = value.data(); } + + inline operator wxString () const { return MakeString(); } + wxString GetString() const; + +#if wxUSE_STD_STRING + wxVariant(const std::string& val, const wxString& name = wxEmptyString); + bool operator==(const std::string& value) const + { return operator==(wxString(value)); } + bool operator!=(const std::string& value) const + { return operator!=(wxString(value)); } + wxVariant& operator=(const std::string& value) + { return operator=(wxString(value)); } + operator std::string() const { return (operator wxString()).ToStdString(); } + + wxVariant(const wxStdWideString& val, const wxString& name = wxEmptyString); + bool operator==(const wxStdWideString& value) const + { return operator==(wxString(value)); } + bool operator!=(const wxStdWideString& value) const + { return operator!=(wxString(value)); } + wxVariant& operator=(const wxStdWideString& value) + { return operator=(wxString(value)); } + operator wxStdWideString() const { return (operator wxString()).ToStdWstring(); } +#endif // wxUSE_STD_STRING + + // wxUniChar + wxVariant(const wxUniChar& val, const wxString& name = wxEmptyString); + wxVariant(const wxUniCharRef& val, const wxString& name = wxEmptyString); + wxVariant(char val, const wxString& name = wxEmptyString); + wxVariant(wchar_t val, const wxString& name = wxEmptyString); + bool operator==(const wxUniChar& value) const; + bool operator==(const wxUniCharRef& value) const { return *this == wxUniChar(value); } + bool operator==(char value) const { return *this == wxUniChar(value); } + bool operator==(wchar_t value) const { return *this == wxUniChar(value); } + bool operator!=(const wxUniChar& value) const { return !(*this == value); } + bool operator!=(const wxUniCharRef& value) const { return !(*this == value); } + bool operator!=(char value) const { return !(*this == value); } + bool operator!=(wchar_t value) const { return !(*this == value); } + wxVariant& operator=(const wxUniChar& value); + wxVariant& operator=(const wxUniCharRef& value) { return *this = wxUniChar(value); } + wxVariant& operator=(char value) { return *this = wxUniChar(value); } + wxVariant& operator=(wchar_t value) { return *this = wxUniChar(value); } + operator wxUniChar() const { return GetChar(); } + operator char() const { return GetChar(); } + operator wchar_t() const { return GetChar(); } + wxUniChar GetChar() const; + + // wxArrayString + wxVariant(const wxArrayString& val, const wxString& name = wxEmptyString); + bool operator== (const wxArrayString& value) const; + bool operator!= (const wxArrayString& value) const; + void operator= (const wxArrayString& value); + operator wxArrayString () const { return GetArrayString(); } + wxArrayString GetArrayString() const; + + // void* + wxVariant(void* ptr, const wxString& name = wxEmptyString); + bool operator== (void* value) const; + bool operator!= (void* value) const; + void operator= (void* value); + operator void* () const { return GetVoidPtr(); } + void* GetVoidPtr() const; + + // wxObject* + wxVariant(wxObject* ptr, const wxString& name = wxEmptyString); + bool operator== (wxObject* value) const; + bool operator!= (wxObject* value) const; + void operator= (wxObject* value); + wxObject* GetWxObjectPtr() const; + +#if wxUSE_LONGLONG + // wxLongLong + wxVariant(wxLongLong, const wxString& name = wxEmptyString); + bool operator==(wxLongLong value) const; + bool operator!=(wxLongLong value) const; + void operator=(wxLongLong value); + operator wxLongLong() const { return GetLongLong(); } + wxLongLong GetLongLong() const; + + // wxULongLong + wxVariant(wxULongLong, const wxString& name = wxEmptyString); + bool operator==(wxULongLong value) const; + bool operator!=(wxULongLong value) const; + void operator=(wxULongLong value); + operator wxULongLong() const { return GetULongLong(); } + wxULongLong GetULongLong() const; +#endif + + // ------------------------------ + // list operations + // ------------------------------ + + wxVariant(const wxVariantList& val, const wxString& name = wxEmptyString); // List of variants + bool operator== (const wxVariantList& value) const; + bool operator!= (const wxVariantList& value) const; + void operator= (const wxVariantList& value) ; + // Treat a list variant as an array + wxVariant operator[] (size_t idx) const; + wxVariant& operator[] (size_t idx) ; + wxVariantList& GetList() const ; + + // Return the number of elements in a list + size_t GetCount() const; + + // Make empty list + void NullList(); + + // Append to list + void Append(const wxVariant& value); + + // Insert at front of list + void Insert(const wxVariant& value); + + // Returns true if the variant is a member of the list + bool Member(const wxVariant& value) const; + + // Deletes the nth element of the list + bool Delete(size_t item); + + // Clear list + void ClearList(); + +public: + // Type conversion + bool Convert(long* value) const; + bool Convert(bool* value) const; + bool Convert(double* value) const; + bool Convert(wxString* value) const; + bool Convert(wxUniChar* value) const; + bool Convert(char* value) const; + bool Convert(wchar_t* value) const; +#if wxUSE_DATETIME + bool Convert(wxDateTime* value) const; +#endif // wxUSE_DATETIME +#if wxUSE_LONGLONG + bool Convert(wxLongLong* value) const; + bool Convert(wxULongLong* value) const; + #ifdef wxLongLong_t + bool Convert(wxLongLong_t* value) const + { + wxLongLong temp; + if ( !Convert(&temp) ) + return false; + *value = temp.GetValue(); + return true; + } + bool Convert(wxULongLong_t* value) const + { + wxULongLong temp; + if ( !Convert(&temp) ) + return false; + *value = temp.GetValue(); + return true; + } + #endif // wxLongLong_t +#endif // wxUSE_LONGLONG + +// Attributes +protected: + virtual wxObjectRefData *CreateRefData() const; + virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; + + wxString m_name; + +private: + DECLARE_DYNAMIC_CLASS(wxVariant) +}; + + +// +// wxVariant <-> wxAny conversion code +// +#if wxUSE_ANY + +#include "wx/any.h" + +// In order to convert wxAny to wxVariant, we need to be able to associate +// wxAnyValueType with a wxVariantData factory function. +typedef wxVariantData* (*wxVariantDataFactory)(const wxAny& any); + +// Actual Any-to-Variant registration must be postponed to a time when all +// global variables have been initialized. Hence this arrangement. +// wxAnyToVariantRegistration instances are kept in global scope and +// wxAnyValueTypeGlobals in any.cpp will use their data when the time is +// right. +class WXDLLIMPEXP_BASE wxAnyToVariantRegistration +{ +public: + wxAnyToVariantRegistration(wxVariantDataFactory factory); + virtual ~wxAnyToVariantRegistration(); + + virtual wxAnyValueType* GetAssociatedType() = 0; + wxVariantDataFactory GetFactory() const { return m_factory; } +private: + wxVariantDataFactory m_factory; +}; + +template<typename T> +class wxAnyToVariantRegistrationImpl : public wxAnyToVariantRegistration +{ +public: + wxAnyToVariantRegistrationImpl(wxVariantDataFactory factory) + : wxAnyToVariantRegistration(factory) + { + } + + virtual wxAnyValueType* GetAssociatedType() + { + return wxAnyValueTypeImpl<T>::GetInstance(); + } +private: +}; + +#define DECLARE_WXANY_CONVERSION() \ +virtual bool GetAsAny(wxAny* any) const; \ +static wxVariantData* VariantDataFactory(const wxAny& any); + +#define _REGISTER_WXANY_CONVERSION(T, CLASSNAME, FUNC) \ +static wxAnyToVariantRegistrationImpl<T> \ + gs_##CLASSNAME##AnyToVariantRegistration = \ + wxAnyToVariantRegistrationImpl<T>(&FUNC); + +#define REGISTER_WXANY_CONVERSION(T, CLASSNAME) \ +_REGISTER_WXANY_CONVERSION(T, CLASSNAME, CLASSNAME::VariantDataFactory) + +#define IMPLEMENT_TRIVIAL_WXANY_CONVERSION(T, CLASSNAME) \ +bool CLASSNAME::GetAsAny(wxAny* any) const \ +{ \ + *any = m_value; \ + return true; \ +} \ +wxVariantData* CLASSNAME::VariantDataFactory(const wxAny& any) \ +{ \ + return new CLASSNAME(wxANY_AS(any, T)); \ +} \ +REGISTER_WXANY_CONVERSION(T, CLASSNAME) + +#else // if !wxUSE_ANY + +#define DECLARE_WXANY_CONVERSION() +#define REGISTER_WXANY_CONVERSION(T, CLASSNAME) +#define IMPLEMENT_TRIVIAL_WXANY_CONVERSION(T, CLASSNAME) + +#endif // wxUSE_ANY/!wxUSE_ANY + + +#define DECLARE_VARIANT_OBJECT(classname) \ + DECLARE_VARIANT_OBJECT_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE) + +#define DECLARE_VARIANT_OBJECT_EXPORTED(classname,expdecl) \ +expdecl classname& operator << ( classname &object, const wxVariant &variant ); \ +expdecl wxVariant& operator << ( wxVariant &variant, const classname &object ); + +#define IMPLEMENT_VARIANT_OBJECT(classname) \ + IMPLEMENT_VARIANT_OBJECT_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE) + +#define IMPLEMENT_VARIANT_OBJECT_EXPORTED_NO_EQ(classname,expdecl) \ +class classname##VariantData: public wxVariantData \ +{ \ +public:\ + classname##VariantData() {} \ + classname##VariantData( const classname &value ) { m_value = value; } \ +\ + classname &GetValue() { return m_value; } \ +\ + virtual bool Eq(wxVariantData& data) const; \ +\ + virtual wxString GetType() const; \ + virtual wxClassInfo* GetValueClassInfo(); \ +\ + virtual wxVariantData* Clone() const { return new classname##VariantData(m_value); } \ +\ + DECLARE_WXANY_CONVERSION() \ +protected:\ + classname m_value; \ +};\ +\ +wxString classname##VariantData::GetType() const\ +{\ + return m_value.GetClassInfo()->GetClassName();\ +}\ +\ +wxClassInfo* classname##VariantData::GetValueClassInfo()\ +{\ + return m_value.GetClassInfo();\ +}\ +\ +expdecl classname& operator << ( classname &value, const wxVariant &variant )\ +{\ + wxASSERT( variant.GetType() == #classname );\ + \ + classname##VariantData *data = (classname##VariantData*) variant.GetData();\ + value = data->GetValue();\ + return value;\ +}\ +\ +expdecl wxVariant& operator << ( wxVariant &variant, const classname &value )\ +{\ + classname##VariantData *data = new classname##VariantData( value );\ + variant.SetData( data );\ + return variant;\ +} \ +IMPLEMENT_TRIVIAL_WXANY_CONVERSION(classname, classname##VariantData) + +// implements a wxVariantData-derived class using for the Eq() method the +// operator== which must have been provided by "classname" +#define IMPLEMENT_VARIANT_OBJECT_EXPORTED(classname,expdecl) \ +IMPLEMENT_VARIANT_OBJECT_EXPORTED_NO_EQ(classname,wxEMPTY_PARAMETER_VALUE expdecl) \ +\ +bool classname##VariantData::Eq(wxVariantData& data) const \ +{\ + wxASSERT( GetType() == data.GetType() );\ +\ + classname##VariantData & otherData = (classname##VariantData &) data;\ +\ + return otherData.m_value == m_value;\ +}\ + + +// implements a wxVariantData-derived class using for the Eq() method a shallow +// comparison (through wxObject::IsSameAs function) +#define IMPLEMENT_VARIANT_OBJECT_SHALLOWCMP(classname) \ + IMPLEMENT_VARIANT_OBJECT_EXPORTED_SHALLOWCMP(classname, wxEMPTY_PARAMETER_VALUE) +#define IMPLEMENT_VARIANT_OBJECT_EXPORTED_SHALLOWCMP(classname,expdecl) \ +IMPLEMENT_VARIANT_OBJECT_EXPORTED_NO_EQ(classname,wxEMPTY_PARAMETER_VALUE expdecl) \ +\ +bool classname##VariantData::Eq(wxVariantData& data) const \ +{\ + wxASSERT( GetType() == data.GetType() );\ +\ + classname##VariantData & otherData = (classname##VariantData &) data;\ +\ + return (otherData.m_value.IsSameAs(m_value));\ +}\ + + +// Since we want type safety wxVariant we need to fetch and dynamic_cast +// in a seemingly safe way so the compiler can check, so we define +// a dynamic_cast /wxDynamicCast analogue. + +#define wxGetVariantCast(var,classname) \ + ((classname*)(var.IsValueKindOf(&classname::ms_classInfo) ?\ + var.GetWxObjectPtr() : NULL)); + +// Replacement for using wxDynamicCast on a wxVariantData object +#ifndef wxNO_RTTI + #define wxDynamicCastVariantData(data, classname) dynamic_cast<classname*>(data) +#endif + +#define wxStaticCastVariantData(data, classname) static_cast<classname*>(data) + +extern wxVariant WXDLLIMPEXP_BASE wxNullVariant; + +#endif // wxUSE_VARIANT + +#endif // _WX_VARIANT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/variantbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/variantbase.h new file mode 100644 index 0000000000..732671bdd5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/variantbase.h @@ -0,0 +1,278 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/variantbase.h +// Purpose: wxVariantBase class, a minimal version of wxVariant used by XTI +// Author: Julian Smart +// Modified by: Francesco Montorsi +// Created: 10/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_VARIANTBASE_H_ +#define _WX_VARIANTBASE_H_ + +#include "wx/defs.h" + +#if wxUSE_VARIANT + +#include "wx/string.h" +#include "wx/arrstr.h" +#include "wx/cpp.h" +#include <typeinfo> + +#if wxUSE_DATETIME + #include "wx/datetime.h" +#endif // wxUSE_DATETIME + +#include "wx/iosfwrap.h" + +class wxTypeInfo; +class wxObject; +class wxClassInfo; + +/* + * wxVariantData stores the actual data in a wxVariant object, + * to allow it to store any type of data. + * Derive from this to provide custom data handling. + * + * NB: To prevent addition of extra vtbl pointer to wxVariantData, + * we don't multiple-inherit from wxObjectRefData. Instead, + * we simply replicate the wxObject ref-counting scheme. + * + * NB: When you construct a wxVariantData, it will have refcount + * of one. Refcount will not be further increased when + * it is passed to wxVariant. This simulates old common + * scenario where wxVariant took ownership of wxVariantData + * passed to it. + * If you create wxVariantData for other reasons than passing + * it to wxVariant, technically you are not required to call + * DecRef() before deleting it. + * + * TODO: in order to replace wxPropertyValue, we would need + * to consider adding constructors that take pointers to C++ variables, + * or removing that functionality from the wxProperty library. + * Essentially wxPropertyValue takes on some of the wxValidator functionality + * by storing pointers and not just actual values, allowing update of C++ data + * to be handled automatically. Perhaps there's another way of doing this without + * overloading wxVariant with unnecessary functionality. + */ + +class WXDLLIMPEXP_BASE wxVariantData +{ + friend class wxVariantBase; + +public: + wxVariantData() + : m_count(1) + { } + +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& WXUNUSED(str)) const { return false; } + virtual bool Read(wxSTD istream& WXUNUSED(str)) { return false; } +#endif + virtual bool Write(wxString& WXUNUSED(str)) const { return false; } + virtual bool Read(wxString& WXUNUSED(str)) { return false; } + + // Override these to provide common functionality + virtual bool Eq(wxVariantData& data) const = 0; + + // What type is it? Return a string name. + virtual wxString GetType() const = 0; + + // returns the type info of the content + virtual const wxTypeInfo* GetTypeInfo() const = 0; + + // If it based on wxObject return the ClassInfo. + virtual wxClassInfo* GetValueClassInfo() { return NULL; } + + int GetRefCount() const + { return m_count; } + void IncRef() + { m_count++; } + void DecRef() + { + if ( --m_count == 0 ) + delete this; + } + +protected: + // Protected dtor should make some incompatible code + // break more louder. That is, they should do data->DecRef() + // instead of delete data. + virtual ~wxVariantData() {} + +private: + int m_count; +}; + +template<typename T> class wxVariantDataT : public wxVariantData +{ +public: + wxVariantDataT(const T& d) : m_data(d) {} + virtual ~wxVariantDataT() {} + + // get a ref to the stored data + T & Get() { return m_data; } + + // get a const ref to the stored data + const T & Get() const { return m_data; } + + // set the data + void Set(const T& d) { m_data = d; } + + // Override these to provide common functionality + virtual bool Eq(wxVariantData& WXUNUSED(data)) const + { return false; /* FIXME!! */ } + + // What type is it? Return a string name. + virtual wxString GetType() const + { return GetTypeInfo()->GetTypeName(); } + + // return a heap allocated duplicate + //virtual wxVariantData* Clone() const { return new wxVariantDataT<T>( Get() ); } + + // returns the type info of the contentc + virtual const wxTypeInfo* GetTypeInfo() const { return wxGetTypeInfo( (T*) NULL ); } + +private: + T m_data; +}; + + +/* + * wxVariantBase can store any kind of data, but has some basic types + * built in. + */ + +class WXDLLIMPEXP_BASE wxVariantBase +{ +public: + wxVariantBase(); + wxVariantBase(const wxVariantBase& variant); + wxVariantBase(wxVariantData* data, const wxString& name = wxEmptyString); + + template<typename T> + wxVariantBase(const T& data, const wxString& name = wxEmptyString) : + m_data(new wxVariantDataT<T>(data)), m_name(name) {} + + virtual ~wxVariantBase(); + + // generic assignment + void operator= (const wxVariantBase& variant); + + // Assignment using data, e.g. + // myVariant = new wxStringVariantData("hello"); + void operator= (wxVariantData* variantData); + + bool operator== (const wxVariantBase& variant) const; + bool operator!= (const wxVariantBase& variant) const; + + // Sets/gets name + inline void SetName(const wxString& name) { m_name = name; } + inline const wxString& GetName() const { return m_name; } + + // Tests whether there is data + bool IsNull() const; + + // FIXME: used by wxVariantBase code but is nice wording... + bool IsEmpty() const { return IsNull(); } + + // For compatibility with wxWidgets <= 2.6, this doesn't increase + // reference count. + wxVariantData* GetData() const { return m_data; } + void SetData(wxVariantData* data) ; + + // make a 'clone' of the object + void Ref(const wxVariantBase& clone); + + // destroy a reference + void UnRef(); + + // Make NULL (i.e. delete the data) + void MakeNull(); + + // write contents to a string (e.g. for debugging) + wxString MakeString() const; + + // Delete data and name + void Clear(); + + // Returns a string representing the type of the variant, + // e.g. "string", "bool", "stringlist", "list", "double", "long" + wxString GetType() const; + + bool IsType(const wxString& type) const; + bool IsValueKindOf(const wxClassInfo* type) const; + + // FIXME wxXTI methods: + + // get the typeinfo of the stored object + const wxTypeInfo* GetTypeInfo() const + { + if (!m_data) + return NULL; + return m_data->GetTypeInfo(); + } + + // get a ref to the stored data + template<typename T> T& Get(wxTEMPLATED_MEMBER_FIX(T)) + { + wxVariantDataT<T> *dataptr = + wx_dynamic_cast(wxVariantDataT<T>*, m_data); + wxASSERT_MSG( dataptr, + wxString::Format(wxT("Cast to %s not possible"), typeid(T).name()) ); + return dataptr->Get(); + } + + // get a const ref to the stored data + template<typename T> const T& Get(wxTEMPLATED_MEMBER_FIX(T)) const + { + const wxVariantDataT<T> *dataptr = + wx_dynamic_cast(const wxVariantDataT<T>*, m_data); + wxASSERT_MSG( dataptr, + wxString::Format(wxT("Cast to %s not possible"), typeid(T).name()) ); + return dataptr->Get(); + } + + template<typename T> bool HasData(wxTEMPLATED_MEMBER_FIX(T)) const + { + const wxVariantDataT<T> *dataptr = + wx_dynamic_cast(const wxVariantDataT<T>*, m_data); + return dataptr != NULL; + } + + // returns this value as string + wxString GetAsString() const; + + // gets the stored data casted to a wxObject*, + // returning NULL if cast is not possible + wxObject* GetAsObject(); + +protected: + wxVariantData* m_data; + wxString m_name; +}; + +#include "wx/dynarray.h" +WX_DECLARE_OBJARRAY_WITH_DECL(wxVariantBase, wxVariantBaseArray, class WXDLLIMPEXP_BASE); + + +// templated streaming, every type must have their specialization for these methods + +template<typename T> +void wxStringReadValue( const wxString &s, T &data ); + +template<typename T> +void wxStringWriteValue( wxString &s, const T &data); + +template<typename T> +void wxToStringConverter( const wxVariantBase &v, wxString &s wxTEMPLATED_FUNCTION_FIX(T)) \ + { wxStringWriteValue( s, v.wxTEMPLATED_MEMBER_CALL(Get, T) ); } + +template<typename T> +void wxFromStringConverter( const wxString &s, wxVariantBase &v wxTEMPLATED_FUNCTION_FIX(T)) \ + { T d; wxStringReadValue( s, d ); v = wxVariantBase(d); } + + +#endif // wxUSE_VARIANT +#endif // _WX_VARIANTBASE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/vector.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/vector.h new file mode 100644 index 0000000000..e81cafb082 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/vector.h @@ -0,0 +1,584 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/vector.h +// Purpose: STL vector clone +// Author: Lindsay Mathieson +// Modified by: Vaclav Slavik - make it a template +// Created: 30.07.2001 +// Copyright: (c) 2001 Lindsay Mathieson <lindsay@mathieson.org>, +// 2007 Vaclav Slavik <vslavik@fastmail.fm> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_VECTOR_H_ +#define _WX_VECTOR_H_ + +#include "wx/defs.h" + +#if wxUSE_STD_CONTAINERS + +#include <vector> +#include <algorithm> + +#define wxVector std::vector +template<typename T> +inline void wxVectorSort(wxVector<T>& v) +{ + std::sort(v.begin(), v.end()); +} + +#else // !wxUSE_STD_CONTAINERS + +#include "wx/scopeguard.h" +#include "wx/meta/movable.h" +#include "wx/meta/if.h" + +#include "wx/beforestd.h" +#include <new> // for placement new +#include "wx/afterstd.h" + +// wxQsort is declared in wx/utils.h, but can't include that file here, +// it indirectly includes this file. Just lovely... +typedef int (*wxSortCallback)(const void* pItem1, + const void* pItem2, + const void* user_data); +WXDLLIMPEXP_BASE void wxQsort(void* pbase, size_t total_elems, + size_t size, wxSortCallback cmp, + const void* user_data); + +namespace wxPrivate +{ + +// These templates encapsulate memory operations for use by wxVector; there are +// two implementations, both in generic way for any C++ types and as an +// optimized version for "movable" types that uses realloc() and memmove(). + +// version for movable types: +template<typename T> +struct wxVectorMemOpsMovable +{ + static void Free(T* array) + { free(array); } + + static T* Realloc(T* old, size_t newCapacity, size_t WXUNUSED(occupiedSize)) + { return (T*)realloc(old, newCapacity * sizeof(T)); } + + static void MemmoveBackward(T* dest, T* source, size_t count) + { memmove(dest, source, count * sizeof(T)); } + + static void MemmoveForward(T* dest, T* source, size_t count) + { memmove(dest, source, count * sizeof(T)); } +}; + +// generic version for non-movable types: +template<typename T> +struct wxVectorMemOpsGeneric +{ + static void Free(T* array) + { ::operator delete(array); } + + static T* Realloc(T* old, size_t newCapacity, size_t occupiedSize) + { + T *mem = (T*)::operator new(newCapacity * sizeof(T)); + for ( size_t i = 0; i < occupiedSize; i++ ) + { + ::new(mem + i) T(old[i]); + old[i].~T(); + } + ::operator delete(old); + return mem; + } + + static void MemmoveBackward(T* dest, T* source, size_t count) + { + wxASSERT( dest < source ); + T* destptr = dest; + T* sourceptr = source; + for ( size_t i = count; i > 0; --i, ++destptr, ++sourceptr ) + { + ::new(destptr) T(*sourceptr); + sourceptr->~T(); + } + } + + static void MemmoveForward(T* dest, T* source, size_t count) + { + wxASSERT( dest > source ); + T* destptr = dest + count - 1; + T* sourceptr = source + count - 1; + for ( size_t i = count; i > 0; --i, --destptr, --sourceptr ) + { + ::new(destptr) T(*sourceptr); + sourceptr->~T(); + } + } +}; + + +} // namespace wxPrivate + +template<typename T> +class wxVector +{ +private: + // This cryptic expression means "typedef Ops to wxVectorMemOpsMovable if + // type T is movable type, otherwise to wxVectorMemOpsGeneric". + // + // Note that we use typedef instead of privately deriving from this (which + // would allowed us to omit "Ops::" prefixes below) to keep VC6 happy, + // it can't compile code that derives from wxIf<...>::value. + // + // Note that bcc needs the extra parentheses for non-type template + // arguments to compile this expression. + typedef typename wxIf< (wxIsMovable<T>::value), + wxPrivate::wxVectorMemOpsMovable<T>, + wxPrivate::wxVectorMemOpsGeneric<T> >::value + Ops; + +public: + typedef size_t size_type; + typedef size_t difference_type; + typedef T value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type* iterator; + typedef const value_type* const_iterator; + typedef value_type& reference; + typedef const value_type& const_reference; + + class reverse_iterator + { + public: + reverse_iterator() : m_ptr(NULL) { } + wxEXPLICIT reverse_iterator(iterator it) : m_ptr(it) { } + reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } + + reference operator*() const { return *m_ptr; } + pointer operator->() const { return m_ptr; } + + iterator base() const { return m_ptr; } + + reverse_iterator& operator++() + { --m_ptr; return *this; } + reverse_iterator operator++(int) + { reverse_iterator tmp = *this; --m_ptr; return tmp; } + reverse_iterator& operator--() + { ++m_ptr; return *this; } + reverse_iterator operator--(int) + { reverse_iterator tmp = *this; ++m_ptr; return tmp; } + + reverse_iterator operator+(difference_type n) const + { return reverse_iterator(m_ptr - n); } + reverse_iterator& operator+=(difference_type n) + { m_ptr -= n; return *this; } + reverse_iterator operator-(difference_type n) const + { return reverse_iterator(m_ptr + n); } + reverse_iterator& operator-=(difference_type n) + { m_ptr += n; return *this; } + + reference operator[](difference_type n) const + { return *(*this + n); } + + bool operator ==(const reverse_iterator& it) const + { return m_ptr == it.m_ptr; } + bool operator !=(const reverse_iterator& it) const + { return m_ptr != it.m_ptr; } + + private: + value_type *m_ptr; + + friend class const_reverse_iterator; + }; + + class const_reverse_iterator + { + public: + const_reverse_iterator() : m_ptr(NULL) { } + wxEXPLICIT const_reverse_iterator(const_iterator it) : m_ptr(it) { } + const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } + const_reverse_iterator(const const_reverse_iterator& it) : m_ptr(it.m_ptr) { } + + const_reference operator*() const { return *m_ptr; } + const_pointer operator->() const { return m_ptr; } + + const_iterator base() const { return m_ptr; } + + const_reverse_iterator& operator++() + { --m_ptr; return *this; } + const_reverse_iterator operator++(int) + { const_reverse_iterator tmp = *this; --m_ptr; return tmp; } + const_reverse_iterator& operator--() + { ++m_ptr; return *this; } + const_reverse_iterator operator--(int) + { const_reverse_iterator tmp = *this; ++m_ptr; return tmp; } + + const_reverse_iterator operator+(difference_type n) const + { return const_reverse_iterator(m_ptr - n); } + const_reverse_iterator& operator+=(difference_type n) + { m_ptr -= n; return *this; } + const_reverse_iterator operator-(difference_type n) const + { return const_reverse_iterator(m_ptr + n); } + const_reverse_iterator& operator-=(difference_type n) + { m_ptr += n; return *this; } + + const_reference operator[](difference_type n) const + { return *(*this + n); } + + bool operator ==(const const_reverse_iterator& it) const + { return m_ptr == it.m_ptr; } + bool operator !=(const const_reverse_iterator& it) const + { return m_ptr != it.m_ptr; } + + protected: + const value_type *m_ptr; + }; + + wxVector() : m_size(0), m_capacity(0), m_values(NULL) {} + + wxVector(size_type p_size) + : m_size(0), m_capacity(0), m_values(NULL) + { + reserve(p_size); + for ( size_t n = 0; n < p_size; n++ ) + push_back(value_type()); + } + + wxVector(size_type p_size, const value_type& v) + : m_size(0), m_capacity(0), m_values(NULL) + { + reserve(p_size); + for ( size_t n = 0; n < p_size; n++ ) + push_back(v); + } + + wxVector(const wxVector& c) : m_size(0), m_capacity(0), m_values(NULL) + { + Copy(c); + } + + template <class InputIterator> + wxVector(InputIterator first, InputIterator last) + : m_size(0), m_capacity(0), m_values(NULL) + { + assign(first, last); + } + + ~wxVector() + { + clear(); + } + + void assign(size_type p_size, const value_type& v) + { + clear(); + reserve(p_size); + for ( size_t n = 0; n < p_size; n++ ) + push_back(v); + } + + template <class InputIterator> + void assign(InputIterator first, InputIterator last) + { + clear(); + + // Notice that it would be nice to call reserve() here but we can't do + // it for arbitrary input iterators, we should have a dispatch on + // iterator type and call it if possible. + + for ( InputIterator it = first; it != last; ++it ) + push_back(*it); + } + + void swap(wxVector& v) + { + wxSwap(m_size, v.m_size); + wxSwap(m_capacity, v.m_capacity); + wxSwap(m_values, v.m_values); + } + + void clear() + { + // call destructors of stored objects: + for ( size_type i = 0; i < m_size; i++ ) + { + m_values[i].~T(); + } + + Ops::Free(m_values); + m_values = NULL; + m_size = + m_capacity = 0; + } + + void reserve(size_type n) + { + if ( n <= m_capacity ) + return; + + // increase the size twice, unless we're already too big or unless + // more is requested + // + // NB: casts to size_type are needed to suppress warnings about + // mixing enumeral and non-enumeral type in conditional expression + const size_type increment = m_size > 0 + ? m_size < ALLOC_MAX_SIZE + ? m_size + : (size_type)ALLOC_MAX_SIZE + : (size_type)ALLOC_INITIAL_SIZE; + if ( m_capacity + increment > n ) + n = m_capacity + increment; + + m_values = Ops::Realloc(m_values, n, m_size); + m_capacity = n; + } + + void resize(size_type n) + { + if ( n < m_size ) + Shrink(n); + else if ( n > m_size ) + Extend(n, value_type()); + } + + void resize(size_type n, const value_type& v) + { + if ( n < m_size ) + Shrink(n); + else if ( n > m_size ) + Extend(n, v); + } + + size_type size() const + { + return m_size; + } + + size_type capacity() const + { + return m_capacity; + } + + bool empty() const + { + return size() == 0; + } + + wxVector& operator=(const wxVector& vb) + { + if (this != &vb) + { + clear(); + Copy(vb); + } + return *this; + } + + void push_back(const value_type& v) + { + reserve(size() + 1); + + // use placement new to initialize new object in preallocated place in + // m_values and store 'v' in it: + void* const place = m_values + m_size; + ::new(place) value_type(v); + + // only increase m_size if the ctor didn't throw an exception; notice + // that if it _did_ throw, everything is OK, because we only increased + // vector's capacity so far and possibly written some data to + // uninitialized memory at the end of m_values + m_size++; + } + + void pop_back() + { + erase(end() - 1); + } + + const value_type& at(size_type idx) const + { + wxASSERT(idx < m_size); + return m_values[idx]; + } + + value_type& at(size_type idx) + { + wxASSERT(idx < m_size); + return m_values[idx]; + } + + const value_type& operator[](size_type idx) const { return at(idx); } + value_type& operator[](size_type idx) { return at(idx); } + const value_type& front() const { return at(0); } + value_type& front() { return at(0); } + const value_type& back() const { return at(size() - 1); } + value_type& back() { return at(size() - 1); } + + const_iterator begin() const { return m_values; } + iterator begin() { return m_values; } + const_iterator end() const { return m_values + size(); } + iterator end() { return m_values + size(); } + + reverse_iterator rbegin() { return reverse_iterator(end() - 1); } + reverse_iterator rend() { return reverse_iterator(begin() - 1); } + + const_reverse_iterator rbegin() const { return const_reverse_iterator(end() - 1); } + const_reverse_iterator rend() const { return const_reverse_iterator(begin() - 1); } + + iterator insert(iterator it, const value_type& v = value_type()) + { + // NB: this must be done before reserve(), because reserve() + // invalidates iterators! + const size_t idx = it - begin(); + const size_t after = end() - it; + + reserve(size() + 1); + + // the place where the new element is going to be inserted + value_type * const place = m_values + idx; + + // unless we're inserting at the end, move following elements out of + // the way: + if ( after > 0 ) + Ops::MemmoveForward(place + 1, place, after); + + // if the ctor called below throws an exception, we need to move all + // the elements back to their original positions in m_values + wxScopeGuard moveBack = wxMakeGuard( + Ops::MemmoveBackward, place, place + 1, after); + if ( !after ) + moveBack.Dismiss(); + + // use placement new to initialize new object in preallocated place in + // m_values and store 'v' in it: + ::new(place) value_type(v); + + // now that we did successfully add the new element, increment the size + // and disable moving the items back + moveBack.Dismiss(); + m_size++; + + return begin() + idx; + } + + iterator erase(iterator it) + { + return erase(it, it + 1); + } + + iterator erase(iterator first, iterator last) + { + if ( first == last ) + return first; + wxASSERT( first < end() && last <= end() ); + + const size_type idx = first - begin(); + const size_type count = last - first; + const size_type after = end() - last; + + // erase elements by calling their destructors: + for ( iterator i = first; i < last; ++i ) + i->~T(); + + // once that's done, move following elements over to the freed space: + if ( after > 0 ) + { + Ops::MemmoveBackward(m_values + idx, m_values + idx + count, after); + } + + m_size -= count; + + return begin() + idx; + } + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( size_type erase(size_type n) ); +#endif // WXWIN_COMPATIBILITY_2_8 + +private: + // VC6 can't compile static const int members + enum { ALLOC_INITIAL_SIZE = 16 }; + enum { ALLOC_MAX_SIZE = 4096 }; + + void Copy(const wxVector& vb) + { + reserve(vb.size()); + + for ( const_iterator i = vb.begin(); i != vb.end(); ++i ) + push_back(*i); + } + +private: + void Shrink(size_type n) + { + for ( size_type i = n; i < m_size; i++ ) + m_values[i].~T(); + m_size = n; + } + + void Extend(size_type n, const value_type& v) + { + reserve(n); + for ( size_type i = m_size; i < n; i++ ) + push_back(v); + } + + size_type m_size, + m_capacity; + value_type *m_values; +}; + +#if WXWIN_COMPATIBILITY_2_8 +template<typename T> +inline typename wxVector<T>::size_type wxVector<T>::erase(size_type n) +{ + erase(begin() + n); + return n; +} +#endif // WXWIN_COMPATIBILITY_2_8 + + + +namespace wxPrivate +{ + +// This is a helper for the wxVectorSort function, and should not be used +// directly in user's code. +template<typename T> +struct wxVectorComparator +{ + static int + Compare(const void* pitem1, const void* pitem2, const void* ) + { + const T& item1 = *reinterpret_cast<const T*>(pitem1); + const T& item2 = *reinterpret_cast<const T*>(pitem2); + + if (item1 < item2) + return -1; + else if (item2 < item1) + return 1; + else + return 0; + } +}; + +} // namespace wxPrivate + + + +template<typename T> +void wxVectorSort(wxVector<T>& v) +{ + wxQsort(v.begin(), v.size(), sizeof(T), + wxPrivate::wxVectorComparator<T>::Compare, NULL); +} + + + +#endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS + +#if WXWIN_COMPATIBILITY_2_8 + #define WX_DECLARE_VECTORBASE(obj, cls) typedef wxVector<obj> cls + #define _WX_DECLARE_VECTOR(obj, cls, exp) WX_DECLARE_VECTORBASE(obj, cls) + #define WX_DECLARE_VECTOR(obj, cls) WX_DECLARE_VECTORBASE(obj, cls) +#endif // WXWIN_COMPATIBILITY_2_8 + +#endif // _WX_VECTOR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/version.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/version.h new file mode 100644 index 0000000000..1e33fb4d08 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/version.h @@ -0,0 +1,90 @@ +/* + * Name: wx/version.h + * Purpose: wxWidgets version numbers + * Author: Julian Smart + * Modified by: Ryan Norton (Converted to C) + * Created: 29/01/98 + * Copyright: (c) 1998 Julian Smart + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_VERSION_H_ +#define _WX_VERSION_H_ + +#include "wx/cpp.h" /* for wxSTRINGIZE */ + +/* the constants below must be changed with each new version */ +/* ---------------------------------------------------------------------------- */ + +/* + Don't forget to update WX_CURRENT, WX_REVISION and WX_AGE in + build/bakefiles/version.bkl and regenerate the makefiles when you change + this! + */ + +/* NB: this file is parsed by automatic tools so don't change its format! */ +#define wxMAJOR_VERSION 3 +#define wxMINOR_VERSION 0 +#define wxRELEASE_NUMBER 1 +#define wxSUBRELEASE_NUMBER 0 +#define wxVERSION_STRING wxT("wxWidgets 3.0.1") + +/* nothing to update below this line when updating the version */ +/* ---------------------------------------------------------------------------- */ + +/* Users can pre-define wxABI_VERSION to a lower value in their + * makefile/project settings to compile code that will be binary compatible + * with earlier versions of the ABI within the same minor version (between + * minor versions binary compatibility breaks anyway). The default is the + * version of wxWidgets being used. A single number with two decimal digits + * for each component, e.g. 20601 for 2.6.1 */ +#ifndef wxABI_VERSION +#define wxABI_VERSION ( wxMAJOR_VERSION * 10000 + wxMINOR_VERSION * 100 + 99 ) +#endif + +/* helpers for wxVERSION_NUM_XXX */ +#define wxMAKE_VERSION_STRING(x, y, z) \ + wxSTRINGIZE(x) wxSTRINGIZE(y) wxSTRINGIZE(z) +#define wxMAKE_VERSION_DOT_STRING(x, y, z) \ + wxSTRINGIZE(x) "." wxSTRINGIZE(y) "." wxSTRINGIZE(z) + +#define wxMAKE_VERSION_STRING_T(x, y, z) \ + wxSTRINGIZE_T(x) wxSTRINGIZE_T(y) wxSTRINGIZE_T(z) +#define wxMAKE_VERSION_DOT_STRING_T(x, y, z) \ + wxSTRINGIZE_T(x) wxT(".") wxSTRINGIZE_T(y) wxT(".") wxSTRINGIZE_T(z) + +/* these are used by src/msw/version.rc and should always be ASCII, not Unicode */ +#define wxVERSION_NUM_STRING \ + wxMAKE_VERSION_STRING(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) +#define wxVERSION_NUM_DOT_STRING \ + wxMAKE_VERSION_DOT_STRING(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) + +/* those are Unicode-friendly */ +#define wxVERSION_NUM_STRING_T \ + wxMAKE_VERSION_STRING_T(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) +#define wxVERSION_NUM_DOT_STRING_T \ + wxMAKE_VERSION_DOT_STRING_T(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) + +/* some more defines, not really sure if they're [still] useful */ +#define wxVERSION_NUMBER ( (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER ) +#define wxBETA_NUMBER 0 +#define wxVERSION_FLOAT ( wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0) ) + +/* check if the current version is at least major.minor.release */ +#define wxCHECK_VERSION(major,minor,release) \ + (wxMAJOR_VERSION > (major) || \ + (wxMAJOR_VERSION == (major) && wxMINOR_VERSION > (minor)) || \ + (wxMAJOR_VERSION == (major) && wxMINOR_VERSION == (minor) && wxRELEASE_NUMBER >= (release))) + +/* the same but check the subrelease also */ +#define wxCHECK_VERSION_FULL(major,minor,release,subrel) \ + (wxCHECK_VERSION(major, minor, release) && \ + ((major) != wxMAJOR_VERSION || \ + (minor) != wxMINOR_VERSION || \ + (release) != wxRELEASE_NUMBER || \ + (subrel) <= wxSUBRELEASE_NUMBER)) + +#endif /* _WX_VERSION_H_ */ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/versioninfo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/versioninfo.h new file mode 100644 index 0000000000..79469111a6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/versioninfo.h @@ -0,0 +1,77 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/versioninfo.h +// Purpose: declaration of wxVersionInfo class +// Author: Troels K +// Created: 2010-11-22 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_VERSIONINFO_H_ +#define _WX_VERSIONINFO_H_ + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// wxVersionInfo: represents version information +// ---------------------------------------------------------------------------- + +class wxVersionInfo +{ +public: + wxVersionInfo(const wxString& name = wxString(), + int major = 0, + int minor = 0, + int micro = 0, + const wxString& description = wxString(), + const wxString& copyright = wxString()) + { + m_name = name; + m_major = major; + m_minor = minor; + m_micro = micro; + m_description = description; + m_copyright = copyright; + } + + // Default copy ctor, assignment operator and dtor are ok. + + + const wxString& GetName() const { return m_name; } + + int GetMajor() const { return m_major; } + int GetMinor() const { return m_minor; } + int GetMicro() const { return m_micro; } + + wxString ToString() const + { + return HasDescription() ? GetDescription() : GetVersionString(); + } + + wxString GetVersionString() const + { + wxString str; + str << m_name << ' ' << GetMajor() << '.' << GetMinor(); + if ( GetMicro() ) + str << '.' << GetMicro(); + + return str; + } + + bool HasDescription() const { return !m_description.empty(); } + const wxString& GetDescription() const { return m_description; } + + bool HasCopyright() const { return !m_copyright.empty(); } + const wxString& GetCopyright() const { return m_copyright; } + +private: + wxString m_name, + m_description, + m_copyright; + + int m_major, + m_minor, + m_micro; +}; + +#endif // _WX_VERSIONINFO_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/vidmode.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/vidmode.h new file mode 100644 index 0000000000..550bb3b4bc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/vidmode.h @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/vidmode.h +// Purpose: declares wxVideoMode class used by both wxDisplay and wxApp +// Author: Vadim Zeitlin +// Modified by: +// Created: 27.09.2003 (extracted from wx/display.h) +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_VMODE_H_ +#define _WX_VMODE_H_ + +// ---------------------------------------------------------------------------- +// wxVideoMode: a simple struct containing video mode parameters for a display +// ---------------------------------------------------------------------------- + +struct WXDLLIMPEXP_CORE wxVideoMode +{ + wxVideoMode(int width = 0, int height = 0, int depth = 0, int freq = 0) + { + w = width; + h = height; + + bpp = depth; + + refresh = freq; + } + + // default copy ctor and assignment operator are ok + + bool operator==(const wxVideoMode& m) const + { + return w == m.w && h == m.h && bpp == m.bpp && refresh == m.refresh; + } + bool operator!=(const wxVideoMode& mode) const + { + return !operator==(mode); + } + + // returns true if this mode matches the other one in the sense that all + // non zero fields of the other mode have the same value in this one + // (except for refresh which is allowed to have a greater value) + bool Matches(const wxVideoMode& other) const + { + return (!other.w || w == other.w) && + (!other.h || h == other.h) && + (!other.bpp || bpp == other.bpp) && + (!other.refresh || refresh >= other.refresh); + } + + // trivial accessors + int GetWidth() const { return w; } + int GetHeight() const { return h; } + int GetDepth() const { return bpp; } + int GetRefresh() const { return refresh; } + + // returns true if the object has been initialized + bool IsOk() const { return w && h; } + + + // the screen size in pixels (e.g. 640*480), 0 means unspecified + int w, h; + + // bits per pixel (e.g. 32), 1 is monochrome and 0 means unspecified/known + int bpp; + + // refresh frequency in Hz, 0 means unspecified/unknown + int refresh; +}; + +#endif // _WX_VMODE_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/vlbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/vlbox.h new file mode 100644 index 0000000000..1981110509 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/vlbox.h @@ -0,0 +1,311 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/vlbox.h +// Purpose: wxVListBox is a virtual listbox with lines of variable height +// Author: Vadim Zeitlin +// Modified by: +// Created: 31.05.03 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_VLBOX_H_ +#define _WX_VLBOX_H_ + +#include "wx/vscroll.h" // base class +#include "wx/bitmap.h" + +class WXDLLIMPEXP_FWD_CORE wxSelectionStore; +extern WXDLLIMPEXP_DATA_CORE(const char) wxVListBoxNameStr[]; + +// ---------------------------------------------------------------------------- +// wxVListBox +// ---------------------------------------------------------------------------- + +/* + This class has two main differences from a regular listbox: it can have an + arbitrarily huge number of items because it doesn't store them itself but + uses OnDrawItem() callback to draw them and its items can have variable + height as determined by OnMeasureItem(). + + It emits the same events as wxListBox and the same event macros may be used + with it. + */ +class WXDLLIMPEXP_CORE wxVListBox : public wxVScrolledWindow +{ +public: + // constructors and such + // --------------------- + + // default constructor, you must call Create() later + wxVListBox() { Init(); } + + // normal constructor which calls Create() internally + wxVListBox(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxVListBoxNameStr) + { + Init(); + + (void)Create(parent, id, pos, size, style, name); + } + + // really creates the control and sets the initial number of items in it + // (which may be changed later with SetItemCount()) + // + // the only special style which may be specified here is wxLB_MULTIPLE + // + // returns true on success or false if the control couldn't be created + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxVListBoxNameStr); + + // dtor does some internal cleanup (deletes m_selStore if any) + virtual ~wxVListBox(); + + + // accessors + // --------- + + // get the number of items in the control + size_t GetItemCount() const { return GetRowCount(); } + + // does this control use multiple selection? + bool HasMultipleSelection() const { return m_selStore != NULL; } + + // get the currently selected item or wxNOT_FOUND if there is no selection + // + // this method is only valid for the single selection listboxes + int GetSelection() const + { + wxASSERT_MSG( !HasMultipleSelection(), + wxT("GetSelection() can't be used with wxLB_MULTIPLE") ); + + return m_current; + } + + // is this item the current one? + bool IsCurrent(size_t item) const { return item == (size_t)m_current; } + #ifdef __WXUNIVERSAL__ + bool IsCurrent() const { return wxVScrolledWindow::IsCurrent(); } + #endif + + // is this item selected? + bool IsSelected(size_t item) const; + + // get the number of the selected items (maybe 0) + // + // this method is valid for both single and multi selection listboxes + size_t GetSelectedCount() const; + + // get the first selected item, returns wxNOT_FOUND if none + // + // cookie is an opaque parameter which should be passed to + // GetNextSelected() later + // + // this method is only valid for the multi selection listboxes + int GetFirstSelected(unsigned long& cookie) const; + + // get next selection item, return wxNOT_FOUND if no more + // + // cookie must be the same parameter that was passed to GetFirstSelected() + // before + // + // this method is only valid for the multi selection listboxes + int GetNextSelected(unsigned long& cookie) const; + + // get the margins around each item + wxPoint GetMargins() const { return m_ptMargins; } + + // get the background colour of selected cells + const wxColour& GetSelectionBackground() const { return m_colBgSel; } + + // get the item rect, returns empty rect if the item is not visible + wxRect GetItemRect(size_t n) const; + + // operations + // ---------- + + // set the number of items to be shown in the control + // + // this is just a synonym for wxVScrolledWindow::SetRowCount() + virtual void SetItemCount(size_t count); + + // delete all items from the control + void Clear() { SetItemCount(0); } + + // set the selection to the specified item, if it is wxNOT_FOUND the + // selection is unset + // + // this function is only valid for the single selection listboxes + void SetSelection(int selection); + + // selects or deselects the specified item which must be valid (i.e. not + // equal to wxNOT_FOUND) + // + // return true if the items selection status has changed or false + // otherwise + // + // this function is only valid for the multiple selection listboxes + bool Select(size_t item, bool select = true); + + // selects the items in the specified range whose end points may be given + // in any order + // + // return true if any items selection status has changed, false otherwise + // + // this function is only valid for the single selection listboxes + bool SelectRange(size_t from, size_t to); + + // toggle the selection of the specified item (must be valid) + // + // this function is only valid for the multiple selection listboxes + void Toggle(size_t item) { Select(item, !IsSelected(item)); } + + // select all items in the listbox + // + // the return code indicates if any items were affected by this operation + // (true) or if nothing has changed (false) + bool SelectAll() { return DoSelectAll(true); } + + // unselect all items in the listbox + // + // the return code has the same meaning as for SelectAll() + bool DeselectAll() { return DoSelectAll(false); } + + // set the margins: horizontal margin is the distance between the window + // border and the item contents while vertical margin is half of the + // distance between items + // + // by default both margins are 0 + void SetMargins(const wxPoint& pt); + void SetMargins(wxCoord x, wxCoord y) { SetMargins(wxPoint(x, y)); } + + // change the background colour of the selected cells + void SetSelectionBackground(const wxColour& col); + + // refreshes only the selected items + void RefreshSelected(); + + + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + +protected: + virtual wxBorder GetDefaultBorder() const { return wxBORDER_THEME; } + + // the derived class must implement this function to actually draw the item + // with the given index on the provided DC + virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const = 0; + + // the derived class must implement this method to return the height of the + // specified item + virtual wxCoord OnMeasureItem(size_t n) const = 0; + + // this method may be used to draw separators between the lines; note that + // the rectangle may be modified, typically to deflate it a bit before + // passing to OnDrawItem() + // + // the base class version doesn't do anything + virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const; + + // this method is used to draw the items background and, maybe, a border + // around it + // + // the base class version implements a reasonable default behaviour which + // consists in drawing the selected item with the standard background + // colour and drawing a border around the item if it is either selected or + // current + virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const; + + // we implement OnGetRowHeight() in terms of OnMeasureItem() because this + // allows us to add borders to the items easily + // + // this function is not supposed to be overridden by the derived classes + virtual wxCoord OnGetRowHeight(size_t line) const; + + + // event handlers + void OnPaint(wxPaintEvent& event); + void OnKeyDown(wxKeyEvent& event); + void OnLeftDown(wxMouseEvent& event); + void OnLeftDClick(wxMouseEvent& event); + void OnSetOrKillFocus(wxFocusEvent& event); + void OnSize(wxSizeEvent& event); + + // common part of all ctors + void Init(); + + // send the wxEVT_LISTBOX event + void SendSelectedEvent(); + virtual void InitEvent(wxCommandEvent& event, int n); + + // common implementation of SelectAll() and DeselectAll() + bool DoSelectAll(bool select); + + // change the current item (in single selection listbox it also implicitly + // changes the selection); current may be wxNOT_FOUND in which case there + // will be no current item any more + // + // return true if the current item changed, false otherwise + bool DoSetCurrent(int current); + + // flags for DoHandleItemClick + enum + { + ItemClick_Shift = 1, // item shift-clicked + ItemClick_Ctrl = 2, // ctrl + ItemClick_Kbd = 4 // item selected from keyboard + }; + + // common part of keyboard and mouse handling processing code + void DoHandleItemClick(int item, int flags); + + // paint the background of the given item using the provided colour if it's + // valid, otherwise just return false and do nothing (this is used by + // OnDrawBackground()) + bool DoDrawSolidBackground(const wxColour& col, + wxDC& dc, + const wxRect& rect, + size_t n) const; + +private: + // the current item or wxNOT_FOUND + // + // if m_selStore == NULL this is also the selected item, otherwise the + // selections are managed by m_selStore + int m_current; + + // the anchor of the selection for the multiselection listboxes: + // shift-clicking an item extends the selection from m_anchor to the item + // clicked, for example + // + // always wxNOT_FOUND for single selection listboxes + int m_anchor; + + // the object managing our selected items if not NULL + wxSelectionStore *m_selStore; + + // margins + wxPoint m_ptMargins; + + // the selection bg colour + wxColour m_colBgSel; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxVListBox); + DECLARE_ABSTRACT_CLASS(wxVListBox) +}; + +#endif // _WX_VLBOX_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/vms_x_fix.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/vms_x_fix.h new file mode 100644 index 0000000000..8d34abd7e6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/vms_x_fix.h @@ -0,0 +1,1213 @@ +/*************************************************************************** + * * + * Author : Jouk Jansen (joukj@hrem.stm.tudelft.nl) * + * * + * Last revision : 7 October 2005 * + * * + * Repair definitions of Runtime library functions when compiling with * + * /name=(as_is) on OpenVMS * + * * + ***************************************************************************/ + +#ifndef VMS_X_FIX +#define VMS_X_FIX + +#define decw$_select DECW$_SELECT +#define DtSaverGetWindows DTSAVERGETWINDOWS +#define MrmFetchWidget MRMFETCHWIDGET +#define MrmInitialize MRMINITIALIZE +#define MrmOpenHierarchy MRMOPENHIERARCHY +#define MrmRegisterNames MRMREGISTERNAMES +#define XAddExtension XADDEXTENSION +#define XAddHosts XADDHOSTS +#define XAllocClassHint XALLOCCLASSHINT +#define XAllocColor XALLOCCOLOR +#define XAllocColorCells XALLOCCOLORCELLS +#define XAllocIconSize XALLOCICONSIZE +#define XAllocNamedColor XALLOCNAMEDCOLOR +#define XAllocSizeHints XALLOCSIZEHINTS +#define XAllocStandardColormap XALLOCSTANDARDCOLORMAP +#define XAllocWMHints XALLOCWMHINTS +#define XAllowEvents XALLOWEVENTS +#define XAutoRepeatOff XAUTOREPEATOFF +#define XAutoRepeatOn XAUTOREPEATON +#define XBaseFontNameListOfFontSet XBASEFONTNAMELISTOFFONTSET +#define XBell XBELL +#define XBitmapPad XBITMAPPAD +#define XBlackPixel XBLACKPIXEL +#define XBlackPixelOfScreen XBLACKPIXELOFSCREEN +#define XCellsOfScreen XCELLSOFSCREEN +#define XChangeActivePointerGrab XCHANGEACTIVEPOINTERGRAB +#define XChangeGC XCHANGEGC +#define XChangeKeyboardControl XCHANGEKEYBOARDCONTROL +#define XChangePointerControl XCHANGEPOINTERCONTROL +#define XChangeProperty XCHANGEPROPERTY +#define XChangeWindowAttributes XCHANGEWINDOWATTRIBUTES +#define XCheckIfEvent XCHECKIFEVENT +#define XCheckMaskEvent XCHECKMASKEVENT +#define XCheckTypedEvent XCHECKTYPEDEVENT +#define XCheckTypedWindowEvent XCHECKTYPEDWINDOWEVENT +#define XCheckWindowEvent XCHECKWINDOWEVENT +#define XClearArea XCLEARAREA +#define XClearWindow XCLEARWINDOW +#define XClipBox XCLIPBOX +#define XCloseDisplay XCLOSEDISPLAY +#define XCloseIM XCLOSEIM +#define XConfigureWindow XCONFIGUREWINDOW +#define XConvertSelection XCONVERTSELECTION +#define XCopyArea XCOPYAREA +#define XCopyColormapAndFree XCOPYCOLORMAPANDFREE +#define XCopyGC XCOPYGC +#define XCopyPlane XCOPYPLANE +#define XCreateBitmapFromData XCREATEBITMAPFROMDATA +#define XCreateColormap XCREATECOLORMAP +#define XCreateFontCursor XCREATEFONTCURSOR +#define XCreateFontSet XCREATEFONTSET +#define XCreateGC XCREATEGC +#define XCreateGlyphCursor XCREATEGLYPHCURSOR +#define XCreateIC XCREATEIC +#define XCreateImage XCREATEIMAGE +#define XCreatePixmap XCREATEPIXMAP +#define XCreatePixmapCursor XCREATEPIXMAPCURSOR +#define XCreatePixmapFromBitmapData XCREATEPIXMAPFROMBITMAPDATA +#define XCreateRegion XCREATEREGION +#define XCreateSimpleWindow XCREATESIMPLEWINDOW +#define XCreateWindow XCREATEWINDOW +#define XDefaultColormap XDEFAULTCOLORMAP +#define XDefaultColormapOfScreen XDEFAULTCOLORMAPOFSCREEN +#define XDefaultDepth XDEFAULTDEPTH +#define XDefaultDepthOfScreen XDEFAULTDEPTHOFSCREEN +#define XDefaultGC XDEFAULTGC +#define XDefaultRootWindow XDEFAULTROOTWINDOW +#define XDefaultScreen XDEFAULTSCREEN +#define XDefaultScreenOfDisplay XDEFAULTSCREENOFDISPLAY +#define XDefaultVisual XDEFAULTVISUAL +#define XDefaultVisualOfScreen XDEFAULTVISUALOFSCREEN +#define XDefineCursor XDEFINECURSOR +#define XDeleteContext XDELETECONTEXT +#define XDeleteProperty XDELETEPROPERTY +#define XDestroyIC XDESTROYIC +#define XDestroyRegion XDESTROYREGION +#define XDestroySubwindows XDESTROYSUBWINDOWS +#define XDestroyWindow XDESTROYWINDOW +#define XDisableAccessControl XDISABLEACCESSCONTROL +#define XDisplayCells XDISPLAYCELLS +#define XDisplayHeight XDISPLAYHEIGHT +#define XDisplayKeycodes XDISPLAYKEYCODES +#define XDisplayName XDISPLAYNAME +#define XDisplayOfIM XDISPLAYOFIM +#define XDisplayOfScreen XDISPLAYOFSCREEN +#define XDisplayString XDISPLAYSTRING +#define XDisplayWidth XDISPLAYWIDTH +#define XDoesBackingStore XDOESBACKINGSTORE +#define XDrawArc XDRAWARC +#define XDrawArcs XDRAWARCS +#define XDrawImageString XDRAWIMAGESTRING +#define XDrawImageString16 XDRAWIMAGESTRING16 +#define XDrawLine XDRAWLINE +#define XDrawLines XDRAWLINES +#define XDrawPoint XDRAWPOINT +#define XDrawPoints XDRAWPOINTS +#define XDrawRectangle XDRAWRECTANGLE +#define XDrawRectangles XDRAWRECTANGLES +#define XDrawSegments XDRAWSEGMENTS +#define XDrawString XDRAWSTRING +#define XDrawString16 XDRAWSTRING16 +#define XDrawText XDRAWTEXT +#define XDrawText16 XDRAWTEXT16 +#define XESetCloseDisplay XESETCLOSEDISPLAY +#define XEmptyRegion XEMPTYREGION +#define XEnableAccessControl XENABLEACCESSCONTROL +#define XEqualRegion XEQUALREGION +#define XEventsQueued XEVENTSQUEUED +#define XExtendedMaxRequestSize XEXTENDEDMAXREQUESTSIZE +#define XExtentsOfFontSet XEXTENTSOFFONTSET +#define XFetchBuffer XFETCHBUFFER +#define XFetchBytes XFETCHBYTES +#define XFetchName XFETCHNAME +#define XFillArc XFILLARC +#define XFillArcs XFILLARCS +#define XFillPolygon XFILLPOLYGON +#define XFillRectangle XFILLRECTANGLE +#define XFillRectangles XFILLRECTANGLES +#define XFilterEvent XFILTEREVENT +#define XFindContext XFINDCONTEXT +#define XFlush XFLUSH +#define XFontsOfFontSet XFONTSOFFONTSET +#define XForceScreenSaver XFORCESCREENSAVER +#define XFree XFREE +#define XFreeColormap XFREECOLORMAP +#define XFreeColors XFREECOLORS +#define XFreeCursor XFREECURSOR +#define XFreeDeviceList XFREEDEVICELIST +#define XFreeDeviceState XFREEDEVICESTATE +#define XFreeFont XFREEFONT +#define XFreeFontInfo XFREEFONTINFO +#define XFreeFontNames XFREEFONTNAMES +#define XFreeFontSet XFREEFONTSET +#define XFreeGC XFREEGC +#define XFreeModifiermap XFREEMODIFIERMAP +#define XFreePixmap XFREEPIXMAP +#define XFreeStringList XFREESTRINGLIST +#define XGContextFromGC XGCONTEXTFROMGC +#define XGeometry XGEOMETRY +#define XGetAtomName XGETATOMNAME +#define XGetCommand XGETCOMMAND +#define XGetDefault XGETDEFAULT +#define XGetErrorDatabaseText XGETERRORDATABASETEXT +#define XGetErrorText XGETERRORTEXT +#define XGetExtensionVersion XGETEXTENSIONVERSION +#define XGetFontProperty XGETFONTPROPERTY +#define XGetGCValues XGETGCVALUES +#define XGetGeometry XGETGEOMETRY +#define XGetICValues XGETICVALUES +#define XGetIMValues XGETIMVALUES +#define XGetIconName XGETICONNAME +#define XGetIconSizes XGETICONSIZES +#define XGetImage XGETIMAGE +#define XGetInputFocus XGETINPUTFOCUS +#define XGetKeyboardControl XGETKEYBOARDCONTROL +#define XGetKeyboardMapping XGETKEYBOARDMAPPING +#define XGetModifierMapping XGETMODIFIERMAPPING +#define XGetMotionEvents XGETMOTIONEVENTS +#define XGetNormalHints XGETNORMALHINTS +#define XGetPointerMapping XGETPOINTERMAPPING +#define XGetRGBColormaps XGETRGBCOLORMAPS +#define XGetScreenSaver XGETSCREENSAVER +#define XGetSelectionOwner XGETSELECTIONOWNER +#define XGetStandardColormap XGETSTANDARDCOLORMAP +#define XGetSubImage XGETSUBIMAGE +#define XGetTextProperty XGETTEXTPROPERTY +#define XGetVisualInfo XGETVISUALINFO +#define XGetWMColormapWindows XGETWMCOLORMAPWINDOWS +#define XGetWMHints XGETWMHINTS +#define XGetWMIconName XGETWMICONNAME +#define XGetWMName XGETWMNAME +#define XGetWMNormalHints XGETWMNORMALHINTS +#define XGetWindowAttributes XGETWINDOWATTRIBUTES +#define XGetWindowProperty XGETWINDOWPROPERTY +#define XGrabButton XGRABBUTTON +#define XGrabKeyboard XGRABKEYBOARD +#define XGrabPointer XGRABPOINTER +#define XGrabServer XGRABSERVER +#define XHeightMMOfScreen XHEIGHTMMOFSCREEN +#define XHeightOfScreen XHEIGHTOFSCREEN +#define XIconifyWindow XICONIFYWINDOW +#define XIfEvent XIFEVENT +#define XInitExtension XINITEXTENSION +#define XInitImage XINITIMAGE +#define XInstallColormap XINSTALLCOLORMAP +#define XInternAtom XINTERNATOM +#define XInternAtoms XINTERNATOMS +#define XIntersectRegion XINTERSECTREGION +#define XKeycodeToKeysym XKEYCODETOKEYSYM +#define XKeysymToKeycode XKEYSYMTOKEYCODE +#define XKeysymToString XKEYSYMTOSTRING +#define XKillClient XKILLCLIENT +#define XListDepths XLISTDEPTHS +#define XListFonts XLISTFONTS +#define XListFontsWithInfo XLISTFONTSWITHINFO +#define XListHosts XLISTHOSTS +#define XListInputDevices XLISTINPUTDEVICES +#define XListInstalledColormaps XLISTINSTALLEDCOLORMAPS +#define XListPixmapFormats XLISTPIXMAPFORMATS +#define XListProperties XLISTPROPERTIES +#define XLoadFont XLOADFONT +#define XLoadQueryFont XLOADQUERYFONT +#define XLookupColor XLOOKUPCOLOR +#define XLookupKeysym XLOOKUPKEYSYM +#define XLookupString XLOOKUPSTRING +#define XLowerWindow XLOWERWINDOW +#define XMapRaised XMAPRAISED +#define XMapSubwindows XMAPSUBWINDOWS +#define XMapWindow XMAPWINDOW +#define XMatchVisualInfo XMATCHVISUALINFO +#define XMaxRequestSize XMAXREQUESTSIZE +#define XMissingExtension XMISSINGEXTENSION +#define XMoveResizeWindow XMOVERESIZEWINDOW +#define XMoveWindow XMOVEWINDOW +#define XNextEvent XNEXTEVENT +#define XNextRequest XNEXTREQUEST +#define XNoOp XNOOP +#define XOffsetRegion XOFFSETREGION +#define XOpenDevice XOPENDEVICE +#define XOpenDisplay XOPENDISPLAY +#define XOpenIM XOPENIM +#define XParseColor XPARSECOLOR +#define XParseGeometry XPARSEGEOMETRY +#define XPeekEvent XPEEKEVENT +#define XPeekIfEvent XPEEKIFEVENT +#define XPending XPENDING +#define XPointInRegion XPOINTINREGION +#define XPolygonRegion XPOLYGONREGION +#define XPutBackEvent XPUTBACKEVENT +#define XPutImage XPUTIMAGE +#define XQLength XQLENGTH +#define XQueryBestCursor XQUERYBESTCURSOR +#define XQueryBestStipple XQUERYBESTSTIPPLE +#define XQueryColor XQUERYCOLOR +#define XQueryColors XQUERYCOLORS +#define XQueryDeviceState XQUERYDEVICESTATE +#define XQueryExtension XQUERYEXTENSION +#define XQueryFont XQUERYFONT +#define XQueryKeymap XQUERYKEYMAP +#define XQueryPointer XQUERYPOINTER +#define XQueryTree XQUERYTREE +#define XRaiseWindow XRAISEWINDOW +#define XReadBitmapFile XREADBITMAPFILE +#define XRecolorCursor XRECOLORCURSOR +#define XReconfigureWMWindow XRECONFIGUREWMWINDOW +#define XRectInRegion XRECTINREGION +#define XRefreshKeyboardMapping XREFRESHKEYBOARDMAPPING +#define XRemoveHosts XREMOVEHOSTS +#define XReparentWindow XREPARENTWINDOW +#define XResetScreenSaver XRESETSCREENSAVER +#define XResizeWindow XRESIZEWINDOW +#define XResourceManagerString XRESOURCEMANAGERSTRING +#define XRestackWindows XRESTACKWINDOWS +#define XRotateBuffers XROTATEBUFFERS +#define XRootWindow XROOTWINDOW +#define XRootWindowOfScreen XROOTWINDOWOFSCREEN +#define XSaveContext XSAVECONTEXT +#define XScreenNumberOfScreen XSCREENNUMBEROFSCREEN +#define XScreenOfDisplay XSCREENOFDISPLAY +#define XSelectAsyncEvent XSELECTASYNCEVENT +#define XSelectAsyncInput XSELECTASYNCINPUT +#define XSelectExtensionEvent XSELECTEXTENSIONEVENT +#define XSelectInput XSELECTINPUT +#define XSendEvent XSENDEVENT +#define XServerVendor XSERVERVENDOR +#define XSetArcMode XSETARCMODE +#define XSetBackground XSETBACKGROUND +#define XSetClassHint XSETCLASSHINT +#define XSetClipMask XSETCLIPMASK +#define XSetClipOrigin XSETCLIPORIGIN +#define XSetClipRectangles XSETCLIPRECTANGLES +#define XSetCloseDownMode XSETCLOSEDOWNMODE +#define XSetCommand XSETCOMMAND +#define XSetDashes XSETDASHES +#define XSetErrorHandler XSETERRORHANDLER +#define XSetFillRule XSETFILLRULE +#define XSetFillStyle XSETFILLSTYLE +#define XSetFont XSETFONT +#define XSetForeground XSETFOREGROUND +#define XSetFunction XSETFUNCTION +#define XSetGraphicsExposures XSETGRAPHICSEXPOSURES +#define XSetICFocus XSETICFOCUS +#define XSetICValues XSETICVALUES +#define XSetIOErrorHandler XSETIOERRORHANDLER +#define XSetIconName XSETICONNAME +#define XSetInputFocus XSETINPUTFOCUS +#define XSetLineAttributes XSETLINEATTRIBUTES +#define XSetLocaleModifiers XSETLOCALEMODIFIERS +#define XSetNormalHints XSETNORMALHINTS +#define XSetPlaneMask XSETPLANEMASK +#define XSetRegion XSETREGION +#define XSetRGBColormaps XSETRGBCOLORMAPS +#define XSetScreenSaver XSETSCREENSAVER +#define XSetSelectionOwner XSETSELECTIONOWNER +#define XSetStandardProperties XSETSTANDARDPROPERTIES +#define XSetState XSETSTATE +#define XSetStipple XSETSTIPPLE +#define XSetSubwindowMode XSETSUBWINDOWMODE +#define XSetTSOrigin XSETTSORIGIN +#define XSetTextProperty XSETTEXTPROPERTY +#define XSetTile XSETTILE +#define XSetTransientForHint XSETTRANSIENTFORHINT +#define XSetWMClientMachine XSETWMCLIENTMACHINE +#define XSetWMColormapWindows XSETWMCOLORMAPWINDOWS +#define XSetWMHints XSETWMHINTS +#define XSetWMIconName XSETWMICONNAME +#define XSetWMName XSETWMNAME +#define XSetWMNormalHints XSETWMNORMALHINTS +#define XSetWMProperties XSETWMPROPERTIES +#define XSetWMProtocols XSETWMPROTOCOLS +#define XSetWMSizeHints XSETWMSIZEHINTS +#define XSetWindowBackground XSETWINDOWBACKGROUND +#define XSetWindowBackgroundPixmap XSETWINDOWBACKGROUNDPIXMAP +#define XSetWindowBorder XSETWINDOWBORDER +#define XSetWindowBorderPixmap XSETWINDOWBORDERPIXMAP +#define XSetWindowBorderWidth XSETWINDOWBORDERWIDTH +#define XSetWindowColormap XSETWINDOWCOLORMAP +#define XShapeCombineMask XSHAPECOMBINEMASK +#define XShapeCombineRectangles XSHAPECOMBINERECTANGLES +#define XShapeGetRectangles XSHAPEGETRECTANGLES +#define XShapeQueryExtension XSHAPEQUERYEXTENSION +#define XShmAttach XSHMATTACH +#define XShmCreateImage XSHMCREATEIMAGE +#define XShmCreatePixmap XSHMCREATEPIXMAP +#define XShmDetach XSHMDETACH +#define XShmGetEventBase XSHMGETEVENTBASE +#define XShmPutImage XSHMPUTIMAGE +#define XShmQueryExtension XSHMQUERYEXTENSION +#define XShmQueryVersion XSHMQUERYVERSION +#define XShrinkRegion XSHRINKREGION +#define XStoreBuffer XSTOREBUFFER +#define XStoreBytes XSTOREBYTES +#define XStoreColor XSTORECOLOR +#define XStoreColors XSTORECOLORS +#define XStoreName XSTORENAME +#define XStringListToTextProperty XSTRINGLISTTOTEXTPROPERTY +#define XStringToKeysym XSTRINGTOKEYSYM +#define XSubtractRegion XSUBTRACTREGION +#define XSupportsLocale XSUPPORTSLOCALE +#define XSync XSYNC +#define XSynchronize XSYNCHRONIZE +#define XTextExtents XTEXTEXTENTS +#define XTextExtents16 XTEXTEXTENTS16 +#define XTextPropertyToStringList XTEXTPROPERTYTOSTRINGLIST +#define XTextWidth XTEXTWIDTH +#define XTextWidth16 XTEXTWIDTH16 +#define XTranslateCoordinates XTRANSLATECOORDINATES +#define XUndefineCursor XUNDEFINECURSOR +#define XUngrabButton XUNGRABBUTTON +#define XUngrabKeyboard XUNGRABKEYBOARD +#define XUngrabPointer XUNGRABPOINTER +#define XUngrabServer XUNGRABSERVER +#define XUninstallColormap XUNINSTALLCOLORMAP +#define XUnionRectWithRegion XUNIONRECTWITHREGION +#define XUnionRegion XUNIONREGION +#define XUniqueContext XUNIQUECONTEXT +#define XUnmapWindow XUNMAPWINDOW +#define XUnsetICFocus XUNSETICFOCUS +#define XVaCreateNestedList XVACREATENESTEDLIST +#define XVisualIDFromVisual XVISUALIDFROMVISUAL +#define XWMGeometry XWMGEOMETRY +#define XWarpPointer XWARPPOINTER +#define XWhitePixel XWHITEPIXEL +#define XWhitePixelOfScreen XWHITEPIXELOFSCREEN +#define XWidthMMOfScreen XWIDTHMMOFSCREEN +#define XWidthOfScreen XWIDTHOFSCREEN +#define XWindowEvent XWINDOWEVENT +#define XWithdrawWindow XWITHDRAWWINDOW +#define XXorRegion XXORREGION +#define XcmsQueryColor XCMSQUERYCOLOR +#define XdbeAllocateBackBufferName XDBEALLOCATEBACKBUFFERNAME +#define XdbeFreeVisualInfo XDBEFREEVISUALINFO +#define XdbeGetVisualInfo XDBEGETVISUALINFO +#define XdbeQueryExtension XDBEQUERYEXTENSION +#define XdbeSwapBuffers XDBESWAPBUFFERS +#define XextAddDisplay XEXTADDDISPLAY +#define XextFindDisplay XEXTFINDDISPLAY +#define XextRemoveDisplay XEXTREMOVEDISPLAY +#define XkbSetDetectableAutoRepeat XKBSETDETECTABLEAUTOREPEAT +#define XmActivateProtocol XMACTIVATEPROTOCOL +#define XmAddProtocolCallback XMADDPROTOCOLCALLBACK +#define XmAddProtocols XMADDPROTOCOLS +#define XmChangeColor XMCHANGECOLOR +#define XmClipboardCopy XMCLIPBOARDCOPY +#define XmClipboardCopyByName XMCLIPBOARDCOPYBYNAME +#define XmClipboardEndCopy XMCLIPBOARDENDCOPY +#define XmClipboardEndRetrieve XMCLIPBOARDENDRETRIEVE +#define XmClipboardInquireCount XMCLIPBOARDINQUIRECOUNT +#define XmClipboardInquireFormat XMCLIPBOARDINQUIREFORMAT +#define XmClipboardInquireLength XMCLIPBOARDINQUIRELENGTH +#define XmClipboardLock XMCLIPBOARDLOCK +#define XmClipboardRetrieve XMCLIPBOARDRETRIEVE +#define XmClipboardStartCopy XMCLIPBOARDSTARTCOPY +#define XmClipboardStartRetrieve XMCLIPBOARDSTARTRETRIEVE +#define XmClipboardUnlock XMCLIPBOARDUNLOCK +#define XmCommandError XMCOMMANDERROR +#define XmCommandGetChild XMCOMMANDGETCHILD +#define XmCommandSetValue XMCOMMANDSETVALUE +#define XmCreateArrowButton XMCREATEARROWBUTTON +#define XmCreateArrowButtonGadget XMCREATEARROWBUTTONGADGET +#define XmCreateBulletinBoardDialog XMCREATEBULLETINBOARDDIALOG +#define XmCreateCascadeButton XMCREATECASCADEBUTTON +#define XmCreateCascadeButtonGadget XMCREATECASCADEBUTTONGADGET +#define XmCreateDialogShell XMCREATEDIALOGSHELL +#define XmCreateDragIcon XMCREATEDRAGICON +#define XmCreateDrawingArea XMCREATEDRAWINGAREA +#define XmCreateDrawnButton XMCREATEDRAWNBUTTON +#define XmCreateErrorDialog XMCREATEERRORDIALOG +#define XmCreateFileSelectionBox XMCREATEFILESELECTIONBOX +#define XmCreateFileSelectionDialog XMCREATEFILESELECTIONDIALOG +#define XmCreateForm XMCREATEFORM +#define XmCreateFormDialog XMCREATEFORMDIALOG +#define XmCreateFrame XMCREATEFRAME +#define XmCreateInformationDialog XMCREATEINFORMATIONDIALOG +#define XmCreateLabel XMCREATELABEL +#define XmCreateLabelGadget XMCREATELABELGADGET +#define XmCreateList XMCREATELIST +#define XmCreateMainWindow XMCREATEMAINWINDOW +#define XmCreateMenuBar XMCREATEMENUBAR +#define XmCreateMessageBox XMCREATEMESSAGEBOX +#define XmCreateMessageDialog XMCREATEMESSAGEDIALOG +#define XmCreateOptionMenu XMCREATEOPTIONMENU +#define XmCreatePanedWindow XMCREATEPANEDWINDOW +#define XmCreatePopupMenu XMCREATEPOPUPMENU +#define XmCreatePromptDialog XMCREATEPROMPTDIALOG +#define XmCreatePulldownMenu XMCREATEPULLDOWNMENU +#define XmCreatePushButton XMCREATEPUSHBUTTON +#define XmCreatePushButtonGadget XMCREATEPUSHBUTTONGADGET +#define XmCreateQuestionDialog XMCREATEQUESTIONDIALOG +#define XmCreateRadioBox XMCREATERADIOBOX +#define XmCreateRowColumn XMCREATEROWCOLUMN +#define XmCreateScale XMCREATESCALE +#define XmCreateScrollBar XMCREATESCROLLBAR +#define XmCreateScrolledList XMCREATESCROLLEDLIST +#define XmCreateScrolledText XMCREATESCROLLEDTEXT +#define XmCreateScrolledWindow XMCREATESCROLLEDWINDOW +#define XmCreateSelectionDialog XMCREATESELECTIONDIALOG +#define XmCreateSeparator XMCREATESEPARATOR +#define XmCreateSeparatorGadget XMCREATESEPARATORGADGET +#define XmCreateTemplateDialog XMCREATETEMPLATEDIALOG +#define XmCreateText XMCREATETEXT +#define XmCreateTextField XMCREATETEXTFIELD +#define XmCreateToggleButton XMCREATETOGGLEBUTTON +#define XmCreateToggleButtonGadget XMCREATETOGGLEBUTTONGADGET +#define XmCreateWarningDialog XMCREATEWARNINGDIALOG +#define XmCvtCTToXmString XMCVTCTTOXMSTRING +#define XmDestroyPixmap XMDESTROYPIXMAP +#define XmDragStart XMDRAGSTART +#define XmDropSiteRegister XMDROPSITEREGISTER +#define XmDropSiteUnregister XMDROPSITEUNREGISTER +#define XmDropSiteUpdate XMDROPSITEUPDATE +#define XmDropTransferStart XMDROPTRANSFERSTART +#define XmFileSelectionBoxGetChild XMFILESELECTIONBOXGETCHILD +#define XmFileSelectionDoSearch XMFILESELECTIONDOSEARCH +#define XmFontListAppendEntry XMFONTLISTAPPENDENTRY +#define XmFontListCopy XMFONTLISTCOPY +#define XmFontListCreate XMFONTLISTCREATE +#define XmFontListEntryCreate XMFONTLISTENTRYCREATE +#define XmFontListEntryFree XMFONTLISTENTRYFREE +#define XmFontListEntryGetFont XMFONTLISTENTRYGETFONT +#define XmFontListEntryGetTag XMFONTLISTENTRYGETTAG +#define XmFontListEntryLoad XMFONTLISTENTRYLOAD +#define XmFontListFree XMFONTLISTFREE +#define XmFontListFreeFontContext XMFONTLISTFREEFONTCONTEXT +#define XmFontListGetNextFont XMFONTLISTGETNEXTFONT +#define XmFontListInitFontContext XMFONTLISTINITFONTCONTEXT +#define XmFontListNextEntry XMFONTLISTNEXTENTRY +#define XmGetColors XMGETCOLORS +#define XmGetColorCalculation XMGETCOLORCALCULATION +#define XmGetFocusWidget XMGETFOCUSWIDGET +#define XmGetMenuCursor XMGETMENUCURSOR +#define XmGetPixmap XMGETPIXMAP +#define XmGetPixmapByDepth XMGETPIXMAPBYDEPTH +#define XmGetTearOffControl XMGETTEAROFFCONTROL +#define XmGetXmDisplay XMGETXMDISPLAY +#define XmImMbLookupString XMIMMBLOOKUPSTRING +#define XmImRegister XMIMREGISTER +#define XmImSetFocusValues XMIMSETFOCUSVALUES +#define XmImSetValues XMIMSETVALUES +#define XmImUnregister XMIMUNREGISTER +#define XmImUnsetFocus XMIMUNSETFOCUS +#define XmInstallImage XMINSTALLIMAGE +#define XmInternAtom XMINTERNATOM +#define XmIsMotifWMRunning XMISMOTIFWMRUNNING +#define XmListAddItem XMLISTADDITEM +#define XmListAddItemUnselected XMLISTADDITEMUNSELECTED +#define XmListAddItems XMLISTADDITEMS +#define XmListAddItemsUnselected XMLISTADDITEMSUNSELECTED +#define XmListDeleteAllItems XMLISTDELETEALLITEMS +#define XmListDeleteItem XMLISTDELETEITEM +#define XmListDeleteItemsPos XMLISTDELETEITEMSPOS +#define XmListDeletePos XMLISTDELETEPOS +#define XmListDeselectAllItems XMLISTDESELECTALLITEMS +#define XmListDeselectPos XMLISTDESELECTPOS +#define XmListGetKbdItemPos XMLISTGETKBDITEMPOS +#define XmListGetMatchPos XMLISTGETMATCHPOS +#define XmListGetSelectedPos XMLISTGETSELECTEDPOS +#define XmListItemExists XMLISTITEMEXISTS +#define XmListItemPos XMLISTITEMPOS +#define XmListPosSelected XMLISTPOSSELECTED +#define XmListReplaceItems XMLISTREPLACEITEMS +#define XmListReplaceItemsPos XMLISTREPLACEITEMSPOS +#define XmListSelectItem XMLISTSELECTITEM +#define XmListSelectPos XMLISTSELECTPOS +#define XmListSetBottomPos XMLISTSETBOTTOMPOS +#define XmListSetItem XMLISTSETITEM +#define XmListSetKbdItemPos XMLISTSETKBDITEMPOS +#define XmListSetPos XMLISTSETPOS +#define XmMainWindowSetAreas XMMAINWINDOWSETAREAS +#define XmMenuPosition XMMENUPOSITION +#define XmMessageBoxGetChild XMMESSAGEBOXGETCHILD +#define XmOptionButtonGadget XMOPTIONBUTTONGADGET +#define XmOptionLabelGadget XMOPTIONLABELGADGET +#define XmProcessTraversal XMPROCESSTRAVERSAL +#define XmQmotif XMQMOTIF +#define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK +#define XmRemoveProtocols XMREMOVEPROTOCOLS +#define XmRemoveTabGroup XMREMOVETABGROUP +#define XmRepTypeGetId XMREPTYPEGETID +#define XmRepTypeGetRecord XMREPTYPEGETRECORD +#define XmRepTypeInstallTearOffModelCon XMREPTYPEINSTALLTEAROFFMODELCON +#define XmRepTypeRegister XMREPTYPEREGISTER +#define XmRepTypeValidValue XMREPTYPEVALIDVALUE +#define XmScrollBarGetValues XMSCROLLBARGETVALUES +#define XmScrollBarSetValues XMSCROLLBARSETVALUES +#define XmScrolledWindowSetAreas XMSCROLLEDWINDOWSETAREAS +#define XmSelectionBoxGetChild XMSELECTIONBOXGETCHILD +#define XmSetColorCalculation XMSETCOLORCALCULATION +#define XmStringByteCompare XMSTRINGBYTECOMPARE +#define XmStringCompare XMSTRINGCOMPARE +#define XmStringConcat XMSTRINGCONCAT +#define XmStringCopy XMSTRINGCOPY +#define XmStringCreate XMSTRINGCREATE +#define XmStringCreateLocalized XMSTRINGCREATELOCALIZED +#define XmStringCreateLtoR XMSTRINGCREATELTOR +#define XmStringCreateSimple XMSTRINGCREATESIMPLE +#define XmStringDraw XMSTRINGDRAW +#define XmStringDrawUnderline XMSTRINGDRAWUNDERLINE +#define XmStringExtent XMSTRINGEXTENT +#define XmStringFree XMSTRINGFREE +#define XmStringFreeContext XMSTRINGFREECONTEXT +#define XmStringGetLtoR XMSTRINGGETLTOR +#define XmStringGetNextComponent XMSTRINGGETNEXTCOMPONENT +#define XmStringGetNextSegment XMSTRINGGETNEXTSEGMENT +#define XmStringInitContext XMSTRINGINITCONTEXT +#define XmStringLength XMSTRINGLENGTH +#define XmStringLtoRCreate XMSTRINGLTORCREATE +#define XmStringNConcat XMSTRINGNCONCAT +#define XmStringSegmentCreate XMSTRINGSEGMENTCREATE +#define XmStringSeparatorCreate XMSTRINGSEPARATORCREATE +#define XmStringWidth XMSTRINGWIDTH +#define XmTextClearSelection XMTEXTCLEARSELECTION +#define XmTextCopy XMTEXTCOPY +#define XmTextCut XMTEXTCUT +#define XmTextFieldClearSelection XMTEXTFIELDCLEARSELECTION +#define XmTextFieldCopy XMTEXTFIELDCOPY +#define XmTextFieldCut XMTEXTFIELDCUT +#define XmTextFieldGetEditable XMTEXTFIELDGETEDITABLE +#define XmTextFieldGetInsertionPosition XMTEXTFIELDGETINSERTIONPOSITION +#define XmTextFieldGetLastPosition XMTEXTFIELDGETLASTPOSITION +#define XmTextFieldGetMaxLength XMTEXTFIELDGETMAXLENGTH +#define XmTextFieldGetSelection XMTEXTFIELDGETSELECTION +#define XmTextFieldGetSelectionPosition XMTEXTFIELDGETSELECTIONPOSITION +#define XmTextFieldGetString XMTEXTFIELDGETSTRING +#define XmTextFieldInsert XMTEXTFIELDINSERT +#define XmTextFieldPaste XMTEXTFIELDPASTE +#define XmTextFieldRemove XMTEXTFIELDREMOVE +#define XmTextFieldReplace XMTEXTFIELDREPLACE +#define XmTextFieldSetAddMode XMTEXTFIELDSETADDMODE +#define XmTextFieldSetHighlight XMTEXTFIELDSETHIGHLIGHT +#define XmTextFieldSetInsertionPosition XMTEXTFIELDSETINSERTIONPOSITION +#define XmTextFieldSetMaxLength XMTEXTFIELDSETMAXLENGTH +#define XmTextFieldSetSelection XMTEXTFIELDSETSELECTION +#define XmTextFieldSetString XMTEXTFIELDSETSTRING +#define XmTextFieldShowPosition XMTEXTFIELDSHOWPOSITION +#define XmTextGetCursorPosition XMTEXTGETCURSORPOSITION +#define XmTextGetEditable XMTEXTGETEDITABLE +#define XmTextGetInsertionPosition XMTEXTGETINSERTIONPOSITION +#define XmTextGetLastPosition XMTEXTGETLASTPOSITION +#define XmTextGetMaxLength XMTEXTGETMAXLENGTH +#define XmTextGetSelection XMTEXTGETSELECTION +#define XmTextGetSelectionPosition XMTEXTGETSELECTIONPOSITION +#define XmTextGetString XMTEXTGETSTRING +#define XmTextInsert XMTEXTINSERT +#define XmTextPaste XMTEXTPASTE +#define XmTextPosToXY XMTEXTPOSTOXY +#define XmTextRemove XMTEXTREMOVE +#define XmTextReplace XMTEXTREPLACE +#define XmTextSetCursorPosition XMTEXTSETCURSORPOSITION +#define XmTextSetEditable XMTEXTSETEDITABLE +#define XmTextSetHighlight XMTEXTSETHIGHLIGHT +#define XmTextSetInsertionPosition XMTEXTSETINSERTIONPOSITION +#define XmTextSetSelection XMTEXTSETSELECTION +#define XmTextSetString XMTEXTSETSTRING +#define XmTextSetTopCharacter XMTEXTSETTOPCHARACTER +#define XmTextShowPosition XMTEXTSHOWPOSITION +#define XmToggleButtonGadgetGetState XMTOGGLEBUTTONGADGETGETSTATE +#define XmToggleButtonGadgetSetState XMTOGGLEBUTTONGADGETSETSTATE +#define XmToggleButtonGetState XMTOGGLEBUTTONGETSTATE +#define XmToggleButtonSetState XMTOGGLEBUTTONSETSTATE +#define XmUninstallImage XMUNINSTALLIMAGE +#define XmUpdateDisplay XMUPDATEDISPLAY +#define XmVaCreateSimpleRadioBox XMVACREATESIMPLERADIOBOX +#define XmbDrawString XMBDRAWSTRING +#define XmbLookupString XMBLOOKUPSTRING +#define XmbResetIC XMBRESETIC +#define XmbSetWMProperties XMBSETWMPROPERTIES +#define XmbTextEscapement XMBTEXTESCAPEMENT +#define XmbTextExtents XMBTEXTEXTENTS +#define XmbTextListToTextProperty XMBTEXTLISTTOTEXTPROPERTY +#define XmbTextPropertyToTextList XMBTEXTPROPERTYTOTEXTLIST +#define XmbufCreateBuffers XMBUFCREATEBUFFERS +#define XmbufDestroyBuffers XMBUFDESTROYBUFFERS +#define XmbufDisplayBuffers XMBUFDISPLAYBUFFERS +#define XmbufQueryExtension XMBUFQUERYEXTENSION +#define Xmemory_free XMEMORY_FREE +#define Xmemory_malloc XMEMORY_MALLOC +#define XmuClientWindow XMUCLIENTWINDOW +#define XmuConvertStandardSelection XMUCONVERTSTANDARDSELECTION +#define XmuCvtStringToBitmap XMUCVTSTRINGTOBITMAP +#define XmuInternAtom XMUINTERNATOM +#define XmuInternStrings XMUINTERNSTRINGS +#define XmuLookupStandardColormap XMULOOKUPSTANDARDCOLORMAP +#define XmuPrintDefaultErrorMessage XMUPRINTDEFAULTERRORMESSAGE +#define XrmCombineDatabase XRMCOMBINEDATABASE +#define XrmCombineFileDatabase XRMCOMBINEFILEDATABASE +#define XrmDestroyDatabase XRMDESTROYDATABASE +#define XrmGetDatabase XRMGETDATABASE +#define XrmGetFileDatabase XRMGETFILEDATABASE +#define XrmGetResource XRMGETRESOURCE +#define XrmGetStringDatabase XRMGETSTRINGDATABASE +#define XrmInitialize XRMINITIALIZE +#define XrmMergeDatabases XRMMERGEDATABASES +#define XrmParseCommand XRMPARSECOMMAND +#define XrmPermStringToQuark XRMPERMSTRINGTOQUARK +#define XrmPutFileDatabase XRMPUTFILEDATABASE +#define XrmPutLineResource XRMPUTLINERESOURCE +#define XrmPutStringResource XRMPUTSTRINGRESOURCE +#define XrmQGetResource XRMQGETRESOURCE +#define XrmQPutStringResource XRMQPUTSTRINGRESOURCE +#define XrmQuarkToString XRMQUARKTOSTRING +#define XrmSetDatabase XRMSETDATABASE +#define XrmStringToBindingQuarkList XRMSTRINGTOBINDINGQUARKLIST +#define XrmStringToQuark XRMSTRINGTOQUARK +#define XtAddCallback XTADDCALLBACK +#define XtAddCallbacks XTADDCALLBACKS +#define XtAddConverter XTADDCONVERTER +#define XtAddEventHandler XTADDEVENTHANDLER +#define XtAddExposureToRegion XTADDEXPOSURETOREGION +#define XtAddGrab XTADDGRAB +#define XtAddRawEventHandler XTADDRAWEVENTHANDLER +#define XtAllocateGC XTALLOCATEGC +#define XtAppAddActions XTAPPADDACTIONS +#define XtAppAddInput XTAPPADDINPUT +#define XtAppAddTimeOut XTAPPADDTIMEOUT +#define XtAppAddWorkProc XTAPPADDWORKPROC +#define XtAppCreateShell XTAPPCREATESHELL +#define XtAppError XTAPPERROR +#define XtAppErrorMsg XTAPPERRORMSG +#define XtAppInitialize XTAPPINITIALIZE +#define XtAppMainLoop XTAPPMAINLOOP +#define XtAppNextEvent XTAPPNEXTEVENT +#define XtAppPeekEvent XTAPPPEEKEVENT +#define XtAppPending XTAPPPENDING +#define XtAppProcessEvent XTAPPPROCESSEVENT +#define XtAppSetErrorHandler XTAPPSETERRORHANDLER +#define XtAppSetFallbackResources XTAPPSETFALLBACKRESOURCES +#define XtAppSetTypeConverter XTAPPSETTYPECONVERTER +#define XtAppSetWarningHandler XTAPPSETWARNINGHANDLER +#define XtAppWarningMsg XTAPPWARNINGMSG +#define XtAppSetWarningMsgHandler XTAPPSETWARNINGMSGHANDLER +#define XtAppWarning XTAPPWARNING +#define XtAugmentTranslations XTAUGMENTTRANSLATIONS +#define XtCallActionProc XTCALLACTIONPROC +#define XtCallCallbackList XTCALLCALLBACKLIST +#define XtCallCallbacks XTCALLCALLBACKS +#define XtCallConverter XTCALLCONVERTER +#define XtCalloc XTCALLOC +#ifndef NOXTDISPLAY +#define XtClass XTCLASS +#endif +#define XtCloseDisplay XTCLOSEDISPLAY +#define XtConfigureWidget XTCONFIGUREWIDGET +#define XtConvert XTCONVERT +#define XtConvertAndStore XTCONVERTANDSTORE +#define XtCreateApplicationContext XTCREATEAPPLICATIONCONTEXT +#define XtCreateManagedWidget XTCREATEMANAGEDWIDGET +#define XtCreatePopupShell XTCREATEPOPUPSHELL +#define XtCreateWidget XTCREATEWIDGET +#define XtCreateWindow XTCREATEWINDOW +#define XtCvtStringToFont XTCVTSTRINGTOFONT +#define XtDatabase XTDATABASE +#define XtDestroyApplicationContext XTDESTROYAPPLICATIONCONTEXT +#define XtDestroyWidget XTDESTROYWIDGET +#define XtDisownSelection XTDISOWNSELECTION +#define XtDispatchEvent XTDISPATCHEVENT +#ifndef NOXTDISPLAY +#define XtDisplay XTDISPLAY +#endif +#define XtDisplayOfObject XTDISPLAYOFOBJECT +#define XtDisplayStringConvWarning XTDISPLAYSTRINGCONVWARNING +#define XtDisplayToApplicationContext XTDISPLAYTOAPPLICATIONCONTEXT +#define XtError XTERROR +#define XtErrorMsg XTERRORMSG +#define XtFree XTFREE +#define XtGetActionKeysym XTGETACTIONKEYSYM +#define XtGetActionList XTGETACTIONLIST +#define XtGetApplicationNameAndClass XTGETAPPLICATIONNAMEANDCLASS +#define XtGetApplicationResources XTGETAPPLICATIONRESOURCES +#define XtGetClassExtension XTGETCLASSEXTENSION +#define XtGetConstraintResourceList XTGETCONSTRAINTRESOURCELIST +#define XtGetGC XTGETGC +#define XtGetMultiClickTime XTGETMULTICLICKTIME +#define XtGetResourceList XTGETRESOURCELIST +#define XtGetSelectionValue XTGETSELECTIONVALUE +#define XtGetSelectionValues XTGETSELECTIONVALUES +#define XtGetSubresources XTGETSUBRESOURCES +#define XtGetValues XTGETVALUES +#define XtGrabButton XTGRABBUTTON +#define XtGrabKeyboard XTGRABKEYBOARD +#define XtGrabPointer XTGRABPOINTER +#define XtHasCallbacks XTHASCALLBACKS +#define XtInitialize XTINITIALIZE +#define XtInitializeWidgetClass XTINITIALIZEWIDGETCLASS +#define XtInsertEventHandler XTINSERTEVENTHANDLER +#define XtInsertRawEventHandler XTINSERTRAWEVENTHANDLER +#define XtInstallAccelerators XTINSTALLACCELERATORS +#define XtIsManaged XTISMANAGED +#define XtIsObject XTISOBJECT +#ifndef NOXTDISPLAY +#define XtIsRealized XTISREALIZED +#endif +#define XtIsSensitive XTISSENSITIVE +#define XtIsSubclass XTISSUBCLASS +#define XtLastTimestampProcessed XTLASTTIMESTAMPPROCESSED +#define XtMainLoop XTMAINLOOP +#define XtMakeGeometryRequest XTMAKEGEOMETRYREQUEST +#define XtMakeResizeRequest XTMAKERESIZEREQUEST +#define XtMalloc XTMALLOC +#define XtManageChild XTMANAGECHILD +#define XtManageChildren XTMANAGECHILDREN +#define XtMergeArgLists XTMERGEARGLISTS +#define XtMoveWidget XTMOVEWIDGET +#define XtName XTNAME +#define XtNameToWidget XTNAMETOWIDGET +#define XtOpenApplication XTOPENAPPLICATION +#define XtOpenDisplay XTOPENDISPLAY +#define XtOverrideTranslations XTOVERRIDETRANSLATIONS +#define XtOwnSelection XTOWNSELECTION +#ifndef NOXTDISPLAY +#define XtParent XTPARENT +#endif +#define XtParseAcceleratorTable XTPARSEACCELERATORTABLE +#define XtParseTranslationTable XTPARSETRANSLATIONTABLE +#define XtPopdown XTPOPDOWN +#define XtPopup XTPOPUP +#define XtPopupSpringLoaded XTPOPUPSPRINGLOADED +#define XtQueryGeometry XTQUERYGEOMETRY +#define XtRealizeWidget XTREALIZEWIDGET +#define XtRealloc XTREALLOC +#define XtRegisterDrawable _XTREGISTERWINDOW +#define XtRegisterGrabAction XTREGISTERGRABACTION +#define XtReleaseGC XTRELEASEGC +#define XtRemoveAllCallbacks XTREMOVEALLCALLBACKS +#define XtRemoveCallback XTREMOVECALLBACK +#define XtRemoveEventHandler XTREMOVEEVENTHANDLER +#define XtRemoveGrab XTREMOVEGRAB +#define XtRemoveInput XTREMOVEINPUT +#define XtRemoveTimeOut XTREMOVETIMEOUT +#define XtRemoveWorkProc XTREMOVEWORKPROC +#define XtResizeWidget XTRESIZEWIDGET +#define XtResolvePathname XTRESOLVEPATHNAME +#ifndef NOXTDISPLAY +#define XtScreen XTSCREEN +#endif +#define XtScreenDatabase XTSCREENDATABASE +#define XtScreenOfObject XTSCREENOFOBJECT +#define XtSessionReturnToken XTSESSIONRETURNTOKEN +#define XtSetErrorHandler XTSETERRORHANDLER +#define XtSetKeyboardFocus XTSETKEYBOARDFOCUS +#define XtSetLanguageProc XTSETLANGUAGEPROC +#define XtSetMappedWhenManaged XTSETMAPPEDWHENMANAGED +#define XtSetSensitive XTSETSENSITIVE +#define XtSetTypeConverter XTSETTYPECONVERTER +#define XtSetValues XTSETVALUES +#define XtShellStrings XTSHELLSTRINGS +#define XtStringConversionWarning XTSTRINGCONVERSIONWARNING +#define XtStrings XTSTRINGS +#define XtToolkitInitialize XTTOOLKITINITIALIZE +#define XtTranslateCoords XTTRANSLATECOORDS +#define XtTranslateKeycode XTTRANSLATEKEYCODE +#define XtUngrabButton XTUNGRABBUTTON +#define XtUngrabKeyboard XTUNGRABKEYBOARD +#define XtUngrabPointer XTUNGRABPOINTER +#define XtUnmanageChild XTUNMANAGECHILD +#define XtUnmanageChildren XTUNMANAGECHILDREN +#define XtUnrealizeWidget XTUNREALIZEWIDGET +#define XtUnregisterDrawable _XTUNREGISTERWINDOW +#define XtVaCreateManagedWidget XTVACREATEMANAGEDWIDGET +#define XtVaCreatePopupShell XTVACREATEPOPUPSHELL +#define XtVaCreateWidget XTVACREATEWIDGET +#define XtVaGetApplicationResources XTVAGETAPPLICATIONRESOURCES +#define XtVaGetValues XTVAGETVALUES +#define XtVaSetValues XTVASETVALUES +#define XtWarning XTWARNING +#define XtWarningMsg XTWARNINGMSG +#define XtWidgetToApplicationContext XTWIDGETTOAPPLICATIONCONTEXT +#ifndef NOXTDISPLAY +#define XtWindow XTWINDOW +#endif +#define XtWindowOfObject XTWINDOWOFOBJECT +#define XtWindowToWidget XTWINDOWTOWIDGET +#define XwcDrawImageString XWCDRAWIMAGESTRING +#define XwcDrawString XWCDRAWSTRING +#define XwcFreeStringList XWCFREESTRINGLIST +#define XwcTextEscapement XWCTEXTESCAPEMENT +#define XwcTextExtents XWCTEXTEXTENTS +#define XwcTextListToTextProperty XWCTEXTLISTTOTEXTPROPERTY +#define XwcLookupString XWCLOOKUPSTRING +#define XwcTextPropertyToTextList XWCTEXTPROPERTYTOTEXTLIST +#define _XAllocTemp _XALLOCTEMP +#define _XDeqAsyncHandler _XDEQASYNCHANDLER +#define _XEatData _XEATDATA +#define _XFlush _XFLUSH +#define _XFreeTemp _XFREETEMP +#define _XGetAsyncReply _XGETASYNCREPLY +#define _XInitImageFuncPtrs _XINITIMAGEFUNCPTRS +#define _XRead _XREAD +#define _XReadPad _XREADPAD +#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE +#define _XReply _XREPLY +#define _XSend _XSEND +#define _XUnregisterFilter _XUNREGISTERFILTER +#define _XVIDtoVisual _XVIDTOVISUAL +#define _XmBottomShadowColorDefault _XMBOTTOMSHADOWCOLORDEFAULT +#define _XmClearBorder _XMCLEARBORDER +#define _XmConfigureObject _XMCONFIGUREOBJECT +#define _XmDestroyParentCallback _XMDESTROYPARENTCALLBACK +#define _XmDrawArrow _XMDRAWARROW +#define _XmDrawShadows _XMDRAWSHADOWS +#define _XmFontListGetDefaultFont _XMFONTLISTGETDEFAULTFONT +#define _XmFromHorizontalPixels _XMFROMHORIZONTALPIXELS +#define _XmFromVerticalPixels _XMFROMVERTICALPIXELS +#define _XmGetClassExtensionPtr _XMGETCLASSEXTENSIONPTR +#define _XmGetDefaultFontList _XMGETDEFAULTFONTLIST +#define _XmGetTextualDragIcon _XMGETTEXTUALDRAGICON +#define _XmGetWidgetExtData _XMGETWIDGETEXTDATA +#define _XmGrabKeyboard _XMGRABKEYBOARD +#define _XmGrabPointer _XMGRABPOINTER +#define _XmInheritClass _XMINHERITCLASS +#define _XmInputForGadget _XMINPUTFORGADGET +#define _XmInputInGadget _XMINPUTINGADGET +#define _XmMakeGeometryRequest _XMMAKEGEOMETRYREQUEST +#define _XmMenuPopDown _XMMENUPOPDOWN +#define _XmMoveObject _XMMOVEOBJECT +#define _XmNavigChangeManaged _XMNAVIGCHANGEMANAGED +#define _XmOSBuildFileList _XMOSBUILDFILELIST +#define _XmOSFileCompare _XMOSFILECOMPARE +#define _XmOSFindPatternPart _XMOSFINDPATTERNPART +#define _XmOSQualifyFileSpec _XMOSQUALIFYFILESPEC +#define _XmPostPopupMenu _XMPOSTPOPUPMENU +#define _XmPrimitiveEnter _XMPRIMITIVEENTER +#define _XmPrimitiveLeave _XMPRIMITIVELEAVE +#define _XmRedisplayGadgets _XMREDISPLAYGADGETS +#define _XmShellIsExclusive _XMSHELLISEXCLUSIVE +#define _XmStringDraw _XMSTRINGDRAW +#define _XmStringGetTextConcat _XMSTRINGGETTEXTCONCAT +#define _XmStrings _XMSTRINGS +#define _XmToHorizontalPixels _XMTOHORIZONTALPIXELS +#define _XmToVerticalPixels _XMTOVERTICALPIXELS +#define _XmTopShadowColorDefault _XMTOPSHADOWCOLORDEFAULT +#define _Xm_fastPtr _XM_FASTPTR +#define _XtCheckSubclassFlag _XTCHECKSUBCLASSFLAG +#define _XtCopyFromArg _XTCOPYFROMARG +#define _XtCountVaList _XTCOUNTVALIST +#define _XtInherit _XTINHERIT +#define _XtInheritTranslations _XTINHERITTRANSLATIONS +#define _XtIsSubclassOf _XTISSUBCLASSOF +#define _XtVaToArgList _XTVATOARGLIST +#define applicationShellWidgetClass APPLICATIONSHELLWIDGETCLASS +#define cli$dcl_parse CLI$DCL_PARSE +#define cli$get_value CLI$GET_VALUE +#define cli$present CLI$PRESENT +#define compositeClassRec COMPOSITECLASSREC +#define compositeWidgetClass COMPOSITEWIDGETCLASS +#define constraintClassRec CONSTRAINTCLASSREC +#define constraintWidgetClass CONSTRAINTWIDGETCLASS +#define coreWidgetClass COREWIDGETCLASS +#define exe$getspi EXE$GETSPI +#define lbr$close LBR$CLOSE +#define lbr$get_header LBR$GET_HEADER +#define lbr$get_index LBR$GET_INDEX +#define lbr$get_record LBR$GET_RECORD +#define lbr$ini_control LBR$INI_CONTROL +#define lbr$lookup_key LBR$LOOKUP_KEY +#define lbr$open LBR$OPEN +#define lbr$output_help LBR$OUTPUT_HELP +#define lib$add_times LIB$ADD_TIMES +#define lib$addx LIB$ADDX +#define lib$create_dir LIB$CREATE_DIR +#define lib$create_vm_zone LIB$CREATE_VM_ZONE +#define lib$cvt_from_internal_time LIB$CVT_FROM_INTERNAL_TIME +#define lib$cvt_htb LIB$CVT_HTB +#define lib$cvt_vectim LIB$CVT_VECTIM +#define lib$day LIB$DAY +#define lib$day_of_week LIB$DAY_OF_WEEK +#define lib$delete_symbol LIB$DELETE_SYMBOL +#define lib$delete_vm_zone LIB$DELETE_VM_ZONE +#define lib$disable_ctrl LIB$DISABLE_CTRL +#define lib$ediv LIB$EDIV +#define lib$emul LIB$EMUL +#define lib$enable_ctrl LIB$ENABLE_CTRL +#define lib$find_vm_zone LIB$FIND_VM_ZONE +#define lib$format_date_time LIB$FORMAT_DATE_TIME +#define lib$free_timer LIB$FREE_TIMER +#define lib$free_vm LIB$FREE_VM +#define lib$get_ef LIB$GET_EF +#define lib$get_foreign LIB$GET_FOREIGN +#define lib$get_input LIB$GET_INPUT +#define lib$get_users_language LIB$GET_USERS_LANGUAGE +#define lib$get_vm LIB$GET_VM +#define lib$get_symbol LIB$GET_SYMBOL +#define lib$getdvi LIB$GETDVI +#define lib$init_date_time_context LIB$INIT_DATE_TIME_CONTEXT +#define lib$init_timer LIB$INIT_TIMER +#define lib$find_file LIB$FIND_FILE +#define lib$find_file_end LIB$FIND_FILE_END +#define lib$find_image_symbol LIB$FIND_IMAGE_SYMBOL +#define lib$mult_delta_time LIB$MULT_DELTA_TIME +#define lib$put_output LIB$PUT_OUTPUT +#define lib$rename_file LIB$RENAME_FILE +#define lib$reset_vm_zone LIB$RESET_VM_ZONE +#define lib$set_symbol LIB$SET_SYMBOL +#define lib$sfree1_dd LIB$SFREE1_DD +#define lib$show_vm LIB$SHOW_VM +#define lib$show_vm_zone LIB$SHOW_VM_ZONE +#define lib$spawn LIB$SPAWN +#define lib$stat_timer LIB$STAT_TIMER +#define lib$subx LIB$SUBX +#define lib$sub_times LIB$SUB_TIMES +#define lib$wait LIB$WAIT +#define mail$send_add_address MAIL$SEND_ADD_ADDRESS +#define mail$send_add_attribute MAIL$SEND_ADD_ATTRIBUTE +#define mail$send_add_bodypart MAIL$SEND_ADD_BODYPART +#define mail$send_begin MAIL$SEND_BEGIN +#define mail$send_end MAIL$SEND_END +#define mail$send_message MAIL$SEND_MESSAGE +#define ncs$convert NCS$CONVERT +#define ncs$get_cf NCS$GET_CF +#define objectClass OBJECTCLASS +#define objectClassRec OBJECTCLASSREC +#define overrideShellClassRec OVERRIDESHELLCLASSREC +#define overrideShellWidgetClass OVERRIDESHELLWIDGETCLASS +#define pthread_attr_create PTHREAD_ATTR_CREATE +#define pthread_attr_delete PTHREAD_ATTR_DELETE +#define pthread_attr_destroy PTHREAD_ATTR_DESTROY +#define pthread_attr_getdetach_np PTHREAD_ATTR_GETDETACH_NP +#define pthread_attr_getguardsize_np PTHREAD_ATTR_GETGUARDSIZE_NP +#define pthread_attr_getinheritsched PTHREAD_ATTR_GETINHERITSCHED +#define pthread_attr_getprio PTHREAD_ATTR_GETPRIO +#define pthread_attr_getsched PTHREAD_ATTR_GETSCHED +#define pthread_attr_getschedparam PTHREAD_ATTR_GETSCHEDPARAM +#define pthread_attr_getschedpolicy PTHREAD_ATTR_GETSCHEDPOLICY +#define pthread_attr_getstacksize PTHREAD_ATTR_GETSTACKSIZE +#define pthread_attr_init PTHREAD_ATTR_INIT +#define pthread_attr_setdetach_np PTHREAD_ATTR_SETDETACH_NP +#define pthread_attr_setdetachstate PTHREAD_ATTR_SETDETACHSTATE +#define pthread_attr_setguardsize_np PTHREAD_ATTR_SETGUARDSIZE_NP +#define pthread_attr_setinheritsched PTHREAD_ATTR_SETINHERITSCHED +#define pthread_attr_setprio PTHREAD_ATTR_SETPRIO +#define pthread_attr_setsched PTHREAD_ATTR_SETSCHED +#define pthread_attr_setschedparam PTHREAD_ATTR_SETSCHEDPARAM +#define pthread_attr_setschedpolicy PTHREAD_ATTR_SETSCHEDPOLICY +#ifndef pthread_attr_setscope +# define pthread_attr_setscope PTHREAD_ATTR_SETSCOPE +#endif +#define pthread_attr_setstacksize PTHREAD_ATTR_SETSTACKSIZE +#define pthread_cancel PTHREAD_CANCEL +#define pthread_cancel_e PTHREAD_CANCEL_E +#define pthread_cond_broadcast PTHREAD_COND_BROADCAST +#define pthread_cond_destroy PTHREAD_COND_DESTROY +#define pthread_cond_init PTHREAD_COND_INIT +#define pthread_cond_sig_preempt_int_np PTHREAD_COND_SIG_PREEMPT_INT_NP +#define pthread_cond_signal PTHREAD_COND_SIGNAL +#define pthread_cond_signal_int_np PTHREAD_COND_SIGNAL_INT_NP +#define pthread_cond_timedwait PTHREAD_COND_TIMEDWAIT +#define pthread_cond_wait PTHREAD_COND_WAIT +#define pthread_condattr_create PTHREAD_CONDATTR_CREATE +#define pthread_condattr_delete PTHREAD_CONDATTR_DELETE +#define pthread_condattr_init PTHREAD_CONDATTR_INIT +#define pthread_create PTHREAD_CREATE +#define pthread_delay_np PTHREAD_DELAY_NP +#define pthread_detach PTHREAD_DETACH +#define pthread_equal PTHREAD_EQUAL +#define pthread_exc_fetch_fp_np PTHREAD_EXC_FETCH_FP_NP +#define pthread_exc_handler_np PTHREAD_EXC_HANDLER_NP +#define pthread_exc_matches_np PTHREAD_EXC_MATCHES_NP +#define pthread_exc_pop_ctx_np PTHREAD_EXC_POP_CTX_NP +#define pthread_exc_push_ctx_np PTHREAD_EXC_PUSH_CTX_NP +#define pthread_exc_raise_np PTHREAD_EXC_RAISE_NP +#define pthread_exc_savecontext_np PTHREAD_EXC_SAVECONTEXT_NP +#define pthread_exit PTHREAD_EXIT +#define pthread_get_expiration_np PTHREAD_GET_EXPIRATION_NP +#define pthread_getprio PTHREAD_GETPRIO +#define pthread_getschedparam PTHREAD_GETSCHEDPARAM +#define pthread_getscheduler PTHREAD_GETSCHEDULER +#define pthread_getspecific PTHREAD_GETSPECIFIC +#define pthread_getunique_np PTHREAD_GETUNIQUE_NP +#define pthread_join PTHREAD_JOIN +#define pthread_join32 PTHREAD_JOIN32 +#define pthread_key_create PTHREAD_KEY_CREATE +#define pthread_key_delete PTHREAD_KEY_DELETE +#define pthread_keycreate PTHREAD_KEYCREATE +#define pthread_kill PTHREAD_KILL +#define pthread_lock_global_np PTHREAD_LOCK_GLOBAL_NP +#define pthread_mutex_destroy PTHREAD_MUTEX_DESTROY +#define pthread_mutex_init PTHREAD_MUTEX_INIT +#define pthread_mutex_lock PTHREAD_MUTEX_LOCK +#define pthread_mutex_trylock PTHREAD_MUTEX_TRYLOCK +#define pthread_mutex_unlock PTHREAD_MUTEX_UNLOCK +#define pthread_mutexattr_create PTHREAD_MUTEXATTR_CREATE +#define pthread_mutexattr_delete PTHREAD_MUTEXATTR_DELETE +#define pthread_mutexattr_destroy PTHREAD_MUTEXATTR_DESTROY +#define pthread_mutexattr_getkind_np PTHREAD_MUTEXATTR_GETKIND_NP +#define pthread_mutexattr_init PTHREAD_MUTEXATTR_INIT +#define pthread_mutexattr_setkind_np PTHREAD_MUTEXATTR_SETKIND_NP +#define pthread_mutexattr_settype_np PTHREAD_MUTEXATTR_SETTYPE_NP +#define pthread_once PTHREAD_ONCE +#define pthread_resume_np PTHREAD_RESUME_NP +#define pthread_self PTHREAD_SELF +#define pthread_setasynccancel PTHREAD_SETASYNCCANCEL +#define pthread_setcancel PTHREAD_SETCANCEL +#define pthread_setcancelstate PTHREAD_SETCANCELSTATE +#define pthread_setcanceltype PTHREAD_SETCANCELTYPE +#define pthread_setprio PTHREAD_SETPRIO +#define pthread_setschedparam PTHREAD_SETSCHEDPARAM +#define pthread_setscheduler PTHREAD_SETSCHEDULER +#define pthread_setspecific PTHREAD_SETSPECIFIC +#define pthread_suspend_np PTHREAD_SUSPEND_NP +#define pthread_testcancel PTHREAD_TESTCANCEL +#define pthread_unlock_global_np PTHREAD_UNLOCK_GLOBAL_NP +#define pthread_yield PTHREAD_YIELD +#define pthread_yield_np PTHREAD_YIELD_NP +#define rectObjClass RECTOBJCLASS +#define rectObjClassRec RECTOBJCLASSREC +#define sessionShellWidgetClass SESSIONSHELLWIDGETCLASS +#define shellWidgetClass SHELLWIDGETCLASS +#define shmat SHMAT +#define shmctl SHMCTL +#define shmdt SHMDT +#define shmget SHMGET +#define smg$create_key_table SMG$CREATE_KEY_TABLE +#define smg$create_virtual_keyboard SMG$CREATE_VIRTUAL_KEYBOARD +#define smg$read_composed_line SMG$READ_COMPOSED_LINE +#define sys$add_ident SYS$ADD_IDENT +#define sys$asctoid SYS$ASCTOID +#define sys$assign SYS$ASSIGN +#define sys$bintim SYS$BINTIM +#define sys$cancel SYS$CANCEL +#define sys$cantim SYS$CANTIM +#define sys$check_access SYS$CHECK_ACCESS +#define sys$close SYS$CLOSE +#define sys$connect SYS$CONNECT +#define sys$create SYS$CREATE +#define sys$create_user_profile SYS$CREATE_USER_PROFILE +#define sys$crembx SYS$CREMBX +#define sys$creprc SYS$CREPRC +#define sys$crmpsc SYS$CRMPSC +#define sys$dassgn SYS$DASSGN +#define sys$dclast SYS$DCLAST +#define sys$dclexh SYS$DCLEXH +#define sys$delprc SYS$DELPRC +#define sys$deq SYS$DEQ +#define sys$dgblsc SYS$DGBLSC +#define sys$display SYS$DISPLAY +#define sys$enq SYS$ENQ +#define sys$enqw SYS$ENQW +#define sys$erase SYS$ERASE +#define sys$fao SYS$FAO +#define sys$faol SYS$FAOL +#define sys$find_held SYS$FIND_HELD +#define sys$finish_rdb SYS$FINISH_RDB +#define sys$flush SYS$FLUSH +#define sys$forcex SYS$FORCEX +#define sys$get SYS$GET +#define sys$get_security SYS$GET_SECURITY +#define sys$getdviw SYS$GETDVIW +#define sys$getjpi SYS$GETJPI +#define sys$getjpiw SYS$GETJPIW +#define sys$getlkiw SYS$GETLKIW +#define sys$getmsg SYS$GETMSG +#define sys$getsyi SYS$GETSYI +#define sys$getsyiw SYS$GETSYIW +#define sys$gettim SYS$GETTIM +#define sys$getuai SYS$GETUAI +#define sys$grantid SYS$GRANTID +#define sys$hash_password SYS$HASH_PASSWORD +#define sys$hiber SYS$HIBER +#define sys$mgblsc SYS$MGBLSC +#define sys$numtim SYS$NUMTIM +#define sys$open SYS$OPEN +#define sys$parse SYS$PARSE +#define sys$parse_acl SYS$PARSE_ACL +#define sys$parse_acl SYS$PARSE_ACL +#define sys$persona_assume SYS$PERSONA_ASSUME +#define sys$persona_create SYS$PERSONA_CREATE +#define sys$persona_delete SYS$PERSONA_DELETE +#define sys$process_scan SYS$PROCESS_SCAN +#define sys$put SYS$PUT +#define sys$qio SYS$QIO +#define sys$qiow SYS$QIOW +#define sys$read SYS$READ +#define sys$resched SYS$RESCHED +#define sys$rewind SYS$REWIND +#define sys$search SYS$SEARCH +#define sys$set_security SYS$SET_SECURITY +#define sys$setast SYS$SETAST +#define sys$setef SYS$SETEF +#define sys$setimr SYS$SETIMR +#define sys$setpri SYS$SETPRI +#define sys$setprn SYS$SETPRN +#define sys$setprv SYS$SETPRV +#define sys$setswm SYS$SETSWM +#define sys$setuai SYS$SETUAI +#define sys$sndopr SYS$SNDOPR +#define sys$synch SYS$SYNCH +#define sys$trnlnm SYS$TRNLNM +#define sys$update SYS$UPDATE +#define sys$wake SYS$WAKE +#define sys$write SYS$WRITE +#define topLevelShellClassRec TOPLEVELSHELLCLASSREC +#define topLevelShellWidgetClass TOPLEVELSHELLWIDGETCLASS +#define transientShellWidgetClass TRANSIENTSHELLWIDGETCLASS +#define vendorShellClassRec VENDORSHELLCLASSREC +#define vendorShellWidgetClass VENDORSHELLWIDGETCLASS +#define widgetClass WIDGETCLASS +#define widgetClassRec WIDGETCLASSREC +#define wmShellClassRec WMSHELLCLASSREC +#define wmShellWidgetClass WMSHELLWIDGETCLASS +#define x$soft_ast_lib_lock X$SOFT_AST_LIB_LOCK +#define x$soft_ast_lock_depth X$SOFT_AST_LOCK_DEPTH +#define x$soft_reenable_asts X$SOFT_REENABLE_ASTS +#define xmArrowButtonWidgetClass XMARROWBUTTONWIDGETCLASS +#define xmBulletinBoardWidgetClass XMBULLETINBOARDWIDGETCLASS +#define xmCascadeButtonClassRec XMCASCADEBUTTONCLASSREC +#define xmCascadeButtonGadgetClass XMCASCADEBUTTONGADGETCLASS +#define xmCascadeButtonWidgetClass XMCASCADEBUTTONWIDGETCLASS +#define xmCommandWidgetClass XMCOMMANDWIDGETCLASS +#define xmDialogShellWidgetClass XMDIALOGSHELLWIDGETCLASS +#define xmDrawingAreaWidgetClass XMDRAWINGAREAWIDGETCLASS +#define xmDrawnButtonWidgetClass XMDRAWNBUTTONWIDGETCLASS +#define xmFileSelectionBoxWidgetClass XMFILESELECTIONBOXWIDGETCLASS +#define xmFormWidgetClass XMFORMWIDGETCLASS +#define xmFrameWidgetClass XMFRAMEWIDGETCLASS +#define xmGadgetClass XMGADGETCLASS +#define xmLabelGadgetClass XMLABELGADGETCLASS +#define xmLabelWidgetClass XMLABELWIDGETCLASS +#define xmListWidgetClass XMLISTWIDGETCLASS +#define xmMainWindowWidgetClass XMMAINWINDOWWIDGETCLASS +#define xmManagerClassRec XMMANAGERCLASSREC +#define xmManagerWidgetClass XMMANAGERWIDGETCLASS +#define xmMenuShellWidgetClass XMMENUSHELLWIDGETCLASS +#define xmMessageBoxWidgetClass XMMESSAGEBOXWIDGETCLASS +#define xmPrimitiveClassRec XMPRIMITIVECLASSREC +#define xmPrimitiveWidgetClass XMPRIMITIVEWIDGETCLASS +#define xmPushButtonClassRec XMPUSHBUTTONCLASSREC +#define xmPushButtonGadgetClass XMPUSHBUTTONGADGETCLASS +#define xmPushButtonWidgetClass XMPUSHBUTTONWIDGETCLASS +#define xmRowColumnWidgetClass XMROWCOLUMNWIDGETCLASS +#define xmSashWidgetClass XMSASHWIDGETCLASS +#define xmScaleWidgetClass XMSCALEWIDGETCLASS +#define xmScrollBarWidgetClass XMSCROLLBARWIDGETCLASS +#define xmScrolledWindowClassRec XMSCROLLEDWINDOWCLASSREC +#define xmScrolledWindowWidgetClass XMSCROLLEDWINDOWWIDGETCLASS +#define xmSeparatorGadgetClass XMSEPARATORGADGETCLASS +#define xmSeparatorWidgetClass XMSEPARATORWIDGETCLASS +#define xmTextFieldWidgetClass XMTEXTFIELDWIDGETCLASS +#define xmTextWidgetClass XMTEXTWIDGETCLASS +#define xmToggleButtonGadgetClass XMTOGGLEBUTTONGADGETCLASS +#define xmToggleButtonWidgetClass XMTOGGLEBUTTONWIDGETCLASS + +#if (__VMS_VER < 80200000) +# define SetReqLen(req,n,badlen) \ + if ((req->length + n) > (unsigned)65535) { \ + n = badlen; \ + req->length += n; \ + } else \ + req->length += n +#endif + +#ifdef __cplusplus +extern "C" { +#endif +extern void XtFree(char*); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/volume.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/volume.h new file mode 100644 index 0000000000..fd6a8370e0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/volume.h @@ -0,0 +1,145 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/volume.h +// Purpose: wxFSVolume - encapsulates system volume information +// Author: George Policello +// Modified by: +// Created: 28 Jan 02 +// Copyright: (c) 2002 George Policello +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// wxFSVolume represents a volume/drive in a file system +// ---------------------------------------------------------------------------- + +#ifndef _WX_FSVOLUME_H_ +#define _WX_FSVOLUME_H_ + +#include "wx/defs.h" + +#if wxUSE_FSVOLUME + +#include "wx/arrstr.h" + +// the volume flags +enum wxFSVolumeFlags +{ + // is the volume mounted? + wxFS_VOL_MOUNTED = 0x0001, + + // is the volume removable (floppy, CD, ...)? + wxFS_VOL_REMOVABLE = 0x0002, + + // read only? (otherwise read write) + wxFS_VOL_READONLY = 0x0004, + + // network resources + wxFS_VOL_REMOTE = 0x0008 +}; + +// the volume types +enum wxFSVolumeKind +{ + wxFS_VOL_FLOPPY, + wxFS_VOL_DISK, + wxFS_VOL_CDROM, + wxFS_VOL_DVDROM, + wxFS_VOL_NETWORK, + wxFS_VOL_OTHER, + wxFS_VOL_MAX +}; + +class WXDLLIMPEXP_BASE wxFSVolumeBase +{ +public: + // return the array containing the names of the volumes + // + // only the volumes with the flags such that + // (flags & flagsSet) == flagsSet && !(flags & flagsUnset) + // are returned (by default, all mounted ones) + static wxArrayString GetVolumes(int flagsSet = wxFS_VOL_MOUNTED, + int flagsUnset = 0); + + // stop execution of GetVolumes() called previously (should be called from + // another thread, of course) + static void CancelSearch(); + + // create the volume object with this name (should be one of those returned + // by GetVolumes()). + wxFSVolumeBase(); + wxFSVolumeBase(const wxString& name); + bool Create(const wxString& name); + + // accessors + // --------- + + // is this a valid volume? + bool IsOk() const; + + // kind of this volume? + wxFSVolumeKind GetKind() const; + + // flags of this volume? + int GetFlags() const; + + // can we write to this volume? + bool IsWritable() const { return !(GetFlags() & wxFS_VOL_READONLY); } + + // get the name of the volume and the name which should be displayed to the + // user + wxString GetName() const { return m_volName; } + wxString GetDisplayName() const { return m_dispName; } + + // TODO: operatios (Mount(), Unmount(), Eject(), ...)? + +protected: + // the internal volume name + wxString m_volName; + + // the volume name as it is displayed to the user + wxString m_dispName; + + // have we been initialized correctly? + bool m_isOk; +}; + +#if wxUSE_GUI + +#include "wx/icon.h" +#include "wx/iconbndl.h" // only for wxIconArray + +enum wxFSIconType +{ + wxFS_VOL_ICO_SMALL = 0, + wxFS_VOL_ICO_LARGE, + wxFS_VOL_ICO_SEL_SMALL, + wxFS_VOL_ICO_SEL_LARGE, + wxFS_VOL_ICO_MAX +}; + +// wxFSVolume adds GetIcon() to wxFSVolumeBase +class WXDLLIMPEXP_CORE wxFSVolume : public wxFSVolumeBase +{ +public: + wxFSVolume() : wxFSVolumeBase() { InitIcons(); } + wxFSVolume(const wxString& name) : wxFSVolumeBase(name) { InitIcons(); } + + wxIcon GetIcon(wxFSIconType type) const; + +private: + void InitIcons(); + + // the different icons for this volume (created on demand) + wxIconArray m_icons; +}; + +#else // !wxUSE_GUI + +// wxFSVolume is the same thing as wxFSVolume in wxBase +typedef wxFSVolumeBase wxFSVolume; + +#endif // wxUSE_GUI/!wxUSE_GUI + +#endif // wxUSE_FSVOLUME + +#endif // _WX_FSVOLUME_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/vscroll.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/vscroll.h new file mode 100644 index 0000000000..2312d78f0b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/vscroll.h @@ -0,0 +1,871 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/vscroll.h +// Purpose: Variable scrolled windows (wx[V/H/HV]ScrolledWindow) +// Author: Vadim Zeitlin +// Modified by: Brad Anderson, Bryan Petty +// Created: 30.05.03 +// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_VSCROLL_H_ +#define _WX_VSCROLL_H_ + +#include "wx/panel.h" +#include "wx/position.h" +#include "wx/scrolwin.h" + +class WXDLLIMPEXP_FWD_CORE wxVarScrollHelperEvtHandler; + + +// Using the same techniques as the wxScrolledWindow class | +// hierarchy, the wx[V/H/HV]ScrolledWindow classes are slightly | +// more complex (compare with the diagram outlined in | +// scrolwin.h) for the purpose of reducing code duplication | +// through the use of mix-in classes. | +// | +// wxAnyScrollHelperBase | +// | | +// | | +// | | +// V | +// wxVarScrollHelperBase | +// / \ | +// / \ | +// V V | +// wxVarHScrollHelper wxVarVScrollHelper | +// | \ / | | +// | \ / | | +// | V V | | +// | wxVarHVScrollHelper | | +// | | | | +// | | V | +// | wxPanel | wxVarVScrollLegacyAdaptor | +// | / \ \ | | | +// | / \ `-----|----------. | | +// | / \ | \ | | +// | / \ | \ | | +// V V \ | V V | +// wxHScrolledWindow \ | wxVScrolledWindow | +// V V | +// wxHVScrolledWindow | +// | +// | +// Border added to suppress GCC multi-line comment warnings ->| + + +// =========================================================================== +// wxVarScrollHelperBase +// =========================================================================== + +// Provides all base common scroll calculations needed for either orientation, +// automatic scrollbar functionality, saved scroll positions, functionality +// for changing the target window to be scrolled, as well as defining all +// required virtual functions that need to be implemented for any orientation +// specific work. + +class WXDLLIMPEXP_CORE wxVarScrollHelperBase : public wxAnyScrollHelperBase +{ +public: + // constructors and such + // --------------------- + + wxVarScrollHelperBase(wxWindow *winToScroll); + virtual ~wxVarScrollHelperBase(); + + // operations + // ---------- + + // with physical scrolling on, the device origin is changed properly when + // a wxPaintDC is prepared, children are actually moved and laid out + // properly, and the contents of the window (pixels) are actually moved + void EnablePhysicalScrolling(bool scrolling = true) + { m_physicalScrolling = scrolling; } + + // wxNOT_FOUND if none, i.e. if it is below the last item + int VirtualHitTest(wxCoord coord) const; + + // recalculate all our parameters and redisplay all units + virtual void RefreshAll(); + + // accessors + // --------- + + // get the first currently visible unit + size_t GetVisibleBegin() const { return m_unitFirst; } + + // get the last currently visible unit + size_t GetVisibleEnd() const + { return m_unitFirst + m_nUnitsVisible; } + + // is this unit currently visible? + bool IsVisible(size_t unit) const + { return unit >= m_unitFirst && unit < GetVisibleEnd(); } + + // translate between scrolled and unscrolled coordinates + int CalcScrolledPosition(int coord) const + { return DoCalcScrolledPosition(coord); } + int CalcUnscrolledPosition(int coord) const + { return DoCalcUnscrolledPosition(coord); } + + virtual int DoCalcScrolledPosition(int coord) const; + virtual int DoCalcUnscrolledPosition(int coord) const; + + // update the thumb size shown by the scrollbar + virtual void UpdateScrollbar(); + void RemoveScrollbar(); + + // Normally the wxScrolledWindow will scroll itself, but in some rare + // occasions you might want it to scroll [part of] another window (e.g. a + // child of it in order to scroll only a portion the area between the + // scrollbars (spreadsheet: only cell area will move). + virtual void SetTargetWindow(wxWindow *target); + + // change the DC origin according to the scroll position. To properly + // forward calls to wxWindow::Layout use WX_FORWARD_TO_SCROLL_HELPER() + // derived class + virtual void DoPrepareDC(wxDC& dc); + + // the methods to be called from the window event handlers + void HandleOnScroll(wxScrollWinEvent& event); + void HandleOnSize(wxSizeEvent& event); +#if wxUSE_MOUSEWHEEL + void HandleOnMouseWheel(wxMouseEvent& event); +#endif // wxUSE_MOUSEWHEEL + + // these functions must be overidden in the derived class to return + // orientation specific data (e.g. the width for vertically scrolling + // derivatives in the case of GetOrientationTargetSize()) + virtual int GetOrientationTargetSize() const = 0; + virtual int GetNonOrientationTargetSize() const = 0; + virtual wxOrientation GetOrientation() const = 0; + +protected: + // all *Unit* functions are protected to be exposed by + // wxVarScrollHelperBase implementations (with appropriate names) + + // get the number of units this window contains (previously set by + // SetUnitCount()) + size_t GetUnitCount() const { return m_unitMax; } + + // set the number of units the helper contains: the derived class must + // provide the sizes for all units with indices up to the one given here + // in its OnGetUnitSize() + void SetUnitCount(size_t count); + + // redraw the specified unit + virtual void RefreshUnit(size_t unit); + + // redraw all units in the specified range (inclusive) + virtual void RefreshUnits(size_t from, size_t to); + + // scroll to the specified unit: it will become the first visible unit in + // the window + // + // return true if we scrolled the window, false if nothing was done + bool DoScrollToUnit(size_t unit); + + // scroll by the specified number of units/pages + virtual bool DoScrollUnits(int units); + virtual bool DoScrollPages(int pages); + + // this function must be overridden in the derived class and it should + // return the size of the given unit in pixels + virtual wxCoord OnGetUnitSize(size_t n) const = 0; + + // this function doesn't have to be overridden but it may be useful to do + // it if calculating the units' sizes is a relatively expensive operation + // as it gives the user code a possibility to calculate several of them at + // once + // + // OnGetUnitsSizeHint() is normally called just before OnGetUnitSize() but + // you shouldn't rely on the latter being called for all units in the + // interval specified here. It is also possible that OnGetUnitHeight() will + // be called for the units outside of this interval, so this is really just + // a hint, not a promise. + // + // finally note that unitMin is inclusive, while unitMax is exclusive, as + // usual + virtual void OnGetUnitsSizeHint(size_t WXUNUSED(unitMin), + size_t WXUNUSED(unitMax)) const + { } + + // when the number of units changes, we try to estimate the total size + // of all units which is a rather expensive operation in terms of unit + // access, so if the user code may estimate the average size + // better/faster than we do, it should override this function to implement + // its own logic + // + // this function should return the best guess for the total size it may + // make + virtual wxCoord EstimateTotalSize() const { return DoEstimateTotalSize(); } + + wxCoord DoEstimateTotalSize() const; + + // find the index of the unit we need to show to fit the specified unit on + // the opposite side either fully or partially (depending on fullyVisible) + size_t FindFirstVisibleFromLast(size_t last, + bool fullyVisible = false) const; + + // get the total size of the units between unitMin (inclusive) and + // unitMax (exclusive) + wxCoord GetUnitsSize(size_t unitMin, size_t unitMax) const; + + // get the offset of the first visible unit + wxCoord GetScrollOffset() const + { return GetUnitsSize(0, GetVisibleBegin()); } + + // get the size of the target window + wxSize GetTargetSize() const { return m_targetWindow->GetClientSize(); } + + void GetTargetSize(int *w, int *h) + { + wxSize size = GetTargetSize(); + if ( w ) + *w = size.x; + if ( h ) + *h = size.y; + } + + // calculate the new scroll position based on scroll event type + size_t GetNewScrollPosition(wxScrollWinEvent& event) const; + + // replacement implementation of wxWindow::Layout virtual method. To + // properly forward calls to wxWindow::Layout use + // WX_FORWARD_TO_SCROLL_HELPER() derived class + bool ScrollLayout(); + +#ifdef __WXMAC__ + // queue mac window update after handling scroll event + virtual void UpdateMacScrollWindow() { } +#endif // __WXMAC__ + + // change the target window + void DoSetTargetWindow(wxWindow *target); + + // delete the event handler we installed + void DeleteEvtHandler(); + + // helper function abstracting the orientation test: with vertical + // orientation, it assigns the first value to x and the second one to y, + // with horizontal orientation it reverses them, i.e. the first value is + // assigned to y and the second one to x + void AssignOrient(wxCoord& x, wxCoord& y, wxCoord first, wxCoord second); + + // similar to "oriented assignment" above but does "oriented increment": + // for vertical orientation, y is incremented by the given value and x if + // left unchanged, for horizontal orientation x is incremented + void IncOrient(wxCoord& x, wxCoord& y, wxCoord inc); + +private: + // the total number of (logical) units + size_t m_unitMax; + + // the total (estimated) size + wxCoord m_sizeTotal; + + // the first currently visible unit + size_t m_unitFirst; + + // the number of currently visible units (including the last, possibly only + // partly, visible one) + size_t m_nUnitsVisible; + + // accumulated mouse wheel rotation +#if wxUSE_MOUSEWHEEL + int m_sumWheelRotation; +#endif + + // do child scrolling (used in DoPrepareDC()) + bool m_physicalScrolling; + + // handler injected into target window to forward some useful events to us + wxVarScrollHelperEvtHandler *m_handler; +}; + + + +// =========================================================================== +// wxVarVScrollHelper +// =========================================================================== + +// Provides public API functions targeted for vertical-specific scrolling, +// wrapping the functionality of wxVarScrollHelperBase. + +class WXDLLIMPEXP_CORE wxVarVScrollHelper : public wxVarScrollHelperBase +{ +public: + // constructors and such + // --------------------- + + // ctor must be given the associated window + wxVarVScrollHelper(wxWindow *winToScroll) + : wxVarScrollHelperBase(winToScroll) + { + } + + // operators + + void SetRowCount(size_t rowCount) { SetUnitCount(rowCount); } + bool ScrollToRow(size_t row) { return DoScrollToUnit(row); } + + virtual bool ScrollRows(int rows) + { return DoScrollUnits(rows); } + virtual bool ScrollRowPages(int pages) + { return DoScrollPages(pages); } + + virtual void RefreshRow(size_t row) + { RefreshUnit(row); } + virtual void RefreshRows(size_t from, size_t to) + { RefreshUnits(from, to); } + + // accessors + + size_t GetRowCount() const { return GetUnitCount(); } + size_t GetVisibleRowsBegin() const { return GetVisibleBegin(); } + size_t GetVisibleRowsEnd() const { return GetVisibleEnd(); } + bool IsRowVisible(size_t row) const { return IsVisible(row); } + + virtual int GetOrientationTargetSize() const + { return GetTargetWindow()->GetClientSize().y; } + virtual int GetNonOrientationTargetSize() const + { return GetTargetWindow()->GetClientSize().x; } + virtual wxOrientation GetOrientation() const { return wxVERTICAL; } + +protected: + // this function must be overridden in the derived class and it should + // return the size of the given row in pixels + virtual wxCoord OnGetRowHeight(size_t n) const = 0; + wxCoord OnGetUnitSize(size_t n) const { return OnGetRowHeight(n); } + + virtual void OnGetRowsHeightHint(size_t WXUNUSED(rowMin), + size_t WXUNUSED(rowMax)) const { } + + // forward calls to OnGetRowsHeightHint() + virtual void OnGetUnitsSizeHint(size_t unitMin, size_t unitMax) const + { OnGetRowsHeightHint(unitMin, unitMax); } + + // again, if not overridden, it will fall back on default method + virtual wxCoord EstimateTotalHeight() const + { return DoEstimateTotalSize(); } + + // forward calls to EstimateTotalHeight() + virtual wxCoord EstimateTotalSize() const { return EstimateTotalHeight(); } + + wxCoord GetRowsHeight(size_t rowMin, size_t rowMax) const + { return GetUnitsSize(rowMin, rowMax); } +}; + + + +// =========================================================================== +// wxVarHScrollHelper +// =========================================================================== + +// Provides public API functions targeted for horizontal-specific scrolling, +// wrapping the functionality of wxVarScrollHelperBase. + +class WXDLLIMPEXP_CORE wxVarHScrollHelper : public wxVarScrollHelperBase +{ +public: + // constructors and such + // --------------------- + + // ctor must be given the associated window + wxVarHScrollHelper(wxWindow *winToScroll) + : wxVarScrollHelperBase(winToScroll) + { + } + + // operators + + void SetColumnCount(size_t columnCount) + { SetUnitCount(columnCount); } + + bool ScrollToColumn(size_t column) + { return DoScrollToUnit(column); } + virtual bool ScrollColumns(int columns) + { return DoScrollUnits(columns); } + virtual bool ScrollColumnPages(int pages) + { return DoScrollPages(pages); } + + virtual void RefreshColumn(size_t column) + { RefreshUnit(column); } + virtual void RefreshColumns(size_t from, size_t to) + { RefreshUnits(from, to); } + + // accessors + + size_t GetColumnCount() const + { return GetUnitCount(); } + size_t GetVisibleColumnsBegin() const + { return GetVisibleBegin(); } + size_t GetVisibleColumnsEnd() const + { return GetVisibleEnd(); } + bool IsColumnVisible(size_t column) const + { return IsVisible(column); } + + + virtual int GetOrientationTargetSize() const + { return GetTargetWindow()->GetClientSize().x; } + virtual int GetNonOrientationTargetSize() const + { return GetTargetWindow()->GetClientSize().y; } + virtual wxOrientation GetOrientation() const { return wxHORIZONTAL; } + +protected: + // this function must be overridden in the derived class and it should + // return the size of the given column in pixels + virtual wxCoord OnGetColumnWidth(size_t n) const = 0; + wxCoord OnGetUnitSize(size_t n) const { return OnGetColumnWidth(n); } + + virtual void OnGetColumnsWidthHint(size_t WXUNUSED(columnMin), + size_t WXUNUSED(columnMax)) const + { } + + // forward calls to OnGetColumnsWidthHint() + virtual void OnGetUnitsSizeHint(size_t unitMin, size_t unitMax) const + { OnGetColumnsWidthHint(unitMin, unitMax); } + + // again, if not overridden, it will fall back on default method + virtual wxCoord EstimateTotalWidth() const { return DoEstimateTotalSize(); } + + // forward calls to EstimateTotalWidth() + virtual wxCoord EstimateTotalSize() const { return EstimateTotalWidth(); } + + wxCoord GetColumnsWidth(size_t columnMin, size_t columnMax) const + { return GetUnitsSize(columnMin, columnMax); } +}; + + + +// =========================================================================== +// wxVarHVScrollHelper +// =========================================================================== + +// Provides public API functions targeted at functions with similar names in +// both wxVScrollHelper and wxHScrollHelper so class scope doesn't need to be +// specified (since we are using multiple inheritance). It also provides +// functions to make changing values for both orientations at the same time +// easier. + +class WXDLLIMPEXP_CORE wxVarHVScrollHelper : public wxVarVScrollHelper, + public wxVarHScrollHelper +{ +public: + // constructors and such + // --------------------- + + // ctor must be given the associated window + wxVarHVScrollHelper(wxWindow *winToScroll) + : wxVarVScrollHelper(winToScroll), wxVarHScrollHelper(winToScroll) { } + + // operators + // --------- + + // set the number of units the window contains for each axis: the derived + // class must provide the widths and heights for all units with indices up + // to each of the one given here in its OnGetColumnWidth() and + // OnGetRowHeight() + void SetRowColumnCount(size_t rowCount, size_t columnCount); + + + // with physical scrolling on, the device origin is changed properly when + // a wxPaintDC is prepared, children are actually moved and laid out + // properly, and the contents of the window (pixels) are actually moved + void EnablePhysicalScrolling(bool vscrolling = true, bool hscrolling = true) + { + wxVarVScrollHelper::EnablePhysicalScrolling(vscrolling); + wxVarHScrollHelper::EnablePhysicalScrolling(hscrolling); + } + + // scroll to the specified row/column: it will become the first visible + // cell in the window + // + // return true if we scrolled the window, false if nothing was done + bool ScrollToRowColumn(size_t row, size_t column); + bool ScrollToRowColumn(const wxPosition &pos) + { return ScrollToRowColumn(pos.GetRow(), pos.GetColumn()); } + + // redraw the specified cell + virtual void RefreshRowColumn(size_t row, size_t column); + virtual void RefreshRowColumn(const wxPosition &pos) + { RefreshRowColumn(pos.GetRow(), pos.GetColumn()); } + + // redraw the specified regions (inclusive). If the target window for + // both orientations is the same the rectangle of cells is refreshed; if + // the target windows differ the entire client size opposite the + // orientation direction is refreshed between the specified limits + virtual void RefreshRowsColumns(size_t fromRow, size_t toRow, + size_t fromColumn, size_t toColumn); + virtual void RefreshRowsColumns(const wxPosition& from, + const wxPosition& to) + { + RefreshRowsColumns(from.GetRow(), to.GetRow(), + from.GetColumn(), to.GetColumn()); + } + + // locate the virtual position from the given device coordinates + wxPosition VirtualHitTest(wxCoord x, wxCoord y) const; + wxPosition VirtualHitTest(const wxPoint &pos) const + { return VirtualHitTest(pos.x, pos.y); } + + // change the DC origin according to the scroll position. To properly + // forward calls to wxWindow::Layout use WX_FORWARD_TO_SCROLL_HELPER() + // derived class. We use this version to call both base classes' + // DoPrepareDC() + virtual void DoPrepareDC(wxDC& dc); + + // replacement implementation of wxWindow::Layout virtual method. To + // properly forward calls to wxWindow::Layout use + // WX_FORWARD_TO_SCROLL_HELPER() derived class. We use this version to + // call both base classes' ScrollLayout() + bool ScrollLayout(); + + // accessors + // --------- + + // get the number of units this window contains (previously set by + // Set[Column/Row/RowColumn/Unit]Count()) + wxSize GetRowColumnCount() const; + + // get the first currently visible units + wxPosition GetVisibleBegin() const; + wxPosition GetVisibleEnd() const; + + // is this cell currently visible? + bool IsVisible(size_t row, size_t column) const; + bool IsVisible(const wxPosition &pos) const + { return IsVisible(pos.GetRow(), pos.GetColumn()); } +}; + + + +#if WXWIN_COMPATIBILITY_2_8 + +// =========================================================================== +// wxVarVScrollLegacyAdaptor +// =========================================================================== + +// Provides backwards compatible API for applications originally built using +// wxVScrolledWindow in 2.6 or 2.8. Originally, wxVScrolledWindow referred +// to scrolling "lines". We use "units" in wxVarScrollHelperBase to avoid +// implying any orientation (since the functions are used for both horizontal +// and vertical scrolling in derived classes). And in the new +// wxVScrolledWindow and wxHScrolledWindow classes, we refer to them as +// "rows" and "columns", respectively. This is to help clear some confusion +// in not only those classes, but also in wxHVScrolledWindow where functions +// are inherited from both. + +class WXDLLIMPEXP_CORE wxVarVScrollLegacyAdaptor : public wxVarVScrollHelper +{ +public: + // constructors and such + // --------------------- + wxVarVScrollLegacyAdaptor(wxWindow *winToScroll) + : wxVarVScrollHelper(winToScroll) + { + } + + // accessors + // --------- + + // this is the same as GetVisibleRowsBegin(), exists to match + // GetLastVisibleLine() and for backwards compatibility only + wxDEPRECATED( size_t GetFirstVisibleLine() const ); + + // get the last currently visible line + // + // this function is unsafe as it returns (size_t)-1 (i.e. a huge positive + // number) if the control is empty, use GetVisibleRowsEnd() instead, this + // one is kept for backwards compatibility + wxDEPRECATED( size_t GetLastVisibleLine() const ); + + // "line" to "unit" compatibility functions + // ---------------------------------------- + + // get the number of lines this window contains (set by SetLineCount()) + wxDEPRECATED( size_t GetLineCount() const ); + + // set the number of lines the helper contains: the derived class must + // provide the sizes for all lines with indices up to the one given here + // in its OnGetLineHeight() + wxDEPRECATED( void SetLineCount(size_t count) ); + + // redraw the specified line + wxDEPRECATED( virtual void RefreshLine(size_t line) ); + + // redraw all lines in the specified range (inclusive) + wxDEPRECATED( virtual void RefreshLines(size_t from, size_t to) ); + + // scroll to the specified line: it will become the first visible line in + // the window + // + // return true if we scrolled the window, false if nothing was done + wxDEPRECATED( bool ScrollToLine(size_t line) ); + + // scroll by the specified number of lines/pages + wxDEPRECATED( virtual bool ScrollLines(int lines) ); + wxDEPRECATED( virtual bool ScrollPages(int pages) ); + +protected: + // unless the code has been updated to override OnGetRowHeight() instead, + // this function must be overridden in the derived class and it should + // return the height of the given row in pixels + wxDEPRECATED_BUT_USED_INTERNALLY( + virtual wxCoord OnGetLineHeight(size_t n) const ); + + // forwards the calls from base class pure virtual function to pure virtual + // OnGetLineHeight instead (backwards compatible name) + // note that we don't need to forward OnGetUnitSize() as it is already + // forwarded to OnGetRowHeight() in wxVarVScrollHelper + virtual wxCoord OnGetRowHeight(size_t n) const; + + // this function doesn't have to be overridden but it may be useful to do + // it if calculating the lines heights is a relatively expensive operation + // as it gives the user code a possibility to calculate several of them at + // once + // + // OnGetLinesHint() is normally called just before OnGetLineHeight() but you + // shouldn't rely on the latter being called for all lines in the interval + // specified here. It is also possible that OnGetLineHeight() will be + // called for the lines outside of this interval, so this is really just a + // hint, not a promise. + // + // finally note that lineMin is inclusive, while lineMax is exclusive, as + // usual + wxDEPRECATED_BUT_USED_INTERNALLY( virtual void OnGetLinesHint( + size_t lineMin, size_t lineMax) const ); + + // forwards the calls from base class pure virtual function to pure virtual + // OnGetLinesHint instead (backwards compatible name) + void OnGetRowsHeightHint(size_t rowMin, size_t rowMax) const; +}; + +#else // !WXWIN_COMPATIBILITY_2_8 + +// shortcut to avoid checking compatibility modes later +// remove this and all references to wxVarVScrollLegacyAdaptor once +// wxWidgets 2.6 and 2.8 compatibility is removed +typedef wxVarVScrollHelper wxVarVScrollLegacyAdaptor; + +#endif // WXWIN_COMPATIBILITY_2_8/!WXWIN_COMPATIBILITY_2_8 + + +// this macro must be used in declaration of wxVarScrollHelperBase-derived +// classes +#define WX_FORWARD_TO_VAR_SCROLL_HELPER() \ +public: \ + virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); } \ + virtual bool Layout() { return ScrollLayout(); } + + + +// =========================================================================== +// wxVScrolledWindow +// =========================================================================== + +// In the name of this class, "V" may stand for "variable" because it can be +// used for scrolling rows of variable heights; "virtual", because it is not +// necessary to know the heights of all rows in advance -- only those which +// are shown on the screen need to be measured; or even "vertical", because +// this class only supports scrolling vertically. + +// In any case, this is a generalization of the wxScrolledWindow class which +// can be only used when all rows have the same heights. It lacks some other +// wxScrolledWindow features however, notably it can't scroll only a rectangle +// of the window and not its entire client area. + +class WXDLLIMPEXP_CORE wxVScrolledWindow : public wxPanel, + public wxVarVScrollLegacyAdaptor +{ +public: + // constructors and such + // --------------------- + + // default ctor, you must call Create() later + wxVScrolledWindow() : wxVarVScrollLegacyAdaptor(this) { } + + // normal ctor, no need to call Create() after this one + // + // note that wxVSCROLL is always automatically added to our style, there is + // no need to specify it explicitly + wxVScrolledWindow(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + : wxVarVScrollLegacyAdaptor(this) + { + (void)Create(parent, id, pos, size, style, name); + } + + // same as the previous ctor but returns status code: true if ok + // + // just as with the ctor above, wxVSCROLL style is always used, there is no + // need to specify it + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + { + return wxPanel::Create(parent, id, pos, size, style | wxVSCROLL, name); + } + +#if WXWIN_COMPATIBILITY_2_8 + // Make sure we prefer our version of HitTest rather than wxWindow's + // These functions should no longer be masked in favor of VirtualHitTest() + int HitTest(wxCoord WXUNUSED(x), wxCoord y) const + { return wxVarVScrollHelper::VirtualHitTest(y); } + int HitTest(const wxPoint& pt) const + { return HitTest(pt.x, pt.y); } +#endif // WXWIN_COMPATIBILITY_2_8 + + WX_FORWARD_TO_VAR_SCROLL_HELPER() + +#ifdef __WXMAC__ +protected: + virtual void UpdateMacScrollWindow() { Update(); } +#endif // __WXMAC__ + +private: + wxDECLARE_NO_COPY_CLASS(wxVScrolledWindow); + DECLARE_ABSTRACT_CLASS(wxVScrolledWindow) +}; + + + +// =========================================================================== +// wxHScrolledWindow +// =========================================================================== + +// In the name of this class, "H" stands for "horizontal" because it can be +// used for scrolling columns of variable widths. It is not necessary to know +// the widths of all columns in advance -- only those which are shown on the +// screen need to be measured. + +// This is a generalization of the wxScrolledWindow class which can be only +// used when all columns have the same width. It lacks some other +// wxScrolledWindow features however, notably it can't scroll only a rectangle +// of the window and not its entire client area. + +class WXDLLIMPEXP_CORE wxHScrolledWindow : public wxPanel, + public wxVarHScrollHelper +{ +public: + // constructors and such + // --------------------- + + // default ctor, you must call Create() later + wxHScrolledWindow() : wxVarHScrollHelper(this) { } + + // normal ctor, no need to call Create() after this one + // + // note that wxHSCROLL is always automatically added to our style, there is + // no need to specify it explicitly + wxHScrolledWindow(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + : wxVarHScrollHelper(this) + { + (void)Create(parent, id, pos, size, style, name); + } + + // same as the previous ctor but returns status code: true if ok + // + // just as with the ctor above, wxHSCROLL style is always used, there is no + // need to specify it + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + { + return wxPanel::Create(parent, id, pos, size, style | wxHSCROLL, name); + } + + WX_FORWARD_TO_VAR_SCROLL_HELPER() + +#ifdef __WXMAC__ +protected: + virtual void UpdateMacScrollWindow() { Update(); } +#endif // __WXMAC__ + +private: + wxDECLARE_NO_COPY_CLASS(wxHScrolledWindow); + DECLARE_ABSTRACT_CLASS(wxHScrolledWindow) +}; + + + +// =========================================================================== +// wxHVScrolledWindow +// =========================================================================== + +// This window inherits all functionality of both vertical and horizontal +// scrolled windows automatically handling everything needed to scroll both +// axis simultaneously. + +class WXDLLIMPEXP_CORE wxHVScrolledWindow : public wxPanel, + public wxVarHVScrollHelper +{ +public: + // constructors and such + // --------------------- + + // default ctor, you must call Create() later + wxHVScrolledWindow() + : wxPanel(), + wxVarHVScrollHelper(this) { } + + // normal ctor, no need to call Create() after this one + // + // note that wxVSCROLL and wxHSCROLL are always automatically added to our + // style, there is no need to specify them explicitly + wxHVScrolledWindow(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + : wxPanel(), + wxVarHVScrollHelper(this) + { + (void)Create(parent, id, pos, size, style, name); + } + + // same as the previous ctor but returns status code: true if ok + // + // just as with the ctor above, wxVSCROLL and wxHSCROLL styles are always + // used, there is no need to specify them + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + { + return wxPanel::Create(parent, id, pos, size, + style | wxVSCROLL | wxHSCROLL, name); + } + + WX_FORWARD_TO_VAR_SCROLL_HELPER() + +#ifdef __WXMAC__ +protected: + virtual void UpdateMacScrollWindow() { Update(); } +#endif // __WXMAC__ + +private: + wxDECLARE_NO_COPY_CLASS(wxHVScrolledWindow); + DECLARE_ABSTRACT_CLASS(wxHVScrolledWindow) +}; + +#endif // _WX_VSCROLL_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/weakref.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/weakref.h new file mode 100644 index 0000000000..b692f037e8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/weakref.h @@ -0,0 +1,352 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/weakref.h +// Purpose: wxWeakRef - Generic weak references for wxWidgets +// Author: Arne Steinarson +// Created: 27 Dec 07 +// Copyright: (c) 2007 Arne Steinarson +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WEAKREF_H_ +#define _WX_WEAKREF_H_ + +#include "wx/tracker.h" + + +// Some compilers (VC6, Borland, g++ < 3.3) have problem with template specialization. +// However, this is only used for optimization purposes (a smaller wxWeakRef pointer) +// (and the corner case of wxWeakRef<wxObject>). So for those compilers, we can fall +// back to the non-optimal case, where we use the same type of weak ref (static one) +// in all cases. See defs.h for various setting these defines depending on compiler. + +#if !defined(HAVE_PARTIAL_SPECIALIZATION) || \ + !defined(HAVE_TEMPLATE_OVERLOAD_RESOLUTION) || \ + (defined(__GNUC__) && !wxCHECK_GCC_VERSION(3, 3)) + #define USE_ONLY_STATIC_WEAKREF +#endif + + +#ifndef USE_ONLY_STATIC_WEAKREF + +// Avoid including this for simpler compilers +#include "wx/meta/convertible.h" +#include "wx/meta/int2type.h" + +template <class T> +struct wxIsStaticTrackable +{ + enum { value = wxConvertibleTo<T, wxTrackable>::value }; +}; + +#endif // !USE_ONLY_STATIC_WEAKREF + + +// Weak ref implementation when T has wxTrackable as a known base class +template <class T> +class wxWeakRefStatic : public wxTrackerNode +{ +public: + wxWeakRefStatic() : m_pobj(NULL) { } + + void Release() + { + // Release old object if any + if ( m_pobj ) + { + // Remove ourselves from object tracker list + wxTrackable *pt = static_cast<wxTrackable*>(m_pobj); + pt->RemoveNode(this); + m_pobj = NULL; + } + } + + virtual void OnObjectDestroy() + { + // Tracked object itself removes us from list of trackers + wxASSERT(m_pobj != NULL); + m_pobj = NULL; + } + +protected: + void Assign(T* pobj) + { + if ( m_pobj == pobj ) + return; + + Release(); + + // Now set new trackable object + if ( pobj ) + { + // Add ourselves to object tracker list + wxTrackable *pt = static_cast<wxTrackable*>(pobj); + pt->AddNode(this); + m_pobj = pobj; + } + } + + void AssignCopy(const wxWeakRefStatic& wr) + { + Assign( wr.m_pobj ); + } + + T *m_pobj; +}; + + + +#ifndef USE_ONLY_STATIC_WEAKREF + +template<class T,bool use_static> +struct wxWeakRefImpl; + +// Intermediate class, to select the static case above. +template <class T> +struct wxWeakRefImpl<T, true> : public wxWeakRefStatic<T> +{ + enum { value = 1 }; +}; + +// Weak ref implementation when T does not have wxTrackable as known base class +template<class T> +struct wxWeakRefImpl<T, false> : public wxTrackerNode +{ + void Release() + { + // Release old object if any + if ( m_pobj ) + { + // Remove ourselves from object tracker list + m_ptbase->RemoveNode(this); + m_pobj = NULL; + m_ptbase = NULL; + } + } + + virtual void OnObjectDestroy() + { + // Tracked object itself removes us from list of trackers + wxASSERT(m_pobj != NULL); + m_pobj = NULL; + m_ptbase = NULL; + } + +protected: + wxWeakRefImpl() : m_pobj(NULL), m_ptbase(NULL) { } + + // Assign receives most derived class here and can use that + template <class TDerived> + void Assign( TDerived* pobj ) + { + AssignHelper( pobj, wxInt2Type<wxIsStaticTrackable<TDerived>::value>() ); + } + + template <class TDerived> + void AssignHelper(TDerived* pobj, wxInt2Type<true>) + { + wxTrackable *ptbase = static_cast<wxTrackable*>(pobj); + DoAssign( pobj, ptbase ); + } + +#ifndef wxNO_RTTI + void AssignHelper(T* pobj, wxInt2Type<false>) + { + // A last way to get a trackable pointer + wxTrackable *ptbase = dynamic_cast<wxTrackable*>(pobj); + if ( ptbase ) + { + DoAssign( pobj, ptbase ); + } + else + { + wxFAIL_MSG( "Tracked class should inherit from wxTrackable" ); + + Release(); + } + } +#endif // RTTI enabled + + void AssignCopy(const wxWeakRefImpl& wr) + { + DoAssign(wr.m_pobj, wr.m_ptbase); + } + + void DoAssign( T* pobj, wxTrackable *ptbase ) { + if( m_pobj==pobj ) return; + Release(); + + // Now set new trackable object + if( pobj ) + { + // Add ourselves to object tracker list + wxASSERT( ptbase ); + ptbase->AddNode( this ); + m_pobj = pobj; + m_ptbase = ptbase; + } + } + + T *m_pobj; + wxTrackable *m_ptbase; +}; + +#endif // #ifndef USE_ONLY_STATIC_WEAKREF + + + +// A weak reference to an object of type T, where T has base wxTrackable +// (usually statically but if not dynamic_cast<> is tried). +template <class T> +class wxWeakRef : public +#ifdef USE_ONLY_STATIC_WEAKREF + wxWeakRefStatic<T> +#else + wxWeakRefImpl<T, wxIsStaticTrackable<T>::value != 0> +#endif +{ +public: + typedef T element_type; + + // Default ctor + wxWeakRef() { } + + // Enabling this ctor for VC6 results in mysterious compilation failures in + // wx/window.h when assigning wxWindow pointers (FIXME-VC6) +#ifndef __VISUALC6__ + // Ctor from the object of this type: this is needed as the template ctor + // below is not used by at least g++4 when a literal NULL is used + wxWeakRef(T *pobj) + { + this->Assign(pobj); + } +#endif // !__VISUALC6__ + + // When we have the full type here, static_cast<> will always work + // (or give a straight compiler error). + template <class TDerived> + wxWeakRef(TDerived* pobj) + { + this->Assign(pobj); + } + + // We need this copy ctor, since otherwise a default compiler (binary) copy + // happens (if embedded as an object member). + wxWeakRef(const wxWeakRef<T>& wr) + { + this->Assign(wr.get()); + } + + wxWeakRef<T>& operator=(const wxWeakRef<T>& wr) + { + this->AssignCopy(wr); + return *this; + } + + virtual ~wxWeakRef() { this->Release(); } + + // Smart pointer functions + T& operator*() const { return *this->m_pobj; } + T* operator->() const { return this->m_pobj; } + + T* get() const { return this->m_pobj; } + operator T*() const { return this->m_pobj; } +}; + + +#ifndef wxNO_RTTI + +// Weak ref implementation assign objects are queried for wxTrackable +// using dynamic_cast<> +template <class T> +class wxWeakRefDynamic : public wxTrackerNode +{ +public: + wxWeakRefDynamic() : m_pobj(NULL) { } + + wxWeakRefDynamic(T* pobj) : m_pobj(pobj) + { + Assign(pobj); + } + + wxWeakRefDynamic(const wxWeakRef<T>& wr) + { + Assign(wr.get()); + } + + virtual ~wxWeakRefDynamic() { Release(); } + + // Smart pointer functions + T& operator*() const { wxASSERT(m_pobj); return *m_pobj; } + T* operator->() const { wxASSERT(m_pobj); return m_pobj; } + + T* get() const { return m_pobj; } + operator T* () const { return m_pobj; } + + T* operator = (T* pobj) { Assign(pobj); return m_pobj; } + + // Assign from another weak ref, point to same object + T* operator = (const wxWeakRef<T> &wr) { Assign( wr.get() ); return m_pobj; } + + void Release() + { + // Release old object if any + if( m_pobj ) + { + // Remove ourselves from object tracker list + wxTrackable *pt = dynamic_cast<wxTrackable*>(m_pobj); + wxASSERT(pt); + pt->RemoveNode(this); + m_pobj = NULL; + } + } + + virtual void OnObjectDestroy() + { + wxASSERT_MSG(m_pobj, "tracked object should have removed us itself"); + + m_pobj = NULL; + } + +protected: + void Assign(T *pobj) + { + if ( m_pobj == pobj ) + return; + + Release(); + + // Now set new trackable object + if ( pobj ) + { + // Add ourselves to object tracker list + wxTrackable *pt = dynamic_cast<wxTrackable*>(pobj); + if ( pt ) + { + pt->AddNode(this); + m_pobj = pobj; + } + else + { + // If the object we want to track does not support wxTackable, then + // log a message and keep the NULL object pointer. + wxFAIL_MSG( "Tracked class should inherit from wxTrackable" ); + } + } + } + + T *m_pobj; +}; + +#endif // RTTI enabled + + +// Provide some basic types of weak references +class WXDLLIMPEXP_FWD_BASE wxEvtHandler; +class WXDLLIMPEXP_FWD_CORE wxWindow; + + +typedef wxWeakRef<wxEvtHandler> wxEvtHandlerRef; +typedef wxWeakRef<wxWindow> wxWindowRef; + +#endif // _WX_WEAKREF_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/webview.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/webview.h new file mode 100644 index 0000000000..25a235da9d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/webview.h @@ -0,0 +1,304 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: webview.h +// Purpose: Common interface and events for web view component +// Author: Marianne Gagnon +// Copyright: (c) 2010 Marianne Gagnon, 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WEBVIEW_H_ +#define _WX_WEBVIEW_H_ + +#include "wx/defs.h" + +#if wxUSE_WEBVIEW + +#include "wx/control.h" +#include "wx/event.h" +#include "wx/sstream.h" +#include "wx/sharedptr.h" +#include "wx/vector.h" + +#if defined(__WXOSX__) + #include "wx/osx/webviewhistoryitem_webkit.h" +#elif defined(__WXGTK__) + #include "wx/gtk/webviewhistoryitem_webkit.h" +#elif defined(__WXMSW__) + #include "wx/msw/webviewhistoryitem_ie.h" +#else + #error "wxWebView not implemented on this platform." +#endif + +class wxFSFile; +class wxFileSystem; +class wxWebView; + +enum wxWebViewZoom +{ + wxWEBVIEW_ZOOM_TINY, + wxWEBVIEW_ZOOM_SMALL, + wxWEBVIEW_ZOOM_MEDIUM, + wxWEBVIEW_ZOOM_LARGE, + wxWEBVIEW_ZOOM_LARGEST +}; + +enum wxWebViewZoomType +{ + //Scales entire page, including images + wxWEBVIEW_ZOOM_TYPE_LAYOUT, + wxWEBVIEW_ZOOM_TYPE_TEXT +}; + +enum wxWebViewNavigationError +{ + wxWEBVIEW_NAV_ERR_CONNECTION, + wxWEBVIEW_NAV_ERR_CERTIFICATE, + wxWEBVIEW_NAV_ERR_AUTH, + wxWEBVIEW_NAV_ERR_SECURITY, + wxWEBVIEW_NAV_ERR_NOT_FOUND, + wxWEBVIEW_NAV_ERR_REQUEST, + wxWEBVIEW_NAV_ERR_USER_CANCELLED, + wxWEBVIEW_NAV_ERR_OTHER +}; + +enum wxWebViewReloadFlags +{ + //Default, may access cache + wxWEBVIEW_RELOAD_DEFAULT, + wxWEBVIEW_RELOAD_NO_CACHE +}; + +enum wxWebViewFindFlags +{ + wxWEBVIEW_FIND_WRAP = 0x0001, + wxWEBVIEW_FIND_ENTIRE_WORD = 0x0002, + wxWEBVIEW_FIND_MATCH_CASE = 0x0004, + wxWEBVIEW_FIND_HIGHLIGHT_RESULT = 0x0008, + wxWEBVIEW_FIND_BACKWARDS = 0x0010, + wxWEBVIEW_FIND_DEFAULT = 0 +}; + +//Base class for custom scheme handlers +class WXDLLIMPEXP_WEBVIEW wxWebViewHandler +{ +public: + wxWebViewHandler(const wxString& scheme) : m_scheme(scheme) {} + virtual ~wxWebViewHandler() {} + virtual wxString GetName() const { return m_scheme; } + virtual wxFSFile* GetFile(const wxString &uri) = 0; +private: + wxString m_scheme; +}; + +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewNameStr[]; +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewDefaultURLStr[]; +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendDefault[]; +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendIE[]; +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendWebKit[]; + +class WXDLLIMPEXP_WEBVIEW wxWebViewFactory : public wxObject +{ +public: + virtual wxWebView* Create() = 0; + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) = 0; +}; + +WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxWebViewFactory>, wxStringWebViewFactoryMap); + +class WXDLLIMPEXP_WEBVIEW wxWebView : public wxControl +{ +public: + wxWebView() + { + m_showMenu = true; + } + + virtual ~wxWebView() {} + + virtual bool Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) = 0; + + // Factory methods allowing the use of custom factories registered with + // RegisterFactory + static wxWebView* New(const wxString& backend = wxWebViewBackendDefault); + static wxWebView* New(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& backend = wxWebViewBackendDefault, + long style = 0, + const wxString& name = wxWebViewNameStr); + + static void RegisterFactory(const wxString& backend, + wxSharedPtr<wxWebViewFactory> factory); + + // General methods + virtual void EnableContextMenu(bool enable = true) + { + m_showMenu = enable; + } + virtual wxString GetCurrentTitle() const = 0; + virtual wxString GetCurrentURL() const = 0; + // TODO: handle choosing a frame when calling GetPageSource()? + virtual wxString GetPageSource() const = 0; + virtual wxString GetPageText() const = 0; + virtual bool IsBusy() const = 0; + virtual bool IsContextMenuEnabled() const { return m_showMenu; } + virtual bool IsEditable() const = 0; + virtual void LoadURL(const wxString& url) = 0; + virtual void Print() = 0; + virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler) = 0; + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT) = 0; + virtual void RunScript(const wxString& javascript) = 0; + virtual void SetEditable(bool enable = true) = 0; + void SetPage(const wxString& html, const wxString& baseUrl) + { + DoSetPage(html, baseUrl); + } + void SetPage(wxInputStream& html, wxString baseUrl) + { + wxStringOutputStream stream; + stream.Write(html); + DoSetPage(stream.GetString(), baseUrl); + } + virtual void Stop() = 0; + + //History + virtual bool CanGoBack() const = 0; + virtual bool CanGoForward() const = 0; + virtual void GoBack() = 0; + virtual void GoForward() = 0; + virtual void ClearHistory() = 0; + virtual void EnableHistory(bool enable = true) = 0; + virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory() = 0; + virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory() = 0; + virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item) = 0; + + //Zoom + virtual bool CanSetZoomType(wxWebViewZoomType type) const = 0; + virtual wxWebViewZoom GetZoom() const = 0; + virtual wxWebViewZoomType GetZoomType() const = 0; + virtual void SetZoom(wxWebViewZoom zoom) = 0; + virtual void SetZoomType(wxWebViewZoomType zoomType) = 0; + + //Selection + virtual void SelectAll() = 0; + virtual bool HasSelection() const = 0; + virtual void DeleteSelection() = 0; + virtual wxString GetSelectedText() const = 0; + virtual wxString GetSelectedSource() const = 0; + virtual void ClearSelection() = 0; + + //Clipboard functions + virtual bool CanCut() const = 0; + virtual bool CanCopy() const = 0; + virtual bool CanPaste() const = 0; + virtual void Cut() = 0; + virtual void Copy() = 0; + virtual void Paste() = 0; + + //Undo / redo functionality + virtual bool CanUndo() const = 0; + virtual bool CanRedo() const = 0; + virtual void Undo() = 0; + virtual void Redo() = 0; + + //Get the pointer to the underlying native engine. + virtual void* GetNativeBackend() const = 0; + //Find function + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) = 0; + +protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl) = 0; + +private: + static void InitFactoryMap(); + static wxStringWebViewFactoryMap::iterator FindFactory(const wxString &backend); + + bool m_showMenu; + static wxStringWebViewFactoryMap m_factoryMap; + + wxDECLARE_ABSTRACT_CLASS(wxWebView); +}; + +class WXDLLIMPEXP_WEBVIEW wxWebViewEvent : public wxNotifyEvent +{ +public: + wxWebViewEvent() {} + wxWebViewEvent(wxEventType type, int id, const wxString url, + const wxString target) + : wxNotifyEvent(type, id), m_url(url), m_target(target) + {} + + + const wxString& GetURL() const { return m_url; } + const wxString& GetTarget() const { return m_target; } + + virtual wxEvent* Clone() const { return new wxWebViewEvent(*this); } +private: + wxString m_url; + wxString m_target; + + wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWebViewEvent); +}; + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_NAVIGATING, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_NAVIGATED, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_LOADED, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_ERROR, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_NEWWINDOW, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_TITLE_CHANGED, wxWebViewEvent ); + +typedef void (wxEvtHandler::*wxWebViewEventFunction) + (wxWebViewEvent&); + +#define wxWebViewEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxWebViewEventFunction, func) + +#define EVT_WEBVIEW_NAVIGATING(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_NAVIGATING, id, \ + wxWebViewEventHandler(fn)) + +#define EVT_WEBVIEW_NAVIGATED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_NAVIGATED, id, \ + wxWebViewEventHandler(fn)) + +#define EVT_WEBVIEW_LOADED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_LOADED, id, \ + wxWebViewEventHandler(fn)) + +#define EVT_WEBVIEW_ERROR(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_ERROR, id, \ + wxWebViewEventHandler(fn)) + +#define EVT_WEBVIEW_NEWWINDOW(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_NEWWINDOW, id, \ + wxWebViewEventHandler(fn)) + +#define EVT_WEBVIEW_TITLE_CHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_TITLE_CHANGED, id, \ + wxWebViewEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_WEBVIEW_NAVIGATING wxEVT_WEBVIEW_NAVIGATING +#define wxEVT_COMMAND_WEBVIEW_NAVIGATED wxEVT_WEBVIEW_NAVIGATED +#define wxEVT_COMMAND_WEBVIEW_LOADED wxEVT_WEBVIEW_LOADED +#define wxEVT_COMMAND_WEBVIEW_ERROR wxEVT_WEBVIEW_ERROR +#define wxEVT_COMMAND_WEBVIEW_NEWWINDOW wxEVT_WEBVIEW_NEWWINDOW +#define wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED wxEVT_WEBVIEW_TITLE_CHANGED + +#endif // wxUSE_WEBVIEW + +#endif // _WX_WEBVIEW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/webviewarchivehandler.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/webviewarchivehandler.h new file mode 100644 index 0000000000..8b2eb19908 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/webviewarchivehandler.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: webviewarchivehandler.h +// Purpose: Custom webview handler to allow archive browsing +// Author: Steven Lamerton +// Copyright: (c) 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WEBVIEW_FILE_HANDLER_H_ +#define _WX_WEBVIEW_FILE_HANDLER_H_ + +#include "wx/setup.h" + +#if wxUSE_WEBVIEW + +class wxFSFile; +class wxFileSystem; + +#include "wx/webview.h" + +//Loads from uris such as scheme:///C:/example/example.html or archives such as +//scheme:///C:/example/example.zip;protocol=zip/example.html + +class WXDLLIMPEXP_WEBVIEW wxWebViewArchiveHandler : public wxWebViewHandler +{ +public: + wxWebViewArchiveHandler(const wxString& scheme); + virtual ~wxWebViewArchiveHandler(); + virtual wxFSFile* GetFile(const wxString &uri); +private: + wxFileSystem* m_fileSystem; +}; + +#endif // wxUSE_WEBVIEW + +#endif // _WX_WEBVIEW_FILE_HANDLER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/webviewfshandler.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/webviewfshandler.h new file mode 100644 index 0000000000..ebdbbcb906 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/webviewfshandler.h @@ -0,0 +1,37 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: webviewfshandler.h +// Purpose: Custom webview handler for virtual file system +// Author: Nick Matthews +// Copyright: (c) 2012 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// Based on webviewarchivehandler.h file by Steven Lamerton + +#ifndef _WX_WEBVIEW_FS_HANDLER_H_ +#define _WX_WEBVIEW_FS_HANDLER_H_ + +#include "wx/setup.h" + +#if wxUSE_WEBVIEW + +class wxFSFile; +class wxFileSystem; + +#include "wx/webview.h" + +//Loads from uris such as scheme:example.html + +class WXDLLIMPEXP_WEBVIEW wxWebViewFSHandler : public wxWebViewHandler +{ +public: + wxWebViewFSHandler(const wxString& scheme); + virtual ~wxWebViewFSHandler(); + virtual wxFSFile* GetFile(const wxString &uri); +private: + wxFileSystem* m_fileSystem; +}; + +#endif // wxUSE_WEBVIEW + +#endif // _WX_WEBVIEW_FS_HANDLER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/wfstream.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wfstream.h new file mode 100644 index 0000000000..613b4c273b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wfstream.h @@ -0,0 +1,263 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/wfstream.h +// Purpose: File stream classes +// Author: Guilhem Lavaux +// Modified by: +// Created: 11/07/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WXFSTREAM_H__ +#define _WX_WXFSTREAM_H__ + +#include "wx/defs.h" + +#if wxUSE_STREAMS + +#include "wx/object.h" +#include "wx/string.h" +#include "wx/stream.h" +#include "wx/file.h" +#include "wx/ffile.h" + +#if wxUSE_FILE + +// ---------------------------------------------------------------------------- +// wxFileStream using wxFile +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFileInputStream : public wxInputStream +{ +public: + wxFileInputStream(const wxString& ifileName); + wxFileInputStream(wxFile& file); + wxFileInputStream(int fd); + virtual ~wxFileInputStream(); + + wxFileOffset GetLength() const; + + bool Ok() const { return IsOk(); } + virtual bool IsOk() const; + bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + + wxFile* GetFile() const { return m_file; } + +protected: + wxFileInputStream(); + + size_t OnSysRead(void *buffer, size_t size); + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; + +protected: + wxFile *m_file; + bool m_file_destroy; + + wxDECLARE_NO_COPY_CLASS(wxFileInputStream); +}; + +class WXDLLIMPEXP_BASE wxFileOutputStream : public wxOutputStream +{ +public: + wxFileOutputStream(const wxString& fileName); + wxFileOutputStream(wxFile& file); + wxFileOutputStream(int fd); + virtual ~wxFileOutputStream(); + + void Sync(); + bool Close() { return m_file_destroy ? m_file->Close() : true; } + wxFileOffset GetLength() const; + + bool Ok() const { return IsOk(); } + virtual bool IsOk() const; + bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + + wxFile* GetFile() const { return m_file; } + +protected: + wxFileOutputStream(); + + size_t OnSysWrite(const void *buffer, size_t size); + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; + +protected: + wxFile *m_file; + bool m_file_destroy; + + wxDECLARE_NO_COPY_CLASS(wxFileOutputStream); +}; + +class WXDLLIMPEXP_BASE wxTempFileOutputStream : public wxOutputStream +{ +public: + wxTempFileOutputStream(const wxString& fileName); + virtual ~wxTempFileOutputStream(); + + bool Close() { return Commit(); } + WXDLLIMPEXP_INLINE_BASE virtual bool Commit() { return m_file->Commit(); } + WXDLLIMPEXP_INLINE_BASE virtual void Discard() { m_file->Discard(); } + + wxFileOffset GetLength() const { return m_file->Length(); } + bool IsSeekable() const { return true; } + +protected: + size_t OnSysWrite(const void *buffer, size_t size); + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode) + { return m_file->Seek(pos, mode); } + wxFileOffset OnSysTell() const { return m_file->Tell(); } + +private: + wxTempFile *m_file; + + wxDECLARE_NO_COPY_CLASS(wxTempFileOutputStream); +}; + +class WXDLLIMPEXP_BASE wxFileStream : public wxFileInputStream, + public wxFileOutputStream +{ +public: + wxFileStream(const wxString& fileName); + virtual bool IsOk() const; + + // override (some) virtual functions inherited from both classes to resolve + // ambiguities (this wouldn't be necessary if wxStreamBase were a virtual + // base class but it isn't) + + virtual bool IsSeekable() const + { + return wxFileInputStream::IsSeekable(); + } + + virtual wxFileOffset GetLength() const + { + return wxFileInputStream::GetLength(); + } + +protected: + virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode) + { + return wxFileInputStream::OnSysSeek(pos, mode); + } + + virtual wxFileOffset OnSysTell() const + { + return wxFileInputStream::OnSysTell(); + } + +private: + wxDECLARE_NO_COPY_CLASS(wxFileStream); +}; + +#endif //wxUSE_FILE + +#if wxUSE_FFILE + +// ---------------------------------------------------------------------------- +// wxFFileStream using wxFFile +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxFFileInputStream : public wxInputStream +{ +public: + wxFFileInputStream(const wxString& fileName, const wxString& mode = "rb"); + wxFFileInputStream(wxFFile& file); + wxFFileInputStream(FILE *file); + virtual ~wxFFileInputStream(); + + wxFileOffset GetLength() const; + + bool Ok() const { return IsOk(); } + virtual bool IsOk() const; + bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + + wxFFile* GetFile() const { return m_file; } + +protected: + wxFFileInputStream(); + + size_t OnSysRead(void *buffer, size_t size); + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; + +protected: + wxFFile *m_file; + bool m_file_destroy; + + wxDECLARE_NO_COPY_CLASS(wxFFileInputStream); +}; + +class WXDLLIMPEXP_BASE wxFFileOutputStream : public wxOutputStream +{ +public: + wxFFileOutputStream(const wxString& fileName, const wxString& mode = "wb"); + wxFFileOutputStream(wxFFile& file); + wxFFileOutputStream(FILE *file); + virtual ~wxFFileOutputStream(); + + void Sync(); + bool Close() { return m_file_destroy ? m_file->Close() : true; } + wxFileOffset GetLength() const; + + bool Ok() const { return IsOk(); } + virtual bool IsOk() const; + bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + + wxFFile* GetFile() const { return m_file; } + +protected: + wxFFileOutputStream(); + + size_t OnSysWrite(const void *buffer, size_t size); + wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + wxFileOffset OnSysTell() const; + +protected: + wxFFile *m_file; + bool m_file_destroy; + + wxDECLARE_NO_COPY_CLASS(wxFFileOutputStream); +}; + +class WXDLLIMPEXP_BASE wxFFileStream : public wxFFileInputStream, + public wxFFileOutputStream +{ +public: + wxFFileStream(const wxString& fileName, const wxString& mode = "w+b"); + + // override some virtual functions to resolve ambiguities, just as in + // wxFileStream + + virtual bool IsOk() const; + + virtual bool IsSeekable() const + { + return wxFFileInputStream::IsSeekable(); + } + + virtual wxFileOffset GetLength() const + { + return wxFFileInputStream::GetLength(); + } + +protected: + virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode) + { + return wxFFileInputStream::OnSysSeek(pos, mode); + } + + virtual wxFileOffset OnSysTell() const + { + return wxFFileInputStream::OnSysTell(); + } + +private: + wxDECLARE_NO_COPY_CLASS(wxFFileStream); +}; + +#endif //wxUSE_FFILE + +#endif // wxUSE_STREAMS + +#endif // _WX_WXFSTREAM_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/window.h new file mode 100644 index 0000000000..7dffad43c2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/window.h @@ -0,0 +1,2079 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/window.h +// Purpose: wxWindowBase class - the interface of wxWindow +// Author: Vadim Zeitlin +// Modified by: Ron Lee +// Created: 01/02/97 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WINDOW_H_BASE_ +#define _WX_WINDOW_H_BASE_ + +// ---------------------------------------------------------------------------- +// headers which we must include here +// ---------------------------------------------------------------------------- + +#include "wx/event.h" // the base class + +#include "wx/list.h" // defines wxWindowList + +#include "wx/cursor.h" // we have member variables of these classes +#include "wx/font.h" // so we can't do without them +#include "wx/colour.h" +#include "wx/region.h" +#include "wx/utils.h" +#include "wx/intl.h" + +#include "wx/validate.h" // for wxDefaultValidator (always include it) + +#if wxUSE_PALETTE + #include "wx/palette.h" +#endif // wxUSE_PALETTE + +#if wxUSE_ACCEL + #include "wx/accel.h" +#endif // wxUSE_ACCEL + +#if wxUSE_ACCESSIBILITY +#include "wx/access.h" +#endif + +// when building wxUniv/Foo we don't want the code for native menu use to be +// compiled in - it should only be used when building real wxFoo +#ifdef __WXUNIVERSAL__ + #define wxUSE_MENUS_NATIVE 0 +#else // !__WXUNIVERSAL__ + #define wxUSE_MENUS_NATIVE wxUSE_MENUS +#endif // __WXUNIVERSAL__/!__WXUNIVERSAL__ + + +// Define this macro if the corresponding operating system handles the state +// of children windows automatically when the parent is enabled/disabled. +// Otherwise wx itself must ensure that when the parent is disabled its +// children are disabled too, and their initial state is restored when the +// parent is enabled back. +#if defined(__WXMSW__) || defined(__WXPM__) + // must do everything ourselves + #undef wxHAS_NATIVE_ENABLED_MANAGEMENT +#elif defined(__WXOSX__) + #if wxOSX_USE_CARBON + #define wxHAS_NATIVE_ENABLED_MANAGEMENT + #else + // must do everything ourselves + #undef wxHAS_NATIVE_ENABLED_MANAGEMENT + #endif +#else + #define wxHAS_NATIVE_ENABLED_MANAGEMENT +#endif + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxCaret; +class WXDLLIMPEXP_FWD_CORE wxControl; +class WXDLLIMPEXP_FWD_CORE wxCursor; +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxDropTarget; +class WXDLLIMPEXP_FWD_CORE wxLayoutConstraints; +class WXDLLIMPEXP_FWD_CORE wxSizer; +class WXDLLIMPEXP_FWD_CORE wxToolTip; +class WXDLLIMPEXP_FWD_CORE wxWindowBase; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxScrollHelper; + +#if wxUSE_ACCESSIBILITY +class WXDLLIMPEXP_FWD_CORE wxAccessible; +#endif + +// ---------------------------------------------------------------------------- +// helper stuff used by wxWindow +// ---------------------------------------------------------------------------- + +// struct containing all the visual attributes of a control +struct WXDLLIMPEXP_CORE wxVisualAttributes +{ + // the font used for control label/text inside it + wxFont font; + + // the foreground colour + wxColour colFg; + + // the background colour, may be wxNullColour if the controls background + // colour is not solid + wxColour colBg; +}; + +// different window variants, on platforms like eg mac uses different +// rendering sizes +enum wxWindowVariant +{ + wxWINDOW_VARIANT_NORMAL, // Normal size + wxWINDOW_VARIANT_SMALL, // Smaller size (about 25 % smaller than normal) + wxWINDOW_VARIANT_MINI, // Mini size (about 33 % smaller than normal) + wxWINDOW_VARIANT_LARGE, // Large size (about 25 % larger than normal) + wxWINDOW_VARIANT_MAX +}; + +#if wxUSE_SYSTEM_OPTIONS + #define wxWINDOW_DEFAULT_VARIANT wxT("window-default-variant") +#endif + +// valid values for Show/HideWithEffect() +enum wxShowEffect +{ + wxSHOW_EFFECT_NONE, + wxSHOW_EFFECT_ROLL_TO_LEFT, + wxSHOW_EFFECT_ROLL_TO_RIGHT, + wxSHOW_EFFECT_ROLL_TO_TOP, + wxSHOW_EFFECT_ROLL_TO_BOTTOM, + wxSHOW_EFFECT_SLIDE_TO_LEFT, + wxSHOW_EFFECT_SLIDE_TO_RIGHT, + wxSHOW_EFFECT_SLIDE_TO_TOP, + wxSHOW_EFFECT_SLIDE_TO_BOTTOM, + wxSHOW_EFFECT_BLEND, + wxSHOW_EFFECT_EXPAND, + wxSHOW_EFFECT_MAX +}; + +// flags for SendSizeEvent() +enum +{ + wxSEND_EVENT_POST = 1 +}; + +// ---------------------------------------------------------------------------- +// (pseudo)template list classes +// ---------------------------------------------------------------------------- + +WX_DECLARE_LIST_3(wxWindow, wxWindowBase, wxWindowList, wxWindowListNode, class WXDLLIMPEXP_CORE); + +// ---------------------------------------------------------------------------- +// global variables +// ---------------------------------------------------------------------------- + +extern WXDLLIMPEXP_DATA_CORE(wxWindowList) wxTopLevelWindows; + +// declared here for compatibility only, main declaration is in wx/app.h +extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete; + +// ---------------------------------------------------------------------------- +// wxWindowBase is the base class for all GUI controls/widgets, this is the public +// interface of this class. +// +// Event handler: windows have themselves as their event handlers by default, +// but their event handlers could be set to another object entirely. This +// separation can reduce the amount of derivation required, and allow +// alteration of a window's functionality (e.g. by a resource editor that +// temporarily switches event handlers). +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowBase : public wxEvtHandler +{ +public: + // creating the window + // ------------------- + + // default ctor, initializes everything which can be initialized before + // Create() + wxWindowBase() ; + + virtual ~wxWindowBase(); + + // deleting the window + // ------------------- + + // ask the window to close itself, return true if the event handler + // honoured our request + bool Close( bool force = false ); + + // the following functions delete the C++ objects (the window itself + // or its children) as well as the GUI windows and normally should + // never be used directly + + // delete window unconditionally (dangerous!), returns true if ok + virtual bool Destroy(); + // delete all children of this window, returns true if ok + bool DestroyChildren(); + + // is the window being deleted? + bool IsBeingDeleted() const; + + // window attributes + // ----------------- + + // label is just the same as the title (but for, e.g., buttons it + // makes more sense to speak about labels), title access + // is available from wxTLW classes only (frames, dialogs) + virtual void SetLabel(const wxString& label) = 0; + virtual wxString GetLabel() const = 0; + + // the window name is used for ressource setting in X, it is not the + // same as the window title/label + virtual void SetName( const wxString &name ) { m_windowName = name; } + virtual wxString GetName() const { return m_windowName; } + + // sets the window variant, calls internally DoSetVariant if variant + // has changed + void SetWindowVariant(wxWindowVariant variant); + wxWindowVariant GetWindowVariant() const { return m_windowVariant; } + + + // get or change the layout direction (LTR or RTL) for this window, + // wxLayout_Default is returned if layout direction is not supported + virtual wxLayoutDirection GetLayoutDirection() const + { return wxLayout_Default; } + virtual void SetLayoutDirection(wxLayoutDirection WXUNUSED(dir)) + { } + + // mirror coordinates for RTL layout if this window uses it and if the + // mirroring is not done automatically like Win32 + virtual wxCoord AdjustForLayoutDirection(wxCoord x, + wxCoord width, + wxCoord widthTotal) const; + + + // window id uniquely identifies the window among its siblings unless + // it is wxID_ANY which means "don't care" + void SetId( wxWindowID winid ) { m_windowId = winid; } + wxWindowID GetId() const { return m_windowId; } + + // generate a unique id (or count of them consecutively), returns a + // valid id in the auto-id range or wxID_NONE if failed. If using + // autoid management, it will mark the id as reserved until it is + // used (by assigning it to a wxWindowIDRef) or unreserved. + static wxWindowID NewControlId(int count = 1) + { + return wxIdManager::ReserveId(count); + } + + // If an ID generated from NewControlId is not assigned to a wxWindowIDRef, + // it must be unreserved + static void UnreserveControlId(wxWindowID id, int count = 1) + { + wxIdManager::UnreserveId(id, count); + } + + + // moving/resizing + // --------------- + + // set the window size and/or position + void SetSize( int x, int y, int width, int height, + int sizeFlags = wxSIZE_AUTO ) + { DoSetSize(x, y, width, height, sizeFlags); } + + void SetSize( int width, int height ) + { DoSetSize( wxDefaultCoord, wxDefaultCoord, width, height, wxSIZE_USE_EXISTING ); } + + void SetSize( const wxSize& size ) + { SetSize( size.x, size.y); } + + void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO) + { DoSetSize(rect.x, rect.y, rect.width, rect.height, sizeFlags); } + + void Move(int x, int y, int flags = wxSIZE_USE_EXISTING) + { DoSetSize(x, y, wxDefaultCoord, wxDefaultCoord, flags); } + + void Move(const wxPoint& pt, int flags = wxSIZE_USE_EXISTING) + { Move(pt.x, pt.y, flags); } + + void SetPosition(const wxPoint& pt) { Move(pt); } + + // Z-order + virtual void Raise() = 0; + virtual void Lower() = 0; + + // client size is the size of area available for subwindows + void SetClientSize( int width, int height ) + { DoSetClientSize(width, height); } + + void SetClientSize( const wxSize& size ) + { DoSetClientSize(size.x, size.y); } + + void SetClientSize(const wxRect& rect) + { SetClientSize( rect.width, rect.height ); } + + // get the window position (pointers may be NULL): notice that it is in + // client coordinates for child windows and screen coordinates for the + // top level ones, use GetScreenPosition() if you need screen + // coordinates for all kinds of windows + void GetPosition( int *x, int *y ) const { DoGetPosition(x, y); } + wxPoint GetPosition() const + { + int x, y; + DoGetPosition(&x, &y); + + return wxPoint(x, y); + } + + // get the window position in screen coordinates + void GetScreenPosition(int *x, int *y) const { DoGetScreenPosition(x, y); } + wxPoint GetScreenPosition() const + { + int x, y; + DoGetScreenPosition(&x, &y); + + return wxPoint(x, y); + } + + // get the window size (pointers may be NULL) + void GetSize( int *w, int *h ) const { DoGetSize(w, h); } + wxSize GetSize() const + { + int w, h; + DoGetSize(& w, & h); + return wxSize(w, h); + } + + void GetClientSize( int *w, int *h ) const { DoGetClientSize(w, h); } + wxSize GetClientSize() const + { + int w, h; + DoGetClientSize(&w, &h); + + return wxSize(w, h); + } + + // get the position and size at once + wxRect GetRect() const + { + int x, y, w, h; + GetPosition(&x, &y); + GetSize(&w, &h); + + return wxRect(x, y, w, h); + } + + wxRect GetScreenRect() const + { + int x, y, w, h; + GetScreenPosition(&x, &y); + GetSize(&w, &h); + + return wxRect(x, y, w, h); + } + + // get the origin of the client area of the window relative to the + // window top left corner (the client area may be shifted because of + // the borders, scrollbars, other decorations...) + virtual wxPoint GetClientAreaOrigin() const; + + // get the client rectangle in window (i.e. client) coordinates + wxRect GetClientRect() const + { + return wxRect(GetClientAreaOrigin(), GetClientSize()); + } + + // client<->window size conversion + virtual wxSize ClientToWindowSize(const wxSize& size) const; + virtual wxSize WindowToClientSize(const wxSize& size) const; + + // get the size best suited for the window (in fact, minimal + // acceptable size using which it will still look "nice" in + // most situations) + wxSize GetBestSize() const; + + void GetBestSize(int *w, int *h) const + { + wxSize s = GetBestSize(); + if ( w ) + *w = s.x; + if ( h ) + *h = s.y; + } + + // Determine the best size in the other direction if one of them is + // fixed. This is used with windows that can wrap their contents and + // returns input-independent best size for the others. + int GetBestHeight(int width) const; + int GetBestWidth(int height) const; + + + void SetScrollHelper( wxScrollHelper *sh ) { m_scrollHelper = sh; } + wxScrollHelper *GetScrollHelper() { return m_scrollHelper; } + + // reset the cached best size value so it will be recalculated the + // next time it is needed. + void InvalidateBestSize(); + void CacheBestSize(const wxSize& size) const + { wxConstCast(this, wxWindowBase)->m_bestSizeCache = size; } + + + // This function will merge the window's best size into the window's + // minimum size, giving priority to the min size components, and + // returns the results. + virtual wxSize GetEffectiveMinSize() const; + + wxDEPRECATED_MSG("use GetEffectiveMinSize() instead") + wxSize GetBestFittingSize() const; + wxDEPRECATED_MSG("use GetEffectiveMinSize() instead") + wxSize GetAdjustedMinSize() const; + + // A 'Smart' SetSize that will fill in default size values with 'best' + // size. Sets the minsize to what was passed in. + void SetInitialSize(const wxSize& size=wxDefaultSize); + + wxDEPRECATED_MSG("use SetInitialSize() instead") + void SetBestFittingSize(const wxSize& size=wxDefaultSize); + + + // the generic centre function - centers the window on parent by` + // default or on screen if it doesn't have parent or + // wxCENTER_ON_SCREEN flag is given + void Centre(int dir = wxBOTH) { DoCentre(dir); } + void Center(int dir = wxBOTH) { DoCentre(dir); } + + // centre with respect to the parent window + void CentreOnParent(int dir = wxBOTH) { DoCentre(dir); } + void CenterOnParent(int dir = wxBOTH) { CentreOnParent(dir); } + + // set window size to wrap around its children + virtual void Fit(); + + // set virtual size to satisfy children + virtual void FitInside(); + + + // SetSizeHints is actually for setting the size hints + // for the wxTLW for a Window Manager - hence the name - + // and it is therefore overridden in wxTLW to do that. + // In wxWindow(Base), it has (unfortunately) been abused + // to mean the same as SetMinSize() and SetMaxSize(). + + virtual void SetSizeHints( int minW, int minH, + int maxW = wxDefaultCoord, int maxH = wxDefaultCoord, + int incW = wxDefaultCoord, int incH = wxDefaultCoord ) + { DoSetSizeHints(minW, minH, maxW, maxH, incW, incH); } + + void SetSizeHints( const wxSize& minSize, + const wxSize& maxSize=wxDefaultSize, + const wxSize& incSize=wxDefaultSize) + { DoSetSizeHints(minSize.x, minSize.y, maxSize.x, maxSize.y, incSize.x, incSize.y); } + + +#if WXWIN_COMPATIBILITY_2_8 + // these are useless and do nothing since wxWidgets 2.9 + wxDEPRECATED( virtual void SetVirtualSizeHints( int minW, int minH, + int maxW = wxDefaultCoord, int maxH = wxDefaultCoord ) ); + wxDEPRECATED( void SetVirtualSizeHints( const wxSize& minSize, + const wxSize& maxSize=wxDefaultSize) ); +#endif // WXWIN_COMPATIBILITY_2_8 + + + // Call these to override what GetBestSize() returns. This + // method is only virtual because it is overridden in wxTLW + // as a different API for SetSizeHints(). + virtual void SetMinSize(const wxSize& minSize); + virtual void SetMaxSize(const wxSize& maxSize); + + // Like Set*Size, but for client, not window, size + virtual void SetMinClientSize(const wxSize& size) + { SetMinSize(ClientToWindowSize(size)); } + virtual void SetMaxClientSize(const wxSize& size) + { SetMaxSize(ClientToWindowSize(size)); } + + // Override these methods to impose restrictions on min/max size. + // The easier way is to call SetMinSize() and SetMaxSize() which + // will have the same effect. Doing both is non-sense. + virtual wxSize GetMinSize() const { return wxSize(m_minWidth, m_minHeight); } + virtual wxSize GetMaxSize() const { return wxSize(m_maxWidth, m_maxHeight); } + + // Like Get*Size, but for client, not window, size + virtual wxSize GetMinClientSize() const + { return WindowToClientSize(GetMinSize()); } + virtual wxSize GetMaxClientSize() const + { return WindowToClientSize(GetMaxSize()); } + + // Get the min and max values one by one + int GetMinWidth() const { return GetMinSize().x; } + int GetMinHeight() const { return GetMinSize().y; } + int GetMaxWidth() const { return GetMaxSize().x; } + int GetMaxHeight() const { return GetMaxSize().y; } + + + // Methods for accessing the virtual size of a window. For most + // windows this is just the client area of the window, but for + // some like scrolled windows it is more or less independent of + // the screen window size. You may override the DoXXXVirtual + // methods below for classes where that is the case. + + void SetVirtualSize( const wxSize &size ) { DoSetVirtualSize( size.x, size.y ); } + void SetVirtualSize( int x, int y ) { DoSetVirtualSize( x, y ); } + + wxSize GetVirtualSize() const { return DoGetVirtualSize(); } + void GetVirtualSize( int *x, int *y ) const + { + wxSize s( DoGetVirtualSize() ); + + if( x ) + *x = s.GetWidth(); + if( y ) + *y = s.GetHeight(); + } + + // Override these methods for windows that have a virtual size + // independent of their client size. eg. the virtual area of a + // wxScrolledWindow. + + virtual void DoSetVirtualSize( int x, int y ); + virtual wxSize DoGetVirtualSize() const; + + // Return the largest of ClientSize and BestSize (as determined + // by a sizer, interior children, or other means) + + virtual wxSize GetBestVirtualSize() const + { + wxSize client( GetClientSize() ); + wxSize best( GetBestSize() ); + + return wxSize( wxMax( client.x, best.x ), wxMax( client.y, best.y ) ); + } + + // returns the magnification of the content of this window + // eg 2.0 for a window on a retina screen + virtual double GetContentScaleFactor() const + { return 1.0; } + + // return the size of the left/right and top/bottom borders in x and y + // components of the result respectively + virtual wxSize GetWindowBorderSize() const; + + // wxSizer and friends use this to give a chance to a component to recalc + // its min size once one of the final size components is known. Override + // this function when that is useful (such as for wxStaticText which can + // stretch over several lines). Parameter availableOtherDir + // tells the item how much more space there is available in the opposite + // direction (-1 if unknown). + virtual bool + InformFirstDirection(int direction, int size, int availableOtherDir); + + // sends a size event to the window using its current size -- this has an + // effect of refreshing the window layout + // + // by default the event is sent, i.e. processed immediately, but if flags + // value includes wxSEND_EVENT_POST then it's posted, i.e. only schedule + // for later processing + virtual void SendSizeEvent(int flags = 0); + + // this is a safe wrapper for GetParent()->SendSizeEvent(): it checks that + // we have a parent window and it's not in process of being deleted + // + // this is used by controls such as tool/status bars changes to which must + // also result in parent re-layout + void SendSizeEventToParent(int flags = 0); + + // this is a more readable synonym for SendSizeEvent(wxSEND_EVENT_POST) + void PostSizeEvent() { SendSizeEvent(wxSEND_EVENT_POST); } + + // this is the same as SendSizeEventToParent() but using PostSizeEvent() + void PostSizeEventToParent() { SendSizeEventToParent(wxSEND_EVENT_POST); } + + // These functions should be used before repositioning the children of + // this window to reduce flicker or, in MSW case, even avoid display + // corruption in some situations (so they're more than just optimization). + // + // EndRepositioningChildren() should be called if and only if + // BeginRepositioningChildren() returns true. To ensure that this is always + // done automatically, use ChildrenRepositioningGuard class below. + virtual bool BeginRepositioningChildren() { return false; } + virtual void EndRepositioningChildren() { } + + // A simple helper which ensures that EndRepositioningChildren() is called + // from its dtor if and only if calling BeginRepositioningChildren() from + // the ctor returned true. + class ChildrenRepositioningGuard + { + public: + // Notice that window can be NULL here, for convenience. In this case + // this class simply doesn't do anything. + wxEXPLICIT ChildrenRepositioningGuard(wxWindowBase* win) + : m_win(win), + m_callEnd(win && win->BeginRepositioningChildren()) + { + } + + ~ChildrenRepositioningGuard() + { + if ( m_callEnd ) + m_win->EndRepositioningChildren(); + } + + private: + wxWindowBase* const m_win; + const bool m_callEnd; + + wxDECLARE_NO_COPY_CLASS(ChildrenRepositioningGuard); + }; + + + // window state + // ------------ + + // returns true if window was shown/hidden, false if the nothing was + // done (window was already shown/hidden) + virtual bool Show( bool show = true ); + bool Hide() { return Show(false); } + + // show or hide the window with a special effect, not implemented on + // most platforms (where it is the same as Show()/Hide() respectively) + // + // timeout specifies how long the animation should take, in ms, the + // default value of 0 means to use the default (system-dependent) value + virtual bool ShowWithEffect(wxShowEffect WXUNUSED(effect), + unsigned WXUNUSED(timeout) = 0) + { + return Show(); + } + + virtual bool HideWithEffect(wxShowEffect WXUNUSED(effect), + unsigned WXUNUSED(timeout) = 0) + { + return Hide(); + } + + // returns true if window was enabled/disabled, false if nothing done + virtual bool Enable( bool enable = true ); + bool Disable() { return Enable(false); } + + virtual bool IsShown() const { return m_isShown; } + // returns true if the window is really enabled and false otherwise, + // whether because it had been explicitly disabled itself or because + // its parent is currently disabled -- then this method returns false + // whatever is the intrinsic state of this window, use IsThisEnabled(0 + // to retrieve it. In other words, this relation always holds: + // + // IsEnabled() == IsThisEnabled() && parent.IsEnabled() + // + bool IsEnabled() const; + + // returns the internal window state independently of the parent(s) + // state, i.e. the state in which the window would be if all its + // parents were enabled (use IsEnabled() above to get the effective + // window state) + bool IsThisEnabled() const { return m_isEnabled; } + + // returns true if the window is visible, i.e. IsShown() returns true + // if called on it and all its parents up to the first TLW + virtual bool IsShownOnScreen() const; + + // get/set window style (setting style won't update the window and so + // is only useful for internal usage) + virtual void SetWindowStyleFlag( long style ) { m_windowStyle = style; } + virtual long GetWindowStyleFlag() const { return m_windowStyle; } + + // just some (somewhat shorter) synonyms + void SetWindowStyle( long style ) { SetWindowStyleFlag(style); } + long GetWindowStyle() const { return GetWindowStyleFlag(); } + + // check if the flag is set + bool HasFlag(int flag) const { return (m_windowStyle & flag) != 0; } + virtual bool IsRetained() const { return HasFlag(wxRETAINED); } + + // turn the flag on if it had been turned off before and vice versa, + // return true if the flag is currently turned on + bool ToggleWindowStyle(int flag); + + // extra style: the less often used style bits which can't be set with + // SetWindowStyleFlag() + virtual void SetExtraStyle(long exStyle) { m_exStyle = exStyle; } + long GetExtraStyle() const { return m_exStyle; } + + bool HasExtraStyle(int exFlag) const { return (m_exStyle & exFlag) != 0; } + +#if WXWIN_COMPATIBILITY_2_8 + // make the window modal (all other windows unresponsive) + wxDEPRECATED( virtual void MakeModal(bool modal = true) ); +#endif + + // (primitive) theming support + // --------------------------- + + virtual void SetThemeEnabled(bool enableTheme) { m_themeEnabled = enableTheme; } + virtual bool GetThemeEnabled() const { return m_themeEnabled; } + + + // focus and keyboard handling + // --------------------------- + + // set focus to this window + virtual void SetFocus() = 0; + + // set focus to this window as the result of a keyboard action + virtual void SetFocusFromKbd() { SetFocus(); } + + // return the window which currently has the focus or NULL + static wxWindow *FindFocus(); + + static wxWindow *DoFindFocus() /* = 0: implement in derived classes */; + + // return true if the window has focus (handles composite windows + // correctly - returns true if GetMainWindowOfCompositeControl() + // has focus) + virtual bool HasFocus() const; + + // can this window have focus in principle? + // + // the difference between AcceptsFocus[FromKeyboard]() and CanAcceptFocus + // [FromKeyboard]() is that the former functions are meant to be + // overridden in the derived classes to simply return false if the + // control can't have focus, while the latter are meant to be used by + // this class clients and take into account the current window state + virtual bool AcceptsFocus() const { return true; } + + // can this window or one of its children accept focus? + // + // usually it's the same as AcceptsFocus() but is overridden for + // container windows + virtual bool AcceptsFocusRecursively() const { return AcceptsFocus(); } + + // can this window be given focus by keyboard navigation? if not, the + // only way to give it focus (provided it accepts it at all) is to + // click it + virtual bool AcceptsFocusFromKeyboard() const { return AcceptsFocus(); } + + + // Can this window be focused right now, in its current state? This + // shouldn't be called at all if AcceptsFocus() returns false. + // + // It is a convenient helper for the various functions using it below + // but also a hook allowing to override the default logic for some rare + // cases (currently just wxRadioBox in wxMSW) when it's inappropriate. + virtual bool CanBeFocused() const { return IsShown() && IsEnabled(); } + + // can this window itself have focus? + bool IsFocusable() const { return AcceptsFocus() && CanBeFocused(); } + + // can this window have focus right now? + // + // if this method returns true, it means that calling SetFocus() will + // put focus either to this window or one of its children, if you need + // to know whether this window accepts focus itself, use IsFocusable() + bool CanAcceptFocus() const + { return AcceptsFocusRecursively() && CanBeFocused(); } + + // can this window be assigned focus from keyboard right now? + bool CanAcceptFocusFromKeyboard() const + { return AcceptsFocusFromKeyboard() && CanBeFocused(); } + + // call this when the return value of AcceptsFocus() changes + virtual void SetCanFocus(bool WXUNUSED(canFocus)) { } + + // navigates inside this window + bool NavigateIn(int flags = wxNavigationKeyEvent::IsForward) + { return DoNavigateIn(flags); } + + // navigates in the specified direction from this window, this is + // equivalent to GetParent()->NavigateIn() + bool Navigate(int flags = wxNavigationKeyEvent::IsForward) + { return m_parent && ((wxWindowBase *)m_parent)->DoNavigateIn(flags); } + + // this function will generate the appropriate call to Navigate() if the + // key event is one normally used for keyboard navigation and return true + // in this case + bool HandleAsNavigationKey(const wxKeyEvent& event); + + // move this window just before/after the specified one in tab order + // (the other window must be our sibling!) + void MoveBeforeInTabOrder(wxWindow *win) + { DoMoveInTabOrder(win, OrderBefore); } + void MoveAfterInTabOrder(wxWindow *win) + { DoMoveInTabOrder(win, OrderAfter); } + + + // parent/children relations + // ------------------------- + + // get the list of children + const wxWindowList& GetChildren() const { return m_children; } + wxWindowList& GetChildren() { return m_children; } + + // needed just for extended runtime + const wxWindowList& GetWindowChildren() const { return GetChildren() ; } + + // get the window before/after this one in the parents children list, + // returns NULL if this is the first/last window + wxWindow *GetPrevSibling() const { return DoGetSibling(OrderBefore); } + wxWindow *GetNextSibling() const { return DoGetSibling(OrderAfter); } + + // get the parent or the parent of the parent + wxWindow *GetParent() const { return m_parent; } + inline wxWindow *GetGrandParent() const; + + // is this window a top level one? + virtual bool IsTopLevel() const; + + // is this window a child or grand child of this one (inside the same + // TLW)? + bool IsDescendant(wxWindowBase* win) const; + + // it doesn't really change parent, use Reparent() instead + void SetParent( wxWindowBase *parent ); + // change the real parent of this window, return true if the parent + // was changed, false otherwise (error or newParent == oldParent) + virtual bool Reparent( wxWindowBase *newParent ); + + // implementation mostly + virtual void AddChild( wxWindowBase *child ); + virtual void RemoveChild( wxWindowBase *child ); + + // returns true if the child is in the client area of the window, i.e. is + // not scrollbar, toolbar etc. + virtual bool IsClientAreaChild(const wxWindow *WXUNUSED(child)) const + { return true; } + + // looking for windows + // ------------------- + + // find window among the descendants of this one either by id or by + // name (return NULL if not found) + wxWindow *FindWindow(long winid) const; + wxWindow *FindWindow(const wxString& name) const; + + // Find a window among any window (all return NULL if not found) + static wxWindow *FindWindowById( long winid, const wxWindow *parent = NULL ); + static wxWindow *FindWindowByName( const wxString& name, + const wxWindow *parent = NULL ); + static wxWindow *FindWindowByLabel( const wxString& label, + const wxWindow *parent = NULL ); + + // event handler stuff + // ------------------- + + // get the current event handler + wxEvtHandler *GetEventHandler() const { return m_eventHandler; } + + // replace the event handler (allows to completely subclass the + // window) + void SetEventHandler( wxEvtHandler *handler ); + + // push/pop event handler: allows to chain a custom event handler to + // alreasy existing ones + void PushEventHandler( wxEvtHandler *handler ); + wxEvtHandler *PopEventHandler( bool deleteHandler = false ); + + // find the given handler in the event handler chain and remove (but + // not delete) it from the event handler chain, return true if it was + // found and false otherwise (this also results in an assert failure so + // this function should only be called when the handler is supposed to + // be there) + bool RemoveEventHandler(wxEvtHandler *handler); + + // Process an event by calling GetEventHandler()->ProcessEvent(): this + // is a straightforward replacement for ProcessEvent() itself which + // shouldn't be used directly with windows as it doesn't take into + // account any event handlers associated with the window + bool ProcessWindowEvent(wxEvent& event) + { return GetEventHandler()->ProcessEvent(event); } + + // Call GetEventHandler()->ProcessEventLocally(): this should be used + // instead of calling ProcessEventLocally() directly on the window + // itself as this wouldn't take any pushed event handlers into account + // correctly + bool ProcessWindowEventLocally(wxEvent& event) + { return GetEventHandler()->ProcessEventLocally(event); } + + // Process an event by calling GetEventHandler()->ProcessEvent() and + // handling any exceptions thrown by event handlers. It's mostly useful + // when processing wx events when called from C code (e.g. in GTK+ + // callback) when the exception wouldn't correctly propagate to + // wxEventLoop. + bool HandleWindowEvent(wxEvent& event) const; + + // disable wxEvtHandler double-linked list mechanism: + virtual void SetNextHandler(wxEvtHandler *handler); + virtual void SetPreviousHandler(wxEvtHandler *handler); + + + // Watcom doesn't allow reducing access with using access declaration, see + // #10749 +#ifndef __WATCOMC__ +protected: + + // NOTE: we change the access specifier of the following wxEvtHandler functions + // so that the user won't be able to call them directly. + // Calling wxWindow::ProcessEvent in fact only works when there are NO + // event handlers pushed on the window. + // To ensure correct operation, instead of wxWindow::ProcessEvent + // you must always call wxWindow::GetEventHandler()->ProcessEvent() + // or HandleWindowEvent(). + // The same holds for all other wxEvtHandler functions. + + using wxEvtHandler::ProcessEvent; + using wxEvtHandler::ProcessEventLocally; +#if wxUSE_THREADS + using wxEvtHandler::ProcessThreadEvent; +#endif + using wxEvtHandler::SafelyProcessEvent; + using wxEvtHandler::ProcessPendingEvents; + using wxEvtHandler::AddPendingEvent; + using wxEvtHandler::QueueEvent; +#endif // __WATCOMC__ + +public: + + // validators + // ---------- + +#if wxUSE_VALIDATORS + // a window may have an associated validator which is used to control + // user input + virtual void SetValidator( const wxValidator &validator ); + virtual wxValidator *GetValidator() { return m_windowValidator; } +#endif // wxUSE_VALIDATORS + + + // dialog oriented functions + // ------------------------- + + // validate the correctness of input, return true if ok + virtual bool Validate(); + + // transfer data between internal and GUI representations + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); + + virtual void InitDialog(); + +#if wxUSE_ACCEL + // accelerators + // ------------ + virtual void SetAcceleratorTable( const wxAcceleratorTable& accel ) + { m_acceleratorTable = accel; } + wxAcceleratorTable *GetAcceleratorTable() + { return &m_acceleratorTable; } + +#endif // wxUSE_ACCEL + +#if wxUSE_HOTKEY + // hot keys (system wide accelerators) + // ----------------------------------- + + virtual bool RegisterHotKey(int hotkeyId, int modifiers, int keycode); + virtual bool UnregisterHotKey(int hotkeyId); +#endif // wxUSE_HOTKEY + + + // dialog units translations + // ------------------------- + + wxPoint ConvertPixelsToDialog( const wxPoint& pt ) const; + wxPoint ConvertDialogToPixels( const wxPoint& pt ) const; + wxSize ConvertPixelsToDialog( const wxSize& sz ) const + { + wxPoint pt(ConvertPixelsToDialog(wxPoint(sz.x, sz.y))); + + return wxSize(pt.x, pt.y); + } + + wxSize ConvertDialogToPixels( const wxSize& sz ) const + { + wxPoint pt(ConvertDialogToPixels(wxPoint(sz.x, sz.y))); + + return wxSize(pt.x, pt.y); + } + + // mouse functions + // --------------- + + // move the mouse to the specified position + virtual void WarpPointer(int x, int y) = 0; + + // start or end mouse capture, these functions maintain the stack of + // windows having captured the mouse and after calling ReleaseMouse() + // the mouse is not released but returns to the window which had had + // captured it previously (if any) + void CaptureMouse(); + void ReleaseMouse(); + + // get the window which currently captures the mouse or NULL + static wxWindow *GetCapture(); + + // does this window have the capture? + virtual bool HasCapture() const + { return (wxWindow *)this == GetCapture(); } + + // painting the window + // ------------------- + + // mark the specified rectangle (or the whole window) as "dirty" so it + // will be repainted + virtual void Refresh( bool eraseBackground = true, + const wxRect *rect = (const wxRect *) NULL ) = 0; + + // a less awkward wrapper for Refresh + void RefreshRect(const wxRect& rect, bool eraseBackground = true) + { + Refresh(eraseBackground, &rect); + } + + // repaint all invalid areas of the window immediately + virtual void Update() { } + + // clear the window background + virtual void ClearBackground(); + + // freeze the window: don't redraw it until it is thawed + void Freeze(); + + // thaw the window: redraw it after it had been frozen + void Thaw(); + + // return true if window had been frozen and not unthawed yet + bool IsFrozen() const { return m_freezeCount != 0; } + + // adjust DC for drawing on this window + virtual void PrepareDC( wxDC & WXUNUSED(dc) ) { } + + // return true if the window contents is double buffered by the system + virtual bool IsDoubleBuffered() const { return false; } + + // the update region of the window contains the areas which must be + // repainted by the program + const wxRegion& GetUpdateRegion() const { return m_updateRegion; } + wxRegion& GetUpdateRegion() { return m_updateRegion; } + + // get the update rectangleregion bounding box in client coords + wxRect GetUpdateClientRect() const; + + // these functions verify whether the given point/rectangle belongs to + // (or at least intersects with) the update region + virtual bool DoIsExposed( int x, int y ) const; + virtual bool DoIsExposed( int x, int y, int w, int h ) const; + + bool IsExposed( int x, int y ) const + { return DoIsExposed(x, y); } + bool IsExposed( int x, int y, int w, int h ) const + { return DoIsExposed(x, y, w, h); } + bool IsExposed( const wxPoint& pt ) const + { return DoIsExposed(pt.x, pt.y); } + bool IsExposed( const wxRect& rect ) const + { return DoIsExposed(rect.x, rect.y, rect.width, rect.height); } + + // colours, fonts and cursors + // -------------------------- + + // get the default attributes for the controls of this class: we + // provide a virtual function which can be used to query the default + // attributes of an existing control and a static function which can + // be used even when no existing object of the given class is + // available, but which won't return any styles specific to this + // particular control, of course (e.g. "Ok" button might have + // different -- bold for example -- font) + virtual wxVisualAttributes GetDefaultAttributes() const + { + return GetClassDefaultAttributes(GetWindowVariant()); + } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + + // set/retrieve the window colours (system defaults are used by + // default): SetXXX() functions return true if colour was changed, + // SetDefaultXXX() reset the "m_inheritXXX" flag after setting the + // value to prevent it from being inherited by our children + virtual bool SetBackgroundColour(const wxColour& colour); + void SetOwnBackgroundColour(const wxColour& colour) + { + if ( SetBackgroundColour(colour) ) + m_inheritBgCol = false; + } + wxColour GetBackgroundColour() const; + bool InheritsBackgroundColour() const + { + return m_inheritBgCol; + } + bool UseBgCol() const + { + return m_hasBgCol; + } + + virtual bool SetForegroundColour(const wxColour& colour); + void SetOwnForegroundColour(const wxColour& colour) + { + if ( SetForegroundColour(colour) ) + m_inheritFgCol = false; + } + wxColour GetForegroundColour() const; + + // Set/get the background style. + virtual bool SetBackgroundStyle(wxBackgroundStyle style); + wxBackgroundStyle GetBackgroundStyle() const + { return m_backgroundStyle; } + + // returns true if the control has "transparent" areas such as a + // wxStaticText and wxCheckBox and the background should be adapted + // from a parent window + virtual bool HasTransparentBackground() { return false; } + + // Returns true if background transparency is supported for this + // window, i.e. if calling SetBackgroundStyle(wxBG_STYLE_TRANSPARENT) + // has a chance of succeeding. If reason argument is non-NULL, returns a + // user-readable explanation of why it isn't supported if the return + // value is false. + virtual bool IsTransparentBackgroundSupported(wxString* reason = NULL) const; + + // set/retrieve the font for the window (SetFont() returns true if the + // font really changed) + virtual bool SetFont(const wxFont& font) = 0; + void SetOwnFont(const wxFont& font) + { + if ( SetFont(font) ) + m_inheritFont = false; + } + wxFont GetFont() const; + + // set/retrieve the cursor for this window (SetCursor() returns true + // if the cursor was really changed) + virtual bool SetCursor( const wxCursor &cursor ); + const wxCursor& GetCursor() const { return m_cursor; } + +#if wxUSE_CARET + // associate a caret with the window + void SetCaret(wxCaret *caret); + // get the current caret (may be NULL) + wxCaret *GetCaret() const { return m_caret; } +#endif // wxUSE_CARET + + // get the (average) character size for the current font + virtual int GetCharHeight() const = 0; + virtual int GetCharWidth() const = 0; + + // get the width/height/... of the text using current or specified + // font + void GetTextExtent(const wxString& string, + int *x, int *y, + int *descent = NULL, + int *externalLeading = NULL, + const wxFont *font = NULL) const + { + DoGetTextExtent(string, x, y, descent, externalLeading, font); + } + + wxSize GetTextExtent(const wxString& string) const + { + wxCoord w, h; + GetTextExtent(string, &w, &h); + return wxSize(w, h); + } + + // client <-> screen coords + // ------------------------ + + // translate to/from screen/client coordinates (pointers may be NULL) + void ClientToScreen( int *x, int *y ) const + { DoClientToScreen(x, y); } + void ScreenToClient( int *x, int *y ) const + { DoScreenToClient(x, y); } + + // wxPoint interface to do the same thing + wxPoint ClientToScreen(const wxPoint& pt) const + { + int x = pt.x, y = pt.y; + DoClientToScreen(&x, &y); + + return wxPoint(x, y); + } + + wxPoint ScreenToClient(const wxPoint& pt) const + { + int x = pt.x, y = pt.y; + DoScreenToClient(&x, &y); + + return wxPoint(x, y); + } + + // test where the given (in client coords) point lies + wxHitTest HitTest(wxCoord x, wxCoord y) const + { return DoHitTest(x, y); } + + wxHitTest HitTest(const wxPoint& pt) const + { return DoHitTest(pt.x, pt.y); } + + // misc + // ---- + + // get the window border style from the given flags: this is different from + // simply doing flags & wxBORDER_MASK because it uses GetDefaultBorder() to + // translate wxBORDER_DEFAULT to something reasonable + wxBorder GetBorder(long flags) const; + + // get border for the flags of this window + wxBorder GetBorder() const { return GetBorder(GetWindowStyleFlag()); } + + // send wxUpdateUIEvents to this window, and children if recurse is true + virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE); + + // do the window-specific processing after processing the update event + virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ; + +#if wxUSE_MENUS + // show popup menu at the given position, generate events for the items + // selected in it + bool PopupMenu(wxMenu *menu, const wxPoint& pos = wxDefaultPosition) + { return PopupMenu(menu, pos.x, pos.y); } + bool PopupMenu(wxMenu *menu, int x, int y); + + // simply return the id of the selected item or wxID_NONE without + // generating any events + int GetPopupMenuSelectionFromUser(wxMenu& menu, + const wxPoint& pos = wxDefaultPosition) + { return DoGetPopupMenuSelectionFromUser(menu, pos.x, pos.y); } + int GetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y) + { return DoGetPopupMenuSelectionFromUser(menu, x, y); } +#endif // wxUSE_MENUS + + // override this method to return true for controls having multiple pages + virtual bool HasMultiplePages() const { return false; } + + + // scrollbars + // ---------- + + // can the window have the scrollbar in this orientation? + virtual bool CanScroll(int orient) const; + + // does the window have the scrollbar in this orientation? + bool HasScrollbar(int orient) const; + + // configure the window scrollbars + virtual void SetScrollbar( int orient, + int pos, + int thumbvisible, + int range, + bool refresh = true ) = 0; + virtual void SetScrollPos( int orient, int pos, bool refresh = true ) = 0; + virtual int GetScrollPos( int orient ) const = 0; + virtual int GetScrollThumb( int orient ) const = 0; + virtual int GetScrollRange( int orient ) const = 0; + + // scroll window to the specified position + virtual void ScrollWindow( int dx, int dy, + const wxRect* rect = NULL ) = 0; + + // scrolls window by line/page: note that not all controls support this + // + // return true if the position changed, false otherwise + virtual bool ScrollLines(int WXUNUSED(lines)) { return false; } + virtual bool ScrollPages(int WXUNUSED(pages)) { return false; } + + // convenient wrappers for ScrollLines/Pages + bool LineUp() { return ScrollLines(-1); } + bool LineDown() { return ScrollLines(1); } + bool PageUp() { return ScrollPages(-1); } + bool PageDown() { return ScrollPages(1); } + + // call this to always show one or both scrollbars, even if the window + // is big enough to not require them + virtual void AlwaysShowScrollbars(bool WXUNUSED(horz) = true, + bool WXUNUSED(vert) = true) + { + } + + // return true if AlwaysShowScrollbars() had been called before for the + // corresponding orientation + virtual bool IsScrollbarAlwaysShown(int WXUNUSED(orient)) const + { + return false; + } + + // context-sensitive help + // ---------------------- + + // these are the convenience functions wrapping wxHelpProvider methods + +#if wxUSE_HELP + // associate this help text with this window + void SetHelpText(const wxString& text); + +#if WXWIN_COMPATIBILITY_2_8 + // Associate this help text with all windows with the same id as this one. + // Don't use this, do wxHelpProvider::Get()->AddHelp(id, text); + wxDEPRECATED( void SetHelpTextForId(const wxString& text) ); +#endif // WXWIN_COMPATIBILITY_2_8 + + // get the help string associated with the given position in this window + // + // notice that pt may be invalid if event origin is keyboard or unknown + // and this method should return the global window help text then + virtual wxString GetHelpTextAtPoint(const wxPoint& pt, + wxHelpEvent::Origin origin) const; + // returns the position-independent help text + wxString GetHelpText() const + { + return GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Unknown); + } + +#else // !wxUSE_HELP + // silently ignore SetHelpText() calls + void SetHelpText(const wxString& WXUNUSED(text)) { } + void SetHelpTextForId(const wxString& WXUNUSED(text)) { } +#endif // wxUSE_HELP + + // tooltips + // -------- + +#if wxUSE_TOOLTIPS + // the easiest way to set a tooltip for a window is to use this method + void SetToolTip( const wxString &tip ); + // attach a tooltip to the window, pointer can be NULL to remove + // existing tooltip + void SetToolTip( wxToolTip *tip ) { DoSetToolTip(tip); } + // more readable synonym for SetToolTip(NULL) + void UnsetToolTip() { SetToolTip(NULL); } + // get the associated tooltip or NULL if none + wxToolTip* GetToolTip() const { return m_tooltip; } + wxString GetToolTipText() const; + + // Use the same tool tip as the given one (which can be NULL to indicate + // that no tooltip should be used) for this window. This is currently only + // used by wxCompositeWindow::DoSetToolTip() implementation and is not part + // of the public wx API. + // + // Returns true if tip was valid and we copied it or false if it was NULL + // and we reset our own tooltip too. + bool CopyToolTip(wxToolTip *tip); +#else // !wxUSE_TOOLTIPS + // make it much easier to compile apps in an environment + // that doesn't support tooltips, such as PocketPC + void SetToolTip(const wxString & WXUNUSED(tip)) { } + void UnsetToolTip() { } +#endif // wxUSE_TOOLTIPS/!wxUSE_TOOLTIPS + + // drag and drop + // ------------- +#if wxUSE_DRAG_AND_DROP + // set/retrieve the drop target associated with this window (may be + // NULL; it's owned by the window and will be deleted by it) + virtual void SetDropTarget( wxDropTarget *dropTarget ) = 0; + virtual wxDropTarget *GetDropTarget() const { return m_dropTarget; } + + // Accept files for dragging + virtual void DragAcceptFiles(bool accept) +#ifdef __WXMSW__ + // it does have common implementation but not for MSW which has its own + // native version of it + = 0 +#endif // __WXMSW__ + ; + +#endif // wxUSE_DRAG_AND_DROP + + // constraints and sizers + // ---------------------- +#if wxUSE_CONSTRAINTS + // set the constraints for this window or retrieve them (may be NULL) + void SetConstraints( wxLayoutConstraints *constraints ); + wxLayoutConstraints *GetConstraints() const { return m_constraints; } + + // implementation only + void UnsetConstraints(wxLayoutConstraints *c); + wxWindowList *GetConstraintsInvolvedIn() const + { return m_constraintsInvolvedIn; } + void AddConstraintReference(wxWindowBase *otherWin); + void RemoveConstraintReference(wxWindowBase *otherWin); + void DeleteRelatedConstraints(); + void ResetConstraints(); + + // these methods may be overridden for special layout algorithms + virtual void SetConstraintSizes(bool recurse = true); + virtual bool LayoutPhase1(int *noChanges); + virtual bool LayoutPhase2(int *noChanges); + virtual bool DoPhase(int phase); + + // these methods are virtual but normally won't be overridden + virtual void SetSizeConstraint(int x, int y, int w, int h); + virtual void MoveConstraint(int x, int y); + virtual void GetSizeConstraint(int *w, int *h) const ; + virtual void GetClientSizeConstraint(int *w, int *h) const ; + virtual void GetPositionConstraint(int *x, int *y) const ; + +#endif // wxUSE_CONSTRAINTS + + // when using constraints or sizers, it makes sense to update + // children positions automatically whenever the window is resized + // - this is done if autoLayout is on + void SetAutoLayout( bool autoLayout ) { m_autoLayout = autoLayout; } + bool GetAutoLayout() const { return m_autoLayout; } + + // lay out the window and its children + virtual bool Layout(); + + // sizers + void SetSizer(wxSizer *sizer, bool deleteOld = true ); + void SetSizerAndFit( wxSizer *sizer, bool deleteOld = true ); + + wxSizer *GetSizer() const { return m_windowSizer; } + + // Track if this window is a member of a sizer + void SetContainingSizer(wxSizer* sizer); + wxSizer *GetContainingSizer() const { return m_containingSizer; } + + // accessibility + // ---------------------- +#if wxUSE_ACCESSIBILITY + // Override to create a specific accessible object. + virtual wxAccessible* CreateAccessible(); + + // Sets the accessible object. + void SetAccessible(wxAccessible* accessible) ; + + // Returns the accessible object. + wxAccessible* GetAccessible() { return m_accessible; } + + // Returns the accessible object, creating if necessary. + wxAccessible* GetOrCreateAccessible() ; +#endif + + + // Set window transparency if the platform supports it + virtual bool SetTransparent(wxByte WXUNUSED(alpha)) { return false; } + virtual bool CanSetTransparent() { return false; } + + + // implementation + // -------------- + + // event handlers + void OnSysColourChanged( wxSysColourChangedEvent& event ); + void OnInitDialog( wxInitDialogEvent &event ); + void OnMiddleClick( wxMouseEvent& event ); +#if wxUSE_HELP + void OnHelp(wxHelpEvent& event); +#endif // wxUSE_HELP + + // virtual function for implementing internal idle + // behaviour + virtual void OnInternalIdle(); + + // Send idle event to window and all subwindows + // Returns true if more idle time is requested. + virtual bool SendIdleEvents(wxIdleEvent& event); + + // get the handle of the window for the underlying window system: this + // is only used for wxWin itself or for user code which wants to call + // platform-specific APIs + virtual WXWidget GetHandle() const = 0; + // associate the window with a new native handle + virtual void AssociateHandle(WXWidget WXUNUSED(handle)) { } + // dissociate the current native handle from the window + virtual void DissociateHandle() { } + +#if wxUSE_PALETTE + // Store the palette used by DCs in wxWindow so that the dcs can share + // a palette. And we can respond to palette messages. + wxPalette GetPalette() const { return m_palette; } + + // When palette is changed tell the DC to set the system palette to the + // new one. + void SetPalette(const wxPalette& pal); + + // return true if we have a specific palette + bool HasCustomPalette() const { return m_hasCustomPalette; } + + // return the first parent window with a custom palette or NULL + wxWindow *GetAncestorWithCustomPalette() const; +#endif // wxUSE_PALETTE + + // inherit the parents visual attributes if they had been explicitly set + // by the user (i.e. we don't inherit default attributes) and if we don't + // have our own explicitly set + virtual void InheritAttributes(); + + // returns false from here if this window doesn't want to inherit the + // parents colours even if InheritAttributes() would normally do it + // + // this just provides a simple way to customize InheritAttributes() + // behaviour in the most common case + virtual bool ShouldInheritColours() const { return false; } + + // returns true if the window can be positioned outside of parent's client + // area (normal windows can't, but e.g. menubar or statusbar can): + virtual bool CanBeOutsideClientArea() const { return false; } + + // returns true if the platform should explicitly apply a theme border. Currently + // used only by Windows + virtual bool CanApplyThemeBorder() const { return true; } + + // returns the main window of composite control; this is the window + // that FindFocus returns if the focus is in one of composite control's + // windows + virtual wxWindow *GetMainWindowOfCompositeControl() + { return (wxWindow*)this; } + + // If this function returns true, keyboard navigation events shouldn't + // escape from it. A typical example of such "navigation domain" is a top + // level window because pressing TAB in one of them must not transfer focus + // to a different top level window. But it's not limited to them, e.g. MDI + // children frames are not top level windows (and their IsTopLevel() + // returns false) but still are self-contained navigation domains as well. + virtual bool IsTopNavigationDomain() const { return false; } + + +protected: + // helper for the derived class Create() methods: the first overload, with + // validator parameter, should be used for child windows while the second + // one is used for top level ones + bool CreateBase(wxWindowBase *parent, + wxWindowID winid, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxPanelNameStr); + + bool CreateBase(wxWindowBase *parent, + wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name); + + // event handling specific to wxWindow + virtual bool TryBefore(wxEvent& event); + virtual bool TryAfter(wxEvent& event); + + enum WindowOrder + { + OrderBefore, // insert before the given window + OrderAfter // insert after the given window + }; + + // common part of GetPrev/NextSibling() + wxWindow *DoGetSibling(WindowOrder order) const; + + // common part of MoveBefore/AfterInTabOrder() + virtual void DoMoveInTabOrder(wxWindow *win, WindowOrder move); + + // implementation of Navigate() and NavigateIn() + virtual bool DoNavigateIn(int flags); + +#if wxUSE_CONSTRAINTS + // satisfy the constraints for the windows but don't set the window sizes + void SatisfyConstraints(); +#endif // wxUSE_CONSTRAINTS + + // Send the wxWindowDestroyEvent if not done yet and sets m_isBeingDeleted + // to true + void SendDestroyEvent(); + + // this method should be implemented to use operating system specific code + // to really enable/disable the widget, it will only be called when we + // really need to enable/disable window and so no additional checks on the + // widgets state are necessary + virtual void DoEnable(bool WXUNUSED(enable)) { } + + + // the window id - a number which uniquely identifies a window among + // its siblings unless it is wxID_ANY + wxWindowIDRef m_windowId; + + // the parent window of this window (or NULL) and the list of the children + // of this window + wxWindow *m_parent; + wxWindowList m_children; + + // the minimal allowed size for the window (no minimal size if variable(s) + // contain(s) wxDefaultCoord) + int m_minWidth, + m_minHeight, + m_maxWidth, + m_maxHeight; + + // event handler for this window: usually is just 'this' but may be + // changed with SetEventHandler() + wxEvtHandler *m_eventHandler; + +#if wxUSE_VALIDATORS + // associated validator or NULL if none + wxValidator *m_windowValidator; +#endif // wxUSE_VALIDATORS + +#if wxUSE_DRAG_AND_DROP + wxDropTarget *m_dropTarget; +#endif // wxUSE_DRAG_AND_DROP + + // visual window attributes + wxCursor m_cursor; + wxFont m_font; // see m_hasFont + wxColour m_backgroundColour, // m_hasBgCol + m_foregroundColour; // m_hasFgCol + +#if wxUSE_CARET + wxCaret *m_caret; +#endif // wxUSE_CARET + + // the region which should be repainted in response to paint event + wxRegion m_updateRegion; + +#if wxUSE_ACCEL + // the accelerator table for the window which translates key strokes into + // command events + wxAcceleratorTable m_acceleratorTable; +#endif // wxUSE_ACCEL + + // the tooltip for this window (may be NULL) +#if wxUSE_TOOLTIPS + wxToolTip *m_tooltip; +#endif // wxUSE_TOOLTIPS + + // constraints and sizers +#if wxUSE_CONSTRAINTS + // the constraints for this window or NULL + wxLayoutConstraints *m_constraints; + + // constraints this window is involved in + wxWindowList *m_constraintsInvolvedIn; +#endif // wxUSE_CONSTRAINTS + + // this window's sizer + wxSizer *m_windowSizer; + + // The sizer this window is a member of, if any + wxSizer *m_containingSizer; + + // Layout() window automatically when its size changes? + bool m_autoLayout:1; + + // window state + bool m_isShown:1; + bool m_isEnabled:1; + bool m_isBeingDeleted:1; + + // was the window colours/font explicitly changed by user? + bool m_hasBgCol:1; + bool m_hasFgCol:1; + bool m_hasFont:1; + + // and should it be inherited by children? + bool m_inheritBgCol:1; + bool m_inheritFgCol:1; + bool m_inheritFont:1; + + // window attributes + long m_windowStyle, + m_exStyle; + wxString m_windowName; + bool m_themeEnabled; + wxBackgroundStyle m_backgroundStyle; +#if wxUSE_PALETTE + wxPalette m_palette; + bool m_hasCustomPalette; +#endif // wxUSE_PALETTE + +#if wxUSE_ACCESSIBILITY + wxAccessible* m_accessible; +#endif + + // Virtual size (scrolling) + wxSize m_virtualSize; + + wxScrollHelper *m_scrollHelper; + + wxWindowVariant m_windowVariant ; + + // override this to change the default (i.e. used when no style is + // specified) border for the window class + virtual wxBorder GetDefaultBorder() const; + + // this allows you to implement standard control borders without + // repeating the code in different classes that are not derived from + // wxControl + virtual wxBorder GetDefaultBorderForControl() const { return wxBORDER_THEME; } + + // Get the default size for the new window if no explicit size given. TLWs + // have their own default size so this is just for non top-level windows. + static int WidthDefault(int w) { return w == wxDefaultCoord ? 20 : w; } + static int HeightDefault(int h) { return h == wxDefaultCoord ? 20 : h; } + + + // Used to save the results of DoGetBestSize so it doesn't need to be + // recalculated each time the value is needed. + wxSize m_bestSizeCache; + + wxDEPRECATED_MSG("use SetInitialSize() instead.") + void SetBestSize(const wxSize& size); + wxDEPRECATED_MSG("use SetInitialSize() instead.") + virtual void SetInitialBestSize(const wxSize& size); + + + + // more pure virtual functions + // --------------------------- + + // NB: we must have DoSomething() function when Something() is an overloaded + // method: indeed, we can't just have "virtual Something()" in case when + // the function is overloaded because then we'd have to make virtual all + // the variants (otherwise only the virtual function may be called on a + // pointer to derived class according to C++ rules) which is, in + // general, absolutely not needed. So instead we implement all + // overloaded Something()s in terms of DoSomething() which will be the + // only one to be virtual. + + // text extent + virtual void DoGetTextExtent(const wxString& string, + int *x, int *y, + int *descent = NULL, + int *externalLeading = NULL, + const wxFont *font = NULL) const = 0; + + // coordinates translation + virtual void DoClientToScreen( int *x, int *y ) const = 0; + virtual void DoScreenToClient( int *x, int *y ) const = 0; + + virtual wxHitTest DoHitTest(wxCoord x, wxCoord y) const; + + // capture/release the mouse, used by Capture/ReleaseMouse() + virtual void DoCaptureMouse() = 0; + virtual void DoReleaseMouse() = 0; + + // retrieve the position/size of the window + virtual void DoGetPosition(int *x, int *y) const = 0; + virtual void DoGetScreenPosition(int *x, int *y) const; + virtual void DoGetSize(int *width, int *height) const = 0; + virtual void DoGetClientSize(int *width, int *height) const = 0; + + // get the size which best suits the window: for a control, it would be + // the minimal size which doesn't truncate the control, for a panel - the + // same size as it would have after a call to Fit() + virtual wxSize DoGetBestSize() const; + + // this method can be overridden instead of DoGetBestSize() if it computes + // the best size of the client area of the window only, excluding borders + // (GetBorderSize() will be used to add them) + virtual wxSize DoGetBestClientSize() const { return wxDefaultSize; } + + // These two methods can be overridden to implement intelligent + // width-for-height and/or height-for-width best size determination for the + // window. By default the fixed best size is used. + virtual int DoGetBestClientHeight(int WXUNUSED(width)) const + { return wxDefaultCoord; } + virtual int DoGetBestClientWidth(int WXUNUSED(height)) const + { return wxDefaultCoord; } + + // this is the virtual function to be overridden in any derived class which + // wants to change how SetSize() or Move() works - it is called by all + // versions of these functions in the base class + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO) = 0; + + // same as DoSetSize() for the client size + virtual void DoSetClientSize(int width, int height) = 0; + + virtual void DoSetSizeHints( int minW, int minH, + int maxW, int maxH, + int incW, int incH ); + + // return the total size of the window borders, i.e. the sum of the widths + // of the left and the right border in the x component of the returned size + // and the sum of the heights of the top and bottom borders in the y one + // + // NB: this is currently only implemented properly for wxMSW, wxGTK and + // wxUniv and doesn't behave correctly in the presence of scrollbars in + // the other ports + virtual wxSize DoGetBorderSize() const; + + // move the window to the specified location and resize it: this is called + // from both DoSetSize() and DoSetClientSize() and would usually just + // reposition this window except for composite controls which will want to + // arrange themselves inside the given rectangle + // + // Important note: the coordinates passed to this method are in parent's + // *window* coordinates and not parent's client coordinates (as the values + // passed to DoSetSize and returned by DoGetPosition are)! + virtual void DoMoveWindow(int x, int y, int width, int height) = 0; + + // centre the window in the specified direction on parent, note that + // wxCENTRE_ON_SCREEN shouldn't be specified here, it only makes sense for + // TLWs + virtual void DoCentre(int dir); + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip( wxToolTip *tip ); +#endif // wxUSE_TOOLTIPS + +#if wxUSE_MENUS + virtual bool DoPopupMenu(wxMenu *menu, int x, int y) = 0; +#endif // wxUSE_MENUS + + // Makes an adjustment to the window position to make it relative to the + // parents client area, e.g. if the parent is a frame with a toolbar, its + // (0, 0) is just below the toolbar + virtual void AdjustForParentClientOrigin(int& x, int& y, + int sizeFlags = 0) const; + + // implements the window variants + virtual void DoSetWindowVariant( wxWindowVariant variant ) ; + + + // really freeze/thaw the window (should have port-specific implementation) + virtual void DoFreeze() { } + virtual void DoThaw() { } + + + // Must be called when mouse capture is lost to send + // wxMouseCaptureLostEvent to windows on capture stack. + static void NotifyCaptureLost(); + +private: + // recursively call our own and our children DoEnable() when the + // enabled/disabled status changed because a parent window had been + // enabled/disabled + void NotifyWindowOnEnableChange(bool enabled); + +#if wxUSE_MENUS + // temporary event handlers used by GetPopupMenuSelectionFromUser() + void InternalOnPopupMenu(wxCommandEvent& event); + void InternalOnPopupMenuUpdate(wxUpdateUIEvent& event); + + // implementation of the public GetPopupMenuSelectionFromUser() method + int DoGetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y); +#endif // wxUSE_MENUS + + // layout the window children when its size changes unless this was + // explicitly disabled with SetAutoLayout(false) + void InternalOnSize(wxSizeEvent& event); + + // base for dialog unit conversion, i.e. average character size + wxSize GetDlgUnitBase() const; + + + // number of Freeze() calls minus the number of Thaw() calls: we're frozen + // (i.e. not being updated) if it is positive + unsigned int m_freezeCount; + + + DECLARE_ABSTRACT_CLASS(wxWindowBase) + wxDECLARE_NO_COPY_CLASS(wxWindowBase); + DECLARE_EVENT_TABLE() +}; + + + +// Inlines for some deprecated methods +inline wxSize wxWindowBase::GetBestFittingSize() const +{ + return GetEffectiveMinSize(); +} + +inline void wxWindowBase::SetBestFittingSize(const wxSize& size) +{ + SetInitialSize(size); +} + +inline void wxWindowBase::SetBestSize(const wxSize& size) +{ + SetInitialSize(size); +} + +inline void wxWindowBase::SetInitialBestSize(const wxSize& size) +{ + SetInitialSize(size); +} + + +// ---------------------------------------------------------------------------- +// now include the declaration of wxWindow class +// ---------------------------------------------------------------------------- + +// include the declaration of the platform-specific class +#if defined(__WXMSW__) + #ifdef __WXUNIVERSAL__ + #define wxWindowNative wxWindowMSW + #else // !wxUniv + #define wxWindowMSW wxWindow + #endif // wxUniv/!wxUniv + #include "wx/msw/window.h" +#elif defined(__WXMOTIF__) + #include "wx/motif/window.h" +#elif defined(__WXGTK20__) + #ifdef __WXUNIVERSAL__ + #define wxWindowNative wxWindowGTK + #else // !wxUniv + #define wxWindowGTK wxWindow + #endif // wxUniv + #include "wx/gtk/window.h" +#elif defined(__WXGTK__) + #ifdef __WXUNIVERSAL__ + #define wxWindowNative wxWindowGTK + #else // !wxUniv + #define wxWindowGTK wxWindow + #endif // wxUniv + #include "wx/gtk1/window.h" +#elif defined(__WXX11__) + #ifdef __WXUNIVERSAL__ + #define wxWindowNative wxWindowX11 + #else // !wxUniv + #define wxWindowX11 wxWindow + #endif // wxUniv + #include "wx/x11/window.h" +#elif defined(__WXDFB__) + #define wxWindowNative wxWindowDFB + #include "wx/dfb/window.h" +#elif defined(__WXMAC__) + #ifdef __WXUNIVERSAL__ + #define wxWindowNative wxWindowMac + #else // !wxUniv + #define wxWindowMac wxWindow + #endif // wxUniv + #include "wx/osx/window.h" +#elif defined(__WXCOCOA__) + #ifdef __WXUNIVERSAL__ + #define wxWindowNative wxWindowCocoa + #else // !wxUniv + #define wxWindowCocoa wxWindow + #endif // wxUniv + #include "wx/cocoa/window.h" +#elif defined(__WXPM__) + #ifdef __WXUNIVERSAL__ + #define wxWindowNative wxWindowOS2 + #else // !wxUniv + #define wxWindowOS2 wxWindow + #endif // wxUniv/!wxUniv + #include "wx/os2/window.h" +#endif + +// for wxUniversal, we now derive the real wxWindow from wxWindow<platform>, +// for the native ports we already have defined it above +#if defined(__WXUNIVERSAL__) + #ifndef wxWindowNative + #error "wxWindowNative must be defined above!" + #endif + + #include "wx/univ/window.h" +#endif // wxUniv + +// ---------------------------------------------------------------------------- +// inline functions which couldn't be declared in the class body because of +// forward dependencies +// ---------------------------------------------------------------------------- + +inline wxWindow *wxWindowBase::GetGrandParent() const +{ + return m_parent ? m_parent->GetParent() : NULL; +} + +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +// Find the wxWindow at the current mouse position, also returning the mouse +// position. +extern WXDLLIMPEXP_CORE wxWindow* wxFindWindowAtPointer(wxPoint& pt); + +// Get the current mouse position. +extern WXDLLIMPEXP_CORE wxPoint wxGetMousePosition(); + +// get the currently active window of this application or NULL +extern WXDLLIMPEXP_CORE wxWindow *wxGetActiveWindow(); + +// get the (first) top level parent window +WXDLLIMPEXP_CORE wxWindow* wxGetTopLevelParent(wxWindow *win); + +#if WXWIN_COMPATIBILITY_2_6 + wxDEPRECATED_MSG("use wxWindow::NewControlId() instead") + inline wxWindowID NewControlId() { return wxWindowBase::NewControlId(); } +#endif // WXWIN_COMPATIBILITY_2_6 + +#if wxUSE_ACCESSIBILITY +// ---------------------------------------------------------------------------- +// accessible object for windows +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowAccessible: public wxAccessible +{ +public: + wxWindowAccessible(wxWindow* win): wxAccessible(win) { if (win) win->SetAccessible(this); } + virtual ~wxWindowAccessible() {} + +// Overridables + + // Can return either a child object, or an integer + // representing the child element, starting from 1. + virtual wxAccStatus HitTest(const wxPoint& pt, int* childId, wxAccessible** childObject); + + // Returns the rectangle for this object (id = 0) or a child element (id > 0). + virtual wxAccStatus GetLocation(wxRect& rect, int elementId); + + // Navigates from fromId to toId/toObject. + virtual wxAccStatus Navigate(wxNavDir navDir, int fromId, + int* toId, wxAccessible** toObject); + + // Gets the name of the specified object. + virtual wxAccStatus GetName(int childId, wxString* name); + + // Gets the number of children. + virtual wxAccStatus GetChildCount(int* childCount); + + // Gets the specified child (starting from 1). + // If *child is NULL and return value is wxACC_OK, + // this means that the child is a simple element and + // not an accessible object. + virtual wxAccStatus GetChild(int childId, wxAccessible** child); + + // Gets the parent, or NULL. + virtual wxAccStatus GetParent(wxAccessible** parent); + + // Performs the default action. childId is 0 (the action for this object) + // or > 0 (the action for a child). + // Return wxACC_NOT_SUPPORTED if there is no default action for this + // window (e.g. an edit control). + virtual wxAccStatus DoDefaultAction(int childId); + + // Gets the default action for this object (0) or > 0 (the action for a child). + // Return wxACC_OK even if there is no action. actionName is the action, or the empty + // string if there is no action. + // The retrieved string describes the action that is performed on an object, + // not what the object does as a result. For example, a toolbar button that prints + // a document has a default action of "Press" rather than "Prints the current document." + virtual wxAccStatus GetDefaultAction(int childId, wxString* actionName); + + // Returns the description for this object or a child. + virtual wxAccStatus GetDescription(int childId, wxString* description); + + // Returns help text for this object or a child, similar to tooltip text. + virtual wxAccStatus GetHelpText(int childId, wxString* helpText); + + // Returns the keyboard shortcut for this object or child. + // Return e.g. ALT+K + virtual wxAccStatus GetKeyboardShortcut(int childId, wxString* shortcut); + + // Returns a role constant. + virtual wxAccStatus GetRole(int childId, wxAccRole* role); + + // Returns a state constant. + virtual wxAccStatus GetState(int childId, long* state); + + // Returns a localized string representing the value for the object + // or child. + virtual wxAccStatus GetValue(int childId, wxString* strValue); + + // Selects the object or child. + virtual wxAccStatus Select(int childId, wxAccSelectionFlags selectFlags); + + // Gets the window with the keyboard focus. + // If childId is 0 and child is NULL, no object in + // this subhierarchy has the focus. + // If this object has the focus, child should be 'this'. + virtual wxAccStatus GetFocus(int* childId, wxAccessible** child); + +#if wxUSE_VARIANT + // Gets a variant representing the selected children + // of this object. + // Acceptable values: + // - a null variant (IsNull() returns true) + // - a list variant (GetType() == wxT("list") + // - an integer representing the selected child element, + // or 0 if this object is selected (GetType() == wxT("long") + // - a "void*" pointer to a wxAccessible child object + virtual wxAccStatus GetSelections(wxVariant* selections); +#endif // wxUSE_VARIANT +}; + +#endif // wxUSE_ACCESSIBILITY + + +#endif // _WX_WINDOW_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/windowid.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/windowid.h new file mode 100644 index 0000000000..0c174b5f0c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/windowid.h @@ -0,0 +1,189 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/windowid.h +// Purpose: wxWindowID class - a class for managing window ids +// Author: Brian Vanderburg II +// Created: 2007-09-21 +// Copyright: (c) 2007 Brian Vanderburg II +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WINDOWID_H_ +#define _WX_WINDOWID_H_ + +// NB: do not include defs.h as we are included from it + +typedef int wxWindowID; + +// ---------------------------------------------------------------------------- +// wxWindowIDRef: reference counted id value +// ---------------------------------------------------------------------------- + +// A wxWindowIDRef object wraps an id value and marks it as (un)used as +// necessary. All ids returned from wxWindow::NewControlId() should be assigned +// to an instance of this class to ensure that the id is marked as being in +// use. +// +// This class is always defined but it is trivial if wxUSE_AUTOID_MANAGEMENT is +// off. +class WXDLLIMPEXP_CORE wxWindowIDRef +{ +public: + // default ctor + wxWindowIDRef() + { + m_id = wxID_NONE; + } + + // ctor taking id values + wxWindowIDRef(int id) + { + Init(id); + } + + wxWindowIDRef(long id) + { + Init(wxWindowID(id)); + } + + wxWindowIDRef(const wxWindowIDRef& id) + { + Init(id.m_id); + } + + // dtor + ~wxWindowIDRef() + { + Assign(wxID_NONE); + } + + // assignment + wxWindowIDRef& operator=(int id) + { + Assign(id); + return *this; + } + + wxWindowIDRef& operator=(long id) + { + Assign(wxWindowID(id)); + return *this; + } + + wxWindowIDRef& operator=(const wxWindowIDRef& id) + { + if (&id != this) + Assign(id.m_id); + return *this; + } + + // access to the stored id value + wxWindowID GetValue() const + { + return m_id; + } + + operator wxWindowID() const + { + return m_id; + } + +private: +#if wxUSE_AUTOID_MANAGEMENT + // common part of all ctors: call Assign() for our new id + void Init(wxWindowID id) + { + // m_id must be initialized before calling Assign() + m_id = wxID_NONE; + Assign(id); + } + + // increase reference count of id, decrease the one of m_id + void Assign(wxWindowID id); +#else // !wxUSE_AUTOID_MANAGEMENT + // trivial stubs for the functions above + void Init(wxWindowID id) + { + m_id = id; + } + + void Assign(wxWindowID id) + { + m_id = id; + } +#endif // wxUSE_AUTOID_MANAGEMENT/!wxUSE_AUTOID_MANAGEMENT + + + wxWindowID m_id; +}; + +// comparison operators +inline bool operator==(const wxWindowIDRef& lhs, const wxWindowIDRef& rhs) +{ + return lhs.GetValue() == rhs.GetValue(); +} + +inline bool operator==(const wxWindowIDRef& lhs, int rhs) +{ + return lhs.GetValue() == rhs; +} + +inline bool operator==(const wxWindowIDRef& lhs, long rhs) +{ + return lhs.GetValue() == rhs; +} + +inline bool operator==(int lhs, const wxWindowIDRef& rhs) +{ + return rhs == lhs; +} + +inline bool operator==(long lhs, const wxWindowIDRef& rhs) +{ + return rhs == lhs; +} + +inline bool operator!=(const wxWindowIDRef& lhs, const wxWindowIDRef& rhs) +{ + return !(lhs == rhs); +} + +inline bool operator!=(const wxWindowIDRef& lhs, int rhs) +{ + return !(lhs == rhs); +} + +inline bool operator!=(const wxWindowIDRef& lhs, long rhs) +{ + return !(lhs == rhs); +} + +inline bool operator!=(int lhs, const wxWindowIDRef& rhs) +{ + return !(lhs == rhs); +} + +inline bool operator!=(long lhs, const wxWindowIDRef& rhs) +{ + return !(lhs == rhs); +} + +// ---------------------------------------------------------------------------- +// wxIdManager +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxIdManager +{ +public: + // This returns an id value and not an wxWindowIDRef. The returned value + // should be assigned a.s.a.p to a wxWindowIDRef. The IDs are marked as + // reserved so that another call to ReserveId before assigning the id to a + // wxWindowIDRef will not use the same ID + static wxWindowID ReserveId(int count = 1); + + // This will release an unused reserved ID. This should only be called + // if the ID returned by ReserveId was NOT assigned to a wxWindowIDRef + // for some purpose, maybe an early return from a function + static void UnreserveId(wxWindowID id, int count = 1); +}; + +#endif // _WX_WINDOWID_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/windowptr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/windowptr.h new file mode 100644 index 0000000000..bebcf6ad8f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/windowptr.h @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/windowptr.h +// Purpose: smart pointer for holding wxWindow instances +// Author: Vaclav Slavik +// Created: 2013-09-01 +// Copyright: (c) 2013 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WINDOWPTR_H_ +#define _WX_WINDOWPTR_H_ + +#include "wx/sharedptr.h" + +// ---------------------------------------------------------------------------- +// wxWindowPtr: A smart pointer with correct wxWindow destruction. +// ---------------------------------------------------------------------------- + +namespace wxPrivate +{ + +struct wxWindowDeleter +{ + void operator()(wxWindow *win) + { + win->Destroy(); + } +}; + +} // namespace wxPrivate + +template<typename T> +class wxWindowPtr : public wxSharedPtr<T> +{ +public: + typedef T element_type; + + wxEXPLICIT wxWindowPtr(element_type* win) + : wxSharedPtr<T>(win, wxPrivate::wxWindowDeleter()) + { + } + + wxWindowPtr() {} + wxWindowPtr(const wxWindowPtr& tocopy) : wxSharedPtr<T>(tocopy) {} + + wxWindowPtr& operator=(const wxWindowPtr& tocopy) + { + wxSharedPtr<T>::operator=(tocopy); + return *this; + } + + wxWindowPtr& operator=(element_type* win) + { + return operator=(wxWindowPtr(win)); + } + + void reset(T* ptr = NULL) + { + wxSharedPtr<T>::reset(ptr, wxPrivate::wxWindowDeleter()); + } +}; + +#endif // _WX_WINDOWPTR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/withimages.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/withimages.h new file mode 100644 index 0000000000..89120d3eb7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/withimages.h @@ -0,0 +1,96 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/withimages.h +// Purpose: Declaration of a simple wxWithImages class. +// Author: Vadim Zeitlin +// Created: 2011-08-17 +// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WITHIMAGES_H_ +#define _WX_WITHIMAGES_H_ + +#include "wx/defs.h" +#include "wx/icon.h" +#include "wx/imaglist.h" + +// ---------------------------------------------------------------------------- +// wxWithImages: mix-in class providing access to wxImageList. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWithImages +{ +public: + enum + { + NO_IMAGE = -1 + }; + + wxWithImages() + { + m_imageList = NULL; + m_ownsImageList = false; + } + + virtual ~wxWithImages() + { + FreeIfNeeded(); + } + + // Sets the image list to use, it is *not* deleted by the control. + virtual void SetImageList(wxImageList* imageList) + { + FreeIfNeeded(); + m_imageList = imageList; + } + + // As SetImageList() but we will delete the image list ourselves. + void AssignImageList(wxImageList* imageList) + { + SetImageList(imageList); + m_ownsImageList = true; + } + + // Get pointer (may be NULL) to the associated image list. + wxImageList* GetImageList() const { return m_imageList; } + +protected: + // Return true if we have a valid image list. + bool HasImageList() const { return m_imageList != NULL; } + + // Return the image with the given index from the image list. + // + // If there is no image list or if index == NO_IMAGE, silently returns + // wxNullIcon. + wxIcon GetImage(int iconIndex) const + { + return m_imageList && iconIndex != NO_IMAGE + ? m_imageList->GetIcon(iconIndex) + : wxNullIcon; + } + +private: + // Free the image list if necessary, i.e. if we own it. + void FreeIfNeeded() + { + if ( m_ownsImageList ) + { + delete m_imageList; + m_imageList = NULL; + + // We don't own it any more. + m_ownsImageList = false; + } + } + + + // The associated image list or NULL. + wxImageList* m_imageList; + + // False by default, if true then we delete m_imageList. + bool m_ownsImageList; + + wxDECLARE_NO_COPY_CLASS(wxWithImages); +}; + +#endif // _WX_WITHIMAGES_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/wizard.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wizard.h new file mode 100644 index 0000000000..82dc438ac4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wizard.h @@ -0,0 +1,337 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/wizard.h +// Purpose: wxWizard class: a GUI control presenting the user with a +// sequence of dialogs which allows to simply perform some task +// Author: Vadim Zeitlin (partly based on work by Ron Kuris and Kevin B. +// Smith) +// Modified by: Robert Cavanaugh +// Added capability to use .WXR resource files in Wizard pages +// Added wxWIZARD_HELP event +// Robert Vazan (sizers) +// Created: 15.08.99 +// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WIZARD_H_ +#define _WX_WIZARD_H_ + +#include "wx/defs.h" + +#if wxUSE_WIZARDDLG + +// ---------------------------------------------------------------------------- +// headers and other simple declarations +// ---------------------------------------------------------------------------- + +#include "wx/dialog.h" // the base class +#include "wx/panel.h" // ditto +#include "wx/event.h" // wxEVT_XXX constants +#include "wx/bitmap.h" + +// Extended style to specify a help button +#define wxWIZARD_EX_HELPBUTTON 0x00000010 + +// Placement flags +#define wxWIZARD_VALIGN_TOP 0x01 +#define wxWIZARD_VALIGN_CENTRE 0x02 +#define wxWIZARD_VALIGN_BOTTOM 0x04 +#define wxWIZARD_HALIGN_LEFT 0x08 +#define wxWIZARD_HALIGN_CENTRE 0x10 +#define wxWIZARD_HALIGN_RIGHT 0x20 +#define wxWIZARD_TILE 0x40 + +// forward declarations +class WXDLLIMPEXP_FWD_ADV wxWizard; + +// ---------------------------------------------------------------------------- +// wxWizardPage is one of the wizards screen: it must know what are the +// following and preceding pages (which may be NULL for the first/last page). +// +// Other than GetNext/Prev() functions, wxWizardPage is just a panel and may be +// used as such (i.e. controls may be placed directly on it &c). +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxWizardPage : public wxPanel +{ +public: + wxWizardPage() { Init(); } + + // ctor accepts an optional bitmap which will be used for this page instead + // of the default one for this wizard (should be of the same size). Notice + // that no other parameters are needed because the wizard will resize and + // reposition the page anyhow + wxWizardPage(wxWizard *parent, + const wxBitmap& bitmap = wxNullBitmap); + + bool Create(wxWizard *parent, + const wxBitmap& bitmap = wxNullBitmap); + + // these functions are used by the wizard to show another page when the + // user chooses "Back" or "Next" button + virtual wxWizardPage *GetPrev() const = 0; + virtual wxWizardPage *GetNext() const = 0; + + // default GetBitmap() will just return m_bitmap which is ok in 99% of + // cases - override this method if you want to create the bitmap to be used + // dynamically or to do something even more fancy. It's ok to return + // wxNullBitmap from here - the default one will be used then. + virtual wxBitmap GetBitmap() const { return m_bitmap; } + +#if wxUSE_VALIDATORS + // Override the base functions to allow a validator to be assigned to this page. + virtual bool TransferDataToWindow() + { + return GetValidator() ? GetValidator()->TransferToWindow() + : wxPanel::TransferDataToWindow(); + } + + virtual bool TransferDataFromWindow() + { + return GetValidator() ? GetValidator()->TransferFromWindow() + : wxPanel::TransferDataFromWindow(); + } + + virtual bool Validate() + { + return GetValidator() ? GetValidator()->Validate(this) + : wxPanel::Validate(); + } +#endif // wxUSE_VALIDATORS + +protected: + // common part of ctors: + void Init(); + + wxBitmap m_bitmap; + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxWizardPage) +}; + +// ---------------------------------------------------------------------------- +// wxWizardPageSimple just returns the pointers given to the ctor and is useful +// to create a simple wizard where the order of pages never changes. +// +// OTOH, it is also possible to dynamically decide which page to return (i.e. +// depending on the user's choices) as the wizard sample shows - in order to do +// this, you must derive from wxWizardPage directly. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxWizardPageSimple : public wxWizardPage +{ +public: + wxWizardPageSimple() { Init(); } + + // ctor takes the previous and next pages + wxWizardPageSimple(wxWizard *parent, + wxWizardPage *prev = NULL, + wxWizardPage *next = NULL, + const wxBitmap& bitmap = wxNullBitmap) + { + Create(parent, prev, next, bitmap); + } + + bool Create(wxWizard *parent = NULL, // let it be default ctor too + wxWizardPage *prev = NULL, + wxWizardPage *next = NULL, + const wxBitmap& bitmap = wxNullBitmap) + { + m_prev = prev; + m_next = next; + return wxWizardPage::Create(parent, bitmap); + } + + // the pointers may be also set later - but before starting the wizard + void SetPrev(wxWizardPage *prev) { m_prev = prev; } + void SetNext(wxWizardPage *next) { m_next = next; } + + // Convenience functions to make the pages follow each other without having + // to call their SetPrev() or SetNext() explicitly. + wxWizardPageSimple& Chain(wxWizardPageSimple* next) + { + SetNext(next); + next->SetPrev(this); + return *next; + } + + static void Chain(wxWizardPageSimple *first, wxWizardPageSimple *second) + { + wxCHECK_RET( first && second, + wxT("NULL passed to wxWizardPageSimple::Chain") ); + + first->SetNext(second); + second->SetPrev(first); + } + + // base class pure virtuals + virtual wxWizardPage *GetPrev() const; + virtual wxWizardPage *GetNext() const; + +private: + // common part of ctors: + void Init() + { + m_prev = m_next = NULL; + } + + // pointers are private, the derived classes shouldn't mess with them - + // just derive from wxWizardPage directly to implement different behaviour + wxWizardPage *m_prev, + *m_next; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxWizardPageSimple) +}; + +// ---------------------------------------------------------------------------- +// wxWizard +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxWizardBase : public wxDialog +{ +public: + /* + The derived class (i.e. the real wxWizard) has a ctor and Create() + function taking the following arguments: + + wxWizard(wxWindow *parent, + int id = wxID_ANY, + const wxString& title = wxEmptyString, + const wxBitmap& bitmap = wxNullBitmap, + const wxPoint& pos = wxDefaultPosition, + long style = wxDEFAULT_DIALOG_STYLE); + */ + wxWizardBase() { } + + // executes the wizard starting from the given page, returns true if it was + // successfully finished, false if user cancelled it + virtual bool RunWizard(wxWizardPage *firstPage) = 0; + + // get the current page (NULL if RunWizard() isn't running) + virtual wxWizardPage *GetCurrentPage() const = 0; + + // set the min size which should be available for the pages: a + // wizard will take into account the size of the bitmap (if any) + // itself and will never be less than some predefined fixed size + virtual void SetPageSize(const wxSize& size) = 0; + + // get the size available for the page + virtual wxSize GetPageSize() const = 0; + + // set the best size for the wizard, i.e. make it big enough to contain all + // of the pages starting from the given one + // + // this function may be called several times and possible with different + // pages in which case it will only increase the page size if needed (this + // may be useful if not all pages are accessible from the first one by + // default) + virtual void FitToPage(const wxWizardPage *firstPage) = 0; + + // Adding pages to page area sizer enlarges wizard + virtual wxSizer *GetPageAreaSizer() const = 0; + + // Set border around page area. Default is 0 if you add at least one + // page to GetPageAreaSizer and 5 if you don't. + virtual void SetBorder(int border) = 0; + + // the methods below may be overridden by the derived classes to provide + // custom logic for determining the pages order + + virtual bool HasNextPage(wxWizardPage *page) + { return page->GetNext() != NULL; } + + virtual bool HasPrevPage(wxWizardPage *page) + { return page->GetPrev() != NULL; } + + /// Override these functions to stop InitDialog from calling TransferDataToWindow + /// for _all_ pages when the wizard starts. Instead 'ShowPage' will call + /// TransferDataToWindow for the first page only. + bool TransferDataToWindow() { return true; } + bool TransferDataFromWindow() { return true; } + bool Validate() { return true; } + +private: + wxDECLARE_NO_COPY_CLASS(wxWizardBase); +}; + +// include the real class declaration +#include "wx/generic/wizard.h" + +// ---------------------------------------------------------------------------- +// wxWizardEvent class represents an event generated by the wizard: this event +// is first sent to the page itself and, if not processed there, goes up the +// window hierarchy as usual +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxWizardEvent : public wxNotifyEvent +{ +public: + wxWizardEvent(wxEventType type = wxEVT_NULL, + int id = wxID_ANY, + bool direction = true, + wxWizardPage* page = NULL); + + // for EVT_WIZARD_PAGE_CHANGING, return true if we're going forward or + // false otherwise and for EVT_WIZARD_PAGE_CHANGED return true if we came + // from the previous page and false if we returned from the next one + // (this function doesn't make sense for CANCEL events) + bool GetDirection() const { return m_direction; } + + wxWizardPage* GetPage() const { return m_page; } + + virtual wxEvent *Clone() const { return new wxWizardEvent(*this); } + +private: + bool m_direction; + wxWizardPage* m_page; + + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWizardEvent) +}; + +// ---------------------------------------------------------------------------- +// macros for handling wxWizardEvents +// ---------------------------------------------------------------------------- + +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_PAGE_CHANGED, wxWizardEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_PAGE_CHANGING, wxWizardEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_CANCEL, wxWizardEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_HELP, wxWizardEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_FINISHED, wxWizardEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_PAGE_SHOWN, wxWizardEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_WIZARD_BEFORE_PAGE_CHANGED, wxWizardEvent ); + +typedef void (wxEvtHandler::*wxWizardEventFunction)(wxWizardEvent&); + +#define wxWizardEventHandler(func) \ + wxEVENT_HANDLER_CAST(wxWizardEventFunction, func) + +#define wx__DECLARE_WIZARDEVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_WIZARD_ ## evt, id, wxWizardEventHandler(fn)) + +// notifies that the page has just been changed (can't be vetoed) +#define EVT_WIZARD_PAGE_CHANGED(id, fn) wx__DECLARE_WIZARDEVT(PAGE_CHANGED, id, fn) + +// the user pressed "<Back" or "Next>" button and the page is going to be +// changed - unless the event handler vetoes the event +#define EVT_WIZARD_PAGE_CHANGING(id, fn) wx__DECLARE_WIZARDEVT(PAGE_CHANGING, id, fn) + +// Called before GetNext/GetPrev is called, so that the handler can change state that will be +// used when GetNext/GetPrev is called. PAGE_CHANGING is called too late to influence GetNext/GetPrev. +#define EVT_WIZARD_BEFORE_PAGE_CHANGED(id, fn) wx__DECLARE_WIZARDEVT(BEFORE_PAGE_CHANGED, id, fn) + +// the user pressed "Cancel" button and the wizard is going to be dismissed - +// unless the event handler vetoes the event +#define EVT_WIZARD_CANCEL(id, fn) wx__DECLARE_WIZARDEVT(CANCEL, id, fn) + +// the user pressed "Finish" button and the wizard is going to be dismissed - +#define EVT_WIZARD_FINISHED(id, fn) wx__DECLARE_WIZARDEVT(FINISHED, id, fn) + +// the user pressed "Help" button +#define EVT_WIZARD_HELP(id, fn) wx__DECLARE_WIZARDEVT(HELP, id, fn) + +// the page was just shown and laid out +#define EVT_WIZARD_PAGE_SHOWN(id, fn) wx__DECLARE_WIZARDEVT(PAGE_SHOWN, id, fn) + +#endif // wxUSE_WIZARDDLG + +#endif // _WX_WIZARD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/wrapsizer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wrapsizer.h new file mode 100644 index 0000000000..a4d6145002 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wrapsizer.h @@ -0,0 +1,99 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/wrapsizer.h +// Purpose: provide wrapping sizer for layout (wxWrapSizer) +// Author: Arne Steinarson +// Created: 2008-05-08 +// Copyright: (c) Arne Steinarson +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WRAPSIZER_H_ +#define _WX_WRAPSIZER_H_ + +#include "wx/sizer.h" + +// flags for wxWrapSizer +enum +{ + wxEXTEND_LAST_ON_EACH_LINE = 1, + // don't leave spacers in the beginning of a new row + wxREMOVE_LEADING_SPACES = 2, + + wxWRAPSIZER_DEFAULT_FLAGS = wxEXTEND_LAST_ON_EACH_LINE | + wxREMOVE_LEADING_SPACES +}; + +// ---------------------------------------------------------------------------- +// A box sizer that can wrap items on several lines when sum of widths exceed +// available line width. +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxWrapSizer : public wxBoxSizer +{ +public: + wxWrapSizer(int orient = wxHORIZONTAL, int flags = wxWRAPSIZER_DEFAULT_FLAGS); + virtual ~wxWrapSizer(); + + // override base class virtual methods + virtual wxSize CalcMin(); + virtual void RecalcSizes(); + + virtual bool InformFirstDirection(int direction, + int size, + int availableOtherDir); + +protected: + // This method is called to decide if an item represents empty space or + // not. We do this to avoid having space-only items first or last on a + // wrapped line (left alignment). + // + // By default only spacers are considered to be empty items but a derived + // class may override this item if some other kind of sizer elements should + // be also considered empty for some reason. + virtual bool IsSpaceItem(wxSizerItem *item) const + { + return item->IsSpacer(); + } + + // helpers of CalcMin() + void CalcMinFromMinor(int totMinor); + void CalcMinFromMajor(int totMajor); + void CalcMinUsingCurrentLayout(); + void CalcMinFittingSize(const wxSize& szBoundary); + void CalcMaxSingleItemSize(); + + // temporarily change the proportion of the last item of the N-th row to + // extend to the end of line if the appropriate flag is set + void AdjustLastRowItemProp(size_t n, wxSizerItem *itemLast); + + // remove all the items from m_rows + void ClearRows(); + + // return the N-th row sizer from m_rows creating it if necessary + wxSizer *GetRowSizer(size_t n); + + // should be called after completion of each row + void FinishRow(size_t n, int rowMajor, int rowMinor, wxSizerItem *itemLast); + + + const int m_flags; // Flags specified in the ctor + + int m_dirInform; // Direction for size information + int m_availSize; // Size available in m_dirInform direction + int m_availableOtherDir; // Size available in the other direction + bool m_lastUsed; // Indicates whether value from InformFirst... has + // been used yet + + // The sizes below are computed by RecalcSizes(), i.e. they don't have + // valid values during the initial call to CalcMin() and they are only + // valid for the current layout (i.e. the current number of rows) + int m_minSizeMinor; // Min size in minor direction + int m_maxSizeMajor; // Size of longest row + int m_minItemMajor; // Size of smallest item in major direction + + wxBoxSizer m_rows; // Sizer containing multiple rows of our items + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxWrapSizer) +}; + +#endif // _WX_WRAPSIZER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/wupdlock.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wupdlock.h new file mode 100644 index 0000000000..eb799a82e9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wupdlock.h @@ -0,0 +1,36 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/wupdlock.h +// Purpose: wxWindowUpdateLocker prevents window redrawing +// Author: Vadim Zeitlin +// Created: 2006-03-06 +// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WUPDLOCK_H_ +#define _WX_WUPDLOCK_H_ + +#include "wx/window.h" + +// ---------------------------------------------------------------------------- +// wxWindowUpdateLocker prevents updates to the window during its lifetime +// ---------------------------------------------------------------------------- + +class wxWindowUpdateLocker +{ +public: + // create an object preventing updates of the given window (which must have + // a lifetime at least as great as ours) + wxWindowUpdateLocker(wxWindow *win) : m_win(win) { win->Freeze(); } + + // dtor thaws the window to permit updates again + ~wxWindowUpdateLocker() { m_win->Thaw(); } + +private: + wxWindow *m_win; + + wxDECLARE_NO_COPY_CLASS(wxWindowUpdateLocker); +}; + +#endif // _WX_WUPDLOCK_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/wx.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wx.h new file mode 100644 index 0000000000..9f6a42cb13 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wx.h @@ -0,0 +1,112 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/wx.h +// Purpose: wxWidgets central header including the most often used ones +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WX_H_ +#define _WX_WX_H_ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/dynarray.h" +#include "wx/list.h" +#include "wx/hash.h" +#include "wx/string.h" +#include "wx/hashmap.h" +#include "wx/arrstr.h" +#include "wx/intl.h" +#include "wx/log.h" +#include "wx/event.h" +#include "wx/app.h" +#include "wx/utils.h" +#include "wx/stream.h" +#include "wx/memory.h" +#include "wx/math.h" +#include "wx/stopwatch.h" +#include "wx/timer.h" +#include "wx/module.h" +#include "wx/wxcrt.h" +#include "wx/wxcrtvararg.h" + +#if wxUSE_GUI + +#include "wx/window.h" +#include "wx/containr.h" +#include "wx/panel.h" +#include "wx/toplevel.h" +#include "wx/frame.h" +#include "wx/gdicmn.h" +#include "wx/gdiobj.h" +#include "wx/region.h" +#include "wx/bitmap.h" +#include "wx/image.h" +#include "wx/colour.h" +#include "wx/font.h" +#include "wx/dc.h" +#include "wx/dcclient.h" +#include "wx/dcmemory.h" +#include "wx/dcprint.h" +#include "wx/dcscreen.h" +#include "wx/button.h" +#include "wx/menuitem.h" +#include "wx/menu.h" +#include "wx/pen.h" +#include "wx/brush.h" +#include "wx/palette.h" +#include "wx/icon.h" +#include "wx/cursor.h" +#include "wx/dialog.h" +#include "wx/settings.h" +#include "wx/msgdlg.h" +#include "wx/dataobj.h" + +#include "wx/control.h" +#include "wx/ctrlsub.h" +#include "wx/bmpbuttn.h" +#include "wx/checkbox.h" +#include "wx/checklst.h" +#include "wx/choice.h" +#include "wx/scrolbar.h" +#include "wx/stattext.h" +#include "wx/statbmp.h" +#include "wx/statbox.h" +#include "wx/listbox.h" +#include "wx/radiobox.h" +#include "wx/radiobut.h" +#include "wx/textctrl.h" +#include "wx/slider.h" +#include "wx/gauge.h" +#include "wx/scrolwin.h" +#include "wx/dirdlg.h" +#include "wx/toolbar.h" +#include "wx/combobox.h" +#include "wx/layout.h" +#include "wx/sizer.h" +#include "wx/statusbr.h" +#include "wx/choicdlg.h" +#include "wx/textdlg.h" +#include "wx/filedlg.h" + +// this one is included by exactly one file (mdi.cpp) during wx build so even +// although we keep it here for the library users, don't include it to avoid +// bloating the PCH and (worse) rebuilding the entire library when it changes +// when building the library itself +#ifndef WXBUILDING + #include "wx/mdi.h" +#endif + +// always include, even if !wxUSE_VALIDATORS because we need wxDefaultValidator +#include "wx/validate.h" + +#if wxUSE_VALIDATORS + #include "wx/valtext.h" +#endif // wxUSE_VALIDATORS + +#endif // wxUSE_GUI + +#endif // _WX_WX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxchar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxchar.h new file mode 100644 index 0000000000..597bbe1599 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxchar.h @@ -0,0 +1,18 @@ +////////////////////////////////////////////////////////////////////////////// +// Name: wx/wxchar.h +// Purpose: Declarations common to wx char/wchar_t usage (wide chars) +// Author: Joel Farley, Ove Kåven +// Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee +// Created: 1998/06/12 +// Copyright: (c) 1998-2006 wxWidgets dev team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WXCHAR_H_ +#define _WX_WXCHAR_H_ + +// This header used to define CRT functions wrappers in wxWidgets 2.8. This is +// now done in (headers included by) wx/crt.h, so include it for compatibility: +#include "wx/crt.h" + +#endif /* _WX_WXCHAR_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxcrt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxcrt.h new file mode 100644 index 0000000000..dd579364fa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxcrt.h @@ -0,0 +1,986 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/wxcrt.h +// Purpose: Type-safe ANSI and Unicode builds compatible wrappers for +// CRT functions +// Author: Joel Farley, Ove Kaaven +// Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee, Vaclav Slavik +// Created: 1998/06/12 +// Copyright: (c) 1998-2006 wxWidgets dev team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WXCRT_H_ +#define _WX_WXCRT_H_ + +#include "wx/wxcrtbase.h" +#include "wx/string.h" + +#ifndef __WX_SETUP_H__ +// For non-configure builds assume vsscanf is available, if not Visual C or DMC +#if !defined (__VISUALC__) && !defined (__DMC__) + #define HAVE_VSSCANF 1 +#endif +#endif + +// ============================================================================ +// misc functions +// ============================================================================ + +/* checks whether the passed in pointer is NULL and if the string is empty */ +inline bool wxIsEmpty(const char *s) { return !s || !*s; } +inline bool wxIsEmpty(const wchar_t *s) { return !s || !*s; } +inline bool wxIsEmpty(const wxScopedCharBuffer& s) { return wxIsEmpty(s.data()); } +inline bool wxIsEmpty(const wxScopedWCharBuffer& s) { return wxIsEmpty(s.data()); } +inline bool wxIsEmpty(const wxString& s) { return s.empty(); } +inline bool wxIsEmpty(const wxCStrData& s) { return s.AsString().empty(); } + + + +/* multibyte to wide char conversion functions and macros */ + +/* multibyte<->widechar conversion */ +WXDLLIMPEXP_BASE size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n); +WXDLLIMPEXP_BASE size_t wxWC2MB(char *buf, const wchar_t *psz, size_t n); + +#if wxUSE_UNICODE + #define wxMB2WX wxMB2WC + #define wxWX2MB wxWC2MB + #define wxWC2WX wxStrncpy + #define wxWX2WC wxStrncpy +#else + #define wxMB2WX wxStrncpy + #define wxWX2MB wxStrncpy + #define wxWC2WX wxWC2MB + #define wxWX2WC wxMB2WC +#endif + + +// RN: We could do the usual tricky compiler detection here, +// and use their variant (such as wmemchr, etc.). The problem +// is that these functions are quite rare, even though they are +// part of the current POSIX standard. In addition, most compilers +// (including even MSC) inline them just like we do right in their +// headers. +// +#include <string.h> + +#if wxUSE_UNICODE + //implement our own wmem variants + inline wxChar* wxTmemchr(const wxChar* s, wxChar c, size_t l) + { + for(;l && *s != c;--l, ++s) {} + + if(l) + return const_cast<wxChar*>(s); + return NULL; + } + + inline int wxTmemcmp(const wxChar* sz1, const wxChar* sz2, size_t len) + { + for(; *sz1 == *sz2 && len; --len, ++sz1, ++sz2) {} + + if(len) + return *sz1 < *sz2 ? -1 : *sz1 > *sz2; + else + return 0; + } + + inline wxChar* wxTmemcpy(wxChar* szOut, const wxChar* szIn, size_t len) + { + return (wxChar*) memcpy(szOut, szIn, len * sizeof(wxChar)); + } + + inline wxChar* wxTmemmove(wxChar* szOut, const wxChar* szIn, size_t len) + { + return (wxChar*) memmove(szOut, szIn, len * sizeof(wxChar)); + } + + inline wxChar* wxTmemset(wxChar* szOut, const wxChar cIn, size_t len) + { + wxChar* szRet = szOut; + + while (len--) + *szOut++ = cIn; + + return szRet; + } +#endif /* wxUSE_UNICODE */ + +// provide trivial wrappers for char* versions for both ANSI and Unicode builds +// (notice that these intentionally return "char *" and not "void *" unlike the +// standard memxxx() for symmetry with the wide char versions): +inline char* wxTmemchr(const char* s, char c, size_t len) + { return (char*)memchr(s, c, len); } +inline int wxTmemcmp(const char* sz1, const char* sz2, size_t len) + { return memcmp(sz1, sz2, len); } +inline char* wxTmemcpy(char* szOut, const char* szIn, size_t len) + { return (char*)memcpy(szOut, szIn, len); } +inline char* wxTmemmove(char* szOut, const char* szIn, size_t len) + { return (char*)memmove(szOut, szIn, len); } +inline char* wxTmemset(char* szOut, const char cIn, size_t len) + { return (char*)memset(szOut, cIn, len); } + + +// ============================================================================ +// wx wrappers for CRT functions in both char* and wchar_t* versions +// ============================================================================ + +// A few notes on implementation of these wrappers: +// +// We need both char* and wchar_t* versions of functions like wxStrlen() for +// compatibility with both ANSI and Unicode builds. +// +// This makes passing wxString or c_str()/mb_str()/wc_str() result to them +// ambiguous, so we need to provide overrides for that as well (in cases where +// it makes sense). +// +// We can do this without problems for some functions (wxStrlen()), but in some +// cases, we can't stay compatible with both ANSI and Unicode builds, e.g. for +// wxStrcpy(const wxString&), which can only return either char* or wchar_t*. +// In these cases, we preserve ANSI build compatibility by returning char*. + +// ---------------------------------------------------------------------------- +// locale functions +// ---------------------------------------------------------------------------- + +// NB: we can't provide const wchar_t* (= wxChar*) overload, because calling +// wxSetlocale(category, NULL) -- which is a common thing to do -- would be +// ambiguous +WXDLLIMPEXP_BASE char* wxSetlocale(int category, const char *locale); +inline char* wxSetlocale(int category, const wxScopedCharBuffer& locale) + { return wxSetlocale(category, locale.data()); } +inline char* wxSetlocale(int category, const wxString& locale) + { return wxSetlocale(category, locale.mb_str()); } +inline char* wxSetlocale(int category, const wxCStrData& locale) + { return wxSetlocale(category, locale.AsCharBuf()); } + +// ---------------------------------------------------------------------------- +// string functions +// ---------------------------------------------------------------------------- + +/* safe version of strlen() (returns 0 if passed NULL pointer) */ +// NB: these are defined in wxcrtbase.h, see the comment there +// inline size_t wxStrlen(const char *s) { return s ? strlen(s) : 0; } +// inline size_t wxStrlen(const wchar_t *s) { return s ? wxCRT_Strlen_(s) : 0; } +inline size_t wxStrlen(const wxScopedCharBuffer& s) { return wxStrlen(s.data()); } +inline size_t wxStrlen(const wxScopedWCharBuffer& s) { return wxStrlen(s.data()); } +inline size_t wxStrlen(const wxString& s) { return s.length(); } +inline size_t wxStrlen(const wxCStrData& s) { return s.AsString().length(); } + +// this is a function new in 2.9 so we don't care about backwards compatibility and +// so don't need to support wxScopedCharBuffer/wxScopedWCharBuffer overloads +#if defined(wxCRT_StrnlenA) +inline size_t wxStrnlen(const char *str, size_t maxlen) { return wxCRT_StrnlenA(str, maxlen); } +#else +inline size_t wxStrnlen(const char *str, size_t maxlen) +{ + size_t n; + for ( n = 0; n < maxlen; n++ ) + if ( !str[n] ) + break; + + return n; +} +#endif + +#if defined(wxCRT_StrnlenW) +inline size_t wxStrnlen(const wchar_t *str, size_t maxlen) { return wxCRT_StrnlenW(str, maxlen); } +#else +inline size_t wxStrnlen(const wchar_t *str, size_t maxlen) +{ + size_t n; + for ( n = 0; n < maxlen; n++ ) + if ( !str[n] ) + break; + + return n; +} +#endif + +// NB: these are defined in wxcrtbase.h, see the comment there +// inline char* wxStrdup(const char *s) { return wxStrdupA(s); } +// inline wchar_t* wxStrdup(const wchar_t *s) { return wxStrdupW(s); } +inline char* wxStrdup(const wxScopedCharBuffer& s) { return wxStrdup(s.data()); } +inline wchar_t* wxStrdup(const wxScopedWCharBuffer& s) { return wxStrdup(s.data()); } +inline char* wxStrdup(const wxString& s) { return wxStrdup(s.mb_str()); } +inline char* wxStrdup(const wxCStrData& s) { return wxStrdup(s.AsCharBuf()); } + +inline char *wxStrcpy(char *dest, const char *src) + { return wxCRT_StrcpyA(dest, src); } +inline wchar_t *wxStrcpy(wchar_t *dest, const wchar_t *src) + { return wxCRT_StrcpyW(dest, src); } +inline char *wxStrcpy(char *dest, const wxString& src) + { return wxCRT_StrcpyA(dest, src.mb_str()); } +inline char *wxStrcpy(char *dest, const wxCStrData& src) + { return wxCRT_StrcpyA(dest, src.AsCharBuf()); } +inline char *wxStrcpy(char *dest, const wxScopedCharBuffer& src) + { return wxCRT_StrcpyA(dest, src.data()); } +inline wchar_t *wxStrcpy(wchar_t *dest, const wxString& src) + { return wxCRT_StrcpyW(dest, src.wc_str()); } +inline wchar_t *wxStrcpy(wchar_t *dest, const wxCStrData& src) + { return wxCRT_StrcpyW(dest, src.AsWCharBuf()); } +inline wchar_t *wxStrcpy(wchar_t *dest, const wxScopedWCharBuffer& src) + { return wxCRT_StrcpyW(dest, src.data()); } +inline char *wxStrcpy(char *dest, const wchar_t *src) + { return wxCRT_StrcpyA(dest, wxConvLibc.cWC2MB(src)); } +inline wchar_t *wxStrcpy(wchar_t *dest, const char *src) + { return wxCRT_StrcpyW(dest, wxConvLibc.cMB2WC(src)); } + +inline char *wxStrncpy(char *dest, const char *src, size_t n) + { return wxCRT_StrncpyA(dest, src, n); } +inline wchar_t *wxStrncpy(wchar_t *dest, const wchar_t *src, size_t n) + { return wxCRT_StrncpyW(dest, src, n); } +inline char *wxStrncpy(char *dest, const wxString& src, size_t n) + { return wxCRT_StrncpyA(dest, src.mb_str(), n); } +inline char *wxStrncpy(char *dest, const wxCStrData& src, size_t n) + { return wxCRT_StrncpyA(dest, src.AsCharBuf(), n); } +inline char *wxStrncpy(char *dest, const wxScopedCharBuffer& src, size_t n) + { return wxCRT_StrncpyA(dest, src.data(), n); } +inline wchar_t *wxStrncpy(wchar_t *dest, const wxString& src, size_t n) + { return wxCRT_StrncpyW(dest, src.wc_str(), n); } +inline wchar_t *wxStrncpy(wchar_t *dest, const wxCStrData& src, size_t n) + { return wxCRT_StrncpyW(dest, src.AsWCharBuf(), n); } +inline wchar_t *wxStrncpy(wchar_t *dest, const wxScopedWCharBuffer& src, size_t n) + { return wxCRT_StrncpyW(dest, src.data(), n); } +inline char *wxStrncpy(char *dest, const wchar_t *src, size_t n) + { return wxCRT_StrncpyA(dest, wxConvLibc.cWC2MB(src), n); } +inline wchar_t *wxStrncpy(wchar_t *dest, const char *src, size_t n) + { return wxCRT_StrncpyW(dest, wxConvLibc.cMB2WC(src), n); } + +// this is a function new in 2.9 so we don't care about backwards compatibility and +// so don't need to support wchar_t/char overloads +inline size_t wxStrlcpy(char *dest, const char *src, size_t n) +{ + const size_t len = wxCRT_StrlenA(src); + + if ( n ) + { + if ( n-- > len ) + n = len; + wxCRT_StrncpyA(dest, src, n); + dest[n] = '\0'; + } + + return len; +} +inline size_t wxStrlcpy(wchar_t *dest, const wchar_t *src, size_t n) +{ + const size_t len = wxCRT_StrlenW(src); + if ( n ) + { + if ( n-- > len ) + n = len; + wxCRT_StrncpyW(dest, src, n); + dest[n] = L'\0'; + } + + return len; +} + +inline char *wxStrcat(char *dest, const char *src) + { return wxCRT_StrcatA(dest, src); } +inline wchar_t *wxStrcat(wchar_t *dest, const wchar_t *src) + { return wxCRT_StrcatW(dest, src); } +inline char *wxStrcat(char *dest, const wxString& src) + { return wxCRT_StrcatA(dest, src.mb_str()); } +inline char *wxStrcat(char *dest, const wxCStrData& src) + { return wxCRT_StrcatA(dest, src.AsCharBuf()); } +inline char *wxStrcat(char *dest, const wxScopedCharBuffer& src) + { return wxCRT_StrcatA(dest, src.data()); } +inline wchar_t *wxStrcat(wchar_t *dest, const wxString& src) + { return wxCRT_StrcatW(dest, src.wc_str()); } +inline wchar_t *wxStrcat(wchar_t *dest, const wxCStrData& src) + { return wxCRT_StrcatW(dest, src.AsWCharBuf()); } +inline wchar_t *wxStrcat(wchar_t *dest, const wxScopedWCharBuffer& src) + { return wxCRT_StrcatW(dest, src.data()); } +inline char *wxStrcat(char *dest, const wchar_t *src) + { return wxCRT_StrcatA(dest, wxConvLibc.cWC2MB(src)); } +inline wchar_t *wxStrcat(wchar_t *dest, const char *src) + { return wxCRT_StrcatW(dest, wxConvLibc.cMB2WC(src)); } + +inline char *wxStrncat(char *dest, const char *src, size_t n) + { return wxCRT_StrncatA(dest, src, n); } +inline wchar_t *wxStrncat(wchar_t *dest, const wchar_t *src, size_t n) + { return wxCRT_StrncatW(dest, src, n); } +inline char *wxStrncat(char *dest, const wxString& src, size_t n) + { return wxCRT_StrncatA(dest, src.mb_str(), n); } +inline char *wxStrncat(char *dest, const wxCStrData& src, size_t n) + { return wxCRT_StrncatA(dest, src.AsCharBuf(), n); } +inline char *wxStrncat(char *dest, const wxScopedCharBuffer& src, size_t n) + { return wxCRT_StrncatA(dest, src.data(), n); } +inline wchar_t *wxStrncat(wchar_t *dest, const wxString& src, size_t n) + { return wxCRT_StrncatW(dest, src.wc_str(), n); } +inline wchar_t *wxStrncat(wchar_t *dest, const wxCStrData& src, size_t n) + { return wxCRT_StrncatW(dest, src.AsWCharBuf(), n); } +inline wchar_t *wxStrncat(wchar_t *dest, const wxScopedWCharBuffer& src, size_t n) + { return wxCRT_StrncatW(dest, src.data(), n); } +inline char *wxStrncat(char *dest, const wchar_t *src, size_t n) + { return wxCRT_StrncatA(dest, wxConvLibc.cWC2MB(src), n); } +inline wchar_t *wxStrncat(wchar_t *dest, const char *src, size_t n) + { return wxCRT_StrncatW(dest, wxConvLibc.cMB2WC(src), n); } + + +#define WX_STR_DECL(name, T1, T2) name(T1 s1, T2 s2) +#define WX_STR_CALL(func, a1, a2) func(a1, a2) + +// This macro defines string function for all possible variants of arguments, +// except for those taking wxString or wxCStrData as second argument. +// Parameters: +// rettype - return type +// name - name of the (overloaded) function to define +// crtA - function to call for char* versions (takes two arguments) +// crtW - ditto for wchar_t* function +// forString - function to call when the *first* argument is wxString; +// the second argument can be any string type, so this is +// typically a template +#define WX_STR_FUNC_NO_INVERT(rettype, name, crtA, crtW, forString) \ + inline rettype WX_STR_DECL(name, const char *, const char *) \ + { return WX_STR_CALL(crtA, s1, s2); } \ + inline rettype WX_STR_DECL(name, const char *, const wchar_t *) \ + { return WX_STR_CALL(forString, wxString(s1), wxString(s2)); } \ + inline rettype WX_STR_DECL(name, const char *, const wxScopedCharBuffer&) \ + { return WX_STR_CALL(crtA, s1, s2.data()); } \ + inline rettype WX_STR_DECL(name, const char *, const wxScopedWCharBuffer&) \ + { return WX_STR_CALL(forString, wxString(s1), s2.data()); } \ + \ + inline rettype WX_STR_DECL(name, const wchar_t *, const wchar_t *) \ + { return WX_STR_CALL(crtW, s1, s2); } \ + inline rettype WX_STR_DECL(name, const wchar_t *, const char *) \ + { return WX_STR_CALL(forString, wxString(s1), wxString(s2)); } \ + inline rettype WX_STR_DECL(name, const wchar_t *, const wxScopedWCharBuffer&) \ + { return WX_STR_CALL(crtW, s1, s2.data()); } \ + inline rettype WX_STR_DECL(name, const wchar_t *, const wxScopedCharBuffer&) \ + { return WX_STR_CALL(forString, wxString(s1), s2.data()); } \ + \ + inline rettype WX_STR_DECL(name, const wxScopedCharBuffer&, const char *) \ + { return WX_STR_CALL(crtA, s1.data(), s2); } \ + inline rettype WX_STR_DECL(name, const wxScopedCharBuffer&, const wchar_t *) \ + { return WX_STR_CALL(forString, wxString(s1), wxString(s2)); } \ + inline rettype WX_STR_DECL(name, const wxScopedCharBuffer&, const wxScopedCharBuffer&)\ + { return WX_STR_CALL(crtA, s1.data(), s2.data()); } \ + inline rettype WX_STR_DECL(name, const wxScopedCharBuffer&, const wxScopedWCharBuffer&) \ + { return WX_STR_CALL(forString, wxString(s1), wxString(s2)); } \ + \ + inline rettype WX_STR_DECL(name, const wxScopedWCharBuffer&, const wchar_t *) \ + { return WX_STR_CALL(crtW, s1.data(), s2); } \ + inline rettype WX_STR_DECL(name, const wxScopedWCharBuffer&, const char *) \ + { return WX_STR_CALL(forString, wxString(s1), wxString(s2)); } \ + inline rettype WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxScopedWCharBuffer&) \ + { return WX_STR_CALL(crtW, s1.data(), s2.data()); } \ + inline rettype WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxScopedCharBuffer&) \ + { return WX_STR_CALL(forString, wxString(s1), wxString(s2)); } \ + \ + inline rettype WX_STR_DECL(name, const wxString&, const char*) \ + { return WX_STR_CALL(forString, s1, s2); } \ + inline rettype WX_STR_DECL(name, const wxString&, const wchar_t*) \ + { return WX_STR_CALL(forString, s1, s2); } \ + inline rettype WX_STR_DECL(name, const wxString&, const wxScopedCharBuffer&) \ + { return WX_STR_CALL(forString, s1, s2); } \ + inline rettype WX_STR_DECL(name, const wxString&, const wxScopedWCharBuffer&) \ + { return WX_STR_CALL(forString, s1, s2); } \ + inline rettype WX_STR_DECL(name, const wxString&, const wxString&) \ + { return WX_STR_CALL(forString, s1, s2); } \ + inline rettype WX_STR_DECL(name, const wxString&, const wxCStrData&) \ + { return WX_STR_CALL(forString, s1, s2); } \ + \ + inline rettype WX_STR_DECL(name, const wxCStrData&, const char*) \ + { return WX_STR_CALL(forString, s1.AsString(), s2); } \ + inline rettype WX_STR_DECL(name, const wxCStrData&, const wchar_t*) \ + { return WX_STR_CALL(forString, s1.AsString(), s2); } \ + inline rettype WX_STR_DECL(name, const wxCStrData&, const wxScopedCharBuffer&) \ + { return WX_STR_CALL(forString, s1.AsString(), s2); } \ + inline rettype WX_STR_DECL(name, const wxCStrData&, const wxScopedWCharBuffer&) \ + { return WX_STR_CALL(forString, s1.AsString(), s2); } \ + inline rettype WX_STR_DECL(name, const wxCStrData&, const wxString&) \ + { return WX_STR_CALL(forString, s1.AsString(), s2); } \ + inline rettype WX_STR_DECL(name, const wxCStrData&, const wxCStrData&) \ + { return WX_STR_CALL(forString, s1.AsString(), s2); } + +// This defines strcmp-like function, i.e. one returning the result of +// comparison; see WX_STR_FUNC_NO_INVERT for explanation of the arguments +#define WX_STRCMP_FUNC(name, crtA, crtW, forString) \ + WX_STR_FUNC_NO_INVERT(int, name, crtA, crtW, forString) \ + \ + inline int WX_STR_DECL(name, const char *, const wxCStrData&) \ + { return -WX_STR_CALL(forString, s2.AsString(), s1); } \ + inline int WX_STR_DECL(name, const char *, const wxString&) \ + { return -WX_STR_CALL(forString, s2, s1); } \ + \ + inline int WX_STR_DECL(name, const wchar_t *, const wxCStrData&) \ + { return -WX_STR_CALL(forString, s2.AsString(), s1); } \ + inline int WX_STR_DECL(name, const wchar_t *, const wxString&) \ + { return -WX_STR_CALL(forString, s2, s1); } \ + \ + inline int WX_STR_DECL(name, const wxScopedCharBuffer&, const wxCStrData&) \ + { return -WX_STR_CALL(forString, s2.AsString(), s1.data()); } \ + inline int WX_STR_DECL(name, const wxScopedCharBuffer&, const wxString&) \ + { return -WX_STR_CALL(forString, s2, s1.data()); } \ + \ + inline int WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxCStrData&) \ + { return -WX_STR_CALL(forString, s2.AsString(), s1.data()); } \ + inline int WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxString&) \ + { return -WX_STR_CALL(forString, s2, s1.data()); } + + +// This defines a string function that is *not* strcmp-like, i.e. doesn't +// return the result of comparison and so if the second argument is a string, +// it has to be converted to char* or wchar_t* +#define WX_STR_FUNC(rettype, name, crtA, crtW, forString) \ + WX_STR_FUNC_NO_INVERT(rettype, name, crtA, crtW, forString) \ + \ + inline rettype WX_STR_DECL(name, const char *, const wxCStrData&) \ + { return WX_STR_CALL(crtA, s1, s2.AsCharBuf()); } \ + inline rettype WX_STR_DECL(name, const char *, const wxString&) \ + { return WX_STR_CALL(crtA, s1, s2.mb_str()); } \ + \ + inline rettype WX_STR_DECL(name, const wchar_t *, const wxCStrData&) \ + { return WX_STR_CALL(crtW, s1, s2.AsWCharBuf()); } \ + inline rettype WX_STR_DECL(name, const wchar_t *, const wxString&) \ + { return WX_STR_CALL(crtW, s1, s2.wc_str()); } \ + \ + inline rettype WX_STR_DECL(name, const wxScopedCharBuffer&, const wxCStrData&) \ + { return WX_STR_CALL(crtA, s1.data(), s2.AsCharBuf()); } \ + inline rettype WX_STR_DECL(name, const wxScopedCharBuffer&, const wxString&) \ + { return WX_STR_CALL(crtA, s1.data(), s2.mb_str()); } \ + \ + inline rettype WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxCStrData&) \ + { return WX_STR_CALL(crtW, s1.data(), s2.AsWCharBuf()); } \ + inline rettype WX_STR_DECL(name, const wxScopedWCharBuffer&, const wxString&) \ + { return WX_STR_CALL(crtW, s1.data(), s2.wc_str()); } + +template<typename T> +inline int wxStrcmp_String(const wxString& s1, const T& s2) + { return s1.compare(s2); } +WX_STRCMP_FUNC(wxStrcmp, wxCRT_StrcmpA, wxCRT_StrcmpW, wxStrcmp_String) + +template<typename T> +inline int wxStricmp_String(const wxString& s1, const T& s2) + { return s1.CmpNoCase(s2); } +WX_STRCMP_FUNC(wxStricmp, wxCRT_StricmpA, wxCRT_StricmpW, wxStricmp_String) + +#if defined(wxCRT_StrcollA) && defined(wxCRT_StrcollW) + +// GCC 3.4 and other compilers have a bug that causes it to fail compilation if +// the template's implementation uses overloaded function declared later (see +// the wxStrcoll() call in wxStrcoll_String<T>()), so we have to +// forward-declare the template and implement it below WX_STRCMP_FUNC. OTOH, +// this fails to compile with VC6, so don't do it for VC. It also causes +// problems with GCC visibility in newer GCC versions. +#if !(defined(__VISUALC__) || (wxCHECK_GCC_VERSION(3,5) && !wxCHECK_GCC_VERSION(4,7))) || defined(__clang__) + #define wxNEEDS_DECL_BEFORE_TEMPLATE +#endif + +#ifdef wxNEEDS_DECL_BEFORE_TEMPLATE +template<typename T> +inline int wxStrcoll_String(const wxString& s1, const T& s2); +WX_STRCMP_FUNC(wxStrcoll, wxCRT_StrcollA, wxCRT_StrcollW, wxStrcoll_String) +#endif // wxNEEDS_DECL_BEFORE_TEMPLATE + +template<typename T> +inline int wxStrcoll_String(const wxString& s1, const T& s2) +{ +#if wxUSE_UNICODE + // NB: strcoll() doesn't work correctly on UTF-8 strings, so we have to use + // wc_str() even if wxUSE_UNICODE_UTF8; the (const wchar_t*) cast is + // there just as optimization to avoid going through + // wxStrcoll<wxScopedWCharBuffer>: + return wxStrcoll((const wchar_t*)s1.wc_str(), s2); +#else + return wxStrcoll((const char*)s1.mb_str(), s2); +#endif +} + +#ifndef wxNEEDS_DECL_BEFORE_TEMPLATE +// this is exactly the same WX_STRCMP_FUNC line as above, insde the +// wxNEEDS_DECL_BEFORE_TEMPLATE case +WX_STRCMP_FUNC(wxStrcoll, wxCRT_StrcollA, wxCRT_StrcollW, wxStrcoll_String) +#endif + +#endif // defined(wxCRT_Strcoll[AW]) + +template<typename T> +inline size_t wxStrspn_String(const wxString& s1, const T& s2) +{ + size_t pos = s1.find_first_not_of(s2); + return pos == wxString::npos ? s1.length() : pos; +} +WX_STR_FUNC(size_t, wxStrspn, wxCRT_StrspnA, wxCRT_StrspnW, wxStrspn_String) + +template<typename T> +inline size_t wxStrcspn_String(const wxString& s1, const T& s2) +{ + size_t pos = s1.find_first_of(s2); + return pos == wxString::npos ? s1.length() : pos; +} +WX_STR_FUNC(size_t, wxStrcspn, wxCRT_StrcspnA, wxCRT_StrcspnW, wxStrcspn_String) + +#undef WX_STR_DECL +#undef WX_STR_CALL +#define WX_STR_DECL(name, T1, T2) name(T1 s1, T2 s2, size_t n) +#define WX_STR_CALL(func, a1, a2) func(a1, a2, n) + +template<typename T> +inline int wxStrncmp_String(const wxString& s1, const T& s2, size_t n) + { return s1.compare(0, n, s2, 0, n); } +WX_STRCMP_FUNC(wxStrncmp, wxCRT_StrncmpA, wxCRT_StrncmpW, wxStrncmp_String) + +template<typename T> +inline int wxStrnicmp_String(const wxString& s1, const T& s2, size_t n) + { return s1.substr(0, n).CmpNoCase(wxString(s2).substr(0, n)); } +WX_STRCMP_FUNC(wxStrnicmp, wxCRT_StrnicmpA, wxCRT_StrnicmpW, wxStrnicmp_String) + +#undef WX_STR_DECL +#undef WX_STR_CALL +#undef WX_STRCMP_FUNC +#undef WX_STR_FUNC +#undef WX_STR_FUNC_NO_INVERT + +#if defined(wxCRT_StrxfrmA) && defined(wxCRT_StrxfrmW) + +inline size_t wxStrxfrm(char *dest, const char *src, size_t n) + { return wxCRT_StrxfrmA(dest, src, n); } +inline size_t wxStrxfrm(wchar_t *dest, const wchar_t *src, size_t n) + { return wxCRT_StrxfrmW(dest, src, n); } +template<typename T> +inline size_t wxStrxfrm(T *dest, const wxScopedCharTypeBuffer<T>& src, size_t n) + { return wxStrxfrm(dest, src.data(), n); } +inline size_t wxStrxfrm(char *dest, const wxString& src, size_t n) + { return wxCRT_StrxfrmA(dest, src.mb_str(), n); } +inline size_t wxStrxfrm(wchar_t *dest, const wxString& src, size_t n) + { return wxCRT_StrxfrmW(dest, src.wc_str(), n); } +inline size_t wxStrxfrm(char *dest, const wxCStrData& src, size_t n) + { return wxCRT_StrxfrmA(dest, src.AsCharBuf(), n); } +inline size_t wxStrxfrm(wchar_t *dest, const wxCStrData& src, size_t n) + { return wxCRT_StrxfrmW(dest, src.AsWCharBuf(), n); } + +#endif // defined(wxCRT_Strxfrm[AW]) + +inline char *wxStrtok(char *str, const char *delim, char **saveptr) + { return wxCRT_StrtokA(str, delim, saveptr); } +inline wchar_t *wxStrtok(wchar_t *str, const wchar_t *delim, wchar_t **saveptr) + { return wxCRT_StrtokW(str, delim, saveptr); } +template<typename T> +inline T *wxStrtok(T *str, const wxScopedCharTypeBuffer<T>& delim, T **saveptr) + { return wxStrtok(str, delim.data(), saveptr); } +inline char *wxStrtok(char *str, const wxCStrData& delim, char **saveptr) + { return wxCRT_StrtokA(str, delim.AsCharBuf(), saveptr); } +inline wchar_t *wxStrtok(wchar_t *str, const wxCStrData& delim, wchar_t **saveptr) + { return wxCRT_StrtokW(str, delim.AsWCharBuf(), saveptr); } +inline char *wxStrtok(char *str, const wxString& delim, char **saveptr) + { return wxCRT_StrtokA(str, delim.mb_str(), saveptr); } +inline wchar_t *wxStrtok(wchar_t *str, const wxString& delim, wchar_t **saveptr) + { return wxCRT_StrtokW(str, delim.wc_str(), saveptr); } + +inline const char *wxStrstr(const char *haystack, const char *needle) + { return wxCRT_StrstrA(haystack, needle); } +inline const wchar_t *wxStrstr(const wchar_t *haystack, const wchar_t *needle) + { return wxCRT_StrstrW(haystack, needle); } +inline const char *wxStrstr(const char *haystack, const wxString& needle) + { return wxCRT_StrstrA(haystack, needle.mb_str()); } +inline const wchar_t *wxStrstr(const wchar_t *haystack, const wxString& needle) + { return wxCRT_StrstrW(haystack, needle.wc_str()); } +// these functions return char* pointer into the non-temporary conversion buffer +// used by c_str()'s implicit conversion to char*, for ANSI build compatibility +inline const char *wxStrstr(const wxString& haystack, const wxString& needle) + { return wxCRT_StrstrA(haystack.c_str(), needle.mb_str()); } +inline const char *wxStrstr(const wxCStrData& haystack, const wxString& needle) + { return wxCRT_StrstrA(haystack, needle.mb_str()); } +inline const char *wxStrstr(const wxCStrData& haystack, const wxCStrData& needle) + { return wxCRT_StrstrA(haystack, needle.AsCharBuf()); } +// if 'needle' is char/wchar_t, then the same is probably wanted as return value +inline const char *wxStrstr(const wxString& haystack, const char *needle) + { return wxCRT_StrstrA(haystack.c_str(), needle); } +inline const char *wxStrstr(const wxCStrData& haystack, const char *needle) + { return wxCRT_StrstrA(haystack, needle); } +inline const wchar_t *wxStrstr(const wxString& haystack, const wchar_t *needle) + { return wxCRT_StrstrW(haystack.c_str(), needle); } +inline const wchar_t *wxStrstr(const wxCStrData& haystack, const wchar_t *needle) + { return wxCRT_StrstrW(haystack, needle); } + +inline const char *wxStrchr(const char *s, char c) + { return wxCRT_StrchrA(s, c); } +inline const wchar_t *wxStrchr(const wchar_t *s, wchar_t c) + { return wxCRT_StrchrW(s, c); } +inline const char *wxStrrchr(const char *s, char c) + { return wxCRT_StrrchrA(s, c); } +inline const wchar_t *wxStrrchr(const wchar_t *s, wchar_t c) + { return wxCRT_StrrchrW(s, c); } +inline const char *wxStrchr(const char *s, const wxUniChar& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s, c) : NULL; } +inline const wchar_t *wxStrchr(const wchar_t *s, const wxUniChar& c) + { return wxCRT_StrchrW(s, (wchar_t)c); } +inline const char *wxStrrchr(const char *s, const wxUniChar& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s, c) : NULL; } +inline const wchar_t *wxStrrchr(const wchar_t *s, const wxUniChar& c) + { return wxCRT_StrrchrW(s, (wchar_t)c); } +inline const char *wxStrchr(const char *s, const wxUniCharRef& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s, c) : NULL; } +inline const wchar_t *wxStrchr(const wchar_t *s, const wxUniCharRef& c) + { return wxCRT_StrchrW(s, (wchar_t)c); } +inline const char *wxStrrchr(const char *s, const wxUniCharRef& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s, c) : NULL; } +inline const wchar_t *wxStrrchr(const wchar_t *s, const wxUniCharRef& c) + { return wxCRT_StrrchrW(s, (wchar_t)c); } +template<typename T> +inline const T* wxStrchr(const wxScopedCharTypeBuffer<T>& s, T c) + { return wxStrchr(s.data(), c); } +template<typename T> +inline const T* wxStrrchr(const wxScopedCharTypeBuffer<T>& s, T c) + { return wxStrrchr(s.data(), c); } +template<typename T> +inline const T* wxStrchr(const wxScopedCharTypeBuffer<T>& s, const wxUniChar& c) + { return wxStrchr(s.data(), (T)c); } +template<typename T> +inline const T* wxStrrchr(const wxScopedCharTypeBuffer<T>& s, const wxUniChar& c) + { return wxStrrchr(s.data(), (T)c); } +template<typename T> +inline const T* wxStrchr(const wxScopedCharTypeBuffer<T>& s, const wxUniCharRef& c) + { return wxStrchr(s.data(), (T)c); } +template<typename T> +inline const T* wxStrrchr(const wxScopedCharTypeBuffer<T>& s, const wxUniCharRef& c) + { return wxStrrchr(s.data(), (T)c); } +// these functions return char* pointer into the non-temporary conversion buffer +// used by c_str()'s implicit conversion to char*, for ANSI build compatibility +inline const char* wxStrchr(const wxString& s, char c) + { return wxCRT_StrchrA((const char*)s.c_str(), c); } +inline const char* wxStrrchr(const wxString& s, char c) + { return wxCRT_StrrchrA((const char*)s.c_str(), c); } +inline const char* wxStrchr(const wxString& s, int c) + { return wxCRT_StrchrA((const char*)s.c_str(), c); } +inline const char* wxStrrchr(const wxString& s, int c) + { return wxCRT_StrrchrA((const char*)s.c_str(), c); } +inline const char* wxStrchr(const wxString& s, const wxUniChar& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s.c_str(), c) : NULL; } +inline const char* wxStrrchr(const wxString& s, const wxUniChar& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s.c_str(), c) : NULL; } +inline const char* wxStrchr(const wxString& s, const wxUniCharRef& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s.c_str(), c) : NULL; } +inline const char* wxStrrchr(const wxString& s, const wxUniCharRef& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s.c_str(), c) : NULL; } +inline const wchar_t* wxStrchr(const wxString& s, wchar_t c) + { return wxCRT_StrchrW((const wchar_t*)s.c_str(), c); } +inline const wchar_t* wxStrrchr(const wxString& s, wchar_t c) + { return wxCRT_StrrchrW((const wchar_t*)s.c_str(), c); } +inline const char* wxStrchr(const wxCStrData& s, char c) + { return wxCRT_StrchrA(s.AsChar(), c); } +inline const char* wxStrrchr(const wxCStrData& s, char c) + { return wxCRT_StrrchrA(s.AsChar(), c); } +inline const char* wxStrchr(const wxCStrData& s, int c) + { return wxCRT_StrchrA(s.AsChar(), c); } +inline const char* wxStrrchr(const wxCStrData& s, int c) + { return wxCRT_StrrchrA(s.AsChar(), c); } +inline const char* wxStrchr(const wxCStrData& s, const wxUniChar& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s, c) : NULL; } +inline const char* wxStrrchr(const wxCStrData& s, const wxUniChar& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s, c) : NULL; } +inline const char* wxStrchr(const wxCStrData& s, const wxUniCharRef& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrchrA(s, c) : NULL; } +inline const char* wxStrrchr(const wxCStrData& s, const wxUniCharRef& uc) + { char c; return uc.GetAsChar(&c) ? wxCRT_StrrchrA(s, c) : NULL; } +inline const wchar_t* wxStrchr(const wxCStrData& s, wchar_t c) + { return wxCRT_StrchrW(s.AsWChar(), c); } +inline const wchar_t* wxStrrchr(const wxCStrData& s, wchar_t c) + { return wxCRT_StrrchrW(s.AsWChar(), c); } + +inline const char *wxStrpbrk(const char *s, const char *accept) + { return wxCRT_StrpbrkA(s, accept); } +inline const wchar_t *wxStrpbrk(const wchar_t *s, const wchar_t *accept) + { return wxCRT_StrpbrkW(s, accept); } +inline const char *wxStrpbrk(const char *s, const wxString& accept) + { return wxCRT_StrpbrkA(s, accept.mb_str()); } +inline const char *wxStrpbrk(const char *s, const wxCStrData& accept) + { return wxCRT_StrpbrkA(s, accept.AsCharBuf()); } +inline const wchar_t *wxStrpbrk(const wchar_t *s, const wxString& accept) + { return wxCRT_StrpbrkW(s, accept.wc_str()); } +inline const wchar_t *wxStrpbrk(const wchar_t *s, const wxCStrData& accept) + { return wxCRT_StrpbrkW(s, accept.AsWCharBuf()); } +inline const char *wxStrpbrk(const wxString& s, const wxString& accept) + { return wxCRT_StrpbrkA(s.c_str(), accept.mb_str()); } +inline const char *wxStrpbrk(const wxString& s, const char *accept) + { return wxCRT_StrpbrkA(s.c_str(), accept); } +inline const wchar_t *wxStrpbrk(const wxString& s, const wchar_t *accept) + { return wxCRT_StrpbrkW(s.wc_str(), accept); } +inline const char *wxStrpbrk(const wxString& s, const wxCStrData& accept) + { return wxCRT_StrpbrkA(s.c_str(), accept.AsCharBuf()); } +inline const char *wxStrpbrk(const wxCStrData& s, const wxString& accept) + { return wxCRT_StrpbrkA(s.AsChar(), accept.mb_str()); } +inline const char *wxStrpbrk(const wxCStrData& s, const char *accept) + { return wxCRT_StrpbrkA(s.AsChar(), accept); } +inline const wchar_t *wxStrpbrk(const wxCStrData& s, const wchar_t *accept) + { return wxCRT_StrpbrkW(s.AsWChar(), accept); } +inline const char *wxStrpbrk(const wxCStrData& s, const wxCStrData& accept) + { return wxCRT_StrpbrkA(s.AsChar(), accept.AsCharBuf()); } +template <typename S, typename T> +inline const T *wxStrpbrk(const S& s, const wxScopedCharTypeBuffer<T>& accept) + { return wxStrpbrk(s, accept.data()); } + + +/* inlined non-const versions */ +template <typename T> +inline char *wxStrstr(char *haystack, T needle) + { return const_cast<char*>(wxStrstr(const_cast<const char*>(haystack), needle)); } +template <typename T> +inline wchar_t *wxStrstr(wchar_t *haystack, T needle) + { return const_cast<wchar_t*>(wxStrstr(const_cast<const wchar_t*>(haystack), needle)); } + +template <typename T> +inline char * wxStrchr(char *s, T c) + { return const_cast<char*>(wxStrchr(const_cast<const char*>(s), c)); } +template <typename T> +inline wchar_t * wxStrchr(wchar_t *s, T c) + { return (wchar_t *)wxStrchr((const wchar_t *)s, c); } +template <typename T> +inline char * wxStrrchr(char *s, T c) + { return const_cast<char*>(wxStrrchr(const_cast<const char*>(s), c)); } +template <typename T> +inline wchar_t * wxStrrchr(wchar_t *s, T c) + { return const_cast<wchar_t*>(wxStrrchr(const_cast<const wchar_t*>(s), c)); } + +template <typename T> +inline char * wxStrpbrk(char *s, T accept) + { return const_cast<char*>(wxStrpbrk(const_cast<const char*>(s), accept)); } +template <typename T> +inline wchar_t * wxStrpbrk(wchar_t *s, T accept) + { return const_cast<wchar_t*>(wxStrpbrk(const_cast<const wchar_t*>(s), accept)); } + + +// ---------------------------------------------------------------------------- +// stdio.h functions +// ---------------------------------------------------------------------------- + +// NB: using fn_str() for mode is a hack to get the same type (char*/wchar_t*) +// as needed, the conversion itself doesn't matter, it's ASCII +inline FILE *wxFopen(const wxString& path, const wxString& mode) + { return wxCRT_Fopen(path.fn_str(), mode.fn_str()); } +inline FILE *wxFreopen(const wxString& path, const wxString& mode, FILE *stream) + { return wxCRT_Freopen(path.fn_str(), mode.fn_str(), stream); } +inline int wxRemove(const wxString& path) + { return wxCRT_Remove(path.fn_str()); } +inline int wxRename(const wxString& oldpath, const wxString& newpath) + { return wxCRT_Rename(oldpath.fn_str(), newpath.fn_str()); } + +extern WXDLLIMPEXP_BASE int wxPuts(const wxString& s); +extern WXDLLIMPEXP_BASE int wxFputs(const wxString& s, FILE *stream); +extern WXDLLIMPEXP_BASE void wxPerror(const wxString& s); + +extern WXDLLIMPEXP_BASE int wxFputc(const wxUniChar& c, FILE *stream); + +#define wxPutc(c, stream) wxFputc(c, stream) +#define wxPutchar(c) wxFputc(c, stdout) +#define wxFputchar(c) wxPutchar(c) + +// NB: We only provide ANSI version of fgets() because fgetws() interprets the +// stream according to current locale, which is rarely what is desired. +inline char *wxFgets(char *s, int size, FILE *stream) + { return wxCRT_FgetsA(s, size, stream); } +// This version calls ANSI version and converts the string using wxConvLibc +extern WXDLLIMPEXP_BASE wchar_t *wxFgets(wchar_t *s, int size, FILE *stream); + +#define wxGets(s) wxGets_is_insecure_and_dangerous_use_wxFgets_instead + +// NB: We only provide ANSI versions of this for the same reasons as in the +// case of wxFgets() above +inline int wxFgetc(FILE *stream) { return wxCRT_FgetcA(stream); } +inline int wxUngetc(int c, FILE *stream) { return wxCRT_UngetcA(c, stream); } + +#define wxGetc(stream) wxFgetc(stream) +#define wxGetchar() wxFgetc(stdin) +#define wxFgetchar() wxGetchar() + +// ---------------------------------------------------------------------------- +// stdlib.h functions +// ---------------------------------------------------------------------------- + +#ifdef wxCRT_AtoiW +inline int wxAtoi(const wxString& str) { return wxCRT_AtoiW(str.wc_str()); } +#else +inline int wxAtoi(const wxString& str) { return wxCRT_AtoiA(str.mb_str()); } +#endif + +#ifdef wxCRT_AtolW +inline long wxAtol(const wxString& str) { return wxCRT_AtolW(str.wc_str()); } +#else +inline long wxAtol(const wxString& str) { return wxCRT_AtolA(str.mb_str()); } +#endif + +#ifdef wxCRT_AtofW +inline double wxAtof(const wxString& str) { return wxCRT_AtofW(str.wc_str()); } +#else +inline double wxAtof(const wxString& str) { return wxCRT_AtofA(str.mb_str()); } +#endif + +inline double wxStrtod(const char *nptr, char **endptr) + { return wxCRT_StrtodA(nptr, endptr); } +inline double wxStrtod(const wchar_t *nptr, wchar_t **endptr) + { return wxCRT_StrtodW(nptr, endptr); } +template<typename T> +inline double wxStrtod(const wxScopedCharTypeBuffer<T>& nptr, T **endptr) + { return wxStrtod(nptr.data(), endptr); } + +// We implement wxStrto*() like this so that the code compiles when NULL is +// passed in - - if we had just char** and wchar_t** overloads for 'endptr', it +// would be ambiguous. The solution is to use a template so that endptr can be +// any type: when NULL constant is used, the type will be int and we can handle +// that case specially. Otherwise, we infer the type that 'nptr' should be +// converted to from the type of 'endptr'. We need wxStrtoxCharType<T> template +// to make the code compile even for T=int (that's the case when it's not going +// to be ever used, but it still has to compile). +template<typename T> struct wxStrtoxCharType {}; +template<> struct wxStrtoxCharType<char**> +{ + typedef const char* Type; + static char** AsPointer(char **p) { return p; } +}; +template<> struct wxStrtoxCharType<wchar_t**> +{ + typedef const wchar_t* Type; + static wchar_t** AsPointer(wchar_t **p) { return p; } +}; +template<> struct wxStrtoxCharType<int> +{ + typedef const char* Type; /* this one is never used */ + static char** AsPointer(int WXUNUSED_UNLESS_DEBUG(p)) + { + wxASSERT_MSG( p == 0, "passing non-NULL int is invalid" ); + return NULL; + } +}; + +template<typename T> +inline double wxStrtod(const wxString& nptr, T endptr) +{ + if ( endptr == 0 ) + { + // when we don't care about endptr, use the string representation that + // doesn't require any conversion (it doesn't matter for this function + // even if its UTF-8): + return wxStrtod(nptr.wx_str(), (wxStringCharType**)NULL); + } + else + { + // note that it is important to use c_str() here and not mb_str() or + // wc_str(), because we store the pointer into (possibly converted) + // buffer in endptr and so it must be valid even when wxStrtod() returns + typedef typename wxStrtoxCharType<T>::Type CharType; + return wxStrtod((CharType)nptr.c_str(), + wxStrtoxCharType<T>::AsPointer(endptr)); + } +} +template<typename T> +inline double wxStrtod(const wxCStrData& nptr, T endptr) + { return wxStrtod(nptr.AsString(), endptr); } + + +#define WX_STRTOX_FUNC(rettype, name, implA, implW) \ + /* see wxStrtod() above for explanation of this code: */ \ + inline rettype name(const char *nptr, char **endptr, int base) \ + { return implA(nptr, endptr, base); } \ + inline rettype name(const wchar_t *nptr, wchar_t **endptr, int base) \ + { return implW(nptr, endptr, base); } \ + template<typename T> \ + inline rettype name(const wxScopedCharTypeBuffer<T>& nptr, T **endptr, int)\ + { return name(nptr.data(), endptr); } \ + template<typename T> \ + inline rettype name(const wxString& nptr, T endptr, int base) \ + { \ + if ( endptr == 0 ) \ + return name(nptr.wx_str(), (wxStringCharType**)NULL, base); \ + else \ + { \ + typedef typename wxStrtoxCharType<T>::Type CharType; \ + return name((CharType)nptr.c_str(), \ + wxStrtoxCharType<T>::AsPointer(endptr), \ + base); \ + } \ + } \ + template<typename T> \ + inline rettype name(const wxCStrData& nptr, T endptr, int base) \ + { return name(nptr.AsString(), endptr, base); } + +WX_STRTOX_FUNC(long, wxStrtol, wxCRT_StrtolA, wxCRT_StrtolW) +WX_STRTOX_FUNC(unsigned long, wxStrtoul, wxCRT_StrtoulA, wxCRT_StrtoulW) +#ifdef wxLongLong_t +WX_STRTOX_FUNC(wxLongLong_t, wxStrtoll, wxCRT_StrtollA, wxCRT_StrtollW) +WX_STRTOX_FUNC(wxULongLong_t, wxStrtoull, wxCRT_StrtoullA, wxCRT_StrtoullW) +#endif // wxLongLong_t + +#undef WX_STRTOX_FUNC + + +// there is no command interpreter under CE, hence no system() +#ifndef __WXWINCE__ + +// mingw32 doesn't provide _tsystem() even though it provides other stdlib.h +// functions in their wide versions +#ifdef wxCRT_SystemW +inline int wxSystem(const wxString& str) { return wxCRT_SystemW(str.wc_str()); } +#else +inline int wxSystem(const wxString& str) { return wxCRT_SystemA(str.mb_str()); } +#endif + +#endif // !__WXWINCE__/__WXWINCE__ + +inline char* wxGetenv(const char *name) { return wxCRT_GetenvA(name); } +inline wchar_t* wxGetenv(const wchar_t *name) { return wxCRT_GetenvW(name); } +inline char* wxGetenv(const wxString& name) { return wxCRT_GetenvA(name.mb_str()); } +inline char* wxGetenv(const wxCStrData& name) { return wxCRT_GetenvA(name.AsCharBuf()); } +inline char* wxGetenv(const wxScopedCharBuffer& name) { return wxCRT_GetenvA(name.data()); } +inline wchar_t* wxGetenv(const wxScopedWCharBuffer& name) { return wxCRT_GetenvW(name.data()); } + +// ---------------------------------------------------------------------------- +// time.h functions +// ---------------------------------------------------------------------------- + +inline size_t wxStrftime(char *s, size_t max, + const wxString& format, const struct tm *tm) + { return wxCRT_StrftimeA(s, max, format.mb_str(), tm); } + +inline size_t wxStrftime(wchar_t *s, size_t max, + const wxString& format, const struct tm *tm) + { return wxCRT_StrftimeW(s, max, format.wc_str(), tm); } + +// NB: we can't provide both char* and wchar_t* versions for obvious reasons +// and returning wxString wouldn't work either (it would be immediately +// destroyed and if assigned to char*/wchar_t*, the pointer would be +// invalid), so we only keep ASCII version, because the returned value +// is always ASCII anyway +#define wxAsctime asctime +#define wxCtime ctime + + +// ---------------------------------------------------------------------------- +// ctype.h functions +// ---------------------------------------------------------------------------- + +// FIXME-UTF8: we'd be better off implementing these ourselves, as the CRT +// version is locale-dependent +// FIXME-UTF8: these don't work when EOF is passed in because of wxUniChar, +// is this OK or not? + +inline bool wxIsalnum(const wxUniChar& c) { return wxCRT_IsalnumW(c) != 0; } +inline bool wxIsalpha(const wxUniChar& c) { return wxCRT_IsalphaW(c) != 0; } +inline bool wxIscntrl(const wxUniChar& c) { return wxCRT_IscntrlW(c) != 0; } +inline bool wxIsdigit(const wxUniChar& c) { return wxCRT_IsdigitW(c) != 0; } +inline bool wxIsgraph(const wxUniChar& c) { return wxCRT_IsgraphW(c) != 0; } +inline bool wxIslower(const wxUniChar& c) { return wxCRT_IslowerW(c) != 0; } +inline bool wxIsprint(const wxUniChar& c) { return wxCRT_IsprintW(c) != 0; } +inline bool wxIspunct(const wxUniChar& c) { return wxCRT_IspunctW(c) != 0; } +inline bool wxIsspace(const wxUniChar& c) { return wxCRT_IsspaceW(c) != 0; } +inline bool wxIsupper(const wxUniChar& c) { return wxCRT_IsupperW(c) != 0; } +inline bool wxIsxdigit(const wxUniChar& c) { return wxCRT_IsxdigitW(c) != 0; } + +inline wxUniChar wxTolower(const wxUniChar& c) { return wxCRT_TolowerW(c); } +inline wxUniChar wxToupper(const wxUniChar& c) { return wxCRT_ToupperW(c); } + +#if WXWIN_COMPATIBILITY_2_8 +// we had goofed and defined wxIsctrl() instead of (correct) wxIscntrl() in the +// initial versions of this header -- now it is too late to remove it so +// although we fixed the function/macro name above, still provide the +// backwards-compatible synonym. +wxDEPRECATED( inline int wxIsctrl(const wxUniChar& c) ); +inline int wxIsctrl(const wxUniChar& c) { return wxIscntrl(c); } +#endif // WXWIN_COMPATIBILITY_2_8 + +inline bool wxIsascii(const wxUniChar& c) { return c.IsAscii(); } + +#endif /* _WX_WXCRT_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxcrtbase.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxcrtbase.h new file mode 100644 index 0000000000..1c3522ec66 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxcrtbase.h @@ -0,0 +1,690 @@ +/* + * Name: wx/wxcrtbase.h + * Purpose: Type-safe ANSI and Unicode builds compatible wrappers for + * CRT functions + * Author: Joel Farley, Ove Kaaven + * Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee + * Created: 1998/06/12 + * Copyright: (c) 1998-2006 wxWidgets dev team + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_WXCRTBASE_H_ +#define _WX_WXCRTBASE_H_ + +/* ------------------------------------------------------------------------- + headers and missing declarations + ------------------------------------------------------------------------- */ + +#include "wx/chartype.h" + +/* + Standard headers we need here. + + NB: don't include any wxWidgets headers here because almost all of them + include this one! + + NB2: User code should include wx/crt.h instead of including this + header directly. + + */ + +#include <stdio.h> +#include <string.h> +#include <ctype.h> +#include <wctype.h> +#include <time.h> + +#if defined(__WINDOWS__) && !defined(__WXWINCE__) + #include <io.h> +#endif + +#if defined(HAVE_STRTOK_R) && defined(__DARWIN__) && defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS + char *strtok_r(char *, const char *, char **); +#endif + +/* + Using -std=c++{98,0x} option with mingw32 disables most of standard + library extensions, so we can't rely on the presence of common non-ANSI + functions, define a special symbol to test for this. Notice that this + doesn't need to be done for g++ under Linux where _GNU_SOURCE (which is + defined by default) still makes all common extensions available even in + ANSI mode. + */ +#if defined(__MINGW32__) && defined(__STRICT_ANSI__) + #define __WX_STRICT_ANSI_GCC__ +#endif + +/* + a few compilers don't have the (non standard but common) isascii function, + define it ourselves for them + */ +#ifndef isascii + #if defined(__WX_STRICT_ANSI_GCC__) + #define wxNEED_ISASCII + #elif defined(_WIN32_WCE) + #if _WIN32_WCE <= 211 + #define wxNEED_ISASCII + #endif + #endif +#endif /* isascii */ + +#ifdef wxNEED_ISASCII + inline int isascii(int c) { return (unsigned)c < 0x80; } +#endif + +#ifdef _WIN32_WCE + #if _WIN32_WCE <= 211 + #define isspace(c) ((c) == wxT(' ') || (c) == wxT('\t')) + #endif +#endif /* _WIN32_WCE */ + +/* string.h functions */ +#ifndef strdup + #if defined(__WXWINCE__) + #if _WIN32_WCE <= 211 + #define wxNEED_STRDUP + #endif + #endif +#endif /* strdup */ + +#ifdef wxNEED_STRDUP + WXDLLIMPEXP_BASE char *strdup(const char* s); +#endif + +/* missing functions in some WinCE versions */ +#ifdef _WIN32_WCE +#if (_WIN32_WCE < 300) +WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size ); +#endif +#endif /* _WIN32_WCE */ + + +/* ------------------------------------------------------------------------- + UTF-8 locale handling + ------------------------------------------------------------------------- */ + +#ifdef __cplusplus + #if wxUSE_UNICODE_UTF8 + /* flag indicating whether the current locale uses UTF-8 or not; must be + updated every time the locale is changed! */ + #if wxUSE_UTF8_LOCALE_ONLY + #define wxLocaleIsUtf8 true + #else + extern WXDLLIMPEXP_BASE bool wxLocaleIsUtf8; + #endif + /* function used to update the flag: */ + extern WXDLLIMPEXP_BASE void wxUpdateLocaleIsUtf8(); + #else /* !wxUSE_UNICODE_UTF8 */ + inline void wxUpdateLocaleIsUtf8() {} + #endif /* wxUSE_UNICODE_UTF8/!wxUSE_UNICODE_UTF8 */ +#endif /* __cplusplus */ + + +/* ------------------------------------------------------------------------- + string.h + ------------------------------------------------------------------------- */ + +#define wxCRT_StrcatA strcat +#define wxCRT_StrchrA strchr +#define wxCRT_StrcmpA strcmp +#define wxCRT_StrcpyA strcpy +#define wxCRT_StrcspnA strcspn +#define wxCRT_StrlenA strlen +#define wxCRT_StrncatA strncat +#define wxCRT_StrncmpA strncmp +#define wxCRT_StrncpyA strncpy +#define wxCRT_StrpbrkA strpbrk +#define wxCRT_StrrchrA strrchr +#define wxCRT_StrspnA strspn +#define wxCRT_StrstrA strstr + +#define wxCRT_StrcatW wcscat +#define wxCRT_StrchrW wcschr +#define wxCRT_StrcmpW wcscmp +#define wxCRT_StrcpyW wcscpy +#define wxCRT_StrcspnW wcscspn +#define wxCRT_StrncatW wcsncat +#define wxCRT_StrncmpW wcsncmp +#define wxCRT_StrncpyW wcsncpy +#define wxCRT_StrpbrkW wcspbrk +#define wxCRT_StrrchrW wcsrchr +#define wxCRT_StrspnW wcsspn +#define wxCRT_StrstrW wcsstr + +/* these functions are not defined under CE, at least in VC8 CRT */ +#if !defined(__WXWINCE__) + #define wxCRT_StrcollA strcoll + #define wxCRT_StrxfrmA strxfrm + + #define wxCRT_StrcollW wcscoll + #define wxCRT_StrxfrmW wcsxfrm +#endif /* __WXWINCE__ */ + +/* Almost all compilers have strdup(), but VC++ and MinGW call it _strdup(). + And it's not available in MinGW strict ANSI mode nor under Windows CE. */ +#if (defined(__VISUALC__) && __VISUALC__ >= 1400) + #define wxCRT_StrdupA _strdup +#elif defined(__MINGW32__) + #ifndef __WX_STRICT_ANSI_GCC__ + #define wxCRT_StrdupA _strdup + #endif +#elif !defined(__WXWINCE__) + #define wxCRT_StrdupA strdup +#endif + +/* most Windows compilers provide _wcsdup() */ +#if defined(__WINDOWS__) && \ + !(defined(__CYGWIN__) || defined(__WX_STRICT_ANSI_GCC__)) + #define wxCRT_StrdupW _wcsdup +#elif defined(HAVE_WCSDUP) + #define wxCRT_StrdupW wcsdup +#endif + +#ifdef wxHAVE_TCHAR_SUPPORT + /* we surely have wchar_t if we have TCHAR have wcslen() */ + #ifndef HAVE_WCSLEN + #define HAVE_WCSLEN + #endif +#endif /* wxHAVE_TCHAR_SUPPORT */ + +#ifdef HAVE_WCSLEN + #define wxCRT_StrlenW wcslen +#endif + +#define wxCRT_StrtodA strtod +#define wxCRT_StrtolA strtol +#define wxCRT_StrtoulA strtoul +#define wxCRT_StrtodW wcstod +#define wxCRT_StrtolW wcstol +#define wxCRT_StrtoulW wcstoul + +#ifdef __VISUALC__ + #if __VISUALC__ >= 1300 && !defined(__WXWINCE__) + #define wxCRT_StrtollA _strtoi64 + #define wxCRT_StrtoullA _strtoui64 + #define wxCRT_StrtollW _wcstoi64 + #define wxCRT_StrtoullW _wcstoui64 + #endif /* VC++ 7+ */ +#else + #ifdef HAVE_STRTOULL + #define wxCRT_StrtollA strtoll + #define wxCRT_StrtoullA strtoull + #endif /* HAVE_STRTOULL */ + #ifdef HAVE_WCSTOULL + /* assume that we have wcstoull(), which is also C99, too */ + #define wxCRT_StrtollW wcstoll + #define wxCRT_StrtoullW wcstoull + #endif /* HAVE_WCSTOULL */ +#endif + +/* + Only VC8 and later provide strnlen() and wcsnlen() functions under Windows + and it's also only available starting from Windows CE 6.0 only in CE build. + */ +#if wxCHECK_VISUALC_VERSION(8) && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 0x600)) + #ifndef HAVE_STRNLEN + #define HAVE_STRNLEN + #endif + #ifndef HAVE_WCSNLEN + #define HAVE_WCSNLEN + #endif +#endif + +#ifdef HAVE_STRNLEN + #define wxCRT_StrnlenA strnlen +#endif + +#ifdef HAVE_WCSNLEN + #define wxCRT_StrnlenW wcsnlen +#endif + +/* define wxCRT_StricmpA/W and wxCRT_StrnicmpA/W for various compilers */ + +#if defined(__BORLANDC__) || defined(__WATCOMC__) || \ + defined(__VISAGECPP__) || \ + defined(__EMX__) || defined(__DJGPP__) + #define wxCRT_StricmpA stricmp + #define wxCRT_StrnicmpA strnicmp +#elif defined(__SYMANTEC__) || (defined(__VISUALC__) && !defined(__WXWINCE__)) + #define wxCRT_StricmpA _stricmp + #define wxCRT_StrnicmpA _strnicmp +#elif defined(__UNIX__) || (defined(__GNUWIN32__) && !defined(__WX_STRICT_ANSI_GCC__)) + #define wxCRT_StricmpA strcasecmp + #define wxCRT_StrnicmpA strncasecmp +/* #else -- use wxWidgets implementation */ +#endif + +#ifdef __VISUALC__ + #define wxCRT_StricmpW _wcsicmp + #define wxCRT_StrnicmpW _wcsnicmp +#elif defined(__UNIX__) + #ifdef HAVE_WCSCASECMP + #define wxCRT_StricmpW wcscasecmp + #endif + #ifdef HAVE_WCSNCASECMP + #define wxCRT_StrnicmpW wcsncasecmp + #endif +/* #else -- use wxWidgets implementation */ +#endif + +#ifdef HAVE_STRTOK_R + #define wxCRT_StrtokA(str, sep, last) strtok_r(str, sep, last) +#endif +/* FIXME-UTF8: detect and use wcstok() if available for wxCRT_StrtokW */ + +/* these are extern "C" because they are used by regex lib: */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef wxCRT_StrlenW +WXDLLIMPEXP_BASE size_t wxCRT_StrlenW(const wchar_t *s); +#endif + +#ifndef wxCRT_StrncmpW +WXDLLIMPEXP_BASE int wxCRT_StrncmpW(const wchar_t *s1, const wchar_t *s2, size_t n); +#endif + +#ifdef __cplusplus +} +#endif + +/* FIXME-UTF8: remove this once we are Unicode only */ +#if wxUSE_UNICODE + #define wxCRT_StrlenNative wxCRT_StrlenW + #define wxCRT_StrncmpNative wxCRT_StrncmpW + #define wxCRT_ToupperNative wxCRT_ToupperW + #define wxCRT_TolowerNative wxCRT_TolowerW +#else + #define wxCRT_StrlenNative wxCRT_StrlenA + #define wxCRT_StrncmpNative wxCRT_StrncmpA + #define wxCRT_ToupperNative toupper + #define wxCRT_TolowerNative tolower +#endif + +#ifndef wxCRT_StrcatW +WXDLLIMPEXP_BASE wchar_t *wxCRT_StrcatW(wchar_t *dest, const wchar_t *src); +#endif + +#ifndef wxCRT_StrchrW +WXDLLIMPEXP_BASE const wchar_t *wxCRT_StrchrW(const wchar_t *s, wchar_t c); +#endif + +#ifndef wxCRT_StrcmpW +WXDLLIMPEXP_BASE int wxCRT_StrcmpW(const wchar_t *s1, const wchar_t *s2); +#endif + +#ifndef wxCRT_StrcollW +WXDLLIMPEXP_BASE int wxCRT_StrcollW(const wchar_t *s1, const wchar_t *s2); +#endif + +#ifndef wxCRT_StrcpyW +WXDLLIMPEXP_BASE wchar_t *wxCRT_StrcpyW(wchar_t *dest, const wchar_t *src); +#endif + +#ifndef wxCRT_StrcspnW +WXDLLIMPEXP_BASE size_t wxCRT_StrcspnW(const wchar_t *s, const wchar_t *reject); +#endif + +#ifndef wxCRT_StrncatW +WXDLLIMPEXP_BASE wchar_t *wxCRT_StrncatW(wchar_t *dest, const wchar_t *src, size_t n); +#endif + +#ifndef wxCRT_StrncpyW +WXDLLIMPEXP_BASE wchar_t *wxCRT_StrncpyW(wchar_t *dest, const wchar_t *src, size_t n); +#endif + +#ifndef wxCRT_StrpbrkW +WXDLLIMPEXP_BASE const wchar_t *wxCRT_StrpbrkW(const wchar_t *s, const wchar_t *accept); +#endif + +#ifndef wxCRT_StrrchrW +WXDLLIMPEXP_BASE const wchar_t *wxCRT_StrrchrW(const wchar_t *s, wchar_t c); +#endif + +#ifndef wxCRT_StrspnW +WXDLLIMPEXP_BASE size_t wxCRT_StrspnW(const wchar_t *s, const wchar_t *accept); +#endif + +#ifndef wxCRT_StrstrW +WXDLLIMPEXP_BASE const wchar_t *wxCRT_StrstrW(const wchar_t *haystack, const wchar_t *needle); +#endif + +#ifndef wxCRT_StrtodW +WXDLLIMPEXP_BASE double wxCRT_StrtodW(const wchar_t *nptr, wchar_t **endptr); +#endif + +#ifndef wxCRT_StrtolW +WXDLLIMPEXP_BASE long int wxCRT_StrtolW(const wchar_t *nptr, wchar_t **endptr, int base); +#endif + +#ifndef wxCRT_StrtoulW +WXDLLIMPEXP_BASE unsigned long int wxCRT_StrtoulW(const wchar_t *nptr, wchar_t **endptr, int base); +#endif + +#ifndef wxCRT_StrxfrmW +WXDLLIMPEXP_BASE size_t wxCRT_StrxfrmW(wchar_t *dest, const wchar_t *src, size_t n); +#endif + +#ifndef wxCRT_StrdupA +WXDLLIMPEXP_BASE char *wxCRT_StrdupA(const char *psz); +#endif + +#ifndef wxCRT_StrdupW +WXDLLIMPEXP_BASE wchar_t *wxCRT_StrdupW(const wchar_t *pwz); +#endif + +#ifndef wxCRT_StricmpA +WXDLLIMPEXP_BASE int wxCRT_StricmpA(const char *psz1, const char *psz2); +#endif + +#ifndef wxCRT_StricmpW +WXDLLIMPEXP_BASE int wxCRT_StricmpW(const wchar_t *psz1, const wchar_t *psz2); +#endif + +#ifndef wxCRT_StrnicmpA +WXDLLIMPEXP_BASE int wxCRT_StrnicmpA(const char *psz1, const char *psz2, size_t len); +#endif + +#ifndef wxCRT_StrnicmpW +WXDLLIMPEXP_BASE int wxCRT_StrnicmpW(const wchar_t *psz1, const wchar_t *psz2, size_t len); +#endif + +#ifndef wxCRT_StrtokA +WXDLLIMPEXP_BASE char *wxCRT_StrtokA(char *psz, const char *delim, char **save_ptr); +#endif + +#ifndef wxCRT_StrtokW +WXDLLIMPEXP_BASE wchar_t *wxCRT_StrtokW(wchar_t *psz, const wchar_t *delim, wchar_t **save_ptr); +#endif + +/* supply strtoll and strtoull, if needed */ +#ifdef wxLongLong_t + #ifndef wxCRT_StrtollA + WXDLLIMPEXP_BASE wxLongLong_t wxCRT_StrtollA(const char* nptr, + char** endptr, + int base); + WXDLLIMPEXP_BASE wxULongLong_t wxCRT_StrtoullA(const char* nptr, + char** endptr, + int base); + #endif + #ifndef wxCRT_StrtollW + WXDLLIMPEXP_BASE wxLongLong_t wxCRT_StrtollW(const wchar_t* nptr, + wchar_t** endptr, + int base); + WXDLLIMPEXP_BASE wxULongLong_t wxCRT_StrtoullW(const wchar_t* nptr, + wchar_t** endptr, + int base); + #endif +#endif /* wxLongLong_t */ + + +/* ------------------------------------------------------------------------- + stdio.h + ------------------------------------------------------------------------- */ + +#if defined(__UNIX__) || defined(__WXMAC__) + #define wxMBFILES 1 +#else + #define wxMBFILES 0 +#endif + + +/* these functions are only needed in the form used for filenames (i.e. char* + on Unix, wchar_t* on Windows), so we don't need to use A/W suffix: */ +#if wxMBFILES || !wxUSE_UNICODE /* ANSI filenames */ + + #define wxCRT_Fopen fopen + #define wxCRT_Freopen freopen + #define wxCRT_Remove remove + #define wxCRT_Rename rename + +#else /* Unicode filenames */ + /* special case: these functions are missing under Win9x with Unicows so we + have to implement them ourselves */ + #if wxUSE_UNICODE_MSLU || defined(__WX_STRICT_ANSI_GCC__) + WXDLLIMPEXP_BASE FILE* wxMSLU__wfopen(const wchar_t *name, const wchar_t *mode); + WXDLLIMPEXP_BASE FILE* wxMSLU__wfreopen(const wchar_t *name, const wchar_t *mode, FILE *stream); + WXDLLIMPEXP_BASE int wxMSLU__wrename(const wchar_t *oldname, const wchar_t *newname); + WXDLLIMPEXP_BASE int wxMSLU__wremove(const wchar_t *name); + #define wxCRT_Fopen wxMSLU__wfopen + #define wxCRT_Freopen wxMSLU__wfreopen + #define wxCRT_Remove wxMSLU__wremove + #define wxCRT_Rename wxMSLU__wrename + #else + /* WinCE CRT doesn't provide these functions so use our own */ + #ifdef __WXWINCE__ + WXDLLIMPEXP_BASE int wxCRT_Rename(const wchar_t *src, + const wchar_t *dst); + WXDLLIMPEXP_BASE int wxCRT_Remove(const wchar_t *path); + #else + #define wxCRT_Rename _wrename + #define wxCRT_Remove _wremove + #endif + #define wxCRT_Fopen _wfopen + #define wxCRT_Freopen _wfreopen + #endif + +#endif /* wxMBFILES/!wxMBFILES */ + +#define wxCRT_PutsA puts +#define wxCRT_FputsA fputs +#define wxCRT_FgetsA fgets +#define wxCRT_FputcA fputc +#define wxCRT_FgetcA fgetc +#define wxCRT_UngetcA ungetc + +#ifdef wxHAVE_TCHAR_SUPPORT + #define wxCRT_PutsW _putws + #define wxCRT_FputsW fputws + #define wxCRT_FputcW fputwc +#endif +#ifdef HAVE_FPUTWS + #define wxCRT_FputsW fputws +#endif +#ifdef HAVE_PUTWS + #define wxCRT_PutsW putws +#endif +#ifdef HAVE_FPUTWC + #define wxCRT_FputcW fputwc +#endif +#define wxCRT_FgetsW fgetws + +#ifndef wxCRT_PutsW +WXDLLIMPEXP_BASE int wxCRT_PutsW(const wchar_t *ws); +#endif + +#ifndef wxCRT_FputsW +WXDLLIMPEXP_BASE int wxCRT_FputsW(const wchar_t *ch, FILE *stream); +#endif + +#ifndef wxCRT_FputcW +WXDLLIMPEXP_BASE int wxCRT_FputcW(wchar_t wc, FILE *stream); +#endif + +/* + NB: tmpnam() is unsafe and thus is not wrapped! + Use other wxWidgets facilities instead: + wxFileName::CreateTempFileName, wxTempFile, or wxTempFileOutputStream +*/ +#define wxTmpnam(x) wxTmpnam_is_insecure_use_wxTempFile_instead + +/* FIXME-CE: provide our own perror() using ::GetLastError() */ +#ifndef __WXWINCE__ + +#define wxCRT_PerrorA perror +#ifdef wxHAVE_TCHAR_SUPPORT + #define wxCRT_PerrorW _wperror +#endif + +#endif /* !__WXWINCE__ */ + +/* ------------------------------------------------------------------------- + stdlib.h + ------------------------------------------------------------------------- */ + +/* there are no env vars at all under CE, so no _tgetenv neither */ +#ifdef __WXWINCE__ + /* can't define as inline function as this is a C file... */ + #define wxCRT_GetenvA(name) (name, NULL) + #define wxCRT_GetenvW(name) (name, NULL) +#else + #define wxCRT_GetenvA getenv + #ifdef _tgetenv + #define wxCRT_GetenvW _wgetenv + #endif +#endif + +#ifndef wxCRT_GetenvW +WXDLLIMPEXP_BASE wchar_t * wxCRT_GetenvW(const wchar_t *name); +#endif + + +#define wxCRT_SystemA system +/* mingw32 doesn't provide _tsystem() or _wsystem(): */ +#if defined(_tsystem) + #define wxCRT_SystemW _wsystem +#endif + +#define wxCRT_AtofA atof +#define wxCRT_AtoiA atoi +#define wxCRT_AtolA atol + +#if defined(wxHAVE_TCHAR_SUPPORT) && !defined(__WX_STRICT_ANSI_GCC__) + #define wxCRT_AtoiW _wtoi + #define wxCRT_AtolW _wtol + /* _wtof doesn't exist */ +#else +#ifndef __VMS + #define wxCRT_AtofW(s) wcstod(s, NULL) +#endif + #define wxCRT_AtolW(s) wcstol(s, NULL, 10) + /* wcstoi doesn't exist */ +#endif + +/* ------------------------------------------------------------------------- + time.h + ------------------------------------------------------------------------- */ + +#define wxCRT_StrftimeA strftime +#ifdef __SGI__ + /* + IRIX provides not one but two versions of wcsftime(): XPG4 one which + uses "const char*" for the third parameter and so can't be used and the + correct, XPG5, one. Unfortunately we can't just define _XOPEN_SOURCE + high enough to get XPG5 version as this undefines other symbols which + make other functions we use unavailable (see <standards.h> for gory + details). So just declare the XPG5 version ourselves, we're extremely + unlikely to ever be compiled on a system without it. But if we ever do, + a configure test would need to be added for it (and _MIPS_SYMBOL_PRESENT + should be used to check for its presence during run-time, i.e. it would + probably be simpler to just always use our own wxCRT_StrftimeW() below + if it does ever become a problem). + */ +#ifdef __cplusplus + extern "C" +#endif + size_t + _xpg5_wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm * ); + #define wxCRT_StrftimeW _xpg5_wcsftime +#else + /* + Assume it's always available under non-Unix systems as this does seem + to be the case for now. And under Unix we trust configure to detect it + (except for SGI special case above). + */ + #if defined(HAVE_WCSFTIME) || !defined(__UNIX__) + #define wxCRT_StrftimeW wcsftime + #endif +#endif + +#ifndef wxCRT_StrftimeW +WXDLLIMPEXP_BASE size_t wxCRT_StrftimeW(wchar_t *s, size_t max, + const wchar_t *fmt, + const struct tm *tm); +#endif + + + +/* ------------------------------------------------------------------------- + ctype.h + ------------------------------------------------------------------------- */ + +#ifdef __WATCOMC__ + #define WXWCHAR_T_CAST(c) (wint_t)(c) +#else + #define WXWCHAR_T_CAST(c) c +#endif + +#define wxCRT_IsalnumW(c) iswalnum(WXWCHAR_T_CAST(c)) +#define wxCRT_IsalphaW(c) iswalpha(WXWCHAR_T_CAST(c)) +#define wxCRT_IscntrlW(c) iswcntrl(WXWCHAR_T_CAST(c)) +#define wxCRT_IsdigitW(c) iswdigit(WXWCHAR_T_CAST(c)) +#define wxCRT_IsgraphW(c) iswgraph(WXWCHAR_T_CAST(c)) +#define wxCRT_IslowerW(c) iswlower(WXWCHAR_T_CAST(c)) +#define wxCRT_IsprintW(c) iswprint(WXWCHAR_T_CAST(c)) +#define wxCRT_IspunctW(c) iswpunct(WXWCHAR_T_CAST(c)) +#define wxCRT_IsspaceW(c) iswspace(WXWCHAR_T_CAST(c)) +#define wxCRT_IsupperW(c) iswupper(WXWCHAR_T_CAST(c)) +#define wxCRT_IsxdigitW(c) iswxdigit(WXWCHAR_T_CAST(c)) + +#ifdef __GLIBC__ + #if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0) + /* /usr/include/wctype.h incorrectly declares translations */ + /* tables which provokes tons of compile-time warnings -- try */ + /* to correct this */ + #define wxCRT_TolowerW(wc) towctrans((wc), (wctrans_t)__ctype_tolower) + #define wxCRT_ToupperW(wc) towctrans((wc), (wctrans_t)__ctype_toupper) + #else /* !glibc 2.0 */ + #define wxCRT_TolowerW towlower + #define wxCRT_ToupperW towupper + #endif +#else /* !__GLIBC__ */ + /* There is a bug in VC6 C RTL: toxxx() functions dosn't do anything + with signed chars < 0, so "fix" it here. */ + #define wxCRT_TolowerW(c) towlower((wxUChar)(wxChar)(c)) + #define wxCRT_ToupperW(c) towupper((wxUChar)(wxChar)(c)) +#endif /* __GLIBC__/!__GLIBC__ */ + + + + + +/* ------------------------------------------------------------------------- + wx wrappers for CRT functions in both char* and wchar_t* versions + ------------------------------------------------------------------------- */ + +#ifdef __cplusplus + +/* NB: this belongs to wxcrt.h and not this header, but it makes life easier + * for buffer.h and stringimpl.h (both of which must be included before + * string.h, which is required by wxcrt.h) to have them here: */ + +/* safe version of strlen() (returns 0 if passed NULL pointer) */ +inline size_t wxStrlen(const char *s) { return s ? wxCRT_StrlenA(s) : 0; } +inline size_t wxStrlen(const wchar_t *s) { return s ? wxCRT_StrlenW(s) : 0; } +#ifndef wxWCHAR_T_IS_WXCHAR16 + WXDLLIMPEXP_BASE size_t wxStrlen(const wxChar16 *s ); +#endif +#ifndef wxWCHAR_T_IS_WXCHAR32 + WXDLLIMPEXP_BASE size_t wxStrlen(const wxChar32 *s ); +#endif +#define wxWcslen wxCRT_StrlenW + +#define wxStrdupA wxCRT_StrdupA +#define wxStrdupW wxCRT_StrdupW +inline char* wxStrdup(const char *s) { return wxCRT_StrdupA(s); } +inline wchar_t* wxStrdup(const wchar_t *s) { return wxCRT_StrdupW(s); } +#ifndef wxWCHAR_T_IS_WXCHAR16 + WXDLLIMPEXP_BASE wxChar16* wxStrdup(const wxChar16* s); +#endif +#ifndef wxWCHAR_T_IS_WXCHAR32 + WXDLLIMPEXP_BASE wxChar32* wxStrdup(const wxChar32* s); +#endif + +#endif /* __cplusplus */ + +#endif /* _WX_WXCRTBASE_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxcrtvararg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxcrtvararg.h new file mode 100644 index 0000000000..4ad5b9e20b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxcrtvararg.h @@ -0,0 +1,496 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/wxcrtvararg.h +// Purpose: Type-safe ANSI and Unicode builds compatible wrappers for +// printf(), scanf() and related CRT functions +// Author: Joel Farley, Ove Kåven +// Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee +// Created: 2007-02-19 +// Copyright: (c) 2007 REA Elektronik GmbH +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WXCRTVARARG_H_ +#define _WX_WXCRTVARARG_H_ + +// NB: User code should include wx/crt.h instead of including this +// header directly. + +#include "wx/wxcrt.h" +#include "wx/strvararg.h" + +#include "wx/string.h" + +// ---------------------------------------------------------------------------- +// CRT functions aliases +// ---------------------------------------------------------------------------- + +/* Required for wxPrintf() etc */ +#include <stdarg.h> + +/* printf() family saga */ + +/* + For many old Unix systems [v]snprintf()/vsscanf() exists in the system + libraries but not in the headers, so we need to declare it ourselves to be + able to use it. + */ +#ifdef __UNIX__ + +#if defined(HAVE_VSNPRINTF) && !defined(HAVE_VSNPRINTF_DECL) +#ifdef __cplusplus + extern "C" +#else + extern +#endif + int vsnprintf(char *str, size_t size, const char *format, va_list ap); +#endif /* !HAVE_VSNPRINTF_DECL */ + +#if defined(HAVE_SNPRINTF) && !defined(HAVE_SNPRINTF_DECL) +#ifdef __cplusplus + extern "C" +#else + extern +#endif + int snprintf(char *str, size_t size, const char *format, ...); +#endif /* !HAVE_SNPRINTF_DECL */ + +#if defined(HAVE_VSSCANF) && !defined(HAVE_VSSCANF_DECL) +#ifdef __cplusplus + extern "C" +#else + extern +#endif + int vsscanf(const char *str, const char *format, va_list ap); +#endif /* !HAVE_VSSCANF_DECL */ + +/* Wrapper for vsnprintf if it's 3rd parameter is non-const. Note: the + * same isn't done for snprintf below, the builtin wxSnprintf_ is used + * instead since it's already a simple wrapper */ +#if defined __cplusplus && defined HAVE_BROKEN_VSNPRINTF_DECL + inline int wx_fixed_vsnprintf(char *str, size_t size, const char *format, va_list ap) + { + return vsnprintf(str, size, (char*)format, ap); + } +#endif + +#endif /* __UNIX__ */ + +/* + mingw32 normally uses MSVCRT which has non-standard vswprintf() and so + normally _vsnwprintf() is used instead, the only exception is when mingw32 + is used with STLPort which does have a standard vswprintf() starting from + version 5.1 which we can use. + */ +#ifdef __MINGW32__ + #if defined(_STLPORT_VERSION) && _STLPORT_VERSION >= 0x510 + #ifndef HAVE_VSWPRINTF + #define HAVE_VSWPRINTF + #endif + #elif defined(HAVE_VSWPRINTF) + /* can't use non-standard vswprintf() */ + #undef HAVE_VSWPRINTF + #endif +#endif /* __MINGW32__ */ + +#if defined(__WATCOMC__) + #define HAVE_VSWPRINTF 1 +#endif + +#if wxUSE_PRINTF_POS_PARAMS + /* + The systems where vsnprintf() supports positional parameters should + define the HAVE_UNIX98_PRINTF symbol. + + On systems which don't (e.g. Windows) we are forced to use + our wxVsnprintf() implementation. + */ + #if defined(HAVE_UNIX98_PRINTF) + #ifdef HAVE_VSWPRINTF + #define wxCRT_VsnprintfW vswprintf + #endif + #ifdef HAVE_BROKEN_VSNPRINTF_DECL + #define wxCRT_VsnprintfA wx_fixed_vsnprintf + #else + #define wxCRT_VsnprintfA vsnprintf + #endif + #else /* !HAVE_UNIX98_PRINTF */ + /* + The only compiler with positional parameters support under Windows + is VC++ 8.0 which provides a new xxprintf_p() functions family. + The 2003 PSDK includes a slightly earlier version of VC8 than the + main release and does not have the printf_p functions. + */ + #if defined _MSC_FULL_VER && _MSC_FULL_VER >= 140050727 && !defined __WXWINCE__ + #define wxCRT_VsnprintfA _vsprintf_p + #define wxCRT_VsnprintfW _vswprintf_p + #endif + #endif /* HAVE_UNIX98_PRINTF/!HAVE_UNIX98_PRINTF */ +#else /* !wxUSE_PRINTF_POS_PARAMS */ + /* + We always want to define safe snprintf() function to be used instead of + sprintf(). Some compilers already have it (or rather vsnprintf() which + we really need...), otherwise we implement it using our own printf() + code. + + We define function with a trailing underscore here because the real one + is a wrapper around it as explained below + */ + + #if defined(__VISUALC__) || \ + (defined(__BORLANDC__) && __BORLANDC__ >= 0x540) + #define wxCRT_VsnprintfA _vsnprintf + #define wxCRT_VsnprintfW _vsnwprintf + #else + #if defined(HAVE__VSNWPRINTF) + #define wxCRT_VsnprintfW _vsnwprintf + #elif defined(HAVE_VSWPRINTF) + #define wxCRT_VsnprintfW vswprintf + #elif defined(__WATCOMC__) + #define wxCRT_VsnprintfW _vsnwprintf + #endif + + #if defined(HAVE_VSNPRINTF) \ + || defined(__WATCOMC__) + #ifdef HAVE_BROKEN_VSNPRINTF_DECL + #define wxCRT_VsnprintfA wx_fixed_vsnprintf + #else + #define wxCRT_VsnprintfA vsnprintf + #endif + #endif + #endif +#endif /* wxUSE_PRINTF_POS_PARAMS/!wxUSE_PRINTF_POS_PARAMS */ + +#ifndef wxCRT_VsnprintfW + /* no (suitable) vsnprintf(), cook our own */ + WXDLLIMPEXP_BASE int + wxCRT_VsnprintfW(wchar_t *buf, size_t len, const wchar_t *format, va_list argptr); + #define wxUSE_WXVSNPRINTFW 1 +#else + #define wxUSE_WXVSNPRINTFW 0 +#endif + +#ifndef wxCRT_VsnprintfA + /* no (suitable) vsnprintf(), cook our own */ + WXDLLIMPEXP_BASE int + wxCRT_VsnprintfA(char *buf, size_t len, const char *format, va_list argptr); + #define wxUSE_WXVSNPRINTFA 1 +#else + #define wxUSE_WXVSNPRINTFA 0 +#endif + +// for wxString code, define wxUSE_WXVSNPRINTF to indicate that wx +// implementation is used no matter what (in UTF-8 build, either *A or *W +// version may be called): +#if !wxUSE_UNICODE + #define wxUSE_WXVSNPRINTF wxUSE_WXVSNPRINTFA +#elif wxUSE_UNICODE_WCHAR + #define wxUSE_WXVSNPRINTF wxUSE_WXVSNPRINTFW +#elif wxUSE_UTF8_LOCALE_ONLY + #define wxUSE_WXVSNPRINTF wxUSE_WXVSNPRINTFA +#else // UTF-8 under any locale + #define wxUSE_WXVSNPRINTF (wxUSE_WXVSNPRINTFA && wxUSE_WXVSNPRINTFW) +#endif + +#define wxCRT_FprintfA fprintf +#define wxCRT_PrintfA printf +#define wxCRT_VfprintfA vfprintf +#define wxCRT_VprintfA vprintf +#define wxCRT_VsprintfA vsprintf + +/* + In Unicode mode we need to have all standard functions such as wprintf() and + so on but not all systems have them so use our own implementations in this + case. + */ +#if !defined(wxHAVE_TCHAR_SUPPORT) && !defined(HAVE_WPRINTF) + #define wxNEED_WPRINTF +#endif +#if !defined(wxHAVE_TCHAR_SUPPORT) && !defined(HAVE_VSWSCANF) && defined(HAVE_VSSCANF) + #define wxNEED_VSWSCANF +#endif + + +#if defined(wxNEED_WPRINTF) + /* + we need to implement all wide character printf functions either because + we don't have them at all or because they don't have the semantics we + need + */ + int wxCRT_PrintfW( const wchar_t *format, ... ); + int wxCRT_FprintfW( FILE *stream, const wchar_t *format, ... ); + int wxCRT_VfprintfW( FILE *stream, const wchar_t *format, va_list ap ); + int wxCRT_VprintfW( const wchar_t *format, va_list ap ); + int wxCRT_VsprintfW( wchar_t *str, const wchar_t *format, va_list ap ); +#else /* !wxNEED_WPRINTF */ + #define wxCRT_FprintfW fwprintf + #define wxCRT_PrintfW wprintf + #define wxCRT_VfprintfW vfwprintf + #define wxCRT_VprintfW vwprintf + + #if defined(__WINDOWS__) && !defined(HAVE_VSWPRINTF) + // only non-standard vswprintf() without buffer size argument can be used here + #define wxCRT_VsprintfW vswprintf + #endif +#endif /* wxNEED_WPRINTF */ + + +/* Required for wxScanf() etc. */ +#define wxCRT_ScanfA scanf +#define wxCRT_SscanfA sscanf +#define wxCRT_FscanfA fscanf + +/* vsscanf() may have a wrong declaration with non-const first parameter, fix + * this by wrapping it if necessary. */ +#if defined __cplusplus && defined HAVE_BROKEN_VSSCANF_DECL + inline int wxCRT_VsscanfA(const char *str, const char *format, va_list ap) + { + return vsscanf(const_cast<char *>(str), format, ap); + } +#else + #define wxCRT_VsscanfA vsscanf +#endif + +#if defined(wxNEED_WPRINTF) + int wxCRT_ScanfW(const wchar_t *format, ...); + int wxCRT_SscanfW(const wchar_t *str, const wchar_t *format, ...); + int wxCRT_FscanfW(FILE *stream, const wchar_t *format, ...); +#else + #define wxCRT_ScanfW wxVMS_USE_STD wscanf + #define wxCRT_SscanfW wxVMS_USE_STD swscanf + #define wxCRT_FscanfW wxVMS_USE_STD fwscanf +#endif +#ifdef wxNEED_VSWSCANF + int wxCRT_VsscanfW(const wchar_t *str, const wchar_t *format, va_list ap); +#else + #define wxCRT_VsscanfW wxVMS_USE_STD vswscanf +#endif + +// ---------------------------------------------------------------------------- +// user-friendly wrappers to CRT functions +// ---------------------------------------------------------------------------- + +#ifdef __WATCOMC__ + // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351 + #define wxPrintf wxPrintf_Impl + #define wxFprintf wxFprintf_Impl + #define wxSprintf wxSprintf_Impl + #define wxSnprintf wxSnprintf_Impl +#endif + + // FIXME-UTF8: remove this +#if wxUSE_UNICODE + #define wxCRT_PrintfNative wxCRT_PrintfW + #define wxCRT_FprintfNative wxCRT_FprintfW +#else + #define wxCRT_PrintfNative wxCRT_PrintfA + #define wxCRT_FprintfNative wxCRT_FprintfA +#endif + + +WX_DEFINE_VARARG_FUNC_SANS_N0(int, wxPrintf, 1, (const wxFormatString&), + wxCRT_PrintfNative, wxCRT_PrintfA) +inline int wxPrintf(const wxFormatString& s) +{ + return wxPrintf("%s", s.InputAsString()); +} + +WX_DEFINE_VARARG_FUNC_SANS_N0(int, wxFprintf, 2, (FILE*, const wxFormatString&), + wxCRT_FprintfNative, wxCRT_FprintfA) +inline int wxFprintf(FILE *f, const wxFormatString& s) +{ + return wxFprintf(f, "%s", s.InputAsString()); +} + +// va_list versions of printf functions simply forward to the respective +// CRT function; note that they assume that va_list was created using +// wxArgNormalizer<T>! +#if wxUSE_UNICODE_UTF8 + #if wxUSE_UTF8_LOCALE_ONLY + #define WX_VARARG_VFOO_IMPL(args, implW, implA) \ + return implA args + #else + #define WX_VARARG_VFOO_IMPL(args, implW, implA) \ + if ( wxLocaleIsUtf8 ) return implA args; \ + else return implW args + #endif +#elif wxUSE_UNICODE_WCHAR + #define WX_VARARG_VFOO_IMPL(args, implW, implA) \ + return implW args +#else // ANSI + #define WX_VARARG_VFOO_IMPL(args, implW, implA) \ + return implA args +#endif + +inline int +wxVprintf(const wxString& format, va_list ap) +{ + WX_VARARG_VFOO_IMPL((wxFormatString(format), ap), + wxCRT_VprintfW, wxCRT_VprintfA); +} + +inline int +wxVfprintf(FILE *f, const wxString& format, va_list ap) +{ + WX_VARARG_VFOO_IMPL((f, wxFormatString(format), ap), + wxCRT_VfprintfW, wxCRT_VfprintfA); +} + +#undef WX_VARARG_VFOO_IMPL + + +// wxSprintf() and friends have to be implemented in two forms, one for +// writing to char* buffer and one for writing to wchar_t*: + +#if !wxUSE_UTF8_LOCALE_ONLY +int WXDLLIMPEXP_BASE wxDoSprintfWchar(char *str, const wxChar *format, ...); +#endif +#if wxUSE_UNICODE_UTF8 +int WXDLLIMPEXP_BASE wxDoSprintfUtf8(char *str, const char *format, ...); +#endif +WX_DEFINE_VARARG_FUNC(int, wxSprintf, 2, (char*, const wxFormatString&), + wxDoSprintfWchar, wxDoSprintfUtf8) + +int WXDLLIMPEXP_BASE +wxVsprintf(char *str, const wxString& format, va_list argptr); + +#if !wxUSE_UTF8_LOCALE_ONLY +int WXDLLIMPEXP_BASE wxDoSnprintfWchar(char *str, size_t size, const wxChar *format, ...); +#endif +#if wxUSE_UNICODE_UTF8 +int WXDLLIMPEXP_BASE wxDoSnprintfUtf8(char *str, size_t size, const char *format, ...); +#endif +WX_DEFINE_VARARG_FUNC(int, wxSnprintf, 3, (char*, size_t, const wxFormatString&), + wxDoSnprintfWchar, wxDoSnprintfUtf8) + +int WXDLLIMPEXP_BASE +wxVsnprintf(char *str, size_t size, const wxString& format, va_list argptr); + +#if wxUSE_UNICODE + +#if !wxUSE_UTF8_LOCALE_ONLY +int WXDLLIMPEXP_BASE wxDoSprintfWchar(wchar_t *str, const wxChar *format, ...); +#endif +#if wxUSE_UNICODE_UTF8 +int WXDLLIMPEXP_BASE wxDoSprintfUtf8(wchar_t *str, const char *format, ...); +#endif +WX_DEFINE_VARARG_FUNC(int, wxSprintf, 2, (wchar_t*, const wxFormatString&), + wxDoSprintfWchar, wxDoSprintfUtf8) + +int WXDLLIMPEXP_BASE +wxVsprintf(wchar_t *str, const wxString& format, va_list argptr); + +#if !wxUSE_UTF8_LOCALE_ONLY +int WXDLLIMPEXP_BASE wxDoSnprintfWchar(wchar_t *str, size_t size, const wxChar *format, ...); +#endif +#if wxUSE_UNICODE_UTF8 +int WXDLLIMPEXP_BASE wxDoSnprintfUtf8(wchar_t *str, size_t size, const char *format, ...); +#endif +WX_DEFINE_VARARG_FUNC(int, wxSnprintf, 3, (wchar_t*, size_t, const wxFormatString&), + wxDoSnprintfWchar, wxDoSnprintfUtf8) + +int WXDLLIMPEXP_BASE +wxVsnprintf(wchar_t *str, size_t size, const wxString& format, va_list argptr); + +#endif // wxUSE_UNICODE + +#ifdef __WATCOMC__ + // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351 + // + // fortunately, OpenWatcom implements __VA_ARGS__, so we can provide macros + // that cast the format argument to wxString: + #undef wxPrintf + #undef wxFprintf + #undef wxSprintf + #undef wxSnprintf + + #define wxPrintf(fmt, ...) \ + wxPrintf_Impl(wxFormatString(fmt), __VA_ARGS__) + #define wxFprintf(f, fmt, ...) \ + wxFprintf_Impl(f, wxFormatString(fmt), __VA_ARGS__) + #define wxSprintf(s, fmt, ...) \ + wxSprintf_Impl(s, wxFormatString(fmt), __VA_ARGS__) + #define wxSnprintf(s, n, fmt, ...) \ + wxSnprintf_Impl(s, n, wxFormatString(fmt), __VA_ARGS__) +#endif // __WATCOMC__ + + +// We can't use wxArgNormalizer<T> for variadic arguments to wxScanf() etc. +// because they are writable, so instead of providing friendly template +// vararg-like functions, we just provide both char* and wchar_t* variants +// of these functions. The type of output variadic arguments for %s must match +// the type of 'str' and 'format' arguments. +// +// For compatibility with earlier wx versions, we also provide wxSscanf() +// version with the first argument (input string) wxString; for this version, +// the type of output string values is determined by the type of format string +// only. + +#define _WX_SCANFUNC_EXTRACT_ARGS_1(x) x +#define _WX_SCANFUNC_EXTRACT_ARGS_2(x,y) x, y +#define _WX_SCANFUNC_EXTRACT_ARGS(N, args) _WX_SCANFUNC_EXTRACT_ARGS_##N args + +#define _WX_VARARG_PASS_WRITABLE(i) a##i + +#define _WX_DEFINE_SCANFUNC(N, dummy1, name, impl, passfixed, numfixed, fixed)\ + template<_WX_VARARG_JOIN(N, _WX_VARARG_TEMPL)> \ + int name(_WX_SCANFUNC_EXTRACT_ARGS(numfixed, fixed), \ + _WX_VARARG_JOIN(N, _WX_VARARG_ARG)) \ + { \ + return impl(_WX_SCANFUNC_EXTRACT_ARGS(numfixed, passfixed), \ + _WX_VARARG_JOIN(N, _WX_VARARG_PASS_WRITABLE)); \ + } + +#define WX_DEFINE_SCANFUNC(name, numfixed, fixed, impl, passfixed) \ + _WX_VARARG_ITER(_WX_VARARG_MAX_ARGS, \ + _WX_DEFINE_SCANFUNC, \ + dummy1, name, impl, passfixed, numfixed, fixed) + +// this is needed to normalize the format string, see src/common/strvararg.cpp +// for more details +#ifdef __WINDOWS__ + #define wxScanfConvertFormatW(fmt) fmt +#else + const wxScopedWCharBuffer + WXDLLIMPEXP_BASE wxScanfConvertFormatW(const wchar_t *format); +#endif + +WX_DEFINE_SCANFUNC(wxScanf, 1, (const char *format), + wxCRT_ScanfA, (format)) +WX_DEFINE_SCANFUNC(wxScanf, 1, (const wchar_t *format), + wxCRT_ScanfW, (wxScanfConvertFormatW(format))) + +WX_DEFINE_SCANFUNC(wxFscanf, 2, (FILE *stream, const char *format), + wxCRT_FscanfA, (stream, format)) +WX_DEFINE_SCANFUNC(wxFscanf, 2, (FILE *stream, const wchar_t *format), + wxCRT_FscanfW, (stream, wxScanfConvertFormatW(format))) + +WX_DEFINE_SCANFUNC(wxSscanf, 2, (const char *str, const char *format), + wxCRT_SscanfA, (str, format)) +WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wchar_t *str, const wchar_t *format), + wxCRT_SscanfW, (str, wxScanfConvertFormatW(format))) +WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxScopedCharBuffer& str, const char *format), + wxCRT_SscanfA, (str.data(), format)) +WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxScopedWCharBuffer& str, const wchar_t *format), + wxCRT_SscanfW, (str.data(), wxScanfConvertFormatW(format))) +WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxString& str, const char *format), + wxCRT_SscanfA, (str.mb_str(), format)) +WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxString& str, const wchar_t *format), + wxCRT_SscanfW, (str.wc_str(), wxScanfConvertFormatW(format))) +WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxCStrData& str, const char *format), + wxCRT_SscanfA, (str.AsCharBuf(), format)) +WX_DEFINE_SCANFUNC(wxSscanf, 2, (const wxCStrData& str, const wchar_t *format), + wxCRT_SscanfW, (str.AsWCharBuf(), wxScanfConvertFormatW(format))) + +// Visual C++ doesn't provide vsscanf() +#ifndef __VISUALC___ +int WXDLLIMPEXP_BASE wxVsscanf(const char *str, const char *format, va_list ap); +int WXDLLIMPEXP_BASE wxVsscanf(const wchar_t *str, const wchar_t *format, va_list ap); +int WXDLLIMPEXP_BASE wxVsscanf(const wxScopedCharBuffer& str, const char *format, va_list ap); +int WXDLLIMPEXP_BASE wxVsscanf(const wxScopedWCharBuffer& str, const wchar_t *format, va_list ap); +int WXDLLIMPEXP_BASE wxVsscanf(const wxString& str, const char *format, va_list ap); +int WXDLLIMPEXP_BASE wxVsscanf(const wxString& str, const wchar_t *format, va_list ap); +int WXDLLIMPEXP_BASE wxVsscanf(const wxCStrData& str, const char *format, va_list ap); +int WXDLLIMPEXP_BASE wxVsscanf(const wxCStrData& str, const wchar_t *format, va_list ap); +#endif // !__VISUALC__ + +#endif /* _WX_WXCRTVARARG_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxhtml.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxhtml.h new file mode 100644 index 0000000000..9759dac060 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxhtml.h @@ -0,0 +1,21 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/wxhtml.h +// Purpose: wxHTML library for wxWidgets +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_HTML_H_ +#define _WX_HTML_H_ + +#include "wx/html/htmldefs.h" +#include "wx/html/htmltag.h" +#include "wx/html/htmlcell.h" +#include "wx/html/htmlpars.h" +#include "wx/html/htmlwin.h" +#include "wx/html/winpars.h" +#include "wx/filesys.h" +#include "wx/html/helpctrl.h" + +#endif // __WXHTML_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxprec.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxprec.h new file mode 100644 index 0000000000..2b50dff4b3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/wxprec.h @@ -0,0 +1,60 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/wxprec.h +// Purpose: Includes the appropriate files for precompiled headers +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// compiler detection; includes setup.h +#include "wx/defs.h" + +// check if to use precompiled headers: do it for most Windows compilers unless +// explicitly disabled by defining NOPCH +#if defined(__VISUALC__) || \ + defined(__DMC__) || \ + defined(__VISAGECPP__) || \ + defined(__WATCOMC__) || \ + defined(__BORLANDC__) + + + // If user did not request NOCPH and we're not building using configure + // then assume user wants precompiled headers. + #if !defined(NOPCH) && !defined(__WX_SETUP_H__) + #define WX_PRECOMP + #endif +#endif + +// For some reason, this must be defined for common dialogs to work. +#ifdef __WATCOMC__ + #define INCLUDE_COMMDLG_H 1 +#endif + +#ifdef WX_PRECOMP + +// include "wx/chartype.h" first to ensure that UNICODE macro is correctly set +// _before_ including <windows.h> +#include "wx/chartype.h" + +// include standard Windows headers +#if defined(__WINDOWS__) + #include "wx/msw/wrapwin.h" + #include "wx/msw/private.h" +#endif +#if defined(__WXMSW__) + #include "wx/msw/wrapcctl.h" + #include "wx/msw/wrapcdlg.h" + #include "wx/msw/missing.h" +#endif + +// include <os2.h> +#ifdef __OS2__ +# include "wx/os2/private.h" +#endif + +// include the most common wx headers +#include "wx/wx.h" + +#endif // WX_PRECOMP diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/app.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/app.h new file mode 100644 index 0000000000..807786b498 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/app.h @@ -0,0 +1,106 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/app.h +// Purpose: wxApp class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_X11_APP_H_ +#define _WX_X11_APP_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/gdicmn.h" +#include "wx/event.h" + +// ---------------------------------------------------------------------------- +// forward declarations +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxFrame; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxApp; +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; +class WXDLLIMPEXP_FWD_BASE wxLog; +class WXDLLIMPEXP_FWD_CORE wxXVisualInfo; + +// ---------------------------------------------------------------------------- +// the wxApp class for wxX11 - see wxAppBase for more details +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxApp : public wxAppBase +{ +public: + wxApp(); + virtual ~wxApp(); + + // override base class (pure) virtuals + // ----------------------------------- + + virtual void Exit(); + + virtual void WakeUpIdle(); + + virtual bool OnInitGui(); + + // implementation from now on + // -------------------------- + + // Processes an X event. + virtual bool ProcessXEvent(WXEvent* event); + +public: + // Implementation + virtual bool Initialize(int& argc, wxChar **argv); + virtual void CleanUp(); + + WXWindow GetTopLevelWidget() const { return m_topLevelWidget; } + WXColormap GetMainColormap(WXDisplay* display); + long GetMaxRequestSize() const { return m_maxRequestSize; } + + // This handler is called when a property change event occurs + virtual bool HandlePropertyChange(WXEvent *event); + + // Values that can be passed on the command line. + // Returns -1, -1 if none specified. + const wxSize& GetInitialSize() const { return m_initialSize; } + bool GetShowIconic() const { return m_showIconic; } + +#if wxUSE_UNICODE + // Global context for Pango layout. Either use X11 + // or use Xft rendering according to GDK_USE_XFT + // environment variable + PangoContext* GetPangoContext(); +#endif + + wxXVisualInfo* GetVisualInfo(WXDisplay* WXUNUSED(display)) + { + // this should be implemented correctly for wxBitmap to work + // with multiple display + return m_visualInfo; + } + +public: + static long sm_lastMessageTime; + bool m_showIconic; + wxSize m_initialSize; + +#if !wxUSE_NANOX + wxXVisualInfo* m_visualInfo; +#endif + +protected: + WXWindow m_topLevelWidget; + WXColormap m_mainColormap; + long m_maxRequestSize; + + DECLARE_DYNAMIC_CLASS(wxApp) +}; + +#endif // _WX_X11_APP_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/bitmap.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/bitmap.h new file mode 100644 index 0000000000..23ac823faf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/bitmap.h @@ -0,0 +1,148 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/bitmap.h +// Purpose: wxBitmap class +// Author: Julian Smart, Robert Roebling +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart, Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BITMAP_H_ +#define _WX_BITMAP_H_ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" +#include "wx/palette.h" +#include "wx/gdiobj.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxMask; +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxImage; + +//----------------------------------------------------------------------------- +// wxMask +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxMask: public wxObject +{ +public: + wxMask(); + wxMask(const wxMask& mask); + wxMask( const wxBitmap& bitmap, const wxColour& colour ); + wxMask( const wxBitmap& bitmap, int paletteIndex ); + wxMask( const wxBitmap& bitmap ); + virtual ~wxMask(); + + bool Create( const wxBitmap& bitmap, const wxColour& colour ); + bool Create( const wxBitmap& bitmap, int paletteIndex ); + bool Create( const wxBitmap& bitmap ); + + // implementation + WXPixmap GetBitmap() const { return m_bitmap; } + void SetBitmap( WXPixmap bitmap ) { m_bitmap = bitmap; } + + WXDisplay *GetDisplay() const { return m_display; } + void SetDisplay( WXDisplay *display ) { m_display = display; } + +private: + WXPixmap m_bitmap; + WXDisplay *m_display; + wxSize m_size; + +private: + DECLARE_DYNAMIC_CLASS(wxMask) +}; + +//----------------------------------------------------------------------------- +// wxBitmap +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase +{ +public: + wxBitmap() {} + wxBitmap( int width, int height, int depth = -1 ) { Create( width, height, depth ); } + wxBitmap( const wxSize& sz, int depth = -1 ) { Create( sz, depth ); } + + wxBitmap( const char bits[], int width, int height, int depth = 1 ); + wxBitmap( const char* const* bits ); +#ifdef wxNEEDS_CHARPP + // needed for old GCC + wxBitmap(char** data) + { + *this = wxBitmap(const_cast<const char* const*>(data)); + } +#endif + wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE ); + virtual ~wxBitmap(); + + static void InitStandardHandlers(); + + bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); + bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) + { return Create(sz.GetWidth(), sz.GetHeight(), depth); } + bool Create(int width, int height, const wxDC& WXUNUSED(dc)) + { return Create(width,height); } + + bool Create(const void* data, wxBitmapType type, + int width, int height, int depth = -1); + // create the wxBitmap using a _copy_ of the pixmap + bool Create(WXPixmap pixmap); + + int GetHeight() const; + int GetWidth() const; + int GetDepth() const; + +#if wxUSE_IMAGE + wxBitmap( const wxImage& image, int depth = -1 ) { (void)CreateFromImage(image, depth); } + wxImage ConvertToImage() const; + bool CreateFromImage(const wxImage& image, int depth = -1); +#endif // wxUSE_IMAGE + + // copies the contents and mask of the given (colour) icon to the bitmap + virtual bool CopyFromIcon(const wxIcon& icon); + + wxMask *GetMask() const; + void SetMask( wxMask *mask ); + + wxBitmap GetSubBitmap( const wxRect& rect ) const; + + bool SaveFile( const wxString &name, wxBitmapType type, const wxPalette *palette = NULL ) const; + bool LoadFile( const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE ); + + wxPalette *GetPalette() const; + wxPalette *GetColourMap() const + { return GetPalette(); } + virtual void SetPalette(const wxPalette& palette); + + // implementation + // -------------- + + void SetHeight( int height ); + void SetWidth( int width ); + void SetDepth( int depth ); + void SetPixmap( WXPixmap pixmap ); + void SetBitmap( WXPixmap bitmap ); + + WXPixmap GetPixmap() const; + WXPixmap GetBitmap() const; + + WXPixmap GetDrawable() const; + + WXDisplay *GetDisplay() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxBitmap) +}; + +#endif // _WX_BITMAP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/brush.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/brush.h new file mode 100644 index 0000000000..093ffd4de9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/brush.h @@ -0,0 +1,64 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/brush.h +// Purpose: wxBrush class +// Author: Julian Smart, Robert Roebling +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart, Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_BRUSH_H_ +#define _WX_BRUSH_H_ + +#include "wx/gdiobj.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxBrush; +class WXDLLIMPEXP_FWD_CORE wxColour; +class WXDLLIMPEXP_FWD_CORE wxBitmap; + +//----------------------------------------------------------------------------- +// wxBrush +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase +{ +public: + wxBrush() { } + + wxBrush( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID ); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) ); +#endif + wxBrush( const wxBitmap &stippleBitmap ); + virtual ~wxBrush(); + + bool operator==(const wxBrush& brush) const; + bool operator!=(const wxBrush& brush) const { return !(*this == brush); } + + wxBrushStyle GetStyle() const; + wxColour GetColour() const; + wxBitmap *GetStipple() const; + + void SetColour( const wxColour& col ); + void SetColour( unsigned char r, unsigned char g, unsigned char b ); + void SetStyle( wxBrushStyle style ); + void SetStipple( const wxBitmap& stipple ); + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxBrushStyle)style); } +#endif + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxBrush) +}; + +#endif // _WX_BRUSH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/chkconf.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/chkconf.h new file mode 100644 index 0000000000..c552e838fb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/chkconf.h @@ -0,0 +1,30 @@ +/* + * Name: wx/x11/chkconf.h + * Purpose: Compiler-specific configuration checking + * Author: Julian Smart + * Modified by: + * Created: 01/02/97 + * Copyright: (c) Julian Smart + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_X11_CHKCONF_H_ +#define _WX_X11_CHKCONF_H_ + +/* wxPalette is always needed */ +#if !wxUSE_PALETTE +# error "wxX11 requires wxUSE_PALETTE=1" +#endif + +#if wxUSE_SOCKETS && !wxUSE_SELECT_DISPATCHER +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxSocket requires wxSelectDispatcher in wxX11" +# else +# undef wxUSE_SELECT_DISPATCHER +# define wxUSE_SELECT_DISPATCHER 1 +# endif +#endif + +#endif /* _WX_X11_CHKCONF_H_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/clipbrd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/clipbrd.h new file mode 100644 index 0000000000..bba17ab1db --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/clipbrd.h @@ -0,0 +1,75 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/clipbrd.h +// Purpose: Clipboard functionality. +// Author: Robert Roebling +// Created: 17/09/98 +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_X11_CLIPBRD_H_ +#define _WX_X11_CLIPBRD_H_ + +#if wxUSE_CLIPBOARD + +#include "wx/object.h" +#include "wx/list.h" +#include "wx/dataobj.h" +#include "wx/control.h" +#include "wx/module.h" + +// ---------------------------------------------------------------------------- +// wxClipboard +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase +{ +public: + wxClipboard(); + virtual ~wxClipboard(); + + // open the clipboard before SetData() and GetData() + virtual bool Open(); + + // close the clipboard after SetData() and GetData() + virtual void Close(); + + // query whether the clipboard is opened + virtual bool IsOpened() const; + + // set the clipboard data. all other formats will be deleted. + virtual bool SetData( wxDataObject *data ); + + // add to the clipboard data. + virtual bool AddData( wxDataObject *data ); + + // ask if data in correct format is available + virtual bool IsSupported( const wxDataFormat& format ); + + // fill data with data on the clipboard (if available) + virtual bool GetData( wxDataObject& data ); + + // clears wxTheClipboard and the system's clipboard if possible + virtual void Clear(); + + // implementation from now on + bool m_open; + bool m_ownsClipboard; + bool m_ownsPrimarySelection; + wxDataObject *m_data; + + WXWindow m_clipboardWidget; /* for getting and offering data */ + WXWindow m_targetsWidget; /* for getting list of supported formats */ + bool m_waiting; /* querying data or formats is asynchronous */ + + bool m_formatSupported; + Atom m_targetRequested; + wxDataObject *m_receivedData; + +private: + DECLARE_DYNAMIC_CLASS(wxClipboard) +}; + +#endif // wxUSE_CLIPBOARD + +#endif // _WX_X11_CLIPBRD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/colour.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/colour.h new file mode 100644 index 0000000000..c9a06e6c09 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/colour.h @@ -0,0 +1,70 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/colour.h +// Purpose: wxColour class +// Author: Julian Smart, Robert Roebling +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart, Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COLOUR_H_ +#define _WX_COLOUR_H_ + +#include "wx/defs.h" +#include "wx/object.h" +#include "wx/string.h" +#include "wx/gdiobj.h" +#include "wx/palette.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxPaintDC; +class WXDLLIMPEXP_FWD_CORE wxBitmap; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class WXDLLIMPEXP_FWD_CORE wxColour; + +//----------------------------------------------------------------------------- +// wxColour +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxColour : public wxColourBase +{ +public: + // constructors + // ------------ + DEFINE_STD_WXCOLOUR_CONSTRUCTORS + + virtual ~wxColour(); + + bool operator==(const wxColour& col) const; + bool operator!=(const wxColour& col) const { return !(*this == col); } + + unsigned char Red() const; + unsigned char Green() const; + unsigned char Blue() const; + + // Implementation part + + void CalcPixel( WXColormap cmap ); + unsigned long GetPixel() const; + WXColor *GetColor() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + virtual void + InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); + + virtual bool FromString(const wxString& str); + +private: + DECLARE_DYNAMIC_CLASS(wxColour) +}; + +#endif // _WX_COLOUR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/cursor.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/cursor.h new file mode 100644 index 0000000000..a4595ae31f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/cursor.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/cursor.h +// Purpose: wxCursor class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_CURSOR_H_ +#define _WX_CURSOR_H_ + +#include "wx/gdiobj.h" +#include "wx/gdicmn.h" +#include "wx/colour.h" + +class WXDLLIMPEXP_FWD_CORE wxImage; + +//----------------------------------------------------------------------------- +// wxCursor +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject +{ +public: + wxCursor(); + wxCursor(wxStockCursor id) { InitFromStock(id); } +#if WXWIN_COMPATIBILITY_2_8 + wxCursor(int id) { InitFromStock((wxStockCursor)id); } +#endif +#if wxUSE_IMAGE + wxCursor( const wxImage & image ); +#endif + + wxCursor(const wxString& name, + wxBitmapType type = wxCURSOR_DEFAULT_TYPE, + int hotSpotX = 0, int hotSpotY = 0); + virtual ~wxCursor(); + + // implementation + + WXCursor GetCursor() const; + +protected: + void InitFromStock(wxStockCursor); + + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + +private: + DECLARE_DYNAMIC_CLASS(wxCursor) +}; + +#endif // _WX_CURSOR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dataform.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dataform.h new file mode 100644 index 0000000000..f07f017bdf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dataform.h @@ -0,0 +1,64 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/dataform.h +// Purpose: declaration of the wxDataFormat class +// Author: Robert Roebling +// Modified by: +// Created: 19.10.99 (extracted from motif/dataobj.h) +// Copyright: (c) 1999 Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_X11_DATAFORM_H +#define _WX_X11_DATAFORM_H + +class WXDLLIMPEXP_CORE wxDataFormat +{ +public: + // the clipboard formats under Xt are Atoms + typedef Atom NativeFormat; + + wxDataFormat(); + wxDataFormat( wxDataFormatId type ); + wxDataFormat( const wxString &id ); + wxDataFormat( NativeFormat format ); + + wxDataFormat& operator=(NativeFormat format) + { SetId(format); return *this; } + + // comparison (must have both versions) + bool operator==(NativeFormat format) const + { return m_format == (NativeFormat)format; } + bool operator!=(NativeFormat format) const + { return m_format != (NativeFormat)format; } + bool operator==(wxDataFormatId format) const + { return m_type == (wxDataFormatId)format; } + bool operator!=(wxDataFormatId format) const + { return m_type != (wxDataFormatId)format; } + + // explicit and implicit conversions to NativeFormat which is one of + // standard data types (implicit conversion is useful for preserving the + // compatibility with old code) + NativeFormat GetFormatId() const { return m_format; } + operator NativeFormat() const { return m_format; } + + void SetId( NativeFormat format ); + + // string ids are used for custom types - this SetId() must be used for + // application-specific formats + wxString GetId() const; + void SetId( const wxString& id ); + + // implementation + wxDataFormatId GetType() const; + +private: + wxDataFormatId m_type; + NativeFormat m_format; + + void PrepareFormats(); + void SetType( wxDataFormatId type ); +}; + + +#endif // _WX_X11_DATAFORM_H + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dataobj.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dataobj.h new file mode 100644 index 0000000000..b2efffc0e6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dataobj.h @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/dataobj.h +// Purpose: declaration of the wxDataObject class for Motif +// Author: Julian Smart +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_X11_DATAOBJ_H_ +#define _WX_X11_DATAOBJ_H_ + +// ---------------------------------------------------------------------------- +// wxDataObject is the same as wxDataObjectBase under wxMotif +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase +{ +public: + wxDataObject(); + +#ifdef __DARWIN__ + virtual ~wxDataObject() { } +#endif + + virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const; +}; + +#endif //_WX_X11_DATAOBJ_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dataobj2.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dataobj2.h new file mode 100644 index 0000000000..aef39218d8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dataobj2.h @@ -0,0 +1,92 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/dataobj2.h +// Purpose: declaration of standard wxDataObjectSimple-derived classes +// Author: Robert Roebling +// Created: 19.10.99 (extracted from gtk/dataobj.h) +// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_X11_DATAOBJ2_H_ +#define _WX_X11_DATAOBJ2_H_ + +// ---------------------------------------------------------------------------- +// wxBitmapDataObject is a specialization of wxDataObject for bitmaps +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase +{ +public: + // ctors + wxBitmapDataObject(); + wxBitmapDataObject(const wxBitmap& bitmap); + + // destr + virtual ~wxBitmapDataObject(); + + // override base class virtual to update PNG data too + virtual void SetBitmap(const wxBitmap& bitmap); + + // implement base class pure virtuals + // ---------------------------------- + + virtual size_t GetDataSize() const { return m_pngSize; } + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + // Must provide overloads to avoid hiding them (and warnings about it) + virtual size_t GetDataSize(const wxDataFormat&) const + { + return GetDataSize(); + } + virtual bool GetDataHere(const wxDataFormat&, void *buf) const + { + return GetDataHere(buf); + } + virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) + { + return SetData(len, buf); + } + +protected: + void Init() { m_pngData = NULL; m_pngSize = 0; } + void Clear() { free(m_pngData); } + void ClearAll() { Clear(); Init(); } + + size_t m_pngSize; + void *m_pngData; + + void DoConvertToPng(); +}; + +// ---------------------------------------------------------------------------- +// wxFileDataObject is a specialization of wxDataObject for file names +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDataObject : public wxFileDataObjectBase +{ +public: + // implement base class pure virtuals + // ---------------------------------- + + void AddFile( const wxString &filename ); + + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + // Must provide overloads to avoid hiding them (and warnings about it) + virtual size_t GetDataSize(const wxDataFormat&) const + { + return GetDataSize(); + } + virtual bool GetDataHere(const wxDataFormat&, void *buf) const + { + return GetDataHere(buf); + } + virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) + { + return SetData(len, buf); + } +}; + +#endif // _WX_X11_DATAOBJ2_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dc.h new file mode 100644 index 0000000000..0640f1c19a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dc.h @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/dc.h +// Purpose: wxDC class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DC_H_ +#define _WX_DC_H_ + +#include "wx/pen.h" +#include "wx/brush.h" +#include "wx/icon.h" +#include "wx/font.h" +#include "wx/gdicmn.h" + +//----------------------------------------------------------------------------- +// wxDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxX11DCImpl : public wxDCImpl +{ +public: + wxX11DCImpl( wxDC *owner ); + virtual ~wxX11DCImpl() { } + + virtual wxSize GetPPI() const; + +protected: + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); + virtual void DoGetSizeMM(int* width, int* height) const; + + // implementation + wxCoord XDEV2LOG(wxCoord x) const { return DeviceToLogicalX(x); } + wxCoord XDEV2LOGREL(wxCoord x) const { return DeviceToLogicalXRel(x); } + wxCoord YDEV2LOG(wxCoord y) const { return DeviceToLogicalY(y); } + wxCoord YDEV2LOGREL(wxCoord y) const { return DeviceToLogicalYRel(y); } + wxCoord XLOG2DEV(wxCoord x) const { return LogicalToDeviceX(x); } + wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); } + wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); } + wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); } + +private: + DECLARE_CLASS(wxX11DCImpl) +}; + +#endif +// _WX_DC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcclient.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcclient.h new file mode 100644 index 0000000000..08f540217a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcclient.h @@ -0,0 +1,178 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/dcclient.h +// Purpose: wxClientDC, wxPaintDC and wxWindowDC classes +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCCLIENT_H_ +#define _WX_DCCLIENT_H_ + +#include "wx/dc.h" +#include "wx/dcclient.h" +#include "wx/x11/dc.h" +#include "wx/region.h" + +// ----------------------------------------------------------------------------- +// fwd declarations +// ----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +//----------------------------------------------------------------------------- +// wxWindowDCImpl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxX11DCImpl +{ +public: + wxWindowDCImpl( wxDC *owner ); + wxWindowDCImpl( wxDC *owner, wxWindow *win ); + + virtual ~wxWindowDCImpl(); + + virtual bool CanDrawBitmap() const { return true; } + virtual bool CanGetTextExtent() const { return true; } + +protected: + virtual void DoGetSize(int *width, int *height) const; + virtual bool DoFloodFill( wxCoord x, wxCoord y, const wxColour& col, + wxFloodFillStyle style = wxFLOOD_SURFACE ); + virtual bool DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const; + + virtual void DoDrawPoint(wxCoord x, wxCoord y); + virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); + + virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ); + virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y, + bool useMask = false ); + + virtual void DoDrawArc(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc); + virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, + double sa, double ea); + + virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, + wxCoord width, wxCoord height, + double radius); + virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); + + virtual void DoCrossHair(wxCoord x, wxCoord y); + + virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y); + virtual void DoDrawRotatedText(const wxString &text, wxCoord x, wxCoord y, double angle); + + virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); + + virtual void DoSetClippingRegion(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); + virtual void DoSetDeviceClippingRegion(const wxRegion& region); + + virtual void DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset); + virtual void DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle = wxODDEVEN_RULE); + + +public: + virtual void Clear(); + + virtual void SetFont(const wxFont& font); + virtual void SetPen(const wxPen& pen); + virtual void SetBrush(const wxBrush& brush); + virtual void SetBackground(const wxBrush& brush); + virtual void SetBackgroundMode(int mode); + virtual void SetPalette(const wxPalette& palette); + virtual void SetLogicalFunction( wxRasterOperationMode function ); + + virtual void SetTextForeground(const wxColour& colour); + virtual void SetTextBackground(const wxColour& colour); + + virtual wxCoord GetCharHeight() const; + virtual wxCoord GetCharWidth() const; + + virtual int GetDepth() const; + virtual wxSize GetPPI() const; + + virtual void DestroyClippingRegion(); + WXWindow GetX11Window() const { return m_x11window; } + + virtual void ComputeScaleAndOrigin(); + +protected: + // implementation + // -------------- + virtual void DoGetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; + + void Init(); + + WXDisplay *m_display; + WXWindow m_x11window; + WXGC m_penGC; + WXGC m_brushGC; + WXGC m_textGC; + WXGC m_bgGC; + WXColormap m_cmap; + bool m_isMemDC; + bool m_isScreenDC; + wxRegion m_currentClippingRegion; + wxRegion m_paintClippingRegion; + +#if wxUSE_UNICODE + PangoContext *m_context; + PangoFontDescription *m_fontdesc; +#endif + + void SetUpDC(); + void Destroy(); + +private: + DECLARE_CLASS(wxWindowDCImpl) +}; + +//----------------------------------------------------------------------------- +// wxClientDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl +{ +public: + wxClientDCImpl( wxDC *owner ) : wxWindowDCImpl( owner ) { } + wxClientDCImpl( wxDC *owner, wxWindow *win ); + +protected: + virtual void DoGetSize(int *width, int *height) const; + +private: + DECLARE_CLASS(wxClientDCImpl) +}; + +//----------------------------------------------------------------------------- +// wxPaintDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl +{ +public: + wxPaintDCImpl( wxDC *owner ) : wxClientDCImpl( owner ) { } + wxPaintDCImpl( wxDC *owner, wxWindow *win ); + +private: + DECLARE_CLASS(wxPaintDCImpl) +}; + +#endif +// _WX_DCCLIENT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcmemory.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcmemory.h new file mode 100644 index 0000000000..a912b85634 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcmemory.h @@ -0,0 +1,44 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/dcmemory.h +// Purpose: wxMemoryDC class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCMEMORY_H_ +#define _WX_DCMEMORY_H_ + +#include "wx/dc.h" +#include "wx/dcmemory.h" +#include "wx/x11/dcclient.h" + +class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl +{ +public: + wxMemoryDCImpl( wxDC* owner ); + wxMemoryDCImpl( wxDC* owner, wxBitmap& bitmap); + wxMemoryDCImpl( wxDC* owner, wxDC *dc ); + virtual ~wxMemoryDCImpl(); + + virtual const wxBitmap& GetSelectedBitmap() const; + virtual wxBitmap& GetSelectedBitmap(); + + // implementation + wxBitmap m_selected; + +protected: + virtual void DoGetSize( int *width, int *height ) const; + virtual void DoSelect(const wxBitmap& bitmap); + +private: + void Init(); + +private: + DECLARE_CLASS(wxMemoryDCImpl) +}; + +#endif +// _WX_DCMEMORY_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcprint.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcprint.h new file mode 100644 index 0000000000..f1bce1873f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcprint.h @@ -0,0 +1,28 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/dcprint.h +// Purpose: wxPrinterDC class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCPRINT_H_ +#define _WX_DCPRINT_H_ + +#include "wx/dc.h" + +class WXDLLIMPEXP_CORE wxPrinterDC: public wxDC +{ +public: + DECLARE_CLASS(wxPrinterDC) + + // Create a printer DC + wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, wxPrintOrientation orientation = wxPORTRAIT); + + virtual ~wxPrinterDC(); +}; + +#endif + // _WX_DCPRINT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcscreen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcscreen.h new file mode 100644 index 0000000000..2f1dbdca7e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dcscreen.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/dcscreen.h +// Purpose: wxScreenDC class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DCSCREEN_H_ +#define _WX_DCSCREEN_H_ + +#include "wx/dcclient.h" +#include "wx/x11/dcclient.h" + +//----------------------------------------------------------------------------- +// wxScreenDC +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxPaintDCImpl +{ +public: + wxScreenDCImpl( wxDC *owner); + virtual ~wxScreenDCImpl(); + +protected: + virtual void DoGetSize(int *width, int *height) const; + +private: + DECLARE_CLASS(wxScreenDCImpl) +}; + + +#endif + // _WX_DCSCREEN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dnd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dnd.h new file mode 100644 index 0000000000..76073d5e59 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/dnd.h @@ -0,0 +1,172 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/dnd.h +// Purpose: declaration of wxDropTarget, wxDropSource classes +// Author: Julian Smart +// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling, Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DND_H_ +#define _WX_DND_H_ + +#include "wx/defs.h" + +#if wxUSE_DRAG_AND_DROP + +#include "wx/object.h" +#include "wx/string.h" +#include "wx/dataobj.h" +#include "wx/cursor.h" + +//------------------------------------------------------------------------- +// classes +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class WXDLLIMPEXP_FWD_CORE wxDropTarget; +class WXDLLIMPEXP_FWD_CORE wxTextDropTarget; +class WXDLLIMPEXP_FWD_CORE wxFileDropTarget; +class WXDLLIMPEXP_FWD_CORE wxPrivateDropTarget; + +class WXDLLIMPEXP_FWD_CORE wxDropSource; + +//------------------------------------------------------------------------- +// wxDropTarget +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxDropTarget: public wxObject +{ +public: + + wxDropTarget(); + virtual ~wxDropTarget(); + + virtual void OnEnter() { } + virtual void OnLeave() { } + virtual bool OnDrop( long x, long y, const void *data, size_t size ) = 0; + + // Override these to indicate what kind of data you support: + + virtual size_t GetFormatCount() const = 0; + virtual wxDataFormat GetFormat(size_t n) const = 0; + + // implementation +}; + +//------------------------------------------------------------------------- +// wxTextDropTarget +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextDropTarget: public wxDropTarget +{ +public: + + wxTextDropTarget() {} + virtual bool OnDrop( long x, long y, const void *data, size_t size ); + virtual bool OnDropText( long x, long y, const char *psz ); + +protected: + + virtual size_t GetFormatCount() const; + virtual wxDataFormat GetFormat(size_t n) const; +}; + +//------------------------------------------------------------------------- +// wxPrivateDropTarget +//------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPrivateDropTarget: public wxDropTarget +{ +public: + + wxPrivateDropTarget(); + + // you have to override OnDrop to get at the data + + // the string ID identifies the format of clipboard or DnD data. a word + // processor would e.g. add a wxTextDataObject and a wxPrivateDataObject + // to the clipboard - the latter with the Id "WXWORD_FORMAT". + + void SetId( const wxString& id ) + { m_id = id; } + + wxString GetId() + { return m_id; } + +private: + + virtual size_t GetFormatCount() const; + virtual wxDataFormat GetFormat(size_t n) const; + + wxString m_id; +}; + +// ---------------------------------------------------------------------------- +// A drop target which accepts files (dragged from File Manager or Explorer) +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxFileDropTarget: public wxDropTarget +{ +public: + + wxFileDropTarget() {} + + virtual bool OnDrop( long x, long y, const void *data, size_t size ); + virtual bool OnDropFiles( long x, long y, + size_t nFiles, const char * const aszFiles[] ); + +protected: + + virtual size_t GetFormatCount() const; + virtual wxDataFormat GetFormat(size_t n) const; +}; + +//------------------------------------------------------------------------- +// wxDropSource +//------------------------------------------------------------------------- + +enum wxDragResult +{ + wxDragError, // error prevented the d&d operation from completing + wxDragNone, // drag target didn't accept the data + wxDragCopy, // the data was successfully copied + wxDragMove, // the data was successfully moved + wxDragCancel // the operation was cancelled by user (not an error) +}; + +class WXDLLIMPEXP_CORE wxDropSource: public wxObject +{ +public: + + wxDropSource( wxWindow *win ); + wxDropSource( wxDataObject &data, wxWindow *win ); + + virtual ~wxDropSource(void); + + void SetData( wxDataObject &data ); + wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); + + virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; } + + // implementation +#if 0 + void RegisterWindow(void); + void UnregisterWindow(void); + + wxWindow *m_window; + wxDragResult m_retValue; + wxDataObject *m_data; + + wxCursor m_defaultCursor; + wxCursor m_goaheadCursor; +#endif +}; + +#endif + +// wxUSE_DRAG_AND_DROP + +#endif +//_WX_DND_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/font.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/font.h new file mode 100644 index 0000000000..faa21e4c80 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/font.h @@ -0,0 +1,153 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/font.h +// Purpose: wxFont class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_FONT_H_ +#define _WX_FONT_H_ + +class wxXFont; + +// Font +class WXDLLIMPEXP_CORE wxFont : public wxFontBase +{ +public: + // ctors and such + wxFont() { } + + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxFont(int size, + int family, + int style, + int weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + (void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding); + } +#endif + + wxFont(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(size, family, style, weight, underlined, face, encoding); + } + + wxFont(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(10, family, style, weight, underlined, face, encoding); + SetPixelSize(pixelSize); + } + + bool Create(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + + wxFont(const wxNativeFontInfo& info); + + // FIXME: I added the ! to make it compile; + // is this right? - JACS +#if !wxUSE_UNICODE + bool Create(const wxString& fontname, + wxFontEncoding fontenc = wxFONTENCODING_DEFAULT); +#endif + // DELETEME: no longer seems to be implemented. + // bool Create(const wxNativeFontInfo& fontinfo); + + virtual ~wxFont(); + + // implement base class pure virtuals + virtual int GetPointSize() const; + virtual wxFontStyle GetStyle() const; + virtual wxFontWeight GetWeight() const; + virtual bool GetUnderlined() const; + virtual wxString GetFaceName() const; + virtual wxFontEncoding GetEncoding() const; + virtual const wxNativeFontInfo *GetNativeFontInfo() const; + + virtual bool IsFixedWidth() const; + + virtual void SetPointSize(int pointSize); + virtual void SetFamily(wxFontFamily family); + virtual void SetStyle(wxFontStyle style); + virtual void SetWeight(wxFontWeight weight); + virtual bool SetFaceName(const wxString& faceName); + virtual void SetUnderlined(bool underlined); + virtual void SetEncoding(wxFontEncoding encoding); + + wxDECLARE_COMMON_FONT_METHODS(); + + // Implementation + +#if wxUSE_PANGO +#else + // Find an existing, or create a new, XFontStruct + // based on this wxFont and the given scale. Append the + // font to list in the private data for future reference. + + // TODO This is a fairly basic implementation, that doesn't + // allow for different facenames, and also doesn't do a mapping + // between 'standard' facenames (e.g. Arial, Helvetica, Times Roman etc.) + // and the fonts that are available on a particular system. + // Maybe we need to scan the user's machine to build up a profile + // of the fonts and a mapping file. + + // Return font struct, and optionally the Motif font list + wxXFont *GetInternalFont(double scale = 1.0, + WXDisplay* display = NULL) const; + + // Helper function for convenient access of the above. + WXFontStructPtr GetFontStruct(double scale = 1.0, + WXDisplay* display = NULL) const; +#endif + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info ); + virtual wxFontFamily DoGetFamily() const; + + void Unshare(); + +private: + DECLARE_DYNAMIC_CLASS(wxFont) +}; + +#endif + // _WX_FONT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/glcanvas.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/glcanvas.h new file mode 100644 index 0000000000..b16b6beaea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/glcanvas.h @@ -0,0 +1,49 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/glcanvas.h +// Purpose: wxGLCanvas, for using OpenGL with wxWidgets 2.0 for Motif. +// Uses the GLX extension. +// Author: Julian Smart and Wolfram Gloger +// Modified by: +// Created: 1995, 1999 +// Copyright: (c) Julian Smart, Wolfram Gloger +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GLCANVAS_H_ +#define _WX_GLCANVAS_H_ + +#include "wx/unix/glx11.h" + +class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasX11 +{ +public: + wxGLCanvas(wxWindow *parent, + wxWindowID id = wxID_ANY, + const int *attribList = NULL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const wxPalette& palette = wxNullPalette); + + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxGLCanvasName, + const int *attribList = NULL, + const wxPalette& palette = wxNullPalette); + + // implement wxGLCanvasX11 methods + // -------------------------------- + + virtual Window GetXWindow() const; + +protected: + virtual int GetColourIndex(const wxColour& col); + + DECLARE_CLASS(wxGLCanvas) +}; + +#endif // _WX_GLCANVAS_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/joystick.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/joystick.h new file mode 100644 index 0000000000..8e9d4c433d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/joystick.h @@ -0,0 +1,88 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/joystick.h +// Purpose: wxJoystick class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_JOYSTICK_H_ +#define _WX_JOYSTICK_H_ + +#include "wx/event.h" + +class WXDLLIMPEXP_ADV wxJoystick: public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxJoystick) +public: +/* +* Public interface + */ + + wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; } + + // Attributes + //////////////////////////////////////////////////////////////////////////// + + wxPoint GetPosition() const; + int GetZPosition() const; + int GetButtonState() const; + int GetPOVPosition() const; + int GetPOVCTSPosition() const; + int GetRudderPosition() const; + int GetUPosition() const; + int GetVPosition() const; + int GetMovementThreshold() const; + void SetMovementThreshold(int threshold) ; + + // Capabilities + //////////////////////////////////////////////////////////////////////////// + + bool IsOk() const; // Checks that the joystick is functioning + static int GetNumberJoysticks() ; + int GetManufacturerId() const ; + int GetProductId() const ; + wxString GetProductName() const ; + int GetXMin() const; + int GetYMin() const; + int GetZMin() const; + int GetXMax() const; + int GetYMax() const; + int GetZMax() const; + int GetNumberButtons() const; + int GetNumberAxes() const; + int GetMaxButtons() const; + int GetMaxAxes() const; + int GetPollingMin() const; + int GetPollingMax() const; + int GetRudderMin() const; + int GetRudderMax() const; + int GetUMin() const; + int GetUMax() const; + int GetVMin() const; + int GetVMax() const; + + bool HasRudder() const; + bool HasZ() const; + bool HasU() const; + bool HasV() const; + bool HasPOV() const; + bool HasPOV4Dir() const; + bool HasPOVCTS() 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(); + +protected: + int m_joystick; +}; + +#endif + // _WX_JOYSTICK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/minifram.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/minifram.h new file mode 100644 index 0000000000..55d4699e40 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/minifram.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/minifram.h +// Purpose: wxMiniFrame class. A small frame for e.g. floating toolbars. +// If there is no equivalent on your platform, just make it a +// normal frame. +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MINIFRAM_H_ +#define _WX_MINIFRAM_H_ + +#include "wx/frame.h" + +class WXDLLIMPEXP_CORE wxMiniFrame: public wxFrame { + + DECLARE_DYNAMIC_CLASS(wxMiniFrame) + +public: + inline wxMiniFrame() {} + inline wxMiniFrame(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION, + const wxString& name = wxFrameNameStr) + { + // Use wxFrame constructor in absence of more specific code. + Create(parent, id, title, pos, size, style, name); + } + + virtual ~wxMiniFrame() {} +protected: +}; + +#endif + // _WX_MINIFRAM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/nanox/X11/Xatom.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/nanox/X11/Xatom.h new file mode 100644 index 0000000000..60fba84c97 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/nanox/X11/Xatom.h @@ -0,0 +1,6 @@ + +/* + * Xlib compatibility + */ + +/* Nothing yet */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/nanox/X11/Xlib.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/nanox/X11/Xlib.h new file mode 100644 index 0000000000..0e3aed4d23 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/nanox/X11/Xlib.h @@ -0,0 +1,356 @@ +/* + * Xlib compatibility + */ + +#ifndef _DUMMY_XLIBH_ +#define _DUMMY_XLIBH_ + +/* Move away the typedef in XtoNX.h */ +#define XFontStruct XFontStruct1 +#include <XtoNX.h> +#undef XFontStruct +#undef XCharStruct + +/* Data types */ + +typedef GR_PALETTE* Colormap; +typedef GR_DRAW_ID Drawable ; +typedef int Status; +typedef unsigned long VisualID; +typedef int Bool; +typedef long XID; +typedef GR_SCANCODE KeySym; +typedef GR_EVENT_KEYSTROKE XKeyEvent; +typedef struct { + GR_FONT_INFO info; + GR_FONT_ID fid; +} XFontStruct; +typedef struct { + short lbearing; /* origin to left edge of raster */ + short rbearing; /* origin to right edge of raster */ + short width; /* advance to next char's origin */ + short ascent; /* baseline to top edge of raster */ + short descent; /* baseline to bottom edge of raster */ + unsigned short attributes; /* per char flags (not predefined) */ +} XCharStruct; + +/* Configure window value mask bits */ +#define CWX (1<<0) +#define CWY (1<<1) +#define CWWidth (1<<2) +#define CWHeight (1<<3) +#define CWBorderWidth (1<<4) +#define CWSibling (1<<5) +#define CWStackMode (1<<6) + +/* Values */ + +typedef struct { + int x, y; + int width, height; + int border_width; + Window sibling; + int stack_mode; +} XWindowChanges; + +/* typedef unsigned long Time; */ + +#define Success 0 +#define GrabSuccess Success +#define GrabNotViewable (Success+1) +#define InputOutput 1 +#define InputOnly 2 +#define IsUnmapped 0 +#define IsUnviewable 1 +#define IsViewable 2 +/* Is this right? */ +#define PropertyChangeMask GR_EVENT_MASK_SELECTION_CHANGED +#define GraphicsExpose GR_EVENT_TYPE_EXPOSURE +#define GraphicsExposeMask GR_EVENT_MASK_EXPOSURE +#define ColormapChangeMask 0 +#define FillSolid 0 +#define LineSolid 0 +#define LineOnOffDash 0 +#define CapNotLast 0 +#define CapRound 0 +#define CapProjecting 0 +#define CapButt 0 +#define JoinRound 0 +#define JoinBevel 0 +#define JoinMiter 0 +#define IncludeInferiors 0 +#define ClipByChildren 0 +#define DoRed 0 +#define DoGreen 0 +#define DoBlue 0 +#define NoEventMask GR_EVENT_MASK_NONE +#define RevertToParent 0 +#define CurrentTime 0 +#define GrabModeAsync 0 + +#define GXcopy GR_MODE_COPY +#define GXclear GR_MODE_CLEAR +#ifndef GXxor +#define GXxor GR_MODE_OR +#endif +#define GXinvert GR_MODE_INVERT +#define GXorReverse GR_MODE_ORREVERSE +#define GXandReverse GR_MODE_ANDREVERSE +#define GXand GR_MODE_AND +#define GXor GR_MODE_OR +#define GXandInverted GR_MODE_ANDINVERTED +#define GXnoop GR_MODE_NOOP +#define GXnor GR_MODE_NOR +#define GXequiv GR_MODE_EQUIV +#define GXcopyInverted GR_MODE_COPYINVERTED +#define GXorInverted GR_MODE_ORINVERTED +#define GXnand GR_MODE_NAND +#define GXset GR_MODE_SET + +#define XSynchronize(display,sync) +#define XDefaultRootWindow(d) GR_ROOT_WINDOW_ID +#define RootWindowOfScreen(s) GR_ROOT_WINDOW_ID +#define XFreePixmap(d, p) GrDestroyWindow(p) +#define XFreeCursor(d, c) GrDestroyCursor(c) +#define XFreeGC(d, gc) GrDestroyGC(gc) +#define XSetBackground(d, gc, c) GrSetGCBackground(gc, c) +#define DefaultVisual(d, s) (NULL) +#define DefaultColormap(d, s) DefaultColormapOfScreen(NULL) +#define DefaultScreenOfDisplay(d) 0 +#define XSetFillStyle(d, gc, s) wxNoop() +#define XSetLineAttributes(d, gc, a, b, c, e) wxNoop() +#define XSetClipMask(d, gc, m) wxNoop() +#define XSetTSOrigin(d, gc, x, y) wxNoop() +#define XFillArc(d, w, gc, x, y, rx, ry, a1, a2) GrArcAngle(w, gc, x, y, rx, ry, a1, a2, GR_PIE) +#define XDrawArc(d, w, gc, x, y, rx, ry, a1, a2) GrArcAngle(w, gc, x, y, rx, ry, a1, a2, GR_ARC) +#define XDrawPoint(d, w, gc, x, y) GrPoint(w, gc, x, y) +#define XFillPolygon(d, w, gc, p, n, s, m) GrFillPoly(w, gc, n, p) +#define XDrawRectangle(d, w, gc, x, y, width, height) GrRect(w, gc, x, y, width, height) +#define XSetClipOrigin(d, gc, x, y) GrSetGCClipOrigin(gc, x, y) +#define XSetRegion(d, gc, r) GrSetGCRegion(gc, r) +#define XSetTile(d, gc, p) wxNoop() +#define XSetStipple(d, gc, p) wxNoop() +#define XSetSubwindowMode(d, gc, mode) wxNoop() +#define XFreeColormap(d, cmap) wxNoop() +#define XSetTransientForHint(d, w, p) wxNoop() +#define XUnionRegion(sr1,sr2,r) GrUnionRegion(r,sr1,sr2) +#define XIntersectRegion(sr1,sr2,r) GrIntersectRegion(r,sr1,sr2) +#define XEqualRegion(r1, r2) GrEqualRegion(r1, r2) +#define XEmptyRegion(r) GrEmptyRegion(r) +#define XOffsetRegion(r, x, y) GrOffsetRegion(r, x, y) +#define XClipBox(r, rect) GrGetRegionBox(r, rect) +#define XPointInRegion(r, x, y) GrPointInRegion(r, x, y) +#define XXorRegion(sr1, sr2, r) GrXorRegion(r, sr1, sr2) +/* TODO: Cannot find equivalent for this. */ +#define XIconifyWindow(d, w, s) 0 +#define XCreateWindowWithColor(d,p,x,y,w,h,bw,depth,cl,vis,backColor,foreColor) \ + GrNewWindow(p,x,y,w,h,bw,backColor,foreColor) +#define XLookupString(event, buf, len, sym, status) (*sym = (event)->scancode) +#define XBell(a, b) GrBell() +#define DisplayWidthMM(d, s) 100 +#define DisplayHeightMM(d, s) 100 + +/* These defines are wrongly defined in XtoNX.h, IMHO, + * since they reference a static global. + * Redefined as functions, below. + */ + +#undef DisplayWidth +#undef DisplayHeight +#undef DefaultDepth + +/* + * Data structure used by color operations + */ +typedef struct { + unsigned long pixel; + unsigned short red, green, blue; + char flags; /* do_red, do_green, do_blue */ + char pad; +} XColor; + +typedef struct { + int type; + Display *display; /* Display the event was read from */ + XID resourceid; /* resource id */ + unsigned long serial; /* serial number of failed request */ + unsigned char error_code; /* error code of failed request */ + unsigned char request_code; /* Major op-code of failed request */ + unsigned char minor_code; /* Minor op-code of failed request */ +} XErrorEvent; + +/* + * Visual structure; contains information about colormapping possible. + */ +typedef struct { + void *ext_data; /* hook for extension to hang data */ + VisualID visualid; /* visual id of this visual */ +#if defined(__cplusplus) || defined(c_plusplus) + int c_class; /* C++ class of screen (monochrome, etc.) */ +#else + int class; /* class of screen (monochrome, etc.) */ +#endif + unsigned long red_mask, green_mask, blue_mask; /* mask values */ + int bits_per_rgb; /* log base 2 of distinct color values */ + int map_entries; /* color map entries */ +} Visual; + +/* + * Depth structure; contains information for each possible depth. + */ +typedef struct { + int depth; /* this depth (Z) of the depth */ + int nvisuals; /* number of Visual types at this depth */ + Visual *visuals; /* list of visuals possible at this depth */ +} Depth; + +/* + * Information about the screen. The contents of this structure are + * implementation dependent. A Screen should be treated as opaque + * by application code. + */ + +struct _XDisplay; /* Forward declare before use for C++ */ + +typedef struct { + void *ext_data; /* hook for extension to hang data */ + struct _XDisplay *display;/* back pointer to display structure */ + Window root; /* Root window id. */ + int width, height; /* width and height of screen */ + int mwidth, mheight; /* width and height of in millimeters */ + int ndepths; /* number of depths possible */ + Depth *depths; /* list of allowable depths on the screen */ + int root_depth; /* bits per pixel */ + Visual *root_visual; /* root visual */ + GC default_gc; /* GC for the root root visual */ + Colormap cmap; /* default color map */ + unsigned long white_pixel; + unsigned long black_pixel; /* White and Black pixel values */ + int max_maps, min_maps; /* max and min color maps */ + int backing_store; /* Never, WhenMapped, Always */ + Bool save_unders; + long root_input_mask; /* initial root input mask */ +} Screen; + + +typedef struct { + int x, y; /* location of window */ + int width, height; /* width and height of window */ + int border_width; /* border width of window */ + int depth; /* depth of window */ + Visual *visual; /* the associated visual structure */ + Window root; /* root of screen containing window */ + int _class; /* InputOutput, InputOnly*/ + int bit_gravity; /* one of the bit gravity values */ + int win_gravity; /* one of the window gravity values */ + int backing_store; /* NotUseful, WhenMapped, Always */ + unsigned long backing_planes;/* planes to be preserved if possible */ + unsigned long backing_pixel;/* value to be used when restoring planes */ + Bool save_under; /* boolean, should bits under be saved? */ + Colormap colormap; /* color map to be associated with window */ + Bool map_installed; /* boolean, is color map currently installed*/ + int map_state; /* IsUnmapped, IsUnviewable, IsViewable */ + long all_event_masks; /* set of events all people have interest in*/ + long your_event_mask; /* my event mask */ + long do_not_propagate_mask;/* set of events that should not propagate */ + Bool override_redirect; /* boolean value for override-redirect */ + Screen *screen; /* back pointer to correct screen */ +} XWindowAttributes; + +typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */ + Display* /* display */, + XErrorEvent* /* error_event */ +); + +/* events*/ + +/* What should this be? */ +#if 0 +#ifndef ResizeRequest +#define ResizeRequest ?? +#endif +#endif + +#ifndef MotionNotify +#define MotionNotify GR_EVENT_TYPE_MOUSE_POSITION +#define PointerMotionMask GR_EVENT_MASK_MOUSE_POSITION +#endif + +#define ButtonMotionMask GR_EVENT_MASK_MOUSE_POSITION +#define KeymapStateMask 0 +#define StructureNotifyMask GR_EVENT_MASK_UPDATE + +#ifdef ConfigureNotify +/* XtoNX.h gets it wrong */ +#undef ConfigureNotify +#endif +#define ConfigureNotify GR_EVENT_TYPE_UPDATE + +#ifndef FocusIn +#define FocusIn GR_EVENT_TYPE_FOCUS_IN +#define FocusOut GR_EVENT_TYPE_FOCUS_OUT +#define FocusChangeMask GR_EVENT_MASK_FOCUS_IN|GR_EVENT_MASK_FOCUS_OUT +#endif + +/* Fuunctions */ + +#ifdef __cplusplus +extern "C" { +#endif + +Display *XOpenDisplay(char *name); +Colormap DefaultColormapOfScreen(Screen* /* screen */) ; +int XSetGraphicsExposures( Display* /* display */, GC /* gc */, Bool /* graphics_exposures */) ; +int XWarpPointer( Display* /* display */, Window /* srcW */, Window /* destW */, + int /* srcX */, int /* srcY */, + unsigned int /* srcWidth */, + unsigned int /* srcHeight */, + int destX, int destY); +int XSetInputFocus(Display* /* display */, Window focus, int /* revert_to */, Time /* time */) ; +int XGetInputFocus(Display* /* display */, Window* /* focus_return */, int* /* revert_to_return */) ; +int XGrabPointer(Display* /* display */, Window /* grab_window */, + Bool /* owner_events */, unsigned int /* event_mask */, + int /* pointer_mode */, int /* keyboard_mode */, + Window /* confine_to */, Cursor /* cursor */, Time /* time */) ; +int XUngrabPointer(Display* /* display */, Time /* time */) ; +int XCopyArea(Display* /* display */, Drawable src, Drawable dest, GC gc, + int src_x, int src_y, unsigned int width, unsigned int height, + int dest_x, int dest_y) ; +int XCopyPlane(Display* /* display */, Drawable src, Drawable dest, GC gc, + int src_x, int src_y, unsigned int width, unsigned int height, + int dest_x, int dest_y, unsigned long /* plane */) ; + +XErrorHandler XSetErrorHandler (XErrorHandler /* handler */); +Screen *XScreenOfDisplay(Display* /* display */, + int /* screen_number */); +int DisplayWidth(Display* /* display */, int /* screen */); +int DisplayHeight(Display* /* display */, int /* screen */); +int DefaultDepth(Display* /* display */, int /* screen */); +int XAllocColor(Display* /* display */, Colormap /* cmap */, + XColor* color); +int XParseColor(Display* display, Colormap cmap, + const char* cname, XColor* color); +int XDrawLine(Display* display, Window win, GC gc, + int x1, int y1, int x2, int y2); +int XTextExtents( XFontStruct* font, char* s, int len, int* direction, + int* ascent, int* descent2, XCharStruct* overall); +int XPending(Display *d); +XFontStruct* XLoadQueryFont(Display* display, const char* fontSpec); +int XFreeFont(Display* display, XFontStruct* fontStruct); +int XQueryColor(Display* display, Colormap cmap, XColor* color); +Status XGetWindowAttributes(Display* display, Window w, + XWindowAttributes* window_attributes); + +int XConfigureWindow(Display* display, Window w, int mask, XWindowChanges* changes); +int XTranslateCoordinates(Display* display, Window srcWindow, Window destWindow, int srcX, int srcY, int* destX, int* destY, Window* childReturn); + +void wxNoop(); + +#ifdef __cplusplus +} +#endif + +#define XMaxRequestSize(display) 16384 + +#endif + /* _DUMMY_XLIBH_ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/nanox/X11/Xutil.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/nanox/X11/Xutil.h new file mode 100644 index 0000000000..adf6bea03e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/nanox/X11/Xutil.h @@ -0,0 +1,5 @@ +/* + * Xlib compatibility + */ + +/* Nothing yet */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/palette.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/palette.h new file mode 100644 index 0000000000..b9d31513d7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/palette.h @@ -0,0 +1,71 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/palette.h +// Purpose: wxPalette class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PALETTE_H_ +#define _WX_PALETTE_H_ + +#include "wx/list.h" + +class WXDLLIMPEXP_FWD_CORE wxPalette; + +// Palette for one display +class wxXPalette : public wxObject +{ + DECLARE_DYNAMIC_CLASS(wxXPalette) + +public: + wxXPalette(); + + WXDisplay* m_display; + int m_pix_array_n; + unsigned long* m_pix_array; + WXColormap m_cmap; + bool m_destroyable; +}; + +class WXDLLIMPEXP_CORE wxPaletteRefData: public wxGDIRefData +{ + friend class WXDLLIMPEXP_FWD_CORE wxPalette; +public: + wxPaletteRefData(); + virtual ~wxPaletteRefData(); + +protected: + wxList m_palettes; +}; + +#define M_PALETTEDATA ((wxPaletteRefData *)m_refData) + +class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase +{ + DECLARE_DYNAMIC_CLASS(wxPalette) + +public: + wxPalette(); + + wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); + virtual ~wxPalette(); + bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); + int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const; + bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const; + + // X-specific + WXColormap GetXColormap(WXDisplay* display = NULL) const; + bool TransferBitmap(void *data, int depth, int size); + bool TransferBitmap8(unsigned char *data, unsigned long size, void *dest, unsigned int bpp); + unsigned long *GetXPixArray(WXDisplay* display, int *pix_array_n); + void PutXColormap(WXDisplay* display, WXColormap cmap, bool destroyable); + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; +}; + +#endif // _WX_PALETTE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/pen.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/pen.h new file mode 100644 index 0000000000..31f0b20e98 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/pen.h @@ -0,0 +1,78 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/pen.h +// Purpose: wxPen class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PEN_H_ +#define _WX_PEN_H_ + +#include "wx/gdicmn.h" +#include "wx/gdiobj.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxPen; +class WXDLLIMPEXP_FWD_CORE wxColour; +class WXDLLIMPEXP_FWD_CORE wxBitmap; + +typedef char wxX11Dash; + +//----------------------------------------------------------------------------- +// wxPen +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPen: public wxPenBase +{ +public: + wxPen() { } + + wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID ); +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); +#endif + + wxPen( const wxBitmap &stipple, int width ); + virtual ~wxPen(); + + bool operator == ( const wxPen& pen ) const; + bool operator != (const wxPen& pen) const { return !(*this == pen); } + + void SetColour( const wxColour &colour ); + void SetColour( unsigned char red, unsigned char green, unsigned char blue ); + void SetCap( wxPenCap capStyle ); + void SetJoin( wxPenJoin joinStyle ); + void SetStyle( wxPenStyle style ); + void SetWidth( int width ); + void SetDashes( int number_of_dashes, const wxDash *dash ); + void SetStipple( const wxBitmap& stipple ); + + wxColour GetColour() const; + wxPenCap GetCap() const; + wxPenJoin GetJoin() const; + wxPenStyle GetStyle() const; + int GetWidth() const; + int GetDashes(wxDash **ptr) const; + int GetDashCount() const; + wxDash* GetDash() const; + wxBitmap* GetStipple() const; + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 + wxDEPRECATED_FUTURE( void SetStyle(int style) ) + { SetStyle((wxPenStyle)style); } +#endif + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + DECLARE_DYNAMIC_CLASS(wxPen) +}; + +#endif // _WX_PEN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/popupwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/popupwin.h new file mode 100644 index 0000000000..9038e79680 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/popupwin.h @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/popupwin.h +// Purpose: +// Author: Robert Roebling +// Created: +// Copyright: (c) 2001 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __GTKPOPUPWINH__ +#define __GTKPOPUPWINH__ + +#include "wx/defs.h" +#include "wx/panel.h" +#include "wx/icon.h" + +//----------------------------------------------------------------------------- +// wxPopUpWindow +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxPopupWindow: public wxPopupWindowBase +{ +public: + wxPopupWindow() { } + virtual ~wxPopupWindow() ; + + wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE) + { (void)Create(parent, flags); } + + bool Create(wxWindow *parent, int flags = wxBORDER_NONE); + + virtual bool Show( bool show = TRUE ); + +protected: + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxPopupWindow) +}; + +#endif // __GTKPOPUPWINDOWH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/print.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/print.h new file mode 100644 index 0000000000..8f878dfa3e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/print.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/print.h +// Purpose: wxPrinter, wxPrintPreview classes +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRINT_H_ +#define _WX_PRINT_H_ + +#include "wx/prntbase.h" + +/* +* Represents the printer: manages printing a wxPrintout object +*/ + +class WXDLLIMPEXP_CORE wxPrinter: public wxPrinterBase +{ + DECLARE_DYNAMIC_CLASS(wxPrinter) + +public: + wxPrinter(wxPrintData *data = NULL); + virtual ~wxPrinter(); + + 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 WXDLLIMPEXP_CORE wxPrintPreview: public wxPrintPreviewBase +{ + DECLARE_CLASS(wxPrintPreview) + +public: + wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL); + virtual ~wxPrintPreview(); + + virtual bool Print(bool interactive); + virtual void DetermineScaling(); +}; + +#endif + // _WX_PRINT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/private.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/private.h new file mode 100644 index 0000000000..d1436aec45 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/private.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/private.h +// Purpose: Private declarations for X11 port +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_H_ +#define _WX_PRIVATE_H_ + +#include "wx/defs.h" +#include "wx/hashmap.h" +#include "wx/utils.h" +#if defined( __cplusplus ) && defined( __VMS ) +#pragma message disable nosimpint +#endif +#include "X11/Xlib.h" +#include "X11/Xatom.h" +#include "X11/Xutil.h" +#if defined( __cplusplus ) && defined( __VMS ) +#pragma message enable nosimpint +#endif + +// Include common declarations +#include "wx/x11/privx.h" + +#if wxUSE_PANGO +#include <pango/pango.h> +#endif + +class WXDLLIMPEXP_FWD_CORE wxMouseEvent; +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +// ---------------------------------------------------------------------------- +// Some Unicode <-> UTF8 macros stolen from GTK +// ---------------------------------------------------------------------------- + +#if wxUSE_UNICODE + #define wxGTK_CONV(s) wxConvUTF8.cWX2MB(s) + #define wxGTK_CONV_BACK(s) wxConvUTF8.cMB2WX(s) +#else + #define wxGTK_CONV(s) s.c_str() + #define wxGTK_CONV_BACK(s) s +#endif + +// ---------------------------------------------------------------------------- +// we maintain a hash table which contains the mapping from Widget to wxWindow +// corresponding to the window for this widget +// ---------------------------------------------------------------------------- + +WX_DECLARE_HASH_MAP(Window, wxWindow *, wxIntegerHash, wxIntegerEqual, wxWindowHash); + +// these hashes are defined in app.cpp +extern wxWindowHash *wxWidgetHashTable; +extern wxWindowHash *wxClientWidgetHashTable; + +extern void wxDeleteWindowFromTable(Window w); +extern wxWindow *wxGetWindowFromTable(Window w); +extern bool wxAddWindowToTable(Window w, wxWindow *win); + +extern void wxDeleteClientWindowFromTable(Window w); +extern wxWindow *wxGetClientWindowFromTable(Window w); +extern bool wxAddClientWindowToTable(Window w, wxWindow *win); + +// ---------------------------------------------------------------------------- +// TranslateXXXEvent() functions - translate X event to wxWindow one +// ---------------------------------------------------------------------------- +extern bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, Window window, XEvent *xevent); +extern bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, Window window, XEvent *xevent, bool isAscii = FALSE); + +extern Window wxGetWindowParent(Window window); + +// Set the window manager decorations according to the +// given wxWidgets style +bool wxSetWMDecorations(Window w, long style); +bool wxMWMIsRunning(Window w); + +#endif +// _WX_PRIVATE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/private/wrapxkb.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/private/wrapxkb.h new file mode 100644 index 0000000000..d13100e7dc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/private/wrapxkb.h @@ -0,0 +1,24 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/private/wrapxkb.h +// Purpose: Private header wrapping X11/XKBlib.h inclusion. +// Author: Vadim Zeitlin +// Created: 2012-05-07 +// Copyright: (c) 2012 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _X11_PRIVATE_WRAPXKB_H_ +#define _X11_PRIVATE_WRAPXKB_H_ + +#ifdef HAVE_X11_XKBLIB_H + /* under HP-UX and Solaris 2.6, at least, XKBlib.h defines structures with + * field named "explicit" - which is, of course, an error for a C++ + * compiler. To be on the safe side, just redefine it everywhere. */ + #define explicit __wx_explicit + + #include <X11/XKBlib.h> + + #undef explicit +#endif // HAVE_X11_XKBLIB_H + +#endif // _X11_PRIVATE_WRAPXKB_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/privx.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/privx.h new file mode 100644 index 0000000000..c4de8021ea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/privx.h @@ -0,0 +1,169 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/privx.h +// Purpose: Private declarations common to X11 and Motif ports +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVX_H_ +#define _WX_PRIVX_H_ + +#include "wx/defs.h" +#include "wx/utils.h" +#include "wx/colour.h" + +#if defined( __cplusplus ) && defined( __VMS ) +#pragma message disable nosimpint +#endif +#include "X11/Xlib.h" +#include "X11/Xatom.h" +#include "X11/Xutil.h" +#if defined( __cplusplus ) && defined( __VMS ) +#pragma message enable nosimpint +#endif + +class WXDLLIMPEXP_FWD_CORE wxMouseEvent; +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxRegion; + +// ---------------------------------------------------------------------------- +// key events related functions +// ---------------------------------------------------------------------------- + +WXPixel wxGetBestMatchingPixel(Display *display, XColor *desiredColor, Colormap cmap); +Pixmap XCreateInsensitivePixmap( Display *display, Pixmap pixmap ); + +extern XColor g_itemColors[]; +extern int wxComputeColours (Display *display, const wxColour * back, const wxColour * fore); + +// For convenience +inline Display* wxGlobalDisplay() { return (Display*) wxGetDisplay(); } + +#define wxMAX_RGB 0xff +#define wxMAX_SV 1000 +#define wxSIGN(x) ((x < 0) ? -x : x) +#define wxH_WEIGHT 4 +#define wxS_WEIGHT 1 +#define wxV_WEIGHT 2 + +typedef struct wx_hsv { + int h,s,v; + } wxHSV; + +#define wxMax3(x,y,z) ((x > y) ? ((x > z) ? x : z) : ((y > z) ? y : z)) +#define wxMin3(x,y,z) ((x < y) ? ((x < z) ? x : z) : ((y < z) ? y : z)) + +void wxHSVToXColor(wxHSV *hsv,XColor *xcolor); +void wxXColorToHSV(wxHSV *hsv,XColor *xcolor); +void wxAllocNearestColor(Display *display,Colormap colormap,XColor *xcolor); +void wxAllocColor(Display *display,Colormap colormap,XColor *xcolor); + +// For debugging +wxString wxGetXEventName(XEvent& event); + +#if wxUSE_NANOX +#define XEventGetWindow(event) event->general.wid +#define XEventGetType(event) event->general.type +#define XConfigureEventGetX(event) ((int) event->update.x) +#define XConfigureEventGetY(event) ((int) event->update.y) +#define XConfigureEventGetWidth(event) ((int) event->update.width) +#define XConfigureEventGetHeight(event) ((int) event->update.height) +#define XExposeEventGetX(event) event->exposure.x +#define XExposeEventGetY(event) event->exposure.y +#define XExposeEventGetWidth(event) event->exposure.width +#define XExposeEventGetHeight(event) event->exposure.height +#define XButtonEventGetTime(event) (wxGetLocalTime()) +#define XButtonEventLChanged(event) (event->button.changebuttons & GR_BUTTON_L) +#define XButtonEventMChanged(event) (event->button.changebuttons & GR_BUTTON_M) +#define XButtonEventRChanged(event) (event->button.changebuttons & GR_BUTTON_R) +#define XButtonEventLIsDown(x) ((x)->button.buttons & GR_BUTTON_L) +#define XButtonEventMIsDown(x) ((x)->button.buttons & GR_BUTTON_M) +#define XButtonEventRIsDown(x) ((x)->button.buttons & GR_BUTTON_R) +#define XButtonEventShiftIsDown(x) (x->button.modifiers & MWKMOD_SHIFT) +#define XButtonEventCtrlIsDown(x) (x->button.modifiers & MWKMOD_CTRL) +#define XButtonEventAltIsDown(x) (x->button.modifiers & MWKMOD_ALT) +#define XButtonEventMetaIsDown(x) (x->button.modifiers & MWKMOD_META) +#define XButtonEventGetX(event) (event->button.x) +#define XButtonEventGetY(event) (event->button.y) +#define XKeyEventGetTime(event) (wxGetLocalTime()) +#define XKeyEventGetX(event) (event->keystroke.x) +#define XKeyEventGetY(event) (event->keystroke.y) +#define XKeyEventShiftIsDown(x) (x->keystroke.modifiers & MWKMOD_SHIFT) +#define XKeyEventCtrlIsDown(x) (x->keystroke.modifiers & MWKMOD_CTRL) +#define XKeyEventAltIsDown(x) (x->keystroke.modifiers & MWKMOD_ALT) +#define XKeyEventMetaIsDown(x) (x->keystroke.modifiers & MWKMOD_META) +#define XFontStructGetAscent(f) f->info.baseline + +#else + +#define XEventGetWindow(event) event->xany.window +#define XEventGetType(event) event->xany.type +#define XConfigureEventGetX(event) event->xconfigure.x +#define XConfigureEventGetY(event) event->xconfigure.y +#define XConfigureEventGetWidth(event) event->xconfigure.width +#define XConfigureEventGetHeight(event) event->xconfigure.height +#define XExposeEventGetX(event) event->xexpose.x +#define XExposeEventGetY(event) event->xexpose.y +#define XExposeEventGetWidth(event) event->xexpose.width +#define XExposeEventGetHeight(event) event->xexpose.height +#define XButtonEventGetTime(event) (event->xbutton.time) +#define XButtonEventLChanged(event) (event->xbutton.button == Button1) +#define XButtonEventMChanged(event) (event->xbutton.button == Button2) +#define XButtonEventRChanged(event) (event->xbutton.button == Button3) +#define XButtonEventLIsDown(x) ((x)->xbutton.state & Button1Mask) +#define XButtonEventMIsDown(x) ((x)->xbutton.state & Button2Mask) +#define XButtonEventRIsDown(x) ((x)->xbutton.state & Button3Mask) +#define XButtonEventShiftIsDown(x) (x->xbutton.state & ShiftMask) +#define XButtonEventCtrlIsDown(x) (x->xbutton.state & ControlMask) +#define XButtonEventAltIsDown(x) (x->xbutton.state & Mod3Mask) +#define XButtonEventMetaIsDown(x) (x->xbutton.state & Mod1Mask) +#define XButtonEventGetX(event) (event->xbutton.x) +#define XButtonEventGetY(event) (event->xbutton.y) +#define XKeyEventGetTime(event) (event->xkey.time) +#define XKeyEventShiftIsDown(x) (x->xkey.state & ShiftMask) +#define XKeyEventCtrlIsDown(x) (x->xkey.state & ControlMask) +#define XKeyEventAltIsDown(x) (x->xkey.state & Mod3Mask) +#define XKeyEventMetaIsDown(x) (x->xkey.state & Mod1Mask) +#define XKeyEventGetX(event) (event->xkey.x) +#define XKeyEventGetY(event) (event->xkey.y) +#define XFontStructGetAscent(f) f->ascent +#endif + +// ---------------------------------------------------------------------------- +// Misc functions +// ---------------------------------------------------------------------------- + +bool wxDoSetShape( Display* xdisplay, Window xwindow, const wxRegion& region ); + +class WXDLLIMPEXP_CORE wxXVisualInfo +{ +public: + wxXVisualInfo(); + ~wxXVisualInfo(); + void Init( Display* dpy, XVisualInfo* visualInfo ); + + int m_visualType; // TrueColor, DirectColor etc. + int m_visualDepth; + int m_visualColormapSize; + void *m_visualColormap; + int m_visualScreen; + unsigned long m_visualRedMask; + unsigned long m_visualGreenMask; + unsigned long m_visualBlueMask; + int m_visualRedShift; + int m_visualGreenShift; + int m_visualBlueShift; + int m_visualRedPrec; + int m_visualGreenPrec; + int m_visualBluePrec; + + unsigned char *m_colorCube; +}; + +bool wxFillXVisualInfo( wxXVisualInfo* vi, Display* dpy ); + +#endif // _WX_PRIVX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/region.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/region.h new file mode 100644 index 0000000000..f01b876b4b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/region.h @@ -0,0 +1,122 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/region.h +// Purpose: wxRegion class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart, Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_REGION_H_ +#define _WX_REGION_H_ + +#include "wx/list.h" + +// ---------------------------------------------------------------------------- +// wxRegion +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRegion : public wxRegionBase +{ +public: + wxRegion() { } + + wxRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h ) + { + InitRect(x, y, w, h); + } + + wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight ) + { + InitRect(topLeft.x, topLeft.y, + bottomRight.x - topLeft.x, bottomRight.y - topLeft.y); + } + + wxRegion( const wxRect& rect ) + { + InitRect(rect.x, rect.y, rect.width, rect.height); + } + + wxRegion( size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); + + wxRegion( const wxBitmap& bmp) + { + Union(bmp); + } + wxRegion( const wxBitmap& bmp, + const wxColour& transColour, int tolerance = 0) + { + Union(bmp, transColour, tolerance); + } + + virtual ~wxRegion(); + + // wxRegionBase methods + virtual void Clear(); + virtual bool IsEmpty() const; + +public: + WXRegion *GetX11Region() const; + +protected: + virtual wxGDIRefData *CreateGDIRefData() const; + virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; + + // wxRegionBase pure virtuals + virtual bool DoIsEqual(const wxRegion& region) const; + virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const; + virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const; + virtual wxRegionContain DoContainsRect(const wxRect& rect) const; + + virtual bool DoOffset(wxCoord x, wxCoord y); + virtual bool DoUnionWithRect(const wxRect& rect); + virtual bool DoUnionWithRegion(const wxRegion& region); + virtual bool DoIntersect(const wxRegion& region); + virtual bool DoSubtract(const wxRegion& region); + virtual bool DoXor(const wxRegion& region); + + // common part of ctors for a rectangle region + void InitRect(wxCoord x, wxCoord y, wxCoord w, wxCoord h); + +private: + DECLARE_DYNAMIC_CLASS(wxRegion) +}; + +// ---------------------------------------------------------------------------- +// wxRegionIterator: decomposes a region into rectangles +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxRegionIterator: public wxObject +{ +public: + wxRegionIterator(); + wxRegionIterator(const wxRegion& region); + + void Reset() { m_current = 0u; } + void Reset(const wxRegion& region); + + operator bool () const; + bool HaveRects() const; + + void operator ++ (); + void operator ++ (int); + + wxCoord GetX() const; + wxCoord GetY() const; + wxCoord GetW() const; + wxCoord GetWidth() const { return GetW(); } + wxCoord GetH() const; + wxCoord GetHeight() const { return GetH(); } + wxRect GetRect() const; + +private: + size_t m_current; + wxRegion m_region; + +private: + DECLARE_DYNAMIC_CLASS(wxRegionIterator) +}; + +#endif +// _WX_REGION_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/reparent.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/reparent.h new file mode 100644 index 0000000000..43a1b8d34b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/reparent.h @@ -0,0 +1,66 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/reparent.h +// Purpose: Reparenting classes +// Author: Julian Smart +// Modified by: +// Created: 2002-03-09 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_REPARENT_H_ +#define _WX_REPARENT_H_ + +#include "wx/window.h" + +/* + * This class helps to reparent a specific window + */ + +class WXDLLIMPEXP_FWD_CORE wxAdoptedWindow; +class WXDLLIMPEXP_CORE wxReparenter: public wxObject +{ +public: + wxReparenter() {} + + // We assume that toReparent has had its X window set + // appropriately. toReparent is typically a wxAdoptedWindow. + bool Reparent(wxWindow* newParent, wxAdoptedWindow* toReparent); + + // Wait for an appropriate window to be created. + // If exactMatch is FALSE, a substring match is OK. + // If windowName is empty, then wait for the next overrideRedirect window. + bool WaitAndReparent(wxWindow* newParent, wxAdoptedWindow* toReparent, + const wxString& windowName = wxEmptyString, + bool exactMatch = TRUE); + +protected: + + bool ProcessXEvent(WXEvent* event); + WXWindow FindAClientWindow(WXWindow window, const wxString& name); + + static bool sm_done; + static wxAdoptedWindow* sm_toReparent; + static wxWindow* sm_newParent; + static wxString sm_name; + static bool sm_exactMatch; +}; + +/* + * A window that adopts its handle from the native + * toolkit. It has no parent until reparented. + */ + +class WXDLLIMPEXP_CORE wxAdoptedWindow: public wxWindow +{ + public: + wxAdoptedWindow(); + wxAdoptedWindow(WXWindow window); + virtual ~wxAdoptedWindow(); + + void SetHandle(WXWindow window) { m_mainWindow = window; m_clientWindow = window; } + WXWindow GetHandle() const { return X11GetMainWindow(); } +}; + +#endif +// _WX_REPARENT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/textctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/textctrl.h new file mode 100644 index 0000000000..5ed6683076 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/textctrl.h @@ -0,0 +1,385 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/textctrl.h +// Purpose: +// Author: Robert Roebling +// Created: 01/02/97 +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __X11TEXTCTRLH__ +#define __X11TEXTCTRLH__ + +// Set to 1 to use wxUniv's implementation, 0 +// to use wxX11's. +#define wxUSE_UNIV_TEXTCTRL 1 + +#if wxUSE_UNIV_TEXTCTRL +#include "wx/univ/textctrl.h" +#else + +#include "wx/scrolwin.h" +#include "wx/arrstr.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; + +//----------------------------------------------------------------------------- +// helpers +//----------------------------------------------------------------------------- + +enum wxSourceUndo +{ + wxSOURCE_UNDO_LINE, + wxSOURCE_UNDO_ENTER, + wxSOURCE_UNDO_BACK, + wxSOURCE_UNDO_INSERT_LINE, + wxSOURCE_UNDO_DELETE, + wxSOURCE_UNDO_PASTE +}; + +class wxSourceUndoStep: public wxObject +{ +public: + wxSourceUndoStep( wxSourceUndo type, int y1, int y2, wxTextCtrl *owner ); + + void Undo(); + + wxSourceUndo m_type; + int m_y1; + int m_y2; + int m_cursorX; + int m_cursorY; + wxTextCtrl *m_owner; + wxString m_text; + wxArrayString m_lines; +}; + +class wxSourceLine +{ +public: + wxSourceLine( const wxString &text = wxEmptyString ) + { + m_text = text; + } + + wxString m_text; +}; + +WX_DECLARE_OBJARRAY(wxSourceLine, wxSourceLineArray); + +enum wxSourceLanguage +{ + wxSOURCE_LANG_NONE, + wxSOURCE_LANG_CPP, + wxSOURCE_LANG_PERL, + wxSOURCE_LANG_PYTHON +}; + +//----------------------------------------------------------------------------- +// wxTextCtrl +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextCtrl: public wxTextCtrlBase, public wxScrollHelper +{ +public: + wxTextCtrl() { Init(); } + wxTextCtrl(wxWindow *parent, + wxWindowID id, + const wxString &value = wxEmptyString, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxTextCtrlNameStr); + virtual ~wxTextCtrl(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString &value = wxEmptyString, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxTextCtrlNameStr); + + // required for scrolling with wxScrollHelper + // ------------------------------------------ + + virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); } + + // implement base class pure virtuals + // ---------------------------------- + + virtual void ChangeValue(const wxString &value); + + virtual int GetLineLength(long lineNo) const; + virtual wxString GetLineText(long lineNo) const; + virtual int GetNumberOfLines() const; + + virtual bool IsModified() const; + virtual bool IsEditable() const; + + // more readable flag testing methods + // ---------------------------------- + + bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; } + bool WrapLines() const { return false; } + + // If the return values from and to are the same, there is no selection. + virtual void GetSelection(long* from, long* to) const; + + // operations + // ---------- + + // editing + virtual void Clear(); + virtual void Replace(long from, long to, const wxString& value); + virtual void Remove(long from, long to); + + // clears the dirty flag + virtual void DiscardEdits(); + + virtual void SetMaxLength(unsigned long len); + + // writing text inserts it at the current position, appending always + // inserts it at the end + virtual void WriteText(const wxString& text); + virtual void AppendText(const wxString& text); + + // apply text attribute to the range of text (only works with richedit + // controls) + virtual bool SetStyle(long start, long end, const wxTextAttr& style); + + // translate between the position (which is just an index in the text ctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent column and line. + virtual long XYToPosition(long x, long y) const; + virtual bool PositionToXY(long pos, long *x, long *y) const; + + virtual void ShowPosition(long pos); + + // Clipboard operations + virtual void Copy(); + virtual void Cut(); + virtual void Paste(); + + // Undo/redo + virtual void Undo(); + virtual void Redo() {} + + virtual bool CanUndo() const { return (m_undos.GetCount() > 0); } + virtual bool CanRedo() const { return false; } + + // Insertion point + virtual void SetInsertionPoint(long pos); + virtual void SetInsertionPointEnd(); + virtual long GetInsertionPoint() const; + virtual wxTextPos GetLastPosition() const; + + virtual void SetSelection(long from, long to); + virtual void SetEditable(bool editable); + + virtual bool Enable( bool enable = true ); + + void OnCut(wxCommandEvent& event); + void OnCopy(wxCommandEvent& event); + void OnPaste(wxCommandEvent& event); + void OnUndo(wxCommandEvent& event); + void OnRedo(wxCommandEvent& event); + + void OnUpdateCut(wxUpdateUIEvent& event); + void OnUpdateCopy(wxUpdateUIEvent& event); + void OnUpdatePaste(wxUpdateUIEvent& event); + void OnUpdateUndo(wxUpdateUIEvent& event); + void OnUpdateRedo(wxUpdateUIEvent& event); + + bool SetFont(const wxFont& font); + bool SetForegroundColour(const wxColour& colour); + bool SetBackgroundColour(const wxColour& colour); + + void SetModified() { m_modified = true; } + + // textctrl specific scrolling + virtual bool ScrollLines(int lines); + virtual bool ScrollPages(int pages); + + // not part of the wxTextCtrl API from now on.. + + void SetLanguage( wxSourceLanguage lang = wxSOURCE_LANG_NONE ); + + void Delete(); + void DeleteLine(); + + void Indent(); + void Unindent(); + + bool HasSelection(); + void ClearSelection(); + + int GetCursorX() { return m_cursorX; } + int GetCursorY() { return m_cursorY; } + bool IsModified() { return m_modified; } + bool OverwriteMode() { return m_overwrite; } + + // implementation from now on... + + int PosToPixel( int line, int pos ); + int PixelToPos( int line, int pixel ); + + void SearchForBrackets(); + + void DoChar( char c ); + void DoBack(); + void DoDelete(); + void DoReturn(); + void DoDClick(); + + wxString GetNextToken( wxString &line, size_t &pos ); + + void DrawLinePart( wxDC &dc, int x, int y, const wxString &toDraw, const wxString &origin, const wxColour &colour); + void DrawLine( wxDC &dc, int x, int y, const wxString &line, int lineNum ); + void OnPaint( wxPaintEvent &event ); + void OnEraseBackground( wxEraseEvent &event ); + void OnMouse( wxMouseEvent &event ); + void OnChar( wxKeyEvent &event ); + void OnSetFocus( wxFocusEvent& event ); + void OnKillFocus( wxFocusEvent& event ); + + void OnInternalIdle(); + void RefreshLine( int n ); + void RefreshDown( int n ); + void MoveCursor( int new_x, int new_y, bool shift = false, bool centre = false ); + void MyAdjustScrollbars(); + +protected: + // common part of all ctors + void Init(); + + virtual wxSize DoGetBestSize() const; + + virtual void DoSetValue(const wxString& value, int flags = 0); + + friend class wxSourceUndoStep; + + wxSourceLineArray m_lines; + + wxFont m_sourceFont; + wxColour m_sourceColour; + wxColour m_commentColour; + wxColour m_stringColour; + + int m_cursorX; + int m_cursorY; + + int m_selStartX,m_selStartY; + int m_selEndX,m_selEndY; + + int m_lineHeight; + int m_charWidth; + + int m_longestLine; + + bool m_overwrite; + bool m_modified; + bool m_editable; + bool m_ignoreInput; + + wxArrayString m_keywords; + wxColour m_keywordColour; + + wxArrayString m_defines; + wxColour m_defineColour; + + wxArrayString m_variables; + wxColour m_variableColour; + + wxSourceLanguage m_lang; + + wxList m_undos; + + bool m_capturing; + + int m_bracketX; + int m_bracketY; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxTextCtrl); +}; + +//----------------------------------------------------------------------------- +// this is superfluous here but helps to compile +//----------------------------------------------------------------------------- + +// cursor movement and also selection and delete operations +#define wxACTION_TEXT_GOTO wxT("goto") // to pos in numArg +#define wxACTION_TEXT_FIRST wxT("first") // go to pos 0 +#define wxACTION_TEXT_LAST wxT("last") // go to last pos +#define wxACTION_TEXT_HOME wxT("home") +#define wxACTION_TEXT_END wxT("end") +#define wxACTION_TEXT_LEFT wxT("left") +#define wxACTION_TEXT_RIGHT wxT("right") +#define wxACTION_TEXT_UP wxT("up") +#define wxACTION_TEXT_DOWN wxT("down") +#define wxACTION_TEXT_WORD_LEFT wxT("wordleft") +#define wxACTION_TEXT_WORD_RIGHT wxT("wordright") +#define wxACTION_TEXT_PAGE_UP wxT("pageup") +#define wxACTION_TEXT_PAGE_DOWN wxT("pagedown") + +// clipboard operations +#define wxACTION_TEXT_COPY wxT("copy") +#define wxACTION_TEXT_CUT wxT("cut") +#define wxACTION_TEXT_PASTE wxT("paste") + +// insert text at the cursor position: the text is in strArg of PerformAction +#define wxACTION_TEXT_INSERT wxT("insert") + +// if the action starts with either of these prefixes and the rest of the +// string is one of the movement commands, it means to select/delete text from +// the current cursor position to the new one +#define wxACTION_TEXT_PREFIX_SEL wxT("sel") +#define wxACTION_TEXT_PREFIX_DEL wxT("del") + +// mouse selection +#define wxACTION_TEXT_ANCHOR_SEL wxT("anchorsel") +#define wxACTION_TEXT_EXTEND_SEL wxT("extendsel") +#define wxACTION_TEXT_SEL_WORD wxT("wordsel") +#define wxACTION_TEXT_SEL_LINE wxT("linesel") + +// undo or redo +#define wxACTION_TEXT_UNDO wxT("undo") +#define wxACTION_TEXT_REDO wxT("redo") + +// ---------------------------------------------------------------------------- +// wxTextCtrl types +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxStdTextCtrlInputHandler : public wxStdInputHandler +{ +public: + wxStdTextCtrlInputHandler(wxInputHandler *inphand) : wxStdInputHandler(inphand) {} + + virtual bool HandleKey(wxInputConsumer *consumer, + const wxKeyEvent& event, + bool pressed) { return false; } + virtual bool HandleMouse(wxInputConsumer *consumer, const wxMouseEvent& event) { return false; } + virtual bool HandleMouseMove(wxInputConsumer *consumer, const wxMouseEvent& event) { return false; } + virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event) { return false; } + +protected: + // get the position of the mouse click + static wxTextPos HitTest(const wxTextCtrl *text, const wxPoint& pos) { return 0; } + + // capture data + wxTextCtrl *m_winCapture; +}; + +#endif +// wxUSE_UNIV_TEXTCTRL + +#endif // __X11TEXTCTRLH__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/toplevel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/toplevel.h new file mode 100644 index 0000000000..0eec73778b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/toplevel.h @@ -0,0 +1,116 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/toplevel.h +// Purpose: wxTopLevelWindowX11 is the X11 implementation of wxTLW +// Author: Julian Smart +// Modified by: +// Created: 20.09.01 +// Copyright: (c) 2002 Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_X11_TOPLEVEL_H_ +#define _WX_X11_TOPLEVEL_H_ + +// ---------------------------------------------------------------------------- +// wxTopLevelWindowX11 +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTopLevelWindowX11 : public wxTopLevelWindowBase +{ +public: + // constructors and such + wxTopLevelWindowX11() { Init(); } + + wxTopLevelWindowX11(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr) + { + Init(); + + (void)Create(parent, id, title, pos, size, style, name); + } + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = wxFrameNameStr); + + virtual ~wxTopLevelWindowX11(); + + // implement base class pure virtuals + virtual void Maximize(bool maximize = true); + virtual bool IsMaximized() const; + virtual void Iconize(bool iconize = true); + virtual bool IsIconized() const; + virtual void SetIcons(const wxIconBundle& icons); + virtual void Restore(); + + virtual bool Show( bool show = true ); + + virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL ); + virtual bool IsFullScreen() const { return m_fsIsShowing; } + + virtual void SetTitle( const wxString& title); + virtual wxString GetTitle() const; + + // implementation + void SetNeedResizeInIdle( bool set = true ) + { m_needResizeInIdle = set; } + void SetConfigureGeometry( int x, int y, int width, int height ) + { m_x = x; m_y = y; m_width = width; m_height = height; } + + virtual bool SetShape(const wxRegion& region); + + // For implementation purposes - sometimes decorations make the + // client area smaller + virtual wxPoint GetClientAreaOrigin() const; + + virtual void OnInternalIdle(); + +protected: + // common part of all ctors + void Init(); + + // set the icon for the window + void DoSetIcon( const wxIcon& icon ); + + // For implementation of delayed resize events + bool m_needResizeInIdle; + + virtual void DoGetClientSize( int *width, int *height ) const; + virtual void DoGetSize( int *width, int *height ) const; + virtual void DoSetClientSize(int width, int height); + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoGetPosition( int *x, int *y ) const; + + // Is the frame currently iconized? + bool m_iconized; + + // Should the frame be maximized when it will be shown? set by Maximize() + // when it is called while the frame is hidden + bool m_maximizeOnShow; + + // Data to save/restore when calling ShowFullScreen + long m_fsStyle; // Passed to ShowFullScreen + wxRect m_fsOldSize; + bool m_fsIsMaximized; + bool m_fsIsShowing; + wxString m_title; + + // Geometry + int m_x,m_y,m_width,m_height; +}; + +// list of all frames and modeless dialogs +//extern WXDLLIMPEXP_DATA_CORE(wxWindowList) wxModelessWindows; + +#endif // _WX_X11_TOPLEVEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/window.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/window.h new file mode 100644 index 0000000000..b17c53eadf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/x11/window.h @@ -0,0 +1,217 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/window.h +// Purpose: wxWindow class +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WINDOW_H_ +#define _WX_WINDOW_H_ + +#include "wx/region.h" + +// ---------------------------------------------------------------------------- +// wxWindow class for Motif - see also wxWindowBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxWindowX11 : public wxWindowBase +{ + friend class WXDLLIMPEXP_FWD_CORE wxDC; + friend class WXDLLIMPEXP_FWD_CORE wxWindowDC; + +public: + wxWindowX11() { Init(); } + + wxWindowX11(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr) + { + Init(); + Create(parent, id, pos, size, style, name); + } + + virtual ~wxWindowX11(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxPanelNameStr); + + virtual void Raise(); + virtual void Lower(); + + virtual void SetLabel(const wxString& label); + virtual wxString GetLabel() const; + + virtual bool Show( bool show = true ); + virtual bool Enable( bool enable = true ); + + virtual void SetFocus(); + + virtual void WarpPointer(int x, int y); + + virtual void Refresh( bool eraseBackground = true, + const wxRect *rect = (const wxRect *) NULL ); + virtual void Update(); + + virtual bool SetBackgroundColour( const wxColour &colour ); + virtual bool SetForegroundColour( const wxColour &colour ); + + virtual bool SetCursor( const wxCursor &cursor ); + virtual bool SetFont( const wxFont &font ); + + virtual int GetCharHeight() const; + virtual int GetCharWidth() const; + + virtual void ScrollWindow( int dx, int dy, const wxRect* rect = NULL ); + +#if wxUSE_DRAG_AND_DROP + virtual void SetDropTarget( wxDropTarget *dropTarget ); +#endif // wxUSE_DRAG_AND_DROP + + // Accept files for dragging + virtual void DragAcceptFiles(bool accept); + + // Get the unique identifier of a window + virtual WXWindow GetHandle() const { return X11GetMainWindow(); } + + // implementation from now on + // -------------------------- + + // accessors + // --------- + + // Get main X11 window + virtual WXWindow X11GetMainWindow() const; + + // Get X11 window representing the client area + virtual WXWindow GetClientAreaWindow() const; + + void SetLastClick(int button, long timestamp) + { m_lastButton = button; m_lastTS = timestamp; } + + int GetLastClickedButton() const { return m_lastButton; } + long GetLastClickTime() const { return m_lastTS; } + + // Gives window a chance to do something in response to a size message, e.g. + // arrange status bar, toolbar etc. + virtual bool PreResize(); + + // Generates paint events from m_updateRegion + void SendPaintEvents(); + + // Generates paint events from flag + void SendNcPaintEvents(); + + // Generates erase events from m_clearRegion + void SendEraseEvents(); + + // Clip to paint region? + bool GetClipPaintRegion() { return m_clipPaintRegion; } + + // Return clear region + wxRegion &GetClearRegion() { return m_clearRegion; } + + void NeedUpdateNcAreaInIdle( bool update = true ) { m_updateNcArea = update; } + + // Inserting into main window instead of client + // window. This is mostly for a wxWindow's own + // scrollbars. + void SetInsertIntoMain( bool insert = true ) { m_insertIntoMain = insert; } + bool GetInsertIntoMain() { return m_insertIntoMain; } + + // sets the fore/background colour for the given widget + static void DoChangeForegroundColour(WXWindow widget, wxColour& foregroundColour); + static void DoChangeBackgroundColour(WXWindow widget, wxColour& backgroundColour, bool changeArmColour = false); + + // I don't want users to override what's done in idle so everything that + // has to be done in idle time in order for wxX11 to work is done in + // OnInternalIdle + virtual void OnInternalIdle(); + +protected: + // Responds to colour changes: passes event on to children. + void OnSysColourChanged(wxSysColourChangedEvent& event); + + // For double-click detection + long m_lastTS; // last timestamp + int m_lastButton; // last pressed button + +protected: + WXWindow m_mainWindow; + WXWindow m_clientWindow; + bool m_insertIntoMain; + + bool m_winCaptured; + wxRegion m_clearRegion; + bool m_clipPaintRegion; + bool m_updateNcArea; + bool m_needsInputFocus; // Input focus set in OnIdle + + // implement the base class pure virtuals + virtual void DoGetTextExtent(const wxString& string, + int *x, int *y, + int *descent = NULL, + int *externalLeading = NULL, + const wxFont *font = NULL) const; + virtual void DoClientToScreen( int *x, int *y ) const; + virtual void DoScreenToClient( int *x, int *y ) const; + virtual void DoGetPosition( int *x, int *y ) const; + virtual void DoGetSize( int *width, int *height ) const; + virtual void DoGetClientSize( int *width, int *height ) const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoSetClientSize(int width, int height); + virtual void DoMoveWindow(int x, int y, int width, int height); + virtual void DoSetSizeHints(int minW, int minH, + int maxW, int maxH, + int incW, int incH); + virtual void DoCaptureMouse(); + virtual void DoReleaseMouse(); + +#if wxUSE_TOOLTIPS + virtual void DoSetToolTip( wxToolTip *tip ); +#endif // wxUSE_TOOLTIPS + +private: + // common part of all ctors + void Init(); + + DECLARE_DYNAMIC_CLASS(wxWindowX11) + wxDECLARE_NO_COPY_CLASS(wxWindowX11); + DECLARE_EVENT_TABLE() +}; + +// ---------------------------------------------------------------------------- +// A little class to switch off `size optimization' while an instance of the +// object exists: this may be useful to temporarily disable the optimisation +// which consists to do nothing when the new size is equal to the old size - +// although quite useful usually to avoid flicker, sometimes it leads to +// undesired effects. +// +// Usage: create an instance of this class on the stack to disable the size +// optimisation, it will be reenabled as soon as the object goes out from scope. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxNoOptimize +{ +public: + wxNoOptimize() { ms_count++; } + ~wxNoOptimize() { ms_count--; } + + static bool CanOptimize() { return ms_count == 0; } + +protected: + static int ms_count; +}; + +#endif // _WX_WINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xlocale.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xlocale.h new file mode 100644 index 0000000000..6a01ad311a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xlocale.h @@ -0,0 +1,340 @@ +////////////////////////////////////////////////////////////////////////////// +// Name: wx/xlocale.h +// Purpose: Header to provide some xlocale wrappers +// Author: Brian Vanderburg II, Vadim Zeitlin +// Created: 2008-01-07 +// Copyright: (c) 2008 Brian Vanderburg II +// 2008 Vadim Zeitlin <vadim@wxwidgets.org> +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +/* + This header defines portable wrappers around xlocale foo_l() functions or + their MSVC proprietary _foo_l() equivalents when they are available and + implements these functions for the "C" locale [only] if they are not. This + allows the program running under the default user locale to still use "C" + locale for operations such as reading data from files where they are stored + using decimal point &c. + + TODO: Currently only the character classification and transformation + functions and number <-> string functions, are implemented, + we also need at least + - formatted IO: scanf_l(), printf_l() &c + - time: strftime_l(), strptime_l() + */ + +#ifndef _WX_XLOCALE_H_ +#define _WX_XLOCALE_H_ + +#include "wx/defs.h" // wxUSE_XLOCALE + +#if wxUSE_XLOCALE + +#include "wx/crt.h" // Includes wx/chartype.h, wx/wxcrt.h(wx/string.h) +#include "wx/intl.h" // wxLanguage + +// The platform-specific locale type +// If wxXLocale_t is not defined, then only "C" locale support is provided +#ifdef wxHAS_XLOCALE_SUPPORT + #if wxCHECK_VISUALC_VERSION(8) && !defined(__WXWINCE__) + typedef _locale_t wxXLocale_t; + #define wxXLOCALE_IDENT(name) _ ## name + #elif defined(HAVE_LOCALE_T) + #include <locale.h> + #include <xlocale.h> + #include <ctype.h> + #include <stdlib.h> + + #if wxUSE_UNICODE + #include <wctype.h> + #endif + + // Locale type and identifier name + typedef locale_t wxXLocale_t; + + #define wxXLOCALE_IDENT(name) name + #else + #error "Unknown xlocale support" + #endif +#endif // wxHAS_XLOCALE_SUPPORT + + +// wxXLocale is a wrapper around the native type representing a locale. +// +// It is not to be confused with wxLocale, which handles actually changing the +// locale, loading message catalogs, etc. This just stores a locale value. +// The similarity of names is unfortunate, but there doesn't seem to be any +// better alternative right now. Perhaps by wxWidgets 4.0 better naming could +// be used, or this class could become wxLocale (a wrapper for the value), and +// some other class could be used to load the language catalogs or something +// that would be clearer +#ifdef wxHAS_XLOCALE_SUPPORT + +class WXDLLIMPEXP_BASE wxXLocale +{ +public: + // Construct an uninitialized locale + wxXLocale() { m_locale = NULL; } + + // Construct from a symbolic language constant + wxXLocale(wxLanguage lang); + + // Construct from the given language string + wxXLocale(const char *loc) { Init(loc); } + + // Destroy the locale + ~wxXLocale() { Free(); } + + + // Get the global "C" locale object + static wxXLocale& GetCLocale(); + + // Check if the object represents a valid locale (notice that without + // wxHAS_XLOCALE_SUPPORT the only valid locale is the "C" one) + bool IsOk() const { return m_locale != NULL; } + + // Get the type + wxXLocale_t Get() const { return m_locale; } + + bool operator== (const wxXLocale& loc) const + { return m_locale == loc.m_locale; } + +private: + // Special ctor for the "C" locale, it's only used internally as the user + // code is supposed to use GetCLocale() + wxXLocale(struct wxXLocaleCTag * WXUNUSED(dummy)) { Init("C"); } + + // Create from the given language string (called from ctors) + void Init(const char *loc); + + // Free the locale if it's non-NULL + void Free(); + + + // The corresponding locale handle, NULL if invalid + wxXLocale_t m_locale; + + + // POSIX xlocale API provides a duplocale() function but MSVC locale API + // doesn't give us any means to copy a _locale_t object so we reduce the + // functionality to least common denominator here -- it shouldn't be a + // problem as copying the locale objects shouldn't be often needed + wxDECLARE_NO_COPY_CLASS(wxXLocale); +}; + +#else // !wxHAS_XLOCALE_SUPPORT + +// Skeleton version supporting only the "C" locale for the systems without +// xlocale support +class WXDLLIMPEXP_BASE wxXLocale +{ +public: + // Construct an uninitialized locale + wxXLocale() { m_isC = false; } + + // Construct from a symbolic language constant: unless the language is + // wxLANGUAGE_ENGLISH_US (which we suppose to be the same as "C" locale) + // the object will be invalid + wxXLocale(wxLanguage lang) + { + m_isC = lang == wxLANGUAGE_ENGLISH_US; + } + + // Construct from the given language string: unless the string is "C" or + // "POSIX" the object will be invalid + wxXLocale(const char *loc) + { + m_isC = loc && (strcmp(loc, "C") == 0 || strcmp(loc, "POSIX") == 0); + } + + // Default copy ctor, assignment operator and dtor are ok (or would be if + // we didn't use DECLARE_NO_COPY_CLASS() for consistency with the xlocale + // version) + + + // Get the global "C" locale object + static wxXLocale& GetCLocale(); + + // Check if the object represents a valid locale (notice that without + // wxHAS_XLOCALE_SUPPORT the only valid locale is the "C" one) + bool IsOk() const { return m_isC; } + +private: + // Special ctor for the "C" locale, it's only used internally as the user + // code is supposed to use GetCLocale() + wxXLocale(struct wxXLocaleCTag * WXUNUSED(dummy)) { m_isC = true; } + + // Without xlocale support this class can only represent "C" locale, if + // this is false the object is invalid + bool m_isC; + + + // although it's not a problem to copy the objects of this class, we use + // this macro in this implementation for consistency with the xlocale-based + // one which can't be copied when using MSVC locale API + wxDECLARE_NO_COPY_CLASS(wxXLocale); +}; + +#endif // wxHAS_XLOCALE_SUPPORT/!wxHAS_XLOCALE_SUPPORT + + +// A shorter synonym for the most commonly used locale object +#define wxCLocale (wxXLocale::GetCLocale()) +extern WXDLLIMPEXP_DATA_BASE(wxXLocale) wxNullXLocale; + +// Wrappers for various functions: +#ifdef wxHAS_XLOCALE_SUPPORT + + // ctype functions + #define wxCRT_Isalnum_lA wxXLOCALE_IDENT(isalnum_l) + #define wxCRT_Isalpha_lA wxXLOCALE_IDENT(isalpha_l) + #define wxCRT_Iscntrl_lA wxXLOCALE_IDENT(iscntrl_l) + #define wxCRT_Isdigit_lA wxXLOCALE_IDENT(isdigit_l) + #define wxCRT_Isgraph_lA wxXLOCALE_IDENT(isgraph_l) + #define wxCRT_Islower_lA wxXLOCALE_IDENT(islower_l) + #define wxCRT_Isprint_lA wxXLOCALE_IDENT(isprint_l) + #define wxCRT_Ispunct_lA wxXLOCALE_IDENT(ispunct_l) + #define wxCRT_Isspace_lA wxXLOCALE_IDENT(isspace_l) + #define wxCRT_Isupper_lA wxXLOCALE_IDENT(isupper_l) + #define wxCRT_Isxdigit_lA wxXLOCALE_IDENT(isxdigit_l) + #define wxCRT_Tolower_lA wxXLOCALE_IDENT(tolower_l) + #define wxCRT_Toupper_lA wxXLOCALE_IDENT(toupper_l) + + inline int wxIsalnum_l(char c, const wxXLocale& loc) + { return wxCRT_Isalnum_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxIsalpha_l(char c, const wxXLocale& loc) + { return wxCRT_Isalpha_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxIscntrl_l(char c, const wxXLocale& loc) + { return wxCRT_Iscntrl_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxIsdigit_l(char c, const wxXLocale& loc) + { return wxCRT_Isdigit_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxIsgraph_l(char c, const wxXLocale& loc) + { return wxCRT_Isgraph_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxIslower_l(char c, const wxXLocale& loc) + { return wxCRT_Islower_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxIsprint_l(char c, const wxXLocale& loc) + { return wxCRT_Isprint_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxIspunct_l(char c, const wxXLocale& loc) + { return wxCRT_Ispunct_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxIsspace_l(char c, const wxXLocale& loc) + { return wxCRT_Isspace_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxIsupper_l(char c, const wxXLocale& loc) + { return wxCRT_Isupper_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxIsxdigit_l(char c, const wxXLocale& loc) + { return wxCRT_Isxdigit_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxTolower_l(char c, const wxXLocale& loc) + { return wxCRT_Tolower_lA(static_cast<unsigned char>(c), loc.Get()); } + inline int wxToupper_l(char c, const wxXLocale& loc) + { return wxCRT_Toupper_lA(static_cast<unsigned char>(c), loc.Get()); } + + + // stdlib functions for numeric <-> string conversion + // NOTE: GNU libc does not have ato[fil]_l functions; + // MSVC++8 does not have _strto[u]ll_l functions; + // thus we take the minimal set of functions provided in both environments: + + #define wxCRT_Strtod_lA wxXLOCALE_IDENT(strtod_l) + #define wxCRT_Strtol_lA wxXLOCALE_IDENT(strtol_l) + #define wxCRT_Strtoul_lA wxXLOCALE_IDENT(strtoul_l) + + inline double wxStrtod_lA(const char *c, char **endptr, const wxXLocale& loc) + { return wxCRT_Strtod_lA(c, endptr, loc.Get()); } + inline long wxStrtol_lA(const char *c, char **endptr, int base, const wxXLocale& loc) + { return wxCRT_Strtol_lA(c, endptr, base, loc.Get()); } + inline unsigned long wxStrtoul_lA(const char *c, char **endptr, int base, const wxXLocale& loc) + { return wxCRT_Strtoul_lA(c, endptr, base, loc.Get()); } + + #if wxUSE_UNICODE + + // ctype functions + #define wxCRT_Isalnum_lW wxXLOCALE_IDENT(iswalnum_l) + #define wxCRT_Isalpha_lW wxXLOCALE_IDENT(iswalpha_l) + #define wxCRT_Iscntrl_lW wxXLOCALE_IDENT(iswcntrl_l) + #define wxCRT_Isdigit_lW wxXLOCALE_IDENT(iswdigit_l) + #define wxCRT_Isgraph_lW wxXLOCALE_IDENT(iswgraph_l) + #define wxCRT_Islower_lW wxXLOCALE_IDENT(iswlower_l) + #define wxCRT_Isprint_lW wxXLOCALE_IDENT(iswprint_l) + #define wxCRT_Ispunct_lW wxXLOCALE_IDENT(iswpunct_l) + #define wxCRT_Isspace_lW wxXLOCALE_IDENT(iswspace_l) + #define wxCRT_Isupper_lW wxXLOCALE_IDENT(iswupper_l) + #define wxCRT_Isxdigit_lW wxXLOCALE_IDENT(iswxdigit_l) + #define wxCRT_Tolower_lW wxXLOCALE_IDENT(towlower_l) + #define wxCRT_Toupper_lW wxXLOCALE_IDENT(towupper_l) + + inline int wxIsalnum_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Isalnum_lW(c, loc.Get()); } + inline int wxIsalpha_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Isalpha_lW(c, loc.Get()); } + inline int wxIscntrl_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Iscntrl_lW(c, loc.Get()); } + inline int wxIsdigit_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Isdigit_lW(c, loc.Get()); } + inline int wxIsgraph_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Isgraph_lW(c, loc.Get()); } + inline int wxIslower_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Islower_lW(c, loc.Get()); } + inline int wxIsprint_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Isprint_lW(c, loc.Get()); } + inline int wxIspunct_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Ispunct_lW(c, loc.Get()); } + inline int wxIsspace_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Isspace_lW(c, loc.Get()); } + inline int wxIsupper_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Isupper_lW(c, loc.Get()); } + inline int wxIsxdigit_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Isxdigit_lW(c, loc.Get()); } + inline wchar_t wxTolower_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Tolower_lW(c, loc.Get()); } + inline wchar_t wxToupper_l(wchar_t c, const wxXLocale& loc) + { return wxCRT_Toupper_lW(c, loc.Get()); } + + + // stdlib functions for numeric <-> string conversion + // (see notes above about missing functions) + #define wxCRT_Strtod_lW wxXLOCALE_IDENT(wcstod_l) + #define wxCRT_Strtol_lW wxXLOCALE_IDENT(wcstol_l) + #define wxCRT_Strtoul_lW wxXLOCALE_IDENT(wcstoul_l) + + inline double wxStrtod_l(const wchar_t *c, wchar_t **endptr, const wxXLocale& loc) + { return wxCRT_Strtod_lW(c, endptr, loc.Get()); } + inline long wxStrtol_l(const wchar_t *c, wchar_t **endptr, int base, const wxXLocale& loc) + { return wxCRT_Strtol_lW(c, endptr, base, loc.Get()); } + inline unsigned long wxStrtoul_l(const wchar_t *c, wchar_t **endptr, int base, const wxXLocale& loc) + { return wxCRT_Strtoul_lW(c, endptr, base, loc.Get()); } + #else // !wxUSE_UNICODE + inline double wxStrtod_l(const char *c, char **endptr, const wxXLocale& loc) + { return wxCRT_Strtod_lA(c, endptr, loc.Get()); } + inline long wxStrtol_l(const char *c, char **endptr, int base, const wxXLocale& loc) + { return wxCRT_Strtol_lA(c, endptr, base, loc.Get()); } + inline unsigned long wxStrtoul_l(const char *c, char **endptr, int base, const wxXLocale& loc) + { return wxCRT_Strtoul_lA(c, endptr, base, loc.Get()); } + #endif // wxUSE_UNICODE +#else // !wxHAS_XLOCALE_SUPPORT + // ctype functions + int WXDLLIMPEXP_BASE wxIsalnum_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxIsalpha_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxIscntrl_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxIsdigit_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxIsgraph_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxIslower_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxIsprint_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxIspunct_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxIsspace_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxIsupper_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxIsxdigit_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxTolower_l(const wxUniChar& c, const wxXLocale& loc); + int WXDLLIMPEXP_BASE wxToupper_l(const wxUniChar& c, const wxXLocale& loc); + + // stdlib functions + double WXDLLIMPEXP_BASE wxStrtod_l(const wchar_t* str, wchar_t **endptr, const wxXLocale& loc); + double WXDLLIMPEXP_BASE wxStrtod_l(const char* str, char **endptr, const wxXLocale& loc); + long WXDLLIMPEXP_BASE wxStrtol_l(const wchar_t* str, wchar_t **endptr, int base, const wxXLocale& loc); + long WXDLLIMPEXP_BASE wxStrtol_l(const char* str, char **endptr, int base, const wxXLocale& loc); + unsigned long WXDLLIMPEXP_BASE wxStrtoul_l(const wchar_t* str, wchar_t **endptr, int base, const wxXLocale& loc); + unsigned long WXDLLIMPEXP_BASE wxStrtoul_l(const char* str, char **endptr, int base, const wxXLocale& loc); + +#endif // wxHAS_XLOCALE_SUPPORT/!wxHAS_XLOCALE_SUPPORT + +#endif // wxUSE_XLOCALE + +#endif // _WX_XLOCALE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xml/xml.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xml/xml.h new file mode 100644 index 0000000000..6187e12c35 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xml/xml.h @@ -0,0 +1,325 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xml/xml.h +// Purpose: wxXmlDocument - XML parser & data holder class +// Author: Vaclav Slavik +// Created: 2000/03/05 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +#ifndef _WX_XML_H_ +#define _WX_XML_H_ + +#include "wx/defs.h" + +#if wxUSE_XML + +#include "wx/string.h" +#include "wx/object.h" +#include "wx/list.h" +#include "wx/versioninfo.h" + +#ifdef WXMAKINGDLL_XML + #define WXDLLIMPEXP_XML WXEXPORT +#elif defined(WXUSINGDLL) + #define WXDLLIMPEXP_XML WXIMPORT +#else // not making nor using DLL + #define WXDLLIMPEXP_XML +#endif + +class WXDLLIMPEXP_FWD_XML wxXmlNode; +class WXDLLIMPEXP_FWD_XML wxXmlAttribute; +class WXDLLIMPEXP_FWD_XML wxXmlDocument; +class WXDLLIMPEXP_FWD_XML wxXmlIOHandler; +class WXDLLIMPEXP_FWD_BASE wxInputStream; +class WXDLLIMPEXP_FWD_BASE wxOutputStream; + +// Represents XML node type. +enum wxXmlNodeType +{ + // note: values are synchronized with xmlElementType from libxml + wxXML_ELEMENT_NODE = 1, + wxXML_ATTRIBUTE_NODE = 2, + wxXML_TEXT_NODE = 3, + wxXML_CDATA_SECTION_NODE = 4, + wxXML_ENTITY_REF_NODE = 5, + wxXML_ENTITY_NODE = 6, + wxXML_PI_NODE = 7, + wxXML_COMMENT_NODE = 8, + wxXML_DOCUMENT_NODE = 9, + wxXML_DOCUMENT_TYPE_NODE = 10, + wxXML_DOCUMENT_FRAG_NODE = 11, + wxXML_NOTATION_NODE = 12, + wxXML_HTML_DOCUMENT_NODE = 13 +}; + + +// Represents node property(ies). +// Example: in <img src="hello.gif" id="3"/> "src" is property with value +// "hello.gif" and "id" is prop. with value "3". + +class WXDLLIMPEXP_XML wxXmlAttribute +{ +public: + wxXmlAttribute() : m_next(NULL) {} + wxXmlAttribute(const wxString& name, const wxString& value, + wxXmlAttribute *next = NULL) + : m_name(name), m_value(value), m_next(next) {} + virtual ~wxXmlAttribute() {} + + const wxString& GetName() const { return m_name; } + const wxString& GetValue() const { return m_value; } + wxXmlAttribute *GetNext() const { return m_next; } + + void SetName(const wxString& name) { m_name = name; } + void SetValue(const wxString& value) { m_value = value; } + void SetNext(wxXmlAttribute *next) { m_next = next; } + +private: + wxString m_name; + wxString m_value; + wxXmlAttribute *m_next; +}; + +#if WXWIN_COMPATIBILITY_2_8 + // NB: #define is used instead of typedef so that forward declarations + // continue to work + #define wxXmlProperty wxXmlAttribute +#endif + + +// Represents node in XML document. Node has name and may have content and +// attributes. Most common node types are wxXML_TEXT_NODE (name and attributes +// are irrelevant) and wxXML_ELEMENT_NODE (e.g. in <title>hi there is +// element with name="title", irrelevant content and one child (wxXML_TEXT_NODE +// with content="hi"). +// +// If wxUSE_UNICODE is 0, all strings are encoded in the encoding given to Load +// (default is UTF-8). + +class WXDLLIMPEXP_XML wxXmlNode +{ +public: + wxXmlNode() + : m_attrs(NULL), m_parent(NULL), m_children(NULL), m_next(NULL), + m_lineNo(-1), m_noConversion(false) + { + } + + wxXmlNode(wxXmlNode *parent, wxXmlNodeType type, + const wxString& name, const wxString& content = wxEmptyString, + wxXmlAttribute *attrs = NULL, wxXmlNode *next = NULL, + int lineNo = -1); + + virtual ~wxXmlNode(); + + // copy ctor & operator=. Note that this does NOT copy siblings + // and parent pointer, i.e. m_parent and m_next will be NULL + // after using copy ctor and are never unmodified by operator=. + // On the other hand, it DOES copy children and attributes. + wxXmlNode(const wxXmlNode& node); + wxXmlNode& operator=(const wxXmlNode& node); + + // user-friendly creation: + wxXmlNode(wxXmlNodeType type, const wxString& name, + const wxString& content = wxEmptyString, + int lineNo = -1); + virtual void AddChild(wxXmlNode *child); + virtual bool InsertChild(wxXmlNode *child, wxXmlNode *followingNode); + virtual bool InsertChildAfter(wxXmlNode *child, wxXmlNode *precedingNode); + virtual bool RemoveChild(wxXmlNode *child); + virtual void AddAttribute(const wxString& name, const wxString& value); + virtual bool DeleteAttribute(const wxString& name); + + // access methods: + wxXmlNodeType GetType() const { return m_type; } + const wxString& GetName() const { return m_name; } + const wxString& GetContent() const { return m_content; } + + bool IsWhitespaceOnly() const; + int GetDepth(wxXmlNode *grandparent = NULL) const; + + // Gets node content from wxXML_ENTITY_NODE + // The problem is, content is represented as + // wxXML_ENTITY_NODE name="tag", content="" + // |-- wxXML_TEXT_NODE or + // wxXML_CDATA_SECTION_NODE name="" content="content" + wxString GetNodeContent() const; + + wxXmlNode *GetParent() const { return m_parent; } + wxXmlNode *GetNext() const { return m_next; } + wxXmlNode *GetChildren() const { return m_children; } + + wxXmlAttribute *GetAttributes() const { return m_attrs; } + bool GetAttribute(const wxString& attrName, wxString *value) const; + wxString GetAttribute(const wxString& attrName, + const wxString& defaultVal = wxEmptyString) const; + bool HasAttribute(const wxString& attrName) const; + + int GetLineNumber() const { return m_lineNo; } + + void SetType(wxXmlNodeType type) { m_type = type; } + void SetName(const wxString& name) { m_name = name; } + void SetContent(const wxString& con) { m_content = con; } + + void SetParent(wxXmlNode *parent) { m_parent = parent; } + void SetNext(wxXmlNode *next) { m_next = next; } + void SetChildren(wxXmlNode *child) { m_children = child; } + + void SetAttributes(wxXmlAttribute *attr) { m_attrs = attr; } + virtual void AddAttribute(wxXmlAttribute *attr); + + // If true, don't do encoding conversion to improve efficiency - node content is ACII text + bool GetNoConversion() const { return m_noConversion; } + void SetNoConversion(bool noconversion) { m_noConversion = noconversion; } + +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED( inline wxXmlAttribute *GetProperties() const ); + wxDEPRECATED( inline bool GetPropVal(const wxString& propName, + wxString *value) const ); + wxDEPRECATED( inline wxString GetPropVal(const wxString& propName, + const wxString& defaultVal) const ); + wxDEPRECATED( inline bool HasProp(const wxString& propName) const ); + + wxDEPRECATED( inline void SetProperties(wxXmlAttribute *prop) ); +#endif // WXWIN_COMPATIBILITY_2_8 + + // The following three functions are backward compatibility, but because + // they were virtual, we must make it possible to override them. This + // is done by calling e.g. AddProperty() from AddAttribute(), so we have + // to keep AddProperty() even if 2.8 compatibility is off. To prevent + // old code from compiling in that case, we make them private and + // non-virtual. (This can be removed when WXWIN_COMPATIBILITY_2_8 is + // removed, we'll have just *Attribute versions then.) +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_BUT_USED_INTERNALLY( + virtual void AddProperty(const wxString& name, const wxString& value) ); + wxDEPRECATED_BUT_USED_INTERNALLY( + virtual bool DeleteProperty(const wxString& name) ); + wxDEPRECATED_BUT_USED_INTERNALLY( + virtual void AddProperty(wxXmlAttribute *attr) ); +#else +private: + void AddProperty(const wxString& name, const wxString& value); + bool DeleteProperty(const wxString& name); + void AddProperty(wxXmlAttribute *attr); +#endif // WXWIN_COMPATIBILITY_2_8/!WXWIN_COMPATIBILITY_2_8 + +private: + wxXmlNodeType m_type; + wxString m_name; + wxString m_content; + wxXmlAttribute *m_attrs; + wxXmlNode *m_parent, *m_children, *m_next; + int m_lineNo; // line number in original file, or -1 + bool m_noConversion; // don't do encoding conversion - node is plain text + + void DoFree(); + void DoCopy(const wxXmlNode& node); +}; + +#if WXWIN_COMPATIBILITY_2_8 +inline wxXmlAttribute *wxXmlNode::GetProperties() const + { return GetAttributes(); } +inline bool wxXmlNode::GetPropVal(const wxString& propName, + wxString *value) const + { return GetAttribute(propName, value); } +inline wxString wxXmlNode::GetPropVal(const wxString& propName, + const wxString& defaultVal) const + { return GetAttribute(propName, defaultVal); } +inline bool wxXmlNode::HasProp(const wxString& propName) const + { return HasAttribute(propName); } +inline void wxXmlNode::SetProperties(wxXmlAttribute *prop) + { SetAttributes(prop); } +#endif // WXWIN_COMPATIBILITY_2_8 + + + +// special indentation value for wxXmlDocument::Save +#define wxXML_NO_INDENTATION (-1) + +// flags for wxXmlDocument::Load +enum wxXmlDocumentLoadFlag +{ + wxXMLDOC_NONE = 0, + wxXMLDOC_KEEP_WHITESPACE_NODES = 1 +}; + + +// This class holds XML data/document as parsed by XML parser. + +class WXDLLIMPEXP_XML wxXmlDocument : public wxObject +{ +public: + wxXmlDocument(); + wxXmlDocument(const wxString& filename, + const wxString& encoding = wxT("UTF-8")); + wxXmlDocument(wxInputStream& stream, + const wxString& encoding = wxT("UTF-8")); + virtual ~wxXmlDocument() { wxDELETE(m_docNode); } + + wxXmlDocument(const wxXmlDocument& doc); + wxXmlDocument& operator=(const wxXmlDocument& doc); + + // Parses .xml file and loads data. Returns TRUE on success, FALSE + // otherwise. + virtual bool Load(const wxString& filename, + const wxString& encoding = wxT("UTF-8"), int flags = wxXMLDOC_NONE); + virtual bool Load(wxInputStream& stream, + const wxString& encoding = wxT("UTF-8"), int flags = wxXMLDOC_NONE); + + // Saves document as .xml file. + virtual bool Save(const wxString& filename, int indentstep = 2) const; + virtual bool Save(wxOutputStream& stream, int indentstep = 2) const; + + bool IsOk() const { return GetRoot() != NULL; } + + // Returns root node of the document. + wxXmlNode *GetRoot() const; + // Returns the document node. + wxXmlNode *GetDocumentNode() const { return m_docNode; } + + + // Returns version of document (may be empty). + const wxString& GetVersion() const { return m_version; } + // Returns encoding of document (may be empty). + // Note: this is the encoding original file was saved in, *not* the + // encoding of in-memory representation! + const wxString& GetFileEncoding() const { return m_fileEncoding; } + + // Write-access methods: + wxXmlNode *DetachDocumentNode() { wxXmlNode *old=m_docNode; m_docNode=NULL; return old; } + void SetDocumentNode(wxXmlNode *node) { wxDELETE(m_docNode); m_docNode = node; } + wxXmlNode *DetachRoot(); + void SetRoot(wxXmlNode *node); + void SetVersion(const wxString& version) { m_version = version; } + void SetFileEncoding(const wxString& encoding) { m_fileEncoding = encoding; } + void AppendToProlog(wxXmlNode *node); + +#if !wxUSE_UNICODE + // Returns encoding of in-memory representation of the document + // (same as passed to Load or ctor, defaults to UTF-8). + // NB: this is meaningless in Unicode build where data are stored as wchar_t* + wxString GetEncoding() const { return m_encoding; } + void SetEncoding(const wxString& enc) { m_encoding = enc; } +#endif + + static wxVersionInfo GetLibraryVersionInfo(); + +private: + wxString m_version; + wxString m_fileEncoding; +#if !wxUSE_UNICODE + wxString m_encoding; +#endif + wxXmlNode *m_docNode; + + void DoCopy(const wxXmlDocument& doc); + + DECLARE_CLASS(wxXmlDocument) +}; + +#endif // wxUSE_XML + +#endif // _WX_XML_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xpmdecod.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xpmdecod.h new file mode 100644 index 0000000000..68edc924e7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xpmdecod.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xpmdecod.h +// Purpose: wxXPMDecoder, XPM reader for wxImage and wxBitmap +// Author: Vaclav Slavik +// Copyright: (c) 2001 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XPMDECOD_H_ +#define _WX_XPMDECOD_H_ + +#include "wx/defs.h" + +#if wxUSE_IMAGE && wxUSE_XPM + +class WXDLLIMPEXP_FWD_CORE wxImage; +class WXDLLIMPEXP_FWD_BASE wxInputStream; + +// -------------------------------------------------------------------------- +// wxXPMDecoder class +// -------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxXPMDecoder +{ +public: + // constructor, destructor, etc. + wxXPMDecoder() {} + ~wxXPMDecoder() {} + +#if wxUSE_STREAMS + // Is the stream XPM file? + // NOTE: this function modifies the current stream position + bool CanRead(wxInputStream& stream); + + // Read XPM file from the stream, parse it and create image from it + wxImage ReadFile(wxInputStream& stream); +#endif + + // Read directly from XPM data (as passed to wxBitmap ctor): + wxImage ReadData(const char* const* xpm_data); + +#ifdef __BORLANDC__ + // needed for Borland 5.5 + wxImage ReadData(char** xpm_data) + { return ReadData(const_cast(xpm_data)); } +#endif +}; + +#endif // wxUSE_IMAGE && wxUSE_XPM + +#endif // _WX_XPM_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xpmhand.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xpmhand.h new file mode 100644 index 0000000000..0952748d80 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xpmhand.h @@ -0,0 +1,24 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xpmhand.h +// Purpose: XPM handler base header +// Author: Julian Smart +// Modified by: +// Created: +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XPMHAND_H_BASE_ +#define _WX_XPMHAND_H_BASE_ + +// Only wxMSW and wxPM currently defines a separate XPM handler, since +// mostly Windows and Presentation Manager apps won't need XPMs. +#if defined(__WXMSW__) +#error xpmhand.h is no longer needed since wxImage now handles XPMs. +#endif +#if defined(__WXPM__) +#include "wx/os2/xpmhand.h" +#endif + +#endif + // _WX_XPMHAND_H_BASE_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_all.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_all.h new file mode 100644 index 0000000000..0afe3dbb32 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_all.h @@ -0,0 +1,79 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_all.h +// Purpose: includes all xh_*.h files +// Author: Vaclav Slavik +// Created: 2000/03/05 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_ALL_H_ +#define _WX_XH_ALL_H_ + + +// Existing handlers: + +#include "wx/xrc/xh_animatctrl.h" +#include "wx/xrc/xh_bannerwindow.h" +#include "wx/xrc/xh_bmp.h" +#include "wx/xrc/xh_bmpbt.h" +#include "wx/xrc/xh_bmpcbox.h" +#include "wx/xrc/xh_bttn.h" +#include "wx/xrc/xh_cald.h" +#include "wx/xrc/xh_chckb.h" +#include "wx/xrc/xh_chckl.h" +#include "wx/xrc/xh_choic.h" +#include "wx/xrc/xh_choicbk.h" +#include "wx/xrc/xh_clrpicker.h" +#include "wx/xrc/xh_cmdlinkbn.h" +#include "wx/xrc/xh_collpane.h" +#include "wx/xrc/xh_combo.h" +#include "wx/xrc/xh_comboctrl.h" +#include "wx/xrc/xh_datectrl.h" +#include "wx/xrc/xh_dirpicker.h" +#include "wx/xrc/xh_dlg.h" +#include "wx/xrc/xh_editlbox.h" +#include "wx/xrc/xh_filectrl.h" +#include "wx/xrc/xh_filepicker.h" +#include "wx/xrc/xh_fontpicker.h" +#include "wx/xrc/xh_frame.h" +#include "wx/xrc/xh_gauge.h" +#include "wx/xrc/xh_gdctl.h" +#include "wx/xrc/xh_grid.h" +#include "wx/xrc/xh_html.h" +#include "wx/xrc/xh_htmllbox.h" +#include "wx/xrc/xh_hyperlink.h" +#include "wx/xrc/xh_listb.h" +#include "wx/xrc/xh_listc.h" +#include "wx/xrc/xh_listbk.h" +#include "wx/xrc/xh_mdi.h" +#include "wx/xrc/xh_menu.h" +#include "wx/xrc/xh_notbk.h" +#include "wx/xrc/xh_odcombo.h" +#include "wx/xrc/xh_panel.h" +#include "wx/xrc/xh_propdlg.h" +#include "wx/xrc/xh_radbt.h" +#include "wx/xrc/xh_radbx.h" +#include "wx/xrc/xh_scrol.h" +#include "wx/xrc/xh_scwin.h" +#include "wx/xrc/xh_sizer.h" +#include "wx/xrc/xh_slidr.h" +#include "wx/xrc/xh_spin.h" +#include "wx/xrc/xh_split.h" +#include "wx/xrc/xh_srchctrl.h" +#include "wx/xrc/xh_statbar.h" +#include "wx/xrc/xh_stbox.h" +#include "wx/xrc/xh_stbmp.h" +#include "wx/xrc/xh_sttxt.h" +#include "wx/xrc/xh_stlin.h" +#include "wx/xrc/xh_text.h" +#include "wx/xrc/xh_tglbtn.h" +#include "wx/xrc/xh_timectrl.h" +#include "wx/xrc/xh_toolb.h" +#include "wx/xrc/xh_toolbk.h" +#include "wx/xrc/xh_tree.h" +#include "wx/xrc/xh_treebk.h" +#include "wx/xrc/xh_unkwn.h" +#include "wx/xrc/xh_wizrd.h" + +#endif // _WX_XH_ALL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_animatctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_animatctrl.h new file mode 100644 index 0000000000..cd618b5b35 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_animatctrl.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_animatctrl.h +// Purpose: XML resource handler for wxAnimationCtrl +// Author: Francesco Montorsi +// Created: 2006-10-15 +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_ANIMATIONCTRL_H_ +#define _WX_XH_ANIMATIONCTRL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_ANIMATIONCTRL + +class WXDLLIMPEXP_XRC wxAnimationCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxAnimationCtrlXmlHandler) + +public: + wxAnimationCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_ANIMATIONCTRL + +#endif // _WX_XH_ANIMATIONCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_auinotbk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_auinotbk.h new file mode 100644 index 0000000000..66aa234d56 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_auinotbk.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_auinotbk.h +// Purpose: XML resource handler for wxAuiNotebook +// Author: Steve Lamerton +// Created: 2009-06-12 +// Copyright: (c) 2009 Steve Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XRC_XH_AUINOTEBOOK_H_ +#define _WX_XRC_XH_AUINOTEBOOK_H_ + +#include "wx/xrc/xmlres.h" + +class WXDLLIMPEXP_FWD_AUI wxAuiNotebook; + +#if wxUSE_XRC && wxUSE_AUI + +class WXDLLIMPEXP_AUI wxAuiNotebookXmlHandler : public wxXmlResourceHandler +{ +public: + wxAuiNotebookXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxAuiNotebook *m_notebook; + + wxDECLARE_DYNAMIC_CLASS(wxAuiNotebookXmlHandler); +}; + +#endif // wxUSE_XRC && wxUSE_AUI + +#endif // _WX_XRC_XH_AUINOTEBOOK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bannerwindow.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bannerwindow.h new file mode 100644 index 0000000000..1a570ebb85 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bannerwindow.h @@ -0,0 +1,30 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_bannerwindow.h +// Purpose: Declaration of wxBannerWindow XRC handler. +// Author: Vadim Zeitlin +// Created: 2011-08-16 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_BANNERWINDOW_H_ +#define _WX_XH_BANNERWINDOW_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_BANNERWINDOW + +class WXDLLIMPEXP_XRC wxBannerWindowXmlHandler : public wxXmlResourceHandler +{ +public: + wxBannerWindowXmlHandler(); + + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + + wxDECLARE_DYNAMIC_CLASS(wxBannerWindowXmlHandler); +}; + +#endif // wxUSE_XRC && wxUSE_BANNERWINDOW + +#endif // _WX_XH_BANNERWINDOW_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bmp.h new file mode 100644 index 0000000000..ddc8cba440 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bmp.h @@ -0,0 +1,39 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_bmp.h +// Purpose: XML resource handler for wxBitmap and wxIcon +// Author: Vaclav Slavik +// Created: 2000/09/00 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_BMP_H_ +#define _WX_XH_BMP_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC + +class WXDLLIMPEXP_XRC wxBitmapXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxBitmapXmlHandler) + +public: + wxBitmapXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +class WXDLLIMPEXP_XRC wxIconXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxIconXmlHandler) + +public: + wxIconXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC + +#endif // _WX_XH_BMP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bmpbt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bmpbt.h new file mode 100644 index 0000000000..7fcc100de0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bmpbt.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_bmpbt.h +// Purpose: XML resource handler for bitmap buttons +// Author: Brian Gavin +// Created: 2000/03/05 +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_BMPBT_H_ +#define _WX_XH_BMPBT_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_BMPBUTTON + +class WXDLLIMPEXP_XRC wxBitmapButtonXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxBitmapButtonXmlHandler) + +public: + wxBitmapButtonXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_BMPBUTTON + +#endif // _WX_XH_BMPBT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bmpcbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bmpcbox.h new file mode 100644 index 0000000000..2e3e548cd1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bmpcbox.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_bmpcbox.h +// Purpose: XML resource handler for wxBitmapComboBox +// Author: Jaakko Salli +// Created: Sep-10-2006 +// Copyright: (c) 2006 Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_BMPCBOX_H_ +#define _WX_XH_BMPCBOX_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_BITMAPCOMBOBOX + +class WXDLLIMPEXP_FWD_ADV wxBitmapComboBox; + +class WXDLLIMPEXP_XRC wxBitmapComboBoxXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxBitmapComboBoxXmlHandler) + +public: + wxBitmapComboBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + wxBitmapComboBox* m_combobox; + bool m_isInside; +}; + +#endif // wxUSE_XRC && wxUSE_BITMAPCOMBOBOX + +#endif // _WX_XH_BMPCBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bttn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bttn.h new file mode 100644 index 0000000000..bc82924bec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_bttn.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_bttn.h +// Purpose: XML resource handler for buttons +// Author: Vaclav Slavik +// Created: 2000/03/05 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_BTTN_H_ +#define _WX_XH_BTTN_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_BUTTON + +class WXDLLIMPEXP_XRC wxButtonXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxButtonXmlHandler) + +public: + wxButtonXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_BUTTON + +#endif // _WX_XH_BTTN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_cald.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_cald.h new file mode 100644 index 0000000000..4507738a18 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_cald.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_cald.h +// Purpose: XML resource handler for wxCalendarCtrl +// Author: Brian Gavin +// Created: 2000/09/09 +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_CALD_H_ +#define _WX_XH_CALD_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_CALENDARCTRL + +class WXDLLIMPEXP_XRC wxCalendarCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxCalendarCtrlXmlHandler) + +public: + wxCalendarCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_CALENDARCTRL + +#endif // _WX_XH_CALD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_chckb.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_chckb.h new file mode 100644 index 0000000000..dba1dae4c9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_chckb.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_chckb.h +// Purpose: XML resource handler for wxCheckBox +// Author: Bob Mitchell +// Created: 2000/03/21 +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_CHCKB_H_ +#define _WX_XH_CHCKB_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_CHECKBOX + +class WXDLLIMPEXP_XRC wxCheckBoxXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxCheckBoxXmlHandler) + +public: + wxCheckBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_CHECKBOX + +#endif // _WX_XH_CHECKBOX_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_chckl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_chckl.h new file mode 100644 index 0000000000..19725dde00 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_chckl.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_chckl.h +// Purpose: XML resource handler for wxCheckListBox +// Author: Bob Mitchell +// Created: 2000/03/21 +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_CHCKL_H_ +#define _WX_XH_CHCKL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_CHECKLISTBOX + +class WXDLLIMPEXP_XRC wxCheckListBoxXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxCheckListBoxXmlHandler) + +public: + wxCheckListBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_insideBox; + wxArrayString strList; +}; + +#endif // wxUSE_XRC && wxUSE_CHECKLISTBOX + +#endif // _WX_XH_CHECKLIST_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_choic.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_choic.h new file mode 100644 index 0000000000..e7115f8027 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_choic.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_choic.h +// Purpose: XML resource handler for wxChoice +// Author: Bob Mitchell +// Created: 2000/03/21 +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_CHOIC_H_ +#define _WX_XH_CHOIC_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_CHOICE + +class WXDLLIMPEXP_XRC wxChoiceXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxChoiceXmlHandler) + +public: + wxChoiceXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_insideBox; + wxArrayString strList; +}; + +#endif // wxUSE_XRC && wxUSE_CHOICE + +#endif // _WX_XH_CHOIC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_choicbk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_choicbk.h new file mode 100644 index 0000000000..20c5346eb3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_choicbk.h @@ -0,0 +1,34 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_choicbk.h +// Purpose: XML resource handler for wxChoicebook +// Author: Vaclav Slavik +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_CHOICEBK_H_ +#define _WX_XH_CHOICEBK_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_CHOICEBOOK + +class WXDLLIMPEXP_FWD_CORE wxChoicebook; + +class WXDLLIMPEXP_XRC wxChoicebookXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxChoicebookXmlHandler) + +public: + wxChoicebookXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxChoicebook *m_choicebook; +}; + +#endif // wxUSE_XRC && wxUSE_CHOICEBOOK + +#endif // _WX_XH_CHOICEBK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_clrpicker.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_clrpicker.h new file mode 100644 index 0000000000..9925ba0c41 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_clrpicker.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_clrpicker.h +// Purpose: XML resource handler for wxColourPickerCtrl +// Author: Francesco Montorsi +// Created: 2006-04-17 +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_CLRPICKERCTRL_H_ +#define _WX_XH_CLRPICKERCTRL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_COLOURPICKERCTRL + +class WXDLLIMPEXP_XRC wxColourPickerCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxColourPickerCtrlXmlHandler) + +public: + wxColourPickerCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_COLOURPICKERCTRL + +#endif // _WX_XH_CLRPICKERCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_cmdlinkbn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_cmdlinkbn.h new file mode 100644 index 0000000000..8f45960f29 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_cmdlinkbn.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_cmdlinkbn.h +// Purpose: XML resource handler for command link buttons +// Author: Kinaou Herve +// Created: 2010-10-20 +// Copyright: (c) 2010 wxWidgets development team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_CMDLINKBN_H_ +#define _WX_XH_CMDLINKBN_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_COMMANDLINKBUTTON + +class WXDLLIMPEXP_XRC wxCommandLinkButtonXmlHandler : public wxXmlResourceHandler +{ +public: + wxCommandLinkButtonXmlHandler(); + + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + wxDECLARE_DYNAMIC_CLASS(wxCommandLinkButtonXmlHandler); +}; + +#endif // wxUSE_XRC && wxUSE_COMMANDLINKBUTTON + +#endif // _WX_XH_CMDLINKBN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_collpane.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_collpane.h new file mode 100644 index 0000000000..f93c237174 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_collpane.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_collpane.h +// Purpose: XML resource handler for wxCollapsiblePane +// Author: Francesco Montorsi +// Created: 2006-10-27 +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_COLLPANE_H_ +#define _WX_XH_COLLPANE_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_COLLPANE + +class WXDLLIMPEXP_FWD_CORE wxCollapsiblePane; + +class WXDLLIMPEXP_XRC wxCollapsiblePaneXmlHandler : public wxXmlResourceHandler +{ +public: + wxCollapsiblePaneXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxCollapsiblePane *m_collpane; + + DECLARE_DYNAMIC_CLASS(wxCollapsiblePaneXmlHandler) +}; + +#endif // wxUSE_XRC && wxUSE_COLLPANE + +#endif // _WX_XH_COLLPANE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_combo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_combo.h new file mode 100644 index 0000000000..df688a3361 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_combo.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_combo.h +// Purpose: XML resource handler for wxComboBox +// Author: Bob Mitchell +// Created: 2000/03/21 +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_COMBO_H_ +#define _WX_XH_COMBO_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_COMBOBOX + +class WXDLLIMPEXP_XRC wxComboBoxXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxComboBoxXmlHandler) + +public: + wxComboBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_insideBox; + wxArrayString strList; +}; + +#endif // wxUSE_XRC && wxUSE_COMBOBOX + +#endif // _WX_XH_COMBO_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_comboctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_comboctrl.h new file mode 100644 index 0000000000..a11c0276c8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_comboctrl.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_comboctrl.h +// Purpose: XML resource handler for wxComboBox +// Author: Jaakko Salli +// Created: 2009/01/25 +// Copyright: (c) 2009 Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_COMBOCTRL_H_ +#define _WX_XH_COMBOCTRL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_COMBOCTRL + +class WXDLLIMPEXP_XRC wxComboCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxComboCtrlXmlHandler) + +public: + wxComboCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: +}; + +#endif // wxUSE_XRC && wxUSE_COMBOCTRL + +#endif // _WX_XH_COMBOCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_datectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_datectrl.h new file mode 100644 index 0000000000..e13c5c3676 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_datectrl.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_datectrl.h +// Purpose: XML resource handler for wxDatePickerCtrl +// Author: Vaclav Slavik +// Created: 2005-02-07 +// Copyright: (c) 2005 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_DATECTRL_H_ +#define _WX_XH_DATECTRL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_DATEPICKCTRL + +class WXDLLIMPEXP_XRC wxDateCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxDateCtrlXmlHandler) + +public: + wxDateCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_DATEPICKCTRL + +#endif // _WX_XH_DATECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_dirpicker.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_dirpicker.h new file mode 100644 index 0000000000..b77540e36d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_dirpicker.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_dirpicker.h +// Purpose: XML resource handler for wxDirPickerCtrl +// Author: Francesco Montorsi +// Created: 2006-04-17 +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_DIRPICKERCTRL_H_ +#define _WX_XH_DIRPICKERCTRL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_DIRPICKERCTRL + +class WXDLLIMPEXP_XRC wxDirPickerCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxDirPickerCtrlXmlHandler) + +public: + wxDirPickerCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_DIRPICKERCTRL + +#endif // _WX_XH_DIRPICKERCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_dlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_dlg.h new file mode 100644 index 0000000000..903f643181 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_dlg.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_dlg.h +// Purpose: XML resource handler for dialogs +// Author: Vaclav Slavik +// Created: 2000/03/05 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_DLG_H_ +#define _WX_XH_DLG_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC + +class WXDLLIMPEXP_XRC wxDialogXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxDialogXmlHandler) + +public: + wxDialogXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC + +#endif // _WX_XH_DLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_editlbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_editlbox.h new file mode 100644 index 0000000000..0baa85df89 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_editlbox.h @@ -0,0 +1,39 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_editlbox.h +// Purpose: declaration of wxEditableListBox XRC handler +// Author: Vadim Zeitlin +// Created: 2009-06-04 +// Copyright: (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XRC_XH_EDITLBOX_H_ +#define _WX_XRC_XH_EDITLBOX_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_EDITABLELISTBOX + +// ---------------------------------------------------------------------------- +// wxEditableListBoxXmlHandler: XRC handler for wxEditableListBox +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_XRC wxEditableListBoxXmlHandler : public wxXmlResourceHandler +{ +public: + wxEditableListBoxXmlHandler(); + + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_insideBox; + wxArrayString m_items; + + DECLARE_DYNAMIC_CLASS(wxEditableListBoxXmlHandler) +}; + +#endif // wxUSE_XRC && wxUSE_EDITABLELISTBOX + +#endif // _WX_XRC_XH_EDITLBOX_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_filectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_filectrl.h new file mode 100644 index 0000000000..97f9984ffb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_filectrl.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_filectrl.h +// Purpose: XML resource handler for wxFileCtrl +// Author: Kinaou Hervé +// Created: 2009-05-11 +// Copyright: (c) 2009 wxWidgets development team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_FILECTRL_H_ +#define _WX_XH_FILECTRL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_FILECTRL + +class WXDLLIMPEXP_XRC wxFileCtrlXmlHandler : public wxXmlResourceHandler +{ +public: + wxFileCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + DECLARE_DYNAMIC_CLASS(wxFileCtrlXmlHandler) +}; + +#endif // wxUSE_XRC && wxUSE_FILECTRL + +#endif // _WX_XH_FILEPICKERCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_filepicker.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_filepicker.h new file mode 100644 index 0000000000..31ab0a4c53 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_filepicker.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_filepicker.h +// Purpose: XML resource handler for wxFilePickerCtrl +// Author: Francesco Montorsi +// Created: 2006-04-17 +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_FILEPICKERCTRL_H_ +#define _WX_XH_FILEPICKERCTRL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_FILEPICKERCTRL + +class WXDLLIMPEXP_XRC wxFilePickerCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxFilePickerCtrlXmlHandler) + +public: + wxFilePickerCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_FILEPICKERCTRL + +#endif // _WX_XH_FILEPICKERCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_fontpicker.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_fontpicker.h new file mode 100644 index 0000000000..481adfb74e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_fontpicker.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_fontpicker.h +// Purpose: XML resource handler for wxFontPickerCtrl +// Author: Francesco Montorsi +// Created: 2006-04-17 +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_FONTPICKERCTRL_H_ +#define _WX_XH_FONTPICKERCTRL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_FONTPICKERCTRL + +class WXDLLIMPEXP_XRC wxFontPickerCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxFontPickerCtrlXmlHandler) + +public: + wxFontPickerCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_FONTPICKERCTRL + +#endif // _WX_XH_FONTPICKERCTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_frame.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_frame.h new file mode 100644 index 0000000000..16ee6aa484 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_frame.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_frame.h +// Purpose: XML resource handler for wxFrame +// Author: Vaclav Slavik & Aleks. +// Created: 2000/03/05 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_FRAME_H_ +#define _WX_XH_FRAME_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC + +class WXDLLIMPEXP_XRC wxFrameXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxFrameXmlHandler) + +public: + wxFrameXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC + +#endif // _WX_XH_FRAME_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_gauge.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_gauge.h new file mode 100644 index 0000000000..26eaa5b072 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_gauge.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_gauge.h +// Purpose: XML resource handler for wxGauge +// Author: Bob Mitchell +// Created: 2000/03/21 +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_GAUGE_H_ +#define _WX_XH_GAUGE_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_GAUGE + +class WXDLLIMPEXP_XRC wxGaugeXmlHandler : public wxXmlResourceHandler +{ +public: + wxGaugeXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + + DECLARE_DYNAMIC_CLASS(wxGaugeXmlHandler) +}; + +#endif // wxUSE_XRC && wxUSE_GAUGE + +#endif // _WX_XH_GAUGE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_gdctl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_gdctl.h new file mode 100644 index 0000000000..bc746690fb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_gdctl.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_gdctl.h +// Purpose: XML resource handler for wxGenericDirCtrl +// Author: Markus Greither +// Created: 2002/01/20 +// Copyright: (c) 2002 Markus Greither +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_GDCTL_H_ +#define _WX_XH_GDCTL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_DIRDLG + +class WXDLLIMPEXP_XRC wxGenericDirCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxGenericDirCtrlXmlHandler) + +public: + wxGenericDirCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_DIRDLG + +#endif // _WX_XH_GDCTL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_grid.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_grid.h new file mode 100644 index 0000000000..3d62705749 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_grid.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_grid.h +// Purpose: XML resource handler for wxGrid +// Author: Agron Selimaj +// Created: 2005/08/11 +// Copyright: (c) 2005 Agron Selimaj, Freepour Controls Inc. +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_GRD_H_ +#define _WX_XH_GRD_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_GRID + +class WXDLLIMPEXP_XRC wxGridXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxGridXmlHandler) + +public: + wxGridXmlHandler(); + + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_GRID + +#endif // _WX_XH_GRD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_html.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_html.h new file mode 100644 index 0000000000..2c08a4b98f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_html.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_html.h +// Purpose: XML resource handler for wxHtmlWindow +// Author: Bob Mitchell +// Created: 2000/03/21 +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_HTML_H_ +#define _WX_XH_HTML_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_HTML + +class WXDLLIMPEXP_XRC wxHtmlWindowXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxHtmlWindowXmlHandler) + +public: + wxHtmlWindowXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_HTML + +#endif // _WX_XH_HTML_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_htmllbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_htmllbox.h new file mode 100644 index 0000000000..fb3539d9c5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_htmllbox.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_htmllbox.h +// Purpose: XML resource handler for wxSimpleHtmlListBox +// Author: Francesco Montorsi +// Created: 2006/10/21 +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SIMPLEHTMLLISTBOX_H_ +#define _WX_XH_SIMPLEHTMLLISTBOX_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_HTML + +class WXDLLIMPEXP_XRC wxSimpleHtmlListBoxXmlHandler : public wxXmlResourceHandler +{ +public: + wxSimpleHtmlListBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_insideBox; + wxArrayString strList; + + DECLARE_DYNAMIC_CLASS(wxSimpleHtmlListBoxXmlHandler) +}; + +#endif // wxUSE_XRC && wxUSE_HTML + +#endif // _WX_XH_SIMPLEHTMLLISTBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_hyperlink.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_hyperlink.h new file mode 100644 index 0000000000..4793668e35 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_hyperlink.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_hyperlink.h +// Purpose: Hyperlink control (wxAdv) +// Author: David Norris +// Modified by: Ryan Norton, Francesco Montorsi +// Created: 04/02/2005 +// Copyright: (c) 2005 David Norris +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_HYPERLINKH__ +#define _WX_XH_HYPERLINKH__ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_HYPERLINKCTRL + +class WXDLLIMPEXP_XRC wxHyperlinkCtrlXmlHandler : public wxXmlResourceHandler +{ + // Register with wxWindows' dynamic class subsystem. + DECLARE_DYNAMIC_CLASS(wxHyperlinkCtrlXmlHandler) + +public: + // Constructor. + wxHyperlinkCtrlXmlHandler(); + + // Creates the control and returns a pointer to it. + virtual wxObject *DoCreateResource(); + + // Returns true if we know how to create a control for the given node. + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_HYPERLINKCTRL + +#endif // _WX_XH_HYPERLINKH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_listb.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_listb.h new file mode 100644 index 0000000000..c73c993de6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_listb.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_listb.h +// Purpose: XML resource handler for wxListbox +// Author: Bob Mitchell & Vaclav Slavik +// Created: 2000/07/29 +// Copyright: (c) 2000 Bob Mitchell & Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_LISTB_H_ +#define _WX_XH_LISTB_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_LISTBOX + +class WXDLLIMPEXP_XRC wxListBoxXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxListBoxXmlHandler) + +public: + wxListBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_insideBox; + wxArrayString strList; +}; + +#endif // wxUSE_XRC && wxUSE_LISTBOX + +#endif // _WX_XH_LISTB_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_listbk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_listbk.h new file mode 100644 index 0000000000..7aa2e0b2f3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_listbk.h @@ -0,0 +1,34 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_listbk.h +// Purpose: XML resource handler for wxListbook +// Author: Vaclav Slavik +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_LISTBK_H_ +#define _WX_XH_LISTBK_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_LISTBOOK + +class WXDLLIMPEXP_FWD_CORE wxListbook; + +class WXDLLIMPEXP_XRC wxListbookXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxListbookXmlHandler) + +public: + wxListbookXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxListbook *m_listbook; +}; + +#endif // wxUSE_XRC && wxUSE_LISTBOOK + +#endif // _WX_XH_LISTBK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_listc.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_listc.h new file mode 100644 index 0000000000..b2b927e1db --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_listc.h @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_listc.h +// Purpose: XML resource handler for wxListCtrl +// Author: Brian Gavin +// Created: 2000/09/09 +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_LISTC_H_ +#define _WX_XH_LISTC_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_LISTCTRL + +class WXDLLIMPEXP_FWD_CORE wxListCtrl; +class WXDLLIMPEXP_FWD_CORE wxListItem; + +class WXDLLIMPEXP_XRC wxListCtrlXmlHandler : public wxXmlResourceHandler +{ +public: + wxListCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + // handlers for wxListCtrl itself and its listcol and listitem children + wxListCtrl *HandleListCtrl(); + void HandleListCol(); + void HandleListItem(); + + // common part to HandleList{Col,Item}() + void HandleCommonItemAttrs(wxListItem& item); + + // gets the items image index in the corresponding image list (normal if + // which is wxIMAGE_LIST_NORMAL or small if it is wxIMAGE_LIST_SMALL) + long GetImageIndex(wxListCtrl *listctrl, int which); + + DECLARE_DYNAMIC_CLASS(wxListCtrlXmlHandler) +}; + +#endif // wxUSE_XRC && wxUSE_LISTCTRL + +#endif // _WX_XH_LISTC_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_mdi.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_mdi.h new file mode 100644 index 0000000000..6634318386 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_mdi.h @@ -0,0 +1,34 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_mdi.h +// Purpose: XML resource handler for wxMDI +// Author: David M. Falkinder & Vaclav Slavik +// Created: 14/02/2005 +// Copyright: (c) 2005 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_MDI_H_ +#define _WX_XH_MDI_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_MDI + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class WXDLLIMPEXP_XRC wxMdiXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxMdiXmlHandler) + +public: + wxMdiXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + wxWindow *CreateFrame(); +}; + +#endif // wxUSE_XRC && wxUSE_MDI + +#endif // _WX_XH_MDI_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_menu.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_menu.h new file mode 100644 index 0000000000..b06fee39fe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_menu.h @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_menu.h +// Purpose: XML resource handler for menus/menubars +// Author: Vaclav Slavik +// Created: 2000/03/05 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_MENU_H_ +#define _WX_XH_MENU_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_MENUS + +class WXDLLIMPEXP_XRC wxMenuXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxMenuXmlHandler) + +public: + wxMenuXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_insideMenu; +}; + +class WXDLLIMPEXP_XRC wxMenuBarXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxMenuBarXmlHandler) + +public: + wxMenuBarXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_MENUS + +#endif // _WX_XH_MENU_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_notbk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_notbk.h new file mode 100644 index 0000000000..aa24fc8716 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_notbk.h @@ -0,0 +1,34 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_notbk.h +// Purpose: XML resource handler for wxNotebook +// Author: Vaclav Slavik +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_NOTBK_H_ +#define _WX_XH_NOTBK_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_NOTEBOOK + +class WXDLLIMPEXP_FWD_CORE wxNotebook; + +class WXDLLIMPEXP_XRC wxNotebookXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxNotebookXmlHandler) + +public: + wxNotebookXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxNotebook *m_notebook; +}; + +#endif // wxUSE_XRC && wxUSE_NOTEBOOK + +#endif // _WX_XH_NOTBK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_odcombo.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_odcombo.h new file mode 100644 index 0000000000..d639f4108a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_odcombo.h @@ -0,0 +1,34 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_odcombo.h +// Purpose: XML resource handler for wxOwnerDrawnComboBox +// Author: Alex Bligh - based on wx/xrc/xh_combo.h +// Created: 2006/06/19 +// Copyright: (c) 2006 Alex Bligh +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_ODCOMBO_H_ +#define _WX_XH_ODCOMBO_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_ODCOMBOBOX + +class WXDLLIMPEXP_XRC wxOwnerDrawnComboBoxXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxOwnerDrawnComboBoxXmlHandler) + +public: + wxOwnerDrawnComboBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_insideBox; + wxArrayString strList; +}; + +#endif // wxUSE_XRC && wxUSE_ODCOMBOBOX + +#endif // _WX_XH_ODCOMBO_H_ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_panel.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_panel.h new file mode 100644 index 0000000000..d5ee1a4542 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_panel.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_panel.h +// Purpose: XML resource handler for wxPanel +// Author: Vaclav Slavik +// Created: 2000/03/05 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_PANEL_H_ +#define _WX_XH_PANEL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC + +class WXDLLIMPEXP_XRC wxPanelXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxPanelXmlHandler) + +public: + wxPanelXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC + +#endif // _WX_XH_PANEL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_propdlg.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_propdlg.h new file mode 100644 index 0000000000..0be363f63e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_propdlg.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_propdlg.h +// Purpose: XML resource handler for wxPropertySheetDialog +// Author: Sander Berents +// Created: 2007/07/12 +// Copyright: (c) 2007 Sander Berents +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_PROPDLG_H_ +#define _WX_XH_PROPDLG_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC + +class WXDLLIMPEXP_FWD_ADV wxPropertySheetDialog; + +class WXDLLIMPEXP_XRC wxPropertySheetDialogXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxPropertySheetDialogXmlHandler) + +public: + wxPropertySheetDialogXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxPropertySheetDialog *m_dialog; +}; + +#endif // wxUSE_XRC + +#endif // _WX_XH_PROPDLG_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_radbt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_radbt.h new file mode 100644 index 0000000000..7d21f99a3c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_radbt.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_radbt.h +// Purpose: XML resource handler for wxRadioButton +// Author: Bob Mitchell +// Created: 2000/03/21 +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_RADBT_H_ +#define _WX_XH_RADBT_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_RADIOBTN + +class WXDLLIMPEXP_XRC wxRadioButtonXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxRadioButtonXmlHandler) + +public: + wxRadioButtonXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_RADIOBOX + +#endif // _WX_XH_RADBT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_radbx.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_radbx.h new file mode 100644 index 0000000000..5df1ac1ac6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_radbx.h @@ -0,0 +1,49 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_radbx.h +// Purpose: XML resource handler for wxRadioBox +// Author: Bob Mitchell +// Created: 2000/03/21 +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_RADBX_H_ +#define _WX_XH_RADBX_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_RADIOBOX + +class WXDLLIMPEXP_XRC wxRadioBoxXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxRadioBoxXmlHandler) + +public: + wxRadioBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_insideBox; + + // the items labels + wxArrayString m_labels; + +#if wxUSE_TOOLTIPS + // the items tooltips + wxArrayString m_tooltips; +#endif // wxUSE_TOOLTIPS + + // the item help text + wxArrayString m_helptexts; + wxArrayInt m_helptextSpecified; + + // if the corresponding array element is 1, the radiobox item is + // disabled/hidden + wxArrayInt m_isEnabled, + m_isShown; +}; + +#endif // wxUSE_XRC && wxUSE_RADIOBOX + +#endif // _WX_XH_RADBX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_ribbon.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_ribbon.h new file mode 100644 index 0000000000..b9737c8212 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_ribbon.h @@ -0,0 +1,47 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_ribbon.h +// Purpose: XML resource handler for wxRibbon related classes +// Author: Armel Asselin +// Created: 2010-04-23 +// Copyright: (c) 2010 Armel Asselin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XRC_XH_RIBBON_H_ +#define _WX_XRC_XH_RIBBON_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_RIBBON + +class WXDLLIMPEXP_FWD_RIBBON wxRibbonControl; + +class WXDLLIMPEXP_RIBBON wxRibbonXmlHandler : public wxXmlResourceHandler +{ +public: + wxRibbonXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + const wxClassInfo *m_isInside; + + bool IsRibbonControl (wxXmlNode *node); + + wxObject* Handle_buttonbar(); + wxObject* Handle_button(); + wxObject* Handle_control(); + wxObject* Handle_page(); + wxObject* Handle_gallery(); + wxObject* Handle_galleryitem(); + wxObject* Handle_panel(); + wxObject* Handle_bar(); + + void Handle_RibbonArtProvider(wxRibbonControl *control); + + wxDECLARE_DYNAMIC_CLASS(wxRibbonXmlHandler); +}; + +#endif // wxUSE_XRC && wxUSE_RIBBON + +#endif // _WX_XRC_XH_RIBBON_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_richtext.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_richtext.h new file mode 100644 index 0000000000..1c52cbbcb1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_richtext.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_richtext.h +// Purpose: XML resource handler for wxRichTextCtrl +// Author: Julian Smart +// Created: 2006-11-08 +// Copyright: (c) 2006 Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_RICHTEXT_H_ +#define _WX_XH_RICHTEXT_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_RICHTEXT + +class WXDLLIMPEXP_RICHTEXT wxRichTextCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxRichTextCtrlXmlHandler) + +public: + wxRichTextCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_RICHTEXT + +#endif // _WX_XH_RICHTEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_scrol.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_scrol.h new file mode 100644 index 0000000000..0599c5a9cd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_scrol.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_scrol.h +// Purpose: XML resource handler for wxScrollBar +// Author: Brian Gavin +// Created: 2000/09/09 +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SCROL_H_ +#define _WX_XH_SCROL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_SCROLLBAR + +class WXDLLIMPEXP_XRC wxScrollBarXmlHandler : public wxXmlResourceHandler +{ +public: + wxScrollBarXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + + DECLARE_DYNAMIC_CLASS(wxScrollBarXmlHandler) +}; + +#endif // wxUSE_XRC && wxUSE_SCROLLBAR + +#endif // _WX_XH_SCROL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_scwin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_scwin.h new file mode 100644 index 0000000000..c2e370016f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_scwin.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_scwin.h +// Purpose: XML resource handler for wxScrolledWindow +// Author: Vaclav Slavik +// Created: 2002/10/18 +// Copyright: (c) 2002 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SCWIN_H_ +#define _WX_XH_SCWIN_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC + +class WXDLLIMPEXP_XRC wxScrolledWindowXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxScrolledWindowXmlHandler) + +public: + wxScrolledWindowXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC + +#endif // _WX_XH_SCWIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_sizer.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_sizer.h new file mode 100644 index 0000000000..e04947a14c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_sizer.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_sizer.h +// Purpose: XML resource handler for wxBoxSizer +// Author: Vaclav Slavik +// Created: 2000/04/24 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SIZER_H_ +#define _WX_XH_SIZER_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC + +#include "wx/sizer.h" +#include "wx/gbsizer.h" + +class WXDLLIMPEXP_XRC wxSizerXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxSizerXmlHandler) + +public: + wxSizerXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +protected: + virtual wxSizer* DoCreateSizer(const wxString& name); + virtual bool IsSizerNode(wxXmlNode *node) const; + +private: + bool m_isInside; + bool m_isGBS; + + wxSizer *m_parentSizer; + + + wxObject* Handle_sizeritem(); + wxObject* Handle_spacer(); + wxObject* Handle_sizer(); + wxSizer* Handle_wxBoxSizer(); +#if wxUSE_STATBOX + wxSizer* Handle_wxStaticBoxSizer(); +#endif + wxSizer* Handle_wxGridSizer(); + wxFlexGridSizer* Handle_wxFlexGridSizer(); + wxGridBagSizer* Handle_wxGridBagSizer(); + wxSizer* Handle_wxWrapSizer(); + + bool ValidateGridSizerChildren(); + void SetFlexibleMode(wxFlexGridSizer* fsizer); + void SetGrowables(wxFlexGridSizer* fsizer, const wxChar* param, bool rows); + wxGBPosition GetGBPos(const wxString& param); + wxGBSpan GetGBSpan(const wxString& param); + wxSizerItem* MakeSizerItem(); + void SetSizerItemAttributes(wxSizerItem* sitem); + void AddSizerItem(wxSizerItem* sitem); +}; + +#if wxUSE_BUTTON + +class WXDLLIMPEXP_XRC wxStdDialogButtonSizerXmlHandler + : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxStdDialogButtonSizerXmlHandler) + +public: + wxStdDialogButtonSizerXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxStdDialogButtonSizer *m_parentSizer; +}; + +#endif // wxUSE_BUTTON + +#endif // wxUSE_XRC + +#endif // _WX_XH_SIZER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_slidr.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_slidr.h new file mode 100644 index 0000000000..0e209089f5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_slidr.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_slidr.h +// Purpose: XML resource handler for wxSlider +// Author: Bob Mitchell +// Created: 2000/03/21 +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SLIDR_H_ +#define _WX_XH_SLIDR_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_SLIDER + +class WXDLLIMPEXP_XRC wxSliderXmlHandler : public wxXmlResourceHandler +{ +public: + wxSliderXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + + DECLARE_DYNAMIC_CLASS(wxSliderXmlHandler) +}; + +#endif // wxUSE_XRC && wxUSE_SLIDER + +#endif // _WX_XH_SLIDR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_spin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_spin.h new file mode 100644 index 0000000000..7525ba4cd9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_spin.h @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_spin.h +// Purpose: XML resource handler for wxSpinButton and wxSpinCtrl +// Author: Bob Mitchell +// Created: 2000/03/21 +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SPIN_H_ +#define _WX_XH_SPIN_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC + +#if wxUSE_SPINBTN + +class WXDLLIMPEXP_XRC wxSpinButtonXmlHandler : public wxXmlResourceHandler +{ +public: + wxSpinButtonXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + + DECLARE_DYNAMIC_CLASS(wxSpinButtonXmlHandler) +}; + +#endif // wxUSE_SPINBTN + + +#if wxUSE_SPINCTRL + +class WXDLLIMPEXP_XRC wxSpinCtrlXmlHandler : public wxXmlResourceHandler +{ +public: + wxSpinCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + + DECLARE_DYNAMIC_CLASS(wxSpinCtrlXmlHandler) +}; + +#endif // wxUSE_SPINCTRL + +#endif // wxUSE_XRC + +#endif // _WX_XH_SPIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_split.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_split.h new file mode 100644 index 0000000000..7f682dd73d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_split.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_split.h +// Purpose: XRC resource for wxSplitterWindow +// Author: panga@freemail.hu, Vaclav Slavik +// Created: 2003/01/26 +// Copyright: (c) 2003 panga@freemail.hu, Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SPLIT_H_ +#define _WX_XH_SPLIT_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_SPLITTER + +class WXDLLIMPEXP_XRC wxSplitterWindowXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxSplitterWindowXmlHandler) + +public: + wxSplitterWindowXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_SPLITTER + +#endif // _WX_XH_SPLIT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_srchctrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_srchctrl.h new file mode 100644 index 0000000000..82f93538e0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_srchctrl.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_srchctl.h +// Purpose: XRC resource handler for wxSearchCtrl +// Author: Sander Berents +// Created: 2007/07/12 +// Copyright: (c) 2007 Sander Berents +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SRCH_H_ +#define _WX_XH_SRCH_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_SEARCHCTRL + +class WXDLLIMPEXP_XRC wxSearchCtrlXmlHandler : public wxXmlResourceHandler +{ +public: + wxSearchCtrlXmlHandler(); + + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + + DECLARE_DYNAMIC_CLASS(wxSearchCtrlXmlHandler) +}; + +#endif // wxUSE_XRC && wxUSE_SEARCHCTRL + +#endif // _WX_XH_SRCH_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_statbar.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_statbar.h new file mode 100644 index 0000000000..58c4ff4b42 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_statbar.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_statbar.h +// Purpose: XML resource handler for wxStatusBar +// Author: Brian Ravnsgaard Riis +// Created: 2004/01/21 +// Copyright: (c) 2004 Brian Ravnsgaard Riis +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_STATBAR_H_ +#define _WX_XH_STATBAR_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_STATUSBAR + +class WXDLLIMPEXP_XRC wxStatusBarXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxStatusBarXmlHandler) + +public: + wxStatusBarXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_STATUSBAR + +#endif // _WX_XH_STATBAR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_stbmp.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_stbmp.h new file mode 100644 index 0000000000..42a564fcdf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_stbmp.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_stbmp.h +// Purpose: XML resource handler for wxStaticBitmap +// Author: Vaclav Slavik +// Created: 2000/04/22 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_STBMP_H_ +#define _WX_XH_STBMP_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_STATBMP + +class WXDLLIMPEXP_XRC wxStaticBitmapXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxStaticBitmapXmlHandler) + +public: + wxStaticBitmapXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_STATBMP + +#endif // _WX_XH_STBMP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_stbox.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_stbox.h new file mode 100644 index 0000000000..43f6c25ac6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_stbox.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_stbox.h +// Purpose: XML resource handler for wxStaticBox +// Author: Brian Gavin +// Created: 2000/09/00 +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_STBOX_H_ +#define _WX_XH_STBOX_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_STATBOX + +class WXDLLIMPEXP_XRC wxStaticBoxXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxStaticBoxXmlHandler) + +public: + wxStaticBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_STATBOX + +#endif // _WX_XH_STBOX_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_stlin.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_stlin.h new file mode 100644 index 0000000000..9efa3cb884 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_stlin.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_stlin.h +// Purpose: XML resource handler for wxStaticLine +// Author: Vaclav Slavik +// Created: 2000/09/00 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_STLIN_H_ +#define _WX_XH_STLIN_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_STATLINE + +class WXDLLIMPEXP_XRC wxStaticLineXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxStaticLineXmlHandler) + +public: + wxStaticLineXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_STATLINE + +#endif // _WX_XH_STLIN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_sttxt.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_sttxt.h new file mode 100644 index 0000000000..4d99ec25e7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_sttxt.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_sttxt.h +// Purpose: XML resource handler for wxStaticText +// Author: Bob Mitchell +// Created: 2000/03/21 +// Copyright: (c) 2000 Bob Mitchell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_STTXT_H_ +#define _WX_XH_STTXT_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_STATTEXT + +class WXDLLIMPEXP_XRC wxStaticTextXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxStaticTextXmlHandler) + +public: + wxStaticTextXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_STATTEXT + +#endif // _WX_XH_STTXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_text.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_text.h new file mode 100644 index 0000000000..9a7649d37c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_text.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_text.h +// Purpose: XML resource handler for wxTextCtrl +// Author: Aleksandras Gluchovas +// Created: 2000/03/21 +// Copyright: (c) 2000 Aleksandras Gluchovas +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_TEXT_H_ +#define _WX_XH_TEXT_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_TEXTCTRL + +class WXDLLIMPEXP_XRC wxTextCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxTextCtrlXmlHandler) + +public: + wxTextCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_TEXTCTRL + +#endif // _WX_XH_TEXT_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_tglbtn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_tglbtn.h new file mode 100644 index 0000000000..6c6c9a2cd3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_tglbtn.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_tglbtn.h +// Purpose: XML resource handler for wxToggleButton +// Author: Julian Smart +// Created: 2004-08-30 +// Copyright: (c) 2004 Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_TGLBTN_H_ +#define _WX_XH_TGLBTN_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_TOGGLEBTN + +class WXDLLIMPEXP_XRC wxToggleButtonXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxToggleButtonXmlHandler) + +public: + wxToggleButtonXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +protected: + virtual void DoCreateToggleButton(wxObject *control); +#if !defined(__WXUNIVERSAL__) && !defined(__WXMOTIF__) && !defined(__WXPM__) && !(defined(__WXGTK__) && !defined(__WXGTK20__)) + virtual void DoCreateBitmapToggleButton(wxObject *control); +#endif +}; + +#endif // wxUSE_XRC && wxUSE_TOGGLEBTN + +#endif // _WX_XH_TGLBTN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_timectrl.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_timectrl.h new file mode 100644 index 0000000000..d04b1bf123 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_timectrl.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_timectrl.h +// Purpose: XML resource handler for wxTimePickerCtrl +// Author: Vadim Zeitlin +// Created: 2011-09-22 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_TIMECTRL_H_ +#define _WX_XH_TIMECTRL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_TIMEPICKCTRL + +class WXDLLIMPEXP_XRC wxTimeCtrlXmlHandler : public wxXmlResourceHandler +{ +public: + wxTimeCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + wxDECLARE_DYNAMIC_CLASS(wxTimeCtrlXmlHandler); +}; + +#endif // wxUSE_XRC && wxUSE_TIMEPICKCTRL + +#endif // _WX_XH_TIMECTRL_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_toolb.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_toolb.h new file mode 100644 index 0000000000..6b936dcb29 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_toolb.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_toolb.h +// Purpose: XML resource handler for wxToolBar +// Author: Vaclav Slavik +// Created: 2000/08/11 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_TOOLB_H_ +#define _WX_XH_TOOLB_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_TOOLBAR + +class WXDLLIMPEXP_FWD_CORE wxToolBar; + +class WXDLLIMPEXP_XRC wxToolBarXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxToolBarXmlHandler) + +public: + wxToolBarXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxToolBar *m_toolbar; + wxSize m_toolSize; +}; + +#endif // wxUSE_XRC && wxUSE_TOOLBAR + +#endif // _WX_XH_TOOLB_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_toolbk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_toolbk.h new file mode 100644 index 0000000000..16aa174d67 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_toolbk.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_toolbk.h +// Purpose: XML resource handler for wxToolbook +// Author: Andrea Zanellato +// Created: 2009/12/12 +// Copyright: (c) 2010 wxWidgets development team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_TOOLBK_H_ +#define _WX_XH_TOOLBK_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_TOOLBOOK + +class WXDLLIMPEXP_FWD_CORE wxToolbook; + +class WXDLLIMPEXP_XRC wxToolbookXmlHandler : public wxXmlResourceHandler +{ +public: + wxToolbookXmlHandler(); + + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxToolbook *m_toolbook; + + wxDECLARE_DYNAMIC_CLASS(wxToolbookXmlHandler); +}; + +#endif // wxUSE_XRC && wxUSE_TOOLBOOK + +#endif // _WX_XH_TOOLBK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_tree.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_tree.h new file mode 100644 index 0000000000..aa1b633b51 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_tree.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_tree.h +// Purpose: XML resource handler for wxTreeCtrl +// Author: Brian Gavin +// Created: 2000/09/09 +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_TREE_H_ +#define _WX_XH_TREE_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_TREECTRL + +class WXDLLIMPEXP_XRC wxTreeCtrlXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxTreeCtrlXmlHandler) + +public: + wxTreeCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC && wxUSE_TREECTRL + +#endif // _WX_XH_TREE_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_treebk.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_treebk.h new file mode 100644 index 0000000000..f5f11342f1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_treebk.h @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_treebk.h +// Purpose: XML resource handler for wxTreebook +// Author: Evgeniy Tarassov +// Created: 2005/09/28 +// Copyright: (c) 2005 TT-Solutions +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_TREEBK_H_ +#define _WX_XH_TREEBK_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_TREEBOOK + +class WXDLLIMPEXP_FWD_CORE wxTreebook; +#include "wx/dynarray.h" + +WX_DEFINE_USER_EXPORTED_ARRAY_SIZE_T(size_t, wxArrayTbkPageIndexes, + class WXDLLIMPEXP_XRC); + +// --------------------------------------------------------------------- +// wxTreebookXmlHandler class +// --------------------------------------------------------------------- +// Resource xml structure have to be almost the "same" as for wxNotebook +// except the additional (size_t)depth parameter for treebookpage nodes +// which indicates the depth of the page in the tree. +// There is only one logical constraint on this parameter : +// it cannot be greater than the previous page depth plus one +class WXDLLIMPEXP_XRC wxTreebookXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxTreebookXmlHandler) + +public: + wxTreebookXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + wxTreebook *m_tbk; + wxArrayTbkPageIndexes m_treeContext; + bool m_isInside; +}; + + +// Example: +// ------- +// Label +// \--First +// | \--Second +// \--Third +// +// +// ... +// +// +// +// +// 0 +// +// +// +// +// 1 +// +// +// +// +// 2 +// +// +// +// +// 1 +// +// +// ... +// + +#endif // wxUSE_XRC && wxUSE_TREEBOOK + +#endif // _WX_XH_TREEBK_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_unkwn.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_unkwn.h new file mode 100644 index 0000000000..e417b4d39a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_unkwn.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_unkwn.h +// Purpose: XML resource handler for unknown widget +// Author: Vaclav Slavik +// Created: 2000/03/05 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_UNKWN_H_ +#define _WX_XH_UNKWN_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC + +class WXDLLIMPEXP_XRC wxUnknownWidgetXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxUnknownWidgetXmlHandler) + +public: + wxUnknownWidgetXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // wxUSE_XRC + +#endif // _WX_XH_UNKWN_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_wizrd.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_wizrd.h new file mode 100644 index 0000000000..486cf5d963 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xh_wizrd.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_wizrd.h +// Purpose: XML resource handler for wxWizard +// Author: Vaclav Slavik +// Created: 2003/03/02 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_WIZRD_H_ +#define _WX_XH_WIZRD_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_WIZARDDLG + +class WXDLLIMPEXP_FWD_ADV wxWizard; +class WXDLLIMPEXP_FWD_ADV wxWizardPageSimple; + +class WXDLLIMPEXP_XRC wxWizardXmlHandler : public wxXmlResourceHandler +{ + DECLARE_DYNAMIC_CLASS(wxWizardXmlHandler) + +public: + wxWizardXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + wxWizard *m_wizard; + wxWizardPageSimple *m_lastSimplePage; +}; + +#endif // wxUSE_XRC && wxUSE_WIZARDDLG + +#endif // _WX_XH_WIZRD_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xmlres.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xmlres.h new file mode 100644 index 0000000000..8924bcc391 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xmlres.h @@ -0,0 +1,647 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xmlres.h +// Purpose: XML resources +// Author: Vaclav Slavik +// Created: 2000/03/05 +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XMLRES_H_ +#define _WX_XMLRES_H_ + +#include "wx/defs.h" + +#if wxUSE_XRC + +#include "wx/string.h" +#include "wx/dynarray.h" +#include "wx/arrstr.h" +#include "wx/datetime.h" +#include "wx/list.h" +#include "wx/gdicmn.h" +#include "wx/filesys.h" +#include "wx/bitmap.h" +#include "wx/icon.h" +#include "wx/artprov.h" +#include "wx/colour.h" +#include "wx/vector.h" + +#include "wx/xrc/xmlreshandler.h" + +class WXDLLIMPEXP_FWD_BASE wxFileName; + +class WXDLLIMPEXP_FWD_CORE wxIconBundle; +class WXDLLIMPEXP_FWD_CORE wxImageList; +class WXDLLIMPEXP_FWD_CORE wxMenu; +class WXDLLIMPEXP_FWD_CORE wxMenuBar; +class WXDLLIMPEXP_FWD_CORE wxDialog; +class WXDLLIMPEXP_FWD_CORE wxPanel; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxFrame; +class WXDLLIMPEXP_FWD_CORE wxToolBar; + +class WXDLLIMPEXP_FWD_XML wxXmlDocument; +class WXDLLIMPEXP_FWD_XML wxXmlNode; +class WXDLLIMPEXP_FWD_XRC wxXmlSubclassFactory; +class wxXmlSubclassFactories; +class wxXmlResourceModule; +class wxXmlResourceDataRecords; + +// These macros indicate current version of XML resources (this information is +// encoded in root node of XRC file as "version" property). +// +// Rules for increasing version number: +// - change it only if you made incompatible change to the format. Addition +// of new attribute to control handler is _not_ incompatible change, because +// older versions of the library may ignore it. +// - if you change version number, follow these steps: +// - set major, minor and release numbers to respective version numbers of +// the wxWidgets library (see wx/version.h) +// - reset revision to 0 unless the first three are same as before, +// in which case you should increase revision by one +#define WX_XMLRES_CURRENT_VERSION_MAJOR 2 +#define WX_XMLRES_CURRENT_VERSION_MINOR 5 +#define WX_XMLRES_CURRENT_VERSION_RELEASE 3 +#define WX_XMLRES_CURRENT_VERSION_REVISION 0 +#define WX_XMLRES_CURRENT_VERSION_STRING wxT("2.5.3.0") + +#define WX_XMLRES_CURRENT_VERSION \ + (WX_XMLRES_CURRENT_VERSION_MAJOR * 256*256*256 + \ + WX_XMLRES_CURRENT_VERSION_MINOR * 256*256 + \ + WX_XMLRES_CURRENT_VERSION_RELEASE * 256 + \ + WX_XMLRES_CURRENT_VERSION_REVISION) + +enum wxXmlResourceFlags +{ + wxXRC_USE_LOCALE = 1, + wxXRC_NO_SUBCLASSING = 2, + wxXRC_NO_RELOADING = 4 +}; + +// This class holds XML resources from one or more .xml files +// (or derived forms, either binary or zipped -- see manual for +// details). +class WXDLLIMPEXP_XRC wxXmlResource : public wxObject +{ +public: + // Constructor. + // Flags: wxXRC_USE_LOCALE + // translatable strings will be translated via _() + // using the given domain if specified + // wxXRC_NO_SUBCLASSING + // subclass property of object nodes will be ignored + // (useful for previews in XRC editors) + // wxXRC_NO_RELOADING + // don't check the modification time of the XRC files and + // reload them if they have changed on disk + wxXmlResource(int flags = wxXRC_USE_LOCALE, + const wxString& domain = wxEmptyString); + + // Constructor. + // Flags: wxXRC_USE_LOCALE + // translatable strings will be translated via _() + // using the given domain if specified + // wxXRC_NO_SUBCLASSING + // subclass property of object nodes will be ignored + // (useful for previews in XRC editors) + wxXmlResource(const wxString& filemask, int flags = wxXRC_USE_LOCALE, + const wxString& domain = wxEmptyString); + + // Destructor. + virtual ~wxXmlResource(); + + // Loads resources from XML files that match given filemask. + // This method understands wxFileSystem URLs if wxUSE_FILESYS. + bool Load(const wxString& filemask); + + // Loads resources from single XRC file. + bool LoadFile(const wxFileName& file); + + // Loads all XRC files from a directory. + bool LoadAllFiles(const wxString& dirname); + + // Unload resource from the given XML file (wildcards not allowed) + bool Unload(const wxString& filename); + + // Initialize handlers for all supported controls/windows. This will + // make the executable quite big because it forces linking against + // most of the wxWidgets library. + void InitAllHandlers(); + + // Initialize only a specific handler (or custom handler). Convention says + // that handler name is equal to the control's name plus 'XmlHandler', for + // example wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. The XML resource + // compiler (xmlres) can create include file that contains initialization + // code for all controls used within the resource. + void AddHandler(wxXmlResourceHandler *handler); + + // Add a new handler at the beginning of the handler list + void InsertHandler(wxXmlResourceHandler *handler); + + // Removes all handlers + void ClearHandlers(); + + // Registers subclasses factory for use in XRC. This function is not meant + // for public use, please see the comment above wxXmlSubclassFactory + // definition. + static void AddSubclassFactory(wxXmlSubclassFactory *factory); + + // Loads menu from resource. Returns NULL on failure. + wxMenu *LoadMenu(const wxString& name); + + // Loads menubar from resource. Returns NULL on failure. + wxMenuBar *LoadMenuBar(wxWindow *parent, const wxString& name); + + // Loads menubar from resource. Returns NULL on failure. + wxMenuBar *LoadMenuBar(const wxString& name) { return LoadMenuBar(NULL, name); } + +#if wxUSE_TOOLBAR + // Loads a toolbar. + wxToolBar *LoadToolBar(wxWindow *parent, const wxString& name); +#endif + + // Loads a dialog. dlg points to parent window (if any). + wxDialog *LoadDialog(wxWindow *parent, const wxString& name); + + // Loads a dialog. dlg points to parent window (if any). This form + // is used to finish creation of already existing instance (main reason + // for this is that you may want to use derived class with new event table) + // Example (typical usage): + // MyDialog dlg; + // wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog"); + // dlg->ShowModal(); + bool LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name); + + // Loads a panel. panel points to parent window (if any). + wxPanel *LoadPanel(wxWindow *parent, const wxString& name); + + // Loads a panel. panel points to parent window (if any). This form + // is used to finish creation of already existing instance. + bool LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name); + + // Loads a frame. + wxFrame *LoadFrame(wxWindow* parent, const wxString& name); + bool LoadFrame(wxFrame* frame, wxWindow *parent, const wxString& name); + + // Load an object from the resource specifying both the resource name and + // the classname. This lets you load nonstandard container windows. + wxObject *LoadObject(wxWindow *parent, const wxString& name, + const wxString& classname) + { + return DoLoadObject(parent, name, classname, false /* !recursive */); + } + + // Load an object from the resource specifying both the resource name and + // the classname. This form lets you finish the creation of an existing + // instance. + bool LoadObject(wxObject *instance, + wxWindow *parent, + const wxString& name, + const wxString& classname) + { + return DoLoadObject(instance, parent, name, classname, false); + } + + // These versions of LoadObject() look for the object with the given name + // recursively (breadth first) and can be used to instantiate an individual + // control defined anywhere in an XRC file. No check is done that the name + // is unique, it's up to the caller to ensure this. + wxObject *LoadObjectRecursively(wxWindow *parent, + const wxString& name, + const wxString& classname) + { + return DoLoadObject(parent, name, classname, true /* recursive */); + } + + bool LoadObjectRecursively(wxObject *instance, + wxWindow *parent, + const wxString& name, + const wxString& classname) + { + return DoLoadObject(instance, parent, name, classname, true); + } + + // Loads a bitmap resource from a file. + wxBitmap LoadBitmap(const wxString& name); + + // Loads an icon resource from a file. + wxIcon LoadIcon(const wxString& name); + + // Attaches an unknown control to the given panel/window/dialog. + // Unknown controls are used in conjunction with . + bool AttachUnknownControl(const wxString& name, wxWindow *control, + wxWindow *parent = NULL); + + // Returns a numeric ID that is equivalent to the string ID used in an XML + // resource. If an unknown str_id is requested (i.e. other than wxID_XXX + // or integer), a new record is created which associates the given string + // with a number. If value_if_not_found == wxID_NONE, the number is obtained via + // wxWindow::NewControlId(). Otherwise value_if_not_found is used. + // Macro XRCID(name) is provided for convenient use in event tables. + static int GetXRCID(const wxString& str_id, int value_if_not_found = wxID_NONE) + { return DoGetXRCID(str_id.mb_str(), value_if_not_found); } + + // version for internal use only + static int DoGetXRCID(const char *str_id, int value_if_not_found = wxID_NONE); + + + // Find the string ID with the given numeric value, returns an empty string + // if no such ID is found. + // + // Notice that unlike GetXRCID(), which is fast, this operation is slow as + // it checks all the IDs used in XRC. + static wxString FindXRCIDById(int numId); + + + // Returns version information (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a). + long GetVersion() const { return m_version; } + + // Compares resources version to argument. Returns -1 if resources version + // is less than the argument, +1 if greater and 0 if they equal. + int CompareVersion(int major, int minor, int release, int revision) const + { + long diff = GetVersion() - + (major*256*256*256 + minor*256*256 + release*256 + revision); + if ( diff < 0 ) + return -1; + else if ( diff > 0 ) + return +1; + else + return 0; + } + + //// Singleton accessors. + + // Gets the global resources object or creates one if none exists. + static wxXmlResource *Get(); + + // Sets the global resources object and returns a pointer to the previous one (may be NULL). + static wxXmlResource *Set(wxXmlResource *res); + + // Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING. + int GetFlags() const { return m_flags; } + // Set flags after construction. + void SetFlags(int flags) { m_flags = flags; } + + // Get/Set the domain to be passed to the translation functions, defaults + // to empty string (no domain). + const wxString& GetDomain() const { return m_domain; } + void SetDomain(const wxString& domain); + + + // This function returns the wxXmlNode containing the definition of the + // object with the given name or NULL. + // + // It can be used to access additional information defined in the XRC file + // and not used by wxXmlResource itself. + const wxXmlNode *GetResourceNode(const wxString& name) const + { return GetResourceNodeAndLocation(name, wxString(), true); } + +protected: + // reports input error at position 'context' + void ReportError(const wxXmlNode *context, const wxString& message); + + // override this in derived class to customize errors reporting + virtual void DoReportError(const wxString& xrcFile, const wxXmlNode *position, + const wxString& message); + + // Load the contents of a single file and returns its contents as a new + // wxXmlDocument (which will be owned by caller) on success or NULL. + wxXmlDocument *DoLoadFile(const wxString& file); + + // Scans the resources list for unloaded files and loads them. Also reloads + // files that have been modified since last loading. + bool UpdateResources(); + + + // Common implementation of GetResourceNode() and FindResource(): searches + // all top-level or all (if recursive == true) nodes if all loaded XRC + // files and returns the node, if found, as well as the path of the file it + // was found in if path is non-NULL + wxXmlNode *GetResourceNodeAndLocation(const wxString& name, + const wxString& classname, + bool recursive = false, + wxString *path = NULL) const; + + + // Note that these functions are used outside of wxWidgets itself, e.g. + // there are several known cases of inheriting from wxXmlResource just to + // be able to call FindResource() so we keep them for compatibility even if + // their names are not really consistent with GetResourceNode() public + // function and FindResource() is also non-const because it changes the + // current path of m_curFileSystem to ensure that relative paths work + // correctly when CreateResFromNode() is called immediately afterwards + // (something const public function intentionally does not do) + + // Returns the node containing the resource with the given name and class + // name unless it's empty (then any class matches) or NULL if not found. + wxXmlNode *FindResource(const wxString& name, const wxString& classname, + bool recursive = false); + + // Helper function used by FindResource() to look under the given node. + wxXmlNode *DoFindResource(wxXmlNode *parent, const wxString& name, + const wxString& classname, bool recursive) const; + + // Creates a resource from information in the given node + // (Uses only 'handlerToUse' if != NULL) + wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, + wxObject *instance = NULL, + wxXmlResourceHandler *handlerToUse = NULL) + { + return node ? DoCreateResFromNode(*node, parent, instance, handlerToUse) + : NULL; + } + + // Helper of Load() and Unload(): returns the URL corresponding to the + // given file if it's indeed a file, otherwise returns the original string + // unmodified + static wxString ConvertFileNameToURL(const wxString& filename); + + // loading resources from archives is impossible without wxFileSystem +#if wxUSE_FILESYSTEM + // Another helper: detect if the filename is a ZIP or XRS file + static bool IsArchive(const wxString& filename); +#endif // wxUSE_FILESYSTEM + +private: + wxXmlResourceDataRecords& Data() { return *m_data; } + const wxXmlResourceDataRecords& Data() const { return *m_data; } + + // the real implementation of CreateResFromNode(): this should be only + // called if node is non-NULL + wxObject *DoCreateResFromNode(wxXmlNode& node, + wxObject *parent, + wxObject *instance, + wxXmlResourceHandler *handlerToUse = NULL); + + // common part of LoadObject() and LoadObjectRecursively() + wxObject *DoLoadObject(wxWindow *parent, + const wxString& name, + const wxString& classname, + bool recursive); + bool DoLoadObject(wxObject *instance, + wxWindow *parent, + const wxString& name, + const wxString& classname, + bool recursive); + +private: + long m_version; + + int m_flags; + wxVector m_handlers; + wxXmlResourceDataRecords *m_data; +#if wxUSE_FILESYSTEM + wxFileSystem m_curFileSystem; + wxFileSystem& GetCurFileSystem() { return m_curFileSystem; } +#endif + + // domain to pass to translation functions, if any. + wxString m_domain; + + friend class wxXmlResourceHandlerImpl; + friend class wxXmlResourceModule; + friend class wxIdRangeManager; + friend class wxIdRange; + + static wxXmlSubclassFactories *ms_subclassFactories; + + // singleton instance: + static wxXmlResource *ms_instance; +}; + + +// This macro translates string identifier (as used in XML resource, +// e.g. ...) to integer id that is needed by +// wxWidgets event tables. +// Example: +// BEGIN_EVENT_TABLE(MyFrame, wxFrame) +// EVT_MENU(XRCID("quit"), MyFrame::OnQuit) +// EVT_MENU(XRCID("about"), MyFrame::OnAbout) +// EVT_MENU(XRCID("new"), MyFrame::OnNew) +// EVT_MENU(XRCID("open"), MyFrame::OnOpen) +// END_EVENT_TABLE() + +#define XRCID(str_id) \ + wxXmlResource::DoGetXRCID(str_id) + + +// This macro returns pointer to particular control in dialog +// created using XML resources. You can use it to set/get values from +// controls. +// Example: +// wxDialog dlg; +// wxXmlResource::Get()->LoadDialog(&dlg, mainFrame, "my_dialog"); +// XRCCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value")); + +#define XRCCTRL(window, id, type) \ + (wxStaticCast((window).FindWindow(XRCID(id)), type)) + +// This macro returns pointer to sizer item +// Example: +// +// +// 400, 300 +// +// +// wxSizerItem* item = XRCSIZERITEM(*this, "area") + +#define XRCSIZERITEM(window, id) \ + ((window).GetSizer() ? (window).GetSizer()->GetItemById(XRCID(id)) : NULL) + + +// wxXmlResourceHandlerImpl is the back-end of the wxXmlResourceHander class to +// really implementing all its functionality. It is defined in the "xrc" +// library unlike wxXmlResourceHandler itself which is defined in "core" to +// allow inheriting from it in the code from the other libraries too. + +class WXDLLIMPEXP_XRC wxXmlResourceHandlerImpl : public wxXmlResourceHandlerImplBase +{ +public: + // Constructor. + wxXmlResourceHandlerImpl(wxXmlResourceHandler *handler); + + // Destructor. + virtual ~wxXmlResourceHandlerImpl() {} + + // Creates an object (menu, dialog, control, ...) from an XML node. + // Should check for validity. + // parent is a higher-level object (usually window, dialog or panel) + // that is often necessary to create the resource. + // If instance is non-NULL it should not create a new instance via 'new' but + // should rather use this one, and call its Create method. + wxObject *CreateResource(wxXmlNode *node, wxObject *parent, + wxObject *instance); + + + // --- Handy methods: + + // Returns true if the node has a property class equal to classname, + // e.g. . + bool IsOfClass(wxXmlNode *node, const wxString& classname) const; + + // Gets node content from wxXML_ENTITY_NODE + // The problem is, content is represented as + // wxXML_ENTITY_NODE name="tag", content="" + // |-- wxXML_TEXT_NODE or + // wxXML_CDATA_SECTION_NODE name="" content="content" + wxString GetNodeContent(const wxXmlNode *node); + + // Check to see if a parameter exists. + bool HasParam(const wxString& param); + + // Finds the node or returns NULL. + wxXmlNode *GetParamNode(const wxString& param); + + // Finds the parameter value or returns the empty string. + wxString GetParamValue(const wxString& param); + + // Returns the parameter value from given node. + wxString GetParamValue(const wxXmlNode* node); + + // Gets style flags from text in form "flag | flag2| flag3 |..." + // Only understands flags added with AddStyle + int GetStyle(const wxString& param = wxT("style"), int defaults = 0); + + // Gets text from param and does some conversions: + // - replaces \n, \r, \t by respective chars (according to C syntax) + // - replaces _ by & and __ by _ (needed for _File => &File because of XML) + // - calls wxGetTranslations (unless disabled in wxXmlResource) + wxString GetText(const wxString& param, bool translate = true); + + // Returns the XRCID. + int GetID(); + + // Returns the resource name. + wxString GetName(); + + // Gets a bool flag (1, t, yes, on, true are true, everything else is false). + bool GetBool(const wxString& param, bool defaultv = false); + + // Gets an integer value from the parameter. + long GetLong(const wxString& param, long defaultv = 0); + + // Gets a float value from the parameter. + float GetFloat(const wxString& param, float defaultv = 0); + + // Gets colour in HTML syntax (#RRGGBB). + wxColour GetColour(const wxString& param, const wxColour& defaultv = wxNullColour); + + // Gets the size (may be in dialog units). + wxSize GetSize(const wxString& param = wxT("size"), + wxWindow *windowToUse = NULL); + + // Gets the position (may be in dialog units). + wxPoint GetPosition(const wxString& param = wxT("pos")); + + // Gets a dimension (may be in dialog units). + wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0, + wxWindow *windowToUse = NULL); + + // Gets a direction, complains if the value is invalid. + wxDirection GetDirection(const wxString& param, wxDirection dirDefault = wxLEFT); + + // Gets a bitmap. + wxBitmap GetBitmap(const wxString& param = wxT("bitmap"), + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize); + + // Gets a bitmap from an XmlNode. + wxBitmap GetBitmap(const wxXmlNode* node, + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize); + + // Gets an icon. + wxIcon GetIcon(const wxString& param = wxT("icon"), + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize); + + // Gets an icon from an XmlNode. + wxIcon GetIcon(const wxXmlNode* node, + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize); + + // Gets an icon bundle. + wxIconBundle GetIconBundle(const wxString& param, + const wxArtClient& defaultArtClient = wxART_OTHER); + + // Gets an image list. + wxImageList *GetImageList(const wxString& param = wxT("imagelist")); + +#if wxUSE_ANIMATIONCTRL + // Gets an animation. + wxAnimation* GetAnimation(const wxString& param = wxT("animation")); +#endif + + // Gets a font. + wxFont GetFont(const wxString& param = wxT("font"), wxWindow* parent = NULL); + + // Gets the value of a boolean attribute (only "0" and "1" are valid values) + bool GetBoolAttr(const wxString& attr, bool defaultv); + + + // Sets common window options. + void SetupWindow(wxWindow *wnd); + + // Creates children. + void CreateChildren(wxObject *parent, bool this_hnd_only = false); + + // Helper function. + void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL); + + // Creates a resource from a node. + wxObject *CreateResFromNode(wxXmlNode *node, + wxObject *parent, wxObject *instance = NULL); + + // helper +#if wxUSE_FILESYSTEM + wxFileSystem& GetCurFileSystem(); +#endif + + // reports input error at position 'context' + void ReportError(wxXmlNode *context, const wxString& message); + // reports input error at m_node + void ReportError(const wxString& message); + // reports input error when parsing parameter with given name + void ReportParamError(const wxString& param, const wxString& message); +}; + + +// Programmer-friendly macros for writing XRC handlers: + +#define XRC_MAKE_INSTANCE(variable, classname) \ + classname *variable = NULL; \ + if (m_instance) \ + variable = wxStaticCast(m_instance, classname); \ + if (!variable) \ + variable = new classname; + + +// FIXME -- remove this $%^#$%#$@# as soon as Ron checks his changes in!! +WXDLLIMPEXP_XRC void wxXmlInitResourceModule(); + + +// This class is used to create instances of XRC "object" nodes with "subclass" +// property. It is _not_ supposed to be used by XRC users, you should instead +// register your subclasses via wxWidgets' RTTI mechanism. This class is useful +// only for language bindings developer who need a way to implement subclassing +// in wxWidgets ports that don't support wxRTTI (e.g. wxPython). +class WXDLLIMPEXP_XRC wxXmlSubclassFactory +{ +public: + // Try to create instance of given class and return it, return NULL on + // failure: + virtual wxObject *Create(const wxString& className) = 0; + virtual ~wxXmlSubclassFactory() {} +}; + + +/* ------------------------------------------------------------------------- + Backward compatibility macros. Do *NOT* use, they may disappear in future + versions of the XRC library! + ------------------------------------------------------------------------- */ + +#endif // wxUSE_XRC + +#endif // _WX_XMLRES_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xmlreshandler.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xmlreshandler.h new file mode 100644 index 0000000000..7aa12b7bc6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xrc/xmlreshandler.h @@ -0,0 +1,389 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xmlreshandler.cpp +// Purpose: XML resource handler +// Author: Steven Lamerton +// Created: 2011/01/26 +// RCS-ID: $id$ +// Copyright: (c) 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XRC_XMLRESHANDLER_H_ +#define _WX_XRC_XMLRESHANDLER_H_ + +#include "wx/defs.h" + +#if wxUSE_XRC + +#include "wx/string.h" +#include "wx/artprov.h" +#include "wx/colour.h" +#include "wx/filesys.h" +#include "wx/imaglist.h" +#include "wx/window.h" + +class WXDLLIMPEXP_FWD_ADV wxAnimation; + +class WXDLLIMPEXP_FWD_XML wxXmlNode; +class WXDLLIMPEXP_FWD_XML wxXmlResource; + +class WXDLLIMPEXP_FWD_CORE wxXmlResourceHandler; + +// Helper macro used by the classes derived from wxXmlResourceHandler but also +// by wxXmlResourceHandler implementation itself. +#define XRC_ADD_STYLE(style) AddStyle(wxT(#style), style) + +// Abstract base class for the implementation object used by +// wxXmlResourceHandlerImpl. The real implementation is in +// wxXmlResourceHandlerImpl class in the "xrc" library while this class is in +// the "core" itself -- but it is so small that it doesn't matter. + +class WXDLLIMPEXP_CORE wxXmlResourceHandlerImplBase : public wxObject +{ +public: + // Constructor. + wxXmlResourceHandlerImplBase(wxXmlResourceHandler *handler) + : m_handler(handler) + {} + + // Destructor. + virtual ~wxXmlResourceHandlerImplBase() {} + + virtual wxObject *CreateResource(wxXmlNode *node, wxObject *parent, + wxObject *instance) = 0; + virtual bool IsOfClass(wxXmlNode *node, const wxString& classname) const = 0; + virtual wxString GetNodeContent(const wxXmlNode *node) = 0; + virtual bool HasParam(const wxString& param) = 0; + virtual wxXmlNode *GetParamNode(const wxString& param) = 0; + virtual wxString GetParamValue(const wxString& param) = 0; + virtual wxString GetParamValue(const wxXmlNode* node) = 0; + virtual int GetStyle(const wxString& param = wxT("style"), int defaults = 0) = 0; + virtual wxString GetText(const wxString& param, bool translate = true) = 0; + virtual int GetID() = 0; + virtual wxString GetName() = 0; + virtual bool GetBool(const wxString& param, bool defaultv = false) = 0; + virtual long GetLong(const wxString& param, long defaultv = 0) = 0; + virtual float GetFloat(const wxString& param, float defaultv = 0) = 0; + virtual wxColour GetColour(const wxString& param, + const wxColour& defaultv = wxNullColour) = 0; + virtual wxSize GetSize(const wxString& param = wxT("size"), + wxWindow *windowToUse = NULL) = 0; + virtual wxPoint GetPosition(const wxString& param = wxT("pos")) = 0; + virtual wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0, + wxWindow *windowToUse = NULL) = 0; + virtual wxDirection GetDirection(const wxString& param, wxDirection dir = wxLEFT) = 0; + virtual wxBitmap GetBitmap(const wxString& param = wxT("bitmap"), + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize) = 0; + virtual wxBitmap GetBitmap(const wxXmlNode* node, + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize) = 0; + virtual wxIcon GetIcon(const wxString& param = wxT("icon"), + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize) = 0; + virtual wxIcon GetIcon(const wxXmlNode* node, + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize) = 0; + virtual wxIconBundle GetIconBundle(const wxString& param, + const wxArtClient& defaultArtClient = wxART_OTHER) = 0; + virtual wxImageList *GetImageList(const wxString& param = wxT("imagelist")) = 0; + +#if wxUSE_ANIMATIONCTRL + virtual wxAnimation* GetAnimation(const wxString& param = wxT("animation")) = 0; +#endif + + virtual wxFont GetFont(const wxString& param = wxT("font"), wxWindow* parent = NULL) = 0; + virtual bool GetBoolAttr(const wxString& attr, bool defaultv) = 0; + virtual void SetupWindow(wxWindow *wnd) = 0; + virtual void CreateChildren(wxObject *parent, bool this_hnd_only = false) = 0; + virtual void CreateChildrenPrivately(wxObject *parent, + wxXmlNode *rootnode = NULL) = 0; + virtual wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, + wxObject *instance = NULL) = 0; + +#if wxUSE_FILESYSTEM + virtual wxFileSystem& GetCurFileSystem() = 0; +#endif + virtual void ReportError(wxXmlNode *context, const wxString& message) = 0; + virtual void ReportError(const wxString& message) = 0; + virtual void ReportParamError(const wxString& param, const wxString& message) = 0; + + wxXmlResourceHandler* GetHandler() { return m_handler; } + +protected: + wxXmlResourceHandler *m_handler; +}; + +// Base class for all XRC handlers. +// +// Notice that this class is defined in the core library itself and so can be +// used as the base class by classes in any GUI library. However to actually be +// usable, it needs to be registered with wxXmlResource which implies linking +// the application with the xrc library. +// +// Also note that all the methods forwarding to GetImpl() are documented only +// in wxXmlResourceHandlerImpl in wx/xrc/xmlres.h to avoid duplication. + +class WXDLLIMPEXP_CORE wxXmlResourceHandler : public wxObject +{ +public: + // Constructor creates an unusable object, before anything can be done with + // it, SetImpl() needs to be called as done by wxXmlResource::AddHandler(). + wxXmlResourceHandler() + { + m_node = NULL; + m_parent = + m_instance = NULL; + m_parentAsWindow = NULL; + m_resource = NULL; + + m_impl = NULL; + } + + // This should be called exactly once. + void SetImpl(wxXmlResourceHandlerImplBase* impl) + { + wxASSERT_MSG( !m_impl, wxS("Should be called exactly once") ); + + m_impl = impl; + } + + + // Destructor. + virtual ~wxXmlResourceHandler() + { + delete m_impl; + } + + wxObject *CreateResource(wxXmlNode *node, wxObject *parent, + wxObject *instance) + { + return GetImpl()->CreateResource(node, parent, instance); + } + + // This one is called from CreateResource after variables + // were filled. + virtual wxObject *DoCreateResource() = 0; + + // Returns true if it understands this node and can create + // a resource from it, false otherwise. + virtual bool CanHandle(wxXmlNode *node) = 0; + + + void SetParentResource(wxXmlResource *res) + { + m_resource = res; + } + + + // These methods are not forwarded to wxXmlResourceHandlerImpl because they + // are called from the derived classes ctors and so before SetImpl() can be + // called. + + // Add a style flag (e.g. wxMB_DOCKABLE) to the list of flags + // understood by this handler. + void AddStyle(const wxString& name, int value); + + // Add styles common to all wxWindow-derived classes. + void AddWindowStyles(); + +protected: + // Everything else is simply forwarded to wxXmlResourceHandlerImpl. + void ReportError(wxXmlNode *context, const wxString& message) + { + GetImpl()->ReportError(context, message); + } + void ReportError(const wxString& message) + { + GetImpl()->ReportError(message); + } + void ReportParamError(const wxString& param, const wxString& message) + { + GetImpl()->ReportParamError(param, message); + } + + bool IsOfClass(wxXmlNode *node, const wxString& classname) const + { + return GetImpl()->IsOfClass(node, classname); + } + wxString GetNodeContent(const wxXmlNode *node) + { + return GetImpl()->GetNodeContent(node); + } + bool HasParam(const wxString& param) + { + return GetImpl()->HasParam(param); + } + + wxXmlNode *GetParamNode(const wxString& param) + { + return GetImpl()->GetParamNode(param); + } + wxString GetParamValue(const wxString& param) + { + return GetImpl()->GetParamValue(param); + } + wxString GetParamValue(const wxXmlNode* node) + { + return GetImpl()->GetParamValue(node); + } + int GetStyle(const wxString& param = wxT("style"), int defaults = 0) + { + return GetImpl()->GetStyle(param, defaults); + } + wxString GetText(const wxString& param, bool translate = true) + { + return GetImpl()->GetText(param, translate); + } + int GetID() const + { + return GetImpl()->GetID(); + } + wxString GetName() + { + return GetImpl()->GetName(); + } + bool GetBool(const wxString& param, bool defaultv = false) + { + return GetImpl()->GetBool(param, defaultv); + } + long GetLong(const wxString& param, long defaultv = 0) + { + return GetImpl()->GetLong(param, defaultv); + } + float GetFloat(const wxString& param, float defaultv = 0) + { + return GetImpl()->GetFloat(param, defaultv); + } + wxColour GetColour(const wxString& param, + const wxColour& defaultv = wxNullColour) + { + return GetImpl()->GetColour(param, defaultv); + } + wxSize GetSize(const wxString& param = wxT("size"), + wxWindow *windowToUse = NULL) + { + return GetImpl()->GetSize(param, windowToUse); + } + wxPoint GetPosition(const wxString& param = wxT("pos")) + { + return GetImpl()->GetPosition(param); + } + wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0, + wxWindow *windowToUse = NULL) + { + return GetImpl()->GetDimension(param, defaultv, windowToUse); + } + wxDirection GetDirection(const wxString& param, wxDirection dir = wxLEFT) + { + return GetImpl()->GetDirection(param, dir); + } + wxBitmap GetBitmap(const wxString& param = wxT("bitmap"), + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize) + { + return GetImpl()->GetBitmap(param, defaultArtClient, size); + } + wxBitmap GetBitmap(const wxXmlNode* node, + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize) + { + return GetImpl()->GetBitmap(node, defaultArtClient, size); + } + wxIcon GetIcon(const wxString& param = wxT("icon"), + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize) + { + return GetImpl()->GetIcon(param, defaultArtClient, size); + } + wxIcon GetIcon(const wxXmlNode* node, + const wxArtClient& defaultArtClient = wxART_OTHER, + wxSize size = wxDefaultSize) + { + return GetImpl()->GetIcon(node, defaultArtClient, size); + } + wxIconBundle GetIconBundle(const wxString& param, + const wxArtClient& defaultArtClient = wxART_OTHER) + { + return GetImpl()->GetIconBundle(param, defaultArtClient); + } + wxImageList *GetImageList(const wxString& param = wxT("imagelist")) + { + return GetImpl()->GetImageList(param); + } + +#if wxUSE_ANIMATIONCTRL + wxAnimation* GetAnimation(const wxString& param = wxT("animation")) + { + return GetImpl()->GetAnimation(param); + } +#endif + + wxFont GetFont(const wxString& param = wxT("font"), + wxWindow* parent = NULL) + { + return GetImpl()->GetFont(param, parent); + } + bool GetBoolAttr(const wxString& attr, bool defaultv) + { + return GetImpl()->GetBoolAttr(attr, defaultv); + } + void SetupWindow(wxWindow *wnd) + { + GetImpl()->SetupWindow(wnd); + } + void CreateChildren(wxObject *parent, bool this_hnd_only = false) + { + GetImpl()->CreateChildren(parent, this_hnd_only); + } + void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL) + { + GetImpl()->CreateChildrenPrivately(parent, rootnode); + } + wxObject *CreateResFromNode(wxXmlNode *node, + wxObject *parent, wxObject *instance = NULL) + { + return GetImpl()->CreateResFromNode(node, parent, instance); + } + +#if wxUSE_FILESYSTEM + wxFileSystem& GetCurFileSystem() + { + return GetImpl()->GetCurFileSystem(); + } +#endif + + // Variables (filled by CreateResource) + wxXmlNode *m_node; + wxString m_class; + wxObject *m_parent, *m_instance; + wxWindow *m_parentAsWindow; + wxXmlResource *m_resource; + + // provide method access to those member variables + wxXmlResource* GetResource() const { return m_resource; } + wxXmlNode* GetNode() const { return m_node; } + wxString GetClass() const { return m_class; } + wxObject* GetParent() const { return m_parent; } + wxObject* GetInstance() const { return m_instance; } + wxWindow* GetParentAsWindow() const { return m_parentAsWindow; } + + + wxArrayString m_styleNames; + wxArrayInt m_styleValues; + + friend class wxXmlResourceHandlerImpl; + +private: + // This is supposed to never return NULL because SetImpl() should have been + // called. + wxXmlResourceHandlerImplBase* GetImpl() const; + + wxXmlResourceHandlerImplBase *m_impl; + + wxDECLARE_ABSTRACT_CLASS(wxXmlResourceHandler); +}; + +#endif // wxUSE_XRC + +#endif // _WX_XRC_XMLRESHANDLER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xti.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xti.h new file mode 100644 index 0000000000..75f594f494 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xti.h @@ -0,0 +1,469 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xti.h +// Purpose: runtime metadata information (extended class info) +// Author: Stefan Csomor +// Modified by: Francesco Montorsi +// Created: 27/07/03 +// Copyright: (c) 1997 Julian Smart +// (c) 2003 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XTIH__ +#define _WX_XTIH__ + +// We want to support properties, event sources and events sinks through +// explicit declarations, using templates and specialization to make the +// effort as painless as possible. +// +// This means we have the following domains : +// +// - Type Information for categorizing built in types as well as custom types +// this includes information about enums, their values and names +// - Type safe value storage : a kind of wxVariant, called right now wxAny +// which will be merged with wxVariant +// - Property Information and Property Accessors providing access to a class' +// values and exposed event delegates +// - Information about event handlers +// - extended Class Information for accessing all these + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_EXTENDED_RTTI + +class WXDLLIMPEXP_FWD_BASE wxAny; +class WXDLLIMPEXP_FWD_BASE wxAnyList; +class WXDLLIMPEXP_FWD_BASE wxObject; +class WXDLLIMPEXP_FWD_BASE wxString; +class WXDLLIMPEXP_FWD_BASE wxClassInfo; +class WXDLLIMPEXP_FWD_BASE wxHashTable; +class WXDLLIMPEXP_FWD_BASE wxObject; +class WXDLLIMPEXP_FWD_BASE wxPluginLibrary; +class WXDLLIMPEXP_FWD_BASE wxHashTable; +class WXDLLIMPEXP_FWD_BASE wxHashTable_Node; + +class WXDLLIMPEXP_FWD_BASE wxStringToAnyHashMap; +class WXDLLIMPEXP_FWD_BASE wxPropertyInfoMap; +class WXDLLIMPEXP_FWD_BASE wxPropertyAccessor; +class WXDLLIMPEXP_FWD_BASE wxObjectAllocatorAndCreator; +class WXDLLIMPEXP_FWD_BASE wxObjectAllocator; + + +#define wx_dynamic_cast(t, x) dynamic_cast(x) + +#include "wx/xtitypes.h" +#include "wx/xtihandler.h" + +// ---------------------------------------------------------------------------- +// wxClassInfo +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxObjectFunctor +{ +public: + virtual ~wxObjectFunctor(); + + // Invoke the actual event handler: + virtual void operator()(const wxObject *) = 0; +}; + +class WXDLLIMPEXP_FWD_BASE wxPropertyInfo; +class WXDLLIMPEXP_FWD_BASE wxHandlerInfo; + +typedef wxObject *(*wxObjectConstructorFn)(void); +typedef wxPropertyInfo *(*wxPropertyInfoFn)(void); +typedef wxHandlerInfo *(*wxHandlerInfoFn)(void); +typedef void (*wxVariantToObjectConverter)( const wxAny &data, wxObjectFunctor* fn ); +typedef wxObject* (*wxVariantToObjectPtrConverter) ( const wxAny& data); +typedef wxAny (*wxObjectToVariantConverter)( wxObject* ); + +WXDLLIMPEXP_BASE wxString wxAnyGetAsString( const wxAny& data); +WXDLLIMPEXP_BASE const wxObject* wxAnyGetAsObjectPtr( const wxAny& data); + +class WXDLLIMPEXP_BASE wxObjectWriter; +class WXDLLIMPEXP_BASE wxObjectWriterCallback; + +typedef bool (*wxObjectStreamingCallback) ( const wxObject *, wxObjectWriter *, \ + wxObjectWriterCallback *, const wxStringToAnyHashMap & ); + + + +class WXDLLIMPEXP_BASE wxClassInfo +{ + friend class WXDLLIMPEXP_BASE wxPropertyInfo; + friend class /* WXDLLIMPEXP_BASE */ wxHandlerInfo; + friend wxObject *wxCreateDynamicObject(const wxString& name); + +public: + wxClassInfo(const wxClassInfo **_Parents, + const wxChar *_UnitName, + const wxChar *_ClassName, + int size, + wxObjectConstructorFn ctor, + wxPropertyInfoFn _Props, + wxHandlerInfoFn _Handlers, + wxObjectAllocatorAndCreator* _Constructor, + const wxChar ** _ConstructorProperties, + const int _ConstructorPropertiesCount, + wxVariantToObjectPtrConverter _PtrConverter1, + wxVariantToObjectConverter _Converter2, + wxObjectToVariantConverter _Converter3, + wxObjectStreamingCallback _streamingCallback = NULL) : + m_className(_ClassName), + m_objectSize(size), + m_objectConstructor(ctor), + m_next(sm_first), + m_firstPropertyFn(_Props), + m_firstHandlerFn(_Handlers), + m_firstProperty(NULL), + m_firstHandler(NULL), + m_firstInited(false), + m_parents(_Parents), + m_unitName(_UnitName), + m_constructor(_Constructor), + m_constructorProperties(_ConstructorProperties), + m_constructorPropertiesCount(_ConstructorPropertiesCount), + m_variantOfPtrToObjectConverter(_PtrConverter1), + m_variantToObjectConverter(_Converter2), + m_objectToVariantConverter(_Converter3), + m_streamingCallback(_streamingCallback) + { + sm_first = this; + Register(); + } + + wxClassInfo(const wxChar *_UnitName, const wxChar *_ClassName, + const wxClassInfo **_Parents) : + m_className(_ClassName), + m_objectSize(0), + m_objectConstructor(NULL), + m_next(sm_first), + m_firstPropertyFn(NULL), + m_firstHandlerFn(NULL), + m_firstProperty(NULL), + m_firstHandler(NULL), + m_firstInited(true), + m_parents(_Parents), + m_unitName(_UnitName), + m_constructor(NULL), + m_constructorProperties(NULL), + m_constructorPropertiesCount(0), + m_variantOfPtrToObjectConverter(NULL), + m_variantToObjectConverter(NULL), + m_objectToVariantConverter(NULL), + m_streamingCallback(NULL) + { + sm_first = this; + Register(); + } + + // ctor compatible with old RTTI system + wxClassInfo(const wxChar *_ClassName, + const wxClassInfo *_Parent1, + const wxClassInfo *_Parent2, + int size, + wxObjectConstructorFn ctor) : + m_className(_ClassName), + m_objectSize(size), + m_objectConstructor(ctor), + m_next(sm_first), + m_firstPropertyFn(NULL), + m_firstHandlerFn(NULL), + m_firstProperty(NULL), + m_firstHandler(NULL), + m_firstInited(true), + m_parents(NULL), + m_unitName(NULL), + m_constructor(NULL), + m_constructorProperties(NULL), + m_constructorPropertiesCount(0), + m_variantOfPtrToObjectConverter(NULL), + m_variantToObjectConverter(NULL), + m_objectToVariantConverter(NULL), + m_streamingCallback(NULL) + { + sm_first = this; + m_parents[0] = _Parent1; + m_parents[1] = _Parent2; + m_parents[2] = NULL; + Register(); + } + + virtual ~wxClassInfo(); + + // allocates an instance of this class, this object does not have to be + // initialized or fully constructed as this call will be followed by a call to Create + virtual wxObject *AllocateObject() const + { return m_objectConstructor ? (*m_objectConstructor)() : 0; } + + // 'old naming' for AllocateObject staying here for backward compatibility + wxObject *CreateObject() const { return AllocateObject(); } + + // direct construction call for classes that cannot construct instances via alloc/create + wxObject *ConstructObject(int ParamCount, wxAny *Params) const; + + bool NeedsDirectConstruction() const; + + const wxChar *GetClassName() const + { return m_className; } + const wxChar *GetBaseClassName1() const + { return m_parents[0] ? m_parents[0]->GetClassName() : NULL; } + const wxChar *GetBaseClassName2() const + { return (m_parents[0] && m_parents[1]) ? m_parents[1]->GetClassName() : NULL; } + + const wxClassInfo *GetBaseClass1() const + { return m_parents[0]; } + const wxClassInfo *GetBaseClass2() const + { return m_parents[0] ? m_parents[1] : NULL; } + + const wxChar *GetIncludeName() const + { return m_unitName; } + const wxClassInfo **GetParents() const + { return m_parents; } + int GetSize() const + { return m_objectSize; } + bool IsDynamic() const + { return (NULL != m_objectConstructor); } + + wxObjectConstructorFn GetConstructor() const + { return m_objectConstructor; } + const wxClassInfo *GetNext() const + { return m_next; } + + // statics: + + static void CleanUp(); + static wxClassInfo *FindClass(const wxString& className); + static const wxClassInfo *GetFirst() + { return sm_first; } + + + // Climb upwards through inheritance hierarchy. + // Dual inheritance is catered for. + + bool IsKindOf(const wxClassInfo *info) const; + + wxDECLARE_CLASS_INFO_ITERATORS(); + + // if there is a callback registered with that class it will be called + // before this object will be written to disk, it can veto streaming out + // this object by returning false, if this class has not registered a + // callback, the search will go up the inheritance tree if no callback has + // been registered true will be returned by default + bool BeforeWriteObject( const wxObject *obj, wxObjectWriter *streamer, + wxObjectWriterCallback *writercallback, const wxStringToAnyHashMap &metadata) const; + + // gets the streaming callback from this class or any superclass + wxObjectStreamingCallback GetStreamingCallback() const; + + // returns the first property + wxPropertyInfo* GetFirstProperty() const + { EnsureInfosInited(); return m_firstProperty; } + + // returns the first handler + wxHandlerInfo* GetFirstHandler() const + { EnsureInfosInited(); return m_firstHandler; } + + // Call the Create upon an instance of the class, in the end the object is fully + // initialized + virtual bool Create (wxObject *object, int ParamCount, wxAny *Params) const; + + // get number of parameters for constructor + virtual int GetCreateParamCount() const + { return m_constructorPropertiesCount; } + + // get n-th constructor parameter + virtual const wxChar* GetCreateParamName(int n) const + { return m_constructorProperties[n]; } + + // Runtime access to objects for simple properties (get/set) by property + // name and variant data + virtual void SetProperty (wxObject *object, const wxChar *propertyName, + const wxAny &value) const; + virtual wxAny GetProperty (wxObject *object, const wxChar *propertyName) const; + + // Runtime access to objects for collection properties by property name + virtual wxAnyList GetPropertyCollection(wxObject *object, + const wxChar *propertyName) const; + virtual void AddToPropertyCollection(wxObject *object, const wxChar *propertyName, + const wxAny& value) const; + + // we must be able to cast variants to wxObject pointers, templates seem + // not to be suitable + void CallOnAny( const wxAny &data, wxObjectFunctor* functor ) const; + + wxObject* AnyToObjectPtr( const wxAny &data) const; + + wxAny ObjectPtrToAny( wxObject *object ) const; + + // find property by name + virtual const wxPropertyInfo *FindPropertyInfo (const wxChar *PropertyName) const; + + // find handler by name + virtual const wxHandlerInfo *FindHandlerInfo (const wxChar *handlerName) const; + + // find property by name + virtual wxPropertyInfo *FindPropertyInfoInThisClass (const wxChar *PropertyName) const; + + // find handler by name + virtual wxHandlerInfo *FindHandlerInfoInThisClass (const wxChar *handlerName) const; + + // puts all the properties of this class and its superclasses in the map, + // as long as there is not yet an entry with the same name (overriding mechanism) + void GetProperties( wxPropertyInfoMap &map ) const; + +private: + const wxChar *m_className; + int m_objectSize; + wxObjectConstructorFn m_objectConstructor; + + // class info object live in a linked list: + // pointers to its head and the next element in it + + static wxClassInfo *sm_first; + wxClassInfo *m_next; + + static wxHashTable *sm_classTable; + + wxPropertyInfoFn m_firstPropertyFn; + wxHandlerInfoFn m_firstHandlerFn; + + +protected: + void EnsureInfosInited() const + { + if ( !m_firstInited) + { + if ( m_firstPropertyFn != NULL) + m_firstProperty = (*m_firstPropertyFn)(); + if ( m_firstHandlerFn != NULL) + m_firstHandler = (*m_firstHandlerFn)(); + m_firstInited = true; + } + } + mutable wxPropertyInfo* m_firstProperty; + mutable wxHandlerInfo* m_firstHandler; + +private: + mutable bool m_firstInited; + + const wxClassInfo** m_parents; + const wxChar* m_unitName; + + wxObjectAllocatorAndCreator* m_constructor; + const wxChar ** m_constructorProperties; + const int m_constructorPropertiesCount; + wxVariantToObjectPtrConverter m_variantOfPtrToObjectConverter; + wxVariantToObjectConverter m_variantToObjectConverter; + wxObjectToVariantConverter m_objectToVariantConverter; + wxObjectStreamingCallback m_streamingCallback; + + const wxPropertyAccessor *FindAccessor (const wxChar *propertyName) const; + +protected: + // registers the class + void Register(); + void Unregister(); + + DECLARE_NO_COPY_CLASS(wxClassInfo) +}; + +WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxString& name); + +// ---------------------------------------------------------------------------- +// wxDynamicClassInfo +// ---------------------------------------------------------------------------- + +// this object leads to having a pure runtime-instantiation + +class WXDLLIMPEXP_BASE wxDynamicClassInfo : public wxClassInfo +{ + friend class WXDLLIMPEXP_BASE wxDynamicObject; + +public: + wxDynamicClassInfo( const wxChar *_UnitName, const wxChar *_ClassName, + const wxClassInfo* superClass ); + virtual ~wxDynamicClassInfo(); + + // constructs a wxDynamicObject with an instance + virtual wxObject *AllocateObject() const; + + // Call the Create method for a class + virtual bool Create (wxObject *object, int ParamCount, wxAny *Params) const; + + // get number of parameters for constructor + virtual int GetCreateParamCount() const; + + // get i-th constructor parameter + virtual const wxChar* GetCreateParamName(int i) const; + + // Runtime access to objects by property name, and variant data + virtual void SetProperty (wxObject *object, const wxChar *PropertyName, + const wxAny &Value) const; + virtual wxAny GetProperty (wxObject *object, const wxChar *PropertyName) const; + + // adds a property to this class at runtime + void AddProperty( const wxChar *propertyName, const wxTypeInfo* typeInfo ); + + // removes an existing runtime-property + void RemoveProperty( const wxChar *propertyName ); + + // renames an existing runtime-property + void RenameProperty( const wxChar *oldPropertyName, const wxChar *newPropertyName ); + + // as a handler to this class at runtime + void AddHandler( const wxChar *handlerName, wxObjectEventFunction address, + const wxClassInfo* eventClassInfo ); + + // removes an existing runtime-handler + void RemoveHandler( const wxChar *handlerName ); + + // renames an existing runtime-handler + void RenameHandler( const wxChar *oldHandlerName, const wxChar *newHandlerName ); + +private: + struct wxDynamicClassInfoInternal; + wxDynamicClassInfoInternal* m_data; +}; + +// ---------------------------------------------------------------------------- +// wxDECLARE class macros +// ---------------------------------------------------------------------------- + +#define _DECLARE_DYNAMIC_CLASS(name) \ + public: \ + static wxClassInfo ms_classInfo; \ + static const wxClassInfo* ms_classParents[]; \ + static wxPropertyInfo* GetPropertiesStatic(); \ + static wxHandlerInfo* GetHandlersStatic(); \ + static wxClassInfo *GetClassInfoStatic() \ + { return &name::ms_classInfo; } \ + virtual wxClassInfo *GetClassInfo() const \ + { return &name::ms_classInfo; } + +#define wxDECLARE_DYNAMIC_CLASS(name) \ + static wxObjectAllocatorAndCreator* ms_constructor; \ + static const wxChar * ms_constructorProperties[]; \ + static const int ms_constructorPropertiesCount; \ + _DECLARE_DYNAMIC_CLASS(name) + +#define wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(name) \ + wxDECLARE_NO_ASSIGN_CLASS(name); \ + wxDECLARE_DYNAMIC_CLASS(name) + +#define wxDECLARE_DYNAMIC_CLASS_NO_COPY(name) \ + wxDECLARE_NO_COPY_CLASS(name); \ + wxDECLARE_DYNAMIC_CLASS(name) + +#define wxDECLARE_CLASS(name) \ + wxDECLARE_DYNAMIC_CLASS(name) + +#define wxDECLARE_ABSTRACT_CLASS(name) _DECLARE_DYNAMIC_CLASS(name) +#define wxCLASSINFO(name) (&name::ms_classInfo) + +#endif // wxUSE_EXTENDED_RTTI +#endif // _WX_XTIH__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xti2.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xti2.h new file mode 100644 index 0000000000..16e5f212f1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xti2.h @@ -0,0 +1,293 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/wxt2.h +// Purpose: runtime metadata information (extended class info) +// Author: Stefan Csomor +// Modified by: Francesco Montorsi +// Created: 27/07/03 +// Copyright: (c) 1997 Julian Smart +// (c) 2003 Stefan Csomor +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XTI2H__ +#define _WX_XTI2H__ + +// ---------------------------------------------------------------------------- +// second part of xti headers, is included from object.h +// ---------------------------------------------------------------------------- + +#if wxUSE_EXTENDED_RTTI + +// ---------------------------------------------------------------------------- +// wxDynamicObject class, its instances connect to a 'super class instance' +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxDynamicObject : public wxObject +{ + friend class WXDLLIMPEXP_FWD_BASE wxDynamicClassInfo ; +public: + // instantiates this object with an instance of its superclass + wxDynamicObject(wxObject* superClassInstance, const wxDynamicClassInfo *info) ; + virtual ~wxDynamicObject(); + + void SetProperty (const wxChar *propertyName, const wxAny &value); + wxAny GetProperty (const wxChar *propertyName) const ; + + // get the runtime identity of this object + wxClassInfo *GetClassInfo() const + { +#ifdef _MSC_VER + return (wxClassInfo*) m_classInfo; +#else + wxDynamicClassInfo *nonconst = const_cast(m_classInfo); + return static_cast(nonconst); +#endif + } + + wxObject* GetSuperClassInstance() const + { + return m_superClassInstance ; + } +private : + // removes an existing runtime-property + void RemoveProperty( const wxChar *propertyName ) ; + + // renames an existing runtime-property + void RenameProperty( const wxChar *oldPropertyName , const wxChar *newPropertyName ) ; + + wxObject *m_superClassInstance ; + const wxDynamicClassInfo *m_classInfo; + struct wxDynamicObjectInternal; + wxDynamicObjectInternal *m_data; +}; + +// ---------------------------------------------------------------------------- +// String conversion templates supporting older compilers +// ---------------------------------------------------------------------------- + +#if wxUSE_FUNC_TEMPLATE_POINTER +# define wxTO_STRING(type) wxToStringConverter +# define wxTO_STRING_IMP(type) +# define wxFROM_STRING(type) wxFromStringConverter +# define wxFROM_STRING_IMP(type) +#else +# define wxTO_STRING(type) ToString##type +# define wxTO_STRING_IMP(type) \ + inline void ToString##type( const wxAny& data, wxString &result ) \ +{ wxToStringConverter(data, result); } + +# define wxFROM_STRING(type) FromString##type +# define wxFROM_STRING_IMP(type) \ + inline void FromString##type( const wxString& data, wxAny &result ) \ +{ wxFromStringConverter(data, result); } +#endif + +#include "wx/xtiprop.h" +#include "wx/xtictor.h" + +// ---------------------------------------------------------------------------- +// wxIMPLEMENT class macros for concrete classes +// ---------------------------------------------------------------------------- + +// Single inheritance with one base class + +#define _DEFAULT_CONSTRUCTOR(name) \ +wxObject* wxConstructorFor##name() \ +{ return new name; } + +#define _DEFAULT_CONVERTERS(name) \ +wxObject* wxVariantOfPtrToObjectConverter##name ( const wxAny &data ) \ +{ return data.As( (name**)NULL ); } \ + wxAny wxObjectToVariantConverter##name ( wxObject *data ) \ +{ return wxAny( wx_dynamic_cast(name*, data) ); } + +#define _TYPEINFO_CLASSES(n, toString, fromString ) \ + wxClassTypeInfo s_typeInfo##n(wxT_OBJECT, &n::ms_classInfo, \ + toString, fromString, typeid(n).name()); \ + wxClassTypeInfo s_typeInfoPtr##n(wxT_OBJECT_PTR, &n::ms_classInfo, \ + toString, fromString, typeid(n*).name()); + +#define _IMPLEMENT_DYNAMIC_CLASS(name, basename, unit, callback) \ + _DEFAULT_CONSTRUCTOR(name) \ + _DEFAULT_CONVERTERS(name) \ + \ + const wxClassInfo* name::ms_classParents[] = \ +{ &basename::ms_classInfo, NULL }; \ + wxClassInfo name::ms_classInfo(name::ms_classParents, wxT(unit), \ + wxT(#name), (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name, \ + name::GetPropertiesStatic, name::GetHandlersStatic, name::ms_constructor, \ + name::ms_constructorProperties, name::ms_constructorPropertiesCount, \ + wxVariantOfPtrToObjectConverter##name, NULL, wxObjectToVariantConverter##name, \ + callback); + +#define _IMPLEMENT_DYNAMIC_CLASS_WITH_COPY(name, basename, unit, callback ) \ + _DEFAULT_CONSTRUCTOR(name) \ + _DEFAULT_CONVERTERS(name) \ + void wxVariantToObjectConverter##name ( const wxAny &data, wxObjectFunctor* fn ) \ + { name o = wxANY_AS(data, name); (*fn)( &o ); } \ + \ + const wxClassInfo* name::ms_classParents[] = { &basename::ms_classInfo,NULL }; \ + wxClassInfo name::ms_classInfo(name::ms_classParents, wxT(unit), \ + wxT(#name), (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name, \ + name::GetPropertiesStatic,name::GetHandlersStatic,name::ms_constructor, \ + name::ms_constructorProperties, name::ms_constructorPropertiesCount, \ + wxVariantOfPtrToObjectConverter##name, wxVariantToObjectConverter##name, \ + wxObjectToVariantConverter##name, callback); + +#define wxIMPLEMENT_DYNAMIC_CLASS_WITH_COPY( name, basename ) \ + _IMPLEMENT_DYNAMIC_CLASS_WITH_COPY( name, basename, "", NULL ) \ + _TYPEINFO_CLASSES(name, NULL, NULL) \ + const wxPropertyInfo *name::GetPropertiesStatic() \ +{ return (wxPropertyInfo*) NULL; } \ + const wxHandlerInfo *name::GetHandlersStatic() \ +{ return (wxHandlerInfo*) NULL; } \ + wxCONSTRUCTOR_DUMMY( name ) + +#define wxIMPLEMENT_DYNAMIC_CLASS( name, basename ) \ + _IMPLEMENT_DYNAMIC_CLASS( name, basename, "", NULL ) \ + _TYPEINFO_CLASSES(name, NULL, NULL) \ + wxPropertyInfo *name::GetPropertiesStatic() \ +{ return (wxPropertyInfo*) NULL; } \ + wxHandlerInfo *name::GetHandlersStatic() \ +{ return (wxHandlerInfo*) NULL; } \ + wxCONSTRUCTOR_DUMMY( name ) + +#define wxIMPLEMENT_DYNAMIC_CLASS_XTI( name, basename, unit ) \ + _IMPLEMENT_DYNAMIC_CLASS( name, basename, unit, NULL ) \ + _TYPEINFO_CLASSES(name, NULL, NULL) + +#define wxIMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK( name, basename, unit, callback )\ + _IMPLEMENT_DYNAMIC_CLASS( name, basename, unit, &callback ) \ + _TYPEINFO_CLASSES(name, NULL, NULL) + +#define wxIMPLEMENT_DYNAMIC_CLASS_WITH_COPY_XTI( name, basename, unit ) \ + _IMPLEMENT_DYNAMIC_CLASS_WITH_COPY( name, basename, unit, NULL ) \ + _TYPEINFO_CLASSES(name, NULL, NULL) + +#define wxIMPLEMENT_DYNAMIC_CLASS_WITH_COPY_AND_STREAMERS_XTI( name, basename, \ + unit, toString, \ + fromString ) \ + _IMPLEMENT_DYNAMIC_CLASS_WITH_COPY( name, basename, unit, NULL ) \ + _TYPEINFO_CLASSES(name, toString, fromString) + +// this is for classes that do not derive from wxObject, there are no creators for these + +#define wxIMPLEMENT_DYNAMIC_CLASS_NO_WXOBJECT_NO_BASE_XTI( name, unit ) \ + const wxClassInfo* name::ms_classParents[] = { NULL }; \ + wxClassInfo name::ms_classInfo(name::ms_classParents, wxEmptyString, \ + wxT(#name), (int) sizeof(name), (wxObjectConstructorFn) 0, \ + name::GetPropertiesStatic,name::GetHandlersStatic, 0, 0, \ + 0, 0, 0 ); \ + _TYPEINFO_CLASSES(name, NULL, NULL) + +// this is for subclasses that still do not derive from wxObject + +#define wxIMPLEMENT_DYNAMIC_CLASS_NO_WXOBJECT_XTI( name, basename, unit ) \ + const wxClassInfo* name::ms_classParents[] = { &basename::ms_classInfo, NULL }; \ + wxClassInfo name::ms_classInfo(name::ms_classParents, wxEmptyString, \ + wxT(#name), (int) sizeof(name), (wxObjectConstructorFn) 0, \ + name::GetPropertiesStatic,name::GetHandlersStatic, 0, 0, \ + 0, 0, 0 ); \ + _TYPEINFO_CLASSES(name, NULL, NULL) + + +// Multiple inheritance with two base classes + +#define _IMPLEMENT_DYNAMIC_CLASS2(name, basename, basename2, unit, callback) \ + _DEFAULT_CONSTRUCTOR(name) \ + _DEFAULT_CONVERTERS(name) \ + \ + const wxClassInfo* name::ms_classParents[] = \ +{ &basename::ms_classInfo,&basename2::ms_classInfo, NULL }; \ + wxClassInfo name::ms_classInfo(name::ms_classParents, wxT(unit), \ + wxT(#name), (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name, \ + name::GetPropertiesStatic,name::GetHandlersStatic,name::ms_constructor, \ + name::ms_constructorProperties, name::ms_constructorPropertiesCount, \ + wxVariantOfPtrToObjectConverter##name, NULL, wxObjectToVariantConverter##name, \ + callback); + +#define wxIMPLEMENT_DYNAMIC_CLASS2( name, basename, basename2) \ + _IMPLEMENT_DYNAMIC_CLASS2( name, basename, basename2, "", NULL) \ + _TYPEINFO_CLASSES(name, NULL, NULL) \ + wxPropertyInfo *name::GetPropertiesStatic() { return (wxPropertyInfo*) NULL; } \ + wxHandlerInfo *name::GetHandlersStatic() { return (wxHandlerInfo*) NULL; } \ + wxCONSTRUCTOR_DUMMY( name ) + +#define wxIMPLEMENT_DYNAMIC_CLASS2_XTI( name, basename, basename2, unit) \ + _IMPLEMENT_DYNAMIC_CLASS2( name, basename, basename2, unit, NULL) \ + _TYPEINFO_CLASSES(name, NULL, NULL) + + + +// ---------------------------------------------------------------------------- +// wxIMPLEMENT class macros for abstract classes +// ---------------------------------------------------------------------------- + +// Single inheritance with one base class + +#define _IMPLEMENT_ABSTRACT_CLASS(name, basename) \ + _DEFAULT_CONVERTERS(name) \ + \ + const wxClassInfo* name::ms_classParents[] = \ +{ &basename::ms_classInfo,NULL }; \ + wxClassInfo name::ms_classInfo(name::ms_classParents, wxEmptyString, \ + wxT(#name), (int) sizeof(name), (wxObjectConstructorFn) 0, \ + name::GetPropertiesStatic,name::GetHandlersStatic, 0, 0, \ + 0, wxVariantOfPtrToObjectConverter##name,0, \ + wxObjectToVariantConverter##name); \ + _TYPEINFO_CLASSES(name, NULL, NULL) + +#define wxIMPLEMENT_ABSTRACT_CLASS( name, basename ) \ + _IMPLEMENT_ABSTRACT_CLASS( name, basename ) \ + wxHandlerInfo *name::GetHandlersStatic() { return (wxHandlerInfo*) NULL; } \ + wxPropertyInfo *name::GetPropertiesStatic() { return (wxPropertyInfo*) NULL; } + +// Multiple inheritance with two base classes + +#define wxIMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \ + wxClassInfo name::ms_classInfo(wxT(#name), wxT(#basename1), \ + wxT(#basename2), (int) sizeof(name), \ + (wxObjectConstructorFn) 0); + +// templated streaming, every type that can be converted to wxString +// must have their specialization for these methods + +template +void wxStringReadValue( const wxString &s, T &data ); + +template +void wxStringWriteValue( wxString &s, const T &data); + +template +void wxToStringConverter( const wxAny &v, wxString &s ) +{ wxStringWriteValue(s, wxANY_AS(v, T)); } + +template +void wxFromStringConverter( const wxString &s, wxAny &v) +{ T d; wxStringReadValue(s, d); v = wxAny(d); } + +// -------------------------------------------------------------------------- +// Collection Support +// -------------------------------------------------------------------------- + +template void wxListCollectionToAnyList( + const collection_t& coll, wxAnyList &value ) +{ + for ( iter current = coll.GetFirst(); current; + current = current->GetNext() ) + { + value.Append( new wxAny(current->GetData()) ); + } +} + +template void wxArrayCollectionToVariantArray( + const collection_t& coll, wxAnyList &value ) +{ + for( size_t i = 0; i < coll.GetCount(); i++ ) + { + value.Append( new wxAny(coll[i]) ); + } +} + +#endif + +#endif // _WX_XTIH2__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtictor.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtictor.h new file mode 100644 index 0000000000..6969463f38 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtictor.h @@ -0,0 +1,509 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xtictor.h +// Purpose: XTI constructors +// Author: Stefan Csomor +// Modified by: Francesco Montorsi +// Created: 27/07/03 +// Copyright: (c) 1997 Julian Smart +// (c) 2003 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _XTICTOR_H_ +#define _XTICTOR_H_ + +#include "wx/defs.h" + +#if wxUSE_EXTENDED_RTTI + +#include "wx/xti.h" + +// ---------------------------------------------------------------------------- +// Constructor Bridges +// ---------------------------------------------------------------------------- + +// A constructor bridge allows to call a ctor with an arbitrary number +// or parameters during runtime +class WXDLLIMPEXP_BASE wxObjectAllocatorAndCreator +{ +public: + virtual ~wxObjectAllocatorAndCreator() { } + virtual bool Create(wxObject * &o, wxAny *args) = 0; +}; + +// a direct constructor bridge calls the operator new for this class and +// passes all params to the constructor. Needed for classes that cannot be +// instantiated using alloc-create semantics +class WXDLLIMPEXP_BASE wxObjectAllocator : public wxObjectAllocatorAndCreator +{ +public: + virtual bool Create(wxObject * &o, wxAny *args) = 0; +}; + + +// ---------------------------------------------------------------------------- +// Constructor Bridges for all Numbers of Params +// ---------------------------------------------------------------------------- + +// no params + +template +struct wxObjectAllocatorAndCreator_0 : public wxObjectAllocatorAndCreator +{ + bool Create(wxObject * &o, wxAny *) + { + Class *obj = wx_dynamic_cast(Class*, o); + return obj->Create(); + } +}; + +struct wxObjectAllocatorAndCreator_Dummy : public wxObjectAllocatorAndCreator +{ + bool Create(wxObject *&, wxAny *) + { + return true; + } +}; + +#define wxCONSTRUCTOR_0(klass) \ + wxObjectAllocatorAndCreator_0 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = { NULL }; \ + const int klass::ms_constructorPropertiesCount = 0; + +#define wxCONSTRUCTOR_DUMMY(klass) \ + wxObjectAllocatorAndCreator_Dummy constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = { NULL }; \ + const int klass::ms_constructorPropertiesCount = 0; + +// direct constructor version + +template +struct wxDirectConstructorBridge_0 : public wxObjectAllocator +{ + bool Create(wxObject * &o, wxAny *args) + { + o = new Class( ); + return o != NULL; + } +}; + +#define wxDIRECT_CONSTRUCTOR_0(klass) \ + wxDirectConstructorBridge_0 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = { NULL }; \ + const int klass::ms_constructorPropertiesCount = 0; + + +// 1 param + +template +struct wxObjectAllocatorAndCreator_1 : public wxObjectAllocatorAndCreator +{ + bool Create(wxObject * &o, wxAny *args) + { + Class *obj = wx_dynamic_cast(Class*, o); + return obj->Create( + (args[0]).As(static_cast(NULL)) + ); + } +}; + +#define wxCONSTRUCTOR_1(klass,t0,v0) \ + wxObjectAllocatorAndCreator_1 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = { wxT(#v0) }; \ + const int klass::ms_constructorPropertiesCount = 1; + +// direct constructor version + +template +struct wxDirectConstructorBridge_1 : public wxObjectAllocator +{ + bool Create(wxObject * &o, wxAny *args) + { + o = new Class( + (args[0]).As(static_cast(NULL)) + ); + return o != NULL; + } +}; + +#define wxDIRECT_CONSTRUCTOR_1(klass,t0,v0) \ + wxDirectConstructorBridge_1 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = { wxT(#v0) }; \ + const int klass::ms_constructorPropertiesCount = 1; + + +// 2 params + +template +struct wxObjectAllocatorAndCreator_2 : public wxObjectAllocatorAndCreator +{ + bool Create(wxObject * &o, wxAny *args) + { + Class *obj = wx_dynamic_cast(Class*, o); + return obj->Create( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)) + ); + } +}; + +#define wxCONSTRUCTOR_2(klass,t0,v0,t1,v1) \ + wxObjectAllocatorAndCreator_2 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1) }; \ + const int klass::ms_constructorPropertiesCount = 2; + +// direct constructor version + +template +struct wxDirectConstructorBridge_2 : public wxObjectAllocator +{ + bool Create(wxObject * &o, wxAny *args) + { + o = new Class( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)) + ); + return o != NULL; + } +}; + +#define wxDIRECT_CONSTRUCTOR_2(klass,t0,v0,t1,v1) \ + wxDirectConstructorBridge_2 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1) }; \ + const int klass::ms_constructorPropertiesCount = 2; + + +// 3 params + +template +struct wxObjectAllocatorAndCreator_3 : public wxObjectAllocatorAndCreator +{ + bool Create(wxObject * &o, wxAny *args) + { + Class *obj = wx_dynamic_cast(Class*, o); + return obj->Create( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)) + ); + } +}; + +#define wxCONSTRUCTOR_3(klass,t0,v0,t1,v1,t2,v2) \ + wxObjectAllocatorAndCreator_3 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1), wxT(#v2) }; \ + const int klass::ms_constructorPropertiesCount = 3; + +// direct constructor version + +template +struct wxDirectConstructorBridge_3 : public wxObjectAllocator +{ + bool Create(wxObject * &o, wxAny *args) + { + o = new Class( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)) + ); + return o != NULL; + } +}; + +#define wxDIRECT_CONSTRUCTOR_3(klass,t0,v0,t1,v1,t2,v2) \ + wxDirectConstructorBridge_3 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1), wxT(#v2) }; \ + const int klass::ms_constructorPropertiesCount = 3; + + +// 4 params + +template +struct wxObjectAllocatorAndCreator_4 : public wxObjectAllocatorAndCreator +{ + bool Create(wxObject * &o, wxAny *args) + { + Class *obj = wx_dynamic_cast(Class*, o); + return obj->Create( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)), + (args[3]).As(static_cast(NULL)) + ); + } +}; + +#define wxCONSTRUCTOR_4(klass,t0,v0,t1,v1,t2,v2,t3,v3) \ + wxObjectAllocatorAndCreator_4 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = \ + { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3) }; \ + const int klass::ms_constructorPropertiesCount = 4; + +// direct constructor version + +template +struct wxDirectConstructorBridge_4 : public wxObjectAllocator +{ + bool Create(wxObject * &o, wxAny *args) + { + o = new Class( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)), + (args[3]).As(static_cast(NULL)) + ); + return o != NULL; + } +}; + +#define wxDIRECT_CONSTRUCTOR_4(klass,t0,v0,t1,v1,t2,v2,t3,v3) \ + wxDirectConstructorBridge_4 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = \ + { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3) }; \ + const int klass::ms_constructorPropertiesCount = 4; + + +// 5 params + +template +struct wxObjectAllocatorAndCreator_5 : public wxObjectAllocatorAndCreator +{ + bool Create(wxObject * &o, wxAny *args) + { + Class *obj = wx_dynamic_cast(Class*, o); + return obj->Create( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)), + (args[3]).As(static_cast(NULL)), + (args[4]).As(static_cast(NULL)) + ); + } +}; + +#define wxCONSTRUCTOR_5(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4) \ + wxObjectAllocatorAndCreator_5 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = \ + { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4) }; \ + const int klass::ms_constructorPropertiesCount = 5; + +// direct constructor version + +template +struct wxDirectConstructorBridge_5 : public wxObjectAllocator +{ + bool Create(wxObject * &o, wxAny *args) + { + o = new Class( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)), + (args[3]).As(static_cast(NULL)), + (args[4]).As(static_cast(NULL)) + ); + return o != NULL; + } +}; + +#define wxDIRECT_CONSTRUCTOR_5(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4) \ + wxDirectConstructorBridge_5 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = \ + { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4) }; \ + const int klass::ms_constructorPropertiesCount = 5; + + +// 6 params + +template +struct wxObjectAllocatorAndCreator_6 : public wxObjectAllocatorAndCreator +{ + bool Create(wxObject * &o, wxAny *args) + { + Class *obj = wx_dynamic_cast(Class*, o); + return obj->Create( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)), + (args[3]).As(static_cast(NULL)), + (args[4]).As(static_cast(NULL)), + (args[5]).As(static_cast(NULL)) + ); + } +}; + +#define wxCONSTRUCTOR_6(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5) \ + wxObjectAllocatorAndCreator_6 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = \ + { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5) }; \ + const int klass::ms_constructorPropertiesCount = 6; + +// direct constructor version + +template +struct wxDirectConstructorBridge_6 : public wxObjectAllocator +{ + bool Create(wxObject * &o, wxAny *args) + { + o = new Class( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)), + (args[3]).As(static_cast(NULL)), + (args[4]).As(static_cast(NULL)), + (args[5]).As(static_cast(NULL)) + ); + return o != NULL; + } +}; + +#define wxDIRECT_CONSTRUCTOR_6(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5) \ + wxDirectConstructorBridge_6 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1), \ + wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5) }; \ + const int klass::ms_constructorPropertiesCount = 6; + + +// 7 params + +template +struct wxObjectAllocatorAndCreator_7 : public wxObjectAllocatorAndCreator +{ + bool Create(wxObject * &o, wxAny *args) + { + Class *obj = wx_dynamic_cast(Class*, o); + return obj->Create( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)), + (args[3]).As(static_cast(NULL)), + (args[4]).As(static_cast(NULL)), + (args[5]).As(static_cast(NULL)), + (args[6]).As(static_cast(NULL)) + ); + } +}; + +#define wxCONSTRUCTOR_7(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6) \ + wxObjectAllocatorAndCreator_7 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1), \ + wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5), wxT(#v6) }; \ + const int klass::ms_constructorPropertiesCount = 7; + +// direct constructor version + +template +struct wxDirectConstructorBridge_7 : public wxObjectAllocator +{ + bool Create(wxObject * &o, wxAny *args) + { + o = new Class( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)), + (args[3]).As(static_cast(NULL)), + (args[4]).As(static_cast(NULL)), + (args[5]).As(static_cast(NULL)), + (args[6]).As(static_cast(NULL)) + ); + return o != NULL; + } +}; + +#define wxDIRECT_CONSTRUCTOR_7(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6) \ + wxDirectConstructorBridge_7 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = \ + { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5), wxT(#v6) }; \ + const int klass::ms_constructorPropertiesCount = 7; + + +// 8 params + +template +struct wxObjectAllocatorAndCreator_8 : public wxObjectAllocatorAndCreator +{ + bool Create(wxObject * &o, wxAny *args) + { + Class *obj = wx_dynamic_cast(Class*, o); + return obj->Create( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)), + (args[3]).As(static_cast(NULL)), + (args[4]).As(static_cast(NULL)), + (args[5]).As(static_cast(NULL)), + (args[6]).As(static_cast(NULL)), + (args[7]).As(static_cast(NULL)) + ); + } +}; + +#define wxCONSTRUCTOR_8(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6,t7,v7) \ + wxObjectAllocatorAndCreator_8 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = \ + { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5), wxT(#v6), wxT(#v7) }; \ + const int klass::ms_constructorPropertiesCount = 8; + +// direct constructor version + +template +struct wxDirectConstructorBridge_8 : public wxObjectAllocator +{ + bool Create(wxObject * &o, wxAny *args) + { + o = new Class( + (args[0]).As(static_cast(NULL)), + (args[1]).As(static_cast(NULL)), + (args[2]).As(static_cast(NULL)), + (args[3]).As(static_cast(NULL)), + (args[4]).As(static_cast(NULL)), + (args[5]).As(static_cast(NULL)), + (args[6]).As(static_cast(NULL)), + (args[7]).As(static_cast(NULL)) + ); + return o != NULL; + } +}; + +#define wxDIRECT_CONSTRUCTOR_8(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6,t7,v7) \ + wxDirectConstructorBridge_8 constructor##klass; \ + wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \ + const wxChar *klass::ms_constructorProperties[] = \ + { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5), wxT(#v6), wxT(#v7) }; \ + const int klass::ms_constructorPropertiesCount = 8; + +#endif // wxUSE_EXTENDED_RTTI +#endif // _XTICTOR_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtihandler.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtihandler.h new file mode 100644 index 0000000000..c63ddb3a36 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtihandler.h @@ -0,0 +1,112 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xtihandler.h +// Purpose: XTI handlers +// Author: Stefan Csomor +// Modified by: Francesco Montorsi +// Created: 27/07/03 +// Copyright: (c) 1997 Julian Smart +// (c) 2003 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _XTIHANDLER_H_ +#define _XTIHANDLER_H_ + +#include "wx/defs.h" + +#if wxUSE_EXTENDED_RTTI + +#include "wx/xti.h" + +// copied from event.h which cannot be included at this place + +class WXDLLIMPEXP_FWD_BASE wxEvent; + +#ifdef __VISUALC__ +#define wxMSVC_FWD_MULTIPLE_BASES __multiple_inheritance +#else +#define wxMSVC_FWD_MULTIPLE_BASES +#endif + +class WXDLLIMPEXP_FWD_BASE wxMSVC_FWD_MULTIPLE_BASES wxEvtHandler; +typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&); +typedef wxEventFunction wxObjectEventFunction; + +// ---------------------------------------------------------------------------- +// Handler Info +// +// this describes an event sink +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxHandlerInfo +{ + friend class WXDLLIMPEXP_BASE wxDynamicClassInfo; + +public: + wxHandlerInfo(wxHandlerInfo* &iter, + wxClassInfo* itsClass, + const wxString& name, + wxObjectEventFunction address, + const wxClassInfo* eventClassInfo) : + m_eventFunction(address), + m_name(name), + m_eventClassInfo(eventClassInfo), + m_itsClass(itsClass) + { + Insert(iter); + } + + ~wxHandlerInfo() + { Remove(); } + + // return the name of this handler + const wxString& GetName() const { return m_name; } + + // return the class info of the event + const wxClassInfo *GetEventClassInfo() const { return m_eventClassInfo; } + + // get the handler function pointer + wxObjectEventFunction GetEventFunction() const { return m_eventFunction; } + + // returns NULL if this is the last handler of this class + wxHandlerInfo* GetNext() const { return m_next; } + + // return the class this property is declared in + const wxClassInfo* GetDeclaringClass() const { return m_itsClass; } + +private: + + // inserts this handler at the end of the linked chain which begins + // with "iter" handler. + void Insert(wxHandlerInfo* &iter); + + // removes this handler from the linked chain of the m_itsClass handlers. + void Remove(); + + wxObjectEventFunction m_eventFunction; + wxString m_name; + const wxClassInfo* m_eventClassInfo; + wxHandlerInfo* m_next; + wxClassInfo* m_itsClass; +}; + +#define wxHANDLER(name,eventClassType) \ + static wxHandlerInfo _handlerInfo##name( first, class_t::GetClassInfoStatic(), \ + wxT(#name), (wxObjectEventFunction) (wxEventFunction) &name, \ + wxCLASSINFO( eventClassType ) ); + +#define wxBEGIN_HANDLERS_TABLE(theClass) \ + wxHandlerInfo *theClass::GetHandlersStatic() \ + { \ + typedef theClass class_t; \ + static wxHandlerInfo* first = NULL; + +#define wxEND_HANDLERS_TABLE() \ + return first; } + +#define wxEMPTY_HANDLERS_TABLE(theClass) \ + wxBEGIN_HANDLERS_TABLE(theClass) \ + wxEND_HANDLERS_TABLE() + +#endif // wxUSE_EXTENDED_RTTI +#endif // _XTIHANDLER_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtiprop.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtiprop.h new file mode 100644 index 0000000000..18626f2982 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtiprop.h @@ -0,0 +1,560 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xtiprop.h +// Purpose: XTI properties +// Author: Stefan Csomor +// Modified by: Francesco Montorsi +// Created: 27/07/03 +// Copyright: (c) 1997 Julian Smart +// (c) 2003 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _XTIPROP_H_ +#define _XTIPROP_H_ + +#include "wx/defs.h" + +#if wxUSE_EXTENDED_RTTI + +#include "wx/xti.h" +#include "wx/any.h" + +/* +class WXDLLIMPEXP_BASE wxObject; +class WXDLLIMPEXP_BASE wxClassInfo; +class WXDLLIMPEXP_BASE wxDynamicClassInfo; +*/ +class WXDLLIMPEXP_BASE wxHashTable; +class WXDLLIMPEXP_BASE wxHashTable_Node; +class WXDLLIMPEXP_BASE wxEvent; +class WXDLLIMPEXP_BASE wxEvtHandler; + +// ---------------------------------------------------------------------------- +// Property Accessors +// +// wxPropertySetter/Getter/CollectionGetter/CollectionAdder are all property +// accessors which are managed by wxPropertyAccessor class which in turn is +// handled by wxPropertyInfo. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxPropertySetter +{ +public: + wxPropertySetter( const wxString name ) { m_name = name; } + virtual ~wxPropertySetter() {} + + virtual void Set( wxObject *object, const wxAny &variantValue ) const = 0; + const wxString& GetName() const { return m_name; } + +private: + wxString m_name; +}; + +class WXDLLIMPEXP_BASE wxPropertyGetter +{ +public: + wxPropertyGetter( const wxString name ) { m_name = name; } + virtual ~wxPropertyGetter() {} + + virtual void Get( const wxObject *object, wxAny& result) const = 0; + const wxString& GetName() const { return m_name; } + +private: + wxString m_name; +}; + +class WXDLLIMPEXP_BASE wxPropertyCollectionGetter +{ +public: + wxPropertyCollectionGetter( const wxString name ) { m_name = name; } + virtual ~wxPropertyCollectionGetter() {} + + virtual void Get( const wxObject *object, wxAnyList& result) const = 0; + const wxString& GetName() const { return m_name; } + +private: + wxString m_name; +}; + +template void WXDLLIMPEXP_BASE \ + wxCollectionToVariantArray( const coll_t& coll, wxAnyList& result ); + +class WXDLLIMPEXP_BASE wxPropertyCollectionAdder +{ +public: + wxPropertyCollectionAdder( const wxString name ) { m_name = name; } + virtual ~wxPropertyCollectionAdder() {} + + virtual void Add( wxObject *object, const wxAny &variantValue ) const= 0; + const wxString& GetName() const { return m_name; } + +private: + wxString m_name; +}; + +#define wxPROPERTY_SETTER( property, Klass, valueType, setterMethod ) \ +class wxPropertySetter##property : public wxPropertySetter \ +{ \ +public: \ + wxINFUNC_CLASS_TYPE_FIX(Klass) \ + wxPropertySetter##property() : wxPropertySetter( wxT(#setterMethod) ) {} \ + virtual ~wxPropertySetter##property() {} \ + \ + void Set( wxObject *object, const wxAny &variantValue ) const \ + { \ + Klass *obj = dynamic_cast(object); \ + valueType tempobj; \ + if ( variantValue.GetAs(&tempobj) ) \ + obj->setterMethod(tempobj); \ + else \ + obj->setterMethod(*wxANY_AS(variantValue, valueType*)); \ + } \ +}; + +#define wxPROPERTY_GETTER( property, Klass, valueType, gettermethod ) \ +class wxPropertyGetter##property : public wxPropertyGetter \ +{ \ +public: \ + wxINFUNC_CLASS_TYPE_FIX(Klass) \ + wxPropertyGetter##property() : wxPropertyGetter( wxT(#gettermethod) ) {} \ + virtual ~wxPropertyGetter##property() {} \ + \ + void Get( const wxObject *object, wxAny &result) const \ + { \ + const Klass *obj = dynamic_cast(object); \ + result = wxAny( obj->gettermethod() ); \ + } \ +}; + +#define wxPROPERTY_COLLECTION_ADDER( property, Klass, valueType, addermethod ) \ +class wxPropertyCollectionAdder##property : public wxPropertyCollectionAdder \ +{ \ +public: \ + wxINFUNC_CLASS_TYPE_FIX(Klass) \ + wxPropertyCollectionAdder##property() : wxPropertyCollectionAdder( wxT(#addermethod) ) {} \ + virtual ~wxPropertyCollectionAdder##property() {} \ + \ + void Add( wxObject *object, const wxAny &variantValue ) const \ + { \ + Klass *obj = dynamic_cast(object); \ + valueType tempobj; \ + if ( variantValue.GetAs(&tempobj) ) \ + obj->addermethod(tempobj); \ + else \ + obj->addermethod(*wxANY_AS(variantValue, valueType*)); \ + } \ +}; + +#define wxPROPERTY_COLLECTION_GETTER( property, Klass, valueType, gettermethod ) \ +class wxPropertyCollectionGetter##property : public wxPropertyCollectionGetter \ +{ \ +public: \ + wxINFUNC_CLASS_TYPE_FIX(Klass) \ + wxPropertyCollectionGetter##property() : wxPropertyCollectionGetter( wxT(#gettermethod) ) {} \ + virtual ~wxPropertyCollectionGetter##property() {} \ + \ + void Get( const wxObject *object, wxAnyList &result) const \ + { \ + const Klass *obj = dynamic_cast(object); \ + wxCollectionToVariantArray( obj->gettermethod(), result ); \ + } \ +}; + +class WXDLLIMPEXP_BASE wxPropertyAccessor +{ +public: + wxPropertyAccessor( wxPropertySetter *setter, wxPropertyGetter *getter, + wxPropertyCollectionAdder *adder, wxPropertyCollectionGetter *collectionGetter ) + { m_setter = setter; m_getter = getter; m_adder = adder; + m_collectionGetter = collectionGetter; } + + virtual ~wxPropertyAccessor() {} + + // Setting a simple property (non-collection) + virtual void SetProperty(wxObject *object, const wxAny &value) const + { + if ( m_setter ) + m_setter->Set( object, value ); + else + wxLogError( wxGetTranslation("SetProperty called w/o valid setter") ); + } + + // Getting a simple property (non-collection) + virtual void GetProperty(const wxObject *object, wxAny &result) const + { + if ( m_getter ) + m_getter->Get( object, result ); + else + wxLogError( wxGetTranslation("GetProperty called w/o valid getter") ); + } + + // Adding an element to a collection property + virtual void AddToPropertyCollection(wxObject *object, const wxAny &value) const + { + if ( m_adder ) + m_adder->Add( object, value ); + else + wxLogError( wxGetTranslation("AddToPropertyCollection called w/o valid adder") ); + } + + // Getting a collection property + virtual void GetPropertyCollection( const wxObject *obj, wxAnyList &result) const + { + if ( m_collectionGetter ) + m_collectionGetter->Get( obj, result); + else + wxLogError( wxGetTranslation("GetPropertyCollection called w/o valid collection getter") ); + } + + virtual bool HasSetter() const { return m_setter != NULL; } + virtual bool HasCollectionGetter() const { return m_collectionGetter != NULL; } + virtual bool HasGetter() const { return m_getter != NULL; } + virtual bool HasAdder() const { return m_adder != NULL; } + + virtual const wxString& GetCollectionGetterName() const + { return m_collectionGetter->GetName(); } + virtual const wxString& GetGetterName() const + { return m_getter->GetName(); } + virtual const wxString& GetSetterName() const + { return m_setter->GetName(); } + virtual const wxString& GetAdderName() const + { return m_adder->GetName(); } + +protected: + wxPropertySetter *m_setter; + wxPropertyCollectionAdder *m_adder; + wxPropertyGetter *m_getter; + wxPropertyCollectionGetter* m_collectionGetter; +}; + +class WXDLLIMPEXP_BASE wxGenericPropertyAccessor : public wxPropertyAccessor +{ +public: + wxGenericPropertyAccessor( const wxString &propName ); + virtual ~wxGenericPropertyAccessor(); + + void RenameProperty( const wxString& WXUNUSED_UNLESS_DEBUG(oldName), + const wxString& newName ) + { + wxASSERT( oldName == m_propertyName ); m_propertyName = newName; + } + + virtual bool HasSetter() const { return true; } + virtual bool HasGetter() const { return true; } + virtual bool HasAdder() const { return false; } + virtual bool HasCollectionGetter() const { return false; } + + virtual const wxString& GetGetterName() const + { return m_getterName; } + virtual const wxString& GetSetterName() const + { return m_setterName; } + + virtual void SetProperty(wxObject *object, const wxAny &value) const; + virtual void GetProperty(const wxObject *object, wxAny &value) const; + + // Adding an element to a collection property + virtual void AddToPropertyCollection(wxObject *WXUNUSED(object), + const wxAny &WXUNUSED(value)) const + { + wxLogError( wxGetTranslation("AddToPropertyCollection called on a generic accessor") ); + } + + // Getting a collection property + virtual void GetPropertyCollection( const wxObject *WXUNUSED(obj), + wxAnyList &WXUNUSED(result)) const + { + wxLogError ( wxGetTranslation("GetPropertyCollection called on a generic accessor") ); + } + +private: + struct wxGenericPropertyAccessorInternal; + wxGenericPropertyAccessorInternal* m_data; + wxString m_propertyName; + wxString m_setterName; + wxString m_getterName; +}; + +typedef long wxPropertyInfoFlags; +enum +{ + // will be removed in future releases + wxPROP_DEPRECATED = 0x00000001, + + // object graph property, will be streamed with priority (after constructor properties) + wxPROP_OBJECT_GRAPH = 0x00000002, + + // this will only be streamed out and in as enum/set, the internal representation + // is still a long + wxPROP_ENUM_STORE_LONG = 0x00000004, + + // don't stream out this property, needed eg to avoid streaming out children + // that are always created by their parents + wxPROP_DONT_STREAM = 0x00000008 +}; + + +// ---------------------------------------------------------------------------- +// Property Support +// +// wxPropertyInfo is used to inquire of the property by name. It doesn't +// provide access to the property, only information about it. If you +// want access, look at wxPropertyAccessor. +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxPropertyInfo +{ + friend class /* WXDLLIMPEXP_BASE */ wxDynamicClassInfo; + +public: + wxPropertyInfo(wxPropertyInfo* &iter, + wxClassInfo* itsClass, + const wxString& name, + const wxString& typeName, + wxPropertyAccessor *accessor, + wxAny dv, + wxPropertyInfoFlags flags = 0, + const wxString& helpString = wxEmptyString, + const wxString& groupString = wxEmptyString) : + m_itsClass(itsClass), + m_name(name), + m_typeInfo(NULL), + m_typeName(typeName), + m_collectionElementTypeInfo(NULL), + m_accessor(accessor), + m_defaultValue(dv), + m_flags(flags), + m_helpString(helpString), + m_groupString(groupString) + { + Insert(iter); + } + + wxPropertyInfo(wxPropertyInfo* &iter, + wxClassInfo* itsClass, + const wxString& name, + wxEventSourceTypeInfo* type, + wxPropertyAccessor *accessor, + wxAny dv, + wxPropertyInfoFlags flags = 0, + const wxString& helpString = wxEmptyString, + const wxString& groupString = wxEmptyString) : + m_itsClass(itsClass), + m_name(name), + m_typeInfo(type), + m_collectionElementTypeInfo(NULL), + m_accessor(accessor), + m_defaultValue(dv), + m_flags(flags), + m_helpString(helpString), + m_groupString(groupString) + { + Insert(iter); + } + + wxPropertyInfo(wxPropertyInfo* &iter, + wxClassInfo* itsClass, const wxString& name, + const wxString& collectionTypeName, + const wxString& elementTypeName, + wxPropertyAccessor *accessor, + wxPropertyInfoFlags flags = 0, + const wxString& helpString = wxEmptyString, + const wxString& groupString = wxEmptyString) : + m_itsClass(itsClass), + m_name(name), + m_typeInfo(NULL), + m_typeName(collectionTypeName), + m_collectionElementTypeInfo(NULL), + m_collectionElementTypeName(elementTypeName), + m_accessor(accessor), + m_flags(flags), + m_helpString(helpString), + m_groupString(groupString) + { + Insert(iter); + } + + ~wxPropertyInfo() + { Remove(); } + + // return the class this property is declared in + const wxClassInfo* GetDeclaringClass() const { return m_itsClass; } + + // return the name of this property + const wxString& GetName() const { return m_name; } + + // returns the flags of this property + wxPropertyInfoFlags GetFlags() const { return m_flags; } + + // returns the short help string of this property + const wxString& GetHelpString() const { return m_helpString; } + + // returns the group string of this property + const wxString& GetGroupString() const { return m_groupString; } + + // return the element type info of this property (for collections, otherwise NULL) + const wxTypeInfo * GetCollectionElementTypeInfo() const + { + if ( m_collectionElementTypeInfo == NULL ) + m_collectionElementTypeInfo = wxTypeInfo::FindType(m_collectionElementTypeName); + return m_collectionElementTypeInfo; + } + + // return the type info of this property + const wxTypeInfo * GetTypeInfo() const + { + if ( m_typeInfo == NULL ) + m_typeInfo = wxTypeInfo::FindType(m_typeName); + return m_typeInfo; + } + + // return the accessor for this property + wxPropertyAccessor* GetAccessor() const { return m_accessor; } + + // returns NULL if this is the last property of this class + wxPropertyInfo* GetNext() const { return m_next; } + + // returns the default value of this property, its kind may be wxT_VOID if it is not valid + wxAny GetDefaultValue() const { return m_defaultValue; } + +private: + + // inserts this property at the end of the linked chain which begins + // with "iter" property. + void Insert(wxPropertyInfo* &iter); + + // removes this property from the linked chain of the m_itsClass properties. + void Remove(); + + wxClassInfo* m_itsClass; + wxString m_name; + mutable wxTypeInfo* m_typeInfo; + wxString m_typeName; + mutable wxTypeInfo* m_collectionElementTypeInfo; + wxString m_collectionElementTypeName; + wxPropertyAccessor* m_accessor; + wxAny m_defaultValue; + wxPropertyInfoFlags m_flags; + wxString m_helpString; + wxString m_groupString; + wxPropertyInfo* m_next; + + // FIXME: what's this comment about?? + // string representation of the default value + // to be assigned by the designer to the property + // when the component is dropped on the container. +}; + +// stl is giving problems when forwarding declarations, therefore we define it as a subclass + +WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxPropertyInfo*, wxPropertyInfoMapBase, + class WXDLLIMPEXP_BASE ); + +class WXDLLIMPEXP_BASE wxPropertyInfoMap : public wxPropertyInfoMapBase { +}; + +WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxAny, wxStringToAnyHashMapBase, + class WXDLLIMPEXP_BASE ); + +class WXDLLIMPEXP_FWD_BASE wxStringToAnyHashMap : public wxStringToAnyHashMapBase { +}; + +#define wxBEGIN_PROPERTIES_TABLE(theClass) \ + wxPropertyInfo *theClass::GetPropertiesStatic() \ + { \ + typedef theClass class_t; \ + static wxPropertyInfo* first = NULL; + +#define wxEND_PROPERTIES_TABLE() \ + return first; } + +#define wxHIDE_PROPERTY( pname ) \ + static wxPropertyInfo _propertyInfo##pname( first, class_t::GetClassInfoStatic(), \ + wxT(#pname), typeid(void).name(), NULL, wxAny(), wxPROP_DONT_STREAM, \ + wxEmptyString, wxEmptyString ); + +#define wxPROPERTY( pname, type, setter, getter, defaultValue, flags, help, group) \ + wxPROPERTY_SETTER( pname, class_t, type, setter ) \ + static wxPropertySetter##pname _setter##pname; \ + wxPROPERTY_GETTER( pname, class_t, type, getter ) \ + static wxPropertyGetter##pname _getter##pname; \ + static wxPropertyAccessor _accessor##pname( &_setter##pname, \ + &_getter##pname, NULL, NULL ); \ + static wxPropertyInfo _propertyInfo##pname( first, class_t::GetClassInfoStatic(), \ + wxT(#pname), typeid(type).name(), &_accessor##pname, \ + wxAny(defaultValue), flags, group, help ); + +#define wxPROPERTY_FLAGS( pname, flags, type, setter, getter,defaultValue, \ + pflags, help, group) \ + wxPROPERTY_SETTER( pname, class_t, type, setter ) \ + static wxPropertySetter##pname _setter##pname; \ + wxPROPERTY_GETTER( pname, class_t, type, getter ) \ + static wxPropertyGetter##pname _getter##pname; \ + static wxPropertyAccessor _accessor##pname( &_setter##pname, \ + &_getter##pname, NULL, NULL ); \ + static wxPropertyInfo _propertyInfo##pname( first, class_t::GetClassInfoStatic(), \ + wxT(#pname), typeid(flags).name(), &_accessor##pname, \ + wxAny(defaultValue), wxPROP_ENUM_STORE_LONG | pflags, help, group ); + +#define wxREADONLY_PROPERTY( pname, type, getter,defaultValue, flags, help, group) \ + wxPROPERTY_GETTER( pname, class_t, type, getter ) \ + static wxPropertyGetter##pname _getter##pname; \ + static wxPropertyAccessor _accessor##pname( NULL, &_getter##pname, NULL, NULL ); \ + static wxPropertyInfo _propertyInfo##pname( first, class_t::GetClassInfoStatic(), \ + wxT(#pname), typeid(type).name(),&_accessor##pname, \ + wxAny(defaultValue), flags, help, group ); + +#define wxREADONLY_PROPERTY_FLAGS( pname, flags, type, getter,defaultValue, \ + pflags, help, group) \ + wxPROPERTY_GETTER( pname, class_t, type, getter ) \ + static wxPropertyGetter##pname _getter##pname; \ + static wxPropertyAccessor _accessor##pname( NULL, &_getter##pname, NULL, NULL ); \ + static wxPropertyInfo _propertyInfo##pname( first, class_t::GetClassInfoStatic(), \ + wxT(#pname), typeid(flags).name(),&_accessor##pname, \ + wxAny(defaultValue), wxPROP_ENUM_STORE_LONG | pflags, help, group ); + +#define wxPROPERTY_COLLECTION( pname, colltype, addelemtype, adder, getter, \ + flags, help, group ) \ + wxPROPERTY_COLLECTION_ADDER( pname, class_t, addelemtype, adder ) \ + static wxPropertyCollectionAdder##pname _adder##pname; \ + wxPROPERTY_COLLECTION_GETTER( pname, class_t, colltype, getter ) \ + static wxPropertyCollectionGetter##pname _collectionGetter##pname; \ + static wxPropertyAccessor _accessor##pname( NULL, NULL,&_adder##pname, \ + &_collectionGetter##pname ); \ + static wxPropertyInfo _propertyInfo##pname( first, class_t::GetClassInfoStatic(), \ + wxT(#pname), typeid(colltype).name(),typeid(addelemtype).name(), \ + &_accessor##pname, flags, help, group ); + +#define wxREADONLY_PROPERTY_COLLECTION( pname, colltype, addelemtype, getter, \ + flags, help, group) \ + wxPROPERTY_COLLECTION_GETTER( pname, class_t, colltype, getter ) \ + static wxPropertyCollectionGetter##pname _collectionGetter##pname; \ + static wxPropertyAccessor _accessor##pname( NULL, NULL, NULL, \ + &_collectionGetter##pname ); \ + static wxPropertyInfo _propertyInfo##pname( first,class_t::GetClassInfoStatic(), \ + wxT(#pname), typeid(colltype).name(),typeid(addelemtype).name(), \ + &_accessor##pname, flags, help, group ); + +#define wxEVENT_PROPERTY( name, eventType, eventClass ) \ + static wxEventSourceTypeInfo _typeInfo##name( eventType, wxCLASSINFO( eventClass ) ); \ + static wxPropertyInfo _propertyInfo##name( first,class_t::GetClassInfoStatic(), \ + wxT(#name), &_typeInfo##name, NULL, wxAny() ); + +#define wxEVENT_RANGE_PROPERTY( name, eventType, lastEventType, eventClass ) \ + static wxEventSourceTypeInfo _typeInfo##name( eventType, lastEventType, \ + wxCLASSINFO( eventClass ) ); \ + static wxPropertyInfo _propertyInfo##name( first, class_t::GetClassInfoStatic(), \ + wxT(#name), &_typeInfo##name, NULL, wxAny() ); + +// ---------------------------------------------------------------------------- +// Implementation Helper for Simple Properties +// ---------------------------------------------------------------------------- + +#define wxIMPLEMENT_PROPERTY(name, type) \ +private: \ + type m_##name; \ +public: \ + void Set##name( type const & p) { m_##name = p; } \ + type const & Get##name() const { return m_##name; } + +#endif // wxUSE_EXTENDED_RTTI +#endif // _XTIPROP_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtistrm.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtistrm.h new file mode 100644 index 0000000000..0621ead1ea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtistrm.h @@ -0,0 +1,408 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xtistrm.h +// Purpose: streaming runtime metadata information (extended class info) +// Author: Stefan Csomor +// Modified by: +// Created: 27/07/03 +// Copyright: (c) 2003 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XTISTRMH__ +#define _WX_XTISTRMH__ + +#include "wx/defs.h" + +#if wxUSE_EXTENDED_RTTI + +#include "wx/object.h" + +const int wxInvalidObjectID = -2; +const int wxNullObjectID = -3; + +// Filer contains the interfaces for streaming objects in and out of XML, +// rendering them either to objects in memory, or to code. Note: We +// consider the process of generating code to be one of *depersisting* the +// object from xml, *not* of persisting the object to code from an object +// in memory. This distinction can be confusing, and should be kept +// in mind when looking at the property streamers and callback interfaces +// listed below. + + +// ---------------------------------------------------------------------------- +// wxObjectWriterCallback +// +// This class will be asked during the streaming-out process about every single +// property or object instance. It can veto streaming out by returning false +// or modify the value before it is streamed-out. +// ---------------------------------------------------------------------------- + +/* + class WXDLLIMPEXP_BASE wxClassInfo; + class WXDLLIMPEXP_BASE wxAnyList; + class WXDLLIMPEXP_BASE wxPropertyInfo; + class WXDLLIMPEXP_BASE wxAny; + class WXDLLIMPEXP_BASE wxHandlerInfo; + */ + +class WXDLLIMPEXP_BASE wxObjectWriter; +class WXDLLIMPEXP_BASE wxObjectReader; + +class WXDLLIMPEXP_BASE wxObjectWriterCallback +{ +public: + virtual ~wxObjectWriterCallback() {} + + // will be called before an object is written, may veto by returning false + virtual bool BeforeWriteObject( wxObjectWriter *WXUNUSED(writer), + const wxObject *WXUNUSED(object), + const wxClassInfo *WXUNUSED(classInfo), + const wxStringToAnyHashMap &WXUNUSED(metadata)) + { return true; } + + // will be called after this object has been written, may be + // needed for adjusting stacks + virtual void AfterWriteObject( wxObjectWriter *WXUNUSED(writer), + const wxObject *WXUNUSED(object), + const wxClassInfo *WXUNUSED(classInfo) ) + {} + + // will be called before a property gets written, may change the value, + // eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord ) + // or veto writing that property at all by returning false + virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer), + const wxObject *WXUNUSED(object), + const wxPropertyInfo *WXUNUSED(propInfo), + const wxAny &WXUNUSED(value) ) + { return true; } + + // will be called before a property gets written, may change the value, + // eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord ) + // or veto writing that property at all by returning false + virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer), + const wxObject *WXUNUSED(object), + const wxPropertyInfo *WXUNUSED(propInfo), + const wxAnyList &WXUNUSED(value) ) + { return true; } + + // will be called after a property has been written out, may be needed + // for adjusting stacks + virtual void AfterWriteProperty( wxObjectWriter *WXUNUSED(writer), + const wxPropertyInfo *WXUNUSED(propInfo) ) + {} + + // will be called before this delegate gets written + virtual bool BeforeWriteDelegate( wxObjectWriter *WXUNUSED(writer), + const wxObject *WXUNUSED(object), + const wxClassInfo* WXUNUSED(classInfo), + const wxPropertyInfo *WXUNUSED(propInfo), + const wxObject *&WXUNUSED(eventSink), + const wxHandlerInfo* &WXUNUSED(handlerInfo) ) + { return true; } + + virtual void AfterWriteDelegate( wxObjectWriter *WXUNUSED(writer), + const wxObject *WXUNUSED(object), + const wxClassInfo* WXUNUSED(classInfo), + const wxPropertyInfo *WXUNUSED(propInfo), + const wxObject *&WXUNUSED(eventSink), + const wxHandlerInfo* &WXUNUSED(handlerInfo) ) + { } +}; + +class WXDLLIMPEXP_BASE wxObjectWriterFunctor: public wxObjectFunctor +{ +}; + +class WXDLLIMPEXP_BASE wxObjectWriter: public wxObject +{ + friend class wxObjectWriterFunctor; +public: + wxObjectWriter(); + virtual ~wxObjectWriter(); + + // with this call you start writing out a new top-level object + void WriteObject(const wxObject *object, const wxClassInfo *classInfo, + wxObjectWriterCallback *writercallback, const wxString &name, + const wxStringToAnyHashMap &metadata); + + // Managing the object identity table a.k.a context + // + // these methods make sure that no object gets written twice, + // because sometimes multiple calls to the WriteObject will be + // made without wanting to have duplicate objects written, the + // object identity table will be reset manually + virtual void ClearObjectContext(); + + // gets the object Id for a passed in object in the context + int GetObjectID(const wxObject *obj); + + // returns true if this object has already been written in this context + bool IsObjectKnown( const wxObject *obj ); + + // + // streaming callbacks + // + // these callbacks really write out the values in the stream format + + // begins writing out a new toplevel entry which has the indicated unique name + virtual void DoBeginWriteTopLevelEntry( const wxString &name ) = 0; + + // ends writing out a new toplevel entry which has the indicated unique name + virtual void DoEndWriteTopLevelEntry( const wxString &name ) = 0; + + // start of writing an object having the passed in ID + virtual void DoBeginWriteObject(const wxObject *object, const wxClassInfo *classInfo, + int objectID, const wxStringToAnyHashMap &metadata ) = 0; + + // end of writing an toplevel object name param is used for unique + // identification within the container + virtual void DoEndWriteObject(const wxObject *object, + const wxClassInfo *classInfo, int objectID ) = 0; + + // writes a simple property in the stream format + virtual void DoWriteSimpleType( const wxAny &value ) = 0; + + // start of writing a complex property into the stream ( + virtual void DoBeginWriteProperty( const wxPropertyInfo *propInfo ) = 0; + + // end of writing a complex property into the stream + virtual void DoEndWriteProperty( const wxPropertyInfo *propInfo ) = 0; + + virtual void DoBeginWriteElement() = 0; + virtual void DoEndWriteElement() = 0; + // insert an object reference to an already written object + virtual void DoWriteRepeatedObject( int objectID ) = 0; + + // insert a null reference + virtual void DoWriteNullObject() = 0; + + // writes a delegate in the stream format + virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo, + const wxPropertyInfo *propInfo, const wxObject *eventSink, + int sinkObjectID, const wxClassInfo* eventSinkClassInfo, + const wxHandlerInfo* handlerIndo ) = 0; + + void WriteObject(const wxObject *object, const wxClassInfo *classInfo, + wxObjectWriterCallback *writercallback, bool isEmbedded, const wxStringToAnyHashMap &metadata ); + +protected: + struct wxObjectWriterInternal; + wxObjectWriterInternal* m_data; + + struct wxObjectWriterInternalPropertiesData; + + void WriteAllProperties( const wxObject * obj, const wxClassInfo* ci, + wxObjectWriterCallback *writercallback, + wxObjectWriterInternalPropertiesData * data ); + + void WriteOneProperty( const wxObject *obj, const wxClassInfo* ci, + const wxPropertyInfo* pi, wxObjectWriterCallback *writercallback, + wxObjectWriterInternalPropertiesData *data ); + + + void FindConnectEntry(const wxEvtHandler * evSource, + const wxEventSourceTypeInfo* dti, const wxObject* &sink, + const wxHandlerInfo *&handler); +}; + + +/* +Streaming callbacks for depersisting XML to code, or running objects +*/ + +class WXDLLIMPEXP_BASE wxObjectReaderCallback; + +/* +wxObjectReader handles streaming in a class from a arbitrary format. +While walking through it issues calls out to interfaces to readercallback +the guts from the underlying storage format. +*/ + +class WXDLLIMPEXP_BASE wxObjectReader: public wxObject +{ +public: + wxObjectReader(); + virtual ~wxObjectReader(); + + // the only thing wxObjectReader knows about is the class info by object ID + wxClassInfo *GetObjectClassInfo(int objectID); + bool HasObjectClassInfo( int objectID ); + void SetObjectClassInfo(int objectID, wxClassInfo* classInfo); + + // Reads the component the reader is pointed at from the underlying format. + // The return value is the root object ID, which can + // then be used to ask the depersister about that object + // if there was a problem you will get back wxInvalidObjectID and the current + // error log will carry the problems encoutered + virtual int ReadObject( const wxString &name, wxObjectReaderCallback *readercallback ) = 0; + +private: + struct wxObjectReaderInternal; + wxObjectReaderInternal *m_data; +}; + +// This abstract class matches the allocate-init/create model of creation of objects. +// At runtime, these will create actual instances, and manipulate them. +// When generating code, these will just create statements of C++ +// code to create the objects. + +class WXDLLIMPEXP_BASE wxObjectReaderCallback +{ +public: + virtual ~wxObjectReaderCallback() {} + + // allocate the new object on the heap, that object will have the passed in ID + virtual void AllocateObject(int objectID, wxClassInfo *classInfo, + wxStringToAnyHashMap &metadata) = 0; + + // initialize the already allocated object having the ID objectID with the Create method + // creation parameters which are objects are having their Ids passed in objectIDValues + // having objectId <> wxInvalidObjectID + + virtual void CreateObject(int objectID, + const wxClassInfo *classInfo, + int paramCount, + wxAny *VariantValues, + int *objectIDValues, + const wxClassInfo **objectClassInfos, + wxStringToAnyHashMap &metadata) = 0; + + // construct the new object on the heap, that object will have the passed in ID + // (for objects that don't support allocate-create type of creation) + // creation parameters which are objects are having their Ids passed in + // objectIDValues having objectId <> wxInvalidObjectID + + virtual void ConstructObject(int objectID, + const wxClassInfo *classInfo, + int paramCount, + wxAny *VariantValues, + int *objectIDValues, + const wxClassInfo **objectClassInfos, + wxStringToAnyHashMap &metadata) = 0; + + // destroy the heap-allocated object having the ID objectID, this may be used + // if an object is embedded in another object and set via value semantics, + // so the intermediate object can be destroyed after safely + virtual void DestroyObject(int objectID, wxClassInfo *classInfo) = 0; + + // set the corresponding property + virtual void SetProperty(int objectID, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + const wxAny &VariantValue) = 0; + + // sets the corresponding property (value is an object) + virtual void SetPropertyAsObject(int objectID, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + int valueObjectId) = 0; + + // adds an element to a property collection + virtual void AddToPropertyCollection( int objectID, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + const wxAny &VariantValue) = 0; + + // sets the corresponding property (value is an object) + virtual void AddToPropertyCollectionAsObject(int objectID, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + int valueObjectId) = 0; + + // sets the corresponding event handler + virtual void SetConnect(int EventSourceObjectID, + const wxClassInfo *EventSourceClassInfo, + const wxPropertyInfo *delegateInfo, + const wxClassInfo *EventSinkClassInfo, + const wxHandlerInfo* handlerInfo, + int EventSinkObjectID ) = 0; +}; + +/* +wxObjectRuntimeReaderCallback implements the callbacks that will bring back +an object into a life memory instance +*/ + +class WXDLLIMPEXP_BASE wxObjectRuntimeReaderCallback: public wxObjectReaderCallback +{ + struct wxObjectRuntimeReaderCallbackInternal; + wxObjectRuntimeReaderCallbackInternal * m_data; + +public: + wxObjectRuntimeReaderCallback(); + virtual ~wxObjectRuntimeReaderCallback(); + + // returns the object having the corresponding ID fully constructed + wxObject *GetObject(int objectID); + + // allocate the new object on the heap, that object will have the passed in ID + virtual void AllocateObject(int objectID, wxClassInfo *classInfo, + wxStringToAnyHashMap &metadata); + + // initialize the already allocated object having the ID objectID with + // the Create method creation parameters which are objects are having + // their Ids passed in objectIDValues having objectId <> wxInvalidObjectID + + virtual void CreateObject(int objectID, + const wxClassInfo *classInfo, + int paramCount, + wxAny *VariantValues, + int *objectIDValues, + const wxClassInfo **objectClassInfos, + wxStringToAnyHashMap &metadata + ); + + // construct the new object on the heap, that object will have the + // passed in ID (for objects that don't support allocate-create type of + // creation) creation parameters which are objects are having their Ids + // passed in objectIDValues having objectId <> wxInvalidObjectID + + virtual void ConstructObject(int objectID, + const wxClassInfo *classInfo, + int paramCount, + wxAny *VariantValues, + int *objectIDValues, + const wxClassInfo **objectClassInfos, + wxStringToAnyHashMap &metadata); + + // destroy the heap-allocated object having the ID objectID, this may be + // used if an object is embedded in another object and set via value semantics, + // so the intermediate object can be destroyed after safely + virtual void DestroyObject(int objectID, wxClassInfo *classInfo); + + // set the corresponding property + virtual void SetProperty(int objectID, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + const wxAny &variantValue); + + // sets the corresponding property (value is an object) + virtual void SetPropertyAsObject(int objectId, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + int valueObjectId); + + // adds an element to a property collection + virtual void AddToPropertyCollection( int objectID, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + const wxAny &VariantValue); + + // sets the corresponding property (value is an object) + virtual void AddToPropertyCollectionAsObject(int objectID, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + int valueObjectId); + + // sets the corresponding event handler + virtual void SetConnect(int eventSourceObjectID, + const wxClassInfo *eventSourceClassInfo, + const wxPropertyInfo *delegateInfo, + const wxClassInfo *eventSinkClassInfo, + const wxHandlerInfo* handlerInfo, + int eventSinkObjectID ); +}; + +#endif // wxUSE_EXTENDED_RTTI + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtitypes.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtitypes.h new file mode 100644 index 0000000000..afd5c07b45 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtitypes.h @@ -0,0 +1,532 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xtitypes.h +// Purpose: enum, set, basic types support +// Author: Stefan Csomor +// Modified by: Francesco Montorsi +// Created: 27/07/03 +// Copyright: (c) 1997 Julian Smart +// (c) 2003 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _XTITYPES_H_ +#define _XTITYPES_H_ + +#include "wx/defs.h" + +#if wxUSE_EXTENDED_RTTI + +#include "wx/string.h" +#include "wx/hashmap.h" +#include "wx/arrstr.h" +#include "wx/flags.h" +#include "wx/intl.h" +#include "wx/log.h" +#include + +class WXDLLIMPEXP_BASE wxClassInfo; + +// ---------------------------------------------------------------------------- +// Enum Support +// +// In the header files XTI requires no change from pure c++ code, however in the +// implementation, an enum needs to be enumerated eg: +// +// wxBEGIN_ENUM( wxFlavor ) +// wxENUM_MEMBER( Vanilla ) +// wxENUM_MEMBER( Chocolate ) +// wxENUM_MEMBER( Strawberry ) +// wxEND_ENUM( wxFlavor ) +// ---------------------------------------------------------------------------- + +struct WXDLLIMPEXP_BASE wxEnumMemberData +{ + const wxChar* m_name; + int m_value; +}; + +class WXDLLIMPEXP_BASE wxEnumData +{ +public: + wxEnumData( wxEnumMemberData* data ); + + // returns true if the member has been found and sets the int value + // pointed to accordingly (if ptr != null ) + // if not found returns false, value left unchanged + bool HasEnumMemberValue( const wxChar *name, int *value = NULL ) const; + + // returns the value of the member, if not found in debug mode an + // assert is issued, in release 0 is returned + int GetEnumMemberValue(const wxChar *name ) const; + + // returns the name of the enum member having the passed in value + // returns an emtpy string if not found + const wxChar *GetEnumMemberName(int value) const; + + // returns the number of members in this enum + int GetEnumCount() const { return m_count; } + + // returns the value of the nth member + int GetEnumMemberValueByIndex( int n ) const; + + // returns the value of the nth member + const wxChar *GetEnumMemberNameByIndex( int n ) const; + +private: + wxEnumMemberData *m_members; + int m_count; +}; + +#define wxBEGIN_ENUM( e ) \ + wxEnumMemberData s_enumDataMembers##e[] = { + +#define wxENUM_MEMBER( v ) { wxT(#v), v }, + +#define wxEND_ENUM( e ) \ + { NULL, 0 } }; \ + wxEnumData s_enumData##e( s_enumDataMembers##e ); \ + wxEnumData *wxGetEnumData(e) { return &s_enumData##e; } \ + template<> void wxStringReadValue(const wxString& s, e &data ) \ + { data = (e) s_enumData##e.GetEnumMemberValue(s.c_str()); } \ + template<> void wxStringWriteValue(wxString &s, const e &data ) \ + { s = s_enumData##e.GetEnumMemberName((int)data); } \ + void FromLong##e( long data, wxAny& result ) \ + { result = wxAny((e)data); } \ + void ToLong##e( const wxAny& data, long &result ) \ + { result = (long) (data).As(static_cast(NULL)); } \ + \ + wxTO_STRING_IMP( e ) \ + wxFROM_STRING_IMP( e ) \ + wxEnumTypeInfo s_typeInfo##e(wxT_ENUM, &s_enumData##e, \ + &wxTO_STRING( e ), &wxFROM_STRING( e ), &ToLong##e, \ + &FromLong##e, typeid(e).name() ); + + +// ---------------------------------------------------------------------------- +// Set Support +// +// in the header : +// +// enum wxFlavor +// { +// Vanilla, +// Chocolate, +// Strawberry, +// }; +// +// typedef wxBitset wxCoupe; +// +// in the implementation file : +// +// wxBEGIN_ENUM( wxFlavor ) +// wxENUM_MEMBER( Vanilla ) +// wxENUM_MEMBER( Chocolate ) +// wxENUM_MEMBER( Strawberry ) +// wxEND_ENUM( wxFlavor ) +// +// wxIMPLEMENT_SET_STREAMING( wxCoupe, wxFlavor ) +// +// implementation note: no partial specialization for streaming, but a delegation +// to a different class +// +// ---------------------------------------------------------------------------- + +void WXDLLIMPEXP_BASE wxSetStringToArray( const wxString &s, wxArrayString &array ); + +template +void wxSetFromString(const wxString &s, wxBitset &data ) +{ + wxEnumData* edata = wxGetEnumData((e) 0); + data.reset(); + + wxArrayString array; + wxSetStringToArray( s, array ); + wxString flag; + for ( int i = 0; i < array.Count(); ++i ) + { + flag = array[i]; + int ivalue; + if ( edata->HasEnumMemberValue( flag.c_str(), &ivalue ) ) + { + data.set( (e) ivalue ); + } + } +} + +template +void wxSetToString( wxString &s, const wxBitset &data ) +{ + wxEnumData* edata = wxGetEnumData((e) 0); + int count = edata->GetEnumCount(); + int i; + s.Clear(); + for ( i = 0; i < count; i++ ) + { + e value = (e) edata->GetEnumMemberValueByIndex(i); + if ( data.test( value ) ) + { + // this could also be done by the templated calls + if ( !s.empty() ) + s += wxT("|"); + s += edata->GetEnumMemberNameByIndex(i); + } + } +} + +#define wxIMPLEMENT_SET_STREAMING(SetName,e) \ + template<> void wxStringReadValue(const wxString &s, wxBitset &data ) \ + { wxSetFromString( s, data ); } \ + template<> void wxStringWriteValue( wxString &s, const wxBitset &data ) \ + { wxSetToString( s, data ); } \ + void FromLong##SetName( long data, wxAny& result ) \ + { result = wxAny(SetName((unsigned long)data)); } \ + void ToLong##SetName( const wxAny& data, long &result ) \ + { result = (long) (data).As(static_cast(NULL)).to_ulong(); } \ + wxTO_STRING_IMP( SetName ) \ + wxFROM_STRING_IMP( SetName ) \ + wxEnumTypeInfo s_typeInfo##SetName(wxT_SET, &s_enumData##e, \ + &wxTO_STRING( SetName ), &wxFROM_STRING( SetName ), \ + &ToLong##SetName, &FromLong##SetName, typeid(SetName).name() ); + +template +void wxFlagsFromString(const wxString &s, e &data ) +{ + wxEnumData* edata = wxGetEnumData((e*) 0); + data.m_data = 0; + + wxArrayString array; + wxSetStringToArray( s, array ); + wxString flag; + for ( size_t i = 0; i < array.Count(); ++i ) + { + flag = array[i]; + int ivalue; + if ( edata->HasEnumMemberValue( flag.c_str(), &ivalue ) ) + { + data.m_data |= ivalue; + } + } +} + +template +void wxFlagsToString( wxString &s, const e& data ) +{ + wxEnumData* edata = wxGetEnumData((e*) 0); + int count = edata->GetEnumCount(); + int i; + s.Clear(); + long dataValue = data.m_data; + for ( i = 0; i < count; i++ ) + { + int value = edata->GetEnumMemberValueByIndex(i); + // make this to allow for multi-bit constants to work + if ( value && ( dataValue & value ) == value ) + { + // clear the flags we just set + dataValue &= ~value; + // this could also be done by the templated calls + if ( !s.empty() ) + s +=wxT("|"); + s += edata->GetEnumMemberNameByIndex(i); + } + } +} + +#define wxBEGIN_FLAGS( e ) \ + wxEnumMemberData s_enumDataMembers##e[] = { + +#define wxFLAGS_MEMBER( v ) { wxT(#v), static_cast(v) }, + +#define wxEND_FLAGS( e ) \ + { NULL, 0 } }; \ + wxEnumData s_enumData##e( s_enumDataMembers##e ); \ + wxEnumData *wxGetEnumData(e*) { return &s_enumData##e; } \ + template<> void wxStringReadValue(const wxString &s, e &data ) \ + { wxFlagsFromString( s, data ); } \ + template<> void wxStringWriteValue( wxString &s, const e& data ) \ + { wxFlagsToString( s, data ); } \ + void FromLong##e( long data, wxAny& result ) \ + { result = wxAny(e(data)); } \ + void ToLong##e( const wxAny& data, long &result ) \ + { result = (long) (data).As(static_cast(NULL)).m_data; } \ + wxTO_STRING_IMP( e ) \ + wxFROM_STRING_IMP( e ) \ + wxEnumTypeInfo s_typeInfo##e(wxT_SET, &s_enumData##e, \ + &wxTO_STRING( e ), &wxFROM_STRING( e ), &ToLong##e, \ + &FromLong##e, typeid(e).name() ); + +// ---------------------------------------------------------------------------- +// Type Information +// ---------------------------------------------------------------------------- + +// All data exposed by the RTTI is characterized using the following classes. +// The first characterization is done by wxTypeKind. All enums up to and including +// wxT_CUSTOM represent so called simple types. These cannot be divided any further. +// They can be converted to and from wxStrings, that's all. +// Other wxTypeKinds can instead be splitted recursively into smaller parts until +// the simple types are reached. + +enum wxTypeKind +{ + wxT_VOID = 0, // unknown type + wxT_BOOL, + wxT_CHAR, + wxT_UCHAR, + wxT_INT, + wxT_UINT, + wxT_LONG, + wxT_ULONG, + wxT_LONGLONG, + wxT_ULONGLONG, + wxT_FLOAT, + wxT_DOUBLE, + wxT_STRING, // must be wxString + wxT_SET, // must be wxBitset<> template + wxT_ENUM, + wxT_CUSTOM, // user defined type (e.g. wxPoint) + + wxT_LAST_SIMPLE_TYPE_KIND = wxT_CUSTOM, + + wxT_OBJECT_PTR, // object reference + wxT_OBJECT, // embedded object + wxT_COLLECTION, // collection + + wxT_DELEGATE, // for connecting against an event source + + wxT_LAST_TYPE_KIND = wxT_DELEGATE // sentinel for bad data, asserts, debugging +}; + +class WXDLLIMPEXP_BASE wxAny; +class WXDLLIMPEXP_BASE wxTypeInfo; + +WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxTypeInfo*, wxTypeInfoMap, class WXDLLIMPEXP_BASE ); + +class WXDLLIMPEXP_BASE wxTypeInfo +{ +public: + typedef void (*wxVariant2StringFnc)( const wxAny& data, wxString &result ); + typedef void (*wxString2VariantFnc)( const wxString& data, wxAny &result ); + + wxTypeInfo(wxTypeKind kind, + wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL, + const wxString &name = wxEmptyString): + m_toString(to), m_fromString(from), m_kind(kind), m_name(name) + { + Register(); + } +#if 0 // wxUSE_UNICODE + wxTypeInfo(wxTypeKind kind, + wxVariant2StringFnc to, wxString2VariantFnc from, + const char *name): + m_toString(to), m_fromString(from), m_kind(kind), + m_name(wxString::FromAscii(name)) + { + Register(); + } +#endif + + virtual ~wxTypeInfo() + { + Unregister(); + } + + // return the kind of this type (wxT_... constants) + wxTypeKind GetKind() const { return m_kind; } + + // returns the unique name of this type + const wxString& GetTypeName() const { return m_name; } + + // is this type a delegate type + bool IsDelegateType() const { return m_kind == wxT_DELEGATE; } + + // is this type a custom type + bool IsCustomType() const { return m_kind == wxT_CUSTOM; } + + // is this type an object type + bool IsObjectType() const { return m_kind == wxT_OBJECT || m_kind == wxT_OBJECT_PTR; } + + // can the content of this type be converted to and from strings ? + bool HasStringConverters() const { return m_toString != NULL && m_fromString != NULL; } + + // convert a wxAny holding data of this type into a string + void ConvertToString( const wxAny& data, wxString &result ) const + { + if ( m_toString ) + (*m_toString)( data, result ); + else + wxLogError( wxGetTranslation(wxT("String conversions not supported")) ); + } + + // convert a string into a wxAny holding the corresponding data in this type + void ConvertFromString( const wxString& data, wxAny &result ) const + { + if( m_fromString ) + (*m_fromString)( data, result ); + else + wxLogError( wxGetTranslation(wxT("String conversions not supported")) ); + } + + // statics: + + // looks for the corresponding type, will return NULL if not found + static wxTypeInfo *FindType( const wxString& typeName ); +private: + void Register(); + void Unregister(); + + wxVariant2StringFnc m_toString; + wxString2VariantFnc m_fromString; + + wxTypeKind m_kind; + wxString m_name; + + // the static list of all types we know about + static wxTypeInfoMap* ms_typeTable; +}; + +class WXDLLIMPEXP_BASE wxBuiltInTypeInfo : public wxTypeInfo +{ +public: + wxBuiltInTypeInfo( wxTypeKind kind, wxVariant2StringFnc to = NULL, + wxString2VariantFnc from = NULL, + const wxString &name = wxEmptyString ) : + wxTypeInfo( kind, to, from, name ) + { wxASSERT_MSG( GetKind() < wxT_SET, wxT("Illegal Kind for Base Type") ); } +}; + +class WXDLLIMPEXP_BASE wxCustomTypeInfo : public wxTypeInfo +{ +public: + wxCustomTypeInfo( const wxString &name, wxVariant2StringFnc to, + wxString2VariantFnc from ) : + wxTypeInfo( wxT_CUSTOM, to, from, name ) + {} +}; + +class WXDLLIMPEXP_BASE wxEnumTypeInfo : public wxTypeInfo +{ +public: + typedef void (*converterToLong_t)( const wxAny& data, long &result ); + typedef void (*converterFromLong_t)( long data, wxAny &result ); + + wxEnumTypeInfo( wxTypeKind kind, wxEnumData* enumInfo, wxVariant2StringFnc to, + wxString2VariantFnc from, converterToLong_t toLong, + converterFromLong_t fromLong, const wxString &name ) : + wxTypeInfo( kind, to, from, name ), m_toLong( toLong ), m_fromLong( fromLong ) + { + wxASSERT_MSG( kind == wxT_ENUM || kind == wxT_SET, + wxT("Illegal Kind for Enum Type")); + m_enumInfo = enumInfo; + } + + const wxEnumData* GetEnumData() const { return m_enumInfo; } + + // convert a wxAny holding data of this type into a long + void ConvertToLong( const wxAny& data, long &result ) const + { + if( m_toLong ) + (*m_toLong)( data, result ); + else + wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) ); + } + + // convert a long into a wxAny holding the corresponding data in this type + void ConvertFromLong( long data, wxAny &result ) const + { + if( m_fromLong ) + (*m_fromLong)( data, result ); + else + wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) ); + } + +private: + converterToLong_t m_toLong; + converterFromLong_t m_fromLong; + + wxEnumData *m_enumInfo; // Kind == wxT_ENUM or Kind == wxT_SET +}; + +class WXDLLIMPEXP_BASE wxClassTypeInfo : public wxTypeInfo +{ +public: + wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo, + wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL, + const wxString &name = wxEmptyString); + + const wxClassInfo *GetClassInfo() const { return m_classInfo; } + +private: + wxClassInfo *m_classInfo; // Kind == wxT_OBJECT - could be NULL +}; + +class WXDLLIMPEXP_BASE wxCollectionTypeInfo : public wxTypeInfo +{ +public: + wxCollectionTypeInfo( const wxString &elementName, wxVariant2StringFnc to, + wxString2VariantFnc from , const wxString &name) : + wxTypeInfo( wxT_COLLECTION, to, from, name ) + { m_elementTypeName = elementName; m_elementType = NULL; } + + const wxTypeInfo* GetElementType() const + { + if ( m_elementType == NULL ) + m_elementType = wxTypeInfo::FindType( m_elementTypeName ); + return m_elementType; + } + +private: + mutable wxTypeInfo * m_elementType; + wxString m_elementTypeName; +}; + +class WXDLLIMPEXP_BASE wxEventSourceTypeInfo : public wxTypeInfo +{ +public: + wxEventSourceTypeInfo( int eventType, wxClassInfo* eventClass, + wxVariant2StringFnc to = NULL, + wxString2VariantFnc from = NULL ); + wxEventSourceTypeInfo( int eventType, int lastEventType, wxClassInfo* eventClass, + wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL ); + + int GetEventType() const { return m_eventType; } + int GetLastEventType() const { return m_lastEventType; } + const wxClassInfo* GetEventClass() const { return m_eventClass; } + +private: + const wxClassInfo *m_eventClass; // (extended will merge into classinfo) + int m_eventType; + int m_lastEventType; +}; + +template const wxTypeInfo* wxGetTypeInfo( T * ) + { return wxTypeInfo::FindType(typeid(T).name()); } + +// this macro is for usage with custom, non-object derived classes and structs, +// wxPoint is such a custom type + +#if wxUSE_FUNC_TEMPLATE_POINTER + #define wxCUSTOM_TYPE_INFO( e, toString, fromString ) \ + wxCustomTypeInfo s_typeInfo##e(typeid(e).name(), &toString, &fromString); +#else + #define wxCUSTOM_TYPE_INFO( e, toString, fromString ) \ + void ToString##e( const wxAny& data, wxString &result ) \ + { toString(data, result); } \ + void FromString##e( const wxString& data, wxAny &result ) \ + { fromString(data, result); } \ + wxCustomTypeInfo s_typeInfo##e(typeid(e).name(), \ + &ToString##e, &FromString##e); +#endif + +#define wxCOLLECTION_TYPE_INFO( element, collection ) \ + wxCollectionTypeInfo s_typeInfo##collection( typeid(element).name(), \ + NULL, NULL, typeid(collection).name() ); + +// sometimes a compiler invents specializations that are nowhere called, +// use this macro to satisfy the refs, currently we don't have to play +// tricks, but if we will have to according to the compiler, we will use +// that macro for that + +#define wxILLEGAL_TYPE_SPECIALIZATION( a ) + +#endif // wxUSE_EXTENDED_RTTI +#endif // _XTITYPES_H_ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtixml.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtixml.h new file mode 100644 index 0000000000..100e0653e1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/xtixml.h @@ -0,0 +1,119 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xtixml.h +// Purpose: xml streaming runtime metadata information (extended class info) +// Author: Stefan Csomor +// Modified by: +// Created: 27/07/03 +// Copyright: (c) 2003 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XTIXMLH__ +#define _WX_XTIXMLH__ + +#include "wx/defs.h" + +#if wxUSE_EXTENDED_RTTI + +#include "wx/string.h" +#include "wx/xtistrm.h" + +/* +class WXDLLIMPEXP_XML wxXmlNode; +class WXDLLIMPEXP_BASE wxPropertyInfo; +class WXDLLIMPEXP_BASE wxObject; +class WXDLLIMPEXP_BASE wxClassInfo; +class WXDLLIMPEXP_BASE wxAnyList; +class WXDLLIMPEXP_BASE wxHandlerInfo; +class WXDLLIMPEXP_BASE wxObjectWriterCallback; +*/ + +class WXDLLIMPEXP_XML wxObjectXmlWriter: public wxObjectWriter +{ +public: + + wxObjectXmlWriter( wxXmlNode * parent ); + virtual ~wxObjectXmlWriter(); + + // + // streaming callbacks + // + // these callbacks really write out the values in the stream format + // + + // + // streaming callbacks + // + // these callbacks really write out the values in the stream format + + // begins writing out a new toplevel entry which has the indicated unique name + virtual void DoBeginWriteTopLevelEntry( const wxString &name ); + + // ends writing out a new toplevel entry which has the indicated unique name + virtual void DoEndWriteTopLevelEntry( const wxString &name ); + + // start of writing an object having the passed in ID + virtual void DoBeginWriteObject(const wxObject *object, + const wxClassInfo *classInfo, int objectID, const wxStringToAnyHashMap &metadata ); + + // end of writing an toplevel object name param is used for unique + // identification within the container + virtual void DoEndWriteObject(const wxObject *object, + const wxClassInfo *classInfo, int objectID ); + + // writes a simple property in the stream format + virtual void DoWriteSimpleType( const wxAny &value ); + + // start of writing a complex property into the stream ( + virtual void DoBeginWriteProperty( const wxPropertyInfo *propInfo ); + + // end of writing a complex property into the stream + virtual void DoEndWriteProperty( const wxPropertyInfo *propInfo ); + + virtual void DoBeginWriteElement(); + virtual void DoEndWriteElement(); + + // insert an object reference to an already written object + virtual void DoWriteRepeatedObject( int objectID ); + + // insert a null reference + virtual void DoWriteNullObject(); + + // writes a delegate in the stream format + virtual void DoWriteDelegate( const wxObject *object, + const wxClassInfo* classInfo, const wxPropertyInfo *propInfo, + const wxObject *eventSink, int sinkObjectID, + const wxClassInfo* eventSinkClassInfo, const wxHandlerInfo* handlerIndo ); + +private: + struct wxObjectXmlWriterInternal; + wxObjectXmlWriterInternal* m_data; +}; + +/* +wxObjectXmlReader handles streaming in a class from XML +*/ + +class WXDLLIMPEXP_XML wxObjectXmlReader: public wxObjectReader +{ +public: + wxObjectXmlReader(wxXmlNode *parent) { m_parent = parent; } + virtual ~wxObjectXmlReader() {} + + // Reads a component from XML. The return value is the root object ID, which can + // then be used to ask the readercallback about that object + + virtual int ReadObject( const wxString &name, wxObjectReaderCallback *readercallback ); + +private: + int ReadComponent(wxXmlNode *parent, wxObjectReaderCallback *callbacks); + + // read the content of this node (simple type) and return the corresponding value + wxAny ReadValue(wxXmlNode *Node, const wxTypeInfo *type ); + + wxXmlNode * m_parent; +}; + +#endif // wxUSE_EXTENDED_RTTI + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/zipstrm.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/zipstrm.h new file mode 100644 index 0000000000..9cd7631944 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/zipstrm.h @@ -0,0 +1,574 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/zipstrm.h +// Purpose: Streams for Zip files +// Author: Mike Wetherell +// Copyright: (c) Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WXZIPSTREAM_H__ +#define _WX_WXZIPSTREAM_H__ + +#include "wx/defs.h" + +#if wxUSE_ZIPSTREAM + +#include "wx/archive.h" +#include "wx/filename.h" + +// some methods from wxZipInputStream and wxZipOutputStream stream do not get +// exported/imported when compiled with Mingw versions before 3.4.2. So they +// are imported/exported individually as a workaround +#if (defined(__GNUWIN32__) || defined(__MINGW32__)) \ + && (!defined __GNUC__ \ + || !defined __GNUC_MINOR__ \ + || !defined __GNUC_PATCHLEVEL__ \ + || __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ < 30402) +#define WXZIPFIX WXDLLIMPEXP_BASE +#else +#define WXZIPFIX +#endif + +///////////////////////////////////////////////////////////////////////////// +// constants + +// Compression Method, only 0 (store) and 8 (deflate) are supported here +// +enum wxZipMethod +{ + wxZIP_METHOD_STORE, + wxZIP_METHOD_SHRINK, + wxZIP_METHOD_REDUCE1, + wxZIP_METHOD_REDUCE2, + wxZIP_METHOD_REDUCE3, + wxZIP_METHOD_REDUCE4, + wxZIP_METHOD_IMPLODE, + wxZIP_METHOD_TOKENIZE, + wxZIP_METHOD_DEFLATE, + wxZIP_METHOD_DEFLATE64, + wxZIP_METHOD_BZIP2 = 12, + wxZIP_METHOD_DEFAULT = 0xffff +}; + +// Originating File-System. +// +// These are Pkware's values. Note that Info-zip disagree on some of them, +// most notably NTFS. +// +enum wxZipSystem +{ + wxZIP_SYSTEM_MSDOS, + wxZIP_SYSTEM_AMIGA, + wxZIP_SYSTEM_OPENVMS, + wxZIP_SYSTEM_UNIX, + wxZIP_SYSTEM_VM_CMS, + wxZIP_SYSTEM_ATARI_ST, + wxZIP_SYSTEM_OS2_HPFS, + wxZIP_SYSTEM_MACINTOSH, + wxZIP_SYSTEM_Z_SYSTEM, + wxZIP_SYSTEM_CPM, + wxZIP_SYSTEM_WINDOWS_NTFS, + wxZIP_SYSTEM_MVS, + wxZIP_SYSTEM_VSE, + wxZIP_SYSTEM_ACORN_RISC, + wxZIP_SYSTEM_VFAT, + wxZIP_SYSTEM_ALTERNATE_MVS, + wxZIP_SYSTEM_BEOS, + wxZIP_SYSTEM_TANDEM, + wxZIP_SYSTEM_OS_400 +}; + +// Dos/Win file attributes +// +enum wxZipAttributes +{ + wxZIP_A_RDONLY = 0x01, + wxZIP_A_HIDDEN = 0x02, + wxZIP_A_SYSTEM = 0x04, + wxZIP_A_SUBDIR = 0x10, + wxZIP_A_ARCH = 0x20, + + wxZIP_A_MASK = 0x37 +}; + +// Values for the flags field in the zip headers +// +enum wxZipFlags +{ + wxZIP_ENCRYPTED = 0x0001, + wxZIP_DEFLATE_NORMAL = 0x0000, // normal compression + wxZIP_DEFLATE_EXTRA = 0x0002, // extra compression + wxZIP_DEFLATE_FAST = 0x0004, // fast compression + wxZIP_DEFLATE_SUPERFAST = 0x0006, // superfast compression + wxZIP_DEFLATE_MASK = 0x0006, + wxZIP_SUMS_FOLLOW = 0x0008, // crc and sizes come after the data + wxZIP_ENHANCED = 0x0010, + wxZIP_PATCH = 0x0020, + wxZIP_STRONG_ENC = 0x0040, + wxZIP_UNUSED = 0x0F80, + wxZIP_RESERVED = 0xF000 +}; + +// Forward decls +// +class WXDLLIMPEXP_FWD_BASE wxZipEntry; +class WXDLLIMPEXP_FWD_BASE wxZipInputStream; + + +///////////////////////////////////////////////////////////////////////////// +// wxZipNotifier + +class WXDLLIMPEXP_BASE wxZipNotifier +{ +public: + virtual ~wxZipNotifier() { } + + virtual void OnEntryUpdated(wxZipEntry& entry) = 0; +}; + + +///////////////////////////////////////////////////////////////////////////// +// Zip Entry - holds the meta data for a file in the zip + +class WXDLLIMPEXP_BASE wxZipEntry : public wxArchiveEntry +{ +public: + wxZipEntry(const wxString& name = wxEmptyString, + const wxDateTime& dt = wxDateTime::Now(), + wxFileOffset size = wxInvalidOffset); + virtual ~wxZipEntry(); + + wxZipEntry(const wxZipEntry& entry); + wxZipEntry& operator=(const wxZipEntry& entry); + + // Get accessors + wxDateTime GetDateTime() const { return m_DateTime; } + wxFileOffset GetSize() const { return m_Size; } + wxFileOffset GetOffset() const { return m_Offset; } + wxString GetInternalName() const { return m_Name; } + int GetMethod() const { return m_Method; } + int GetFlags() const { return m_Flags; } + wxUint32 GetCrc() const { return m_Crc; } + wxFileOffset GetCompressedSize() const { return m_CompressedSize; } + int GetSystemMadeBy() const { return m_SystemMadeBy; } + wxString GetComment() const { return m_Comment; } + wxUint32 GetExternalAttributes() const { return m_ExternalAttributes; } + wxPathFormat GetInternalFormat() const { return wxPATH_UNIX; } + int GetMode() const; + const char *GetLocalExtra() const; + size_t GetLocalExtraLen() const; + const char *GetExtra() const; + size_t GetExtraLen() const; + wxString GetName(wxPathFormat format = wxPATH_NATIVE) const; + + // is accessors + inline bool IsDir() const; + inline bool IsText() const; + inline bool IsReadOnly() const; + inline bool IsMadeByUnix() const; + + // set accessors + void SetDateTime(const wxDateTime& dt) { m_DateTime = dt; } + void SetSize(wxFileOffset size) { m_Size = size; } + void SetMethod(int method) { m_Method = (wxUint16)method; } + void SetComment(const wxString& comment) { m_Comment = comment; } + void SetExternalAttributes(wxUint32 attr ) { m_ExternalAttributes = attr; } + void SetSystemMadeBy(int system); + void SetMode(int mode); + void SetExtra(const char *extra, size_t len); + void SetLocalExtra(const char *extra, size_t len); + + inline void SetName(const wxString& name, + wxPathFormat format = wxPATH_NATIVE); + + static wxString GetInternalName(const wxString& name, + wxPathFormat format = wxPATH_NATIVE, + bool *pIsDir = NULL); + + // set is accessors + void SetIsDir(bool isDir = true); + inline void SetIsReadOnly(bool isReadOnly = true); + inline void SetIsText(bool isText = true); + + wxZipEntry *Clone() const { return ZipClone(); } + + void SetNotifier(wxZipNotifier& notifier); + void UnsetNotifier(); + +protected: + // Internal attributes + enum { TEXT_ATTR = 1 }; + + // protected Get accessors + int GetVersionNeeded() const { return m_VersionNeeded; } + wxFileOffset GetKey() const { return m_Key; } + int GetVersionMadeBy() const { return m_VersionMadeBy; } + int GetDiskStart() const { return m_DiskStart; } + int GetInternalAttributes() const { return m_InternalAttributes; } + + void SetVersionNeeded(int version) { m_VersionNeeded = (wxUint16)version; } + void SetOffset(wxFileOffset offset) { m_Offset = offset; } + void SetFlags(int flags) { m_Flags = (wxUint16)flags; } + void SetVersionMadeBy(int version) { m_VersionMadeBy = (wxUint8)version; } + void SetCrc(wxUint32 crc) { m_Crc = crc; } + void SetCompressedSize(wxFileOffset size) { m_CompressedSize = size; } + void SetKey(wxFileOffset offset) { m_Key = offset; } + void SetDiskStart(int start) { m_DiskStart = (wxUint16)start; } + void SetInternalAttributes(int attr) { m_InternalAttributes = (wxUint16)attr; } + + virtual wxZipEntry *ZipClone() const { return new wxZipEntry(*this); } + + void Notify(); + +private: + wxArchiveEntry* DoClone() const { return ZipClone(); } + + size_t ReadLocal(wxInputStream& stream, wxMBConv& conv); + size_t WriteLocal(wxOutputStream& stream, wxMBConv& conv) const; + + size_t ReadCentral(wxInputStream& stream, wxMBConv& conv); + size_t WriteCentral(wxOutputStream& stream, wxMBConv& conv) const; + + size_t ReadDescriptor(wxInputStream& stream); + size_t WriteDescriptor(wxOutputStream& stream, wxUint32 crc, + wxFileOffset compressedSize, wxFileOffset size); + + wxUint8 m_SystemMadeBy; // one of enum wxZipSystem + wxUint8 m_VersionMadeBy; // major * 10 + minor + + wxUint16 m_VersionNeeded; // ver needed to extract (20 i.e. v2.0) + wxUint16 m_Flags; + wxUint16 m_Method; // compression method (one of wxZipMethod) + wxDateTime m_DateTime; + wxUint32 m_Crc; + wxFileOffset m_CompressedSize; + wxFileOffset m_Size; + wxString m_Name; // in internal format + wxFileOffset m_Key; // the original offset for copied entries + wxFileOffset m_Offset; // file offset of the entry + + wxString m_Comment; + wxUint16 m_DiskStart; // for multidisk archives, not unsupported + wxUint16 m_InternalAttributes; // bit 0 set for text files + wxUint32 m_ExternalAttributes; // system specific depends on SystemMadeBy + + class wxZipMemory *m_Extra; + class wxZipMemory *m_LocalExtra; + + wxZipNotifier *m_zipnotifier; + class wxZipWeakLinks *m_backlink; + + friend class wxZipInputStream; + friend class wxZipOutputStream; + + DECLARE_DYNAMIC_CLASS(wxZipEntry) +}; + + +///////////////////////////////////////////////////////////////////////////// +// wxZipOutputStream + +WX_DECLARE_LIST_WITH_DECL(wxZipEntry, wxZipEntryList_, class WXDLLIMPEXP_BASE); + +class WXDLLIMPEXP_BASE wxZipOutputStream : public wxArchiveOutputStream +{ +public: + wxZipOutputStream(wxOutputStream& stream, + int level = -1, + wxMBConv& conv = wxConvLocal); + wxZipOutputStream(wxOutputStream *stream, + int level = -1, + wxMBConv& conv = wxConvLocal); + virtual WXZIPFIX ~wxZipOutputStream(); + + bool PutNextEntry(wxZipEntry *entry) { return DoCreate(entry); } + + bool WXZIPFIX PutNextEntry(const wxString& name, + const wxDateTime& dt = wxDateTime::Now(), + wxFileOffset size = wxInvalidOffset); + + bool WXZIPFIX PutNextDirEntry(const wxString& name, + const wxDateTime& dt = wxDateTime::Now()); + + bool WXZIPFIX CopyEntry(wxZipEntry *entry, wxZipInputStream& inputStream); + bool WXZIPFIX CopyArchiveMetaData(wxZipInputStream& inputStream); + + void WXZIPFIX Sync(); + bool WXZIPFIX CloseEntry(); + bool WXZIPFIX Close(); + + void SetComment(const wxString& comment) { m_Comment = comment; } + + int GetLevel() const { return m_level; } + void WXZIPFIX SetLevel(int level); + +protected: + virtual size_t WXZIPFIX OnSysWrite(const void *buffer, size_t size); + virtual wxFileOffset OnSysTell() const { return m_entrySize; } + + // this protected interface isn't yet finalised + struct Buffer { const char *m_data; size_t m_size; }; + virtual wxOutputStream* WXZIPFIX OpenCompressor(wxOutputStream& stream, + wxZipEntry& entry, + const Buffer bufs[]); + virtual bool WXZIPFIX CloseCompressor(wxOutputStream *comp); + + bool IsParentSeekable() const + { return m_offsetAdjustment != wxInvalidOffset; } + +private: + void Init(int level); + + bool WXZIPFIX PutNextEntry(wxArchiveEntry *entry); + bool WXZIPFIX CopyEntry(wxArchiveEntry *entry, wxArchiveInputStream& stream); + bool WXZIPFIX CopyArchiveMetaData(wxArchiveInputStream& stream); + + bool IsOpened() const { return m_comp || m_pending; } + + bool DoCreate(wxZipEntry *entry, bool raw = false); + void CreatePendingEntry(const void *buffer, size_t size); + void CreatePendingEntry(); + + class wxStoredOutputStream *m_store; + class wxZlibOutputStream2 *m_deflate; + class wxZipStreamLink *m_backlink; + wxZipEntryList_ m_entries; + char *m_initialData; + size_t m_initialSize; + wxZipEntry *m_pending; + bool m_raw; + wxFileOffset m_headerOffset; + size_t m_headerSize; + wxFileOffset m_entrySize; + wxUint32 m_crcAccumulator; + wxOutputStream *m_comp; + int m_level; + wxFileOffset m_offsetAdjustment; + wxString m_Comment; + bool m_endrecWritten; + + wxDECLARE_NO_COPY_CLASS(wxZipOutputStream); +}; + + +///////////////////////////////////////////////////////////////////////////// +// wxZipInputStream + +class WXDLLIMPEXP_BASE wxZipInputStream : public wxArchiveInputStream +{ +public: + typedef wxZipEntry entry_type; + + wxZipInputStream(wxInputStream& stream, wxMBConv& conv = wxConvLocal); + wxZipInputStream(wxInputStream *stream, wxMBConv& conv = wxConvLocal); + +#if WXWIN_COMPATIBILITY_2_6 && wxUSE_FFILE + wxZipInputStream(const wxString& archive, const wxString& file) + : wxArchiveInputStream(OpenFile(archive), wxConvLocal) { Init(file); } +#endif + + virtual WXZIPFIX ~wxZipInputStream(); + + bool OpenEntry(wxZipEntry& entry) { return DoOpen(&entry); } + bool WXZIPFIX CloseEntry(); + + wxZipEntry *GetNextEntry(); + + wxString WXZIPFIX GetComment(); + int WXZIPFIX GetTotalEntries(); + + virtual wxFileOffset GetLength() const { return m_entry.GetSize(); } + +protected: + size_t WXZIPFIX OnSysRead(void *buffer, size_t size); + wxFileOffset OnSysTell() const { return m_decomp ? m_decomp->TellI() : 0; } + +#if WXWIN_COMPATIBILITY_2_6 + wxFileOffset WXZIPFIX OnSysSeek(wxFileOffset seek, wxSeekMode mode); +#endif + + // this protected interface isn't yet finalised + virtual wxInputStream* WXZIPFIX OpenDecompressor(wxInputStream& stream); + virtual bool WXZIPFIX CloseDecompressor(wxInputStream *decomp); + +private: + void Init(); + void Init(const wxString& file); +#if WXWIN_COMPATIBILITY_2_6 && wxUSE_FFILE + static wxInputStream *OpenFile(const wxString& archive); +#endif + + wxArchiveEntry *DoGetNextEntry() { return GetNextEntry(); } + + bool WXZIPFIX OpenEntry(wxArchiveEntry& entry); + + wxStreamError ReadLocal(bool readEndRec = false); + wxStreamError ReadCentral(); + + wxUint32 ReadSignature(); + bool FindEndRecord(); + bool LoadEndRecord(); + + bool AtHeader() const { return m_headerSize == 0; } + bool AfterHeader() const { return m_headerSize > 0 && !m_decomp; } + bool IsOpened() const { return m_decomp != NULL; } + + wxZipStreamLink *MakeLink(wxZipOutputStream *out); + + bool DoOpen(wxZipEntry *entry = NULL, bool raw = false); + bool OpenDecompressor(bool raw = false); + + class wxStoredInputStream *m_store; + class wxZlibInputStream2 *m_inflate; + class wxRawInputStream *m_rawin; + wxZipEntry m_entry; + bool m_raw; + size_t m_headerSize; + wxUint32 m_crcAccumulator; + wxInputStream *m_decomp; + bool m_parentSeekable; + class wxZipWeakLinks *m_weaklinks; + class wxZipStreamLink *m_streamlink; + wxFileOffset m_offsetAdjustment; + wxFileOffset m_position; + wxUint32 m_signature; + size_t m_TotalEntries; + wxString m_Comment; + + friend bool wxZipOutputStream::CopyEntry( + wxZipEntry *entry, wxZipInputStream& inputStream); + friend bool wxZipOutputStream::CopyArchiveMetaData( + wxZipInputStream& inputStream); + +#if WXWIN_COMPATIBILITY_2_6 + bool m_allowSeeking; + friend class wxArchiveFSHandler; +#endif + + wxDECLARE_NO_COPY_CLASS(wxZipInputStream); +}; + + +///////////////////////////////////////////////////////////////////////////// +// Iterators + +#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR +typedef wxArchiveIterator wxZipIter; +typedef wxArchiveIterator > wxZipPairIter; +#endif + + +///////////////////////////////////////////////////////////////////////////// +// wxZipClassFactory + +class WXDLLIMPEXP_BASE wxZipClassFactory : public wxArchiveClassFactory +{ +public: + typedef wxZipEntry entry_type; + typedef wxZipInputStream instream_type; + typedef wxZipOutputStream outstream_type; + typedef wxZipNotifier notifier_type; +#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR + typedef wxZipIter iter_type; + typedef wxZipPairIter pairiter_type; +#endif + + wxZipClassFactory(); + + wxZipEntry *NewEntry() const + { return new wxZipEntry; } + wxZipInputStream *NewStream(wxInputStream& stream) const + { return new wxZipInputStream(stream, GetConv()); } + wxZipOutputStream *NewStream(wxOutputStream& stream) const + { return new wxZipOutputStream(stream, -1, GetConv()); } + wxZipInputStream *NewStream(wxInputStream *stream) const + { return new wxZipInputStream(stream, GetConv()); } + wxZipOutputStream *NewStream(wxOutputStream *stream) const + { return new wxZipOutputStream(stream, -1, GetConv()); } + + wxString GetInternalName(const wxString& name, + wxPathFormat format = wxPATH_NATIVE) const + { return wxZipEntry::GetInternalName(name, format); } + + const wxChar * const *GetProtocols(wxStreamProtocolType type + = wxSTREAM_PROTOCOL) const; + +protected: + wxArchiveEntry *DoNewEntry() const + { return NewEntry(); } + wxArchiveInputStream *DoNewStream(wxInputStream& stream) const + { return NewStream(stream); } + wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const + { return NewStream(stream); } + wxArchiveInputStream *DoNewStream(wxInputStream *stream) const + { return NewStream(stream); } + wxArchiveOutputStream *DoNewStream(wxOutputStream *stream) const + { return NewStream(stream); } + +private: + DECLARE_DYNAMIC_CLASS(wxZipClassFactory) +}; + + +///////////////////////////////////////////////////////////////////////////// +// wxZipEntry inlines + +inline bool wxZipEntry::IsText() const +{ + return (m_InternalAttributes & TEXT_ATTR) != 0; +} + +inline bool wxZipEntry::IsDir() const +{ + return (m_ExternalAttributes & wxZIP_A_SUBDIR) != 0; +} + +inline bool wxZipEntry::IsReadOnly() const +{ + return (m_ExternalAttributes & wxZIP_A_RDONLY) != 0; +} + +inline bool wxZipEntry::IsMadeByUnix() const +{ + const int pattern = + (1 << wxZIP_SYSTEM_OPENVMS) | + (1 << wxZIP_SYSTEM_UNIX) | + (1 << wxZIP_SYSTEM_ATARI_ST) | + (1 << wxZIP_SYSTEM_ACORN_RISC) | + (1 << wxZIP_SYSTEM_BEOS) | (1 << wxZIP_SYSTEM_TANDEM); + + // note: some unix zippers put madeby = dos + return (m_SystemMadeBy == wxZIP_SYSTEM_MSDOS + && (m_ExternalAttributes & ~0xFFFF)) + || ((pattern >> m_SystemMadeBy) & 1); +} + +inline void wxZipEntry::SetIsText(bool isText) +{ + if (isText) + m_InternalAttributes |= TEXT_ATTR; + else + m_InternalAttributes &= ~TEXT_ATTR; +} + +inline void wxZipEntry::SetIsReadOnly(bool isReadOnly) +{ + if (isReadOnly) + SetMode(GetMode() & ~0222); + else + SetMode(GetMode() | 0200); +} + +inline void wxZipEntry::SetName(const wxString& name, + wxPathFormat format /*=wxPATH_NATIVE*/) +{ + bool isDir; + m_Name = GetInternalName(name, format, &isDir); + SetIsDir(isDir); +} + + +#endif // wxUSE_ZIPSTREAM + +#endif // _WX_WXZIPSTREAM_H__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/include/wx/zstream.h b/3rdparty/wxwidgets3.0-3.0.1/include/wx/zstream.h new file mode 100644 index 0000000000..193bb79d4e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/include/wx/zstream.h @@ -0,0 +1,148 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/zstream.h +// Purpose: Memory stream classes +// Author: Guilhem Lavaux +// Modified by: Mike Wetherell +// Created: 11/07/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// +#ifndef _WX_WXZSTREAM_H__ +#define _WX_WXZSTREAM_H__ + +#include "wx/defs.h" + +#if wxUSE_ZLIB && wxUSE_STREAMS + +#include "wx/stream.h" +#include "wx/versioninfo.h" + +// Compression level +enum wxZlibCompressionLevels { + wxZ_DEFAULT_COMPRESSION = -1, + wxZ_NO_COMPRESSION = 0, + wxZ_BEST_SPEED = 1, + wxZ_BEST_COMPRESSION = 9 +}; + +// Flags +enum wxZLibFlags { + wxZLIB_NO_HEADER = 0, // raw deflate stream, no header or checksum + wxZLIB_ZLIB = 1, // zlib header and checksum + wxZLIB_GZIP = 2, // gzip header and checksum, requires zlib 1.2.1+ + wxZLIB_AUTO = 3 // autodetect header zlib or gzip +}; + +class WXDLLIMPEXP_BASE wxZlibInputStream: public wxFilterInputStream { + public: + wxZlibInputStream(wxInputStream& stream, int flags = wxZLIB_AUTO); + wxZlibInputStream(wxInputStream *stream, int flags = wxZLIB_AUTO); + virtual ~wxZlibInputStream(); + + char Peek() { return wxInputStream::Peek(); } + wxFileOffset GetLength() const { return wxInputStream::GetLength(); } + + static bool CanHandleGZip(); + + bool SetDictionary(const char *data, const size_t datalen); + bool SetDictionary(const wxMemoryBuffer &buf); + + protected: + size_t OnSysRead(void *buffer, size_t size); + wxFileOffset OnSysTell() const { return m_pos; } + + private: + void Init(int flags); + + protected: + size_t m_z_size; + unsigned char *m_z_buffer; + struct z_stream_s *m_inflate; + wxFileOffset m_pos; + + wxDECLARE_NO_COPY_CLASS(wxZlibInputStream); +}; + +class WXDLLIMPEXP_BASE wxZlibOutputStream: public wxFilterOutputStream { + public: + wxZlibOutputStream(wxOutputStream& stream, int level = -1, int flags = wxZLIB_ZLIB); + wxZlibOutputStream(wxOutputStream *stream, int level = -1, int flags = wxZLIB_ZLIB); + virtual ~wxZlibOutputStream() { Close(); } + + void Sync() { DoFlush(false); } + bool Close(); + wxFileOffset GetLength() const { return m_pos; } + + static bool CanHandleGZip(); + + bool SetDictionary(const char *data, const size_t datalen); + bool SetDictionary(const wxMemoryBuffer &buf); + + protected: + size_t OnSysWrite(const void *buffer, size_t size); + wxFileOffset OnSysTell() const { return m_pos; } + + virtual void DoFlush(bool final); + + private: + void Init(int level, int flags); + + protected: + size_t m_z_size; + unsigned char *m_z_buffer; + struct z_stream_s *m_deflate; + wxFileOffset m_pos; + + wxDECLARE_NO_COPY_CLASS(wxZlibOutputStream); +}; + +class WXDLLIMPEXP_BASE wxZlibClassFactory: public wxFilterClassFactory +{ +public: + wxZlibClassFactory(); + + wxFilterInputStream *NewStream(wxInputStream& stream) const + { return new wxZlibInputStream(stream); } + wxFilterOutputStream *NewStream(wxOutputStream& stream) const + { return new wxZlibOutputStream(stream, -1); } + wxFilterInputStream *NewStream(wxInputStream *stream) const + { return new wxZlibInputStream(stream); } + wxFilterOutputStream *NewStream(wxOutputStream *stream) const + { return new wxZlibOutputStream(stream, -1); } + + const wxChar * const *GetProtocols(wxStreamProtocolType type + = wxSTREAM_PROTOCOL) const; + +private: + DECLARE_DYNAMIC_CLASS(wxZlibClassFactory) +}; + +class WXDLLIMPEXP_BASE wxGzipClassFactory: public wxFilterClassFactory +{ +public: + wxGzipClassFactory(); + + wxFilterInputStream *NewStream(wxInputStream& stream) const + { return new wxZlibInputStream(stream); } + wxFilterOutputStream *NewStream(wxOutputStream& stream) const + { return new wxZlibOutputStream(stream, -1); } + wxFilterInputStream *NewStream(wxInputStream *stream) const + { return new wxZlibInputStream(stream); } + wxFilterOutputStream *NewStream(wxOutputStream *stream) const + { return new wxZlibOutputStream(stream, -1); } + + const wxChar * const *GetProtocols(wxStreamProtocolType type + = wxSTREAM_PROTOCOL) const; + +private: + DECLARE_DYNAMIC_CLASS(wxGzipClassFactory) +}; + +WXDLLIMPEXP_BASE wxVersionInfo wxGetZlibVersionInfo(); + +#endif + // wxUSE_ZLIB && wxUSE_STREAMS + +#endif + // _WX_WXZSTREAM_H__ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/accelcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/accelcmn.cpp new file mode 100644 index 0000000000..003ecbc514 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/accelcmn.cpp @@ -0,0 +1,385 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/accelcmn.cpp +// Purpose: implementation of platform-independent wxAcceleratorEntry parts +// Author: Vadim Zeitlin +// Created: 2007-05-05 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ACCEL + +#ifndef WX_PRECOMP + #include "wx/accel.h" + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/crt.h" +#endif //WX_PRECOMP + +wxAcceleratorTable wxNullAcceleratorTable; + +// ============================================================================ +// wxAcceleratorEntry implementation +// ============================================================================ + +static const struct wxKeyName +{ + wxKeyCode code; + const char *name; +} wxKeyNames[] = +{ + { WXK_DELETE, wxTRANSLATE("DEL") }, + { WXK_DELETE, wxTRANSLATE("DELETE") }, + { WXK_BACK, wxTRANSLATE("BACK") }, + { WXK_INSERT, wxTRANSLATE("INS") }, + { WXK_INSERT, wxTRANSLATE("INSERT") }, + { WXK_RETURN, wxTRANSLATE("ENTER") }, + { WXK_RETURN, wxTRANSLATE("RETURN") }, + { WXK_PAGEUP, wxTRANSLATE("PGUP") }, + { WXK_PAGEDOWN, wxTRANSLATE("PGDN") }, + { WXK_LEFT, wxTRANSLATE("LEFT") }, + { WXK_RIGHT, wxTRANSLATE("RIGHT") }, + { WXK_UP, wxTRANSLATE("UP") }, + { WXK_DOWN, wxTRANSLATE("DOWN") }, + { WXK_HOME, wxTRANSLATE("HOME") }, + { WXK_END, wxTRANSLATE("END") }, + { WXK_SPACE, wxTRANSLATE("SPACE") }, + { WXK_TAB, wxTRANSLATE("TAB") }, + { WXK_ESCAPE, wxTRANSLATE("ESC") }, + { WXK_ESCAPE, wxTRANSLATE("ESCAPE") }, + { WXK_CANCEL, wxTRANSLATE("CANCEL") }, + { WXK_CLEAR, wxTRANSLATE("CLEAR") }, + { WXK_MENU, wxTRANSLATE("MENU") }, + { WXK_PAUSE, wxTRANSLATE("PAUSE") }, + { WXK_CAPITAL, wxTRANSLATE("CAPITAL") }, + { WXK_SELECT, wxTRANSLATE("SELECT") }, + { WXK_PRINT, wxTRANSLATE("PRINT") }, + { WXK_EXECUTE, wxTRANSLATE("EXECUTE") }, + { WXK_SNAPSHOT, wxTRANSLATE("SNAPSHOT") }, + { WXK_HELP, wxTRANSLATE("HELP") }, + { WXK_ADD, wxTRANSLATE("ADD") }, + { WXK_SEPARATOR, wxTRANSLATE("SEPARATOR") }, + { WXK_SUBTRACT, wxTRANSLATE("SUBTRACT") }, + { WXK_DECIMAL, wxTRANSLATE("DECIMAL") }, + { WXK_DIVIDE, wxTRANSLATE("DIVIDE") }, + { WXK_NUMLOCK, wxTRANSLATE("NUM_LOCK") }, + { WXK_SCROLL, wxTRANSLATE("SCROLL_LOCK") }, + { WXK_PAGEUP, wxTRANSLATE("PAGEUP") }, + { WXK_PAGEDOWN, wxTRANSLATE("PAGEDOWN") }, + { WXK_NUMPAD_SPACE, wxTRANSLATE("KP_SPACE") }, + { WXK_NUMPAD_TAB, wxTRANSLATE("KP_TAB") }, + { WXK_NUMPAD_ENTER, wxTRANSLATE("KP_ENTER") }, + { WXK_NUMPAD_HOME, wxTRANSLATE("KP_HOME") }, + { WXK_NUMPAD_LEFT, wxTRANSLATE("KP_LEFT") }, + { WXK_NUMPAD_UP, wxTRANSLATE("KP_UP") }, + { WXK_NUMPAD_RIGHT, wxTRANSLATE("KP_RIGHT") }, + { WXK_NUMPAD_DOWN, wxTRANSLATE("KP_DOWN") }, + { WXK_NUMPAD_PAGEUP, wxTRANSLATE("KP_PRIOR") }, + { WXK_NUMPAD_PAGEUP, wxTRANSLATE("KP_PAGEUP") }, + { WXK_NUMPAD_PAGEDOWN, wxTRANSLATE("KP_NEXT") }, + { WXK_NUMPAD_PAGEDOWN, wxTRANSLATE("KP_PAGEDOWN") }, + { WXK_NUMPAD_END, wxTRANSLATE("KP_END") }, + { WXK_NUMPAD_BEGIN, wxTRANSLATE("KP_BEGIN") }, + { WXK_NUMPAD_INSERT, wxTRANSLATE("KP_INSERT") }, + { WXK_NUMPAD_DELETE, wxTRANSLATE("KP_DELETE") }, + { WXK_NUMPAD_EQUAL, wxTRANSLATE("KP_EQUAL") }, + { WXK_NUMPAD_MULTIPLY, wxTRANSLATE("KP_MULTIPLY") }, + { WXK_NUMPAD_ADD, wxTRANSLATE("KP_ADD") }, + { WXK_NUMPAD_SEPARATOR, wxTRANSLATE("KP_SEPARATOR") }, + { WXK_NUMPAD_SUBTRACT, wxTRANSLATE("KP_SUBTRACT") }, + { WXK_NUMPAD_DECIMAL, wxTRANSLATE("KP_DECIMAL") }, + { WXK_NUMPAD_DIVIDE, wxTRANSLATE("KP_DIVIDE") }, + { WXK_WINDOWS_LEFT, wxTRANSLATE("WINDOWS_LEFT") }, + { WXK_WINDOWS_RIGHT, wxTRANSLATE("WINDOWS_RIGHT") }, + { WXK_WINDOWS_MENU, wxTRANSLATE("WINDOWS_MENU") }, + { WXK_COMMAND, wxTRANSLATE("COMMAND") }, +}; + +// return true if the 2 strings refer to the same accel +// +// as accels can be either translated or not, check for both possibilities and +// also compare case-insensitively as the key names case doesn't count +static inline bool CompareAccelString(const wxString& str, const char *accel) +{ + return str.CmpNoCase(accel) == 0 +#if wxUSE_INTL + || str.CmpNoCase(wxGetTranslation(accel)) == 0 +#endif + ; +} + +// return prefixCode+number if the string is of the form "" and +// 0 if it isn't +// +// first and last parameter specify the valid domain for "number" part +static int IsNumberedAccelKey(const wxString& str, + const char *prefix, + wxKeyCode prefixCode, + unsigned first, + unsigned last) +{ + const size_t lenPrefix = wxStrlen(prefix); + if ( !CompareAccelString(str.Left(lenPrefix), prefix) ) + return 0; + + unsigned long num; + if ( !str.Mid(lenPrefix).ToULong(&num) ) + return 0; + + if ( num < first || num > last ) + { + // this must be a mistake, chances that this is a valid name of another + // key are vanishingly small + wxLogDebug(wxT("Invalid key string \"%s\""), str.c_str()); + return 0; + } + + return prefixCode + num - first; +} + +/* static */ +bool +wxAcceleratorEntry::ParseAccel(const wxString& text, int *flagsOut, int *keyOut) +{ + // the parser won't like trailing spaces + wxString label = text; + label.Trim(true); + + // For compatibility with the old wx versions which accepted (and actually + // even required) a TAB character in the string passed to this function we + // ignore anything up to the first TAB. Notice however that the correct + // input consists of just the accelerator itself and nothing else, this is + // done for compatibility and compatibility only. + int posTab = label.Find(wxT('\t')); + if ( posTab == wxNOT_FOUND ) + posTab = 0; + else + posTab++; + + // parse the accelerator string + int accelFlags = wxACCEL_NORMAL; + wxString current; + for ( size_t n = (size_t)posTab; n < label.length(); n++ ) + { + if ( (label[n] == '+') || (label[n] == '-') ) + { + if ( CompareAccelString(current, wxTRANSLATE("ctrl")) ) + accelFlags |= wxACCEL_CTRL; + else if ( CompareAccelString(current, wxTRANSLATE("alt")) ) + accelFlags |= wxACCEL_ALT; + else if ( CompareAccelString(current, wxTRANSLATE("shift")) ) + accelFlags |= wxACCEL_SHIFT; + else if ( CompareAccelString(current, wxTRANSLATE("rawctrl")) ) + accelFlags |= wxACCEL_RAW_CTRL; + else // not a recognized modifier name + { + // we may have "Ctrl-+", for example, but we still want to + // catch typos like "Crtl-A" so only give the warning if we + // have something before the current '+' or '-', else take + // it as a literal symbol + if ( current.empty() ) + { + current += label[n]; + + // skip clearing it below + continue; + } + else + { + wxLogDebug(wxT("Unknown accel modifier: '%s'"), + current.c_str()); + } + } + + current.clear(); + } + else // not special character + { + current += (wxChar) wxTolower(label[n]); + } + } + + int keyCode; + const size_t len = current.length(); + switch ( len ) + { + case 0: + wxLogDebug(wxT("No accel key found, accel string ignored.")); + return false; + + case 1: + // it's just a letter + keyCode = current[0U]; + + // if the key is used with any modifiers, make it an uppercase one + // because Ctrl-A and Ctrl-a are the same; but keep it as is if it's + // used alone as 'a' and 'A' are different + if ( accelFlags != wxACCEL_NORMAL ) + keyCode = wxToupper(keyCode); + break; + + default: + keyCode = IsNumberedAccelKey(current, wxTRANSLATE("F"), + WXK_F1, 1, 12); + if ( !keyCode ) + { + for ( size_t n = 0; n < WXSIZEOF(wxKeyNames); n++ ) + { + const wxKeyName& kn = wxKeyNames[n]; + if ( CompareAccelString(current, kn.name) ) + { + keyCode = kn.code; + break; + } + } + } + + if ( !keyCode ) + keyCode = IsNumberedAccelKey(current, wxTRANSLATE("KP_"), + WXK_NUMPAD0, 0, 9); + if ( !keyCode ) + keyCode = IsNumberedAccelKey(current, wxTRANSLATE("SPECIAL"), + WXK_SPECIAL1, 1, 20); + + if ( !keyCode ) + { + wxLogDebug(wxT("Unrecognized accel key '%s', accel string ignored."), + current.c_str()); + return false; + } + } + + + wxASSERT_MSG( keyCode, wxT("logic error: should have key code here") ); + + if ( flagsOut ) + *flagsOut = accelFlags; + if ( keyOut ) + *keyOut = keyCode; + + return true; +} + +/* static */ +wxAcceleratorEntry *wxAcceleratorEntry::Create(const wxString& str) +{ + const wxString accelStr = str.AfterFirst('\t'); + if ( accelStr.empty() ) + { + // It's ok to pass strings not containing any accelerators at all to + // this function, wxMenuItem code does it and we should just return + // NULL in this case. + return NULL; + } + + int flags, + keyCode; + if ( !ParseAccel(accelStr, &flags, &keyCode) ) + return NULL; + + return new wxAcceleratorEntry(flags, keyCode); +} + +bool wxAcceleratorEntry::FromString(const wxString& str) +{ + return ParseAccel(str, &m_flags, &m_keyCode); +} + +namespace +{ + +wxString PossiblyLocalize(const wxString& str, bool localize) +{ + return localize ? wxGetTranslation(str) : str; +} + +} + +wxString wxAcceleratorEntry::AsPossiblyLocalizedString(bool localized) const +{ + wxString text; + + int flags = GetFlags(); + if ( flags & wxACCEL_ALT ) + text += PossiblyLocalize(wxTRANSLATE("Alt+"), localized); + if ( flags & wxACCEL_CTRL ) + text += PossiblyLocalize(wxTRANSLATE("Ctrl+"), localized); + if ( flags & wxACCEL_SHIFT ) + text += PossiblyLocalize(wxTRANSLATE("Shift+"), localized); +#if defined(__WXMAC__) || defined(__WXCOCOA__) + if ( flags & wxACCEL_RAW_CTRL ) + text += PossiblyLocalize(wxTRANSLATE("RawCtrl+"), localized); +#endif + + const int code = GetKeyCode(); + + if ( code >= WXK_F1 && code <= WXK_F12 ) + text << PossiblyLocalize(wxTRANSLATE("F"), localized) + << code - WXK_F1 + 1; + else if ( code >= WXK_NUMPAD0 && code <= WXK_NUMPAD9 ) + text << PossiblyLocalize(wxTRANSLATE("KP_"), localized) + << code - WXK_NUMPAD0; + else if ( code >= WXK_SPECIAL1 && code <= WXK_SPECIAL20 ) + text << PossiblyLocalize(wxTRANSLATE("SPECIAL"), localized) + << code - WXK_SPECIAL1 + 1; + else // check the named keys + { + size_t n; + for ( n = 0; n < WXSIZEOF(wxKeyNames); n++ ) + { + const wxKeyName& kn = wxKeyNames[n]; + if ( code == kn.code ) + { + text << PossiblyLocalize(kn.name, localized); + break; + } + } + + if ( n == WXSIZEOF(wxKeyNames) ) + { + // must be a simple key + if ( +#if !wxUSE_UNICODE + // we can't call wxIsalnum() for non-ASCII characters in ASCII + // build as they're only defined for the ASCII range (or EOF) + wxIsascii(code) && +#endif // ANSI + wxIsprint(code) ) + { + text << (wxChar)code; + } + else + { + wxFAIL_MSG( wxT("unknown keyboard accelerator code") ); + } + } + } + + return text; +} + +wxAcceleratorEntry *wxGetAccelFromString(const wxString& label) +{ + return wxAcceleratorEntry::Create(label); +} + +#endif // wxUSE_ACCEL + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/accesscmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/accesscmn.cpp new file mode 100644 index 0000000000..660f1090df --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/accesscmn.cpp @@ -0,0 +1,25 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/accesscmn.cpp +// Author: Julian Smart +// Modified by: +// Created: 2003-02-12 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ACCESSIBILITY + +#include "wx/access.h" + +#endif + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/affinematrix2d.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/affinematrix2d.cpp new file mode 100644 index 0000000000..5013b31f15 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/affinematrix2d.cpp @@ -0,0 +1,186 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: affinematrix2d.cpp +// Purpose: implementation of wxAffineMatrix2D +// Author: Based on wxTransformMatrix by Chris Breeze, Julian Smart +// Created: 2011-04-05 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_GEOMETRY + +#include "wx/affinematrix2d.h" +#include "wx/math.h" + +// sets the matrix to the respective values +void wxAffineMatrix2D::Set(const wxMatrix2D &mat2D, const wxPoint2DDouble &tr) +{ + m_11 = mat2D.m_11; + m_12 = mat2D.m_12; + m_21 = mat2D.m_21; + m_22 = mat2D.m_22; + m_tx = tr.m_x; + m_ty = tr.m_y; +} + +// gets the component valuess of the matrix +void wxAffineMatrix2D::Get(wxMatrix2D *mat2D, wxPoint2DDouble *tr) const +{ + mat2D->m_11 = m_11; + mat2D->m_12 = m_12; + mat2D->m_21 = m_21; + mat2D->m_22 = m_22; + + if ( tr ) + { + tr->m_x = m_tx; + tr->m_y = m_ty; + } +} + +// concatenates the matrix +// | t.m_11 t.m_12 0 | | m_11 m_12 0 | +// | t.m_21 t.m_22 0 | x | m_21 m_22 0 | +// | t.m_tx t.m_ty 1 | | m_tx m_ty 1 | +void wxAffineMatrix2D::Concat(const wxAffineMatrix2DBase &t) +{ + wxMatrix2D mat; + wxPoint2DDouble tr; + t.Get(&mat, &tr); + + m_tx += tr.m_x*m_11 + tr.m_y*m_21; + m_ty += tr.m_x*m_12 + tr.m_y*m_22; + wxDouble e11 = mat.m_11*m_11 + mat.m_12*m_21; + wxDouble e12 = mat.m_11*m_12 + mat.m_12*m_22; + wxDouble e21 = mat.m_21*m_11 + mat.m_22*m_21; + m_22 = mat.m_21*m_12 + mat.m_22*m_22; + m_11 = e11; + m_12 = e12; + m_21 = e21; +} + +// makes this its inverse matrix. +// Invert +// | m_11 m_12 0 | +// | m_21 m_22 0 | +// | m_tx m_ty 1 | +bool wxAffineMatrix2D::Invert() +{ + const wxDouble det = m_11*m_22 - m_12*m_21; + + if ( !det ) + return false; + + wxDouble ex = (m_21*m_ty - m_22*m_tx) / det; + m_ty = (-m_11*m_ty + m_12*m_tx) / det; + m_tx = ex; + wxDouble e11 = m_22 / det; + m_12 = -m_12 / det; + m_21 = -m_21 / det; + m_22 = m_11 / det; + m_11 = e11; + + return true; +} + +// returns true if the elements of the transformation matrix are equal +bool wxAffineMatrix2D::IsEqual(const wxAffineMatrix2DBase& t) const +{ + wxMatrix2D mat; + wxPoint2DDouble tr; + t.Get(&mat, &tr); + + return m_11 == mat.m_11 && m_12 == mat.m_12 && + m_21 == mat.m_21 && m_22 == mat.m_22 && + m_tx == tr.m_x && m_ty == tr.m_y; +} + +// +// transformations +// + +// add the translation to this matrix +// | 1 0 0 | | m_11 m_12 0 | +// | 0 1 0 | x | m_21 m_22 0 | +// | dx dy 1 | | m_tx m_ty 1 | +void wxAffineMatrix2D::Translate(wxDouble dx, wxDouble dy) +{ + m_tx += m_11 * dx + m_21 * dy; + m_ty += m_12 * dx + m_22 * dy; +} + +// add the scale to this matrix +// | xScale 0 0 | | m_11 m_12 0 | +// | 0 yScale 0 | x | m_21 m_22 0 | +// | 0 0 1 | | m_tx m_ty 1 | +void wxAffineMatrix2D::Scale(wxDouble xScale, wxDouble yScale) +{ + m_11 *= xScale; + m_12 *= xScale; + m_21 *= yScale; + m_22 *= yScale; +} + +// add the rotation to this matrix (clockwise, radians) +// | cos sin 0 | | m_11 m_12 0 | +// | -sin cos 0 | x | m_21 m_22 0 | +// | 0 0 1 | | m_tx m_ty 1 | +void wxAffineMatrix2D::Rotate(wxDouble cRadians) +{ + wxDouble c = cos(cRadians); + wxDouble s = sin(cRadians); + + wxDouble e11 = c*m_11 + s*m_21; + wxDouble e12 = c*m_12 + s*m_22; + m_21 = c*m_21 - s*m_11; + m_22 = c*m_22 - s*m_12; + m_11 = e11; + m_12 = e12; +} + +// +// apply the transforms +// + +// applies that matrix to the point +// | m_11 m_12 0 | +// | src.m_x src._my 1 | x | m_21 m_22 0 | +// | m_tx m_ty 1 | +wxPoint2DDouble +wxAffineMatrix2D::DoTransformPoint(const wxPoint2DDouble& src) const +{ + if ( IsIdentity() ) + return src; + + return wxPoint2DDouble(src.m_x * m_11 + src.m_y * m_21 + m_tx, + src.m_x * m_12 + src.m_y * m_22 + m_ty); +} + +// applies the matrix except for translations +// | m_11 m_12 0 | +// | src.m_x src._my 0 | x | m_21 m_22 0 | +// | m_tx m_ty 1 | +wxPoint2DDouble +wxAffineMatrix2D::DoTransformDistance(const wxPoint2DDouble& src) const +{ + if ( IsIdentity() ) + return src; + + return wxPoint2DDouble(src.m_x * m_11 + src.m_y * m_21, + src.m_x * m_12 + src.m_y * m_22); +} + +bool wxAffineMatrix2D::IsIdentity() const +{ + return m_11 == 1 && m_12 == 0 && + m_21 == 0 && m_22 == 1 && + m_tx == 0 && m_ty == 0; +} + +#endif // wxUSE_GEOMETRY diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/anidecod.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/anidecod.cpp new file mode 100644 index 0000000000..d62c00b455 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/anidecod.cpp @@ -0,0 +1,368 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/anidecod.cpp +// Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation +// Author: Francesco Montorsi +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS && wxUSE_ICO_CUR + +#include "wx/anidecod.h" + +#ifndef WX_PRECOMP + #include "wx/palette.h" +#endif + +#include +#include + +// static +wxCURHandler wxANIDecoder::sm_handler; + +//--------------------------------------------------------------------------- +// wxANIFrameInfo +//--------------------------------------------------------------------------- + +class wxANIFrameInfo +{ +public: + wxANIFrameInfo(unsigned int delay = 0, int idx = -1) + { m_delay=delay; m_imageIndex=idx; } + + unsigned int m_delay; + int m_imageIndex; +}; + +#include "wx/arrimpl.cpp" // this is a magic incantation which must be done! +WX_DEFINE_OBJARRAY(wxImageArray) + +#include "wx/arrimpl.cpp" // this is a magic incantation which must be done! +WX_DEFINE_OBJARRAY(wxANIFrameInfoArray) + + +//--------------------------------------------------------------------------- +// wxANIDecoder +//--------------------------------------------------------------------------- + +wxANIDecoder::wxANIDecoder() +{ +} + +wxANIDecoder::~wxANIDecoder() +{ +} + +bool wxANIDecoder::ConvertToImage(unsigned int frame, wxImage *image) const +{ + unsigned int idx = m_info[frame].m_imageIndex; + *image = m_images[idx]; // copy + return image->IsOk(); +} + + +//--------------------------------------------------------------------------- +// Data accessors +//--------------------------------------------------------------------------- + +wxSize wxANIDecoder::GetFrameSize(unsigned int WXUNUSED(frame)) const +{ + // all frames are of the same size... + return m_szAnimation; +} + +wxPoint wxANIDecoder::GetFramePosition(unsigned int WXUNUSED(frame)) const +{ + // all frames are of the same size... + return wxPoint(0,0); +} + +wxAnimationDisposal wxANIDecoder::GetDisposalMethod(unsigned int WXUNUSED(frame)) const +{ + // this disposal is implicit for all frames inside an ANI file + return wxANIM_TOBACKGROUND; +} + +long wxANIDecoder::GetDelay(unsigned int frame) const +{ + return m_info[frame].m_delay; +} + +wxColour wxANIDecoder::GetTransparentColour(unsigned int frame) const +{ + unsigned int idx = m_info[frame].m_imageIndex; + + if (!m_images[idx].HasMask()) + return wxNullColour; + + return wxColour(m_images[idx].GetMaskRed(), + m_images[idx].GetMaskGreen(), + m_images[idx].GetMaskBlue()); +} + + +//--------------------------------------------------------------------------- +// ANI reading and decoding +//--------------------------------------------------------------------------- + +bool wxANIDecoder::DoCanRead(wxInputStream& stream) const +{ + wxInt32 FCC1, FCC2; + wxUint32 datalen; + + wxInt32 riff32; + memcpy( &riff32, "RIFF", 4 ); + wxInt32 list32; + memcpy( &list32, "LIST", 4 ); + wxInt32 ico32; + memcpy( &ico32, "icon", 4 ); + wxInt32 anih32; + memcpy( &anih32, "anih", 4 ); + + if ( stream.IsSeekable() && stream.SeekI(0) == wxInvalidOffset ) + { + return false; + } + + if ( !stream.Read(&FCC1, 4) ) + return false; + + if ( FCC1 != riff32 ) + return false; + + // we have a riff file: + while ( stream.IsOk() ) + { + if ( FCC1 == anih32 ) + return true; // found the ANIH chunk - this should be an ANI file + + // we always have a data size: + stream.Read(&datalen, 4); + datalen = wxINT32_SWAP_ON_BE(datalen) ; + + // data should be padded to make even number of bytes + if (datalen % 2 == 1) datalen ++ ; + + // now either data or a FCC: + if ( (FCC1 == riff32) || (FCC1 == list32) ) + { + stream.Read(&FCC2, 4); + } + else + { + if ( stream.SeekI(stream.TellI() + datalen) == wxInvalidOffset ) + return false; + } + + // try to read next data chunk: + if ( !stream.Read(&FCC1, 4) ) + { + // reading failed -- either EOF or IO error, bail out anyhow + return false; + } + } + + return false; +} + +// the "anih" RIFF chunk +struct wxANIHeader +{ + wxInt32 cbSizeOf; // Num bytes in AniHeader (36 bytes) + wxInt32 cFrames; // Number of unique Icons in this cursor + wxInt32 cSteps; // Number of Blits before the animation cycles + wxInt32 cx; // width of the frames + wxInt32 cy; // height of the frames + wxInt32 cBitCount; // bit depth + wxInt32 cPlanes; // 1 + wxInt32 JifRate; // Default Jiffies (1/60th of a second) if rate chunk not present. + wxInt32 flags; // Animation Flag (see AF_ constants) + + // ANI files are always little endian so we need to swap bytes on big + // endian architectures +#ifdef WORDS_BIGENDIAN + void AdjustEndianness() + { + // this works because all our fields are wxInt32 and they must be + // packed without holes between them (if they're not, they wouldn't map + // to the file header!) + wxInt32 * const start = (wxInt32 *)this; + wxInt32 * const end = start + sizeof(wxANIHeader)/sizeof(wxInt32); + for ( wxInt32 *p = start; p != end; p++ ) + { + *p = wxINT32_SWAP_ALWAYS(*p); + } + } +#else + void AdjustEndianness() { } +#endif +}; + +bool wxANIDecoder::Load( wxInputStream& stream ) +{ + wxInt32 FCC1, FCC2; + wxUint32 datalen; + unsigned int globaldelay=0; + + wxInt32 riff32; + memcpy( &riff32, "RIFF", 4 ); + wxInt32 list32; + memcpy( &list32, "LIST", 4 ); + wxInt32 ico32; + memcpy( &ico32, "icon", 4 ); + wxInt32 anih32; + memcpy( &anih32, "anih", 4 ); + wxInt32 rate32; + memcpy( &rate32, "rate", 4 ); + wxInt32 seq32; + memcpy( &seq32, "seq ", 4 ); + + if ( stream.IsSeekable() && stream.SeekI(0) == wxInvalidOffset ) + { + return false; + } + + if ( !stream.Read(&FCC1, 4) ) + return false; + if ( FCC1 != riff32 ) + return false; + + m_nFrames = 0; + m_szAnimation = wxDefaultSize; + + m_images.Clear(); + m_info.Clear(); + + // we have a riff file: + while ( !stream.Eof() ) + { + // we always have a data size: + if (!stream.Read(&datalen, 4)) + return false; + + datalen = wxINT32_SWAP_ON_BE(datalen); + + //data should be padded to make even number of bytes + if (datalen % 2 == 1) datalen++; + + // now either data or a FCC: + if ( (FCC1 == riff32) || (FCC1 == list32) ) + { + if (!stream.Read(&FCC2, 4)) + return false; + } + else if ( FCC1 == anih32 ) + { + if ( datalen != sizeof(wxANIHeader) ) + return false; + + if (m_nFrames > 0) + return false; // already parsed an ani header? + + struct wxANIHeader header; + if (!stream.Read(&header, sizeof(wxANIHeader))) + return false; + header.AdjustEndianness(); + + // we should have a global frame size + m_szAnimation = wxSize(header.cx, header.cy); + + // save interesting info from the header + m_nFrames = header.cSteps; // NB: not cFrames!! + if ( m_nFrames == 0 ) + return false; + + globaldelay = header.JifRate * 1000 / 60; + + m_images.Alloc(header.cFrames); + m_info.Add(wxANIFrameInfo(), m_nFrames); + } + else if ( FCC1 == rate32 ) + { + // did we already process the anih32 chunk? + if (m_nFrames == 0) + return false; // rate chunks should always be placed after anih chunk + + wxASSERT(m_info.GetCount() == m_nFrames); + for (unsigned int i=0; i(type_); + + wxAnyTypeToVariantDataFactoryMap& anyToVariant = m_anyToVariant; + wxAnyTypeToVariantDataFactoryMap::const_iterator it; + it = anyToVariant.find(type); + if ( it != anyToVariant.end() ) + return it->second; + + // Not found, handle pre-registrations + size_t i = m_anyToVariantRegs.size(); + while ( i > 0 ) + { + i--; + wxAnyToVariantRegistration* reg = m_anyToVariantRegs[i]; + wxAnyValueType* assocType = reg->GetAssociatedType(); + if ( assocType ) + { + // Both variant data and wxAnyValueType have been + // now been properly initialized, so remove the + // pre-registration entry and move data to anyToVarian + // map. + anyToVariant[assocType] = reg->GetFactory(); + m_anyToVariantRegs.erase( m_anyToVariantRegs.begin() + i ); + } + } + + // Then try again + it = anyToVariant.find(type); + if ( it != anyToVariant.end() ) + return it->second; + + // Finally, attempt to find a compatible type + for ( it = anyToVariant.begin(); it != anyToVariant.end(); it++ ) + { + if ( type->IsSameType(it->first) ) + { + wxVariantDataFactory f = it->second; + anyToVariant[type] = f; + return f; + } + } + + // Nothing found + return NULL; + } + +private: + wxAnyTypeToVariantDataFactoryMap m_anyToVariant; + wxVector m_anyToVariantRegs; +}; + +static wxAnyValueTypeGlobals* g_wxAnyValueTypeGlobals = NULL; + + +WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplVariantData) + +void wxPreRegisterAnyToVariant(wxAnyToVariantRegistration* reg) +{ + if ( !g_wxAnyValueTypeGlobals ) + g_wxAnyValueTypeGlobals = new wxAnyValueTypeGlobals(); + g_wxAnyValueTypeGlobals->PreRegisterAnyToVariant(reg); +} + +bool wxConvertAnyToVariant(const wxAny& any, wxVariant* variant) +{ + if ( any.IsNull() ) + { + variant->MakeNull(); + return true; + } + + // (signed) integer is a special case, because there is only one type + // in wxAny, and two ("long" and "longlong") in wxVariant. For better + // backwards compatibility, convert all values that fit in "long", + // and others to "longlong". + if ( wxANY_CHECK_TYPE(any, signed int) ) + { +#ifdef wxLongLong_t + wxLongLong_t ll = 0; + if ( any.GetAs(&ll) ) + { + // NB: Do not use LONG_MAX here. Explicitly using 32-bit + // integer constraint yields more consistent behaviour across + // builds. + if ( ll > wxINT32_MAX || ll < wxINT32_MIN ) + *variant = wxLongLong(ll); + else + *variant = (long) wxLongLong(ll).GetLo(); + } + else + { + return false; + } +#else + long l; + if ( any.GetAs(&l) ) + *variant = l; + else + return false; +#endif + return true; + } + + // Find matching factory function + wxVariantDataFactory f = + g_wxAnyValueTypeGlobals->FindVariantDataFactory(any.GetType()); + + wxVariantData* data = NULL; + + if ( f ) + { + data = f(any); + } + else + { + // Check if wxAny wrapped wxVariantData* + if ( !any.GetAs(&data) ) + { + // Ok, one last chance: while unlikely, it is possible that the + // wxAny actually contains wxVariant. + if ( wxANY_CHECK_TYPE(any, wxVariant) ) + *variant = wxANY_AS(any, wxVariant); + return false; + } + + // Wrapper's GetValue() does not increase reference + // count, se have to do it before the data gets passed + // to a new variant. + data->IncRef(); + } + + variant->SetData(data); + return true; +} + +// +// This class is to make sure that wxAnyValueType instances +// etc. get freed correctly. We must use a separate wxAnyValueTypeGlobals +// because wxModule itself is instantiated too late. +// +class wxAnyValueTypeGlobalsManager : public wxModule +{ + DECLARE_DYNAMIC_CLASS(wxAnyValueTypeGlobalsManager) +public: + wxAnyValueTypeGlobalsManager() : wxModule() { } + virtual ~wxAnyValueTypeGlobalsManager() { } + + virtual bool OnInit() + { + return true; + } + virtual void OnExit() + { + wxDELETE(g_wxAnyValueTypeGlobals); + } +private: +}; + +IMPLEMENT_DYNAMIC_CLASS(wxAnyValueTypeGlobalsManager, wxModule) + +#endif // wxUSE_VARIANT + + +//------------------------------------------------------------------------- +// Dynamic conversion member functions +//------------------------------------------------------------------------- + +// +// Define integer minimum and maximum as helpers +#ifdef wxLongLong_t + #define UseIntMin (wxINT64_MIN) + #define UseIntMax (wxINT64_MAX) + #define UseUintMax (wxUINT64_MAX) +#else + #define UseIntMin (LONG_MIN) + #define UseIntMax (LONG_MAX) + #define UseUintMax (ULONG_MAX) +#endif + +namespace +{ + +const double UseIntMinF = static_cast(UseIntMin); +const double UseIntMaxF = static_cast(UseIntMax); +const double UseUintMaxF = static_cast(UseUintMax); + +} // anonymous namespace + +bool wxAnyValueTypeImplInt::ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const +{ + wxAnyBaseIntType value = GetValue(src); + if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxString) ) + { +#ifdef wxLongLong_t + wxLongLong ll(value); + wxString s = ll.ToString(); +#else + wxString s = wxString::Format(wxS("%ld"), (long)value); +#endif + wxAnyValueTypeImpl::SetValue(s, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxAnyBaseUintType) ) + { + if ( value < 0 ) + return false; + wxAnyBaseUintType ul = (wxAnyBaseUintType) value; + wxAnyValueTypeImplUint::SetValue(ul, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, double) ) + { + double value2 = static_cast(value); + wxAnyValueTypeImplDouble::SetValue(value2, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, bool) ) + { + bool value2 = value ? true : false; + wxAnyValueTypeImpl::SetValue(value2, dst); + } + else + return false; + + return true; +} + +bool wxAnyValueTypeImplUint::ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const +{ + wxAnyBaseUintType value = GetValue(src); + if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxString) ) + { +#ifdef wxLongLong_t + wxULongLong ull(value); + wxString s = ull.ToString(); +#else + wxString s = wxString::Format(wxS("%lu"), (long)value); +#endif + wxAnyValueTypeImpl::SetValue(s, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxAnyBaseIntType) ) + { + if ( value > UseIntMax ) + return false; + wxAnyBaseIntType l = (wxAnyBaseIntType) value; + wxAnyValueTypeImplInt::SetValue(l, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, double) ) + { +#ifndef __VISUALC6__ + double value2 = static_cast(value); +#else + // VC6 doesn't implement conversion from unsigned __int64 to double + wxAnyBaseIntType value0 = static_cast(value); + double value2 = static_cast(value0); +#endif + wxAnyValueTypeImplDouble::SetValue(value2, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, bool) ) + { + bool value2 = value ? true : false; + wxAnyValueTypeImpl::SetValue(value2, dst); + } + else + return false; + + return true; +} + +// Convert wxString to destination wxAny value type +bool wxAnyConvertString(const wxString& value, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) +{ + if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxString) ) + { + wxAnyValueTypeImpl::SetValue(value, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxAnyBaseIntType) ) + { + wxAnyBaseIntType value2; +#ifdef wxLongLong_t + if ( !value.ToLongLong(&value2) ) +#else + if ( !value.ToLong(&value2) ) +#endif + return false; + wxAnyValueTypeImplInt::SetValue(value2, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxAnyBaseUintType) ) + { + wxAnyBaseUintType value2; +#ifdef wxLongLong_t + if ( !value.ToULongLong(&value2) ) +#else + if ( !value.ToULong(&value2) ) +#endif + return false; + wxAnyValueTypeImplUint::SetValue(value2, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, double) ) + { + double value2; + if ( !value.ToCDouble(&value2) ) + return false; + wxAnyValueTypeImplDouble::SetValue(value2, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, bool) ) + { + bool value2; + wxString s(value); + s.MakeLower(); + if ( s == wxS("true") || + s == wxS("yes") || + s == wxS('1') ) + value2 = true; + else if ( s == wxS("false") || + s == wxS("no") || + s == wxS('0') ) + value2 = false; + else + return false; + + wxAnyValueTypeImpl::SetValue(value2, dst); + } + else + return false; + + return true; +} + +bool wxAnyValueTypeImpl::ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const +{ + bool value = GetValue(src); + if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxAnyBaseIntType) ) + { + wxAnyBaseIntType value2 = static_cast(value); + wxAnyValueTypeImplInt::SetValue(value2, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxAnyBaseUintType) ) + { + wxAnyBaseIntType value2 = static_cast(value); + wxAnyValueTypeImplUint::SetValue(value2, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxString) ) + { + wxString s; + if ( value ) + s = wxS("true"); + else + s = wxS("false"); + wxAnyValueTypeImpl::SetValue(s, dst); + } + else + return false; + + return true; +} + +bool wxAnyValueTypeImplDouble::ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const +{ + double value = GetValue(src); + if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxAnyBaseIntType) ) + { + if ( value < UseIntMinF || value > UseIntMaxF ) + return false; + wxAnyBaseUintType ul = static_cast(value); + wxAnyValueTypeImplUint::SetValue(ul, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxAnyBaseUintType) ) + { + if ( value < 0.0 || value > UseUintMaxF ) + return false; + wxAnyBaseUintType ul = static_cast(value); + wxAnyValueTypeImplUint::SetValue(ul, dst); + } + else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxString) ) + { + wxString s = wxString::FromCDouble(value, 14); + wxAnyValueTypeImpl::SetValue(s, dst); + } + else + return false; + + return true; +} + +WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplInt) +WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplUint) +WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) +WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplDouble) + +WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplwxString) +WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplConstCharPtr) +WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplConstWchar_tPtr) + +#if wxUSE_DATETIME +WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) +#endif // wxUSE_DATETIME + +//WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) +//WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) + +//------------------------------------------------------------------------- +// wxAnyNullValueType implementation +//------------------------------------------------------------------------- + +class wxAnyNullValue +{ +protected: + // this field is unused, but can't be private to avoid Clang's + // "Private field 'm_dummy' is not used" warning + void* m_dummy; +}; + +template <> +class wxAnyValueTypeImpl : public wxAnyValueType +{ + WX_DECLARE_ANY_VALUE_TYPE(wxAnyValueTypeImpl) +public: + // Dummy implementations + virtual void DeleteValue(wxAnyValueBuffer& buf) const + { + wxUnusedVar(buf); + } + + virtual void CopyBuffer(const wxAnyValueBuffer& src, + wxAnyValueBuffer& dst) const + { + wxUnusedVar(src); + wxUnusedVar(dst); + } + + virtual bool ConvertValue(const wxAnyValueBuffer& src, + wxAnyValueType* dstType, + wxAnyValueBuffer& dst) const + { + wxUnusedVar(src); + wxUnusedVar(dstType); + wxUnusedVar(dst); + return false; + } + +#if wxUSE_EXTENDED_RTTI + virtual const wxTypeInfo* GetTypeInfo() const + { + wxFAIL_MSG("Null Type Info not available"); + return NULL; + } +#endif + +private: +}; + +WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) + +wxAnyValueType* wxAnyNullValueType = + wxAnyValueTypeImpl::GetInstance(); + +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxAnyList) + +#endif // wxUSE_ANY diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/appbase.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/appbase.cpp new file mode 100644 index 0000000000..68113d9956 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/appbase.cpp @@ -0,0 +1,1312 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/appbase.cpp +// Purpose: implements wxAppConsoleBase class +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.06.2003 (extracted from common/appcmn.cpp) +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" // includes windows.h for MessageBox() + #endif + #include "wx/list.h" + #include "wx/app.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/wxcrtvararg.h" +#endif //WX_PRECOMP + +#include "wx/apptrait.h" +#include "wx/cmdline.h" +#include "wx/confbase.h" +#include "wx/evtloop.h" +#include "wx/filename.h" +#include "wx/msgout.h" +#include "wx/scopedptr.h" +#include "wx/sysopt.h" +#include "wx/tokenzr.h" +#include "wx/thread.h" + +#if wxUSE_STL + #if wxUSE_EXCEPTIONS + #include + #include + #endif + #if wxUSE_INTL + #include + #endif +#endif // wxUSE_STL + +#if !defined(__WINDOWS__) || defined(__WXMICROWIN__) + #include // for SIGTRAP used by wxTrap() +#endif //Win/Unix + +#include + +#if wxUSE_FONTMAP + #include "wx/fontmap.h" +#endif // wxUSE_FONTMAP + +#if wxDEBUG_LEVEL + #if wxUSE_STACKWALKER + #include "wx/stackwalk.h" + #ifdef __WINDOWS__ + #include "wx/msw/debughlp.h" + #endif + #endif // wxUSE_STACKWALKER + + #include "wx/recguard.h" +#endif // wxDEBUG_LEVEL + +// wxABI_VERSION can be defined when compiling applications but it should be +// left undefined when compiling the library itself, it is then set to its +// default value in version.h +#if wxABI_VERSION != wxMAJOR_VERSION * 10000 + wxMINOR_VERSION * 100 + 99 +#error "wxABI_VERSION should not be defined when compiling the library" +#endif + +// ---------------------------------------------------------------------------- +// private functions prototypes +// ---------------------------------------------------------------------------- + +#if wxDEBUG_LEVEL + // really just show the assert dialog + static bool DoShowAssertDialog(const wxString& msg); + + // prepare for showing the assert dialog, use the given traits or + // DoShowAssertDialog() as last fallback to really show it + static + void ShowAssertDialog(const wxString& file, + int line, + const wxString& func, + const wxString& cond, + const wxString& msg, + wxAppTraits *traits = NULL); +#endif // wxDEBUG_LEVEL + +#ifdef __WXDEBUG__ + // turn on the trace masks specified in the env variable WXTRACE + static void LINKAGEMODE SetTraceMasks(); +#endif // __WXDEBUG__ + +// ---------------------------------------------------------------------------- +// global vars +// ---------------------------------------------------------------------------- + +wxAppConsole *wxAppConsoleBase::ms_appInstance = NULL; + +wxAppInitializerFunction wxAppConsoleBase::ms_appInitFn = NULL; + +wxSocketManager *wxAppTraitsBase::ms_manager = NULL; + +WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete; + +// ---------------------------------------------------------------------------- +// wxEventLoopPtr +// ---------------------------------------------------------------------------- + +// this defines wxEventLoopPtr +wxDEFINE_TIED_SCOPED_PTR_TYPE(wxEventLoopBase) + +// ============================================================================ +// wxAppConsoleBase implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// ctor/dtor +// ---------------------------------------------------------------------------- + +wxAppConsoleBase::wxAppConsoleBase() +{ + m_traits = NULL; + m_mainLoop = NULL; + m_bDoPendingEventProcessing = true; + + ms_appInstance = static_cast(this); + +#ifdef __WXDEBUG__ + SetTraceMasks(); +#if wxUSE_UNICODE + // In unicode mode the SetTraceMasks call can cause an apptraits to be + // created, but since we are still in the constructor the wrong kind will + // be created for GUI apps. Destroy it so it can be created again later. + wxDELETE(m_traits); +#endif +#endif + + wxEvtHandler::AddFilter(this); +} + +wxAppConsoleBase::~wxAppConsoleBase() +{ + wxEvtHandler::RemoveFilter(this); + + // we're being destroyed and using this object from now on may not work or + // even crash so don't leave dangling pointers to it + ms_appInstance = NULL; + + delete m_traits; +} + +// ---------------------------------------------------------------------------- +// initialization/cleanup +// ---------------------------------------------------------------------------- + +bool wxAppConsoleBase::Initialize(int& WXUNUSED(argc), wxChar **WXUNUSED(argv)) +{ +#if defined(__WINDOWS__) && !defined(__WXWINCE__) + SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); +#endif + + return true; +} + +wxString wxAppConsoleBase::GetAppName() const +{ + wxString name = m_appName; + if ( name.empty() ) + { + if ( argv ) + { + // the application name is, by default, the name of its executable file + wxFileName::SplitPath(argv[0], NULL, &name, NULL); + } + } + return name; +} + +wxString wxAppConsoleBase::GetAppDisplayName() const +{ + // use the explicitly provided display name, if any + if ( !m_appDisplayName.empty() ) + return m_appDisplayName; + + // if the application name was explicitly set, use it as is as capitalizing + // it won't always produce good results + if ( !m_appName.empty() ) + return m_appName; + + // if neither is set, use the capitalized version of the program file as + // it's the most reasonable default + return GetAppName().Capitalize(); +} + +wxEventLoopBase *wxAppConsoleBase::CreateMainLoop() +{ + return GetTraits()->CreateEventLoop(); +} + +void wxAppConsoleBase::CleanUp() +{ + wxDELETE(m_mainLoop); +} + +// ---------------------------------------------------------------------------- +// OnXXX() callbacks +// ---------------------------------------------------------------------------- + +bool wxAppConsoleBase::OnInit() +{ +#if wxUSE_CMDLINE_PARSER + wxCmdLineParser parser(argc, argv); + + OnInitCmdLine(parser); + + bool cont; + switch ( parser.Parse(false /* don't show usage */) ) + { + case -1: + cont = OnCmdLineHelp(parser); + break; + + case 0: + cont = OnCmdLineParsed(parser); + break; + + default: + cont = OnCmdLineError(parser); + break; + } + + if ( !cont ) + return false; +#endif // wxUSE_CMDLINE_PARSER + + return true; +} + +int wxAppConsoleBase::OnRun() +{ + return MainLoop(); +} + +void wxAppConsoleBase::OnLaunched() +{ +} + +int wxAppConsoleBase::OnExit() +{ +#if wxUSE_CONFIG + // delete the config object if any (don't use Get() here, but Set() + // because Get() could create a new config object) + delete wxConfigBase::Set(NULL); +#endif // wxUSE_CONFIG + + return 0; +} + +void wxAppConsoleBase::Exit() +{ + if (m_mainLoop != NULL) + ExitMainLoop(); + else + exit(-1); +} + +// ---------------------------------------------------------------------------- +// traits stuff +// ---------------------------------------------------------------------------- + +wxAppTraits *wxAppConsoleBase::CreateTraits() +{ + return new wxConsoleAppTraits; +} + +wxAppTraits *wxAppConsoleBase::GetTraits() +{ + // FIXME-MT: protect this with a CS? + if ( !m_traits ) + { + m_traits = CreateTraits(); + + wxASSERT_MSG( m_traits, wxT("wxApp::CreateTraits() failed?") ); + } + + return m_traits; +} + +/* static */ +wxAppTraits *wxAppConsoleBase::GetTraitsIfExists() +{ + wxAppConsole * const app = GetInstance(); + return app ? app->GetTraits() : NULL; +} + +/* static */ +wxAppTraits& wxAppConsoleBase::GetValidTraits() +{ + static wxConsoleAppTraits s_traitsConsole; + wxAppTraits* const traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + + return traits ? *traits : s_traitsConsole; +} + +// ---------------------------------------------------------------------------- +// wxEventLoop redirection +// ---------------------------------------------------------------------------- + +int wxAppConsoleBase::MainLoop() +{ + wxEventLoopBaseTiedPtr mainLoop(&m_mainLoop, CreateMainLoop()); + + if (wxTheApp) + wxTheApp->OnLaunched(); + + return m_mainLoop ? m_mainLoop->Run() : -1; +} + +void wxAppConsoleBase::ExitMainLoop() +{ + // we should exit from the main event loop, not just any currently active + // (e.g. modal dialog) event loop + if ( m_mainLoop && m_mainLoop->IsRunning() ) + { + m_mainLoop->Exit(0); + } +} + +bool wxAppConsoleBase::Pending() +{ + // use the currently active message loop here, not m_mainLoop, because if + // we're showing a modal dialog (with its own event loop) currently the + // main event loop is not running anyhow + wxEventLoopBase * const loop = wxEventLoopBase::GetActive(); + + return loop && loop->Pending(); +} + +bool wxAppConsoleBase::Dispatch() +{ + // see comment in Pending() + wxEventLoopBase * const loop = wxEventLoopBase::GetActive(); + + return loop && loop->Dispatch(); +} + +bool wxAppConsoleBase::Yield(bool onlyIfNeeded) +{ + wxEventLoopBase * const loop = wxEventLoopBase::GetActive(); + if ( loop ) + return loop->Yield(onlyIfNeeded); + + wxScopedPtr tmpLoop(CreateMainLoop()); + return tmpLoop->Yield(onlyIfNeeded); +} + +void wxAppConsoleBase::WakeUpIdle() +{ + wxEventLoopBase * const loop = wxEventLoopBase::GetActive(); + + if ( loop ) + loop->WakeUp(); +} + +bool wxAppConsoleBase::ProcessIdle() +{ + // synthesize an idle event and check if more of them are needed + wxIdleEvent event; + event.SetEventObject(this); + ProcessEvent(event); + +#if wxUSE_LOG + // flush the logged messages if any (do this after processing the events + // which could have logged new messages) + wxLog::FlushActive(); +#endif + + // Garbage collect all objects previously scheduled for destruction. + DeletePendingObjects(); + + return event.MoreRequested(); +} + +bool wxAppConsoleBase::UsesEventLoop() const +{ + // in console applications we don't know whether we're going to have an + // event loop so assume we won't -- unless we already have one running + return wxEventLoopBase::GetActive() != NULL; +} + +// ---------------------------------------------------------------------------- +// events +// ---------------------------------------------------------------------------- + +/* static */ +bool wxAppConsoleBase::IsMainLoopRunning() +{ + const wxAppConsole * const app = GetInstance(); + + return app && app->m_mainLoop != NULL; +} + +int wxAppConsoleBase::FilterEvent(wxEvent& WXUNUSED(event)) +{ + // process the events normally by default + return Event_Skip; +} + +void wxAppConsoleBase::DelayPendingEventHandler(wxEvtHandler* toDelay) +{ + wxENTER_CRIT_SECT(m_handlersWithPendingEventsLocker); + + // move the handler from the list of handlers with processable pending events + // to the list of handlers with pending events which needs to be processed later + m_handlersWithPendingEvents.Remove(toDelay); + + if (m_handlersWithPendingDelayedEvents.Index(toDelay) == wxNOT_FOUND) + m_handlersWithPendingDelayedEvents.Add(toDelay); + + wxLEAVE_CRIT_SECT(m_handlersWithPendingEventsLocker); +} + +void wxAppConsoleBase::RemovePendingEventHandler(wxEvtHandler* toRemove) +{ + wxENTER_CRIT_SECT(m_handlersWithPendingEventsLocker); + + if (m_handlersWithPendingEvents.Index(toRemove) != wxNOT_FOUND) + { + m_handlersWithPendingEvents.Remove(toRemove); + + // check that the handler was present only once in the list + wxASSERT_MSG( m_handlersWithPendingEvents.Index(toRemove) == wxNOT_FOUND, + "Handler occurs twice in the m_handlersWithPendingEvents list!" ); + } + //else: it wasn't in this list at all, it's ok + + if (m_handlersWithPendingDelayedEvents.Index(toRemove) != wxNOT_FOUND) + { + m_handlersWithPendingDelayedEvents.Remove(toRemove); + + // check that the handler was present only once in the list + wxASSERT_MSG( m_handlersWithPendingDelayedEvents.Index(toRemove) == wxNOT_FOUND, + "Handler occurs twice in m_handlersWithPendingDelayedEvents list!" ); + } + //else: it wasn't in this list at all, it's ok + + wxLEAVE_CRIT_SECT(m_handlersWithPendingEventsLocker); +} + +void wxAppConsoleBase::AppendPendingEventHandler(wxEvtHandler* toAppend) +{ + wxENTER_CRIT_SECT(m_handlersWithPendingEventsLocker); + + if ( m_handlersWithPendingEvents.Index(toAppend) == wxNOT_FOUND ) + m_handlersWithPendingEvents.Add(toAppend); + + wxLEAVE_CRIT_SECT(m_handlersWithPendingEventsLocker); +} + +bool wxAppConsoleBase::HasPendingEvents() const +{ + wxENTER_CRIT_SECT(const_cast(this)->m_handlersWithPendingEventsLocker); + + bool has = !m_handlersWithPendingEvents.IsEmpty(); + + wxLEAVE_CRIT_SECT(const_cast(this)->m_handlersWithPendingEventsLocker); + + return has; +} + +void wxAppConsoleBase::SuspendProcessingOfPendingEvents() +{ + m_bDoPendingEventProcessing = false; +} + +void wxAppConsoleBase::ResumeProcessingOfPendingEvents() +{ + m_bDoPendingEventProcessing = true; +} + +void wxAppConsoleBase::ProcessPendingEvents() +{ + if ( m_bDoPendingEventProcessing ) + { + wxENTER_CRIT_SECT(m_handlersWithPendingEventsLocker); + + wxCHECK_RET( m_handlersWithPendingDelayedEvents.IsEmpty(), + "this helper list should be empty" ); + + // iterate until the list becomes empty: the handlers remove themselves + // from it when they don't have any more pending events + while (!m_handlersWithPendingEvents.IsEmpty()) + { + // In ProcessPendingEvents(), new handlers might be added + // and we can safely leave the critical section here. + wxLEAVE_CRIT_SECT(m_handlersWithPendingEventsLocker); + + // NOTE: we always call ProcessPendingEvents() on the first event handler + // with pending events because handlers auto-remove themselves + // from this list (see RemovePendingEventHandler) if they have no + // more pending events. + m_handlersWithPendingEvents[0]->ProcessPendingEvents(); + + wxENTER_CRIT_SECT(m_handlersWithPendingEventsLocker); + } + + // now the wxHandlersWithPendingEvents is surely empty; however some event + // handlers may have moved themselves into wxHandlersWithPendingDelayedEvents + // because of a selective wxYield call in progress. + // Now we need to move them back to wxHandlersWithPendingEvents so the next + // call to this function has the chance of processing them: + if (!m_handlersWithPendingDelayedEvents.IsEmpty()) + { + WX_APPEND_ARRAY(m_handlersWithPendingEvents, m_handlersWithPendingDelayedEvents); + m_handlersWithPendingDelayedEvents.Clear(); + } + + wxLEAVE_CRIT_SECT(m_handlersWithPendingEventsLocker); + } +} + +void wxAppConsoleBase::DeletePendingEvents() +{ + wxENTER_CRIT_SECT(m_handlersWithPendingEventsLocker); + + wxCHECK_RET( m_handlersWithPendingDelayedEvents.IsEmpty(), + "this helper list should be empty" ); + + for (unsigned int i=0; iDeletePendingEvents(); + + m_handlersWithPendingEvents.Clear(); + + wxLEAVE_CRIT_SECT(m_handlersWithPendingEventsLocker); +} + +// ---------------------------------------------------------------------------- +// delayed objects destruction +// ---------------------------------------------------------------------------- + +bool wxAppConsoleBase::IsScheduledForDestruction(wxObject *object) const +{ + return wxPendingDelete.Member(object); +} + +void wxAppConsoleBase::ScheduleForDestruction(wxObject *object) +{ + if ( !UsesEventLoop() ) + { + // we won't be able to delete it later so do it right now + delete object; + return; + } + //else: we either already have or will soon start an event loop + + if ( !wxPendingDelete.Member(object) ) + wxPendingDelete.Append(object); +} + +void wxAppConsoleBase::DeletePendingObjects() +{ + wxList::compatibility_iterator node = wxPendingDelete.GetFirst(); + while (node) + { + wxObject *obj = node->GetData(); + + // remove it from the list first so that if we get back here somehow + // during the object deletion (e.g. wxYield called from its dtor) we + // wouldn't try to delete it the second time + if ( wxPendingDelete.Member(obj) ) + wxPendingDelete.Erase(node); + + delete obj; + + // Deleting one object may have deleted other pending + // objects, so start from beginning of list again. + node = wxPendingDelete.GetFirst(); + } +} + +// ---------------------------------------------------------------------------- +// exception handling +// ---------------------------------------------------------------------------- + +#if wxUSE_EXCEPTIONS + +void +wxAppConsoleBase::HandleEvent(wxEvtHandler *handler, + wxEventFunction func, + wxEvent& event) const +{ + // by default, simply call the handler + (handler->*func)(event); +} + +void wxAppConsoleBase::CallEventHandler(wxEvtHandler *handler, + wxEventFunctor& functor, + wxEvent& event) const +{ + // If the functor holds a method then, for backward compatibility, call + // HandleEvent(): + wxEventFunction eventFunction = functor.GetEvtMethod(); + + if ( eventFunction ) + HandleEvent(handler, eventFunction, event); + else + functor(handler, event); +} + +void wxAppConsoleBase::OnUnhandledException() +{ +#ifdef __WXDEBUG__ + // we're called from an exception handler so we can re-throw the exception + // to recover its type + wxString what; + try + { + throw; + } +#if wxUSE_STL + catch ( std::exception& e ) + { + what.Printf("std::exception of type \"%s\", what() = \"%s\"", + typeid(e).name(), e.what()); + } +#endif // wxUSE_STL + catch ( ... ) + { + what = "unknown exception"; + } + + wxMessageOutputBest().Printf( + "*** Caught unhandled %s; terminating\n", what + ); +#endif // __WXDEBUG__ +} + +// ---------------------------------------------------------------------------- +// exceptions support +// ---------------------------------------------------------------------------- + +bool wxAppConsoleBase::OnExceptionInMainLoop() +{ + throw; + + // some compilers are too stupid to know that we never return after throw +#if defined(__DMC__) || (defined(_MSC_VER) && _MSC_VER < 1200) + return false; +#endif +} + +#endif // wxUSE_EXCEPTIONS + +// ---------------------------------------------------------------------------- +// cmd line parsing +// ---------------------------------------------------------------------------- + +#if wxUSE_CMDLINE_PARSER + +#define OPTION_VERBOSE "verbose" + +void wxAppConsoleBase::OnInitCmdLine(wxCmdLineParser& parser) +{ + // the standard command line options + static const wxCmdLineEntryDesc cmdLineDesc[] = + { + { + wxCMD_LINE_SWITCH, + "h", + "help", + gettext_noop("show this help message"), + wxCMD_LINE_VAL_NONE, + wxCMD_LINE_OPTION_HELP + }, + +#if wxUSE_LOG + { + wxCMD_LINE_SWITCH, + NULL, + OPTION_VERBOSE, + gettext_noop("generate verbose log messages"), + wxCMD_LINE_VAL_NONE, + 0x0 + }, +#endif // wxUSE_LOG + + // terminator + wxCMD_LINE_DESC_END + }; + + parser.SetDesc(cmdLineDesc); +} + +bool wxAppConsoleBase::OnCmdLineParsed(wxCmdLineParser& parser) +{ +#if wxUSE_LOG + if ( parser.Found(OPTION_VERBOSE) ) + { + wxLog::SetVerbose(true); + } +#else + wxUnusedVar(parser); +#endif // wxUSE_LOG + + return true; +} + +bool wxAppConsoleBase::OnCmdLineHelp(wxCmdLineParser& parser) +{ + parser.Usage(); + + return false; +} + +bool wxAppConsoleBase::OnCmdLineError(wxCmdLineParser& parser) +{ + parser.Usage(); + + return false; +} + +#endif // wxUSE_CMDLINE_PARSER + +// ---------------------------------------------------------------------------- +// debugging support +// ---------------------------------------------------------------------------- + +/* static */ +bool wxAppConsoleBase::CheckBuildOptions(const char *optionsSignature, + const char *componentName) +{ +#if 0 // can't use wxLogTrace, not up and running yet + printf("checking build options object '%s' (ptr %p) in '%s'\n", + optionsSignature, optionsSignature, componentName); +#endif + + if ( strcmp(optionsSignature, WX_BUILD_OPTIONS_SIGNATURE) != 0 ) + { + wxString lib = wxString::FromAscii(WX_BUILD_OPTIONS_SIGNATURE); + wxString prog = wxString::FromAscii(optionsSignature); + wxString progName = wxString::FromAscii(componentName); + wxString msg; + + msg.Printf(wxT("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."), + lib.c_str(), progName.c_str(), prog.c_str()); + + wxLogFatalError(msg.c_str()); + + // normally wxLogFatalError doesn't return + return false; + } + + return true; +} + +void wxAppConsoleBase::OnAssertFailure(const wxChar *file, + int line, + const wxChar *func, + const wxChar *cond, + const wxChar *msg) +{ +#if wxDEBUG_LEVEL + ShowAssertDialog(file, line, func, cond, msg, GetTraits()); +#else + // this function is still present even in debug level 0 build for ABI + // compatibility reasons but is never called there and so can simply do + // nothing in it + wxUnusedVar(file); + wxUnusedVar(line); + wxUnusedVar(func); + wxUnusedVar(cond); + wxUnusedVar(msg); +#endif // wxDEBUG_LEVEL/!wxDEBUG_LEVEL +} + +void wxAppConsoleBase::OnAssert(const wxChar *file, + int line, + const wxChar *cond, + const wxChar *msg) +{ + OnAssertFailure(file, line, NULL, cond, msg); +} + +// ---------------------------------------------------------------------------- +// Miscellaneous other methods +// ---------------------------------------------------------------------------- + +void wxAppConsoleBase::SetCLocale() +{ + // We want to use the user locale by default in GUI applications in order + // to show the numbers, dates &c in the familiar format -- and also accept + // this format on input (especially important for decimal comma/dot). + wxSetlocale(LC_ALL, ""); +} + +// ============================================================================ +// other classes implementations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxConsoleAppTraitsBase +// ---------------------------------------------------------------------------- + +#if wxUSE_LOG + +wxLog *wxConsoleAppTraitsBase::CreateLogTarget() +{ + return new wxLogStderr; +} + +#endif // wxUSE_LOG + +wxMessageOutput *wxConsoleAppTraitsBase::CreateMessageOutput() +{ + return new wxMessageOutputStderr; +} + +#if wxUSE_FONTMAP + +wxFontMapper *wxConsoleAppTraitsBase::CreateFontMapper() +{ + return (wxFontMapper *)new wxFontMapperBase; +} + +#endif // wxUSE_FONTMAP + +wxRendererNative *wxConsoleAppTraitsBase::CreateRenderer() +{ + // console applications don't use renderers + return NULL; +} + +bool wxConsoleAppTraitsBase::ShowAssertDialog(const wxString& msg) +{ + return wxAppTraitsBase::ShowAssertDialog(msg); +} + +bool wxConsoleAppTraitsBase::HasStderr() +{ + // console applications always have stderr, even under Mac/Windows + return true; +} + +// ---------------------------------------------------------------------------- +// wxAppTraits +// ---------------------------------------------------------------------------- + +#if wxUSE_THREADS +void wxMutexGuiEnterImpl(); +void wxMutexGuiLeaveImpl(); + +void wxAppTraitsBase::MutexGuiEnter() +{ + wxMutexGuiEnterImpl(); +} + +void wxAppTraitsBase::MutexGuiLeave() +{ + wxMutexGuiLeaveImpl(); +} + +void WXDLLIMPEXP_BASE wxMutexGuiEnter() +{ + wxAppTraits * const traits = wxAppConsoleBase::GetTraitsIfExists(); + if ( traits ) + traits->MutexGuiEnter(); +} + +void WXDLLIMPEXP_BASE wxMutexGuiLeave() +{ + wxAppTraits * const traits = wxAppConsoleBase::GetTraitsIfExists(); + if ( traits ) + traits->MutexGuiLeave(); +} +#endif // wxUSE_THREADS + +bool wxAppTraitsBase::ShowAssertDialog(const wxString& msgOriginal) +{ +#if wxDEBUG_LEVEL + wxString msg; + +#if wxUSE_STACKWALKER + const wxString stackTrace = GetAssertStackTrace(); + if ( !stackTrace.empty() ) + { + msg << wxT("\n\nCall stack:\n") << stackTrace; + + wxMessageOutputDebug().Output(msg); + } +#endif // wxUSE_STACKWALKER + + return DoShowAssertDialog(msgOriginal + msg); +#else // !wxDEBUG_LEVEL + wxUnusedVar(msgOriginal); + + return false; +#endif // wxDEBUG_LEVEL/!wxDEBUG_LEVEL +} + +#if wxUSE_STACKWALKER +wxString wxAppTraitsBase::GetAssertStackTrace() +{ +#if wxDEBUG_LEVEL + +#if !defined(__WINDOWS__) + // on Unix stack frame generation may take some time, depending on the + // size of the executable mainly... warn the user that we are working + wxFprintf(stderr, "Collecting stack trace information, please wait..."); + fflush(stderr); +#endif // !__WINDOWS__ + + + wxString stackTrace; + + class StackDump : public wxStackWalker + { + public: + StackDump() { } + + const wxString& GetStackTrace() const { return m_stackTrace; } + + protected: + virtual void OnStackFrame(const wxStackFrame& frame) + { + m_stackTrace << wxString::Format + ( + wxT("[%02d] "), + wx_truncate_cast(int, frame.GetLevel()) + ); + + wxString name = frame.GetName(); + if ( !name.empty() ) + { + m_stackTrace << wxString::Format(wxT("%-40s"), name.c_str()); + } + else + { + m_stackTrace << wxString::Format(wxT("%p"), frame.GetAddress()); + } + + if ( frame.HasSourceLocation() ) + { + m_stackTrace << wxT('\t') + << frame.GetFileName() + << wxT(':') + << frame.GetLine(); + } + + m_stackTrace << wxT('\n'); + } + + private: + wxString m_stackTrace; + }; + + // don't show more than maxLines or we could get a dialog too tall to be + // shown on screen: 20 should be ok everywhere as even with 15 pixel high + // characters it is still only 300 pixels... + static const int maxLines = 20; + + StackDump dump; + dump.Walk(8, maxLines); // 8 is chosen to hide all OnAssert() calls + stackTrace = dump.GetStackTrace(); + + const int count = stackTrace.Freq(wxT('\n')); + for ( int i = 0; i < count - maxLines; i++ ) + stackTrace = stackTrace.BeforeLast(wxT('\n')); + + return stackTrace; +#else // !wxDEBUG_LEVEL + // this function is still present for ABI-compatibility even in debug level + // 0 build but is not used there and so can simply do nothing + return wxString(); +#endif // wxDEBUG_LEVEL/!wxDEBUG_LEVEL +} +#endif // wxUSE_STACKWALKER + + +// ============================================================================ +// global functions implementation +// ============================================================================ + +void wxExit() +{ + if ( wxTheApp ) + { + wxTheApp->Exit(); + } + else + { + // what else can we do? + exit(-1); + } +} + +void wxWakeUpIdle() +{ + if ( wxTheApp ) + { + wxTheApp->WakeUpIdle(); + } + //else: do nothing, what can we do? +} + +// wxASSERT() helper +bool wxAssertIsEqual(int x, int y) +{ + return x == y; +} + +void wxAbort() +{ +#ifdef __WXWINCE__ + ExitThread(3); +#else + abort(); +#endif +} + +#if wxDEBUG_LEVEL + +// break into the debugger +#ifndef wxTrap + +void wxTrap() +{ +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) + DebugBreak(); +#elif defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS + Debugger(); +#elif defined(__UNIX__) + raise(SIGTRAP); +#else + // TODO +#endif // Win/Unix +} + +#endif // wxTrap already defined as a macro + +// default assert handler +static void +wxDefaultAssertHandler(const wxString& file, + int line, + const wxString& func, + const wxString& cond, + const wxString& msg) +{ + // If this option is set, we should abort immediately when assert happens. + if ( wxSystemOptions::GetOptionInt("exit-on-assert") ) + wxAbort(); + + // FIXME MT-unsafe + static int s_bInAssert = 0; + + wxRecursionGuard guard(s_bInAssert); + if ( guard.IsInside() ) + { + // can't use assert here to avoid infinite loops, so just trap + wxTrap(); + + return; + } + + if ( !wxTheApp ) + { + // by default, show the assert dialog box -- we can't customize this + // behaviour + ShowAssertDialog(file, line, func, cond, msg); + } + else + { + // let the app process it as it wants + // FIXME-UTF8: use wc_str(), not c_str(), when ANSI build is removed + wxTheApp->OnAssertFailure(file.c_str(), line, func.c_str(), + cond.c_str(), msg.c_str()); + } +} + +wxAssertHandler_t wxTheAssertHandler = wxDefaultAssertHandler; + +void wxSetDefaultAssertHandler() +{ + wxTheAssertHandler = wxDefaultAssertHandler; +} + +void wxOnAssert(const wxString& file, + int line, + const wxString& func, + const wxString& cond, + const wxString& msg) +{ + wxTheAssertHandler(file, line, func, cond, msg); +} + +void wxOnAssert(const wxString& file, + int line, + const wxString& func, + const wxString& cond) +{ + wxTheAssertHandler(file, line, func, cond, wxString()); +} + +void wxOnAssert(const wxChar *file, + int line, + const char *func, + const wxChar *cond, + const wxChar *msg) +{ + // this is the backwards-compatible version (unless we don't use Unicode) + // so it could be called directly from the user code and this might happen + // even when wxTheAssertHandler is NULL +#if wxUSE_UNICODE + if ( wxTheAssertHandler ) +#endif // wxUSE_UNICODE + wxTheAssertHandler(file, line, func, cond, msg); +} + +void wxOnAssert(const char *file, + int line, + const char *func, + const char *cond, + const wxString& msg) +{ + wxTheAssertHandler(file, line, func, cond, msg); +} + +void wxOnAssert(const char *file, + int line, + const char *func, + const char *cond, + const wxCStrData& msg) +{ + wxTheAssertHandler(file, line, func, cond, msg); +} + +#if wxUSE_UNICODE +void wxOnAssert(const char *file, + int line, + const char *func, + const char *cond) +{ + wxTheAssertHandler(file, line, func, cond, wxString()); +} + +void wxOnAssert(const char *file, + int line, + const char *func, + const char *cond, + const char *msg) +{ + wxTheAssertHandler(file, line, func, cond, msg); +} + +void wxOnAssert(const char *file, + int line, + const char *func, + const char *cond, + const wxChar *msg) +{ + wxTheAssertHandler(file, line, func, cond, msg); +} +#endif // wxUSE_UNICODE + +#endif // wxDEBUG_LEVEL + +// ============================================================================ +// private functions implementation +// ============================================================================ + +#ifdef __WXDEBUG__ + +static void LINKAGEMODE SetTraceMasks() +{ +#if wxUSE_LOG + wxString mask; + if ( wxGetEnv(wxT("WXTRACE"), &mask) ) + { + wxStringTokenizer tkn(mask, wxT(",;:")); + while ( tkn.HasMoreTokens() ) + wxLog::AddTraceMask(tkn.GetNextToken()); + } +#endif // wxUSE_LOG +} + +#endif // __WXDEBUG__ + +#if wxDEBUG_LEVEL + +bool wxTrapInAssert = false; + +static +bool DoShowAssertDialog(const wxString& msg) +{ + // under Windows we can show the dialog even in the console mode +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) + wxString msgDlg(msg); + + // this message is intentionally not translated -- it is for developers + // only -- and the less code we use here, less is the danger of recursively + // asserting and dying + msgDlg += wxT("\nDo you want to stop the program?\n") + wxT("You can also choose [Cancel] to suppress ") + wxT("further warnings."); + + switch ( ::MessageBox(NULL, msgDlg.t_str(), wxT("wxWidgets Debug Alert"), + MB_YESNOCANCEL | MB_ICONSTOP ) ) + { + case IDYES: + // If we called wxTrap() directly from here, the programmer would + // see this function and a few more calls between his own code and + // it in the stack trace which would be perfectly useless and often + // confusing. So instead just set the flag here and let the macros + // defined in wx/debug.h call wxTrap() themselves, this ensures + // that the debugger will show the line in the user code containing + // the failing assert. + wxTrapInAssert = true; + break; + + case IDCANCEL: + // stop the asserts + return true; + + //case IDNO: nothing to do + } +#else // !__WINDOWS__ + wxUnusedVar(msg); +#endif // __WINDOWS__/!__WINDOWS__ + + // continue with the asserts by default + return false; +} + +// show the standard assert dialog +static +void ShowAssertDialog(const wxString& file, + int line, + const wxString& func, + const wxString& cond, + const wxString& msgUser, + wxAppTraits *traits) +{ + // this variable can be set to true to suppress "assert failure" messages + static bool s_bNoAsserts = false; + + wxString msg; + msg.reserve(2048); + + // make life easier for people using VC++ IDE by using this format: like + // this, clicking on the message will take us immediately to the place of + // the failed assert + msg.Printf(wxT("%s(%d): assert \"%s\" failed"), file, line, cond); + + // add the function name, if any + if ( !func.empty() ) + msg << wxT(" in ") << func << wxT("()"); + + // and the message itself + if ( !msgUser.empty() ) + { + msg << wxT(": ") << msgUser; + } + else // no message given + { + msg << wxT('.'); + } + +#if wxUSE_THREADS + // if we are not in the main thread, output the assert directly and trap + // since dialogs cannot be displayed + if ( !wxThread::IsMain() ) + { + msg += wxString::Format(" [in thread %lx]", wxThread::GetCurrentId()); + } +#endif // wxUSE_THREADS + + // log the assert in any case + wxMessageOutputDebug().Output(msg); + + if ( !s_bNoAsserts ) + { + if ( traits ) + { + // delegate showing assert dialog (if possible) to that class + s_bNoAsserts = traits->ShowAssertDialog(msg); + } + else // no traits object + { + // fall back to the function of last resort + s_bNoAsserts = DoShowAssertDialog(msg); + } + } +} + +#endif // wxDEBUG_LEVEL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/appcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/appcmn.cpp new file mode 100644 index 0000000000..821f695bac --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/appcmn.cpp @@ -0,0 +1,507 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/appcmn.cpp +// Purpose: wxAppBase methods common to all platforms +// Author: Vadim Zeitlin +// Modified by: +// Created: 18.10.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/window.h" + #include "wx/bitmap.h" + #include "wx/log.h" + #include "wx/msgdlg.h" + #include "wx/confbase.h" + #include "wx/utils.h" + #include "wx/wxcrtvararg.h" +#endif + +#include "wx/apptrait.h" +#include "wx/cmdline.h" +#include "wx/msgout.h" +#include "wx/thread.h" +#include "wx/vidmode.h" +#include "wx/evtloop.h" + +#if wxUSE_FONTMAP + #include "wx/fontmap.h" +#endif // wxUSE_FONTMAP + +// DLL options compatibility check: +#include "wx/build.h" +WX_CHECK_BUILD_OPTIONS("wxCore") + +// ============================================================================ +// wxAppBase implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// initialization +// ---------------------------------------------------------------------------- + +wxAppBase::wxAppBase() +{ + m_topWindow = NULL; + + m_useBestVisual = false; + m_forceTrueColour = false; + + m_isActive = true; + + // We don't want to exit the app if the user code shows a dialog from its + // OnInit() -- but this is what would happen if we set m_exitOnFrameDelete + // to Yes initially as this dialog would be the last top level window. + // OTOH, if we set it to No initially we'll have to overwrite it with Yes + // when we enter our OnRun() because we do want the default behaviour from + // then on. But this would be a problem if the user code calls + // SetExitOnFrameDelete(false) from OnInit(). + // + // So we use the special "Later" value which is such that + // GetExitOnFrameDelete() returns false for it but which we know we can + // safely (i.e. without losing the effect of the users SetExitOnFrameDelete + // call) overwrite in OnRun() + m_exitOnFrameDelete = Later; +} + +bool wxAppBase::Initialize(int& argcOrig, wxChar **argvOrig) +{ +#ifdef __WXOSX__ + // Mac OS X passes a process serial number command line argument when + // the application is launched from the Finder. This argument must be + // removed from the command line arguments before being handled by the + // application (otherwise applications would need to handle it) + // + // Notice that this has to be done for all ports that can be used under OS + // X (e.g. wxGTK) and not just wxOSX itself, hence this code is here and + // not in a port-specific file. + if ( argcOrig > 1 ) + { + static const wxChar *ARG_PSN = wxT("-psn_"); + if ( wxStrncmp(argvOrig[1], ARG_PSN, wxStrlen(ARG_PSN)) == 0 ) + { + // remove this argument + --argcOrig; + memmove(argvOrig + 1, argvOrig + 2, argcOrig * sizeof(wxChar*)); + } + } +#endif // __WXOSX__ + + if ( !wxAppConsole::Initialize(argcOrig, argvOrig) ) + return false; + + wxInitializeStockLists(); + + wxBitmap::InitStandardHandlers(); + + // for compatibility call the old initialization function too + if ( !OnInitGui() ) + return false; + + return true; +} + +// ---------------------------------------------------------------------------- +// cleanup +// ---------------------------------------------------------------------------- + +wxAppBase::~wxAppBase() +{ + // this destructor is required for Darwin +} + +void wxAppBase::CleanUp() +{ + // clean up all the pending objects + DeletePendingObjects(); + + // and any remaining TLWs (they remove themselves from wxTopLevelWindows + // when destroyed, so iterate until none are left) + while ( !wxTopLevelWindows.empty() ) + { + // do not use Destroy() here as it only puts the TLW in pending list + // but we want to delete them now + delete wxTopLevelWindows.GetFirst()->GetData(); + } + + // undo everything we did in Initialize() above + wxBitmap::CleanUpHandlers(); + + wxStockGDI::DeleteAll(); + + wxDeleteStockLists(); + + wxDELETE(wxTheColourDatabase); + + wxAppConsole::CleanUp(); +} + +// ---------------------------------------------------------------------------- +// various accessors +// ---------------------------------------------------------------------------- + +wxWindow* wxAppBase::GetTopWindow() const +{ + wxWindow* window = m_topWindow; + if (window == NULL && wxTopLevelWindows.GetCount() > 0) + window = wxTopLevelWindows.GetFirst()->GetData(); + return window; +} + +wxVideoMode wxAppBase::GetDisplayMode() const +{ + return wxVideoMode(); +} + +wxLayoutDirection wxAppBase::GetLayoutDirection() const +{ +#if wxUSE_INTL + const wxLocale *const locale = wxGetLocale(); + if ( locale ) + { + const wxLanguageInfo *const + info = wxLocale::GetLanguageInfo(locale->GetLanguage()); + + if ( info ) + return info->LayoutDirection; + } +#endif // wxUSE_INTL + + // we don't know + return wxLayout_Default; +} + +#if wxUSE_CMDLINE_PARSER + +// ---------------------------------------------------------------------------- +// GUI-specific command line options handling +// ---------------------------------------------------------------------------- + +#define OPTION_THEME "theme" +#define OPTION_MODE "mode" + +void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser) +{ + // first add the standard non GUI options + wxAppConsole::OnInitCmdLine(parser); + + // the standard command line options + static const wxCmdLineEntryDesc cmdLineGUIDesc[] = + { +#ifdef __WXUNIVERSAL__ + { + wxCMD_LINE_OPTION, + NULL, + OPTION_THEME, + gettext_noop("specify the theme to use"), + wxCMD_LINE_VAL_STRING, + 0x0 + }, +#endif // __WXUNIVERSAL__ + +#if defined(__WXDFB__) + // VS: this is not specific to wxDFB, all fullscreen (framebuffer) ports + // should provide this option. That's why it is in common/appcmn.cpp + // and not dfb/app.cpp + { + wxCMD_LINE_OPTION, + NULL, + OPTION_MODE, + gettext_noop("specify display mode to use (e.g. 640x480-16)"), + wxCMD_LINE_VAL_STRING, + 0x0 + }, +#endif // __WXDFB__ + + // terminator + wxCMD_LINE_DESC_END + }; + + parser.SetDesc(cmdLineGUIDesc); +} + +bool wxAppBase::OnCmdLineParsed(wxCmdLineParser& parser) +{ +#ifdef __WXUNIVERSAL__ + wxString themeName; + if ( parser.Found(OPTION_THEME, &themeName) ) + { + wxTheme *theme = wxTheme::Create(themeName); + if ( !theme ) + { + wxLogError(_("Unsupported theme '%s'."), themeName.c_str()); + return false; + } + + // Delete the defaultly created theme and set the new theme. + delete wxTheme::Get(); + wxTheme::Set(theme); + } +#endif // __WXUNIVERSAL__ + +#if defined(__WXDFB__) + wxString modeDesc; + if ( parser.Found(OPTION_MODE, &modeDesc) ) + { + unsigned w, h, bpp; + if ( wxSscanf(modeDesc.c_str(), wxT("%ux%u-%u"), &w, &h, &bpp) != 3 ) + { + wxLogError(_("Invalid display mode specification '%s'."), modeDesc.c_str()); + return false; + } + + if ( !SetDisplayMode(wxVideoMode(w, h, bpp)) ) + return false; + } +#endif // __WXDFB__ + + return wxAppConsole::OnCmdLineParsed(parser); +} + +#endif // wxUSE_CMDLINE_PARSER + +// ---------------------------------------------------------------------------- +// OnXXX() hooks +// ---------------------------------------------------------------------------- + +bool wxAppBase::OnInitGui() +{ +#ifdef __WXUNIVERSAL__ + if ( !wxTheme::Get() && !wxTheme::CreateDefault() ) + return false; +#endif // __WXUNIVERSAL__ + + return true; +} + +int wxAppBase::OnRun() +{ + // see the comment in ctor: if the initial value hasn't been changed, use + // the default Yes from now on + if ( m_exitOnFrameDelete == Later ) + { + m_exitOnFrameDelete = Yes; + } + //else: it has been changed, assume the user knows what he is doing + + return wxAppConsole::OnRun(); +} + +int wxAppBase::OnExit() +{ +#ifdef __WXUNIVERSAL__ + delete wxTheme::Set(NULL); +#endif // __WXUNIVERSAL__ + + return wxAppConsole::OnExit(); +} + +wxAppTraits *wxAppBase::CreateTraits() +{ + return new wxGUIAppTraits; +} + +// ---------------------------------------------------------------------------- +// misc +// ---------------------------------------------------------------------------- + +void wxAppBase::SetActive(bool active, wxWindow * WXUNUSED(lastFocus)) +{ + if ( active == m_isActive ) + return; + + m_isActive = active; + + wxActivateEvent event(wxEVT_ACTIVATE_APP, active); + event.SetEventObject(this); + + (void)ProcessEvent(event); +} + +bool wxAppBase::SafeYield(wxWindow *win, bool onlyIfNeeded) +{ + wxWindowDisabler wd(win); + + wxEventLoopBase * const loop = wxEventLoopBase::GetActive(); + + return loop && loop->Yield(onlyIfNeeded); +} + +bool wxAppBase::SafeYieldFor(wxWindow *win, long eventsToProcess) +{ + wxWindowDisabler wd(win); + + wxEventLoopBase * const loop = wxEventLoopBase::GetActive(); + + return loop && loop->YieldFor(eventsToProcess); +} + + +// ---------------------------------------------------------------------------- +// idle handling +// ---------------------------------------------------------------------------- + +// Returns true if more time is needed. +bool wxAppBase::ProcessIdle() +{ + // call the base class version first to send the idle event to wxTheApp + // itself + bool needMore = wxAppConsoleBase::ProcessIdle(); + wxIdleEvent event; + wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); + while (node) + { + wxWindow* win = node->GetData(); + + // Don't send idle events to the windows that are about to be destroyed + // anyhow, this is wasteful and unexpected. + if ( !wxPendingDelete.Member(win) && win->SendIdleEvents(event) ) + needMore = true; + node = node->GetNext(); + } + + wxUpdateUIEvent::ResetUpdateTime(); + + return needMore; +} + +// ---------------------------------------------------------------------------- +// wxGUIAppTraitsBase +// ---------------------------------------------------------------------------- + +#if wxUSE_LOG + +wxLog *wxGUIAppTraitsBase::CreateLogTarget() +{ +#if wxUSE_LOGGUI +#ifndef __WXOSX_IPHONE__ + return new wxLogGui; +#else + return new wxLogStderr; +#endif +#else + // we must have something! + return new wxLogStderr; +#endif +} + +#endif // wxUSE_LOG + +wxMessageOutput *wxGUIAppTraitsBase::CreateMessageOutput() +{ + // The standard way of printing help on command line arguments (app --help) + // is (according to common practice): + // - console apps: to stderr (on any platform) + // - GUI apps: stderr on Unix platforms (!) + // stderr if available and message box otherwise on others + // (currently stderr only Windows if app running from console) +#ifdef __UNIX__ + return new wxMessageOutputStderr; +#else // !__UNIX__ + // wxMessageOutputMessageBox doesn't work under Motif + #ifdef __WXMOTIF__ + return new wxMessageOutputLog; + #elif wxUSE_MSGDLG + return new wxMessageOutputBest(wxMSGOUT_PREFER_STDERR); + #else + return new wxMessageOutputStderr; + #endif +#endif // __UNIX__/!__UNIX__ +} + +#if wxUSE_FONTMAP + +wxFontMapper *wxGUIAppTraitsBase::CreateFontMapper() +{ + return new wxFontMapper; +} + +#endif // wxUSE_FONTMAP + +wxRendererNative *wxGUIAppTraitsBase::CreateRenderer() +{ + // use the default native renderer by default + return NULL; +} + +bool wxGUIAppTraitsBase::ShowAssertDialog(const wxString& msg) +{ +#if wxDEBUG_LEVEL + // under MSW we prefer to use the base class version using ::MessageBox() + // even if wxMessageBox() is available because it has less chances to + // double fault our app than our wxMessageBox() + // + // under DFB the message dialog is not always functional right now + // + // and finally we can't use wxMessageBox() if it wasn't compiled in, of + // course +#if !defined(__WXMSW__) && !defined(__WXDFB__) && wxUSE_MSGDLG + + // we can't (safely) show the GUI dialog from another thread, only do it + // for the asserts in the main thread + if ( wxIsMainThread() ) + { + wxString msgDlg = msg; + +#if wxUSE_STACKWALKER + const wxString stackTrace = GetAssertStackTrace(); + if ( !stackTrace.empty() ) + msgDlg << wxT("\n\nCall stack:\n") << stackTrace; +#endif // wxUSE_STACKWALKER + + // this message is intentionally not translated -- it is for + // developpers only + msgDlg += wxT("\nDo you want to stop the program?\n") + wxT("You can also choose [Cancel] to suppress ") + wxT("further warnings."); + + switch ( wxMessageBox(msgDlg, wxT("wxWidgets Debug Alert"), + wxYES_NO | wxCANCEL | wxICON_STOP ) ) + { + case wxYES: + wxTrap(); + break; + + case wxCANCEL: + // no more asserts + return true; + + //case wxNO: nothing to do + } + + return false; + } +#endif // wxUSE_MSGDLG +#endif // wxDEBUG_LEVEL + + return wxAppTraitsBase::ShowAssertDialog(msg); +} + +bool wxGUIAppTraitsBase::HasStderr() +{ + // we consider that under Unix stderr always goes somewhere, even if the + // user doesn't always see it under GUI desktops +#ifdef __UNIX__ + return true; +#else + return false; +#endif +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/arcall.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/arcall.cpp new file mode 100644 index 0000000000..49776dcce5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/arcall.cpp @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/arcall.cpp +// Purpose: wxArchive link all archive streams +// Author: Mike Wetherell +// Copyright: (c) 2006 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ARCHIVE_STREAMS + +#if wxUSE_ZIPSTREAM +#include "wx/zipstrm.h" +#endif +#if wxUSE_TARSTREAM +#include "wx/tarstrm.h" +#endif + +// Reference archive classes to ensure they are linked into a statically +// linked program that uses Find or GetFirst to look for an archive handler. +// It is in its own file so that the user can override this behaviour by +// providing their own implementation. + +void wxUseArchiveClasses() +{ +#if wxUSE_ZIPSTREAM + wxZipClassFactory(); +#endif +#if wxUSE_TARSTREAM + wxTarClassFactory(); +#endif +} + +#endif // wxUSE_ARCHIVE_STREAMS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/arcfind.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/arcfind.cpp new file mode 100644 index 0000000000..6f90d5cc50 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/arcfind.cpp @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/arcfind.cpp +// Purpose: Streams for archive formats +// Author: Mike Wetherell +// Copyright: (c) Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ARCHIVE_STREAMS + +#include "wx/archive.h" + +// These functions are in a separate file so that statically linked apps +// that do not call them to search for archive handlers will only link in +// the archive classes they use. + +const wxArchiveClassFactory * +wxArchiveClassFactory::Find(const wxString& protocol, wxStreamProtocolType type) +{ + for (const wxArchiveClassFactory *f = GetFirst(); f; f = f->GetNext()) + if (f->CanHandle(protocol, type)) + return f; + + return NULL; +} + +// static +const wxArchiveClassFactory *wxArchiveClassFactory::GetFirst() +{ + if (!sm_first) + wxUseArchiveClasses(); + return sm_first; +} + +#endif // wxUSE_ARCHIVE_STREAMS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/archive.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/archive.cpp new file mode 100644 index 0000000000..360f22936c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/archive.cpp @@ -0,0 +1,97 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/archive.cpp +// Purpose: Streams for archive formats +// Author: Mike Wetherell +// Copyright: (c) Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS + +#include "wx/archive.h" + +IMPLEMENT_ABSTRACT_CLASS(wxArchiveEntry, wxObject) +IMPLEMENT_ABSTRACT_CLASS(wxArchiveClassFactory, wxFilterClassFactoryBase) + + +///////////////////////////////////////////////////////////////////////////// +// wxArchiveInputStream + +wxArchiveInputStream::wxArchiveInputStream(wxInputStream& stream, + wxMBConv& conv) + : wxFilterInputStream(stream), + m_conv(conv) +{ +} + +wxArchiveInputStream::wxArchiveInputStream(wxInputStream *stream, + wxMBConv& conv) + : wxFilterInputStream(stream), + m_conv(conv) +{ +} + + +///////////////////////////////////////////////////////////////////////////// +// wxArchiveOutputStream + +wxArchiveOutputStream::wxArchiveOutputStream(wxOutputStream& stream, + wxMBConv& conv) + : wxFilterOutputStream(stream), + m_conv(conv) +{ +} + +wxArchiveOutputStream::wxArchiveOutputStream(wxOutputStream *stream, + wxMBConv& conv) + : wxFilterOutputStream(stream), + m_conv(conv) +{ +} + + +///////////////////////////////////////////////////////////////////////////// +// wxArchiveEntry + +void wxArchiveEntry::SetNotifier(wxArchiveNotifier& notifier) +{ + UnsetNotifier(); + m_notifier = ¬ifier; + m_notifier->OnEntryUpdated(*this); +} + +wxArchiveEntry& wxArchiveEntry::operator=(const wxArchiveEntry& WXUNUSED(e)) +{ + m_notifier = NULL; + return *this; +} + + +///////////////////////////////////////////////////////////////////////////// +// wxArchiveClassFactory + +wxArchiveClassFactory *wxArchiveClassFactory::sm_first = NULL; + +void wxArchiveClassFactory::Remove() +{ + if (m_next != this) + { + wxArchiveClassFactory **pp = &sm_first; + + while (*pp != this) + pp = &(*pp)->m_next; + + *pp = m_next; + + m_next = this; + } +} + +#endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/arrstr.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/arrstr.cpp new file mode 100644 index 0000000000..f66fcdd4ee --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/arrstr.cpp @@ -0,0 +1,565 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/arrstr.cpp +// Purpose: wxArrayString class +// Author: Vadim Zeitlin +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// headers, declarations, constants +// =========================================================================== + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/arrstr.h" + +#include "wx/beforestd.h" +#include +#include +#include "wx/afterstd.h" + +// ============================================================================ +// ArrayString +// ============================================================================ + +wxArrayString::wxArrayString(size_t sz, const char** a) +{ +#if !wxUSE_STD_CONTAINERS + Init(false); +#endif + for (size_t i=0; i < sz; i++) + Add(a[i]); +} + +wxArrayString::wxArrayString(size_t sz, const wchar_t** a) +{ +#if !wxUSE_STD_CONTAINERS + Init(false); +#endif + for (size_t i=0; i < sz; i++) + Add(a[i]); +} + +wxArrayString::wxArrayString(size_t sz, const wxString* a) +{ +#if !wxUSE_STD_CONTAINERS + Init(false); +#endif + for (size_t i=0; i < sz; i++) + Add(a[i]); +} + +#if !wxUSE_STD_CONTAINERS + +// size increment = min(50% of current size, ARRAY_MAXSIZE_INCREMENT) +#define ARRAY_MAXSIZE_INCREMENT 4096 + +#ifndef ARRAY_DEFAULT_INITIAL_SIZE // also defined in dynarray.h +#define ARRAY_DEFAULT_INITIAL_SIZE (16) +#endif + +// ctor +void wxArrayString::Init(bool autoSort) +{ + m_nSize = + m_nCount = 0; + m_pItems = NULL; + m_autoSort = autoSort; +} + +// copy ctor +wxArrayString::wxArrayString(const wxArrayString& src) +{ + Init(src.m_autoSort); + + *this = src; +} + +// assignment operator +wxArrayString& wxArrayString::operator=(const wxArrayString& src) +{ + if ( m_nSize > 0 ) + Clear(); + + Copy(src); + + m_autoSort = src.m_autoSort; + + return *this; +} + +void wxArrayString::Copy(const wxArrayString& src) +{ + if ( src.m_nCount > ARRAY_DEFAULT_INITIAL_SIZE ) + Alloc(src.m_nCount); + + for ( size_t n = 0; n < src.m_nCount; n++ ) + Add(src[n]); +} + +// grow the array +void wxArrayString::Grow(size_t nIncrement) +{ + // only do it if no more place + if ( (m_nSize - m_nCount) < nIncrement ) { + // if ARRAY_DEFAULT_INITIAL_SIZE were set to 0, the initially empty would + // be never resized! + #if ARRAY_DEFAULT_INITIAL_SIZE == 0 + #error "ARRAY_DEFAULT_INITIAL_SIZE must be > 0!" + #endif + + if ( m_nSize == 0 ) { + // was empty, alloc some memory + m_nSize = ARRAY_DEFAULT_INITIAL_SIZE; + if (m_nSize < nIncrement) + m_nSize = nIncrement; + m_pItems = new wxString[m_nSize]; + } + else { + // otherwise when it's called for the first time, nIncrement would be 0 + // and the array would never be expanded + // add 50% but not too much + size_t ndefIncrement = m_nSize < ARRAY_DEFAULT_INITIAL_SIZE + ? ARRAY_DEFAULT_INITIAL_SIZE : m_nSize >> 1; + if ( ndefIncrement > ARRAY_MAXSIZE_INCREMENT ) + ndefIncrement = ARRAY_MAXSIZE_INCREMENT; + if ( nIncrement < ndefIncrement ) + nIncrement = ndefIncrement; + m_nSize += nIncrement; + wxString *pNew = new wxString[m_nSize]; + + // copy data to new location + for ( size_t j = 0; j < m_nCount; j++ ) + pNew[j] = m_pItems[j]; + + // delete old memory (but do not release the strings!) + delete [] m_pItems; + + m_pItems = pNew; + } + } +} + +// deletes all the strings from the list +void wxArrayString::Empty() +{ + m_nCount = 0; +} + +// as Empty, but also frees memory +void wxArrayString::Clear() +{ + m_nSize = + m_nCount = 0; + + wxDELETEA(m_pItems); +} + +// dtor +wxArrayString::~wxArrayString() +{ + delete [] m_pItems; +} + +void wxArrayString::reserve(size_t nSize) +{ + Alloc(nSize); +} + +// pre-allocates memory (frees the previous data!) +void wxArrayString::Alloc(size_t nSize) +{ + // only if old buffer was not big enough + if ( nSize > m_nSize ) { + wxString *pNew = new wxString[nSize]; + if ( !pNew ) + return; + + for ( size_t j = 0; j < m_nCount; j++ ) + pNew[j] = m_pItems[j]; + delete [] m_pItems; + + m_pItems = pNew; + m_nSize = nSize; + } +} + +// minimizes the memory usage by freeing unused memory +void wxArrayString::Shrink() +{ + // only do it if we have some memory to free + if( m_nCount < m_nSize ) { + // allocates exactly as much memory as we need + wxString *pNew = new wxString[m_nCount]; + + // copy data to new location + for ( size_t j = 0; j < m_nCount; j++ ) + pNew[j] = m_pItems[j]; + delete [] m_pItems; + m_pItems = pNew; + m_nSize = m_nCount; + } +} + +// searches the array for an item (forward or backwards) +int wxArrayString::Index(const wxString& str, bool bCase, bool bFromEnd) const +{ + if ( m_autoSort ) { + // use binary search in the sorted array + wxASSERT_MSG( bCase && !bFromEnd, + wxT("search parameters ignored for auto sorted array") ); + + size_t i, + lo = 0, + hi = m_nCount; + int res; + while ( lo < hi ) { + i = (lo + hi)/2; + + res = str.compare(m_pItems[i]); + if ( res < 0 ) + hi = i; + else if ( res > 0 ) + lo = i + 1; + else + return i; + } + + return wxNOT_FOUND; + } + else { + // use linear search in unsorted array + if ( bFromEnd ) { + if ( m_nCount > 0 ) { + size_t ui = m_nCount; + do { + if ( m_pItems[--ui].IsSameAs(str, bCase) ) + return ui; + } + while ( ui != 0 ); + } + } + else { + for( size_t ui = 0; ui < m_nCount; ui++ ) { + if( m_pItems[ui].IsSameAs(str, bCase) ) + return ui; + } + } + } + + return wxNOT_FOUND; +} + +// add item at the end +size_t wxArrayString::Add(const wxString& str, size_t nInsert) +{ + if ( m_autoSort ) { + // insert the string at the correct position to keep the array sorted + size_t i, + lo = 0, + hi = m_nCount; + int res; + while ( lo < hi ) { + i = (lo + hi)/2; + + res = str.Cmp(m_pItems[i]); + if ( res < 0 ) + hi = i; + else if ( res > 0 ) + lo = i + 1; + else { + lo = hi = i; + break; + } + } + + wxASSERT_MSG( lo == hi, wxT("binary search broken") ); + + Insert(str, lo, nInsert); + + return (size_t)lo; + } + else { + Grow(nInsert); + + for (size_t i = 0; i < nInsert; i++) + { + // just append + m_pItems[m_nCount + i] = str; + } + size_t ret = m_nCount; + m_nCount += nInsert; + return ret; + } +} + +// add item at the given position +void wxArrayString::Insert(const wxString& str, size_t nIndex, size_t nInsert) +{ + wxCHECK_RET( nIndex <= m_nCount, wxT("bad index in wxArrayString::Insert") ); + wxCHECK_RET( m_nCount <= m_nCount + nInsert, + wxT("array size overflow in wxArrayString::Insert") ); + + Grow(nInsert); + + for (int j = m_nCount - nIndex - 1; j >= 0; j--) + m_pItems[nIndex + nInsert + j] = m_pItems[nIndex + j]; + + for (size_t i = 0; i < nInsert; i++) + { + m_pItems[nIndex + i] = str; + } + m_nCount += nInsert; +} + +// range insert (STL 23.2.4.3) +void +wxArrayString::insert(iterator it, const_iterator first, const_iterator last) +{ + const int idx = it - begin(); + + // grow it once + Grow(last - first); + + // reset "it" since it can change inside Grow() + it = begin() + idx; + + while ( first != last ) + { + it = insert(it, *first); + + // insert returns an iterator to the last element inserted but we need + // insert the next after this one, that is before the next one + ++it; + + ++first; + } +} + +void wxArrayString::resize(size_type n, value_type v) +{ + if ( n < m_nCount ) + m_nCount = n; + else if ( n > m_nCount ) + Add(v, n - m_nCount); +} + +// expand the array +void wxArrayString::SetCount(size_t count) +{ + Alloc(count); + + wxString s; + while ( m_nCount < count ) + m_pItems[m_nCount++] = s; +} + +// removes item from array (by index) +void wxArrayString::RemoveAt(size_t nIndex, size_t nRemove) +{ + wxCHECK_RET( nIndex < m_nCount, wxT("bad index in wxArrayString::Remove") ); + wxCHECK_RET( nIndex + nRemove <= m_nCount, + wxT("removing too many elements in wxArrayString::Remove") ); + + for ( size_t j = 0; j < m_nCount - nIndex -nRemove; j++) + m_pItems[nIndex + j] = m_pItems[nIndex + nRemove + j]; + + m_nCount -= nRemove; +} + +// removes item from array (by value) +void wxArrayString::Remove(const wxString& sz) +{ + int iIndex = Index(sz); + + wxCHECK_RET( iIndex != wxNOT_FOUND, + wxT("removing inexistent element in wxArrayString::Remove") ); + + RemoveAt(iIndex); +} + +// ---------------------------------------------------------------------------- +// sorting +// ---------------------------------------------------------------------------- + +// we need an adaptor as our predicates use qsort() convention and so return +// negative, null or positive value depending on whether the first item is less +// than, equal to or greater than the other one while we need a real boolean +// predicate now that we use std::sort() +struct wxSortPredicateAdaptor +{ + wxSortPredicateAdaptor(wxArrayString::CompareFunction compareFunction) + : m_compareFunction(compareFunction) + { + } + + bool operator()(const wxString& first, const wxString& second) const + { + return (*m_compareFunction)(first, second) < 0; + } + + wxArrayString::CompareFunction m_compareFunction; +}; + +void wxArrayString::Sort(CompareFunction compareFunction) +{ + wxCHECK_RET( !m_autoSort, wxT("can't use this method with sorted arrays") ); + + std::sort(m_pItems, m_pItems + m_nCount, + wxSortPredicateAdaptor(compareFunction)); +} + +struct wxSortPredicateAdaptor2 +{ + wxSortPredicateAdaptor2(wxArrayString::CompareFunction2 compareFunction) + : m_compareFunction(compareFunction) + { + } + + bool operator()(const wxString& first, const wxString& second) const + { + return (*m_compareFunction)(const_cast(&first), + const_cast(&second)) < 0; + } + + wxArrayString::CompareFunction2 m_compareFunction; +}; + +void wxArrayString::Sort(CompareFunction2 compareFunction) +{ + std::sort(m_pItems, m_pItems + m_nCount, + wxSortPredicateAdaptor2(compareFunction)); +} + +void wxArrayString::Sort(bool reverseOrder) +{ + if ( reverseOrder ) + std::sort(m_pItems, m_pItems + m_nCount, std::greater()); + else // normal sort + std::sort(m_pItems, m_pItems + m_nCount); +} + +bool wxArrayString::operator==(const wxArrayString& a) const +{ + if ( m_nCount != a.m_nCount ) + return false; + + for ( size_t n = 0; n < m_nCount; n++ ) + { + if ( Item(n) != a[n] ) + return false; + } + + return true; +} + +#endif // !wxUSE_STD_CONTAINERS + +// =========================================================================== +// wxJoin and wxSplit +// =========================================================================== + +#include "wx/tokenzr.h" + +wxString wxJoin(const wxArrayString& arr, const wxChar sep, const wxChar escape) +{ + size_t count = arr.size(); + if ( count == 0 ) + return wxEmptyString; + + wxString str; + + // pre-allocate memory using the estimation of the average length of the + // strings in the given array: this is very imprecise, of course, but + // better than nothing + str.reserve(count*(arr[0].length() + arr[count-1].length()) / 2); + + if ( escape == wxT('\0') ) + { + // escaping is disabled: + for ( size_t i = 0; i < count; i++ ) + { + if ( i ) + str += sep; + str += arr[i]; + } + } + else // use escape character + { + for ( size_t n = 0; n < count; n++ ) + { + if ( n ) + str += sep; + + for ( wxString::const_iterator i = arr[n].begin(), + end = arr[n].end(); + i != end; + ++i ) + { + const wxChar ch = *i; + if ( ch == sep ) + str += escape; // escape this separator + str += ch; + } + } + } + + str.Shrink(); // release extra memory if we allocated too much + return str; +} + +wxArrayString wxSplit(const wxString& str, const wxChar sep, const wxChar escape) +{ + if ( escape == wxT('\0') ) + { + // simple case: we don't need to honour the escape character + return wxStringTokenize(str, sep, wxTOKEN_RET_EMPTY_ALL); + } + + wxArrayString ret; + wxString curr; + wxChar prev = wxT('\0'); + + for ( wxString::const_iterator i = str.begin(), + end = str.end(); + i != end; + ++i ) + { + const wxChar ch = *i; + + if ( ch == sep ) + { + if ( prev == escape ) + { + // remove the escape character and don't consider this + // occurrence of 'sep' as a real separator + *curr.rbegin() = sep; + } + else // real separator + { + ret.push_back(curr); + curr.clear(); + } + } + else // normal character + { + curr += ch; + } + + prev = ch; + } + + // add the last token + if ( !curr.empty() || prev == sep ) + ret.Add(curr); + + return ret; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/artprov.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/artprov.cpp new file mode 100644 index 0000000000..f2551614d4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/artprov.cpp @@ -0,0 +1,462 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/artprov.cpp +// Purpose: wxArtProvider class +// Author: Vaclav Slavik +// Modified by: +// Created: 18/03/2002 +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#include "wx/artprov.h" + +#ifndef WX_PRECOMP + #include "wx/list.h" + #include "wx/log.h" + #include "wx/hashmap.h" + #include "wx/image.h" + #include "wx/module.h" +#endif + +// =========================================================================== +// implementation +// =========================================================================== + +#include "wx/listimpl.cpp" +WX_DECLARE_LIST(wxArtProvider, wxArtProvidersList); +WX_DEFINE_LIST(wxArtProvidersList) + +// ---------------------------------------------------------------------------- +// Cache class - stores already requested bitmaps +// ---------------------------------------------------------------------------- + +WX_DECLARE_EXPORTED_STRING_HASH_MAP(wxBitmap, wxArtProviderBitmapsHash); +WX_DECLARE_EXPORTED_STRING_HASH_MAP(wxIconBundle, wxArtProviderIconBundlesHash); + +class WXDLLEXPORT wxArtProviderCache +{ +public: + bool GetBitmap(const wxString& full_id, wxBitmap* bmp); + void PutBitmap(const wxString& full_id, const wxBitmap& bmp) + { m_bitmapsHash[full_id] = bmp; } + + bool GetIconBundle(const wxString& full_id, wxIconBundle* bmp); + void PutIconBundle(const wxString& full_id, const wxIconBundle& iconbundle) + { m_iconBundlesHash[full_id] = iconbundle; } + + void Clear(); + + static wxString ConstructHashID(const wxArtID& id, + const wxArtClient& client, + const wxSize& size); + + static wxString ConstructHashID(const wxArtID& id, + const wxArtClient& client); + +private: + wxArtProviderBitmapsHash m_bitmapsHash; // cache of wxBitmaps + wxArtProviderIconBundlesHash m_iconBundlesHash; // cache of wxIconBundles +}; + +bool wxArtProviderCache::GetBitmap(const wxString& full_id, wxBitmap* bmp) +{ + wxArtProviderBitmapsHash::iterator entry = m_bitmapsHash.find(full_id); + if ( entry == m_bitmapsHash.end() ) + { + return false; + } + else + { + *bmp = entry->second; + return true; + } +} + +bool wxArtProviderCache::GetIconBundle(const wxString& full_id, wxIconBundle* bmp) +{ + wxArtProviderIconBundlesHash::iterator entry = m_iconBundlesHash.find(full_id); + if ( entry == m_iconBundlesHash.end() ) + { + return false; + } + else + { + *bmp = entry->second; + return true; + } +} + +void wxArtProviderCache::Clear() +{ + m_bitmapsHash.clear(); + m_iconBundlesHash.clear(); +} + +/* static */ wxString +wxArtProviderCache::ConstructHashID(const wxArtID& id, + const wxArtClient& client) +{ + return id + wxT('-') + client; +} + + +/* static */ wxString +wxArtProviderCache::ConstructHashID(const wxArtID& id, + const wxArtClient& client, + const wxSize& size) +{ + return ConstructHashID(id, client) + wxT('-') + + wxString::Format(wxT("%d-%d"), size.x, size.y); +} + +// ============================================================================ +// wxArtProvider class +// ============================================================================ + +IMPLEMENT_ABSTRACT_CLASS(wxArtProvider, wxObject) + +wxArtProvidersList *wxArtProvider::sm_providers = NULL; +wxArtProviderCache *wxArtProvider::sm_cache = NULL; + +// ---------------------------------------------------------------------------- +// wxArtProvider ctors/dtor +// ---------------------------------------------------------------------------- + +wxArtProvider::~wxArtProvider() +{ + Remove(this); +} + +// ---------------------------------------------------------------------------- +// wxArtProvider operations on provider stack +// ---------------------------------------------------------------------------- + +/*static*/ void wxArtProvider::CommonAddingProvider() +{ + if ( !sm_providers ) + { + sm_providers = new wxArtProvidersList; + sm_cache = new wxArtProviderCache; + } + + sm_cache->Clear(); +} + +/*static*/ void wxArtProvider::Push(wxArtProvider *provider) +{ + CommonAddingProvider(); + sm_providers->Insert(provider); +} + +/*static*/ void wxArtProvider::PushBack(wxArtProvider *provider) +{ + CommonAddingProvider(); + sm_providers->Append(provider); +} + +/*static*/ bool wxArtProvider::Pop() +{ + wxCHECK_MSG( sm_providers, false, wxT("no wxArtProvider exists") ); + wxCHECK_MSG( !sm_providers->empty(), false, wxT("wxArtProviders stack is empty") ); + + delete sm_providers->GetFirst()->GetData(); + sm_cache->Clear(); + return true; +} + +/*static*/ bool wxArtProvider::Remove(wxArtProvider *provider) +{ + wxCHECK_MSG( sm_providers, false, wxT("no wxArtProvider exists") ); + + if ( sm_providers->DeleteObject(provider) ) + { + sm_cache->Clear(); + return true; + } + + return false; +} + +/*static*/ bool wxArtProvider::Delete(wxArtProvider *provider) +{ + // provider will remove itself from the stack in its dtor + delete provider; + + return true; +} + +/*static*/ void wxArtProvider::CleanUpProviders() +{ + if ( sm_providers ) + { + while ( !sm_providers->empty() ) + delete *sm_providers->begin(); + + wxDELETE(sm_providers); + wxDELETE(sm_cache); + } +} + +// ---------------------------------------------------------------------------- +// wxArtProvider: retrieving bitmaps/icons +// ---------------------------------------------------------------------------- + +/*static*/ wxBitmap wxArtProvider::GetBitmap(const wxArtID& id, + const wxArtClient& client, + const wxSize& size) +{ + // safety-check against writing client,id,size instead of id,client,size: + wxASSERT_MSG( client.Last() == wxT('C'), wxT("invalid 'client' parameter") ); + + wxCHECK_MSG( sm_providers, wxNullBitmap, wxT("no wxArtProvider exists") ); + + wxString hashId = wxArtProviderCache::ConstructHashID(id, client, size); + + wxBitmap bmp; + if ( !sm_cache->GetBitmap(hashId, &bmp) ) + { + for (wxArtProvidersList::compatibility_iterator node = sm_providers->GetFirst(); + node; node = node->GetNext()) + { + bmp = node->GetData()->CreateBitmap(id, client, size); + if ( bmp.IsOk() ) + break; + } + + wxSize sizeNeeded = size; + if ( !bmp.IsOk() ) + { + // no bitmap created -- as a fallback, try if we can find desired + // icon in a bundle + wxIconBundle iconBundle = DoGetIconBundle(id, client); + if ( iconBundle.IsOk() ) + { + if ( sizeNeeded == wxDefaultSize ) + sizeNeeded = GetNativeSizeHint(client); + + wxIcon icon(iconBundle.GetIcon(sizeNeeded)); + if ( icon.IsOk() ) + { + // this icon may be not of the correct size, it will be + // rescaled below in such case + bmp.CopyFromIcon(icon); + } + } + } + + // if we didn't get the correct size, resize the bitmap +#if wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB) + if ( bmp.IsOk() && sizeNeeded != wxDefaultSize ) + { + if ( bmp.GetSize() != sizeNeeded ) + { + wxImage img = bmp.ConvertToImage(); + img.Rescale(sizeNeeded.x, sizeNeeded.y); + bmp = wxBitmap(img); + } + } +#endif // wxUSE_IMAGE + + sm_cache->PutBitmap(hashId, bmp); + } + + return bmp; +} + +/*static*/ +wxIconBundle wxArtProvider::GetIconBundle(const wxArtID& id, const wxArtClient& client) +{ + wxIconBundle iconbundle(DoGetIconBundle(id, client)); + + if ( iconbundle.IsOk() ) + { + return iconbundle; + } + else + { + // fall back to single-icon bundle + return wxIconBundle(GetIcon(id, client)); + } +} + +/*static*/ +wxIconBundle wxArtProvider::DoGetIconBundle(const wxArtID& id, const wxArtClient& client) +{ + // safety-check against writing client,id,size instead of id,client,size: + wxASSERT_MSG( client.Last() == wxT('C'), wxT("invalid 'client' parameter") ); + + wxCHECK_MSG( sm_providers, wxNullIconBundle, wxT("no wxArtProvider exists") ); + + wxString hashId = wxArtProviderCache::ConstructHashID(id, client); + + wxIconBundle iconbundle; + if ( !sm_cache->GetIconBundle(hashId, &iconbundle) ) + { + for (wxArtProvidersList::compatibility_iterator node = sm_providers->GetFirst(); + node; node = node->GetNext()) + { + iconbundle = node->GetData()->CreateIconBundle(id, client); + if ( iconbundle.IsOk() ) + break; + } + + sm_cache->PutIconBundle(hashId, iconbundle); + } + + return iconbundle; +} + +/*static*/ wxIcon wxArtProvider::GetIcon(const wxArtID& id, + const wxArtClient& client, + const wxSize& size) +{ + wxBitmap bmp = GetBitmap(id, client, size); + + if ( !bmp.IsOk() ) + return wxNullIcon; + + wxIcon icon; + icon.CopyFromBitmap(bmp); + return icon; +} + +/* static */ +wxArtID wxArtProvider::GetMessageBoxIconId(int flags) +{ + switch ( flags & wxICON_MASK ) + { + default: + wxFAIL_MSG(wxT("incorrect message box icon flags")); + // fall through + + case wxICON_ERROR: + return wxART_ERROR; + + case wxICON_INFORMATION: + return wxART_INFORMATION; + + case wxICON_WARNING: + return wxART_WARNING; + + case wxICON_QUESTION: + return wxART_QUESTION; + } +} + +/*static*/ wxSize wxArtProvider::GetSizeHint(const wxArtClient& client, + bool platform_dependent) +{ + if (!platform_dependent) + { + wxArtProvidersList::compatibility_iterator node = sm_providers->GetFirst(); + if (node) + return node->GetData()->DoGetSizeHint(client); + } + + return GetNativeSizeHint(client); +} + +#ifndef wxHAS_NATIVE_ART_PROVIDER_IMPL +/*static*/ +wxSize wxArtProvider::GetNativeSizeHint(const wxArtClient& WXUNUSED(client)) +{ + // rather than returning some arbitrary value that doesn't make much + // sense (as 2.8 used to do), tell the caller that we don't have a clue: + return wxDefaultSize; +} + +/*static*/ +void wxArtProvider::InitNativeProvider() +{ +} +#endif // !wxHAS_NATIVE_ART_PROVIDER_IMPL + + +/* static */ +bool wxArtProvider::HasNativeProvider() +{ +#ifdef __WXGTK20__ + return true; +#else + return false; +#endif +} + +// ---------------------------------------------------------------------------- +// deprecated wxArtProvider methods +// ---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_6 + +/* static */ void wxArtProvider::PushProvider(wxArtProvider *provider) +{ + Push(provider); +} + +/* static */ void wxArtProvider::InsertProvider(wxArtProvider *provider) +{ + PushBack(provider); +} + +/* static */ bool wxArtProvider::PopProvider() +{ + return Pop(); +} + +/* static */ bool wxArtProvider::RemoveProvider(wxArtProvider *provider) +{ + // RemoveProvider() used to delete the provider being removed so this is + // not a typo, we must call Delete() and not Remove() here + return Delete(provider); +} + +#endif // WXWIN_COMPATIBILITY_2_6 + +#if WXWIN_COMPATIBILITY_2_8 +/* static */ void wxArtProvider::Insert(wxArtProvider *provider) +{ + PushBack(provider); +} +#endif // WXWIN_COMPATIBILITY_2_8 + +// ============================================================================ +// wxArtProviderModule +// ============================================================================ + +class wxArtProviderModule: public wxModule +{ +public: + bool OnInit() + { + // The order here is such that the native provider will be used first + // and the standard one last as all these default providers add + // themselves to the bottom of the stack. + wxArtProvider::InitNativeProvider(); +#if wxUSE_ARTPROVIDER_TANGO + wxArtProvider::InitTangoProvider(); +#endif // wxUSE_ARTPROVIDER_TANGO +#if wxUSE_ARTPROVIDER_STD + wxArtProvider::InitStdProvider(); +#endif // wxUSE_ARTPROVIDER_STD + return true; + } + void OnExit() + { + wxArtProvider::CleanUpProviders(); + } + + DECLARE_DYNAMIC_CLASS(wxArtProviderModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxArtProviderModule, wxModule) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/artstd.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/artstd.cpp new file mode 100644 index 0000000000..471146647b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/artstd.cpp @@ -0,0 +1,256 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/artstd.cpp +// Purpose: stock wxArtProvider instance with default wxWin art +// Author: Vaclav Slavik +// Modified by: +// Created: 18/03/2002 +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#if wxUSE_ARTPROVIDER_STD + +#ifndef WX_PRECOMP + #include "wx/image.h" +#endif + +#include "wx/artprov.h" + +// ---------------------------------------------------------------------------- +// wxDefaultArtProvider +// ---------------------------------------------------------------------------- + +class wxDefaultArtProvider : public wxArtProvider +{ +protected: + virtual wxBitmap CreateBitmap(const wxArtID& id, const wxArtClient& client, + const wxSize& size); +}; + +// ---------------------------------------------------------------------------- +// wxArtProvider::InitStdProvider +// ---------------------------------------------------------------------------- + +/*static*/ void wxArtProvider::InitStdProvider() +{ + wxArtProvider::PushBack(new wxDefaultArtProvider); +} + +// ---------------------------------------------------------------------------- +// helper macros +// ---------------------------------------------------------------------------- + +// Standard macro for getting a resource from XPM file: +#define ART(artId, xpmRc) \ + if ( id == artId ) return wxBitmap(xpmRc##_xpm); + +// ---------------------------------------------------------------------------- +// XPMs with the art +// ---------------------------------------------------------------------------- + +#ifndef __WXUNIVERSAL__ + #if defined(__WXGTK__) + #include "../../art/gtk/info.xpm" + #include "../../art/gtk/error.xpm" + #include "../../art/gtk/warning.xpm" + #include "../../art/gtk/question.xpm" + #elif defined(__WXMOTIF__) + #include "../../art/motif/info.xpm" + #include "../../art/motif/error.xpm" + #include "../../art/motif/warning.xpm" + #include "../../art/motif/question.xpm" + #endif +#endif // !__WXUNIVERSAL__ + +#if wxUSE_HTML + #include "../../art/htmsidep.xpm" + #include "../../art/htmoptns.xpm" + #include "../../art/htmbook.xpm" + #include "../../art/htmfoldr.xpm" + #include "../../art/htmpage.xpm" +#endif // wxUSE_HTML + +#include "../../art/missimg.xpm" +#include "../../art/addbookm.xpm" +#include "../../art/delbookm.xpm" +#include "../../art/back.xpm" +#include "../../art/forward.xpm" +#include "../../art/up.xpm" +#include "../../art/down.xpm" +#include "../../art/toparent.xpm" +#include "../../art/fileopen.xpm" +#include "../../art/print.xpm" +#include "../../art/helpicon.xpm" +#include "../../art/tipicon.xpm" +#include "../../art/home.xpm" +#include "../../art/first.xpm" +#include "../../art/last.xpm" +#include "../../art/repview.xpm" +#include "../../art/listview.xpm" +#include "../../art/new_dir.xpm" +#include "../../art/harddisk.xpm" +#include "../../art/cdrom.xpm" +#include "../../art/floppy.xpm" +#include "../../art/removable.xpm" +#include "../../art/folder.xpm" +#include "../../art/folder_open.xpm" +#include "../../art/dir_up.xpm" +#include "../../art/exefile.xpm" +#include "../../art/deffile.xpm" +#include "../../art/tick.xpm" +#include "../../art/cross.xpm" + +#include "../../art/filesave.xpm" +#include "../../art/filesaveas.xpm" +#include "../../art/copy.xpm" +#include "../../art/cut.xpm" +#include "../../art/paste.xpm" +#include "../../art/delete.xpm" +#include "../../art/new.xpm" +#include "../../art/undo.xpm" +#include "../../art/redo.xpm" +#include "../../art/plus.xpm" +#include "../../art/minus.xpm" +#include "../../art/close.xpm" +#include "../../art/quit.xpm" +#include "../../art/find.xpm" +#include "../../art/findrepl.xpm" + +wxBitmap wxDefaultArtProvider_CreateBitmap(const wxArtID& id) +{ +#if !defined(__WXUNIVERSAL__) && (defined(__WXGTK__) || defined(__WXMOTIF__)) + // wxMessageBox icons: + ART(wxART_ERROR, error) + ART(wxART_INFORMATION, info) + ART(wxART_WARNING, warning) + ART(wxART_QUESTION, question) +#endif + + // standard icons: +#if wxUSE_HTML + ART(wxART_HELP_SIDE_PANEL, htmsidep) + ART(wxART_HELP_SETTINGS, htmoptns) + ART(wxART_HELP_BOOK, htmbook) + ART(wxART_HELP_FOLDER, htmfoldr) + ART(wxART_HELP_PAGE, htmpage) +#endif // wxUSE_HTML + ART(wxART_MISSING_IMAGE, missimg) + ART(wxART_ADD_BOOKMARK, addbookm) + ART(wxART_DEL_BOOKMARK, delbookm) + ART(wxART_GO_BACK, back) + ART(wxART_GO_FORWARD, forward) + ART(wxART_GO_UP, up) + ART(wxART_GO_DOWN, down) + ART(wxART_GO_TO_PARENT, toparent) + ART(wxART_GO_HOME, home) + ART(wxART_GOTO_FIRST, first) + ART(wxART_GOTO_LAST, last) + ART(wxART_FILE_OPEN, fileopen) + ART(wxART_PRINT, print) + ART(wxART_HELP, helpicon) + ART(wxART_TIP, tipicon) + ART(wxART_REPORT_VIEW, repview) + ART(wxART_LIST_VIEW, listview) + ART(wxART_NEW_DIR, new_dir) + ART(wxART_HARDDISK, harddisk) + ART(wxART_FLOPPY, floppy) + ART(wxART_CDROM, cdrom) + ART(wxART_REMOVABLE, removable) + ART(wxART_FOLDER, folder) + ART(wxART_FOLDER_OPEN, folder_open) + ART(wxART_GO_DIR_UP, dir_up) + ART(wxART_EXECUTABLE_FILE, exefile) + ART(wxART_NORMAL_FILE, deffile) + ART(wxART_TICK_MARK, tick) + ART(wxART_CROSS_MARK, cross) + + ART(wxART_FILE_SAVE, filesave) + ART(wxART_FILE_SAVE_AS, filesaveas) + ART(wxART_COPY, copy) + ART(wxART_CUT, cut) + ART(wxART_PASTE, paste) + ART(wxART_DELETE, delete) + ART(wxART_UNDO, undo) + ART(wxART_REDO, redo) + ART(wxART_PLUS, plus) + ART(wxART_MINUS, minus) + ART(wxART_CLOSE, close) + ART(wxART_QUIT, quit) + ART(wxART_FIND, find) + ART(wxART_FIND_AND_REPLACE, findrepl) + ART(wxART_NEW, new) + + + return wxNullBitmap; +} + +// ---------------------------------------------------------------------------- +// CreateBitmap routine +// ---------------------------------------------------------------------------- + +wxBitmap wxDefaultArtProvider::CreateBitmap(const wxArtID& id, + const wxArtClient& client, + const wxSize& reqSize) +{ + wxBitmap bmp = wxDefaultArtProvider_CreateBitmap(id); + +#if wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB) + if (bmp.IsOk()) + { + // fit into transparent image with desired size hint from the client + if (reqSize == wxDefaultSize) + { + // find out if there is a desired size for this client + wxSize bestSize = GetSizeHint(client); + if (bestSize != wxDefaultSize) + { + int bmp_w = bmp.GetWidth(); + int bmp_h = bmp.GetHeight(); + + if (bmp_w == 16 && bmp_h == 15 && bestSize == wxSize(16, 16)) + { + // Do nothing in this special but quite common case, because scaling + // with only a pixel difference will look horrible. + } + else if ((bmp_h < bestSize.x) && (bmp_w < bestSize.y)) + { + // the caller wants default size, which is larger than + // the image we have; to avoid degrading it visually by + // scaling it up, paste it into transparent image instead: + wxPoint offset((bestSize.x - bmp_w)/2, (bestSize.y - bmp_h)/2); + wxImage img = bmp.ConvertToImage(); + img.Resize(bestSize, offset); + bmp = wxBitmap(img); + } + else // scale (down or mixed, but not up) + { + wxImage img = bmp.ConvertToImage(); + bmp = wxBitmap + ( + img.Scale(bestSize.x, bestSize.y, + wxIMAGE_QUALITY_HIGH) + ); + } + } + } + } +#else + wxUnusedVar(client); + wxUnusedVar(reqSize); +#endif // wxUSE_IMAGE + + return bmp; +} + +#endif // wxUSE_ARTPROVIDER_STD diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/arttango.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/arttango.cpp new file mode 100644 index 0000000000..156ae8fc06 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/arttango.cpp @@ -0,0 +1,327 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/arttango.cpp +// Purpose: art provider using embedded PNG versions of Tango icons +// Author: Vadim Zeitlin +// Created: 2010-12-27 +// Copyright: (c) 2010 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ARTPROVIDER_TANGO + +#ifndef WX_PRECOMP + #include "wx/image.h" + #include "wx/log.h" +#endif // WX_PRECOMP + +#include "wx/artprov.h" + +#include "wx/mstream.h" + +// ---------------------------------------------------------------------------- +// image data +// ---------------------------------------------------------------------------- + +// All files in art/tango in alphabetical order: +#include "../../art/tango/application_x_executable.h" +#include "../../art/tango/dialog_error.h" +#include "../../art/tango/dialog_information.h" +#include "../../art/tango/dialog_warning.h" +#include "../../art/tango/document_new.h" +#include "../../art/tango/document_open.h" +#include "../../art/tango/document_print.h" +#include "../../art/tango/document_save.h" +#include "../../art/tango/document_save_as.h" +#include "../../art/tango/drive_harddisk.h" +#include "../../art/tango/drive_optical.h" +#include "../../art/tango/drive_removable_media.h" +#include "../../art/tango/edit_copy.h" +#include "../../art/tango/edit_cut.h" +#include "../../art/tango/edit_delete.h" +#include "../../art/tango/edit_find.h" +#include "../../art/tango/edit_find_replace.h" +#include "../../art/tango/edit_paste.h" +#include "../../art/tango/edit_redo.h" +#include "../../art/tango/edit_undo.h" +#include "../../art/tango/folder.h" +#include "../../art/tango/folder_new.h" +#include "../../art/tango/folder_open.h" +#include "../../art/tango/go_down.h" +#include "../../art/tango/go_first.h" +#include "../../art/tango/go_home.h" +#include "../../art/tango/go_last.h" +#include "../../art/tango/go_next.h" +#include "../../art/tango/go_previous.h" +#include "../../art/tango/go_up.h" +#include "../../art/tango/image_missing.h" +#include "../../art/tango/text_x_generic.h" +#include "../../art/tango/list_add.h" +#include "../../art/tango/list_remove.h" + +// ---------------------------------------------------------------------------- +// art provider class +// ---------------------------------------------------------------------------- + +namespace +{ + +class wxTangoArtProvider : public wxArtProvider +{ +public: + wxTangoArtProvider() + { + m_imageHandledAdded = false; + } + +protected: + virtual wxBitmap CreateBitmap(const wxArtID& id, + const wxArtClient& client, + const wxSize& size); + +private: + bool m_imageHandledAdded; + + wxDECLARE_NO_COPY_CLASS(wxTangoArtProvider); +}; + +} // anonymous namespace + +// ============================================================================ +// implementation +// ============================================================================ + +wxBitmap +wxTangoArtProvider::CreateBitmap(const wxArtID& id, + const wxArtClient& client, + const wxSize& sizeHint) +{ + // Array indexed by the id names with pointers to image data in 16 and 32 + // pixel sizes as values. The order of the elements in this array is the + // same as the definition order in wx/artprov.h. While it's not very + // logical, this should make it simpler to add new icons later. Notice that + // most elements without Tango equivalents are simply omitted. + + // To avoid repetition use BITMAP_DATA to only specify the image name once + // (this is especially important if we decide to add more image sizes + // later). + #define BITMAP_ARRAY_NAME(name, size) \ + name ## _ ## size ## x ## size ## _png + #define BITMAP_DATA_FOR_SIZE(name, size) \ + BITMAP_ARRAY_NAME(name, size), sizeof(BITMAP_ARRAY_NAME(name, size)) + #define BITMAP_DATA(name) \ + BITMAP_DATA_FOR_SIZE(name, 16), BITMAP_DATA_FOR_SIZE(name, 24) + + static const struct BitmapEntry + { + const char *id; + const unsigned char *data16; + size_t len16; + const unsigned char *data24; + size_t len24; + } s_allBitmaps[] = + { + // Tango does have bookmark-new but no matching bookmark-delete and + // using mismatching icons would be ugly so we don't provide this one + // neither, we should add both of them if Tango ever adds the other one. + //{ wxART_ADD_BOOKMARK, BITMAP_DATA(bookmark_new)}, + //{ wxART_DEL_BOOKMARK, BITMAP_DATA() }, + + { wxART_GO_BACK, BITMAP_DATA(go_previous) }, + { wxART_GO_FORWARD, BITMAP_DATA(go_next) }, + { wxART_GO_UP, BITMAP_DATA(go_up) }, + { wxART_GO_DOWN, BITMAP_DATA(go_down) }, + // wxART_GO_TO_PARENT doesn't seem to exist in Tango + { wxART_GO_HOME, BITMAP_DATA(go_home) }, + { wxART_GOTO_FIRST, BITMAP_DATA(go_first) }, + { wxART_GOTO_LAST, BITMAP_DATA(go_last) }, + + { wxART_FILE_OPEN, BITMAP_DATA(document_open) }, + { wxART_FILE_SAVE, BITMAP_DATA(document_save) }, + { wxART_FILE_SAVE_AS, BITMAP_DATA(document_save_as) }, + { wxART_PRINT, BITMAP_DATA(document_print) }, + + // Should we use help-browser for wxART_HELP? + + { wxART_NEW_DIR, BITMAP_DATA(folder_new) }, + { wxART_HARDDISK, BITMAP_DATA(drive_harddisk) }, + // drive-removable-media seems to be better than media-floppy + { wxART_FLOPPY, BITMAP_DATA(drive_removable_media) }, + { wxART_CDROM, BITMAP_DATA(drive_optical) }, + { wxART_REMOVABLE, BITMAP_DATA(drive_removable_media) }, + + { wxART_FOLDER, BITMAP_DATA(folder) }, + { wxART_FOLDER_OPEN, BITMAP_DATA(folder_open) }, + // wxART_GO_DIR_UP doesn't seem to exist in Tango + + { wxART_EXECUTABLE_FILE, BITMAP_DATA(application_x_executable) }, + { wxART_NORMAL_FILE, BITMAP_DATA(text_x_generic) }, + + // There is no dialog-question in Tango so use the information icon + // too, this is better for consistency and we do have a precedent for + // doing this as Windows Vista/7 does the same thing natively. + { wxART_ERROR, BITMAP_DATA(dialog_error) }, + { wxART_QUESTION, BITMAP_DATA(dialog_information) }, + { wxART_WARNING, BITMAP_DATA(dialog_warning) }, + { wxART_INFORMATION, BITMAP_DATA(dialog_information) }, + + { wxART_MISSING_IMAGE, BITMAP_DATA(image_missing) }, + + { wxART_COPY, BITMAP_DATA(edit_copy) }, + { wxART_CUT, BITMAP_DATA(edit_cut) }, + { wxART_PASTE, BITMAP_DATA(edit_paste) }, + { wxART_DELETE, BITMAP_DATA(edit_delete) }, + { wxART_NEW, BITMAP_DATA(document_new) }, + { wxART_UNDO, BITMAP_DATA(edit_undo) }, + { wxART_REDO, BITMAP_DATA(edit_redo) }, + + { wxART_PLUS, BITMAP_DATA(list_add) }, + { wxART_MINUS, BITMAP_DATA(list_remove) }, + + // Surprisingly Tango doesn't seem to have neither wxART_CLOSE nor + // wxART_QUIT. We could use system-log-out for the latter but it + // doesn't seem quite right. + + { wxART_FIND, BITMAP_DATA(edit_find) }, + { wxART_FIND_AND_REPLACE, BITMAP_DATA(edit_find_replace) }, + }; + + #undef BITMAP_ARRAY_NAME + #undef BITMAP_DATA_FOR_SIZE + #undef BITMAP_DATA + + for ( unsigned n = 0; n < WXSIZEOF(s_allBitmaps); n++ ) + { + const BitmapEntry& entry = s_allBitmaps[n]; + if ( entry.id != id ) + continue; + + // This is one of the bitmaps that we have, determine in which size we + // should return it. + + wxSize size; + bool sizeIsAHint; + if ( sizeHint == wxDefaultSize ) + { + // Use the normal platform-specific icon size. + size = GetNativeSizeHint(client); + + if ( size == wxDefaultSize ) + { + // If we failed to get it, determine the best size more or less + // arbitrarily. This definitely won't look good but then it + // shouldn't normally happen, all platforms should implement + // GetNativeSizeHint() properly. + if ( client == wxART_MENU || client == wxART_BUTTON ) + size = wxSize(16, 16); + else + size = wxSize(24, 24); + } + + // We should return the icon of exactly this size so it's more than + // just a hint. + sizeIsAHint = false; + } + else // We have a size hint + { + // Use it for determining the version of the icon to return. + size = sizeHint; + + // But we don't need to return the image of exactly the same size + // as the hint, after all it's just that, a hint. + sizeIsAHint = true; + } + + enum + { + TangoSize_16, + TangoSize_24 + } tangoSize; + + // We prefer to downscale the image rather than upscale it if possible + // so use the smaller one if we can, otherwise the large one. + if ( size.x <= 16 && size.y <= 16 ) + tangoSize = TangoSize_16; + else + tangoSize = TangoSize_24; + + const unsigned char *data; + size_t len; + switch ( tangoSize ) + { + default: + wxFAIL_MSG( "Unsupported Tango bitmap size" ); + // fall through + + case TangoSize_16: + data = entry.data16; + len = entry.len16; + break; + + case TangoSize_24: + data = entry.data24; + len = entry.len24; + break; + } + + wxMemoryInputStream is(data, len); + + // Before reading the image data from the stream for the first time, + // add the handler for PNG images: we do it here and not in, say, + // InitTangoProvider() to do it as lately as possible and so to avoid + // the asserts about adding an already added handler if the user code + // adds the handler itself. + if ( !m_imageHandledAdded ) + { + // Of course, if the user code did add it already, we have nothing + // to do. + if ( !wxImage::FindHandler(wxBITMAP_TYPE_PNG) ) + wxImage::AddHandler(new wxPNGHandler); + + // In any case, no need to do it again. + m_imageHandledAdded = true; + } + + wxImage image(is, wxBITMAP_TYPE_PNG); + if ( !image.IsOk() ) + { + // This should normally never happen as all the embedded images are + // well-formed. + wxLogDebug("Failed to load embedded PNG image for \"%s\"", id); + return wxNullBitmap; + } + + if ( !sizeIsAHint ) + { + // Notice that this won't do anything if the size is already right. + image.Rescale(size.x, size.y, wxIMAGE_QUALITY_HIGH); + } + + return image; + } + + // Not one of the bitmaps that we support. + return wxNullBitmap; +} + +/* static */ +void wxArtProvider::InitTangoProvider() +{ + wxArtProvider::PushBack(new wxTangoArtProvider); +} + +#endif // wxUSE_ARTPROVIDER_TANGO diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/base64.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/base64.cpp new file mode 100644 index 0000000000..5ee3a7a3c7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/base64.cpp @@ -0,0 +1,240 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/base64.cpp +// Purpose: implementation of BASE64 encoding/decoding functions +// Author: Charles Reimers, Vadim Zeitlin +// Created: 2007-06-18 +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_BASE64 + +#include "wx/base64.h" + +size_t +wxBase64Encode(char *dst, size_t dstLen, const void *src_, size_t srcLen) +{ + wxCHECK_MSG( src_, wxCONV_FAILED, wxT("NULL input buffer") ); + + const unsigned char *src = static_cast(src_); + + static const char b64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + + size_t encLen = 0; + + // encode blocks of 3 bytes into 4 base64 characters + for ( ; srcLen >= 3; srcLen -= 3, src += 3 ) + { + encLen += 4; + if ( dst ) + { + if ( encLen > dstLen ) + return wxCONV_FAILED; + + *dst++ = b64[src[0] >> 2]; + *dst++ = b64[((src[0] & 0x03) << 4) | ((src[1] & 0xf0) >> 4)]; + *dst++ = b64[((src[1] & 0x0f) << 2) | ((src[2] & 0xc0) >> 6)]; + *dst++ = b64[src[2] & 0x3f]; + } + } + + // finish with the remaining characters + if ( srcLen ) + { + encLen += 4; + if ( dst ) + { + if ( encLen > dstLen ) + return wxCONV_FAILED; + + // we have definitely one and maybe two bytes remaining + unsigned char next = srcLen == 2 ? src[1] : 0; + *dst++ = b64[src[0] >> 2]; + *dst++ = b64[((src[0] & 0x03) << 4) | ((next & 0xf0) >> 4)]; + *dst++ = srcLen == 2 ? b64[((next & 0x0f) << 2)] : '='; + *dst = '='; + } + } + + return encLen; +} + +size_t +wxBase64Decode(void *dst_, size_t dstLen, + const char *src, size_t srcLen, + wxBase64DecodeMode mode, + size_t *posErr) +{ + wxCHECK_MSG( src, wxCONV_FAILED, wxT("NULL input buffer") ); + + unsigned char *dst = static_cast(dst_); + + size_t decLen = 0; + + if ( srcLen == wxNO_LEN ) + srcLen = strlen(src); + + // this table contains the values, in base 64, of all valid characters and + // special values WSP or INV for white space and invalid characters + // respectively as well as a special PAD value for '=' + enum + { + WSP = 200, + INV, + PAD + }; + + static const unsigned char decode[256] = + { + WSP,INV,INV,INV,INV,INV,INV,INV,INV,WSP,WSP,INV,WSP,WSP,INV,INV, + INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV, + WSP,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,076,INV,INV,INV,077, + 064,065,066,067,070,071,072,073,074,075,INV,INV,INV,PAD,INV,INV, + INV,000,001,002,003,004,005,006,007,010,011,012,013,014,015,016, + 017,020,021,022,023,024,025,026,027,030,031,INV,INV,INV,INV,INV, + INV,032,033,034,035,036,037,040,041,042,043,044,045,046,047,050, + 051,052,053,054,055,056,057,060,061,062,063,INV,INV,INV,INV,INV, + INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV, + INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV, + INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV, + INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV, + INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV, + INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV, + INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV, + INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV,INV, + }; + + // we decode input by groups of 4 characters but things are complicated by + // the fact that there can be whitespace and other junk in it too so keep + // record of where exactly we're inside the current quartet in this var + int n = 0; + unsigned char in[4]; // current quartet + bool end = false; // set when we find padding + size_t padLen = 0; // length lost to padding + const char *p; + for ( p = src; srcLen; p++, srcLen-- ) + { + const unsigned char c = decode[static_cast(*p)]; + switch ( c ) + { + case WSP: + if ( mode == wxBase64DecodeMode_SkipWS ) + continue; + // fall through + + case INV: + if ( mode == wxBase64DecodeMode_Relaxed ) + continue; + + // force the loop to stop and an error to be returned + n = -1; + srcLen = 1; + break; + + case PAD: + // set the flag telling us that we're past the end now + end = true; + + // there can be either a single '=' at the end of a quartet or + // "==" in positions 2 and 3 + if ( n == 3 ) + { + padLen = 1; + in[n++] = '\0'; + } + else if ( (n == 2) && (--srcLen && *++p == '=') ) + { + padLen = 2; + in[n++] = '\0'; + in[n++] = '\0'; + } + else // invalid padding + { + // force the loop terminate with an error + n = -1; + srcLen = 1; + } + break; + + default: + if ( end ) + { + // nothing is allowed after the end so provoke error return + n = -1; + srcLen = 1; + break; + } + + in[n++] = c; + } + + if ( n == 4 ) + { + // got entire block, decode + decLen += 3 - padLen; + if ( dst ) + { + if ( decLen > dstLen ) + return wxCONV_FAILED; + + // undo the bit shifting done during encoding + *dst++ = in[0] << 2 | in[1] >> 4; + + // be careful to not overwrite the output buffer with NUL pad + // bytes + if ( padLen != 2 ) + { + *dst++ = in[1] << 4 | in[2] >> 2; + if ( !padLen ) + *dst++ = in[2] << 6 | in[3]; + } + } + + n = 0; + } + } + + if ( n ) + { + if ( posErr ) + { + // notice that the error was on a previous position as we did one + // extra "p++" in the loop line after it + *posErr = p - src - 1; + } + + return wxCONV_FAILED; + } + + return decLen; +} + +wxMemoryBuffer wxBase64Decode(const char *src, + size_t srcLen, + wxBase64DecodeMode mode, + size_t *posErr) +{ + wxMemoryBuffer buf; + wxCHECK_MSG( src, buf, wxT("NULL input buffer") ); + + if ( srcLen == wxNO_LEN ) + srcLen = strlen(src); + + size_t len = wxBase64DecodedSize(srcLen); + len = wxBase64Decode(buf.GetWriteBuf(len), len, src, srcLen, mode, posErr); + if ( len == wxCONV_FAILED ) + len = 0; + + buf.SetDataLen(len); + + return buf; +} + +#endif // wxUSE_BASE64 diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/bmpbase.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/bmpbase.cpp new file mode 100644 index 0000000000..763b9597f9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/bmpbase.cpp @@ -0,0 +1,231 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/bmpbase.cpp +// Purpose: wxBitmapBase +// Author: VaclavSlavik +// Created: 2001/04/11 +// Copyright: (c) 2001, Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/bitmap.h" + +#ifndef WX_PRECOMP + #include "wx/colour.h" + #include "wx/icon.h" + #include "wx/image.h" +#endif // WX_PRECOMP + +#if wxUSE_IMAGE && wxUSE_LIBPNG && wxUSE_STREAMS + #define wxHAS_PNG_LOAD + + #include "wx/mstream.h" +#endif + +// ---------------------------------------------------------------------------- +// wxVariant support +// ---------------------------------------------------------------------------- + +#if wxUSE_VARIANT +IMPLEMENT_VARIANT_OBJECT_EXPORTED_SHALLOWCMP(wxBitmap,WXDLLEXPORT) +IMPLEMENT_VARIANT_OBJECT_EXPORTED_SHALLOWCMP(wxIcon,WXDLLEXPORT) +#endif + +#if wxUSE_EXTENDED_RTTI +//WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) +//WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) +#endif + +// ---------------------------------------------------------------------------- +// wxBitmapHelpers +// ---------------------------------------------------------------------------- + +// wxOSX has a native version and doesn't use this one. + +#ifndef __WXOSX__ + +/* static */ +wxBitmap wxBitmapHelpers::NewFromPNGData(const void* data, size_t size) +{ + wxBitmap bitmap; + +#ifdef wxHAS_PNG_LOAD + wxMemoryInputStream is(data, size); + wxImage image(is, wxBITMAP_TYPE_PNG); + if ( image.IsOk() ) + bitmap = wxBitmap(image); +#endif // wxHAS_PNG_LOAD + + return bitmap; +} + +#endif // !__WXOSX__ + +// ---------------------------------------------------------------------------- +// wxBitmapBase +// ---------------------------------------------------------------------------- + +#if wxUSE_BITMAP_BASE + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/palette.h" + #include "wx/module.h" +#endif // WX_PRECOMP + + +IMPLEMENT_ABSTRACT_CLASS(wxBitmapBase, wxGDIObject) +IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandler, wxObject) + +wxList wxBitmapBase::sm_handlers; + +void wxBitmapBase::AddHandler(wxBitmapHandler *handler) +{ + sm_handlers.Append(handler); +} + +void wxBitmapBase::InsertHandler(wxBitmapHandler *handler) +{ + sm_handlers.Insert(handler); +} + +bool wxBitmapBase::RemoveHandler(const wxString& name) +{ + wxBitmapHandler *handler = FindHandler(name); + if ( handler ) + { + sm_handlers.DeleteObject(handler); + return true; + } + else + return false; +} + +wxBitmapHandler *wxBitmapBase::FindHandler(const wxString& name) +{ + wxList::compatibility_iterator node = sm_handlers.GetFirst(); + while ( node ) + { + wxBitmapHandler *handler = (wxBitmapHandler *)node->GetData(); + if ( handler->GetName() == name ) + return handler; + node = node->GetNext(); + } + return NULL; +} + +wxBitmapHandler *wxBitmapBase::FindHandler(const wxString& extension, wxBitmapType bitmapType) +{ + wxList::compatibility_iterator node = sm_handlers.GetFirst(); + while ( node ) + { + wxBitmapHandler *handler = (wxBitmapHandler *)node->GetData(); + if ( handler->GetExtension() == extension && + (bitmapType == wxBITMAP_TYPE_ANY || handler->GetType() == bitmapType) ) + return handler; + node = node->GetNext(); + } + return NULL; +} + +wxBitmapHandler *wxBitmapBase::FindHandler(wxBitmapType bitmapType) +{ + wxList::compatibility_iterator node = sm_handlers.GetFirst(); + while ( node ) + { + wxBitmapHandler *handler = (wxBitmapHandler *)node->GetData(); + if (handler->GetType() == bitmapType) + return handler; + node = node->GetNext(); + } + return NULL; +} + +void wxBitmapBase::CleanUpHandlers() +{ + wxList::compatibility_iterator node = sm_handlers.GetFirst(); + while ( node ) + { + wxBitmapHandler *handler = (wxBitmapHandler *)node->GetData(); + wxList::compatibility_iterator next = node->GetNext(); + delete handler; + sm_handlers.Erase(node); + node = next; + } +} + +class wxBitmapBaseModule: public wxModule +{ +DECLARE_DYNAMIC_CLASS(wxBitmapBaseModule) +public: + wxBitmapBaseModule() {} + bool OnInit() { wxBitmap::InitStandardHandlers(); return true; } + void OnExit() { wxBitmap::CleanUpHandlers(); } +}; + +IMPLEMENT_DYNAMIC_CLASS(wxBitmapBaseModule, wxModule) + +#endif // wxUSE_BITMAP_BASE + +// ---------------------------------------------------------------------------- +// wxBitmap common +// ---------------------------------------------------------------------------- + +#if !(defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__)) + +wxBitmap::wxBitmap(const char* const* bits) +{ + wxCHECK2_MSG(bits != NULL, return, wxT("invalid bitmap data")); + +#if wxUSE_IMAGE && wxUSE_XPM + wxImage image(bits); + wxCHECK2_MSG(image.IsOk(), return, wxT("invalid bitmap data")); + + *this = wxBitmap(image); +#else + wxFAIL_MSG(wxT("creating bitmaps from XPMs not supported")); +#endif // wxUSE_IMAGE && wxUSE_XPM +} +#endif // !(defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__)) + +// ---------------------------------------------------------------------------- +// wxMaskBase +// ---------------------------------------------------------------------------- + +bool wxMaskBase::Create(const wxBitmap& bitmap, const wxColour& colour) +{ + FreeData(); + + return InitFromColour(bitmap, colour); +} + +#if wxUSE_PALETTE + +bool wxMaskBase::Create(const wxBitmap& bitmap, int paletteIndex) +{ + wxPalette *pal = bitmap.GetPalette(); + + wxCHECK_MSG( pal, false, + wxT("Cannot create mask from palette index of a bitmap without palette") ); + + unsigned char r,g,b; + pal->GetRGB(paletteIndex, &r, &g, &b); + + return Create(bitmap, wxColour(r, g, b)); +} + +#endif // wxUSE_PALETTE + +bool wxMaskBase::Create(const wxBitmap& bitmap) +{ + FreeData(); + + return InitFromMonoBitmap(bitmap); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/bmpbtncmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/bmpbtncmn.cpp new file mode 100644 index 0000000000..8760c70c09 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/bmpbtncmn.cpp @@ -0,0 +1,158 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/bmpbtncmn.cpp +// Purpose: wxBitmapButton common code +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_BMPBUTTON + +#include "wx/bmpbuttn.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/dcmemory.h" + #include "wx/image.h" +#endif + +#include "wx/artprov.h" +#include "wx/renderer.h" + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxBitmapButtonStyle ) +wxBEGIN_FLAGS( wxBitmapButtonStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) + + wxFLAGS_MEMBER(wxBU_AUTODRAW) + wxFLAGS_MEMBER(wxBU_LEFT) + wxFLAGS_MEMBER(wxBU_RIGHT) + wxFLAGS_MEMBER(wxBU_TOP) + wxFLAGS_MEMBER(wxBU_BOTTOM) +wxEND_FLAGS( wxBitmapButtonStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxBitmapButton, wxButton, "wx/bmpbuttn.h") + +wxBEGIN_PROPERTIES_TABLE(wxBitmapButton) + wxPROPERTY_FLAGS( WindowStyle, wxBitmapButtonStyle, long, \ + SetWindowStyleFlag, GetWindowStyleFlag, \ + wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), \ + wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxBitmapButton) + +wxCONSTRUCTOR_5( wxBitmapButton, wxWindow*, Parent, wxWindowID, Id, \ + wxBitmap, Bitmap, wxPoint, Position, wxSize, Size ) + +/* +TODO PROPERTIES : + +long "style" , wxBU_AUTODRAW +bool "default" , 0 +bitmap "selected" , +bitmap "focus" , +bitmap "disabled" , +*/ + +namespace +{ + +#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP + +wxBitmap +GetCloseButtonBitmap(wxWindow *win, + const wxSize& size, + const wxColour& colBg, + int flags = 0) +{ + wxBitmap bmp(size); + wxMemoryDC dc(bmp); + dc.SetBackground(colBg); + dc.Clear(); + wxRendererNative::Get(). + DrawTitleBarBitmap(win, dc, size, wxTITLEBAR_BUTTON_CLOSE, flags); + return bmp; +} + +#endif // wxHAS_DRAW_TITLE_BAR_BITMAP + +} // anonymous namespace + +/* static */ +wxBitmapButton* +wxBitmapButtonBase::NewCloseButton(wxWindow* parent, wxWindowID winid) +{ + wxCHECK_MSG( parent, NULL, wxS("Must have a valid parent") ); + + const wxColour colBg = parent->GetBackgroundColour(); + +#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP + const wxSize sizeBmp = wxArtProvider::GetSizeHint(wxART_BUTTON); + wxBitmap bmp = GetCloseButtonBitmap(parent, sizeBmp, colBg); +#else // !wxHAS_DRAW_TITLE_BAR_BITMAP + wxBitmap bmp = wxArtProvider::GetBitmap(wxART_CLOSE, wxART_BUTTON); +#endif // wxHAS_DRAW_TITLE_BAR_BITMAP + + wxBitmapButton* const button = new wxBitmapButton + ( + parent, + winid, + bmp, + wxDefaultPosition, + wxDefaultSize, + wxBORDER_NONE + ); + +#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP + button->SetBitmapPressed( + GetCloseButtonBitmap(parent, sizeBmp, colBg, wxCONTROL_PRESSED)); + + button->SetBitmapCurrent( + GetCloseButtonBitmap(parent, sizeBmp, colBg, wxCONTROL_CURRENT)); +#endif // wxHAS_DRAW_TITLE_BAR_BITMAP + + // The button should blend with its parent background. + button->SetBackgroundColour(colBg); + + return button; +} + +#endif // wxUSE_BMPBUTTON diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/bmpcboxcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/bmpcboxcmn.cpp new file mode 100644 index 0000000000..1fa3c83ffa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/bmpcboxcmn.cpp @@ -0,0 +1,243 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/bmpcboxcmn.cpp +// Purpose: wxBitmapComboBox +// Author: Jaakko Salli +// Created: 2008-04-09 +// Copyright: (c) 2008 Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/bmpcbox.h" + +#if wxUSE_BITMAPCOMBOBOX + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/dc.h" + #include "wx/ctrlsub.h" +#endif + +#include "wx/settings.h" + +// For wxODCB_XXX flags +#include "wx/odcombo.h" + + +const char wxBitmapComboBoxNameStr[] = "bitmapComboBox"; + +#if defined(wxBITMAPCOMBOBOX_OWNERDRAWN_BASED) + +#define IMAGE_SPACING_RIGHT 4 // Space left of image + +#define IMAGE_SPACING_LEFT 4 // Space right of image, left of text + +#define EXTRA_FONT_HEIGHT 0 // Add to increase min. height of list items + +#define wxBCB_DEFAULT_ITEM_HEIGHT 13 + + +// This macros allows wxArrayPtrVoid to be used in more convenient manner +#define GetBitmapPtr(n) ((wxBitmap*)m_bitmaps[n]) + + +// ---------------------------------------------------------------------------- +// Initialization +// ---------------------------------------------------------------------------- + +void wxBitmapComboBoxBase::Init() +{ + m_fontHeight = 0; + m_imgAreaWidth = 0; + m_indent = 0; + m_usedImgSize = wxSize(-1, -1); +} + +void wxBitmapComboBoxBase::UpdateInternals() +{ + m_fontHeight = GetControl()->GetCharHeight() + EXTRA_FONT_HEIGHT; + + while ( m_bitmaps.GetCount() < GetItemContainer()->GetCount() ) + m_bitmaps.Add( new wxBitmap() ); +} + +// ---------------------------------------------------------------------------- +// Item manipulation +// ---------------------------------------------------------------------------- + +void wxBitmapComboBoxBase::DoSetItemBitmap(unsigned int n, const wxBitmap& bitmap) +{ + wxCHECK_RET( n < m_bitmaps.size(), "invalid item index" ); + *GetBitmapPtr(n) = bitmap; +} + +wxBitmap wxBitmapComboBoxBase::GetItemBitmap(unsigned int n) const +{ + wxCHECK_MSG( n < m_bitmaps.size(), wxNullBitmap, "invalid item index" ); + return *GetBitmapPtr(n); +} + +// ---------------------------------------------------------------------------- +// wxItemContainer methods +// ---------------------------------------------------------------------------- + +void wxBitmapComboBoxBase::BCBDoClear() +{ + for ( unsigned i = 0; i < m_bitmaps.size(); i++ ) + delete GetBitmapPtr(i); + + m_bitmaps.Empty(); + + m_usedImgSize.x = -1; + m_usedImgSize.y = -1; + + DetermineIndent(); +} + +void wxBitmapComboBoxBase::BCBDoDeleteOneItem(unsigned int n) +{ + delete GetBitmapPtr(n); + m_bitmaps.RemoveAt(n); +} + +// ---------------------------------------------------------------------------- +// Preparation and Calculations +// ---------------------------------------------------------------------------- + +bool wxBitmapComboBoxBase::OnAddBitmap(const wxBitmap& bitmap) +{ + if ( bitmap.IsOk() ) + { + int width = bitmap.GetWidth(); + int height = bitmap.GetHeight(); + + if ( m_usedImgSize.x < 0 ) + { + // If size not yet determined, get it from this image. + m_usedImgSize.x = width; + m_usedImgSize.y = height; + + // Adjust control size to vertically fit the bitmap + wxWindow* ctrl = GetControl(); + ctrl->InvalidateBestSize(); + wxSize newSz = ctrl->GetBestSize(); + wxSize sz = ctrl->GetSize(); + if ( newSz.y > sz.y ) + ctrl->SetSize(sz.x, newSz.y); + else + DetermineIndent(); + } + + wxCHECK_MSG( width == m_usedImgSize.x && height == m_usedImgSize.y, + false, + "you can only add images of same size" ); + + return true; + } + + return false; +} + +int wxBitmapComboBoxBase::DetermineIndent() +{ + // Recalculate amount of empty space needed in front of + // text in control itself. + int indent = m_imgAreaWidth = 0; + + if ( m_usedImgSize.x > 0 ) + { + indent = m_usedImgSize.x + IMAGE_SPACING_LEFT + IMAGE_SPACING_RIGHT; + m_imgAreaWidth = indent; + + indent -= 3; + } + + return indent; +} + +// ---------------------------------------------------------------------------- +// Item drawing and measuring +// ---------------------------------------------------------------------------- + +void wxBitmapComboBoxBase::DrawBackground(wxDC& dc, + const wxRect& rect, + int WXUNUSED(item), + int flags) const +{ + if ( flags & wxODCB_PAINTING_SELECTED ) + { + const int vSizeDec = 0; // Vertical size reduction of selection rectangle edges + + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); + + wxColour selCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); + dc.SetPen(selCol); + dc.SetBrush(selCol); + dc.DrawRectangle(rect.x, + rect.y+vSizeDec, + rect.width, + rect.height-(vSizeDec*2)); + } + else + { + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); + + wxColour selCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); + dc.SetPen(selCol); + dc.SetBrush(selCol); + dc.DrawRectangle(rect); + } +} + +void wxBitmapComboBoxBase::DrawItem(wxDC& dc, + const wxRect& rect, + int item, + const wxString& text, + int WXUNUSED(flags)) const +{ + const wxBitmap& bmp = *GetBitmapPtr(item); + if ( bmp.IsOk() ) + { + wxCoord w = bmp.GetWidth(); + wxCoord h = bmp.GetHeight(); + + // Draw the image centered + dc.DrawBitmap(bmp, + rect.x + (m_usedImgSize.x-w)/2 + IMAGE_SPACING_LEFT, + rect.y + (rect.height-h)/2, + true); + } + + if ( !text.empty() ) + dc.DrawText(text, + rect.x + m_imgAreaWidth + 1, + rect.y + (rect.height-dc.GetCharHeight())/2); +} + +wxCoord wxBitmapComboBoxBase::MeasureItem(size_t WXUNUSED(item)) const +{ + if ( m_usedImgSize.y >= 0 ) + { + int imgHeightArea = m_usedImgSize.y + 2; + return imgHeightArea > m_fontHeight ? imgHeightArea : m_fontHeight; + } + + return wxBCB_DEFAULT_ITEM_HEIGHT; +} + +#endif // wxBITMAPCOMBOBOX_OWNERDRAWN_BASED + +#endif // wxUSE_BITMAPCOMBOBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/bookctrl.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/bookctrl.cpp new file mode 100644 index 0000000000..4b321322b4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/bookctrl.cpp @@ -0,0 +1,527 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/bookctrl.cpp +// Purpose: wxBookCtrlBase implementation +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.08.03 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_BOOKCTRL + +#include "wx/imaglist.h" + +#include "wx/bookctrl.h" + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// event table +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxBookCtrlBase, wxControl) + +BEGIN_EVENT_TABLE(wxBookCtrlBase, wxControl) + EVT_SIZE(wxBookCtrlBase::OnSize) +#if wxUSE_HELP + EVT_HELP(wxID_ANY, wxBookCtrlBase::OnHelp) +#endif // wxUSE_HELP +END_EVENT_TABLE() + +// ---------------------------------------------------------------------------- +// constructors and destructors +// ---------------------------------------------------------------------------- + +void wxBookCtrlBase::Init() +{ + m_selection = wxNOT_FOUND; + m_bookctrl = NULL; + m_fitToCurrentPage = false; + +#if defined(__WXWINCE__) + m_internalBorder = 1; +#else + m_internalBorder = 5; +#endif + + m_controlMargin = 0; + m_controlSizer = NULL; +} + +bool +wxBookCtrlBase::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + return wxControl::Create + ( + parent, + id, + pos, + size, + style, + wxDefaultValidator, + name + ); +} + +// ---------------------------------------------------------------------------- +// geometry +// ---------------------------------------------------------------------------- + +void wxBookCtrlBase::DoInvalidateBestSize() +{ + // notice that it is not necessary to invalidate our own best size + // explicitly if we have m_bookctrl as it will already invalidate the best + // size of its parent when its own size is invalidated and its parent is + // this control + if ( m_bookctrl ) + m_bookctrl->InvalidateBestSize(); + else + wxControl::InvalidateBestSize(); +} + +wxSize wxBookCtrlBase::CalcSizeFromPage(const wxSize& sizePage) const +{ + // Add the size of the controller and the border between if it's shown. + if ( !m_bookctrl || !m_bookctrl->IsShown() ) + return sizePage; + + // Notice that the controller size is its current size while we really want + // to have its best size. So we only take into account its size in the + // direction in which we should add it but not in the other one, where the + // controller size is determined by the size of wxBookCtrl itself. + const wxSize sizeController = GetControllerSize(); + + wxSize size = sizePage; + if ( IsVertical() ) + size.y += sizeController.y + GetInternalBorder(); + else // left/right aligned + size.x += sizeController.x + GetInternalBorder(); + + return size; +} + +void wxBookCtrlBase::SetPageSize(const wxSize& size) +{ + SetClientSize(CalcSizeFromPage(size)); +} + +wxSize wxBookCtrlBase::DoGetBestSize() const +{ + wxSize bestSize; + + if (m_fitToCurrentPage && GetCurrentPage()) + { + bestSize = GetCurrentPage()->GetBestSize(); + } + else + { + // iterate over all pages, get the largest width and height + const size_t nCount = m_pages.size(); + for ( size_t nPage = 0; nPage < nCount; nPage++ ) + { + const wxWindow * const pPage = m_pages[nPage]; + if ( pPage ) + bestSize.IncTo(pPage->GetBestSize()); + } + } + + // convert display area to window area, adding the size necessary for the + // tabs + wxSize best = CalcSizeFromPage(bestSize); + CacheBestSize(best); + return best; +} + +wxRect wxBookCtrlBase::GetPageRect() const +{ + const wxSize size = GetControllerSize(); + + wxPoint pt; + wxRect rectPage(pt, GetClientSize()); + + switch ( GetWindowStyle() & wxBK_ALIGN_MASK ) + { + default: + wxFAIL_MSG( wxT("unexpected alignment") ); + // fall through + + case wxBK_TOP: + rectPage.y = size.y + GetInternalBorder(); + // fall through + + case wxBK_BOTTOM: + rectPage.height -= size.y + GetInternalBorder(); + if (rectPage.height < 0) + rectPage.height = 0; + break; + + case wxBK_LEFT: + rectPage.x = size.x + GetInternalBorder(); + // fall through + + case wxBK_RIGHT: + rectPage.width -= size.x + GetInternalBorder(); + if (rectPage.width < 0) + rectPage.width = 0; + break; + } + + return rectPage; +} + +// Lay out controls +void wxBookCtrlBase::DoSize() +{ + if ( !m_bookctrl ) + { + // we're not fully created yet or OnSize() should be hidden by derived class + return; + } + + if (GetSizer()) + Layout(); + else + { + // resize controller and the page area to fit inside our new size + const wxSize sizeClient( GetClientSize() ), + sizeBorder( m_bookctrl->GetSize() - m_bookctrl->GetClientSize() ), + sizeCtrl( GetControllerSize() ); + + m_bookctrl->SetClientSize( sizeCtrl.x - sizeBorder.x, sizeCtrl.y - sizeBorder.y ); + // if this changes the visibility of the scrollbars the best size changes, relayout in this case + wxSize sizeCtrl2 = GetControllerSize(); + if ( sizeCtrl != sizeCtrl2 ) + { + wxSize sizeBorder2 = m_bookctrl->GetSize() - m_bookctrl->GetClientSize(); + m_bookctrl->SetClientSize( sizeCtrl2.x - sizeBorder2.x, sizeCtrl2.y - sizeBorder2.y ); + } + + const wxSize sizeNew = m_bookctrl->GetSize(); + wxPoint posCtrl; + switch ( GetWindowStyle() & wxBK_ALIGN_MASK ) + { + default: + wxFAIL_MSG( wxT("unexpected alignment") ); + // fall through + + case wxBK_TOP: + case wxBK_LEFT: + // posCtrl is already ok + break; + + case wxBK_BOTTOM: + posCtrl.y = sizeClient.y - sizeNew.y; + break; + + case wxBK_RIGHT: + posCtrl.x = sizeClient.x - sizeNew.x; + break; + } + + if ( m_bookctrl->GetPosition() != posCtrl ) + m_bookctrl->Move(posCtrl); + } + + // resize all pages to fit the new control size + const wxRect pageRect = GetPageRect(); + const unsigned pagesCount = m_pages.GetCount(); + for ( unsigned int i = 0; i < pagesCount; ++i ) + { + wxWindow * const page = m_pages[i]; + if ( !page ) + { + wxASSERT_MSG( AllowNullPage(), + wxT("Null page in a control that does not allow null pages?") ); + continue; + } + + page->SetSize(pageRect); + } +} + +void wxBookCtrlBase::OnSize(wxSizeEvent& event) +{ + event.Skip(); + + DoSize(); +} + +wxSize wxBookCtrlBase::GetControllerSize() const +{ + // For at least some book controls (e.g. wxChoicebook) it may make sense to + // (temporarily?) hide the controller and we shouldn't leave extra space + // for the hidden control in this case. + if ( !m_bookctrl || !m_bookctrl->IsShown() ) + return wxSize(0, 0); + + const wxSize sizeClient = GetClientSize(); + + wxSize size; + + // Ask for the best width/height considering the other direction. + if ( IsVertical() ) + { + size.x = sizeClient.x; + size.y = m_bookctrl->GetBestHeight(sizeClient.x); + } + else // left/right aligned + { + size.x = m_bookctrl->GetBestWidth(sizeClient.y); + size.y = sizeClient.y; + } + + return size; +} + +// ---------------------------------------------------------------------------- +// miscellaneous stuff +// ---------------------------------------------------------------------------- + +#if wxUSE_HELP + +void wxBookCtrlBase::OnHelp(wxHelpEvent& event) +{ + // determine where does this even originate from to avoid redirecting it + // back to the page which generated it (resulting in an infinite loop) + + // notice that we have to check in the hard(er) way instead of just testing + // if the event object == this because the book control can have other + // subcontrols inside it (e.g. wxSpinButton in case of a notebook in wxUniv) + wxWindow *source = wxStaticCast(event.GetEventObject(), wxWindow); + while ( source && source != this && source->GetParent() != this ) + { + source = source->GetParent(); + } + + if ( source && m_pages.Index(source) == wxNOT_FOUND ) + { + // this event is for the book control itself, redirect it to the + // corresponding page + wxWindow *page = NULL; + + if ( event.GetOrigin() == wxHelpEvent::Origin_HelpButton ) + { + // show help for the page under the mouse + const int pagePos = HitTest(ScreenToClient(event.GetPosition())); + + if ( pagePos != wxNOT_FOUND) + { + page = GetPage((size_t)pagePos); + } + } + else // event from keyboard or unknown source + { + // otherwise show the current page help + page = GetCurrentPage(); + } + + if ( page ) + { + // change event object to the page to avoid infinite recursion if + // we get this event ourselves if the page doesn't handle it + event.SetEventObject(page); + + if ( page->GetEventHandler()->ProcessEvent(event) ) + { + // don't call event.Skip() + return; + } + } + } + //else: event coming from one of our pages already + + event.Skip(); +} + +#endif // wxUSE_HELP + +// ---------------------------------------------------------------------------- +// pages management +// ---------------------------------------------------------------------------- + +bool +wxBookCtrlBase::InsertPage(size_t nPage, + wxWindow *page, + const wxString& WXUNUSED(text), + bool WXUNUSED(bSelect), + int WXUNUSED(imageId)) +{ + wxCHECK_MSG( page || AllowNullPage(), false, + wxT("NULL page in wxBookCtrlBase::InsertPage()") ); + wxCHECK_MSG( nPage <= m_pages.size(), false, + wxT("invalid page index in wxBookCtrlBase::InsertPage()") ); + + m_pages.Insert(page, nPage); + if ( page ) + page->SetSize(GetPageRect()); + + DoInvalidateBestSize(); + + return true; +} + +bool wxBookCtrlBase::DeletePage(size_t nPage) +{ + wxWindow *page = DoRemovePage(nPage); + if ( !(page || AllowNullPage()) ) + return false; + + // delete NULL is harmless + delete page; + + return true; +} + +wxWindow *wxBookCtrlBase::DoRemovePage(size_t nPage) +{ + wxCHECK_MSG( nPage < m_pages.size(), NULL, + wxT("invalid page index in wxBookCtrlBase::DoRemovePage()") ); + + wxWindow *pageRemoved = m_pages[nPage]; + m_pages.RemoveAt(nPage); + DoInvalidateBestSize(); + + return pageRemoved; +} + +int wxBookCtrlBase::GetNextPage(bool forward) const +{ + int nPage; + + int nMax = GetPageCount(); + if ( nMax-- ) // decrement it to get the last valid index + { + int nSel = GetSelection(); + + // change selection wrapping if it becomes invalid + nPage = forward ? nSel == nMax ? 0 + : nSel + 1 + : nSel == 0 ? nMax + : nSel - 1; + } + else // notebook is empty, no next page + { + nPage = wxNOT_FOUND; + } + + return nPage; +} + +int wxBookCtrlBase::FindPage(const wxWindow* page) const +{ + const size_t nCount = m_pages.size(); + for ( size_t nPage = 0; nPage < nCount; nPage++ ) + { + if ( m_pages[nPage] == page ) + return (int)nPage; + } + + return wxNOT_FOUND; +} + +bool wxBookCtrlBase::DoSetSelectionAfterInsertion(size_t n, bool bSelect) +{ + if ( bSelect ) + SetSelection(n); + else if ( m_selection == wxNOT_FOUND ) + ChangeSelection(0); + else // We're not going to select this page. + return false; + + // Return true to indicate that we selected this page. + return true; +} + +void wxBookCtrlBase::DoSetSelectionAfterRemoval(size_t n) +{ + if ( m_selection >= (int)n ) + { + // ensure that the selection is valid + int sel; + if ( GetPageCount() == 0 ) + sel = wxNOT_FOUND; + else + sel = m_selection ? m_selection - 1 : 0; + + // if deleting current page we shouldn't try to hide it + m_selection = m_selection == (int)n ? wxNOT_FOUND + : m_selection - 1; + + if ( sel != wxNOT_FOUND && sel != m_selection ) + SetSelection(sel); + } +} + +int wxBookCtrlBase::DoSetSelection(size_t n, int flags) +{ + wxCHECK_MSG( n < GetPageCount(), wxNOT_FOUND, + wxT("invalid page index in wxBookCtrlBase::DoSetSelection()") ); + + const int oldSel = GetSelection(); + + if ( n != (size_t)oldSel ) + { + wxBookCtrlEvent *event = CreatePageChangingEvent(); + bool allowed = false; + + if ( flags & SetSelection_SendEvent ) + { + event->SetSelection(n); + event->SetOldSelection(oldSel); + event->SetEventObject(this); + + allowed = !GetEventHandler()->ProcessEvent(*event) || event->IsAllowed(); + } + + if ( !(flags & SetSelection_SendEvent) || allowed) + { + if ( oldSel != wxNOT_FOUND ) + DoShowPage(m_pages[oldSel], false); + + wxWindow *page = m_pages[n]; + page->SetSize(GetPageRect()); + DoShowPage(page, true); + + // change selection now to ignore the selection change event + UpdateSelectedPage(n); + + if ( flags & SetSelection_SendEvent ) + { + // program allows the page change + MakeChangedEvent(*event); + (void)GetEventHandler()->ProcessEvent(*event); + } + } + + delete event; + } + + return oldSel; +} + +IMPLEMENT_DYNAMIC_CLASS(wxBookCtrlEvent, wxNotifyEvent) + +#endif // wxUSE_BOOKCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/btncmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/btncmn.cpp new file mode 100644 index 0000000000..cbbfd0f14e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/btncmn.cpp @@ -0,0 +1,121 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/btncmn.cpp +// Purpose: implementation of wxButtonBase +// Author: Vadim Zeitlin +// Created: 2007-04-08 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_BUTTON + +#ifndef WX_PRECOMP + #include "wx/button.h" + #include "wx/toplevel.h" +#endif //WX_PRECOMP + +extern WXDLLEXPORT_DATA(const char) wxButtonNameStr[] = "button"; + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxButtonStyle ) +wxBEGIN_FLAGS( wxButtonStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxBU_LEFT) +wxFLAGS_MEMBER(wxBU_RIGHT) +wxFLAGS_MEMBER(wxBU_TOP) +wxFLAGS_MEMBER(wxBU_BOTTOM) +wxFLAGS_MEMBER(wxBU_EXACTFIT) +wxEND_FLAGS( wxButtonStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxButton, wxControl, "wx/button.h") + +wxBEGIN_PROPERTIES_TABLE(wxButton) +wxEVENT_PROPERTY( Click, wxEVT_BUTTON, wxCommandEvent ) + +wxPROPERTY( Font, wxFont, SetFont, GetFont, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("The font associated with the button label"), wxT("group")) +wxPROPERTY( Label, wxString, SetLabel, GetLabel, wxString(), \ + 0 /*flags*/, wxT("The button label"), wxT("group") ) + +wxPROPERTY_FLAGS( WindowStyle, wxButtonStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("The button style"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxButton) + +wxCONSTRUCTOR_6( wxButton, wxWindow*, Parent, wxWindowID, Id, wxString, \ + Label, wxPoint, Position, wxSize, Size, long, WindowStyle ) + + +// ============================================================================ +// implementation +// ============================================================================ + +wxWindow *wxButtonBase::SetDefault() +{ + wxTopLevelWindow * const + tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow); + + wxCHECK_MSG( tlw, NULL, wxT("button without top level window?") ); + + return tlw->SetDefaultItem(this); +} + +void wxAnyButtonBase::SetBitmapPosition(wxDirection dir) +{ + wxASSERT_MSG( !(dir & ~wxDIRECTION_MASK), "non-direction flag used" ); + wxASSERT_MSG( !!(dir & wxLEFT) + + !!(dir & wxRIGHT) + + !!(dir & wxTOP) + + !!(dir & wxBOTTOM) == 1, + "exactly one direction flag must be set" ); + + DoSetBitmapPosition(dir); + +} +#endif // wxUSE_BUTTON diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/cairo.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/cairo.cpp new file mode 100644 index 0000000000..a10ca6499f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/cairo.cpp @@ -0,0 +1,436 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/cairo.cpp +// Purpose: Cairo library +// Author: Anthony Betaudeau +// Created: 2007-08-25 +// Copyright: (c) Anthony Bretaudeau +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CAIRO + +// keep cairo.h from defining dllimport as we're defining the symbols inside +// the wx dll in order to load them dynamically. +#define cairo_public + +#include +#include "wx/dynlib.h" + +#ifdef __WXMSW__ +#include "wx/msw/wrapwin.h" +#endif + +#ifdef __WXMAC__ +#include "wx/osx/private.h" +#include +#endif + +#ifndef WX_PRECOMP + #include "wx/module.h" + #include "wx/log.h" +#endif + +#define wxCAIRO_METHOD_TYPE(name) \ + wxCairo##name##_t + +#define wxCAIRO_STATIC_METHOD_DEFINE(rettype, name, args, argnames, defret) \ + static wxCAIRO_METHOD_TYPE(name) name; + +#define wxCAIRO_STATIC_VOIDMETHOD_DEFINE(name, args, argnames) \ + wxCAIRO_STATIC_METHOD_DEFINE(void, name, args, argnames, NULL) + +#define wxFOR_ALL_CAIRO_VOIDMETHODS(m) \ + m( cairo_append_path, \ + (cairo_t *cr, const cairo_path_t *path), (cr, path) ) \ + m( cairo_arc, \ + (cairo_t *cr, double xc, double yc, double radius, double angle1, double angle2), (cr, xc, yc, radius, angle1, angle2) ) \ + m( cairo_arc_negative, \ + (cairo_t *cr, double xc, double yc, double radius, double angle1, double angle2), (cr, xc, yc, radius, angle1, angle2) ) \ + m( cairo_clip, \ + (cairo_t *cr), (cr) ) \ + m( cairo_close_path, \ + (cairo_t *cr), (cr) ) \ + m( cairo_curve_to, \ + (cairo_t *cr, double x1, double y1, double x2, double y2, double x3, double y3), (cr, x1, y1, x2, y2, x3, y3) ) \ + m( cairo_destroy, \ + (cairo_t *cr), (cr) ) \ + m( cairo_fill, \ + (cairo_t *cr), (cr) ) \ + m( cairo_fill_preserve, \ + (cairo_t *cr), (cr) ) \ + m( cairo_font_extents, \ + (cairo_t *cr, cairo_font_extents_t *extents), (cr, extents) ) \ + m( cairo_font_face_destroy, \ + (cairo_font_face_t *font_face), (font_face) ) \ + m( cairo_get_current_point, \ + (cairo_t *cr, double *x, double *y), (cr, x, y) ) \ + m( cairo_get_matrix, \ + (cairo_t *cr, cairo_matrix_t *matrix), (cr, matrix) ) \ + m( cairo_line_to, \ + (cairo_t *cr, double x, double y), (cr, x, y) ) \ + m( cairo_matrix_init, \ + (cairo_matrix_t *matrix, double xx, double yx, double xy, double yy, double x0, double y0), (matrix, xx, yx, xy, yy, x0, y0) ) \ + m( cairo_matrix_multiply, \ + (cairo_matrix_t *result, const cairo_matrix_t *a, const cairo_matrix_t *b), (result, a, b) ) \ + m( cairo_matrix_rotate, \ + (cairo_matrix_t *matrix, double radians), (matrix, radians) ) \ + m( cairo_matrix_scale, \ + (cairo_matrix_t *matrix, double sx, double sy), (matrix, sx, sy) ) \ + m( cairo_matrix_transform_distance, \ + (const cairo_matrix_t *matrix, double *dx, double *dy), (matrix, dx, dy) ) \ + m( cairo_matrix_transform_point, \ + (const cairo_matrix_t *matrix, double *x, double *y), (matrix, x, y) ) \ + m( cairo_matrix_translate, \ + (cairo_matrix_t *matrix, double tx, double ty), (matrix, tx, ty) ) \ + m( cairo_move_to, \ + (cairo_t *cr, double x, double y), (cr, x, y) ) \ + m( cairo_new_path, \ + (cairo_t *cr), (cr) ) \ + m( cairo_paint, \ + (cairo_t *cr), (cr) ) \ + m( cairo_paint_with_alpha, \ + (cairo_t *cr, double alpha), (cr, alpha) ) \ + m( cairo_path_destroy, \ + (cairo_path_t *path), (path) ) \ + m( cairo_pattern_add_color_stop_rgba, \ + (cairo_pattern_t *pattern, double offset, double red, double green, double blue, double alpha), (pattern, offset, red, green, blue, alpha) ) \ + m( cairo_pattern_destroy, \ + (cairo_pattern_t *pattern), (pattern) ) \ + m( cairo_pattern_set_extend, \ + (cairo_pattern_t *pattern, cairo_extend_t extend), (pattern, extend) ) \ + m( cairo_pattern_set_filter, \ + (cairo_pattern_t *pattern, cairo_filter_t filter), (pattern, filter) ) \ + m( cairo_pop_group_to_source, \ + (cairo_t *cr), (cr) ) \ + m( cairo_push_group, \ + (cairo_t *cr), (cr) ) \ + m( cairo_rectangle, \ + (cairo_t *cr, double x, double y, double width, double height), (cr, x, y, width, height) ) \ + m( cairo_reset_clip, \ + (cairo_t *cr), (cr) ) \ + m( cairo_restore, \ + (cairo_t *cr), (cr) ) \ + m( cairo_rotate, \ + (cairo_t *cr, double angle), (cr, angle) ) \ + m( cairo_save, \ + (cairo_t *cr), (cr) ) \ + m( cairo_scale, \ + (cairo_t *cr, double sx, double sy), (cr, sx, sy) ) \ + m( cairo_select_font_face, \ + (cairo_t *cr, const char *family, cairo_font_slant_t slant, cairo_font_weight_t weight), (cr, family, slant, weight) ) \ + m( cairo_set_antialias, \ + (cairo_t *cr, cairo_antialias_t antialias), (cr, antialias) ) \ + m( cairo_set_dash, \ + (cairo_t *cr, const double *dashes, int num_dashes, double offset), (cr, dashes, num_dashes, offset) ) \ + m( cairo_set_fill_rule, \ + (cairo_t *cr, cairo_fill_rule_t fill_rule), (cr, fill_rule) ) \ + m( cairo_set_font_face, \ + (cairo_t *cr, cairo_font_face_t *font_face), (cr, font_face) ) \ + m( cairo_set_font_size, \ + (cairo_t *cr, double size), (cr, size) ) \ + m( cairo_set_line_cap, \ + (cairo_t *cr, cairo_line_cap_t line_cap), (cr, line_cap) ) \ + m( cairo_set_line_join, \ + (cairo_t *cr, cairo_line_join_t line_join), (cr, line_join) ) \ + m( cairo_set_line_width, \ + (cairo_t *cr, double width), (cr, width) ) \ + m( cairo_set_matrix, \ + (cairo_t *cr, const cairo_matrix_t *matrix), (cr, matrix) ) \ + m( cairo_set_operator, \ + (cairo_t *cr, cairo_operator_t op), (cr, op) ) \ + m( cairo_set_source, \ + (cairo_t *cr, cairo_pattern_t *source), (cr, source) ) \ + m( cairo_set_source_rgba, \ + (cairo_t *cr, double red, double green, double blue, double alpha), (cr, red, green, blue, alpha) ) \ + m( cairo_show_text, \ + (cairo_t *cr, const char *utf8), (cr, utf8) ) \ + m( cairo_stroke, \ + (cairo_t *cr), (cr) ) \ + m( cairo_stroke_extents, \ + (cairo_t *cr, double *x1, double *y1, double *x2, double *y2), (cr, x1, y1, x2, y2) ) \ + m( cairo_stroke_preserve, \ + (cairo_t *cr), (cr) ) \ + m( cairo_surface_destroy, \ + (cairo_surface_t *surface), (surface) ) \ + m( cairo_text_extents, \ + (cairo_t *cr, const char *utf8, cairo_text_extents_t *extents), (cr, utf8, extents) ) \ + m( cairo_transform, \ + (cairo_t *cr, const cairo_matrix_t *matrix), (cr, matrix) ) \ + m( cairo_translate, \ + (cairo_t *cr, double tx, double ty), (cr, tx, ty) ) \ + +#ifdef __WXMAC__ +#define wxCAIRO_PLATFORM_METHODS(m) \ + m( cairo_font_face_t*, cairo_quartz_font_face_create_for_cgfont, \ + (CGFontRef font), (font), NULL ) \ + m( cairo_surface_t*, cairo_quartz_surface_create_for_cg_context, \ + (CGContextRef cgContext, unsigned int width, unsigned int height), (cgContext, width, height), NULL ) +#elif defined(__WXMSW__) +#define wxCAIRO_PLATFORM_METHODS(m) \ + m( cairo_surface_t*, cairo_win32_surface_create, \ + (HDC hdc), (hdc), NULL ) \ + m( cairo_surface_t*, cairo_win32_printing_surface_create, \ + (HDC hdc), (hdc), NULL ) +#else +#define wxCAIRO_PLATFORM_METHODS(m) +#endif + +#define wxFOR_ALL_CAIRO_METHODS(m) \ + m( cairo_path_t*, cairo_copy_path, \ + (cairo_t *cr), (cr), NULL ) \ + m( cairo_t*, cairo_create, \ + (cairo_surface_t *target), (target), NULL) \ + m( cairo_surface_t*, cairo_get_target, \ + (cairo_t *cr), (cr), NULL) \ + m( cairo_surface_t*, cairo_image_surface_create, \ + (cairo_format_t format, int width, int height), (format, width, height), NULL ) \ + m( cairo_surface_t*, cairo_image_surface_create_for_data, \ + (unsigned char *data, cairo_format_t format, int width, int height, int stride), (data, format, width, height, stride), NULL) \ + m( cairo_bool_t, cairo_in_fill, \ + (cairo_t *cr, double x, double y), (cr, x, y), false ) \ + m( cairo_status_t, cairo_matrix_invert, \ + (cairo_matrix_t *matrix), (matrix), NULL) \ + m( cairo_pattern_t*, cairo_pattern_create_for_surface, \ + (cairo_surface_t *surface), (surface), NULL) \ + m( cairo_pattern_t*, cairo_pattern_create_linear, \ + (double x0, double y0, double x1, double y1), (x0, y0, x1, y1), NULL) \ + m( cairo_pattern_t*, cairo_pattern_create_radial, \ + (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1), (cx0, cy0, radius0, cx1, cy1, radius1), NULL) \ + m( cairo_status_t, cairo_pattern_status, \ + (cairo_pattern_t *pattern), (pattern), 4) \ + m( cairo_t*, cairo_reference, \ + (cairo_t *cr), (cr), NULL ) \ + m( cairo_surface_t*, cairo_surface_create_similar, \ + (cairo_surface_t *other, cairo_content_t content, int width, int height), (other, content, width, height), NULL) \ + m( int, cairo_format_stride_for_width, \ + (cairo_format_t format, int width), (format, width), 0) \ + m( int, cairo_version, \ + (), (), 0) \ + m( int, cairo_image_surface_get_stride, \ + (cairo_surface_t *surface), (surface), 0) \ + m( unsigned char *, cairo_image_surface_get_data, \ + (cairo_surface_t *surface), (surface), NULL) \ + m( cairo_format_t, cairo_image_surface_get_format, \ + (cairo_surface_t *surface), (surface), CAIRO_FORMAT_INVALID) \ + m( cairo_surface_type_t, cairo_surface_get_type, \ + (cairo_surface_t *surface), (surface), -1) \ + wxCAIRO_PLATFORM_METHODS(m) + + +#if wxUSE_PANGO +#define wxFOR_ALL_PANGO_CAIRO_VOIDMETHODS(m) \ + m( pango_cairo_update_layout, \ + (cairo_t *cr, PangoLayout *layout), (cr, layout) ) \ + m( pango_cairo_show_layout, \ + (cairo_t *cr, PangoLayout *layout), (cr, layout) ) +#endif + +#define wxCAIRO_DECLARE_TYPE(rettype, name, args, argnames, defret) \ + typedef rettype (*wxCAIRO_METHOD_TYPE(name)) args ; \ + wxCAIRO_METHOD_TYPE(name) wxDL_METHOD_NAME(name); + +#define wxCAIRO_DECLARE_VOIDTYPE(name, args, argnames) \ + wxCAIRO_DECLARE_TYPE(void, name, args, argnames, NULL) + +wxFOR_ALL_CAIRO_VOIDMETHODS(wxCAIRO_DECLARE_VOIDTYPE) +wxFOR_ALL_CAIRO_METHODS(wxCAIRO_DECLARE_TYPE) + + +class wxCairo +{ +public: + static bool Initialize(); + + // for internal use only + static void CleanUp(); + +private: + // the single wxCairo instance or NULL + static wxCairo *ms_lib; + + wxCairo(); + ~wxCairo(); + + bool IsOk(); + + wxDynamicLibrary m_libCairo; + wxDynamicLibrary m_libPangoCairo; + + // true if we successfully loaded the libraries and can use them + // + // note that this field must have this name as it's used by wxDL_XXX macros + bool m_ok; + +public: + + wxFOR_ALL_CAIRO_VOIDMETHODS(wxCAIRO_STATIC_VOIDMETHOD_DEFINE) + wxFOR_ALL_CAIRO_METHODS(wxCAIRO_STATIC_METHOD_DEFINE) +#if wxUSE_PANGO // untested, uncomment to test compilation. + //wxFOR_ALL_PANGO_METHODS(wxDL_STATIC_METHOD_DEFINE) +#endif + + wxDECLARE_NO_COPY_CLASS(wxCairo); +}; + +#define wxINIT_CAIRO_VOIDFUNC(name, params, args) \ + wxCAIRO_METHOD_TYPE(name) wxCairo::name = NULL; + +#define wxINIT_CAIRO_FUNC(rettype, name, params, args, defret) \ + wxCAIRO_METHOD_TYPE(name) wxCairo::name = NULL; + +wxFOR_ALL_CAIRO_VOIDMETHODS(wxINIT_CAIRO_VOIDFUNC) +wxFOR_ALL_CAIRO_METHODS(wxINIT_CAIRO_FUNC) + +#undef wxINIT_CAIRO_FUNC + +wxCairo *wxCairo::ms_lib = NULL; + +//---------------------------------------------------------------------------- +// wxCairoLibrary +//---------------------------------------------------------------------------- + +wxCairo::wxCairo() +{ + wxLogNull log; + +#ifdef __WXMSW__ + wxString cairoDllStr("libcairo-2.dll"); +#else + wxString cairoDllStr("libcairo.so.2"); +#endif + m_libCairo.Load(cairoDllStr); + m_ok = m_libCairo.IsLoaded(); + if ( !m_ok ) + return; + +#if wxUSE_PANGO + m_libPangoCairo.Load("libpangocairo-1.0.so.0"); + m_ok = m_libPangoCairo.IsLoaded(); + if ( !m_ok ) + { + m_libCairo.Unload(); + return; + } +#endif + + +#define wxDO_LOAD_FUNC(name, nameStr) \ + name = (wxCAIRO_METHOD_TYPE(name))m_libCairo.RawGetSymbol(nameStr); \ + if ( !name ) \ + return; + +#define wxLOAD_CAIRO_VOIDFUNC(name, params, args) \ + wxDO_LOAD_FUNC(name, wxSTRINGIZE_T(name)) + +#define wxLOAD_CAIRO_FUNC(rettype, name, params, args, defret) \ + wxDO_LOAD_FUNC(name, wxSTRINGIZE_T(name)) + +wxFOR_ALL_CAIRO_VOIDMETHODS(wxLOAD_CAIRO_VOIDFUNC) +wxFOR_ALL_CAIRO_METHODS(wxLOAD_CAIRO_FUNC) + +#undef wxLOAD_CAIRO_FUNC + + m_ok = true; +} + +wxCairo::~wxCairo() +{ +} + +/* static */ bool wxCairo::Initialize() +{ + if ( !ms_lib ) + { + ms_lib = new wxCairo(); + if ( !ms_lib->IsOk() ) + { + delete ms_lib; + ms_lib = NULL; + } + } + + return ms_lib != NULL; +} + +/* static */ void wxCairo::CleanUp() +{ + if (ms_lib) + { + delete ms_lib; + ms_lib = NULL; + } +} + +bool wxCairo::IsOk() +{ + return m_ok; +} + +// ============================================================================ +// implementation of the functions themselves +// ============================================================================ + +bool wxCairoInit() +{ + return wxCairo::Initialize(); +} + +extern "C" +{ + +#define wxIMPL_CAIRO_FUNC(rettype, name, params, args, defret) \ + rettype name params \ + { \ + wxASSERT_MSG(wxCairo::Initialize(), "Cairo not initialized"); \ + return wxCairo::name args; \ + } + +#define wxIMPL_CAIRO_VOIDFUNC(name, params, args) \ + wxIMPL_CAIRO_FUNC(void, name, params, args, NULL) + +// we currently link directly to Cairo on GTK since it is usually available there, +// so don't use our cairo_xyz wrapper functions until the decision is made to +// always load Cairo dynamically there. +#ifndef __WXGTK__ +wxFOR_ALL_CAIRO_VOIDMETHODS(wxIMPL_CAIRO_VOIDFUNC) +wxFOR_ALL_CAIRO_METHODS(wxIMPL_CAIRO_FUNC) +#endif + +} // extern "C" + +//---------------------------------------------------------------------------- +// wxCairoModule +//---------------------------------------------------------------------------- + +class wxCairoModule : public wxModule +{ +public: + wxCairoModule() { } + virtual bool OnInit(); + virtual void OnExit(); + +private: + DECLARE_DYNAMIC_CLASS(wxCairoModule) +}; + +bool wxCairoModule::OnInit() +{ + return true; +} + +void wxCairoModule::OnExit() +{ + wxCairo::CleanUp(); +} + +IMPLEMENT_DYNAMIC_CLASS(wxCairoModule, wxModule) + +#endif // wxUSE_CAIRO diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/calctrlcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/calctrlcmn.cpp new file mode 100644 index 0000000000..2b869127b2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/calctrlcmn.cpp @@ -0,0 +1,199 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/calctrlcmn.cpp +// Author: Marcin Wojdyr +// Created: 2008-03-26 +// Copyright: (C) Marcin Wojdyr +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#endif //WX_PRECOMP + +#if wxUSE_CALENDARCTRL || wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL + +#include "wx/dateevt.h" +IMPLEMENT_DYNAMIC_CLASS(wxDateEvent, wxCommandEvent) +wxDEFINE_EVENT(wxEVT_DATE_CHANGED, wxDateEvent); +wxDEFINE_EVENT(wxEVT_TIME_CHANGED, wxDateEvent); + +#endif // wxUSE_CALENDARCTRL || wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL + + +#if wxUSE_CALENDARCTRL + +#include "wx/calctrl.h" + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxCalendarCtrlStyle ) +wxBEGIN_FLAGS( wxCalendarCtrlStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxCAL_SUNDAY_FIRST) +wxFLAGS_MEMBER(wxCAL_MONDAY_FIRST) +wxFLAGS_MEMBER(wxCAL_SHOW_HOLIDAYS) +wxFLAGS_MEMBER(wxCAL_NO_YEAR_CHANGE) +wxFLAGS_MEMBER(wxCAL_NO_MONTH_CHANGE) +wxFLAGS_MEMBER(wxCAL_SEQUENTIAL_MONTH_SELECTION) +wxFLAGS_MEMBER(wxCAL_SHOW_SURROUNDING_WEEKS) + +wxEND_FLAGS( wxCalendarCtrlStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCalendarCtrl, wxControl, "wx/calctrl.h") + +wxBEGIN_PROPERTIES_TABLE(wxCalendarCtrl) +wxEVENT_RANGE_PROPERTY( Updated, wxEVT_CALENDAR_SEL_CHANGED, \ + wxEVT_CALENDAR_WEEKDAY_CLICKED, wxCalendarEvent ) + +wxHIDE_PROPERTY( Children ) + +wxPROPERTY( Date,wxDateTime, SetDate, GetDate, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxPROPERTY_FLAGS( WindowStyle, wxCalendarCtrlStyle, long, \ + SetWindowStyleFlag, GetWindowStyleFlag, \ + wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), \ + wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxCalendarCtrl) + +wxCONSTRUCTOR_6( wxCalendarCtrl, wxWindow*, Parent, wxWindowID, Id, \ + wxDateTime, Date, wxPoint, Position, wxSize, Size, long, WindowStyle ) + +// ---------------------------------------------------------------------------- +// events +// ---------------------------------------------------------------------------- +IMPLEMENT_DYNAMIC_CLASS(wxCalendarEvent, wxDateEvent) + +wxDEFINE_EVENT( wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEvent ); +wxDEFINE_EVENT( wxEVT_CALENDAR_PAGE_CHANGED, wxCalendarEvent ); +wxDEFINE_EVENT( wxEVT_CALENDAR_DOUBLECLICKED, wxCalendarEvent ); +wxDEFINE_EVENT( wxEVT_CALENDAR_WEEKDAY_CLICKED, wxCalendarEvent ); +wxDEFINE_EVENT( wxEVT_CALENDAR_WEEK_CLICKED, wxCalendarEvent ); + +// deprecated events +wxDEFINE_EVENT( wxEVT_CALENDAR_DAY_CHANGED, wxCalendarEvent ); +wxDEFINE_EVENT( wxEVT_CALENDAR_MONTH_CHANGED, wxCalendarEvent ); +wxDEFINE_EVENT( wxEVT_CALENDAR_YEAR_CHANGED, wxCalendarEvent ); + + +wxCalendarDateAttr wxCalendarDateAttr::m_mark(wxCAL_BORDER_SQUARE); + +bool wxCalendarCtrlBase::EnableMonthChange(bool enable) +{ + const long styleOrig = GetWindowStyle(); + long style = enable ? styleOrig & ~wxCAL_NO_MONTH_CHANGE + : styleOrig | wxCAL_NO_MONTH_CHANGE; + if ( style == styleOrig ) + return false; + + SetWindowStyle(style); + + return true; +} + +bool wxCalendarCtrlBase::GenerateAllChangeEvents(const wxDateTime& dateOld) +{ + const wxDateTime::Tm tm1 = dateOld.GetTm(), + tm2 = GetDate().GetTm(); + + bool pageChanged = false; + + GenerateEvent(wxEVT_CALENDAR_SEL_CHANGED); + if ( tm1.year != tm2.year || tm1.mon != tm2.mon ) + { + GenerateEvent(wxEVT_CALENDAR_PAGE_CHANGED); + + pageChanged = true; + } + + // send also one of the deprecated events + if ( tm1.year != tm2.year ) + GenerateEvent(wxEVT_CALENDAR_YEAR_CHANGED); + else if ( tm1.mon != tm2.mon ) + GenerateEvent(wxEVT_CALENDAR_MONTH_CHANGED); + else + GenerateEvent(wxEVT_CALENDAR_DAY_CHANGED); + + return pageChanged; +} + +void wxCalendarCtrlBase::EnableHolidayDisplay(bool display) +{ + long style = GetWindowStyle(); + if ( display ) + style |= wxCAL_SHOW_HOLIDAYS; + else + style &= ~wxCAL_SHOW_HOLIDAYS; + + if ( style == GetWindowStyle() ) + return; + + SetWindowStyle(style); + + if ( display ) + SetHolidayAttrs(); + else + ResetHolidayAttrs(); + + RefreshHolidays(); +} + +bool wxCalendarCtrlBase::SetHolidayAttrs() +{ + if ( !HasFlag(wxCAL_SHOW_HOLIDAYS) ) + return false; + + ResetHolidayAttrs(); + + wxDateTime::Tm tm = GetDate().GetTm(); + wxDateTime dtStart(1, tm.mon, tm.year), + dtEnd = dtStart.GetLastMonthDay(); + + wxDateTimeArray hol; + wxDateTimeHolidayAuthority::GetHolidaysInRange(dtStart, dtEnd, hol); + + const size_t count = hol.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + SetHoliday(hol[n].GetDay()); + } + + return true; +} + +#endif // wxUSE_CALENDARCTRL + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/checkboxcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/checkboxcmn.cpp new file mode 100644 index 0000000000..b31d85338d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/checkboxcmn.cpp @@ -0,0 +1,90 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/checkboxcmn.cpp +// Purpose: wxCheckBox common code +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CHECKBOX + +#include "wx/checkbox.h" + +extern WXDLLEXPORT_DATA(const char) wxCheckBoxNameStr[] = "check"; + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxCheckBoxStyle ) +wxBEGIN_FLAGS( wxCheckBoxStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxNO_BORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxNO_FULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) + +wxEND_FLAGS( wxCheckBoxStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckBox, wxControl, "wx/checkbox.h") + +wxBEGIN_PROPERTIES_TABLE(wxCheckBox) + wxEVENT_PROPERTY( Click, wxEVT_CHECKBOX, wxCommandEvent ) + + wxPROPERTY( Font, wxFont, SetFont, GetFont, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString(), \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + wxPROPERTY( Value,bool, SetValue, GetValue, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + + wxPROPERTY_FLAGS( WindowStyle, wxCheckBoxStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxCheckBox) + +wxCONSTRUCTOR_6( wxCheckBox, wxWindow*, Parent, wxWindowID, Id, \ + wxString, Label, wxPoint, Position, wxSize, Size, long, WindowStyle ) + + +#endif // wxUSE_CHECKBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/checklstcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/checklstcmn.cpp new file mode 100644 index 0000000000..be56ca3e17 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/checklstcmn.cpp @@ -0,0 +1,119 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/checklstcmn.cpp +// Purpose: wxCheckListBox common code +// Author: Vadim Zeitlin +// Modified by: +// Created: 16.11.97 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CHECKLISTBOX + +#include "wx/checklst.h" + +#ifndef WX_PRECOMP + #include "wx/object.h" + #include "wx/colour.h" + #include "wx/font.h" + #include "wx/bitmap.h" + #include "wx/window.h" + #include "wx/listbox.h" + #include "wx/dcmemory.h" + #include "wx/settings.h" + #include "wx/log.h" +#endif + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxCheckListBoxStyle ) +wxBEGIN_FLAGS( wxCheckListBoxStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) + + wxFLAGS_MEMBER(wxLB_SINGLE) + wxFLAGS_MEMBER(wxLB_MULTIPLE) + wxFLAGS_MEMBER(wxLB_EXTENDED) + wxFLAGS_MEMBER(wxLB_HSCROLL) + wxFLAGS_MEMBER(wxLB_ALWAYS_SB) + wxFLAGS_MEMBER(wxLB_NEEDED_SB) + wxFLAGS_MEMBER(wxLB_SORT) + wxFLAGS_MEMBER(wxLB_OWNERDRAW) + +wxEND_FLAGS( wxCheckListBoxStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckListBox, wxListBox, "wx/checklst.h") + +wxBEGIN_PROPERTIES_TABLE(wxCheckListBox) + wxEVENT_PROPERTY( Toggle, wxEVT_CHECKLISTBOX, wxCommandEvent ) + wxPROPERTY_FLAGS( WindowStyle, wxCheckListBoxStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, wxLB_OWNERDRAW /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxCheckListBox) + +wxCONSTRUCTOR_4( wxCheckListBox, wxWindow*, Parent, wxWindowID, Id, \ + wxPoint, Position, wxSize, Size ) + + +// ============================================================================ +// implementation +// ============================================================================ + +unsigned int wxCheckListBoxBase::GetCheckedItems(wxArrayInt& checkedItems) const +{ + unsigned int const numberOfItems = GetCount(); + + checkedItems.clear(); + for ( unsigned int i = 0; i < numberOfItems; ++i ) + { + if ( IsChecked(i) ) + checkedItems.push_back(i); + } + + return checkedItems.size(); +} + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/choiccmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/choiccmn.cpp new file mode 100644 index 0000000000..6ac940b424 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/choiccmn.cpp @@ -0,0 +1,132 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/choiccmn.cpp +// Purpose: common (to all ports) wxChoice functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 26.07.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CHOICE + +#include "wx/choice.h" + +#include "wx/private/textmeasure.h" + +#ifndef WX_PRECOMP +#endif + +const char wxChoiceNameStr[] = "choice"; + + +wxDEFINE_FLAGS( wxChoiceStyle ) +wxBEGIN_FLAGS( wxChoiceStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxEND_FLAGS( wxChoiceStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxChoice, wxControl, "wx/choice.h") + +wxBEGIN_PROPERTIES_TABLE(wxChoice) +wxEVENT_PROPERTY( Select, wxEVT_CHOICE, wxCommandEvent ) + +wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxPROPERTY_COLLECTION( Choices, wxArrayString, wxString, AppendString, \ + GetStrings, 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxPROPERTY( Selection,int, SetSelection, GetSelection, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + +/* + TODO PROPERTIES + selection (long) + content (list) + item + */ + +wxPROPERTY_FLAGS( WindowStyle, wxChoiceStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxChoice) + +wxCONSTRUCTOR_4( wxChoice, wxWindow*, Parent, wxWindowID, Id, \ + wxPoint, Position, wxSize, Size ) + +// ============================================================================ +// implementation +// ============================================================================ + +wxChoiceBase::~wxChoiceBase() +{ + // this destructor is required for Darwin +} + +wxSize wxChoiceBase::DoGetBestSize() const +{ + // a reasonable width for an empty choice list + wxSize best(80, -1); + + const unsigned int nItems = GetCount(); + if ( nItems > 0 ) + { + wxTextMeasure txm(this); + best.x = txm.GetLargestStringExtent(GetStrings()).x; + } + + return best; +} + +// ---------------------------------------------------------------------------- +// misc +// ---------------------------------------------------------------------------- + +void wxChoiceBase::Command(wxCommandEvent& event) +{ + SetSelection(event.GetInt()); + (void)GetEventHandler()->ProcessEvent(event); +} + +#endif // wxUSE_CHOICE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/clipcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/clipcmn.cpp new file mode 100644 index 0000000000..b108944252 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/clipcmn.cpp @@ -0,0 +1,111 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/clipcmn.cpp +// Purpose: common (to all ports) wxClipboard functions +// Author: Robert Roebling +// Modified by: +// Created: 28.06.99 +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CLIPBOARD + +#include "wx/clipbrd.h" + +#ifndef WX_PRECOMP + #include "wx/dataobj.h" + #include "wx/module.h" +#endif + +// --------------------------------------------------------- +// wxClipboardEvent +// --------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxClipboardEvent,wxEvent) + +wxDEFINE_EVENT( wxEVT_CLIPBOARD_CHANGED, wxClipboardEvent ); + +bool wxClipboardEvent::SupportsFormat( const wxDataFormat &format ) const +{ +#ifdef __WXGTK20__ + for (wxVector::size_type n = 0; n < m_formats.size(); n++) + { + if (m_formats[n] == format) + return true; + } + + return false; +#else + // All other ports just query the clipboard directly + // from here + wxClipboard* clipboard = (wxClipboard*) GetEventObject(); + return clipboard->IsSupported( format ); +#endif +} + +void wxClipboardEvent::AddFormat(const wxDataFormat& format) +{ + m_formats.push_back( format ); +} + +// --------------------------------------------------------- +// wxClipboardBase +// --------------------------------------------------------- + +static wxClipboard *gs_clipboard = NULL; + +/*static*/ wxClipboard *wxClipboardBase::Get() +{ + if ( !gs_clipboard ) + { + gs_clipboard = new wxClipboard; + } + return gs_clipboard; +} + +bool wxClipboardBase::IsSupportedAsync( wxEvtHandler *sink ) +{ + // We just imitate an asynchronous API on most platforms. + // This method is overridden uner GTK. + wxClipboardEvent *event = new wxClipboardEvent(wxEVT_CLIPBOARD_CHANGED); + event->SetEventObject( this ); + + sink->QueueEvent( event ); + + return true; +} + + +// ---------------------------------------------------------------------------- +// wxClipboardModule: module responsible for destroying the global clipboard +// object +// ---------------------------------------------------------------------------- + +class wxClipboardModule : public wxModule +{ +public: + bool OnInit() { return true; } + void OnExit() { wxDELETE(gs_clipboard); } + +private: + DECLARE_DYNAMIC_CLASS(wxClipboardModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxClipboardModule, wxModule) + +#endif // wxUSE_CLIPBOARD diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/clntdata.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/clntdata.cpp new file mode 100644 index 0000000000..1cb5595785 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/clntdata.cpp @@ -0,0 +1,82 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/clntdata.cpp +// Purpose: A mixin class for holding a wxClientData or void pointer +// Author: Robin Dunn +// Modified by: +// Created: 9-Oct-2001 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/clntdata.h" + + +// ---------------------------------------------------------------------------- + + +wxClientDataContainer::wxClientDataContainer() +{ + // no client data (yet) + m_clientData = NULL; + m_clientDataType = wxClientData_None; +} + +wxClientDataContainer::~wxClientDataContainer() +{ + // we only delete object data, not untyped + if ( m_clientDataType == wxClientData_Object ) + delete m_clientObject; +} + +void wxClientDataContainer::DoSetClientObject( wxClientData *data ) +{ + wxASSERT_MSG( m_clientDataType != wxClientData_Void, + wxT("can't have both object and void client data") ); + + if ( m_clientObject ) + delete m_clientObject; + + m_clientObject = data; + m_clientDataType = wxClientData_Object; +} + +wxClientData *wxClientDataContainer::DoGetClientObject() const +{ + // it's not an error to call GetClientObject() on a window which doesn't + // have client data at all - NULL will be returned + wxASSERT_MSG( m_clientDataType != wxClientData_Void, + wxT("this window doesn't have object client data") ); + + return m_clientObject; +} + +void wxClientDataContainer::DoSetClientData( void *data ) +{ + wxASSERT_MSG( m_clientDataType != wxClientData_Object, + wxT("can't have both object and void client data") ); + + m_clientData = data; + m_clientDataType = wxClientData_Void; +} + +void *wxClientDataContainer::DoGetClientData() const +{ + // it's not an error to call GetClientData() on a window which doesn't have + // client data at all - NULL will be returned + wxASSERT_MSG( m_clientDataType != wxClientData_Object, + wxT("this window doesn't have void client data") ); + + return m_clientData; +} + + +// ---------------------------------------------------------------------------- + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/clrpickercmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/clrpickercmn.cpp new file mode 100644 index 0000000000..8320178596 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/clrpickercmn.cpp @@ -0,0 +1,139 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/clrpickercmn.cpp +// Purpose: wxColourPickerCtrl class implementation +// Author: Francesco Montorsi (readapted code written by Vadim Zeitlin) +// Modified by: +// Created: 15/04/2006 +// Copyright: (c) Vadim Zeitlin, Francesco Montorsi +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_COLOURPICKERCTRL + +#include "wx/clrpicker.h" + +#ifndef WX_PRECOMP + #include "wx/textctrl.h" +#endif + +const char wxColourPickerCtrlNameStr[] = "colourpicker"; +const char wxColourPickerWidgetNameStr[] = "colourpickerwidget"; + +// ============================================================================ +// implementation +// ============================================================================ + +wxDEFINE_EVENT(wxEVT_COLOURPICKER_CHANGED, wxColourPickerEvent); +IMPLEMENT_DYNAMIC_CLASS(wxColourPickerCtrl, wxPickerBase) +IMPLEMENT_DYNAMIC_CLASS(wxColourPickerEvent, wxEvent) + +// ---------------------------------------------------------------------------- +// wxColourPickerCtrl +// ---------------------------------------------------------------------------- + +#define M_PICKER ((wxColourPickerWidget*)m_picker) + +bool wxColourPickerCtrl::Create( wxWindow *parent, wxWindowID id, + const wxColour &col, + const wxPoint &pos, const wxSize &size, + long style, const wxValidator& validator, + const wxString &name ) +{ + if (!wxPickerBase::CreateBase(parent, id, col.GetAsString(), pos, size, + style, validator, name)) + return false; + + // we are not interested to the ID of our picker as we connect + // to its "changed" event dynamically... + m_picker = new wxColourPickerWidget(this, wxID_ANY, col, + wxDefaultPosition, wxDefaultSize, + GetPickerStyle(style)); + + // complete sizer creation + wxPickerBase::PostCreation(); + + m_picker->Connect(wxEVT_COLOURPICKER_CHANGED, + wxColourPickerEventHandler(wxColourPickerCtrl::OnColourChange), + NULL, this); + + return true; +} + +void wxColourPickerCtrl::SetColour(const wxColour &col) +{ + M_PICKER->SetColour(col); + UpdateTextCtrlFromPicker(); +} + +bool wxColourPickerCtrl::SetColour(const wxString &text) +{ + wxColour col(text); // smart wxString->wxColour conversion + if ( !col.IsOk() ) + return false; + M_PICKER->SetColour(col); + UpdateTextCtrlFromPicker(); + + return true; +} + +void wxColourPickerCtrl::UpdatePickerFromTextCtrl() +{ + wxASSERT(m_text); + + // wxString -> wxColour conversion + wxColour col(m_text->GetValue()); + if ( !col.IsOk() ) + return; // invalid user input + + if (M_PICKER->GetColour() != col) + { + M_PICKER->SetColour(col); + + // fire an event + wxColourPickerEvent event(this, GetId(), col); + GetEventHandler()->ProcessEvent(event); + } +} + +void wxColourPickerCtrl::UpdateTextCtrlFromPicker() +{ + if (!m_text) + return; // no textctrl to update + + // Take care to use ChangeValue() here and not SetValue() to avoid + // infinite recursion. + m_text->ChangeValue(M_PICKER->GetColour().GetAsString()); +} + + + +// ---------------------------------------------------------------------------- +// wxColourPickerCtrl - event handlers +// ---------------------------------------------------------------------------- + +void wxColourPickerCtrl::OnColourChange(wxColourPickerEvent &ev) +{ + UpdateTextCtrlFromPicker(); + + // the wxColourPickerWidget sent us a colour-change notification. + // forward this event to our parent + wxColourPickerEvent event(this, GetId(), ev.GetColour()); + GetEventHandler()->ProcessEvent(event); +} + +#endif // wxUSE_COLOURPICKERCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/cmdline.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/cmdline.cpp new file mode 100644 index 0000000000..972d8431da --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/cmdline.cpp @@ -0,0 +1,1508 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/cmdline.cpp +// Purpose: wxCmdLineParser implementation +// Author: Vadim Zeitlin +// Modified by: +// Created: 05.01.00 +// Copyright: (c) 2000 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/dynarray.h" + #include "wx/string.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/app.h" +#endif //WX_PRECOMP + +#include "wx/cmdline.h" + +#if wxUSE_CMDLINE_PARSER + +#include +#include // for LC_ALL + +#include "wx/datetime.h" +#include "wx/msgout.h" +#include "wx/filename.h" +#include "wx/apptrait.h" +#include "wx/scopeguard.h" + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +static wxString GetTypeName(wxCmdLineParamType type); + +static wxString GetOptionName(wxString::const_iterator p, + wxString::const_iterator end, + const wxChar *allowedChars); + +static wxString GetShortOptionName(wxString::const_iterator p, + wxString::const_iterator end); + +static wxString GetLongOptionName(wxString::const_iterator p, + wxString::const_iterator end); + +// ---------------------------------------------------------------------------- +// private structs +// ---------------------------------------------------------------------------- + +// an internal representation of an option +struct wxCmdLineOption +{ + wxCmdLineOption(wxCmdLineEntryType k, + const wxString& shrt, + const wxString& lng, + const wxString& desc, + wxCmdLineParamType typ, + int fl) + { + // wxCMD_LINE_USAGE_TEXT uses only description, shortName and longName is empty + if ( k != wxCMD_LINE_USAGE_TEXT ) + { + wxASSERT_MSG + ( + !shrt.empty() || !lng.empty(), + wxT("option should have at least one name") + ); + + wxASSERT_MSG + ( + GetShortOptionName(shrt.begin(), shrt.end()).Len() == shrt.Len(), + wxT("Short option contains invalid characters") + ); + + wxASSERT_MSG + ( + GetLongOptionName(lng.begin(), lng.end()).Len() == lng.Len(), + wxT("Long option contains invalid characters") + ); + } + + kind = k; + + shortName = shrt; + longName = lng; + description = desc; + + type = typ; + flags = fl; + + Reset(); + } + + // can't use union easily here, so just store all possible data fields, we + // don't waste much (might still use union later if the number of supported + // types increases, so always use the accessor functions and don't access + // the fields directly!) + + void Check(wxCmdLineParamType WXUNUSED_UNLESS_DEBUG(typ)) const + { + wxASSERT_MSG( type == typ, wxT("type mismatch in wxCmdLineOption") ); + } + + double GetDoubleVal() const + { Check(wxCMD_LINE_VAL_DOUBLE); return m_doubleVal; } + long GetLongVal() const + { Check(wxCMD_LINE_VAL_NUMBER); return m_longVal; } + const wxString& GetStrVal() const + { Check(wxCMD_LINE_VAL_STRING); return m_strVal; } +#if wxUSE_DATETIME + const wxDateTime& GetDateVal() const + { Check(wxCMD_LINE_VAL_DATE); return m_dateVal; } +#endif // wxUSE_DATETIME + + void SetDoubleVal(double val) + { Check(wxCMD_LINE_VAL_DOUBLE); m_doubleVal = val; m_hasVal = true; } + void SetLongVal(long val) + { Check(wxCMD_LINE_VAL_NUMBER); m_longVal = val; m_hasVal = true; } + void SetStrVal(const wxString& val) + { Check(wxCMD_LINE_VAL_STRING); m_strVal = val; m_hasVal = true; } +#if wxUSE_DATETIME + void SetDateVal(const wxDateTime& val) + { Check(wxCMD_LINE_VAL_DATE); m_dateVal = val; m_hasVal = true; } +#endif // wxUSE_DATETIME + + void SetHasValue() { m_hasVal = true; } + bool HasValue() const { return m_hasVal; } + + void SetNegated() { m_isNegated = true; } + bool IsNegated() const { return m_isNegated; } + + // Reset to the initial state, called before parsing another command line. + void Reset() + { + m_hasVal = + m_isNegated = false; + } + +public: + wxCmdLineEntryType kind; + wxString shortName, + longName, + description; + wxCmdLineParamType type; + int flags; + +private: + bool m_hasVal; + bool m_isNegated; + + double m_doubleVal; + long m_longVal; + wxString m_strVal; +#if wxUSE_DATETIME + wxDateTime m_dateVal; +#endif // wxUSE_DATETIME +}; + +struct wxCmdLineParam +{ + wxCmdLineParam(const wxString& desc, + wxCmdLineParamType typ, + int fl) + : description(desc) + { + type = typ; + flags = fl; + } + + wxString description; + wxCmdLineParamType type; + int flags; +}; + +WX_DECLARE_OBJARRAY(wxCmdLineOption, wxArrayOptions); +WX_DECLARE_OBJARRAY(wxCmdLineParam, wxArrayParams); + +#include "wx/arrimpl.cpp" + +WX_DEFINE_OBJARRAY(wxArrayOptions) +WX_DEFINE_OBJARRAY(wxArrayParams) + +// the parser internal state +struct wxCmdLineParserData +{ + // options + wxString m_switchChars; // characters which may start an option + bool m_enableLongOptions; // true if long options are enabled + wxString m_logo; // some extra text to show in Usage() + + // cmd line data + wxArrayString m_arguments; // == argv, argc == m_arguments.GetCount() + wxArrayOptions m_options; // all possible options and switches + wxArrayParams m_paramDesc; // description of all possible params + wxArrayString m_parameters; // all params found + + // methods + wxCmdLineParserData(); + void SetArguments(int argc, char **argv); +#if wxUSE_UNICODE + void SetArguments(int argc, wxChar **argv); + void SetArguments(int argc, const wxCmdLineArgsArray& argv); +#endif // wxUSE_UNICODE + void SetArguments(const wxString& cmdline); + + int FindOption(const wxString& name); + int FindOptionByLongName(const wxString& name); + + // Find the option by either its short or long name. + // + // Asserts and returns NULL if option with this name is not found. + const wxCmdLineOption* FindOptionByAnyName(const wxString& name); +}; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxCmdLineParserData +// ---------------------------------------------------------------------------- + +wxCmdLineParserData::wxCmdLineParserData() +{ + m_enableLongOptions = true; +#ifdef __UNIX_LIKE__ + m_switchChars = wxT("-"); +#else // !Unix + m_switchChars = wxT("/-"); +#endif +} + +namespace +{ + +// Small helper function setting locale for all categories. +// +// We define it because wxSetlocale() can't be easily used with wxScopeGuard as +// it has several overloads -- while this one can. +inline char *SetAllLocaleFacets(const char *loc) +{ + return wxSetlocale(LC_ALL, loc); +} + +} // private namespace + +void wxCmdLineParserData::SetArguments(int argc, char **argv) +{ + m_arguments.clear(); + + // Command-line arguments are supposed to be in the user locale encoding + // (what else?) but wxLocale probably wasn't initialized yet as we're + // called early during the program startup and so our locale might not have + // been set from the environment yet. To work around this problem we + // temporarily change the locale here. The only drawback is that changing + // the locale is thread-unsafe but precisely because we're called so early + // it's hopefully safe to assume that no other threads had been created yet. + char * const locOld = SetAllLocaleFacets(""); + wxON_BLOCK_EXIT1( SetAllLocaleFacets, locOld ); + + for ( int n = 0; n < argc; n++ ) + { + // try to interpret the string as being in the current locale + wxString arg(argv[n]); + + // but just in case we guessed wrongly and the conversion failed, do + // try to salvage at least something + if ( arg.empty() && argv[n][0] != '\0' ) + arg = wxString(argv[n], wxConvISO8859_1); + + m_arguments.push_back(arg); + } +} + +#if wxUSE_UNICODE + +void wxCmdLineParserData::SetArguments(int argc, wxChar **argv) +{ + m_arguments.clear(); + + for ( int n = 0; n < argc; n++ ) + { + m_arguments.push_back(argv[n]); + } +} + +void wxCmdLineParserData::SetArguments(int WXUNUSED(argc), + const wxCmdLineArgsArray& argv) +{ + m_arguments = argv.GetArguments(); +} + +#endif // wxUSE_UNICODE + +void wxCmdLineParserData::SetArguments(const wxString& cmdLine) +{ + m_arguments.clear(); + + if(wxTheApp && wxTheApp->argc > 0) + m_arguments.push_back(wxTheApp->argv[0]); + else + m_arguments.push_back(wxEmptyString); + + wxArrayString args = wxCmdLineParser::ConvertStringToArgs(cmdLine); + + WX_APPEND_ARRAY(m_arguments, args); +} + +int wxCmdLineParserData::FindOption(const wxString& name) +{ + if ( !name.empty() ) + { + size_t count = m_options.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + if ( m_options[n].shortName == name ) + { + // found + return n; + } + } + } + + return wxNOT_FOUND; +} + +int wxCmdLineParserData::FindOptionByLongName(const wxString& name) +{ + size_t count = m_options.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + if ( m_options[n].longName == name ) + { + // found + return n; + } + } + + return wxNOT_FOUND; +} + +const wxCmdLineOption* +wxCmdLineParserData::FindOptionByAnyName(const wxString& name) +{ + int i = FindOption(name); + if ( i == wxNOT_FOUND ) + { + i = FindOptionByLongName(name); + + if ( i == wxNOT_FOUND ) + { + wxFAIL_MSG( wxS("Unknown option ") + name ); + return NULL; + } + } + + return &m_options[(size_t)i]; +} + +// ---------------------------------------------------------------------------- +// construction and destruction +// ---------------------------------------------------------------------------- + +void wxCmdLineParser::Init() +{ + m_data = new wxCmdLineParserData; +} + +void wxCmdLineParser::SetCmdLine(int argc, char **argv) +{ + m_data->SetArguments(argc, argv); +} + +#if wxUSE_UNICODE + +void wxCmdLineParser::SetCmdLine(int argc, wxChar **argv) +{ + m_data->SetArguments(argc, argv); +} + +void wxCmdLineParser::SetCmdLine(int argc, const wxCmdLineArgsArray& argv) +{ + m_data->SetArguments(argc, argv); +} + +#endif // wxUSE_UNICODE + +void wxCmdLineParser::SetCmdLine(const wxString& cmdline) +{ + m_data->SetArguments(cmdline); +} + +wxCmdLineParser::~wxCmdLineParser() +{ + delete m_data; +} + +// ---------------------------------------------------------------------------- +// options +// ---------------------------------------------------------------------------- + +void wxCmdLineParser::SetSwitchChars(const wxString& switchChars) +{ + m_data->m_switchChars = switchChars; +} + +void wxCmdLineParser::EnableLongOptions(bool enable) +{ + m_data->m_enableLongOptions = enable; +} + +bool wxCmdLineParser::AreLongOptionsEnabled() const +{ + return m_data->m_enableLongOptions; +} + +void wxCmdLineParser::SetLogo(const wxString& logo) +{ + m_data->m_logo = logo; +} + +// ---------------------------------------------------------------------------- +// command line construction +// ---------------------------------------------------------------------------- + +void wxCmdLineParser::SetDesc(const wxCmdLineEntryDesc *desc) +{ + for ( ;; desc++ ) + { + switch ( desc->kind ) + { + case wxCMD_LINE_SWITCH: + AddSwitch(desc->shortName, desc->longName, + wxGetTranslation(desc->description), + desc->flags); + break; + + case wxCMD_LINE_OPTION: + AddOption(desc->shortName, desc->longName, + wxGetTranslation(desc->description), + desc->type, desc->flags); + break; + + case wxCMD_LINE_PARAM: + AddParam(wxGetTranslation(desc->description), + desc->type, desc->flags); + break; + + case wxCMD_LINE_USAGE_TEXT: + AddUsageText(wxGetTranslation(desc->description)); + break; + + default: + wxFAIL_MSG( wxT("unknown command line entry type") ); + // still fall through + + case wxCMD_LINE_NONE: + return; + } + } +} + +void wxCmdLineParser::AddSwitch(const wxString& shortName, + const wxString& longName, + const wxString& desc, + int flags) +{ + wxASSERT_MSG( m_data->FindOption(shortName) == wxNOT_FOUND, + wxT("duplicate switch") ); + + wxCmdLineOption *option = new wxCmdLineOption(wxCMD_LINE_SWITCH, + shortName, longName, desc, + wxCMD_LINE_VAL_NONE, flags); + + m_data->m_options.Add(option); +} + +void wxCmdLineParser::AddOption(const wxString& shortName, + const wxString& longName, + const wxString& desc, + wxCmdLineParamType type, + int flags) +{ + wxASSERT_MSG( m_data->FindOption(shortName) == wxNOT_FOUND, + wxT("duplicate option") ); + + wxCmdLineOption *option = new wxCmdLineOption(wxCMD_LINE_OPTION, + shortName, longName, desc, + type, flags); + + m_data->m_options.Add(option); +} + +void wxCmdLineParser::AddParam(const wxString& desc, + wxCmdLineParamType type, + int flags) +{ + // do some consistency checks: a required parameter can't follow an + // optional one and nothing should follow a parameter with MULTIPLE flag +#if wxDEBUG_LEVEL + if ( !m_data->m_paramDesc.IsEmpty() ) + { + wxCmdLineParam& param = m_data->m_paramDesc.Last(); + + wxASSERT_MSG( !(param.flags & wxCMD_LINE_PARAM_MULTIPLE), + wxT("all parameters after the one with wxCMD_LINE_PARAM_MULTIPLE style will be ignored") ); + + if ( !(flags & wxCMD_LINE_PARAM_OPTIONAL) ) + { + wxASSERT_MSG( !(param.flags & wxCMD_LINE_PARAM_OPTIONAL), + wxT("a required parameter can't follow an optional one") ); + } + } +#endif // wxDEBUG_LEVEL + + wxCmdLineParam *param = new wxCmdLineParam(desc, type, flags); + + m_data->m_paramDesc.Add(param); +} + +void wxCmdLineParser::AddUsageText(const wxString& text) +{ + wxASSERT_MSG( !text.empty(), wxT("text can't be empty") ); + + wxCmdLineOption *option = new wxCmdLineOption(wxCMD_LINE_USAGE_TEXT, + wxEmptyString, wxEmptyString, + text, wxCMD_LINE_VAL_NONE, 0); + + m_data->m_options.Add(option); +} + +// ---------------------------------------------------------------------------- +// access to parse command line +// ---------------------------------------------------------------------------- + +bool wxCmdLineParser::Found(const wxString& name) const +{ + const wxCmdLineOption* const opt = m_data->FindOptionByAnyName(name); + + return opt && opt->HasValue(); +} + +wxCmdLineSwitchState wxCmdLineParser::FoundSwitch(const wxString& name) const +{ + const wxCmdLineOption* const opt = m_data->FindOptionByAnyName(name); + + if ( !opt || !opt->HasValue() ) + return wxCMD_SWITCH_NOT_FOUND; + + return opt->IsNegated() ? wxCMD_SWITCH_OFF : wxCMD_SWITCH_ON; +} + +bool wxCmdLineParser::Found(const wxString& name, wxString *value) const +{ + const wxCmdLineOption* const opt = m_data->FindOptionByAnyName(name); + + if ( !opt || !opt->HasValue() ) + return false; + + wxCHECK_MSG( value, false, wxT("NULL pointer in wxCmdLineOption::Found") ); + + *value = opt->GetStrVal(); + + return true; +} + +bool wxCmdLineParser::Found(const wxString& name, long *value) const +{ + const wxCmdLineOption* const opt = m_data->FindOptionByAnyName(name); + + if ( !opt || !opt->HasValue() ) + return false; + + wxCHECK_MSG( value, false, wxT("NULL pointer in wxCmdLineOption::Found") ); + + *value = opt->GetLongVal(); + + return true; +} + +bool wxCmdLineParser::Found(const wxString& name, double *value) const +{ + const wxCmdLineOption* const opt = m_data->FindOptionByAnyName(name); + + if ( !opt || !opt->HasValue() ) + return false; + + wxCHECK_MSG( value, false, wxT("NULL pointer in wxCmdLineOption::Found") ); + + *value = opt->GetDoubleVal(); + + return true; +} + +#if wxUSE_DATETIME +bool wxCmdLineParser::Found(const wxString& name, wxDateTime *value) const +{ + const wxCmdLineOption* const opt = m_data->FindOptionByAnyName(name); + + if ( !opt || !opt->HasValue() ) + return false; + + wxCHECK_MSG( value, false, wxT("NULL pointer in wxCmdLineOption::Found") ); + + *value = opt->GetDateVal(); + + return true; +} +#endif // wxUSE_DATETIME + +size_t wxCmdLineParser::GetParamCount() const +{ + return m_data->m_parameters.size(); +} + +wxString wxCmdLineParser::GetParam(size_t n) const +{ + wxCHECK_MSG( n < GetParamCount(), wxEmptyString, wxT("invalid param index") ); + + return m_data->m_parameters[n]; +} + +// Resets switches and options +void wxCmdLineParser::Reset() +{ + for ( size_t i = 0; i < m_data->m_options.GetCount(); i++ ) + { + m_data->m_options[i].Reset(); + } +} + + +// ---------------------------------------------------------------------------- +// the real work is done here +// ---------------------------------------------------------------------------- + +int wxCmdLineParser::Parse(bool showUsage) +{ + bool maybeOption = true; // can the following arg be an option? + bool ok = true; // true until an error is detected + bool helpRequested = false; // true if "-h" was given + bool hadRepeatableParam = false; // true if found param with MULTIPLE flag + + size_t currentParam = 0; // the index in m_paramDesc + + size_t countParam = m_data->m_paramDesc.GetCount(); + wxString errorMsg; + + Reset(); + + // parse everything + wxString arg; + size_t count = m_data->m_arguments.size(); + for ( size_t n = 1; ok && (n < count); n++ ) // 0 is program name + { + arg = m_data->m_arguments[n]; + + // special case: "--" should be discarded and all following arguments + // should be considered as parameters, even if they start with '-' and + // not like options (this is POSIX-like) + if ( arg == wxT("--") ) + { + maybeOption = false; + + continue; + } +#ifdef __WXOSX__ + if ( arg == wxT("-ApplePersistenceIgnoreState") ) + { + maybeOption = false; + + continue; + } +#endif + + // empty argument or just '-' is not an option but a parameter + if ( maybeOption && arg.length() > 1 && + // FIXME-UTF8: use wc_str() after removing ANSI build + wxStrchr(m_data->m_switchChars.c_str(), arg[0u]) ) + { + bool isLong; + wxString name; + int optInd = wxNOT_FOUND; // init to suppress warnings + + // an option or a switch: find whether it's a long or a short one + if ( arg.length() >= 3 && arg[0u] == wxT('-') && arg[1u] == wxT('-') ) + { + // a long one + isLong = true; + + // Skip leading "--" + wxString::const_iterator p = arg.begin() + 2; + + bool longOptionsEnabled = AreLongOptionsEnabled(); + + name = GetLongOptionName(p, arg.end()); + + if (longOptionsEnabled) + { + wxString errorOpt; + + optInd = m_data->FindOptionByLongName(name); + if ( optInd == wxNOT_FOUND ) + { + // Check if this could be a negatable long option. + if ( name.Last() == '-' ) + { + name.RemoveLast(); + + optInd = m_data->FindOptionByLongName(name); + if ( optInd != wxNOT_FOUND ) + { + if ( !(m_data->m_options[optInd].flags & + wxCMD_LINE_SWITCH_NEGATABLE) ) + { + errorOpt.Printf + ( + _("Option '%s' can't be negated"), + name + ); + optInd = wxNOT_FOUND; + } + } + } + + if ( optInd == wxNOT_FOUND ) + { + if ( errorOpt.empty() ) + { + errorOpt.Printf + ( + _("Unknown long option '%s'"), + name + ); + } + + errorMsg << errorOpt << wxT('\n'); + } + } + } + else + { + optInd = wxNOT_FOUND; // Sanity check + + // Print the argument including leading "--" + name.Prepend( wxT("--") ); + errorMsg << wxString::Format(_("Unknown option '%s'"), name.c_str()) + << wxT('\n'); + } + + } + else // not a long option + { + isLong = false; + + // a short one: as they can be cumulated, we try to find the + // longest substring which is a valid option + wxString::const_iterator p = arg.begin() + 1; + + name = GetShortOptionName(p, arg.end()); + + size_t len = name.length(); + do + { + if ( len == 0 ) + { + // we couldn't find a valid option name in the + // beginning of this string + errorMsg << wxString::Format(_("Unknown option '%s'"), name.c_str()) + << wxT('\n'); + + break; + } + else + { + optInd = m_data->FindOption(name.Left(len)); + + // will try with one character less the next time + len--; + } + } + while ( optInd == wxNOT_FOUND ); + + len++; // compensates extra len-- above + if ( (optInd != wxNOT_FOUND) && (len != name.length()) ) + { + // first of all, the option name is only part of this + // string + name = name.Left(len); + + // our option is only part of this argument, there is + // something else in it - it is either the value of this + // option or other switches if it is a switch + if ( m_data->m_options[(size_t)optInd].kind + == wxCMD_LINE_SWITCH ) + { + // if the switch is negatable and it is just followed + // by '-' the '-' is considered to be part of this + // switch + if ( (m_data->m_options[(size_t)optInd].flags & + wxCMD_LINE_SWITCH_NEGATABLE) && + arg[len] == '-' ) + ++len; + + // pretend that all the rest of the argument is the + // next argument, in fact + wxString arg2 = arg[0u]; + arg2 += arg.Mid(len + 1); // +1 for leading '-' + + m_data->m_arguments.insert + (m_data->m_arguments.begin() + n + 1, arg2); + count++; + + // only leave the part which wasn't extracted into the + // next argument in this one + arg = arg.Left(len + 1); + } + //else: it's our value, we'll deal with it below + } + } + + if ( optInd == wxNOT_FOUND ) + { + ok = false; + + continue; // will break, in fact + } + + // look at what follows: + + // +1 for leading '-' + wxString::const_iterator p = arg.begin() + 1 + name.length(); + wxString::const_iterator end = arg.end(); + + if ( isLong ) + ++p; // for another leading '-' + + wxCmdLineOption& opt = m_data->m_options[(size_t)optInd]; + if ( opt.kind == wxCMD_LINE_SWITCH ) + { + // we must check that there is no value following the switch + bool negated = (opt.flags & wxCMD_LINE_SWITCH_NEGATABLE) && + p != arg.end() && *p == '-'; + + if ( !negated && p != arg.end() ) + { + errorMsg << wxString::Format(_("Unexpected characters following option '%s'."), name.c_str()) + << wxT('\n'); + ok = false; + } + else // no value, as expected + { + // nothing more to do + opt.SetHasValue(); + if ( negated ) + opt.SetNegated(); + + if ( opt.flags & wxCMD_LINE_OPTION_HELP ) + { + helpRequested = true; + + // it's not an error, but we still stop here + ok = false; + } + } + } + else // it's an option. not a switch + { + switch ( p == end ? '\0' : (*p).GetValue() ) + { + case '=': + case ':': + // the value follows + ++p; + break; + + case '\0': + // the value is in the next argument + if ( ++n == count ) + { + // ... but there is none + errorMsg << wxString::Format(_("Option '%s' requires a value."), + name.c_str()) + << wxT('\n'); + + ok = false; + } + else + { + // ... take it from there + p = m_data->m_arguments[n].begin(); + end = m_data->m_arguments[n].end(); + } + break; + + default: + // the value is right here: this may be legal or + // not depending on the option style + if ( opt.flags & wxCMD_LINE_NEEDS_SEPARATOR ) + { + errorMsg << wxString::Format(_("Separator expected after the option '%s'."), + name.c_str()) + << wxT('\n'); + + ok = false; + } + } + + if ( ok ) + { + wxString value(p, end); + switch ( opt.type ) + { + default: + wxFAIL_MSG( wxT("unknown option type") ); + // still fall through + + case wxCMD_LINE_VAL_STRING: + opt.SetStrVal(value); + break; + + case wxCMD_LINE_VAL_NUMBER: + { + long val; + if ( value.ToLong(&val) ) + { + opt.SetLongVal(val); + } + else + { + errorMsg << wxString::Format(_("'%s' is not a correct numeric value for option '%s'."), + value.c_str(), name.c_str()) + << wxT('\n'); + + ok = false; + } + } + break; + + case wxCMD_LINE_VAL_DOUBLE: + { + double val; + if ( value.ToDouble(&val) ) + { + opt.SetDoubleVal(val); + } + else + { + errorMsg << wxString::Format(_("'%s' is not a correct numeric value for option '%s'."), + value.c_str(), name.c_str()) + << wxT('\n'); + + ok = false; + } + } + break; + +#if wxUSE_DATETIME + case wxCMD_LINE_VAL_DATE: + { + wxDateTime dt; + wxString::const_iterator endDate; + if ( !dt.ParseDate(value, &endDate) || endDate != value.end() ) + { + errorMsg << wxString::Format(_("Option '%s': '%s' cannot be converted to a date."), + name.c_str(), value.c_str()) + << wxT('\n'); + + ok = false; + } + else + { + opt.SetDateVal(dt); + } + } + break; +#endif // wxUSE_DATETIME + } + } + } + } + else // not an option, must be a parameter + { + if ( currentParam < countParam ) + { + wxCmdLineParam& param = m_data->m_paramDesc[currentParam]; + + // TODO check the param type + + m_data->m_parameters.push_back(arg); + + if ( !(param.flags & wxCMD_LINE_PARAM_MULTIPLE) ) + { + currentParam++; + } + else + { + wxASSERT_MSG( currentParam == countParam - 1, + wxT("all parameters after the one with wxCMD_LINE_PARAM_MULTIPLE style are ignored") ); + + // remember that we did have this last repeatable parameter + hadRepeatableParam = true; + } + } + else + { + errorMsg << wxString::Format(_("Unexpected parameter '%s'"), arg.c_str()) + << wxT('\n'); + + ok = false; + } + } + } + + // verify that all mandatory options were given + if ( ok ) + { + size_t countOpt = m_data->m_options.GetCount(); + for ( size_t n = 0; ok && (n < countOpt); n++ ) + { + wxCmdLineOption& opt = m_data->m_options[n]; + if ( (opt.flags & wxCMD_LINE_OPTION_MANDATORY) && !opt.HasValue() ) + { + wxString optName; + if ( !opt.longName ) + { + optName = opt.shortName; + } + else + { + if ( AreLongOptionsEnabled() ) + { + optName.Printf( _("%s (or %s)"), + opt.shortName.c_str(), + opt.longName.c_str() ); + } + else + { + optName.Printf( wxT("%s"), + opt.shortName.c_str() ); + } + } + + errorMsg << wxString::Format(_("The value for the option '%s' must be specified."), + optName.c_str()) + << wxT('\n'); + + ok = false; + } + } + + for ( ; ok && (currentParam < countParam); currentParam++ ) + { + wxCmdLineParam& param = m_data->m_paramDesc[currentParam]; + if ( (currentParam == countParam - 1) && + (param.flags & wxCMD_LINE_PARAM_MULTIPLE) && + hadRepeatableParam ) + { + // special case: currentParam wasn't incremented, but we did + // have it, so don't give error + continue; + } + + if ( !(param.flags & wxCMD_LINE_PARAM_OPTIONAL) ) + { + errorMsg << wxString::Format(_("The required parameter '%s' was not specified."), + param.description.c_str()) + << wxT('\n'); + + ok = false; + } + } + } + + // if there was an error during parsing the command line, show this error + // and also the usage message if it had been requested + if ( !ok && (!errorMsg.empty() || (helpRequested && showUsage)) ) + { + wxMessageOutput* msgOut = wxMessageOutput::Get(); + if ( msgOut ) + { + wxString usage; + if ( showUsage ) + usage = GetUsageString(); + + msgOut->Printf( wxT("%s%s"), usage.c_str(), errorMsg.c_str() ); + } + else + { + wxFAIL_MSG( wxT("no wxMessageOutput object?") ); + } + } + + return ok ? 0 : helpRequested ? -1 : 1; +} + +// ---------------------------------------------------------------------------- +// give the usage message +// ---------------------------------------------------------------------------- + +void wxCmdLineParser::Usage() const +{ + wxMessageOutput* msgOut = wxMessageOutput::Get(); + if ( msgOut ) + { + msgOut->Printf( wxT("%s"), GetUsageString().c_str() ); + } + else + { + wxFAIL_MSG( wxT("no wxMessageOutput object?") ); + } +} + +wxString wxCmdLineParser::GetUsageString() const +{ + wxString appname; + if ( m_data->m_arguments.empty() ) + { + if ( wxTheApp ) + appname = wxTheApp->GetAppName(); + } + else // use argv[0] + { + appname = wxFileName(m_data->m_arguments[0]).GetName(); + } + + // we construct the brief cmd line desc on the fly, but not the detailed + // help message below because we want to align the options descriptions + // and for this we must first know the longest one of them + wxString usage; + wxArrayString namesOptions, descOptions; + + if ( !m_data->m_logo.empty() ) + { + usage << m_data->m_logo << wxT('\n'); + } + + usage << wxString::Format(_("Usage: %s"), appname.c_str()); + + // the switch char is usually '-' but this can be changed with + // SetSwitchChars() and then the first one of possible chars is used + wxChar chSwitch = !m_data->m_switchChars ? wxT('-') + : m_data->m_switchChars[0u]; + + bool areLongOptionsEnabled = AreLongOptionsEnabled(); + size_t n, count = m_data->m_options.GetCount(); + for ( n = 0; n < count; n++ ) + { + wxCmdLineOption& opt = m_data->m_options[n]; + wxString option, negator; + + if ( opt.kind != wxCMD_LINE_USAGE_TEXT ) + { + usage << wxT(' '); + if ( !(opt.flags & wxCMD_LINE_OPTION_MANDATORY) ) + { + usage << wxT('['); + } + + if ( opt.flags & wxCMD_LINE_SWITCH_NEGATABLE ) + negator = wxT("[-]"); + + if ( !opt.shortName.empty() ) + { + usage << chSwitch << opt.shortName << negator; + } + else if ( areLongOptionsEnabled && !opt.longName.empty() ) + { + usage << wxT("--") << opt.longName << negator; + } + else + { + if (!opt.longName.empty()) + { + wxFAIL_MSG( wxT("option with only a long name while long ") + wxT("options are disabled") ); + } + else + { + wxFAIL_MSG( wxT("option without neither short nor long name") ); + } + } + + if ( !opt.shortName.empty() ) + { + option << wxT(" ") << chSwitch << opt.shortName; + } + + if ( areLongOptionsEnabled && !opt.longName.empty() ) + { + option << (option.empty() ? wxT(" ") : wxT(", ")) + << wxT("--") << opt.longName; + } + + if ( opt.kind != wxCMD_LINE_SWITCH ) + { + wxString val; + val << wxT('<') << GetTypeName(opt.type) << wxT('>'); + usage << wxT(' ') << val; + option << (!opt.longName ? wxT(':') : wxT('=')) << val; + } + + if ( !(opt.flags & wxCMD_LINE_OPTION_MANDATORY) ) + { + usage << wxT(']'); + } + } + + namesOptions.push_back(option); + descOptions.push_back(opt.description); + } + + count = m_data->m_paramDesc.GetCount(); + for ( n = 0; n < count; n++ ) + { + wxCmdLineParam& param = m_data->m_paramDesc[n]; + + usage << wxT(' '); + if ( param.flags & wxCMD_LINE_PARAM_OPTIONAL ) + { + usage << wxT('['); + } + + usage << param.description; + + if ( param.flags & wxCMD_LINE_PARAM_MULTIPLE ) + { + usage << wxT("..."); + } + + if ( param.flags & wxCMD_LINE_PARAM_OPTIONAL ) + { + usage << wxT(']'); + } + } + + usage << wxT('\n'); + + // set to number of our own options, not counting the standard ones + count = namesOptions.size(); + + // get option names & descriptions for standard options, if any: + wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + wxString stdDesc; + if ( traits ) + stdDesc = traits->GetStandardCmdLineOptions(namesOptions, descOptions); + + // now construct the detailed help message + size_t len, lenMax = 0; + for ( n = 0; n < namesOptions.size(); n++ ) + { + len = namesOptions[n].length(); + if ( len > lenMax ) + lenMax = len; + } + + for ( n = 0; n < namesOptions.size(); n++ ) + { + if ( n == count ) + usage << wxT('\n') << stdDesc; + + len = namesOptions[n].length(); + // desc contains text if name is empty + if (len == 0) + { + usage << descOptions[n] << wxT('\n'); + } + else + { + usage << namesOptions[n] + << wxString(wxT(' '), lenMax - len) << wxT('\t') + << descOptions[n] + << wxT('\n'); + } + } + + return usage; +} + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +static wxString GetTypeName(wxCmdLineParamType type) +{ + wxString s; + switch ( type ) + { + default: + wxFAIL_MSG( wxT("unknown option type") ); + // still fall through + + case wxCMD_LINE_VAL_STRING: + s = _("str"); + break; + + case wxCMD_LINE_VAL_NUMBER: + s = _("num"); + break; + + case wxCMD_LINE_VAL_DOUBLE: + s = _("double"); + break; + + case wxCMD_LINE_VAL_DATE: + s = _("date"); + break; + } + + return s; +} + +/* +Returns a string which is equal to the string pointed to by p, but up to the +point where p contains an character that's not allowed. +Allowable characters are letters and numbers, and characters pointed to by +the parameter allowedChars. + +For example, if p points to "abcde-@-_", and allowedChars is "-_", +this function returns "abcde-". +*/ +static wxString GetOptionName(wxString::const_iterator p, + wxString::const_iterator end, + const wxChar *allowedChars) +{ + wxString argName; + + while ( p != end && (wxIsalnum(*p) || wxStrchr(allowedChars, *p)) ) + { + argName += *p++; + } + + return argName; +} + +// Besides alphanumeric characters, short and long options can +// have other characters. + +// A short option additionally can have these +#define wxCMD_LINE_CHARS_ALLOWED_BY_SHORT_OPTION wxT("_?") + +// A long option can have the same characters as a short option and a '-'. +#define wxCMD_LINE_CHARS_ALLOWED_BY_LONG_OPTION \ + wxCMD_LINE_CHARS_ALLOWED_BY_SHORT_OPTION wxT("-") + +static wxString GetShortOptionName(wxString::const_iterator p, + wxString::const_iterator end) +{ + return GetOptionName(p, end, wxCMD_LINE_CHARS_ALLOWED_BY_SHORT_OPTION); +} + +static wxString GetLongOptionName(wxString::const_iterator p, + wxString::const_iterator end) +{ + return GetOptionName(p, end, wxCMD_LINE_CHARS_ALLOWED_BY_LONG_OPTION); +} + +#endif // wxUSE_CMDLINE_PARSER + +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +/* + This function is mainly used under Windows (as under Unix we always get the + command line arguments as argc/argv anyhow) and so it tries to follow + Windows conventions for the command line handling, not Unix ones. For + instance, backslash is not special except when it precedes double quote when + it does quote it. + + TODO: Rewrite this to follow the even more complicated rule used by Windows + CommandLineToArgv(): + + * A string of backslashes not followed by a quotation mark has no special + meaning. + * An even number of backslashes followed by a quotation mark is treated as + pairs of protected backslashes, followed by a word terminator. + * An odd number of backslashes followed by a quotation mark is treated as + pairs of protected backslashes, followed by a protected quotation mark. + + See http://blogs.msdn.com/b/oldnewthing/archive/2010/09/17/10063629.aspx + + It could also be useful to provide a converse function which is also + non-trivial, see + + http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx + */ + +/* static */ +wxArrayString +wxCmdLineParser::ConvertStringToArgs(const wxString& cmdline, + wxCmdLineSplitType type) +{ + wxArrayString args; + + wxString arg; + arg.reserve(1024); + + const wxString::const_iterator end = cmdline.end(); + wxString::const_iterator p = cmdline.begin(); + + for ( ;; ) + { + // skip white space + while ( p != end && (*p == ' ' || *p == '\t') ) + ++p; + + // anything left? + if ( p == end ) + break; + + // parse this parameter + bool lastBS = false, + isInsideQuotes = false; + wxChar chDelim = '\0'; + for ( arg.clear(); p != end; ++p ) + { + const wxChar ch = *p; + + if ( type == wxCMD_LINE_SPLIT_DOS ) + { + if ( ch == '"' ) + { + if ( !lastBS ) + { + isInsideQuotes = !isInsideQuotes; + + // don't put quote in arg + continue; + } + //else: quote has no special meaning but the backslash + // still remains -- makes no sense but this is what + // Windows does + } + // note that backslash does *not* quote the space, only quotes do + else if ( !isInsideQuotes && (ch == ' ' || ch == '\t') ) + { + ++p; // skip this space anyhow + break; + } + + lastBS = !lastBS && ch == '\\'; + } + else // type == wxCMD_LINE_SPLIT_UNIX + { + if ( !lastBS ) + { + if ( isInsideQuotes ) + { + if ( ch == chDelim ) + { + isInsideQuotes = false; + + continue; // don't use the quote itself + } + } + else // not in quotes and not escaped + { + if ( ch == '\'' || ch == '"' ) + { + isInsideQuotes = true; + chDelim = ch; + + continue; // don't use the quote itself + } + + if ( ch == ' ' || ch == '\t' ) + { + ++p; // skip this space anyhow + break; + } + } + + lastBS = ch == '\\'; + if ( lastBS ) + continue; + } + else // escaped by backslash, just use as is + { + lastBS = false; + } + } + + arg += ch; + } + + args.push_back(arg); + } + + return args; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/cmdproc.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/cmdproc.cpp new file mode 100644 index 0000000000..4534de633e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/cmdproc.cpp @@ -0,0 +1,349 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/cmdproc.cpp +// Purpose: wxCommand and wxCommandProcessor classes +// Author: Julian Smart (extracted from docview.h by VZ) +// Modified by: +// Created: 05.11.00 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/string.h" + #include "wx/menu.h" + #include "wx/accel.h" +#endif //WX_PRECOMP + +#include "wx/cmdproc.h" + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_CLASS(wxCommand, wxObject) +IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject) + +// ---------------------------------------------------------------------------- +// wxCommand +// ---------------------------------------------------------------------------- + +wxCommand::wxCommand(bool canUndoIt, const wxString& name) +{ + m_canUndo = canUndoIt; + m_commandName = name; +} + +// ---------------------------------------------------------------------------- +// Command processor +// ---------------------------------------------------------------------------- + +wxCommandProcessor::wxCommandProcessor(int maxCommands) +{ + m_maxNoCommands = maxCommands; +#if wxUSE_MENUS + m_commandEditMenu = NULL; +#endif // wxUSE_MENUS + +#if wxUSE_ACCEL + m_undoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Z').ToString(); + m_redoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Y').ToString(); +#endif // wxUSE_ACCEL + + m_lastSavedCommand = + m_currentCommand = wxList::compatibility_iterator(); +} + +wxCommandProcessor::~wxCommandProcessor() +{ + ClearCommands(); +} + +bool wxCommandProcessor::DoCommand(wxCommand& cmd) +{ + return cmd.Do(); +} + +bool wxCommandProcessor::UndoCommand(wxCommand& cmd) +{ + return cmd.Undo(); +} + +// Pass a command to the processor. The processor calls Do(); +// if successful, is appended to the command history unless +// storeIt is false. +bool wxCommandProcessor::Submit(wxCommand *command, bool storeIt) +{ + wxCHECK_MSG( command, false, wxT("no command in wxCommandProcessor::Submit") ); + + if ( !DoCommand(*command) ) + { + // the user code expects the command to be deleted anyhow + delete command; + + return false; + } + + if ( storeIt ) + Store(command); + else + delete command; + + return true; +} + +void wxCommandProcessor::Store(wxCommand *command) +{ + wxCHECK_RET( command, wxT("no command in wxCommandProcessor::Store") ); + + // Correct a bug: we must chop off the current 'branch' + // so that we're at the end of the command list. + if (!m_currentCommand) + ClearCommands(); + else + { + wxList::compatibility_iterator node = m_currentCommand->GetNext(); + while (node) + { + wxList::compatibility_iterator next = node->GetNext(); + + // Make sure m_lastSavedCommand won't point to freed memory + if ( m_lastSavedCommand && m_lastSavedCommand == node ) + m_lastSavedCommand = wxList::compatibility_iterator(); + + delete (wxCommand *)node->GetData(); + m_commands.Erase(node); + + node = next; + } + } + + if ( (int)m_commands.GetCount() == m_maxNoCommands ) + { + wxList::compatibility_iterator firstNode = m_commands.GetFirst(); + + // Make sure m_lastSavedCommand won't point to freed memory + if ( m_lastSavedCommand && m_lastSavedCommand == firstNode ) + m_lastSavedCommand = wxList::compatibility_iterator(); + + wxCommand *firstCommand = (wxCommand *)firstNode->GetData(); + delete firstCommand; + m_commands.Erase(firstNode); + } + + m_commands.Append(command); + m_currentCommand = m_commands.GetLast(); + SetMenuStrings(); +} + +bool wxCommandProcessor::Undo() +{ + wxCommand *command = GetCurrentCommand(); + if ( command && command->CanUndo() ) + { + if ( UndoCommand(*command) ) + { + m_currentCommand = m_currentCommand->GetPrevious(); + SetMenuStrings(); + return true; + } + } + + return false; +} + +bool wxCommandProcessor::Redo() +{ + wxCommand *redoCommand = NULL; + wxList::compatibility_iterator redoNode +#if !wxUSE_STD_CONTAINERS + = NULL // just to avoid warnings +#endif // !wxUSE_STD_CONTAINERS + ; + + if ( m_currentCommand ) + { + // is there anything to redo? + if ( m_currentCommand->GetNext() ) + { + redoCommand = (wxCommand *)m_currentCommand->GetNext()->GetData(); + redoNode = m_currentCommand->GetNext(); + } + } + else // no current command, redo the first one + { + if (m_commands.GetCount() > 0) + { + redoCommand = (wxCommand *)m_commands.GetFirst()->GetData(); + redoNode = m_commands.GetFirst(); + } + } + + if (redoCommand) + { + bool success = DoCommand(*redoCommand); + if (success) + { + m_currentCommand = redoNode; + SetMenuStrings(); + return true; + } + } + return false; +} + +bool wxCommandProcessor::CanUndo() const +{ + wxCommand *command = GetCurrentCommand(); + + return command && command->CanUndo(); +} + +bool wxCommandProcessor::CanRedo() const +{ + if (m_currentCommand && !m_currentCommand->GetNext()) + return false; + + if (m_currentCommand && m_currentCommand->GetNext()) + return true; + + if (!m_currentCommand && (m_commands.GetCount() > 0)) + return true; + + return false; +} + +void wxCommandProcessor::Initialize() +{ + m_currentCommand = m_commands.GetLast(); + SetMenuStrings(); +} + +void wxCommandProcessor::SetMenuStrings() +{ +#if wxUSE_MENUS + if (m_commandEditMenu) + { + wxString undoLabel = GetUndoMenuLabel(); + wxString redoLabel = GetRedoMenuLabel(); + + m_commandEditMenu->SetLabel(wxID_UNDO, undoLabel); + m_commandEditMenu->Enable(wxID_UNDO, CanUndo()); + + m_commandEditMenu->SetLabel(wxID_REDO, redoLabel); + m_commandEditMenu->Enable(wxID_REDO, CanRedo()); + } +#endif // wxUSE_MENUS +} + +// Gets the current Undo menu label. +wxString wxCommandProcessor::GetUndoMenuLabel() const +{ + wxString buf; + if (m_currentCommand) + { + wxCommand *command = (wxCommand *)m_currentCommand->GetData(); + wxString commandName(command->GetName()); + if (commandName.empty()) commandName = _("Unnamed command"); + bool canUndo = command->CanUndo(); + if (canUndo) + buf = wxString(_("&Undo ")) + commandName + m_undoAccelerator; + else + buf = wxString(_("Can't &Undo ")) + commandName + m_undoAccelerator; + } + else + { + buf = _("&Undo") + m_undoAccelerator; + } + + return buf; +} + +// Gets the current Undo menu label. +wxString wxCommandProcessor::GetRedoMenuLabel() const +{ + wxString buf; + if (m_currentCommand) + { + // We can redo, if we're not at the end of the history. + if (m_currentCommand->GetNext()) + { + wxCommand *redoCommand = (wxCommand *)m_currentCommand->GetNext()->GetData(); + wxString redoCommandName(redoCommand->GetName()); + if (redoCommandName.empty()) redoCommandName = _("Unnamed command"); + buf = wxString(_("&Redo ")) + redoCommandName + m_redoAccelerator; + } + else + { + buf = _("&Redo") + m_redoAccelerator; + } + } + else + { + if (m_commands.GetCount() == 0) + { + buf = _("&Redo") + m_redoAccelerator; + } + else + { + // currentCommand is NULL but there are commands: this means that + // we've undone to the start of the list, but can redo the first. + wxCommand *redoCommand = (wxCommand *)m_commands.GetFirst()->GetData(); + wxString redoCommandName(redoCommand->GetName()); + if (redoCommandName.empty()) redoCommandName = _("Unnamed command"); + buf = wxString(_("&Redo ")) + redoCommandName + m_redoAccelerator; + } + } + return buf; +} + +void wxCommandProcessor::ClearCommands() +{ + wxList::compatibility_iterator node = m_commands.GetFirst(); + while (node) + { + wxCommand *command = (wxCommand *)node->GetData(); + delete command; + m_commands.Erase(node); + node = m_commands.GetFirst(); + } + + m_currentCommand = wxList::compatibility_iterator(); + m_lastSavedCommand = wxList::compatibility_iterator(); +} + +bool wxCommandProcessor::IsDirty() const +{ + if ( !m_lastSavedCommand ) + { + // We have never been saved, so we are dirty if and only if we have any + // commands at all. + return m_currentCommand; + } + + if ( !m_currentCommand ) + { + // This only happens if all commands were undone after saving the + // document: we're dirty then. + return true; + } + + // Finally if both iterators are valid, we may just compare them. + return m_currentCommand != m_lastSavedCommand; +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/cmndata.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/cmndata.cpp new file mode 100644 index 0000000000..18b2ef927f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/cmndata.cpp @@ -0,0 +1,397 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/cmndata.cpp +// Purpose: Common GDI data +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/cmndata.h" + +#ifndef WX_PRECOMP + #if defined(__WXMSW__) + #include "wx/msw/wrapcdlg.h" + #endif // MSW + #include + #include "wx/string.h" + #include "wx/utils.h" + #include "wx/app.h" + #include "wx/log.h" + #include "wx/gdicmn.h" +#endif + +#include "wx/prntbase.h" +#include "wx/printdlg.h" +#include "wx/paper.h" + + +IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject) +IMPLEMENT_DYNAMIC_CLASS(wxPrintDialogData, wxObject) +IMPLEMENT_DYNAMIC_CLASS(wxPageSetupDialogData, wxObject) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// Print data +// ---------------------------------------------------------------------------- + +wxPrintData::wxPrintData() +{ + m_bin = wxPRINTBIN_DEFAULT; + m_media = wxPRINTMEDIA_DEFAULT; + m_printMode = wxPRINT_MODE_PRINTER; + m_printOrientation = wxPORTRAIT; + m_printOrientationReversed = false; + m_printNoCopies = 1; + m_printCollate = false; + + // New, 24/3/99 + m_printerName = wxEmptyString; + m_colour = true; + m_duplexMode = wxDUPLEX_SIMPLEX; + m_printQuality = wxPRINT_QUALITY_HIGH; + + // we intentionally don't initialize paper id and size at all, like this + // the default system settings will be used for them + m_paperId = wxPAPER_NONE; + m_paperSize = wxDefaultSize; + + m_privData = NULL; + m_privDataLen = 0; + + m_nativeData = wxPrintFactory::GetFactory()->CreatePrintNativeData(); +} + +wxPrintData::wxPrintData(const wxPrintData& printData) + : wxObject() +{ + m_nativeData = NULL; + m_privData = NULL; + (*this) = printData; +} + +void wxPrintData::SetPrivData( char *privData, int len ) +{ + wxDELETEA(m_privData); + m_privDataLen = len; + if (m_privDataLen > 0) + { + m_privData = new char[m_privDataLen]; + memcpy( m_privData, privData, m_privDataLen ); + } +} + +wxPrintData::~wxPrintData() +{ + m_nativeData->m_ref--; + if (m_nativeData->m_ref == 0) + delete m_nativeData; + + if (m_privData) + delete [] m_privData; +} + +void wxPrintData::ConvertToNative() +{ + m_nativeData->TransferFrom( *this ) ; +} + +void wxPrintData::ConvertFromNative() +{ + m_nativeData->TransferTo( *this ) ; +} + +wxPrintData& wxPrintData::operator=(const wxPrintData& data) +{ + if ( &data == this ) + return *this; + + m_printNoCopies = data.m_printNoCopies; + m_printCollate = data.m_printCollate; + m_printOrientation = data.m_printOrientation; + m_printOrientationReversed = data.m_printOrientationReversed; + m_printerName = data.m_printerName; + m_colour = data.m_colour; + m_duplexMode = data.m_duplexMode; + m_printQuality = data.m_printQuality; + m_paperId = data.m_paperId; + m_paperSize = data.m_paperSize; + m_bin = data.m_bin; + m_media = data.m_media; + m_printMode = data.m_printMode; + m_filename = data.m_filename; + + // UnRef old m_nativeData + if (m_nativeData) + { + m_nativeData->m_ref--; + if (m_nativeData->m_ref == 0) + delete m_nativeData; + } + // Set Ref new one + m_nativeData = data.GetNativeData(); + m_nativeData->m_ref++; + + wxDELETEA(m_privData); + m_privDataLen = data.GetPrivDataLen(); + if (m_privDataLen > 0) + { + m_privData = new char[m_privDataLen]; + memcpy( m_privData, data.GetPrivData(), m_privDataLen ); + } + + return *this; +} + +// Is this data OK for showing the print dialog? +bool wxPrintData::IsOk() const +{ + m_nativeData->TransferFrom( *this ); + + return m_nativeData->IsOk(); +} + +// ---------------------------------------------------------------------------- +// Print dialog data +// ---------------------------------------------------------------------------- + +wxPrintDialogData::wxPrintDialogData() +{ + m_printFromPage = 0; + m_printToPage = 0; + m_printMinPage = 0; + m_printMaxPage = 0; + m_printNoCopies = 1; + m_printAllPages = false; + m_printCollate = false; + m_printToFile = false; + m_printSelection = false; + m_printEnableSelection = false; + m_printEnablePageNumbers = true; + + wxPrintFactory* factory = wxPrintFactory::GetFactory(); + m_printEnablePrintToFile = ! factory->HasOwnPrintToFile(); + + m_printEnableHelp = false; +} + +wxPrintDialogData::wxPrintDialogData(const wxPrintDialogData& dialogData) + : wxObject() +{ + (*this) = dialogData; +} + +wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData) +{ + m_printFromPage = 1; + m_printToPage = 0; + m_printMinPage = 1; + m_printMaxPage = 9999; + m_printNoCopies = 1; + // On Mac the Print dialog always defaults to "All Pages" +#ifdef __WXMAC__ + m_printAllPages = true; +#else + m_printAllPages = false; +#endif + m_printCollate = false; + m_printToFile = false; + m_printSelection = false; + m_printEnableSelection = false; + m_printEnablePageNumbers = true; + m_printEnablePrintToFile = true; + m_printEnableHelp = false; + m_printData = printData; +} + +wxPrintDialogData::~wxPrintDialogData() +{ +} + +void wxPrintDialogData::operator=(const wxPrintDialogData& data) +{ + m_printFromPage = data.m_printFromPage; + m_printToPage = data.m_printToPage; + m_printMinPage = data.m_printMinPage; + m_printMaxPage = data.m_printMaxPage; + m_printNoCopies = data.m_printNoCopies; + m_printAllPages = data.m_printAllPages; + m_printCollate = data.m_printCollate; + m_printToFile = data.m_printToFile; + m_printSelection = data.m_printSelection; + m_printEnableSelection = data.m_printEnableSelection; + m_printEnablePageNumbers = data.m_printEnablePageNumbers; + m_printEnableHelp = data.m_printEnableHelp; + m_printEnablePrintToFile = data.m_printEnablePrintToFile; + m_printData = data.m_printData; +} + +void wxPrintDialogData::operator=(const wxPrintData& data) +{ + m_printData = data; +} + +// ---------------------------------------------------------------------------- +// wxPageSetupDialogData +// ---------------------------------------------------------------------------- + +wxPageSetupDialogData::wxPageSetupDialogData() +{ + m_paperSize = wxSize(0,0); + + CalculatePaperSizeFromId(); + + m_minMarginTopLeft = + m_minMarginBottomRight = + m_marginTopLeft = + m_marginBottomRight = wxPoint(0,0); + + // Flags + m_defaultMinMargins = false; + m_enableMargins = true; + m_enableOrientation = true; + m_enablePaper = true; + m_enablePrinter = true; + m_enableHelp = false; + m_getDefaultInfo = false; +} + +wxPageSetupDialogData::wxPageSetupDialogData(const wxPageSetupDialogData& dialogData) + : wxObject() +{ + (*this) = dialogData; +} + +wxPageSetupDialogData::wxPageSetupDialogData(const wxPrintData& printData) +{ + m_paperSize = wxSize(0,0); + m_minMarginTopLeft = + m_minMarginBottomRight = + m_marginTopLeft = + m_marginBottomRight = wxPoint(0,0); + + // Flags + m_defaultMinMargins = false; + m_enableMargins = true; + m_enableOrientation = true; + m_enablePaper = true; + m_enablePrinter = true; + m_enableHelp = false; + m_getDefaultInfo = false; + + m_printData = printData; + + // The wxPrintData paper size overrides these values, unless the size cannot + // be found. + CalculatePaperSizeFromId(); +} + +wxPageSetupDialogData::~wxPageSetupDialogData() +{ +} + +wxPageSetupDialogData& wxPageSetupDialogData::operator=(const wxPageSetupDialogData& data) +{ + m_paperSize = data.m_paperSize; + m_minMarginTopLeft = data.m_minMarginTopLeft; + m_minMarginBottomRight = data.m_minMarginBottomRight; + m_marginTopLeft = data.m_marginTopLeft; + m_marginBottomRight = data.m_marginBottomRight; + m_defaultMinMargins = data.m_defaultMinMargins; + m_enableMargins = data.m_enableMargins; + m_enableOrientation = data.m_enableOrientation; + m_enablePaper = data.m_enablePaper; + m_enablePrinter = data.m_enablePrinter; + m_getDefaultInfo = data.m_getDefaultInfo; + m_enableHelp = data.m_enableHelp; + + m_printData = data.m_printData; + + return *this; +} + +wxPageSetupDialogData& wxPageSetupDialogData::operator=(const wxPrintData& data) +{ + m_printData = data; + CalculatePaperSizeFromId(); + + return *this; +} + +// If a corresponding paper type is found in the paper database, will set the m_printData +// paper size id member as well. +void wxPageSetupDialogData::SetPaperSize(const wxSize& sz) +{ + m_paperSize = sz; + + CalculateIdFromPaperSize(); +} + +// Sets the wxPrintData id, plus the paper width/height if found in the paper database. +void wxPageSetupDialogData::SetPaperSize(wxPaperSize id) +{ + m_printData.SetPaperId(id); + + CalculatePaperSizeFromId(); +} + +void wxPageSetupDialogData::SetPrintData(const wxPrintData& printData) +{ + m_printData = printData; + CalculatePaperSizeFromId(); +} + +// Use paper size defined in this object to set the wxPrintData +// paper id +void wxPageSetupDialogData::CalculateIdFromPaperSize() +{ + wxASSERT_MSG( (wxThePrintPaperDatabase != NULL), + wxT("wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects.") ); + + wxSize sz = GetPaperSize(); + + wxPaperSize id = wxThePrintPaperDatabase->GetSize(wxSize(sz.x* 10, sz.y * 10)); + if (id != wxPAPER_NONE) + { + m_printData.SetPaperId(id); + } +} + +// Use paper id in wxPrintData to set this object's paper size +void wxPageSetupDialogData::CalculatePaperSizeFromId() +{ + wxASSERT_MSG( (wxThePrintPaperDatabase != NULL), + wxT("wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects.") ); + + wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId()); + + if (sz != wxSize(0, 0)) + { + // sz is in 10ths of a mm, while paper size is in mm + m_paperSize.x = sz.x / 10; + m_paperSize.y = sz.y / 10; + } +} + +#endif // wxUSE_PRINTING_ARCHITECTURE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/colourcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/colourcmn.cpp new file mode 100644 index 0000000000..12b5f2007c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/colourcmn.cpp @@ -0,0 +1,378 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/colourcmn.cpp +// Purpose: wxColourBase implementation +// Author: Francesco Montorsi +// Modified by: +// Created: 20/4/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/colour.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/gdicmn.h" + #include "wx/wxcrtvararg.h" +#endif + +#if wxUSE_VARIANT +IMPLEMENT_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLEXPORT) +#endif + + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +#if wxUSE_EXTENDED_RTTI + +#include + +template<> void wxStringReadValue(const wxString &s, wxColour &data ) +{ + if ( !data.Set(s) ) + { + wxLogError(_("String To Colour : Incorrect colour specification : %s"), + s.c_str() ); + data = wxNullColour; + } +} + +template<> void wxStringWriteValue(wxString &s, const wxColour &data ) +{ + s = data.GetAsString(wxC2S_HTML_SYNTAX); +} + +wxTO_STRING_IMP( wxColour ) +wxFROM_STRING_IMP( wxColour ) + +wxIMPLEMENT_DYNAMIC_CLASS_WITH_COPY_AND_STREAMERS_XTI( wxColour, wxObject, \ + "wx/colour.h", &wxTO_STRING( wxColour ), &wxFROM_STRING( wxColour )) +//WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) +wxBEGIN_PROPERTIES_TABLE(wxColour) +wxREADONLY_PROPERTY( Red, unsigned char, Red, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxREADONLY_PROPERTY( Green, unsigned char, Green, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxREADONLY_PROPERTY( Blue, unsigned char, Blue, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxEND_PROPERTIES_TABLE() + +wxDIRECT_CONSTRUCTOR_3( wxColour, unsigned char, Red, \ + unsigned char, Green, unsigned char, Blue ) + +wxEMPTY_HANDLERS_TABLE(wxColour) +#else + +#if wxCOLOUR_IS_GDIOBJECT +wxIMPLEMENT_DYNAMIC_CLASS(wxColour, wxGDIObject) +#else +wxIMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) +#endif + +#endif + +// ============================================================================ +// wxString <-> wxColour conversions +// ============================================================================ + +bool wxColourBase::FromString(const wxString& str) +{ + if ( str.empty() ) + return false; // invalid or empty string + + if ( wxStrnicmp(str, wxT("RGB"), 3) == 0 ) + { + // CSS-like RGB specification + // according to http://www.w3.org/TR/css3-color/#colorunits + // values outside 0-255 range are allowed but should be clipped + int red, green, blue, + alpha = wxALPHA_OPAQUE; + if ( str.length() > 3 && (str[3] == wxT('a') || str[3] == wxT('A')) ) + { + // We can't use sscanf() for the alpha value as sscanf() uses the + // current locale while the floating point numbers in CSS always + // use point as decimal separator, regardless of locale. So parse + // the tail of the string manually by putting it in a buffer and + // using wxString::ToCDouble() below. Notice that we can't use "%s" + // for this as it stops at white space and we need "%c" to avoid + // this and really get all the rest of the string into the buffer. + + const unsigned len = str.length(); // always big enough + wxCharBuffer alphaBuf(len); + char * const alphaPtr = alphaBuf.data(); + + for ( unsigned n = 0; n < len; n++ ) + alphaPtr[n] = '\0'; + + // Construct the format string which ensures that the last argument + // receives all the rest of the string. + wxString formatStr; + formatStr << wxS("( %d , %d , %d , %") << len << 'c'; + + // Notice that we use sscanf() here because if the string is not + // ASCII it can't represent a valid RGB colour specification anyhow + // and like this we can be sure that %c corresponds to "char *" + // while with wxSscanf() it depends on the type of the string + // passed as first argument: if it is a wide string, then %c + // expects "wchar_t *" matching parameter under MSW for example. + if ( sscanf(str.c_str() + 4, + formatStr.mb_str(), + &red, &green, &blue, alphaPtr) != 4 ) + return false; + + // Notice that we must explicitly specify the length to get rid of + // trailing NULs. + wxString alphaStr(alphaPtr, wxStrlen(alphaPtr)); + if ( alphaStr.empty() || alphaStr.Last() != ')' ) + return false; + + alphaStr.RemoveLast(); + alphaStr.Trim(); + + double a; + if ( !alphaStr.ToCDouble(&a) ) + return false; + + alpha = wxRound(a * 255); + } + else // no 'a' following "rgb" + { + if ( wxSscanf(str.wx_str() + 3, wxT("( %d , %d , %d )"), + &red, &green, &blue) != 3 ) + return false; + } + + Set((unsigned char)wxClip(red, 0, 255), + (unsigned char)wxClip(green, 0, 255), + (unsigned char)wxClip(blue, 0, 255), + (unsigned char)wxClip(alpha, 0, 255)); + } + else if ( str[0] == wxT('#') && wxStrlen(str) == 7 ) + { + // hexadecimal prefixed with # (HTML syntax) + unsigned long tmp; + if (wxSscanf(str.wx_str() + 1, wxT("%lx"), &tmp) != 1) + return false; + + Set((unsigned char)(tmp >> 16), + (unsigned char)(tmp >> 8), + (unsigned char)tmp); + } + else if (wxTheColourDatabase) // a colour name ? + { + // we can't do + // *this = wxTheColourDatabase->Find(str) + // because this place can be called from constructor + // and 'this' could not be available yet + wxColour clr = wxTheColourDatabase->Find(str); + if (clr.IsOk()) + Set((unsigned char)clr.Red(), + (unsigned char)clr.Green(), + (unsigned char)clr.Blue()); + } + + if (IsOk()) + return true; + + wxLogDebug(wxT("wxColour::Set - couldn't set to colour string '%s'"), str); + return false; +} + +wxString wxColourBase::GetAsString(long flags) const +{ + wxString colName; + + const bool isOpaque = Alpha() == wxALPHA_OPAQUE; + + // we can't use the name format if the colour is not opaque as the alpha + // information would be lost + if ( (flags & wxC2S_NAME) && isOpaque ) + { + colName = wxTheColourDatabase->FindName( + static_cast(*this)).MakeLower(); + } + + if ( colName.empty() ) + { + const int red = Red(), + blue = Blue(), + green = Green(); + + if ( flags & wxC2S_CSS_SYNTAX ) + { + // no name for this colour; return it in CSS syntax + if ( isOpaque ) + { + colName.Printf(wxT("rgb(%d, %d, %d)"), red, green, blue); + } + else // use rgba() form + { + colName.Printf(wxT("rgba(%d, %d, %d, %s)"), + red, green, blue, + wxString::FromCDouble(Alpha() / 255., 3)); + } + } + else if ( flags & wxC2S_HTML_SYNTAX ) + { + wxASSERT_MSG( isOpaque, "alpha is lost in HTML syntax" ); + + // no name for this colour; return it in HTML syntax + colName.Printf(wxT("#%02X%02X%02X"), red, green, blue); + } + } + + // this function should alway returns a non-empty string + wxASSERT_MSG(!colName.empty(), + wxT("Invalid wxColour -> wxString conversion flags")); + + return colName; +} + +// static +void wxColourBase::MakeMono(unsigned char* r, unsigned char* g, unsigned char* b, + bool on) +{ + *r = *g = *b = on ? 255 : 0; +} + +// static +void wxColourBase::MakeGrey(unsigned char* r, unsigned char* g, unsigned char* b + /*, unsigned char brightness */ + ) +{ + *r = *g = *b = (wxByte)(((*b)*117UL + (*g)*601UL + (*r)*306UL) >> 10); +} + +// static +void wxColourBase::MakeGrey(unsigned char* r, unsigned char* g, unsigned char* b, + double weight_r, double weight_g, double weight_b) +{ + double luma = (*r) * weight_r + (*g) * weight_g + (*b) * weight_b; + *r = *g = *b = (wxByte)wxRound(luma); +} + +// static +void wxColourBase::MakeDisabled(unsigned char* r, unsigned char* g, unsigned char* b, + unsigned char brightness) +{ + //MakeGrey(r, g, b, brightness); // grey no-blend version + *r = AlphaBlend(*r, brightness, 0.4); + *g = AlphaBlend(*g, brightness, 0.4); + *b = AlphaBlend(*b, brightness, 0.4); +} + +wxColour& wxColourBase::MakeDisabled(unsigned char brightness) +{ + unsigned char r = Red(), + g = Green(), + b = Blue(); + MakeDisabled(&r, &g, &b, brightness); + Set(r, g, b, Alpha()); + return static_cast(*this); +} + +// AlphaBlend is used by ChangeLightness and MakeDisabled + +// static +unsigned char wxColourBase::AlphaBlend(unsigned char fg, unsigned char bg, + double alpha) +{ + double result = bg + (alpha * (fg - bg)); + result = wxMax(result, 0.0); + result = wxMin(result, 255.0); + return (unsigned char)result; +} + +// ChangeLightness() is a utility function that simply darkens +// or lightens a color, based on the specified percentage +// ialpha of 0 would be completely black, 100 completely white +// an ialpha of 100 returns the same colour + +// static +void wxColourBase::ChangeLightness(unsigned char* r, unsigned char* g, unsigned char* b, + int ialpha) +{ + if (ialpha == 100) return; + + // ialpha is 0..200 where 0 is completely black + // and 200 is completely white and 100 is the same + // convert that to normal alpha 0.0 - 1.0 + ialpha = wxMax(ialpha, 0); + ialpha = wxMin(ialpha, 200); + double alpha = ((double)(ialpha - 100.0))/100.0; + + unsigned char bg; + if (ialpha > 100) + { + // blend with white + bg = 255; + alpha = 1.0 - alpha; // 0 = transparent fg; 1 = opaque fg + } + else + { + // blend with black + bg = 0; + alpha = 1.0 + alpha; // 0 = transparent fg; 1 = opaque fg + } + + *r = AlphaBlend(*r, bg, alpha); + *g = AlphaBlend(*g, bg, alpha); + *b = AlphaBlend(*b, bg, alpha); +} + +wxColour wxColourBase::ChangeLightness(int ialpha) const +{ + wxByte r = Red(); + wxByte g = Green(); + wxByte b = Blue(); + ChangeLightness(&r, &g, &b, ialpha); + return wxColour(r,g,b); +} + +#if WXWIN_COMPATIBILITY_2_6 + +// static +wxColour wxColourBase::CreateByName(const wxString& name) +{ + return wxColour(name); +} + +void wxColourBase::InitFromName(const wxString& col) +{ + Set(col); +} + +#endif // WXWIN_COMPATIBILITY_2_6 + +// wxColour <-> wxString utilities, used by wxConfig +wxString wxToString(const wxColourBase& col) +{ + return col.IsOk() ? col.GetAsString(wxC2S_CSS_SYNTAX) + : wxString(); +} + +bool wxFromString(const wxString& str, wxColourBase *col) +{ + wxCHECK_MSG( col, false, wxT("NULL output parameter") ); + + if ( str.empty() ) + { + *col = wxNullColour; + return true; + } + + return col->Set(str); +} + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/colourdata.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/colourdata.cpp new file mode 100644 index 0000000000..3569c50514 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/colourdata.cpp @@ -0,0 +1,167 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/colourdata.cpp +// Author: Julian Smart +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_COLOURDLG || wxUSE_COLOURPICKERCTRL + +#include "wx/colourdata.h" +#include "wx/tokenzr.h" + +// ---------------------------------------------------------------------------- +// wxColourData +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject) + +wxColourData::wxColourData() +{ + m_chooseFull = false; + m_dataColour.Set(0,0,0); + // m_custColours are wxNullColours initially +} + +wxColourData::wxColourData(const wxColourData& data) + : wxObject() +{ + (*this) = data; +} + +wxColourData::~wxColourData() +{ +} + +void wxColourData::SetCustomColour(int i, const wxColour& colour) +{ + wxCHECK_RET( i >= 0 && i < NUM_CUSTOM, wxT("custom colour index out of range") ); + + m_custColours[i] = colour; +} + +wxColour wxColourData::GetCustomColour(int i) const +{ + wxCHECK_MSG( i >= 0 && i < NUM_CUSTOM, wxColour(0,0,0), + wxT("custom colour index out of range") ); + + return m_custColours[i]; +} + +wxColourData& wxColourData::operator=(const wxColourData& data) +{ + for ( int i = 0; i < NUM_CUSTOM; i++) + m_custColours[i] = data.m_custColours[i]; + + m_dataColour = data.m_dataColour; + m_chooseFull = data.m_chooseFull; + + return *this; +} + +// ---------------------------------------------------------------------------- +// [de]serialization +// ---------------------------------------------------------------------------- + +// separator used between different fields +static const char wxCOL_DATA_SEP = ','; + +wxString wxColourData::ToString() const +{ + wxString str(m_chooseFull ? '1' : '0'); + + for ( int i = 0; i < NUM_CUSTOM; i++ ) + { + str += wxCOL_DATA_SEP; + + const wxColour& clr = m_custColours[i]; + if ( clr.IsOk() ) + str += clr.GetAsString(wxC2S_HTML_SYNTAX); + } + + return str; +} + +bool wxColourData::FromString(const wxString& str) +{ + wxStringTokenizer tokenizer(str, wxCOL_DATA_SEP); + wxString token = tokenizer.GetNextToken(); + m_chooseFull = token == '1'; + bool success = m_chooseFull || token == '0'; + for (int i = 0; success && i < NUM_CUSTOM; i++) + { + token = tokenizer.GetNextToken(); + if (token.empty()) + m_custColours[i] = wxColour(); + else + success = m_custColours[i].Set(token); + } + return success; +} + +#if wxUSE_COLOURDLG + +#include "wx/colordlg.h" + +wxColour wxGetColourFromUser(wxWindow *parent, + const wxColour& colInit, + const wxString& caption, + wxColourData *ptrData) +{ + // contains serialized representation of wxColourData used the last time + // the dialog was shown: we want to reuse it the next time in order to show + // the same custom colours to the user (and we can't just have static + // wxColourData itself because it's a GUI object and so should be destroyed + // before GUI shutdown and doing it during static cleanup is too late) + static wxString s_strColourData; + + wxColourData data; + if ( !ptrData ) + { + ptrData = &data; + if ( !s_strColourData.empty() ) + { + if ( !data.FromString(s_strColourData) ) + { + wxFAIL_MSG( "bug in wxColourData::FromString()?" ); + } + +#ifdef __WXMSW__ + // we don't get back the "choose full" flag value from the native + // dialog and so we can't preserve it between runs, so we decide to + // always use it as it seems better than not using it (user can + // just ignore the extra controls in the dialog but having to click + // a button each time to show them would be very annoying + data.SetChooseFull(true); +#endif // __WXMSW__ + } + } + + if ( colInit.IsOk() ) + { + ptrData->SetColour(colInit); + } + + wxColour colRet; + wxColourDialog dialog(parent, ptrData); + if (!caption.empty()) + dialog.SetTitle(caption); + if ( dialog.ShowModal() == wxID_OK ) + { + *ptrData = dialog.GetColourData(); + colRet = ptrData->GetColour(); + s_strColourData = ptrData->ToString(); + } + //else: leave colRet invalid + + return colRet; +} + +#endif // wxUSE_COLOURDLG +#endif // wxUSE_COLOURDLG || wxUSE_COLOURPICKERCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/combocmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/combocmn.cpp new file mode 100644 index 0000000000..34abc09ca8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/combocmn.cpp @@ -0,0 +1,2961 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/combocmn.cpp +// Purpose: wxComboCtrlBase +// Author: Jaakko Salli +// Modified by: +// Created: Apr-30-2006 +// Copyright: (c) 2005 Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/combo.h" + +#ifdef __WXMSW__ +#include "wx/msw/private.h" +#endif + +#if wxUSE_COMBOBOX +#include "wx/combobox.h" +extern WXDLLEXPORT_DATA(const char) wxComboBoxNameStr[] = "comboBox"; + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxComboBoxStyle ) +wxBEGIN_FLAGS( wxComboBoxStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxCB_SIMPLE) +wxFLAGS_MEMBER(wxCB_SORT) +wxFLAGS_MEMBER(wxCB_READONLY) +wxFLAGS_MEMBER(wxCB_DROPDOWN) + +wxEND_FLAGS( wxComboBoxStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxComboBox, wxControl, "wx/combobox.h") + +wxBEGIN_PROPERTIES_TABLE(wxComboBox) +wxEVENT_PROPERTY( Select, wxEVT_COMBOBOX, wxCommandEvent ) +wxEVENT_PROPERTY( TextEnter, wxEVT_TEXT_ENTER, wxCommandEvent ) + +// TODO DELEGATES +wxPROPERTY( Font, wxFont, SetFont, GetFont, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxPROPERTY_COLLECTION( Choices, wxArrayString, wxString, AppendString, \ + GetStrings, 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxPROPERTY( Value,wxString, SetValue, GetValue, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxPROPERTY( Selection,int, SetSelection, GetSelection, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + +wxPROPERTY_FLAGS( WindowStyle, wxComboBoxStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxComboBox) + +wxCONSTRUCTOR_5( wxComboBox, wxWindow*, Parent, wxWindowID, Id, \ + wxString, Value, wxPoint, Position, wxSize, Size ) + +#endif // wxUSE_COMBOBOX + +#if wxUSE_COMBOCTRL + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/log.h" + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/timer.h" + #include "wx/textctrl.h" +#endif + +#include "wx/tooltip.h" + +// constants +// ---------------------------------------------------------------------------- + +#define DEFAULT_DROPBUTTON_WIDTH 19 + +#define BMP_BUTTON_MARGIN 4 + +#define DEFAULT_POPUP_HEIGHT 400 + +#define DEFAULT_TEXT_INDENT 3 + +#define COMBO_MARGIN 2 // spacing right of wxTextCtrl + + +#if defined(__WXMSW__) + +// Let's use wxFrame as a fall-back solution until wxMSW gets wxNonOwnedWindow +#include "wx/frame.h" +#define wxCC_GENERIC_TLW_IS_FRAME +#define wxComboCtrlGenericTLW wxFrame + +#define USE_TRANSIENT_POPUP 1 // Use wxPopupWindowTransient (preferred, if it works properly on platform) +#define TRANSIENT_POPUPWIN_IS_PERFECT 0 // wxPopupTransientWindow works, its child can have focus, and common + // native controls work on it like normal. +#define POPUPWIN_IS_PERFECT 0 // Same, but for non-transient popup window. +#define TEXTCTRL_TEXT_CENTERED 0 // 1 if text in textctrl is vertically centered +#define FOCUS_RING 0 // No focus ring on wxMSW + +//#undef wxUSE_POPUPWIN +//#define wxUSE_POPUPWIN 0 + +#elif defined(__WXGTK__) + +// NB: It is not recommended to use wxDialog as popup on wxGTK, because of +// this bug: If wxDialog is hidden, its position becomes corrupt +// between hide and next show, but without internal coordinates being +// reflected (or something like that - atleast commenting out ->Hide() +// seemed to eliminate the position change). + +#include "wx/dialog.h" +#define wxCC_GENERIC_TLW_IS_DIALOG +#define wxComboCtrlGenericTLW wxDialog + +#if defined(__WXGTK20__) +# include "wx/gtk/private.h" +#else +# include "wx/gtk1/private.h" +#endif + +// NB: Let's not be afraid to use wxGTK's wxPopupTransientWindow as a +// 'perfect' popup, as it can successfully host child controls even in +// popups that are shown in modal dialogs. + +#define USE_TRANSIENT_POPUP 1 // Use wxPopupWindowTransient (preferred, if it works properly on platform) +#define TRANSIENT_POPUPWIN_IS_PERFECT 1 // wxPopupTransientWindow works, its child can have focus, and common + // native controls work on it like normal. +#define POPUPWIN_IS_PERFECT 1 // Same, but for non-transient popup window. +#define TEXTCTRL_TEXT_CENTERED 1 // 1 if text in textctrl is vertically centered +#define FOCUS_RING 0 // No focus ring on wxGTK + +#elif defined(__WXMAC__) + +#include "wx/nonownedwnd.h" +#define wxCC_GENERIC_TLW_IS_NONOWNEDWINDOW +#define wxComboCtrlGenericTLW wxNonOwnedWindow + +#define USE_TRANSIENT_POPUP 1 // Use wxPopupWindowTransient (preferred, if it works properly on platform) +#define TRANSIENT_POPUPWIN_IS_PERFECT 1 // wxPopupTransientWindow works, its child can have focus, and common + // native controls work on it like normal. +#define POPUPWIN_IS_PERFECT 1 // Same, but for non-transient popup window. +#define TEXTCTRL_TEXT_CENTERED 1 // 1 if text in textctrl is vertically centered +#define FOCUS_RING 3 // Reserve room for the textctrl's focus ring to display + +#undef DEFAULT_DROPBUTTON_WIDTH +#define DEFAULT_DROPBUTTON_WIDTH 22 +#undef COMBO_MARGIN +#define COMBO_MARGIN FOCUS_RING + +#else + +#include "wx/dialog.h" +#define wxCC_GENERIC_TLW_IS_DIALOG +#define wxComboCtrlGenericTLW wxDialog + +#define USE_TRANSIENT_POPUP 0 // Use wxPopupWindowTransient (preferred, if it works properly on platform) +#define TRANSIENT_POPUPWIN_IS_PERFECT 0 // wxPopupTransientWindow works, its child can have focus, and common + // native controls work on it like normal. +#define POPUPWIN_IS_PERFECT 0 // Same, but for non-transient popup window. +#define TEXTCTRL_TEXT_CENTERED 1 // 1 if text in textctrl is vertically centered +#define FOCUS_RING 0 + +#endif + + +// Popupwin is really only supported on wxMSW (not WINCE) and wxGTK, regardless +// what the wxUSE_POPUPWIN says. +// FIXME: Why isn't wxUSE_POPUPWIN reliable any longer? (it was in wxW2.6.2) +#if (!defined(__WXMSW__) && !defined(__WXGTK__) && !defined(__WXMAC__)) || defined(__WXWINCE__) +#undef wxUSE_POPUPWIN +#define wxUSE_POPUPWIN 0 +#endif + + +#if wxUSE_POPUPWIN + #include "wx/popupwin.h" +#else + #undef USE_TRANSIENT_POPUP + #define USE_TRANSIENT_POPUP 0 +#endif + + +// Define different types of popup windows +enum +{ + POPUPWIN_NONE = 0, + POPUPWIN_WXPOPUPTRANSIENTWINDOW = 1, + POPUPWIN_WXPOPUPWINDOW = 2, + POPUPWIN_GENERICTLW = 3 +}; + + +#if USE_TRANSIENT_POPUP + // wxPopupTransientWindow is implemented + + #define wxComboPopupWindowBase wxPopupTransientWindow + #define PRIMARY_POPUP_TYPE POPUPWIN_WXPOPUPTRANSIENTWINDOW + #define USES_WXPOPUPTRANSIENTWINDOW 1 + + #if TRANSIENT_POPUPWIN_IS_PERFECT + // + #elif POPUPWIN_IS_PERFECT + #define wxComboPopupWindowBase2 wxPopupWindow + #define SECONDARY_POPUP_TYPE POPUPWIN_WXPOPUPWINDOW + #define USES_WXPOPUPWINDOW 1 + #else + #define wxComboPopupWindowBase2 wxComboCtrlGenericTLW + #define SECONDARY_POPUP_TYPE POPUPWIN_GENERICTLW + #define USES_GENERICTLW 1 + #endif + +#elif wxUSE_POPUPWIN + // wxPopupWindow (but not wxPopupTransientWindow) is properly implemented + + #define wxComboPopupWindowBase wxPopupWindow + #define PRIMARY_POPUP_TYPE POPUPWIN_WXPOPUPWINDOW + #define USES_WXPOPUPWINDOW 1 + + #if !POPUPWIN_IS_PERFECT + #define wxComboPopupWindowBase2 wxComboCtrlGenericTLW + #define SECONDARY_POPUP_TYPE POPUPWIN_GENERICTLW + #define USES_GENERICTLW 1 + #endif + +#else + // wxPopupWindow is not implemented + + #define wxComboPopupWindowBase wxComboCtrlGenericTLW + #define PRIMARY_POPUP_TYPE POPUPWIN_GENERICTLW + #define USES_GENERICTLW 1 + +#endif + + +#ifndef USES_WXPOPUPTRANSIENTWINDOW + #define USES_WXPOPUPTRANSIENTWINDOW 0 +#endif + +#ifndef USES_WXPOPUPWINDOW + #define USES_WXPOPUPWINDOW 0 +#endif + +#ifndef USES_GENERICTLW + #define USES_GENERICTLW 0 +#endif + + +#if USES_WXPOPUPWINDOW + #define INSTALL_TOPLEV_HANDLER 1 +#else + #define INSTALL_TOPLEV_HANDLER 0 +#endif + + +// Returns true if given popup window type can be classified as perfect +// on this platform. +static inline bool IsPopupWinTypePerfect( wxByte popupWinType ) +{ +#if POPUPWIN_IS_PERFECT && TRANSIENT_POPUPWIN_IS_PERFECT + wxUnusedVar(popupWinType); + return true; +#else + return ( popupWinType == POPUPWIN_GENERICTLW + #if POPUPWIN_IS_PERFECT + || popupWinType == POPUPWIN_WXPOPUPWINDOW + #endif + #if TRANSIENT_POPUPWIN_IS_PERFECT + || popupWinType == POPUPWIN_WXPOPUPTRANSIENTWINDOW + #endif + ); +#endif +} + + +// +// ** TODO ** +// * wxComboPopupWindow for external use (ie. replace old wxUniv wxPopupComboWindow) +// + + +// ---------------------------------------------------------------------------- +// wxComboFrameEventHandler takes care of hiding the popup when events happen +// in its top level parent. +// ---------------------------------------------------------------------------- + +#if INSTALL_TOPLEV_HANDLER + +// +// This will no longer be necessary after wxTransientPopupWindow +// works well on all platforms. +// + +class wxComboFrameEventHandler : public wxEvtHandler +{ +public: + wxComboFrameEventHandler( wxComboCtrlBase* pCb ); + virtual ~wxComboFrameEventHandler(); + + void OnPopup(); + + void OnIdle( wxIdleEvent& event ); + void OnMouseEvent( wxMouseEvent& event ); + void OnActivate( wxActivateEvent& event ); + void OnResize( wxSizeEvent& event ); + void OnMove( wxMoveEvent& event ); + void OnMenuEvent( wxMenuEvent& event ); + void OnClose( wxCloseEvent& event ); + +protected: + wxWindow* m_focusStart; + wxComboCtrlBase* m_combo; + +private: + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxComboFrameEventHandler, wxEvtHandler) + EVT_IDLE(wxComboFrameEventHandler::OnIdle) + EVT_LEFT_DOWN(wxComboFrameEventHandler::OnMouseEvent) + EVT_RIGHT_DOWN(wxComboFrameEventHandler::OnMouseEvent) + EVT_SIZE(wxComboFrameEventHandler::OnResize) + EVT_MOVE(wxComboFrameEventHandler::OnMove) + EVT_MENU_HIGHLIGHT(wxID_ANY,wxComboFrameEventHandler::OnMenuEvent) + EVT_MENU_OPEN(wxComboFrameEventHandler::OnMenuEvent) + EVT_ACTIVATE(wxComboFrameEventHandler::OnActivate) + EVT_CLOSE(wxComboFrameEventHandler::OnClose) +END_EVENT_TABLE() + +wxComboFrameEventHandler::wxComboFrameEventHandler( wxComboCtrlBase* combo ) + : wxEvtHandler() +{ + m_combo = combo; +} + +wxComboFrameEventHandler::~wxComboFrameEventHandler() +{ +} + +void wxComboFrameEventHandler::OnPopup() +{ + m_focusStart = ::wxWindow::FindFocus(); +} + +void wxComboFrameEventHandler::OnIdle( wxIdleEvent& event ) +{ + wxWindow* winFocused = ::wxWindow::FindFocus(); + + wxWindow* popup = m_combo->GetPopupControl()->GetControl(); + wxWindow* winpopup = m_combo->GetPopupWindow(); + + if ( !winFocused || ( + winFocused != m_focusStart && + winFocused != popup && + winFocused->GetParent() != popup && + winFocused != winpopup && + winFocused->GetParent() != winpopup && + winFocused != m_combo && + winFocused != m_combo->GetButton() // GTK (atleast) requires this + ) + ) + { + m_combo->HidePopup(true); + } + + event.Skip(); +} + +void wxComboFrameEventHandler::OnMenuEvent( wxMenuEvent& event ) +{ + m_combo->HidePopup(true); + event.Skip(); +} + +void wxComboFrameEventHandler::OnMouseEvent( wxMouseEvent& event ) +{ + m_combo->HidePopup(true); + event.Skip(); +} + +void wxComboFrameEventHandler::OnClose( wxCloseEvent& event ) +{ + m_combo->HidePopup(true); + event.Skip(); +} + +void wxComboFrameEventHandler::OnActivate( wxActivateEvent& event ) +{ + m_combo->HidePopup(true); + event.Skip(); +} + +void wxComboFrameEventHandler::OnResize( wxSizeEvent& event ) +{ + m_combo->HidePopup(true); + event.Skip(); +} + +void wxComboFrameEventHandler::OnMove( wxMoveEvent& event ) +{ + m_combo->HidePopup(true); + event.Skip(); +} + +#endif // INSTALL_TOPLEV_HANDLER + +// ---------------------------------------------------------------------------- +// wxComboPopupWindow is, in essence, wxPopupWindow customized for +// wxComboCtrl. +// ---------------------------------------------------------------------------- + +class wxComboPopupWindow : public wxComboPopupWindowBase +{ +public: + + wxComboPopupWindow( wxComboCtrlBase *parent, + int style ) + #if USES_WXPOPUPWINDOW || USES_WXPOPUPTRANSIENTWINDOW + : wxComboPopupWindowBase(parent,style) + #else + : wxComboPopupWindowBase(parent, + wxID_ANY, + wxEmptyString, + wxPoint(-21,-21), + wxSize(20,20), + style) + #endif + { + m_inShow = 0; + } + +#if USES_WXPOPUPTRANSIENTWINDOW + virtual bool Show( bool show ); + virtual bool ProcessLeftDown(wxMouseEvent& event); +protected: + virtual void OnDismiss(); +#endif + +private: + wxByte m_inShow; +}; + + +#if USES_WXPOPUPTRANSIENTWINDOW +bool wxComboPopupWindow::Show( bool show ) +{ + // Guard against recursion + if ( m_inShow ) + return wxComboPopupWindowBase::Show(show); + + m_inShow++; + + wxPopupTransientWindow* const + ptw = static_cast(this); + + if ( show != ptw->IsShown() ) + { + if ( show ) + // We used to do wxPopupTransientWindow::Popup here, + // but this would hide normal Show, which we are + // also going to need. + ptw->Show(); + else + ptw->Dismiss(); + } + + m_inShow--; + + return true; +} + +bool wxComboPopupWindow::ProcessLeftDown(wxMouseEvent& event) +{ + return wxPopupTransientWindow::ProcessLeftDown(event); +} + +// First thing that happens when a transient popup closes is that this method gets called. +void wxComboPopupWindow::OnDismiss() +{ + wxComboCtrlBase* combo = (wxComboCtrlBase*) GetParent(); + wxASSERT_MSG( wxDynamicCast(combo, wxComboCtrlBase), + wxT("parent might not be wxComboCtrl, but check IMPLEMENT_DYNAMIC_CLASS(2) macro for correctness") ); + + combo->OnPopupDismiss(true); +} +#endif // USES_WXPOPUPTRANSIENTWINDOW + + +// ---------------------------------------------------------------------------- +// wxComboPopupWindowEvtHandler does bulk of the custom event handling +// of a popup window. It is separate so we can have different types +// of popup windows. +// ---------------------------------------------------------------------------- + +class wxComboPopupWindowEvtHandler : public wxEvtHandler +{ +public: + + wxComboPopupWindowEvtHandler( wxComboCtrlBase *parent ) + { + m_combo = parent; + } + + void OnSizeEvent( wxSizeEvent& event ); + void OnKeyEvent(wxKeyEvent& event); +#if USES_GENERICTLW + void OnActivate( wxActivateEvent& event ); +#endif + +private: + wxComboCtrlBase* m_combo; + + DECLARE_EVENT_TABLE() +}; + + +BEGIN_EVENT_TABLE(wxComboPopupWindowEvtHandler, wxEvtHandler) + EVT_KEY_DOWN(wxComboPopupWindowEvtHandler::OnKeyEvent) + EVT_KEY_UP(wxComboPopupWindowEvtHandler::OnKeyEvent) + EVT_CHAR(wxComboPopupWindowEvtHandler::OnKeyEvent) +#if USES_GENERICTLW + EVT_ACTIVATE(wxComboPopupWindowEvtHandler::OnActivate) +#endif + EVT_SIZE(wxComboPopupWindowEvtHandler::OnSizeEvent) +END_EVENT_TABLE() + + +void wxComboPopupWindowEvtHandler::OnSizeEvent( wxSizeEvent& WXUNUSED(event) ) +{ + // Block the event so that the popup control does not get auto-resized. +} + +void wxComboPopupWindowEvtHandler::OnKeyEvent( wxKeyEvent& event ) +{ + // Relay keyboard event to the main child controls + wxWindowList children = m_combo->GetPopupWindow()->GetChildren(); + wxWindowList::iterator node = children.begin(); + wxWindow* child = (wxWindow*)*node; + child->GetEventHandler()->ProcessEvent(event); +} + +#if USES_GENERICTLW +void wxComboPopupWindowEvtHandler::OnActivate( wxActivateEvent& event ) +{ + if ( !event.GetActive() ) + { + // Tell combo control that we are dismissed. + m_combo->HidePopup(true); + + event.Skip(); + } +} +#endif + + +// ---------------------------------------------------------------------------- +// wxComboPopup +// +// ---------------------------------------------------------------------------- + +wxComboPopup::~wxComboPopup() +{ +} + +void wxComboPopup::OnPopup() +{ +} + +void wxComboPopup::OnDismiss() +{ +} + +wxComboCtrl* wxComboPopup::GetComboCtrl() const +{ + return wxStaticCast(m_combo, wxComboCtrl); +} + +wxSize wxComboPopup::GetAdjustedSize( int minWidth, + int prefHeight, + int WXUNUSED(maxHeight) ) +{ + return wxSize(minWidth,prefHeight); +} + +void wxComboPopup::DefaultPaintComboControl( wxComboCtrlBase* combo, + wxDC& dc, const wxRect& rect ) +{ + if ( combo->GetWindowStyle() & wxCB_READONLY ) // ie. no textctrl + { + combo->PrepareBackground(dc,rect,0); + + dc.DrawText( combo->GetValue(), + rect.x + combo->m_marginLeft, + (rect.height-dc.GetCharHeight())/2 + rect.y ); + } +} + +void wxComboPopup::PaintComboControl( wxDC& dc, const wxRect& rect ) +{ + DefaultPaintComboControl(m_combo,dc,rect); +} + +void wxComboPopup::OnComboKeyEvent( wxKeyEvent& event ) +{ + event.Skip(); +} + +void wxComboPopup::OnComboCharEvent( wxKeyEvent& event ) +{ + event.Skip(); +} + +void wxComboPopup::OnComboDoubleClick() +{ +} + +void wxComboPopup::SetStringValue( const wxString& WXUNUSED(value) ) +{ +} + +bool wxComboPopup::FindItem(const wxString& WXUNUSED(item), + wxString* WXUNUSED(trueItem)) +{ + return true; +} + +bool wxComboPopup::LazyCreate() +{ + return false; +} + +void wxComboPopup::Dismiss() +{ + m_combo->HidePopup(true); +} + +void wxComboPopup::DestroyPopup() +{ + // Here we make sure that the popup control's Destroy() gets called. + // This is necessary for the wxPersistentWindow to work properly. + wxWindow* popupCtrl = GetControl(); + if ( popupCtrl ) + { + // While all wxComboCtrl examples have m_popupInterface and + // popupCtrl as the same class (that will be deleted via the + // Destroy() call below), it is technically still possible to + // have implementations where they are in fact not same + // multiple-inherited class. Here we use C++ RTTI to check for + // this rare case. + #ifndef wxNO_RTTI + // It is probably better to delete m_popupInterface first, so + // that it retains access to its popup control window. + if ( dynamic_cast(this) != + dynamic_cast(popupCtrl) ) + delete this; + #endif + popupCtrl->Destroy(); + } + else + { + delete this; + } +} + +// ---------------------------------------------------------------------------- +// input handling +// ---------------------------------------------------------------------------- + +// +// This is pushed to the event handler queue of the child textctrl. +// +class wxComboBoxExtraInputHandler : public wxEvtHandler +{ +public: + + wxComboBoxExtraInputHandler( wxComboCtrlBase* combo ) + : wxEvtHandler() + { + m_combo = combo; + } + virtual ~wxComboBoxExtraInputHandler() { } + void OnKey(wxKeyEvent& event); + void OnFocus(wxFocusEvent& event); + +protected: + wxComboCtrlBase* m_combo; + +private: + DECLARE_EVENT_TABLE() +}; + + +BEGIN_EVENT_TABLE(wxComboBoxExtraInputHandler, wxEvtHandler) + EVT_KEY_DOWN(wxComboBoxExtraInputHandler::OnKey) + EVT_KEY_UP(wxComboBoxExtraInputHandler::OnKey) + EVT_CHAR(wxComboBoxExtraInputHandler::OnKey) + EVT_SET_FOCUS(wxComboBoxExtraInputHandler::OnFocus) + EVT_KILL_FOCUS(wxComboBoxExtraInputHandler::OnFocus) +END_EVENT_TABLE() + + +void wxComboBoxExtraInputHandler::OnKey(wxKeyEvent& event) +{ + // Let the wxComboCtrl event handler have a go first. + wxComboCtrlBase* combo = m_combo; + + wxKeyEvent redirectedEvent(event); + redirectedEvent.SetId(combo->GetId()); + redirectedEvent.SetEventObject(combo); + + if ( !combo->GetEventHandler()->ProcessEvent(redirectedEvent) ) + { + // Don't let TAB through to the text ctrl - looks ugly + if ( event.GetKeyCode() != WXK_TAB ) + event.Skip(); + } +} + +void wxComboBoxExtraInputHandler::OnFocus(wxFocusEvent& event) +{ + // FIXME: This code does run when control is clicked, + // yet on Windows it doesn't select all the text. + if ( event.GetEventType() == wxEVT_SET_FOCUS && + !(m_combo->GetInternalFlags() & wxCC_NO_TEXT_AUTO_SELECT) ) + { + if ( m_combo->GetTextCtrl() ) + m_combo->GetTextCtrl()->SelectAll(); + else + m_combo->SelectAll(); + } + + // Send focus indication to parent. + // NB: This is needed for cases where the textctrl gets focus + // instead of its parent. While this may trigger multiple + // wxEVT_SET_FOCUSes (since m_text->SetFocus is called + // from combo's focus event handler), they should be quite + // harmless. + wxFocusEvent evt2(event); + evt2.SetId(m_combo->GetId()); + evt2.SetEventObject(m_combo); + m_combo->GetEventHandler()->ProcessEvent(evt2); + + event.Skip(); +} + + +// +// This is pushed to the event handler queue of the control in popup. +// + +class wxComboPopupEvtHandler : public wxEvtHandler +{ +public: + + wxComboPopupEvtHandler( wxComboCtrlBase* combo ) + : wxEvtHandler() + { + m_combo = combo; + m_beenInside = false; + + // Let's make it so that the popup control will not receive mouse + // events until mouse left button has been up. + m_blockEventsToPopup = true; + } + virtual ~wxComboPopupEvtHandler() { } + + void OnMouseEvent( wxMouseEvent& event ); + + // Called from wxComboCtrlBase::OnPopupDismiss + void OnPopupDismiss() + { + m_beenInside = false; + m_blockEventsToPopup = true; + } + +protected: + wxComboCtrlBase* m_combo; + + bool m_beenInside; + bool m_blockEventsToPopup; + +private: + DECLARE_EVENT_TABLE() +}; + + +BEGIN_EVENT_TABLE(wxComboPopupEvtHandler, wxEvtHandler) + EVT_MOUSE_EVENTS(wxComboPopupEvtHandler::OnMouseEvent) +END_EVENT_TABLE() + + +void wxComboPopupEvtHandler::OnMouseEvent( wxMouseEvent& event ) +{ + wxPoint pt = event.GetPosition(); + wxSize sz = m_combo->GetPopupControl()->GetControl()->GetClientSize(); + int evtType = event.GetEventType(); + bool isInside = pt.x >= 0 && pt.y >= 0 && pt.x < sz.x && pt.y < sz.y; + bool relayToButton = false; + + event.Skip(); + + if ( !isInside || !m_combo->IsPopupShown() ) + { + // Mouse is outside the popup or popup is not actually shown (yet) + + if ( evtType == wxEVT_MOTION || + evtType == wxEVT_LEFT_DOWN || + evtType == wxEVT_LEFT_UP || + evtType == wxEVT_RIGHT_DOWN ) + { + // Block motion and click events outside the popup + event.Skip(false); + } + } + else + { + // Mouse is inside the popup, which is fully shown + + m_beenInside = true; + + // Do not let the popup control respond to mouse events until + // mouse press used to display the popup has been lifted. This + // is important for users with slower mouse fingers or mouse + // drivers. Note that we have some redundancy here, just in + // case the popup is some native control that does not emit all + // mouse event types. + if ( evtType == wxEVT_MOTION ) + { + if ( m_blockEventsToPopup ) + { + if ( event.LeftIsDown() ) + event.Skip(false); + else + m_blockEventsToPopup = false; + } + } + else if ( evtType == wxEVT_LEFT_DOWN ) + { + if ( m_blockEventsToPopup ) + m_blockEventsToPopup = false; + } + else if ( evtType == wxEVT_LEFT_UP ) + { + if ( m_blockEventsToPopup ) + { + // On first left up, stop blocking mouse events (but still + // block this one) + m_blockEventsToPopup = false; + event.Skip(false); + + // Also, this button press was (probably) used to display + // the popup, so relay it back to the drop-down button + // (which supposedly originated it). This is necessary to + // refresh it properly. + relayToButton = true; + } + } + else if ( m_blockEventsToPopup ) + { + event.Skip(false); + } + } + + // + // Some mouse events to popup that happen outside it, before cursor + // has been inside the popup, need to be ignored by it but relayed to + // the dropbutton. + // + if ( evtType == wxEVT_LEFT_UP ) + { + if ( !m_combo->IsPopupShown() ) + { + event.Skip(false); + relayToButton = true; + } + else if ( !isInside && !m_beenInside ) + { + // Popup is shown but the cursor is not inside, nor it has been + relayToButton = true; + } + } + + if ( relayToButton ) + { + wxWindow* btn = m_combo->GetButton(); + if ( btn ) + btn->GetEventHandler()->ProcessEvent(event); + else + // Bypass the event handling mechanism. Using it would be + // confusing for the platform-specific wxComboCtrl + // implementations. + m_combo->HandleButtonMouseEvent(event, 0); + } +} + +// ---------------------------------------------------------------------------- +// wxComboCtrlTextCtrl +// ---------------------------------------------------------------------------- + +class wxComboCtrlTextCtrl : public wxTextCtrl +{ +public: + wxComboCtrlTextCtrl() : wxTextCtrl() { } + virtual ~wxComboCtrlTextCtrl() { } + + virtual wxWindow *GetMainWindowOfCompositeControl() + { + wxComboCtrl* combo = (wxComboCtrl*) GetParent(); + + // Returning this instead of just 'parent' lets FindFocus work + // correctly even when parent control is a child of a composite + // generic control (as is case with wxGenericDatePickerCtrl). + return combo->GetMainWindowOfCompositeControl(); + } +}; + +// ---------------------------------------------------------------------------- +// wxComboCtrlBase +// ---------------------------------------------------------------------------- + + +BEGIN_EVENT_TABLE(wxComboCtrlBase, wxControl) + EVT_SIZE(wxComboCtrlBase::OnSizeEvent) + EVT_SET_FOCUS(wxComboCtrlBase::OnFocusEvent) + EVT_KILL_FOCUS(wxComboCtrlBase::OnFocusEvent) + EVT_IDLE(wxComboCtrlBase::OnIdleEvent) + //EVT_BUTTON(wxID_ANY,wxComboCtrlBase::OnButtonClickEvent) + EVT_KEY_DOWN(wxComboCtrlBase::OnKeyEvent) + EVT_CHAR(wxComboCtrlBase::OnCharEvent) + EVT_SYS_COLOUR_CHANGED(wxComboCtrlBase::OnSysColourChanged) +END_EVENT_TABLE() + + +IMPLEMENT_ABSTRACT_CLASS(wxComboCtrlBase, wxControl) + +void wxComboCtrlBase::Init() +{ + m_winPopup = NULL; + m_popup = NULL; + m_popupWinState = Hidden; + m_btn = NULL; + m_text = NULL; + m_popupInterface = NULL; + + m_popupEvtHandler = NULL; + m_textEvtHandler = NULL; + +#if INSTALL_TOPLEV_HANDLER + m_toplevEvtHandler = NULL; +#endif + + m_mainCtrlWnd = this; + + m_heightPopup = -1; + m_widthMinPopup = -1; + m_anchorSide = 0; + m_widthCustomPaint = 0; + m_widthCustomBorder = 0; + + m_btnState = 0; + m_btnWidDefault = 0; + m_blankButtonBg = false; + m_ignoreEvtText = 0; + m_popupWinType = POPUPWIN_NONE; + m_btnWid = m_btnHei = -1; + m_btnSide = wxRIGHT; + m_btnSpacingX = 0; + + m_extLeft = 0; + m_extRight = 0; + m_marginLeft = -1; + m_iFlags = 0; + m_textCtrlStyle = 0; + m_timeCanAcceptClick = 0; + + m_resetFocus = false; + m_hasTcBgCol = false; +} + +bool wxComboCtrlBase::Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + if ( !wxControl::Create(parent, + id, + pos, + size, + style | wxWANTS_CHARS, + validator, + name) ) + return false; + + m_valueString = value; + + // Get colours + OnThemeChange(); + m_marginLeft = GetNativeTextIndent(); + + m_iFlags |= wxCC_IFLAG_CREATED; + + // If x and y indicate valid size, wxSizeEvent won't be + // emitted automatically, so we need to add artificial one. + if ( size.x > 0 && size.y > 0 ) + { + wxSizeEvent evt(size,GetId()); + evt.SetEventObject(this); + GetEventHandler()->AddPendingEvent(evt); + } + + return true; +} + +void wxComboCtrlBase::InstallInputHandlers() +{ + if ( m_text ) + { + m_textEvtHandler = new wxComboBoxExtraInputHandler(this); + m_text->PushEventHandler(m_textEvtHandler); + } +} + +void +wxComboCtrlBase::CreateTextCtrl(int style) +{ + if ( !(m_windowStyle & wxCB_READONLY) ) + { + if ( m_text ) + m_text->Destroy(); + + // wxTE_PROCESS_TAB is needed because on Windows, wxTAB_TRAVERSAL is + // not used by the wxPropertyGrid and therefore the tab is processed by + // looking at ancestors to see if they have wxTAB_TRAVERSAL. The + // navigation event is then sent to the wrong window. + style |= wxTE_PROCESS_TAB | m_textCtrlStyle; + + if ( HasFlag(wxTE_PROCESS_ENTER) ) + style |= wxTE_PROCESS_ENTER; + + // Ignore EVT_TEXT generated by the constructor (but only + // if the event redirector already exists) + // NB: This must be " = 1" instead of "++"; + if ( m_textEvtHandler ) + m_ignoreEvtText = 1; + else + m_ignoreEvtText = 0; + + m_text = new wxComboCtrlTextCtrl(); + m_text->Create(this, wxID_ANY, m_valueString, + wxDefaultPosition, wxSize(10,-1), + style); + + // Connecting the events is currently the most reliable way + wxWindowID id = m_text->GetId(); + m_text->Connect(id, wxEVT_TEXT, + wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent), + NULL, this); + m_text->Connect(id, wxEVT_TEXT_ENTER, + wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent), + NULL, this); + + m_text->SetHint(m_hintText); + } +} + +void wxComboCtrlBase::OnThemeChange() +{ + // Because wxComboCtrl has transparent parts on most platforms, we + // don't want to touch the actual background colour. Instead, we just + // usually re-obtain m_tcBgCol here. + +#if defined(__WXMSW__) || defined(__WXGTK__) + wxVisualAttributes vattrs = wxComboBox::GetClassDefaultAttributes(); +#else + wxVisualAttributes vattrs; + vattrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); + vattrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); +#endif + + if ( !m_hasTcBgCol ) + m_tcBgCol = vattrs.colBg; + +#ifndef __WXMAC__ + // Only change the colours if application has not specified + // custom ones. + if ( !m_hasFgCol ) + { + SetOwnForegroundColour(vattrs.colFg); + } + if ( !HasTransparentBackground() ) + { + SetOwnBackgroundColour(GetParent()->GetBackgroundColour()); + } +#endif // !__WXMAC__ +} + +wxComboCtrlBase::~wxComboCtrlBase() +{ + if ( HasCapture() ) + ReleaseMouse(); + +#if INSTALL_TOPLEV_HANDLER + delete ((wxComboFrameEventHandler*)m_toplevEvtHandler); + m_toplevEvtHandler = NULL; +#endif + + DestroyPopup(); + + if ( m_text ) + m_text->RemoveEventHandler(m_textEvtHandler); + + delete m_textEvtHandler; +} + + +// ---------------------------------------------------------------------------- +// geometry stuff +// ---------------------------------------------------------------------------- + +// Recalculates button and textctrl areas +void wxComboCtrlBase::CalculateAreas( int btnWidth ) +{ + wxSize sz = GetClientSize(); + int customBorder = m_widthCustomBorder; + int btnBorder; // border for button only + + // check if button should really be outside the border: we'll do it it if + // its platform default or bitmap+pushbutton background is used, but not if + // there is vertical size adjustment or horizontal spacing. + if ( ( (m_iFlags & wxCC_BUTTON_OUTSIDE_BORDER) || + (m_bmpNormal.IsOk() && m_blankButtonBg) ) && + m_btnSpacingX == 0 && + m_btnHei <= 0 ) + { + m_iFlags |= wxCC_IFLAG_BUTTON_OUTSIDE; + btnBorder = 0; + } + else if ( (m_iFlags & wxCC_BUTTON_COVERS_BORDER) && + m_btnSpacingX == 0 && !m_bmpNormal.IsOk() ) + { + m_iFlags &= ~(wxCC_IFLAG_BUTTON_OUTSIDE); + btnBorder = 0; + } + else + { + m_iFlags &= ~(wxCC_IFLAG_BUTTON_OUTSIDE); + btnBorder = customBorder; + } + + // Defaul indentation + if ( m_marginLeft < 0 ) + m_marginLeft = GetNativeTextIndent(); + + int butWidth = btnWidth; + + if ( butWidth <= 0 ) + butWidth = m_btnWidDefault; + else + m_btnWidDefault = butWidth; + + if ( butWidth <= 0 ) + return; + + int butHeight = sz.y - btnBorder*2; + + // Adjust button width + if ( m_btnWid > 0 ) + butWidth = m_btnWid; + else + { + // Adjust button width to match aspect ratio + // (but only if control is smaller than best size). + int bestHeight = GetBestSize().y; + int height = GetSize().y; + + if ( height < bestHeight ) + { + // Make very small buttons square, as it makes + // them accommodate arrow image better and still + // looks decent. + if ( height > 18 ) + butWidth = (height*butWidth)/bestHeight; + else + butWidth = butHeight; + } + } + + // Adjust button height + if ( m_btnHei > 0 ) + butHeight = m_btnHei; + + // Use size of normal bitmap if... + // It is larger + // OR + // button width is set to default and blank button bg is not drawn + if ( m_bmpNormal.IsOk() ) + { + int bmpReqWidth = m_bmpNormal.GetWidth(); + int bmpReqHeight = m_bmpNormal.GetHeight(); + + // If drawing blank button background, we need to add some margin. + if ( m_blankButtonBg ) + { + bmpReqWidth += BMP_BUTTON_MARGIN*2; + bmpReqHeight += BMP_BUTTON_MARGIN*2; + } + + if ( butWidth < bmpReqWidth || ( m_btnWid == 0 && !m_blankButtonBg ) ) + butWidth = bmpReqWidth; + if ( butHeight < bmpReqHeight || ( m_btnHei == 0 && !m_blankButtonBg ) ) + butHeight = bmpReqHeight; + + // Need to fix height? + if ( (sz.y-(customBorder*2)) < butHeight && btnWidth == 0 ) + { + int newY = butHeight+(customBorder*2); + SetClientSize(wxDefaultCoord,newY); + if ( m_bmpNormal.IsOk() || m_btnArea.width != butWidth || m_btnArea.height != butHeight ) + m_iFlags |= wxCC_IFLAG_HAS_NONSTANDARD_BUTTON; + else + m_iFlags &= ~wxCC_IFLAG_HAS_NONSTANDARD_BUTTON; + + sz.y = newY; + } + } + + int butAreaWid = butWidth + (m_btnSpacingX*2); + + m_btnSize.x = butWidth; + m_btnSize.y = butHeight; + + m_btnArea.x = ( m_btnSide==wxRIGHT ? sz.x - butAreaWid - btnBorder : btnBorder ); + m_btnArea.y = btnBorder + FOCUS_RING; + m_btnArea.width = butAreaWid; + m_btnArea.height = sz.y - ((btnBorder+FOCUS_RING)*2); + + m_tcArea.x = ( m_btnSide==wxRIGHT ? 0 : butAreaWid ) + customBorder + FOCUS_RING; + m_tcArea.y = customBorder + FOCUS_RING; + m_tcArea.width = sz.x - butAreaWid - (customBorder*2) - (FOCUS_RING*2); + m_tcArea.height = sz.y - ((customBorder+FOCUS_RING)*2); + +/* + if ( m_text ) + { + ::wxMessageBox(wxString::Format(wxT("ButtonArea (%i,%i,%i,%i)\n"),m_btnArea.x,m_btnArea.y,m_btnArea.width,m_btnArea.height) + + wxString::Format(wxT("TextCtrlArea (%i,%i,%i,%i)"),m_tcArea.x,m_tcArea.y,m_tcArea.width,m_tcArea.height)); + } +*/ +} + +void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust ) +{ + if ( !m_text ) + return; + + wxSize sz = GetClientSize(); + + int customBorder = m_widthCustomBorder; + if ( (m_text->GetWindowStyleFlag() & wxBORDER_MASK) == wxNO_BORDER ) + { + int x; + + if ( !m_widthCustomPaint ) + { + // No special custom paint area - we can use 0 left margin + // with wxTextCtrl. + if ( m_text->SetMargins(0) ) + textCtrlXAdjust = 0; + x = m_tcArea.x + m_marginLeft + textCtrlXAdjust; + } + else + { + // There is special custom paint area - it is better to + // use some margin with the wxTextCtrl. + m_text->SetMargins(m_marginLeft); + x = m_tcArea.x + m_widthCustomPaint + + m_marginLeft + textCtrlXAdjust; + } + + // Centre textctrl vertically, if needed +#if !TEXTCTRL_TEXT_CENTERED + int tcSizeY = m_text->GetBestSize().y; + int diff0 = sz.y - tcSizeY; + int y = textCtrlYAdjust + (diff0/2); +#else + wxUnusedVar(textCtrlYAdjust); + int y = 0; +#endif + + if ( y < customBorder ) + y = customBorder; + + m_text->SetSize(x, + y, + m_tcArea.width - m_tcArea.x - x, + -1 ); + + // Make sure textctrl doesn't exceed the bottom custom border + wxSize tsz = m_text->GetSize(); + int diff1 = (y + tsz.y) - (sz.y - customBorder); + if ( diff1 >= 0 ) + { + tsz.y = tsz.y - diff1 - 1; + m_text->SetSize(tsz); + } + } + else + { + // If it has border, have textctrl fill the entire text field. + int w = m_tcArea.width - m_widthCustomPaint; + if (w < 0) w = 0; + m_text->SetSize( m_tcArea.x + m_widthCustomPaint, + m_tcArea.y, + w, + m_tcArea.height ); + } +} + +wxSize wxComboCtrlBase::DoGetBestSize() const +{ + int width = m_text ? m_text->GetBestSize().x : 80; + + return GetSizeFromTextSize(width); +} + +wxSize wxComboCtrlBase::DoGetSizeFromTextSize(int xlen, int ylen) const +{ + // Calculate close-to-native control height + + int fhei; + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + fhei = EDIT_HEIGHT_FROM_CHAR_HEIGHT(GetCharHeight()); +#elif defined(__WXGTK__) && !defined(__WXUNIVERSAL__) + // Control creation is not entirely cheap, so cache the heights to + // avoid repeatedly creating dummy controls: + static wxString s_last_font; + static int s_last_fhei = -1; + wxString fontdesc; + if ( m_font.IsOk() ) + fontdesc = m_font.GetNativeFontInfoDesc(); + if ( s_last_fhei != -1 && fontdesc == s_last_font ) + { + fhei = s_last_fhei; + } + else + { + wxComboBox* cb = new wxComboBox; +#ifndef __WXGTK3__ + // GTK3 returns zero for the preferred size of a hidden widget + cb->Hide(); +#endif + cb->Create(const_cast(this), wxID_ANY); + if ( m_font.IsOk() ) + cb->SetFont(m_font); + s_last_font = fontdesc; + s_last_fhei = fhei = cb->GetBestSize().y; + cb->Destroy(); + } +#else + if ( m_font.IsOk() ) + fhei = (m_font.GetPointSize()*2) + 5; + else if ( wxNORMAL_FONT->IsOk() ) + fhei = (wxNORMAL_FONT->GetPointSize()*2) + 5; + else + fhei = 22; +#endif // only for wxComboBox on MSW or GTK + + // Need to force height to accommodate bitmap? + int btnSizeY = m_btnSize.y; + if ( m_bmpNormal.IsOk() && fhei < btnSizeY ) + fhei = btnSizeY; + + // Control height doesn't depend on border +/* + // Add border + int border = m_windowStyle & wxBORDER_MASK; + if ( border == wxSIMPLE_BORDER ) + fhei += 2; + else if ( border == wxNO_BORDER ) + fhei += (m_widthCustomBorder*2); + else + // Sunken etc. + fhei += 4; +*/ + +#ifdef __WXMAC__ + // these are the numbers from the HIG: + switch ( m_windowVariant ) + { + case wxWINDOW_VARIANT_NORMAL: + default : + fhei = 22; + break; + case wxWINDOW_VARIANT_SMALL: + fhei = 19; + break; + case wxWINDOW_VARIANT_MINI: + fhei = 15; + break; + } +#endif + + fhei += 2 * FOCUS_RING; + + // Calculate width + int fwid = xlen + FOCUS_RING + COMBO_MARGIN + DEFAULT_DROPBUTTON_WIDTH; + + // Add the margins we have previously set + wxPoint marg( GetMargins() ); + fwid += wxMax(0, marg.x); + fhei += wxMax(0, marg.y); + + if ( ylen > 0 ) + fhei += ylen - GetCharHeight(); + + return wxSize(fwid, fhei); +} + +void wxComboCtrlBase::OnSizeEvent( wxSizeEvent& event ) +{ + if ( !IsCreated() ) + return; + + // defined by actual wxComboCtrls + OnResize(); + + event.Skip(); +} + +// ---------------------------------------------------------------------------- +// standard operations +// ---------------------------------------------------------------------------- + +bool wxComboCtrlBase::Enable(bool enable) +{ + if ( !wxControl::Enable(enable) ) + return false; + + if ( m_btn ) + m_btn->Enable(enable); + if ( m_text ) + m_text->Enable(enable); + + Refresh(); + + return true; +} + +bool wxComboCtrlBase::Show(bool show) +{ + if ( !wxControl::Show(show) ) + return false; + + if (m_btn) + m_btn->Show(show); + + if (m_text) + m_text->Show(show); + + return true; +} + +bool wxComboCtrlBase::SetFont ( const wxFont& font ) +{ + if ( !wxControl::SetFont(font) ) + return false; + + if ( m_text ) + { + // Without hiding the wxTextCtrl there would be some + // visible 'flicker' (at least on Windows XP). + m_text->Hide(); + m_text->SetFont(font); + OnResize(); + m_text->Show(); + } + + return true; +} + +#if wxUSE_TOOLTIPS +void wxComboCtrlBase::DoSetToolTip(wxToolTip *tooltip) +{ + wxControl::DoSetToolTip(tooltip); + + // Set tool tip for button and text box + if ( tooltip ) + { + const wxString &tip = tooltip->GetTip(); + if ( m_text ) m_text->SetToolTip(tip); + if ( m_btn ) m_btn->SetToolTip(tip); + } + else + { + if ( m_text ) m_text->SetToolTip( NULL ); + if ( m_btn ) m_btn->SetToolTip( NULL ); + } +} +#endif // wxUSE_TOOLTIPS + +bool wxComboCtrlBase::SetForegroundColour(const wxColour& colour) +{ + if ( wxControl::SetForegroundColour(colour) ) + { + if ( m_text ) + m_text->SetForegroundColour(colour); + return true; + } + return false; +} + +bool wxComboCtrlBase::SetBackgroundColour(const wxColour& colour) +{ + if ( m_text ) + m_text->SetBackgroundColour(colour); + m_tcBgCol = colour; + m_hasTcBgCol = true; + return true; +} + +wxColour wxComboCtrlBase::GetBackgroundColour() const +{ + if ( m_text ) + return m_text->GetBackgroundColour(); + return m_tcBgCol; +} + +// ---------------------------------------------------------------------------- +// painting +// ---------------------------------------------------------------------------- + +#if (!defined(__WXMSW__)) || defined(__WXUNIVERSAL__) +// prepare combo box background on area in a way typical on platform +void wxComboCtrlBase::PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const +{ + wxSize sz = GetClientSize(); + bool isEnabled; + bool doDrawFocusRect; // also selected + + // For smaller size control (and for disabled background) use less spacing + int focusSpacingX; + int focusSpacingY; + + if ( !(flags & wxCONTROL_ISSUBMENU) ) + { + // Drawing control + isEnabled = IsEnabled(); + doDrawFocusRect = ShouldDrawFocus() && !(m_iFlags & wxCC_FULL_BUTTON); + + // Windows-style: for smaller size control (and for disabled background) use less spacing + focusSpacingX = isEnabled ? 2 : 1; + focusSpacingY = sz.y > (GetCharHeight()+2) && isEnabled ? 2 : 1; + } + else + { + // Drawing a list item + isEnabled = true; // they are never disabled + doDrawFocusRect = (flags & wxCONTROL_SELECTED) != 0; + + focusSpacingX = 0; + focusSpacingY = 0; + } + + // Set the background sub-rectangle for selection, disabled etc + wxRect selRect(rect); + selRect.y += focusSpacingY; + selRect.height -= (focusSpacingY*2); + + int wcp = 0; + + if ( !(flags & wxCONTROL_ISSUBMENU) ) + wcp += m_widthCustomPaint; + + selRect.x += wcp + focusSpacingX; + selRect.width -= wcp + (focusSpacingX*2); + + wxColour bgCol; + wxColour fgCol; + + bool doDrawSelRect = true; + + // Determine foreground colour + if ( isEnabled ) + { + if ( doDrawFocusRect ) + { + fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + } + else if ( m_hasFgCol ) + { + // Honour the custom foreground colour + fgCol = GetForegroundColour(); + } + else + { + fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); + } + } + else + { + fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT); + } + + // Determine background colour + if ( isEnabled ) + { + if ( doDrawFocusRect ) + { + bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); + } + else if ( m_hasTcBgCol ) + { + // Honour the custom background colour + bgCol = m_tcBgCol; + } + else + { +#ifndef __WXMAC__ // see note in OnThemeChange + doDrawSelRect = false; + bgCol = GetBackgroundColour(); +#else + bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); +#endif + } + } + else + { +#ifndef __WXMAC__ // see note in OnThemeChange + bgCol = GetBackgroundColour(); +#else + bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); +#endif + } + + dc.SetTextForeground( fgCol ); + dc.SetBrush( bgCol ); + if ( doDrawSelRect ) + { + dc.SetPen( bgCol ); + dc.DrawRectangle( selRect ); + } + + // Don't clip exactly to the selection rectangle so we can draw + // to the non-selected area in front of it. + wxRect clipRect(rect.x,rect.y, + (selRect.x+selRect.width)-rect.x,rect.height); + dc.SetClippingRegion(clipRect); +} +#else +// Save the library size a bit for platforms that re-implement this. +void wxComboCtrlBase::PrepareBackground( wxDC&, const wxRect&, int ) const +{ +} +#endif + +void wxComboCtrlBase::DrawButton( wxDC& dc, const wxRect& rect, int flags ) +{ + int drawState = m_btnState; + + if ( (m_iFlags & wxCC_BUTTON_STAYS_DOWN) && + GetPopupWindowState() >= Animating ) + drawState |= wxCONTROL_PRESSED; + + wxRect drawRect(rect.x+m_btnSpacingX, + rect.y+((rect.height-m_btnSize.y)/2), + m_btnSize.x, + m_btnSize.y); + + // Make sure area is not larger than the control + if ( drawRect.y < rect.y ) + drawRect.y = rect.y; + if ( drawRect.height > rect.height ) + drawRect.height = rect.height; + + bool enabled = IsEnabled(); + + if ( !enabled ) + drawState |= wxCONTROL_DISABLED; + + // Need to clear button background even if m_btn is present + // and also when using custom bitmap for the button + if ( (flags & Button_PaintBackground) && + (!HasTransparentBackground() || + !(m_iFlags & wxCC_IFLAG_BUTTON_OUTSIDE)) ) + { + wxColour bgCol; + + if ( m_iFlags & wxCC_IFLAG_BUTTON_OUTSIDE ) + bgCol = GetParent()->GetBackgroundColour(); + else + bgCol = GetBackgroundColour(); + + dc.SetBrush(bgCol); + dc.SetPen(bgCol); + dc.DrawRectangle(rect); + } + + if ( !m_bmpNormal.IsOk() ) + { + if ( flags & Button_BitmapOnly ) + return; + + // Draw standard button + wxRendererNative::Get().DrawComboBoxDropButton(this, + dc, + drawRect, + drawState); + } + else + { + // Draw bitmap + + wxBitmap* pBmp; + + if ( !enabled ) + pBmp = &m_bmpDisabled; + else if ( m_btnState & wxCONTROL_PRESSED ) + pBmp = &m_bmpPressed; + else if ( m_btnState & wxCONTROL_CURRENT ) + pBmp = &m_bmpHover; + else + pBmp = &m_bmpNormal; + + if ( m_blankButtonBg ) + { + if ( !(flags & Button_BitmapOnly) ) + { + wxRendererNative::Get().DrawPushButton(this, + dc, + drawRect, + drawState); + } + } + + // Draw bitmap centered in drawRect + dc.DrawBitmap(*pBmp, + drawRect.x + (drawRect.width-pBmp->GetWidth())/2, + drawRect.y + (drawRect.height-pBmp->GetHeight())/2, + true); + } +} + +void wxComboCtrlBase::RecalcAndRefresh() +{ + if ( IsCreated() ) + { + wxSizeEvent evt(GetSize(),GetId()); + evt.SetEventObject(this); + GetEventHandler()->ProcessEvent(evt); + Refresh(); + } +} + +// ---------------------------------------------------------------------------- +// miscellaneous event handlers +// ---------------------------------------------------------------------------- + +void wxComboCtrlBase::OnTextCtrlEvent(wxCommandEvent& event) +{ + // Avoid infinite recursion + if ( event.GetEventObject() == this ) + { + event.Skip(); + return; + } + + if ( event.GetEventType() == wxEVT_TEXT ) + { + if ( m_ignoreEvtText > 0 ) + { + m_ignoreEvtText--; + return; + } + } + + // For safety, completely re-create a new wxCommandEvent + wxCommandEvent evt2(event); + evt2.SetId(GetId()); + evt2.SetEventObject(this); + HandleWindowEvent(evt2); + + event.StopPropagation(); +} + +// call if cursor is on button area or mouse is captured for the button +bool wxComboCtrlBase::HandleButtonMouseEvent( wxMouseEvent& event, + int flags ) +{ + int type = event.GetEventType(); + + if ( type == wxEVT_MOTION ) + { + if ( (flags & wxCC_MF_ON_BUTTON) && + IsPopupWindowState(Hidden) ) + { + if ( !(m_btnState & wxCONTROL_CURRENT) ) + { + // Mouse hover begins + m_btnState |= wxCONTROL_CURRENT; + if ( HasCapture() ) // Retain pressed state. + m_btnState |= wxCONTROL_PRESSED; + Refresh(); + } + } + else if ( (m_btnState & wxCONTROL_CURRENT) ) + { + // Mouse hover ends + m_btnState &= ~(wxCONTROL_CURRENT|wxCONTROL_PRESSED); + Refresh(); + } + } + else if ( type == wxEVT_LEFT_DOWN || type == wxEVT_LEFT_DCLICK ) + { + if ( flags & (wxCC_MF_ON_CLICK_AREA|wxCC_MF_ON_BUTTON) ) + { + m_btnState |= wxCONTROL_PRESSED; + Refresh(); + + if ( !(m_iFlags & wxCC_POPUP_ON_MOUSE_UP) ) + OnButtonClick(); + else + // If showing popup now, do not capture mouse or there will be interference + CaptureMouse(); + } + } + else if ( type == wxEVT_LEFT_UP ) + { + + // Only accept event if mouse was left-press was previously accepted + if ( HasCapture() ) + ReleaseMouse(); + + if ( m_btnState & wxCONTROL_PRESSED ) + { + // If mouse was inside, fire the click event. + if ( m_iFlags & wxCC_POPUP_ON_MOUSE_UP ) + { + if ( flags & (wxCC_MF_ON_CLICK_AREA|wxCC_MF_ON_BUTTON) ) + OnButtonClick(); + } + + m_btnState &= ~(wxCONTROL_PRESSED); + Refresh(); + } + } + else if ( type == wxEVT_LEAVE_WINDOW ) + { + if ( m_btnState & (wxCONTROL_CURRENT|wxCONTROL_PRESSED) ) + { + m_btnState &= ~(wxCONTROL_CURRENT); + + // Mouse hover ends + if ( IsPopupWindowState(Hidden) ) + { + m_btnState &= ~(wxCONTROL_PRESSED); + Refresh(); + } + } + } + else + return false; + + // Never have 'hot' state when popup is being shown + // (this is mostly needed because of the animation). + if ( !IsPopupWindowState(Hidden) ) + m_btnState &= ~wxCONTROL_CURRENT; + + return true; +} + +// returns true if event was consumed or filtered +bool wxComboCtrlBase::PreprocessMouseEvent( wxMouseEvent& event, + int WXUNUSED(flags) ) +{ + wxLongLong t = ::wxGetLocalTimeMillis(); + int evtType = event.GetEventType(); + +#if USES_WXPOPUPWINDOW || USES_GENERICTLW + if ( m_popupWinType != POPUPWIN_WXPOPUPTRANSIENTWINDOW ) + { + if ( IsPopupWindowState(Visible) && + ( evtType == wxEVT_LEFT_DOWN || evtType == wxEVT_RIGHT_DOWN ) ) + { + HidePopup(true); + return true; + } + } +#endif + + // Filter out clicks on button immediately after popup dismiss + if ( evtType == wxEVT_LEFT_DOWN && t < m_timeCanAcceptClick ) + { + event.SetEventType(0); + return true; + } + + return false; +} + +void wxComboCtrlBase::HandleNormalMouseEvent( wxMouseEvent& event ) +{ + int evtType = event.GetEventType(); + + if ( (evtType == wxEVT_LEFT_DOWN || evtType == wxEVT_LEFT_DCLICK) && + (m_windowStyle & wxCB_READONLY) ) + { + if ( GetPopupWindowState() >= Animating ) + { + #if USES_WXPOPUPWINDOW + // Click here always hides the popup. + if ( m_popupWinType == POPUPWIN_WXPOPUPWINDOW ) + HidePopup(true); + #endif + } + else + { + if ( !(m_windowStyle & wxCC_SPECIAL_DCLICK) ) + { + // In read-only mode, clicking the text is the + // same as clicking the button. + OnButtonClick(); + } + else if ( /*evtType == wxEVT_LEFT_UP || */evtType == wxEVT_LEFT_DCLICK ) + { + //if ( m_popupInterface->CycleValue() ) + // Refresh(); + if ( m_popupInterface ) + m_popupInterface->OnComboDoubleClick(); + } + } + } + else if ( evtType == wxEVT_MOUSEWHEEL ) + { + if ( IsPopupShown() ) + { + // relay (some) mouse events to the popup + m_popup->GetEventHandler()->ProcessEvent(event); + } + else if ( event.GetWheelAxis() == 0 && + event.GetWheelRotation() != 0 && + event.GetModifiers() == 0 ) + { + // Translate mousewheel actions into key up/down. This is + // the simplest way of getting native behaviour: scrolling the + // wheel moves selection up/down by one item. + wxKeyEvent kevent(wxEVT_KEY_DOWN); + kevent.m_keyCode = event.GetWheelRotation() > 0 + ? WXK_UP + : WXK_DOWN; + GetEventHandler()->ProcessEvent(kevent); + } + else + { + event.Skip(); + } + } + else if ( evtType ) + { + event.Skip(); + } +} + +void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event) +{ + if ( IsPopupShown() ) + { + // pass it to the popped up control + GetPopupControl()->GetControl()->GetEventHandler()->ProcessEvent(event); + } + else // no popup + { + wxWindow* mainCtrl = GetMainWindowOfCompositeControl(); + + if ( mainCtrl->GetParent()->HasFlag(wxTAB_TRAVERSAL) ) + { + if ( mainCtrl->HandleAsNavigationKey(event) ) + return; + } + + if ( IsKeyPopupToggle(event) ) + { + OnButtonClick(); + return; + } + + int comboStyle = GetWindowStyle(); + wxComboPopup* popupInterface = GetPopupControl(); + + if ( !popupInterface ) + { + event.Skip(); + return; + } + + int keycode = event.GetKeyCode(); + + if ( (comboStyle & wxCB_READONLY) || + (keycode != WXK_RIGHT && keycode != WXK_LEFT) ) + { + popupInterface->OnComboKeyEvent(event); + } + else + event.Skip(); + } +} + +void wxComboCtrlBase::OnCharEvent(wxKeyEvent& event) +{ + if ( IsPopupShown() ) + { + // pass it to the popped up control + GetPopupControl()->GetControl()->GetEventHandler()->ProcessEvent(event); + } + else // no popup + { + wxComboPopup* popupInterface = GetPopupControl(); + if ( popupInterface ) + { + popupInterface->OnComboCharEvent(event); + } + else + { + event.Skip(); + } + } +} + +void wxComboCtrlBase::OnFocusEvent( wxFocusEvent& event ) +{ + // On Mac, setting focus here leads to infinite recursion and eventually + // a crash due to the SetFocus call producing another event. + // Handle Mac in OnIdleEvent using m_resetFocus. + + if ( event.GetEventType() == wxEVT_SET_FOCUS ) + { + if ( GetTextCtrl() && !GetTextCtrl()->HasFocus() ) + { +#ifdef __WXMAC__ + m_resetFocus = true; +#else + GetTextCtrl()->SetFocus(); +#endif + } + } + + Refresh(); +} + +void wxComboCtrlBase::OnIdleEvent( wxIdleEvent& WXUNUSED(event) ) +{ + if ( m_resetFocus ) + { + m_resetFocus = false; + if ( GetTextCtrl() ) + GetTextCtrl()->SetFocus(); + } +} + +void wxComboCtrlBase::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event)) +{ + OnThemeChange(); + // left margin may also have changed + if ( !(m_iFlags & wxCC_IFLAG_LEFT_MARGIN_SET) ) + m_marginLeft = GetNativeTextIndent(); + RecalcAndRefresh(); +} + +// ---------------------------------------------------------------------------- +// popup handling +// ---------------------------------------------------------------------------- + +// Create popup window and the child control +void wxComboCtrlBase::CreatePopup() +{ + wxComboPopup* popupInterface = m_popupInterface; + wxWindow* popup; + + if ( !m_winPopup ) + { +#ifdef wxComboPopupWindowBase2 + if ( m_iFlags & wxCC_IFLAG_USE_ALT_POPUP ) + { + #if !USES_GENERICTLW + m_winPopup = new wxComboPopupWindowBase2( this, wxNO_BORDER ); + #else + int tlwFlags = wxNO_BORDER; + #ifdef wxCC_GENERIC_TLW_IS_FRAME + tlwFlags |= wxFRAME_NO_TASKBAR; + #endif + + #ifdef wxCC_GENERIC_TLW_IS_NONOWNEDWINDOW + m_winPopup = new wxComboPopupWindowBase2( this, wxID_ANY, + wxPoint(-21,-21), wxSize(20, 20), + tlwFlags ); + #else + m_winPopup = new wxComboPopupWindowBase2( this, wxID_ANY, wxEmptyString, + wxPoint(-21,-21), wxSize(20, 20), + tlwFlags ); + #endif + #endif + m_popupWinType = SECONDARY_POPUP_TYPE; + } + else +#endif // wxComboPopupWindowBase2 + { + m_winPopup = new wxComboPopupWindow( this, wxNO_BORDER ); + m_popupWinType = PRIMARY_POPUP_TYPE; + } + m_popupWinEvtHandler = new wxComboPopupWindowEvtHandler(this); + m_winPopup->PushEventHandler(m_popupWinEvtHandler); + } + + popupInterface->Create(m_winPopup); + m_popup = popup = popupInterface->GetControl(); + + m_popupEvtHandler = new wxComboPopupEvtHandler(this); + popup->PushEventHandler( m_popupEvtHandler ); + + // This may be helpful on some platforms + // (eg. it bypasses a wxGTK popupwindow bug where + // window is not initially hidden when it should be) + m_winPopup->Hide(); + + popupInterface->m_iFlags |= wxCP_IFLAG_CREATED; +} + +// Destroy popup window and the child control +void wxComboCtrlBase::DestroyPopup() +{ + HidePopup(true); + + if ( m_popup ) + m_popup->RemoveEventHandler(m_popupEvtHandler); + + wxDELETE(m_popupEvtHandler); + + if ( m_popupInterface ) + { + // NB: DestroyPopup() performs 'delete this'. + m_popupInterface->DestroyPopup(); + m_popupInterface = NULL; + } + + if ( m_winPopup ) + { + m_winPopup->RemoveEventHandler(m_popupWinEvtHandler); + wxDELETE(m_popupWinEvtHandler); + m_winPopup->Destroy(); + m_winPopup = NULL; + } + + m_popup = NULL; +} + +void wxComboCtrlBase::DoSetPopupControl(wxComboPopup* iface) +{ + wxCHECK_RET( iface, wxT("no popup interface set for wxComboCtrl") ); + + DestroyPopup(); + + iface->InitBase(this); + iface->Init(); + + m_popupInterface = iface; + + if ( !iface->LazyCreate() ) + { + CreatePopup(); + } + else + { + m_popup = NULL; + } + + // This must be done after creation + if ( !m_valueString.empty() ) + { + iface->SetStringValue(m_valueString); + //Refresh(); + } +} + +// Ensures there is atleast the default popup +void wxComboCtrlBase::EnsurePopupControl() +{ + if ( !m_popupInterface ) + SetPopupControl(NULL); +} + +void wxComboCtrlBase::OnButtonClick() +{ + // Derived classes can override this method for totally custom + // popup action + switch ( GetPopupWindowState() ) + { + case Hidden: + { + Popup(); + break; + } + + case Animating: + case Visible: + { + HidePopup(true); + break; + } + } +} + +void wxComboCtrlBase::Popup() +{ + wxCommandEvent event(wxEVT_COMBOBOX_DROPDOWN, GetId()); + event.SetEventObject(this); + HandleWindowEvent(event); + + ShowPopup(); +} + +void wxComboCtrlBase::ShowPopup() +{ + EnsurePopupControl(); + wxCHECK_RET( !IsPopupWindowState(Visible), wxT("popup window already shown") ); + + if ( IsPopupWindowState(Animating) ) + return; + + SetFocus(); + + // Space above and below + int screenHeight; + wxPoint scrPos; + int spaceAbove; + int spaceBelow; + int maxHeightPopup; + wxSize ctrlSz = GetSize(); + + screenHeight = wxSystemSettings::GetMetric( wxSYS_SCREEN_Y ); + scrPos = GetParent()->ClientToScreen(GetPosition()); + + spaceAbove = scrPos.y; + spaceBelow = screenHeight - spaceAbove - ctrlSz.y; + + maxHeightPopup = spaceBelow; + if ( spaceAbove > spaceBelow ) + maxHeightPopup = spaceAbove; + + // Width + int widthPopup = ctrlSz.x + m_extLeft + m_extRight; + + if ( widthPopup < m_widthMinPopup ) + widthPopup = m_widthMinPopup; + + wxWindow* winPopup = m_winPopup; + wxWindow* popup; + + // Need to disable tab traversal of parent + // + // NB: This is to fix a bug in wxMSW. In theory it could also be fixed + // by, for instance, adding check to window.cpp:wxWindowMSW::MSWProcessMessage + // that if transient popup is open, then tab traversal is to be ignored. + // However, I think this code would still be needed for cases where + // transient popup doesn't work yet (wxWinCE?). + wxWindow* mainCtrl = GetMainWindowOfCompositeControl(); + wxWindow* parent = mainCtrl->GetParent(); + int parentFlags = parent->GetWindowStyle(); + if ( parentFlags & wxTAB_TRAVERSAL ) + { + parent->SetWindowStyle( parentFlags & ~(wxTAB_TRAVERSAL) ); + m_iFlags |= wxCC_IFLAG_PARENT_TAB_TRAVERSAL; + } + + if ( !winPopup ) + { + CreatePopup(); + winPopup = m_winPopup; + popup = m_popup; + } + else + { + popup = m_popup; + } + + winPopup->Enable(); + + wxASSERT( !m_popup || m_popup == popup ); // Consistency check. + + wxSize adjustedSize = m_popupInterface->GetAdjustedSize(widthPopup, + m_heightPopup<=0?DEFAULT_POPUP_HEIGHT:m_heightPopup, + maxHeightPopup); + + popup->SetSize(adjustedSize); + popup->Move(0,0); + m_popupInterface->OnPopup(); + + // + // Reposition and resize popup window + // + + wxSize szp = popup->GetSize(); + + int popupX; + int popupY = scrPos.y + ctrlSz.y; + + // Default anchor is wxLEFT + int anchorSide = m_anchorSide; + if ( !anchorSide ) + anchorSide = wxLEFT; + + int rightX = scrPos.x + ctrlSz.x + m_extRight - szp.x; + int leftX = scrPos.x - m_extLeft; + + if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft ) + leftX -= ctrlSz.x; + + int screenWidth = wxSystemSettings::GetMetric( wxSYS_SCREEN_X ); + + // If there is not enough horizontal space, anchor on the other side. + // If there is no space even then, place the popup at x 0. + if ( anchorSide == wxRIGHT ) + { + if ( rightX < 0 ) + { + if ( (leftX+szp.x) < screenWidth ) + anchorSide = wxLEFT; + else + anchorSide = 0; + } + } + else + { + if ( (leftX+szp.x) >= screenWidth ) + { + if ( rightX >= 0 ) + anchorSide = wxRIGHT; + else + anchorSide = 0; + } + } + + // Select x coordinate according to the anchor side + if ( anchorSide == wxRIGHT ) + popupX = rightX; + else if ( anchorSide == wxLEFT ) + popupX = leftX; + else + popupX = 0; + + int showFlags = CanDeferShow; + + if ( spaceBelow < szp.y ) + { + popupY = scrPos.y - szp.y; + showFlags |= ShowAbove; + } + +#if INSTALL_TOPLEV_HANDLER + // Put top level window event handler into place + if ( m_popupWinType == POPUPWIN_WXPOPUPWINDOW ) + { + if ( !m_toplevEvtHandler ) + m_toplevEvtHandler = new wxComboFrameEventHandler(this); + + wxWindow* toplev = ::wxGetTopLevelParent( this ); + wxASSERT( toplev ); + ((wxComboFrameEventHandler*)m_toplevEvtHandler)->OnPopup(); + toplev->PushEventHandler( m_toplevEvtHandler ); + } +#endif + + // Set string selection (must be this way instead of SetStringSelection) + if ( m_text ) + { + if ( !(m_iFlags & wxCC_NO_TEXT_AUTO_SELECT) ) + m_text->SelectAll(); + + m_popupInterface->SetStringValue( m_text->GetValue() ); + } + else + { + // This is neede since focus/selection indication may change when popup is shown + Refresh(); + } + + // This must be after SetStringValue + m_popupWinState = Animating; + + wxRect popupWinRect( popupX, popupY, szp.x, szp.y ); + + m_popup = popup; + if ( (m_iFlags & wxCC_IFLAG_DISABLE_POPUP_ANIM) || + AnimateShow( popupWinRect, showFlags ) ) + { + DoShowPopup( popupWinRect, showFlags ); + } +} + +bool wxComboCtrlBase::AnimateShow( const wxRect& WXUNUSED(rect), int WXUNUSED(flags) ) +{ + return true; +} + +void wxComboCtrlBase::DoShowPopup( const wxRect& rect, int WXUNUSED(flags) ) +{ + wxWindow* winPopup = m_winPopup; + + if ( IsPopupWindowState(Animating) ) + { + // Make sure the popup window is shown in the right position. + // Should not matter even if animation already did this. + + // Some platforms (GTK) may like SetSize and Move to be separate + // (though the bug was probably fixed). + winPopup->SetSize( rect ); + +#if USES_WXPOPUPTRANSIENTWINDOW + if ( m_popupWinType == POPUPWIN_WXPOPUPTRANSIENTWINDOW ) + ((wxPopupTransientWindow*)winPopup)->Popup(m_popup); + else +#endif + winPopup->Show(); + + m_popupWinState = Visible; + + // If popup window was a generic top-level window, or the + // wxPopupWindow implemenation on this platform is classified as + // perfect, then we should be able to safely set focus to the popup + // control. + if ( IsPopupWinTypePerfect(m_popupWinType) ) + m_popup->SetFocus(); + } + else if ( IsPopupWindowState(Hidden) ) + { + // Animation was aborted + + wxASSERT( !winPopup->IsShown() ); + + m_popupWinState = Hidden; + } + + Refresh(); +} + +void wxComboCtrlBase::OnPopupDismiss(bool generateEvent) +{ + // Just in case, avoid double dismiss + if ( IsPopupWindowState(Hidden) ) + return; + + // This must be set before focus - otherwise there will be recursive + // OnPopupDismisses. + m_popupWinState = Hidden; + + //SetFocus(); + m_winPopup->Disable(); + + // Inform popup control itself + m_popupInterface->OnDismiss(); + + if ( m_popupEvtHandler ) + ((wxComboPopupEvtHandler*)m_popupEvtHandler)->OnPopupDismiss(); + +#if INSTALL_TOPLEV_HANDLER + // Remove top level window event handler + if ( m_toplevEvtHandler ) + { + wxWindow* toplev = ::wxGetTopLevelParent( this ); + if ( toplev ) + toplev->RemoveEventHandler( m_toplevEvtHandler ); + } +#endif + + m_timeCanAcceptClick = ::wxGetLocalTimeMillis(); + + if ( m_popupWinType == POPUPWIN_WXPOPUPTRANSIENTWINDOW ) + m_timeCanAcceptClick += 150; + + // If cursor not on dropdown button, then clear its state + // (technically not required by all ports, but do it for all just in case) + if ( !m_btnArea.Contains(ScreenToClient(::wxGetMousePosition())) ) + m_btnState = 0; + + // Return parent's tab traversal flag. + // See ShowPopup for notes. + if ( m_iFlags & wxCC_IFLAG_PARENT_TAB_TRAVERSAL ) + { + wxWindow* parent = GetParent(); + parent->SetWindowStyle( parent->GetWindowStyle() | wxTAB_TRAVERSAL ); + m_iFlags &= ~(wxCC_IFLAG_PARENT_TAB_TRAVERSAL); + } + + // refresh control (necessary even if m_text) + Refresh(); + + SetFocus(); + + if ( generateEvent ) + { + wxCommandEvent event(wxEVT_COMBOBOX_CLOSEUP, GetId()); + event.SetEventObject(this); + HandleWindowEvent(event); + } +} + +void wxComboCtrlBase::HidePopup(bool generateEvent) +{ + // Should be able to call this without popup interface + if ( IsPopupWindowState(Hidden) ) + return; + + // transfer value and show it in textctrl, if any + if ( !IsPopupWindowState(Animating) ) + SetValueByUser( m_popupInterface->GetStringValue() ); + + m_winPopup->Hide(); + + OnPopupDismiss(generateEvent); +} + +// ---------------------------------------------------------------------------- +// customization methods +// ---------------------------------------------------------------------------- + +void wxComboCtrlBase::SetButtonPosition( int width, int height, + int side, int spacingX ) +{ + m_btnWid = width; + m_btnHei = height; + m_btnSide = side; + m_btnSpacingX = spacingX; + + if ( width > 0 || height > 0 || spacingX ) + m_iFlags |= wxCC_IFLAG_HAS_NONSTANDARD_BUTTON; + + RecalcAndRefresh(); +} + +wxSize wxComboCtrlBase::GetButtonSize() +{ + if ( m_btnSize.x > 0 ) + return m_btnSize; + + wxSize retSize(m_btnWid,m_btnHei); + + // Need to call CalculateAreas now if button size is + // is not explicitly specified. + if ( retSize.x <= 0 || retSize.y <= 0) + { + OnResize(); + + retSize = m_btnSize; + } + + return retSize; +} + +void wxComboCtrlBase::SetButtonBitmaps( const wxBitmap& bmpNormal, + bool blankButtonBg, + const wxBitmap& bmpPressed, + const wxBitmap& bmpHover, + const wxBitmap& bmpDisabled ) +{ + m_bmpNormal = bmpNormal; + m_blankButtonBg = blankButtonBg; + + if ( bmpPressed.IsOk() ) + m_bmpPressed = bmpPressed; + else + m_bmpPressed = bmpNormal; + + if ( bmpHover.IsOk() ) + m_bmpHover = bmpHover; + else + m_bmpHover = bmpNormal; + + if ( bmpDisabled.IsOk() ) + m_bmpDisabled = bmpDisabled; + else + m_bmpDisabled = bmpNormal; + + RecalcAndRefresh(); +} + +void wxComboCtrlBase::SetCustomPaintWidth( int width ) +{ + if ( m_text ) + { + // move textctrl accordingly + wxRect r = m_text->GetRect(); + int inc = width - m_widthCustomPaint; + r.x += inc; + r.width -= inc; + m_text->SetSize( r ); + } + + m_widthCustomPaint = width; + + RecalcAndRefresh(); +} + +bool wxComboCtrlBase::DoSetMargins(const wxPoint& margins) +{ + // For general sanity's sake, we ignore top margin. Instead + // we will always try to center the text vertically. + bool res = true; + + if ( margins.x != -1 ) + { + m_marginLeft = margins.x; + m_iFlags |= wxCC_IFLAG_LEFT_MARGIN_SET; + } + else + { + m_marginLeft = GetNativeTextIndent(); + m_iFlags &= ~(wxCC_IFLAG_LEFT_MARGIN_SET); + } + + if ( margins.y != -1 ) + { + res = false; + } + + RecalcAndRefresh(); + + return res; +} + +wxPoint wxComboCtrlBase::DoGetMargins() const +{ + return wxPoint(m_marginLeft, -1); +} + +#if WXWIN_COMPATIBILITY_2_8 +void wxComboCtrlBase::SetTextIndent( int indent ) +{ + if ( indent < 0 ) + { + m_marginLeft = GetNativeTextIndent(); + m_iFlags &= ~(wxCC_IFLAG_LEFT_MARGIN_SET); + } + else + { + m_marginLeft = indent; + m_iFlags |= wxCC_IFLAG_LEFT_MARGIN_SET; + } + + RecalcAndRefresh(); +} + +wxCoord wxComboCtrlBase::GetTextIndent() const +{ + return m_marginLeft; +} +#endif + +wxCoord wxComboCtrlBase::GetNativeTextIndent() const +{ + return DEFAULT_TEXT_INDENT; +} + +void wxComboCtrlBase::SetTextCtrlStyle( int style ) +{ + m_textCtrlStyle = style; + + if ( m_text ) + m_text->SetWindowStyle(style); +} + +// ---------------------------------------------------------------------------- +// wxTextEntry interface +// ---------------------------------------------------------------------------- + +wxString wxComboCtrlBase::DoGetValue() const +{ + if ( m_text ) + return m_text->GetValue(); + return m_valueString; +} + +void wxComboCtrlBase::SetValueWithEvent(const wxString& value, + bool withEvent) +{ + DoSetValue(value, withEvent ? SetValue_SendEvent : 0); +} + +void wxComboCtrlBase::OnSetValue(const wxString& value) +{ + // Note: before wxComboCtrl inherited from wxTextEntry, + // this code used to be in SetValueWithEvent(). + + // Since wxComboPopup may want to paint the combo as well, we need + // to set the string value here (as well as sometimes in ShowPopup). + if ( m_valueString != value ) + { + bool found = true; + wxString trueValue = value; + + // Conform to wxComboBox behaviour: read-only control can only accept + // valid list items and empty string + if ( m_popupInterface && HasFlag(wxCB_READONLY) && value.length() ) + { + found = m_popupInterface->FindItem(value, + &trueValue); + } + + if ( found ) + { + m_valueString = trueValue; + + EnsurePopupControl(); + + if ( m_popupInterface ) + m_popupInterface->SetStringValue(trueValue); + } + } + + Refresh(); +} + +void wxComboCtrlBase::SetValueByUser(const wxString& value) +{ + // NB: Order of function calls is important here. Otherwise + // the SelectAll() may not work. + + if ( m_text ) + { + m_text->SetValue(value); + + if ( !(m_iFlags & wxCC_NO_TEXT_AUTO_SELECT) ) + m_text->SelectAll(); + } + + OnSetValue(value); +} + +// In this SetValue variant wxComboPopup::SetStringValue is not called +void wxComboCtrlBase::SetText(const wxString& value) +{ + // Unlike in SetValue(), this must be called here or + // the behaviour will no be consistent in readonlys. + EnsurePopupControl(); + + m_valueString = value; + + if ( m_text ) + { + m_ignoreEvtText++; + m_text->SetValue( value ); + } + + Refresh(); +} + +void wxComboCtrlBase::Copy() +{ + if ( m_text ) + m_text->Copy(); +} + +void wxComboCtrlBase::Cut() +{ + if ( m_text ) + m_text->Cut(); +} + +void wxComboCtrlBase::Paste() +{ + if ( m_text ) + m_text->Paste(); +} + +void wxComboCtrlBase::SetInsertionPoint(long pos) +{ + if ( m_text ) + m_text->SetInsertionPoint(pos); +} + +long wxComboCtrlBase::GetInsertionPoint() const +{ + if ( m_text ) + return m_text->GetInsertionPoint(); + + return 0; +} + +long wxComboCtrlBase::GetLastPosition() const +{ + if ( m_text ) + return m_text->GetLastPosition(); + + return 0; +} + +void wxComboCtrlBase::WriteText(const wxString& text) +{ + if ( m_text ) + { + m_text->WriteText(text); + OnSetValue(m_text->GetValue()); + } + else + { + OnSetValue(text); + } +} + +void wxComboCtrlBase::DoSetValue(const wxString& value, int flags) +{ + if ( m_text ) + { + if ( flags & SetValue_SendEvent ) + m_text->SetValue(value); + else + m_text->ChangeValue(value); + } + + OnSetValue(value); +} + +void wxComboCtrlBase::Replace(long from, long to, const wxString& value) +{ + if ( m_text ) + { + m_text->Replace(from, to, value); + OnSetValue(m_text->GetValue()); + } +} + +void wxComboCtrlBase::Remove(long from, long to) +{ + if ( m_text ) + { + m_text->Remove(from, to); + OnSetValue(m_text->GetValue()); + } +} + +void wxComboCtrlBase::SetSelection(long from, long to) +{ + if ( m_text ) + m_text->SetSelection(from, to); +} + +void wxComboCtrlBase::GetSelection(long *from, long *to) const +{ + if ( m_text ) + { + m_text->GetSelection(from, to); + } + else + { + *from = 0; + *to = 0; + } +} + +bool wxComboCtrlBase::IsEditable() const +{ + if ( m_text ) + return m_text->IsEditable(); + return false; +} + +void wxComboCtrlBase::SetEditable(bool editable) +{ + if ( m_text ) + m_text->SetEditable(editable); +} + +void wxComboCtrlBase::Undo() +{ + if ( m_text ) + m_text->Undo(); +} + +void wxComboCtrlBase::Redo() +{ + if ( m_text ) + m_text->Redo(); +} + +bool wxComboCtrlBase::CanUndo() const +{ + if ( m_text ) + return m_text->CanUndo(); + + return false; +} + +bool wxComboCtrlBase::CanRedo() const +{ + if ( m_text ) + return m_text->CanRedo(); + + return false; +} + +bool wxComboCtrlBase::SetHint(const wxString& hint) +{ + m_hintText = hint; + bool res = true; + if ( m_text ) + res = m_text->SetHint(hint); + Refresh(); + return res; +} + +wxString wxComboCtrlBase::GetHint() const +{ + return m_hintText; +} + +#endif // wxUSE_COMBOCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/config.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/config.cpp new file mode 100644 index 0000000000..852dd13f17 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/config.cpp @@ -0,0 +1,547 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/config.cpp +// Purpose: implementation of wxConfigBase class +// Author: Vadim Zeitlin +// Modified by: +// Created: 07.04.98 +// Copyright: (c) 1997 Karsten Ballueder Ballueder@usa.net +// Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif //__BORLANDC__ + +#ifndef wxUSE_CONFIG_NATIVE + #define wxUSE_CONFIG_NATIVE 1 +#endif + +#include "wx/config.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/arrstr.h" + #include "wx/math.h" +#endif //WX_PRECOMP + +#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE) + +#include "wx/apptrait.h" +#include "wx/file.h" + +#include +#include +#include // for INT_MAX +#include // for FLT_MAX + +// ---------------------------------------------------------------------------- +// global and class static variables +// ---------------------------------------------------------------------------- + +wxConfigBase *wxConfigBase::ms_pConfig = NULL; +bool wxConfigBase::ms_bAutoCreate = true; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxAppTraitsBase +// ---------------------------------------------------------------------------- + +wxConfigBase *wxAppTraitsBase::CreateConfig() +{ + return new + #if defined(__WINDOWS__) && wxUSE_CONFIG_NATIVE + wxRegConfig(wxTheApp->GetAppName(), wxTheApp->GetVendorName()); + #else // either we're under Unix or wish to use files even under Windows + wxFileConfig(wxTheApp->GetAppName()); + #endif +} + +// ---------------------------------------------------------------------------- +// wxConfigBase +// ---------------------------------------------------------------------------- +IMPLEMENT_ABSTRACT_CLASS(wxConfigBase, wxObject) + +// Not all args will always be used by derived classes, but including them all +// in each class ensures compatibility. +wxConfigBase::wxConfigBase(const wxString& appName, + const wxString& vendorName, + const wxString& WXUNUSED(localFilename), + const wxString& WXUNUSED(globalFilename), + long style) + : m_appName(appName), m_vendorName(vendorName), m_style(style) +{ + m_bExpandEnvVars = true; + m_bRecordDefaults = false; +} + +wxConfigBase::~wxConfigBase() +{ + // required here for Darwin +} + +wxConfigBase *wxConfigBase::Set(wxConfigBase *pConfig) +{ + wxConfigBase *pOld = ms_pConfig; + ms_pConfig = pConfig; + return pOld; +} + +wxConfigBase *wxConfigBase::Create() +{ + if ( ms_bAutoCreate && ms_pConfig == NULL ) { + wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + wxCHECK_MSG( traits, NULL, wxT("create wxApp before calling this") ); + + ms_pConfig = traits->CreateConfig(); + } + + return ms_pConfig; +} + +// ---------------------------------------------------------------------------- +// wxConfigBase reading entries +// ---------------------------------------------------------------------------- + +// implement both Read() overloads for the given type in terms of DoRead() +#define IMPLEMENT_READ_FOR_TYPE(name, type, deftype, extra) \ + bool wxConfigBase::Read(const wxString& key, type *val) const \ + { \ + wxCHECK_MSG( val, false, wxT("wxConfig::Read(): NULL parameter") ); \ + \ + if ( !DoRead##name(key, val) ) \ + return false; \ + \ + *val = extra(*val); \ + \ + return true; \ + } \ + \ + bool wxConfigBase::Read(const wxString& key, \ + type *val, \ + deftype defVal) const \ + { \ + wxCHECK_MSG( val, false, wxT("wxConfig::Read(): NULL parameter") ); \ + \ + bool read = DoRead##name(key, val); \ + if ( !read ) \ + { \ + if ( IsRecordingDefaults() ) \ + { \ + ((wxConfigBase *)this)->DoWrite##name(key, defVal); \ + } \ + \ + *val = defVal; \ + } \ + \ + *val = extra(*val); \ + \ + return read; \ + } + + +IMPLEMENT_READ_FOR_TYPE(String, wxString, const wxString&, ExpandEnvVars) +IMPLEMENT_READ_FOR_TYPE(Long, long, long, long) +IMPLEMENT_READ_FOR_TYPE(Double, double, double, double) +IMPLEMENT_READ_FOR_TYPE(Bool, bool, bool, bool) + +#undef IMPLEMENT_READ_FOR_TYPE + +// int is stored as long +bool wxConfigBase::Read(const wxString& key, int *pi) const +{ + long l = *pi; + bool r = Read(key, &l); + wxASSERT_MSG( l < INT_MAX, wxT("int overflow in wxConfig::Read") ); + *pi = (int)l; + return r; +} + +bool wxConfigBase::Read(const wxString& key, int *pi, int defVal) const +{ + long l = *pi; + bool r = Read(key, &l, defVal); + wxASSERT_MSG( l < INT_MAX, wxT("int overflow in wxConfig::Read") ); + *pi = (int)l; + return r; +} + +// Read floats as doubles then just type cast it down. +bool wxConfigBase::Read(const wxString& key, float* val) const +{ + wxCHECK_MSG( val, false, wxT("wxConfig::Read(): NULL parameter") ); + + double temp; + if ( !Read(key, &temp) ) + return false; + + wxCHECK_MSG( fabs(temp) <= FLT_MAX, false, + wxT("float overflow in wxConfig::Read") ); + wxCHECK_MSG( (temp == 0.0) || (fabs(temp) >= FLT_MIN), false, + wxT("float underflow in wxConfig::Read") ); + + *val = static_cast(temp); + + return true; +} + +bool wxConfigBase::Read(const wxString& key, float* val, float defVal) const +{ + wxCHECK_MSG( val, false, wxT("wxConfig::Read(): NULL parameter") ); + + if ( Read(key, val) ) + return true; + + *val = defVal; + return false; +} + +// the DoReadXXX() for the other types have implementation in the base class +// but can be overridden in the derived ones +bool wxConfigBase::DoReadBool(const wxString& key, bool* val) const +{ + wxCHECK_MSG( val, false, wxT("wxConfig::Read(): NULL parameter") ); + + long l; + if ( !DoReadLong(key, &l) ) + return false; + + if ( l != 0 && l != 1 ) + { + // Don't assert here as this could happen in the result of user editing + // the file directly and this not indicate a bug in the program but + // still complain that something is wrong. + wxLogWarning(_("Invalid value %ld for a boolean key \"%s\" in " + "config file."), + l, key); + } + + *val = l != 0; + + return true; +} + +bool wxConfigBase::DoReadDouble(const wxString& key, double* val) const +{ + wxString str; + if ( Read(key, &str) ) + { + if ( str.ToCDouble(val) ) + return true; + + // Previous versions of wxFileConfig wrote the numbers out using the + // current locale and not the C one as now, so attempt to parse the + // string as a number in the current locale too, for compatibility. + if ( str.ToDouble(val) ) + return true; + } + + return false; +} + +// string reading helper +wxString wxConfigBase::ExpandEnvVars(const wxString& str) const +{ + wxString tmp; // Required for BC++ + if (IsExpandingEnvVars()) + tmp = wxExpandEnvVars(str); + else + tmp = str; + return tmp; +} + +// ---------------------------------------------------------------------------- +// wxConfigBase writing +// ---------------------------------------------------------------------------- + +bool wxConfigBase::DoWriteDouble(const wxString& key, double val) +{ + // Notice that we always write out the numbers in C locale and not the + // current one. This makes the config files portable between machines using + // different locales. + return DoWriteString(key, wxString::FromCDouble(val)); +} + +bool wxConfigBase::DoWriteBool(const wxString& key, bool value) +{ + return DoWriteLong(key, value ? 1l : 0l); +} + +// ---------------------------------------------------------------------------- +// wxConfigPathChanger +// ---------------------------------------------------------------------------- + +wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer, + const wxString& strEntry) +{ + m_bChanged = false; + m_pContainer = const_cast(pContainer); + + // the path is everything which precedes the last slash and the name is + // everything after it -- and this works correctly if there is no slash too + wxString strPath = strEntry.BeforeLast(wxCONFIG_PATH_SEPARATOR, &m_strName); + + // except in the special case of "/keyname" when there is nothing before "/" + if ( strPath.empty() && + ((!strEntry.empty()) && strEntry[0] == wxCONFIG_PATH_SEPARATOR) ) + { + strPath = wxCONFIG_PATH_SEPARATOR; + } + + if ( !strPath.empty() ) + { + if ( m_pContainer->GetPath() != strPath ) + { + // we do change the path so restore it later + m_bChanged = true; + + /* JACS: work around a memory bug that causes an assert + when using wxRegConfig, related to reference-counting. + Can be reproduced by removing .wc_str() below and + adding the following code to the config sample OnInit under + Windows: + + pConfig->SetPath(wxT("MySettings")); + pConfig->SetPath(wxT("..")); + int value; + pConfig->Read(wxT("MainWindowX"), & value); + */ + m_strOldPath = m_pContainer->GetPath().wc_str(); + if ( *m_strOldPath.c_str() != wxCONFIG_PATH_SEPARATOR ) + m_strOldPath += wxCONFIG_PATH_SEPARATOR; + m_pContainer->SetPath(strPath); + } + } +} + +void wxConfigPathChanger::UpdateIfDeleted() +{ + // we don't have to do anything at all if we didn't change the path + if ( !m_bChanged ) + return; + + // find the deepest still existing parent path of the original path + while ( !m_pContainer->HasGroup(m_strOldPath) ) + { + m_strOldPath = m_strOldPath.BeforeLast(wxCONFIG_PATH_SEPARATOR); + if ( m_strOldPath.empty() ) + m_strOldPath = wxCONFIG_PATH_SEPARATOR; + } +} + +wxConfigPathChanger::~wxConfigPathChanger() +{ + // only restore path if it was changed + if ( m_bChanged ) { + m_pContainer->SetPath(m_strOldPath); + } +} + +// this is a wxConfig method but it's mainly used with wxConfigPathChanger +/* static */ +wxString wxConfigBase::RemoveTrailingSeparator(const wxString& key) +{ + wxString path(key); + + // don't remove the only separator from a root group path! + while ( path.length() > 1 ) + { + if ( *path.rbegin() != wxCONFIG_PATH_SEPARATOR ) + break; + + path.erase(path.end() - 1); + } + + return path; +} + +#endif // wxUSE_CONFIG + +// ---------------------------------------------------------------------------- +// static & global functions +// ---------------------------------------------------------------------------- + +// understands both Unix and Windows (but only under Windows) environment +// variables expansion: i.e. $var, $(var) and ${var} are always understood +// and in addition under Windows %var% is also. + +// don't change the values the enum elements: they must be equal +// to the matching [closing] delimiter. +enum Bracket +{ + Bracket_None, + Bracket_Normal = ')', + Bracket_Curly = '}', +#ifdef __WINDOWS__ + Bracket_Windows = '%', // yeah, Windows people are a bit strange ;-) +#endif + Bracket_Max +}; + +wxString wxExpandEnvVars(const wxString& str) +{ + wxString strResult; + strResult.Alloc(str.length()); + + size_t m; + for ( size_t n = 0; n < str.length(); n++ ) { + switch ( str[n].GetValue() ) { +#ifdef __WINDOWS__ + case wxT('%'): +#endif // __WINDOWS__ + case wxT('$'): + { + Bracket bracket; + #ifdef __WINDOWS__ + if ( str[n] == wxT('%') ) + bracket = Bracket_Windows; + else + #endif // __WINDOWS__ + if ( n == str.length() - 1 ) { + bracket = Bracket_None; + } + else { + switch ( str[n + 1].GetValue() ) { + case wxT('('): + bracket = Bracket_Normal; + n++; // skip the bracket + break; + + case wxT('{'): + bracket = Bracket_Curly; + n++; // skip the bracket + break; + + default: + bracket = Bracket_None; + } + } + + m = n + 1; + + while ( m < str.length() && (wxIsalnum(str[m]) || str[m] == wxT('_')) ) + m++; + + wxString strVarName(str.c_str() + n + 1, m - n - 1); + +#ifdef __WXWINCE__ + const bool expanded = false; +#else + // NB: use wxGetEnv instead of wxGetenv as otherwise variables + // set through wxSetEnv may not be read correctly! + bool expanded = false; + wxString tmp; + if (wxGetEnv(strVarName, &tmp)) + { + strResult += tmp; + expanded = true; + } + else +#endif + { + // variable doesn't exist => don't change anything + #ifdef __WINDOWS__ + if ( bracket != Bracket_Windows ) + #endif + if ( bracket != Bracket_None ) + strResult << str[n - 1]; + strResult << str[n] << strVarName; + } + + // check the closing bracket + if ( bracket != Bracket_None ) { + if ( m == str.length() || str[m] != (wxChar)bracket ) { + // under MSW it's common to have '%' characters in the registry + // and it's annoying to have warnings about them each time, so + // ignroe them silently if they are not used for env vars + // + // under Unix, OTOH, this warning could be useful for the user to + // understand why isn't the variable expanded as intended + #ifndef __WINDOWS__ + wxLogWarning(_("Environment variables expansion failed: missing '%c' at position %u in '%s'."), + (char)bracket, (unsigned int) (m + 1), str.c_str()); + #endif // __WINDOWS__ + } + else { + // skip closing bracket unless the variables wasn't expanded + if ( !expanded ) + strResult << (wxChar)bracket; + m++; + } + } + + n = m - 1; // skip variable name + } + break; + + case wxT('\\'): + // backslash can be used to suppress special meaning of % and $ + if ( n != str.length() - 1 && + (str[n + 1] == wxT('%') || str[n + 1] == wxT('$')) ) { + strResult += str[++n]; + + break; + } + //else: fall through + + default: + strResult += str[n]; + } + } + + return strResult; +} + +// this function is used to properly interpret '..' in path +void wxSplitPath(wxArrayString& aParts, const wxString& path) +{ + aParts.clear(); + + wxString strCurrent; + wxString::const_iterator pc = path.begin(); + for ( ;; ) { + if ( pc == path.end() || *pc == wxCONFIG_PATH_SEPARATOR ) { + if ( strCurrent == wxT(".") ) { + // ignore + } + else if ( strCurrent == wxT("..") ) { + // go up one level + if ( aParts.size() == 0 ) + { + wxLogWarning(_("'%s' has extra '..', ignored."), path); + } + else + { + aParts.erase(aParts.end() - 1); + } + + strCurrent.Empty(); + } + else if ( !strCurrent.empty() ) { + aParts.push_back(strCurrent); + strCurrent.Empty(); + } + //else: + // could log an error here, but we prefer to ignore extra '/' + + if ( pc == path.end() ) + break; + } + else + strCurrent += *pc; + + ++pc; + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/containr.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/containr.cpp new file mode 100644 index 0000000000..50bbd6aefa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/containr.cpp @@ -0,0 +1,758 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/containr.cpp +// Purpose: implementation of wxControlContainer +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.08.01 +// Copyright: (c) 2001 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/containr.h" +#endif + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/event.h" + #include "wx/window.h" + #include "wx/scrolbar.h" + #include "wx/radiobut.h" +#endif //WX_PRECOMP + +// trace mask for focus messages +#define TRACE_FOCUS wxT("focus") + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxControlContainerBase +// ---------------------------------------------------------------------------- + +void wxControlContainerBase::UpdateParentCanFocus() +{ + // In the ports where it does something non trivial, the parent window + // should only be focusable if it doesn't have any focusable children + // (e.g. native focus handling in wxGTK totally breaks down otherwise). + m_winParent->SetCanFocus(m_acceptsFocusSelf && !m_acceptsFocusChildren); +} + +bool wxControlContainerBase::UpdateCanFocusChildren() +{ + const bool acceptsFocusChildren = HasAnyFocusableChildren(); + if ( acceptsFocusChildren != m_acceptsFocusChildren ) + { + m_acceptsFocusChildren = acceptsFocusChildren; + + UpdateParentCanFocus(); + } + + return m_acceptsFocusChildren; +} + +bool wxControlContainerBase::HasAnyFocusableChildren() const +{ + const wxWindowList& children = m_winParent->GetChildren(); + for ( wxWindowList::const_iterator i = children.begin(), + end = children.end(); + i != end; + ++i ) + { + const wxWindow * const child = *i; + + if ( !m_winParent->IsClientAreaChild(child) ) + continue; + + // Here we check whether the child can accept the focus at all, as we + // want to try focusing it later even if it can't accept it right now. + if ( child->AcceptsFocusRecursively() ) + return true; + } + + return false; +} + +bool wxControlContainerBase::HasAnyChildrenAcceptingFocus() const +{ + const wxWindowList& children = m_winParent->GetChildren(); + for ( wxWindowList::const_iterator i = children.begin(), + end = children.end(); + i != end; + ++i ) + { + const wxWindow * const child = *i; + + if ( !m_winParent->IsClientAreaChild(child) ) + continue; + + // Here we check if the child accepts focus right now as we need to + // know if we can give the focus to it or not. + if ( child->CanAcceptFocus() ) + return true; + } + + return false; +} + +bool wxControlContainerBase::DoSetFocus() +{ + wxLogTrace(TRACE_FOCUS, wxT("SetFocus on wxPanel 0x%p."), + m_winParent->GetHandle()); + + if (m_inSetFocus) + return true; + + // when the panel gets the focus we move the focus to either the last + // window that had the focus or the first one that can get it unless the + // focus had been already set to some other child + + wxWindow *win = wxWindow::FindFocus(); + while ( win ) + { + if ( win == m_winParent ) + { + // our child already has focus, don't take it away from it + return true; + } + + if ( win->IsTopLevel() ) + { + // don't look beyond the first top level parent - useless and + // unnecessary + break; + } + + win = win->GetParent(); + } + + // protect against infinite recursion: + m_inSetFocus = true; + + bool ret = SetFocusToChild(); + + m_inSetFocus = false; + + return ret; +} + +bool wxControlContainerBase::AcceptsFocus() const +{ + return m_acceptsFocusSelf && m_winParent->CanBeFocused(); +} + +bool wxControlContainerBase::SetFocusToChild() +{ + return wxSetFocusToChild(m_winParent, &m_winLastFocused); +} + +#ifndef wxHAS_NATIVE_TAB_TRAVERSAL + +// ---------------------------------------------------------------------------- +// generic wxControlContainer +// ---------------------------------------------------------------------------- + +wxControlContainer::wxControlContainer() +{ + m_winLastFocused = NULL; +} + +void wxControlContainer::SetLastFocus(wxWindow *win) +{ + // the panel itself should never get the focus at all but if it does happen + // temporarily (as it seems to do under wxGTK), at the very least don't + // forget our previous m_winLastFocused + if ( win != m_winParent ) + { + // if we're setting the focus + if ( win ) + { + // find the last _immediate_ child which got focus + wxWindow *winParent = win; + while ( winParent != m_winParent ) + { + win = winParent; + winParent = win->GetParent(); + + // Yes, this can happen, though in a totally pathological case. + // like when detaching a menubar from a frame with a child + // which has pushed itself as an event handler for the menubar. + // (under wxGTK) + + wxASSERT_MSG( winParent, + wxT("Setting last focus for a window that is not our child?") ); + } + } + + m_winLastFocused = win; + + if ( win ) + { + wxLogTrace(TRACE_FOCUS, wxT("Set last focus to %s(%s)"), + win->GetClassInfo()->GetClassName(), + win->GetLabel().c_str()); + } + else + { + wxLogTrace(TRACE_FOCUS, wxT("No more last focus")); + } + } +} + +// -------------------------------------------------------------------- +// The following four functions are used to find other radio buttons +// within the same group. Used by wxSetFocusToChild on wxMSW +// -------------------------------------------------------------------- + +#if wxUSE_RADIOBTN + +wxRadioButton* wxGetPreviousButtonInGroup(wxRadioButton *btn) +{ + if ( btn->HasFlag(wxRB_GROUP) || btn->HasFlag(wxRB_SINGLE) ) + return NULL; + + const wxWindowList& siblings = btn->GetParent()->GetChildren(); + wxWindowList::compatibility_iterator nodeThis = siblings.Find(btn); + wxCHECK_MSG( nodeThis, NULL, wxT("radio button not a child of its parent?") ); + + // Iterate over all previous siblings until we find the next radio button + wxWindowList::compatibility_iterator nodeBefore = nodeThis->GetPrevious(); + wxRadioButton *prevBtn = 0; + while (nodeBefore) + { + prevBtn = wxDynamicCast(nodeBefore->GetData(), wxRadioButton); + if (prevBtn) + break; + + nodeBefore = nodeBefore->GetPrevious(); + } + + if (!prevBtn || prevBtn->HasFlag(wxRB_SINGLE)) + { + // no more buttons in group + return NULL; + } + + return prevBtn; +} + +wxRadioButton* wxGetNextButtonInGroup(wxRadioButton *btn) +{ + if (btn->HasFlag(wxRB_SINGLE)) + return NULL; + + const wxWindowList& siblings = btn->GetParent()->GetChildren(); + wxWindowList::compatibility_iterator nodeThis = siblings.Find(btn); + wxCHECK_MSG( nodeThis, NULL, wxT("radio button not a child of its parent?") ); + + // Iterate over all previous siblings until we find the next radio button + wxWindowList::compatibility_iterator nodeNext = nodeThis->GetNext(); + wxRadioButton *nextBtn = 0; + while (nodeNext) + { + nextBtn = wxDynamicCast(nodeNext->GetData(), wxRadioButton); + if (nextBtn) + break; + + nodeNext = nodeNext->GetNext(); + } + + if ( !nextBtn || nextBtn->HasFlag(wxRB_GROUP) || nextBtn->HasFlag(wxRB_SINGLE) ) + { + // no more buttons or the first button of the next group + return NULL; + } + + return nextBtn; +} + +wxRadioButton* wxGetFirstButtonInGroup(wxRadioButton *btn) +{ + while (true) + { + wxRadioButton* prevBtn = wxGetPreviousButtonInGroup(btn); + if (!prevBtn) + return btn; + + btn = prevBtn; + } +} + +wxRadioButton* wxGetLastButtonInGroup(wxRadioButton *btn) +{ + while (true) + { + wxRadioButton* nextBtn = wxGetNextButtonInGroup(btn); + if (!nextBtn) + return btn; + + btn = nextBtn; + } +} + +wxRadioButton* wxGetSelectedButtonInGroup(wxRadioButton *btn) +{ + // Find currently selected button + if (btn->GetValue()) + return btn; + + if (btn->HasFlag(wxRB_SINGLE)) + return NULL; + + wxRadioButton *selBtn; + + // First check all previous buttons + for (selBtn = wxGetPreviousButtonInGroup(btn); selBtn; selBtn = wxGetPreviousButtonInGroup(selBtn)) + if (selBtn->GetValue()) + return selBtn; + + // Now all following buttons + for (selBtn = wxGetNextButtonInGroup(btn); selBtn; selBtn = wxGetNextButtonInGroup(selBtn)) + if (selBtn->GetValue()) + return selBtn; + + return NULL; +} + +#endif // __WXMSW__ + +// ---------------------------------------------------------------------------- +// Keyboard handling - this is the place where the TAB traversal logic is +// implemented. As this code is common to all ports, this ensures consistent +// behaviour even if we don't specify how exactly the wxNavigationKeyEvent are +// generated and this is done in platform specific code which also ensures that +// we can follow the given platform standards. +// ---------------------------------------------------------------------------- + +void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event ) +{ + // for a TLW we shouldn't involve the parent window, it has nothing to do + // with keyboard navigation inside this TLW + wxWindow *parent = m_winParent->IsTopLevel() ? NULL + : m_winParent->GetParent(); + + // the event is propagated downwards if the event emitter was our parent + bool goingDown = event.GetEventObject() == parent; + + const wxWindowList& children = m_winParent->GetChildren(); + + // if we have exactly one notebook-like child window (actually it could be + // any window that returns true from its HasMultiplePages()), then + // [Shift-]Ctrl-Tab and Ctrl-PageUp/Down keys should iterate over its pages + // even if the focus is outside of the control because this is how the + // standard MSW properties dialogs behave and we do it under other platforms + // as well because it seems like a good idea -- but we can always put this + // block inside "#ifdef __WXMSW__" if it's not suitable there + if ( event.IsWindowChange() && !goingDown ) + { + // check if we have a unique notebook-like child + wxWindow *bookctrl = NULL; + for ( wxWindowList::const_iterator i = children.begin(), + end = children.end(); + i != end; + ++i ) + { + wxWindow * const window = *i; + if ( window->HasMultiplePages() ) + { + if ( bookctrl ) + { + // this is the second book-like control already so don't do + // anything as we don't know which one should have its page + // changed + bookctrl = NULL; + break; + } + + bookctrl = window; + } + } + + if ( bookctrl ) + { + // make sure that we don't bubble up the event again from the book + // control resulting in infinite recursion + wxNavigationKeyEvent eventCopy(event); + eventCopy.SetEventObject(m_winParent); + if ( bookctrl->GetEventHandler()->ProcessEvent(eventCopy) ) + return; + } + } + + // there is not much to do if we don't have children and we're not + // interested in "notebook page change" events here + if ( !children.GetCount() || event.IsWindowChange() ) + { + // let the parent process it unless it already comes from our parent + // of we don't have any + if ( goingDown || + !parent || !parent->GetEventHandler()->ProcessEvent(event) ) + { + event.Skip(); + } + + return; + } + + // where are we going? + const bool forward = event.GetDirection(); + + // the node of the children list from which we should start looking for the + // next acceptable child + wxWindowList::compatibility_iterator node, start_node; + + // we should start from the first/last control and not from the one which + // had focus the last time if we're propagating the event downwards because + // for our parent we look like a single control + if ( goingDown ) + { + // just to be sure it's not used (normally this is not necessary, but + // doesn't hurt neither) + m_winLastFocused = NULL; + + // start from first or last depending on where we're going + node = forward ? children.GetFirst() : children.GetLast(); + } + else // going up + { + // try to find the child which has the focus currently + + // the event emitter might have done this for us + wxWindow *winFocus = event.GetCurrentFocus(); + + // but if not, we might know where the focus was ourselves + if (!winFocus) + winFocus = m_winLastFocused; + + // if still no luck, do it the hard way + if (!winFocus) + winFocus = wxWindow::FindFocus(); + + if ( winFocus ) + { +#if defined(__WXMSW__) && wxUSE_RADIOBTN + // If we are in a radio button group, start from the first item in the + // group + if ( event.IsFromTab() && wxIsKindOf(winFocus, wxRadioButton ) ) + winFocus = wxGetFirstButtonInGroup((wxRadioButton*)winFocus); +#endif // __WXMSW__ + // ok, we found the focus - now is it our child? + start_node = children.Find( winFocus ); + } + + if ( !start_node && m_winLastFocused ) + { + // window which has focus isn't our child, fall back to the one + // which had the focus the last time + start_node = children.Find( m_winLastFocused ); + } + + // if we still didn't find anything, we should start with the first one + if ( !start_node ) + { + start_node = children.GetFirst(); + } + + // and the first child which we can try setting focus to is the next or + // the previous one + node = forward ? start_node->GetNext() : start_node->GetPrevious(); + } + + // we want to cycle over all elements passing by NULL + for ( ;; ) + { + // don't go into infinite loop + if ( start_node && node && node == start_node ) + break; + + // Have we come to the last or first item on the panel? + if ( !node ) + { + if ( !start_node ) + { + // exit now as otherwise we'd loop forever + break; + } + + if ( !goingDown ) + { + // Check if our (maybe grand) parent is another panel: if this + // is the case, they will know what to do with this navigation + // key and so give them the chance to process it instead of + // looping inside this panel (normally, the focus will go to + // the next/previous item after this panel in the parent + // panel). + wxWindow *focusedParent = m_winParent; + while ( parent ) + { + // We don't want to tab into a different dialog or frame or + // even an MDI child frame, so test for this explicitly + // (and in particular don't just use IsTopLevel() which + // would return false in the latter case). + if ( focusedParent->IsTopNavigationDomain() ) + break; + + event.SetCurrentFocus( focusedParent ); + if ( parent->GetEventHandler()->ProcessEvent( event ) ) + return; + + focusedParent = parent; + + parent = parent->GetParent(); + } + } + //else: as the focus came from our parent, we definitely don't want + // to send it back to it! + + // no, we are not inside another panel so process this ourself + node = forward ? children.GetFirst() : children.GetLast(); + + continue; + } + + wxWindow *child = node->GetData(); + + // don't TAB to another TLW + if ( child->IsTopLevel() ) + { + node = forward ? node->GetNext() : node->GetPrevious(); + + continue; + } + +#if defined(__WXMSW__) && wxUSE_RADIOBTN + if ( event.IsFromTab() ) + { + if ( wxIsKindOf(child, wxRadioButton) ) + { + // only radio buttons with either wxRB_GROUP or wxRB_SINGLE + // can be tabbed to + if ( child->HasFlag(wxRB_GROUP) ) + { + // need to tab into the active button within a group + wxRadioButton *rb = wxGetSelectedButtonInGroup((wxRadioButton*)child); + if ( rb ) + child = rb; + } + else if ( !child->HasFlag(wxRB_SINGLE) ) + { + node = forward ? node->GetNext() : node->GetPrevious(); + continue; + } + } + } + else if ( m_winLastFocused && + wxIsKindOf(m_winLastFocused, wxRadioButton) && + !m_winLastFocused->HasFlag(wxRB_SINGLE) ) + { + wxRadioButton * const + lastBtn = static_cast(m_winLastFocused); + + // cursor keys don't navigate out of a radio button group so + // find the correct radio button to focus + if ( forward ) + { + child = wxGetNextButtonInGroup(lastBtn); + if ( !child ) + { + // no next button in group, set it to the first button + child = wxGetFirstButtonInGroup(lastBtn); + } + } + else + { + child = wxGetPreviousButtonInGroup(lastBtn); + if ( !child ) + { + // no previous button in group, set it to the last button + child = wxGetLastButtonInGroup(lastBtn); + } + } + + if ( child == m_winLastFocused ) + { + // must be a group consisting of only one button therefore + // no need to send a navigation event + event.Skip(false); + return; + } + } +#endif // __WXMSW__ + + if ( child->CanAcceptFocusFromKeyboard() ) + { + // if we're setting the focus to a child panel we should prevent it + // from giving it to the child which had the focus the last time + // and instead give it to the first/last child depending from which + // direction we're coming + event.SetEventObject(m_winParent); + + // disable propagation for this call as otherwise the event might + // bounce back to us. + wxPropagationDisabler disableProp(event); + if ( !child->GetEventHandler()->ProcessEvent(event) ) + { + // set it first in case SetFocusFromKbd() results in focus + // change too + m_winLastFocused = child; + + // everything is simple: just give focus to it + child->SetFocusFromKbd(); + } + //else: the child manages its focus itself + + event.Skip( false ); + + return; + } + + node = forward ? node->GetNext() : node->GetPrevious(); + } + + // we cycled through all of our children and none of them wanted to accept + // focus + event.Skip(); +} + +void wxControlContainer::HandleOnWindowDestroy(wxWindowBase *child) +{ + if ( child == m_winLastFocused ) + m_winLastFocused = NULL; +} + +// ---------------------------------------------------------------------------- +// focus handling +// ---------------------------------------------------------------------------- + +void wxControlContainer::HandleOnFocus(wxFocusEvent& event) +{ + wxLogTrace(TRACE_FOCUS, wxT("OnFocus on wxPanel 0x%p, name: %s"), + m_winParent->GetHandle(), + m_winParent->GetName().c_str() ); + + DoSetFocus(); + + event.Skip(); +} + + +#else + // wxHAS_NATIVE_TAB_TRAVERSAL + +bool wxControlContainer::SetFocusToChild() +{ + return wxSetFocusToChild(m_winParent, NULL); +} + + +#endif // !wxHAS_NATIVE_TAB_TRAVERSAL + +// ---------------------------------------------------------------------------- +// SetFocusToChild(): this function is used by wxPanel but also by wxFrame in +// wxMSW, this is why it is outside of wxControlContainer class +// ---------------------------------------------------------------------------- + +bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused) +{ + wxCHECK_MSG( win, false, wxT("wxSetFocusToChild(): invalid window") ); + // wxCHECK_MSG( childLastFocused, false, + // wxT("wxSetFocusToChild(): NULL child poonter") ); + + if ( childLastFocused && *childLastFocused ) + { + // It might happen that the window got reparented + if ( (*childLastFocused)->GetParent() == win ) + { + // And it also could have become hidden in the meanwhile + // We want to focus on the deepest widget visible + wxWindow *deepestVisibleWindow = NULL; + + while ( *childLastFocused ) + { + if ( (*childLastFocused)->IsShown() ) + { + if ( !deepestVisibleWindow ) + deepestVisibleWindow = *childLastFocused; + } + else + deepestVisibleWindow = NULL; + + *childLastFocused = (*childLastFocused)->GetParent(); + } + + if ( deepestVisibleWindow ) + { + *childLastFocused = deepestVisibleWindow; + + wxLogTrace(TRACE_FOCUS, + wxT("SetFocusToChild() => last child (0x%p)."), + (*childLastFocused)->GetHandle()); + + // not SetFocusFromKbd(): we're restoring focus back to the old + // window and not setting it as the result of a kbd action + (*childLastFocused)->SetFocus(); + return true; + } + } + else + { + // it doesn't count as such any more + *childLastFocused = NULL; + } + } + + // set the focus to the first child who wants it + wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst(); + while ( node ) + { + wxWindow *child = node->GetData(); + node = node->GetNext(); + + // skip special windows: + if ( !win->IsClientAreaChild(child) ) + continue; + + if ( child->CanAcceptFocusFromKeyboard() && !child->IsTopLevel() ) + { +#if defined(__WXMSW__) && wxUSE_RADIOBTN + // If a radiobutton is the first focusable child, search for the + // selected radiobutton in the same group + wxRadioButton* btn = wxDynamicCast(child, wxRadioButton); + if (btn) + { + wxRadioButton* selected = wxGetSelectedButtonInGroup(btn); + if (selected) + child = selected; + } +#endif // __WXMSW__ + + wxLogTrace(TRACE_FOCUS, + wxT("SetFocusToChild() => first child (0x%p)."), + child->GetHandle()); + + if (childLastFocused) + *childLastFocused = child; + child->SetFocusFromKbd(); + return true; + } + } + + return false; +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/convauto.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/convauto.cpp new file mode 100644 index 0000000000..6a5fba4ecb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/convauto.cpp @@ -0,0 +1,346 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/convauto.cpp +// Purpose: implementation of wxConvAuto +// Author: Vadim Zeitlin +// Created: 2006-04-04 +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/convauto.h" + +// we use latin1 by default as it seems the least bad choice: the files we need +// to detect input of don't always come from the user system (they are often +// received from other machines) and so using wxFONTENCODING_SYSTEM doesn't +// seem to be a good idea and there is no other reasonable alternative +wxFontEncoding wxConvAuto::ms_defaultMBEncoding = wxFONTENCODING_ISO8859_1; + +namespace +{ + +const char BOM_UTF32BE[] = { '\x00', '\x00', '\xFE', '\xFF' }; +const char BOM_UTF32LE[] = { '\xFF', '\xFE', '\x00', '\x00' }; +const char BOM_UTF16BE[] = { '\xFE', '\xFF' }; +const char BOM_UTF16LE[] = { '\xFF', '\xFE' }; +const char BOM_UTF8[] = { '\xEF', '\xBB', '\xBF' }; + +} // anonymous namespace + +// ============================================================================ +// implementation +// ============================================================================ + +/* static */ +void wxConvAuto::SetFallbackEncoding(wxFontEncoding enc) +{ + wxASSERT_MSG( enc != wxFONTENCODING_DEFAULT, + wxT("wxFONTENCODING_DEFAULT doesn't make sense here") ); + + ms_defaultMBEncoding = enc; +} + +/* static */ +const char* wxConvAuto::GetBOMChars(wxBOM bom, size_t* count) +{ + wxCHECK_MSG( count , NULL, wxS("count pointer must be provided") ); + + switch ( bom ) + { + case wxBOM_UTF32BE: *count = WXSIZEOF(BOM_UTF32BE); return BOM_UTF32BE; + case wxBOM_UTF32LE: *count = WXSIZEOF(BOM_UTF32LE); return BOM_UTF32LE; + case wxBOM_UTF16BE: *count = WXSIZEOF(BOM_UTF16BE); return BOM_UTF16BE; + case wxBOM_UTF16LE: *count = WXSIZEOF(BOM_UTF16LE); return BOM_UTF16LE; + case wxBOM_UTF8 : *count = WXSIZEOF(BOM_UTF8 ); return BOM_UTF8; + case wxBOM_Unknown: + case wxBOM_None: + wxFAIL_MSG( wxS("Invalid BOM type") ); + return NULL; + } + + wxFAIL_MSG( wxS("Unknown BOM type") ); + return NULL; +} + +/* static */ +wxBOM wxConvAuto::DetectBOM(const char *src, size_t srcLen) +{ + // examine the buffer for BOM presence + // + // quoting from http://www.unicode.org/faq/utf_bom.html#BOM: + // + // Bytes Encoding Form + // + // 00 00 FE FF UTF-32, big-endian + // FF FE 00 00 UTF-32, little-endian + // FE FF UTF-16, big-endian + // FF FE UTF-16, little-endian + // EF BB BF UTF-8 + // + // as some BOMs are prefixes of other ones we may need to read more bytes + // to disambiguate them + + switch ( srcLen ) + { + case 0: + return wxBOM_Unknown; + + case 1: + if ( src[0] == '\x00' || src[0] == '\xFF' || + src[0] == '\xFE' || src[0] == '\xEF') + { + // this could be a BOM but we don't know yet + return wxBOM_Unknown; + } + break; + + case 2: + case 3: + if ( src[0] == '\xEF' && src[1] == '\xBB' ) + { + if ( srcLen == 3 ) + return src[2] == '\xBF' ? wxBOM_UTF8 : wxBOM_None; + + return wxBOM_Unknown; + } + + if ( src[0] == '\xFE' && src[1] == '\xFF' ) + return wxBOM_UTF16BE; + + if ( src[0] == '\xFF' && src[1] == '\xFE' ) + { + // if the next byte is 0, it could be an UTF-32LE BOM but if it + // isn't we can be sure it's UTF-16LE + if ( srcLen == 3 && src[2] != '\x00' ) + return wxBOM_UTF16LE; + + return wxBOM_Unknown; + } + + if ( src[0] == '\x00' && src[1] == '\x00' ) + { + // this could only be UTF-32BE, check that the data we have so + // far allows for it + if ( srcLen == 3 && src[2] != '\xFE' ) + return wxBOM_None; + + return wxBOM_Unknown; + } + break; + + default: + // we have at least 4 characters so we may finally decide whether + // we have a BOM or not + if ( src[0] == '\xEF' && src[1] == '\xBB' && src[2] == '\xBF' ) + return wxBOM_UTF8; + + if ( src[0] == '\x00' && src[1] == '\x00' && + src[2] == '\xFE' && src[3] == '\xFF' ) + return wxBOM_UTF32BE; + + if ( src[0] == '\xFF' && src[1] == '\xFE' && + src[2] == '\x00' && src[3] == '\x00' ) + return wxBOM_UTF32LE; + + if ( src[0] == '\xFE' && src[1] == '\xFF' ) + return wxBOM_UTF16BE; + + if ( src[0] == '\xFF' && src[1] == '\xFE' ) + return wxBOM_UTF16LE; + } + + return wxBOM_None; +} + +void wxConvAuto::InitFromBOM(wxBOM bomType) +{ + m_consumedBOM = false; + + switch ( bomType ) + { + case wxBOM_Unknown: + wxFAIL_MSG( "shouldn't be called for this BOM type" ); + break; + + case wxBOM_None: + // use the default + break; + + case wxBOM_UTF32BE: + m_conv = new wxMBConvUTF32BE; + m_ownsConv = true; + break; + + case wxBOM_UTF32LE: + m_conv = new wxMBConvUTF32LE; + m_ownsConv = true; + break; + + case wxBOM_UTF16BE: + m_conv = new wxMBConvUTF16BE; + m_ownsConv = true; + break; + + case wxBOM_UTF16LE: + m_conv = new wxMBConvUTF16LE; + m_ownsConv = true; + break; + + case wxBOM_UTF8: + InitWithUTF8(); + break; + + default: + wxFAIL_MSG( "unknown BOM type" ); + } + + if ( !m_conv ) + { + // we end up here if there is no BOM or we didn't recognize it somehow + // (this shouldn't happen but still don't crash if it does), so use the + // default encoding + InitWithUTF8(); + m_consumedBOM = true; // as there is nothing to consume + } +} + +void wxConvAuto::SkipBOM(const char **src, size_t *len) const +{ + int ofs; + switch ( m_bomType ) + { + case wxBOM_Unknown: + wxFAIL_MSG( "shouldn't be called for this BOM type" ); + return; + + case wxBOM_None: + ofs = 0; + break; + + case wxBOM_UTF32BE: + case wxBOM_UTF32LE: + ofs = 4; + break; + + case wxBOM_UTF16BE: + case wxBOM_UTF16LE: + ofs = 2; + break; + + case wxBOM_UTF8: + ofs = 3; + break; + + default: + wxFAIL_MSG( "unknown BOM type" ); + return; + } + + *src += ofs; + if ( *len != (size_t)-1 ) + *len -= ofs; +} + +bool wxConvAuto::InitFromInput(const char *src, size_t len) +{ + m_bomType = DetectBOM(src, len == wxNO_LEN ? strlen(src) : len); + if ( m_bomType == wxBOM_Unknown ) + return false; + + InitFromBOM(m_bomType); + + return true; +} + +size_t +wxConvAuto::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + // we check BOM and create the appropriate conversion the first time we're + // called but we also need to ensure that the BOM is skipped not only + // during this initial call but also during the first call with non-NULL + // dst as typically we're first called with NULL dst to calculate the + // needed buffer size + wxConvAuto *self = const_cast(this); + + + if ( !m_conv ) + { + if ( !self->InitFromInput(src, srcLen) ) + { + // there is not enough data to determine whether we have a BOM or + // not, so fail for now -- the caller is supposed to call us again + // with more data + return wxCONV_FAILED; + } + } + + if ( !m_consumedBOM ) + { + SkipBOM(&src, &srcLen); + if ( srcLen == 0 ) + { + // there is nothing left except the BOM so we'd return 0 below but + // this is unexpected: decoding a non-empty string must either fail + // or return something non-empty, in particular this would break + // the code in wxTextInputStream::NextChar() + // + // so still return an error as we need some more data to be able to + // decode it + return wxCONV_FAILED; + } + } + + // try to convert using the auto-detected encoding + size_t rc = m_conv->ToWChar(dst, dstLen, src, srcLen); + if ( rc == wxCONV_FAILED && m_bomType == wxBOM_None ) + { + // if the conversion failed but we didn't really detect anything and + // simply tried UTF-8 by default, retry it using the fall-back + if ( m_encDefault != wxFONTENCODING_MAX ) + { + if ( m_ownsConv ) + delete m_conv; + + self->m_conv = new wxCSConv(m_encDefault == wxFONTENCODING_DEFAULT + ? GetFallbackEncoding() + : m_encDefault); + self->m_ownsConv = true; + + rc = m_conv->ToWChar(dst, dstLen, src, srcLen); + } + } + + // don't skip the BOM again the next time if we really consumed it + if ( rc != wxCONV_FAILED && dst && !m_consumedBOM ) + self->m_consumedBOM = true; + + return rc; +} + +size_t +wxConvAuto::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + if ( !m_conv ) + { + // default to UTF-8 for the multibyte output + const_cast(this)->InitWithUTF8(); + } + + return m_conv->FromWChar(dst, dstLen, src, srcLen); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/cshelp.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/cshelp.cpp new file mode 100644 index 0000000000..26484e26a2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/cshelp.cpp @@ -0,0 +1,511 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/cshelp.cpp +// Purpose: Context sensitive help class implementation +// Author: Julian Smart, Vadim Zeitlin +// Modified by: +// Created: 08/09/2000 +// Copyright: (c) 2000 Julian Smart, Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_HELP + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/module.h" +#endif + +#include "wx/tipwin.h" +#include "wx/cshelp.h" + +#if wxUSE_MS_HTML_HELP + #include "wx/msw/helpchm.h" // for ShowContextHelpPopup + #include "wx/utils.h" // for wxGetMousePosition() +#endif + +// ---------------------------------------------------------------------------- +// wxContextHelpEvtHandler private class +// ---------------------------------------------------------------------------- + +// This class exists in order to eat events until the left mouse button is +// pressed +class wxContextHelpEvtHandler: public wxEvtHandler +{ +public: + wxContextHelpEvtHandler(wxContextHelp* contextHelp) + { + m_contextHelp = contextHelp; + } + + virtual bool ProcessEvent(wxEvent& event); + +//// Data + wxContextHelp* m_contextHelp; + + wxDECLARE_NO_COPY_CLASS(wxContextHelpEvtHandler); +}; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxContextHelp +// ---------------------------------------------------------------------------- + +/* + * Invokes context-sensitive help + */ + + +IMPLEMENT_DYNAMIC_CLASS(wxContextHelp, wxObject) + +wxContextHelp::wxContextHelp(wxWindow* win, bool beginHelp) +{ + m_inHelp = false; + + if (beginHelp) + BeginContextHelp(win); +} + +wxContextHelp::~wxContextHelp() +{ + if (m_inHelp) + EndContextHelp(); +} + +// Not currently needed, but on some systems capture may not work as +// expected so we'll leave it here for now. +#ifdef __WXMOTIF__ +static void wxPushOrPopEventHandlers(wxContextHelp* help, wxWindow* win, bool push) +{ + if (push) + win->PushEventHandler(new wxContextHelpEvtHandler(help)); + else + win->PopEventHandler(true); + + wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst(); + while (node) + { + wxWindow* child = node->GetData(); + wxPushOrPopEventHandlers(help, child, push); + + node = node->GetNext(); + } +} +#endif + +// Begin 'context help mode' +bool wxContextHelp::BeginContextHelp(wxWindow* win) +{ + if (!win) + win = wxTheApp->GetTopWindow(); + if (!win) + return false; + + wxCursor cursor(wxCURSOR_QUESTION_ARROW); + wxCursor oldCursor = win->GetCursor(); + win->SetCursor(cursor); + +#ifdef __WXMAC__ + wxSetCursor(cursor); +#endif + + m_status = false; + +#ifdef __WXMOTIF__ + wxPushOrPopEventHandlers(this, win, true); +#else + win->PushEventHandler(new wxContextHelpEvtHandler(this)); +#endif + + win->CaptureMouse(); + + EventLoop(); + + win->ReleaseMouse(); + +#ifdef __WXMOTIF__ + wxPushOrPopEventHandlers(this, win, false); +#else + win->PopEventHandler(true); +#endif + + win->SetCursor(oldCursor); + +#ifdef __WXMAC__ + wxSetCursor(wxNullCursor); +#endif + + if (m_status) + { + wxPoint pt; + wxWindow* winAtPtr = wxFindWindowAtPointer(pt); + +#if 0 + if (winAtPtr) + { + printf("Picked %s (%d)\n", winAtPtr->GetName().c_str(), + winAtPtr->GetId()); + } +#endif + + if (winAtPtr) + DispatchEvent(winAtPtr, pt); + } + + return true; +} + +bool wxContextHelp::EndContextHelp() +{ + m_inHelp = false; + + return true; +} + +bool wxContextHelp::EventLoop() +{ + m_inHelp = true; + + while ( m_inHelp ) + { + if (wxTheApp->Pending()) + { + wxTheApp->Dispatch(); + } + else + { + wxTheApp->ProcessIdle(); + } + } + + return true; +} + +bool wxContextHelpEvtHandler::ProcessEvent(wxEvent& event) +{ + if (event.GetEventType() == wxEVT_LEFT_DOWN) + { + m_contextHelp->SetStatus(true); + m_contextHelp->EndContextHelp(); + return true; + } + + if ((event.GetEventType() == wxEVT_CHAR) || + (event.GetEventType() == wxEVT_KEY_DOWN) || + (event.GetEventType() == wxEVT_ACTIVATE) || + (event.GetEventType() == wxEVT_MOUSE_CAPTURE_CHANGED)) + { + // May have already been set to true by a left-click + //m_contextHelp->SetStatus(false); + m_contextHelp->EndContextHelp(); + return true; + } + + if ((event.GetEventType() == wxEVT_PAINT) || + (event.GetEventType() == wxEVT_ERASE_BACKGROUND)) + { + event.Skip(); + return false; + } + + return true; +} + +// Dispatch the help event to the relevant window +bool wxContextHelp::DispatchEvent(wxWindow* win, const wxPoint& pt) +{ + wxCHECK_MSG( win, false, wxT("win parameter can't be NULL") ); + + wxHelpEvent helpEvent(wxEVT_HELP, win->GetId(), pt, + wxHelpEvent::Origin_HelpButton); + helpEvent.SetEventObject(win); + + return win->GetEventHandler()->ProcessEvent(helpEvent); +} + +// ---------------------------------------------------------------------------- +// wxContextHelpButton +// ---------------------------------------------------------------------------- + +/* + * wxContextHelpButton + * You can add this to your dialogs (especially on non-Windows platforms) + * to put the application into context help mode. + */ + +#ifndef __WXPM__ + +static const char * csquery_xpm[] = { +"12 11 2 1", +" c None", +". c #000000", +" ", +" .... ", +" .. .. ", +" .. .. ", +" .. ", +" .. ", +" .. ", +" ", +" .. ", +" .. ", +" "}; + +#endif + +IMPLEMENT_CLASS(wxContextHelpButton, wxBitmapButton) + +BEGIN_EVENT_TABLE(wxContextHelpButton, wxBitmapButton) + EVT_BUTTON(wxID_CONTEXT_HELP, wxContextHelpButton::OnContextHelp) +END_EVENT_TABLE() + +wxContextHelpButton::wxContextHelpButton(wxWindow* parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style) +#if defined(__WXPM__) + : wxBitmapButton(parent, id, wxBitmap(wxCSQUERY_BITMAP + ,wxBITMAP_TYPE_BMP_RESOURCE + ), + pos, size, style) +#else + : wxBitmapButton(parent, id, wxBitmap(csquery_xpm), + pos, size, style) +#endif +{ +} + +void wxContextHelpButton::OnContextHelp(wxCommandEvent& WXUNUSED(event)) +{ + wxContextHelp contextHelp(GetParent()); +} + +// ---------------------------------------------------------------------------- +// wxHelpProvider +// ---------------------------------------------------------------------------- + +wxHelpProvider *wxHelpProvider::ms_helpProvider = NULL; + +// trivial implementation of some methods which we don't want to make pure +// virtual for convenience + +void wxHelpProvider::AddHelp(wxWindowBase * WXUNUSED(window), + const wxString& WXUNUSED(text)) +{ +} + +void wxHelpProvider::AddHelp(wxWindowID WXUNUSED(id), + const wxString& WXUNUSED(text)) +{ +} + +// removes the association +void wxHelpProvider::RemoveHelp(wxWindowBase* WXUNUSED(window)) +{ +} + +wxHelpProvider::~wxHelpProvider() +{ +} + +wxString wxHelpProvider::GetHelpTextMaybeAtPoint(wxWindowBase *window) +{ + if ( m_helptextAtPoint != wxDefaultPosition || + m_helptextOrigin != wxHelpEvent::Origin_Unknown ) + { + wxCHECK_MSG( window, wxEmptyString, wxT("window must not be NULL") ); + + wxPoint pt = m_helptextAtPoint; + wxHelpEvent::Origin origin = m_helptextOrigin; + + m_helptextAtPoint = wxDefaultPosition; + m_helptextOrigin = wxHelpEvent::Origin_Unknown; + + return window->GetHelpTextAtPoint(pt, origin); + } + + return GetHelp(window); +} + +// ---------------------------------------------------------------------------- +// wxSimpleHelpProvider +// ---------------------------------------------------------------------------- + +#define WINHASH_KEY(w) wxPtrToUInt(w) + +wxString wxSimpleHelpProvider::GetHelp(const wxWindowBase *window) +{ + wxSimpleHelpProviderHashMap::iterator it = m_hashWindows.find(WINHASH_KEY(window)); + + if ( it == m_hashWindows.end() ) + { + it = m_hashIds.find(window->GetId()); + if ( it == m_hashIds.end() ) + return wxEmptyString; + } + + return it->second; +} + +void wxSimpleHelpProvider::AddHelp(wxWindowBase *window, const wxString& text) +{ + m_hashWindows.erase(WINHASH_KEY(window)); + m_hashWindows[WINHASH_KEY(window)] = text; +} + +void wxSimpleHelpProvider::AddHelp(wxWindowID id, const wxString& text) +{ + wxSimpleHelpProviderHashMap::key_type key = (wxSimpleHelpProviderHashMap::key_type)id; + m_hashIds.erase(key); + m_hashIds[key] = text; +} + +// removes the association +void wxSimpleHelpProvider::RemoveHelp(wxWindowBase* window) +{ + m_hashWindows.erase(WINHASH_KEY(window)); +} + +bool wxSimpleHelpProvider::ShowHelp(wxWindowBase *window) +{ +#if wxUSE_MS_HTML_HELP || wxUSE_TIPWINDOW +#if wxUSE_MS_HTML_HELP + // m_helptextAtPoint will be reset by GetHelpTextMaybeAtPoint(), stash it + const wxPoint posTooltip = m_helptextAtPoint; +#endif // wxUSE_MS_HTML_HELP + + const wxString text = GetHelpTextMaybeAtPoint(window); + + if ( !text.empty() ) + { + // use the native help popup style if it's available +#if wxUSE_MS_HTML_HELP + if ( !wxCHMHelpController::ShowContextHelpPopup + ( + text, + posTooltip, + (wxWindow *)window + ) ) +#endif // wxUSE_MS_HTML_HELP + { +#if wxUSE_TIPWINDOW + static wxTipWindow* s_tipWindow = NULL; + + if ( s_tipWindow ) + { + // Prevent s_tipWindow being nulled in OnIdle, thereby removing + // the chance for the window to be closed by ShowHelp + s_tipWindow->SetTipWindowPtr(NULL); + s_tipWindow->Close(); + } + + s_tipWindow = new wxTipWindow((wxWindow *)window, text, + 100, &s_tipWindow); +#else // !wxUSE_TIPWINDOW + // we tried wxCHMHelpController but it failed and we don't have + // wxTipWindow to fall back on, so + return false; +#endif // wxUSE_TIPWINDOW + } + + return true; + } +#else // !wxUSE_MS_HTML_HELP && !wxUSE_TIPWINDOW + wxUnusedVar(window); +#endif // wxUSE_MS_HTML_HELP || wxUSE_TIPWINDOW + + return false; +} + +// ---------------------------------------------------------------------------- +// wxHelpControllerHelpProvider +// ---------------------------------------------------------------------------- + +wxHelpControllerHelpProvider::wxHelpControllerHelpProvider(wxHelpControllerBase* hc) +{ + m_helpController = hc; +} + +bool wxHelpControllerHelpProvider::ShowHelp(wxWindowBase *window) +{ + const wxString text = GetHelpTextMaybeAtPoint(window); + + if ( text.empty() ) + return false; + + if ( m_helpController ) + { + // if it's a numeric topic, show it + long topic; + if ( text.ToLong(&topic) ) + return m_helpController->DisplayContextPopup(topic); + + // otherwise show the text directly + if ( m_helpController->DisplayTextPopup(text, wxGetMousePosition()) ) + return true; + } + + // if there is no help controller or it's not capable of showing the help, + // fallback to the default method + return wxSimpleHelpProvider::ShowHelp(window); +} + +// Convenience function for turning context id into wxString +wxString wxContextId(int id) +{ + return wxString::Format(wxT("%d"), id); +} + +// ---------------------------------------------------------------------------- +// wxHelpProviderModule: module responsible for cleaning up help provider. +// ---------------------------------------------------------------------------- + +class wxHelpProviderModule : public wxModule +{ +public: + bool OnInit(); + void OnExit(); + +private: + DECLARE_DYNAMIC_CLASS(wxHelpProviderModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxHelpProviderModule, wxModule) + +bool wxHelpProviderModule::OnInit() +{ + // Probably we don't want to do anything by default, + // since it could pull in extra code + // wxHelpProvider::Set(new wxSimpleHelpProvider); + + return true; +} + +void wxHelpProviderModule::OnExit() +{ + if (wxHelpProvider::Get()) + { + delete wxHelpProvider::Get(); + wxHelpProvider::Set(NULL); + } +} + +#endif // wxUSE_HELP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/ctrlcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/ctrlcmn.cpp new file mode 100644 index 0000000000..dbfbc9f700 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/ctrlcmn.cpp @@ -0,0 +1,597 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/ctrlcmn.cpp +// Purpose: wxControl common interface +// Author: Vadim Zeitlin +// Modified by: +// Created: 26.07.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CONTROLS + +#include "wx/control.h" + +#ifndef WX_PRECOMP + #include "wx/dc.h" + #include "wx/log.h" + #include "wx/radiobut.h" + #include "wx/statbmp.h" + #include "wx/bitmap.h" + #include "wx/utils.h" // for wxStripMenuCodes() + #include "wx/settings.h" +#endif + +#include "wx/private/markupparser.h" + +const char wxControlNameStr[] = "control"; + +// ============================================================================ +// implementation +// ============================================================================ + +wxControlBase::~wxControlBase() +{ + // this destructor is required for Darwin +} + +bool wxControlBase::Create(wxWindow *parent, + wxWindowID id, + const wxPoint &pos, + const wxSize &size, + long style, + const wxValidator& wxVALIDATOR_PARAM(validator), + const wxString &name) +{ + bool ret = wxWindow::Create(parent, id, pos, size, style, name); + +#if wxUSE_VALIDATORS + if ( ret ) + SetValidator(validator); +#endif // wxUSE_VALIDATORS + + return ret; +} + +bool wxControlBase::CreateControl(wxWindowBase *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + // even if it's possible to create controls without parents in some port, + // it should surely be discouraged because it doesn't work at all under + // Windows + wxCHECK_MSG( parent, false, wxT("all controls must have parents") ); + + if ( !CreateBase(parent, id, pos, size, style, validator, name) ) + return false; + + parent->AddChild(this); + + return true; +} + +void wxControlBase::Command(wxCommandEvent& event) +{ + (void)GetEventHandler()->ProcessEvent(event); +} + +void wxControlBase::InitCommandEvent(wxCommandEvent& event) const +{ + event.SetEventObject(const_cast(this)); + + // event.SetId(GetId()); -- this is usuall done in the event ctor + + switch ( m_clientDataType ) + { + case wxClientData_Void: + event.SetClientData(GetClientData()); + break; + + case wxClientData_Object: + event.SetClientObject(GetClientObject()); + break; + + case wxClientData_None: + // nothing to do + ; + } +} + +bool wxControlBase::SetFont(const wxFont& font) +{ + InvalidateBestSize(); + return wxWindow::SetFont(font); +} + +// wxControl-specific processing after processing the update event +void wxControlBase::DoUpdateWindowUI(wxUpdateUIEvent& event) +{ + // call inherited + wxWindowBase::DoUpdateWindowUI(event); + + // update label + if ( event.GetSetText() ) + { + if ( event.GetText() != GetLabel() ) + SetLabel(event.GetText()); + } + + // Unfortunately we don't yet have common base class for + // wxRadioButton, so we handle updates of radiobuttons here. + // TODO: If once wxRadioButtonBase will exist, move this code there. +#if wxUSE_RADIOBTN + if ( event.GetSetChecked() ) + { + wxRadioButton *radiobtn = wxDynamicCastThis(wxRadioButton); + if ( radiobtn ) + radiobtn->SetValue(event.GetChecked()); + } +#endif // wxUSE_RADIOBTN +} + +wxSize wxControlBase::DoGetSizeFromTextSize(int WXUNUSED(xlen), + int WXUNUSED(ylen)) const +{ + return wxSize(-1, -1); +} + +/* static */ +wxString wxControlBase::GetLabelText(const wxString& label) +{ + // we don't want strip the TABs here, just the mnemonics + return wxStripMenuCodes(label, wxStrip_Mnemonics); +} + +/* static */ +wxString wxControlBase::RemoveMnemonics(const wxString& str) +{ + // we don't want strip the TABs here, just the mnemonics + return wxStripMenuCodes(str, wxStrip_Mnemonics); +} + +/* static */ +wxString wxControlBase::EscapeMnemonics(const wxString& text) +{ + wxString label(text); + label.Replace("&", "&&"); + return label; +} + +/* static */ +int wxControlBase::FindAccelIndex(const wxString& label, wxString *labelOnly) +{ + // the character following MNEMONIC_PREFIX is the accelerator for this + // control unless it is MNEMONIC_PREFIX too - this allows to insert + // literal MNEMONIC_PREFIX chars into the label + static const wxChar MNEMONIC_PREFIX = wxT('&'); + + if ( labelOnly ) + { + labelOnly->Empty(); + labelOnly->Alloc(label.length()); + } + + int indexAccel = -1; + for ( wxString::const_iterator pc = label.begin(); pc != label.end(); ++pc ) + { + if ( *pc == MNEMONIC_PREFIX ) + { + ++pc; // skip it + if ( pc == label.end() ) + break; + else if ( *pc != MNEMONIC_PREFIX ) + { + if ( indexAccel == -1 ) + { + // remember it (-1 is for MNEMONIC_PREFIX itself + indexAccel = pc - label.begin() - 1; + } + else + { + wxFAIL_MSG(wxT("duplicate accel char in control label")); + } + } + } + + if ( labelOnly ) + { + *labelOnly += *pc; + } + } + + return indexAccel; +} + +wxBorder wxControlBase::GetDefaultBorder() const +{ + return wxBORDER_THEME; +} + +/* static */ wxVisualAttributes +wxControlBase::GetCompositeControlsDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +{ + wxVisualAttributes attrs; + attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); + attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); + + return attrs; +} + +// ---------------------------------------------------------------------------- +// wxControl markup support +// ---------------------------------------------------------------------------- + +#if wxUSE_MARKUP + +/* static */ +wxString wxControlBase::RemoveMarkup(const wxString& markup) +{ + return wxMarkupParser::Strip(markup); +} + +bool wxControlBase::DoSetLabelMarkup(const wxString& markup) +{ + const wxString label = RemoveMarkup(markup); + if ( label.empty() && !markup.empty() ) + return false; + + SetLabel(label); + + return true; +} + +#endif // wxUSE_MARKUP + +// ---------------------------------------------------------------------------- +// wxControlBase - ellipsization code +// ---------------------------------------------------------------------------- + +#define wxELLIPSE_REPLACEMENT wxS("...") + +namespace +{ + +struct EllipsizeCalculator +{ + EllipsizeCalculator(const wxString& s, const wxDC& dc, + int maxFinalWidthPx, int replacementWidthPx) + : + m_initialCharToRemove(0), + m_nCharsToRemove(0), + m_outputNeedsUpdate(true), + m_str(s), + m_dc(dc), + m_maxFinalWidthPx(maxFinalWidthPx), + m_replacementWidthPx(replacementWidthPx) + { + m_isOk = dc.GetPartialTextExtents(s, m_charOffsetsPx); + wxASSERT( m_charOffsetsPx.GetCount() == s.length() ); + } + + bool IsOk() const { return m_isOk; } + + bool EllipsizationNotNeeded() const + { + // NOTE: charOffsetsPx[n] is the width in pixels of the first n characters (with the last one INCLUDED) + // thus charOffsetsPx[len-1] is the total width of the string + return m_charOffsetsPx.Last() <= m_maxFinalWidthPx; + } + + void Init(size_t initialCharToRemove, size_t nCharsToRemove) + { + m_initialCharToRemove = initialCharToRemove; + m_nCharsToRemove = nCharsToRemove; + } + + void RemoveFromEnd() + { + m_nCharsToRemove++; + } + + void RemoveFromStart() + { + m_initialCharToRemove--; + m_nCharsToRemove++; + } + + size_t GetFirstRemoved() const { return m_initialCharToRemove; } + size_t GetLastRemoved() const { return m_initialCharToRemove + m_nCharsToRemove - 1; } + + const wxString& GetEllipsizedText() + { + if ( m_outputNeedsUpdate ) + { + wxASSERT(m_initialCharToRemove <= m_str.length() - 1); // see valid range for initialCharToRemove above + wxASSERT(m_nCharsToRemove >= 1 && m_nCharsToRemove <= m_str.length() - m_initialCharToRemove); // see valid range for nCharsToRemove above + + // erase m_nCharsToRemove characters after m_initialCharToRemove (included); + // e.g. if we have the string "foobar" (len = 6) + // ^ + // \--- m_initialCharToRemove = 2 + // and m_nCharsToRemove = 2, then we get "foar" + m_output = m_str; + m_output.replace(m_initialCharToRemove, m_nCharsToRemove, wxELLIPSE_REPLACEMENT); + } + + return m_output; + } + + bool IsShortEnough() + { + if ( m_nCharsToRemove == m_str.length() ) + return true; // that's the best we could do + + // Width calculation using partial extents is just an inaccurate + // estimate: partial extents have sub-pixel precision and are rounded + // by GetPartialTextExtents(); replacing part of the string with "..." + // may change them too thanks to changes in ligatures, kerning etc. + // + // The correct algorithm would be to call GetTextExtent() in every step + // of ellipsization, but that would be too expensive, especially when + // the difference is just a few pixels. So we use partial extents to + // estimate string width and only verify it with GetTextExtent() when + // it looks good. + + int estimatedWidth = m_replacementWidthPx; // length of "..." + + // length of text before the removed part: + if ( m_initialCharToRemove > 0 ) + estimatedWidth += m_charOffsetsPx[m_initialCharToRemove - 1]; + + // length of text after the removed part: + + if ( GetLastRemoved() < m_str.length() ) + estimatedWidth += m_charOffsetsPx.Last() - m_charOffsetsPx[GetLastRemoved()]; + + if ( estimatedWidth > m_maxFinalWidthPx ) + return false; + + return m_dc.GetTextExtent(GetEllipsizedText()).GetWidth() <= m_maxFinalWidthPx; + } + + // calculation state: + + // REMEMBER: indexes inside the string have a valid range of [0;len-1] if not otherwise constrained + // lengths/counts of characters (e.g. nCharsToRemove) have a + // valid range of [0;len] if not otherwise constrained + // NOTE: since this point we know we have for sure a non-empty string from which we need + // to remove _at least_ one character (thus nCharsToRemove below is constrained to be >= 1) + + // index of first character to erase, valid range is [0;len-1]: + size_t m_initialCharToRemove; + // how many chars do we need to erase? valid range is [0;len-m_initialCharToRemove] + size_t m_nCharsToRemove; + + wxString m_output; + bool m_outputNeedsUpdate; + + // inputs: + wxString m_str; + const wxDC& m_dc; + int m_maxFinalWidthPx; + int m_replacementWidthPx; + wxArrayInt m_charOffsetsPx; + + bool m_isOk; +}; + +} // anonymous namespace + +/* static and protected */ +wxString wxControlBase::DoEllipsizeSingleLine(const wxString& curLine, const wxDC& dc, + wxEllipsizeMode mode, int maxFinalWidthPx, + int replacementWidthPx) +{ + wxASSERT_MSG(replacementWidthPx > 0, "Invalid parameters"); + wxASSERT_LEVEL_2_MSG(!curLine.Contains('\n'), + "Use Ellipsize() instead!"); + + wxASSERT_MSG( mode != wxELLIPSIZE_NONE, "shouldn't be called at all then" ); + + // NOTE: this function assumes that any mnemonic/tab character has already + // been handled if it was necessary to handle them (see Ellipsize()) + + if (maxFinalWidthPx <= 0) + return wxEmptyString; + + size_t len = curLine.length(); + if (len <= 1 ) + return curLine; + + EllipsizeCalculator calc(curLine, dc, maxFinalWidthPx, replacementWidthPx); + + if ( !calc.IsOk() ) + return curLine; + + if ( calc.EllipsizationNotNeeded() ) + return curLine; + + // let's compute the range of characters to remove depending on the ellipsization mode: + switch (mode) + { + case wxELLIPSIZE_START: + { + calc.Init(0, 1); + while ( !calc.IsShortEnough() ) + calc.RemoveFromEnd(); + + // always show at least one character of the string: + if ( calc.m_nCharsToRemove == len ) + return wxString(wxELLIPSE_REPLACEMENT) + curLine[len-1]; + + break; + } + + case wxELLIPSIZE_MIDDLE: + { + // NOTE: the following piece of code works also when len == 1 + + // start the removal process from the middle of the string + // i.e. separe the string in three parts: + // - the first one to preserve, valid range [0;initialCharToRemove-1] or the empty range if initialCharToRemove==0 + // - the second one to remove, valid range [initialCharToRemove;endCharToRemove] + // - the third one to preserve, valid range [endCharToRemove+1;len-1] or the empty range if endCharToRemove==len-1 + // NOTE: empty range != range [0;0] since the range [0;0] contains 1 character (the zero-th one)! + + calc.Init(len/2, 0); + + bool removeFromStart = true; + + while ( !calc.IsShortEnough() ) + { + const bool canRemoveFromStart = calc.GetFirstRemoved() > 0; + const bool canRemoveFromEnd = calc.GetLastRemoved() < len - 1; + + if ( !canRemoveFromStart && !canRemoveFromEnd ) + { + // we need to remove all the characters of the string! + break; + } + + // Remove from the beginning in even steps and from the end + // in odd steps, unless we exhausted one side already: + removeFromStart = !removeFromStart; + if ( removeFromStart && !canRemoveFromStart ) + removeFromStart = false; + else if ( !removeFromStart && !canRemoveFromEnd ) + removeFromStart = true; + + if ( removeFromStart ) + calc.RemoveFromStart(); + else + calc.RemoveFromEnd(); + } + + // Always show at least one character of the string. + // Additionally, if there's only one character left, prefer + // "a..." to "...a": + if ( calc.m_nCharsToRemove == len || + calc.m_nCharsToRemove == len - 1 ) + { + return curLine[0] + wxString(wxELLIPSE_REPLACEMENT); + } + } + break; + + case wxELLIPSIZE_END: + { + calc.Init(len - 1, 1); + while ( !calc.IsShortEnough() ) + calc.RemoveFromStart(); + + // always show at least one character of the string: + if ( calc.m_nCharsToRemove == len ) + return curLine[0] + wxString(wxELLIPSE_REPLACEMENT); + + break; + } + + case wxELLIPSIZE_NONE: + default: + wxFAIL_MSG("invalid ellipsize mode"); + return curLine; + } + + return calc.GetEllipsizedText(); +} + +/* static */ +wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc, + wxEllipsizeMode mode, int maxFinalWidth, + int flags) +{ + wxString ret; + + // these cannot be cached between different Ellipsize() calls as they can + // change because of e.g. a font change; however we calculate them only once + // when ellipsizing multiline labels: + int replacementWidth = dc.GetTextExtent(wxELLIPSE_REPLACEMENT).GetWidth(); + + // NB: we must handle correctly labels with newlines: + wxString curLine; + for ( wxString::const_iterator pc = label.begin(); ; ++pc ) + { + if ( pc == label.end() || *pc == wxS('\n') ) + { + curLine = DoEllipsizeSingleLine(curLine, dc, mode, maxFinalWidth, + replacementWidth); + + // add this (ellipsized) row to the rest of the label + ret << curLine; + if ( pc == label.end() ) + break; + + ret << *pc; + curLine.clear(); + } + // we need to remove mnemonics from the label for correct calculations + else if ( *pc == wxS('&') && (flags & wxELLIPSIZE_FLAGS_PROCESS_MNEMONICS) ) + { + // pc+1 is safe: at worst we'll be at end() + wxString::const_iterator next = pc + 1; + if ( next != label.end() && *next == wxS('&') ) + curLine += wxS('&'); // && becomes & + //else: remove this ampersand + } + // we need also to expand tabs to properly calc their size + else if ( *pc == wxS('\t') && (flags & wxELLIPSIZE_FLAGS_EXPAND_TABS) ) + { + // Windows natively expands the TABs to 6 spaces. Do the same: + curLine += wxS(" "); + } + else + { + curLine += *pc; + } + } + + return ret; +} + +// ---------------------------------------------------------------------------- +// wxStaticBitmap +// ---------------------------------------------------------------------------- + +#if wxUSE_STATBMP + +wxStaticBitmapBase::~wxStaticBitmapBase() +{ + // this destructor is required for Darwin +} + +wxSize wxStaticBitmapBase::DoGetBestSize() const +{ + wxSize best; + wxBitmap bmp = GetBitmap(); + if ( bmp.IsOk() ) + best = bmp.GetScaledSize(); + else + // this is completely arbitrary + best = wxSize(16, 16); + CacheBestSize(best); + return best; +} + +#endif // wxUSE_STATBMP + +#endif // wxUSE_CONTROLS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/ctrlsub.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/ctrlsub.cpp new file mode 100644 index 0000000000..7bf15a9295 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/ctrlsub.cpp @@ -0,0 +1,309 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/ctrlsub.cpp +// Purpose: wxItemContainer implementation +// Author: Vadim Zeitlin +// Modified by: +// Created: 22.10.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CONTROLS + +#ifndef WX_PRECOMP + #include "wx/ctrlsub.h" + #include "wx/arrstr.h" +#endif + +IMPLEMENT_ABSTRACT_CLASS(wxControlWithItems, wxControl) + +// ============================================================================ +// wxItemContainerImmutable implementation +// ============================================================================ + +wxItemContainerImmutable::~wxItemContainerImmutable() +{ + // this destructor is required for Darwin +} + +// ---------------------------------------------------------------------------- +// selection +// ---------------------------------------------------------------------------- + +wxString wxItemContainerImmutable::GetStringSelection() const +{ + wxString s; + + int sel = GetSelection(); + if ( sel != wxNOT_FOUND ) + s = GetString((unsigned int)sel); + + return s; +} + +bool wxItemContainerImmutable::SetStringSelection(const wxString& s) +{ + const int sel = FindString(s); + if ( sel == wxNOT_FOUND ) + return false; + + SetSelection(sel); + + return true; +} + +wxArrayString wxItemContainerImmutable::GetStrings() const +{ + wxArrayString result; + + const unsigned int count = GetCount(); + result.Alloc(count); + for ( unsigned int n = 0; n < count; n++ ) + result.Add(GetString(n)); + + return result; +} + +// ============================================================================ +// wxItemContainer implementation +// ============================================================================ + +wxItemContainer::~wxItemContainer() +{ + // this destructor is required for Darwin +} + +// ---------------------------------------------------------------------------- +// deleting items +// ---------------------------------------------------------------------------- + +void wxItemContainer::Clear() +{ + if ( HasClientObjectData() ) + { + const unsigned count = GetCount(); + for ( unsigned i = 0; i < count; ++i ) + ResetItemClientObject(i); + } + + SetClientDataType(wxClientData_None); + + DoClear(); +} + +void wxItemContainer::Delete(unsigned int pos) +{ + wxCHECK_RET( pos < GetCount(), wxT("invalid index") ); + + if ( HasClientObjectData() ) + ResetItemClientObject(pos); + + DoDeleteOneItem(pos); + + if ( IsEmpty() ) + { + SetClientDataType(wxClientData_None); + } +} + +// ---------------------------------------------------------------------------- +// +// ---------------------------------------------------------------------------- + +int wxItemContainer::DoInsertItemsInLoop(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, + wxClientDataType type) +{ + int n = wxNOT_FOUND; + + const unsigned int count = items.GetCount(); + for ( unsigned int i = 0; i < count; ++i ) + { + n = DoInsertOneItem(items[i], pos++); + if ( n == wxNOT_FOUND ) + break; + + AssignNewItemClientData(n, clientData, i, type); + } + + return n; +} + +int +wxItemContainer::DoInsertOneItem(const wxString& WXUNUSED(item), + unsigned int WXUNUSED(pos)) +{ + wxFAIL_MSG( wxT("Must be overridden if DoInsertItemsInLoop() is used") ); + + return wxNOT_FOUND; +} + + +// ---------------------------------------------------------------------------- +// client data +// ---------------------------------------------------------------------------- + +void wxItemContainer::SetClientObject(unsigned int n, wxClientData *data) +{ + wxASSERT_MSG( !HasClientUntypedData(), + wxT("can't have both object and void client data") ); + + wxCHECK_RET( IsValid(n), "Invalid index passed to SetClientObject()" ); + + if ( HasClientObjectData() ) + { + wxClientData * clientDataOld + = static_cast(DoGetItemClientData(n)); + if ( clientDataOld ) + delete clientDataOld; + } + else // didn't have any client data so far + { + // now we have object client data + DoInitItemClientData(); + + SetClientDataType(wxClientData_Object); + } + + DoSetItemClientData(n, data); +} + +wxClientData *wxItemContainer::GetClientObject(unsigned int n) const +{ + wxCHECK_MSG( HasClientObjectData(), NULL, + wxT("this window doesn't have object client data") ); + + wxCHECK_MSG( IsValid(n), NULL, + "Invalid index passed to GetClientObject()" ); + + return static_cast(DoGetItemClientData(n)); +} + +wxClientData *wxItemContainer::DetachClientObject(unsigned int n) +{ + wxClientData * const data = GetClientObject(n); + if ( data ) + { + // reset the pointer as we don't own it any more + DoSetItemClientData(n, NULL); + } + + return data; +} + +void wxItemContainer::SetClientData(unsigned int n, void *data) +{ + if ( !HasClientData() ) + { + DoInitItemClientData(); + SetClientDataType(wxClientData_Void); + } + + wxASSERT_MSG( HasClientUntypedData(), + wxT("can't have both object and void client data") ); + + wxCHECK_RET( IsValid(n), "Invalid index passed to SetClientData()" ); + + DoSetItemClientData(n, data); +} + +void *wxItemContainer::GetClientData(unsigned int n) const +{ + wxCHECK_MSG( HasClientUntypedData(), NULL, + wxT("this window doesn't have void client data") ); + + wxCHECK_MSG( IsValid(n), NULL, + "Invalid index passed to GetClientData()" ); + + return DoGetItemClientData(n); +} + +void wxItemContainer::AssignNewItemClientData(unsigned int pos, + void **clientData, + unsigned int n, + wxClientDataType type) +{ + switch ( type ) + { + case wxClientData_Object: + SetClientObject + ( + pos, + (reinterpret_cast(clientData))[n] + ); + break; + + case wxClientData_Void: + SetClientData(pos, clientData[n]); + break; + + default: + wxFAIL_MSG( wxT("unknown client data type") ); + // fall through + + case wxClientData_None: + // nothing to do + break; + } +} + +void wxItemContainer::ResetItemClientObject(unsigned int n) +{ + wxClientData * const data = GetClientObject(n); + if ( data ) + { + delete data; + DoSetItemClientData(n, NULL); + } +} + +// ============================================================================ +// wxControlWithItems implementation +// ============================================================================ + +void +wxControlWithItemsBase::InitCommandEventWithItems(wxCommandEvent& event, int n) +{ + InitCommandEvent(event); + + if ( n != wxNOT_FOUND ) + { + if ( HasClientObjectData() ) + event.SetClientObject(GetClientObject(n)); + else if ( HasClientUntypedData() ) + event.SetClientData(GetClientData(n)); + } +} + +void wxControlWithItemsBase::SendSelectionChangedEvent(wxEventType eventType) +{ + const int n = GetSelection(); + if ( n == wxNOT_FOUND ) + return; + + wxCommandEvent event(eventType, m_windowId); + event.SetInt(n); + event.SetEventObject(this); + event.SetString(GetStringSelection()); + InitCommandEventWithItems(event, n); + + HandleWindowEvent(event); +} + +#endif // wxUSE_CONTROLS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/datavcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/datavcmn.cpp new file mode 100644 index 0000000000..9d68261fe0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/datavcmn.cpp @@ -0,0 +1,2563 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/datavcmn.cpp +// Purpose: wxDataViewCtrl base classes and common parts +// Author: Robert Roebling +// Created: 2006/02/20 +// Copyright: (c) 2006, Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_DATAVIEWCTRL + +#include "wx/dataview.h" + +#ifndef WX_PRECOMP + #include "wx/dc.h" + #include "wx/settings.h" + #include "wx/log.h" + #include "wx/crt.h" +#endif + +#include "wx/datectrl.h" +#include "wx/spinctrl.h" +#include "wx/choice.h" +#include "wx/imaglist.h" + +const char wxDataViewCtrlNameStr[] = "dataviewCtrl"; + +namespace +{ + +// Custom handler pushed on top of the edit control used by wxDataViewCtrl to +// forward some events to the main control itself. +class wxDataViewEditorCtrlEvtHandler: public wxEvtHandler +{ +public: + wxDataViewEditorCtrlEvtHandler(wxWindow *editor, wxDataViewRenderer *owner) + { + m_editorCtrl = editor; + m_owner = owner; + + m_finished = false; + } + + void AcceptChangesAndFinish(); + void SetFocusOnIdle( bool focus = true ) { m_focusOnIdle = focus; } + +protected: + void OnChar( wxKeyEvent &event ); + void OnTextEnter( wxCommandEvent &event ); + void OnKillFocus( wxFocusEvent &event ); + void OnIdle( wxIdleEvent &event ); + +private: + wxDataViewRenderer *m_owner; + wxWindow *m_editorCtrl; + bool m_finished; + bool m_focusOnIdle; + +private: + DECLARE_EVENT_TABLE() +}; + +} // anonymous namespace + +// --------------------------------------------------------- +// wxDataViewItemAttr +// --------------------------------------------------------- + +wxFont wxDataViewItemAttr::GetEffectiveFont(const wxFont& font) const +{ + if ( !HasFont() ) + return font; + + wxFont f(font); + if ( GetBold() ) + f.MakeBold(); + if ( GetItalic() ) + f.MakeItalic(); + return f; +} + + +// --------------------------------------------------------- +// wxDataViewModelNotifier +// --------------------------------------------------------- + +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxDataViewModelNotifiers) + +bool wxDataViewModelNotifier::ItemsAdded( const wxDataViewItem &parent, const wxDataViewItemArray &items ) +{ + size_t count = items.GetCount(); + size_t i; + for (i = 0; i < count; i++) + if (!ItemAdded( parent, items[i] )) return false; + + return true; +} + +bool wxDataViewModelNotifier::ItemsDeleted( const wxDataViewItem &parent, const wxDataViewItemArray &items ) +{ + size_t count = items.GetCount(); + size_t i; + for (i = 0; i < count; i++) + if (!ItemDeleted( parent, items[i] )) return false; + + return true; +} + +bool wxDataViewModelNotifier::ItemsChanged( const wxDataViewItemArray &items ) +{ + size_t count = items.GetCount(); + size_t i; + for (i = 0; i < count; i++) + if (!ItemChanged( items[i] )) return false; + + return true; +} + +// --------------------------------------------------------- +// wxDataViewModel +// --------------------------------------------------------- + +wxDataViewModel::wxDataViewModel() +{ + m_notifiers.DeleteContents( true ); +} + +bool wxDataViewModel::ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item ) +{ + bool ret = true; + + wxDataViewModelNotifiers::iterator iter; + for (iter = m_notifiers.begin(); iter != m_notifiers.end(); ++iter) + { + wxDataViewModelNotifier* notifier = *iter; + if (!notifier->ItemAdded( parent, item )) + ret = false; + } + + return ret; +} + +bool wxDataViewModel::ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item ) +{ + bool ret = true; + + wxDataViewModelNotifiers::iterator iter; + for (iter = m_notifiers.begin(); iter != m_notifiers.end(); ++iter) + { + wxDataViewModelNotifier* notifier = *iter; + if (!notifier->ItemDeleted( parent, item )) + ret = false; + } + + return ret; +} + +bool wxDataViewModel::ItemChanged( const wxDataViewItem &item ) +{ + bool ret = true; + + wxDataViewModelNotifiers::iterator iter; + for (iter = m_notifiers.begin(); iter != m_notifiers.end(); ++iter) + { + wxDataViewModelNotifier* notifier = *iter; + if (!notifier->ItemChanged( item )) + ret = false; + } + + return ret; +} + +bool wxDataViewModel::ItemsAdded( const wxDataViewItem &parent, const wxDataViewItemArray &items ) +{ + bool ret = true; + + wxDataViewModelNotifiers::iterator iter; + for (iter = m_notifiers.begin(); iter != m_notifiers.end(); ++iter) + { + wxDataViewModelNotifier* notifier = *iter; + if (!notifier->ItemsAdded( parent, items )) + ret = false; + } + + return ret; +} + +bool wxDataViewModel::ItemsDeleted( const wxDataViewItem &parent, const wxDataViewItemArray &items ) +{ + bool ret = true; + + wxDataViewModelNotifiers::iterator iter; + for (iter = m_notifiers.begin(); iter != m_notifiers.end(); ++iter) + { + wxDataViewModelNotifier* notifier = *iter; + if (!notifier->ItemsDeleted( parent, items )) + ret = false; + } + + return ret; +} + +bool wxDataViewModel::ItemsChanged( const wxDataViewItemArray &items ) +{ + bool ret = true; + + wxDataViewModelNotifiers::iterator iter; + for (iter = m_notifiers.begin(); iter != m_notifiers.end(); ++iter) + { + wxDataViewModelNotifier* notifier = *iter; + if (!notifier->ItemsChanged( items )) + ret = false; + } + + return ret; +} + +bool wxDataViewModel::ValueChanged( const wxDataViewItem &item, unsigned int col ) +{ + bool ret = true; + + wxDataViewModelNotifiers::iterator iter; + for (iter = m_notifiers.begin(); iter != m_notifiers.end(); ++iter) + { + wxDataViewModelNotifier* notifier = *iter; + if (!notifier->ValueChanged( item, col )) + ret = false; + } + + return ret; +} + +bool wxDataViewModel::Cleared() +{ + bool ret = true; + + wxDataViewModelNotifiers::iterator iter; + for (iter = m_notifiers.begin(); iter != m_notifiers.end(); ++iter) + { + wxDataViewModelNotifier* notifier = *iter; + if (!notifier->Cleared()) + ret = false; + } + + return ret; +} + +bool wxDataViewModel::BeforeReset() +{ + bool ret = true; + + wxDataViewModelNotifiers::iterator iter; + for (iter = m_notifiers.begin(); iter != m_notifiers.end(); ++iter) + { + wxDataViewModelNotifier* notifier = *iter; + if (!notifier->BeforeReset()) + ret = false; + } + + return ret; +} + +bool wxDataViewModel::AfterReset() +{ + bool ret = true; + + wxDataViewModelNotifiers::iterator iter; + for (iter = m_notifiers.begin(); iter != m_notifiers.end(); ++iter) + { + wxDataViewModelNotifier* notifier = *iter; + if (!notifier->AfterReset()) + ret = false; + } + + return ret; +} + +void wxDataViewModel::Resort() +{ + wxDataViewModelNotifiers::iterator iter; + for (iter = m_notifiers.begin(); iter != m_notifiers.end(); ++iter) + { + wxDataViewModelNotifier* notifier = *iter; + notifier->Resort(); + } +} + +void wxDataViewModel::AddNotifier( wxDataViewModelNotifier *notifier ) +{ + m_notifiers.push_back( notifier ); + notifier->SetOwner( this ); +} + +void wxDataViewModel::RemoveNotifier( wxDataViewModelNotifier *notifier ) +{ + m_notifiers.DeleteObject( notifier ); +} + +int wxDataViewModel::Compare( const wxDataViewItem &item1, const wxDataViewItem &item2, + unsigned int column, bool ascending ) const +{ + wxVariant value1,value2; + GetValue( value1, item1, column ); + GetValue( value2, item2, column ); + + if (!ascending) + { + wxVariant temp = value1; + value1 = value2; + value2 = temp; + } + + if (value1.GetType() == wxT("string")) + { + wxString str1 = value1.GetString(); + wxString str2 = value2.GetString(); + int res = str1.Cmp( str2 ); + if (res) + return res; + } + else if (value1.GetType() == wxT("long")) + { + long l1 = value1.GetLong(); + long l2 = value2.GetLong(); + if (l1 < l2) + return -1; + else if (l1 > l2) + return 1; + } + else if (value1.GetType() == wxT("double")) + { + double d1 = value1.GetDouble(); + double d2 = value2.GetDouble(); + if (d1 < d2) + return -1; + else if (d1 > d2) + return 1; + } + else if (value1.GetType() == wxT("datetime")) + { + wxDateTime dt1 = value1.GetDateTime(); + wxDateTime dt2 = value2.GetDateTime(); + if (dt1.IsEarlierThan(dt2)) + return -1; + if (dt2.IsEarlierThan(dt1)) + return 1; + } + else if (value1.GetType() == wxT("bool")) + { + bool b1 = value1.GetBool(); + bool b2 = value2.GetBool(); + + if (b1 != b2) + return b1 ? 1 : -1; + } + else if (value1.GetType() == wxT("wxDataViewIconText")) + { + wxDataViewIconText iconText1, iconText2; + + iconText1 << value1; + iconText2 << value2; + + int res = iconText1.GetText().Cmp(iconText2.GetText()); + if (res != 0) + return res; + } + + + // items must be different + wxUIntPtr id1 = wxPtrToUInt(item1.GetID()), + id2 = wxPtrToUInt(item2.GetID()); + + return ascending ? id1 - id2 : id2 - id1; +} + +// --------------------------------------------------------- +// wxDataViewIndexListModel +// --------------------------------------------------------- + +static int my_sort( int *v1, int *v2 ) +{ + return *v2-*v1; +} + + +wxDataViewIndexListModel::wxDataViewIndexListModel( unsigned int initial_size ) +{ + // IDs are ordered until an item gets deleted or inserted + m_ordered = true; + + // build initial index + unsigned int i; + for (i = 1; i < initial_size+1; i++) + m_hash.Add( wxDataViewItem(wxUIntToPtr(i)) ); + m_nextFreeID = initial_size + 1; +} + +void wxDataViewIndexListModel::Reset( unsigned int new_size ) +{ + /* wxDataViewModel:: */ BeforeReset(); + + m_hash.Clear(); + + // IDs are ordered until an item gets deleted or inserted + m_ordered = true; + + // build initial index + unsigned int i; + for (i = 1; i < new_size+1; i++) + m_hash.Add( wxDataViewItem(wxUIntToPtr(i)) ); + + m_nextFreeID = new_size + 1; + + /* wxDataViewModel:: */ AfterReset(); +} + +void wxDataViewIndexListModel::RowPrepended() +{ + m_ordered = false; + + unsigned int id = m_nextFreeID; + m_nextFreeID++; + + wxDataViewItem item( wxUIntToPtr(id) ); + m_hash.Insert( item, 0 ); + ItemAdded( wxDataViewItem(0), item ); + +} + +void wxDataViewIndexListModel::RowInserted( unsigned int before ) +{ + m_ordered = false; + + unsigned int id = m_nextFreeID; + m_nextFreeID++; + + wxDataViewItem item( wxUIntToPtr(id) ); + m_hash.Insert( item, before ); + ItemAdded( wxDataViewItem(0), item ); +} + +void wxDataViewIndexListModel::RowAppended() +{ + unsigned int id = m_nextFreeID; + m_nextFreeID++; + + wxDataViewItem item( wxUIntToPtr(id) ); + m_hash.Add( item ); + ItemAdded( wxDataViewItem(0), item ); +} + +void wxDataViewIndexListModel::RowDeleted( unsigned int row ) +{ + m_ordered = false; + + wxDataViewItem item( m_hash[row] ); + m_hash.RemoveAt( row ); + /* wxDataViewModel:: */ ItemDeleted( wxDataViewItem(0), item ); +} + +void wxDataViewIndexListModel::RowsDeleted( const wxArrayInt &rows ) +{ + m_ordered = false; + + wxDataViewItemArray array; + unsigned int i; + for (i = 0; i < rows.GetCount(); i++) + { + wxDataViewItem item( m_hash[rows[i]] ); + array.Add( item ); + } + + wxArrayInt sorted = rows; + sorted.Sort( my_sort ); + for (i = 0; i < sorted.GetCount(); i++) + m_hash.RemoveAt( sorted[i] ); + + /* wxDataViewModel:: */ ItemsDeleted( wxDataViewItem(0), array ); +} + +void wxDataViewIndexListModel::RowChanged( unsigned int row ) +{ + /* wxDataViewModel:: */ ItemChanged( GetItem(row) ); +} + +void wxDataViewIndexListModel::RowValueChanged( unsigned int row, unsigned int col ) +{ + /* wxDataViewModel:: */ ValueChanged( GetItem(row), col ); +} + +unsigned int wxDataViewIndexListModel::GetRow( const wxDataViewItem &item ) const +{ + if (m_ordered) + return wxPtrToUInt(item.GetID())-1; + + // assert for not found + return (unsigned int) m_hash.Index( item ); +} + +wxDataViewItem wxDataViewIndexListModel::GetItem( unsigned int row ) const +{ + wxASSERT( row < m_hash.GetCount() ); + return wxDataViewItem( m_hash[row] ); +} + +unsigned int wxDataViewIndexListModel::GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const +{ + if (item.IsOk()) + return 0; + + children = m_hash; + + return m_hash.GetCount(); +} + +// --------------------------------------------------------- +// wxDataViewVirtualListModel +// --------------------------------------------------------- + +#ifndef __WXMAC__ + +wxDataViewVirtualListModel::wxDataViewVirtualListModel( unsigned int initial_size ) +{ + m_size = initial_size; +} + +void wxDataViewVirtualListModel::Reset( unsigned int new_size ) +{ + /* wxDataViewModel:: */ BeforeReset(); + + m_size = new_size; + + /* wxDataViewModel:: */ AfterReset(); +} + +void wxDataViewVirtualListModel::RowPrepended() +{ + m_size++; + wxDataViewItem item( wxUIntToPtr(1) ); + ItemAdded( wxDataViewItem(0), item ); +} + +void wxDataViewVirtualListModel::RowInserted( unsigned int before ) +{ + m_size++; + wxDataViewItem item( wxUIntToPtr(before+1) ); + ItemAdded( wxDataViewItem(0), item ); +} + +void wxDataViewVirtualListModel::RowAppended() +{ + m_size++; + wxDataViewItem item( wxUIntToPtr(m_size) ); + ItemAdded( wxDataViewItem(0), item ); +} + +void wxDataViewVirtualListModel::RowDeleted( unsigned int row ) +{ + m_size--; + wxDataViewItem item( wxUIntToPtr(row+1) ); + /* wxDataViewModel:: */ ItemDeleted( wxDataViewItem(0), item ); +} + +void wxDataViewVirtualListModel::RowsDeleted( const wxArrayInt &rows ) +{ + m_size -= rows.GetCount(); + + wxArrayInt sorted = rows; + sorted.Sort( my_sort ); + + wxDataViewItemArray array; + unsigned int i; + for (i = 0; i < sorted.GetCount(); i++) + { + wxDataViewItem item( wxUIntToPtr(sorted[i]+1) ); + array.Add( item ); + } + /* wxDataViewModel:: */ ItemsDeleted( wxDataViewItem(0), array ); +} + +void wxDataViewVirtualListModel::RowChanged( unsigned int row ) +{ + /* wxDataViewModel:: */ ItemChanged( GetItem(row) ); +} + +void wxDataViewVirtualListModel::RowValueChanged( unsigned int row, unsigned int col ) +{ + /* wxDataViewModel:: */ ValueChanged( GetItem(row), col ); +} + +unsigned int wxDataViewVirtualListModel::GetRow( const wxDataViewItem &item ) const +{ + return wxPtrToUInt( item.GetID() ) -1; +} + +wxDataViewItem wxDataViewVirtualListModel::GetItem( unsigned int row ) const +{ + return wxDataViewItem( wxUIntToPtr(row+1) ); +} + +bool wxDataViewVirtualListModel::HasDefaultCompare() const +{ + return true; +} + +int wxDataViewVirtualListModel::Compare(const wxDataViewItem& item1, + const wxDataViewItem& item2, + unsigned int WXUNUSED(column), + bool ascending) const +{ + unsigned int pos1 = wxPtrToUInt(item1.GetID()); // -1 not needed here + unsigned int pos2 = wxPtrToUInt(item2.GetID()); // -1 not needed here + + if (ascending) + return pos1 - pos2; + else + return pos2 - pos1; +} + +unsigned int wxDataViewVirtualListModel::GetChildren( const wxDataViewItem &WXUNUSED(item), wxDataViewItemArray &WXUNUSED(children) ) const +{ + return 0; // should we report an error ? +} + +#endif // __WXMAC__ + +//----------------------------------------------------------------------------- +// wxDataViewIconText +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxDataViewIconText,wxObject) + +IMPLEMENT_VARIANT_OBJECT_EXPORTED(wxDataViewIconText, WXDLLIMPEXP_ADV) + +// --------------------------------------------------------- +// wxDataViewRendererBase +// --------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxDataViewRendererBase, wxObject) + +wxDataViewRendererBase::wxDataViewRendererBase( const wxString &varianttype, + wxDataViewCellMode WXUNUSED(mode), + int WXUNUSED(align) ) +{ + m_variantType = varianttype; + m_owner = NULL; +} + +wxDataViewRendererBase::~wxDataViewRendererBase() +{ + if ( m_editorCtrl ) + DestroyEditControl(); +} + +wxDataViewCtrl* wxDataViewRendererBase::GetView() const +{ + return const_cast(this)->GetOwner()->GetOwner(); +} + +bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect labelRect ) +{ + wxDataViewCtrl* dv_ctrl = GetOwner()->GetOwner(); + + // Before doing anything we send an event asking if editing of this item is really wanted. + wxDataViewEvent start_event( wxEVT_DATAVIEW_ITEM_START_EDITING, dv_ctrl->GetId() ); + start_event.SetDataViewColumn( GetOwner() ); + start_event.SetModel( dv_ctrl->GetModel() ); + start_event.SetItem( item ); + start_event.SetEventObject( dv_ctrl ); + dv_ctrl->GetEventHandler()->ProcessEvent( start_event ); + if( !start_event.IsAllowed() ) + return false; + + m_item = item; // remember for later + + unsigned int col = GetOwner()->GetModelColumn(); + wxVariant value; + dv_ctrl->GetModel()->GetValue( value, item, col ); + + m_editorCtrl = CreateEditorCtrl( dv_ctrl->GetMainWindow(), labelRect, value ); + + // there might be no editor control for the given item + if(!m_editorCtrl) + return false; + + wxDataViewEditorCtrlEvtHandler *handler = + new wxDataViewEditorCtrlEvtHandler( m_editorCtrl, (wxDataViewRenderer*) this ); + + m_editorCtrl->PushEventHandler( handler ); + +#if defined(__WXGTK20__) && !defined(wxUSE_GENERICDATAVIEWCTRL) + handler->SetFocusOnIdle(); +#else + m_editorCtrl->SetFocus(); +#endif + + // Now we should send Editing Started event + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_EDITING_STARTED, dv_ctrl->GetId() ); + event.SetDataViewColumn( GetOwner() ); + event.SetModel( dv_ctrl->GetModel() ); + event.SetItem( item ); + event.SetEventObject( dv_ctrl ); + dv_ctrl->GetEventHandler()->ProcessEvent( event ); + + return true; +} + +void wxDataViewRendererBase::DestroyEditControl() +{ + // Remove our event handler first to prevent it from (recursively) calling + // us again as it would do via a call to FinishEditing() when the editor + // loses focus when we hide it below. + wxEvtHandler * const handler = m_editorCtrl->PopEventHandler(); + + // Hide the control immediately but don't delete it yet as there could be + // some pending messages for it. + m_editorCtrl->Hide(); + + wxPendingDelete.Append(handler); + wxPendingDelete.Append(m_editorCtrl); + + // Ensure that DestroyEditControl() is not called again for this control. + m_editorCtrl.Release(); +} + +void wxDataViewRendererBase::CancelEditing() +{ + if (!m_editorCtrl) + return; + + DestroyEditControl(); +} + +bool wxDataViewRendererBase::FinishEditing() +{ + if (!m_editorCtrl) + return true; + + wxVariant value; + GetValueFromEditorCtrl( m_editorCtrl, value ); + + wxDataViewCtrl* dv_ctrl = GetOwner()->GetOwner(); + + DestroyEditControl(); + + dv_ctrl->GetMainWindow()->SetFocus(); + + bool isValid = Validate(value); + unsigned int col = GetOwner()->GetModelColumn(); + + // Now we should send Editing Done event + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_EDITING_DONE, dv_ctrl->GetId() ); + event.SetDataViewColumn( GetOwner() ); + event.SetModel( dv_ctrl->GetModel() ); + event.SetItem( m_item ); + event.SetValue( value ); + event.SetColumn( col ); + event.SetEditCanceled( !isValid ); + event.SetEventObject( dv_ctrl ); + dv_ctrl->GetEventHandler()->ProcessEvent( event ); + + if ( isValid && event.IsAllowed() ) + { + dv_ctrl->GetModel()->ChangeValue(value, m_item, col); + return true; + } + + return false; +} + +void wxDataViewRendererBase::PrepareForItem(const wxDataViewModel *model, + const wxDataViewItem& item, + unsigned column) +{ + wxVariant value; + model->GetValue(value, item, column); + SetValue(value); + + wxDataViewItemAttr attr; + model->GetAttr(item, column, attr); + SetAttr(attr); + + SetEnabled(model->IsEnabled(item, column)); +} + + +int wxDataViewRendererBase::GetEffectiveAlignment() const +{ + int alignment = GetAlignment(); + + if ( alignment == wxDVR_DEFAULT_ALIGNMENT ) + { + // if we don't have an explicit alignment ourselves, use that of the + // column in horizontal direction and default vertical alignment + alignment = GetOwner()->GetAlignment() | wxALIGN_CENTRE_VERTICAL; + } + + return alignment; +} + +// ---------------------------------------------------------------------------- +// wxDataViewCustomRendererBase +// ---------------------------------------------------------------------------- + +bool wxDataViewCustomRendererBase::ActivateCell(const wxRect& cell, + wxDataViewModel *model, + const wxDataViewItem & item, + unsigned int col, + const wxMouseEvent* mouseEvent) +{ + // Compatibility code + if ( mouseEvent ) + return LeftClick(mouseEvent->GetPosition(), cell, model, item, col); + else + return Activate(cell, model, item, col); +} + +void wxDataViewCustomRendererBase::RenderBackground(wxDC* dc, const wxRect& rect) +{ + if ( !m_attr.HasBackgroundColour() ) + return; + + const wxColour& colour = m_attr.GetBackgroundColour(); + wxDCPenChanger changePen(*dc, colour); + wxDCBrushChanger changeBrush(*dc, colour); + + dc->DrawRectangle(rect); +} + +void +wxDataViewCustomRendererBase::WXCallRender(wxRect rectCell, wxDC *dc, int state) +{ + wxCHECK_RET( dc, "no DC to draw on in custom renderer?" ); + + // adjust the rectangle ourselves to account for the alignment + wxRect rectItem = rectCell; + const int align = GetEffectiveAlignment(); + + const wxSize size = GetSize(); + + // take alignment into account only if there is enough space, otherwise + // show as much contents as possible + // + // notice that many existing renderers (e.g. wxDataViewSpinRenderer) + // return hard-coded size which can be more than they need and if we + // trusted their GetSize() we'd draw the text out of cell bounds + // entirely + + if ( size.x >= 0 && size.x < rectCell.width ) + { + if ( align & wxALIGN_CENTER_HORIZONTAL ) + rectItem.x += (rectCell.width - size.x)/2; + else if ( align & wxALIGN_RIGHT ) + rectItem.x += rectCell.width - size.x; + // else: wxALIGN_LEFT is the default + + rectItem.width = size.x; + } + + if ( size.y >= 0 && size.y < rectCell.height ) + { + if ( align & wxALIGN_CENTER_VERTICAL ) + rectItem.y += (rectCell.height - size.y)/2; + else if ( align & wxALIGN_BOTTOM ) + rectItem.y += rectCell.height - size.y; + // else: wxALIGN_TOP is the default + + rectItem.height = size.y; + } + + + // set up the DC attributes + + // override custom foreground with the standard one for the selected items + // because we currently don't allow changing the selection background and + // custom colours may be unreadable on it + wxColour col; + if ( state & wxDATAVIEW_CELL_SELECTED ) + col = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + else if ( m_attr.HasColour() ) + col = m_attr.GetColour(); + else // use default foreground + col = GetOwner()->GetOwner()->GetForegroundColour(); + + wxDCTextColourChanger changeFg(*dc, col); + + wxDCFontChanger changeFont(*dc); + if ( m_attr.HasFont() ) + changeFont.Set(m_attr.GetEffectiveFont(dc->GetFont())); + + Render(rectItem, dc, state); +} + +wxSize wxDataViewCustomRendererBase::GetTextExtent(const wxString& str) const +{ + const wxDataViewCtrl *view = GetView(); + + if ( m_attr.HasFont() ) + { + wxFont font(m_attr.GetEffectiveFont(view->GetFont())); + wxSize size; + view->GetTextExtent(str, &size.x, &size.y, NULL, NULL, &font); + return size; + } + else + { + return view->GetTextExtent(str); + } +} + +void +wxDataViewCustomRendererBase::RenderText(const wxString& text, + int xoffset, + wxRect rect, + wxDC *dc, + int WXUNUSED(state)) +{ + wxRect rectText = rect; + rectText.x += xoffset; + rectText.width -= xoffset; + + // check if we want to ellipsize the text if it doesn't fit + wxString ellipsizedText; + if ( GetEllipsizeMode() != wxELLIPSIZE_NONE ) + { + ellipsizedText = wxControl::Ellipsize + ( + text, + *dc, + GetEllipsizeMode(), + rectText.width, + wxELLIPSIZE_FLAGS_NONE + ); + } + + // get the alignment to use + dc->DrawLabel(ellipsizedText.empty() ? text : ellipsizedText, + rectText, GetEffectiveAlignment()); +} + +//----------------------------------------------------------------------------- +// wxDataViewEditorCtrlEvtHandler +//----------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxDataViewEditorCtrlEvtHandler, wxEvtHandler) + EVT_CHAR (wxDataViewEditorCtrlEvtHandler::OnChar) + EVT_KILL_FOCUS (wxDataViewEditorCtrlEvtHandler::OnKillFocus) + EVT_IDLE (wxDataViewEditorCtrlEvtHandler::OnIdle) + EVT_TEXT_ENTER (-1, wxDataViewEditorCtrlEvtHandler::OnTextEnter) +END_EVENT_TABLE() + +void wxDataViewEditorCtrlEvtHandler::OnIdle( wxIdleEvent &event ) +{ + if (m_focusOnIdle) + { + m_focusOnIdle = false; + if (wxWindow::FindFocus() != m_editorCtrl) + m_editorCtrl->SetFocus(); + } + + event.Skip(); +} + +void wxDataViewEditorCtrlEvtHandler::OnTextEnter( wxCommandEvent &WXUNUSED(event) ) +{ + m_finished = true; + m_owner->FinishEditing(); +} + +void wxDataViewEditorCtrlEvtHandler::OnChar( wxKeyEvent &event ) +{ + switch ( event.m_keyCode ) + { + case WXK_RETURN: + m_finished = true; + m_owner->FinishEditing(); + break; + + case WXK_ESCAPE: + { + m_finished = true; + m_owner->CancelEditing(); + break; + } + default: + event.Skip(); + } +} + +void wxDataViewEditorCtrlEvtHandler::OnKillFocus( wxFocusEvent &event ) +{ + if (!m_finished) + { + m_finished = true; + m_owner->FinishEditing(); + } + + event.Skip(); +} + +// --------------------------------------------------------- +// wxDataViewColumnBase +// --------------------------------------------------------- + +void wxDataViewColumnBase::Init(wxDataViewRenderer *renderer, + unsigned int model_column) +{ + m_renderer = renderer; + m_model_column = model_column; + m_owner = NULL; + m_renderer->SetOwner( (wxDataViewColumn*) this ); +} + +wxDataViewColumnBase::~wxDataViewColumnBase() +{ + delete m_renderer; +} + +// --------------------------------------------------------- +// wxDataViewCtrlBase +// --------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxDataViewCtrlBase, wxControl) + +wxDataViewCtrlBase::wxDataViewCtrlBase() +{ + m_model = NULL; + m_expander_column = 0; + m_indent = 8; +} + +wxDataViewCtrlBase::~wxDataViewCtrlBase() +{ + if (m_model) + { + m_model->DecRef(); + m_model = NULL; + } +} + +bool wxDataViewCtrlBase::AssociateModel( wxDataViewModel *model ) +{ + if (m_model) + { + m_model->DecRef(); // discard old model, if any + } + + // add our own reference to the new model: + m_model = model; + if (m_model) + { + m_model->IncRef(); + } + + return true; +} + +wxDataViewModel* wxDataViewCtrlBase::GetModel() +{ + return m_model; +} + +const wxDataViewModel* wxDataViewCtrlBase::GetModel() const +{ + return m_model; +} + +void wxDataViewCtrlBase::ExpandAncestors( const wxDataViewItem & item ) +{ + if (!m_model) return; + + if (!item.IsOk()) return; + + wxVector parentChain; + + // at first we get all the parents of the selected item + wxDataViewItem parent = m_model->GetParent(item); + while (parent.IsOk()) + { + parentChain.push_back(parent); + parent = m_model->GetParent(parent); + } + + // then we expand the parents, starting at the root + while (!parentChain.empty()) + { + Expand(parentChain.back()); + parentChain.pop_back(); + } +} + +wxDataViewItem wxDataViewCtrlBase::GetCurrentItem() const +{ + return HasFlag(wxDV_MULTIPLE) ? DoGetCurrentItem() + : GetSelection(); +} + +void wxDataViewCtrlBase::SetCurrentItem(const wxDataViewItem& item) +{ + wxCHECK_RET( item.IsOk(), "Can't make current an invalid item." ); + + if ( HasFlag(wxDV_MULTIPLE) ) + DoSetCurrentItem(item); + else + Select(item); +} + +wxDataViewItem wxDataViewCtrlBase::GetSelection() const +{ + if ( GetSelectedItemsCount() != 1 ) + return wxDataViewItem(); + + wxDataViewItemArray selections; + GetSelections(selections); + return selections[0]; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendTextColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewTextRenderer( wxT("string"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendIconTextColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewIconTextRenderer( wxT("wxDataViewIconText"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendToggleColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewToggleRenderer( wxT("bool"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendProgressColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewProgressRenderer( wxEmptyString, wxT("long"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendDateColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewDateRenderer( wxT("datetime"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendBitmapColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewBitmapRenderer( wxT("wxBitmap"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendTextColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewTextRenderer( wxT("string"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendIconTextColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewIconTextRenderer( wxT("wxDataViewIconText"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendToggleColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewToggleRenderer( wxT("bool"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendProgressColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewProgressRenderer( wxEmptyString, wxT("long"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendDateColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewDateRenderer( wxT("datetime"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::AppendBitmapColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewBitmapRenderer( wxT("wxBitmap"), mode ), + model_column, width, align, flags ); + AppendColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependTextColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewTextRenderer( wxT("string"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependIconTextColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewIconTextRenderer( wxT("wxDataViewIconText"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependToggleColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewToggleRenderer( wxT("bool"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependProgressColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewProgressRenderer( wxEmptyString, wxT("long"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependDateColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewDateRenderer( wxT("datetime"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependBitmapColumn( const wxString &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewBitmapRenderer( wxT("wxBitmap"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependTextColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewTextRenderer( wxT("string"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependIconTextColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewIconTextRenderer( wxT("wxDataViewIconText"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependToggleColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewToggleRenderer( wxT("bool"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependProgressColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewProgressRenderer( wxEmptyString, wxT("long"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependDateColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewDateRenderer( wxT("datetime"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +wxDataViewColumn * +wxDataViewCtrlBase::PrependBitmapColumn( const wxBitmap &label, unsigned int model_column, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewBitmapRenderer( wxT("wxBitmap"), mode ), + model_column, width, align, flags ); + PrependColumn( ret ); + return ret; +} + +bool +wxDataViewCtrlBase::AppendColumn( wxDataViewColumn *col ) +{ + col->SetOwner( (wxDataViewCtrl*) this ); + return true; +} + +bool +wxDataViewCtrlBase::PrependColumn( wxDataViewColumn *col ) +{ + col->SetOwner( (wxDataViewCtrl*) this ); + return true; +} + +bool +wxDataViewCtrlBase::InsertColumn( unsigned int WXUNUSED(pos), wxDataViewColumn *col ) +{ + col->SetOwner( (wxDataViewCtrl*) this ); + return true; +} + +void wxDataViewCtrlBase::StartEditor(const wxDataViewItem& item, unsigned int column) +{ + EditItem(item, GetColumn(column)); +} + +// --------------------------------------------------------- +// wxDataViewEvent +// --------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxDataViewEvent,wxNotifyEvent) + +wxDEFINE_EVENT( wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent ); + +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent ); + +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent ); + +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_SORTED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent ); + +wxDEFINE_EVENT( wxEVT_DATAVIEW_CACHE_HINT, wxDataViewEvent ); + +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_DROP, wxDataViewEvent ); + + + +// ------------------------------------- +// wxDataViewSpinRenderer +// ------------------------------------- + +wxDataViewSpinRenderer::wxDataViewSpinRenderer( int min, int max, wxDataViewCellMode mode, int alignment ) : + wxDataViewCustomRenderer(wxT("long"), mode, alignment ) +{ + m_min = min; + m_max = max; +} + +wxWindow* wxDataViewSpinRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ) +{ + long l = value; + wxSize size = labelRect.GetSize(); +#ifdef __WXMAC__ + size = wxSize( wxMax(70,labelRect.width ), -1 ); +#endif + wxString str; + str.Printf( wxT("%d"), (int) l ); + wxSpinCtrl *sc = new wxSpinCtrl( parent, wxID_ANY, str, + labelRect.GetTopLeft(), size, wxSP_ARROW_KEYS|wxTE_PROCESS_ENTER, m_min, m_max, l ); +#ifdef __WXMAC__ + size = sc->GetSize(); + wxPoint pt = sc->GetPosition(); + sc->SetSize( pt.x - 4, pt.y - 4, size.x, size.y ); +#endif + + return sc; +} + +bool wxDataViewSpinRenderer::GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ) +{ + wxSpinCtrl *sc = (wxSpinCtrl*) editor; + long l = sc->GetValue(); + value = l; + return true; +} + +bool wxDataViewSpinRenderer::Render( wxRect rect, wxDC *dc, int state ) +{ + wxString str; + str.Printf(wxT("%d"), (int) m_data ); + RenderText( str, 0, rect, dc, state ); + return true; +} + +wxSize wxDataViewSpinRenderer::GetSize() const +{ + wxSize sz = GetTextExtent(wxString::Format("%d", (int)m_data)); + + // Allow some space for the spin buttons, which is approximately the size + // of a scrollbar (and getting pixel-exact value would be complicated). + // Also add some whitespace between the text and the button: + sz.x += wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); + sz.x += GetTextExtent("M").x; + + return sz; +} + +bool wxDataViewSpinRenderer::SetValue( const wxVariant &value ) +{ + m_data = value.GetLong(); + return true; +} + +bool wxDataViewSpinRenderer::GetValue( wxVariant &value ) const +{ + value = m_data; + return true; +} + +// ------------------------------------- +// wxDataViewChoiceRenderer +// ------------------------------------- + +#if defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(__WXOSX_CARBON__) + +wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString& choices, wxDataViewCellMode mode, int alignment ) : + wxDataViewCustomRenderer(wxT("string"), mode, alignment ) +{ + m_choices = choices; +} + +wxWindow* wxDataViewChoiceRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ) +{ + wxChoice* c = new wxChoice + ( + parent, + wxID_ANY, + labelRect.GetTopLeft(), + wxSize(labelRect.GetWidth(), -1), + m_choices + ); + c->Move(labelRect.GetRight() - c->GetRect().width, wxDefaultCoord); + c->SetStringSelection( value.GetString() ); + return c; +} + +bool wxDataViewChoiceRenderer::GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ) +{ + wxChoice *c = (wxChoice*) editor; + wxString s = c->GetStringSelection(); + value = s; + return true; +} + +bool wxDataViewChoiceRenderer::Render( wxRect rect, wxDC *dc, int state ) +{ + RenderText( m_data, 0, rect, dc, state ); + return true; +} + +wxSize wxDataViewChoiceRenderer::GetSize() const +{ + wxSize sz; + + for ( wxArrayString::const_iterator i = m_choices.begin(); i != m_choices.end(); ++i ) + sz.IncTo(GetTextExtent(*i)); + + // Allow some space for the right-side button, which is approximately the + // size of a scrollbar (and getting pixel-exact value would be complicated). + // Also add some whitespace between the text and the button: + sz.x += wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); + sz.x += GetTextExtent("M").x; + + return sz; +} + +bool wxDataViewChoiceRenderer::SetValue( const wxVariant &value ) +{ + m_data = value.GetString(); + return true; +} + +bool wxDataViewChoiceRenderer::GetValue( wxVariant &value ) const +{ + value = m_data; + return true; +} + +// ---------------------------------------------------------------------------- +// wxDataViewChoiceByIndexRenderer +// ---------------------------------------------------------------------------- + +wxDataViewChoiceByIndexRenderer::wxDataViewChoiceByIndexRenderer( const wxArrayString &choices, + wxDataViewCellMode mode, int alignment ) : + wxDataViewChoiceRenderer( choices, mode, alignment ) +{ +} + +wxWindow* wxDataViewChoiceByIndexRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ) +{ + wxVariant string_value = GetChoice( value.GetLong() ); + + return wxDataViewChoiceRenderer::CreateEditorCtrl( parent, labelRect, string_value ); +} + +bool wxDataViewChoiceByIndexRenderer::GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value ) +{ + wxVariant string_value; + if (!wxDataViewChoiceRenderer::GetValueFromEditorCtrl( editor, string_value )) + return false; + + value = (long) GetChoices().Index( string_value.GetString() ); + return true; +} + +bool wxDataViewChoiceByIndexRenderer::SetValue( const wxVariant &value ) +{ + wxVariant string_value = GetChoice( value.GetLong() ); + return wxDataViewChoiceRenderer::SetValue( string_value ); +} + +bool wxDataViewChoiceByIndexRenderer::GetValue( wxVariant &value ) const +{ + wxVariant string_value; + if (!wxDataViewChoiceRenderer::GetValue( string_value )) + return false; + + value = (long) GetChoices().Index( string_value.GetString() ); + return true; +} + +#endif + +// --------------------------------------------------------- +// wxDataViewDateRenderer +// --------------------------------------------------------- + +#if (defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(__WXGTK__)) && wxUSE_DATEPICKCTRL + +wxDataViewDateRenderer::wxDataViewDateRenderer(const wxString& varianttype, + wxDataViewCellMode mode, int align) + : wxDataViewCustomRenderer(varianttype, mode, align) +{ +} + +wxWindow * +wxDataViewDateRenderer::CreateEditorCtrl(wxWindow *parent, wxRect labelRect, const wxVariant& value) +{ + return new wxDatePickerCtrl + ( + parent, + wxID_ANY, + value.GetDateTime(), + labelRect.GetTopLeft(), + labelRect.GetSize() + ); +} + +bool wxDataViewDateRenderer::GetValueFromEditorCtrl(wxWindow *editor, wxVariant& value) +{ + wxDatePickerCtrl *ctrl = static_cast(editor); + value = ctrl->GetValue(); + return true; +} + +bool wxDataViewDateRenderer::SetValue(const wxVariant& value) +{ + m_date = value.GetDateTime(); + return true; +} + +bool wxDataViewDateRenderer::GetValue(wxVariant& value) const +{ + value = m_date; + return true; +} + +bool wxDataViewDateRenderer::Render(wxRect cell, wxDC* dc, int state) +{ + wxString tmp = m_date.FormatDate(); + RenderText( tmp, 0, cell, dc, state ); + return true; +} + +wxSize wxDataViewDateRenderer::GetSize() const +{ + return GetTextExtent(m_date.FormatDate()); +} + +#endif // (defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(__WXGTK__)) && wxUSE_DATEPICKCTRL + +//----------------------------------------------------------------------------- +// wxDataViewListStore +//----------------------------------------------------------------------------- + +wxDataViewListStore::wxDataViewListStore() +{ +} + +wxDataViewListStore::~wxDataViewListStore() +{ + wxVector::iterator it; + for (it = m_data.begin(); it != m_data.end(); ++it) + { + wxDataViewListStoreLine* line = *it; + delete line; + } +} + +void wxDataViewListStore::PrependColumn( const wxString &varianttype ) +{ + m_cols.Insert( varianttype, 0 ); +} + +void wxDataViewListStore::InsertColumn( unsigned int pos, const wxString &varianttype ) +{ + m_cols.Insert( varianttype, pos ); +} + +void wxDataViewListStore::AppendColumn( const wxString &varianttype ) +{ + m_cols.Add( varianttype ); +} + +unsigned int wxDataViewListStore::GetColumnCount() const +{ + return m_cols.GetCount(); +} + +unsigned int wxDataViewListStore::GetItemCount() const +{ + return m_data.size(); +} + +wxString wxDataViewListStore::GetColumnType( unsigned int pos ) const +{ + return m_cols[pos]; +} + +void wxDataViewListStore::AppendItem( const wxVector &values, wxUIntPtr data ) +{ + wxDataViewListStoreLine *line = new wxDataViewListStoreLine( data ); + line->m_values = values; + m_data.push_back( line ); + + RowAppended(); +} + +void wxDataViewListStore::PrependItem( const wxVector &values, wxUIntPtr data ) +{ + wxDataViewListStoreLine *line = new wxDataViewListStoreLine( data ); + line->m_values = values; + m_data.insert( m_data.begin(), line ); + + RowPrepended(); +} + +void wxDataViewListStore::InsertItem( unsigned int row, const wxVector &values, + wxUIntPtr data ) +{ + wxDataViewListStoreLine *line = new wxDataViewListStoreLine( data ); + line->m_values = values; + m_data.insert( m_data.begin()+row, line ); + + RowInserted( row ); +} + +void wxDataViewListStore::DeleteItem( unsigned int row ) +{ + wxVector::iterator it = m_data.begin() + row; + delete *it; + m_data.erase( it ); + + RowDeleted( row ); +} + +void wxDataViewListStore::DeleteAllItems() +{ + wxVector::iterator it; + for (it = m_data.begin(); it != m_data.end(); ++it) + { + wxDataViewListStoreLine* line = *it; + delete line; + } + + m_data.clear(); + + Reset( 0 ); +} + +void wxDataViewListStore::ClearColumns() +{ + m_cols.clear(); +} + +void wxDataViewListStore::SetItemData( const wxDataViewItem& item, wxUIntPtr data ) +{ + wxDataViewListStoreLine* line = m_data[GetRow(item)]; + if (!line) return; + + line->SetData( data ); +} + +wxUIntPtr wxDataViewListStore::GetItemData( const wxDataViewItem& item ) const +{ + wxDataViewListStoreLine* line = m_data[GetRow(item)]; + if (!line) return 0; + + return line->GetData(); +} + +void wxDataViewListStore::GetValueByRow( wxVariant &value, unsigned int row, unsigned int col ) const +{ + wxDataViewListStoreLine *line = m_data[row]; + value = line->m_values[col]; +} + +bool wxDataViewListStore::SetValueByRow( const wxVariant &value, unsigned int row, unsigned int col ) +{ + wxDataViewListStoreLine *line = m_data[row]; + line->m_values[col] = value; + + return true; +} + +//----------------------------------------------------------------------------- +// wxDataViewListCtrl +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxDataViewListCtrl,wxDataViewCtrl) + +BEGIN_EVENT_TABLE(wxDataViewListCtrl,wxDataViewCtrl) + EVT_SIZE( wxDataViewListCtrl::OnSize ) +END_EVENT_TABLE() + +wxDataViewListCtrl::wxDataViewListCtrl() +{ +} + +wxDataViewListCtrl::wxDataViewListCtrl( wxWindow *parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, long style, + const wxValidator& validator ) +{ + Create( parent, id, pos, size, style, validator ); +} + +wxDataViewListCtrl::~wxDataViewListCtrl() +{ +} + + +bool wxDataViewListCtrl::Create( wxWindow *parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, long style, + const wxValidator& validator ) +{ + if ( !wxDataViewCtrl::Create( parent, id, pos, size, style, validator ) ) + return false; + + wxDataViewListStore *store = new wxDataViewListStore; + AssociateModel( store ); + store->DecRef(); + + return true; +} + +bool wxDataViewListCtrl::AppendColumn( wxDataViewColumn *column, const wxString &varianttype ) +{ + GetStore()->AppendColumn( varianttype ); + return wxDataViewCtrl::AppendColumn( column ); +} + +bool wxDataViewListCtrl::PrependColumn( wxDataViewColumn *column, const wxString &varianttype ) +{ + GetStore()->PrependColumn( varianttype ); + return wxDataViewCtrl::PrependColumn( column ); +} + +bool wxDataViewListCtrl::InsertColumn( unsigned int pos, wxDataViewColumn *column, const wxString &varianttype ) +{ + GetStore()->InsertColumn( pos, varianttype ); + return wxDataViewCtrl::InsertColumn( pos, column ); +} + +bool wxDataViewListCtrl::PrependColumn( wxDataViewColumn *col ) +{ + return PrependColumn( col, col->GetRenderer()->GetVariantType() ); +} + +bool wxDataViewListCtrl::InsertColumn( unsigned int pos, wxDataViewColumn *col ) +{ + return InsertColumn( pos, col, col->GetRenderer()->GetVariantType() ); +} + +bool wxDataViewListCtrl::AppendColumn( wxDataViewColumn *col ) +{ + return AppendColumn( col, col->GetRenderer()->GetVariantType() ); +} + +bool wxDataViewListCtrl::ClearColumns() +{ + GetStore()->ClearColumns(); + return wxDataViewCtrl::ClearColumns(); +} + +wxDataViewColumn *wxDataViewListCtrl::AppendTextColumn( const wxString &label, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + GetStore()->AppendColumn( wxT("string") ); + + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewTextRenderer( wxT("string"), mode ), + GetStore()->GetColumnCount()-1, width, align, flags ); + + wxDataViewCtrl::AppendColumn( ret ); + + return ret; +} + +wxDataViewColumn *wxDataViewListCtrl::AppendToggleColumn( const wxString &label, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + GetStore()->AppendColumn( wxT("bool") ); + + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewToggleRenderer( wxT("bool"), mode ), + GetStore()->GetColumnCount()-1, width, align, flags ); + + wxDataViewCtrl::AppendColumn( ret ); + + return ret; +} + +wxDataViewColumn *wxDataViewListCtrl::AppendProgressColumn( const wxString &label, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + GetStore()->AppendColumn( wxT("long") ); + + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewProgressRenderer( wxEmptyString, wxT("long"), mode ), + GetStore()->GetColumnCount()-1, width, align, flags ); + + wxDataViewCtrl::AppendColumn( ret ); + + return ret; +} + +wxDataViewColumn *wxDataViewListCtrl::AppendIconTextColumn( const wxString &label, + wxDataViewCellMode mode, int width, wxAlignment align, int flags ) +{ + GetStore()->AppendColumn( wxT("wxDataViewIconText") ); + + wxDataViewColumn *ret = new wxDataViewColumn( label, + new wxDataViewIconTextRenderer( wxT("wxDataViewIconText"), mode ), + GetStore()->GetColumnCount()-1, width, align, flags ); + + wxDataViewCtrl::AppendColumn( ret ); + + return ret; +} + +void wxDataViewListCtrl::OnSize( wxSizeEvent &event ) +{ + event.Skip( true ); +} + +//----------------------------------------------------------------------------- +// wxDataViewTreeStore +//----------------------------------------------------------------------------- + +wxDataViewTreeStoreNode::wxDataViewTreeStoreNode( + wxDataViewTreeStoreNode *parent, + const wxString &text, const wxIcon &icon, wxClientData *data ) +{ + m_parent = parent; + m_text = text; + m_icon = icon; + m_data = data; +} + +wxDataViewTreeStoreNode::~wxDataViewTreeStoreNode() +{ + if (m_data) + delete m_data; +} + +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxDataViewTreeStoreNodeList) + +wxDataViewTreeStoreContainerNode::wxDataViewTreeStoreContainerNode( + wxDataViewTreeStoreNode *parent, const wxString &text, + const wxIcon &icon, const wxIcon &expanded, wxClientData *data ) : + wxDataViewTreeStoreNode( parent, text, icon, data ) +{ + m_iconExpanded = expanded; + m_isExpanded = false; + m_children.DeleteContents(true); +} + +wxDataViewTreeStoreContainerNode::~wxDataViewTreeStoreContainerNode() +{ +} + +//----------------------------------------------------------------------------- + +wxDataViewTreeStore::wxDataViewTreeStore() +{ + m_root = new wxDataViewTreeStoreContainerNode( NULL, wxEmptyString ); +} + +wxDataViewTreeStore::~wxDataViewTreeStore() +{ + delete m_root; +} + +wxDataViewItem wxDataViewTreeStore::AppendItem( const wxDataViewItem& parent, + const wxString &text, const wxIcon &icon, wxClientData *data ) +{ + wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent ); + if (!parent_node) return wxDataViewItem(0); + + wxDataViewTreeStoreNode *node = + new wxDataViewTreeStoreNode( parent_node, text, icon, data ); + parent_node->GetChildren().Append( node ); + + return node->GetItem(); +} + +wxDataViewItem wxDataViewTreeStore::PrependItem( const wxDataViewItem& parent, + const wxString &text, const wxIcon &icon, wxClientData *data ) +{ + wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent ); + if (!parent_node) return wxDataViewItem(0); + + wxDataViewTreeStoreNode *node = + new wxDataViewTreeStoreNode( parent_node, text, icon, data ); + parent_node->GetChildren().Insert( node ); + + return node->GetItem(); +} + +wxDataViewItem +wxDataViewTreeStore::InsertItem(const wxDataViewItem& parent, + const wxDataViewItem& previous, + const wxString& text, + const wxIcon& icon, + wxClientData *data) +{ + wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent ); + if (!parent_node) return wxDataViewItem(0); + + wxDataViewTreeStoreNode *previous_node = FindNode( previous ); + int pos = parent_node->GetChildren().IndexOf( previous_node ); + if (pos == wxNOT_FOUND) return wxDataViewItem(0); + + wxDataViewTreeStoreNode *node = + new wxDataViewTreeStoreNode( parent_node, text, icon, data ); + parent_node->GetChildren().Insert( (size_t) pos, node ); + + return node->GetItem(); +} + +wxDataViewItem wxDataViewTreeStore::PrependContainer( const wxDataViewItem& parent, + const wxString &text, const wxIcon &icon, const wxIcon &expanded, + wxClientData *data ) +{ + wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent ); + if (!parent_node) return wxDataViewItem(0); + + wxDataViewTreeStoreContainerNode *node = + new wxDataViewTreeStoreContainerNode( parent_node, text, icon, expanded, data ); + parent_node->GetChildren().Insert( node ); + + return node->GetItem(); +} + +wxDataViewItem +wxDataViewTreeStore::AppendContainer(const wxDataViewItem& parent, + const wxString &text, + const wxIcon& icon, + const wxIcon& expanded, + wxClientData * data) +{ + wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent ); + if (!parent_node) return wxDataViewItem(0); + + wxDataViewTreeStoreContainerNode *node = + new wxDataViewTreeStoreContainerNode( parent_node, text, icon, expanded, data ); + parent_node->GetChildren().Append( node ); + + return node->GetItem(); +} + +wxDataViewItem +wxDataViewTreeStore::InsertContainer(const wxDataViewItem& parent, + const wxDataViewItem& previous, + const wxString& text, + const wxIcon& icon, + const wxIcon& expanded, + wxClientData * data) +{ + wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent ); + if (!parent_node) return wxDataViewItem(0); + + wxDataViewTreeStoreNode *previous_node = FindNode( previous ); + int pos = parent_node->GetChildren().IndexOf( previous_node ); + if (pos == wxNOT_FOUND) return wxDataViewItem(0); + + wxDataViewTreeStoreContainerNode *node = + new wxDataViewTreeStoreContainerNode( parent_node, text, icon, expanded, data ); + parent_node->GetChildren().Insert( (size_t) pos, node ); + + return node->GetItem(); +} + +bool wxDataViewTreeStore::IsContainer( const wxDataViewItem& item ) const +{ + wxDataViewTreeStoreNode *node = FindNode( item ); + if (!node) return false; + + return node->IsContainer(); +} + +wxDataViewItem wxDataViewTreeStore::GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const +{ + wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent ); + if (!parent_node) return wxDataViewItem(0); + + wxDataViewTreeStoreNodeList::compatibility_iterator node = parent_node->GetChildren().Item( pos ); + if (node) + return wxDataViewItem(node->GetData()); + + return wxDataViewItem(0); +} + +int wxDataViewTreeStore::GetChildCount( const wxDataViewItem& parent ) const +{ + wxDataViewTreeStoreNode *node = FindNode( parent ); + if (!node) return -1; + + if (!node->IsContainer()) + return 0; + + wxDataViewTreeStoreContainerNode *container_node = (wxDataViewTreeStoreContainerNode*) node; + return (int) container_node->GetChildren().GetCount(); +} + +void wxDataViewTreeStore::SetItemText( const wxDataViewItem& item, const wxString &text ) +{ + wxDataViewTreeStoreNode *node = FindNode( item ); + if (!node) return; + + node->SetText( text ); +} + +wxString wxDataViewTreeStore::GetItemText( const wxDataViewItem& item ) const +{ + wxDataViewTreeStoreNode *node = FindNode( item ); + if (!node) return wxEmptyString; + + return node->GetText(); +} + +void wxDataViewTreeStore::SetItemIcon( const wxDataViewItem& item, const wxIcon &icon ) +{ + wxDataViewTreeStoreNode *node = FindNode( item ); + if (!node) return; + + node->SetIcon( icon ); +} + +const wxIcon &wxDataViewTreeStore::GetItemIcon( const wxDataViewItem& item ) const +{ + wxDataViewTreeStoreNode *node = FindNode( item ); + if (!node) return wxNullIcon; + + return node->GetIcon(); +} + +void wxDataViewTreeStore::SetItemExpandedIcon( const wxDataViewItem& item, const wxIcon &icon ) +{ + wxDataViewTreeStoreContainerNode *node = FindContainerNode( item ); + if (!node) return; + + node->SetExpandedIcon( icon ); +} + +const wxIcon &wxDataViewTreeStore::GetItemExpandedIcon( const wxDataViewItem& item ) const +{ + wxDataViewTreeStoreContainerNode *node = FindContainerNode( item ); + if (!node) return wxNullIcon; + + return node->GetExpandedIcon(); +} + +void wxDataViewTreeStore::SetItemData( const wxDataViewItem& item, wxClientData *data ) +{ + wxDataViewTreeStoreNode *node = FindNode( item ); + if (!node) return; + + node->SetData( data ); +} + +wxClientData *wxDataViewTreeStore::GetItemData( const wxDataViewItem& item ) const +{ + wxDataViewTreeStoreNode *node = FindNode( item ); + if (!node) return NULL; + + return node->GetData(); +} + +void wxDataViewTreeStore::DeleteItem( const wxDataViewItem& item ) +{ + if (!item.IsOk()) return; + + wxDataViewItem parent_item = GetParent( item ); + + wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent_item ); + if (!parent_node) return; + + parent_node->GetChildren().DeleteObject( FindNode(item) ); +} + +void wxDataViewTreeStore::DeleteChildren( const wxDataViewItem& item ) +{ + wxDataViewTreeStoreContainerNode *node = FindContainerNode( item ); + if (!node) return; + + node->GetChildren().clear(); +} + +void wxDataViewTreeStore::DeleteAllItems() +{ + DeleteChildren(wxDataViewItem(m_root)); +} + +void +wxDataViewTreeStore::GetValue(wxVariant &variant, + const wxDataViewItem &item, + unsigned int WXUNUSED(col)) const +{ + // if (col != 0) return; + + wxDataViewTreeStoreNode *node = FindNode( item ); + if (!node) return; + + wxIcon icon( node->GetIcon()); + if (node->IsContainer()) + { + wxDataViewTreeStoreContainerNode *container = (wxDataViewTreeStoreContainerNode*) node; + if (container->IsExpanded() && container->GetExpandedIcon().IsOk()) + icon = container->GetExpandedIcon(); + } + + wxDataViewIconText data( node->GetText(), icon ); + + variant << data; +} + +bool +wxDataViewTreeStore::SetValue(const wxVariant& variant, + const wxDataViewItem& item, + unsigned int WXUNUSED(col)) +{ + // if (col != 0) return false; + + wxDataViewTreeStoreNode *node = FindNode( item ); + if (!node) return false; + + wxDataViewIconText data; + + data << variant; + + node->SetText( data.GetText() ); + node->SetIcon( data.GetIcon() ); + + return true; +} + +wxDataViewItem wxDataViewTreeStore::GetParent( const wxDataViewItem &item ) const +{ + wxDataViewTreeStoreNode *node = FindNode( item ); + if (!node) return wxDataViewItem(0); + + wxDataViewTreeStoreNode *parent = node->GetParent(); + if (!parent) return wxDataViewItem(0); + + if (parent == m_root) + return wxDataViewItem(0); + + return parent->GetItem(); +} + +unsigned int wxDataViewTreeStore::GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const +{ + wxDataViewTreeStoreContainerNode *node = FindContainerNode( item ); + if (!node) return 0; + + wxDataViewTreeStoreNodeList::iterator iter; + for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++) + { + wxDataViewTreeStoreNode* child = *iter; + children.Add( child->GetItem() ); + } + + return node->GetChildren().GetCount(); +} + +int wxDataViewTreeStore::Compare( const wxDataViewItem &item1, const wxDataViewItem &item2, + unsigned int WXUNUSED(column), bool WXUNUSED(ascending) ) const +{ + wxDataViewTreeStoreNode *node1 = FindNode( item1 ); + wxDataViewTreeStoreNode *node2 = FindNode( item2 ); + + if (!node1 || !node2) + return 0; + + wxDataViewTreeStoreContainerNode* parent1 = + (wxDataViewTreeStoreContainerNode*) node1->GetParent(); + wxDataViewTreeStoreContainerNode* parent2 = + (wxDataViewTreeStoreContainerNode*) node2->GetParent(); + + if (parent1 != parent2) + { + wxLogError( wxT("Comparing items with different parent.") ); + return 0; + } + + if (node1->IsContainer() && !node2->IsContainer()) + return -1; + + if (node2->IsContainer() && !node1->IsContainer()) + return 1; + + return parent1->GetChildren().IndexOf( node1 ) - parent2->GetChildren().IndexOf( node2 ); +} + +wxDataViewTreeStoreNode *wxDataViewTreeStore::FindNode( const wxDataViewItem &item ) const +{ + if (!item.IsOk()) + return m_root; + + return (wxDataViewTreeStoreNode*) item.GetID(); +} + +wxDataViewTreeStoreContainerNode *wxDataViewTreeStore::FindContainerNode( const wxDataViewItem &item ) const +{ + if (!item.IsOk()) + return (wxDataViewTreeStoreContainerNode*) m_root; + + wxDataViewTreeStoreNode* node = (wxDataViewTreeStoreNode*) item.GetID(); + + if (!node->IsContainer()) + return NULL; + + return (wxDataViewTreeStoreContainerNode*) node; +} + +//----------------------------------------------------------------------------- +// wxDataViewTreeCtrl +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxDataViewTreeCtrl,wxDataViewCtrl) + +BEGIN_EVENT_TABLE(wxDataViewTreeCtrl,wxDataViewCtrl) + EVT_DATAVIEW_ITEM_EXPANDED(-1, wxDataViewTreeCtrl::OnExpanded) + EVT_DATAVIEW_ITEM_COLLAPSED(-1, wxDataViewTreeCtrl::OnCollapsed) + EVT_SIZE( wxDataViewTreeCtrl::OnSize ) +END_EVENT_TABLE() + +bool wxDataViewTreeCtrl::Create( wxWindow *parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator ) +{ + if ( !wxDataViewCtrl::Create( parent, id, pos, size, style, validator ) ) + return false; + + // create the standard model and a column in the tree + wxDataViewTreeStore *store = new wxDataViewTreeStore; + AssociateModel( store ); + store->DecRef(); + + AppendIconTextColumn + ( + wxString(), // no label (header is not shown anyhow) + 0, // the only model column + wxDATAVIEW_CELL_EDITABLE, + -1, // default width + wxALIGN_NOT, // and alignment + 0 // not resizable + ); + + return true; +} + +wxDataViewItem wxDataViewTreeCtrl::AppendItem( const wxDataViewItem& parent, + const wxString &text, int iconIndex, wxClientData *data ) +{ + wxDataViewItem res = GetStore()-> + AppendItem( parent, text, GetImage(iconIndex), data ); + + GetStore()->ItemAdded( parent, res ); + + return res; +} + +wxDataViewItem wxDataViewTreeCtrl::PrependItem( const wxDataViewItem& parent, + const wxString &text, int iconIndex, wxClientData *data ) +{ + wxDataViewItem res = GetStore()-> + PrependItem( parent, text, GetImage(iconIndex), data ); + + GetStore()->ItemAdded( parent, res ); + + return res; +} + +wxDataViewItem wxDataViewTreeCtrl::InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous, + const wxString &text, int iconIndex, wxClientData *data ) +{ + wxDataViewItem res = GetStore()-> + InsertItem( parent, previous, text, GetImage(iconIndex), data ); + + GetStore()->ItemAdded( parent, res ); + + return res; +} + +wxDataViewItem wxDataViewTreeCtrl::PrependContainer( const wxDataViewItem& parent, + const wxString &text, int iconIndex, int expandedIndex, wxClientData *data ) +{ + wxDataViewItem res = GetStore()-> + PrependContainer( parent, text, + GetImage(iconIndex), GetImage(expandedIndex), data ); + + GetStore()->ItemAdded( parent, res ); + + return res; +} + +wxDataViewItem wxDataViewTreeCtrl::AppendContainer( const wxDataViewItem& parent, + const wxString &text, int iconIndex, int expandedIndex, wxClientData *data ) +{ + wxDataViewItem res = GetStore()-> + AppendContainer( parent, text, + GetImage(iconIndex), GetImage(expandedIndex), data ); + + GetStore()->ItemAdded( parent, res ); + + return res; +} + +wxDataViewItem wxDataViewTreeCtrl::InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous, + const wxString &text, int iconIndex, int expandedIndex, wxClientData *data ) +{ + wxDataViewItem res = GetStore()-> + InsertContainer( parent, previous, text, + GetImage(iconIndex), GetImage(expandedIndex), data ); + + GetStore()->ItemAdded( parent, res ); + + return res; +} + +void wxDataViewTreeCtrl::SetItemText( const wxDataViewItem& item, const wxString &text ) +{ + GetStore()->SetItemText(item,text); + + // notify control + GetStore()->ValueChanged( item, 0 ); +} + +void wxDataViewTreeCtrl::SetItemIcon( const wxDataViewItem& item, const wxIcon &icon ) +{ + GetStore()->SetItemIcon(item,icon); + + // notify control + GetStore()->ValueChanged( item, 0 ); +} + +void wxDataViewTreeCtrl::SetItemExpandedIcon( const wxDataViewItem& item, const wxIcon &icon ) +{ + GetStore()->SetItemExpandedIcon(item,icon); + + // notify control + GetStore()->ValueChanged( item, 0 ); +} + +void wxDataViewTreeCtrl::DeleteItem( const wxDataViewItem& item ) +{ + wxDataViewItem parent_item = GetStore()->GetParent( item ); + + GetStore()->DeleteItem(item); + + // notify control + GetStore()->ItemDeleted( parent_item, item ); +} + +void wxDataViewTreeCtrl::DeleteChildren( const wxDataViewItem& item ) +{ + wxDataViewTreeStoreContainerNode *node = GetStore()->FindContainerNode( item ); + if (!node) return; + + wxDataViewItemArray array; + wxDataViewTreeStoreNodeList::iterator iter; + for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++) + { + wxDataViewTreeStoreNode* child = *iter; + array.Add( child->GetItem() ); + } + + GetStore()->DeleteChildren( item ); + + // notify control + GetStore()->ItemsDeleted( item, array ); +} + +void wxDataViewTreeCtrl::DeleteAllItems() +{ + GetStore()->DeleteAllItems(); + + GetStore()->Cleared(); +} + +void wxDataViewTreeCtrl::OnExpanded( wxDataViewEvent &event ) +{ + if (HasImageList()) return; + + wxDataViewTreeStoreContainerNode* container = GetStore()->FindContainerNode( event.GetItem() ); + if (!container) return; + + container->SetExpanded( true ); + + GetStore()->ItemChanged( event.GetItem() ); +} + +void wxDataViewTreeCtrl::OnCollapsed( wxDataViewEvent &event ) +{ + if (HasImageList()) return; + + wxDataViewTreeStoreContainerNode* container = GetStore()->FindContainerNode( event.GetItem() ); + if (!container) return; + + container->SetExpanded( false ); + + GetStore()->ItemChanged( event.GetItem() ); +} + +void wxDataViewTreeCtrl::OnSize( wxSizeEvent &event ) +{ +#if defined(wxUSE_GENERICDATAVIEWCTRL) + // automatically resize our only column to take the entire control width + if ( GetColumnCount() ) + { + wxSize size = GetClientSize(); + GetColumn(0)->SetWidth(size.x); + } +#endif + event.Skip( true ); +} + +#endif // wxUSE_DATAVIEWCTRL + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/datetime.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/datetime.cpp new file mode 100644 index 0000000000..669d0a3269 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/datetime.cpp @@ -0,0 +1,2328 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/datetime.cpp +// Purpose: implementation of time/date related classes +// (for formatting&parsing see datetimefmt.cpp) +// Author: Vadim Zeitlin +// Modified by: +// Created: 11.05.99 +// Copyright: (c) 1999 Vadim Zeitlin +// parts of code taken from sndcal library by Scott E. Lee: +// +// Copyright 1993-1995, Scott E. Lee, all rights reserved. +// Permission granted to use, copy, modify, distribute and sell +// so long as the above copyright and this permission statement +// are retained in all copies. +// +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +/* + * Implementation notes: + * + * 1. the time is stored as a 64bit integer containing the signed number of + * milliseconds since Jan 1. 1970 (the Unix Epoch) - so it is always + * expressed in GMT. + * + * 2. the range is thus something about 580 million years, but due to current + * algorithms limitations, only dates from Nov 24, 4714BC are handled + * + * 3. standard ANSI C functions are used to do time calculations whenever + * possible, i.e. when the date is in the range Jan 1, 1970 to 2038 + * + * 4. otherwise, the calculations are done by converting the date to/from JDN + * first (the range limitation mentioned above comes from here: the + * algorithm used by Scott E. Lee's code only works for positive JDNs, more + * or less) + * + * 5. the object constructed for the given DD-MM-YYYY HH:MM:SS corresponds to + * this moment in local time and may be converted to the object + * corresponding to the same date/time in another time zone by using + * ToTimezone() + * + * 6. the conversions to the current (or any other) timezone are done when the + * internal time representation is converted to the broken-down one in + * wxDateTime::Tm. + */ + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if !defined(wxUSE_DATETIME) || wxUSE_DATETIME + +#ifndef WX_PRECOMP + #ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" + #endif + #include "wx/string.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/stopwatch.h" // for wxGetLocalTimeMillis() + #include "wx/module.h" + #include "wx/crt.h" +#endif // WX_PRECOMP + +#include "wx/thread.h" +#include "wx/time.h" +#include "wx/tokenzr.h" + +#include + +#ifdef __WINDOWS__ + #include + #ifndef __WXWINCE__ + #include + #endif +#endif + +#include "wx/datetime.h" + +// ---------------------------------------------------------------------------- +// wxXTI +// ---------------------------------------------------------------------------- + +#if wxUSE_EXTENDED_RTTI + +template<> void wxStringReadValue(const wxString &s , wxDateTime &data ) +{ + data.ParseFormat(s,"%Y-%m-%d %H:%M:%S", NULL); +} + +template<> void wxStringWriteValue(wxString &s , const wxDateTime &data ) +{ + s = data.Format("%Y-%m-%d %H:%M:%S"); +} + +wxCUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter , wxFromStringConverter) + +#endif // wxUSE_EXTENDED_RTTI + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// debugging helper: just a convenient replacement of wxCHECK() +#define wxDATETIME_CHECK(expr, msg) \ + wxCHECK2_MSG(expr, *this = wxInvalidDateTime; return *this, msg) + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +class wxDateTimeHolidaysModule : public wxModule +{ +public: + virtual bool OnInit() + { + wxDateTimeHolidayAuthority::AddAuthority(new wxDateTimeWorkDays); + + return true; + } + + virtual void OnExit() + { + wxDateTimeHolidayAuthority::ClearAllAuthorities(); + wxDateTimeHolidayAuthority::ms_authorities.clear(); + } + +private: + DECLARE_DYNAMIC_CLASS(wxDateTimeHolidaysModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxDateTimeHolidaysModule, wxModule) + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// some trivial ones +static const int MONTHS_IN_YEAR = 12; + +static const int SEC_PER_MIN = 60; + +static const int MIN_PER_HOUR = 60; + +static const long SECONDS_PER_DAY = 86400l; + +static const int DAYS_PER_WEEK = 7; + +static const long MILLISECONDS_PER_DAY = 86400000l; + +// this is the integral part of JDN of the midnight of Jan 1, 1970 +// (i.e. JDN(Jan 1, 1970) = 2440587.5) +static const long EPOCH_JDN = 2440587l; + +// these values are only used in asserts so don't define them if asserts are +// disabled to avoid warnings about unused static variables +#if wxDEBUG_LEVEL +// the date of JDN -0.5 (as we don't work with fractional parts, this is the +// reference date for us) is Nov 24, 4714BC +static const int JDN_0_YEAR = -4713; +static const int JDN_0_MONTH = wxDateTime::Nov; +static const int JDN_0_DAY = 24; +#endif // wxDEBUG_LEVEL + +// the constants used for JDN calculations +static const long JDN_OFFSET = 32046l; +static const long DAYS_PER_5_MONTHS = 153l; +static const long DAYS_PER_4_YEARS = 1461l; +static const long DAYS_PER_400_YEARS = 146097l; + +// this array contains the cumulated number of days in all previous months for +// normal and leap years +static const wxDateTime::wxDateTime_t gs_cumulatedDays[2][MONTHS_IN_YEAR] = +{ + { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }, + { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 } +}; + +const long wxDateTime::TIME_T_FACTOR = 1000l; + +// ---------------------------------------------------------------------------- +// global data +// ---------------------------------------------------------------------------- + +const char wxDefaultDateTimeFormat[] = "%c"; +const char wxDefaultTimeSpanFormat[] = "%H:%M:%S"; + +// in the fine tradition of ANSI C we use our equivalent of (time_t)-1 to +// indicate an invalid wxDateTime object +const wxDateTime wxDefaultDateTime; + +wxDateTime::Country wxDateTime::ms_country = wxDateTime::Country_Unknown; + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +// debugger helper: this function can be called from a debugger to show what +// the date really is +extern const char *wxDumpDate(const wxDateTime* dt) +{ + static char buf[128]; + + wxString fmt(dt->Format("%Y-%m-%d (%a) %H:%M:%S")); + wxStrlcpy(buf, + (fmt + " (" + dt->GetValue().ToString() + " ticks)").ToAscii(), + WXSIZEOF(buf)); + + return buf; +} + +// get the number of days in the given month of the given year +static inline +wxDateTime::wxDateTime_t GetNumOfDaysInMonth(int year, wxDateTime::Month month) +{ + // the number of days in month in Julian/Gregorian calendar: the first line + // is for normal years, the second one is for the leap ones + static const wxDateTime::wxDateTime_t daysInMonth[2][MONTHS_IN_YEAR] = + { + { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, + { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } + }; + + return daysInMonth[wxDateTime::IsLeapYear(year)][month]; +} + +// return the integral part of the JDN for the midnight of the given date (to +// get the real JDN you need to add 0.5, this is, in fact, JDN of the +// noon of the previous day) +static long GetTruncatedJDN(wxDateTime::wxDateTime_t day, + wxDateTime::Month mon, + int year) +{ + // CREDIT: code below is by Scott E. Lee (but bugs are mine) + + // check the date validity + wxASSERT_MSG( + (year > JDN_0_YEAR) || + ((year == JDN_0_YEAR) && (mon > JDN_0_MONTH)) || + ((year == JDN_0_YEAR) && (mon == JDN_0_MONTH) && (day >= JDN_0_DAY)), + wxT("date out of range - can't convert to JDN") + ); + + // make the year positive to avoid problems with negative numbers division + year += 4800; + + // months are counted from March here + int month; + if ( mon >= wxDateTime::Mar ) + { + month = mon - 2; + } + else + { + month = mon + 10; + year--; + } + + // now we can simply add all the contributions together + return ((year / 100) * DAYS_PER_400_YEARS) / 4 + + ((year % 100) * DAYS_PER_4_YEARS) / 4 + + (month * DAYS_PER_5_MONTHS + 2) / 5 + + day + - JDN_OFFSET; +} + +#ifdef wxHAS_STRFTIME + +// this function is a wrapper around strftime(3) adding error checking +// NOTE: not static because used by datetimefmt.cpp +wxString CallStrftime(const wxString& format, const tm* tm) +{ + wxChar buf[4096]; + // Create temp wxString here to work around mingw/cygwin bug 1046059 + // http://sourceforge.net/tracker/?func=detail&atid=102435&aid=1046059&group_id=2435 + wxString s; + + if ( !wxStrftime(buf, WXSIZEOF(buf), format, tm) ) + { + // There is one special case in which strftime() can return 0 without + // indicating an error: "%p" may give empty string depending on the + // locale, so check for it explicitly. Apparently it's really the only + // exception. + if ( format != wxS("%p") ) + { + // if the format is valid, buffer must be too small? + wxFAIL_MSG(wxT("strftime() failed")); + } + + buf[0] = '\0'; + } + + s = buf; + return s; +} + +#endif // wxHAS_STRFTIME + +// if year and/or month have invalid values, replace them with the current ones +static void ReplaceDefaultYearMonthWithCurrent(int *year, + wxDateTime::Month *month) +{ + struct tm *tmNow = NULL; + struct tm tmstruct; + + if ( *year == wxDateTime::Inv_Year ) + { + tmNow = wxDateTime::GetTmNow(&tmstruct); + + *year = 1900 + tmNow->tm_year; + } + + if ( *month == wxDateTime::Inv_Month ) + { + if ( !tmNow ) + tmNow = wxDateTime::GetTmNow(&tmstruct); + + *month = (wxDateTime::Month)tmNow->tm_mon; + } +} + +// fill the struct tm with default values +// NOTE: not static because used by datetimefmt.cpp +void InitTm(struct tm& tm) +{ + // struct tm may have etxra fields (undocumented and with unportable + // names) which, nevertheless, must be set to 0 + memset(&tm, 0, sizeof(struct tm)); + + tm.tm_mday = 1; // mday 0 is invalid + tm.tm_year = 76; // any valid year + tm.tm_isdst = -1; // auto determine +} + +// ============================================================================ +// implementation of wxDateTime +// ============================================================================ + +// ---------------------------------------------------------------------------- +// struct Tm +// ---------------------------------------------------------------------------- + +wxDateTime::Tm::Tm() +{ + year = (wxDateTime_t)wxDateTime::Inv_Year; + mon = wxDateTime::Inv_Month; + mday = + yday = 0; + hour = + min = + sec = + msec = 0; + wday = wxDateTime::Inv_WeekDay; +} + +wxDateTime::Tm::Tm(const struct tm& tm, const TimeZone& tz) + : m_tz(tz) +{ + msec = 0; + sec = (wxDateTime::wxDateTime_t)tm.tm_sec; + min = (wxDateTime::wxDateTime_t)tm.tm_min; + hour = (wxDateTime::wxDateTime_t)tm.tm_hour; + mday = (wxDateTime::wxDateTime_t)tm.tm_mday; + mon = (wxDateTime::Month)tm.tm_mon; + year = 1900 + tm.tm_year; + wday = (wxDateTime::wxDateTime_t)tm.tm_wday; + yday = (wxDateTime::wxDateTime_t)tm.tm_yday; +} + +bool wxDateTime::Tm::IsValid() const +{ + if ( mon == wxDateTime::Inv_Month ) + return false; + + // We need to check this here to avoid crashing in GetNumOfDaysInMonth() if + // somebody passed us "(wxDateTime::Month)1000". + wxCHECK_MSG( mon >= wxDateTime::Jan && mon < wxDateTime::Inv_Month, false, + wxS("Invalid month value") ); + + // we allow for the leap seconds, although we don't use them (yet) + return (year != wxDateTime::Inv_Year) && (mon != wxDateTime::Inv_Month) && + (mday > 0 && mday <= GetNumOfDaysInMonth(year, mon)) && + (hour < 24) && (min < 60) && (sec < 62) && (msec < 1000); +} + +void wxDateTime::Tm::ComputeWeekDay() +{ + // compute the week day from day/month/year: we use the dumbest algorithm + // possible: just compute our JDN and then use the (simple to derive) + // formula: weekday = (JDN + 1.5) % 7 + wday = (wxDateTime::wxDateTime_t)((GetTruncatedJDN(mday, mon, year) + 2) % 7); +} + +void wxDateTime::Tm::AddMonths(int monDiff) +{ + // normalize the months field + while ( monDiff < -mon ) + { + year--; + + monDiff += MONTHS_IN_YEAR; + } + + while ( monDiff + mon >= MONTHS_IN_YEAR ) + { + year++; + + monDiff -= MONTHS_IN_YEAR; + } + + mon = (wxDateTime::Month)(mon + monDiff); + + wxASSERT_MSG( mon >= 0 && mon < MONTHS_IN_YEAR, wxT("logic error") ); + + // NB: we don't check here that the resulting date is valid, this function + // is private and the caller must check it if needed +} + +void wxDateTime::Tm::AddDays(int dayDiff) +{ + // normalize the days field + while ( dayDiff + mday < 1 ) + { + AddMonths(-1); + + dayDiff += GetNumOfDaysInMonth(year, mon); + } + + mday = (wxDateTime::wxDateTime_t)( mday + dayDiff ); + while ( mday > GetNumOfDaysInMonth(year, mon) ) + { + mday -= GetNumOfDaysInMonth(year, mon); + + AddMonths(1); + } + + wxASSERT_MSG( mday > 0 && mday <= GetNumOfDaysInMonth(year, mon), + wxT("logic error") ); +} + +// ---------------------------------------------------------------------------- +// class TimeZone +// ---------------------------------------------------------------------------- + +wxDateTime::TimeZone::TimeZone(wxDateTime::TZ tz) +{ + switch ( tz ) + { + case wxDateTime::Local: + // get the offset from C RTL: it returns the difference GMT-local + // while we want to have the offset _from_ GMT, hence the '-' + m_offset = -wxGetTimeZone(); + break; + + case wxDateTime::GMT_12: + case wxDateTime::GMT_11: + case wxDateTime::GMT_10: + case wxDateTime::GMT_9: + case wxDateTime::GMT_8: + case wxDateTime::GMT_7: + case wxDateTime::GMT_6: + case wxDateTime::GMT_5: + case wxDateTime::GMT_4: + case wxDateTime::GMT_3: + case wxDateTime::GMT_2: + case wxDateTime::GMT_1: + m_offset = -3600*(wxDateTime::GMT0 - tz); + break; + + case wxDateTime::GMT0: + case wxDateTime::GMT1: + case wxDateTime::GMT2: + case wxDateTime::GMT3: + case wxDateTime::GMT4: + case wxDateTime::GMT5: + case wxDateTime::GMT6: + case wxDateTime::GMT7: + case wxDateTime::GMT8: + case wxDateTime::GMT9: + case wxDateTime::GMT10: + case wxDateTime::GMT11: + case wxDateTime::GMT12: + case wxDateTime::GMT13: + m_offset = 3600*(tz - wxDateTime::GMT0); + break; + + case wxDateTime::A_CST: + // Central Standard Time in use in Australia = UTC + 9.5 + m_offset = 60l*(9*MIN_PER_HOUR + MIN_PER_HOUR/2); + break; + + default: + wxFAIL_MSG( wxT("unknown time zone") ); + } +} + +// ---------------------------------------------------------------------------- +// static functions +// ---------------------------------------------------------------------------- + +/* static */ +struct tm *wxDateTime::GetTmNow(struct tm *tmstruct) +{ + time_t t = GetTimeNow(); + return wxLocaltime_r(&t, tmstruct); +} + +/* static */ +bool wxDateTime::IsLeapYear(int year, wxDateTime::Calendar cal) +{ + if ( year == Inv_Year ) + year = GetCurrentYear(); + + if ( cal == Gregorian ) + { + // in Gregorian calendar leap years are those divisible by 4 except + // those divisible by 100 unless they're also divisible by 400 + // (in some countries, like Russia and Greece, additional corrections + // exist, but they won't manifest themselves until 2700) + return (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)); + } + else if ( cal == Julian ) + { + // in Julian calendar the rule is simpler + return year % 4 == 0; + } + else + { + wxFAIL_MSG(wxT("unknown calendar")); + + return false; + } +} + +/* static */ +int wxDateTime::GetCentury(int year) +{ + return year > 0 ? year / 100 : year / 100 - 1; +} + +/* static */ +int wxDateTime::ConvertYearToBC(int year) +{ + // year 0 is BC 1 + return year > 0 ? year : year - 1; +} + +/* static */ +int wxDateTime::GetCurrentYear(wxDateTime::Calendar cal) +{ + switch ( cal ) + { + case Gregorian: + return Now().GetYear(); + + case Julian: + wxFAIL_MSG(wxT("TODO")); + break; + + default: + wxFAIL_MSG(wxT("unsupported calendar")); + break; + } + + return Inv_Year; +} + +/* static */ +wxDateTime::Month wxDateTime::GetCurrentMonth(wxDateTime::Calendar cal) +{ + switch ( cal ) + { + case Gregorian: + return Now().GetMonth(); + + case Julian: + wxFAIL_MSG(wxT("TODO")); + break; + + default: + wxFAIL_MSG(wxT("unsupported calendar")); + break; + } + + return Inv_Month; +} + +/* static */ +wxDateTime::wxDateTime_t wxDateTime::GetNumberOfDays(int year, Calendar cal) +{ + if ( year == Inv_Year ) + { + // take the current year if none given + year = GetCurrentYear(); + } + + switch ( cal ) + { + case Gregorian: + case Julian: + return IsLeapYear(year) ? 366 : 365; + + default: + wxFAIL_MSG(wxT("unsupported calendar")); + break; + } + + return 0; +} + +/* static */ +wxDateTime::wxDateTime_t wxDateTime::GetNumberOfDays(wxDateTime::Month month, + int year, + wxDateTime::Calendar cal) +{ + wxCHECK_MSG( month < MONTHS_IN_YEAR, 0, wxT("invalid month") ); + + if ( cal == Gregorian || cal == Julian ) + { + if ( year == Inv_Year ) + { + // take the current year if none given + year = GetCurrentYear(); + } + + return GetNumOfDaysInMonth(year, month); + } + else + { + wxFAIL_MSG(wxT("unsupported calendar")); + + return 0; + } +} + +namespace +{ + +// helper function used by GetEnglish/WeekDayName(): returns 0 if flags is +// Name_Full and 1 if it is Name_Abbr or -1 if the flags is incorrect (and +// asserts in this case) +// +// the return value of this function is used as an index into 2D array +// containing full names in its first row and abbreviated ones in the 2nd one +int NameArrayIndexFromFlag(wxDateTime::NameFlags flags) +{ + switch ( flags ) + { + case wxDateTime::Name_Full: + return 0; + + case wxDateTime::Name_Abbr: + return 1; + + default: + wxFAIL_MSG( "unknown wxDateTime::NameFlags value" ); + } + + return -1; +} + +} // anonymous namespace + +/* static */ +wxString wxDateTime::GetEnglishMonthName(Month month, NameFlags flags) +{ + wxCHECK_MSG( month != Inv_Month, wxEmptyString, "invalid month" ); + + static const char *const monthNames[2][MONTHS_IN_YEAR] = + { + { "January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December" }, + { "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" } + }; + + const int idx = NameArrayIndexFromFlag(flags); + if ( idx == -1 ) + return wxString(); + + return monthNames[idx][month]; +} + +/* static */ +wxString wxDateTime::GetMonthName(wxDateTime::Month month, + wxDateTime::NameFlags flags) +{ +#ifdef wxHAS_STRFTIME + wxCHECK_MSG( month != Inv_Month, wxEmptyString, wxT("invalid month") ); + + // notice that we must set all the fields to avoid confusing libc (GNU one + // gets confused to a crash if we don't do this) + tm tm; + InitTm(tm); + tm.tm_mon = month; + + return CallStrftime(flags == Name_Abbr ? wxT("%b") : wxT("%B"), &tm); +#else // !wxHAS_STRFTIME + return GetEnglishMonthName(month, flags); +#endif // wxHAS_STRFTIME/!wxHAS_STRFTIME +} + +/* static */ +wxString wxDateTime::GetEnglishWeekDayName(WeekDay wday, NameFlags flags) +{ + wxCHECK_MSG( wday != Inv_WeekDay, wxEmptyString, wxT("invalid weekday") ); + + static const char *const weekdayNames[2][DAYS_PER_WEEK] = + { + { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", + "Saturday" }, + { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }, + }; + + const int idx = NameArrayIndexFromFlag(flags); + if ( idx == -1 ) + return wxString(); + + return weekdayNames[idx][wday]; +} + +/* static */ +wxString wxDateTime::GetWeekDayName(wxDateTime::WeekDay wday, + wxDateTime::NameFlags flags) +{ +#ifdef wxHAS_STRFTIME + wxCHECK_MSG( wday != Inv_WeekDay, wxEmptyString, wxT("invalid weekday") ); + + // take some arbitrary Sunday (but notice that the day should be such that + // after adding wday to it below we still have a valid date, e.g. don't + // take 28 here!) + tm tm; + InitTm(tm); + tm.tm_mday = 21; + tm.tm_mon = Nov; + tm.tm_year = 99; + + // and offset it by the number of days needed to get the correct wday + tm.tm_mday += wday; + + // call mktime() to normalize it... + (void)mktime(&tm); + + // ... and call strftime() + return CallStrftime(flags == Name_Abbr ? wxT("%a") : wxT("%A"), &tm); +#else // !wxHAS_STRFTIME + return GetEnglishWeekDayName(wday, flags); +#endif // wxHAS_STRFTIME/!wxHAS_STRFTIME +} + +/* static */ +void wxDateTime::GetAmPmStrings(wxString *am, wxString *pm) +{ + tm tm; + InitTm(tm); + wxChar buffer[64]; + // @Note: Do not call 'CallStrftime' here! CallStrftime checks the return code + // and causes an assertion failed if the buffer is to small (which is good) - OR - + // if strftime does not return anything because the format string is invalid - OR - + // if there are no 'am' / 'pm' tokens defined for the current locale (which is not good). + // wxDateTime::ParseTime will try several different formats to parse the time. + // As a result, GetAmPmStrings might get called, even if the current locale + // does not define any 'am' / 'pm' tokens. In this case, wxStrftime would + // assert, even though it is a perfectly legal use. + if ( am ) + { + if (wxStrftime(buffer, WXSIZEOF(buffer), wxT("%p"), &tm) > 0) + *am = wxString(buffer); + else + *am = wxString(); + } + if ( pm ) + { + tm.tm_hour = 13; + if (wxStrftime(buffer, WXSIZEOF(buffer), wxT("%p"), &tm) > 0) + *pm = wxString(buffer); + else + *pm = wxString(); + } +} + + +// ---------------------------------------------------------------------------- +// Country stuff: date calculations depend on the country (DST, work days, +// ...), so we need to know which rules to follow. +// ---------------------------------------------------------------------------- + +/* static */ +wxDateTime::Country wxDateTime::GetCountry() +{ + // TODO use LOCALE_ICOUNTRY setting under Win32 +#ifndef __WXWINCE__ + if ( ms_country == Country_Unknown ) + { + // try to guess from the time zone name + time_t t = time(NULL); + struct tm tmstruct; + struct tm *tm = wxLocaltime_r(&t, &tmstruct); + + wxString tz = CallStrftime(wxT("%Z"), tm); + if ( tz == wxT("WET") || tz == wxT("WEST") ) + { + ms_country = UK; + } + else if ( tz == wxT("CET") || tz == wxT("CEST") ) + { + ms_country = Country_EEC; + } + else if ( tz == wxT("MSK") || tz == wxT("MSD") ) + { + ms_country = Russia; + } + else if ( tz == wxT("AST") || tz == wxT("ADT") || + tz == wxT("EST") || tz == wxT("EDT") || + tz == wxT("CST") || tz == wxT("CDT") || + tz == wxT("MST") || tz == wxT("MDT") || + tz == wxT("PST") || tz == wxT("PDT") ) + { + ms_country = USA; + } + else + { + // well, choose a default one + ms_country = USA; + } + } +#else // __WXWINCE__ + ms_country = USA; +#endif // !__WXWINCE__/__WXWINCE__ + + return ms_country; +} + +/* static */ +void wxDateTime::SetCountry(wxDateTime::Country country) +{ + ms_country = country; +} + +/* static */ +bool wxDateTime::IsWestEuropeanCountry(Country country) +{ + if ( country == Country_Default ) + { + country = GetCountry(); + } + + return (Country_WesternEurope_Start <= country) && + (country <= Country_WesternEurope_End); +} + +// ---------------------------------------------------------------------------- +// DST calculations: we use 3 different rules for the West European countries, +// USA and for the rest of the world. This is undoubtedly false for many +// countries, but I lack the necessary info (and the time to gather it), +// please add the other rules here! +// ---------------------------------------------------------------------------- + +/* static */ +bool wxDateTime::IsDSTApplicable(int year, Country country) +{ + if ( year == Inv_Year ) + { + // take the current year if none given + year = GetCurrentYear(); + } + + if ( country == Country_Default ) + { + country = GetCountry(); + } + + switch ( country ) + { + case USA: + case UK: + // DST was first observed in the US and UK during WWI, reused + // during WWII and used again since 1966 + return year >= 1966 || + (year >= 1942 && year <= 1945) || + (year == 1918 || year == 1919); + + default: + // assume that it started after WWII + return year > 1950; + } +} + +/* static */ +wxDateTime wxDateTime::GetBeginDST(int year, Country country) +{ + if ( year == Inv_Year ) + { + // take the current year if none given + year = GetCurrentYear(); + } + + if ( country == Country_Default ) + { + country = GetCountry(); + } + + if ( !IsDSTApplicable(year, country) ) + { + return wxInvalidDateTime; + } + + wxDateTime dt; + + if ( IsWestEuropeanCountry(country) || (country == Russia) ) + { + // DST begins at 1 a.m. GMT on the last Sunday of March + if ( !dt.SetToLastWeekDay(Sun, Mar, year) ) + { + // weird... + wxFAIL_MSG( wxT("no last Sunday in March?") ); + } + + dt += wxTimeSpan::Hours(1); + } + else switch ( country ) + { + case USA: + switch ( year ) + { + case 1918: + case 1919: + // don't know for sure - assume it was in effect all year + + case 1943: + case 1944: + case 1945: + dt.Set(1, Jan, year); + break; + + case 1942: + // DST was installed Feb 2, 1942 by the Congress + dt.Set(2, Feb, year); + break; + + // Oil embargo changed the DST period in the US + case 1974: + dt.Set(6, Jan, 1974); + break; + + case 1975: + dt.Set(23, Feb, 1975); + break; + + default: + // before 1986, DST begun on the last Sunday of April, but + // in 1986 Reagan changed it to begin at 2 a.m. of the + // first Sunday in April + if ( year < 1986 ) + { + if ( !dt.SetToLastWeekDay(Sun, Apr, year) ) + { + // weird... + wxFAIL_MSG( wxT("no first Sunday in April?") ); + } + } + else if ( year > 2006 ) + // Energy Policy Act of 2005, Pub. L. no. 109-58, 119 Stat 594 (2005). + // Starting in 2007, daylight time begins in the United States on the + // second Sunday in March and ends on the first Sunday in November + { + if ( !dt.SetToWeekDay(Sun, 2, Mar, year) ) + { + // weird... + wxFAIL_MSG( wxT("no second Sunday in March?") ); + } + } + else + { + if ( !dt.SetToWeekDay(Sun, 1, Apr, year) ) + { + // weird... + wxFAIL_MSG( wxT("no first Sunday in April?") ); + } + } + + dt += wxTimeSpan::Hours(2); + + // TODO what about timezone?? + } + + break; + + default: + // assume Mar 30 as the start of the DST for the rest of the world + // - totally bogus, of course + dt.Set(30, Mar, year); + } + + return dt; +} + +/* static */ +wxDateTime wxDateTime::GetEndDST(int year, Country country) +{ + if ( year == Inv_Year ) + { + // take the current year if none given + year = GetCurrentYear(); + } + + if ( country == Country_Default ) + { + country = GetCountry(); + } + + if ( !IsDSTApplicable(year, country) ) + { + return wxInvalidDateTime; + } + + wxDateTime dt; + + if ( IsWestEuropeanCountry(country) || (country == Russia) ) + { + // DST ends at 1 a.m. GMT on the last Sunday of October + if ( !dt.SetToLastWeekDay(Sun, Oct, year) ) + { + // weirder and weirder... + wxFAIL_MSG( wxT("no last Sunday in October?") ); + } + + dt += wxTimeSpan::Hours(1); + } + else switch ( country ) + { + case USA: + switch ( year ) + { + case 1918: + case 1919: + // don't know for sure - assume it was in effect all year + + case 1943: + case 1944: + dt.Set(31, Dec, year); + break; + + case 1945: + // the time was reset after the end of the WWII + dt.Set(30, Sep, year); + break; + + default: // default for switch (year) + if ( year > 2006 ) + // Energy Policy Act of 2005, Pub. L. no. 109-58, 119 Stat 594 (2005). + // Starting in 2007, daylight time begins in the United States on the + // second Sunday in March and ends on the first Sunday in November + { + if ( !dt.SetToWeekDay(Sun, 1, Nov, year) ) + { + // weird... + wxFAIL_MSG( wxT("no first Sunday in November?") ); + } + } + else + // pre-2007 + // DST ends at 2 a.m. on the last Sunday of October + { + if ( !dt.SetToLastWeekDay(Sun, Oct, year) ) + { + // weirder and weirder... + wxFAIL_MSG( wxT("no last Sunday in October?") ); + } + } + + dt += wxTimeSpan::Hours(2); + + // TODO: what about timezone?? + } + break; + + default: // default for switch (country) + // assume October 26th as the end of the DST - totally bogus too + dt.Set(26, Oct, year); + } + + return dt; +} + +// ---------------------------------------------------------------------------- +// constructors and assignment operators +// ---------------------------------------------------------------------------- + +// return the current time with ms precision +/* static */ wxDateTime wxDateTime::UNow() +{ + return wxDateTime(wxGetUTCTimeMillis()); +} + +// the values in the tm structure contain the local time +wxDateTime& wxDateTime::Set(const struct tm& tm) +{ + struct tm tm2(tm); + time_t timet = mktime(&tm2); + + if ( timet == (time_t)-1 ) + { + // mktime() rather unintuitively fails for Jan 1, 1970 if the hour is + // less than timezone - try to make it work for this case + if ( tm2.tm_year == 70 && tm2.tm_mon == 0 && tm2.tm_mday == 1 ) + { + return Set((time_t)( + wxGetTimeZone() + + tm2.tm_hour * MIN_PER_HOUR * SEC_PER_MIN + + tm2.tm_min * SEC_PER_MIN + + tm2.tm_sec)); + } + + wxFAIL_MSG( wxT("mktime() failed") ); + + *this = wxInvalidDateTime; + + return *this; + } + + // mktime() only adjusts tm_wday, tm_yday and tm_isdst fields normally, if + // it changed anything else, it must have performed the DST adjustment. But + // the trouble with this is that different implementations do it + // differently, e.g. GNU libc moves the time forward if the specified time + // is invalid in the local time zone, while MSVC CRT moves it backwards + // which is especially pernicious as it can change the date if the DST + // starts at midnight, as it does in some time zones (see #15419), and this + // is completely unexpected for the code working with dates only. + // + // So standardize on moving the time forwards to have consistent behaviour + // under all platforms and to avoid the problem above. + if ( tm2.tm_hour != tm.tm_hour ) + { + tm2 = tm; + tm2.tm_hour++; + if ( tm2.tm_hour == 24 ) + { + // This shouldn't normally happen as the DST never starts at 23:00 + // but if it does, we have a problem as we need to adjust the day + // as well. However we stop here, i.e. we don't adjust the month + // (or the year) because mktime() is supposed to take care of this + // for us. + tm2.tm_hour = 0; + tm2.tm_mday++; + } + + timet = mktime(&tm2); + } + + return Set(timet); +} + +wxDateTime& wxDateTime::Set(wxDateTime_t hour, + wxDateTime_t minute, + wxDateTime_t second, + wxDateTime_t millisec) +{ + // we allow seconds to be 61 to account for the leap seconds, even if we + // don't use them really + wxDATETIME_CHECK( hour < 24 && + second < 62 && + minute < 60 && + millisec < 1000, + wxT("Invalid time in wxDateTime::Set()") ); + + // get the current date from system + struct tm tmstruct; + struct tm *tm = GetTmNow(&tmstruct); + + wxDATETIME_CHECK( tm, wxT("wxLocaltime_r() failed") ); + + // make a copy so it isn't clobbered by the call to mktime() below + struct tm tm1(*tm); + + // adjust the time + tm1.tm_hour = hour; + tm1.tm_min = minute; + tm1.tm_sec = second; + + // and the DST in case it changes on this date + struct tm tm2(tm1); + mktime(&tm2); + if ( tm2.tm_isdst != tm1.tm_isdst ) + tm1.tm_isdst = tm2.tm_isdst; + + (void)Set(tm1); + + // and finally adjust milliseconds + return SetMillisecond(millisec); +} + +wxDateTime& wxDateTime::Set(wxDateTime_t day, + Month month, + int year, + wxDateTime_t hour, + wxDateTime_t minute, + wxDateTime_t second, + wxDateTime_t millisec) +{ + wxDATETIME_CHECK( hour < 24 && + second < 62 && + minute < 60 && + millisec < 1000, + wxT("Invalid time in wxDateTime::Set()") ); + + ReplaceDefaultYearMonthWithCurrent(&year, &month); + + wxDATETIME_CHECK( (0 < day) && (day <= GetNumberOfDays(month, year)), + wxT("Invalid date in wxDateTime::Set()") ); + + // the range of time_t type (inclusive) + static const int yearMinInRange = 1970; + static const int yearMaxInRange = 2037; + + // test only the year instead of testing for the exact end of the Unix + // time_t range - it doesn't bring anything to do more precise checks + if ( year >= yearMinInRange && year <= yearMaxInRange ) + { + // use the standard library version if the date is in range - this is + // probably more efficient than our code + struct tm tm; + tm.tm_year = year - 1900; + tm.tm_mon = month; + tm.tm_mday = day; + tm.tm_hour = hour; + tm.tm_min = minute; + tm.tm_sec = second; + tm.tm_isdst = -1; // mktime() will guess it + + (void)Set(tm); + + // and finally adjust milliseconds + if (IsValid()) + SetMillisecond(millisec); + + return *this; + } + else + { + // do time calculations ourselves: we want to calculate the number of + // milliseconds between the given date and the epoch + + // get the JDN for the midnight of this day + m_time = GetTruncatedJDN(day, month, year); + m_time -= EPOCH_JDN; + m_time *= SECONDS_PER_DAY * TIME_T_FACTOR; + + // JDN corresponds to GMT, we take localtime + Add(wxTimeSpan(hour, minute, second + wxGetTimeZone(), millisec)); + } + + return *this; +} + +wxDateTime& wxDateTime::Set(double jdn) +{ + // so that m_time will be 0 for the midnight of Jan 1, 1970 which is jdn + // EPOCH_JDN + 0.5 + jdn -= EPOCH_JDN + 0.5; + + m_time.Assign(jdn*MILLISECONDS_PER_DAY); + + // JDNs always are in UTC, so we don't need any adjustments for time zone + + return *this; +} + +wxDateTime& wxDateTime::ResetTime() +{ + Tm tm = GetTm(); + + if ( tm.hour || tm.min || tm.sec || tm.msec ) + { + tm.msec = + tm.sec = + tm.min = + tm.hour = 0; + + Set(tm); + } + + return *this; +} + +wxDateTime wxDateTime::GetDateOnly() const +{ + Tm tm = GetTm(); + tm.msec = + tm.sec = + tm.min = + tm.hour = 0; + return wxDateTime(tm); +} + +// ---------------------------------------------------------------------------- +// DOS Date and Time Format functions +// ---------------------------------------------------------------------------- +// the dos date and time value is an unsigned 32 bit value in the format: +// YYYYYYYMMMMDDDDDhhhhhmmmmmmsssss +// +// Y = year offset from 1980 (0-127) +// M = month (1-12) +// D = day of month (1-31) +// h = hour (0-23) +// m = minute (0-59) +// s = bisecond (0-29) each bisecond indicates two seconds +// ---------------------------------------------------------------------------- + +wxDateTime& wxDateTime::SetFromDOS(unsigned long ddt) +{ + struct tm tm; + InitTm(tm); + + long year = ddt & 0xFE000000; + year >>= 25; + year += 80; + tm.tm_year = year; + + long month = ddt & 0x1E00000; + month >>= 21; + month -= 1; + tm.tm_mon = month; + + long day = ddt & 0x1F0000; + day >>= 16; + tm.tm_mday = day; + + long hour = ddt & 0xF800; + hour >>= 11; + tm.tm_hour = hour; + + long minute = ddt & 0x7E0; + minute >>= 5; + tm.tm_min = minute; + + long second = ddt & 0x1F; + tm.tm_sec = second * 2; + + return Set(mktime(&tm)); +} + +unsigned long wxDateTime::GetAsDOS() const +{ + unsigned long ddt; + time_t ticks = GetTicks(); + struct tm tmstruct; + struct tm *tm = wxLocaltime_r(&ticks, &tmstruct); + wxCHECK_MSG( tm, ULONG_MAX, wxT("time can't be represented in DOS format") ); + + long year = tm->tm_year; + year -= 80; + year <<= 25; + + long month = tm->tm_mon; + month += 1; + month <<= 21; + + long day = tm->tm_mday; + day <<= 16; + + long hour = tm->tm_hour; + hour <<= 11; + + long minute = tm->tm_min; + minute <<= 5; + + long second = tm->tm_sec; + second /= 2; + + ddt = year | month | day | hour | minute | second; + return ddt; +} + +// ---------------------------------------------------------------------------- +// time_t <-> broken down time conversions +// ---------------------------------------------------------------------------- + +wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime") ); + + time_t time = GetTicks(); + if ( time != (time_t)-1 ) + { + // use C RTL functions + struct tm tmstruct; + tm *tm; + if ( tz.GetOffset() == -wxGetTimeZone() ) + { + // we are working with local time + tm = wxLocaltime_r(&time, &tmstruct); + + // should never happen + wxCHECK_MSG( tm, Tm(), wxT("wxLocaltime_r() failed") ); + } + else + { + time += (time_t)tz.GetOffset(); +#if defined(__VMS__) || defined(__WATCOMC__) // time is unsigned so avoid warning + int time2 = (int) time; + if ( time2 >= 0 ) +#else + if ( time >= 0 ) +#endif + { + tm = wxGmtime_r(&time, &tmstruct); + + // should never happen + wxCHECK_MSG( tm, Tm(), wxT("wxGmtime_r() failed") ); + } + else + { + tm = (struct tm *)NULL; + } + } + + if ( tm ) + { + // adjust the milliseconds + Tm tm2(*tm, tz); + long timeOnly = (m_time % MILLISECONDS_PER_DAY).ToLong(); + tm2.msec = (wxDateTime_t)(timeOnly % 1000); + return tm2; + } + //else: use generic code below + } + + // remember the time and do the calculations with the date only - this + // eliminates rounding errors of the floating point arithmetics + + wxLongLong timeMidnight = m_time + tz.GetOffset() * 1000; + + long timeOnly = (timeMidnight % MILLISECONDS_PER_DAY).ToLong(); + + // we want to always have positive time and timeMidnight to be really + // the midnight before it + if ( timeOnly < 0 ) + { + timeOnly = MILLISECONDS_PER_DAY + timeOnly; + } + + timeMidnight -= timeOnly; + + // calculate the Gregorian date from JDN for the midnight of our date: + // this will yield day, month (in 1..12 range) and year + + // actually, this is the JDN for the noon of the previous day + long jdn = (timeMidnight / MILLISECONDS_PER_DAY).ToLong() + EPOCH_JDN; + + // CREDIT: code below is by Scott E. Lee (but bugs are mine) + + wxASSERT_MSG( jdn > -2, wxT("JDN out of range") ); + + // calculate the century + long temp = (jdn + JDN_OFFSET) * 4 - 1; + long century = temp / DAYS_PER_400_YEARS; + + // then the year and day of year (1 <= dayOfYear <= 366) + temp = ((temp % DAYS_PER_400_YEARS) / 4) * 4 + 3; + long year = (century * 100) + (temp / DAYS_PER_4_YEARS); + long dayOfYear = (temp % DAYS_PER_4_YEARS) / 4 + 1; + + // and finally the month and day of the month + temp = dayOfYear * 5 - 3; + long month = temp / DAYS_PER_5_MONTHS; + long day = (temp % DAYS_PER_5_MONTHS) / 5 + 1; + + // month is counted from March - convert to normal + if ( month < 10 ) + { + month += 3; + } + else + { + year += 1; + month -= 9; + } + + // year is offset by 4800 + year -= 4800; + + // check that the algorithm gave us something reasonable + wxASSERT_MSG( (0 < month) && (month <= 12), wxT("invalid month") ); + wxASSERT_MSG( (1 <= day) && (day < 32), wxT("invalid day") ); + + // construct Tm from these values + Tm tm; + tm.year = (int)year; + tm.yday = (wxDateTime_t)(dayOfYear - 1); // use C convention for day number + tm.mon = (Month)(month - 1); // algorithm yields 1 for January, not 0 + tm.mday = (wxDateTime_t)day; + tm.msec = (wxDateTime_t)(timeOnly % 1000); + timeOnly -= tm.msec; + timeOnly /= 1000; // now we have time in seconds + + tm.sec = (wxDateTime_t)(timeOnly % SEC_PER_MIN); + timeOnly -= tm.sec; + timeOnly /= SEC_PER_MIN; // now we have time in minutes + + tm.min = (wxDateTime_t)(timeOnly % MIN_PER_HOUR); + timeOnly -= tm.min; + + tm.hour = (wxDateTime_t)(timeOnly / MIN_PER_HOUR); + + return tm; +} + +wxDateTime& wxDateTime::SetYear(int year) +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime") ); + + Tm tm(GetTm()); + tm.year = year; + Set(tm); + + return *this; +} + +wxDateTime& wxDateTime::SetMonth(Month month) +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime") ); + + Tm tm(GetTm()); + tm.mon = month; + Set(tm); + + return *this; +} + +wxDateTime& wxDateTime::SetDay(wxDateTime_t mday) +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime") ); + + Tm tm(GetTm()); + tm.mday = mday; + Set(tm); + + return *this; +} + +wxDateTime& wxDateTime::SetHour(wxDateTime_t hour) +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime") ); + + Tm tm(GetTm()); + tm.hour = hour; + Set(tm); + + return *this; +} + +wxDateTime& wxDateTime::SetMinute(wxDateTime_t min) +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime") ); + + Tm tm(GetTm()); + tm.min = min; + Set(tm); + + return *this; +} + +wxDateTime& wxDateTime::SetSecond(wxDateTime_t sec) +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime") ); + + Tm tm(GetTm()); + tm.sec = sec; + Set(tm); + + return *this; +} + +wxDateTime& wxDateTime::SetMillisecond(wxDateTime_t millisecond) +{ + wxASSERT_MSG( IsValid(), wxT("invalid wxDateTime") ); + + // we don't need to use GetTm() for this one + m_time -= m_time % 1000l; + m_time += millisecond; + + return *this; +} + +// ---------------------------------------------------------------------------- +// wxDateTime arithmetics +// ---------------------------------------------------------------------------- + +wxDateTime& wxDateTime::Add(const wxDateSpan& diff) +{ + Tm tm(GetTm()); + + tm.year += diff.GetYears(); + tm.AddMonths(diff.GetMonths()); + + // check that the resulting date is valid + if ( tm.mday > GetNumOfDaysInMonth(tm.year, tm.mon) ) + { + // We suppose that when adding one month to Jan 31 we want to get Feb + // 28 (or 29), i.e. adding a month to the last day of the month should + // give the last day of the next month which is quite logical. + // + // Unfortunately, there is no logic way to understand what should + // Jan 30 + 1 month be - Feb 28 too or Feb 27 (assuming non leap year)? + // We make it Feb 28 (last day too), but it is highly questionable. + tm.mday = GetNumOfDaysInMonth(tm.year, tm.mon); + } + + tm.AddDays(diff.GetTotalDays()); + + Set(tm); + + wxASSERT_MSG( IsSameTime(tm), + wxT("Add(wxDateSpan) shouldn't modify time") ); + + return *this; +} + +wxDateSpan wxDateTime::DiffAsDateSpan(const wxDateTime& dt) const +{ + wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime")); + + // If dt is larger than this, calculations below needs to be inverted. + int inv = 1; + if ( dt > *this ) + inv = -1; + + int y = GetYear() - dt.GetYear(); + int m = GetMonth() - dt.GetMonth(); + int d = GetDay() - dt.GetDay(); + + // If month diff is negative, dt is the year before, so decrease year + // and set month diff to its inverse, e.g. January - December should be 1, + // not -11. + if ( m * inv < 0 || (m == 0 && d * inv < 0)) + { + m += inv * MONTHS_IN_YEAR; + y -= inv; + } + + // Same logic for days as for months above. + if ( d * inv < 0 ) + { + // Use number of days in month from the month which end date we're + // crossing. That is month before this for positive diff, and this + // month for negative diff. + // If we're on january and using previous month, we get december + // previous year, but don't care, december has same amount of days + // every year. + wxDateTime::Month monthfordays = GetMonth(); + if (inv > 0 && monthfordays == wxDateTime::Jan) + monthfordays = wxDateTime::Dec; + else if (inv > 0) + monthfordays = static_cast(monthfordays - 1); + + d += inv * wxDateTime::GetNumberOfDays(monthfordays, GetYear()); + m -= inv; + } + + int w = d / DAYS_PER_WEEK; + + // Remove weeks from d, since wxDateSpan only keep days as the ones + // not in complete weeks + d -= w * DAYS_PER_WEEK; + + return wxDateSpan(y, m, w, d); +} + +// ---------------------------------------------------------------------------- +// Weekday and monthday stuff +// ---------------------------------------------------------------------------- + +// convert Sun, Mon, ..., Sat into 6, 0, ..., 5 +static inline int ConvertWeekDayToMondayBase(int wd) +{ + return wd == wxDateTime::Sun ? 6 : wd - 1; +} + +/* static */ +wxDateTime +wxDateTime::SetToWeekOfYear(int year, wxDateTime_t numWeek, WeekDay wd) +{ + wxASSERT_MSG( numWeek > 0, + wxT("invalid week number: weeks are counted from 1") ); + + // Jan 4 always lies in the 1st week of the year + wxDateTime dt(4, Jan, year); + dt.SetToWeekDayInSameWeek(wd); + dt += wxDateSpan::Weeks(numWeek - 1); + + return dt; +} + +#if WXWIN_COMPATIBILITY_2_6 +// use a separate function to avoid warnings about using deprecated +// SetToTheWeek in GetWeek below +static wxDateTime +SetToTheWeek(int year, + wxDateTime::wxDateTime_t numWeek, + wxDateTime::WeekDay weekday, + wxDateTime::WeekFlags flags) +{ + // Jan 4 always lies in the 1st week of the year + wxDateTime dt(4, wxDateTime::Jan, year); + dt.SetToWeekDayInSameWeek(weekday, flags); + dt += wxDateSpan::Weeks(numWeek - 1); + + return dt; +} + +bool wxDateTime::SetToTheWeek(wxDateTime_t numWeek, + WeekDay weekday, + WeekFlags flags) +{ + int year = GetYear(); + *this = ::SetToTheWeek(year, numWeek, weekday, flags); + if ( GetYear() != year ) + { + // oops... numWeek was too big + return false; + } + + return true; +} + +wxDateTime wxDateTime::GetWeek(wxDateTime_t numWeek, + WeekDay weekday, + WeekFlags flags) const +{ + return ::SetToTheWeek(GetYear(), numWeek, weekday, flags); +} +#endif // WXWIN_COMPATIBILITY_2_6 + +wxDateTime& wxDateTime::SetToLastMonthDay(Month month, + int year) +{ + // take the current month/year if none specified + if ( year == Inv_Year ) + year = GetYear(); + if ( month == Inv_Month ) + month = GetMonth(); + + return Set(GetNumOfDaysInMonth(year, month), month, year); +} + +wxDateTime& wxDateTime::SetToWeekDayInSameWeek(WeekDay weekday, WeekFlags flags) +{ + wxDATETIME_CHECK( weekday != Inv_WeekDay, wxT("invalid weekday") ); + + int wdayDst = weekday, + wdayThis = GetWeekDay(); + if ( wdayDst == wdayThis ) + { + // nothing to do + return *this; + } + + if ( flags == Default_First ) + { + flags = GetCountry() == USA ? Sunday_First : Monday_First; + } + + // the logic below based on comparing weekday and wdayThis works if Sun (0) + // is the first day in the week, but breaks down for Monday_First case so + // we adjust the week days in this case + if ( flags == Monday_First ) + { + if ( wdayThis == Sun ) + wdayThis += 7; + if ( wdayDst == Sun ) + wdayDst += 7; + } + //else: Sunday_First, nothing to do + + // go forward or back in time to the day we want + if ( wdayDst < wdayThis ) + { + return Subtract(wxDateSpan::Days(wdayThis - wdayDst)); + } + else // weekday > wdayThis + { + return Add(wxDateSpan::Days(wdayDst - wdayThis)); + } +} + +wxDateTime& wxDateTime::SetToNextWeekDay(WeekDay weekday) +{ + wxDATETIME_CHECK( weekday != Inv_WeekDay, wxT("invalid weekday") ); + + int diff; + WeekDay wdayThis = GetWeekDay(); + if ( weekday == wdayThis ) + { + // nothing to do + return *this; + } + else if ( weekday < wdayThis ) + { + // need to advance a week + diff = 7 - (wdayThis - weekday); + } + else // weekday > wdayThis + { + diff = weekday - wdayThis; + } + + return Add(wxDateSpan::Days(diff)); +} + +wxDateTime& wxDateTime::SetToPrevWeekDay(WeekDay weekday) +{ + wxDATETIME_CHECK( weekday != Inv_WeekDay, wxT("invalid weekday") ); + + int diff; + WeekDay wdayThis = GetWeekDay(); + if ( weekday == wdayThis ) + { + // nothing to do + return *this; + } + else if ( weekday > wdayThis ) + { + // need to go to previous week + diff = 7 - (weekday - wdayThis); + } + else // weekday < wdayThis + { + diff = wdayThis - weekday; + } + + return Subtract(wxDateSpan::Days(diff)); +} + +bool wxDateTime::SetToWeekDay(WeekDay weekday, + int n, + Month month, + int year) +{ + wxCHECK_MSG( weekday != Inv_WeekDay, false, wxT("invalid weekday") ); + + // we don't check explicitly that -5 <= n <= 5 because we will return false + // anyhow in such case - but may be should still give an assert for it? + + // take the current month/year if none specified + ReplaceDefaultYearMonthWithCurrent(&year, &month); + + wxDateTime dt; + + // TODO this probably could be optimised somehow... + + if ( n > 0 ) + { + // get the first day of the month + dt.Set(1, month, year); + + // get its wday + WeekDay wdayFirst = dt.GetWeekDay(); + + // go to the first weekday of the month + int diff = weekday - wdayFirst; + if ( diff < 0 ) + diff += 7; + + // add advance n-1 weeks more + diff += 7*(n - 1); + + dt += wxDateSpan::Days(diff); + } + else // count from the end of the month + { + // get the last day of the month + dt.SetToLastMonthDay(month, year); + + // get its wday + WeekDay wdayLast = dt.GetWeekDay(); + + // go to the last weekday of the month + int diff = wdayLast - weekday; + if ( diff < 0 ) + diff += 7; + + // and rewind n-1 weeks from there + diff += 7*(-n - 1); + + dt -= wxDateSpan::Days(diff); + } + + // check that it is still in the same month + if ( dt.GetMonth() == month ) + { + *this = dt; + + return true; + } + else + { + // no such day in this month + return false; + } +} + +static inline +wxDateTime::wxDateTime_t GetDayOfYearFromTm(const wxDateTime::Tm& tm) +{ + return (wxDateTime::wxDateTime_t)(gs_cumulatedDays[wxDateTime::IsLeapYear(tm.year)][tm.mon] + tm.mday); +} + +wxDateTime::wxDateTime_t wxDateTime::GetDayOfYear(const TimeZone& tz) const +{ + return GetDayOfYearFromTm(GetTm(tz)); +} + +wxDateTime::wxDateTime_t +wxDateTime::GetWeekOfYear(wxDateTime::WeekFlags flags, const TimeZone& tz) const +{ + if ( flags == Default_First ) + { + flags = GetCountry() == USA ? Sunday_First : Monday_First; + } + + Tm tm(GetTm(tz)); + wxDateTime_t nDayInYear = GetDayOfYearFromTm(tm); + + int wdTarget = GetWeekDay(tz); + int wdYearStart = wxDateTime(1, Jan, GetYear()).GetWeekDay(); + int week; + if ( flags == Sunday_First ) + { + // FIXME: First week is not calculated correctly. + week = (nDayInYear - wdTarget + 7) / 7; + if ( wdYearStart == Wed || wdYearStart == Thu ) + week++; + } + else // week starts with monday + { + // adjust the weekdays to non-US style. + wdYearStart = ConvertWeekDayToMondayBase(wdYearStart); + + // quoting from http://www.cl.cam.ac.uk/~mgk25/iso-time.html: + // + // Week 01 of a year is per definition the first week that has the + // Thursday in this year, which is equivalent to the week that + // contains the fourth day of January. In other words, the first + // week of a new year is the week that has the majority of its + // days in the new year. Week 01 might also contain days from the + // previous year and the week before week 01 of a year is the last + // week (52 or 53) of the previous year even if it contains days + // from the new year. A week starts with Monday (day 1) and ends + // with Sunday (day 7). + // + + // if Jan 1 is Thursday or less, it is in the first week of this year + int dayCountFix = wdYearStart < 4 ? 6 : -1; + + // count the number of week + week = (nDayInYear + wdYearStart + dayCountFix) / DAYS_PER_WEEK; + + // check if we happen to be at the last week of previous year: + if ( week == 0 ) + { + week = wxDateTime(31, Dec, GetYear() - 1).GetWeekOfYear(); + } + else if ( week == 53 ) + { + int wdYearEnd = (wdYearStart + 364 + IsLeapYear(GetYear())) + % DAYS_PER_WEEK; + + // Week 53 only if last day of year is Thursday or later. + if ( wdYearEnd < 3 ) + week = 1; + } + } + + return (wxDateTime::wxDateTime_t)week; +} + +wxDateTime::wxDateTime_t wxDateTime::GetWeekOfMonth(wxDateTime::WeekFlags flags, + const TimeZone& tz) const +{ + Tm tm = GetTm(tz); + const wxDateTime dateFirst = wxDateTime(1, tm.mon, tm.year); + const wxDateTime::WeekDay wdFirst = dateFirst.GetWeekDay(); + + if ( flags == Default_First ) + { + flags = GetCountry() == USA ? Sunday_First : Monday_First; + } + + // compute offset of dateFirst from the beginning of the week + int firstOffset; + if ( flags == Sunday_First ) + firstOffset = wdFirst - Sun; + else + firstOffset = wdFirst == Sun ? DAYS_PER_WEEK - 1 : wdFirst - Mon; + + return (wxDateTime::wxDateTime_t)((tm.mday - 1 + firstOffset)/7 + 1); +} + +wxDateTime& wxDateTime::SetToYearDay(wxDateTime::wxDateTime_t yday) +{ + int year = GetYear(); + wxDATETIME_CHECK( (0 < yday) && (yday <= GetNumberOfDays(year)), + wxT("invalid year day") ); + + bool isLeap = IsLeapYear(year); + for ( Month mon = Jan; mon < Inv_Month; wxNextMonth(mon) ) + { + // for Dec, we can't compare with gs_cumulatedDays[mon + 1], but we + // don't need it neither - because of the CHECK above we know that + // yday lies in December then + if ( (mon == Dec) || (yday <= gs_cumulatedDays[isLeap][mon + 1]) ) + { + Set((wxDateTime::wxDateTime_t)(yday - gs_cumulatedDays[isLeap][mon]), mon, year); + + break; + } + } + + return *this; +} + +// ---------------------------------------------------------------------------- +// Julian day number conversion and related stuff +// ---------------------------------------------------------------------------- + +double wxDateTime::GetJulianDayNumber() const +{ + return m_time.ToDouble() / MILLISECONDS_PER_DAY + EPOCH_JDN + 0.5; +} + +double wxDateTime::GetRataDie() const +{ + // March 1 of the year 0 is Rata Die day -306 and JDN 1721119.5 + return GetJulianDayNumber() - 1721119.5 - 306; +} + +// ---------------------------------------------------------------------------- +// timezone and DST stuff +// ---------------------------------------------------------------------------- + +int wxDateTime::IsDST(wxDateTime::Country country) const +{ + wxCHECK_MSG( country == Country_Default, -1, + wxT("country support not implemented") ); + + // use the C RTL for the dates in the standard range + time_t timet = GetTicks(); + if ( timet != (time_t)-1 ) + { + struct tm tmstruct; + tm *tm = wxLocaltime_r(&timet, &tmstruct); + + wxCHECK_MSG( tm, -1, wxT("wxLocaltime_r() failed") ); + + return tm->tm_isdst; + } + else + { + int year = GetYear(); + + if ( !IsDSTApplicable(year, country) ) + { + // no DST time in this year in this country + return -1; + } + + return IsBetween(GetBeginDST(year, country), GetEndDST(year, country)); + } +} + +wxDateTime& wxDateTime::MakeTimezone(const TimeZone& tz, bool noDST) +{ + long secDiff = wxGetTimeZone() + tz.GetOffset(); + + // we need to know whether DST is or not in effect for this date unless + // the test disabled by the caller + if ( !noDST && (IsDST() == 1) ) + { + // FIXME we assume that the DST is always shifted by 1 hour + secDiff -= 3600; + } + + return Add(wxTimeSpan::Seconds(secDiff)); +} + +wxDateTime& wxDateTime::MakeFromTimezone(const TimeZone& tz, bool noDST) +{ + long secDiff = wxGetTimeZone() + tz.GetOffset(); + + // we need to know whether DST is or not in effect for this date unless + // the test disabled by the caller + if ( !noDST && (IsDST() == 1) ) + { + // FIXME we assume that the DST is always shifted by 1 hour + secDiff -= 3600; + } + + return Subtract(wxTimeSpan::Seconds(secDiff)); +} + +// ============================================================================ +// wxDateTimeHolidayAuthority and related classes +// ============================================================================ + +#include "wx/arrimpl.cpp" + +WX_DEFINE_OBJARRAY(wxDateTimeArray) + +static int wxCMPFUNC_CONV +wxDateTimeCompareFunc(wxDateTime **first, wxDateTime **second) +{ + wxDateTime dt1 = **first, + dt2 = **second; + + return dt1 == dt2 ? 0 : dt1 < dt2 ? -1 : +1; +} + +// ---------------------------------------------------------------------------- +// wxDateTimeHolidayAuthority +// ---------------------------------------------------------------------------- + +wxHolidayAuthoritiesArray wxDateTimeHolidayAuthority::ms_authorities; + +/* static */ +bool wxDateTimeHolidayAuthority::IsHoliday(const wxDateTime& dt) +{ + size_t count = ms_authorities.size(); + for ( size_t n = 0; n < count; n++ ) + { + if ( ms_authorities[n]->DoIsHoliday(dt) ) + { + return true; + } + } + + return false; +} + +/* static */ +size_t +wxDateTimeHolidayAuthority::GetHolidaysInRange(const wxDateTime& dtStart, + const wxDateTime& dtEnd, + wxDateTimeArray& holidays) +{ + wxDateTimeArray hol; + + holidays.Clear(); + + const size_t countAuth = ms_authorities.size(); + for ( size_t nAuth = 0; nAuth < countAuth; nAuth++ ) + { + ms_authorities[nAuth]->DoGetHolidaysInRange(dtStart, dtEnd, hol); + + WX_APPEND_ARRAY(holidays, hol); + } + + holidays.Sort(wxDateTimeCompareFunc); + + return holidays.size(); +} + +/* static */ +void wxDateTimeHolidayAuthority::ClearAllAuthorities() +{ + WX_CLEAR_ARRAY(ms_authorities); +} + +/* static */ +void wxDateTimeHolidayAuthority::AddAuthority(wxDateTimeHolidayAuthority *auth) +{ + ms_authorities.push_back(auth); +} + +wxDateTimeHolidayAuthority::~wxDateTimeHolidayAuthority() +{ + // required here for Darwin +} + +// ---------------------------------------------------------------------------- +// wxDateTimeWorkDays +// ---------------------------------------------------------------------------- + +bool wxDateTimeWorkDays::DoIsHoliday(const wxDateTime& dt) const +{ + wxDateTime::WeekDay wd = dt.GetWeekDay(); + + return (wd == wxDateTime::Sun) || (wd == wxDateTime::Sat); +} + +size_t wxDateTimeWorkDays::DoGetHolidaysInRange(const wxDateTime& dtStart, + const wxDateTime& dtEnd, + wxDateTimeArray& holidays) const +{ + if ( dtStart > dtEnd ) + { + wxFAIL_MSG( wxT("invalid date range in GetHolidaysInRange") ); + + return 0u; + } + + holidays.Empty(); + + // instead of checking all days, start with the first Sat after dtStart and + // end with the last Sun before dtEnd + wxDateTime dtSatFirst = dtStart.GetNextWeekDay(wxDateTime::Sat), + dtSatLast = dtEnd.GetPrevWeekDay(wxDateTime::Sat), + dtSunFirst = dtStart.GetNextWeekDay(wxDateTime::Sun), + dtSunLast = dtEnd.GetPrevWeekDay(wxDateTime::Sun), + dt; + + for ( dt = dtSatFirst; dt <= dtSatLast; dt += wxDateSpan::Week() ) + { + holidays.Add(dt); + } + + for ( dt = dtSunFirst; dt <= dtSunLast; dt += wxDateSpan::Week() ) + { + holidays.Add(dt); + } + + return holidays.GetCount(); +} + +// ============================================================================ +// other helper functions +// ============================================================================ + +// ---------------------------------------------------------------------------- +// iteration helpers: can be used to write a for loop over enum variable like +// this: +// for ( m = wxDateTime::Jan; m < wxDateTime::Inv_Month; wxNextMonth(m) ) +// ---------------------------------------------------------------------------- + +WXDLLIMPEXP_BASE void wxNextMonth(wxDateTime::Month& m) +{ + wxASSERT_MSG( m < wxDateTime::Inv_Month, wxT("invalid month") ); + + // no wrapping or the for loop above would never end! + m = (wxDateTime::Month)(m + 1); +} + +WXDLLIMPEXP_BASE void wxPrevMonth(wxDateTime::Month& m) +{ + wxASSERT_MSG( m < wxDateTime::Inv_Month, wxT("invalid month") ); + + m = m == wxDateTime::Jan ? wxDateTime::Inv_Month + : (wxDateTime::Month)(m - 1); +} + +WXDLLIMPEXP_BASE void wxNextWDay(wxDateTime::WeekDay& wd) +{ + wxASSERT_MSG( wd < wxDateTime::Inv_WeekDay, wxT("invalid week day") ); + + // no wrapping or the for loop above would never end! + wd = (wxDateTime::WeekDay)(wd + 1); +} + +WXDLLIMPEXP_BASE void wxPrevWDay(wxDateTime::WeekDay& wd) +{ + wxASSERT_MSG( wd < wxDateTime::Inv_WeekDay, wxT("invalid week day") ); + + wd = wd == wxDateTime::Sun ? wxDateTime::Inv_WeekDay + : (wxDateTime::WeekDay)(wd - 1); +} + +#ifdef __WINDOWS__ + +wxDateTime& wxDateTime::SetFromMSWSysTime(const SYSTEMTIME& st) +{ + return Set(st.wDay, + static_cast(wxDateTime::Jan + st.wMonth - 1), + st.wYear, + st.wHour, st.wMinute, st.wSecond, st.wMilliseconds); +} + +wxDateTime& wxDateTime::SetFromMSWSysDate(const SYSTEMTIME& st) +{ + return Set(st.wDay, + static_cast(wxDateTime::Jan + st.wMonth - 1), + st.wYear, + 0, 0, 0, 0); +} + +void wxDateTime::GetAsMSWSysTime(SYSTEMTIME* st) const +{ + const wxDateTime::Tm tm(GetTm()); + + st->wYear = (WXWORD)tm.year; + st->wMonth = (WXWORD)(tm.mon - wxDateTime::Jan + 1); + st->wDay = tm.mday; + + st->wDayOfWeek = 0; + st->wHour = tm.hour; + st->wMinute = tm.min; + st->wSecond = tm.sec; + st->wMilliseconds = tm.msec; +} + +void wxDateTime::GetAsMSWSysDate(SYSTEMTIME* st) const +{ + const wxDateTime::Tm tm(GetTm()); + + st->wYear = (WXWORD)tm.year; + st->wMonth = (WXWORD)(tm.mon - wxDateTime::Jan + 1); + st->wDay = tm.mday; + + st->wDayOfWeek = + st->wHour = + st->wMinute = + st->wSecond = + st->wMilliseconds = 0; +} + +#endif // __WINDOWS__ + +#endif // wxUSE_DATETIME diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/datetimefmt.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/datetimefmt.cpp new file mode 100644 index 0000000000..4855025050 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/datetimefmt.cpp @@ -0,0 +1,2362 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/datetimefmt.cpp +// Purpose: wxDateTime formatting & parsing code +// Author: Vadim Zeitlin +// Modified by: +// Created: 11.05.99 +// Copyright: (c) 1999 Vadim Zeitlin +// parts of code taken from sndcal library by Scott E. Lee: +// +// Copyright 1993-1995, Scott E. Lee, all rights reserved. +// Permission granted to use, copy, modify, distribute and sell +// so long as the above copyright and this permission statement +// are retained in all copies. +// +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if !defined(wxUSE_DATETIME) || wxUSE_DATETIME + +#ifndef WX_PRECOMP + #ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" + #endif + #include "wx/string.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/stopwatch.h" // for wxGetLocalTimeMillis() + #include "wx/module.h" + #include "wx/crt.h" +#endif // WX_PRECOMP + +#include "wx/thread.h" + +#include + +#ifdef __WINDOWS__ + #include + #ifndef __WXWINCE__ + #include + #endif +#endif + +#include "wx/datetime.h" +#include "wx/time.h" + +// ============================================================================ +// implementation of wxDateTime +// ============================================================================ + +// ---------------------------------------------------------------------------- +// helpers shared between datetime.cpp and datetimefmt.cpp +// ---------------------------------------------------------------------------- + +extern void InitTm(struct tm& tm); + +extern wxString CallStrftime(const wxString& format, const tm* tm); + +// ---------------------------------------------------------------------------- +// constants (see also datetime.cpp) +// ---------------------------------------------------------------------------- + +static const int DAYS_PER_WEEK = 7; + +static const int HOURS_PER_DAY = 24; + +static const int SEC_PER_MIN = 60; + +static const int MIN_PER_HOUR = 60; + +// ---------------------------------------------------------------------------- +// parsing helpers +// ---------------------------------------------------------------------------- + +namespace +{ + +// all the functions below taking non-const wxString::const_iterator p advance +// it until the end of the match + +// scans all digits (but no more than len) and returns the resulting number +bool GetNumericToken(size_t len, + wxString::const_iterator& p, + const wxString::const_iterator& end, + unsigned long *number) +{ + size_t n = 1; + wxString s; + while ( p != end && wxIsdigit(*p) ) + { + s += *p++; + + if ( len && ++n > len ) + break; + } + + return !s.empty() && s.ToULong(number); +} + +// scans all alphabetic characters and returns the resulting string +wxString +GetAlphaToken(wxString::const_iterator& p, + const wxString::const_iterator& end) +{ + wxString s; + while ( p != end && wxIsalpha(*p) ) + { + s += *p++; + } + + return s; +} + +enum +{ + DateLang_English = 1, + DateLang_Local = 2 +}; + +// return the month if the string is a month name or Inv_Month otherwise +// +// flags can contain wxDateTime::Name_Abbr/Name_Full or both of them and lang +// can be either DateLang_Local (default) to interpret string as a localized +// month name or DateLang_English to parse it as a standard English name or +// their combination to interpret it in any way +wxDateTime::Month +GetMonthFromName(wxString::const_iterator& p, + const wxString::const_iterator& end, + int flags, + int lang) +{ + const wxString::const_iterator pOrig = p; + const wxString name = GetAlphaToken(p, end); + if ( name.empty() ) + return wxDateTime::Inv_Month; + + wxDateTime::Month mon; + for ( mon = wxDateTime::Jan; mon < wxDateTime::Inv_Month; wxNextMonth(mon) ) + { + // case-insensitive comparison either one of or with both abbreviated + // and not versions + if ( flags & wxDateTime::Name_Full ) + { + if ( lang & DateLang_English ) + { + if ( name.CmpNoCase(wxDateTime::GetEnglishMonthName(mon, + wxDateTime::Name_Full)) == 0 ) + break; + } + + if ( lang & DateLang_Local ) + { + if ( name.CmpNoCase(wxDateTime::GetMonthName(mon, + wxDateTime::Name_Full)) == 0 ) + break; + } + } + + if ( flags & wxDateTime::Name_Abbr ) + { + if ( lang & DateLang_English ) + { + if ( name.CmpNoCase(wxDateTime::GetEnglishMonthName(mon, + wxDateTime::Name_Abbr)) == 0 ) + break; + } + + if ( lang & DateLang_Local ) + { + // some locales (e.g. French one) use periods for the + // abbreviated month names but it's never part of name so + // compare it specially + wxString nameAbbr = wxDateTime::GetMonthName(mon, + wxDateTime::Name_Abbr); + const bool hasPeriod = *nameAbbr.rbegin() == '.'; + if ( hasPeriod ) + nameAbbr.erase(nameAbbr.end() - 1); + + if ( name.CmpNoCase(nameAbbr) == 0 ) + { + if ( hasPeriod ) + { + // skip trailing period if it was part of the match + if ( *p == '.' ) + ++p; + else // no match as no matching period + continue; + } + + break; + } + } + } + } + + if ( mon == wxDateTime::Inv_Month ) + p = pOrig; + + return mon; +} + +// return the weekday if the string is a weekday name or Inv_WeekDay otherwise +// +// flags and lang parameters have the same meaning as for GetMonthFromName() +// above +wxDateTime::WeekDay +GetWeekDayFromName(wxString::const_iterator& p, + const wxString::const_iterator& end, + int flags, int lang) +{ + const wxString::const_iterator pOrig = p; + const wxString name = GetAlphaToken(p, end); + if ( name.empty() ) + return wxDateTime::Inv_WeekDay; + + wxDateTime::WeekDay wd; + for ( wd = wxDateTime::Sun; wd < wxDateTime::Inv_WeekDay; wxNextWDay(wd) ) + { + if ( flags & wxDateTime::Name_Full ) + { + if ( lang & DateLang_English ) + { + if ( name.CmpNoCase(wxDateTime::GetEnglishWeekDayName(wd, + wxDateTime::Name_Full)) == 0 ) + break; + } + + if ( lang & DateLang_Local ) + { + if ( name.CmpNoCase(wxDateTime::GetWeekDayName(wd, + wxDateTime::Name_Full)) == 0 ) + break; + } + } + + if ( flags & wxDateTime::Name_Abbr ) + { + if ( lang & DateLang_English ) + { + if ( name.CmpNoCase(wxDateTime::GetEnglishWeekDayName(wd, + wxDateTime::Name_Abbr)) == 0 ) + break; + } + + if ( lang & DateLang_Local ) + { + if ( name.CmpNoCase(wxDateTime::GetWeekDayName(wd, + wxDateTime::Name_Abbr)) == 0 ) + break; + } + } + } + + if ( wd == wxDateTime::Inv_WeekDay ) + p = pOrig; + + return wd; +} + +// parses string starting at given iterator using the specified format and, +// optionally, a fall back format (and optionally another one... but it stops +// there, really) +// +// if unsuccessful, returns invalid wxDateTime without changing p; otherwise +// advance p to the end of the match and returns wxDateTime containing the +// results of the parsing +wxDateTime +ParseFormatAt(wxString::const_iterator& p, + const wxString::const_iterator& end, + const wxString& fmt, + // FIXME-VC6: using wxString() instead of wxEmptyString in the + // line below results in error C2062: type 'class + // wxString (__cdecl *)(void)' unexpected + const wxString& fmtAlt = wxEmptyString) +{ + const wxString str(p, end); + wxString::const_iterator endParse; + wxDateTime dt; + + // Use a default date outside of the DST period to avoid problems with + // parsing the time differently depending on the today's date (which is used + // as the fall back date if none is explicitly specified). + static const wxDateTime dtDef(1, wxDateTime::Jan, 2012); + + if ( dt.ParseFormat(str, fmt, dtDef, &endParse) || + (!fmtAlt.empty() && dt.ParseFormat(str, fmtAlt, dtDef, &endParse)) ) + { + p += endParse - str.begin(); + } + //else: all formats failed + + return dt; +} + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// wxDateTime to/from text representations +// ---------------------------------------------------------------------------- + +wxString wxDateTime::Format(const wxString& formatp, const TimeZone& tz) const +{ + wxCHECK_MSG( !formatp.empty(), wxEmptyString, + wxT("NULL format in wxDateTime::Format") ); + + wxString format = formatp; +#ifdef __WXOSX__ + format.Replace("%c",wxLocale::GetInfo(wxLOCALE_DATE_TIME_FMT)); + format.Replace("%x",wxLocale::GetInfo(wxLOCALE_SHORT_DATE_FMT)); + format.Replace("%X",wxLocale::GetInfo(wxLOCALE_TIME_FMT)); +#endif + // we have to use our own implementation if the date is out of range of + // strftime() or if we use non standard specifiers (notice that "%z" is + // special because it is de facto standard under Unix but is not supported + // under Windows) +#ifdef wxHAS_STRFTIME + time_t time = GetTicks(); + + if ( (time != (time_t)-1) && !wxStrstr(format, wxT("%l")) +#ifdef __WINDOWS__ + && !wxStrstr(format, wxT("%z")) +#endif + ) + { + // use strftime() + struct tm tmstruct; + struct tm *tm; + if ( tz.GetOffset() == -wxGetTimeZone() ) + { + // we are working with local time + tm = wxLocaltime_r(&time, &tmstruct); + + // should never happen + wxCHECK_MSG( tm, wxEmptyString, wxT("wxLocaltime_r() failed") ); + } + else + { + time += (int)tz.GetOffset(); + +#if defined(__VMS__) || defined(__WATCOMC__) // time is unsigned so avoid warning + int time2 = (int) time; + if ( time2 >= 0 ) +#else + if ( time >= 0 ) +#endif + { + tm = wxGmtime_r(&time, &tmstruct); + + // should never happen + wxCHECK_MSG( tm, wxEmptyString, wxT("wxGmtime_r() failed") ); + } + else + { + tm = (struct tm *)NULL; + } + } + + if ( tm ) + { + return CallStrftime(format, tm); + } + } + //else: use generic code below +#endif // wxHAS_STRFTIME + + // we only parse ANSI C format specifications here, no POSIX 2 + // complications, no GNU extensions but we do add support for a "%l" format + // specifier allowing to get the number of milliseconds + Tm tm = GetTm(tz); + + // used for calls to strftime() when we only deal with time + struct tm tmTimeOnly; + memset(&tmTimeOnly, 0, sizeof(tmTimeOnly)); + tmTimeOnly.tm_hour = tm.hour; + tmTimeOnly.tm_min = tm.min; + tmTimeOnly.tm_sec = tm.sec; + tmTimeOnly.tm_mday = 1; // any date will do, use 1976-01-01 + tmTimeOnly.tm_mon = 0; + tmTimeOnly.tm_year = 76; + tmTimeOnly.tm_isdst = 0; // no DST, we adjust for tz ourselves + + wxString tmp, res, fmt; + for ( wxString::const_iterator p = format.begin(); p != format.end(); ++p ) + { + if ( *p != wxT('%') ) + { + // copy as is + res += *p; + + continue; + } + + // set the default format + switch ( (*++p).GetValue() ) + { + case wxT('Y'): // year has 4 digits + case wxT('z'): // time zone as well + fmt = wxT("%04d"); + break; + + case wxT('j'): // day of year has 3 digits + case wxT('l'): // milliseconds have 3 digits + fmt = wxT("%03d"); + break; + + case wxT('w'): // week day as number has only one + fmt = wxT("%d"); + break; + + default: + // it's either another valid format specifier in which case + // the format is "%02d" (for all the rest) or we have the + // field width preceding the format in which case it will + // override the default format anyhow + fmt = wxT("%02d"); + } + + bool restart = true; + while ( restart ) + { + restart = false; + + // start of the format specification + switch ( (*p).GetValue() ) + { + case wxT('a'): // a weekday name + case wxT('A'): + // second parameter should be true for abbreviated names + res += GetWeekDayName(tm.GetWeekDay(), + *p == wxT('a') ? Name_Abbr : Name_Full); + break; + + case wxT('b'): // a month name + case wxT('B'): + res += GetMonthName(tm.mon, + *p == wxT('b') ? Name_Abbr : Name_Full); + break; + + case wxT('c'): // locale default date and time representation + case wxT('x'): // locale default date representation +#ifdef wxHAS_STRFTIME + // + // the problem: there is no way to know what do these format + // specifications correspond to for the current locale. + // + // the solution: use a hack and still use strftime(): first + // find the YEAR which is a year in the strftime() range (1970 + // - 2038) whose Jan 1 falls on the same week day as the Jan 1 + // of the real year. Then make a copy of the format and + // replace all occurrences of YEAR in it with some unique + // string not appearing anywhere else in it, then use + // strftime() to format the date in year YEAR and then replace + // YEAR back by the real year and the unique replacement + // string back with YEAR. Notice that "all occurrences of YEAR" + // means all occurrences of 4 digit as well as 2 digit form! + // + // the bugs: we assume that neither of %c nor %x contains any + // fields which may change between the YEAR and real year. For + // example, the week number (%U, %W) and the day number (%j) + // will change if one of these years is leap and the other one + // is not! + { + // find the YEAR: normally, for any year X, Jan 1 of the + // year X + 28 is the same weekday as Jan 1 of X (because + // the weekday advances by 1 for each normal X and by 2 + // for each leap X, hence by 5 every 4 years or by 35 + // which is 0 mod 7 every 28 years) but this rule breaks + // down if there are years between X and Y which are + // divisible by 4 but not leap (i.e. divisible by 100 but + // not 400), hence the correction. + + int yearReal = GetYear(tz); + int mod28 = yearReal % 28; + + // be careful to not go too far - we risk to leave the + // supported range + int year; + if ( mod28 < 10 ) + { + year = 1988 + mod28; // 1988 == 0 (mod 28) + } + else + { + year = 1970 + mod28 - 10; // 1970 == 10 (mod 28) + } + + int nCentury = year / 100, + nCenturyReal = yearReal / 100; + + // need to adjust for the years divisble by 400 which are + // not leap but are counted like leap ones if we just take + // the number of centuries in between for nLostWeekDays + int nLostWeekDays = (nCentury - nCenturyReal) - + (nCentury / 4 - nCenturyReal / 4); + + // we have to gain back the "lost" weekdays: note that the + // effect of this loop is to not do anything to + // nLostWeekDays (which we won't use any more), but to + // (indirectly) set the year correctly + while ( (nLostWeekDays % 7) != 0 ) + { + nLostWeekDays += (year++ % 4) ? 1 : 2; + } + + // finally move the year below 2000 so that the 2-digit + // year number can never match the month or day of the + // month when we do the replacements below + if ( year >= 2000 ) + year -= 28; + + wxASSERT_MSG( year >= 1970 && year < 2000, + wxT("logic error in wxDateTime::Format") ); + + + // use strftime() to format the same date but in supported + // year + // + // NB: we assume that strftime() doesn't check for the + // date validity and will happily format the date + // corresponding to Feb 29 of a non leap year (which + // may happen if yearReal was leap and year is not) + struct tm tmAdjusted; + InitTm(tmAdjusted); + tmAdjusted.tm_hour = tm.hour; + tmAdjusted.tm_min = tm.min; + tmAdjusted.tm_sec = tm.sec; + tmAdjusted.tm_wday = tm.GetWeekDay(); + tmAdjusted.tm_yday = GetDayOfYear(); + tmAdjusted.tm_mday = tm.mday; + tmAdjusted.tm_mon = tm.mon; + tmAdjusted.tm_year = year - 1900; + tmAdjusted.tm_isdst = 0; // no DST, already adjusted + wxString str = CallStrftime(*p == wxT('c') ? wxT("%c") + : wxT("%x"), + &tmAdjusted); + + // now replace the replacement year with the real year: + // notice that we have to replace the 4 digit year with + // a unique string not appearing in strftime() output + // first to prevent the 2 digit year from matching any + // substring of the 4 digit year (but any day, month, + // hours or minutes components should be safe because + // they are never in 70-99 range) + wxString replacement("|"); + while ( str.find(replacement) != wxString::npos ) + replacement += '|'; + + str.Replace(wxString::Format("%d", year), + replacement); + str.Replace(wxString::Format("%d", year % 100), + wxString::Format("%d", yearReal % 100)); + str.Replace(replacement, + wxString::Format("%d", yearReal)); + + res += str; + } +#else // !wxHAS_STRFTIME + // Use "%m/%d/%y %H:%M:%S" format instead + res += wxString::Format(wxT("%02d/%02d/%04d %02d:%02d:%02d"), + tm.mon+1,tm.mday, tm.year, tm.hour, tm.min, tm.sec); +#endif // wxHAS_STRFTIME/!wxHAS_STRFTIME + break; + + case wxT('d'): // day of a month (01-31) + res += wxString::Format(fmt, tm.mday); + break; + + case wxT('H'): // hour in 24h format (00-23) + res += wxString::Format(fmt, tm.hour); + break; + + case wxT('I'): // hour in 12h format (01-12) + { + // 24h -> 12h, 0h -> 12h too + int hour12 = tm.hour > 12 ? tm.hour - 12 + : tm.hour ? tm.hour : 12; + res += wxString::Format(fmt, hour12); + } + break; + + case wxT('j'): // day of the year + res += wxString::Format(fmt, GetDayOfYear(tz)); + break; + + case wxT('l'): // milliseconds (NOT STANDARD) + res += wxString::Format(fmt, GetMillisecond(tz)); + break; + + case wxT('m'): // month as a number (01-12) + res += wxString::Format(fmt, tm.mon + 1); + break; + + case wxT('M'): // minute as a decimal number (00-59) + res += wxString::Format(fmt, tm.min); + break; + + case wxT('p'): // AM or PM string +#ifdef wxHAS_STRFTIME + res += CallStrftime(wxT("%p"), &tmTimeOnly); +#else // !wxHAS_STRFTIME + res += (tmTimeOnly.tm_hour > 12) ? wxT("pm") : wxT("am"); +#endif // wxHAS_STRFTIME/!wxHAS_STRFTIME + break; + + case wxT('S'): // second as a decimal number (00-61) + res += wxString::Format(fmt, tm.sec); + break; + + case wxT('U'): // week number in the year (Sunday 1st week day) + res += wxString::Format(fmt, GetWeekOfYear(Sunday_First, tz)); + break; + + case wxT('W'): // week number in the year (Monday 1st week day) + res += wxString::Format(fmt, GetWeekOfYear(Monday_First, tz)); + break; + + case wxT('w'): // weekday as a number (0-6), Sunday = 0 + res += wxString::Format(fmt, tm.GetWeekDay()); + break; + + // case wxT('x'): -- handled with "%c" + + case wxT('X'): // locale default time representation + // just use strftime() to format the time for us +#ifdef wxHAS_STRFTIME + res += CallStrftime(wxT("%X"), &tmTimeOnly); +#else // !wxHAS_STRFTIME + res += wxString::Format(wxT("%02d:%02d:%02d"),tm.hour, tm.min, tm.sec); +#endif // wxHAS_STRFTIME/!wxHAS_STRFTIME + break; + + case wxT('y'): // year without century (00-99) + res += wxString::Format(fmt, tm.year % 100); + break; + + case wxT('Y'): // year with century + res += wxString::Format(fmt, tm.year); + break; + + case wxT('z'): // time zone as [-+]HHMM + { + int ofs = tz.GetOffset(); + + // The time zone offset does not include the DST, but + // we do need to take it into account when showing the + // time in the local time zone to the user. + if ( ofs == -wxGetTimeZone() && IsDST() == 1 ) + { + // FIXME: As elsewhere in wxDateTime, we assume + // that the DST is always 1 hour, but this is not + // true in general. + ofs += 3600; + } + + if ( ofs < 0 ) + { + res += '-'; + ofs = -ofs; + } + else + { + res += '+'; + } + + // Converts seconds to HHMM representation. + res += wxString::Format(fmt, + 100*(ofs/3600) + (ofs/60)%60); + } + break; + + case wxT('Z'): // timezone name +#ifdef wxHAS_STRFTIME + res += CallStrftime(wxT("%Z"), &tmTimeOnly); +#endif + break; + + default: + // is it the format width? + for ( fmt.clear(); + *p == wxT('-') || *p == wxT('+') || + *p == wxT(' ') || wxIsdigit(*p); + ++p ) + { + fmt += *p; + } + + if ( !fmt.empty() ) + { + // we've only got the flags and width so far in fmt + fmt.Prepend(wxT('%')); + fmt.Append(wxT('d')); + + restart = true; + + break; + } + + // no, it wasn't the width + wxFAIL_MSG(wxT("unknown format specifier")); + + // fall through and just copy it nevertheless + + case wxT('%'): // a percent sign + res += *p; + break; + + case 0: // the end of string + wxFAIL_MSG(wxT("missing format at the end of string")); + + // just put the '%' which was the last char in format + res += wxT('%'); + break; + } + } + } + + return res; +} + +// this function parses a string in (strict) RFC 822 format: see the section 5 +// of the RFC for the detailed description, but briefly it's something of the +// form "Sat, 18 Dec 1999 00:48:30 +0100" +// +// this function is "strict" by design - it must reject anything except true +// RFC822 time specs. +bool +wxDateTime::ParseRfc822Date(const wxString& date, wxString::const_iterator *end) +{ + const wxString::const_iterator pEnd = date.end(); + wxString::const_iterator p = date.begin(); + + // 1. week day + const wxDateTime::WeekDay + wd = GetWeekDayFromName(p, pEnd, Name_Abbr, DateLang_English); + if ( wd == Inv_WeekDay ) + return false; + //else: ignore week day for now, we could also check that it really + // corresponds to the specified date + + // 2. separating comma + if ( *p++ != ',' || *p++ != ' ' ) + return false; + + // 3. day number + if ( !wxIsdigit(*p) ) + return false; + + wxDateTime_t day = (wxDateTime_t)(*p++ - '0'); + if ( wxIsdigit(*p) ) + { + day *= 10; + day = (wxDateTime_t)(day + (*p++ - '0')); + } + + if ( *p++ != ' ' ) + return false; + + // 4. month name + const Month mon = GetMonthFromName(p, pEnd, Name_Abbr, DateLang_English); + if ( mon == Inv_Month ) + return false; + + if ( *p++ != ' ' ) + return false; + + // 5. year + if ( !wxIsdigit(*p) ) + return false; + + int year = *p++ - '0'; + if ( !wxIsdigit(*p) ) // should have at least 2 digits in the year + return false; + + year *= 10; + year += *p++ - '0'; + + // is it a 2 digit year (as per original RFC 822) or a 4 digit one? + if ( wxIsdigit(*p) ) + { + year *= 10; + year += *p++ - '0'; + + if ( !wxIsdigit(*p) ) + { + // no 3 digit years please + return false; + } + + year *= 10; + year += *p++ - '0'; + } + + if ( *p++ != ' ' ) + return false; + + // 6. time in hh:mm:ss format with seconds being optional + if ( !wxIsdigit(*p) ) + return false; + + wxDateTime_t hour = (wxDateTime_t)(*p++ - '0'); + + if ( !wxIsdigit(*p) ) + return false; + + hour *= 10; + hour = (wxDateTime_t)(hour + (*p++ - '0')); + + if ( *p++ != ':' ) + return false; + + if ( !wxIsdigit(*p) ) + return false; + + wxDateTime_t min = (wxDateTime_t)(*p++ - '0'); + + if ( !wxIsdigit(*p) ) + return false; + + min *= 10; + min += (wxDateTime_t)(*p++ - '0'); + + wxDateTime_t sec = 0; + if ( *p == ':' ) + { + p++; + if ( !wxIsdigit(*p) ) + return false; + + sec = (wxDateTime_t)(*p++ - '0'); + + if ( !wxIsdigit(*p) ) + return false; + + sec *= 10; + sec += (wxDateTime_t)(*p++ - '0'); + } + + if ( *p++ != ' ' ) + return false; + + // 7. now the interesting part: the timezone + int offset = 0; // just to suppress warnings + if ( *p == '-' || *p == '+' ) + { + // the explicit offset given: it has the form of hhmm + bool plus = *p++ == '+'; + + if ( !wxIsdigit(*p) || !wxIsdigit(*(p + 1)) ) + return false; + + + // hours + offset = MIN_PER_HOUR*(10*(*p - '0') + (*(p + 1) - '0')); + + p += 2; + + if ( !wxIsdigit(*p) || !wxIsdigit(*(p + 1)) ) + return false; + + // minutes + offset += 10*(*p - '0') + (*(p + 1) - '0'); + + if ( !plus ) + offset = -offset; + + p += 2; + } + else // not numeric + { + // the symbolic timezone given: may be either military timezone or one + // of standard abbreviations + if ( !*(p + 1) ) + { + // military: Z = UTC, J unused, A = -1, ..., Y = +12 + static const int offsets[26] = + { + //A B C D E F G H I J K L M + -1, -2, -3, -4, -5, -6, -7, -8, -9, 0, -10, -11, -12, + //N O P R Q S T U V W Z Y Z + +1, +2, +3, +4, +5, +6, +7, +8, +9, +10, +11, +12, 0 + }; + + if ( *p < wxT('A') || *p > wxT('Z') || *p == wxT('J') ) + return false; + + offset = offsets[*p++ - 'A']; + } + else + { + // abbreviation + const wxString tz(p, date.end()); + if ( tz == wxT("UT") || tz == wxT("UTC") || tz == wxT("GMT") ) + offset = 0; + else if ( tz == wxT("AST") ) + offset = AST - GMT0; + else if ( tz == wxT("ADT") ) + offset = ADT - GMT0; + else if ( tz == wxT("EST") ) + offset = EST - GMT0; + else if ( tz == wxT("EDT") ) + offset = EDT - GMT0; + else if ( tz == wxT("CST") ) + offset = CST - GMT0; + else if ( tz == wxT("CDT") ) + offset = CDT - GMT0; + else if ( tz == wxT("MST") ) + offset = MST - GMT0; + else if ( tz == wxT("MDT") ) + offset = MDT - GMT0; + else if ( tz == wxT("PST") ) + offset = PST - GMT0; + else if ( tz == wxT("PDT") ) + offset = PDT - GMT0; + else + return false; + + p += tz.length(); + } + + // make it minutes + offset *= MIN_PER_HOUR; + } + + + // the spec was correct, construct the date from the values we found + Set(day, mon, year, hour, min, sec); + MakeFromTimezone(TimeZone::Make(offset*SEC_PER_MIN)); + + if ( end ) + *end = p; + + return true; +} + +const char* wxDateTime::ParseRfc822Date(const char* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseRfc822Date(dateStr, &end) ) + return NULL; + + return date + dateStr.IterOffsetInMBStr(end); +} + +const wchar_t* wxDateTime::ParseRfc822Date(const wchar_t* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseRfc822Date(dateStr, &end) ) + return NULL; + + return date + (end - dateStr.begin()); +} + +bool +wxDateTime::ParseFormat(const wxString& date, + const wxString& format, + const wxDateTime& dateDef, + wxString::const_iterator *endParse) +{ + wxCHECK_MSG( !format.empty(), false, "format can't be empty" ); + wxCHECK_MSG( endParse, false, "end iterator pointer must be specified" ); + + wxString str; + unsigned long num; + + // what fields have we found? + bool haveWDay = false, + haveYDay = false, + haveDay = false, + haveMon = false, + haveYear = false, + haveHour = false, + haveMin = false, + haveSec = false, + haveMsec = false; + + bool hourIsIn12hFormat = false, // or in 24h one? + isPM = false; // AM by default + + bool haveTimeZone = false; + + // and the value of the items we have (init them to get rid of warnings) + wxDateTime_t msec = 0, + sec = 0, + min = 0, + hour = 0; + WeekDay wday = Inv_WeekDay; + wxDateTime_t yday = 0, + mday = 0; + wxDateTime::Month mon = Inv_Month; + int year = 0; + long timeZone = 0; // time zone in seconds as expected in Tm structure + + wxString::const_iterator input = date.begin(); + const wxString::const_iterator end = date.end(); + for ( wxString::const_iterator fmt = format.begin(); fmt != format.end(); ++fmt ) + { + if ( *fmt != wxT('%') ) + { + if ( wxIsspace(*fmt) ) + { + // a white space in the format string matches 0 or more white + // spaces in the input + while ( input != end && wxIsspace(*input) ) + { + input++; + } + } + else // !space + { + // any other character (not whitespace, not '%') must be + // matched by itself in the input + if ( input == end || *input++ != *fmt ) + { + // no match + return false; + } + } + + // done with this format char + continue; + } + + // start of a format specification + + // parse the optional width + size_t width = 0; + while ( wxIsdigit(*++fmt) ) + { + width *= 10; + width += *fmt - '0'; + } + + // the default widths for the various fields + if ( !width ) + { + switch ( (*fmt).GetValue() ) + { + case wxT('Y'): // year has 4 digits + width = 4; + break; + + case wxT('j'): // day of year has 3 digits + case wxT('l'): // milliseconds have 3 digits + width = 3; + break; + + case wxT('w'): // week day as number has only one + width = 1; + break; + + default: + // default for all other fields + width = 2; + } + } + + // then the format itself + switch ( (*fmt).GetValue() ) + { + case wxT('a'): // a weekday name + case wxT('A'): + { + wday = GetWeekDayFromName + ( + input, end, + *fmt == 'a' ? Name_Abbr : Name_Full, + DateLang_Local + ); + if ( wday == Inv_WeekDay ) + { + // no match + return false; + } + } + haveWDay = true; + break; + + case wxT('b'): // a month name + case wxT('B'): + { + mon = GetMonthFromName + ( + input, end, + *fmt == 'b' ? Name_Abbr : Name_Full, + DateLang_Local + ); + if ( mon == Inv_Month ) + { + // no match + return false; + } + } + haveMon = true; + break; + + case wxT('c'): // locale default date and time representation + { + wxDateTime dt; + +#if wxUSE_INTL + const wxString + fmtDateTime = wxLocale::GetInfo(wxLOCALE_DATE_TIME_FMT); + if ( !fmtDateTime.empty() ) + dt = ParseFormatAt(input, end, fmtDateTime); +#endif // wxUSE_INTL + if ( !dt.IsValid() ) + { + // also try the format which corresponds to ctime() + // output (i.e. the "C" locale default) + dt = ParseFormatAt(input, end, wxS("%a %b %d %H:%M:%S %Y")); + } + + if ( !dt.IsValid() ) + { + // and finally also the two generic date/time formats + dt = ParseFormatAt(input, end, wxS("%x %X"), wxS("%X %x")); + } + + if ( !dt.IsValid() ) + return false; + + const Tm tm = dt.GetTm(); + + hour = tm.hour; + min = tm.min; + sec = tm.sec; + + year = tm.year; + mon = tm.mon; + mday = tm.mday; + + haveDay = haveMon = haveYear = + haveHour = haveMin = haveSec = true; + } + break; + + case wxT('d'): // day of a month (01-31) + case 'e': // day of a month (1-31) (GNU extension) + if ( !GetNumericToken(width, input, end, &num) || + (num > 31) || (num < 1) ) + { + // no match + return false; + } + + // we can't check whether the day range is correct yet, will + // do it later - assume ok for now + haveDay = true; + mday = (wxDateTime_t)num; + break; + + case wxT('H'): // hour in 24h format (00-23) + if ( !GetNumericToken(width, input, end, &num) || (num > 23) ) + { + // no match + return false; + } + + haveHour = true; + hour = (wxDateTime_t)num; + break; + + case wxT('I'): // hour in 12h format (01-12) + if ( !GetNumericToken(width, input, end, &num) || + !num || (num > 12) ) + { + // no match + return false; + } + + haveHour = true; + hourIsIn12hFormat = true; + hour = (wxDateTime_t)(num % 12); // 12 should be 0 + break; + + case wxT('j'): // day of the year + if ( !GetNumericToken(width, input, end, &num) || + !num || (num > 366) ) + { + // no match + return false; + } + + haveYDay = true; + yday = (wxDateTime_t)num; + break; + + case wxT('l'): // milliseconds (0-999) + if ( !GetNumericToken(width, input, end, &num) ) + return false; + + haveMsec = true; + msec = (wxDateTime_t)num; + break; + + case wxT('m'): // month as a number (01-12) + if ( !GetNumericToken(width, input, end, &num) || + !num || (num > 12) ) + { + // no match + return false; + } + + haveMon = true; + mon = (Month)(num - 1); + break; + + case wxT('M'): // minute as a decimal number (00-59) + if ( !GetNumericToken(width, input, end, &num) || + (num > 59) ) + { + // no match + return false; + } + + haveMin = true; + min = (wxDateTime_t)num; + break; + + case wxT('p'): // AM or PM string + { + wxString am, pm; + GetAmPmStrings(&am, &pm); + + // we can never match %p in locales which don't use AM/PM + if ( am.empty() || pm.empty() ) + return false; + + const size_t pos = input - date.begin(); + if ( date.compare(pos, pm.length(), pm) == 0 ) + { + isPM = true; + input += pm.length(); + } + else if ( date.compare(pos, am.length(), am) == 0 ) + { + input += am.length(); + } + else // no match + { + return false; + } + } + break; + + case wxT('r'): // time as %I:%M:%S %p + { + wxDateTime dt; + if ( !dt.ParseFormat(wxString(input, end), + wxS("%I:%M:%S %p"), &input) ) + return false; + + haveHour = haveMin = haveSec = true; + + const Tm tm = dt.GetTm(); + hour = tm.hour; + min = tm.min; + sec = tm.sec; + } + break; + + case wxT('R'): // time as %H:%M + { + const wxDateTime + dt = ParseFormatAt(input, end, wxS("%H:%M")); + if ( !dt.IsValid() ) + return false; + + haveHour = + haveMin = true; + + const Tm tm = dt.GetTm(); + hour = tm.hour; + min = tm.min; + } + break; + + case wxT('S'): // second as a decimal number (00-61) + if ( !GetNumericToken(width, input, end, &num) || + (num > 61) ) + { + // no match + return false; + } + + haveSec = true; + sec = (wxDateTime_t)num; + break; + + case wxT('T'): // time as %H:%M:%S + { + const wxDateTime + dt = ParseFormatAt(input, end, wxS("%H:%M:%S")); + if ( !dt.IsValid() ) + return false; + + haveHour = + haveMin = + haveSec = true; + + const Tm tm = dt.GetTm(); + hour = tm.hour; + min = tm.min; + sec = tm.sec; + } + break; + + case wxT('w'): // weekday as a number (0-6), Sunday = 0 + if ( !GetNumericToken(width, input, end, &num) || + (wday > 6) ) + { + // no match + return false; + } + + haveWDay = true; + wday = (WeekDay)num; + break; + + case wxT('x'): // locale default date representation + { +#if wxUSE_INTL + wxString + fmtDate = wxLocale::GetInfo(wxLOCALE_SHORT_DATE_FMT), + fmtDateAlt = wxLocale::GetInfo(wxLOCALE_LONG_DATE_FMT); +#else // !wxUSE_INTL + wxString fmtDate, fmtDateAlt; +#endif // wxUSE_INTL/!wxUSE_INTL + if ( fmtDate.empty() ) + { + if ( IsWestEuropeanCountry(GetCountry()) || + GetCountry() == Russia ) + { + fmtDate = wxS("%d/%m/%Y"); + fmtDateAlt = wxS("%m/%d/%Y"); + } + else // assume USA + { + fmtDate = wxS("%m/%d/%Y"); + fmtDateAlt = wxS("%d/%m/%Y"); + } + } + + wxDateTime + dt = ParseFormatAt(input, end, fmtDate, fmtDateAlt); + + if ( !dt.IsValid() ) + { + // try with short years too + fmtDate.Replace("%Y","%y"); + fmtDateAlt.Replace("%Y","%y"); + dt = ParseFormatAt(input, end, fmtDate, fmtDateAlt); + + if ( !dt.IsValid() ) + return false; + } + + const Tm tm = dt.GetTm(); + + haveDay = + haveMon = + haveYear = true; + + year = tm.year; + mon = tm.mon; + mday = tm.mday; + } + + break; + + case wxT('X'): // locale default time representation + { +#if wxUSE_INTL + wxString fmtTime = wxLocale::GetInfo(wxLOCALE_TIME_FMT), + fmtTimeAlt; +#else // !wxUSE_INTL + wxString fmtTime, fmtTimeAlt; +#endif // wxUSE_INTL/!wxUSE_INTL + if ( fmtTime.empty() ) + { + // try to parse what follows as "%H:%M:%S" and, if this + // fails, as "%I:%M:%S %p" - this should catch the most + // common cases + fmtTime = "%T"; + fmtTimeAlt = "%r"; + } + + const wxDateTime + dt = ParseFormatAt(input, end, fmtTime, fmtTimeAlt); + if ( !dt.IsValid() ) + return false; + + haveHour = + haveMin = + haveSec = true; + + const Tm tm = dt.GetTm(); + hour = tm.hour; + min = tm.min; + sec = tm.sec; + } + break; + + case wxT('y'): // year without century (00-99) + if ( !GetNumericToken(width, input, end, &num) || + (num > 99) ) + { + // no match + return false; + } + + haveYear = true; + + // TODO should have an option for roll over date instead of + // hard coding it here + year = (num > 30 ? 1900 : 2000) + (wxDateTime_t)num; + break; + + case wxT('Y'): // year with century + if ( !GetNumericToken(width, input, end, &num) ) + { + // no match + return false; + } + + haveYear = true; + year = (wxDateTime_t)num; + break; + + case wxT('z'): + { + // check that we have something here at all + if ( input == end ) + return false; + + // and then check that it's either plus or minus sign + bool minusFound; + if ( *input == wxT('-') ) + minusFound = true; + else if ( *input == wxT('+') ) + minusFound = false; + else + return false; // no match + + // here should follow 4 digits HHMM + ++input; + unsigned long tzHourMin; + if ( !GetNumericToken(4, input, end, &tzHourMin) ) + return false; // no match + + const unsigned hours = tzHourMin / 100; + const unsigned minutes = tzHourMin % 100; + + if ( hours > 12 || minutes > 59 ) + return false; // bad format + + timeZone = 3600*hours + 60*minutes; + if ( minusFound ) + timeZone = -timeZone; + + haveTimeZone = true; + } + break; + + case wxT('Z'): // timezone name + // FIXME: currently we just ignore everything that looks like a + // time zone here + GetAlphaToken(input, end); + break; + + case wxT('%'): // a percent sign + if ( input == end || *input++ != wxT('%') ) + { + // no match + return false; + } + break; + + case 0: // the end of string + wxFAIL_MSG(wxT("unexpected format end")); + + // fall through + + default: // not a known format spec + return false; + } + } + + // format matched, try to construct a date from what we have now + Tm tmDef; + if ( dateDef.IsValid() ) + { + // take this date as default + tmDef = dateDef.GetTm(); + } + else if ( IsValid() ) + { + // if this date is valid, don't change it + tmDef = GetTm(); + } + else + { + // no default and this date is invalid - fall back to Today() + tmDef = Today().GetTm(); + } + + Tm tm = tmDef; + + // set the date + if ( haveMon ) + { + tm.mon = mon; + } + + if ( haveYear ) + { + tm.year = year; + } + + // TODO we don't check here that the values are consistent, if both year + // day and month/day were found, we just ignore the year day and we + // also always ignore the week day + if ( haveDay ) + { + if ( mday > GetNumberOfDays(tm.mon, tm.year) ) + return false; + + tm.mday = mday; + } + else if ( haveYDay ) + { + if ( yday > GetNumberOfDays(tm.year) ) + return false; + + Tm tm2 = wxDateTime(1, Jan, tm.year).SetToYearDay(yday).GetTm(); + + tm.mon = tm2.mon; + tm.mday = tm2.mday; + } + + // deal with AM/PM + if ( haveHour && hourIsIn12hFormat && isPM ) + { + // translate to 24hour format + hour += 12; + } + //else: either already in 24h format or no translation needed + + // set the time + if ( haveHour ) + { + tm.hour = hour; + } + + if ( haveMin ) + { + tm.min = min; + } + + if ( haveSec ) + { + tm.sec = sec; + } + + if ( haveMsec ) + tm.msec = msec; + + Set(tm); + + // If a time zone was specified and it is not the local time zone, we need + // to shift the time accordingly. + // + // Note that avoiding the call to MakeFromTimeZone is necessary to avoid + // DST problems. + if ( haveTimeZone && timeZone != -wxGetTimeZone() ) + MakeFromTimezone(timeZone); + + // finally check that the week day is consistent -- if we had it + if ( haveWDay && GetWeekDay() != wday ) + return false; + + *endParse = input; + + return true; +} + +const char* +wxDateTime::ParseFormat(const char* date, + const wxString& format, + const wxDateTime& dateDef) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseFormat(dateStr, format, dateDef, &end) ) + return NULL; + + return date + dateStr.IterOffsetInMBStr(end); +} + +const wchar_t* +wxDateTime::ParseFormat(const wchar_t* date, + const wxString& format, + const wxDateTime& dateDef) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseFormat(dateStr, format, dateDef, &end) ) + return NULL; + + return date + (end - dateStr.begin()); +} + +bool +wxDateTime::ParseDateTime(const wxString& date, wxString::const_iterator *end) +{ + wxCHECK_MSG( end, false, "end iterator pointer must be specified" ); + + wxDateTime + dtDate, + dtTime; + + wxString::const_iterator + endTime, + endDate, + endBoth; + + // If we got a date in the beginning, see if there is a time specified + // after the date + if ( dtDate.ParseDate(date, &endDate) ) + { + // Skip spaces, as the ParseTime() function fails on spaces + while ( endDate != date.end() && wxIsspace(*endDate) ) + ++endDate; + + const wxString timestr(endDate, date.end()); + if ( !dtTime.ParseTime(timestr, &endTime) ) + return false; + + endBoth = endDate + (endTime - timestr.begin()); + } + else // no date in the beginning + { + // check if we have a time followed by a date + if ( !dtTime.ParseTime(date, &endTime) ) + return false; + + while ( endTime != date.end() && wxIsspace(*endTime) ) + ++endTime; + + const wxString datestr(endTime, date.end()); + if ( !dtDate.ParseDate(datestr, &endDate) ) + return false; + + endBoth = endTime + (endDate - datestr.begin()); + } + + Set(dtDate.GetDay(), dtDate.GetMonth(), dtDate.GetYear(), + dtTime.GetHour(), dtTime.GetMinute(), dtTime.GetSecond(), + dtTime.GetMillisecond()); + + *end = endBoth; + + return true; +} + +const char* wxDateTime::ParseDateTime(const char* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseDateTime(dateStr, &end) ) + return NULL; + + return date + dateStr.IterOffsetInMBStr(end); +} + +const wchar_t* wxDateTime::ParseDateTime(const wchar_t* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseDateTime(dateStr, &end) ) + return NULL; + + return date + (end - dateStr.begin()); +} + +bool +wxDateTime::ParseDate(const wxString& date, wxString::const_iterator *end) +{ + wxCHECK_MSG( end, false, "end iterator pointer must be specified" ); + + // this is a simplified version of ParseDateTime() which understands only + // "today" (for wxDate compatibility) and digits only otherwise (and not + // all esoteric constructions ParseDateTime() knows about) + + const wxString::const_iterator pBegin = date.begin(); + const wxString::const_iterator pEnd = date.end(); + + wxString::const_iterator p = pBegin; + while ( p != pEnd && wxIsspace(*p) ) + p++; + + // some special cases + static struct + { + const char *str; + int dayDiffFromToday; + } literalDates[] = + { + { wxTRANSLATE("today"), 0 }, + { wxTRANSLATE("yesterday"), -1 }, + { wxTRANSLATE("tomorrow"), 1 }, + }; + + const size_t lenRest = pEnd - p; + for ( size_t n = 0; n < WXSIZEOF(literalDates); n++ ) + { + const wxString dateStr = wxGetTranslation(literalDates[n].str); + size_t len = dateStr.length(); + + if ( len > lenRest ) + continue; + + const wxString::const_iterator pEndStr = p + len; + if ( wxString(p, pEndStr).CmpNoCase(dateStr) == 0 ) + { + // nothing can follow this, so stop here + + p = pEndStr; + + int dayDiffFromToday = literalDates[n].dayDiffFromToday; + *this = Today(); + if ( dayDiffFromToday ) + { + *this += wxDateSpan::Days(dayDiffFromToday); + } + + *end = pEndStr; + + return true; + } + } + + // We try to guess what we have here: for each new (numeric) token, we + // determine if it can be a month, day or a year. Of course, there is an + // ambiguity as some numbers may be days as well as months, so we also + // have the ability to back track. + + // what do we have? + bool haveDay = false, // the months day? + haveWDay = false, // the day of week? + haveMon = false, // the month? + haveYear = false; // the year? + + bool monWasNumeric = false; // was month specified as a number? + + // and the value of the items we have (init them to get rid of warnings) + WeekDay wday = Inv_WeekDay; + wxDateTime_t day = 0; + wxDateTime::Month mon = Inv_Month; + int year = 0; + + // tokenize the string + while ( p != pEnd ) + { + // skip white space and date delimiters + if ( wxStrchr(".,/-\t\r\n ", *p) ) + { + ++p; + continue; + } + + // modify copy of the iterator as we're not sure if the next token is + // still part of the date at all + wxString::const_iterator pCopy = p; + + // we can have either alphabetic or numeric token, start by testing if + // it's the latter + unsigned long val; + if ( GetNumericToken(10 /* max length */, pCopy, pEnd, &val) ) + { + // guess what this number is + + bool isDay = false, + isMonth = false, + isYear = false; + + if ( !haveMon && val > 0 && val <= 12 ) + { + // assume it is month + isMonth = true; + } + else // not the month + { + if ( haveDay ) + { + // this can only be the year + isYear = true; + } + else // may be either day or year + { + // use a leap year if we don't have the year yet to allow + // dates like 2/29/1976 which would be rejected otherwise + wxDateTime_t max_days = (wxDateTime_t)( + haveMon + ? GetNumberOfDays(mon, haveYear ? year : 1976) + : 31 + ); + + // can it be day? + if ( (val == 0) || (val > (unsigned long)max_days) ) + { + // no + isYear = true; + } + else // yes, suppose it's the day + { + isDay = true; + } + } + } + + if ( isYear ) + { + if ( haveYear ) + break; + + haveYear = true; + + year = (wxDateTime_t)val; + } + else if ( isDay ) + { + if ( haveDay ) + break; + + haveDay = true; + + day = (wxDateTime_t)val; + } + else if ( isMonth ) + { + haveMon = true; + monWasNumeric = true; + + mon = (Month)(val - 1); + } + } + else // not a number + { + // be careful not to overwrite the current mon value + Month mon2 = GetMonthFromName + ( + pCopy, pEnd, + Name_Full | Name_Abbr, + DateLang_Local | DateLang_English + ); + if ( mon2 != Inv_Month ) + { + // it's a month + if ( haveMon ) + { + // but we already have a month - maybe we guessed wrong + // when we had interpreted that numeric value as a month + // and it was the day number instead? + if ( haveDay || !monWasNumeric ) + break; + + // assume we did and change our mind: reinterpret the month + // value as a day (notice that there is no need to check + // that it is valid as month values are always < 12, but + // the days are counted from 1 unlike the months) + day = (wxDateTime_t)(mon + 1); + haveDay = true; + } + + mon = mon2; + + haveMon = true; + } + else // not a valid month name + { + WeekDay wday2 = GetWeekDayFromName + ( + pCopy, pEnd, + Name_Full | Name_Abbr, + DateLang_Local | DateLang_English + ); + if ( wday2 != Inv_WeekDay ) + { + // a week day + if ( haveWDay ) + break; + + wday = wday2; + + haveWDay = true; + } + else // not a valid weekday name + { + // try the ordinals + static const char *const ordinals[] = + { + wxTRANSLATE("first"), + wxTRANSLATE("second"), + wxTRANSLATE("third"), + wxTRANSLATE("fourth"), + wxTRANSLATE("fifth"), + wxTRANSLATE("sixth"), + wxTRANSLATE("seventh"), + wxTRANSLATE("eighth"), + wxTRANSLATE("ninth"), + wxTRANSLATE("tenth"), + wxTRANSLATE("eleventh"), + wxTRANSLATE("twelfth"), + wxTRANSLATE("thirteenth"), + wxTRANSLATE("fourteenth"), + wxTRANSLATE("fifteenth"), + wxTRANSLATE("sixteenth"), + wxTRANSLATE("seventeenth"), + wxTRANSLATE("eighteenth"), + wxTRANSLATE("nineteenth"), + wxTRANSLATE("twentieth"), + // that's enough - otherwise we'd have problems with + // composite (or not) ordinals + }; + + size_t n; + for ( n = 0; n < WXSIZEOF(ordinals); n++ ) + { + const wxString ord = wxGetTranslation(ordinals[n]); + const size_t len = ord.length(); + if ( date.compare(p - pBegin, len, ord) == 0 ) + { + p += len; + break; + } + } + + if ( n == WXSIZEOF(ordinals) ) + { + // stop here - something unknown + break; + } + + // it's a day + if ( haveDay ) + { + // don't try anything here (as in case of numeric day + // above) - the symbolic day spec should always + // precede the month/year + break; + } + + haveDay = true; + + day = (wxDateTime_t)(n + 1); + } + } + } + + // advance iterator past a successfully parsed token + p = pCopy; + } + + // either no more tokens or the scan was stopped by something we couldn't + // parse - in any case, see if we can construct a date from what we have + if ( !haveDay && !haveWDay ) + return false; + + if ( haveWDay && (haveMon || haveYear || haveDay) && + !(haveDay && haveMon && haveYear) ) + { + // without adjectives (which we don't support here) the week day only + // makes sense completely separately or with the full date + // specification (what would "Wed 1999" mean?) + return false; + } + + if ( !haveWDay && haveYear && !(haveDay && haveMon) ) + { + // may be we have month and day instead of day and year? + if ( haveDay && !haveMon ) + { + if ( day <= 12 ) + { + // exchange day and month + mon = (wxDateTime::Month)(day - 1); + + // we're in the current year then + if ( (year > 0) && (year <= (int)GetNumberOfDays(mon, Inv_Year)) ) + { + day = (wxDateTime_t)year; + + haveMon = true; + haveYear = false; + } + //else: no, can't exchange, leave haveMon == false + } + } + + if ( !haveMon ) + return false; + } + + if ( !haveMon ) + { + mon = GetCurrentMonth(); + } + + if ( !haveYear ) + { + year = GetCurrentYear(); + } + + if ( haveDay ) + { + // normally we check the day above but the check is optimistic in case + // we find the day before its month/year so we have to redo it now + if ( day > GetNumberOfDays(mon, year) ) + return false; + + Set(day, mon, year); + + if ( haveWDay ) + { + // check that it is really the same + if ( GetWeekDay() != wday ) + return false; + } + } + else // haveWDay + { + *this = Today(); + + SetToWeekDayInSameWeek(wday); + } + + *end = p; + + return true; +} + +const char* wxDateTime::ParseDate(const char* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseDate(dateStr, &end) ) + return NULL; + + return date + dateStr.IterOffsetInMBStr(end); +} + +const wchar_t* wxDateTime::ParseDate(const wchar_t* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseDate(dateStr, &end) ) + return NULL; + + return date + (end - dateStr.begin()); +} + +bool +wxDateTime::ParseTime(const wxString& time, wxString::const_iterator *end) +{ + wxCHECK_MSG( end, false, "end iterator pointer must be specified" ); + + // first try some extra things + static const struct + { + const char *name; + wxDateTime_t hour; + } stdTimes[] = + { + { wxTRANSLATE("noon"), 12 }, + { wxTRANSLATE("midnight"), 00 }, + // anything else? + }; + + for ( size_t n = 0; n < WXSIZEOF(stdTimes); n++ ) + { + const wxString timeString = wxGetTranslation(stdTimes[n].name); + if ( timeString.CmpNoCase(wxString(time, timeString.length())) == 0 ) + { + // casts required by DigitalMars + Set(stdTimes[n].hour, wxDateTime_t(0), wxDateTime_t(0)); + + if ( end ) + *end = time.begin() + timeString.length(); + + return true; + } + } + + // try all time formats we may think about in the order from longest to + // shortest + static const char *const timeFormats[] = + { + "%I:%M:%S %p", // 12hour with AM/PM + "%H:%M:%S", // could be the same or 24 hour one so try it too + "%I:%M %p", // 12hour with AM/PM but without seconds + "%H:%M", // and a possibly 24 hour version without seconds + "%I %p", // just hour with AM/AM + "%H", // just hour in 24 hour version + "%X", // possibly something from above or maybe something + // completely different -- try it last + + // TODO: parse timezones + }; + + for ( size_t nFmt = 0; nFmt < WXSIZEOF(timeFormats); nFmt++ ) + { + if ( ParseFormat(time, timeFormats[nFmt], end) ) + return true; + } + + return false; +} + +const char* wxDateTime::ParseTime(const char* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseTime(dateStr, &end) ) + return NULL; + + return date + dateStr.IterOffsetInMBStr(end); +} + +const wchar_t* wxDateTime::ParseTime(const wchar_t* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseTime(dateStr, &end) ) + return NULL; + + return date + (end - dateStr.begin()); +} + +// ---------------------------------------------------------------------------- +// Workdays and holidays support +// ---------------------------------------------------------------------------- + +bool wxDateTime::IsWorkDay(Country WXUNUSED(country)) const +{ + return !wxDateTimeHolidayAuthority::IsHoliday(*this); +} + +// ============================================================================ +// wxDateSpan +// ============================================================================ + +wxDateSpan WXDLLIMPEXP_BASE operator*(int n, const wxDateSpan& ds) +{ + wxDateSpan ds1(ds); + return ds1.Multiply(n); +} + +// ============================================================================ +// wxTimeSpan +// ============================================================================ + +wxTimeSpan WXDLLIMPEXP_BASE operator*(int n, const wxTimeSpan& ts) +{ + return wxTimeSpan(ts).Multiply(n); +} + +// this enum is only used in wxTimeSpan::Format() below but we can't declare +// it locally to the method as it provokes an internal compiler error in egcs +// 2.91.60 when building with -O2 +enum TimeSpanPart +{ + Part_Week, + Part_Day, + Part_Hour, + Part_Min, + Part_Sec, + Part_MSec +}; + +// not all strftime(3) format specifiers make sense here because, for example, +// a time span doesn't have a year nor a timezone +// +// Here are the ones which are supported (all of them are supported by strftime +// as well): +// %H hour in 24 hour format +// %M minute (00 - 59) +// %S second (00 - 59) +// %% percent sign +// +// Also, for MFC CTimeSpan compatibility, we support +// %D number of days +// +// And, to be better than MFC :-), we also have +// %E number of wEeks +// %l milliseconds (000 - 999) +wxString wxTimeSpan::Format(const wxString& format) const +{ + // we deal with only positive time spans here and just add the sign in + // front for the negative ones + if ( IsNegative() ) + { + wxString str(Negate().Format(format)); + return "-" + str; + } + + wxCHECK_MSG( !format.empty(), wxEmptyString, + wxT("NULL format in wxTimeSpan::Format") ); + + wxString str; + str.Alloc(format.length()); + + // Suppose we have wxTimeSpan ts(1 /* hour */, 2 /* min */, 3 /* sec */) + // + // Then, of course, ts.Format("%H:%M:%S") must return "01:02:03", but the + // question is what should ts.Format("%S") do? The code here returns "3273" + // in this case (i.e. the total number of seconds, not just seconds % 60) + // because, for me, this call means "give me entire time interval in + // seconds" and not "give me the seconds part of the time interval" + // + // If we agree that it should behave like this, it is clear that the + // interpretation of each format specifier depends on the presence of the + // other format specs in the string: if there was "%H" before "%M", we + // should use GetMinutes() % 60, otherwise just GetMinutes() &c + + // we remember the most important unit found so far + TimeSpanPart partBiggest = Part_MSec; + + for ( wxString::const_iterator pch = format.begin(); pch != format.end(); ++pch ) + { + wxChar ch = *pch; + + if ( ch == wxT('%') ) + { + // the start of the format specification of the printf() below + wxString fmtPrefix(wxT('%')); + + // the number + long n; + + // the number of digits for the format string, 0 if unused + unsigned digits = 0; + + ch = *++pch; // get the format spec char + switch ( ch ) + { + default: + wxFAIL_MSG( wxT("invalid format character") ); + // fall through + + case wxT('%'): + str += ch; + + // skip the part below switch + continue; + + case wxT('D'): + n = GetDays(); + if ( partBiggest < Part_Day ) + { + n %= DAYS_PER_WEEK; + } + else + { + partBiggest = Part_Day; + } + break; + + case wxT('E'): + partBiggest = Part_Week; + n = GetWeeks(); + break; + + case wxT('H'): + n = GetHours(); + if ( partBiggest < Part_Hour ) + { + n %= HOURS_PER_DAY; + } + else + { + partBiggest = Part_Hour; + } + + digits = 2; + break; + + case wxT('l'): + n = GetMilliseconds().ToLong(); + if ( partBiggest < Part_MSec ) + { + n %= 1000; + } + //else: no need to reset partBiggest to Part_MSec, it is + // the least significant one anyhow + + digits = 3; + break; + + case wxT('M'): + n = GetMinutes(); + if ( partBiggest < Part_Min ) + { + n %= MIN_PER_HOUR; + } + else + { + partBiggest = Part_Min; + } + + digits = 2; + break; + + case wxT('S'): + n = GetSeconds().ToLong(); + if ( partBiggest < Part_Sec ) + { + n %= SEC_PER_MIN; + } + else + { + partBiggest = Part_Sec; + } + + digits = 2; + break; + } + + if ( digits ) + { + fmtPrefix << wxT("0") << digits; + } + + str += wxString::Format(fmtPrefix + wxT("ld"), n); + } + else + { + // normal character, just copy + str += ch; + } + } + + return str; +} + +#endif // wxUSE_DATETIME diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/datstrm.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/datstrm.cpp new file mode 100644 index 0000000000..904e692e51 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/datstrm.cpp @@ -0,0 +1,851 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/datstrm.cpp +// Purpose: Data stream classes +// Author: Guilhem Lavaux +// Modified by: Mickael Gilabert +// Created: 28/06/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS + +#include "wx/datstrm.h" + +#ifndef WX_PRECOMP + #include "wx/math.h" +#endif //WX_PRECOMP + +namespace +{ + +// helper unions used to swap bytes of floats and doubles +union Float32Data +{ + wxFloat32 f; + wxUint32 i; +}; + +union Float64Data +{ + wxFloat64 f; + wxUint32 i[2]; +}; + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// wxDataStreamBase +// ---------------------------------------------------------------------------- + +wxDataStreamBase::wxDataStreamBase(const wxMBConv& conv) +#if wxUSE_UNICODE + : m_conv(conv.Clone()) +#endif // wxUSE_UNICODE +{ + // It is unused in non-Unicode build, so suppress a warning there. + wxUnusedVar(conv); + + m_be_order = false; + + // For compatibility with the existing data files, we use extended + // precision if it is available, i.e. if wxUSE_APPLE_IEEE is on. +#if wxUSE_APPLE_IEEE + m_useExtendedPrecision = true; +#endif // wxUSE_APPLE_IEEE +} + +#if wxUSE_UNICODE +void wxDataStreamBase::SetConv( const wxMBConv &conv ) +{ + delete m_conv; + m_conv = conv.Clone(); +} +#endif + +wxDataStreamBase::~wxDataStreamBase() +{ +#if wxUSE_UNICODE + delete m_conv; +#endif // wxUSE_UNICODE +} + +// --------------------------------------------------------------------------- +// wxDataInputStream +// --------------------------------------------------------------------------- + +wxDataInputStream::wxDataInputStream(wxInputStream& s, const wxMBConv& conv) + : wxDataStreamBase(conv), + m_input(&s) +{ +} + +#if wxHAS_INT64 +wxUint64 wxDataInputStream::Read64() +{ + wxUint64 tmp; + Read64(&tmp, 1); + return tmp; +} +#endif // wxHAS_INT64 + +wxUint32 wxDataInputStream::Read32() +{ + wxUint32 i32; + + m_input->Read(&i32, 4); + + if (m_be_order) + return wxUINT32_SWAP_ON_LE(i32); + else + return wxUINT32_SWAP_ON_BE(i32); +} + +wxUint16 wxDataInputStream::Read16() +{ + wxUint16 i16; + + m_input->Read(&i16, 2); + + if (m_be_order) + return wxUINT16_SWAP_ON_LE(i16); + else + return wxUINT16_SWAP_ON_BE(i16); +} + +wxUint8 wxDataInputStream::Read8() +{ + wxUint8 buf; + + m_input->Read(&buf, 1); + return (wxUint8)buf; +} + +double wxDataInputStream::ReadDouble() +{ +#if wxUSE_APPLE_IEEE + if ( m_useExtendedPrecision ) + { + char buf[10]; + + m_input->Read(buf, 10); + return wxConvertFromIeeeExtended((const wxInt8 *)buf); + } + else +#endif // wxUSE_APPLE_IEEE + { + Float64Data floatData; + + if ( m_be_order == (wxBYTE_ORDER == wxBIG_ENDIAN) ) + { + floatData.i[0] = Read32(); + floatData.i[1] = Read32(); + } + else + { + floatData.i[1] = Read32(); + floatData.i[0] = Read32(); + } + + return static_cast(floatData.f); + } +} + +float wxDataInputStream::ReadFloat() +{ +#if wxUSE_APPLE_IEEE + if ( m_useExtendedPrecision ) + { + return (float)ReadDouble(); + } + else +#endif // wxUSE_APPLE_IEEE + { + Float32Data floatData; + + floatData.i = Read32(); + return static_cast(floatData.f); + } +} + +wxString wxDataInputStream::ReadString() +{ + wxString ret; + + const size_t len = Read32(); + if ( len > 0 ) + { +#if wxUSE_UNICODE + wxCharBuffer tmp(len); + if ( tmp ) + { + m_input->Read(tmp.data(), len); + ret = m_conv->cMB2WX(tmp.data()); + } +#else + wxStringBuffer buf(ret, len); + if ( buf ) + m_input->Read(buf, len); +#endif + } + + return ret; +} + +#if wxUSE_LONGLONG + +template +static +void DoReadLL(T *buffer, size_t size, wxInputStream *input, bool be_order) +{ + typedef T DataType; + unsigned char *pchBuffer = new unsigned char[size * 8]; + // TODO: Check for overflow when size is of type uint and is > than 512m + input->Read(pchBuffer, size * 8); + size_t idx_base = 0; + if ( be_order ) + { + for ( size_t uiIndex = 0; uiIndex != size; ++uiIndex ) + { + buffer[uiIndex] = 0l; + for ( unsigned ui = 0; ui != 8; ++ui ) + { + buffer[uiIndex] = buffer[uiIndex] * 256l + + DataType((unsigned long) pchBuffer[idx_base + ui]); + } + + idx_base += 8; + } + } + else // little endian + { + for ( size_t uiIndex=0; uiIndex!=size; ++uiIndex ) + { + buffer[uiIndex] = 0l; + for ( unsigned ui=0; ui!=8; ++ui ) + buffer[uiIndex] = buffer[uiIndex] * 256l + + DataType((unsigned long) pchBuffer[idx_base + 7 - ui]); + idx_base += 8; + } + } + delete[] pchBuffer; +} + +template +static void DoWriteLL(const T *buffer, size_t size, wxOutputStream *output, bool be_order) +{ + typedef T DataType; + unsigned char *pchBuffer = new unsigned char[size * 8]; + size_t idx_base = 0; + if ( be_order ) + { + for ( size_t uiIndex = 0; uiIndex != size; ++uiIndex ) + { + DataType i64 = buffer[uiIndex]; + for ( unsigned ui = 0; ui != 8; ++ui ) + { + pchBuffer[idx_base + 7 - ui] = + (unsigned char) (i64.GetLo() & 255l); + i64 >>= 8l; + } + + idx_base += 8; + } + } + else // little endian + { + for ( size_t uiIndex=0; uiIndex != size; ++uiIndex ) + { + DataType i64 = buffer[uiIndex]; + for (unsigned ui=0; ui!=8; ++ui) + { + pchBuffer[idx_base + ui] = + (unsigned char) (i64.GetLo() & 255l); + i64 >>= 8l; + } + + idx_base += 8; + } + } + + // TODO: Check for overflow when size is of type uint and is > than 512m + output->Write(pchBuffer, size * 8); + delete[] pchBuffer; +} + +#endif // wxUSE_LONGLONG + +#ifdef wxLongLong_t + +template +static +void DoReadI64(T *buffer, size_t size, wxInputStream *input, bool be_order) +{ + typedef T DataType; + unsigned char *pchBuffer = (unsigned char*) buffer; + // TODO: Check for overflow when size is of type uint and is > than 512m + input->Read(pchBuffer, size * 8); + if ( be_order ) + { + for ( wxUint32 i = 0; i < size; i++ ) + { + DataType v = wxUINT64_SWAP_ON_LE(*buffer); + *(buffer++) = v; + } + } + else // little endian + { + for ( wxUint32 i=0; i +static +void DoWriteI64(const T *buffer, size_t size, wxOutputStream *output, bool be_order) +{ + typedef T DataType; + if ( be_order ) + { + for ( size_t i = 0; i < size; i++ ) + { + DataType i64 = wxUINT64_SWAP_ON_LE(*buffer); + buffer++; + output->Write(&i64, 8); + } + } + else // little endian + { + for ( size_t i=0; i < size; i++ ) + { + DataType i64 = wxUINT64_SWAP_ON_BE(*buffer); + buffer++; + output->Write(&i64, 8); + } + } +} + +#endif // wxLongLong_t + + +#if wxHAS_INT64 +void wxDataInputStream::Read64(wxUint64 *buffer, size_t size) +{ +#ifndef wxLongLong_t + DoReadLL(buffer, size, m_input, m_be_order); +#else + DoReadI64(buffer, size, m_input, m_be_order); +#endif +} + +void wxDataInputStream::Read64(wxInt64 *buffer, size_t size) +{ +#ifndef wxLongLong_t + DoReadLL(buffer, size, m_input, m_be_order); +#else + DoReadI64(buffer, size, m_input, m_be_order); +#endif +} +#endif // wxHAS_INT64 + +#if defined(wxLongLong_t) && wxUSE_LONGLONG +void wxDataInputStream::Read64(wxULongLong *buffer, size_t size) +{ + DoReadLL(buffer, size, m_input, m_be_order); +} + +void wxDataInputStream::Read64(wxLongLong *buffer, size_t size) +{ + DoReadLL(buffer, size, m_input, m_be_order); +} +#endif // wxLongLong_t + +#if wxUSE_LONGLONG +void wxDataInputStream::ReadLL(wxULongLong *buffer, size_t size) +{ + DoReadLL(buffer, size, m_input, m_be_order); +} + +void wxDataInputStream::ReadLL(wxLongLong *buffer, size_t size) +{ + DoReadLL(buffer, size, m_input, m_be_order); +} + +wxLongLong wxDataInputStream::ReadLL(void) +{ + wxLongLong ll; + DoReadLL(&ll, (size_t)1, m_input, m_be_order); + return ll; +} +#endif // wxUSE_LONGLONG + +void wxDataInputStream::Read32(wxUint32 *buffer, size_t size) +{ + m_input->Read(buffer, size * 4); + + if (m_be_order) + { + for (wxUint32 i=0; iRead(buffer, size * 2); + + if (m_be_order) + { + for (wxUint32 i=0; iRead(buffer, size); +} + +void wxDataInputStream::ReadDouble(double *buffer, size_t size) +{ + for (wxUint32 i=0; i>(wxString& s) +{ + s = ReadString(); + return *this; +} + +wxDataInputStream& wxDataInputStream::operator>>(wxInt8& c) +{ + c = (wxInt8)Read8(); + return *this; +} + +wxDataInputStream& wxDataInputStream::operator>>(wxInt16& i) +{ + i = (wxInt16)Read16(); + return *this; +} + +wxDataInputStream& wxDataInputStream::operator>>(wxInt32& i) +{ + i = (wxInt32)Read32(); + return *this; +} + +wxDataInputStream& wxDataInputStream::operator>>(wxUint8& c) +{ + c = Read8(); + return *this; +} + +wxDataInputStream& wxDataInputStream::operator>>(wxUint16& i) +{ + i = Read16(); + return *this; +} + +wxDataInputStream& wxDataInputStream::operator>>(wxUint32& i) +{ + i = Read32(); + return *this; +} + +#if wxHAS_INT64 +wxDataInputStream& wxDataInputStream::operator>>(wxUint64& i) +{ + i = Read64(); + return *this; +} + +wxDataInputStream& wxDataInputStream::operator>>(wxInt64& i) +{ + i = Read64(); + return *this; +} +#endif // wxHAS_INT64 + +#if defined(wxLongLong_t) && wxUSE_LONGLONG +wxDataInputStream& wxDataInputStream::operator>>(wxULongLong& i) +{ + i = ReadLL(); + return *this; +} + +wxDataInputStream& wxDataInputStream::operator>>(wxLongLong& i) +{ + i = ReadLL(); + return *this; +} +#endif // wxLongLong_t + +wxDataInputStream& wxDataInputStream::operator>>(double& d) +{ + d = ReadDouble(); + return *this; +} + +wxDataInputStream& wxDataInputStream::operator>>(float& f) +{ + f = ReadFloat(); + return *this; +} + +// --------------------------------------------------------------------------- +// wxDataOutputStream +// --------------------------------------------------------------------------- + +wxDataOutputStream::wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv) + : wxDataStreamBase(conv), + m_output(&s) +{ +} + +#if wxHAS_INT64 +void wxDataOutputStream::Write64(wxUint64 i) +{ + Write64(&i, 1); +} + +void wxDataOutputStream::Write64(wxInt64 i) +{ + Write64(&i, 1); +} +#endif // wxHAS_INT64 + +void wxDataOutputStream::Write32(wxUint32 i) +{ + wxUint32 i32; + + if (m_be_order) + i32 = wxUINT32_SWAP_ON_LE(i); + else + i32 = wxUINT32_SWAP_ON_BE(i); + m_output->Write(&i32, 4); +} + +void wxDataOutputStream::Write16(wxUint16 i) +{ + wxUint16 i16; + + if (m_be_order) + i16 = wxUINT16_SWAP_ON_LE(i); + else + i16 = wxUINT16_SWAP_ON_BE(i); + + m_output->Write(&i16, 2); +} + +void wxDataOutputStream::Write8(wxUint8 i) +{ + m_output->Write(&i, 1); +} + +void wxDataOutputStream::WriteString(const wxString& string) +{ +#if wxUSE_UNICODE + const wxWX2MBbuf buf = string.mb_str(*m_conv); +#else + const wxWX2MBbuf buf = string.mb_str(); +#endif + size_t len = strlen(buf); + Write32(len); + if (len > 0) + m_output->Write(buf, len); +} + +void wxDataOutputStream::WriteDouble(double d) +{ +#if wxUSE_APPLE_IEEE + if ( m_useExtendedPrecision ) + { + char buf[10]; + + wxConvertToIeeeExtended(d, (wxInt8 *)buf); + m_output->Write(buf, 10); + } + else +#endif // wxUSE_APPLE_IEEE + { + Float64Data floatData; + + floatData.f = (wxFloat64)d; + + if ( m_be_order == (wxBYTE_ORDER == wxBIG_ENDIAN) ) + { + Write32(floatData.i[0]); + Write32(floatData.i[1]); + } + else + { + Write32(floatData.i[1]); + Write32(floatData.i[0]); + } + } +} + +void wxDataOutputStream::WriteFloat(float f) +{ +#if wxUSE_APPLE_IEEE + if ( m_useExtendedPrecision ) + { + WriteDouble((double)f); + } + else +#endif // wxUSE_APPLE_IEEE + { + Float32Data floatData; + + floatData.f = (wxFloat32)f; + Write32(floatData.i); + } +} + +#if wxHAS_INT64 +void wxDataOutputStream::Write64(const wxUint64 *buffer, size_t size) +{ +#ifndef wxLongLong_t + DoWriteLL(buffer, size, m_output, m_be_order); +#else + DoWriteI64(buffer, size, m_output, m_be_order); +#endif +} + +void wxDataOutputStream::Write64(const wxInt64 *buffer, size_t size) +{ +#ifndef wxLongLong_t + DoWriteLL(buffer, size, m_output, m_be_order); +#else + DoWriteI64(buffer, size, m_output, m_be_order); +#endif +} +#endif // wxHAS_INT64 + +#if defined(wxLongLong_t) && wxUSE_LONGLONG +void wxDataOutputStream::Write64(const wxULongLong *buffer, size_t size) +{ + DoWriteLL(buffer, size, m_output, m_be_order); +} + +void wxDataOutputStream::Write64(const wxLongLong *buffer, size_t size) +{ + DoWriteLL(buffer, size, m_output, m_be_order); +} +#endif // wxLongLong_t + +#if wxUSE_LONGLONG +void wxDataOutputStream::WriteLL(const wxULongLong *buffer, size_t size) +{ + DoWriteLL(buffer, size, m_output, m_be_order); +} + +void wxDataOutputStream::WriteLL(const wxLongLong *buffer, size_t size) +{ + DoWriteLL(buffer, size, m_output, m_be_order); +} + +void wxDataOutputStream::WriteLL(const wxLongLong &ll) +{ + WriteLL(&ll, 1); +} + +void wxDataOutputStream::WriteLL(const wxULongLong &ll) +{ + WriteLL(&ll, 1); +} +#endif // wxUSE_LONGLONG + +void wxDataOutputStream::Write32(const wxUint32 *buffer, size_t size) +{ + if (m_be_order) + { + for (wxUint32 i=0; iWrite(&i32, 4); + } + } + else + { + for (wxUint32 i=0; iWrite(&i32, 4); + } + } +} + +void wxDataOutputStream::Write16(const wxUint16 *buffer, size_t size) +{ + if (m_be_order) + { + for (wxUint32 i=0; iWrite(&i16, 2); + } + } + else + { + for (wxUint32 i=0; iWrite(&i16, 2); + } + } +} + +void wxDataOutputStream::Write8(const wxUint8 *buffer, size_t size) +{ + m_output->Write(buffer, size); +} + +void wxDataOutputStream::WriteDouble(const double *buffer, size_t size) +{ + for (wxUint32 i=0; iInheritAttributes(window); + return impl; +} + +wxDCImpl* wxNativeDCFactory::CreateClientDC( wxClientDC *owner, wxWindow *window ) +{ + wxDCImpl * const impl = new wxClientDCImpl( owner, window ); + impl->InheritAttributes(window); + return impl; +} + +wxDCImpl* wxNativeDCFactory::CreatePaintDC( wxPaintDC *owner, wxWindow *window ) +{ + wxDCImpl * const impl = new wxPaintDCImpl( owner, window ); + impl->InheritAttributes(window); + return impl; +} + +wxDCImpl* wxNativeDCFactory::CreateMemoryDC( wxMemoryDC *owner ) +{ + return new wxMemoryDCImpl( owner ); +} + +wxDCImpl* wxNativeDCFactory::CreateMemoryDC(wxMemoryDC *owner, wxBitmap& bitmap) +{ + // the bitmap may be modified when it's selected into a memory DC so make + // sure changing this bitmap doesn't affect any other shallow copies of it + // (see wxMemoryDC::SelectObject()) + // + // notice that we don't provide any ctor equivalent to SelectObjectAsSource + // method because this should be rarely needed and easy to work around by + // using the default ctor and calling SelectObjectAsSource itself + if ( bitmap.IsOk() ) + bitmap.UnShare(); + + return new wxMemoryDCImpl(owner, bitmap); +} + +wxDCImpl* wxNativeDCFactory::CreateMemoryDC( wxMemoryDC *owner, wxDC *dc ) +{ + return new wxMemoryDCImpl( owner, dc ); +} + +wxDCImpl* wxNativeDCFactory::CreateScreenDC( wxScreenDC *owner ) +{ + return new wxScreenDCImpl( owner ); +} + +#if wxUSE_PRINTING_ARCHITECTURE +wxDCImpl *wxNativeDCFactory::CreatePrinterDC( wxPrinterDC *owner, const wxPrintData &data ) +{ + wxPrintFactory *factory = wxPrintFactory::GetFactory(); + return factory->CreatePrinterDCImpl( owner, data ); +} +#endif + +//----------------------------------------------------------------------------- +// wxWindowDC +//----------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxWindowDC, wxDC) + +wxWindowDC::wxWindowDC(wxWindow *win) + : wxDC(wxDCFactory::Get()->CreateWindowDC(this, win)) +{ +} + +//----------------------------------------------------------------------------- +// wxClientDC +//----------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxClientDC, wxWindowDC) + +wxClientDC::wxClientDC(wxWindow *win) + : wxWindowDC(wxDCFactory::Get()->CreateClientDC(this, win)) +{ +} + +//----------------------------------------------------------------------------- +// wxMemoryDC +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) + +wxMemoryDC::wxMemoryDC() + : wxDC(wxDCFactory::Get()->CreateMemoryDC(this)) +{ +} + +wxMemoryDC::wxMemoryDC(wxBitmap& bitmap) + : wxDC(wxDCFactory::Get()->CreateMemoryDC(this, bitmap)) +{ +} + +wxMemoryDC::wxMemoryDC(wxDC *dc) + : wxDC(wxDCFactory::Get()->CreateMemoryDC(this, dc)) +{ +} + +void wxMemoryDC::SelectObject(wxBitmap& bmp) +{ + if ( bmp.IsSameAs(GetSelectedBitmap()) ) + { + // Nothing to do, this bitmap is already selected. + return; + } + + // make sure that the given wxBitmap is not sharing its data with other + // wxBitmap instances as its contents will be modified by any drawing + // operation done on this DC + if (bmp.IsOk()) + bmp.UnShare(); + + GetImpl()->DoSelect(bmp); +} + +void wxMemoryDC::SelectObjectAsSource(const wxBitmap& bmp) +{ + GetImpl()->DoSelect(bmp); +} + +const wxBitmap& wxMemoryDC::GetSelectedBitmap() const +{ + return GetImpl()->GetSelectedBitmap(); +} + +wxBitmap& wxMemoryDC::GetSelectedBitmap() +{ + return GetImpl()->GetSelectedBitmap(); +} + + +//----------------------------------------------------------------------------- +// wxPaintDC +//----------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxPaintDC, wxClientDC) + +wxPaintDC::wxPaintDC(wxWindow *win) + : wxClientDC(wxDCFactory::Get()->CreatePaintDC(this, win)) +{ +} + +//----------------------------------------------------------------------------- +// wxScreenDC +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) + +wxScreenDC::wxScreenDC() + : wxDC(wxDCFactory::Get()->CreateScreenDC(this)) +{ +} + +//----------------------------------------------------------------------------- +// wxPrinterDC +//----------------------------------------------------------------------------- + +#if wxUSE_PRINTING_ARCHITECTURE + +IMPLEMENT_DYNAMIC_CLASS(wxPrinterDC, wxDC) + +wxPrinterDC::wxPrinterDC() + : wxDC(wxDCFactory::Get()->CreatePrinterDC(this, wxPrintData())) +{ +} + +wxPrinterDC::wxPrinterDC(const wxPrintData& data) + : wxDC(wxDCFactory::Get()->CreatePrinterDC(this, data)) +{ +} + +wxRect wxPrinterDC::GetPaperRect() const +{ + return GetImpl()->GetPaperRect(); +} + +int wxPrinterDC::GetResolution() const +{ + return GetImpl()->GetResolution(); +} + +#endif // wxUSE_PRINTING_ARCHITECTURE + +//----------------------------------------------------------------------------- +// wxDCImpl +//----------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxDCImpl, wxObject) + +wxDCImpl::wxDCImpl( wxDC *owner ) + : m_window(NULL) + , m_colour(wxColourDisplay()) + , m_ok(true) + , m_clipping(false) + , m_isInteractive(0) + , m_isBBoxValid(false) + , m_logicalOriginX(0), m_logicalOriginY(0) + , m_deviceOriginX(0), m_deviceOriginY(0) + , m_deviceLocalOriginX(0), m_deviceLocalOriginY(0) + , m_logicalScaleX(1.0), m_logicalScaleY(1.0) + , m_userScaleX(1.0), m_userScaleY(1.0) + , m_scaleX(1.0), m_scaleY(1.0) + , m_signX(1), m_signY(1) + , m_contentScaleFactor(1) + , m_minX(0), m_minY(0), m_maxX(0), m_maxY(0) + , m_clipX1(0), m_clipY1(0), m_clipX2(0), m_clipY2(0) + , m_logicalFunction(wxCOPY) + , m_backgroundMode(wxBRUSHSTYLE_TRANSPARENT) + , m_mappingMode(wxMM_TEXT) + , m_pen() + , m_brush() + , m_backgroundBrush() + , m_textForegroundColour(*wxBLACK) + , m_textBackgroundColour(*wxWHITE) + , m_font() +#if wxUSE_PALETTE + , m_palette() + , m_hasCustomPalette(false) +#endif // wxUSE_PALETTE +{ + m_owner = owner; + + m_mm_to_pix_x = (double)wxGetDisplaySize().GetWidth() / + (double)wxGetDisplaySizeMM().GetWidth(); + m_mm_to_pix_y = (double)wxGetDisplaySize().GetHeight() / + (double)wxGetDisplaySizeMM().GetHeight(); + + ResetBoundingBox(); + ResetClipping(); +} + +wxDCImpl::~wxDCImpl() +{ +} + +// ---------------------------------------------------------------------------- +// clipping +// ---------------------------------------------------------------------------- + +void wxDCImpl::DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h) +{ + if ( m_clipping ) + { + m_clipX1 = wxMax( m_clipX1, x ); + m_clipY1 = wxMax( m_clipY1, y ); + m_clipX2 = wxMin( m_clipX2, (x + w) ); + m_clipY2 = wxMin( m_clipY2, (y + h) ); + } + else + { + m_clipping = true; + + m_clipX1 = x; + m_clipY1 = y; + m_clipX2 = x + w; + m_clipY2 = y + h; + } +} + +// ---------------------------------------------------------------------------- +// coordinate conversions and transforms +// ---------------------------------------------------------------------------- + +wxCoord wxDCImpl::DeviceToLogicalX(wxCoord x) const +{ + return wxRound( (double)((x - m_deviceOriginX - m_deviceLocalOriginX) * m_signX) / m_scaleX ) + m_logicalOriginX ; +} + +wxCoord wxDCImpl::DeviceToLogicalY(wxCoord y) const +{ + return wxRound( (double)((y - m_deviceOriginY - m_deviceLocalOriginY) * m_signY) / m_scaleY ) + m_logicalOriginY ; +} + +wxCoord wxDCImpl::DeviceToLogicalXRel(wxCoord x) const +{ + return wxRound((double)(x) / m_scaleX); +} + +wxCoord wxDCImpl::DeviceToLogicalYRel(wxCoord y) const +{ + return wxRound((double)(y) / m_scaleY); +} + +wxCoord wxDCImpl::LogicalToDeviceX(wxCoord x) const +{ + return wxRound( (double)((x - m_logicalOriginX) * m_signX) * m_scaleX) + m_deviceOriginX + m_deviceLocalOriginX; +} + +wxCoord wxDCImpl::LogicalToDeviceY(wxCoord y) const +{ + return wxRound( (double)((y - m_logicalOriginY) * m_signY) * m_scaleY) + m_deviceOriginY + m_deviceLocalOriginY; +} + +wxCoord wxDCImpl::LogicalToDeviceXRel(wxCoord x) const +{ + return wxRound((double)(x) * m_scaleX); +} + +wxCoord wxDCImpl::LogicalToDeviceYRel(wxCoord y) const +{ + return wxRound((double)(y) * m_scaleY); +} + +void wxDCImpl::ComputeScaleAndOrigin() +{ + m_scaleX = m_logicalScaleX * m_userScaleX; + m_scaleY = m_logicalScaleY * m_userScaleY; +} + +void wxDCImpl::SetMapMode( wxMappingMode mode ) +{ + switch (mode) + { + case wxMM_TWIPS: + SetLogicalScale( twips2mm*m_mm_to_pix_x, twips2mm*m_mm_to_pix_y ); + break; + case wxMM_POINTS: + SetLogicalScale( pt2mm*m_mm_to_pix_x, pt2mm*m_mm_to_pix_y ); + break; + case wxMM_METRIC: + SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y ); + break; + case wxMM_LOMETRIC: + SetLogicalScale( m_mm_to_pix_x/10.0, m_mm_to_pix_y/10.0 ); + break; + default: + case wxMM_TEXT: + SetLogicalScale( 1.0, 1.0 ); + break; + } + m_mappingMode = mode; +} + +void wxDCImpl::SetUserScale( double x, double y ) +{ + // allow negative ? -> no + m_userScaleX = x; + m_userScaleY = y; + ComputeScaleAndOrigin(); +} + +void wxDCImpl::SetLogicalScale( double x, double y ) +{ + // allow negative ? + m_logicalScaleX = x; + m_logicalScaleY = y; + ComputeScaleAndOrigin(); +} + +void wxDCImpl::SetLogicalOrigin( wxCoord x, wxCoord y ) +{ + m_logicalOriginX = x * m_signX; + m_logicalOriginY = y * m_signY; + ComputeScaleAndOrigin(); +} + +void wxDCImpl::SetDeviceOrigin( wxCoord x, wxCoord y ) +{ + m_deviceOriginX = x; + m_deviceOriginY = y; + ComputeScaleAndOrigin(); +} + +void wxDCImpl::SetDeviceLocalOrigin( wxCoord x, wxCoord y ) +{ + m_deviceLocalOriginX = x; + m_deviceLocalOriginY = y; + ComputeScaleAndOrigin(); +} + +void wxDCImpl::SetAxisOrientation( bool xLeftRight, bool yBottomUp ) +{ + // only wxPostScripDC has m_signX = -1, we override SetAxisOrientation there + // wxWidgets 2.9: no longer override it + m_signX = (xLeftRight ? 1 : -1); + m_signY = (yBottomUp ? -1 : 1); + ComputeScaleAndOrigin(); +} + +bool wxDCImpl::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const +{ + wxTextMeasure tm(GetOwner(), &m_font); + return tm.GetPartialTextExtents(text, widths, m_scaleX); +} + +void wxDCImpl::GetMultiLineTextExtent(const wxString& text, + wxCoord *x, + wxCoord *y, + wxCoord *h, + const wxFont *font) const +{ + wxTextMeasure tm(GetOwner(), font && font->IsOk() ? font : &m_font); + tm.GetMultiLineTextExtent(text, x, y, h); +} + +void wxDCImpl::DoDrawCheckMark(wxCoord x1, wxCoord y1, + wxCoord width, wxCoord height) +{ + wxCHECK_RET( IsOk(), wxT("invalid window dc") ); + + wxCoord x2 = x1 + width, + y2 = y1 + height; + + // the pen width is calibrated to give 3 for width == height == 10 + wxDCPenChanger pen( *m_owner, wxPen(GetTextForeground(), (width + height + 1)/7)); + + // we're drawing a scaled version of wx/generic/tick.xpm here + wxCoord x3 = x1 + (4*width) / 10, // x of the tick bottom + y3 = y1 + height / 2; // y of the left tick branch + DoDrawLine(x1, y3, x3, y2); + DoDrawLine(x3, y2, x2, y1); + + CalcBoundingBox(x1, y1); + CalcBoundingBox(x2, y2); +} + +bool +wxDCImpl::DoStretchBlit(wxCoord xdest, wxCoord ydest, + wxCoord dstWidth, wxCoord dstHeight, + wxDC *source, + wxCoord xsrc, wxCoord ysrc, + wxCoord srcWidth, wxCoord srcHeight, + wxRasterOperationMode rop, + bool useMask, + wxCoord xsrcMask, + wxCoord ysrcMask) +{ + wxCHECK_MSG( srcWidth && srcHeight && dstWidth && dstHeight, false, + wxT("invalid blit size") ); + + // emulate the stretching by modifying the DC scale + double xscale = (double)srcWidth/dstWidth, + yscale = (double)srcHeight/dstHeight; + + double xscaleOld, yscaleOld; + GetUserScale(&xscaleOld, &yscaleOld); + SetUserScale(xscaleOld/xscale, yscaleOld/yscale); + + bool rc = DoBlit(wxCoord(xdest*xscale), wxCoord(ydest*yscale), + wxCoord(dstWidth*xscale), wxCoord(dstHeight*yscale), + source, + xsrc, ysrc, rop, useMask, xsrcMask, ysrcMask); + + SetUserScale(xscaleOld, yscaleOld); + + return rc; +} + +void wxDCImpl::DrawLines(const wxPointList *list, wxCoord xoffset, wxCoord yoffset) +{ + int n = list->GetCount(); + wxPoint *points = new wxPoint[n]; + + int i = 0; + for ( wxPointList::compatibility_iterator node = list->GetFirst(); node; node = node->GetNext(), i++ ) + { + wxPoint *point = node->GetData(); + points[i].x = point->x; + points[i].y = point->y; + } + + DoDrawLines(n, points, xoffset, yoffset); + + delete [] points; +} + +void wxDCImpl::DrawPolygon(const wxPointList *list, + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle) +{ + int n = list->GetCount(); + wxPoint *points = new wxPoint[n]; + + int i = 0; + for ( wxPointList::compatibility_iterator node = list->GetFirst(); node; node = node->GetNext(), i++ ) + { + wxPoint *point = node->GetData(); + points[i].x = point->x; + points[i].y = point->y; + } + + DoDrawPolygon(n, points, xoffset, yoffset, fillStyle); + + delete [] points; +} + +void +wxDCImpl::DoDrawPolyPolygon(int n, + const int count[], + const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle) +{ + if ( n == 1 ) + { + DoDrawPolygon(count[0], points, xoffset, yoffset, fillStyle); + return; + } + + int i, j, lastOfs; + wxPoint* pts; + + for (i = j = lastOfs = 0; i < n; i++) + { + lastOfs = j; + j += count[i]; + } + pts = new wxPoint[j+n-1]; + for (i = 0; i < j; i++) + pts[i] = points[i]; + for (i = 2; i <= n; i++) + { + lastOfs -= count[n-i]; + pts[j++] = pts[lastOfs]; + } + + { + wxDCPenChanger setTransp(*m_owner, *wxTRANSPARENT_PEN); + DoDrawPolygon(j, pts, xoffset, yoffset, fillStyle); + } + + for (i = j = 0; i < n; i++) + { + DoDrawLines(count[i], pts+j, xoffset, yoffset); + j += count[i]; + } + delete[] pts; +} + +#if wxUSE_SPLINES + +void wxDCImpl::DrawSpline(wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord x3, wxCoord y3) +{ + wxPoint points[] = { wxPoint(x1, y1), wxPoint(x2, y2), wxPoint(x3, y3) }; + DrawSpline(WXSIZEOF(points), points); +} + +void wxDCImpl::DrawSpline(int n, const wxPoint points[]) +{ + wxPointList list; + for ( int i = 0; i < n; i++ ) + list.Append(const_cast(&points[i])); + + DrawSpline(&list); +} + +// ----------------------------------- spline code ---------------------------------------- + +void wx_quadratic_spline(double a1, double b1, double a2, double b2, + double a3, double b3, double a4, double b4); +void wx_clear_stack(); +int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, double *x3, + double *y3, double *x4, double *y4); +void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, + double x4, double y4); +static bool wx_spline_add_point(double x, double y); +static void wx_spline_draw_point_array(wxDC *dc); + +static wxPointList wx_spline_point_list; + +#define half(z1, z2) ((z1+z2)/2.0) +#define THRESHOLD 5 + +/* iterative version */ + +void wx_quadratic_spline(double a1, double b1, double a2, double b2, double a3, double b3, double a4, + double b4) +{ + double xmid, ymid; + double x1, y1, x2, y2, x3, y3, x4, y4; + + wx_clear_stack(); + wx_spline_push(a1, b1, a2, b2, a3, b3, a4, b4); + + while (wx_spline_pop(&x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4)) { + xmid = (double)half(x2, x3); + ymid = (double)half(y2, y3); + if (fabs(x1 - xmid) < THRESHOLD && fabs(y1 - ymid) < THRESHOLD && + fabs(xmid - x4) < THRESHOLD && fabs(ymid - y4) < THRESHOLD) { + wx_spline_add_point( x1, y1 ); + wx_spline_add_point( xmid, ymid ); + } else { + wx_spline_push(xmid, ymid, (double)half(xmid, x3), (double)half(ymid, y3), + (double)half(x3, x4), (double)half(y3, y4), x4, y4); + wx_spline_push(x1, y1, (double)half(x1, x2), (double)half(y1, y2), + (double)half(x2, xmid), (double)half(y2, ymid), xmid, ymid); + } + } +} + +/* utilities used by spline drawing routines */ + +typedef struct wx_spline_stack_struct { + double x1, y1, x2, y2, x3, y3, x4, y4; +} Stack; + +#define SPLINE_STACK_DEPTH 20 +static Stack wx_spline_stack[SPLINE_STACK_DEPTH]; +static Stack *wx_stack_top; +static int wx_stack_count; + +void wx_clear_stack() +{ + wx_stack_top = wx_spline_stack; + wx_stack_count = 0; +} + +void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) +{ + wx_stack_top->x1 = x1; + wx_stack_top->y1 = y1; + wx_stack_top->x2 = x2; + wx_stack_top->y2 = y2; + wx_stack_top->x3 = x3; + wx_stack_top->y3 = y3; + wx_stack_top->x4 = x4; + wx_stack_top->y4 = y4; + wx_stack_top++; + wx_stack_count++; +} + +int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, + double *x3, double *y3, double *x4, double *y4) +{ + if (wx_stack_count == 0) + return (0); + wx_stack_top--; + wx_stack_count--; + *x1 = wx_stack_top->x1; + *y1 = wx_stack_top->y1; + *x2 = wx_stack_top->x2; + *y2 = wx_stack_top->y2; + *x3 = wx_stack_top->x3; + *y3 = wx_stack_top->y3; + *x4 = wx_stack_top->x4; + *y4 = wx_stack_top->y4; + return (1); +} + +static bool wx_spline_add_point(double x, double y) +{ + wxPoint *point = new wxPoint( wxRound(x), wxRound(y) ); + wx_spline_point_list.Append(point ); + return true; +} + +static void wx_spline_draw_point_array(wxDC *dc) +{ + dc->DrawLines(&wx_spline_point_list, 0, 0 ); + wxPointList::compatibility_iterator node = wx_spline_point_list.GetFirst(); + while (node) + { + wxPoint *point = node->GetData(); + delete point; + wx_spline_point_list.Erase(node); + node = wx_spline_point_list.GetFirst(); + } +} + +void wxDCImpl::DoDrawSpline( const wxPointList *points ) +{ + wxCHECK_RET( IsOk(), wxT("invalid window dc") ); + + const wxPoint *p; + double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4; + double x1, y1, x2, y2; + + wxPointList::compatibility_iterator node = points->GetFirst(); + if (!node) + // empty list + return; + + p = node->GetData(); + + x1 = p->x; + y1 = p->y; + + node = node->GetNext(); + p = node->GetData(); + + x2 = p->x; + y2 = p->y; + cx1 = (double)((x1 + x2) / 2); + cy1 = (double)((y1 + y2) / 2); + cx2 = (double)((cx1 + x2) / 2); + cy2 = (double)((cy1 + y2) / 2); + + wx_spline_add_point(x1, y1); + + while ((node = node->GetNext()) +#if !wxUSE_STD_CONTAINERS + != NULL +#endif // !wxUSE_STD_CONTAINERS + ) + { + p = node->GetData(); + x1 = x2; + y1 = y2; + x2 = p->x; + y2 = p->y; + cx4 = (double)(x1 + x2) / 2; + cy4 = (double)(y1 + y2) / 2; + cx3 = (double)(x1 + cx4) / 2; + cy3 = (double)(y1 + cy4) / 2; + + wx_quadratic_spline(cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4); + + cx1 = cx4; + cy1 = cy4; + cx2 = (double)(cx1 + x2) / 2; + cy2 = (double)(cy1 + y2) / 2; + } + + wx_spline_add_point( cx1, cy1 ); + wx_spline_add_point( x2, y2 ); + + wx_spline_draw_point_array( m_owner ); +} + +#endif // wxUSE_SPLINES + + + +void wxDCImpl::DoGradientFillLinear(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour, + wxDirection nDirection) +{ + // save old pen + wxPen oldPen = m_pen; + wxBrush oldBrush = m_brush; + + wxUint8 nR1 = initialColour.Red(); + wxUint8 nG1 = initialColour.Green(); + wxUint8 nB1 = initialColour.Blue(); + wxUint8 nR2 = destColour.Red(); + wxUint8 nG2 = destColour.Green(); + wxUint8 nB2 = destColour.Blue(); + wxUint8 nR, nG, nB; + + if ( nDirection == wxEAST || nDirection == wxWEST ) + { + wxInt32 x = rect.GetWidth(); + wxInt32 w = x; // width of area to shade + wxInt32 xDelta = w/256; // height of one shade bend + if (xDelta < 1) + xDelta = 1; + + while (x >= xDelta) + { + x -= xDelta; + if (nR1 > nR2) + nR = nR1 - (nR1-nR2)*(w-x)/w; + else + nR = nR1 + (nR2-nR1)*(w-x)/w; + + if (nG1 > nG2) + nG = nG1 - (nG1-nG2)*(w-x)/w; + else + nG = nG1 + (nG2-nG1)*(w-x)/w; + + if (nB1 > nB2) + nB = nB1 - (nB1-nB2)*(w-x)/w; + else + nB = nB1 + (nB2-nB1)*(w-x)/w; + + wxColour colour(nR,nG,nB); + SetPen(wxPen(colour, 1, wxPENSTYLE_SOLID)); + SetBrush(wxBrush(colour)); + if(nDirection == wxEAST) + DoDrawRectangle(rect.GetRight()-x-xDelta+1, rect.GetTop(), + xDelta, rect.GetHeight()); + else //nDirection == wxWEST + DoDrawRectangle(rect.GetLeft()+x, rect.GetTop(), + xDelta, rect.GetHeight()); + } + } + else // nDirection == wxNORTH || nDirection == wxSOUTH + { + wxInt32 y = rect.GetHeight(); + wxInt32 w = y; // height of area to shade + wxInt32 yDelta = w/255; // height of one shade bend + if (yDelta < 1) + yDelta = 1; + + while (y > 0) + { + y -= yDelta; + if (nR1 > nR2) + nR = nR1 - (nR1-nR2)*(w-y)/w; + else + nR = nR1 + (nR2-nR1)*(w-y)/w; + + if (nG1 > nG2) + nG = nG1 - (nG1-nG2)*(w-y)/w; + else + nG = nG1 + (nG2-nG1)*(w-y)/w; + + if (nB1 > nB2) + nB = nB1 - (nB1-nB2)*(w-y)/w; + else + nB = nB1 + (nB2-nB1)*(w-y)/w; + + wxColour colour(nR,nG,nB); + SetPen(wxPen(colour, 1, wxPENSTYLE_SOLID)); + SetBrush(wxBrush(colour)); + if(nDirection == wxNORTH) + DoDrawRectangle(rect.GetLeft(), rect.GetTop()+y, + rect.GetWidth(), yDelta); + else //nDirection == wxSOUTH + DoDrawRectangle(rect.GetLeft(), rect.GetBottom()-y-yDelta+1, + rect.GetWidth(), yDelta); + } + } + + SetPen(oldPen); + SetBrush(oldBrush); +} + +void wxDCImpl::DoGradientFillConcentric(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour, + const wxPoint& circleCenter) +{ + // save the old pen and ensure it is restored on exit + const wxPen penOrig = m_pen; + wxON_BLOCK_EXIT_SET(m_pen, penOrig); + + wxUint8 nR1 = destColour.Red(); + wxUint8 nG1 = destColour.Green(); + wxUint8 nB1 = destColour.Blue(); + wxUint8 nR2 = initialColour.Red(); + wxUint8 nG2 = initialColour.Green(); + wxUint8 nB2 = initialColour.Blue(); + wxUint8 nR, nG, nB; + + + //Radius + double cx = rect.GetWidth() / 2; + double cy = rect.GetHeight() / 2; + double dRadius; + if (cx < cy) + dRadius = cx; + else + dRadius = cy; + + //Offset of circle + double ptX, ptY; + ptX = circleCenter.x; + ptY = circleCenter.y; + double nCircleOffX = ptX - cx; + double nCircleOffY = ptY - cy; + + double dGradient; + double dx, dy; + + for ( wxInt32 x = 0; x < rect.GetWidth(); x++ ) + { + for ( wxInt32 y = 0; y < rect.GetHeight(); y++ ) + { + //get color difference + dx = x; + dy = y; + + dGradient = ((dRadius - sqrt( (dx - cx - nCircleOffX) * (dx - cx - nCircleOffX) + +(dy - cy - nCircleOffY) * (dy - cy - nCircleOffY) + ) + ) * 100 + ) / dRadius; + + //normalize Gradient + if (dGradient < 0) + dGradient = 0.0; + + //get dest colors + nR = (wxUint8)(nR1 + ((nR2 - nR1) * dGradient / 100)); + nG = (wxUint8)(nG1 + ((nG2 - nG1) * dGradient / 100)); + nB = (wxUint8)(nB1 + ((nB2 - nB1) * dGradient / 100)); + + //set the pixel + SetPen(wxColour(nR,nG,nB)); + DoDrawPoint(x + rect.GetLeft(), y + rect.GetTop()); + } + } +} + +void wxDCImpl::InheritAttributes(wxWindow *win) +{ + wxCHECK_RET( win, "window can't be NULL" ); + + SetFont(win->GetFont()); + SetTextForeground(win->GetForegroundColour()); + SetTextBackground(win->GetBackgroundColour()); + SetBackground(win->GetBackgroundColour()); + SetLayoutDirection(win->GetLayoutDirection()); +} + +void wxDCImpl::DoGetFontMetrics(int *height, + int *ascent, + int *descent, + int *internalLeading, + int *externalLeading, + int *averageWidth) const +{ + // Average width is typically the same as width of 'x'. + wxCoord h, d; + DoGetTextExtent("x", averageWidth, &h, &d, externalLeading); + + if ( height ) + *height = h; + if ( ascent ) + *ascent = h - d; + if ( descent ) + *descent = d; + if ( internalLeading ) + *internalLeading = 0; +} + +//----------------------------------------------------------------------------- +// wxDC +//----------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) + +void wxDC::CopyAttributes(const wxDC& dc) +{ + SetFont(dc.GetFont()); + SetTextForeground(dc.GetTextForeground()); + SetTextBackground(dc.GetTextBackground()); + SetBackground(dc.GetBackground()); + SetLayoutDirection(dc.GetLayoutDirection()); +} + +void wxDC::DrawLabel(const wxString& text, + const wxBitmap& bitmap, + const wxRect& rect, + int alignment, + int indexAccel, + wxRect *rectBounding) +{ + // find the text position + wxCoord widthText, heightText, heightLine; + GetMultiLineTextExtent(text, &widthText, &heightText, &heightLine); + + wxCoord width, height; + if ( bitmap.IsOk() ) + { + width = widthText + bitmap.GetWidth(); + height = bitmap.GetHeight(); + } + else // no bitmap + { + width = widthText; + height = heightText; + } + + wxCoord x, y; + if ( alignment & wxALIGN_RIGHT ) + { + x = rect.GetRight() - width; + } + else if ( alignment & wxALIGN_CENTRE_HORIZONTAL ) + { + x = (rect.GetLeft() + rect.GetRight() + 1 - width) / 2; + } + else // alignment & wxALIGN_LEFT + { + x = rect.GetLeft(); + } + + if ( alignment & wxALIGN_BOTTOM ) + { + y = rect.GetBottom() - height; + } + else if ( alignment & wxALIGN_CENTRE_VERTICAL ) + { + y = (rect.GetTop() + rect.GetBottom() + 1 - height) / 2; + } + else // alignment & wxALIGN_TOP + { + y = rect.GetTop(); + } + + // draw the bitmap first + wxCoord x0 = x, + y0 = y, + width0 = width; + if ( bitmap.IsOk() ) + { + DrawBitmap(bitmap, x, y, true /* use mask */); + + wxCoord offset = bitmap.GetWidth() + 4; + x += offset; + width -= offset; + + y += (height - heightText) / 2; + } + + // we will draw the underscore under the accel char later + wxCoord startUnderscore = 0, + endUnderscore = 0, + yUnderscore = 0; + + // split the string into lines and draw each of them separately + // + // NB: while wxDC::DrawText() on some platforms supports drawing multi-line + // strings natively, this is not the case for all of them, notably not + // wxMSW which uses this function for multi-line texts, so we may only + // call DrawText() for single-line strings from here to avoid infinite + // recursion. + wxString curLine; + for ( wxString::const_iterator pc = text.begin(); ; ++pc ) + { + if ( pc == text.end() || *pc == '\n' ) + { + int xRealStart = x; // init it here to avoid compielr warnings + + if ( !curLine.empty() ) + { + // NB: can't test for !(alignment & wxALIGN_LEFT) because + // wxALIGN_LEFT is 0 + if ( alignment & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL) ) + { + wxCoord widthLine; + GetTextExtent(curLine, &widthLine, NULL); + + if ( alignment & wxALIGN_RIGHT ) + { + xRealStart += width - widthLine; + } + else // if ( alignment & wxALIGN_CENTRE_HORIZONTAL ) + { + xRealStart += (width - widthLine) / 2; + } + } + //else: left aligned, nothing to do + + DrawText(curLine, xRealStart, y); + } + + y += heightLine; + + // do we have underscore in this line? we can check yUnderscore + // because it is set below to just y + heightLine if we do + if ( y == yUnderscore ) + { + // adjust the horz positions to account for the shift + startUnderscore += xRealStart; + endUnderscore += xRealStart; + } + + if ( pc == text.end() ) + break; + + curLine.clear(); + } + else // not end of line + { + if ( pc - text.begin() == indexAccel ) + { + // remember to draw underscore here + GetTextExtent(curLine, &startUnderscore, NULL); + curLine += *pc; + GetTextExtent(curLine, &endUnderscore, NULL); + + yUnderscore = y + heightLine; + } + else + { + curLine += *pc; + } + } + } + + // draw the underscore if found + if ( startUnderscore != endUnderscore ) + { + // it should be of the same colour as text + SetPen(wxPen(GetTextForeground(), 0, wxPENSTYLE_SOLID)); + + // This adjustment is relatively arbitrary: we need to draw the + // underline slightly higher to avoid overflowing the character cell + // but whether we should do it 1, 2 or 3 pixels higher is not clear. + // + // The currently used value seems to be compatible with native MSW + // behaviour, i.e. it results in the same appearance of the owner-drawn + // and normal labels. + yUnderscore -= 2; + + DrawLine(startUnderscore, yUnderscore, endUnderscore, yUnderscore); + } + + // return bounding rect if requested + if ( rectBounding ) + { + *rectBounding = wxRect(x, y - heightText, widthText, heightText); + } + + CalcBoundingBox(x0, y0); + CalcBoundingBox(x0 + width0, y0 + height); +} + +#if WXWIN_COMPATIBILITY_2_8 + // for compatibility with the old code when wxCoord was long everywhere +void wxDC::GetTextExtent(const wxString& string, + long *x, long *y, + long *descent, + long *externalLeading, + const wxFont *theFont) const + { + wxCoord x2, y2, descent2, externalLeading2; + m_pimpl->DoGetTextExtent(string, &x2, &y2, + &descent2, &externalLeading2, + theFont); + if ( x ) + *x = x2; + if ( y ) + *y = y2; + if ( descent ) + *descent = descent2; + if ( externalLeading ) + *externalLeading = externalLeading2; + } + +void wxDC::GetLogicalOrigin(long *x, long *y) const + { + wxCoord x2, y2; + m_pimpl->DoGetLogicalOrigin(&x2, &y2); + if ( x ) + *x = x2; + if ( y ) + *y = y2; + } + +void wxDC::GetDeviceOrigin(long *x, long *y) const + { + wxCoord x2, y2; + m_pimpl->DoGetDeviceOrigin(&x2, &y2); + if ( x ) + *x = x2; + if ( y ) + *y = y2; + } + +void wxDC::GetClippingBox(long *x, long *y, long *w, long *h) const + { + wxCoord xx,yy,ww,hh; + m_pimpl->DoGetClippingBox(&xx, &yy, &ww, &hh); + if (x) *x = xx; + if (y) *y = yy; + if (w) *w = ww; + if (h) *h = hh; + } + +void wxDC::DrawObject(wxDrawObject* drawobject) +{ + drawobject->Draw(*this); + CalcBoundingBox(drawobject->MinX(),drawobject->MinY()); + CalcBoundingBox(drawobject->MaxX(),drawobject->MaxY()); +} + +#endif // WXWIN_COMPATIBILITY_2_8 + +/* +Notes for wxWidgets DrawEllipticArcRot(...) + +wxDCBase::DrawEllipticArcRot(...) draws a rotated elliptic arc or an ellipse. +It uses wxDCBase::CalculateEllipticPoints(...) and wxDCBase::Rotate(...), +which are also new. + +All methods are generic, so they can be implemented in wxDCBase. +DoDrawEllipticArcRot(...) is virtual, so it can be called from deeper +methods like (WinCE) wxDC::DoDrawArc(...). + +CalculateEllipticPoints(...) fills a given list of wxPoints with some points +of an elliptic arc. The algorithm is pixel-based: In every row (in flat +parts) or every column (in steep parts) only one pixel is calculated. +Trigonometric calculation (sin, cos, tan, atan) is only done if the +starting angle is not equal to the ending angle. The calculation of the +pixels is done using simple arithmetic only and should perform not too +bad even on devices without floating point processor. I didn't test this yet. + +Rotate(...) rotates a list of point pixel-based, you will see rounding errors. +For instance: an ellipse rotated 180 degrees is drawn +slightly different from the original. + +The points are then moved to an array and used to draw a polyline and/or polygon +(with center added, the pie). +The result looks quite similar to the native ellipse, only e few pixels differ. + +The performance on a desktop system (Athlon 1800, WinXP) is about 7 times +slower as DrawEllipse(...), which calls the native API. +An rotated ellipse outside the clipping region takes nearly the same time, +while an native ellipse outside takes nearly no time to draw. + +If you draw an arc with this new method, you will see the starting and ending angles +are calculated properly. +If you use DrawEllipticArc(...), you will see they are only correct for circles +and not properly calculated for ellipses. + +Peter Lenhard +p.lenhard@t-online.de +*/ + +#ifdef __WXWINCE__ +void wxDCImpl::DoDrawEllipticArcRot( wxCoord x, wxCoord y, + wxCoord w, wxCoord h, + double sa, double ea, double angle ) +{ + wxPointList list; + + CalculateEllipticPoints( &list, x, y, w, h, sa, ea ); + Rotate( &list, angle, wxPoint( x+w/2, y+h/2 ) ); + + // Add center (for polygon/pie) + list.Append( new wxPoint( x+w/2, y+h/2 ) ); + + // copy list into array and delete list elements + int n = list.GetCount(); + wxPoint *points = new wxPoint[n]; + int i = 0; + wxPointList::compatibility_iterator node; + for ( node = list.GetFirst(); node; node = node->GetNext(), i++ ) + { + wxPoint *point = node->GetData(); + points[i].x = point->x; + points[i].y = point->y; + delete point; + } + + // first draw the pie without pen, if necessary + if( GetBrush() != *wxTRANSPARENT_BRUSH ) + { + wxPen tempPen( GetPen() ); + SetPen( *wxTRANSPARENT_PEN ); + DoDrawPolygon( n, points, 0, 0 ); + SetPen( tempPen ); + } + + // then draw the arc without brush, if necessary + if( GetPen() != *wxTRANSPARENT_PEN ) + { + // without center + DoDrawLines( n-1, points, 0, 0 ); + } + + delete [] points; + +} // DrawEllipticArcRot + +void wxDCImpl::Rotate( wxPointList* points, double angle, wxPoint center ) +{ + if( angle != 0.0 ) + { + double pi(M_PI); + double dSinA = -sin(angle*2.0*pi/360.0); + double dCosA = cos(angle*2.0*pi/360.0); + wxPointList::compatibility_iterator node; + for ( node = points->GetFirst(); node; node = node->GetNext() ) + { + wxPoint* point = node->GetData(); + + // transform coordinates, if necessary + if( center.x ) point->x -= center.x; + if( center.y ) point->y -= center.y; + + // calculate rotation, rounding simply by implicit cast to integer + int xTemp = point->x * dCosA - point->y * dSinA; + point->y = point->x * dSinA + point->y * dCosA; + point->x = xTemp; + + // back transform coordinates, if necessary + if( center.x ) point->x += center.x; + if( center.y ) point->y += center.y; + } + } +} + +void wxDCImpl::CalculateEllipticPoints( wxPointList* points, + wxCoord xStart, wxCoord yStart, + wxCoord w, wxCoord h, + double sa, double ea ) +{ + double pi = M_PI; + double sar = 0; + double ear = 0; + int xsa = 0; + int ysa = 0; + int xea = 0; + int yea = 0; + int sq = 0; + int eq = 0; + bool bUseAngles = false; + if( w<0 ) w = -w; + if( h<0 ) h = -h; + // half-axes + wxCoord a = w/2; + wxCoord b = h/2; + // decrement 1 pixel if ellipse is smaller than 2*a, 2*b + int decrX = 0; + if( 2*a == w ) decrX = 1; + int decrY = 0; + if( 2*b == h ) decrY = 1; + // center + wxCoord xCenter = xStart + a; + wxCoord yCenter = yStart + b; + // calculate data for start and end, if necessary + if( sa != ea ) + { + bUseAngles = true; + // normalisation of angles + while( sa<0 ) sa += 360; + while( ea<0 ) ea += 360; + while( sa>=360 ) sa -= 360; + while( ea>=360 ) ea -= 360; + // calculate quadrant numbers + if( sa > 270 ) sq = 3; + else if( sa > 180 ) sq = 2; + else if( sa > 90 ) sq = 1; + if( ea > 270 ) eq = 3; + else if( ea > 180 ) eq = 2; + else if( ea > 90 ) eq = 1; + sar = sa * pi / 180.0; + ear = ea * pi / 180.0; + // correct angle circle -> ellipse + sar = atan( -a/(double)b * tan( sar ) ); + if ( sq == 1 || sq == 2 ) sar += pi; + ear = atan( -a/(double)b * tan( ear ) ); + if ( eq == 1 || eq == 2 ) ear += pi; + // coordinates of points + xsa = xCenter + a * cos( sar ); + if( sq == 0 || sq == 3 ) xsa -= decrX; + ysa = yCenter + b * sin( sar ); + if( sq == 2 || sq == 3 ) ysa -= decrY; + xea = xCenter + a * cos( ear ); + if( eq == 0 || eq == 3 ) xea -= decrX; + yea = yCenter + b * sin( ear ); + if( eq == 2 || eq == 3 ) yea -= decrY; + } // if iUseAngles + // calculate c1 = b^2, c2 = b^2/a^2 with a = w/2, b = h/2 + double c1 = b * b; + double c2 = 2.0 / w; + c2 *= c2; + c2 *= c1; + wxCoord x = 0; + wxCoord y = b; + long x2 = 1; + long y2 = y*y; + long y2_old = 0; + long y_old = 0; + // Lists for quadrant 1 to 4 + wxPointList pointsarray[4]; + // Calculate points for first quadrant and set in all quadrants + for( x = 0; x <= a; ++x ) + { + x2 = x2+x+x-1; + y2_old = y2; + y_old = y; + bool bNewPoint = false; + while( y2 > c1 - c2 * x2 && y > 0 ) + { + bNewPoint = true; + y2 = y2-y-y+1; + --y; + } + // old y now too big: set point with old y, old x + if( bNewPoint && x>1) + { + int x1 = x - 1; + // remove points on the same line + pointsarray[0].Insert( new wxPoint( xCenter + x1 - decrX, yCenter - y_old ) ); + pointsarray[1].Append( new wxPoint( xCenter - x1, yCenter - y_old ) ); + pointsarray[2].Insert( new wxPoint( xCenter - x1, yCenter + y_old - decrY ) ); + pointsarray[3].Append( new wxPoint( xCenter + x1 - decrX, yCenter + y_old - decrY ) ); + } // set point + } // calculate point + + // Starting and/or ending points for the quadrants, first quadrant gets both. + pointsarray[0].Insert( new wxPoint( xCenter + a - decrX, yCenter ) ); + pointsarray[0].Append( new wxPoint( xCenter, yCenter - b ) ); + pointsarray[1].Append( new wxPoint( xCenter - a, yCenter ) ); + pointsarray[2].Append( new wxPoint( xCenter, yCenter + b - decrY ) ); + pointsarray[3].Append( new wxPoint( xCenter + a - decrX, yCenter ) ); + + // copy quadrants in original list + if( bUseAngles ) + { + // Copy the right part of the points in the lists + // and delete the wxPoints, because they do not leave this method. + points->Append( new wxPoint( xsa, ysa ) ); + int q = sq; + bool bStarted = false; + bool bReady = false; + bool bForceTurn = ( sq == eq && sa > ea ); + while( !bReady ) + { + wxPointList::compatibility_iterator node; + for( node = pointsarray[q].GetFirst(); node; node = node->GetNext() ) + { + // once: go to starting point in start quadrant + if( !bStarted && + ( + node->GetData()->x < xsa+1 && q <= 1 + || + node->GetData()->x > xsa-1 && q >= 2 + ) + ) + { + bStarted = true; + } + + // copy point, if not at ending point + if( bStarted ) + { + if( q != eq || bForceTurn + || + ( (wxPoint*) node->GetData() )->x > xea+1 && q <= 1 + || + ( (wxPoint*) node->GetData() )->x < xea-1 && q >= 2 + ) + { + // copy point + wxPoint* pPoint = new wxPoint( *(node->GetData()) ); + points->Append( pPoint ); + } + else if( q == eq && !bForceTurn || node->GetData()->x == xea) + { + bReady = true; + } + } + } // for node + ++q; + if( q > 3 ) q = 0; + bForceTurn = false; + bStarted = true; + } // while not bReady + points->Append( new wxPoint( xea, yea ) ); + + // delete points + for( q = 0; q < 4; ++q ) + { + wxPointList::compatibility_iterator node; + for( node = pointsarray[q].GetFirst(); node; node = node->GetNext() ) + { + wxPoint *p = node->GetData(); + delete p; + } + } + } + else + { + wxPointList::compatibility_iterator node; + // copy whole ellipse, wxPoints will be deleted outside + for( node = pointsarray[0].GetFirst(); node; node = node->GetNext() ) + { + wxPoint *p = node->GetData(); + points->Append( p ); + } + for( node = pointsarray[1].GetFirst(); node; node = node->GetNext() ) + { + wxPoint *p = node->GetData(); + points->Append( p ); + } + for( node = pointsarray[2].GetFirst(); node; node = node->GetNext() ) + { + wxPoint *p = node->GetData(); + points->Append( p ); + } + for( node = pointsarray[3].GetFirst(); node; node = node->GetNext() ) + { + wxPoint *p = node->GetData(); + points->Append( p ); + } + } // not iUseAngles +} // CalculateEllipticPoints + +#endif // __WXWINCE__ + +float wxDCImpl::GetFontPointSizeAdjustment(float dpi) +{ + // wxMSW has long-standing bug where wxFont point size is interpreted as + // "pixel size corresponding to given point size *on screen*". In other + // words, on a typical 600dpi printer and a typical 96dpi screen, fonts + // are ~6 times smaller when printing. Unfortunately, this bug is so severe + // that *all* printing code has to account for it and consequently, other + // ports need to emulate this bug too: + const wxSize screenPPI = wxGetDisplayPPI(); + return float(screenPPI.y) / dpi; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/dcbufcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/dcbufcmn.cpp new file mode 100644 index 0000000000..3bc2e275ed --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/dcbufcmn.cpp @@ -0,0 +1,166 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/dcbufcmn.cpp +// Purpose: Buffered DC implementation +// Author: Ron Lee, Jaakko Salli +// Modified by: +// Created: Sep-20-2006 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/dcbuffer.h" + +#ifndef WX_PRECOMP + #include "wx/module.h" +#endif + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxBufferedDC,wxMemoryDC) +IMPLEMENT_ABSTRACT_CLASS(wxBufferedPaintDC,wxBufferedDC) + +// ---------------------------------------------------------------------------- +// wxSharedDCBufferManager: helper class maintaining backing store bitmap +// ---------------------------------------------------------------------------- + +class wxSharedDCBufferManager : public wxModule +{ +public: + wxSharedDCBufferManager() { } + + virtual bool OnInit() { return true; } + virtual void OnExit() { wxDELETE(ms_buffer); } + + static wxBitmap* GetBuffer(int w, int h) + { + if ( ms_usingSharedBuffer ) + return new wxBitmap(w, h); + + if ( !ms_buffer || + w > ms_buffer->GetWidth() || + h > ms_buffer->GetHeight() ) + { + delete ms_buffer; + + // we must always return a valid bitmap but creating a bitmap of + // size 0 would fail, so create a 1*1 bitmap in this case + if ( !w ) + w = 1; + if ( !h ) + h = 1; + + ms_buffer = new wxBitmap(w, h); + } + + ms_usingSharedBuffer = true; + return ms_buffer; + } + + static void ReleaseBuffer(wxBitmap* buffer) + { + if ( buffer == ms_buffer ) + { + wxASSERT_MSG( ms_usingSharedBuffer, wxT("shared buffer already released") ); + ms_usingSharedBuffer = false; + } + else + { + delete buffer; + } + } + +private: + static wxBitmap *ms_buffer; + static bool ms_usingSharedBuffer; + + DECLARE_DYNAMIC_CLASS(wxSharedDCBufferManager) +}; + +wxBitmap* wxSharedDCBufferManager::ms_buffer = NULL; +bool wxSharedDCBufferManager::ms_usingSharedBuffer = false; + +IMPLEMENT_DYNAMIC_CLASS(wxSharedDCBufferManager, wxModule) + +// ============================================================================ +// wxBufferedDC +// ============================================================================ + +void wxBufferedDC::UseBuffer(wxCoord w, wxCoord h) +{ + wxCHECK_RET( w >= -1 && h >= -1, "Invalid buffer size" ); + + if ( !m_buffer || !m_buffer->IsOk() ) + { + if ( w == -1 || h == -1 ) + m_dc->GetSize(&w, &h); + + m_buffer = wxSharedDCBufferManager::GetBuffer(w, h); + m_style |= wxBUFFER_USES_SHARED_BUFFER; + m_area.Set(w,h); + } + else + m_area = m_buffer->GetSize(); + + SelectObject(*m_buffer); + + // now that the DC is valid we can inherit the attributes (fonts, colours, + // layout direction, ...) from the original DC + if ( m_dc && m_dc->IsOk() ) + CopyAttributes(*m_dc); +} + +void wxBufferedDC::UnMask() +{ + wxCHECK_RET( m_dc, wxT("no underlying wxDC?") ); + wxASSERT_MSG( m_buffer && m_buffer->IsOk(), wxT("invalid backing store") ); + + wxCoord x = 0, + y = 0; + + // Ensure the scale matches the device + SetUserScale(1.0, 1.0); + + if ( m_style & wxBUFFER_CLIENT_AREA ) + GetDeviceOrigin(&x, &y); + + // It's possible that the buffer may be bigger than the area that needs to + // be drawn (the client size of the window is smaller than the bitmap, or + // a shared bitmap has been reused for a smaller area, etc.) so avoid + // blitting too much if possible, but only use the real DC size if the + // wxBUFFER_VIRTUAL_AREA style is not set. + int width = m_area.GetWidth(), + height = m_area.GetHeight(); + + if (!(m_style & wxBUFFER_VIRTUAL_AREA)) + { + int widthDC, + heightDC; + m_dc->GetSize(&widthDC, &heightDC); + width = wxMin(width, widthDC); + height = wxMin(height, heightDC); + } + + const wxPoint origin = GetLogicalOrigin(); + m_dc->Blit(-origin.x, -origin.y, width, height, this, -x, -y); + m_dc = NULL; + + if ( m_style & wxBUFFER_USES_SHARED_BUFFER ) + wxSharedDCBufferManager::ReleaseBuffer(m_buffer); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/dcgraph.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/dcgraph.cpp new file mode 100644 index 0000000000..acc689c3bb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/dcgraph.cpp @@ -0,0 +1,1248 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/dcgraph.cpp +// Purpose: graphics context methods common to all platforms +// Author: Stefan Csomor +// Modified by: +// Created: +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#if wxUSE_GRAPHICS_CONTEXT + +#include "wx/dcgraph.h" +#include "wx/rawbmp.h" + +#ifndef WX_PRECOMP + #include "wx/icon.h" + #include "wx/dcclient.h" + #include "wx/dcmemory.h" +#endif + +//----------------------------------------------------------------------------- +// constants +//----------------------------------------------------------------------------- + +static const double RAD2DEG = 180.0 / M_PI; + +//----------------------------------------------------------------------------- +// Local functions +//----------------------------------------------------------------------------- + +static inline double DegToRad(double deg) +{ + return (deg * M_PI) / 180.0; +} + +static wxCompositionMode TranslateRasterOp(wxRasterOperationMode function) +{ + switch ( function ) + { + case wxCOPY: // src + // since we are supporting alpha, _OVER is closer to the intention than _SOURCE + // since the latter would overwrite even when alpha is not set to opaque + return wxCOMPOSITION_OVER; + + case wxOR: // src OR dst + return wxCOMPOSITION_ADD; + + case wxNO_OP: // dst + return wxCOMPOSITION_DEST; // ignore the source + + case wxCLEAR: // 0 + return wxCOMPOSITION_CLEAR;// clear dst + + case wxXOR: // src XOR dst + return wxCOMPOSITION_XOR; + + case wxAND: // src AND dst + case wxAND_INVERT: // (NOT src) AND dst + case wxAND_REVERSE:// src AND (NOT dst) + case wxEQUIV: // (NOT src) XOR dst + case wxINVERT: // NOT dst + case wxNAND: // (NOT src) OR (NOT dst) + case wxNOR: // (NOT src) AND (NOT dst) + case wxOR_INVERT: // (NOT src) OR dst + case wxOR_REVERSE: // src OR (NOT dst) + case wxSET: // 1 + case wxSRC_INVERT: // NOT src + break; + } + + return wxCOMPOSITION_INVALID; +} + +//----------------------------------------------------------------------------- +// wxDC bridge class +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGCDC, wxDC) + +wxGCDC::wxGCDC(const wxWindowDC& dc) : + wxDC( new wxGCDCImpl( this, dc ) ) +{ +} + +wxGCDC::wxGCDC( const wxMemoryDC& dc) : + wxDC( new wxGCDCImpl( this, dc ) ) +{ +} + +#if wxUSE_PRINTING_ARCHITECTURE +wxGCDC::wxGCDC( const wxPrinterDC& dc) : + wxDC( new wxGCDCImpl( this, dc ) ) +{ +} +#endif + +#if defined(__WXMSW__) && wxUSE_ENH_METAFILE +wxGCDC::wxGCDC(const wxEnhMetaFileDC& dc) + : wxDC(new wxGCDCImpl(this, dc)) +{ +} +#endif + +wxGCDC::wxGCDC(wxGraphicsContext* context) : + wxDC( new wxGCDCImpl( this ) ) +{ + SetGraphicsContext(context); +} + +wxGCDC::wxGCDC() : + wxDC( new wxGCDCImpl( this ) ) +{ +} + +wxGCDC::~wxGCDC() +{ +} + +wxGraphicsContext* wxGCDC::GetGraphicsContext() const +{ + if (!m_pimpl) return NULL; + wxGCDCImpl *gc_impl = (wxGCDCImpl*) m_pimpl; + return gc_impl->GetGraphicsContext(); +} + +void wxGCDC::SetGraphicsContext( wxGraphicsContext* ctx ) +{ + if (!m_pimpl) return; + wxGCDCImpl *gc_impl = (wxGCDCImpl*) m_pimpl; + gc_impl->SetGraphicsContext( ctx ); +} + +IMPLEMENT_ABSTRACT_CLASS(wxGCDCImpl, wxDCImpl) + +wxGCDCImpl::wxGCDCImpl( wxDC *owner ) : + wxDCImpl( owner ) +{ + Init(wxGraphicsContext::Create()); +} + +void wxGCDCImpl::SetGraphicsContext( wxGraphicsContext* ctx ) +{ + delete m_graphicContext; + m_graphicContext = ctx; + if ( m_graphicContext ) + { + m_matrixOriginal = m_graphicContext->GetTransform(); + m_ok = true; + // apply the stored transformations to the passed in context + ComputeScaleAndOrigin(); + m_graphicContext->SetFont( m_font , m_textForegroundColour ); + m_graphicContext->SetPen( m_pen ); + m_graphicContext->SetBrush( m_brush); + } +} + +wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxWindowDC& dc ) : + wxDCImpl( owner ) +{ + Init(wxGraphicsContext::Create(dc)); + m_window = dc.GetWindow(); +} + +wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc ) : + wxDCImpl( owner ) +{ +#if defined(__WXMSW__) && wxUSE_WXDIB + // It seems that GDI+ sets invalid values for alpha channel when used with + // a compatible bitmap (DDB). So we need to convert the currently selected + // bitmap to a DIB before using it with any GDI+ functions to ensure that + // we get the correct alpha channel values in it at the end. + + wxBitmap bmp = dc.GetSelectedBitmap(); + wxASSERT_MSG( bmp.IsOk(), "Should select a bitmap before creating wxGCDC" ); + + // We don't need to convert it if it can't have alpha at all (any depth but + // 32) or is already a DIB with alpha. + if ( bmp.GetDepth() == 32 && (!bmp.IsDIB() || !bmp.HasAlpha()) ) + { + // We need to temporarily deselect this bitmap from the memory DC + // before modifying it. + const_cast(dc).SelectObject(wxNullBitmap); + + bmp.ConvertToDIB(); // Does nothing if already a DIB. + + if( !bmp.HasAlpha() ) + { + // Initialize alpha channel, even if we don't have any alpha yet, + // we should have correct (opaque) alpha values in it for GDI+ + // functions to work correctly. + { + wxAlphaPixelData data(bmp); + if ( data ) + { + wxAlphaPixelData::Iterator p(data); + for ( int y = 0; y < data.GetHeight(); y++ ) + { + wxAlphaPixelData::Iterator rowStart = p; + + for ( int x = 0; x < data.GetWidth(); x++ ) + { + p.Alpha() = wxALPHA_OPAQUE; + ++p; + } + + p = rowStart; + p.OffsetY(data, 1); + } + } + } // End of block modifying the bitmap. + + // Using wxAlphaPixelData sets the internal "has alpha" flag but we + // don't really have any alpha yet, so reset it back for now. + bmp.ResetAlpha(); + } + + // Undo SelectObject() at the beginning of this block. + const_cast(dc).SelectObjectAsSource(bmp); + } +#endif // wxUSE_WXDIB + + Init(wxGraphicsContext::Create(dc)); +} + +#if wxUSE_PRINTING_ARCHITECTURE +wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc ) : + wxDCImpl( owner ) +{ + Init(wxGraphicsContext::Create(dc)); +} +#endif + +#if defined(__WXMSW__) && wxUSE_ENH_METAFILE +wxGCDCImpl::wxGCDCImpl(wxDC *owner, const wxEnhMetaFileDC& dc) + : wxDCImpl(owner) +{ + Init(wxGraphicsContext::Create(dc)); +} +#endif + +wxGCDCImpl::wxGCDCImpl(wxDC* owner, int) + : wxDCImpl(owner) +{ + // derived class will set a context + Init(NULL); +} + +void wxGCDCImpl::Init(wxGraphicsContext* ctx) +{ + m_ok = false; + m_colour = true; + m_mm_to_pix_x = mm2pt; + m_mm_to_pix_y = mm2pt; + + m_pen = *wxBLACK_PEN; + m_font = *wxNORMAL_FONT; + m_brush = *wxWHITE_BRUSH; + + m_graphicContext = NULL; + if (ctx) + SetGraphicsContext(ctx); + + m_logicalFunctionSupported = true; +} + +wxGCDCImpl::~wxGCDCImpl() +{ + delete m_graphicContext; +} + +void wxGCDCImpl::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, + bool useMask ) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawBitmap - invalid DC") ); + wxCHECK_RET( bmp.IsOk(), wxT("wxGCDC(cg)::DoDrawBitmap - invalid bitmap") ); + + int w = bmp.GetScaledWidth(); + int h = bmp.GetScaledHeight(); + if ( bmp.GetDepth() == 1 ) + { + m_graphicContext->SetPen(*wxTRANSPARENT_PEN); + m_graphicContext->SetBrush( wxBrush( m_textBackgroundColour , wxSOLID ) ); + m_graphicContext->DrawRectangle( x, y, w, h ); + m_graphicContext->SetBrush( wxBrush( m_textForegroundColour , wxSOLID ) ); + m_graphicContext->DrawBitmap( bmp, x, y, w, h ); + m_graphicContext->SetBrush( m_graphicContext->CreateBrush(m_brush)); + m_graphicContext->SetPen( m_graphicContext->CreatePen(m_pen)); + } + else // not a monochrome bitmap, handle it normally + { + // make a copy in case we need to remove its mask, if we don't modify + // it the copy is cheap as bitmaps are reference-counted + wxBitmap bmpCopy(bmp); + if ( !useMask && bmp.GetMask() ) + bmpCopy.SetMask(NULL); + + m_graphicContext->DrawBitmap( bmpCopy, x, y, w, h ); + } +} + +void wxGCDCImpl::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawIcon - invalid DC") ); + wxCHECK_RET( icon.IsOk(), wxT("wxGCDC(cg)::DoDrawIcon - invalid icon") ); + + wxCoord w = icon.GetWidth(); + wxCoord h = icon.GetHeight(); + + m_graphicContext->DrawIcon( icon , x, y, w, h ); +} + +bool wxGCDCImpl::StartDoc( const wxString& WXUNUSED(message) ) +{ + return true; +} + +void wxGCDCImpl::EndDoc() +{ +} + +void wxGCDCImpl::StartPage() +{ +} + +void wxGCDCImpl::EndPage() +{ +} + +void wxGCDCImpl::Flush() +{ + m_graphicContext->Flush(); +} + +void wxGCDCImpl::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h ) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoSetClippingRegion - invalid DC") ); + + m_graphicContext->Clip( x, y, w, h ); + + wxDCImpl::DoSetClippingRegion(x, y, w, h); +} + +void wxGCDCImpl::DoSetDeviceClippingRegion( const wxRegion ®ion ) +{ + // region is in device coordinates + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoSetDeviceClippingRegion - invalid DC") ); + + if (region.Empty()) + { + //DestroyClippingRegion(); + return; + } + + wxRegion logRegion( region ); + wxCoord x, y, w, h; + + logRegion.Offset( DeviceToLogicalX(0), DeviceToLogicalY(0) ); + logRegion.GetBox( x, y, w, h ); + + m_graphicContext->Clip( logRegion ); + if ( m_clipping ) + { + m_clipX1 = wxMax( m_clipX1, x ); + m_clipY1 = wxMax( m_clipY1, y ); + m_clipX2 = wxMin( m_clipX2, (x + w) ); + m_clipY2 = wxMin( m_clipY2, (y + h) ); + } + else + { + m_clipping = true; + + m_clipX1 = x; + m_clipY1 = y; + m_clipX2 = x + w; + m_clipY2 = y + h; + } +} + +void wxGCDCImpl::DestroyClippingRegion() +{ + m_graphicContext->ResetClip(); + // currently the clip eg of a window extends to the area between the scrollbars + // so we must explicitly make sure it only covers the area we want it to draw + int width, height ; + GetOwner()->GetSize( &width , &height ) ; + m_graphicContext->Clip( DeviceToLogicalX(0) , DeviceToLogicalY(0) , DeviceToLogicalXRel(width), DeviceToLogicalYRel(height) ); + + m_graphicContext->SetPen( m_pen ); + m_graphicContext->SetBrush( m_brush ); + + m_clipping = false; +} + +void wxGCDCImpl::DoGetSizeMM( int* width, int* height ) const +{ + int w = 0, h = 0; + + GetOwner()->GetSize( &w, &h ); + if (width) + *width = long( double(w) / (m_scaleX * m_mm_to_pix_x) ); + if (height) + *height = long( double(h) / (m_scaleY * m_mm_to_pix_y) ); +} + +void wxGCDCImpl::SetTextForeground( const wxColour &col ) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::SetTextForeground - invalid DC") ); + + // don't set m_textForegroundColour to an invalid colour as we'd crash + // later then (we use m_textForegroundColour.GetColor() without checking + // in a few places) + if ( col.IsOk() ) + { + m_textForegroundColour = col; + m_graphicContext->SetFont( m_font, m_textForegroundColour ); + } +} + +void wxGCDCImpl::SetTextBackground( const wxColour &col ) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::SetTextBackground - invalid DC") ); + + m_textBackgroundColour = col; +} + +wxSize wxGCDCImpl::GetPPI() const +{ + return wxSize(72, 72); +} + +int wxGCDCImpl::GetDepth() const +{ + return 32; +} + +void wxGCDCImpl::ComputeScaleAndOrigin() +{ + wxDCImpl::ComputeScaleAndOrigin(); + + if ( m_graphicContext ) + { + m_matrixCurrent = m_graphicContext->CreateMatrix(); + + // the logical origin sets the origin to have new coordinates + m_matrixCurrent.Translate( m_deviceOriginX - m_logicalOriginX * m_signX * m_scaleX, + m_deviceOriginY - m_logicalOriginY * m_signY * m_scaleY); + + m_matrixCurrent.Scale( m_scaleX * m_signX, m_scaleY * m_signY ); + + m_graphicContext->SetTransform( m_matrixOriginal ); + m_graphicContext->ConcatTransform( m_matrixCurrent ); + } +} + +void* wxGCDCImpl::GetHandle() const +{ + void* cgctx = NULL; + wxGraphicsContext* gc = GetGraphicsContext(); + if (gc) { + cgctx = gc->GetNativeContext(); + } + return cgctx; +} + +void wxGCDCImpl::SetPalette( const wxPalette& WXUNUSED(palette) ) +{ + +} + +void wxGCDCImpl::SetBackgroundMode( int mode ) +{ + m_backgroundMode = mode; +} + +void wxGCDCImpl::SetFont( const wxFont &font ) +{ + m_font = font; + if ( m_graphicContext ) + { + m_graphicContext->SetFont(font, m_textForegroundColour); + } +} + +void wxGCDCImpl::SetPen( const wxPen &pen ) +{ + m_pen = pen; + if ( m_graphicContext ) + { + m_graphicContext->SetPen( m_pen ); + } +} + +void wxGCDCImpl::SetBrush( const wxBrush &brush ) +{ + m_brush = brush; + if ( m_graphicContext ) + { + m_graphicContext->SetBrush( m_brush ); + } +} + +void wxGCDCImpl::SetBackground( const wxBrush &brush ) +{ + m_backgroundBrush = brush; + if (!m_backgroundBrush.IsOk()) + return; +} + +void wxGCDCImpl::SetLogicalFunction( wxRasterOperationMode function ) +{ + m_logicalFunction = function; + + wxCompositionMode mode = TranslateRasterOp( function ); + m_logicalFunctionSupported = mode != wxCOMPOSITION_INVALID; + if (m_logicalFunctionSupported) + m_logicalFunctionSupported = m_graphicContext->SetCompositionMode(mode); + + if ( function == wxXOR ) + m_graphicContext->SetAntialiasMode(wxANTIALIAS_NONE); + else + m_graphicContext->SetAntialiasMode(wxANTIALIAS_DEFAULT); +} + +bool wxGCDCImpl::DoFloodFill(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), + const wxColour& WXUNUSED(col), + wxFloodFillStyle WXUNUSED(style)) +{ + return false; +} + +bool wxGCDCImpl::DoGetPixel( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxColour *WXUNUSED(col) ) const +{ + // wxCHECK_MSG( 0 , false, wxT("wxGCDC(cg)::DoGetPixel - not implemented") ); + return false; +} + +void wxGCDCImpl::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 ) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawLine - invalid DC") ); + + if ( !m_logicalFunctionSupported ) + return; + + m_graphicContext->StrokeLine(x1,y1,x2,y2); + + CalcBoundingBox(x1, y1); + CalcBoundingBox(x2, y2); +} + +void wxGCDCImpl::DoCrossHair( wxCoord x, wxCoord y ) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoCrossHair - invalid DC") ); + + if ( !m_logicalFunctionSupported ) + return; + + int w = 0, h = 0; + + GetOwner()->GetSize( &w, &h ); + + m_graphicContext->StrokeLine(0,y,w,y); + m_graphicContext->StrokeLine(x,0,x,h); + + CalcBoundingBox(0, 0); + CalcBoundingBox(0+w, 0+h); +} + +void wxGCDCImpl::DoDrawArc( wxCoord x1, wxCoord y1, + wxCoord x2, wxCoord y2, + wxCoord xc, wxCoord yc ) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawArc - invalid DC") ); + + if ( !m_logicalFunctionSupported ) + return; + + double dx = x1 - xc; + double dy = y1 - yc; + double radius = sqrt((double)(dx * dx + dy * dy)); + wxCoord rad = (wxCoord)radius; + double sa, ea; + if (x1 == x2 && y1 == y2) + { + sa = 0.0; + ea = 360.0; + } + else if (radius == 0.0) + { + sa = ea = 0.0; + } + else + { + sa = (x1 - xc == 0) ? + (y1 - yc < 0) ? 90.0 : -90.0 : + -atan2(double(y1 - yc), double(x1 - xc)) * RAD2DEG; + ea = (x2 - xc == 0) ? + (y2 - yc < 0) ? 90.0 : -90.0 : + -atan2(double(y2 - yc), double(x2 - xc)) * RAD2DEG; + } + + bool fill = m_brush.GetStyle() != wxTRANSPARENT; + + wxGraphicsPath path = m_graphicContext->CreatePath(); + if ( fill && ((x1!=x2)||(y1!=y2)) ) + path.MoveToPoint( xc, yc ); + // since these angles (ea,sa) are measured counter-clockwise, we invert them to + // get clockwise angles + path.AddArc( xc, yc , rad , DegToRad(-sa) , DegToRad(-ea), false ); + if ( fill && ((x1!=x2)||(y1!=y2)) ) + path.AddLineToPoint( xc, yc ); + m_graphicContext->DrawPath(path); +} + +void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, + double sa, double ea ) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawEllipticArc - invalid DC") ); + + if ( !m_logicalFunctionSupported ) + return; + + m_graphicContext->PushState(); + m_graphicContext->Translate(x+w/2.0,y+h/2.0); + wxDouble factor = ((wxDouble) w) / h; + m_graphicContext->Scale( factor , 1.0); + + // since these angles (ea,sa) are measured counter-clockwise, we invert them to + // get clockwise angles + if ( m_brush.GetStyle() != wxTRANSPARENT ) + { + wxGraphicsPath path = m_graphicContext->CreatePath(); + path.MoveToPoint( 0, 0 ); + path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); + path.AddLineToPoint( 0, 0 ); + m_graphicContext->FillPath( path ); + + path = m_graphicContext->CreatePath(); + path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); + m_graphicContext->StrokePath( path ); + } + else + { + wxGraphicsPath path = m_graphicContext->CreatePath(); + path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); + m_graphicContext->DrawPath( path ); + } + + m_graphicContext->PopState(); +} + +void wxGCDCImpl::DoDrawPoint( wxCoord x, wxCoord y ) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawPoint - invalid DC") ); + + DoDrawLine( x , y , x + 1 , y + 1 ); +} + +void wxGCDCImpl::DoDrawLines(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawLines - invalid DC") ); + + if ( !m_logicalFunctionSupported ) + return; + + wxPoint2DDouble* pointsD = new wxPoint2DDouble[n]; + for( int i = 0; i < n; ++i) + { + pointsD[i].m_x = points[i].x + xoffset; + pointsD[i].m_y = points[i].y + yoffset; + } + + m_graphicContext->StrokeLines( n , pointsD); + delete[] pointsD; +} + +#if wxUSE_SPLINES +void wxGCDCImpl::DoDrawSpline(const wxPointList *points) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawSpline - invalid DC") ); + + if ( !m_logicalFunctionSupported ) + return; + + wxGraphicsPath path = m_graphicContext->CreatePath(); + + wxPointList::compatibility_iterator node = points->GetFirst(); + if ( !node ) + // empty list + return; + + const wxPoint *p = node->GetData(); + + wxCoord x1 = p->x; + wxCoord y1 = p->y; + + node = node->GetNext(); + p = node->GetData(); + + wxCoord x2 = p->x; + wxCoord y2 = p->y; + wxCoord cx1 = ( x1 + x2 ) / 2; + wxCoord cy1 = ( y1 + y2 ) / 2; + + path.MoveToPoint( x1 , y1 ); + path.AddLineToPoint( cx1 , cy1 ); +#if !wxUSE_STD_CONTAINERS + + while ((node = node->GetNext()) != NULL) +#else + + while ((node = node->GetNext())) +#endif // !wxUSE_STD_CONTAINERS + + { + p = node->GetData(); + x1 = x2; + y1 = y2; + x2 = p->x; + y2 = p->y; + wxCoord cx4 = (x1 + x2) / 2; + wxCoord cy4 = (y1 + y2) / 2; + + path.AddQuadCurveToPoint(x1 , y1 ,cx4 , cy4 ); + + cx1 = cx4; + cy1 = cy4; + } + + path.AddLineToPoint( x2 , y2 ); + + m_graphicContext->StrokePath( path ); +} +#endif // wxUSE_SPLINES + +void wxGCDCImpl::DoDrawPolygon( int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle ) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawPolygon - invalid DC") ); + + if ( n <= 0 || (m_brush.GetStyle() == wxTRANSPARENT && m_pen.GetStyle() == wxTRANSPARENT ) ) + return; + if ( !m_logicalFunctionSupported ) + return; + + bool closeIt = false; + if (points[n-1] != points[0]) + closeIt = true; + + wxPoint2DDouble* pointsD = new wxPoint2DDouble[n+(closeIt?1:0)]; + for( int i = 0; i < n; ++i) + { + pointsD[i].m_x = points[i].x + xoffset; + pointsD[i].m_y = points[i].y + yoffset; + } + if ( closeIt ) + pointsD[n] = pointsD[0]; + + m_graphicContext->DrawLines( n+(closeIt?1:0) , pointsD, fillStyle); + delete[] pointsD; +} + +void wxGCDCImpl::DoDrawPolyPolygon(int n, + const int count[], + const wxPoint points[], + wxCoord xoffset, + wxCoord yoffset, + wxPolygonFillMode fillStyle) +{ + wxASSERT(n > 1); + wxGraphicsPath path = m_graphicContext->CreatePath(); + + int i = 0; + for ( int j = 0; j < n; ++j) + { + wxPoint start = points[i]; + path.MoveToPoint( start.x+ xoffset, start.y+ yoffset); + ++i; + int l = count[j]; + for ( int k = 1; k < l; ++k) + { + path.AddLineToPoint( points[i].x+ xoffset, points[i].y+ yoffset); + ++i; + } + // close the polygon + if ( start != points[i-1]) + path.AddLineToPoint( start.x+ xoffset, start.y+ yoffset); + } + m_graphicContext->DrawPath( path , fillStyle); +} + +void wxGCDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawRectangle - invalid DC") ); + + if ( !m_logicalFunctionSupported ) + return; + + // CMB: draw nothing if transformed w or h is 0 + if (w == 0 || h == 0) + return; + + if ( m_graphicContext->ShouldOffset() ) + { + // if we are offsetting the entire rectangle is moved 0.5, so the + // border line gets off by 1 + w -= 1; + h -= 1; + } + m_graphicContext->DrawRectangle(x,y,w,h); +} + +void wxGCDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y, + wxCoord w, wxCoord h, + double radius) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawRoundedRectangle - invalid DC") ); + + if ( !m_logicalFunctionSupported ) + return; + + if (radius < 0.0) + radius = - radius * ((w < h) ? w : h); + + // CMB: draw nothing if transformed w or h is 0 + if (w == 0 || h == 0) + return; + + if ( m_graphicContext->ShouldOffset() ) + { + // if we are offsetting the entire rectangle is moved 0.5, so the + // border line gets off by 1 + w -= 1; + h -= 1; + } + m_graphicContext->DrawRoundedRectangle( x,y,w,h,radius); +} + +void wxGCDCImpl::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord w, wxCoord h) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawEllipse - invalid DC") ); + + if ( !m_logicalFunctionSupported ) + return; + + if ( m_graphicContext->ShouldOffset() ) + { + // if we are offsetting the entire rectangle is moved 0.5, so the + // border line gets off by 1 + w -= 1; + h -= 1; + } + m_graphicContext->DrawEllipse(x,y,w,h); +} + +bool wxGCDCImpl::CanDrawBitmap() const +{ + return true; +} + +bool wxGCDCImpl::DoBlit( + wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode logical_func , bool useMask, + wxCoord xsrcMask, wxCoord ysrcMask ) +{ + return DoStretchBlit( xdest, ydest, width, height, + source, xsrc, ysrc, width, height, logical_func, useMask, + xsrcMask,ysrcMask ); +} + +bool wxGCDCImpl::DoStretchBlit( + wxCoord xdest, wxCoord ydest, wxCoord dstWidth, wxCoord dstHeight, + wxDC *source, wxCoord xsrc, wxCoord ysrc, wxCoord srcWidth, wxCoord srcHeight, + wxRasterOperationMode logical_func , bool useMask, + wxCoord xsrcMask, wxCoord ysrcMask ) +{ + wxCHECK_MSG( IsOk(), false, wxT("wxGCDC(cg)::DoStretchBlit - invalid DC") ); + wxCHECK_MSG( source->IsOk(), false, wxT("wxGCDC(cg)::DoStretchBlit - invalid source DC") ); + + if ( logical_func == wxNO_OP ) + return true; + + wxCompositionMode mode = TranslateRasterOp(logical_func); + if ( mode == wxCOMPOSITION_INVALID ) + { + wxFAIL_MSG( wxT("Blitting is not supported with this logical operation.") ); + return false; + } + + wxRect subrect(source->LogicalToDeviceX(xsrc), + source->LogicalToDeviceY(ysrc), + source->LogicalToDeviceXRel(srcWidth), + source->LogicalToDeviceYRel(srcHeight)); + const wxRect subrectOrig = subrect; + // clip the subrect down to the size of the source DC + wxRect clip; + source->GetSize(&clip.width, &clip.height); + subrect.Intersect(clip); + if (subrect.width == 0) + return true; + + bool retval = true; + + wxCompositionMode formerMode = m_graphicContext->GetCompositionMode(); + if (m_graphicContext->SetCompositionMode(mode)) + { + wxAntialiasMode formerAa = m_graphicContext->GetAntialiasMode(); + if (mode == wxCOMPOSITION_XOR) + { + m_graphicContext->SetAntialiasMode(wxANTIALIAS_NONE); + } + + if (xsrcMask == -1 && ysrcMask == -1) + { + xsrcMask = xsrc; + ysrcMask = ysrc; + } + + wxBitmap blit = source->GetAsBitmap( &subrect ); + + if ( blit.IsOk() ) + { + if ( !useMask && blit.GetMask() ) + blit.SetMask(NULL); + + double x = xdest; + double y = ydest; + double w = dstWidth; + double h = dstHeight; + // adjust dest rect if source rect is clipped + if (subrect.width != subrectOrig.width || subrect.height != subrectOrig.height) + { + x += (subrect.x - subrectOrig.x) / double(subrectOrig.width) * dstWidth; + y += (subrect.y - subrectOrig.y) / double(subrectOrig.height) * dstHeight; + w *= double(subrect.width) / subrectOrig.width; + h *= double(subrect.height) / subrectOrig.height; + } + m_graphicContext->DrawBitmap(blit, x, y, w, h); + } + else + { + wxFAIL_MSG( wxT("Cannot Blit. Unable to get contents of DC as bitmap.") ); + retval = false; + } + + if (mode == wxCOMPOSITION_XOR) + { + m_graphicContext->SetAntialiasMode(formerAa); + } + } + // reset composition + m_graphicContext->SetCompositionMode(formerMode); + + return retval; +} + +void wxGCDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, + double angle) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawRotatedText - invalid DC") ); + + if ( text.empty() ) + return; + if ( !m_logicalFunctionSupported ) + return; + + // we test that we have some font because otherwise we should still use the + // "else" part below to avoid that DrawRotatedText(angle = 180) and + // DrawRotatedText(angle = 0) use different fonts (we can't use the default + // font for drawing rotated fonts unfortunately) + if ( (angle == 0.0) && m_font.IsOk() ) + { + DoDrawText(text, x, y); + + // Bounding box already updated by DoDrawText(), no need to do it again. + return; + } + + // Get extent of whole text. + wxCoord w, h, heightLine; + GetOwner()->GetMultiLineTextExtent(text, &w, &h, &heightLine); + + // Compute the shift for the origin of the next line. + const double rad = DegToRad(angle); + const double dx = heightLine * sin(rad); + const double dy = heightLine * cos(rad); + + // Draw all text line by line + const wxArrayString lines = wxSplit(text, '\n', '\0'); + for ( size_t lineNum = 0; lineNum < lines.size(); lineNum++ ) + { + // Calculate origin for each line to avoid accumulation of + // rounding errors. + if ( m_backgroundMode == wxTRANSPARENT ) + m_graphicContext->DrawText( lines[lineNum], x + wxRound(lineNum*dx), y + wxRound(lineNum*dy), DegToRad(angle )); + else + m_graphicContext->DrawText( lines[lineNum], x + wxRound(lineNum*dx), y + wxRound(lineNum*dy), DegToRad(angle ), m_graphicContext->CreateBrush(m_textBackgroundColour) ); + } + + // call the bounding box by adding all four vertices of the rectangle + // containing the text to it (simpler and probably not slower than + // determining which of them is really topmost/leftmost/...) + + // "upper left" and "upper right" + CalcBoundingBox(x, y); + CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(w*sin(rad))); + + // "bottom left" and "bottom right" + x += (wxCoord)(h*sin(rad)); + y += (wxCoord)(h*cos(rad)); + CalcBoundingBox(x, y); + CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(w*sin(rad))); +} + +void wxGCDCImpl::DoDrawText(const wxString& str, wxCoord x, wxCoord y) +{ + // For compatibility with other ports (notably wxGTK) and because it's + // genuinely useful, we allow passing multiline strings to DrawText(). + // However there is no native OSX function to draw them directly so we + // instead reuse the generic DrawLabel() method to render them. Of course, + // DrawLabel() itself will call back to us but with single line strings + // only so there won't be any infinite recursion here. + if ( str.find('\n') != wxString::npos ) + { + GetOwner()->DrawLabel(str, wxRect(x, y, 0, 0)); + return; + } + + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawText - invalid DC") ); + + if ( str.empty() ) + return; + + if ( !m_logicalFunctionSupported ) + return; + + if ( m_backgroundMode == wxTRANSPARENT ) + m_graphicContext->DrawText( str, x ,y); + else + m_graphicContext->DrawText( str, x ,y , m_graphicContext->CreateBrush( wxBrush(m_textBackgroundColour,wxSOLID) ) ); +} + +bool wxGCDCImpl::CanGetTextExtent() const +{ + wxCHECK_MSG( IsOk(), false, wxT("wxGCDC(cg)::CanGetTextExtent - invalid DC") ); + + return true; +} + +void wxGCDCImpl::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *height, + wxCoord *descent, wxCoord *externalLeading , + const wxFont *theFont ) const +{ + wxCHECK_RET( m_graphicContext, wxT("wxGCDC(cg)::DoGetTextExtent - invalid DC") ); + + if ( theFont ) + { + m_graphicContext->SetFont( *theFont, m_textForegroundColour ); + } + + wxDouble h , d , e , w; + + m_graphicContext->GetTextExtent( str, &w, &h, &d, &e ); + + if ( height ) + *height = (wxCoord)(h+0.5); + if ( descent ) + *descent = (wxCoord)(d+0.5); + if ( externalLeading ) + *externalLeading = (wxCoord)(e+0.5); + if ( width ) + *width = (wxCoord)(w+0.5); + + if ( theFont ) + { + m_graphicContext->SetFont( m_font, m_textForegroundColour ); + } +} + +bool wxGCDCImpl::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const +{ + wxCHECK_MSG( m_graphicContext, false, wxT("wxGCDC(cg)::DoGetPartialTextExtents - invalid DC") ); + widths.Clear(); + widths.Add(0,text.Length()); + if ( text.IsEmpty() ) + return true; + + wxArrayDouble widthsD; + + m_graphicContext->GetPartialTextExtents( text, widthsD ); + for ( size_t i = 0; i < widths.GetCount(); ++i ) + widths[i] = (wxCoord)(widthsD[i] + 0.5); + + return true; +} + +wxCoord wxGCDCImpl::GetCharWidth(void) const +{ + wxCoord width; + DoGetTextExtent( wxT("g") , &width , NULL , NULL , NULL , NULL ); + + return width; +} + +wxCoord wxGCDCImpl::GetCharHeight(void) const +{ + wxCoord height; + DoGetTextExtent( wxT("g") , NULL , &height , NULL , NULL , NULL ); + + return height; +} + +void wxGCDCImpl::Clear(void) +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::Clear - invalid DC") ); + // TODO better implementation / incorporate size info into wxGCDC or context + m_graphicContext->SetBrush( m_backgroundBrush ); + wxPen p = *wxTRANSPARENT_PEN; + m_graphicContext->SetPen( p ); + wxCompositionMode formerMode = m_graphicContext->GetCompositionMode(); + m_graphicContext->SetCompositionMode(wxCOMPOSITION_SOURCE); + // maximum positive coordinate Cairo can handle is 2^23 - 1 + DoDrawRectangle( + DeviceToLogicalX(0), DeviceToLogicalY(0), + DeviceToLogicalXRel(0x007fffff), DeviceToLogicalYRel(0x007fffff)); + m_graphicContext->SetCompositionMode(formerMode); + m_graphicContext->SetPen( m_pen ); + m_graphicContext->SetBrush( m_brush ); +} + +void wxGCDCImpl::DoGetSize(int *width, int *height) const +{ + wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoGetSize - invalid DC") ); + wxDouble w,h; + m_graphicContext->GetSize( &w, &h ); + if ( height ) + *height = (int) (h+0.5); + if ( width ) + *width = (int) (w+0.5); +} + +void wxGCDCImpl::DoGradientFillLinear(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour, + wxDirection nDirection ) +{ + wxPoint start; + wxPoint end; + switch( nDirection) + { + case wxWEST : + start = rect.GetRightBottom(); + start.x++; + end = rect.GetLeftBottom(); + break; + case wxEAST : + start = rect.GetLeftBottom(); + end = rect.GetRightBottom(); + end.x++; + break; + case wxNORTH : + start = rect.GetLeftBottom(); + start.y++; + end = rect.GetLeftTop(); + break; + case wxSOUTH : + start = rect.GetLeftTop(); + end = rect.GetLeftBottom(); + end.y++; + break; + default : + break; + } + + if (rect.width == 0 || rect.height == 0) + return; + + m_graphicContext->SetBrush( m_graphicContext->CreateLinearGradientBrush( + start.x,start.y,end.x,end.y, initialColour, destColour)); + m_graphicContext->SetPen(*wxTRANSPARENT_PEN); + m_graphicContext->DrawRectangle(rect.x,rect.y,rect.width,rect.height); + m_graphicContext->SetPen(m_pen); + m_graphicContext->SetBrush(m_brush); +} + +void wxGCDCImpl::DoGradientFillConcentric(const wxRect& rect, + const wxColour& initialColour, + const wxColour& destColour, + const wxPoint& circleCenter) +{ + //Radius + wxInt32 cx = rect.GetWidth() / 2; + wxInt32 cy = rect.GetHeight() / 2; + wxInt32 nRadius; + if (cx < cy) + nRadius = cx; + else + nRadius = cy; + + // make sure the background is filled (todo move into specific platform implementation ?) + m_graphicContext->SetPen(*wxTRANSPARENT_PEN); + m_graphicContext->SetBrush( wxBrush( destColour) ); + m_graphicContext->DrawRectangle(rect.x,rect.y,rect.width,rect.height); + + m_graphicContext->SetBrush( m_graphicContext->CreateRadialGradientBrush( + rect.x+circleCenter.x,rect.y+circleCenter.y, + rect.x+circleCenter.x,rect.y+circleCenter.y, + nRadius,initialColour,destColour)); + + m_graphicContext->DrawRectangle(rect.x,rect.y,rect.width,rect.height); + m_graphicContext->SetPen(m_pen); + m_graphicContext->SetBrush(m_brush); +} + +void wxGCDCImpl::DoDrawCheckMark(wxCoord x, wxCoord y, + wxCoord width, wxCoord height) +{ + wxDCImpl::DoDrawCheckMark(x,y,width,height); +} + +#ifdef __WXMSW__ +wxRect wxGCDCImpl::MSWApplyGDIPlusTransform(const wxRect& r) const +{ + wxGraphicsContext* const gc = GetGraphicsContext(); + wxCHECK_MSG( gc, r, wxT("Invalid wxGCDC") ); + + double x = 0, + y = 0; + gc->GetTransform().TransformPoint(&x, &y); + + wxRect rect(r); + rect.Offset(x, y); + + return rect; +} +#endif // __WXMSW__ + +#endif // wxUSE_GRAPHICS_CONTEXT diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/dcsvg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/dcsvg.cpp new file mode 100644 index 0000000000..5c55a0b935 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/dcsvg.cpp @@ -0,0 +1,741 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/svg.cpp +// Purpose: SVG sample +// Author: Chris Elliott +// Modified by: +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#if wxUSE_SVG + +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" + #include "wx/dcscreen.h" + #include "wx/icon.h" + #include "wx/image.h" +#endif + +#include "wx/dcsvg.h" +#include "wx/wfstream.h" +#include "wx/filename.h" + +#include "wx/private/markupparser.h" + +// ---------------------------------------------------------- +// Global utilities +// ---------------------------------------------------------- + +namespace +{ + +inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; } + +// This function returns a string representation of a floating point number in +// C locale (i.e. always using "." for the decimal separator) and with the +// fixed precision (which is 2 for some unknown reason but this is what it was +// in this code originally). +inline wxString NumStr(double f) +{ + return wxString::FromCDouble(f, 2); +} + +// Return the colour representation as HTML-like "#rrggbb" string and also +// returns its alpha as opacity number in 0..1 range. +wxString Col2SVG(wxColour c, float *opacity) +{ + if ( c.Alpha() != wxALPHA_OPAQUE ) + { + *opacity = c.Alpha()/255.; + + // Remove the alpha before using GetAsString(wxC2S_HTML_SYNTAX) as it + // doesn't support colours with alpha channel. + c = wxColour(c.GetRGB()); + } + else // No alpha. + { + *opacity = 1.; + } + + return c.GetAsString(wxC2S_HTML_SYNTAX); +} + +wxString wxPenString(wxColour c, int style = wxPENSTYLE_SOLID) +{ + float opacity; + wxString s = wxT("stroke:") + Col2SVG(c, &opacity) + wxT("; "); + + switch ( style ) + { + case wxPENSTYLE_SOLID: + s += wxString::Format(wxT("stroke-opacity:%s; "), NumStr(opacity)); + break; + case wxPENSTYLE_TRANSPARENT: + s += wxT("stroke-opacity:0.0; "); + break; + default : + wxASSERT_MSG(false, wxT("wxSVGFileDC::Requested Pen Style not available")); + } + + return s; +} + +wxString wxBrushString(wxColour c, int style = wxBRUSHSTYLE_SOLID) +{ + float opacity; + wxString s = wxT("fill:") + Col2SVG(c, &opacity) + wxT("; "); + + switch ( style ) + { + case wxBRUSHSTYLE_SOLID: + s += wxString::Format(wxT("fill-opacity:%s; "), NumStr(opacity)); + break; + case wxBRUSHSTYLE_TRANSPARENT: + s += wxT("fill-opacity:0.0; "); + break; + default : + wxASSERT_MSG(false, wxT("wxSVGFileDC::Requested Brush Style not available")); + } + + return s; +} + +} // anonymous namespace + +// ---------------------------------------------------------- +// wxSVGFileDCImpl +// ---------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxSVGFileDCImpl, wxDC) + +wxSVGFileDCImpl::wxSVGFileDCImpl( wxSVGFileDC *owner, const wxString &filename, + int width, int height, double dpi ) : + wxDCImpl( owner ) + { + Init( filename, width, height, dpi ); + } + +void wxSVGFileDCImpl::Init (const wxString &filename, int Width, int Height, double dpi) +{ + m_width = Width; + m_height = Height; + + m_dpi = dpi; + + m_OK = true; + + m_clipUniqueId = 0; + m_clipNestingLevel = 0; + + m_mm_to_pix_x = dpi/25.4; + m_mm_to_pix_y = dpi/25.4; + + m_backgroundBrush = *wxTRANSPARENT_BRUSH; + m_textForegroundColour = *wxBLACK; + m_textBackgroundColour = *wxWHITE; + m_colour = wxColourDisplay(); + + m_pen = *wxBLACK_PEN; + m_font = *wxNORMAL_FONT; + m_brush = *wxWHITE_BRUSH; + + m_graphics_changed = true; + + ////////////////////code here + + m_outfile = new wxFileOutputStream(filename); + m_OK = m_outfile->IsOk(); + if (m_OK) + { + m_filename = filename; + m_sub_images = 0; + wxString s; + s = wxT("\n"); + write(s); + s = wxT("\n"); + write(s); + s = wxT("\n"), NumStr(float(Width)/dpi*2.54), NumStr(float(Height)/dpi*2.54), Width, Height ); + write(s); + s = wxT("SVG Picture created as ") + wxFileName(filename).GetFullName() + wxT(" \n"); + write(s); + s = wxString (wxT("Picture generated by wxSVG ")) + wxSVGVersion + wxT(" \n"); + write(s); + s = wxT("\n"); + write(s); + } +} + +wxSVGFileDCImpl::~wxSVGFileDCImpl() +{ + wxString s = wxT(" \n \n"); + write(s); + delete m_outfile; +} + +void wxSVGFileDCImpl::DoGetSizeMM( int *width, int *height ) const +{ + if (width) + *width = wxRound( (double)m_width / m_mm_to_pix_x ); + + if (height) + *height = wxRound( (double)m_height / m_mm_to_pix_y ); +} + +wxSize wxSVGFileDCImpl::GetPPI() const +{ + return wxSize( wxRound(m_dpi), wxRound(m_dpi) ); +} + +void wxSVGFileDCImpl::DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) +{ + NewGraphicsIfNeeded(); + wxString s; + s.Printf ( wxT(" \n"), x1,y1,x2,y2 ); + if (m_OK) + { + write(s); + } + CalcBoundingBox(x1, y1); + CalcBoundingBox(x2, y2); +} + +void wxSVGFileDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset , wxCoord yoffset ) +{ + for ( int i = 1; i < n; i++ ) + { + DoDrawLine ( points [i-1].x + xoffset, points [i-1].y + yoffset, + points [ i ].x + xoffset, points [ i ].y + yoffset ); + } +} + +void wxSVGFileDCImpl::DoDrawPoint (wxCoord x1, wxCoord y1) +{ + wxString s; + NewGraphicsIfNeeded(); + s = wxT(" \n"); + write(s); + DoDrawLine ( x1,y1,x1,y1 ); + s = wxT(""); + write(s); +} + +void wxSVGFileDCImpl::DoDrawCheckMark(wxCoord x1, wxCoord y1, wxCoord width, wxCoord height) +{ + wxDCImpl::DoDrawCheckMark (x1,y1,width,height); +} + +void wxSVGFileDCImpl::DoDrawText(const wxString& text, wxCoord x1, wxCoord y1) +{ + DoDrawRotatedText(text, x1,y1,0.0); +} + +void wxSVGFileDCImpl::DoDrawRotatedText(const wxString& sText, wxCoord x, wxCoord y, double angle) +{ + //known bug; if the font is drawn in a scaled DC, it will not behave exactly as wxMSW + NewGraphicsIfNeeded(); + wxString s, sTmp; + + // calculate bounding box + wxCoord w, h, desc; + DoGetTextExtent(sText, &w, &h, &desc); + + double rad = DegToRad(angle); + + // wxT("upper left") and wxT("upper right") + CalcBoundingBox(x, y); + CalcBoundingBox((wxCoord)(x + w*cos(rad)), (wxCoord)(y - h*sin(rad))); + + // wxT("bottom left") and wxT("bottom right") + CalcBoundingBox((wxCoord)(x + h*sin(rad)), (wxCoord)(y + h*cos(rad))); + CalcBoundingBox((wxCoord)(x + h*sin(rad) + w*cos(rad)), (wxCoord)(y + h*cos(rad) - w*sin(rad))); + + if (m_backgroundMode == wxBRUSHSTYLE_SOLID) + { + // draw background first + // just like DoDrawRectangle except we pass the text color to it and set the border to a 1 pixel wide text background + + sTmp.Printf ( wxT(" "), NumStr(-angle), x,y ); + s += sTmp + wxT("\n"); + write(s); + } + + // convert x,y to SVG text x,y (the coordinates of the text baseline) + x = (wxCoord)(x + (h-desc)*sin(rad)); + y = (wxCoord)(y + (h-desc)*cos(rad)); + + //now do the text itself + s.Printf (wxT(" 0) s += wxT("style=\"font-family:") + sTmp + wxT("; "); + else s += wxT("style=\" "); + + wxString fontweights [3] = { wxT("normal"), wxT("lighter"), wxT("bold") }; + s += wxT("font-weight:") + fontweights[m_font.GetWeight() - wxNORMAL] + wxT("; "); + + wxString fontstyles [5] = { wxT("normal"), wxT("style error"), wxT("style error"), wxT("italic"), wxT("oblique") }; + s += wxT("font-style:") + fontstyles[m_font.GetStyle() - wxNORMAL] + wxT("; "); + + sTmp.Printf (wxT("font-size:%dpt; "), m_font.GetPointSize() ); + s += sTmp; + //text will be solid, unless alpha value isn't opaque in the foreground colour + s += wxBrushString(m_textForegroundColour) + wxPenString(m_textForegroundColour); + sTmp.Printf ( wxT("stroke-width:0;\" transform=\"rotate( %s %d %d ) \" >"), NumStr(-angle), x,y ); + s += sTmp + wxMarkupParser::Quote(sText) + wxT(" ") + wxT("\n"); + if (m_OK) + { + write(s); + } +} + +void wxSVGFileDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) +{ + DoDrawRoundedRectangle(x, y, width, height, 0); +} + +void wxSVGFileDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius ) + +{ + NewGraphicsIfNeeded(); + wxString s; + + s.Printf ( wxT(" \n"); + write(s); + + CalcBoundingBox(x, y); + CalcBoundingBox(x + width, y + height); +} + +void wxSVGFileDCImpl::DoDrawPolygon(int n, const wxPoint points[], + wxCoord xoffset, wxCoord yoffset, + wxPolygonFillMode fillStyle) +{ + NewGraphicsIfNeeded(); + wxString s, sTmp; + s = wxT(" \n"); + write(s); +} + +void wxSVGFileDCImpl::DoDrawEllipse (wxCoord x, wxCoord y, wxCoord width, wxCoord height) + +{ + NewGraphicsIfNeeded(); + + int rh = height /2; + int rw = width /2; + + wxString s; + s.Printf ( wxT(" \n"); + + write(s); + + CalcBoundingBox(x, y); + CalcBoundingBox(x + width, y + height); +} + +void wxSVGFileDCImpl::DoDrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc) +{ + /* Draws an arc of a circle, centred on (xc, yc), with starting point + (x1, y1) and ending at (x2, y2). The current pen is used for the outline + and the current brush for filling the shape. + + The arc is drawn in an anticlockwise direction from the start point to + the end point. + + Might be better described as Pie drawing */ + + NewGraphicsIfNeeded(); + wxString s; + + // we need the radius of the circle which has two estimates + double r1 = sqrt ( double( (x1-xc)*(x1-xc) ) + double( (y1-yc)*(y1-yc) ) ); + double r2 = sqrt ( double( (x2-xc)*(x2-xc) ) + double( (y2-yc)*(y2-yc) ) ); + + wxASSERT_MSG( (fabs ( r2-r1 ) <= 3), wxT("wxSVGFileDC::DoDrawArc Error in getting radii of circle")); + if ( fabs ( r2-r1 ) > 3 ) //pixels + { + s = wxT(" \n"); + write(s); + } + + double theta1 = atan2((double)(yc-y1),(double)(x1-xc)); + if ( theta1 < 0 ) theta1 = theta1 + M_PI * 2; + double theta2 = atan2((double)(yc-y2), (double)(x2-xc)); + if ( theta2 < 0 ) theta2 = theta2 + M_PI * 2; + if ( theta2 < theta1 ) theta2 = theta2 + M_PI *2; + + int fArc; // flag for large or small arc 0 means less than 180 degrees + if ( fabs(theta2 - theta1) > M_PI ) fArc = 1; else fArc = 0; + + int fSweep = 0; // flag for sweep always 0 + + s.Printf ( wxT(" \n"); + + + if (m_OK) + { + write(s); + } +} + +void wxSVGFileDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea) +{ + /* + Draws an arc of an ellipse. The current pen is used for drawing the arc + and the current brush is used for drawing the pie. This function is + currently only available for X window and PostScript device contexts. + + x and y specify the x and y coordinates of the upper-left corner of the + rectangle that contains the ellipse. + + width and height specify the width and height of the rectangle that + contains the ellipse. + + start and end specify the start and end of the arc relative to the + three-o'clock position from the center of the rectangle. Angles are + specified in degrees (360 is a complete circle). Positive values mean + counter-clockwise motion. If start is equal to end, a complete ellipse + will be drawn. */ + + //known bug: SVG draws with the current pen along the radii, but this does not happen in wxMSW + + NewGraphicsIfNeeded(); + + wxString s; + //radius + double rx = w / 2; + double ry = h / 2; + // center + double xc = x + rx; + double yc = y + ry; + + double xs, ys, xe, ye; + xs = xc + rx * cos (DegToRad(sa)); + xe = xc + rx * cos (DegToRad(ea)); + ys = yc - ry * sin (DegToRad(sa)); + ye = yc - ry * sin (DegToRad(ea)); + + ///now same as circle arc... + + double theta1 = atan2(ys-yc, xs-xc); + double theta2 = atan2(ye-yc, xe-xc); + + int fArc; // flag for large or small arc 0 means less than 180 degrees + if ( (theta2 - theta1) > 0 ) fArc = 1; else fArc = 0; + + int fSweep; + if ( fabs(theta2 - theta1) > M_PI) fSweep = 1; else fSweep = 0; + + s.Printf ( wxT(" \n"); + + if (m_OK) + { + write(s); + } +} + +void wxSVGFileDCImpl::DoSetClippingRegion( int x, int y, int width, int height ) +{ + wxString svg; + + // End current graphics group to ensure proper xml nesting (e.g. so that + // graphics can be subsequently changed inside the clipping region) + svg << "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n"; + + write(svg); + + // Re-apply current graphics to ensure proper xml nesting + DoStartNewGraphics(); + + m_clipUniqueId++; + m_clipNestingLevel++; +} + +void wxSVGFileDCImpl::DestroyClippingRegion() +{ + wxString svg; + + // End current graphics element to ensure proper xml nesting (e.g. graphics + // might have been changed inside the clipping region) + svg << "\n"; + + // Close clipping group elements + for ( size_t i = 0; i < m_clipUniqueId; i++ ) + { + svg << ""; + } + svg << "\n"; + + write(svg); + + // Re-apply current graphics (e.g. brush may have been changed inside one + // of the clipped regions - that change will have been lost after xml + // elements for the clipped region have been closed). + DoStartNewGraphics(); + + m_clipUniqueId = 0; +} + +void wxSVGFileDCImpl::DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent , wxCoord *externalLeading , const wxFont *font) const + +{ + wxScreenDC sDC; + + sDC.SetFont (m_font); + if ( font != NULL ) sDC.SetFont ( *font ); + sDC.GetTextExtent(string, w, h, descent, externalLeading ); +} + +wxCoord wxSVGFileDCImpl::GetCharHeight() const +{ + wxScreenDC sDC; + sDC.SetFont (m_font); + + return sDC.GetCharHeight(); + +} + +wxCoord wxSVGFileDCImpl::GetCharWidth() const +{ + wxScreenDC sDC; + sDC.SetFont (m_font); + + return sDC.GetCharWidth(); +} + + +// ---------------------------------------------------------- +// wxSVGFileDCImpl - set functions +// ---------------------------------------------------------- + +void wxSVGFileDCImpl::SetBackground( const wxBrush &brush ) +{ + m_backgroundBrush = brush; +} + + +void wxSVGFileDCImpl::SetBackgroundMode( int mode ) +{ + m_backgroundMode = mode; +} + + +void wxSVGFileDCImpl::SetBrush(const wxBrush& brush) +{ + m_brush = brush; + + m_graphics_changed = true; +} + + +void wxSVGFileDCImpl::SetPen(const wxPen& pen) +{ + // width, color, ends, joins : currently implemented + // dashes, stipple : not implemented + m_pen = pen; + + m_graphics_changed = true; +} + +void wxSVGFileDCImpl::NewGraphicsIfNeeded() +{ + if ( !m_graphics_changed ) + return; + + m_graphics_changed = false; + + write(wxS("\n")); + + DoStartNewGraphics(); +} + +void wxSVGFileDCImpl::DoStartNewGraphics() +{ + wxString s, sBrush, sPenCap, sPenJoin, sPenStyle, sLast; + + sBrush = wxS(""), + m_pen.GetWidth(), NumStr(m_logicalOriginX), NumStr(m_logicalOriginY), NumStr(m_scaleX), NumStr(m_scaleY) ); + + s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + wxT("\n"); + write(s); +} + + +void wxSVGFileDCImpl::SetFont(const wxFont& font) + +{ + m_font = font; +} + +// export a bitmap as a raster image in png +bool wxSVGFileDCImpl::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, + wxDC* source, wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode logicalFunc /*= wxCOPY*/, bool useMask /*= false*/, + wxCoord /*xsrcMask = -1*/, wxCoord /*ysrcMask = -1*/) +{ + if (logicalFunc != wxCOPY) + { + wxASSERT_MSG(false, wxT("wxSVGFileDC::DoBlit Call requested nonCopy mode; this is not possible")); + return false; + } + if (useMask != false) + { + wxASSERT_MSG(false, wxT("wxSVGFileDC::DoBlit Call requested false mask; this is not possible")); + return false; + } + wxBitmap myBitmap (width, height); + wxMemoryDC memDC; + memDC.SelectObject( myBitmap ); + memDC.Blit(0, 0, width, height, source, xsrc, ysrc); + memDC.SelectObject( wxNullBitmap ); + DoDrawBitmap(myBitmap, xdest, ydest); + return false; +} + +void wxSVGFileDCImpl::DoDrawIcon(const class wxIcon & myIcon, wxCoord x, wxCoord y) +{ + wxBitmap myBitmap (myIcon.GetWidth(), myIcon.GetHeight() ); + wxMemoryDC memDC; + memDC.SelectObject( myBitmap ); + memDC.DrawIcon(myIcon,0,0); + memDC.SelectObject( wxNullBitmap ); + DoDrawBitmap(myBitmap, x, y); +} + +void wxSVGFileDCImpl::DoDrawBitmap(const class wxBitmap & bmp, wxCoord x, wxCoord y , bool WXUNUSED(bTransparent) /*=0*/ ) +{ + NewGraphicsIfNeeded(); + + wxString sTmp, s, sPNG; + if ( wxImage::FindHandler(wxBITMAP_TYPE_PNG) == NULL ) + wxImage::AddHandler(new wxPNGHandler); + +// create suitable file name + sTmp.Printf ( wxT("_image%d.png"), m_sub_images); + sPNG = m_filename.BeforeLast(wxT('.')) + sTmp; + while (wxFile::Exists(sPNG) ) + { + m_sub_images ++; + sTmp.Printf ( wxT("_image%d.png"), m_sub_images); + sPNG = m_filename.BeforeLast(wxT('.')) + sTmp; + } + +//create copy of bitmap (wxGTK doesn't like saving a constant bitmap) + wxBitmap myBitmap = bmp; +//save it + bool bPNG_OK = myBitmap.SaveFile(sPNG,wxBITMAP_TYPE_PNG); + +// reference the bitmap from the SVG doc +// only use filename & ext + sPNG = sPNG.AfterLast(wxFileName::GetPathSeparator()); + +// reference the bitmap from the SVG doc + int w = myBitmap.GetWidth(); + int h = myBitmap.GetHeight(); + sTmp.Printf ( wxT(" \n"), sPNG.c_str() ); + s += sTmp + wxT("Image from wxSVG ") + wxT("\n"); + + if (m_OK && bPNG_OK) + { + write(s); + } + m_OK = m_outfile->IsOk() && bPNG_OK; +} + +void wxSVGFileDCImpl::write(const wxString &s) +{ + const wxCharBuffer buf = s.utf8_str(); + m_outfile->Write(buf, strlen((const char *)buf)); + m_OK = m_outfile->IsOk(); +} + + +#ifdef __BORLANDC__ +#pragma warn .rch +#pragma warn .ccc +#endif + +#endif // wxUSE_SVG + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/debugrpt.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/debugrpt.cpp new file mode 100644 index 0000000000..7f3c5fba07 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/debugrpt.cpp @@ -0,0 +1,751 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/debugrpt.cpp +// Purpose: wxDebugReport and related classes implementation +// Author: Vadim Zeitlin +// Modified by: +// Created: 2005-01-17 +// Copyright: (c) 2005 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/utils.h" +#endif // WX_PRECOMP + +#if wxUSE_DEBUGREPORT && wxUSE_XML + +#include "wx/debugrpt.h" +#if wxUSE_FFILE + #include "wx/ffile.h" +#elif wxUSE_FILE + #include "wx/file.h" +#endif + +#include "wx/filename.h" +#include "wx/dir.h" +#include "wx/dynlib.h" + +#include "wx/xml/xml.h" + +#if wxUSE_STACKWALKER + #include "wx/stackwalk.h" +#endif + +#if wxUSE_CRASHREPORT + #include "wx/msw/crashrpt.h" +#endif + +#if wxUSE_ZIPSTREAM + #include "wx/wfstream.h" + #include "wx/zipstrm.h" +#endif // wxUSE_ZIPSTREAM + +WX_CHECK_BUILD_OPTIONS("wxQA") + +// ---------------------------------------------------------------------------- +// XmlStackWalker: stack walker specialization which dumps stack in XML +// ---------------------------------------------------------------------------- + +#if wxUSE_STACKWALKER + +class XmlStackWalker : public wxStackWalker +{ +public: + XmlStackWalker(wxXmlNode *nodeStack) + { + m_isOk = false; + m_nodeStack = nodeStack; + } + + bool IsOk() const { return m_isOk; } + +protected: + virtual void OnStackFrame(const wxStackFrame& frame); + + wxXmlNode *m_nodeStack; + bool m_isOk; +}; + +// ---------------------------------------------------------------------------- +// local functions +// ---------------------------------------------------------------------------- + +static inline void +HexProperty(wxXmlNode *node, const wxChar *name, unsigned long value) +{ + node->AddAttribute(name, wxString::Format(wxT("%08lx"), value)); +} + +static inline void +NumProperty(wxXmlNode *node, const wxChar *name, unsigned long value) +{ + node->AddAttribute(name, wxString::Format(wxT("%lu"), value)); +} + +static inline void +TextElement(wxXmlNode *node, const wxChar *name, const wxString& value) +{ + wxXmlNode *nodeChild = new wxXmlNode(wxXML_ELEMENT_NODE, name); + node->AddChild(nodeChild); + nodeChild->AddChild(new wxXmlNode(wxXML_TEXT_NODE, wxEmptyString, value)); +} + +#if wxUSE_CRASHREPORT && defined(__INTEL__) + +static inline void +HexElement(wxXmlNode *node, const wxChar *name, unsigned long value) +{ + TextElement(node, name, wxString::Format(wxT("%08lx"), value)); +} + +#endif // wxUSE_CRASHREPORT + +// ============================================================================ +// XmlStackWalker implementation +// ============================================================================ + +void XmlStackWalker::OnStackFrame(const wxStackFrame& frame) +{ + m_isOk = true; + + wxXmlNode *nodeFrame = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("frame")); + m_nodeStack->AddChild(nodeFrame); + + NumProperty(nodeFrame, wxT("level"), frame.GetLevel()); + wxString func = frame.GetName(); + if ( !func.empty() ) + { + nodeFrame->AddAttribute(wxT("function"), func); + HexProperty(nodeFrame, wxT("offset"), frame.GetOffset()); + } + + if ( frame.HasSourceLocation() ) + { + nodeFrame->AddAttribute(wxT("file"), frame.GetFileName()); + NumProperty(nodeFrame, wxT("line"), frame.GetLine()); + } + + const size_t nParams = frame.GetParamCount(); + if ( nParams ) + { + wxXmlNode *nodeParams = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("parameters")); + nodeFrame->AddChild(nodeParams); + + for ( size_t n = 0; n < nParams; n++ ) + { + wxXmlNode * + nodeParam = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("parameter")); + nodeParams->AddChild(nodeParam); + + NumProperty(nodeParam, wxT("number"), n); + + wxString type, name, value; + if ( !frame.GetParam(n, &type, &name, &value) ) + continue; + + if ( !type.empty() ) + TextElement(nodeParam, wxT("type"), type); + + if ( !name.empty() ) + TextElement(nodeParam, wxT("name"), name); + + if ( !value.empty() ) + TextElement(nodeParam, wxT("value"), value); + } + } +} + +#endif // wxUSE_STACKWALKER + +// ============================================================================ +// wxDebugReport implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// initialization and cleanup +// ---------------------------------------------------------------------------- + +wxDebugReport::wxDebugReport() +{ + // get a temporary directory name + wxString appname = GetReportName(); + + // we can't use CreateTempFileName() because it creates a file, not a + // directory, so do our best to create a unique name ourselves + // + // of course, this doesn't protect us against malicious users... +#if wxUSE_DATETIME + m_dir.Printf(wxT("%s%c%s_dbgrpt-%lu-%s"), + wxFileName::GetTempDir(), wxFILE_SEP_PATH, appname, + wxGetProcessId(), + wxDateTime::Now().Format(wxT("%Y%m%dT%H%M%S"))); +#else + m_dir.Printf(wxT("%s%c%s_dbgrpt-%lu"), + wxFileName::GetTempDir(), wxFILE_SEP_PATH, appname, + wxGetProcessId()); +#endif + + // as we are going to save the process state there use restrictive + // permissions + if ( !wxMkdir(m_dir, 0700) ) + { + wxLogSysError(_("Failed to create directory \"%s\""), m_dir.c_str()); + wxLogError(_("Debug report couldn't be created.")); + + Reset(); + } +} + +wxDebugReport::~wxDebugReport() +{ + if ( !m_dir.empty() ) + { + // remove all files in this directory + wxDir dir(m_dir); + wxString file; + for ( bool cont = dir.GetFirst(&file); cont; cont = dir.GetNext(&file) ) + { + if ( wxRemove(wxFileName(m_dir, file).GetFullPath()) != 0 ) + { + wxLogSysError(_("Failed to remove debug report file \"%s\""), + file.c_str()); + m_dir.clear(); + break; + } + } + } + + if ( !m_dir.empty() ) + { + // Temp fix: what should this be? eVC++ doesn't like wxRmDir +#ifdef __WXWINCE__ + if ( wxRmdir(m_dir.fn_str()) != 0 ) +#else + if ( wxRmDir(m_dir.fn_str()) != 0 ) +#endif + { + wxLogSysError(_("Failed to clean up debug report directory \"%s\""), + m_dir.c_str()); + } + } +} + +// ---------------------------------------------------------------------------- +// various helpers +// ---------------------------------------------------------------------------- + +wxString wxDebugReport::GetReportName() const +{ + if ( wxTheApp ) + return wxTheApp->GetAppName(); + + return wxT("wx"); +} + +void +wxDebugReport::AddFile(const wxString& filename, const wxString& description) +{ + wxString name; + wxFileName fn(filename); + if ( fn.IsAbsolute() ) + { + // we need to copy the file to the debug report directory: give it the + // same name there + name = fn.GetFullName(); + + if (!wxCopyFile(fn.GetFullPath(), + wxFileName(GetDirectory(), name).GetFullPath())) + return; + } + else // file relative to the report directory + { + name = filename; + + wxASSERT_MSG( wxFileName(GetDirectory(), name).FileExists(), + wxT("file should exist in debug report directory") ); + } + + m_files.Add(name); + m_descriptions.Add(description); +} + +bool +wxDebugReport::AddText(const wxString& filename, + const wxString& text, + const wxString& description) +{ +#if wxUSE_FFILE || wxUSE_FILE + wxASSERT_MSG( !wxFileName(filename).IsAbsolute(), + wxT("filename should be relative to debug report directory") ); + + const wxString fullPath = wxFileName(GetDirectory(), filename).GetFullPath(); +#if wxUSE_FFILE + wxFFile file(fullPath, wxT("w")); +#elif wxUSE_FILE + wxFile file(fullPath, wxFile::write); +#endif + if ( !file.IsOpened() || !file.Write(text, wxConvAuto()) ) + return false; + + AddFile(filename, description); + + return true; +#else // !wxUSE_FFILE && !wxUSE_FILE + return false; +#endif +} + +void wxDebugReport::RemoveFile(const wxString& name) +{ + const int n = m_files.Index(name); + wxCHECK_RET( n != wxNOT_FOUND, wxT("No such file in wxDebugReport") ); + + m_files.RemoveAt(n); + m_descriptions.RemoveAt(n); + + wxRemove(wxFileName(GetDirectory(), name).GetFullPath()); +} + +bool wxDebugReport::GetFile(size_t n, wxString *name, wxString *desc) const +{ + if ( n >= m_files.GetCount() ) + return false; + + if ( name ) + *name = m_files[n]; + if ( desc ) + *desc = m_descriptions[n]; + + return true; +} + +void wxDebugReport::AddAll(Context context) +{ +#if wxUSE_STACKWALKER + AddContext(context); +#endif // wxUSE_STACKWALKER + +#if wxUSE_CRASHREPORT + AddDump(context); +#endif // wxUSE_CRASHREPORT + +#if !wxUSE_STACKWALKER && !wxUSE_CRASHREPORT + wxUnusedVar(context); +#endif +} + +// ---------------------------------------------------------------------------- +// adding basic text information about current context +// ---------------------------------------------------------------------------- + +#if wxUSE_STACKWALKER + +bool wxDebugReport::DoAddSystemInfo(wxXmlNode *nodeSystemInfo) +{ + nodeSystemInfo->AddAttribute(wxT("description"), wxGetOsDescription()); + + return true; +} + +bool wxDebugReport::DoAddLoadedModules(wxXmlNode *nodeModules) +{ + wxDynamicLibraryDetailsArray modules(wxDynamicLibrary::ListLoaded()); + const size_t count = modules.GetCount(); + if ( !count ) + return false; + + for ( size_t n = 0; n < count; n++ ) + { + const wxDynamicLibraryDetails& info = modules[n]; + + wxXmlNode *nodeModule = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("module")); + nodeModules->AddChild(nodeModule); + + wxString path = info.GetPath(); + if ( path.empty() ) + path = info.GetName(); + if ( !path.empty() ) + nodeModule->AddAttribute(wxT("path"), path); + + void *addr = NULL; + size_t len = 0; + if ( info.GetAddress(&addr, &len) ) + { + HexProperty(nodeModule, wxT("address"), wxPtrToUInt(addr)); + HexProperty(nodeModule, wxT("size"), len); + } + + wxString ver = info.GetVersion(); + if ( !ver.empty() ) + { + nodeModule->AddAttribute(wxT("version"), ver); + } + } + + return true; +} + +bool wxDebugReport::DoAddExceptionInfo(wxXmlNode *nodeContext) +{ +#if wxUSE_CRASHREPORT + wxCrashContext c; + if ( !c.code ) + return false; + + wxXmlNode *nodeExc = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("exception")); + nodeContext->AddChild(nodeExc); + + HexProperty(nodeExc, wxT("code"), c.code); + nodeExc->AddAttribute(wxT("name"), c.GetExceptionString()); + HexProperty(nodeExc, wxT("address"), wxPtrToUInt(c.addr)); + +#ifdef __INTEL__ + wxXmlNode *nodeRegs = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("registers")); + nodeContext->AddChild(nodeRegs); + HexElement(nodeRegs, wxT("eax"), c.regs.eax); + HexElement(nodeRegs, wxT("ebx"), c.regs.ebx); + HexElement(nodeRegs, wxT("ecx"), c.regs.edx); + HexElement(nodeRegs, wxT("edx"), c.regs.edx); + HexElement(nodeRegs, wxT("esi"), c.regs.esi); + HexElement(nodeRegs, wxT("edi"), c.regs.edi); + + HexElement(nodeRegs, wxT("ebp"), c.regs.ebp); + HexElement(nodeRegs, wxT("esp"), c.regs.esp); + HexElement(nodeRegs, wxT("eip"), c.regs.eip); + + HexElement(nodeRegs, wxT("cs"), c.regs.cs); + HexElement(nodeRegs, wxT("ds"), c.regs.ds); + HexElement(nodeRegs, wxT("es"), c.regs.es); + HexElement(nodeRegs, wxT("fs"), c.regs.fs); + HexElement(nodeRegs, wxT("gs"), c.regs.gs); + HexElement(nodeRegs, wxT("ss"), c.regs.ss); + + HexElement(nodeRegs, wxT("flags"), c.regs.flags); +#endif // __INTEL__ + + return true; +#else // !wxUSE_CRASHREPORT + wxUnusedVar(nodeContext); + + return false; +#endif // wxUSE_CRASHREPORT/!wxUSE_CRASHREPORT +} + +bool wxDebugReport::AddContext(wxDebugReport::Context ctx) +{ + wxCHECK_MSG( IsOk(), false, wxT("use IsOk() first") ); + + // create XML dump of current context + wxXmlDocument xmldoc; + wxXmlNode *nodeRoot = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("report")); + xmldoc.SetRoot(nodeRoot); + nodeRoot->AddAttribute(wxT("version"), wxT("1.0")); + nodeRoot->AddAttribute(wxT("kind"), ctx == Context_Current ? wxT("user") + : wxT("exception")); + + // add system information + wxXmlNode *nodeSystemInfo = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("system")); + if ( DoAddSystemInfo(nodeSystemInfo) ) + nodeRoot->AddChild(nodeSystemInfo); + else + delete nodeSystemInfo; + + // add information about the loaded modules + wxXmlNode *nodeModules = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("modules")); + if ( DoAddLoadedModules(nodeModules) ) + nodeRoot->AddChild(nodeModules); + else + delete nodeModules; + + // add CPU context information: this only makes sense for exceptions as our + // current context is not very interesting otherwise + if ( ctx == Context_Exception ) + { + wxXmlNode *nodeContext = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("context")); + if ( DoAddExceptionInfo(nodeContext) ) + nodeRoot->AddChild(nodeContext); + else + delete nodeContext; + } + + // add stack traceback +#if wxUSE_STACKWALKER + wxXmlNode *nodeStack = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("stack")); + XmlStackWalker sw(nodeStack); +#if wxUSE_ON_FATAL_EXCEPTION + if ( ctx == Context_Exception ) + { + sw.WalkFromException(); + } + else // Context_Current +#endif // wxUSE_ON_FATAL_EXCEPTION + { + sw.Walk(); + } + + if ( sw.IsOk() ) + nodeRoot->AddChild(nodeStack); + else + delete nodeStack; +#endif // wxUSE_STACKWALKER + + // finally let the user add any extra information he needs + DoAddCustomContext(nodeRoot); + + + // save the entire context dump in a file + wxFileName fn(m_dir, GetReportName(), wxT("xml")); + + if ( !xmldoc.Save(fn.GetFullPath()) ) + return false; + + AddFile(fn.GetFullName(), _("process context description")); + + return true; +} + +#endif // wxUSE_STACKWALKER + +// ---------------------------------------------------------------------------- +// adding core dump +// ---------------------------------------------------------------------------- + +#if wxUSE_CRASHREPORT + +bool wxDebugReport::AddDump(Context ctx) +{ + wxCHECK_MSG( IsOk(), false, wxT("use IsOk() first") ); + + wxFileName fn(m_dir, GetReportName(), wxT("dmp")); + wxCrashReport::SetFileName(fn.GetFullPath()); + + if ( !(ctx == Context_Exception ? wxCrashReport::Generate() + : wxCrashReport::GenerateNow()) ) + return false; + + AddFile(fn.GetFullName(), _("dump of the process state (binary)")); + + return true; +} + +#endif // wxUSE_CRASHREPORT + +// ---------------------------------------------------------------------------- +// report processing +// ---------------------------------------------------------------------------- + +bool wxDebugReport::Process() +{ + if ( !GetFilesCount() ) + { + wxLogError(_("Debug report generation has failed.")); + + return false; + } + + if ( !DoProcess() ) + { + wxLogError(_("Processing debug report has failed, leaving the files in \"%s\" directory."), + GetDirectory().c_str()); + + Reset(); + + return false; + } + + return true; +} + +bool wxDebugReport::DoProcess() +{ + wxString msg(_("A debug report has been generated. It can be found in")); + msg << wxT("\n") + wxT("\t") << GetDirectory() << wxT("\n\n") + << _("And includes the following files:\n"); + + wxString name, desc; + const size_t count = GetFilesCount(); + for ( size_t n = 0; n < count; n++ ) + { + GetFile(n, &name, &desc); + msg += wxString::Format("\t%s: %s\n", name, desc); + } + + msg += _("\nPlease send this report to the program maintainer, thank you!\n"); + + wxLogMessage(wxT("%s"), msg.c_str()); + + // we have to do this or the report would be deleted, and we don't even + // have any way to ask the user if he wants to keep it from here + Reset(); + + return true; +} + +// ============================================================================ +// wxDebugReport-derived classes +// ============================================================================ + +#if wxUSE_ZIPSTREAM + +// ---------------------------------------------------------------------------- +// wxDebugReportCompress +// ---------------------------------------------------------------------------- + +void wxDebugReportCompress::SetCompressedFileDirectory(const wxString& dir) +{ + wxASSERT_MSG( m_zipfile.empty(), "Too late: call this before Process()" ); + + m_zipDir = dir; +} + +void wxDebugReportCompress::SetCompressedFileBaseName(const wxString& name) +{ + wxASSERT_MSG( m_zipfile.empty(), "Too late: call this before Process()" ); + + m_zipName = name; +} + +bool wxDebugReportCompress::DoProcess() +{ +#define HAS_FILE_STREAMS (wxUSE_STREAMS && (wxUSE_FILE || wxUSE_FFILE)) +#if HAS_FILE_STREAMS + const size_t count = GetFilesCount(); + if ( !count ) + return false; + + // create the compressed report file outside of the directory with the + // report files as it will be deleted by wxDebugReport dtor but we want to + // keep this one: for this we simply treat the directory name as the name + // of the file so that its last component becomes our base name + wxFileName fn(GetDirectory()); + if ( !m_zipDir.empty() ) + fn.SetPath(m_zipDir); + if ( !m_zipName.empty() ) + fn.SetName(m_zipName); + fn.SetExt("zip"); + + // create the streams + const wxString ofullPath = fn.GetFullPath(); +#if wxUSE_FFILE + wxFFileOutputStream os(ofullPath, wxT("wb")); +#elif wxUSE_FILE + wxFileOutputStream os(ofullPath); +#endif + if ( !os.IsOk() ) + return false; + wxZipOutputStream zos(os, 9); + + // add all files to the ZIP one + wxString name, desc; + for ( size_t n = 0; n < count; n++ ) + { + GetFile(n, &name, &desc); + + wxZipEntry *ze = new wxZipEntry(name); + ze->SetComment(desc); + + if ( !zos.PutNextEntry(ze) ) + return false; + + const wxString ifullPath = wxFileName(GetDirectory(), name).GetFullPath(); +#if wxUSE_FFILE + wxFFileInputStream is(ifullPath); +#elif wxUSE_FILE + wxFileInputStream is(ifullPath); +#endif + if ( !is.IsOk() || !zos.Write(is).IsOk() ) + return false; + } + + if ( !zos.Close() ) + return false; + + m_zipfile = ofullPath; + + return true; +#else + return false; +#endif // HAS_FILE_STREAMS +} + +// ---------------------------------------------------------------------------- +// wxDebugReportUpload +// ---------------------------------------------------------------------------- + +wxDebugReportUpload::wxDebugReportUpload(const wxString& url, + const wxString& input, + const wxString& action, + const wxString& curl) + : m_uploadURL(url), + m_inputField(input), + m_curlCmd(curl) +{ + if ( m_uploadURL.Last() != wxT('/') ) + m_uploadURL += wxT('/'); + m_uploadURL += action; +} + +bool wxDebugReportUpload::DoProcess() +{ + if ( !wxDebugReportCompress::DoProcess() ) + return false; + + + wxArrayString output, errors; + int rc = wxExecute(wxString::Format + ( + wxT("%s -F \"%s=@%s\" %s"), + m_curlCmd.c_str(), + m_inputField.c_str(), + GetCompressedFileName().c_str(), + m_uploadURL.c_str() + ), + output, + errors); + if ( rc == -1 ) + { + wxLogError(_("Failed to execute curl, please install it in PATH.")); + } + else if ( rc != 0 ) + { + const size_t count = errors.GetCount(); + if ( count ) + { + for ( size_t n = 0; n < count; n++ ) + { + wxLogWarning(wxT("%s"), errors[n].c_str()); + } + } + + wxLogError(_("Failed to upload the debug report (error code %d)."), rc); + } + else // rc == 0 + { + if ( OnServerReply(output) ) + return true; + } + + return false; +} + +#endif // wxUSE_ZIPSTREAM + +#endif // wxUSE_DEBUGREPORT diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/descrip.mms b/3rdparty/wxwidgets3.0-3.0.1/src/common/descrip.mms new file mode 100644 index 0000000000..18ffe12cb3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/descrip.mms @@ -0,0 +1,721 @@ +#***************************************************************************** +# * +# Make file for VMS * +# Author : J.Jansen (joukj@hrem.nano.tudelft.nl) * +# Date : 19 September 2013 * +# * +#***************************************************************************** +.first + define wx [--.include.wx] + +.ifdef __WXMOTIF__ +CXX_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)\ + /assume=(nostdnew,noglobal_array_new)/incl=[-.regex] +CC_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)/incl=[-.regex] +.else +.ifdef __WXGTK__ +CXX_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm\ + /assume=(nostdnew,noglobal_array_new)/incl=[-.regex] +CC_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm\ + /incl=[-.regex] +.else +.ifdef __WXGTK2__ +CXX_DEFINE = /define=(__WXGTK__=1,VMS_GTK2=1)/float=ieee/name=(as_is,short)/ieee=denorm\ + /assume=(nostdnew,noglobal_array_new)/incl=[-.regex] +CC_DEFINE = /define=(__WXGTK__=1,VMS_GTK2=1)/float=ieee/name=(as_is,short)\ + /ieee=denorm/incl=[-.regex] +.else +.ifdef __WXX11__ +CXX_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\ + /name=(as_is,short)/assume=(nostdnew,noglobal_array_new)/incl=[-.regex] +CC_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\ + /name=(as_is,short)/incl=[-.regex] +.else +CXX_DEFINE = +CC_DEFINE = +.endif +.endif +.endif +.endif + +YACC=bison/yacc + +SED=gsed + +LEX=flex + +.suffixes : .cpp + +.cpp.obj : + cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp +.c.obj : + cc $(CFLAGS)$(CC_DEFINE) $(MMS$TARGET_NAME).c + +OBJECTS = \ + accelcmn.obj,\ + anidecod.obj,\ + animatecmn.obj,\ + appbase.obj,\ + appcmn.obj,\ + arrstr.obj,\ + artprov.obj,\ + artstd.obj,\ + base64.obj,\ + bmpbase.obj,\ + btncmn.obj,\ + bmpcboxcmn.obj,\ + bookctrl.obj,\ + calctrlcmn.obj,\ + choiccmn.obj,\ + clipcmn.obj,\ + clntdata.obj,\ + cmdline.obj,\ + cmdproc.obj,\ + cmndata.obj,\ + config.obj,\ + containr.obj,\ + convauto.obj,\ + colourcmn.obj,\ + cshelp.obj,\ + ctrlcmn.obj,\ + ctrlsub.obj,\ + datetime.obj,\ + datstrm.obj,\ + dcbase.obj,\ + dcbufcmn.obj,\ + dircmn.obj,\ + dlgcmn.obj,\ + dobjcmn.obj,\ + docmdi.obj,\ + docview.obj,\ + dpycmn.obj,\ + dynarray.obj,\ + dynlib.obj,\ + encconv.obj,\ + event.obj,\ + evtloopcmn.obj,\ + extended.obj,\ + fddlgcmn.obj,\ + ffile.obj,\ + file.obj,\ + fileback.obj,\ + fileconf.obj,\ + filename.obj,\ + filefn.obj,\ + filesys.obj,\ + filectrlcmn.obj,\ + fldlgcmn.obj,\ + fmapbase.obj,\ + fontcmn.obj,\ + fontenumcmn.obj,\ + fontmap.obj,\ + framecmn.obj + +OBJECTS1=fs_inet.obj,\ + ftp.obj,\ + gaugecmn.obj,\ + gbsizer.obj,\ + gdicmn.obj,\ + gifdecod.obj,\ + hash.obj,\ + hashmap.obj,\ + helpbase.obj,\ + http.obj,\ + hyperlnkcmn.obj,\ + iconbndl.obj,\ + init.obj,\ + imagall.obj,\ + imagbmp.obj,\ + image.obj,\ + imagfill.obj,\ + imaggif.obj,\ + imagiff.obj,\ + imagjpeg.obj,\ + imagpcx.obj,\ + imagpng.obj,\ + imagpnm.obj,\ + imagtga.obj,\ + imagtiff.obj,\ + imagxpm.obj,\ + intl.obj,\ + ipcbase.obj,\ + layout.obj,\ + lboxcmn.obj,\ + list.obj,\ + log.obj,\ + longlong.obj,\ + memory.obj,\ + menucmn.obj,\ + mimecmn.obj,\ + module.obj,\ + msgout.obj,\ + mstream.obj,\ + nbkbase.obj,\ + object.obj,\ + paper.obj,\ + platinfo.obj,\ + popupcmn.obj,\ + prntbase.obj,\ + process.obj,\ + protocol.obj,\ + quantize.obj,\ + radiocmn.obj,\ + rendcmn.obj,\ + sckaddr.obj,\ + sckfile.obj,\ + sckipc.obj,\ + sckstrm.obj,\ + sizer.obj,\ + socket.obj,\ + settcmn.obj,\ + statbar.obj,\ + stattextcmn.obj,\ + stdpbase.obj,\ + stockitem.obj,\ + stopwatch.obj,\ + strconv.obj,\ + stream.obj,\ + string.obj,\ + stringimpl.obj,\ + strvararg.obj,\ + sysopt.obj + +OBJECTS2=tbarbase.obj,srchcmn.obj,\ + textbuf.obj,\ + textcmn.obj,\ + textfile.obj,\ + textentrycmn.obj,\ + timercmn.obj,\ + timerimpl.obj,\ + tokenzr.obj,\ + toplvcmn.obj,\ + treebase.obj,\ + txtstrm.obj,\ + url.obj,\ + utilscmn.obj,\ + rgncmn.obj,\ + unichar.obj,\ + uri.obj,\ + valgen.obj,\ + validate.obj,\ + valtext.obj,\ + variant.obj,\ + wfstream.obj,\ + wincmn.obj,\ + wxcrt.obj,\ + xpmdecod.obj,\ + zipstrm.obj,\ + zstream.obj,\ + clrpickercmn.obj,\ + filepickercmn.obj,\ + fontpickercmn.obj,\ + pickerbase.obj + +OBJECTS3=listctrlcmn.obj,socketiohandler.obj,fdiodispatcher.obj,\ + selectdispatcher.obj,overlaycmn.obj,windowid.obj,sstream.obj,\ + wrapsizer.obj,headerctrlcmn.obj,headercolcmn.obj,\ + rearrangectrl.obj,spinctrlcmn.obj,datetimefmt.obj,xlocale.obj,\ + regex.obj,any.obj,archive.obj,fs_arc.obj,arcall.obj,\ + arcfind.obj,tarstrm.obj,datavcmn.obj,debugrpt.obj,\ + translation.obj,languageinfo.obj,filehistorycmn.obj,\ + stdstream.obj,uiactioncmn.obj,arttango.obj,mediactrlcmn.obj,\ + panelcmn.obj,checkboxcmn.obj,statboxcmn.obj,slidercmn.obj,\ + statlinecmn.obj,radiobtncmn.obj,bmpbtncmn.obj,checklstcmn.obj,\ + statbmpcmn.obj,dirctrlcmn.obj,gridcmn.obj,odcombocmn.obj,\ + spinbtncmn.obj,scrolbarcmn.obj,colourdata.obj,fontdata.obj,\ + valnum.obj,numformatter.obj,markupparser.obj,\ + affinematrix2d.obj,richtooltipcmn.obj,persist.obj,time.obj,\ + textmeasurecmn.obj,modalhook.obj,threadinfo.obj + +OBJECTS_MOTIF=radiocmn.obj,combocmn.obj + +OBJECTS_X11=accesscmn.obj,dndcmn.obj,dpycmn.obj,dseldlg.obj,\ + dynload.obj,effects.obj,fddlgcmn.obj,fs_mem.obj,\ + gbsizer.obj,geometry.obj,matrix.obj,radiocmn.obj,\ + taskbarcmn.obj,xti.obj,xtistrm.obj,xtixml.obj,\ + combocmn.obj + + +OBJECTS_GTK2=fontutilcmn.obj,cairo.obj + +SOURCES = \ + accelcmn.cpp,\ + anidecod.cpp,\ + animatecmn.cpp,\ + any.cpp,\ + appbase.cpp,\ + appcmn.cpp,\ + arrstr.cpp,\ + artprov.cpp,\ + artstd.cpp,\ + base64.cpp,\ + bmpbase.cpp,\ + btncmn.cpp,\ + bmpcboxcmn.cpp,\ + bookctrl.cpp,\ + calctrlcmn.cpp,\ + cairo.cpp,\ + choiccmn.cpp,\ + clipcmn.cpp,\ + clntdata.cpp,\ + cmdline.cpp,\ + cmdproc.cpp,\ + cmndata.cpp,\ + config.cpp,\ + containr.cpp,\ + convauto.cpp,\ + colourcmn.cpp,\ + cshelp.cpp,\ + ctrlcmn.cpp,\ + ctrlsub.cpp,\ + datetime.cpp,\ + datstrm.cpp,\ + dcbase.cpp,\ + dcbufcmn.cpp,\ + dircmn.cpp,\ + dlgcmn.cpp,\ + dobjcmn.cpp,\ + docmdi.cpp,\ + docview.cpp,\ + dpycmn.cpp,\ + dynarray.cpp,\ + dynlib.cpp,\ + encconv.cpp,\ + event.cpp,\ + evtloopcmn.cpp,\ + extended.c,\ + ffile.cpp,\ + fddlgcmn.cpp,\ + fdiodispatcher.cpp,\ + file.cpp,\ + fileback.cpp,\ + fileconf.cpp,\ + filename.cpp,\ + filefn.cpp,\ + filesys.cpp,\ + filectrlcmn.cpp,\ + fldlgcmn.cpp,\ + fmapbase.cpp,\ + fontcmn.cpp,\ + fontenumcmn.cpp,\ + fontmap.cpp,\ + fontutilcmn.cpp,\ + framecmn.cpp,\ + fs_inet.cpp,\ + ftp.cpp,\ + gaugecmn.cpp,\ + gbsizer.cpp,\ + gdicmn.cpp,\ + gifdecod.cpp,\ + socketiohandler.cpp,\ + hash.cpp,\ + hashmap.cpp,\ + helpbase.cpp,\ + http.cpp,\ + hyperlnkcmn.cpp,\ + iconbndl.cpp,\ + init.cpp,\ + imagall.cpp,\ + imagbmp.cpp,\ + image.cpp,\ + imagfill.cpp,\ + imaggif.cpp,\ + imagiff.cpp,\ + imagjpeg.cpp,\ + imagpcx.cpp,\ + imagpng.cpp,\ + imagpnm.cpp,\ + imagtga.cpp,\ + imagtiff.cpp,\ + imagxpm.cpp,\ + intl.cpp,\ + ipcbase.cpp,\ + layout.cpp,\ + lboxcmn.cpp,\ + list.cpp,\ + listctrlcmn.cpp,\ + log.cpp,\ + longlong.cpp,\ + memory.cpp,\ + menucmn.cpp,\ + mimecmn.cpp,\ + module.cpp,\ + msgout.cpp,\ + mstream.cpp,\ + nbkbase.cpp,\ + object.cpp,\ + overlaycmn.cpp,\ + paper.cpp,\ + platinfo.cpp,\ + popupcmn.cpp,\ + prntbase.cpp,\ + process.cpp,\ + protocol.cpp,\ + quantize.cpp,\ + radiocmn.cpp,\ + rendcmn.cpp,\ + rgncmn.cpp,\ + sckaddr.cpp,\ + sckfile.cpp,\ + sckipc.cpp,\ + sckstrm.cpp,\ + sizer.cpp,\ + socket.cpp,\ + selectdispatcher.cpp,\ + settcmn.cpp,\ + sstream.cpp,\ + statbar.cpp,\ + stattextcmn.cpp,\ + stdpbase.cpp,\ + stockitem.cpp,\ + stopwatch.cpp,\ + srchcmn.cpp,\ + strconv.cpp,\ + stream.cpp,\ + strvararg.cpp,\ + sysopt.cpp,\ + string.cpp,\ + stringimpl.cpp,\ + tbarbase.cpp,\ + textbuf.cpp,\ + textcmn.cpp,\ + textfile.cpp,\ + textentrycmn.cpp,\ + timercmn.cpp,\ + timerimpl.cpp,\ + tokenzr.cpp,\ + toplvcmn.cpp,\ + treebase.cpp,\ + txtstrm.cpp,\ + unichar.cpp,\ + url.cpp,\ + utilscmn.cpp,\ + valgen.cpp,\ + validate.cpp,\ + valtext.cpp,\ + variant.cpp,\ + wfstream.cpp,\ + wincmn.cpp,\ + wxcrt.cpp,\ + xpmdecod.cpp,\ + zipstrm.cpp,\ + zstream.cpp,\ + clrpickercmn.cpp,\ + filepickercmn.cpp,\ + fontpickercmn.cpp,\ + pickerbase.cpp,\ + accesscmn.cpp,\ + dndcmn.cpp,\ + dpycmn.cpp,\ + dseldlg.cpp,\ + dynload.cpp,\ + effects.cpp,\ + fddlgcmn.cpp,\ + fs_mem.cpp,\ + gbsizer.cpp,\ + geometry.cpp,\ + matrix.cpp,\ + radiocmn.cpp,\ + regex.cpp,\ + taskbarcmn.cpp,\ + uri.cpp,\ + xti.cpp,\ + xtistrm.cpp,\ + xtixml.cpp,\ + wrapsizer.cpp,archive.cpp,fs_arc.cpp,arcall.cpp,arcfind.cpp,\ + tarstrm.cpp,datavcmn.cpp,debugrpt.cpp,uiactioncmn.cpp,\ + arttango.cpp,mediactrlcmn.cpp,panelcmn.cpp,checkboxcmn.cpp,\ + statboxcmn.cpp,slidercmn.cpp,statlinecmn.cpp,radiobtncmn.cpp,\ + bmpbtncmn.cpp,checklstcmn.cpp,statbmpcmn.cpp,dirctrlcmn.cpp,\ + gridcmn.cpp,odcombocmn.cpp,spinbtncmn.cpp,scrolbarcmn.cpp,\ + colourdata.cpp,fontdata.cpp affinematrix2d.cpp\ + richtooltipcmn.cpp persist.cpp time.cpp textmeasurecmn.cpp \ + modalhook.cpp + +all : $(SOURCES) + $(MMS)$(MMSQUALIFIERS) $(OBJECTS) + $(MMS)$(MMSQUALIFIERS) $(OBJECTS1) + $(MMS)$(MMSQUALIFIERS) $(OBJECTS2) + $(MMS)$(MMSQUALIFIERS) $(OBJECTS3) +.ifdef __WXMOTIF__ + $(MMS)$(MMSQUALIFIERS) $(OBJECTS_MOTIF) + library [--.lib]libwx_motif.olb $(OBJECTS) + library [--.lib]libwx_motif.olb $(OBJECTS1) + library [--.lib]libwx_motif.olb $(OBJECTS2) + library [--.lib]libwx_motif.olb $(OBJECTS3) + library [--.lib]libwx_motif.olb $(OBJECTS_MOTIF) +.else +.ifdef __WXGTK__ + $(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11) + library [--.lib]libwx_gtk.olb $(OBJECTS) + library [--.lib]libwx_gtk.olb $(OBJECTS1) + library [--.lib]libwx_gtk.olb $(OBJECTS2) + library [--.lib]libwx_gtk.olb $(OBJECTS3) + library [--.lib]libwx_gtk.olb $(OBJECTS_X11) +.else +.ifdef __WXGTK2__ + $(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11) + $(MMS)$(MMSQUALIFIERS) $(OBJECTS_GTK2) + library [--.lib]libwx_gtk2.olb $(OBJECTS) + library [--.lib]libwx_gtk2.olb $(OBJECTS1) + library [--.lib]libwx_gtk2.olb $(OBJECTS2) + library [--.lib]libwx_gtk2.olb $(OBJECTS3) + library [--.lib]libwx_gtk2.olb $(OBJECTS_X11) + library [--.lib]libwx_gtk2.olb $(OBJECTS_GTK2) +.else +.ifdef __WXX11__ + $(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11) + library [--.lib]libwx_x11_univ.olb $(OBJECTS) + library [--.lib]libwx_x11_univ.olb $(OBJECTS1) + library [--.lib]libwx_x11_univ.olb $(OBJECTS2) + library [--.lib]libwx_x11_univ.olb $(OBJECTS3) + library [--.lib]libwx_x11_univ.olb $(OBJECTS_X11) +.endif +.endif +.endif +.endif + +$(OBJECTS) : [--.include.wx]setup.h +$(OBJECTS1) : [--.include.wx]setup.h +$(OBJECTS2) : [--.include.wx]setup.h +$(OBJECTS3) : [--.include.wx]setup.h +$(OBJECTS_X11) : [--.include.wx]setup.h +$(OBJECTS_GTK2) : [--.include.wx]setup.h +$(OBJECTS_MOTIF) : [--.include.wx]setup.h + +accelcmn.obj : accelcmn.cpp +anidecod.obj : anidecod.cpp +animatecmn.obj : animatecmn.cpp +any.obj : any.cpp +appbase.obj : appbase.cpp +appcmn.obj : appcmn.cpp +arrstr.obj : arrstr.cpp +artprov.obj : artprov.cpp +artstd.obj : artstd.cpp +base64.obj : base64.cpp +bmpbase.obj : bmpbase.cpp +btncmn.obj : btncmn.cpp +bmpcboxcmn.obj : bmpcboxcmn.cpp +bookctrl.obj : bookctrl.cpp +choiccmn.obj : choiccmn.cpp +clipcmn.obj : clipcmn.cpp +clntdata.obj : clntdata.cpp +cmdline.obj : cmdline.cpp +cmdproc.obj : cmdproc.cpp +cmndata.obj : cmndata.cpp +config.obj : config.cpp +containr.obj : containr.cpp +convauto.obj : convauto.cpp +colourcmn.obj : colourcmn.cpp +cshelp.obj : cshelp.cpp +ctrlcmn.obj : ctrlcmn.cpp +ctrlsub.obj : ctrlsub.cpp +datetime.obj : datetime.cpp +datstrm.obj : datstrm.cpp +dcbase.obj : dcbase.cpp +dcbufcmn.obj : dcbufcmn.cpp +dircmn.obj : dircmn.cpp +dlgcmn.obj : dlgcmn.cpp +dobjcmn.obj : dobjcmn.cpp +docmdi.obj : docmdi.cpp +docview.obj : docview.cpp +dynarray.obj : dynarray.cpp +dynlib.obj : dynlib.cpp +encconv.obj : encconv.cpp +event.obj : event.cpp +evtloopcmn.obj : evtloopcmn.cpp +extended.obj : extended.c +ffile.obj : ffile.cpp +fddlgcmn.obj : fddlgcmn.cpp +fdiodispatcher.obj : fdiodispatcher.cpp +file.obj : file.cpp +fileback.obj : fileback.cpp +fileconf.obj : fileconf.cpp +filefn.obj : filefn.cpp +filename.obj : filename.cpp +filesys.obj : filesys.cpp +fldlgcmn.obj : fldlgcmn.cpp +fmapbase.obj : fmapbase.cpp +fontcmn.obj : fontcmn.cpp +fontenumcmn.obj : fontenumcmn.cpp +fontmap.obj : fontmap.cpp +fontutilcmn.obj : fontutilcmn.cpp +framecmn.obj : framecmn.cpp +fs_inet.obj : fs_inet.cpp +ftp.obj : ftp.cpp +gaugecmn.obj : gaugecmn.cpp +gbsizer.obj : gbsizer.cpp +gdicmn.obj : gdicmn.cpp +gifdecod.obj : gifdecod.cpp +socketiohandler.obj : socketiohandler.cpp +hash.obj : hash.cpp +hashmap.obj : hashmap.cpp +helpbase.obj : helpbase.cpp +http.obj : http.cpp + cxx$(CXXFLAGS)$(CXX_DEFINE)/warn=disable=(UNSCOMZER)/obj=http.obj \ + http.cpp +hyperlnkcmn.obj : hyperlnkcmn.cpp +iconbndl.obj : iconbndl.cpp +init.obj : init.cpp +imagall.obj : imagall.cpp +imagbmp.obj : imagbmp.cpp +image.obj : image.cpp +imagfill.obj : imagfill.cpp +imaggif.obj : imaggif.cpp +imagiff.obj : imagiff.cpp +imagjpeg.obj : imagjpeg.cpp +imagpcx.obj : imagpcx.cpp +imagpng.obj : imagpng.cpp +imagpnm.obj : imagpnm.cpp +imagtga.obj : imagtga.cpp +imagtiff.obj : imagtiff.cpp +imagxpm.obj : imagxpm.cpp +intl.obj : intl.cpp +ipcbase.obj : ipcbase.cpp +layout.obj : layout.cpp +lboxcmn.obj : lboxcmn.cpp +list.obj : list.cpp +log.obj : log.cpp +longlong.obj : longlong.cpp +memory.obj : memory.cpp +menucmn.obj : menucmn.cpp +mimecmn.obj : mimecmn.cpp +module.obj : module.cpp +msgout.obj : msgout.cpp +mstream.obj : mstream.cpp +nbkbase.obj : nbkbase.cpp +object.obj : object.cpp +paper.obj : paper.cpp +platinfo.obj : platinfo.cpp +popupcmn.obj : popupcmn.cpp +prntbase.obj : prntbase.cpp +process.obj : process.cpp + cxx $(CXXFLAGS)$(CXX_DEFINE)/warn=disable=(UNSCOMZER) process.cpp +protocol.obj : protocol.cpp +quantize.obj : quantize.cpp +radiocmn.obj : radiocmn.cpp +rendcmn.obj : rendcmn.cpp +rgncmn.obj : rgncmn.cpp +sckaddr.obj : sckaddr.cpp +sckfile.obj : sckfile.cpp +sckipc.obj : sckipc.cpp +sckstrm.obj : sckstrm.cpp +selectdispatcher.obj : selectdispatcher.cpp +sizer.obj : sizer.cpp +socket.obj : socket.cpp +settcmn.obj : settcmn.cpp +statbar.obj : statbar.cpp +stattextcmn.obj : stattextcmn.cpp +stdpbase.obj : stdpbase.cpp +stockitem.obj : stockitem.cpp +stopwatch.obj : stopwatch.cpp +strconv.obj : strconv.cpp +stream.obj : stream.cpp +strvararg.obj : strvararg.cpp +sysopt.obj : sysopt.cpp +string.obj : string.cpp +stringimpl.obj : stringimpl.cpp +tbarbase.obj : tbarbase.cpp +textbuf.obj : textbuf.cpp +textcmn.obj : textcmn.cpp +textfile.obj : textfile.cpp +timercmn.obj : timercmn.cpp +timerimpl.obj : timerimpl.cpp +tokenzr.obj : tokenzr.cpp +toplvcmn.obj : toplvcmn.cpp +treebase.obj : treebase.cpp +txtstrm.obj : txtstrm.cpp +unichar.obj : unichar.cpp +url.obj : url.cpp +utilscmn.obj : utilscmn.cpp +valgen.obj : valgen.cpp +validate.obj : validate.cpp +valtext.obj : valtext.cpp +variant.obj : variant.cpp +wfstream.obj : wfstream.cpp +wincmn.obj : wincmn.cpp +wxcrt.obj : wxcrt.cpp +xpmdecod.obj : xpmdecod.cpp +zipstrm.obj : zipstrm.cpp +zstream.obj : zstream.cpp +accesscmn.obj : accesscmn.cpp +dndcmn.obj : dndcmn.cpp +dpycmn.obj : dpycmn.cpp +dseldlg.obj : dseldlg.cpp +dynload.obj : dynload.cpp +effects.obj : effects.cpp +fddlgcmn.obj : fddlgcmn.cpp +fs_mem.obj : fs_mem.cpp +gbsizer.obj : gbsizer.cpp +geometry.obj : geometry.cpp +matrix.obj : matrix.cpp +radiocmn.obj : radiocmn.cpp +regex.obj : regex.cpp +taskbarcmn.obj : taskbarcmn.cpp +xti.obj : xti.cpp +xtistrm.obj : xtistrm.cpp +xtixml.obj : xtixml.cpp +uri.obj : uri.cpp +dpycmn.obj : dpycmn.cpp +combocmn.obj : combocmn.cpp +clrpickercmn.obj : clrpickercmn.cpp +filepickercmn.obj : filepickercmn.cpp +fontpickercmn.obj : fontpickercmn.cpp +pickerbase.obj : pickerbase.cpp +listctrlcmn.obj : listctrlcmn.cpp +srchcmn.obj : srchcmn.cpp +textentrycmn.obj : textentrycmn.cpp +filectrlcmn.obj : filectrlcmn.cpp +cairo.obj : cairo.cpp + cxx$(CXXFLAGS)$(CXX_DEFINE)/obj=cairo.obj cairo.cpp +overlaycmn.obj : overlaycmn.cpp +windowid.obj : windowid.cpp +calctrlcmn.obj : calctrlcmn.cpp +sstream.obj : sstream.cpp +wrapsizer.obj : wrapsizer.cpp +headerctrlcmn.obj : headerctrlcmn.cpp +headercolcmn.obj : headercolcmn.cpp +rearrangectrl.obj : rearrangectrl.cpp +spinctrlcmn.obj : spinctrlcmn.cpp +datetimefmt.obj : datetimefmt.cpp +xlocale.obj : xlocale.cpp +archive.obj : archive.cpp +fs_arc.obj : fs_arc.cpp +arcall.obj : arcall.cpp +arcfind.obj : arcfind.cpp +tarstrm.obj : tarstrm.cpp +datavcmn.obj : datavcmn.cpp +debugrpt.obj : debugrpt.cpp +translation.obj : translation.cpp +languageinfo.obj : languageinfo.cpp +filehistorycmn.obj : filehistorycmn.cpp +stdstream.obj : stdstream.cpp +uiactioncmn.obj : uiactioncmn.cpp +arttango.obj : arttango.cpp +mediactrlcmn.obj : mediactrlcmn.cpp +panelcmn.obj : panelcmn.cpp +checkboxcmn.obj : checkboxcmn.cpp +statboxcmn.obj : statboxcmn.cpp +slidercmn.obj : slidercmn.cpp +statlinecmn.obj : statlinecmn.cpp +radiobtncmn.obj : radiobtncmn.cpp +bmpbtncmn.obj : bmpbtncmn.cpp +checklstcmn.obj : checklstcmn.cpp +statbmpcmn.obj : statbmpcmn.cpp +dirctrlcmn.obj : dirctrlcmn.cpp +gridcmn.obj : gridcmn.cpp +odcombocmn.obj : odcombocmn.cpp +spinbtncmn.obj : spinbtncmn.cpp +scrolbarcmn.obj : scrolbarcmn.cpp +colourdata.obj : colourdata.cpp +fontdata.obj : fontdata.cpp +valnum.obj : valnum.cpp +numformatter.obj : numformatter.cpp +markupparser.obj : markupparser.cpp +affinematrix2d.obj : affinematrix2d.cpp +richtooltipcmn.obj : richtooltipcmn.cpp +persist.obj : persist.cpp +time.obj : time.cpp +textmeasurecmn.obj : textmeasurecmn.cpp +modalhook.obj : modalhook.cpp +threadinfo.obj : threadinfo.cpp diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/dircmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/dircmn.cpp new file mode 100644 index 0000000000..11856868f8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/dircmn.cpp @@ -0,0 +1,404 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/dircmn.cpp +// Purpose: wxDir methods common to all implementations +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.05.01 +// Copyright: (c) 2001 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/filefn.h" + #include "wx/arrstr.h" +#endif //WX_PRECOMP + +#include "wx/dir.h" +#include "wx/filename.h" + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxDirTraverser +// ---------------------------------------------------------------------------- + +wxDirTraverseResult +wxDirTraverser::OnOpenError(const wxString& WXUNUSED(dirname)) +{ + return wxDIR_IGNORE; +} + +// ---------------------------------------------------------------------------- +// wxDir::HasFiles() and HasSubDirs() +// ---------------------------------------------------------------------------- + +// dumb generic implementation + +bool wxDir::HasFiles(const wxString& spec) const +{ + wxString s; + return GetFirst(&s, spec, wxDIR_FILES | wxDIR_HIDDEN); +} + +// we have a (much) faster version for Unix +#if (defined(__CYGWIN__) && defined(__WINDOWS__)) || !defined(__UNIX_LIKE__) || defined(__EMX__) || defined(__WINE__) + +bool wxDir::HasSubDirs(const wxString& spec) const +{ + wxString s; + return GetFirst(&s, spec, wxDIR_DIRS | wxDIR_HIDDEN); +} + +#endif // !Unix + +// ---------------------------------------------------------------------------- +// wxDir::GetNameWithSep() +// ---------------------------------------------------------------------------- + +wxString wxDir::GetNameWithSep() const +{ + // Note that for historical reasons (i.e. because GetName() was there + // first) we implement this one in terms of GetName() even though it might + // actually make more sense to reverse this logic. + + wxString name = GetName(); + if ( !name.empty() ) + { + // Notice that even though GetName() isn't supposed to return the + // separator, it can still be present for the root directory name. + if ( name.Last() != wxFILE_SEP_PATH ) + name += wxFILE_SEP_PATH; + } + + return name; +} + +// ---------------------------------------------------------------------------- +// wxDir::Traverse() +// ---------------------------------------------------------------------------- + +size_t wxDir::Traverse(wxDirTraverser& sink, + const wxString& filespec, + int flags) const +{ + wxCHECK_MSG( IsOpened(), (size_t)-1, + wxT("dir must be opened before traversing it") ); + + // the total number of files found + size_t nFiles = 0; + + // the name of this dir with path delimiter at the end + const wxString prefix = GetNameWithSep(); + + // first, recurse into subdirs + if ( flags & wxDIR_DIRS ) + { + wxString dirname; + for ( bool cont = GetFirst(&dirname, wxEmptyString, + (flags & ~(wxDIR_FILES | wxDIR_DOTDOT)) + | wxDIR_DIRS); + cont; + cont = cont && GetNext(&dirname) ) + { + const wxString fulldirname = prefix + dirname; + + switch ( sink.OnDir(fulldirname) ) + { + default: + wxFAIL_MSG(wxT("unexpected OnDir() return value") ); + // fall through + + case wxDIR_STOP: + cont = false; + break; + + case wxDIR_CONTINUE: + { + wxDir subdir; + + // don't give the error messages for the directories + // which we can't open: there can be all sorts of good + // reason for this (e.g. insufficient privileges) and + // this shouldn't be treated as an error -- instead + // let the user code decide what to do + bool ok; + do + { + wxLogNull noLog; + ok = subdir.Open(fulldirname); + if ( !ok ) + { + // ask the user code what to do + bool tryagain; + switch ( sink.OnOpenError(fulldirname) ) + { + default: + wxFAIL_MSG(wxT("unexpected OnOpenError() return value") ); + // fall through + + case wxDIR_STOP: + cont = false; + // fall through + + case wxDIR_IGNORE: + tryagain = false; + break; + + case wxDIR_CONTINUE: + tryagain = true; + } + + if ( !tryagain ) + break; + } + } + while ( !ok ); + + if ( ok ) + { + nFiles += subdir.Traverse(sink, filespec, flags); + } + } + break; + + case wxDIR_IGNORE: + // nothing to do + ; + } + } + } + + // now enum our own files + if ( flags & wxDIR_FILES ) + { + flags &= ~wxDIR_DIRS; + + wxString filename; + bool cont = GetFirst(&filename, filespec, flags); + while ( cont ) + { + wxDirTraverseResult res = sink.OnFile(prefix + filename); + if ( res == wxDIR_STOP ) + break; + + wxASSERT_MSG( res == wxDIR_CONTINUE, + wxT("unexpected OnFile() return value") ); + + nFiles++; + + cont = GetNext(&filename); + } + } + + return nFiles; +} + +// ---------------------------------------------------------------------------- +// wxDir::GetAllFiles() +// ---------------------------------------------------------------------------- + +class wxDirTraverserSimple : public wxDirTraverser +{ +public: + wxDirTraverserSimple(wxArrayString& files) : m_files(files) { } + + virtual wxDirTraverseResult OnFile(const wxString& filename) + { + m_files.push_back(filename); + return wxDIR_CONTINUE; + } + + virtual wxDirTraverseResult OnDir(const wxString& WXUNUSED(dirname)) + { + return wxDIR_CONTINUE; + } + +private: + wxArrayString& m_files; + + wxDECLARE_NO_COPY_CLASS(wxDirTraverserSimple); +}; + +/* static */ +size_t wxDir::GetAllFiles(const wxString& dirname, + wxArrayString *files, + const wxString& filespec, + int flags) +{ + wxCHECK_MSG( files, (size_t)-1, wxT("NULL pointer in wxDir::GetAllFiles") ); + + size_t nFiles = 0; + + wxDir dir(dirname); + if ( dir.IsOpened() ) + { + wxDirTraverserSimple traverser(*files); + + nFiles += dir.Traverse(traverser, filespec, flags); + } + + return nFiles; +} + +// ---------------------------------------------------------------------------- +// wxDir::FindFirst() +// ---------------------------------------------------------------------------- + +class wxDirTraverserFindFirst : public wxDirTraverser +{ +public: + wxDirTraverserFindFirst() { } + + virtual wxDirTraverseResult OnFile(const wxString& filename) + { + m_file = filename; + return wxDIR_STOP; + } + + virtual wxDirTraverseResult OnDir(const wxString& WXUNUSED(dirname)) + { + return wxDIR_CONTINUE; + } + + const wxString& GetFile() const + { + return m_file; + } + +private: + wxString m_file; + + wxDECLARE_NO_COPY_CLASS(wxDirTraverserFindFirst); +}; + +/* static */ +wxString wxDir::FindFirst(const wxString& dirname, + const wxString& filespec, + int flags) +{ + wxDir dir(dirname); + if ( dir.IsOpened() ) + { + wxDirTraverserFindFirst traverser; + + dir.Traverse(traverser, filespec, flags | wxDIR_FILES); + return traverser.GetFile(); + } + + return wxEmptyString; +} + + +// ---------------------------------------------------------------------------- +// wxDir::GetTotalSize() +// ---------------------------------------------------------------------------- + +#if wxUSE_LONGLONG + +class wxDirTraverserSumSize : public wxDirTraverser +{ +public: + wxDirTraverserSumSize() { } + + virtual wxDirTraverseResult OnFile(const wxString& filename) + { + // wxFileName::GetSize won't use this class again as + // we're passing it a file and not a directory; + // thus we are sure to avoid an endless loop + wxULongLong sz = wxFileName::GetSize(filename); + + if (sz == wxInvalidSize) + { + // if the GetSize() failed (this can happen because e.g. a + // file is locked by another process), we can proceed but + // we need to at least warn the user that the resulting + // final size could be not reliable (if e.g. the locked + // file is very big). + m_skippedFiles.Add(filename); + return wxDIR_CONTINUE; + } + + m_sz += sz; + return wxDIR_CONTINUE; + } + + virtual wxDirTraverseResult OnDir(const wxString& WXUNUSED(dirname)) + { + return wxDIR_CONTINUE; + } + + wxULongLong GetTotalSize() const + { return m_sz; } + const wxArrayString& GetSkippedFiles() const + { return m_skippedFiles; } + +protected: + wxULongLong m_sz; + wxArrayString m_skippedFiles; +}; + +wxULongLong wxDir::GetTotalSize(const wxString &dirname, wxArrayString *filesSkipped) +{ + if (!wxDirExists(dirname)) + return wxInvalidSize; + + // to get the size of this directory and its contents we need + // to recursively walk it... + wxDir dir(dirname); + if ( !dir.IsOpened() ) + return wxInvalidSize; + + wxDirTraverserSumSize traverser; + if (dir.Traverse(traverser) == (size_t)-1 ) + return wxInvalidSize; + + if (filesSkipped) + *filesSkipped = traverser.GetSkippedFiles(); + + return traverser.GetTotalSize(); +} + +#endif // wxUSE_LONGLONG + +// ---------------------------------------------------------------------------- +// wxDir helpers +// ---------------------------------------------------------------------------- + +/* static */ +bool wxDir::Exists(const wxString& dir) +{ + return wxFileName::DirExists(dir); +} + +/* static */ +bool wxDir::Make(const wxString &dir, int perm, int flags) +{ + return wxFileName::Mkdir(dir, perm, flags); +} + +/* static */ +bool wxDir::Remove(const wxString &dir, int flags) +{ + return wxFileName::Rmdir(dir, flags); +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/dirctrlcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/dirctrlcmn.cpp new file mode 100644 index 0000000000..617875f1f7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/dirctrlcmn.cpp @@ -0,0 +1,88 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/dirctrlcmn.cpp +// Purpose: wxGenericDirCtrl common code +// Author: Harm van der Heijden, Robert Roebling, Julian Smart +// Modified by: +// Created: 12/12/98 +// Copyright: (c) Harm van der Heijden, Robert Roebling and Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_DIRDLG || wxUSE_FILEDLG + +#include "wx/generic/dirctrlg.h" + +extern WXDLLEXPORT_DATA(const char) wxDirDialogNameStr[] = "wxDirCtrl"; +extern WXDLLEXPORT_DATA(const char) wxDirDialogDefaultFolderStr[] = "/"; +extern WXDLLEXPORT_DATA(const char) wxDirSelectorPromptStr[] = "Select a directory"; + +//----------------------------------------------------------------------------- +// XTI +//----------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxGenericDirCtrlStyle ) +wxBEGIN_FLAGS( wxGenericDirCtrlStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) + + wxFLAGS_MEMBER(wxDIRCTRL_DIR_ONLY) + wxFLAGS_MEMBER(wxDIRCTRL_3D_INTERNAL) + wxFLAGS_MEMBER(wxDIRCTRL_SELECT_FIRST) + wxFLAGS_MEMBER(wxDIRCTRL_SHOW_FILTERS) +wxEND_FLAGS( wxGenericDirCtrlStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxGenericDirCtrl, wxControl, "wx/dirctrl.h") + +wxBEGIN_PROPERTIES_TABLE(wxGenericDirCtrl) + wxHIDE_PROPERTY( Children ) + + wxPROPERTY( DefaultPath, wxString, SetDefaultPath, GetDefaultPath, \ + wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) + wxPROPERTY( Filter, wxString, SetFilter, GetFilter, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) + wxPROPERTY( DefaultFilter, int, SetFilterIndex, GetFilterIndex, \ + wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group") ) + + wxPROPERTY_FLAGS( WindowStyle, wxGenericDirCtrlStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0, wxT("Helpstring"), \ + wxT("group") ) +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxGenericDirCtrl) + +wxCONSTRUCTOR_8( wxGenericDirCtrl, wxWindow*, Parent, wxWindowID, Id, \ + wxString, DefaultPath, wxPoint, Position, wxSize, Size, \ + long, WindowStyle, wxString, Filter, int, DefaultFilter ) + +#endif // wxUSE_DIRDLG || wxUSE_FILEDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/dlgcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/dlgcmn.cpp new file mode 100644 index 0000000000..d410ebb7ad --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/dlgcmn.cpp @@ -0,0 +1,1016 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/dlgcmn.cpp +// Purpose: common (to all ports) wxDialog functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 28.06.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/dialog.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/button.h" + #include "wx/dcclient.h" + #include "wx/intl.h" + #include "wx/settings.h" + #include "wx/stattext.h" + #include "wx/sizer.h" + #include "wx/containr.h" +#endif + +#include "wx/statline.h" +#include "wx/sysopt.h" +#include "wx/module.h" +#include "wx/bookctrl.h" +#include "wx/scrolwin.h" +#include "wx/textwrapper.h" +#include "wx/modalhook.h" + +#if wxUSE_DISPLAY +#include "wx/display.h" +#endif + +extern WXDLLEXPORT_DATA(const char) wxDialogNameStr[] = "dialog"; + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxDialogStyle ) +wxBEGIN_FLAGS( wxDialogStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxNO_BORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) + +// dialog styles +wxFLAGS_MEMBER(wxWS_EX_VALIDATE_RECURSIVELY) +wxFLAGS_MEMBER(wxSTAY_ON_TOP) +wxFLAGS_MEMBER(wxCAPTION) +#if WXWIN_COMPATIBILITY_2_6 +wxFLAGS_MEMBER(wxTHICK_FRAME) +#endif // WXWIN_COMPATIBILITY_2_6 +wxFLAGS_MEMBER(wxSYSTEM_MENU) +wxFLAGS_MEMBER(wxRESIZE_BORDER) +#if WXWIN_COMPATIBILITY_2_6 +wxFLAGS_MEMBER(wxRESIZE_BOX) +#endif // WXWIN_COMPATIBILITY_2_6 +wxFLAGS_MEMBER(wxCLOSE_BOX) +wxFLAGS_MEMBER(wxMAXIMIZE_BOX) +wxFLAGS_MEMBER(wxMINIMIZE_BOX) +wxEND_FLAGS( wxDialogStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxDialog, wxTopLevelWindow, "wx/dialog.h") + +wxBEGIN_PROPERTIES_TABLE(wxDialog) +wxPROPERTY( Title, wxString, SetTitle, GetTitle, wxString(), \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + +wxPROPERTY_FLAGS( WindowStyle, wxDialogStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxDialog) + +wxCONSTRUCTOR_6( wxDialog, wxWindow*, Parent, wxWindowID, Id, \ + wxString, Title, wxPoint, Position, wxSize, Size, long, WindowStyle) + +// ---------------------------------------------------------------------------- +// wxDialogBase +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxDialogBase, wxTopLevelWindow) + EVT_BUTTON(wxID_ANY, wxDialogBase::OnButton) + + EVT_CLOSE(wxDialogBase::OnCloseWindow) + + EVT_CHAR_HOOK(wxDialogBase::OnCharHook) +END_EVENT_TABLE() + +wxDialogLayoutAdapter* wxDialogBase::sm_layoutAdapter = NULL; +bool wxDialogBase::sm_layoutAdaptation = false; + +wxDialogBase::wxDialogBase() +{ + m_returnCode = 0; + m_affirmativeId = wxID_OK; + m_escapeId = wxID_ANY; + m_layoutAdaptationLevel = 3; + m_layoutAdaptationDone = FALSE; + m_layoutAdaptationMode = wxDIALOG_ADAPTATION_MODE_DEFAULT; + + // the dialogs have this flag on by default to prevent the events from the + // dialog controls from reaching the parent frame which is usually + // undesirable and can lead to unexpected and hard to find bugs + SetExtraStyle(GetExtraStyle() | wxWS_EX_BLOCK_EVENTS); +} + +wxWindow *wxDialogBase::CheckIfCanBeUsedAsParent(wxWindow *parent) const +{ + if ( !parent ) + return NULL; + + extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete; + if ( wxPendingDelete.Member(parent) || parent->IsBeingDeleted() ) + { + // this window is being deleted and we shouldn't create any children + // under it + return NULL; + } + + if ( parent->HasExtraStyle(wxWS_EX_TRANSIENT) ) + { + // this window is not being deleted yet but it's going to disappear + // soon so still don't parent this window under it + return NULL; + } + + if ( !parent->IsShownOnScreen() ) + { + // using hidden parent won't work correctly neither + return NULL; + } + + // FIXME-VC6: this compiler requires an explicit const cast or it fails + // with error C2446 + if ( const_cast(parent) == this ) + { + // not sure if this can really happen but it doesn't hurt to guard + // against this clearly invalid situation + return NULL; + } + + return parent; +} + +wxWindow * +wxDialogBase::GetParentForModalDialog(wxWindow *parent, long style) const +{ + // creating a parent-less modal dialog will result (under e.g. wxGTK2) + // in an unfocused dialog, so try to find a valid parent for it unless we + // were explicitly asked not to + if ( style & wxDIALOG_NO_PARENT ) + return NULL; + + // first try the given parent + if ( parent ) + parent = CheckIfCanBeUsedAsParent(wxGetTopLevelParent(parent)); + + // then the currently active window + if ( !parent ) + parent = CheckIfCanBeUsedAsParent( + wxGetTopLevelParent(wxGetActiveWindow())); + + // and finally the application main window + if ( !parent ) + parent = CheckIfCanBeUsedAsParent(wxTheApp->GetTopWindow()); + + return parent; +} + +#if wxUSE_STATTEXT + +wxSizer *wxDialogBase::CreateTextSizer(const wxString& message) +{ + wxTextSizerWrapper wrapper(this); + + return CreateTextSizer(message, wrapper); +} + +wxSizer *wxDialogBase::CreateTextSizer(const wxString& message, + wxTextSizerWrapper& wrapper) +{ + // I admit that this is complete bogus, but it makes + // message boxes work for pda screens temporarily.. + int widthMax = -1; + const bool is_pda = wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA; + if (is_pda) + { + widthMax = wxSystemSettings::GetMetric( wxSYS_SCREEN_X ) - 25; + } + + return wrapper.CreateSizer(message, widthMax); +} + +#endif // wxUSE_STATTEXT + +wxSizer *wxDialogBase::CreateButtonSizer(long flags) +{ +#ifdef __SMARTPHONE__ + wxDialog* dialog = (wxDialog*) this; + if ( flags & wxOK ) + dialog->SetLeftMenu(wxID_OK); + + if ( flags & wxCANCEL ) + dialog->SetRightMenu(wxID_CANCEL); + + if ( flags & wxYES ) + dialog->SetLeftMenu(wxID_YES); + + if ( flags & wxNO ) + dialog->SetRightMenu(wxID_NO); + + return NULL; +#else // !__SMARTPHONE__ + +#if wxUSE_BUTTON + +#ifdef __POCKETPC__ + // PocketPC guidelines recommend for Ok/Cancel dialogs to use OK button + // located inside caption bar and implement Cancel functionality through + // Undo outside dialog. As native behaviour this will be default here but + // can be replaced with real wxButtons by setting the option below to 1 + if ( (flags & ~(wxCANCEL|wxNO_DEFAULT)) != wxOK || + wxSystemOptions::GetOptionInt(wxT("wince.dialog.real-ok-cancel")) ) +#endif // __POCKETPC__ + { + return CreateStdDialogButtonSizer(flags); + } +#ifdef __POCKETPC__ + return NULL; +#endif // __POCKETPC__ + +#else // !wxUSE_BUTTON + wxUnusedVar(flags); + + return NULL; +#endif // wxUSE_BUTTON/!wxUSE_BUTTON + +#endif // __SMARTPHONE__/!__SMARTPHONE__ +} + +wxSizer *wxDialogBase::CreateSeparatedSizer(wxSizer *sizer) +{ + // Mac Human Interface Guidelines recommend not to use static lines as + // grouping elements +#if wxUSE_STATLINE && !defined(__WXMAC__) + wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL); + topsizer->Add(new wxStaticLine(this), + wxSizerFlags().Expand().DoubleBorder(wxBOTTOM)); + topsizer->Add(sizer, wxSizerFlags().Expand()); + sizer = topsizer; +#endif // wxUSE_STATLINE + + return sizer; +} + +wxSizer *wxDialogBase::CreateSeparatedButtonSizer(long flags) +{ + wxSizer *sizer = CreateButtonSizer(flags); + if ( !sizer ) + return NULL; + + return CreateSeparatedSizer(sizer); +} + +#if wxUSE_BUTTON + +wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags ) +{ + wxStdDialogButtonSizer *sizer = new wxStdDialogButtonSizer(); + + wxButton *ok = NULL; + wxButton *yes = NULL; + wxButton *no = NULL; + + if (flags & wxOK) + { + ok = new wxButton(this, wxID_OK); + sizer->AddButton(ok); + } + + if (flags & wxCANCEL) + { + wxButton *cancel = new wxButton(this, wxID_CANCEL); + sizer->AddButton(cancel); + } + + if (flags & wxYES) + { + yes = new wxButton(this, wxID_YES); + sizer->AddButton(yes); + } + + if (flags & wxNO) + { + no = new wxButton(this, wxID_NO); + sizer->AddButton(no); + } + + if (flags & wxAPPLY) + { + wxButton *apply = new wxButton(this, wxID_APPLY); + sizer->AddButton(apply); + } + + if (flags & wxCLOSE) + { + wxButton *close = new wxButton(this, wxID_CLOSE); + sizer->AddButton(close); + } + + if (flags & wxHELP) + { + wxButton *help = new wxButton(this, wxID_HELP); + sizer->AddButton(help); + } + + if (flags & wxNO_DEFAULT) + { + if (no) + { + no->SetDefault(); + no->SetFocus(); + } + } + else + { + if (ok) + { + ok->SetDefault(); + ok->SetFocus(); + } + else if (yes) + { + yes->SetDefault(); + yes->SetFocus(); + } + } + + if (flags & wxOK) + SetAffirmativeId(wxID_OK); + else if (flags & wxYES) + SetAffirmativeId(wxID_YES); + else if (flags & wxCLOSE) + SetAffirmativeId(wxID_CLOSE); + + sizer->Realize(); + + return sizer; +} + +#endif // wxUSE_BUTTON + +// ---------------------------------------------------------------------------- +// standard buttons handling +// ---------------------------------------------------------------------------- + +void wxDialogBase::EndDialog(int rc) +{ + if ( IsModal() ) + EndModal(rc); + else + Hide(); +} + +void wxDialogBase::AcceptAndClose() +{ + if ( Validate() && TransferDataFromWindow() ) + { + EndDialog(m_affirmativeId); + } +} + +void wxDialogBase::SetAffirmativeId(int affirmativeId) +{ + m_affirmativeId = affirmativeId; +} + +void wxDialogBase::SetEscapeId(int escapeId) +{ + m_escapeId = escapeId; +} + +bool wxDialogBase::EmulateButtonClickIfPresent(int id) +{ +#if wxUSE_BUTTON + wxButton *btn = wxDynamicCast(FindWindow(id), wxButton); + + if ( !btn || !btn->IsEnabled() || !btn->IsShown() ) + return false; + + wxCommandEvent event(wxEVT_BUTTON, id); + event.SetEventObject(btn); + btn->GetEventHandler()->ProcessEvent(event); + + return true; +#else // !wxUSE_BUTTON + wxUnusedVar(id); + return false; +#endif // wxUSE_BUTTON/!wxUSE_BUTTON +} + +bool wxDialogBase::SendCloseButtonClickEvent() +{ + int idCancel = GetEscapeId(); + switch ( idCancel ) + { + case wxID_NONE: + // The user doesn't want this dialog to close "implicitly". + break; + + case wxID_ANY: + // this value is special: it means translate Esc to wxID_CANCEL + // but if there is no such button, then fall back to wxID_OK + if ( EmulateButtonClickIfPresent(wxID_CANCEL) ) + return true; + idCancel = GetAffirmativeId(); + // fall through + + default: + // translate Esc to button press for the button with given id + if ( EmulateButtonClickIfPresent(idCancel) ) + return true; + } + + return false; +} + +bool wxDialogBase::IsEscapeKey(const wxKeyEvent& event) +{ + // For most platforms, Esc key is used to close the dialogs. + // + // Notice that we intentionally don't check for modifiers here, Shift-Esc, + // Alt-Esc and so on still close the dialog, typically. + return event.GetKeyCode() == WXK_ESCAPE; +} + +void wxDialogBase::OnCharHook(wxKeyEvent& event) +{ + if ( IsEscapeKey(event) ) + { + if ( SendCloseButtonClickEvent() ) + { + // Skip the call to event.Skip() below, we did handle this key. + return; + } + } + + event.Skip(); +} + +void wxDialogBase::OnButton(wxCommandEvent& event) +{ + const int id = event.GetId(); + if ( id == GetAffirmativeId() ) + { + AcceptAndClose(); + } + else if ( id == wxID_APPLY ) + { + if ( Validate() ) + TransferDataFromWindow(); + + // TODO: disable the Apply button until things change again + } + else if ( id == GetEscapeId() || + (id == wxID_CANCEL && GetEscapeId() == wxID_ANY) ) + { + EndDialog(wxID_CANCEL); + } + else // not a standard button + { + event.Skip(); + } +} + +// ---------------------------------------------------------------------------- +// compatibility methods for supporting the modality API +// ---------------------------------------------------------------------------- + +wxDEFINE_EVENT( wxEVT_WINDOW_MODAL_DIALOG_CLOSED , wxWindowModalDialogEvent ); + +IMPLEMENT_DYNAMIC_CLASS(wxWindowModalDialogEvent, wxCommandEvent) + +void wxDialogBase::ShowWindowModal () +{ + int retval = ShowModal(); + // wxWindowModalDialogEvent relies on GetReturnCode() returning correct + // code. Rather than doing it manually in all ShowModal() overrides for + // native dialogs (and getting accidentally broken again), set it here. + // The worst that can happen is that it will be set twice to the same + // value. + SetReturnCode(retval); + SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); +} + +void wxDialogBase::SendWindowModalDialogEvent ( wxEventType type ) +{ + wxWindowModalDialogEvent event ( type, GetId()); + event.SetEventObject(this); + + if ( !GetEventHandler()->ProcessEvent(event) ) + { + // the event is not propagated upwards to the parent automatically + // because the dialog is a top level window, so do it manually as + // in 9 cases of 10 the message must be processed by the dialog + // owner and not the dialog itself + (void)GetParent()->GetEventHandler()->ProcessEvent(event); + } +} + + +wxDialogModality wxDialogBase::GetModality() const +{ + return IsModal() ? wxDIALOG_MODALITY_APP_MODAL : wxDIALOG_MODALITY_NONE; +} + +// ---------------------------------------------------------------------------- +// other event handlers +// ---------------------------------------------------------------------------- + +void wxDialogBase::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) +{ + // We'll send a Cancel message by default, which may close the dialog. + + // Check for looping if the Cancel event handler calls Close(). + // + // VZ: this is horrible and MT-unsafe. Can't we reuse some of these global + // lists here? don't dare to change it now, but should be done later! + static wxList closing; + + if ( closing.Member(this) ) + return; + + closing.Append(this); + + if ( !SendCloseButtonClickEvent() ) + { + // If the handler didn't close the dialog (e.g. because there is no + // button with matching id) we still want to close it when the user + // clicks the "x" button in the title bar, otherwise we shouldn't even + // have put it there. + // + // Notice that using wxID_CLOSE might have been a better choice but we + // use wxID_CANCEL for compatibility reasons. + EndDialog(wxID_CANCEL); + } + + closing.DeleteObject(this); +} + +void wxDialogBase::OnSysColourChanged(wxSysColourChangedEvent& event) +{ +#ifndef __WXGTK__ + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + Refresh(); +#endif + + event.Skip(); +} + +/// Do the adaptation +bool wxDialogBase::DoLayoutAdaptation() +{ + if (GetLayoutAdapter()) + { + wxWindow* focusWindow = wxFindFocusDescendant(this); // from event.h + if (GetLayoutAdapter()->DoLayoutAdaptation((wxDialog*) this)) + { + if (focusWindow) + focusWindow->SetFocus(); + return true; + } + else + return false; + } + else + return false; +} + +/// Can we do the adaptation? +bool wxDialogBase::CanDoLayoutAdaptation() +{ + // Check if local setting overrides the global setting + bool layoutEnabled = (GetLayoutAdaptationMode() == wxDIALOG_ADAPTATION_MODE_ENABLED) || (IsLayoutAdaptationEnabled() && (GetLayoutAdaptationMode() != wxDIALOG_ADAPTATION_MODE_DISABLED)); + + return (layoutEnabled && !m_layoutAdaptationDone && GetLayoutAdaptationLevel() != 0 && GetLayoutAdapter() != NULL && GetLayoutAdapter()->CanDoLayoutAdaptation((wxDialog*) this)); +} + +/// Set scrolling adapter class, returning old adapter +wxDialogLayoutAdapter* wxDialogBase::SetLayoutAdapter(wxDialogLayoutAdapter* adapter) +{ + wxDialogLayoutAdapter* oldLayoutAdapter = sm_layoutAdapter; + sm_layoutAdapter = adapter; + return oldLayoutAdapter; +} + +/*! + * Standard adapter + */ + +IMPLEMENT_CLASS(wxDialogLayoutAdapter, wxObject) + +IMPLEMENT_CLASS(wxStandardDialogLayoutAdapter, wxDialogLayoutAdapter) + +// Allow for caption size on wxWidgets < 2.9 +#if defined(__WXGTK__) && !wxCHECK_VERSION(2,9,0) +#define wxEXTRA_DIALOG_HEIGHT 30 +#else +#define wxEXTRA_DIALOG_HEIGHT 0 +#endif + +/// Indicate that adaptation should be done +bool wxStandardDialogLayoutAdapter::CanDoLayoutAdaptation(wxDialog* dialog) +{ + if (dialog->GetSizer()) + { + wxSize windowSize, displaySize; + return MustScroll(dialog, windowSize, displaySize) != 0; + } + else + return false; +} + +bool wxStandardDialogLayoutAdapter::DoLayoutAdaptation(wxDialog* dialog) +{ + if (dialog->GetSizer()) + { +#if wxUSE_BOOKCTRL + wxBookCtrlBase* bookContentWindow = wxDynamicCast(dialog->GetContentWindow(), wxBookCtrlBase); + + if (bookContentWindow) + { + // If we have a book control, make all the pages (that use sizers) scrollable + wxWindowList windows; + for (size_t i = 0; i < bookContentWindow->GetPageCount(); i++) + { + wxWindow* page = bookContentWindow->GetPage(i); + + wxScrolledWindow* scrolledWindow = wxDynamicCast(page, wxScrolledWindow); + if (scrolledWindow) + windows.Append(scrolledWindow); + else if (!scrolledWindow && page->GetSizer()) + { + // Create a scrolled window and reparent + scrolledWindow = CreateScrolledWindow(page); + wxSizer* oldSizer = page->GetSizer(); + + wxSizer* newSizer = new wxBoxSizer(wxVERTICAL); + newSizer->Add(scrolledWindow,1, wxEXPAND, 0); + + page->SetSizer(newSizer, false /* don't delete the old sizer */); + + scrolledWindow->SetSizer(oldSizer); + + ReparentControls(page, scrolledWindow); + + windows.Append(scrolledWindow); + } + } + + FitWithScrolling(dialog, windows); + } + else +#endif // wxUSE_BOOKCTRL + { +#if wxUSE_BUTTON + // If we have an arbitrary dialog, create a scrolling area for the main content, and a button sizer + // for the main buttons. + wxScrolledWindow* scrolledWindow = CreateScrolledWindow(dialog); + + int buttonSizerBorder = 0; + + // First try to find a wxStdDialogButtonSizer + wxSizer* buttonSizer = FindButtonSizer(true /* find std button sizer */, dialog, dialog->GetSizer(), buttonSizerBorder); + + // Next try to find a wxBoxSizer containing the controls + if (!buttonSizer && dialog->GetLayoutAdaptationLevel() > wxDIALOG_ADAPTATION_STANDARD_SIZER) + buttonSizer = FindButtonSizer(false /* find ordinary sizer */, dialog, dialog->GetSizer(), buttonSizerBorder); + + // If we still don't have a button sizer, collect any 'loose' buttons in the layout + if (!buttonSizer && dialog->GetLayoutAdaptationLevel() > wxDIALOG_ADAPTATION_ANY_SIZER) + { + int count = 0; + wxStdDialogButtonSizer* stdButtonSizer = new wxStdDialogButtonSizer; + buttonSizer = stdButtonSizer; + + FindLooseButtons(dialog, stdButtonSizer, dialog->GetSizer(), count); + if (count > 0) + stdButtonSizer->Realize(); + else + { + wxDELETE(buttonSizer); + } + } + + if (buttonSizerBorder == 0) + buttonSizerBorder = 5; + + ReparentControls(dialog, scrolledWindow, buttonSizer); + + wxBoxSizer* newTopSizer = new wxBoxSizer(wxVERTICAL); + wxSizer* oldSizer = dialog->GetSizer(); + + dialog->SetSizer(newTopSizer, false /* don't delete old sizer */); + + newTopSizer->Add(scrolledWindow, 1, wxEXPAND|wxALL, 0); + if (buttonSizer) + newTopSizer->Add(buttonSizer, 0, wxEXPAND|wxALL, buttonSizerBorder); + + scrolledWindow->SetSizer(oldSizer); + + FitWithScrolling(dialog, scrolledWindow); +#endif // wxUSE_BUTTON + } + } + + dialog->SetLayoutAdaptationDone(true); + return true; +} + +// Create the scrolled window +wxScrolledWindow* wxStandardDialogLayoutAdapter::CreateScrolledWindow(wxWindow* parent) +{ + wxScrolledWindow* scrolledWindow = new wxScrolledWindow(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxVSCROLL|wxHSCROLL|wxBORDER_NONE); + return scrolledWindow; +} + +#if wxUSE_BUTTON + +/// Find and remove the button sizer, if any +wxSizer* wxStandardDialogLayoutAdapter::FindButtonSizer(bool stdButtonSizer, wxDialog* dialog, wxSizer* sizer, int& retBorder, int accumlatedBorder) +{ + for ( wxSizerItemList::compatibility_iterator node = sizer->GetChildren().GetFirst(); + node; node = node->GetNext() ) + { + wxSizerItem *item = node->GetData(); + wxSizer *childSizer = item->GetSizer(); + + if ( childSizer ) + { + int newBorder = accumlatedBorder; + if (item->GetFlag() & wxALL) + newBorder += item->GetBorder(); + + if (stdButtonSizer) // find wxStdDialogButtonSizer + { + wxStdDialogButtonSizer* buttonSizer = wxDynamicCast(childSizer, wxStdDialogButtonSizer); + if (buttonSizer) + { + sizer->Detach(childSizer); + retBorder = newBorder; + return buttonSizer; + } + } + else // find a horizontal box sizer containing standard buttons + { + wxBoxSizer* buttonSizer = wxDynamicCast(childSizer, wxBoxSizer); + if (buttonSizer && IsOrdinaryButtonSizer(dialog, buttonSizer)) + { + sizer->Detach(childSizer); + retBorder = newBorder; + return buttonSizer; + } + } + + wxSizer* s = FindButtonSizer(stdButtonSizer, dialog, childSizer, retBorder, newBorder); + if (s) + return s; + } + } + return NULL; +} + +/// Check if this sizer contains standard buttons, and so can be repositioned in the dialog +bool wxStandardDialogLayoutAdapter::IsOrdinaryButtonSizer(wxDialog* dialog, wxBoxSizer* sizer) +{ + if (sizer->GetOrientation() != wxHORIZONTAL) + return false; + + for ( wxSizerItemList::compatibility_iterator node = sizer->GetChildren().GetFirst(); + node; node = node->GetNext() ) + { + wxSizerItem *item = node->GetData(); + wxButton *childButton = wxDynamicCast(item->GetWindow(), wxButton); + + if (childButton && IsStandardButton(dialog, childButton)) + return true; + } + return false; +} + +/// Check if this is a standard button +bool wxStandardDialogLayoutAdapter::IsStandardButton(wxDialog* dialog, wxButton* button) +{ + wxWindowID id = button->GetId(); + + return (id == wxID_OK || id == wxID_CANCEL || id == wxID_YES || id == wxID_NO || id == wxID_SAVE || + id == wxID_APPLY || id == wxID_HELP || id == wxID_CONTEXT_HELP || dialog->IsMainButtonId(id)); +} + +/// Find 'loose' main buttons in the existing layout and add them to the standard dialog sizer +bool wxStandardDialogLayoutAdapter::FindLooseButtons(wxDialog* dialog, wxStdDialogButtonSizer* buttonSizer, wxSizer* sizer, int& count) +{ + wxSizerItemList::compatibility_iterator node = sizer->GetChildren().GetFirst(); + while (node) + { + wxSizerItemList::compatibility_iterator next = node->GetNext(); + wxSizerItem *item = node->GetData(); + wxSizer *childSizer = item->GetSizer(); + wxButton *childButton = wxDynamicCast(item->GetWindow(), wxButton); + + if (childButton && IsStandardButton(dialog, childButton)) + { + sizer->Detach(childButton); + buttonSizer->AddButton(childButton); + count ++; + } + + if (childSizer) + FindLooseButtons(dialog, buttonSizer, childSizer, count); + + node = next; + } + return true; +} + +#endif // wxUSE_BUTTON + +/// Reparent the controls to the scrolled window +void wxStandardDialogLayoutAdapter::ReparentControls(wxWindow* parent, wxWindow* reparentTo, wxSizer* buttonSizer) +{ + DoReparentControls(parent, reparentTo, buttonSizer); +} + +void wxStandardDialogLayoutAdapter::DoReparentControls(wxWindow* parent, wxWindow* reparentTo, wxSizer* buttonSizer) +{ + wxWindowList::compatibility_iterator node = parent->GetChildren().GetFirst(); + while (node) + { + wxWindowList::compatibility_iterator next = node->GetNext(); + + wxWindow *win = node->GetData(); + + // Don't reparent the scrolled window or buttons in the button sizer + if (win != reparentTo && (!buttonSizer || !buttonSizer->GetItem(win))) + { + win->Reparent(reparentTo); +#ifdef __WXMSW__ + // Restore correct tab order + ::SetWindowPos((HWND) win->GetHWND(), HWND_BOTTOM, -1, -1, -1, -1, SWP_NOMOVE|SWP_NOSIZE); +#endif + } + + node = next; + } +} + +/// Find whether scrolling will be necessary for the dialog, returning wxVERTICAL, wxHORIZONTAL or both +int wxStandardDialogLayoutAdapter::MustScroll(wxDialog* dialog, wxSize& windowSize, wxSize& displaySize) +{ + return DoMustScroll(dialog, windowSize, displaySize); +} + +/// Find whether scrolling will be necessary for the dialog, returning wxVERTICAL, wxHORIZONTAL or both +int wxStandardDialogLayoutAdapter::DoMustScroll(wxDialog* dialog, wxSize& windowSize, wxSize& displaySize) +{ + wxSize minWindowSize = dialog->GetSizer()->GetMinSize(); + windowSize = dialog->GetSize(); + windowSize = wxSize(wxMax(windowSize.x, minWindowSize.x), wxMax(windowSize.y, minWindowSize.y)); +#if wxUSE_DISPLAY + displaySize = wxDisplay(wxDisplay::GetFromWindow(dialog)).GetClientArea().GetSize(); +#else + displaySize = wxGetClientDisplayRect().GetSize(); +#endif + + int flags = 0; + + if (windowSize.y >= (displaySize.y - wxEXTRA_DIALOG_HEIGHT)) + flags |= wxVERTICAL; + if (windowSize.x >= displaySize.x) + flags |= wxHORIZONTAL; + + return flags; +} + +// A function to fit the dialog around its contents, and then adjust for screen size. +// If scrolled windows are passed, scrolling is enabled in the required orientation(s). +bool wxStandardDialogLayoutAdapter::FitWithScrolling(wxDialog* dialog, wxWindowList& windows) +{ + return DoFitWithScrolling(dialog, windows); +} + +// A function to fit the dialog around its contents, and then adjust for screen size. +// If a scrolled window is passed, scrolling is enabled in the required orientation(s). +bool wxStandardDialogLayoutAdapter::FitWithScrolling(wxDialog* dialog, wxScrolledWindow* scrolledWindow) +{ + return DoFitWithScrolling(dialog, scrolledWindow); +} + +// A function to fit the dialog around its contents, and then adjust for screen size. +// If a scrolled window is passed, scrolling is enabled in the required orientation(s). +bool wxStandardDialogLayoutAdapter::DoFitWithScrolling(wxDialog* dialog, wxScrolledWindow* scrolledWindow) +{ + wxWindowList windows; + windows.Append(scrolledWindow); + return DoFitWithScrolling(dialog, windows); +} + +bool wxStandardDialogLayoutAdapter::DoFitWithScrolling(wxDialog* dialog, wxWindowList& windows) +{ + wxSizer* sizer = dialog->GetSizer(); + if (!sizer) + return false; + + sizer->SetSizeHints(dialog); + + wxSize windowSize, displaySize; + int scrollFlags = DoMustScroll(dialog, windowSize, displaySize); + int scrollBarSize = 20; + + if (scrollFlags) + { + int scrollBarExtraX = 0, scrollBarExtraY = 0; + bool resizeHorizontally = (scrollFlags & wxHORIZONTAL) != 0; + bool resizeVertically = (scrollFlags & wxVERTICAL) != 0; + + if (windows.GetCount() != 0) + { + // Allow extra for a scrollbar, assuming we resizing in one direction only. + if ((resizeVertically && !resizeHorizontally) && (windowSize.x < (displaySize.x - scrollBarSize))) + scrollBarExtraX = scrollBarSize; + if ((resizeHorizontally && !resizeVertically) && (windowSize.y < (displaySize.y - scrollBarSize))) + scrollBarExtraY = scrollBarSize; + } + + wxWindowList::compatibility_iterator node = windows.GetFirst(); + while (node) + { + wxWindow *win = node->GetData(); + wxScrolledWindow* scrolledWindow = wxDynamicCast(win, wxScrolledWindow); + if (scrolledWindow) + { + scrolledWindow->SetScrollRate(resizeHorizontally ? 10 : 0, resizeVertically ? 10 : 0); + + if (scrolledWindow->GetSizer()) + scrolledWindow->GetSizer()->Fit(scrolledWindow); + } + + node = node->GetNext(); + } + + wxSize limitTo = windowSize + wxSize(scrollBarExtraX, scrollBarExtraY); + if (resizeVertically) + limitTo.y = displaySize.y - wxEXTRA_DIALOG_HEIGHT; + if (resizeHorizontally) + limitTo.x = displaySize.x; + + dialog->SetMinSize(limitTo); + dialog->SetSize(limitTo); + + dialog->SetSizeHints( limitTo.x, limitTo.y, dialog->GetMaxWidth(), dialog->GetMaxHeight() ); + } + + return true; +} + +/*! + * Module to initialise standard adapter + */ + +class wxDialogLayoutAdapterModule: public wxModule +{ + DECLARE_DYNAMIC_CLASS(wxDialogLayoutAdapterModule) +public: + wxDialogLayoutAdapterModule() {} + virtual void OnExit() { delete wxDialogBase::SetLayoutAdapter(NULL); } + virtual bool OnInit() { wxDialogBase::SetLayoutAdapter(new wxStandardDialogLayoutAdapter); return true; } +}; + +IMPLEMENT_DYNAMIC_CLASS(wxDialogLayoutAdapterModule, wxModule) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/dndcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/dndcmn.cpp new file mode 100644 index 0000000000..5bd9e13454 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/dndcmn.cpp @@ -0,0 +1,30 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/dndcmn.cpp +// Author: Robert Roebling +// Modified by: +// Created: 19.10.99 +// Copyright: (c) wxWidgets Team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/dnd.h" + +#if wxUSE_DRAG_AND_DROP + +bool wxIsDragResultOk(wxDragResult res) +{ + return res == wxDragCopy || res == wxDragMove || res == wxDragLink; +} + +#endif + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/dobjcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/dobjcmn.cpp new file mode 100644 index 0000000000..5e4d43dcc0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/dobjcmn.cpp @@ -0,0 +1,676 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/dobjcmn.cpp +// Purpose: implementation of data object methods common to all platforms +// Author: Vadim Zeitlin, Robert Roebling +// Modified by: +// Created: 19.10.99 +// Copyright: (c) wxWidgets Team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_DATAOBJ + +#include "wx/dataobj.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" +#endif + +#include "wx/textbuf.h" + +// ---------------------------------------------------------------------------- +// lists +// ---------------------------------------------------------------------------- + +#include "wx/listimpl.cpp" + +WX_DEFINE_LIST(wxSimpleDataObjectList) + +// ---------------------------------------------------------------------------- +// globals +// ---------------------------------------------------------------------------- + +static wxDataFormat dataFormatInvalid; +WXDLLEXPORT const wxDataFormat& wxFormatInvalid = dataFormatInvalid; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxDataObjectBase +// ---------------------------------------------------------------------------- + +wxDataObjectBase::~wxDataObjectBase() +{ +} + +bool wxDataObjectBase::IsSupported(const wxDataFormat& format, + Direction dir) const +{ + size_t nFormatCount = GetFormatCount( dir ); + if ( nFormatCount == 1 ) + { + return format == GetPreferredFormat( dir ); + } + else + { + wxDataFormat *formats = new wxDataFormat[nFormatCount]; + GetAllFormats( formats, dir ); + + size_t n; + for ( n = 0; n < nFormatCount; n++ ) + { + if ( formats[n] == format ) + break; + } + + delete [] formats; + + // found? + return n < nFormatCount; + } +} + +// ---------------------------------------------------------------------------- +// wxDataObjectComposite +// ---------------------------------------------------------------------------- + +wxDataObjectComposite::wxDataObjectComposite() +{ + m_preferred = 0; + m_receivedFormat = wxFormatInvalid; +} + +wxDataObjectComposite::~wxDataObjectComposite() +{ + WX_CLEAR_LIST( wxSimpleDataObjectList, m_dataObjects ); +} + +wxDataObjectSimple * +wxDataObjectComposite::GetObject(const wxDataFormat& format, wxDataObjectBase::Direction dir) const +{ + wxSimpleDataObjectList::compatibility_iterator node = m_dataObjects.GetFirst(); + + while ( node ) + { + wxDataObjectSimple *dataObj = node->GetData(); + + if (dataObj->IsSupported(format,dir)) + return dataObj; + node = node->GetNext(); + } + return NULL; +} + +void wxDataObjectComposite::Add(wxDataObjectSimple *dataObject, bool preferred) +{ + if ( preferred ) + m_preferred = m_dataObjects.GetCount(); + + m_dataObjects.Append( dataObject ); +} + +wxDataFormat wxDataObjectComposite::GetReceivedFormat() const +{ + return m_receivedFormat; +} + +wxDataFormat +wxDataObjectComposite::GetPreferredFormat(Direction WXUNUSED(dir)) const +{ + wxSimpleDataObjectList::compatibility_iterator node = m_dataObjects.Item( m_preferred ); + + wxCHECK_MSG( node, wxFormatInvalid, wxT("no preferred format") ); + + wxDataObjectSimple* dataObj = node->GetData(); + + return dataObj->GetFormat(); +} + +#if defined(__WXMSW__) + +size_t wxDataObjectComposite::GetBufferOffset( const wxDataFormat& format ) +{ + wxDataObjectSimple *dataObj = GetObject(format); + + wxCHECK_MSG( dataObj, 0, + wxT("unsupported format in wxDataObjectComposite")); + + return dataObj->GetBufferOffset( format ); +} + + +const void* wxDataObjectComposite::GetSizeFromBuffer( const void* buffer, + size_t* size, + const wxDataFormat& format ) +{ + wxDataObjectSimple *dataObj = GetObject(format); + + wxCHECK_MSG( dataObj, NULL, + wxT("unsupported format in wxDataObjectComposite")); + + return dataObj->GetSizeFromBuffer( buffer, size, format ); +} + + +void* wxDataObjectComposite::SetSizeInBuffer( void* buffer, size_t size, + const wxDataFormat& format ) +{ + wxDataObjectSimple *dataObj = GetObject( format ); + + wxCHECK_MSG( dataObj, NULL, + wxT("unsupported format in wxDataObjectComposite")); + + return dataObj->SetSizeInBuffer( buffer, size, format ); +} + +#endif + +size_t wxDataObjectComposite::GetFormatCount(Direction dir) const +{ + size_t n = 0; + + // NOTE: some wxDataObjectSimple objects may return a number greater than 1 + // from GetFormatCount(): this is the case of e.g. wxTextDataObject + // under wxMac and wxGTK + wxSimpleDataObjectList::compatibility_iterator node; + for ( node = m_dataObjects.GetFirst(); node; node = node->GetNext() ) + n += node->GetData()->GetFormatCount(dir); + + return n; +} + +void wxDataObjectComposite::GetAllFormats(wxDataFormat *formats, + Direction dir) const +{ + size_t index(0); + wxSimpleDataObjectList::compatibility_iterator node; + + for ( node = m_dataObjects.GetFirst(); node; node = node->GetNext() ) + { + // NOTE: some wxDataObjectSimple objects may return more than 1 format + // from GetAllFormats(): this is the case of e.g. wxTextDataObject + // under wxMac and wxGTK + node->GetData()->GetAllFormats(formats+index, dir); + index += node->GetData()->GetFormatCount(dir); + } +} + +size_t wxDataObjectComposite::GetDataSize(const wxDataFormat& format) const +{ + wxDataObjectSimple *dataObj = GetObject(format); + + wxCHECK_MSG( dataObj, 0, + wxT("unsupported format in wxDataObjectComposite")); + + return dataObj->GetDataSize(); +} + +bool wxDataObjectComposite::GetDataHere(const wxDataFormat& format, + void *buf) const +{ + wxDataObjectSimple *dataObj = GetObject( format ); + + wxCHECK_MSG( dataObj, false, + wxT("unsupported format in wxDataObjectComposite")); + + return dataObj->GetDataHere( buf ); +} + +bool wxDataObjectComposite::SetData(const wxDataFormat& format, + size_t len, + const void *buf) +{ + wxDataObjectSimple *dataObj = GetObject( format ); + + wxCHECK_MSG( dataObj, false, + wxT("unsupported format in wxDataObjectComposite")); + + m_receivedFormat = format; + + // Notice that we must pass "format" here as wxTextDataObject, that we can + // have as one of our "simple" sub-objects actually is not that simple and + // can support multiple formats (ASCII/UTF-8/UTF-16/...) and so needs to + // know which one it is given. + return dataObj->SetData( format, len, buf ); +} + +// ---------------------------------------------------------------------------- +// wxTextDataObject +// ---------------------------------------------------------------------------- + +#ifdef wxNEEDS_UTF8_FOR_TEXT_DATAOBJ + +// FIXME-UTF8: we should be able to merge wchar_t and UTF-8 versions once we +// have a way to get UTF-8 string (and its length) in both builds +// without loss of efficiency (i.e. extra buffer copy/strlen call) + +#if wxUSE_UNICODE_WCHAR + +static inline wxMBConv& GetConv(const wxDataFormat& format) +{ + // use UTF8 for wxDF_UNICODETEXT and UCS4 for wxDF_TEXT + return format == wxDF_UNICODETEXT ? wxConvUTF8 : wxConvLibc; +} + +size_t wxTextDataObject::GetDataSize(const wxDataFormat& format) const +{ + wxCharBuffer buffer = GetConv(format).cWX2MB( GetText().c_str() ); + + return buffer ? strlen( buffer ) : 0; +} + +bool wxTextDataObject::GetDataHere(const wxDataFormat& format, void *buf) const +{ + if ( !buf ) + return false; + + wxCharBuffer buffer = GetConv(format).cWX2MB( GetText().c_str() ); + if ( !buffer ) + return false; + + memcpy( (char*) buf, buffer, GetDataSize(format) ); + // strcpy( (char*) buf, buffer ); + + return true; +} + +bool wxTextDataObject::SetData(const wxDataFormat& format, + size_t WXUNUSED(len), const void *buf) +{ + if ( buf == NULL ) + return false; + + wxWCharBuffer buffer = GetConv(format).cMB2WX( (const char*)buf ); + + SetText( buffer ); + + return true; +} + +#else // wxUSE_UNICODE_UTF8 + +size_t wxTextDataObject::GetDataSize(const wxDataFormat& format) const +{ + const wxString& text = GetText(); + if ( format == wxDF_UNICODETEXT || wxLocaleIsUtf8 ) + { + return text.utf8_length(); + } + else // wxDF_TEXT + { + const wxCharBuffer buf(wxConvLocal.cWC2MB(text.wc_str())); + return buf ? strlen(buf) : 0; + } +} + +bool wxTextDataObject::GetDataHere(const wxDataFormat& format, void *buf) const +{ + if ( !buf ) + return false; + + const wxString& text = GetText(); + if ( format == wxDF_UNICODETEXT || wxLocaleIsUtf8 ) + { + memcpy(buf, text.utf8_str(), text.utf8_length()); + } + else // wxDF_TEXT + { + const wxCharBuffer bufLocal(wxConvLocal.cWC2MB(text.wc_str())); + if ( !bufLocal ) + return false; + + memcpy(buf, bufLocal, strlen(bufLocal)); + } + + return true; +} + +bool wxTextDataObject::SetData(const wxDataFormat& format, + size_t len, const void *buf_) +{ + const char * const buf = static_cast(buf_); + + if ( buf == NULL ) + return false; + + if ( format == wxDF_UNICODETEXT || wxLocaleIsUtf8 ) + { + // normally the data is in UTF-8 so we could use FromUTF8Unchecked() + // but it's not absolutely clear what GTK+ does if the clipboard data + // is not in UTF-8 so do an extra check for tranquility, it shouldn't + // matter much if we lose a bit of performance when pasting from + // clipboard + SetText(wxString::FromUTF8(buf, len)); + } + else // wxDF_TEXT, convert from current (non-UTF8) locale + { + SetText(wxConvLocal.cMB2WC(buf, len, NULL)); + } + + return true; +} + +#endif // wxUSE_UNICODE_WCHAR/wxUSE_UNICODE_UTF8 + +#elif defined(wxNEEDS_UTF16_FOR_TEXT_DATAOBJ) + +namespace +{ + +inline wxMBConv& GetConv(const wxDataFormat& format) +{ + static wxMBConvUTF16 s_UTF16Converter; + + return format == wxDF_UNICODETEXT ? static_cast(s_UTF16Converter) + : static_cast(wxConvLocal); +} + +} // anonymous namespace + +size_t wxTextDataObject::GetDataSize(const wxDataFormat& format) const +{ + return GetConv(format).WC2MB(NULL, GetText().wc_str(), 0); +} + +bool wxTextDataObject::GetDataHere(const wxDataFormat& format, void *buf) const +{ + if ( buf == NULL ) + return false; + + wxCharBuffer buffer(GetConv(format).cWX2MB(GetText().c_str())); + + memcpy(buf, buffer.data(), buffer.length()); + + return true; +} + +bool wxTextDataObject::SetData(const wxDataFormat& format, + size_t WXUNUSED(len), + const void *buf) +{ + if ( buf == NULL ) + return false; + + SetText(GetConv(format).cMB2WX(static_cast(buf))); + + return true; +} + +#else // !wxNEEDS_UTF{8,16}_FOR_TEXT_DATAOBJ + +// NB: This branch, using native wxChar for the clipboard, is only used under +// Windows currently. It's just a coincidence, but Windows is also the only +// platform where we need to convert the text to the native EOL format, so +// wxTextBuffer::Translate() is only used here and not in the code above. + +size_t wxTextDataObject::GetDataSize() const +{ + return (wxTextBuffer::Translate(GetText()).length() + 1)*sizeof(wxChar); +} + +bool wxTextDataObject::GetDataHere(void *buf) const +{ + const wxString textNative = wxTextBuffer::Translate(GetText()); + + // NOTE: use wxTmemcpy() instead of wxStrncpy() to allow + // retrieval of strings with embedded NULLs + wxTmemcpy(static_cast(buf), + textNative.t_str(), + textNative.length() + 1); + + return true; +} + +bool wxTextDataObject::SetData(size_t len, const void *buf) +{ + const wxString + text = wxString(static_cast(buf), len/sizeof(wxChar)); + SetText(wxTextBuffer::Translate(text, wxTextFileType_Unix)); + + return true; +} + +#endif // different wxTextDataObject implementations + +// ---------------------------------------------------------------------------- +// wxHTMLDataObject +// ---------------------------------------------------------------------------- + +size_t wxHTMLDataObject::GetDataSize() const +{ + // Ensure that the temporary string returned by GetHTML() is kept alive for + // as long as we need it here. + const wxString& htmlStr = GetHTML(); + const wxScopedCharBuffer buffer(htmlStr.utf8_str()); + + size_t size = buffer.length(); + +#ifdef __WXMSW__ + // On Windows we need to add some stuff to the string to satisfy + // its clipboard format requirements. + size += 400; +#endif + + return size; +} + +bool wxHTMLDataObject::GetDataHere(void *buf) const +{ + if ( !buf ) + return false; + + // Windows and Mac always use UTF-8, and docs suggest GTK does as well. + const wxString& htmlStr = GetHTML(); + const wxScopedCharBuffer html(htmlStr.utf8_str()); + if ( !html ) + return false; + + char* const buffer = static_cast(buf); + +#ifdef __WXMSW__ + // add the extra info that the MSW clipboard format requires. + + // Create a template string for the HTML header... + strcpy(buffer, + "Version:0.9\r\n" + "StartHTML:00000000\r\n" + "EndHTML:00000000\r\n" + "StartFragment:00000000\r\n" + "EndFragment:00000000\r\n" + "\r\n" + "\r\n"); + + // Append the HTML... + strcat(buffer, html); + strcat(buffer, "\r\n"); + // Finish up the HTML format... + strcat(buffer, + "\r\n" + "\r\n" + ""); + + // Now go back, calculate all the lengths, and write out the + // necessary header information. Note, wsprintf() truncates the + // string when you overwrite it so you follow up with code to replace + // the 0 appended at the end with a '\r'... + char *ptr = strstr(buffer, "StartHTML"); + sprintf(ptr+10, "%08u", (unsigned)(strstr(buffer, "") - buffer)); + *(ptr+10+8) = '\r'; + + ptr = strstr(buffer, "EndHTML"); + sprintf(ptr+8, "%08u", (unsigned)strlen(buffer)); + *(ptr+8+8) = '\r'; + + ptr = strstr(buffer, "StartFragment"); + sprintf(ptr+14, "%08u", (unsigned)(strstr(buffer, "", fragmentStart) + 3; + int endCommentStart = html.rfind(" ${OPENWINHOME}/lib + + The call wxExpandPath can convert these back! + */ +wxChar * +wxContractPath (const wxString& filename, + const wxString& WXUNUSED_IN_WINCE(envname), + const wxString& user) +{ + static wxChar dest[_MAXPATHLEN]; + + if (filename.empty()) + return NULL; + + wxStrcpy (dest, filename); +#ifdef __WINDOWS__ + wxUnix2DosFilename(dest); +#endif + + // Handle environment + wxString val; +#ifndef __WXWINCE__ + wxChar *tcp; + if (!envname.empty() && !(val = wxGetenv (envname)).empty() && + (tcp = wxStrstr (dest, val)) != NULL) + { + wxStrcpy (wxFileFunctionsBuffer, tcp + val.length()); + *tcp++ = wxT('$'); + *tcp++ = wxT('{'); + wxStrcpy (tcp, envname); + wxStrcat (tcp, wxT("}")); + wxStrcat (tcp, wxFileFunctionsBuffer); + } +#endif + + // Handle User's home (ignore root homes!) + val = wxGetUserHome (user); + if (val.empty()) + return dest; + + const size_t len = val.length(); + if (len <= 2) + return dest; + + if (wxStrncmp(dest, val, len) == 0) + { + wxStrcpy(wxFileFunctionsBuffer, wxT("~")); + if (!user.empty()) + wxStrcat(wxFileFunctionsBuffer, user); + wxStrcat(wxFileFunctionsBuffer, dest + len); + wxStrcpy (dest, wxFileFunctionsBuffer); + } + + return dest; +} + +#endif // #if WXWIN_COMPATIBILITY_2_8 + +// Return just the filename, not the path (basename) +wxChar *wxFileNameFromPath (wxChar *path) +{ + wxString p = path; + wxString n = wxFileNameFromPath(p); + + return path + p.length() - n.length(); +} + +wxString wxFileNameFromPath (const wxString& path) +{ + return wxFileName(path).GetFullName(); +} + +// Return just the directory, or NULL if no directory +wxChar * +wxPathOnly (wxChar *path) +{ + if (path && *path) + { + static wxChar buf[_MAXPATHLEN]; + + int l = wxStrlen(path); + int i = l - 1; + if ( i >= _MAXPATHLEN ) + return NULL; + + // Local copy + wxStrcpy (buf, path); + + // Search backward for a backward or forward slash + while (i > -1) + { + // Unix like or Windows + if (path[i] == wxT('/') || path[i] == wxT('\\')) + { + buf[i] = 0; + return buf; + } +#ifdef __VMS__ + if (path[i] == wxT(']')) + { + buf[i+1] = 0; + return buf; + } +#endif + i --; + } + +#if defined(__WINDOWS__) || defined(__OS2__) + // Try Drive specifier + if (wxIsalpha (buf[0]) && buf[1] == wxT(':')) + { + // A:junk --> A:. (since A:.\junk Not A:\junk) + buf[2] = wxT('.'); + buf[3] = wxT('\0'); + return buf; + } +#endif + } + return NULL; +} + +// Return just the directory, or NULL if no directory +wxString wxPathOnly (const wxString& path) +{ + if (!path.empty()) + { + wxChar buf[_MAXPATHLEN]; + + int l = path.length(); + int i = l - 1; + + if ( i >= _MAXPATHLEN ) + return wxString(); + + // Local copy + wxStrcpy(buf, path); + + // Search backward for a backward or forward slash + while (i > -1) + { + // Unix like or Windows + if (path[i] == wxT('/') || path[i] == wxT('\\')) + { + // Don't return an empty string + if (i == 0) + i ++; + buf[i] = 0; + return wxString(buf); + } +#ifdef __VMS__ + if (path[i] == wxT(']')) + { + buf[i+1] = 0; + return wxString(buf); + } +#endif + i --; + } + +#if defined(__WINDOWS__) || defined(__OS2__) + // Try Drive specifier + if (wxIsalpha (buf[0]) && buf[1] == wxT(':')) + { + // A:junk --> A:. (since A:.\junk Not A:\junk) + buf[2] = wxT('.'); + buf[3] = wxT('\0'); + return wxString(buf); + } +#endif + } + return wxEmptyString; +} + +// Utility for converting delimiters in DOS filenames to UNIX style +// and back again - or we get nasty problems with delimiters. +// Also, convert to lower case, since case is significant in UNIX. + +#if defined(__WXMAC__) && !defined(__WXOSX_IPHONE__) + +#define kDefaultPathStyle kCFURLPOSIXPathStyle + +wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathComponent ) +{ + CFURLRef fullURLRef; + fullURLRef = CFURLCreateFromFSRef(NULL, fsRef); + if ( fullURLRef == NULL) + return wxEmptyString; + + if ( additionalPathComponent ) + { + CFURLRef parentURLRef = fullURLRef ; + fullURLRef = CFURLCreateCopyAppendingPathComponent(NULL, parentURLRef, + additionalPathComponent,false); + CFRelease( parentURLRef ) ; + } + wxCFStringRef cfString( CFURLCopyFileSystemPath(fullURLRef, kDefaultPathStyle )); + CFRelease( fullURLRef ) ; + + return wxCFStringRef::AsStringWithNormalizationFormC(cfString); +} + +OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef ) +{ + OSStatus err = noErr ; + CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, wxCFStringRef(path)); + CFStringNormalize(cfMutableString,kCFStringNormalizationFormD); + CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfMutableString , kDefaultPathStyle, false); + CFRelease( cfMutableString ); + if ( NULL != url ) + { + if ( CFURLGetFSRef(url, fsRef) == false ) + err = fnfErr ; + CFRelease( url ) ; + } + else + { + err = fnfErr ; + } + return err ; +} + +wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname ) +{ + wxCFStringRef cfname( CFStringCreateWithCharacters( kCFAllocatorDefault, + uniname->unicode, + uniname->length ) ); + return wxCFStringRef::AsStringWithNormalizationFormC(cfname); +} + +#ifndef __LP64__ + +wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) +{ + FSRef fsRef ; + if ( FSpMakeFSRef( spec , &fsRef) == noErr ) + { + return wxMacFSRefToPath( &fsRef ) ; + } + return wxEmptyString ; +} + +void wxMacFilename2FSSpec( const wxString& path , FSSpec *spec ) +{ + OSStatus err = noErr; + FSRef fsRef; + wxMacPathToFSRef( path , &fsRef ); + err = FSGetCatalogInfo(&fsRef, kFSCatInfoNone, NULL, NULL, spec, NULL); + verify_noerr( err ); +} +#endif + +#endif // __WXMAC__ + + +#if WXWIN_COMPATIBILITY_2_8 + +template +static void wxDoDos2UnixFilename(T *s) +{ + if (s) + while (*s) + { + if (*s == wxT('\\')) + *s = wxT('/'); +#ifdef __WINDOWS__ + else + *s = wxTolower(*s); // Case INDEPENDENT +#endif + s++; + } +} + +void wxDos2UnixFilename(char *s) { wxDoDos2UnixFilename(s); } +void wxDos2UnixFilename(wchar_t *s) { wxDoDos2UnixFilename(s); } + +template +static void +#if defined(__WINDOWS__) || defined(__OS2__) +wxDoUnix2DosFilename(T *s) +#else +wxDoUnix2DosFilename(T *WXUNUSED(s) ) +#endif +{ +// Yes, I really mean this to happen under DOS only! JACS +#if defined(__WINDOWS__) || defined(__OS2__) + if (s) + while (*s) + { + if (*s == wxT('/')) + *s = wxT('\\'); + s++; + } +#endif +} + +void wxUnix2DosFilename(char *s) { wxDoUnix2DosFilename(s); } +void wxUnix2DosFilename(wchar_t *s) { wxDoUnix2DosFilename(s); } + +#endif // #if WXWIN_COMPATIBILITY_2_8 + +// Concatenate two files to form third +bool +wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& file3) +{ +#if wxUSE_FILE + + wxFile in1(file1), in2(file2); + wxTempFile out(file3); + + if ( !in1.IsOpened() || !in2.IsOpened() || !out.IsOpened() ) + return false; + + ssize_t ofs; + unsigned char buf[1024]; + + for( int i=0; i<2; i++) + { + wxFile *in = i==0 ? &in1 : &in2; + do{ + if ( (ofs = in->Read(buf,WXSIZEOF(buf))) == wxInvalidOffset ) return false; + if ( ofs > 0 ) + if ( !out.Write(buf,ofs) ) + return false; + } while ( ofs == (ssize_t)WXSIZEOF(buf) ); + } + + return out.Commit(); + +#else + + wxUnusedVar(file1); + wxUnusedVar(file2); + wxUnusedVar(file3); + return false; + +#endif +} + +// helper of generic implementation of wxCopyFile() +#if !(defined(__WIN32__) || defined(__OS2__)) && wxUSE_FILE + +static bool +wxDoCopyFile(wxFile& fileIn, + const wxStructStat& fbuf, + const wxString& filenameDst, + bool overwrite) +{ + // reset the umask as we want to create the file with exactly the same + // permissions as the original one + wxCHANGE_UMASK(0); + + // create file2 with the same permissions than file1 and open it for + // writing + + wxFile fileOut; + if ( !fileOut.Create(filenameDst, overwrite, fbuf.st_mode & 0777) ) + return false; + + // copy contents of file1 to file2 + char buf[4096]; + for ( ;; ) + { + ssize_t count = fileIn.Read(buf, WXSIZEOF(buf)); + if ( count == wxInvalidOffset ) + return false; + + // end of file? + if ( !count ) + break; + + if ( fileOut.Write(buf, count) < (size_t)count ) + return false; + } + + // we can expect fileIn to be closed successfully, but we should ensure + // that fileOut was closed as some write errors (disk full) might not be + // detected before doing this + return fileIn.Close() && fileOut.Close(); +} + +#endif // generic implementation of wxCopyFile + +// Copy files +bool +wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) +{ +#if defined(__WIN32__) && !defined(__WXMICROWIN__) + // CopyFile() copies file attributes and modification time too, so use it + // instead of our code if available + // + // NB: 3rd parameter is bFailIfExists i.e. the inverse of overwrite + if ( !::CopyFile(file1.t_str(), file2.t_str(), !overwrite) ) + { + wxLogSysError(_("Failed to copy the file '%s' to '%s'"), + file1.c_str(), file2.c_str()); + + return false; + } +#elif defined(__OS2__) + if ( ::DosCopy(file1.c_str(), file2.c_str(), overwrite ? DCPY_EXISTING : 0) != 0 ) + return false; +#elif wxUSE_FILE // !Win32 + + wxStructStat fbuf; + // get permissions of file1 + if ( wxStat( file1, &fbuf) != 0 ) + { + // the file probably doesn't exist or we haven't the rights to read + // from it anyhow + wxLogSysError(_("Impossible to get permissions for file '%s'"), + file1.c_str()); + return false; + } + + // open file1 for reading + wxFile fileIn(file1, wxFile::read); + if ( !fileIn.IsOpened() ) + return false; + + // remove file2, if it exists. This is needed for creating + // file2 with the correct permissions in the next step + if ( wxFileExists(file2) && (!overwrite || !wxRemoveFile(file2))) + { + wxLogSysError(_("Impossible to overwrite the file '%s'"), + file2.c_str()); + return false; + } + + wxDoCopyFile(fileIn, fbuf, file2, overwrite); + +#if defined(__WXMAC__) || defined(__WXCOCOA__) + // copy the resource fork of the file too if it's present + wxString pathRsrcOut; + wxFile fileRsrcIn; + + { + // suppress error messages from this block as resource forks don't have + // to exist + wxLogNull noLog; + + // it's not enough to check for file existence: it always does on HFS + // but is empty for files without resources + if ( fileRsrcIn.Open(file1 + wxT("/..namedfork/rsrc")) && + fileRsrcIn.Length() > 0 ) + { + // we must be using HFS or another filesystem with resource fork + // support, suppose that destination file system also is HFS[-like] + pathRsrcOut = file2 + wxT("/..namedfork/rsrc"); + } + else // check if we have resource fork in separate file (non-HFS case) + { + wxFileName fnRsrc(file1); + fnRsrc.SetName(wxT("._") + fnRsrc.GetName()); + + fileRsrcIn.Close(); + if ( fileRsrcIn.Open( fnRsrc.GetFullPath() ) ) + { + fnRsrc = file2; + fnRsrc.SetName(wxT("._") + fnRsrc.GetName()); + + pathRsrcOut = fnRsrc.GetFullPath(); + } + } + } + + if ( !pathRsrcOut.empty() ) + { + if ( !wxDoCopyFile(fileRsrcIn, fbuf, pathRsrcOut, overwrite) ) + return false; + } +#endif // wxMac || wxCocoa + +#if !defined(__VISAGECPP__) && !defined(__WXMAC__) || defined(__UNIX__) + // no chmod in VA. Should be some permission API for HPFS386 partitions + // however + if ( chmod(file2.fn_str(), fbuf.st_mode) != 0 ) + { + wxLogSysError(_("Impossible to set permissions for the file '%s'"), + file2.c_str()); + return false; + } +#endif // OS/2 || Mac + +#else // !Win32 && ! wxUSE_FILE + + // impossible to simulate with wxWidgets API + wxUnusedVar(file1); + wxUnusedVar(file2); + wxUnusedVar(overwrite); + return false; + +#endif // __WINDOWS__ && __WIN32__ + + return true; +} + +bool +wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite) +{ + if ( !overwrite && wxFileExists(file2) ) + { + wxLogSysError + ( + _("Failed to rename the file '%s' to '%s' because the destination file already exists."), + file1.c_str(), file2.c_str() + ); + + return false; + } + +#if !defined(__WXWINCE__) + // Normal system call + if ( wxRename (file1, file2) == 0 ) + return true; +#endif + + // Try to copy + if (wxCopyFile(file1, file2, overwrite)) { + wxRemoveFile(file1); + return true; + } + // Give up + wxLogSysError(_("File '%s' couldn't be renamed '%s'"), file1, file2); + return false; +} + +bool wxRemoveFile(const wxString& file) +{ +#if defined(__VISUALC__) \ + || defined(__BORLANDC__) \ + || defined(__WATCOMC__) \ + || defined(__DMC__) \ + || defined(__GNUWIN32__) + int res = wxRemove(file); +#elif defined(__WXMAC__) + int res = unlink(file.fn_str()); +#else + int res = unlink(file.fn_str()); +#endif + if ( res ) + { + wxLogSysError(_("File '%s' couldn't be removed"), file); + } + return res == 0; +} + +bool wxMkdir(const wxString& dir, int perm) +{ +#if defined(__WXMAC__) && !defined(__UNIX__) + if ( mkdir(dir.fn_str(), 0) != 0 ) + + // assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too + // for the GNU compiler +#elif (!(defined(__WINDOWS__) || defined(__OS2__) || defined(__DOS__))) || \ + (defined(__GNUWIN32__) && !defined(__MINGW32__)) || \ + defined(__WINE__) || defined(__WXMICROWIN__) + const wxChar *dirname = dir.c_str(); + #if defined(MSVCRT) + wxUnusedVar(perm); + if ( mkdir(wxFNCONV(dirname)) != 0 ) + #else + if ( mkdir(wxFNCONV(dirname), perm) != 0 ) + #endif +#elif defined(__OS2__) + wxUnusedVar(perm); + if (::DosCreateDir(dir.c_str(), NULL) != 0) // enhance for EAB's?? +#elif defined(__DOS__) + const wxChar *dirname = dir.c_str(); + #if defined(__WATCOMC__) + (void)perm; + if ( wxMkDir(wxFNSTRINGCAST wxFNCONV(dirname)) != 0 ) + #elif defined(__DJGPP__) + if ( mkdir(wxFNCONV(dirname), perm) != 0 ) + #else + #error "Unsupported DOS compiler!" + #endif +#else // !MSW, !DOS and !OS/2 VAC++ + wxUnusedVar(perm); + #ifdef __WXWINCE__ + if ( CreateDirectory(dir.fn_str(), NULL) == 0 ) + #else + if ( wxMkDir(dir.fn_str()) != 0 ) + #endif +#endif // !MSW/MSW + { + wxLogSysError(_("Directory '%s' couldn't be created"), dir); + return false; + } + + return true; +} + +bool wxRmdir(const wxString& dir, int WXUNUSED(flags)) +{ +#if defined(__VMS__) + return false; //to be changed since rmdir exists in VMS7.x +#else + #if defined(__OS2__) + if ( ::DosDeleteDir(dir.c_str()) != 0 ) + #elif defined(__WXWINCE__) + if ( RemoveDirectory(dir.fn_str()) == 0 ) + #else + if ( wxRmDir(dir.fn_str()) != 0 ) + #endif + { + wxLogSysError(_("Directory '%s' couldn't be deleted"), dir); + return false; + } + + return true; +#endif +} + +// does the path exists? (may have or not '/' or '\\' at the end) +bool wxDirExists(const wxString& pathName) +{ + return wxFileName::DirExists(pathName); +} + +#if WXWIN_COMPATIBILITY_2_8 + +// Get a temporary filename, opening and closing the file. +wxChar *wxGetTempFileName(const wxString& prefix, wxChar *buf) +{ + wxString filename; + if ( !wxGetTempFileName(prefix, filename) ) + return NULL; + + if ( buf ) + wxStrcpy(buf, filename); + else + buf = MYcopystring(filename); + + return buf; +} + +bool wxGetTempFileName(const wxString& prefix, wxString& buf) +{ +#if wxUSE_FILE + buf = wxFileName::CreateTempFileName(prefix); + + return !buf.empty(); +#else // !wxUSE_FILE + wxUnusedVar(prefix); + wxUnusedVar(buf); + + return false; +#endif // wxUSE_FILE/!wxUSE_FILE +} + +#endif // #if WXWIN_COMPATIBILITY_2_8 + +// Get first file name matching given wild card. + +static wxDir *gs_dir = NULL; +static wxString gs_dirPath; + +wxString wxFindFirstFile(const wxString& spec, int flags) +{ + wxFileName::SplitPath(spec, &gs_dirPath, NULL, NULL); + if ( gs_dirPath.empty() ) + gs_dirPath = wxT("."); + if ( !wxEndsWithPathSeparator(gs_dirPath ) ) + gs_dirPath << wxFILE_SEP_PATH; + + delete gs_dir; // can be NULL, this is ok + gs_dir = new wxDir(gs_dirPath); + + if ( !gs_dir->IsOpened() ) + { + wxLogSysError(_("Cannot enumerate files '%s'"), spec); + return wxEmptyString; + } + + int dirFlags; + switch (flags) + { + case wxDIR: dirFlags = wxDIR_DIRS; break; + case wxFILE: dirFlags = wxDIR_FILES; break; + default: dirFlags = wxDIR_DIRS | wxDIR_FILES; break; + } + + wxString result; + gs_dir->GetFirst(&result, wxFileNameFromPath(spec), dirFlags); + if ( result.empty() ) + { + wxDELETE(gs_dir); + return result; + } + + return gs_dirPath + result; +} + +wxString wxFindNextFile() +{ + wxCHECK_MSG( gs_dir, "", "You must call wxFindFirstFile before!" ); + + wxString result; + if ( !gs_dir->GetNext(&result) || result.empty() ) + { + wxDELETE(gs_dir); + return result; + } + + return gs_dirPath + result; +} + + +// Get current working directory. +// If buf is NULL, allocates space using new, else copies into buf. +// wxGetWorkingDirectory() is obsolete, use wxGetCwd() +// wxDoGetCwd() is their common core to be moved +// to wxGetCwd() once wxGetWorkingDirectory() will be removed. +// Do not expose wxDoGetCwd in headers! + +wxChar *wxDoGetCwd(wxChar *buf, int sz) +{ +#if defined(__WXWINCE__) + // TODO + if(buf && sz>0) buf[0] = wxT('\0'); + return buf; +#else + if ( !buf ) + { + buf = new wxChar[sz + 1]; + } + + bool ok = false; + + // for the compilers which have Unicode version of _getcwd(), call it + // directly, for the others call the ANSI version and do the translation +#if !wxUSE_UNICODE + #define cbuf buf +#else // wxUSE_UNICODE + bool needsANSI = true; + + #if !defined(HAVE_WGETCWD) || wxUSE_UNICODE_MSLU + char cbuf[_MAXPATHLEN]; + #endif + + #ifdef HAVE_WGETCWD + #if wxUSE_UNICODE_MSLU + if ( wxGetOsVersion() != wxOS_WINDOWS_9X ) + #else + char *cbuf = NULL; // never really used because needsANSI will always be false + #endif + { + ok = _wgetcwd(buf, sz) != NULL; + needsANSI = false; + } + #endif + + if ( needsANSI ) +#endif // wxUSE_UNICODE + { + #if defined(_MSC_VER) || defined(__MINGW32__) + ok = _getcwd(cbuf, sz) != NULL; + #elif defined(__OS2__) + APIRET rc; + ULONG ulDriveNum = 0; + ULONG ulDriveMap = 0; + rc = ::DosQueryCurrentDisk(&ulDriveNum, &ulDriveMap); + ok = rc == 0; + if (ok) + { + sz -= 3; + rc = ::DosQueryCurrentDir( 0 // current drive + ,(PBYTE)cbuf + 3 + ,(PULONG)&sz + ); + cbuf[0] = char('A' + (ulDriveNum - 1)); + cbuf[1] = ':'; + cbuf[2] = '\\'; + ok = rc == 0; + } + #else // !Win32/VC++ !Mac !OS2 + ok = getcwd(cbuf, sz) != NULL; + #endif // platform + + #if wxUSE_UNICODE + // finally convert the result to Unicode if needed + wxConvFile.MB2WC(buf, cbuf, sz); + #endif // wxUSE_UNICODE + } + + if ( !ok ) + { + wxLogSysError(_("Failed to get the working directory")); + + // VZ: the old code used to return "." on error which didn't make any + // sense at all to me - empty string is a better error indicator + // (NULL might be even better but I'm afraid this could lead to + // problems with the old code assuming the return is never NULL) + buf[0] = wxT('\0'); + } + else // ok, but we might need to massage the path into the right format + { +#ifdef __DJGPP__ + // VS: DJGPP is a strange mix of DOS and UNIX API and returns paths + // with / deliminers. We don't like that. + for (wxChar *ch = buf; *ch; ch++) + { + if (*ch == wxT('/')) + *ch = wxT('\\'); + } +#endif // __DJGPP__ + +// MBN: we hope that in the case the user is compiling a GTK+/Motif app, +// he needs Unix as opposed to Win32 pathnames +#if defined( __CYGWIN__ ) && defined( __WINDOWS__ ) + // another example of DOS/Unix mix (Cygwin) + wxString pathUnix = buf; +#if wxUSE_UNICODE + #if CYGWIN_VERSION_DLL_MAJOR >= 1007 + cygwin_conv_path(CCP_POSIX_TO_WIN_W, pathUnix.mb_str(wxConvFile), buf, sz); + #else + char bufA[_MAXPATHLEN]; + cygwin_conv_to_full_win32_path(pathUnix.mb_str(wxConvFile), bufA); + wxConvFile.MB2WC(buf, bufA, sz); + #endif +#else + #if CYGWIN_VERSION_DLL_MAJOR >= 1007 + cygwin_conv_path(CCP_POSIX_TO_WIN_A, pathUnix, buf, sz); + #else + cygwin_conv_to_full_win32_path(pathUnix, buf); + #endif +#endif // wxUSE_UNICODE +#endif // __CYGWIN__ + } + + return buf; + +#if !wxUSE_UNICODE + #undef cbuf +#endif + +#endif + // __WXWINCE__ +} + +#if WXWIN_COMPATIBILITY_2_6 +wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) +{ + return wxDoGetCwd(buf,sz); +} +#endif // WXWIN_COMPATIBILITY_2_6 + +wxString wxGetCwd() +{ + wxString str; + wxDoGetCwd(wxStringBuffer(str, _MAXPATHLEN), _MAXPATHLEN); + return str; +} + +bool wxSetWorkingDirectory(const wxString& d) +{ + bool success = false; +#if defined(__OS2__) + if (d[1] == ':') + { + ::DosSetDefaultDisk(wxToupper(d[0]) - wxT('A') + 1); + // do not call DosSetCurrentDir when just changing drive, + // since it requires e.g. "d:." instead of "d:"! + if (d.length() == 2) + return true; + } + success = (::DosSetCurrentDir(d.c_str()) == 0); +#elif defined(__UNIX__) || defined(__WXMAC__) || defined(__DOS__) + success = (chdir(wxFNSTRINGCAST d.fn_str()) == 0); +#elif defined(__WINDOWS__) + +#ifdef __WIN32__ +#ifdef __WXWINCE__ + // No equivalent in WinCE + wxUnusedVar(d); +#else + success = (SetCurrentDirectory(d.t_str()) != 0); +#endif +#else + // Must change drive, too. + bool isDriveSpec = ((strlen(d) > 1) && (d[1] == ':')); + if (isDriveSpec) + { + wxChar firstChar = d[0]; + + // To upper case + if (firstChar > 90) + firstChar = firstChar - 32; + + // To a drive number + unsigned int driveNo = firstChar - 64; + if (driveNo > 0) + { + unsigned int noDrives; + _dos_setdrive(driveNo, &noDrives); + } + } + success = (chdir(WXSTRINGCAST d) == 0); +#endif + +#endif + if ( !success ) + { + wxLogSysError(_("Could not set current working directory")); + } + return success; +} + +// Get the OS directory if appropriate (such as the Windows directory). +// On non-Windows platform, probably just return the empty string. +wxString wxGetOSDirectory() +{ +#ifdef __WXWINCE__ + return wxString(wxT("\\Windows")); +#elif defined(__WINDOWS__) && !defined(__WXMICROWIN__) + wxChar buf[MAX_PATH]; + if ( !GetWindowsDirectory(buf, MAX_PATH) ) + { + wxLogLastError(wxS("GetWindowsDirectory")); + } + + return wxString(buf); +#elif defined(__WXMAC__) && wxOSX_USE_CARBON + return wxMacFindFolderNoSeparator(kOnSystemDisk, 'macs', false); +#else + return wxEmptyString; +#endif +} + +bool wxEndsWithPathSeparator(const wxString& filename) +{ + return !filename.empty() && wxIsPathSeparator(filename.Last()); +} + +// find a file in a list of directories, returns false if not found +bool wxFindFileInPath(wxString *pStr, const wxString& szPath, const wxString& szFile) +{ + // we assume that it's not empty + wxCHECK_MSG( !szFile.empty(), false, + wxT("empty file name in wxFindFileInPath")); + + // skip path separator in the beginning of the file name if present + wxString szFile2; + if ( wxIsPathSeparator(szFile[0u]) ) + szFile2 = szFile.Mid(1); + else + szFile2 = szFile; + + wxStringTokenizer tkn(szPath, wxPATH_SEP); + + while ( tkn.HasMoreTokens() ) + { + wxString strFile = tkn.GetNextToken(); + if ( !wxEndsWithPathSeparator(strFile) ) + strFile += wxFILE_SEP_PATH; + strFile += szFile2; + + if ( wxFileExists(strFile) ) + { + *pStr = strFile; + return true; + } + } + + return false; +} + +#if WXWIN_COMPATIBILITY_2_8 +void WXDLLIMPEXP_BASE wxSplitPath(const wxString& fileName, + wxString *pstrPath, + wxString *pstrName, + wxString *pstrExt) +{ + wxFileName::SplitPath(fileName, pstrPath, pstrName, pstrExt); +} +#endif // #if WXWIN_COMPATIBILITY_2_8 + +#if wxUSE_DATETIME + +time_t WXDLLIMPEXP_BASE wxFileModificationTime(const wxString& filename) +{ + wxDateTime mtime; + if ( !wxFileName(filename).GetTimes(NULL, &mtime, NULL) ) + return (time_t)-1; + + return mtime.GetTicks(); +} + +#endif // wxUSE_DATETIME + + +// Parses the filterStr, returning the number of filters. +// Returns 0 if none or if there's a problem. +// filterStr is in the form: "All files (*.*)|*.*|JPEG Files (*.jpeg)|*.jpeg" + +int WXDLLIMPEXP_BASE wxParseCommonDialogsFilter(const wxString& filterStr, + wxArrayString& descriptions, + wxArrayString& filters) +{ + descriptions.Clear(); + filters.Clear(); + + wxString str(filterStr); + + wxString description, filter; + int pos = 0; + while( pos != wxNOT_FOUND ) + { + pos = str.Find(wxT('|')); + if ( pos == wxNOT_FOUND ) + { + // if there are no '|'s at all in the string just take the entire + // string as filter and make description empty for later autocompletion + if ( filters.IsEmpty() ) + { + descriptions.Add(wxEmptyString); + filters.Add(filterStr); + } + else + { + wxFAIL_MSG( wxT("missing '|' in the wildcard string!") ); + } + + break; + } + + description = str.Left(pos); + str = str.Mid(pos + 1); + pos = str.Find(wxT('|')); + if ( pos == wxNOT_FOUND ) + { + filter = str; + } + else + { + filter = str.Left(pos); + str = str.Mid(pos + 1); + } + + descriptions.Add(description); + filters.Add(filter); + } + +#if defined(__WXMOTIF__) + // split it so there is one wildcard per entry + for( size_t i = 0 ; i < descriptions.GetCount() ; i++ ) + { + pos = filters[i].Find(wxT(';')); + if (pos != wxNOT_FOUND) + { + // first split only filters + descriptions.Insert(descriptions[i],i+1); + filters.Insert(filters[i].Mid(pos+1),i+1); + filters[i]=filters[i].Left(pos); + + // autoreplace new filter in description with pattern: + // C/C++ Files(*.cpp;*.c;*.h)|*.cpp;*.c;*.h + // cause split into: + // C/C++ Files(*.cpp)|*.cpp + // C/C++ Files(*.c;*.h)|*.c;*.h + // and next iteration cause another split into: + // C/C++ Files(*.cpp)|*.cpp + // C/C++ Files(*.c)|*.c + // C/C++ Files(*.h)|*.h + for ( size_t k=i;kbefore.Find(wxT(')'),true)) + { + before = before.Left(pos+1); + before << filters[k]; + pos = after.Find(wxT(')')); + int pos1 = after.Find(wxT('(')); + if (pos != wxNOT_FOUND && (pos +* +* The match procedure is public domain code (from ircII's reg.c) +* but modified to suit our tastes (RN: No "%" syntax I guess) +*/ + +bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) +{ + if (text.empty()) + { + /* Match if both are empty. */ + return pat.empty(); + } + + const wxChar *m = pat.c_str(), + *n = text.c_str(), + *ma = NULL, + *na = NULL; + int just = 0, + acount = 0, + count = 0; + + if (dot_special && (*n == wxT('.'))) + { + /* Never match so that hidden Unix files + * are never found. */ + return false; + } + + for (;;) + { + if (*m == wxT('*')) + { + ma = ++m; + na = n; + just = 1; + acount = count; + } + else if (*m == wxT('?')) + { + m++; + if (!*n++) + return false; + } + else + { + if (*m == wxT('\\')) + { + m++; + /* Quoting "nothing" is a bad thing */ + if (!*m) + return false; + } + if (!*m) + { + /* + * If we are out of both strings or we just + * saw a wildcard, then we can say we have a + * match + */ + if (!*n) + return true; + if (just) + return true; + just = 0; + goto not_matched; + } + /* + * We could check for *n == NULL at this point, but + * since it's more common to have a character there, + * check to see if they match first (m and n) and + * then if they don't match, THEN we can check for + * the NULL of n + */ + just = 0; + if (*m == *n) + { + m++; + count++; + n++; + } + else + { + + not_matched: + + /* + * If there are no more characters in the + * string, but we still need to find another + * character (*m != NULL), then it will be + * impossible to match it + */ + if (!*n) + return false; + + if (ma) + { + m = ma; + n = ++na; + count = acount; + } + else + return false; + } + } + } +} + +#ifdef __VISUALC__ + #pragma warning(default:4706) // assignment within conditional expression +#endif // VC++ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/filehistorycmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/filehistorycmn.cpp new file mode 100644 index 0000000000..c27ed12c0f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/filehistorycmn.cpp @@ -0,0 +1,278 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/filehistorycmn.cpp +// Purpose: wxFileHistory class +// Author: Julian Smart, Vaclav Slavik, Vadim Zeitlin +// Created: 2010-05-03 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/filehistory.h" + +#if wxUSE_FILE_HISTORY + +#include "wx/menu.h" +#include "wx/confbase.h" +#include "wx/filename.h" + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// private helpers +// ---------------------------------------------------------------------------- + +namespace +{ + +// return the string used for the MRU list items in the menu +// +// NB: the index n is 0-based, as usual, but the strings start from 1 +wxString GetMRUEntryLabel(int n, const wxString& path) +{ + // we need to quote '&' characters which are used for mnemonics + wxString pathInMenu(path); + pathInMenu.Replace("&", "&&"); + + return wxString::Format("&%d %s", n + 1, pathInMenu); +} + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// File history (a.k.a. MRU, most recently used, files list) +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject) + +wxFileHistoryBase::wxFileHistoryBase(size_t maxFiles, wxWindowID idBase) +{ + m_fileMaxFiles = maxFiles; + m_idBase = idBase; +} + +/* static */ +wxString wxFileHistoryBase::NormalizeFileName(const wxFileName& fn) +{ + // We specifically exclude wxPATH_NORM_LONG here as it can take a long time + // (several seconds) for network file paths under MSW, resulting in huge + // delays when opening a program using wxFileHistory. We also exclude + // wxPATH_NORM_ENV_VARS as the file names here are supposed to be "real" + // file names and not have any environment variables in them. + wxFileName fnNorm(fn); + fnNorm.Normalize(wxPATH_NORM_DOTS | + wxPATH_NORM_TILDE | + wxPATH_NORM_CASE | + wxPATH_NORM_ABSOLUTE); + return fnNorm.GetFullPath(); +} + +void wxFileHistoryBase::AddFileToHistory(const wxString& file) +{ + // Check if we don't already have this file. Notice that we avoid + // wxFileName::operator==(wxString) here as it converts the string to + // wxFileName and then normalizes it using all normalizations which is too + // slow (see the comment above), so we use our own quick normalization + // functions and a string comparison. + const wxFileName fnNew(file); + const wxString newFile = NormalizeFileName(fnNew); + size_t i, + numFiles = m_fileHistory.size(); + for ( i = 0; i < numFiles; i++ ) + { + if ( newFile == NormalizeFileName(m_fileHistory[i]) ) + { + // we do have it, move it to the top of the history + RemoveFileFromHistory(i); + numFiles--; + break; + } + } + + // if we already have a full history, delete the one at the end + if ( numFiles == m_fileMaxFiles ) + { + RemoveFileFromHistory(--numFiles); + } + + // add a new menu item to all file menus (they will be updated below) + for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst(); + node; + node = node->GetNext() ) + { + wxMenu * const menu = (wxMenu *)node->GetData(); + + if ( !numFiles && menu->GetMenuItemCount() ) + menu->AppendSeparator(); + + // label doesn't matter, it will be set below anyhow, but it can't + // be empty (this is supposed to indicate a stock item) + menu->Append(m_idBase + numFiles, " "); + } + + // insert the new file in the beginning of the file history + m_fileHistory.insert(m_fileHistory.begin(), file); + numFiles++; + + // update the labels in all menus + for ( i = 0; i < numFiles; i++ ) + { + // if in same directory just show the filename; otherwise the full path + const wxFileName fnOld(m_fileHistory[i]); + + wxString pathInMenu; + if ( fnOld.GetPath() == fnNew.GetPath() ) + { + pathInMenu = fnOld.GetFullName(); + } + else // file in different directory + { + // absolute path; could also set relative path + pathInMenu = m_fileHistory[i]; + } + + for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst(); + node; + node = node->GetNext() ) + { + wxMenu * const menu = (wxMenu *)node->GetData(); + + menu->SetLabel(m_idBase + i, GetMRUEntryLabel(i, pathInMenu)); + } + } +} + +void wxFileHistoryBase::RemoveFileFromHistory(size_t i) +{ + size_t numFiles = m_fileHistory.size(); + wxCHECK_RET( i < numFiles, + wxT("invalid index in wxFileHistoryBase::RemoveFileFromHistory") ); + + // delete the element from the array + m_fileHistory.RemoveAt(i); + numFiles--; + + for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst(); + node; + node = node->GetNext() ) + { + wxMenu * const menu = (wxMenu *) node->GetData(); + + // shift filenames up + for ( size_t j = i; j < numFiles; j++ ) + { + menu->SetLabel(m_idBase + j, GetMRUEntryLabel(j, m_fileHistory[j])); + } + + // delete the last menu item which is unused now + const wxWindowID lastItemId = m_idBase + numFiles; + if ( menu->FindItem(lastItemId) ) + menu->Delete(lastItemId); + + // delete the last separator too if no more files are left + if ( m_fileHistory.empty() ) + { + const wxMenuItemList::compatibility_iterator + nodeLast = menu->GetMenuItems().GetLast(); + if ( nodeLast ) + { + wxMenuItem * const lastMenuItem = nodeLast->GetData(); + if ( lastMenuItem->IsSeparator() ) + menu->Delete(lastMenuItem); + } + //else: menu is empty somehow + } + } +} + +void wxFileHistoryBase::UseMenu(wxMenu *menu) +{ + if ( !m_fileMenus.Member(menu) ) + m_fileMenus.Append(menu); +} + +void wxFileHistoryBase::RemoveMenu(wxMenu *menu) +{ + m_fileMenus.DeleteObject(menu); +} + +#if wxUSE_CONFIG +void wxFileHistoryBase::Load(const wxConfigBase& config) +{ + m_fileHistory.Clear(); + + wxString buf; + buf.Printf(wxT("file%d"), 1); + + wxString historyFile; + while ((m_fileHistory.GetCount() < m_fileMaxFiles) && + config.Read(buf, &historyFile) && !historyFile.empty()) + { + m_fileHistory.Add(historyFile); + + buf.Printf(wxT("file%d"), (int)m_fileHistory.GetCount()+1); + historyFile = wxEmptyString; + } + + AddFilesToMenu(); +} + +void wxFileHistoryBase::Save(wxConfigBase& config) +{ + size_t i; + for (i = 0; i < m_fileMaxFiles; i++) + { + wxString buf; + buf.Printf(wxT("file%d"), (int)i+1); + if (i < m_fileHistory.GetCount()) + config.Write(buf, wxString(m_fileHistory[i])); + else + config.Write(buf, wxEmptyString); + } +} +#endif // wxUSE_CONFIG + +void wxFileHistoryBase::AddFilesToMenu() +{ + if ( m_fileHistory.empty() ) + return; + + for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst(); + node; + node = node->GetNext() ) + { + AddFilesToMenu((wxMenu *) node->GetData()); + } +} + +void wxFileHistoryBase::AddFilesToMenu(wxMenu* menu) +{ + if ( m_fileHistory.empty() ) + return; + + if ( menu->GetMenuItemCount() ) + menu->AppendSeparator(); + + for ( size_t i = 0; i < m_fileHistory.GetCount(); i++ ) + { + menu->Append(m_idBase + i, GetMRUEntryLabel(i, m_fileHistory[i])); + } +} + +#endif // wxUSE_FILE_HISTORY diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/filename.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/filename.cpp new file mode 100644 index 0000000000..6acde7603c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/filename.cpp @@ -0,0 +1,3028 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/filename.cpp +// Purpose: wxFileName - encapsulates a file path +// Author: Robert Roebling, Vadim Zeitlin +// Modified by: +// Created: 28.12.2000 +// Copyright: (c) 2000 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + Here are brief descriptions of the filename formats supported by this class: + + wxPATH_UNIX: standard Unix format, used under Darwin as well, absolute file + names have the form: + /dir1/dir2/.../dirN/filename, "." and ".." stand for the + current and parent directory respectively, "~" is parsed as the + user HOME and "~username" as the HOME of that user + + wxPATH_DOS: DOS/Windows format, absolute file names have the form: + drive:\dir1\dir2\...\dirN\filename.ext where drive is a single + letter. "." and ".." as for Unix but no "~". + + There are also UNC names of the form \\share\fullpath and + MSW unique volume names of the form \\?\Volume{GUID}\fullpath. + + The latter provide a uniform way to access a volume regardless of + its current mount point, i.e. you can change a volume's mount + point from D: to E:, or even remove it, and still be able to + access it through its unique volume name. More on the subject can + be found in MSDN's article "Naming a Volume" that is currently at + http://msdn.microsoft.com/en-us/library/aa365248(VS.85).aspx. + + + wxPATH_MAC: Mac OS 8/9 only, not used any longer, absolute file + names have the form + volume:dir1:...:dirN:filename + and the relative file names are either + :dir1:...:dirN:filename + or just + filename + (although :filename works as well). + Since the volume is just part of the file path, it is not + treated like a separate entity as it is done under DOS and + VMS, it is just treated as another dir. + + wxPATH_VMS: VMS native format, absolute file names have the form + :[dir1.dir2.dir3]file.txt + or + :[000000.dir1.dir2.dir3]file.txt + + the is the physical device (i.e. disk). 000000 is the + root directory on the device which can be omitted. + + Note that VMS uses different separators unlike Unix: + : always after the device. If the path does not contain : than + the default (the device of the current directory) is assumed. + [ start of directory specification + . separator between directory and subdirectory + ] between directory and file + */ + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" // For GetShort/LongPathName + #endif + #include "wx/dynarray.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/crt.h" +#endif + +#include "wx/filename.h" +#include "wx/private/filename.h" +#include "wx/tokenzr.h" +#include "wx/config.h" // for wxExpandEnvVars +#include "wx/dynlib.h" +#include "wx/dir.h" +#include "wx/longlong.h" + +#if defined(__WIN32__) && defined(__MINGW32__) + #include "wx/msw/gccpriv.h" +#endif + +#ifdef __WINDOWS__ + #include "wx/msw/private.h" + #include // for CLSID_ShellLink + #include "wx/msw/missing.h" +#endif + +#if defined(__WXMAC__) + #include "wx/osx/private.h" // includes mac headers +#endif + +// utime() is POSIX so should normally be available on all Unices +#ifdef __UNIX_LIKE__ +#include +#include +#include +#include +#endif + +#ifdef __DJGPP__ +#include +#endif + +#ifdef __WATCOMC__ +#include +#include +#include +#endif + +#ifdef __VISAGECPP__ +#ifndef MAX_PATH +#define MAX_PATH 256 +#endif +#endif + +#ifdef __EMX__ +#include +#define MAX_PATH _MAX_PATH +#endif + +#ifndef S_ISREG + #define S_ISREG(mode) ((mode) & S_IFREG) +#endif +#ifndef S_ISDIR + #define S_ISDIR(mode) ((mode) & S_IFDIR) +#endif + +#if wxUSE_LONGLONG +extern const wxULongLong wxInvalidSize = (unsigned)-1; +#endif // wxUSE_LONGLONG + +namespace +{ + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// small helper class which opens and closes the file - we use it just to get +// a file handle for the given file name to pass it to some Win32 API function +#if defined(__WIN32__) && !defined(__WXMICROWIN__) + +class wxFileHandle +{ +public: + enum OpenMode + { + ReadAttr, + WriteAttr + }; + + wxFileHandle(const wxString& filename, OpenMode mode, int flags = 0) + { + // be careful and use FILE_{READ,WRITE}_ATTRIBUTES here instead of the + // usual GENERIC_{READ,WRITE} as we don't want the file access time to + // be changed when we open it because this class is used for setting + // access time (see #10567) + m_hFile = ::CreateFile + ( + filename.t_str(), // name + mode == ReadAttr ? FILE_READ_ATTRIBUTES // access mask + : FILE_WRITE_ATTRIBUTES, + FILE_SHARE_READ | // sharing mode + FILE_SHARE_WRITE, // (allow everything) + NULL, // no secutity attr + OPEN_EXISTING, // creation disposition + flags, // flags + NULL // no template file + ); + + if ( m_hFile == INVALID_HANDLE_VALUE ) + { + if ( mode == ReadAttr ) + { + wxLogSysError(_("Failed to open '%s' for reading"), + filename.c_str()); + } + else + { + wxLogSysError(_("Failed to open '%s' for writing"), + filename.c_str()); + } + } + } + + ~wxFileHandle() + { + if ( m_hFile != INVALID_HANDLE_VALUE ) + { + if ( !::CloseHandle(m_hFile) ) + { + wxLogSysError(_("Failed to close file handle")); + } + } + } + + // return true only if the file could be opened successfully + bool IsOk() const { return m_hFile != INVALID_HANDLE_VALUE; } + + // get the handle + operator HANDLE() const { return m_hFile; } + +private: + HANDLE m_hFile; +}; + +#endif // __WIN32__ + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +#if wxUSE_DATETIME && defined(__WIN32__) && !defined(__WXMICROWIN__) + +// Convert between wxDateTime and FILETIME which is a 64-bit value representing +// the number of 100-nanosecond intervals since January 1, 1601 UTC. +// +// This is the offset between FILETIME epoch and the Unix/wxDateTime Epoch. +static wxInt64 EPOCH_OFFSET_IN_MSEC = wxLL(11644473600000); + +static void ConvertFileTimeToWx(wxDateTime *dt, const FILETIME &ft) +{ + wxLongLong t(ft.dwHighDateTime, ft.dwLowDateTime); + t /= 10000; // Convert hundreds of nanoseconds to milliseconds. + t -= EPOCH_OFFSET_IN_MSEC; + + *dt = wxDateTime(t); +} + +static void ConvertWxToFileTime(FILETIME *ft, const wxDateTime& dt) +{ + // Undo the conversions above. + wxLongLong t(dt.GetValue()); + t += EPOCH_OFFSET_IN_MSEC; + t *= 10000; + + ft->dwHighDateTime = t.GetHi(); + ft->dwLowDateTime = t.GetLo(); +} + +#endif // wxUSE_DATETIME && __WIN32__ + +// return a string with the volume par +static wxString wxGetVolumeString(const wxString& volume, wxPathFormat format) +{ + wxString path; + + if ( !volume.empty() ) + { + format = wxFileName::GetFormat(format); + + // Special Windows UNC paths hack, part 2: undo what we did in + // SplitPath() and make an UNC path if we have a drive which is not a + // single letter (hopefully the network shares can't be one letter only + // although I didn't find any authoritative docs on this) + if ( format == wxPATH_DOS && volume.length() > 1 ) + { + // We also have to check for Windows unique volume names here and + // return it with '\\?\' prepended to it + if ( wxFileName::IsMSWUniqueVolumeNamePath("\\\\?\\" + volume + "\\", + format) ) + { + path << "\\\\?\\" << volume; + } + else + { + // it must be a UNC path + path << wxFILE_SEP_PATH_DOS << wxFILE_SEP_PATH_DOS << volume; + } + } + else if ( format == wxPATH_DOS || format == wxPATH_VMS ) + { + path << volume << wxFileName::GetVolumeSeparator(format); + } + // else ignore + } + + return path; +} + +// return true if the character is a DOS path separator i.e. either a slash or +// a backslash +inline bool IsDOSPathSep(wxUniChar ch) +{ + return ch == wxFILE_SEP_PATH_DOS || ch == wxFILE_SEP_PATH_UNIX; +} + +// return true if the format used is the DOS/Windows one and the string looks +// like a UNC path +static bool IsUNCPath(const wxString& path, wxPathFormat format) +{ + return format == wxPATH_DOS && + path.length() >= 4 && // "\\a" can't be a UNC path + IsDOSPathSep(path[0u]) && + IsDOSPathSep(path[1u]) && + !IsDOSPathSep(path[2u]); +} + +// Under Unix-ish systems (basically everything except Windows but we can't +// just test for non-__WIN32__ because Cygwin defines it, yet we want to use +// lstat() under it, so test for all the rest explicitly) we may work either +// with the file itself or its target if it's a symbolic link and we should +// dereference it, as determined by wxFileName::ShouldFollowLink() and the +// absence of the wxFILE_EXISTS_NO_FOLLOW flag. StatAny() can be used to stat +// the appropriate file with an extra twist that it also works when there is no +// wxFileName object at all, as is the case in static methods. + +#if defined(__UNIX_LIKE__) || defined(__WXMAC__) || defined(__OS2__) || (defined(__DOS__) && defined(__WATCOMC__)) + #define wxHAVE_LSTAT +#endif + +#ifdef wxHAVE_LSTAT + +// Private implementation, don't call directly, use one of the overloads below. +bool DoStatAny(wxStructStat& st, wxString path, bool dereference) +{ + // We need to remove any trailing slashes from the path because they could + // interfere with the symlink following decision: even if we use lstat(), + // it would still follow the symlink if we pass it a path with a slash at + // the end because the symlink resolution would happen while following the + // path and not for the last path element itself. + + while ( wxEndsWithPathSeparator(path) ) + { + const size_t posLast = path.length() - 1; + if ( !posLast ) + { + // Don't turn "/" into empty string. + break; + } + + path.erase(posLast); + } + + int ret = dereference ? wxStat(path, &st) : wxLstat(path, &st); + return ret == 0; +} + +// Overloads to use for a case when we don't have wxFileName object and when we +// do have one. +inline +bool StatAny(wxStructStat& st, const wxString& path, int flags) +{ + return DoStatAny(st, path, !(flags & wxFILE_EXISTS_NO_FOLLOW)); +} + +inline +bool StatAny(wxStructStat& st, const wxFileName& fn) +{ + return DoStatAny(st, fn.GetFullPath(), fn.ShouldFollowLink()); +} + +#endif // wxHAVE_LSTAT + +// ---------------------------------------------------------------------------- +// private constants +// ---------------------------------------------------------------------------- + +// length of \\?\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\ string +static const size_t wxMSWUniqueVolumePrefixLength = 49; + +} // anonymous namespace + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxFileName construction +// ---------------------------------------------------------------------------- + +void wxFileName::Assign( const wxFileName &filepath ) +{ + m_volume = filepath.GetVolume(); + m_dirs = filepath.GetDirs(); + m_name = filepath.GetName(); + m_ext = filepath.GetExt(); + m_relative = filepath.m_relative; + m_hasExt = filepath.m_hasExt; + m_dontFollowLinks = filepath.m_dontFollowLinks; +} + +void wxFileName::Assign(const wxString& volume, + const wxString& path, + const wxString& name, + const wxString& ext, + bool hasExt, + wxPathFormat format) +{ + // we should ignore paths which look like UNC shares because we already + // have the volume here and the UNC notation (\\server\path) is only valid + // for paths which don't start with a volume, so prevent SetPath() from + // recognizing "\\foo\bar" in "c:\\foo\bar" as an UNC path + // + // note also that this is a rather ugly way to do what we want (passing + // some kind of flag telling to ignore UNC paths to SetPath() would be + // better) but this is the safest thing to do to avoid breaking backwards + // compatibility in 2.8 + if ( IsUNCPath(path, format) ) + { + // remove one of the 2 leading backslashes to ensure that it's not + // recognized as an UNC path by SetPath() + wxString pathNonUNC(path, 1, wxString::npos); + SetPath(pathNonUNC, format); + } + else // no UNC complications + { + SetPath(path, format); + } + + m_volume = volume; + m_ext = ext; + m_name = name; + + m_hasExt = hasExt; +} + +void wxFileName::SetPath( const wxString& pathOrig, wxPathFormat format ) +{ + m_dirs.Clear(); + + if ( pathOrig.empty() ) + { + // no path at all + m_relative = true; + + return; + } + + format = GetFormat( format ); + + // 0) deal with possible volume part first + wxString volume, + path; + SplitVolume(pathOrig, &volume, &path, format); + if ( !volume.empty() ) + { + m_relative = false; + + SetVolume(volume); + } + + // 1) Determine if the path is relative or absolute. + + if ( path.empty() ) + { + // we had only the volume + return; + } + + wxChar leadingChar = path[0u]; + + switch (format) + { + case wxPATH_MAC: + m_relative = leadingChar == wxT(':'); + + // We then remove a leading ":". The reason is in our + // storage form for relative paths: + // ":dir:file.txt" actually means "./dir/file.txt" in + // DOS notation and should get stored as + // (relative) (dir) (file.txt) + // "::dir:file.txt" actually means "../dir/file.txt" + // stored as (relative) (..) (dir) (file.txt) + // This is important only for the Mac as an empty dir + // actually means , whereas under DOS, double + // slashes can be ignored: "\\\\" is the same as "\\". + if (m_relative) + path.erase( 0, 1 ); + break; + + case wxPATH_VMS: + // TODO: what is the relative path format here? + m_relative = false; + break; + + default: + wxFAIL_MSG( wxT("Unknown path format") ); + // !! Fall through !! + + case wxPATH_UNIX: + m_relative = leadingChar != wxT('/'); + break; + + case wxPATH_DOS: + m_relative = !IsPathSeparator(leadingChar, format); + break; + + } + + // 2) Break up the path into its members. If the original path + // was just "/" or "\\", m_dirs will be empty. We know from + // the m_relative field, if this means "nothing" or "root dir". + + wxStringTokenizer tn( path, GetPathSeparators(format) ); + + while ( tn.HasMoreTokens() ) + { + wxString token = tn.GetNextToken(); + + // Remove empty token under DOS and Unix, interpret them + // as .. under Mac. + if (token.empty()) + { + if (format == wxPATH_MAC) + m_dirs.Add( wxT("..") ); + // else ignore + } + else + { + m_dirs.Add( token ); + } + } +} + +void wxFileName::Assign(const wxString& fullpath, + wxPathFormat format) +{ + wxString volume, path, name, ext; + bool hasExt; + SplitPath(fullpath, &volume, &path, &name, &ext, &hasExt, format); + + Assign(volume, path, name, ext, hasExt, format); +} + +void wxFileName::Assign(const wxString& fullpathOrig, + const wxString& fullname, + wxPathFormat format) +{ + // always recognize fullpath as directory, even if it doesn't end with a + // slash + wxString fullpath = fullpathOrig; + if ( !fullpath.empty() && !wxEndsWithPathSeparator(fullpath) ) + { + fullpath += GetPathSeparator(format); + } + + wxString volume, path, name, ext; + bool hasExt; + + // do some consistency checks: the name should be really just the filename + // and the path should be really just a path + wxString volDummy, pathDummy, nameDummy, extDummy; + + SplitPath(fullname, &volDummy, &pathDummy, &name, &ext, &hasExt, format); + + wxASSERT_MSG( volDummy.empty() && pathDummy.empty(), + wxT("the file name shouldn't contain the path") ); + + SplitPath(fullpath, &volume, &path, &nameDummy, &extDummy, format); + +#ifndef __VMS + // This test makes no sense on an OpenVMS system. + wxASSERT_MSG( nameDummy.empty() && extDummy.empty(), + wxT("the path shouldn't contain file name nor extension") ); +#endif + Assign(volume, path, name, ext, hasExt, format); +} + +void wxFileName::Assign(const wxString& pathOrig, + const wxString& name, + const wxString& ext, + wxPathFormat format) +{ + wxString volume, + path; + SplitVolume(pathOrig, &volume, &path, format); + + Assign(volume, path, name, ext, format); +} + +void wxFileName::AssignDir(const wxString& dir, wxPathFormat format) +{ + Assign(dir, wxEmptyString, format); +} + +void wxFileName::Clear() +{ + m_dirs.clear(); + m_volume.clear(); + m_name.clear(); + m_ext.clear(); + + // we don't have any absolute path for now + m_relative = true; + + // nor any extension + m_hasExt = false; + + // follow symlinks by default + m_dontFollowLinks = false; +} + +/* static */ +wxFileName wxFileName::FileName(const wxString& file, wxPathFormat format) +{ + return wxFileName(file, format); +} + +/* static */ +wxFileName wxFileName::DirName(const wxString& dir, wxPathFormat format) +{ + wxFileName fn; + fn.AssignDir(dir, format); + return fn; +} + +// ---------------------------------------------------------------------------- +// existence tests +// ---------------------------------------------------------------------------- + +namespace +{ + +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) + +void RemoveTrailingSeparatorsFromPath(wxString& strPath) +{ + // Windows fails to find directory named "c:\dir\" even if "c:\dir" exists, + // so remove all trailing backslashes from the path - but don't do this for + // the paths "d:\" (which are different from "d:"), for just "\" or for + // windows unique volume names ("\\?\Volume{GUID}\") + while ( wxEndsWithPathSeparator( strPath ) ) + { + size_t len = strPath.length(); + if ( len == 1 || (len == 3 && strPath[len - 2] == wxT(':')) || + (len == wxMSWUniqueVolumePrefixLength && + wxFileName::IsMSWUniqueVolumeNamePath(strPath))) + { + break; + } + + strPath.Truncate(len - 1); + } +} + +#endif // __WINDOWS__ || __OS2__ + +bool +wxFileSystemObjectExists(const wxString& path, int flags) +{ + + // Should the existence of file/directory with this name be accepted, i.e. + // result in the true return value from this function? + const bool acceptFile = (flags & wxFILE_EXISTS_REGULAR) != 0; + const bool acceptDir = (flags & wxFILE_EXISTS_DIR) != 0; + + wxString strPath(path); + +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) + if ( acceptDir ) + { + // Ensure that the path doesn't have any trailing separators when + // checking for directories. + RemoveTrailingSeparatorsFromPath(strPath); + } + + // we must use GetFileAttributes() instead of the ANSI C functions because + // it can cope with network (UNC) paths unlike them + DWORD ret = ::GetFileAttributes(strPath.t_str()); + + if ( ret == INVALID_FILE_ATTRIBUTES ) + return false; + + if ( ret & FILE_ATTRIBUTE_DIRECTORY ) + return acceptDir; + + // Anything else must be a file (perhaps we should check for + // FILE_ATTRIBUTE_REPARSE_POINT?) + return acceptFile; +#elif defined(__OS2__) + if ( acceptDir ) + { + // OS/2 can't handle "d:", it wants either "d:\" or "d:." + if (strPath.length() == 2 && strPath[1u] == wxT(':')) + strPath << wxT('.'); + } + + FILESTATUS3 Info = {{0}}; + APIRET rc = ::DosQueryPathInfo((PSZ)(WXSTRINGCAST strPath), FIL_STANDARD, + (void*) &Info, sizeof(FILESTATUS3)); + + if ( rc == NO_ERROR ) + { + if ( Info.attrFile & FILE_DIRECTORY ) + return acceptDir; + else + return acceptFile; + } + + // We consider that the path must exist if we get a sharing violation for + // it but we don't know what is it in this case. + if ( rc == ERROR_SHARING_VIOLATION ) + return flags & wxFILE_EXISTS_ANY; + + // Any other error (usually ERROR_PATH_NOT_FOUND), means there is nothing + // there. + return false; +#else // Non-MSW, non-OS/2 + wxStructStat st; + if ( !StatAny(st, strPath, flags) ) + return false; + + if ( S_ISREG(st.st_mode) ) + return acceptFile; + if ( S_ISDIR(st.st_mode) ) + return acceptDir; + if ( S_ISLNK(st.st_mode) ) + { + // Take care to not test for "!= 0" here as this would erroneously + // return true if only wxFILE_EXISTS_NO_FOLLOW, which is part of + // wxFILE_EXISTS_SYMLINK, is set too. + return (flags & wxFILE_EXISTS_SYMLINK) == wxFILE_EXISTS_SYMLINK; + } + if ( S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode) ) + return (flags & wxFILE_EXISTS_DEVICE) != 0; + if ( S_ISFIFO(st.st_mode) ) + return (flags & wxFILE_EXISTS_FIFO) != 0; + if ( S_ISSOCK(st.st_mode) ) + return (flags & wxFILE_EXISTS_SOCKET) != 0; + + return flags & wxFILE_EXISTS_ANY; +#endif // Platforms +} + +} // anonymous namespace + +bool wxFileName::FileExists() const +{ + int flags = wxFILE_EXISTS_REGULAR; + if ( !ShouldFollowLink() ) + flags |= wxFILE_EXISTS_NO_FOLLOW; + + return wxFileSystemObjectExists(GetFullPath(), flags); +} + +/* static */ +bool wxFileName::FileExists( const wxString &filePath ) +{ + return wxFileSystemObjectExists(filePath, wxFILE_EXISTS_REGULAR); +} + +bool wxFileName::DirExists() const +{ + int flags = wxFILE_EXISTS_DIR; + if ( !ShouldFollowLink() ) + flags |= wxFILE_EXISTS_NO_FOLLOW; + + return Exists(GetPath(), flags); +} + +/* static */ +bool wxFileName::DirExists( const wxString &dirPath ) +{ + return wxFileSystemObjectExists(dirPath, wxFILE_EXISTS_DIR); +} + +bool wxFileName::Exists(int flags) const +{ + // Notice that wxFILE_EXISTS_NO_FOLLOW may be specified in the flags even + // if our DontFollowLink() hadn't been called and we do honour it then. But + // if the user took the care of calling DontFollowLink(), it is always + // taken into account. + if ( !ShouldFollowLink() ) + flags |= wxFILE_EXISTS_NO_FOLLOW; + + return wxFileSystemObjectExists(GetFullPath(), flags); +} + +/* static */ +bool wxFileName::Exists(const wxString& path, int flags) +{ + return wxFileSystemObjectExists(path, flags); +} + +// ---------------------------------------------------------------------------- +// CWD and HOME stuff +// ---------------------------------------------------------------------------- + +void wxFileName::AssignCwd(const wxString& volume) +{ + AssignDir(wxFileName::GetCwd(volume)); +} + +/* static */ +wxString wxFileName::GetCwd(const wxString& volume) +{ + // if we have the volume, we must get the current directory on this drive + // and to do this we have to chdir to this volume - at least under Windows, + // I don't know how to get the current drive on another volume elsewhere + // (TODO) + wxString cwdOld; + if ( !volume.empty() ) + { + cwdOld = wxGetCwd(); + SetCwd(volume + GetVolumeSeparator()); + } + + wxString cwd = ::wxGetCwd(); + + if ( !volume.empty() ) + { + SetCwd(cwdOld); + } + + return cwd; +} + +bool wxFileName::SetCwd() const +{ + return wxFileName::SetCwd( GetPath() ); +} + +bool wxFileName::SetCwd( const wxString &cwd ) +{ + return ::wxSetWorkingDirectory( cwd ); +} + +void wxFileName::AssignHomeDir() +{ + AssignDir(wxFileName::GetHomeDir()); +} + +wxString wxFileName::GetHomeDir() +{ + return ::wxGetHomeDir(); +} + + +// ---------------------------------------------------------------------------- +// CreateTempFileName +// ---------------------------------------------------------------------------- + +#if wxUSE_FILE || wxUSE_FFILE + + +#if !defined wx_fdopen && defined HAVE_FDOPEN + #define wx_fdopen fdopen +#endif + +// NB: GetTempFileName() under Windows creates the file, so using +// O_EXCL there would fail +#ifdef __WINDOWS__ + #define wxOPEN_EXCL 0 +#else + #define wxOPEN_EXCL O_EXCL +#endif + + +#ifdef wxOpenOSFHandle +#define WX_HAVE_DELETE_ON_CLOSE +// On Windows create a file with the FILE_FLAGS_DELETE_ON_CLOSE flags. +// +static int wxOpenWithDeleteOnClose(const wxString& filename) +{ + DWORD access = GENERIC_READ | GENERIC_WRITE; + + DWORD disposition = OPEN_ALWAYS; + + DWORD attributes = FILE_ATTRIBUTE_TEMPORARY | + FILE_FLAG_DELETE_ON_CLOSE; + + HANDLE h = ::CreateFile(filename.t_str(), access, 0, NULL, + disposition, attributes, NULL); + + return wxOpenOSFHandle(h, wxO_BINARY); +} +#endif // wxOpenOSFHandle + + +// Helper to open the file +// +static int wxTempOpen(const wxString& path, bool *deleteOnClose) +{ +#ifdef WX_HAVE_DELETE_ON_CLOSE + if (*deleteOnClose) + return wxOpenWithDeleteOnClose(path); +#endif + + *deleteOnClose = false; + + return wxOpen(path, wxO_BINARY | O_RDWR | O_CREAT | wxOPEN_EXCL, 0600); +} + + +#if wxUSE_FFILE +// Helper to open the file and attach it to the wxFFile +// +static bool wxTempOpen(wxFFile *file, const wxString& path, bool *deleteOnClose) +{ +#ifndef wx_fdopen + *deleteOnClose = false; + return file->Open(path, wxT("w+b")); +#else // wx_fdopen + int fd = wxTempOpen(path, deleteOnClose); + if (fd == -1) + return false; + file->Attach(wx_fdopen(fd, "w+b"), path); + return file->IsOpened(); +#endif // wx_fdopen +} +#endif // wxUSE_FFILE + + +#if !wxUSE_FILE + #define WXFILEARGS(x, y) y +#elif !wxUSE_FFILE + #define WXFILEARGS(x, y) x +#else + #define WXFILEARGS(x, y) x, y +#endif + + +// Implementation of wxFileName::CreateTempFileName(). +// +static wxString wxCreateTempImpl( + const wxString& prefix, + WXFILEARGS(wxFile *fileTemp, wxFFile *ffileTemp), + bool *deleteOnClose = NULL) +{ +#if wxUSE_FILE && wxUSE_FFILE + wxASSERT(fileTemp == NULL || ffileTemp == NULL); +#endif + wxString path, dir, name; + bool wantDeleteOnClose = false; + + if (deleteOnClose) + { + // set the result to false initially + wantDeleteOnClose = *deleteOnClose; + *deleteOnClose = false; + } + else + { + // easier if it alwasys points to something + deleteOnClose = &wantDeleteOnClose; + } + + // use the directory specified by the prefix + wxFileName::SplitPath(prefix, &dir, &name, NULL /* extension */); + + if (dir.empty()) + { + dir = wxFileName::GetTempDir(); + } + +#if defined(__WXWINCE__) + path = dir + wxT("\\") + name; + int i = 1; + while (wxFileName::FileExists(path)) + { + path = dir + wxT("\\") + name ; + path << i; + i ++; + } + +#elif defined(__WINDOWS__) && !defined(__WXMICROWIN__) + if (!::GetTempFileName(dir.t_str(), name.t_str(), 0, + wxStringBuffer(path, MAX_PATH + 1))) + { + wxLogLastError(wxT("GetTempFileName")); + + path.clear(); + } + +#else // !Windows + path = dir; + + if ( !wxEndsWithPathSeparator(dir) && + (name.empty() || !wxIsPathSeparator(name[0u])) ) + { + path += wxFILE_SEP_PATH; + } + + path += name; + +#if defined(HAVE_MKSTEMP) + // scratch space for mkstemp() + path += wxT("XXXXXX"); + + // we need to copy the path to the buffer in which mkstemp() can modify it + wxCharBuffer buf(path.fn_str()); + + // cast is safe because the string length doesn't change + int fdTemp = mkstemp( (char*)(const char*) buf ); + if ( fdTemp == -1 ) + { + // this might be not necessary as mkstemp() on most systems should have + // already done it but it doesn't hurt neither... + path.clear(); + } + else // mkstemp() succeeded + { + path = wxConvFile.cMB2WX( (const char*) buf ); + + #if wxUSE_FILE + // avoid leaking the fd + if ( fileTemp ) + { + fileTemp->Attach(fdTemp); + } + else + #endif + + #if wxUSE_FFILE + if ( ffileTemp ) + { + #ifdef wx_fdopen + ffileTemp->Attach(wx_fdopen(fdTemp, "r+b"), path); + #else + ffileTemp->Open(path, wxT("r+b")); + close(fdTemp); + #endif + } + else + #endif + + { + close(fdTemp); + } + } +#else // !HAVE_MKSTEMP + +#ifdef HAVE_MKTEMP + // same as above + path += wxT("XXXXXX"); + + wxCharBuffer buf = wxConvFile.cWX2MB( path ); + if ( !mktemp( (char*)(const char*) buf ) ) + { + path.clear(); + } + else + { + path = wxConvFile.cMB2WX( (const char*) buf ); + } +#else // !HAVE_MKTEMP (includes __DOS__) + // generate the unique file name ourselves + #if !defined(__DOS__) + path << (unsigned int)getpid(); + #endif + + wxString pathTry; + + static const size_t numTries = 1000; + for ( size_t n = 0; n < numTries; n++ ) + { + // 3 hex digits is enough for numTries == 1000 < 4096 + pathTry = path + wxString::Format(wxT("%.03x"), (unsigned int) n); + if ( !wxFileName::FileExists(pathTry) ) + { + break; + } + + pathTry.clear(); + } + + path = pathTry; +#endif // HAVE_MKTEMP/!HAVE_MKTEMP + +#endif // HAVE_MKSTEMP/!HAVE_MKSTEMP + +#endif // Windows/!Windows + + if ( path.empty() ) + { + wxLogSysError(_("Failed to create a temporary file name")); + } + else + { + bool ok = true; + + // open the file - of course, there is a race condition here, this is + // why we always prefer using mkstemp()... + #if wxUSE_FILE + if ( fileTemp && !fileTemp->IsOpened() ) + { + *deleteOnClose = wantDeleteOnClose; + int fd = wxTempOpen(path, deleteOnClose); + if (fd != -1) + fileTemp->Attach(fd); + else + ok = false; + } + #endif + + #if wxUSE_FFILE + if ( ffileTemp && !ffileTemp->IsOpened() ) + { + *deleteOnClose = wantDeleteOnClose; + ok = wxTempOpen(ffileTemp, path, deleteOnClose); + } + #endif + + if ( !ok ) + { + // FIXME: If !ok here should we loop and try again with another + // file name? That is the standard recourse if open(O_EXCL) + // fails, though of course it should be protected against + // possible infinite looping too. + + wxLogError(_("Failed to open temporary file.")); + + path.clear(); + } + } + + return path; +} + + +static bool wxCreateTempImpl( + const wxString& prefix, + WXFILEARGS(wxFile *fileTemp, wxFFile *ffileTemp), + wxString *name) +{ + bool deleteOnClose = true; + + *name = wxCreateTempImpl(prefix, + WXFILEARGS(fileTemp, ffileTemp), + &deleteOnClose); + + bool ok = !name->empty(); + + if (deleteOnClose) + name->clear(); +#ifdef __UNIX__ + else if (ok && wxRemoveFile(*name)) + name->clear(); +#endif + + return ok; +} + + +static void wxAssignTempImpl( + wxFileName *fn, + const wxString& prefix, + WXFILEARGS(wxFile *fileTemp, wxFFile *ffileTemp)) +{ + wxString tempname; + tempname = wxCreateTempImpl(prefix, WXFILEARGS(fileTemp, ffileTemp)); + + if ( tempname.empty() ) + { + // error, failed to get temp file name + fn->Clear(); + } + else // ok + { + fn->Assign(tempname); + } +} + + +void wxFileName::AssignTempFileName(const wxString& prefix) +{ + wxAssignTempImpl(this, prefix, WXFILEARGS(NULL, NULL)); +} + +/* static */ +wxString wxFileName::CreateTempFileName(const wxString& prefix) +{ + return wxCreateTempImpl(prefix, WXFILEARGS(NULL, NULL)); +} + +#endif // wxUSE_FILE || wxUSE_FFILE + + +#if wxUSE_FILE + +wxString wxCreateTempFileName(const wxString& prefix, + wxFile *fileTemp, + bool *deleteOnClose) +{ + return wxCreateTempImpl(prefix, WXFILEARGS(fileTemp, NULL), deleteOnClose); +} + +bool wxCreateTempFile(const wxString& prefix, + wxFile *fileTemp, + wxString *name) +{ + return wxCreateTempImpl(prefix, WXFILEARGS(fileTemp, NULL), name); +} + +void wxFileName::AssignTempFileName(const wxString& prefix, wxFile *fileTemp) +{ + wxAssignTempImpl(this, prefix, WXFILEARGS(fileTemp, NULL)); +} + +/* static */ +wxString +wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp) +{ + return wxCreateTempFileName(prefix, fileTemp); +} + +#endif // wxUSE_FILE + + +#if wxUSE_FFILE + +wxString wxCreateTempFileName(const wxString& prefix, + wxFFile *fileTemp, + bool *deleteOnClose) +{ + return wxCreateTempImpl(prefix, WXFILEARGS(NULL, fileTemp), deleteOnClose); +} + +bool wxCreateTempFile(const wxString& prefix, + wxFFile *fileTemp, + wxString *name) +{ + return wxCreateTempImpl(prefix, WXFILEARGS(NULL, fileTemp), name); + +} + +void wxFileName::AssignTempFileName(const wxString& prefix, wxFFile *fileTemp) +{ + wxAssignTempImpl(this, prefix, WXFILEARGS(NULL, fileTemp)); +} + +/* static */ +wxString +wxFileName::CreateTempFileName(const wxString& prefix, wxFFile *fileTemp) +{ + return wxCreateTempFileName(prefix, fileTemp); +} + +#endif // wxUSE_FFILE + + +// ---------------------------------------------------------------------------- +// directory operations +// ---------------------------------------------------------------------------- + +// helper of GetTempDir(): check if the given directory exists and return it if +// it does or an empty string otherwise +namespace +{ + +wxString CheckIfDirExists(const wxString& dir) +{ + return wxFileName::DirExists(dir) ? dir : wxString(); +} + +} // anonymous namespace + +wxString wxFileName::GetTempDir() +{ + // first try getting it from environment: this allows overriding the values + // used by default if the user wants to create temporary files in another + // directory + wxString dir = CheckIfDirExists(wxGetenv("TMPDIR")); + if ( dir.empty() ) + { + dir = CheckIfDirExists(wxGetenv("TMP")); + if ( dir.empty() ) + dir = CheckIfDirExists(wxGetenv("TEMP")); + } + + // if no environment variables are set, use the system default + if ( dir.empty() ) + { +#if defined(__WXWINCE__) + dir = CheckIfDirExists(wxT("\\temp")); +#elif defined(__WINDOWS__) && !defined(__WXMICROWIN__) + if ( !::GetTempPath(MAX_PATH, wxStringBuffer(dir, MAX_PATH + 1)) ) + { + wxLogLastError(wxT("GetTempPath")); + } +#elif defined(__WXMAC__) && wxOSX_USE_CARBON + dir = wxMacFindFolderNoSeparator(short(kOnSystemDisk), kTemporaryFolderType, kCreateFolder); +#endif // systems with native way + } + else // we got directory from an environment variable + { + // remove any trailing path separators, we don't want to ever return + // them from this function for consistency + const size_t lastNonSep = dir.find_last_not_of(GetPathSeparators()); + if ( lastNonSep == wxString::npos ) + { + // the string consists entirely of separators, leave only one + dir = GetPathSeparator(); + } + else + { + dir.erase(lastNonSep + 1); + } + } + + // fall back to hard coded value + if ( dir.empty() ) + { +#ifdef __UNIX_LIKE__ + dir = CheckIfDirExists("/tmp"); + if ( dir.empty() ) +#endif // __UNIX_LIKE__ + dir = "."; + } + + return dir; +} + +bool wxFileName::Mkdir( int perm, int flags ) const +{ + return wxFileName::Mkdir(GetPath(), perm, flags); +} + +bool wxFileName::Mkdir( const wxString& dir, int perm, int flags ) +{ + if ( flags & wxPATH_MKDIR_FULL ) + { + // split the path in components + wxFileName filename; + filename.AssignDir(dir); + + wxString currPath; + if ( filename.HasVolume()) + { + currPath << wxGetVolumeString(filename.GetVolume(), wxPATH_NATIVE); + } + + wxArrayString dirs = filename.GetDirs(); + size_t count = dirs.GetCount(); + for ( size_t i = 0; i < count; i++ ) + { + if ( i > 0 || filename.IsAbsolute() ) + currPath += wxFILE_SEP_PATH; + currPath += dirs[i]; + + if (!DirExists(currPath)) + { + if (!wxMkdir(currPath, perm)) + { + // no need to try creating further directories + return false; + } + } + } + + return true; + + } + + return ::wxMkdir( dir, perm ); +} + +bool wxFileName::Rmdir(int flags) const +{ + return wxFileName::Rmdir( GetPath(), flags ); +} + +bool wxFileName::Rmdir(const wxString& dir, int flags) +{ +#ifdef __WINDOWS__ + if ( flags & wxPATH_RMDIR_RECURSIVE ) + { + // SHFileOperation needs double null termination string + // but without separator at the end of the path + wxString path(dir); + if ( path.Last() == wxFILE_SEP_PATH ) + path.RemoveLast(); + path += wxT('\0'); + + SHFILEOPSTRUCT fileop; + wxZeroMemory(fileop); + fileop.wFunc = FO_DELETE; + fileop.pFrom = path.t_str(); + fileop.fFlags = FOF_SILENT | FOF_NOCONFIRMATION; + #ifndef __WXWINCE__ + // FOF_NOERRORUI is not defined in WinCE + fileop.fFlags |= FOF_NOERRORUI; + #endif + + int ret = SHFileOperation(&fileop); + if ( ret != 0 ) + { + // SHFileOperation may return non-Win32 error codes, so the error + // message can be incorrect + wxLogApiError(wxT("SHFileOperation"), ret); + return false; + } + + return true; + } + else if ( flags & wxPATH_RMDIR_FULL ) +#else // !__WINDOWS__ + if ( flags != 0 ) // wxPATH_RMDIR_FULL or wxPATH_RMDIR_RECURSIVE +#endif // !__WINDOWS__ + { +#ifndef __WINDOWS__ + if ( flags & wxPATH_RMDIR_RECURSIVE ) + { + // When deleting the tree recursively, we are supposed to delete + // this directory itself even when it is a symlink -- but without + // following it. Do it here as wxRmdir() would simply follow if + // called for a symlink. + if ( wxFileName::Exists(dir, wxFILE_EXISTS_SYMLINK) ) + { + return wxRemoveFile(dir); + } + } +#endif // !__WINDOWS__ + + wxString path(dir); + if ( path.Last() != wxFILE_SEP_PATH ) + path += wxFILE_SEP_PATH; + + wxDir d(path); + + if ( !d.IsOpened() ) + return false; + + wxString filename; + + // First delete all subdirectories: notice that we don't follow + // symbolic links, potentially leading outside this directory, to avoid + // unpleasant surprises. + bool cont = d.GetFirst(&filename, wxString(), + wxDIR_DIRS | wxDIR_HIDDEN | wxDIR_NO_FOLLOW); + while ( cont ) + { + wxFileName::Rmdir(path + filename, flags); + cont = d.GetNext(&filename); + } + +#ifndef __WINDOWS__ + if ( flags & wxPATH_RMDIR_RECURSIVE ) + { + // Delete all files too and, for the same reasons as above, don't + // follow symlinks which could refer to the files outside of this + // directory and just delete the symlinks themselves. + cont = d.GetFirst(&filename, wxString(), + wxDIR_FILES | wxDIR_HIDDEN | wxDIR_NO_FOLLOW); + while ( cont ) + { + ::wxRemoveFile(path + filename); + cont = d.GetNext(&filename); + } + } +#endif // !__WINDOWS__ + } + + return ::wxRmdir(dir); +} + +// ---------------------------------------------------------------------------- +// path normalization +// ---------------------------------------------------------------------------- + +bool wxFileName::Normalize(int flags, + const wxString& cwd, + wxPathFormat format) +{ + // deal with env vars renaming first as this may seriously change the path + if ( flags & wxPATH_NORM_ENV_VARS ) + { + wxString pathOrig = GetFullPath(format); + wxString path = wxExpandEnvVars(pathOrig); + if ( path != pathOrig ) + { + Assign(path); + } + } + + // the existing path components + wxArrayString dirs = GetDirs(); + + // the path to prepend in front to make the path absolute + wxFileName curDir; + + format = GetFormat(format); + + // set up the directory to use for making the path absolute later + if ( (flags & wxPATH_NORM_ABSOLUTE) && !IsAbsolute(format) ) + { + if ( cwd.empty() ) + { + curDir.AssignCwd(GetVolume()); + } + else // cwd provided + { + curDir.AssignDir(cwd); + } + } + + // handle ~ stuff under Unix only + if ( (format == wxPATH_UNIX) && (flags & wxPATH_NORM_TILDE) && m_relative ) + { + if ( !dirs.IsEmpty() ) + { + wxString dir = dirs[0u]; + if ( !dir.empty() && dir[0u] == wxT('~') ) + { + // to make the path absolute use the home directory + curDir.AssignDir(wxGetUserHome(dir.c_str() + 1)); + dirs.RemoveAt(0u); + } + } + } + + // transform relative path into abs one + if ( curDir.IsOk() ) + { + // this path may be relative because it doesn't have the volume name + // and still have m_relative=true; in this case we shouldn't modify + // our directory components but just set the current volume + if ( !HasVolume() && curDir.HasVolume() ) + { + SetVolume(curDir.GetVolume()); + + if ( !m_relative ) + { + // yes, it was the case - we don't need curDir then + curDir.Clear(); + } + } + + // finally, prepend curDir to the dirs array + wxArrayString dirsNew = curDir.GetDirs(); + WX_PREPEND_ARRAY(dirs, dirsNew); + + // if we used e.g. tilde expansion previously and wxGetUserHome didn't + // return for some reason an absolute path, then curDir maybe not be absolute! + if ( !curDir.m_relative ) + { + // we have prepended an absolute path and thus we are now an absolute + // file name too + m_relative = false; + } + // else if (flags & wxPATH_NORM_ABSOLUTE): + // should we warn the user that we didn't manage to make the path absolute? + } + + // now deal with ".", ".." and the rest + m_dirs.Empty(); + size_t count = dirs.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + wxString dir = dirs[n]; + + if ( flags & wxPATH_NORM_DOTS ) + { + if ( dir == wxT(".") ) + { + // just ignore + continue; + } + + if ( dir == wxT("..") ) + { + if ( m_dirs.empty() ) + { + // We have more ".." than directory components so far. + // Don't treat this as an error as the path could have been + // entered by user so try to handle it reasonably: if the + // path is absolute, just ignore the extra ".." because + // "/.." is the same as "/". Otherwise, i.e. for relative + // paths, keep ".." unchanged because removing it would + // modify the file a relative path refers to. + if ( !m_relative ) + continue; + + } + else // Normal case, go one step up. + { + m_dirs.pop_back(); + continue; + } + } + } + + m_dirs.Add(dir); + } + +#if defined(__WIN32__) && !defined(__WXWINCE__) && wxUSE_OLE + if ( (flags & wxPATH_NORM_SHORTCUT) ) + { + wxString filename; + if (GetShortcutTarget(GetFullPath(format), filename)) + { + m_relative = false; + Assign(filename); + } + } +#endif + +#if defined(__WIN32__) + if ( (flags & wxPATH_NORM_LONG) && (format == wxPATH_DOS) ) + { + Assign(GetLongPath()); + } +#endif // Win32 + + // Change case (this should be kept at the end of the function, to ensure + // that the path doesn't change any more after we normalize its case) + if ( (flags & wxPATH_NORM_CASE) && !IsCaseSensitive(format) ) + { + m_volume.MakeLower(); + m_name.MakeLower(); + m_ext.MakeLower(); + + // directory entries must be made lower case as well + count = m_dirs.GetCount(); + for ( size_t i = 0; i < count; i++ ) + { + m_dirs[i].MakeLower(); + } + } + + return true; +} + +#ifndef __WXWINCE__ +bool wxFileName::ReplaceEnvVariable(const wxString& envname, + const wxString& replacementFmtString, + wxPathFormat format) +{ + // look into stringForm for the contents of the given environment variable + wxString val; + if (envname.empty() || + !wxGetEnv(envname, &val)) + return false; + if (val.empty()) + return false; + + wxString stringForm = GetPath(wxPATH_GET_VOLUME, format); + // do not touch the file name and the extension + + wxString replacement = wxString::Format(replacementFmtString, envname); + stringForm.Replace(val, replacement); + + // Now assign ourselves the modified path: + Assign(stringForm, GetFullName(), format); + + return true; +} +#endif + +bool wxFileName::ReplaceHomeDir(wxPathFormat format) +{ + wxString homedir = wxGetHomeDir(); + if (homedir.empty()) + return false; + + wxString stringForm = GetPath(wxPATH_GET_VOLUME, format); + // do not touch the file name and the extension + + stringForm.Replace(homedir, "~"); + + // Now assign ourselves the modified path: + Assign(stringForm, GetFullName(), format); + + return true; +} + +// ---------------------------------------------------------------------------- +// get the shortcut target +// ---------------------------------------------------------------------------- + +// WinCE (3) doesn't have CLSID_ShellLink, IID_IShellLink definitions. +// The .lnk file is a plain text file so it should be easy to +// make it work. Hint from Google Groups: +// "If you open up a lnk file, you'll see a +// number, followed by a pound sign (#), followed by more text. The +// number is the number of characters that follows the pound sign. The +// characters after the pound sign are the command line (which _can_ +// include arguments) to be executed. Any path (e.g. \windows\program +// files\myapp.exe) that includes spaces needs to be enclosed in +// quotation marks." + +#if defined(__WIN32__) && !defined(__WXWINCE__) && wxUSE_OLE + +bool wxFileName::GetShortcutTarget(const wxString& shortcutPath, + wxString& targetFilename, + wxString* arguments) const +{ + wxString path, file, ext; + wxFileName::SplitPath(shortcutPath, & path, & file, & ext); + + HRESULT hres; + IShellLink* psl; + bool success = false; + + // Assume it's not a shortcut if it doesn't end with lnk + if (ext.CmpNoCase(wxT("lnk"))!=0) + return false; + + // create a ShellLink object + hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + IID_IShellLink, (LPVOID*) &psl); + + if (SUCCEEDED(hres)) + { + IPersistFile* ppf; + hres = psl->QueryInterface( IID_IPersistFile, (LPVOID *) &ppf); + if (SUCCEEDED(hres)) + { + WCHAR wsz[MAX_PATH]; + + MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, shortcutPath.mb_str(), -1, wsz, + MAX_PATH); + + hres = ppf->Load(wsz, 0); + ppf->Release(); + + if (SUCCEEDED(hres)) + { + wxChar buf[2048]; + // Wrong prototype in early versions +#if defined(__MINGW32__) && !wxCHECK_W32API_VERSION(2, 2) + psl->GetPath((CHAR*) buf, 2048, NULL, SLGP_UNCPRIORITY); +#else + psl->GetPath(buf, 2048, NULL, SLGP_UNCPRIORITY); +#endif + targetFilename = wxString(buf); + success = (shortcutPath != targetFilename); + + psl->GetArguments(buf, 2048); + wxString args(buf); + if (!args.empty() && arguments) + { + *arguments = args; + } + } + } + + psl->Release(); + } + return success; +} + +#endif // __WIN32__ && !__WXWINCE__ + + +// ---------------------------------------------------------------------------- +// absolute/relative paths +// ---------------------------------------------------------------------------- + +bool wxFileName::IsAbsolute(wxPathFormat format) const +{ + // unix paths beginning with ~ are reported as being absolute + if ( format == wxPATH_UNIX ) + { + if ( !m_dirs.IsEmpty() ) + { + wxString dir = m_dirs[0u]; + + if (!dir.empty() && dir[0u] == wxT('~')) + return true; + } + } + + // if our path doesn't start with a path separator, it's not an absolute + // path + if ( m_relative ) + return false; + + if ( !GetVolumeSeparator(format).empty() ) + { + // this format has volumes and an absolute path must have one, it's not + // enough to have the full path to be an absolute file under Windows + if ( GetVolume().empty() ) + return false; + } + + return true; +} + +bool wxFileName::MakeRelativeTo(const wxString& pathBase, wxPathFormat format) +{ + wxFileName fnBase = wxFileName::DirName(pathBase, format); + + // get cwd only once - small time saving + wxString cwd = wxGetCwd(); + Normalize(wxPATH_NORM_ALL & ~wxPATH_NORM_CASE, cwd, format); + fnBase.Normalize(wxPATH_NORM_ALL & ~wxPATH_NORM_CASE, cwd, format); + + bool withCase = IsCaseSensitive(format); + + // we can't do anything if the files live on different volumes + if ( !GetVolume().IsSameAs(fnBase.GetVolume(), withCase) ) + { + // nothing done + return false; + } + + // same drive, so we don't need our volume + m_volume.clear(); + + // remove common directories starting at the top + while ( !m_dirs.IsEmpty() && !fnBase.m_dirs.IsEmpty() && + m_dirs[0u].IsSameAs(fnBase.m_dirs[0u], withCase) ) + { + m_dirs.RemoveAt(0); + fnBase.m_dirs.RemoveAt(0); + } + + // add as many ".." as needed + size_t count = fnBase.m_dirs.GetCount(); + for ( size_t i = 0; i < count; i++ ) + { + m_dirs.Insert(wxT(".."), 0u); + } + + if ( format == wxPATH_UNIX || format == wxPATH_DOS ) + { + // a directory made relative with respect to itself is '.' under Unix + // and DOS, by definition (but we don't have to insert "./" for the + // files) + if ( m_dirs.IsEmpty() && IsDir() ) + { + m_dirs.Add(wxT('.')); + } + } + + m_relative = true; + + // we were modified + return true; +} + +// ---------------------------------------------------------------------------- +// filename kind tests +// ---------------------------------------------------------------------------- + +bool wxFileName::SameAs(const wxFileName& filepath, wxPathFormat format) const +{ + wxFileName fn1 = *this, + fn2 = filepath; + + // get cwd only once - small time saving + wxString cwd = wxGetCwd(); + fn1.Normalize(wxPATH_NORM_ALL | wxPATH_NORM_CASE, cwd, format); + fn2.Normalize(wxPATH_NORM_ALL | wxPATH_NORM_CASE, cwd, format); + + if ( fn1.GetFullPath() == fn2.GetFullPath() ) + return true; + +#ifdef wxHAVE_LSTAT + wxStructStat st1, st2; + if ( StatAny(st1, fn1) && StatAny(st2, fn2) ) + { + if ( st1.st_ino == st2.st_ino && st1.st_dev == st2.st_dev ) + return true; + } + //else: It's not an error if one or both files don't exist. +#endif // wxHAVE_LSTAT + + return false; +} + +/* static */ +bool wxFileName::IsCaseSensitive( wxPathFormat format ) +{ + // only Unix filenames are truly case-sensitive + return GetFormat(format) == wxPATH_UNIX; +} + +/* static */ +wxString wxFileName::GetForbiddenChars(wxPathFormat format) +{ + // Inits to forbidden characters that are common to (almost) all platforms. + wxString strForbiddenChars = wxT("*?"); + + // If asserts, wxPathFormat has been changed. In case of a new path format + // addition, the following code might have to be updated. + wxCOMPILE_TIME_ASSERT(wxPATH_MAX == 5, wxPathFormatChanged); + switch ( GetFormat(format) ) + { + default : + wxFAIL_MSG( wxT("Unknown path format") ); + // !! Fall through !! + + case wxPATH_UNIX: + break; + + case wxPATH_MAC: + // On a Mac even names with * and ? are allowed (Tested with OS + // 9.2.1 and OS X 10.2.5) + strForbiddenChars.clear(); + break; + + case wxPATH_DOS: + strForbiddenChars += wxT("\\/:\"<>|"); + break; + + case wxPATH_VMS: + break; + } + + return strForbiddenChars; +} + +/* static */ +wxString wxFileName::GetVolumeSeparator(wxPathFormat WXUNUSED_IN_WINCE(format)) +{ +#ifdef __WXWINCE__ + return wxEmptyString; +#else + wxString sepVol; + + if ( (GetFormat(format) == wxPATH_DOS) || + (GetFormat(format) == wxPATH_VMS) ) + { + sepVol = wxFILE_SEP_DSK; + } + //else: leave empty + + return sepVol; +#endif +} + +/* static */ +wxString wxFileName::GetPathSeparators(wxPathFormat format) +{ + wxString seps; + switch ( GetFormat(format) ) + { + case wxPATH_DOS: + // accept both as native APIs do but put the native one first as + // this is the one we use in GetFullPath() + seps << wxFILE_SEP_PATH_DOS << wxFILE_SEP_PATH_UNIX; + break; + + default: + wxFAIL_MSG( wxT("Unknown wxPATH_XXX style") ); + // fall through + + case wxPATH_UNIX: + seps = wxFILE_SEP_PATH_UNIX; + break; + + case wxPATH_MAC: + seps = wxFILE_SEP_PATH_MAC; + break; + + case wxPATH_VMS: + seps = wxFILE_SEP_PATH_VMS; + break; + } + + return seps; +} + +/* static */ +wxString wxFileName::GetPathTerminators(wxPathFormat format) +{ + format = GetFormat(format); + + // under VMS the end of the path is ']', not the path separator used to + // separate the components + return format == wxPATH_VMS ? wxString(wxT(']')) : GetPathSeparators(format); +} + +/* static */ +bool wxFileName::IsPathSeparator(wxChar ch, wxPathFormat format) +{ + // wxString::Find() doesn't work as expected with NUL - it will always find + // it, so test for it separately + return ch != wxT('\0') && GetPathSeparators(format).Find(ch) != wxNOT_FOUND; +} + +/* static */ +bool +wxFileName::IsMSWUniqueVolumeNamePath(const wxString& path, wxPathFormat format) +{ + // return true if the format used is the DOS/Windows one and the string begins + // with a Windows unique volume name ("\\?\Volume{guid}\") + return format == wxPATH_DOS && + path.length() >= wxMSWUniqueVolumePrefixLength && + path.StartsWith(wxS("\\\\?\\Volume{")) && + path[wxMSWUniqueVolumePrefixLength - 1] == wxFILE_SEP_PATH_DOS; +} + +// ---------------------------------------------------------------------------- +// path components manipulation +// ---------------------------------------------------------------------------- + +/* static */ bool wxFileName::IsValidDirComponent(const wxString& dir) +{ + if ( dir.empty() ) + { + wxFAIL_MSG( wxT("empty directory passed to wxFileName::InsertDir()") ); + + return false; + } + + const size_t len = dir.length(); + for ( size_t n = 0; n < len; n++ ) + { + if ( dir[n] == GetVolumeSeparator() || IsPathSeparator(dir[n]) ) + { + wxFAIL_MSG( wxT("invalid directory component in wxFileName") ); + + return false; + } + } + + return true; +} + +bool wxFileName::AppendDir( const wxString& dir ) +{ + if (!IsValidDirComponent(dir)) + return false; + m_dirs.Add(dir); + return true; +} + +void wxFileName::PrependDir( const wxString& dir ) +{ + InsertDir(0, dir); +} + +bool wxFileName::InsertDir(size_t before, const wxString& dir) +{ + if (!IsValidDirComponent(dir)) + return false; + m_dirs.Insert(dir, before); + return true; +} + +void wxFileName::RemoveDir(size_t pos) +{ + m_dirs.RemoveAt(pos); +} + +// ---------------------------------------------------------------------------- +// accessors +// ---------------------------------------------------------------------------- + +void wxFileName::SetFullName(const wxString& fullname) +{ + SplitPath(fullname, NULL /* no volume */, NULL /* no path */, + &m_name, &m_ext, &m_hasExt); +} + +wxString wxFileName::GetFullName() const +{ + wxString fullname = m_name; + if ( m_hasExt ) + { + fullname << wxFILE_SEP_EXT << m_ext; + } + + return fullname; +} + +wxString wxFileName::GetPath( int flags, wxPathFormat format ) const +{ + format = GetFormat( format ); + + wxString fullpath; + + // return the volume with the path as well if requested + if ( flags & wxPATH_GET_VOLUME ) + { + fullpath += wxGetVolumeString(GetVolume(), format); + } + + // the leading character + switch ( format ) + { + case wxPATH_MAC: + if ( m_relative ) + fullpath += wxFILE_SEP_PATH_MAC; + break; + + case wxPATH_DOS: + if ( !m_relative ) + fullpath += wxFILE_SEP_PATH_DOS; + break; + + default: + wxFAIL_MSG( wxT("Unknown path format") ); + // fall through + + case wxPATH_UNIX: + if ( !m_relative ) + { + fullpath += wxFILE_SEP_PATH_UNIX; + } + break; + + case wxPATH_VMS: + // no leading character here but use this place to unset + // wxPATH_GET_SEPARATOR flag: under VMS it doesn't make sense + // as, if I understand correctly, there should never be a dot + // before the closing bracket + flags &= ~wxPATH_GET_SEPARATOR; + } + + if ( m_dirs.empty() ) + { + // there is nothing more + return fullpath; + } + + // then concatenate all the path components using the path separator + if ( format == wxPATH_VMS ) + { + fullpath += wxT('['); + } + + const size_t dirCount = m_dirs.GetCount(); + for ( size_t i = 0; i < dirCount; i++ ) + { + switch (format) + { + case wxPATH_MAC: + if ( m_dirs[i] == wxT(".") ) + { + // skip appending ':', this shouldn't be done in this + // case as "::" is interpreted as ".." under Unix + continue; + } + + // convert back from ".." to nothing + if ( !m_dirs[i].IsSameAs(wxT("..")) ) + fullpath += m_dirs[i]; + break; + + default: + wxFAIL_MSG( wxT("Unexpected path format") ); + // still fall through + + case wxPATH_DOS: + case wxPATH_UNIX: + fullpath += m_dirs[i]; + break; + + case wxPATH_VMS: + // TODO: What to do with ".." under VMS + + // convert back from ".." to nothing + if ( !m_dirs[i].IsSameAs(wxT("..")) ) + fullpath += m_dirs[i]; + break; + } + + if ( (flags & wxPATH_GET_SEPARATOR) || (i != dirCount - 1) ) + fullpath += GetPathSeparator(format); + } + + if ( format == wxPATH_VMS ) + { + fullpath += wxT(']'); + } + + return fullpath; +} + +wxString wxFileName::GetFullPath( wxPathFormat format ) const +{ + // we already have a function to get the path + wxString fullpath = GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR, + format); + + // now just add the file name and extension to it + fullpath += GetFullName(); + + return fullpath; +} + +// Return the short form of the path (returns identity on non-Windows platforms) +wxString wxFileName::GetShortPath() const +{ + wxString path(GetFullPath()); + +#if defined(__WINDOWS__) && defined(__WIN32__) && !defined(__WXMICROWIN__) && !defined(__WXWINCE__) + DWORD sz = ::GetShortPathName(path.t_str(), NULL, 0); + if ( sz != 0 ) + { + wxString pathOut; + if ( ::GetShortPathName + ( + path.t_str(), + wxStringBuffer(pathOut, sz), + sz + ) != 0 ) + { + return pathOut; + } + } +#endif // Windows + + return path; +} + +// Return the long form of the path (returns identity on non-Windows platforms) +wxString wxFileName::GetLongPath() const +{ + wxString pathOut, + path = GetFullPath(); + +#if defined(__WIN32__) && !defined(__WXWINCE__) && !defined(__WXMICROWIN__) + +#if wxUSE_DYNLIB_CLASS + typedef DWORD (WINAPI *GET_LONG_PATH_NAME)(const wxChar *, wxChar *, DWORD); + + // this is MT-safe as in the worst case we're going to resolve the function + // twice -- but as the result is the same in both threads, it's ok + static GET_LONG_PATH_NAME s_pfnGetLongPathName = NULL; + if ( !s_pfnGetLongPathName ) + { + static bool s_triedToLoad = false; + + if ( !s_triedToLoad ) + { + s_triedToLoad = true; + + wxDynamicLibrary dllKernel(wxT("kernel32")); + + const wxChar* GetLongPathName = wxT("GetLongPathName") +#if wxUSE_UNICODE + wxT("W"); +#else // ANSI + wxT("A"); +#endif // Unicode/ANSI + + if ( dllKernel.HasSymbol(GetLongPathName) ) + { + s_pfnGetLongPathName = (GET_LONG_PATH_NAME) + dllKernel.GetSymbol(GetLongPathName); + } + + // note that kernel32.dll can be unloaded, it stays in memory + // anyhow as all Win32 programs link to it and so it's safe to call + // GetLongPathName() even after unloading it + } + } + + if ( s_pfnGetLongPathName ) + { + DWORD dwSize = (*s_pfnGetLongPathName)(path.t_str(), NULL, 0); + if ( dwSize > 0 ) + { + if ( (*s_pfnGetLongPathName) + ( + path.t_str(), + wxStringBuffer(pathOut, dwSize), + dwSize + ) != 0 ) + { + return pathOut; + } + } + } +#endif // wxUSE_DYNLIB_CLASS + + // The OS didn't support GetLongPathName, or some other error. + // We need to call FindFirstFile on each component in turn. + + WIN32_FIND_DATA findFileData; + HANDLE hFind; + + if ( HasVolume() ) + pathOut = GetVolume() + + GetVolumeSeparator(wxPATH_DOS) + + GetPathSeparator(wxPATH_DOS); + else + pathOut.clear(); + + wxArrayString dirs = GetDirs(); + dirs.Add(GetFullName()); + + wxString tmpPath; + + size_t count = dirs.GetCount(); + for ( size_t i = 0; i < count; i++ ) + { + const wxString& dir = dirs[i]; + + // We're using pathOut to collect the long-name path, but using a + // temporary for appending the last path component which may be + // short-name + tmpPath = pathOut + dir; + + // We must not process "." or ".." here as they would be (unexpectedly) + // replaced by the corresponding directory names so just leave them + // alone + // + // And we can't pass a drive and root dir to FindFirstFile (VZ: why?) + if ( tmpPath.empty() || dir == '.' || dir == ".." || + tmpPath.Last() == GetVolumeSeparator(wxPATH_DOS) ) + { + tmpPath += wxFILE_SEP_PATH; + pathOut = tmpPath; + continue; + } + + hFind = ::FindFirstFile(tmpPath.t_str(), &findFileData); + if (hFind == INVALID_HANDLE_VALUE) + { + // Error: most likely reason is that path doesn't exist, so + // append any unprocessed parts and return + for ( i += 1; i < count; i++ ) + tmpPath += wxFILE_SEP_PATH + dirs[i]; + + return tmpPath; + } + + pathOut += findFileData.cFileName; + if ( (i < (count-1)) ) + pathOut += wxFILE_SEP_PATH; + + ::FindClose(hFind); + } +#else // !Win32 + pathOut = path; +#endif // Win32/!Win32 + + return pathOut; +} + +wxPathFormat wxFileName::GetFormat( wxPathFormat format ) +{ + if (format == wxPATH_NATIVE) + { +#if defined(__WINDOWS__) || defined(__OS2__) || defined(__DOS__) + format = wxPATH_DOS; +#elif defined(__VMS) + format = wxPATH_VMS; +#else + format = wxPATH_UNIX; +#endif + } + return format; +} + +#ifdef wxHAS_FILESYSTEM_VOLUMES + +/* static */ +wxString wxFileName::GetVolumeString(char drive, int flags) +{ + wxASSERT_MSG( !(flags & ~wxPATH_GET_SEPARATOR), "invalid flag specified" ); + + wxString vol(drive); + vol += wxFILE_SEP_DSK; + if ( flags & wxPATH_GET_SEPARATOR ) + vol += wxFILE_SEP_PATH; + + return vol; +} + +#endif // wxHAS_FILESYSTEM_VOLUMES + +// ---------------------------------------------------------------------------- +// path splitting function +// ---------------------------------------------------------------------------- + +/* static */ +void +wxFileName::SplitVolume(const wxString& fullpathWithVolume, + wxString *pstrVolume, + wxString *pstrPath, + wxPathFormat format) +{ + format = GetFormat(format); + + wxString fullpath = fullpathWithVolume; + + if ( IsMSWUniqueVolumeNamePath(fullpath, format) ) + { + // special Windows unique volume names hack: transform + // \\?\Volume{guid}\path into Volume{guid}:path + // note: this check must be done before the check for UNC path + + // we know the last backslash from the unique volume name is located + // there from IsMSWUniqueVolumeNamePath + fullpath[wxMSWUniqueVolumePrefixLength - 1] = wxFILE_SEP_DSK; + + // paths starting with a unique volume name should always be absolute + fullpath.insert(wxMSWUniqueVolumePrefixLength, 1, wxFILE_SEP_PATH_DOS); + + // remove the leading "\\?\" part + fullpath.erase(0, 4); + } + else if ( IsUNCPath(fullpath, format) ) + { + // special Windows UNC paths hack: transform \\share\path into share:path + + fullpath.erase(0, 2); + + size_t posFirstSlash = + fullpath.find_first_of(GetPathTerminators(format)); + if ( posFirstSlash != wxString::npos ) + { + fullpath[posFirstSlash] = wxFILE_SEP_DSK; + + // UNC paths are always absolute, right? (FIXME) + fullpath.insert(posFirstSlash + 1, 1, wxFILE_SEP_PATH_DOS); + } + } + + // We separate the volume here + if ( format == wxPATH_DOS || format == wxPATH_VMS ) + { + wxString sepVol = GetVolumeSeparator(format); + + // we have to exclude the case of a colon in the very beginning of the + // string as it can't be a volume separator (nor can this be a valid + // DOS file name at all but we'll leave dealing with this to our caller) + size_t posFirstColon = fullpath.find_first_of(sepVol); + if ( posFirstColon && posFirstColon != wxString::npos ) + { + if ( pstrVolume ) + { + *pstrVolume = fullpath.Left(posFirstColon); + } + + // remove the volume name and the separator from the full path + fullpath.erase(0, posFirstColon + sepVol.length()); + } + } + + if ( pstrPath ) + *pstrPath = fullpath; +} + +/* static */ +void wxFileName::SplitPath(const wxString& fullpathWithVolume, + wxString *pstrVolume, + wxString *pstrPath, + wxString *pstrName, + wxString *pstrExt, + bool *hasExt, + wxPathFormat format) +{ + format = GetFormat(format); + + wxString fullpath; + SplitVolume(fullpathWithVolume, pstrVolume, &fullpath, format); + + // find the positions of the last dot and last path separator in the path + size_t posLastDot = fullpath.find_last_of(wxFILE_SEP_EXT); + size_t posLastSlash = fullpath.find_last_of(GetPathTerminators(format)); + + // check whether this dot occurs at the very beginning of a path component + if ( (posLastDot != wxString::npos) && + (posLastDot == 0 || + IsPathSeparator(fullpath[posLastDot - 1]) || + (format == wxPATH_VMS && fullpath[posLastDot - 1] == wxT(']'))) ) + { + // dot may be (and commonly -- at least under Unix -- is) the first + // character of the filename, don't treat the entire filename as + // extension in this case + posLastDot = wxString::npos; + } + + // if we do have a dot and a slash, check that the dot is in the name part + if ( (posLastDot != wxString::npos) && + (posLastSlash != wxString::npos) && + (posLastDot < posLastSlash) ) + { + // the dot is part of the path, not the start of the extension + posLastDot = wxString::npos; + } + + // now fill in the variables provided by user + if ( pstrPath ) + { + if ( posLastSlash == wxString::npos ) + { + // no path at all + pstrPath->Empty(); + } + else + { + // take everything up to the path separator but take care to make + // the path equal to something like '/', not empty, for the files + // immediately under root directory + size_t len = posLastSlash; + + // this rule does not apply to mac since we do not start with colons (sep) + // except for relative paths + if ( !len && format != wxPATH_MAC) + len++; + + *pstrPath = fullpath.Left(len); + + // special VMS hack: remove the initial bracket + if ( format == wxPATH_VMS ) + { + if ( (*pstrPath)[0u] == wxT('[') ) + pstrPath->erase(0, 1); + } + } + } + + if ( pstrName ) + { + // take all characters starting from the one after the last slash and + // up to, but excluding, the last dot + size_t nStart = posLastSlash == wxString::npos ? 0 : posLastSlash + 1; + size_t count; + if ( posLastDot == wxString::npos ) + { + // take all until the end + count = wxString::npos; + } + else if ( posLastSlash == wxString::npos ) + { + count = posLastDot; + } + else // have both dot and slash + { + count = posLastDot - posLastSlash - 1; + } + + *pstrName = fullpath.Mid(nStart, count); + } + + // finally deal with the extension here: we have an added complication that + // extension may be empty (but present) as in "foo." where trailing dot + // indicates the empty extension at the end -- and hence we must remember + // that we have it independently of pstrExt + if ( posLastDot == wxString::npos ) + { + // no extension + if ( pstrExt ) + pstrExt->clear(); + if ( hasExt ) + *hasExt = false; + } + else + { + // take everything after the dot + if ( pstrExt ) + *pstrExt = fullpath.Mid(posLastDot + 1); + if ( hasExt ) + *hasExt = true; + } +} + +/* static */ +void wxFileName::SplitPath(const wxString& fullpath, + wxString *path, + wxString *name, + wxString *ext, + wxPathFormat format) +{ + wxString volume; + SplitPath(fullpath, &volume, path, name, ext, format); + + if ( path ) + { + path->Prepend(wxGetVolumeString(volume, format)); + } +} + +/* static */ +wxString wxFileName::StripExtension(const wxString& fullpath) +{ + wxFileName fn(fullpath); + fn.SetExt(""); + return fn.GetFullPath(); +} + +// ---------------------------------------------------------------------------- +// file permissions functions +// ---------------------------------------------------------------------------- + +bool wxFileName::SetPermissions(int permissions) +{ + // Don't do anything for a symlink but first make sure it is one. + if ( m_dontFollowLinks && + Exists(wxFILE_EXISTS_SYMLINK|wxFILE_EXISTS_NO_FOLLOW) ) + { + // Looks like changing permissions for a symlinc is only supported + // on BSD where lchmod is present and correctly implemented. + // http://lists.gnu.org/archive/html/bug-coreutils/2009-09/msg00268.html + return false; + } + +#ifdef __WINDOWS__ + int accMode = 0; + + if ( permissions & (wxS_IRUSR|wxS_IRGRP|wxS_IROTH) ) + accMode = _S_IREAD; + + if ( permissions & (wxS_IWUSR|wxS_IWGRP|wxS_IWOTH) ) + accMode |= _S_IWRITE; + + permissions = accMode; +#endif // __WINDOWS__ + + return wxChmod(GetFullPath(), permissions) == 0; +} + +// ---------------------------------------------------------------------------- +// time functions +// ---------------------------------------------------------------------------- + +#if wxUSE_DATETIME + +bool wxFileName::SetTimes(const wxDateTime *dtAccess, + const wxDateTime *dtMod, + const wxDateTime *dtCreate) const +{ +#if defined(__WIN32__) + FILETIME ftAccess, ftCreate, ftWrite; + + if ( dtCreate ) + ConvertWxToFileTime(&ftCreate, *dtCreate); + if ( dtAccess ) + ConvertWxToFileTime(&ftAccess, *dtAccess); + if ( dtMod ) + ConvertWxToFileTime(&ftWrite, *dtMod); + + wxString path; + int flags; + if ( IsDir() ) + { + if ( wxGetOsVersion() == wxOS_WINDOWS_9X ) + { + wxLogError(_("Setting directory access times is not supported " + "under this OS version")); + return false; + } + + path = GetPath(); + flags = FILE_FLAG_BACKUP_SEMANTICS; + } + else // file + { + path = GetFullPath(); + flags = 0; + } + + wxFileHandle fh(path, wxFileHandle::WriteAttr, flags); + if ( fh.IsOk() ) + { + if ( ::SetFileTime(fh, + dtCreate ? &ftCreate : NULL, + dtAccess ? &ftAccess : NULL, + dtMod ? &ftWrite : NULL) ) + { + return true; + } + } +#elif defined(__UNIX_LIKE__) || (defined(__DOS__) && defined(__WATCOMC__)) + wxUnusedVar(dtCreate); + + if ( !dtAccess && !dtMod ) + { + // can't modify the creation time anyhow, don't try + return true; + } + + // if dtAccess or dtMod is not specified, use the other one (which must be + // non NULL because of the test above) for both times + utimbuf utm; + utm.actime = dtAccess ? dtAccess->GetTicks() : dtMod->GetTicks(); + utm.modtime = dtMod ? dtMod->GetTicks() : dtAccess->GetTicks(); + if ( utime(GetFullPath().fn_str(), &utm) == 0 ) + { + return true; + } +#else // other platform + wxUnusedVar(dtAccess); + wxUnusedVar(dtMod); + wxUnusedVar(dtCreate); +#endif // platforms + + wxLogSysError(_("Failed to modify file times for '%s'"), + GetFullPath().c_str()); + + return false; +} + +bool wxFileName::Touch() const +{ +#if defined(__UNIX_LIKE__) + // under Unix touching file is simple: just pass NULL to utime() + if ( utime(GetFullPath().fn_str(), NULL) == 0 ) + { + return true; + } + + wxLogSysError(_("Failed to touch the file '%s'"), GetFullPath().c_str()); + + return false; +#else // other platform + wxDateTime dtNow = wxDateTime::Now(); + + return SetTimes(&dtNow, &dtNow, NULL /* don't change create time */); +#endif // platforms +} + +bool wxFileName::GetTimes(wxDateTime *dtAccess, + wxDateTime *dtMod, + wxDateTime *dtCreate) const +{ +#if defined(__WIN32__) + // we must use different methods for the files and directories under + // Windows as CreateFile(GENERIC_READ) doesn't work for the directories and + // CreateFile(FILE_FLAG_BACKUP_SEMANTICS) works -- but only under NT and + // not 9x + bool ok; + FILETIME ftAccess, ftCreate, ftWrite; + if ( IsDir() ) + { + // implemented in msw/dir.cpp + extern bool wxGetDirectoryTimes(const wxString& dirname, + FILETIME *, FILETIME *, FILETIME *); + + // we should pass the path without the trailing separator to + // wxGetDirectoryTimes() + ok = wxGetDirectoryTimes(GetPath(wxPATH_GET_VOLUME), + &ftAccess, &ftCreate, &ftWrite); + } + else // file + { + wxFileHandle fh(GetFullPath(), wxFileHandle::ReadAttr); + if ( fh.IsOk() ) + { + ok = ::GetFileTime(fh, + dtCreate ? &ftCreate : NULL, + dtAccess ? &ftAccess : NULL, + dtMod ? &ftWrite : NULL) != 0; + } + else + { + ok = false; + } + } + + if ( ok ) + { + if ( dtCreate ) + ConvertFileTimeToWx(dtCreate, ftCreate); + if ( dtAccess ) + ConvertFileTimeToWx(dtAccess, ftAccess); + if ( dtMod ) + ConvertFileTimeToWx(dtMod, ftWrite); + + return true; + } +#elif defined(wxHAVE_LSTAT) + // no need to test for IsDir() here + wxStructStat stBuf; + if ( StatAny(stBuf, *this) ) + { + // Android defines st_*time fields as unsigned long, but time_t as long, + // hence the static_casts. + if ( dtAccess ) + dtAccess->Set(static_cast(stBuf.st_atime)); + if ( dtMod ) + dtMod->Set(static_cast(stBuf.st_mtime)); + if ( dtCreate ) + dtCreate->Set(static_cast(stBuf.st_ctime)); + + return true; + } +#else // other platform + wxUnusedVar(dtAccess); + wxUnusedVar(dtMod); + wxUnusedVar(dtCreate); +#endif // platforms + + wxLogSysError(_("Failed to retrieve file times for '%s'"), + GetFullPath().c_str()); + + return false; +} + +#endif // wxUSE_DATETIME + + +// ---------------------------------------------------------------------------- +// file size functions +// ---------------------------------------------------------------------------- + +#if wxUSE_LONGLONG + +/* static */ +wxULongLong wxFileName::GetSize(const wxString &filename) +{ + if (!wxFileExists(filename)) + return wxInvalidSize; + +#if defined(__WIN32__) + wxFileHandle f(filename, wxFileHandle::ReadAttr); + if (!f.IsOk()) + return wxInvalidSize; + + DWORD lpFileSizeHigh; + DWORD ret = GetFileSize(f, &lpFileSizeHigh); + if ( ret == INVALID_FILE_SIZE && ::GetLastError() != NO_ERROR ) + return wxInvalidSize; + + return wxULongLong(lpFileSizeHigh, ret); +#else // ! __WIN32__ + wxStructStat st; + if (wxStat( filename, &st) != 0) + return wxInvalidSize; + return wxULongLong(st.st_size); +#endif +} + +/* static */ +wxString wxFileName::GetHumanReadableSize(const wxULongLong &bs, + const wxString &nullsize, + int precision, + wxSizeConvention conv) +{ + // deal with trivial case first + if ( bs == 0 || bs == wxInvalidSize ) + return nullsize; + + // depending on the convention used the multiplier may be either 1000 or + // 1024 and the binary infix may be empty (for "KB") or "i" (for "KiB") + double multiplier = 1024.; + wxString biInfix; + + switch ( conv ) + { + case wxSIZE_CONV_TRADITIONAL: + // nothing to do, this corresponds to the default values of both + // the multiplier and infix string + break; + + case wxSIZE_CONV_IEC: + biInfix = "i"; + break; + + case wxSIZE_CONV_SI: + multiplier = 1000; + break; + } + + const double kiloByteSize = multiplier; + const double megaByteSize = multiplier * kiloByteSize; + const double gigaByteSize = multiplier * megaByteSize; + const double teraByteSize = multiplier * gigaByteSize; + + const double bytesize = bs.ToDouble(); + + wxString result; + if ( bytesize < kiloByteSize ) + result.Printf("%s B", bs.ToString()); + else if ( bytesize < megaByteSize ) + result.Printf("%.*f K%sB", precision, bytesize/kiloByteSize, biInfix); + else if (bytesize < gigaByteSize) + result.Printf("%.*f M%sB", precision, bytesize/megaByteSize, biInfix); + else if (bytesize < teraByteSize) + result.Printf("%.*f G%sB", precision, bytesize/gigaByteSize, biInfix); + else + result.Printf("%.*f T%sB", precision, bytesize/teraByteSize, biInfix); + + return result; +} + +wxULongLong wxFileName::GetSize() const +{ + return GetSize(GetFullPath()); +} + +wxString wxFileName::GetHumanReadableSize(const wxString& failmsg, + int precision, + wxSizeConvention conv) const +{ + return GetHumanReadableSize(GetSize(), failmsg, precision, conv); +} + +#endif // wxUSE_LONGLONG + +// ---------------------------------------------------------------------------- +// Mac-specific functions +// ---------------------------------------------------------------------------- + +#if defined( __WXOSX_MAC__ ) && wxOSX_USE_CARBON + +namespace +{ + +class MacDefaultExtensionRecord +{ +public: + MacDefaultExtensionRecord() + { + m_type = + m_creator = 0 ; + } + + // default copy ctor, assignment operator and dtor are ok + + MacDefaultExtensionRecord(const wxString& ext, OSType type, OSType creator) + : m_ext(ext) + { + m_type = type; + m_creator = creator; + } + + wxString m_ext; + OSType m_type; + OSType m_creator; +}; + +WX_DECLARE_OBJARRAY(MacDefaultExtensionRecord, MacDefaultExtensionArray); + +bool gMacDefaultExtensionsInited = false; + +#include "wx/arrimpl.cpp" + +WX_DEFINE_EXPORTED_OBJARRAY(MacDefaultExtensionArray); + +MacDefaultExtensionArray gMacDefaultExtensions; + +// load the default extensions +const MacDefaultExtensionRecord gDefaults[] = +{ + MacDefaultExtensionRecord( "txt", 'TEXT', 'ttxt' ), + MacDefaultExtensionRecord( "tif", 'TIFF', '****' ), + MacDefaultExtensionRecord( "jpg", 'JPEG', '****' ), +}; + +void MacEnsureDefaultExtensionsLoaded() +{ + if ( !gMacDefaultExtensionsInited ) + { + // we could load the pc exchange prefs here too + for ( size_t i = 0 ; i < WXSIZEOF( gDefaults ) ; ++i ) + { + gMacDefaultExtensions.Add( gDefaults[i] ) ; + } + gMacDefaultExtensionsInited = true; + } +} + +} // anonymous namespace + +bool wxFileName::MacSetTypeAndCreator( wxUint32 type , wxUint32 creator ) +{ + FSRef fsRef ; + FSCatalogInfo catInfo; + FileInfo *finfo ; + + if ( wxMacPathToFSRef( GetFullPath() , &fsRef ) == noErr ) + { + if ( FSGetCatalogInfo (&fsRef, kFSCatInfoFinderInfo, &catInfo, NULL, NULL, NULL) == noErr ) + { + finfo = (FileInfo*)&catInfo.finderInfo; + finfo->fileType = type ; + finfo->fileCreator = creator ; + FSSetCatalogInfo( &fsRef, kFSCatInfoFinderInfo, &catInfo ) ; + return true ; + } + } + return false ; +} + +bool wxFileName::MacGetTypeAndCreator( wxUint32 *type , wxUint32 *creator ) const +{ + FSRef fsRef ; + FSCatalogInfo catInfo; + FileInfo *finfo ; + + if ( wxMacPathToFSRef( GetFullPath() , &fsRef ) == noErr ) + { + if ( FSGetCatalogInfo (&fsRef, kFSCatInfoFinderInfo, &catInfo, NULL, NULL, NULL) == noErr ) + { + finfo = (FileInfo*)&catInfo.finderInfo; + *type = finfo->fileType ; + *creator = finfo->fileCreator ; + return true ; + } + } + return false ; +} + +bool wxFileName::MacSetDefaultTypeAndCreator() +{ + wxUint32 type , creator ; + if ( wxFileName::MacFindDefaultTypeAndCreator(GetExt() , &type , + &creator ) ) + { + return MacSetTypeAndCreator( type , creator ) ; + } + return false; +} + +bool wxFileName::MacFindDefaultTypeAndCreator( const wxString& ext , wxUint32 *type , wxUint32 *creator ) +{ + MacEnsureDefaultExtensionsLoaded() ; + wxString extl = ext.Lower() ; + for( int i = gMacDefaultExtensions.Count() - 1 ; i >= 0 ; --i ) + { + if ( gMacDefaultExtensions.Item(i).m_ext == extl ) + { + *type = gMacDefaultExtensions.Item(i).m_type ; + *creator = gMacDefaultExtensions.Item(i).m_creator ; + return true ; + } + } + return false ; +} + +void wxFileName::MacRegisterDefaultTypeAndCreator( const wxString& ext , wxUint32 type , wxUint32 creator ) +{ + MacEnsureDefaultExtensionsLoaded(); + MacDefaultExtensionRecord rec(ext.Lower(), type, creator); + gMacDefaultExtensions.Add( rec ); +} + +#endif // defined( __WXOSX_MAC__ ) && wxOSX_USE_CARBON diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/filepickercmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/filepickercmn.cpp new file mode 100644 index 0000000000..a58b4adfec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/filepickercmn.cpp @@ -0,0 +1,248 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/filepickercmn.cpp +// Purpose: wxFilePickerCtrl class implementation +// Author: Francesco Montorsi (readapted code written by Vadim Zeitlin) +// Modified by: +// Created: 15/04/2006 +// Copyright: (c) Vadim Zeitlin, Francesco Montorsi +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL + +#include "wx/filepicker.h" +#include "wx/filename.h" + +#ifndef WX_PRECOMP + #include "wx/textctrl.h" +#endif + +// ============================================================================ +// implementation +// ============================================================================ + +const char wxFilePickerCtrlNameStr[] = "filepicker"; +const char wxFilePickerWidgetNameStr[] = "filepickerwidget"; +const char wxDirPickerCtrlNameStr[] = "dirpicker"; +const char wxDirPickerWidgetNameStr[] = "dirpickerwidget"; +const char wxFilePickerWidgetLabel[] = wxTRANSLATE("Browse"); +const char wxDirPickerWidgetLabel[] = wxTRANSLATE("Browse"); + +wxDEFINE_EVENT( wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEvent ); +wxDEFINE_EVENT( wxEVT_DIRPICKER_CHANGED, wxFileDirPickerEvent ); +IMPLEMENT_DYNAMIC_CLASS(wxFileDirPickerEvent, wxCommandEvent) + +// ---------------------------------------------------------------------------- +// wxFileDirPickerCtrlBase +// ---------------------------------------------------------------------------- + +bool wxFileDirPickerCtrlBase::CreateBase(wxWindow *parent, + wxWindowID id, + const wxString &path, + const wxString &message, + const wxString &wildcard, + const wxPoint &pos, + const wxSize &size, + long style, + const wxValidator& validator, + const wxString &name ) +{ + if (!wxPickerBase::CreateBase(parent, id, path, pos, size, + style, validator, name)) + return false; + + if (!HasFlag(wxFLP_OPEN) && !HasFlag(wxFLP_SAVE)) + m_windowStyle |= wxFLP_OPEN; // wxFD_OPEN is the default + + // check that the styles are not contradictory + wxASSERT_MSG( !(HasFlag(wxFLP_SAVE) && HasFlag(wxFLP_OPEN)), + wxT("can't specify both wxFLP_SAVE and wxFLP_OPEN at once") ); + + wxASSERT_MSG( !HasFlag(wxFLP_SAVE) || !HasFlag(wxFLP_FILE_MUST_EXIST), + wxT("wxFLP_FILE_MUST_EXIST can't be used with wxFLP_SAVE" ) ); + + wxASSERT_MSG( !HasFlag(wxFLP_OPEN) || !HasFlag(wxFLP_OVERWRITE_PROMPT), + wxT("wxFLP_OVERWRITE_PROMPT can't be used with wxFLP_OPEN") ); + + // create a wxFilePickerWidget or a wxDirPickerWidget... + m_pickerIface = CreatePicker(this, path, message, wildcard); + if ( !m_pickerIface ) + return false; + m_picker = m_pickerIface->AsControl(); + + // complete sizer creation + wxPickerBase::PostCreation(); + + DoConnect( m_picker, this ); + + // default's wxPickerBase textctrl limit is too small for this control: + // make it bigger + if (m_text) m_text->SetMaxLength(512); + + return true; +} + +wxString wxFileDirPickerCtrlBase::GetPath() const +{ + return m_pickerIface->GetPath(); +} + +void wxFileDirPickerCtrlBase::SetPath(const wxString &path) +{ + m_pickerIface->SetPath(path); + UpdateTextCtrlFromPicker(); +} + +void wxFileDirPickerCtrlBase::UpdatePickerFromTextCtrl() +{ + wxASSERT(m_text); + + // remove the eventually present path-separator from the end of the textctrl + // string otherwise we would generate a wxFileDirPickerEvent when changing + // from e.g. /home/user to /home/user/ and we want to avoid it ! + wxString newpath(GetTextCtrlValue()); + + // Notice that we use to check here whether the current path is valid, i.e. + // if the corresponding file or directory exists for the controls with + // wxFLP_FILE_MUST_EXIST or wxDIRP_DIR_MUST_EXIST flag, however we don't do + // this any more as we still must notify the program about any changes in + // the control, otherwise its view of it would be different from what is + // actually shown on the screen, resulting in very confusing UI. + + if (m_pickerIface->GetPath() != newpath) + { + m_pickerIface->SetPath(newpath); + + // update current working directory, if necessary + // NOTE: the path separator is required because if newpath is "C:" + // then no change would happen + if (IsCwdToUpdate()) + wxSetWorkingDirectory(newpath); + + // fire an event + wxFileDirPickerEvent event(GetEventType(), this, GetId(), newpath); + GetEventHandler()->ProcessEvent(event); + } +} + +void wxFileDirPickerCtrlBase::UpdateTextCtrlFromPicker() +{ + if (!m_text) + return; // no textctrl to update + + // Take care to use ChangeValue() here and not SetValue() to avoid + // generating an event that would trigger UpdateTextCtrlFromPicker() + // resulting in infinite recursion. + m_text->ChangeValue(m_pickerIface->GetPath()); +} + + + +// ---------------------------------------------------------------------------- +// wxFileDirPickerCtrlBase - event handlers +// ---------------------------------------------------------------------------- + +void wxFileDirPickerCtrlBase::OnFileDirChange(wxFileDirPickerEvent &ev) +{ + UpdateTextCtrlFromPicker(); + + // the wxFilePickerWidget sent us a colour-change notification. + // forward this event to our parent + wxFileDirPickerEvent event(GetEventType(), this, GetId(), ev.GetPath()); + GetEventHandler()->ProcessEvent(event); +} + +#endif // wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL + +// ---------------------------------------------------------------------------- +// wxFileDirPickerCtrl +// ---------------------------------------------------------------------------- + +#if wxUSE_FILEPICKERCTRL + +IMPLEMENT_DYNAMIC_CLASS(wxFilePickerCtrl, wxPickerBase) + +bool wxFilePickerCtrl::Create(wxWindow *parent, + wxWindowID id, + const wxString& path, + const wxString& message, + const wxString& wildcard, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + if ( !wxFileDirPickerCtrlBase::CreateBase + ( + parent, id, path, message, wildcard, + pos, size, style, validator, name + ) ) + return false; + + if ( HasTextCtrl() ) + GetTextCtrl()->AutoCompleteFileNames(); + + return true; +} + +wxString wxFilePickerCtrl::GetTextCtrlValue() const +{ + // filter it through wxFileName to remove any spurious path separator + return wxFileName(m_text->GetValue()).GetFullPath(); +} + +#endif // wxUSE_FILEPICKERCTRL + +// ---------------------------------------------------------------------------- +// wxDirPickerCtrl +// ---------------------------------------------------------------------------- + +#if wxUSE_DIRPICKERCTRL +IMPLEMENT_DYNAMIC_CLASS(wxDirPickerCtrl, wxPickerBase) + +bool wxDirPickerCtrl::Create(wxWindow *parent, + wxWindowID id, + const wxString& path, + const wxString& message, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + if ( !wxFileDirPickerCtrlBase::CreateBase + ( + parent, id, path, message, wxString(), + pos, size, style, validator, name + ) ) + return false; + + if ( HasTextCtrl() ) + GetTextCtrl()->AutoCompleteDirectories(); + + return true; +} + +wxString wxDirPickerCtrl::GetTextCtrlValue() const +{ + // filter it through wxFileName to remove any spurious path separator + return wxFileName::DirName(m_text->GetValue()).GetPath(); +} + +#endif // wxUSE_DIRPICKERCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/filesys.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/filesys.cpp new file mode 100644 index 0000000000..06edca28a2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/filesys.cpp @@ -0,0 +1,783 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/filesys.cpp +// Purpose: wxFileSystem class - interface for opening files +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + + +#if wxUSE_FILESYSTEM + +#include "wx/filesys.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/module.h" +#endif + +#include "wx/sysopt.h" +#include "wx/wfstream.h" +#include "wx/mimetype.h" +#include "wx/filename.h" +#include "wx/tokenzr.h" +#include "wx/uri.h" +#include "wx/private/fileback.h" + +// ---------------------------------------------------------------------------- +// wxFSFile +// ---------------------------------------------------------------------------- + +const wxString& wxFSFile::GetMimeType() const +{ + if ( m_MimeType.empty() && !m_Location.empty() ) + { + wxConstCast(this, wxFSFile)->m_MimeType = + wxFileSystemHandler::GetMimeTypeFromExt(m_Location); + } + + return m_MimeType; +} + +// ---------------------------------------------------------------------------- +// wxFileSystemHandler +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxFileSystemHandler, wxObject) + + +/* static */ +wxString wxFileSystemHandler::GetMimeTypeFromExt(const wxString& location) +{ + wxString ext, mime; + wxString loc = GetRightLocation(location); + wxChar c; + int l = loc.length(), l2; + + l2 = l; + for (int i = l-1; i >= 0; i--) + { + c = loc[(unsigned int) i]; + if ( c == wxT('#') ) + l2 = i + 1; + if ( c == wxT('.') ) + { + ext = loc.Right(l2-i-1); + break; + } + if ( (c == wxT('/')) || (c == wxT('\\')) || (c == wxT(':')) ) + return wxEmptyString; + } + +#if wxUSE_MIMETYPE + static bool s_MinimalMimeEnsured = false; + + // Don't use mime types manager if the application doesn't need it and it would be + // cause an unacceptable delay, especially on startup. +#if wxUSE_SYSTEM_OPTIONS + if ( !wxSystemOptions::GetOptionInt(wxT("filesys.no-mimetypesmanager")) ) +#endif + { + if (!s_MinimalMimeEnsured) + { + static const wxFileTypeInfo fallbacks[] = + { + wxFileTypeInfo(wxT("image/jpeg"), + wxEmptyString, + wxEmptyString, + wxT("JPEG image (from fallback)"), + wxT("jpg"), wxT("jpeg"), wxT("JPG"), wxT("JPEG"), wxNullPtr), + wxFileTypeInfo(wxT("image/gif"), + wxEmptyString, + wxEmptyString, + wxT("GIF image (from fallback)"), + wxT("gif"), wxT("GIF"), wxNullPtr), + wxFileTypeInfo(wxT("image/png"), + wxEmptyString, + wxEmptyString, + wxT("PNG image (from fallback)"), + wxT("png"), wxT("PNG"), wxNullPtr), + wxFileTypeInfo(wxT("image/bmp"), + wxEmptyString, + wxEmptyString, + wxT("windows bitmap image (from fallback)"), + wxT("bmp"), wxT("BMP"), wxNullPtr), + wxFileTypeInfo(wxT("text/html"), + wxEmptyString, + wxEmptyString, + wxT("HTML document (from fallback)"), + wxT("htm"), wxT("html"), wxT("HTM"), wxT("HTML"), wxNullPtr), + // must terminate the table with this! + wxFileTypeInfo() + }; + wxTheMimeTypesManager->AddFallbacks(fallbacks); + s_MinimalMimeEnsured = true; + } + + wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(ext); + if ( !ft || !ft -> GetMimeType(&mime) ) + { + mime = wxEmptyString; + } + + delete ft; + + return mime; + } + else +#endif + { + if ( ext.IsSameAs(wxT("htm"), false) || ext.IsSameAs(wxT("html"), false) ) + return wxT("text/html"); + if ( ext.IsSameAs(wxT("jpg"), false) || ext.IsSameAs(wxT("jpeg"), false) ) + return wxT("image/jpeg"); + if ( ext.IsSameAs(wxT("gif"), false) ) + return wxT("image/gif"); + if ( ext.IsSameAs(wxT("png"), false) ) + return wxT("image/png"); + if ( ext.IsSameAs(wxT("bmp"), false) ) + return wxT("image/bmp"); + return wxEmptyString; + } +} + + + +/* static */ +wxString wxFileSystemHandler::GetProtocol(const wxString& location) +{ + wxString s = wxEmptyString; + int i, l = location.length(); + bool fnd = false; + + for (i = l-1; (i >= 0) && ((location[i] != wxT('#')) || (!fnd)); i--) { + if ((location[i] == wxT(':')) && (i != 1 /*win: C:\path*/)) fnd = true; + } + if (!fnd) return wxT("file"); + for (++i; (i < l) && (location[i] != wxT(':')); i++) s << location[i]; + return s; +} + + +/* static */ +wxString wxFileSystemHandler::GetLeftLocation(const wxString& location) +{ + int i; + bool fnd = false; + + for (i = location.length()-1; i >= 0; i--) { + if ((location[i] == wxT(':')) && (i != 1 /*win: C:\path*/)) fnd = true; + else if (fnd && (location[i] == wxT('#'))) return location.Left(i); + } + return wxEmptyString; +} + +/* static */ +wxString wxFileSystemHandler::GetRightLocation(const wxString& location) +{ + int i, l = location.length(); + int l2 = l + 1; + + for (i = l-1; + (i >= 0) && + ((location[i] != wxT(':')) || (i == 1) || (location[i-2] == wxT(':'))); + i--) + { + if (location[i] == wxT('#')) l2 = i + 1; + } + if (i == 0) return wxEmptyString; + else return location.Mid(i + 1, l2 - i - 2); +} + +/* static */ +wxString wxFileSystemHandler::GetAnchor(const wxString& location) +{ + wxChar c; + int l = location.length(); + + for (int i = l-1; i >= 0; i--) { + c = location[i]; + if (c == wxT('#')) + return location.Right(l-i-1); + else if ((c == wxT('/')) || (c == wxT('\\')) || (c == wxT(':'))) + return wxEmptyString; + } + return wxEmptyString; +} + + +wxString wxFileSystemHandler::FindFirst(const wxString& WXUNUSED(spec), + int WXUNUSED(flags)) +{ + return wxEmptyString; +} + +wxString wxFileSystemHandler::FindNext() +{ + return wxEmptyString; +} + +//-------------------------------------------------------------------------------- +// wxLocalFSHandler +//-------------------------------------------------------------------------------- + + +wxString wxLocalFSHandler::ms_root; + +bool wxLocalFSHandler::CanOpen(const wxString& location) +{ + return GetProtocol(location) == wxT("file"); +} + +wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location) +{ + // location has Unix path separators + wxString right = GetRightLocation(location); + wxFileName fn = wxFileSystem::URLToFileName(right); + wxString fullpath = ms_root + fn.GetFullPath(); + + if (!wxFileExists(fullpath)) + return NULL; + + // we need to check whether we can really read from this file, otherwise + // wxFSFile is not going to work +#if wxUSE_FFILE + wxFFileInputStream *is = new wxFFileInputStream(fullpath); +#elif wxUSE_FILE + wxFileInputStream *is = new wxFileInputStream(fullpath); +#else +#error One of wxUSE_FILE or wxUSE_FFILE must be set to 1 for wxFSHandler to work +#endif + if ( !is->IsOk() ) + { + delete is; + return NULL; + } + + return new wxFSFile(is, + location, + wxEmptyString, + GetAnchor(location) +#if wxUSE_DATETIME + ,wxDateTime(wxFileModificationTime(fullpath)) +#endif // wxUSE_DATETIME + ); +} + +wxString wxLocalFSHandler::FindFirst(const wxString& spec, int flags) +{ + wxFileName fn = wxFileSystem::URLToFileName(GetRightLocation(spec)); + const wxString found = wxFindFirstFile(ms_root + fn.GetFullPath(), flags); + if ( found.empty() ) + return found; + return wxFileSystem::FileNameToURL(found); +} + +wxString wxLocalFSHandler::FindNext() +{ + const wxString found = wxFindNextFile(); + if ( found.empty() ) + return found; + return wxFileSystem::FileNameToURL(found); +} + + + +//----------------------------------------------------------------------------- +// wxFileSystem +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxFileSystem, wxObject) +IMPLEMENT_ABSTRACT_CLASS(wxFSFile, wxObject) + + +wxList wxFileSystem::m_Handlers; + + +wxFileSystem::~wxFileSystem() +{ + WX_CLEAR_HASH_MAP(wxFSHandlerHash, m_LocalHandlers) +} + + +static wxString MakeCorrectPath(const wxString& path) +{ + wxString p(path); + wxString r; + int i, j, cnt; + + cnt = p.length(); + for (i = 0; i < cnt; i++) + if (p.GetChar(i) == wxT('\\')) p.GetWritableChar(i) = wxT('/'); // Want to be windows-safe + + if (p.Left(2) == wxT("./")) { p = p.Mid(2); cnt -= 2; } + + if (cnt < 3) return p; + + r << p.GetChar(0) << p.GetChar(1); + + // skip trailing ../.., if any + for (i = 2; i < cnt && (p.GetChar(i) == wxT('/') || p.GetChar(i) == wxT('.')); i++) r << p.GetChar(i); + + // remove back references: translate dir1/../dir2 to dir2 + for (; i < cnt; i++) + { + r << p.GetChar(i); + if (p.GetChar(i) == wxT('/') && p.GetChar(i-1) == wxT('.') && p.GetChar(i-2) == wxT('.')) + { + for (j = r.length() - 2; j >= 0 && r.GetChar(j) != wxT('/') && r.GetChar(j) != wxT(':'); j--) {} + if (j >= 0 && r.GetChar(j) != wxT(':')) + { + for (j = j - 1; j >= 0 && r.GetChar(j) != wxT('/') && r.GetChar(j) != wxT(':'); j--) {} + r.Remove(j + 1); + } + } + } + + for (; i < cnt; i++) r << p.GetChar(i); + + return r; +} + + +void wxFileSystem::ChangePathTo(const wxString& location, bool is_dir) +{ + int i, pathpos = -1; + + m_Path = MakeCorrectPath(location); + + if (is_dir) + { + if (!m_Path.empty() && m_Path.Last() != wxT('/') && m_Path.Last() != wxT(':')) + m_Path << wxT('/'); + } + + else + { + for (i = m_Path.length()-1; i >= 0; i--) + { + if (m_Path[(unsigned int) i] == wxT('/')) + { + if ((i > 1) && (m_Path[(unsigned int) (i-1)] == wxT('/')) && (m_Path[(unsigned int) (i-2)] == wxT(':'))) + { + i -= 2; + continue; + } + else + { + pathpos = i; + break; + } + } + else if (m_Path[(unsigned int) i] == wxT(':')) { + pathpos = i; + break; + } + } + if (pathpos == -1) + { + for (i = 0; i < (int) m_Path.length(); i++) + { + if (m_Path[(unsigned int) i] == wxT(':')) + { + m_Path.Remove(i+1); + break; + } + } + if (i == (int) m_Path.length()) + m_Path = wxEmptyString; + } + else + { + m_Path.Remove(pathpos+1); + } + } +} + + + +wxFileSystemHandler *wxFileSystem::MakeLocal(wxFileSystemHandler *h) +{ + wxClassInfo *classinfo = h->GetClassInfo(); + + if (classinfo->IsDynamic()) + { + wxFileSystemHandler*& local = m_LocalHandlers[classinfo]; + if (!local) + local = (wxFileSystemHandler*)classinfo->CreateObject(); + return local; + } + else + { + return h; + } +} + + + +wxFSFile* wxFileSystem::OpenFile(const wxString& location, int flags) +{ + if ((flags & wxFS_READ) == 0) + return NULL; + + wxString loc = MakeCorrectPath(location); + unsigned i, ln; + wxChar meta; + wxFSFile *s = NULL; + wxList::compatibility_iterator node; + + ln = loc.length(); + meta = 0; + for (i = 0; i < ln; i++) + { + switch ( loc[i].GetValue() ) + { + case wxT('/') : case wxT(':') : case wxT('#') : + meta = loc[i]; + break; + } + if (meta != 0) break; + } + m_LastName = wxEmptyString; + + // try relative paths first : + if (meta != wxT(':')) + { + node = m_Handlers.GetFirst(); + while (node) + { + wxFileSystemHandler *h = (wxFileSystemHandler*) node -> GetData(); + if (h->CanOpen(m_Path + loc)) + { + s = MakeLocal(h)->OpenFile(*this, m_Path + loc); + if (s) { m_LastName = m_Path + loc; break; } + } + node = node->GetNext(); + } + } + + // if failed, try absolute paths : + if (s == NULL) + { + node = m_Handlers.GetFirst(); + while (node) + { + wxFileSystemHandler *h = (wxFileSystemHandler*) node->GetData(); + if (h->CanOpen(loc)) + { + s = MakeLocal(h)->OpenFile(*this, loc); + if (s) { m_LastName = loc; break; } + } + node = node->GetNext(); + } + } + + if (s && (flags & wxFS_SEEKABLE) != 0 && !s->GetStream()->IsSeekable()) + { + wxBackedInputStream *stream; + stream = new wxBackedInputStream(s->DetachStream()); + stream->FindLength(); + s->SetStream(stream); + } + + return (s); +} + + + +wxString wxFileSystem::FindFirst(const wxString& spec, int flags) +{ + wxList::compatibility_iterator node; + wxString spec2(spec); + + m_FindFileHandler = NULL; + + for (int i = spec2.length()-1; i >= 0; i--) + if (spec2[(unsigned int) i] == wxT('\\')) spec2.GetWritableChar(i) = wxT('/'); // Want to be windows-safe + + node = m_Handlers.GetFirst(); + while (node) + { + wxFileSystemHandler *h = (wxFileSystemHandler*) node -> GetData(); + if (h -> CanOpen(m_Path + spec2)) + { + m_FindFileHandler = MakeLocal(h); + return m_FindFileHandler -> FindFirst(m_Path + spec2, flags); + } + node = node->GetNext(); + } + + node = m_Handlers.GetFirst(); + while (node) + { + wxFileSystemHandler *h = (wxFileSystemHandler*) node -> GetData(); + if (h -> CanOpen(spec2)) + { + m_FindFileHandler = MakeLocal(h); + return m_FindFileHandler -> FindFirst(spec2, flags); + } + node = node->GetNext(); + } + + return wxEmptyString; +} + + + +wxString wxFileSystem::FindNext() +{ + if (m_FindFileHandler == NULL) return wxEmptyString; + else return m_FindFileHandler -> FindNext(); +} + +bool wxFileSystem::FindFileInPath(wxString *pStr, + const wxString& path, + const wxString& basename) +{ + // we assume that it's not empty + wxCHECK_MSG( !basename.empty(), false, + wxT("empty file name in wxFileSystem::FindFileInPath")); + + wxString name; + // skip path separator in the beginning of the file name if present + if ( wxIsPathSeparator(basename[0u]) ) + name = basename.substr(1); + else + name = basename; + + wxStringTokenizer tokenizer(path, wxPATH_SEP); + while ( tokenizer.HasMoreTokens() ) + { + wxString strFile = tokenizer.GetNextToken(); + if ( !wxEndsWithPathSeparator(strFile) ) + strFile += wxFILE_SEP_PATH; + strFile += name; + + wxFSFile *file = OpenFile(strFile); + if ( file ) + { + delete file; + *pStr = strFile; + return true; + } + } + + return false; +} + +void wxFileSystem::AddHandler(wxFileSystemHandler *handler) +{ + // prepend the handler to the beginning of the list because handlers added + // last should have the highest priority to allow overriding them + m_Handlers.Insert((size_t)0, handler); +} + +wxFileSystemHandler* wxFileSystem::RemoveHandler(wxFileSystemHandler *handler) +{ + // if handler has already been removed (or deleted) + // we return NULL. This is by design in case + // CleanUpHandlers() is called before RemoveHandler + // is called, as we cannot control the order + // which modules are unloaded + if (!m_Handlers.DeleteObject(handler)) + return NULL; + + return handler; +} + + +bool wxFileSystem::HasHandlerForPath(const wxString &location) +{ + for ( wxList::compatibility_iterator node = m_Handlers.GetFirst(); + node; node = node->GetNext() ) + { + wxFileSystemHandler *h = (wxFileSystemHandler*) node->GetData(); + if (h->CanOpen(location)) + return true; + } + + return false; +} + +void wxFileSystem::CleanUpHandlers() +{ + WX_CLEAR_LIST(wxList, m_Handlers); +} + +static const wxString g_unixPathString(wxT("/")); +static const wxString g_nativePathString(wxFILE_SEP_PATH); + +// Returns the native path for a file URL +wxFileName wxFileSystem::URLToFileName(const wxString& url) +{ + wxString path = url; + + if ( path.Find(wxT("file://")) == 0 ) + { + path = path.Mid(7); + } + else if ( path.Find(wxT("file:")) == 0 ) + { + path = path.Mid(5); + } + // Remove preceding double slash on Mac Classic +#if defined(__WXMAC__) && !defined(__UNIX__) + else if ( path.Find(wxT("//")) == 0 ) + path = path.Mid(2); +#endif + + path = wxURI::Unescape(path); + +#ifdef __WINDOWS__ + // file urls either start with a forward slash (local harddisk), + // otherwise they have a servername/sharename notation, + // which only exists on msw and corresponds to a unc + if ( path.length() > 1 && (path[0u] == wxT('/') && path [1u] != wxT('/')) ) + { + path = path.Mid(1); + } + else if ( (url.Find(wxT("file://")) == 0) && + (path.Find(wxT('/')) != wxNOT_FOUND) && + (path.length() > 1) && (path[1u] != wxT(':')) ) + { + path = wxT("//") + path; + } +#endif + + path.Replace(g_unixPathString, g_nativePathString); + + return wxFileName(path, wxPATH_NATIVE); +} + +// Escapes non-ASCII and others characters in file: URL to be valid URLs +static wxString EscapeFileNameCharsInURL(const char *in) +{ + wxString s; + + for ( const unsigned char *p = (const unsigned char*)in; *p; ++p ) + { + const unsigned char c = *p; + + // notice that all colons *must* be encoded in the paths used by + // wxFileSystem even though this makes URLs produced by this method + // unusable with IE under Windows as it requires "file:///c:/foo.bar" + // and doesn't accept "file:///c%3a/foo.bar" -- but then we never made + // any guarantees about general suitability of the strings returned by + // this method, they must work with wxFileSystem only and not encoding + // the colon breaks handling of + // "http://wherever/whatever.zip#zip:filename.ext" URLs so we really + // can't do this without heavy changes to the parsing code here, in + // particular in GetRightLocation() + + if ( c == '/' || c == '-' || c == '.' || c == '_' || c == '~' || + (c >= '0' && c <= '9') || + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') ) + { + s << c; + } + else + { + s << wxString::Format("%%%02x", c); + } + } + + return s; +} + +// Returns the file URL for a native path +wxString wxFileSystem::FileNameToURL(const wxFileName& filename) +{ + wxFileName fn = filename; + fn.Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_TILDE | wxPATH_NORM_ABSOLUTE); + wxString url = fn.GetFullPath(wxPATH_NATIVE); + +#ifndef __UNIX__ + // unc notation, wxMSW + if ( url.Find(wxT("\\\\")) == 0 ) + { + url = wxT("//") + url.Mid(2); + } + else + { + url = wxT("/") + url; +#ifdef __WXMAC__ + url = wxT("/") + url; +#endif + + } +#endif + + url.Replace(g_nativePathString, g_unixPathString); + + // Do wxURI- and common practice-compatible escaping: encode the string + // into UTF-8, then escape anything non-ASCII: + return wxT("file:") + EscapeFileNameCharsInURL(url.utf8_str()); +} + + +///// Module: + +class wxFileSystemModule : public wxModule +{ + DECLARE_DYNAMIC_CLASS(wxFileSystemModule) + + public: + wxFileSystemModule() : + wxModule(), + m_handler(NULL) + { + } + + virtual bool OnInit() + { + m_handler = new wxLocalFSHandler; + wxFileSystem::AddHandler(m_handler); + return true; + } + virtual void OnExit() + { + delete wxFileSystem::RemoveHandler(m_handler); + + wxFileSystem::CleanUpHandlers(); + } + + private: + wxFileSystemHandler* m_handler; + +}; + +IMPLEMENT_DYNAMIC_CLASS(wxFileSystemModule, wxModule) + +//// wxFSInputStream + +wxFSInputStream::wxFSInputStream(const wxString& filename, int flags) +{ + wxFileSystem fs; + m_file = fs.OpenFile(filename, flags | wxFS_READ); + + if ( m_file ) + { + wxInputStream* const stream = m_file->GetStream(); + if ( stream ) + { + // Notice that we pass the stream by reference: it shouldn't be + // deleted by us as it's owned by m_file already. + InitParentStream(*stream); + } + } +} + +wxFSInputStream::~wxFSInputStream() +{ + delete m_file; +} + +#endif + // wxUSE_FILESYSTEM diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/filtall.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/filtall.cpp new file mode 100644 index 0000000000..bfdf31324b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/filtall.cpp @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/filtall.cpp +// Purpose: Link all filter streams +// Author: Mike Wetherell +// Copyright: (c) 2006 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS + +#if wxUSE_ZLIB +#include "wx/zstream.h" +#endif + +// Reference filter classes to ensure they are linked into a statically +// linked program that uses Find or GetFirst to look for an filter handler. +// It is in its own file so that the user can override this behaviour by +// providing their own implementation. + +void wxUseFilterClasses() +{ +#if wxUSE_ZLIB + wxZlibClassFactory(); + wxGzipClassFactory(); +#endif +} + +#endif // wxUSE_STREAMS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/filtfind.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/filtfind.cpp new file mode 100644 index 0000000000..9e25441fa2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/filtfind.cpp @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/filtfind.cpp +// Purpose: Streams for filter formats +// Author: Mike Wetherell +// Copyright: (c) Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS + +#include "wx/stream.h" + +// These functions are in a separate file so that statically linked apps +// that do not call them to search for filter handlers will only link in +// the filter classes they use. + +const wxFilterClassFactory * +wxFilterClassFactory::Find(const wxString& protocol, wxStreamProtocolType type) +{ + for (const wxFilterClassFactory *f = GetFirst(); f; f = f->GetNext()) + if (f->CanHandle(protocol, type)) + return f; + + return NULL; +} + +// static +const wxFilterClassFactory *wxFilterClassFactory::GetFirst() +{ + if (!sm_first) + wxUseFilterClasses(); + return sm_first; +} + +#endif // wxUSE_STREAMS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fldlgcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fldlgcmn.cpp new file mode 100644 index 0000000000..0b02b78409 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fldlgcmn.cpp @@ -0,0 +1,411 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fldlgcmn.cpp +// Purpose: wxFileDialog common functions +// Author: John Labenski +// Modified by: +// Created: 14.06.03 (extracted from src/*/filedlg.cpp) +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FILEDLG + +#include "wx/filedlg.h" +#include "wx/dirdlg.h" +#include "wx/filename.h" + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/window.h" +#endif // WX_PRECOMP + +extern WXDLLEXPORT_DATA(const char) wxFileDialogNameStr[] = "filedlg"; +extern WXDLLEXPORT_DATA(const char) wxFileSelectorPromptStr[] = "Select a file"; +extern WXDLLEXPORT_DATA(const char) wxFileSelectorDefaultWildcardStr[] = +#if defined(__WXMSW__) || defined(__OS2__) + "*.*" +#else // Unix/Mac + "*" +#endif + ; + +//---------------------------------------------------------------------------- +// wxFileDialogBase +//---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxFileDialogBase, wxDialog) + +void wxFileDialogBase::Init() +{ + m_filterIndex = 0; + m_windowStyle = 0; + m_extraControl = NULL; + m_extraControlCreator = NULL; +} + +bool wxFileDialogBase::Create(wxWindow *parent, + const wxString& message, + const wxString& defaultDir, + const wxString& defaultFile, + const wxString& wildCard, + long style, + const wxPoint& WXUNUSED(pos), + const wxSize& WXUNUSED(sz), + const wxString& WXUNUSED(name)) +{ + m_message = message; + m_dir = defaultDir; + m_fileName = defaultFile; + m_wildCard = wildCard; + + m_parent = parent; + +#ifdef __WXOSX__ + /* + [DS] + Remove the (for OS X unnecessary) wxFD_FILE_MUST_EXIST flag. Using it + causes problems when having an extra panel (either a custom one or + by showing the filetype filters through calling + wxSystemOptions::SetOption(wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES, 1) ). + Presumably the style flag conflicts with other style flags and an + assert in wxRegion::DoOffset is triggered later on. + Another solution was to override GetWindowStyleFlag() to not include + wxFD_FILE_MUST_EXIST in its return value, but as other wxFileDialog + style flags (that are actually used) dont't seem to cause problems + this seemed an easier solution. + */ + style &= ~wxFD_FILE_MUST_EXIST; +#endif + + m_windowStyle = style; + m_filterIndex = 0; + + if (!HasFdFlag(wxFD_OPEN) && !HasFdFlag(wxFD_SAVE)) + m_windowStyle |= wxFD_OPEN; // wxFD_OPEN is the default + + // check that the styles are not contradictory + wxASSERT_MSG( !(HasFdFlag(wxFD_SAVE) && HasFdFlag(wxFD_OPEN)), + wxT("can't specify both wxFD_SAVE and wxFD_OPEN at once") ); + + wxASSERT_MSG( !HasFdFlag(wxFD_SAVE) || + (!HasFdFlag(wxFD_MULTIPLE) && !HasFdFlag(wxFD_FILE_MUST_EXIST)), + wxT("wxFD_MULTIPLE or wxFD_FILE_MUST_EXIST can't be used with wxFD_SAVE" ) ); + + wxASSERT_MSG( !HasFdFlag(wxFD_OPEN) || !HasFdFlag(wxFD_OVERWRITE_PROMPT), + wxT("wxFD_OVERWRITE_PROMPT can't be used with wxFD_OPEN") ); + + if ( wildCard.empty() || wildCard == wxFileSelectorDefaultWildcardStr ) + { + m_wildCard = wxString::Format(_("All files (%s)|%s"), + wxFileSelectorDefaultWildcardStr, + wxFileSelectorDefaultWildcardStr); + } + else // have wild card + { + // convert m_wildCard from "*.bar" to "bar files (*.bar)|*.bar" + if ( m_wildCard.Find(wxT('|')) == wxNOT_FOUND ) + { + wxString::size_type nDot = m_wildCard.find(wxT("*.")); + if ( nDot != wxString::npos ) + nDot++; + else + nDot = 0; + + m_wildCard = wxString::Format + ( + _("%s files (%s)|%s"), + wildCard.c_str() + nDot, + wildCard.c_str(), + wildCard.c_str() + ); + } + } + + return true; +} + +#if WXWIN_COMPATIBILITY_2_6 +long wxFileDialogBase::GetStyle() const +{ + return GetWindowStyle(); +} + +void wxFileDialogBase::SetStyle(long style) +{ + SetWindowStyle(style); +} +#endif // WXWIN_COMPATIBILITY_2_6 + + +wxString wxFileDialogBase::AppendExtension(const wxString &filePath, + const wxString &extensionList) +{ + // strip off path, to avoid problems with "path.bar/foo" + wxString fileName = filePath.AfterLast(wxFILE_SEP_PATH); + + // if fileName is of form "foo.bar" it's ok, return it + int idx_dot = fileName.Find(wxT('.'), true); + if ((idx_dot != wxNOT_FOUND) && (idx_dot < (int)fileName.length() - 1)) + return filePath; + + // get the first extension from extensionList, or all of it + wxString ext = extensionList.BeforeFirst(wxT(';')); + + // if ext == "foo" or "foo." there's no extension + int idx_ext_dot = ext.Find(wxT('.'), true); + if ((idx_ext_dot == wxNOT_FOUND) || (idx_ext_dot == (int)ext.length() - 1)) + return filePath; + else + ext = ext.AfterLast(wxT('.')); + + // if ext == "*" or "bar*" or "b?r" or " " then its not valid + if ((ext.Find(wxT('*')) != wxNOT_FOUND) || + (ext.Find(wxT('?')) != wxNOT_FOUND) || + (ext.Strip(wxString::both).empty())) + return filePath; + + // if fileName doesn't have a '.' then add one + if (filePath.Last() != wxT('.')) + ext = wxT(".") + ext; + + return filePath + ext; +} + +bool wxFileDialogBase::SetExtraControlCreator(ExtraControlCreatorFunction creator) +{ + wxCHECK_MSG( !m_extraControlCreator, false, + "wxFileDialog::SetExtraControl() called second time" ); + + m_extraControlCreator = creator; + return SupportsExtraControl(); +} + +bool wxFileDialogBase::CreateExtraControl() +{ + if (!m_extraControlCreator || m_extraControl) + return false; + m_extraControl = (*m_extraControlCreator)(this); + return true; +} + +wxSize wxFileDialogBase::GetExtraControlSize() +{ + if ( !m_extraControlCreator ) + return wxDefaultSize; + + // create the extra control in an empty dialog just to find its size: this + // is not terribly efficient but we do need to know the size before + // creating the native dialog and this seems to be the only way + wxDialog dlg(NULL, wxID_ANY, ""); + return (*m_extraControlCreator)(&dlg)->GetSize(); +} + +void wxFileDialogBase::SetPath(const wxString& path) +{ + wxString ext; + wxFileName::SplitPath(path, &m_dir, &m_fileName, &ext); + if ( !ext.empty() ) + m_fileName << wxT('.') << ext; + m_path = path; +} + +void wxFileDialogBase::SetDirectory(const wxString& dir) +{ + m_dir = dir; + m_path = wxFileName(m_dir, m_fileName).GetFullPath(); +} + +void wxFileDialogBase::SetFilename(const wxString& name) +{ + m_fileName = name; + m_path = wxFileName(m_dir, m_fileName).GetFullPath(); +} + +//---------------------------------------------------------------------------- +// wxFileDialog convenience functions +//---------------------------------------------------------------------------- + +wxString wxFileSelector(const wxString& title, + const wxString& defaultDir, + const wxString& defaultFileName, + const wxString& defaultExtension, + const wxString& filter, + int flags, + wxWindow *parent, + int x, int y) +{ + // The defaultExtension, if non-empty, is + // appended to the filename if the user fails to type an extension. The new + // implementation (taken from wxFileSelectorEx) appends the extension + // automatically, by looking at the filter specification. In fact this + // should be better than the native Microsoft implementation because + // Windows only allows *one* default extension, whereas here we do the + // right thing depending on the filter the user has chosen. + + // If there's a default extension specified but no filter, we create a + // suitable filter. + + wxString filter2; + if ( !defaultExtension.empty() && filter.empty() ) + filter2 = wxString(wxT("*.")) + defaultExtension; + else if ( !filter.empty() ) + filter2 = filter; + + wxFileDialog fileDialog(parent, title, defaultDir, + defaultFileName, filter2, + flags, wxPoint(x, y)); + + // if filter is of form "All files (*)|*|..." set correct filter index + if ( !defaultExtension.empty() && filter2.find(wxT('|')) != wxString::npos ) + { + int filterIndex = 0; + + wxArrayString descriptions, filters; + // don't care about errors, handled already by wxFileDialog + (void)wxParseCommonDialogsFilter(filter2, descriptions, filters); + for (size_t n=0; n 0) + fileDialog.SetFilterIndex(filterIndex); + } + + wxString filename; + if ( fileDialog.ShowModal() == wxID_OK ) + { + filename = fileDialog.GetPath(); + } + + return filename; +} + +//---------------------------------------------------------------------------- +// wxFileSelectorEx +//---------------------------------------------------------------------------- + +wxString wxFileSelectorEx(const wxString& title, + const wxString& defaultDir, + const wxString& defaultFileName, + int* defaultFilterIndex, + const wxString& filter, + int flags, + wxWindow* parent, + int x, + int y) + +{ + wxFileDialog fileDialog(parent, + title, + defaultDir, + defaultFileName, + filter, + flags, wxPoint(x, y)); + + wxString filename; + if ( fileDialog.ShowModal() == wxID_OK ) + { + if ( defaultFilterIndex ) + *defaultFilterIndex = fileDialog.GetFilterIndex(); + + filename = fileDialog.GetPath(); + } + + return filename; +} + +//---------------------------------------------------------------------------- +// wxDefaultFileSelector - Generic load/save dialog (for internal use only) +//---------------------------------------------------------------------------- + +static wxString wxDefaultFileSelector(bool load, + const wxString& what, + const wxString& extension, + const wxString& default_name, + wxWindow *parent) +{ + wxString prompt; + wxString str; + if (load) + str = _("Load %s file"); + else + str = _("Save %s file"); + prompt.Printf(str, what); + + wxString wild; + wxString ext; + if ( !extension.empty() ) + { + if ( extension[0u] == wxT('.') ) + ext = extension.substr(1); + else + ext = extension; + + wild.Printf(wxT("*.%s"), ext); + } + else // no extension specified + { + wild = wxFileSelectorDefaultWildcardStr; + } + + return wxFileSelector(prompt, wxEmptyString, default_name, ext, wild, + load ? (wxFD_OPEN | wxFD_FILE_MUST_EXIST) : wxFD_SAVE, + parent); +} + +//---------------------------------------------------------------------------- +// wxLoadFileSelector +//---------------------------------------------------------------------------- + +WXDLLEXPORT wxString wxLoadFileSelector(const wxString& what, + const wxString& extension, + const wxString& default_name, + wxWindow *parent) +{ + return wxDefaultFileSelector(true, what, extension, default_name, parent); +} + +//---------------------------------------------------------------------------- +// wxSaveFileSelector +//---------------------------------------------------------------------------- + +WXDLLEXPORT wxString wxSaveFileSelector(const wxString& what, + const wxString& extension, + const wxString& default_name, + wxWindow *parent) +{ + return wxDefaultFileSelector(false, what, extension, default_name, parent); +} + + +//---------------------------------------------------------------------------- +// wxDirDialogBase +//---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_6 +long wxDirDialogBase::GetStyle() const +{ + return GetWindowStyle(); +} + +void wxDirDialogBase::SetStyle(long style) +{ + SetWindowStyle(style); +} +#endif // WXWIN_COMPATIBILITY_2_6 + + +#endif // wxUSE_FILEDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fmapbase.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fmapbase.cpp new file mode 100644 index 0000000000..698996c1b1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fmapbase.cpp @@ -0,0 +1,872 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/fmapbase.cpp +// Purpose: wxFontMapperBase class implementation +// Author: Vadim Zeitlin +// Modified by: +// Created: 21.06.2003 (extracted from common/fontmap.cpp) +// Copyright: (c) 1999-2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FONTMAP + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/module.h" + #include "wx/wxcrtvararg.h" +#endif //WX_PRECOMP + +#if defined(__WINDOWS__) + #include "wx/msw/private.h" // includes windows.h for LOGFONT + #include "wx/msw/winundef.h" +#endif + +#include "wx/fontmap.h" +#include "wx/fmappriv.h" + +#include "wx/apptrait.h" + +// wxMemoryConfig uses wxFileConfig +#if wxUSE_CONFIG && wxUSE_FILECONFIG + #include "wx/config.h" + #include "wx/memconf.h" +#endif + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// encodings supported by GetEncodingDescription +static const wxFontEncoding gs_encodings[] = +{ + wxFONTENCODING_ISO8859_1, + wxFONTENCODING_ISO8859_2, + wxFONTENCODING_ISO8859_3, + wxFONTENCODING_ISO8859_4, + wxFONTENCODING_ISO8859_5, + wxFONTENCODING_ISO8859_6, + wxFONTENCODING_ISO8859_7, + wxFONTENCODING_ISO8859_8, + wxFONTENCODING_ISO8859_9, + wxFONTENCODING_ISO8859_10, + wxFONTENCODING_ISO8859_11, + wxFONTENCODING_ISO8859_12, + wxFONTENCODING_ISO8859_13, + wxFONTENCODING_ISO8859_14, + wxFONTENCODING_ISO8859_15, + wxFONTENCODING_KOI8, + wxFONTENCODING_KOI8_U, + wxFONTENCODING_CP866, + wxFONTENCODING_CP874, + wxFONTENCODING_CP932, + wxFONTENCODING_CP936, + wxFONTENCODING_CP949, + wxFONTENCODING_CP950, + wxFONTENCODING_CP1250, + wxFONTENCODING_CP1251, + wxFONTENCODING_CP1252, + wxFONTENCODING_CP1253, + wxFONTENCODING_CP1254, + wxFONTENCODING_CP1255, + wxFONTENCODING_CP1256, + wxFONTENCODING_CP1257, + wxFONTENCODING_CP1258, + wxFONTENCODING_CP1361, + wxFONTENCODING_CP437, + wxFONTENCODING_UTF7, + wxFONTENCODING_UTF8, + wxFONTENCODING_UTF16BE, + wxFONTENCODING_UTF16LE, + wxFONTENCODING_UTF32BE, + wxFONTENCODING_UTF32LE, + wxFONTENCODING_EUC_JP, + wxFONTENCODING_DEFAULT, + wxFONTENCODING_ISO2022_JP, + + wxFONTENCODING_MACROMAN, + wxFONTENCODING_MACJAPANESE, + wxFONTENCODING_MACCHINESETRAD, + wxFONTENCODING_MACKOREAN, + wxFONTENCODING_MACARABIC, + wxFONTENCODING_MACHEBREW, + wxFONTENCODING_MACGREEK, + wxFONTENCODING_MACCYRILLIC, + wxFONTENCODING_MACDEVANAGARI, + wxFONTENCODING_MACGURMUKHI, + wxFONTENCODING_MACGUJARATI, + wxFONTENCODING_MACORIYA, + wxFONTENCODING_MACBENGALI, + wxFONTENCODING_MACTAMIL, + wxFONTENCODING_MACTELUGU, + wxFONTENCODING_MACKANNADA, + wxFONTENCODING_MACMALAJALAM, + wxFONTENCODING_MACSINHALESE, + wxFONTENCODING_MACBURMESE, + wxFONTENCODING_MACKHMER, + wxFONTENCODING_MACTHAI, + wxFONTENCODING_MACLAOTIAN, + wxFONTENCODING_MACGEORGIAN, + wxFONTENCODING_MACARMENIAN, + wxFONTENCODING_MACCHINESESIMP, + wxFONTENCODING_MACTIBETAN, + wxFONTENCODING_MACMONGOLIAN, + wxFONTENCODING_MACETHIOPIC, + wxFONTENCODING_MACCENTRALEUR, + wxFONTENCODING_MACVIATNAMESE, + wxFONTENCODING_MACARABICEXT, + wxFONTENCODING_MACSYMBOL, + wxFONTENCODING_MACDINGBATS, + wxFONTENCODING_MACTURKISH, + wxFONTENCODING_MACCROATIAN, + wxFONTENCODING_MACICELANDIC, + wxFONTENCODING_MACROMANIAN, + wxFONTENCODING_MACCELTIC, + wxFONTENCODING_MACGAELIC, + wxFONTENCODING_MACKEYBOARD +}; + +// the descriptions for them +static const char* const gs_encodingDescs[] = +{ + wxTRANSLATE( "Western European (ISO-8859-1)" ), + wxTRANSLATE( "Central European (ISO-8859-2)" ), + wxTRANSLATE( "Esperanto (ISO-8859-3)" ), + wxTRANSLATE( "Baltic (old) (ISO-8859-4)" ), + wxTRANSLATE( "Cyrillic (ISO-8859-5)" ), + wxTRANSLATE( "Arabic (ISO-8859-6)" ), + wxTRANSLATE( "Greek (ISO-8859-7)" ), + wxTRANSLATE( "Hebrew (ISO-8859-8)" ), + wxTRANSLATE( "Turkish (ISO-8859-9)" ), + wxTRANSLATE( "Nordic (ISO-8859-10)" ), + wxTRANSLATE( "Thai (ISO-8859-11)" ), + wxTRANSLATE( "Indian (ISO-8859-12)" ), + wxTRANSLATE( "Baltic (ISO-8859-13)" ), + wxTRANSLATE( "Celtic (ISO-8859-14)" ), + wxTRANSLATE( "Western European with Euro (ISO-8859-15)" ), + wxTRANSLATE( "KOI8-R" ), + wxTRANSLATE( "KOI8-U" ), + wxTRANSLATE( "Windows/DOS OEM Cyrillic (CP 866)" ), + wxTRANSLATE( "Windows Thai (CP 874)" ), + wxTRANSLATE( "Windows Japanese (CP 932) or Shift-JIS" ), + wxTRANSLATE( "Windows Chinese Simplified (CP 936) or GB-2312" ), + wxTRANSLATE( "Windows Korean (CP 949)" ), + wxTRANSLATE( "Windows Chinese Traditional (CP 950) or Big-5" ), + wxTRANSLATE( "Windows Central European (CP 1250)" ), + wxTRANSLATE( "Windows Cyrillic (CP 1251)" ), + wxTRANSLATE( "Windows Western European (CP 1252)" ), + wxTRANSLATE( "Windows Greek (CP 1253)" ), + wxTRANSLATE( "Windows Turkish (CP 1254)" ), + wxTRANSLATE( "Windows Hebrew (CP 1255)" ), + wxTRANSLATE( "Windows Arabic (CP 1256)" ), + wxTRANSLATE( "Windows Baltic (CP 1257)" ), + wxTRANSLATE( "Windows Vietnamese (CP 1258)" ), + wxTRANSLATE( "Windows Johab (CP 1361)" ), + wxTRANSLATE( "Windows/DOS OEM (CP 437)" ), + wxTRANSLATE( "Unicode 7 bit (UTF-7)" ), + wxTRANSLATE( "Unicode 8 bit (UTF-8)" ), +#ifdef WORDS_BIGENDIAN + wxTRANSLATE( "Unicode 16 bit (UTF-16)" ), + wxTRANSLATE( "Unicode 16 bit Little Endian (UTF-16LE)" ), + wxTRANSLATE( "Unicode 32 bit (UTF-32)" ), + wxTRANSLATE( "Unicode 32 bit Little Endian (UTF-32LE)" ), +#else // WORDS_BIGENDIAN + wxTRANSLATE( "Unicode 16 bit Big Endian (UTF-16BE)" ), + wxTRANSLATE( "Unicode 16 bit (UTF-16)" ), + wxTRANSLATE( "Unicode 32 bit Big Endian (UTF-32BE)" ), + wxTRANSLATE( "Unicode 32 bit (UTF-32)" ), +#endif // WORDS_BIGENDIAN + wxTRANSLATE( "Extended Unix Codepage for Japanese (EUC-JP)" ), + wxTRANSLATE( "US-ASCII" ), + wxTRANSLATE( "ISO-2022-JP" ), + + wxTRANSLATE( "MacRoman" ), + wxTRANSLATE( "MacJapanese" ), + wxTRANSLATE( "MacChineseTrad" ), + wxTRANSLATE( "MacKorean" ), + wxTRANSLATE( "MacArabic" ), + wxTRANSLATE( "MacHebrew" ), + wxTRANSLATE( "MacGreek" ), + wxTRANSLATE( "MacCyrillic" ), + wxTRANSLATE( "MacDevanagari" ), + wxTRANSLATE( "MacGurmukhi" ), + wxTRANSLATE( "MacGujarati" ), + wxTRANSLATE( "MacOriya" ), + wxTRANSLATE( "MacBengali" ), + wxTRANSLATE( "MacTamil" ), + wxTRANSLATE( "MacTelugu" ), + wxTRANSLATE( "MacKannada" ), + wxTRANSLATE( "MacMalayalam" ), + wxTRANSLATE( "MacSinhalese" ), + wxTRANSLATE( "MacBurmese" ), + wxTRANSLATE( "MacKhmer" ), + wxTRANSLATE( "MacThai" ), + wxTRANSLATE( "MacLaotian" ), + wxTRANSLATE( "MacGeorgian" ), + wxTRANSLATE( "MacArmenian" ), + wxTRANSLATE( "MacChineseSimp" ), + wxTRANSLATE( "MacTibetan" ), + wxTRANSLATE( "MacMongolian" ), + wxTRANSLATE( "MacEthiopic" ), + wxTRANSLATE( "MacCentralEurRoman" ), + wxTRANSLATE( "MacVietnamese" ), + wxTRANSLATE( "MacExtArabic" ), + wxTRANSLATE( "MacSymbol" ), + wxTRANSLATE( "MacDingbats" ), + wxTRANSLATE( "MacTurkish" ), + wxTRANSLATE( "MacCroatian" ), + wxTRANSLATE( "MacIcelandic" ), + wxTRANSLATE( "MacRomanian" ), + wxTRANSLATE( "MacCeltic" ), + wxTRANSLATE( "MacGaelic" ), + wxTRANSLATE( "MacKeyboardGlyphs" ) +}; + +// and the internal names (these are not translated on purpose!) +static const wxChar* const gs_encodingNames[][9] = +{ + // names from the columns correspond to these OS: + // Linux Solaris and IRIX HP-UX AIX + { wxT("ISO-8859-1"), wxT("ISO8859-1"), wxT("iso88591"), wxT("8859-1"), wxT("iso_8859_1"), NULL }, + { wxT("ISO-8859-2"), wxT("ISO8859-2"), wxT("iso88592"), wxT("8859-2"), NULL }, + { wxT("ISO-8859-3"), wxT("ISO8859-3"), wxT("iso88593"), wxT("8859-3"), NULL }, + { wxT("ISO-8859-4"), wxT("ISO8859-4"), wxT("iso88594"), wxT("8859-4"), NULL }, + { wxT("ISO-8859-5"), wxT("ISO8859-5"), wxT("iso88595"), wxT("8859-5"), NULL }, + { wxT("ISO-8859-6"), wxT("ISO8859-6"), wxT("iso88596"), wxT("8859-6"), NULL }, + { wxT("ISO-8859-7"), wxT("ISO8859-7"), wxT("iso88597"), wxT("8859-7"), NULL }, + { wxT("ISO-8859-8"), wxT("ISO8859-8"), wxT("iso88598"), wxT("8859-8"), NULL }, + { wxT("ISO-8859-9"), wxT("ISO8859-9"), wxT("iso88599"), wxT("8859-9"), NULL }, + { wxT("ISO-8859-10"), wxT("ISO8859-10"), wxT("iso885910"), wxT("8859-10"), NULL }, + { wxT("ISO-8859-11"), wxT("ISO8859-11"), wxT("iso885911"), wxT("8859-11"), NULL }, + { wxT("ISO-8859-12"), wxT("ISO8859-12"), wxT("iso885912"), wxT("8859-12"), NULL }, + { wxT("ISO-8859-13"), wxT("ISO8859-13"), wxT("iso885913"), wxT("8859-13"), NULL }, + { wxT("ISO-8859-14"), wxT("ISO8859-14"), wxT("iso885914"), wxT("8859-14"), NULL }, + { wxT("ISO-8859-15"), wxT("ISO8859-15"), wxT("iso885915"), wxT("8859-15"), NULL }, + + // although koi8-ru is not strictly speaking the same as koi8-r, + // they are similar enough to make mapping it to koi8 better than + // not recognizing it at all + { wxT( "KOI8-R" ), wxT( "KOI8-RU" ), NULL }, + { wxT( "KOI8-U" ), NULL }, + + { wxT( "WINDOWS-866" ), wxT( "CP866" ), NULL }, + + { wxT( "WINDOWS-874" ), wxT( "CP874" ), wxT( "MS874" ), wxT( "IBM-874" ), NULL }, + { wxT( "WINDOWS-932" ), wxT( "CP932" ), wxT( "MS932" ), wxT( "IBM-932" ), wxT( "SJIS" ), wxT( "SHIFT-JIS" ), wxT( "SHIFT_JIS" ), NULL }, + { wxT( "WINDOWS-936" ), wxT( "CP936" ), wxT( "MS936" ), wxT( "IBM-936" ), wxT( "GB2312" ), wxT( "gbk" ),wxT( "GBK" ), NULL }, + { wxT( "WINDOWS-949" ), wxT( "CP949" ), wxT( "MS949" ), wxT( "IBM-949" ), wxT( "EUC-KR" ), wxT( "eucKR" ), wxT( "euc_kr" ), NULL }, + { wxT( "WINDOWS-950" ), wxT( "CP950" ), wxT( "MS950" ), wxT( "IBM-950" ), wxT( "BIG5" ), wxT( "BIG-5" ), wxT( "BIG-FIVE" ), NULL }, + { wxT( "WINDOWS-1250" ),wxT( "CP1250" ),wxT( "MS1250" ),wxT( "IBM-1250" ),NULL }, + { wxT( "WINDOWS-1251" ),wxT( "CP1251" ),wxT( "MS1251" ),wxT( "IBM-1251" ),NULL }, + { wxT( "WINDOWS-1252" ),wxT( "CP1252" ),wxT( "MS1252" ),wxT( "IBM-1252" ),NULL }, + { wxT( "WINDOWS-1253" ),wxT( "CP1253" ),wxT( "MS1253" ),wxT( "IBM-1253" ),NULL }, + { wxT( "WINDOWS-1254" ),wxT( "CP1254" ),wxT( "MS1254" ),wxT( "IBM-1254" ),NULL }, + { wxT( "WINDOWS-1255" ),wxT( "CP1255" ),wxT( "MS1255" ),wxT( "IBM-1255" ),NULL }, + { wxT( "WINDOWS-1256" ),wxT( "CP1256" ),wxT( "MS1256" ),wxT( "IBM-1256" ),NULL }, + { wxT( "WINDOWS-1257" ),wxT( "CP1257" ),wxT( "MS1257" ),wxT( "IBM-1257" ),NULL }, + { wxT( "WINDOWS-1258" ),wxT( "CP1258" ),wxT( "MS1258" ),wxT( "IBM-1258" ),NULL }, + { wxT( "WINDOWS-1361" ),wxT( "CP1361" ),wxT( "MS1361" ),wxT( "IBM-1361" ), wxT( "JOHAB" ), NULL }, + { wxT( "WINDOWS-437" ), wxT( "CP437" ), wxT( "MS437" ), wxT( "IBM-437" ), NULL }, + + { wxT( "UTF-7" ), wxT("UTF7"), NULL }, + { wxT( "UTF-8" ), wxT("UTF8"), NULL }, +#ifdef WORDS_BIGENDIAN + { wxT( "UTF-16BE" ), wxT("UTF16BE"), wxT("UCS-2BE"), wxT("UCS2BE"), wxT("UTF-16"), wxT("UTF16"), wxT("UCS-2"), wxT("UCS2"), NULL }, + { wxT( "UTF-16LE" ), wxT("UTF16LE"), wxT("UCS-2LE"), wxT("UCS2LE"), NULL }, + { wxT( "UTF-32BE" ), wxT("UTF32BE"), wxT("UCS-4BE" ), wxT("UTF-32"), wxT("UTF32"), wxT("UCS-4"), wxT("UCS4"), NULL }, + { wxT( "UTF-32LE" ), wxT("UTF32LE"), wxT("UCS-4LE"), wxT("UCS4LE"), NULL }, +#else // WORDS_BIGENDIAN + { wxT("UTF-16BE"), wxT("UTF16BE"), wxT("UCS-2BE"), wxT("UCS2BE"), NULL }, + { wxT("UTF-16LE"), wxT("UTF16LE"), wxT("UCS-2LE"), wxT("UTF-16"), wxT("UTF16"), wxT("UCS-2"), wxT("UCS2"), NULL }, + { wxT("UTF-32BE"), wxT("UTF32BE"), wxT("UCS-4BE"), wxT("UCS4BE"), NULL }, + { wxT("UTF-32LE"), wxT("UTF32LE"), wxT("UCS-4LE"), wxT("UCS4LE"), wxT("UTF-32"), wxT("UTF32"), wxT("UCS-4"), wxT("UCS4"), NULL }, +#endif // WORDS_BIGENDIAN + + { wxT( "EUC-JP" ), wxT( "eucJP" ), wxT( "euc_jp" ), wxT( "IBM-eucJP" ), NULL }, + + // 646 is for Solaris, roman8 -- for HP-UX + { wxT( "US-ASCII" ), wxT( "ASCII" ), wxT("C"), wxT("POSIX"), wxT("ANSI_X3.4-1968"), + wxT("646"), wxT("roman8"), wxT( "" ), NULL }, + + { wxT( "ISO-2022-JP" ), NULL }, + + + { wxT( "MacRoman" ), NULL }, + { wxT( "MacJapanese" ), NULL }, + { wxT( "MacChineseTrad" ), NULL }, + { wxT( "MacKorean" ), NULL }, + { wxT( "MacArabic" ), NULL }, + { wxT( "MacHebrew" ), NULL }, + { wxT( "MacGreek" ), NULL }, + { wxT( "MacCyrillic" ), NULL }, + { wxT( "MacDevanagari" ), NULL }, + { wxT( "MacGurmukhi" ), NULL }, + { wxT( "MacGujarati" ), NULL }, + { wxT( "MacOriya" ), NULL }, + { wxT( "MacBengali" ), NULL }, + { wxT( "MacTamil" ), NULL }, + { wxT( "MacTelugu" ), NULL }, + { wxT( "MacKannada" ), NULL }, + { wxT( "MacMalayalam" ), NULL }, + { wxT( "MacSinhalese" ), NULL }, + { wxT( "MacBurmese" ), NULL }, + { wxT( "MacKhmer" ), NULL }, + { wxT( "MacThai" ), NULL }, + { wxT( "MacLaotian" ), NULL }, + { wxT( "MacGeorgian" ), NULL }, + { wxT( "MacArmenian" ), NULL }, + { wxT( "MacChineseSimp" ), NULL }, + { wxT( "MacTibetan" ), NULL }, + { wxT( "MacMongolian" ), NULL }, + { wxT( "MacEthiopic" ), NULL }, + { wxT( "MacCentralEurRoman" ), NULL }, + { wxT( "MacVietnamese" ), NULL }, + { wxT( "MacExtArabic" ), NULL }, + { wxT( "MacSymbol" ), NULL }, + { wxT( "MacDingbats" ), NULL }, + { wxT( "MacTurkish" ), NULL }, + { wxT( "MacCroatian" ), NULL }, + { wxT( "MacIcelandic" ), NULL }, + { wxT( "MacRomanian" ), NULL }, + { wxT( "MacCeltic" ), NULL }, + { wxT( "MacGaelic" ), NULL }, + { wxT( "MacKeyboardGlyphs" ), NULL } +}; + +wxCOMPILE_TIME_ASSERT( WXSIZEOF(gs_encodingDescs) == WXSIZEOF(gs_encodings), EncodingsArraysNotInSync ); +wxCOMPILE_TIME_ASSERT( WXSIZEOF(gs_encodingNames) == WXSIZEOF(gs_encodings), EncodingsArraysNotInSync ); + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// clean up the font mapper object +class wxFontMapperModule : public wxModule +{ +public: + wxFontMapperModule() : wxModule() { } + + virtual bool OnInit() + { + // a dummy wxFontMapperBase object could have been created during the + // program startup before wxApp was created, we have to delete it to + // allow creating the real font mapper next time it is needed now that + // we can create it (when the modules are initialized, wxApp object + // already exists) + wxFontMapperBase *fm = wxFontMapperBase::Get(); + if ( fm && fm->IsDummy() ) + wxFontMapperBase::Reset(); + + return true; + } + + virtual void OnExit() + { + wxFontMapperBase::Reset(); + } + + DECLARE_DYNAMIC_CLASS(wxFontMapperModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxFontMapperModule, wxModule) + + +// ============================================================================ +// wxFontMapperBase implementation +// ============================================================================ + +wxFontMapper *wxFontMapperBase::sm_instance = NULL; + +// ---------------------------------------------------------------------------- +// ctor and dtor +// ---------------------------------------------------------------------------- + +wxFontMapperBase::wxFontMapperBase() +{ +#if wxUSE_CONFIG && wxUSE_FILECONFIG + m_configDummy = NULL; +#endif // wxUSE_CONFIG +} + +wxFontMapperBase::~wxFontMapperBase() +{ +#if wxUSE_CONFIG && wxUSE_FILECONFIG + if ( m_configDummy ) + delete m_configDummy; +#endif // wxUSE_CONFIG +} + +/* static */ +wxFontMapperBase *wxFontMapperBase::Get() +{ + if ( !sm_instance ) + { + wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + if ( traits ) + { + sm_instance = traits->CreateFontMapper(); + + wxASSERT_MSG( sm_instance, + wxT("wxAppTraits::CreateFontMapper() failed") ); + } + + if ( !sm_instance ) + { + // last resort: we must create something because the existing code + // relies on always having a valid font mapper object + sm_instance = (wxFontMapper *)new wxFontMapperBase; + } + } + + return (wxFontMapperBase*)sm_instance; +} + +/* static */ +wxFontMapper *wxFontMapperBase::Set(wxFontMapper *mapper) +{ + wxFontMapper *old = sm_instance; + sm_instance = mapper; + return old; +} + +/* static */ +void wxFontMapperBase::Reset() +{ + if ( sm_instance ) + { + // we need a cast as wxFontMapper is not fully declared here and so the + // compiler can't know that it derives from wxFontMapperBase (but + // run-time behaviour will be correct because the dtor is virtual) + delete (wxFontMapperBase *)sm_instance; + sm_instance = NULL; + } +} + +#if wxUSE_CONFIG && wxUSE_FILECONFIG + +// ---------------------------------------------------------------------------- +// config usage customisation +// ---------------------------------------------------------------------------- + + +static wxString gs_defaultConfigPath(FONTMAPPER_ROOT_PATH); + +/* static */ +const wxString& wxFontMapperBase::GetDefaultConfigPath() +{ + // NB: we return const wxString& and not wxString for compatibility + // with 2.8 that returned const wxChar* + return gs_defaultConfigPath; +} + +void wxFontMapperBase::SetConfigPath(const wxString& prefix) +{ + wxCHECK_RET( !prefix.empty() && prefix[0] == wxCONFIG_PATH_SEPARATOR, + wxT("an absolute path should be given to wxFontMapper::SetConfigPath()") ); + + m_configRootPath = prefix; +} + +// ---------------------------------------------------------------------------- +// get config object and path for it +// ---------------------------------------------------------------------------- + +wxConfigBase *wxFontMapperBase::GetConfig() +{ + wxConfigBase *config = wxConfig::Get(false); + + // If there is no global configuration, use an internal memory configuration + if ( !config ) + { + if ( !m_configDummy ) + m_configDummy = new wxMemoryConfig; + config = m_configDummy; + + // FIXME: ideally, we should add keys from dummy config to a real one later, + // but it is a low-priority task because typical wxWin application + // either doesn't use wxConfig at all or creates wxConfig object in + // wxApp::OnInit(), before any real interaction with the user takes + // place... + } + + return config; +} + +const wxString& wxFontMapperBase::GetConfigPath() +{ + if ( !m_configRootPath ) + { + // use the default + m_configRootPath = GetDefaultConfigPath(); + } + + return m_configRootPath; +} + +// ---------------------------------------------------------------------------- +// config helpers +// ---------------------------------------------------------------------------- + +bool wxFontMapperBase::ChangePath(const wxString& pathNew, wxString *pathOld) +{ + wxConfigBase *config = GetConfig(); + if ( !config ) + return false; + + *pathOld = config->GetPath(); + + wxString path = GetConfigPath(); + if ( path.empty() || path.Last() != wxCONFIG_PATH_SEPARATOR ) + { + path += wxCONFIG_PATH_SEPARATOR; + } + + wxASSERT_MSG( !pathNew || (pathNew[0] != wxCONFIG_PATH_SEPARATOR), + wxT("should be a relative path") ); + + path += pathNew; + + config->SetPath(path); + + return true; +} + +void wxFontMapperBase::RestorePath(const wxString& pathOld) +{ + GetConfig()->SetPath(pathOld); +} + +#endif + +// ---------------------------------------------------------------------------- +// charset/encoding correspondence +// ---------------------------------------------------------------------------- + +wxFontEncoding +wxFontMapperBase::CharsetToEncoding(const wxString& charset, + bool WXUNUSED(interactive)) +{ + int enc = NonInteractiveCharsetToEncoding(charset); + if ( enc == wxFONTENCODING_UNKNOWN ) + { + // we should return wxFONTENCODING_SYSTEM from here for unknown + // encodings + enc = wxFONTENCODING_SYSTEM; + } + + return (wxFontEncoding)enc; +} + +int +wxFontMapperBase::NonInteractiveCharsetToEncoding(const wxString& charset) +{ + wxFontEncoding encoding = wxFONTENCODING_SYSTEM; + + // we're going to modify it, make a copy + wxString cs = charset; + +#if wxUSE_CONFIG && wxUSE_FILECONFIG + // first try the user-defined settings + wxFontMapperPathChanger path(this, FONTMAPPER_CHARSET_PATH); + if ( path.IsOk() ) + { + wxConfigBase *config = GetConfig(); + + // do we have an encoding for this charset? + long value = config->Read(charset, -1l); + if ( value != -1 ) + { + if ( value == wxFONTENCODING_UNKNOWN ) + { + // don't try to find it, in particular don't ask the user + return value; + } + + if ( value >= 0 && value <= wxFONTENCODING_MAX ) + { + encoding = (wxFontEncoding)value; + } + else + { + wxLogDebug(wxT("corrupted config data: invalid encoding %ld for charset '%s' ignored"), + value, charset.c_str()); + } + } + + if ( encoding == wxFONTENCODING_SYSTEM ) + { + // may be we have an alias? + config->SetPath(FONTMAPPER_CHARSET_ALIAS_PATH); + + wxString alias = config->Read(charset); + if ( !alias.empty() ) + { + // yes, we do - use it instead + cs = alias; + } + } + } +#endif // wxUSE_CONFIG + + // if didn't find it there, try to recognize it ourselves + if ( encoding == wxFONTENCODING_SYSTEM ) + { + // trim any spaces + cs.Trim(true); + cs.Trim(false); + + // discard the optional quotes + if ( !cs.empty() ) + { + if ( cs[0u] == wxT('"') && cs.Last() == wxT('"') ) + { + cs = wxString(cs.c_str(), cs.length() - 1); + } + } + + for ( size_t i = 0; i < WXSIZEOF(gs_encodingNames); ++i ) + { + for ( const wxChar* const* encName = gs_encodingNames[i]; *encName; ++encName ) + { + if ( cs.CmpNoCase(*encName) == 0 ) + return gs_encodings[i]; + } + } + + cs.MakeUpper(); + + if ( cs.Left(3) == wxT("ISO") ) + { + // the dash is optional (or, to be exact, it is not, but + // several broken programs "forget" it) + const wxChar *p = cs.c_str() + 3; + if ( *p == wxT('-') ) + p++; + + unsigned int value; + if ( wxSscanf(p, wxT("8859-%u"), &value) == 1 ) + { + // make it 0 based and check that it is strictly positive in + // the process (no such thing as iso8859-0 encoding) + if ( (value-- > 0) && + (value < wxFONTENCODING_ISO8859_MAX - + wxFONTENCODING_ISO8859_1) ) + { + // it's a valid ISO8859 encoding + value += wxFONTENCODING_ISO8859_1; + encoding = (wxFontEncoding)value; + } + } + } + else if ( cs.Left(4) == wxT("8859") ) + { + const wxChar *p = cs.c_str(); + + unsigned int value; + if ( wxSscanf(p, wxT("8859-%u"), &value) == 1 ) + { + // make it 0 based and check that it is strictly positive in + // the process (no such thing as iso8859-0 encoding) + if ( (value-- > 0) && + (value < wxFONTENCODING_ISO8859_MAX - + wxFONTENCODING_ISO8859_1) ) + { + // it's a valid ISO8859 encoding + value += wxFONTENCODING_ISO8859_1; + encoding = (wxFontEncoding)value; + } + } + } + else // check for Windows charsets + { + size_t len; + if ( cs.Left(7) == wxT("WINDOWS") ) + { + len = 7; + } + else if ( cs.Left(2) == wxT("CP") ) + { + len = 2; + } + else // not a Windows encoding + { + len = 0; + } + + if ( len ) + { + const wxChar *p = cs.c_str() + len; + if ( *p == wxT('-') ) + p++; + + unsigned int value; + if ( wxSscanf(p, wxT("%u"), &value) == 1 ) + { + if ( value >= 1250 ) + { + value -= 1250; + if ( value < wxFONTENCODING_CP12_MAX - + wxFONTENCODING_CP1250 ) + { + // a valid Windows code page + value += wxFONTENCODING_CP1250; + encoding = (wxFontEncoding)value; + } + } + + switch ( value ) + { + case 866: + encoding = wxFONTENCODING_CP866; + break; + + case 874: + encoding = wxFONTENCODING_CP874; + break; + + case 932: + encoding = wxFONTENCODING_CP932; + break; + + case 936: + encoding = wxFONTENCODING_CP936; + break; + + case 949: + encoding = wxFONTENCODING_CP949; + break; + + case 950: + encoding = wxFONTENCODING_CP950; + break; + + case 1258: + encoding = wxFONTENCODING_CP1258; + break; + + case 1361: + encoding = wxFONTENCODING_CP1361; + break; + } + } + } + } + //else: unknown + } + + return encoding; +} + +/* static */ +size_t wxFontMapperBase::GetSupportedEncodingsCount() +{ + return WXSIZEOF(gs_encodings); +} + +/* static */ +wxFontEncoding wxFontMapperBase::GetEncoding(size_t n) +{ + wxCHECK_MSG( n < WXSIZEOF(gs_encodings), wxFONTENCODING_SYSTEM, + wxT("wxFontMapper::GetEncoding(): invalid index") ); + + return gs_encodings[n]; +} + +/* static */ +wxString wxFontMapperBase::GetEncodingDescription(wxFontEncoding encoding) +{ + if ( encoding == wxFONTENCODING_DEFAULT ) + { + return _("Default encoding"); + } + + const size_t count = WXSIZEOF(gs_encodingDescs); + + for ( size_t i = 0; i < count; i++ ) + { + if ( gs_encodings[i] == encoding ) + { + return wxGetTranslation(gs_encodingDescs[i]); + } + } + + wxString str; + str.Printf(_("Unknown encoding (%d)"), encoding); + + return str; +} + +/* static */ +wxString wxFontMapperBase::GetEncodingName(wxFontEncoding encoding) +{ + if ( encoding == wxFONTENCODING_DEFAULT ) + { + return _("default"); + } + + const size_t count = WXSIZEOF(gs_encodingNames); + + for ( size_t i = 0; i < count; i++ ) + { + if ( gs_encodings[i] == encoding ) + { + return gs_encodingNames[i][0]; + } + } + + wxString str; + str.Printf(_("unknown-%d"), encoding); + + return str; +} + +/* static */ +const wxChar** wxFontMapperBase::GetAllEncodingNames(wxFontEncoding encoding) +{ + static const wxChar* const dummy[] = { NULL }; + + for ( size_t i = 0; i < WXSIZEOF(gs_encodingNames); i++ ) + { + if ( gs_encodings[i] == encoding ) + { + return const_cast(gs_encodingNames[i]); + } + } + + return const_cast(dummy); +} + +/* static */ +wxFontEncoding wxFontMapperBase::GetEncodingFromName(const wxString& name) +{ + const size_t count = WXSIZEOF(gs_encodingNames); + + for ( size_t i = 0; i < count; i++ ) + { + for ( const wxChar* const* encName = gs_encodingNames[i]; *encName; ++encName ) + { + if ( name.CmpNoCase(*encName) == 0 ) + return gs_encodings[i]; + } + } + + return wxFONTENCODING_MAX; +} + +#endif // wxUSE_FONTMAP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fontcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontcmn.cpp new file mode 100644 index 0000000000..715e2c05f6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontcmn.cpp @@ -0,0 +1,1122 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fontcmn.cpp +// Purpose: implementation of wxFontBase methods +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.09.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/font.h" + +#ifndef WX_PRECOMP + #include "wx/dc.h" + #include "wx/intl.h" + #include "wx/math.h" + #include "wx/dcscreen.h" + #include "wx/log.h" + #include "wx/gdicmn.h" +#endif // WX_PRECOMP + +#if defined(__WXMSW__) + #include "wx/msw/private.h" // includes windows.h for LOGFONT + #include "wx/msw/winundef.h" +#endif + +#include "wx/fontutil.h" // for wxNativeFontInfo +#include "wx/fontmap.h" +#include "wx/fontenum.h" + +#include "wx/tokenzr.h" + +// debugger helper: this function can be called from a debugger to show what +// the date really is +extern const char *wxDumpFont(const wxFont *font) +{ + static char buf[256]; + + const wxFontWeight weight = font->GetWeight(); + + wxString s; + s.Printf(wxS("%s-%s-%s-%d-%d"), + font->GetFaceName(), + weight == wxFONTWEIGHT_NORMAL + ? wxT("normal") + : weight == wxFONTWEIGHT_BOLD + ? wxT("bold") + : wxT("light"), + font->GetStyle() == wxFONTSTYLE_NORMAL + ? wxT("regular") + : wxT("italic"), + font->GetPointSize(), + font->GetEncoding()); + + wxStrlcpy(buf, s.mb_str(), WXSIZEOF(buf)); + return buf; +} + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxBEGIN_ENUM( wxFontFamily ) +wxENUM_MEMBER( wxFONTFAMILY_DEFAULT ) +wxENUM_MEMBER( wxFONTFAMILY_DECORATIVE ) +wxENUM_MEMBER( wxFONTFAMILY_ROMAN ) +wxENUM_MEMBER( wxFONTFAMILY_SCRIPT ) +wxENUM_MEMBER( wxFONTFAMILY_SWISS ) +wxENUM_MEMBER( wxFONTFAMILY_MODERN ) +wxENUM_MEMBER( wxFONTFAMILY_TELETYPE ) +wxEND_ENUM( wxFontFamily ) + +wxBEGIN_ENUM( wxFontStyle ) +wxENUM_MEMBER( wxFONTSTYLE_NORMAL ) +wxENUM_MEMBER( wxFONTSTYLE_ITALIC ) +wxENUM_MEMBER( wxFONTSTYLE_SLANT ) +wxEND_ENUM( wxFontStyle ) + +wxBEGIN_ENUM( wxFontWeight ) +wxENUM_MEMBER( wxFONTWEIGHT_NORMAL ) +wxENUM_MEMBER( wxFONTWEIGHT_LIGHT ) +wxENUM_MEMBER( wxFONTWEIGHT_BOLD ) +wxEND_ENUM( wxFontWeight ) + +wxIMPLEMENT_DYNAMIC_CLASS_WITH_COPY_XTI(wxFont, wxGDIObject, "wx/font.h") + +//WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) + +wxBEGIN_PROPERTIES_TABLE(wxFont) +wxPROPERTY( Size,int, SetPointSize, GetPointSize, 12, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) +wxPROPERTY( Family, wxFontFamily , SetFamily, GetFamily, (wxFontFamily)wxDEFAULT, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) // wxFontFamily +wxPROPERTY( Style, wxFontStyle, SetStyle, GetStyle, (wxFontStyle)wxNORMAL, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // wxFontStyle +wxPROPERTY( Weight, wxFontWeight, SetWeight, GetWeight, (wxFontWeight)wxNORMAL, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // wxFontWeight +wxPROPERTY( Underlined, bool, SetUnderlined, GetUnderlined, false, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) +wxPROPERTY( Strikethrough, bool, SetStrikethrough, GetStrikethrough, false, 0, \ + wxT("Helpstring"), wxT("group")) +wxPROPERTY( Face, wxString, SetFaceName, GetFaceName, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxPROPERTY( Encoding, wxFontEncoding, SetEncoding, GetEncoding, \ + wxFONTENCODING_DEFAULT, 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxEND_PROPERTIES_TABLE() + +wxCONSTRUCTOR_6( wxFont, int, Size, wxFontFamily, Family, wxFontStyle, Style, wxFontWeight, Weight, \ + bool, Underlined, wxString, Face ) + +wxEMPTY_HANDLERS_TABLE(wxFont) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxFontBase +// ---------------------------------------------------------------------------- + +wxFontEncoding wxFontBase::ms_encodingDefault = wxFONTENCODING_SYSTEM; + +/* static */ +void wxFontBase::SetDefaultEncoding(wxFontEncoding encoding) +{ + // GetDefaultEncoding() should return something != wxFONTENCODING_DEFAULT + // and, besides, using this value here doesn't make any sense + wxCHECK_RET( encoding != wxFONTENCODING_DEFAULT, + wxT("can't set default encoding to wxFONTENCODING_DEFAULT") ); + + ms_encodingDefault = encoding; +} + +wxFontBase::~wxFontBase() +{ + // this destructor is required for Darwin +} + +/* static */ +wxFont *wxFontBase::New(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined, + const wxString& face, + wxFontEncoding encoding) +{ + return new wxFont(size, family, style, weight, underlined, face, encoding); +} + +/* static */ +wxFont *wxFontBase::New(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined, + const wxString& face, + wxFontEncoding encoding) +{ + return new wxFont(pixelSize, family, style, weight, underlined, + face, encoding); +} + +/* static */ +wxFont *wxFontBase::New(int pointSize, + wxFontFamily family, + int flags, + const wxString& face, + wxFontEncoding encoding) +{ + return New(pointSize, family, + GetStyleFromFlags(flags), + GetWeightFromFlags(flags), + GetUnderlinedFromFlags(flags), + face, encoding); +} + +/* static */ +wxFont *wxFontBase::New(const wxSize& pixelSize, + wxFontFamily family, + int flags, + const wxString& face, + wxFontEncoding encoding) +{ + return New(pixelSize, family, + GetStyleFromFlags(flags), + GetWeightFromFlags(flags), + GetUnderlinedFromFlags(flags), + face, encoding); +} + +/* static */ +wxFont *wxFontBase::New(const wxNativeFontInfo& info) +{ + return new wxFont(info); +} + +/* static */ +wxFont *wxFontBase::New(const wxString& strNativeFontDesc) +{ + wxNativeFontInfo fontInfo; + if ( !fontInfo.FromString(strNativeFontDesc) ) + return new wxFont(*wxNORMAL_FONT); + + return New(fontInfo); +} + +bool wxFontBase::IsFixedWidth() const +{ + return GetFamily() == wxFONTFAMILY_TELETYPE; +} + +wxSize wxFontBase::GetPixelSize() const +{ + wxScreenDC dc; + dc.SetFont(*(wxFont *)this); + return wxSize(dc.GetCharWidth(), dc.GetCharHeight()); +} + +bool wxFontBase::IsUsingSizeInPixels() const +{ + return false; +} + +void wxFontBase::SetPixelSize( const wxSize& pixelSize ) +{ + wxCHECK_RET( pixelSize.GetWidth() >= 0 && pixelSize.GetHeight() > 0, + "Negative values for the pixel size or zero pixel height are not allowed" ); + + wxScreenDC dc; + + // NOTE: this algorithm for adjusting the font size is used by all + // implementations of wxFont except under wxMSW and wxGTK where + // native support to font creation using pixel-size is provided. + + int largestGood = 0; + int smallestBad = 0; + + bool initialGoodFound = false; + bool initialBadFound = false; + + // NB: this assignment was separated from the variable definition + // in order to fix a gcc v3.3.3 compiler crash + int currentSize = GetPointSize(); + while (currentSize > 0) + { + dc.SetFont(*static_cast(this)); + + // if currentSize (in points) results in a font that is smaller + // than required by pixelSize it is considered a good size + // NOTE: the pixel size width may be zero + if (dc.GetCharHeight() <= pixelSize.GetHeight() && + (pixelSize.GetWidth() == 0 || + dc.GetCharWidth() <= pixelSize.GetWidth())) + { + largestGood = currentSize; + initialGoodFound = true; + } + else + { + smallestBad = currentSize; + initialBadFound = true; + } + if (!initialGoodFound) + { + currentSize /= 2; + } + else if (!initialBadFound) + { + currentSize *= 2; + } + else + { + int distance = smallestBad - largestGood; + if (distance == 1) + break; + + currentSize = largestGood + distance / 2; + } + + SetPointSize(currentSize); + } + + if (currentSize != largestGood) + SetPointSize(largestGood); +} + +void wxFontBase::DoSetNativeFontInfo(const wxNativeFontInfo& info) +{ +#ifdef wxNO_NATIVE_FONTINFO + SetPointSize(info.pointSize); + SetFamily(info.family); + SetStyle(info.style); + SetWeight(info.weight); + SetUnderlined(info.underlined); + SetStrikethrough(info.strikethrough); + SetFaceName(info.faceName); + SetEncoding(info.encoding); +#else + (void)info; +#endif +} + +wxString wxFontBase::GetNativeFontInfoDesc() const +{ + wxCHECK_MSG( IsOk(), wxEmptyString, wxT("invalid font") ); + + wxString fontDesc; + const wxNativeFontInfo *fontInfo = GetNativeFontInfo(); + if ( fontInfo ) + { + fontDesc = fontInfo->ToString(); + wxASSERT_MSG(!fontDesc.empty(), wxT("This should be a non-empty string!")); + } + else + { + wxFAIL_MSG(wxT("Derived class should have created the wxNativeFontInfo!")); + } + + return fontDesc; +} + +wxString wxFontBase::GetNativeFontInfoUserDesc() const +{ + wxCHECK_MSG( IsOk(), wxEmptyString, wxT("invalid font") ); + + wxString fontDesc; + const wxNativeFontInfo *fontInfo = GetNativeFontInfo(); + if ( fontInfo ) + { + fontDesc = fontInfo->ToUserString(); + wxASSERT_MSG(!fontDesc.empty(), wxT("This should be a non-empty string!")); + } + else + { + wxFAIL_MSG(wxT("Derived class should have created the wxNativeFontInfo!")); + } + + return fontDesc; +} + +bool wxFontBase::SetNativeFontInfo(const wxString& info) +{ + wxNativeFontInfo fontInfo; + if ( !info.empty() && fontInfo.FromString(info) ) + { + SetNativeFontInfo(fontInfo); + return true; + } + + return false; +} + +bool wxFontBase::SetNativeFontInfoUserDesc(const wxString& info) +{ + wxNativeFontInfo fontInfo; + if ( !info.empty() && fontInfo.FromUserString(info) ) + { + SetNativeFontInfo(fontInfo); + return true; + } + + return false; +} + +bool wxFontBase::operator==(const wxFont& font) const +{ + // either it is the same font, i.e. they share the same common data or they + // have different ref datas but still describe the same font + return IsSameAs(font) || + ( + IsOk() == font.IsOk() && + GetPointSize() == font.GetPointSize() && + // in wxGTK1 GetPixelSize() calls GetInternalFont() which uses + // operator==() resulting in infinite recursion so we can't use it + // in that port +#if !defined(__WXGTK__) || defined(__WXGTK20__) + GetPixelSize() == font.GetPixelSize() && +#endif + GetFamily() == font.GetFamily() && + GetStyle() == font.GetStyle() && + GetWeight() == font.GetWeight() && + GetUnderlined() == font.GetUnderlined() && + GetStrikethrough() == font.GetStrikethrough() && + GetFaceName().IsSameAs(font.GetFaceName(), false) && + GetEncoding() == font.GetEncoding() + ); +} + +wxFontFamily wxFontBase::GetFamily() const +{ + wxCHECK_MSG( IsOk(), wxFONTFAMILY_UNKNOWN, wxS("invalid font") ); + + // Don't return wxFONTFAMILY_UNKNOWN from here because it prevents the code + // like wxFont(size, wxNORMAL_FONT->GetFamily(), ...) from working (see + // #12330). This is really just a hack but it allows to keep compatibility + // and doesn't really have any bad drawbacks so do this until someone comes + // up with a better idea. + const wxFontFamily family = DoGetFamily(); + + return family == wxFONTFAMILY_UNKNOWN ? wxFONTFAMILY_DEFAULT : family; +} + +wxString wxFontBase::GetFamilyString() const +{ + wxCHECK_MSG( IsOk(), "wxFONTFAMILY_DEFAULT", "invalid font" ); + + switch ( GetFamily() ) + { + case wxFONTFAMILY_DECORATIVE: return "wxFONTFAMILY_DECORATIVE"; + case wxFONTFAMILY_ROMAN: return "wxFONTFAMILY_ROMAN"; + case wxFONTFAMILY_SCRIPT: return "wxFONTFAMILY_SCRIPT"; + case wxFONTFAMILY_SWISS: return "wxFONTFAMILY_SWISS"; + case wxFONTFAMILY_MODERN: return "wxFONTFAMILY_MODERN"; + case wxFONTFAMILY_TELETYPE: return "wxFONTFAMILY_TELETYPE"; + case wxFONTFAMILY_UNKNOWN: return "wxFONTFAMILY_UNKNOWN"; + default: return "wxFONTFAMILY_DEFAULT"; + } +} + +wxString wxFontBase::GetStyleString() const +{ + wxCHECK_MSG( IsOk(), "wxFONTSTYLE_DEFAULT", "invalid font" ); + + switch ( GetStyle() ) + { + case wxFONTSTYLE_NORMAL: return "wxFONTSTYLE_NORMAL"; + case wxFONTSTYLE_SLANT: return "wxFONTSTYLE_SLANT"; + case wxFONTSTYLE_ITALIC: return "wxFONTSTYLE_ITALIC"; + default: return "wxFONTSTYLE_DEFAULT"; + } +} + +wxString wxFontBase::GetWeightString() const +{ + wxCHECK_MSG( IsOk(), "wxFONTWEIGHT_DEFAULT", "invalid font" ); + + switch ( GetWeight() ) + { + case wxFONTWEIGHT_NORMAL: return "wxFONTWEIGHT_NORMAL"; + case wxFONTWEIGHT_BOLD: return "wxFONTWEIGHT_BOLD"; + case wxFONTWEIGHT_LIGHT: return "wxFONTWEIGHT_LIGHT"; + default: return "wxFONTWEIGHT_DEFAULT"; + } +} + +bool wxFontBase::SetFaceName(const wxString& facename) +{ +#if wxUSE_FONTENUM + if (!wxFontEnumerator::IsValidFacename(facename)) + { + UnRef(); // make IsOk() return false + return false; + } +#else // !wxUSE_FONTENUM + wxUnusedVar(facename); +#endif // wxUSE_FONTENUM/!wxUSE_FONTENUM + + return true; +} + +void wxFontBase::SetSymbolicSize(wxFontSymbolicSize size) +{ + SetSymbolicSizeRelativeTo(size, wxNORMAL_FONT->GetPointSize()); +} + +/* static */ +int wxFontBase::AdjustToSymbolicSize(wxFontSymbolicSize size, int base) +{ + // Using a fixed factor (1.2, from CSS2) is a bad idea as explained at + // http://www.w3.org/TR/CSS21/fonts.html#font-size-props so use the values + // from http://style.cleverchimp.com/font_size_intervals/altintervals.html + // instead. + static const float factors[] = { 0.60f, 0.75f, 0.89f, 1.f, 1.2f, 1.5f, 2.f }; + + wxCOMPILE_TIME_ASSERT + ( + WXSIZEOF(factors) == wxFONTSIZE_XX_LARGE - wxFONTSIZE_XX_SMALL + 1, + WrongFontSizeFactorsSize + ); + + return wxRound(factors[size - wxFONTSIZE_XX_SMALL]*base); +} + +wxFont& wxFont::MakeBold() +{ + SetWeight(wxFONTWEIGHT_BOLD); + return *this; +} + +wxFont wxFont::Bold() const +{ + wxFont font(*this); + font.MakeBold(); + return font; +} + +wxFont& wxFont::MakeItalic() +{ + SetStyle(wxFONTSTYLE_ITALIC); + return *this; +} + +wxFont wxFont::Italic() const +{ + wxFont font(*this); + font.MakeItalic(); + return font; +} + +wxFont& wxFont::MakeUnderlined() +{ + SetUnderlined(true); + return *this; +} + +wxFont wxFont::Underlined() const +{ + wxFont font(*this); + font.MakeUnderlined(); + return font; +} + +wxFont wxFont::Strikethrough() const +{ + wxFont font(*this); + font.MakeStrikethrough(); + return font; +} + +wxFont& wxFont::MakeStrikethrough() +{ + SetStrikethrough(true); + return *this; +} + +wxFont& wxFont::Scale(float x) +{ + SetPointSize(int(x*GetPointSize() + 0.5)); + return *this; +} + +wxFont wxFont::Scaled(float x) const +{ + wxFont font(*this); + font.Scale(x); + return font; +} + +// ---------------------------------------------------------------------------- +// wxNativeFontInfo +// ---------------------------------------------------------------------------- + +// Up to now, there are no native implementations of this function: +void wxNativeFontInfo::SetFaceName(const wxArrayString& facenames) +{ +#if wxUSE_FONTENUM + for (size_t i=0; i < facenames.GetCount(); i++) + { + if (wxFontEnumerator::IsValidFacename(facenames[i])) + { + SetFaceName(facenames[i]); + return; + } + } + + // set the first valid facename we can find on this system + wxString validfacename = wxFontEnumerator::GetFacenames().Item(0); + wxLogTrace(wxT("font"), wxT("Falling back to '%s'"), validfacename.c_str()); + SetFaceName(validfacename); +#else // !wxUSE_FONTENUM + SetFaceName(facenames[0]); +#endif // wxUSE_FONTENUM/!wxUSE_FONTENUM +} + + +#ifdef wxNO_NATIVE_FONTINFO + +// These are the generic forms of FromString()/ToString. +// +// convert to/from the string representation: the general format is +// "version;the rest..." with currently defined versions being: +// +// 0;pointsize;family;style;weight;underlined;facename;encoding +// 1;pointsize;family;style;weight;underlined;strikethrough;facename;encoding + +bool wxNativeFontInfo::FromString(const wxString& s) +{ + long l; + unsigned long version; + + wxStringTokenizer tokenizer(s, wxT(";")); + + wxString token = tokenizer.GetNextToken(); + if ( !token.ToULong(&version) || version > 1 ) + return false; + + token = tokenizer.GetNextToken(); + if ( !token.ToLong(&l) ) + return false; + pointSize = (int)l; + + token = tokenizer.GetNextToken(); + if ( !token.ToLong(&l) ) + return false; + family = (wxFontFamily)l; + + token = tokenizer.GetNextToken(); + if ( !token.ToLong(&l) ) + return false; + style = (wxFontStyle)l; + + token = tokenizer.GetNextToken(); + if ( !token.ToLong(&l) ) + return false; + weight = (wxFontWeight)l; + + token = tokenizer.GetNextToken(); + if ( !token.ToLong(&l) ) + return false; + underlined = l != 0; + + if ( version == 1 ) + { + token = tokenizer.GetNextToken(); + if ( !token.ToLong(&l) ) + return false; + strikethrough = l != 0; + } + + faceName = tokenizer.GetNextToken(); + +#ifndef __WXMAC__ + if( !faceName ) + return false; +#endif + + token = tokenizer.GetNextToken(); + if ( !token.ToLong(&l) ) + return false; + encoding = (wxFontEncoding)l; + + return true; +} + +wxString wxNativeFontInfo::ToString() const +{ + wxString s; + + s.Printf(wxT("%d;%d;%d;%d;%d;%d;%d;%s;%d"), + 1, // version + pointSize, + family, + (int)style, + (int)weight, + underlined, + strikethrough, + faceName.GetData(), + (int)encoding); + + return s; +} + +void wxNativeFontInfo::Init() +{ + pointSize = 0; + family = wxFONTFAMILY_DEFAULT; + style = wxFONTSTYLE_NORMAL; + weight = wxFONTWEIGHT_NORMAL; + underlined = false; + strikethrough = false; + faceName.clear(); + encoding = wxFONTENCODING_DEFAULT; +} + +int wxNativeFontInfo::GetPointSize() const +{ + return pointSize; +} + +wxFontStyle wxNativeFontInfo::GetStyle() const +{ + return style; +} + +wxFontWeight wxNativeFontInfo::GetWeight() const +{ + return weight; +} + +bool wxNativeFontInfo::GetUnderlined() const +{ + return underlined; +} + +bool wxNativeFontInfo::GetStrikethrough() const +{ + return strikethrough; +} + +wxString wxNativeFontInfo::GetFaceName() const +{ + return faceName; +} + +wxFontFamily wxNativeFontInfo::GetFamily() const +{ + return family; +} + +wxFontEncoding wxNativeFontInfo::GetEncoding() const +{ + return encoding; +} + +void wxNativeFontInfo::SetPointSize(int pointsize) +{ + pointSize = pointsize; +} + +void wxNativeFontInfo::SetStyle(wxFontStyle style_) +{ + style = style_; +} + +void wxNativeFontInfo::SetWeight(wxFontWeight weight_) +{ + weight = weight_; +} + +void wxNativeFontInfo::SetUnderlined(bool underlined_) +{ + underlined = underlined_; +} + +void wxNativeFontInfo::SetStrikethrough(bool strikethrough_) +{ + strikethrough = strikethrough_; +} + +bool wxNativeFontInfo::SetFaceName(const wxString& facename_) +{ + faceName = facename_; + return true; +} + +void wxNativeFontInfo::SetFamily(wxFontFamily family_) +{ + family = family_; +} + +void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding_) +{ + encoding = encoding_; +} + +#endif // generic wxNativeFontInfo implementation + +// conversion to/from user-readable string: this is used in the generic +// versions and under MSW as well because there is no standard font description +// format there anyhow (but there is a well-defined standard for X11 fonts used +// by wxGTK and wxMotif) + +#if defined(wxNO_NATIVE_FONTINFO) || defined(__WXMSW__) || defined (__WXPM__) || defined(__WXOSX__) + +wxString wxNativeFontInfo::ToUserString() const +{ + wxString desc; + + // first put the adjectives, if any - this is English-centric, of course, + // but what else can we do? + if ( GetUnderlined() ) + { + desc << _("underlined"); + } + + if ( GetStrikethrough() ) + { + desc << _("strikethrough"); + } + + switch ( GetWeight() ) + { + default: + wxFAIL_MSG( wxT("unknown font weight") ); + // fall through + + case wxFONTWEIGHT_NORMAL: + break; + + case wxFONTWEIGHT_LIGHT: + desc << _(" light"); + break; + + case wxFONTWEIGHT_BOLD: + desc << _(" bold"); + break; + } + + switch ( GetStyle() ) + { + default: + wxFAIL_MSG( wxT("unknown font style") ); + // fall through + + case wxFONTSTYLE_NORMAL: + break; + + // we don't distinguish between the two for now anyhow... + case wxFONTSTYLE_ITALIC: + case wxFONTSTYLE_SLANT: + desc << _(" italic"); + break; + } + + wxString face = GetFaceName(); + if ( !face.empty() ) + { + if (face.Contains(' ') || face.Contains(';') || face.Contains(',')) + { + face.Replace("'", ""); + // eventually remove quote characters: most systems do not + // allow them in a facename anyway so this usually does nothing + + // make it possible for FromUserString() function to understand + // that the different words which compose this facename are + // not different adjectives or other data but rather all parts + // of the facename + desc << wxT(" '") << face << wxT("'"); + } + else + desc << wxT(' ') << face; + } + else // no face name specified + { + // use the family + wxString familyStr; + switch ( GetFamily() ) + { + case wxFONTFAMILY_DECORATIVE: + familyStr = "decorative"; + break; + + case wxFONTFAMILY_ROMAN: + familyStr = "roman"; + break; + + case wxFONTFAMILY_SCRIPT: + familyStr = "script"; + break; + + case wxFONTFAMILY_SWISS: + familyStr = "swiss"; + break; + + case wxFONTFAMILY_MODERN: + familyStr = "modern"; + break; + + case wxFONTFAMILY_TELETYPE: + familyStr = "teletype"; + break; + + case wxFONTFAMILY_DEFAULT: + case wxFONTFAMILY_UNKNOWN: + break; + + default: + wxFAIL_MSG( "unknown font family" ); + } + + if ( !familyStr.empty() ) + desc << " '" << familyStr << " family'"; + } + + int size = GetPointSize(); + if ( size != wxNORMAL_FONT->GetPointSize() ) + { + desc << wxT(' ') << size; + } + +#if wxUSE_FONTMAP + wxFontEncoding enc = GetEncoding(); + if ( enc != wxFONTENCODING_DEFAULT && enc != wxFONTENCODING_SYSTEM ) + { + desc << wxT(' ') << wxFontMapper::GetEncodingName(enc); + } +#endif // wxUSE_FONTMAP + + return desc.Strip(wxString::both).MakeLower(); +} + +bool wxNativeFontInfo::FromUserString(const wxString& s) +{ + // reset to the default state + Init(); + + // ToUserString() will quote the facename if it contains spaces, commas + // or semicolons: we must be able to understand that quoted text is + // a single token: + wxString toparse(s); + + // parse a more or less free form string + wxStringTokenizer tokenizer(toparse, wxT(";, "), wxTOKEN_STRTOK); + + wxString face; + unsigned long size; + bool weightfound = false, pointsizefound = false; +#if wxUSE_FONTMAP + bool encodingfound = false; +#endif + bool insideQuotes = false; + + while ( tokenizer.HasMoreTokens() ) + { + wxString token = tokenizer.GetNextToken(); + + // normalize it + token.Trim(true).Trim(false).MakeLower(); + if (insideQuotes) + { + if (token.StartsWith("'") || + token.EndsWith("'")) + { + insideQuotes = false; + + // add this last token to the facename: + face += " " + token; + + // normalize facename: + face = face.Trim(true).Trim(false); + face.Replace("'", ""); + + continue; + } + } + else + { + if (token.StartsWith("'")) + insideQuotes = true; + } + + // look for the known tokens + if ( insideQuotes ) + { + // only the facename may be quoted: + face += " " + token; + continue; + } + if ( token == wxT("underlined") || token == _("underlined") ) + { + SetUnderlined(true); + } + else if ( token == wxT("strikethrough") || token == _("strikethrough") ) + { + SetStrikethrough(true); + } + else if ( token == wxT("light") || token == _("light") ) + { + SetWeight(wxFONTWEIGHT_LIGHT); + weightfound = true; + } + else if ( token == wxT("bold") || token == _("bold") ) + { + SetWeight(wxFONTWEIGHT_BOLD); + weightfound = true; + } + else if ( token == wxT("italic") || token == _("italic") ) + { + SetStyle(wxFONTSTYLE_ITALIC); + } + else if ( token.ToULong(&size) ) + { + SetPointSize(size); + pointsizefound = true; + } + else + { +#if wxUSE_FONTMAP + // try to interpret this as an encoding + wxFontEncoding encoding = wxFontMapper::Get()->CharsetToEncoding(token, false); + if ( encoding != wxFONTENCODING_DEFAULT && + encoding != wxFONTENCODING_SYSTEM ) // returned when the recognition failed + { + SetEncoding(encoding); + encodingfound = true; + } + else + { +#endif // wxUSE_FONTMAP + + // assume it is the face name + if ( !face.empty() ) + { + face += wxT(' '); + } + + face += token; + + // skip the code which resets face below + continue; + +#if wxUSE_FONTMAP + } +#endif // wxUSE_FONTMAP + } + + // if we had had the facename, we shouldn't continue appending tokens + // to it (i.e. "foo bold bar" shouldn't result in the facename "foo + // bar") + if ( !face.empty() ) + { + wxString familyStr; + if ( face.EndsWith(" family", &familyStr) ) + { + // it's not a facename but rather a font family + wxFontFamily family; + if ( familyStr == "decorative" ) + family = wxFONTFAMILY_DECORATIVE; + else if ( familyStr == "roman" ) + family = wxFONTFAMILY_ROMAN; + else if ( familyStr == "script" ) + family = wxFONTFAMILY_SCRIPT; + else if ( familyStr == "swiss" ) + family = wxFONTFAMILY_SWISS; + else if ( familyStr == "modern" ) + family = wxFONTFAMILY_MODERN; + else if ( familyStr == "teletype" ) + family = wxFONTFAMILY_TELETYPE; + else + return false; + + SetFamily(family); + } + // NB: the check on the facename is implemented in wxFontBase::SetFaceName + // and not in wxNativeFontInfo::SetFaceName thus we need to explicitly + // call here wxFontEnumerator::IsValidFacename + else if ( +#if wxUSE_FONTENUM + !wxFontEnumerator::IsValidFacename(face) || +#endif // wxUSE_FONTENUM + !SetFaceName(face) ) + { + SetFaceName(wxNORMAL_FONT->GetFaceName()); + } + + face.clear(); + } + } + + // we might not have flushed it inside the loop + if ( !face.empty() ) + { + // NB: the check on the facename is implemented in wxFontBase::SetFaceName + // and not in wxNativeFontInfo::SetFaceName thus we need to explicitly + // call here wxFontEnumerator::IsValidFacename + if ( +#if wxUSE_FONTENUM + !wxFontEnumerator::IsValidFacename(face) || +#endif // wxUSE_FONTENUM + !SetFaceName(face) ) + { + SetFaceName(wxNORMAL_FONT->GetFaceName()); + } + } + + // set point size to default value if size was not given + if ( !pointsizefound ) + SetPointSize(wxNORMAL_FONT->GetPointSize()); + + // set font weight to default value if weight was not given + if ( !weightfound ) + SetWeight(wxFONTWEIGHT_NORMAL); + +#if wxUSE_FONTMAP + // set font encoding to default value if encoding was not given + if ( !encodingfound ) + SetEncoding(wxFONTENCODING_SYSTEM); +#endif // wxUSE_FONTMAP + + return true; +} + +#endif // generic or wxMSW or wxOS2 + + +// wxFont <-> wxString utilities, used by wxConfig +wxString wxToString(const wxFontBase& font) +{ + return font.IsOk() ? font.GetNativeFontInfoDesc() + : wxString(); +} + +bool wxFromString(const wxString& str, wxFontBase *font) +{ + wxCHECK_MSG( font, false, wxT("NULL output parameter") ); + + if ( str.empty() ) + { + *font = wxNullFont; + return true; + } + + return font->SetNativeFontInfo(str); +} + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fontdata.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontdata.cpp new file mode 100644 index 0000000000..deef52ce2a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontdata.cpp @@ -0,0 +1,94 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fontdata.cpp +// Author: Julian Smart +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FONTDLG || wxUSE_FONTPICKERCTRL + +#include "wx/fontdata.h" + +IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject) + +wxFontData::wxFontData() +{ + m_showHelp = false; + m_allowSymbols = true; + m_enableEffects = true; + m_minSize = 0; + m_maxSize = 0; + + m_encoding = wxFONTENCODING_SYSTEM; +} + +wxFontData::~wxFontData() +{ +} + +wxFontData::wxFontData(const wxFontData& data) + : wxObject(), + m_fontColour(data.m_fontColour), + m_showHelp(data.m_showHelp), + m_allowSymbols(data.m_allowSymbols), + m_enableEffects(data.m_enableEffects), + m_initialFont(data.m_initialFont), + m_chosenFont(data.m_chosenFont), + m_minSize(data.m_minSize), + m_maxSize(data.m_maxSize), + m_encoding(data.m_encoding), + m_encodingInfo(data.m_encodingInfo) +{ +} + +wxFontData& wxFontData::operator=(const wxFontData& data) +{ + if (&data != this) + { + wxObject::operator=(data); + m_fontColour = data.m_fontColour; + m_showHelp = data.m_showHelp; + m_allowSymbols = data.m_allowSymbols; + m_enableEffects = data.m_enableEffects; + m_initialFont = data.m_initialFont; + m_chosenFont = data.m_chosenFont; + m_minSize = data.m_minSize; + m_maxSize = data.m_maxSize; + m_encoding = data.m_encoding; + m_encodingInfo = data.m_encodingInfo; + } + return *this; +} +#endif // wxUSE_FONTDLG || wxUSE_FONTPICKERCTRL + +#if wxUSE_FONTDLG + +#include "wx/fontdlg.h" + +wxFont wxGetFontFromUser(wxWindow *parent, const wxFont& fontInit, const wxString& caption) +{ + wxFontData data; + if ( fontInit.IsOk() ) + { + data.SetInitialFont(fontInit); + } + + wxFont fontRet; + wxFontDialog dialog(parent, data); + if (!caption.empty()) + dialog.SetTitle(caption); + if ( dialog.ShowModal() == wxID_OK ) + { + fontRet = dialog.GetFontData().GetChosenFont(); + } + //else: leave it invalid + + return fontRet; +} +#endif // wxUSE_FONTDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fontenumcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontenumcmn.cpp new file mode 100644 index 0000000000..1185a864ab --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontenumcmn.cpp @@ -0,0 +1,134 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fontenumcmn.cpp +// Purpose: wxFontEnumerator class +// Author: Vadim Zeitlin +// Modified by: +// Created: 7/5/2006 +// Copyright: (c) 1999-2003 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FONTENUM + +#include "wx/fontenum.h" + +// ============================================================================ +// implementation +// ============================================================================ + +// A simple wxFontEnumerator which doesn't perform any filtering and +// just returns all facenames and encodings found in the system +class WXDLLEXPORT wxSimpleFontEnumerator : public wxFontEnumerator +{ +public: + wxSimpleFontEnumerator() { } + + // called by EnumerateFacenames + virtual bool OnFacename(const wxString& facename) + { + m_arrFacenames.Add(facename); + return true; + } + + // called by EnumerateEncodings + virtual bool OnFontEncoding(const wxString& WXUNUSED(facename), + const wxString& encoding) + { + m_arrEncodings.Add(encoding); + return true; + } + +public: + wxArrayString m_arrFacenames, m_arrEncodings; +}; + + +/* static */ +wxArrayString wxFontEnumerator::GetFacenames(wxFontEncoding encoding, bool fixedWidthOnly) +{ + wxSimpleFontEnumerator temp; + temp.EnumerateFacenames(encoding, fixedWidthOnly); + return temp.m_arrFacenames; +} + +/* static */ +wxArrayString wxFontEnumerator::GetEncodings(const wxString& facename) +{ + wxSimpleFontEnumerator temp; + temp.EnumerateEncodings(facename); + return temp.m_arrEncodings; +} + +/* static */ +bool wxFontEnumerator::IsValidFacename(const wxString &facename) +{ + // we cache the result of wxFontEnumerator::GetFacenames supposing that + // the array of face names won't change in the session of this program + static wxArrayString s_arr = wxFontEnumerator::GetFacenames(); + +#ifdef __WXMSW__ + // Quoting the MSDN: + // "MS Shell Dlg is a mapping mechanism that enables + // U.S. English Microsoft Windows NT, and Microsoft Windows 2000 to + // support locales that have characters that are not contained in code + // page 1252. It is not a font but a face name for a nonexistent font." + // Thus we need to consider "Ms Shell Dlg" and "Ms Shell Dlg 2" as valid + // font face names even if they are not enumerated by wxFontEnumerator + if (facename.IsSameAs(wxT("Ms Shell Dlg"), false) || + facename.IsSameAs(wxT("Ms Shell Dlg 2"), false)) + return true; +#endif + + // is given font face name a valid one ? + if (s_arr.Index(facename, false) == wxNOT_FOUND) + return false; + + return true; +} + +#ifdef wxHAS_UTF8_FONTS +bool wxFontEnumerator::EnumerateEncodingsUTF8(const wxString& facename) +{ + // name of UTF-8 encoding: no need to use wxFontMapper for it as it's + // unlikely to change + const wxString utf8(wxT("UTF-8")); + + // all fonts are in UTF-8 only if this code is used + if ( !facename.empty() ) + { + OnFontEncoding(facename, utf8); + return true; + } + + // so enumerating all facenames supporting this encoding is the same as + // enumerating all facenames + const wxArrayString facenames(GetFacenames(wxFONTENCODING_UTF8)); + const size_t count = facenames.size(); + if ( !count ) + return false; + + for ( size_t n = 0; n < count; n++ ) + { + OnFontEncoding(facenames[n], utf8); + } + + return true; +} +#endif // wxHAS_UTF8_FONTS + +#endif // wxUSE_FONTENUM diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fontmap.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontmap.cpp new file mode 100644 index 0000000000..ffac05c213 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontmap.cpp @@ -0,0 +1,522 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fontmap.cpp +// Purpose: wxFontMapper class +// Author: Vadim Zeitlin +// Modified by: +// Created: 04.11.99 +// Copyright: (c) 1999-2003 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FONTMAP + +#include "wx/fontmap.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/msgdlg.h" + #include "wx/choicdlg.h" +#endif // PCH + +#if wxUSE_CONFIG + #include "wx/config.h" +#endif // wxUSE_CONFIG + +#if defined(__WXMSW__) + #include "wx/msw/private.h" // includes windows.h for LOGFONT + #include "wx/msw/winundef.h" +#endif + +#include "wx/fmappriv.h" +#include "wx/fontutil.h" +#include "wx/fontdlg.h" +#include "wx/encinfo.h" + +#include "wx/encconv.h" + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxBEGIN_ENUM( wxFontEncoding ) +wxENUM_MEMBER( wxFONTENCODING_SYSTEM ) +wxENUM_MEMBER( wxFONTENCODING_DEFAULT ) + +wxENUM_MEMBER( wxFONTENCODING_ISO8859_1 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_2 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_3 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_4 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_5 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_6 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_7 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_8 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_9 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_10 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_11 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_12 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_13 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_14 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_15 ) +wxENUM_MEMBER( wxFONTENCODING_ISO8859_MAX ) +wxENUM_MEMBER( wxFONTENCODING_KOI8 ) +wxENUM_MEMBER( wxFONTENCODING_KOI8_U ) +wxENUM_MEMBER( wxFONTENCODING_ALTERNATIVE ) +wxENUM_MEMBER( wxFONTENCODING_BULGARIAN ) +wxENUM_MEMBER( wxFONTENCODING_CP437 ) +wxENUM_MEMBER( wxFONTENCODING_CP850 ) +wxENUM_MEMBER( wxFONTENCODING_CP852 ) +wxENUM_MEMBER( wxFONTENCODING_CP855 ) +wxENUM_MEMBER( wxFONTENCODING_CP866 ) + +wxENUM_MEMBER( wxFONTENCODING_CP874 ) +wxENUM_MEMBER( wxFONTENCODING_CP932 ) +wxENUM_MEMBER( wxFONTENCODING_CP936 ) +wxENUM_MEMBER( wxFONTENCODING_CP949 ) +wxENUM_MEMBER( wxFONTENCODING_CP950 ) +wxENUM_MEMBER( wxFONTENCODING_CP1250 ) +wxENUM_MEMBER( wxFONTENCODING_CP1251 ) +wxENUM_MEMBER( wxFONTENCODING_CP1252 ) +wxENUM_MEMBER( wxFONTENCODING_CP1253 ) +wxENUM_MEMBER( wxFONTENCODING_CP1254 ) +wxENUM_MEMBER( wxFONTENCODING_CP1255 ) +wxENUM_MEMBER( wxFONTENCODING_CP1256 ) +wxENUM_MEMBER( wxFONTENCODING_CP1257 ) +wxENUM_MEMBER( wxFONTENCODING_CP1258 ) +wxENUM_MEMBER( wxFONTENCODING_CP1361 ) +wxENUM_MEMBER( wxFONTENCODING_CP12_MAX ) +wxENUM_MEMBER( wxFONTENCODING_UTF7 ) +wxENUM_MEMBER( wxFONTENCODING_UTF8 ) +wxENUM_MEMBER( wxFONTENCODING_GB2312 ) +wxENUM_MEMBER( wxFONTENCODING_BIG5 ) +wxENUM_MEMBER( wxFONTENCODING_SHIFT_JIS ) +wxENUM_MEMBER( wxFONTENCODING_EUC_JP ) +wxENUM_MEMBER( wxFONTENCODING_UNICODE ) +wxEND_ENUM( wxFontEncoding ) + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// the config paths we use +#if wxUSE_CONFIG + +static const wxChar* FONTMAPPER_FONT_FROM_ENCODING_PATH = wxT("Encodings"); +static const wxChar* FONTMAPPER_FONT_DONT_ASK = wxT("none"); + +#endif // wxUSE_CONFIG + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// it may happen that while we're showing a dialog asking the user about +// something, another request for an encoding mapping arrives: in this case it +// is best to not do anything because otherwise we risk to enter an infinite +// loop so we create an object of this class on stack to test for this in all +// interactive functions +class ReentrancyBlocker +{ +public: + ReentrancyBlocker(bool& flag) : m_flagOld(flag), m_flag(flag) + { m_flag = true; } + ~ReentrancyBlocker() { m_flag = m_flagOld; } + +private: + bool m_flagOld; + bool& m_flag; + + wxDECLARE_NO_COPY_CLASS(ReentrancyBlocker); +}; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// ctor and dtor +// ---------------------------------------------------------------------------- + +wxFontMapper::wxFontMapper() +{ + m_windowParent = NULL; +} + +wxFontMapper::~wxFontMapper() +{ +} + +/* static */ +wxFontMapper *wxFontMapper::Get() +{ + wxFontMapperBase *fontmapper = wxFontMapperBase::Get(); + wxASSERT_MSG( !fontmapper->IsDummy(), + wxT("GUI code requested a wxFontMapper but we only have a wxFontMapperBase.") ); + + // Now return it anyway because there's a chance the GUI code might just + // only want to call wxFontMapperBase functions and it's better than + // crashing by returning NULL + return (wxFontMapper *)fontmapper; +} + +wxFontEncoding +wxFontMapper::CharsetToEncoding(const wxString& charset, bool interactive) +{ + // try the ways not needing the users intervention first + int encoding = wxFontMapperBase::NonInteractiveCharsetToEncoding(charset); + + // if we failed to find the encoding, ask the user -- unless disabled + if ( encoding == wxFONTENCODING_UNKNOWN ) + { + // this is the special value which disables asking the user (he had + // chosen to suppress this the last time) + encoding = wxFONTENCODING_SYSTEM; + } +#if wxUSE_CHOICEDLG + else if ( (encoding == wxFONTENCODING_SYSTEM) && interactive ) + { + // prepare the dialog data + + // the dialog title + wxString title(m_titleDialog); + if ( !title ) + title << wxTheApp->GetAppDisplayName() << _(": unknown charset"); + + // the message + wxString msg; + msg.Printf(_("The charset '%s' is unknown. You may select\nanother charset to replace it with or choose\n[Cancel] if it cannot be replaced"), charset); + + // the list of choices + const size_t count = GetSupportedEncodingsCount(); + + wxString *encodingNamesTranslated = new wxString[count]; + + for ( size_t i = 0; i < count; i++ ) + { + encodingNamesTranslated[i] = GetEncodingDescription(GetEncoding(i)); + } + + // the parent window + wxWindow *parent = m_windowParent; + if ( !parent ) + parent = wxTheApp->GetTopWindow(); + + // do ask the user and get back the index in encodings table + int n = wxGetSingleChoiceIndex(msg, title, + count, + encodingNamesTranslated, + parent); + + delete [] encodingNamesTranslated; + + if ( n != -1 ) + { + encoding = GetEncoding(n); + } + +#if wxUSE_CONFIG && wxUSE_FILECONFIG + // save the result in the config now + wxFontMapperPathChanger path(this, FONTMAPPER_CHARSET_PATH); + if ( path.IsOk() ) + { + wxConfigBase *config = GetConfig(); + + // remember the alt encoding for this charset -- or remember that + // we don't know it + long value = n == -1 ? (long)wxFONTENCODING_UNKNOWN : (long)encoding; + if ( !config->Write(charset, value) ) + { + wxLogError(_("Failed to remember the encoding for the charset '%s'."), charset); + } + } +#endif // wxUSE_CONFIG + } +#else + wxUnusedVar(interactive); +#endif // wxUSE_CHOICEDLG + + return (wxFontEncoding)encoding; +} + +// ---------------------------------------------------------------------------- +// support for unknown encodings: we maintain a map between the +// (platform-specific) strings identifying them and our wxFontEncodings they +// correspond to which is used by GetFontForEncoding() function +// ---------------------------------------------------------------------------- + +bool wxFontMapper::TestAltEncoding(const wxString& configEntry, + wxFontEncoding encReplacement, + wxNativeEncodingInfo *info) +{ + if ( wxGetNativeFontEncoding(encReplacement, info) && + wxTestFontEncoding(*info) ) + { +#if wxUSE_CONFIG && wxUSE_FILECONFIG + // remember the mapping in the config + wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH); + + if ( path.IsOk() ) + { + GetConfig()->Write(configEntry, info->ToString()); + } +#else + wxUnusedVar(configEntry); +#endif // wxUSE_CONFIG + return true; + } + + return false; +} + +bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, + wxNativeEncodingInfo *info, + const wxString& facename, + bool interactive) +{ +#if wxUSE_GUI + // we need a flag to prevent infinite recursion which happens, for + // example, when GetAltForEncoding() is called from an OnPaint() handler: + // in this case, wxYield() which is called from wxMessageBox() we use here + // will lead to another call of OnPaint() and hence to another call of + // GetAltForEncoding() -- and it is impossible to catch this from the user + // code because we are called from wxFont ctor implicitly. + + // assume we're always called from the main thread, so that it is safe to + // use a static var + static bool s_inGetAltForEncoding = false; + + if ( interactive && s_inGetAltForEncoding ) + return false; + + ReentrancyBlocker blocker(s_inGetAltForEncoding); +#endif // wxUSE_GUI + + wxCHECK_MSG( info, false, wxT("bad pointer in GetAltForEncoding") ); + + info->facename = facename; + + if ( encoding == wxFONTENCODING_DEFAULT ) + { + encoding = wxFont::GetDefaultEncoding(); + } + + // if we failed to load the system default encoding, something is really + // wrong and we'd better stop now -- otherwise we will go into endless + // recursion trying to create the font in the msg box with the error + // message + if ( encoding == wxFONTENCODING_SYSTEM ) + { + wxLogFatalError(_("can't load any font, aborting")); + + // wxLogFatalError doesn't return + } + + wxString configEntry, + encName = GetEncodingName(encoding); + if ( !facename.empty() ) + { + configEntry = facename + wxT("_"); + } + configEntry += encName; + +#if wxUSE_CONFIG && wxUSE_FILECONFIG + // do we have a font spec for this encoding? + wxString fontinfo; + wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH); + if ( path.IsOk() ) + { + fontinfo = GetConfig()->Read(configEntry); + } + + // this special value means that we don't know of fonts for this + // encoding but, moreover, have already asked the user as well and he + // didn't specify any font neither + if ( fontinfo == FONTMAPPER_FONT_DONT_ASK ) + { + interactive = false; + } + else // use the info entered the last time + { + if ( !fontinfo.empty() && !facename.empty() ) + { + // we tried to find a match with facename -- now try without it + fontinfo = GetConfig()->Read(encName); + } + + if ( !fontinfo.empty() ) + { + if ( info->FromString(fontinfo) ) + { + if ( wxTestFontEncoding(*info) ) + { + // ok, got something + return true; + } + //else: no such fonts, look for something else + // (should we erase the outdated value?) + } + else + { + wxLogDebug(wxT("corrupted config data: string '%s' is not a valid font encoding info"), + fontinfo); + } + } + //else: there is no information in config about this encoding + } +#endif // wxUSE_CONFIG + + // now try to map this encoding to a compatible one which we have on this + // system + wxFontEncodingArray equiv = wxEncodingConverter::GetAllEquivalents(encoding); + size_t count = equiv.GetCount(); + bool foundEquivEncoding = false; + wxFontEncoding equivEncoding = wxFONTENCODING_SYSTEM; + if ( count ) + { + for ( size_t i = 0; i < count && !foundEquivEncoding; i++ ) + { + // don't test for encoding itself, we already know we don't have it + if ( equiv[i] == encoding ) + continue; + + if ( TestAltEncoding(configEntry, equiv[i], info) ) + { + equivEncoding = equiv[i]; + + foundEquivEncoding = true; + } + } + } + + // ask the user +#if wxUSE_FONTDLG + if ( interactive ) + { + wxString title(m_titleDialog); + if ( !title ) + title << wxTheApp->GetAppDisplayName() << _(": unknown encoding"); + + // built the message + wxString encDesc = GetEncodingDescription(encoding), + msg; + if ( foundEquivEncoding ) + { + // ask the user if he wants to override found alternative encoding + msg.Printf(_("No font for displaying text in encoding '%s' found,\nbut an alternative encoding '%s' is available.\nDo you want to use this encoding (otherwise you will have to choose another one)?"), + encDesc, GetEncodingDescription(equivEncoding)); + } + else + { + msg.Printf(_("No font for displaying text in encoding '%s' found.\nWould you like to select a font to be used for this encoding\n(otherwise the text in this encoding will not be shown correctly)?"), + encDesc); + } + + // the question is different in 2 cases so the answer has to be + // interpreted differently as well + int answer = foundEquivEncoding ? wxNO : wxYES; + + if ( wxMessageBox(msg, title, + wxICON_QUESTION | wxYES_NO, + m_windowParent) == answer ) + { + wxFontData data; + data.SetEncoding(encoding); + data.EncodingInfo() = *info; + wxFontDialog dialog(m_windowParent, data); + if ( dialog.ShowModal() == wxID_OK ) + { + wxFontData retData = dialog.GetFontData(); + + *info = retData.EncodingInfo(); + info->encoding = retData.GetEncoding(); + +#if wxUSE_CONFIG && wxUSE_FILECONFIG + // remember this in the config + wxFontMapperPathChanger path2(this, + FONTMAPPER_FONT_FROM_ENCODING_PATH); + if ( path2.IsOk() ) + { + GetConfig()->Write(configEntry, info->ToString()); + } +#endif // wxUSE_CONFIG + + return true; + } + //else: the user canceled the font selection dialog + } + else + { + // the user doesn't want to select a font for this encoding + // or selected to use equivalent encoding + // + // remember it to avoid asking the same question again later +#if wxUSE_CONFIG && wxUSE_FILECONFIG + wxFontMapperPathChanger path2(this, + FONTMAPPER_FONT_FROM_ENCODING_PATH); + if ( path2.IsOk() ) + { + GetConfig()->Write + ( + configEntry, + foundEquivEncoding + ? (const wxChar*)info->ToString().c_str() + : FONTMAPPER_FONT_DONT_ASK + ); + } +#endif // wxUSE_CONFIG + } + } + //else: we're in non-interactive mode +#else + wxUnusedVar(equivEncoding); +#endif // wxUSE_FONTDLG + + return foundEquivEncoding; +} + +bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, + wxFontEncoding *encodingAlt, + const wxString& facename, + bool interactive) +{ + wxCHECK_MSG( encodingAlt, false, + wxT("wxFontEncoding::GetAltForEncoding(): NULL pointer") ); + + wxNativeEncodingInfo info; + if ( !GetAltForEncoding(encoding, &info, facename, interactive) ) + return false; + + *encodingAlt = info.encoding; + + return true; +} + +bool wxFontMapper::IsEncodingAvailable(wxFontEncoding encoding, + const wxString& facename) +{ + wxNativeEncodingInfo info; + + if ( !wxGetNativeFontEncoding(encoding, &info) ) + return false; + + info.facename = facename; + return wxTestFontEncoding(info); +} + +#endif // wxUSE_FONTMAP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fontmgrcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontmgrcmn.cpp new file mode 100644 index 0000000000..9dd64f859a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontmgrcmn.cpp @@ -0,0 +1,337 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fontmgrcmn.cpp +// Purpose: font management for ports that don't have their own +// Author: Vaclav Slavik +// Created: 2006-11-18 +// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) +// (c) 2006 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/private/fontmgr.h" + +#include "wx/listimpl.cpp" +#include "wx/hashmap.h" + +WX_DECLARE_LIST(wxFontInstance, wxFontInstanceList); +WX_DEFINE_LIST(wxFontInstanceList) +WX_DEFINE_LIST(wxFontBundleList) + +WX_DECLARE_HASH_MAP(wxString, wxFontBundle*, + wxStringHash, wxStringEqual, + wxFontBundleHashBase); +// in STL build, hash class is typedef to a template, so it can't be forward +// declared, as we do; solve it by having a dummy class: +class wxFontBundleHash : public wxFontBundleHashBase +{ +}; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxFontFaceBase +// ---------------------------------------------------------------------------- + +wxFontFaceBase::wxFontFaceBase() + : m_refCnt(0) +{ + m_instances = new wxFontInstanceList; + m_instances->DeleteContents(true); +} + +wxFontFaceBase::~wxFontFaceBase() +{ + delete m_instances; +} + +void wxFontFaceBase::Acquire() +{ + m_refCnt++; +} + +void wxFontFaceBase::Release() +{ + if ( --m_refCnt == 0 ) + { + m_instances->Clear(); + } +} + +wxFontInstance *wxFontFaceBase::GetFontInstance(float ptSize, bool aa) +{ + wxASSERT_MSG( m_refCnt > 0, wxT("font library not loaded!") ); + + for ( wxFontInstanceList::const_iterator i = m_instances->begin(); + i != m_instances->end(); ++i ) + { + if ( (*i)->GetPointSize() == ptSize && (*i)->IsAntiAliased() == aa ) + return *i; + } + + wxFontInstance *i = CreateFontInstance(ptSize, aa); + m_instances->Append(i); + return i; +} + +// ---------------------------------------------------------------------------- +// wxFontBundleBase +// ---------------------------------------------------------------------------- + +wxFontBundleBase::wxFontBundleBase() +{ + for (int i = 0; i < FaceType_Max; i++) + m_faces[i] = NULL; +} + +wxFontBundleBase::~wxFontBundleBase() +{ + for (int i = 0; i < FaceType_Max; i++) + delete m_faces[i]; +} + +wxFontFace *wxFontBundleBase::GetFace(FaceType type) const +{ + wxFontFace *f = m_faces[type]; + + wxCHECK_MSG( f, NULL, wxT("no such face in font bundle") ); + + f->Acquire(); + + return f; +} + +wxFontFace * +wxFontBundleBase::GetFaceForFont(const wxFontMgrFontRefData& font) const +{ + wxASSERT_MSG( font.GetFaceName().empty() || + GetName().CmpNoCase(font.GetFaceName()) == 0, + wxT("calling GetFaceForFont for incompatible font") ); + + int type = FaceType_Regular; + + if ( font.GetWeight() == wxBOLD ) + type |= FaceType_Bold; + + // FIXME -- this should read "if ( font->GetStyle() == wxITALIC )", + // but since DFB doesn't support slant, we try to display it with italic + // face (better than nothing...) + if ( font.GetStyle() == wxITALIC || font.GetStyle() == wxSLANT ) + { + if ( HasFace((FaceType)(type | FaceType_Italic)) ) + type |= FaceType_Italic; + } + + if ( !HasFace((FaceType)type) ) + { + // if we can't get the exact font requested, substitute it with + // some other variant: + for (int i = 0; i < FaceType_Max; i++) + { + if ( HasFace((FaceType)i) ) + return GetFace((FaceType)i); + } + + wxFAIL_MSG( wxT("no face") ); + return NULL; + } + + return GetFace((FaceType)type); +} + +// ---------------------------------------------------------------------------- +// wxFontsManagerBase +// ---------------------------------------------------------------------------- + +wxFontsManager *wxFontsManagerBase::ms_instance = NULL; + +wxFontsManagerBase::wxFontsManagerBase() +{ + m_hash = new wxFontBundleHash(); + m_list = new wxFontBundleList; + m_list->DeleteContents(true); +} + +wxFontsManagerBase::~wxFontsManagerBase() +{ + delete m_hash; + delete m_list; +} + +/* static */ +wxFontsManager *wxFontsManagerBase::Get() +{ + if ( !ms_instance ) + ms_instance = new wxFontsManager(); + return ms_instance; +} + +/* static */ +void wxFontsManagerBase::CleanUp() +{ + wxDELETE(ms_instance); +} + +wxFontBundle *wxFontsManagerBase::GetBundle(const wxString& name) const +{ + return (*m_hash)[name.Lower()]; +} + +wxFontBundle * +wxFontsManagerBase::GetBundleForFont(const wxFontMgrFontRefData& font) const +{ + wxFontBundle *bundle = NULL; + + wxString facename = font.GetFaceName(); + if ( !facename.empty() ) + bundle = GetBundle(facename); + + if ( !bundle ) + { + facename = GetDefaultFacename((wxFontFamily)font.GetFamily()); + if ( !facename.empty() ) + bundle = GetBundle(facename); + } + + if ( !bundle ) + { + if ( m_list->GetFirst() ) + bundle = m_list->GetFirst()->GetData(); + else + wxFAIL_MSG(wxT("Fatal error, no fonts available!")); + } + + return bundle; +} + +void wxFontsManagerBase::AddBundle(wxFontBundle *bundle) +{ + (*m_hash)[bundle->GetName().Lower()] = bundle; + m_list->Append(bundle); +} + + +// ---------------------------------------------------------------------------- +// wxFontMgrFontRefData +// ---------------------------------------------------------------------------- + +wxFontMgrFontRefData::wxFontMgrFontRefData(int size, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined, + const wxString& faceName, + wxFontEncoding encoding) +{ + if ( family == wxFONTFAMILY_DEFAULT ) + family = wxFONTFAMILY_SWISS; + if ( size == wxDEFAULT ) + size = 12; + + m_info.family = (wxFontFamily)family; + m_info.faceName = faceName; + m_info.style = (wxFontStyle)style; + m_info.weight = (wxFontWeight)weight; + m_info.pointSize = size; + m_info.underlined = underlined; + m_info.encoding = encoding; + + m_fontFace = NULL; + m_fontBundle = NULL; + m_fontValid = false; +} + +wxFontMgrFontRefData::wxFontMgrFontRefData(const wxFontMgrFontRefData& data) +{ + m_info = data.m_info; + + m_fontFace = data.m_fontFace; + m_fontBundle = data.m_fontBundle; + m_fontValid = data.m_fontValid; + if ( m_fontFace ) + m_fontFace->Acquire(); +} + +wxFontMgrFontRefData::~wxFontMgrFontRefData() +{ + if ( m_fontFace ) + m_fontFace->Release(); +} + +wxFontBundle *wxFontMgrFontRefData::GetFontBundle() const +{ + wxConstCast(this, wxFontMgrFontRefData)->EnsureValidFont(); + return m_fontBundle; +} + +wxFontInstance * +wxFontMgrFontRefData::GetFontInstance(float scale, bool antialiased) const +{ + wxConstCast(this, wxFontMgrFontRefData)->EnsureValidFont(); + return m_fontFace->GetFontInstance(m_info.pointSize * scale, + antialiased); +} + +void wxFontMgrFontRefData::SetPointSize(int pointSize) +{ + m_info.pointSize = pointSize; + m_fontValid = false; +} + +void wxFontMgrFontRefData::SetFamily(wxFontFamily family) +{ + m_info.family = family; + m_fontValid = false; +} + +void wxFontMgrFontRefData::SetStyle(wxFontStyle style) +{ + m_info.style = style; + m_fontValid = false; +} + +void wxFontMgrFontRefData::SetWeight(wxFontWeight weight) +{ + m_info.weight = weight; + m_fontValid = false; +} + +void wxFontMgrFontRefData::SetFaceName(const wxString& faceName) +{ + m_info.faceName = faceName; + m_fontValid = false; +} + +void wxFontMgrFontRefData::SetUnderlined(bool underlined) +{ + m_info.underlined = underlined; + m_fontValid = false; +} + +void wxFontMgrFontRefData::SetEncoding(wxFontEncoding encoding) +{ + m_info.encoding = encoding; + m_fontValid = false; +} + +void wxFontMgrFontRefData::EnsureValidFont() +{ + if ( !m_fontValid ) + { + wxFontFace *old = m_fontFace; + + m_fontBundle = wxFontsManager::Get()->GetBundleForFont(*this); + m_fontFace = m_fontBundle->GetFaceForFont(*this); + + if ( old ) + old->Release(); + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fontpickercmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontpickercmn.cpp new file mode 100644 index 0000000000..83e6a36e17 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontpickercmn.cpp @@ -0,0 +1,171 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/fontpickercmn.cpp +// Purpose: wxFontPickerCtrl class implementation +// Author: Francesco Montorsi +// Modified by: +// Created: 15/04/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FONTPICKERCTRL + +#include "wx/fontpicker.h" + +#ifndef WX_PRECOMP + #include "wx/textctrl.h" +#endif + +#include "wx/fontenum.h" +#include "wx/tokenzr.h" + +// ============================================================================ +// implementation +// ============================================================================ + +const char wxFontPickerCtrlNameStr[] = "fontpicker"; +const char wxFontPickerWidgetNameStr[] = "fontpickerwidget"; + +wxDEFINE_EVENT(wxEVT_FONTPICKER_CHANGED, wxFontPickerEvent); +IMPLEMENT_DYNAMIC_CLASS(wxFontPickerCtrl, wxPickerBase) +IMPLEMENT_DYNAMIC_CLASS(wxFontPickerEvent, wxCommandEvent) + +// ---------------------------------------------------------------------------- +// wxFontPickerCtrl +// ---------------------------------------------------------------------------- + +#define M_PICKER ((wxFontPickerWidget*)m_picker) + +bool wxFontPickerCtrl::Create( wxWindow *parent, wxWindowID id, + const wxFont &initial, + const wxPoint &pos, const wxSize &size, + long style, const wxValidator& validator, + const wxString &name ) +{ + if (!wxPickerBase::CreateBase(parent, id, + Font2String(initial.IsOk() ? initial + : *wxNORMAL_FONT), + pos, size, style, validator, name)) + return false; + + // the picker of a wxFontPickerCtrl is a wxFontPickerWidget + m_picker = new wxFontPickerWidget(this, wxID_ANY, initial, + wxDefaultPosition, wxDefaultSize, + GetPickerStyle(style)); + // complete sizer creation + wxPickerBase::PostCreation(); + + m_picker->Connect(wxEVT_FONTPICKER_CHANGED, + wxFontPickerEventHandler(wxFontPickerCtrl::OnFontChange), + NULL, this); + + return true; +} + +wxString wxFontPickerCtrl::Font2String(const wxFont &f) +{ + wxString ret = f.GetNativeFontInfoUserDesc(); +#ifdef __WXMSW__ + // on wxMSW the encoding of the font is appended at the end of the string; + // since encoding is not very user-friendly we remove it. + wxFontEncoding enc = f.GetEncoding(); + if ( enc != wxFONTENCODING_DEFAULT && enc != wxFONTENCODING_SYSTEM ) + ret = ret.BeforeLast(wxT(' ')); +#endif + return ret; +} + +wxFont wxFontPickerCtrl::String2Font(const wxString &s) +{ + wxString str(s); + wxFont ret; + double n; + + // put a limit on the maximum point size which the user can enter + // NOTE: we suppose the last word of given string is the pointsize + wxString size = str.AfterLast(wxT(' ')); + if (size.ToDouble(&n)) + { + if (n < 1) + str = str.Left(str.length() - size.length()) + wxT("1"); + else if (n >= m_nMaxPointSize) + str = str.Left(str.length() - size.length()) + + wxString::Format(wxT("%d"), m_nMaxPointSize); + } + + if (!ret.SetNativeFontInfoUserDesc(str)) + return wxNullFont; + + return ret; +} + +void wxFontPickerCtrl::SetSelectedFont(const wxFont &f) +{ + M_PICKER->SetSelectedFont(f); + UpdateTextCtrlFromPicker(); +} + +void wxFontPickerCtrl::UpdatePickerFromTextCtrl() +{ + wxASSERT(m_text); + + // NB: we don't use the wxFont::wxFont(const wxString &) constructor + // since that constructor expects the native font description + // string returned by wxFont::GetNativeFontInfoDesc() and not + // the user-friendly one returned by wxFont::GetNativeFontInfoUserDesc() + wxFont f = String2Font(m_text->GetValue()); + if (!f.IsOk()) + return; // invalid user input + + if (M_PICKER->GetSelectedFont() != f) + { + M_PICKER->SetSelectedFont(f); + + // fire an event + wxFontPickerEvent event(this, GetId(), f); + GetEventHandler()->ProcessEvent(event); + } +} + +void wxFontPickerCtrl::UpdateTextCtrlFromPicker() +{ + if (!m_text) + return; // no textctrl to update + + // Take care to use ChangeValue() here and not SetValue() to avoid + // infinite recursion. + m_text->ChangeValue(Font2String(M_PICKER->GetSelectedFont())); +} + + + +// ---------------------------------------------------------------------------- +// wxFontPickerCtrl - event handlers +// ---------------------------------------------------------------------------- + +void wxFontPickerCtrl::OnFontChange(wxFontPickerEvent &ev) +{ + UpdateTextCtrlFromPicker(); + + // the wxFontPickerWidget sent us a colour-change notification. + // forward this event to our parent + wxFontPickerEvent event(this, GetId(), ev.GetFont()); + GetEventHandler()->ProcessEvent(event); +} + +#endif // wxUSE_FONTPICKERCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fontutilcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontutilcmn.cpp new file mode 100644 index 0000000000..f13e717862 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fontutilcmn.cpp @@ -0,0 +1,65 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fontutilcmn.cpp +// Purpose: Font helper functions common for all ports +// Author: Vaclav Slavik +// Modified by: +// Created: 2006-12-20 +// Copyright: (c) Vadim Zeitlin, Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/fontutil.h" +#include "wx/encinfo.h" + +// ============================================================================ +// implementation +// ============================================================================ + +#ifdef wxHAS_UTF8_FONTS + +// ---------------------------------------------------------------------------- +// wxNativeEncodingInfo +// ---------------------------------------------------------------------------- + +bool wxNativeEncodingInfo::FromString(const wxString& WXUNUSED(s)) +{ + return false; +} + +wxString wxNativeEncodingInfo::ToString() const +{ + return wxEmptyString; +} + +bool wxTestFontEncoding(const wxNativeEncodingInfo& WXUNUSED(info)) +{ + return true; +} + +bool wxGetNativeFontEncoding(wxFontEncoding encoding, + wxNativeEncodingInfo *info) +{ + // all encodings are available because we translate text in any encoding to + // UTF-8 internally anyhow + info->facename.clear(); + info->encoding = encoding; + + return true; +} + +#endif // wxHAS_UTF8_FONTS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/framecmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/framecmn.cpp new file mode 100644 index 0000000000..bf310d7f9d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/framecmn.cpp @@ -0,0 +1,687 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/framecmn.cpp +// Purpose: common (for all platforms) wxFrame functions +// Author: Julian Smart, Vadim Zeitlin +// Created: 01/02/97 +// Copyright: (c) 1998 Robert Roebling and Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/frame.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/menu.h" + #include "wx/menuitem.h" + #include "wx/dcclient.h" + #include "wx/toolbar.h" + #include "wx/statusbr.h" +#endif // WX_PRECOMP + +extern WXDLLEXPORT_DATA(const char) wxFrameNameStr[] = "frame"; +extern WXDLLEXPORT_DATA(const char) wxStatusLineNameStr[] = "status_line"; + +// ---------------------------------------------------------------------------- +// event table +// ---------------------------------------------------------------------------- + +#if wxUSE_MENUS + +#if wxUSE_STATUSBAR +BEGIN_EVENT_TABLE(wxFrameBase, wxTopLevelWindow) + EVT_MENU_OPEN(wxFrameBase::OnMenuOpen) + EVT_MENU_CLOSE(wxFrameBase::OnMenuClose) + + EVT_MENU_HIGHLIGHT_ALL(wxFrameBase::OnMenuHighlight) +END_EVENT_TABLE() +#endif // wxUSE_STATUSBAR + +/* static */ +bool wxFrameBase::ShouldUpdateMenuFromIdle() +{ + // Usually this is determined at compile time and is determined by whether + // the platform supports wxEVT_MENU_OPEN, however in wxGTK we need to also + // check if we're using the global menu bar as we don't get EVT_MENU_OPEN + // for it and need to fall back to idle time updating even if normally + // wxUSE_IDLEMENUUPDATES is set to 0 for wxGTK. +#ifdef __WXGTK20__ + if ( wxApp::GTKIsUsingGlobalMenu() ) + return true; +#endif // !__WXGTK__ + + return wxUSE_IDLEMENUUPDATES != 0; +} + +#endif // wxUSE_MENUS + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxFrameStyle ) +wxBEGIN_FLAGS( wxFrameStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +// frame styles +wxFLAGS_MEMBER(wxSTAY_ON_TOP) +wxFLAGS_MEMBER(wxCAPTION) +#if WXWIN_COMPATIBILITY_2_6 +wxFLAGS_MEMBER(wxTHICK_FRAME) +#endif // WXWIN_COMPATIBILITY_2_6 +wxFLAGS_MEMBER(wxSYSTEM_MENU) +wxFLAGS_MEMBER(wxRESIZE_BORDER) +#if WXWIN_COMPATIBILITY_2_6 +wxFLAGS_MEMBER(wxRESIZE_BOX) +#endif // WXWIN_COMPATIBILITY_2_6 +wxFLAGS_MEMBER(wxCLOSE_BOX) +wxFLAGS_MEMBER(wxMAXIMIZE_BOX) +wxFLAGS_MEMBER(wxMINIMIZE_BOX) + +wxFLAGS_MEMBER(wxFRAME_TOOL_WINDOW) +wxFLAGS_MEMBER(wxFRAME_FLOAT_ON_PARENT) + +wxFLAGS_MEMBER(wxFRAME_SHAPED) +wxEND_FLAGS( wxFrameStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxFrame, wxTopLevelWindow, "wx/frame.h") + +wxBEGIN_PROPERTIES_TABLE(wxFrame) +wxEVENT_PROPERTY( Menu, wxEVT_MENU, wxCommandEvent) + +wxPROPERTY( Title,wxString, SetTitle, GetTitle, wxString(), 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) +wxPROPERTY_FLAGS( WindowStyle, wxFrameStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +#if wxUSE_MENUS +wxPROPERTY( MenuBar, wxMenuBar *, SetMenuBar, GetMenuBar, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +#endif +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxFrame) + +wxCONSTRUCTOR_6( wxFrame, wxWindow*, Parent, wxWindowID, Id, wxString, Title, \ + wxPoint, Position, wxSize, Size, long, WindowStyle) + +// ---------------------------------------------------------------------------- +// construction/destruction +// ---------------------------------------------------------------------------- + +wxFrameBase::wxFrameBase() +{ +#if wxUSE_MENUS + m_frameMenuBar = NULL; +#endif // wxUSE_MENUS + +#if wxUSE_TOOLBAR + m_frameToolBar = NULL; +#endif // wxUSE_TOOLBAR + +#if wxUSE_STATUSBAR + m_frameStatusBar = NULL; +#endif // wxUSE_STATUSBAR + + m_statusBarPane = 0; +} + +wxFrameBase::~wxFrameBase() +{ + // this destructor is required for Darwin +} + +wxFrame *wxFrameBase::New(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + return new wxFrame(parent, id, title, pos, size, style, name); +} + +void wxFrameBase::DeleteAllBars() +{ +#if wxUSE_MENUS + wxDELETE(m_frameMenuBar); +#endif // wxUSE_MENUS + +#if wxUSE_STATUSBAR + wxDELETE(m_frameStatusBar); +#endif // wxUSE_STATUSBAR + +#if wxUSE_TOOLBAR + wxDELETE(m_frameToolBar); +#endif // wxUSE_TOOLBAR +} + +bool wxFrameBase::IsOneOfBars(const wxWindow *win) const +{ +#if wxUSE_MENUS + if ( win == GetMenuBar() ) + return true; +#endif // wxUSE_MENUS + +#if wxUSE_STATUSBAR + if ( win == GetStatusBar() ) + return true; +#endif // wxUSE_STATUSBAR + +#if wxUSE_TOOLBAR + if ( win == GetToolBar() ) + return true; +#endif // wxUSE_TOOLBAR + + wxUnusedVar(win); + + return false; +} + +// ---------------------------------------------------------------------------- +// wxFrame size management: we exclude the areas taken by menu/status/toolbars +// from the client area, so the client area is what's really available for the +// frame contents +// ---------------------------------------------------------------------------- + +// get the origin of the client area in the client coordinates +wxPoint wxFrameBase::GetClientAreaOrigin() const +{ + wxPoint pt = wxTopLevelWindow::GetClientAreaOrigin(); + +#if wxUSE_TOOLBAR && !defined(__WXUNIVERSAL__) + wxToolBar *toolbar = GetToolBar(); + if ( toolbar && toolbar->IsShown() ) + { + int w, h; + toolbar->GetSize(&w, &h); + + if ( toolbar->GetWindowStyleFlag() & wxTB_VERTICAL ) + { + pt.x += w; + } + else + { + pt.y += h; + } + } +#endif // wxUSE_TOOLBAR + + return pt; +} + +// ---------------------------------------------------------------------------- +// misc +// ---------------------------------------------------------------------------- + +#if wxUSE_MENUS + +bool wxFrameBase::ProcessCommand(int id) +{ + wxMenuItem* const item = FindItemInMenuBar(id); + if ( !item ) + return false; + + return ProcessCommand(item); +} + +bool wxFrameBase::ProcessCommand(wxMenuItem *item) +{ + wxCHECK_MSG( item, false, wxS("Menu item can't be NULL") ); + + if (!item->IsEnabled()) + return true; + + if ((item->GetKind() == wxITEM_RADIO) && item->IsChecked() ) + return true; + + int checked; + if (item->IsCheckable()) + { + item->Toggle(); + + // use the new value + checked = item->IsChecked(); + } + else // Uncheckable item. + { + checked = -1; + } + + wxMenu* const menu = item->GetMenu(); + wxCHECK_MSG( menu, false, wxS("Menu item should be attached to a menu") ); + + return menu->SendEvent(item->GetId(), checked); +} + +#endif // wxUSE_MENUS + +// Do the UI update processing for this window. This is +// provided for the application to call if it wants to +// force a UI update, particularly for the menus and toolbar. +void wxFrameBase::UpdateWindowUI(long flags) +{ + wxWindowBase::UpdateWindowUI(flags); + +#if wxUSE_TOOLBAR + if (GetToolBar()) + GetToolBar()->UpdateWindowUI(flags); +#endif + +#if wxUSE_MENUS + if (GetMenuBar()) + { + // If coming from an idle event, we only want to update the menus if + // we're in the wxUSE_IDLEMENUUPDATES configuration, otherwise they + // will be update when the menu is opened later + if ( !(flags & wxUPDATE_UI_FROMIDLE) || ShouldUpdateMenuFromIdle() ) + DoMenuUpdates(); + } +#endif // wxUSE_MENUS +} + +// ---------------------------------------------------------------------------- +// event handlers for status bar updates from menus +// ---------------------------------------------------------------------------- + +#if wxUSE_MENUS && wxUSE_STATUSBAR + +void wxFrameBase::OnMenuHighlight(wxMenuEvent& event) +{ +#if wxUSE_STATUSBAR + (void)ShowMenuHelp(event.GetMenuId()); +#endif // wxUSE_STATUSBAR +} + +void wxFrameBase::OnMenuOpen(wxMenuEvent& event) +{ + if ( !ShouldUpdateMenuFromIdle() ) + { + // as we didn't update the menus from idle time, do it now + DoMenuUpdates(event.GetMenu()); + } +} + +void wxFrameBase::OnMenuClose(wxMenuEvent& WXUNUSED(event)) +{ + DoGiveHelp(wxEmptyString, false); +} + +#endif // wxUSE_MENUS && wxUSE_STATUSBAR + +// Implement internal behaviour (menu updating on some platforms) +void wxFrameBase::OnInternalIdle() +{ + wxTopLevelWindow::OnInternalIdle(); + +#if wxUSE_MENUS + if ( ShouldUpdateMenuFromIdle() && wxUpdateUIEvent::CanUpdate(this) ) + DoMenuUpdates(); +#endif +} + +// ---------------------------------------------------------------------------- +// status bar stuff +// ---------------------------------------------------------------------------- + +#if wxUSE_STATUSBAR + +wxStatusBar* wxFrameBase::CreateStatusBar(int number, + long style, + wxWindowID id, + const wxString& name) +{ + // the main status bar can only be created once (or else it should be + // deleted before calling CreateStatusBar() again) + wxCHECK_MSG( !m_frameStatusBar, NULL, + wxT("recreating status bar in wxFrame") ); + + SetStatusBar(OnCreateStatusBar(number, style, id, name)); + + return m_frameStatusBar; +} + +wxStatusBar *wxFrameBase::OnCreateStatusBar(int number, + long style, + wxWindowID id, + const wxString& name) +{ + wxStatusBar *statusBar = new wxStatusBar(this, id, style, name); + + statusBar->SetFieldsCount(number); + + return statusBar; +} + +void wxFrameBase::SetStatusText(const wxString& text, int number) +{ + wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set text for") ); + + m_frameStatusBar->SetStatusText(text, number); +} + +void wxFrameBase::SetStatusWidths(int n, const int widths_field[] ) +{ + wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set widths for") ); + + m_frameStatusBar->SetStatusWidths(n, widths_field); + + PositionStatusBar(); +} + +void wxFrameBase::PushStatusText(const wxString& text, int number) +{ + wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set text for") ); + + m_frameStatusBar->PushStatusText(text, number); +} + +void wxFrameBase::PopStatusText(int number) +{ + wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set text for") ); + + m_frameStatusBar->PopStatusText(number); +} + +bool wxFrameBase::ShowMenuHelp(int menuId) +{ +#if wxUSE_MENUS + // if no help string found, we will clear the status bar text + // + // NB: wxID_NONE is used for (sub)menus themselves by wxMSW + wxString helpString; + if ( menuId != wxID_SEPARATOR && menuId != wxID_NONE ) + { + const wxMenuItem * const item = FindItemInMenuBar(menuId); + if ( item && !item->IsSeparator() ) + helpString = item->GetHelp(); + + // notice that it's ok if we don't find the item because it might + // belong to the popup menu, so don't assert here + } + + DoGiveHelp(helpString, true); + + return !helpString.empty(); +#else // !wxUSE_MENUS + return false; +#endif // wxUSE_MENUS/!wxUSE_MENUS +} + +void wxFrameBase::SetStatusBar(wxStatusBar *statBar) +{ + bool hadBar = m_frameStatusBar != NULL; + m_frameStatusBar = statBar; + + if ( (m_frameStatusBar != NULL) != hadBar ) + { + PositionStatusBar(); + + DoLayout(); + } +} + +#endif // wxUSE_STATUSBAR + +#if wxUSE_MENUS || wxUSE_TOOLBAR +void wxFrameBase::DoGiveHelp(const wxString& help, bool show) +{ +#if wxUSE_STATUSBAR + if ( m_statusBarPane < 0 ) + { + // status bar messages disabled + return; + } + + wxStatusBar *statbar = GetStatusBar(); + if ( !statbar ) + return; + + wxString text; + if ( show ) + { + // remember the old status bar text if this is the first time we're + // called since the menu has been opened as we're going to overwrite it + // in our DoGiveHelp() and we want to restore it when the menu is + // closed + // + // note that it would be logical to do this in OnMenuOpen() but under + // MSW we get an EVT_MENU_HIGHLIGHT before EVT_MENU_OPEN, strangely + // enough, and so this doesn't work and instead we use the ugly trick + // with using special m_oldStatusText value as "menu opened" (but it is + // arguably better than adding yet another member variable to wxFrame + // on all platforms) + if ( m_oldStatusText.empty() ) + { + m_oldStatusText = statbar->GetStatusText(m_statusBarPane); + if ( m_oldStatusText.empty() ) + { + // use special value to prevent us from doing this the next time + m_oldStatusText += wxT('\0'); + } + } + + m_lastHelpShown = + text = help; + } + else // hide help, restore the original text + { + // clear the last shown help string but remember its value + wxString lastHelpShown; + lastHelpShown.swap(m_lastHelpShown); + + // also clear the old status text but remember it too to restore it + // below + text.swap(m_oldStatusText); + + if ( statbar->GetStatusText(m_statusBarPane) != lastHelpShown ) + { + // if the text was changed with an explicit SetStatusText() call + // from the user code in the meanwhile, do not overwrite it with + // the old status bar contents -- this is almost certainly not what + // the user expects and would be very hard to avoid from user code + return; + } + } + + statbar->SetStatusText(text, m_statusBarPane); +#else + wxUnusedVar(help); + wxUnusedVar(show); +#endif // wxUSE_STATUSBAR +} +#endif // wxUSE_MENUS || wxUSE_TOOLBAR + + +// ---------------------------------------------------------------------------- +// toolbar stuff +// ---------------------------------------------------------------------------- + +#if wxUSE_TOOLBAR + +wxToolBar* wxFrameBase::CreateToolBar(long style, + wxWindowID id, + const wxString& name) +{ + // the main toolbar can't be recreated (unless it was explicitly deleted + // before) + wxCHECK_MSG( !m_frameToolBar, NULL, + wxT("recreating toolbar in wxFrame") ); + + if ( style == -1 ) + { + // use default style + // + // NB: we don't specify the default value in the method declaration + // because + // a) this allows us to have different defaults for different + // platforms (even if we don't have them right now) + // b) we don't need to include wx/toolbar.h in the header then + style = wxTB_DEFAULT_STYLE; + } + + SetToolBar(OnCreateToolBar(style, id, name)); + + return m_frameToolBar; +} + +wxToolBar* wxFrameBase::OnCreateToolBar(long style, + wxWindowID id, + const wxString& name) +{ +#if defined(__WXWINCE__) && defined(__POCKETPC__) + return new wxToolMenuBar(this, id, + wxDefaultPosition, wxDefaultSize, + style, name); +#else + return new wxToolBar(this, id, + wxDefaultPosition, wxDefaultSize, + style, name); +#endif +} + +void wxFrameBase::SetToolBar(wxToolBar *toolbar) +{ + if ( (toolbar != NULL) != (m_frameToolBar != NULL) ) + { + // the toolbar visibility must have changed so we need to both position + // the toolbar itself (if it appeared) and to relayout the frame + // contents in any case + + if ( toolbar ) + { + // we need to assign it to m_frameToolBar for PositionToolBar() to + // do anything + m_frameToolBar = toolbar; + PositionToolBar(); + } + //else: tricky: do not reset m_frameToolBar yet as otherwise DoLayout() + // wouldn't recognize the (still existing) toolbar as one of our + // bars and wouldn't layout the single child of the frame correctly + + + // and this is even more tricky: we want DoLayout() to recognize the + // old toolbar for the purpose of not counting it among our non-bar + // children but we don't want to reserve any more space for it so we + // temporarily hide it + if ( m_frameToolBar ) + m_frameToolBar->Hide(); + + DoLayout(); + + if ( m_frameToolBar ) + m_frameToolBar->Show(); + } + + // this might have been already done above but it's simpler to just always + // do it unconditionally instead of testing for whether we already did it + m_frameToolBar = toolbar; +} + +#endif // wxUSE_TOOLBAR + +// ---------------------------------------------------------------------------- +// menus +// ---------------------------------------------------------------------------- + +#if wxUSE_MENUS + +// update all menus +void wxFrameBase::DoMenuUpdates(wxMenu* menu) +{ + if (menu) + { + wxEvtHandler* source = GetEventHandler(); + menu->UpdateUI(source); + } + else + { + wxMenuBar* bar = GetMenuBar(); + if (bar != NULL) + bar->UpdateMenus(); + } +} + +void wxFrameBase::DetachMenuBar() +{ + if ( m_frameMenuBar ) + { + m_frameMenuBar->Detach(); + m_frameMenuBar = NULL; + } +} + +void wxFrameBase::AttachMenuBar(wxMenuBar *menubar) +{ + if ( menubar ) + { + menubar->Attach((wxFrame *)this); + m_frameMenuBar = menubar; + } +} + +void wxFrameBase::SetMenuBar(wxMenuBar *menubar) +{ + if ( menubar == GetMenuBar() ) + { + // nothing to do + return; + } + + DetachMenuBar(); + + this->AttachMenuBar(menubar); +} + +wxMenuItem *wxFrameBase::FindItemInMenuBar(int menuId) const +{ + const wxMenuBar * const menuBar = GetMenuBar(); + + return menuBar ? menuBar->FindItem(menuId) : NULL; +} + +#endif // wxUSE_MENUS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_arc.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_arc.cpp new file mode 100644 index 0000000000..ef1df75f2b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_arc.cpp @@ -0,0 +1,533 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fs_arc.cpp +// Purpose: wxArchive file system +// Author: Vaclav Slavik, Mike Wetherell +// Copyright: (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#if wxUSE_FS_ARCHIVE + +#include "wx/fs_arc.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" +#endif + +#if WXWIN_COMPATIBILITY_2_6 && wxUSE_ZIPSTREAM + #include "wx/zipstrm.h" +#else + #include "wx/archive.h" +#endif + +#include "wx/private/fileback.h" + +//--------------------------------------------------------------------------- +// wxArchiveFSCacheDataImpl +// +// Holds the catalog of an archive file, and if it is being read from a +// non-seekable stream, a copy of its backing file. +// +// This class is actually the reference counted implementation for the +// wxArchiveFSCacheData class below. It was done that way to allow sharing +// between instances of wxFileSystem, though that's a feature not used in this +// version. +//--------------------------------------------------------------------------- + +WX_DECLARE_STRING_HASH_MAP(wxArchiveEntry*, wxArchiveFSEntryHash); + +struct wxArchiveFSEntry +{ + wxArchiveEntry *entry; + wxArchiveFSEntry *next; +}; + +class wxArchiveFSCacheDataImpl +{ +public: + wxArchiveFSCacheDataImpl(const wxArchiveClassFactory& factory, + const wxBackingFile& backer); + wxArchiveFSCacheDataImpl(const wxArchiveClassFactory& factory, + wxInputStream *stream); + + ~wxArchiveFSCacheDataImpl(); + + void Release() { if (--m_refcount == 0) delete this; } + wxArchiveFSCacheDataImpl *AddRef() { m_refcount++; return this; } + + wxArchiveEntry *Get(const wxString& name); + wxInputStream *NewStream() const; + + wxArchiveFSEntry *GetNext(wxArchiveFSEntry *fse); + +private: + wxArchiveFSEntry *AddToCache(wxArchiveEntry *entry); + void CloseStreams(); + + int m_refcount; + + wxArchiveFSEntryHash m_hash; + wxArchiveFSEntry *m_begin; + wxArchiveFSEntry **m_endptr; + + wxBackingFile m_backer; + wxInputStream *m_stream; + wxArchiveInputStream *m_archive; +}; + +wxArchiveFSCacheDataImpl::wxArchiveFSCacheDataImpl( + const wxArchiveClassFactory& factory, + const wxBackingFile& backer) + : m_refcount(1), + m_begin(NULL), + m_endptr(&m_begin), + m_backer(backer), + m_stream(new wxBackedInputStream(backer)), + m_archive(factory.NewStream(*m_stream)) +{ +} + +wxArchiveFSCacheDataImpl::wxArchiveFSCacheDataImpl( + const wxArchiveClassFactory& factory, + wxInputStream *stream) + : m_refcount(1), + m_begin(NULL), + m_endptr(&m_begin), + m_stream(stream), + m_archive(factory.NewStream(*m_stream)) +{ +} + +wxArchiveFSCacheDataImpl::~wxArchiveFSCacheDataImpl() +{ + WX_CLEAR_HASH_MAP(wxArchiveFSEntryHash, m_hash); + + wxArchiveFSEntry *entry = m_begin; + + while (entry) + { + wxArchiveFSEntry *next = entry->next; + delete entry; + entry = next; + } + + CloseStreams(); +} + +wxArchiveFSEntry *wxArchiveFSCacheDataImpl::AddToCache(wxArchiveEntry *entry) +{ + m_hash[entry->GetName(wxPATH_UNIX)] = entry; + wxArchiveFSEntry *fse = new wxArchiveFSEntry; + *m_endptr = fse; + (*m_endptr)->entry = entry; + (*m_endptr)->next = NULL; + m_endptr = &(*m_endptr)->next; + return fse; +} + +void wxArchiveFSCacheDataImpl::CloseStreams() +{ + wxDELETE(m_archive); + wxDELETE(m_stream); +} + +wxArchiveEntry *wxArchiveFSCacheDataImpl::Get(const wxString& name) +{ + wxArchiveFSEntryHash::iterator it = m_hash.find(name); + + if (it != m_hash.end()) + return it->second; + + if (!m_archive) + return NULL; + + wxArchiveEntry *entry; + + while ((entry = m_archive->GetNextEntry()) != NULL) + { + AddToCache(entry); + + if (entry->GetName(wxPATH_UNIX) == name) + return entry; + } + + CloseStreams(); + + return NULL; +} + +wxInputStream* wxArchiveFSCacheDataImpl::NewStream() const +{ + if (m_backer) + return new wxBackedInputStream(m_backer); + else + return NULL; +} + +wxArchiveFSEntry *wxArchiveFSCacheDataImpl::GetNext(wxArchiveFSEntry *fse) +{ + wxArchiveFSEntry *next = fse ? fse->next : m_begin; + + if (!next && m_archive) + { + wxArchiveEntry *entry = m_archive->GetNextEntry(); + + if (entry) + next = AddToCache(entry); + else + CloseStreams(); + } + + return next; +} + +//--------------------------------------------------------------------------- +// wxArchiveFSCacheData +// +// This is the inteface for wxArchiveFSCacheDataImpl above. Holds the catalog +// of an archive file, and if it is being read from a non-seekable stream, a +// copy of its backing file. +//--------------------------------------------------------------------------- + +class wxArchiveFSCacheData +{ +public: + wxArchiveFSCacheData() : m_impl(NULL) { } + wxArchiveFSCacheData(const wxArchiveClassFactory& factory, + const wxBackingFile& backer); + wxArchiveFSCacheData(const wxArchiveClassFactory& factory, + wxInputStream *stream); + + wxArchiveFSCacheData(const wxArchiveFSCacheData& data); + wxArchiveFSCacheData& operator=(const wxArchiveFSCacheData& data); + + ~wxArchiveFSCacheData() { if (m_impl) m_impl->Release(); } + + wxArchiveEntry *Get(const wxString& name) { return m_impl->Get(name); } + wxInputStream *NewStream() const { return m_impl->NewStream(); } + wxArchiveFSEntry *GetNext(wxArchiveFSEntry *fse) + { return m_impl->GetNext(fse); } + +private: + wxArchiveFSCacheDataImpl *m_impl; +}; + +wxArchiveFSCacheData::wxArchiveFSCacheData( + const wxArchiveClassFactory& factory, + const wxBackingFile& backer) + : m_impl(new wxArchiveFSCacheDataImpl(factory, backer)) +{ +} + +wxArchiveFSCacheData::wxArchiveFSCacheData( + const wxArchiveClassFactory& factory, + wxInputStream *stream) + : m_impl(new wxArchiveFSCacheDataImpl(factory, stream)) +{ +} + +wxArchiveFSCacheData::wxArchiveFSCacheData(const wxArchiveFSCacheData& data) + : m_impl(data.m_impl ? data.m_impl->AddRef() : NULL) +{ +} + +wxArchiveFSCacheData& wxArchiveFSCacheData::operator=( + const wxArchiveFSCacheData& data) +{ + if (data.m_impl != m_impl) + { + if (m_impl) + m_impl->Release(); + + m_impl = data.m_impl; + + if (m_impl) + m_impl->AddRef(); + } + + return *this; +} + +//--------------------------------------------------------------------------- +// wxArchiveFSCache +// +// wxArchiveFSCacheData caches a single archive, and this class holds a +// collection of them to cache all the archives accessed by this instance +// of wxFileSystem. +//--------------------------------------------------------------------------- + +WX_DECLARE_STRING_HASH_MAP(wxArchiveFSCacheData, wxArchiveFSCacheDataHash); + +class wxArchiveFSCache +{ +public: + wxArchiveFSCache() { } + ~wxArchiveFSCache() { } + + wxArchiveFSCacheData* Add(const wxString& name, + const wxArchiveClassFactory& factory, + wxInputStream *stream); + + wxArchiveFSCacheData *Get(const wxString& name); + +private: + wxArchiveFSCacheDataHash m_hash; +}; + +wxArchiveFSCacheData* wxArchiveFSCache::Add( + const wxString& name, + const wxArchiveClassFactory& factory, + wxInputStream *stream) +{ + wxArchiveFSCacheData& data = m_hash[name]; + + if (stream->IsSeekable()) + data = wxArchiveFSCacheData(factory, stream); + else + data = wxArchiveFSCacheData(factory, wxBackingFile(stream)); + + return &data; +} + +wxArchiveFSCacheData *wxArchiveFSCache::Get(const wxString& name) +{ + wxArchiveFSCacheDataHash::iterator it; + + if ((it = m_hash.find(name)) != m_hash.end()) + return &it->second; + + return NULL; +} + +//---------------------------------------------------------------------------- +// wxArchiveFSHandler +//---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxArchiveFSHandler, wxFileSystemHandler) + +wxArchiveFSHandler::wxArchiveFSHandler() + : wxFileSystemHandler() +{ + m_Archive = NULL; + m_FindEntry = NULL; + m_ZipFile = m_Pattern = m_BaseDir = wxEmptyString; + m_AllowDirs = m_AllowFiles = true; + m_DirsFound = NULL; + m_cache = NULL; +} + +wxArchiveFSHandler::~wxArchiveFSHandler() +{ + Cleanup(); + delete m_cache; +} + +void wxArchiveFSHandler::Cleanup() +{ + wxDELETE(m_DirsFound); +} + +bool wxArchiveFSHandler::CanOpen(const wxString& location) +{ + wxString p = GetProtocol(location); + return wxArchiveClassFactory::Find(p) != NULL; +} + +wxFSFile* wxArchiveFSHandler::OpenFile( + wxFileSystem& WXUNUSED(fs), + const wxString& location) +{ + wxString right = GetRightLocation(location); + wxString left = GetLeftLocation(location); + wxString protocol = GetProtocol(location); + wxString key = left + wxT("#") + protocol + wxT(":"); + + if (right.Contains(wxT("./"))) + { + if (right.GetChar(0) != wxT('/')) right = wxT('/') + right; + wxFileName rightPart(right, wxPATH_UNIX); + rightPart.Normalize(wxPATH_NORM_DOTS, wxT("/"), wxPATH_UNIX); + right = rightPart.GetFullPath(wxPATH_UNIX); + } + + if (!right.empty() && right.GetChar(0) == wxT('/')) right = right.Mid(1); + + if (!m_cache) + m_cache = new wxArchiveFSCache; + + const wxArchiveClassFactory *factory; + factory = wxArchiveClassFactory::Find(protocol); + if (!factory) + return NULL; + + wxArchiveFSCacheData *cached = m_cache->Get(key); + if (!cached) + { + wxFSFile *leftFile = m_fs.OpenFile(left); + if (!leftFile) + return NULL; + cached = m_cache->Add(key, *factory, leftFile->DetachStream()); + delete leftFile; + } + + wxArchiveEntry *entry = cached->Get(right); + if (!entry) + return NULL; + + wxInputStream *leftStream = cached->NewStream(); + if (!leftStream) + { + wxFSFile *leftFile = m_fs.OpenFile(left); + if (!leftFile) + return NULL; + leftStream = leftFile->DetachStream(); + delete leftFile; + } + + wxArchiveInputStream *s = factory->NewStream(leftStream); + if ( !s ) + return NULL; + + s->OpenEntry(*entry); + + if (!s->IsOk()) + { + delete s; + return NULL; + } + +#if WXWIN_COMPATIBILITY_2_6 && wxUSE_ZIPSTREAM + if (wxDynamicCast(factory, wxZipClassFactory)) + ((wxZipInputStream*)s)->m_allowSeeking = true; +#endif // WXWIN_COMPATIBILITY_2_6 + + return new wxFSFile(s, + key + right, + wxEmptyString, + GetAnchor(location) +#if wxUSE_DATETIME + , entry->GetDateTime() +#endif // wxUSE_DATETIME + ); +} + +wxString wxArchiveFSHandler::FindFirst(const wxString& spec, int flags) +{ + wxString right = GetRightLocation(spec); + wxString left = GetLeftLocation(spec); + wxString protocol = GetProtocol(spec); + wxString key = left + wxT("#") + protocol + wxT(":"); + + if (!right.empty() && right.Last() == wxT('/')) right.RemoveLast(); + + if (!m_cache) + m_cache = new wxArchiveFSCache; + + const wxArchiveClassFactory *factory; + factory = wxArchiveClassFactory::Find(protocol); + if (!factory) + return wxEmptyString; + + m_Archive = m_cache->Get(key); + if (!m_Archive) + { + wxFSFile *leftFile = m_fs.OpenFile(left); + if (!leftFile) + return wxEmptyString; + m_Archive = m_cache->Add(key, *factory, leftFile->DetachStream()); + delete leftFile; + } + + m_FindEntry = NULL; + + switch (flags) + { + case wxFILE: + m_AllowDirs = false, m_AllowFiles = true; break; + case wxDIR: + m_AllowDirs = true, m_AllowFiles = false; break; + default: + m_AllowDirs = m_AllowFiles = true; break; + } + + m_ZipFile = key; + + m_Pattern = right.AfterLast(wxT('/')); + m_BaseDir = right.BeforeLast(wxT('/')); + if (m_BaseDir.StartsWith(wxT("/"))) + m_BaseDir = m_BaseDir.Mid(1); + + if (m_Archive) + { + if (m_AllowDirs) + { + delete m_DirsFound; + m_DirsFound = new wxArchiveFilenameHashMap(); + if (right.empty()) // allow "/" to match the archive root + return spec; + } + return DoFind(); + } + return wxEmptyString; +} + +wxString wxArchiveFSHandler::FindNext() +{ + if (!m_Archive) return wxEmptyString; + return DoFind(); +} + +wxString wxArchiveFSHandler::DoFind() +{ + wxString namestr, dir, filename; + wxString match = wxEmptyString; + + while (match == wxEmptyString) + { + m_FindEntry = m_Archive->GetNext(m_FindEntry); + + if (!m_FindEntry) + { + m_Archive = NULL; + m_FindEntry = NULL; + break; + } + namestr = m_FindEntry->entry->GetName(wxPATH_UNIX); + + if (m_AllowDirs) + { + dir = namestr.BeforeLast(wxT('/')); + while (!dir.empty()) + { + if( m_DirsFound->find(dir) == m_DirsFound->end() ) + { + (*m_DirsFound)[dir] = 1; + filename = dir.AfterLast(wxT('/')); + dir = dir.BeforeLast(wxT('/')); + if (!filename.empty() && m_BaseDir == dir && + wxMatchWild(m_Pattern, filename, false)) + match = m_ZipFile + dir + wxT("/") + filename; + } + else + break; // already tranversed + } + } + + filename = namestr.AfterLast(wxT('/')); + dir = namestr.BeforeLast(wxT('/')); + if (m_AllowFiles && !filename.empty() && m_BaseDir == dir && + wxMatchWild(m_Pattern, filename, false)) + match = m_ZipFile + namestr; + } + + return match; +} + +#endif // wxUSE_FS_ARCHIVE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_filter.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_filter.cpp new file mode 100644 index 0000000000..5dccb89298 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_filter.cpp @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fs_filter.cpp +// Purpose: wxFilter file system handler +// Author: Mike Wetherell +// Copyright: (c) 2006 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FILESYSTEM + +#include "wx/fs_filter.h" + +#ifndef WX_PRECOMP +#endif + +#include "wx/scopedptr.h" + +wxDEFINE_SCOPED_PTR_TYPE(wxFSFile) +wxDEFINE_SCOPED_PTR_TYPE(wxInputStream) + +//---------------------------------------------------------------------------- +// wxFilterFSHandler +//---------------------------------------------------------------------------- + +bool wxFilterFSHandler::CanOpen(const wxString& location) +{ + return wxFilterClassFactory::Find(GetProtocol(location)) != NULL; +} + +wxFSFile* wxFilterFSHandler::OpenFile( + wxFileSystem& fs, + const wxString& location) +{ + wxString right = GetRightLocation(location); + if (!right.empty()) + return NULL; + + wxString protocol = GetProtocol(location); + const wxFilterClassFactory *factory = wxFilterClassFactory::Find(protocol); + if (!factory) + return NULL; + + wxString left = GetLeftLocation(location); + wxFSFilePtr leftFile(fs.OpenFile(left)); + if (!leftFile.get()) + return NULL; + + wxInputStreamPtr leftStream(leftFile->DetachStream()); + if (!leftStream.get() || !leftStream->IsOk()) + return NULL; + + wxInputStreamPtr stream(factory->NewStream(leftStream.release())); + + // The way compressed streams are supposed to be served is e.g.: + // Content-type: application/postscript + // Content-encoding: gzip + // So the mime type should be just the mime type of the lhs. However check + // whether the mime type is that of this compression format (e.g. + // application/gzip). If so pop any extension and try GetMimeTypeFromExt, + // e.g. if it were '.ps.gz' pop the '.gz' and try looking up '.ps' + wxString mime = leftFile->GetMimeType(); + if (factory->CanHandle(mime, wxSTREAM_MIMETYPE)) + mime = GetMimeTypeFromExt(factory->PopExtension(left)); + + return new wxFSFile(stream.release(), + left + wxT("#") + protocol + wxT(":") + right, + mime, + GetAnchor(location) +#if wxUSE_DATETIME + , leftFile->GetModificationTime() +#endif // wxUSE_DATETIME + ); +} + +wxString wxFilterFSHandler::FindFirst(const wxString& WXUNUSED(spec), int WXUNUSED(flags)) +{ + return wxEmptyString; +} + +wxString wxFilterFSHandler::FindNext() +{ + return wxEmptyString; +} + +#endif //wxUSE_FILESYSTEM diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_inet.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_inet.cpp new file mode 100644 index 0000000000..6a9a479301 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_inet.cpp @@ -0,0 +1,165 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fs_inet.cpp +// Purpose: HTTP and FTP file system +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if !wxUSE_SOCKETS + #undef wxUSE_FS_INET + #define wxUSE_FS_INET 0 +#endif + +#if wxUSE_FILESYSTEM && wxUSE_FS_INET + +#ifndef WX_PRECOMP + #include "wx/module.h" +#endif + +#include "wx/wfstream.h" +#include "wx/url.h" +#include "wx/filesys.h" +#include "wx/fs_inet.h" + +// ---------------------------------------------------------------------------- +// Helper classes +// ---------------------------------------------------------------------------- + +// This stream deletes the file when destroyed +class wxTemporaryFileInputStream : public wxFileInputStream +{ +public: + wxTemporaryFileInputStream(const wxString& filename) : + wxFileInputStream(filename), m_filename(filename) {} + + virtual ~wxTemporaryFileInputStream() + { + // NB: copied from wxFileInputStream dtor, we need to do it before + // wxRemoveFile + if (m_file_destroy) + { + delete m_file; + m_file_destroy = false; + } + wxRemoveFile(m_filename); + } + +protected: + wxString m_filename; +}; + + +// ---------------------------------------------------------------------------- +// wxInternetFSHandler +// ---------------------------------------------------------------------------- + +static wxString StripProtocolAnchor(const wxString& location) +{ + wxString myloc(location.BeforeLast(wxT('#'))); + if (myloc.empty()) myloc = location.AfterFirst(wxT(':')); + else myloc = myloc.AfterFirst(wxT(':')); + + // fix malformed url: + if (!myloc.Left(2).IsSameAs(wxT("//"))) + { + if (myloc.GetChar(0) != wxT('/')) myloc = wxT("//") + myloc; + else myloc = wxT("/") + myloc; + } + if (myloc.Mid(2).Find(wxT('/')) == wxNOT_FOUND) myloc << wxT('/'); + + return myloc; +} + + +bool wxInternetFSHandler::CanOpen(const wxString& location) +{ +#if wxUSE_URL + wxString p = GetProtocol(location); + if ((p == wxT("http")) || (p == wxT("ftp"))) + { + wxURL url(p + wxT(":") + StripProtocolAnchor(location)); + return (url.GetError() == wxURL_NOERR); + } +#endif + return false; +} + + +wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), + const wxString& location) +{ +#if !wxUSE_URL + return NULL; +#else + wxString right = + GetProtocol(location) + wxT(":") + StripProtocolAnchor(location); + + wxURL url(right); + if (url.GetError() == wxURL_NOERR) + { + wxInputStream *s = url.GetInputStream(); + wxString content = url.GetProtocol().GetContentType(); + if (s) + { + wxString tmpfile = + wxFileName::CreateTempFileName(wxT("wxhtml")); + + { // now copy streams content to temporary file: + wxFileOutputStream sout(tmpfile); + s->Read(sout); + } + delete s; + + return new wxFSFile(new wxTemporaryFileInputStream(tmpfile), + right, + content, + GetAnchor(location) +#if wxUSE_DATETIME + , wxDateTime::Now() +#endif // wxUSE_DATETIME + ); + } + } + + return NULL; // incorrect URL +#endif +} + + +class wxFileSystemInternetModule : public wxModule +{ + DECLARE_DYNAMIC_CLASS(wxFileSystemInternetModule) + + public: + wxFileSystemInternetModule() : + wxModule(), + m_handler(NULL) + { + } + + virtual bool OnInit() + { + m_handler = new wxInternetFSHandler; + wxFileSystem::AddHandler(m_handler); + return true; + } + + virtual void OnExit() + { + delete wxFileSystem::RemoveHandler(m_handler); + } + + private: + wxFileSystemHandler* m_handler; +}; + +IMPLEMENT_DYNAMIC_CLASS(wxFileSystemInternetModule, wxModule) + +#endif // wxUSE_FILESYSTEM && wxUSE_FS_INET diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_mem.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_mem.cpp new file mode 100644 index 0000000000..281cdbbc88 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fs_mem.cpp @@ -0,0 +1,279 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fs_mem.cpp +// Purpose: in-memory file system +// Author: Vaclav Slavik +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FILESYSTEM && wxUSE_STREAMS + +#include "wx/fs_mem.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/wxcrtvararg.h" + #if wxUSE_GUI + #include "wx/image.h" + #endif // wxUSE_GUI +#endif + +#include "wx/mstream.h" + +// represents a file entry in wxMemoryFS +class wxMemoryFSFile +{ +public: + wxMemoryFSFile(const void *data, size_t len, const wxString& mime) + { + m_Data = new char[len]; + memcpy(m_Data, data, len); + m_Len = len; + m_MimeType = mime; + InitTime(); + } + + wxMemoryFSFile(const wxMemoryOutputStream& stream, const wxString& mime) + { + m_Len = stream.GetSize(); + m_Data = new char[m_Len]; + stream.CopyTo(m_Data, m_Len); + m_MimeType = mime; + InitTime(); + } + + virtual ~wxMemoryFSFile() + { + delete[] m_Data; + } + + char *m_Data; + size_t m_Len; + wxString m_MimeType; +#if wxUSE_DATETIME + wxDateTime m_Time; +#endif // wxUSE_DATETIME + +private: + void InitTime() + { +#if wxUSE_DATETIME + m_Time = wxDateTime::Now(); +#endif // wxUSE_DATETIME + } + + wxDECLARE_NO_COPY_CLASS(wxMemoryFSFile); +}; + +#if wxUSE_BASE + + +//-------------------------------------------------------------------------------- +// wxMemoryFSHandler +//-------------------------------------------------------------------------------- + + +wxMemoryFSHash wxMemoryFSHandlerBase::m_Hash; + + +wxMemoryFSHandlerBase::wxMemoryFSHandlerBase() : wxFileSystemHandler() +{ +} + +wxMemoryFSHandlerBase::~wxMemoryFSHandlerBase() +{ + // as only one copy of FS handler is supposed to exist, we may silently + // delete static data here. (There is no way how to remove FS handler from + // wxFileSystem other than releasing _all_ handlers.) + WX_CLEAR_HASH_MAP(wxMemoryFSHash, m_Hash); +} + +bool wxMemoryFSHandlerBase::CanOpen(const wxString& location) +{ + return GetProtocol(location) == "memory"; +} + +wxFSFile * wxMemoryFSHandlerBase::OpenFile(wxFileSystem& WXUNUSED(fs), + const wxString& location) +{ + wxMemoryFSHash::const_iterator i = m_Hash.find(GetRightLocation(location)); + if ( i == m_Hash.end() ) + return NULL; + + const wxMemoryFSFile * const obj = i->second; + + return new wxFSFile + ( + new wxMemoryInputStream(obj->m_Data, obj->m_Len), + location, + obj->m_MimeType, + GetAnchor(location) +#if wxUSE_DATETIME + , obj->m_Time +#endif // wxUSE_DATETIME + ); +} + +wxString wxMemoryFSHandlerBase::FindFirst(const wxString& url, int flags) +{ + if ( (flags & wxDIR) && !(flags & wxFILE) ) + { + // we only store files, not directories, so we don't risk finding + // anything + return wxString(); + } + + const wxString spec = GetRightLocation(url); + if ( spec.find_first_of("?*") == wxString::npos ) + { + // simple case: there are no wildcard characters so we can return + // either 0 or 1 results and we can find the potential match quickly + return m_Hash.count(spec) ? url : wxString(); + } + //else: deal with wildcards in FindNext() + + m_findArgument = spec; + m_findIter = m_Hash.begin(); + + return FindNext(); +} + +wxString wxMemoryFSHandlerBase::FindNext() +{ + // m_findArgument is used to indicate that search is in progress, we reset + // it to empty string after iterating over all elements + while ( !m_findArgument.empty() ) + { + // test for the match before (possibly) clearing m_findArgument below + const bool found = m_findIter->first.Matches(m_findArgument); + + // advance m_findIter first as we need to do it anyhow, whether it + // matches or not + const wxMemoryFSHash::const_iterator current = m_findIter; + + if ( ++m_findIter == m_Hash.end() ) + m_findArgument.clear(); + + if ( found ) + return "memory:" + current->first; + } + + return wxString(); +} + +bool wxMemoryFSHandlerBase::CheckDoesntExist(const wxString& filename) +{ + if ( m_Hash.count(filename) ) + { + wxLogError(_("Memory VFS already contains file '%s'!"), filename); + return false; + } + + return true; +} + + +/*static*/ +void wxMemoryFSHandlerBase::AddFileWithMimeType(const wxString& filename, + const wxString& textdata, + const wxString& mimetype) +{ + const wxCharBuffer buf(textdata.To8BitData()); + + AddFileWithMimeType(filename, buf.data(), buf.length(), mimetype); +} + + +/*static*/ +void wxMemoryFSHandlerBase::AddFileWithMimeType(const wxString& filename, + const void *binarydata, size_t size, + const wxString& mimetype) +{ + if ( !CheckDoesntExist(filename) ) + return; + + m_Hash[filename] = new wxMemoryFSFile(binarydata, size, mimetype); +} + +/*static*/ +void wxMemoryFSHandlerBase::AddFile(const wxString& filename, + const wxString& textdata) +{ + AddFileWithMimeType(filename, textdata, wxEmptyString); +} + + +/*static*/ +void wxMemoryFSHandlerBase::AddFile(const wxString& filename, + const void *binarydata, size_t size) +{ + AddFileWithMimeType(filename, binarydata, size, wxEmptyString); +} + + + +/*static*/ void wxMemoryFSHandlerBase::RemoveFile(const wxString& filename) +{ + wxMemoryFSHash::iterator i = m_Hash.find(filename); + if ( i == m_Hash.end() ) + { + wxLogError(_("Trying to remove file '%s' from memory VFS, " + "but it is not loaded!"), + filename); + return; + } + + delete i->second; + m_Hash.erase(i); +} + +#endif // wxUSE_BASE + +#if wxUSE_GUI + +#if wxUSE_IMAGE +/*static*/ void +wxMemoryFSHandler::AddFile(const wxString& filename, + const wxImage& image, + wxBitmapType type) +{ + if ( !CheckDoesntExist(filename) ) + return; + + wxMemoryOutputStream mems; + if ( image.IsOk() && image.SaveFile(mems, type) ) + { + m_Hash[filename] = new wxMemoryFSFile + ( + mems, + wxImage::FindHandler(type)->GetMimeType() + ); + } + else + { + wxLogError(_("Failed to store image '%s' to memory VFS!"), filename); + } +} + +/*static*/ void +wxMemoryFSHandler::AddFile(const wxString& filename, + const wxBitmap& bitmap, + wxBitmapType type) +{ + wxImage img = bitmap.ConvertToImage(); + AddFile(filename, img, type); +} + +#endif // wxUSE_IMAGE + +#endif // wxUSE_GUI + + +#endif // wxUSE_FILESYSTEM && wxUSE_FS_ZIP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/fswatchercmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/fswatchercmn.cpp new file mode 100644 index 0000000000..cb32a14100 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/fswatchercmn.cpp @@ -0,0 +1,331 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/fswatchercmn.cpp +// Purpose: wxMswFileSystemWatcher +// Author: Bartosz Bekier +// Created: 2009-05-26 +// Copyright: (c) 2009 Bartosz Bekier +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FSWATCHER + +#include "wx/fswatcher.h" +#include "wx/private/fswatcher.h" + +// ============================================================================ +// helpers +// ============================================================================ + +wxDEFINE_EVENT(wxEVT_FSWATCHER, wxFileSystemWatcherEvent); + +static wxString GetFSWEventChangeTypeName(int type) +{ + switch (type) + { + case wxFSW_EVENT_CREATE: + return "CREATE"; + case wxFSW_EVENT_DELETE: + return "DELETE"; + case wxFSW_EVENT_RENAME: + return "RENAME"; + case wxFSW_EVENT_MODIFY: + return "MODIFY"; + case wxFSW_EVENT_ACCESS: + return "ACCESS"; + case wxFSW_EVENT_ATTRIB: // Currently this is wxGTK-only + return "ATTRIBUTE"; +#ifdef wxHAS_INOTIFY + case wxFSW_EVENT_UNMOUNT: // Currently this is wxGTK-only + return "UNMOUNT"; +#endif + case wxFSW_EVENT_WARNING: + return "WARNING"; + case wxFSW_EVENT_ERROR: + return "ERROR"; + } + + // should never be reached! + wxFAIL_MSG("Unknown change type"); + return "INVALID_TYPE"; +} + + +// ============================================================================ +// wxFileSystemWatcherEvent implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxFileSystemWatcherEvent, wxEvent); + +wxString wxFileSystemWatcherEvent::ToString() const +{ + if (IsError()) + { + return wxString::Format("FSW_EVT type=%d (%s) message='%s'", m_changeType, + GetFSWEventChangeTypeName(m_changeType), GetErrorDescription()); + } + return wxString::Format("FSW_EVT type=%d (%s) path='%s'", m_changeType, + GetFSWEventChangeTypeName(m_changeType), GetPath().GetFullPath()); +} + + +// ============================================================================ +// wxFileSystemWatcherEvent implementation +// ============================================================================ + +wxFileSystemWatcherBase::wxFileSystemWatcherBase() : + m_service(0), m_owner(this) +{ +} + +wxFileSystemWatcherBase::~wxFileSystemWatcherBase() +{ + RemoveAll(); + if (m_service) + { + delete m_service; + } +} + +bool wxFileSystemWatcherBase::Add(const wxFileName& path, int events) +{ + wxFSWPathType type = wxFSWPath_None; + if ( path.FileExists() ) + { + type = wxFSWPath_File; + } + else if ( path.DirExists() ) + { + type = wxFSWPath_Dir; + } + else + { + // Don't overreact to being passed a non-existent item. It may have + // only just been deleted, in which case doing nothing is correct + wxLogTrace(wxTRACE_FSWATCHER, + "Can't monitor non-existent path \"%s\" for changes.", + path.GetFullPath()); + return false; + } + + return AddAny(path, events, type); +} + +bool +wxFileSystemWatcherBase::AddAny(const wxFileName& path, + int events, + wxFSWPathType type, + const wxString& filespec) +{ + wxString canonical = GetCanonicalPath(path); + if (canonical.IsEmpty()) + return false; + + // adding a path in a platform specific way + wxFSWatchInfo watch(canonical, events, type, filespec); + if ( !m_service->Add(watch) ) + return false; + + // on success, either add path to our 'watch-list' + // or, if already watched, inc the refcount. This may happen if + // a dir is Add()ed, then later AddTree() is called on a parent dir + wxFSWatchInfoMap::iterator it = m_watches.find(canonical); + if ( it == m_watches.end() ) + { + wxFSWatchInfoMap::value_type val(canonical, watch); + m_watches.insert(val); + } + else + { + wxFSWatchInfo& watch = it->second; + int count = watch.IncRef(); + wxLogTrace(wxTRACE_FSWATCHER, + "'%s' is now watched %d times", canonical, count); + } + return true; +} + +bool wxFileSystemWatcherBase::Remove(const wxFileName& path) +{ + // args validation & consistency checks + wxString canonical = GetCanonicalPath(path); + if (canonical.IsEmpty()) + return false; + + wxFSWatchInfoMap::iterator it = m_watches.find(canonical); + wxCHECK_MSG(it != m_watches.end(), false, + wxString::Format("Path '%s' is not watched", canonical)); + + // Decrement the watch's refcount and remove from watch-list if 0 + bool ret = true; + wxFSWatchInfo& watch = it->second; + if ( !watch.DecRef() ) + { + // remove in a platform specific way + ret = m_service->Remove(watch); + + m_watches.erase(it); + } + return ret; +} + +bool wxFileSystemWatcherBase::AddTree(const wxFileName& path, int events, + const wxString& filespec) +{ + if (!path.DirExists()) + return false; + + // OPT could be optimised if we stored information about relationships + // between paths + class AddTraverser : public wxDirTraverser + { + public: + AddTraverser(wxFileSystemWatcherBase* watcher, int events, + const wxString& filespec) : + m_watcher(watcher), m_events(events), m_filespec(filespec) + { + } + + virtual wxDirTraverseResult OnFile(const wxString& WXUNUSED(filename)) + { + // There is no need to watch individual files as we watch the + // parent directory which will notify us about any changes in them. + return wxDIR_CONTINUE; + } + + virtual wxDirTraverseResult OnDir(const wxString& dirname) + { + if ( m_watcher->AddAny(wxFileName::DirName(dirname), + m_events, wxFSWPath_Tree, m_filespec) ) + { + wxLogTrace(wxTRACE_FSWATCHER, + "--- AddTree adding directory '%s' ---", dirname); + } + return wxDIR_CONTINUE; + } + + private: + wxFileSystemWatcherBase* m_watcher; + int m_events; + wxString m_filespec; + }; + + wxDir dir(path.GetFullPath()); + // Prevent asserts or infinite loops in trees containing symlinks + int flags = wxDIR_DIRS; + if ( !path.ShouldFollowLink() ) + { + flags |= wxDIR_NO_FOLLOW; + } + AddTraverser traverser(this, events, filespec); + dir.Traverse(traverser, filespec, flags); + + // Add the path itself explicitly as Traverse() doesn't return it. + AddAny(path.GetPathWithSep(), events, wxFSWPath_Tree, filespec); + + return true; +} + +bool wxFileSystemWatcherBase::RemoveTree(const wxFileName& path) +{ + if (!path.DirExists()) + return false; + + // OPT could be optimised if we stored information about relationships + // between paths + class RemoveTraverser : public wxDirTraverser + { + public: + RemoveTraverser(wxFileSystemWatcherBase* watcher, + const wxString& filespec) : + m_watcher(watcher), m_filespec(filespec) + { + } + + virtual wxDirTraverseResult OnFile(const wxString& WXUNUSED(filename)) + { + // We never watch the individual files when watching the tree, so + // nothing to do here. + return wxDIR_CONTINUE; + } + + virtual wxDirTraverseResult OnDir(const wxString& dirname) + { + m_watcher->Remove(wxFileName::DirName(dirname)); + return wxDIR_CONTINUE; + } + + private: + wxFileSystemWatcherBase* m_watcher; + wxString m_filespec; + }; + + // If AddTree() used a filespec, we must use the same one + wxString canonical = GetCanonicalPath(path); + wxFSWatchInfoMap::iterator it = m_watches.find(canonical); + wxCHECK_MSG( it != m_watches.end(), false, + wxString::Format("Path '%s' is not watched", canonical) ); + wxFSWatchInfo watch = it->second; + const wxString filespec = watch.GetFilespec(); + +#if defined(__WINDOWS__) + // When there's no filespec, the wxMSW AddTree() would have set a watch + // on only the passed 'path'. We must therefore remove only this + if (filespec.empty()) + { + return Remove(path); + } + // Otherwise fall through to the generic implementation +#endif // __WINDOWS__ + + wxDir dir(path.GetFullPath()); + // AddTree() might have used the wxDIR_NO_FOLLOW to prevent asserts or + // infinite loops in trees containing symlinks. We need to do the same + // or we'll try to remove unwatched items. Let's hope the caller used + // the same ShouldFollowLink() setting as in AddTree()... + int flags = wxDIR_DIRS; + if ( !path.ShouldFollowLink() ) + { + flags |= wxDIR_NO_FOLLOW; + } + RemoveTraverser traverser(this, filespec); + dir.Traverse(traverser, filespec, flags); + + // As in AddTree() above, handle the path itself explicitly. + Remove(path); + + return true; +} + +bool wxFileSystemWatcherBase::RemoveAll() +{ + const bool ret = m_service->RemoveAll(); + m_watches.clear(); + return ret; +} + +int wxFileSystemWatcherBase::GetWatchedPathsCount() const +{ + return m_watches.size(); +} + +int wxFileSystemWatcherBase::GetWatchedPaths(wxArrayString* paths) const +{ + wxCHECK_MSG( paths != NULL, -1, "Null array passed to retrieve paths"); + + wxFSWatchInfoMap::const_iterator it = m_watches.begin(); + for ( ; it != m_watches.end(); ++it) + { + paths->push_back(it->first); + } + + return m_watches.size(); +} + +#endif // wxUSE_FSWATCHER diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/ftp.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/ftp.cpp new file mode 100644 index 0000000000..c205cd7592 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/ftp.cpp @@ -0,0 +1,1019 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/ftp.cpp +// Purpose: FTP protocol +// Author: Guilhem Lavaux +// Modified by: Mark Johnson, wxWindows@mj10777.de +// 20000917 : RmDir, GetLastResult, GetList +// Vadim Zeitlin (numerous fixes and rewrites to all part of the +// code, support ASCII/Binary modes, better error reporting, more +// robust Abort(), support for arbitrary FTP commands, ...) +// Randall Fox (support for active mode) +// Created: 07/07/1997 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// (c) 1998-2004 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PROTOCOL_FTP + +#ifndef WX_PRECOMP + #include + #include "wx/string.h" + #include "wx/utils.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/wxcrtvararg.h" +#endif // WX_PRECOMP + +#include "wx/sckaddr.h" +#include "wx/socket.h" +#include "wx/url.h" +#include "wx/sckstrm.h" +#include "wx/protocol/protocol.h" +#include "wx/protocol/ftp.h" + +#include + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// the length of FTP status code (3 digits) +static const size_t LEN_CODE = 3; + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxFTP, wxProtocol) +IMPLEMENT_PROTOCOL(wxFTP, wxT("ftp"), wxT("ftp"), true) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxFTP constructor and destructor +// ---------------------------------------------------------------------------- + +wxFTP::wxFTP() +{ + m_streaming = false; + m_currentTransfermode = NONE; + + m_username = wxT("anonymous"); + m_password << wxGetUserId() << wxT('@') << wxGetFullHostName(); + + SetNotify(0); + SetFlags(wxSOCKET_NOWAIT); + m_bPassive = true; + m_bEncounteredError = false; +} + +wxFTP::~wxFTP() +{ + if ( m_streaming ) + { + // if we are streaming, this will issue + // an FTP ABORT command, to tell the server we are aborting + (void)Abort(); + } + + // now this issues a "QUIT" command to tell the server we are + Close(); +} + +// ---------------------------------------------------------------------------- +// wxFTP connect and login methods +// ---------------------------------------------------------------------------- + +bool wxFTP::Connect(const wxSockAddress& addr, bool WXUNUSED(wait)) +{ + if ( !wxProtocol::Connect(addr) ) + { + m_lastError = wxPROTO_NETERR; + return false; + } + + if ( !m_username ) + { + m_lastError = wxPROTO_CONNERR; + return false; + } + + // we should have 220 welcome message + if ( !CheckResult('2') ) + { + Close(); + return false; + } + + wxString command; + command.Printf(wxT("USER %s"), m_username.c_str()); + char rc = SendCommand(command); + if ( rc == '2' ) + { + // 230 return: user accepted without password + m_lastError = wxPROTO_NOERR; + return true; + } + + if ( rc != '3' ) + { + m_lastError = wxPROTO_CONNERR; + Close(); + return false; + } + + command.Printf(wxT("PASS %s"), m_password.c_str()); + if ( !CheckCommand(command, '2') ) + { + m_lastError = wxPROTO_CONNERR; + Close(); + return false; + } + + m_lastError = wxPROTO_NOERR; + return true; +} + +bool wxFTP::Connect(const wxString& host, unsigned short port) +{ + wxIPV4address addr; + addr.Hostname(host); + + if ( port ) + addr.Service(port); + else if (!addr.Service(wxT("ftp"))) + addr.Service(21); + + return Connect(addr); +} + +bool wxFTP::Close() +{ + if ( m_streaming ) + { + m_lastError = wxPROTO_STREAMING; + return false; + } + + if ( IsConnected() ) + { + if ( !CheckCommand(wxT("QUIT"), '2') ) + { + m_lastError = wxPROTO_CONNERR; + wxLogDebug(wxT("Failed to close connection gracefully.")); + } + } + + return wxSocketClient::Close(); +} + +// ============================================================================ +// low level methods +// ============================================================================ + +wxSocketBase *wxFTP::AcceptIfActive(wxSocketBase *sock) +{ + if ( m_bPassive ) + return sock; + + // now wait for a connection from server + wxSocketServer *sockSrv = (wxSocketServer *)sock; + if ( !sockSrv->WaitForAccept() ) + { + m_lastError = wxPROTO_CONNERR; + wxLogError(_("Timeout while waiting for FTP server to connect, try passive mode.")); + wxDELETE(sock); + } + else + { + m_lastError = wxPROTO_NOERR; + sock = sockSrv->Accept(true); + delete sockSrv; + } + + return sock; +} + +bool wxFTP::Abort() +{ + if ( !m_streaming ) + return true; + + m_streaming = false; + if ( !CheckCommand(wxT("ABOR"), '4') ) + return false; + + return CheckResult('2'); +} + + +// ---------------------------------------------------------------------------- +// Send command to FTP server +// ---------------------------------------------------------------------------- + +char wxFTP::SendCommand(const wxString& command) +{ + if ( m_streaming ) + { + m_lastError = wxPROTO_STREAMING; + return 0; + } + + wxString tmp_str = command + wxT("\r\n"); + const wxWX2MBbuf tmp_buf = tmp_str.mb_str(); + if ( Write(wxMBSTRINGCAST tmp_buf, strlen(tmp_buf)).Error()) + { + m_lastError = wxPROTO_NETERR; + return 0; + } + + // don't show the passwords in the logs (even in debug ones) + wxString cmd, password; + if ( command.Upper().StartsWith(wxT("PASS "), &password) ) + { + cmd << wxT("PASS ") << wxString(wxT('*'), password.length()); + } + else + { + cmd = command; + } + + LogRequest(cmd); + + m_lastError = wxPROTO_NOERR; + return GetResult(); +} + +// ---------------------------------------------------------------------------- +// Receive servers reply +// ---------------------------------------------------------------------------- + +char wxFTP::GetResult() +{ + // if we've already had a read or write timeout error, the connection is + // probably toast, so don't bother, it just wastes the users time + if ( m_bEncounteredError ) + return 0; + + wxString code; + + // m_lastResult will contain the entire server response, possibly on + // multiple lines + m_lastResult.clear(); + + // we handle multiline replies here according to RFC 959: it says that a + // reply may either be on 1 line of the form "xyz ..." or on several lines + // in whuch case it looks like + // xyz-... + // ... + // xyz ... + // and the intermeidate lines may start with xyz or not + bool badReply = false; + bool firstLine = true; + bool endOfReply = false; + while ( !endOfReply && !badReply ) + { + wxString line; + m_lastError = ReadLine(this,line); + if ( m_lastError ) + { + m_bEncounteredError = true; + return 0; + } + + LogResponse(line); + + if ( !m_lastResult.empty() ) + { + // separate from last line + m_lastResult += wxT('\n'); + } + + m_lastResult += line; + + // unless this is an intermediate line of a multiline reply, it must + // contain the code in the beginning and '-' or ' ' following it + if ( line.Len() < LEN_CODE + 1 ) + { + if ( firstLine ) + { + badReply = true; + } + } + else // line has at least 4 chars + { + // this is the char which tells us what we're dealing with + wxChar chMarker = line.GetChar(LEN_CODE); + + if ( firstLine ) + { + code = wxString(line, LEN_CODE); + + switch ( chMarker ) + { + case wxT(' '): + endOfReply = true; + break; + + case wxT('-'): + firstLine = false; + break; + + default: + // unexpected + badReply = true; + } + } + else // subsequent line of multiline reply + { + if ( line.compare(0, LEN_CODE, code) == 0 ) + { + if ( chMarker == wxT(' ') ) + { + endOfReply = true; + } + } + } + } + } + + if ( badReply ) + { + wxLogDebug(wxT("Broken FTP server: '%s' is not a valid reply."), + m_lastResult.c_str()); + + m_lastError = wxPROTO_PROTERR; + + return 0; + } + else + m_lastError = wxPROTO_NOERR; + + // if we got here we must have a non empty code string + return (char)code[0u]; +} + +// ---------------------------------------------------------------------------- +// wxFTP simple commands +// ---------------------------------------------------------------------------- + +bool wxFTP::SetTransferMode(TransferMode transferMode) +{ + if ( transferMode == m_currentTransfermode ) + { + // nothing to do + return true; + } + + wxString mode; + switch ( transferMode ) + { + default: + wxFAIL_MSG(wxT("unknown FTP transfer mode")); + // fall through + + case BINARY: + mode = wxT('I'); + break; + + case ASCII: + mode = wxT('A'); + break; + } + + if ( !DoSimpleCommand(wxT("TYPE"), mode) ) + { + wxLogError(_("Failed to set FTP transfer mode to %s."), + (transferMode == ASCII ? _("ASCII") : _("binary"))); + + return false; + } + + // If we get here the operation has been successfully completed + // Set the status-member + m_currentTransfermode = transferMode; + + return true; +} + +bool wxFTP::DoSimpleCommand(const wxChar *command, const wxString& arg) +{ + wxString fullcmd = command; + if ( !arg.empty() ) + { + fullcmd << wxT(' ') << arg; + } + + if ( !CheckCommand(fullcmd, '2') ) + { + wxLogDebug(wxT("FTP command '%s' failed."), fullcmd.c_str()); + m_lastError = wxPROTO_NETERR; + + return false; + } + + m_lastError = wxPROTO_NOERR; + return true; +} + +bool wxFTP::ChDir(const wxString& dir) +{ + // some servers might not understand ".." if they use different directory + // tree conventions, but they always understand CDUP - should we use it if + // dir == ".."? OTOH, do such servers (still) exist? + + return DoSimpleCommand(wxT("CWD"), dir); +} + +bool wxFTP::MkDir(const wxString& dir) +{ + return DoSimpleCommand(wxT("MKD"), dir); +} + +bool wxFTP::RmDir(const wxString& dir) +{ + return DoSimpleCommand(wxT("RMD"), dir); +} + +wxString wxFTP::Pwd() +{ + wxString path; + + if ( CheckCommand(wxT("PWD"), '2') ) + { + // the result is at least that long if CheckCommand() succeeded + wxString::const_iterator p = m_lastResult.begin() + LEN_CODE + 1; + if ( *p != wxT('"') ) + { + wxLogDebug(wxT("Missing starting quote in reply for PWD: %s"), + wxString(p, m_lastResult.end())); + } + else + { + for ( ++p; (bool)*p; ++p ) // FIXME-DMARS + { + if ( *p == wxT('"') ) + { + // check if the quote is doubled + ++p; + if ( !*p || *p != wxT('"') ) + { + // no, this is the end + break; + } + //else: yes, it is: this is an embedded quote in the + // filename, treat as normal char + } + + path += *p; + } + + if ( !*p ) + { + wxLogDebug(wxT("Missing ending quote in reply for PWD: %s"), + m_lastResult.c_str() + LEN_CODE + 1); + } + } + } + else + { + m_lastError = wxPROTO_PROTERR; + wxLogDebug(wxT("FTP PWD command failed.")); + } + + return path; +} + +bool wxFTP::Rename(const wxString& src, const wxString& dst) +{ + wxString str; + + str = wxT("RNFR ") + src; + if ( !CheckCommand(str, '3') ) + return false; + + str = wxT("RNTO ") + dst; + + return CheckCommand(str, '2'); +} + +bool wxFTP::RmFile(const wxString& path) +{ + wxString str; + str = wxT("DELE ") + path; + + return CheckCommand(str, '2'); +} + +// ---------------------------------------------------------------------------- +// wxFTP port methods +// ---------------------------------------------------------------------------- + +wxSocketBase *wxFTP::GetPort() +{ + /* + PASSIVE: Client sends a "PASV" to the server. The server responds with + an address and port number which it will be listening on. Then + the client connects to the server at the specified address and + port. + + ACTIVE: Client sends the server a PORT command which includes an + address and port number which the client will be listening on. + The server then connects to the client at that address and + port. + */ + + wxSocketBase *socket = m_bPassive ? GetPassivePort() : GetActivePort(); + if ( !socket ) + { + m_bEncounteredError = true; + return NULL; + } + + // Now set the time for the new socket to the default or user selected + // timeout period + socket->SetTimeout(m_uiDefaultTimeout); + + return socket; +} + +wxString wxFTP::GetPortCmdArgument(const wxIPV4address& addrLocal, + const wxIPV4address& addrNew) +{ + // Just fills in the return value with the local IP + // address of the current socket. Also it fill in the + // PORT which the client will be listening on + + wxString addrIP = addrLocal.IPAddress(); + int portNew = addrNew.Service(); + + // We need to break the PORT number in bytes + addrIP.Replace(wxT("."), wxT(",")); + addrIP << wxT(',') + << wxString::Format(wxT("%d"), portNew >> 8) << wxT(',') + << wxString::Format(wxT("%d"), portNew & 0xff); + + // Now we have a value like "10,0,0,1,5,23" + return addrIP; +} + +wxSocketBase *wxFTP::GetActivePort() +{ + // we need an address to listen on + wxIPV4address addrNew, addrLocal; + GetLocal(addrLocal); + addrNew.AnyAddress(); + addrNew.Service(0); // pick an open port number. + + wxSocketServer *sockSrv = new wxSocketServer(addrNew); + if (!sockSrv->IsOk()) + { + // We use IsOk() here to see if everything is ok + m_lastError = wxPROTO_PROTERR; + delete sockSrv; + return NULL; + } + + //gets the new address, actually it is just the port number + sockSrv->GetLocal(addrNew); + + // Now we create the argument of the PORT command, we send in both + // addresses because the addrNew has an IP of "0.0.0.0", so we need the + // value in addrLocal + wxString port = GetPortCmdArgument(addrLocal, addrNew); + if ( !DoSimpleCommand(wxT("PORT"), port) ) + { + m_lastError = wxPROTO_PROTERR; + delete sockSrv; + wxLogError(_("The FTP server doesn't support the PORT command.")); + return NULL; + } + + m_lastError = wxPROTO_NOERR; + sockSrv->Notify(false); // Don't send any events + return sockSrv; +} + +wxSocketBase *wxFTP::GetPassivePort() +{ + if ( !DoSimpleCommand(wxT("PASV")) ) + { + m_lastError = wxPROTO_PROTERR; + wxLogError(_("The FTP server doesn't support passive mode.")); + return NULL; + } + + size_t addrStart = m_lastResult.find(wxT('(')); + size_t addrEnd = (addrStart == wxString::npos) + ? wxString::npos + : m_lastResult.find(wxT(')'), addrStart); + + if ( addrEnd == wxString::npos ) + { + m_lastError = wxPROTO_PROTERR; + return NULL; + } + + // get the port number and address + int a[6]; + wxString straddr(m_lastResult, addrStart + 1, addrEnd - (addrStart + 1)); + wxSscanf(straddr, wxT("%d,%d,%d,%d,%d,%d"), + &a[2],&a[3],&a[4],&a[5],&a[0],&a[1]); + + wxUint32 hostaddr = (wxUint16)a[2] << 24 | + (wxUint16)a[3] << 16 | + (wxUint16)a[4] << 8 | + a[5]; + wxUint16 port = (wxUint16)(a[0] << 8 | a[1]); + + wxIPV4address addr; + addr.Hostname(hostaddr); + addr.Service(port); + + wxSocketClient *client = new wxSocketClient(); + if ( !client->Connect(addr) ) + { + m_lastError = wxPROTO_CONNERR; + delete client; + return NULL; + } + + client->Notify(false); + + m_lastError = wxPROTO_NOERR; + return client; +} + + +// ---------------------------------------------------------------------------- +// wxFTP download and upload +// ---------------------------------------------------------------------------- + +class wxInputFTPStream : public wxSocketInputStream +{ +public: + wxInputFTPStream(wxFTP *ftp, wxSocketBase *sock) + : wxSocketInputStream(*sock) + { + m_ftp = ftp; + // socket timeout automatically set in GetPort function + } + + virtual ~wxInputFTPStream() + { + delete m_i_socket; // keep at top + + // when checking the result, the stream will + // almost always show an error, even if the file was + // properly transferred, thus, let's just grab the result + + // we are looking for "226 transfer completed" + char code = m_ftp->GetResult(); + if ('2' == code) + { + // it was a good transfer. + // we're done! + m_ftp->m_streaming = false; + return; + } + // did we timeout? + if (0 == code) + { + // the connection is probably toast. issue an abort, and + // then a close. there won't be any more waiting + // for this connection + m_ftp->Abort(); + m_ftp->Close(); + return; + } + // There was a problem with the transfer and the server + // has acknowledged it. If we issue an "ABORT" now, the user + // would get the "226" for the abort and think the xfer was + // complete, thus, don't do anything here, just return + } + + wxFTP *m_ftp; + + wxDECLARE_NO_COPY_CLASS(wxInputFTPStream); +}; + +class wxOutputFTPStream : public wxSocketOutputStream +{ +public: + wxOutputFTPStream(wxFTP *ftp_clt, wxSocketBase *sock) + : wxSocketOutputStream(*sock), m_ftp(ftp_clt) + { + } + + virtual ~wxOutputFTPStream(void) + { + if ( IsOk() ) + { + // close data connection first, this will generate "transfer + // completed" reply + delete m_o_socket; + + // read this reply + m_ftp->GetResult(); // save result so user can get to it + + m_ftp->m_streaming = false; + } + else + { + // abort data connection first + m_ftp->Abort(); + + // and close it after + delete m_o_socket; + } + } + + wxFTP *m_ftp; + + wxDECLARE_NO_COPY_CLASS(wxOutputFTPStream); +}; + +wxInputStream *wxFTP::GetInputStream(const wxString& path) +{ + if ( ( m_currentTransfermode == NONE ) && !SetTransferMode(BINARY) ) + { + m_lastError = wxPROTO_CONNERR; + return NULL; + } + + wxSocketBase *sock = GetPort(); + + if ( !sock ) + { + m_lastError = wxPROTO_NETERR; + return NULL; + } + + wxString tmp_str = wxT("RETR ") + wxURI::Unescape(path); + if ( !CheckCommand(tmp_str, '1') ) + return NULL; + + sock = AcceptIfActive(sock); + if ( !sock ) + { + m_lastError = wxPROTO_CONNERR; + return NULL; + } + + sock->SetFlags(wxSOCKET_WAITALL); + + m_streaming = true; + + wxInputFTPStream *in_stream = new wxInputFTPStream(this, sock); + + m_lastError = wxPROTO_NOERR; + return in_stream; +} + +wxOutputStream *wxFTP::GetOutputStream(const wxString& path) +{ + if ( ( m_currentTransfermode == NONE ) && !SetTransferMode(BINARY) ) + { + m_lastError = wxPROTO_CONNERR; + return NULL; + } + + wxSocketBase *sock = GetPort(); + + wxString tmp_str = wxT("STOR ") + path; + if ( !CheckCommand(tmp_str, '1') ) + return NULL; + + sock = AcceptIfActive(sock); + + m_streaming = true; + + m_lastError = wxPROTO_NOERR; + return new wxOutputFTPStream(this, sock); +} + +// ---------------------------------------------------------------------------- +// FTP directory listing +// ---------------------------------------------------------------------------- + +bool wxFTP::GetList(wxArrayString& files, + const wxString& wildcard, + bool details) +{ + wxSocketBase *sock = GetPort(); + if (!sock) { + m_lastError = wxPROTO_NETERR; + return false; + } + + // NLST : List of Filenames (including Directory's !) + // LIST : depending on BS of FTP-Server + // - Unix : result like "ls" command + // - Windows : like "dir" command + // - others : ? + wxString line(details ? wxT("LIST") : wxT("NLST")); + if ( !wildcard.empty() ) + { + line << wxT(' ') << wildcard; + } + + if ( !CheckCommand(line, '1') ) + { + m_lastError = wxPROTO_PROTERR; + wxLogDebug(wxT("FTP 'LIST' command returned unexpected result from server")); + delete sock; + return false; + } + + sock = AcceptIfActive(sock); + if ( !sock ) { + m_lastError = wxPROTO_CONNERR; + return false; + } + + files.Empty(); + while (ReadLine(sock, line) == wxPROTO_NOERR ) + { + files.Add(line); + } + + delete sock; + + // the file list should be terminated by "226 Transfer complete"" + m_lastError = wxPROTO_NOERR; + return CheckResult('2'); +} + +bool wxFTP::FileExists(const wxString& fileName) +{ + // This function checks if the file specified in fileName exists in the + // current dir. It does so by simply doing an NLST (via GetList). + // If this succeeds (and the list is not empty) the file exists. + + bool retval = false; + wxArrayString fileList; + + if ( GetList(fileList, fileName, false) ) + { + // Some ftp-servers (Ipswitch WS_FTP Server 1.0.5 does this) + // displays this behaviour when queried on a nonexistent file: + // NLST this_file_does_not_exist + // 150 Opening ASCII data connection for directory listing + // (no data transferred) + // 226 Transfer complete + // Here wxFTP::GetList(...) will succeed but it will return an empty + // list. + retval = !fileList.IsEmpty(); + } + + return retval; +} + +// ---------------------------------------------------------------------------- +// FTP GetSize +// ---------------------------------------------------------------------------- + +int wxFTP::GetFileSize(const wxString& fileName) +{ + // return the filesize of the given file if possible + // return -1 otherwise (predominantly if file doesn't exist + // in current dir) + + int filesize = -1; + + // Check for existence of file via wxFTP::FileExists(...) + if ( FileExists(fileName) ) + { + wxString command; + + // First try "SIZE" command using BINARY(IMAGE) transfermode + // Especially UNIX ftp-servers distinguish between the different + // transfermodes and reports different filesizes accordingly. + // The BINARY size is the interesting one: How much memory + // will we need to hold this file? + TransferMode oldTransfermode = m_currentTransfermode; + SetTransferMode(BINARY); + command << wxT("SIZE ") << fileName; + + bool ok = CheckCommand(command, '2'); + + if ( ok ) + { + // The answer should be one line: "213 \n" + // 213 is File Status (STD9) + // "SIZE" is not described anywhere..? It works on most servers + int statuscode; + if ( wxSscanf(GetLastResult().c_str(), wxT("%i %i"), + &statuscode, &filesize) == 2 ) + { + // We've gotten a good reply. + ok = true; + } + else + { + // Something bad happened.. A "2yz" reply with no size + // Fallback + ok = false; + } + } + + // Set transfermode back to the original. Only the "SIZE"-command + // is dependent on transfermode + if ( oldTransfermode != NONE ) + { + SetTransferMode(oldTransfermode); + } + + // this is not a direct else clause.. The size command might return an + // invalid "2yz" reply + if ( !ok ) + { + // The server didn't understand the "SIZE"-command or it + // returned an invalid reply. + // We now try to get details for the file with a "LIST"-command + // and then parse the output from there.. + wxArrayString fileList; + if ( GetList(fileList, fileName, true) ) + { + if ( !fileList.IsEmpty() ) + { + // We _should_ only get one line in return, but just to be + // safe we run through the line(s) returned and look for a + // substring containing the name we are looking for. We + // stop the iteration at the first occurrence of the + // filename. The search is not case-sensitive. + const size_t numFiles = fileList.size(); + size_t i; + for ( i = 0; i < fileList.GetCount(); i++ ) + { + if ( fileList[i].Upper().Contains(fileName.Upper()) ) + break; + } + + if ( i != numFiles ) + { + // The index i points to the first occurrence of + // fileName in the array Now we have to find out what + // format the LIST has returned. There are two + // "schools": Unix-like + // + // '-rw-rw-rw- owner group size month day time filename' + // + // or Windows-like + // + // 'date size filename' + + // check if the first character is '-'. This would + // indicate Unix-style (this also limits this function + // to searching for files, not directories) + if ( fileList[i].Mid(0, 1) == wxT("-") ) + { + + if ( wxSscanf(fileList[i].c_str(), + wxT("%*s %*s %*s %*s %i %*s %*s %*s %*s"), + &filesize) != 9 ) + { + // Hmm... Invalid response + wxLogDebug(wxT("Invalid LIST response")); + } + } + else // Windows-style response (?) + { + if ( wxSscanf(fileList[i].c_str(), + wxT("%*s %*s %i %*s"), + &filesize) != 4 ) + { + // something bad happened..? + wxLogDebug(wxT("Invalid or unknown LIST response")); + } + } + } + } + } + } + } + + // filesize might still be -1 when exiting + return filesize; +} + +#endif // wxUSE_PROTOCOL_FTP + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/gaugecmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/gaugecmn.cpp new file mode 100644 index 0000000000..9997495013 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/gaugecmn.cpp @@ -0,0 +1,218 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/gaugecmn.cpp +// Purpose: wxGaugeBase: common to all ports methods of wxGauge +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.02.01 +// Copyright: (c) 2001 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#endif //WX_PRECOMP + +#if wxUSE_GAUGE + +#include "wx/gauge.h" + +const char wxGaugeNameStr[] = "gauge"; + +// ============================================================================ +// implementation +// ============================================================================ + +wxGaugeBase::~wxGaugeBase() +{ + // this destructor is required for Darwin +} + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxGaugeStyle ) +wxBEGIN_FLAGS( wxGaugeStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxGA_HORIZONTAL) +wxFLAGS_MEMBER(wxGA_VERTICAL) +#if WXWIN_COMPATIBILITY_2_6 +wxFLAGS_MEMBER(wxGA_PROGRESSBAR) +#endif // WXWIN_COMPATIBILITY_2_6 +wxFLAGS_MEMBER(wxGA_SMOOTH) +wxEND_FLAGS( wxGaugeStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxGauge, wxControl, "wx/gauge.h") + +wxBEGIN_PROPERTIES_TABLE(wxGauge) +wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) +wxPROPERTY( Range, int, SetRange, GetRange, 0, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) +wxPROPERTY( ShadowWidth, int, SetShadowWidth, GetShadowWidth, \ + 0, 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxPROPERTY( BezelFace, int, SetBezelFace, GetBezelFace, \ + 0, 0 /*flags*/, wxT("Helpstring"), wxT("group")) + +wxPROPERTY_FLAGS( WindowStyle, wxGaugeStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxGauge) + +wxCONSTRUCTOR_6( wxGauge, wxWindow*, Parent, wxWindowID, Id, int, Range, \ + wxPoint, Position, wxSize, Size, long, WindowStyle ) + +// ---------------------------------------------------------------------------- +// wxGauge creation +// ---------------------------------------------------------------------------- + +bool wxGaugeBase::Create(wxWindow *parent, + wxWindowID id, + int range, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) + return false; + + SetName(name); + +#if wxUSE_VALIDATORS + SetValidator(validator); +#endif // wxUSE_VALIDATORS + + SetRange(range); + SetValue(0); +#if wxGAUGE_EMULATE_INDETERMINATE_MODE + m_nDirection = wxRIGHT; +#endif + + return true; +} + +// ---------------------------------------------------------------------------- +// wxGauge determinate mode range/position +// ---------------------------------------------------------------------------- + +void wxGaugeBase::SetRange(int range) +{ + m_rangeMax = range; +} + +int wxGaugeBase::GetRange() const +{ + return m_rangeMax; +} + +void wxGaugeBase::SetValue(int pos) +{ + m_gaugePos = pos; +} + +int wxGaugeBase::GetValue() const +{ + return m_gaugePos; +} + +// ---------------------------------------------------------------------------- +// wxGauge indeterminate mode +// ---------------------------------------------------------------------------- + +void wxGaugeBase::Pulse() +{ +#if wxGAUGE_EMULATE_INDETERMINATE_MODE + // simulate indeterminate mode + int curr = GetValue(), max = GetRange(); + + if (m_nDirection == wxRIGHT) + { + if (curr < max) + SetValue(curr + 1); + else + { + SetValue(max - 1); + m_nDirection = wxLEFT; + } + } + else + { + if (curr > 0) + SetValue(curr - 1); + else + { + SetValue(1); + m_nDirection = wxRIGHT; + } + } +#endif +} + +// ---------------------------------------------------------------------------- +// wxGauge appearance params +// ---------------------------------------------------------------------------- + +void wxGaugeBase::SetShadowWidth(int WXUNUSED(w)) +{ +} + +int wxGaugeBase::GetShadowWidth() const +{ + return 0; +} + + +void wxGaugeBase::SetBezelFace(int WXUNUSED(w)) +{ +} + +int wxGaugeBase::GetBezelFace() const +{ + return 0; +} + +#endif // wxUSE_GAUGE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/gbsizer.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/gbsizer.cpp new file mode 100644 index 0000000000..88a6394175 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/gbsizer.cpp @@ -0,0 +1,797 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/gbsizer.cpp +// Purpose: wxGridBagSizer: A sizer that can lay out items in a grid, +// with items at specified cells, and with the option of row +// and/or column spanning +// +// Author: Robin Dunn +// Created: 03-Nov-2003 +// Copyright: (c) Robin Dunn +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/gbsizer.h" + +//--------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGBSizerItem, wxSizerItem) +IMPLEMENT_CLASS(wxGridBagSizer, wxFlexGridSizer) + +const wxGBSpan wxDefaultSpan; + +//--------------------------------------------------------------------------- +// wxGBSizerItem +//--------------------------------------------------------------------------- + +wxGBSizerItem::wxGBSizerItem( int width, + int height, + const wxGBPosition& pos, + const wxGBSpan& span, + int flag, + int border, + wxObject* userData) + : wxSizerItem(width, height, 0, flag, border, userData), + m_pos(pos), + m_span(span), + m_gbsizer(NULL) +{ +} + + +wxGBSizerItem::wxGBSizerItem( wxWindow *window, + const wxGBPosition& pos, + const wxGBSpan& span, + int flag, + int border, + wxObject* userData ) + : wxSizerItem(window, 0, flag, border, userData), + m_pos(pos), + m_span(span), + m_gbsizer(NULL) +{ +} + + +wxGBSizerItem::wxGBSizerItem( wxSizer *sizer, + const wxGBPosition& pos, + const wxGBSpan& span, + int flag, + int border, + wxObject* userData ) + : wxSizerItem(sizer, 0, flag, border, userData), + m_pos(pos), + m_span(span), + m_gbsizer(NULL) +{ +} + +wxGBSizerItem::wxGBSizerItem() + : wxSizerItem(), + m_pos(-1,-1), + m_gbsizer(NULL) +{ +} + +//--------------------------------------------------------------------------- + + +void wxGBSizerItem::GetPos(int& row, int& col) const +{ + row = m_pos.GetRow(); + col = m_pos.GetCol(); +} + +void wxGBSizerItem::GetSpan(int& rowspan, int& colspan) const +{ + rowspan = m_span.GetRowspan(); + colspan = m_span.GetColspan(); +} + + +bool wxGBSizerItem::SetPos( const wxGBPosition& pos ) +{ + if (m_gbsizer) + { + wxCHECK_MSG( !m_gbsizer->CheckForIntersection(pos, m_span, this), false, + wxT("An item is already at that position") ); + } + m_pos = pos; + return true; +} + +bool wxGBSizerItem::SetSpan( const wxGBSpan& span ) +{ + if (m_gbsizer) + { + wxCHECK_MSG( !m_gbsizer->CheckForIntersection(m_pos, span, this), false, + wxT("An item is already at that position") ); + } + m_span = span; + return true; +} + + +inline bool InRange(int val, int min, int max) +{ + return (val >= min && val <= max); +} + +bool wxGBSizerItem::Intersects(const wxGBSizerItem& other) +{ + return Intersects(other.GetPos(), other.GetSpan()); +} + +bool wxGBSizerItem::Intersects(const wxGBPosition& pos, const wxGBSpan& span) +{ + + int row, col, endrow, endcol; + int otherrow, othercol, otherendrow, otherendcol; + + GetPos(row, col); + GetEndPos(endrow, endcol); + + otherrow = pos.GetRow(); + othercol = pos.GetCol(); + otherendrow = otherrow + span.GetRowspan() - 1; + otherendcol = othercol + span.GetColspan() - 1; + + // is the other item's start or end in the range of this one? + if (( InRange(otherrow, row, endrow) && InRange(othercol, col, endcol) ) || + ( InRange(otherendrow, row, endrow) && InRange(otherendcol, col, endcol) )) + return true; + + // is this item's start or end in the range of the other one? + if (( InRange(row, otherrow, otherendrow) && InRange(col, othercol, otherendcol) ) || + ( InRange(endrow, otherrow, otherendrow) && InRange(endcol, othercol, otherendcol) )) + return true; + + return false; +} + + +void wxGBSizerItem::GetEndPos(int& row, int& col) +{ + row = m_pos.GetRow() + m_span.GetRowspan() - 1; + col = m_pos.GetCol() + m_span.GetColspan() - 1; +} + + +//--------------------------------------------------------------------------- +// wxGridBagSizer +//--------------------------------------------------------------------------- + +wxGridBagSizer::wxGridBagSizer(int vgap, int hgap ) + : wxFlexGridSizer(1, vgap, hgap), + m_emptyCellSize(10,20) + +{ +} + + +wxSizerItem* wxGridBagSizer::Add( wxWindow *window, + const wxGBPosition& pos, const wxGBSpan& span, + int flag, int border, wxObject* userData ) +{ + wxGBSizerItem* item = new wxGBSizerItem(window, pos, span, flag, border, userData); + if ( Add(item) ) + return item; + else + { + delete item; + return NULL; + } +} + +wxSizerItem* wxGridBagSizer::Add( wxSizer *sizer, + const wxGBPosition& pos, const wxGBSpan& span, + int flag, int border, wxObject* userData ) +{ + wxGBSizerItem* item = new wxGBSizerItem(sizer, pos, span, flag, border, userData); + if ( Add(item) ) + return item; + else + { + delete item; + return NULL; + } +} + +wxSizerItem* wxGridBagSizer::Add( int width, int height, + const wxGBPosition& pos, const wxGBSpan& span, + int flag, int border, wxObject* userData ) +{ + wxGBSizerItem* item = new wxGBSizerItem(width, height, pos, span, flag, border, userData); + if ( Add(item) ) + return item; + else + { + delete item; + return NULL; + } +} + +wxSizerItem* wxGridBagSizer::Add( wxGBSizerItem *item ) +{ + wxCHECK_MSG( !CheckForIntersection(item), NULL, + wxT("An item is already at that position") ); + m_children.Append(item); + item->SetGBSizer(this); + if ( item->GetWindow() ) + item->GetWindow()->SetContainingSizer( this ); + + // extend the number of rows/columns of the underlying wxFlexGridSizer if + // necessary + int row, col; + item->GetEndPos(row, col); + row++; + col++; + + if ( row > GetRows() ) + SetRows(row); + if ( col > GetCols() ) + SetCols(col); + + return item; +} + + + +//--------------------------------------------------------------------------- + +wxSize wxGridBagSizer::GetCellSize(int row, int col) const +{ + wxCHECK_MSG( (row < m_rows) && (col < m_cols), + wxDefaultSize, + wxT("Invalid cell.")); + return wxSize( m_colWidths[col], m_rowHeights[row] ); +} + + +wxGBPosition wxGridBagSizer::GetItemPosition(wxWindow *window) +{ + wxGBPosition badpos(-1,-1); + wxGBSizerItem* item = FindItem(window); + wxCHECK_MSG(item, badpos, wxT("Failed to find item.")); + return item->GetPos(); +} + + +wxGBPosition wxGridBagSizer::GetItemPosition(wxSizer *sizer) +{ + wxGBPosition badpos(-1,-1); + wxGBSizerItem* item = FindItem(sizer); + wxCHECK_MSG(item, badpos, wxT("Failed to find item.")); + return item->GetPos(); +} + + +wxGBPosition wxGridBagSizer::GetItemPosition(size_t index) +{ + wxGBPosition badpos(-1,-1); + wxSizerItemList::compatibility_iterator node = m_children.Item( index ); + wxCHECK_MSG( node, badpos, wxT("Failed to find item.") ); + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + return item->GetPos(); +} + + + +bool wxGridBagSizer::SetItemPosition(wxWindow *window, const wxGBPosition& pos) +{ + wxGBSizerItem* item = FindItem(window); + wxCHECK_MSG(item, false, wxT("Failed to find item.")); + return item->SetPos(pos); +} + + +bool wxGridBagSizer::SetItemPosition(wxSizer *sizer, const wxGBPosition& pos) +{ + wxGBSizerItem* item = FindItem(sizer); + wxCHECK_MSG(item, false, wxT("Failed to find item.")); + return item->SetPos(pos); +} + + +bool wxGridBagSizer::SetItemPosition(size_t index, const wxGBPosition& pos) +{ + wxSizerItemList::compatibility_iterator node = m_children.Item( index ); + wxCHECK_MSG( node, false, wxT("Failed to find item.") ); + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + return item->SetPos(pos); +} + + + +wxGBSpan wxGridBagSizer::GetItemSpan(wxWindow *window) +{ + wxGBSizerItem* item = FindItem(window); + wxCHECK_MSG( item, wxGBSpan::Invalid(), wxT("Failed to find item.") ); + return item->GetSpan(); +} + + +wxGBSpan wxGridBagSizer::GetItemSpan(wxSizer *sizer) +{ + wxGBSizerItem* item = FindItem(sizer); + wxCHECK_MSG( item, wxGBSpan::Invalid(), wxT("Failed to find item.") ); + return item->GetSpan(); +} + + +wxGBSpan wxGridBagSizer::GetItemSpan(size_t index) +{ + wxSizerItemList::compatibility_iterator node = m_children.Item( index ); + wxCHECK_MSG( node, wxGBSpan::Invalid(), wxT("Failed to find item.") ); + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + return item->GetSpan(); +} + + + +bool wxGridBagSizer::SetItemSpan(wxWindow *window, const wxGBSpan& span) +{ + wxGBSizerItem* item = FindItem(window); + wxCHECK_MSG(item, false, wxT("Failed to find item.")); + return item->SetSpan(span); +} + + +bool wxGridBagSizer::SetItemSpan(wxSizer *sizer, const wxGBSpan& span) +{ + wxGBSizerItem* item = FindItem(sizer); + wxCHECK_MSG(item, false, wxT("Failed to find item.")); + return item->SetSpan(span); +} + + +bool wxGridBagSizer::SetItemSpan(size_t index, const wxGBSpan& span) +{ + wxSizerItemList::compatibility_iterator node = m_children.Item( index ); + wxCHECK_MSG( node, false, wxT("Failed to find item.") ); + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + return item->SetSpan(span); +} + + + + +wxGBSizerItem* wxGridBagSizer::FindItem(wxWindow* window) +{ + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + if ( item->GetWindow() == window ) + return item; + node = node->GetNext(); + } + return NULL; +} + + +wxGBSizerItem* wxGridBagSizer::FindItem(wxSizer* sizer) +{ + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + if ( item->GetSizer() == sizer ) + return item; + node = node->GetNext(); + } + return NULL; +} + + + + +wxGBSizerItem* wxGridBagSizer::FindItemAtPosition(const wxGBPosition& pos) +{ + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + if ( item->Intersects(pos, wxDefaultSpan) ) + return item; + node = node->GetNext(); + } + return NULL; +} + + + + +wxGBSizerItem* wxGridBagSizer::FindItemAtPoint(const wxPoint& pt) +{ + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + wxRect rect(item->GetPosition(), item->GetSize()); + rect.Inflate(m_hgap, m_vgap); + if ( rect.Contains(pt) ) + return item; + node = node->GetNext(); + } + return NULL; +} + + + + +wxGBSizerItem* wxGridBagSizer::FindItemWithData(const wxObject* userData) +{ + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + if ( item->GetUserData() == userData ) + return item; + node = node->GetNext(); + } + return NULL; +} + + + + +//--------------------------------------------------------------------------- + +// Figure out what all the min row heights and col widths are, and calculate +// min size from that. +wxSize wxGridBagSizer::CalcMin() +{ + int idx; + + if (m_children.GetCount() == 0) + return m_emptyCellSize; + + m_rowHeights.Empty(); + m_colWidths.Empty(); + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + if ( item->IsShown() ) + { + int row, col, endrow, endcol; + + item->GetPos(row, col); + item->GetEndPos(endrow, endcol); + + // fill heights and widths up to this item if needed + while ( (int)m_rowHeights.GetCount() <= endrow ) + m_rowHeights.Add(m_emptyCellSize.GetHeight()); + while ( (int)m_colWidths.GetCount() <= endcol ) + m_colWidths.Add(m_emptyCellSize.GetWidth()); + + // See if this item increases the size of its row(s) or col(s) + wxSize size(item->CalcMin()); + for (idx=row; idx <= endrow; idx++) + m_rowHeights[idx] = wxMax(m_rowHeights[idx], size.GetHeight() / (endrow-row+1)); + for (idx=col; idx <= endcol; idx++) + m_colWidths[idx] = wxMax(m_colWidths[idx], size.GetWidth() / (endcol-col+1)); + } + node = node->GetNext(); + } + + AdjustForOverflow(); + AdjustForFlexDirection(); + + // Now traverse the heights and widths arrays calcing the totals, including gaps + int width = 0; + m_cols = m_colWidths.GetCount(); + for (idx=0; idx < m_cols; idx++) + width += m_colWidths[idx] + ( idx == m_cols-1 ? 0 : m_hgap ); + + int height = 0; + m_rows = m_rowHeights.GetCount(); + for (idx=0; idx < m_rows; idx++) + height += m_rowHeights[idx] + ( idx == m_rows-1 ? 0 : m_vgap ); + + m_calculatedMinSize = wxSize(width, height); + return m_calculatedMinSize; +} + + + +void wxGridBagSizer::RecalcSizes() +{ + // We can't lay out our elements if we don't have at least a single row and + // a single column. Notice that this may happen even if we have some + // children but all of them are hidden, so checking for m_children being + // non-empty is not enough, see #15475. + if ( m_rowHeights.empty() || m_colWidths.empty() ) + return; + + wxPoint pt( GetPosition() ); + wxSize sz( GetSize() ); + + m_rows = m_rowHeights.GetCount(); + m_cols = m_colWidths.GetCount(); + int idx, width, height; + + AdjustForGrowables(sz); + + // Find the start positions on the window of the rows and columns + wxArrayInt rowpos; + rowpos.Add(0, m_rows); + int y = pt.y; + for (idx=0; idx < m_rows; idx++) + { + height = m_rowHeights[idx] + m_vgap; + rowpos[idx] = y; + y += height; + } + + wxArrayInt colpos; + colpos.Add(0, m_cols); + int x = pt.x; + for (idx=0; idx < m_cols; idx++) + { + width = m_colWidths[idx] + m_hgap; + colpos[idx] = x; + x += width; + } + + + // Now iterate the children, setting each child's dimensions + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + int row, col, endrow, endcol; + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + + if ( item->IsShown() ) + { + item->GetPos(row, col); + item->GetEndPos(endrow, endcol); + + height = 0; + for(idx=row; idx <= endrow; idx++) + height += m_rowHeights[idx]; + height += (endrow - row) * m_vgap; // add a vgap for every row spanned + + width = 0; + for (idx=col; idx <= endcol; idx++) + width += m_colWidths[idx]; + width += (endcol - col) * m_hgap; // add a hgap for every col spanned + + SetItemBounds(item, colpos[col], rowpos[row], width, height); + } + + node = node->GetNext(); + } +} + + +// Sometimes CalcMin can result in some rows or cols having too much space in +// them because as it traverses the items it makes some assumptions when +// items span to other cells. But those assumptions can become invalid later +// on when other items are fitted into the same rows or columns that the +// spanning item occupies. This method tries to find those situations and +// fixes them. +void wxGridBagSizer::AdjustForOverflow() +{ + int row, col; + + for (row=0; row<(int)m_rowHeights.GetCount(); row++) + { + int rowExtra=INT_MAX; + int rowHeight = m_rowHeights[row]; + for (col=0; col<(int)m_colWidths.GetCount(); col++) + { + wxGBPosition pos(row,col); + wxGBSizerItem* item = FindItemAtPosition(pos); + if ( !item || !item->IsShown() ) + continue; + + int endrow, endcol; + item->GetEndPos(endrow, endcol); + + // If the item starts in this position and doesn't span rows, then + // just look at the whole item height + if ( item->GetPos() == pos && endrow == row ) + { + int itemHeight = item->CalcMin().GetHeight(); + rowExtra = wxMin(rowExtra, rowHeight - itemHeight); + continue; + } + + // Otherwise, only look at spanning items if they end on this row + if ( endrow == row ) + { + // first deduct the portions of the item that are on prior rows + int itemHeight = item->CalcMin().GetHeight(); + for (int r=item->GetPos().GetRow(); rIsShown() ) + continue; + + int endrow, endcol; + item->GetEndPos(endrow, endcol); + + if ( item->GetPos() == pos && endcol == col ) + { + int itemWidth = item->CalcMin().GetWidth(); + colExtra = wxMin(colExtra, colWidth - itemWidth); + continue; + } + + if ( endcol == col ) + { + int itemWidth = item->CalcMin().GetWidth(); + for (int c=item->GetPos().GetCol(); cGetPos(), item->GetSpan(), excludeItem); +} + +bool wxGridBagSizer::CheckForIntersection(const wxGBPosition& pos, const wxGBSpan& span, wxGBSizerItem* excludeItem) +{ + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); + node = node->GetNext(); + + if ( excludeItem && item == excludeItem ) + continue; + + if ( item->Intersects(pos, span) ) + return true; + + } + return false; +} + + +// Assumes a 10x10 grid, and returns the first empty cell found. This is +// really stupid but it is only used by the Add methods that match the base +// class virtuals, which should normally not be used anyway... +wxGBPosition wxGridBagSizer::FindEmptyCell() +{ + int row, col; + + for (row=0; row<10; row++) + for (col=0; col<10; col++) + { + wxGBPosition pos(row, col); + if ( !CheckForIntersection(pos, wxDefaultSpan) ) + return pos; + } + return wxGBPosition(-1, -1); +} + + +//--------------------------------------------------------------------------- + +// The Add base class virtuals should not be used with this class, but +// we'll try to make them automatically select a location for the item +// anyway. + +wxSizerItem* wxGridBagSizer::Add( wxWindow *window, int, int flag, int border, wxObject* userData ) +{ + return Add(window, FindEmptyCell(), wxDefaultSpan, flag, border, userData); +} + +wxSizerItem* wxGridBagSizer::Add( wxSizer *sizer, int, int flag, int border, wxObject* userData ) +{ + return Add(sizer, FindEmptyCell(), wxDefaultSpan, flag, border, userData); +} + +wxSizerItem* wxGridBagSizer::Add( int width, int height, int, int flag, int border, wxObject* userData ) +{ + return Add(width, height, FindEmptyCell(), wxDefaultSpan, flag, border, userData); +} + + + +// The Insert nad Prepend base class virtuals that are not appropriate for +// this class and should not be used. Their implementation in this class +// simply fails. + +wxSizerItem* wxGridBagSizer::Add( wxSizerItem * ) +{ + wxFAIL_MSG(wxT("Invalid Add form called.")); + return NULL; +} + +wxSizerItem* wxGridBagSizer::Prepend( wxWindow *, int, int, int, wxObject* ) +{ + wxFAIL_MSG(wxT("Prepend should not be used with wxGridBagSizer.")); + return NULL; +} + +wxSizerItem* wxGridBagSizer::Prepend( wxSizer *, int, int, int, wxObject* ) +{ + wxFAIL_MSG(wxT("Prepend should not be used with wxGridBagSizer.")); + return NULL; +} + +wxSizerItem* wxGridBagSizer::Prepend( int, int, int, int, int, wxObject* ) +{ + wxFAIL_MSG(wxT("Prepend should not be used with wxGridBagSizer.")); + return NULL; +} + +wxSizerItem* wxGridBagSizer::Prepend( wxSizerItem * ) +{ + wxFAIL_MSG(wxT("Prepend should not be used with wxGridBagSizer.")); + return NULL; +} + + +wxSizerItem* wxGridBagSizer::Insert( size_t, wxWindow *, int, int, int, wxObject* ) +{ + wxFAIL_MSG(wxT("Insert should not be used with wxGridBagSizer.")); + return NULL; +} + +wxSizerItem* wxGridBagSizer::Insert( size_t, wxSizer *, int, int, int, wxObject* ) +{ + wxFAIL_MSG(wxT("Insert should not be used with wxGridBagSizer.")); + return NULL; +} + +wxSizerItem* wxGridBagSizer::Insert( size_t, int, int, int, int, int, wxObject* ) +{ + wxFAIL_MSG(wxT("Insert should not be used with wxGridBagSizer.")); + return NULL; +} + +wxSizerItem* wxGridBagSizer::Insert( size_t, wxSizerItem * ) +{ + wxFAIL_MSG(wxT("Insert should not be used with wxGridBagSizer.")); + return NULL; +} + + +//--------------------------------------------------------------------------- +//--------------------------------------------------------------------------- diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/gdicmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/gdicmn.cpp new file mode 100644 index 0000000000..4938977b10 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/gdicmn.cpp @@ -0,0 +1,931 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/gdicmn.cpp +// Purpose: Common GDI classes +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/gdicmn.h" +#include "wx/gdiobj.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/pen.h" + #include "wx/brush.h" + #include "wx/palette.h" + #include "wx/icon.h" + #include "wx/iconbndl.h" + #include "wx/cursor.h" + #include "wx/settings.h" + #include "wx/bitmap.h" + #include "wx/colour.h" + #include "wx/font.h" + #include "wx/math.h" +#endif + + +IMPLEMENT_ABSTRACT_CLASS(wxGDIObject, wxObject) + + +WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList; +WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList; +WXDLLIMPEXP_DATA_CORE(wxPenList*) wxThePenList; + +WXDLLIMPEXP_DATA_CORE(wxColourDatabase*) wxTheColourDatabase; + +WXDLLIMPEXP_DATA_CORE(wxBitmap) wxNullBitmap; +WXDLLIMPEXP_DATA_CORE(wxBrush) wxNullBrush; +WXDLLIMPEXP_DATA_CORE(wxColour) wxNullColour; +WXDLLIMPEXP_DATA_CORE(wxCursor) wxNullCursor; +WXDLLIMPEXP_DATA_CORE(wxFont) wxNullFont; +WXDLLIMPEXP_DATA_CORE(wxIcon) wxNullIcon; +WXDLLIMPEXP_DATA_CORE(wxPen) wxNullPen; +#if wxUSE_PALETTE +WXDLLIMPEXP_DATA_CORE(wxPalette) wxNullPalette; +#endif +WXDLLIMPEXP_DATA_CORE(wxIconBundle) wxNullIconBundle; + +const wxSize wxDefaultSize(wxDefaultCoord, wxDefaultCoord); +const wxPoint wxDefaultPosition(wxDefaultCoord, wxDefaultCoord); + +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxPointList) + + +#if wxUSE_EXTENDED_RTTI + +// wxPoint + +template<> void wxStringReadValue(const wxString &s , wxPoint &data ) +{ + wxSscanf(s, wxT("%d,%d"), &data.x , &data.y ) ; +} + +template<> void wxStringWriteValue(wxString &s , const wxPoint &data ) +{ + s = wxString::Format(wxT("%d,%d"), data.x , data.y ) ; +} + +wxCUSTOM_TYPE_INFO(wxPoint, wxToStringConverter , wxFromStringConverter) + +template<> void wxStringReadValue(const wxString &s , wxSize &data ) +{ + wxSscanf(s, wxT("%d,%d"), &data.x , &data.y ) ; +} + +template<> void wxStringWriteValue(wxString &s , const wxSize &data ) +{ + s = wxString::Format(wxT("%d,%d"), data.x , data.y ) ; +} + +wxCUSTOM_TYPE_INFO(wxSize, wxToStringConverter , wxFromStringConverter) + +#endif + +wxRect::wxRect(const wxPoint& point1, const wxPoint& point2) +{ + x = point1.x; + y = point1.y; + width = point2.x - point1.x; + height = point2.y - point1.y; + + if (width < 0) + { + width = -width; + x = point2.x; + } + width++; + + if (height < 0) + { + height = -height; + y = point2.y; + } + height++; +} + +wxRect& wxRect::Union(const wxRect& rect) +{ + // ignore empty rectangles: union with an empty rectangle shouldn't extend + // this one to (0, 0) + if ( !width || !height ) + { + *this = rect; + } + else if ( rect.width && rect.height ) + { + int x1 = wxMin(x, rect.x); + int y1 = wxMin(y, rect.y); + int y2 = wxMax(y + height, rect.height + rect.y); + int x2 = wxMax(x + width, rect.width + rect.x); + + x = x1; + y = y1; + width = x2 - x1; + height = y2 - y1; + } + //else: we're not empty and rect is empty + + return *this; +} + +wxRect& wxRect::Inflate(wxCoord dx, wxCoord dy) +{ + if (-2*dx>width) + { + // Don't allow deflate to eat more width than we have, + // a well-defined rectangle cannot have negative width. + x+=width/2; + width=0; + } + else + { + // The inflate is valid. + x-=dx; + width+=2*dx; + } + + if (-2*dy>height) + { + // Don't allow deflate to eat more height than we have, + // a well-defined rectangle cannot have negative height. + y+=height/2; + height=0; + } + else + { + // The inflate is valid. + y-=dy; + height+=2*dy; + } + + return *this; +} + +bool wxRect::Contains(int cx, int cy) const +{ + return ( (cx >= x) && (cy >= y) + && ((cy - y) < height) + && ((cx - x) < width) + ); +} + +bool wxRect::Contains(const wxRect& rect) const +{ + return Contains(rect.GetTopLeft()) && Contains(rect.GetBottomRight()); +} + +wxRect& wxRect::Intersect(const wxRect& rect) +{ + int x2 = GetRight(), + y2 = GetBottom(); + + if ( x < rect.x ) + x = rect.x; + if ( y < rect.y ) + y = rect.y; + if ( x2 > rect.GetRight() ) + x2 = rect.GetRight(); + if ( y2 > rect.GetBottom() ) + y2 = rect.GetBottom(); + + width = x2 - x + 1; + height = y2 - y + 1; + + if ( width <= 0 || height <= 0 ) + { + width = + height = 0; + } + + return *this; +} + +bool wxRect::Intersects(const wxRect& rect) const +{ + wxRect r = Intersect(rect); + + // if there is no intersection, both width and height are 0 + return r.width != 0; +} + +wxRect& wxRect::operator+=(const wxRect& rect) +{ + *this = *this + rect; + return *this; +} + + +wxRect& wxRect::operator*=(const wxRect& rect) +{ + *this = *this * rect; + return *this; +} + + +wxRect operator+(const wxRect& r1, const wxRect& r2) +{ + int x1 = wxMin(r1.x, r2.x); + int y1 = wxMin(r1.y, r2.y); + int y2 = wxMax(r1.y+r1.height, r2.height+r2.y); + int x2 = wxMax(r1.x+r1.width, r2.width+r2.x); + return wxRect(x1, y1, x2-x1, y2-y1); +} + +wxRect operator*(const wxRect& r1, const wxRect& r2) +{ + int x1 = wxMax(r1.x, r2.x); + int y1 = wxMax(r1.y, r2.y); + int y2 = wxMin(r1.y+r1.height, r2.height+r2.y); + int x2 = wxMin(r1.x+r1.width, r2.width+r2.x); + return wxRect(x1, y1, x2-x1, y2-y1); +} + +wxRealPoint::wxRealPoint(const wxPoint& pt) + : x(pt.x), y(pt.y) +{ +} + +// ============================================================================ +// wxColourDatabase +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxColourDatabase ctor/dtor +// ---------------------------------------------------------------------------- + +wxColourDatabase::wxColourDatabase () +{ + // will be created on demand in Initialize() + m_map = NULL; +} + +wxColourDatabase::~wxColourDatabase () +{ + if ( m_map ) + { + WX_CLEAR_HASH_MAP(wxStringToColourHashMap, *m_map); + + delete m_map; + } + +#ifdef __WXPM__ + delete [] m_palTable; +#endif +} + +// Colour database stuff +void wxColourDatabase::Initialize() +{ + if ( m_map ) + { + // already initialized + return; + } + + m_map = new wxStringToColourHashMap; + + static const struct wxColourDesc + { + const wxChar *name; + unsigned char r,g,b; + } + wxColourTable[] = + { + {wxT("AQUAMARINE"),112, 219, 147}, + {wxT("BLACK"),0, 0, 0}, + {wxT("BLUE"), 0, 0, 255}, + {wxT("BLUE VIOLET"), 159, 95, 159}, + {wxT("BROWN"), 165, 42, 42}, + {wxT("CADET BLUE"), 95, 159, 159}, + {wxT("CORAL"), 255, 127, 0}, + {wxT("CORNFLOWER BLUE"), 66, 66, 111}, + {wxT("CYAN"), 0, 255, 255}, + {wxT("DARK GREY"), 47, 47, 47}, // ? + + {wxT("DARK GREEN"), 47, 79, 47}, + {wxT("DARK OLIVE GREEN"), 79, 79, 47}, + {wxT("DARK ORCHID"), 153, 50, 204}, + {wxT("DARK SLATE BLUE"), 107, 35, 142}, + {wxT("DARK SLATE GREY"), 47, 79, 79}, + {wxT("DARK TURQUOISE"), 112, 147, 219}, + {wxT("DIM GREY"), 84, 84, 84}, + {wxT("FIREBRICK"), 142, 35, 35}, + {wxT("FOREST GREEN"), 35, 142, 35}, + {wxT("GOLD"), 204, 127, 50}, + {wxT("GOLDENROD"), 219, 219, 112}, + {wxT("GREY"), 128, 128, 128}, + {wxT("GREEN"), 0, 255, 0}, + {wxT("GREEN YELLOW"), 147, 219, 112}, + {wxT("INDIAN RED"), 79, 47, 47}, + {wxT("KHAKI"), 159, 159, 95}, + {wxT("LIGHT BLUE"), 191, 216, 216}, + {wxT("LIGHT GREY"), 192, 192, 192}, + {wxT("LIGHT STEEL BLUE"), 143, 143, 188}, + {wxT("LIME GREEN"), 50, 204, 50}, + {wxT("LIGHT MAGENTA"), 255, 119, 255}, + {wxT("MAGENTA"), 255, 0, 255}, + {wxT("MAROON"), 142, 35, 107}, + {wxT("MEDIUM AQUAMARINE"), 50, 204, 153}, + {wxT("MEDIUM GREY"), 100, 100, 100}, + {wxT("MEDIUM BLUE"), 50, 50, 204}, + {wxT("MEDIUM FOREST GREEN"), 107, 142, 35}, + {wxT("MEDIUM GOLDENROD"), 234, 234, 173}, + {wxT("MEDIUM ORCHID"), 147, 112, 219}, + {wxT("MEDIUM SEA GREEN"), 66, 111, 66}, + {wxT("MEDIUM SLATE BLUE"), 127, 0, 255}, + {wxT("MEDIUM SPRING GREEN"), 127, 255, 0}, + {wxT("MEDIUM TURQUOISE"), 112, 219, 219}, + {wxT("MEDIUM VIOLET RED"), 219, 112, 147}, + {wxT("MIDNIGHT BLUE"), 47, 47, 79}, + {wxT("NAVY"), 35, 35, 142}, + {wxT("ORANGE"), 204, 50, 50}, + {wxT("ORANGE RED"), 255, 0, 127}, + {wxT("ORCHID"), 219, 112, 219}, + {wxT("PALE GREEN"), 143, 188, 143}, + {wxT("PINK"), 255, 192, 203}, + {wxT("PLUM"), 234, 173, 234}, + {wxT("PURPLE"), 176, 0, 255}, + {wxT("RED"), 255, 0, 0}, + {wxT("SALMON"), 111, 66, 66}, + {wxT("SEA GREEN"), 35, 142, 107}, + {wxT("SIENNA"), 142, 107, 35}, + {wxT("SKY BLUE"), 50, 153, 204}, + {wxT("SLATE BLUE"), 0, 127, 255}, + {wxT("SPRING GREEN"), 0, 255, 127}, + {wxT("STEEL BLUE"), 35, 107, 142}, + {wxT("TAN"), 219, 147, 112}, + {wxT("THISTLE"), 216, 191, 216}, + {wxT("TURQUOISE"), 173, 234, 234}, + {wxT("VIOLET"), 79, 47, 79}, + {wxT("VIOLET RED"), 204, 50, 153}, + {wxT("WHEAT"), 216, 216, 191}, + {wxT("WHITE"), 255, 255, 255}, + {wxT("YELLOW"), 255, 255, 0}, + {wxT("YELLOW GREEN"), 153, 204, 50} + }; + + size_t n; + + for ( n = 0; n < WXSIZEOF(wxColourTable); n++ ) + { + const wxColourDesc& cc = wxColourTable[n]; + (*m_map)[cc.name] = new wxColour(cc.r, cc.g, cc.b); + } + +#ifdef __WXPM__ + m_palTable = new long[n]; + for ( n = 0; n < WXSIZEOF(wxColourTable); n++ ) + { + const wxColourDesc& cc = wxColourTable[n]; + m_palTable[n] = OS2RGB(cc.r,cc.g,cc.b); + } + m_nSize = n; +#endif +} + +// ---------------------------------------------------------------------------- +// wxColourDatabase operations +// ---------------------------------------------------------------------------- + +void wxColourDatabase::AddColour(const wxString& name, const wxColour& colour) +{ + Initialize(); + + // canonicalize the colour names before using them as keys: they should be + // in upper case + wxString colName = name; + colName.MakeUpper(); + + // ... and we also allow both grey/gray + wxString colNameAlt = colName; + if ( !colNameAlt.Replace(wxT("GRAY"), wxT("GREY")) ) + { + // but in this case it is not necessary so avoid extra search below + colNameAlt.clear(); + } + + wxStringToColourHashMap::iterator it = m_map->find(colName); + if ( it == m_map->end() && !colNameAlt.empty() ) + it = m_map->find(colNameAlt); + if ( it != m_map->end() ) + { + *(it->second) = colour; + } + else // new colour + { + (*m_map)[colName] = new wxColour(colour); + } +} + +wxColour wxColourDatabase::Find(const wxString& colour) const +{ + wxColourDatabase * const self = wxConstCast(this, wxColourDatabase); + self->Initialize(); + + // make the comparaison case insensitive and also match both grey and gray + wxString colName = colour; + colName.MakeUpper(); + wxString colNameAlt = colName; + if ( !colNameAlt.Replace(wxT("GRAY"), wxT("GREY")) ) + colNameAlt.clear(); + + wxStringToColourHashMap::iterator it = m_map->find(colName); + if ( it == m_map->end() && !colNameAlt.empty() ) + it = m_map->find(colNameAlt); + if ( it != m_map->end() ) + return *(it->second); + + // we did not find any result in existing colours: + // we won't use wxString -> wxColour conversion because the + // wxColour::Set(const wxString &) function which does that conversion + // internally uses this function (wxColourDatabase::Find) and we want + // to avoid infinite recursion ! + return wxNullColour; +} + +wxString wxColourDatabase::FindName(const wxColour& colour) const +{ + wxColourDatabase * const self = wxConstCast(this, wxColourDatabase); + self->Initialize(); + + typedef wxStringToColourHashMap::iterator iterator; + + for ( iterator it = m_map->begin(), en = m_map->end(); it != en; ++it ) + { + if ( *(it->second) == colour ) + return it->first; + } + + return wxEmptyString; +} + +// ---------------------------------------------------------------------------- +// deprecated wxColourDatabase methods +// ---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_6 +wxColour *wxColourDatabase::FindColour(const wxString& name) +{ + // This function is deprecated, use Find() instead. + // Formerly this function sometimes would return a deletable pointer and + // sometimes a non-deletable one (when returning a colour from the database). + // Trying to delete the latter anyway results in problems, so probably + // nobody ever freed the pointers. Currently it always returns a new + // instance, which means there will be memory leaks. + wxLogDebug(wxT("wxColourDataBase::FindColour():") + wxT(" Please use wxColourDataBase::Find() instead")); + + // using a static variable here is not the most elegant solution but unless + // we want to make wxStringToColourHashMap public (i.e. move it to the + // header) so that we could have a member function returning + // wxStringToColourHashMap::iterator, there is really no good way to do it + // otherwise + // + // and knowing that this function is going to disappear in the next release + // anyhow I don't want to waste time on this + + static wxColour s_col; + + s_col = Find(name); + if ( !s_col.IsOk() ) + return NULL; + + return new wxColour(s_col); +} +#endif // WXWIN_COMPATIBILITY_2_6 + +// ============================================================================ +// stock objects +// ============================================================================ + +static wxStockGDI gs_wxStockGDI_instance; +wxStockGDI* wxStockGDI::ms_instance = &gs_wxStockGDI_instance; +wxObject* wxStockGDI::ms_stockObject[ITEMCOUNT]; + +wxStockGDI::wxStockGDI() +{ +} + +wxStockGDI::~wxStockGDI() +{ +} + +void wxStockGDI::DeleteAll() +{ + for (unsigned i = 0; i < ITEMCOUNT; i++) + { + wxDELETE(ms_stockObject[i]); + } +} + +const wxBrush* wxStockGDI::GetBrush(Item item) +{ + wxBrush* brush = static_cast(ms_stockObject[item]); + if (brush == NULL) + { + switch (item) + { + case BRUSH_BLACK: + brush = new wxBrush(*GetColour(COLOUR_BLACK), wxBRUSHSTYLE_SOLID); + break; + case BRUSH_BLUE: + brush = new wxBrush(*GetColour(COLOUR_BLUE), wxBRUSHSTYLE_SOLID); + break; + case BRUSH_CYAN: + brush = new wxBrush(*GetColour(COLOUR_CYAN), wxBRUSHSTYLE_SOLID); + break; + case BRUSH_GREEN: + brush = new wxBrush(*GetColour(COLOUR_GREEN), wxBRUSHSTYLE_SOLID); + break; + case BRUSH_YELLOW: + brush = new wxBrush(*GetColour(COLOUR_YELLOW), wxBRUSHSTYLE_SOLID); + break; + case BRUSH_GREY: + brush = new wxBrush(wxColour(wxT("GREY")), wxBRUSHSTYLE_SOLID); + break; + case BRUSH_LIGHTGREY: + brush = new wxBrush(*GetColour(COLOUR_LIGHTGREY), wxBRUSHSTYLE_SOLID); + break; + case BRUSH_MEDIUMGREY: + brush = new wxBrush(wxColour(wxT("MEDIUM GREY")), wxBRUSHSTYLE_SOLID); + break; + case BRUSH_RED: + brush = new wxBrush(*GetColour(COLOUR_RED), wxBRUSHSTYLE_SOLID); + break; + case BRUSH_TRANSPARENT: + brush = new wxBrush(*GetColour(COLOUR_BLACK), wxBRUSHSTYLE_TRANSPARENT); + break; + case BRUSH_WHITE: + brush = new wxBrush(*GetColour(COLOUR_WHITE), wxBRUSHSTYLE_SOLID); + break; + default: + wxFAIL; + } + ms_stockObject[item] = brush; + } + return brush; +} + +const wxColour* wxStockGDI::GetColour(Item item) +{ + wxColour* colour = static_cast(ms_stockObject[item]); + if (colour == NULL) + { + switch (item) + { + case COLOUR_BLACK: + colour = new wxColour(0, 0, 0); + break; + case COLOUR_BLUE: + colour = new wxColour(0, 0, 255); + break; + case COLOUR_CYAN: + colour = new wxColour(wxT("CYAN")); + break; + case COLOUR_GREEN: + colour = new wxColour(0, 255, 0); + break; + case COLOUR_YELLOW: + colour = new wxColour(255, 255, 0); + break; + case COLOUR_LIGHTGREY: + colour = new wxColour(wxT("LIGHT GREY")); + break; + case COLOUR_RED: + colour = new wxColour(255, 0, 0); + break; + case COLOUR_WHITE: + colour = new wxColour(255, 255, 255); + break; + default: + wxFAIL; + } + ms_stockObject[item] = colour; + } + return colour; +} + +const wxCursor* wxStockGDI::GetCursor(Item item) +{ + wxCursor* cursor = static_cast(ms_stockObject[item]); + if (cursor == NULL) + { + switch (item) + { + case CURSOR_CROSS: + cursor = new wxCursor(wxCURSOR_CROSS); + break; + case CURSOR_HOURGLASS: + cursor = new wxCursor(wxCURSOR_WAIT); + break; + case CURSOR_STANDARD: + cursor = new wxCursor(wxCURSOR_ARROW); + break; + default: + wxFAIL; + } + ms_stockObject[item] = cursor; + } + return cursor; +} + +const wxFont* wxStockGDI::GetFont(Item item) +{ + wxFont* font = static_cast(ms_stockObject[item]); + if (font == NULL) + { + switch (item) + { + case FONT_ITALIC: + font = new wxFont(GetFont(FONT_NORMAL)->GetPointSize(), wxROMAN, wxITALIC, wxNORMAL); + break; + case FONT_NORMAL: + font = new wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); + break; + case FONT_SMALL: + font = new wxFont(GetFont(FONT_NORMAL)->GetPointSize() + // Using the font 2 points smaller than the normal one + // results in font so small as to be unreadable under MSW. + // We might want to actually use -1 under the other + // platforms too but for now be conservative and keep -2 + // there for compatibility with the old behaviour as the + // small font seems to be readable enough there as it is. +#ifdef __WXMSW__ + - 1, +#else + - 2, +#endif + wxSWISS, wxNORMAL, wxNORMAL); + break; + case FONT_SWISS: + font = new wxFont(GetFont(FONT_NORMAL)->GetPointSize(), wxSWISS, wxNORMAL, wxNORMAL); + break; + default: + wxFAIL; + } + ms_stockObject[item] = font; + } + return font; +} + +const wxPen* wxStockGDI::GetPen(Item item) +{ + wxPen* pen = static_cast(ms_stockObject[item]); + if (pen == NULL) + { + switch (item) + { + case PEN_BLACK: + pen = new wxPen(*GetColour(COLOUR_BLACK), 1, wxPENSTYLE_SOLID); + break; + case PEN_BLACKDASHED: + pen = new wxPen(*GetColour(COLOUR_BLACK), 1, wxPENSTYLE_SHORT_DASH); + break; + case PEN_BLUE: + pen = new wxPen(*GetColour(COLOUR_BLUE), 1, wxPENSTYLE_SOLID); + break; + case PEN_CYAN: + pen = new wxPen(*GetColour(COLOUR_CYAN), 1, wxPENSTYLE_SOLID); + break; + case PEN_GREEN: + pen = new wxPen(*GetColour(COLOUR_GREEN), 1, wxPENSTYLE_SOLID); + break; + case PEN_YELLOW: + pen = new wxPen(*GetColour(COLOUR_YELLOW), 1, wxPENSTYLE_SOLID); + break; + case PEN_GREY: + pen = new wxPen(wxColour(wxT("GREY")), 1, wxPENSTYLE_SOLID); + break; + case PEN_LIGHTGREY: + pen = new wxPen(*GetColour(COLOUR_LIGHTGREY), 1, wxPENSTYLE_SOLID); + break; + case PEN_MEDIUMGREY: + pen = new wxPen(wxColour(wxT("MEDIUM GREY")), 1, wxPENSTYLE_SOLID); + break; + case PEN_RED: + pen = new wxPen(*GetColour(COLOUR_RED), 1, wxPENSTYLE_SOLID); + break; + case PEN_TRANSPARENT: + pen = new wxPen(*GetColour(COLOUR_BLACK), 1, wxPENSTYLE_TRANSPARENT); + break; + case PEN_WHITE: + pen = new wxPen(*GetColour(COLOUR_WHITE), 1, wxPENSTYLE_SOLID); + break; + default: + wxFAIL; + } + ms_stockObject[item] = pen; + } + return pen; +} + +void wxInitializeStockLists() +{ + wxTheColourDatabase = new wxColourDatabase; + + wxTheBrushList = new wxBrushList; + wxThePenList = new wxPenList; + wxTheFontList = new wxFontList; +} + +void wxDeleteStockLists() +{ + wxDELETE(wxTheBrushList); + wxDELETE(wxThePenList); + wxDELETE(wxTheFontList); + + // wxTheColourDatabase is cleaned up by wxAppBase::CleanUp() +} + +// ============================================================================ +// wxTheXXXList stuff (semi-obsolete) +// ============================================================================ + +wxGDIObjListBase::wxGDIObjListBase() +{ +} + +wxGDIObjListBase::~wxGDIObjListBase() +{ + for (wxList::compatibility_iterator node = list.GetFirst(); node; node = node->GetNext()) + { + delete static_cast(node->GetData()); + } +} + +wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, wxPenStyle style) +{ + for ( wxList::compatibility_iterator node = list.GetFirst(); + node; + node = node->GetNext() ) + { + wxPen * const pen = (wxPen *) node->GetData(); + if ( pen->GetWidth () == width && + pen->GetStyle () == style && + pen->GetColour() == colour ) + return pen; + } + + wxPen* pen = NULL; + wxPen penTmp(colour, width, style); + if (penTmp.IsOk()) + { + pen = new wxPen(penTmp); + list.Append(pen); + } + + return pen; +} + +wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, wxBrushStyle style) +{ + for ( wxList::compatibility_iterator node = list.GetFirst(); + node; + node = node->GetNext() ) + { + wxBrush * const brush = (wxBrush *) node->GetData (); + if ( brush->GetStyle() == style && brush->GetColour() == colour ) + return brush; + } + + wxBrush* brush = NULL; + wxBrush brushTmp(colour, style); + if (brushTmp.IsOk()) + { + brush = new wxBrush(brushTmp); + list.Append(brush); + } + + return brush; +} + +wxFont *wxFontList::FindOrCreateFont(int pointSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underline, + const wxString& facename, + wxFontEncoding encoding) +{ + // In all ports but wxOSX, the effective family of a font created using + // wxFONTFAMILY_DEFAULT is wxFONTFAMILY_SWISS so this is what we need to + // use for comparison. + // + // In wxOSX the original wxFONTFAMILY_DEFAULT seems to be kept and it uses + // a different font than wxFONTFAMILY_SWISS anyhow so we just preserve it. +#ifndef __WXOSX__ + if ( family == wxFONTFAMILY_DEFAULT ) + family = wxFONTFAMILY_SWISS; +#endif // !__WXOSX__ + + wxFont *font; + wxList::compatibility_iterator node; + for (node = list.GetFirst(); node; node = node->GetNext()) + { + font = (wxFont *)node->GetData(); + if ( + font->GetPointSize () == pointSize && + font->GetStyle () == style && + font->GetWeight () == weight && + font->GetUnderlined () == underline ) + { + bool same = font->GetFamily() == family; + + // empty facename matches anything at all: this is bad because + // depending on which fonts are already created, we might get back + // a different font if we create it with empty facename, but it is + // still better than never matching anything in the cache at all + // in this case + if ( same && !facename.empty() ) + { + const wxString& fontFace = font->GetFaceName(); + + // empty facename matches everything + same = !fontFace || fontFace == facename; + } + + if ( same && (encoding != wxFONTENCODING_DEFAULT) ) + { + // have to match the encoding too + same = font->GetEncoding() == encoding; + } + + if ( same ) + { + return font; + } + } + } + + // font not found, create the new one + font = NULL; + wxFont fontTmp(pointSize, family, style, weight, underline, facename, encoding); + if (fontTmp.IsOk()) + { + font = new wxFont(fontTmp); + list.Append(font); + } + + return font; +} + +#if WXWIN_COMPATIBILITY_2_6 +void wxBrushList::AddBrush(wxBrush*) { } +void wxBrushList::RemoveBrush(wxBrush*) { } +void wxFontList::AddFont(wxFont*) { } +void wxFontList::RemoveFont(wxFont*) { } +void wxPenList::AddPen(wxPen*) { } +void wxPenList::RemovePen(wxPen*) { } +#endif + +wxSize wxGetDisplaySize() +{ + int x, y; + wxDisplaySize(& x, & y); + return wxSize(x, y); +} + +wxRect wxGetClientDisplayRect() +{ + int x, y, width, height; + wxClientDisplayRect(&x, &y, &width, &height); // call plat-specific version + return wxRect(x, y, width, height); +} + +wxSize wxGetDisplaySizeMM() +{ + int x, y; + wxDisplaySizeMM(& x, & y); + return wxSize(x, y); +} + +wxSize wxGetDisplayPPI() +{ + const wxSize pixels = wxGetDisplaySize(); + const wxSize mm = wxGetDisplaySizeMM(); + + return wxSize((int)((pixels.x * inches2mm) / mm.x), + (int)((pixels.y * inches2mm) / mm.y)); +} + +wxResourceCache::~wxResourceCache () +{ + wxList::compatibility_iterator node = GetFirst (); + while (node) { + wxObject *item = (wxObject *)node->GetData(); + delete item; + + node = node->GetNext (); + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/geometry.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/geometry.cpp new file mode 100644 index 0000000000..3f1cd03a89 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/geometry.cpp @@ -0,0 +1,410 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/geometry.cpp +// Purpose: Common Geometry Classes +// Author: Stefan Csomor +// Modified by: +// Created: 08/05/99 +// Copyright: (c) 1999 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_GEOMETRY + +#include "wx/geometry.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif + +#include + +#include "wx/datstrm.h" + +// +// wxPoint2D +// + +// +// wxRect2D +// + +// wxDouble version + +// for the following calculations always remember +// that the right and bottom edges are not part of a rect + +bool wxRect2DDouble::Intersects( const wxRect2DDouble &rect ) const +{ + wxDouble left,right,bottom,top; + left = wxMax ( m_x , rect.m_x ); + right = wxMin ( m_x+m_width, rect.m_x + rect.m_width ); + top = wxMax ( m_y , rect.m_y ); + bottom = wxMin ( m_y+m_height, rect.m_y + rect.m_height ); + + if ( left < right && top < bottom ) + { + return true; + } + return false; +} + +void wxRect2DDouble::Intersect( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest ) +{ + wxDouble left,right,bottom,top; + left = wxMax ( src1.m_x , src2.m_x ); + right = wxMin ( src1.m_x+src1.m_width, src2.m_x + src2.m_width ); + top = wxMax ( src1.m_y , src2.m_y ); + bottom = wxMin ( src1.m_y+src1.m_height, src2.m_y + src2.m_height ); + + if ( left < right && top < bottom ) + { + dest->m_x = left; + dest->m_y = top; + dest->m_width = right - left; + dest->m_height = bottom - top; + } + else + { + dest->m_width = dest->m_height = 0; + } +} + +void wxRect2DDouble::Union( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest ) +{ + wxDouble left,right,bottom,top; + + left = wxMin ( src1.m_x , src2.m_x ); + right = wxMax ( src1.m_x+src1.m_width, src2.m_x + src2.m_width ); + top = wxMin ( src1.m_y , src2.m_y ); + bottom = wxMax ( src1.m_y+src1.m_height, src2.m_y + src2.m_height ); + + dest->m_x = left; + dest->m_y = top; + dest->m_width = right - left; + dest->m_height = bottom - top; +} + +void wxRect2DDouble::Union( const wxPoint2DDouble &pt ) +{ + wxDouble x = pt.m_x; + wxDouble y = pt.m_y; + + if ( x < m_x ) + { + SetLeft( x ); + } + else if ( x < m_x + m_width ) + { + // contained + } + else + { + SetRight( x ); + } + + if ( y < m_y ) + { + SetTop( y ); + } + else if ( y < m_y + m_height ) + { + // contained + } + else + { + SetBottom( y ); + } +} + +void wxRect2DDouble::ConstrainTo( const wxRect2DDouble &rect ) +{ + if ( GetLeft() < rect.GetLeft() ) + SetLeft( rect.GetLeft() ); + + if ( GetRight() > rect.GetRight() ) + SetRight( rect.GetRight() ); + + if ( GetBottom() > rect.GetBottom() ) + SetBottom( rect.GetBottom() ); + + if ( GetTop() < rect.GetTop() ) + SetTop( rect.GetTop() ); +} + +wxRect2DDouble& wxRect2DDouble::operator=( const wxRect2DDouble &r ) +{ + m_x = r.m_x; + m_y = r.m_y; + m_width = r.m_width; + m_height = r.m_height; + return *this; +} + +// integer version + +// for the following calculations always remember +// that the right and bottom edges are not part of a rect + +// wxPoint2D + +#if wxUSE_STREAMS +void wxPoint2DInt::WriteTo( wxDataOutputStream &stream ) const +{ + stream.Write32( m_x ); + stream.Write32( m_y ); +} + +void wxPoint2DInt::ReadFrom( wxDataInputStream &stream ) +{ + m_x = stream.Read32(); + m_y = stream.Read32(); +} +#endif // wxUSE_STREAMS + +wxDouble wxPoint2DInt::GetVectorAngle() const +{ + if ( m_x == 0 ) + { + if ( m_y >= 0 ) + return 90; + else + return 270; + } + if ( m_y == 0 ) + { + if ( m_x >= 0 ) + return 0; + else + return 180; + } + + // casts needed for MIPSpro compiler under SGI + wxDouble deg = atan2( (double)m_y , (double)m_x ) * 180 / M_PI; + if ( deg < 0 ) + { + deg += 360; + } + return deg; +} + + +void wxPoint2DInt::SetVectorAngle( wxDouble degrees ) +{ + wxDouble length = GetVectorLength(); + m_x = (int)(length * cos( degrees / 180 * M_PI )); + m_y = (int)(length * sin( degrees / 180 * M_PI )); +} + +wxDouble wxPoint2DDouble::GetVectorAngle() const +{ + if ( wxIsNullDouble(m_x) ) + { + if ( m_y >= 0 ) + return 90; + else + return 270; + } + if ( wxIsNullDouble(m_y) ) + { + if ( m_x >= 0 ) + return 0; + else + return 180; + } + wxDouble deg = atan2( m_y , m_x ) * 180 / M_PI; + if ( deg < 0 ) + { + deg += 360; + } + return deg; +} + +void wxPoint2DDouble::SetVectorAngle( wxDouble degrees ) +{ + wxDouble length = GetVectorLength(); + m_x = length * cos( degrees / 180 * M_PI ); + m_y = length * sin( degrees / 180 * M_PI ); +} + +// wxRect2D + +bool wxRect2DInt::Intersects( const wxRect2DInt &rect ) const +{ + wxInt32 left,right,bottom,top; + left = wxMax ( m_x , rect.m_x ); + right = wxMin ( m_x+m_width, rect.m_x + rect.m_width ); + top = wxMax ( m_y , rect.m_y ); + bottom = wxMin ( m_y+m_height, rect.m_y + rect.m_height ); + + if ( left < right && top < bottom ) + { + return true; + } + return false; +} + +void wxRect2DInt::Intersect( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest ) +{ + wxInt32 left,right,bottom,top; + left = wxMax ( src1.m_x , src2.m_x ); + right = wxMin ( src1.m_x+src1.m_width, src2.m_x + src2.m_width ); + top = wxMax ( src1.m_y , src2.m_y ); + bottom = wxMin ( src1.m_y+src1.m_height, src2.m_y + src2.m_height ); + + if ( left < right && top < bottom ) + { + dest->m_x = left; + dest->m_y = top; + dest->m_width = right - left; + dest->m_height = bottom - top; + } + else + { + dest->m_width = dest->m_height = 0; + } +} + +void wxRect2DInt::Union( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest ) +{ + wxInt32 left,right,bottom,top; + + left = wxMin ( src1.m_x , src2.m_x ); + right = wxMax ( src1.m_x+src1.m_width, src2.m_x + src2.m_width ); + top = wxMin ( src1.m_y , src2.m_y ); + bottom = wxMax ( src1.m_y+src1.m_height, src2.m_y + src2.m_height ); + + dest->m_x = left; + dest->m_y = top; + dest->m_width = right - left; + dest->m_height = bottom - top; +} + +void wxRect2DInt::Union( const wxPoint2DInt &pt ) +{ + wxInt32 x = pt.m_x; + wxInt32 y = pt.m_y; + + if ( x < m_x ) + { + SetLeft( x ); + } + else if ( x < m_x + m_width ) + { + // contained + } + else + { + SetRight( x ); + } + + if ( y < m_y ) + { + SetTop( y ); + } + else if ( y < m_y + m_height ) + { + // contained + } + else + { + SetBottom( y ); + } +} + +void wxRect2DInt::ConstrainTo( const wxRect2DInt &rect ) +{ + if ( GetLeft() < rect.GetLeft() ) + SetLeft( rect.GetLeft() ); + + if ( GetRight() > rect.GetRight() ) + SetRight( rect.GetRight() ); + + if ( GetBottom() > rect.GetBottom() ) + SetBottom( rect.GetBottom() ); + + if ( GetTop() < rect.GetTop() ) + SetTop( rect.GetTop() ); +} + +wxRect2DInt& wxRect2DInt::operator=( const wxRect2DInt &r ) +{ + m_x = r.m_x; + m_y = r.m_y; + m_width = r.m_width; + m_height = r.m_height; + return *this; +} + +#if wxUSE_STREAMS +void wxRect2DInt::WriteTo( wxDataOutputStream &stream ) const +{ + stream.Write32( m_x ); + stream.Write32( m_y ); + stream.Write32( m_width ); + stream.Write32( m_height ); +} + +void wxRect2DInt::ReadFrom( wxDataInputStream &stream ) +{ + m_x = stream.Read32(); + m_y = stream.Read32(); + m_width = stream.Read32(); + m_height = stream.Read32(); +} +#endif // wxUSE_STREAMS + + +// wxTransform2D + +void wxTransform2D::Transform( wxRect2DInt* r ) const +{ + wxPoint2DInt a = r->GetLeftTop(), b = r->GetRightBottom(); + Transform( &a ); + Transform( &b ); + *r = wxRect2DInt( a, b ); +} + +wxPoint2DInt wxTransform2D::Transform( const wxPoint2DInt &pt ) const +{ + wxPoint2DInt res = pt; + Transform( &res ); + return res; +} + +wxRect2DInt wxTransform2D::Transform( const wxRect2DInt &r ) const +{ + wxRect2DInt res = r; + Transform( &res ); + return res; +} + +void wxTransform2D::InverseTransform( wxRect2DInt* r ) const +{ + wxPoint2DInt a = r->GetLeftTop(), b = r->GetRightBottom(); + InverseTransform( &a ); + InverseTransform( &b ); + *r = wxRect2DInt( a , b ); +} + +wxPoint2DInt wxTransform2D::InverseTransform( const wxPoint2DInt &pt ) const +{ + wxPoint2DInt res = pt; + InverseTransform( &res ); + return res; +} + +wxRect2DInt wxTransform2D::InverseTransform( const wxRect2DInt &r ) const +{ + wxRect2DInt res = r; + InverseTransform( &res ); + return res; +} + +#endif // wxUSE_GEOMETRY diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/gifdecod.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/gifdecod.cpp new file mode 100644 index 0000000000..b478b31622 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/gifdecod.cpp @@ -0,0 +1,967 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/gifdecod.cpp +// Purpose: wxGIFDecoder, GIF reader for wxImage and wxAnimation +// Author: Guillermo Rodriguez Garcia +// Version: 3.04 +// Copyright: (c) Guillermo Rodriguez Garcia +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS && wxUSE_GIF + +#ifndef WX_PRECOMP + #include "wx/palette.h" + #include "wx/intl.h" + #include "wx/log.h" +#endif + +#include +#include +#include "wx/gifdecod.h" +#include "wx/scopedptr.h" +#include "wx/scopeguard.h" + +enum +{ + GIF_MARKER_EXT = '!', // 0x21 + GIF_MARKER_SEP = ',', // 0x2C + GIF_MARKER_ENDOFDATA = ';', // 0x3B + + GIF_MARKER_EXT_GRAPHICS_CONTROL = 0xF9, + GIF_MARKER_EXT_COMMENT = 0xFE, + GIF_MARKER_EXT_APP = 0xFF +}; + +#define GetFrame(n) ((GIFImage*)m_frames[n]) + +//--------------------------------------------------------------------------- +// GIFImage +//--------------------------------------------------------------------------- + +// internal class for storing GIF image data +class GIFImage +{ +public: + // def ctor + GIFImage(); + + unsigned int w; // width + unsigned int h; // height + unsigned int left; // x coord (in logical screen) + unsigned int top; // y coord (in logical screen) + int transparent; // transparent color index (-1 = none) + wxAnimationDisposal disposal; // disposal method + long delay; // delay in ms (-1 = unused) + unsigned char *p; // bitmap + unsigned char *pal; // palette + unsigned int ncolours; // number of colours + wxString comment; + + wxDECLARE_NO_COPY_CLASS(GIFImage); +}; + +wxDECLARE_SCOPED_PTR(GIFImage, GIFImagePtr) +wxDEFINE_SCOPED_PTR(GIFImage, GIFImagePtr) + + +//--------------------------------------------------------------------------- +// GIFImage constructor +//--------------------------------------------------------------------------- +GIFImage::GIFImage() +{ + w = 0; + h = 0; + left = 0; + top = 0; + transparent = 0; + disposal = wxANIM_DONOTREMOVE; + delay = -1; + p = (unsigned char *) NULL; + pal = (unsigned char *) NULL; + ncolours = 0; +} + +//--------------------------------------------------------------------------- +// wxGIFDecoder constructor and destructor +//--------------------------------------------------------------------------- + +wxGIFDecoder::wxGIFDecoder() +{ +} + +wxGIFDecoder::~wxGIFDecoder() +{ + Destroy(); +} + +void wxGIFDecoder::Destroy() +{ + wxASSERT(m_nFrames==m_frames.GetCount()); + for (unsigned int i=0; ip); + free(f->pal); + delete f; + } + + m_frames.Clear(); + m_nFrames = 0; +} + + +//--------------------------------------------------------------------------- +// Convert this image to a wxImage object +//--------------------------------------------------------------------------- + +// This function was designed by Vaclav Slavik + +bool wxGIFDecoder::ConvertToImage(unsigned int frame, wxImage *image) const +{ + unsigned char *src, *dst, *pal; + unsigned long i; + int transparent; + + // just in case... + image->Destroy(); + + // create the image + wxSize sz = GetFrameSize(frame); + image->Create(sz.GetWidth(), sz.GetHeight()); + image->SetType(wxBITMAP_TYPE_GIF); + + if (!image->IsOk()) + return false; + + pal = GetPalette(frame); + src = GetData(frame); + dst = image->GetData(); + transparent = GetTransparentColourIndex(frame); + + // set transparent colour mask + if (transparent != -1) + { + for (i = 0; i < GetNcolours(frame); i++) + { + if ((pal[3 * i + 0] == 255) && + (pal[3 * i + 1] == 0) && + (pal[3 * i + 2] == 255)) + { + pal[3 * i + 2] = 254; + } + } + + pal[3 * transparent + 0] = 255, + pal[3 * transparent + 1] = 0, + pal[3 * transparent + 2] = 255; + + image->SetMaskColour(255, 0, 255); + } + else + image->SetMask(false); + +#if wxUSE_PALETTE + unsigned char r[256]; + unsigned char g[256]; + unsigned char b[256]; + + for (i = 0; i < 256; i++) + { + r[i] = pal[3*i + 0]; + g[i] = pal[3*i + 1]; + b[i] = pal[3*i + 2]; + } + + image->SetPalette(wxPalette(GetNcolours(frame), r, g, b)); +#endif // wxUSE_PALETTE + + // copy image data + unsigned long npixel = sz.GetWidth() * sz.GetHeight(); + for (i = 0; i < npixel; i++, src++) + { + *(dst++) = pal[3 * (*src) + 0]; + *(dst++) = pal[3 * (*src) + 1]; + *(dst++) = pal[3 * (*src) + 2]; + } + + wxString comment = GetFrame(frame)->comment; + if ( !comment.empty() ) + { + image->SetOption(wxIMAGE_OPTION_GIF_COMMENT, comment); + } + + return true; +} + + +//--------------------------------------------------------------------------- +// Data accessors +//--------------------------------------------------------------------------- + +// Get data for current frame + +wxSize wxGIFDecoder::GetFrameSize(unsigned int frame) const +{ + return wxSize(GetFrame(frame)->w, GetFrame(frame)->h); +} + +wxPoint wxGIFDecoder::GetFramePosition(unsigned int frame) const +{ + return wxPoint(GetFrame(frame)->left, GetFrame(frame)->top); +} + +wxAnimationDisposal wxGIFDecoder::GetDisposalMethod(unsigned int frame) const +{ + return GetFrame(frame)->disposal; +} + +long wxGIFDecoder::GetDelay(unsigned int frame) const +{ + return GetFrame(frame)->delay; +} + +wxColour wxGIFDecoder::GetTransparentColour(unsigned int frame) const +{ + unsigned char *pal = GetFrame(frame)->pal; + int n = GetFrame(frame)->transparent; + if (n == -1) + return wxNullColour; + + return wxColour(pal[n*3 + 0], + pal[n*3 + 1], + pal[n*3 + 2]); +} + +unsigned char* wxGIFDecoder::GetData(unsigned int frame) const { return (GetFrame(frame)->p); } +unsigned char* wxGIFDecoder::GetPalette(unsigned int frame) const { return (GetFrame(frame)->pal); } +unsigned int wxGIFDecoder::GetNcolours(unsigned int frame) const { return (GetFrame(frame)->ncolours); } +int wxGIFDecoder::GetTransparentColourIndex(unsigned int frame) const { return (GetFrame(frame)->transparent); } + + + +//--------------------------------------------------------------------------- +// GIF reading and decoding +//--------------------------------------------------------------------------- + +// getcode: +// Reads the next code from the file stream, with size 'bits' +// +int wxGIFDecoder::getcode(wxInputStream& stream, int bits, int ab_fin) +{ + unsigned int mask; // bit mask + unsigned int code; // code (result) + + // get remaining bits from last byte read + mask = (1 << bits) - 1; + code = (m_lastbyte >> (8 - m_restbits)) & mask; + + // keep reading new bytes while needed + while (bits > m_restbits) + { + // if no bytes left in this block, read the next block + if (m_restbyte == 0) + { + m_restbyte = stream.GetC(); + + /* Some encoders are a bit broken: instead of issuing + * an end-of-image symbol (ab_fin) they come up with + * a zero-length subblock!! We catch this here so + * that the decoder sees an ab_fin code. + */ + if (m_restbyte == 0) + { + code = ab_fin; + break; + } + + // prefetch data + stream.Read((void *) m_buffer, m_restbyte); + if (stream.LastRead() != m_restbyte) + { + code = ab_fin; + return code; + } + m_bufp = m_buffer; + } + + // read next byte and isolate the bits we need + m_lastbyte = (unsigned char) (*m_bufp++); + mask = (1 << (bits - m_restbits)) - 1; + code = code + ((m_lastbyte & mask) << m_restbits); + m_restbyte--; + + // adjust total number of bits extracted from the buffer + m_restbits = m_restbits + 8; + } + + // find number of bits remaining for next code + m_restbits = (m_restbits - bits); + + return code; +} + + +// dgif: +// GIF decoding function. The initial code size (aka root size) +// is 'bits'. Supports interlaced images (interl == 1). +// Returns wxGIF_OK (== 0) on success, or an error code if something +// fails (see header file for details) +wxGIFErrorCode +wxGIFDecoder::dgif(wxInputStream& stream, GIFImage *img, int interl, int bits) +{ + static const int allocSize = 4096 + 1; + int *ab_prefix = new int[allocSize]; // alphabet (prefixes) + if (ab_prefix == NULL) + { + return wxGIF_MEMERR; + } + + int *ab_tail = new int[allocSize]; // alphabet (tails) + if (ab_tail == NULL) + { + delete[] ab_prefix; + return wxGIF_MEMERR; + } + + int *stack = new int[allocSize]; // decompression stack + if (stack == NULL) + { + delete[] ab_prefix; + delete[] ab_tail; + return wxGIF_MEMERR; + } + + int ab_clr; // clear code + int ab_fin; // end of info code + int ab_bits; // actual symbol width, in bits + int ab_free; // first free position in alphabet + int ab_max; // last possible character in alphabet + int pass; // pass number in interlaced images + int pos; // index into decompresion stack + unsigned int x, y; // position in image buffer + + int code, readcode, lastcode, abcabca; + + // these won't change + ab_clr = (1 << bits); + ab_fin = (1 << bits) + 1; + + // these will change through the decompression process + ab_bits = bits + 1; + ab_free = (1 << bits) + 2; + ab_max = (1 << ab_bits) - 1; + lastcode = -1; + abcabca = -1; + pass = 1; + pos = x = y = 0; + + // reset decoder vars + m_restbits = 0; + m_restbyte = 0; + m_lastbyte = 0; + + do + { + // get next code + readcode = code = getcode(stream, ab_bits, ab_fin); + + // end of image? + if (code == ab_fin) break; + + // reset alphabet? + if (code == ab_clr) + { + // reset main variables + ab_bits = bits + 1; + ab_free = (1 << bits) + 2; + ab_max = (1 << ab_bits) - 1; + lastcode = -1; + abcabca = -1; + + // skip to next code + continue; + } + + // unknown code: special case (like in ABCABCA) + if (code >= ab_free) + { + code = lastcode; // take last string + stack[pos++] = abcabca; // add first character + } + + // build the string for this code in the stack + while (code > ab_clr) + { + stack[pos++] = ab_tail[code]; + code = ab_prefix[code]; + + // Don't overflow. This shouldn't happen with normal + // GIF files, the allocSize of 4096+1 is enough. This + // will only happen with badly formed GIFs. + if (pos >= allocSize) + { + delete[] ab_prefix; + delete[] ab_tail; + delete[] stack; + return wxGIF_INVFORMAT; + } + } + + if (pos >= allocSize) + { + delete[] ab_prefix; + delete[] ab_tail; + delete[] stack; + return wxGIF_INVFORMAT; + } + + stack[pos] = code; // push last code into the stack + abcabca = code; // save for special case + + // make new entry in alphabet (only if NOT just cleared) + if (lastcode != -1) + { + // Normally, after the alphabet is full and can't grow any + // further (ab_free == 4096), encoder should (must?) emit CLEAR + // to reset it. This checks whether we really got it, otherwise + // the GIF is damaged. + if (ab_free > ab_max) + { + delete[] ab_prefix; + delete[] ab_tail; + delete[] stack; + return wxGIF_INVFORMAT; + } + + // This assert seems unnecessary since the condition above + // eliminates the only case in which it went false. But I really + // don't like being forced to ask "Who in .text could have + // written there?!" And I wouldn't have been forced to ask if + // this line had already been here. + wxASSERT(ab_free < allocSize); + + ab_prefix[ab_free] = lastcode; + ab_tail[ab_free] = code; + ab_free++; + + if ((ab_free > ab_max) && (ab_bits < 12)) + { + ab_bits++; + ab_max = (1 << ab_bits) - 1; + } + } + + // dump stack data to the image buffer + while (pos >= 0) + { + (img->p)[x + (y * (img->w))] = (char) stack[pos]; + pos--; + + if (++x >= (img->w)) + { + x = 0; + + if (interl) + { + // support for interlaced images + switch (pass) + { + case 1: y += 8; break; + case 2: y += 8; break; + case 3: y += 4; break; + case 4: y += 2; break; + } + + /* loop until a valid y coordinate has been + found, Or if the maximum number of passes has + been reached, exit the loop, and stop image + decoding (At this point the image is successfully + decoded). + If we don't loop, but merely set y to some other + value, that new value might still be invalid depending + on the height of the image. This would cause out of + bounds writing. + */ + while (y >= (img->h)) + { + switch (++pass) + { + case 2: y = 4; break; + case 3: y = 2; break; + case 4: y = 1; break; + + default: + /* + It's possible we arrive here. For example this + happens when the image is interlaced, and the + height is 1. Looking at the above cases, the + lowest possible y is 1. While the only valid + one would be 0 for an image of height 1. So + 'eventually' the loop will arrive here. + This case makes sure this while loop is + exited, as well as the 2 other ones. + */ + + // Set y to a valid coordinate so the local + // while loop will be exited. (y = 0 always + // is >= img->h since if img->h == 0 the + // image is never decoded) + y = 0; + + // This will exit the other outer while loop + pos = -1; + + // This will halt image decoding. + code = ab_fin; + + break; + } + } + } + else + { + // non-interlaced + y++; +/* +Normally image decoding is finished when an End of Information code is +encountered (code == ab_fin) however some broken encoders write wrong +"block byte counts" (The first byte value after the "code size" byte), +being one value too high. It might very well be possible other variants +of this problem occur as well. The only sensible solution seems to +be to check for clipping. +Example of wrong encoding: +(1 * 1 B/W image, raster data stream follows in hex bytes) + +02 << B/W images have a code size of 2 +02 << Block byte count +44 << LZW packed +00 << Zero byte count (terminates data stream) + +Because the block byte count is 2, the zero byte count is used in the +decoding process, and decoding is continued after this byte. (While it +should signal an end of image) + +It should be: +02 +02 +44 +01 << When decoded this correctly includes the End of Information code +00 + +Or (Worse solution): +02 +01 +44 +00 +(The 44 doesn't include an End of Information code, but at least the +decoder correctly skips to 00 now after decoding, and signals this +as an End of Information itself) +*/ + if (y >= img->h) + { + code = ab_fin; + break; + } + } + } + } + + pos = 0; + lastcode = readcode; + } + while (code != ab_fin); + + delete [] ab_prefix ; + delete [] ab_tail ; + delete [] stack ; + + return wxGIF_OK; +} + + +// CanRead: +// Returns true if the file looks like a valid GIF, false otherwise. +// +bool wxGIFDecoder::DoCanRead(wxInputStream &stream) const +{ + unsigned char buf[3]; + + if ( !stream.Read(buf, WXSIZEOF(buf)) ) + return false; + + return memcmp(buf, "GIF", WXSIZEOF(buf)) == 0; +} + + +// LoadGIF: +// Reads and decodes one or more GIF images, depending on whether +// animated GIF support is enabled. Can read GIFs with any bit +// size (color depth), but the output images are always expanded +// to 8 bits per pixel. Also, the image palettes always contain +// 256 colors, although some of them may be unused. Returns wxGIF_OK +// (== 0) on success, or an error code if something fails (see +// header file for details) +// +wxGIFErrorCode wxGIFDecoder::LoadGIF(wxInputStream& stream) +{ + unsigned int global_ncolors = 0; + int bits, interl, i; + wxAnimationDisposal disposal; + long size; + long delay; + unsigned char type = 0; + unsigned char pal[768]; + unsigned char buf[16]; + bool anim = true; + + // check GIF signature + if (!CanRead(stream)) + return wxGIF_INVFORMAT; + + // check for animated GIF support (ver. >= 89a) + + static const unsigned int headerSize = (3 + 3); + stream.Read(buf, headerSize); + if (stream.LastRead() != headerSize) + { + return wxGIF_INVFORMAT; + } + + if (memcmp(buf + 3, "89a", 3) < 0) + { + anim = false; + } + + // read logical screen descriptor block (LSDB) + static const unsigned int lsdbSize = (2 + 2 + 1 + 1 + 1); + stream.Read(buf, lsdbSize); + if (stream.LastRead() != lsdbSize) + { + return wxGIF_INVFORMAT; + } + + m_szAnimation.SetWidth( buf[0] + 256 * buf[1] ); + m_szAnimation.SetHeight( buf[2] + 256 * buf[3] ); + + if (anim && ((m_szAnimation.GetWidth() == 0) || (m_szAnimation.GetHeight() == 0))) + { + return wxGIF_INVFORMAT; + } + + // load global color map if available + if ((buf[4] & 0x80) == 0x80) + { + int backgroundColIndex = buf[5]; + + global_ncolors = 2 << (buf[4] & 0x07); + unsigned int numBytes = 3 * global_ncolors; + stream.Read(pal, numBytes); + if (stream.LastRead() != numBytes) + { + return wxGIF_INVFORMAT; + } + + m_background.Set(pal[backgroundColIndex*3 + 0], + pal[backgroundColIndex*3 + 1], + pal[backgroundColIndex*3 + 2]); + } + + // transparent colour, disposal method and delay default to unused + int transparent = -1; + disposal = wxANIM_UNSPECIFIED; + delay = -1; + wxString comment; + + bool done = false; + while (!done) + { + type = stream.GetC(); + + /* + If the end of file has been reached (or an error) and a ";" + (GIF_MARKER_ENDOFDATA) hasn't been encountered yet, exit the loop. (Without this + check the while loop would loop endlessly.) Later on, in the next while + loop, the file will be treated as being truncated (But still + be decoded as far as possible). returning wxGIF_TRUNCATED is not + possible here since some init code is done after this loop. + */ + if (stream.Eof())// || !stream.IsOk()) + { + /* + type is set to some bogus value, so there's no + need to continue evaluating it. + */ + break; // Alternative : "return wxGIF_INVFORMAT;" + } + + switch (type) + { + case GIF_MARKER_ENDOFDATA: + done = true; + break; + case GIF_MARKER_EXT: + switch (stream.GetC()) + { + case GIF_MARKER_EXT_GRAPHICS_CONTROL: + { + // graphics control extension, parse it + + static const unsigned int gceSize = 6; + stream.Read(buf, gceSize); + if (stream.LastRead() != gceSize) + { + Destroy(); + return wxGIF_INVFORMAT; + } + + // read delay and convert from 1/100 of a second to ms + delay = 10 * (buf[2] + 256 * buf[3]); + + // read transparent colour index, if used + transparent = buf[1] & 0x01 ? buf[4] : -1; + + // read disposal method + disposal = (wxAnimationDisposal)(((buf[1] & 0x1C) >> 2) - 1); + break; + } + case GIF_MARKER_EXT_COMMENT: + { + int len = stream.GetC(); + while (len) + { + if ( stream.Eof() ) + { + done = true; + break; + } + + wxCharBuffer charbuf(len); + stream.Read(charbuf.data(), len); + if ( (int) stream.LastRead() != len ) + { + done = true; + break; + } + + comment += wxConvertMB2WX(charbuf.data()); + + len = stream.GetC(); + } + + break; + } + default: + // other extension, skip + while ((i = stream.GetC()) != 0) + { + if (stream.Eof() || (stream.LastRead() == 0) || + stream.SeekI(i, wxFromCurrent) == wxInvalidOffset) + { + done = true; + break; + } + } + break; + } + break; + case GIF_MARKER_SEP: + { + // allocate memory for IMAGEN struct + GIFImagePtr pimg(new GIFImage()); + + wxScopeGuard guardDestroy = wxMakeObjGuard(*this, &wxGIFDecoder::Destroy); + + if ( !pimg.get() ) + return wxGIF_MEMERR; + + // fill in the data + static const unsigned int idbSize = (2 + 2 + 2 + 2 + 1); + stream.Read(buf, idbSize); + if (stream.LastRead() != idbSize) + return wxGIF_INVFORMAT; + + pimg->comment = comment; + comment.clear(); + pimg->left = buf[0] + 256 * buf[1]; + pimg->top = buf[2] + 256 * buf[3]; + /* + pimg->left = buf[4] + 256 * buf[5]; + pimg->top = buf[4] + 256 * buf[5]; + */ + pimg->w = buf[4] + 256 * buf[5]; + pimg->h = buf[6] + 256 * buf[7]; + + if ( anim ) + { + // some GIF images specify incorrect animation size but we can + // still open them if we fix up the animation size, see #9465 + if ( m_nFrames == 0 ) + { + if ( pimg->w > (unsigned)m_szAnimation.x ) + m_szAnimation.x = pimg->w; + if ( pimg->h > (unsigned)m_szAnimation.y ) + m_szAnimation.y = pimg->h; + } + else // subsequent frames + { + // check that we have valid size + if ( (!pimg->w || pimg->w > (unsigned)m_szAnimation.x) || + (!pimg->h || pimg->h > (unsigned)m_szAnimation.y) ) + { + wxLogError(_("Incorrect GIF frame size (%u, %d) for " + "the frame #%u"), + pimg->w, pimg->h, m_nFrames); + return wxGIF_INVFORMAT; + } + } + } + + interl = ((buf[8] & 0x40)? 1 : 0); + size = pimg->w * pimg->h; + + pimg->transparent = transparent; + pimg->disposal = disposal; + pimg->delay = delay; + + // allocate memory for image and palette + pimg->p = (unsigned char *) malloc((unsigned int)size); + pimg->pal = (unsigned char *) malloc(768); + + if ((!pimg->p) || (!pimg->pal)) + return wxGIF_MEMERR; + + // load local color map if available, else use global map + if ((buf[8] & 0x80) == 0x80) + { + unsigned int local_ncolors = 2 << (buf[8] & 0x07); + unsigned int numBytes = 3 * local_ncolors; + stream.Read(pimg->pal, numBytes); + pimg->ncolours = local_ncolors; + if (stream.LastRead() != numBytes) + return wxGIF_INVFORMAT; + } + else + { + memcpy(pimg->pal, pal, 768); + pimg->ncolours = global_ncolors; + } + + // get initial code size from first byte in raster data + bits = stream.GetC(); + if (bits == 0) + return wxGIF_INVFORMAT; + + // decode image + wxGIFErrorCode result = dgif(stream, pimg.get(), interl, bits); + if (result != wxGIF_OK) + return result; + + guardDestroy.Dismiss(); + + // add the image to our frame array + m_frames.Add(pimg.release()); + m_nFrames++; + + // if this is not an animated GIF, exit after first image + if (!anim) + done = true; + break; + } + } + } + + if (m_nFrames <= 0) + { + Destroy(); + return wxGIF_INVFORMAT; + } + + // try to read to the end of the stream + while (type != GIF_MARKER_ENDOFDATA) + { + if (!stream.IsOk()) + return wxGIF_TRUNCATED; + + type = stream.GetC(); + + switch (type) + { + case GIF_MARKER_EXT: + // extension type + (void) stream.GetC(); + + // skip all data + while ((i = stream.GetC()) != 0) + { + if (stream.Eof() || (stream.LastRead() == 0) || + stream.SeekI(i, wxFromCurrent) == wxInvalidOffset) + { + Destroy(); + return wxGIF_INVFORMAT; + } + } + break; + case GIF_MARKER_SEP: + { + // image descriptor block + static const unsigned int idbSize = (2 + 2 + 2 + 2 + 1); + stream.Read(buf, idbSize); + if (stream.LastRead() != idbSize) + { + Destroy(); + return wxGIF_INVFORMAT; + } + + // local color map + if ((buf[8] & 0x80) == 0x80) + { + unsigned int local_ncolors = 2 << (buf[8] & 0x07); + wxFileOffset numBytes = 3 * local_ncolors; + if (stream.SeekI(numBytes, wxFromCurrent) == wxInvalidOffset) + { + Destroy(); + return wxGIF_INVFORMAT; + } + } + + // initial code size + (void) stream.GetC(); + if (stream.Eof() || (stream.LastRead() == 0)) + { + Destroy(); + return wxGIF_INVFORMAT; + } + + // skip all data + while ((i = stream.GetC()) != 0) + { + if (stream.Eof() || (stream.LastRead() == 0) || + stream.SeekI(i, wxFromCurrent) == wxInvalidOffset) + { + Destroy(); + return wxGIF_INVFORMAT; + } + } + break; + } + default: + if ((type != GIF_MARKER_ENDOFDATA) && (type != 00)) // testing + { + // images are OK, but couldn't read to the end of the stream + return wxGIF_TRUNCATED; + } + break; + } + } + + return wxGIF_OK; +} + +#endif // wxUSE_STREAMS && wxUSE_GIF diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/glcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/glcmn.cpp new file mode 100644 index 0000000000..ff9372bd50 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/glcmn.cpp @@ -0,0 +1,378 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/glcmn.cpp +// Purpose: wxGLCanvasBase implementation +// Author: Vadim Zeitlin +// Created: 2007-04-09 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_GLCANVAS + +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif // WX_PRECOMP + +#include "wx/glcanvas.h" + +// DLL options compatibility check: +#include "wx/build.h" +WX_CHECK_BUILD_OPTIONS("wxGL") + +IMPLEMENT_CLASS(wxGLApp, wxApp) + +// ============================================================================ +// implementation +// ============================================================================ + +wxGLCanvasBase::wxGLCanvasBase() +{ +#if WXWIN_COMPATIBILITY_2_8 + m_glContext = NULL; +#endif + + // we always paint background entirely ourselves so prevent wx from erasing + // it to avoid flicker + SetBackgroundStyle(wxBG_STYLE_CUSTOM); +} + +bool wxGLCanvasBase::SetCurrent(const wxGLContext& context) const +{ + // although on MSW it works even if the window is still hidden, it doesn't + // work in other ports (notably X11-based ones) and documentation mentions + // that SetCurrent() can only be called for a shown window, so check for it + wxASSERT_MSG( IsShown(), wxT("can't make hidden GL canvas current") ); + + + return context.SetCurrent(*static_cast(this)); +} + +bool wxGLCanvasBase::SetColour(const wxString& colour) +{ + wxColour col = wxTheColourDatabase->Find(colour); + if ( !col.IsOk() ) + return false; + +#ifdef wxHAS_OPENGL_ES + wxGLAPI::glColor3f((GLfloat) (col.Red() / 256.), (GLfloat) (col.Green() / 256.), + (GLfloat) (col.Blue() / 256.)); +#else + GLboolean isRGBA; + glGetBooleanv(GL_RGBA_MODE, &isRGBA); + if ( isRGBA ) + { + glColor3f((GLfloat) (col.Red() / 256.), (GLfloat) (col.Green() / 256.), + (GLfloat) (col.Blue() / 256.)); + } + else // indexed colour + { + GLint pix = GetColourIndex(col); + if ( pix == -1 ) + { + wxLogError(_("Failed to allocate colour for OpenGL")); + return false; + } + + glIndexi(pix); + } +#endif + return true; +} + +wxGLCanvasBase::~wxGLCanvasBase() +{ +#if WXWIN_COMPATIBILITY_2_8 + delete m_glContext; +#endif // WXWIN_COMPATIBILITY_2_8 +} + +#if WXWIN_COMPATIBILITY_2_8 + +wxGLContext *wxGLCanvasBase::GetContext() const +{ + return m_glContext; +} + +void wxGLCanvasBase::SetCurrent() +{ + if ( m_glContext ) + SetCurrent(*m_glContext); +} + +void wxGLCanvasBase::OnSize(wxSizeEvent& WXUNUSED(event)) +{ +} + +#endif // WXWIN_COMPATIBILITY_2_8 + +/* static */ +bool wxGLCanvasBase::IsExtensionInList(const char *list, const char *extension) +{ + if ( !list ) + return false; + + for ( const char *p = list; *p; p++ ) + { + // advance up to the next possible match + p = wxStrstr(p, extension); + if ( !p ) + break; + + // check that the extension appears at the beginning/ending of the list + // or is preceded/followed by a space to avoid mistakenly finding + // "glExtension" in a list containing some "glFunkyglExtension" + if ( (p == list || p[-1] == ' ') ) + { + char c = p[strlen(extension)]; + if ( c == '\0' || c == ' ' ) + return true; + } + } + + return false; +} + +// ============================================================================ +// compatibility layer for OpenGL 3 and OpenGL ES +// ============================================================================ + +static wxGLAPI s_glAPI; + +#if wxUSE_OPENGL_EMULATION + +#include "wx/vector.h" + +static GLenum s_mode; + +static GLfloat s_currentTexCoord[2]; +static GLfloat s_currentColor[4]; +static GLfloat s_currentNormal[3]; + +// TODO move this into a different construct with locality for all attributes +// of a vertex + +static wxVector s_texCoords; +static wxVector s_vertices; +static wxVector s_normals; +static wxVector s_colors; + +static bool s_texCoordsUsed; +static bool s_colorsUsed; +static bool s_normalsUsed; + +bool SetState( int flag, bool desired ) +{ + bool former = glIsEnabled( flag ); + if ( former != desired ) + { + if ( desired ) + glEnableClientState(flag); + else + glDisableClientState(flag); + } + return former; +} + +void RestoreState( int flag, bool desired ) +{ + if ( desired ) + glEnableClientState(flag); + else + glDisableClientState(flag); +} +#endif + +wxGLAPI::wxGLAPI() +{ +#if wxUSE_OPENGL_EMULATION + s_mode = 0xFF; +#endif +} + +wxGLAPI::~wxGLAPI() +{ +} + +void wxGLAPI::glFrustum(GLfloat left, GLfloat right, GLfloat bottom, + GLfloat top, GLfloat zNear, GLfloat zFar) +{ +#if wxUSE_OPENGL_EMULATION + ::glFrustumf(left, right, bottom, top, zNear, zFar); +#else + ::glFrustum(left, right, bottom, top, zNear, zFar); +#endif +} + +void wxGLAPI::glBegin(GLenum mode) +{ +#if wxUSE_OPENGL_EMULATION + if ( s_mode != 0xFF ) + { + wxFAIL_MSG("nested glBegin"); + } + + s_mode = mode; + s_texCoordsUsed = false; + s_colorsUsed = false; + s_normalsUsed = false; + + s_texCoords.clear(); + s_normals.clear(); + s_colors.clear(); + s_vertices.clear(); +#else + ::glBegin(mode); +#endif +} + +void wxGLAPI::glTexCoord2f(GLfloat s, GLfloat t) +{ +#if wxUSE_OPENGL_EMULATION + if ( s_mode == 0xFF ) + { + wxFAIL_MSG("glTexCoord2f called outside glBegin/glEnd"); + } + + else + { + s_texCoordsUsed = true; + s_currentTexCoord[0] = s; + s_currentTexCoord[1] = t; + } +#else + ::glTexCoord2f(s,t); +#endif +} + +void wxGLAPI::glVertex3f(GLfloat x, GLfloat y, GLfloat z) +{ +#if wxUSE_OPENGL_EMULATION + if ( s_mode == 0xFF ) + { + wxFAIL_MSG("glVertex3f called outside glBegin/glEnd"); + } + else + { + s_texCoords.push_back(s_currentTexCoord[0]); + s_texCoords.push_back(s_currentTexCoord[1]); + + s_normals.push_back(s_currentNormal[0]); + s_normals.push_back(s_currentNormal[1]); + s_normals.push_back(s_currentNormal[2]); + + s_colors.push_back(s_currentColor[0]); + s_colors.push_back(s_currentColor[1]); + s_colors.push_back(s_currentColor[2]); + s_colors.push_back(s_currentColor[3]); + + s_vertices.push_back(x); + s_vertices.push_back(y); + s_vertices.push_back(z); + } +#else + ::glVertex3f(x,y,z); +#endif +} + +void wxGLAPI::glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) +{ +#if wxUSE_OPENGL_EMULATION + if ( s_mode == 0xFF ) + ::glNormal3f(nx,ny,nz); + else + { + s_normalsUsed = true; + s_currentNormal[0] = nx; + s_currentNormal[1] = ny; + s_currentNormal[2] = nz; + } +#else + ::glNormal3f(nx,ny,nz); +#endif +} + +void wxGLAPI::glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) +{ +#if wxUSE_OPENGL_EMULATION + if ( s_mode == 0xFF ) + ::glColor4f(r,g,b,a); + else + { + s_colorsUsed = true; + s_currentColor[0] = r; + s_currentColor[1] = g; + s_currentColor[2] = b; + s_currentColor[3] = a; + } +#else + ::glColor4f(r,g,b,a); +#endif +} + +void wxGLAPI::glColor3f(GLfloat r, GLfloat g, GLfloat b) +{ +#if wxUSE_OPENGL_EMULATION + glColor4f(r,g,b,1.0); +#else + ::glColor3f(r,g,b); +#endif +} + +void wxGLAPI::glEnd() +{ +#if wxUSE_OPENGL_EMULATION + bool formerColors = SetState( GL_COLOR_ARRAY, s_colorsUsed ); + bool formerNormals = SetState( GL_NORMAL_ARRAY, s_normalsUsed ); + bool formerTexCoords = SetState( GL_TEXTURE_COORD_ARRAY, s_texCoordsUsed ); + bool formerVertex = glIsEnabled(GL_VERTEX_ARRAY); + + if( !formerVertex ) + glEnableClientState(GL_VERTEX_ARRAY); + + if ( s_colorsUsed ) + glColorPointer( 4, GL_FLOAT, 0, &s_colors[0] ); + + if ( s_normalsUsed ) + glNormalPointer( GL_FLOAT, 0, &s_normals[0] ); + + if ( s_texCoordsUsed ) + glTexCoordPointer( 2, GL_FLOAT, 0, &s_texCoords[0] ); + + glVertexPointer(3, GL_FLOAT, 0, &s_vertices[0]); + glDrawArrays( s_mode, 0, s_vertices.size() / 3 ); + + if ( s_colorsUsed != formerColors ) + RestoreState( GL_COLOR_ARRAY, formerColors ); + + if ( s_normalsUsed != formerNormals ) + RestoreState( GL_NORMAL_ARRAY, formerColors ); + + if ( s_texCoordsUsed != formerTexCoords ) + RestoreState( GL_TEXTURE_COORD_ARRAY, formerColors ); + + if( !formerVertex ) + glDisableClientState(GL_VERTEX_ARRAY); + + s_mode = 0xFF; +#else + ::glEnd(); +#endif +} + +#endif // wxUSE_GLCANVAS + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/graphcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/graphcmn.cpp new file mode 100644 index 0000000000..8d314fb2fb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/graphcmn.cpp @@ -0,0 +1,935 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/graphcmn.cpp +// Purpose: graphics context methods common to all platforms +// Author: Stefan Csomor +// Modified by: +// Created: +// Copyright: (c) Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#if wxUSE_GRAPHICS_CONTEXT + +#include "wx/graphics.h" + +#ifndef WX_PRECOMP + #include "wx/icon.h" + #include "wx/bitmap.h" + #include "wx/dcmemory.h" + #include "wx/region.h" + #include "wx/log.h" +#endif + +#include "wx/private/graphics.h" + +//----------------------------------------------------------------------------- +// Local functions +//----------------------------------------------------------------------------- + +static inline double DegToRad(double deg) +{ + return (deg * M_PI) / 180.0; +} + +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// wxGraphicsObject +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGraphicsObject, wxObject) + +wxGraphicsObjectRefData::wxGraphicsObjectRefData( wxGraphicsRenderer* renderer ) +{ + m_renderer = renderer; +} +wxGraphicsObjectRefData::wxGraphicsObjectRefData( const wxGraphicsObjectRefData* data ) +{ + m_renderer = data->m_renderer; +} +wxGraphicsRenderer* wxGraphicsObjectRefData::GetRenderer() const +{ + return m_renderer ; +} + +wxGraphicsObjectRefData* wxGraphicsObjectRefData::Clone() const +{ + return new wxGraphicsObjectRefData(this); +} + +wxGraphicsObject::wxGraphicsObject() +{ +} + +wxGraphicsObject::wxGraphicsObject( wxGraphicsRenderer* renderer ) +{ + SetRefData( new wxGraphicsObjectRefData(renderer)); +} + +wxGraphicsObject::~wxGraphicsObject() +{ +} + +bool wxGraphicsObject::IsNull() const +{ + return m_refData == NULL; +} + +wxGraphicsRenderer* wxGraphicsObject::GetRenderer() const +{ + return ( IsNull() ? NULL : GetGraphicsData()->GetRenderer() ); +} + +wxGraphicsObjectRefData* wxGraphicsObject::GetGraphicsData() const +{ + return (wxGraphicsObjectRefData*) m_refData; +} + +wxObjectRefData* wxGraphicsObject::CreateRefData() const +{ + wxLogDebug(wxT("A Null Object cannot be changed")); + return NULL; +} + +wxObjectRefData* wxGraphicsObject::CloneRefData(const wxObjectRefData* data) const +{ + const wxGraphicsObjectRefData* ptr = (const wxGraphicsObjectRefData*) data; + return ptr->Clone(); +} + +//----------------------------------------------------------------------------- +// pens etc. +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGraphicsPen, wxGraphicsObject) +IMPLEMENT_DYNAMIC_CLASS(wxGraphicsBrush, wxGraphicsObject) +IMPLEMENT_DYNAMIC_CLASS(wxGraphicsFont, wxGraphicsObject) +IMPLEMENT_DYNAMIC_CLASS(wxGraphicsBitmap, wxGraphicsObject) + +WXDLLIMPEXP_DATA_CORE(wxGraphicsPen) wxNullGraphicsPen; +WXDLLIMPEXP_DATA_CORE(wxGraphicsBrush) wxNullGraphicsBrush; +WXDLLIMPEXP_DATA_CORE(wxGraphicsFont) wxNullGraphicsFont; +WXDLLIMPEXP_DATA_CORE(wxGraphicsBitmap) wxNullGraphicsBitmap; + +//----------------------------------------------------------------------------- +// matrix +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGraphicsMatrix, wxGraphicsObject) +WXDLLIMPEXP_DATA_CORE(wxGraphicsMatrix) wxNullGraphicsMatrix; + +// concatenates the matrix +void wxGraphicsMatrix::Concat( const wxGraphicsMatrix *t ) +{ + AllocExclusive(); + GetMatrixData()->Concat(t->GetMatrixData()); +} + +// sets the matrix to the respective values +void wxGraphicsMatrix::Set(wxDouble a, wxDouble b, wxDouble c, wxDouble d, + wxDouble tx, wxDouble ty) +{ + AllocExclusive(); + GetMatrixData()->Set(a,b,c,d,tx,ty); +} + +// gets the component valuess of the matrix +void wxGraphicsMatrix::Get(wxDouble* a, wxDouble* b, wxDouble* c, + wxDouble* d, wxDouble* tx, wxDouble* ty) const +{ + GetMatrixData()->Get(a, b, c, d, tx, ty); +} + +// makes this the inverse matrix +void wxGraphicsMatrix::Invert() +{ + AllocExclusive(); + GetMatrixData()->Invert(); +} + +// returns true if the elements of the transformation matrix are equal ? +bool wxGraphicsMatrix::IsEqual( const wxGraphicsMatrix* t) const +{ + return GetMatrixData()->IsEqual(t->GetMatrixData()); +} + +// return true if this is the identity matrix +bool wxGraphicsMatrix::IsIdentity() const +{ + return GetMatrixData()->IsIdentity(); +} + +// add the translation to this matrix +void wxGraphicsMatrix::Translate( wxDouble dx , wxDouble dy ) +{ + AllocExclusive(); + GetMatrixData()->Translate(dx,dy); +} + +// add the scale to this matrix +void wxGraphicsMatrix::Scale( wxDouble xScale , wxDouble yScale ) +{ + AllocExclusive(); + GetMatrixData()->Scale(xScale,yScale); +} + +// add the rotation to this matrix (radians) +void wxGraphicsMatrix::Rotate( wxDouble angle ) +{ + AllocExclusive(); + GetMatrixData()->Rotate(angle); +} + +// +// apply the transforms +// + +// applies that matrix to the point +void wxGraphicsMatrix::TransformPoint( wxDouble *x, wxDouble *y ) const +{ + GetMatrixData()->TransformPoint(x,y); +} + +// applies the matrix except for translations +void wxGraphicsMatrix::TransformDistance( wxDouble *dx, wxDouble *dy ) const +{ + GetMatrixData()->TransformDistance(dx,dy); +} + +// returns the native representation +void * wxGraphicsMatrix::GetNativeMatrix() const +{ + return GetMatrixData()->GetNativeMatrix(); +} + +//----------------------------------------------------------------------------- +// path +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGraphicsPath, wxGraphicsObject) +WXDLLIMPEXP_DATA_CORE(wxGraphicsPath) wxNullGraphicsPath; + +// convenience functions, for using wxPoint2DDouble etc + +wxPoint2DDouble wxGraphicsPath::GetCurrentPoint() const +{ + wxDouble x,y; + GetCurrentPoint(&x,&y); + return wxPoint2DDouble(x,y); +} + +void wxGraphicsPath::MoveToPoint( const wxPoint2DDouble& p) +{ + MoveToPoint( p.m_x , p.m_y); +} + +void wxGraphicsPath::AddLineToPoint( const wxPoint2DDouble& p) +{ + AddLineToPoint( p.m_x , p.m_y); +} + +void wxGraphicsPath::AddCurveToPoint( const wxPoint2DDouble& c1, const wxPoint2DDouble& c2, const wxPoint2DDouble& e) +{ + AddCurveToPoint(c1.m_x, c1.m_y, c2.m_x, c2.m_y, e.m_x, e.m_y); +} + +void wxGraphicsPath::AddArc( const wxPoint2DDouble& c, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise) +{ + AddArc(c.m_x, c.m_y, r, startAngle, endAngle, clockwise); +} + +wxRect2DDouble wxGraphicsPath::GetBox() const +{ + wxDouble x,y,w,h; + GetBox(&x,&y,&w,&h); + return wxRect2DDouble( x,y,w,h ); +} + +bool wxGraphicsPath::Contains( const wxPoint2DDouble& c, wxPolygonFillMode fillStyle ) const +{ + return Contains( c.m_x, c.m_y, fillStyle); +} + +// true redirections + +// begins a new subpath at (x,y) +void wxGraphicsPath::MoveToPoint( wxDouble x, wxDouble y ) +{ + AllocExclusive(); + GetPathData()->MoveToPoint(x,y); +} + +// adds a straight line from the current point to (x,y) +void wxGraphicsPath::AddLineToPoint( wxDouble x, wxDouble y ) +{ + AllocExclusive(); + GetPathData()->AddLineToPoint(x,y); +} + +// adds a cubic Bezier curve from the current point, using two control points and an end point +void wxGraphicsPath::AddCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y ) +{ + AllocExclusive(); + GetPathData()->AddCurveToPoint(cx1,cy1,cx2,cy2,x,y); +} + +// adds another path +void wxGraphicsPath::AddPath( const wxGraphicsPath& path ) +{ + AllocExclusive(); + GetPathData()->AddPath(path.GetPathData()); +} + +// closes the current sub-path +void wxGraphicsPath::CloseSubpath() +{ + AllocExclusive(); + GetPathData()->CloseSubpath(); +} + +// gets the last point of the current path, (0,0) if not yet set +void wxGraphicsPath::GetCurrentPoint( wxDouble* x, wxDouble* y) const +{ + GetPathData()->GetCurrentPoint(x,y); +} + +// adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle +void wxGraphicsPath::AddArc( wxDouble x, wxDouble y, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise ) +{ + AllocExclusive(); + GetPathData()->AddArc(x,y,r,startAngle,endAngle,clockwise); +} + +// +// These are convenience functions which - if not available natively will be assembled +// using the primitives from above +// + +// adds a quadratic Bezier curve from the current point, using a control point and an end point +void wxGraphicsPath::AddQuadCurveToPoint( wxDouble cx, wxDouble cy, wxDouble x, wxDouble y ) +{ + AllocExclusive(); + GetPathData()->AddQuadCurveToPoint(cx,cy,x,y); +} + +// appends a rectangle as a new closed subpath +void wxGraphicsPath::AddRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +{ + AllocExclusive(); + GetPathData()->AddRectangle(x,y,w,h); +} + +// appends an ellipsis as a new closed subpath fitting the passed rectangle +void wxGraphicsPath::AddCircle( wxDouble x, wxDouble y, wxDouble r ) +{ + AllocExclusive(); + GetPathData()->AddCircle(x,y,r); +} + +// appends a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1) +void wxGraphicsPath::AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r ) +{ + GetPathData()->AddArcToPoint(x1,y1,x2,y2,r); +} + +// appends an ellipse +void wxGraphicsPath::AddEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h) +{ + AllocExclusive(); + GetPathData()->AddEllipse(x,y,w,h); +} + +// appends a rounded rectangle +void wxGraphicsPath::AddRoundedRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h, wxDouble radius) +{ + AllocExclusive(); + GetPathData()->AddRoundedRectangle(x,y,w,h,radius); +} + +// returns the native path +void * wxGraphicsPath::GetNativePath() const +{ + return GetPathData()->GetNativePath(); +} + +// give the native path returned by GetNativePath() back (there might be some deallocations necessary) +void wxGraphicsPath::UnGetNativePath(void *p)const +{ + GetPathData()->UnGetNativePath(p); +} + +// transforms each point of this path by the matrix +void wxGraphicsPath::Transform( const wxGraphicsMatrix& matrix ) +{ + AllocExclusive(); + GetPathData()->Transform(matrix.GetMatrixData()); +} + +// gets the bounding box enclosing all points (possibly including control points) +void wxGraphicsPath::GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h) const +{ + GetPathData()->GetBox(x,y,w,h); +} + +bool wxGraphicsPath::Contains( wxDouble x, wxDouble y, wxPolygonFillMode fillStyle ) const +{ + return GetPathData()->Contains(x,y,fillStyle); +} + +// +// Emulations, these mus be implemented in the ...Data classes in order to allow for proper overrides +// + +void wxGraphicsPathData::AddQuadCurveToPoint( wxDouble cx, wxDouble cy, wxDouble x, wxDouble y ) +{ + // calculate using degree elevation to a cubic bezier + wxPoint2DDouble c1; + wxPoint2DDouble c2; + + wxPoint2DDouble start; + GetCurrentPoint(&start.m_x,&start.m_y); + wxPoint2DDouble end(x,y); + wxPoint2DDouble c(cx,cy); + c1 = wxDouble(1/3.0) * start + wxDouble(2/3.0) * c; + c2 = wxDouble(2/3.0) * c + wxDouble(1/3.0) * end; + AddCurveToPoint(c1.m_x,c1.m_y,c2.m_x,c2.m_y,x,y); +} + +void wxGraphicsPathData::AddRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +{ + MoveToPoint(x,y); + AddLineToPoint(x,y+h); + AddLineToPoint(x+w,y+h); + AddLineToPoint(x+w,y); + CloseSubpath(); +} + +void wxGraphicsPathData::AddCircle( wxDouble x, wxDouble y, wxDouble r ) +{ + MoveToPoint(x+r,y); + AddArc( x,y,r,0,2*M_PI,false); + CloseSubpath(); +} + +void wxGraphicsPathData::AddEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h) +{ + if (w <= 0. || h <= 0.) + return; + + wxDouble rw = w/2; + wxDouble rh = h/2; + wxDouble xc = x + rw; + wxDouble yc = y + rh; + wxGraphicsMatrix m = GetRenderer()->CreateMatrix(); + m.Translate(xc,yc); + m.Scale(rw/rh,1.0); + wxGraphicsPath p = GetRenderer()->CreatePath(); + p.AddCircle(0,0,rh); + p.Transform(m); + AddPath(p.GetPathData()); +} + +void wxGraphicsPathData::AddRoundedRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h, wxDouble radius) +{ + if ( radius == 0 ) + AddRectangle(x,y,w,h); + else + { + MoveToPoint( x + w, y + h / 2); + AddArcToPoint(x + w, y + h, x + w / 2, y + h, radius); + AddArcToPoint(x, y + h, x, y + h / 2, radius); + AddArcToPoint(x, y , x + w / 2, y, radius); + AddArcToPoint(x + w, y, x + w, y + h / 2, radius); + CloseSubpath(); + } +} + +// draws a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1) +void wxGraphicsPathData::AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r ) +{ + wxPoint2DDouble current; + GetCurrentPoint(¤t.m_x,¤t.m_y); + wxPoint2DDouble p1(x1,y1); + wxPoint2DDouble p2(x2,y2); + + wxPoint2DDouble v1 = current - p1; + v1.Normalize(); + wxPoint2DDouble v2 = p2 - p1; + v2.Normalize(); + + wxDouble alpha = v1.GetVectorAngle() - v2.GetVectorAngle(); + + if ( alpha < 0 ) + alpha = 360 + alpha; + // TODO obtuse angles + + alpha = DegToRad(alpha); + + wxDouble dist = r / sin(alpha/2) * cos(alpha/2); + // calculate tangential points + wxPoint2DDouble t1 = dist*v1 + p1; + + wxPoint2DDouble nv1 = v1; + nv1.SetVectorAngle(v1.GetVectorAngle()-90); + wxPoint2DDouble c = t1 + r*nv1; + + wxDouble a1 = v1.GetVectorAngle()+90; + wxDouble a2 = v2.GetVectorAngle()-90; + + AddLineToPoint(t1.m_x,t1.m_y); + AddArc(c.m_x,c.m_y,r,DegToRad(a1),DegToRad(a2),true); + AddLineToPoint(p2.m_x,p2.m_y); +} + +//----------------------------------------------------------------------------- +// wxGraphicsGradientStops +//----------------------------------------------------------------------------- + +void wxGraphicsGradientStops::Add(const wxGraphicsGradientStop& stop) +{ + for ( wxVector::iterator it = m_stops.begin(); + it != m_stops.end(); + ++it ) + { + if ( stop.GetPosition() < it->GetPosition() ) + { + if ( it != m_stops.begin() ) + { + m_stops.insert(it, stop); + } + else // we shouldn't be inserting it at the beginning + { + wxFAIL_MSG( "invalid gradient stop position < 0" ); + } + + return; + } + } + + if ( stop.GetPosition() == 1. ) + { + m_stops.insert(m_stops.end() - 1, stop); + } + else + { + wxFAIL_MSG( "invalid gradient stop position > 1" ); + } +} + +void * wxGraphicsBitmap::GetNativeBitmap() const +{ + return GetBitmapData()->GetNativeBitmap(); +} + +//----------------------------------------------------------------------------- +// wxGraphicsContext Convenience Methods +//----------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxGraphicsContext, wxObject) + + +wxGraphicsContext::wxGraphicsContext(wxGraphicsRenderer* renderer) : + wxGraphicsObject(renderer), + m_antialias(wxANTIALIAS_DEFAULT), + m_composition(wxCOMPOSITION_OVER), + m_interpolation(wxINTERPOLATION_DEFAULT), + m_enableOffset(false) +{ +} + +wxGraphicsContext::~wxGraphicsContext() +{ +} + +bool wxGraphicsContext::StartDoc(const wxString& WXUNUSED(message)) +{ + return true; +} + +void wxGraphicsContext::EndDoc() +{ +} + +void wxGraphicsContext::StartPage(wxDouble WXUNUSED(width), + wxDouble WXUNUSED(height)) +{ +} + +void wxGraphicsContext::EndPage() +{ +} + +void wxGraphicsContext::Flush() +{ +} + +void wxGraphicsContext::EnableOffset(bool enable) +{ + m_enableOffset = enable; +} + +#if 0 +void wxGraphicsContext::SetAlpha( wxDouble WXUNUSED(alpha) ) +{ +} + +wxDouble wxGraphicsContext::GetAlpha() const +{ + return 1.0; +} +#endif + +void wxGraphicsContext::GetDPI( wxDouble* dpiX, wxDouble* dpiY) +{ + *dpiX = 72.0; + *dpiY = 72.0; +} + +// sets the pen +void wxGraphicsContext::SetPen( const wxGraphicsPen& pen ) +{ + m_pen = pen; +} + +void wxGraphicsContext::SetPen( const wxPen& pen ) +{ + if ( !pen.IsOk() || pen.GetStyle() == wxPENSTYLE_TRANSPARENT ) + SetPen( wxNullGraphicsPen ); + else + SetPen( CreatePen( pen ) ); +} + +// sets the brush for filling +void wxGraphicsContext::SetBrush( const wxGraphicsBrush& brush ) +{ + m_brush = brush; +} + +void wxGraphicsContext::SetBrush( const wxBrush& brush ) +{ + if ( !brush.IsOk() || brush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT ) + SetBrush( wxNullGraphicsBrush ); + else + SetBrush( CreateBrush( brush ) ); +} + +// sets the brush for filling +void wxGraphicsContext::SetFont( const wxGraphicsFont& font ) +{ + m_font = font; +} + +void wxGraphicsContext::SetFont( const wxFont& font, const wxColour& colour ) +{ + if ( font.IsOk() ) + SetFont( CreateFont( font, colour ) ); + else + SetFont( wxNullGraphicsFont ); +} + +void wxGraphicsContext::DrawPath( const wxGraphicsPath& path, wxPolygonFillMode fillStyle ) +{ + FillPath( path , fillStyle ); + StrokePath( path ); +} + +void +wxGraphicsContext::DoDrawRotatedText(const wxString &str, + wxDouble x, + wxDouble y, + wxDouble angle) +{ + Translate(x,y); + Rotate( -angle ); + DrawText( str , 0, 0 ); + Rotate( angle ); + Translate(-x,-y); +} + +void +wxGraphicsContext::DoDrawFilledText(const wxString &str, + wxDouble x, + wxDouble y, + const wxGraphicsBrush& backgroundBrush) +{ + wxGraphicsBrush formerBrush = m_brush; + wxGraphicsPen formerPen = m_pen; + wxDouble width; + wxDouble height; + wxDouble descent; + wxDouble externalLeading; + GetTextExtent( str , &width, &height, &descent, &externalLeading ); + SetBrush( backgroundBrush ); + // to make sure our 'OffsetToPixelBoundaries' doesn't move the fill shape + SetPen( wxNullGraphicsPen ); + + DrawRectangle(x , y, width, height); + + DrawText( str, x ,y); + SetBrush( formerBrush ); + SetPen( formerPen ); +} + +void +wxGraphicsContext::DoDrawRotatedFilledText(const wxString &str, + wxDouble x, wxDouble y, + wxDouble angle, + const wxGraphicsBrush& backgroundBrush) +{ + wxGraphicsBrush formerBrush = m_brush; + wxGraphicsPen formerPen = m_pen; + + wxDouble width; + wxDouble height; + wxDouble descent; + wxDouble externalLeading; + GetTextExtent( str , &width, &height, &descent, &externalLeading ); + SetBrush( backgroundBrush ); + // to make sure our 'OffsetToPixelBoundaries' doesn't move the fill shape + SetPen( wxNullGraphicsPen ); + + wxGraphicsPath path = CreatePath(); + path.MoveToPoint( x , y ); + path.AddLineToPoint( (int) (x + sin(angle) * height) , (int) (y + cos(angle) * height) ); + path.AddLineToPoint( + (int) (x + sin(angle) * height + cos(angle) * width) , + (int) (y + cos(angle) * height - sin(angle) * width)); + path.AddLineToPoint((int) (x + cos(angle) * width) , (int) (y - sin(angle) * width) ); + FillPath( path ); + DrawText( str, x ,y, angle); + SetBrush( formerBrush ); + SetPen( formerPen ); +} + +void wxGraphicsContext::StrokeLine( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2) +{ + wxGraphicsPath path = CreatePath(); + path.MoveToPoint(x1, y1); + path.AddLineToPoint( x2, y2 ); + StrokePath( path ); +} + +void wxGraphicsContext::DrawRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h) +{ + wxGraphicsPath path = CreatePath(); + path.AddRectangle( x , y , w , h ); + DrawPath( path ); +} + +void wxGraphicsContext::DrawEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h) +{ + wxGraphicsPath path = CreatePath(); + path.AddEllipse(x,y,w,h); + DrawPath(path); +} + +void wxGraphicsContext::DrawRoundedRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h, wxDouble radius) +{ + wxGraphicsPath path = CreatePath(); + path.AddRoundedRectangle(x,y,w,h,radius); + DrawPath(path); +} + +void wxGraphicsContext::StrokeLines( size_t n, const wxPoint2DDouble *points) +{ + wxASSERT(n > 1); + wxGraphicsPath path = CreatePath(); + path.MoveToPoint(points[0].m_x, points[0].m_y); + for ( size_t i = 1; i < n; ++i) + path.AddLineToPoint( points[i].m_x, points[i].m_y ); + StrokePath( path ); +} + +void wxGraphicsContext::DrawLines( size_t n, const wxPoint2DDouble *points, wxPolygonFillMode fillStyle) +{ + wxASSERT(n > 1); + wxGraphicsPath path = CreatePath(); + path.MoveToPoint(points[0].m_x, points[0].m_y); + for ( size_t i = 1; i < n; ++i) + path.AddLineToPoint( points[i].m_x, points[i].m_y ); + DrawPath( path , fillStyle); +} + +void wxGraphicsContext::StrokeLines( size_t n, const wxPoint2DDouble *beginPoints, const wxPoint2DDouble *endPoints) +{ + wxASSERT(n > 0); + wxGraphicsPath path = CreatePath(); + for ( size_t i = 0; i < n; ++i) + { + path.MoveToPoint(beginPoints[i].m_x, beginPoints[i].m_y); + path.AddLineToPoint( endPoints[i].m_x, endPoints[i].m_y ); + } + StrokePath( path ); +} + +// create a 'native' matrix corresponding to these values +wxGraphicsMatrix wxGraphicsContext::CreateMatrix( wxDouble a, wxDouble b, wxDouble c, wxDouble d, + wxDouble tx, wxDouble ty) const +{ + return GetRenderer()->CreateMatrix(a,b,c,d,tx,ty); +} + +wxGraphicsPath wxGraphicsContext::CreatePath() const +{ + return GetRenderer()->CreatePath(); +} + +wxGraphicsPen wxGraphicsContext::CreatePen(const wxPen& pen) const +{ + return GetRenderer()->CreatePen(pen); +} + +wxGraphicsBrush wxGraphicsContext::CreateBrush(const wxBrush& brush ) const +{ + return GetRenderer()->CreateBrush(brush); +} + +wxGraphicsBrush +wxGraphicsContext::CreateLinearGradientBrush( + wxDouble x1, wxDouble y1, + wxDouble x2, wxDouble y2, + const wxColour& c1, const wxColour& c2) const +{ + return GetRenderer()->CreateLinearGradientBrush + ( + x1, y1, + x2, y2, + wxGraphicsGradientStops(c1,c2) + ); +} + +wxGraphicsBrush +wxGraphicsContext::CreateLinearGradientBrush( + wxDouble x1, wxDouble y1, + wxDouble x2, wxDouble y2, + const wxGraphicsGradientStops& gradientStops) const +{ + return GetRenderer()->CreateLinearGradientBrush(x1,y1,x2,y2, gradientStops); +} + +wxGraphicsBrush +wxGraphicsContext::CreateRadialGradientBrush( + wxDouble xo, wxDouble yo, + wxDouble xc, wxDouble yc, wxDouble radius, + const wxColour &oColor, const wxColour &cColor) const +{ + return GetRenderer()->CreateRadialGradientBrush + ( + xo, yo, + xc, yc, radius, + wxGraphicsGradientStops(oColor, cColor) + ); +} + +wxGraphicsBrush +wxGraphicsContext::CreateRadialGradientBrush( + wxDouble xo, wxDouble yo, + wxDouble xc, wxDouble yc, wxDouble radius, + const wxGraphicsGradientStops& gradientStops) const +{ + return GetRenderer()->CreateRadialGradientBrush + ( + xo, yo, + xc, yc, radius, + gradientStops + ); +} + +wxGraphicsFont wxGraphicsContext::CreateFont( const wxFont &font , const wxColour &col ) const +{ + return GetRenderer()->CreateFont(font,col); +} + +wxGraphicsFont +wxGraphicsContext::CreateFont(double size, + const wxString& facename, + int flags, + const wxColour& col) const +{ + return GetRenderer()->CreateFont(size, facename, flags, col); +} + +wxGraphicsBitmap wxGraphicsContext::CreateBitmap( const wxBitmap& bmp ) const +{ + return GetRenderer()->CreateBitmap(bmp); +} + +#if wxUSE_IMAGE +wxGraphicsBitmap wxGraphicsContext::CreateBitmapFromImage(const wxImage& image) const +{ + return GetRenderer()->CreateBitmapFromImage(image); +} +#endif // wxUSE_IMAGE + +wxGraphicsBitmap wxGraphicsContext::CreateSubBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) const +{ + return GetRenderer()->CreateSubBitmap(bmp,x,y,w,h); +} + +/* static */ wxGraphicsContext* wxGraphicsContext::Create( const wxWindowDC& dc) +{ + return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc); +} + +/* static */ wxGraphicsContext* wxGraphicsContext::Create( const wxMemoryDC& dc) +{ + return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc); +} + +#if wxUSE_PRINTING_ARCHITECTURE +/* static */ wxGraphicsContext* wxGraphicsContext::Create( const wxPrinterDC& dc) +{ + return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc); +} +#endif + +#ifdef __WXMSW__ +#if wxUSE_ENH_METAFILE +/* static */ wxGraphicsContext* wxGraphicsContext::Create( const wxEnhMetaFileDC& dc) +{ + return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc); +} +#endif +#endif + +wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context ) +{ + return wxGraphicsRenderer::GetDefaultRenderer()->CreateContextFromNativeContext(context); +} + +wxGraphicsContext* wxGraphicsContext::CreateFromNativeWindow( void * window ) +{ + return wxGraphicsRenderer::GetDefaultRenderer()->CreateContextFromNativeWindow(window); +} + +wxGraphicsContext* wxGraphicsContext::Create( wxWindow* window ) +{ + return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(window); +} + +#if wxUSE_IMAGE +/* static */ wxGraphicsContext* wxGraphicsContext::Create(wxImage& image) +{ + return wxGraphicsRenderer::GetDefaultRenderer()->CreateContextFromImage(image); +} +#endif // wxUSE_IMAGE + +wxGraphicsContext* wxGraphicsContext::Create() +{ + return wxGraphicsRenderer::GetDefaultRenderer()->CreateMeasuringContext(); +} + +//----------------------------------------------------------------------------- +// wxGraphicsRenderer +//----------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxGraphicsRenderer, wxObject) + +#endif // wxUSE_GRAPHICS_CONTEXT diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/gridcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/gridcmn.cpp new file mode 100644 index 0000000000..0b88fd8ca2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/gridcmn.cpp @@ -0,0 +1,88 @@ +/////////////////////////////////////////////////////////////////////////// +// Name: src/common/gridcmn.cpp +// Purpose: wxGrid common code +// Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) +// Modified by: Robin Dunn, Vadim Zeitlin, Santiago Palacios +// Created: 1/08/1999 +// Copyright: (c) Michael Bedward (mbedward@ozemail.com.au) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_GRID + +#include "wx/grid.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/log.h" + #include "wx/textctrl.h" + #include "wx/checkbox.h" + #include "wx/combobox.h" + #include "wx/valtext.h" + #include "wx/intl.h" + #include "wx/math.h" + #include "wx/listbox.h" +#endif + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxGridStyle ) +wxBEGIN_FLAGS( wxGridStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) +wxEND_FLAGS( wxGridStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxGrid, wxScrolledWindow, "wx/grid.h") + +wxBEGIN_PROPERTIES_TABLE(wxGrid) + wxHIDE_PROPERTY( Children ) + wxPROPERTY_FLAGS( WindowStyle, wxGridStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxGrid) + +wxCONSTRUCTOR_5( wxGrid, wxWindow*, Parent, wxWindowID, Id, wxPoint, Position, \ + wxSize, Size, long, WindowStyle ) + +/* + TODO : Expose more information of a list's layout, etc. via appropriate objects (e.g., NotebookPageInfo) +*/ + +#endif // wxUSE_GRID diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/hash.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/hash.cpp new file mode 100644 index 0000000000..74389735c9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/hash.cpp @@ -0,0 +1,382 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/hash.cpp +// Purpose: wxHashTable implementation +// Author: Julian Smart +// Modified by: VZ at 25.02.00: type safe hashes with WX_DECLARE_HASH() +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/hash.h" + #include "wx/object.h" +#endif + +wxHashTableBase_Node::wxHashTableBase_Node( long key, void* value, + wxHashTableBase* table ) + : m_value( value ), m_hashPtr( table ) +{ + m_key.integer = key; +} + +wxHashTableBase_Node::wxHashTableBase_Node( const wxString& key, void* value, + wxHashTableBase* table ) + : m_value( value ), m_hashPtr( table ) +{ + m_key.string = new wxString(key); +} + +wxHashTableBase_Node::~wxHashTableBase_Node() +{ + if( m_hashPtr ) m_hashPtr->DoRemoveNode( this ); +} + +// + +wxHashTableBase::wxHashTableBase() + : m_size( 0 ), m_count( 0 ), m_table( NULL ), m_keyType( wxKEY_NONE ), + m_deleteContents( false ) +{ +} + +void wxHashTableBase::Create( wxKeyType keyType, size_t size ) +{ + m_keyType = keyType; + m_size = size; + m_table = new wxHashTableBase_Node*[ m_size ]; + + for( size_t i = 0; i < m_size; ++i ) + m_table[i] = NULL; +} + +void wxHashTableBase::Clear() +{ + for( size_t i = 0; i < m_size; ++i ) + { + Node* end = m_table[i]; + + if( end == NULL ) + continue; + + Node *curr, *next = end->GetNext(); + + do + { + curr = next; + next = curr->GetNext(); + + DoDestroyNode( curr ); + + delete curr; + } + while( curr != end ); + + m_table[i] = NULL; + } + + m_count = 0; +} + +void wxHashTableBase::DoRemoveNode( wxHashTableBase_Node* node ) +{ + size_t bucket = ( m_keyType == wxKEY_INTEGER ? + node->m_key.integer : + MakeKey( *node->m_key.string ) ) % m_size; + + if( node->GetNext() == node ) + { + // single-node chain (common case) + m_table[bucket] = NULL; + } + else + { + Node *start = m_table[bucket], *curr; + Node* prev = start; + + for( curr = prev->GetNext(); curr != node; + prev = curr, curr = curr->GetNext() ) ; + + DoUnlinkNode( bucket, node, prev ); + } + + DoDestroyNode( node ); +} + +void wxHashTableBase::DoDestroyNode( wxHashTableBase_Node* node ) +{ + // if it is called from DoRemoveNode, node has already been + // removed, from other places it does not matter + node->m_hashPtr = NULL; + + if( m_keyType == wxKEY_STRING ) + delete node->m_key.string; + if( m_deleteContents ) + DoDeleteContents( node ); +} + +void wxHashTableBase::Destroy() +{ + Clear(); + + wxDELETEA(m_table); + m_size = 0; +} + +void wxHashTableBase::DoInsertNode( size_t bucket, wxHashTableBase_Node* node ) +{ + if( m_table[bucket] == NULL ) + { + m_table[bucket] = node->m_next = node; + } + else + { + Node *prev = m_table[bucket]; + Node *next = prev->m_next; + + prev->m_next = node; + node->m_next = next; + m_table[bucket] = node; + } + + ++m_count; +} + +void wxHashTableBase::DoPut( long key, long hash, void* data ) +{ + wxASSERT( m_keyType == wxKEY_INTEGER ); + + size_t bucket = size_t(hash) % m_size; + Node* node = new wxHashTableBase_Node( key, data, this ); + + DoInsertNode( bucket, node ); +} + +void wxHashTableBase::DoPut( const wxString& key, long hash, void* data ) +{ + wxASSERT( m_keyType == wxKEY_STRING ); + + size_t bucket = size_t(hash) % m_size; + Node* node = new wxHashTableBase_Node( key, data, this ); + + DoInsertNode( bucket, node ); +} + +void* wxHashTableBase::DoGet( long key, long hash ) const +{ + wxASSERT( m_keyType == wxKEY_INTEGER ); + + size_t bucket = size_t(hash) % m_size; + + if( m_table[bucket] == NULL ) + return NULL; + + Node *first = m_table[bucket]->GetNext(), + *curr = first; + + do + { + if( curr->m_key.integer == key ) + return curr->m_value; + + curr = curr->GetNext(); + } + while( curr != first ); + + return NULL; +} + +void* wxHashTableBase::DoGet( const wxString& key, long hash ) const +{ + wxASSERT( m_keyType == wxKEY_STRING ); + + size_t bucket = size_t(hash) % m_size; + + if( m_table[bucket] == NULL ) + return NULL; + + Node *first = m_table[bucket]->GetNext(), + *curr = first; + + do + { + if( *curr->m_key.string == key ) + return curr->m_value; + + curr = curr->GetNext(); + } + while( curr != first ); + + return NULL; +} + +void wxHashTableBase::DoUnlinkNode( size_t bucket, wxHashTableBase_Node* node, + wxHashTableBase_Node* prev ) +{ + if( node == m_table[bucket] ) + m_table[bucket] = prev; + + if( prev == node && prev == node->GetNext() ) + m_table[bucket] = NULL; + else + prev->m_next = node->m_next; + + DoDestroyNode( node ); + --m_count; +} + +void* wxHashTableBase::DoDelete( long key, long hash ) +{ + wxASSERT( m_keyType == wxKEY_INTEGER ); + + size_t bucket = size_t(hash) % m_size; + + if( m_table[bucket] == NULL ) + return NULL; + + Node *first = m_table[bucket]->GetNext(), + *curr = first, + *prev = m_table[bucket]; + + do + { + if( curr->m_key.integer == key ) + { + void* retval = curr->m_value; + curr->m_value = NULL; + + DoUnlinkNode( bucket, curr, prev ); + delete curr; + + return retval; + } + + prev = curr; + curr = curr->GetNext(); + } + while( curr != first ); + + return NULL; +} + +void* wxHashTableBase::DoDelete( const wxString& key, long hash ) +{ + wxASSERT( m_keyType == wxKEY_STRING ); + + size_t bucket = size_t(hash) % m_size; + + if( m_table[bucket] == NULL ) + return NULL; + + Node *first = m_table[bucket]->GetNext(), + *curr = first, + *prev = m_table[bucket]; + + do + { + if( *curr->m_key.string == key ) + { + void* retval = curr->m_value; + curr->m_value = NULL; + + DoUnlinkNode( bucket, curr, prev ); + delete curr; + + return retval; + } + + prev = curr; + curr = curr->GetNext(); + } + while( curr != first ); + + return NULL; +} + +long wxHashTableBase::MakeKey( const wxString& str ) +{ + long int_key = 0; + + const wxStringCharType *p = str.wx_str(); + while( *p ) + int_key += *p++; + + return int_key; +} + +// ---------------------------------------------------------------------------- +// wxHashTable +// ---------------------------------------------------------------------------- + +wxHashTable::wxHashTable( const wxHashTable& table ) + : wxHashTableBase() +{ + DoCopy( table ); +} + +const wxHashTable& wxHashTable::operator=( const wxHashTable& table ) +{ + Destroy(); + DoCopy( table ); + + return *this; +} + +void wxHashTable::DoCopy( const wxHashTable& WXUNUSED(table) ) +{ + Create( m_keyType, m_size ); + + wxFAIL; +} + +void wxHashTable::DoDeleteContents( wxHashTableBase_Node* node ) +{ + delete ((wxHashTable_Node*)node)->GetData(); +} + +void wxHashTable::GetNextNode( size_t bucketStart ) +{ + for( size_t i = bucketStart; i < m_size; ++i ) + { + if( m_table[i] != NULL ) + { + m_curr = ((Node*)m_table[i])->GetNext(); + m_currBucket = i; + return; + } + } + + m_curr = NULL; + m_currBucket = 0; +} + +wxHashTable::Node* wxHashTable::Next() +{ + if( m_curr == NULL ) + GetNextNode( 0 ); + else + { + m_curr = m_curr->GetNext(); + + if( m_curr == ( (Node*)m_table[m_currBucket] )->GetNext() ) + GetNextNode( m_currBucket + 1 ); + } + + return m_curr; +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/hashmap.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/hashmap.cpp new file mode 100644 index 0000000000..a9c10e34f2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/hashmap.cpp @@ -0,0 +1,141 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/hashmap.cpp +// Purpose: wxHashMap implementation +// Author: Mattia Barbon +// Modified by: +// Created: 29/01/2002 +// Copyright: (c) Mattia Barbon +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/hashmap.h" + +/* FYI: This is the "One-at-a-Time" algorithm by Bob Jenkins */ +/* from requirements by Colin Plumb. */ +/* (http://burtleburtle.net/bob/hash/doobs.html) */ +/* adapted from Perl sources ( hv.h ) */ +template +static unsigned long DoStringHash(T *k) +{ + unsigned long hash = 0; + + while( *k ) + { + hash += *k++; + hash += (hash << 10); + hash ^= (hash >> 6); + } + hash += (hash << 3); + hash ^= (hash >> 11); + + return hash + (hash << 15); +} + +unsigned long wxStringHash::stringHash( const char* k ) + { return DoStringHash(k); } + +unsigned long wxStringHash::stringHash( const wchar_t* k ) + { return DoStringHash(k); } + + +#ifdef wxNEEDS_WX_HASH_MAP + +/* from SGI STL */ +const unsigned long _wxHashTableBase2::ms_primes[prime_count] = +{ + 7ul, 13ul, 29ul, + 53ul, 97ul, 193ul, 389ul, 769ul, + 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, + 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, + 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, + 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, + 1610612741ul, 3221225473ul, 4294967291ul +}; + +unsigned long _wxHashTableBase2::GetNextPrime( unsigned long n ) +{ + const unsigned long* ptr = &ms_primes[0]; + for( size_t i = 0; i < prime_count; ++i, ++ptr ) + { + if( n < *ptr ) + return *ptr; + } + + /* someone might try to alloc a 2^32-element hash table */ + wxFAIL_MSG( wxT("hash table too big?") ); + + /* quiet warning */ + return 0; +} + +unsigned long _wxHashTableBase2::GetPreviousPrime( unsigned long n ) +{ + const unsigned long* ptr = &ms_primes[prime_count - 1]; + + for( size_t i = 0; i < prime_count; ++i, --ptr ) + { + if( n > *ptr ) + return *ptr; + } + + /* quiet warning */ + return 1; +} + +void _wxHashTableBase2::DeleteNodes( size_t buckets, + _wxHashTable_NodeBase** table, + NodeDtor dtor ) +{ + size_t i; + + for( i = 0; i < buckets; ++i ) + { + _wxHashTable_NodeBase* node = table[i]; + _wxHashTable_NodeBase* tmp; + + while( node ) + { + tmp = node->m_next; + dtor( node ); + node = tmp; + } + } + + memset( table, 0, buckets * sizeof(void*) ); +} + +void _wxHashTableBase2::CopyHashTable( _wxHashTable_NodeBase** srcTable, + size_t srcBuckets, + _wxHashTableBase2* dst, + _wxHashTable_NodeBase** dstTable, + BucketFromNode func, ProcessNode proc ) +{ + for( size_t i = 0; i < srcBuckets; ++i ) + { + _wxHashTable_NodeBase* nextnode; + + for( _wxHashTable_NodeBase* node = srcTable[i]; node; node = nextnode ) + { + size_t bucket = func( dst, node ); + + nextnode = node->m_next; + _wxHashTable_NodeBase* newnode = proc( node ); + newnode->m_next = dstTable[bucket]; + dstTable[bucket] = newnode; + } + } +} + +_wxHashTable_NodeBase* _wxHashTableBase2::DummyProcessNode(_wxHashTable_NodeBase* node) +{ + return node; +} + +#endif // wxNEEDS_WX_HASH_MAP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/headercolcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/headercolcmn.cpp new file mode 100644 index 0000000000..efc958498e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/headercolcmn.cpp @@ -0,0 +1,93 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/headercolcmn.cpp +// Purpose: wxHeaderColumn implementation +// Author: Vadim Zeitlin +// Created: 2008-12-02 +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_HEADERCTRL + +#include "wx/headercol.h" + +// ============================================================================ +// wxHeaderColumn implementation +// ============================================================================ + +int wxHeaderColumn::GetFromIndividualFlags() const +{ + int flags = 0; + + if ( IsResizeable() ) + flags |= wxCOL_RESIZABLE; + if ( IsSortable() ) + flags |= wxCOL_SORTABLE; + if ( IsReorderable() ) + flags |= wxCOL_REORDERABLE; + if ( IsHidden() ) + flags |= wxCOL_HIDDEN; + + return flags; +} + +// ============================================================================ +// wxSettableHeaderColumn implementation +// ============================================================================ + +void wxSettableHeaderColumn::SetIndividualFlags(int flags) +{ + SetResizeable((flags & wxCOL_RESIZABLE) != 0); + SetSortable((flags & wxCOL_SORTABLE) != 0); + SetReorderable((flags & wxCOL_REORDERABLE) != 0); + SetHidden((flags & wxCOL_HIDDEN) != 0); +} + +void wxSettableHeaderColumn::ChangeFlag(int flag, bool set) +{ + if ( HasFlag(flag) != set ) + ToggleFlag(flag); +} + +void wxSettableHeaderColumn::SetFlag(int flag) +{ + int flags = GetFlags(); + if ( !(flags & flag) ) + SetFlags(flags | flag); +} + +void wxSettableHeaderColumn::ClearFlag(int flag) +{ + int flags = GetFlags(); + if ( flags & flag ) + SetFlags(flags & ~flag); +} + +void wxSettableHeaderColumn::ToggleFlag(int flag) +{ + int flags = GetFlags(); + if ( flags & flag ) + flags &= ~flag; + else + flags |= flag; + + SetFlags(flags); +} + +#endif // wxUSE_HEADERCTRL + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/headerctrlcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/headerctrlcmn.cpp new file mode 100644 index 0000000000..2dfbcc6bc7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/headerctrlcmn.cpp @@ -0,0 +1,516 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/headerctrlcmn.cpp +// Purpose: implementation of wxHeaderCtrlBase +// Author: Vadim Zeitlin +// Created: 2008-12-02 +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_HEADERCTRL + +#ifndef WX_PRECOMP + #include "wx/menu.h" +#endif // WX_PRECOMP + +#include "wx/headerctrl.h" +#include "wx/rearrangectrl.h" +#include "wx/renderer.h" + +namespace +{ + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +const unsigned int wxNO_COLUMN = static_cast(-1); + +// ---------------------------------------------------------------------------- +// wxHeaderColumnsRearrangeDialog: dialog for customizing our columns +// ---------------------------------------------------------------------------- + +#if wxUSE_REARRANGECTRL + +class wxHeaderColumnsRearrangeDialog : public wxRearrangeDialog +{ +public: + wxHeaderColumnsRearrangeDialog(wxWindow *parent, + const wxArrayInt& order, + const wxArrayString& items) + : wxRearrangeDialog + ( + parent, + _("Please select the columns to show and define their order:"), + _("Customize Columns"), + order, + items + ) + { + } +}; + +#endif // wxUSE_REARRANGECTRL + +} // anonymous namespace + +// ============================================================================ +// wxHeaderCtrlBase implementation +// ============================================================================ + +extern WXDLLIMPEXP_DATA_CORE(const char) wxHeaderCtrlNameStr[] = "wxHeaderCtrl"; + +BEGIN_EVENT_TABLE(wxHeaderCtrlBase, wxControl) + EVT_HEADER_SEPARATOR_DCLICK(wxID_ANY, wxHeaderCtrlBase::OnSeparatorDClick) +#if wxUSE_MENUS + EVT_HEADER_RIGHT_CLICK(wxID_ANY, wxHeaderCtrlBase::OnRClick) +#endif // wxUSE_MENUS +END_EVENT_TABLE() + +void wxHeaderCtrlBase::ScrollWindow(int dx, + int WXUNUSED_UNLESS_DEBUG(dy), + const wxRect * WXUNUSED_UNLESS_DEBUG(rect)) + +{ + // this doesn't make sense at all + wxASSERT_MSG( !dy, "header window can't be scrolled vertically" ); + + // this would actually be nice to support for "frozen" headers but it isn't + // supported currently + wxASSERT_MSG( !rect, "header window can't be scrolled partially" ); + + DoScrollHorz(dx); +} + +void wxHeaderCtrlBase::SetColumnCount(unsigned int count) +{ + if ( count != GetColumnCount() ) + OnColumnCountChanging(count); + + // still call DoSetCount() even if the count didn't really change in order + // to update all the columns + DoSetCount(count); +} + +int wxHeaderCtrlBase::GetColumnTitleWidth(const wxHeaderColumn& col) +{ + int w = wxWindowBase::GetTextExtent(col.GetTitle()).x; + + // add some margin: + w += wxRendererNative::Get().GetHeaderButtonMargin(this); + + // if a bitmap is used, add space for it and 2px border: + wxBitmap bmp = col.GetBitmap(); + if ( bmp.IsOk() ) + w += bmp.GetWidth() + 2; + + return w; +} + +// ---------------------------------------------------------------------------- +// wxHeaderCtrlBase event handling +// ---------------------------------------------------------------------------- + +void wxHeaderCtrlBase::OnSeparatorDClick(wxHeaderCtrlEvent& event) +{ + const unsigned col = event.GetColumn(); + const wxHeaderColumn& column = GetColumn(col); + + if ( !column.IsResizeable() ) + { + event.Skip(); + return; + } + + int w = GetColumnTitleWidth(column); + + if ( !UpdateColumnWidthToFit(col, w) ) + event.Skip(); + else + UpdateColumn(col); +} + +#if wxUSE_MENUS + +void wxHeaderCtrlBase::OnRClick(wxHeaderCtrlEvent& event) +{ + if ( !HasFlag(wxHD_ALLOW_HIDE) ) + { + event.Skip(); + return; + } + + ShowColumnsMenu(ScreenToClient(wxGetMousePosition())); +} + +#endif // wxUSE_MENUS + +// ---------------------------------------------------------------------------- +// wxHeaderCtrlBase column reordering +// ---------------------------------------------------------------------------- + +void wxHeaderCtrlBase::SetColumnsOrder(const wxArrayInt& order) +{ + const unsigned count = GetColumnCount(); + wxCHECK_RET( order.size() == count, "wrong number of columns" ); + + // check the array validity + wxArrayInt seen(count, 0); + for ( unsigned n = 0; n < count; n++ ) + { + const unsigned idx = order[n]; + wxCHECK_RET( idx < count, "invalid column index" ); + wxCHECK_RET( !seen[idx], "duplicate column index" ); + + seen[idx] = 1; + } + + DoSetColumnsOrder(order); + + // TODO-RTL: do we need to reverse the array? +} + +void wxHeaderCtrlBase::ResetColumnsOrder() +{ + const unsigned count = GetColumnCount(); + wxArrayInt order(count); + for ( unsigned n = 0; n < count; n++ ) + order[n] = n; + + DoSetColumnsOrder(order); +} + +wxArrayInt wxHeaderCtrlBase::GetColumnsOrder() const +{ + const wxArrayInt order = DoGetColumnsOrder(); + + wxASSERT_MSG( order.size() == GetColumnCount(), "invalid order array" ); + + return order; +} + +unsigned int wxHeaderCtrlBase::GetColumnAt(unsigned int pos) const +{ + wxCHECK_MSG( pos < GetColumnCount(), wxNO_COLUMN, "invalid position" ); + + return GetColumnsOrder()[pos]; +} + +unsigned int wxHeaderCtrlBase::GetColumnPos(unsigned int idx) const +{ + const unsigned count = GetColumnCount(); + + wxCHECK_MSG( idx < count, wxNO_COLUMN, "invalid index" ); + + const wxArrayInt order = GetColumnsOrder(); + for ( unsigned n = 0; n < count; n++ ) + { + if ( (unsigned)order[n] == idx ) + return n; + } + + wxFAIL_MSG( "column unexpectedly not displayed at all" ); + + return wxNO_COLUMN; +} + +/* static */ +void wxHeaderCtrlBase::MoveColumnInOrderArray(wxArrayInt& order, + unsigned int idx, + unsigned int pos) +{ + const unsigned count = order.size(); + + wxArrayInt orderNew; + orderNew.reserve(count); + for ( unsigned n = 0; ; n++ ) + { + // NB: order of checks is important for this to work when the new + // column position is the same as the old one + + // insert the column at its new position + if ( orderNew.size() == pos ) + orderNew.push_back(idx); + + if ( n == count ) + break; + + // delete the column from its old position + const unsigned idxOld = order[n]; + if ( idxOld == idx ) + continue; + + orderNew.push_back(idxOld); + } + + order.swap(orderNew); +} + +void +wxHeaderCtrlBase::DoResizeColumnIndices(wxArrayInt& colIndices, unsigned int count) +{ + // update the column indices array if necessary + const unsigned countOld = colIndices.size(); + if ( count > countOld ) + { + // all new columns have default positions equal to their indices + for ( unsigned n = countOld; n < count; n++ ) + colIndices.push_back(n); + } + else if ( count < countOld ) + { + // filter out all the positions which are invalid now while keeping the + // order of the remaining ones + wxArrayInt colIndicesNew; + colIndicesNew.reserve(count); + for ( unsigned n = 0; n < countOld; n++ ) + { + const unsigned idx = colIndices[n]; + if ( idx < count ) + colIndicesNew.push_back(idx); + } + + colIndices.swap(colIndicesNew); + } + //else: count didn't really change, nothing to do + + wxASSERT_MSG( colIndices.size() == count, "logic error" ); +} + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl extra UI +// ---------------------------------------------------------------------------- + +#if wxUSE_MENUS + +void wxHeaderCtrlBase::AddColumnsItems(wxMenu& menu, int idColumnsBase) +{ + const unsigned count = GetColumnCount(); + for ( unsigned n = 0; n < count; n++ ) + { + const wxHeaderColumn& col = GetColumn(n); + menu.AppendCheckItem(idColumnsBase + n, col.GetTitle()); + if ( col.IsShown() ) + menu.Check(n, true); + } +} + +bool wxHeaderCtrlBase::ShowColumnsMenu(const wxPoint& pt, const wxString& title) +{ + // construct the menu with the entries for all columns + wxMenu menu; + if ( !title.empty() ) + menu.SetTitle(title); + + AddColumnsItems(menu); + + // ... and an extra one to show the customization dialog if the user is + // allowed to reorder the columns too + const unsigned count = GetColumnCount(); + if ( HasFlag(wxHD_ALLOW_REORDER) ) + { + menu.AppendSeparator(); + menu.Append(count, _("&Customize...")); + } + + // do show the menu and get the user selection + const int rc = GetPopupMenuSelectionFromUser(menu, pt); + if ( rc == wxID_NONE ) + return false; + + if ( static_cast(rc) == count ) + { + return ShowCustomizeDialog(); + } + else // a column selected from the menu + { + UpdateColumnVisibility(rc, !GetColumn(rc).IsShown()); + } + + return true; +} + +#endif // wxUSE_MENUS + +bool wxHeaderCtrlBase::ShowCustomizeDialog() +{ +#if wxUSE_REARRANGECTRL + // prepare the data for showing the dialog + wxArrayInt order = GetColumnsOrder(); + + const unsigned count = GetColumnCount(); + + // notice that titles are always in the index order, they will be shown + // rearranged according to the display order in the dialog + wxArrayString titles; + titles.reserve(count); + for ( unsigned n = 0; n < count; n++ ) + titles.push_back(GetColumn(n).GetTitle()); + + // this loop is however over positions and not indices + unsigned pos; + for ( pos = 0; pos < count; pos++ ) + { + int& idx = order[pos]; + if ( GetColumn(idx).IsHidden() ) + { + // indicate that this one is hidden + idx = ~idx; + } + } + + // do show it + wxHeaderColumnsRearrangeDialog dlg(this, order, titles); + if ( dlg.ShowModal() == wxID_OK ) + { + // and apply the changes + order = dlg.GetOrder(); + for ( pos = 0; pos < count; pos++ ) + { + int& idx = order[pos]; + const bool show = idx >= 0; + if ( !show ) + { + // make all indices positive for passing them to SetColumnsOrder() + idx = ~idx; + } + + if ( show != GetColumn(idx).IsShown() ) + UpdateColumnVisibility(idx, show); + } + + UpdateColumnsOrder(order); + SetColumnsOrder(order); + + return true; + } +#endif // wxUSE_REARRANGECTRL + + return false; +} + +// ============================================================================ +// wxHeaderCtrlSimple implementation +// ============================================================================ + +void wxHeaderCtrlSimple::Init() +{ + m_sortKey = wxNO_COLUMN; +} + +const wxHeaderColumn& wxHeaderCtrlSimple::GetColumn(unsigned int idx) const +{ + return m_cols[idx]; +} + +void wxHeaderCtrlSimple::DoInsert(const wxHeaderColumnSimple& col, unsigned int idx) +{ + m_cols.insert(m_cols.begin() + idx, col); + + UpdateColumnCount(); +} + +void wxHeaderCtrlSimple::DoDelete(unsigned int idx) +{ + m_cols.erase(m_cols.begin() + idx); + if ( idx == m_sortKey ) + m_sortKey = wxNO_COLUMN; + + UpdateColumnCount(); +} + +void wxHeaderCtrlSimple::DeleteAllColumns() +{ + m_cols.clear(); + m_sortKey = wxNO_COLUMN; + + UpdateColumnCount(); +} + + +void wxHeaderCtrlSimple::DoShowColumn(unsigned int idx, bool show) +{ + if ( show != m_cols[idx].IsShown() ) + { + m_cols[idx].SetHidden(!show); + + UpdateColumn(idx); + } +} + +void wxHeaderCtrlSimple::DoShowSortIndicator(unsigned int idx, bool ascending) +{ + RemoveSortIndicator(); + + m_cols[idx].SetSortOrder(ascending); + m_sortKey = idx; + + UpdateColumn(idx); +} + +void wxHeaderCtrlSimple::RemoveSortIndicator() +{ + if ( m_sortKey != wxNO_COLUMN ) + { + const unsigned sortOld = m_sortKey; + m_sortKey = wxNO_COLUMN; + + m_cols[sortOld].UnsetAsSortKey(); + + UpdateColumn(sortOld); + } +} + +bool +wxHeaderCtrlSimple::UpdateColumnWidthToFit(unsigned int idx, int widthTitle) +{ + const int widthContents = GetBestFittingWidth(idx); + if ( widthContents == -1 ) + return false; + + m_cols[idx].SetWidth(wxMax(widthContents, widthTitle)); + + return true; +} + +// ============================================================================ +// wxHeaderCtrlEvent implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxHeaderCtrlEvent, wxNotifyEvent) + +wxDEFINE_EVENT( wxEVT_HEADER_CLICK, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_RIGHT_CLICK, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_MIDDLE_CLICK, wxHeaderCtrlEvent); + +wxDEFINE_EVENT( wxEVT_HEADER_DCLICK, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_RIGHT_DCLICK, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_MIDDLE_DCLICK, wxHeaderCtrlEvent); + +wxDEFINE_EVENT( wxEVT_HEADER_SEPARATOR_DCLICK, wxHeaderCtrlEvent); + +wxDEFINE_EVENT( wxEVT_HEADER_BEGIN_RESIZE, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_RESIZING, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_END_RESIZE, wxHeaderCtrlEvent); + +wxDEFINE_EVENT( wxEVT_HEADER_BEGIN_REORDER, wxHeaderCtrlEvent); +wxDEFINE_EVENT( wxEVT_HEADER_END_REORDER, wxHeaderCtrlEvent); + +wxDEFINE_EVENT( wxEVT_HEADER_DRAGGING_CANCELLED, wxHeaderCtrlEvent); + +#endif // wxUSE_HEADERCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/helpbase.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/helpbase.cpp new file mode 100644 index 0000000000..91b0e674d6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/helpbase.cpp @@ -0,0 +1,27 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/helpbase.cpp +// Purpose: Help system base classes +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_HELP + +#ifndef WX_PRECOMP +#endif + +#include "wx/helpbase.h" + +IMPLEMENT_CLASS(wxHelpControllerBase, wxObject) + +#endif // wxUSE_HELP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/http.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/http.cpp new file mode 100644 index 0000000000..0ecde88c77 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/http.cpp @@ -0,0 +1,551 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/http.cpp +// Purpose: HTTP protocol +// Author: Guilhem Lavaux +// Modified by: Simo Virokannas (authentication, Dec 2005) +// Created: August 1997 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PROTOCOL_HTTP + +#include +#include + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/app.h" +#endif + +#include "wx/tokenzr.h" +#include "wx/socket.h" +#include "wx/protocol/protocol.h" +#include "wx/url.h" +#include "wx/protocol/http.h" +#include "wx/sckstrm.h" +#include "wx/thread.h" + + +// ---------------------------------------------------------------------------- +// wxHTTP +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol) +IMPLEMENT_PROTOCOL(wxHTTP, wxT("http"), wxT("80"), true) + +wxHTTP::wxHTTP() + : wxProtocol() +{ + m_addr = NULL; + m_read = false; + m_proxy_mode = false; + m_http_response = 0; + + SetNotify(wxSOCKET_LOST_FLAG); +} + +wxHTTP::~wxHTTP() +{ + ClearHeaders(); + + delete m_addr; +} + +void wxHTTP::ClearHeaders() +{ + m_headers.clear(); +} + +void wxHTTP::ClearCookies() +{ + m_cookies.clear(); +} + +wxString wxHTTP::GetContentType() const +{ + return GetHeader(wxT("Content-Type")); +} + +void wxHTTP::SetProxyMode(bool on) +{ + m_proxy_mode = on; +} + +wxHTTP::wxHeaderIterator wxHTTP::FindHeader(const wxString& header) +{ + wxHeaderIterator it = m_headers.begin(); + for ( wxHeaderIterator en = m_headers.end(); it != en; ++it ) + { + if ( header.CmpNoCase(it->first) == 0 ) + break; + } + + return it; +} + +wxHTTP::wxHeaderConstIterator wxHTTP::FindHeader(const wxString& header) const +{ + wxHeaderConstIterator it = m_headers.begin(); + for ( wxHeaderConstIterator en = m_headers.end(); it != en; ++it ) + { + if ( header.CmpNoCase(it->first) == 0 ) + break; + } + + return it; +} + +wxHTTP::wxCookieIterator wxHTTP::FindCookie(const wxString& cookie) +{ + wxCookieIterator it = m_cookies.begin(); + for ( wxCookieIterator en = m_cookies.end(); it != en; ++it ) + { + if ( cookie.CmpNoCase(it->first) == 0 ) + break; + } + + return it; +} + +wxHTTP::wxCookieConstIterator wxHTTP::FindCookie(const wxString& cookie) const +{ + wxCookieConstIterator it = m_cookies.begin(); + for ( wxCookieConstIterator en = m_cookies.end(); it != en; ++it ) + { + if ( cookie.CmpNoCase(it->first) == 0 ) + break; + } + + return it; +} + +void wxHTTP::SetHeader(const wxString& header, const wxString& h_data) +{ + if (m_read) { + ClearHeaders(); + m_read = false; + } + + wxHeaderIterator it = FindHeader(header); + if (it != m_headers.end()) + it->second = h_data; + else + m_headers[header] = h_data; +} + +wxString wxHTTP::GetHeader(const wxString& header) const +{ + wxHeaderConstIterator it = FindHeader(header); + + return it == m_headers.end() ? wxGetEmptyString() : it->second; +} + +wxString wxHTTP::GetCookie(const wxString& cookie) const +{ + wxCookieConstIterator it = FindCookie(cookie); + + return it == m_cookies.end() ? wxGetEmptyString() : it->second; +} + +wxString wxHTTP::GenerateAuthString(const wxString& user, const wxString& pass) const +{ + // TODO: Use wxBase64Encode() now that we have it instead of reproducing it + + static const char *base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + wxString buf; + wxString toencode; + + buf.Printf(wxT("Basic ")); + + toencode.Printf(wxT("%s:%s"),user.c_str(),pass.c_str()); + + size_t len = toencode.length(); + const wxChar *from = toencode.c_str(); + while (len >= 3) { // encode full blocks first + buf << wxString::Format(wxT("%c%c"), base64[(from[0] >> 2) & 0x3f], base64[((from[0] << 4) & 0x30) | ((from[1] >> 4) & 0xf)]); + buf << wxString::Format(wxT("%c%c"), base64[((from[1] << 2) & 0x3c) | ((from[2] >> 6) & 0x3)], base64[from[2] & 0x3f]); + from += 3; + len -= 3; + } + if (len > 0) { // pad the remaining characters + buf << wxString::Format(wxT("%c"), base64[(from[0] >> 2) & 0x3f]); + if (len == 1) { + buf << wxString::Format(wxT("%c="), base64[(from[0] << 4) & 0x30]); + } else { + buf << wxString::Format(wxT("%c%c"), base64[((from[0] << 4) & 0x30) | ((from[1] >> 4) & 0xf)], base64[(from[1] << 2) & 0x3c]); + } + buf << wxT("="); + } + + return buf; +} + +void wxHTTP::SetPostBuffer(const wxString& post_buf) +{ + // Use To8BitData() for backwards compatibility in this deprecated method. + // The new code should use the other overload or SetPostText() and specify + // the encoding to use for the text explicitly. + wxScopedCharBuffer scb = post_buf.To8BitData(); + if ( scb.length() ) + { + m_postBuffer.Clear(); + m_postBuffer.AppendData(scb.data(), scb.length()); + } +} + +bool +wxHTTP::SetPostBuffer(const wxString& contentType, + const wxMemoryBuffer& data) +{ + m_postBuffer = data; + m_contentType = contentType; + + return !m_postBuffer.IsEmpty(); +} + +bool +wxHTTP::SetPostText(const wxString& contentType, + const wxString& data, + const wxMBConv& conv) +{ +#if wxUSE_UNICODE + wxScopedCharBuffer scb = data.mb_str(conv); + const size_t len = scb.length(); + const char* const buf = scb.data(); +#else // !wxUSE_UNICODE + const size_t len = data.length(); + const char* const buf = data.mb_str(conv); +#endif // wxUSE_UNICODE/!wxUSE_UNICODE + + if ( !len ) + return false; + + m_postBuffer.Clear(); + m_postBuffer.AppendData(buf, len); + m_contentType = contentType; + + return true; +} + +void wxHTTP::SendHeaders() +{ + typedef wxStringToStringHashMap::iterator iterator; + wxString buf; + + for (iterator it = m_headers.begin(), en = m_headers.end(); it != en; ++it ) + { + buf.Printf(wxT("%s: %s\r\n"), it->first.c_str(), it->second.c_str()); + + const wxWX2MBbuf cbuf = buf.mb_str(); + Write(cbuf, strlen(cbuf)); + } +} + +bool wxHTTP::ParseHeaders() +{ + wxString line; + wxStringTokenizer tokenzr; + + ClearHeaders(); + ClearCookies(); + m_read = true; + + for ( ;; ) + { + m_lastError = ReadLine(this, line); + if (m_lastError != wxPROTO_NOERR) + return false; + + if ( line.empty() ) + break; + + wxString left_str = line.BeforeFirst(':'); + if(!left_str.CmpNoCase("Set-Cookie")) + { + wxString cookieName = line.AfterFirst(':').Strip(wxString::both).BeforeFirst('='); + wxString cookieValue = line.AfterFirst(':').Strip(wxString::both).AfterFirst('=').BeforeFirst(';'); + m_cookies[cookieName] = cookieValue; + + // For compatibility + m_headers[left_str] = line.AfterFirst(':').Strip(wxString::both); + } + else + { + m_headers[left_str] = line.AfterFirst(':').Strip(wxString::both); + } + } + return true; +} + +bool wxHTTP::Connect(const wxString& host, unsigned short port) +{ + wxIPV4address *addr; + + if (m_addr) { + wxDELETE(m_addr); + Close(); + } + + m_addr = addr = new wxIPV4address(); + + if (!addr->Hostname(host)) { + wxDELETE(m_addr); + m_lastError = wxPROTO_NETERR; + return false; + } + + if ( port ) + addr->Service(port); + else if (!addr->Service(wxT("http"))) + addr->Service(80); + + wxString hostHdr = host; + if ( port && port != 80 ) + hostHdr << wxT(":") << port; + SetHeader(wxT("Host"), hostHdr); + + m_lastError = wxPROTO_NOERR; + return true; +} + +bool wxHTTP::Connect(const wxSockAddress& addr, bool WXUNUSED(wait)) +{ + if (m_addr) { + delete m_addr; + Close(); + } + + m_addr = addr.Clone(); + + wxIPV4address *ipv4addr = wxDynamicCast(&addr, wxIPV4address); + if ( ipv4addr ) + { + wxString hostHdr = ipv4addr->OrigHostname(); + unsigned short port = ipv4addr->Service(); + if ( port && port != 80 ) + hostHdr << wxT(":") << port; + SetHeader(wxT("Host"), hostHdr); + } + + m_lastError = wxPROTO_NOERR; + return true; +} + +bool wxHTTP::BuildRequest(const wxString& path, const wxString& method) +{ + // Use the data in the post buffer, if any. + if ( !m_postBuffer.IsEmpty() ) + { + wxString len; + len << m_postBuffer.GetDataLen(); + + // Content length must be correct, so always set, possibly + // overriding the value set explicitly by a previous call to + // SetHeader("Content-Length"). + SetHeader(wxS("Content-Length"), len); + + // However if the user had explicitly set the content type, don't + // override it with the content type passed to SetPostText(). + if ( !m_contentType.empty() && GetContentType().empty() ) + SetHeader(wxS("Content-Type"), m_contentType); + } + + m_http_response = 0; + + // If there is no User-Agent defined, define it. + if ( GetHeader(wxT("User-Agent")).empty() ) + SetHeader(wxT("User-Agent"), wxT("wxWidgets 2.x")); + + // Send authentication information + if (!m_username.empty() || !m_password.empty()) { + SetHeader(wxT("Authorization"), GenerateAuthString(m_username, m_password)); + } + + SaveState(); + + // we may use non blocking sockets only if we can dispatch events from them + int flags = wxIsMainThread() && wxApp::IsMainLoopRunning() ? wxSOCKET_NONE + : wxSOCKET_BLOCK; + // and we must use wxSOCKET_WAITALL to ensure that all data is sent + flags |= wxSOCKET_WAITALL; + SetFlags(flags); + Notify(false); + + wxString buf; + buf.Printf(wxT("%s %s HTTP/1.0\r\n"), method, path); + const wxWX2MBbuf pathbuf = buf.mb_str(); + Write(pathbuf, strlen(pathbuf)); + SendHeaders(); + Write("\r\n", 2); + + if ( !m_postBuffer.IsEmpty() ) { + Write(m_postBuffer.GetData(), m_postBuffer.GetDataLen()); + + m_postBuffer.Clear(); + } + + wxString tmp_str; + m_lastError = ReadLine(this, tmp_str); + if (m_lastError != wxPROTO_NOERR) { + RestoreState(); + return false; + } + + if (!tmp_str.Contains(wxT("HTTP/"))) { + // TODO: support HTTP v0.9 which can have no header. + // FIXME: tmp_str is not put back in the in-queue of the socket. + m_lastError = wxPROTO_NOERR; + SetHeader(wxT("Content-Length"), wxT("-1")); + SetHeader(wxT("Content-Type"), wxT("none/none")); + RestoreState(); + return true; + } + + wxStringTokenizer token(tmp_str,wxT(' ')); + wxString tmp_str2; + bool ret_value; + + token.NextToken(); + tmp_str2 = token.NextToken(); + + m_http_response = wxAtoi(tmp_str2); + + switch ( tmp_str2[0u].GetValue() ) + { + case wxT('1'): + /* INFORMATION / SUCCESS */ + break; + + case wxT('2'): + /* SUCCESS */ + break; + + case wxT('3'): + /* REDIRECTION */ + break; + + default: + m_lastError = wxPROTO_NOFILE; + RestoreState(); + return false; + } + + m_lastError = wxPROTO_NOERR; + ret_value = ParseHeaders(); + RestoreState(); + return ret_value; +} + +bool wxHTTP::Abort(void) +{ + return wxSocketClient::Close(); +} + +// ---------------------------------------------------------------------------- +// wxHTTPStream and wxHTTP::GetInputStream +// ---------------------------------------------------------------------------- + +class wxHTTPStream : public wxSocketInputStream +{ +public: + wxHTTP *m_http; + size_t m_httpsize; + unsigned long m_read_bytes; + + wxHTTPStream(wxHTTP *http) : wxSocketInputStream(*http) + { + m_http = http; + m_httpsize = 0; + m_read_bytes = 0; + } + + size_t GetSize() const { return m_httpsize; } + virtual ~wxHTTPStream(void) { m_http->Abort(); } + +protected: + size_t OnSysRead(void *buffer, size_t bufsize); + + wxDECLARE_NO_COPY_CLASS(wxHTTPStream); +}; + +size_t wxHTTPStream::OnSysRead(void *buffer, size_t bufsize) +{ + if (m_read_bytes >= m_httpsize) + { + m_lasterror = wxSTREAM_EOF; + return 0; + } + + size_t ret = wxSocketInputStream::OnSysRead(buffer, bufsize); + m_read_bytes += ret; + + if (m_httpsize==(size_t)-1 && m_lasterror == wxSTREAM_READ_ERROR ) + { + // if m_httpsize is (size_t) -1 this means read until connection closed + // which is equivalent to getting a READ_ERROR, for clients however this + // must be translated into EOF, as it is the expected way of signalling + // end end of the content + m_lasterror = wxSTREAM_EOF; + } + + return ret; +} + +wxInputStream *wxHTTP::GetInputStream(const wxString& path) +{ + wxHTTPStream *inp_stream; + + wxString new_path; + + m_lastError = wxPROTO_CONNERR; // all following returns share this type of error + if (!m_addr) + return NULL; + + // We set m_connected back to false so wxSocketBase will know what to do. +#ifdef __WXMAC__ + wxSocketClient::Connect(*m_addr , false ); + wxSocketClient::WaitOnConnect(10); + + if (!wxSocketClient::IsConnected()) + return NULL; +#else + if (!wxProtocol::Connect(*m_addr)) + return NULL; +#endif + + // Use the user-specified method if any or determine the method to use + // automatically depending on whether we have anything to post or not. + wxString method = m_method; + if (method.empty()) + method = m_postBuffer.IsEmpty() ? wxS("GET"): wxS("POST"); + + if (!BuildRequest(path, method)) + return NULL; + + inp_stream = new wxHTTPStream(this); + + if (!GetHeader(wxT("Content-Length")).empty()) + inp_stream->m_httpsize = wxAtoi(GetHeader(wxT("Content-Length"))); + else + inp_stream->m_httpsize = (size_t)-1; + + inp_stream->m_read_bytes = 0; + + Notify(false); + SetFlags(wxSOCKET_BLOCK | wxSOCKET_WAITALL); + + // no error; reset m_lastError + m_lastError = wxPROTO_NOERR; + return inp_stream; +} + +#endif // wxUSE_PROTOCOL_HTTP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/hyperlnkcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/hyperlnkcmn.cpp new file mode 100644 index 0000000000..8cac751b03 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/hyperlnkcmn.cpp @@ -0,0 +1,141 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/hyperlnkcmn.cpp +// Purpose: Hyperlink control +// Author: David Norris , Otto Wyss +// Modified by: Ryan Norton, Francesco Montorsi +// Created: 04/02/2005 +// Copyright: (c) 2005 David Norris +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +//--------------------------------------------------------------------------- +// Pre-compiled header stuff +//--------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_HYPERLINKCTRL + +//--------------------------------------------------------------------------- +// Includes +//--------------------------------------------------------------------------- + +#include "wx/hyperlink.h" + +#ifndef WX_PRECOMP + #include "wx/menu.h" + #include "wx/log.h" + #include "wx/dataobj.h" +#endif + +// ============================================================================ +// implementation +// ============================================================================ + +wxDEFINE_FLAGS( wxHyperlinkStyle ) +wxBEGIN_FLAGS( wxHyperlinkStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxHL_CONTEXTMENU) +wxFLAGS_MEMBER(wxHL_ALIGN_LEFT) +wxFLAGS_MEMBER(wxHL_ALIGN_RIGHT) +wxFLAGS_MEMBER(wxHL_ALIGN_CENTRE) +wxEND_FLAGS( wxHyperlinkStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI( wxHyperlinkCtrl, wxControl, "wx/hyperlink.h") + +IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkEvent, wxCommandEvent) +wxDEFINE_EVENT( wxEVT_HYPERLINK, wxHyperlinkEvent ); + +wxBEGIN_PROPERTIES_TABLE(wxHyperlinkCtrl) +wxPROPERTY( Label, wxString, SetLabel, GetLabel, wxString(), \ + 0 /*flags*/, wxT("The link label"), wxT("group") ) + +wxPROPERTY( URL, wxString, SetURL, GetURL, wxString(), \ + 0 /*flags*/, wxT("The link URL"), wxT("group") ) +wxPROPERTY_FLAGS( WindowStyle, wxHyperlinkStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("The link style"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxHyperlinkCtrl) + +wxCONSTRUCTOR_7( wxHyperlinkCtrl, wxWindow*, Parent, wxWindowID, Id, wxString, \ + Label, wxString, URL, wxPoint, Position, wxSize, Size, long, WindowStyle ) + + +const char wxHyperlinkCtrlNameStr[] = "hyperlink"; + +// ---------------------------------------------------------------------------- +// wxHyperlinkCtrlBase +// ---------------------------------------------------------------------------- + +void +wxHyperlinkCtrlBase::CheckParams(const wxString& label, + const wxString& url, + long style) +{ +#if wxDEBUG_LEVEL + wxASSERT_MSG(!url.empty() || !label.empty(), + wxT("Both URL and label are empty ?")); + + int alignment = (int)((style & wxHL_ALIGN_LEFT) != 0) + + (int)((style & wxHL_ALIGN_CENTRE) != 0) + + (int)((style & wxHL_ALIGN_RIGHT) != 0); + wxASSERT_MSG(alignment == 1, + wxT("Specify exactly one align flag!")); +#else // !wxDEBUG_LEVEL + wxUnusedVar(label); + wxUnusedVar(url); + wxUnusedVar(style); +#endif // wxDEBUG_LEVEL/!wxDEBUG_LEVEL +} + +void wxHyperlinkCtrlBase::SendEvent() +{ + wxString url = GetURL(); + wxHyperlinkEvent linkEvent(this, GetId(), url); + if (!GetEventHandler()->ProcessEvent(linkEvent)) // was the event skipped ? + { + if (!wxLaunchDefaultBrowser(url)) + { + wxLogWarning(wxT("Could not launch the default browser with url '%s' !"), url.c_str()); + } + } +} + +#endif // wxUSE_HYPERLINKCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/iconbndl.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/iconbndl.cpp new file mode 100644 index 0000000000..f6e0ea5ea5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/iconbndl.cpp @@ -0,0 +1,327 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/iconbndl.cpp +// Purpose: wxIconBundle +// Author: Mattia Barbon, Vadim Zeitlin +// Created: 23.03.2002 +// Copyright: (c) Mattia barbon +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/iconbndl.h" + +#ifndef WX_PRECOMP + #include "wx/settings.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/bitmap.h" + #include "wx/image.h" + #include "wx/stream.h" +#endif + +#include "wx/wfstream.h" + +#include "wx/arrimpl.cpp" +WX_DEFINE_OBJARRAY(wxIconArray) + +IMPLEMENT_DYNAMIC_CLASS(wxIconBundle, wxGDIObject) + +#define M_ICONBUNDLEDATA static_cast(m_refData) + +// ---------------------------------------------------------------------------- +// wxIconBundleRefData +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxIconBundleRefData : public wxGDIRefData +{ +public: + wxIconBundleRefData() { } + + // We need the copy ctor for CloneGDIRefData() but notice that we use the + // base class default ctor in it and not the copy one which it doesn't have. + wxIconBundleRefData(const wxIconBundleRefData& other) + : wxGDIRefData(), + m_icons(other.m_icons) + { + } + + // default assignment operator and dtor are ok + + virtual bool IsOk() const { return !m_icons.empty(); } + + wxIconArray m_icons; +}; + +// ============================================================================ +// wxIconBundle implementation +// ============================================================================ + +wxIconBundle::wxIconBundle() +{ +} + +#if wxUSE_STREAMS && wxUSE_IMAGE + +#if wxUSE_FFILE || wxUSE_FILE +wxIconBundle::wxIconBundle(const wxString& file, wxBitmapType type) + : wxGDIObject() +{ + AddIcon(file, type); +} +#endif // wxUSE_FFILE || wxUSE_FILE + +wxIconBundle::wxIconBundle(wxInputStream& stream, wxBitmapType type) + : wxGDIObject() +{ + AddIcon(stream, type); +} +#endif // wxUSE_STREAMS && wxUSE_IMAGE + +wxIconBundle::wxIconBundle(const wxIcon& icon) + : wxGDIObject() +{ + AddIcon(icon); +} + +wxGDIRefData *wxIconBundle::CreateGDIRefData() const +{ + return new wxIconBundleRefData; +} + +wxGDIRefData *wxIconBundle::CloneGDIRefData(const wxGDIRefData *data) const +{ + return new wxIconBundleRefData(*static_cast(data)); +} + +void wxIconBundle::DeleteIcons() +{ + UnRef(); +} + +#if wxUSE_STREAMS && wxUSE_IMAGE + +namespace +{ + +// Adds icon from 'input' to the bundle. Shows 'errorMessage' on failure +// (it must contain "%d", because it is used to report # of image in the file +// that failed to load): +void DoAddIcon(wxIconBundle& bundle, + wxInputStream& input, + wxBitmapType type, + const wxString& errorMessage) +{ + wxImage image; + + const wxFileOffset posOrig = input.TellI(); + + const size_t count = wxImage::GetImageCount(input, type); + for ( size_t i = 0; i < count; ++i ) + { + if ( i ) + { + // the call to LoadFile() for the first sub-image updated the + // stream position but we need to start reading the subsequent + // sub-image at the image beginning too + input.SeekI(posOrig); + } + + if ( !image.LoadFile(input, type, i) ) + { + wxLogError(errorMessage, i); + continue; + } + + if ( type == wxBITMAP_TYPE_ANY ) + { + // store the type so that we don't need to try all handlers again + // for the subsequent images, they should all be of the same type + type = image.GetType(); + } + + wxIcon tmp; + tmp.CopyFromBitmap(wxBitmap(image)); + bundle.AddIcon(tmp); + } +} + +} // anonymous namespace + +#if wxUSE_FFILE || wxUSE_FILE + +void wxIconBundle::AddIcon(const wxString& file, wxBitmapType type) +{ +#ifdef __WXMAC__ + // Deal with standard icons + if ( type == wxBITMAP_TYPE_ICON_RESOURCE ) + { + wxIcon tmp(file, type); + if (tmp.IsOk()) + { + AddIcon(tmp); + return; + } + } +#endif // __WXMAC__ + +#if wxUSE_FFILE + wxFFileInputStream stream(file); +#elif wxUSE_FILE + wxFileInputStream stream(file); +#endif + DoAddIcon + ( + *this, + stream, type, + wxString::Format(_("Failed to load image %%d from file '%s'."), file) + ); +} + +#endif // wxUSE_FFILE || wxUSE_FILE + +void wxIconBundle::AddIcon(wxInputStream& stream, wxBitmapType type) +{ + DoAddIcon(*this, stream, type, _("Failed to load image %d from stream.")); +} + +#endif // wxUSE_STREAMS && wxUSE_IMAGE + +wxIcon wxIconBundle::GetIcon(const wxSize& size, int flags) const +{ + wxASSERT( size == wxDefaultSize || (size.x >= 0 && size.y > 0) ); + + // We need the standard system icon size when using FALLBACK_SYSTEM. + wxCoord sysX = 0, + sysY = 0; + if ( flags & FALLBACK_SYSTEM ) + { + sysX = wxSystemSettings::GetMetric(wxSYS_ICON_X); + sysY = wxSystemSettings::GetMetric(wxSYS_ICON_Y); + } + + // If size == wxDefaultSize, we use system default icon size by convention. + wxCoord sizeX = size.x; + wxCoord sizeY = size.y; + if ( size == wxDefaultSize ) + { + wxASSERT_MSG( flags == FALLBACK_SYSTEM, + wxS("Must have valid size if not using FALLBACK_SYSTEM") ); + + sizeX = sysX; + sizeY = sysY; + } + + // Iterate over all icons searching for the exact match or the closest icon + // for FALLBACK_NEAREST_LARGER. + wxIcon iconBest; + int bestDiff = 0; + bool bestIsLarger = false; + bool bestIsSystem = false; + + const size_t count = GetIconCount(); + + const wxIconArray& iconArray = M_ICONBUNDLEDATA->m_icons; + for ( size_t i = 0; i < count; i++ ) + { + const wxIcon& icon = iconArray[i]; + if ( !icon.IsOk() ) + continue; + wxCoord sx = icon.GetWidth(), + sy = icon.GetHeight(); + + // Exact match ends search immediately in any case. + if ( sx == sizeX && sy == sizeY ) + { + iconBest = icon; + break; + } + + if ( flags & FALLBACK_SYSTEM ) + { + if ( sx == sysX && sy == sysY ) + { + iconBest = icon; + bestIsSystem = true; + continue; + } + } + + if ( !bestIsSystem && (flags & FALLBACK_NEAREST_LARGER) ) + { + bool iconLarger = (sx >= sizeX) && (sy >= sizeY); + int iconDiff = abs(sx - sizeX) + abs(sy - sizeY); + + // Use current icon as candidate for the best icon, if either: + // - we have no candidate yet + // - we have no candidate larger than desired size and current icon is + // - current icon is closer to desired size than candidate + if ( !iconBest.IsOk() || + (!bestIsLarger && iconLarger) || + (iconLarger && (iconDiff < bestDiff)) ) + { + iconBest = icon; + bestIsLarger = iconLarger; + bestDiff = iconDiff; + continue; + } + } + } + +#if defined( __WXMAC__ ) && wxOSX_USE_CARBON + if (!iconBest.IsOk()) + return wxNullIcon; + + return wxIcon(iconBest.GetHICON(), size); +#else + return iconBest; +#endif +} + +wxIcon wxIconBundle::GetIconOfExactSize(const wxSize& size) const +{ + return GetIcon(size, FALLBACK_NONE); +} + +void wxIconBundle::AddIcon(const wxIcon& icon) +{ + wxCHECK_RET( icon.IsOk(), wxT("invalid icon") ); + + AllocExclusive(); + + wxIconArray& iconArray = M_ICONBUNDLEDATA->m_icons; + + // replace existing icon with the same size if we already have it + const size_t count = iconArray.size(); + for ( size_t i = 0; i < count; ++i ) + { + wxIcon& tmp = iconArray[i]; + if ( tmp.IsOk() && + tmp.GetWidth() == icon.GetWidth() && + tmp.GetHeight() == icon.GetHeight() ) + { + tmp = icon; + return; + } + } + + // if we don't, add an icon with new size + iconArray.Add(icon); +} + +size_t wxIconBundle::GetIconCount() const +{ + return IsOk() ? M_ICONBUNDLEDATA->m_icons.size() : 0; +} + +wxIcon wxIconBundle::GetIconByIndex(size_t n) const +{ + wxCHECK_MSG( n < GetIconCount(), wxNullIcon, wxT("invalid index") ); + + return M_ICONBUNDLEDATA->m_icons[n]; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imagall.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagall.cpp new file mode 100644 index 0000000000..7916f1f404 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagall.cpp @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imagall.cpp +// Purpose: wxImage access all handler +// Author: Sylvain Bougnoux +// Copyright: (c) Sylvain Bougnoux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE + +#ifndef WX_PRECOMP + #include "wx/image.h" +#endif + +//----------------------------------------------------------------------------- +// This function allows dynamic access to all image handlers compile within +// the library. This function should be in a separate file as some compilers +// link against the whole object file as long as just one of is function is called! + +void wxInitAllImageHandlers() +{ +#if wxUSE_LIBPNG + wxImage::AddHandler( new wxPNGHandler ); +#endif +#if wxUSE_LIBJPEG + wxImage::AddHandler( new wxJPEGHandler ); +#endif +#if wxUSE_LIBTIFF + wxImage::AddHandler( new wxTIFFHandler ); +#endif +#if wxUSE_GIF + wxImage::AddHandler( new wxGIFHandler ); +#endif +#if wxUSE_PNM + wxImage::AddHandler( new wxPNMHandler ); +#endif +#if wxUSE_PCX + wxImage::AddHandler( new wxPCXHandler ); +#endif +#if wxUSE_IFF + wxImage::AddHandler( new wxIFFHandler ); +#endif +#if wxUSE_ICO_CUR + wxImage::AddHandler( new wxICOHandler ); + wxImage::AddHandler( new wxCURHandler ); + wxImage::AddHandler( new wxANIHandler ); +#endif +#if wxUSE_TGA + wxImage::AddHandler( new wxTGAHandler ); +#endif +#if wxUSE_XPM + wxImage::AddHandler( new wxXPMHandler ); +#endif +} + +#endif // wxUSE_IMAGE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imagbmp.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagbmp.cpp new file mode 100644 index 0000000000..f1ec8aa7a4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagbmp.cpp @@ -0,0 +1,1646 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imagbmp.cpp +// Purpose: wxImage BMP,ICO and CUR handlers +// Author: Robert Roebling, Chris Elliott +// Copyright: (c) Robert Roebling, Chris Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE + +#include "wx/imagbmp.h" + +#ifndef WX_PRECOMP + #ifdef __WXMSW__ + #include "wx/msw/wrapwin.h" + #endif + #include "wx/log.h" + #include "wx/app.h" + #include "wx/bitmap.h" + #include "wx/palette.h" + #include "wx/intl.h" + #include "wx/math.h" +#endif + +#include "wx/filefn.h" +#include "wx/wfstream.h" +#include "wx/quantize.h" +#include "wx/scopeguard.h" +#include "wx/scopedarray.h" +#include "wx/anidecod.h" + +// For memcpy +#include + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +#if wxUSE_ICO_CUR + +static bool CanReadICOOrCUR(wxInputStream *stream, wxUint16 resourceType); + +#endif // wxUSE_ICO_CUR + +//----------------------------------------------------------------------------- +// wxBMPHandler +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxBMPHandler,wxImageHandler) + +#if wxUSE_STREAMS + +#ifndef BI_RGB + #define BI_RGB 0 +#endif + +#ifndef BI_RLE8 +#define BI_RLE8 1 +#endif + +#ifndef BI_RLE4 +#define BI_RLE4 2 +#endif + +#ifndef BI_BITFIELDS +#define BI_BITFIELDS 3 +#endif + +#define poffset (line * width * 3 + column * 3) + +bool wxBMPHandler::SaveFile(wxImage *image, + wxOutputStream& stream, + bool verbose) +{ + return SaveDib(image, stream, verbose, true/*IsBmp*/, false/*IsMask*/); +} + +bool wxBMPHandler::SaveDib(wxImage *image, + wxOutputStream& stream, + bool verbose, + bool IsBmp, + bool IsMask) + +{ + wxCHECK_MSG( image, false, wxT("invalid pointer in wxBMPHandler::SaveFile") ); + + if ( !image->IsOk() ) + { + if ( verbose ) + { + wxLogError(_("BMP: Couldn't save invalid image.")); + } + return false; + } + + // get the format of the BMP file to save, else use 24bpp + unsigned format = wxBMP_24BPP; + if ( image->HasOption(wxIMAGE_OPTION_BMP_FORMAT) ) + format = image->GetOptionInt(wxIMAGE_OPTION_BMP_FORMAT); + + wxUint16 bpp; // # of bits per pixel + int palette_size; // # of color map entries, ie. 2^bpp colors + + // set the bpp and appropriate palette_size, and do additional checks + if ( (format == wxBMP_1BPP) || (format == wxBMP_1BPP_BW) ) + { + bpp = 1; + palette_size = 2; + } + else if ( format == wxBMP_4BPP ) + { + bpp = 4; + palette_size = 16; + } + else if ( (format == wxBMP_8BPP) || (format == wxBMP_8BPP_GREY) || + (format == wxBMP_8BPP_RED) || (format == wxBMP_8BPP_PALETTE) ) + { + // need to set a wxPalette to use this, HOW TO CHECK IF VALID, SIZE? + if ((format == wxBMP_8BPP_PALETTE) +#if wxUSE_PALETTE + && !image->HasPalette() +#endif // wxUSE_PALETTE + ) + { + if ( verbose ) + { + wxLogError(_("BMP: wxImage doesn't have own wxPalette.")); + } + return false; + } + bpp = 8; + palette_size = 256; + } + else // you get 24bpp + { + format = wxBMP_24BPP; + bpp = 24; + palette_size = 0; + } + + unsigned width = image->GetWidth(); + unsigned row_padding = (4 - ((width * bpp + 7) / 8) % 4) % 4; // # bytes to pad to dword + unsigned row_width = (width * bpp + 7) / 8 + row_padding; // # of bytes per row + + struct + { + // BitmapHeader: + wxUint16 magic; // format magic, always 'BM' + wxUint32 filesize; // total file size, inc. headers + wxUint32 reserved; // for future use + wxUint32 data_offset; // image data offset in the file + + // BitmapInfoHeader: + wxUint32 bih_size; // 2nd part's size + wxUint32 width, height; // bitmap's dimensions + wxUint16 planes; // num of planes + wxUint16 bpp; // bits per pixel + wxUint32 compression; // compression method + wxUint32 size_of_bmp; // size of the bitmap + wxUint32 h_res, v_res; // image resolution in pixels-per-meter + wxUint32 num_clrs; // number of colors used + wxUint32 num_signif_clrs;// number of significant colors + } hdr; + + wxUint32 hdr_size = 14/*BitmapHeader*/ + 40/*BitmapInfoHeader*/; + + hdr.magic = wxUINT16_SWAP_ON_BE(0x4D42/*'BM'*/); + hdr.filesize = wxUINT32_SWAP_ON_BE( hdr_size + palette_size*4 + + row_width * image->GetHeight() ); + hdr.reserved = 0; + hdr.data_offset = wxUINT32_SWAP_ON_BE(hdr_size + palette_size*4); + + hdr.bih_size = wxUINT32_SWAP_ON_BE(hdr_size - 14); + hdr.width = wxUINT32_SWAP_ON_BE(image->GetWidth()); + if ( IsBmp ) + { + hdr.height = wxUINT32_SWAP_ON_BE(image->GetHeight()); + } + else + { + hdr.height = wxUINT32_SWAP_ON_BE(2 * image->GetHeight()); + } + hdr.planes = wxUINT16_SWAP_ON_BE(1); // always 1 plane + hdr.bpp = wxUINT16_SWAP_ON_BE(bpp); + hdr.compression = 0; // RGB uncompressed + hdr.size_of_bmp = wxUINT32_SWAP_ON_BE(row_width * image->GetHeight()); + + // get the resolution from the image options or fall back to 72dpi standard + // for the BMP format if not specified + int hres, vres; + switch ( GetResolutionFromOptions(*image, &hres, &vres) ) + { + default: + wxFAIL_MSG( wxT("unexpected image resolution units") ); + // fall through + + case wxIMAGE_RESOLUTION_NONE: + hres = + vres = 72; + // fall through to convert it to correct units + + case wxIMAGE_RESOLUTION_INCHES: + // convert resolution in inches to resolution in centimeters + hres = (int)(10*mm2inches*hres); + vres = (int)(10*mm2inches*vres); + // fall through to convert it to resolution in meters + + case wxIMAGE_RESOLUTION_CM: + // convert resolution in centimeters to resolution in meters + hres *= 100; + vres *= 100; + break; + } + + hdr.h_res = wxUINT32_SWAP_ON_BE(hres); + hdr.v_res = wxUINT32_SWAP_ON_BE(vres); + hdr.num_clrs = wxUINT32_SWAP_ON_BE(palette_size); // # colors in colormap + hdr.num_signif_clrs = 0; // all colors are significant + + if ( IsBmp ) + { + if (// VS: looks ugly but compilers tend to do ugly things with structs, + // like aligning hdr.filesize's ofset to dword :( + // VZ: we should add padding then... + !stream.WriteAll(&hdr.magic, 2) || + !stream.WriteAll(&hdr.filesize, 4) || + !stream.WriteAll(&hdr.reserved, 4) || + !stream.WriteAll(&hdr.data_offset, 4) + ) + { + if (verbose) + { + wxLogError(_("BMP: Couldn't write the file (Bitmap) header.")); + } + return false; + } + } + if ( !IsMask ) + { + if ( + !stream.WriteAll(&hdr.bih_size, 4) || + !stream.WriteAll(&hdr.width, 4) || + !stream.WriteAll(&hdr.height, 4) || + !stream.WriteAll(&hdr.planes, 2) || + !stream.WriteAll(&hdr.bpp, 2) || + !stream.WriteAll(&hdr.compression, 4) || + !stream.WriteAll(&hdr.size_of_bmp, 4) || + !stream.WriteAll(&hdr.h_res, 4) || + !stream.WriteAll(&hdr.v_res, 4) || + !stream.WriteAll(&hdr.num_clrs, 4) || + !stream.WriteAll(&hdr.num_signif_clrs, 4) + ) + { + if (verbose) + { + wxLogError(_("BMP: Couldn't write the file (BitmapInfo) header.")); + } + return false; + } + } + + wxPalette *palette = NULL; // entries for quantized images + wxUint8 *rgbquad = NULL; // for the RGBQUAD bytes for the colormap + wxImage *q_image = NULL; // destination for quantized image + + // if <24bpp use quantization to reduce colors for *some* of the formats + if ( (format == wxBMP_1BPP) || (format == wxBMP_4BPP) || + (format == wxBMP_8BPP) || (format == wxBMP_8BPP_PALETTE) ) + { + // make a new palette and quantize the image + if (format != wxBMP_8BPP_PALETTE) + { + q_image = new wxImage(); + + // I get a delete error using Quantize when desired colors > 236 + int quantize = ((palette_size > 236) ? 236 : palette_size); + // fill the destination too, it gives much nicer 4bpp images + wxQuantize::Quantize( *image, *q_image, &palette, quantize, 0, + wxQUANTIZE_FILL_DESTINATION_IMAGE ); + } + else + { +#if wxUSE_PALETTE + palette = new wxPalette(image->GetPalette()); +#endif // wxUSE_PALETTE + } + + int i; + unsigned char r, g, b; + rgbquad = new wxUint8 [palette_size*4]; + + for (i = 0; i < palette_size; i++) + { +#if wxUSE_PALETTE + if ( !palette->GetRGB(i, &r, &g, &b) ) +#endif // wxUSE_PALETTE + r = g = b = 0; + + rgbquad[i*4] = b; + rgbquad[i*4+1] = g; + rgbquad[i*4+2] = r; + rgbquad[i*4+3] = 0; + } + } + // make a 256 entry greyscale colormap or 2 entry black & white + else if ( (format == wxBMP_8BPP_GREY) || (format == wxBMP_8BPP_RED) || + (format == wxBMP_1BPP_BW) ) + { + rgbquad = new wxUint8 [palette_size*4]; + + for ( int i = 0; i < palette_size; i++ ) + { + // if 1BPP_BW then the value should be either 0 or 255 + wxUint8 c = (wxUint8)((i > 0) && (format == wxBMP_1BPP_BW) ? 255 : i); + + rgbquad[i*4] = + rgbquad[i*4+1] = + rgbquad[i*4+2] = c; + rgbquad[i*4+3] = 0; + } + } + + // if the colormap was made, then it needs to be written + if (rgbquad) + { + if ( !IsMask ) + { + if ( !stream.WriteAll(rgbquad, palette_size*4) ) + { + if (verbose) + { + wxLogError(_("BMP: Couldn't write RGB color map.")); + } + delete[] rgbquad; +#if wxUSE_PALETTE + delete palette; +#endif // wxUSE_PALETTE + delete q_image; + return false; + } + } + delete []rgbquad; + } + + // pointer to the image data, use quantized if available + wxUint8 *data = (wxUint8*) image->GetData(); + if (q_image) if (q_image->IsOk()) data = (wxUint8*) q_image->GetData(); + + wxUint8 *buffer = new wxUint8[row_width]; + memset(buffer, 0, row_width); + int y; unsigned x; + long int pixel; + + for (y = image->GetHeight() -1; y >= 0; y--) + { + if ( format == wxBMP_24BPP ) // 3 bytes per pixel red,green,blue + { + for ( x = 0; x < width; x++ ) + { + pixel = 3*(y*width + x); + + buffer[3*x ] = data[pixel+2]; + buffer[3*x + 1] = data[pixel+1]; + buffer[3*x + 2] = data[pixel]; + } + } + else if ((format == wxBMP_8BPP) || // 1 byte per pixel in color + (format == wxBMP_8BPP_PALETTE)) + { + for (x = 0; x < width; x++) + { + pixel = 3*(y*width + x); +#if wxUSE_PALETTE + buffer[x] = (wxUint8)palette->GetPixel( data[pixel], + data[pixel+1], + data[pixel+2] ); +#else + // FIXME: what should this be? use some std palette maybe? + buffer[x] = 0; +#endif // wxUSE_PALETTE + } + } + else if ( format == wxBMP_8BPP_GREY ) // 1 byte per pix, rgb ave to grey + { + for (x = 0; x < width; x++) + { + pixel = 3*(y*width + x); + buffer[x] = (wxUint8)(.299*data[pixel] + + .587*data[pixel+1] + + .114*data[pixel+2]); + } + } + else if ( format == wxBMP_8BPP_RED ) // 1 byte per pixel, red as greys + { + for (x = 0; x < width; x++) + { + buffer[x] = (wxUint8)data[3*(y*width + x)]; + } + } + else if ( format == wxBMP_4BPP ) // 4 bpp in color + { + for (x = 0; x < width; x+=2) + { + pixel = 3*(y*width + x); + + // fill buffer, ignore if > width +#if wxUSE_PALETTE + buffer[x/2] = (wxUint8)( + ((wxUint8)palette->GetPixel(data[pixel], + data[pixel+1], + data[pixel+2]) << 4) | + (((x+1) > width) + ? 0 + : ((wxUint8)palette->GetPixel(data[pixel+3], + data[pixel+4], + data[pixel+5]) )) ); +#else + // FIXME: what should this be? use some std palette maybe? + buffer[x/2] = 0; +#endif // wxUSE_PALETTE + } + } + else if ( format == wxBMP_1BPP ) // 1 bpp in "color" + { + for (x = 0; x < width; x+=8) + { + pixel = 3*(y*width + x); + +#if wxUSE_PALETTE + buffer[x/8] = (wxUint8)( + ((wxUint8)palette->GetPixel(data[pixel], data[pixel+1], data[pixel+2]) << 7) | + (((x+1) > width) ? 0 : ((wxUint8)palette->GetPixel(data[pixel+3], data[pixel+4], data[pixel+5]) << 6)) | + (((x+2) > width) ? 0 : ((wxUint8)palette->GetPixel(data[pixel+6], data[pixel+7], data[pixel+8]) << 5)) | + (((x+3) > width) ? 0 : ((wxUint8)palette->GetPixel(data[pixel+9], data[pixel+10], data[pixel+11]) << 4)) | + (((x+4) > width) ? 0 : ((wxUint8)palette->GetPixel(data[pixel+12], data[pixel+13], data[pixel+14]) << 3)) | + (((x+5) > width) ? 0 : ((wxUint8)palette->GetPixel(data[pixel+15], data[pixel+16], data[pixel+17]) << 2)) | + (((x+6) > width) ? 0 : ((wxUint8)palette->GetPixel(data[pixel+18], data[pixel+19], data[pixel+20]) << 1)) | + (((x+7) > width) ? 0 : ((wxUint8)palette->GetPixel(data[pixel+21], data[pixel+22], data[pixel+23]) )) ); +#else + // FIXME: what should this be? use some std palette maybe? + buffer[x/8] = 0; +#endif // wxUSE_PALETTE + } + } + else if ( format == wxBMP_1BPP_BW ) // 1 bpp B&W colormap from red color ONLY + { + for (x = 0; x < width; x+=8) + { + pixel = 3*(y*width + x); + + buffer[x/8] = (wxUint8)( + (((wxUint8)(data[pixel] /128.)) << 7) | + (((x+1) > width) ? 0 : (((wxUint8)(data[pixel+3] /128.)) << 6)) | + (((x+2) > width) ? 0 : (((wxUint8)(data[pixel+6] /128.)) << 5)) | + (((x+3) > width) ? 0 : (((wxUint8)(data[pixel+9] /128.)) << 4)) | + (((x+4) > width) ? 0 : (((wxUint8)(data[pixel+12]/128.)) << 3)) | + (((x+5) > width) ? 0 : (((wxUint8)(data[pixel+15]/128.)) << 2)) | + (((x+6) > width) ? 0 : (((wxUint8)(data[pixel+18]/128.)) << 1)) | + (((x+7) > width) ? 0 : (((wxUint8)(data[pixel+21]/128.)) )) ); + } + } + + if ( !stream.WriteAll(buffer, row_width) ) + { + if (verbose) + { + wxLogError(_("BMP: Couldn't write data.")); + } + delete[] buffer; +#if wxUSE_PALETTE + delete palette; +#endif // wxUSE_PALETTE + delete q_image; + return false; + } + } + delete[] buffer; +#if wxUSE_PALETTE + delete palette; +#endif // wxUSE_PALETTE + delete q_image; + + return true; +} + + +struct BMPPalette +{ + static void Free(BMPPalette* pal) { delete [] pal; } + + unsigned char r, g, b; +}; + +bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height, + int bpp, int ncolors, int comp, + wxFileOffset bmpOffset, wxInputStream& stream, + bool verbose, bool IsBmp, bool hasPalette) +{ + wxInt32 aDword, rmask = 0, gmask = 0, bmask = 0, amask = 0; + int rshift = 0, gshift = 0, bshift = 0, ashift = 0; + int rbits = 0, gbits = 0, bbits = 0; + wxInt32 dbuf[4]; + wxInt8 bbuf[4]; + wxUint8 aByte; + wxUint16 aWord; + + // allocate space for palette if needed: + BMPPalette *cmap; + + if ( bpp < 16 ) + { + cmap = new BMPPalette[ncolors]; + if ( !cmap ) + { + if (verbose) + { + wxLogError(_("BMP: Couldn't allocate memory.")); + } + return false; + } + } + else // no palette + { + cmap = NULL; + } + + wxON_BLOCK_EXIT1(&BMPPalette::Free, cmap); + + bool isUpsideDown = true; + + if (height < 0) + { + isUpsideDown = false; + height = -height; + } + + // destroy existing here instead of: + image->Destroy(); + image->Create(width, height); + + unsigned char *ptr = image->GetData(); + + if ( !ptr ) + { + if ( verbose ) + { + wxLogError( _("BMP: Couldn't allocate memory.") ); + } + return false; + } + + unsigned char *alpha; + if ( bpp == 32 ) + { + // tell the image to allocate an alpha buffer + image->SetAlpha(); + alpha = image->GetAlpha(); + if ( !alpha ) + { + if ( verbose ) + { + wxLogError(_("BMP: Couldn't allocate memory.")); + } + return false; + } + } + else // no alpha + { + alpha = NULL; + } + + // Reading the palette, if it exists: + if ( bpp < 16 && ncolors != 0 ) + { + unsigned char* r = new unsigned char[ncolors]; + unsigned char* g = new unsigned char[ncolors]; + unsigned char* b = new unsigned char[ncolors]; + for (int j = 0; j < ncolors; j++) + { + if (hasPalette) + { + if ( !stream.ReadAll(bbuf, 4) ) + { + delete [] r; + delete [] g; + delete [] b; + return false; + } + cmap[j].b = bbuf[0]; + cmap[j].g = bbuf[1]; + cmap[j].r = bbuf[2]; + + r[j] = cmap[j].r; + g[j] = cmap[j].g; + b[j] = cmap[j].b; + } + else + { + //used in reading .ico file mask + r[j] = cmap[j].r = + g[j] = cmap[j].g = + b[j] = cmap[j].b = ( j ? 255 : 0 ); + } + } + +#if wxUSE_PALETTE + // Set the palette for the wxImage + image->SetPalette(wxPalette(ncolors, r, g, b)); +#endif // wxUSE_PALETTE + + delete[] r; + delete[] g; + delete[] b; + } + else if ( bpp == 16 || bpp == 32 ) + { + if ( comp == BI_BITFIELDS ) + { + int bit; + if ( !stream.ReadAll(dbuf, 4 * 3) ) + return false; + + rmask = wxINT32_SWAP_ON_BE(dbuf[0]); + gmask = wxINT32_SWAP_ON_BE(dbuf[1]); + bmask = wxINT32_SWAP_ON_BE(dbuf[2]); + // find shift amount (Least significant bit of mask) + for (bit = bpp-1; bit>=0; bit--) + { + if (bmask & (1 << bit)) + bshift = bit; + if (gmask & (1 << bit)) + gshift = bit; + if (rmask & (1 << bit)) + rshift = bit; + } + // Find number of bits in mask (MSB-LSB+1) + for (bit = 0; bit < bpp; bit++) + { + if (bmask & (1 << bit)) + bbits = bit-bshift+1; + if (gmask & (1 << bit)) + gbits = bit-gshift+1; + if (rmask & (1 << bit)) + rbits = bit-rshift+1; + } + } + else if ( bpp == 16 ) + { + rmask = 0x7C00; + gmask = 0x03E0; + bmask = 0x001F; + rshift = 10; + gshift = 5; + bshift = 0; + rbits = 5; + gbits = 5; + bbits = 5; + } + else if ( bpp == 32 ) + { + rmask = 0x00FF0000; + gmask = 0x0000FF00; + bmask = 0x000000FF; + amask = 0xFF000000; + + ashift = 24; + rshift = 16; + gshift = 8; + bshift = 0; + rbits = 8; + gbits = 8; + bbits = 8; + } + } + + /* + * Reading the image data + */ + if ( IsBmp ) + { + // NOTE: seeking a positive amount in wxFromCurrent mode allows us to + // load even non-seekable streams (see wxInputStream::SeekI docs)! + const wxFileOffset pos = stream.TellI(); + if ( pos == wxInvalidOffset || + (bmpOffset > pos && + stream.SeekI(bmpOffset - pos, wxFromCurrent) == wxInvalidOffset) ) + return false; + //else: icon, just carry on + } + + unsigned char *data = ptr; + + /* set the whole image to the background color */ + if ( bpp < 16 && (comp == BI_RLE4 || comp == BI_RLE8) ) + { + for (int i = 0; i < width * height; i++) + { + *ptr++ = cmap[0].r; + *ptr++ = cmap[0].g; + *ptr++ = cmap[0].b; + } + ptr = data; + } + + int linesize = ((width * bpp + 31) / 32) * 4; + + // flag indicating if we have any not fully transparent alpha values: this + // is used to account for the bitmaps which use 32bpp format (normally + // meaning that they have alpha channel) but have only zeroes in it so that + // without this hack they appear fully transparent -- and as this is + // unlikely intentional, we consider that they don't have alpha at all in + // this case (see #10915) + bool hasValidAlpha = false; + + for ( int row = 0; row < height; row++ ) + { + int line = isUpsideDown ? height - 1 - row : row; + + int linepos = 0; + for ( int column = 0; column < width ; ) + { + if ( bpp < 16 ) + { + linepos++; + aByte = stream.GetC(); + if ( !stream.IsOk() ) + return false; + + if ( bpp == 1 ) + { + for (int bit = 0; bit < 8 && column < width; bit++) + { + int index = ((aByte & (0x80 >> bit)) ? 1 : 0); + ptr[poffset] = cmap[index].r; + ptr[poffset + 1] = cmap[index].g; + ptr[poffset + 2] = cmap[index].b; + column++; + } + } + else if ( bpp == 4 ) + { + if ( comp == BI_RLE4 ) + { + wxUint8 first; + first = aByte; + aByte = stream.GetC(); + if ( !stream.IsOk() ) + return false; + + if ( first == 0 ) + { + if ( aByte == 0 ) + { + // end of scanline marker + column = width; + row--; + } + else if ( aByte == 1 ) + { + // end of RLE data marker, stop decoding + column = width; + row = height; + } + else if ( aByte == 2 ) + { + // delta marker, move in image + aByte = stream.GetC(); + if ( !stream.IsOk() ) + return false; + column += aByte; + linepos = column * bpp / 4; + aByte = stream.GetC(); + if ( !stream.IsOk() ) + return false; + row += aByte; // upside down + } + else + { + int absolute = aByte; + wxUint8 nibble[2] ; + int readBytes = 0 ; + for (int k = 0; k < absolute; k++) + { + if ( !(k % 2 ) ) + { + ++readBytes ; + aByte = stream.GetC(); + if ( !stream.IsOk() ) + return false; + nibble[0] = (wxUint8)( (aByte & 0xF0) >> 4 ) ; + nibble[1] = (wxUint8)( aByte & 0x0F ) ; + } + ptr[poffset ] = cmap[nibble[k%2]].r; + ptr[poffset + 1] = cmap[nibble[k%2]].g; + ptr[poffset + 2] = cmap[nibble[k%2]].b; + column++; + if ( k % 2 ) + linepos++; + } + if ( readBytes & 0x01 ) + { + aByte = stream.GetC(); + if ( !stream.IsOk() ) + return false; + } + } + } + else + { + wxUint8 nibble[2] ; + nibble[0] = (wxUint8)( (aByte & 0xF0) >> 4 ) ; + nibble[1] = (wxUint8)( aByte & 0x0F ) ; + + for ( int l = 0; l < first && column < width; l++ ) + { + ptr[poffset ] = cmap[nibble[l%2]].r; + ptr[poffset + 1] = cmap[nibble[l%2]].g; + ptr[poffset + 2] = cmap[nibble[l%2]].b; + column++; + if ( l % 2 ) + linepos++; + } + } + } + else + { + for (int nibble = 0; nibble < 2 && column < width; nibble++) + { + int index = ((aByte & (0xF0 >> (nibble * 4))) >> (!nibble * 4)); + if ( index >= 16 ) + index = 15; + ptr[poffset] = cmap[index].r; + ptr[poffset + 1] = cmap[index].g; + ptr[poffset + 2] = cmap[index].b; + column++; + } + } + } + else if ( bpp == 8 ) + { + if ( comp == BI_RLE8 ) + { + unsigned char first; + first = aByte; + aByte = stream.GetC(); + if ( !stream.IsOk() ) + return false; + + if ( first == 0 ) + { + if ( aByte == 0 ) + { + // end of scanline marker + column = width; + row--; + } + else if ( aByte == 1 ) + { + // end of RLE data marker, stop decoding + column = width; + row = height; + } + else if ( aByte == 2 ) + { + // delta marker, move in image + aByte = stream.GetC(); + if ( !stream.IsOk() ) + return false; + column += aByte; + linepos = column * bpp / 8; + aByte = stream.GetC(); + if ( !stream.IsOk() ) + return false; + row -= aByte; + } + else + { + int absolute = aByte; + for (int k = 0; k < absolute; k++) + { + linepos++; + aByte = stream.GetC(); + if ( !stream.IsOk() ) + return false; + ptr[poffset ] = cmap[aByte].r; + ptr[poffset + 1] = cmap[aByte].g; + ptr[poffset + 2] = cmap[aByte].b; + column++; + } + if ( absolute & 0x01 ) + { + aByte = stream.GetC(); + if ( !stream.IsOk() ) + return false; + } + } + } + else + { + for ( int l = 0; l < first && column < width; l++ ) + { + ptr[poffset ] = cmap[aByte].r; + ptr[poffset + 1] = cmap[aByte].g; + ptr[poffset + 2] = cmap[aByte].b; + column++; + linepos++; + } + } + } + else + { + ptr[poffset ] = cmap[aByte].r; + ptr[poffset + 1] = cmap[aByte].g; + ptr[poffset + 2] = cmap[aByte].b; + column++; + // linepos += size; seems to be wrong, RR + } + } + } + else if ( bpp == 24 ) + { + if ( !stream.ReadAll(bbuf, 3) ) + return false; + linepos += 3; + ptr[poffset ] = (unsigned char)bbuf[2]; + ptr[poffset + 1] = (unsigned char)bbuf[1]; + ptr[poffset + 2] = (unsigned char)bbuf[0]; + column++; + } + else if ( bpp == 16 ) + { + unsigned char temp; + if ( !stream.ReadAll(&aWord, 2) ) + return false; + aWord = wxUINT16_SWAP_ON_BE(aWord); + linepos += 2; + /* Use the masks and calculated amount of shift + to retrieve the color data out of the word. Then + shift it left by (8 - number of bits) such that + the image has the proper dynamic range */ + temp = (unsigned char)(((aWord & rmask) >> rshift) << (8-rbits)); + ptr[poffset] = temp; + temp = (unsigned char)(((aWord & gmask) >> gshift) << (8-gbits)); + ptr[poffset + 1] = temp; + temp = (unsigned char)(((aWord & bmask) >> bshift) << (8-bbits)); + ptr[poffset + 2] = temp; + column++; + } + else + { + unsigned char temp; + if ( !stream.ReadAll(&aDword, 4) ) + return false; + + aDword = wxINT32_SWAP_ON_BE(aDword); + linepos += 4; + temp = (unsigned char)((aDword & rmask) >> rshift); + ptr[poffset] = temp; + temp = (unsigned char)((aDword & gmask) >> gshift); + ptr[poffset + 1] = temp; + temp = (unsigned char)((aDword & bmask) >> bshift); + ptr[poffset + 2] = temp; + if ( alpha ) + { + temp = (unsigned char)((aDword & amask) >> ashift); + alpha[line * width + column] = temp; + + if ( temp != wxALPHA_TRANSPARENT ) + hasValidAlpha = true; + } + column++; + } + } + while ( (linepos < linesize) && (comp != 1) && (comp != 2) ) + { + ++linepos; + if ( !stream.ReadAll(&aByte, 1) ) + break; + } + } + + image->SetMask(false); + + // check if we had any valid alpha values in this bitmap + if ( alpha && !hasValidAlpha ) + { + // we didn't, so finally discard the alpha channel completely + image->ClearAlpha(); + } + + const wxStreamError err = stream.GetLastError(); + return err == wxSTREAM_NO_ERROR || err == wxSTREAM_EOF; +} + +bool wxBMPHandler::LoadDib(wxImage *image, wxInputStream& stream, + bool verbose, bool IsBmp) +{ + wxUint16 aWord; + wxInt32 dbuf[4]; + wxInt8 bbuf[4]; + + if ( IsBmp ) + { + // read the header off the .BMP format file + if ( !stream.ReadAll(bbuf, 2) || + !stream.ReadAll(dbuf, 16) ) + return false; + } + else + { + if ( !stream.ReadAll(dbuf, 4) ) + return false; + } + #if 0 // unused + wxInt32 size = wxINT32_SWAP_ON_BE(dbuf[0]); + #endif + wxFileOffset offset = wxINT32_SWAP_ON_BE(dbuf[2]); + + if ( !stream.ReadAll(dbuf, 4 * 2) ) + return false; + + int width = wxINT32_SWAP_ON_BE((int)dbuf[0]); + int height = wxINT32_SWAP_ON_BE((int)dbuf[1]); + if ( !IsBmp)height = height / 2; // for icons divide by 2 + + if ( width > 32767 ) + { + if (verbose) + { + wxLogError( _("DIB Header: Image width > 32767 pixels for file.") ); + } + return false; + } + if ( height > 32767 ) + { + if (verbose) + { + wxLogError( _("DIB Header: Image height > 32767 pixels for file.") ); + } + return false; + } + + if ( !stream.ReadAll(&aWord, 2) ) + return false; + + /* + TODO + int planes = (int)wxUINT16_SWAP_ON_BE( aWord ); + */ + if ( !stream.ReadAll(&aWord, 2) ) + return false; + + int bpp = wxUINT16_SWAP_ON_BE((int)aWord); + if ( bpp != 1 && bpp != 4 && bpp != 8 && bpp != 16 && bpp != 24 && bpp != 32 ) + { + if (verbose) + { + wxLogError( _("DIB Header: Unknown bitdepth in file.") ); + } + return false; + } + + if ( !stream.ReadAll(dbuf, 4 * 4) ) + return false; + + int comp = wxINT32_SWAP_ON_BE((int)dbuf[0]); + if ( comp != BI_RGB && comp != BI_RLE4 && comp != BI_RLE8 && + comp != BI_BITFIELDS ) + { + if (verbose) + { + wxLogError( _("DIB Header: Unknown encoding in file.") ); + } + return false; + } + + if ( !stream.ReadAll(dbuf, 4 * 2) ) + return false; + + int ncolors = wxINT32_SWAP_ON_BE( (int)dbuf[0] ); + if (ncolors == 0) + ncolors = 1 << bpp; + /* some more sanity checks */ + if (((comp == BI_RLE4) && (bpp != 4)) || + ((comp == BI_RLE8) && (bpp != 8)) || + ((comp == BI_BITFIELDS) && (bpp != 16 && bpp != 32))) + { + if (verbose) + { + wxLogError( _("DIB Header: Encoding doesn't match bitdepth.") ); + } + return false; + } + + //read DIB; this is the BMP image or the XOR part of an icon image + if ( !DoLoadDib(image, width, height, bpp, ncolors, comp, offset, stream, + verbose, IsBmp, true) ) + { + if (verbose) + { + wxLogError( _("Error in reading image DIB.") ); + } + return false; + } + + if ( !IsBmp ) + { + //read Icon mask which is monochrome + //there is no palette, so we will create one + wxImage mask; + if ( !DoLoadDib(&mask, width, height, 1, 2, BI_RGB, offset, stream, + verbose, IsBmp, false) ) + { + if (verbose) + { + wxLogError( _("ICO: Error in reading mask DIB.") ); + } + return false; + } + image->SetMaskFromImage(mask, 255, 255, 255); + + } + + // the resolution in the bitmap header is in meters, convert to centimeters + image->SetOption(wxIMAGE_OPTION_RESOLUTIONUNIT, wxIMAGE_RESOLUTION_CM); + image->SetOption(wxIMAGE_OPTION_RESOLUTIONX, dbuf[2]/100); + image->SetOption(wxIMAGE_OPTION_RESOLUTIONY, dbuf[3]/100); + + return true; +} + +bool wxBMPHandler::LoadFile(wxImage *image, wxInputStream& stream, + bool verbose, int WXUNUSED(index)) +{ + // Read a single DIB fom the file: + return LoadDib(image, stream, verbose, true/*isBmp*/); +} + +bool wxBMPHandler::DoCanRead(wxInputStream& stream) +{ + unsigned char hdr[2]; + + if ( !stream.ReadAll(hdr, WXSIZEOF(hdr)) ) // it's ok to modify the stream position here + return false; + + // do we have the BMP file signature? + return hdr[0] == 'B' && hdr[1] == 'M'; +} + +#endif // wxUSE_STREAMS + + +#if wxUSE_ICO_CUR +//----------------------------------------------------------------------------- +// wxICOHandler +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxICOHandler, wxBMPHandler) + +#if wxUSE_STREAMS + +struct ICONDIRENTRY +{ + wxUint8 bWidth; // Width of the image + wxUint8 bHeight; // Height of the image (times 2) + wxUint8 bColorCount; // Number of colors in image (0 if >=8bpp) + wxUint8 bReserved; // Reserved + + // these two are different in icons and cursors: + // icon or cursor + wxUint16 wPlanes; // Color Planes or XHotSpot + wxUint16 wBitCount; // Bits per pixel or YHotSpot + + wxUint32 dwBytesInRes; // how many bytes in this resource? + wxUint32 dwImageOffset; // where in the file is this image +}; + +struct ICONDIR +{ + wxUint16 idReserved; // Reserved + wxUint16 idType; // resource type (1 for icons, 2 for cursors) + wxUint16 idCount; // how many images? +}; + + +bool wxICOHandler::SaveFile(wxImage *image, + wxOutputStream& stream, + bool verbose) + +{ + //sanity check; icon must be less than 127 pixels high and 255 wide + if ( image->GetHeight () > 127 ) + { + if ( verbose ) + { + wxLogError(_("ICO: Image too tall for an icon.")); + } + return false; + } + if ( image->GetWidth () > 255 ) + { + if ( verbose ) + { + wxLogError(_("ICO: Image too wide for an icon.")); + } + return false; + } + + const int images = 1; // only generate one image + + // VS: This is a hack of sort - since ICO and CUR files are almost + // identical, we have all the meat in wxICOHandler and check for + // the actual (handler) type when the code has to distinguish between + // the two formats + int type = (this->GetType() == wxBITMAP_TYPE_CUR) ? 2 : 1; + + // write a header, (ICONDIR) + // Calculate the header size + wxUint32 offset = 3 * sizeof(wxUint16); + + ICONDIR IconDir; + IconDir.idReserved = 0; + IconDir.idType = wxUINT16_SWAP_ON_BE((wxUint16)type); + IconDir.idCount = wxUINT16_SWAP_ON_BE((wxUint16)images); + if ( !stream.WriteAll(&IconDir.idReserved, sizeof(IconDir.idReserved)) || + !stream.WriteAll(&IconDir.idType, sizeof(IconDir.idType)) || + !stream.WriteAll(&IconDir.idCount, sizeof(IconDir.idCount)) ) + { + if ( verbose ) + { + wxLogError(_("ICO: Error writing the image file!")); + } + return false; + } + + // for each iamage write a description ICONDIRENTRY: + ICONDIRENTRY icondirentry; + for (int img = 0; img < images; img++) + { + wxImage mask; + + if ( image->HasMask() ) + { + // make another image with black/white: + mask = image->ConvertToMono (image->GetMaskRed(), image->GetMaskGreen(), image->GetMaskBlue() ); + + // now we need to change the masked regions to black: + unsigned char r = image->GetMaskRed(); + unsigned char g = image->GetMaskGreen(); + unsigned char b = image->GetMaskBlue(); + if ( (r != 0) || (g != 0) || (b != 0) ) + { + // Go round and apply black to the masked bits: + int i, j; + for (i = 0; i < mask.GetWidth(); i++) + { + for (j = 0; j < mask.GetHeight(); j++) + { + if ((r == mask.GetRed(i, j)) && + (g == mask.GetGreen(i, j))&& + (b == mask.GetBlue(i, j)) ) + image->SetRGB(i, j, 0, 0, 0 ); + } + } + } + } + else + { + // just make a black mask all over: + mask = image->Copy(); + int i, j; + for (i = 0; i < mask.GetWidth(); i++) + for (j = 0; j < mask.GetHeight(); j++) + mask.SetRGB(i, j, 0, 0, 0 ); + } + // Set the formats for image and mask + // (Windows never saves with more than 8 colors): + image->SetOption(wxIMAGE_OPTION_BMP_FORMAT, wxBMP_8BPP); + + // monochome bitmap: + mask.SetOption(wxIMAGE_OPTION_BMP_FORMAT, wxBMP_1BPP_BW); + bool IsBmp = false; + bool IsMask = false; + + //calculate size and offset of image and mask + wxCountingOutputStream cStream; + bool bResult = SaveDib(image, cStream, verbose, IsBmp, IsMask); + if ( !bResult ) + { + if ( verbose ) + { + wxLogError(_("ICO: Error writing the image file!")); + } + return false; + } + IsMask = true; + + bResult = SaveDib(&mask, cStream, verbose, IsBmp, IsMask); + if ( !bResult ) + { + if ( verbose ) + { + wxLogError(_("ICO: Error writing the image file!")); + } + return false; + } + wxUint32 Size = cStream.GetSize(); + + // wxCountingOutputStream::IsOk() always returns true for now and this + // "if" provokes VC++ warnings in optimized build +#if 0 + if ( !cStream.IsOk() ) + { + if ( verbose ) + { + wxLogError(_("ICO: Error writing the image file!")); + } + return false; + } +#endif // 0 + + offset = offset + sizeof(ICONDIRENTRY); + + icondirentry.bWidth = (wxUint8)image->GetWidth(); + icondirentry.bHeight = (wxUint8)(2 * image->GetHeight()); + icondirentry.bColorCount = 0; + icondirentry.bReserved = 0; + icondirentry.wPlanes = wxUINT16_SWAP_ON_BE(1); + icondirentry.wBitCount = wxUINT16_SWAP_ON_BE(wxBMP_8BPP); + if ( type == 2 /*CUR*/) + { + int hx = image->HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X) ? + image->GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_X) : + image->GetWidth() / 2; + int hy = image->HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y) ? + image->GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_Y) : + image->GetHeight() / 2; + + // actually write the values of the hot spot here: + icondirentry.wPlanes = wxUINT16_SWAP_ON_BE((wxUint16)hx); + icondirentry.wBitCount = wxUINT16_SWAP_ON_BE((wxUint16)hy); + } + icondirentry.dwBytesInRes = wxUINT32_SWAP_ON_BE(Size); + icondirentry.dwImageOffset = wxUINT32_SWAP_ON_BE(offset); + + // increase size to allow for the data written: + offset += Size; + + // write to stream: + if ( !stream.WriteAll(&icondirentry.bWidth, sizeof(icondirentry.bWidth)) || + !stream.WriteAll(&icondirentry.bHeight, sizeof(icondirentry.bHeight)) || + !stream.WriteAll(&icondirentry.bColorCount, sizeof(icondirentry.bColorCount)) || + !stream.WriteAll(&icondirentry.bReserved, sizeof(icondirentry.bReserved)) || + !stream.WriteAll(&icondirentry.wPlanes, sizeof(icondirentry.wPlanes)) || + !stream.WriteAll(&icondirentry.wBitCount, sizeof(icondirentry.wBitCount)) || + !stream.WriteAll(&icondirentry.dwBytesInRes, sizeof(icondirentry.dwBytesInRes)) || + !stream.WriteAll(&icondirentry.dwImageOffset, sizeof(icondirentry.dwImageOffset)) ) + { + if ( verbose ) + { + wxLogError(_("ICO: Error writing the image file!")); + } + return false; + } + + // actually save it: + IsMask = false; + bResult = SaveDib(image, stream, verbose, IsBmp, IsMask); + if ( !bResult ) + { + if ( verbose ) + { + wxLogError(_("ICO: Error writing the image file!")); + } + return false; + } + IsMask = true; + + bResult = SaveDib(&mask, stream, verbose, IsBmp, IsMask); + if ( !bResult ) + { + if ( verbose ) + { + wxLogError(_("ICO: Error writing the image file!")); + } + return false; + } + + } // end of for loop + + return true; +} + +bool wxICOHandler::LoadFile(wxImage *image, wxInputStream& stream, + bool verbose, int index) +{ + if ( stream.IsSeekable() && stream.SeekI(0) == wxInvalidOffset ) + { + return false; + } + + return DoLoadFile(image, stream, verbose, index); +} + +bool wxICOHandler::DoLoadFile(wxImage *image, wxInputStream& stream, + bool verbose, int index) +{ + bool bResult wxDUMMY_INITIALIZE(false); + + ICONDIR IconDir; + + if ( !stream.ReadAll(&IconDir, sizeof(IconDir)) ) + return false; + + wxUint16 nIcons = wxUINT16_SWAP_ON_BE(IconDir.idCount); + + // nType is 1 for Icons, 2 for Cursors: + wxUint16 nType = wxUINT16_SWAP_ON_BE(IconDir.idType); + + // loop round the icons and choose the best one: + wxScopedArray pIconDirEntry(new ICONDIRENTRY[nIcons]); + ICONDIRENTRY *pCurrentEntry = pIconDirEntry.get(); + int wMax = 0; + int colmax = 0; + int iSel = wxNOT_FOUND; + + // remember how many bytes we read from the stream: + wxFileOffset alreadySeeked = sizeof(IconDir); + + for (unsigned int i = 0; i < nIcons; i++ ) + { + if ( !stream.ReadAll(pCurrentEntry, sizeof(ICONDIRENTRY)) ) + return false; + + alreadySeeked += stream.LastRead(); + + // ICO file format uses only a single byte for width and if it is 0, it + // means that the width is actually 256 pixels. + const wxUint16 + widthReal = pCurrentEntry->bWidth ? pCurrentEntry->bWidth : 256; + + // bHeight and bColorCount are wxUint8 + if ( widthReal >= wMax ) + { + // see if we have more colors, ==0 indicates > 8bpp: + if ( pCurrentEntry->bColorCount == 0 ) + pCurrentEntry->bColorCount = 255; + if ( pCurrentEntry->bColorCount >= colmax ) + { + iSel = i; + wMax = widthReal; + colmax = pCurrentEntry->bColorCount; + } + } + + pCurrentEntry++; + } + + if ( index != -1 ) + { + // VS: Note that we *have* to run the loop above even if index != -1, because + // it reads ICONDIRENTRies. + iSel = index; + } + + if ( iSel == wxNOT_FOUND || iSel < 0 || iSel >= nIcons ) + { + wxLogError(_("ICO: Invalid icon index.")); + bResult = false; + } + else + { + // seek to selected icon: + pCurrentEntry = pIconDirEntry.get() + iSel; + + // NOTE: seeking a positive amount in wxFromCurrent mode allows us to + // load even non-seekable streams (see wxInputStream::SeekI docs)! + wxFileOffset offset = wxUINT32_SWAP_ON_BE(pCurrentEntry->dwImageOffset) - alreadySeeked; + if (offset != 0 && stream.SeekI(offset, wxFromCurrent) == wxInvalidOffset) + return false; + +#if wxUSE_LIBPNG + // We can't fall back to loading an icon in the usual BMP format after + // trying to load it as PNG if we have an unseekable stream, so to + // avoid breaking the existing code which does successfully load icons + // from such streams, we only try to load them as PNGs if we can unwind + // back later. + // + // Ideal would be to modify LoadDib() to accept the first 8 bytes not + // coming from the stream but from the signature buffer below, as then + // we'd be able to load PNG icons from any kind of streams. + bool isPNG; + if ( stream.IsSeekable() ) + { + // Check for the PNG signature first to avoid wasting time on + // trying to load typical ICO files which are not PNGs at all. + static const unsigned char signaturePNG[] = + { + 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A + }; + static const int signatureLen = WXSIZEOF(signaturePNG); + + unsigned char signature[signatureLen]; + if ( !stream.ReadAll(signature, signatureLen) ) + return false; + + isPNG = memcmp(signature, signaturePNG, signatureLen) == 0; + + // Rewind to the beginning of the image in any case. + if ( stream.SeekI(-signatureLen, wxFromCurrent) == wxInvalidOffset ) + return false; + } + else // Not seekable stream + { + isPNG = false; + } + + if ( isPNG ) + { + wxPNGHandler handlerPNG; + bResult = handlerPNG.LoadFile(image, stream, verbose); + } + else +#endif // wxUSE_LIBPNG + { + bResult = LoadDib(image, stream, verbose, false /* not BMP */); + } + bool bIsCursorType = (this->GetType() == wxBITMAP_TYPE_CUR) || (this->GetType() == wxBITMAP_TYPE_ANI); + if ( bResult && bIsCursorType && nType == 2 ) + { + // it is a cursor, so let's set the hotspot: + image->SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, wxUINT16_SWAP_ON_BE(pCurrentEntry->wPlanes)); + image->SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, wxUINT16_SWAP_ON_BE(pCurrentEntry->wBitCount)); + } + } + + return bResult; +} + +int wxICOHandler::DoGetImageCount(wxInputStream& stream) +{ + // It's ok to modify the stream position in this function. + + if ( stream.IsSeekable() && stream.SeekI(0) == wxInvalidOffset ) + { + return 0; + } + + ICONDIR IconDir; + + if ( !stream.ReadAll(&IconDir, sizeof(IconDir)) ) + return 0; + + return (int)wxUINT16_SWAP_ON_BE(IconDir.idCount); +} + +bool wxICOHandler::DoCanRead(wxInputStream& stream) +{ + return CanReadICOOrCUR(&stream, 1 /*for identifying an icon*/); + +} + +#endif // wxUSE_STREAMS + + +//----------------------------------------------------------------------------- +// wxCURHandler +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxCURHandler, wxICOHandler) + +#if wxUSE_STREAMS + +bool wxCURHandler::DoCanRead(wxInputStream& stream) +{ + return CanReadICOOrCUR(&stream, 2 /*for identifying a cursor*/); +} + +#endif // wxUSE_STREAMS + +//----------------------------------------------------------------------------- +// wxANIHandler +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxANIHandler, wxCURHandler) + +#if wxUSE_STREAMS + +bool wxANIHandler::LoadFile(wxImage *image, wxInputStream& stream, + bool WXUNUSED(verbose), int index) +{ + wxANIDecoder decoder; + if (!decoder.Load(stream)) + return false; + + return decoder.ConvertToImage(index != -1 ? (size_t)index : 0, image); +} + +bool wxANIHandler::DoCanRead(wxInputStream& stream) +{ + wxANIDecoder decod; + return decod.CanRead(stream); + // it's ok to modify the stream position here +} + +int wxANIHandler::DoGetImageCount(wxInputStream& stream) +{ + wxANIDecoder decoder; + if (!decoder.Load(stream)) // it's ok to modify the stream position here + return wxNOT_FOUND; + + return decoder.GetFrameCount(); +} + +static bool CanReadICOOrCUR(wxInputStream *stream, wxUint16 resourceType) +{ + // It's ok to modify the stream position in this function. + + if ( stream->IsSeekable() && stream->SeekI(0) == wxInvalidOffset ) + { + return false; + } + + ICONDIR iconDir; + if ( !stream->ReadAll(&iconDir, sizeof(iconDir)) ) + { + return false; + } + + return !iconDir.idReserved // reserved, must be 0 + && wxUINT16_SWAP_ON_BE(iconDir.idType) == resourceType // either 1 or 2 + && iconDir.idCount; // must contain at least one image +} + +#endif // wxUSE_STREAMS + +#endif // wxUSE_ICO_CUR + +#endif // wxUSE_IMAGE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/image.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/image.cpp new file mode 100644 index 0000000000..b800e58ad8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/image.cpp @@ -0,0 +1,3659 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/image.cpp +// Purpose: wxImage +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE + +#include "wx/image.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/hash.h" + #include "wx/utils.h" + #include "wx/math.h" + #include "wx/module.h" + #include "wx/palette.h" + #include "wx/intl.h" + #include "wx/colour.h" +#endif + +#include "wx/wfstream.h" +#include "wx/xpmdecod.h" + +// For memcpy +#include + +// make the code compile with either wxFile*Stream or wxFFile*Stream: +#define HAS_FILE_STREAMS (wxUSE_STREAMS && (wxUSE_FILE || wxUSE_FFILE)) + +#if HAS_FILE_STREAMS + #if wxUSE_FFILE + typedef wxFFileInputStream wxImageFileInputStream; + typedef wxFFileOutputStream wxImageFileOutputStream; + #elif wxUSE_FILE + typedef wxFileInputStream wxImageFileInputStream; + typedef wxFileOutputStream wxImageFileOutputStream; + #endif // wxUSE_FILE/wxUSE_FFILE +#endif // HAS_FILE_STREAMS + +#if wxUSE_VARIANT +IMPLEMENT_VARIANT_OBJECT_EXPORTED_SHALLOWCMP(wxImage,WXDLLEXPORT) +#endif + +//----------------------------------------------------------------------------- +// global data +//----------------------------------------------------------------------------- + +wxList wxImage::sm_handlers; +wxImage wxNullImage; + +//----------------------------------------------------------------------------- +// wxImageRefData +//----------------------------------------------------------------------------- + +class wxImageRefData: public wxObjectRefData +{ +public: + wxImageRefData(); + virtual ~wxImageRefData(); + + int m_width; + int m_height; + wxBitmapType m_type; + unsigned char *m_data; + + bool m_hasMask; + unsigned char m_maskRed,m_maskGreen,m_maskBlue; + + // alpha channel data, may be NULL for the formats without alpha support + unsigned char *m_alpha; + + bool m_ok; + + // if true, m_data is pointer to static data and shouldn't be freed + bool m_static; + + // same as m_static but for m_alpha + bool m_staticAlpha; + +#if wxUSE_PALETTE + wxPalette m_palette; +#endif // wxUSE_PALETTE + + wxArrayString m_optionNames; + wxArrayString m_optionValues; + + wxDECLARE_NO_COPY_CLASS(wxImageRefData); +}; + +wxImageRefData::wxImageRefData() +{ + m_width = 0; + m_height = 0; + m_type = wxBITMAP_TYPE_INVALID; + m_data = + m_alpha = (unsigned char *) NULL; + + m_maskRed = 0; + m_maskGreen = 0; + m_maskBlue = 0; + m_hasMask = false; + + m_ok = false; + m_static = + m_staticAlpha = false; +} + +wxImageRefData::~wxImageRefData() +{ + if ( !m_static ) + free( m_data ); + if ( !m_staticAlpha ) + free( m_alpha ); +} + + +//----------------------------------------------------------------------------- +// wxImage +//----------------------------------------------------------------------------- + +#define M_IMGDATA static_cast(m_refData) + +IMPLEMENT_DYNAMIC_CLASS(wxImage, wxObject) + +bool wxImage::Create(const char* const* xpmData) +{ +#if wxUSE_XPM + UnRef(); + + wxXPMDecoder decoder; + (*this) = decoder.ReadData(xpmData); + return IsOk(); +#else + wxUnusedVar(xpmData); + return false; +#endif +} + +bool wxImage::Create( int width, int height, bool clear ) +{ + UnRef(); + + m_refData = new wxImageRefData(); + + M_IMGDATA->m_data = (unsigned char *) malloc( width*height*3 ); + if (!M_IMGDATA->m_data) + { + UnRef(); + return false; + } + + M_IMGDATA->m_width = width; + M_IMGDATA->m_height = height; + M_IMGDATA->m_ok = true; + + if (clear) + { + Clear(); + } + + return true; +} + +bool wxImage::Create( int width, int height, unsigned char* data, bool static_data ) +{ + UnRef(); + + wxCHECK_MSG( data, false, wxT("NULL data in wxImage::Create") ); + + m_refData = new wxImageRefData(); + + M_IMGDATA->m_data = data; + M_IMGDATA->m_width = width; + M_IMGDATA->m_height = height; + M_IMGDATA->m_ok = true; + M_IMGDATA->m_static = static_data; + + return true; +} + +bool wxImage::Create( int width, int height, unsigned char* data, unsigned char* alpha, bool static_data ) +{ + UnRef(); + + wxCHECK_MSG( data, false, wxT("NULL data in wxImage::Create") ); + + m_refData = new wxImageRefData(); + + M_IMGDATA->m_data = data; + M_IMGDATA->m_alpha = alpha; + M_IMGDATA->m_width = width; + M_IMGDATA->m_height = height; + M_IMGDATA->m_ok = true; + M_IMGDATA->m_static = static_data; + M_IMGDATA->m_staticAlpha = static_data; + + return true; +} + +void wxImage::Destroy() +{ + UnRef(); +} + +void wxImage::Clear(unsigned char value) +{ + memset(M_IMGDATA->m_data, value, M_IMGDATA->m_width*M_IMGDATA->m_height*3); +} + +wxObjectRefData* wxImage::CreateRefData() const +{ + return new wxImageRefData; +} + +wxObjectRefData* wxImage::CloneRefData(const wxObjectRefData* that) const +{ + const wxImageRefData* refData = static_cast(that); + wxCHECK_MSG(refData->m_ok, NULL, wxT("invalid image") ); + + wxImageRefData* refData_new = new wxImageRefData; + refData_new->m_width = refData->m_width; + refData_new->m_height = refData->m_height; + refData_new->m_maskRed = refData->m_maskRed; + refData_new->m_maskGreen = refData->m_maskGreen; + refData_new->m_maskBlue = refData->m_maskBlue; + refData_new->m_hasMask = refData->m_hasMask; + refData_new->m_ok = true; + unsigned size = unsigned(refData->m_width) * unsigned(refData->m_height); + if (refData->m_alpha != NULL) + { + refData_new->m_alpha = (unsigned char*)malloc(size); + memcpy(refData_new->m_alpha, refData->m_alpha, size); + } + size *= 3; + refData_new->m_data = (unsigned char*)malloc(size); + memcpy(refData_new->m_data, refData->m_data, size); +#if wxUSE_PALETTE + refData_new->m_palette = refData->m_palette; +#endif + refData_new->m_optionNames = refData->m_optionNames; + refData_new->m_optionValues = refData->m_optionValues; + return refData_new; +} + +// returns a new image with the same dimensions, alpha, and mask as *this +// if on_its_side is true, width and height are swapped +wxImage wxImage::MakeEmptyClone(int flags) const +{ + wxImage image; + + wxCHECK_MSG( IsOk(), image, wxS("invalid image") ); + + long height = M_IMGDATA->m_height; + long width = M_IMGDATA->m_width; + + if ( flags & Clone_SwapOrientation ) + wxSwap( width, height ); + + if ( !image.Create( width, height, false ) ) + { + wxFAIL_MSG( wxS("unable to create image") ); + return image; + } + + if ( M_IMGDATA->m_alpha ) + { + image.SetAlpha(); + wxCHECK2_MSG( image.GetAlpha(), return wxImage(), + wxS("unable to create alpha channel") ); + } + + if ( M_IMGDATA->m_hasMask ) + { + image.SetMaskColour( M_IMGDATA->m_maskRed, + M_IMGDATA->m_maskGreen, + M_IMGDATA->m_maskBlue ); + } + + return image; +} + +wxImage wxImage::Copy() const +{ + wxImage image; + + wxCHECK_MSG( IsOk(), image, wxT("invalid image") ); + + image.m_refData = CloneRefData(m_refData); + + return image; +} + +wxImage wxImage::ShrinkBy( int xFactor , int yFactor ) const +{ + if( xFactor == 1 && yFactor == 1 ) + return *this; + + wxImage image; + + wxCHECK_MSG( IsOk(), image, wxT("invalid image") ); + + // can't scale to/from 0 size + wxCHECK_MSG( (xFactor > 0) && (yFactor > 0), image, + wxT("invalid new image size") ); + + long old_height = M_IMGDATA->m_height, + old_width = M_IMGDATA->m_width; + + wxCHECK_MSG( (old_height > 0) && (old_width > 0), image, + wxT("invalid old image size") ); + + long width = old_width / xFactor ; + long height = old_height / yFactor ; + + image.Create( width, height, false ); + + char unsigned *data = image.GetData(); + + wxCHECK_MSG( data, image, wxT("unable to create image") ); + + bool hasMask = false ; + unsigned char maskRed = 0; + unsigned char maskGreen = 0; + unsigned char maskBlue = 0 ; + + const unsigned char *source_data = M_IMGDATA->m_data; + unsigned char *target_data = data; + const unsigned char *source_alpha = 0 ; + unsigned char *target_alpha = 0 ; + if (M_IMGDATA->m_hasMask) + { + hasMask = true ; + maskRed = M_IMGDATA->m_maskRed; + maskGreen = M_IMGDATA->m_maskGreen; + maskBlue =M_IMGDATA->m_maskBlue ; + + image.SetMaskColour( M_IMGDATA->m_maskRed, + M_IMGDATA->m_maskGreen, + M_IMGDATA->m_maskBlue ); + } + else + { + source_alpha = M_IMGDATA->m_alpha ; + if ( source_alpha ) + { + image.SetAlpha() ; + target_alpha = image.GetAlpha() ; + } + } + + for (long y = 0; y < height; y++) + { + for (long x = 0; x < width; x++) + { + unsigned long avgRed = 0 ; + unsigned long avgGreen = 0; + unsigned long avgBlue = 0; + unsigned long avgAlpha = 0 ; + unsigned long counter = 0 ; + // determine average + for ( int y1 = 0 ; y1 < yFactor ; ++y1 ) + { + long y_offset = (y * yFactor + y1) * old_width; + for ( int x1 = 0 ; x1 < xFactor ; ++x1 ) + { + const unsigned char *pixel = source_data + 3 * ( y_offset + x * xFactor + x1 ) ; + unsigned char red = pixel[0] ; + unsigned char green = pixel[1] ; + unsigned char blue = pixel[2] ; + unsigned char alpha = 255 ; + if ( source_alpha ) + alpha = *(source_alpha + y_offset + x * xFactor + x1) ; + if ( !hasMask || red != maskRed || green != maskGreen || blue != maskBlue ) + { + if ( alpha > 0 ) + { + avgRed += red ; + avgGreen += green ; + avgBlue += blue ; + } + avgAlpha += alpha ; + counter++ ; + } + } + } + if ( counter == 0 ) + { + *(target_data++) = M_IMGDATA->m_maskRed ; + *(target_data++) = M_IMGDATA->m_maskGreen ; + *(target_data++) = M_IMGDATA->m_maskBlue ; + } + else + { + if ( source_alpha ) + *(target_alpha++) = (unsigned char)(avgAlpha / counter ) ; + *(target_data++) = (unsigned char)(avgRed / counter); + *(target_data++) = (unsigned char)(avgGreen / counter); + *(target_data++) = (unsigned char)(avgBlue / counter); + } + } + } + + // In case this is a cursor, make sure the hotspot is scaled accordingly: + if ( HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X) ) + image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, + (GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_X))/xFactor); + if ( HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y) ) + image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, + (GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_Y))/yFactor); + + return image; +} + +wxImage +wxImage::Scale( int width, int height, wxImageResizeQuality quality ) const +{ + wxImage image; + + wxCHECK_MSG( IsOk(), image, wxT("invalid image") ); + + // can't scale to/from 0 size + wxCHECK_MSG( (width > 0) && (height > 0), image, + wxT("invalid new image size") ); + + long old_height = M_IMGDATA->m_height, + old_width = M_IMGDATA->m_width; + wxCHECK_MSG( (old_height > 0) && (old_width > 0), image, + wxT("invalid old image size") ); + + // If the image's new width and height are the same as the original, no + // need to waste time or CPU cycles + if ( old_width == width && old_height == height ) + return *this; + + // Resample the image using the method as specified. + switch ( quality ) + { + case wxIMAGE_QUALITY_NEAREST: + if ( old_width % width == 0 && old_width >= width && + old_height % height == 0 && old_height >= height ) + { + return ShrinkBy( old_width / width , old_height / height ); + } + + image = ResampleNearest(width, height); + break; + + case wxIMAGE_QUALITY_BILINEAR: + image = ResampleBilinear(width, height); + break; + + case wxIMAGE_QUALITY_BICUBIC: + image = ResampleBicubic(width, height); + break; + + case wxIMAGE_QUALITY_BOX_AVERAGE: + image = ResampleBox(width, height); + break; + + case wxIMAGE_QUALITY_HIGH: + image = width < old_width && height < old_height + ? ResampleBox(width, height) + : ResampleBicubic(width, height); + break; + } + + // If the original image has a mask, apply the mask to the new image + if (M_IMGDATA->m_hasMask) + { + image.SetMaskColour( M_IMGDATA->m_maskRed, + M_IMGDATA->m_maskGreen, + M_IMGDATA->m_maskBlue ); + } + + // In case this is a cursor, make sure the hotspot is scaled accordingly: + if ( HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X) ) + image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, + (GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_X)*width)/old_width); + if ( HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y) ) + image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, + (GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_Y)*height)/old_height); + + return image; +} + +wxImage wxImage::ResampleNearest(int width, int height) const +{ + wxImage image; + image.Create( width, height, false ); + + unsigned char *data = image.GetData(); + + wxCHECK_MSG( data, image, wxT("unable to create image") ); + + const unsigned char *source_data = M_IMGDATA->m_data; + unsigned char *target_data = data; + const unsigned char *source_alpha = 0 ; + unsigned char *target_alpha = 0 ; + + if ( !M_IMGDATA->m_hasMask ) + { + source_alpha = M_IMGDATA->m_alpha ; + if ( source_alpha ) + { + image.SetAlpha() ; + target_alpha = image.GetAlpha() ; + } + } + + long old_height = M_IMGDATA->m_height, + old_width = M_IMGDATA->m_width; + long x_delta = (old_width<<16) / width; + long y_delta = (old_height<<16) / height; + + unsigned char* dest_pixel = target_data; + + long y = 0; + for ( long j = 0; j < height; j++ ) + { + const unsigned char* src_line = &source_data[(y>>16)*old_width*3]; + const unsigned char* src_alpha_line = source_alpha ? &source_alpha[(y>>16)*old_width] : 0 ; + + long x = 0; + for ( long i = 0; i < width; i++ ) + { + const unsigned char* src_pixel = &src_line[(x>>16)*3]; + const unsigned char* src_alpha_pixel = source_alpha ? &src_alpha_line[(x>>16)] : 0 ; + dest_pixel[0] = src_pixel[0]; + dest_pixel[1] = src_pixel[1]; + dest_pixel[2] = src_pixel[2]; + dest_pixel += 3; + if ( source_alpha ) + *(target_alpha++) = *src_alpha_pixel ; + x += x_delta; + } + + y += y_delta; + } + + return image; +} + +namespace +{ + +struct BoxPrecalc +{ + int boxStart; + int boxEnd; +}; + +inline int BoxBetween(int value, int low, int high) +{ + return wxMax(wxMin(value, high), low); +} + +void ResampleBoxPrecalc(wxVector& boxes, int oldDim) +{ + const int newDim = boxes.size(); + const double scale_factor_1 = double(oldDim) / newDim; + const int scale_factor_2 = (int)(scale_factor_1 / 2); + + for ( int dst = 0; dst < newDim; ++dst ) + { + // Source pixel in the Y direction + const int src_p = int(dst * scale_factor_1); + + BoxPrecalc& precalc = boxes[dst]; + precalc.boxStart = BoxBetween(int(src_p - scale_factor_1/2.0 + 1), + 0, oldDim - 1); + precalc.boxEnd = BoxBetween(wxMax(precalc.boxStart + 1, + int(src_p + scale_factor_2)), + 0, oldDim - 1); + } +} + +} // anonymous namespace + +wxImage wxImage::ResampleBox(int width, int height) const +{ + // This function implements a simple pre-blur/box averaging method for + // downsampling that gives reasonably smooth results To scale the image + // down we will need to gather a grid of pixels of the size of the scale + // factor in each direction and then do an averaging of the pixels. + + wxImage ret_image(width, height, false); + + wxVector vPrecalcs(height); + wxVector hPrecalcs(width); + + ResampleBoxPrecalc(vPrecalcs, M_IMGDATA->m_height); + ResampleBoxPrecalc(hPrecalcs, M_IMGDATA->m_width); + + + const unsigned char* src_data = M_IMGDATA->m_data; + const unsigned char* src_alpha = M_IMGDATA->m_alpha; + unsigned char* dst_data = ret_image.GetData(); + unsigned char* dst_alpha = NULL; + + if ( src_alpha ) + { + ret_image.SetAlpha(); + dst_alpha = ret_image.GetAlpha(); + } + + int averaged_pixels, src_pixel_index; + double sum_r, sum_g, sum_b, sum_a; + + for ( int y = 0; y < height; y++ ) // Destination image - Y direction + { + // Source pixel in the Y direction + const BoxPrecalc& vPrecalc = vPrecalcs[y]; + + for ( int x = 0; x < width; x++ ) // Destination image - X direction + { + // Source pixel in the X direction + const BoxPrecalc& hPrecalc = hPrecalcs[x]; + + // Box of pixels to average + averaged_pixels = 0; + sum_r = sum_g = sum_b = sum_a = 0.0; + + for ( int j = vPrecalc.boxStart; j <= vPrecalc.boxEnd; ++j ) + { + for ( int i = hPrecalc.boxStart; i <= hPrecalc.boxEnd; ++i ) + { + // Calculate the actual index in our source pixels + src_pixel_index = j * M_IMGDATA->m_width + i; + + sum_r += src_data[src_pixel_index * 3 + 0]; + sum_g += src_data[src_pixel_index * 3 + 1]; + sum_b += src_data[src_pixel_index * 3 + 2]; + if ( src_alpha ) + sum_a += src_alpha[src_pixel_index]; + + averaged_pixels++; + } + } + + // Calculate the average from the sum and number of averaged pixels + dst_data[0] = (unsigned char)(sum_r / averaged_pixels); + dst_data[1] = (unsigned char)(sum_g / averaged_pixels); + dst_data[2] = (unsigned char)(sum_b / averaged_pixels); + dst_data += 3; + if ( src_alpha ) + *dst_alpha++ = (unsigned char)(sum_a / averaged_pixels); + } + } + + return ret_image; +} + +namespace +{ + +struct BilinearPrecalc +{ + int offset1; + int offset2; + double dd; + double dd1; +}; + +void ResampleBilinearPrecalc(wxVector& precalcs, int oldDim) +{ + const int newDim = precalcs.size(); + const double scale_factor = double(oldDim) / newDim; + const int srcpixmax = oldDim - 1; + + for ( int dsty = 0; dsty < newDim; dsty++ ) + { + // We need to calculate the source pixel to interpolate from - Y-axis + double srcpix = double(dsty) * scale_factor; + double srcpix1 = int(srcpix); + double srcpix2 = srcpix1 == srcpixmax ? srcpix1 : srcpix1 + 1.0; + + BilinearPrecalc& precalc = precalcs[dsty]; + + precalc.dd = srcpix - (int)srcpix; + precalc.dd1 = 1.0 - precalc.dd; + precalc.offset1 = srcpix1 < 0.0 + ? 0 + : srcpix1 > srcpixmax + ? srcpixmax + : (int)srcpix1; + precalc.offset2 = srcpix2 < 0.0 + ? 0 + : srcpix2 > srcpixmax + ? srcpixmax + : (int)srcpix2; + } +} + +} // anonymous namespace + +wxImage wxImage::ResampleBilinear(int width, int height) const +{ + // This function implements a Bilinear algorithm for resampling. + wxImage ret_image(width, height, false); + const unsigned char* src_data = M_IMGDATA->m_data; + const unsigned char* src_alpha = M_IMGDATA->m_alpha; + unsigned char* dst_data = ret_image.GetData(); + unsigned char* dst_alpha = NULL; + + if ( src_alpha ) + { + ret_image.SetAlpha(); + dst_alpha = ret_image.GetAlpha(); + } + + wxVector vPrecalcs(height); + wxVector hPrecalcs(width); + ResampleBilinearPrecalc(vPrecalcs, M_IMGDATA->m_height); + ResampleBilinearPrecalc(hPrecalcs, M_IMGDATA->m_width); + + // initialize alpha values to avoid g++ warnings about possibly + // uninitialized variables + double r1, g1, b1, a1 = 0; + double r2, g2, b2, a2 = 0; + + for ( int dsty = 0; dsty < height; dsty++ ) + { + // We need to calculate the source pixel to interpolate from - Y-axis + const BilinearPrecalc& vPrecalc = vPrecalcs[dsty]; + const int y_offset1 = vPrecalc.offset1; + const int y_offset2 = vPrecalc.offset2; + const double dy = vPrecalc.dd; + const double dy1 = vPrecalc.dd1; + + + for ( int dstx = 0; dstx < width; dstx++ ) + { + // X-axis of pixel to interpolate from + const BilinearPrecalc& hPrecalc = hPrecalcs[dstx]; + + const int x_offset1 = hPrecalc.offset1; + const int x_offset2 = hPrecalc.offset2; + const double dx = hPrecalc.dd; + const double dx1 = hPrecalc.dd1; + + int src_pixel_index00 = y_offset1 * M_IMGDATA->m_width + x_offset1; + int src_pixel_index01 = y_offset1 * M_IMGDATA->m_width + x_offset2; + int src_pixel_index10 = y_offset2 * M_IMGDATA->m_width + x_offset1; + int src_pixel_index11 = y_offset2 * M_IMGDATA->m_width + x_offset2; + + // first line + r1 = src_data[src_pixel_index00 * 3 + 0] * dx1 + src_data[src_pixel_index01 * 3 + 0] * dx; + g1 = src_data[src_pixel_index00 * 3 + 1] * dx1 + src_data[src_pixel_index01 * 3 + 1] * dx; + b1 = src_data[src_pixel_index00 * 3 + 2] * dx1 + src_data[src_pixel_index01 * 3 + 2] * dx; + if ( src_alpha ) + a1 = src_alpha[src_pixel_index00] * dx1 + src_alpha[src_pixel_index01] * dx; + + // second line + r2 = src_data[src_pixel_index10 * 3 + 0] * dx1 + src_data[src_pixel_index11 * 3 + 0] * dx; + g2 = src_data[src_pixel_index10 * 3 + 1] * dx1 + src_data[src_pixel_index11 * 3 + 1] * dx; + b2 = src_data[src_pixel_index10 * 3 + 2] * dx1 + src_data[src_pixel_index11 * 3 + 2] * dx; + if ( src_alpha ) + a2 = src_alpha[src_pixel_index10] * dx1 + src_alpha[src_pixel_index11] * dx; + + // result lines + + dst_data[0] = static_cast(r1 * dy1 + r2 * dy); + dst_data[1] = static_cast(g1 * dy1 + g2 * dy); + dst_data[2] = static_cast(b1 * dy1 + b2 * dy); + dst_data += 3; + + if ( src_alpha ) + *dst_alpha++ = static_cast(a1 * dy1 + a2 * dy); + } + } + + return ret_image; +} + +// The following two local functions are for the B-spline weighting of the +// bicubic sampling algorithm +static inline double spline_cube(double value) +{ + return value <= 0.0 ? 0.0 : value * value * value; +} + +static inline double spline_weight(double value) +{ + return (spline_cube(value + 2) - + 4 * spline_cube(value + 1) + + 6 * spline_cube(value) - + 4 * spline_cube(value - 1)) / 6; +} + + +namespace +{ + +struct BicubicPrecalc +{ + double weight[4]; + int offset[4]; +}; + +void ResampleBicubicPrecalc(wxVector &aWeight, int oldDim) +{ + const int newDim = aWeight.size(); + for ( int dstd = 0; dstd < newDim; dstd++ ) + { + // We need to calculate the source pixel to interpolate from - Y-axis + const double srcpixd = static_cast(dstd * oldDim) / newDim; + const double dd = srcpixd - static_cast(srcpixd); + + BicubicPrecalc &precalc = aWeight[dstd]; + + for ( int k = -1; k <= 2; k++ ) + { + precalc.offset[k + 1] = srcpixd + k < 0.0 + ? 0 + : srcpixd + k >= oldDim + ? oldDim - 1 + : static_cast(srcpixd + k); + + precalc.weight[k + 1] = spline_weight(k - dd); + } + } +} + +} // anonymous namespace + +// This is the bicubic resampling algorithm +wxImage wxImage::ResampleBicubic(int width, int height) const +{ + // This function implements a Bicubic B-Spline algorithm for resampling. + // This method is certainly a little slower than wxImage's default pixel + // replication method, however for most reasonably sized images not being + // upsampled too much on a fairly average CPU this difference is hardly + // noticeable and the results are far more pleasing to look at. + // + // This particular bicubic algorithm does pixel weighting according to a + // B-Spline that basically implements a Gaussian bell-like weighting + // kernel. Because of this method the results may appear a bit blurry when + // upsampling by large factors. This is basically because a slight + // gaussian blur is being performed to get the smooth look of the upsampled + // image. + + // Edge pixels: 3-4 possible solutions + // - (Wrap/tile) Wrap the image, take the color value from the opposite + // side of the image. + // - (Mirror) Duplicate edge pixels, so that pixel at coordinate (2, n), + // where n is nonpositive, will have the value of (2, 1). + // - (Ignore) Simply ignore the edge pixels and apply the kernel only to + // pixels which do have all neighbours. + // - (Clamp) Choose the nearest pixel along the border. This takes the + // border pixels and extends them out to infinity. + // + // NOTE: below the y_offset and x_offset variables are being set for edge + // pixels using the "Mirror" method mentioned above + + wxImage ret_image; + + ret_image.Create(width, height, false); + + const unsigned char* src_data = M_IMGDATA->m_data; + const unsigned char* src_alpha = M_IMGDATA->m_alpha; + unsigned char* dst_data = ret_image.GetData(); + unsigned char* dst_alpha = NULL; + + if ( src_alpha ) + { + ret_image.SetAlpha(); + dst_alpha = ret_image.GetAlpha(); + } + + // Precalculate weights + wxVector vPrecalcs(height); + wxVector hPrecalcs(width); + + ResampleBicubicPrecalc(vPrecalcs, M_IMGDATA->m_height); + ResampleBicubicPrecalc(hPrecalcs, M_IMGDATA->m_width); + + for ( int dsty = 0; dsty < height; dsty++ ) + { + // We need to calculate the source pixel to interpolate from - Y-axis + const BicubicPrecalc& vPrecalc = vPrecalcs[dsty]; + + for ( int dstx = 0; dstx < width; dstx++ ) + { + // X-axis of pixel to interpolate from + const BicubicPrecalc& hPrecalc = hPrecalcs[dstx]; + + // Sums for each color channel + double sum_r = 0, sum_g = 0, sum_b = 0, sum_a = 0; + + // Here we actually determine the RGBA values for the destination pixel + for ( int k = -1; k <= 2; k++ ) + { + // Y offset + const int y_offset = vPrecalc.offset[k + 1]; + + // Loop across the X axis + for ( int i = -1; i <= 2; i++ ) + { + // X offset + const int x_offset = hPrecalc.offset[i + 1]; + + // Calculate the exact position where the source data + // should be pulled from based on the x_offset and y_offset + int src_pixel_index = y_offset*M_IMGDATA->m_width + x_offset; + + // Calculate the weight for the specified pixel according + // to the bicubic b-spline kernel we're using for + // interpolation + const double + pixel_weight = vPrecalc.weight[k + 1] * hPrecalc.weight[i + 1]; + + // Create a sum of all velues for each color channel + // adjusted for the pixel's calculated weight + sum_r += src_data[src_pixel_index * 3 + 0] * pixel_weight; + sum_g += src_data[src_pixel_index * 3 + 1] * pixel_weight; + sum_b += src_data[src_pixel_index * 3 + 2] * pixel_weight; + if ( src_alpha ) + sum_a += src_alpha[src_pixel_index] * pixel_weight; + } + } + + // Put the data into the destination image. The summed values are + // of double data type and are rounded here for accuracy + dst_data[0] = (unsigned char)(sum_r + 0.5); + dst_data[1] = (unsigned char)(sum_g + 0.5); + dst_data[2] = (unsigned char)(sum_b + 0.5); + dst_data += 3; + + if ( src_alpha ) + *dst_alpha++ = (unsigned char)sum_a; + } + } + + return ret_image; +} + +// Blur in the horizontal direction +wxImage wxImage::BlurHorizontal(int blurRadius) const +{ + wxImage ret_image(MakeEmptyClone()); + + wxCHECK( ret_image.IsOk(), ret_image ); + + const unsigned char* src_data = M_IMGDATA->m_data; + unsigned char* dst_data = ret_image.GetData(); + const unsigned char* src_alpha = M_IMGDATA->m_alpha; + unsigned char* dst_alpha = ret_image.GetAlpha(); + + // number of pixels we average over + const int blurArea = blurRadius*2 + 1; + + // Horizontal blurring algorithm - average all pixels in the specified blur + // radius in the X or horizontal direction + for ( int y = 0; y < M_IMGDATA->m_height; y++ ) + { + // Variables used in the blurring algorithm + long sum_r = 0, + sum_g = 0, + sum_b = 0, + sum_a = 0; + + long pixel_idx; + const unsigned char *src; + unsigned char *dst; + + // Calculate the average of all pixels in the blur radius for the first + // pixel of the row + for ( int kernel_x = -blurRadius; kernel_x <= blurRadius; kernel_x++ ) + { + // To deal with the pixels at the start of a row so it's not + // grabbing GOK values from memory at negative indices of the + // image's data or grabbing from the previous row + if ( kernel_x < 0 ) + pixel_idx = y * M_IMGDATA->m_width; + else + pixel_idx = kernel_x + y * M_IMGDATA->m_width; + + src = src_data + pixel_idx*3; + sum_r += src[0]; + sum_g += src[1]; + sum_b += src[2]; + if ( src_alpha ) + sum_a += src_alpha[pixel_idx]; + } + + dst = dst_data + y * M_IMGDATA->m_width*3; + dst[0] = (unsigned char)(sum_r / blurArea); + dst[1] = (unsigned char)(sum_g / blurArea); + dst[2] = (unsigned char)(sum_b / blurArea); + if ( src_alpha ) + dst_alpha[y * M_IMGDATA->m_width] = (unsigned char)(sum_a / blurArea); + + // Now average the values of the rest of the pixels by just moving the + // blur radius box along the row + for ( int x = 1; x < M_IMGDATA->m_width; x++ ) + { + // Take care of edge pixels on the left edge by essentially + // duplicating the edge pixel + if ( x - blurRadius - 1 < 0 ) + pixel_idx = y * M_IMGDATA->m_width; + else + pixel_idx = (x - blurRadius - 1) + y * M_IMGDATA->m_width; + + // Subtract the value of the pixel at the left side of the blur + // radius box + src = src_data + pixel_idx*3; + sum_r -= src[0]; + sum_g -= src[1]; + sum_b -= src[2]; + if ( src_alpha ) + sum_a -= src_alpha[pixel_idx]; + + // Take care of edge pixels on the right edge + if ( x + blurRadius > M_IMGDATA->m_width - 1 ) + pixel_idx = M_IMGDATA->m_width - 1 + y * M_IMGDATA->m_width; + else + pixel_idx = x + blurRadius + y * M_IMGDATA->m_width; + + // Add the value of the pixel being added to the end of our box + src = src_data + pixel_idx*3; + sum_r += src[0]; + sum_g += src[1]; + sum_b += src[2]; + if ( src_alpha ) + sum_a += src_alpha[pixel_idx]; + + // Save off the averaged data + dst = dst_data + x*3 + y*M_IMGDATA->m_width*3; + dst[0] = (unsigned char)(sum_r / blurArea); + dst[1] = (unsigned char)(sum_g / blurArea); + dst[2] = (unsigned char)(sum_b / blurArea); + if ( src_alpha ) + dst_alpha[x + y * M_IMGDATA->m_width] = (unsigned char)(sum_a / blurArea); + } + } + + return ret_image; +} + +// Blur in the vertical direction +wxImage wxImage::BlurVertical(int blurRadius) const +{ + wxImage ret_image(MakeEmptyClone()); + + wxCHECK( ret_image.IsOk(), ret_image ); + + const unsigned char* src_data = M_IMGDATA->m_data; + unsigned char* dst_data = ret_image.GetData(); + const unsigned char* src_alpha = M_IMGDATA->m_alpha; + unsigned char* dst_alpha = ret_image.GetAlpha(); + + // number of pixels we average over + const int blurArea = blurRadius*2 + 1; + + // Vertical blurring algorithm - same as horizontal but switched the + // opposite direction + for ( int x = 0; x < M_IMGDATA->m_width; x++ ) + { + // Variables used in the blurring algorithm + long sum_r = 0, + sum_g = 0, + sum_b = 0, + sum_a = 0; + + long pixel_idx; + const unsigned char *src; + unsigned char *dst; + + // Calculate the average of all pixels in our blur radius box for the + // first pixel of the column + for ( int kernel_y = -blurRadius; kernel_y <= blurRadius; kernel_y++ ) + { + // To deal with the pixels at the start of a column so it's not + // grabbing GOK values from memory at negative indices of the + // image's data or grabbing from the previous column + if ( kernel_y < 0 ) + pixel_idx = x; + else + pixel_idx = x + kernel_y * M_IMGDATA->m_width; + + src = src_data + pixel_idx*3; + sum_r += src[0]; + sum_g += src[1]; + sum_b += src[2]; + if ( src_alpha ) + sum_a += src_alpha[pixel_idx]; + } + + dst = dst_data + x*3; + dst[0] = (unsigned char)(sum_r / blurArea); + dst[1] = (unsigned char)(sum_g / blurArea); + dst[2] = (unsigned char)(sum_b / blurArea); + if ( src_alpha ) + dst_alpha[x] = (unsigned char)(sum_a / blurArea); + + // Now average the values of the rest of the pixels by just moving the + // box along the column from top to bottom + for ( int y = 1; y < M_IMGDATA->m_height; y++ ) + { + // Take care of pixels that would be beyond the top edge by + // duplicating the top edge pixel for the column + if ( y - blurRadius - 1 < 0 ) + pixel_idx = x; + else + pixel_idx = x + (y - blurRadius - 1) * M_IMGDATA->m_width; + + // Subtract the value of the pixel at the top of our blur radius box + src = src_data + pixel_idx*3; + sum_r -= src[0]; + sum_g -= src[1]; + sum_b -= src[2]; + if ( src_alpha ) + sum_a -= src_alpha[pixel_idx]; + + // Take care of the pixels that would be beyond the bottom edge of + // the image similar to the top edge + if ( y + blurRadius > M_IMGDATA->m_height - 1 ) + pixel_idx = x + (M_IMGDATA->m_height - 1) * M_IMGDATA->m_width; + else + pixel_idx = x + (blurRadius + y) * M_IMGDATA->m_width; + + // Add the value of the pixel being added to the end of our box + src = src_data + pixel_idx*3; + sum_r += src[0]; + sum_g += src[1]; + sum_b += src[2]; + if ( src_alpha ) + sum_a += src_alpha[pixel_idx]; + + // Save off the averaged data + dst = dst_data + (x + y * M_IMGDATA->m_width) * 3; + dst[0] = (unsigned char)(sum_r / blurArea); + dst[1] = (unsigned char)(sum_g / blurArea); + dst[2] = (unsigned char)(sum_b / blurArea); + if ( src_alpha ) + dst_alpha[x + y * M_IMGDATA->m_width] = (unsigned char)(sum_a / blurArea); + } + } + + return ret_image; +} + +// The new blur function +wxImage wxImage::Blur(int blurRadius) const +{ + wxImage ret_image; + ret_image.Create(M_IMGDATA->m_width, M_IMGDATA->m_height, false); + + // Blur the image in each direction + ret_image = BlurHorizontal(blurRadius); + ret_image = ret_image.BlurVertical(blurRadius); + + return ret_image; +} + +wxImage wxImage::Rotate90( bool clockwise ) const +{ + wxImage image(MakeEmptyClone(Clone_SwapOrientation)); + + wxCHECK( image.IsOk(), image ); + + long height = M_IMGDATA->m_height; + long width = M_IMGDATA->m_width; + + if ( HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X) ) + { + int hot_x = GetOptionInt( wxIMAGE_OPTION_CUR_HOTSPOT_X ); + image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, + clockwise ? hot_x : width - 1 - hot_x); + } + + if ( HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y) ) + { + int hot_y = GetOptionInt( wxIMAGE_OPTION_CUR_HOTSPOT_Y ); + image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, + clockwise ? height - 1 - hot_y : hot_y); + } + + unsigned char *data = image.GetData(); + unsigned char *target_data; + + // we rotate the image in 21-pixel (63-byte) wide strips + // to make better use of cpu cache - memory transfers + // (note: while much better than single-pixel "strips", + // our vertical strips will still generally straddle 64-byte cachelines) + for (long ii = 0; ii < width; ) + { + long next_ii = wxMin(ii + 21, width); + + for (long j = 0; j < height; j++) + { + const unsigned char *source_data + = M_IMGDATA->m_data + (j*width + ii)*3; + + for (long i = ii; i < next_ii; i++) + { + if ( clockwise ) + { + target_data = data + ((i + 1)*height - j - 1)*3; + } + else + { + target_data = data + (height*(width - 1 - i) + j)*3; + } + memcpy( target_data, source_data, 3 ); + source_data += 3; + } + } + + ii = next_ii; + } + + const unsigned char *source_alpha = M_IMGDATA->m_alpha; + + if ( source_alpha ) + { + unsigned char *alpha_data = image.GetAlpha(); + unsigned char *target_alpha = 0 ; + + for (long ii = 0; ii < width; ) + { + long next_ii = wxMin(ii + 64, width); + + for (long j = 0; j < height; j++) + { + source_alpha = M_IMGDATA->m_alpha + j*width + ii; + + for (long i = ii; i < next_ii; i++) + { + if ( clockwise ) + { + target_alpha = alpha_data + (i+1)*height - j - 1; + } + else + { + target_alpha = alpha_data + height*(width - i - 1) + j; + } + + *target_alpha = *source_alpha++; + } + } + + ii = next_ii; + } + } + + return image; +} + +wxImage wxImage::Rotate180() const +{ + wxImage image(MakeEmptyClone()); + + wxCHECK( image.IsOk(), image ); + + long height = M_IMGDATA->m_height; + long width = M_IMGDATA->m_width; + + if ( HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X) ) + { + image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, + width - 1 - GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_X)); + } + + if ( HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y) ) + { + image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, + height - 1 - GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_Y)); + } + + unsigned char *data = image.GetData(); + unsigned char *alpha = image.GetAlpha(); + const unsigned char *source_data = M_IMGDATA->m_data; + unsigned char *target_data = data + width * height * 3; + + for (long j = 0; j < height; j++) + { + for (long i = 0; i < width; i++) + { + target_data -= 3; + memcpy( target_data, source_data, 3 ); + source_data += 3; + } + } + + if ( alpha ) + { + const unsigned char *src_alpha = M_IMGDATA->m_alpha; + unsigned char *dest_alpha = alpha + width * height; + + for (long j = 0; j < height; ++j) + { + for (long i = 0; i < width; ++i) + { + *(--dest_alpha) = *(src_alpha++); + } + } + } + + return image; +} + +wxImage wxImage::Mirror( bool horizontally ) const +{ + wxImage image(MakeEmptyClone()); + + wxCHECK( image.IsOk(), image ); + + long height = M_IMGDATA->m_height; + long width = M_IMGDATA->m_width; + + unsigned char *data = image.GetData(); + unsigned char *alpha = image.GetAlpha(); + const unsigned char *source_data = M_IMGDATA->m_data; + unsigned char *target_data; + + if (horizontally) + { + for (long j = 0; j < height; j++) + { + data += width*3; + target_data = data-3; + for (long i = 0; i < width; i++) + { + memcpy( target_data, source_data, 3 ); + source_data += 3; + target_data -= 3; + } + } + + if (alpha != NULL) + { + // src_alpha starts at the first pixel and increases by 1 after each step + // (a step here is the copy of the alpha value of one pixel) + const unsigned char *src_alpha = M_IMGDATA->m_alpha; + // dest_alpha starts just beyond the first line, decreases before each step, + // and after each line is finished, increases by 2 widths (skipping the line + // just copied and the line that will be copied next) + unsigned char *dest_alpha = alpha + width; + + for (long jj = 0; jj < height; ++jj) + { + for (long i = 0; i < width; ++i) { + *(--dest_alpha) = *(src_alpha++); // copy one pixel + } + dest_alpha += 2 * width; // advance beyond the end of the next line + } + } + } + else + { + for (long i = 0; i < height; i++) + { + target_data = data + 3*width*(height-1-i); + memcpy( target_data, source_data, (size_t)3*width ); + source_data += 3*width; + } + + if ( alpha ) + { + // src_alpha starts at the first pixel and increases by 1 width after each step + // (a step here is the copy of the alpha channel of an entire line) + const unsigned char *src_alpha = M_IMGDATA->m_alpha; + // dest_alpha starts just beyond the last line (beyond the whole image) + // and decreases by 1 width before each step + unsigned char *dest_alpha = alpha + width * height; + + for (long jj = 0; jj < height; ++jj) + { + dest_alpha -= width; + memcpy( dest_alpha, src_alpha, (size_t)width ); + src_alpha += width; + } + } + } + + return image; +} + +wxImage wxImage::GetSubImage( const wxRect &rect ) const +{ + wxImage image; + + wxCHECK_MSG( IsOk(), image, wxT("invalid image") ); + + wxCHECK_MSG( (rect.GetLeft()>=0) && (rect.GetTop()>=0) && + (rect.GetRight()<=GetWidth()) && (rect.GetBottom()<=GetHeight()), + image, wxT("invalid subimage size") ); + + const int subwidth = rect.GetWidth(); + const int subheight = rect.GetHeight(); + + image.Create( subwidth, subheight, false ); + + const unsigned char *src_data = GetData(); + const unsigned char *src_alpha = M_IMGDATA->m_alpha; + unsigned char *subdata = image.GetData(); + unsigned char *subalpha = NULL; + + wxCHECK_MSG( subdata, image, wxT("unable to create image") ); + + if ( src_alpha ) { + image.SetAlpha(); + subalpha = image.GetAlpha(); + wxCHECK_MSG( subalpha, image, wxT("unable to create alpha channel")); + } + + if (M_IMGDATA->m_hasMask) + image.SetMaskColour( M_IMGDATA->m_maskRed, M_IMGDATA->m_maskGreen, M_IMGDATA->m_maskBlue ); + + const int width = GetWidth(); + const int pixsoff = rect.GetLeft() + width * rect.GetTop(); + + src_data += 3 * pixsoff; + src_alpha += pixsoff; // won't be used if was NULL, so this is ok + + for (long j = 0; j < subheight; ++j) + { + memcpy( subdata, src_data, 3 * subwidth ); + subdata += 3 * subwidth; + src_data += 3 * width; + if (subalpha != NULL) { + memcpy( subalpha, src_alpha, subwidth ); + subalpha += subwidth; + src_alpha += width; + } + } + + return image; +} + +wxImage wxImage::Size( const wxSize& size, const wxPoint& pos, + int r_, int g_, int b_ ) const +{ + wxImage image; + + wxCHECK_MSG( IsOk(), image, wxT("invalid image") ); + wxCHECK_MSG( (size.GetWidth() > 0) && (size.GetHeight() > 0), image, wxT("invalid size") ); + + int width = GetWidth(), height = GetHeight(); + image.Create(size.GetWidth(), size.GetHeight(), false); + + unsigned char r = (unsigned char)r_; + unsigned char g = (unsigned char)g_; + unsigned char b = (unsigned char)b_; + if ((r_ == -1) && (g_ == -1) && (b_ == -1)) + { + GetOrFindMaskColour( &r, &g, &b ); + image.SetMaskColour(r, g, b); + } + + image.SetRGB(wxRect(), r, g, b); + + // we have two coordinate systems: + // source: starting at 0,0 of source image + // destination starting at 0,0 of destination image + // Documentation says: + // "The image is pasted into a new image [...] at the position pos relative + // to the upper left of the new image." this means the transition rule is: + // "dest coord" = "source coord" + pos; + + // calculate the intersection using source coordinates: + wxRect srcRect(0, 0, width, height); + wxRect dstRect(-pos, size); + + srcRect.Intersect(dstRect); + + if (!srcRect.IsEmpty()) + { + // insertion point is needed in destination coordinates. + // NB: it is not always "pos"! + wxPoint ptInsert = srcRect.GetTopLeft() + pos; + + if ((srcRect.GetWidth() == width) && (srcRect.GetHeight() == height)) + image.Paste(*this, ptInsert.x, ptInsert.y); + else + image.Paste(GetSubImage(srcRect), ptInsert.x, ptInsert.y); + } + + return image; +} + +void wxImage::Paste( const wxImage &image, int x, int y ) +{ + wxCHECK_RET( IsOk(), wxT("invalid image") ); + wxCHECK_RET( image.IsOk(), wxT("invalid image") ); + + AllocExclusive(); + + int xx = 0; + int yy = 0; + int width = image.GetWidth(); + int height = image.GetHeight(); + + if (x < 0) + { + xx = -x; + width += x; + } + if (y < 0) + { + yy = -y; + height += y; + } + + if ((x+xx)+width > M_IMGDATA->m_width) + width = M_IMGDATA->m_width - (x+xx); + if ((y+yy)+height > M_IMGDATA->m_height) + height = M_IMGDATA->m_height - (y+yy); + + if (width < 1) return; + if (height < 1) return; + + // If we can, copy the data using memcpy() as this is the fastest way. But + // for this the image being pasted must have "compatible" mask with this + // one meaning that either it must not have one at all or it must use the + // same masked colour. + if ( !image.HasMask() || + ((HasMask() && + (GetMaskRed()==image.GetMaskRed()) && + (GetMaskGreen()==image.GetMaskGreen()) && + (GetMaskBlue()==image.GetMaskBlue()))) ) + { + const unsigned char* source_data = image.GetData() + 3*(xx + yy*image.GetWidth()); + int source_step = image.GetWidth()*3; + + unsigned char* target_data = GetData() + 3*((x+xx) + (y+yy)*M_IMGDATA->m_width); + int target_step = M_IMGDATA->m_width*3; + for (int j = 0; j < height; j++) + { + memcpy( target_data, source_data, width*3 ); + source_data += source_step; + target_data += target_step; + } + } + + // Copy over the alpha channel from the original image + if ( image.HasAlpha() ) + { + if ( !HasAlpha() ) + InitAlpha(); + + const unsigned char* source_data = image.GetAlpha() + xx + yy*image.GetWidth(); + int source_step = image.GetWidth(); + + unsigned char* target_data = GetAlpha() + (x+xx) + (y+yy)*M_IMGDATA->m_width; + int target_step = M_IMGDATA->m_width; + + for (int j = 0; j < height; j++, + source_data += source_step, + target_data += target_step) + { + memcpy( target_data, source_data, width ); + } + } + + if (!HasMask() && image.HasMask()) + { + unsigned char r = image.GetMaskRed(); + unsigned char g = image.GetMaskGreen(); + unsigned char b = image.GetMaskBlue(); + + const unsigned char* source_data = image.GetData() + 3*(xx + yy*image.GetWidth()); + int source_step = image.GetWidth()*3; + + unsigned char* target_data = GetData() + 3*((x+xx) + (y+yy)*M_IMGDATA->m_width); + int target_step = M_IMGDATA->m_width*3; + + for (int j = 0; j < height; j++) + { + for (int i = 0; i < width*3; i+=3) + { + if ((source_data[i] != r) || + (source_data[i+1] != g) || + (source_data[i+2] != b)) + { + memcpy( target_data+i, source_data+i, 3 ); + } + } + source_data += source_step; + target_data += target_step; + } + } +} + +void wxImage::Replace( unsigned char r1, unsigned char g1, unsigned char b1, + unsigned char r2, unsigned char g2, unsigned char b2 ) +{ + wxCHECK_RET( IsOk(), wxT("invalid image") ); + + AllocExclusive(); + + unsigned char *data = GetData(); + + const int w = GetWidth(); + const int h = GetHeight(); + + for (int j = 0; j < h; j++) + for (int i = 0; i < w; i++) + { + if ((data[0] == r1) && (data[1] == g1) && (data[2] == b1)) + { + data[0] = r2; + data[1] = g2; + data[2] = b2; + } + data += 3; + } +} + +wxImage wxImage::ConvertToGreyscale(void) const +{ + return ConvertToGreyscale(0.299, 0.587, 0.114); +} + +wxImage wxImage::ConvertToGreyscale(double weight_r, double weight_g, double weight_b) const +{ + wxImage image; + wxCHECK_MSG(IsOk(), image, "invalid image"); + + const int w = M_IMGDATA->m_width; + const int h = M_IMGDATA->m_height; + size_t size = size_t(w) * h; + image.Create(w, h, false); + const unsigned char* alpha = M_IMGDATA->m_alpha; + if (alpha) + { + image.SetAlpha(); + memcpy(image.GetAlpha(), alpha, size); + } + const unsigned char mask_r = M_IMGDATA->m_maskRed; + const unsigned char mask_g = M_IMGDATA->m_maskGreen; + const unsigned char mask_b = M_IMGDATA->m_maskBlue; + const bool hasMask = M_IMGDATA->m_hasMask; + if (hasMask) + image.SetMaskColour(mask_r, mask_g, mask_b); + + const unsigned char* src = M_IMGDATA->m_data; + unsigned char* dst = image.GetData(); + while (size--) + { + unsigned char r = *src++; + unsigned char g = *src++; + unsigned char b = *src++; + if (!hasMask || r != mask_r || g != mask_g || b != mask_b) + wxColour::MakeGrey(&r, &g, &b, weight_r, weight_g, weight_b); + *dst++ = r; + *dst++ = g; + *dst++ = b; + } + return image; +} + +wxImage wxImage::ConvertToMono( unsigned char r, unsigned char g, unsigned char b ) const +{ + wxImage image; + + wxCHECK_MSG( IsOk(), image, wxT("invalid image") ); + + image.Create( M_IMGDATA->m_width, M_IMGDATA->m_height, false ); + + unsigned char *data = image.GetData(); + + wxCHECK_MSG( data, image, wxT("unable to create image") ); + + if (M_IMGDATA->m_hasMask) + { + if (M_IMGDATA->m_maskRed == r && M_IMGDATA->m_maskGreen == g && + M_IMGDATA->m_maskBlue == b) + image.SetMaskColour( 255, 255, 255 ); + else + image.SetMaskColour( 0, 0, 0 ); + } + + long size = M_IMGDATA->m_height * M_IMGDATA->m_width; + + unsigned char *srcd = M_IMGDATA->m_data; + unsigned char *tard = image.GetData(); + + for ( long i = 0; i < size; i++, srcd += 3, tard += 3 ) + { + bool on = (srcd[0] == r) && (srcd[1] == g) && (srcd[2] == b); + wxColourBase::MakeMono(tard + 0, tard + 1, tard + 2, on); + } + + return image; +} + +wxImage wxImage::ConvertToDisabled(unsigned char brightness) const +{ + wxImage image; + wxCHECK_MSG(IsOk(), image, "invalid image"); + + const int w = M_IMGDATA->m_width; + const int h = M_IMGDATA->m_height; + size_t size = size_t(w) * h; + image.Create(w, h, false); + const unsigned char* alpha = M_IMGDATA->m_alpha; + if (alpha) + { + image.SetAlpha(); + memcpy(image.GetAlpha(), alpha, size); + } + const unsigned char mask_r = M_IMGDATA->m_maskRed; + const unsigned char mask_g = M_IMGDATA->m_maskGreen; + const unsigned char mask_b = M_IMGDATA->m_maskBlue; + const bool hasMask = M_IMGDATA->m_hasMask; + if (hasMask) + image.SetMaskColour(mask_r, mask_g, mask_b); + + const unsigned char* src = M_IMGDATA->m_data; + unsigned char* dst = image.GetData(); + while (size--) + { + unsigned char r = *src++; + unsigned char g = *src++; + unsigned char b = *src++; + if (!hasMask || r != mask_r || g != mask_g || b != mask_b) + wxColour::MakeDisabled(&r, &g, &b, brightness); + *dst++ = r; + *dst++ = g; + *dst++ = b; + } + return image; +} + +int wxImage::GetWidth() const +{ + wxCHECK_MSG( IsOk(), 0, wxT("invalid image") ); + + return M_IMGDATA->m_width; +} + +int wxImage::GetHeight() const +{ + wxCHECK_MSG( IsOk(), 0, wxT("invalid image") ); + + return M_IMGDATA->m_height; +} + +wxBitmapType wxImage::GetType() const +{ + wxCHECK_MSG( IsOk(), wxBITMAP_TYPE_INVALID, wxT("invalid image") ); + + return M_IMGDATA->m_type; +} + +void wxImage::SetType(wxBitmapType type) +{ + wxCHECK_RET( IsOk(), "must create the image before setting its type"); + + // type can be wxBITMAP_TYPE_INVALID to reset the image type to default + wxASSERT_MSG( type != wxBITMAP_TYPE_MAX, "invalid bitmap type" ); + + M_IMGDATA->m_type = type; +} + +long wxImage::XYToIndex(int x, int y) const +{ + if ( IsOk() && + x >= 0 && y >= 0 && + x < M_IMGDATA->m_width && y < M_IMGDATA->m_height ) + { + return y*M_IMGDATA->m_width + x; + } + + return -1; +} + +void wxImage::SetRGB( int x, int y, unsigned char r, unsigned char g, unsigned char b ) +{ + long pos = XYToIndex(x, y); + wxCHECK_RET( pos != -1, wxT("invalid image coordinates") ); + + AllocExclusive(); + + pos *= 3; + + M_IMGDATA->m_data[ pos ] = r; + M_IMGDATA->m_data[ pos+1 ] = g; + M_IMGDATA->m_data[ pos+2 ] = b; +} + +void wxImage::SetRGB( const wxRect& rect_, unsigned char r, unsigned char g, unsigned char b ) +{ + wxCHECK_RET( IsOk(), wxT("invalid image") ); + + AllocExclusive(); + + wxRect rect(rect_); + wxRect imageRect(0, 0, GetWidth(), GetHeight()); + if ( rect == wxRect() ) + { + rect = imageRect; + } + else + { + wxCHECK_RET( imageRect.Contains(rect.GetTopLeft()) && + imageRect.Contains(rect.GetBottomRight()), + wxT("invalid bounding rectangle") ); + } + + int x1 = rect.GetLeft(), + y1 = rect.GetTop(), + x2 = rect.GetRight() + 1, + y2 = rect.GetBottom() + 1; + + unsigned char *data wxDUMMY_INITIALIZE(NULL); + int x, y, width = GetWidth(); + for (y = y1; y < y2; y++) + { + data = M_IMGDATA->m_data + (y*width + x1)*3; + for (x = x1; x < x2; x++) + { + *data++ = r; + *data++ = g; + *data++ = b; + } + } +} + +unsigned char wxImage::GetRed( int x, int y ) const +{ + long pos = XYToIndex(x, y); + wxCHECK_MSG( pos != -1, 0, wxT("invalid image coordinates") ); + + pos *= 3; + + return M_IMGDATA->m_data[pos]; +} + +unsigned char wxImage::GetGreen( int x, int y ) const +{ + long pos = XYToIndex(x, y); + wxCHECK_MSG( pos != -1, 0, wxT("invalid image coordinates") ); + + pos *= 3; + + return M_IMGDATA->m_data[pos+1]; +} + +unsigned char wxImage::GetBlue( int x, int y ) const +{ + long pos = XYToIndex(x, y); + wxCHECK_MSG( pos != -1, 0, wxT("invalid image coordinates") ); + + pos *= 3; + + return M_IMGDATA->m_data[pos+2]; +} + +bool wxImage::IsOk() const +{ + // image of 0 width or height can't be considered ok - at least because it + // causes crashes in ConvertToBitmap() if we don't catch it in time + wxImageRefData *data = M_IMGDATA; + return data && data->m_ok && data->m_width && data->m_height; +} + +unsigned char *wxImage::GetData() const +{ + wxCHECK_MSG( IsOk(), (unsigned char *)NULL, wxT("invalid image") ); + + return M_IMGDATA->m_data; +} + +void wxImage::SetData( unsigned char *data, bool static_data ) +{ + wxCHECK_RET( IsOk(), wxT("invalid image") ); + + wxImageRefData *newRefData = new wxImageRefData(); + + newRefData->m_width = M_IMGDATA->m_width; + newRefData->m_height = M_IMGDATA->m_height; + newRefData->m_data = data; + newRefData->m_ok = true; + newRefData->m_maskRed = M_IMGDATA->m_maskRed; + newRefData->m_maskGreen = M_IMGDATA->m_maskGreen; + newRefData->m_maskBlue = M_IMGDATA->m_maskBlue; + newRefData->m_hasMask = M_IMGDATA->m_hasMask; + newRefData->m_static = static_data; + + UnRef(); + + m_refData = newRefData; +} + +void wxImage::SetData( unsigned char *data, int new_width, int new_height, bool static_data ) +{ + wxImageRefData *newRefData = new wxImageRefData(); + + if (m_refData) + { + newRefData->m_width = new_width; + newRefData->m_height = new_height; + newRefData->m_data = data; + newRefData->m_ok = true; + newRefData->m_maskRed = M_IMGDATA->m_maskRed; + newRefData->m_maskGreen = M_IMGDATA->m_maskGreen; + newRefData->m_maskBlue = M_IMGDATA->m_maskBlue; + newRefData->m_hasMask = M_IMGDATA->m_hasMask; + } + else + { + newRefData->m_width = new_width; + newRefData->m_height = new_height; + newRefData->m_data = data; + newRefData->m_ok = true; + } + newRefData->m_static = static_data; + + UnRef(); + + m_refData = newRefData; +} + +// ---------------------------------------------------------------------------- +// alpha channel support +// ---------------------------------------------------------------------------- + +void wxImage::SetAlpha(int x, int y, unsigned char alpha) +{ + wxCHECK_RET( HasAlpha(), wxT("no alpha channel") ); + + long pos = XYToIndex(x, y); + wxCHECK_RET( pos != -1, wxT("invalid image coordinates") ); + + AllocExclusive(); + + M_IMGDATA->m_alpha[pos] = alpha; +} + +unsigned char wxImage::GetAlpha(int x, int y) const +{ + wxCHECK_MSG( HasAlpha(), 0, wxT("no alpha channel") ); + + long pos = XYToIndex(x, y); + wxCHECK_MSG( pos != -1, 0, wxT("invalid image coordinates") ); + + return M_IMGDATA->m_alpha[pos]; +} + +bool +wxImage::ConvertColourToAlpha(unsigned char r, unsigned char g, unsigned char b) +{ + SetAlpha(NULL); + + const int w = M_IMGDATA->m_width; + const int h = M_IMGDATA->m_height; + + unsigned char *alpha = GetAlpha(); + unsigned char *data = GetData(); + + for ( int y = 0; y < h; y++ ) + { + for ( int x = 0; x < w; x++ ) + { + *alpha++ = *data; + *data++ = r; + *data++ = g; + *data++ = b; + } + } + + return true; +} + +void wxImage::SetAlpha( unsigned char *alpha, bool static_data ) +{ + wxCHECK_RET( IsOk(), wxT("invalid image") ); + + AllocExclusive(); + + if ( !alpha ) + { + alpha = (unsigned char *)malloc(M_IMGDATA->m_width*M_IMGDATA->m_height); + } + + if( !M_IMGDATA->m_staticAlpha ) + free(M_IMGDATA->m_alpha); + + M_IMGDATA->m_alpha = alpha; + M_IMGDATA->m_staticAlpha = static_data; +} + +unsigned char *wxImage::GetAlpha() const +{ + wxCHECK_MSG( IsOk(), (unsigned char *)NULL, wxT("invalid image") ); + + return M_IMGDATA->m_alpha; +} + +void wxImage::InitAlpha() +{ + wxCHECK_RET( !HasAlpha(), wxT("image already has an alpha channel") ); + + // initialize memory for alpha channel + SetAlpha(); + + unsigned char *alpha = M_IMGDATA->m_alpha; + const size_t lenAlpha = M_IMGDATA->m_width * M_IMGDATA->m_height; + + if ( HasMask() ) + { + // use the mask to initialize the alpha channel. + const unsigned char * const alphaEnd = alpha + lenAlpha; + + const unsigned char mr = M_IMGDATA->m_maskRed; + const unsigned char mg = M_IMGDATA->m_maskGreen; + const unsigned char mb = M_IMGDATA->m_maskBlue; + for ( unsigned char *src = M_IMGDATA->m_data; + alpha < alphaEnd; + src += 3, alpha++ ) + { + *alpha = (src[0] == mr && src[1] == mg && src[2] == mb) + ? wxIMAGE_ALPHA_TRANSPARENT + : wxIMAGE_ALPHA_OPAQUE; + } + + M_IMGDATA->m_hasMask = false; + } + else // no mask + { + // make the image fully opaque + memset(alpha, wxIMAGE_ALPHA_OPAQUE, lenAlpha); + } +} + +void wxImage::ClearAlpha() +{ + wxCHECK_RET( HasAlpha(), wxT("image already doesn't have an alpha channel") ); + + if ( !M_IMGDATA->m_staticAlpha ) + free( M_IMGDATA->m_alpha ); + + M_IMGDATA->m_alpha = NULL; +} + + +// ---------------------------------------------------------------------------- +// mask support +// ---------------------------------------------------------------------------- + +void wxImage::SetMaskColour( unsigned char r, unsigned char g, unsigned char b ) +{ + wxCHECK_RET( IsOk(), wxT("invalid image") ); + + AllocExclusive(); + + M_IMGDATA->m_maskRed = r; + M_IMGDATA->m_maskGreen = g; + M_IMGDATA->m_maskBlue = b; + M_IMGDATA->m_hasMask = true; +} + +bool wxImage::GetOrFindMaskColour( unsigned char *r, unsigned char *g, unsigned char *b ) const +{ + wxCHECK_MSG( IsOk(), false, wxT("invalid image") ); + + if (M_IMGDATA->m_hasMask) + { + if (r) *r = M_IMGDATA->m_maskRed; + if (g) *g = M_IMGDATA->m_maskGreen; + if (b) *b = M_IMGDATA->m_maskBlue; + return true; + } + else + { + FindFirstUnusedColour(r, g, b); + return false; + } +} + +unsigned char wxImage::GetMaskRed() const +{ + wxCHECK_MSG( IsOk(), 0, wxT("invalid image") ); + + return M_IMGDATA->m_maskRed; +} + +unsigned char wxImage::GetMaskGreen() const +{ + wxCHECK_MSG( IsOk(), 0, wxT("invalid image") ); + + return M_IMGDATA->m_maskGreen; +} + +unsigned char wxImage::GetMaskBlue() const +{ + wxCHECK_MSG( IsOk(), 0, wxT("invalid image") ); + + return M_IMGDATA->m_maskBlue; +} + +void wxImage::SetMask( bool mask ) +{ + wxCHECK_RET( IsOk(), wxT("invalid image") ); + + AllocExclusive(); + + M_IMGDATA->m_hasMask = mask; +} + +bool wxImage::HasMask() const +{ + wxCHECK_MSG( IsOk(), false, wxT("invalid image") ); + + return M_IMGDATA->m_hasMask; +} + +bool wxImage::IsTransparent(int x, int y, unsigned char threshold) const +{ + long pos = XYToIndex(x, y); + wxCHECK_MSG( pos != -1, false, wxT("invalid image coordinates") ); + + // check mask + if ( M_IMGDATA->m_hasMask ) + { + const unsigned char *p = M_IMGDATA->m_data + 3*pos; + if ( p[0] == M_IMGDATA->m_maskRed && + p[1] == M_IMGDATA->m_maskGreen && + p[2] == M_IMGDATA->m_maskBlue ) + { + return true; + } + } + + // then check alpha + if ( M_IMGDATA->m_alpha ) + { + if ( M_IMGDATA->m_alpha[pos] < threshold ) + { + // transparent enough + return true; + } + } + + // not transparent + return false; +} + +bool wxImage::SetMaskFromImage(const wxImage& mask, + unsigned char mr, unsigned char mg, unsigned char mb) +{ + // check that the images are the same size + if ( (M_IMGDATA->m_height != mask.GetHeight() ) || (M_IMGDATA->m_width != mask.GetWidth () ) ) + { + wxLogError( _("Image and mask have different sizes.") ); + return false; + } + + // find unused colour + unsigned char r,g,b ; + if (!FindFirstUnusedColour(&r, &g, &b)) + { + wxLogError( _("No unused colour in image being masked.") ); + return false ; + } + + AllocExclusive(); + + unsigned char *imgdata = GetData(); + unsigned char *maskdata = mask.GetData(); + + const int w = GetWidth(); + const int h = GetHeight(); + + for (int j = 0; j < h; j++) + { + for (int i = 0; i < w; i++) + { + if ((maskdata[0] == mr) && (maskdata[1] == mg) && (maskdata[2] == mb)) + { + imgdata[0] = r; + imgdata[1] = g; + imgdata[2] = b; + } + imgdata += 3; + maskdata += 3; + } + } + + SetMaskColour(r, g, b); + SetMask(true); + + return true; +} + +bool wxImage::ConvertAlphaToMask(unsigned char threshold) +{ + if ( !HasAlpha() ) + return false; + + unsigned char mr, mg, mb; + if ( !FindFirstUnusedColour(&mr, &mg, &mb) ) + { + wxLogError( _("No unused colour in image being masked.") ); + return false; + } + + return ConvertAlphaToMask(mr, mg, mb, threshold); +} + +bool wxImage::ConvertAlphaToMask(unsigned char mr, + unsigned char mg, + unsigned char mb, + unsigned char threshold) +{ + if ( !HasAlpha() ) + return false; + + AllocExclusive(); + + SetMask(true); + SetMaskColour(mr, mg, mb); + + unsigned char *imgdata = GetData(); + unsigned char *alphadata = GetAlpha(); + + int w = GetWidth(); + int h = GetHeight(); + + for (int y = 0; y < h; y++) + { + for (int x = 0; x < w; x++, imgdata += 3, alphadata++) + { + if (*alphadata < threshold) + { + imgdata[0] = mr; + imgdata[1] = mg; + imgdata[2] = mb; + } + } + } + + if ( !M_IMGDATA->m_staticAlpha ) + free(M_IMGDATA->m_alpha); + + M_IMGDATA->m_alpha = NULL; + M_IMGDATA->m_staticAlpha = false; + + return true; +} + +// ---------------------------------------------------------------------------- +// Palette functions +// ---------------------------------------------------------------------------- + +#if wxUSE_PALETTE + +bool wxImage::HasPalette() const +{ + if (!IsOk()) + return false; + + return M_IMGDATA->m_palette.IsOk(); +} + +const wxPalette& wxImage::GetPalette() const +{ + wxCHECK_MSG( IsOk(), wxNullPalette, wxT("invalid image") ); + + return M_IMGDATA->m_palette; +} + +void wxImage::SetPalette(const wxPalette& palette) +{ + wxCHECK_RET( IsOk(), wxT("invalid image") ); + + AllocExclusive(); + + M_IMGDATA->m_palette = palette; +} + +#endif // wxUSE_PALETTE + +// ---------------------------------------------------------------------------- +// Option functions (arbitrary name/value mapping) +// ---------------------------------------------------------------------------- + +void wxImage::SetOption(const wxString& name, const wxString& value) +{ + AllocExclusive(); + + int idx = M_IMGDATA->m_optionNames.Index(name, false); + if ( idx == wxNOT_FOUND ) + { + M_IMGDATA->m_optionNames.Add(name); + M_IMGDATA->m_optionValues.Add(value); + } + else + { + M_IMGDATA->m_optionNames[idx] = name; + M_IMGDATA->m_optionValues[idx] = value; + } +} + +void wxImage::SetOption(const wxString& name, int value) +{ + wxString valStr; + valStr.Printf(wxT("%d"), value); + SetOption(name, valStr); +} + +wxString wxImage::GetOption(const wxString& name) const +{ + if ( !M_IMGDATA ) + return wxEmptyString; + + int idx = M_IMGDATA->m_optionNames.Index(name, false); + if ( idx == wxNOT_FOUND ) + return wxEmptyString; + else + return M_IMGDATA->m_optionValues[idx]; +} + +int wxImage::GetOptionInt(const wxString& name) const +{ + return wxAtoi(GetOption(name)); +} + +bool wxImage::HasOption(const wxString& name) const +{ + return M_IMGDATA ? M_IMGDATA->m_optionNames.Index(name, false) != wxNOT_FOUND + : false; +} + +// ---------------------------------------------------------------------------- +// image I/O +// ---------------------------------------------------------------------------- + +// Under Windows we can load wxImage not only from files but also from +// resources. +#if defined(__WINDOWS__) && wxUSE_WXDIB && wxUSE_IMAGE + #define HAS_LOAD_FROM_RESOURCE +#endif + +#ifdef HAS_LOAD_FROM_RESOURCE + +#include "wx/msw/dib.h" +#include "wx/msw/private.h" + +static wxImage LoadImageFromResource(const wxString &name, wxBitmapType type) +{ + AutoHBITMAP + hBitmap, + hMask; + + if ( type == wxBITMAP_TYPE_BMP_RESOURCE ) + { + hBitmap.Init( ::LoadBitmap(wxGetInstance(), name.t_str()) ); + + if ( !hBitmap ) + { + wxLogError(_("Failed to load bitmap \"%s\" from resources."), name); + } + } + else if ( type == wxBITMAP_TYPE_ICO_RESOURCE ) + { + const HICON hIcon = ::LoadIcon(wxGetInstance(), name.t_str()); + + if ( !hIcon ) + { + wxLogError(_("Failed to load icon \"%s\" from resources."), name); + } + else + { + ICONINFO info; + if ( !::GetIconInfo(hIcon, &info) ) + { + wxLogLastError(wxT("GetIconInfo")); + return wxImage(); + } + + hBitmap.Init(info.hbmColor); + hMask.Init(info.hbmMask); + } + } + else if ( type == wxBITMAP_TYPE_CUR_RESOURCE ) + { + wxLogDebug(wxS("Loading cursors from resources is not implemented.")); + } + else + { + wxFAIL_MSG(wxS("Invalid bitmap resource type.")); + } + + if ( !hBitmap ) + return wxImage(); + + wxImage image = wxDIB(hBitmap).ConvertToImage(); + if ( hMask ) + { + const wxImage mask = wxDIB(hMask).ConvertToImage(); + image.SetMaskFromImage(mask, 255, 255, 255); + } + else + { + // Light gray colour is a default mask + image.SetMaskColour(0xc0, 0xc0, 0xc0); + } + + // We could have already loaded alpha from the resources, but if not, + // initialize it now using the mask. + if ( !image.HasAlpha() ) + image.InitAlpha(); + + return image; +} + +#endif // HAS_LOAD_FROM_RESOURCE + +bool wxImage::LoadFile( const wxString& filename, + wxBitmapType type, + int WXUNUSED_UNLESS_STREAMS(index) ) +{ +#ifdef HAS_LOAD_FROM_RESOURCE + if ( type == wxBITMAP_TYPE_BMP_RESOURCE + || type == wxBITMAP_TYPE_ICO_RESOURCE + || type == wxBITMAP_TYPE_CUR_RESOURCE) + { + const wxImage image = ::LoadImageFromResource(filename, type); + if ( image.IsOk() ) + { + *this = image; + return true; + } + } +#endif // HAS_LOAD_FROM_RESOURCE + +#if HAS_FILE_STREAMS + wxImageFileInputStream stream(filename); + if ( stream.IsOk() ) + { + wxBufferedInputStream bstream( stream ); + if ( LoadFile(bstream, type, index) ) + return true; + } + + wxLogError(_("Failed to load image from file \"%s\"."), filename); +#endif // HAS_FILE_STREAMS + + return false; +} + +bool wxImage::LoadFile( const wxString& WXUNUSED_UNLESS_STREAMS(filename), + const wxString& WXUNUSED_UNLESS_STREAMS(mimetype), + int WXUNUSED_UNLESS_STREAMS(index) ) +{ +#if HAS_FILE_STREAMS + wxImageFileInputStream stream(filename); + if ( stream.IsOk() ) + { + wxBufferedInputStream bstream( stream ); + if ( LoadFile(bstream, mimetype, index) ) + return true; + } + + wxLogError(_("Failed to load image from file \"%s\"."), filename); +#endif // HAS_FILE_STREAMS + + return false; +} + + +bool wxImage::SaveFile( const wxString& filename ) const +{ + wxString ext = filename.AfterLast('.').Lower(); + + wxImageHandler *handler = FindHandler(ext, wxBITMAP_TYPE_ANY); + if ( !handler) + { + wxLogError(_("Can't save image to file '%s': unknown extension."), + filename); + return false; + } + + return SaveFile(filename, handler->GetType()); +} + +bool wxImage::SaveFile( const wxString& WXUNUSED_UNLESS_STREAMS(filename), + wxBitmapType WXUNUSED_UNLESS_STREAMS(type) ) const +{ +#if HAS_FILE_STREAMS + wxCHECK_MSG( IsOk(), false, wxT("invalid image") ); + + ((wxImage*)this)->SetOption(wxIMAGE_OPTION_FILENAME, filename); + + wxImageFileOutputStream stream(filename); + + if ( stream.IsOk() ) + { + wxBufferedOutputStream bstream( stream ); + return SaveFile(bstream, type); + } +#endif // HAS_FILE_STREAMS + + return false; +} + +bool wxImage::SaveFile( const wxString& WXUNUSED_UNLESS_STREAMS(filename), + const wxString& WXUNUSED_UNLESS_STREAMS(mimetype) ) const +{ +#if HAS_FILE_STREAMS + wxCHECK_MSG( IsOk(), false, wxT("invalid image") ); + + ((wxImage*)this)->SetOption(wxIMAGE_OPTION_FILENAME, filename); + + wxImageFileOutputStream stream(filename); + + if ( stream.IsOk() ) + { + wxBufferedOutputStream bstream( stream ); + return SaveFile(bstream, mimetype); + } +#endif // HAS_FILE_STREAMS + + return false; +} + +bool wxImage::CanRead( const wxString& WXUNUSED_UNLESS_STREAMS(name) ) +{ +#if HAS_FILE_STREAMS + wxImageFileInputStream stream(name); + return CanRead(stream); +#else + return false; +#endif +} + +int wxImage::GetImageCount( const wxString& WXUNUSED_UNLESS_STREAMS(name), + wxBitmapType WXUNUSED_UNLESS_STREAMS(type) ) +{ +#if HAS_FILE_STREAMS + wxImageFileInputStream stream(name); + if (stream.IsOk()) + return GetImageCount(stream, type); +#endif + + return 0; +} + +#if wxUSE_STREAMS + +bool wxImage::CanRead( wxInputStream &stream ) +{ + const wxList& list = GetHandlers(); + + for ( wxList::compatibility_iterator node = list.GetFirst(); node; node = node->GetNext() ) + { + wxImageHandler *handler=(wxImageHandler*)node->GetData(); + if (handler->CanRead( stream )) + return true; + } + + return false; +} + +int wxImage::GetImageCount( wxInputStream &stream, wxBitmapType type ) +{ + wxImageHandler *handler; + + if ( type == wxBITMAP_TYPE_ANY ) + { + const wxList& list = GetHandlers(); + + for ( wxList::compatibility_iterator node = list.GetFirst(); + node; + node = node->GetNext() ) + { + handler = (wxImageHandler*)node->GetData(); + if ( handler->CanRead(stream) ) + { + const int count = handler->GetImageCount(stream); + if ( count >= 0 ) + return count; + } + + } + + wxLogWarning(_("No handler found for image type.")); + return 0; + } + + handler = FindHandler(type); + + if ( !handler ) + { + wxLogWarning(_("No image handler for type %d defined."), type); + return false; + } + + if ( handler->CanRead(stream) ) + { + return handler->GetImageCount(stream); + } + else + { + wxLogError(_("Image file is not of type %d."), type); + return 0; + } +} + +bool wxImage::DoLoad(wxImageHandler& handler, wxInputStream& stream, int index) +{ + // save the options values which can be clobbered by the handler (e.g. many + // of them call Destroy() before trying to load the file) + const unsigned maxWidth = GetOptionInt(wxIMAGE_OPTION_MAX_WIDTH), + maxHeight = GetOptionInt(wxIMAGE_OPTION_MAX_HEIGHT); + + // Preserve the original stream position if possible to rewind back to it + // if we failed to load the file -- maybe the next handler that we try can + // succeed after us then. + wxFileOffset posOld = wxInvalidOffset; + if ( stream.IsSeekable() ) + posOld = stream.TellI(); + + if ( !handler.LoadFile(this, stream, true/*verbose*/, index) ) + { + if ( posOld != wxInvalidOffset ) + stream.SeekI(posOld); + + return false; + } + + // rescale the image to the specified size if needed + if ( maxWidth || maxHeight ) + { + const unsigned widthOrig = GetWidth(), + heightOrig = GetHeight(); + + // this uses the same (trivial) algorithm as the JPEG handler + unsigned width = widthOrig, + height = heightOrig; + while ( (maxWidth && width > maxWidth) || + (maxHeight && height > maxHeight) ) + { + width /= 2; + height /= 2; + } + + if ( width != widthOrig || height != heightOrig ) + { + // get the original size if it was set by the image handler + // but also in order to restore it after Rescale + int widthOrigOption = GetOptionInt(wxIMAGE_OPTION_ORIGINAL_WIDTH), + heightOrigOption = GetOptionInt(wxIMAGE_OPTION_ORIGINAL_HEIGHT); + + Rescale(width, height, wxIMAGE_QUALITY_HIGH); + + SetOption(wxIMAGE_OPTION_ORIGINAL_WIDTH, widthOrigOption ? widthOrigOption : widthOrig); + SetOption(wxIMAGE_OPTION_ORIGINAL_HEIGHT, heightOrigOption ? heightOrigOption : heightOrig); + } + } + + // Set this after Rescale, which currently does not preserve it + M_IMGDATA->m_type = handler.GetType(); + + return true; +} + +bool wxImage::LoadFile( wxInputStream& stream, wxBitmapType type, int index ) +{ + AllocExclusive(); + + wxImageHandler *handler; + + if ( type == wxBITMAP_TYPE_ANY ) + { + if ( !stream.IsSeekable() ) + { + // The error message about image data format being unknown below + // would be misleading in this case as we are not even going to try + // any handlers because CanRead() never does anything for not + // seekable stream, so try to be more precise here. + wxLogError(_("Can't automatically determine the image format " + "for non-seekable input.")); + return false; + } + + const wxList& list = GetHandlers(); + for ( wxList::compatibility_iterator node = list.GetFirst(); + node; + node = node->GetNext() ) + { + handler = (wxImageHandler*)node->GetData(); + if ( handler->CanRead(stream) && DoLoad(*handler, stream, index) ) + return true; + } + + wxLogWarning( _("Unknown image data format.") ); + + return false; + } + //else: have specific type + + handler = FindHandler(type); + if ( !handler ) + { + wxLogWarning( _("No image handler for type %d defined."), type ); + return false; + } + + if ( stream.IsSeekable() && !handler->CanRead(stream) ) + { + wxLogError(_("This is not a %s."), handler->GetName()); + return false; + } + + return DoLoad(*handler, stream, index); +} + +bool wxImage::LoadFile( wxInputStream& stream, const wxString& mimetype, int index ) +{ + UnRef(); + + m_refData = new wxImageRefData; + + wxImageHandler *handler = FindHandlerMime(mimetype); + + if ( !handler ) + { + wxLogWarning( _("No image handler for type %s defined."), mimetype.GetData() ); + return false; + } + + if ( stream.IsSeekable() && !handler->CanRead(stream) ) + { + wxLogError(_("Image is not of type %s."), mimetype); + return false; + } + + return DoLoad(*handler, stream, index); +} + +bool wxImage::DoSave(wxImageHandler& handler, wxOutputStream& stream) const +{ + wxImage * const self = const_cast(this); + if ( !handler.SaveFile(self, stream) ) + return false; + + M_IMGDATA->m_type = handler.GetType(); + return true; +} + +bool wxImage::SaveFile( wxOutputStream& stream, wxBitmapType type ) const +{ + wxCHECK_MSG( IsOk(), false, wxT("invalid image") ); + + wxImageHandler *handler = FindHandler(type); + if ( !handler ) + { + wxLogWarning( _("No image handler for type %d defined."), type ); + return false; + } + + return DoSave(*handler, stream); +} + +bool wxImage::SaveFile( wxOutputStream& stream, const wxString& mimetype ) const +{ + wxCHECK_MSG( IsOk(), false, wxT("invalid image") ); + + wxImageHandler *handler = FindHandlerMime(mimetype); + if ( !handler ) + { + wxLogWarning( _("No image handler for type %s defined."), mimetype.GetData() ); + return false; + } + + return DoSave(*handler, stream); +} + +#endif // wxUSE_STREAMS + +// ---------------------------------------------------------------------------- +// image I/O handlers +// ---------------------------------------------------------------------------- + +void wxImage::AddHandler( wxImageHandler *handler ) +{ + // Check for an existing handler of the type being added. + if (FindHandler( handler->GetType() ) == 0) + { + sm_handlers.Append( handler ); + } + else + { + // This is not documented behaviour, merely the simplest 'fix' + // for preventing duplicate additions. If someone ever has + // a good reason to add and remove duplicate handlers (and they + // may) we should probably refcount the duplicates. + // also an issue in InsertHandler below. + + wxLogDebug( wxT("Adding duplicate image handler for '%s'"), + handler->GetName().c_str() ); + delete handler; + } +} + +void wxImage::InsertHandler( wxImageHandler *handler ) +{ + // Check for an existing handler of the type being added. + if (FindHandler( handler->GetType() ) == 0) + { + sm_handlers.Insert( handler ); + } + else + { + // see AddHandler for additional comments. + wxLogDebug( wxT("Inserting duplicate image handler for '%s'"), + handler->GetName().c_str() ); + delete handler; + } +} + +bool wxImage::RemoveHandler( const wxString& name ) +{ + wxImageHandler *handler = FindHandler(name); + if (handler) + { + sm_handlers.DeleteObject(handler); + delete handler; + return true; + } + else + return false; +} + +wxImageHandler *wxImage::FindHandler( const wxString& name ) +{ + wxList::compatibility_iterator node = sm_handlers.GetFirst(); + while (node) + { + wxImageHandler *handler = (wxImageHandler*)node->GetData(); + if (handler->GetName().Cmp(name) == 0) return handler; + + node = node->GetNext(); + } + return NULL; +} + +wxImageHandler *wxImage::FindHandler( const wxString& extension, wxBitmapType bitmapType ) +{ + wxList::compatibility_iterator node = sm_handlers.GetFirst(); + while (node) + { + wxImageHandler *handler = (wxImageHandler*)node->GetData(); + if ((bitmapType == wxBITMAP_TYPE_ANY) || (handler->GetType() == bitmapType)) + { + if (handler->GetExtension() == extension) + return handler; + if (handler->GetAltExtensions().Index(extension, false) != wxNOT_FOUND) + return handler; + } + node = node->GetNext(); + } + return NULL; +} + +wxImageHandler *wxImage::FindHandler(wxBitmapType bitmapType ) +{ + wxList::compatibility_iterator node = sm_handlers.GetFirst(); + while (node) + { + wxImageHandler *handler = (wxImageHandler *)node->GetData(); + if (handler->GetType() == bitmapType) return handler; + node = node->GetNext(); + } + return NULL; +} + +wxImageHandler *wxImage::FindHandlerMime( const wxString& mimetype ) +{ + wxList::compatibility_iterator node = sm_handlers.GetFirst(); + while (node) + { + wxImageHandler *handler = (wxImageHandler *)node->GetData(); + if (handler->GetMimeType().IsSameAs(mimetype, false)) return handler; + node = node->GetNext(); + } + return NULL; +} + +void wxImage::InitStandardHandlers() +{ +#if wxUSE_STREAMS + AddHandler(new wxBMPHandler); +#endif // wxUSE_STREAMS +} + +void wxImage::CleanUpHandlers() +{ + wxList::compatibility_iterator node = sm_handlers.GetFirst(); + while (node) + { + wxImageHandler *handler = (wxImageHandler *)node->GetData(); + wxList::compatibility_iterator next = node->GetNext(); + delete handler; + node = next; + } + + sm_handlers.Clear(); +} + +wxString wxImage::GetImageExtWildcard() +{ + wxString fmts; + + wxList& Handlers = wxImage::GetHandlers(); + wxList::compatibility_iterator Node = Handlers.GetFirst(); + while ( Node ) + { + wxImageHandler* Handler = (wxImageHandler*)Node->GetData(); + fmts += wxT("*.") + Handler->GetExtension(); + for (size_t i = 0; i < Handler->GetAltExtensions().size(); i++) + fmts += wxT(";*.") + Handler->GetAltExtensions()[i]; + Node = Node->GetNext(); + if ( Node ) fmts += wxT(";"); + } + + return wxT("(") + fmts + wxT(")|") + fmts; +} + +wxImage::HSVValue wxImage::RGBtoHSV(const RGBValue& rgb) +{ + const double red = rgb.red / 255.0, + green = rgb.green / 255.0, + blue = rgb.blue / 255.0; + + // find the min and max intensity (and remember which one was it for the + // latter) + double minimumRGB = red; + if ( green < minimumRGB ) + minimumRGB = green; + if ( blue < minimumRGB ) + minimumRGB = blue; + + enum { RED, GREEN, BLUE } chMax = RED; + double maximumRGB = red; + if ( green > maximumRGB ) + { + chMax = GREEN; + maximumRGB = green; + } + if ( blue > maximumRGB ) + { + chMax = BLUE; + maximumRGB = blue; + } + + const double value = maximumRGB; + + double hue = 0.0, saturation; + const double deltaRGB = maximumRGB - minimumRGB; + if ( wxIsNullDouble(deltaRGB) ) + { + // Gray has no color + hue = 0.0; + saturation = 0.0; + } + else + { + switch ( chMax ) + { + case RED: + hue = (green - blue) / deltaRGB; + break; + + case GREEN: + hue = 2.0 + (blue - red) / deltaRGB; + break; + + case BLUE: + hue = 4.0 + (red - green) / deltaRGB; + break; + } + + hue /= 6.0; + + if ( hue < 0.0 ) + hue += 1.0; + + saturation = deltaRGB / maximumRGB; + } + + return HSVValue(hue, saturation, value); +} + +wxImage::RGBValue wxImage::HSVtoRGB(const HSVValue& hsv) +{ + double red, green, blue; + + if ( wxIsNullDouble(hsv.saturation) ) + { + // Grey + red = hsv.value; + green = hsv.value; + blue = hsv.value; + } + else // not grey + { + double hue = hsv.hue * 6.0; // sector 0 to 5 + int i = (int)floor(hue); + double f = hue - i; // fractional part of h + double p = hsv.value * (1.0 - hsv.saturation); + + switch (i) + { + case 0: + red = hsv.value; + green = hsv.value * (1.0 - hsv.saturation * (1.0 - f)); + blue = p; + break; + + case 1: + red = hsv.value * (1.0 - hsv.saturation * f); + green = hsv.value; + blue = p; + break; + + case 2: + red = p; + green = hsv.value; + blue = hsv.value * (1.0 - hsv.saturation * (1.0 - f)); + break; + + case 3: + red = p; + green = hsv.value * (1.0 - hsv.saturation * f); + blue = hsv.value; + break; + + case 4: + red = hsv.value * (1.0 - hsv.saturation * (1.0 - f)); + green = p; + blue = hsv.value; + break; + + default: // case 5: + red = hsv.value; + green = p; + blue = hsv.value * (1.0 - hsv.saturation * f); + break; + } + } + + return RGBValue((unsigned char)(red * 255.0), + (unsigned char)(green * 255.0), + (unsigned char)(blue * 255.0)); +} + +/* + * Rotates the hue of each pixel of the image. angle is a double in the range + * -1.0..1.0 where -1.0 is -360 degrees and 1.0 is 360 degrees + */ +void wxImage::RotateHue(double angle) +{ + AllocExclusive(); + + unsigned char *srcBytePtr; + unsigned char *dstBytePtr; + unsigned long count; + wxImage::HSVValue hsv; + wxImage::RGBValue rgb; + + wxASSERT (angle >= -1.0 && angle <= 1.0); + count = M_IMGDATA->m_width * M_IMGDATA->m_height; + if ( count > 0 && !wxIsNullDouble(angle) ) + { + srcBytePtr = M_IMGDATA->m_data; + dstBytePtr = srcBytePtr; + do + { + rgb.red = *srcBytePtr++; + rgb.green = *srcBytePtr++; + rgb.blue = *srcBytePtr++; + hsv = RGBtoHSV(rgb); + + hsv.hue = hsv.hue + angle; + if (hsv.hue > 1.0) + hsv.hue = hsv.hue - 1.0; + else if (hsv.hue < 0.0) + hsv.hue = hsv.hue + 1.0; + + rgb = HSVtoRGB(hsv); + *dstBytePtr++ = rgb.red; + *dstBytePtr++ = rgb.green; + *dstBytePtr++ = rgb.blue; + } while (--count != 0); + } +} + +//----------------------------------------------------------------------------- +// wxImageHandler +//----------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxImageHandler,wxObject) + +#if wxUSE_STREAMS +int wxImageHandler::GetImageCount( wxInputStream& stream ) +{ + // NOTE: this code is the same of wxAnimationDecoder::CanRead and + // wxImageHandler::CallDoCanRead + + if ( !stream.IsSeekable() ) + return false; // can't test unseekable stream + + wxFileOffset posOld = stream.TellI(); + int n = DoGetImageCount(stream); + + // restore the old position to be able to test other formats and so on + if ( stream.SeekI(posOld) == wxInvalidOffset ) + { + wxLogDebug(wxT("Failed to rewind the stream in wxImageHandler!")); + + // reading would fail anyhow as we're not at the right position + return false; + } + + return n; +} + +bool wxImageHandler::CanRead( const wxString& name ) +{ + wxImageFileInputStream stream(name); + if ( !stream.IsOk() ) + { + wxLogError(_("Failed to check format of image file \"%s\"."), name); + + return false; + } + + return CanRead(stream); +} + +bool wxImageHandler::CallDoCanRead(wxInputStream& stream) +{ + // NOTE: this code is the same of wxAnimationDecoder::CanRead and + // wxImageHandler::GetImageCount + + if ( !stream.IsSeekable() ) + return false; // can't test unseekable stream + + wxFileOffset posOld = stream.TellI(); + bool ok = DoCanRead(stream); + + // restore the old position to be able to test other formats and so on + if ( stream.SeekI(posOld) == wxInvalidOffset ) + { + wxLogDebug(wxT("Failed to rewind the stream in wxImageHandler!")); + + // reading would fail anyhow as we're not at the right position + return false; + } + + return ok; +} + +#endif // wxUSE_STREAMS + +/* static */ +wxImageResolution +wxImageHandler::GetResolutionFromOptions(const wxImage& image, int *x, int *y) +{ + wxCHECK_MSG( x && y, wxIMAGE_RESOLUTION_NONE, wxT("NULL pointer") ); + + if ( image.HasOption(wxIMAGE_OPTION_RESOLUTIONX) && + image.HasOption(wxIMAGE_OPTION_RESOLUTIONY) ) + { + *x = image.GetOptionInt(wxIMAGE_OPTION_RESOLUTIONX); + *y = image.GetOptionInt(wxIMAGE_OPTION_RESOLUTIONY); + } + else if ( image.HasOption(wxIMAGE_OPTION_RESOLUTION) ) + { + *x = + *y = image.GetOptionInt(wxIMAGE_OPTION_RESOLUTION); + } + else // no resolution options specified + { + *x = + *y = 0; + + return wxIMAGE_RESOLUTION_NONE; + } + + // get the resolution unit too + int resUnit = image.GetOptionInt(wxIMAGE_OPTION_RESOLUTIONUNIT); + if ( !resUnit ) + { + // this is the default + resUnit = wxIMAGE_RESOLUTION_INCHES; + } + + return (wxImageResolution)resUnit; +} + +// ---------------------------------------------------------------------------- +// image histogram stuff +// ---------------------------------------------------------------------------- + +bool +wxImageHistogram::FindFirstUnusedColour(unsigned char *r, + unsigned char *g, + unsigned char *b, + unsigned char r2, + unsigned char g2, + unsigned char b2) const +{ + unsigned long key = MakeKey(r2, g2, b2); + + while ( find(key) != end() ) + { + // color already used + r2++; + if ( r2 >= 255 ) + { + r2 = 0; + g2++; + if ( g2 >= 255 ) + { + g2 = 0; + b2++; + if ( b2 >= 255 ) + { + wxLogError(_("No unused colour in image.") ); + return false; + } + } + } + + key = MakeKey(r2, g2, b2); + } + + if ( r ) + *r = r2; + if ( g ) + *g = g2; + if ( b ) + *b = b2; + + return true; +} + +bool +wxImage::FindFirstUnusedColour(unsigned char *r, + unsigned char *g, + unsigned char *b, + unsigned char r2, + unsigned char g2, + unsigned char b2) const +{ + wxImageHistogram histogram; + + ComputeHistogram(histogram); + + return histogram.FindFirstUnusedColour(r, g, b, r2, g2, b2); +} + + + +// GRG, Dic/99 +// Counts and returns the number of different colours. Optionally stops +// when it exceeds 'stopafter' different colours. This is useful, for +// example, to see if the image can be saved as 8-bit (256 colour or +// less, in this case it would be invoked as CountColours(256)). Default +// value for stopafter is -1 (don't care). +// +unsigned long wxImage::CountColours( unsigned long stopafter ) const +{ + wxHashTable h; + wxObject dummy; + unsigned char r, g, b; + unsigned char *p; + unsigned long size, nentries, key; + + p = GetData(); + size = GetWidth() * GetHeight(); + nentries = 0; + + for (unsigned long j = 0; (j < size) && (nentries <= stopafter) ; j++) + { + r = *(p++); + g = *(p++); + b = *(p++); + key = wxImageHistogram::MakeKey(r, g, b); + + if (h.Get(key) == NULL) + { + h.Put(key, &dummy); + nentries++; + } + } + + return nentries; +} + + +unsigned long wxImage::ComputeHistogram( wxImageHistogram &h ) const +{ + unsigned char *p = GetData(); + unsigned long nentries = 0; + + h.clear(); + + const unsigned long size = GetWidth() * GetHeight(); + + unsigned char r, g, b; + for ( unsigned long n = 0; n < size; n++ ) + { + r = *p++; + g = *p++; + b = *p++; + + wxImageHistogramEntry& entry = h[wxImageHistogram::MakeKey(r, g, b)]; + + if ( entry.value++ == 0 ) + entry.index = nentries++; + } + + return nentries; +} + +/* + * Rotation code by Carlos Moreno + */ + +static const double wxROTATE_EPSILON = 1e-10; + +// Auxiliary function to rotate a point (x,y) with respect to point p0 +// make it inline and use a straight return to facilitate optimization +// also, the function receives the sine and cosine of the angle to avoid +// repeating the time-consuming calls to these functions -- sin/cos can +// be computed and stored in the calling function. + +static inline wxRealPoint +wxRotatePoint(const wxRealPoint& p, double cos_angle, double sin_angle, + const wxRealPoint& p0) +{ + return wxRealPoint(p0.x + (p.x - p0.x) * cos_angle - (p.y - p0.y) * sin_angle, + p0.y + (p.y - p0.y) * cos_angle + (p.x - p0.x) * sin_angle); +} + +static inline wxRealPoint +wxRotatePoint(double x, double y, double cos_angle, double sin_angle, + const wxRealPoint & p0) +{ + return wxRotatePoint (wxRealPoint(x,y), cos_angle, sin_angle, p0); +} + +wxImage wxImage::Rotate(double angle, + const wxPoint& centre_of_rotation, + bool interpolating, + wxPoint *offset_after_rotation) const +{ + // screen coordinates are a mirror image of "real" coordinates + angle = -angle; + + const bool has_alpha = HasAlpha(); + + const int w = GetWidth(); + const int h = GetHeight(); + + int i; + + // Create pointer-based array to accelerate access to wxImage's data + unsigned char ** data = new unsigned char * [h]; + data[0] = GetData(); + for (i = 1; i < h; i++) + data[i] = data[i - 1] + (3 * w); + + // Same for alpha channel + unsigned char ** alpha = NULL; + if (has_alpha) + { + alpha = new unsigned char * [h]; + alpha[0] = GetAlpha(); + for (i = 1; i < h; i++) + alpha[i] = alpha[i - 1] + w; + } + + // precompute coefficients for rotation formula + const double cos_angle = cos(angle); + const double sin_angle = sin(angle); + + // Create new Image to store the result + // First, find rectangle that covers the rotated image; to do that, + // rotate the four corners + + const wxRealPoint p0(centre_of_rotation.x, centre_of_rotation.y); + + wxRealPoint p1 = wxRotatePoint (0, 0, cos_angle, sin_angle, p0); + wxRealPoint p2 = wxRotatePoint (0, h, cos_angle, sin_angle, p0); + wxRealPoint p3 = wxRotatePoint (w, 0, cos_angle, sin_angle, p0); + wxRealPoint p4 = wxRotatePoint (w, h, cos_angle, sin_angle, p0); + + int x1a = (int) floor (wxMin (wxMin(p1.x, p2.x), wxMin(p3.x, p4.x))); + int y1a = (int) floor (wxMin (wxMin(p1.y, p2.y), wxMin(p3.y, p4.y))); + int x2a = (int) ceil (wxMax (wxMax(p1.x, p2.x), wxMax(p3.x, p4.x))); + int y2a = (int) ceil (wxMax (wxMax(p1.y, p2.y), wxMax(p3.y, p4.y))); + + // Create rotated image + wxImage rotated (x2a - x1a + 1, y2a - y1a + 1, false); + // With alpha channel + if (has_alpha) + rotated.SetAlpha(); + + if (offset_after_rotation != NULL) + { + *offset_after_rotation = wxPoint (x1a, y1a); + } + + // the rotated (destination) image is always accessed sequentially via this + // pointer, there is no need for pointer-based arrays here + unsigned char *dst = rotated.GetData(); + + unsigned char *alpha_dst = has_alpha ? rotated.GetAlpha() : NULL; + + // if the original image has a mask, use its RGB values as the blank pixel, + // else, fall back to default (black). + unsigned char blank_r = 0; + unsigned char blank_g = 0; + unsigned char blank_b = 0; + + if (HasMask()) + { + blank_r = GetMaskRed(); + blank_g = GetMaskGreen(); + blank_b = GetMaskBlue(); + rotated.SetMaskColour( blank_r, blank_g, blank_b ); + } + + // Now, for each point of the rotated image, find where it came from, by + // performing an inverse rotation (a rotation of -angle) and getting the + // pixel at those coordinates + + const int rH = rotated.GetHeight(); + const int rW = rotated.GetWidth(); + + // do the (interpolating) test outside of the loops, so that it is done + // only once, instead of repeating it for each pixel. + if (interpolating) + { + for (int y = 0; y < rH; y++) + { + for (int x = 0; x < rW; x++) + { + wxRealPoint src = wxRotatePoint (x + x1a, y + y1a, cos_angle, -sin_angle, p0); + + if (-0.25 < src.x && src.x < w - 0.75 && + -0.25 < src.y && src.y < h - 0.75) + { + // interpolate using the 4 enclosing grid-points. Those + // points can be obtained using floor and ceiling of the + // exact coordinates of the point + int x1, y1, x2, y2; + + if (0 < src.x && src.x < w - 1) + { + x1 = wxRound(floor(src.x)); + x2 = wxRound(ceil(src.x)); + } + else // else means that x is near one of the borders (0 or width-1) + { + x1 = x2 = wxRound (src.x); + } + + if (0 < src.y && src.y < h - 1) + { + y1 = wxRound(floor(src.y)); + y2 = wxRound(ceil(src.y)); + } + else + { + y1 = y2 = wxRound (src.y); + } + + // get four points and the distances (square of the distance, + // for efficiency reasons) for the interpolation formula + + // GRG: Do not calculate the points until they are + // really needed -- this way we can calculate + // just one, instead of four, if d1, d2, d3 + // or d4 are < wxROTATE_EPSILON + + const double d1 = (src.x - x1) * (src.x - x1) + (src.y - y1) * (src.y - y1); + const double d2 = (src.x - x2) * (src.x - x2) + (src.y - y1) * (src.y - y1); + const double d3 = (src.x - x2) * (src.x - x2) + (src.y - y2) * (src.y - y2); + const double d4 = (src.x - x1) * (src.x - x1) + (src.y - y2) * (src.y - y2); + + // Now interpolate as a weighted average of the four surrounding + // points, where the weights are the distances to each of those points + + // If the point is exactly at one point of the grid of the source + // image, then don't interpolate -- just assign the pixel + + // d1,d2,d3,d4 are positive -- no need for abs() + if (d1 < wxROTATE_EPSILON) + { + unsigned char *p = data[y1] + (3 * x1); + *(dst++) = *(p++); + *(dst++) = *(p++); + *(dst++) = *p; + + if (has_alpha) + *(alpha_dst++) = *(alpha[y1] + x1); + } + else if (d2 < wxROTATE_EPSILON) + { + unsigned char *p = data[y1] + (3 * x2); + *(dst++) = *(p++); + *(dst++) = *(p++); + *(dst++) = *p; + + if (has_alpha) + *(alpha_dst++) = *(alpha[y1] + x2); + } + else if (d3 < wxROTATE_EPSILON) + { + unsigned char *p = data[y2] + (3 * x2); + *(dst++) = *(p++); + *(dst++) = *(p++); + *(dst++) = *p; + + if (has_alpha) + *(alpha_dst++) = *(alpha[y2] + x2); + } + else if (d4 < wxROTATE_EPSILON) + { + unsigned char *p = data[y2] + (3 * x1); + *(dst++) = *(p++); + *(dst++) = *(p++); + *(dst++) = *p; + + if (has_alpha) + *(alpha_dst++) = *(alpha[y2] + x1); + } + else + { + // weights for the weighted average are proportional to the inverse of the distance + unsigned char *v1 = data[y1] + (3 * x1); + unsigned char *v2 = data[y1] + (3 * x2); + unsigned char *v3 = data[y2] + (3 * x2); + unsigned char *v4 = data[y2] + (3 * x1); + + const double w1 = 1/d1, w2 = 1/d2, w3 = 1/d3, w4 = 1/d4; + + // GRG: Unrolled. + + *(dst++) = (unsigned char) + ( (w1 * *(v1++) + w2 * *(v2++) + + w3 * *(v3++) + w4 * *(v4++)) / + (w1 + w2 + w3 + w4) ); + *(dst++) = (unsigned char) + ( (w1 * *(v1++) + w2 * *(v2++) + + w3 * *(v3++) + w4 * *(v4++)) / + (w1 + w2 + w3 + w4) ); + *(dst++) = (unsigned char) + ( (w1 * *v1 + w2 * *v2 + + w3 * *v3 + w4 * *v4) / + (w1 + w2 + w3 + w4) ); + + if (has_alpha) + { + v1 = alpha[y1] + (x1); + v2 = alpha[y1] + (x2); + v3 = alpha[y2] + (x2); + v4 = alpha[y2] + (x1); + + *(alpha_dst++) = (unsigned char) + ( (w1 * *v1 + w2 * *v2 + + w3 * *v3 + w4 * *v4) / + (w1 + w2 + w3 + w4) ); + } + } + } + else + { + *(dst++) = blank_r; + *(dst++) = blank_g; + *(dst++) = blank_b; + + if (has_alpha) + *(alpha_dst++) = 0; + } + } + } + } + else // not interpolating + { + for (int y = 0; y < rH; y++) + { + for (int x = 0; x < rW; x++) + { + wxRealPoint src = wxRotatePoint (x + x1a, y + y1a, cos_angle, -sin_angle, p0); + + const int xs = wxRound (src.x); // wxRound rounds to the + const int ys = wxRound (src.y); // closest integer + + if (0 <= xs && xs < w && 0 <= ys && ys < h) + { + unsigned char *p = data[ys] + (3 * xs); + *(dst++) = *(p++); + *(dst++) = *(p++); + *(dst++) = *p; + + if (has_alpha) + *(alpha_dst++) = *(alpha[ys] + (xs)); + } + else + { + *(dst++) = blank_r; + *(dst++) = blank_g; + *(dst++) = blank_b; + + if (has_alpha) + *(alpha_dst++) = 255; + } + } + } + } + + delete [] data; + delete [] alpha; + + return rotated; +} + + + + + +// A module to allow wxImage initialization/cleanup +// without calling these functions from app.cpp or from +// the user's application. + +class wxImageModule: public wxModule +{ +DECLARE_DYNAMIC_CLASS(wxImageModule) +public: + wxImageModule() {} + bool OnInit() { wxImage::InitStandardHandlers(); return true; } + void OnExit() { wxImage::CleanUpHandlers(); } +}; + +IMPLEMENT_DYNAMIC_CLASS(wxImageModule, wxModule) + + +#endif // wxUSE_IMAGE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imagfill.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagfill.cpp new file mode 100644 index 0000000000..825d60715f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagfill.cpp @@ -0,0 +1,322 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imagfill.cpp +// Purpose: FloodFill for wxImage +// Author: Julian Smart +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE && !defined(__WXMSW__) +// we have no use for this code in wxMSW... + +#ifndef WX_PRECOMP + #include "wx/brush.h" + #include "wx/dc.h" + #include "wx/dcmemory.h" + #include "wx/image.h" +#endif + +// DoFloodFill +// Fills with the colour extracted from fillBrush, starting at x,y until either +// a color different from the start pixel is reached (wxFLOOD_SURFACE) +// or fill color is reached (wxFLOOD_BORDER) + +static bool LINKAGEMODE MatchPixel(wxImage *img, int x, int y, int w, int h, const wxColour& c) +{ + if ((x<0)||(x>=w)||(y<0)||(y>=h)) return false; + + unsigned char r = img->GetRed(x,y); + unsigned char g = img->GetGreen(x,y); + unsigned char b = img->GetBlue(x,y); + return c.Red() == r && c.Green() == g && c.Blue() == b ; +} + +static bool LINKAGEMODE MatchBoundaryPixel(wxImage *img, int x, int y, int w, int h, const wxColour & fill, const wxColour& bound) +{ + if ((x<0)||(x>=w)||(y<0)||(y>=h)) return true; + + unsigned char r = img->GetRed(x,y); + unsigned char g = img->GetGreen(x,y); + unsigned char b = img->GetBlue(x,y); + if ( fill.Red() == r && fill.Green() == g && fill.Blue() == b ) + return true; + if ( bound.Red() == r && bound.Green() == g && bound.Blue() == b ) + return true; + return false; +} + + +static void LINKAGEMODE +wxImageFloodFill(wxImage *image, + wxCoord x, wxCoord y, const wxBrush & fillBrush, + const wxColour& testColour, int style) +{ + /* A diamond flood-fill using a circular queue system. + Each pixel surrounding the current pixel is added to + the queue if it meets the criteria, then is retrieved in + its turn. Code originally based on http://www.drawit.co.nz/Developers.htm, + with explicit permission to use this for wxWidgets granted by Andrew Empson + (no copyright claimed) + */ + + int width = image->GetWidth(); + int height = image->GetHeight(); + + //Draw using a pen made from the current brush colour + //Potentially allows us to use patterned flood fills in future code + wxColour fillColour = fillBrush.GetColour(); + unsigned char r = fillColour.Red(); + unsigned char g = fillColour.Green(); + unsigned char b = fillColour.Blue(); + + //initial test : + if (style == wxFLOOD_SURFACE) + { + //if wxFLOOD_SURFACE, if fill colour is same as required, we don't do anything + if ( image->GetRed(x,y) != r + || image->GetGreen(x,y) != g + || image->GetBlue (x,y) != b ) + { + //prepare memory for queue + //queue save, start, read + size_t *qs, *qst, *qr; + + //queue size (physical) + long qSz= height * width * 2; + qst = new size_t [qSz]; + + //temporary x and y locations + int xt, yt; + + for (int i=0; i < qSz; i++) + qst[i] = 0; + + // start queue + qs=qr=qst; + *qs=xt=x; + qs++; + *qs=yt=y; + qs++; + + image->SetRGB(xt,yt,r,g,b); + + //Main queue loop + while(qr!=qs) + { + //Add new members to queue + //Above current pixel + if(MatchPixel(image,xt,yt-1,width,height,testColour)) + { + *qs=xt; + qs++; + *qs=yt-1; + qs++; + image->SetRGB(xt,yt-1,r,g,b); + + //Loop back to beginning of queue + if(qs>=(qst+qSz)) qs=qst; + } + + //Below current pixel + if(MatchPixel(image,xt,yt+1,width,height,testColour)) + { + *qs=xt; + qs++; + *qs=yt+1; + qs++; + image->SetRGB(xt,yt+1,r,g,b); + if(qs>=(qst+qSz)) qs=qst; + } + + //Left of current pixel + if(MatchPixel(image,xt-1,yt,width,height,testColour)) + { + *qs=xt-1; + qs++; + *qs=yt; + qs++; + image->SetRGB(xt-1,yt,r,g,b); + if(qs>=(qst+qSz)) qs=qst; + } + + //Right of current pixel + if(MatchPixel(image,xt+1,yt,width,height,testColour)) + { + *qs=xt+1; + qs++; + *qs=yt; + qs++; + image->SetRGB(xt+1,yt,r,g,b); + if(qs>=(qst+qSz)) qs=qst; + } + + //Retrieve current queue member + qr+=2; + + //Loop back to the beginning + if(qr>=(qst+qSz)) qr=qst; + xt=*qr; + yt=*(qr+1); + + //Go Back to beginning of loop + } + + delete[] qst; + } + } + else + { + //style is wxFLOOD_BORDER + // fill up to testColor border - if already testColour don't do anything + if ( image->GetRed(x,y) != testColour.Red() + || image->GetGreen(x,y) != testColour.Green() + || image->GetBlue(x,y) != testColour.Blue() ) + { + //prepare memory for queue + //queue save, start, read + size_t *qs, *qst, *qr; + + //queue size (physical) + long qSz= height * width * 2; + qst = new size_t [qSz]; + + //temporary x and y locations + int xt, yt; + + for (int i=0; i < qSz; i++) + qst[i] = 0; + + // start queue + qs=qr=qst; + *qs=xt=x; + qs++; + *qs=yt=y; + qs++; + + image->SetRGB(xt,yt,r,g,b); + + //Main queue loop + while (qr!=qs) + { + //Add new members to queue + //Above current pixel + if(!MatchBoundaryPixel(image,xt,yt-1,width,height,fillColour,testColour)) + { + *qs=xt; + qs++; + *qs=yt-1; + qs++; + image->SetRGB(xt,yt-1,r,g,b); + + //Loop back to beginning of queue + if(qs>=(qst+qSz)) qs=qst; + } + + //Below current pixel + if(!MatchBoundaryPixel(image,xt,yt+1,width,height,fillColour,testColour)) + { + *qs=xt; + qs++; + *qs=yt+1; + qs++; + image->SetRGB(xt,yt+1,r,g,b); + if(qs>=(qst+qSz)) qs=qst; + } + + //Left of current pixel + if(!MatchBoundaryPixel(image,xt-1,yt,width,height,fillColour,testColour)) + { + *qs=xt-1; + qs++; + *qs=yt; + qs++; + image->SetRGB(xt-1,yt,r,g,b); + if(qs>=(qst+qSz)) qs=qst; + } + + //Right of current pixel + if(!MatchBoundaryPixel(image,xt+1,yt,width,height,fillColour,testColour)) + { + *qs=xt+1; + qs++; + *qs=yt; + qs++; + image->SetRGB(xt+1,yt,r,g,b); + if(qs>=(qst+qSz)) qs=qst; + } + + //Retrieve current queue member + qr+=2; + + //Loop back to the beginning + if(qr>=(qst+qSz)) qr=qst; + xt=*qr; + yt=*(qr+1); + + //Go Back to beginning of loop + } + + delete[] qst; + } + } + //all done, +} + + +bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, + const wxColour& col, wxFloodFillStyle style) +{ + if (dc->GetBrush().IsTransparent()) + return true; + + int height = 0; + int width = 0; + dc->GetSize(&width, &height); + + //it would be nice to fail if we don't get a sensible size... + wxCHECK_MSG(width >= 1 && height >= 1, false, + wxT("In FloodFill, dc.GetSize routine failed, method not supported by this DC")); + + const int x_dev = dc->LogicalToDeviceX(x); + const int y_dev = dc->LogicalToDeviceY(y); + + // if start point is outside dc, can't do anything + if (!wxRect(0, 0, width, height).Contains(x_dev, y_dev)) + return false; + + wxBitmap bitmap(width, height); + wxMemoryDC memdc(bitmap); + // match dc scales + double sx, sy; + dc->GetUserScale(&sx, &sy); + memdc.SetUserScale(sx, sy); + dc->GetLogicalScale(&sx, &sy); + memdc.SetLogicalScale(sx, sy); + + // get logical size and origin + const int w_log = dc->DeviceToLogicalXRel(width); + const int h_log = dc->DeviceToLogicalYRel(height); + const int x0_log = dc->DeviceToLogicalX(0); + const int y0_log = dc->DeviceToLogicalY(0); + + memdc.Blit(0, 0, w_log, h_log, dc, x0_log, y0_log); + memdc.SelectObject(wxNullBitmap); + + wxImage image = bitmap.ConvertToImage(); + wxImageFloodFill(&image, x_dev, y_dev, dc->GetBrush(), col, style); + bitmap = wxBitmap(image); + memdc.SelectObject(bitmap); + dc->Blit(x0_log, y0_log, w_log, h_log, &memdc, 0, 0); + + return true; +} + +#endif // wxUSE_IMAGE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imaggif.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imaggif.cpp new file mode 100644 index 0000000000..9c0f8bea3a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imaggif.cpp @@ -0,0 +1,828 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imaggif.cpp +// Purpose: wxGIFHandler +// Author: Vaclav Slavik, Guillermo Rodriguez Garcia, Gershon Elber, Troels K +// Copyright: (c) 1999-2011 Vaclav Slavik, Guillermo Rodriguez Garcia, Gershon Elber, Troels K +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE && wxUSE_GIF + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/palette.h" + #include "wx/utils.h" +#endif + +#include "wx/imaggif.h" +#include "wx/gifdecod.h" +#include "wx/stream.h" +#include "wx/anidecod.h" // wxImageArray + +#define GIF89_HDR "GIF89a" +#define NETSCAPE_LOOP "NETSCAPE2.0" + +// see members.aol.com/royalef/gifabout.htm +// members.aol.com/royalef/gif89a.txt + +enum +{ + GIF_MARKER_EXT = '!', // 0x21 + GIF_MARKER_SEP = ',', // 0x2C + GIF_MARKER_ENDOFDATA = ';', // 0x3B + + GIF_MARKER_EXT_GRAPHICS_CONTROL = 0xF9, + GIF_MARKER_EXT_COMMENT = 0xFE, + GIF_MARKER_EXT_APP = 0xFF +}; + +#define LZ_MAX_CODE 4095 // Biggest code possible in 12 bits. +#define FLUSH_OUTPUT 4096 // Impossible code, to signal flush. +#define FIRST_CODE 4097 // Impossible code, to signal first. + +#define HT_SIZE 8192 // 12bits = 4096 or twice as big! +#define HT_KEY_MASK 0x1FFF // 13bits keys + +#define HT_GET_KEY(l) (l >> 12) +#define HT_GET_CODE(l) (l & 0x0FFF) +#define HT_PUT_KEY(l) (l << 12) +#define HT_PUT_CODE(l) (l & 0x0FFF) + +struct wxRGB +{ + wxUint8 red; + wxUint8 green; + wxUint8 blue; +}; + +struct GifHashTableType +{ + wxUint32 HTable[HT_SIZE]; +}; + +IMPLEMENT_DYNAMIC_CLASS(wxGIFHandler,wxImageHandler) + +//---------------------------------------------------------------------------- +// Forward declarations +//---------------------------------------------------------------------------- + +static int wxGIFHandler_KeyItem(unsigned long item); + +#if wxUSE_STREAMS + +static int wxGIFHandler_BitSize(int n); + +#if wxUSE_PALETTE +static bool wxGIFHandler_GetPalette(const wxImage& image, + wxRGB *pal, int *palCount, int *mask_index); +#endif +static +int wxGIFHandler_PaletteFind(const wxRGB& clr, const wxRGB *array, int count); + +static bool wxGIFHandler_Write(wxOutputStream *, const void *buf, size_t len); +static bool wxGIFHandler_WriteByte(wxOutputStream *, wxUint8); +static bool wxGIFHandler_WriteWord(wxOutputStream *, wxUint16); +static bool wxGIFHandler_WriteHeader(wxOutputStream *, int width, int height, + bool loop, const wxRGB *pal, int palCount); +static bool wxGIFHandler_WriteRect(wxOutputStream *, int width, int height); +#if wxUSE_PALETTE +static bool wxGIFHandler_WriteTerm(wxOutputStream *); +#endif +static bool wxGIFHandler_WriteZero(wxOutputStream *); +static bool wxGIFHandler_WritePalette(wxOutputStream *, + const wxRGB *pal, size_t palCount, int bpp); +static bool wxGIFHandler_WriteControl(wxOutputStream *, + int maskIndex, int delayMilliSecs); +static bool wxGIFHandler_WriteComment(wxOutputStream *, const wxString&); +static bool wxGIFHandler_WriteLoop(wxOutputStream *); + +static bool wxGIFHandler_BufferedOutput(wxOutputStream *, wxUint8 *buf, int c); +#endif // wxUSE_STREAMS + +//----------------------------------------------------------------------------- +// wxGIFHandler +//----------------------------------------------------------------------------- + +#if wxUSE_STREAMS + +bool wxGIFHandler::LoadFile(wxImage *image, wxInputStream& stream, + bool verbose, int index) +{ + wxGIFDecoder *decod; + wxGIFErrorCode error; + bool ok = true; + +// image->Destroy(); + decod = new wxGIFDecoder(); + error = decod->LoadGIF(stream); + + if ((error != wxGIF_OK) && (error != wxGIF_TRUNCATED)) + { + if (verbose) + { + switch (error) + { + case wxGIF_INVFORMAT: + wxLogError(_("GIF: error in GIF image format.")); + break; + case wxGIF_MEMERR: + wxLogError(_("GIF: not enough memory.")); + break; + default: + wxLogError(_("GIF: unknown error!!!")); + break; + } + } + delete decod; + return false; + } + + if ((error == wxGIF_TRUNCATED) && verbose) + { + wxLogError(_("GIF: data stream seems to be truncated.")); + // go on; image data is OK + } + + if (ok) + { + ok = decod->ConvertToImage(index != -1 ? (size_t)index : 0, image); + } + else + { + wxLogError(_("GIF: Invalid gif index.")); + } + + delete decod; + + return ok; +} + +bool wxGIFHandler::SaveFile(wxImage *image, + wxOutputStream& stream, bool verbose) +{ +#if wxUSE_PALETTE + wxRGB pal[256]; + int palCount; + int maskIndex; + + return wxGIFHandler_GetPalette(*image, pal, &palCount, &maskIndex) + && DoSaveFile(*image, &stream, verbose, true /*first?*/, 0, + false /*loop?*/, pal, palCount, maskIndex) + && wxGIFHandler_WriteTerm(&stream); +#else + wxUnusedVar(image); + wxUnusedVar(stream); + wxUnusedVar(verbose); + return false; +#endif +} + +bool wxGIFHandler::DoCanRead( wxInputStream& stream ) +{ + wxGIFDecoder decod; + return decod.CanRead(stream); + // it's ok to modify the stream position here +} + +int wxGIFHandler::DoGetImageCount( wxInputStream& stream ) +{ + wxGIFDecoder decod; + wxGIFErrorCode error = decod.LoadGIF(stream); + if ( (error != wxGIF_OK) && (error != wxGIF_TRUNCATED) ) + return -1; + + // NOTE: this function modifies the current stream position but it's ok + // (see wxImageHandler::GetImageCount) + + return decod.GetFrameCount(); +} + +bool wxGIFHandler::DoSaveFile(const wxImage& image, wxOutputStream *stream, + bool WXUNUSED(verbose), bool first, int delayMilliSecs, bool loop, + const wxRGB *pal, int palCount, int maskIndex) +{ + const unsigned long colorcount = image.CountColours(256+1); + bool ok = colorcount && (colorcount <= 256); + if (!ok) + { + return false; + } + + int width = image.GetWidth(); + int height = image.GetHeight(); + int width_even = width + ((width % 2) ? 1 : 0); + + if (first) + { + ok = wxGIFHandler_WriteHeader(stream, width, height, loop, + pal, palCount); + } + + ok = ok + && wxGIFHandler_WriteComment(stream, + image.GetOption(wxIMAGE_OPTION_GIF_COMMENT)) + && wxGIFHandler_WriteControl(stream, maskIndex, delayMilliSecs) + && wxGIFHandler_WriteByte(stream, GIF_MARKER_SEP) + && wxGIFHandler_WriteRect(stream, width, height); + + // local palette + if (first) + { + // we already saved the (global) palette + ok = ok && wxGIFHandler_WriteZero(stream); + } + else + { + const int bpp = wxGIFHandler_BitSize(palCount); + wxUint8 b; + + b = 0x80; + b |=(bpp - 1) << 5; + b |=(bpp - 1); + b &=~0x40; // clear interlaced + + ok = ok && wxGIFHandler_WriteByte(stream, b) + && wxGIFHandler_WritePalette(stream, pal, palCount, bpp); + } + + if (!ok) + { + return false; + } + + if (!InitHashTable()) + { + wxLogError(_("Couldn't initialize GIF hash table.")); + return false; + } + + const wxUint8 *src = image.GetData(); + wxUint8 *eightBitData = new wxUint8[width]; + + SetupCompress(stream, 8); + + m_pixelCount = height * width_even; + for (int y = 0; y < height; y++) + { + m_pixelCount -= width_even; + for (int x = 0; x < width; x++) + { + wxRGB rgb; + rgb.red = src[0]; + rgb.green = src[1]; + rgb.blue = src[2]; + int index = wxGIFHandler_PaletteFind(rgb, pal, palCount); + wxASSERT(index != wxNOT_FOUND); + eightBitData[x] = (wxUint8)index; + src+=3; + } + + ok = CompressLine(stream, eightBitData, width); + if (!ok) + { + break; + } + } + + delete [] eightBitData; + + wxDELETE(m_hashTable); + + return ok; +} + +bool wxGIFHandler::SaveAnimation(const wxImageArray& images, + wxOutputStream *stream, bool verbose, int delayMilliSecs) +{ +#if wxUSE_PALETTE + bool ok = true; + size_t i; + + wxSize size(0,0); + for (i = 0; (i < images.GetCount()) && ok; i++) + { + const wxImage& image = images.Item(i); + wxSize temp(image.GetWidth(), image.GetHeight()); + ok = ok && image.HasPalette(); + if (i) + { + ok = ok && (size == temp); + } + else + { + size = temp; + } + } + + for (i = 0; (i < images.GetCount()) && ok; i++) + { + const wxImage& image = images.Item(i); + + wxRGB pal[256]; + int palCount; + int maskIndex; + + ok = wxGIFHandler_GetPalette(image, pal, &palCount, &maskIndex) + && DoSaveFile(image, stream, verbose, i == 0 /*first?*/, delayMilliSecs, + true /*loop?*/, pal, palCount, maskIndex); + } + + return ok && wxGIFHandler_WriteTerm(stream); +#else + wxUnusedVar(images); + wxUnusedVar(stream); + wxUnusedVar(verbose); + wxUnusedVar(delayMilliSecs); + + return false; +#endif +} + +bool wxGIFHandler::CompressOutput(wxOutputStream *stream, int code) +{ + if (code == FLUSH_OUTPUT) + { + while (m_crntShiftState > 0) + { + // Get rid of what is left in DWord, and flush it. + if (!wxGIFHandler_BufferedOutput(stream, m_LZBuf, + m_crntShiftDWord & 0xff)) + { + return false; + } + m_crntShiftDWord >>= 8; + m_crntShiftState -= 8; + } + m_crntShiftState = 0; // For next time. + if (!wxGIFHandler_BufferedOutput(stream, m_LZBuf, FLUSH_OUTPUT)) + { + return false; + } + } + else + { + m_crntShiftDWord |= ((long) code) << m_crntShiftState; + m_crntShiftState += m_runningBits; + while (m_crntShiftState >= 8) + { + // Dump out full bytes: + if (!wxGIFHandler_BufferedOutput(stream, m_LZBuf, + m_crntShiftDWord & 0xff)) + { + return false; + } + m_crntShiftDWord >>= 8; + m_crntShiftState -= 8; + } + } + + // If code can't fit into RunningBits bits, must raise its size. Note + // however that codes above LZ_MAX_CODE are used for special signaling. + if ( (m_runningCode >= m_maxCode1) && (code <= LZ_MAX_CODE)) + { + m_maxCode1 = 1 << ++m_runningBits; + } + return true; +} + +bool wxGIFHandler::SetupCompress(wxOutputStream *stream, int bpp) +{ + m_LZBuf[0] = 0; // Nothing was output yet. + m_clearCode = (1 << bpp); + m_EOFCode = m_clearCode + 1; + m_runningCode = m_EOFCode + 1; + m_runningBits = bpp + 1; // Number of bits per code. + m_maxCode1 = 1 << m_runningBits; // Max. code + 1. + m_crntCode = FIRST_CODE; // Signal that this is first one! + m_crntShiftState = 0; // No information in CrntShiftDWord. + m_crntShiftDWord = 0; + + // Clear hash table and send Clear to make sure the decoder does the same. + ClearHashTable(); + + return wxGIFHandler_WriteByte(stream, (wxUint8)bpp) + && CompressOutput(stream, m_clearCode); +} + +bool wxGIFHandler::CompressLine(wxOutputStream *stream, + const wxUint8 *line, int lineLen) +{ + int i = 0, crntCode, newCode; + unsigned long newKey; + wxUint8 pixel; + if (m_crntCode == FIRST_CODE) // It's first time! + crntCode = line[i++]; + else + crntCode = m_crntCode; // Get last code in compression. + + while (i < lineLen) + { + // Decode lineLen items. + pixel = line[i++]; // Get next pixel from stream. + // Form a new unique key to search hash table for the code combines + // crntCode as Prefix string with Pixel as postfix char. + newKey = (((unsigned long) crntCode) << 8) + pixel; + if ((newCode = ExistsHashTable(newKey)) >= 0) + { + // This Key is already there, or the string is old one, so + // simply take new code as our crntCode: + crntCode = newCode; + } + else + { + // Put it in hash table, output the prefix code, and make our + // crntCode equal to Pixel. + if (!CompressOutput(stream, crntCode)) + { + return false; + } + + crntCode = pixel; + + // If however the HashTable is full, we send a clear first and + // Clear the hash table. + if (m_runningCode >= LZ_MAX_CODE) + { + // Time to do some clearance: + if (!CompressOutput(stream, m_clearCode)) + { + return false; + } + + m_runningCode = m_EOFCode + 1; + m_runningBits = 8 + 1; + m_maxCode1 = 1 << m_runningBits; + ClearHashTable(); + } + else + { + // Put this unique key with its relative Code in hash table: + InsertHashTable(newKey, m_runningCode++); + } + } + } + // Preserve the current state of the compression algorithm: + m_crntCode = crntCode; + if (m_pixelCount == 0) + { + // We are done - output last Code and flush output buffers: + if (!CompressOutput(stream, crntCode) + || !CompressOutput(stream, m_EOFCode) + || !CompressOutput(stream, FLUSH_OUTPUT)) + { + return false; + } + } + + return true; +} + +#endif // wxUSE_STREAMS + +bool wxGIFHandler::InitHashTable() +{ + if (!m_hashTable) + { + m_hashTable = new GifHashTableType(); + } + + if (!m_hashTable) + { + return false; + } + + ClearHashTable(); + + return true; +} + +void wxGIFHandler::ClearHashTable() +{ + int index = HT_SIZE; + wxUint32 *HTable = m_hashTable->HTable; + + while (--index>=0) + { + HTable[index] = 0xfffffffful; + } +} + +void wxGIFHandler::InsertHashTable(unsigned long key, int code) +{ + int hKey = wxGIFHandler_KeyItem(key); + wxUint32 *HTable = m_hashTable->HTable; + + while (HT_GET_KEY(HTable[hKey]) != 0xFFFFFL) + { + hKey = (hKey + 1) & HT_KEY_MASK; + } + HTable[hKey] = HT_PUT_KEY(key) | HT_PUT_CODE(code); +} + + +int wxGIFHandler::ExistsHashTable(unsigned long key) +{ + int hKey = wxGIFHandler_KeyItem(key); + wxUint32 *HTable = m_hashTable->HTable, HTKey; + + while ((HTKey = HT_GET_KEY(HTable[hKey])) != 0xFFFFFL) + { + if (key == HTKey) + { + return HT_GET_CODE(HTable[hKey]); + } + hKey = (hKey + 1) & HT_KEY_MASK; + } + return -1; +} + +// --------------------------------------------------------------------------- +// implementation of global private functions +// --------------------------------------------------------------------------- + +int wxGIFHandler_KeyItem(unsigned long item) +{ + return ((item >> 12) ^ item) & HT_KEY_MASK; +} + +#if wxUSE_STREAMS + +int wxGIFHandler_BitSize(int n) +{ + int i; + for (i = 1; i <= 8; i++) + { + if ((1 << i) >= n) + { + break; + } + } + return i; +} + +#if wxUSE_PALETTE +bool wxGIFHandler_GetPalette(const wxImage& image, + wxRGB *pal, int *pPalCount, int *pMaskIndex) +{ + if (!image.HasPalette()) + { + return false; + } + + const wxPalette& palette = image.GetPalette(); + int palCount = palette.GetColoursCount(); + + for (int i = 0; i < palCount; ++i) + { + if (!palette.GetRGB(i, &pal[i].red, &pal[i].green, &pal[i].blue)) + { + break; + } + } + if (image.HasMask()) + { + wxRGB mask; + + mask.red = image.GetMaskRed(); + mask.green = image.GetMaskGreen(); + mask.blue = image.GetMaskBlue(); + *pMaskIndex = wxGIFHandler_PaletteFind(mask, pal, palCount); + if ( (*pMaskIndex == wxNOT_FOUND) && (palCount < 256)) + { + *pMaskIndex = palCount; + pal[palCount++] = mask; + } + } + else + { + *pMaskIndex = wxNOT_FOUND; + } + *pPalCount = palCount; + + return true; +} +#endif // wxUSE_PALETTE + +int wxGIFHandler_PaletteFind(const wxRGB& clr, const wxRGB *array, int count) +{ + for (int i = 0; i < count; i++) + { + if ( (clr.red == array[i].red) + && (clr.green == array[i].green) + && (clr.blue == array[i].blue)) + { + return i; + } + } + + return wxNOT_FOUND; +} + +bool wxGIFHandler_Write(wxOutputStream *stream, const void *buf, size_t len) +{ + return (len == stream->Write(buf, len).LastWrite()); +} + +bool wxGIFHandler_WriteByte(wxOutputStream *stream, wxUint8 byte) +{ + return wxGIFHandler_Write(stream, &byte, sizeof(byte)); +} + +bool wxGIFHandler_WriteWord(wxOutputStream *stream, wxUint16 word) +{ + wxUint8 buf[2]; + + buf[0] = word & 0xff; + buf[1] = (word >> 8) & 0xff; + return wxGIFHandler_Write(stream, &buf, sizeof(buf)); +} + +bool wxGIFHandler_WriteHeader(wxOutputStream *stream, int width, int height, + bool loop, const wxRGB *pal, int palCount) +{ + const int bpp = wxGIFHandler_BitSize(palCount); + wxUint8 buf[3]; + + bool ok = wxGIFHandler_Write(stream, GIF89_HDR, sizeof(GIF89_HDR)-1) + && wxGIFHandler_WriteWord(stream, (wxUint16) width) + && wxGIFHandler_WriteWord(stream, (wxUint16) height); + + buf[0] = 0x80; + buf[0] |=(bpp - 1) << 5; + buf[0] |=(bpp - 1); + buf[1] = 0; // background color == entry 0 + buf[2] = 0; // aspect ratio 1:1 + ok = ok && wxGIFHandler_Write(stream, buf, sizeof(buf)) + && wxGIFHandler_WritePalette(stream, pal, palCount, bpp); + + if (loop) + { + ok = ok && wxGIFHandler_WriteLoop(stream); + } + + return ok; +} + +bool wxGIFHandler_WriteRect(wxOutputStream *stream, int width, int height) +{ + return wxGIFHandler_WriteWord(stream, 0) // left + && wxGIFHandler_WriteWord(stream, 0) // top + && wxGIFHandler_WriteWord(stream, (wxUint16) width) + && wxGIFHandler_WriteWord(stream, (wxUint16) height); +} + +#if wxUSE_PALETTE +bool wxGIFHandler_WriteTerm(wxOutputStream *stream) +{ + return wxGIFHandler_WriteByte(stream, GIF_MARKER_ENDOFDATA); +} +#endif + +bool wxGIFHandler_WriteZero(wxOutputStream *stream) +{ + return wxGIFHandler_WriteByte(stream, 0); +} + +bool wxGIFHandler_WritePalette(wxOutputStream *stream, + const wxRGB *array, size_t count, int bpp) +{ + wxUint8 buf[3]; + for (int i = 0; (i < (1 << bpp)); i++) + { + if (i < (int)count) + { + buf[0] = array[i].red; + buf[1] = array[i].green; + buf[2] = array[i].blue; + } + else + { + buf[0] = buf[1] = buf[2] = 0; + } + + if ( !wxGIFHandler_Write(stream, buf, sizeof(buf)) ) + { + return false; + } + } + + return true; +} + +bool wxGIFHandler_WriteControl(wxOutputStream *stream, + int maskIndex, int delayMilliSecs) +{ + wxUint8 buf[8]; + + buf[0] = GIF_MARKER_EXT; // extension marker + buf[1] = GIF_MARKER_EXT_GRAPHICS_CONTROL; + buf[2] = 4; // length of block + buf[3] = (maskIndex != wxNOT_FOUND) ? 1 : 0; // has transparency + buf[4] = delayMilliSecs / 10; // delay time + buf[5] = 0; + buf[6] = (maskIndex != wxNOT_FOUND) ? (wxUint8) maskIndex : 0; + buf[7] = 0; + return wxGIFHandler_Write(stream, buf, sizeof(buf)); +} + +bool wxGIFHandler_WriteComment(wxOutputStream *stream, const wxString& comment) +{ + if ( comment.empty() ) + { + return true; + } + + // Write comment header. + wxUint8 buf[2]; + buf[0] = GIF_MARKER_EXT; + buf[1] = GIF_MARKER_EXT_COMMENT; + if ( !wxGIFHandler_Write(stream, buf, sizeof(buf)) ) + { + return false; + } + + /* + If comment is longer than 255 bytes write it in blocks of maximum 255 + bytes each. + */ + wxCharBuffer text( comment.mb_str() ); + + size_t pos = 0, fullLength = text.length(); + + do + { + size_t blockLength = wxMin(fullLength - pos, 255); + + if ( !wxGIFHandler_WriteByte(stream, (wxUint8) blockLength) + || !wxGIFHandler_Write(stream, &text.data()[pos], blockLength) ) + { + return false; + } + + pos += blockLength; + }while (pos < fullLength); + + + // Write comment footer. + return wxGIFHandler_WriteZero(stream); +} + +bool wxGIFHandler_WriteLoop(wxOutputStream *stream) +{ + wxUint8 buf[4]; + const int loopcount = 0; // infinite + + buf[0] = GIF_MARKER_EXT; + buf[1] = GIF_MARKER_EXT_APP; + buf[2] = 0x0B; + bool ok = wxGIFHandler_Write(stream, buf, 3) + && wxGIFHandler_Write(stream, NETSCAPE_LOOP, sizeof(NETSCAPE_LOOP)-1); + + buf[0] = 3; + buf[1] = 1; + buf[2] = loopcount & 0xFF; + buf[3] = loopcount >> 8; + + return ok && wxGIFHandler_Write(stream, buf, 4) + && wxGIFHandler_WriteZero(stream); +} + +bool wxGIFHandler_BufferedOutput(wxOutputStream *stream, wxUint8 *buf, int c) +{ + bool ok = true; + + if (c == FLUSH_OUTPUT) + { + // Flush everything out. + if (buf[0]) + { + ok = wxGIFHandler_Write(stream, buf, buf[0]+1); + } + // Mark end of compressed data, by an empty block (see GIF doc): + wxGIFHandler_WriteZero(stream); + } + else + { + if (buf[0] == 255) + { + // Dump out this buffer - it is full: + ok = wxGIFHandler_Write(stream, buf, buf[0] + 1); + buf[0] = 0; + } + buf[++buf[0]] = c; + } + + return ok; +} + +#endif // wxUSE_STREAMS + +#endif // wxUSE_IMAGE && wxUSE_GIF diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imagiff.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagiff.cpp new file mode 100644 index 0000000000..196fe89938 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagiff.cpp @@ -0,0 +1,790 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imagiff.cpp +// Purpose: wxImage handler for Amiga IFF images +// Author: Steffen Gutmann, Thomas Meyer +// Copyright: (c) Steffen Gutmann, 2002 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// Parts of this source are based on the iff loading algorithm found +// in xviff.c. Permission by the original author, Thomas Meyer, and +// by the author of xv, John Bradley for using the iff loading part +// in wxWidgets has been gratefully given. + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE && wxUSE_IFF + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/intl.h" +#endif + +#include "wx/imagiff.h" +#include "wx/wfstream.h" + +#if wxUSE_PALETTE + #include "wx/palette.h" +#endif // wxUSE_PALETTE + +#include +#include + + +// -------------------------------------------------------------------------- +// Constants +// -------------------------------------------------------------------------- + +// Error codes: +// Note that the error code wxIFF_TRUNCATED means that the image itself +// is most probably OK, but the decoder didn't reach the end of the data +// stream; this means that if it was not reading directly from file, +// the stream will not be correctly positioned. +// + +enum +{ + wxIFF_OK = 0, /* everything was OK */ + wxIFF_INVFORMAT, /* error in iff header */ + wxIFF_MEMERR, /* error allocating memory */ + wxIFF_TRUNCATED /* file appears to be truncated */ +}; + +// -------------------------------------------------------------------------- +// wxIFFDecoder class +// -------------------------------------------------------------------------- + +// internal class for storing IFF image data +class IFFImage +{ +public: + unsigned int w; /* width */ + unsigned int h; /* height */ + int transparent; /* transparent color (-1 = none) */ + int colors; /* number of colors */ + unsigned char *p; /* bitmap */ + unsigned char *pal; /* palette */ + + IFFImage() : w(0), h(0), colors(0), p(0), pal(0) {} + ~IFFImage() { delete [] p; delete [] pal; } +}; + +class WXDLLEXPORT wxIFFDecoder +{ +private: + IFFImage *m_image; // image data + wxInputStream *m_f; // input stream + unsigned char *databuf; + unsigned char *decomp_mem; + + void Destroy(); + +public: + // get data of current frame + unsigned char* GetData() const; + unsigned char* GetPalette() const; + int GetNumColors() const; + unsigned int GetWidth() const; + unsigned int GetHeight() const; + int GetTransparentColour() const; + + // constructor, destructor, etc. + wxIFFDecoder(wxInputStream *s); + ~wxIFFDecoder() { Destroy(); } + + // NOTE: this function modifies the current stream position + bool CanRead(); + + int ReadIFF(); + bool ConvertToImage(wxImage *image) const; +}; + + +//--------------------------------------------------------------------------- +// wxIFFDecoder constructor and destructor +//--------------------------------------------------------------------------- + +wxIFFDecoder::wxIFFDecoder(wxInputStream *s) +{ + m_f = s; + m_image = 0; + databuf = 0; + decomp_mem = 0; +} + +void wxIFFDecoder::Destroy() +{ + wxDELETE(m_image); + wxDELETEA(databuf); + wxDELETEA(decomp_mem); +} + +//--------------------------------------------------------------------------- +// Convert this image to a wxImage object +//--------------------------------------------------------------------------- + +// This function was designed by Vaclav Slavik + +bool wxIFFDecoder::ConvertToImage(wxImage *image) const +{ + // just in case... + image->Destroy(); + + // create the image + image->Create(GetWidth(), GetHeight()); + + if (!image->IsOk()) + return false; + + unsigned char *pal = GetPalette(); + unsigned char *src = GetData(); + unsigned char *dst = image->GetData(); + int colors = GetNumColors(); + int transparent = GetTransparentColour(); + long i; + + // set transparent colour mask + if (transparent != -1) + { + for (i = 0; i < colors; i++) + { + if ((pal[3 * i + 0] == 255) && + (pal[3 * i + 1] == 0) && + (pal[3 * i + 2] == 255)) + { + pal[3 * i + 2] = 254; + } + } + + pal[3 * transparent + 0] = 255, + pal[3 * transparent + 1] = 0, + pal[3 * transparent + 2] = 255; + + image->SetMaskColour(255, 0, 255); + } + else + image->SetMask(false); + +#if wxUSE_PALETTE + if (pal && colors > 0) + { + unsigned char* r = new unsigned char[colors]; + unsigned char* g = new unsigned char[colors]; + unsigned char* b = new unsigned char[colors]; + + for (i = 0; i < colors; i++) + { + r[i] = pal[3*i + 0]; + g[i] = pal[3*i + 1]; + b[i] = pal[3*i + 2]; + } + + image->SetPalette(wxPalette(colors, r, g, b)); + + delete [] r; + delete [] g; + delete [] b; + } +#endif // wxUSE_PALETTE + + // copy image data + for (i = 0; i < (long)(GetWidth() * GetHeight()); i++, src += 3, dst += 3) + { + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + } + + return true; +} + + +//--------------------------------------------------------------------------- +// Data accessors +//--------------------------------------------------------------------------- + +// Get data for current frame + +unsigned char* wxIFFDecoder::GetData() const { return (m_image->p); } +unsigned char* wxIFFDecoder::GetPalette() const { return (m_image->pal); } +int wxIFFDecoder::GetNumColors() const { return m_image->colors; } +unsigned int wxIFFDecoder::GetWidth() const { return (m_image->w); } +unsigned int wxIFFDecoder::GetHeight() const { return (m_image->h); } +int wxIFFDecoder::GetTransparentColour() const { return m_image->transparent; } + +//--------------------------------------------------------------------------- +// IFF reading and decoding +//--------------------------------------------------------------------------- + +// +// CanRead: +// Returns true if the file looks like a valid IFF, false otherwise. +// +bool wxIFFDecoder::CanRead() +{ + unsigned char buf[12]; + + if ( !m_f->Read(buf, WXSIZEOF(buf)) ) + return false; + + return (memcmp(buf, "FORM", 4) == 0) && (memcmp(buf+8, "ILBM", 4) == 0); +} + + +// ReadIFF: +// Based on xv source code by Thomas Meyer +// Permission for use in wxWidgets has been gratefully given. + +typedef unsigned char byte; +#define IFFDEBUG 0 + +/************************************************************************* +void decomprle(source, destination, source length, buffer size) + +Decompress run-length encoded data from source to destination. Terminates +when source is decoded completely or destination buffer is full. + +The decruncher is as optimized as I could make it, without risking +safety in case of corrupt BODY chunks. +**************************************************************************/ + +static void decomprle(const byte *sptr, byte *dptr, long slen, long dlen) +{ + byte codeByte, dataByte; + + while ((slen > 0) && (dlen > 0)) { + // read control byte + codeByte = *sptr++; + + if (codeByte < 0x80) { + codeByte++; + if ((slen > (long) codeByte) && (dlen >= (long) codeByte)) { + slen -= codeByte + 1; + dlen -= codeByte; + while (codeByte > 0) { + *dptr++ = *sptr++; + codeByte--; + } + } + else slen = 0; + } + + else if (codeByte > 0x80) { + codeByte = 0x81 - (codeByte & 0x7f); + if ((slen > (long) 0) && (dlen >= (long) codeByte)) { + dataByte = *sptr++; + slen -= 2; + dlen -= codeByte; + while (codeByte > 0) { + *dptr++ = dataByte; + codeByte--; + } + } + else slen = 0; + } + } +} + +/******************************************/ +static unsigned int iff_getword(const byte *ptr) +{ + unsigned int v; + + v = *ptr++; + v = (v << 8) + *ptr; + return v; +} + +/******************************************/ +static unsigned long iff_getlong(const byte *ptr) +{ + unsigned long l; + + l = *ptr++; + l = (l << 8) + *ptr++; + l = (l << 8) + *ptr++; + l = (l << 8) + *ptr; + return l; +} + +// Define internal ILBM types +#define ILBM_NORMAL 0 +#define ILBM_EHB 1 +#define ILBM_HAM 2 +#define ILBM_HAM8 3 +#define ILBM_24BIT 4 + +int wxIFFDecoder::ReadIFF() +{ + Destroy(); + + m_image = new IFFImage(); + if (m_image == 0) { + Destroy(); + return wxIFF_MEMERR; + } + + // compute file length + wxFileOffset currentPos = m_f->TellI(); + if (m_f->SeekI(0, wxFromEnd) == wxInvalidOffset) { + Destroy(); + return wxIFF_MEMERR; + } + + long filesize = m_f->TellI(); + if (m_f->SeekI(currentPos, wxFromStart) == wxInvalidOffset) { + Destroy(); + return wxIFF_MEMERR; + } + + // allocate memory for complete file + if ((databuf = new byte[filesize]) == 0) { + Destroy(); + return wxIFF_MEMERR; + } + + m_f->Read(databuf, filesize); + const byte *dataend = databuf + filesize; + + // initialize work pointer. used to trace the buffer for IFF chunks + const byte *dataptr = databuf; + + // check for minmal size + if (dataptr + 12 > dataend) { + Destroy(); + return wxIFF_INVFORMAT; + } + + // check if we really got an IFF file + if (strncmp((char *)dataptr, "FORM", 4) != 0) { + Destroy(); + return wxIFF_INVFORMAT; + } + + dataptr = dataptr + 8; // skip ID and length of FORM + + // check if the IFF file is an ILBM (picture) file + if (strncmp((char *) dataptr, "ILBM", 4) != 0) { + Destroy(); + return wxIFF_INVFORMAT; + } + + wxLogTrace(wxT("iff"), wxT("IFF ILBM file recognized")); + + dataptr = dataptr + 4; // skip ID + + // + // main decoding loop. searches IFF chunks and handles them. + // terminates when BODY chunk was found or dataptr ran over end of file + // + bool BMHDok = false, CAMGok = false; + int bmhd_width = 0, bmhd_height = 0, bmhd_bitplanes = 0, bmhd_transcol = -1; + byte bmhd_compression = 0; + long camg_viewmode = 0; + int colors = 0; + while (dataptr + 8 <= dataend) { + // get chunk length and make even + long chunkLen = (iff_getlong(dataptr + 4) + 1) & 0xfffffffe; + if (chunkLen < 0) { // format error? + break; + } + bool truncated = (dataptr + 8 + chunkLen > dataend); + + if (strncmp((char *)dataptr, "BMHD", 4) == 0) { // BMHD chunk? + if (chunkLen < 12 + 2 || truncated) { + break; + } + bmhd_width = iff_getword(dataptr + 8); // width of picture + bmhd_height= iff_getword(dataptr + 8 + 2); // height of picture + bmhd_bitplanes = *(dataptr + 8 + 8); // # of bitplanes + // bmhd_masking = *(dataptr + 8 + 9); -- unused currently + bmhd_compression = *(dataptr + 8 + 10); // get compression + bmhd_transcol = iff_getword(dataptr + 8 + 12); + BMHDok = true; // got BMHD + dataptr += 8 + chunkLen; // to next chunk + } + else if (strncmp((char *)dataptr, "CMAP", 4) == 0) { // CMAP ? + if (truncated) { + break; + } + const byte *cmapptr = dataptr + 8; + colors = chunkLen / 3; // calc no of colors + + wxDELETE(m_image->pal); + m_image->colors = colors; + if (colors > 0) { + m_image->pal = new byte[3*colors]; + if (!m_image->pal) { + Destroy(); + return wxIFF_MEMERR; + } + + // copy colors to color map + for (int i=0; i < colors; i++) { + m_image->pal[3*i + 0] = *cmapptr++; + m_image->pal[3*i + 1] = *cmapptr++; + m_image->pal[3*i + 2] = *cmapptr++; + } + } + + wxLogTrace(wxT("iff"), wxT("Read %d colors from IFF file."), + colors); + + dataptr += 8 + chunkLen; // to next chunk + } else if (strncmp((char *)dataptr, "CAMG", 4) == 0) { // CAMG ? + if (chunkLen < 4 || truncated) { + break; + } + camg_viewmode = iff_getlong(dataptr + 8); // get viewmodes + CAMGok = true; // got CAMG + dataptr += 8 + chunkLen; // to next chunk + } + else if (strncmp((char *)dataptr, "BODY", 4) == 0) { // BODY ? + if (!BMHDok) { // BMHD found? + break; + } + const byte *bodyptr = dataptr + 8; // -> BODY data + + if (truncated) { + chunkLen = dataend - dataptr; + } + + // + // if BODY is compressed, allocate buffer for decrunched BODY + // and decompress it (run length encoding) + // + if (bmhd_compression == 1) { + // calc size of decrunch buffer - (size of the actual pic. + // decompressed in interleaved Amiga bitplane format) + + size_t decomp_bufsize = (((bmhd_width + 15) >> 4) << 1) + * bmhd_height * bmhd_bitplanes; + + if ((decomp_mem = new byte[decomp_bufsize]) == 0) { + Destroy(); + return wxIFF_MEMERR; + } + + decomprle(bodyptr, decomp_mem, chunkLen, decomp_bufsize); + bodyptr = decomp_mem; // -> uncompressed BODY + chunkLen = decomp_bufsize; + wxDELETEA(databuf); + } + + // the following determines the type of the ILBM file. + // it's either NORMAL, EHB, HAM, HAM8 or 24BIT + + int fmt = ILBM_NORMAL; // assume normal ILBM + if (bmhd_bitplanes == 24) { + fmt = ILBM_24BIT; + } else if (bmhd_bitplanes == 8) { + if (CAMGok && (camg_viewmode & 0x800)) { + fmt = ILBM_HAM8; + } + } else if ((bmhd_bitplanes > 5) && CAMGok) { + if (camg_viewmode & 0x80) { + fmt = ILBM_EHB; + } else if (camg_viewmode & 0x800) { + fmt = ILBM_HAM; + } + } + + wxLogTrace(wxT("iff"), + wxT("LoadIFF: %s %dx%d, planes=%d (%d cols), comp=%d"), + (fmt==ILBM_NORMAL) ? "Normal ILBM" : + (fmt==ILBM_HAM) ? "HAM ILBM" : + (fmt==ILBM_HAM8) ? "HAM8 ILBM" : + (fmt==ILBM_EHB) ? "EHB ILBM" : + (fmt==ILBM_24BIT) ? "24BIT ILBM" : "unknown ILBM", + bmhd_width, bmhd_height, bmhd_bitplanes, + 1< m_image->colors) { + byte *pal = new byte[colors*3]; + if (!pal) { + Destroy(); + return wxIFF_MEMERR; + } + int i; + for (i = 0; i < m_image->colors; i++) { + pal[3*i + 0] = m_image->pal[3*i + 0]; + pal[3*i + 1] = m_image->pal[3*i + 1]; + pal[3*i + 2] = m_image->pal[3*i + 2]; + } + for (; i < colors; i++) { + pal[3*i + 0] = 0; + pal[3*i + 1] = 0; + pal[3*i + 2] = 0; + } + delete m_image->pal; + m_image->pal = pal; + m_image->colors = colors; + } + + for (int i=0; i < colors; i++) { + m_image->pal[3*i + 0] = (m_image->pal[3*i + 0] >> 4) * 17; + m_image->pal[3*i + 1] = (m_image->pal[3*i + 1] >> 4) * 17; + m_image->pal[3*i + 2] = (m_image->pal[3*i + 2] >> 4) * 17; + } + } + + m_image->p = new byte[bmhd_width * bmhd_height * 3]; + byte *picptr = m_image->p; + if (!picptr) { + Destroy(); + return wxIFF_MEMERR; + } + + byte *pal = m_image->pal; + int lineskip = ((bmhd_width + 15) >> 4) << 1; + int height = chunkLen / (lineskip * bmhd_bitplanes); + + if (bmhd_height < height) { + height = bmhd_height; + } + + if (fmt == ILBM_HAM || fmt == ILBM_HAM8 || fmt == ILBM_24BIT) { + byte *pic = picptr; + const byte *workptr = bodyptr; + + for (int i=0; i < height; i++) { + byte bitmsk = 0x80; + const byte *workptr2 = workptr; + + // at start of each line, init RGB values to background + byte rval = pal[0]; + byte gval = pal[1]; + byte bval = pal[2]; + + for (int j=0; j < bmhd_width; j++) { + long col = 0; + long colbit = 1; + const byte *workptr3 = workptr2; + for (int k=0; k < bmhd_bitplanes; k++) { + if (*workptr3 & bitmsk) { + col += colbit; + } + workptr3 += lineskip; + colbit <<= 1; + } + + if (fmt==ILBM_HAM) { + int c = (col & 0x0f); + switch (col & 0x30) { + case 0x00: if (c >= 0 && c < colors) { + rval = pal[3*c + 0]; + gval = pal[3*c + 1]; + bval = pal[3*c + 2]; + } + break; + + case 0x10: bval = c * 17; + break; + + case 0x20: rval = c * 17; + break; + + case 0x30: gval = c * 17; + break; + } + } else if (fmt == ILBM_HAM8) { + int c = (col & 0x3f); + switch(col & 0xc0) { + case 0x00: if (c >= 0 && c < colors) { + rval = pal[3*c + 0]; + gval = pal[3*c + 1]; + bval = pal[3*c + 2]; + } + break; + + case 0x40: bval = (bval & 3) | (c << 2); + break; + + case 0x80: rval = (rval & 3) | (c << 2); + break; + + case 0xc0: gval = (rval & 3) | (c << 2); + } + } else { + rval = col & 0xff; + gval = (col >> 8) & 0xff; + bval = (col >> 16) & 0xff; + } + + *pic++ = rval; + *pic++ = gval; + *pic++ = bval; + + bitmsk = bitmsk >> 1; + if (bitmsk == 0) { + bitmsk = 0x80; + workptr2++; + } + } + workptr += lineskip * bmhd_bitplanes; + } + } else if ((fmt == ILBM_NORMAL) || (fmt == ILBM_EHB)) { + if (fmt == ILBM_EHB) { + wxLogTrace(wxT("iff"), wxT("Doubling CMAP for EHB mode")); + + for (int i=0; i<32; i++) { + pal[3*(i + 32) + 0] = pal[3*i + 0] >> 1; + pal[3*(i + 32) + 1] = pal[3*i + 1] >> 1; + pal[3*(i + 32) + 2] = pal[3*i + 2] >> 1; + } + } + + byte *pic = picptr; // ptr to buffer + const byte *workptr = bodyptr; // ptr to pic, planar format + + if (bmhd_height < height) { + height = bmhd_height; + } + + for (int i=0; i < height; i++) { + byte bitmsk = 0x80; // left most bit (mask) + const byte *workptr2 = workptr; // work ptr to source + for (int j=0; j < bmhd_width; j++) { + long col = 0; + long colbit = 1; + const byte *workptr3 = workptr2; // 1st byte in 1st pln + + for (int k=0; k < bmhd_bitplanes; k++) { + if (*workptr3 & bitmsk) { // if bit set in this pln + col = col + colbit; // add bit to chunky byte + } + workptr3 += lineskip; // go to next line + colbit <<= 1; // shift color bit + } + + if (col >= 0 && col < colors) { + pic[0] = pal[3*col + 0]; + pic[1] = pal[3*col + 1]; + pic[2] = pal[3*col + 2]; + } else { + pic[0] = pic[1] = pic[2] = 0; + } + pic += 3; + bitmsk = bitmsk >> 1; // shift mask to next bit + if (bitmsk == 0) { // if mask is zero + bitmsk = 0x80; // reset mask + workptr2++; // mv ptr to next byte + } + } + + workptr += lineskip * bmhd_bitplanes; // to next line + } + } else { + break; // unknown format + } + + m_image->w = bmhd_width; + m_image->h = height; + m_image->transparent = bmhd_transcol; + + wxLogTrace(wxT("iff"), wxT("Loaded IFF picture %s"), + truncated? "truncated" : "completely"); + + return (truncated? wxIFF_TRUNCATED : wxIFF_OK); + } else { + wxLogTrace(wxT("iff"), wxT("Skipping unknown chunk '%c%c%c%c'"), + *dataptr, *(dataptr+1), *(dataptr+2), *(dataptr+3)); + + dataptr = dataptr + 8 + chunkLen; // skip unknown chunk + } + } + + Destroy(); + return wxIFF_INVFORMAT; +} + + + +//----------------------------------------------------------------------------- +// wxIFFHandler +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxIFFHandler, wxImageHandler) + +#if wxUSE_STREAMS + +bool wxIFFHandler::LoadFile(wxImage *image, wxInputStream& stream, + bool verbose, int WXUNUSED(index)) +{ + wxIFFDecoder *decod; + int error; + bool ok; + + decod = new wxIFFDecoder(&stream); + error = decod->ReadIFF(); + + if ((error != wxIFF_OK) && (error != wxIFF_TRUNCATED)) + { + if (verbose) + { + switch (error) + { + case wxIFF_INVFORMAT: + wxLogError(_("IFF: error in IFF image format.")); + break; + case wxIFF_MEMERR: + wxLogError(_("IFF: not enough memory.")); + break; + default: + wxLogError(_("IFF: unknown error!!!")); + break; + } + } + delete decod; + return false; + } + + if ((error == wxIFF_TRUNCATED) && verbose) + { + wxLogError(_("IFF: data stream seems to be truncated.")); + /* go on; image data is OK */ + } + + ok = decod->ConvertToImage(image); + delete decod; + + return ok; +} + +bool wxIFFHandler::SaveFile(wxImage * WXUNUSED(image), + wxOutputStream& WXUNUSED(stream), bool verbose) +{ + if (verbose) + { + wxLogDebug(wxT("IFF: the handler is read-only!!")); + } + + return false; +} + +bool wxIFFHandler::DoCanRead(wxInputStream& stream) +{ + wxIFFDecoder decod(&stream); + + return decod.CanRead(); + // it's ok to modify the stream position here +} + +#endif // wxUSE_STREAMS + +#endif // wxUSE_IFF diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imagjpeg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagjpeg.cpp new file mode 100644 index 0000000000..44a3af81d2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagjpeg.cpp @@ -0,0 +1,506 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imagjpeg.cpp +// Purpose: wxImage JPEG handler +// Author: Vaclav Slavik +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE && wxUSE_LIBJPEG + +#include "wx/imagjpeg.h" +#include "wx/versioninfo.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/app.h" + #include "wx/intl.h" + #include "wx/bitmap.h" + #include "wx/module.h" +#endif + +// A hack based on one from tif_jpeg.c to overcome the problem on Windows +// of rpcndr.h defining boolean with a different type to the jpeg headers. +// +// This hack is only necessary for an external jpeg library, the builtin one +// usually used on Windows doesn't use the type boolean, so always works. +// +#ifdef wxHACK_BOOLEAN + #define HAVE_BOOLEAN + #define boolean wxHACK_BOOLEAN +#endif + +extern "C" +{ + #if defined(__WXMSW__) + #define XMD_H + #endif + #include "jpeglib.h" +} + +#ifndef HAVE_WXJPEG_BOOLEAN +typedef boolean wxjpeg_boolean; +#endif + +#include "wx/filefn.h" +#include "wx/wfstream.h" + +// For memcpy +#include +// For JPEG library error handling +#include + +// ---------------------------------------------------------------------------- +// types +// ---------------------------------------------------------------------------- + +// the standard definition of METHODDEF(type) from jmorecfg.h is "static type" +// which means that we can't declare the method functions as extern "C" - the +// compiler (rightfully) complains about the multiple storage classes in +// declaration +// +// so we only add extern "C" when using our own, modified, jmorecfg.h - and use +// whatever we have in the system headers if this is what we use hoping that it +// should be ok (can't do anything else) +#ifdef JPEG_METHOD_LINKAGE + #define CPP_METHODDEF(type) extern "C" METHODDEF(type) +#else // not using our jmorecfg.h header + #define CPP_METHODDEF(type) METHODDEF(type) +#endif + +//----------------------------------------------------------------------------- +// wxJPEGHandler +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxJPEGHandler,wxImageHandler) + +#if wxUSE_STREAMS + +//------------- JPEG Data Source Manager + +#define JPEG_IO_BUFFER_SIZE 2048 + +typedef struct { + struct jpeg_source_mgr pub; /* public fields */ + + JOCTET* buffer; /* start of buffer */ + wxInputStream *stream; +} wx_source_mgr; + +typedef wx_source_mgr * wx_src_ptr; + +extern "C" +{ + +CPP_METHODDEF(void) wx_init_source ( j_decompress_ptr WXUNUSED(cinfo) ) +{ +} + +CPP_METHODDEF(wxjpeg_boolean) wx_fill_input_buffer ( j_decompress_ptr cinfo ) +{ + wx_src_ptr src = (wx_src_ptr) cinfo->src; + + src->pub.next_input_byte = src->buffer; + src->pub.bytes_in_buffer = src->stream->Read(src->buffer, JPEG_IO_BUFFER_SIZE).LastRead(); + + if (src->pub.bytes_in_buffer == 0) // check for end-of-stream + { + // Insert a fake EOI marker + src->buffer[0] = 0xFF; + src->buffer[1] = JPEG_EOI; + src->pub.bytes_in_buffer = 2; + } + return TRUE; +} + +CPP_METHODDEF(void) wx_skip_input_data ( j_decompress_ptr cinfo, long num_bytes ) +{ + if (num_bytes > 0) + { + wx_src_ptr src = (wx_src_ptr) cinfo->src; + + while (num_bytes > (long)src->pub.bytes_in_buffer) + { + num_bytes -= (long) src->pub.bytes_in_buffer; + src->pub.fill_input_buffer(cinfo); + } + src->pub.next_input_byte += (size_t) num_bytes; + src->pub.bytes_in_buffer -= (size_t) num_bytes; + } +} + +CPP_METHODDEF(void) wx_term_source ( j_decompress_ptr cinfo ) +{ + wx_src_ptr src = (wx_src_ptr) cinfo->src; + + if (src->pub.bytes_in_buffer > 0) + src->stream->SeekI(-(long)src->pub.bytes_in_buffer, wxFromCurrent); + delete[] src->buffer; +} + + +// JPEG error manager: + +struct wx_error_mgr : public jpeg_error_mgr +{ + jmp_buf setjmp_buffer; /* for return to caller */ +}; + +/* + * Here's the routine that will replace the standard error_exit method: + */ + +CPP_METHODDEF(void) wx_error_exit (j_common_ptr cinfo) +{ + /* cinfo->err really points to a wx_error_mgr struct, so coerce pointer */ + wx_error_mgr * const jerr = (wx_error_mgr *) cinfo->err; + + /* Always display the message. */ + /* We could postpone this until after returning, if we chose. */ + (*cinfo->err->output_message) (cinfo); + + /* Return control to the setjmp point */ + longjmp(jerr->setjmp_buffer, 1); +} + +/* + * This will replace the standard output_message method when the user + * wants us to be silent (verbose==false). We must have such method instead of + * simply using NULL for cinfo->err->output_message because it's called + * unconditionally from within libjpeg when there's "garbage input". + */ +CPP_METHODDEF(void) wx_ignore_message (j_common_ptr WXUNUSED(cinfo)) +{ +} + +void wx_jpeg_io_src( j_decompress_ptr cinfo, wxInputStream& infile ) +{ + wx_src_ptr src; + + if (cinfo->src == NULL) { /* first time for this JPEG object? */ + cinfo->src = (struct jpeg_source_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + sizeof(wx_source_mgr)); + } + src = (wx_src_ptr) cinfo->src; + src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ + src->buffer = new JOCTET[JPEG_IO_BUFFER_SIZE]; + src->pub.next_input_byte = NULL; /* until buffer loaded */ + src->stream = &infile; + + src->pub.init_source = wx_init_source; + src->pub.fill_input_buffer = wx_fill_input_buffer; + src->pub.skip_input_data = wx_skip_input_data; + src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ + src->pub.term_source = wx_term_source; +} + +} // extern "C" + +static inline void wx_cmyk_to_rgb(unsigned char* rgb, const unsigned char* cmyk) +{ + int k = 255 - cmyk[3]; + int k2 = cmyk[3]; + int c; + + c = k + k2 * (255 - cmyk[0]) / 255; + rgb[0] = (unsigned char)((c > 255) ? 0 : (255 - c)); + + c = k + k2 * (255 - cmyk[1]) / 255; + rgb[1] = (unsigned char)((c > 255) ? 0 : (255 - c)); + + c = k + k2 * (255 - cmyk[2]) / 255; + rgb[2] = (unsigned char)((c > 255) ? 0 : (255 - c)); +} + +// temporarily disable the warning C4611 (interaction between '_setjmp' and +// C++ object destruction is non-portable) - I don't see any dtors here +#ifdef __VISUALC__ + #pragma warning(disable:4611) +#endif /* VC++ */ + +bool wxJPEGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) ) +{ + wxCHECK_MSG( image, false, "NULL image pointer" ); + + struct jpeg_decompress_struct cinfo; + wx_error_mgr jerr; + unsigned char *ptr; + + // save this before calling Destroy() + const unsigned maxWidth = image->GetOptionInt(wxIMAGE_OPTION_MAX_WIDTH), + maxHeight = image->GetOptionInt(wxIMAGE_OPTION_MAX_HEIGHT); + image->Destroy(); + + cinfo.err = jpeg_std_error( &jerr ); + jerr.error_exit = wx_error_exit; + + if (!verbose) + cinfo.err->output_message = wx_ignore_message; + + /* Establish the setjmp return context for wx_error_exit to use. */ + if (setjmp(jerr.setjmp_buffer)) { + /* If we get here, the JPEG code has signaled an error. + * We need to clean up the JPEG object, close the input file, and return. + */ + if (verbose) + { + wxLogError(_("JPEG: Couldn't load - file is probably corrupted.")); + } + (cinfo.src->term_source)(&cinfo); + jpeg_destroy_decompress(&cinfo); + if (image->IsOk()) image->Destroy(); + return false; + } + + jpeg_create_decompress( &cinfo ); + wx_jpeg_io_src( &cinfo, stream ); + jpeg_read_header( &cinfo, TRUE ); + + int bytesPerPixel; + if ((cinfo.out_color_space == JCS_CMYK) || (cinfo.out_color_space == JCS_YCCK)) + { + cinfo.out_color_space = JCS_CMYK; + bytesPerPixel = 4; + } + else // all the rest is treated as RGB + { + cinfo.out_color_space = JCS_RGB; + bytesPerPixel = 3; + } + + // scale the picture to fit in the specified max size if necessary + if ( maxWidth > 0 || maxHeight > 0 ) + { + unsigned& scale = cinfo.scale_denom; + while ( (maxWidth && (cinfo.image_width / scale > maxWidth)) || + (maxHeight && (cinfo.image_height / scale > maxHeight)) ) + { + scale *= 2; + } + } + + jpeg_start_decompress( &cinfo ); + + image->Create( cinfo.output_width, cinfo.output_height ); + if (!image->IsOk()) { + jpeg_finish_decompress( &cinfo ); + jpeg_destroy_decompress( &cinfo ); + return false; + } + image->SetMask( false ); + ptr = image->GetData(); + + unsigned stride = cinfo.output_width * bytesPerPixel; + JSAMPARRAY tempbuf = (*cinfo.mem->alloc_sarray) + ((j_common_ptr) &cinfo, JPOOL_IMAGE, stride, 1 ); + + while ( cinfo.output_scanline < cinfo.output_height ) + { + jpeg_read_scanlines( &cinfo, tempbuf, 1 ); + if (cinfo.out_color_space == JCS_RGB) + { + memcpy( ptr, tempbuf[0], stride ); + ptr += stride; + } + else // CMYK + { + const unsigned char* inptr = (const unsigned char*) tempbuf[0]; + for (size_t i = 0; i < cinfo.output_width; i++) + { + wx_cmyk_to_rgb(ptr, inptr); + ptr += 3; + inptr += 4; + } + } + } + + // set up resolution if available: it's part of optional JFIF APP0 chunk + if ( cinfo.saw_JFIF_marker ) + { + image->SetOption(wxIMAGE_OPTION_RESOLUTIONX, cinfo.X_density); + image->SetOption(wxIMAGE_OPTION_RESOLUTIONY, cinfo.Y_density); + + // we use the same values for this option as libjpeg so we don't need + // any conversion here + image->SetOption(wxIMAGE_OPTION_RESOLUTIONUNIT, cinfo.density_unit); + } + + if ( cinfo.image_width != cinfo.output_width || cinfo.image_height != cinfo.output_height ) + { + // save the original image size + image->SetOption(wxIMAGE_OPTION_ORIGINAL_WIDTH, cinfo.image_width); + image->SetOption(wxIMAGE_OPTION_ORIGINAL_HEIGHT, cinfo.image_height); + } + + jpeg_finish_decompress( &cinfo ); + jpeg_destroy_decompress( &cinfo ); + return true; +} + +typedef struct { + struct jpeg_destination_mgr pub; + + wxOutputStream *stream; + JOCTET * buffer; +} wx_destination_mgr; + +typedef wx_destination_mgr * wx_dest_ptr; + +#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */ + +extern "C" +{ + +CPP_METHODDEF(void) wx_init_destination (j_compress_ptr cinfo) +{ + wx_dest_ptr dest = (wx_dest_ptr) cinfo->dest; + + /* Allocate the output buffer --- it will be released when done with image */ + dest->buffer = (JOCTET *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + OUTPUT_BUF_SIZE * sizeof(JOCTET)); + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; +} + +CPP_METHODDEF(wxjpeg_boolean) wx_empty_output_buffer (j_compress_ptr cinfo) +{ + wx_dest_ptr dest = (wx_dest_ptr) cinfo->dest; + + dest->stream->Write(dest->buffer, OUTPUT_BUF_SIZE); + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; + return TRUE; +} + +CPP_METHODDEF(void) wx_term_destination (j_compress_ptr cinfo) +{ + wx_dest_ptr dest = (wx_dest_ptr) cinfo->dest; + size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer; + /* Write any data remaining in the buffer */ + if (datacount > 0) + dest->stream->Write(dest->buffer, datacount); +} + +GLOBAL(void) wx_jpeg_io_dest (j_compress_ptr cinfo, wxOutputStream& outfile) +{ + wx_dest_ptr dest; + + if (cinfo->dest == NULL) { /* first time for this JPEG object? */ + cinfo->dest = (struct jpeg_destination_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + sizeof(wx_destination_mgr)); + } + + dest = (wx_dest_ptr) cinfo->dest; + dest->pub.init_destination = wx_init_destination; + dest->pub.empty_output_buffer = wx_empty_output_buffer; + dest->pub.term_destination = wx_term_destination; + dest->stream = &outfile; +} + +} // extern "C" + +bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbose ) +{ + struct jpeg_compress_struct cinfo; + wx_error_mgr jerr; + JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ + JSAMPLE *image_buffer; + int stride; /* physical row width in image buffer */ + + cinfo.err = jpeg_std_error(&jerr); + jerr.error_exit = wx_error_exit; + + if (!verbose) + cinfo.err->output_message = wx_ignore_message; + + /* Establish the setjmp return context for wx_error_exit to use. */ + if (setjmp(jerr.setjmp_buffer)) + { + /* If we get here, the JPEG code has signaled an error. + * We need to clean up the JPEG object, close the input file, and return. + */ + if (verbose) + { + wxLogError(_("JPEG: Couldn't save image.")); + } + jpeg_destroy_compress(&cinfo); + return false; + } + + jpeg_create_compress(&cinfo); + wx_jpeg_io_dest(&cinfo, stream); + + cinfo.image_width = image->GetWidth(); + cinfo.image_height = image->GetHeight(); + cinfo.input_components = 3; + cinfo.in_color_space = JCS_RGB; + jpeg_set_defaults(&cinfo); + + // TODO: 3rd parameter is force_baseline, what value should this be? + // Code says: "If force_baseline is TRUE, the computed quantization table entries + // are limited to 1..255 for JPEG baseline compatibility." + // 'Quality' is a number between 0 (terrible) and 100 (very good). + // The default (in jcparam.c, jpeg_set_defaults) is 75, + // and force_baseline is TRUE. + if (image->HasOption(wxIMAGE_OPTION_QUALITY)) + jpeg_set_quality(&cinfo, image->GetOptionInt(wxIMAGE_OPTION_QUALITY), TRUE); + + // set the resolution fields in the output file + int resX, resY; + wxImageResolution res = GetResolutionFromOptions(*image, &resX, &resY); + if ( res != wxIMAGE_RESOLUTION_NONE ) + { + cinfo.X_density = resX; + cinfo.Y_density = resY; + + // it so happens that wxIMAGE_RESOLUTION_INCHES/CM values are the same + // ones as used by libjpeg, so we can assign them directly + cinfo.density_unit = res; + } + + jpeg_start_compress(&cinfo, TRUE); + + stride = cinfo.image_width * 3; /* JSAMPLEs per row in image_buffer */ + image_buffer = image->GetData(); + while (cinfo.next_scanline < cinfo.image_height) { + row_pointer[0] = &image_buffer[cinfo.next_scanline * stride]; + jpeg_write_scanlines( &cinfo, row_pointer, 1 ); + } + jpeg_finish_compress(&cinfo); + jpeg_destroy_compress(&cinfo); + + return true; +} + +#ifdef __VISUALC__ + #pragma warning(default:4611) +#endif /* VC++ */ + +bool wxJPEGHandler::DoCanRead( wxInputStream& stream ) +{ + unsigned char hdr[2]; + + if ( !stream.Read(hdr, WXSIZEOF(hdr)) ) // it's ok to modify the stream position here + return false; + + return hdr[0] == 0xFF && hdr[1] == 0xD8; +} + +#endif // wxUSE_STREAMS + +/*static*/ wxVersionInfo wxJPEGHandler::GetLibraryVersionInfo() +{ + return wxVersionInfo("libjpeg", JPEG_LIB_VERSION/10, JPEG_LIB_VERSION%10); +} + +#endif // wxUSE_LIBJPEG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imagpcx.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagpcx.cpp new file mode 100644 index 0000000000..2d4d18c1b2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagpcx.cpp @@ -0,0 +1,501 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imagpcx.cpp +// Purpose: wxImage PCX handler +// Author: Guillermo Rodriguez Garcia +// Version: 1.1 +// Copyright: (c) 1999 Guillermo Rodriguez Garcia +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE && wxUSE_PCX + +#ifndef WX_PRECOMP + #include "wx/object.h" + #include "wx/list.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/palette.h" + #include "wx/hash.h" + #include "wx/module.h" +#endif + +#include "wx/imagpcx.h" +#include "wx/wfstream.h" + +//----------------------------------------------------------------------------- +// wxPCXHandler +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxPCXHandler,wxImageHandler) + +#if wxUSE_STREAMS + +//----------------------------------------------------------------------------- +// RLE encoding and decoding +//----------------------------------------------------------------------------- + +void RLEencode(unsigned char *p, unsigned int size, wxOutputStream& s) +{ + unsigned int data, last, cont; + + // Write 'size' bytes. The PCX official specs say there will be + // a decoding break at the end of each scanline, so in order to + // force this decoding break use this function to write, at most, + // _one_ complete scanline at a time. + + last = (unsigned char) *(p++); + cont = 1; + size--; + + while (size-- > 0) + { + data = (unsigned char) *(p++); + + // Up to 63 bytes with the same value can be stored using + // a single { cont, value } pair. + // + if ((data == last) && (cont < 63)) + { + cont++; + } + else + { + // need to write a 'counter' byte? + if ((cont > 1) || ((last & 0xC0) == 0xC0)) + s.PutC((char) (cont | 0xC0)); + + s.PutC((char) last); + last = data; + cont = 1; + } + } + + // write the last one and return; + if ((cont > 1) || ((last & 0xC0) == 0xC0)) + s.PutC((char) (cont | 0xC0)); + + s.PutC((char) last); +} + +void RLEdecode(unsigned char *p, unsigned int size, wxInputStream& s) +{ + // Read 'size' bytes. The PCX official specs say there will be + // a decoding break at the end of each scanline (but not at the + // end of each plane inside a scanline). Only use this function + // to read one or more _complete_ scanlines. Else, more than + // 'size' bytes might be read and the buffer might overflow. + + while (size != 0) + { + unsigned int data = (unsigned char)s.GetC(); + + // If ((data & 0xC0) != 0xC0), then the value read is a data + // byte. Else, it is a counter (cont = val & 0x3F) and the + // next byte is the data byte. + + if ((data & 0xC0) != 0xC0) + { + *(p++) = (unsigned char)data; + size--; + } + else + { + unsigned int cont = data & 0x3F; + if (cont > size) // can happen only if the file is malformed + break; + data = (unsigned char)s.GetC(); + for (unsigned int i = 1; i <= cont; i++) + *(p++) = (unsigned char)data; + size -= cont; + } + } +} + + +//----------------------------------------------------------------------------- +// PCX reading and saving +//----------------------------------------------------------------------------- + +// PCX header +#define HDR_MANUFACTURER 0 +#define HDR_VERSION 1 +#define HDR_ENCODING 2 +#define HDR_BITSPERPIXEL 3 +#define HDR_XMIN 4 +#define HDR_YMIN 6 +#define HDR_XMAX 8 +#define HDR_YMAX 10 +#define HDR_NPLANES 65 +#define HDR_BYTESPERLINE 66 +#define HDR_PALETTEINFO 68 + +// image formats +enum { + wxPCX_8BIT, // 8 bpp, 1 plane (8 bit) + wxPCX_24BIT // 8 bpp, 3 planes (24 bit) +}; + +// error codes +enum { + wxPCX_OK = 0, // everything was OK + wxPCX_INVFORMAT = 1, // error in pcx file format + wxPCX_MEMERR = 2, // error allocating memory + wxPCX_VERERR = 3 // error in pcx version number +}; + + +// ReadPCX: +// Loads a PCX file into the wxImage object pointed by image. +// Returns wxPCX_OK on success, or an error code otherwise +// (see above for error codes) +// +int ReadPCX(wxImage *image, wxInputStream& stream) +{ + unsigned char hdr[128]; // PCX header + unsigned char pal[768]; // palette for 8 bit images + unsigned char *p; // space to store one scanline + unsigned char *dst; // pointer into wxImage data + unsigned int width, height; // size of the image + unsigned int bytesperline; // bytes per line (each plane) + int bitsperpixel; // bits per pixel (each plane) + int nplanes; // number of planes + int encoding; // is the image RLE encoded? + int format; // image format (8 bit, 24 bit) + unsigned int i, j; + + // Read PCX header and check the version number (it must + // be at least 5 or higher for 8 bit and 24 bit images). + + stream.Read(hdr, 128); + + if (hdr[HDR_VERSION] < 5) return wxPCX_VERERR; + + // Extract all image info from the PCX header. + + encoding = hdr[HDR_ENCODING]; + nplanes = hdr[HDR_NPLANES]; + bitsperpixel = hdr[HDR_BITSPERPIXEL]; + bytesperline = hdr[HDR_BYTESPERLINE] + 256 * hdr[HDR_BYTESPERLINE + 1]; + width = (hdr[HDR_XMAX] + 256 * hdr[HDR_XMAX + 1]) - + (hdr[HDR_XMIN] + 256 * hdr[HDR_XMIN + 1]) + 1; + height = (hdr[HDR_YMAX] + 256 * hdr[HDR_YMAX + 1]) - + (hdr[HDR_YMIN] + 256 * hdr[HDR_YMIN + 1]) + 1; + + // Check image format. Currently supported formats are + // 8 bits (8 bpp, 1 plane) and 24 bits (8 bpp, 3 planes). + + if ((nplanes == 3) && (bitsperpixel == 8)) + format = wxPCX_24BIT; + else if ((nplanes == 1) && (bitsperpixel == 8)) + format = wxPCX_8BIT; + else + return wxPCX_INVFORMAT; + + // If the image is of type wxPCX_8BIT, then there is + // a palette at the end of the image data. If we were + // working with a file, we could seek at the end to the + // end (SeekI(-769, wxFromEnd) and read the palette + // before proceeding. Unfortunately, this would prevent + // loading several PCXs in a single stream, so we can't + // do it. Thus, 8-bit images will have to be decoded in + // two passes: one to read and decode the image data, + // and another to replace 'colour indexes' with RGB + // values. + + // Resize the image and allocate memory for a scanline. + + image->Create(width, height); + + if (!image->IsOk()) + return wxPCX_MEMERR; + + if ((p = (unsigned char *) malloc(bytesperline * nplanes)) == NULL) + return wxPCX_MEMERR; + + // Now start reading the file, line by line, and store + // the data in the format required by wxImage. + + dst = image->GetData(); + + for (j = height; j; j--) + { + if (encoding) + RLEdecode(p, bytesperline * nplanes, stream); + else + stream.Read(p, bytesperline * nplanes); + + switch (format) + { + case wxPCX_8BIT: + { + for (i = 0; i < width; i++) + { + // first pass, just store the colour index + *dst = p[i]; + dst += 3; + } + break; + } + case wxPCX_24BIT: + { + for (i = 0; i < width; i++) + { + *(dst++) = p[i]; + *(dst++) = p[i + bytesperline]; + *(dst++) = p[i + 2 * bytesperline]; + } + break; + } + } + } + + free(p); + + // For 8 bit images, we read the palette, and then do a second + // pass replacing indexes with their RGB values; + + if (format == wxPCX_8BIT) + { + unsigned char index; + + if (stream.GetC() != 12) + return wxPCX_INVFORMAT; + + stream.Read(pal, 768); + + p = image->GetData(); + for (unsigned long k = height * width; k; k--) + { + index = *p; + *(p++) = pal[3 * index]; + *(p++) = pal[3 * index + 1]; + *(p++) = pal[3 * index + 2]; + } + +#if wxUSE_PALETTE + unsigned char r[256]; + unsigned char g[256]; + unsigned char b[256]; + for (i = 0; i < 256; i++) + { + r[i] = pal[3*i + 0]; + g[i] = pal[3*i + 1]; + b[i] = pal[3*i + 2]; + } + image->SetPalette(wxPalette(256, r, g, b)); +#endif // wxUSE_PALETTE + } + + return wxPCX_OK; +} + +// SavePCX: +// Saves a PCX file into the wxImage object pointed by image. +// Returns wxPCX_OK on success, or an error code otherwise +// (see above for error codes). Will try to save as 8-bit +// PCX if possible, and then fall back to 24-bit if there +// are more than 256 different colours. +// +int SavePCX(wxImage *image, wxOutputStream& stream) +{ + unsigned char hdr[128]; // PCX header + unsigned char pal[768]; // palette for 8 bit images + unsigned char *p; // space to store one scanline + unsigned char *src; // pointer into wxImage data + unsigned int width, height; // size of the image + unsigned int bytesperline; // bytes per line (each plane) + unsigned char nplanes = 3; // number of planes + int format = wxPCX_24BIT; // image format (8 bit, 24 bit) + wxImageHistogram histogram; // image histogram + unsigned long key; // key in the hashtable + unsigned int i; + + // See if we can save as 8 bit. + + if (image->CountColours(256) <= 256) + { + image->ComputeHistogram(histogram); + format = wxPCX_8BIT; + nplanes = 1; + } + + // Get image dimensions, calculate bytesperline (must be even, + // according to PCX specs) and allocate space for one complete + // scanline. + + if (!image->IsOk()) + return wxPCX_INVFORMAT; + + width = image->GetWidth(); + height = image->GetHeight(); + bytesperline = width; + if (bytesperline % 2) + bytesperline++; + + if ((p = (unsigned char *) malloc(bytesperline * nplanes)) == NULL) + return wxPCX_MEMERR; + + // Build header data and write it to the stream. Initially, + // set all bytes to zero (most values default to zero). + + memset(hdr, 0, sizeof(hdr)); + + hdr[HDR_MANUFACTURER] = 10; + hdr[HDR_VERSION] = 5; + hdr[HDR_ENCODING] = 1; + hdr[HDR_NPLANES] = nplanes; + hdr[HDR_BITSPERPIXEL] = 8; + hdr[HDR_BYTESPERLINE] = (unsigned char)(bytesperline % 256); + hdr[HDR_BYTESPERLINE + 1] = (unsigned char)(bytesperline / 256); + hdr[HDR_XMAX] = (unsigned char)((width - 1) % 256); + hdr[HDR_XMAX + 1] = (unsigned char)((width - 1) / 256); + hdr[HDR_YMAX] = (unsigned char)((height - 1) % 256); + hdr[HDR_YMAX + 1] = (unsigned char)((height - 1) / 256); + hdr[HDR_PALETTEINFO] = 1; + + stream.Write(hdr, 128); + + // Encode image data line by line and write it to the stream + + src = image->GetData(); + + for (; height; height--) + { + switch (format) + { + case wxPCX_8BIT: + { + unsigned char r, g, b; + + for (i = 0; i < width; i++) + { + r = *(src++); + g = *(src++); + b = *(src++); + key = (r << 16) | (g << 8) | b; + + p[i] = (unsigned char)histogram[key].index; + } + break; + } + case wxPCX_24BIT: + { + for (i = 0; i < width; i++) + { + p[i] = *(src++); + p[i + bytesperline] = *(src++); + p[i + 2 * bytesperline] = *(src++); + } + break; + } + } + + RLEencode(p, bytesperline * nplanes, stream); + } + + free(p); + + // For 8 bit images, build the palette and write it to the stream: + if (format == wxPCX_8BIT) + { + // zero unused colours + memset(pal, 0, sizeof(pal)); + + unsigned long index; + + for (wxImageHistogram::iterator entry = histogram.begin(); + entry != histogram.end(); ++entry ) + { + key = entry->first; + index = entry->second.index; + pal[3 * index] = (unsigned char)(key >> 16); + pal[3 * index + 1] = (unsigned char)(key >> 8); + pal[3 * index + 2] = (unsigned char)(key); + } + + stream.PutC(12); + stream.Write(pal, 768); + } + + return wxPCX_OK; +} + +//----------------------------------------------------------------------------- +// wxPCXHandler +//----------------------------------------------------------------------------- + +bool wxPCXHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) ) +{ + int error; + + if (!CanRead(stream)) + { + if (verbose) + { + wxLogError(_("PCX: this is not a PCX file.")); + } + + return false; + } + + image->Destroy(); + + if ((error = ReadPCX(image, stream)) != wxPCX_OK) + { + if (verbose) + { + switch (error) + { + case wxPCX_INVFORMAT: wxLogError(_("PCX: image format unsupported")); break; + case wxPCX_MEMERR: wxLogError(_("PCX: couldn't allocate memory")); break; + case wxPCX_VERERR: wxLogError(_("PCX: version number too low")); break; + default: wxLogError(_("PCX: unknown error !!!")); + } + } + image->Destroy(); + return false; + } + + return true; +} + +bool wxPCXHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbose ) +{ + int error; + + if ((error = SavePCX(image, stream)) != wxPCX_OK) + { + if (verbose) + { + switch (error) + { + case wxPCX_INVFORMAT: wxLogError(_("PCX: invalid image")); break; + case wxPCX_MEMERR: wxLogError(_("PCX: couldn't allocate memory")); break; + default: wxLogError(_("PCX: unknown error !!!")); + } + } + } + + return (error == wxPCX_OK); +} + +bool wxPCXHandler::DoCanRead( wxInputStream& stream ) +{ + unsigned char c = stream.GetC(); // it's ok to modify the stream position here + if ( !stream ) + return false; + + // not very safe, but this is all we can get from PCX header :-( + return c == 10; +} + +#endif // wxUSE_STREAMS + +#endif // wxUSE_IMAGE && wxUSE_PCX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imagpng.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagpng.cpp new file mode 100644 index 0000000000..5a27ca92f7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagpng.cpp @@ -0,0 +1,1098 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imagpng.cpp +// Purpose: wxImage PNG handler +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE && wxUSE_LIBPNG + +#include "wx/imagpng.h" +#include "wx/versioninfo.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/palette.h" + #include "wx/stream.h" +#endif + +#include "png.h" + +// For memcpy +#include + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// image cannot have any transparent pixels at all, have only 100% opaque +// and/or 100% transparent pixels in which case a simple mask is enough to +// store this information in wxImage or have a real alpha channel in which case +// we need to have it in wxImage as well +enum Transparency +{ + Transparency_None, + Transparency_Mask, + Transparency_Alpha +}; + +// ---------------------------------------------------------------------------- +// local functions +// ---------------------------------------------------------------------------- + +// return the kind of transparency needed for this image assuming that it does +// have transparent pixels, i.e. either Transparency_Alpha or Transparency_Mask +static Transparency +CheckTransparency(unsigned char **lines, + png_uint_32 x, png_uint_32 y, png_uint_32 w, png_uint_32 h, + size_t numColBytes); + +// init the alpha channel for the image and fill it with 1s up to (x, y) +static unsigned char *InitAlpha(wxImage *image, png_uint_32 x, png_uint_32 y); + +// find a free colour for the mask in the PNG data array +static void +FindMaskColour(unsigned char **lines, png_uint_32 width, png_uint_32 height, + unsigned char& rMask, unsigned char& gMask, unsigned char& bMask); + +// is the pixel with this value of alpha a fully opaque one? +static inline +bool IsOpaque(unsigned char a) +{ + return a == 0xff; +} + +// is the pixel with this value of alpha a fully transparent one? +static inline +bool IsTransparent(unsigned char a) +{ + return !a; +} + +// ============================================================================ +// wxPNGHandler implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler) + +#if wxUSE_STREAMS + +#ifndef PNGLINKAGEMODE + #ifdef PNGAPI + #define PNGLINKAGEMODE PNGAPI + #elif defined(__WATCOMC__) + // we need an explicit cdecl for Watcom, at least according to + // + // http://sf.net/tracker/index.php?func=detail&aid=651492&group_id=9863&atid=109863 + // + // more testing is needed for this however, please remove this comment + // if you can confirm that my fix works with Watcom 11 + #define PNGLINKAGEMODE cdecl + #else + #define PNGLINKAGEMODE LINKAGEMODE + #endif +#endif + + +// VS: wxPNGInfoStruct declared below is a hack that needs some explanation. +// First, let me describe what's the problem: libpng uses jmp_buf in +// its png_struct structure. Unfortunately, this structure is +// compiler-specific and may vary in size, so if you use libpng compiled +// as DLL with another compiler than the main executable, it may not work. +// Luckily, it is still possible to use setjmp() & longjmp() as long as the +// structure is not part of png_struct. +// +// Sadly, there's no clean way to attach user-defined data to png_struct. +// There is only one customizable place, png_struct.io_ptr, which is meant +// only for I/O routines and is set with png_set_read_fn or +// png_set_write_fn. The hacky part is that we use io_ptr to store +// a pointer to wxPNGInfoStruct that holds I/O structures _and_ jmp_buf. + +struct wxPNGInfoStruct +{ + jmp_buf jmpbuf; + bool verbose; + + union + { + wxInputStream *in; + wxOutputStream *out; + } stream; +}; + +#define WX_PNG_INFO(png_ptr) ((wxPNGInfoStruct*)png_get_io_ptr(png_ptr)) + +// ---------------------------------------------------------------------------- +// helper functions +// ---------------------------------------------------------------------------- + +extern "C" +{ + +static void PNGLINKAGEMODE wx_PNG_stream_reader( png_structp png_ptr, png_bytep data, + png_size_t length ) +{ + WX_PNG_INFO(png_ptr)->stream.in->Read(data, length); +} + +static void PNGLINKAGEMODE wx_PNG_stream_writer( png_structp png_ptr, png_bytep data, + png_size_t length ) +{ + WX_PNG_INFO(png_ptr)->stream.out->Write(data, length); +} + +static void +PNGLINKAGEMODE wx_PNG_warning(png_structp png_ptr, png_const_charp message) +{ + wxPNGInfoStruct *info = png_ptr ? WX_PNG_INFO(png_ptr) : NULL; + if ( !info || info->verbose ) + { + wxLogWarning( wxString::FromAscii(message) ); + } +} + +// from pngerror.c +// so that the libpng doesn't send anything on stderr +static void +PNGLINKAGEMODE wx_PNG_error(png_structp png_ptr, png_const_charp message) +{ + wx_PNG_warning(NULL, message); + + // we're not using libpng built-in jump buffer (see comment before + // wxPNGInfoStruct above) so we have to return ourselves, otherwise libpng + // would just abort + longjmp(WX_PNG_INFO(png_ptr)->jmpbuf, 1); +} + +} // extern "C" + +// ---------------------------------------------------------------------------- +// LoadFile() helpers +// ---------------------------------------------------------------------------- + +// determine the kind of transparency we need for this image: if the only alpha +// values it has are 0 (transparent) and 0xff (opaque) then we can simply +// create a mask for it, we should be ok with a simple mask but otherwise we +// need a full blown alpha channel in wxImage +// +// parameters: +// lines raw PNG data +// x, y starting position +// w, h size of the image +// numColBytes number of colour bytes (1 for grey scale, 3 for RGB) +// (NB: alpha always follows the colour bytes) +Transparency +CheckTransparency(unsigned char **lines, + png_uint_32 x, png_uint_32 y, png_uint_32 w, png_uint_32 h, + size_t numColBytes) +{ + // suppose that a mask will suffice and check all the remaining alpha + // values to see if it does + for ( ; y < h; y++ ) + { + // each pixel is numColBytes+1 bytes, offset into the current line by + // the current x position + unsigned const char *ptr = lines[y] + (x * (numColBytes + 1)); + + for ( png_uint_32 x2 = x; x2 < w; x2++ ) + { + // skip the grey or colour byte(s) + ptr += numColBytes; + + unsigned char a2 = *ptr++; + + if ( !IsTransparent(a2) && !IsOpaque(a2) ) + { + // not fully opaque nor fully transparent, hence need alpha + return Transparency_Alpha; + } + } + + // during the next loop iteration check all the pixels in the row + x = 0; + } + + // mask will be enough + return Transparency_Mask; +} + +unsigned char *InitAlpha(wxImage *image, png_uint_32 x, png_uint_32 y) +{ + // create alpha channel + image->SetAlpha(); + + unsigned char *alpha = image->GetAlpha(); + + // set alpha for the pixels we had so far + png_uint_32 end = y * image->GetWidth() + x; + for ( png_uint_32 i = 0; i < end; i++ ) + { + // all the previous pixels were opaque + *alpha++ = 0xff; + } + + return alpha; +} + +void +FindMaskColour(unsigned char **lines, png_uint_32 width, png_uint_32 height, + unsigned char& rMask, unsigned char& gMask, unsigned char& bMask) +{ + // choosing the colour for the mask is more + // difficult: we need to iterate over the entire + // image for this in order to choose an unused + // colour (this is not very efficient but what else + // can we do?) + wxImageHistogram h; + unsigned nentries = 0; + unsigned char r2, g2, b2; + for ( png_uint_32 y2 = 0; y2 < height; y2++ ) + { + const unsigned char *p = lines[y2]; + for ( png_uint_32 x2 = 0; x2 < width; x2++ ) + { + r2 = *p++; + g2 = *p++; + b2 = *p++; + ++p; // jump over alpha + + wxImageHistogramEntry& + entry = h[wxImageHistogram:: MakeKey(r2, g2, b2)]; + + if ( entry.value++ == 0 ) + entry.index = nentries++; + } + } + + if ( !h.FindFirstUnusedColour(&rMask, &gMask, &bMask) ) + { + wxLogWarning(_("Too many colours in PNG, the image may be slightly blurred.")); + + // use a fixed mask colour and we'll fudge + // the real pixels with this colour (see + // below) + rMask = 0xfe; + gMask = 0; + bMask = 0xff; + } +} + +// ---------------------------------------------------------------------------- +// reading PNGs +// ---------------------------------------------------------------------------- + +bool wxPNGHandler::DoCanRead( wxInputStream& stream ) +{ + unsigned char hdr[4]; + + if ( !stream.Read(hdr, WXSIZEOF(hdr)) ) // it's ok to modify the stream position here + return false; + + return memcmp(hdr, "\211PNG", WXSIZEOF(hdr)) == 0; +} + +// convert data from RGB to wxImage format +static +void CopyDataFromPNG(wxImage *image, + unsigned char **lines, + png_uint_32 width, + png_uint_32 height, + int color_type) +{ + Transparency transparency = Transparency_None; + + // only non NULL if transparency == Transparency_Alpha + unsigned char *alpha = NULL; + + // RGB of the mask colour if transparency == Transparency_Mask + // (but init them anyhow to avoid compiler warnings) + unsigned char rMask = 0, + gMask = 0, + bMask = 0; + + unsigned char *ptrDst = image->GetData(); + if ( !(color_type & PNG_COLOR_MASK_COLOR) ) + { + // grey image: GAGAGA... where G == grey component and A == alpha + for ( png_uint_32 y = 0; y < height; y++ ) + { + const unsigned char *ptrSrc = lines[y]; + for ( png_uint_32 x = 0; x < width; x++ ) + { + unsigned char g = *ptrSrc++; + unsigned char a = *ptrSrc++; + + // the first time we encounter a transparent pixel we must + // decide about what to do about them + if ( !IsOpaque(a) && transparency == Transparency_None ) + { + // we'll need at least the mask for this image and + // maybe even full alpha channel info: the former is + // only enough if we have alpha values of 0 and 0xff + // only, otherwisewe need the latter + transparency = CheckTransparency + ( + lines, + x, y, + width, height, + 1 + ); + + if ( transparency == Transparency_Mask ) + { + // let's choose this colour for the mask: this is + // not a problem here as all the other pixels are + // grey, i.e. R == G == B which is not the case for + // this one so no confusion is possible + rMask = 0xff; + gMask = 0; + bMask = 0xff; + } + else // transparency == Transparency_Alpha + { + alpha = InitAlpha(image, x, y); + } + } + + switch ( transparency ) + { + case Transparency_Mask: + if ( IsTransparent(a) ) + { + *ptrDst++ = rMask; + *ptrDst++ = gMask; + *ptrDst++ = bMask; + break; + } + // else: !transparent + + // must be opaque then as otherwise we shouldn't be + // using the mask at all + wxASSERT_MSG( IsOpaque(a), wxT("logic error") ); + + // fall through + + case Transparency_Alpha: + if ( alpha ) + *alpha++ = a; + // fall through + + case Transparency_None: + *ptrDst++ = g; + *ptrDst++ = g; + *ptrDst++ = g; + break; + } + } + } + } + else // colour image: RGBRGB... + { + for ( png_uint_32 y = 0; y < height; y++ ) + { + const unsigned char *ptrSrc = lines[y]; + for ( png_uint_32 x = 0; x < width; x++ ) + { + unsigned char r = *ptrSrc++; + unsigned char g = *ptrSrc++; + unsigned char b = *ptrSrc++; + unsigned char a = *ptrSrc++; + + // the logic here is the same as for the grey case except + // where noted + if ( !IsOpaque(a) && transparency == Transparency_None ) + { + transparency = CheckTransparency + ( + lines, + x, y, + width, height, + 3 + ); + + if ( transparency == Transparency_Mask ) + { + FindMaskColour(lines, width, height, + rMask, gMask, bMask); + } + else // transparency == Transparency_Alpha + { + alpha = InitAlpha(image, x, y); + } + + } + + switch ( transparency ) + { + case Transparency_Mask: + if ( IsTransparent(a) ) + { + *ptrDst++ = rMask; + *ptrDst++ = gMask; + *ptrDst++ = bMask; + break; + } + else // !transparent + { + // must be opaque then as otherwise we shouldn't be + // using the mask at all + wxASSERT_MSG( IsOpaque(a), wxT("logic error") ); + + // if we couldn't find a unique colour for the + // mask, we can have real pixels with the same + // value as the mask and it's better to slightly + // change their colour than to make them + // transparent + if ( r == rMask && g == gMask && b == bMask ) + { + r++; + } + } + + // fall through + + case Transparency_Alpha: + if ( alpha ) + *alpha++ = a; + // fall through + + case Transparency_None: + *ptrDst++ = r; + *ptrDst++ = g; + *ptrDst++ = b; + break; + } + } + } + } + + if ( transparency == Transparency_Mask ) + { + image->SetMaskColour(rMask, gMask, bMask); + } +} + +// temporarily disable the warning C4611 (interaction between '_setjmp' and +// C++ object destruction is non-portable) - I don't see any dtors here +#ifdef __VISUALC__ + #pragma warning(disable:4611) +#endif /* VC++ */ + +bool +wxPNGHandler::LoadFile(wxImage *image, + wxInputStream& stream, + bool verbose, + int WXUNUSED(index)) +{ + // VZ: as this function uses setjmp() the only fool-proof error handling + // method is to use goto (setjmp is not really C++ dtors friendly...) + + unsigned char **lines = NULL; + png_infop info_ptr = (png_infop) NULL; + wxPNGInfoStruct wxinfo; + + png_uint_32 i, width, height = 0; + int bit_depth, color_type, interlace_type; + + wxinfo.verbose = verbose; + wxinfo.stream.in = &stream; + + image->Destroy(); + + png_structp png_ptr = png_create_read_struct + ( + PNG_LIBPNG_VER_STRING, + NULL, + wx_PNG_error, + wx_PNG_warning + ); + if (!png_ptr) + goto error; + + // NB: please see the comment near wxPNGInfoStruct declaration for + // explanation why this line is mandatory + png_set_read_fn( png_ptr, &wxinfo, wx_PNG_stream_reader); + + info_ptr = png_create_info_struct( png_ptr ); + if (!info_ptr) + goto error; + + if (setjmp(wxinfo.jmpbuf)) + goto error; + + png_read_info( png_ptr, info_ptr ); + png_get_IHDR( png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL ); + + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_expand( png_ptr ); + + // Fix for Bug [ 439207 ] Monochrome PNG images come up black + if (bit_depth < 8) + png_set_expand( png_ptr ); + + png_set_strip_16( png_ptr ); + png_set_packing( png_ptr ); + if (png_get_valid( png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_expand( png_ptr ); + png_set_filler( png_ptr, 0xff, PNG_FILLER_AFTER ); + + image->Create((int)width, (int)height, (bool) false /* no need to init pixels */); + + if (!image->IsOk()) + goto error; + + // initialize all line pointers to NULL to ensure that they can be safely + // free()d if an error occurs before all of them could be allocated + lines = (unsigned char **)calloc(height, sizeof(unsigned char *)); + if ( !lines ) + goto error; + + for (i = 0; i < height; i++) + { + if ((lines[i] = (unsigned char *)malloc( (size_t)(width * 4))) == NULL) + goto error; + } + + png_read_image( png_ptr, lines ); + png_read_end( png_ptr, info_ptr ); + +#if wxUSE_PALETTE + if (color_type == PNG_COLOR_TYPE_PALETTE) + { + png_colorp palette = NULL; + int numPalette = 0; + + (void) png_get_PLTE(png_ptr, info_ptr, &palette, &numPalette); + + unsigned char* r = new unsigned char[numPalette]; + unsigned char* g = new unsigned char[numPalette]; + unsigned char* b = new unsigned char[numPalette]; + + for (int j = 0; j < numPalette; j++) + { + r[j] = palette[j].red; + g[j] = palette[j].green; + b[j] = palette[j].blue; + } + + image->SetPalette(wxPalette(numPalette, r, g, b)); + delete[] r; + delete[] g; + delete[] b; + } +#endif // wxUSE_PALETTE + + + // set the image resolution if it's available + png_uint_32 resX, resY; + int unitType; + if (png_get_pHYs(png_ptr, info_ptr, &resX, &resY, &unitType) + == PNG_INFO_pHYs) + { + wxImageResolution res = wxIMAGE_RESOLUTION_CM; + + switch (unitType) + { + default: + wxLogWarning(_("Unknown PNG resolution unit %d"), unitType); + // fall through + + case PNG_RESOLUTION_UNKNOWN: + image->SetOption(wxIMAGE_OPTION_RESOLUTIONX, resX); + image->SetOption(wxIMAGE_OPTION_RESOLUTIONY, resY); + + res = wxIMAGE_RESOLUTION_NONE; + break; + + case PNG_RESOLUTION_METER: + /* + Convert meters to centimeters. + Use a string to not lose precision (converting to cm and then + to inch would result in integer rounding error). + If an app wants an int, GetOptionInt will convert and round + down for them. + */ + image->SetOption(wxIMAGE_OPTION_RESOLUTIONX, + wxString::FromCDouble((double) resX / 100.0, 2)); + image->SetOption(wxIMAGE_OPTION_RESOLUTIONY, + wxString::FromCDouble((double) resY / 100.0, 2)); + break; + } + + image->SetOption(wxIMAGE_OPTION_RESOLUTIONUNIT, res); + } + + + png_destroy_read_struct( &png_ptr, &info_ptr, (png_infopp) NULL ); + + // loaded successfully, now init wxImage with this data + CopyDataFromPNG(image, lines, width, height, color_type); + + for ( i = 0; i < height; i++ ) + free( lines[i] ); + free( lines ); + + return true; + +error: + if (verbose) + { + wxLogError(_("Couldn't load a PNG image - file is corrupted or not enough memory.")); + } + + if ( image->IsOk() ) + { + image->Destroy(); + } + + if ( lines ) + { + for ( unsigned int n = 0; n < height; n++ ) + free( lines[n] ); + + free( lines ); + } + + if ( png_ptr ) + { + if ( info_ptr ) + { + png_destroy_read_struct( &png_ptr, &info_ptr, (png_infopp) NULL ); + free(info_ptr); + } + else + png_destroy_read_struct( &png_ptr, (png_infopp) NULL, (png_infopp) NULL ); + } + return false; +} + +// ---------------------------------------------------------------------------- +// SaveFile() palette helpers +// ---------------------------------------------------------------------------- + +typedef wxLongToLongHashMap PaletteMap; + +static unsigned long PaletteMakeKey(const png_color_8& clr) +{ + return (wxImageHistogram::MakeKey(clr.red, clr.green, clr.blue) << 8) | clr.alpha; +} + +static long PaletteFind(const PaletteMap& palette, const png_color_8& clr) +{ + unsigned long value = PaletteMakeKey(clr); + PaletteMap::const_iterator it = palette.find(value); + + return (it != palette.end()) ? it->second : wxNOT_FOUND; +} + +static long PaletteAdd(PaletteMap *palette, const png_color_8& clr) +{ + unsigned long value = PaletteMakeKey(clr); + PaletteMap::const_iterator it = palette->find(value); + size_t index; + + if (it == palette->end()) + { + index = palette->size(); + (*palette)[value] = index; + } + else + { + index = it->second; + } + + return index; +} + +// ---------------------------------------------------------------------------- +// writing PNGs +// ---------------------------------------------------------------------------- + +bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbose ) +{ + wxPNGInfoStruct wxinfo; + + wxinfo.verbose = verbose; + wxinfo.stream.out = &stream; + + png_structp png_ptr = png_create_write_struct + ( + PNG_LIBPNG_VER_STRING, + NULL, + wx_PNG_error, + wx_PNG_warning + ); + if (!png_ptr) + { + if (verbose) + { + wxLogError(_("Couldn't save PNG image.")); + } + return false; + } + + png_infop info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) + { + png_destroy_write_struct( &png_ptr, (png_infopp)NULL ); + if (verbose) + { + wxLogError(_("Couldn't save PNG image.")); + } + return false; + } + + if (setjmp(wxinfo.jmpbuf)) + { + png_destroy_write_struct( &png_ptr, (png_infopp)NULL ); + if (verbose) + { + wxLogError(_("Couldn't save PNG image.")); + } + return false; + } + + // NB: please see the comment near wxPNGInfoStruct declaration for + // explanation why this line is mandatory + png_set_write_fn( png_ptr, &wxinfo, wx_PNG_stream_writer, NULL); + + const int iHeight = image->GetHeight(); + const int iWidth = image->GetWidth(); + + const bool bHasPngFormatOption + = image->HasOption(wxIMAGE_OPTION_PNG_FORMAT); + + int iColorType = bHasPngFormatOption + ? image->GetOptionInt(wxIMAGE_OPTION_PNG_FORMAT) + : wxPNG_TYPE_COLOUR; + + bool bHasAlpha = image->HasAlpha(); + bool bHasMask = image->HasMask(); + + bool bUsePalette = iColorType == wxPNG_TYPE_PALETTE +#if wxUSE_PALETTE + || (!bHasPngFormatOption && image->HasPalette() ) +#endif + ; + + png_color_8 mask = { 0, 0, 0, 0, 0 }; + + if (bHasMask) + { + mask.red = image->GetMaskRed(); + mask.green = image->GetMaskGreen(); + mask.blue = image->GetMaskBlue(); + } + + PaletteMap palette; + + if (bUsePalette) + { + png_color png_rgb [PNG_MAX_PALETTE_LENGTH]; + png_byte png_trans[PNG_MAX_PALETTE_LENGTH]; + + const unsigned char *pColors = image->GetData(); + const unsigned char* pAlpha = image->GetAlpha(); + + if (bHasMask && !pAlpha) + { + // Mask must be first + PaletteAdd(&palette, mask); + } + + for (int y = 0; y < iHeight; y++) + { + for (int x = 0; x < iWidth; x++) + { + png_color_8 rgba; + + rgba.red = *pColors++; + rgba.green = *pColors++; + rgba.blue = *pColors++; + rgba.gray = 0; + rgba.alpha = (pAlpha && !bHasMask) ? *pAlpha++ : 0; + + // save in our palette + long index = PaletteAdd(&palette, rgba); + + if (index < PNG_MAX_PALETTE_LENGTH) + { + // save in libpng's palette + png_rgb[index].red = rgba.red; + png_rgb[index].green = rgba.green; + png_rgb[index].blue = rgba.blue; + png_trans[index] = rgba.alpha; + } + else + { + bUsePalette = false; + break; + } + } + } + + if (bUsePalette) + { + png_set_PLTE(png_ptr, info_ptr, png_rgb, palette.size()); + + if (bHasMask && !pAlpha) + { + wxASSERT(PaletteFind(palette, mask) == 0); + png_trans[0] = 0; + png_set_tRNS(png_ptr, info_ptr, png_trans, 1, NULL); + } + else if (pAlpha && !bHasMask) + { + png_set_tRNS(png_ptr, info_ptr, png_trans, palette.size(), NULL); + } + } + } + + /* + If saving palettised was requested but it was decided we can't use a + palette then reset the colour type to RGB. + */ + if (!bUsePalette && iColorType == wxPNG_TYPE_PALETTE) + { + iColorType = wxPNG_TYPE_COLOUR; + } + + bool bUseAlpha = !bUsePalette && (bHasAlpha || bHasMask); + + int iPngColorType; + + if (bUsePalette) + { + iPngColorType = PNG_COLOR_TYPE_PALETTE; + iColorType = wxPNG_TYPE_PALETTE; + } + else if ( iColorType==wxPNG_TYPE_COLOUR ) + { + iPngColorType = bUseAlpha ? PNG_COLOR_TYPE_RGB_ALPHA + : PNG_COLOR_TYPE_RGB; + } + else + { + iPngColorType = bUseAlpha ? PNG_COLOR_TYPE_GRAY_ALPHA + : PNG_COLOR_TYPE_GRAY; + } + + if (image->HasOption(wxIMAGE_OPTION_PNG_FILTER)) + png_set_filter( png_ptr, PNG_FILTER_TYPE_BASE, image->GetOptionInt(wxIMAGE_OPTION_PNG_FILTER) ); + + if (image->HasOption(wxIMAGE_OPTION_PNG_COMPRESSION_LEVEL)) + png_set_compression_level( png_ptr, image->GetOptionInt(wxIMAGE_OPTION_PNG_COMPRESSION_LEVEL) ); + + if (image->HasOption(wxIMAGE_OPTION_PNG_COMPRESSION_MEM_LEVEL)) + png_set_compression_mem_level( png_ptr, image->GetOptionInt(wxIMAGE_OPTION_PNG_COMPRESSION_MEM_LEVEL) ); + + if (image->HasOption(wxIMAGE_OPTION_PNG_COMPRESSION_STRATEGY)) + png_set_compression_strategy( png_ptr, image->GetOptionInt(wxIMAGE_OPTION_PNG_COMPRESSION_STRATEGY) ); + + if (image->HasOption(wxIMAGE_OPTION_PNG_COMPRESSION_BUFFER_SIZE)) + png_set_compression_buffer_size( png_ptr, image->GetOptionInt(wxIMAGE_OPTION_PNG_COMPRESSION_BUFFER_SIZE) ); + + int iBitDepth = !bUsePalette && image->HasOption(wxIMAGE_OPTION_PNG_BITDEPTH) + ? image->GetOptionInt(wxIMAGE_OPTION_PNG_BITDEPTH) + : 8; + + png_set_IHDR( png_ptr, info_ptr, image->GetWidth(), image->GetHeight(), + iBitDepth, iPngColorType, + PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, + PNG_FILTER_TYPE_BASE); + + int iElements; + png_color_8 sig_bit; + + if ( iPngColorType & PNG_COLOR_MASK_COLOR ) + { + sig_bit.red = + sig_bit.green = + sig_bit.blue = (png_byte)iBitDepth; + iElements = 3; + } + else // grey + { + sig_bit.gray = (png_byte)iBitDepth; + iElements = 1; + } + + if ( bUseAlpha ) + { + sig_bit.alpha = (png_byte)iBitDepth; + iElements++; + } + + if ( iBitDepth == 16 ) + iElements *= 2; + + // save the image resolution if we have it + int resX, resY; + switch ( GetResolutionFromOptions(*image, &resX, &resY) ) + { + case wxIMAGE_RESOLUTION_INCHES: + { + const double INCHES_IN_METER = 10000.0 / 254; + resX = int(resX * INCHES_IN_METER); + resY = int(resY * INCHES_IN_METER); + } + break; + + case wxIMAGE_RESOLUTION_CM: + resX *= 100; + resY *= 100; + break; + + case wxIMAGE_RESOLUTION_NONE: + break; + + default: + wxFAIL_MSG( wxT("unsupported image resolution units") ); + } + + if ( resX && resY ) + png_set_pHYs( png_ptr, info_ptr, resX, resY, PNG_RESOLUTION_METER ); + + png_set_sBIT( png_ptr, info_ptr, &sig_bit ); + png_write_info( png_ptr, info_ptr ); + png_set_shift( png_ptr, &sig_bit ); + png_set_packing( png_ptr ); + + unsigned char * + data = (unsigned char *)malloc( image->GetWidth() * iElements ); + if ( !data ) + { + png_destroy_write_struct( &png_ptr, (png_infopp)NULL ); + return false; + } + + const unsigned char * + pAlpha = (const unsigned char *)(bHasAlpha ? image->GetAlpha() : NULL); + + const unsigned char *pColors = image->GetData(); + + for (int y = 0; y != iHeight; ++y) + { + unsigned char *pData = data; + for (int x = 0; x != iWidth; x++) + { + png_color_8 clr; + clr.red = *pColors++; + clr.green = *pColors++; + clr.blue = *pColors++; + clr.gray = 0; + clr.alpha = (bUsePalette && pAlpha) ? *pAlpha++ : 0; // use with wxPNG_TYPE_PALETTE only + + switch ( iColorType ) + { + default: + wxFAIL_MSG( wxT("unknown wxPNG_TYPE_XXX") ); + // fall through + + case wxPNG_TYPE_COLOUR: + *pData++ = clr.red; + if ( iBitDepth == 16 ) + *pData++ = 0; + *pData++ = clr.green; + if ( iBitDepth == 16 ) + *pData++ = 0; + *pData++ = clr.blue; + if ( iBitDepth == 16 ) + *pData++ = 0; + break; + + case wxPNG_TYPE_GREY: + { + // where do these coefficients come from? maybe we + // should have image options for them as well? + unsigned uiColor = + (unsigned) (76.544*(unsigned)clr.red + + 150.272*(unsigned)clr.green + + 36.864*(unsigned)clr.blue); + + *pData++ = (unsigned char)((uiColor >> 8) & 0xFF); + if ( iBitDepth == 16 ) + *pData++ = (unsigned char)(uiColor & 0xFF); + } + break; + + case wxPNG_TYPE_GREY_RED: + *pData++ = clr.red; + if ( iBitDepth == 16 ) + *pData++ = 0; + break; + + case wxPNG_TYPE_PALETTE: + *pData++ = (unsigned char) PaletteFind(palette, clr); + break; + } + + if ( bUseAlpha ) + { + unsigned char uchAlpha = 255; + if ( bHasAlpha ) + uchAlpha = *pAlpha++; + + if ( bHasMask ) + { + if ( (clr.red == mask.red) + && (clr.green == mask.green) + && (clr.blue == mask.blue) ) + uchAlpha = 0; + } + + *pData++ = uchAlpha; + if ( iBitDepth == 16 ) + *pData++ = 0; + } + } + + png_bytep row_ptr = data; + png_write_rows( png_ptr, &row_ptr, 1 ); + } + + free(data); + png_write_end( png_ptr, info_ptr ); + png_destroy_write_struct( &png_ptr, (png_infopp)&info_ptr ); + + return true; +} + +#ifdef __VISUALC__ + #pragma warning(default:4611) +#endif /* VC++ */ + +#endif // wxUSE_STREAMS + +/*static*/ wxVersionInfo wxPNGHandler::GetLibraryVersionInfo() +{ + // The version string seems to always have a leading space and a trailing + // new line, get rid of them both. + wxString str = png_get_header_version(NULL) + 1; + str.Replace("\n", ""); + + return wxVersionInfo("libpng", + PNG_LIBPNG_VER_MAJOR, + PNG_LIBPNG_VER_MINOR, + PNG_LIBPNG_VER_RELEASE, + str); +} + +#endif // wxUSE_LIBPNG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imagpnm.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagpnm.cpp new file mode 100644 index 0000000000..d853912087 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagpnm.cpp @@ -0,0 +1,215 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imagpnm.cpp +// Purpose: wxImage PNM handler +// Author: Sylvain Bougnoux +// Copyright: (c) Sylvain Bougnoux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE && wxUSE_PNM + +#include "wx/imagpnm.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" +#endif + +#include "wx/txtstrm.h" + +//----------------------------------------------------------------------------- +// wxBMPHandler +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxPNMHandler,wxImageHandler) + +#if wxUSE_STREAMS + +void Skip_Comment(wxInputStream &stream) +{ + wxTextInputStream text_stream(stream); + + if (stream.Peek()==wxT('#')) + { + text_stream.ReadLine(); + Skip_Comment(stream); + } +} + +bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) ) +{ + wxUint32 width, height; + wxUint16 maxval; + char c(0); + + image->Destroy(); + + /* + * Read the PNM header + */ + + wxBufferedInputStream buf_stream(stream); + wxTextInputStream text_stream(buf_stream); + + Skip_Comment(buf_stream); + if (buf_stream.GetC()==wxT('P')) c=buf_stream.GetC(); + + switch (c) + { + case wxT('2'): // ASCII Grey + case wxT('3'): // ASCII RGB + case wxT('5'): // RAW Grey + case wxT('6'): break; + default: + if (verbose) + { + wxLogError(_("PNM: File format is not recognized.")); + } + return false; + } + + text_stream.ReadLine(); // for the \n + Skip_Comment(buf_stream); + text_stream >> width >> height ; + Skip_Comment(buf_stream); + text_stream >> maxval; + + //cout << line << " " << width << " " << height << " " << maxval << endl; + image->Create( width, height ); + unsigned char *ptr = image->GetData(); + if (!ptr) + { + if (verbose) + { + wxLogError( _("PNM: Couldn't allocate memory.") ); + } + return false; + } + + + if (c=='2') // Ascii GREY + { + wxUint32 value, size=width*height; + for (wxUint32 i=0; iSetMask( false ); + + const wxStreamError err = buf_stream.GetLastError(); + return err == wxSTREAM_NO_ERROR || err == wxSTREAM_EOF; +} + +bool wxPNMHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool WXUNUSED(verbose) ) +{ + wxTextOutputStream text_stream(stream); + + //text_stream << "P6" << endl + //<< image->GetWidth() << " " << image->GetHeight() << endl + //<< "255" << endl; + text_stream << wxT("P6\n") << image->GetWidth() << wxT(" ") << image->GetHeight() << wxT("\n255\n"); + stream.Write(image->GetData(),3*image->GetWidth()*image->GetHeight()); + + return stream.IsOk(); +} + +bool wxPNMHandler::DoCanRead( wxInputStream& stream ) +{ + Skip_Comment(stream); + + // it's ok to modify the stream position here + if ( stream.GetC() == 'P' ) + { + switch ( stream.GetC() ) + { + case '2': // ASCII Grey + case '3': // ASCII RGB + case '5': // RAW Grey + case '6': // RAW RGB + return true; + } + } + + return false; +} + + +#endif // wxUSE_STREAMS + +#endif // wxUSE_IMAGE && wxUSE_PNM diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imagtga.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagtga.cpp new file mode 100644 index 0000000000..ec0362192e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagtga.cpp @@ -0,0 +1,873 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imagtga.cpp +// Purpose: wxImage TGA handler +// Author: Seth Jackson +// Copyright: (c) 2005 Seth Jackson +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE && wxUSE_TGA + +#ifndef WX_PRECOMP + #include "wx/palette.h" +#endif + +#include "wx/imagtga.h" +#include "wx/log.h" +#include "wx/scopeguard.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// TGA error codes. +enum +{ + wxTGA_OK, + wxTGA_INVFORMAT, + wxTGA_MEMERR, + wxTGA_IOERR +}; + +// TGA header bytes. +enum +{ + HDR_OFFSET = 0, + HDR_COLORTYPE = 1, + HDR_IMAGETYPE = 2, + HDR_PALETTESTART = 3, + HDR_PALETTELENGTH = 5, + HDR_PALETTEBITS = 7, + HDR_XORIGIN = 8, + HDR_YORIGIN = 10, + HDR_WIDTH = 12, + HDR_HEIGHT = 14, + HDR_BPP = 16, + HDR_ORIENTATION = 17, + HDR_SIZE +}; + +// TGA color types. +enum +{ + wxTGA_UNMAPPED = 0, + wxTGA_MAPPED = 1 +}; + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxTGAHandler, wxImageHandler) + +#if wxUSE_STREAMS + +// ---------------------------------------------------------------------------- +// worker functions +// ---------------------------------------------------------------------------- + +static +void FlipTGA(unsigned char* imageData, int width, int height, short pixelSize) +{ + int lineLength = width * pixelSize; + unsigned char *line1 = imageData; + unsigned char *line2 = &imageData[lineLength * (height - 1)]; + + unsigned char temp; + for ( ; line1 < line2; line2 -= (lineLength * 2)) + { + for (int index = 0; index < lineLength; line1++, line2++, index++) + { + temp = *line1; + *line1 = *line2; + *line2 = temp; + } + } +} + +// return wxTGA_OK or wxTGA_IOERR +static +int DecodeRLE(unsigned char* imageData, unsigned long imageSize, + short pixelSize, wxInputStream& stream) +{ + unsigned long index = 0; + unsigned char current; + unsigned int length; + unsigned char buf[4]; + + while (index < imageSize) + { + int ch = stream.GetC(); + if ( ch == wxEOF ) + return wxTGA_IOERR; + + current = ch; + + // RLE packet. + if ( current & 0x80 ) + { + // Get the run length of the packet. + current &= 0x7f; + + current++; + + length = current; + + index += current * pixelSize; + + if (index >= imageSize) + { + return wxTGA_IOERR; + } + + // Repeat the pixel length times. + if ( !stream.Read(buf, pixelSize) ) + return wxTGA_IOERR; + + for (unsigned int i = 0; i < length; i++) + { + memcpy(imageData, buf, pixelSize); + + imageData += pixelSize; + } + } + else // Raw packet. + { + // Get the run length of the packet. + current++; + + length = current * pixelSize; + + index += length; + + if (index >= imageSize) + { + return wxTGA_IOERR; + } + + // Write the next length pixels directly to the image data. + if ( !stream.Read(imageData, length) ) + return wxTGA_IOERR; + + imageData += length; + } + } + + return wxTGA_OK; +} + +/* +Mimic the behaviour of wxPalette.GetRGB and the way the TGA image handler +used it. That is: don't check the return value of GetRGB and continue decoding +using previous RGB values. + +It might be better to check for palette index bounds and stop decoding if +it's out of range (and add something like wxTGA_DATAERR to indicate unexpected +pixel data). +*/ +static +void Palette_GetRGB(const unsigned char *palette, unsigned int paletteCount, + unsigned int index, + unsigned char *red, unsigned char *green, unsigned char *blue) +{ + if (index >= paletteCount) + { + return; + } + + *red = palette[index]; + *green = palette[(paletteCount * 1) + index]; + *blue = palette[(paletteCount * 2) + index]; +} + +static +void Palette_SetRGB(unsigned char *palette, unsigned int paletteCount, + unsigned int index, + unsigned char red, unsigned char green, unsigned char blue) +{ + palette[index] = red; + palette[(paletteCount * 1) + index] = green; + palette[(paletteCount * 2) + index] = blue; +} + +static +int ReadTGA(wxImage* image, wxInputStream& stream) +{ + // Read in the TGA header + unsigned char hdr[HDR_SIZE]; + stream.Read(hdr, HDR_SIZE); + + short offset = hdr[HDR_OFFSET] + HDR_SIZE; + short colorType = hdr[HDR_COLORTYPE]; + short imageType = hdr[HDR_IMAGETYPE]; + unsigned int paletteLength = hdr[HDR_PALETTELENGTH] + + 256 * hdr[HDR_PALETTELENGTH + 1]; + int width = (hdr[HDR_WIDTH] + 256 * hdr[HDR_WIDTH + 1]) - + (hdr[HDR_XORIGIN] + 256 * hdr[HDR_XORIGIN + 1]); + int height = (hdr[HDR_HEIGHT] + 256 * hdr[HDR_HEIGHT + 1]) - + (hdr[HDR_YORIGIN] + 256 * hdr[HDR_YORIGIN + 1]); + short bpp = hdr[HDR_BPP]; + short orientation = hdr[HDR_ORIENTATION] & 0x20; + + image->Create(width, height); + + if (!image->IsOk()) + { + return wxTGA_MEMERR; + } + + const short pixelSize = bpp / 8; + + const unsigned long imageSize = width * height * pixelSize; + + unsigned char *imageData = (unsigned char* )malloc(imageSize); + + if (!imageData) + { + return wxTGA_MEMERR; + } + + wxON_BLOCK_EXIT1(free, imageData); + + unsigned char *dst = image->GetData(); + + unsigned char* alpha = NULL; + if (bpp == 16 || bpp == 32) + { + image->SetAlpha(); + + alpha = image->GetAlpha(); + } + + // Seek from the offset we got from the TGA header. + if (stream.SeekI(offset, wxFromStart) == wxInvalidOffset) + return wxTGA_INVFORMAT; + + unsigned char *palette = NULL; + // Load a palette if we have one. + if (colorType == wxTGA_MAPPED) + { + unsigned char buf[3]; + + palette = (unsigned char *) malloc(paletteLength * 3); + + for (unsigned int i = 0; i < paletteLength; i++) + { + stream.Read(buf, 3); + + Palette_SetRGB(palette, paletteLength, i, buf[2], buf[1], buf[0]); + } + +#if wxUSE_PALETTE + // Set the palette of the image. + image->SetPalette(wxPalette((int) paletteLength, &palette[0], + &palette[paletteLength * 1], &palette[paletteLength * 2])); +#endif // wxUSE_PALETTE + + } + + wxON_BLOCK_EXIT1(free, palette); + + // Handle the various TGA formats we support. + + switch (imageType) + { + // Raw indexed. + + case 1: + { + unsigned char r = 0; + unsigned char g = 0; + unsigned char b = 0; + + // No compression read the data directly to imageData. + + stream.Read(imageData, imageSize); + + // If orientation == 0, then the image is stored upside down. + // We need to store it right side up. + + if (orientation == 0) + { + FlipTGA(imageData, width, height, pixelSize); + } + + // Handle the different pixel depths. + + switch (bpp) + { + // 8 bpp. + + case 8: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + Palette_GetRGB(palette, paletteLength, + imageData[index], &r, &g, &b); + + *(dst++) = r; + *(dst++) = g; + *(dst++) = b; + } + } + break; + + // 16 bpp. + + case 16: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + Palette_GetRGB(palette, paletteLength, + imageData[index], &r, &g, &b); + + *(dst++) = r; + *(dst++) = g; + *(dst++) = b; + *(alpha++) = (imageData[index + 1] & 0x80) ? 0 : 255; + } + } + break; + + default: + return wxTGA_INVFORMAT; + } + } + break; + + // Raw RGB. + + case 2: + { + // No compression read the data directly to imageData. + + stream.Read(imageData, imageSize); + + // If orientation == 0, then the image is stored upside down. + // We need to store it right side up. + + if (orientation == 0) + { + FlipTGA(imageData, width, height, pixelSize); + } + + // Handle the different pixel depths. + + switch (bpp) + { + //16 bpp. + + case 16: + { + unsigned char temp; + + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + temp = (imageData[index + 1] & 0x7c) << 1; + temp |= temp >> 5; + *(dst++) = temp; + + temp = ((imageData[index + 1] & 0x03) << 6) | ((imageData[index] & 0xe0) >> 2); + temp |= temp >> 5; + *(dst++) = temp; + + temp = (imageData[index] & 0x1f) << 3; + temp |= temp >> 5; + *(dst++) = temp; + + *(alpha++) = (imageData[index + 1] & 0x80) ? 0 : 255; + } + } + break; + + // 24 bpp. + + case 24: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + *(dst++) = imageData[index + 2]; + *(dst++) = imageData[index + 1]; + *(dst++) = imageData[index]; + } + } + break; + + // 32 bpp. + + case 32: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + *(dst++) = imageData[index + 2]; + *(dst++) = imageData[index + 1]; + *(dst++) = imageData[index]; + *(alpha++) = imageData[index + 3]; + } + } + break; + + default: + return wxTGA_INVFORMAT; + } + } + break; + + // Raw grayscale. + + case 3: + { + // No compression read the data directly to imageData. + + stream.Read(imageData, imageSize); + + // If orientation == 0, then the image is stored upside down. + // We need to store it right side up. + + if (orientation == 0) + { + FlipTGA(imageData, width, height, pixelSize); + } + + // Handle the different pixel depths. + + switch (bpp) + { + // 8 bpp. + + case 8: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + *(dst++) = imageData[index]; + *(dst++) = imageData[index]; + *(dst++) = imageData[index]; + } + } + break; + + // 16 bpp. + + case 16: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + *(dst++) = imageData[index]; + *(dst++) = imageData[index]; + *(dst++) = imageData[index]; + *(alpha++) = imageData[index + 1]; + } + } + break; + + default: + return wxTGA_INVFORMAT; + } + } + break; + + // RLE indexed. + + case 9: + { + unsigned char r = 0; + unsigned char g = 0; + unsigned char b = 0; + + // Decode the RLE data. + + int rc = DecodeRLE(imageData, imageSize, pixelSize, stream); + if ( rc != wxTGA_OK ) + return rc; + + // If orientation == 0, then the image is stored upside down. + // We need to store it right side up. + + if (orientation == 0) + { + FlipTGA(imageData, width, height, pixelSize); + } + + // Handle the different pixel depths. + + switch (bpp) + { + // 8 bpp. + + case 8: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + Palette_GetRGB(palette, paletteLength, + imageData[index], &r, &g, &b); + + *(dst++) = r; + *(dst++) = g; + *(dst++) = b; + } + } + break; + + // 16 bpp. + + case 16: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + Palette_GetRGB(palette, paletteLength, + imageData[index], &r, &g, &b); + + *(dst++) = r; + *(dst++) = g; + *(dst++) = b; + *(alpha++) = (imageData[index + 1] & 0x80) ? 0 : 255; + } + } + break; + + default: + return wxTGA_INVFORMAT; + } + } + break; + + // RLE RGB. + + case 10: + { + // Decode the RLE data. + + int rc = DecodeRLE(imageData, imageSize, pixelSize, stream); + if ( rc != wxTGA_OK ) + return rc; + + // If orientation == 0, then the image is stored upside down. + // We need to store it right side up. + + if (orientation == 0) + { + FlipTGA(imageData, width, height, pixelSize); + } + + // Handle the different pixel depths. + + switch (bpp) + { + //16 bpp. + + case 16: + { + unsigned char temp; + + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + temp = (imageData[index + 1] & 0x7c) << 1; + temp |= temp >> 5; + *(dst++) = temp; + + temp = ((imageData[index + 1] & 0x03) << 6) | ((imageData[index] & 0xe0) >> 2); + temp |= temp >> 5; + *(dst++) = temp; + + temp = (imageData[index] & 0x1f) << 3; + temp |= temp >> 5; + *(dst++) = temp; + + *(alpha++) = (imageData[index + 1] & 0x80) ? 0 : 255; + } + } + break; + + // 24 bpp. + + case 24: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + *(dst++) = imageData[index + 2]; + *(dst++) = imageData[index + 1]; + *(dst++) = imageData[index]; + } + } + break; + + // 32 bpp. + + case 32: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + *(dst++) = imageData[index + 2]; + *(dst++) = imageData[index + 1]; + *(dst++) = imageData[index]; + *(alpha++) = imageData[index + 3]; + } + } + break; + + default: + return wxTGA_INVFORMAT; + } + } + break; + + // RLE grayscale. + + case 11: + { + // Decode the RLE data. + + int rc = DecodeRLE(imageData, imageSize, pixelSize, stream); + if ( rc != wxTGA_OK ) + return rc; + + // If orientation == 0, then the image is stored upside down. + // We need to store it right side up. + + if (orientation == 0) + { + FlipTGA(imageData, width, height, pixelSize); + } + + // Handle the different pixel depths. + + switch (bpp) + { + // 8 bpp. + + case 8: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + *(dst++) = imageData[index]; + *(dst++) = imageData[index]; + *(dst++) = imageData[index]; + } + } + break; + + // 16 bpp. + + case 16: + { + for (unsigned long index = 0; index < imageSize; index += pixelSize) + { + *(dst++) = imageData[index]; + *(dst++) = imageData[index]; + *(dst++) = imageData[index]; + *(alpha++) = imageData[index + 1]; + } + } + break; + + default: + return wxTGA_INVFORMAT; + } + } + break; + + default: + return wxTGA_INVFORMAT; + } + + return wxTGA_OK; +} + +static +int SaveTGA(const wxImage& image, wxOutputStream *stream) +{ + bool hasAlpha = image.HasAlpha(); + unsigned bytesPerPixel = 3 + (hasAlpha ? 1 : 0); + wxSize size = image.GetSize(); + size_t scanlineSize = size.x * bytesPerPixel; + unsigned char *scanlineData = (unsigned char *) malloc(scanlineSize); + if (!scanlineData) + { + return wxTGA_MEMERR; + } + + wxON_BLOCK_EXIT1(free, scanlineData); + + // Compose and write the TGA header + unsigned char hdr[HDR_SIZE]; + (void) memset(&hdr, 0, HDR_SIZE); + + hdr[HDR_COLORTYPE] = wxTGA_UNMAPPED; + hdr[HDR_IMAGETYPE] = 2 /* Uncompressed truecolour */; + + hdr[HDR_WIDTH] = size.x & 0xFF; + hdr[HDR_WIDTH + 1] = (size.x >> 8) & 0xFF; + + hdr[HDR_HEIGHT] = size.y & 0xFF; + hdr[HDR_HEIGHT + 1] = (size.y >> 8) & 0xFF; + + hdr[HDR_BPP] = hasAlpha ? 32 : 24; + hdr[HDR_ORIENTATION] = 1 << 5; // set bit to indicate top-down order + if (hasAlpha) + { + hdr[HDR_ORIENTATION] |= 8; // number of alpha bits + } + + if ( !stream->Write(hdr, HDR_SIZE) ) + { + return wxTGA_IOERR; + } + + + // Write image data, converting RGB to BGR and adding alpha if applicable + + unsigned char *src = image.GetData(); + unsigned char *alpha = image.GetAlpha(); + for (int y = 0; y < size.y; ++y) + { + unsigned char *dst = scanlineData; + for (int x = 0; x < size.x; ++x) + { + dst[0] = src[2]; + dst[1] = src[1]; + dst[2] = src[0]; + if (alpha) + { + dst[3] = *(alpha++); + } + src += 3; + dst += bytesPerPixel; + } + if ( !stream->Write(scanlineData, scanlineSize) ) + { + return wxTGA_IOERR; + } + } + + return wxTGA_OK; +} + +// ---------------------------------------------------------------------------- +// wxTGAHandler +// ---------------------------------------------------------------------------- + +bool wxTGAHandler::LoadFile(wxImage* image, + wxInputStream& stream, + bool verbose, + int WXUNUSED(index)) +{ + if ( !CanRead(stream) ) + { + if ( verbose ) + { + wxLogError(wxT("TGA: this is not a TGA file.")); + } + + return false; + } + + image->Destroy(); + + int error = ReadTGA(image, stream); + if ( error != wxTGA_OK ) + { + if ( verbose ) + { + switch ( error ) + { + case wxTGA_INVFORMAT: + wxLogError(wxT("TGA: image format unsupported.")); + break; + + case wxTGA_MEMERR: + wxLogError(wxT("TGA: couldn't allocate memory.")); + break; + + case wxTGA_IOERR: + wxLogError(wxT("TGA: couldn't read image data.")); + break; + + default: + wxLogError(wxT("TGA: unknown error!")); + } + } + + image->Destroy(); + + return false; + } + + return true; +} + +bool wxTGAHandler::SaveFile(wxImage* image, wxOutputStream& stream, bool verbose) +{ + int error = SaveTGA(*image, &stream); + + if ( error != wxTGA_OK ) + { + if ( verbose ) + { + switch ( error ) + { + case wxTGA_MEMERR: + wxLogError(wxT("TGA: couldn't allocate memory.")); + break; + + case wxTGA_IOERR: + wxLogError(wxT("TGA: couldn't write image data.")); + break; + + default: + wxLogError(wxT("TGA: unknown error!")); + } + } + + return false; + } + + return true; +} + +bool wxTGAHandler::DoCanRead(wxInputStream& stream) +{ + // read the fixed-size TGA headers + unsigned char hdr[HDR_SIZE]; + stream.Read(hdr, HDR_SIZE); // it's ok to modify the stream position here + + // Check whether we can read the file or not. + + short colorType = hdr[HDR_COLORTYPE]; + if ( colorType != wxTGA_UNMAPPED && colorType != wxTGA_MAPPED ) + { + return false; + } + + short imageType = hdr[HDR_IMAGETYPE]; + if ( imageType == 0 || imageType == 32 || imageType == 33 ) + { + return false; + } + + short bpp = hdr[HDR_BPP]; + if ( bpp != 8 && bpp != 16 && bpp != 24 && bpp != 32 ) + { + return false; + } + + return true; +} + +#endif // wxUSE_STREAMS + +#endif // wxUSE_IMAGE && wxUSE_TGA diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imagtiff.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagtiff.cpp new file mode 100644 index 0000000000..628c645084 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagtiff.cpp @@ -0,0 +1,906 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imagtiff.cpp +// Purpose: wxImage TIFF handler +// Author: Robert Roebling +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE && wxUSE_LIBTIFF + +#include "wx/imagtiff.h" +#include "wx/versioninfo.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/app.h" + #include "wx/intl.h" + #include "wx/bitmap.h" + #include "wx/module.h" + #include "wx/wxcrtvararg.h" +#endif + +extern "C" +{ +#ifdef __DMC__ + #include "tif_config.h" +#endif + #include "tiff.h" + #include "tiffio.h" +} +#include "wx/filefn.h" +#include "wx/wfstream.h" + +#ifndef TIFFLINKAGEMODE + #define TIFFLINKAGEMODE LINKAGEMODE +#endif + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// TIFF library error/warning handlers +// ---------------------------------------------------------------------------- + +static wxString +FormatTiffMessage(const char *module, const char *fmt, va_list ap) +{ + char buf[512]; + if ( wxCRT_VsnprintfA(buf, WXSIZEOF(buf), fmt, ap) <= 0 ) + { + // this isn't supposed to happen, but if it does, it's better + // than nothing + strcpy(buf, "Incorrectly formatted TIFF message"); + } + buf[WXSIZEOF(buf)-1] = 0; // make sure it is always NULL-terminated + + wxString msg(buf); + if ( module ) + msg += wxString::Format(_(" (in module \"%s\")"), module); + + return msg; +} + +extern "C" +{ + +static void +TIFFwxWarningHandler(const char* module, const char *fmt, va_list ap) +{ + wxLogWarning("%s", FormatTiffMessage(module, fmt, ap)); +} + +static void +TIFFwxErrorHandler(const char* module, const char *fmt, va_list ap) +{ + wxLogError("%s", FormatTiffMessage(module, fmt, ap)); +} + +} // extern "C" + +//----------------------------------------------------------------------------- +// wxTIFFHandler +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxTIFFHandler,wxImageHandler) + +wxTIFFHandler::wxTIFFHandler() +{ + m_name = wxT("TIFF file"); + m_extension = wxT("tif"); + m_altExtensions.Add(wxT("tiff")); + m_type = wxBITMAP_TYPE_TIFF; + m_mime = wxT("image/tiff"); + TIFFSetWarningHandler((TIFFErrorHandler) TIFFwxWarningHandler); + TIFFSetErrorHandler((TIFFErrorHandler) TIFFwxErrorHandler); +} + +#if wxUSE_STREAMS + +// helper to translate our, possibly 64 bit, wxFileOffset to TIFF, always 32 +// bit, toff_t +static toff_t wxFileOffsetToTIFF(wxFileOffset ofs) +{ + if ( ofs == wxInvalidOffset ) + return (toff_t)-1; + + toff_t tofs = wx_truncate_cast(toff_t, ofs); + wxCHECK_MSG( (wxFileOffset)tofs == ofs, (toff_t)-1, + wxT("TIFF library doesn't support large files") ); + + return tofs; +} + +// another helper to convert standard seek mode to our +static wxSeekMode wxSeekModeFromTIFF(int whence) +{ + switch ( whence ) + { + case SEEK_SET: + return wxFromStart; + + case SEEK_CUR: + return wxFromCurrent; + + case SEEK_END: + return wxFromEnd; + + default: + return wxFromCurrent; + } +} + +extern "C" +{ + +tsize_t TIFFLINKAGEMODE +wxTIFFNullProc(thandle_t WXUNUSED(handle), + tdata_t WXUNUSED(buf), + tsize_t WXUNUSED(size)) +{ + return (tsize_t) -1; +} + +tsize_t TIFFLINKAGEMODE +wxTIFFReadProc(thandle_t handle, tdata_t buf, tsize_t size) +{ + wxInputStream *stream = (wxInputStream*) handle; + stream->Read( (void*) buf, (size_t) size ); + return wx_truncate_cast(tsize_t, stream->LastRead()); +} + +tsize_t TIFFLINKAGEMODE +wxTIFFWriteProc(thandle_t handle, tdata_t buf, tsize_t size) +{ + wxOutputStream *stream = (wxOutputStream*) handle; + stream->Write( (void*) buf, (size_t) size ); + return wx_truncate_cast(tsize_t, stream->LastWrite()); +} + +toff_t TIFFLINKAGEMODE +wxTIFFSeekIProc(thandle_t handle, toff_t off, int whence) +{ + wxInputStream *stream = (wxInputStream*) handle; + + return wxFileOffsetToTIFF(stream->SeekI((wxFileOffset)off, + wxSeekModeFromTIFF(whence))); +} + +toff_t TIFFLINKAGEMODE +wxTIFFSeekOProc(thandle_t handle, toff_t off, int whence) +{ + wxOutputStream *stream = (wxOutputStream*) handle; + + toff_t offset = wxFileOffsetToTIFF( + stream->SeekO((wxFileOffset)off, wxSeekModeFromTIFF(whence)) ); + + if (offset != (toff_t) -1 || whence != SEEK_SET) + { + return offset; + } + + + /* + Try to workaround problems with libtiff seeking past the end of streams. + + This occurs when libtiff is writing tag entries past the end of a + stream but hasn't written the directory yet (which will be placed + before the tags and contain offsets to the just written tags). + The behaviour for seeking past the end of a stream is not consistent + and doesn't work with for example wxMemoryOutputStream. When this type + of seeking fails (with SEEK_SET), fill in the gap with zeroes and try + again. + */ + + wxFileOffset streamLength = stream->GetLength(); + if (streamLength != wxInvalidOffset && (wxFileOffset) off > streamLength) + { + if (stream->SeekO(streamLength, wxFromStart) == wxInvalidOffset) + { + return (toff_t) -1; + } + + for (wxFileOffset i = 0; i < (wxFileOffset) off - streamLength; ++i) + { + stream->PutC(0); + } + } + + return wxFileOffsetToTIFF( stream->TellO() ); +} + +int TIFFLINKAGEMODE +wxTIFFCloseIProc(thandle_t WXUNUSED(handle)) +{ + // there is no need to close the input stream + return 0; +} + +int TIFFLINKAGEMODE +wxTIFFCloseOProc(thandle_t handle) +{ + wxOutputStream *stream = (wxOutputStream*) handle; + + return stream->Close() ? 0 : -1; +} + +toff_t TIFFLINKAGEMODE +wxTIFFSizeProc(thandle_t handle) +{ + wxStreamBase *stream = (wxStreamBase*) handle; + return (toff_t) stream->GetSize(); +} + +int TIFFLINKAGEMODE +wxTIFFMapProc(thandle_t WXUNUSED(handle), + tdata_t* WXUNUSED(pbase), + toff_t* WXUNUSED(psize)) +{ + return 0; +} + +void TIFFLINKAGEMODE +wxTIFFUnmapProc(thandle_t WXUNUSED(handle), + tdata_t WXUNUSED(base), + toff_t WXUNUSED(size)) +{ +} + +} // extern "C" + +TIFF* +TIFFwxOpen(wxInputStream &stream, const char* name, const char* mode) +{ + TIFF* tif = TIFFClientOpen(name, mode, + (thandle_t) &stream, + wxTIFFReadProc, wxTIFFNullProc, + wxTIFFSeekIProc, wxTIFFCloseIProc, wxTIFFSizeProc, + wxTIFFMapProc, wxTIFFUnmapProc); + + return tif; +} + +TIFF* +TIFFwxOpen(wxOutputStream &stream, const char* name, const char* mode) +{ + TIFF* tif = TIFFClientOpen(name, mode, + (thandle_t) &stream, + wxTIFFNullProc, wxTIFFWriteProc, + wxTIFFSeekOProc, wxTIFFCloseOProc, wxTIFFSizeProc, + wxTIFFMapProc, wxTIFFUnmapProc); + + return tif; +} + +bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index ) +{ + if (index == -1) + index = 0; + + image->Destroy(); + + TIFF *tif = TIFFwxOpen( stream, "image", "r" ); + + if (!tif) + { + if (verbose) + { + wxLogError( _("TIFF: Error loading image.") ); + } + + return false; + } + + if (!TIFFSetDirectory( tif, (tdir_t)index )) + { + if (verbose) + { + wxLogError( _("Invalid TIFF image index.") ); + } + + TIFFClose( tif ); + + return false; + } + + uint32 w, h; + uint32 *raster; + + TIFFGetField( tif, TIFFTAG_IMAGEWIDTH, &w ); + TIFFGetField( tif, TIFFTAG_IMAGELENGTH, &h ); + + uint16 samplesPerPixel = 0; + (void) TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesPerPixel); + + uint16 bitsPerSample = 0; + (void) TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &bitsPerSample); + + uint16 extraSamples; + uint16* samplesInfo; + TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES, + &extraSamples, &samplesInfo); + + uint16 photometric; + if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric)) + { + photometric = PHOTOMETRIC_MINISWHITE; + } + const bool hasAlpha = (extraSamples >= 1 + && ((samplesInfo[0] == EXTRASAMPLE_UNSPECIFIED) + || samplesInfo[0] == EXTRASAMPLE_ASSOCALPHA + || samplesInfo[0] == EXTRASAMPLE_UNASSALPHA)) + || (extraSamples == 0 && samplesPerPixel == 4 + && photometric == PHOTOMETRIC_RGB); + + // guard against integer overflow during multiplication which could result + // in allocating a too small buffer and then overflowing it + const double bytesNeeded = (double)w * (double)h * sizeof(uint32); + if ( bytesNeeded >= wxUINT32_MAX ) + { + if ( verbose ) + { + wxLogError( _("TIFF: Image size is abnormally big.") ); + } + + TIFFClose(tif); + + return false; + } + + raster = (uint32*) _TIFFmalloc( (uint32)bytesNeeded ); + + if (!raster) + { + if (verbose) + { + wxLogError( _("TIFF: Couldn't allocate memory.") ); + } + + TIFFClose( tif ); + + return false; + } + + image->Create( (int)w, (int)h ); + if (!image->IsOk()) + { + if (verbose) + { + wxLogError( _("TIFF: Couldn't allocate memory.") ); + } + + _TIFFfree( raster ); + TIFFClose( tif ); + + return false; + } + + if ( hasAlpha ) + image->SetAlpha(); + + uint16 planarConfig = PLANARCONFIG_CONTIG; + (void) TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &planarConfig); + + bool ok = true; + char msg[1024] = ""; + if + ( + (planarConfig == PLANARCONFIG_CONTIG && samplesPerPixel == 2 + && extraSamples == 1) + && + ( + ( !TIFFRGBAImageOK(tif, msg) ) + || (bitsPerSample == 8) + ) + ) + { + const bool isGreyScale = (bitsPerSample == 8); + unsigned char *buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(tif)); + uint32 pos = 0; + const bool minIsWhite = (photometric == PHOTOMETRIC_MINISWHITE); + const int minValue = minIsWhite ? 255 : 0; + const int maxValue = 255 - minValue; + + /* + Decode to ABGR format as that is what the code, that converts to + wxImage, later on expects (normally TIFFReadRGBAImageOriented is + used to decode which uses an ABGR layout). + */ + for (uint32 y = 0; y < h; ++y) + { + if (TIFFReadScanline(tif, buf, y, 0) != 1) + { + ok = false; + break; + } + + if (isGreyScale) + { + for (uint32 x = 0; x < w; ++x) + { + uint8 val = minIsWhite ? 255 - buf[x*2] : buf[x*2]; + uint8 alpha = minIsWhite ? 255 - buf[x*2+1] : buf[x*2+1]; + raster[pos] = val + (val << 8) + (val << 16) + + (alpha << 24); + pos++; + } + } + else + { + for (uint32 x = 0; x < w; ++x) + { + int mask = buf[x*2/8] << ((x*2)%8); + + uint8 val = mask & 128 ? maxValue : minValue; + raster[pos] = val + (val << 8) + (val << 16) + + ((mask & 64 ? maxValue : minValue) << 24); + pos++; + } + } + } + + _TIFFfree(buf); + } + else + { + ok = TIFFReadRGBAImageOriented( tif, w, h, raster, + ORIENTATION_TOPLEFT, 0 ) != 0; + } + + + if (!ok) + { + if (verbose) + { + wxLogError( _("TIFF: Error reading image.") ); + } + + _TIFFfree( raster ); + image->Destroy(); + TIFFClose( tif ); + + return false; + } + + unsigned char *ptr = image->GetData(); + + unsigned char *alpha = image->GetAlpha(); + + uint32 pos = 0; + + for (uint32 i = 0; i < h; i++) + { + for (uint32 j = 0; j < w; j++) + { + *(ptr++) = (unsigned char)TIFFGetR(raster[pos]); + *(ptr++) = (unsigned char)TIFFGetG(raster[pos]); + *(ptr++) = (unsigned char)TIFFGetB(raster[pos]); + if ( hasAlpha ) + *(alpha++) = (unsigned char)TIFFGetA(raster[pos]); + + pos++; + } + } + + + image->SetOption(wxIMAGE_OPTION_TIFF_PHOTOMETRIC, photometric); + + uint16 compression; + /* + Copy some baseline TIFF tags which helps when re-saving a TIFF + to be similar to the original image. + */ + if (samplesPerPixel) + { + image->SetOption(wxIMAGE_OPTION_TIFF_SAMPLESPERPIXEL, samplesPerPixel); + } + + if (bitsPerSample) + { + image->SetOption(wxIMAGE_OPTION_TIFF_BITSPERSAMPLE, bitsPerSample); + } + + if ( TIFFGetFieldDefaulted(tif, TIFFTAG_COMPRESSION, &compression) ) + { + image->SetOption(wxIMAGE_OPTION_TIFF_COMPRESSION, compression); + } + + // Set the resolution unit. + wxImageResolution resUnit = wxIMAGE_RESOLUTION_NONE; + uint16 tiffRes; + if ( TIFFGetFieldDefaulted(tif, TIFFTAG_RESOLUTIONUNIT, &tiffRes) ) + { + switch (tiffRes) + { + default: + wxLogWarning(_("Unknown TIFF resolution unit %d ignored"), + tiffRes); + // fall through + + case RESUNIT_NONE: + resUnit = wxIMAGE_RESOLUTION_NONE; + break; + + case RESUNIT_INCH: + resUnit = wxIMAGE_RESOLUTION_INCHES; + break; + + case RESUNIT_CENTIMETER: + resUnit = wxIMAGE_RESOLUTION_CM; + break; + } + } + + image->SetOption(wxIMAGE_OPTION_RESOLUTIONUNIT, resUnit); + + /* + Set the image resolution if it's available. Resolution tag is not + dependent on RESOLUTIONUNIT != RESUNIT_NONE (according to TIFF spec). + */ + float resX, resY; + + if ( TIFFGetField(tif, TIFFTAG_XRESOLUTION, &resX) ) + { + /* + Use a string value to not lose precision. + rounding to int as cm and then converting to inch may + result in whole integer rounding error, eg. 201 instead of 200 dpi. + If an app wants an int, GetOptionInt will convert and round down. + */ + image->SetOption(wxIMAGE_OPTION_RESOLUTIONX, + wxString::FromCDouble((double) resX)); + } + + if ( TIFFGetField(tif, TIFFTAG_YRESOLUTION, &resY) ) + { + image->SetOption(wxIMAGE_OPTION_RESOLUTIONY, + wxString::FromCDouble((double) resY)); + } + + _TIFFfree( raster ); + + TIFFClose( tif ); + + return true; +} + +int wxTIFFHandler::DoGetImageCount( wxInputStream& stream ) +{ + TIFF *tif = TIFFwxOpen( stream, "image", "r" ); + + if (!tif) + return 0; + + int dircount = 0; // according to the libtiff docs, dircount should be set to 1 here??? + do { + dircount++; + } while (TIFFReadDirectory(tif)); + + TIFFClose( tif ); + + // NOTE: this function modifies the current stream position but it's ok + // (see wxImageHandler::GetImageCount) + + return dircount; +} + +bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbose ) +{ + TIFF *tif = TIFFwxOpen( stream, "image", "w" ); + + if (!tif) + { + if (verbose) + { + wxLogError( _("TIFF: Error saving image.") ); + } + + return false; + } + + const int imageWidth = image->GetWidth(); + TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) imageWidth); + TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32)image->GetHeight()); + TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); + TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); + + // save the image resolution if we have it + int xres, yres; + const wxImageResolution res = GetResolutionFromOptions(*image, &xres, &yres); + uint16 tiffRes; + switch ( res ) + { + default: + wxFAIL_MSG( wxT("unknown image resolution units") ); + // fall through + + case wxIMAGE_RESOLUTION_NONE: + tiffRes = RESUNIT_NONE; + break; + + case wxIMAGE_RESOLUTION_INCHES: + tiffRes = RESUNIT_INCH; + break; + + case wxIMAGE_RESOLUTION_CM: + tiffRes = RESUNIT_CENTIMETER; + break; + } + + if ( tiffRes != RESUNIT_NONE ) + { + TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, tiffRes); + TIFFSetField(tif, TIFFTAG_XRESOLUTION, (float)xres); + TIFFSetField(tif, TIFFTAG_YRESOLUTION, (float)yres); + } + + + int spp = image->GetOptionInt(wxIMAGE_OPTION_TIFF_SAMPLESPERPIXEL); + if ( !spp ) + spp = 3; + + int bps = image->GetOptionInt(wxIMAGE_OPTION_TIFF_BITSPERSAMPLE); + if ( !bps ) + { + bps = 8; + } + else if (bps == 1) + { + // One bit per sample combined with 3 samples per pixel is + // not allowed and crashes libtiff. + spp = 1; + } + + int photometric = PHOTOMETRIC_RGB; + + if ( image->HasOption(wxIMAGE_OPTION_TIFF_PHOTOMETRIC) ) + { + photometric = image->GetOptionInt(wxIMAGE_OPTION_TIFF_PHOTOMETRIC); + if (photometric == PHOTOMETRIC_MINISWHITE + || photometric == PHOTOMETRIC_MINISBLACK) + { + // either b/w or greyscale + spp = 1; + } + } + else if (spp <= 2) + { + photometric = PHOTOMETRIC_MINISWHITE; + } + + const bool hasAlpha = image->HasAlpha(); + + int compression = image->GetOptionInt(wxIMAGE_OPTION_TIFF_COMPRESSION); + if ( !compression || (compression == COMPRESSION_JPEG && hasAlpha) ) + { + // We can't use COMPRESSION_LZW because current version of libtiff + // doesn't implement it ("no longer implemented due to Unisys patent + // enforcement") and other compression methods are lossy so we + // shouldn't use them by default -- and the only remaining one is none. + // Also JPEG compression for alpha images is not a good idea (viewers + // not opening the image properly). + compression = COMPRESSION_NONE; + } + + if + ( + (photometric == PHOTOMETRIC_RGB && spp == 4) + || (photometric <= PHOTOMETRIC_MINISBLACK && spp == 2) + ) + { + // Compensate for user passing a SamplesPerPixel that includes + // the alpha channel. + spp--; + } + + + int extraSamples = hasAlpha ? 1 : 0; + + TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, spp + extraSamples); + TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps); + TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric); + TIFFSetField(tif, TIFFTAG_COMPRESSION, compression); + + if (extraSamples) + { + uint16 extra[] = { EXTRASAMPLE_UNSPECIFIED }; + TIFFSetField(tif, TIFFTAG_EXTRASAMPLES, (long) 1, &extra); + } + + // scanlinesize is determined by spp+extraSamples and bps + const tsize_t linebytes = + (tsize_t)((imageWidth * (spp + extraSamples) * bps + 7) / 8); + + unsigned char *buf; + + const bool isColouredImage = (spp > 1) + && (photometric != PHOTOMETRIC_MINISWHITE) + && (photometric != PHOTOMETRIC_MINISBLACK); + + + if (TIFFScanlineSize(tif) > linebytes || !isColouredImage || hasAlpha) + { + buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(tif)); + if (!buf) + { + if (verbose) + { + wxLogError( _("TIFF: Couldn't allocate memory.") ); + } + + TIFFClose( tif ); + + return false; + } + } + else + { + buf = NULL; + } + + TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP,TIFFDefaultStripSize(tif, (uint32) -1)); + + const int bitsPerPixel = (spp + extraSamples) * bps; + const int bytesPerPixel = (bitsPerPixel + 7) / 8; + const int pixelsPerByte = 8 / bitsPerPixel; + int remainingPixelCount = 0; + + if (pixelsPerByte) + { + // How many pixels to write in the last byte column? + remainingPixelCount = imageWidth % pixelsPerByte; + if (!remainingPixelCount) remainingPixelCount = pixelsPerByte; + } + + const bool minIsWhite = (photometric == PHOTOMETRIC_MINISWHITE); + unsigned char *ptr = image->GetData(); + for ( int row = 0; row < image->GetHeight(); row++ ) + { + if ( buf ) + { + if (isColouredImage) + { + // colour image + if (hasAlpha) + { + for ( int column = 0; column < imageWidth; column++ ) + { + buf[column*4 ] = ptr[column*3 ]; + buf[column*4 + 1] = ptr[column*3 + 1]; + buf[column*4 + 2] = ptr[column*3 + 2]; + buf[column*4 + 3] = image->GetAlpha(column, row); + } + } + else + { + memcpy(buf, ptr, imageWidth * 3); + } + } + else if (spp * bps == 8) // greyscale image + { + for ( int column = 0; column < imageWidth; column++ ) + { + uint8 value = ptr[column*3 + 1]; + if (minIsWhite) + { + value = 255 - value; + } + + buf[column * bytesPerPixel] = value; + + if (hasAlpha) + { + value = image->GetAlpha(column, row); + buf[column*bytesPerPixel+1] + = minIsWhite ? 255 - value : value; + } + } + } + else // black and white image + { + for ( int column = 0; column < linebytes; column++ ) + { + uint8 reverse = 0; + int pixelsPerByteCount = (column + 1 != linebytes) + ? pixelsPerByte + : remainingPixelCount; + for ( int bp = 0; bp < pixelsPerByteCount; bp++ ) + { + if ( (ptr[column * 3 * pixelsPerByte + bp*3 + 1] <=127) + == minIsWhite ) + { + // check only green as this is sufficient + reverse |= (uint8) (128 >> (bp * bitsPerPixel)); + } + + if (hasAlpha + && (image->GetAlpha(column * pixelsPerByte + bp, + row) <= 127) == minIsWhite) + { + reverse |= (uint8) (64 >> (bp * bitsPerPixel)); + } + } + + buf[column] = reverse; + } + } + } + + if ( TIFFWriteScanline(tif, buf ? buf : ptr, (uint32)row, 0) < 0 ) + { + if (verbose) + { + wxLogError( _("TIFF: Error writing image.") ); + } + + TIFFClose( tif ); + if (buf) + _TIFFfree(buf); + + return false; + } + + ptr += imageWidth * 3; + } + + (void) TIFFClose(tif); + + if (buf) + _TIFFfree(buf); + + return true; +} + +bool wxTIFFHandler::DoCanRead( wxInputStream& stream ) +{ + unsigned char hdr[2]; + + if ( !stream.Read(&hdr[0], WXSIZEOF(hdr)) ) // it's ok to modify the stream position here + return false; + + return (hdr[0] == 'I' && hdr[1] == 'I') || + (hdr[0] == 'M' && hdr[1] == 'M'); +} + +#endif // wxUSE_STREAMS + +/*static*/ wxVersionInfo wxTIFFHandler::GetLibraryVersionInfo() +{ + int major, + minor, + micro; + + const wxString ver(::TIFFGetVersion()); + if ( wxSscanf(ver, "LIBTIFF, Version %d.%d.%d", &major, &minor, µ) != 3 ) + { + wxLogDebug("Unrecognized libtiff version string \"%s\"", ver); + + major = + minor = + micro = 0; + } + + wxString copyright; + const wxString desc = ver.BeforeFirst('\n', ©right); + copyright.Replace("\n", ""); + + return wxVersionInfo("libtiff", major, minor, micro, desc, copyright); +} + +#endif // wxUSE_LIBTIFF diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/imagxpm.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagxpm.cpp new file mode 100644 index 0000000000..d8b5bb2c69 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/imagxpm.cpp @@ -0,0 +1,264 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/imagxpm.cpp +// Purpose: wxXPMHandler +// Author: Vaclav Slavik, Robert Roebling +// Copyright: (c) 2001 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + +This file is partially based on source code of ImageMagick by John Cristy. Its +license is as follows: + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % +% X X PPPP M M % +% X X P P MM MM % +% X PPPP M M M % +% X X P M M % +% X X P M M % +% % +% % +% Read/Write ImageMagick Image Format. % +% % +% % +% Software Design % +% John Cristy % +% July 1992 % +% % +% % +% Copyright (C) 2001 ImageMagick Studio, a non-profit organization dedicated % +% to making software imaging solutions freely available. % +% % +% Permission is hereby granted, free of charge, to any person obtaining a % +% copy of this software and associated documentation files ("ImageMagick"), % +% to deal in ImageMagick without restriction, including without limitation % +% the rights to use, copy, modify, merge, publish, distribute, sublicense, % +% and/or sell copies of ImageMagick, and to permit persons to whom the % +% ImageMagick is furnished to do so, subject to the following conditions: % +% % +% The above copyright notice and this permission notice shall be included in % +% all copies or substantial portions of ImageMagick. % +% % +% The software is provided "as is", without warranty of any kind, express or % +% implied, including but not limited to the warranties of merchantability, % +% fitness for a particular purpose and noninfringement. In no event shall % +% ImageMagick Studio be liable for any claim, damages or other liability, % +% whether in an action of contract, tort or otherwise, arising from, out of % +% or in connection with ImageMagick or the use or other dealings in % +% ImageMagick. % +% % +% Except as contained in this notice, the name of the ImageMagick Studio % +% shall not be used in advertising or otherwise to promote the sale, use or % +% other dealings in ImageMagick without prior written authorization from the % +% ImageMagick Studio. % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% +*/ + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_XPM + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/utils.h" +#endif + +#include "wx/imagxpm.h" +#include "wx/wfstream.h" +#include "wx/xpmdecod.h" +#include "wx/filename.h" + +IMPLEMENT_DYNAMIC_CLASS(wxXPMHandler,wxImageHandler) + +//----------------------------------------------------------------------------- +// wxXPMHandler +//----------------------------------------------------------------------------- + +#if wxUSE_STREAMS + +bool wxXPMHandler::LoadFile(wxImage *image, + wxInputStream& stream, + bool WXUNUSED(verbose), int WXUNUSED(index)) +{ + wxXPMDecoder decoder; + + wxImage img = decoder.ReadFile(stream); + if ( !img.IsOk() ) + return false; + *image = img; + return true; +} + +namespace +{ + +// Make the given string a valid C identifier. +// +// All invalid characters are simply replaced by underscores and underscore is +// also prepended in the beginning if the initial character is not alphabetic. +void +MakeValidCIdent(wxString* str) +{ + const wxChar chUnderscore = wxT('_'); + + for ( wxString::iterator it = str->begin(); it != str->end(); ++it ) + { + const wxChar ch = *it; + if ( wxIsdigit(ch) ) + { + if ( it == str->begin() ) + { + // Identifiers can't start with a digit. + str->insert(0, chUnderscore); // prepend underscore + it = str->begin(); // restart as string changed + continue; + } + } + else if ( !wxIsalpha(ch) && ch != chUnderscore ) + { + // Not a valid character in C identifiers. + *it = chUnderscore; + } + } + + // Double underscores are not allowed in normal C identifiers and are + // useless anyhow. + str->Replace(wxT("__"), wxT("_")); +} + +} // anonymous namespace + +bool wxXPMHandler::SaveFile(wxImage * image, + wxOutputStream& stream, bool WXUNUSED(verbose)) +{ + // 1. count colours: + #define MaxCixels 92 + static const char Cixel[MaxCixels+1] = + " .XoO+@#$%&*=-;:>,<1234567890qwertyuipasdfghjk" + "lzxcvbnmMNBVCZASDFGHJKLPIUYTREWQ!~^/()_`'][{}|"; + int i, j, k; + + wxImageHistogram histogram; + int cols = int(image->ComputeHistogram(histogram)); + + int chars_per_pixel = 1; + for ( k = MaxCixels; cols > k; k *= MaxCixels) + chars_per_pixel++; + + // 2. write the header: + wxString sName; + if ( image->HasOption(wxIMAGE_OPTION_FILENAME) ) + { + sName = wxFileName(image->GetOption(wxIMAGE_OPTION_FILENAME)).GetName(); + MakeValidCIdent(&sName); + sName << wxT("_xpm"); + } + + if ( !sName.empty() ) + sName = wxString(wxT("/* XPM */\nstatic const char *")) + sName; + else + sName = wxT("/* XPM */\nstatic const char *xpm_data"); + stream.Write( (const char*) sName.ToAscii(), sName.Len() ); + + char tmpbuf[200]; + // VS: 200b is safe upper bound for anything produced by sprintf below + // (<101 bytes the string, neither %i can expand into more than 10 chars) + sprintf(tmpbuf, + "[] = {\n" + "/* columns rows colors chars-per-pixel */\n" + "\"%i %i %i %i\",\n", + image->GetWidth(), image->GetHeight(), cols, chars_per_pixel); + stream.Write(tmpbuf, strlen(tmpbuf)); + + // 3. create color symbols table: + char *symbols_data = new char[cols * (chars_per_pixel+1)]; + char **symbols = new char*[cols]; + + // 2a. find mask colour: + unsigned long mask_key = 0x1000000 /*invalid RGB value*/; + if (image->HasMask()) + mask_key = (image->GetMaskRed() << 16) | + (image->GetMaskGreen() << 8) | image->GetMaskBlue(); + + // 2b. generate colour table: + for (wxImageHistogram::iterator entry = histogram.begin(); + entry != histogram.end(); ++entry ) + { + unsigned long index = entry->second.index; + symbols[index] = symbols_data + index * (chars_per_pixel+1); + char *sym = symbols[index]; + + for (j = 0; j < chars_per_pixel; j++) + { + sym[j] = Cixel[index % MaxCixels]; + index /= MaxCixels; + } + sym[j] = '\0'; + + unsigned long key = entry->first; + + if (key == 0) + sprintf( tmpbuf, "\"%s c Black\",\n", sym); + else if (key == mask_key) + sprintf( tmpbuf, "\"%s c None\",\n", sym); + else + { + wxByte r = wxByte(key >> 16); + wxByte g = wxByte(key >> 8); + wxByte b = wxByte(key); + sprintf(tmpbuf, "\"%s c #%02X%02X%02X\",\n", sym, r, g, b); + } + stream.Write( tmpbuf, strlen(tmpbuf) ); + } + + stream.Write("/* pixels */\n", 13); + + unsigned char *data = image->GetData(); + for (j = 0; j < image->GetHeight(); j++) + { + char tmp_c; + tmp_c = '\"'; stream.Write(&tmp_c, 1); + for (i = 0; i < image->GetWidth(); i++, data += 3) + { + unsigned long key = (data[0] << 16) | (data[1] << 8) | (data[2]); + stream.Write(symbols[histogram[key].index], chars_per_pixel); + } + tmp_c = '\"'; stream.Write(&tmp_c, 1); + if ( j + 1 < image->GetHeight() ) + { + tmp_c = ','; stream.Write(&tmp_c, 1); + } + tmp_c = '\n'; stream.Write(&tmp_c, 1); + } + stream.Write("};\n", 3 ); + + // Clean up: + delete[] symbols; + delete[] symbols_data; + + return true; +} + +bool wxXPMHandler::DoCanRead(wxInputStream& stream) +{ + wxXPMDecoder decoder; + return decoder.CanRead(stream); + // it's ok to modify the stream position here +} + +#endif // wxUSE_STREAMS + +#endif // wxUSE_XPM diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/init.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/init.cpp new file mode 100644 index 0000000000..e00daeb701 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/init.cpp @@ -0,0 +1,557 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/init.cpp +// Purpose: initialisation for the library +// Author: Vadim Zeitlin +// Modified by: +// Created: 04.10.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif //__BORLANDC__ + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/filefn.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/module.h" +#endif + +#include "wx/init.h" +#include "wx/thread.h" + +#include "wx/scopedptr.h" +#include "wx/except.h" + +#if defined(__WINDOWS__) + #include "wx/msw/private.h" + #include "wx/msw/msvcrt.h" + + #ifdef wxCrtSetDbgFlag + static struct EnableMemLeakChecking + { + EnableMemLeakChecking() + { + // check for memory leaks on program exit (another useful flag + // is _CRTDBG_DELAY_FREE_MEM_DF which doesn't free deallocated + // memory which may be used to simulate low-memory condition) + wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); + } + } gs_enableLeakChecks; + #endif // wxCrtSetDbgFlag +#endif // __WINDOWS__ + +#if wxUSE_UNICODE && defined(__WXOSX__) + #include +#endif + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// we need a dummy app object if the user doesn't want to create a real one +class wxDummyConsoleApp : public wxAppConsole +{ +public: + wxDummyConsoleApp() { } + + virtual int OnRun() { wxFAIL_MSG( wxT("unreachable code") ); return 0; } + virtual bool DoYield(bool, long) { return true; } + + wxDECLARE_NO_COPY_CLASS(wxDummyConsoleApp); +}; + +// we need a special kind of auto pointer to wxApp which not only deletes the +// pointer it holds in its dtor but also resets the global application pointer +wxDECLARE_SCOPED_PTR(wxAppConsole, wxAppPtrBase) +wxDEFINE_SCOPED_PTR(wxAppConsole, wxAppPtrBase) + +class wxAppPtr : public wxAppPtrBase +{ +public: + wxEXPLICIT wxAppPtr(wxAppConsole *ptr = NULL) : wxAppPtrBase(ptr) { } + ~wxAppPtr() + { + if ( get() ) + { + // the pointer is going to be deleted in the base class dtor, don't + // leave the dangling pointer! + wxApp::SetInstance(NULL); + } + } + + void Set(wxAppConsole *ptr) + { + reset(ptr); + + wxApp::SetInstance(ptr); + } + + wxDECLARE_NO_COPY_CLASS(wxAppPtr); +}; + +// class to ensure that wxAppBase::CleanUp() is called if our Initialize() +// fails +class wxCallAppCleanup +{ +public: + wxCallAppCleanup(wxAppConsole *app) : m_app(app) { } + ~wxCallAppCleanup() { if ( m_app ) m_app->CleanUp(); } + + void Dismiss() { m_app = NULL; } + +private: + wxAppConsole *m_app; +}; + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +// suppress warnings about unused variables +static inline void Use(void *) { } + +#define WX_SUPPRESS_UNUSED_WARN(x) Use(&x) + +// ---------------------------------------------------------------------------- +// initialization data +// ---------------------------------------------------------------------------- + +static struct InitData +{ + InitData() + { + nInitCount = 0; + +#if wxUSE_UNICODE + argc = 0; + // argv = NULL; -- not even really needed +#endif // wxUSE_UNICODE + } + + // critical section protecting this struct + wxCRIT_SECT_DECLARE_MEMBER(csInit); + + // number of times wxInitialize() was called minus the number of times + // wxUninitialize() was + size_t nInitCount; + +#if wxUSE_UNICODE + int argc; + + // if we receive the command line arguments as ASCII and have to convert + // them to Unicode ourselves (this is the case under Unix but not Windows, + // for example), we remember the converted argv here because we'll have to + // free it when doing cleanup to avoid memory leaks + wchar_t **argv; +#endif // wxUSE_UNICODE + + wxDECLARE_NO_COPY_CLASS(InitData); +} gs_initData; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// command line arguments ANSI -> Unicode conversion +// ---------------------------------------------------------------------------- + +#if wxUSE_UNICODE + +static void ConvertArgsToUnicode(int argc, char **argv) +{ + gs_initData.argv = new wchar_t *[argc + 1]; + int wargc = 0; + for ( int i = 0; i < argc; i++ ) + { +#ifdef __DARWIN__ + wxWCharBuffer buf(wxConvFileName->cMB2WX(argv[i])); +#else + wxWCharBuffer buf(wxConvLocal.cMB2WX(argv[i])); +#endif + if ( !buf ) + { + wxLogWarning(_("Command line argument %d couldn't be converted to Unicode and will be ignored."), + i); + } + else // converted ok + { + gs_initData.argv[wargc++] = wxStrdup(buf); + } + } + + gs_initData.argc = wargc; + gs_initData.argv[wargc] = NULL; +} + +static void FreeConvertedArgs() +{ + if ( gs_initData.argv ) + { + for ( int i = 0; i < gs_initData.argc; i++ ) + { + free(gs_initData.argv[i]); + } + + wxDELETEA(gs_initData.argv); + gs_initData.argc = 0; + } +} + +#endif // wxUSE_UNICODE + +// ---------------------------------------------------------------------------- +// start up +// ---------------------------------------------------------------------------- + +// initialization which is always done (not customizable) before wxApp creation +static bool DoCommonPreInit() +{ +#if wxUSE_UNICODE && defined(__WXOSX__) + // In OS X and iOS, wchar_t CRT functions convert to char* and fail under + // some locales. The safest fix is to set LC_CTYPE to UTF-8 to ensure that + // they can handle any input. + // + // Note that this must be done for any app, Cocoa or console, whether or + // not it uses wxLocale. + // + // See http://stackoverflow.com/questions/11713745/why-does-the-printf-family-of-functions-care-about-locale + setlocale(LC_CTYPE, "UTF-8"); +#endif // wxUSE_UNICODE && defined(__WXOSX__) + +#if wxUSE_LOG + // Reset logging in case we were cleaned up and are being reinitialized. + wxLog::DoCreateOnDemand(); + + // force wxLog to create a log target now: we do it because wxTheApp + // doesn't exist yet so wxLog will create a special log target which is + // safe to use even when the GUI is not available while without this call + // we could create wxApp in wxEntryStart() below, then log an error about + // e.g. failure to establish connection to the X server and wxLog would + // send it to wxLogGui (because wxTheApp does exist already) which, of + // course, can't be used in this case + // + // notice also that this does nothing if the user had set up a custom log + // target before -- which is fine as we want to give him this possibility + // (as it's impossible to override logging by overriding wxAppTraits:: + // CreateLogTarget() before wxApp is created) and we just assume he knows + // what he is doing + wxLog::GetActiveTarget(); +#endif // wxUSE_LOG + +#ifdef __WINDOWS__ + // GUI applications obtain HINSTANCE in their WinMain() but we also need to + // initialize the global wxhInstance variable for the console programs as + // they may need it too, so set it here if it wasn't done yet + if ( !wxGetInstance() ) + { + wxSetInstance(::GetModuleHandle(NULL)); + } +#endif // __WINDOWS__ + + return true; +} + +// non customizable initialization done after wxApp creation and initialization +static bool DoCommonPostInit() +{ + wxModule::RegisterModules(); + + if ( !wxModule::InitializeModules() ) + { + wxLogError(_("Initialization failed in post init, aborting.")); + return false; + } + + return true; +} + +bool wxEntryStart(int& argc, wxChar **argv) +{ + // do minimal, always necessary, initialization + // -------------------------------------------- + + // initialize wxRTTI + if ( !DoCommonPreInit() ) + return false; + + + // first of all, we need an application object + // ------------------------------------------- + + // the user might have already created it himself somehow + wxAppPtr app(wxTheApp); + if ( !app.get() ) + { + // if not, he might have used IMPLEMENT_APP() to give us a function to + // create it + wxAppInitializerFunction fnCreate = wxApp::GetInitializerFunction(); + + if ( fnCreate ) + { + // he did, try to create the custom wxApp object + app.Set((*fnCreate)()); + } + } + + if ( !app.get() ) + { + // either IMPLEMENT_APP() was not used at all or it failed -- in any + // case we still need something + app.Set(new wxDummyConsoleApp); + } + + + // wxApp initialization: this can be customized + // -------------------------------------------- + + if ( !app->Initialize(argc, argv) ) + return false; + + // remember, possibly modified (e.g. due to removal of toolkit-specific + // parameters), command line arguments in member variables + app->argc = argc; + app->argv = argv; + + wxCallAppCleanup callAppCleanup(app.get()); + + + // common initialization after wxTheApp creation + // --------------------------------------------- + + if ( !DoCommonPostInit() ) + return false; + + + // prevent the smart pointer from destroying its contents + app.release(); + + // and the cleanup object from doing cleanup + callAppCleanup.Dismiss(); + +#if wxUSE_LOG + // now that we have a valid wxApp (wxLogGui would have crashed if we used + // it before now), we can delete the temporary sink we had created for the + // initialization messages -- the next time logging function is called, the + // sink will be recreated but this time wxAppTraits will be used + delete wxLog::SetActiveTarget(NULL); +#endif // wxUSE_LOG + + return true; +} + +#if wxUSE_UNICODE + +// we provide a wxEntryStart() wrapper taking "char *" pointer too +bool wxEntryStart(int& argc, char **argv) +{ + ConvertArgsToUnicode(argc, argv); + + if ( !wxEntryStart(gs_initData.argc, gs_initData.argv) ) + { + FreeConvertedArgs(); + + return false; + } + + return true; +} + +#endif // wxUSE_UNICODE + +// ---------------------------------------------------------------------------- +// clean up +// ---------------------------------------------------------------------------- + +// cleanup done before destroying wxTheApp +static void DoCommonPreCleanup() +{ +#if wxUSE_LOG + // flush the logged messages if any and don't use the current probably + // unsafe log target any more: the default one (wxLogGui) can't be used + // after the resources are freed which happens when we return and the user + // supplied one might be even more unsafe (using any wxWidgets GUI function + // is unsafe starting from now) + // + // notice that wxLog will still recreate a default log target if any + // messages are logged but that one will be safe to use until the very end + delete wxLog::SetActiveTarget(NULL); +#endif // wxUSE_LOG +} + +// cleanup done after destroying wxTheApp +static void DoCommonPostCleanup() +{ + wxModule::CleanUpModules(); + + // we can't do this in wxApp itself because it doesn't know if argv had + // been allocated +#if wxUSE_UNICODE + FreeConvertedArgs(); +#endif // wxUSE_UNICODE + + // use Set(NULL) and not Get() to avoid creating a message output object on + // demand when we just want to delete it + delete wxMessageOutput::Set(NULL); + +#if wxUSE_LOG + // call this first as it has a side effect: in addition to flushing all + // logs for this thread, it also flushes everything logged from other + // threads + wxLog::FlushActive(); + + // and now delete the last logger as well + // + // we still don't disable log target auto-vivification even if any log + // objects created now will result in memory leaks because it seems better + // to leak memory which doesn't matter much considering the application is + // exiting anyhow than to not show messages which could still be logged + // from the user code (e.g. static dtors and such) + delete wxLog::SetActiveTarget(NULL); +#endif // wxUSE_LOG +} + +void wxEntryCleanup() +{ + DoCommonPreCleanup(); + + + // delete the application object + if ( wxTheApp ) + { + wxTheApp->CleanUp(); + + // reset the global pointer to it to NULL before destroying it as in + // some circumstances this can result in executing the code using + // wxTheApp and using half-destroyed object is no good + wxAppConsole * const app = wxApp::GetInstance(); + wxApp::SetInstance(NULL); + delete app; + } + + + DoCommonPostCleanup(); +} + +// ---------------------------------------------------------------------------- +// wxEntry +// ---------------------------------------------------------------------------- + +// for MSW the real wxEntry is defined in msw/main.cpp +#ifndef __WINDOWS__ + #define wxEntryReal wxEntry +#endif // !__WINDOWS__ + +int wxEntryReal(int& argc, wxChar **argv) +{ + // library initialization + wxInitializer initializer(argc, argv); + + if ( !initializer.IsOk() ) + { +#if wxUSE_LOG + // flush any log messages explaining why we failed + delete wxLog::SetActiveTarget(NULL); +#endif + return -1; + } + + wxTRY + { +#if 0 // defined(__WXOSX__) && wxOSX_USE_COCOA_OR_IPHONE + // everything done in OnRun using native callbacks +#else + // app initialization + if ( !wxTheApp->CallOnInit() ) + { + // don't call OnExit() if OnInit() failed + return -1; + } + + // ensure that OnExit() is called if OnInit() had succeeded + class CallOnExit + { + public: + ~CallOnExit() { wxTheApp->OnExit(); } + } callOnExit; + + WX_SUPPRESS_UNUSED_WARN(callOnExit); +#endif + // app execution + return wxTheApp->OnRun(); + } + wxCATCH_ALL( wxTheApp->OnUnhandledException(); return -1; ) +} + +#if wxUSE_UNICODE + +// as with wxEntryStart, we provide an ANSI wrapper +int wxEntry(int& argc, char **argv) +{ + ConvertArgsToUnicode(argc, argv); + + return wxEntry(gs_initData.argc, gs_initData.argv); +} + +#endif // wxUSE_UNICODE + +// ---------------------------------------------------------------------------- +// wxInitialize/wxUninitialize +// ---------------------------------------------------------------------------- + +bool wxInitialize() +{ + return wxInitialize(0, (wxChar**)NULL); +} + +bool wxInitialize(int argc, wxChar **argv) +{ + wxCRIT_SECT_LOCKER(lockInit, gs_initData.csInit); + + if ( gs_initData.nInitCount++ ) + { + // already initialized + return true; + } + + return wxEntryStart(argc, argv); +} + +#if wxUSE_UNICODE +bool wxInitialize(int argc, char **argv) +{ + wxCRIT_SECT_LOCKER(lockInit, gs_initData.csInit); + + if ( gs_initData.nInitCount++ ) + { + // already initialized + return true; + } + + return wxEntryStart(argc, argv); +} +#endif // wxUSE_UNICODE + +void wxUninitialize() +{ + wxCRIT_SECT_LOCKER(lockInit, gs_initData.csInit); + + if ( --gs_initData.nInitCount == 0 ) + { + wxEntryCleanup(); + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/intl.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/intl.cpp new file mode 100644 index 0000000000..f8b011a917 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/intl.cpp @@ -0,0 +1,1818 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/intl.cpp +// Purpose: Internationalization and localisation for wxWidgets +// Author: Vadim Zeitlin +// Modified by: Michael N. Filippov +// (2003/09/30 - PluralForms support) +// Created: 29/01/98 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declaration +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifdef __EMX__ +// The following define is needed by Innotek's libc to +// make the definition of struct localeconv available. +#define __INTERNAL_DEFS +#endif + +#if wxUSE_INTL + +#ifndef WX_PRECOMP + #include "wx/dynarray.h" + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/app.h" + #include "wx/hashmap.h" + #include "wx/module.h" +#endif // WX_PRECOMP + +#ifndef __WXWINCE__ + #include +#endif + +// standard headers +#include +#include +#ifdef HAVE_LANGINFO_H + #include +#endif + +#ifdef __WIN32__ + #include "wx/msw/private.h" +#endif + +#include "wx/file.h" +#include "wx/filename.h" +#include "wx/tokenzr.h" +#include "wx/fontmap.h" +#include "wx/scopedptr.h" +#include "wx/apptrait.h" +#include "wx/stdpaths.h" +#include "wx/hashset.h" + +#if defined(__WXOSX__) + #include "wx/osx/core/cfref.h" + #include + #include + #include "wx/osx/core/cfstring.h" +#endif + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +#define TRACE_I18N wxS("i18n") + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +static wxLocale *wxSetLocale(wxLocale *pLocale); + +namespace +{ + +// get just the language part ("en" in "en_GB") +inline wxString ExtractLang(const wxString& langFull) +{ + return langFull.BeforeFirst('_'); +} + +// helper functions of GetSystemLanguage() +#ifdef __UNIX__ + +// get everything else (including the leading '_') +inline wxString ExtractNotLang(const wxString& langFull) +{ + size_t pos = langFull.find('_'); + if ( pos != wxString::npos ) + return langFull.substr(pos); + else + return wxString(); +} + +#endif // __UNIX__ + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// wxLanguageInfo +// ---------------------------------------------------------------------------- + +#ifdef __WINDOWS__ + +// helper used by wxLanguageInfo::GetLocaleName() and elsewhere to determine +// whether the locale is Unicode-only (it is if this function returns empty +// string) +static wxString wxGetANSICodePageForLocale(LCID lcid) +{ + wxString cp; + + wxChar buffer[16]; + if ( ::GetLocaleInfo(lcid, LOCALE_IDEFAULTANSICODEPAGE, + buffer, WXSIZEOF(buffer)) > 0 ) + { + if ( buffer[0] != wxT('0') || buffer[1] != wxT('\0') ) + cp = buffer; + //else: this locale doesn't use ANSI code page + } + + return cp; +} + +wxUint32 wxLanguageInfo::GetLCID() const +{ + return MAKELCID(MAKELANGID(WinLang, WinSublang), SORT_DEFAULT); +} + +wxString wxLanguageInfo::GetLocaleName() const +{ + wxString locale; + + const LCID lcid = GetLCID(); + + wxChar buffer[256]; + buffer[0] = wxT('\0'); + if ( !::GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, buffer, WXSIZEOF(buffer)) ) + { + wxLogLastError(wxT("GetLocaleInfo(LOCALE_SENGLANGUAGE)")); + return locale; + } + + locale << buffer; + if ( ::GetLocaleInfo(lcid, LOCALE_SENGCOUNTRY, + buffer, WXSIZEOF(buffer)) > 0 ) + { + locale << wxT('_') << buffer; + } + + const wxString cp = wxGetANSICodePageForLocale(lcid); + if ( !cp.empty() ) + { + locale << wxT('.') << cp; + } + + return locale; +} + +#endif // __WINDOWS__ + +// ---------------------------------------------------------------------------- +// wxLocale +// ---------------------------------------------------------------------------- + +#include "wx/arrimpl.cpp" +WX_DECLARE_EXPORTED_OBJARRAY(wxLanguageInfo, wxLanguageInfoArray); +WX_DEFINE_OBJARRAY(wxLanguageInfoArray) + +wxLanguageInfoArray *wxLocale::ms_languagesDB = NULL; + +/*static*/ void wxLocale::CreateLanguagesDB() +{ + if (ms_languagesDB == NULL) + { + ms_languagesDB = new wxLanguageInfoArray; + InitLanguagesDB(); + } +} + +/*static*/ void wxLocale::DestroyLanguagesDB() +{ + wxDELETE(ms_languagesDB); +} + + +void wxLocale::DoCommonInit() +{ + // Store the current locale in order to be able to restore it in the dtor. + m_pszOldLocale = wxSetlocale(LC_ALL, NULL); + if ( m_pszOldLocale ) + m_pszOldLocale = wxStrdup(m_pszOldLocale); + + + m_pOldLocale = wxSetLocale(this); + + // Set translations object, but only if the user didn't do so yet. + // This is to preserve compatibility with wx-2.8 where wxLocale was + // the only API for translations. wxLocale works as a stack, with + // latest-created one being the active one: + // wxLocale loc_fr(wxLANGUAGE_FRENCH); + // // _() returns French + // { + // wxLocale loc_cs(wxLANGUAGE_CZECH); + // // _() returns Czech + // } + // // _() returns French again + wxTranslations *oldTrans = wxTranslations::Get(); + if ( !oldTrans || + (m_pOldLocale && oldTrans == &m_pOldLocale->m_translations) ) + { + wxTranslations::SetNonOwned(&m_translations); + } + + m_language = wxLANGUAGE_UNKNOWN; + m_initialized = false; +} + +// NB: this function has (desired) side effect of changing current locale +bool wxLocale::Init(const wxString& name, + const wxString& shortName, + const wxString& locale, + bool bLoadDefault +#if WXWIN_COMPATIBILITY_2_8 + ,bool WXUNUSED_UNLESS_DEBUG(bConvertEncoding) +#endif + ) +{ +#if WXWIN_COMPATIBILITY_2_8 + wxASSERT_MSG( bConvertEncoding, + wxS("wxLocale::Init with bConvertEncoding=false is no longer supported, add charset to your catalogs") ); +#endif + + bool ret = DoInit(name, shortName, locale); + + // NB: don't use 'lang' here, 'language' may be wxLANGUAGE_DEFAULT + wxTranslations *t = wxTranslations::Get(); + if ( t ) + { + t->SetLanguage(shortName); + + if ( bLoadDefault ) + t->AddStdCatalog(); + } + + return ret; +} + +bool wxLocale::DoInit(const wxString& name, + const wxString& shortName, + const wxString& locale) +{ + wxASSERT_MSG( !m_initialized, + wxS("you can't call wxLocale::Init more than once") ); + + m_initialized = true; + m_strLocale = name; + m_strShort = shortName; + m_language = wxLANGUAGE_UNKNOWN; + + // change current locale (default: same as long name) + wxString szLocale(locale); + if ( szLocale.empty() ) + { + // the argument to setlocale() + szLocale = shortName; + + wxCHECK_MSG( !szLocale.empty(), false, + wxS("no locale to set in wxLocale::Init()") ); + } + + if ( !wxSetlocale(LC_ALL, szLocale) ) + { + wxLogError(_("locale '%s' cannot be set."), szLocale); + } + + // the short name will be used to look for catalog files as well, + // so we need something here + if ( m_strShort.empty() ) { + // FIXME I don't know how these 2 letter abbreviations are formed, + // this wild guess is surely wrong + if ( !szLocale.empty() ) + { + m_strShort += (wxChar)wxTolower(szLocale[0]); + if ( szLocale.length() > 1 ) + m_strShort += (wxChar)wxTolower(szLocale[1]); + } + } + + return true; +} + + +#if defined(__UNIX__) && wxUSE_UNICODE && !defined(__WXMAC__) +static const char *wxSetlocaleTryUTF8(int c, const wxString& lc) +{ + const char *l = NULL; + + // NB: We prefer to set UTF-8 locale if it's possible and only fall back to + // non-UTF-8 locale if it fails + + if ( !lc.empty() ) + { + wxString buf(lc); + wxString buf2; + buf2 = buf + wxS(".UTF-8"); + l = wxSetlocale(c, buf2); + if ( !l ) + { + buf2 = buf + wxS(".utf-8"); + l = wxSetlocale(c, buf2); + } + if ( !l ) + { + buf2 = buf + wxS(".UTF8"); + l = wxSetlocale(c, buf2); + } + if ( !l ) + { + buf2 = buf + wxS(".utf8"); + l = wxSetlocale(c, buf2); + } + } + + // if we can't set UTF-8 locale, try non-UTF-8 one: + if ( !l ) + l = wxSetlocale(c, lc); + + return l; +} +#else +#define wxSetlocaleTryUTF8(c, lc) wxSetlocale(c, lc) +#endif + +bool wxLocale::Init(int language, int flags) +{ +#if WXWIN_COMPATIBILITY_2_8 + wxASSERT_MSG( !(flags & wxLOCALE_CONV_ENCODING), + wxS("wxLOCALE_CONV_ENCODING is no longer supported, add charset to your catalogs") ); +#endif + + bool ret = true; + + int lang = language; + if (lang == wxLANGUAGE_DEFAULT) + { + // auto detect the language + lang = GetSystemLanguage(); + } + + // We failed to detect system language, so we will use English: + if (lang == wxLANGUAGE_UNKNOWN) + { + return false; + } + + const wxLanguageInfo *info = GetLanguageInfo(lang); + + // Unknown language: + if (info == NULL) + { + wxLogError(wxS("Unknown language %i."), lang); + return false; + } + + wxString name = info->Description; + wxString canonical = info->CanonicalName; + wxString locale; + + // Set the locale: +#if defined(__OS2__) + const char *retloc = wxSetlocale(LC_ALL , wxEmptyString); +#elif defined(__UNIX__) && !defined(__WXMAC__) + if (language != wxLANGUAGE_DEFAULT) + locale = info->CanonicalName; + + const char *retloc = wxSetlocaleTryUTF8(LC_ALL, locale); + + const wxString langOnly = ExtractLang(locale); + if ( !retloc ) + { + // Some C libraries don't like xx_YY form and require xx only + retloc = wxSetlocaleTryUTF8(LC_ALL, langOnly); + } + +#if wxUSE_FONTMAP + // some systems (e.g. FreeBSD and HP-UX) don't have xx_YY aliases but + // require the full xx_YY.encoding form, so try using UTF-8 because this is + // the only thing we can do generically + // + // TODO: add encodings applicable to each language to the lang DB and try + // them all in turn here + if ( !retloc ) + { + const wxChar **names = + wxFontMapperBase::GetAllEncodingNames(wxFONTENCODING_UTF8); + while ( *names ) + { + retloc = wxSetlocale(LC_ALL, locale + wxS('.') + *names++); + if ( retloc ) + break; + } + } +#endif // wxUSE_FONTMAP + + if ( !retloc ) + { + // Some C libraries (namely glibc) still use old ISO 639, + // so will translate the abbrev for them + wxString localeAlt; + if ( langOnly == wxS("he") ) + localeAlt = wxS("iw") + ExtractNotLang(locale); + else if ( langOnly == wxS("id") ) + localeAlt = wxS("in") + ExtractNotLang(locale); + else if ( langOnly == wxS("yi") ) + localeAlt = wxS("ji") + ExtractNotLang(locale); + else if ( langOnly == wxS("nb") ) + localeAlt = wxS("no_NO"); + else if ( langOnly == wxS("nn") ) + localeAlt = wxS("no_NY"); + + if ( !localeAlt.empty() ) + { + retloc = wxSetlocaleTryUTF8(LC_ALL, localeAlt); + if ( !retloc ) + retloc = wxSetlocaleTryUTF8(LC_ALL, ExtractLang(localeAlt)); + } + } + + if ( !retloc ) + ret = false; + +#ifdef __AIX__ + // at least in AIX 5.2 libc is buggy and the string returned from + // setlocale(LC_ALL) can't be passed back to it because it returns 6 + // strings (one for each locale category), i.e. for C locale we get back + // "C C C C C C" + // + // this contradicts IBM own docs but this is not of much help, so just work + // around it in the crudest possible manner + char* p = const_cast(wxStrchr(retloc, ' ')); + if ( p ) + *p = '\0'; +#endif // __AIX__ + +#elif defined(__WIN32__) + const char *retloc = "C"; + if ( language != wxLANGUAGE_DEFAULT ) + { + if ( info->WinLang == 0 ) + { + wxLogWarning(wxS("Locale '%s' not supported by OS."), name.c_str()); + // retloc already set to "C" + } + else // language supported by Windows + { + // Windows CE doesn't have SetThreadLocale() and there doesn't seem + // to be any equivalent +#ifndef __WXWINCE__ + const wxUint32 lcid = info->GetLCID(); + + // change locale used by Windows functions + ::SetThreadLocale(lcid); +#endif + + // and also call setlocale() to change locale used by the CRT + locale = info->GetLocaleName(); + if ( locale.empty() ) + { + ret = false; + } + else // have a valid locale + { + retloc = wxSetlocale(LC_ALL, locale); + } + } + } + else // language == wxLANGUAGE_DEFAULT + { + retloc = wxSetlocale(LC_ALL, wxEmptyString); + } + +#if wxUSE_UNICODE && (defined(__VISUALC__) || defined(__MINGW32__)) + // VC++ setlocale() (also used by Mingw) can't set locale to languages that + // can only be written using Unicode, therefore wxSetlocale() call fails + // for such languages but we don't want to report it as an error -- so that + // at least message catalogs can be used. + if ( !retloc ) + { + if ( wxGetANSICodePageForLocale(LOCALE_USER_DEFAULT).empty() ) + { + // we set the locale to a Unicode-only language, don't treat the + // inability of CRT to use it as an error + retloc = "C"; + } + } +#endif // CRT not handling Unicode-only languages + + if ( !retloc ) + ret = false; +#elif defined(__WXMAC__) + if (lang == wxLANGUAGE_DEFAULT) + locale = wxEmptyString; + else + locale = info->CanonicalName; + + const char *retloc = wxSetlocale(LC_ALL, locale); + + if ( !retloc ) + { + // Some C libraries don't like xx_YY form and require xx only + retloc = wxSetlocale(LC_ALL, ExtractLang(locale)); + } +#else + wxUnusedVar(flags); + return false; + #define WX_NO_LOCALE_SUPPORT +#endif + +#ifndef WX_NO_LOCALE_SUPPORT + if ( !ret ) + { + wxLogWarning(_("Cannot set locale to language \"%s\"."), name.c_str()); + + // continue nevertheless and try to load at least the translations for + // this language + } + + if ( !DoInit(name, canonical, retloc) ) + { + ret = false; + } + + if (IsOk()) // setlocale() succeeded + m_language = lang; + + // NB: don't use 'lang' here, 'language' + wxTranslations *t = wxTranslations::Get(); + if ( t ) + { + t->SetLanguage(static_cast(language)); + + if ( flags & wxLOCALE_LOAD_DEFAULT ) + t->AddStdCatalog(); + } + + return ret; +#endif // !WX_NO_LOCALE_SUPPORT +} + +namespace +{ + +#ifndef __WXOSX__ +// Small helper function: get the value of the given environment variable and +// return true only if the variable was found and has non-empty value. +inline bool wxGetNonEmptyEnvVar(const wxString& name, wxString* value) +{ + return wxGetEnv(name, value) && !value->empty(); +} +#endif + +} // anonymous namespace + +/*static*/ int wxLocale::GetSystemLanguage() +{ + CreateLanguagesDB(); + + // init i to avoid compiler warning + size_t i = 0, + count = ms_languagesDB->GetCount(); + +#if defined(__UNIX__) + // first get the string identifying the language from the environment + wxString langFull; +#ifdef __WXOSX__ + wxCFRef userLocaleRef(CFLocaleCopyCurrent()); + + // because the locale identifier (kCFLocaleIdentifier) is formatted a little bit differently, eg + // az_Cyrl_AZ@calendar=buddhist;currency=JPY we just recreate the base info as expected by wx here + + wxCFStringRef str(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode))); + langFull = str.AsString()+"_"; + str.reset(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode))); + langFull += str.AsString(); +#else + if (!wxGetNonEmptyEnvVar(wxS("LC_ALL"), &langFull) && + !wxGetNonEmptyEnvVar(wxS("LC_MESSAGES"), &langFull) && + !wxGetNonEmptyEnvVar(wxS("LANG"), &langFull)) + { + // no language specified, treat it as English + return wxLANGUAGE_ENGLISH_US; + } + + if ( langFull == wxS("C") || langFull == wxS("POSIX") ) + { + // default C locale is English too + return wxLANGUAGE_ENGLISH_US; + } +#endif + + // the language string has the following form + // + // lang[_LANG][.encoding][@modifier] + // + // (see environ(5) in the Open Unix specification) + // + // where lang is the primary language, LANG is a sublang/territory, + // encoding is the charset to use and modifier "allows the user to select + // a specific instance of localization data within a single category" + // + // for example, the following strings are valid: + // fr + // fr_FR + // de_DE.iso88591 + // de_DE@euro + // de_DE.iso88591@euro + + // for now we don't use the encoding, although we probably should (doing + // translations of the msg catalogs on the fly as required) (TODO) + // + // we need the modified for languages like Valencian: ca_ES@valencia + // though, remember it + wxString modifier; + size_t posModifier = langFull.find_first_of(wxS("@")); + if ( posModifier != wxString::npos ) + modifier = langFull.Mid(posModifier); + + size_t posEndLang = langFull.find_first_of(wxS("@.")); + if ( posEndLang != wxString::npos ) + { + langFull.Truncate(posEndLang); + } + + // do we have just the language (or sublang too)? + const bool justLang = langFull.find('_') == wxString::npos; + + // 0. Make sure the lang is according to latest ISO 639 + // (this is necessary because glibc uses iw and in instead + // of he and id respectively). + + // the language itself (second part is the dialect/sublang) + wxString langOrig = ExtractLang(langFull); + + wxString lang; + if ( langOrig == wxS("iw")) + lang = wxS("he"); + else if (langOrig == wxS("in")) + lang = wxS("id"); + else if (langOrig == wxS("ji")) + lang = wxS("yi"); + else if (langOrig == wxS("no_NO")) + lang = wxS("nb_NO"); + else if (langOrig == wxS("no_NY")) + lang = wxS("nn_NO"); + else if (langOrig == wxS("no")) + lang = wxS("nb_NO"); + else + lang = langOrig; + + // did we change it? + if ( lang != langOrig ) + { + langFull = lang + ExtractNotLang(langFull); + } + + // 1. Try to find the language either as is: + // a) With modifier if set + if ( !modifier.empty() ) + { + wxString langFullWithModifier = langFull + modifier; + for ( i = 0; i < count; i++ ) + { + if ( ms_languagesDB->Item(i).CanonicalName == langFullWithModifier ) + break; + } + } + + // b) Without modifier + if ( modifier.empty() || i == count ) + { + for ( i = 0; i < count; i++ ) + { + if ( ms_languagesDB->Item(i).CanonicalName == langFull ) + break; + } + } + + // 2. If langFull is of the form xx_YY, try to find xx: + if ( i == count && !justLang ) + { + for ( i = 0; i < count; i++ ) + { + if ( ms_languagesDB->Item(i).CanonicalName == lang ) + { + break; + } + } + } + + // 3. If langFull is of the form xx, try to find any xx_YY record: + if ( i == count && justLang ) + { + for ( i = 0; i < count; i++ ) + { + if ( ExtractLang(ms_languagesDB->Item(i).CanonicalName) + == langFull ) + { + break; + } + } + } + + + if ( i == count ) + { + // In addition to the format above, we also can have full language + // names in LANG env var - for example, SuSE is known to use + // LANG="german" - so check for use of non-standard format and try to + // find the name in verbose description. + for ( i = 0; i < count; i++ ) + { + if (ms_languagesDB->Item(i).Description.CmpNoCase(langFull) == 0) + { + break; + } + } + } +#elif defined(__WIN32__) + LCID lcid = GetUserDefaultLCID(); + if ( lcid != 0 ) + { + wxUint32 lang = PRIMARYLANGID(LANGIDFROMLCID(lcid)); + wxUint32 sublang = SUBLANGID(LANGIDFROMLCID(lcid)); + + for ( i = 0; i < count; i++ ) + { + if (ms_languagesDB->Item(i).WinLang == lang && + ms_languagesDB->Item(i).WinSublang == sublang) + { + break; + } + } + } + //else: leave wxlang == wxLANGUAGE_UNKNOWN +#endif // Unix/Win32 + + if ( i < count ) + { + // we did find a matching entry, use it + return ms_languagesDB->Item(i).Language; + } + + // no info about this language in the database + return wxLANGUAGE_UNKNOWN; +} + +// ---------------------------------------------------------------------------- +// encoding stuff +// ---------------------------------------------------------------------------- + +// this is a bit strange as under Windows we get the encoding name using its +// numeric value and under Unix we do it the other way round, but this just +// reflects the way different systems provide the encoding info + +/* static */ +wxString wxLocale::GetSystemEncodingName() +{ + wxString encname; + +#if defined(__WIN32__) && !defined(__WXMICROWIN__) + // FIXME: what is the error return value for GetACP()? + UINT codepage = ::GetACP(); + encname.Printf(wxS("windows-%u"), codepage); +#elif defined(__WXMAC__) + encname = wxCFStringRef::AsString( + CFStringGetNameOfEncoding(CFStringGetSystemEncoding()) + ); +#elif defined(__UNIX_LIKE__) + +#if defined(HAVE_LANGINFO_H) && defined(CODESET) + // GNU libc provides current character set this way (this conforms + // to Unix98) + char *oldLocale = strdup(setlocale(LC_CTYPE, NULL)); + setlocale(LC_CTYPE, ""); + const char *alang = nl_langinfo(CODESET); + setlocale(LC_CTYPE, oldLocale); + free(oldLocale); + + if ( alang ) + { + encname = wxString::FromAscii( alang ); + } + else // nl_langinfo() failed +#endif // HAVE_LANGINFO_H + { + // if we can't get at the character set directly, try to see if it's in + // the environment variables (in most cases this won't work, but I was + // out of ideas) + char *lang = getenv( "LC_ALL"); + char *dot = lang ? strchr(lang, '.') : NULL; + if (!dot) + { + lang = getenv( "LC_CTYPE" ); + if ( lang ) + dot = strchr(lang, '.' ); + } + if (!dot) + { + lang = getenv( "LANG"); + if ( lang ) + dot = strchr(lang, '.'); + } + + if ( dot ) + { + encname = wxString::FromAscii( dot+1 ); + } + } +#endif // Win32/Unix + + return encname; +} + +/* static */ +wxFontEncoding wxLocale::GetSystemEncoding() +{ +#if defined(__WIN32__) && !defined(__WXMICROWIN__) + UINT codepage = ::GetACP(); + + // wxWidgets only knows about CP1250-1257, 874, 932, 936, 949, 950 + if ( codepage >= 1250 && codepage <= 1257 ) + { + return (wxFontEncoding)(wxFONTENCODING_CP1250 + codepage - 1250); + } + + if ( codepage == 874 ) + { + return wxFONTENCODING_CP874; + } + + if ( codepage == 932 ) + { + return wxFONTENCODING_CP932; + } + + if ( codepage == 936 ) + { + return wxFONTENCODING_CP936; + } + + if ( codepage == 949 ) + { + return wxFONTENCODING_CP949; + } + + if ( codepage == 950 ) + { + return wxFONTENCODING_CP950; + } +#elif defined(__WXMAC__) + CFStringEncoding encoding = 0 ; + encoding = CFStringGetSystemEncoding() ; + return wxMacGetFontEncFromSystemEnc( encoding ) ; +#elif defined(__UNIX_LIKE__) && wxUSE_FONTMAP + const wxString encname = GetSystemEncodingName(); + if ( !encname.empty() ) + { + wxFontEncoding enc = wxFontMapperBase::GetEncodingFromName(encname); + + // on some modern Linux systems (RedHat 8) the default system locale + // is UTF8 -- but it isn't supported by wxGTK1 in ANSI build at all so + // don't even try to use it in this case +#if !wxUSE_UNICODE && \ + ((defined(__WXGTK__) && !defined(__WXGTK20__)) || defined(__WXMOTIF__)) + if ( enc == wxFONTENCODING_UTF8 ) + { + // the most similar supported encoding... + enc = wxFONTENCODING_ISO8859_1; + } +#endif // !wxUSE_UNICODE + + // GetEncodingFromName() returns wxFONTENCODING_DEFAULT for C locale + // (a.k.a. US-ASCII) which is arguably a bug but keep it like this for + // backwards compatibility and just take care to not return + // wxFONTENCODING_DEFAULT from here as this surely doesn't make sense + if ( enc == wxFONTENCODING_DEFAULT ) + { + // we don't have wxFONTENCODING_ASCII, so use the closest one + return wxFONTENCODING_ISO8859_1; + } + + if ( enc != wxFONTENCODING_MAX ) + { + return enc; + } + //else: return wxFONTENCODING_SYSTEM below + } +#endif // Win32/Unix + + return wxFONTENCODING_SYSTEM; +} + +/* static */ +void wxLocale::AddLanguage(const wxLanguageInfo& info) +{ + CreateLanguagesDB(); + ms_languagesDB->Add(info); +} + +/* static */ +const wxLanguageInfo *wxLocale::GetLanguageInfo(int lang) +{ + CreateLanguagesDB(); + + // calling GetLanguageInfo(wxLANGUAGE_DEFAULT) is a natural thing to do, so + // make it work + if ( lang == wxLANGUAGE_DEFAULT ) + lang = GetSystemLanguage(); + + const size_t count = ms_languagesDB->GetCount(); + for ( size_t i = 0; i < count; i++ ) + { + if ( ms_languagesDB->Item(i).Language == lang ) + { + // We need to create a temporary here in order to make this work with BCC in final build mode + wxLanguageInfo *ptr = &ms_languagesDB->Item(i); + return ptr; + } + } + + return NULL; +} + +/* static */ +wxString wxLocale::GetLanguageName(int lang) +{ + if ( lang == wxLANGUAGE_DEFAULT || lang == wxLANGUAGE_UNKNOWN ) + return wxEmptyString; + + const wxLanguageInfo *info = GetLanguageInfo(lang); + if ( !info ) + return wxEmptyString; + else + return info->Description; +} + +/* static */ +wxString wxLocale::GetLanguageCanonicalName(int lang) +{ + if ( lang == wxLANGUAGE_DEFAULT || lang == wxLANGUAGE_UNKNOWN ) + return wxEmptyString; + + const wxLanguageInfo *info = GetLanguageInfo(lang); + if ( !info ) + return wxEmptyString; + else + return info->CanonicalName; +} + +/* static */ +const wxLanguageInfo *wxLocale::FindLanguageInfo(const wxString& locale) +{ + CreateLanguagesDB(); + + const wxLanguageInfo *infoRet = NULL; + + const size_t count = ms_languagesDB->GetCount(); + for ( size_t i = 0; i < count; i++ ) + { + const wxLanguageInfo *info = &ms_languagesDB->Item(i); + + if ( wxStricmp(locale, info->CanonicalName) == 0 || + wxStricmp(locale, info->Description) == 0 ) + { + // exact match, stop searching + infoRet = info; + break; + } + + if ( wxStricmp(locale, info->CanonicalName.BeforeFirst(wxS('_'))) == 0 ) + { + // a match -- but maybe we'll find an exact one later, so continue + // looking + // + // OTOH, maybe we had already found a language match and in this + // case don't overwrite it because the entry for the default + // country always appears first in ms_languagesDB + if ( !infoRet ) + infoRet = info; + } + } + + return infoRet; +} + +wxString wxLocale::GetSysName() const +{ + return wxSetlocale(LC_ALL, NULL); +} + +// clean up +wxLocale::~wxLocale() +{ + // Restore old translations object. + // See DoCommonInit() for explanation of why this is needed for backward + // compatibility. + if ( wxTranslations::Get() == &m_translations ) + { + if ( m_pOldLocale ) + wxTranslations::SetNonOwned(&m_pOldLocale->m_translations); + else + wxTranslations::Set(NULL); + } + + // restore old locale pointer + wxSetLocale(m_pOldLocale); + + wxSetlocale(LC_ALL, m_pszOldLocale); + free(const_cast(m_pszOldLocale)); +} + + +// check if the given locale is provided by OS and C run time +/* static */ +bool wxLocale::IsAvailable(int lang) +{ + const wxLanguageInfo *info = wxLocale::GetLanguageInfo(lang); + if ( !info ) + { + // The language is unknown (this normally only happens when we're + // passed wxLANGUAGE_DEFAULT), so we can't support it. + wxASSERT_MSG( lang == wxLANGUAGE_DEFAULT, + wxS("No info for a valid language?") ); + return false; + } + +#if defined(__WIN32__) + if ( !info->WinLang ) + return false; + + if ( !::IsValidLocale(info->GetLCID(), LCID_INSTALLED) ) + return false; + +#elif defined(__UNIX__) + + // Test if setting the locale works, then set it back. + char * const oldLocale = wxStrdupA(setlocale(LC_ALL, NULL)); + + // Some platforms don't like xx_YY form and require xx only so test for + // it too. + const bool + available = wxSetlocaleTryUTF8(LC_ALL, info->CanonicalName) || + wxSetlocaleTryUTF8(LC_ALL, ExtractLang(info->CanonicalName)); + + // restore the original locale + wxSetlocale(LC_ALL, oldLocale); + + free(oldLocale); + + if ( !available ) + return false; +#endif + + return true; +} + + +bool wxLocale::AddCatalog(const wxString& domain) +{ + wxTranslations *t = wxTranslations::Get(); + if ( !t ) + return false; + return t->AddCatalog(domain); +} + +bool wxLocale::AddCatalog(const wxString& domain, wxLanguage msgIdLanguage) +{ + wxTranslations *t = wxTranslations::Get(); + if ( !t ) + return false; + return t->AddCatalog(domain, msgIdLanguage); +} + +// add a catalog to our linked list +bool wxLocale::AddCatalog(const wxString& szDomain, + wxLanguage msgIdLanguage, + const wxString& msgIdCharset) +{ + wxTranslations *t = wxTranslations::Get(); + if ( !t ) + return false; +#if wxUSE_UNICODE + wxUnusedVar(msgIdCharset); + return t->AddCatalog(szDomain, msgIdLanguage); +#else + return t->AddCatalog(szDomain, msgIdLanguage, msgIdCharset); +#endif +} + +bool wxLocale::IsLoaded(const wxString& domain) const +{ + wxTranslations *t = wxTranslations::Get(); + if ( !t ) + return false; + return t->IsLoaded(domain); +} + +wxString wxLocale::GetHeaderValue(const wxString& header, + const wxString& domain) const +{ + wxTranslations *t = wxTranslations::Get(); + if ( !t ) + return wxEmptyString; + return t->GetHeaderValue(header, domain); +} + +// ---------------------------------------------------------------------------- +// accessors for locale-dependent data +// ---------------------------------------------------------------------------- + +#if defined(__WINDOWS__) || defined(__WXOSX__) + +namespace +{ + +// This function translates from Unicode date formats described at +// +// http://unicode.org/reports/tr35/tr35-6.html#Date_Format_Patterns +// +// to strftime()-like syntax. This translation is not lossless but we try to do +// our best. + +static wxString TranslateFromUnicodeFormat(const wxString& fmt) +{ + wxString fmtWX; + fmtWX.reserve(fmt.length()); + + char chLast = '\0'; + size_t lastCount = 0; + + const char* formatchars = + "dghHmMsSy" +#ifdef __WINDOWS__ + "t" +#else + "EawD" +#endif + ; + for ( wxString::const_iterator p = fmt.begin(); /* end handled inside */; ++p ) + { + if ( p != fmt.end() ) + { + if ( *p == chLast ) + { + lastCount++; + continue; + } + + const wxUniChar ch = (*p).GetValue(); + if ( ch.IsAscii() && strchr(formatchars, ch) ) + { + // these characters come in groups, start counting them + chLast = ch; + lastCount = 1; + continue; + } + } + + // interpret any special characters we collected so far + if ( lastCount ) + { + switch ( chLast ) + { + case 'd': + switch ( lastCount ) + { + case 1: // d + case 2: // dd + // these two are the same as we don't distinguish + // between 1 and 2 digits for days + fmtWX += "%d"; + break; +#ifdef __WINDOWS__ + case 3: // ddd + fmtWX += "%a"; + break; + + case 4: // dddd + fmtWX += "%A"; + break; +#endif + default: + wxFAIL_MSG( "too many 'd's" ); + } + break; +#ifndef __WINDOWS__ + case 'D': + switch ( lastCount ) + { + case 1: // D + case 2: // DD + case 3: // DDD + fmtWX += "%j"; + break; + + default: + wxFAIL_MSG( "wrong number of 'D's" ); + } + break; + case 'w': + switch ( lastCount ) + { + case 1: // w + case 2: // ww + fmtWX += "%W"; + break; + + default: + wxFAIL_MSG( "wrong number of 'w's" ); + } + break; + case 'E': + switch ( lastCount ) + { + case 1: // E + case 2: // EE + case 3: // EEE + fmtWX += "%a"; + break; + case 4: // EEEE + fmtWX += "%A"; + break; + case 5: // EEEEE + fmtWX += "%a"; + break; + + default: + wxFAIL_MSG( "wrong number of 'E's" ); + } + break; +#endif + case 'M': + switch ( lastCount ) + { + case 1: // M + case 2: // MM + // as for 'd' and 'dd' above + fmtWX += "%m"; + break; + + case 3: + fmtWX += "%b"; + break; + + case 4: + fmtWX += "%B"; + break; + + default: + wxFAIL_MSG( "too many 'M's" ); + } + break; + + case 'y': + switch ( lastCount ) + { + case 1: // y + case 2: // yy + fmtWX += "%y"; + break; + + case 4: // yyyy + fmtWX += "%Y"; + break; + + default: + wxFAIL_MSG( "wrong number of 'y's" ); + } + break; + + case 'H': + switch ( lastCount ) + { + case 1: // H + case 2: // HH + fmtWX += "%H"; + break; + + default: + wxFAIL_MSG( "wrong number of 'H's" ); + } + break; + + case 'h': + switch ( lastCount ) + { + case 1: // h + case 2: // hh + fmtWX += "%I"; + break; + + default: + wxFAIL_MSG( "wrong number of 'h's" ); + } + break; + + case 'm': + switch ( lastCount ) + { + case 1: // m + case 2: // mm + fmtWX += "%M"; + break; + + default: + wxFAIL_MSG( "wrong number of 'm's" ); + } + break; + + case 's': + switch ( lastCount ) + { + case 1: // s + case 2: // ss + fmtWX += "%S"; + break; + + default: + wxFAIL_MSG( "wrong number of 's's" ); + } + break; + + case 'g': + // strftime() doesn't have era string, + // ignore this format + wxASSERT_MSG( lastCount <= 2, "too many 'g's" ); + + break; +#ifndef __WINDOWS__ + case 'a': + fmtWX += "%p"; + break; +#endif +#ifdef __WINDOWS__ + case 't': + switch ( lastCount ) + { + case 1: // t + case 2: // tt + fmtWX += "%p"; + break; + + default: + wxFAIL_MSG( "too many 't's" ); + } + break; +#endif + default: + wxFAIL_MSG( "unreachable" ); + } + + chLast = '\0'; + lastCount = 0; + } + + if ( p == fmt.end() ) + break; + + // not a special character so must be just a separator, treat as is + if ( *p == wxT('%') ) + { + // this one needs to be escaped + fmtWX += wxT('%'); + } + + fmtWX += *p; + } + + return fmtWX; +} + +} // anonymous namespace + +#endif // __WINDOWS__ || __WXOSX__ + +#if defined(__WINDOWS__) + +namespace +{ + +LCTYPE GetLCTYPEFormatFromLocalInfo(wxLocaleInfo index) +{ + switch ( index ) + { + case wxLOCALE_SHORT_DATE_FMT: + return LOCALE_SSHORTDATE; + + case wxLOCALE_LONG_DATE_FMT: + return LOCALE_SLONGDATE; + + case wxLOCALE_TIME_FMT: + return LOCALE_STIMEFORMAT; + + default: + wxFAIL_MSG( "no matching LCTYPE" ); + } + + return 0; +} + +} // anonymous namespace + +/* static */ +wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory cat) +{ + const wxLanguageInfo * const + info = wxGetLocale() ? GetLanguageInfo(wxGetLocale()->GetLanguage()) + : NULL; + if ( !info ) + { + // wxSetLocale() hadn't been called yet of failed, hence CRT must be + // using "C" locale -- but check it to detect bugs that would happen if + // this were not the case. + wxASSERT_MSG( strcmp(setlocale(LC_ALL, NULL), "C") == 0, + wxS("You probably called setlocale() directly instead ") + wxS("of using wxLocale and now there is a ") + wxS("mismatch between C/C++ and Windows locale.\n") + wxS("Things are going to break, please only change ") + wxS("locale by creating wxLocale objects to avoid this!") ); + + + // Return the hard coded values for C locale. This is really the right + // thing to do as there is no LCID we can use in the code below in this + // case, even LOCALE_INVARIANT is not quite the same as C locale (the + // only difference is that it uses %Y instead of %y in the date format + // but this difference is significant enough). + switch ( index ) + { + case wxLOCALE_THOUSANDS_SEP: + return wxString(); + + case wxLOCALE_DECIMAL_POINT: + return "."; + + case wxLOCALE_SHORT_DATE_FMT: + return "%m/%d/%y"; + + case wxLOCALE_LONG_DATE_FMT: + return "%A, %B %d, %Y"; + + case wxLOCALE_TIME_FMT: + return "%H:%M:%S"; + + case wxLOCALE_DATE_TIME_FMT: + return "%m/%d/%y %H:%M:%S"; + + default: + wxFAIL_MSG( "unknown wxLocaleInfo" ); + } + } + + const wxUint32 lcid = info->GetLCID(); + + wxString str; + + wxChar buf[256]; + buf[0] = wxT('\0'); + + switch ( index ) + { + case wxLOCALE_THOUSANDS_SEP: + if ( ::GetLocaleInfo(lcid, LOCALE_STHOUSAND, buf, WXSIZEOF(buf)) ) + str = buf; + break; + + case wxLOCALE_DECIMAL_POINT: + if ( ::GetLocaleInfo(lcid, + cat == wxLOCALE_CAT_MONEY + ? LOCALE_SMONDECIMALSEP + : LOCALE_SDECIMAL, + buf, + WXSIZEOF(buf)) ) + { + str = buf; + + // As we get our decimal point separator from Win32 and not the + // CRT there is a possibility of mismatch between them and this + // can easily happen if the user code called setlocale() + // instead of using wxLocale to change the locale. And this can + // result in very strange bugs elsewhere in the code as the + // assumptions that formatted strings do use the decimal + // separator actually fail, so check for it here. + wxASSERT_MSG + ( + wxString::Format("%.3f", 1.23).find(str) != wxString::npos, + "Decimal separator mismatch -- did you use setlocale()?" + "If so, use wxLocale to change the locale instead." + ); + } + break; + + case wxLOCALE_SHORT_DATE_FMT: + case wxLOCALE_LONG_DATE_FMT: + case wxLOCALE_TIME_FMT: + if ( ::GetLocaleInfo(lcid, GetLCTYPEFormatFromLocalInfo(index), + buf, WXSIZEOF(buf)) ) + { + return TranslateFromUnicodeFormat(buf); + } + break; + + case wxLOCALE_DATE_TIME_FMT: + // there doesn't seem to be any specific setting for this, so just + // combine date and time ones + // + // we use the short date because this is what "%c" uses by default + // ("%#c" uses long date but we have no way to specify the + // alternate representation here) + { + const wxString datefmt = GetInfo(wxLOCALE_SHORT_DATE_FMT); + if ( datefmt.empty() ) + break; + + const wxString timefmt = GetInfo(wxLOCALE_TIME_FMT); + if ( timefmt.empty() ) + break; + + str << datefmt << ' ' << timefmt; + } + break; + + default: + wxFAIL_MSG( "unknown wxLocaleInfo" ); + } + + return str; +} + +#elif defined(__WXOSX__) + +/* static */ +wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat)) +{ + CFLocaleRef userLocaleRefRaw; + if ( wxGetLocale() ) + { + userLocaleRefRaw = CFLocaleCreate + ( + kCFAllocatorDefault, + wxCFStringRef(wxGetLocale()->GetCanonicalName()) + ); + } + else // no current locale, use the default one + { + userLocaleRefRaw = CFLocaleCopyCurrent(); + } + + wxCFRef userLocaleRef(userLocaleRefRaw); + + CFStringRef cfstr = 0; + switch ( index ) + { + case wxLOCALE_THOUSANDS_SEP: + cfstr = (CFStringRef) CFLocaleGetValue(userLocaleRef, kCFLocaleGroupingSeparator); + break; + + case wxLOCALE_DECIMAL_POINT: + cfstr = (CFStringRef) CFLocaleGetValue(userLocaleRef, kCFLocaleDecimalSeparator); + break; + + case wxLOCALE_SHORT_DATE_FMT: + case wxLOCALE_LONG_DATE_FMT: + case wxLOCALE_DATE_TIME_FMT: + case wxLOCALE_TIME_FMT: + { + CFDateFormatterStyle dateStyle = kCFDateFormatterNoStyle; + CFDateFormatterStyle timeStyle = kCFDateFormatterNoStyle; + switch (index ) + { + case wxLOCALE_SHORT_DATE_FMT: + dateStyle = kCFDateFormatterShortStyle; + break; + case wxLOCALE_LONG_DATE_FMT: + dateStyle = kCFDateFormatterFullStyle; + break; + case wxLOCALE_DATE_TIME_FMT: + dateStyle = kCFDateFormatterFullStyle; + timeStyle = kCFDateFormatterMediumStyle; + break; + case wxLOCALE_TIME_FMT: + timeStyle = kCFDateFormatterMediumStyle; + break; + default: + wxFAIL_MSG( "unexpected time locale" ); + return wxString(); + } + wxCFRef dateFormatter( CFDateFormatterCreate + (NULL, userLocaleRef, dateStyle, timeStyle)); + wxCFStringRef cfs = wxCFRetain( CFDateFormatterGetFormat(dateFormatter )); + wxString format = TranslateFromUnicodeFormat(cfs.AsString()); + // we always want full years + format.Replace("%y","%Y"); + return format; + } + break; + + default: + wxFAIL_MSG( "Unknown locale info" ); + return wxString(); + } + + wxCFStringRef str(wxCFRetain(cfstr)); + return str.AsString(); +} + +#else // !__WINDOWS__ && !__WXOSX__, assume generic POSIX + +namespace +{ + +wxString GetDateFormatFromLangInfo(wxLocaleInfo index) +{ +#ifdef HAVE_LANGINFO_H + // array containing parameters for nl_langinfo() indexes by offset of index + // from wxLOCALE_SHORT_DATE_FMT + static const nl_item items[] = + { + D_FMT, D_T_FMT, D_T_FMT, T_FMT, + }; + + const int nlidx = index - wxLOCALE_SHORT_DATE_FMT; + if ( nlidx < 0 || nlidx >= (int)WXSIZEOF(items) ) + { + wxFAIL_MSG( "logic error in GetInfo() code" ); + return wxString(); + } + + const wxString fmt(nl_langinfo(items[nlidx])); + + // just return the format returned by nl_langinfo() except for long date + // format which we need to recover from date/time format ourselves (but not + // if we failed completely) + if ( fmt.empty() || index != wxLOCALE_LONG_DATE_FMT ) + return fmt; + + // this is not 100% precise but the idea is that a typical date/time format + // under POSIX systems is a combination of a long date format with time one + // so we should be able to get just the long date format by removing all + // time-specific format specifiers + static const char *timeFmtSpecs = "HIklMpPrRsSTXzZ"; + static const char *timeSep = " :./-"; + + wxString fmtDateOnly; + const wxString::const_iterator end = fmt.end(); + wxString::const_iterator lastSep = end; + for ( wxString::const_iterator p = fmt.begin(); p != end; ++p ) + { + if ( strchr(timeSep, *p) ) + { + if ( lastSep == end ) + lastSep = p; + + // skip it for now, we'll discard it if it's followed by a time + // specifier later or add it to fmtDateOnly if it is not + continue; + } + + if ( *p == '%' && + (p + 1 != end) && strchr(timeFmtSpecs, p[1]) ) + { + // time specified found: skip it and any preceding separators + ++p; + lastSep = end; + continue; + } + + if ( lastSep != end ) + { + fmtDateOnly += wxString(lastSep, p); + lastSep = end; + } + + fmtDateOnly += *p; + } + + return fmtDateOnly; +#else // !HAVE_LANGINFO_H + wxUnusedVar(index); + + // no fallback, let the application deal with unavailability of + // nl_langinfo() itself as there is no good way for us to do it (well, we + // could try to reverse engineer the format from strftime() output but this + // looks like too much trouble considering the relatively small number of + // systems without nl_langinfo() still in use) + return wxString(); +#endif // HAVE_LANGINFO_H/!HAVE_LANGINFO_H +} + +} // anonymous namespace + +/* static */ +wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory cat) +{ + lconv * const lc = localeconv(); + if ( !lc ) + return wxString(); + + switch ( index ) + { + case wxLOCALE_THOUSANDS_SEP: + if ( cat == wxLOCALE_CAT_NUMBER ) + return lc->thousands_sep; + else if ( cat == wxLOCALE_CAT_MONEY ) + return lc->mon_thousands_sep; + + wxFAIL_MSG( "invalid wxLocaleCategory" ); + break; + + + case wxLOCALE_DECIMAL_POINT: + if ( cat == wxLOCALE_CAT_NUMBER ) + return lc->decimal_point; + else if ( cat == wxLOCALE_CAT_MONEY ) + return lc->mon_decimal_point; + + wxFAIL_MSG( "invalid wxLocaleCategory" ); + break; + + case wxLOCALE_SHORT_DATE_FMT: + case wxLOCALE_LONG_DATE_FMT: + case wxLOCALE_DATE_TIME_FMT: + case wxLOCALE_TIME_FMT: + if ( cat != wxLOCALE_CAT_DATE && cat != wxLOCALE_CAT_DEFAULT ) + { + wxFAIL_MSG( "invalid wxLocaleCategory" ); + break; + } + + return GetDateFormatFromLangInfo(index); + + + default: + wxFAIL_MSG( "unknown wxLocaleInfo value" ); + } + + return wxString(); +} + +#endif // platform + +// ---------------------------------------------------------------------------- +// global functions and variables +// ---------------------------------------------------------------------------- + +// retrieve/change current locale +// ------------------------------ + +// the current locale object +static wxLocale *g_pLocale = NULL; + +wxLocale *wxGetLocale() +{ + return g_pLocale; +} + +wxLocale *wxSetLocale(wxLocale *pLocale) +{ + wxLocale *pOld = g_pLocale; + g_pLocale = pLocale; + return pOld; +} + + + +// ---------------------------------------------------------------------------- +// wxLocale module (for lazy destruction of languagesDB) +// ---------------------------------------------------------------------------- + +class wxLocaleModule: public wxModule +{ + DECLARE_DYNAMIC_CLASS(wxLocaleModule) + public: + wxLocaleModule() {} + + bool OnInit() + { + return true; + } + + void OnExit() + { + wxLocale::DestroyLanguagesDB(); + } +}; + +IMPLEMENT_DYNAMIC_CLASS(wxLocaleModule, wxModule) + +#endif // wxUSE_INTL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/ipcbase.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/ipcbase.cpp new file mode 100644 index 0000000000..13c3f2e55c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/ipcbase.cpp @@ -0,0 +1,130 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/ipcbase.cpp +// Purpose: IPC base classes +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#endif + +#include "wx/ipcbase.h" + +wxIMPLEMENT_ABSTRACT_CLASS(wxServerBase, wxObject) +wxIMPLEMENT_ABSTRACT_CLASS(wxClientBase, wxObject) +wxIMPLEMENT_ABSTRACT_CLASS(wxConnectionBase, wxObject) + +wxConnectionBase::wxConnectionBase(void *buffer, size_t bytes) + : m_buffer((char *)buffer), + m_buffersize(bytes), + m_deletebufferwhendone(false), + m_connected(true) +{ + if ( buffer == NULL ) + { // behave like next constructor + m_buffersize = 0; + m_deletebufferwhendone = true; + } +} + +wxConnectionBase::wxConnectionBase() + : m_buffer(NULL), + m_buffersize(0), + m_deletebufferwhendone(true), + m_connected(true) +{ +} + +wxConnectionBase::wxConnectionBase(const wxConnectionBase& copy) + : wxObject(), + m_buffer(copy.m_buffer), + m_buffersize(copy.m_buffersize), + m_deletebufferwhendone(false), + m_connected(copy.m_connected) + +{ + // copy constructor would require ref-counted pointer to buffer + wxFAIL_MSG( wxT("Copy constructor of wxConnectionBase not implemented") ); +} + + +wxConnectionBase::~wxConnectionBase() +{ + if ( m_deletebufferwhendone ) + delete [] m_buffer; +} + +/* static */ +wxString wxConnectionBase::GetTextFromData(const void* data, + size_t size, + wxIPCFormat fmt) +{ + wxString s; + switch ( fmt ) + { + case wxIPC_TEXT: + // normally the string should be NUL-terminated and size should + // include the total size of the buffer, including NUL -- but don't + // crash (by trying to access (size_t)-1 bytes) if it doesn't + if ( size ) + size--; + + s = wxString(static_cast(data), size); + break; + +#if wxUSE_UNICODE + // TODO: we should handle both wxIPC_UTF16TEXT and wxIPC_UTF32TEXT here + // for inter-platform IPC + case wxIPC_UNICODETEXT: + wxASSERT_MSG( !(size % sizeof(wchar_t)), "invalid buffer size" ); + if ( size ) + { + size /= sizeof(wchar_t); + size--; + } + + s = wxString(static_cast(data), size); + break; + + case wxIPC_UTF8TEXT: + if ( size ) + size--; + + s = wxString::FromUTF8(static_cast(data), size); + break; +#endif // wxUSE_UNICODE + + default: + wxFAIL_MSG( "non-string IPC format in GetTextFromData()" ); + } + + return s; +} + +void *wxConnectionBase::GetBufferAtLeast( size_t bytes ) +{ + if ( m_buffersize >= bytes ) + return m_buffer; + else + { // need to resize buffer + if ( m_deletebufferwhendone ) + { // we're in charge of buffer, increase it + delete [] m_buffer; + m_buffer = new char[bytes]; + m_buffersize = bytes; + return m_buffer; + } // user-supplied buffer, fail + else + return NULL; + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/languageinfo.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/languageinfo.cpp new file mode 100644 index 0000000000..b162aea070 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/languageinfo.cpp @@ -0,0 +1,798 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/languageinfo.cpp +// Purpose: wxLocale::InitLanguagesDB() +// Author: Vadim Zeitlin, Vaclav Slavik +// Created: 2010-04-23 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declaration +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/intl.h" + +#if wxUSE_INTL + +#ifdef __WIN32__ + #include "wx/msw/private.h" +#endif + +// ---------------------------------------------------------------------------- +// default languages table & initialization +// ---------------------------------------------------------------------------- + + +// --- --- --- generated code begins here --- --- --- + +// This table is generated by misc/languages/genlang.py +// When making changes, please put them into misc/languages/langtabl.txt + +#if !defined(__WIN32__) || defined(__WXMICROWIN__) + +#define SETWINLANG(info,lang,sublang) + +#else + +#define SETWINLANG(info,lang,sublang) \ + info.WinLang = lang, info.WinSublang = sublang; + +#ifndef LANG_AFRIKAANS +#define LANG_AFRIKAANS (0) +#endif +#ifndef LANG_ALBANIAN +#define LANG_ALBANIAN (0) +#endif +#ifndef LANG_ARABIC +#define LANG_ARABIC (0) +#endif +#ifndef LANG_ARMENIAN +#define LANG_ARMENIAN (0) +#endif +#ifndef LANG_ASSAMESE +#define LANG_ASSAMESE (0) +#endif +#ifndef LANG_AZERI +#define LANG_AZERI (0) +#endif +#ifndef LANG_BASQUE +#define LANG_BASQUE (0) +#endif +#ifndef LANG_BELARUSIAN +#define LANG_BELARUSIAN (0) +#endif +#ifndef LANG_BENGALI +#define LANG_BENGALI (0) +#endif +#ifndef LANG_BOSNIAN +#define LANG_BOSNIAN (0) +#endif +#ifndef LANG_BULGARIAN +#define LANG_BULGARIAN (0) +#endif +#ifndef LANG_CATALAN +#define LANG_CATALAN (0) +#endif +#ifndef LANG_CHINESE +#define LANG_CHINESE (0) +#endif +#ifndef LANG_CROATIAN +#define LANG_CROATIAN (0) +#endif +#ifndef LANG_CZECH +#define LANG_CZECH (0) +#endif +#ifndef LANG_DANISH +#define LANG_DANISH (0) +#endif +#ifndef LANG_DUTCH +#define LANG_DUTCH (0) +#endif +#ifndef LANG_ENGLISH +#define LANG_ENGLISH (0) +#endif +#ifndef LANG_ESTONIAN +#define LANG_ESTONIAN (0) +#endif +#ifndef LANG_FAEROESE +#define LANG_FAEROESE (0) +#endif +#ifndef LANG_FARSI +#define LANG_FARSI (0) +#endif +#ifndef LANG_FINNISH +#define LANG_FINNISH (0) +#endif +#ifndef LANG_FRENCH +#define LANG_FRENCH (0) +#endif +#ifndef LANG_GEORGIAN +#define LANG_GEORGIAN (0) +#endif +#ifndef LANG_GERMAN +#define LANG_GERMAN (0) +#endif +#ifndef LANG_GREEK +#define LANG_GREEK (0) +#endif +#ifndef LANG_GUJARATI +#define LANG_GUJARATI (0) +#endif +#ifndef LANG_HEBREW +#define LANG_HEBREW (0) +#endif +#ifndef LANG_HINDI +#define LANG_HINDI (0) +#endif +#ifndef LANG_HUNGARIAN +#define LANG_HUNGARIAN (0) +#endif +#ifndef LANG_ICELANDIC +#define LANG_ICELANDIC (0) +#endif +#ifndef LANG_INDONESIAN +#define LANG_INDONESIAN (0) +#endif +#ifndef LANG_ITALIAN +#define LANG_ITALIAN (0) +#endif +#ifndef LANG_JAPANESE +#define LANG_JAPANESE (0) +#endif +#ifndef LANG_KABYLE +#define LANG_KABYLE (0) +#endif +#ifndef LANG_KANNADA +#define LANG_KANNADA (0) +#endif +#ifndef LANG_KASHMIRI +#define LANG_KASHMIRI (0) +#endif +#ifndef LANG_KAZAK +#define LANG_KAZAK (0) +#endif +#ifndef LANG_KONKANI +#define LANG_KONKANI (0) +#endif +#ifndef LANG_KOREAN +#define LANG_KOREAN (0) +#endif +#ifndef LANG_LATVIAN +#define LANG_LATVIAN (0) +#endif +#ifndef LANG_LITHUANIAN +#define LANG_LITHUANIAN (0) +#endif +#ifndef LANG_MACEDONIAN +#define LANG_MACEDONIAN (0) +#endif +#ifndef LANG_MALAY +#define LANG_MALAY (0) +#endif +#ifndef LANG_MALAYALAM +#define LANG_MALAYALAM (0) +#endif +#ifndef LANG_MANIPURI +#define LANG_MANIPURI (0) +#endif +#ifndef LANG_MARATHI +#define LANG_MARATHI (0) +#endif +#ifndef LANG_NEPALI +#define LANG_NEPALI (0) +#endif +#ifndef LANG_NORWEGIAN +#define LANG_NORWEGIAN (0) +#endif +#ifndef LANG_ORIYA +#define LANG_ORIYA (0) +#endif +#ifndef LANG_POLISH +#define LANG_POLISH (0) +#endif +#ifndef LANG_PORTUGUESE +#define LANG_PORTUGUESE (0) +#endif +#ifndef LANG_PUNJABI +#define LANG_PUNJABI (0) +#endif +#ifndef LANG_ROMANIAN +#define LANG_ROMANIAN (0) +#endif +#ifndef LANG_RUSSIAN +#define LANG_RUSSIAN (0) +#endif +#ifndef LANG_SAMI +#define LANG_SAMI (0) +#endif +#ifndef LANG_SANSKRIT +#define LANG_SANSKRIT (0) +#endif +#ifndef LANG_SERBIAN +#define LANG_SERBIAN (0) +#endif +#ifndef LANG_SINDHI +#define LANG_SINDHI (0) +#endif +#ifndef LANG_SLOVAK +#define LANG_SLOVAK (0) +#endif +#ifndef LANG_SLOVENIAN +#define LANG_SLOVENIAN (0) +#endif +#ifndef LANG_SPANISH +#define LANG_SPANISH (0) +#endif +#ifndef LANG_SWAHILI +#define LANG_SWAHILI (0) +#endif +#ifndef LANG_SWEDISH +#define LANG_SWEDISH (0) +#endif +#ifndef LANG_TAMIL +#define LANG_TAMIL (0) +#endif +#ifndef LANG_TATAR +#define LANG_TATAR (0) +#endif +#ifndef LANG_TELUGU +#define LANG_TELUGU (0) +#endif +#ifndef LANG_THAI +#define LANG_THAI (0) +#endif +#ifndef LANG_TURKISH +#define LANG_TURKISH (0) +#endif +#ifndef LANG_UKRAINIAN +#define LANG_UKRAINIAN (0) +#endif +#ifndef LANG_URDU +#define LANG_URDU (0) +#endif +#ifndef LANG_UZBEK +#define LANG_UZBEK (0) +#endif +#ifndef LANG_VIETNAMESE +#define LANG_VIETNAMESE (0) +#endif +#ifndef SUBLANG_ARABIC_ALGERIA +#define SUBLANG_ARABIC_ALGERIA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_BAHRAIN +#define SUBLANG_ARABIC_BAHRAIN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_EGYPT +#define SUBLANG_ARABIC_EGYPT SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_IRAQ +#define SUBLANG_ARABIC_IRAQ SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_JORDAN +#define SUBLANG_ARABIC_JORDAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_KUWAIT +#define SUBLANG_ARABIC_KUWAIT SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_LEBANON +#define SUBLANG_ARABIC_LEBANON SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_LIBYA +#define SUBLANG_ARABIC_LIBYA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_MOROCCO +#define SUBLANG_ARABIC_MOROCCO SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_OMAN +#define SUBLANG_ARABIC_OMAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_QATAR +#define SUBLANG_ARABIC_QATAR SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_SAUDI_ARABIA +#define SUBLANG_ARABIC_SAUDI_ARABIA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_SYRIA +#define SUBLANG_ARABIC_SYRIA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_TUNISIA +#define SUBLANG_ARABIC_TUNISIA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_UAE +#define SUBLANG_ARABIC_UAE SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ARABIC_YEMEN +#define SUBLANG_ARABIC_YEMEN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_AZERI_CYRILLIC +#define SUBLANG_AZERI_CYRILLIC SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_AZERI_LATIN +#define SUBLANG_AZERI_LATIN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN +#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_CHINESE_SIMPLIFIED +#define SUBLANG_CHINESE_SIMPLIFIED SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_CHINESE_TRADITIONAL +#define SUBLANG_CHINESE_TRADITIONAL SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_CHINESE_HONGKONG +#define SUBLANG_CHINESE_HONGKONG SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_CHINESE_MACAU +#define SUBLANG_CHINESE_MACAU SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_CHINESE_SINGAPORE +#define SUBLANG_CHINESE_SINGAPORE SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_DUTCH +#define SUBLANG_DUTCH SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_DUTCH_BELGIAN +#define SUBLANG_DUTCH_BELGIAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_UK +#define SUBLANG_ENGLISH_UK SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_US +#define SUBLANG_ENGLISH_US SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_AUS +#define SUBLANG_ENGLISH_AUS SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_BELIZE +#define SUBLANG_ENGLISH_BELIZE SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_CAN +#define SUBLANG_ENGLISH_CAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_CARIBBEAN +#define SUBLANG_ENGLISH_CARIBBEAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_EIRE +#define SUBLANG_ENGLISH_EIRE SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_JAMAICA +#define SUBLANG_ENGLISH_JAMAICA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_NZ +#define SUBLANG_ENGLISH_NZ SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_PHILIPPINES +#define SUBLANG_ENGLISH_PHILIPPINES SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_SOUTH_AFRICA +#define SUBLANG_ENGLISH_SOUTH_AFRICA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_TRINIDAD +#define SUBLANG_ENGLISH_TRINIDAD SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ENGLISH_ZIMBABWE +#define SUBLANG_ENGLISH_ZIMBABWE SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_FRENCH +#define SUBLANG_FRENCH SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_FRENCH_BELGIAN +#define SUBLANG_FRENCH_BELGIAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_FRENCH_CANADIAN +#define SUBLANG_FRENCH_CANADIAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_FRENCH_LUXEMBOURG +#define SUBLANG_FRENCH_LUXEMBOURG SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_FRENCH_MONACO +#define SUBLANG_FRENCH_MONACO SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_FRENCH_SWISS +#define SUBLANG_FRENCH_SWISS SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_GERMAN +#define SUBLANG_GERMAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_GERMAN_AUSTRIAN +#define SUBLANG_GERMAN_AUSTRIAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_GERMAN_LIECHTENSTEIN +#define SUBLANG_GERMAN_LIECHTENSTEIN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_GERMAN_LUXEMBOURG +#define SUBLANG_GERMAN_LUXEMBOURG SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_GERMAN_SWISS +#define SUBLANG_GERMAN_SWISS SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ITALIAN +#define SUBLANG_ITALIAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_ITALIAN_SWISS +#define SUBLANG_ITALIAN_SWISS SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_KASHMIRI_INDIA +#define SUBLANG_KASHMIRI_INDIA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_KOREAN +#define SUBLANG_KOREAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_LITHUANIAN +#define SUBLANG_LITHUANIAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM +#define SUBLANG_MALAY_BRUNEI_DARUSSALAM SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_MALAY_MALAYSIA +#define SUBLANG_MALAY_MALAYSIA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_NEPALI_INDIA +#define SUBLANG_NEPALI_INDIA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_NORWEGIAN_BOKMAL +#define SUBLANG_NORWEGIAN_BOKMAL SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_NORWEGIAN_NYNORSK +#define SUBLANG_NORWEGIAN_NYNORSK SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_PORTUGUESE +#define SUBLANG_PORTUGUESE SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_PORTUGUESE_BRAZILIAN +#define SUBLANG_PORTUGUESE_BRAZILIAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SERBIAN_CYRILLIC +#define SUBLANG_SERBIAN_CYRILLIC SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SERBIAN_LATIN +#define SUBLANG_SERBIAN_LATIN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH +#define SUBLANG_SPANISH SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_ARGENTINA +#define SUBLANG_SPANISH_ARGENTINA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_BOLIVIA +#define SUBLANG_SPANISH_BOLIVIA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_CHILE +#define SUBLANG_SPANISH_CHILE SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_COLOMBIA +#define SUBLANG_SPANISH_COLOMBIA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_COSTA_RICA +#define SUBLANG_SPANISH_COSTA_RICA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC +#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_ECUADOR +#define SUBLANG_SPANISH_ECUADOR SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_EL_SALVADOR +#define SUBLANG_SPANISH_EL_SALVADOR SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_GUATEMALA +#define SUBLANG_SPANISH_GUATEMALA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_HONDURAS +#define SUBLANG_SPANISH_HONDURAS SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_MEXICAN +#define SUBLANG_SPANISH_MEXICAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_MODERN +#define SUBLANG_SPANISH_MODERN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_NICARAGUA +#define SUBLANG_SPANISH_NICARAGUA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_PANAMA +#define SUBLANG_SPANISH_PANAMA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_PARAGUAY +#define SUBLANG_SPANISH_PARAGUAY SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_PERU +#define SUBLANG_SPANISH_PERU SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_PUERTO_RICO +#define SUBLANG_SPANISH_PUERTO_RICO SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_URUGUAY +#define SUBLANG_SPANISH_URUGUAY SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SPANISH_VENEZUELA +#define SUBLANG_SPANISH_VENEZUELA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SWEDISH +#define SUBLANG_SWEDISH SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_SWEDISH_FINLAND +#define SUBLANG_SWEDISH_FINLAND SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_URDU_INDIA +#define SUBLANG_URDU_INDIA SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_URDU_PAKISTAN +#define SUBLANG_URDU_PAKISTAN SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_UZBEK_CYRILLIC +#define SUBLANG_UZBEK_CYRILLIC SUBLANG_DEFAULT +#endif +#ifndef SUBLANG_UZBEK_LATIN +#define SUBLANG_UZBEK_LATIN SUBLANG_DEFAULT +#endif + + +#endif // __WIN32__ + +#define LNG(wxlang, canonical, winlang, winsublang, layout, desc) \ + info.Language = wxlang; \ + info.CanonicalName = wxT(canonical); \ + info.LayoutDirection = layout; \ + info.Description = wxT(desc); \ + SETWINLANG(info, winlang, winsublang) \ + AddLanguage(info); + +void wxLocale::InitLanguagesDB() +{ + wxLanguageInfo info; + + LNG(wxLANGUAGE_ABKHAZIAN, "ab" , 0 , 0 , wxLayout_LeftToRight, "Abkhazian") + LNG(wxLANGUAGE_AFAR, "aa" , 0 , 0 , wxLayout_LeftToRight, "Afar") + LNG(wxLANGUAGE_AFRIKAANS, "af_ZA", LANG_AFRIKAANS , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Afrikaans") + LNG(wxLANGUAGE_ALBANIAN, "sq_AL", LANG_ALBANIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Albanian") + LNG(wxLANGUAGE_AMHARIC, "am" , 0 , 0 , wxLayout_LeftToRight, "Amharic") + LNG(wxLANGUAGE_ARABIC, "ar" , LANG_ARABIC , SUBLANG_DEFAULT , wxLayout_RightToLeft, "Arabic") + LNG(wxLANGUAGE_ARABIC_ALGERIA, "ar_DZ", LANG_ARABIC , SUBLANG_ARABIC_ALGERIA , wxLayout_RightToLeft, "Arabic (Algeria)") + LNG(wxLANGUAGE_ARABIC_BAHRAIN, "ar_BH", LANG_ARABIC , SUBLANG_ARABIC_BAHRAIN , wxLayout_RightToLeft, "Arabic (Bahrain)") + LNG(wxLANGUAGE_ARABIC_EGYPT, "ar_EG", LANG_ARABIC , SUBLANG_ARABIC_EGYPT , wxLayout_RightToLeft, "Arabic (Egypt)") + LNG(wxLANGUAGE_ARABIC_IRAQ, "ar_IQ", LANG_ARABIC , SUBLANG_ARABIC_IRAQ , wxLayout_RightToLeft, "Arabic (Iraq)") + LNG(wxLANGUAGE_ARABIC_JORDAN, "ar_JO", LANG_ARABIC , SUBLANG_ARABIC_JORDAN , wxLayout_RightToLeft, "Arabic (Jordan)") + LNG(wxLANGUAGE_ARABIC_KUWAIT, "ar_KW", LANG_ARABIC , SUBLANG_ARABIC_KUWAIT , wxLayout_RightToLeft, "Arabic (Kuwait)") + LNG(wxLANGUAGE_ARABIC_LEBANON, "ar_LB", LANG_ARABIC , SUBLANG_ARABIC_LEBANON , wxLayout_RightToLeft, "Arabic (Lebanon)") + LNG(wxLANGUAGE_ARABIC_LIBYA, "ar_LY", LANG_ARABIC , SUBLANG_ARABIC_LIBYA , wxLayout_RightToLeft, "Arabic (Libya)") + LNG(wxLANGUAGE_ARABIC_MOROCCO, "ar_MA", LANG_ARABIC , SUBLANG_ARABIC_MOROCCO , wxLayout_RightToLeft, "Arabic (Morocco)") + LNG(wxLANGUAGE_ARABIC_OMAN, "ar_OM", LANG_ARABIC , SUBLANG_ARABIC_OMAN , wxLayout_RightToLeft, "Arabic (Oman)") + LNG(wxLANGUAGE_ARABIC_QATAR, "ar_QA", LANG_ARABIC , SUBLANG_ARABIC_QATAR , wxLayout_RightToLeft, "Arabic (Qatar)") + LNG(wxLANGUAGE_ARABIC_SAUDI_ARABIA, "ar_SA", LANG_ARABIC , SUBLANG_ARABIC_SAUDI_ARABIA , wxLayout_RightToLeft, "Arabic (Saudi Arabia)") + LNG(wxLANGUAGE_ARABIC_SUDAN, "ar_SD", 0 , 0 , wxLayout_RightToLeft, "Arabic (Sudan)") + LNG(wxLANGUAGE_ARABIC_SYRIA, "ar_SY", LANG_ARABIC , SUBLANG_ARABIC_SYRIA , wxLayout_RightToLeft, "Arabic (Syria)") + LNG(wxLANGUAGE_ARABIC_TUNISIA, "ar_TN", LANG_ARABIC , SUBLANG_ARABIC_TUNISIA , wxLayout_RightToLeft, "Arabic (Tunisia)") + LNG(wxLANGUAGE_ARABIC_UAE, "ar_AE", LANG_ARABIC , SUBLANG_ARABIC_UAE , wxLayout_RightToLeft, "Arabic (Uae)") + LNG(wxLANGUAGE_ARABIC_YEMEN, "ar_YE", LANG_ARABIC , SUBLANG_ARABIC_YEMEN , wxLayout_RightToLeft, "Arabic (Yemen)") + LNG(wxLANGUAGE_ARMENIAN, "hy" , LANG_ARMENIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Armenian") + LNG(wxLANGUAGE_ASSAMESE, "as" , LANG_ASSAMESE , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Assamese") + LNG(wxLANGUAGE_ASTURIAN, "ast" , 0 , 0 , wxLayout_LeftToRight, "Asturian") + LNG(wxLANGUAGE_AYMARA, "ay" , 0 , 0 , wxLayout_LeftToRight, "Aymara") + LNG(wxLANGUAGE_AZERI, "az" , LANG_AZERI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Azeri") + LNG(wxLANGUAGE_AZERI_CYRILLIC, "az" , LANG_AZERI , SUBLANG_AZERI_CYRILLIC , wxLayout_LeftToRight, "Azeri (Cyrillic)") + LNG(wxLANGUAGE_AZERI_LATIN, "az" , LANG_AZERI , SUBLANG_AZERI_LATIN , wxLayout_LeftToRight, "Azeri (Latin)") + LNG(wxLANGUAGE_BASHKIR, "ba" , 0 , 0 , wxLayout_LeftToRight, "Bashkir") + LNG(wxLANGUAGE_BASQUE, "eu_ES", LANG_BASQUE , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Basque") + LNG(wxLANGUAGE_BELARUSIAN, "be_BY", LANG_BELARUSIAN, SUBLANG_DEFAULT , wxLayout_LeftToRight, "Belarusian") + LNG(wxLANGUAGE_BENGALI, "bn" , LANG_BENGALI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Bengali") + LNG(wxLANGUAGE_BHUTANI, "dz" , 0 , 0 , wxLayout_LeftToRight, "Bhutani") + LNG(wxLANGUAGE_BIHARI, "bh" , 0 , 0 , wxLayout_LeftToRight, "Bihari") + LNG(wxLANGUAGE_BISLAMA, "bi" , 0 , 0 , wxLayout_LeftToRight, "Bislama") + LNG(wxLANGUAGE_BOSNIAN, "bs" , LANG_BOSNIAN , SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN, wxLayout_LeftToRight, "Bosnian") + LNG(wxLANGUAGE_BRETON, "br" , 0 , 0 , wxLayout_LeftToRight, "Breton") + LNG(wxLANGUAGE_BULGARIAN, "bg_BG", LANG_BULGARIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Bulgarian") + LNG(wxLANGUAGE_BURMESE, "my" , 0 , 0 , wxLayout_LeftToRight, "Burmese") + LNG(wxLANGUAGE_CAMBODIAN, "km" , 0 , 0 , wxLayout_LeftToRight, "Cambodian") + LNG(wxLANGUAGE_CATALAN, "ca_ES", LANG_CATALAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Catalan") + LNG(wxLANGUAGE_CHINESE, "zh_TW", LANG_CHINESE , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Chinese") + LNG(wxLANGUAGE_CHINESE_SIMPLIFIED, "zh_CN", LANG_CHINESE , SUBLANG_CHINESE_SIMPLIFIED , wxLayout_LeftToRight, "Chinese (Simplified)") + LNG(wxLANGUAGE_CHINESE_TRADITIONAL, "zh_TW", LANG_CHINESE , SUBLANG_CHINESE_TRADITIONAL , wxLayout_LeftToRight, "Chinese (Traditional)") + LNG(wxLANGUAGE_CHINESE_HONGKONG, "zh_HK", LANG_CHINESE , SUBLANG_CHINESE_HONGKONG , wxLayout_LeftToRight, "Chinese (Hongkong)") + LNG(wxLANGUAGE_CHINESE_MACAU, "zh_MO", LANG_CHINESE , SUBLANG_CHINESE_MACAU , wxLayout_LeftToRight, "Chinese (Macau)") + LNG(wxLANGUAGE_CHINESE_SINGAPORE, "zh_SG", LANG_CHINESE , SUBLANG_CHINESE_SINGAPORE , wxLayout_LeftToRight, "Chinese (Singapore)") + LNG(wxLANGUAGE_CHINESE_TAIWAN, "zh_TW", LANG_CHINESE , SUBLANG_CHINESE_TRADITIONAL , wxLayout_LeftToRight, "Chinese (Taiwan)") + LNG(wxLANGUAGE_CORSICAN, "co" , 0 , 0 , wxLayout_LeftToRight, "Corsican") + LNG(wxLANGUAGE_CROATIAN, "hr_HR", LANG_CROATIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Croatian") + LNG(wxLANGUAGE_CZECH, "cs_CZ", LANG_CZECH , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Czech") + LNG(wxLANGUAGE_DANISH, "da_DK", LANG_DANISH , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Danish") + LNG(wxLANGUAGE_DUTCH, "nl_NL", LANG_DUTCH , SUBLANG_DUTCH , wxLayout_LeftToRight, "Dutch") + LNG(wxLANGUAGE_DUTCH_BELGIAN, "nl_BE", LANG_DUTCH , SUBLANG_DUTCH_BELGIAN , wxLayout_LeftToRight, "Dutch (Belgian)") + LNG(wxLANGUAGE_ENGLISH, "en_GB", LANG_ENGLISH , SUBLANG_ENGLISH_UK , wxLayout_LeftToRight, "English") + LNG(wxLANGUAGE_ENGLISH_UK, "en_GB", LANG_ENGLISH , SUBLANG_ENGLISH_UK , wxLayout_LeftToRight, "English (U.K.)") + LNG(wxLANGUAGE_ENGLISH_US, "en_US", LANG_ENGLISH , SUBLANG_ENGLISH_US , wxLayout_LeftToRight, "English (U.S.)") + LNG(wxLANGUAGE_ENGLISH_AUSTRALIA, "en_AU", LANG_ENGLISH , SUBLANG_ENGLISH_AUS , wxLayout_LeftToRight, "English (Australia)") + LNG(wxLANGUAGE_ENGLISH_BELIZE, "en_BZ", LANG_ENGLISH , SUBLANG_ENGLISH_BELIZE , wxLayout_LeftToRight, "English (Belize)") + LNG(wxLANGUAGE_ENGLISH_BOTSWANA, "en_BW", 0 , 0 , wxLayout_LeftToRight, "English (Botswana)") + LNG(wxLANGUAGE_ENGLISH_CANADA, "en_CA", LANG_ENGLISH , SUBLANG_ENGLISH_CAN , wxLayout_LeftToRight, "English (Canada)") + LNG(wxLANGUAGE_ENGLISH_CARIBBEAN, "en_CB", LANG_ENGLISH , SUBLANG_ENGLISH_CARIBBEAN , wxLayout_LeftToRight, "English (Caribbean)") + LNG(wxLANGUAGE_ENGLISH_DENMARK, "en_DK", 0 , 0 , wxLayout_LeftToRight, "English (Denmark)") + LNG(wxLANGUAGE_ENGLISH_EIRE, "en_IE", LANG_ENGLISH , SUBLANG_ENGLISH_EIRE , wxLayout_LeftToRight, "English (Eire)") + LNG(wxLANGUAGE_ENGLISH_JAMAICA, "en_JM", LANG_ENGLISH , SUBLANG_ENGLISH_JAMAICA , wxLayout_LeftToRight, "English (Jamaica)") + LNG(wxLANGUAGE_ENGLISH_NEW_ZEALAND, "en_NZ", LANG_ENGLISH , SUBLANG_ENGLISH_NZ , wxLayout_LeftToRight, "English (New Zealand)") + LNG(wxLANGUAGE_ENGLISH_PHILIPPINES, "en_PH", LANG_ENGLISH , SUBLANG_ENGLISH_PHILIPPINES , wxLayout_LeftToRight, "English (Philippines)") + LNG(wxLANGUAGE_ENGLISH_SOUTH_AFRICA, "en_ZA", LANG_ENGLISH , SUBLANG_ENGLISH_SOUTH_AFRICA , wxLayout_LeftToRight, "English (South Africa)") + LNG(wxLANGUAGE_ENGLISH_TRINIDAD, "en_TT", LANG_ENGLISH , SUBLANG_ENGLISH_TRINIDAD , wxLayout_LeftToRight, "English (Trinidad)") + LNG(wxLANGUAGE_ENGLISH_ZIMBABWE, "en_ZW", LANG_ENGLISH , SUBLANG_ENGLISH_ZIMBABWE , wxLayout_LeftToRight, "English (Zimbabwe)") + LNG(wxLANGUAGE_ESPERANTO, "eo" , 0 , 0 , wxLayout_LeftToRight, "Esperanto") + LNG(wxLANGUAGE_ESTONIAN, "et_EE", LANG_ESTONIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Estonian") + LNG(wxLANGUAGE_FAEROESE, "fo_FO", LANG_FAEROESE , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Faeroese") + LNG(wxLANGUAGE_FARSI, "fa_IR", LANG_FARSI , SUBLANG_DEFAULT , wxLayout_RightToLeft, "Farsi") + LNG(wxLANGUAGE_FIJI, "fj" , 0 , 0 , wxLayout_LeftToRight, "Fiji") + LNG(wxLANGUAGE_FINNISH, "fi_FI", LANG_FINNISH , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Finnish") + LNG(wxLANGUAGE_FRENCH, "fr_FR", LANG_FRENCH , SUBLANG_FRENCH , wxLayout_LeftToRight, "French") + LNG(wxLANGUAGE_FRENCH_BELGIAN, "fr_BE", LANG_FRENCH , SUBLANG_FRENCH_BELGIAN , wxLayout_LeftToRight, "French (Belgian)") + LNG(wxLANGUAGE_FRENCH_CANADIAN, "fr_CA", LANG_FRENCH , SUBLANG_FRENCH_CANADIAN , wxLayout_LeftToRight, "French (Canadian)") + LNG(wxLANGUAGE_FRENCH_LUXEMBOURG, "fr_LU", LANG_FRENCH , SUBLANG_FRENCH_LUXEMBOURG , wxLayout_LeftToRight, "French (Luxembourg)") + LNG(wxLANGUAGE_FRENCH_MONACO, "fr_MC", LANG_FRENCH , SUBLANG_FRENCH_MONACO , wxLayout_LeftToRight, "French (Monaco)") + LNG(wxLANGUAGE_FRENCH_SWISS, "fr_CH", LANG_FRENCH , SUBLANG_FRENCH_SWISS , wxLayout_LeftToRight, "French (Swiss)") + LNG(wxLANGUAGE_FRISIAN, "fy" , 0 , 0 , wxLayout_LeftToRight, "Frisian") + LNG(wxLANGUAGE_GALICIAN, "gl_ES", 0 , 0 , wxLayout_LeftToRight, "Galician") + LNG(wxLANGUAGE_GEORGIAN, "ka_GE", LANG_GEORGIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Georgian") + LNG(wxLANGUAGE_GERMAN, "de_DE", LANG_GERMAN , SUBLANG_GERMAN , wxLayout_LeftToRight, "German") + LNG(wxLANGUAGE_GERMAN_AUSTRIAN, "de_AT", LANG_GERMAN , SUBLANG_GERMAN_AUSTRIAN , wxLayout_LeftToRight, "German (Austrian)") + LNG(wxLANGUAGE_GERMAN_BELGIUM, "de_BE", 0 , 0 , wxLayout_LeftToRight, "German (Belgium)") + LNG(wxLANGUAGE_GERMAN_LIECHTENSTEIN, "de_LI", LANG_GERMAN , SUBLANG_GERMAN_LIECHTENSTEIN , wxLayout_LeftToRight, "German (Liechtenstein)") + LNG(wxLANGUAGE_GERMAN_LUXEMBOURG, "de_LU", LANG_GERMAN , SUBLANG_GERMAN_LUXEMBOURG , wxLayout_LeftToRight, "German (Luxembourg)") + LNG(wxLANGUAGE_GERMAN_SWISS, "de_CH", LANG_GERMAN , SUBLANG_GERMAN_SWISS , wxLayout_LeftToRight, "German (Swiss)") + LNG(wxLANGUAGE_GREEK, "el_GR", LANG_GREEK , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Greek") + LNG(wxLANGUAGE_GREENLANDIC, "kl_GL", 0 , 0 , wxLayout_LeftToRight, "Greenlandic") + LNG(wxLANGUAGE_GUARANI, "gn" , 0 , 0 , wxLayout_LeftToRight, "Guarani") + LNG(wxLANGUAGE_GUJARATI, "gu" , LANG_GUJARATI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Gujarati") + LNG(wxLANGUAGE_HAUSA, "ha" , 0 , 0 , wxLayout_LeftToRight, "Hausa") + LNG(wxLANGUAGE_HEBREW, "he_IL", LANG_HEBREW , SUBLANG_DEFAULT , wxLayout_RightToLeft, "Hebrew") + LNG(wxLANGUAGE_HINDI, "hi_IN", LANG_HINDI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Hindi") + LNG(wxLANGUAGE_HUNGARIAN, "hu_HU", LANG_HUNGARIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Hungarian") + LNG(wxLANGUAGE_ICELANDIC, "is_IS", LANG_ICELANDIC , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Icelandic") + LNG(wxLANGUAGE_INDONESIAN, "id_ID", LANG_INDONESIAN, SUBLANG_DEFAULT , wxLayout_LeftToRight, "Indonesian") + LNG(wxLANGUAGE_INTERLINGUA, "ia" , 0 , 0 , wxLayout_LeftToRight, "Interlingua") + LNG(wxLANGUAGE_INTERLINGUE, "ie" , 0 , 0 , wxLayout_LeftToRight, "Interlingue") + LNG(wxLANGUAGE_INUKTITUT, "iu" , 0 , 0 , wxLayout_LeftToRight, "Inuktitut") + LNG(wxLANGUAGE_INUPIAK, "ik" , 0 , 0 , wxLayout_LeftToRight, "Inupiak") + LNG(wxLANGUAGE_IRISH, "ga_IE", 0 , 0 , wxLayout_LeftToRight, "Irish") + LNG(wxLANGUAGE_ITALIAN, "it_IT", LANG_ITALIAN , SUBLANG_ITALIAN , wxLayout_LeftToRight, "Italian") + LNG(wxLANGUAGE_ITALIAN_SWISS, "it_CH", LANG_ITALIAN , SUBLANG_ITALIAN_SWISS , wxLayout_LeftToRight, "Italian (Swiss)") + LNG(wxLANGUAGE_JAPANESE, "ja_JP", LANG_JAPANESE , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Japanese") + LNG(wxLANGUAGE_JAVANESE, "jv" , 0 , 0 , wxLayout_LeftToRight, "Javanese") + LNG(wxLANGUAGE_KABYLE, "kab" , LANG_KABYLE , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Kabyle") + LNG(wxLANGUAGE_KANNADA, "kn" , LANG_KANNADA , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Kannada") + LNG(wxLANGUAGE_KASHMIRI, "ks" , LANG_KASHMIRI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Kashmiri") + LNG(wxLANGUAGE_KASHMIRI_INDIA, "ks_IN", LANG_KASHMIRI , SUBLANG_KASHMIRI_INDIA , wxLayout_LeftToRight, "Kashmiri (India)") + LNG(wxLANGUAGE_KAZAKH, "kk" , LANG_KAZAK , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Kazakh") + LNG(wxLANGUAGE_KERNEWEK, "kw_GB", 0 , 0 , wxLayout_LeftToRight, "Kernewek") + LNG(wxLANGUAGE_KINYARWANDA, "rw" , 0 , 0 , wxLayout_LeftToRight, "Kinyarwanda") + LNG(wxLANGUAGE_KIRGHIZ, "ky" , 0 , 0 , wxLayout_LeftToRight, "Kirghiz") + LNG(wxLANGUAGE_KIRUNDI, "rn" , 0 , 0 , wxLayout_LeftToRight, "Kirundi") + LNG(wxLANGUAGE_KONKANI, "" , LANG_KONKANI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Konkani") + LNG(wxLANGUAGE_KOREAN, "ko_KR", LANG_KOREAN , SUBLANG_KOREAN , wxLayout_LeftToRight, "Korean") + LNG(wxLANGUAGE_KURDISH, "ku_TR", 0 , 0 , wxLayout_LeftToRight, "Kurdish") + LNG(wxLANGUAGE_LAOTHIAN, "lo" , 0 , 0 , wxLayout_LeftToRight, "Laothian") + LNG(wxLANGUAGE_LATIN, "la" , 0 , 0 , wxLayout_LeftToRight, "Latin") + LNG(wxLANGUAGE_LATVIAN, "lv_LV", LANG_LATVIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Latvian") + LNG(wxLANGUAGE_LINGALA, "ln" , 0 , 0 , wxLayout_LeftToRight, "Lingala") + LNG(wxLANGUAGE_LITHUANIAN, "lt_LT", LANG_LITHUANIAN, SUBLANG_LITHUANIAN , wxLayout_LeftToRight, "Lithuanian") + LNG(wxLANGUAGE_MACEDONIAN, "mk_MK", LANG_MACEDONIAN, SUBLANG_DEFAULT , wxLayout_LeftToRight, "Macedonian") + LNG(wxLANGUAGE_MALAGASY, "mg" , 0 , 0 , wxLayout_LeftToRight, "Malagasy") + LNG(wxLANGUAGE_MALAY, "ms_MY", LANG_MALAY , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Malay") + LNG(wxLANGUAGE_MALAYALAM, "ml" , LANG_MALAYALAM , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Malayalam") + LNG(wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM, "ms_BN", LANG_MALAY , SUBLANG_MALAY_BRUNEI_DARUSSALAM , wxLayout_LeftToRight, "Malay (Brunei Darussalam)") + LNG(wxLANGUAGE_MALAY_MALAYSIA, "ms_MY", LANG_MALAY , SUBLANG_MALAY_MALAYSIA , wxLayout_LeftToRight, "Malay (Malaysia)") + LNG(wxLANGUAGE_MALTESE, "mt_MT", 0 , 0 , wxLayout_LeftToRight, "Maltese") + LNG(wxLANGUAGE_MANIPURI, "" , LANG_MANIPURI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Manipuri") + LNG(wxLANGUAGE_MAORI, "mi" , 0 , 0 , wxLayout_LeftToRight, "Maori") + LNG(wxLANGUAGE_MARATHI, "mr_IN", LANG_MARATHI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Marathi") + LNG(wxLANGUAGE_MOLDAVIAN, "mo" , 0 , 0 , wxLayout_LeftToRight, "Moldavian") + LNG(wxLANGUAGE_MONGOLIAN, "mn" , 0 , 0 , wxLayout_LeftToRight, "Mongolian") + LNG(wxLANGUAGE_NAURU, "na" , 0 , 0 , wxLayout_LeftToRight, "Nauru") + LNG(wxLANGUAGE_NEPALI, "ne_NP", LANG_NEPALI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Nepali") + LNG(wxLANGUAGE_NEPALI_INDIA, "ne_IN", LANG_NEPALI , SUBLANG_NEPALI_INDIA , wxLayout_LeftToRight, "Nepali (India)") + LNG(wxLANGUAGE_NORWEGIAN_BOKMAL, "nb_NO", LANG_NORWEGIAN , SUBLANG_NORWEGIAN_BOKMAL , wxLayout_LeftToRight, "Norwegian (Bokmal)") + LNG(wxLANGUAGE_NORWEGIAN_NYNORSK, "nn_NO", LANG_NORWEGIAN , SUBLANG_NORWEGIAN_NYNORSK , wxLayout_LeftToRight, "Norwegian (Nynorsk)") + LNG(wxLANGUAGE_OCCITAN, "oc" , 0 , 0 , wxLayout_LeftToRight, "Occitan") + LNG(wxLANGUAGE_ORIYA, "or" , LANG_ORIYA , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Oriya") + LNG(wxLANGUAGE_OROMO, "om" , 0 , 0 , wxLayout_LeftToRight, "(Afan) Oromo") + LNG(wxLANGUAGE_PASHTO, "ps" , 0 , 0 , wxLayout_LeftToRight, "Pashto, Pushto") + LNG(wxLANGUAGE_POLISH, "pl_PL", LANG_POLISH , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Polish") + LNG(wxLANGUAGE_PORTUGUESE, "pt_PT", LANG_PORTUGUESE, SUBLANG_PORTUGUESE , wxLayout_LeftToRight, "Portuguese") + LNG(wxLANGUAGE_PORTUGUESE_BRAZILIAN, "pt_BR", LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN , wxLayout_LeftToRight, "Portuguese (Brazilian)") + LNG(wxLANGUAGE_PUNJABI, "pa" , LANG_PUNJABI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Punjabi") + LNG(wxLANGUAGE_QUECHUA, "qu" , 0 , 0 , wxLayout_LeftToRight, "Quechua") + LNG(wxLANGUAGE_RHAETO_ROMANCE, "rm" , 0 , 0 , wxLayout_LeftToRight, "Rhaeto-Romance") + LNG(wxLANGUAGE_ROMANIAN, "ro_RO", LANG_ROMANIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Romanian") + LNG(wxLANGUAGE_RUSSIAN, "ru_RU", LANG_RUSSIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Russian") + LNG(wxLANGUAGE_RUSSIAN_UKRAINE, "ru_UA", 0 , 0 , wxLayout_LeftToRight, "Russian (Ukraine)") + LNG(wxLANGUAGE_SAMI, "se_NO", LANG_SAMI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Northern Sami") + LNG(wxLANGUAGE_SAMOAN, "sm" , 0 , 0 , wxLayout_LeftToRight, "Samoan") + LNG(wxLANGUAGE_SANGHO, "sg" , 0 , 0 , wxLayout_LeftToRight, "Sangho") + LNG(wxLANGUAGE_SANSKRIT, "sa" , LANG_SANSKRIT , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Sanskrit") + LNG(wxLANGUAGE_SCOTS_GAELIC, "gd" , 0 , 0 , wxLayout_LeftToRight, "Scots Gaelic") + LNG(wxLANGUAGE_SERBIAN, "sr_RS", LANG_SERBIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Serbian") + LNG(wxLANGUAGE_SERBIAN_CYRILLIC, "sr_RS", LANG_SERBIAN , SUBLANG_SERBIAN_CYRILLIC , wxLayout_LeftToRight, "Serbian (Cyrillic)") + LNG(wxLANGUAGE_SERBIAN_LATIN, "sr_RS@latin", LANG_SERBIAN , SUBLANG_SERBIAN_LATIN , wxLayout_LeftToRight, "Serbian (Latin)") + LNG(wxLANGUAGE_SERBIAN_CYRILLIC, "sr_YU", LANG_SERBIAN , SUBLANG_SERBIAN_CYRILLIC , wxLayout_LeftToRight, "Serbian (Cyrillic)") + LNG(wxLANGUAGE_SERBIAN_LATIN, "sr_YU@latin", LANG_SERBIAN , SUBLANG_SERBIAN_LATIN , wxLayout_LeftToRight, "Serbian (Latin)") + LNG(wxLANGUAGE_SERBO_CROATIAN, "sh" , 0 , 0 , wxLayout_LeftToRight, "Serbo-Croatian") + LNG(wxLANGUAGE_SESOTHO, "st" , 0 , 0 , wxLayout_LeftToRight, "Sesotho") + LNG(wxLANGUAGE_SETSWANA, "tn" , 0 , 0 , wxLayout_LeftToRight, "Setswana") + LNG(wxLANGUAGE_SHONA, "sn" , 0 , 0 , wxLayout_LeftToRight, "Shona") + LNG(wxLANGUAGE_SINDHI, "sd" , LANG_SINDHI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Sindhi") + LNG(wxLANGUAGE_SINHALESE, "si" , 0 , 0 , wxLayout_LeftToRight, "Sinhalese") + LNG(wxLANGUAGE_SISWATI, "ss" , 0 , 0 , wxLayout_LeftToRight, "Siswati") + LNG(wxLANGUAGE_SLOVAK, "sk_SK", LANG_SLOVAK , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Slovak") + LNG(wxLANGUAGE_SLOVENIAN, "sl_SI", LANG_SLOVENIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Slovenian") + LNG(wxLANGUAGE_SOMALI, "so" , 0 , 0 , wxLayout_LeftToRight, "Somali") + LNG(wxLANGUAGE_SPANISH, "es_ES", LANG_SPANISH , SUBLANG_SPANISH , wxLayout_LeftToRight, "Spanish") + LNG(wxLANGUAGE_SPANISH_ARGENTINA, "es_AR", LANG_SPANISH , SUBLANG_SPANISH_ARGENTINA , wxLayout_LeftToRight, "Spanish (Argentina)") + LNG(wxLANGUAGE_SPANISH_BOLIVIA, "es_BO", LANG_SPANISH , SUBLANG_SPANISH_BOLIVIA , wxLayout_LeftToRight, "Spanish (Bolivia)") + LNG(wxLANGUAGE_SPANISH_CHILE, "es_CL", LANG_SPANISH , SUBLANG_SPANISH_CHILE , wxLayout_LeftToRight, "Spanish (Chile)") + LNG(wxLANGUAGE_SPANISH_COLOMBIA, "es_CO", LANG_SPANISH , SUBLANG_SPANISH_COLOMBIA , wxLayout_LeftToRight, "Spanish (Colombia)") + LNG(wxLANGUAGE_SPANISH_COSTA_RICA, "es_CR", LANG_SPANISH , SUBLANG_SPANISH_COSTA_RICA , wxLayout_LeftToRight, "Spanish (Costa Rica)") + LNG(wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC, "es_DO", LANG_SPANISH , SUBLANG_SPANISH_DOMINICAN_REPUBLIC, wxLayout_LeftToRight, "Spanish (Dominican republic)") + LNG(wxLANGUAGE_SPANISH_ECUADOR, "es_EC", LANG_SPANISH , SUBLANG_SPANISH_ECUADOR , wxLayout_LeftToRight, "Spanish (Ecuador)") + LNG(wxLANGUAGE_SPANISH_EL_SALVADOR, "es_SV", LANG_SPANISH , SUBLANG_SPANISH_EL_SALVADOR , wxLayout_LeftToRight, "Spanish (El Salvador)") + LNG(wxLANGUAGE_SPANISH_GUATEMALA, "es_GT", LANG_SPANISH , SUBLANG_SPANISH_GUATEMALA , wxLayout_LeftToRight, "Spanish (Guatemala)") + LNG(wxLANGUAGE_SPANISH_HONDURAS, "es_HN", LANG_SPANISH , SUBLANG_SPANISH_HONDURAS , wxLayout_LeftToRight, "Spanish (Honduras)") + LNG(wxLANGUAGE_SPANISH_MEXICAN, "es_MX", LANG_SPANISH , SUBLANG_SPANISH_MEXICAN , wxLayout_LeftToRight, "Spanish (Mexican)") + LNG(wxLANGUAGE_SPANISH_MODERN, "es_ES", LANG_SPANISH , SUBLANG_SPANISH_MODERN , wxLayout_LeftToRight, "Spanish (Modern)") + LNG(wxLANGUAGE_SPANISH_NICARAGUA, "es_NI", LANG_SPANISH , SUBLANG_SPANISH_NICARAGUA , wxLayout_LeftToRight, "Spanish (Nicaragua)") + LNG(wxLANGUAGE_SPANISH_PANAMA, "es_PA", LANG_SPANISH , SUBLANG_SPANISH_PANAMA , wxLayout_LeftToRight, "Spanish (Panama)") + LNG(wxLANGUAGE_SPANISH_PARAGUAY, "es_PY", LANG_SPANISH , SUBLANG_SPANISH_PARAGUAY , wxLayout_LeftToRight, "Spanish (Paraguay)") + LNG(wxLANGUAGE_SPANISH_PERU, "es_PE", LANG_SPANISH , SUBLANG_SPANISH_PERU , wxLayout_LeftToRight, "Spanish (Peru)") + LNG(wxLANGUAGE_SPANISH_PUERTO_RICO, "es_PR", LANG_SPANISH , SUBLANG_SPANISH_PUERTO_RICO , wxLayout_LeftToRight, "Spanish (Puerto Rico)") + LNG(wxLANGUAGE_SPANISH_URUGUAY, "es_UY", LANG_SPANISH , SUBLANG_SPANISH_URUGUAY , wxLayout_LeftToRight, "Spanish (Uruguay)") + LNG(wxLANGUAGE_SPANISH_US, "es_US", 0 , 0 , wxLayout_LeftToRight, "Spanish (U.S.)") + LNG(wxLANGUAGE_SPANISH_VENEZUELA, "es_VE", LANG_SPANISH , SUBLANG_SPANISH_VENEZUELA , wxLayout_LeftToRight, "Spanish (Venezuela)") + LNG(wxLANGUAGE_SUNDANESE, "su" , 0 , 0 , wxLayout_LeftToRight, "Sundanese") + LNG(wxLANGUAGE_SWAHILI, "sw_KE", LANG_SWAHILI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Swahili") + LNG(wxLANGUAGE_SWEDISH, "sv_SE", LANG_SWEDISH , SUBLANG_SWEDISH , wxLayout_LeftToRight, "Swedish") + LNG(wxLANGUAGE_SWEDISH_FINLAND, "sv_FI", LANG_SWEDISH , SUBLANG_SWEDISH_FINLAND , wxLayout_LeftToRight, "Swedish (Finland)") + LNG(wxLANGUAGE_TAGALOG, "tl_PH", 0 , 0 , wxLayout_LeftToRight, "Tagalog") + LNG(wxLANGUAGE_TAJIK, "tg" , 0 , 0 , wxLayout_LeftToRight, "Tajik") + LNG(wxLANGUAGE_TAMIL, "ta" , LANG_TAMIL , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Tamil") + LNG(wxLANGUAGE_TATAR, "tt" , LANG_TATAR , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Tatar") + LNG(wxLANGUAGE_TELUGU, "te" , LANG_TELUGU , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Telugu") + LNG(wxLANGUAGE_THAI, "th_TH", LANG_THAI , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Thai") + LNG(wxLANGUAGE_TIBETAN, "bo" , 0 , 0 , wxLayout_LeftToRight, "Tibetan") + LNG(wxLANGUAGE_TIGRINYA, "ti" , 0 , 0 , wxLayout_LeftToRight, "Tigrinya") + LNG(wxLANGUAGE_TONGA, "to" , 0 , 0 , wxLayout_LeftToRight, "Tonga") + LNG(wxLANGUAGE_TSONGA, "ts" , 0 , 0 , wxLayout_LeftToRight, "Tsonga") + LNG(wxLANGUAGE_TURKISH, "tr_TR", LANG_TURKISH , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Turkish") + LNG(wxLANGUAGE_TURKMEN, "tk" , 0 , 0 , wxLayout_LeftToRight, "Turkmen") + LNG(wxLANGUAGE_TWI, "tw" , 0 , 0 , wxLayout_LeftToRight, "Twi") + LNG(wxLANGUAGE_UIGHUR, "ug" , 0 , 0 , wxLayout_LeftToRight, "Uighur") + LNG(wxLANGUAGE_UKRAINIAN, "uk_UA", LANG_UKRAINIAN , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Ukrainian") + LNG(wxLANGUAGE_URDU, "ur" , LANG_URDU , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Urdu") + LNG(wxLANGUAGE_URDU_INDIA, "ur_IN", LANG_URDU , SUBLANG_URDU_INDIA , wxLayout_LeftToRight, "Urdu (India)") + LNG(wxLANGUAGE_URDU_PAKISTAN, "ur_PK", LANG_URDU , SUBLANG_URDU_PAKISTAN , wxLayout_LeftToRight, "Urdu (Pakistan)") + LNG(wxLANGUAGE_UZBEK, "uz" , LANG_UZBEK , SUBLANG_DEFAULT , wxLayout_LeftToRight, "Uzbek") + LNG(wxLANGUAGE_UZBEK_CYRILLIC, "uz" , LANG_UZBEK , SUBLANG_UZBEK_CYRILLIC , wxLayout_LeftToRight, "Uzbek (Cyrillic)") + LNG(wxLANGUAGE_UZBEK_LATIN, "uz" , LANG_UZBEK , SUBLANG_UZBEK_LATIN , wxLayout_LeftToRight, "Uzbek (Latin)") + LNG(wxLANGUAGE_VALENCIAN, "ca_ES@valencia", 0 , 0 , wxLayout_LeftToRight, "Valencian (Southern Catalan)") + LNG(wxLANGUAGE_VIETNAMESE, "vi_VN", LANG_VIETNAMESE, SUBLANG_DEFAULT , wxLayout_LeftToRight, "Vietnamese") + LNG(wxLANGUAGE_VOLAPUK, "vo" , 0 , 0 , wxLayout_LeftToRight, "Volapuk") + LNG(wxLANGUAGE_WELSH, "cy" , 0 , 0 , wxLayout_LeftToRight, "Welsh") + LNG(wxLANGUAGE_WOLOF, "wo" , 0 , 0 , wxLayout_LeftToRight, "Wolof") + LNG(wxLANGUAGE_XHOSA, "xh" , 0 , 0 , wxLayout_LeftToRight, "Xhosa") + LNG(wxLANGUAGE_YIDDISH, "yi" , 0 , 0 , wxLayout_LeftToRight, "Yiddish") + LNG(wxLANGUAGE_YORUBA, "yo" , 0 , 0 , wxLayout_LeftToRight, "Yoruba") + LNG(wxLANGUAGE_ZHUANG, "za" , 0 , 0 , wxLayout_LeftToRight, "Zhuang") + LNG(wxLANGUAGE_ZULU, "zu" , 0 , 0 , wxLayout_LeftToRight, "Zulu") + +} +#undef LNG + +// --- --- --- generated code ends here --- --- --- + +#endif // wxUSE_INTL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/layout.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/layout.cpp new file mode 100644 index 0000000000..9d23b46116 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/layout.cpp @@ -0,0 +1,1025 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/layout.cpp +// Purpose: Constraint layout system classes +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================= +// declarations +// ============================================================================= + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CONSTRAINTS + +#include "wx/layout.h" + +#ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/utils.h" + #include "wx/dialog.h" + #include "wx/msgdlg.h" + #include "wx/intl.h" +#endif + + +IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint, wxObject) +IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints, wxObject) + + +inline void wxGetAsIs(wxWindowBase* win, int* w, int* h) +{ +#if 1 + // The old way. Works for me. + win->GetSize(w, h); +#endif + +#if 0 + // Vadim's change. Breaks wxPython's LayoutAnchors + win->GetBestSize(w, h); +#endif + +#if 0 + // Proposed compromise. Doesn't work. + int sw, sh, bw, bh; + win->GetSize(&sw, &sh); + win->GetBestSize(&bw, &bh); + if (w) + *w = wxMax(sw, bw); + if (h) + *h = wxMax(sh, bh); +#endif +} + + +wxIndividualLayoutConstraint::wxIndividualLayoutConstraint() +{ + myEdge = wxTop; + relationship = wxUnconstrained; + margin = 0; + value = 0; + percent = 0; + otherEdge = wxTop; + done = false; + otherWin = NULL; +} + +void wxIndividualLayoutConstraint::Set(wxRelationship rel, wxWindowBase *otherW, wxEdge otherE, int val, int marg) +{ + if (rel == wxSameAs) + { + // If Set is called by the user with wxSameAs then call SameAs to do + // it since it will actually use wxPercent instead. + SameAs(otherW, otherE, marg); + return; + } + + relationship = rel; + otherWin = otherW; + otherEdge = otherE; + + if ( rel == wxPercentOf ) + { + percent = val; + } + else + { + value = val; + } + + margin = marg; +} + +void wxIndividualLayoutConstraint::LeftOf(wxWindowBase *sibling, int marg) +{ + Set(wxLeftOf, sibling, wxLeft, 0, marg); +} + +void wxIndividualLayoutConstraint::RightOf(wxWindowBase *sibling, int marg) +{ + Set(wxRightOf, sibling, wxRight, 0, marg); +} + +void wxIndividualLayoutConstraint::Above(wxWindowBase *sibling, int marg) +{ + Set(wxAbove, sibling, wxTop, 0, marg); +} + +void wxIndividualLayoutConstraint::Below(wxWindowBase *sibling, int marg) +{ + Set(wxBelow, sibling, wxBottom, 0, marg); +} + +// +// 'Same edge' alignment +// +void wxIndividualLayoutConstraint::SameAs(wxWindowBase *otherW, wxEdge edge, int marg) +{ + Set(wxPercentOf, otherW, edge, 100, marg); +} + +// The edge is a percentage of the other window's edge +void wxIndividualLayoutConstraint::PercentOf(wxWindowBase *otherW, wxEdge wh, int per) +{ + Set(wxPercentOf, otherW, wh, per); +} + +// +// Edge has absolute value +// +void wxIndividualLayoutConstraint::Absolute(int val) +{ + value = val; + relationship = wxAbsolute; +} + +// Reset constraint if it mentions otherWin +bool wxIndividualLayoutConstraint::ResetIfWin(wxWindowBase *otherW) +{ + if (otherW == otherWin) + { + myEdge = wxTop; + relationship = wxAsIs; + margin = 0; + value = 0; + percent = 0; + otherEdge = wxTop; + otherWin = NULL; + return true; + } + + return false; +} + +// Try to satisfy constraint +bool wxIndividualLayoutConstraint::SatisfyConstraint(wxLayoutConstraints *constraints, wxWindowBase *win) +{ + if (relationship == wxAbsolute) + { + done = true; + return true; + } + + switch (myEdge) + { + case wxLeft: + { + switch (relationship) + { + case wxLeftOf: + { + // We can know this edge if: otherWin is win's + // parent, or otherWin has a satisfied constraint, + // or otherWin has no constraint. + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos - margin; + done = true; + return true; + } + else + return false; + } + case wxRightOf: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos + margin; + done = true; + return true; + } + else + return false; + } + case wxPercentOf: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = (int)(edgePos*(((float)percent)*0.01) + margin); + done = true; + return true; + } + else + return false; + } + case wxUnconstrained: + { + // We know the left-hand edge position if we know + // the right-hand edge and we know the width; OR if + // we know the centre and the width. + if (constraints->right.GetDone() && constraints->width.GetDone()) + { + value = (constraints->right.GetValue() - constraints->width.GetValue() + margin); + done = true; + return true; + } + else if (constraints->centreX.GetDone() && constraints->width.GetDone()) + { + value = (int)(constraints->centreX.GetValue() - (constraints->width.GetValue()/2) + margin); + done = true; + return true; + } + else + return false; + } + case wxAsIs: + { + int y; + win->GetPosition(&value, &y); + done = true; + return true; + } + default: + break; + } + break; + } + case wxRight: + { + switch (relationship) + { + case wxLeftOf: + { + // We can know this edge if: otherWin is win's + // parent, or otherWin has a satisfied constraint, + // or otherWin has no constraint. + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos - margin; + done = true; + return true; + } + else + return false; + } + case wxRightOf: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos + margin; + done = true; + return true; + } + else + return false; + } + case wxPercentOf: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = (int)(edgePos*(((float)percent)*0.01) - margin); + done = true; + return true; + } + else + return false; + } + case wxUnconstrained: + { + // We know the right-hand edge position if we know the + // left-hand edge and we know the width, OR if we know the + // centre edge and the width. + if (constraints->left.GetDone() && constraints->width.GetDone()) + { + value = (constraints->left.GetValue() + constraints->width.GetValue() - margin); + done = true; + return true; + } + else if (constraints->centreX.GetDone() && constraints->width.GetDone()) + { + value = (int)(constraints->centreX.GetValue() + (constraints->width.GetValue()/2) - margin); + done = true; + return true; + } + else + return false; + } + case wxAsIs: + { + int x, y; + int w, h; + wxGetAsIs(win, &w, &h); + win->GetPosition(&x, &y); + value = x + w; + done = true; + return true; + } + default: + break; + } + break; + } + case wxTop: + { + switch (relationship) + { + case wxAbove: + { + // We can know this edge if: otherWin is win's + // parent, or otherWin has a satisfied constraint, + // or otherWin has no constraint. + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos - margin; + done = true; + return true; + } + else + return false; + } + case wxBelow: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos + margin; + done = true; + return true; + } + else + return false; + } + case wxPercentOf: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = (int)(edgePos*(((float)percent)*0.01) + margin); + done = true; + return true; + } + else + return false; + } + case wxUnconstrained: + { + // We know the top edge position if we know the bottom edge + // and we know the height; OR if we know the centre edge and + // the height. + if (constraints->bottom.GetDone() && constraints->height.GetDone()) + { + value = (constraints->bottom.GetValue() - constraints->height.GetValue() + margin); + done = true; + return true; + } + else if (constraints->centreY.GetDone() && constraints->height.GetDone()) + { + value = (constraints->centreY.GetValue() - (constraints->height.GetValue()/2) + margin); + done = true; + return true; + } + else + return false; + } + case wxAsIs: + { + int x; + win->GetPosition(&x, &value); + done = true; + return true; + } + default: + break; + } + break; + } + case wxBottom: + { + switch (relationship) + { + case wxAbove: + { + // We can know this edge if: otherWin is win's parent, + // or otherWin has a satisfied constraint, or + // otherWin has no constraint. + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos + margin; + done = true; + return true; + } + else + return false; + } + case wxBelow: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos - margin; + done = true; + return true; + } + else + return false; + } + case wxPercentOf: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = (int)(edgePos*(((float)percent)*0.01) - margin); + done = true; + return true; + } + else + return false; + } + case wxUnconstrained: + { + // We know the bottom edge position if we know the top edge + // and we know the height; OR if we know the centre edge and + // the height. + if (constraints->top.GetDone() && constraints->height.GetDone()) + { + value = (constraints->top.GetValue() + constraints->height.GetValue() - margin); + done = true; + return true; + } + else if (constraints->centreY.GetDone() && constraints->height.GetDone()) + { + value = (constraints->centreY.GetValue() + (constraints->height.GetValue()/2) - margin); + done = true; + return true; + } + else + return false; + } + case wxAsIs: + { + int x, y; + int w, h; + wxGetAsIs(win, &w, &h); + win->GetPosition(&x, &y); + value = h + y; + done = true; + return true; + } + default: + break; + } + break; + } + case wxCentreX: + { + switch (relationship) + { + case wxLeftOf: + { + // We can know this edge if: otherWin is win's parent, or + // otherWin has a satisfied constraint, or otherWin has no + // constraint. + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos - margin; + done = true; + return true; + } + else + return false; + } + case wxRightOf: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos + margin; + done = true; + return true; + } + else + return false; + } + case wxPercentOf: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = (int)(edgePos*(((float)percent)*0.01) + margin); + done = true; + return true; + } + else + return false; + } + case wxUnconstrained: + { + // We know the centre position if we know + // the left-hand edge and we know the width, OR + // the right-hand edge and the width + if (constraints->left.GetDone() && constraints->width.GetDone()) + { + value = (int)(constraints->left.GetValue() + (constraints->width.GetValue()/2) + margin); + done = true; + return true; + } + else if (constraints->right.GetDone() && constraints->width.GetDone()) + { + value = (int)(constraints->left.GetValue() - (constraints->width.GetValue()/2) + margin); + done = true; + return true; + } + else + return false; + } + default: + break; + } + break; + } + case wxCentreY: + { + switch (relationship) + { + case wxAbove: + { + // We can know this edge if: otherWin is win's parent, + // or otherWin has a satisfied constraint, or otherWin + // has no constraint. + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos - margin; + done = true; + return true; + } + else + return false; + } + case wxBelow: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = edgePos + margin; + done = true; + return true; + } + else + return false; + } + case wxPercentOf: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = (int)(edgePos*(((float)percent)*0.01) + margin); + done = true; + return true; + } + else + return false; + } + case wxUnconstrained: + { + // We know the centre position if we know + // the top edge and we know the height, OR + // the bottom edge and the height. + if (constraints->bottom.GetDone() && constraints->height.GetDone()) + { + value = (int)(constraints->bottom.GetValue() - (constraints->height.GetValue()/2) + margin); + done = true; + return true; + } + else if (constraints->top.GetDone() && constraints->height.GetDone()) + { + value = (int)(constraints->top.GetValue() + (constraints->height.GetValue()/2) + margin); + done = true; + return true; + } + else + return false; + } + default: + break; + } + break; + } + case wxWidth: + { + switch (relationship) + { + case wxPercentOf: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = (int)(edgePos*(((float)percent)*0.01)); + done = true; + return true; + } + else + return false; + } + case wxAsIs: + { + if (win) + { + int h; + wxGetAsIs(win, &value, &h); + done = true; + return true; + } + else return false; + } + case wxUnconstrained: + { + // We know the width if we know the left edge and the right edge, OR + // if we know the left edge and the centre, OR + // if we know the right edge and the centre + if (constraints->left.GetDone() && constraints->right.GetDone()) + { + value = constraints->right.GetValue() - constraints->left.GetValue(); + done = true; + return true; + } + else if (constraints->centreX.GetDone() && constraints->left.GetDone()) + { + value = (int)(2*(constraints->centreX.GetValue() - constraints->left.GetValue())); + done = true; + return true; + } + else if (constraints->centreX.GetDone() && constraints->right.GetDone()) + { + value = (int)(2*(constraints->right.GetValue() - constraints->centreX.GetValue())); + done = true; + return true; + } + else + return false; + } + default: + break; + } + break; + } + case wxHeight: + { + switch (relationship) + { + case wxPercentOf: + { + int edgePos = GetEdge(otherEdge, win, otherWin); + if (edgePos != -1) + { + value = (int)(edgePos*(((float)percent)*0.01)); + done = true; + return true; + } + else + return false; + } + case wxAsIs: + { + if (win) + { + int w; + wxGetAsIs(win, &w, &value); + done = true; + return true; + } + else return false; + } + case wxUnconstrained: + { + // We know the height if we know the top edge and the bottom edge, OR + // if we know the top edge and the centre, OR + // if we know the bottom edge and the centre + if (constraints->top.GetDone() && constraints->bottom.GetDone()) + { + value = constraints->bottom.GetValue() - constraints->top.GetValue(); + done = true; + return true; + } + else if (constraints->top.GetDone() && constraints->centreY.GetDone()) + { + value = (int)(2*(constraints->centreY.GetValue() - constraints->top.GetValue())); + done = true; + return true; + } + else if (constraints->bottom.GetDone() && constraints->centreY.GetDone()) + { + value = (int)(2*(constraints->bottom.GetValue() - constraints->centreY.GetValue())); + done = true; + return true; + } + else + return false; + } + default: + break; + } + break; + } + default: + break; + } + return false; +} + +// Get the value of this edge or dimension, or if this is not determinable, -1. +int wxIndividualLayoutConstraint::GetEdge(wxEdge which, + wxWindowBase *thisWin, + wxWindowBase *other) const +{ + // If the edge or dimension belongs to the parent, then we know the + // dimension is obtainable immediately. E.g. a wxExpandSizer may contain a + // button (but the button's true parent is a panel, not the sizer) + if (other->GetChildren().Find((wxWindow*)thisWin)) + { + switch (which) + { + case wxLeft: + { + return 0; + } + case wxTop: + { + return 0; + } + case wxRight: + { + int w, h; + other->GetClientSizeConstraint(&w, &h); + return w; + } + case wxBottom: + { + int w, h; + other->GetClientSizeConstraint(&w, &h); + return h; + } + case wxWidth: + { + int w, h; + other->GetClientSizeConstraint(&w, &h); + return w; + } + case wxHeight: + { + int w, h; + other->GetClientSizeConstraint(&w, &h); + return h; + } + case wxCentreX: + case wxCentreY: + { + int w, h; + other->GetClientSizeConstraint(&w, &h); + if (which == wxCentreX) + return (int)(w/2); + else + return (int)(h/2); + } + default: + return -1; + } + } + switch (which) + { + case wxLeft: + { + wxLayoutConstraints *constr = other->GetConstraints(); + // If no constraints, it means the window is not dependent + // on anything, and therefore we know its value immediately + if (constr) + { + if (constr->left.GetDone()) + return constr->left.GetValue(); + else + return -1; + } + else + { + int x, y; + other->GetPosition(&x, &y); + return x; + } + } + case wxTop: + { + wxLayoutConstraints *constr = other->GetConstraints(); + // If no constraints, it means the window is not dependent + // on anything, and therefore we know its value immediately + if (constr) + { + if (constr->top.GetDone()) + return constr->top.GetValue(); + else + return -1; + } + else + { + int x, y; + other->GetPosition(&x, &y); + return y; + } + } + case wxRight: + { + wxLayoutConstraints *constr = other->GetConstraints(); + // If no constraints, it means the window is not dependent + // on anything, and therefore we know its value immediately + if (constr) + { + if (constr->right.GetDone()) + return constr->right.GetValue(); + else + return -1; + } + else + { + int x, y, w, h; + other->GetPosition(&x, &y); + other->GetSize(&w, &h); + return (int)(x + w); + } + } + case wxBottom: + { + wxLayoutConstraints *constr = other->GetConstraints(); + // If no constraints, it means the window is not dependent + // on anything, and therefore we know its value immediately + if (constr) + { + if (constr->bottom.GetDone()) + return constr->bottom.GetValue(); + else + return -1; + } + else + { + int x, y, w, h; + other->GetPosition(&x, &y); + other->GetSize(&w, &h); + return (int)(y + h); + } + } + case wxWidth: + { + wxLayoutConstraints *constr = other->GetConstraints(); + // If no constraints, it means the window is not dependent + // on anything, and therefore we know its value immediately + if (constr) + { + if (constr->width.GetDone()) + return constr->width.GetValue(); + else + return -1; + } + else + { + int w, h; + other->GetSize(&w, &h); + return w; + } + } + case wxHeight: + { + wxLayoutConstraints *constr = other->GetConstraints(); + // If no constraints, it means the window is not dependent + // on anything, and therefore we know its value immediately + if (constr) + { + if (constr->height.GetDone()) + return constr->height.GetValue(); + else + return -1; + } + else + { + int w, h; + other->GetSize(&w, &h); + return h; + } + } + case wxCentreX: + { + wxLayoutConstraints *constr = other->GetConstraints(); + // If no constraints, it means the window is not dependent + // on anything, and therefore we know its value immediately + if (constr) + { + if (constr->centreX.GetDone()) + return constr->centreX.GetValue(); + else + return -1; + } + else + { + int x, y, w, h; + other->GetPosition(&x, &y); + other->GetSize(&w, &h); + return (int)(x + (w/2)); + } + } + case wxCentreY: + { + wxLayoutConstraints *constr = other->GetConstraints(); + // If no constraints, it means the window is not dependent + // on anything, and therefore we know its value immediately + if (constr) + { + if (constr->centreY.GetDone()) + return constr->centreY.GetValue(); + else + return -1; + } + else + { + int x, y, w, h; + other->GetPosition(&x, &y); + other->GetSize(&w, &h); + return (int)(y + (h/2)); + } + } + default: + break; + } + return -1; +} + +wxLayoutConstraints::wxLayoutConstraints() +{ + left.SetEdge(wxLeft); + top.SetEdge(wxTop); + right.SetEdge(wxRight); + bottom.SetEdge(wxBottom); + centreX.SetEdge(wxCentreX); + centreY.SetEdge(wxCentreY); + width.SetEdge(wxWidth); + height.SetEdge(wxHeight); +} + +bool wxLayoutConstraints::SatisfyConstraints(wxWindowBase *win, int *nChanges) +{ + int noChanges = 0; + + bool done = width.GetDone(); + bool newDone = (done ? true : width.SatisfyConstraint(this, win)); + if (newDone != done) + noChanges ++; + + done = height.GetDone(); + newDone = (done ? true : height.SatisfyConstraint(this, win)); + if (newDone != done) + noChanges ++; + + done = left.GetDone(); + newDone = (done ? true : left.SatisfyConstraint(this, win)); + if (newDone != done) + noChanges ++; + + done = top.GetDone(); + newDone = (done ? true : top.SatisfyConstraint(this, win)); + if (newDone != done) + noChanges ++; + + done = right.GetDone(); + newDone = (done ? true : right.SatisfyConstraint(this, win)); + if (newDone != done) + noChanges ++; + + done = bottom.GetDone(); + newDone = (done ? true : bottom.SatisfyConstraint(this, win)); + if (newDone != done) + noChanges ++; + + done = centreX.GetDone(); + newDone = (done ? true : centreX.SatisfyConstraint(this, win)); + if (newDone != done) + noChanges ++; + + done = centreY.GetDone(); + newDone = (done ? true : centreY.SatisfyConstraint(this, win)); + if (newDone != done) + noChanges ++; + + *nChanges = noChanges; + + return AreSatisfied(); +} + +#endif // wxUSE_CONSTRAINTS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/lboxcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/lboxcmn.cpp new file mode 100644 index 0000000000..2afe3f1b7b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/lboxcmn.cpp @@ -0,0 +1,343 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/lboxcmn.cpp +// Purpose: wxListBox class methods common to all platforms +// Author: Vadim Zeitlin +// Modified by: +// Created: 22.10.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_LISTBOX + +#include "wx/listbox.h" + +#ifndef WX_PRECOMP + #include "wx/dynarray.h" + #include "wx/arrstr.h" + #include "wx/log.h" +#endif + +extern WXDLLEXPORT_DATA(const char) wxListBoxNameStr[] = "listBox"; + +// ============================================================================ +// implementation +// ============================================================================ + +wxListBoxBase::~wxListBoxBase() +{ + // this destructor is required for Darwin +} + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxListBoxStyle ) +wxBEGIN_FLAGS( wxListBoxStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxLB_SINGLE) +wxFLAGS_MEMBER(wxLB_MULTIPLE) +wxFLAGS_MEMBER(wxLB_EXTENDED) +wxFLAGS_MEMBER(wxLB_HSCROLL) +wxFLAGS_MEMBER(wxLB_ALWAYS_SB) +wxFLAGS_MEMBER(wxLB_NEEDED_SB) +wxFLAGS_MEMBER(wxLB_SORT) +wxEND_FLAGS( wxListBoxStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxListBox, wxControl, "wx/listbox.h") + +wxBEGIN_PROPERTIES_TABLE(wxListBox) +wxEVENT_PROPERTY( Select, wxEVT_LISTBOX, wxCommandEvent ) +wxEVENT_PROPERTY( DoubleClick, wxEVT_LISTBOX_DCLICK, wxCommandEvent ) + +wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) +wxPROPERTY_COLLECTION( Choices, wxArrayString, wxString, AppendString, \ + GetStrings, 0 /*flags*/, wxT("Helpstring"), wxT("group") ) +wxPROPERTY( Selection, int, SetSelection, GetSelection, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) + +wxPROPERTY_FLAGS( WindowStyle, wxListBoxStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxListBox) + +wxCONSTRUCTOR_4( wxListBox, wxWindow*, Parent, wxWindowID, Id, \ + wxPoint, Position, wxSize, Size ) + +/* + TODO PROPERTIES + selection + content + item + */ + +// ---------------------------------------------------------------------------- +// selection +// ---------------------------------------------------------------------------- + +bool wxListBoxBase::SetStringSelection(const wxString& s, bool select) +{ + const int sel = FindString(s); + if ( sel == wxNOT_FOUND ) + return false; + + SetSelection(sel, select); + + return true; +} + +void wxListBoxBase::SetSelection(int n) +{ + if ( !HasMultipleSelection() ) + DoChangeSingleSelection(n); + + DoSetSelection(n, true); +} + +void wxListBoxBase::DeselectAll(int itemToLeaveSelected) +{ + if ( HasMultipleSelection() ) + { + wxArrayInt selections; + GetSelections(selections); + + size_t count = selections.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + int item = selections[n]; + if ( item != itemToLeaveSelected ) + Deselect(item); + } + } + else // single selection + { + int sel = GetSelection(); + if ( sel != wxNOT_FOUND && sel != itemToLeaveSelected ) + { + Deselect(sel); + } + } +} + +void wxListBoxBase::UpdateOldSelections() +{ + // When the control becomes empty, any previously remembered selections are + // invalid anyhow, so just forget them. + if ( IsEmpty() ) + { + m_oldSelections.clear(); + return; + } + + // We need to remember the selection even in single-selection case on + // Windows, so that we don't send an event when the user clicks on an + // already selected item. +#ifndef __WXMSW__ + if (HasFlag(wxLB_MULTIPLE) || HasFlag(wxLB_EXTENDED)) +#endif + { + GetSelections( m_oldSelections ); + } +} + +bool wxListBoxBase::SendEvent(wxEventType evtType, int item, bool selected) +{ + wxCommandEvent event(evtType, GetId()); + event.SetEventObject(this); + + event.SetInt(item); + event.SetString(GetString(item)); + event.SetExtraLong(selected); + + if ( HasClientObjectData() ) + event.SetClientObject(GetClientObject(item)); + else if ( HasClientUntypedData() ) + event.SetClientData(GetClientData(item)); + + return HandleWindowEvent(event); +} + +bool wxListBoxBase::DoChangeSingleSelection(int item) +{ + // As we don't use m_oldSelections in single selection mode, we store the + // last item that we notified the user about in it in this case because we + // need to remember it to be able to filter out the dummy selection changes + // that we get when the user clicks on an already selected item. + if ( !m_oldSelections.empty() && *m_oldSelections.begin() == item ) + { + // Same item as the last time. + return false; + } + + m_oldSelections.clear(); + m_oldSelections.push_back(item); + + return true; +} + +bool wxListBoxBase::CalcAndSendEvent() +{ + wxArrayInt selections; + GetSelections(selections); + bool selected = true; + + if ( selections.empty() && m_oldSelections.empty() ) + { + // nothing changed, just leave + return false; + } + + const size_t countSel = selections.size(), + countSelOld = m_oldSelections.size(); + if ( countSel == countSelOld ) + { + bool changed = false; + for ( size_t idx = 0; idx < countSel; idx++ ) + { + if (selections[idx] != m_oldSelections[idx]) + { + changed = true; + break; + } + } + + // nothing changed, just leave + if ( !changed ) + return false; + } + + int item = wxNOT_FOUND; + if ( selections.empty() ) + { + selected = false; + item = m_oldSelections[0]; + } + else // we [still] have some selections + { + // Now test if any new item is selected + bool any_new_selected = false; + for ( size_t idx = 0; idx < countSel; idx++ ) + { + item = selections[idx]; + if ( m_oldSelections.Index(item) == wxNOT_FOUND ) + { + any_new_selected = true; + break; + } + } + + if ( !any_new_selected ) + { + // No new items selected, now test if any new item is deselected + bool any_new_deselected = false; + for ( size_t idx = 0; idx < countSelOld; idx++ ) + { + item = m_oldSelections[idx]; + if ( selections.Index(item) == wxNOT_FOUND ) + { + any_new_deselected = true; + break; + } + } + + if ( any_new_deselected ) + { + // indicate that this is a selection + selected = false; + } + else + { + item = wxNOT_FOUND; // this should be impossible + } + } + } + + wxASSERT_MSG( item != wxNOT_FOUND, + "Logic error in wxListBox selection event generation code" ); + + m_oldSelections = selections; + + return SendEvent(wxEVT_LISTBOX, item, selected); +} + +// ---------------------------------------------------------------------------- +// misc +// ---------------------------------------------------------------------------- + +void wxListBoxBase::Command(wxCommandEvent& event) +{ + SetSelection(event.GetInt(), event.GetExtraLong() != 0); + (void)GetEventHandler()->ProcessEvent(event); +} + +// ---------------------------------------------------------------------------- +// SetFirstItem() and such +// ---------------------------------------------------------------------------- + +void wxListBoxBase::SetFirstItem(const wxString& s) +{ + int n = FindString(s); + + wxCHECK_RET( n != wxNOT_FOUND, wxT("invalid string in wxListBox::SetFirstItem") ); + + DoSetFirstItem(n); +} + +void wxListBoxBase::AppendAndEnsureVisible(const wxString& s) +{ + Append(s); + EnsureVisible(GetCount() - 1); +} + +void wxListBoxBase::EnsureVisible(int WXUNUSED(n)) +{ + // the base class version does nothing (the only alternative would be to + // call SetFirstItem() but this is probably even more stupid) +} + +#endif // wxUSE_LISTBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/list.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/list.cpp new file mode 100644 index 0000000000..6eadb1533a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/list.cpp @@ -0,0 +1,766 @@ +//////////////////////////////////////////////////////////////////////////////// +// Name: src/common/list.cpp +// Purpose: wxList implementation +// Author: Julian Smart +// Modified by: VZ at 16/11/98: WX_DECLARE_LIST() and typesafe lists added +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +//////////////////////////////////////////////////////////////////////////////// + +// ============================================================================= +// declarations +// ============================================================================= + +// ----------------------------------------------------------------------------- +// headers +// ----------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include +#include +#include + +#ifndef WX_PRECOMP + #include "wx/list.h" + #include "wx/crt.h" +#endif + +#if !wxUSE_STD_CONTAINERS + +// ============================================================================= +// implementation +// ============================================================================= + +// ----------------------------------------------------------------------------- +// wxListKey +// ----------------------------------------------------------------------------- +wxListKey wxDefaultListKey; + +bool wxListKey::operator==(wxListKeyValue value) const +{ + switch ( m_keyType ) + { + default: + wxFAIL_MSG(wxT("bad key type.")); + // let compiler optimize the line above away in release build + // by not putting return here... + + case wxKEY_STRING: + return *m_key.string == *value.string; + + case wxKEY_INTEGER: + return m_key.integer == value.integer; + } +} + +// ----------------------------------------------------------------------------- +// wxNodeBase +// ----------------------------------------------------------------------------- + +wxNodeBase::wxNodeBase(wxListBase *list, + wxNodeBase *previous, wxNodeBase *next, + void *data, const wxListKey& key) +{ + m_list = list; + m_data = data; + m_previous = previous; + m_next = next; + + switch ( key.GetKeyType() ) + { + case wxKEY_NONE: + break; + + case wxKEY_INTEGER: + m_key.integer = key.GetNumber(); + break; + + case wxKEY_STRING: + // to be free()d later + m_key.string = new wxString(key.GetString()); + break; + + default: + wxFAIL_MSG(wxT("invalid key type")); + } + + if ( previous ) + previous->m_next = this; + + if ( next ) + next->m_previous = this; +} + +wxNodeBase::~wxNodeBase() +{ + // handle the case when we're being deleted from the list by the user (i.e. + // not by the list itself from DeleteNode) - we must do it for + // compatibility with old code + if ( m_list != NULL ) + { + if ( m_list->m_keyType == wxKEY_STRING ) + { + delete m_key.string; + } + + m_list->DetachNode(this); + } +} + +int wxNodeBase::IndexOf() const +{ + wxCHECK_MSG( m_list, wxNOT_FOUND, wxT("node doesn't belong to a list in IndexOf")); + + // It would be more efficient to implement IndexOf() completely inside + // wxListBase (only traverse the list once), but this is probably a more + // reusable way of doing it. Can always be optimized at a later date (since + // IndexOf() resides in wxListBase as well) if efficiency is a problem. + int i; + wxNodeBase *prev = m_previous; + + for( i = 0; prev; i++ ) + { + prev = prev->m_previous; + } + + return i; +} + +// ----------------------------------------------------------------------------- +// wxListBase +// ----------------------------------------------------------------------------- + +void wxListBase::Init(wxKeyType keyType) +{ + m_nodeFirst = + m_nodeLast = NULL; + m_count = 0; + m_destroy = false; + m_keyType = keyType; +} + +wxListBase::wxListBase(size_t count, void *elements[]) +{ + Init(); + + for ( size_t n = 0; n < count; n++ ) + { + Append(elements[n]); + } +} + +void wxListBase::DoCopy(const wxListBase& list) +{ + wxASSERT_MSG( !list.m_destroy, + wxT("copying list which owns it's elements is a bad idea") ); + + m_destroy = list.m_destroy; + m_keyType = list.m_keyType; + m_nodeFirst = + m_nodeLast = NULL; + + switch (m_keyType) + { + case wxKEY_INTEGER: + { + for ( wxNodeBase *node = list.GetFirst(); node; node = node->GetNext() ) + { + Append(node->GetKeyInteger(), node->GetData()); + } + break; + } + + case wxKEY_STRING: + { + for ( wxNodeBase *node = list.GetFirst(); node; node = node->GetNext() ) + { + Append(node->GetKeyString(), node->GetData()); + } + break; + } + + default: + { + for ( wxNodeBase *node = list.GetFirst(); node; node = node->GetNext() ) + { + Append(node->GetData()); + } + break; + } + } + + wxASSERT_MSG( m_count == list.m_count, wxT("logic error in wxList::DoCopy") ); +} + +wxListBase::~wxListBase() +{ + wxNodeBase *each = m_nodeFirst; + while ( each != NULL ) + { + wxNodeBase *next = each->GetNext(); + DoDeleteNode(each); + each = next; + } +} + +wxNodeBase *wxListBase::AppendCommon(wxNodeBase *node) +{ + if ( !m_nodeFirst ) + { + m_nodeFirst = node; + m_nodeLast = m_nodeFirst; + } + else + { + m_nodeLast->m_next = node; + m_nodeLast = node; + } + + m_count++; + + return node; +} + +wxNodeBase *wxListBase::Append(void *object) +{ + // all objects in a keyed list should have a key + wxCHECK_MSG( m_keyType == wxKEY_NONE, NULL, + wxT("need a key for the object to append") ); + + // we use wxDefaultListKey even though it is the default parameter value + // because gcc under Mac OS X seems to miscompile this call otherwise + wxNodeBase *node = CreateNode(m_nodeLast, NULL, object, + wxDefaultListKey); + + return AppendCommon(node); +} + +wxNodeBase *wxListBase::Append(long key, void *object) +{ + wxCHECK_MSG( (m_keyType == wxKEY_INTEGER) || + (m_keyType == wxKEY_NONE && m_count == 0), + NULL, + wxT("can't append object with numeric key to this list") ); + + wxNodeBase *node = CreateNode(m_nodeLast, NULL, object, key); + return AppendCommon(node); +} + +wxNodeBase *wxListBase::Append (const wxString& key, void *object) +{ + wxCHECK_MSG( (m_keyType == wxKEY_STRING) || + (m_keyType == wxKEY_NONE && m_count == 0), + NULL, + wxT("can't append object with string key to this list") ); + + wxNodeBase *node = CreateNode(m_nodeLast, NULL, object, key); + return AppendCommon(node); +} + +wxNodeBase *wxListBase::Insert(wxNodeBase *position, void *object) +{ + // all objects in a keyed list should have a key + wxCHECK_MSG( m_keyType == wxKEY_NONE, NULL, + wxT("need a key for the object to insert") ); + + wxCHECK_MSG( !position || position->m_list == this, NULL, + wxT("can't insert before a node from another list") ); + + // previous and next node for the node being inserted + wxNodeBase *prev, *next; + if ( position ) + { + prev = position->GetPrevious(); + next = position; + } + else + { + // inserting in the beginning of the list + prev = NULL; + next = m_nodeFirst; + } + + // wxDefaultListKey: see comment in Append() above + wxNodeBase *node = CreateNode(prev, next, object, wxDefaultListKey); + if ( !m_nodeFirst ) + { + m_nodeLast = node; + } + + if ( prev == NULL ) + { + m_nodeFirst = node; + } + + m_count++; + + return node; +} + +wxNodeBase *wxListBase::Item(size_t n) const +{ + for ( wxNodeBase *current = GetFirst(); current; current = current->GetNext() ) + { + if ( n-- == 0 ) + { + return current; + } + } + + wxFAIL_MSG( wxT("invalid index in wxListBase::Item") ); + + return NULL; +} + +wxNodeBase *wxListBase::Find(const wxListKey& key) const +{ + wxASSERT_MSG( m_keyType == key.GetKeyType(), + wxT("this list is not keyed on the type of this key") ); + + for ( wxNodeBase *current = GetFirst(); current; current = current->GetNext() ) + { + if ( key == current->m_key ) + { + return current; + } + } + + // not found + return NULL; +} + +wxNodeBase *wxListBase::Find(const void *object) const +{ + for ( wxNodeBase *current = GetFirst(); current; current = current->GetNext() ) + { + if ( current->GetData() == object ) + return current; + } + + // not found + return NULL; +} + +int wxListBase::IndexOf(void *object) const +{ + wxNodeBase *node = Find( object ); + + return node ? node->IndexOf() : wxNOT_FOUND; +} + +void wxListBase::DoDeleteNode(wxNodeBase *node) +{ + // free node's data + if ( m_keyType == wxKEY_STRING ) + { + free(node->m_key.string); + } + + if ( m_destroy ) + { + node->DeleteData(); + } + + // so that the node knows that it's being deleted by the list + node->m_list = NULL; + delete node; +} + +wxNodeBase *wxListBase::DetachNode(wxNodeBase *node) +{ + wxCHECK_MSG( node, NULL, wxT("detaching NULL wxNodeBase") ); + wxCHECK_MSG( node->m_list == this, NULL, + wxT("detaching node which is not from this list") ); + + // update the list + wxNodeBase **prevNext = node->GetPrevious() ? &node->GetPrevious()->m_next + : &m_nodeFirst; + wxNodeBase **nextPrev = node->GetNext() ? &node->GetNext()->m_previous + : &m_nodeLast; + + *prevNext = node->GetNext(); + *nextPrev = node->GetPrevious(); + + m_count--; + + // mark the node as not belonging to this list any more + node->m_list = NULL; + + return node; +} + +bool wxListBase::DeleteNode(wxNodeBase *node) +{ + if ( !DetachNode(node) ) + return false; + + DoDeleteNode(node); + + return true; +} + +bool wxListBase::DeleteObject(void *object) +{ + for ( wxNodeBase *current = GetFirst(); current; current = current->GetNext() ) + { + if ( current->GetData() == object ) + { + DeleteNode(current); + return true; + } + } + + // not found + return false; +} + +void wxListBase::Clear() +{ + wxNodeBase *current = m_nodeFirst; + while ( current ) + { + wxNodeBase *next = current->GetNext(); + DoDeleteNode(current); + current = next; + } + + m_nodeFirst = + m_nodeLast = NULL; + + m_count = 0; +} + +void wxListBase::ForEach(wxListIterateFunction F) +{ + for ( wxNodeBase *current = GetFirst(); current; current = current->GetNext() ) + { + (*F)(current->GetData()); + } +} + +void *wxListBase::FirstThat(wxListIterateFunction F) +{ + for ( wxNodeBase *current = GetFirst(); current; current = current->GetNext() ) + { + if ( (*F)(current->GetData()) ) + return current->GetData(); + } + + return NULL; +} + +void *wxListBase::LastThat(wxListIterateFunction F) +{ + for ( wxNodeBase *current = GetLast(); current; current = current->GetPrevious() ) + { + if ( (*F)(current->GetData()) ) + return current->GetData(); + } + + return NULL; +} + +// (stefan.hammes@urz.uni-heidelberg.de) +// +// function for sorting lists. the concept is borrowed from 'qsort'. +// by giving a sort function, arbitrary lists can be sorted. +// method: +// - put wxObject pointers into an array +// - sort the array with qsort +// - put back the sorted wxObject pointers into the list +// +// CAVE: the sort function receives pointers to wxObject pointers (wxObject **), +// so dereference right! +// EXAMPLE: +// int listcompare(const void *arg1, const void *arg2) +// { +// return(compare(**(wxString **)arg1, +// **(wxString **)arg2)); +// } +// +// void main() +// { +// wxListBase list; +// +// list.Append(new wxString("DEF")); +// list.Append(new wxString("GHI")); +// list.Append(new wxString("ABC")); +// list.Sort(listcompare); +// } + +void wxListBase::Sort(const wxSortCompareFunction compfunc) +{ + // allocate an array for the wxObject pointers of the list + const size_t num = GetCount(); + void **objArray = new void *[num]; + void **objPtr = objArray; + + // go through the list and put the pointers into the array + wxNodeBase *node; + for ( node = GetFirst(); node; node = node->GetNext() ) + { + *objPtr++ = node->GetData(); + } + + // sort the array + qsort((void *)objArray,num,sizeof(wxObject *), +#ifdef __WXWINCE__ + (int (__cdecl *)(const void *,const void *)) +#endif + compfunc); + + // put the sorted pointers back into the list + objPtr = objArray; + for ( node = GetFirst(); node; node = node->GetNext() ) + { + node->SetData(*objPtr++); + } + + // free the array + delete[] objArray; +} + +void wxListBase::Reverse() +{ + wxNodeBase* node = m_nodeFirst; + wxNodeBase* tmp; + + while (node) + { + // swap prev and next pointers + tmp = node->m_next; + node->m_next = node->m_previous; + node->m_previous = tmp; + + // this is the node that was next before swapping + node = tmp; + } + + // swap first and last node + tmp = m_nodeFirst; m_nodeFirst = m_nodeLast; m_nodeLast = tmp; +} + +void wxListBase::DeleteNodes(wxNodeBase* first, wxNodeBase* last) +{ + wxNodeBase* node = first; + + while (node != last) + { + wxNodeBase* next = node->GetNext(); + DeleteNode(node); + node = next; + } +} + +// ============================================================================ +// compatibility section from now on +// ============================================================================ + +#ifdef wxLIST_COMPATIBILITY + +// ----------------------------------------------------------------------------- +// wxList (a.k.a. wxObjectList) +// ----------------------------------------------------------------------------- + +wxList::wxList( int key_type ) + : wxObjectList( (wxKeyType)key_type ) +{ +} + +void wxObjectListNode::DeleteData() +{ + delete (wxObject *)GetData(); +} + +// ---------------------------------------------------------------------------- +// wxStringList +// ---------------------------------------------------------------------------- + +static inline wxChar* MYcopystring(const wxChar* s) +{ + wxChar* copy = new wxChar[wxStrlen(s) + 1]; + return wxStrcpy(copy, s); +} + +// instead of WX_DEFINE_LIST(wxStringListBase) we define this function +// ourselves +void wxStringListNode::DeleteData() +{ + delete [] (char *)GetData(); +} + +bool wxStringList::Delete(const wxChar *s) +{ + wxStringListNode *current; + + for ( current = GetFirst(); current; current = current->GetNext() ) + { + if ( wxStrcmp(current->GetData(), s) == 0 ) + { + DeleteNode(current); + return true; + } + } + + // not found + return false; +} + +void wxStringList::DoCopy(const wxStringList& other) +{ + wxASSERT( GetCount() == 0 ); // this list must be empty before copying! + + size_t count = other.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + Add(other.Item(n)->GetData()); + } +} + +wxStringList::wxStringList() +{ + DeleteContents(true); +} + +// Variable argument list, terminated by a zero +// Makes new storage for the strings +wxStringList::wxStringList (const wxChar *first, ...) +{ + DeleteContents(true); + if ( !first ) + return; + + va_list ap; + va_start(ap, first); + + const wxChar *s = first; + for (;;) + { + Add(s); + + // icc gives this warning in its own va_arg() macro, argh +#ifdef __INTELC__ + #pragma warning(push) + #pragma warning(disable: 1684) +#endif + + s = va_arg(ap, const wxChar *); + +#ifdef __INTELC__ + #pragma warning(pop) +#endif + + if ( !s ) + break; + } + + va_end(ap); +} + +// Only makes new strings if arg is true +wxChar **wxStringList::ListToArray(bool new_copies) const +{ + wxChar **string_array = new wxChar *[GetCount()]; + wxStringListNode *node = GetFirst(); + for (size_t i = 0; i < GetCount(); i++) + { + wxChar *s = node->GetData(); + if ( new_copies ) + string_array[i] = MYcopystring(s); + else + string_array[i] = s; + node = node->GetNext(); + } + + return string_array; +} + +// Checks whether s is a member of the list +bool wxStringList::Member(const wxChar *s) const +{ + for ( wxStringListNode *node = GetFirst(); node; node = node->GetNext() ) + { + const wxChar *s1 = node->GetData(); + if (s == s1 || wxStrcmp (s, s1) == 0) + return true; + } + + return false; +} + +#ifdef __WXWINCE__ +extern "C" +{ +static int __cdecl +#else +extern "C" +{ +static int LINKAGEMODE +#endif + +wx_comparestrings(const void *arg1, const void *arg2) +{ + wxChar **s1 = (wxChar **) arg1; + wxChar **s2 = (wxChar **) arg2; + + return wxStrcmp (*s1, *s2); +} + +} // end of extern "C" (required because of GCC Bug c++/33078 + +// Sort a list of strings - deallocates old nodes, allocates new +void wxStringList::Sort() +{ + size_t N = GetCount(); + wxChar **array = new wxChar *[N]; + wxStringListNode *node; + + size_t i = 0; + for ( node = GetFirst(); node; node = node->GetNext() ) + { + array[i++] = node->GetData(); + } + + qsort (array, N, sizeof (wxChar *), wx_comparestrings); + + i = 0; + for ( node = GetFirst(); node; node = node->GetNext() ) + node->SetData( array[i++] ); + + delete [] array; +} + +wxNode *wxStringList::Add(const wxChar *s) +{ + return (wxNode *)(wxStringListBase::Node *) + wxStringListBase::Append(MYcopystring(s)); +} + +wxNode *wxStringList::Prepend(const wxChar *s) +{ + return (wxNode *)(wxStringListBase::Node *) + wxStringListBase::Insert(MYcopystring(s)); +} + +#endif // wxLIST_COMPATIBILITY + +#else // wxUSE_STD_CONTAINERS = 1 + + #include "wx/listimpl.cpp" + WX_DEFINE_LIST(wxObjectList) + +// with wxUSE_STD_CONTAINERS wxStringList contains wxString objects, not pointers +void _WX_LIST_HELPER_wxStringListBase::DeleteFunction( wxString WXUNUSED(X) ) +{ +} + +_WX_LIST_HELPER_wxStringListBase::BaseListType _WX_LIST_HELPER_wxStringListBase::EmptyList; + +#endif // !wxUSE_STD_CONTAINERS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/listctrlcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/listctrlcmn.cpp new file mode 100644 index 0000000000..e6101be4c3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/listctrlcmn.cpp @@ -0,0 +1,252 @@ +//////////////////////////////////////////////////////////////////////////////// +// Name: src/common/listctrlcmn.cpp +// Purpose: Common defines for wxListCtrl and wxListCtrl-based classes. +// Author: Kevin Ollivier +// Created: 09/15/06 +// Copyright: (c) Kevin Ollivier +// Licence: wxWindows licence +//////////////////////////////////////////////////////////////////////////////// + +// ============================================================================= +// declarations +// ============================================================================= + +// ----------------------------------------------------------------------------- +// headers +// ----------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_LISTCTRL + +#include "wx/listctrl.h" + +#ifndef WX_PRECOMP + #include "wx/dcclient.h" +#endif + +const char wxListCtrlNameStr[] = "listCtrl"; + +// ListCtrl events +wxDEFINE_EVENT( wxEVT_LIST_BEGIN_DRAG, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_BEGIN_RDRAG, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_BEGIN_LABEL_EDIT, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_END_LABEL_EDIT, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_DELETE_ITEM, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_DELETE_ALL_ITEMS, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_SELECTED, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_DESELECTED, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_KEY_DOWN, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_INSERT_ITEM, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_COL_CLICK, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_COL_RIGHT_CLICK, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_COL_BEGIN_DRAG, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_COL_DRAGGING, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_COL_END_DRAG, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_RIGHT_CLICK, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_MIDDLE_CLICK, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_ACTIVATED, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_ITEM_FOCUSED, wxListEvent ); +wxDEFINE_EVENT( wxEVT_LIST_CACHE_HINT, wxListEvent ); + +// ----------------------------------------------------------------------------- +// XTI +// ----------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxListCtrlStyle ) +wxBEGIN_FLAGS( wxListCtrlStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxLC_LIST) +wxFLAGS_MEMBER(wxLC_REPORT) +wxFLAGS_MEMBER(wxLC_ICON) +wxFLAGS_MEMBER(wxLC_SMALL_ICON) +wxFLAGS_MEMBER(wxLC_ALIGN_TOP) +wxFLAGS_MEMBER(wxLC_ALIGN_LEFT) +wxFLAGS_MEMBER(wxLC_AUTOARRANGE) +wxFLAGS_MEMBER(wxLC_USER_TEXT) +wxFLAGS_MEMBER(wxLC_EDIT_LABELS) +wxFLAGS_MEMBER(wxLC_NO_HEADER) +wxFLAGS_MEMBER(wxLC_SINGLE_SEL) +wxFLAGS_MEMBER(wxLC_SORT_ASCENDING) +wxFLAGS_MEMBER(wxLC_SORT_DESCENDING) +wxFLAGS_MEMBER(wxLC_VIRTUAL) +wxEND_FLAGS( wxListCtrlStyle ) + +#if ((!defined(__WXMSW__) && !(defined(__WXMAC__) && wxOSX_USE_CARBON)) || defined(__WXUNIVERSAL__)) +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxGenericListCtrl, "wx/listctrl.h") +#else +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxControl, "wx/listctrl.h") +#endif + +wxBEGIN_PROPERTIES_TABLE(wxListCtrl) +wxEVENT_PROPERTY( TextUpdated, wxEVT_TEXT, wxCommandEvent ) + +wxPROPERTY_FLAGS( WindowStyle, wxListCtrlStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxListCtrl) + +wxCONSTRUCTOR_5( wxListCtrl, wxWindow*, Parent, wxWindowID, Id, \ + wxPoint, Position, wxSize, Size, long, WindowStyle ) + +/* + TODO : Expose more information of a list's layout etc. via appropriate objects + (see NotebookPageInfo) + */ + +IMPLEMENT_DYNAMIC_CLASS(wxListView, wxListCtrl) +IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject) +IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent) + +// ---------------------------------------------------------------------------- +// wxListCtrlBase implementation +// ---------------------------------------------------------------------------- + +long +wxListCtrlBase::AppendColumn(const wxString& heading, + wxListColumnFormat format, + int width) +{ + return InsertColumn(GetColumnCount(), heading, format, width); +} + +long +wxListCtrlBase::InsertColumn(long col, + const wxString& heading, + int format, + int width) +{ + wxListItem item; + item.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_FORMAT; + item.m_text = heading; + if ( width >= 0 + || width == wxLIST_AUTOSIZE + || width == wxLIST_AUTOSIZE_USEHEADER ) + { + item.m_mask |= wxLIST_MASK_WIDTH; + item.m_width = width; + } + item.m_format = format; + + return InsertColumn(col, item); +} + +long wxListCtrlBase::InsertColumn(long col, const wxListItem& info) +{ + long rc = DoInsertColumn(col, info); + if ( rc != -1 ) + { + // As our best size calculation depends on the column headers, + // invalidate the previously cached best size when a column is added. + InvalidateBestSize(); + } + + return rc; +} + +wxSize wxListCtrlBase::DoGetBestClientSize() const +{ + // There is no obvious way to determine the best size in icon and list + // modes so just don't do it for now. + if ( !InReportView() ) + return wxControl::DoGetBestClientSize(); + + int totalWidth; + wxClientDC dc(const_cast(this)); + + // In report mode, we use only the column headers, not items, to determine + // the best width. The reason for this is that it's easier (we can't just + // iterate over all items, especially not in a virtual control, so we'd + // have to do something relatively complicated such as checking the size of + // some items in the beginning and the end only) and also because the + // columns are usually static while the list contents is dynamic so it + // usually doesn't make much sense to adjust the control size to it anyhow. + // And finally, scrollbars can always be used with the items while the + // headers are just truncated if there is not enough place for them. + const int columns = GetColumnCount(); + if ( HasFlag(wxLC_NO_HEADER) || !columns ) + { + // Use some arbitrary width. + totalWidth = 50*dc.GetCharWidth(); + } + else // We do have columns, use them to determine the best width. + { + totalWidth = 0; + for ( int col = 0; col < columns; col++ ) + { + totalWidth += GetColumnWidth(col); + } + } + + // Use some arbitrary height, there is no good way to determine it. + return wxSize(totalWidth, 10*dc.GetCharHeight()); +} + +void wxListCtrlBase::SetAlternateRowColour(const wxColour& colour) +{ + wxASSERT(HasFlag(wxLC_VIRTUAL)); + m_alternateRowColour.SetBackgroundColour(colour); +} + +void wxListCtrlBase::EnableAlternateRowColours(bool enable) +{ + if ( enable ) + { + // This code is copied from wxDataViewMainWindow::OnPaint() + + // Determine the alternate rows colour automatically from the + // background colour. + const wxColour bgColour = GetBackgroundColour(); + + // Depending on the background, alternate row color + // will be 3% more dark or 50% brighter. + int alpha = bgColour.GetRGB() > 0x808080 ? 97 : 150; + SetAlternateRowColour(bgColour.ChangeLightness(alpha)); + } + else // Disable striping by setting invalid alternative colour. + { + SetAlternateRowColour(wxColour()); + } +} + +wxListItemAttr *wxListCtrlBase::OnGetItemAttr(long item) const +{ + return (m_alternateRowColour.GetBackgroundColour().IsOk() && (item % 2)) + ? wxConstCast(&m_alternateRowColour, wxListItemAttr) + : NULL; // no attributes by default +} + +#endif // wxUSE_LISTCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/log.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/log.cpp new file mode 100644 index 0000000000..3180f46743 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/log.cpp @@ -0,0 +1,1130 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/log.cpp +// Purpose: Assorted wxLogXXX functions, and wxLog (sink for logs) +// Author: Vadim Zeitlin +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_LOG + +// wxWidgets +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/app.h" + #include "wx/arrstr.h" + #include "wx/intl.h" + #include "wx/string.h" + #include "wx/utils.h" +#endif //WX_PRECOMP + +#include "wx/apptrait.h" +#include "wx/datetime.h" +#include "wx/file.h" +#include "wx/msgout.h" +#include "wx/textfile.h" +#include "wx/thread.h" +#include "wx/private/threadinfo.h" +#include "wx/crt.h" +#include "wx/vector.h" + +// other standard headers +#ifndef __WXWINCE__ +#include +#endif + +#include + +#ifndef __WXWINCE__ +#include +#else +#include "wx/msw/wince/time.h" +#endif + +#if defined(__WINDOWS__) + #include "wx/msw/private.h" // includes windows.h +#endif + +#undef wxLOG_COMPONENT +const char *wxLOG_COMPONENT = ""; + +// this macro allows to define an object which will be initialized before any +// other function in this file is called: this is necessary to allow log +// functions to be used during static initialization (this is not advisable +// anyhow but we should at least try to not crash) and to also ensure that they +// are initialized by the time static initialization is done, i.e. before any +// threads are created hopefully +// +// the net effect of all this is that you can use Get##name() function to +// access the object without worrying about it being not initialized +// +// see also WX_DEFINE_GLOBAL_CONV2() in src/common/strconv.cpp +#define WX_DEFINE_GLOBAL_VAR(type, name) \ + inline type& Get##name() \ + { \ + static type s_##name; \ + return s_##name; \ + } \ + \ + type *gs_##name##Ptr = &Get##name() + +#if wxUSE_THREADS + +namespace +{ + +// contains messages logged by the other threads and waiting to be shown until +// Flush() is called in the main one +typedef wxVector wxLogRecords; +wxLogRecords gs_bufferedLogRecords; + +#define WX_DEFINE_LOG_CS(name) WX_DEFINE_GLOBAL_VAR(wxCriticalSection, name##CS) + +// this critical section is used for buffering the messages from threads other +// than main, i.e. it protects all accesses to gs_bufferedLogRecords above +WX_DEFINE_LOG_CS(BackgroundLog); + +// this one is used for protecting TraceMasks() from concurrent access +WX_DEFINE_LOG_CS(TraceMask); + +// and this one is used for GetComponentLevels() +WX_DEFINE_LOG_CS(Levels); + +} // anonymous namespace + +#endif // wxUSE_THREADS + +// ---------------------------------------------------------------------------- +// non member functions +// ---------------------------------------------------------------------------- + +// define this to enable wrapping of log messages +//#define LOG_PRETTY_WRAP + +#ifdef LOG_PRETTY_WRAP + static void wxLogWrap(FILE *f, const char *pszPrefix, const char *psz); +#endif + +// ---------------------------------------------------------------------------- +// module globals +// ---------------------------------------------------------------------------- + +namespace +{ + +// this struct is used to store information about the previous log message used +// by OnLog() to (optionally) avoid logging multiple copies of the same message +struct PreviousLogInfo +{ + PreviousLogInfo() + { + numRepeated = 0; + } + + + // previous message itself + wxString msg; + + // its level + wxLogLevel level; + + // other information about it + wxLogRecordInfo info; + + // the number of times it was already repeated + unsigned numRepeated; +}; + +PreviousLogInfo gs_prevLog; + + +// map containing all components for which log level was explicitly set +// +// NB: all accesses to it must be protected by GetLevelsCS() critical section +WX_DEFINE_GLOBAL_VAR(wxStringToNumHashMap, ComponentLevels); + +// ---------------------------------------------------------------------------- +// wxLogOutputBest: wxLog wrapper around wxMessageOutputBest +// ---------------------------------------------------------------------------- + +class wxLogOutputBest : public wxLog +{ +public: + wxLogOutputBest() { } + +protected: + virtual void DoLogText(const wxString& msg) + { + wxMessageOutputBest().Output(msg); + } + +private: + wxDECLARE_NO_COPY_CLASS(wxLogOutputBest); +}; + +} // anonymous namespace + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// helper global functions +// ---------------------------------------------------------------------------- + +void wxSafeShowMessage(const wxString& title, const wxString& text) +{ +#ifdef __WINDOWS__ + ::MessageBox(NULL, text.t_str(), title.t_str(), MB_OK | MB_ICONSTOP); +#else + wxFprintf(stderr, wxS("%s: %s\n"), title.c_str(), text.c_str()); + fflush(stderr); +#endif +} + +// ---------------------------------------------------------------------------- +// wxLogFormatter class implementation +// ---------------------------------------------------------------------------- + +wxString +wxLogFormatter::Format(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info) const +{ + wxString prefix; + + // don't time stamp debug messages under MSW as debug viewers usually + // already have an option to do it +#ifdef __WINDOWS__ + if ( level != wxLOG_Debug && level != wxLOG_Trace ) +#endif // __WINDOWS__ + prefix = FormatTime(info.timestamp); + + switch ( level ) + { + case wxLOG_Error: + prefix += _("Error: "); + break; + + case wxLOG_Warning: + prefix += _("Warning: "); + break; + + // don't prepend "debug/trace" prefix under MSW as it goes to the debug + // window anyhow and so can't be confused with something else +#ifndef __WINDOWS__ + case wxLOG_Debug: + // this prefix (as well as the one below) is intentionally not + // translated as nobody translates debug messages anyhow + prefix += "Debug: "; + break; + + case wxLOG_Trace: + prefix += "Trace: "; + break; +#endif // !__WINDOWS__ + } + + return prefix + msg; +} + +wxString +wxLogFormatter::FormatTime(time_t t) const +{ + wxString str; + wxLog::TimeStamp(&str, t); + + return str; +} + + +// ---------------------------------------------------------------------------- +// wxLog class implementation +// ---------------------------------------------------------------------------- + +unsigned wxLog::LogLastRepeatIfNeeded() +{ + const unsigned count = gs_prevLog.numRepeated; + + if ( gs_prevLog.numRepeated ) + { + wxString msg; +#if wxUSE_INTL + if ( gs_prevLog.numRepeated == 1 ) + { + // We use a separate message for this case as "repeated 1 time" + // looks somewhat strange. + msg = _("The previous message repeated once."); + } + else + { + // Notice that we still use wxPLURAL() to ensure that multiple + // numbers of times are correctly formatted, even though we never + // actually use the singular string. + msg.Printf(wxPLURAL("The previous message repeated %lu time.", + "The previous message repeated %lu times.", + gs_prevLog.numRepeated), + gs_prevLog.numRepeated); + } +#else + msg.Printf(wxS("The previous message was repeated %lu time(s)."), + gs_prevLog.numRepeated); +#endif + gs_prevLog.numRepeated = 0; + gs_prevLog.msg.clear(); + DoLogRecord(gs_prevLog.level, msg, gs_prevLog.info); + } + + return count; +} + +wxLog::~wxLog() +{ + // Flush() must be called before destroying the object as otherwise some + // messages could be lost + if ( gs_prevLog.numRepeated ) + { + wxMessageOutputDebug().Printf + ( +#if wxUSE_INTL + wxPLURAL + ( + "Last repeated message (\"%s\", %lu time) wasn't output", + "Last repeated message (\"%s\", %lu times) wasn't output", + gs_prevLog.numRepeated + ), +#else + wxS("Last repeated message (\"%s\", %lu time(s)) wasn't output"), +#endif + gs_prevLog.msg, + gs_prevLog.numRepeated + ); + } + + delete m_formatter; +} + +// ---------------------------------------------------------------------------- +// wxLog logging functions +// ---------------------------------------------------------------------------- + +/* static */ +void +wxLog::OnLog(wxLogLevel level, const wxString& msg, time_t t) +{ + wxLogRecordInfo info; + info.timestamp = t; +#if wxUSE_THREADS + info.threadId = wxThread::GetCurrentId(); +#endif // wxUSE_THREADS + + OnLog(level, msg, info); +} + +/* static */ +void +wxLog::OnLog(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info) +{ + // fatal errors can't be suppressed nor handled by the custom log target + // and always terminate the program + if ( level == wxLOG_FatalError ) + { + wxSafeShowMessage(wxS("Fatal Error"), msg); + + wxAbort(); + } + + wxLog *logger; + +#if wxUSE_THREADS + if ( !wxThread::IsMain() ) + { + logger = wxThreadInfo.logger; + if ( !logger ) + { + if ( ms_pLogger ) + { + // buffer the messages until they can be shown from the main + // thread + wxCriticalSectionLocker lock(GetBackgroundLogCS()); + + gs_bufferedLogRecords.push_back(wxLogRecord(level, msg, info)); + + // ensure that our Flush() will be called soon + wxWakeUpIdle(); + } + //else: we don't have any logger at all, there is no need to log + // anything + + return; + } + //else: we have a thread-specific logger, we can send messages to it + // directly + } + else +#endif // wxUSE_THREADS + { + logger = GetMainThreadActiveTarget(); + if ( !logger ) + return; + } + + logger->CallDoLogNow(level, msg, info); +} + +void +wxLog::CallDoLogNow(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info) +{ + if ( GetRepetitionCounting() ) + { + if ( msg == gs_prevLog.msg ) + { + gs_prevLog.numRepeated++; + + // nothing else to do, in particular, don't log the + // repeated message + return; + } + + LogLastRepeatIfNeeded(); + + // reset repetition counter for a new message + gs_prevLog.msg = msg; + gs_prevLog.level = level; + gs_prevLog.info = info; + } + + // handle extra data which may be passed to us by wxLogXXX() + wxString prefix, suffix; + wxUIntPtr num = 0; + if ( info.GetNumValue(wxLOG_KEY_SYS_ERROR_CODE, &num) ) + { + const long err = static_cast(num); + + suffix.Printf(_(" (error %ld: %s)"), err, wxSysErrorMsg(err)); + } + +#if wxUSE_LOG_TRACE + wxString str; + if ( level == wxLOG_Trace && info.GetStrValue(wxLOG_KEY_TRACE_MASK, &str) ) + { + prefix = "(" + str + ") "; + } +#endif // wxUSE_LOG_TRACE + + DoLogRecord(level, prefix + msg + suffix, info); +} + +void wxLog::DoLogRecord(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info) +{ +#if WXWIN_COMPATIBILITY_2_8 + // call the old DoLog() to ensure that existing custom log classes still + // work + // + // as the user code could have defined it as either taking "const char *" + // (in ANSI build) or "const wxChar *" (in ANSI/Unicode), we have no choice + // but to call both of them + DoLog(level, (const char*)msg.mb_str(), info.timestamp); + DoLog(level, (const wchar_t*)msg.wc_str(), info.timestamp); +#else // !WXWIN_COMPATIBILITY_2_8 + wxUnusedVar(info); +#endif // WXWIN_COMPATIBILITY_2_8/!WXWIN_COMPATIBILITY_2_8 + + // Use wxLogFormatter to format the message + DoLogTextAtLevel(level, m_formatter->Format (level, msg, info)); +} + +void wxLog::DoLogTextAtLevel(wxLogLevel level, const wxString& msg) +{ + // we know about debug messages (because using wxMessageOutputDebug is the + // right thing to do in 99% of all cases and also for compatibility) but + // anything else needs to be handled in the derived class + if ( level == wxLOG_Debug || level == wxLOG_Trace ) + { + wxMessageOutputDebug().Output(msg + wxS('\n')); + } + else + { + DoLogText(msg); + } +} + +void wxLog::DoLogText(const wxString& WXUNUSED(msg)) +{ + // in 2.8-compatible build the derived class might override DoLog() or + // DoLogString() instead so we can't have this assert there +#if !WXWIN_COMPATIBILITY_2_8 + wxFAIL_MSG( "must be overridden if it is called" ); +#endif // WXWIN_COMPATIBILITY_2_8 +} + +#if WXWIN_COMPATIBILITY_2_8 + +void wxLog::DoLog(wxLogLevel WXUNUSED(level), const char *szString, time_t t) +{ + DoLogString(szString, t); +} + +void wxLog::DoLog(wxLogLevel WXUNUSED(level), const wchar_t *wzString, time_t t) +{ + DoLogString(wzString, t); +} + +#endif // WXWIN_COMPATIBILITY_2_8 + +// ---------------------------------------------------------------------------- +// wxLog active target management +// ---------------------------------------------------------------------------- + +wxLog *wxLog::GetActiveTarget() +{ +#if wxUSE_THREADS + if ( !wxThread::IsMain() ) + { + // check if we have a thread-specific log target + wxLog * const logger = wxThreadInfo.logger; + + // the code below should be only executed for the main thread as + // CreateLogTarget() is not meant for auto-creating log targets for + // worker threads so skip it in any case + return logger ? logger : ms_pLogger; + } +#endif // wxUSE_THREADS + + return GetMainThreadActiveTarget(); +} + +/* static */ +wxLog *wxLog::GetMainThreadActiveTarget() +{ + if ( ms_bAutoCreate && ms_pLogger == NULL ) { + // prevent infinite recursion if someone calls wxLogXXX() from + // wxApp::CreateLogTarget() + static bool s_bInGetActiveTarget = false; + if ( !s_bInGetActiveTarget ) { + s_bInGetActiveTarget = true; + + // ask the application to create a log target for us + if ( wxTheApp != NULL ) + ms_pLogger = wxTheApp->GetTraits()->CreateLogTarget(); + else + ms_pLogger = new wxLogOutputBest; + + s_bInGetActiveTarget = false; + + // do nothing if it fails - what can we do? + } + } + + return ms_pLogger; +} + +wxLog *wxLog::SetActiveTarget(wxLog *pLogger) +{ + if ( ms_pLogger != NULL ) { + // flush the old messages before changing because otherwise they might + // get lost later if this target is not restored + ms_pLogger->Flush(); + } + + wxLog *pOldLogger = ms_pLogger; + ms_pLogger = pLogger; + + return pOldLogger; +} + +#if wxUSE_THREADS +/* static */ +wxLog *wxLog::SetThreadActiveTarget(wxLog *logger) +{ + wxASSERT_MSG( !wxThread::IsMain(), "use SetActiveTarget() for main thread" ); + + wxLog * const oldLogger = wxThreadInfo.logger; + if ( oldLogger ) + oldLogger->Flush(); + + wxThreadInfo.logger = logger; + + return oldLogger; +} +#endif // wxUSE_THREADS + +void wxLog::DontCreateOnDemand() +{ + ms_bAutoCreate = false; + + // this is usually called at the end of the program and we assume that it + // is *always* called at the end - so we free memory here to avoid false + // memory leak reports from wxWin memory tracking code + ClearTraceMasks(); +} + +void wxLog::DoCreateOnDemand() +{ + ms_bAutoCreate = true; +} + +// ---------------------------------------------------------------------------- +// wxLog components levels +// ---------------------------------------------------------------------------- + +/* static */ +void wxLog::SetComponentLevel(const wxString& component, wxLogLevel level) +{ + if ( component.empty() ) + { + SetLogLevel(level); + } + else + { + wxCRIT_SECT_LOCKER(lock, GetLevelsCS()); + + GetComponentLevels()[component] = level; + } +} + +/* static */ +wxLogLevel wxLog::GetComponentLevel(wxString component) +{ + wxCRIT_SECT_LOCKER(lock, GetLevelsCS()); + + const wxStringToNumHashMap& componentLevels = GetComponentLevels(); + while ( !component.empty() ) + { + wxStringToNumHashMap::const_iterator + it = componentLevels.find(component); + if ( it != componentLevels.end() ) + return static_cast(it->second); + + component = component.BeforeLast('/'); + } + + return GetLogLevel(); +} + +// ---------------------------------------------------------------------------- +// wxLog trace masks +// ---------------------------------------------------------------------------- + +namespace +{ + +// because IsAllowedTraceMask() may be called during static initialization +// (this is not recommended but it may still happen, see #11592) we can't use a +// simple static variable which might be not initialized itself just yet to +// store the trace masks, but need this accessor function which will ensure +// that the variable is always correctly initialized before being accessed +// +// notice that this doesn't make accessing it MT-safe, of course, you need to +// serialize accesses to it using GetTraceMaskCS() for this +wxArrayString& TraceMasks() +{ + static wxArrayString s_traceMasks; + + return s_traceMasks; +} + +} // anonymous namespace + +/* static */ const wxArrayString& wxLog::GetTraceMasks() +{ + // because of this function signature (it returns a reference, not the + // object), it is inherently MT-unsafe so there is no need to acquire the + // lock here anyhow + + return TraceMasks(); +} + +void wxLog::AddTraceMask(const wxString& str) +{ + wxCRIT_SECT_LOCKER(lock, GetTraceMaskCS()); + + TraceMasks().push_back(str); +} + +void wxLog::RemoveTraceMask(const wxString& str) +{ + wxCRIT_SECT_LOCKER(lock, GetTraceMaskCS()); + + int index = TraceMasks().Index(str); + if ( index != wxNOT_FOUND ) + TraceMasks().RemoveAt((size_t)index); +} + +void wxLog::ClearTraceMasks() +{ + wxCRIT_SECT_LOCKER(lock, GetTraceMaskCS()); + + TraceMasks().Clear(); +} + +/*static*/ bool wxLog::IsAllowedTraceMask(const wxString& mask) +{ + wxCRIT_SECT_LOCKER(lock, GetTraceMaskCS()); + + const wxArrayString& masks = GetTraceMasks(); + for ( wxArrayString::const_iterator it = masks.begin(), + en = masks.end(); + it != en; + ++it ) + { + if ( *it == mask) + return true; + } + + return false; +} + +// ---------------------------------------------------------------------------- +// wxLog miscellaneous other methods +// ---------------------------------------------------------------------------- + +#if wxUSE_DATETIME + +void wxLog::TimeStamp(wxString *str) +{ + if ( !ms_timestamp.empty() ) + { + *str = wxDateTime::UNow().Format(ms_timestamp); + *str += wxS(": "); + } +} + +void wxLog::TimeStamp(wxString *str, time_t t) +{ + if ( !ms_timestamp.empty() ) + { + *str = wxDateTime(t).Format(ms_timestamp); + *str += wxS(": "); + } +} + +#else // !wxUSE_DATETIME + +void wxLog::TimeStamp(wxString*) +{ +} + +void wxLog::TimeStamp(wxString*, time_t) +{ +} + +#endif // wxUSE_DATETIME/!wxUSE_DATETIME + +#if wxUSE_THREADS + +void wxLog::FlushThreadMessages() +{ + // check if we have queued messages from other threads + wxLogRecords bufferedLogRecords; + + { + wxCriticalSectionLocker lock(GetBackgroundLogCS()); + bufferedLogRecords.swap(gs_bufferedLogRecords); + + // release the lock now to not keep it while we are logging the + // messages below, allowing background threads to run + } + + if ( !bufferedLogRecords.empty() ) + { + for ( wxLogRecords::const_iterator it = bufferedLogRecords.begin(); + it != bufferedLogRecords.end(); + ++it ) + { + CallDoLogNow(it->level, it->msg, it->info); + } + } +} + +/* static */ +bool wxLog::IsThreadLoggingEnabled() +{ + return !wxThreadInfo.loggingDisabled; +} + +/* static */ +bool wxLog::EnableThreadLogging(bool enable) +{ + const bool wasEnabled = !wxThreadInfo.loggingDisabled; + wxThreadInfo.loggingDisabled = !enable; + return wasEnabled; +} + +#endif // wxUSE_THREADS + +wxLogFormatter *wxLog::SetFormatter(wxLogFormatter* formatter) +{ + wxLogFormatter* formatterOld = m_formatter; + m_formatter = formatter ? formatter : new wxLogFormatter; + + return formatterOld; +} + +void wxLog::Flush() +{ + LogLastRepeatIfNeeded(); +} + +/* static */ +void wxLog::FlushActive() +{ + if ( ms_suspendCount ) + return; + + wxLog * const log = GetActiveTarget(); + if ( log ) + { +#if wxUSE_THREADS + if ( wxThread::IsMain() ) + log->FlushThreadMessages(); +#endif // wxUSE_THREADS + + log->Flush(); + } +} + +// ---------------------------------------------------------------------------- +// wxLogBuffer implementation +// ---------------------------------------------------------------------------- + +void wxLogBuffer::Flush() +{ + wxLog::Flush(); + + if ( !m_str.empty() ) + { + wxMessageOutputBest out; + out.Printf(wxS("%s"), m_str.c_str()); + m_str.clear(); + } +} + +void wxLogBuffer::DoLogTextAtLevel(wxLogLevel level, const wxString& msg) +{ + // don't put debug messages in the buffer, we don't want to show + // them to the user in a msg box, log them immediately + switch ( level ) + { + case wxLOG_Debug: + case wxLOG_Trace: + wxLog::DoLogTextAtLevel(level, msg); + break; + + default: + m_str << msg << wxS("\n"); + } +} + +// ---------------------------------------------------------------------------- +// wxLogStderr class implementation +// ---------------------------------------------------------------------------- + +wxLogStderr::wxLogStderr(FILE *fp) +{ + if ( fp == NULL ) + m_fp = stderr; + else + m_fp = fp; +} + +void wxLogStderr::DoLogText(const wxString& msg) +{ + // First send it to stderr, even if we don't have it (e.g. in a Windows GUI + // application under) it's not a problem to try to use it and it's easier + // than determining whether we do have it or not. + wxMessageOutputStderr(m_fp).Output(msg); + + // under GUI systems such as Windows or Mac, programs usually don't have + // stderr at all, so show the messages also somewhere else, typically in + // the debugger window so that they go at least somewhere instead of being + // simply lost + if ( m_fp == stderr ) + { + wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + if ( traits && !traits->HasStderr() ) + { + wxMessageOutputDebug().Output(msg + wxS('\n')); + } + } +} + +// ---------------------------------------------------------------------------- +// wxLogStream implementation +// ---------------------------------------------------------------------------- + +#if wxUSE_STD_IOSTREAM +#include "wx/ioswrap.h" +wxLogStream::wxLogStream(wxSTD ostream *ostr) +{ + if ( ostr == NULL ) + m_ostr = &wxSTD cerr; + else + m_ostr = ostr; +} + +void wxLogStream::DoLogText(const wxString& msg) +{ + (*m_ostr) << msg << wxSTD endl; +} +#endif // wxUSE_STD_IOSTREAM + +// ---------------------------------------------------------------------------- +// wxLogChain +// ---------------------------------------------------------------------------- + +wxLogChain::wxLogChain(wxLog *logger) +{ + m_bPassMessages = true; + + m_logNew = logger; + + // Notice that we use GetActiveTarget() here instead of directly calling + // SetActiveTarget() to trigger wxLog auto-creation: if we're created as + // the first logger, we should still chain with the standard, implicit and + // possibly still not created standard logger instead of disabling normal + // logging entirely. + m_logOld = wxLog::GetActiveTarget(); + wxLog::SetActiveTarget(this); +} + +wxLogChain::~wxLogChain() +{ + wxLog::SetActiveTarget(m_logOld); + + if ( m_logNew != this ) + delete m_logNew; +} + +void wxLogChain::SetLog(wxLog *logger) +{ + if ( m_logNew != this ) + delete m_logNew; + + m_logNew = logger; +} + +void wxLogChain::Flush() +{ + if ( m_logOld ) + m_logOld->Flush(); + + // be careful to avoid infinite recursion + if ( m_logNew && m_logNew != this ) + m_logNew->Flush(); +} + +void wxLogChain::DoLogRecord(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info) +{ + // let the previous logger show it + if ( m_logOld && IsPassingMessages() ) + m_logOld->LogRecord(level, msg, info); + + // and also send it to the new one + if ( m_logNew ) + { + // don't call m_logNew->LogRecord() to avoid infinite recursion when + // m_logNew is this object itself + if ( m_logNew != this ) + m_logNew->LogRecord(level, msg, info); + else + wxLog::DoLogRecord(level, msg, info); + } +} + +#ifdef __VISUALC__ + // "'this' : used in base member initializer list" - so what? + #pragma warning(disable:4355) +#endif // VC++ + +// ---------------------------------------------------------------------------- +// wxLogInterposer +// ---------------------------------------------------------------------------- + +wxLogInterposer::wxLogInterposer() + : wxLogChain(this) +{ +} + +// ---------------------------------------------------------------------------- +// wxLogInterposerTemp +// ---------------------------------------------------------------------------- + +wxLogInterposerTemp::wxLogInterposerTemp() + : wxLogChain(this) +{ + DetachOldLog(); +} + +#ifdef __VISUALC__ + #pragma warning(default:4355) +#endif // VC++ + +// ============================================================================ +// Global functions/variables +// ============================================================================ + +// ---------------------------------------------------------------------------- +// static variables +// ---------------------------------------------------------------------------- + +bool wxLog::ms_bRepetCounting = false; + +wxLog *wxLog::ms_pLogger = NULL; +bool wxLog::ms_doLog = true; +bool wxLog::ms_bAutoCreate = true; +bool wxLog::ms_bVerbose = false; + +wxLogLevel wxLog::ms_logLevel = wxLOG_Max; // log everything by default + +size_t wxLog::ms_suspendCount = 0; + +wxString wxLog::ms_timestamp(wxS("%X")); // time only, no date + +#if WXWIN_COMPATIBILITY_2_8 +wxTraceMask wxLog::ms_ulTraceMask = (wxTraceMask)0; +#endif // wxDEBUG_LEVEL + +// ---------------------------------------------------------------------------- +// stdout error logging helper +// ---------------------------------------------------------------------------- + +// helper function: wraps the message and justifies it under given position +// (looks more pretty on the terminal). Also adds newline at the end. +// +// TODO this is now disabled until I find a portable way of determining the +// terminal window size (ok, I found it but does anybody really cares?) +#ifdef LOG_PRETTY_WRAP +static void wxLogWrap(FILE *f, const char *pszPrefix, const char *psz) +{ + size_t nMax = 80; // FIXME + size_t nStart = strlen(pszPrefix); + fputs(pszPrefix, f); + + size_t n; + while ( *psz != '\0' ) { + for ( n = nStart; (n < nMax) && (*psz != '\0'); n++ ) + putc(*psz++, f); + + // wrapped? + if ( *psz != '\0' ) { + /*putc('\n', f);*/ + for ( n = 0; n < nStart; n++ ) + putc(' ', f); + + // as we wrapped, squeeze all white space + while ( isspace(*psz) ) + psz++; + } + } + + putc('\n', f); +} +#endif //LOG_PRETTY_WRAP + +// ---------------------------------------------------------------------------- +// error code/error message retrieval functions +// ---------------------------------------------------------------------------- + +// get error code from syste +unsigned long wxSysErrorCode() +{ +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) + return ::GetLastError(); +#else //Unix + return errno; +#endif //Win/Unix +} + +// get error message from system +const wxChar *wxSysErrorMsg(unsigned long nErrCode) +{ + if ( nErrCode == 0 ) + nErrCode = wxSysErrorCode(); + +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) + static wxChar s_szBuf[1024]; + + // get error message from system + LPVOID lpMsgBuf; + if ( ::FormatMessage + ( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + nErrCode, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR)&lpMsgBuf, + 0, + NULL + ) == 0 ) + { + // if this happens, something is seriously wrong, so don't use _() here + // for safety + wxSprintf(s_szBuf, wxS("unknown error %lx"), nErrCode); + return s_szBuf; + } + + + // copy it to our buffer and free memory + // Crashes on SmartPhone (FIXME) +#if !defined(__SMARTPHONE__) /* of WinCE */ + if( lpMsgBuf != 0 ) + { + wxStrlcpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf)); + + LocalFree(lpMsgBuf); + + // returned string is capitalized and ended with '\r\n' - bad + s_szBuf[0] = (wxChar)wxTolower(s_szBuf[0]); + size_t len = wxStrlen(s_szBuf); + if ( len > 0 ) { + // truncate string + if ( s_szBuf[len - 2] == wxS('\r') ) + s_szBuf[len - 2] = wxS('\0'); + } + } + else +#endif // !__SMARTPHONE__ + { + s_szBuf[0] = wxS('\0'); + } + + return s_szBuf; +#else // !__WINDOWS__ + #if wxUSE_UNICODE + static wchar_t s_wzBuf[1024]; + wxConvCurrent->MB2WC(s_wzBuf, strerror((int)nErrCode), + WXSIZEOF(s_wzBuf) - 1); + return s_wzBuf; + #else + return strerror((int)nErrCode); + #endif +#endif // __WINDOWS__/!__WINDOWS__ +} + +#endif // wxUSE_LOG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/longlong.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/longlong.cpp new file mode 100644 index 0000000000..e57392b788 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/longlong.cpp @@ -0,0 +1,1378 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/longlong.cpp +// Purpose: implementation of wxLongLongNative +// Author: Jeffrey C. Ollie , Vadim Zeitlin +// Remarks: this class is not public in wxWidgets 2.0! It is intentionally +// not documented and is for private use only. +// Modified by: +// Created: 10.02.99 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// headers +// ============================================================================ + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_LONGLONG + +#include "wx/longlong.h" + +#ifndef WX_PRECOMP + #include "wx/math.h" // for fabs() +#endif + +#if wxUSE_STREAMS + #include "wx/txtstrm.h" +#endif + +#include // for memset() + +#include "wx/ioswrap.h" + +// ============================================================================ +// implementation +// ============================================================================ + +#if wxUSE_LONGLONG_NATIVE + +// ---------------------------------------------------------------------------- +// misc +// ---------------------------------------------------------------------------- + +void *wxLongLongNative::asArray() const +{ + static unsigned char temp[8]; + + temp[0] = wx_truncate_cast(unsigned char, ((m_ll >> 56) & 0xFF)); + temp[1] = wx_truncate_cast(unsigned char, ((m_ll >> 48) & 0xFF)); + temp[2] = wx_truncate_cast(unsigned char, ((m_ll >> 40) & 0xFF)); + temp[3] = wx_truncate_cast(unsigned char, ((m_ll >> 32) & 0xFF)); + temp[4] = wx_truncate_cast(unsigned char, ((m_ll >> 24) & 0xFF)); + temp[5] = wx_truncate_cast(unsigned char, ((m_ll >> 16) & 0xFF)); + temp[6] = wx_truncate_cast(unsigned char, ((m_ll >> 8) & 0xFF)); + temp[7] = wx_truncate_cast(unsigned char, ((m_ll >> 0) & 0xFF)); + + return temp; +} + +void *wxULongLongNative::asArray() const +{ + static unsigned char temp[8]; + + temp[0] = wx_truncate_cast(unsigned char, ((m_ll >> 56) & 0xFF)); + temp[1] = wx_truncate_cast(unsigned char, ((m_ll >> 48) & 0xFF)); + temp[2] = wx_truncate_cast(unsigned char, ((m_ll >> 40) & 0xFF)); + temp[3] = wx_truncate_cast(unsigned char, ((m_ll >> 32) & 0xFF)); + temp[4] = wx_truncate_cast(unsigned char, ((m_ll >> 24) & 0xFF)); + temp[5] = wx_truncate_cast(unsigned char, ((m_ll >> 16) & 0xFF)); + temp[6] = wx_truncate_cast(unsigned char, ((m_ll >> 8) & 0xFF)); + temp[7] = wx_truncate_cast(unsigned char, ((m_ll >> 0) & 0xFF)); + + return temp; +} + +#if wxUSE_LONGLONG_WX +wxLongLongNative::wxLongLongNative(wxLongLongWx ll) +{ + // assign first to avoid precision loss! + m_ll = ll.GetHi(); + m_ll <<= 32; + m_ll |= ll.GetLo(); +} + +wxLongLongNative& wxLongLongNative::operator=(wxLongLongWx ll) +{ + // assign first to avoid precision loss! + m_ll = ll.GetHi(); + m_ll <<= 32; + m_ll |= ll.GetLo(); + return *this; +} + +wxLongLongNative& wxLongLongNative::operator=(const class wxULongLongWx &ll) +{ + // assign first to avoid precision loss! + m_ll = ll.GetHi(); + m_ll <<= 32; + m_ll |= ll.GetLo(); + return *this; +} + +wxULongLongNative::wxULongLongNative(const class wxULongLongWx &ll) +{ + // assign first to avoid precision loss! + m_ll = ll.GetHi(); + m_ll <<= 32; + m_ll |= ((unsigned long) ll.GetLo()); +} + +wxULongLongNative& wxULongLongNative::operator=(wxLongLongWx ll) +{ + // assign first to avoid precision loss! + m_ll = ll.GetHi(); + m_ll <<= 32; + m_ll |= ((unsigned long) ll.GetLo()); + return *this; +} + +wxULongLongNative& wxULongLongNative::operator=(const class wxULongLongWx &ll) +{ + // assign first to avoid precision loss! + m_ll = ll.GetHi(); + m_ll <<= 32; + m_ll |= ((unsigned long) ll.GetLo()); + return *this; +} +#endif + +#ifdef __VISUALC6__ +double wxULongLongNative::ToDouble() const +{ + // Work around the problem of casting unsigned __int64 to double in VC6 + // (which for unknown reasons only manifests itself in DLL builds, i.e. + // when using /MD). + static const __int64 int64_t_max = 9223372036854775807i64; + if ( m_ll <= int64_t_max ) + return wx_truncate_cast(double, (wxLongLong_t)m_ll); + + double d = wx_truncate_cast(double, int64_t_max); + d += (__int64)(m_ll - int64_t_max - 1); // The cast is safe because of -1 + return d + 1; +} +#endif // __VISUALC6__ + +#endif // wxUSE_LONGLONG_NATIVE + +// ============================================================================ +// wxLongLongWx: emulation of 'long long' using 2 longs +// ============================================================================ + +#if wxUSE_LONGLONG_WX + +// Set value from unsigned wxULongLongWx +wxLongLongWx &wxLongLongWx::operator=(const class wxULongLongWx &ll) +{ + m_hi = (unsigned long) ll.GetHi(); + m_lo = ll.GetLo(); + return *this; +} + +// assignment +wxLongLongWx& wxLongLongWx::Assign(double d) +{ + bool positive = d >= 0; + d = fabs(d); + if ( d <= ULONG_MAX ) + { + m_hi = 0; + m_lo = (long)d; + } + else + { + m_hi = (unsigned long)(d / (1.0 + (double)ULONG_MAX)); + m_lo = (unsigned long)(d - ((double)m_hi * (1.0 + (double)ULONG_MAX))); + } + +#ifdef wxLONGLONG_TEST_MODE + m_ll = (wxLongLong_t)d; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + if ( !positive ) + Negate(); + + return *this; +} + +double wxLongLongWx::ToDouble() const +{ + double d = m_hi; + d *= 1.0 + (double)ULONG_MAX; + d += m_lo; + +#ifdef wxLONGLONG_TEST_MODE + wxASSERT( d == m_ll ); +#endif // wxLONGLONG_TEST_MODE + + return d; +} + +double wxULongLongWx::ToDouble() const +{ + unsigned double d = m_hi; + d *= 1.0 + (double)ULONG_MAX; + d += m_lo; + +#ifdef wxLONGLONG_TEST_MODE + wxASSERT( d == m_ll ); +#endif // wxLONGLONG_TEST_MODE + + return d; +} + +wxLongLongWx wxLongLongWx::operator<<(int shift) const +{ + wxLongLongWx ll(*this); + ll <<= shift; + + return ll; +} + +wxULongLongWx wxULongLongWx::operator<<(int shift) const +{ + wxULongLongWx ll(*this); + ll <<= shift; + + return ll; +} + +wxLongLongWx& wxLongLongWx::operator<<=(int shift) +{ + if (shift != 0) + { + if (shift < 32) + { + m_hi <<= shift; + m_hi |= m_lo >> (32 - shift); + m_lo <<= shift; + } + else + { + m_hi = m_lo << (shift - 32); + m_lo = 0; + } + } + +#ifdef wxLONGLONG_TEST_MODE + m_ll <<= shift; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator<<=(int shift) +{ + if (shift != 0) + { + if (shift < 32) + { + m_hi <<= shift; + m_hi |= m_lo >> (32 - shift); + m_lo <<= shift; + } + else + { + m_hi = m_lo << (shift - 32); + m_lo = 0; + } + } + +#ifdef wxLONGLONG_TEST_MODE + m_ll <<= shift; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxLongLongWx wxLongLongWx::operator>>(int shift) const +{ + wxLongLongWx ll(*this); + ll >>= shift; + + return ll; +} + +wxULongLongWx wxULongLongWx::operator>>(int shift) const +{ + wxULongLongWx ll(*this); + ll >>= shift; + + return ll; +} + +wxLongLongWx& wxLongLongWx::operator>>=(int shift) +{ + if (shift != 0) + { + if (shift < 32) + { + m_lo >>= shift; + m_lo |= m_hi << (32 - shift); + m_hi >>= shift; + } + else + { + m_lo = m_hi >> (shift - 32); + m_hi = (m_hi < 0 ? -1L : 0); + } + } + +#ifdef wxLONGLONG_TEST_MODE + m_ll >>= shift; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator>>=(int shift) +{ + if (shift != 0) + { + if (shift < 32) + { + m_lo >>= shift; + m_lo |= m_hi << (32 - shift); + m_hi >>= shift; + } + else + { + m_lo = m_hi >> (shift - 32); + m_hi = 0; + } + } + +#ifdef wxLONGLONG_TEST_MODE + m_ll >>= shift; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxLongLongWx wxLongLongWx::operator+(const wxLongLongWx& ll) const +{ + wxLongLongWx res(*this); + res += ll; + + return res; +} + +wxULongLongWx wxULongLongWx::operator+(const wxULongLongWx& ll) const +{ + wxULongLongWx res(*this); + res += ll; + + return res; +} + +wxLongLongWx wxLongLongWx::operator+(long l) const +{ + wxLongLongWx res(*this); + res += l; + + return res; +} + +wxULongLongWx wxULongLongWx::operator+(unsigned long l) const +{ + wxULongLongWx res(*this); + res += l; + + return res; +} + +wxLongLongWx& wxLongLongWx::operator+=(const wxLongLongWx& ll) +{ + unsigned long previous = m_lo; + + m_lo += ll.m_lo; + m_hi += ll.m_hi; + + if ((m_lo < previous) || (m_lo < ll.m_lo)) + m_hi++; + +#ifdef wxLONGLONG_TEST_MODE + m_ll += ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator+=(const wxULongLongWx& ll) +{ + unsigned long previous = m_lo; + + m_lo += ll.m_lo; + m_hi += ll.m_hi; + + if ((m_lo < previous) || (m_lo < ll.m_lo)) + m_hi++; + +#ifdef wxLONGLONG_TEST_MODE + m_ll += ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxLongLongWx& wxLongLongWx::operator+=(long l) +{ + unsigned long previous = m_lo; + + m_lo += l; + if (l < 0) + m_hi += -1l; + + if ((m_lo < previous) || (m_lo < (unsigned long)l)) + m_hi++; + +#ifdef wxLONGLONG_TEST_MODE + m_ll += l; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator+=(unsigned long l) +{ + unsigned long previous = m_lo; + + m_lo += l; + + if ((m_lo < previous) || (m_lo < l)) + m_hi++; + +#ifdef wxLONGLONG_TEST_MODE + m_ll += l; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +// pre increment +wxLongLongWx& wxLongLongWx::operator++() +{ + m_lo++; + if (m_lo == 0) + m_hi++; + +#ifdef wxLONGLONG_TEST_MODE + m_ll++; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator++() +{ + m_lo++; + if (m_lo == 0) + m_hi++; + +#ifdef wxLONGLONG_TEST_MODE + m_ll++; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +// negation +wxLongLongWx wxLongLongWx::operator-() const +{ + wxLongLongWx res(*this); + res.Negate(); + + return res; +} + +wxLongLongWx& wxLongLongWx::Negate() +{ + m_hi = ~m_hi; + m_lo = ~m_lo; + + m_lo++; + if ( m_lo == 0 ) + m_hi++; + +#ifdef wxLONGLONG_TEST_MODE + m_ll = -m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +// subtraction + +wxLongLongWx wxLongLongWx::operator-(const wxLongLongWx& ll) const +{ + wxLongLongWx res(*this); + res -= ll; + + return res; +} + +wxLongLongWx wxULongLongWx::operator-(const wxULongLongWx& ll) const +{ + wxASSERT(m_hi <= LONG_MAX ); + wxASSERT(ll.m_hi <= LONG_MAX ); + + wxLongLongWx res( (long)m_hi , m_lo ); + wxLongLongWx op( (long)ll.m_hi , ll.m_lo ); + res -= op; + + return res; +} + +wxLongLongWx& wxLongLongWx::operator-=(const wxLongLongWx& ll) +{ + unsigned long previous = m_lo; + + m_lo -= ll.m_lo; + m_hi -= ll.m_hi; + + if (previous < ll.m_lo) + m_hi--; + +#ifdef wxLONGLONG_TEST_MODE + m_ll -= ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator-=(const wxULongLongWx& ll) +{ + unsigned long previous = m_lo; + + m_lo -= ll.m_lo; + m_hi -= ll.m_hi; + + if (previous < ll.m_lo) + m_hi--; + +#ifdef wxLONGLONG_TEST_MODE + m_ll -= ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +// pre decrement +wxLongLongWx& wxLongLongWx::operator--() +{ + m_lo--; + if (m_lo == 0xFFFFFFFF) + m_hi--; + +#ifdef wxLONGLONG_TEST_MODE + m_ll--; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator--() +{ + m_lo--; + if (m_lo == 0xFFFFFFFF) + m_hi--; + +#ifdef wxLONGLONG_TEST_MODE + m_ll--; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +// comparison operators + +bool wxLongLongWx::operator<(const wxLongLongWx& ll) const +{ + if ( m_hi < ll.m_hi ) + return true; + else if ( m_hi == ll.m_hi ) + return m_lo < ll.m_lo; + else + return false; +} + +bool wxULongLongWx::operator<(const wxULongLongWx& ll) const +{ + if ( m_hi < ll.m_hi ) + return true; + else if ( m_hi == ll.m_hi ) + return m_lo < ll.m_lo; + else + return false; +} + +bool wxLongLongWx::operator>(const wxLongLongWx& ll) const +{ + if ( m_hi > ll.m_hi ) + return true; + else if ( m_hi == ll.m_hi ) + return m_lo > ll.m_lo; + else + return false; +} + +bool wxULongLongWx::operator>(const wxULongLongWx& ll) const +{ + if ( m_hi > ll.m_hi ) + return true; + else if ( m_hi == ll.m_hi ) + return m_lo > ll.m_lo; + else + return false; +} + +// bitwise operators + +wxLongLongWx wxLongLongWx::operator&(const wxLongLongWx& ll) const +{ + return wxLongLongWx(m_hi & ll.m_hi, m_lo & ll.m_lo); +} + +wxULongLongWx wxULongLongWx::operator&(const wxULongLongWx& ll) const +{ + return wxULongLongWx(m_hi & ll.m_hi, m_lo & ll.m_lo); +} + +wxLongLongWx wxLongLongWx::operator|(const wxLongLongWx& ll) const +{ + return wxLongLongWx(m_hi | ll.m_hi, m_lo | ll.m_lo); +} + +wxULongLongWx wxULongLongWx::operator|(const wxULongLongWx& ll) const +{ + return wxULongLongWx(m_hi | ll.m_hi, m_lo | ll.m_lo); +} + +wxLongLongWx wxLongLongWx::operator^(const wxLongLongWx& ll) const +{ + return wxLongLongWx(m_hi ^ ll.m_hi, m_lo ^ ll.m_lo); +} + +wxULongLongWx wxULongLongWx::operator^(const wxULongLongWx& ll) const +{ + return wxULongLongWx(m_hi ^ ll.m_hi, m_lo ^ ll.m_lo); +} + +wxLongLongWx& wxLongLongWx::operator&=(const wxLongLongWx& ll) +{ + m_lo &= ll.m_lo; + m_hi &= ll.m_hi; + +#ifdef wxLONGLONG_TEST_MODE + m_ll &= ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator&=(const wxULongLongWx& ll) +{ + m_lo &= ll.m_lo; + m_hi &= ll.m_hi; + +#ifdef wxLONGLONG_TEST_MODE + m_ll &= ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxLongLongWx& wxLongLongWx::operator|=(const wxLongLongWx& ll) +{ + m_lo |= ll.m_lo; + m_hi |= ll.m_hi; + +#ifdef wxLONGLONG_TEST_MODE + m_ll |= ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator|=(const wxULongLongWx& ll) +{ + m_lo |= ll.m_lo; + m_hi |= ll.m_hi; + +#ifdef wxLONGLONG_TEST_MODE + m_ll |= ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxLongLongWx& wxLongLongWx::operator^=(const wxLongLongWx& ll) +{ + m_lo ^= ll.m_lo; + m_hi ^= ll.m_hi; + +#ifdef wxLONGLONG_TEST_MODE + m_ll ^= ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator^=(const wxULongLongWx& ll) +{ + m_lo ^= ll.m_lo; + m_hi ^= ll.m_hi; + +#ifdef wxLONGLONG_TEST_MODE + m_ll ^= ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxLongLongWx wxLongLongWx::operator~() const +{ + return wxLongLongWx(~m_hi, ~m_lo); +} + +wxULongLongWx wxULongLongWx::operator~() const +{ + return wxULongLongWx(~m_hi, ~m_lo); +} + +// multiplication + +wxLongLongWx wxLongLongWx::operator*(const wxLongLongWx& ll) const +{ + wxLongLongWx res(*this); + res *= ll; + + return res; +} + +wxULongLongWx wxULongLongWx::operator*(const wxULongLongWx& ll) const +{ + wxULongLongWx res(*this); + res *= ll; + + return res; +} + +wxLongLongWx& wxLongLongWx::operator*=(const wxLongLongWx& ll) +{ + wxLongLongWx t(m_hi, m_lo); + wxLongLongWx q(ll.m_hi, ll.m_lo); + + m_hi = m_lo = 0; + +#ifdef wxLONGLONG_TEST_MODE + wxLongLong_t llOld = m_ll; + m_ll = 0; +#endif // wxLONGLONG_TEST_MODE + + int counter = 0; + do + { + if ((q.m_lo & 1) != 0) + *this += t; + q >>= 1; + t <<= 1; + counter++; + } + while ((counter < 64) && ((q.m_hi != 0) || (q.m_lo != 0))); + +#ifdef wxLONGLONG_TEST_MODE + m_ll = llOld * ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator*=(const wxULongLongWx& ll) +{ + wxULongLongWx t(m_hi, m_lo); + wxULongLongWx q(ll.m_hi, ll.m_lo); + + m_hi = m_lo = 0; + +#ifdef wxLONGLONG_TEST_MODE + wxULongLong_t llOld = m_ll; + m_ll = 0; +#endif // wxLONGLONG_TEST_MODE + + int counter = 0; + do + { + if ((q.m_lo & 1) != 0) + *this += t; + q >>= 1; + t <<= 1; + counter++; + } + while ((counter < 64) && ((q.m_hi != 0) || (q.m_lo != 0))); + +#ifdef wxLONGLONG_TEST_MODE + m_ll = llOld * ll.m_ll; + + Check(); +#endif // wxLONGLONG_TEST_MODE + + return *this; +} + +// division + +#define IS_MSB_SET(ll) ((ll.GetHi()) & (1 << (8*sizeof(long) - 1))) + +void wxLongLongWx::Divide(const wxLongLongWx& divisorIn, + wxLongLongWx& quotient, + wxLongLongWx& remainderIO) const +{ + if ((divisorIn.m_lo == 0) && (divisorIn.m_hi == 0)) + { + // provoke division by zero error and silence the compilers warnings + // about an expression without effect and unused variable + long dummy = divisorIn.m_lo/divisorIn.m_hi; + dummy += 0; + } + + // VZ: I'm writing this in a hurry and it's surely not the fastest way to + // do this - any improvements are more than welcome + // + // code inspired by the snippet at + // http://www.bearcave.com/software/divide.htm + // + // Copyright notice: + // + // Use of this program, for any purpose, is granted the author, Ian + // Kaplan, as long as this copyright notice is included in the source + // code or any source code derived from this program. The user assumes + // all responsibility for using this code. + + // init everything + wxULongLongWx dividend, divisor, remainder; + + quotient = 0l; + remainder = 0l; + + // always do unsigned division and adjust the signs later: in C integer + // division, the sign of the remainder is the same as the sign of the + // dividend, while the sign of the quotient is the product of the signs of + // the dividend and divisor. Of course, we also always have + // + // dividend = quotient*divisor + remainder + // + // with 0 <= abs(remainder) < abs(divisor) + bool negRemainder = GetHi() < 0; + bool negQuotient = false; // assume positive + if ( GetHi() < 0 ) + { + negQuotient = !negQuotient; + dividend = -*this; + } else { + dividend = *this; + } + if ( divisorIn.GetHi() < 0 ) + { + negQuotient = !negQuotient; + divisor = -divisorIn; + } else { + divisor = divisorIn; + } + + // check for some particular cases + if ( divisor > dividend ) + { + remainder = dividend; + } + else if ( divisor == dividend ) + { + quotient = 1l; + } + else + { + // here: dividend > divisor and both are positive: do unsigned division + size_t nBits = 64u; + wxLongLongWx d; + + while ( remainder < divisor ) + { + remainder <<= 1; + if ( IS_MSB_SET(dividend) ) + { + remainder |= 1; + } + + d = dividend; + dividend <<= 1; + + nBits--; + } + + // undo the last loop iteration + dividend = d; + remainder >>= 1; + nBits++; + + for ( size_t i = 0; i < nBits; i++ ) + { + remainder <<= 1; + if ( IS_MSB_SET(dividend) ) + { + remainder |= 1; + } + + wxLongLongWx t = remainder - divisor; + dividend <<= 1; + quotient <<= 1; + if ( !IS_MSB_SET(t) ) + { + quotient |= 1; + + remainder = t; + } + } + } + + remainderIO = remainder; + + // adjust signs + if ( negRemainder ) + { + remainderIO = -remainderIO; + } + + if ( negQuotient ) + { + quotient = -quotient; + } +} + +void wxULongLongWx::Divide(const wxULongLongWx& divisorIn, + wxULongLongWx& quotient, + wxULongLongWx& remainder) const +{ + if ((divisorIn.m_lo == 0) && (divisorIn.m_hi == 0)) + { + // provoke division by zero error and silence the compilers warnings + // about an expression without effect and unused variable + unsigned long dummy = divisorIn.m_lo/divisorIn.m_hi; + dummy += 0; + } + + // VZ: I'm writing this in a hurry and it's surely not the fastest way to + // do this - any improvements are more than welcome + // + // code inspired by the snippet at + // http://www.bearcave.com/software/divide.htm + // + // Copyright notice: + // + // Use of this program, for any purpose, is granted the author, Ian + // Kaplan, as long as this copyright notice is included in the source + // code or any source code derived from this program. The user assumes + // all responsibility for using this code. + + // init everything + wxULongLongWx dividend = *this, + divisor = divisorIn; + + quotient = 0l; + remainder = 0l; + + // check for some particular cases + if ( divisor > dividend ) + { + remainder = dividend; + } + else if ( divisor == dividend ) + { + quotient = 1l; + } + else + { + // here: dividend > divisor + size_t nBits = 64u; + wxULongLongWx d; + + while ( remainder < divisor ) + { + remainder <<= 1; + if ( IS_MSB_SET(dividend) ) + { + remainder |= 1; + } + + d = dividend; + dividend <<= 1; + + nBits--; + } + + // undo the last loop iteration + dividend = d; + remainder >>= 1; + nBits++; + + for ( size_t i = 0; i < nBits; i++ ) + { + remainder <<= 1; + if ( IS_MSB_SET(dividend) ) + { + remainder |= 1; + } + + wxULongLongWx t = remainder - divisor; + dividend <<= 1; + quotient <<= 1; + if ( !IS_MSB_SET(t) ) + { + quotient |= 1; + + remainder = t; + } + } + } +} + +wxLongLongWx wxLongLongWx::operator/(const wxLongLongWx& ll) const +{ + wxLongLongWx quotient, remainder; + + Divide(ll, quotient, remainder); + + return quotient; +} + +wxULongLongWx wxULongLongWx::operator/(const wxULongLongWx& ll) const +{ + wxULongLongWx quotient, remainder; + + Divide(ll, quotient, remainder); + + return quotient; +} + +wxLongLongWx& wxLongLongWx::operator/=(const wxLongLongWx& ll) +{ + wxLongLongWx quotient, remainder; + + Divide(ll, quotient, remainder); + + *this = quotient; + + return *this; +} + +wxULongLongWx& wxULongLongWx::operator/=(const wxULongLongWx& ll) +{ + wxULongLongWx quotient, remainder; + + Divide(ll, quotient, remainder); + + *this = quotient; + + return *this; +} + +wxLongLongWx wxLongLongWx::operator%(const wxLongLongWx& ll) const +{ + wxLongLongWx quotient, remainder; + + Divide(ll, quotient, remainder); + + return remainder; +} + +wxULongLongWx wxULongLongWx::operator%(const wxULongLongWx& ll) const +{ + wxULongLongWx quotient, remainder; + + Divide(ll, quotient, remainder); + + return remainder; +} + +// ---------------------------------------------------------------------------- +// misc +// ---------------------------------------------------------------------------- + +// temporary - just for testing +void *wxLongLongWx::asArray(void) const +{ + static unsigned char temp[8]; + + temp[0] = (char)((m_hi >> 24) & 0xFF); + temp[1] = (char)((m_hi >> 16) & 0xFF); + temp[2] = (char)((m_hi >> 8) & 0xFF); + temp[3] = (char)((m_hi >> 0) & 0xFF); + temp[4] = (char)((m_lo >> 24) & 0xFF); + temp[5] = (char)((m_lo >> 16) & 0xFF); + temp[6] = (char)((m_lo >> 8) & 0xFF); + temp[7] = (char)((m_lo >> 0) & 0xFF); + + return temp; +} + +void *wxULongLongWx::asArray(void) const +{ + static unsigned char temp[8]; + + temp[0] = (char)((m_hi >> 24) & 0xFF); + temp[1] = (char)((m_hi >> 16) & 0xFF); + temp[2] = (char)((m_hi >> 8) & 0xFF); + temp[3] = (char)((m_hi >> 0) & 0xFF); + temp[4] = (char)((m_lo >> 24) & 0xFF); + temp[5] = (char)((m_lo >> 16) & 0xFF); + temp[6] = (char)((m_lo >> 8) & 0xFF); + temp[7] = (char)((m_lo >> 0) & 0xFF); + + return temp; +} + +#endif // wxUSE_LONGLONG_WX + +#define LL_TO_STRING(name) \ + wxString name::ToString() const \ + { \ + /* TODO: this is awfully inefficient, anything better? */ \ + wxString result; \ + \ + name ll = *this; \ + \ + bool neg = ll < 0; \ + if ( neg ) \ + { \ + while ( ll != 0 ) \ + { \ + long digit = (ll % 10).ToLong(); \ + result.Prepend((wxChar)(wxT('0') - digit)); \ + ll /= 10; \ + } \ + } \ + else \ + { \ + while ( ll != 0 ) \ + { \ + long digit = (ll % 10).ToLong(); \ + result.Prepend((wxChar)(wxT('0') + digit)); \ + ll /= 10; \ + } \ + } \ + \ + if ( result.empty() ) \ + result = wxT('0'); \ + else if ( neg ) \ + result.Prepend(wxT('-')); \ + \ + return result; \ + } + +#define ULL_TO_STRING(name) \ + wxString name::ToString() const \ + { \ + /* TODO: this is awfully inefficient, anything better? */ \ + wxString result; \ + \ + name ll = *this; \ + \ + while ( ll != 0 ) \ + { \ + result.Prepend((wxChar)(wxT('0') + (ll % 10).ToULong())); \ + ll /= 10; \ + } \ + \ + if ( result.empty() ) \ + result = wxT('0'); \ + \ + return result; \ + } + +#if wxUSE_LONGLONG_NATIVE + LL_TO_STRING(wxLongLongNative) + ULL_TO_STRING(wxULongLongNative) +#endif + +#if wxUSE_LONGLONG_WX + LL_TO_STRING(wxLongLongWx) + ULL_TO_STRING(wxULongLongWx) +#endif + +#if wxUSE_STD_IOSTREAM + +// input/output +WXDLLIMPEXP_BASE +wxSTD ostream& operator<< (wxSTD ostream& o, const wxLongLong& ll) +{ + return o << ll.ToString(); +} + +WXDLLIMPEXP_BASE +wxSTD ostream& operator<< (wxSTD ostream& o, const wxULongLong& ll) +{ + return o << ll.ToString(); +} + +#endif // wxUSE_STD_IOSTREAM + +WXDLLIMPEXP_BASE wxString& operator<< (wxString& s, const wxLongLong& ll) +{ + return s << ll.ToString(); +} + +WXDLLIMPEXP_BASE wxString& operator<< (wxString& s, const wxULongLong& ll) +{ + return s << ll.ToString(); +} + +#if wxUSE_STREAMS + +WXDLLIMPEXP_BASE wxTextOutputStream& operator<< (wxTextOutputStream& o, const wxULongLong& ll) +{ + return o << ll.ToString(); +} + +WXDLLIMPEXP_BASE wxTextOutputStream& operator<< (wxTextOutputStream& o, const wxLongLong& ll) +{ + return o << ll.ToString(); +} + +#define READ_STRING_CHAR(s, idx, len) ((idx!=len) ? (wxChar)s[idx++] : wxT('\0')) + +WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &o, wxULongLong &ll) +{ + wxString s = o.ReadWord(); + + ll = wxULongLong(0l, 0l); + size_t length = s.length(); + size_t idx = 0; + + wxChar ch = READ_STRING_CHAR(s, idx, length); + + // Skip WS + while (ch==wxT(' ') || ch==wxT('\t')) + ch = READ_STRING_CHAR(s, idx, length); + + // Read number + wxULongLong multiplier(0l, 10l); + while (ch>=wxT('0') && ch<=wxT('9')) { + long lValue = (unsigned) (ch - wxT('0')); + ll = ll * multiplier + wxULongLong(0l, lValue); + ch = READ_STRING_CHAR(s, idx, length); + } + + return o; +} + +WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &o, wxLongLong &ll) +{ + wxString s = o.ReadWord(); + + ll = wxLongLong(0l, 0l); + size_t length = s.length(); + size_t idx = 0; + + wxChar ch = READ_STRING_CHAR(s, idx, length); + + // Skip WS + while (ch==wxT(' ') || ch==wxT('\t')) + ch = READ_STRING_CHAR(s, idx, length); + + // Ask for sign + int iSign = 1; + if (ch==wxT('-') || ch==wxT('+')) { + iSign = ((ch==wxT('-')) ? -1 : 1); + ch = READ_STRING_CHAR(s, idx, length); + } + + // Read number + wxLongLong multiplier(0l, 10l); + while (ch>=wxT('0') && ch<=wxT('9')) { + long lValue = (unsigned) (ch - wxT('0')); + ll = ll * multiplier + wxLongLong(0l, lValue); + ch = READ_STRING_CHAR(s, idx, length); + } + +#if wxUSE_LONGLONG_NATIVE + ll = ll * wxLongLong((wxLongLong_t) iSign); +#else + ll = ll * wxLongLong((long) iSign); +#endif + + return o; +} + +#if wxUSE_LONGLONG_NATIVE + +WXDLLIMPEXP_BASE class wxTextOutputStream &operator<<(class wxTextOutputStream &o, wxULongLong_t value) +{ + return o << wxULongLong(value).ToString(); +} + +WXDLLIMPEXP_BASE class wxTextOutputStream &operator<<(class wxTextOutputStream &o, wxLongLong_t value) +{ + return o << wxLongLong(value).ToString(); +} + +WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &o, wxULongLong_t &value) +{ + wxULongLong ll; + o >> ll; + value = ll.GetValue(); + return o; +} + +WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &o, wxLongLong_t &value) +{ + wxLongLong ll; + o >> ll; + value = ll.GetValue(); + return o; +} + +#endif // wxUSE_LONGLONG_NATIVE + +#endif // wxUSE_STREAMS + +#endif // wxUSE_LONGLONG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/markupparser.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/markupparser.cpp new file mode 100644 index 0000000000..5dbbf840cf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/markupparser.cpp @@ -0,0 +1,483 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/markupparser.cpp +// Purpose: Implementation of wxMarkupParser. +// Author: Vadim Zeitlin +// Created: 2011-02-16 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_MARKUP + +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif + +#include "wx/private/markupparser.h" + +#include "wx/stack.h" + +namespace +{ + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// Array containing the predefined XML 1.0 entities. +const struct XMLEntity +{ + const char *name; + int len; // == strlen(name) + char value; +} xmlEntities[] = +{ + { "lt", 2, '<' }, + { "gt", 2, '>' }, + { "amp", 3, '&' }, + { "apos", 4, '\''}, + { "quot", 4, '"' }, +}; + +// ---------------------------------------------------------------------------- +// helper functions +// ---------------------------------------------------------------------------- + +wxString +ExtractUntil(char ch, wxString::const_iterator& it, wxString::const_iterator end) +{ + wxString str; + for ( ; it != end; ++it ) + { + if ( *it == ch ) + return str; + + str += *it; + } + + // Return empty string to indicate that we didn't find ch at all. + return wxString(); +} + +} // anonymous namespace + +// ============================================================================ +// wxMarkupParser implementation +// ============================================================================ + +wxString +wxMarkupParser::ParseAttrs(wxString attrs, TagAndAttrs& tagAndAttrs) +{ + if ( tagAndAttrs.name.CmpNoCase("span") != 0 && !attrs.empty() ) + { + return wxString::Format("tag \"%s\" can't have attributes", + tagAndAttrs.name); + } + + // TODO: Parse more attributes described at + // http://library.gnome.org/devel/pango/stable/PangoMarkupFormat.html + // and at least ignore them gracefully instead of giving errors (but + // quite a few of them could be supported as well, notable font_desc). + + wxMarkupSpanAttributes& spanAttrs = tagAndAttrs.attrs; + + while ( !attrs.empty() ) + { + wxString rest; + const wxString attr = attrs.BeforeFirst(' ', &rest); + attrs = rest; + + // The "original" versions are used for error messages only. + wxString valueOrig; + const wxString nameOrig = attr.BeforeFirst('=', &valueOrig); + + const wxString name = nameOrig.Lower(); + wxString value = valueOrig.Lower(); + + // All attributes values must be quoted. + if ( value.length() < 2 || + (value[0] != value.Last()) || + (value[0] != '"' && value[0] != '\'') ) + { + return wxString::Format("bad quoting for value of \"%s\"", + nameOrig); + } + + value.assign(value, 1, value.length() - 2); + + if ( name == "foreground" || name == "fgcolor" || name == "color" ) + { + spanAttrs.m_fgCol = value; + } + else if ( name == "background" || name == "bgcolor" ) + { + spanAttrs.m_bgCol = value; + } + else if ( name == "font_family" || name == "face" ) + { + spanAttrs.m_fontFace = value; + } + else if ( name == "font_weight" || name == "weight" ) + { + unsigned long weight; + + if ( value == "ultralight" || value == "light" || value == "normal" ) + spanAttrs.m_isBold = wxMarkupSpanAttributes::No; + else if ( value == "bold" || value == "ultrabold" || value == "heavy" ) + spanAttrs.m_isBold = wxMarkupSpanAttributes::Yes; + else if ( value.ToULong(&weight) ) + spanAttrs.m_isBold = weight >= 600 ? wxMarkupSpanAttributes::Yes + : wxMarkupSpanAttributes::No; + else + return wxString::Format("invalid font weight \"%s\"", valueOrig); + } + else if ( name == "font_style" || name == "style" ) + { + if ( value == "normal" ) + spanAttrs.m_isItalic = wxMarkupSpanAttributes::No; + else if ( value == "oblique" || value == "italic" ) + spanAttrs.m_isItalic = wxMarkupSpanAttributes::Yes; + else + return wxString::Format("invalid font style \"%s\"", valueOrig); + } + else if ( name == "size" ) + { + unsigned long size; + if ( value.ToULong(&size) ) + { + spanAttrs.m_sizeKind = wxMarkupSpanAttributes::Size_PointParts; + spanAttrs.m_fontSize = size; + } + else if ( value == "smaller" || value == "larger" ) + { + spanAttrs.m_sizeKind = wxMarkupSpanAttributes::Size_Relative; + spanAttrs.m_fontSize = value == "smaller" ? -1 : +1; + } + else // Must be a CSS-like size specification + { + int cssSize = 1; + if ( value.StartsWith("xx-", &rest) ) + cssSize = 3; + else if ( value.StartsWith("x-", &rest) ) + cssSize = 2; + else if ( value == "medium" ) + cssSize = 0; + else + rest = value; + + if ( cssSize != 0 ) + { + if ( rest == "small" ) + cssSize = -cssSize; + else if ( rest != "large" ) + return wxString::Format("invalid font size \"%s\"", + valueOrig); + } + + spanAttrs.m_sizeKind = wxMarkupSpanAttributes::Size_Symbolic; + spanAttrs.m_fontSize = cssSize; + } + } + } + + return wxString(); +} + +bool wxMarkupParser::OutputTag(const TagAndAttrs& tagAndAttrs, bool start) +{ + if ( tagAndAttrs.name.CmpNoCase("span") == 0 ) + { + if ( start ) + m_output.OnSpanStart(tagAndAttrs.attrs); + else + m_output.OnSpanEnd(tagAndAttrs.attrs); + + return true; + } + else // non-span tag + { + static const struct TagHandler + { + const char *name; + void (wxMarkupParserOutput::*startFunc)(); + void (wxMarkupParserOutput::*endFunc)(); + } tagHandlers[] = + { + { "b", &wxMarkupParserOutput::OnBoldStart, + &wxMarkupParserOutput::OnBoldEnd }, + { "i", &wxMarkupParserOutput::OnItalicStart, + &wxMarkupParserOutput::OnItalicEnd }, + { "u", &wxMarkupParserOutput::OnUnderlinedStart, + &wxMarkupParserOutput::OnUnderlinedEnd }, + { "s", &wxMarkupParserOutput::OnStrikethroughStart, + &wxMarkupParserOutput::OnStrikethroughEnd }, + { "big", &wxMarkupParserOutput::OnBigStart, + &wxMarkupParserOutput::OnBigEnd }, + { "small", &wxMarkupParserOutput::OnSmallStart, + &wxMarkupParserOutput::OnSmallEnd }, + { "tt", &wxMarkupParserOutput::OnTeletypeStart, + &wxMarkupParserOutput::OnTeletypeEnd }, + }; + + for ( unsigned n = 0; n < WXSIZEOF(tagHandlers); n++ ) + { + const TagHandler& h = tagHandlers[n]; + + if ( tagAndAttrs.name.CmpNoCase(h.name) == 0 ) + { + if ( start ) + (m_output.*(h.startFunc))(); + else + (m_output.*(h.endFunc))(); + + return true; + } + } + } + + // Unknown tag name. + return false; +} + +bool wxMarkupParser::Parse(const wxString& text) +{ + // The stack containing the names and corresponding attributes (which are + // actually only used for tags) of all of the currently opened tag + // or none if we're not inside any tag. + wxStack tags; + + // Current run of text. + wxString current; + + const wxString::const_iterator end = text.end(); + for ( wxString::const_iterator it = text.begin(); it != end; ++it ) + { + switch ( (*it).GetValue() ) + { + case '<': + { + // Flush the text preceding the tag, if any. + if ( !current.empty() ) + { + m_output.OnText(current); + current.clear(); + } + + // This variable is used only in the debugging messages + // and doesn't need to be defined if they're not compiled + // at all (it actually would result in unused variable + // messages in this case). +#if wxUSE_LOG_DEBUG || !defined(HAVE_VARIADIC_MACROS) + // Remember the tag starting position for the error + // messages. + const size_t pos = it - text.begin(); +#endif + bool start = true; + if ( ++it != end && *it == '/' ) + { + start = false; + ++it; + } + + const wxString tag = ExtractUntil('>', it, end); + if ( tag.empty() ) + { + wxLogDebug("%s at %lu.", + it == end ? "Unclosed tag starting" + : "Empty tag", + pos); + return false; + } + + if ( start ) + { + wxString attrs; + const wxString name = tag.BeforeFirst(' ', &attrs); + + TagAndAttrs tagAndAttrs(name); + const wxString err = ParseAttrs(attrs, tagAndAttrs); + if ( !err.empty() ) + { + wxLogDebug("Bad attributes for \"%s\" " + "at %lu: %s.", + name, pos, err); + return false; + } + + tags.push(tagAndAttrs); + } + else // end tag + { + if ( tags.empty() || tags.top().name != tag ) + { + wxLogDebug("Unmatched closing tag \"%s\" at %lu.", + tag, pos); + return false; + } + } + + if ( !OutputTag(tags.top(), start) ) + { + wxLogDebug("Unknown tag at %lu.", pos); + return false; + } + + if ( !start ) + tags.pop(); + } + break; + + case '>': + wxLogDebug("'>' should be escaped as \">\"; at %lu.", + it - text.begin()); + break; + + case '&': + // Processing is somewhat complicated: we need to recognize at + // least the "<" entity to allow escaping left square + // brackets in the markup and, in fact, we recognize all of the + // standard XML entities for consistency with Pango markup + // parsing. + // + // However we also allow '&' to appear unescaped, i.e. directly + // and not as "&" when it is used to introduce the mnemonic + // for the label. In this case we simply leave it alone. + // + // Notice that this logic makes it impossible to have a label + // with "lt;" inside it and using "l" as mnemonic but hopefully + // this shouldn't be a problem in practice. + { + const size_t pos = it - text.begin() + 1; + + unsigned n; + for ( n = 0; n < WXSIZEOF(xmlEntities); n++ ) + { + const XMLEntity& xmlEnt = xmlEntities[n]; + if ( text.compare(pos, xmlEnt.len, xmlEnt.name) == 0 + && text[pos + xmlEnt.len] == ';' ) + { + // Escape the ampersands if needed to protect them + // from being interpreted as mnemonics indicators. + if ( xmlEnt.value == '&' ) + current += "&&"; + else + current += xmlEnt.value; + + it += xmlEnt.len + 1; // +1 for '&' itself + + break; + } + } + + if ( n < WXSIZEOF(xmlEntities) ) + break; + //else: fall through, '&' is not special + } + + default: + current += *it; + } + } + + if ( !tags.empty() ) + { + wxLogDebug("Missing closing tag for \"%s\"", tags.top().name); + return false; + } + + if ( !current.empty() ) + m_output.OnText(current); + + return true; +} + +/* static */ +wxString wxMarkupParser::Quote(const wxString& text) +{ + wxString quoted; + quoted.reserve(text.length()); + + for ( wxString::const_iterator it = text.begin(); it != text.end(); ++it ) + { + unsigned n; + for ( n = 0; n < WXSIZEOF(xmlEntities); n++ ) + { + const XMLEntity& xmlEnt = xmlEntities[n]; + if ( *it == xmlEnt.value ) + { + quoted << '&' << xmlEnt.name << ';'; + break; + } + } + + if ( n == WXSIZEOF(xmlEntities) ) + quoted += *it; + } + + return quoted; +} + +/* static */ +wxString wxMarkupParser::Strip(const wxString& text) +{ + class StripOutput : public wxMarkupParserOutput + { + public: + StripOutput() { } + + const wxString& GetText() const { return m_text; } + + virtual void OnText(const wxString& text) { m_text += text; } + + virtual void OnBoldStart() { } + virtual void OnBoldEnd() { } + + virtual void OnItalicStart() { } + virtual void OnItalicEnd() { } + + virtual void OnUnderlinedStart() { } + virtual void OnUnderlinedEnd() { } + + virtual void OnStrikethroughStart() { } + virtual void OnStrikethroughEnd() { } + + virtual void OnBigStart() { } + virtual void OnBigEnd() { } + + virtual void OnSmallStart() { } + virtual void OnSmallEnd() { } + + virtual void OnTeletypeStart() { } + virtual void OnTeletypeEnd() { } + + virtual void OnSpanStart(const wxMarkupSpanAttributes& WXUNUSED(a)) { } + virtual void OnSpanEnd(const wxMarkupSpanAttributes& WXUNUSED(a)) { } + + private: + wxString m_text; + }; + + StripOutput output; + wxMarkupParser parser(output); + if ( !parser.Parse(text) ) + return wxString(); + + return output.GetText(); +} + +#endif // wxUSE_MARKUP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/matrix.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/matrix.cpp new file mode 100644 index 0000000000..1175af8342 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/matrix.cpp @@ -0,0 +1,600 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/matrix.cpp +// Purpose: wxTransformMatrix class +// Author: Chris Breeze, Julian Smart +// Modified by: Klaas Holwerda +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// Note: this is intended to be used in wxDC at some point to replace +// the current system of scaling/translation. It is not yet used. + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/matrix.h" + +#ifndef WX_PRECOMP + #include "wx/math.h" +#endif + +static const double pi = M_PI; + +wxTransformMatrix::wxTransformMatrix(void) +{ + m_isIdentity = false; + + Identity(); +} + +wxTransformMatrix::wxTransformMatrix(const wxTransformMatrix& mat) + : wxObject() +{ + (*this) = mat; +} + +double wxTransformMatrix::GetValue(int col, int row) const +{ + if (row < 0 || row > 2 || col < 0 || col > 2) + return 0.0; + + return m_matrix[col][row]; +} + +void wxTransformMatrix::SetValue(int col, int row, double value) +{ + if (row < 0 || row > 2 || col < 0 || col > 2) + return; + + m_matrix[col][row] = value; + m_isIdentity = IsIdentity1(); +} + +void wxTransformMatrix::operator = (const wxTransformMatrix& mat) +{ + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 3; j++) + { + m_matrix[i][j] = mat.m_matrix[i][j]; + } + } + m_isIdentity = mat.m_isIdentity; +} + +bool wxTransformMatrix::operator == (const wxTransformMatrix& mat) const +{ + if (m_isIdentity && mat.m_isIdentity) + return true; + + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 3; j++) + { + if ( !wxIsSameDouble(m_matrix[i][j], mat.m_matrix[i][j]) ) + return false; + } + } + return true; +} + +bool wxTransformMatrix::operator != (const wxTransformMatrix& mat) const +{ + return (! ((*this) == mat)); +} + +double& wxTransformMatrix::operator()(int col, int row) +{ + if (row < 0 || row > 2 || col < 0 || col > 2) + return m_matrix[0][0]; + + return m_matrix[col][row]; +} + +double wxTransformMatrix::operator()(int col, int row) const +{ + if (row < 0 || row > 2 || col < 0 || col > 2) + return 0.0; + + return m_matrix[col][row]; +} + +// Invert matrix +bool wxTransformMatrix::Invert(void) +{ + double inverseMatrix[3][3]; + + // calculate the adjoint + inverseMatrix[0][0] = wxCalculateDet(m_matrix[1][1],m_matrix[2][1],m_matrix[1][2],m_matrix[2][2]); + inverseMatrix[0][1] = -wxCalculateDet(m_matrix[0][1],m_matrix[2][1],m_matrix[0][2],m_matrix[2][2]); + inverseMatrix[0][2] = wxCalculateDet(m_matrix[0][1],m_matrix[1][1],m_matrix[0][2],m_matrix[1][2]); + + inverseMatrix[1][0] = -wxCalculateDet(m_matrix[1][0],m_matrix[2][0],m_matrix[1][2],m_matrix[2][2]); + inverseMatrix[1][1] = wxCalculateDet(m_matrix[0][0],m_matrix[2][0],m_matrix[0][2],m_matrix[2][2]); + inverseMatrix[1][2] = -wxCalculateDet(m_matrix[0][0],m_matrix[1][0],m_matrix[0][2],m_matrix[1][2]); + + inverseMatrix[2][0] = wxCalculateDet(m_matrix[1][0],m_matrix[2][0],m_matrix[1][1],m_matrix[2][1]); + inverseMatrix[2][1] = -wxCalculateDet(m_matrix[0][0],m_matrix[2][0],m_matrix[0][1],m_matrix[2][1]); + inverseMatrix[2][2] = wxCalculateDet(m_matrix[0][0],m_matrix[1][0],m_matrix[0][1],m_matrix[1][1]); + + // now divide by the determinant + double det = m_matrix[0][0] * inverseMatrix[0][0] + m_matrix[0][1] * inverseMatrix[1][0] + m_matrix[0][2] * inverseMatrix[2][0]; + if ( wxIsNullDouble(det) ) + return false; + + inverseMatrix[0][0] /= det; inverseMatrix[1][0] /= det; inverseMatrix[2][0] /= det; + inverseMatrix[0][1] /= det; inverseMatrix[1][1] /= det; inverseMatrix[2][1] /= det; + inverseMatrix[0][2] /= det; inverseMatrix[1][2] /= det; inverseMatrix[2][2] /= det; + + for (int i = 0; i < 3; i++) + { + for (int j = 0; j < 3; j++) + { + m_matrix[i][j] = inverseMatrix[i][j]; + } + } + m_isIdentity = IsIdentity1(); + return true; +} + +// Make into identity matrix +bool wxTransformMatrix::Identity(void) +{ + m_matrix[0][0] = m_matrix[1][1] = m_matrix[2][2] = 1.0; + m_matrix[1][0] = m_matrix[2][0] = m_matrix[0][1] = m_matrix[2][1] = m_matrix[0][2] = m_matrix[1][2] = 0.0; + m_isIdentity = true; + + return true; +} + +// Scale by scale (isotropic scaling i.e. the same in x and y): +// | scale 0 0 | +// matrix' = | 0 scale 0 | x matrix +// | 0 0 scale | +// +bool wxTransformMatrix::Scale(double scale) +{ + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 3; j++) + { + m_matrix[i][j] *= scale; + } + } + m_isIdentity = IsIdentity1(); + + return true; +} + + +// scale a matrix in 2D +// +// xs 0 xc(1-xs) +// 0 ys yc(1-ys) +// 0 0 1 +// +wxTransformMatrix& wxTransformMatrix::Scale(const double &xs, const double &ys,const double &xc, const double &yc) +{ + double r00,r10,r20,r01,r11,r21; + + if (m_isIdentity) + { + double tx = xc*(1-xs); + double ty = yc*(1-ys); + r00 = xs; + r10 = 0; + r20 = tx; + r01 = 0; + r11 = ys; + r21 = ty; + } + else if ( !wxIsNullDouble(xc) || !wxIsNullDouble(yc) ) + { + double tx = xc*(1-xs); + double ty = yc*(1-ys); + r00 = xs * m_matrix[0][0]; + r10 = xs * m_matrix[1][0]; + r20 = xs * m_matrix[2][0] + tx; + r01 = ys * m_matrix[0][1]; + r11 = ys * m_matrix[1][1]; + r21 = ys * m_matrix[2][1] + ty; + } + else + { + r00 = xs * m_matrix[0][0]; + r10 = xs * m_matrix[1][0]; + r20 = xs * m_matrix[2][0]; + r01 = ys * m_matrix[0][1]; + r11 = ys * m_matrix[1][1]; + r21 = ys * m_matrix[2][1]; + } + + m_matrix[0][0] = r00; + m_matrix[1][0] = r10; + m_matrix[2][0] = r20; + m_matrix[0][1] = r01; + m_matrix[1][1] = r11; + m_matrix[2][1] = r21; + +/* or like this + // first translate to origin O + (*this).Translate(-x_cen, -y_cen); + + // now do the scaling + wxTransformMatrix scale; + scale.m_matrix[0][0] = x_fac; + scale.m_matrix[1][1] = y_fac; + scale.m_isIdentity = IsIdentity1(); + + *this = scale * (*this); + + // translate back from origin to x_cen, y_cen + (*this).Translate(x_cen, y_cen); +*/ + + m_isIdentity = IsIdentity1(); + + return *this; +} + + +// mirror a matrix in x, y +// +// -1 0 0 Y-mirror +// 0 -1 0 X-mirror +// 0 0 -1 Z-mirror +wxTransformMatrix& wxTransformMatrix::Mirror(bool x, bool y) +{ + wxTransformMatrix temp; + if (x) + { + temp.m_matrix[1][1] = -1; + temp.m_isIdentity=false; + } + if (y) + { + temp.m_matrix[0][0] = -1; + temp.m_isIdentity=false; + } + + *this = temp * (*this); + m_isIdentity = IsIdentity1(); + return *this; +} + +// Translate by dx, dy: +// | 1 0 dx | +// matrix' = | 0 1 dy | x matrix +// | 0 0 1 | +// +bool wxTransformMatrix::Translate(double dx, double dy) +{ + int i; + for (i = 0; i < 3; i++) + m_matrix[i][0] += dx * m_matrix[i][2]; + for (i = 0; i < 3; i++) + m_matrix[i][1] += dy * m_matrix[i][2]; + + m_isIdentity = IsIdentity1(); + + return true; +} + +// Rotate clockwise by the given number of degrees: +// | cos sin 0 | +// matrix' = | -sin cos 0 | x matrix +// | 0 0 1 | +bool wxTransformMatrix::Rotate(double degrees) +{ + Rotate(-degrees,0,0); + return true; +} + +// counter clockwise rotate around a point +// +// cos(r) -sin(r) x(1-cos(r))+y(sin(r) +// sin(r) cos(r) y(1-cos(r))-x(sin(r) +// 0 0 1 +wxTransformMatrix& wxTransformMatrix::Rotate(const double °rees, const double &x, const double &y) +{ + double angle = degrees * pi / 180.0; + double c = cos(angle); + double s = sin(angle); + double r00,r10,r20,r01,r11,r21; + + if (m_isIdentity) + { + double tx = x*(1-c)+y*s; + double ty = y*(1-c)-x*s; + r00 = c ; + r10 = -s; + r20 = tx; + r01 = s; + r11 = c; + r21 = ty; + } + else if ( !wxIsNullDouble(x) || !wxIsNullDouble(y) ) + { + double tx = x*(1-c)+y*s; + double ty = y*(1-c)-x*s; + r00 = c * m_matrix[0][0] - s * m_matrix[0][1] + tx * m_matrix[0][2]; + r10 = c * m_matrix[1][0] - s * m_matrix[1][1] + tx * m_matrix[1][2]; + r20 = c * m_matrix[2][0] - s * m_matrix[2][1] + tx;// * m_matrix[2][2]; + r01 = c * m_matrix[0][1] + s * m_matrix[0][0] + ty * m_matrix[0][2]; + r11 = c * m_matrix[1][1] + s * m_matrix[1][0] + ty * m_matrix[1][2]; + r21 = c * m_matrix[2][1] + s * m_matrix[2][0] + ty;// * m_matrix[2][2]; + } + else + { + r00 = c * m_matrix[0][0] - s * m_matrix[0][1]; + r10 = c * m_matrix[1][0] - s * m_matrix[1][1]; + r20 = c * m_matrix[2][0] - s * m_matrix[2][1]; + r01 = c * m_matrix[0][1] + s * m_matrix[0][0]; + r11 = c * m_matrix[1][1] + s * m_matrix[1][0]; + r21 = c * m_matrix[2][1] + s * m_matrix[2][0]; + } + + m_matrix[0][0] = r00; + m_matrix[1][0] = r10; + m_matrix[2][0] = r20; + m_matrix[0][1] = r01; + m_matrix[1][1] = r11; + m_matrix[2][1] = r21; + +/* or like this + wxTransformMatrix rotate; + rotate.m_matrix[2][0] = tx; + rotate.m_matrix[2][1] = ty; + + rotate.m_matrix[0][0] = c; + rotate.m_matrix[0][1] = s; + + rotate.m_matrix[1][0] = -s; + rotate.m_matrix[1][1] = c; + + rotate.m_isIdentity=false; + *this = rotate * (*this); +*/ + m_isIdentity = IsIdentity1(); + + return *this; +} + +// Transform a point from logical to device coordinates +bool wxTransformMatrix::TransformPoint(double x, double y, double& tx, double& ty) const +{ + if (IsIdentity()) + { + tx = x; ty = y; return true; + } + + tx = x * m_matrix[0][0] + y * m_matrix[1][0] + m_matrix[2][0]; + ty = x * m_matrix[0][1] + y * m_matrix[1][1] + m_matrix[2][1]; + + return true; +} + +// Transform a point from device to logical coordinates. + +// Example of use: +// wxTransformMatrix mat = dc.GetTransformation(); +// mat.Invert(); +// mat.InverseTransformPoint(x, y, x1, y1); +// OR (shorthand:) +// dc.LogicalToDevice(x, y, x1, y1); +// The latter is slightly less efficient if we're doing several +// conversions, since the matrix is inverted several times. +bool wxTransformMatrix::InverseTransformPoint(double x, double y, double& tx, double& ty) const +{ + if (IsIdentity()) + { + tx = x; + ty = y; + return true; + } + + const double z = (1.0 - m_matrix[0][2] * x - m_matrix[1][2] * y) / m_matrix[2][2]; + if ( wxIsNullDouble(z) ) + return false; + + tx = x * m_matrix[0][0] + y * m_matrix[1][0] + z * m_matrix[2][0]; + ty = x * m_matrix[0][1] + y * m_matrix[1][1] + z * m_matrix[2][1]; + return true; +} + +wxTransformMatrix& wxTransformMatrix::operator*=(const double& t) +{ + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) + m_matrix[i][j]*= t; + m_isIdentity = IsIdentity1(); + return *this; +} + +wxTransformMatrix& wxTransformMatrix::operator/=(const double& t) +{ + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) + m_matrix[i][j]/= t; + m_isIdentity = IsIdentity1(); + return *this; +} + +wxTransformMatrix& wxTransformMatrix::operator+=(const wxTransformMatrix& mat) +{ + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) + m_matrix[i][j] += mat.m_matrix[i][j]; + m_isIdentity = IsIdentity1(); + return *this; +} + +wxTransformMatrix& wxTransformMatrix::operator-=(const wxTransformMatrix& mat) +{ + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) + m_matrix[i][j] -= mat.m_matrix[i][j]; + m_isIdentity = IsIdentity1(); + return *this; +} + +wxTransformMatrix& wxTransformMatrix::operator*=(const wxTransformMatrix& mat) +{ + + if (mat.m_isIdentity) + return *this; + if (m_isIdentity) + { + *this = mat; + return *this; + } + else + { + wxTransformMatrix result; + for (int i = 0; i < 3; i++) + { + for (int j = 0; j < 3; j++) + { + double sum = 0; + for (int k = 0; k < 3; k++) + sum += m_matrix[k][i] * mat.m_matrix[j][k]; + result.m_matrix[j][i] = sum; + } + } + *this = result; + } + + m_isIdentity = IsIdentity1(); + return *this; +} + + +// constant operators +wxTransformMatrix wxTransformMatrix::operator*(const double& t) const +{ + wxTransformMatrix result = *this; + result *= t; + result.m_isIdentity = result.IsIdentity1(); + return result; +} + +wxTransformMatrix wxTransformMatrix::operator/(const double& t) const +{ + wxTransformMatrix result = *this; +// wxASSERT(t!=0); + result /= t; + result.m_isIdentity = result.IsIdentity1(); + return result; +} + +wxTransformMatrix wxTransformMatrix::operator+(const wxTransformMatrix& m) const +{ + wxTransformMatrix result = *this; + result += m; + result.m_isIdentity = result.IsIdentity1(); + return result; +} + +wxTransformMatrix wxTransformMatrix::operator-(const wxTransformMatrix& m) const +{ + wxTransformMatrix result = *this; + result -= m; + result.m_isIdentity = result.IsIdentity1(); + return result; +} + + +wxTransformMatrix wxTransformMatrix::operator*(const wxTransformMatrix& m) const +{ + wxTransformMatrix result = *this; + result *= m; + result.m_isIdentity = result.IsIdentity1(); + return result; +} + + +wxTransformMatrix wxTransformMatrix::operator-() const +{ + wxTransformMatrix result = *this; + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) + result.m_matrix[i][j] = -(this->m_matrix[i][j]); + result.m_isIdentity = result.IsIdentity1(); + return result; +} + +static double CheckInt(double getal) +{ + // check if the number is very close to an integer + if ( (ceil(getal) - getal) < 0.0001) + return ceil(getal); + + else if ( (getal - floor(getal)) < 0.0001) + return floor(getal); + + return getal; + +} + +double wxTransformMatrix::Get_scaleX() +{ + double scale_factor; + double rot_angle = CheckInt(atan2(m_matrix[1][0],m_matrix[0][0])*180/pi); + if ( !wxIsSameDouble(rot_angle, 90) && !wxIsSameDouble(rot_angle, -90) ) + scale_factor = m_matrix[0][0]/cos((rot_angle/180)*pi); + else + scale_factor = m_matrix[0][0]/sin((rot_angle/180)*pi); // er kan nl. niet door 0 gedeeld worden ! + + scale_factor = CheckInt(scale_factor); + if (scale_factor < 0) + scale_factor = -scale_factor; + + return scale_factor; +} + +double wxTransformMatrix::Get_scaleY() +{ + double scale_factor; + double rot_angle = CheckInt(atan2(m_matrix[1][0],m_matrix[0][0])*180/pi); + if ( !wxIsSameDouble(rot_angle, 90) && !wxIsSameDouble(rot_angle, -90) ) + scale_factor = m_matrix[1][1]/cos((rot_angle/180)*pi); + else + scale_factor = m_matrix[1][1]/sin((rot_angle/180)*pi); // er kan nl. niet door 0 gedeeld worden ! + + scale_factor = CheckInt(scale_factor); + if (scale_factor < 0) + + scale_factor = -scale_factor; + + return scale_factor; + +} + +double wxTransformMatrix::GetRotation() +{ + double temp1 = GetValue(0,0); // for angle calculation + double temp2 = GetValue(0,1); // + + // Rotation + double rot_angle = atan2(temp2,temp1)*180/pi; + + rot_angle = CheckInt(rot_angle); + return rot_angle; +} + +void wxTransformMatrix::SetRotation(double rotation) +{ + double x=GetValue(2,0); + double y=GetValue(2,1); + Rotate(-GetRotation(), x, y); + Rotate(rotation, x, y); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/mediactrlcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/mediactrlcmn.cpp new file mode 100644 index 0000000000..d8f0b2c747 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/mediactrlcmn.cpp @@ -0,0 +1,553 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/mediactrlcmn.cpp +// Purpose: wxMediaCtrl common code +// Author: Ryan Norton +// Modified by: +// Created: 11/07/04 +// Copyright: (c) Ryan Norton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// TODO: Platform specific backend defaults? + +//=========================================================================== +// Declarations +//=========================================================================== + +//--------------------------------------------------------------------------- +// Includes +//--------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_MEDIACTRL + +#ifndef WX_PRECOMP + #include "wx/hash.h" + #include "wx/log.h" +#endif + +#include "wx/mediactrl.h" + +//=========================================================================== +// +// Implementation +// +//=========================================================================== + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// RTTI and Event implementations +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +IMPLEMENT_CLASS(wxMediaCtrl, wxControl) +wxDEFINE_EVENT( wxEVT_MEDIA_STATECHANGED, wxMediaEvent ); +wxDEFINE_EVENT( wxEVT_MEDIA_PLAY, wxMediaEvent ); +wxDEFINE_EVENT( wxEVT_MEDIA_PAUSE, wxMediaEvent ); +IMPLEMENT_CLASS(wxMediaBackend, wxObject) +IMPLEMENT_DYNAMIC_CLASS(wxMediaEvent, wxEvent) +wxDEFINE_EVENT( wxEVT_MEDIA_FINISHED, wxMediaEvent ); +wxDEFINE_EVENT( wxEVT_MEDIA_LOADED, wxMediaEvent ); +wxDEFINE_EVENT( wxEVT_MEDIA_STOP, wxMediaEvent ); + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// +// wxMediaCtrl +// +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +//--------------------------------------------------------------------------- +// wxMediaBackend Destructor +// +// This is here because the DARWIN gcc compiler badly screwed up and +// needs the destructor implementation in the source +//--------------------------------------------------------------------------- +wxMediaBackend::~wxMediaBackend() +{ +} + +//--------------------------------------------------------------------------- +// wxMediaCtrl::Create (file version) +// wxMediaCtrl::Create (URL version) +// +// Searches for a backend that is installed on the system (backends +// starting with lower characters in the alphabet are given priority), +// and creates the control from it +// +// This searches by searching the global RTTI hashtable, class by class, +// attempting to call CreateControl on each one found that is a derivative +// of wxMediaBackend - if it succeeded Create returns true, otherwise +// it keeps iterating through the hashmap. +//--------------------------------------------------------------------------- +bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id, + const wxString& fileName, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& szBackend, + const wxValidator& validator, + const wxString& name) +{ + if(!szBackend.empty()) + { + wxClassInfo* pClassInfo = wxClassInfo::FindClass(szBackend); + + if(!pClassInfo || !DoCreate(pClassInfo, parent, id, + pos, size, style, validator, name)) + { + m_imp = NULL; + return false; + } + + if (!fileName.empty()) + { + if (!Load(fileName)) + { + wxDELETE(m_imp); + return false; + } + } + + SetInitialSize(size); + return true; + } + else + { + wxClassInfo::const_iterator it = wxClassInfo::begin_classinfo(); + + const wxClassInfo* classInfo; + + while((classInfo = NextBackend(&it)) != NULL) + { + if(!DoCreate(classInfo, parent, id, + pos, size, style, validator, name)) + continue; + + if (!fileName.empty()) + { + if (Load(fileName)) + { + SetInitialSize(size); + return true; + } + else + delete m_imp; + } + else + { + SetInitialSize(size); + return true; + } + } + + m_imp = NULL; + return false; + } +} + +bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id, + const wxURI& location, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& szBackend, + const wxValidator& validator, + const wxString& name) +{ + if(!szBackend.empty()) + { + wxClassInfo* pClassInfo = wxClassInfo::FindClass(szBackend); + if(!pClassInfo || !DoCreate(pClassInfo, parent, id, + pos, size, style, validator, name)) + { + m_imp = NULL; + return false; + } + + if (!Load(location)) + { + wxDELETE(m_imp); + return false; + } + + SetInitialSize(size); + return true; + } + else + { + wxClassInfo::const_iterator it = wxClassInfo::begin_classinfo(); + + const wxClassInfo* classInfo; + + while((classInfo = NextBackend(&it)) != NULL) + { + if(!DoCreate(classInfo, parent, id, + pos, size, style, validator, name)) + continue; + + if (Load(location)) + { + SetInitialSize(size); + return true; + } + else + delete m_imp; + } + + m_imp = NULL; + return false; + } +} + +//--------------------------------------------------------------------------- +// wxMediaCtrl::DoCreate +// +// Attempts to create the control from a backend +//--------------------------------------------------------------------------- +bool wxMediaCtrl::DoCreate(const wxClassInfo* classInfo, + wxWindow* parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + m_imp = (wxMediaBackend*)classInfo->CreateObject(); + + if( m_imp->CreateControl(this, parent, id, pos, size, + style, validator, name) ) + { + return true; + } + + delete m_imp; + return false; +} + +//--------------------------------------------------------------------------- +// wxMediaCtrl::NextBackend (static) +// +// +// Search through the RTTI hashmap one at a +// time, attempting to create each derivative +// of wxMediaBackend +// +// +// STL isn't compatible with and will have a compilation error +// on a wxNode, however, wxHashTable::compatibility_iterator is +// incompatible with the old 2.4 stable version - but since +// we're in 2.5+ only we don't need to worry about the new version +//--------------------------------------------------------------------------- +const wxClassInfo* wxMediaCtrl::NextBackend(wxClassInfo::const_iterator* it) +{ + for ( wxClassInfo::const_iterator end = wxClassInfo::end_classinfo(); + *it != end; ++(*it) ) + { + const wxClassInfo* classInfo = **it; + if ( classInfo->IsKindOf(wxCLASSINFO(wxMediaBackend)) && + classInfo != wxCLASSINFO(wxMediaBackend) ) + { + ++(*it); + return classInfo; + } + } + + // + // Nope - couldn't successfully find one... fail + // + return NULL; +} + + +//--------------------------------------------------------------------------- +// wxMediaCtrl Destructor +// +// Free up the backend if it exists +//--------------------------------------------------------------------------- +wxMediaCtrl::~wxMediaCtrl() +{ + if (m_imp) + delete m_imp; +} + +//--------------------------------------------------------------------------- +// wxMediaCtrl::Load (file version) +// wxMediaCtrl::Load (URL version) +// wxMediaCtrl::Load (URL & Proxy version) +// wxMediaCtrl::Load (wxInputStream version) +// +// Here we call load of the backend - keeping +// track of whether it was successful or not - which +// will determine which later method calls work +//--------------------------------------------------------------------------- +bool wxMediaCtrl::Load(const wxString& fileName) +{ + if(m_imp) + return (m_bLoaded = m_imp->Load(fileName)); + return false; +} + +bool wxMediaCtrl::Load(const wxURI& location) +{ + if(m_imp) + return (m_bLoaded = m_imp->Load(location)); + return false; +} + +bool wxMediaCtrl::Load(const wxURI& location, const wxURI& proxy) +{ + if(m_imp) + return (m_bLoaded = m_imp->Load(location, proxy)); + return false; +} + +//--------------------------------------------------------------------------- +// wxMediaCtrl::Play +// wxMediaCtrl::Pause +// wxMediaCtrl::Stop +// wxMediaCtrl::GetPlaybackRate +// wxMediaCtrl::SetPlaybackRate +// wxMediaCtrl::Seek --> SetPosition +// wxMediaCtrl::Tell --> GetPosition +// wxMediaCtrl::Length --> GetDuration +// wxMediaCtrl::GetState +// wxMediaCtrl::DoGetBestSize +// wxMediaCtrl::SetVolume +// wxMediaCtrl::GetVolume +// wxMediaCtrl::ShowInterface +// wxMediaCtrl::GetDownloadProgress +// wxMediaCtrl::GetDownloadTotal +// +// 1) Check to see whether the backend exists and is loading +// 2) Call the backend's version of the method, returning success +// if the backend's version succeeds +//--------------------------------------------------------------------------- +bool wxMediaCtrl::Play() +{ + if(m_imp && m_bLoaded) + return m_imp->Play(); + return 0; +} + +bool wxMediaCtrl::Pause() +{ + if(m_imp && m_bLoaded) + return m_imp->Pause(); + return 0; +} + +bool wxMediaCtrl::Stop() +{ + if(m_imp && m_bLoaded) + return m_imp->Stop(); + return 0; +} + +double wxMediaCtrl::GetPlaybackRate() +{ + if(m_imp && m_bLoaded) + return m_imp->GetPlaybackRate(); + return 0; +} + +bool wxMediaCtrl::SetPlaybackRate(double dRate) +{ + if(m_imp && m_bLoaded) + return m_imp->SetPlaybackRate(dRate); + return false; +} + +wxFileOffset wxMediaCtrl::Seek(wxFileOffset where, wxSeekMode mode) +{ + wxFileOffset offset; + + switch (mode) + { + case wxFromStart: + offset = where; + break; + case wxFromEnd: + offset = Length() - where; + break; +// case wxFromCurrent: + default: + offset = Tell() + where; + break; + } + + if(m_imp && m_bLoaded && m_imp->SetPosition(offset)) + return offset; + return wxInvalidOffset; +} + +wxFileOffset wxMediaCtrl::Tell() +{ + if(m_imp && m_bLoaded) + return (wxFileOffset) m_imp->GetPosition().ToLong(); + return wxInvalidOffset; +} + +wxFileOffset wxMediaCtrl::Length() +{ + if(m_imp && m_bLoaded) + return (wxFileOffset) m_imp->GetDuration().ToLong(); + return wxInvalidOffset; +} + +wxMediaState wxMediaCtrl::GetState() +{ + if(m_imp && m_bLoaded) + return m_imp->GetState(); + return wxMEDIASTATE_STOPPED; +} + +wxSize wxMediaCtrl::DoGetBestSize() const +{ + if(m_imp) + return m_imp->GetVideoSize(); + return wxSize(0,0); +} + +double wxMediaCtrl::GetVolume() +{ + if(m_imp && m_bLoaded) + return m_imp->GetVolume(); + return 0.0; +} + +bool wxMediaCtrl::SetVolume(double dVolume) +{ + if(m_imp && m_bLoaded) + return m_imp->SetVolume(dVolume); + return false; +} + +bool wxMediaCtrl::ShowPlayerControls(wxMediaCtrlPlayerControls flags) +{ + if(m_imp) + return m_imp->ShowPlayerControls(flags); + return false; +} + +wxFileOffset wxMediaCtrl::GetDownloadProgress() +{ + if(m_imp && m_bLoaded) + return (wxFileOffset) m_imp->GetDownloadProgress().ToLong(); + return wxInvalidOffset; +} + +wxFileOffset wxMediaCtrl::GetDownloadTotal() +{ + if(m_imp && m_bLoaded) + return (wxFileOffset) m_imp->GetDownloadTotal().ToLong(); + return wxInvalidOffset; +} + +//--------------------------------------------------------------------------- +// wxMediaCtrl::DoMoveWindow +// +// 1) Call parent's version so that our control's window moves where +// it's supposed to +// 2) If the backend exists and is loaded, move the video +// of the media to where our control's window is now located +//--------------------------------------------------------------------------- +void wxMediaCtrl::DoMoveWindow(int x, int y, int w, int h) +{ + wxControl::DoMoveWindow(x,y,w,h); + + if(m_imp) + m_imp->Move(x, y, w, h); +} + +//--------------------------------------------------------------------------- +// wxMediaCtrl::MacVisibilityChanged +//--------------------------------------------------------------------------- +#ifdef __WXOSX_CARBON__ +void wxMediaCtrl::MacVisibilityChanged() +{ + wxControl::MacVisibilityChanged(); + + if(m_imp) + m_imp->MacVisibilityChanged(); +} +#endif + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// +// wxMediaBackendCommonBase +// +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +void wxMediaBackendCommonBase::NotifyMovieSizeChanged() +{ + // our best size changed after opening a new file + m_ctrl->InvalidateBestSize(); + m_ctrl->SetSize(m_ctrl->GetSize()); + + // if the parent of the control has a sizer ask it to refresh our size + wxWindow * const parent = m_ctrl->GetParent(); + if ( parent->GetSizer() ) + { + m_ctrl->GetParent()->Layout(); + m_ctrl->GetParent()->Refresh(); + m_ctrl->GetParent()->Update(); + } +} + +void wxMediaBackendCommonBase::NotifyMovieLoaded() +{ + NotifyMovieSizeChanged(); + + // notify about movie being fully loaded + QueueEvent(wxEVT_MEDIA_LOADED); +} + +bool wxMediaBackendCommonBase::SendStopEvent() +{ + wxMediaEvent theEvent(wxEVT_MEDIA_STOP, m_ctrl->GetId()); + + return !m_ctrl->GetEventHandler()->ProcessEvent(theEvent) || theEvent.IsAllowed(); +} + +void wxMediaBackendCommonBase::QueueEvent(wxEventType evtType) +{ + wxMediaEvent theEvent(evtType, m_ctrl->GetId()); + m_ctrl->GetEventHandler()->AddPendingEvent(theEvent); +} + +void wxMediaBackendCommonBase::QueuePlayEvent() +{ + QueueEvent(wxEVT_MEDIA_STATECHANGED); + QueueEvent(wxEVT_MEDIA_PLAY); +} + +void wxMediaBackendCommonBase::QueuePauseEvent() +{ + QueueEvent(wxEVT_MEDIA_STATECHANGED); + QueueEvent(wxEVT_MEDIA_PAUSE); +} + +void wxMediaBackendCommonBase::QueueStopEvent() +{ + QueueEvent(wxEVT_MEDIA_STATECHANGED); + QueueEvent(wxEVT_MEDIA_STOP); +} + + +// +// Force link default backends in - +// see http://wiki.wxwidgets.org/wiki.pl?RTTI +// +#include "wx/html/forcelnk.h" + +#ifdef __WXMSW__ // MSW has huge backends so we do it separately +FORCE_LINK(wxmediabackend_am) +FORCE_LINK(wxmediabackend_wmp10) +#else +FORCE_LINK(basewxmediabackends) +#endif + +#endif //wxUSE_MEDIACTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/memory.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/memory.cpp new file mode 100644 index 0000000000..6dc5d026d2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/memory.cpp @@ -0,0 +1,1151 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/memory.cpp +// Purpose: Memory checking implementation +// Author: Arthur Seaton, Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_MEMORY_TRACING || wxUSE_DEBUG_CONTEXT + +#include "wx/memory.h" + +#ifndef WX_PRECOMP + #ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" + #endif + #include "wx/utils.h" + #include "wx/app.h" + #include "wx/hash.h" + #include "wx/log.h" +#endif + +#if wxUSE_THREADS + #include "wx/thread.h" +#endif + +#include + +#include "wx/ioswrap.h" + +#if !defined(__WATCOMC__) && !(defined(__VMS__) && ( __VMS_VER < 70000000 ) ) +#include +#endif + +#include +#include + +#if wxUSE_THREADS +#define USE_THREADSAFE_MEMORY_ALLOCATION 1 +#else +#define USE_THREADSAFE_MEMORY_ALLOCATION 0 +#endif + + +#ifdef new +#undef new +#endif + +// wxDebugContext wxTheDebugContext; +/* + Redefine new and delete so that we can pick up situations where: + - we overwrite or underwrite areas of malloc'd memory. + - we use uninitialise variables + Only do this in debug mode. + + We change new to get enough memory to allocate a struct, followed + by the caller's requested memory, followed by a tag. The struct + is used to create a doubly linked list of these areas and also + contains another tag. The tags are used to determine when the area + has been over/under written. +*/ + + +/* + Values which are used to set the markers which will be tested for + under/over write. There are 3 of these, one in the struct, one + immediately after the struct but before the caller requested memory and + one immediately after the requested memory. +*/ +#define MemStartCheck 0x23A8 +#define MemMidCheck 0xA328 +#define MemEndCheck 0x8A32 +#define MemFillChar 0xAF +#define MemStructId 0x666D + +/* + External interface for the wxMemStruct class. Others are + defined inline within the class def. Here we only need to be able + to add and delete nodes from the list and handle errors in some way. +*/ + +/* + Used for internal "this shouldn't happen" type of errors. +*/ +void wxMemStruct::ErrorMsg (const char * mesg) +{ + wxLogMessage(wxT("wxWidgets memory checking error: %s"), mesg); + PrintNode (); +} + +/* + Used when we find an overwrite or an underwrite error. +*/ +void wxMemStruct::ErrorMsg () +{ + wxLogMessage(wxT("wxWidgets over/underwrite memory error:")); + PrintNode (); +} + + +/* + We want to find out if pointers have been overwritten as soon as is + possible, so test everything before we dereference it. Of course it's still + quite possible that, if things have been overwritten, this function will + fall over, but the only way of dealing with that would cost too much in terms + of time. +*/ +int wxMemStruct::AssertList () +{ + if ((wxDebugContext::GetHead() && !wxDebugContext::GetHead()->AssertIt()) || + (wxDebugContext::GetTail() && !wxDebugContext::GetTail()->AssertIt())) + { + ErrorMsg ("Head or tail pointers trashed"); + return 0; + } + return 1; +} + + +/* + Check that the thing we're pointing to has the correct id for a wxMemStruct + object and also that it's previous and next pointers are pointing at objects + which have valid ids. + This is definitely not perfect since we could fall over just trying to access + any of the slots which we use here, but I think it's about the best that I + can do without doing something like taking all new wxMemStruct pointers and + comparing them against all known pointer within the list and then only + doing this sort of check _after_ you've found the pointer in the list. That + would be safer, but also much more time consuming. +*/ +int wxMemStruct::AssertIt () +{ + return (m_id == MemStructId && + (m_prev == 0 || m_prev->m_id == MemStructId) && + (m_next == 0 || m_next->m_id == MemStructId)); +} + + +/* + Additions are always at the tail of the list. + Returns 0 on error, non-zero on success. +*/ +int wxMemStruct::Append () +{ + if (! AssertList ()) + return 0; + + if (wxDebugContext::GetHead () == 0) { + if (wxDebugContext::GetTail () != 0) { + ErrorMsg ("Null list should have a null tail pointer"); + return 0; + } + (void) wxDebugContext::SetHead (this); + (void) wxDebugContext::SetTail (this); + } else { + wxDebugContext::GetTail ()->m_next = this; + this->m_prev = wxDebugContext::GetTail (); + (void) wxDebugContext::SetTail (this); + } + return 1; +} + + +/* + Don't actually free up anything here as the space which is used + by the node will be free'd up when the whole block is free'd. + Returns 0 on error, non-zero on success. +*/ +int wxMemStruct::Unlink () +{ + if (! AssertList ()) + return 0; + + if (wxDebugContext::GetHead () == 0 || wxDebugContext::GetTail () == 0) { + ErrorMsg ("Trying to remove node from empty list"); + return 0; + } + + // Handle the part of the list before this node. + if (m_prev == 0) { + if (this != wxDebugContext::GetHead ()) { + ErrorMsg ("No previous node for non-head node"); + return 0; + } + (void) wxDebugContext::SetHead (m_next); + } else { + if (! m_prev->AssertIt ()) { + ErrorMsg ("Trashed previous pointer"); + return 0; + } + + if (m_prev->m_next != this) { + ErrorMsg ("List is inconsistent"); + return 0; + } + m_prev->m_next = m_next; + } + + // Handle the part of the list after this node. + if (m_next == 0) { + if (this != wxDebugContext::GetTail ()) { + ErrorMsg ("No next node for non-tail node"); + return 0; + } + (void) wxDebugContext::SetTail (m_prev); + } else { + if (! m_next->AssertIt ()) { + ErrorMsg ("Trashed next pointer"); + return 0; + } + + if (m_next->m_prev != this) { + ErrorMsg ("List is inconsistent"); + return 0; + } + m_next->m_prev = m_prev; + } + + return 1; +} + + + +/* + Checks a node and block of memory to see that the markers are still + intact. +*/ +int wxMemStruct::CheckBlock () +{ + int nFailures = 0; + + if (m_firstMarker != MemStartCheck) { + nFailures++; + ErrorMsg (); + } + + char * pointer = wxDebugContext::MidMarkerPos ((char *) this); + if (* (wxMarkerType *) pointer != MemMidCheck) { + nFailures++; + ErrorMsg (); + } + + pointer = wxDebugContext::EndMarkerPos ((char *) this, RequestSize ()); + if (* (wxMarkerType *) pointer != MemEndCheck) { + nFailures++; + ErrorMsg (); + } + + return nFailures; +} + + +/* + Check the list of nodes to see if they are all ok. +*/ +int wxMemStruct::CheckAllPrevious () +{ + int nFailures = 0; + + for (wxMemStruct * st = this->m_prev; st != 0; st = st->m_prev) { + if (st->AssertIt ()) + nFailures += st->CheckBlock (); + else + return -1; + } + + return nFailures; +} + + +/* + When we delete a node we set the id slot to a specific value and then test + against this to see if a nodes have been deleted previously. I don't + just set the entire memory to the fillChar because then I'd be overwriting + useful stuff like the vtbl which may be needed to output the error message + including the file name and line numbers. Without this info the whole point + of this class is lost! +*/ +void wxMemStruct::SetDeleted () +{ + m_id = MemFillChar; +} + +int wxMemStruct::IsDeleted () +{ + return (m_id == MemFillChar); +} + + +/* + Print out a single node. There are many far better ways of doing this + but this will suffice for now. +*/ +void wxMemStruct::PrintNode () +{ + if (m_isObject) + { + wxObject *obj = (wxObject *)m_actualData; + wxClassInfo *info = obj->GetClassInfo(); + + // Let's put this in standard form so IDEs can load the file at the appropriate + // line + wxString msg; + + if (m_fileName) + msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum); + + if (info && info->GetClassName()) + msg += info->GetClassName(); + else + msg += wxT("object"); + + wxString msg2; + msg2.Printf(wxT(" at 0x%lX, size %d"), (long)GetActualData(), (int)RequestSize()); + msg += msg2; + + wxLogMessage(msg); + } + else + { + wxString msg; + + if (m_fileName) + msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum); + msg += wxT("non-object data"); + wxString msg2; + msg2.Printf(wxT(" at 0x%lX, size %d\n"), (long)GetActualData(), (int)RequestSize()); + msg += msg2; + + wxLogMessage(msg); + } +} + +void wxMemStruct::Dump () +{ + if (!ValidateNode()) return; + + if (m_isObject) + { + wxObject *obj = (wxObject *)m_actualData; + + wxString msg; + if (m_fileName) + msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum); + + + /* TODO: We no longer have a stream (using wxLogDebug) so we can't dump it. + * Instead, do what wxObject::Dump does. + * What should we do long-term, eliminate Dumping? Or specify + * that MyClass::Dump should use wxLogDebug? Ugh. + obj->Dump(wxDebugContext::GetStream()); + */ + + if (obj->GetClassInfo() && obj->GetClassInfo()->GetClassName()) + msg += obj->GetClassInfo()->GetClassName(); + else + msg += wxT("unknown object class"); + + wxString msg2; + msg2.Printf(wxT(" at 0x%lX, size %d"), (long)GetActualData(), (int)RequestSize()); + msg += msg2; + + wxDebugContext::OutputDumpLine(msg.c_str()); + } + else + { + wxString msg; + if (m_fileName) + msg.Printf(wxT("%s(%d): "), m_fileName, (int)m_lineNum); + + wxString msg2; + msg2.Printf(wxT("non-object data at 0x%lX, size %d"), (long)GetActualData(), (int)RequestSize() ); + msg += msg2; + wxDebugContext::OutputDumpLine(msg.c_str()); + } +} + + +/* + Validate a node. Check to see that the node is "clean" in the sense + that nothing has over/underwritten it etc. +*/ +int wxMemStruct::ValidateNode () +{ + char * startPointer = (char *) this; + if (!AssertIt ()) { + if (IsDeleted ()) + ErrorMsg ("Object already deleted"); + else { + // Can't use the error routines as we have no recognisable object. +#ifndef __WXGTK__ + wxLogMessage(wxT("Can't verify memory struct - all bets are off!")); +#endif + } + return 0; + } + +/* + int i; + for (i = 0; i < wxDebugContext::TotSize (requestSize ()); i++) + cout << startPointer [i]; + cout << endl; +*/ + if (Marker () != MemStartCheck) + ErrorMsg (); + if (* (wxMarkerType *) wxDebugContext::MidMarkerPos (startPointer) != MemMidCheck) + ErrorMsg (); + if (* (wxMarkerType *) wxDebugContext::EndMarkerPos (startPointer, + RequestSize ()) != + MemEndCheck) + ErrorMsg (); + + // Back to before the extra buffer and check that + // we can still read what we originally wrote. + if (Marker () != MemStartCheck || + * (wxMarkerType *) wxDebugContext::MidMarkerPos (startPointer) + != MemMidCheck || + * (wxMarkerType *) wxDebugContext::EndMarkerPos (startPointer, + RequestSize ()) != MemEndCheck) + { + ErrorMsg (); + return 0; + } + + return 1; +} + +/* + The wxDebugContext class. +*/ + +wxMemStruct *wxDebugContext::m_head = NULL; +wxMemStruct *wxDebugContext::m_tail = NULL; + +bool wxDebugContext::m_checkPrevious = false; +int wxDebugContext::debugLevel = 1; +bool wxDebugContext::debugOn = true; +wxMemStruct *wxDebugContext::checkPoint = NULL; + +// For faster alignment calculation +static wxMarkerType markerCalc[2]; +int wxDebugContext::m_balign = (int)((char *)&markerCalc[1] - (char*)&markerCalc[0]); +int wxDebugContext::m_balignmask = (int)((char *)&markerCalc[1] - (char*)&markerCalc[0]) - 1; + +// Pointer to global function to call at shutdown +wxShutdownNotifyFunction wxDebugContext::sm_shutdownFn; + +wxDebugContext::wxDebugContext(void) +{ +} + +wxDebugContext::~wxDebugContext(void) +{ +} + +/* + Work out the positions of the markers by creating an array of 2 markers + and comparing the addresses of the 2 elements. Use this number as the + alignment for markers. +*/ +size_t wxDebugContext::CalcAlignment () +{ + wxMarkerType ar[2]; + return (char *) &ar[1] - (char *) &ar[0]; +} + + +char * wxDebugContext::StructPos (const char * buf) +{ + return (char *) buf; +} + +char * wxDebugContext::MidMarkerPos (const char * buf) +{ + return StructPos (buf) + PaddedSize (sizeof (wxMemStruct)); +} + +char * wxDebugContext::CallerMemPos (const char * buf) +{ + return MidMarkerPos (buf) + PaddedSize (sizeof(wxMarkerType)); +} + + +char * wxDebugContext::EndMarkerPos (const char * buf, const size_t size) +{ + return CallerMemPos (buf) + PaddedSize (size); +} + + +/* + Slightly different as this takes a pointer to the start of the caller + requested region and returns a pointer to the start of the buffer. + */ +char * wxDebugContext::StartPos (const char * caller) +{ + return ((char *) (caller - wxDebugContext::PaddedSize (sizeof(wxMarkerType)) - + wxDebugContext::PaddedSize (sizeof (wxMemStruct)))); +} + +/* + We may need padding between various parts of the allocated memory. + Given a size of memory, this returns the amount of memory which should + be allocated in order to allow for alignment of the following object. + + I don't know how portable this stuff is, but it seems to work for me at + the moment. It would be real nice if I knew more about this! + + // Note: this function is now obsolete (along with CalcAlignment) + // because the calculations are done statically, for greater speed. +*/ +size_t wxDebugContext::GetPadding (const size_t size) +{ + size_t pad = size % CalcAlignment (); + return (pad) ? sizeof(wxMarkerType) - pad : 0; +} + +size_t wxDebugContext::PaddedSize (const size_t size) +{ + // Added by Terry Farnham to replace + // slow GetPadding call. + int padb; + + padb = size & m_balignmask; + if(padb) + return(size + m_balign - padb); + else + return(size); +} + +/* + Returns the total amount of memory which we need to get from the system + in order to satisfy a caller request. This includes space for the struct + plus markers and the caller's memory as well. +*/ +size_t wxDebugContext::TotSize (const size_t reqSize) +{ + return (PaddedSize (sizeof (wxMemStruct)) + PaddedSize (reqSize) + + 2 * sizeof(wxMarkerType)); +} + + +/* + Traverse the list of nodes executing the given function on each node. +*/ +void wxDebugContext::TraverseList (PmSFV func, wxMemStruct *from) +{ + if (!from) + from = wxDebugContext::GetHead (); + + wxMemStruct * st = NULL; + for (st = from; st != 0; st = st->m_next) + { + void* data = st->GetActualData(); +// if ((data != (void*)m_debugStream) && (data != (void*) m_streamBuf)) + if (data != (void*) wxLog::GetActiveTarget()) + { + (st->*func) (); + } + } +} + + +/* + Print out the list. + */ +bool wxDebugContext::PrintList (void) +{ + TraverseList ((PmSFV)&wxMemStruct::PrintNode, (checkPoint ? checkPoint->m_next : NULL)); + + return true; +} + +bool wxDebugContext::Dump(void) +{ + { + const wxChar* appName = wxT("application"); + wxString appNameStr; + if (wxTheApp) + { + appNameStr = wxTheApp->GetAppName(); + appName = appNameStr.c_str(); + OutputDumpLine(wxT("----- Memory dump of %s at %s -----"), appName, static_cast(wxNow().c_str())); + } + else + { + OutputDumpLine( wxT("----- Memory dump -----") ); + } + } + + TraverseList ((PmSFV)&wxMemStruct::Dump, (checkPoint ? checkPoint->m_next : NULL)); + + OutputDumpLine(wxEmptyString); + OutputDumpLine(wxEmptyString); + + return true; +} + +struct wxDebugStatsStruct +{ + long instanceCount; + long totalSize; + wxChar *instanceClass; + wxDebugStatsStruct *next; +}; + +static wxDebugStatsStruct *FindStatsStruct(wxDebugStatsStruct *st, wxChar *name) +{ + while (st) + { + if (wxStrcmp(st->instanceClass, name) == 0) + return st; + st = st->next; + } + return NULL; +} + +static wxDebugStatsStruct *InsertStatsStruct(wxDebugStatsStruct *head, wxDebugStatsStruct *st) +{ + st->next = head; + return st; +} + +bool wxDebugContext::PrintStatistics(bool detailed) +{ + { + const wxChar* appName = wxT("application"); + wxString appNameStr; + if (wxTheApp) + { + appNameStr = wxTheApp->GetAppName(); + appName = appNameStr.c_str(); + OutputDumpLine(wxT("----- Memory statistics of %s at %s -----"), appName, static_cast(wxNow().c_str())); + } + else + { + OutputDumpLine( wxT("----- Memory statistics -----") ); + } + } + + bool currentMode = GetDebugMode(); + SetDebugMode(false); + + long noNonObjectNodes = 0; + long noObjectNodes = 0; + long totalSize = 0; + + wxDebugStatsStruct *list = NULL; + + wxMemStruct *from = (checkPoint ? checkPoint->m_next : NULL ); + if (!from) + from = wxDebugContext::GetHead (); + + wxMemStruct *st; + for (st = from; st != 0; st = st->m_next) + { + void* data = st->GetActualData(); + if (detailed && (data != (void*) wxLog::GetActiveTarget())) + { + wxChar *className = (wxChar*) wxT("nonobject"); + if (st->m_isObject && st->GetActualData()) + { + wxObject *obj = (wxObject *)st->GetActualData(); + if (obj->GetClassInfo()->GetClassName()) + className = (wxChar*)obj->GetClassInfo()->GetClassName(); + } + wxDebugStatsStruct *stats = FindStatsStruct(list, className); + if (!stats) + { + stats = (wxDebugStatsStruct *)malloc(sizeof(wxDebugStatsStruct)); + stats->instanceClass = className; + stats->instanceCount = 0; + stats->totalSize = 0; + list = InsertStatsStruct(list, stats); + } + stats->instanceCount ++; + stats->totalSize += st->RequestSize(); + } + + if (data != (void*) wxLog::GetActiveTarget()) + { + totalSize += st->RequestSize(); + if (st->m_isObject) + noObjectNodes ++; + else + noNonObjectNodes ++; + } + } + + if (detailed) + { + while (list) + { + OutputDumpLine(wxT("%ld objects of class %s, total size %ld"), + list->instanceCount, list->instanceClass, list->totalSize); + wxDebugStatsStruct *old = list; + list = old->next; + free((char *)old); + } + OutputDumpLine(wxEmptyString); + } + + SetDebugMode(currentMode); + + OutputDumpLine(wxT("Number of object items: %ld"), noObjectNodes); + OutputDumpLine(wxT("Number of non-object items: %ld"), noNonObjectNodes); + OutputDumpLine(wxT("Total allocated size: %ld"), totalSize); + OutputDumpLine(wxEmptyString); + OutputDumpLine(wxEmptyString); + + return true; +} + +bool wxDebugContext::PrintClasses(void) +{ + { + const wxChar* appName = wxT("application"); + wxString appNameStr; + if (wxTheApp) + { + appNameStr = wxTheApp->GetAppName(); + appName = appNameStr.c_str(); + wxLogMessage(wxT("----- Classes in %s -----"), appName); + } + } + + int n = 0; + const wxClassInfo *info; + + for (wxClassInfo::const_iterator node = wxClassInfo::begin_classinfo(), + end = wxClassInfo::end_classinfo(); + node != end; ++node) + { + info = *node; + if (info->GetClassName()) + { + wxString msg(info->GetClassName()); + msg += wxT(" "); + + if (info->GetBaseClassName1() && !info->GetBaseClassName2()) + { + msg += wxT("is a "); + msg += info->GetBaseClassName1(); + } + else if (info->GetBaseClassName1() && info->GetBaseClassName2()) + { + msg += wxT("is a "); + msg += info->GetBaseClassName1() ; + msg += wxT(", "); + msg += info->GetBaseClassName2() ; + } + if (info->GetConstructor()) + msg += wxT(": dynamic"); + + wxLogMessage(msg); + } + n ++; + } + wxLogMessage(wxEmptyString); + wxLogMessage(wxT("There are %d classes derived from wxObject."), n); + wxLogMessage(wxEmptyString); + wxLogMessage(wxEmptyString); + return true; +} + +void wxDebugContext::SetCheckpoint(bool all) +{ + if (all) + checkPoint = NULL; + else + checkPoint = m_tail; +} + +// Checks all nodes since checkpoint, or since start. +int wxDebugContext::Check(bool checkAll) +{ + int nFailures = 0; + + wxMemStruct *from = (checkPoint ? checkPoint->m_next : NULL ); + if (!from || checkAll) + from = wxDebugContext::GetHead (); + + for (wxMemStruct * st = from; st != 0; st = st->m_next) + { + if (st->AssertIt ()) + nFailures += st->CheckBlock (); + else + return -1; + } + + return nFailures; +} + +// Count the number of non-wxDebugContext-related objects +// that are outstanding +int wxDebugContext::CountObjectsLeft(bool sinceCheckpoint) +{ + int n = 0; + + wxMemStruct *from = NULL; + if (sinceCheckpoint && checkPoint) + from = checkPoint->m_next; + else + from = wxDebugContext::GetHead () ; + + for (wxMemStruct * st = from; st != 0; st = st->m_next) + { + void* data = st->GetActualData(); + if (data != (void*) wxLog::GetActiveTarget()) + n ++; + } + + return n ; +} + +// This function is used to output the dump +void wxDebugContext::OutputDumpLine(const wxChar *szFormat, ...) +{ + // a buffer of 2048 bytes should be long enough for a file name + // and a class name + wxChar buf[2048]; + int count; + va_list argptr; + va_start(argptr, szFormat); + buf[WXSIZEOF(buf)-1] = wxT('\0'); + + // keep 3 bytes for a \r\n\0 + count = wxVsnprintf(buf, WXSIZEOF(buf)-3, szFormat, argptr); + + if ( count < 0 ) + count = WXSIZEOF(buf)-3; + buf[count]=wxT('\r'); + buf[count+1]=wxT('\n'); + buf[count+2]=wxT('\0'); + + wxMessageOutputDebug dbgout; + dbgout.Printf(buf); +} + +void wxDebugContext::SetShutdownNotifyFunction(wxShutdownNotifyFunction shutdownFn) +{ + sm_shutdownFn = shutdownFn; +} + + +#if USE_THREADSAFE_MEMORY_ALLOCATION +static bool memSectionOk = false; + +class MemoryCriticalSection : public wxCriticalSection +{ +public: + MemoryCriticalSection() { + memSectionOk = true; + } + ~MemoryCriticalSection() { + memSectionOk = false; + } +}; + +class MemoryCriticalSectionLocker +{ +public: + inline MemoryCriticalSectionLocker(wxCriticalSection& critsect) + : m_critsect(critsect), m_locked(memSectionOk) { if(m_locked) m_critsect.Enter(); } + inline ~MemoryCriticalSectionLocker() { if(m_locked) m_critsect.Leave(); } + +private: + // no assignment operator nor copy ctor + MemoryCriticalSectionLocker(const MemoryCriticalSectionLocker&); + MemoryCriticalSectionLocker& operator=(const MemoryCriticalSectionLocker&); + + wxCriticalSection& m_critsect; + bool m_locked; +}; + +static MemoryCriticalSection memLocker; + +#endif // USE_THREADSAFE_MEMORY_ALLOCATION + + +#if !(defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))) +#if wxUSE_GLOBAL_MEMORY_OPERATORS +void * operator new (size_t size, wxChar * fileName, int lineNum) +{ + return wxDebugAlloc(size, fileName, lineNum, false, false); +} + +void * operator new (size_t size) +{ + return wxDebugAlloc(size, NULL, 0, false); +} + +void operator delete (void * buf) +{ + wxDebugFree(buf, false); +} + +#if wxUSE_ARRAY_MEMORY_OPERATORS +void * operator new[] (size_t size) +{ + return wxDebugAlloc(size, NULL, 0, false, true); +} + +void * operator new[] (size_t size, wxChar * fileName, int lineNum) +{ + return wxDebugAlloc(size, fileName, lineNum, false, true); +} + +void operator delete[] (void * buf) +{ + wxDebugFree(buf, true); +} +#endif // wxUSE_ARRAY_MEMORY_OPERATORS +#endif // wxUSE_GLOBAL_MEMORY_OPERATORS +#endif // !(defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE))) + +// TODO: store whether this is a vector or not. +void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool WXUNUSED(isVect) ) +{ +#if USE_THREADSAFE_MEMORY_ALLOCATION + MemoryCriticalSectionLocker lock(memLocker); +#endif + + // If not in debugging allocation mode, do the normal thing + // so we don't leave any trace of ourselves in the node list. + +#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ) +// VA 3.0 still has trouble in here + return (void *)malloc(size); +#endif + if (!wxDebugContext::GetDebugMode()) + { + return (void *)malloc(size); + } + + int totSize = wxDebugContext::TotSize (size); + char * buf = (char *) malloc(totSize); + if (!buf) { + wxLogMessage(wxT("Call to malloc (%ld) failed."), (long)size); + return 0; + } + wxMemStruct * st = (wxMemStruct *)buf; + st->m_firstMarker = MemStartCheck; + st->m_reqSize = size; + st->m_fileName = fileName; + st->m_lineNum = lineNum; + st->m_id = MemStructId; + st->m_prev = 0; + st->m_next = 0; + st->m_isObject = isObject; + + // Errors from Append() shouldn't really happen - but just in case! + if (st->Append () == 0) { + st->ErrorMsg ("Trying to append new node"); + } + + if (wxDebugContext::GetCheckPrevious ()) { + if (st->CheckAllPrevious () < 0) { + st->ErrorMsg ("Checking previous nodes"); + } + } + + // Set up the extra markers at the middle and end. + char * ptr = wxDebugContext::MidMarkerPos (buf); + * (wxMarkerType *) ptr = MemMidCheck; + ptr = wxDebugContext::EndMarkerPos (buf, size); + * (wxMarkerType *) ptr = MemEndCheck; + + // pointer returned points to the start of the caller's + // usable area. + void *m_actualData = (void *) wxDebugContext::CallerMemPos (buf); + st->m_actualData = m_actualData; + + return m_actualData; +} + +// TODO: check whether was allocated as a vector +void wxDebugFree(void * buf, bool WXUNUSED(isVect) ) +{ +#if USE_THREADSAFE_MEMORY_ALLOCATION + MemoryCriticalSectionLocker lock(memLocker); +#endif + + if (!buf) + return; + +#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ) +// VA 3.0 still has trouble in here + free((char *)buf); +#endif + // If not in debugging allocation mode, do the normal thing + // so we don't leave any trace of ourselves in the node list. + if (!wxDebugContext::GetDebugMode()) + { + free((char *)buf); + return; + } + + // Points to the start of the entire allocated area. + char * startPointer = wxDebugContext::StartPos ((char *) buf); + // Find the struct and make sure that it's identifiable. + wxMemStruct * st = (wxMemStruct *) wxDebugContext::StructPos (startPointer); + + if (! st->ValidateNode ()) + return; + + // If this is the current checkpoint, we need to + // move the checkpoint back so it points to a valid + // node. + if (st == wxDebugContext::checkPoint) + wxDebugContext::checkPoint = wxDebugContext::checkPoint->m_prev; + + if (! st->Unlink ()) + { + st->ErrorMsg ("Unlinking deleted node"); + } + + // Now put in the fill char into the id slot and the caller requested + // memory locations. + st->SetDeleted (); + (void) memset (wxDebugContext::CallerMemPos (startPointer), MemFillChar, + st->RequestSize ()); + + free((char *)st); +} + +// Trace: send output to the current debugging stream +void wxTrace(const wxChar * ...) +{ +#if 1 + wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead.")); +#else + va_list ap; + static wxChar buffer[512]; + + va_start(ap, fmt); + +#ifdef __WINDOWS__ + wvsprintf(buffer,fmt,ap) ; +#else + vsprintf(buffer,fmt,ap) ; +#endif + + va_end(ap); + + if (wxDebugContext::HasStream()) + { + wxDebugContext::GetStream() << buffer; + wxDebugContext::GetStream().flush(); + } + else +#ifdef __WINDOWS__ +#ifdef __WIN32__ + OutputDebugString((LPCTSTR)buffer) ; +#else + OutputDebugString((const char*) buffer) ; +#endif +#else + fprintf(stderr, buffer); +#endif +#endif +} + +// Trace with level +void wxTraceLevel(int, const wxChar * ...) +{ +#if 1 + wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead.")); +#else + if (wxDebugContext::GetLevel() < level) + return; + + va_list ap; + static wxChar buffer[512]; + + va_start(ap, fmt); + +#ifdef __WINDOWS__ + wxWvsprintf(buffer,fmt,ap) ; +#else + vsprintf(buffer,fmt,ap) ; +#endif + + va_end(ap); + + if (wxDebugContext::HasStream()) + { + wxDebugContext::GetStream() << buffer; + wxDebugContext::GetStream().flush(); + } + else +#ifdef __WINDOWS__ +#ifdef __WIN32__ + OutputDebugString((LPCTSTR)buffer) ; +#else + OutputDebugString((const char*) buffer) ; +#endif +#else + fprintf(stderr, buffer); +#endif +#endif +} + +//---------------------------------------------------------------------------- +// Final cleanup after all global objects in all files have been destroyed +//---------------------------------------------------------------------------- + +// Don't set it to 0 by dynamic initialization +// Some compilers will really do the assignment later +// All global variables are initialized to 0 at the very beginning, and this is just fine. +int wxDebugContextDumpDelayCounter::sm_count; + +wxDebugContextDumpDelayCounter::wxDebugContextDumpDelayCounter() +{ + sm_count++; +} + +wxDebugContextDumpDelayCounter::~wxDebugContextDumpDelayCounter() +{ + if ( !--sm_count ) + { + // Notify app if we've been asked to do that + if( wxDebugContext::sm_shutdownFn ) + wxDebugContext::sm_shutdownFn(); + DoDump(); + } +} + +void wxDebugContextDumpDelayCounter::DoDump() +{ + if (wxDebugContext::CountObjectsLeft(true) > 0) + { + wxDebugContext::OutputDumpLine(wxT("There were memory leaks.\n")); + wxDebugContext::Dump(); + wxDebugContext::PrintStatistics(); + } +} + +// Even if there is nothing else, make sure that there is at +// least one cleanup counter object +static wxDebugContextDumpDelayCounter wxDebugContextDumpDelayCounter_One; + +#endif // wxUSE_MEMORY_TRACING || wxUSE_DEBUG_CONTEXT diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/menucmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/menucmn.cpp new file mode 100644 index 0000000000..e92a047041 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/menucmn.cpp @@ -0,0 +1,1078 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/menucmn.cpp +// Purpose: wxMenu and wxMenuBar methods common to all ports +// Author: Vadim Zeitlin +// Modified by: +// Created: 26.10.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_MENUS + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/menu.h" + #include "wx/frame.h" +#endif + +#include "wx/stockitem.h" + +// ---------------------------------------------------------------------------- +// template lists +// ---------------------------------------------------------------------------- + +#include "wx/listimpl.cpp" + +WX_DEFINE_LIST(wxMenuList) +WX_DEFINE_LIST(wxMenuItemList) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// XTI for wxMenu(Bar) +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxMenuStyle ) +wxBEGIN_FLAGS( wxMenuStyle ) +wxFLAGS_MEMBER(wxMENU_TEAROFF) +wxEND_FLAGS( wxMenuStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxMenu, wxEvtHandler, "wx/menu.h") +wxCOLLECTION_TYPE_INFO( wxMenuItem *, wxMenuItemList ) ; + +#if wxUSE_EXTENDED_RTTI +template<> void wxCollectionToVariantArray( wxMenuItemList const &theList, + wxAnyList &value) +{ + wxListCollectionToAnyList( theList, value ) ; +} +#endif + +wxBEGIN_PROPERTIES_TABLE(wxMenu) +wxEVENT_PROPERTY( Select, wxEVT_MENU, wxCommandEvent) + +wxPROPERTY( Title, wxString, SetTitle, GetTitle, wxString(), \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) + +wxREADONLY_PROPERTY_FLAGS( MenuStyle, wxMenuStyle, long, GetStyle, \ + wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), \ + wxT("group")) // style + +wxPROPERTY_COLLECTION( MenuItems, wxMenuItemList, wxMenuItem*, Append, \ + GetMenuItems, 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxMenu) + +wxDIRECT_CONSTRUCTOR_2( wxMenu, wxString, Title, long, MenuStyle ) + +wxDEFINE_FLAGS( wxMenuBarStyle ) + +wxBEGIN_FLAGS( wxMenuBarStyle ) +wxFLAGS_MEMBER(wxMB_DOCKABLE) +wxEND_FLAGS( wxMenuBarStyle ) + +#if wxUSE_EXTENDED_RTTI +// the negative id would lead the window (its superclass !) to +// vetoe streaming out otherwise +bool wxMenuBarStreamingCallback( const wxObject *WXUNUSED(object), wxObjectWriter *, + wxObjectWriterCallback *, const wxStringToAnyHashMap & ) +{ + return true; +} +#endif + +wxIMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxMenuBar, wxWindow, "wx/menu.h", \ + wxMenuBarStreamingCallback) + + +#if wxUSE_EXTENDED_RTTI +WX_DEFINE_LIST( wxMenuInfoHelperList ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxMenuInfoHelper, wxObject, "wx/menu.h") + +wxBEGIN_PROPERTIES_TABLE(wxMenuInfoHelper) +wxREADONLY_PROPERTY( Menu, wxMenu*, GetMenu, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + +wxREADONLY_PROPERTY( Title, wxString, GetTitle, wxString(), \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxMenuInfoHelper) + +wxCONSTRUCTOR_2( wxMenuInfoHelper, wxMenu*, Menu, wxString, Title ) + +wxCOLLECTION_TYPE_INFO( wxMenuInfoHelper *, wxMenuInfoHelperList ) ; + +template<> void wxCollectionToVariantArray( wxMenuInfoHelperList const &theList, + wxAnyList &value) +{ + wxListCollectionToAnyList( theList, value ) ; +} + +#endif + +wxBEGIN_PROPERTIES_TABLE(wxMenuBar) +wxPROPERTY_COLLECTION( MenuInfos, wxMenuInfoHelperList, wxMenuInfoHelper*, AppendMenuInfo, \ + GetMenuInfos, 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxMenuBar) + +wxCONSTRUCTOR_DUMMY( wxMenuBar ) + +#if wxUSE_EXTENDED_RTTI + +const wxMenuInfoHelperList& wxMenuBarBase::GetMenuInfos() const +{ + wxMenuInfoHelperList* list = const_cast< wxMenuInfoHelperList* > (& m_menuInfos); + WX_CLEAR_LIST( wxMenuInfoHelperList, *list); + for (size_t i = 0 ; i < GetMenuCount(); ++i) + { + wxMenuInfoHelper* info = new wxMenuInfoHelper(); + info->Create( GetMenu(i), GetMenuLabel(i)); + list->Append(info); + } + return m_menuInfos; +} + +#endif + +// ---------------------------------------------------------------------------- +// XTI for wxMenuItem +// ---------------------------------------------------------------------------- + +#if wxUSE_EXTENDED_RTTI + +bool wxMenuItemStreamingCallback( const wxObject *object, wxObjectWriter *, + wxObjectWriterCallback *, const wxStringToAnyHashMap & ) +{ + const wxMenuItem * mitem = wx_dynamic_cast(const wxMenuItem*, object); + if ( mitem->GetMenu() && !mitem->GetMenu()->GetTitle().empty() ) + { + // we don't stream out the first two items for menus with a title, + // they will be reconstructed + if ( mitem->GetMenu()->FindItemByPosition(0) == mitem || + mitem->GetMenu()->FindItemByPosition(1) == mitem ) + return false; + } + return true; +} + +#endif + +wxBEGIN_ENUM( wxItemKind ) +wxENUM_MEMBER( wxITEM_SEPARATOR ) +wxENUM_MEMBER( wxITEM_NORMAL ) +wxENUM_MEMBER( wxITEM_CHECK ) +wxENUM_MEMBER( wxITEM_RADIO ) +wxEND_ENUM( wxItemKind ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxMenuItem, wxObject, "wx/menuitem.h", \ + wxMenuItemStreamingCallback) + +wxBEGIN_PROPERTIES_TABLE(wxMenuItem) +wxPROPERTY( Parent, wxMenu*, SetMenu, GetMenu, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) +wxPROPERTY( Id, int, SetId, GetId, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) +wxPROPERTY( ItemLabel, wxString, SetItemLabel, GetItemLabel, wxString(), \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) +wxPROPERTY( Help, wxString, SetHelp, GetHelp, wxString(), \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) +wxREADONLY_PROPERTY( Kind, wxItemKind, GetKind, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) +wxPROPERTY( SubMenu, wxMenu*, SetSubMenu, GetSubMenu, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) +wxPROPERTY( Enabled, bool, Enable, IsEnabled, wxAny((bool)true), \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) +wxPROPERTY( Checked, bool, Check, IsChecked, wxAny((bool)false), \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) +wxPROPERTY( Checkable, bool, SetCheckable, IsCheckable, wxAny((bool)false), \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxMenuItem) + +wxDIRECT_CONSTRUCTOR_6( wxMenuItem, wxMenu*, Parent, int, Id, wxString, \ + Text, wxString, Help, wxItemKind, Kind, wxMenu*, SubMenu ) + +// ---------------------------------------------------------------------------- +// wxMenuItemBase +// ---------------------------------------------------------------------------- + +wxMenuItemBase::wxMenuItemBase(wxMenu *parentMenu, + int itemid, + const wxString& text, + const wxString& help, + wxItemKind kind, + wxMenu *subMenu) +{ + switch ( itemid ) + { + case wxID_ANY: + m_id = wxWindow::NewControlId(); + break; + + case wxID_SEPARATOR: + m_id = wxID_SEPARATOR; + + // there is a lot of existing code just doing Append(wxID_SEPARATOR) + // and it makes sense to omit the following optional parameters, + // including the kind one which doesn't default to wxITEM_SEPARATOR, + // of course, so override it here + kind = wxITEM_SEPARATOR; + break; + + case wxID_NONE: + // (popup) menu titles in wxMSW use this ID to indicate that + // it's not a real menu item, so we don't want the check below to + // apply to it + m_id = itemid; + break; + + default: + // ids are limited to 16 bits under MSW so portable code shouldn't + // use ids outside of this range (negative ids generated by wx are + // fine though) + wxASSERT_MSG( (itemid >= 0 && itemid < SHRT_MAX) || + (itemid >= wxID_AUTO_LOWEST && itemid <= wxID_AUTO_HIGHEST), + wxS("invalid itemid value") ); + m_id = itemid; + } + + // notice that parentMenu can be NULL: the item can be attached to the menu + // later with SetMenu() + + m_parentMenu = parentMenu; + m_subMenu = subMenu; + m_isEnabled = true; + m_isChecked = false; + m_kind = kind; + + SetItemLabel(text); + SetHelp(help); +} + +wxMenuItemBase::~wxMenuItemBase() +{ + delete m_subMenu; +} + +#if wxUSE_ACCEL + +wxAcceleratorEntry *wxMenuItemBase::GetAccel() const +{ + return wxAcceleratorEntry::Create(GetItemLabel()); +} + +void wxMenuItemBase::SetAccel(wxAcceleratorEntry *accel) +{ + wxString text = m_text.BeforeFirst(wxT('\t')); + if ( accel ) + { + text += wxT('\t'); + text += accel->ToString(); + } + + SetItemLabel(text); +} + +#endif // wxUSE_ACCEL + +void wxMenuItemBase::SetItemLabel(const wxString& str) +{ + m_text = str; + + if ( m_text.empty() && !IsSeparator() ) + { + wxASSERT_MSG( wxIsStockID(GetId()), + wxT("A non-stock menu item with an empty label?") ); + m_text = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR | + wxSTOCK_WITH_MNEMONIC); + } +} + +void wxMenuItemBase::SetHelp(const wxString& str) +{ + m_help = str; + + if ( m_help.empty() && !IsSeparator() && wxIsStockID(GetId()) ) + { + // get a stock help string + m_help = wxGetStockHelpString(GetId()); + } +} + +#ifndef __WXPM__ +wxString wxMenuItemBase::GetLabelText(const wxString& text) +{ + return wxStripMenuCodes(text); +} +#endif + +#if WXWIN_COMPATIBILITY_2_8 +wxString wxMenuItemBase::GetLabelFromText(const wxString& text) +{ + return GetLabelText(text); +} +#endif + +bool wxMenuBase::ms_locked = true; + +// ---------------------------------------------------------------------------- +// wxMenu ctor and dtor +// ---------------------------------------------------------------------------- + +void wxMenuBase::Init(long style) +{ + m_menuBar = NULL; + m_menuParent = NULL; + + m_invokingWindow = NULL; + m_style = style; + m_clientData = NULL; + m_eventHandler = this; +} + +wxMenuBase::~wxMenuBase() +{ + WX_CLEAR_LIST(wxMenuItemList, m_items); +} + +// ---------------------------------------------------------------------------- +// wxMenu item adding/removing +// ---------------------------------------------------------------------------- + +void wxMenuBase::AddSubMenu(wxMenu *submenu) +{ + wxCHECK_RET( submenu, wxT("can't add a NULL submenu") ); + + submenu->SetParent((wxMenu *)this); +} + +wxMenuItem* wxMenuBase::DoAppend(wxMenuItem *item) +{ + wxCHECK_MSG( item, NULL, wxT("invalid item in wxMenu::Append()") ); + + m_items.Append(item); + item->SetMenu((wxMenu*)this); + if ( item->IsSubMenu() ) + { + AddSubMenu(item->GetSubMenu()); + } + + return item; +} + +wxMenuItem* wxMenuBase::Insert(size_t pos, wxMenuItem *item) +{ + wxCHECK_MSG( item, NULL, wxT("invalid item in wxMenu::Insert") ); + + if ( pos == GetMenuItemCount() ) + { + return DoAppend(item); + } + else + { + wxCHECK_MSG( pos < GetMenuItemCount(), NULL, + wxT("invalid index in wxMenu::Insert") ); + + return DoInsert(pos, item); + } +} + +wxMenuItem* wxMenuBase::DoInsert(size_t pos, wxMenuItem *item) +{ + wxCHECK_MSG( item, NULL, wxT("invalid item in wxMenu::Insert()") ); + + wxMenuItemList::compatibility_iterator node = m_items.Item(pos); + wxCHECK_MSG( node, NULL, wxT("invalid index in wxMenu::Insert()") ); + + m_items.Insert(node, item); + item->SetMenu((wxMenu*)this); + if ( item->IsSubMenu() ) + { + AddSubMenu(item->GetSubMenu()); + } + + return item; +} + +wxMenuItem *wxMenuBase::Remove(wxMenuItem *item) +{ + wxCHECK_MSG( item, NULL, wxT("invalid item in wxMenu::Remove") ); + + return DoRemove(item); +} + +wxMenuItem *wxMenuBase::DoRemove(wxMenuItem *item) +{ + wxMenuItemList::compatibility_iterator node = m_items.Find(item); + + // if we get here, the item is valid or one of Remove() functions is broken + wxCHECK_MSG( node, NULL, wxT("bug in wxMenu::Remove logic") ); + + // we detach the item, but we do delete the list node (i.e. don't call + // DetachNode() here!) + m_items.Erase(node); + + // item isn't attached to anything any more + item->SetMenu(NULL); + wxMenu *submenu = item->GetSubMenu(); + if ( submenu ) + { + submenu->SetParent(NULL); + if ( submenu->IsAttached() ) + submenu->Detach(); + } + + return item; +} + +bool wxMenuBase::Delete(wxMenuItem *item) +{ + wxCHECK_MSG( item, false, wxT("invalid item in wxMenu::Delete") ); + + return DoDelete(item); +} + +bool wxMenuBase::DoDelete(wxMenuItem *item) +{ + wxMenuItem *item2 = DoRemove(item); + wxCHECK_MSG( item2, false, wxT("failed to delete menu item") ); + + // don't delete the submenu + item2->SetSubMenu(NULL); + + delete item2; + + return true; +} + +bool wxMenuBase::Destroy(wxMenuItem *item) +{ + wxCHECK_MSG( item, false, wxT("invalid item in wxMenu::Destroy") ); + + return DoDestroy(item); +} + +bool wxMenuBase::DoDestroy(wxMenuItem *item) +{ + wxMenuItem *item2 = DoRemove(item); + wxCHECK_MSG( item2, false, wxT("failed to delete menu item") ); + + delete item2; + + return true; +} + +// ---------------------------------------------------------------------------- +// wxMenu searching for items +// ---------------------------------------------------------------------------- + +// Finds the item id matching the given string, wxNOT_FOUND if not found. +int wxMenuBase::FindItem(const wxString& text) const +{ + wxString label = wxMenuItem::GetLabelText(text); + for ( wxMenuItemList::compatibility_iterator node = m_items.GetFirst(); + node; + node = node->GetNext() ) + { + wxMenuItem *item = node->GetData(); + if ( item->IsSubMenu() ) + { + int rc = item->GetSubMenu()->FindItem(label); + if ( rc != wxNOT_FOUND ) + return rc; + } + + // we execute this code for submenus as well to alllow finding them by + // name just like the ordinary items + if ( !item->IsSeparator() ) + { + if ( item->GetItemLabelText() == label ) + return item->GetId(); + } + } + + return wxNOT_FOUND; +} + +// recursive search for item by id +wxMenuItem *wxMenuBase::FindItem(int itemId, wxMenu **itemMenu) const +{ + if ( itemMenu ) + *itemMenu = NULL; + + wxMenuItem *item = NULL; + for ( wxMenuItemList::compatibility_iterator node = m_items.GetFirst(); + node && !item; + node = node->GetNext() ) + { + item = node->GetData(); + + if ( item->GetId() == itemId ) + { + if ( itemMenu ) + *itemMenu = (wxMenu *)this; + } + else if ( item->IsSubMenu() ) + { + item = item->GetSubMenu()->FindItem(itemId, itemMenu); + } + else + { + // don't exit the loop + item = NULL; + } + } + + return item; +} + +// non recursive search +wxMenuItem *wxMenuBase::FindChildItem(int itemid, size_t *ppos) const +{ + wxMenuItem *item = NULL; + wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst(); + + size_t pos; + for ( pos = 0; node; pos++ ) + { + if ( node->GetData()->GetId() == itemid ) + { + item = node->GetData(); + + break; + } + + node = node->GetNext(); + } + + if ( ppos ) + { + *ppos = item ? pos : (size_t)wxNOT_FOUND; + } + + return item; +} + +// find by position +wxMenuItem* wxMenuBase::FindItemByPosition(size_t position) const +{ + wxCHECK_MSG( position < m_items.GetCount(), NULL, + wxT("wxMenu::FindItemByPosition(): invalid menu index") ); + + return m_items.Item( position )->GetData(); +} + +// ---------------------------------------------------------------------------- +// wxMenu helpers used by derived classes +// ---------------------------------------------------------------------------- + +// Update a menu and all submenus recursively. source is the object that has +// the update event handlers defined for it. If NULL, the menu or associated +// window will be used. +void wxMenuBase::UpdateUI(wxEvtHandler* source) +{ + wxWindow * const win = GetWindow(); + + if ( !source && win ) + source = win->GetEventHandler(); + if ( !source ) + source = GetEventHandler(); + if ( !source ) + source = this; + + wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst(); + while ( node ) + { + wxMenuItem* item = node->GetData(); + if ( !item->IsSeparator() ) + { + wxWindowID itemid = item->GetId(); + wxUpdateUIEvent event(itemid); + event.SetEventObject( this ); + + if ( source->ProcessEvent(event) ) + { + // if anything changed, update the changed attribute + if (event.GetSetText()) + SetLabel(itemid, event.GetText()); + if (event.GetSetChecked()) + Check(itemid, event.GetChecked()); + if (event.GetSetEnabled()) + Enable(itemid, event.GetEnabled()); + } + + // recurse to the submenus + if ( item->GetSubMenu() ) + item->GetSubMenu()->UpdateUI(source); + } + //else: item is a separator (which doesn't process update UI events) + + node = node->GetNext(); + } +} + +bool wxMenuBase::SendEvent(int itemid, int checked) +{ + wxCommandEvent event(wxEVT_MENU, itemid); + event.SetEventObject(this); + event.SetInt(checked); + + wxWindow* const win = GetWindow(); + wxMenuBar* const mb = GetMenuBar(); + + // Try the menu's event handler first + wxEvtHandler *handler = GetEventHandler(); + if ( handler ) + { + // Indicate to the event processing code that we're going to pass this + // event to another handler if it's not processed here to prevent it + // from passing the event to wxTheApp: this will be done below if we do + // have the associated window. + if ( win || mb ) + event.SetWillBeProcessedAgain(); + + if ( handler->SafelyProcessEvent(event) ) + return true; + } + + // If this menu is part of the menu bar, process the event there: this will + // also propagate it upwards to the window containing the menu bar. + if ( mb ) + return mb->HandleWindowEvent(event); + + // Try the window the menu was popped up from. + if ( win ) + return win->HandleWindowEvent(event); + + // Not processed. + return false; +} + +// ---------------------------------------------------------------------------- +// wxMenu attaching/detaching to/from menu bar +// ---------------------------------------------------------------------------- + +wxMenuBar* wxMenuBase::GetMenuBar() const +{ + if(GetParent()) + return GetParent()->GetMenuBar(); + return m_menuBar; +} + +void wxMenuBase::Attach(wxMenuBarBase *menubar) +{ + // use Detach() instead! + wxASSERT_MSG( menubar, wxT("menu can't be attached to NULL menubar") ); + + // use IsAttached() to prevent this from happening + wxASSERT_MSG( !m_menuBar, wxT("attaching menu twice?") ); + + m_menuBar = (wxMenuBar *)menubar; +} + +void wxMenuBase::Detach() +{ + // use IsAttached() to prevent this from happening + wxASSERT_MSG( m_menuBar, wxT("detaching unattached menu?") ); + + m_menuBar = NULL; +} + +// ---------------------------------------------------------------------------- +// wxMenu invoking window handling +// ---------------------------------------------------------------------------- + +void wxMenuBase::SetInvokingWindow(wxWindow *win) +{ + wxASSERT_MSG( !GetParent(), + "should only be called for top level popup menus" ); + wxASSERT_MSG( !IsAttached(), + "menus attached to menu bar can't have invoking window" ); + + m_invokingWindow = win; +} + +wxWindow *wxMenuBase::GetWindow() const +{ + // only the top level menus have non-NULL invoking window or a pointer to + // the menu bar so recurse upwards until we find it + const wxMenuBase *menu = this; + while ( menu->GetParent() ) + { + menu = menu->GetParent(); + } + + return menu->GetMenuBar() ? menu->GetMenuBar()->GetFrame() + : menu->GetInvokingWindow(); +} + +// ---------------------------------------------------------------------------- +// wxMenu functions forwarded to wxMenuItem +// ---------------------------------------------------------------------------- + +void wxMenuBase::Enable( int itemid, bool enable ) +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_RET( item, wxT("wxMenu::Enable: no such item") ); + + item->Enable(enable); +} + +bool wxMenuBase::IsEnabled( int itemid ) const +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_MSG( item, false, wxT("wxMenu::IsEnabled: no such item") ); + + return item->IsEnabled(); +} + +void wxMenuBase::Check( int itemid, bool enable ) +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_RET( item, wxT("wxMenu::Check: no such item") ); + + item->Check(enable); +} + +bool wxMenuBase::IsChecked( int itemid ) const +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_MSG( item, false, wxT("wxMenu::IsChecked: no such item") ); + + return item->IsChecked(); +} + +void wxMenuBase::SetLabel( int itemid, const wxString &label ) +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_RET( item, wxT("wxMenu::SetLabel: no such item") ); + + item->SetItemLabel(label); +} + +wxString wxMenuBase::GetLabel( int itemid ) const +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_MSG( item, wxEmptyString, wxT("wxMenu::GetLabel: no such item") ); + + return item->GetItemLabel(); +} + +void wxMenuBase::SetHelpString( int itemid, const wxString& helpString ) +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_RET( item, wxT("wxMenu::SetHelpString: no such item") ); + + item->SetHelp( helpString ); +} + +wxString wxMenuBase::GetHelpString( int itemid ) const +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_MSG( item, wxEmptyString, wxT("wxMenu::GetHelpString: no such item") ); + + return item->GetHelp(); +} + +// ---------------------------------------------------------------------------- +// wxMenuBarBase ctor and dtor +// ---------------------------------------------------------------------------- + +wxMenuBarBase::wxMenuBarBase() +{ + // not attached yet + m_menuBarFrame = NULL; +} + +wxMenuBarBase::~wxMenuBarBase() +{ + WX_CLEAR_LIST(wxMenuList, m_menus); +} + +// ---------------------------------------------------------------------------- +// wxMenuBar item access: the base class versions manage m_menus list, the +// derived class should reflect the changes in the real menubar +// ---------------------------------------------------------------------------- + +wxMenu *wxMenuBarBase::GetMenu(size_t pos) const +{ + wxMenuList::compatibility_iterator node = m_menus.Item(pos); + wxCHECK_MSG( node, NULL, wxT("bad index in wxMenuBar::GetMenu()") ); + + return node->GetData(); +} + +bool wxMenuBarBase::Append(wxMenu *menu, const wxString& title) +{ + wxCHECK_MSG( menu, false, wxT("can't append NULL menu") ); + wxCHECK_MSG( !title.empty(), false, wxT("can't append menu with empty title") ); + + m_menus.Append(menu); + menu->Attach(this); + + return true; +} + +bool wxMenuBarBase::Insert(size_t pos, wxMenu *menu, + const wxString& title) +{ + if ( pos == m_menus.GetCount() ) + { + return wxMenuBarBase::Append(menu, title); + } + else // not at the end + { + wxCHECK_MSG( menu, false, wxT("can't insert NULL menu") ); + + wxMenuList::compatibility_iterator node = m_menus.Item(pos); + wxCHECK_MSG( node, false, wxT("bad index in wxMenuBar::Insert()") ); + + m_menus.Insert(node, menu); + menu->Attach(this); + + return true; + } +} + +wxMenu *wxMenuBarBase::Replace(size_t pos, wxMenu *menu, + const wxString& WXUNUSED(title)) +{ + wxCHECK_MSG( menu, NULL, wxT("can't insert NULL menu") ); + + wxMenuList::compatibility_iterator node = m_menus.Item(pos); + wxCHECK_MSG( node, NULL, wxT("bad index in wxMenuBar::Replace()") ); + + wxMenu *menuOld = node->GetData(); + node->SetData(menu); + + menu->Attach(this); + menuOld->Detach(); + + return menuOld; +} + +wxMenu *wxMenuBarBase::Remove(size_t pos) +{ + wxMenuList::compatibility_iterator node = m_menus.Item(pos); + wxCHECK_MSG( node, NULL, wxT("bad index in wxMenuBar::Remove()") ); + + wxMenu *menu = node->GetData(); + m_menus.Erase(node); + menu->Detach(); + + return menu; +} + +int wxMenuBarBase::FindMenu(const wxString& title) const +{ + wxString label = wxMenuItem::GetLabelText(title); + + size_t count = GetMenuCount(); + for ( size_t i = 0; i < count; i++ ) + { + wxString title2 = GetMenuLabel(i); + if ( (title2 == title) || + (wxMenuItem::GetLabelText(title2) == label) ) + { + // found + return (int)i; + } + } + + return wxNOT_FOUND; + +} + +// ---------------------------------------------------------------------------- +// wxMenuBar attaching/detaching to/from the frame +// ---------------------------------------------------------------------------- + +void wxMenuBarBase::Attach(wxFrame *frame) +{ + wxASSERT_MSG( !IsAttached(), wxT("menubar already attached!") ); + + SetParent(frame); + m_menuBarFrame = frame; +} + +void wxMenuBarBase::Detach() +{ + wxASSERT_MSG( IsAttached(), wxT("detaching unattached menubar") ); + + m_menuBarFrame = NULL; + SetParent(NULL); +} + +// ---------------------------------------------------------------------------- +// wxMenuBar searching for items +// ---------------------------------------------------------------------------- + +wxMenuItem *wxMenuBarBase::FindItem(int itemid, wxMenu **menu) const +{ + if ( menu ) + *menu = NULL; + + wxMenuItem *item = NULL; + size_t count = GetMenuCount(), i; + wxMenuList::const_iterator it; + for ( i = 0, it = m_menus.begin(); !item && (i < count); i++, it++ ) + { + item = (*it)->FindItem(itemid, menu); + } + + return item; +} + +int wxMenuBarBase::FindMenuItem(const wxString& menu, const wxString& item) const +{ + wxString label = wxMenuItem::GetLabelText(menu); + + int i = 0; + wxMenuList::compatibility_iterator node; + for ( node = m_menus.GetFirst(); node; node = node->GetNext(), i++ ) + { + if ( label == wxMenuItem::GetLabelText(GetMenuLabel(i)) ) + return node->GetData()->FindItem(item); + } + + return wxNOT_FOUND; +} + +// --------------------------------------------------------------------------- +// wxMenuBar functions forwarded to wxMenuItem +// --------------------------------------------------------------------------- + +void wxMenuBarBase::Enable(int itemid, bool enable) +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_RET( item, wxT("attempt to enable an item which doesn't exist") ); + + item->Enable(enable); +} + +void wxMenuBarBase::Check(int itemid, bool check) +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_RET( item, wxT("attempt to check an item which doesn't exist") ); + wxCHECK_RET( item->IsCheckable(), wxT("attempt to check an uncheckable item") ); + + item->Check(check); +} + +bool wxMenuBarBase::IsChecked(int itemid) const +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_MSG( item, false, wxT("wxMenuBar::IsChecked(): no such item") ); + + return item->IsChecked(); +} + +bool wxMenuBarBase::IsEnabled(int itemid) const +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_MSG( item, false, wxT("wxMenuBar::IsEnabled(): no such item") ); + + return item->IsEnabled(); +} + +void wxMenuBarBase::SetLabel(int itemid, const wxString& label) +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_RET( item, wxT("wxMenuBar::SetLabel(): no such item") ); + + item->SetItemLabel(label); +} + +wxString wxMenuBarBase::GetLabel(int itemid) const +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_MSG( item, wxEmptyString, + wxT("wxMenuBar::GetLabel(): no such item") ); + + return item->GetItemLabel(); +} + +void wxMenuBarBase::SetHelpString(int itemid, const wxString& helpString) +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_RET( item, wxT("wxMenuBar::SetHelpString(): no such item") ); + + item->SetHelp(helpString); +} + +wxString wxMenuBarBase::GetHelpString(int itemid) const +{ + wxMenuItem *item = FindItem(itemid); + + wxCHECK_MSG( item, wxEmptyString, + wxT("wxMenuBar::GetHelpString(): no such item") ); + + return item->GetHelp(); +} + +void wxMenuBarBase::UpdateMenus() +{ + wxMenu* menu; + int nCount = GetMenuCount(); + for (int n = 0; n < nCount; n++) + { + menu = GetMenu( n ); + if (menu != NULL) + menu->UpdateUI( NULL ); + } +} + +#if WXWIN_COMPATIBILITY_2_8 +// get or change the label of the menu at given position +void wxMenuBarBase::SetLabelTop(size_t pos, const wxString& label) +{ + SetMenuLabel(pos, label); +} + +wxString wxMenuBarBase::GetLabelTop(size_t pos) const +{ + return GetMenuLabelText(pos); +} +#endif + +#endif // wxUSE_MENUS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/mimecmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/mimecmn.cpp new file mode 100644 index 0000000000..ceb86221e3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/mimecmn.cpp @@ -0,0 +1,761 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/mimecmn.cpp +// Purpose: classes and functions to manage MIME types +// Author: Vadim Zeitlin +// Modified by: +// Chris Elliott (biol75@york.ac.uk) 5 Dec 00: write support for Win32 +// Created: 23.09.98 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence (part of wxExtra library) +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_MIMETYPE + +#include "wx/mimetype.h" + +#ifndef WX_PRECOMP + #include "wx/dynarray.h" + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/module.h" + #include "wx/crt.h" +#endif //WX_PRECOMP + +#include "wx/file.h" +#include "wx/iconloc.h" +#include "wx/confbase.h" + +// other standard headers +#include + +// implementation classes: +#if defined(__WINDOWS__) + #include "wx/msw/mimetype.h" +#elif ( defined(__DARWIN__) ) + #include "wx/osx/mimetype.h" +#elif defined(__WXPM__) || defined (__EMX__) + #include "wx/os2/mimetype.h" + #undef __UNIX__ +#elif defined(__DOS__) + #include "wx/msdos/mimetype.h" +#else // Unix + #include "wx/unix/mimetype.h" +#endif + +// ============================================================================ +// common classes +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxMimeTypeCommands +// ---------------------------------------------------------------------------- + +void +wxMimeTypeCommands::AddOrReplaceVerb(const wxString& verb, const wxString& cmd) +{ + int n = m_verbs.Index(verb, false /* ignore case */); + if ( n == wxNOT_FOUND ) + { + m_verbs.Add(verb); + m_commands.Add(cmd); + } + else + { + m_commands[n] = cmd; + } +} + +wxString +wxMimeTypeCommands::GetCommandForVerb(const wxString& verb, size_t *idx) const +{ + wxString s; + + int n = m_verbs.Index(verb); + if ( n != wxNOT_FOUND ) + { + s = m_commands[(size_t)n]; + if ( idx ) + *idx = n; + } + else if ( idx ) + { + // different from any valid index + *idx = (size_t)-1; + } + + return s; +} + +wxString wxMimeTypeCommands::GetVerbCmd(size_t n) const +{ + return m_verbs[n] + wxT('=') + m_commands[n]; +} + +// ---------------------------------------------------------------------------- +// wxFileTypeInfo +// ---------------------------------------------------------------------------- + +void wxFileTypeInfo::DoVarArgInit(const wxString& mimeType, + const wxString& openCmd, + const wxString& printCmd, + const wxString& desc, + va_list argptr) +{ + m_mimeType = mimeType; + m_openCmd = openCmd; + m_printCmd = printCmd; + m_desc = desc; + + for ( ;; ) + { + // icc gives this warning in its own va_arg() macro, argh +#ifdef __INTELC__ + #pragma warning(push) + #pragma warning(disable: 1684) +#endif + + wxArgNormalizedString ext(WX_VA_ARG_STRING(argptr)); + +#ifdef __INTELC__ + #pragma warning(pop) +#endif + if ( !ext ) + { + // NULL terminates the list + break; + } + + m_exts.Add(ext.GetString()); + } +} + +void wxFileTypeInfo::VarArgInit(const wxString *mimeType, + const wxString *openCmd, + const wxString *printCmd, + const wxString *desc, + ...) +{ + va_list argptr; + va_start(argptr, desc); + + DoVarArgInit(*mimeType, *openCmd, *printCmd, *desc, argptr); + + va_end(argptr); +} + + +wxFileTypeInfo::wxFileTypeInfo(const wxArrayString& sArray) +{ + m_mimeType = sArray [0u]; + m_openCmd = sArray [1u]; + m_printCmd = sArray [2u]; + m_desc = sArray [3u]; + + size_t count = sArray.GetCount(); + for ( size_t i = 4; i < count; i++ ) + { + m_exts.Add(sArray[i]); + } +} + +#include "wx/arrimpl.cpp" +WX_DEFINE_OBJARRAY(wxArrayFileTypeInfo) + +// ============================================================================ +// implementation of the wrapper classes +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxFileType +// ---------------------------------------------------------------------------- + +/* static */ +wxString wxFileType::ExpandCommand(const wxString& command, + const wxFileType::MessageParameters& params) +{ + bool hasFilename = false; + + // We consider that only the file names with spaces in them need to be + // handled specially. This is not perfect, but this can be done easily + // under all platforms while handling the file names with quotes in them, + // for example, needs to be done differently. + const bool needToQuoteFilename = params.GetFileName().find_first_of(" \t") + != wxString::npos; + + wxString str; + for ( const wxChar *pc = command.c_str(); *pc != wxT('\0'); pc++ ) { + if ( *pc == wxT('%') ) { + switch ( *++pc ) { + case wxT('s'): + // don't quote the file name if it's already quoted: notice + // that we check for a quote following it and not preceding + // it as at least under Windows we can have commands + // containing "file://%s" (with quotes) in them so the + // argument may be quoted even if there is no quote + // directly before "%s" itself + if ( needToQuoteFilename && pc[1] != '"' ) + str << wxT('"') << params.GetFileName() << wxT('"'); + else + str << params.GetFileName(); + hasFilename = true; + break; + + case wxT('t'): + // '%t' expands into MIME type (quote it too just to be + // consistent) + str << wxT('\'') << params.GetMimeType() << wxT('\''); + break; + + case wxT('{'): + { + const wxChar *pEnd = wxStrchr(pc, wxT('}')); + if ( pEnd == NULL ) { + wxString mimetype; + wxLogWarning(_("Unmatched '{' in an entry for mime type %s."), + params.GetMimeType().c_str()); + str << wxT("%{"); + } + else { + wxString param(pc + 1, pEnd - pc - 1); + str << wxT('\'') << params.GetParamValue(param) << wxT('\''); + pc = pEnd; + } + } + break; + + case wxT('n'): + case wxT('F'): + // TODO %n is the number of parts, %F is an array containing + // the names of temp files these parts were written to + // and their mime types. + break; + + default: + wxLogDebug(wxT("Unknown field %%%c in command '%s'."), + *pc, command.c_str()); + str << *pc; + } + } + else { + str << *pc; + } + } + + // metamail(1) man page states that if the mailcap entry doesn't have '%s' + // the program will accept the data on stdin so normally we should append + // "< %s" to the end of the command in such case, but not all commands + // behave like this, in particular a common test is 'test -n "$DISPLAY"' + // and appending "< %s" to this command makes the test fail... I don't + // know of the correct solution, try to guess what we have to do. + + // test now carried out on reading file so test should never get here + if ( !hasFilename && !str.empty() +#ifdef __UNIX__ + && !str.StartsWith(wxT("test ")) +#endif // Unix + ) + { + str << wxT(" < "); + if ( needToQuoteFilename ) + str << '"'; + str << params.GetFileName(); + if ( needToQuoteFilename ) + str << '"'; + } + + return str; +} + +wxFileType::wxFileType(const wxFileTypeInfo& info) +{ + m_info = &info; + m_impl = NULL; +} + +wxFileType::wxFileType() +{ + m_info = NULL; + m_impl = new wxFileTypeImpl; +} + +wxFileType::~wxFileType() +{ + if ( m_impl ) + delete m_impl; +} + +bool wxFileType::GetExtensions(wxArrayString& extensions) +{ + if ( m_info ) + { + extensions = m_info->GetExtensions(); + return true; + } + + return m_impl->GetExtensions(extensions); +} + +bool wxFileType::GetMimeType(wxString *mimeType) const +{ + wxCHECK_MSG( mimeType, false, wxT("invalid parameter in GetMimeType") ); + + if ( m_info ) + { + *mimeType = m_info->GetMimeType(); + + return true; + } + + return m_impl->GetMimeType(mimeType); +} + +bool wxFileType::GetMimeTypes(wxArrayString& mimeTypes) const +{ + if ( m_info ) + { + mimeTypes.Clear(); + mimeTypes.Add(m_info->GetMimeType()); + + return true; + } + + return m_impl->GetMimeTypes(mimeTypes); +} + +bool wxFileType::GetIcon(wxIconLocation *iconLoc) const +{ + if ( m_info ) + { + if ( iconLoc ) + { + iconLoc->SetFileName(m_info->GetIconFile()); +#ifdef __WINDOWS__ + iconLoc->SetIndex(m_info->GetIconIndex()); +#endif // __WINDOWS__ + } + + return true; + } + + return m_impl->GetIcon(iconLoc); +} + +bool +wxFileType::GetIcon(wxIconLocation *iconloc, + const MessageParameters& params) const +{ + if ( !GetIcon(iconloc) ) + { + return false; + } + + // we may have "%s" in the icon location string, at least under Windows, so + // expand this + if ( iconloc ) + { + iconloc->SetFileName(ExpandCommand(iconloc->GetFileName(), params)); + } + + return true; +} + +bool wxFileType::GetDescription(wxString *desc) const +{ + wxCHECK_MSG( desc, false, wxT("invalid parameter in GetDescription") ); + + if ( m_info ) + { + *desc = m_info->GetDescription(); + + return true; + } + + return m_impl->GetDescription(desc); +} + +bool +wxFileType::GetOpenCommand(wxString *openCmd, + const wxFileType::MessageParameters& params) const +{ + wxCHECK_MSG( openCmd, false, wxT("invalid parameter in GetOpenCommand") ); + + if ( m_info ) + { + *openCmd = ExpandCommand(m_info->GetOpenCommand(), params); + + return true; + } + + return m_impl->GetOpenCommand(openCmd, params); +} + +wxString wxFileType::GetOpenCommand(const wxString& filename) const +{ + wxString cmd; + if ( !GetOpenCommand(&cmd, filename) ) + { + // return empty string to indicate an error + cmd.clear(); + } + + return cmd; +} + +bool +wxFileType::GetPrintCommand(wxString *printCmd, + const wxFileType::MessageParameters& params) const +{ + wxCHECK_MSG( printCmd, false, wxT("invalid parameter in GetPrintCommand") ); + + if ( m_info ) + { + *printCmd = ExpandCommand(m_info->GetPrintCommand(), params); + + return true; + } + + return m_impl->GetPrintCommand(printCmd, params); +} + + +size_t wxFileType::GetAllCommands(wxArrayString *verbs, + wxArrayString *commands, + const wxFileType::MessageParameters& params) const +{ + if ( verbs ) + verbs->Clear(); + if ( commands ) + commands->Clear(); + +#if defined (__WINDOWS__) || defined(__UNIX__) + return m_impl->GetAllCommands(verbs, commands, params); +#else // !__WINDOWS__ || __UNIX__ + // we don't know how to retrieve all commands, so just try the 2 we know + // about + size_t count = 0; + wxString cmd; + if ( GetOpenCommand(&cmd, params) ) + { + if ( verbs ) + verbs->Add(wxT("Open")); + if ( commands ) + commands->Add(cmd); + count++; + } + + if ( GetPrintCommand(&cmd, params) ) + { + if ( verbs ) + verbs->Add(wxT("Print")); + if ( commands ) + commands->Add(cmd); + + count++; + } + + return count; +#endif // __WINDOWS__/| __UNIX__ +} + +bool wxFileType::Unassociate() +{ +#if defined(__WINDOWS__) + return m_impl->Unassociate(); +#elif defined(__UNIX__) + return m_impl->Unassociate(this); +#else + wxFAIL_MSG( wxT("not implemented") ); // TODO + return false; +#endif +} + +bool wxFileType::SetCommand(const wxString& cmd, + const wxString& verb, + bool overwriteprompt) +{ +#if defined (__WINDOWS__) || defined(__UNIX__) + return m_impl->SetCommand(cmd, verb, overwriteprompt); +#else + wxUnusedVar(cmd); + wxUnusedVar(verb); + wxUnusedVar(overwriteprompt); + wxFAIL_MSG(wxT("not implemented")); + return false; +#endif +} + +bool wxFileType::SetDefaultIcon(const wxString& cmd, int index) +{ + wxString sTmp = cmd; +#ifdef __WINDOWS__ + // VZ: should we do this? + // chris elliott : only makes sense in MS windows + if ( sTmp.empty() ) + GetOpenCommand(&sTmp, wxFileType::MessageParameters(wxEmptyString, wxEmptyString)); +#endif + wxCHECK_MSG( !sTmp.empty(), false, wxT("need the icon file") ); + +#if defined (__WINDOWS__) || defined(__UNIX__) + return m_impl->SetDefaultIcon (cmd, index); +#else + wxUnusedVar(index); + wxFAIL_MSG(wxT("not implemented")); + return false; +#endif +} + +// ---------------------------------------------------------------------------- +// wxMimeTypesManagerFactory +// ---------------------------------------------------------------------------- + +wxMimeTypesManagerFactory *wxMimeTypesManagerFactory::m_factory = NULL; + +/* static */ +void wxMimeTypesManagerFactory::Set(wxMimeTypesManagerFactory *factory) +{ + delete m_factory; + + m_factory = factory; +} + +/* static */ +wxMimeTypesManagerFactory *wxMimeTypesManagerFactory::Get() +{ + if ( !m_factory ) + m_factory = new wxMimeTypesManagerFactory; + + return m_factory; +} + +wxMimeTypesManagerImpl *wxMimeTypesManagerFactory::CreateMimeTypesManagerImpl() +{ + return new wxMimeTypesManagerImpl; +} + +// ---------------------------------------------------------------------------- +// wxMimeTypesManager +// ---------------------------------------------------------------------------- + +void wxMimeTypesManager::EnsureImpl() +{ + if ( !m_impl ) + m_impl = wxMimeTypesManagerFactory::Get()->CreateMimeTypesManagerImpl(); +} + +bool wxMimeTypesManager::IsOfType(const wxString& mimeType, + const wxString& wildcard) +{ + wxASSERT_MSG( mimeType.Find(wxT('*')) == wxNOT_FOUND, + wxT("first MIME type can't contain wildcards") ); + + // all comparaisons are case insensitive (2nd arg of IsSameAs() is false) + if ( wildcard.BeforeFirst(wxT('/')). + IsSameAs(mimeType.BeforeFirst(wxT('/')), false) ) + { + wxString strSubtype = wildcard.AfterFirst(wxT('/')); + + if ( strSubtype == wxT("*") || + strSubtype.IsSameAs(mimeType.AfterFirst(wxT('/')), false) ) + { + // matches (either exactly or it's a wildcard) + return true; + } + } + + return false; +} + +wxMimeTypesManager::wxMimeTypesManager() +{ + m_impl = NULL; +} + +wxMimeTypesManager::~wxMimeTypesManager() +{ + if ( m_impl ) + delete m_impl; +} + +bool wxMimeTypesManager::Unassociate(wxFileType *ft) +{ + EnsureImpl(); + +#if defined(__UNIX__) && !defined(__CYGWIN__) && !defined(__WINE__) + return m_impl->Unassociate(ft); +#else + return ft->Unassociate(); +#endif +} + + +wxFileType * +wxMimeTypesManager::Associate(const wxFileTypeInfo& ftInfo) +{ + EnsureImpl(); + +#if defined(__WINDOWS__) || defined(__UNIX__) + return m_impl->Associate(ftInfo); +#else // other platforms + wxUnusedVar(ftInfo); + wxFAIL_MSG( wxT("not implemented") ); // TODO + return NULL; +#endif // platforms +} + +wxFileType * +wxMimeTypesManager::GetFileTypeFromExtension(const wxString& ext) +{ + EnsureImpl(); + + wxString::const_iterator i = ext.begin(); + const wxString::const_iterator end = ext.end(); + wxString extWithoutDot; + if ( i != end && *i == '.' ) + extWithoutDot.assign(++i, ext.end()); + else + extWithoutDot = ext; + + wxCHECK_MSG( !ext.empty(), NULL, wxT("extension can't be empty") ); + + wxFileType *ft = m_impl->GetFileTypeFromExtension(extWithoutDot); + + if ( !ft ) { + // check the fallbacks + // + // TODO linear search is potentially slow, perhaps we should use a + // sorted array? + size_t count = m_fallbacks.GetCount(); + for ( size_t n = 0; n < count; n++ ) { + if ( m_fallbacks[n].GetExtensions().Index(ext) != wxNOT_FOUND ) { + ft = new wxFileType(m_fallbacks[n]); + + break; + } + } + } + + return ft; +} + +wxFileType * +wxMimeTypesManager::GetFileTypeFromMimeType(const wxString& mimeType) +{ + EnsureImpl(); + wxFileType *ft = m_impl->GetFileTypeFromMimeType(mimeType); + + if ( !ft ) { + // check the fallbacks + // + // TODO linear search is potentially slow, perhaps we should use a + // sorted array? + size_t count = m_fallbacks.GetCount(); + for ( size_t n = 0; n < count; n++ ) { + if ( wxMimeTypesManager::IsOfType(mimeType, + m_fallbacks[n].GetMimeType()) ) { + ft = new wxFileType(m_fallbacks[n]); + + break; + } + } + } + + return ft; +} + +void wxMimeTypesManager::AddFallbacks(const wxFileTypeInfo *filetypes) +{ + EnsureImpl(); + for ( const wxFileTypeInfo *ft = filetypes; ft && ft->IsValid(); ft++ ) { + AddFallback(*ft); + } +} + +size_t wxMimeTypesManager::EnumAllFileTypes(wxArrayString& mimetypes) +{ + EnsureImpl(); + size_t countAll = m_impl->EnumAllFileTypes(mimetypes); + + // add the fallback filetypes + size_t count = m_fallbacks.GetCount(); + for ( size_t n = 0; n < count; n++ ) { + if ( mimetypes.Index(m_fallbacks[n].GetMimeType()) == wxNOT_FOUND ) { + mimetypes.Add(m_fallbacks[n].GetMimeType()); + countAll++; + } + } + + return countAll; +} + +void wxMimeTypesManager::Initialize(int mcapStyle, + const wxString& sExtraDir) +{ +#if defined(__UNIX__) && !defined(__CYGWIN__) && !defined(__WINE__) + EnsureImpl(); + + m_impl->Initialize(mcapStyle, sExtraDir); +#else + (void)mcapStyle; + (void)sExtraDir; +#endif // Unix +} + +// and this function clears all the data from the manager +void wxMimeTypesManager::ClearData() +{ +#if defined(__UNIX__) && !defined(__CYGWIN__) && !defined(__WINE__) + EnsureImpl(); + + m_impl->ClearData(); +#endif // Unix +} + +// ---------------------------------------------------------------------------- +// global data and wxMimeTypeCmnModule +// ---------------------------------------------------------------------------- + +// private object +static wxMimeTypesManager gs_mimeTypesManager; + +// and public pointer +wxMimeTypesManager *wxTheMimeTypesManager = &gs_mimeTypesManager; + +class wxMimeTypeCmnModule: public wxModule +{ +public: + wxMimeTypeCmnModule() : wxModule() { } + + virtual bool OnInit() { return true; } + virtual void OnExit() + { + wxMimeTypesManagerFactory::Set(NULL); + + if ( gs_mimeTypesManager.m_impl != NULL ) + { + wxDELETE(gs_mimeTypesManager.m_impl); + gs_mimeTypesManager.m_fallbacks.Clear(); + } + } + + DECLARE_DYNAMIC_CLASS(wxMimeTypeCmnModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxMimeTypeCmnModule, wxModule) + +#endif // wxUSE_MIMETYPE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/modalhook.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/modalhook.cpp new file mode 100644 index 0000000000..20250381ea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/modalhook.cpp @@ -0,0 +1,119 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/modalhook.cpp +// Purpose: wxModalDialogHook implementation +// Author: Vadim Zeitlin +// Created: 2013-05-19 +// Copyright: (c) 2013 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/modalhook.h" + +#ifndef WX_PRECOMP +#endif // WX_PRECOMP + +wxModalDialogHook::Hooks wxModalDialogHook::ms_hooks; + +// ============================================================================ +// wxModalDialogHook implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// Hooks management +// ---------------------------------------------------------------------------- + +void wxModalDialogHook::Register() +{ +#if wxDEBUG_LEVEL + for ( Hooks::const_iterator it = ms_hooks.begin(); + it != ms_hooks.end(); + ++it) + { + if ( *it == this ) + { + wxFAIL_MSG( wxS("Registering already registered hook?") ); + return; + } + } +#endif // wxDEBUG_LEVEL + + ms_hooks.insert(ms_hooks.begin(), this); +} + +void wxModalDialogHook::Unregister() +{ + if ( !DoUnregister() ) + { + wxFAIL_MSG( wxS("Unregistering not registered hook?") ); + } +} + +bool wxModalDialogHook::DoUnregister() +{ + for ( Hooks::iterator it = ms_hooks.begin(); + it != ms_hooks.end(); + ++it ) + { + if ( *it == this ) + { + ms_hooks.erase(it); + return true; + } + } + + return false; +} + +// ---------------------------------------------------------------------------- +// Invoking hooks methods +// ---------------------------------------------------------------------------- + +/* static */ +int wxModalDialogHook::CallEnter(wxDialog* dialog) +{ + // Make a copy of the hooks list to avoid problems if it's modified while + // we're iterating over it: this is unlikely to happen in our case, but + // quite possible in CallExit() as the hooks may remove themselves after + // the call to their Exit(), so do it here for symmetry as well. + const Hooks hooks = ms_hooks; + + for ( Hooks::const_iterator it = hooks.begin(); it != hooks.end(); ++it ) + { + const int rc = (*it)->Enter(dialog); + if ( rc != wxID_NONE ) + { + // Skip calling all the rest of the hooks if one of them preempts + // showing the dialog completely. + return rc; + } + } + + return wxID_NONE; +} + +/* static */ +void wxModalDialogHook::CallExit(wxDialog* dialog) +{ + // See comment in CallEnter() for the reasons for making a copy here. + const Hooks hooks = ms_hooks; + + for ( Hooks::const_iterator it = hooks.begin(); it != hooks.end(); ++it ) + { + (*it)->Exit(dialog); + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/module.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/module.cpp new file mode 100644 index 0000000000..b8438d4602 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/module.cpp @@ -0,0 +1,224 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/module.cpp +// Purpose: Modules initialization/destruction +// Author: Wolfram Gloger/adapted by Guilhem Lavaux +// Modified by: +// Created: 04/11/98 +// Copyright: (c) Wolfram Gloger and Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/module.h" + +#ifndef WX_PRECOMP + #include "wx/hash.h" + #include "wx/intl.h" + #include "wx/log.h" +#endif + +#include "wx/listimpl.cpp" + +#define TRACE_MODULE wxT("module") + +WX_DEFINE_LIST(wxModuleList) + +wxIMPLEMENT_ABSTRACT_CLASS(wxModule, wxObject) + +wxModuleList wxModule::m_modules; + +void wxModule::RegisterModule(wxModule* module) +{ + module->m_state = State_Registered; + m_modules.Append(module); +} + +void wxModule::UnregisterModule(wxModule* module) +{ + m_modules.DeleteObject(module); + delete module; +} + +// Collect up all module-derived classes, create an instance of each, +// and register them. +void wxModule::RegisterModules() +{ + for (wxClassInfo::const_iterator it = wxClassInfo::begin_classinfo(), + end = wxClassInfo::end_classinfo(); + it != end; ++it) + { + const wxClassInfo* classInfo = *it; + + if ( classInfo->IsKindOf(wxCLASSINFO(wxModule)) && + (classInfo != (& (wxModule::ms_classInfo))) ) + { + wxLogTrace(TRACE_MODULE, wxT("Registering module %s"), + classInfo->GetClassName()); + wxModule* module = (wxModule *)classInfo->CreateObject(); + wxModule::RegisterModule(module); + } + } +} + +bool wxModule::DoInitializeModule(wxModule *module, + wxModuleList &initializedModules) +{ + if ( module->m_state == State_Initializing ) + { + wxLogError(_("Circular dependency involving module \"%s\" detected."), + module->GetClassInfo()->GetClassName()); + return false; + } + + module->m_state = State_Initializing; + + // translate named dependencies to the normal ones first + if ( !module->ResolveNamedDependencies() ) + return false; + + const wxArrayClassInfo& dependencies = module->m_dependencies; + + // satisfy module dependencies by loading them before the current module + for ( unsigned int i = 0; i < dependencies.size(); ++i ) + { + wxClassInfo * cinfo = dependencies[i]; + + // Check if the module is already initialized + wxModuleList::compatibility_iterator node; + for ( node = initializedModules.GetFirst(); node; node = node->GetNext() ) + { + if ( node->GetData()->GetClassInfo() == cinfo ) + break; + } + + if ( node ) + { + // this dependency is already initialized, nothing to do + continue; + } + + // find the module in the registered modules list + for ( node = m_modules.GetFirst(); node; node = node->GetNext() ) + { + wxModule *moduleDep = node->GetData(); + if ( moduleDep->GetClassInfo() == cinfo ) + { + if ( !DoInitializeModule(moduleDep, initializedModules ) ) + { + // failed to initialize a dependency, so fail this one too + return false; + } + + break; + } + } + + if ( !node ) + { + wxLogError(_("Dependency \"%s\" of module \"%s\" doesn't exist."), + cinfo->GetClassName(), + module->GetClassInfo()->GetClassName()); + return false; + } + } + + if ( !module->Init() ) + { + wxLogError(_("Module \"%s\" initialization failed"), + module->GetClassInfo()->GetClassName()); + return false; + } + + wxLogTrace(TRACE_MODULE, wxT("Module \"%s\" initialized"), + module->GetClassInfo()->GetClassName()); + + module->m_state = State_Initialized; + initializedModules.Append(module); + + return true; +} + +// Initialize user-defined modules +bool wxModule::InitializeModules() +{ + wxModuleList initializedModules; + + for ( wxModuleList::compatibility_iterator node = m_modules.GetFirst(); + node; + node = node->GetNext() ) + { + wxModule *module = node->GetData(); + + // the module could have been already initialized as dependency of + // another one + if ( module->m_state == State_Registered ) + { + if ( !DoInitializeModule( module, initializedModules ) ) + { + // failed to initialize all modules, so clean up the already + // initialized ones + DoCleanUpModules(initializedModules); + + return false; + } + } + } + + // remember the real initialisation order + m_modules = initializedModules; + + return true; +} + +// Clean up all currently initialized modules +void wxModule::DoCleanUpModules(const wxModuleList& modules) +{ + // cleanup user-defined modules in the reverse order compared to their + // initialization -- this ensures that dependencies are respected + for ( wxModuleList::compatibility_iterator node = modules.GetLast(); + node; + node = node->GetPrevious() ) + { + wxLogTrace(TRACE_MODULE, wxT("Cleanup module %s"), + node->GetData()->GetClassInfo()->GetClassName()); + + wxModule * module = node->GetData(); + + wxASSERT_MSG( module->m_state == State_Initialized, + wxT("not initialized module being cleaned up") ); + + module->Exit(); + module->m_state = State_Registered; + } + + // clear all modules, even the non-initialized ones + WX_CLEAR_LIST(wxModuleList, m_modules); +} + +bool wxModule::ResolveNamedDependencies() +{ + // first resolve required dependencies + for ( size_t i = 0; i < m_namedDependencies.size(); ++i ) + { + wxClassInfo *info = wxClassInfo::FindClass(m_namedDependencies[i]); + + if ( !info ) + { + // required dependency not found + return false; + } + + // add it even if it is not derived from wxModule because + // DoInitializeModule() will make sure a module with the same class + // info exists and fail if it doesn't + m_dependencies.Add(info); + } + + return true; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/mousemanager.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/mousemanager.cpp new file mode 100644 index 0000000000..b000c1b468 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/mousemanager.cpp @@ -0,0 +1,187 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/mousemanager.cpp +// Purpose: implementation of wxMouseEventsManager class +// Author: Vadim Zeitlin +// Created: 2009-04-21 +// Copyright: (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/settings.h" + #include "wx/window.h" +#endif // WX_PRECOMP + +#include "wx/mousemanager.h" + +// ---------------------------------------------------------------------------- +// event tables +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxMouseEventsManager, wxEvtHandler) + EVT_MOUSE_CAPTURE_LOST(wxMouseEventsManager::OnCaptureLost) + EVT_LEFT_DOWN(wxMouseEventsManager::OnLeftDown) + EVT_LEFT_UP(wxMouseEventsManager::OnLeftUp) + EVT_MOTION(wxMouseEventsManager::OnMove) +END_EVENT_TABLE() + +// ============================================================================ +// wxMouseEventsManager implementation +// ============================================================================ + +void wxMouseEventsManager::Init() +{ + m_win = NULL; + m_state = State_Normal; + m_item = wxNOT_FOUND; +} + +bool wxMouseEventsManager::Create(wxWindow *win) +{ + wxASSERT_MSG( !m_win, "Create() must not be called twice" ); + + m_win = win; + win->PushEventHandler(this); + + return true; +} + +wxMouseEventsManager::~wxMouseEventsManager() +{ + if ( m_win ) + m_win->RemoveEventHandler(this); +} + +void wxMouseEventsManager::OnCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event)) +{ + switch ( m_state ) + { + case State_Normal: + wxFAIL_MSG( "mouse shouldn't be captured in normal state" ); + break; + + case State_Pressed: + MouseClickCancelled(m_item); + break; + + case State_Dragging: + MouseDragCancelled(m_item); + break; + } + + m_state = State_Normal; + m_item = wxNOT_FOUND; +} + +void wxMouseEventsManager::OnLeftDown(wxMouseEvent& event) +{ + wxASSERT_MSG( m_state == State_Normal, + "state hasn't been reset to normal somehow" ); + + m_posLast = event.GetPosition(); + m_item = MouseHitTest(m_posLast); + if ( m_item == wxNOT_FOUND ) + { + event.Skip(); + return; + } + + m_state = State_Pressed; + m_win->SetFocus(); + m_win->CaptureMouse(); + MouseClickBegin(m_item); +} + +void wxMouseEventsManager::OnLeftUp(wxMouseEvent& event) +{ + switch ( m_state ) + { + case State_Normal: + // ignore it, the mouse hasn't been pressed over any item initially + // so releasing it shouldn't do anything + event.Skip(); + + // skip releasing the capture below + return; + + case State_Pressed: + if ( MouseHitTest(event.GetPosition()) == m_item ) + { + // mouse released over the same item, so it was a click + MouseClicked(m_item); + } + break; + + case State_Dragging: + MouseDragEnd(m_item, event.GetPosition()); + break; + } + + m_state = State_Normal; + m_item = wxNOT_FOUND; + m_win->ReleaseMouse(); +} + +void wxMouseEventsManager::OnMove(wxMouseEvent& event) +{ + switch ( m_state ) + { + case State_Normal: + event.Skip(); + break; + + case State_Pressed: + wxASSERT_MSG( event.LeftIsDown(), + "should have detected mouse being released" ); + + { + // it's probably a bad idea to query the system for these + // values every time the mouse is moved so cache them on the + // assumption that they don't change -- which is wrong, of + // course, the user can change them but it doesn't happen often + static const int + dragMinX = wxSystemSettings::GetMetric(wxSYS_DRAG_X); + static const int + dragMinY = wxSystemSettings::GetMetric(wxSYS_DRAG_Y); + + const wxPoint& pos = event.GetPosition(); + const wxPoint ofs = pos - m_posLast; + if ( abs(ofs.x) > dragMinX || abs(ofs.y) > dragMinY ) + { + // the mouse left the rectangle inside which its movements + // are considered to be too small to constitute a start of + // drag operation, do [attempt to] start it now + if ( MouseDragBegin(m_item, pos) ) + { + m_state = State_Dragging; + } + } + else // still didn't move far enough away + { + event.Skip(); + } + } + break; + + case State_Dragging: + m_posLast = event.GetPosition(); + MouseDragging(m_item, m_posLast); + break; + } +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/msgout.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/msgout.cpp new file mode 100644 index 0000000000..bf98eb4898 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/msgout.cpp @@ -0,0 +1,216 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/msgout.cpp +// Purpose: wxMessageOutput implementation +// Author: Mattia Barbon +// Modified by: +// Created: 17.07.02 +// Copyright: (c) the wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/ffile.h" + #include "wx/app.h" + #include "wx/intl.h" + #include "wx/log.h" + #if wxUSE_GUI + #include "wx/msgdlg.h" + #endif // wxUSE_GUI +#endif + +#include "wx/msgout.h" +#include "wx/apptrait.h" +#include +#include + +#if defined(__WINDOWS__) + #include "wx/msw/private.h" +#endif + +// =========================================================================== +// implementation +// =========================================================================== + +#if wxUSE_BASE + +// ---------------------------------------------------------------------------- +// wxMessageOutput +// ---------------------------------------------------------------------------- + +wxMessageOutput* wxMessageOutput::ms_msgOut = 0; + +wxMessageOutput* wxMessageOutput::Get() +{ + if ( !ms_msgOut && wxTheApp ) + { + ms_msgOut = wxTheApp->GetTraits()->CreateMessageOutput(); + } + + return ms_msgOut; +} + +wxMessageOutput* wxMessageOutput::Set(wxMessageOutput* msgout) +{ + wxMessageOutput* old = ms_msgOut; + ms_msgOut = msgout; + return old; +} + +#if !wxUSE_UTF8_LOCALE_ONLY +void wxMessageOutput::DoPrintfWchar(const wxChar *format, ...) +{ + va_list args; + va_start(args, format); + wxString out; + + out.PrintfV(format, args); + va_end(args); + + Output(out); +} +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#if wxUSE_UNICODE_UTF8 +void wxMessageOutput::DoPrintfUtf8(const char *format, ...) +{ + va_list args; + va_start(args, format); + wxString out; + + out.PrintfV(format, args); + va_end(args); + + Output(out); +} +#endif // wxUSE_UNICODE_UTF8 + +// ---------------------------------------------------------------------------- +// wxMessageOutputBest +// ---------------------------------------------------------------------------- + +void wxMessageOutputBest::Output(const wxString& str) +{ +#ifdef __WINDOWS__ + // decide whether to use console output or not + wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + const bool hasStderr = traits ? traits->CanUseStderr() : false; + + if ( !(m_flags & wxMSGOUT_PREFER_MSGBOX) ) + { + if ( hasStderr && traits->WriteToStderr(AppendLineFeedIfNeeded(str)) ) + return; + } + + wxString title; + if ( wxTheApp ) + title = wxTheApp->GetAppDisplayName(); + else // Use some title to avoid default "Error" + title = _("Message"); + + ::MessageBox(NULL, str.t_str(), title.t_str(), MB_ICONINFORMATION | MB_OK); +#else // !__WINDOWS__ + wxUnusedVar(m_flags); + + // TODO: use the native message box for the other ports too + wxMessageOutputStderr::Output(str); +#endif // __WINDOWS__/!__WINDOWS__ +} + +// ---------------------------------------------------------------------------- +// wxMessageOutputStderr +// ---------------------------------------------------------------------------- + +wxString wxMessageOutputStderr::AppendLineFeedIfNeeded(const wxString& str) +{ + wxString strLF(str); + if ( strLF.empty() || *strLF.rbegin() != '\n' ) + strLF += '\n'; + + return strLF; +} + +void wxMessageOutputStderr::Output(const wxString& str) +{ + const wxString strWithLF = AppendLineFeedIfNeeded(str); + const wxWX2MBbuf buf = strWithLF.mb_str(); + + if ( buf ) + fprintf(m_fp, "%s", (const char*) buf); + else // print at least something + fprintf(m_fp, "%s", (const char*) strWithLF.ToAscii()); + + fflush(m_fp); +} + +// ---------------------------------------------------------------------------- +// wxMessageOutputDebug +// ---------------------------------------------------------------------------- + +void wxMessageOutputDebug::Output(const wxString& str) +{ +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) + wxString out(AppendLineFeedIfNeeded(str)); + out.Replace(wxT("\t"), wxT(" ")); + out.Replace(wxT("\n"), wxT("\r\n")); + ::OutputDebugString(out.t_str()); +#else + // TODO: use native debug output function for the other ports too + wxMessageOutputStderr::Output(str); +#endif // platform +} + +// ---------------------------------------------------------------------------- +// wxMessageOutputLog +// ---------------------------------------------------------------------------- + +void wxMessageOutputLog::Output(const wxString& str) +{ + wxString out(str); + + out.Replace(wxT("\t"), wxT(" ")); + + wxLogMessage(wxT("%s"), out.c_str()); +} + +#endif // wxUSE_BASE + +// ---------------------------------------------------------------------------- +// wxMessageOutputMessageBox +// ---------------------------------------------------------------------------- + +#if wxUSE_GUI && wxUSE_MSGDLG + +extern WXDLLEXPORT_DATA(const char) wxMessageBoxCaptionStr[] = "Message"; + +void wxMessageOutputMessageBox::Output(const wxString& str) +{ + wxString out(str); + + // the native MSW msg box understands the TABs, others don't +#ifndef __WINDOWS__ + out.Replace(wxT("\t"), wxT(" ")); +#endif + + wxString title = wxT("wxWidgets") ; + if (wxTheApp) title = wxTheApp->GetAppDisplayName(); + + ::wxMessageBox(out, title); +} + +#endif // wxUSE_GUI diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/mstream.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/mstream.cpp new file mode 100644 index 0000000000..5e5c6495ce --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/mstream.cpp @@ -0,0 +1,206 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/mstream.cpp +// Purpose: "Memory stream" classes +// Author: Guilhem Lavaux +// Modified by: VZ (23.11.00): general code review +// Created: 04/01/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS + +#include "wx/mstream.h" + +#ifndef WX_PRECOMP + #include "wx/stream.h" +#endif //WX_PRECOMP + +#include + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxMemoryInputStream +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxMemoryInputStream, wxInputStream) + +wxMemoryInputStream::wxMemoryInputStream(const void *data, size_t len) +{ + m_i_streambuf = new wxStreamBuffer(wxStreamBuffer::read); + m_i_streambuf->SetBufferIO(const_cast(data), len); + m_i_streambuf->SetIntPosition(0); // seek to start pos + m_i_streambuf->Fixed(true); + + m_length = len; +} + +wxMemoryInputStream::wxMemoryInputStream(const wxMemoryOutputStream& stream) +{ + const wxFileOffset lenFile = stream.GetLength(); + if ( lenFile == wxInvalidOffset ) + { + m_i_streambuf = NULL; + m_lasterror = wxSTREAM_EOF; + return; + } + + const size_t len = wx_truncate_cast(size_t, lenFile); + wxASSERT_MSG( len == lenFile + size_t(0), wxT("huge files not supported") ); + + m_i_streambuf = new wxStreamBuffer(wxStreamBuffer::read); + m_i_streambuf->SetBufferIO(len); // create buffer + stream.CopyTo(m_i_streambuf->GetBufferStart(), len); + m_i_streambuf->SetIntPosition(0); // seek to start pos + m_i_streambuf->Fixed(true); + m_length = len; +} + +void +wxMemoryInputStream::InitFromStream(wxInputStream& stream, wxFileOffset lenFile) +{ + if ( lenFile == wxInvalidOffset ) + lenFile = stream.GetLength(); + + if ( lenFile == wxInvalidOffset ) + { + m_i_streambuf = NULL; + m_lasterror = wxSTREAM_EOF; + return; + } + + const size_t len = wx_truncate_cast(size_t, lenFile); + wxASSERT_MSG( (wxFileOffset)len == lenFile, wxT("huge files not supported") ); + + m_i_streambuf = new wxStreamBuffer(wxStreamBuffer::read); + m_i_streambuf->SetBufferIO(len); // create buffer + stream.Read(m_i_streambuf->GetBufferStart(), len); + m_i_streambuf->SetIntPosition(0); // seek to start pos + m_i_streambuf->Fixed(true); + m_length = stream.LastRead(); +} + +bool wxMemoryInputStream::CanRead() const +{ + return m_i_streambuf->GetIntPosition() != m_length; +} + +wxMemoryInputStream::~wxMemoryInputStream() +{ + delete m_i_streambuf; +} + +char wxMemoryInputStream::Peek() +{ + char *buf = (char *)m_i_streambuf->GetBufferStart(); + size_t pos = m_i_streambuf->GetIntPosition(); + if ( pos == m_length ) + { + m_lasterror = wxSTREAM_READ_ERROR; + + return 0; + } + + return buf[pos]; +} + +size_t wxMemoryInputStream::OnSysRead(void *buffer, size_t nbytes) +{ + size_t pos = m_i_streambuf->GetIntPosition(); + if ( pos == m_length ) + { + m_lasterror = wxSTREAM_EOF; + + return 0; + } + + m_i_streambuf->Read(buffer, nbytes); + m_lasterror = wxSTREAM_NO_ERROR; + + return m_i_streambuf->GetIntPosition() - pos; +} + +wxFileOffset wxMemoryInputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) +{ + return m_i_streambuf->Seek(pos, mode); +} + +wxFileOffset wxMemoryInputStream::OnSysTell() const +{ + return m_i_streambuf->Tell(); +} + +// ---------------------------------------------------------------------------- +// wxMemoryOutputStream +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxMemoryOutputStream, wxOutputStream) + +wxMemoryOutputStream::wxMemoryOutputStream(void *data, size_t len) +{ + m_o_streambuf = new wxStreamBuffer(wxStreamBuffer::write); + if ( data ) + m_o_streambuf->SetBufferIO(data, len); + m_o_streambuf->Fixed(false); + m_o_streambuf->Flushable(false); +} + +wxMemoryOutputStream::~wxMemoryOutputStream() +{ + delete m_o_streambuf; +} + +size_t wxMemoryOutputStream::OnSysWrite(const void *buffer, size_t nbytes) +{ + size_t oldpos = m_o_streambuf->GetIntPosition(); + m_o_streambuf->Write(buffer, nbytes); + size_t newpos = m_o_streambuf->GetIntPosition(); + + // FIXME can someone please explain what this does? (VZ) + if ( !newpos ) + newpos = m_o_streambuf->GetBufferSize(); + + return newpos - oldpos; +} + +wxFileOffset wxMemoryOutputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) +{ + return m_o_streambuf->Seek(pos, mode); +} + +wxFileOffset wxMemoryOutputStream::OnSysTell() const +{ + return m_o_streambuf->Tell(); +} + +size_t wxMemoryOutputStream::CopyTo(void *buffer, size_t len) const +{ + wxCHECK_MSG( buffer, 0, wxT("must have buffer to CopyTo") ); + + if ( len > GetSize() ) + len = GetSize(); + + memcpy(buffer, m_o_streambuf->GetBufferStart(), len); + + return len; +} + +#endif // wxUSE_STREAMS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/nbkbase.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/nbkbase.cpp new file mode 100644 index 0000000000..3ee7af5f60 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/nbkbase.cpp @@ -0,0 +1,204 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/nbkbase.cpp +// Purpose: common wxNotebook methods +// Author: Vadim Zeitlin +// Modified by: +// Created: 02.07.01 +// Copyright: (c) 2001 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_NOTEBOOK + +#ifndef WX_PRECOMP +#endif //WX_PRECOMP + +#include "wx/notebook.h" + +// ============================================================================ +// implementation +// ============================================================================ + +extern WXDLLEXPORT_DATA(const char) wxNotebookNameStr[] = "notebook"; + +wxDEFINE_EVENT( wxEVT_NOTEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_NOTEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +#include "wx/listimpl.cpp" +wxDEFINE_FLAGS( wxNotebookStyle ) +wxBEGIN_FLAGS( wxNotebookStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxNB_FIXEDWIDTH) +wxFLAGS_MEMBER(wxBK_DEFAULT) +wxFLAGS_MEMBER(wxBK_TOP) +wxFLAGS_MEMBER(wxBK_LEFT) +wxFLAGS_MEMBER(wxBK_RIGHT) +wxFLAGS_MEMBER(wxBK_BOTTOM) +wxFLAGS_MEMBER(wxNB_NOPAGETHEME) +wxFLAGS_MEMBER(wxNB_FLAT) +wxEND_FLAGS( wxNotebookStyle ) + +#if wxUSE_EXTENDED_RTTI + +WX_DEFINE_LIST( wxNotebookPageInfoList ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebookPageInfo, wxObject, "wx/notebook.h" ) + +wxCOLLECTION_TYPE_INFO( wxNotebookPageInfo *, wxNotebookPageInfoList ); + +template<> void wxCollectionToVariantArray( wxNotebookPageInfoList const &theList, + wxAnyList &value) +{ + wxListCollectionToAnyList( theList, value ); +} + +wxBEGIN_PROPERTIES_TABLE(wxNotebookPageInfo) +wxREADONLY_PROPERTY( Page, wxNotebookPage*, GetPage, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxREADONLY_PROPERTY( Text, wxString, GetText, wxString(), 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) +wxREADONLY_PROPERTY( Selected, bool, GetSelected, false, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group") ) +wxREADONLY_PROPERTY( ImageId, int, GetImageId, -1, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxNotebookPageInfo) + +wxCONSTRUCTOR_4( wxNotebookPageInfo, wxNotebookPage*, Page, \ + wxString, Text, bool, Selected, int, ImageId ) + +// WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) +// XTI accessors: + +void wxNotebookBase::AddPageInfo( wxNotebookPageInfo* info ) +{ + AddPage( info->GetPage(), info->GetText(), info->GetSelected(), info->GetImageId() ); +} + +const wxNotebookPageInfoList& wxNotebookBase::GetPageInfos() const +{ + wxNotebookPageInfoList* list = const_cast< wxNotebookPageInfoList* >( &m_pageInfos ); + WX_CLEAR_LIST( wxNotebookPageInfoList, *list ); + for( size_t i = 0; i < GetPageCount(); ++i ) + { + wxNotebookPageInfo *info = new wxNotebookPageInfo(); + info->Create( const_cast(this)->GetPage(i), GetPageText(i), + GetSelection() == int(i), GetPageImage(i) ); + list->Append( info ); + } + return m_pageInfos; +} + +#endif + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxBookCtrlBase, "wx/notebook.h") +wxBEGIN_PROPERTIES_TABLE(wxNotebook) +wxEVENT_PROPERTY( PageChanging, wxEVT_NOTEBOOK_PAGE_CHANGING, wxNotebookEvent ) +wxEVENT_PROPERTY( PageChanged, wxEVT_NOTEBOOK_PAGE_CHANGED, wxNotebookEvent ) + +wxPROPERTY_COLLECTION( PageInfos, wxNotebookPageInfoList, wxNotebookPageInfo*, \ + AddPageInfo, GetPageInfos, 0 /*flags*/, wxT("Helpstring"), \ + wxT("group")) +wxPROPERTY_FLAGS( WindowStyle, wxNotebookStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxNotebook) + +wxCONSTRUCTOR_5( wxNotebook, wxWindow*, Parent, wxWindowID, Id, \ + wxPoint, Position, wxSize, Size, long, WindowStyle) + +// ---------------------------------------------------------------------------- +// geometry +// ---------------------------------------------------------------------------- + +wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage) const +{ + // this is, of course, totally bogus -- but we must do something by + // default because not all ports implement this + wxSize sizeTotal = sizePage; + + if ( HasFlag(wxBK_LEFT) || HasFlag(wxBK_RIGHT) ) + { + sizeTotal.x += 90; + sizeTotal.y += 10; + } + else // tabs on top/bottom side + { + sizeTotal.x += 10; + sizeTotal.y += 40; + } + + return sizeTotal; +} + +// ---------------------------------------------------------------------------- +// events +// ---------------------------------------------------------------------------- + +bool wxNotebookBase::SendPageChangingEvent(int nPage) +{ + wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGING, GetId()); + event.SetSelection(nPage); + event.SetOldSelection(GetSelection()); + event.SetEventObject(this); + return !GetEventHandler()->ProcessEvent(event) || event.IsAllowed(); +} + +void wxNotebookBase::SendPageChangedEvent(int nPageOld, int nPageNew) +{ + wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGED, GetId()); + event.SetSelection(nPageNew == -1 ? GetSelection() : nPageNew); + event.SetOldSelection(nPageOld); + event.SetEventObject(this); + GetEventHandler()->ProcessEvent(event); +} + +#endif // wxUSE_NOTEBOOK diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/numformatter.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/numformatter.cpp new file mode 100644 index 0000000000..12de60e842 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/numformatter.cpp @@ -0,0 +1,305 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/numformatter.cpp +// Purpose: wxNumberFormatter +// Author: Fulvio Senore, Vadim Zeitlin +// Created: 2010-11-06 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/numformatter.h" +#include "wx/intl.h" + +#include // for setlocale and LC_ALL + +// ---------------------------------------------------------------------------- +// local helpers +// ---------------------------------------------------------------------------- + +namespace +{ + +// Contains information about the locale which was used to initialize our +// cached values of the decimal and thousands separators. Notice that it isn't +// enough to store just wxLocale because the user code may call setlocale() +// directly and storing just C locale string is not enough because we can use +// the OS API directly instead of the CRT ones on some platforms. So just store +// both. +class LocaleId +{ +public: + LocaleId() + { +#if wxUSE_INTL + m_wxloc = NULL; +#endif // wxUSE_INTL + m_cloc = NULL; + } + + ~LocaleId() + { + Free(); + } + +#if wxUSE_INTL + // Return true if this is the first time this function is called for this + // object or if the program locale has changed since the last time it was + // called. Otherwise just return false indicating that updating locale- + // dependent information is not necessary. + bool NotInitializedOrHasChanged() + { + wxLocale * const wxloc = wxGetLocale(); + const char * const cloc = setlocale(LC_ALL, NULL); + if ( m_wxloc || m_cloc ) + { + if ( m_wxloc == wxloc && strcmp(m_cloc, cloc) == 0 ) + return false; + + Free(); + } + //else: Not initialized yet. + + m_wxloc = wxloc; + m_cloc = wxCRT_StrdupA(cloc); + + return true; + } +#endif // wxUSE_INTL + +private: + void Free() + { +#if wxUSE_INTL + free(m_cloc); +#endif // wxUSE_INTL + } + +#if wxUSE_INTL + // Non-owned pointer to wxLocale which was used. + wxLocale *m_wxloc; +#endif // wxUSE_INTL + + // Owned pointer to the C locale string. + char *m_cloc; + + wxDECLARE_NO_COPY_CLASS(LocaleId); +}; + +} // anonymous namespace + +// ============================================================================ +// wxNumberFormatter implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// Locale information accessors +// ---------------------------------------------------------------------------- + +wxChar wxNumberFormatter::GetDecimalSeparator() +{ +#if wxUSE_INTL + // Notice that while using static variable here is not MT-safe, the worst + // that can happen is that we redo the initialization if we're called + // concurrently from more than one thread so it's not a real problem. + static wxChar s_decimalSeparator = 0; + + // Remember the locale which was current when we initialized, we must redo + // the initialization if the locale changed. + static LocaleId s_localeUsedForInit; + + if ( s_localeUsedForInit.NotInitializedOrHasChanged() ) + { + const wxString + s = wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER); + if ( s.empty() ) + { + // We really must have something for decimal separator, so fall + // back to the C locale default. + s_decimalSeparator = '.'; + } + else + { + // To the best of my knowledge there are no locales like this. + wxASSERT_MSG( s.length() == 1, + "Multi-character decimal separator?" ); + + s_decimalSeparator = s[0]; + } + } + + return s_decimalSeparator; +#else // !wxUSE_INTL + return wxT('.'); +#endif // wxUSE_INTL/!wxUSE_INTL +} + +bool wxNumberFormatter::GetThousandsSeparatorIfUsed(wxChar *sep) +{ +#if wxUSE_INTL + static wxChar s_thousandsSeparator = 0; + static LocaleId s_localeUsedForInit; + + if ( s_localeUsedForInit.NotInitializedOrHasChanged() ) + { + const wxString + s = wxLocale::GetInfo(wxLOCALE_THOUSANDS_SEP, wxLOCALE_CAT_NUMBER); + if ( !s.empty() ) + { + wxASSERT_MSG( s.length() == 1, + "Multi-character thousands separator?" ); + + s_thousandsSeparator = s[0]; + } + //else: Unlike above it's perfectly fine for the thousands separator to + // be empty if grouping is not used, so just leave it as 0. + } + + if ( !s_thousandsSeparator ) + return false; + + if ( sep ) + *sep = s_thousandsSeparator; + + return true; +#else // !wxUSE_INTL + wxUnusedVar(sep); + return false; +#endif // wxUSE_INTL/!wxUSE_INTL +} + +// ---------------------------------------------------------------------------- +// Conversion to string and helpers +// ---------------------------------------------------------------------------- + +wxString wxNumberFormatter::PostProcessIntString(wxString s, int style) +{ + if ( style & Style_WithThousandsSep ) + AddThousandsSeparators(s); + + wxASSERT_MSG( !(style & Style_NoTrailingZeroes), + "Style_NoTrailingZeroes can't be used with integer values" ); + + return s; +} + +wxString wxNumberFormatter::ToString(long val, int style) +{ + return PostProcessIntString(wxString::Format("%ld", val), style); +} + +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + +wxString wxNumberFormatter::ToString(wxLongLong_t val, int style) +{ + return PostProcessIntString(wxString::Format("%" wxLongLongFmtSpec "d", val), + style); +} + +#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + +wxString wxNumberFormatter::ToString(double val, int precision, int style) +{ + wxString s = wxString::FromDouble(val,precision); + + if ( style & Style_WithThousandsSep ) + AddThousandsSeparators(s); + + if ( style & Style_NoTrailingZeroes ) + RemoveTrailingZeroes(s); + + return s; +} + +void wxNumberFormatter::AddThousandsSeparators(wxString& s) +{ + wxChar thousandsSep; + if ( !GetThousandsSeparatorIfUsed(&thousandsSep) ) + return; + + size_t pos = s.find(GetDecimalSeparator()); + if ( pos == wxString::npos ) + { + // Start grouping at the end of an integer number. + pos = s.length(); + } + + // End grouping at the beginning of the digits -- there could be at a sign + // before their start. + const size_t start = s.find_first_of("0123456789"); + + // We currently group digits by 3 independently of the locale. This is not + // the right thing to do and we should use lconv::grouping (under POSIX) + // and GetLocaleInfo(LOCALE_SGROUPING) (under MSW) to get information about + // the correct grouping to use. This is something that needs to be done at + // wxLocale level first and then used here in the future (TODO). + const size_t GROUP_LEN = 3; + + while ( pos > start + GROUP_LEN ) + { + pos -= GROUP_LEN; + s.insert(pos, thousandsSep); + } +} + +void wxNumberFormatter::RemoveTrailingZeroes(wxString& s) +{ + const size_t posDecSep = s.find(GetDecimalSeparator()); + wxCHECK_RET( posDecSep != wxString::npos, + wxString::Format("No decimal separator in \"%s\"", s) ); + wxCHECK_RET( posDecSep, "Can't start with decimal separator" ); + + // Find the last character to keep. + size_t posLastNonZero = s.find_last_not_of("0"); + + // If it's the decimal separator itself, don't keep it neither. + if ( posLastNonZero == posDecSep ) + posLastNonZero--; + + s.erase(posLastNonZero + 1); +} + +// ---------------------------------------------------------------------------- +// Conversion from strings +// ---------------------------------------------------------------------------- + +void wxNumberFormatter::RemoveThousandsSeparators(wxString& s) +{ + wxChar thousandsSep; + if ( !GetThousandsSeparatorIfUsed(&thousandsSep) ) + return; + + s.Replace(wxString(thousandsSep), wxString()); +} + +bool wxNumberFormatter::FromString(wxString s, long *val) +{ + RemoveThousandsSeparators(s); + return s.ToLong(val); +} + +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + +bool wxNumberFormatter::FromString(wxString s, wxLongLong_t *val) +{ + RemoveThousandsSeparators(s); + return s.ToLongLong(val); +} + +#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + +bool wxNumberFormatter::FromString(wxString s, double *val) +{ + RemoveThousandsSeparators(s); + return s.ToDouble(val); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/object.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/object.cpp new file mode 100644 index 0000000000..b113797473 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/object.cpp @@ -0,0 +1,429 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/object.cpp +// Purpose: wxObject implementation +// Author: Julian Smart +// Modified by: Ron Lee +// Created: 04/01/98 +// Copyright: (c) 1998 Julian Smart +// (c) 2001 Ron Lee +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/object.h" + #include "wx/hash.h" + #include "wx/memory.h" + #include "wx/crt.h" +#endif + +#include + +#if wxUSE_DEBUG_CONTEXT + #if defined(__VISAGECPP__) + #define DEBUG_PRINTF(NAME) { static int raz=0; \ + printf( #NAME " %i\n",raz); fflush(stdout); raz++; } + #else + #define DEBUG_PRINTF(NAME) + #endif +#endif // wxUSE_DEBUG_CONTEXT + +// we must disable optimizations for VC.NET because otherwise its too eager +// linker discards wxClassInfo objects in release build thus breaking many, +// many things +#if defined __VISUALC__ && __VISUALC__ >= 1300 + #pragma optimize("", off) +#endif + +#if wxUSE_EXTENDED_RTTI +const wxClassInfo* wxObject::ms_classParents[] = { NULL } ; +wxObject* wxVariantOfPtrToObjectConverterwxObject ( const wxAny &data ) +{ return wxANY_AS(data, wxObject*); } + wxAny wxObjectToVariantConverterwxObject ( wxObject *data ) + { return wxAny( dynamic_cast (data) ) ; } + + wxClassInfo wxObject::ms_classInfo(ms_classParents , wxEmptyString , wxT("wxObject"), + (int) sizeof(wxObject), \ + (wxObjectConstructorFn) 0 , + NULL,NULL,0 , 0 , + 0 , wxVariantOfPtrToObjectConverterwxObject , 0 , wxObjectToVariantConverterwxObject); + + template<> void wxStringWriteValue(wxString & , wxObject* const & ){ wxFAIL_MSG("unreachable"); } + template<> void wxStringWriteValue(wxString & , wxObject const & ){ wxFAIL_MSG("unreachable"); } + + wxClassTypeInfo s_typeInfo(wxT_OBJECT_PTR , &wxObject::ms_classInfo , NULL , NULL , typeid(wxObject*).name() ) ; + wxClassTypeInfo s_typeInfowxObject(wxT_OBJECT , &wxObject::ms_classInfo , NULL , NULL , typeid(wxObject).name() ) ; +#else +wxClassInfo wxObject::ms_classInfo( wxT("wxObject"), 0, 0, + (int) sizeof(wxObject), + (wxObjectConstructorFn) 0 ); +#endif + +// restore optimizations +#if defined __VISUALC__ && __VISUALC__ >= 1300 + #pragma optimize("", on) +#endif + +wxClassInfo* wxClassInfo::sm_first = NULL; +wxHashTable* wxClassInfo::sm_classTable = NULL; + +// when using XTI, this method is already implemented inline inside +// DECLARE_DYNAMIC_CLASS but otherwise we intentionally make this function +// non-inline because this allows us to have a non-inline virtual function in +// all wx classes and this solves linking problems for HP-UX native toolchain +// and possibly others (we could make dtor non-inline as well but it's more +// useful to keep it inline than this function) +#if !wxUSE_EXTENDED_RTTI + +wxClassInfo *wxObject::GetClassInfo() const +{ + return &wxObject::ms_classInfo; +} + +#endif // wxUSE_EXTENDED_RTTI + +// this variable exists only so that we can avoid 'always true/false' warnings +const bool wxFalse = false; + +// Is this object a kind of (a subclass of) 'info'? +// E.g. is wxWindow a kind of wxObject? +// Go from this class to superclass, taking into account +// two possible base classes. +bool wxObject::IsKindOf(const wxClassInfo *info) const +{ + const wxClassInfo *thisInfo = GetClassInfo(); + return (thisInfo) ? thisInfo->IsKindOf(info) : false ; +} + +#if wxUSE_MEMORY_TRACING && defined( new ) + #undef new +#endif + + +#ifdef _WX_WANT_NEW_SIZET_WXCHAR_INT +void *wxObject::operator new ( size_t size, const wxChar *fileName, int lineNum ) +{ + return wxDebugAlloc(size, (wxChar*) fileName, lineNum, true); +} +#endif + +#ifdef _WX_WANT_DELETE_VOID +void wxObject::operator delete ( void *buf ) +{ + wxDebugFree(buf); +} +#endif + +#ifdef _WX_WANT_DELETE_VOID_CONSTCHAR_SIZET +void wxObject::operator delete ( void *buf, const char *_fname, size_t _line ) +{ + wxDebugFree(buf); +} +#endif + +#ifdef _WX_WANT_DELETE_VOID_WXCHAR_INT +void wxObject::operator delete ( void *buf, const wxChar *WXUNUSED(fileName), int WXUNUSED(lineNum) ) +{ + wxDebugFree(buf); +} +#endif + +#ifdef _WX_WANT_ARRAY_NEW_SIZET_WXCHAR_INT +void *wxObject::operator new[] ( size_t size, const wxChar* fileName, int lineNum ) +{ + return wxDebugAlloc(size, (wxChar*) fileName, lineNum, true, true); +} +#endif + +#ifdef _WX_WANT_ARRAY_DELETE_VOID +void wxObject::operator delete[] ( void *buf ) +{ + wxDebugFree(buf, true); +} +#endif + +#ifdef _WX_WANT_ARRAY_DELETE_VOID_WXCHAR_INT +void wxObject::operator delete[] (void * buf, const wxChar* WXUNUSED(fileName), int WXUNUSED(lineNum) ) +{ + wxDebugFree(buf, true); +} +#endif + + +// ---------------------------------------------------------------------------- +// wxClassInfo +// ---------------------------------------------------------------------------- + +wxClassInfo::~wxClassInfo() +{ + // remove this object from the linked list of all class infos: if we don't + // do it, loading/unloading a DLL containing static wxClassInfo objects is + // not going to work + if ( this == sm_first ) + { + sm_first = m_next; + } + else + { + wxClassInfo *info = sm_first; + while (info) + { + if ( info->m_next == this ) + { + info->m_next = m_next; + break; + } + + info = info->m_next; + } + } + Unregister(); +} + +wxClassInfo *wxClassInfo::FindClass(const wxString& className) +{ + if ( sm_classTable ) + { + return (wxClassInfo *)wxClassInfo::sm_classTable->Get(className); + } + else + { + for ( wxClassInfo *info = sm_first; info ; info = info->m_next ) + { + if ( className == info->GetClassName() ) + return info; + } + + return NULL; + } +} + +// Reentrance can occur on some platforms (Solaris for one), as the use of hash +// and string objects can cause other modules to load and register classes +// before the original call returns. This is handled by keeping the hash table +// local when it is first created and only assigning it to the global variable +// when the function is ready to return. +// +// That does make the assumption that after the function has completed the +// first time the problem will no longer happen; all the modules it depends on +// will have been loaded. The assumption is checked using the 'entry' variable +// as a reentrance guard, it checks that once the hash table is global it is +// not accessed multiple times simulateously. + +void wxClassInfo::Register() +{ +#if wxDEBUG_LEVEL + // reentrance guard - see note above + static int entry = 0; +#endif // wxDEBUG_LEVEL + + wxHashTable *classTable; + + if ( !sm_classTable ) + { + // keep the hash local initially, reentrance is possible + classTable = new wxHashTable(wxKEY_STRING); + } + else + { + // guard againt reentrance once the global has been created + wxASSERT_MSG(++entry == 1, wxT("wxClassInfo::Register() reentrance")); + classTable = sm_classTable; + } + + // Using IMPLEMENT_DYNAMIC_CLASS() macro twice (which may happen if you + // link any object module twice mistakenly, or link twice against wx shared + // library) will break this function because it will enter an infinite loop + // and eventually die with "out of memory" - as this is quite hard to + // detect if you're unaware of this, try to do some checks here. + wxASSERT_MSG( classTable->Get(m_className) == NULL, + wxString::Format + ( + wxT("Class \"%s\" already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() multiple times or linked some object file twice)?"), + m_className + ) + ); + + classTable->Put(m_className, (wxObject *)this); + + // if we're using a local hash we need to try to make it global + if ( sm_classTable != classTable ) + { + if ( !sm_classTable ) + { + // make the hash global + sm_classTable = classTable; + } + else + { + // the gobal hash has already been created by a reentrant call, + // so delete the local hash and try again + delete classTable; + Register(); + } + } + +#if wxDEBUG_LEVEL + entry = 0; +#endif // wxDEBUG_LEVEL +} + +void wxClassInfo::Unregister() +{ + if ( sm_classTable ) + { + sm_classTable->Delete(m_className); + if ( sm_classTable->GetCount() == 0 ) + { + wxDELETE(sm_classTable); + } + } +} + +wxObject *wxCreateDynamicObject(const wxString& name) +{ +#if wxUSE_DEBUG_CONTEXT + DEBUG_PRINTF(wxObject *wxCreateDynamicObject) +#endif + + if ( wxClassInfo::sm_classTable ) + { + wxClassInfo *info = (wxClassInfo *)wxClassInfo::sm_classTable->Get(name); + return info ? info->CreateObject() : NULL; + } + else // no sm_classTable yet + { + for ( wxClassInfo *info = wxClassInfo::sm_first; + info; + info = info->m_next ) + { + if (info->m_className && wxStrcmp(info->m_className, name) == 0) + return info->CreateObject(); + } + + return NULL; + } +} + +// iterator interface +wxClassInfo::const_iterator::value_type +wxClassInfo::const_iterator::operator*() const +{ + return (wxClassInfo*)m_node->GetData(); +} + +wxClassInfo::const_iterator& wxClassInfo::const_iterator::operator++() +{ + m_node = m_table->Next(); + return *this; +} + +const wxClassInfo::const_iterator wxClassInfo::const_iterator::operator++(int) +{ + wxClassInfo::const_iterator tmp = *this; + m_node = m_table->Next(); + return tmp; +} + +wxClassInfo::const_iterator wxClassInfo::begin_classinfo() +{ + sm_classTable->BeginFind(); + + return const_iterator(sm_classTable->Next(), sm_classTable); +} + +wxClassInfo::const_iterator wxClassInfo::end_classinfo() +{ + return const_iterator(NULL, NULL); +} + +// ---------------------------------------------------------------------------- +// wxObjectRefData +// ---------------------------------------------------------------------------- + +void wxRefCounter::DecRef() +{ + wxASSERT_MSG( m_count > 0, "invalid ref data count" ); + + if ( --m_count == 0 ) + delete this; +} + + +// ---------------------------------------------------------------------------- +// wxObject +// ---------------------------------------------------------------------------- + +void wxObject::Ref(const wxObject& clone) +{ +#if wxUSE_DEBUG_CONTEXT + DEBUG_PRINTF(wxObject::Ref) +#endif + + // nothing to be done + if (m_refData == clone.m_refData) + return; + + // delete reference to old data + UnRef(); + + // reference new data + if ( clone.m_refData ) + { + m_refData = clone.m_refData; + m_refData->IncRef(); + } +} + +void wxObject::UnRef() +{ + if ( m_refData ) + { + m_refData->DecRef(); + m_refData = NULL; + } +} + +void wxObject::AllocExclusive() +{ + if ( !m_refData ) + { + m_refData = CreateRefData(); + } + else if ( m_refData->GetRefCount() > 1 ) + { + // note that ref is not going to be destroyed in this case + const wxObjectRefData* ref = m_refData; + UnRef(); + + // ... so we can still access it + m_refData = CloneRefData(ref); + } + //else: ref count is 1, we are exclusive owners of m_refData anyhow + + wxASSERT_MSG( m_refData && m_refData->GetRefCount() == 1, + wxT("wxObject::AllocExclusive() failed.") ); +} + +wxObjectRefData *wxObject::CreateRefData() const +{ + // if you use AllocExclusive() you must override this method + wxFAIL_MSG( wxT("CreateRefData() must be overridden if called!") ); + + return NULL; +} + +wxObjectRefData * +wxObject::CloneRefData(const wxObjectRefData * WXUNUSED(data)) const +{ + // if you use AllocExclusive() you must override this method + wxFAIL_MSG( wxT("CloneRefData() must be overridden if called!") ); + + return NULL; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/odcombocmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/odcombocmn.cpp new file mode 100644 index 0000000000..096c9c51ba --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/odcombocmn.cpp @@ -0,0 +1,54 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/odcombocmn.cpp +// Purpose: wxOwnerDrawnComboBox common code +// Author: Jaakko Salli +// Modified by: +// Created: Apr-30-2006 +// Copyright: (c) 2005 Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ODCOMBOBOX + +#include "wx/odcombo.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/combobox.h" + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/dialog.h" +#endif + +#include "wx/combo.h" + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxIMPLEMENT_DYNAMIC_CLASS2_XTI(wxOwnerDrawnComboBox, wxComboCtrl, \ + wxControlWithItems, "wx/odcombo.h") + +wxBEGIN_PROPERTIES_TABLE(wxOwnerDrawnComboBox) +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxOwnerDrawnComboBox) + +wxCONSTRUCTOR_5( wxOwnerDrawnComboBox , wxWindow* , Parent , wxWindowID , \ + Id , wxString , Value , wxPoint , Position , wxSize , Size ) + +#endif // wxUSE_ODCOMBOBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/overlaycmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/overlaycmn.cpp new file mode 100644 index 0000000000..74b20c8d22 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/overlaycmn.cpp @@ -0,0 +1,182 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/overlaycmn.cpp +// Purpose: common wxOverlay code +// Author: Stefan Csomor +// Modified by: +// Created: 2006-10-20 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/overlay.h" +#include "wx/private/overlay.h" +#include "wx/dcclient.h" +#include "wx/dcmemory.h" + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxOverlay +// ---------------------------------------------------------------------------- + +wxOverlay::wxOverlay() +{ + m_impl = new wxOverlayImpl(); + m_inDrawing = false; +} + +wxOverlay::~wxOverlay() +{ + delete m_impl; +} + +bool wxOverlay::IsOk() +{ + return m_impl->IsOk(); +} + +void wxOverlay::Init( wxDC* dc, int x , int y , int width , int height ) +{ + m_impl->Init(dc, x, y, width, height); +} + +void wxOverlay::BeginDrawing( wxDC* dc) +{ + m_impl->BeginDrawing(dc); + m_inDrawing = true ; +} + +void wxOverlay::EndDrawing( wxDC* dc) +{ + m_impl->EndDrawing(dc); + m_inDrawing = false ; +} + +void wxOverlay::Clear( wxDC* dc) +{ + m_impl->Clear(dc); +} + +void wxOverlay::Reset() +{ + wxASSERT_MSG(m_inDrawing==false,wxT("cannot reset overlay during drawing")); + m_impl->Reset(); +} + + +// ---------------------------------------------------------------------------- +// wxDCOverlay +// ---------------------------------------------------------------------------- + +wxDCOverlay::wxDCOverlay(wxOverlay &overlay, wxDC *dc, int x , int y , int width , int height) : + m_overlay(overlay) +{ + Init(dc, x, y, width, height); +} + +wxDCOverlay::wxDCOverlay(wxOverlay &overlay, wxDC *dc) : + m_overlay(overlay) +{ + int width; + int height; + dc->GetSize(&width,&height); + Init(dc, 0, 0, width, height); +} + +wxDCOverlay::~wxDCOverlay() +{ + m_overlay.EndDrawing(m_dc); +} + +void wxDCOverlay::Init(wxDC *dc, int x , int y , int width , int height ) +{ + m_dc = dc ; + if ( !m_overlay.IsOk() ) + { + m_overlay.Init(dc,x,y,width,height); + } + m_overlay.BeginDrawing(dc); +} + +void wxDCOverlay::Clear() +{ + m_overlay.Clear(m_dc); +} + +// ---------------------------------------------------------------------------- +// generic implementation of wxOverlayImpl +// ---------------------------------------------------------------------------- + +#ifndef wxHAS_NATIVE_OVERLAY + +wxOverlayImpl::wxOverlayImpl() +{ + m_window = NULL ; + m_x = m_y = m_width = m_height = 0 ; +} + +wxOverlayImpl::~wxOverlayImpl() +{ +} + +bool wxOverlayImpl::IsOk() +{ + return m_bmpSaved.IsOk() ; +} + +void wxOverlayImpl::Init( wxDC* dc, int x , int y , int width , int height ) +{ + m_window = dc->GetWindow(); + wxMemoryDC dcMem ; + m_bmpSaved.Create( width, height ); + dcMem.SelectObject( m_bmpSaved ); + m_x = x ; + m_y = y ; + m_width = width ; + m_height = height ; + dcMem.Blit(0, 0, m_width, m_height, + dc, x, y); + dcMem.SelectObject( wxNullBitmap ); +} + +void wxOverlayImpl::Clear(wxDC* dc) +{ + wxMemoryDC dcMem ; + dcMem.SelectObject( m_bmpSaved ); + dc->Blit( m_x, m_y, m_width, m_height , &dcMem , 0 , 0 ); + dcMem.SelectObject( wxNullBitmap ); +} + +void wxOverlayImpl::Reset() +{ + m_bmpSaved = wxBitmap(); +} + +void wxOverlayImpl::BeginDrawing(wxDC* WXUNUSED(dc)) +{ +} + +void wxOverlayImpl::EndDrawing(wxDC* WXUNUSED(dc)) +{ +} + +#endif // !wxHAS_NATIVE_OVERLAY + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/ownerdrwcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/ownerdrwcmn.cpp new file mode 100644 index 0000000000..967a5a285b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/ownerdrwcmn.cpp @@ -0,0 +1,104 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/ownerdrwcmn.cpp +// Purpose: wxOwnerDrawn class methods common to all platforms +// Author: Marcin Malich +// Modified by: +// Created: 2009-09-22 +// Copyright: (c) 2009 Marcin Malich +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_OWNER_DRAWN + +#include "wx/ownerdrw.h" + +#ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/font.h" + #include "wx/colour.h" + #include "wx/dcmemory.h" + #include "wx/settings.h" + #include "wx/utils.h" +#endif + +// ============================================================================ +// implementation +// ============================================================================ + +bool wxOwnerDrawnBase::OnMeasureItem(size_t *width, size_t *height) +{ + if ( IsOwnerDrawn() ) + { + wxMemoryDC dc; + wxFont font; + GetFontToUse(font); + dc.SetFont(font); + + // item name/text without mnemonics + wxString name = wxStripMenuCodes(GetName(), wxStrip_Mnemonics); + + wxCoord w, h; + dc.GetTextExtent(name, &w, &h); + + *width = w + m_margin; + *height = h; + } + else + { + *width = 0; + *height = 0; + } + + return true; +} + +void wxOwnerDrawnBase::GetFontToUse(wxFont& font) const +{ + font = m_font.IsOk() ? m_font : *wxNORMAL_FONT; +} + +void wxOwnerDrawnBase::GetColourToUse(wxODStatus stat, wxColour& colText, wxColour& colBack) const +{ + if ( stat & wxODSelected ) + { + colText = wxSystemSettings::GetColour( + !(stat & wxODDisabled) ? wxSYS_COLOUR_HIGHLIGHTTEXT + : wxSYS_COLOUR_GRAYTEXT); + + colBack = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); + } + else + { + // fall back to default colors if none explicitly specified + + if ( stat & wxODDisabled ) + { + colText = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT); + } + else + { + colText = m_colText.IsOk() ? m_colText + : wxSystemSettings::GetColour(wxSYS_COLOUR_MENUTEXT); + } + + colBack = m_colBack.IsOk() ? m_colBack + : wxSystemSettings::GetColour(wxSYS_COLOUR_MENU); + } +} + +#endif // wxUSE_OWNER_DRAWN diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/panelcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/panelcmn.cpp new file mode 100644 index 0000000000..c12e1950a3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/panelcmn.cpp @@ -0,0 +1,120 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/panelcmn.cpp +// Purpose: wxPanel common code +// Author: Julian Smart, Robert Roebling, Vadim Zeitlin +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/object.h" + #include "wx/font.h" + #include "wx/colour.h" + #include "wx/settings.h" + #include "wx/log.h" + #include "wx/panel.h" + #include "wx/containr.h" +#endif + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxPanelStyle ) +wxBEGIN_FLAGS( wxPanelStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) +wxEND_FLAGS( wxPanelStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxPanel, wxWindow, "wx/panel.h") + +wxBEGIN_PROPERTIES_TABLE(wxPanel) + wxPROPERTY_FLAGS( WindowStyle, wxPanelStyle, long, \ + SetWindowStyleFlag, GetWindowStyleFlag, \ + wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style + // style wxTAB_TRAVERSAL +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxPanel) + +wxCONSTRUCTOR_6( wxPanel, wxWindow*, Parent, wxWindowID, Id, \ + wxPoint, Position, wxSize, Size, long, WindowStyle, \ + wxString, Name) + + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxPanelBase creation +// ---------------------------------------------------------------------------- + +bool wxPanelBase::Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if ( !wxWindow::Create(parent, id, pos, size, style, name) ) + return false; + + // so that non-solid background renders correctly under GTK+: + SetThemeEnabled(true); + +#if defined(__WXWINCE__) && (defined(__POCKETPC__) || defined(__SMARTPHONE__)) + // Required to get solid control backgrounds under WinCE + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); +#endif + + return true; +} + +void wxPanelBase::InitDialog() +{ + wxInitDialogEvent event(GetId()); + event.SetEventObject(this); + GetEventHandler()->ProcessEvent(event); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/paper.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/paper.cpp new file mode 100644 index 0000000000..5eb9669372 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/paper.cpp @@ -0,0 +1,379 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/paper.cpp +// Purpose: Paper size classes +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PRINTING_ARCHITECTURE + +#ifndef WX_PRECOMP + #if defined(__WXMSW__) + #include "wx/msw/wrapcdlg.h" + #endif // MSW + #include "wx/utils.h" + #include "wx/settings.h" + #include "wx/intl.h" + #include "wx/module.h" +#endif + +#include "wx/paper.h" + +#include +#include + +#ifdef __WXMSW__ + #ifndef __WIN32__ + #include + #endif +#endif + // End __WXMSW__ + +IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject) +// IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList) + +/* + * Paper size database for all platforms + */ + +wxPrintPaperType::wxPrintPaperType() +{ + m_paperId = wxPAPER_NONE; + m_platformId = 0; + m_paperName = wxEmptyString; + m_width = 0; + m_height = 0; +} + +wxPrintPaperType::wxPrintPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h) +{ + m_paperId = paperId; + m_platformId = platformId; + m_paperName = name; + m_width = w; + m_height = h; +} + +// Get width and height in points (1/72th of an inch) +wxSize wxPrintPaperType::GetSizeDeviceUnits() const +{ + return wxSize( (int) ((m_width / 10.0) / (25.4 / 72.0)), (int) ((m_height / 10.0) / (25.4 / 72.0)) ); +} + +/* + * Print paper database for PostScript + */ + +WX_DECLARE_LIST(wxPrintPaperType, wxPrintPaperTypeList); +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxPrintPaperTypeList) + +wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL; + +wxPrintPaperDatabase::wxPrintPaperDatabase() +{ + m_map = new wxStringToPrintPaperTypeHashMap; + m_list = new wxPrintPaperTypeList; +} + +wxPrintPaperDatabase::~wxPrintPaperDatabase() +{ + ClearDatabase(); +} + +void wxPrintPaperDatabase::CreateDatabase() +{ + WXADDPAPER(wxPAPER_LETTER, DMPAPER_LETTER, wxTRANSLATE("Letter, 8 1/2 x 11 in"), 2159, 2794); + WXADDPAPER(wxPAPER_LEGAL, DMPAPER_LEGAL, wxTRANSLATE("Legal, 8 1/2 x 14 in"), 2159, 3556); + WXADDPAPER(wxPAPER_A4, DMPAPER_A4, wxTRANSLATE("A4 sheet, 210 x 297 mm"), 2100, 2970); + WXADDPAPER(wxPAPER_CSHEET, DMPAPER_CSHEET, wxTRANSLATE("C sheet, 17 x 22 in"), 4318, 5588); + WXADDPAPER(wxPAPER_DSHEET, DMPAPER_DSHEET, wxTRANSLATE("D sheet, 22 x 34 in"), 5588, 8636); + WXADDPAPER(wxPAPER_ESHEET, DMPAPER_ESHEET, wxTRANSLATE("E sheet, 34 x 44 in"), 8636, 11176); + WXADDPAPER(wxPAPER_LETTERSMALL, DMPAPER_LETTERSMALL, wxTRANSLATE("Letter Small, 8 1/2 x 11 in"), 2159, 2794); + WXADDPAPER(wxPAPER_TABLOID, DMPAPER_TABLOID, wxTRANSLATE("Tabloid, 11 x 17 in"), 2794, 4318); + WXADDPAPER(wxPAPER_LEDGER, DMPAPER_LEDGER, wxTRANSLATE("Ledger, 17 x 11 in"), 4318, 2794); + WXADDPAPER(wxPAPER_STATEMENT, DMPAPER_STATEMENT, wxTRANSLATE("Statement, 5 1/2 x 8 1/2 in"), 1397, 2159); + WXADDPAPER(wxPAPER_EXECUTIVE, DMPAPER_EXECUTIVE, wxTRANSLATE("Executive, 7 1/4 x 10 1/2 in"), 1842, 2667); + WXADDPAPER(wxPAPER_A3, DMPAPER_A3, wxTRANSLATE("A3 sheet, 297 x 420 mm"), 2970, 4200); + WXADDPAPER(wxPAPER_A4SMALL, DMPAPER_A4SMALL, wxTRANSLATE("A4 small sheet, 210 x 297 mm"), 2100, 2970); + WXADDPAPER(wxPAPER_A5, DMPAPER_A5, wxTRANSLATE("A5 sheet, 148 x 210 mm"), 1480, 2100); + WXADDPAPER(wxPAPER_B4, DMPAPER_B4, wxTRANSLATE("B4 sheet, 250 x 354 mm"), 2500, 3540); + WXADDPAPER(wxPAPER_B5, DMPAPER_B5, wxTRANSLATE("B5 sheet, 182 x 257 millimeter"), 1820, 2570); + WXADDPAPER(wxPAPER_FOLIO, DMPAPER_FOLIO, wxTRANSLATE("Folio, 8 1/2 x 13 in"), 2159, 3302); + WXADDPAPER(wxPAPER_QUARTO, DMPAPER_QUARTO, wxTRANSLATE("Quarto, 215 x 275 mm"), 2150, 2750); + WXADDPAPER(wxPAPER_10X14, DMPAPER_10X14, wxTRANSLATE("10 x 14 in"), 2540, 3556); + WXADDPAPER(wxPAPER_11X17, DMPAPER_11X17, wxTRANSLATE("11 x 17 in"), 2794, 4318); + WXADDPAPER(wxPAPER_NOTE, DMPAPER_NOTE, wxTRANSLATE("Note, 8 1/2 x 11 in"), 2159, 2794); + WXADDPAPER(wxPAPER_ENV_9, DMPAPER_ENV_9, wxTRANSLATE("#9 Envelope, 3 7/8 x 8 7/8 in"), 984, 2254); + WXADDPAPER(wxPAPER_ENV_10, DMPAPER_ENV_10, wxTRANSLATE("#10 Envelope, 4 1/8 x 9 1/2 in"), 1048, 2413); + WXADDPAPER(wxPAPER_ENV_11, DMPAPER_ENV_11, wxTRANSLATE("#11 Envelope, 4 1/2 x 10 3/8 in"), 1143, 2635); + WXADDPAPER(wxPAPER_ENV_12, DMPAPER_ENV_12, wxTRANSLATE("#12 Envelope, 4 3/4 x 11 in"), 1206, 2794); + WXADDPAPER(wxPAPER_ENV_14, DMPAPER_ENV_14, wxTRANSLATE("#14 Envelope, 5 x 11 1/2 in"), 1270, 2921); + WXADDPAPER(wxPAPER_ENV_DL, DMPAPER_ENV_DL, wxTRANSLATE("DL Envelope, 110 x 220 mm"), 1100, 2200); + WXADDPAPER(wxPAPER_ENV_C5, DMPAPER_ENV_C5, wxTRANSLATE("C5 Envelope, 162 x 229 mm"), 1620, 2290); + WXADDPAPER(wxPAPER_ENV_C3, DMPAPER_ENV_C3, wxTRANSLATE("C3 Envelope, 324 x 458 mm"), 3240, 4580); + WXADDPAPER(wxPAPER_ENV_C4, DMPAPER_ENV_C4, wxTRANSLATE("C4 Envelope, 229 x 324 mm"), 2290, 3240); + WXADDPAPER(wxPAPER_ENV_C6, DMPAPER_ENV_C6, wxTRANSLATE("C6 Envelope, 114 x 162 mm"), 1140, 1620); + WXADDPAPER(wxPAPER_ENV_C65, DMPAPER_ENV_C65, wxTRANSLATE("C65 Envelope, 114 x 229 mm"), 1140, 2290); + WXADDPAPER(wxPAPER_ENV_B4, DMPAPER_ENV_B4, wxTRANSLATE("B4 Envelope, 250 x 353 mm"), 2500, 3530); + WXADDPAPER(wxPAPER_ENV_B5, DMPAPER_ENV_B5, wxTRANSLATE("B5 Envelope, 176 x 250 mm"), 1760, 2500); + WXADDPAPER(wxPAPER_ENV_B6, DMPAPER_ENV_B6, wxTRANSLATE("B6 Envelope, 176 x 125 mm"), 1760, 1250); + WXADDPAPER(wxPAPER_ENV_ITALY, DMPAPER_ENV_ITALY, wxTRANSLATE("Italy Envelope, 110 x 230 mm"), 1100, 2300); + WXADDPAPER(wxPAPER_ENV_MONARCH, DMPAPER_ENV_MONARCH, wxTRANSLATE("Monarch Envelope, 3 7/8 x 7 1/2 in"), 984, 1905); + WXADDPAPER(wxPAPER_ENV_PERSONAL, DMPAPER_ENV_PERSONAL, wxTRANSLATE("6 3/4 Envelope, 3 5/8 x 6 1/2 in"), 921, 1651); + WXADDPAPER(wxPAPER_FANFOLD_US, DMPAPER_FANFOLD_US, wxTRANSLATE("US Std Fanfold, 14 7/8 x 11 in"), 3778, 2794); + WXADDPAPER(wxPAPER_FANFOLD_STD_GERMAN, DMPAPER_FANFOLD_STD_GERMAN, wxTRANSLATE("German Std Fanfold, 8 1/2 x 12 in"), 2159, 3048); + WXADDPAPER(wxPAPER_FANFOLD_LGL_GERMAN, DMPAPER_FANFOLD_LGL_GERMAN, wxTRANSLATE("German Legal Fanfold, 8 1/2 x 13 in"), 2159, 3302); + + WXADDPAPER(wxPAPER_ISO_B4, DMPAPER_ISO_B4, wxTRANSLATE("B4 (ISO) 250 x 353 mm"), 2500, 3530); + WXADDPAPER(wxPAPER_JAPANESE_POSTCARD, DMPAPER_JAPANESE_POSTCARD, wxTRANSLATE("Japanese Postcard 100 x 148 mm"), 1000, 1480); + WXADDPAPER(wxPAPER_9X11, DMPAPER_9X11, wxTRANSLATE("9 x 11 in"), 2286, 2794); + WXADDPAPER(wxPAPER_10X11, DMPAPER_10X11, wxTRANSLATE("10 x 11 in"), 2540, 2794); + WXADDPAPER(wxPAPER_15X11, DMPAPER_15X11, wxTRANSLATE("15 x 11 in"), 3810, 2794); + WXADDPAPER(wxPAPER_ENV_INVITE, DMPAPER_ENV_INVITE, wxTRANSLATE("Envelope Invite 220 x 220 mm"), 2200, 2200); + WXADDPAPER(wxPAPER_LETTER_EXTRA, DMPAPER_LETTER_EXTRA, wxTRANSLATE("Letter Extra 9 1/2 x 12 in"), 2413, 3048); + WXADDPAPER(wxPAPER_LEGAL_EXTRA, DMPAPER_LEGAL_EXTRA, wxTRANSLATE("Legal Extra 9 1/2 x 15 in"), 2413, 3810); + WXADDPAPER(wxPAPER_TABLOID_EXTRA, DMPAPER_TABLOID_EXTRA, wxTRANSLATE("Tabloid Extra 11.69 x 18 in"), 2969, 4572); + WXADDPAPER(wxPAPER_A4_EXTRA, DMPAPER_A4_EXTRA, wxTRANSLATE("A4 Extra 9.27 x 12.69 in"), 2355, 3223); + WXADDPAPER(wxPAPER_LETTER_TRANSVERSE, DMPAPER_LETTER_TRANSVERSE, wxTRANSLATE("Letter Transverse 8 1/2 x 11 in"), 2159, 2794); + WXADDPAPER(wxPAPER_A4_TRANSVERSE, DMPAPER_A4_TRANSVERSE, wxTRANSLATE("A4 Transverse 210 x 297 mm"), 2100, 2970); + WXADDPAPER(wxPAPER_LETTER_EXTRA_TRANSVERSE, DMPAPER_LETTER_EXTRA_TRANSVERSE, wxTRANSLATE("Letter Extra Transverse 9.275 x 12 in"), 2355, 3048); + WXADDPAPER(wxPAPER_A_PLUS, DMPAPER_A_PLUS, wxTRANSLATE("SuperA/SuperA/A4 227 x 356 mm"), 2270, 3560); + WXADDPAPER(wxPAPER_B_PLUS, DMPAPER_B_PLUS, wxTRANSLATE("SuperB/SuperB/A3 305 x 487 mm"), 3050, 4870); + WXADDPAPER(wxPAPER_LETTER_PLUS, DMPAPER_LETTER_PLUS, wxTRANSLATE("Letter Plus 8 1/2 x 12.69 in"), 2159, 3223); + WXADDPAPER(wxPAPER_A4_PLUS, DMPAPER_A4_PLUS, wxTRANSLATE("A4 Plus 210 x 330 mm"), 2100, 3300); + WXADDPAPER(wxPAPER_A5_TRANSVERSE, DMPAPER_A5_TRANSVERSE, wxTRANSLATE("A5 Transverse 148 x 210 mm"), 1480, 2100); + WXADDPAPER(wxPAPER_B5_TRANSVERSE, DMPAPER_B5_TRANSVERSE, wxTRANSLATE("B5 (JIS) Transverse 182 x 257 mm"), 1820, 2570); + WXADDPAPER(wxPAPER_A3_EXTRA, DMPAPER_A3_EXTRA, wxTRANSLATE("A3 Extra 322 x 445 mm"), 3220, 4450); + WXADDPAPER(wxPAPER_A5_EXTRA, DMPAPER_A5_EXTRA, wxTRANSLATE("A5 Extra 174 x 235 mm"), 1740, 2350); + WXADDPAPER(wxPAPER_B5_EXTRA, DMPAPER_B5_EXTRA, wxTRANSLATE("B5 (ISO) Extra 201 x 276 mm"), 2010, 2760); + WXADDPAPER(wxPAPER_A2, DMPAPER_A2, wxTRANSLATE("A2 420 x 594 mm"), 4200, 5940); + WXADDPAPER(wxPAPER_A3_TRANSVERSE, DMPAPER_A3_TRANSVERSE, wxTRANSLATE("A3 Transverse 297 x 420 mm"), 2970, 4200); + WXADDPAPER(wxPAPER_A3_EXTRA_TRANSVERSE,DMPAPER_A3_EXTRA_TRANSVERSE,wxTRANSLATE("A3 Extra Transverse 322 x 445 mm"), 3220, 4450); + + WXADDPAPER(wxPAPER_DBL_JAPANESE_POSTCARD, 69, wxTRANSLATE("Japanese Double Postcard 200 x 148 mm"), 2000, 1480); + WXADDPAPER(wxPAPER_A6, 70, wxTRANSLATE("A6 105 x 148 mm"), 1050, 1480); + WXADDPAPER(wxPAPER_JENV_KAKU2, 71, wxTRANSLATE("Japanese Envelope Kaku #2"), 2400, 3320); + WXADDPAPER(wxPAPER_JENV_KAKU3, 72, wxTRANSLATE("Japanese Envelope Kaku #3"), 2160, 2770); + WXADDPAPER(wxPAPER_JENV_CHOU3, 73, wxTRANSLATE("Japanese Envelope Chou #3"), 1200, 2350); + WXADDPAPER(wxPAPER_JENV_CHOU4, 74, wxTRANSLATE("Japanese Envelope Chou #4"), 900, 2050); + WXADDPAPER(wxPAPER_LETTER_ROTATED, 75, wxTRANSLATE("Letter Rotated 11 x 8 1/2 in"), 2794, 2159); + WXADDPAPER(wxPAPER_A3_ROTATED, 76, wxTRANSLATE("A3 Rotated 420 x 297 mm"), 4200, 2970); + WXADDPAPER(wxPAPER_A4_ROTATED, 77, wxTRANSLATE("A4 Rotated 297 x 210 mm"), 2970, 2100); + WXADDPAPER(wxPAPER_A5_ROTATED, 78, wxTRANSLATE("A5 Rotated 210 x 148 mm"), 2100, 1480); + WXADDPAPER(wxPAPER_B4_JIS_ROTATED, 79, wxTRANSLATE("B4 (JIS) Rotated 364 x 257 mm"), 3640, 2570); + WXADDPAPER(wxPAPER_B5_JIS_ROTATED, 80, wxTRANSLATE("B5 (JIS) Rotated 257 x 182 mm"), 2570, 1820); + WXADDPAPER(wxPAPER_JAPANESE_POSTCARD_ROTATED, 81, wxTRANSLATE("Japanese Postcard Rotated 148 x 100 mm"), 1480, 1000); + WXADDPAPER(wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED, 82, wxTRANSLATE("Double Japanese Postcard Rotated 148 x 200 mm"), 1480, 2000); + WXADDPAPER(wxPAPER_A6_ROTATED, 83, wxTRANSLATE("A6 Rotated 148 x 105 mm"), 1480, 1050); + WXADDPAPER(wxPAPER_JENV_KAKU2_ROTATED, 84, wxTRANSLATE("Japanese Envelope Kaku #2 Rotated"), 3320, 2400); + WXADDPAPER(wxPAPER_JENV_KAKU3_ROTATED, 85, wxTRANSLATE("Japanese Envelope Kaku #3 Rotated"), 2770, 2160); + WXADDPAPER(wxPAPER_JENV_CHOU3_ROTATED, 86, wxTRANSLATE("Japanese Envelope Chou #3 Rotated"), 2350, 1200); + WXADDPAPER(wxPAPER_JENV_CHOU4_ROTATED, 87, wxTRANSLATE("Japanese Envelope Chou #4 Rotated"), 2050, 900); + WXADDPAPER(wxPAPER_B6_JIS, 88, wxTRANSLATE("B6 (JIS) 128 x 182 mm"), 1280, 1820); + WXADDPAPER(wxPAPER_B6_JIS_ROTATED, 89, wxTRANSLATE("B6 (JIS) Rotated 182 x 128 mm"), 1920, 1280); + WXADDPAPER(wxPAPER_12X11, 90, wxTRANSLATE("12 x 11 in"), 3048, 2794); + WXADDPAPER(wxPAPER_JENV_YOU4, 91, wxTRANSLATE("Japanese Envelope You #4"), 2350, 1050); + WXADDPAPER(wxPAPER_JENV_YOU4_ROTATED, 92, wxTRANSLATE("Japanese Envelope You #4 Rotated"), 1050, 2350); + WXADDPAPER(wxPAPER_P16K, 93, wxTRANSLATE("PRC 16K 146 x 215 mm"), 1460, 2150); + WXADDPAPER(wxPAPER_P32K, 94, wxTRANSLATE("PRC 32K 97 x 151 mm"), 970, 1510); + WXADDPAPER(wxPAPER_P32KBIG, 95, wxTRANSLATE("PRC 32K(Big) 97 x 151 mm"), 970, 1510); + WXADDPAPER(wxPAPER_PENV_1, 96, wxTRANSLATE("PRC Envelope #1 102 x 165 mm"), 1020, 1650); + WXADDPAPER(wxPAPER_PENV_2, 97, wxTRANSLATE("PRC Envelope #2 102 x 176 mm"), 1020, 1760); + WXADDPAPER(wxPAPER_PENV_3, 98, wxTRANSLATE("PRC Envelope #3 125 x 176 mm"), 1250, 1760); + WXADDPAPER(wxPAPER_PENV_4, 99, wxTRANSLATE("PRC Envelope #4 110 x 208 mm"), 1100, 2080); + WXADDPAPER(wxPAPER_PENV_5, 100, wxTRANSLATE("PRC Envelope #5 110 x 220 mm"), 1100, 2200); + WXADDPAPER(wxPAPER_PENV_6, 101, wxTRANSLATE("PRC Envelope #6 120 x 230 mm"), 1200, 2300); + WXADDPAPER(wxPAPER_PENV_7, 102, wxTRANSLATE("PRC Envelope #7 160 x 230 mm"), 1600, 2300); + WXADDPAPER(wxPAPER_PENV_8, 103, wxTRANSLATE("PRC Envelope #8 120 x 309 mm"), 1200, 3090); + WXADDPAPER(wxPAPER_PENV_9, 104, wxTRANSLATE("PRC Envelope #9 229 x 324 mm"), 2290, 3240); + WXADDPAPER(wxPAPER_PENV_10, 105, wxTRANSLATE("PRC Envelope #10 324 x 458 mm"), 3240, 4580); + WXADDPAPER(wxPAPER_P16K_ROTATED, 106, wxTRANSLATE("PRC 16K Rotated"), 2150, 1460); + WXADDPAPER(wxPAPER_P32K_ROTATED, 107, wxTRANSLATE("PRC 32K Rotated"), 1510, 970); + WXADDPAPER(wxPAPER_P32KBIG_ROTATED, 108, wxTRANSLATE("PRC 32K(Big) Rotated"), 1510, 970); + WXADDPAPER(wxPAPER_PENV_1_ROTATED, 109, wxTRANSLATE("PRC Envelope #1 Rotated 165 x 102 mm"), 1650, 1020); + WXADDPAPER(wxPAPER_PENV_2_ROTATED, 110, wxTRANSLATE("PRC Envelope #2 Rotated 176 x 102 mm"), 1760, 1020); + WXADDPAPER(wxPAPER_PENV_3_ROTATED, 111, wxTRANSLATE("PRC Envelope #3 Rotated 176 x 125 mm"), 1760, 1250); + WXADDPAPER(wxPAPER_PENV_4_ROTATED, 112, wxTRANSLATE("PRC Envelope #4 Rotated 208 x 110 mm"), 2080, 1100); + WXADDPAPER(wxPAPER_PENV_5_ROTATED, 113, wxTRANSLATE("PRC Envelope #5 Rotated 220 x 110 mm"), 2200, 1100); + WXADDPAPER(wxPAPER_PENV_6_ROTATED, 114, wxTRANSLATE("PRC Envelope #6 Rotated 230 x 120 mm"), 2300, 1200); + WXADDPAPER(wxPAPER_PENV_7_ROTATED, 115, wxTRANSLATE("PRC Envelope #7 Rotated 230 x 160 mm"), 2300, 1600); + WXADDPAPER(wxPAPER_PENV_8_ROTATED, 116, wxTRANSLATE("PRC Envelope #8 Rotated 309 x 120 mm"), 3090, 1200); + WXADDPAPER(wxPAPER_PENV_9_ROTATED, 117, wxTRANSLATE("PRC Envelope #9 Rotated 324 x 229 mm"), 3240, 2290); + WXADDPAPER(wxPAPER_PENV_10_ROTATED, 118, wxTRANSLATE("PRC Envelope #10 Rotated 458 x 324 mm"), 4580, 3240); + + // notice that the values 135 and 136 for Windows paper size ids of A0 and + // A1 formats are not documented anywhere but seem to work for at least + // some printers so we use them until we find a better way (see #11083) + WXADDPAPER(wxPAPER_A0, 136, wxTRANSLATE("A0 sheet, 841 x 1189 mm"), 8410, 11888); + WXADDPAPER(wxPAPER_A1, 135, wxTRANSLATE("A1 sheet, 594 x 841 mm"), 5940, 8410); +} + +void wxPrintPaperDatabase::ClearDatabase() +{ + delete m_list; + WX_CLEAR_HASH_MAP(wxStringToPrintPaperTypeHashMap, *m_map); + delete m_map; +} + +void wxPrintPaperDatabase::AddPaperType(wxPaperSize paperId, const wxString& name, int w, int h) +{ + wxPrintPaperType* tmp = new wxPrintPaperType(paperId, 0, name, w, h); + (*m_map)[name] = tmp; + m_list->push_back(tmp); +} + +void wxPrintPaperDatabase::AddPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h) +{ + wxPrintPaperType* tmp = new wxPrintPaperType(paperId, platformId, name, w, h); + (*m_map)[name] = tmp; + m_list->push_back(tmp); +} + +wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const wxString& name) +{ + wxStringToPrintPaperTypeHashMap::iterator it = m_map->find(name); + if (it != m_map->end()) + return it->second; + else + return NULL; +} + +wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(wxPaperSize id) +{ + typedef wxStringToPrintPaperTypeHashMap::iterator iterator; + + for (iterator it = m_map->begin(), en = m_map->end(); it != en; ++it) + { + wxPrintPaperType* paperType = it->second; + if (paperType->GetId() == id) + return paperType; + } + + return NULL; +} + +wxPrintPaperType *wxPrintPaperDatabase::FindPaperTypeByPlatformId(int id) +{ + typedef wxStringToPrintPaperTypeHashMap::iterator iterator; + + for (iterator it = m_map->begin(), en = m_map->end(); it != en; ++it) + { + wxPrintPaperType* paperType = it->second; + if (paperType->GetPlatformId() == id) + return paperType; + } + + return NULL; +} + +wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const wxSize& sz) +{ + // Take the item ordering into account so that the more common types + // are likely to be taken into account first. This fixes problems with, + // for example, Letter reverting to A4 in the page setup dialog because + // it was wrongly translated to Note. + for ( size_t i = 0; i < GetCount(); i++ ) + { + wxPrintPaperType* const paperType = Item(i); + const wxSize paperSize = paperType->GetSize() ; + if ( abs(paperSize.x - sz.x) < 10 && abs(paperSize.y - sz.y) < 10 ) + return paperType; + } + + return NULL; +} + +// Convert name to size id +wxPaperSize wxPrintPaperDatabase::ConvertNameToId(const wxString& name) +{ + wxPrintPaperType* type = FindPaperType(name); + if (type) + return type->GetId(); + else + return wxPAPER_NONE; +} + +// Convert size id to name +wxString wxPrintPaperDatabase::ConvertIdToName(wxPaperSize paperId) +{ + wxPrintPaperType* type = FindPaperType(paperId); + if (type) + return type->GetName(); + else + return wxEmptyString; +} + +// Get the paper size +wxSize wxPrintPaperDatabase::GetSize(wxPaperSize paperId) +{ + wxPrintPaperType* type = FindPaperType(paperId); + if (type) + return type->GetSize(); + else + return wxSize(0,0); +} + +// Get the paper size +wxPaperSize wxPrintPaperDatabase::GetSize(const wxSize& size) +{ + wxPrintPaperType* type = FindPaperType(size); + if (type) + return type->GetId(); + else + return wxPAPER_NONE; +} + +// QUICK and DIRTY +size_t wxPrintPaperDatabase::GetCount() const +{ + return m_list->GetCount(); +} + +wxPrintPaperType* wxPrintPaperDatabase::Item(size_t index) const +{ + return m_list->Item(index)->GetData(); +} + +// A module to allow initialization/cleanup of print paper +// things without calling these functions from app.cpp. + +class WXDLLEXPORT wxPrintPaperModule: public wxModule +{ +DECLARE_DYNAMIC_CLASS(wxPrintPaperModule) +public: + wxPrintPaperModule() {} + bool OnInit(); + void OnExit(); +}; + +IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperModule, wxModule) + +/* + * Initialization/cleanup module + */ + +bool wxPrintPaperModule::OnInit() +{ + wxThePrintPaperDatabase = new wxPrintPaperDatabase; + wxThePrintPaperDatabase->CreateDatabase(); + + return true; +} + +void wxPrintPaperModule::OnExit() +{ + wxDELETE(wxThePrintPaperDatabase); +} + +#endif // wxUSE_PRINTING_ARCHITECTURE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/persist.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/persist.cpp new file mode 100644 index 0000000000..f1e951957f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/persist.cpp @@ -0,0 +1,174 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/persist.cpp +// Purpose: common persistence support classes +// Author: Vadim Zeitlin +// Created: 2009-01-20 +// Copyright: (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CONFIG + +#ifndef WX_PRECOMP +#endif // WX_PRECOMP + +#include "wx/persist.h" + +namespace +{ + +wxPersistenceManager* gs_manager = NULL; + +} // anonymous namespace + +// ============================================================================ +// wxPersistenceManager implementation +// ============================================================================ + +/* static */ +void wxPersistenceManager::Set(wxPersistenceManager& manager) +{ + gs_manager = &manager; +} + +/* static */ +wxPersistenceManager& wxPersistenceManager::Get() +{ + if ( !gs_manager ) + { + static wxPersistenceManager s_manager; + + gs_manager = &s_manager; + } + + return *gs_manager; +} + +wxPersistenceManager::~wxPersistenceManager() +{ +} + +wxString +wxPersistenceManager::GetKey(const wxPersistentObject& who, + const wxString& name) const +{ + wxString key("Persistent_Options"); // TODO: make this configurable + key << wxCONFIG_PATH_SEPARATOR << who.GetKind() + << wxCONFIG_PATH_SEPARATOR << who.GetName() + << wxCONFIG_PATH_SEPARATOR << name; + + return key; +} + +wxPersistentObject *wxPersistenceManager::Find(void *obj) const +{ + const wxPersistentObjectsMap::const_iterator + it = m_persistentObjects.find(obj); + return it == m_persistentObjects.end() ? NULL : it->second; +} + +wxPersistentObject * +wxPersistenceManager::Register(void *obj, wxPersistentObject *po) +{ + if ( wxPersistentObject *old = Find(obj) ) + { + wxFAIL_MSG( "object is already registered" ); + + delete po; // still avoid the memory leaks + return old; + } + + m_persistentObjects[obj] = po; + + return po; +} + +void wxPersistenceManager::Unregister(void *obj) +{ + wxPersistentObjectsMap::iterator it = m_persistentObjects.find(obj); + wxCHECK_RET( it != m_persistentObjects.end(), "not registered" ); + + wxPersistentObject * const po = it->second; + m_persistentObjects.erase(it); + delete po; +} + +void wxPersistenceManager::Save(void *obj) +{ + if ( !m_doSave ) + return; + + wxPersistentObjectsMap::iterator it = m_persistentObjects.find(obj); + wxCHECK_RET( it != m_persistentObjects.end(), "not registered" ); + + it->second->Save(); +} + +bool wxPersistenceManager::Restore(void *obj) +{ + if ( !m_doRestore ) + return false; + + wxPersistentObjectsMap::iterator it = m_persistentObjects.find(obj); + wxCHECK_MSG( it != m_persistentObjects.end(), false, "not registered" ); + + return it->second->Restore(); +} + +namespace +{ + +template +inline bool +DoSaveValue(wxConfigBase *conf, const wxString& key, T value) +{ + return conf && conf->Write(key, value); +} + +template +bool +DoRestoreValue(wxConfigBase *conf, const wxString& key, T *value) +{ + return conf && conf->Read(key, value); +} + +} // anonymous namespace + +#define wxPERSIST_DEFINE_SAVE_RESTORE_FOR(Type) \ + bool wxPersistenceManager::SaveValue(const wxPersistentObject& who, \ + const wxString& name, \ + Type value) \ + { \ + return DoSaveValue(GetConfig(), GetKey(who, name), value); \ + } \ + \ + bool wxPersistenceManager::RestoreValue(const wxPersistentObject& who, \ + const wxString& name, \ + Type *value) \ + { \ + return DoRestoreValue(GetConfig(), GetKey(who, name), value); \ + } + +wxPERSIST_DEFINE_SAVE_RESTORE_FOR(bool) +wxPERSIST_DEFINE_SAVE_RESTORE_FOR(int) +wxPERSIST_DEFINE_SAVE_RESTORE_FOR(long) +wxPERSIST_DEFINE_SAVE_RESTORE_FOR(wxString) + +#undef wxPERSIST_DEFINE_SAVE_RESTORE_FOR + +#endif // wxUSE_CONFIG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/pickerbase.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/pickerbase.cpp new file mode 100644 index 0000000000..b68d7b1c90 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/pickerbase.cpp @@ -0,0 +1,179 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/pickerbase.cpp +// Purpose: wxPickerBase class implementation +// Author: Francesco Montorsi +// Modified by: +// Created: 15/04/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_COLOURPICKERCTRL || \ + wxUSE_DIRPICKERCTRL || \ + wxUSE_FILEPICKERCTRL || \ + wxUSE_FONTPICKERCTRL + +#include "wx/pickerbase.h" +#include "wx/tooltip.h" + +#ifndef WX_PRECOMP + #include "wx/textctrl.h" +#endif + + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_ABSTRACT_CLASS(wxPickerBase, wxControl) + +// ---------------------------------------------------------------------------- +// wxPickerBase +// ---------------------------------------------------------------------------- + +bool wxPickerBase::CreateBase(wxWindow *parent, + wxWindowID id, + const wxString &text, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + // remove any border style from our style as wxPickerBase's window must be + // invisible (user styles must be set on the textctrl or the platform-dependent picker) + style &= ~wxBORDER_MASK; + + if (!wxControl::Create(parent, id, pos, size, style | wxNO_BORDER | wxTAB_TRAVERSAL, + validator, name)) + return false; + + SetMinSize( size ); + + m_sizer = new wxBoxSizer(wxHORIZONTAL); + + if (HasFlag(wxPB_USE_TEXTCTRL)) + { + // NOTE: the style of this class (wxPickerBase) and the style of the + // attached text control are different: GetTextCtrlStyle() extracts + // the styles related to the textctrl from the styles passed here + m_text = new wxTextCtrl(this, wxID_ANY, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + GetTextCtrlStyle(style)); + if (!m_text) + { + wxFAIL_MSG( wxT("wxPickerBase's textctrl creation failed") ); + return false; + } + + // set the maximum length allowed for this textctrl. + // This is very important since any change to it will trigger an update in + // the m_picker; for very long strings, this real-time synchronization could + // become a CPU-blocker and thus should be avoided. + // 32 characters will be more than enough for all common uses. + m_text->SetMaxLength(32); + + // set the initial contents of the textctrl + m_text->SetValue(text); + + m_text->Connect(m_text->GetId(), wxEVT_TEXT, + wxCommandEventHandler(wxPickerBase::OnTextCtrlUpdate), + NULL, this); + m_text->Connect(m_text->GetId(), wxEVT_KILL_FOCUS, + wxFocusEventHandler(wxPickerBase::OnTextCtrlKillFocus), + NULL, this); + + m_text->Connect(m_text->GetId(), wxEVT_DESTROY, + wxWindowDestroyEventHandler(wxPickerBase::OnTextCtrlDelete), + NULL, this); + + // the text control's proportion values defaults to 2 + m_sizer->Add(m_text, 2, GetDefaultTextCtrlFlag(), 5); + } + + return true; +} + +void wxPickerBase::PostCreation() +{ + // the picker's proportion value defaults to 1 when there's no text control + // associated with it - in that case it defaults to 0 + m_sizer->Add(m_picker, HasTextCtrl() ? 0 : 1, GetDefaultPickerCtrlFlag(), 5); + + // For aesthetic reasons, make sure the picker is at least as high as the + // associated text control and is always at least square, unless we are + // explicitly using wxPB_SMALL style to force it to take as little space as + // possible. + if ( !HasFlag(wxPB_SMALL) ) + { + const wxSize pickerBestSize(m_picker->GetBestSize()); + const wxSize textBestSize( HasTextCtrl() ? m_text->GetBestSize() : wxSize()); + wxSize pickerMinSize; + pickerMinSize.y = wxMax(pickerBestSize.y, textBestSize.y); + pickerMinSize.x = wxMax(pickerBestSize.x, pickerMinSize.y); + if ( pickerMinSize != pickerBestSize ) + m_picker->SetMinSize(pickerMinSize); + } + + SetSizer(m_sizer); + + SetInitialSize( GetMinSize() ); +} + +#if wxUSE_TOOLTIPS + +void wxPickerBase::DoSetToolTip(wxToolTip *tip) +{ + // don't set the tooltip on us but rather on our two child windows + // as otherwise it would appear only when the cursor is placed on the + // small area around the child windows which belong to wxPickerBase + m_picker->SetToolTip(tip); + + // do a copy as wxWindow will own the pointer we pass + if ( m_text ) + m_text->SetToolTip(tip ? new wxToolTip(tip->GetTip()) : NULL); +} + +#endif // wxUSE_TOOLTIPS + +// ---------------------------------------------------------------------------- +// wxPickerBase - event handlers +// ---------------------------------------------------------------------------- + +void wxPickerBase::OnTextCtrlKillFocus(wxFocusEvent& event) +{ + event.Skip(); + + // don't leave the textctrl empty + if (m_text && m_text->GetValue().empty()) + UpdateTextCtrlFromPicker(); +} + +void wxPickerBase::OnTextCtrlDelete(wxWindowDestroyEvent &) +{ + // the textctrl has been deleted; our pointer is invalid! + m_text = NULL; +} + +void wxPickerBase::OnTextCtrlUpdate(wxCommandEvent &) +{ + // for each text-change, update the picker + UpdatePickerFromTextCtrl(); +} + +#endif // Any picker in use diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/platinfo.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/platinfo.cpp new file mode 100644 index 0000000000..ee943915c6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/platinfo.cpp @@ -0,0 +1,349 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/platinfo.cpp +// Purpose: implements wxPlatformInfo class +// Author: Francesco Montorsi +// Modified by: +// Created: 07.07.2006 (based on wxToolkitInfo) +// Copyright: (c) 2006 Francesco Montorsi +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/platinfo.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/utils.h" +#endif //WX_PRECOMP + +#include "wx/apptrait.h" + +// global object +// VERY IMPORTANT: do not use the default constructor since it would +// try to init the wxPlatformInfo instance using +// gs_platInfo itself! +static wxPlatformInfo gs_platInfo(wxPORT_UNKNOWN); + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +static const wxChar* const wxOperatingSystemIdNames[] = +{ + wxT("Apple Mac OS"), + wxT("Apple Mac OS X"), + + wxT("Microsoft Windows 9X"), + wxT("Microsoft Windows NT"), + wxT("Microsoft Windows Micro"), + wxT("Microsoft Windows CE"), + + wxT("Linux"), + wxT("FreeBSD"), + wxT("OpenBSD"), + wxT("NetBSD"), + + wxT("SunOS"), + wxT("AIX"), + wxT("HPUX"), + + wxT("Other Unix"), + wxT("Other Unix"), + + wxT("DOS"), + wxT("OS/2"), +}; + +static const wxChar* const wxPortIdNames[] = +{ + wxT("wxBase"), + wxT("wxMSW"), + wxT("wxMotif"), + wxT("wxGTK"), + wxT("wxDFB"), + wxT("wxX11"), + wxT("wxOS2"), + wxT("wxMac"), + wxT("wxCocoa"), + wxT("wxWinCE"), +}; + +static const wxChar* const wxArchitectureNames[] = +{ + wxT("32 bit"), + wxT("64 bit") +}; + +static const wxChar* const wxEndiannessNames[] = +{ + wxT("Big endian"), + wxT("Little endian"), + wxT("PDP endian") +}; + +// ---------------------------------------------------------------------------- +// local functions +// ---------------------------------------------------------------------------- + +// returns the logarithm in base 2 of 'value'; this maps the enum values to the +// corresponding indexes of the string arrays above +static unsigned wxGetIndexFromEnumValue(int value) +{ + wxCHECK_MSG( value, (unsigned)-1, wxT("invalid enum value") ); + + int n = 0; + while ( !(value & 1) ) + { + value >>= 1; + n++; + } + + wxASSERT_MSG( value == 1, wxT("more than one bit set in enum value") ); + + return n; +} + +// ---------------------------------------------------------------------------- +// wxPlatformInfo +// ---------------------------------------------------------------------------- + +wxPlatformInfo::wxPlatformInfo() +{ + // just copy platform info for currently running platform + *this = Get(); +} + +wxPlatformInfo::wxPlatformInfo(wxPortId pid, int tkMajor, int tkMinor, + wxOperatingSystemId id, int osMajor, int osMinor, + wxArchitecture arch, + wxEndianness endian, + bool usingUniversal) +{ + m_tkVersionMajor = tkMajor; + m_tkVersionMinor = tkMinor; + m_port = pid; + m_usingUniversal = usingUniversal; + + m_os = id; + m_osVersionMajor = osMajor; + m_osVersionMinor = osMinor; + + m_endian = endian; + m_arch = arch; +} + +bool wxPlatformInfo::operator==(const wxPlatformInfo &t) const +{ + return m_tkVersionMajor == t.m_tkVersionMajor && + m_tkVersionMinor == t.m_tkVersionMinor && + m_osVersionMajor == t.m_osVersionMajor && + m_osVersionMinor == t.m_osVersionMinor && + m_os == t.m_os && + m_osDesc == t.m_osDesc && + m_ldi == t.m_ldi && + m_desktopEnv == t.m_desktopEnv && + m_port == t.m_port && + m_usingUniversal == t.m_usingUniversal && + m_arch == t.m_arch && + m_endian == t.m_endian; +} + +void wxPlatformInfo::InitForCurrentPlatform() +{ + // autodetect all informations + const wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + if ( !traits ) + { + wxFAIL_MSG( wxT("failed to initialize wxPlatformInfo") ); + + m_port = wxPORT_UNKNOWN; + m_usingUniversal = false; + m_tkVersionMajor = + m_tkVersionMinor = 0; + } + else + { + m_port = traits->GetToolkitVersion(&m_tkVersionMajor, &m_tkVersionMinor); + m_usingUniversal = traits->IsUsingUniversalWidgets(); + m_desktopEnv = traits->GetDesktopEnvironment(); + } + + m_os = wxGetOsVersion(&m_osVersionMajor, &m_osVersionMinor); + m_osDesc = wxGetOsDescription(); + m_endian = wxIsPlatformLittleEndian() ? wxENDIAN_LITTLE : wxENDIAN_BIG; + m_arch = wxIsPlatform64Bit() ? wxARCH_64 : wxARCH_32; + +#ifdef __LINUX__ + m_ldi = wxGetLinuxDistributionInfo(); +#endif + // else: leave m_ldi empty +} + +/* static */ +const wxPlatformInfo& wxPlatformInfo::Get() +{ + static bool initialized = false; + if ( !initialized ) + { + gs_platInfo.InitForCurrentPlatform(); + initialized = true; + } + + return gs_platInfo; +} + +/* static */ +wxString wxPlatformInfo::GetOperatingSystemDirectory() +{ + return wxGetOSDirectory(); +} + + + +// ---------------------------------------------------------------------------- +// wxPlatformInfo - enum -> string conversions +// ---------------------------------------------------------------------------- + +wxString wxPlatformInfo::GetOperatingSystemFamilyName(wxOperatingSystemId os) +{ + const wxChar* string = wxT("Unknown"); + if ( os & wxOS_MAC ) + string = wxT("Macintosh"); + else if ( os & wxOS_WINDOWS ) + string = wxT("Windows"); + else if ( os & wxOS_UNIX ) + string = wxT("Unix"); + else if ( os == wxOS_DOS ) + string = wxT("DOS"); + else if ( os == wxOS_OS2 ) + string = wxT("OS/2"); + + return string; +} + +wxString wxPlatformInfo::GetOperatingSystemIdName(wxOperatingSystemId os) +{ + const unsigned idx = wxGetIndexFromEnumValue(os); + + wxCHECK_MSG( idx < WXSIZEOF(wxOperatingSystemIdNames), wxEmptyString, + wxT("invalid OS id") ); + + return wxOperatingSystemIdNames[idx]; +} + +wxString wxPlatformInfo::GetPortIdName(wxPortId port, bool usingUniversal) +{ + const unsigned idx = wxGetIndexFromEnumValue(port); + + wxCHECK_MSG( idx < WXSIZEOF(wxPortIdNames), wxEmptyString, + wxT("invalid port id") ); + + wxString ret = wxPortIdNames[idx]; + + if ( usingUniversal ) + ret += wxT("/wxUniversal"); + + return ret; +} + +wxString wxPlatformInfo::GetPortIdShortName(wxPortId port, bool usingUniversal) +{ + const unsigned idx = wxGetIndexFromEnumValue(port); + + wxCHECK_MSG( idx < WXSIZEOF(wxPortIdNames), wxEmptyString, + wxT("invalid port id") ); + + wxString ret = wxPortIdNames[idx]; + ret = ret.Mid(2).Lower(); // remove 'wx' prefix + + if ( usingUniversal ) + ret += wxT("univ"); + + return ret; +} + +wxString wxPlatformInfo::GetArchName(wxArchitecture arch) +{ + wxCOMPILE_TIME_ASSERT( WXSIZEOF(wxArchitectureNames) == wxARCH_MAX, + wxArchitectureNamesMismatch ); + + return wxArchitectureNames[arch]; +} + +wxString wxPlatformInfo::GetEndiannessName(wxEndianness end) +{ + wxCOMPILE_TIME_ASSERT( WXSIZEOF(wxEndiannessNames) == wxENDIAN_MAX, + wxEndiannessNamesMismatch ); + + return wxEndiannessNames[end]; +} + + +// ---------------------------------------------------------------------------- +// wxPlatformInfo - string -> enum conversions +// ---------------------------------------------------------------------------- + +wxOperatingSystemId wxPlatformInfo::GetOperatingSystemId(const wxString &str) +{ + for ( size_t i = 0; i < WXSIZEOF(wxOperatingSystemIdNames); i++ ) + { + if ( wxString(wxOperatingSystemIdNames[i]).CmpNoCase(str) == 0 ) + return (wxOperatingSystemId)(1 << i); + } + + return wxOS_UNKNOWN; +} + +wxPortId wxPlatformInfo::GetPortId(const wxString &str) +{ + // recognize both short and long port names + for ( size_t i = 0; i < WXSIZEOF(wxPortIdNames); i++ ) + { + wxPortId current = (wxPortId)(1 << i); + + if ( wxString(wxPortIdNames[i]).CmpNoCase(str) == 0 || + GetPortIdShortName(current, true).CmpNoCase(str) == 0 || + GetPortIdShortName(current, false).CmpNoCase(str) == 0 ) + return current; + } + + return wxPORT_UNKNOWN; +} + +wxArchitecture wxPlatformInfo::GetArch(const wxString &arch) +{ + if ( arch.Contains(wxT("32")) ) + return wxARCH_32; + + if ( arch.Contains(wxT("64")) ) + return wxARCH_64; + + return wxARCH_INVALID; +} + +wxEndianness wxPlatformInfo::GetEndianness(const wxString& end) +{ + const wxString endl(end.Lower()); + if ( endl.StartsWith(wxT("little")) ) + return wxENDIAN_LITTLE; + + if ( endl.StartsWith(wxT("big")) ) + return wxENDIAN_BIG; + + return wxENDIAN_INVALID; +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/popupcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/popupcmn.cpp new file mode 100644 index 0000000000..e50dc3e626 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/popupcmn.cpp @@ -0,0 +1,687 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/popupcmn.cpp +// Purpose: implementation of wxPopupTransientWindow +// Author: Vadim Zeitlin +// Modified by: +// Created: 06.01.01 +// Copyright: (c) 2001 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_POPUPWIN + +#include "wx/popupwin.h" + +#ifndef WX_PRECOMP + #include "wx/combobox.h" // wxComboCtrl + #include "wx/app.h" // wxPostEvent + #include "wx/log.h" +#endif //WX_PRECOMP + +#include "wx/display.h" +#include "wx/recguard.h" + +#ifdef __WXUNIVERSAL__ + #include "wx/univ/renderer.h" + #include "wx/scrolbar.h" +#endif // __WXUNIVERSAL__ + +#ifdef __WXGTK__ + #include + #if GTK_CHECK_VERSION(2,0,0) + #include "wx/gtk/private/gtk2-compat.h" + #else + #define gtk_widget_get_window(x) x->window + #endif +#elif defined(__WXMSW__) + #include "wx/msw/private.h" +#elif defined(__WXX11__) + #include "wx/x11/private.h" +#endif + +IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow) +IMPLEMENT_DYNAMIC_CLASS(wxPopupTransientWindow, wxPopupWindow) + +#if wxUSE_COMBOBOX && defined(__WXUNIVERSAL__) + IMPLEMENT_DYNAMIC_CLASS(wxPopupComboWindow, wxPopupTransientWindow) +#endif + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// event handlers which we use to intercept events which cause the popup to +// disappear +class wxPopupWindowHandler : public wxEvtHandler +{ +public: + wxPopupWindowHandler(wxPopupTransientWindow *popup) : m_popup(popup) {} + +protected: + // event handlers + void OnLeftDown(wxMouseEvent& event); + void OnCaptureLost(wxMouseCaptureLostEvent& event); + +private: + wxPopupTransientWindow *m_popup; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxPopupWindowHandler); +}; + +class wxPopupFocusHandler : public wxEvtHandler +{ +public: + wxPopupFocusHandler(wxPopupTransientWindow *popup) : m_popup(popup) {} + +protected: + void OnKillFocus(wxFocusEvent& event); + void OnChar(wxKeyEvent& event); + +private: + wxPopupTransientWindow *m_popup; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxPopupFocusHandler); +}; + +// ---------------------------------------------------------------------------- +// event tables +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxPopupWindowHandler, wxEvtHandler) + EVT_LEFT_DOWN(wxPopupWindowHandler::OnLeftDown) + EVT_MOUSE_CAPTURE_LOST(wxPopupWindowHandler::OnCaptureLost) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(wxPopupFocusHandler, wxEvtHandler) + EVT_KILL_FOCUS(wxPopupFocusHandler::OnKillFocus) + EVT_CHAR(wxPopupFocusHandler::OnChar) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(wxPopupTransientWindow, wxPopupWindow) +#if defined(__WXMSW__) || (defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON) + EVT_IDLE(wxPopupTransientWindow::OnIdle) +#endif +END_EVENT_TABLE() + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxPopupWindowBase +// ---------------------------------------------------------------------------- + +wxPopupWindowBase::~wxPopupWindowBase() +{ + // this destructor is required for Darwin +} + +bool wxPopupWindowBase::Create(wxWindow* WXUNUSED(parent), int WXUNUSED(flags)) +{ + return true; +} + +void wxPopupWindowBase::Position(const wxPoint& ptOrigin, + const wxSize& size) +{ + // determine the position and size of the screen we clamp the popup to + wxPoint posScreen; + wxSize sizeScreen; + + const int displayNum = wxDisplay::GetFromPoint(ptOrigin); + if ( displayNum != wxNOT_FOUND ) + { + const wxRect rectScreen = wxDisplay(displayNum).GetGeometry(); + posScreen = rectScreen.GetPosition(); + sizeScreen = rectScreen.GetSize(); + } + else // outside of any display? + { + // just use the primary one then + posScreen = wxPoint(0, 0); + sizeScreen = wxGetDisplaySize(); + } + + + const wxSize sizeSelf = GetSize(); + + // is there enough space to put the popup below the window (where we put it + // by default)? + wxCoord y = ptOrigin.y + size.y; + if ( y + sizeSelf.y > posScreen.y + sizeScreen.y ) + { + // check if there is enough space above + if ( ptOrigin.y > sizeSelf.y ) + { + // do position the control above the window + y -= size.y + sizeSelf.y; + } + //else: not enough space below nor above, leave below + } + + // now check left/right too + wxCoord x = ptOrigin.x; + + if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft ) + { + // shift the window to the left instead of the right. + x -= size.x; + x -= sizeSelf.x; // also shift it by window width. + } + else + x += size.x; + + + if ( x + sizeSelf.x > posScreen.x + sizeScreen.x ) + { + // check if there is enough space to the left + if ( ptOrigin.x > sizeSelf.x ) + { + // do position the control to the left + x -= size.x + sizeSelf.x; + } + //else: not enough space there neither, leave in default position + } + + Move(x, y, wxSIZE_NO_ADJUSTMENTS); +} + +// ---------------------------------------------------------------------------- +// wxPopupTransientWindow +// ---------------------------------------------------------------------------- + +void wxPopupTransientWindow::Init() +{ + m_child = + m_focus = NULL; + + m_handlerFocus = NULL; + m_handlerPopup = NULL; +} + +wxPopupTransientWindow::wxPopupTransientWindow(wxWindow *parent, int style) +{ + Init(); + + (void)Create(parent, style); +} + +wxPopupTransientWindow::~wxPopupTransientWindow() +{ + if (m_handlerPopup && m_handlerPopup->GetNextHandler()) + PopHandlers(); + + wxASSERT(!m_handlerFocus || !m_handlerFocus->GetNextHandler()); + wxASSERT(!m_handlerPopup || !m_handlerPopup->GetNextHandler()); + + delete m_handlerFocus; + delete m_handlerPopup; +} + +void wxPopupTransientWindow::PopHandlers() +{ + if ( m_child ) + { + if ( !m_child->RemoveEventHandler(m_handlerPopup) ) + { + // something is very wrong and someone else probably deleted our + // handler - so don't risk deleting it second time + m_handlerPopup = NULL; + } + if (m_child->HasCapture()) + { + m_child->ReleaseMouse(); + } + m_child = NULL; + } + + if ( m_focus ) + { + if ( !m_focus->RemoveEventHandler(m_handlerFocus) ) + { + // see above + m_handlerFocus = NULL; + } + } + m_focus = NULL; +} + +void wxPopupTransientWindow::Popup(wxWindow *winFocus) +{ + // If we have a single child, we suppose that it must cover the entire + // popup window and hence we give the mouse capture to it instead of + // keeping it for ourselves. + // + // Notice that this works best for combobox-like popups which have a single + // control inside them and not so well for popups containing a single + // wxPanel with multiple children inside it but OTOH it does no harm in + // this case neither and we can't reliably distinguish between them. + const wxWindowList& children = GetChildren(); + if ( children.GetCount() == 1 ) + { + m_child = children.GetFirst()->GetData(); + } + else + { + m_child = this; + } + + Show(); + + // There is a problem if these are still in use + wxASSERT(!m_handlerFocus || !m_handlerFocus->GetNextHandler()); + wxASSERT(!m_handlerPopup || !m_handlerPopup->GetNextHandler()); + + if (!m_handlerPopup) + m_handlerPopup = new wxPopupWindowHandler(this); + + m_child->PushEventHandler(m_handlerPopup); + +#if defined(__WXMSW__) + // Focusing on child of popup window does not work on MSW unless WS_POPUP + // style is set. We do not even want to try to set the focus, as it may + // provoke errors on some Windows versions (Vista and later). + if ( ::GetWindowLong(GetHwnd(), GWL_STYLE) & WS_POPUP ) +#endif + { + m_focus = winFocus ? winFocus : this; + m_focus->SetFocus(); + } + +#if defined( __WXMSW__ ) || (defined( __WXMAC__) && wxOSX_USE_COCOA_OR_CARBON) + // MSW doesn't allow to set focus to the popup window, but we need to + // subclass the window which has the focus, and not winFocus passed in or + // otherwise everything else breaks down + m_focus = FindFocus(); +#elif defined(__WXGTK__) + // GTK+ catches the activate events from the popup + // window, not the focus events from the child window + m_focus = this; +#endif + + if ( m_focus ) + { + if (!m_handlerFocus) + m_handlerFocus = new wxPopupFocusHandler(this); + + m_focus->PushEventHandler(m_handlerFocus); + } +} + +bool wxPopupTransientWindow::Show( bool show ) +{ +#ifdef __WXGTK__ + if (!show) + { +#ifdef __WXGTK3__ + GdkDisplay* display = gtk_widget_get_display(m_widget); + GdkDeviceManager* manager = gdk_display_get_device_manager(display); + GdkDevice* device = gdk_device_manager_get_client_pointer(manager); + gdk_device_ungrab(device, unsigned(GDK_CURRENT_TIME)); +#else + gdk_pointer_ungrab( (guint32)GDK_CURRENT_TIME ); +#endif + + gtk_grab_remove( m_widget ); + } +#endif + +#ifdef __WXX11__ + if (!show) + { + XUngrabPointer( wxGlobalDisplay(), CurrentTime ); + } +#endif + +#if defined( __WXMSW__ ) || defined( __WXMAC__) + if (!show && m_child && m_child->HasCapture()) + { + m_child->ReleaseMouse(); + } +#endif + + bool ret = wxPopupWindow::Show( show ); + +#ifdef __WXGTK__ + if (show) + { + gtk_grab_add( m_widget ); + + const GdkEventMask mask = GdkEventMask( + GDK_BUTTON_PRESS_MASK | + GDK_BUTTON_RELEASE_MASK | + GDK_POINTER_MOTION_HINT_MASK | + GDK_POINTER_MOTION_MASK); + GdkWindow* window = gtk_widget_get_window(m_widget); +#ifdef __WXGTK3__ + GdkDisplay* display = gdk_window_get_display(window); + GdkDeviceManager* manager = gdk_display_get_device_manager(display); + GdkDevice* device = gdk_device_manager_get_client_pointer(manager); + gdk_device_grab(device, window, + GDK_OWNERSHIP_NONE, true, mask, NULL, unsigned(GDK_CURRENT_TIME)); +#else + gdk_pointer_grab( window, true, + mask, + NULL, + NULL, + (guint32)GDK_CURRENT_TIME ); +#endif + } +#endif + +#ifdef __WXX11__ + if (show) + { + Window xwindow = (Window) m_clientWindow; + + /* int res =*/ XGrabPointer(wxGlobalDisplay(), xwindow, + True, + ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask, + GrabModeAsync, + GrabModeAsync, + None, + None, + CurrentTime ); + } +#endif + +#if defined( __WXMSW__ ) || defined( __WXMAC__) + if (show && m_child) + { + // Assume that the mouse is outside the popup to begin with + m_child->CaptureMouse(); + } +#endif + + return ret; +} + +bool wxPopupTransientWindow::Destroy() +{ + // The popup window can be deleted at any moment, even while some events + // are still being processed for it, so delay its real destruction until + // the next idle time when we're sure that it's safe to really destroy it. + + wxCHECK_MSG( !wxPendingDelete.Member(this), false, + wxS("Shouldn't destroy the popup twice.") ); + + wxPendingDelete.Append(this); + + return true; +} + +void wxPopupTransientWindow::Dismiss() +{ + Hide(); + PopHandlers(); +} + +void wxPopupTransientWindow::DismissAndNotify() +{ + Dismiss(); + OnDismiss(); +} + +void wxPopupTransientWindow::OnDismiss() +{ + // nothing to do here - but it may be interesting for derived class +} + +bool wxPopupTransientWindow::ProcessLeftDown(wxMouseEvent& WXUNUSED(event)) +{ + // no special processing here + return false; +} + +#if defined(__WXMSW__) ||(defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON) +void wxPopupTransientWindow::OnIdle(wxIdleEvent& event) +{ + event.Skip(); + + if (IsShown() && m_child) + { + // Store the last mouse position to minimize the number of calls to + // wxFindWindowAtPoint() which are quite expensive. + static wxPoint s_posLast; + const wxPoint pos = wxGetMousePosition(); + if ( pos != s_posLast ) + { + s_posLast = pos; + + wxWindow* const winUnderMouse = wxFindWindowAtPoint(pos); + + // We release the mouse capture while the mouse is inside the popup + // itself to allow using it normally with the controls inside it. + if ( wxGetTopLevelParent(winUnderMouse) == this ) + { + if ( m_child->HasCapture() ) + { + m_child->ReleaseMouse(); + } + } + else // And we reacquire it as soon as the mouse goes outside. + { + if ( !m_child->HasCapture() ) + { + m_child->CaptureMouse(); + } + } + } + } +} +#endif // wxOSX/Carbon + + +#if wxUSE_COMBOBOX && defined(__WXUNIVERSAL__) + +// ---------------------------------------------------------------------------- +// wxPopupComboWindow +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxPopupComboWindow, wxPopupTransientWindow) + EVT_KEY_DOWN(wxPopupComboWindow::OnKeyDown) +END_EVENT_TABLE() + +wxPopupComboWindow::wxPopupComboWindow(wxComboCtrl *parent) + : wxPopupTransientWindow(parent) +{ + m_combo = parent; +} + +bool wxPopupComboWindow::Create(wxComboCtrl *parent) +{ + m_combo = parent; + + return wxPopupWindow::Create(parent); +} + +void wxPopupComboWindow::PositionNearCombo() +{ + // the origin point must be in screen coords + wxPoint ptOrigin = m_combo->ClientToScreen(wxPoint(0,0)); + +#if 0 //def __WXUNIVERSAL__ + // account for the fact that (0, 0) is not the top left corner of the + // window: there is also the border + wxRect rectBorders = m_combo->GetRenderer()-> + GetBorderDimensions(m_combo->GetBorder()); + ptOrigin.x -= rectBorders.x; + ptOrigin.y -= rectBorders.y; +#endif // __WXUNIVERSAL__ + + // position below or above the combobox: the width is 0 to put it exactly + // below us, not to the left or to the right + Position(ptOrigin, wxSize(0, m_combo->GetSize().y)); +} + +void wxPopupComboWindow::OnDismiss() +{ + m_combo->OnPopupDismiss(true); +} + +void wxPopupComboWindow::OnKeyDown(wxKeyEvent& event) +{ + m_combo->ProcessWindowEvent(event); +} + +#endif // wxUSE_COMBOBOX && defined(__WXUNIVERSAL__) + +// ---------------------------------------------------------------------------- +// wxPopupWindowHandler +// ---------------------------------------------------------------------------- + +void wxPopupWindowHandler::OnLeftDown(wxMouseEvent& event) +{ + // let the window have it first (we're the first event handler in the chain + // of handlers for this window) + if ( m_popup->ProcessLeftDown(event) ) + { + return; + } + + wxPoint pos = event.GetPosition(); + + // in non-Univ ports the system manages scrollbars for us +#if defined(__WXUNIVERSAL__) && wxUSE_SCROLLBAR + // scrollbar on which the click occurred + wxWindow *sbar = NULL; +#endif // __WXUNIVERSAL__ && wxUSE_SCROLLBAR + + wxWindow *win = (wxWindow *)event.GetEventObject(); + + switch ( win->HitTest(pos.x, pos.y) ) + { + case wxHT_WINDOW_OUTSIDE: + { + // do the coords translation now as after DismissAndNotify() + // m_popup may be destroyed + wxMouseEvent event2(event); + + m_popup->ClientToScreen(&event2.m_x, &event2.m_y); + + // clicking outside a popup dismisses it + m_popup->DismissAndNotify(); + + // dismissing a tooltip shouldn't waste a click, i.e. you + // should be able to dismiss it and press the button with the + // same click, so repost this event to the window beneath us + wxWindow *winUnder = wxFindWindowAtPoint(event2.GetPosition()); + if ( winUnder ) + { + // translate the event coords to the ones of the window + // which is going to get the event + winUnder->ScreenToClient(&event2.m_x, &event2.m_y); + + event2.SetEventObject(winUnder); + wxPostEvent(winUnder->GetEventHandler(), event2); + } + } + break; + +#if defined(__WXUNIVERSAL__) && wxUSE_SCROLLBAR + case wxHT_WINDOW_HORZ_SCROLLBAR: + sbar = win->GetScrollbar(wxHORIZONTAL); + break; + + case wxHT_WINDOW_VERT_SCROLLBAR: + sbar = win->GetScrollbar(wxVERTICAL); + break; +#endif // __WXUNIVERSAL__ && wxUSE_SCROLLBAR + + default: + // forgot to update the switch after adding a new hit test code? + wxFAIL_MSG( wxT("unexpected HitTest() return value") ); + // fall through + + case wxHT_WINDOW_CORNER: + // don't actually know if this one is good for anything, but let it + // pass just in case + + case wxHT_WINDOW_INSIDE: + // let the normal processing take place + event.Skip(); + break; + } + +#if defined(__WXUNIVERSAL__) && wxUSE_SCROLLBAR + if ( sbar ) + { + // translate the event coordinates to the scrollbar ones + pos = sbar->ScreenToClient(win->ClientToScreen(pos)); + + // and give the event to it + wxMouseEvent event2 = event; + event2.m_x = pos.x; + event2.m_y = pos.y; + + (void)sbar->GetEventHandler()->ProcessEvent(event2); + } +#endif // __WXUNIVERSAL__ && wxUSE_SCROLLBAR +} + +void +wxPopupWindowHandler::OnCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event)) +{ + m_popup->DismissAndNotify(); + + // There is no need to skip the event here, normally we've already dealt + // with the focus loss. +} + +// ---------------------------------------------------------------------------- +// wxPopupFocusHandler +// ---------------------------------------------------------------------------- + +void wxPopupFocusHandler::OnKillFocus(wxFocusEvent& event) +{ + // when we lose focus we always disappear - unless it goes to the popup (in + // which case we don't really lose it) + wxWindow *win = event.GetWindow(); + while ( win ) + { + if ( win == m_popup ) + return; + win = win->GetParent(); + } + + m_popup->DismissAndNotify(); +} + +void wxPopupFocusHandler::OnChar(wxKeyEvent& event) +{ + // we can be associated with the popup itself in which case we should avoid + // infinite recursion + static int s_inside; + wxRecursionGuard guard(s_inside); + if ( guard.IsInside() ) + { + event.Skip(); + return; + } + + // let the window have it first, it might process the keys + if ( !m_popup->GetEventHandler()->ProcessEvent(event) ) + { + // by default, dismiss the popup + m_popup->DismissAndNotify(); + } +} + +#endif // wxUSE_POPUPWIN diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/powercmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/powercmn.cpp new file mode 100644 index 0000000000..40a31aadd7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/powercmn.cpp @@ -0,0 +1,58 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/powercmn.cpp +// Purpose: power event types and stubs for power functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 2006-05-27 +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#endif //WX_PRECOMP + +#include "wx/power.h" + +// ============================================================================ +// implementation +// ============================================================================ + +#ifdef wxHAS_POWER_EVENTS + wxDEFINE_EVENT( wxEVT_POWER_SUSPENDING, wxPowerEvent ); + wxDEFINE_EVENT( wxEVT_POWER_SUSPENDED, wxPowerEvent ); + wxDEFINE_EVENT( wxEVT_POWER_SUSPEND_CANCEL, wxPowerEvent ); + wxDEFINE_EVENT( wxEVT_POWER_RESUME, wxPowerEvent ); + + IMPLEMENT_DYNAMIC_CLASS(wxPowerEvent, wxEvent) +#endif + +// provide stubs for the systems not implementing these functions +#if !defined(__WINDOWS__) + +wxPowerType wxGetPowerType() +{ + return wxPOWER_UNKNOWN; +} + +wxBatteryState wxGetBatteryState() +{ + return wxBATTERY_UNKNOWN_STATE; +} + +#endif // systems without power management functions + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/preferencescmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/preferencescmn.cpp new file mode 100644 index 0000000000..9649494332 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/preferencescmn.cpp @@ -0,0 +1,72 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/preferencescmn.cpp +// Purpose: wxPreferencesEditor implementation common to all platforms. +// Author: Vaclav Slavik +// Created: 2013-02-19 +// Copyright: (c) 2013 Vaclav Slavik +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PREFERENCES_EDITOR + +#include "wx/private/preferences.h" +#include "wx/intl.h" + +// ============================================================================ +// implementation +// ============================================================================ + +wxString wxStockPreferencesPage::GetName() const +{ + switch ( m_kind ) + { + case Kind_General: + return _("General"); + case Kind_Advanced: + return _("Advanced"); + } + return wxString(); // silence compiler warning +} + +wxPreferencesEditor::wxPreferencesEditor(const wxString& title) + : m_impl(wxPreferencesEditorImpl::Create(title)) +{ +} + +wxPreferencesEditor::~wxPreferencesEditor() +{ + delete m_impl; +} + +void wxPreferencesEditor::AddPage(wxPreferencesPage* page) +{ + wxCHECK_RET( page, "can't set NULL page" ); + m_impl->AddPage(page); +} + +void wxPreferencesEditor::Show(wxWindow* parent) +{ + m_impl->Show(parent); +} + +void wxPreferencesEditor::Dismiss() +{ + m_impl->Dismiss(); +} + +#endif // wxUSE_PREFERENCES_EDITOR diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/prntbase.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/prntbase.cpp new file mode 100644 index 0000000000..ed0d4712f0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/prntbase.cpp @@ -0,0 +1,2263 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/prntbase.cpp +// Purpose: Printing framework base class implementation +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/dcprint.h" + +#ifndef WX_PRECOMP + #if defined(__WXMSW__) + #include "wx/msw/wrapcdlg.h" + #endif // MSW + #include "wx/utils.h" + #include "wx/dc.h" + #include "wx/app.h" + #include "wx/math.h" + #include "wx/msgdlg.h" + #include "wx/layout.h" + #include "wx/choice.h" + #include "wx/button.h" + #include "wx/bmpbuttn.h" + #include "wx/settings.h" + #include "wx/dcmemory.h" + #include "wx/dcclient.h" + #include "wx/stattext.h" + #include "wx/intl.h" + #include "wx/textdlg.h" + #include "wx/sizer.h" + #include "wx/module.h" +#endif // !WX_PRECOMP + +#include "wx/prntbase.h" +#include "wx/printdlg.h" +#include "wx/print.h" +#include "wx/dcprint.h" +#include "wx/artprov.h" + +#include +#include + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) +#include "wx/msw/printdlg.h" +#include "wx/msw/dcprint.h" +#elif defined(__WXMAC__) +#include "wx/osx/printdlg.h" +#include "wx/osx/private/print.h" +#include "wx/osx/dcprint.h" +#elif defined(__WXPM__) +#include "wx/os2/dcprint.h" +#include "wx/generic/prntdlgg.h" +#else +#include "wx/generic/prntdlgg.h" +#include "wx/dcps.h" +#endif + +#ifdef __WXMSW__ + #ifndef __WIN32__ + #include + #endif +#endif // __WXMSW__ + +//---------------------------------------------------------------------------- +// wxPrintFactory +//---------------------------------------------------------------------------- + +wxPrintFactory *wxPrintFactory::m_factory = NULL; + +void wxPrintFactory::SetPrintFactory( wxPrintFactory *factory ) +{ + if (wxPrintFactory::m_factory) + delete wxPrintFactory::m_factory; + + wxPrintFactory::m_factory = factory; +} + +wxPrintFactory *wxPrintFactory::GetFactory() +{ + if (!wxPrintFactory::m_factory) + wxPrintFactory::m_factory = new wxNativePrintFactory; + + return wxPrintFactory::m_factory; +} + +//---------------------------------------------------------------------------- +// wxNativePrintFactory +//---------------------------------------------------------------------------- + +wxPrinterBase *wxNativePrintFactory::CreatePrinter( wxPrintDialogData *data ) +{ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + return new wxWindowsPrinter( data ); +#elif defined(__WXMAC__) + return new wxMacPrinter( data ); +#elif defined(__WXPM__) + return new wxOS2Printer( data ); +#else + return new wxPostScriptPrinter( data ); +#endif +} + +wxPrintPreviewBase *wxNativePrintFactory::CreatePrintPreview( wxPrintout *preview, + wxPrintout *printout, wxPrintDialogData *data ) +{ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + return new wxWindowsPrintPreview( preview, printout, data ); +#elif defined(__WXMAC__) + return new wxMacPrintPreview( preview, printout, data ); +#elif defined(__WXPM__) + return new wxOS2PrintPreview( preview, printout, data ); +#else + return new wxPostScriptPrintPreview( preview, printout, data ); +#endif +} + +wxPrintPreviewBase *wxNativePrintFactory::CreatePrintPreview( wxPrintout *preview, + wxPrintout *printout, wxPrintData *data ) +{ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + return new wxWindowsPrintPreview( preview, printout, data ); +#elif defined(__WXMAC__) + return new wxMacPrintPreview( preview, printout, data ); +#elif defined(__WXPM__) + return new wxOS2PrintPreview( preview, printout, data ); +#else + return new wxPostScriptPrintPreview( preview, printout, data ); +#endif +} + +wxPrintDialogBase *wxNativePrintFactory::CreatePrintDialog( wxWindow *parent, + wxPrintDialogData *data ) +{ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + return new wxWindowsPrintDialog( parent, data ); +#elif defined(__WXMAC__) + return new wxMacPrintDialog( parent, data ); +#else + return new wxGenericPrintDialog( parent, data ); +#endif +} + +wxPrintDialogBase *wxNativePrintFactory::CreatePrintDialog( wxWindow *parent, + wxPrintData *data ) +{ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + return new wxWindowsPrintDialog( parent, data ); +#elif defined(__WXMAC__) + return new wxMacPrintDialog( parent, data ); +#else + return new wxGenericPrintDialog( parent, data ); +#endif +} + +wxPageSetupDialogBase *wxNativePrintFactory::CreatePageSetupDialog( wxWindow *parent, + wxPageSetupDialogData *data ) +{ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + return new wxWindowsPageSetupDialog( parent, data ); +#elif defined(__WXMAC__) + return new wxMacPageSetupDialog( parent, data ); +#else + return new wxGenericPageSetupDialog( parent, data ); +#endif +} + +bool wxNativePrintFactory::HasPrintSetupDialog() +{ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + return false; +#elif defined(__WXMAC__) + return false; +#else + // Only here do we need to provide the print setup + // dialog ourselves, the other platforms either have + // none, don't make it accessible or let you configure + // the printer from the wxPrintDialog anyway. + return true; +#endif + +} + +wxDialog *wxNativePrintFactory::CreatePrintSetupDialog( wxWindow *parent, + wxPrintData *data ) +{ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + wxUnusedVar(parent); + wxUnusedVar(data); + return NULL; +#elif defined(__WXMAC__) + wxUnusedVar(parent); + wxUnusedVar(data); + return NULL; +#else + // Only here do we need to provide the print setup + // dialog ourselves, the other platforms either have + // none, don't make it accessible or let you configure + // the printer from the wxPrintDialog anyway. + return new wxGenericPrintSetupDialog( parent, data ); +#endif +} + +wxDCImpl* wxNativePrintFactory::CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ) +{ +#if defined(__WXGTK__) || defined(__WXMOTIF__) || ( defined(__WXUNIVERSAL__) && !defined(__WXMAC__) ) + return new wxPostScriptDCImpl( owner, data ); +#else + return new wxPrinterDCImpl( owner, data ); +#endif +} + +bool wxNativePrintFactory::HasOwnPrintToFile() +{ + // Only relevant for PostScript and here the + // setup dialog provides no "print to file" + // option. In the GNOME setup dialog, the + // setup dialog has its own print to file. + return false; +} + +bool wxNativePrintFactory::HasPrinterLine() +{ + // Only relevant for PostScript for now + return true; +} + +wxString wxNativePrintFactory::CreatePrinterLine() +{ + // Only relevant for PostScript for now + + // We should query "lpstat -d" here + return _("Generic PostScript"); +} + +bool wxNativePrintFactory::HasStatusLine() +{ + // Only relevant for PostScript for now + return true; +} + +wxString wxNativePrintFactory::CreateStatusLine() +{ + // Only relevant for PostScript for now + + // We should query "lpstat -r" or "lpstat -p" here + return _("Ready"); +} + +wxPrintNativeDataBase *wxNativePrintFactory::CreatePrintNativeData() +{ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + return new wxWindowsPrintNativeData; +#elif defined(__WXMAC__) + return wxOSXCreatePrintData(); +#else + return new wxPostScriptPrintNativeData; +#endif +} + +//---------------------------------------------------------------------------- +// wxPrintNativeDataBase +//---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxPrintNativeDataBase, wxObject) + +wxPrintNativeDataBase::wxPrintNativeDataBase() +{ + m_ref = 1; +} + +//---------------------------------------------------------------------------- +// wxPrintFactoryModule +//---------------------------------------------------------------------------- + +class wxPrintFactoryModule: public wxModule +{ +public: + wxPrintFactoryModule() {} + bool OnInit() { return true; } + void OnExit() { wxPrintFactory::SetPrintFactory( NULL ); } + +private: + DECLARE_DYNAMIC_CLASS(wxPrintFactoryModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxPrintFactoryModule, wxModule) + +//---------------------------------------------------------------------------- +// wxPrinterBase +//---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxPrinterBase, wxObject) + +wxPrinterBase::wxPrinterBase(wxPrintDialogData *data) +{ + m_currentPrintout = NULL; + sm_abortWindow = NULL; + sm_abortIt = false; + if (data) + m_printDialogData = (*data); + sm_lastError = wxPRINTER_NO_ERROR; +} + +wxWindow *wxPrinterBase::sm_abortWindow = NULL; +bool wxPrinterBase::sm_abortIt = false; +wxPrinterError wxPrinterBase::sm_lastError = wxPRINTER_NO_ERROR; + +wxPrinterBase::~wxPrinterBase() +{ +} + +wxPrintAbortDialog *wxPrinterBase::CreateAbortWindow(wxWindow *parent, wxPrintout * printout) +{ + return new wxPrintAbortDialog(parent, printout->GetTitle()); +} + +void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout), const wxString& message) +{ + wxMessageBox(message, _("Printing Error"), wxOK, parent); +} + +wxPrintDialogData& wxPrinterBase::GetPrintDialogData() const +{ + return (wxPrintDialogData&) m_printDialogData; +} + +//---------------------------------------------------------------------------- +// wxPrinter +//---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxPrinter, wxPrinterBase) + +wxPrinter::wxPrinter(wxPrintDialogData *data) +{ + m_pimpl = wxPrintFactory::GetFactory()->CreatePrinter( data ); +} + +wxPrinter::~wxPrinter() +{ + delete m_pimpl; +} + +wxPrintAbortDialog *wxPrinter::CreateAbortWindow(wxWindow *parent, wxPrintout *printout) +{ + return m_pimpl->CreateAbortWindow( parent, printout ); +} + +void wxPrinter::ReportError(wxWindow *parent, wxPrintout *printout, const wxString& message) +{ + m_pimpl->ReportError( parent, printout, message ); +} + +bool wxPrinter::Setup(wxWindow *parent) +{ + return m_pimpl->Setup( parent ); +} + +bool wxPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) +{ + if ( !prompt && m_printDialogData.GetToPage() == 0 ) + { + // If the dialog is not shown, set the pages range to print everything + // by default (as otherwise we wouldn't print anything at all which is + // certainly not a reasonable default behaviour). + int minPage, maxPage, selFrom, selTo; + printout->GetPageInfo(&minPage, &maxPage, &selFrom, &selTo); + + wxPrintDialogData& pdd = m_pimpl->GetPrintDialogData(); + pdd.SetFromPage(minPage); + pdd.SetToPage(maxPage); + } + + return m_pimpl->Print( parent, printout, prompt ); +} + +wxDC* wxPrinter::PrintDialog(wxWindow *parent) +{ + return m_pimpl->PrintDialog( parent ); +} + +wxPrintDialogData& wxPrinter::GetPrintDialogData() const +{ + return m_pimpl->GetPrintDialogData(); +} + +// --------------------------------------------------------------------------- +// wxPrintDialogBase: the dialog for printing. +// --------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxPrintDialogBase, wxDialog) + +wxPrintDialogBase::wxPrintDialogBase(wxWindow *parent, + wxWindowID id, + const wxString &title, + const wxPoint &pos, + const wxSize &size, + long style) + : wxDialog( parent, id, title.empty() ? wxString(_("Print")) : title, + pos, size, style ) +{ +} + +// --------------------------------------------------------------------------- +// wxPrintDialog: the dialog for printing +// --------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxPrintDialog, wxObject) + +wxPrintDialog::wxPrintDialog(wxWindow *parent, wxPrintDialogData* data) +{ + m_pimpl = wxPrintFactory::GetFactory()->CreatePrintDialog( parent, data ); +} + +wxPrintDialog::wxPrintDialog(wxWindow *parent, wxPrintData* data) +{ + m_pimpl = wxPrintFactory::GetFactory()->CreatePrintDialog( parent, data ); +} + +wxPrintDialog::~wxPrintDialog() +{ + delete m_pimpl; +} + +int wxPrintDialog::ShowModal() +{ + return m_pimpl->ShowModal(); +} + +wxPrintDialogData& wxPrintDialog::GetPrintDialogData() +{ + return m_pimpl->GetPrintDialogData(); +} + +wxPrintData& wxPrintDialog::GetPrintData() +{ + return m_pimpl->GetPrintData(); +} + +wxDC *wxPrintDialog::GetPrintDC() +{ + return m_pimpl->GetPrintDC(); +} + +// --------------------------------------------------------------------------- +// wxPageSetupDialogBase: the page setup dialog +// --------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxPageSetupDialogBase, wxDialog) + +wxPageSetupDialogBase::wxPageSetupDialogBase(wxWindow *parent, + wxWindowID id, + const wxString &title, + const wxPoint &pos, + const wxSize &size, + long style) + : wxDialog( parent, id, title.empty() ? wxString(_("Page setup")) : title, + pos, size, style ) +{ +} + +// --------------------------------------------------------------------------- +// wxPageSetupDialog: the page setup dialog +// --------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxPageSetupDialog, wxObject) + +wxPageSetupDialog::wxPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data ) +{ + m_pimpl = wxPrintFactory::GetFactory()->CreatePageSetupDialog( parent, data ); +} + +wxPageSetupDialog::~wxPageSetupDialog() +{ + delete m_pimpl; +} + +int wxPageSetupDialog::ShowModal() +{ + return m_pimpl->ShowModal(); +} + +wxPageSetupDialogData& wxPageSetupDialog::GetPageSetupDialogData() +{ + return m_pimpl->GetPageSetupDialogData(); +} + +// old name +wxPageSetupDialogData& wxPageSetupDialog::GetPageSetupData() +{ + return m_pimpl->GetPageSetupDialogData(); +} + +//---------------------------------------------------------------------------- +// wxPrintAbortDialog +//---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog) + EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel) +END_EVENT_TABLE() + +wxPrintAbortDialog::wxPrintAbortDialog(wxWindow *parent, + const wxString& documentTitle, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) + : wxDialog(parent, wxID_ANY, _("Printing"), pos, size, style, name) +{ + wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); + mainSizer->Add(new wxStaticText(this, wxID_ANY, _("Please wait while printing...")), + wxSizerFlags().Expand().DoubleBorder()); + + wxFlexGridSizer *gridSizer = new wxFlexGridSizer(2, wxSize(20, 0)); + gridSizer->Add(new wxStaticText(this, wxID_ANY, _("Document:"))); + gridSizer->AddGrowableCol(1); + gridSizer->Add(new wxStaticText(this, wxID_ANY, documentTitle)); + gridSizer->Add(new wxStaticText(this, wxID_ANY, _("Progress:"))); + m_progress = new wxStaticText(this, wxID_ANY, _("Preparing")); + m_progress->SetMinSize(wxSize(250, -1)); + gridSizer->Add(m_progress); + mainSizer->Add(gridSizer, wxSizerFlags().Expand().DoubleBorder(wxLEFT | wxRIGHT)); + + mainSizer->Add(CreateStdDialogButtonSizer(wxCANCEL), + wxSizerFlags().Expand().DoubleBorder()); + + SetSizerAndFit(mainSizer); +} + +void wxPrintAbortDialog::SetProgress(int currentPage, int totalPages, + int currentCopy, int totalCopies) +{ + wxString text; + text.Printf(_("Printing page %d of %d"), currentPage, totalPages); + if ( totalCopies > 1 ) + text += wxString::Format(_(" (copy %d of %d)"), currentCopy, totalCopies); + m_progress->SetLabel(text); +} + +void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) +{ + wxCHECK_RET( wxPrinterBase::sm_abortWindow != NULL, "OnCancel called twice" ); + + wxPrinterBase::sm_abortIt = true; + wxPrinterBase::sm_abortWindow->Destroy(); + wxPrinterBase::sm_abortWindow = NULL; +} + +//---------------------------------------------------------------------------- +// wxPrintout +//---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject) + +wxPrintout::wxPrintout(const wxString& title) +{ + m_printoutTitle = title ; + m_printoutDC = NULL; + m_pageWidthMM = 0; + m_pageHeightMM = 0; + m_pageWidthPixels = 0; + m_pageHeightPixels = 0; + m_PPIScreenX = 0; + m_PPIScreenY = 0; + m_PPIPrinterX = 0; + m_PPIPrinterY = 0; + m_preview = NULL; +} + +wxPrintout::~wxPrintout() +{ +} + +bool wxPrintout::OnBeginDocument(int WXUNUSED(startPage), int WXUNUSED(endPage)) +{ + return GetDC()->StartDoc(_("Printing ") + m_printoutTitle); +} + +void wxPrintout::OnEndDocument() +{ + GetDC()->EndDoc(); +} + +void wxPrintout::OnBeginPrinting() +{ +} + +void wxPrintout::OnEndPrinting() +{ +} + +bool wxPrintout::HasPage(int page) +{ + return (page == 1); +} + +void wxPrintout::GetPageInfo(int *minPage, int *maxPage, int *fromPage, int *toPage) +{ + *minPage = 1; + *maxPage = 32000; + *fromPage = 1; + *toPage = 1; +} + +void wxPrintout::FitThisSizeToPaper(const wxSize& imageSize) +{ + // Set the DC scale and origin so that the given image size fits within the + // entire page and the origin is at the top left corner of the page. Note + // that with most printers, portions of the page will be non-printable. Use + // this if you're managing your own page margins. + if (!m_printoutDC) return; + wxRect paperRect = GetPaperRectPixels(); + wxCoord pw, ph; + GetPageSizePixels(&pw, &ph); + wxCoord w, h; + m_printoutDC->GetSize(&w, &h); + float scaleX = ((float(paperRect.width) * w) / (float(pw) * imageSize.x)); + float scaleY = ((float(paperRect.height) * h) / (float(ph) * imageSize.y)); + float actualScale = wxMin(scaleX, scaleY); + m_printoutDC->SetUserScale(actualScale, actualScale); + m_printoutDC->SetDeviceOrigin(0, 0); + wxRect logicalPaperRect = GetLogicalPaperRect(); + SetLogicalOrigin(logicalPaperRect.x, logicalPaperRect.y); +} + +void wxPrintout::FitThisSizeToPage(const wxSize& imageSize) +{ + // Set the DC scale and origin so that the given image size fits within the + // printable area of the page and the origin is at the top left corner of + // the printable area. + if (!m_printoutDC) return; + int w, h; + m_printoutDC->GetSize(&w, &h); + float scaleX = float(w) / imageSize.x; + float scaleY = float(h) / imageSize.y; + float actualScale = wxMin(scaleX, scaleY); + m_printoutDC->SetUserScale(actualScale, actualScale); + m_printoutDC->SetDeviceOrigin(0, 0); +} + +void wxPrintout::FitThisSizeToPageMargins(const wxSize& imageSize, const wxPageSetupDialogData& pageSetupData) +{ + // Set the DC scale and origin so that the given image size fits within the + // page margins defined in the given wxPageSetupDialogData object and the + // origin is at the top left corner of the page margins. + if (!m_printoutDC) return; + wxRect paperRect = GetPaperRectPixels(); + wxCoord pw, ph; + GetPageSizePixels(&pw, &ph); + wxPoint topLeft = pageSetupData.GetMarginTopLeft(); + wxPoint bottomRight = pageSetupData.GetMarginBottomRight(); + wxCoord mw, mh; + GetPageSizeMM(&mw, &mh); + float mmToDeviceX = float(pw) / mw; + float mmToDeviceY = float(ph) / mh; + wxRect pageMarginsRect(paperRect.x + wxRound(mmToDeviceX * topLeft.x), + paperRect.y + wxRound(mmToDeviceY * topLeft.y), + paperRect.width - wxRound(mmToDeviceX * (topLeft.x + bottomRight.x)), + paperRect.height - wxRound(mmToDeviceY * (topLeft.y + bottomRight.y))); + wxCoord w, h; + m_printoutDC->GetSize(&w, &h); + float scaleX = (float(pageMarginsRect.width) * w) / (float(pw) * imageSize.x); + float scaleY = (float(pageMarginsRect.height) * h) / (float(ph) * imageSize.y); + float actualScale = wxMin(scaleX, scaleY); + m_printoutDC->SetUserScale(actualScale, actualScale); + m_printoutDC->SetDeviceOrigin(0, 0); + wxRect logicalPageMarginsRect = GetLogicalPageMarginsRect(pageSetupData); + SetLogicalOrigin(logicalPageMarginsRect.x, logicalPageMarginsRect.y); +} + +void wxPrintout::MapScreenSizeToPaper() +{ + // Set the DC scale so that an image on the screen is the same size on the + // paper and the origin is at the top left of the paper. Note that with most + // printers, portions of the page will be cut off. Use this if you're + // managing your own page margins. + if (!m_printoutDC) return; + MapScreenSizeToPage(); + wxRect logicalPaperRect = GetLogicalPaperRect(); + SetLogicalOrigin(logicalPaperRect.x, logicalPaperRect.y); +} + +void wxPrintout::MapScreenSizeToPage() +{ + // Set the DC scale and origin so that an image on the screen is the same + // size on the paper and the origin is at the top left of the printable area. + if (!m_printoutDC) return; + int ppiScreenX, ppiScreenY; + GetPPIScreen(&ppiScreenX, &ppiScreenY); + int ppiPrinterX, ppiPrinterY; + GetPPIPrinter(&ppiPrinterX, &ppiPrinterY); + int w, h; + m_printoutDC->GetSize(&w, &h); + int pageSizePixelsX, pageSizePixelsY; + GetPageSizePixels(&pageSizePixelsX, &pageSizePixelsY); + float userScaleX = (float(ppiPrinterX) * w) / (float(ppiScreenX) * pageSizePixelsX); + float userScaleY = (float(ppiPrinterY) * h) / (float(ppiScreenY) * pageSizePixelsY); + m_printoutDC->SetUserScale(userScaleX, userScaleY); + m_printoutDC->SetDeviceOrigin(0, 0); +} + +void wxPrintout::MapScreenSizeToPageMargins(const wxPageSetupDialogData& pageSetupData) +{ + // Set the DC scale so that an image on the screen is the same size on the + // paper and the origin is at the top left of the page margins defined by + // the given wxPageSetupDialogData object. + if (!m_printoutDC) return; + MapScreenSizeToPage(); + wxRect logicalPageMarginsRect = GetLogicalPageMarginsRect(pageSetupData); + SetLogicalOrigin(logicalPageMarginsRect.x, logicalPageMarginsRect.y); +} + +void wxPrintout::MapScreenSizeToDevice() +{ + // Set the DC scale so that a screen pixel is the same size as a device + // pixel and the origin is at the top left of the printable area. + if (!m_printoutDC) return; + int w, h; + m_printoutDC->GetSize(&w, &h); + int pageSizePixelsX, pageSizePixelsY; + GetPageSizePixels(&pageSizePixelsX, &pageSizePixelsY); + float userScaleX = float(w) / pageSizePixelsX; + float userScaleY = float(h) / pageSizePixelsY; + m_printoutDC->SetUserScale(userScaleX, userScaleY); + m_printoutDC->SetDeviceOrigin(0, 0); +} + +wxRect wxPrintout::GetLogicalPaperRect() const +{ + // Return the rectangle in logical units that corresponds to the paper + // rectangle. + wxRect paperRect = GetPaperRectPixels(); + wxCoord pw, ph; + GetPageSizePixels(&pw, &ph); + wxCoord w, h; + m_printoutDC->GetSize(&w, &h); + if (w == pw && h == ph) { + // this DC matches the printed page, so no scaling + return wxRect(m_printoutDC->DeviceToLogicalX(paperRect.x), + m_printoutDC->DeviceToLogicalY(paperRect.y), + m_printoutDC->DeviceToLogicalXRel(paperRect.width), + m_printoutDC->DeviceToLogicalYRel(paperRect.height)); + } + // This DC doesn't match the printed page, so we have to scale. + float scaleX = float(w) / pw; + float scaleY = float(h) / ph; + return wxRect(m_printoutDC->DeviceToLogicalX(wxRound(paperRect.x * scaleX)), + m_printoutDC->DeviceToLogicalY(wxRound(paperRect.y * scaleY)), + m_printoutDC->DeviceToLogicalXRel(wxRound(paperRect.width * scaleX)), + m_printoutDC->DeviceToLogicalYRel(wxRound(paperRect.height * scaleY))); +} + +wxRect wxPrintout::GetLogicalPageRect() const +{ + // Return the rectangle in logical units that corresponds to the printable + // area. + int w, h; + m_printoutDC->GetSize(&w, &h); + return wxRect(m_printoutDC->DeviceToLogicalX(0), + m_printoutDC->DeviceToLogicalY(0), + m_printoutDC->DeviceToLogicalXRel(w), + m_printoutDC->DeviceToLogicalYRel(h)); +} + +wxRect wxPrintout::GetLogicalPageMarginsRect(const wxPageSetupDialogData& pageSetupData) const +{ + // Return the rectangle in logical units that corresponds to the region + // within the page margins as specified by the given wxPageSetupDialogData + // object. + + // We get the paper size in device units and the margins in mm, + // so we need to calculate the conversion with this trick + wxCoord pw, ph; + GetPageSizePixels(&pw, &ph); + wxCoord mw, mh; + GetPageSizeMM(&mw, &mh); + float mmToDeviceX = float(pw) / mw; + float mmToDeviceY = float(ph) / mh; + + // paper size in device units + wxRect paperRect = GetPaperRectPixels(); + + // margins in mm + wxPoint topLeft = pageSetupData.GetMarginTopLeft(); + wxPoint bottomRight = pageSetupData.GetMarginBottomRight(); + + // calculate margins in device units + wxRect pageMarginsRect( + paperRect.x + wxRound(mmToDeviceX * topLeft.x), + paperRect.y + wxRound(mmToDeviceY * topLeft.y), + paperRect.width - wxRound(mmToDeviceX * (topLeft.x + bottomRight.x)), + paperRect.height - wxRound(mmToDeviceY * (topLeft.y + bottomRight.y))); + + wxCoord w, h; + m_printoutDC->GetSize(&w, &h); + if (w == pw && h == ph) + { + // this DC matches the printed page, so no scaling + return wxRect( + m_printoutDC->DeviceToLogicalX(pageMarginsRect.x), + m_printoutDC->DeviceToLogicalY(pageMarginsRect.y), + m_printoutDC->DeviceToLogicalXRel(pageMarginsRect.width), + m_printoutDC->DeviceToLogicalYRel(pageMarginsRect.height)); + } + + // This DC doesn't match the printed page, so we have to scale. + float scaleX = float(w) / pw; + float scaleY = float(h) / ph; + return wxRect(m_printoutDC->DeviceToLogicalX(wxRound(pageMarginsRect.x * scaleX)), + m_printoutDC->DeviceToLogicalY(wxRound(pageMarginsRect.y * scaleY)), + m_printoutDC->DeviceToLogicalXRel(wxRound(pageMarginsRect.width * scaleX)), + m_printoutDC->DeviceToLogicalYRel(wxRound(pageMarginsRect.height * scaleY))); +} + +void wxPrintout::SetLogicalOrigin(wxCoord x, wxCoord y) +{ + // Set the device origin by specifying a point in logical coordinates. + m_printoutDC->SetDeviceOrigin( + m_printoutDC->LogicalToDeviceX(x), + m_printoutDC->LogicalToDeviceY(y) ); +} + +void wxPrintout::OffsetLogicalOrigin(wxCoord xoff, wxCoord yoff) +{ + // Offset the device origin by a specified distance in device coordinates. + wxPoint dev_org = m_printoutDC->GetDeviceOrigin(); + m_printoutDC->SetDeviceOrigin( + dev_org.x + m_printoutDC->LogicalToDeviceXRel(xoff), + dev_org.y + m_printoutDC->LogicalToDeviceYRel(yoff) ); +} + + +//---------------------------------------------------------------------------- +// wxPreviewCanvas +//---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow) + +BEGIN_EVENT_TABLE(wxPreviewCanvas, wxScrolledWindow) + EVT_PAINT(wxPreviewCanvas::OnPaint) + EVT_CHAR(wxPreviewCanvas::OnChar) + EVT_IDLE(wxPreviewCanvas::OnIdle) + EVT_SYS_COLOUR_CHANGED(wxPreviewCanvas::OnSysColourChanged) +#if wxUSE_MOUSEWHEEL + EVT_MOUSEWHEEL(wxPreviewCanvas::OnMouseWheel) +#endif +END_EVENT_TABLE() + +// VZ: the current code doesn't refresh properly without +// wxFULL_REPAINT_ON_RESIZE, this must be fixed as otherwise we have +// really horrible flicker when resizing the preview frame, but without +// this style it simply doesn't work correctly at all... +wxPreviewCanvas::wxPreviewCanvas(wxPrintPreviewBase *preview, wxWindow *parent, + const wxPoint& pos, const wxSize& size, long style, const wxString& name): +wxScrolledWindow(parent, wxID_ANY, pos, size, style | wxFULL_REPAINT_ON_RESIZE, name) +{ + m_printPreview = preview; +#ifdef __WXMAC__ + // The app workspace colour is always white, but we should have + // a contrast with the page. + wxSystemColour colourIndex = wxSYS_COLOUR_3DDKSHADOW; +#elif defined(__WXGTK__) + wxSystemColour colourIndex = wxSYS_COLOUR_BTNFACE; +#else + wxSystemColour colourIndex = wxSYS_COLOUR_APPWORKSPACE; +#endif + SetBackgroundColour(wxSystemSettings::GetColour(colourIndex)); + + SetScrollbars(10, 10, 100, 100); +} + +wxPreviewCanvas::~wxPreviewCanvas() +{ +} + +void wxPreviewCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + PrepareDC( dc ); + +/* +#ifdef __WXGTK__ + if (!GetUpdateRegion().IsEmpty()) + dc.SetClippingRegion( GetUpdateRegion() ); +#endif +*/ + + if (m_printPreview) + { + m_printPreview->PaintPage(this, dc); + } +} + +void wxPreviewCanvas::OnIdle(wxIdleEvent& event) +{ + event.Skip(); + + // prevent UpdatePageRendering() from being called recursively: + static bool s_inIdle = false; + if ( s_inIdle ) + return; + s_inIdle = true; + + if ( m_printPreview ) + { + if ( m_printPreview->UpdatePageRendering() ) + Refresh(); + } + + s_inIdle = false; +} + +// Responds to colour changes, and passes event on to children. +void wxPreviewCanvas::OnSysColourChanged(wxSysColourChangedEvent& event) +{ +#ifdef __WXMAC__ + // The app workspace colour is always white, but we should have + // a contrast with the page. + wxSystemColour colourIndex = wxSYS_COLOUR_3DDKSHADOW; +#elif defined(__WXGTK__) + wxSystemColour colourIndex = wxSYS_COLOUR_BTNFACE; +#else + wxSystemColour colourIndex = wxSYS_COLOUR_APPWORKSPACE; +#endif + SetBackgroundColour(wxSystemSettings::GetColour(colourIndex)); + Refresh(); + + // Propagate the event to the non-top-level children + wxWindow::OnSysColourChanged(event); +} + +void wxPreviewCanvas::OnChar(wxKeyEvent &event) +{ + wxPreviewControlBar* controlBar = ((wxPreviewFrame*) GetParent())->GetControlBar(); + switch (event.GetKeyCode()) + { + case WXK_RETURN: + controlBar->OnPrint(); + return; + case (int)'+': + case WXK_NUMPAD_ADD: + case WXK_ADD: + controlBar->DoZoomIn(); + return; + case (int)'-': + case WXK_NUMPAD_SUBTRACT: + case WXK_SUBTRACT: + controlBar->DoZoomOut(); + return; + } + + if (!event.ControlDown()) + { + event.Skip(); + return; + } + + switch(event.GetKeyCode()) + { + case WXK_PAGEDOWN: + controlBar->OnNext(); break; + case WXK_PAGEUP: + controlBar->OnPrevious(); break; + case WXK_HOME: + controlBar->OnFirst(); break; + case WXK_END: + controlBar->OnLast(); break; + default: + event.Skip(); + } +} + +#if wxUSE_MOUSEWHEEL + +void wxPreviewCanvas::OnMouseWheel(wxMouseEvent& event) +{ + wxPreviewControlBar * + controlBar = wxStaticCast(GetParent(), wxPreviewFrame)->GetControlBar(); + + if ( controlBar ) + { + if ( event.ControlDown() && event.GetWheelRotation() != 0 ) + { + int currentZoom = controlBar->GetZoomControl(); + + int delta; + if ( currentZoom < 100 ) + delta = 5; + else if ( currentZoom <= 120 ) + delta = 10; + else + delta = 50; + + if ( event.GetWheelRotation() > 0 ) + delta = -delta; + + int newZoom = currentZoom + delta; + if ( newZoom < 10 ) + newZoom = 10; + if ( newZoom > 200 ) + newZoom = 200; + if ( newZoom != currentZoom ) + { + controlBar->SetZoomControl(newZoom); + m_printPreview->SetZoom(newZoom); + Refresh(); + } + return; + } + } + + event.Skip(); +} + +#endif // wxUSE_MOUSEWHEEL + +namespace +{ + +// This is by the controls in the print preview as the maximal (and hence +// longest) page number we may have to display. +enum { MAX_PAGE_NUMBER = 99999 }; + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// wxPrintPageMaxCtrl +// ---------------------------------------------------------------------------- + +// A simple static control showing the maximal number of pages. +class wxPrintPageMaxCtrl : public wxStaticText +{ +public: + wxPrintPageMaxCtrl(wxWindow *parent) + : wxStaticText( + parent, + wxID_ANY, + wxString(), + wxDefaultPosition, + wxSize + ( + parent->GetTextExtent(MaxAsString(MAX_PAGE_NUMBER)).x, + wxDefaultCoord + ), + wxST_NO_AUTORESIZE | wxALIGN_CENTRE + ) + { + } + + // Set the maximal page to display once we really know what it is. + void SetMaxPage(int maxPage) + { + SetLabel(MaxAsString(maxPage)); + } + +private: + static wxString MaxAsString(int maxPage) + { + return wxString::Format("/ %d", maxPage); + } + + wxDECLARE_NO_COPY_CLASS(wxPrintPageMaxCtrl); +}; + +// ---------------------------------------------------------------------------- +// wxPrintPageTextCtrl +// ---------------------------------------------------------------------------- + +// This text control contains the page number in the specified interval. +// +// Invalid pages are not accepted and the control contents is validated when it +// loses focus. Conversely, if the user changes the page to another valid one +// or presses Enter, OnGotoPage() method of the preview object will be called. +class wxPrintPageTextCtrl : public wxTextCtrl +{ +public: + wxPrintPageTextCtrl(wxPreviewControlBar *preview) + : wxTextCtrl(preview, + wxID_PREVIEW_GOTO, + wxString(), + wxDefaultPosition, + // We use hardcoded maximal page number for the width + // instead of fitting it to the values we can show because + // the control looks uncomfortably narrow if the real page + // number is just one or two digits. + wxSize + ( + preview->GetTextExtent(PageAsString(MAX_PAGE_NUMBER)).x, + wxDefaultCoord + ), + wxTE_PROCESS_ENTER +#if wxUSE_VALIDATORS + , wxTextValidator(wxFILTER_DIGITS) +#endif // wxUSE_VALIDATORS + ), + m_preview(preview) + { + m_minPage = + m_maxPage = + m_page = 1; + + Connect(wxEVT_KILL_FOCUS, + wxFocusEventHandler(wxPrintPageTextCtrl::OnKillFocus)); + Connect(wxEVT_TEXT_ENTER, + wxCommandEventHandler(wxPrintPageTextCtrl::OnTextEnter)); + } + + // Update the pages range, must be called after OnPreparePrinting() as + // these values are not known before. + void SetPageInfo(int minPage, int maxPage) + { + m_minPage = minPage; + m_maxPage = maxPage; + + // Show the first page by default. + SetPageNumber(minPage); + } + + // Helpers to conveniently set or get the current page number. Return value + // is 0 if the current controls contents is invalid. + void SetPageNumber(int page) + { + wxASSERT( IsValidPage(page) ); + + SetValue(PageAsString(page)); + } + + int GetPageNumber() const + { + long value; + if ( !GetValue().ToLong(&value) || !IsValidPage(value) ) + return 0; + + // Cast is safe because the value is less than (int) m_maxPage. + return static_cast(value); + } + +private: + static wxString PageAsString(int page) + { + return wxString::Format("%d", page); + } + + bool IsValidPage(int page) const + { + return page >= m_minPage && page <= m_maxPage; + } + + bool DoChangePage() + { + const int page = GetPageNumber(); + + if ( !page ) + return false; + + if ( page != m_page ) + { + // We have a valid page, remember it. + m_page = page; + + // And notify the owner about the change. + m_preview->OnGotoPage(); + } + //else: Nothing really changed. + + return true; + } + + void OnKillFocus(wxFocusEvent& event) + { + if ( !DoChangePage() ) + { + // The current contents is invalid so reset it back to the last + // known good page index. + SetPageNumber(m_page); + } + + event.Skip(); + } + + void OnTextEnter(wxCommandEvent& WXUNUSED(event)) + { + DoChangePage(); + } + + + wxPreviewControlBar * const m_preview; + + int m_minPage, + m_maxPage; + + // This is the last valid page value that we had, we revert to it if an + // invalid page is entered. + int m_page; + + wxDECLARE_NO_COPY_CLASS(wxPrintPageTextCtrl); +}; + +//---------------------------------------------------------------------------- +// wxPreviewControlBar +//---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxPreviewControlBar, wxWindow) + +BEGIN_EVENT_TABLE(wxPreviewControlBar, wxPanel) + EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnWindowClose) + EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrintButton) + EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPreviousButton) + EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNextButton) + EVT_BUTTON(wxID_PREVIEW_FIRST, wxPreviewControlBar::OnFirstButton) + EVT_BUTTON(wxID_PREVIEW_LAST, wxPreviewControlBar::OnLastButton) + EVT_BUTTON(wxID_PREVIEW_ZOOM_IN, wxPreviewControlBar::OnZoomInButton) + EVT_BUTTON(wxID_PREVIEW_ZOOM_OUT, wxPreviewControlBar::OnZoomOutButton) + + EVT_UPDATE_UI(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnUpdatePreviousButton) + EVT_UPDATE_UI(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnUpdateNextButton) + EVT_UPDATE_UI(wxID_PREVIEW_FIRST, wxPreviewControlBar::OnUpdateFirstButton) + EVT_UPDATE_UI(wxID_PREVIEW_LAST, wxPreviewControlBar::OnUpdateLastButton) + EVT_UPDATE_UI(wxID_PREVIEW_ZOOM_IN, wxPreviewControlBar::OnUpdateZoomInButton) + EVT_UPDATE_UI(wxID_PREVIEW_ZOOM_OUT, wxPreviewControlBar::OnUpdateZoomOutButton) + + EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoomChoice) + EVT_PAINT(wxPreviewControlBar::OnPaint) + +END_EVENT_TABLE() + +wxPreviewControlBar::wxPreviewControlBar(wxPrintPreviewBase *preview, long buttons, + wxWindow *parent, const wxPoint& pos, const wxSize& size, + long style, const wxString& name): +wxPanel(parent, wxID_ANY, pos, size, style, name) +{ + m_printPreview = preview; + m_closeButton = NULL; + m_zoomControl = NULL; + m_currentPageText = NULL; + m_maxPageText = NULL; + m_buttonFlags = buttons; +} + +wxPreviewControlBar::~wxPreviewControlBar() +{ +} + +void wxPreviewControlBar::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + + int w, h; + GetSize(&w, &h); + dc.SetPen(*wxBLACK_PEN); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.DrawLine( 0, h-1, w, h-1 ); +} + +void wxPreviewControlBar::OnWindowClose(wxCommandEvent& WXUNUSED(event)) +{ + wxPreviewFrame *frame = (wxPreviewFrame *)GetParent(); + frame->Close(true); +} + +void wxPreviewControlBar::OnPrint(void) +{ + wxPrintPreviewBase *preview = GetPrintPreview(); + preview->Print(true); +} + +void wxPreviewControlBar::OnNext() +{ + if ( IsNextEnabled() ) + DoGotoPage(GetPrintPreview()->GetCurrentPage() + 1); +} + +void wxPreviewControlBar::OnPrevious() +{ + if ( IsPreviousEnabled() ) + DoGotoPage(GetPrintPreview()->GetCurrentPage() - 1); +} + +void wxPreviewControlBar::OnFirst() +{ + if ( IsFirstEnabled() ) + DoGotoPage(GetPrintPreview()->GetMinPage()); +} + +void wxPreviewControlBar::OnLast() +{ + if ( IsLastEnabled() ) + DoGotoPage(GetPrintPreview()->GetMaxPage()); +} + +bool wxPreviewControlBar::IsNextEnabled() const +{ + wxPrintPreviewBase *preview = GetPrintPreview(); + if ( !preview ) + return false; + + const int currentPage = preview->GetCurrentPage(); + return currentPage < preview->GetMaxPage() && + preview->GetPrintout()->HasPage(currentPage + 1); +} + +bool wxPreviewControlBar::IsPreviousEnabled() const +{ + wxPrintPreviewBase *preview = GetPrintPreview(); + if ( !preview ) + return false; + + const int currentPage = preview->GetCurrentPage(); + return currentPage > preview->GetMinPage() && + preview->GetPrintout()->HasPage(currentPage - 1); +} + +bool wxPreviewControlBar::IsFirstEnabled() const +{ + wxPrintPreviewBase *preview = GetPrintPreview(); + if (!preview) + return false; + + return preview->GetPrintout()->HasPage(preview->GetMinPage()); +} + +bool wxPreviewControlBar::IsLastEnabled() const +{ + wxPrintPreviewBase *preview = GetPrintPreview(); + if (!preview) + return false; + + return preview->GetPrintout()->HasPage(preview->GetMaxPage()); +} + +void wxPreviewControlBar::DoGotoPage(int page) +{ + wxPrintPreviewBase *preview = GetPrintPreview(); + wxCHECK_RET( preview, "Shouldn't be called if there is no preview." ); + + preview->SetCurrentPage(page); + + if ( m_currentPageText ) + m_currentPageText->SetPageNumber(page); +} + +void wxPreviewControlBar::OnGotoPage() +{ + wxPrintPreviewBase *preview = GetPrintPreview(); + if (preview) + { + if (preview->GetMinPage() > 0) + { + long currentPage = m_currentPageText->GetPageNumber(); + if ( currentPage ) + { + if (preview->GetPrintout()->HasPage(currentPage)) + { + preview->SetCurrentPage(currentPage); + } + } + } + } +} + +void wxPreviewControlBar::DoZoom() +{ + int zoom = GetZoomControl(); + if (GetPrintPreview()) + GetPrintPreview()->SetZoom(zoom); +} + +bool wxPreviewControlBar::IsZoomInEnabled() const +{ + if ( !m_zoomControl ) + return false; + + const unsigned sel = m_zoomControl->GetSelection(); + return sel < m_zoomControl->GetCount() - 1; +} + +bool wxPreviewControlBar::IsZoomOutEnabled() const +{ + return m_zoomControl && m_zoomControl->GetSelection() > 0; +} + +void wxPreviewControlBar::DoZoomIn() +{ + if (IsZoomInEnabled()) + { + m_zoomControl->SetSelection(m_zoomControl->GetSelection() + 1); + DoZoom(); + } +} + +void wxPreviewControlBar::DoZoomOut() +{ + if (IsZoomOutEnabled()) + { + m_zoomControl->SetSelection(m_zoomControl->GetSelection() - 1); + DoZoom(); + } +} + +namespace +{ + +// Helper class used by wxPreviewControlBar::CreateButtons() to add buttons +// sequentially to it in the simplest way possible. +class SizerWithButtons +{ +public: + // Constructor creates the sizer that will hold the buttons and stores the + // parent that will be used for their creation. + SizerWithButtons(wxWindow *parent) + : m_sizer(new wxBoxSizer(wxHORIZONTAL)), + m_parent(parent) + { + m_hasContents = + m_needsSeparator = false; + } + + // Destructor associates the sizer with the parent window. + ~SizerWithButtons() + { + m_parent->SetSizer(m_sizer); + m_sizer->Fit(m_parent); + } + + + // Add an arbitrary window to the sizer. + void Add(wxWindow *win) + { + if ( m_needsSeparator ) + { + m_needsSeparator = false; + + m_sizer->AddSpacer(2*wxSizerFlags::GetDefaultBorder()); + } + + m_hasContents = true; + + m_sizer->Add(win, + wxSizerFlags().Border(wxLEFT | wxTOP | wxBOTTOM).Center()); + } + + // Add a button with the specified id, bitmap and tooltip. + void AddButton(wxWindowID btnId, + const wxArtID& artId, + const wxString& tooltip) + { + // We don't use (smaller) images inside a button with a text label but + // rather toolbar-like bitmap buttons hence use wxART_TOOLBAR and not + // wxART_BUTTON here. + wxBitmap bmp = wxArtProvider::GetBitmap(artId, wxART_TOOLBAR); + wxBitmapButton * const btn = new wxBitmapButton(m_parent, btnId, bmp); + btn->SetToolTip(tooltip); + + Add(btn); + } + + // Add a control at the right end of the window. This should be called last + // as everything else added after it will be added on the right side too. + void AddAtEnd(wxWindow *win) + { + m_sizer->AddStretchSpacer(); + m_sizer->Add(win, + wxSizerFlags().Border(wxTOP | wxBOTTOM | wxRIGHT).Center()); + } + + // Indicates the end of a group of buttons, a separator will be added after + // it. + void EndOfGroup() + { + if ( m_hasContents ) + { + m_needsSeparator = true; + m_hasContents = false; + } + } + +private: + wxSizer * const m_sizer; + wxWindow * const m_parent; + + // If true, we have some controls since the last group beginning. This is + // used to avoid inserting two consecutive separators if EndOfGroup() is + // called twice. + bool m_hasContents; + + // If true, a separator should be inserted before adding the next button. + bool m_needsSeparator; + + wxDECLARE_NO_COPY_CLASS(SizerWithButtons); +}; + +} // anonymous namespace + +void wxPreviewControlBar::CreateButtons() +{ + SizerWithButtons sizer(this); + + // Print button group (a single button). + if (m_buttonFlags & wxPREVIEW_PRINT) + { + sizer.AddButton(wxID_PREVIEW_PRINT, wxART_PRINT, _("Print")); + sizer.EndOfGroup(); + } + + // Page selection buttons group. + if (m_buttonFlags & wxPREVIEW_FIRST) + { + sizer.AddButton(wxID_PREVIEW_FIRST, wxART_GOTO_FIRST, _("First page")); + } + + if (m_buttonFlags & wxPREVIEW_PREVIOUS) + { + sizer.AddButton(wxID_PREVIEW_PREVIOUS, wxART_GO_BACK, _("Previous page")); + } + + if (m_buttonFlags & wxPREVIEW_GOTO) + { + m_currentPageText = new wxPrintPageTextCtrl(this); + sizer.Add(m_currentPageText); + + m_maxPageText = new wxPrintPageMaxCtrl(this); + sizer.Add(m_maxPageText); + } + + if (m_buttonFlags & wxPREVIEW_NEXT) + { + sizer.AddButton(wxID_PREVIEW_NEXT, wxART_GO_FORWARD, _("Next page")); + } + + if (m_buttonFlags & wxPREVIEW_LAST) + { + sizer.AddButton(wxID_PREVIEW_LAST, wxART_GOTO_LAST, _("Last page")); + } + + sizer.EndOfGroup(); + + // Zoom controls group. + if (m_buttonFlags & wxPREVIEW_ZOOM) + { + sizer.AddButton(wxID_PREVIEW_ZOOM_OUT, wxART_MINUS, _("Zoom Out")); + + wxString choices[] = + { + wxT("10%"), wxT("15%"), wxT("20%"), wxT("25%"), wxT("30%"), wxT("35%"), wxT("40%"), wxT("45%"), wxT("50%"), wxT("55%"), + wxT("60%"), wxT("65%"), wxT("70%"), wxT("75%"), wxT("80%"), wxT("85%"), wxT("90%"), wxT("95%"), wxT("100%"), wxT("110%"), + wxT("120%"), wxT("150%"), wxT("200%") + }; + int n = WXSIZEOF(choices); + + m_zoomControl = new wxChoice( this, wxID_PREVIEW_ZOOM, wxDefaultPosition, wxSize(70,wxDefaultCoord), n, choices, 0 ); + sizer.Add(m_zoomControl); + SetZoomControl(m_printPreview->GetZoom()); + + sizer.AddButton(wxID_PREVIEW_ZOOM_IN, wxART_PLUS, _("Zoom In")); + + sizer.EndOfGroup(); + } + + // Close button group (single button again). + m_closeButton = new wxButton(this, wxID_PREVIEW_CLOSE, _("&Close")); + sizer.AddAtEnd(m_closeButton); +} + +void wxPreviewControlBar::SetPageInfo(int minPage, int maxPage) +{ + if ( m_currentPageText ) + m_currentPageText->SetPageInfo(minPage, maxPage); + + if ( m_maxPageText ) + m_maxPageText->SetMaxPage(maxPage); +} + +void wxPreviewControlBar::SetZoomControl(int zoom) +{ + if (m_zoomControl) + { + int n, count = m_zoomControl->GetCount(); + long val; + for (n=0; nGetString(n).BeforeFirst(wxT('%')).ToLong(&val) && + (val >= long(zoom))) + { + m_zoomControl->SetSelection(n); + return; + } + } + + m_zoomControl->SetSelection(count-1); + } +} + +int wxPreviewControlBar::GetZoomControl() +{ + if (m_zoomControl && (m_zoomControl->GetStringSelection() != wxEmptyString)) + { + long val; + if (m_zoomControl->GetStringSelection().BeforeFirst(wxT('%')).ToLong(&val)) + return int(val); + } + + return 0; +} + + +/* +* Preview frame +*/ + +IMPLEMENT_CLASS(wxPreviewFrame, wxFrame) + +BEGIN_EVENT_TABLE(wxPreviewFrame, wxFrame) + EVT_CHAR_HOOK(wxPreviewFrame::OnChar) + EVT_CLOSE(wxPreviewFrame::OnCloseWindow) +END_EVENT_TABLE() + +void wxPreviewFrame::OnChar(wxKeyEvent &event) +{ + if ( event.GetKeyCode() == WXK_ESCAPE ) + { + Close(true); + } + else + { + event.Skip(); + } +} + +wxPreviewFrame::wxPreviewFrame(wxPrintPreviewBase *preview, wxWindow *parent, const wxString& title, + const wxPoint& pos, const wxSize& size, long style, const wxString& name): +wxFrame(parent, wxID_ANY, title, pos, size, style, name) +{ + m_printPreview = preview; + m_controlBar = NULL; + m_previewCanvas = NULL; + m_windowDisabler = NULL; + m_modalityKind = wxPreviewFrame_NonModal; + + // Give the application icon +#ifdef __WXMSW__ + wxFrame* topFrame = wxDynamicCast(wxTheApp->GetTopWindow(), wxFrame); + if (topFrame) + SetIcons(topFrame->GetIcons()); +#endif +} + +wxPreviewFrame::~wxPreviewFrame() +{ + wxPrintout *printout = m_printPreview->GetPrintout(); + if (printout) + { + delete printout; + m_printPreview->SetPrintout(NULL); + m_printPreview->SetCanvas(NULL); + m_printPreview->SetFrame(NULL); + } + + m_previewCanvas->SetPreview(NULL); + delete m_printPreview; +} + +void wxPreviewFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) +{ + // Reenable any windows we disabled by undoing whatever we did in our + // Initialize(). + switch ( m_modalityKind ) + { + case wxPreviewFrame_AppModal: + delete m_windowDisabler; + m_windowDisabler = NULL; + break; + + case wxPreviewFrame_WindowModal: + if ( GetParent() ) + GetParent()->Enable(); + break; + + case wxPreviewFrame_NonModal: + break; + } + + Destroy(); +} + +void wxPreviewFrame::InitializeWithModality(wxPreviewFrameModalityKind kind) +{ +#if wxUSE_STATUSBAR + CreateStatusBar(); +#endif + CreateCanvas(); + CreateControlBar(); + + m_printPreview->SetCanvas(m_previewCanvas); + m_printPreview->SetFrame(this); + + wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL ); + + item0->Add( m_controlBar, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); + item0->Add( m_previewCanvas, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); + + SetAutoLayout( true ); + SetSizer( item0 ); + + m_modalityKind = kind; + switch ( m_modalityKind ) + { + case wxPreviewFrame_AppModal: + // Disable everything. + m_windowDisabler = new wxWindowDisabler( this ); + break; + + case wxPreviewFrame_WindowModal: + // Disable our parent if we have one. + if ( GetParent() ) + GetParent()->Disable(); + break; + + case wxPreviewFrame_NonModal: + // Nothing to do, we don't need to disable any windows. + break; + } + + if ( m_modalityKind != wxPreviewFrame_NonModal ) + { + // Behave like modal dialogs, don't show in taskbar. This implies + // removing the minimize box, because minimizing windows without + // taskbar entry is confusing. + SetWindowStyle((GetWindowStyle() & ~wxMINIMIZE_BOX) | wxFRAME_NO_TASKBAR); + } + + Layout(); + + m_printPreview->AdjustScrollbars(m_previewCanvas); + m_previewCanvas->SetFocus(); + m_controlBar->SetFocus(); +} + +void wxPreviewFrame::CreateCanvas() +{ + m_previewCanvas = new wxPreviewCanvas(m_printPreview, this); +} + +void wxPreviewFrame::CreateControlBar() +{ + long buttons = wxPREVIEW_DEFAULT; + if (m_printPreview->GetPrintoutForPrinting()) + buttons |= wxPREVIEW_PRINT; + + m_controlBar = new wxPreviewControlBar(m_printPreview, buttons, this); + m_controlBar->CreateButtons(); +} + +/* +* Print preview +*/ + +IMPLEMENT_CLASS(wxPrintPreviewBase, wxObject) + +wxPrintPreviewBase::wxPrintPreviewBase(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintData *data) +{ + if (data) + m_printDialogData = (*data); + + Init(printout, printoutForPrinting); +} + +wxPrintPreviewBase::wxPrintPreviewBase(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintDialogData *data) +{ + if (data) + m_printDialogData = (*data); + + Init(printout, printoutForPrinting); +} + +void wxPrintPreviewBase::Init(wxPrintout *printout, + wxPrintout *printoutForPrinting) +{ + m_isOk = true; + m_previewPrintout = printout; + if (m_previewPrintout) + m_previewPrintout->SetPreview(static_cast(this)); + + m_printPrintout = printoutForPrinting; + + m_previewCanvas = NULL; + m_previewFrame = NULL; + m_previewBitmap = NULL; + m_previewFailed = false; + m_currentPage = 1; + m_currentZoom = 70; + m_topMargin = + m_leftMargin = 2*wxSizerFlags::GetDefaultBorder(); + m_pageWidth = 0; + m_pageHeight = 0; + m_printingPrepared = false; + m_minPage = 1; + m_maxPage = 1; +} + +wxPrintPreviewBase::~wxPrintPreviewBase() +{ + if (m_previewPrintout) + delete m_previewPrintout; + if (m_previewBitmap) + delete m_previewBitmap; + if (m_printPrintout) + delete m_printPrintout; +} + +bool wxPrintPreviewBase::SetCurrentPage(int pageNum) +{ + if (m_currentPage == pageNum) + return true; + + m_currentPage = pageNum; + + InvalidatePreviewBitmap(); + + if (m_previewCanvas) + { + AdjustScrollbars(m_previewCanvas); + + m_previewCanvas->Refresh(); + m_previewCanvas->SetFocus(); + } + return true; +} + +int wxPrintPreviewBase::GetCurrentPage() const + { return m_currentPage; } +void wxPrintPreviewBase::SetPrintout(wxPrintout *printout) + { m_previewPrintout = printout; } +wxPrintout *wxPrintPreviewBase::GetPrintout() const + { return m_previewPrintout; } +wxPrintout *wxPrintPreviewBase::GetPrintoutForPrinting() const + { return m_printPrintout; } +void wxPrintPreviewBase::SetFrame(wxFrame *frame) + { m_previewFrame = frame; } +void wxPrintPreviewBase::SetCanvas(wxPreviewCanvas *canvas) + { m_previewCanvas = canvas; } +wxFrame *wxPrintPreviewBase::GetFrame() const + { return m_previewFrame; } +wxPreviewCanvas *wxPrintPreviewBase::GetCanvas() const + { return m_previewCanvas; } + +void wxPrintPreviewBase::CalcRects(wxPreviewCanvas *canvas, wxRect& pageRect, wxRect& paperRect) +{ + // Calculate the rectangles for the printable area of the page and the + // entire paper as they appear on the canvas on-screen. + int canvasWidth, canvasHeight; + canvas->GetSize(&canvasWidth, &canvasHeight); + + float zoomScale = float(m_currentZoom) / 100; + float screenPrintableWidth = zoomScale * m_pageWidth * m_previewScaleX; + float screenPrintableHeight = zoomScale * m_pageHeight * m_previewScaleY; + + wxRect devicePaperRect = m_previewPrintout->GetPaperRectPixels(); + wxCoord devicePrintableWidth, devicePrintableHeight; + m_previewPrintout->GetPageSizePixels(&devicePrintableWidth, &devicePrintableHeight); + float scaleX = screenPrintableWidth / devicePrintableWidth; + float scaleY = screenPrintableHeight / devicePrintableHeight; + paperRect.width = wxCoord(scaleX * devicePaperRect.width); + paperRect.height = wxCoord(scaleY * devicePaperRect.height); + + paperRect.x = wxCoord((canvasWidth - paperRect.width)/ 2.0); + if (paperRect.x < m_leftMargin) + paperRect.x = m_leftMargin; + paperRect.y = wxCoord((canvasHeight - paperRect.height)/ 2.0); + if (paperRect.y < m_topMargin) + paperRect.y = m_topMargin; + + pageRect.x = paperRect.x - wxCoord(scaleX * devicePaperRect.x); + pageRect.y = paperRect.y - wxCoord(scaleY * devicePaperRect.y); + pageRect.width = wxCoord(screenPrintableWidth); + pageRect.height = wxCoord(screenPrintableHeight); +} + + +void wxPrintPreviewBase::InvalidatePreviewBitmap() +{ + wxDELETE(m_previewBitmap); + // if there was a problem with rendering the preview, try again now + // that it changed in some way (less memory may be needed, for example): + m_previewFailed = false; +} + +bool wxPrintPreviewBase::UpdatePageRendering() +{ + if ( m_previewBitmap ) + return false; + + if ( m_previewFailed ) + return false; + + if ( !RenderPage(m_currentPage) ) + { + m_previewFailed = true; // don't waste time failing again + return false; + } + + return true; +} + +bool wxPrintPreviewBase::PaintPage(wxPreviewCanvas *canvas, wxDC& dc) +{ + DrawBlankPage(canvas, dc); + + if (!m_previewBitmap) + return false; + if (!canvas) + return false; + + wxRect pageRect, paperRect; + CalcRects(canvas, pageRect, paperRect); + wxMemoryDC temp_dc; + temp_dc.SelectObject(*m_previewBitmap); + + dc.Blit(pageRect.x, pageRect.y, + m_previewBitmap->GetWidth(), m_previewBitmap->GetHeight(), &temp_dc, 0, 0); + + temp_dc.SelectObject(wxNullBitmap); + return true; +} + +// Adjusts the scrollbars for the current scale +void wxPrintPreviewBase::AdjustScrollbars(wxPreviewCanvas *canvas) +{ + if (!canvas) + return ; + + wxRect pageRect, paperRect; + CalcRects(canvas, pageRect, paperRect); + int totalWidth = paperRect.width + 2 * m_leftMargin; + int totalHeight = paperRect.height + 2 * m_topMargin; + int scrollUnitsX = totalWidth / 10; + int scrollUnitsY = totalHeight / 10; + wxSize virtualSize = canvas->GetVirtualSize(); + if (virtualSize.GetWidth() != totalWidth || virtualSize.GetHeight() != totalHeight) + canvas->SetScrollbars(10, 10, scrollUnitsX, scrollUnitsY, 0, 0, true); +} + +bool wxPrintPreviewBase::RenderPageIntoDC(wxDC& dc, int pageNum) +{ + m_previewPrintout->SetDC(&dc); + m_previewPrintout->SetPageSizePixels(m_pageWidth, m_pageHeight); + + // Need to delay OnPreparePrinting() until here, so we have enough + // information and a wxDC. + if (!m_printingPrepared) + { + m_printingPrepared = true; + + m_previewPrintout->OnPreparePrinting(); + int selFrom, selTo; + m_previewPrintout->GetPageInfo(&m_minPage, &m_maxPage, &selFrom, &selTo); + + // Update the wxPreviewControlBar page range display. + if ( m_previewFrame ) + { + wxPreviewControlBar * const + controlBar = ((wxPreviewFrame*)m_previewFrame)->GetControlBar(); + if ( controlBar ) + controlBar->SetPageInfo(m_minPage, m_maxPage); + } + } + + m_previewPrintout->OnBeginPrinting(); + + if (!m_previewPrintout->OnBeginDocument(m_printDialogData.GetFromPage(), m_printDialogData.GetToPage())) + { + wxMessageBox(_("Could not start document preview."), _("Print Preview Failure"), wxOK); + return false; + } + + m_previewPrintout->OnPrintPage(pageNum); + m_previewPrintout->OnEndDocument(); + m_previewPrintout->OnEndPrinting(); + + m_previewPrintout->SetDC(NULL); + + return true; +} + +bool wxPrintPreviewBase::RenderPageIntoBitmap(wxBitmap& bmp, int pageNum) +{ + wxMemoryDC memoryDC; + memoryDC.SelectObject(bmp); + memoryDC.Clear(); + + return RenderPageIntoDC(memoryDC, pageNum); +} + +bool wxPrintPreviewBase::RenderPage(int pageNum) +{ + wxBusyCursor busy; + + if (!m_previewCanvas) + { + wxFAIL_MSG(wxT("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!")); + return false; + } + + wxRect pageRect, paperRect; + CalcRects(m_previewCanvas, pageRect, paperRect); + + if (!m_previewBitmap) + { + m_previewBitmap = new wxBitmap(pageRect.width, pageRect.height); + + if (!m_previewBitmap || !m_previewBitmap->IsOk()) + { + InvalidatePreviewBitmap(); + wxMessageBox(_("Sorry, not enough memory to create a preview."), _("Print Preview Failure"), wxOK); + return false; + } + } + + if ( !RenderPageIntoBitmap(*m_previewBitmap, pageNum) ) + { + InvalidatePreviewBitmap(); + wxMessageBox(_("Sorry, not enough memory to create a preview."), _("Print Preview Failure"), wxOK); + return false; + } + +#if wxUSE_STATUSBAR + wxString status; + if (m_maxPage != 0) + status = wxString::Format(_("Page %d of %d"), pageNum, m_maxPage); + else + status = wxString::Format(_("Page %d"), pageNum); + + if (m_previewFrame) + m_previewFrame->SetStatusText(status); +#endif + + return true; +} + +bool wxPrintPreviewBase::DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc) +{ + wxRect pageRect, paperRect; + + CalcRects(canvas, pageRect, paperRect); + + // Draw shadow, allowing for 1-pixel border AROUND the actual paper + wxCoord shadowOffset = 4; + + dc.SetPen(*wxBLACK_PEN); + dc.SetBrush(*wxBLACK_BRUSH); + dc.DrawRectangle(paperRect.x + shadowOffset, paperRect.y + paperRect.height + 1, + paperRect.width, shadowOffset); + + dc.DrawRectangle(paperRect.x + paperRect.width, paperRect.y + shadowOffset, + shadowOffset, paperRect.height); + + // Draw blank page allowing for 1-pixel border AROUND the actual paper + dc.SetPen(*wxBLACK_PEN); + dc.SetBrush(*wxWHITE_BRUSH); + dc.DrawRectangle(paperRect.x - 2, paperRect.y - 1, + paperRect.width + 3, paperRect.height + 2); + + return true; +} + +void wxPrintPreviewBase::SetZoom(int percent) +{ + if (m_currentZoom == percent) + return; + + m_currentZoom = percent; + + InvalidatePreviewBitmap(); + + if (m_previewCanvas) + { + AdjustScrollbars(m_previewCanvas); + ((wxScrolledWindow *) m_previewCanvas)->Scroll(0, 0); + m_previewCanvas->ClearBackground(); + m_previewCanvas->Refresh(); + m_previewCanvas->SetFocus(); + } +} + +wxPrintDialogData& wxPrintPreviewBase::GetPrintDialogData() +{ + return m_printDialogData; +} + +int wxPrintPreviewBase::GetZoom() const +{ return m_currentZoom; } +int wxPrintPreviewBase::GetMaxPage() const +{ return m_maxPage; } +int wxPrintPreviewBase::GetMinPage() const +{ return m_minPage; } +bool wxPrintPreviewBase::IsOk() const +{ return m_isOk; } +void wxPrintPreviewBase::SetOk(bool ok) +{ m_isOk = ok; } + +//---------------------------------------------------------------------------- +// wxPrintPreview +//---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxPrintPreview, wxPrintPreviewBase) + +wxPrintPreview::wxPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintDialogData *data) : + wxPrintPreviewBase( printout, printoutForPrinting, data ) +{ + m_pimpl = wxPrintFactory::GetFactory()-> + CreatePrintPreview( printout, printoutForPrinting, data ); +} + +wxPrintPreview::wxPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintData *data ) : + wxPrintPreviewBase( printout, printoutForPrinting, data ) +{ + m_pimpl = wxPrintFactory::GetFactory()-> + CreatePrintPreview( printout, printoutForPrinting, data ); +} + +wxPrintPreview::~wxPrintPreview() +{ + delete m_pimpl; + + // don't delete twice + m_printPrintout = NULL; + m_previewPrintout = NULL; + m_previewBitmap = NULL; +} + +bool wxPrintPreview::SetCurrentPage(int pageNum) +{ + return m_pimpl->SetCurrentPage( pageNum ); +} + +int wxPrintPreview::GetCurrentPage() const +{ + return m_pimpl->GetCurrentPage(); +} + +void wxPrintPreview::SetPrintout(wxPrintout *printout) +{ + m_pimpl->SetPrintout( printout ); +} + +wxPrintout *wxPrintPreview::GetPrintout() const +{ + return m_pimpl->GetPrintout(); +} + +wxPrintout *wxPrintPreview::GetPrintoutForPrinting() const +{ + return m_pimpl->GetPrintoutForPrinting(); +} + +void wxPrintPreview::SetFrame(wxFrame *frame) +{ + m_pimpl->SetFrame( frame ); +} + +void wxPrintPreview::SetCanvas(wxPreviewCanvas *canvas) +{ + m_pimpl->SetCanvas( canvas ); +} + +wxFrame *wxPrintPreview::GetFrame() const +{ + return m_pimpl->GetFrame(); +} + +wxPreviewCanvas *wxPrintPreview::GetCanvas() const +{ + return m_pimpl->GetCanvas(); +} + +bool wxPrintPreview::PaintPage(wxPreviewCanvas *canvas, wxDC& dc) +{ + return m_pimpl->PaintPage( canvas, dc ); +} + +bool wxPrintPreview::UpdatePageRendering() +{ + return m_pimpl->UpdatePageRendering(); +} + +bool wxPrintPreview::DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc) +{ + return m_pimpl->DrawBlankPage( canvas, dc ); +} + +void wxPrintPreview::AdjustScrollbars(wxPreviewCanvas *canvas) +{ + m_pimpl->AdjustScrollbars( canvas ); +} + +bool wxPrintPreview::RenderPage(int pageNum) +{ + return m_pimpl->RenderPage( pageNum ); +} + +void wxPrintPreview::SetZoom(int percent) +{ + m_pimpl->SetZoom( percent ); +} + +int wxPrintPreview::GetZoom() const +{ + return m_pimpl->GetZoom(); +} + +wxPrintDialogData& wxPrintPreview::GetPrintDialogData() +{ + return m_pimpl->GetPrintDialogData(); +} + +int wxPrintPreview::GetMaxPage() const +{ + return m_pimpl->GetMaxPage(); +} + +int wxPrintPreview::GetMinPage() const +{ + return m_pimpl->GetMinPage(); +} + +bool wxPrintPreview::IsOk() const +{ + return m_pimpl->IsOk(); +} + +void wxPrintPreview::SetOk(bool ok) +{ + m_pimpl->SetOk( ok ); +} + +bool wxPrintPreview::Print(bool interactive) +{ + return m_pimpl->Print( interactive ); +} + +void wxPrintPreview::DetermineScaling() +{ + m_pimpl->DetermineScaling(); +} + +#endif // wxUSE_PRINTING_ARCHITECTURE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/process.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/process.cpp new file mode 100644 index 0000000000..6dd44d891b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/process.cpp @@ -0,0 +1,185 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/process.cpp +// Purpose: Process termination classes +// Author: Guilhem Lavaux +// Modified by: Vadim Zeitlin to check error codes, added Detach() method +// Created: 24/06/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/process.h" + +// ---------------------------------------------------------------------------- +// event tables and such +// ---------------------------------------------------------------------------- + +wxDEFINE_EVENT( wxEVT_END_PROCESS, wxProcessEvent ); + +IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) +IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent) + +// ============================================================================ +// wxProcess implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxProcess creation +// ---------------------------------------------------------------------------- + +void wxProcess::Init(wxEvtHandler *parent, int id, int flags) +{ + if ( parent ) + SetNextHandler(parent); + + m_id = id; + m_pid = 0; + m_priority = wxPRIORITY_DEFAULT; + m_redirect = (flags & wxPROCESS_REDIRECT) != 0; + +#if wxUSE_STREAMS + m_inputStream = NULL; + m_errorStream = NULL; + m_outputStream = NULL; +#endif // wxUSE_STREAMS +} + +/* static */ +wxProcess *wxProcess::Open(const wxString& cmd, int flags) +{ + wxASSERT_MSG( !(flags & wxEXEC_SYNC), wxT("wxEXEC_SYNC should not be used." )); + wxProcess *process = new wxProcess(wxPROCESS_REDIRECT); + long pid = wxExecute(cmd, flags, process); + if( !pid ) + { + // couldn't launch the process + delete process; + return NULL; + } + + process->SetPid(pid); + + return process; +} + +// ---------------------------------------------------------------------------- +// wxProcess termination +// ---------------------------------------------------------------------------- + +wxProcess::~wxProcess() +{ +#if wxUSE_STREAMS + delete m_inputStream; + delete m_errorStream; + delete m_outputStream; +#endif // wxUSE_STREAMS +} + +void wxProcess::OnTerminate(int pid, int status) +{ + wxProcessEvent event(m_id, pid, status); + + if ( !ProcessEvent(event) ) + delete this; + //else: the object which processed the event is responsible for deleting + // us! +} + +void wxProcess::Detach() +{ + // we just detach from the next handler of the chain (i.e. our "parent" -- see ctor) + // not also from the previous handler like wxEvtHandler::Unlink() would do: + + if (m_nextHandler) + m_nextHandler->SetPreviousHandler(m_previousHandler); + + m_nextHandler = NULL; +} + +// ---------------------------------------------------------------------------- +// process IO redirection +// ---------------------------------------------------------------------------- + +#if wxUSE_STREAMS + +void wxProcess::SetPipeStreams(wxInputStream *inputSstream, + wxOutputStream *outputStream, + wxInputStream *errorStream) +{ + m_inputStream = inputSstream; + m_errorStream = errorStream; + m_outputStream = outputStream; +} + +bool wxProcess::IsInputOpened() const +{ + return m_inputStream && m_inputStream->GetLastError() != wxSTREAM_EOF; +} + +bool wxProcess::IsInputAvailable() const +{ + return m_inputStream && m_inputStream->CanRead(); +} + +bool wxProcess::IsErrorAvailable() const +{ + return m_errorStream && m_errorStream->CanRead(); +} + +#endif // wxUSE_STREAMS + +// ---------------------------------------------------------------------------- +// process killing +// ---------------------------------------------------------------------------- + +/* static */ +wxKillError wxProcess::Kill(int pid, wxSignal sig, int flags) +{ + wxKillError rc; + (void)wxKill(pid, sig, &rc, flags); + + return rc; +} + +/* static */ +bool wxProcess::Exists(int pid) +{ + switch ( Kill(pid, wxSIGNONE) ) + { + case wxKILL_OK: + case wxKILL_ACCESS_DENIED: + return true; + + default: + case wxKILL_ERROR: + case wxKILL_BAD_SIGNAL: + wxFAIL_MSG( wxT("unexpected wxProcess::Kill() return code") ); + // fall through + + case wxKILL_NO_PROCESS: + return false; + } +} + +void wxProcess::SetPriority(unsigned priority) +{ + wxCHECK_RET( priority <= wxPRIORITY_MAX, + wxS("Invalid process priority value.") ); + + m_priority = priority; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/protocol.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/protocol.cpp new file mode 100644 index 0000000000..74662adb8a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/protocol.cpp @@ -0,0 +1,218 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/protocol.cpp +// Purpose: Implement protocol base class +// Author: Guilhem Lavaux +// Modified by: +// Created: 07/07/1997 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PROTOCOL + +#include "wx/protocol/protocol.h" +#include "wx/protocol/log.h" + +#ifndef WX_PRECOMP + #include "wx/module.h" +#endif + +#include "wx/url.h" +#include "wx/log.h" + +#include + +// ---------------------------------------------------------------------------- +// wxProtoInfo +// ---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxProtoInfo, wxObject) + +wxProtoInfo::wxProtoInfo(const wxChar *name, const wxChar *serv, + const bool need_host1, wxClassInfo *info) + : m_protoname(name), + m_servname(serv) +{ + m_cinfo = info; + m_needhost = need_host1; +#if wxUSE_URL + next = wxURL::ms_protocols; + wxURL::ms_protocols = this; +#else + next = NULL; +#endif +} + + +// ---------------------------------------------------------------------------- +// wxProtocol +// ---------------------------------------------------------------------------- + +#if wxUSE_SOCKETS +IMPLEMENT_ABSTRACT_CLASS(wxProtocol, wxSocketClient) +#else +IMPLEMENT_ABSTRACT_CLASS(wxProtocol, wxObject) +#endif + +wxProtocol::wxProtocol() +#if wxUSE_SOCKETS + : wxSocketClient() +#endif +{ + m_lastError = wxPROTO_NOERR; + m_log = NULL; + SetDefaultTimeout(60); // default timeout is 60 seconds +} + +void wxProtocol::SetDefaultTimeout(wxUint32 Value) +{ + m_uiDefaultTimeout = Value; +#if wxUSE_SOCKETS + wxSocketBase::SetTimeout(Value); // sets it for this socket +#endif +} + +wxProtocol::~wxProtocol() +{ + delete m_log; +} + +#if wxUSE_SOCKETS +bool wxProtocol::Reconnect() +{ + wxIPV4address addr; + + if (!GetPeer(addr)) + { + Close(); + return false; + } + + if (!Close()) + return false; + + if (!Connect(addr)) + return false; + + return true; +} + +// ---------------------------------------------------------------------------- +// Read a line from socket +// ---------------------------------------------------------------------------- + +/* static */ +wxProtocolError wxProtocol::ReadLine(wxSocketBase *sock, wxString& result) +{ + static const int LINE_BUF = 4095; + + result.clear(); + + wxCharBuffer buf(LINE_BUF); + char *pBuf = buf.data(); + while ( sock->WaitForRead() ) + { + // peek at the socket to see if there is a CRLF + sock->Peek(pBuf, LINE_BUF); + + size_t nRead = sock->LastCount(); + if ( !nRead && sock->Error() ) + return wxPROTO_NETERR; + + // look for "\r\n" paying attention to a special case: "\r\n" could + // have been split by buffer boundary, so check also for \r at the end + // of the last chunk and \n at the beginning of this one + pBuf[nRead] = '\0'; + const char *eol = strchr(pBuf, '\n'); + + // if we found '\n', is there a '\r' as well? + if ( eol ) + { + if ( eol == pBuf ) + { + // check for case of "\r\n" being split + if ( result.empty() || result.Last() != wxT('\r') ) + { + // ignore the stray '\n' + eol = NULL; + } + //else: ok, got real EOL + + // read just this '\n' and restart + nRead = 1; + } + else // '\n' in the middle of the buffer + { + // in any case, read everything up to and including '\n' + nRead = eol - pBuf + 1; + + if ( eol[-1] != '\r' ) + { + // as above, simply ignore stray '\n' + eol = NULL; + } + } + } + + sock->Read(pBuf, nRead); + if ( sock->LastCount() != nRead ) + return wxPROTO_NETERR; + + pBuf[nRead] = '\0'; + result += wxString::FromAscii(pBuf); + + if ( eol ) + { + // remove trailing "\r\n" + result.RemoveLast(2); + + return wxPROTO_NOERR; + } + } + + return wxPROTO_NETERR; +} + +wxProtocolError wxProtocol::ReadLine(wxString& result) +{ + return ReadLine(this, result); +} + +#endif // wxUSE_SOCKETS + +// ---------------------------------------------------------------------------- +// logging +// ---------------------------------------------------------------------------- + +void wxProtocol::SetLog(wxProtocolLog *log) +{ + delete m_log; + m_log = log; +} + +void wxProtocol::LogRequest(const wxString& str) +{ + if ( m_log ) + m_log->LogRequest(str); +} + +void wxProtocol::LogResponse(const wxString& str) +{ + if ( m_log ) + m_log->LogResponse(str); +} + +void wxProtocolLog::DoLogString(const wxString& str) +{ + wxUnusedVar(str); // unused if wxLogTrace() is disabled + wxLogTrace(m_traceMask, "%s", str); +} + +#endif // wxUSE_PROTOCOL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/quantize.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/quantize.cpp new file mode 100644 index 0000000000..4d96d1b92b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/quantize.cpp @@ -0,0 +1,1655 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/quantize.cpp +// Purpose: wxQuantize implementation +// Author: Julian Smart +// Modified by: +// Created: 22/6/2000 +// Copyright: (c) Thomas G. Lane, Vaclav Slavik, Julian Smart +// Licence: wxWindows licence + JPEG library licence +///////////////////////////////////////////////////////////////////////////// + +/* + * jquant2.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains 2-pass color quantization (color mapping) routines. + * These routines provide selection of a custom color map for an image, + * followed by mapping of the image to that color map, with optional + * Floyd-Steinberg dithering. + * It is also possible to use just the second pass to map to an arbitrary + * externally-given color map. + * + * Note: ordered dithering is not supported, since there isn't any fast + * way to compute intercolor distances; it's unclear that ordered dither's + * fundamental assumptions even hold with an irregularly spaced color map. + */ + +/* modified by Vaclav Slavik for use as jpeglib-independent module */ + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#if wxUSE_IMAGE + +#include "wx/quantize.h" + +#ifndef WX_PRECOMP + #include "wx/palette.h" + #include "wx/image.h" +#endif + +#ifdef __WXMSW__ + #include "wx/msw/private.h" +#endif + +#include +#include + +#if defined(__OS2__) +#define RGB_RED_OS2 0 +#define RGB_GREEN_OS2 1 +#define RGB_BLUE_OS2 2 +#else +#define RGB_RED 0 +#define RGB_GREEN 1 +#define RGB_BLUE 2 +#endif +#define RGB_PIXELSIZE 3 + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 +#define BITS_IN_JSAMPLE 8 +#define GETJSAMPLE(value) ((int) (value)) + +#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) + +typedef unsigned short UINT16; +typedef signed short INT16; +#if !(defined(__WATCOMC__) && (defined(__WXMSW__) || defined(__WXMOTIF__))) +typedef signed int INT32; +#endif + +typedef unsigned char JSAMPLE; +typedef JSAMPLE *JSAMPROW; +typedef JSAMPROW *JSAMPARRAY; +typedef unsigned int JDIMENSION; + +typedef struct { + void *cquantize; + JDIMENSION output_width; + JSAMPARRAY colormap; + int actual_number_of_colors; + int desired_number_of_colors; + JSAMPLE *sample_range_limit, *srl_orig; +} j_decompress; + +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) + #define JMETHOD(type,methodname,arglist) type (__cdecl methodname) arglist +#else + #define JMETHOD(type,methodname,arglist) type (methodname) arglist +#endif + +typedef j_decompress *j_decompress_ptr; +struct jpeg_color_quantizer { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, bool is_pre_scan)); + JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, + int num_rows)); + JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); +}; + + + + +/* + * This module implements the well-known Heckbert paradigm for color + * quantization. Most of the ideas used here can be traced back to + * Heckbert's seminal paper + * Heckbert, Paul. "Color Image Quantization for Frame Buffer Display", + * Proc. SIGGRAPH '82, Computer Graphics v.16 #3 (July 1982), pp 297-304. + * + * In the first pass over the image, we accumulate a histogram showing the + * usage count of each possible color. To keep the histogram to a reasonable + * size, we reduce the precision of the input; typical practice is to retain + * 5 or 6 bits per color, so that 8 or 4 different input values are counted + * in the same histogram cell. + * + * Next, the color-selection step begins with a box representing the whole + * color space, and repeatedly splits the "largest" remaining box until we + * have as many boxes as desired colors. Then the mean color in each + * remaining box becomes one of the possible output colors. + * + * The second pass over the image maps each input pixel to the closest output + * color (optionally after applying a Floyd-Steinberg dithering correction). + * This mapping is logically trivial, but making it go fast enough requires + * considerable care. + * + * Heckbert-style quantizers vary a good deal in their policies for choosing + * the "largest" box and deciding where to cut it. The particular policies + * used here have proved out well in experimental comparisons, but better ones + * may yet be found. + * + * In earlier versions of the IJG code, this module quantized in YCbCr color + * space, processing the raw upsampled data without a color conversion step. + * This allowed the color conversion math to be done only once per colormap + * entry, not once per pixel. However, that optimization precluded other + * useful optimizations (such as merging color conversion with upsampling) + * and it also interfered with desired capabilities such as quantizing to an + * externally-supplied colormap. We have therefore abandoned that approach. + * The present code works in the post-conversion color space, typically RGB. + * + * To improve the visual quality of the results, we actually work in scaled + * RGB space, giving G distances more weight than R, and R in turn more than + * B. To do everything in integer math, we must use integer scale factors. + * The 2/3/1 scale factors used here correspond loosely to the relative + * weights of the colors in the NTSC grayscale equation. + * If you want to use this code to quantize a non-RGB color space, you'll + * probably need to change these scale factors. + */ + +#define R_SCALE 2 /* scale R distances by this much */ +#define G_SCALE 3 /* scale G distances by this much */ +#define B_SCALE 1 /* and B by this much */ + +/* Relabel R/G/B as components 0/1/2, respecting the RGB ordering defined + * in jmorecfg.h. As the code stands, it will do the right thing for R,G,B + * and B,G,R orders. If you define some other weird order in jmorecfg.h, + * you'll get compile errors until you extend this logic. In that case + * you'll probably want to tweak the histogram sizes too. + */ + +#if defined(__OS2__) + +#if RGB_RED_OS2 == 0 +#define C0_SCALE R_SCALE +#endif +#if RGB_BLUE_OS2 == 0 +#define C0_SCALE B_SCALE +#endif +#if RGB_GREEN_OS2 == 1 +#define C1_SCALE G_SCALE +#endif +#if RGB_RED_OS2 == 2 +#define C2_SCALE R_SCALE +#endif +#if RGB_BLUE_OS2 == 2 +#define C2_SCALE B_SCALE +#endif + +#else + +#if RGB_RED == 0 +#define C0_SCALE R_SCALE +#endif +#if RGB_BLUE == 0 +#define C0_SCALE B_SCALE +#endif +#if RGB_GREEN == 1 +#define C1_SCALE G_SCALE +#endif +#if RGB_RED == 2 +#define C2_SCALE R_SCALE +#endif +#if RGB_BLUE == 2 +#define C2_SCALE B_SCALE +#endif + +#endif + +/* + * First we have the histogram data structure and routines for creating it. + * + * The number of bits of precision can be adjusted by changing these symbols. + * We recommend keeping 6 bits for G and 5 each for R and B. + * If you have plenty of memory and cycles, 6 bits all around gives marginally + * better results; if you are short of memory, 5 bits all around will save + * some space but degrade the results. + * To maintain a fully accurate histogram, we'd need to allocate a "long" + * (preferably unsigned long) for each cell. In practice this is overkill; + * we can get by with 16 bits per cell. Few of the cell counts will overflow, + * and clamping those that do overflow to the maximum value will give close- + * enough results. This reduces the recommended histogram size from 256Kb + * to 128Kb, which is a useful savings on PC-class machines. + * (In the second pass the histogram space is re-used for pixel mapping data; + * in that capacity, each cell must be able to store zero to the number of + * desired colors. 16 bits/cell is plenty for that too.) + * Since the JPEG code is intended to run in small memory model on 80x86 + * machines, we can't just allocate the histogram in one chunk. Instead + * of a true 3-D array, we use a row of pointers to 2-D arrays. Each + * pointer corresponds to a C0 value (typically 2^5 = 32 pointers) and + * each 2-D array has 2^6*2^5 = 2048 or 2^6*2^6 = 4096 entries. Note that + * on 80x86 machines, the pointer row is in near memory but the actual + * arrays are in far memory (same arrangement as we use for image arrays). + */ + +#define MAXNUMCOLORS (MAXJSAMPLE+1) /* maximum size of colormap */ + +/* These will do the right thing for either R,G,B or B,G,R color order, + * but you may not like the results for other color orders. + */ +#define HIST_C0_BITS 5 /* bits of precision in R/B histogram */ +#define HIST_C1_BITS 6 /* bits of precision in G histogram */ +#define HIST_C2_BITS 5 /* bits of precision in B/R histogram */ + +/* Number of elements along histogram axes. */ +#define HIST_C0_ELEMS (1<cquantize; + JSAMPROW ptr; + histptr histp; + hist3d histogram = cquantize->histogram; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + ptr = input_buf[row]; + for (col = width; col > 0; col--) { + + { + + /* get pixel value and index into the histogram */ + histp = & histogram[GETJSAMPLE(ptr[0]) >> C0_SHIFT] + [GETJSAMPLE(ptr[1]) >> C1_SHIFT] + [GETJSAMPLE(ptr[2]) >> C2_SHIFT]; + /* increment, check for overflow and undo increment if so. */ + if (++(*histp) <= 0) + (*histp)--; + } + ptr += 3; + } + } +} + + +/* + * Next we have the really interesting routines: selection of a colormap + * given the completed histogram. + * These routines work with a list of "boxes", each representing a rectangular + * subset of the input color space (to histogram precision). + */ + +typedef struct { + /* The bounds of the box (inclusive); expressed as histogram indexes */ + int c0min, c0max; + int c1min, c1max; + int c2min, c2max; + /* The volume (actually 2-norm) of the box */ + INT32 volume; + /* The number of nonzero histogram cells within this box */ + long colorcount; +} box; + +typedef box * boxptr; + + +boxptr +find_biggest_color_pop (boxptr boxlist, int numboxes) +/* Find the splittable box with the largest color population */ +/* Returns NULL if no splittable boxes remain */ +{ + boxptr boxp; + int i; + long maxc = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->colorcount > maxc && boxp->volume > 0) { + which = boxp; + maxc = boxp->colorcount; + } + } + return which; +} + + +boxptr +find_biggest_volume (boxptr boxlist, int numboxes) +/* Find the splittable box with the largest (scaled) volume */ +/* Returns NULL if no splittable boxes remain */ +{ + boxptr boxp; + int i; + INT32 maxv = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->volume > maxv) { + which = boxp; + maxv = boxp->volume; + } + } + return which; +} + + +void +update_box (j_decompress_ptr cinfo, boxptr boxp) +/* Shrink the min/max bounds of a box to enclose only nonzero elements, */ +/* and recompute its volume and population */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + INT32 dist0,dist1,dist2; + long ccount; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + if (c0max > c0min) + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0min = c0min = c0; + goto have_c0min; + } + } + have_c0min: + if (c0max > c0min) + for (c0 = c0max; c0 >= c0min; c0--) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0max = c0max = c0; + goto have_c0max; + } + } + have_c0max: + if (c1max > c1min) + for (c1 = c1min; c1 <= c1max; c1++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1min = c1min = c1; + goto have_c1min; + } + } + have_c1min: + if (c1max > c1min) + for (c1 = c1max; c1 >= c1min; c1--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1max = c1max = c1; + goto have_c1max; + } + } + have_c1max: + if (c2max > c2min) + for (c2 = c2min; c2 <= c2max; c2++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2min = c2min = c2; + goto have_c2min; + } + } + have_c2min: + if (c2max > c2min) + for (c2 = c2max; c2 >= c2min; c2--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2max = c2max = c2; + goto have_c2max; + } + } + have_c2max: + + /* Update box volume. + * We use 2-norm rather than real volume here; this biases the method + * against making long narrow boxes, and it has the side benefit that + * a box is splittable iff norm > 0. + * Since the differences are expressed in histogram-cell units, + * we have to shift back to JSAMPLE units to get consistent distances; + * after which, we scale according to the selected distance scale factors. + */ + dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE; + dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE; + dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE; + boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2; + + /* Now scan remaining volume of box and compute population */ + ccount = 0; + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++, histp++) + if (*histp != 0) { + ccount++; + } + } + boxp->colorcount = ccount; +} + + +int +median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes, + int desired_colors) +/* Repeatedly select and split the largest box until we have enough boxes */ +{ + int n,lb; + int c0,c1,c2,cmax; + boxptr b1,b2; + + while (numboxes < desired_colors) { + /* Select box to split. + * Current algorithm: by population for first half, then by volume. + */ + if ((numboxes*2) <= desired_colors) { + b1 = find_biggest_color_pop(boxlist, numboxes); + } else { + b1 = find_biggest_volume(boxlist, numboxes); + } + if (b1 == NULL) /* no splittable boxes left! */ + break; + b2 = &boxlist[numboxes]; /* where new box will go */ + /* Copy the color bounds to the new box. */ + b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max; + b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min; + /* Choose which axis to split the box on. + * Current algorithm: longest scaled axis. + * See notes in update_box about scaling distances. + */ + c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE; + c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE; + c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE; + /* We want to break any ties in favor of green, then red, blue last. + * This code does the right thing for R,G,B or B,G,R color orders only. + */ +#if defined(__VISAGECPP__) + +#if RGB_RED_OS2 == 0 + cmax = c1; n = 1; + if (c0 > cmax) { cmax = c0; n = 0; } + if (c2 > cmax) { n = 2; } +#else + cmax = c1; n = 1; + if (c2 > cmax) { cmax = c2; n = 2; } + if (c0 > cmax) { n = 0; } +#endif + +#else + +#if RGB_RED == 0 + cmax = c1; n = 1; + if (c0 > cmax) { cmax = c0; n = 0; } + if (c2 > cmax) { n = 2; } +#else + cmax = c1; n = 1; + if (c2 > cmax) { cmax = c2; n = 2; } + if (c0 > cmax) { n = 0; } +#endif + +#endif + /* Choose split point along selected axis, and update box bounds. + * Current algorithm: split at halfway point. + * (Since the box has been shrunk to minimum volume, + * any split will produce two nonempty subboxes.) + * Note that lb value is max for lower box, so must be < old max. + */ + switch (n) { + case 0: + lb = (b1->c0max + b1->c0min) / 2; + b1->c0max = lb; + b2->c0min = lb+1; + break; + case 1: + lb = (b1->c1max + b1->c1min) / 2; + b1->c1max = lb; + b2->c1min = lb+1; + break; + case 2: + lb = (b1->c2max + b1->c2min) / 2; + b1->c2max = lb; + b2->c2min = lb+1; + break; + } + /* Update stats for boxes */ + update_box(cinfo, b1); + update_box(cinfo, b2); + numboxes++; + } + return numboxes; +} + + +void +compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor) +/* Compute representative color for a box, put it in colormap[icolor] */ +{ + /* Current algorithm: mean weighted by pixels (not colors) */ + /* Note it is important to get the rounding correct! */ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + long count; + long total = 0; + long c0total = 0; + long c1total = 0; + long c2total = 0; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) { + if ((count = *histp++) != 0) { + total += count; + c0total += ((c0 << C0_SHIFT) + ((1<>1)) * count; + c1total += ((c1 << C1_SHIFT) + ((1<>1)) * count; + c2total += ((c2 << C2_SHIFT) + ((1<>1)) * count; + } + } + } + + cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total); + cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total); + cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total); +} + + +static void +select_colors (j_decompress_ptr cinfo, int desired_colors) +/* Master routine for color selection */ +{ + boxptr boxlist; + int numboxes; + int i; + + /* Allocate workspace for box list */ + boxlist = (boxptr) malloc(desired_colors * sizeof(box)); + /* Initialize one box containing whole space */ + numboxes = 1; + boxlist[0].c0min = 0; + boxlist[0].c0max = MAXJSAMPLE >> C0_SHIFT; + boxlist[0].c1min = 0; + boxlist[0].c1max = MAXJSAMPLE >> C1_SHIFT; + boxlist[0].c2min = 0; + boxlist[0].c2max = MAXJSAMPLE >> C2_SHIFT; + /* Shrink it to actually-used volume and set its statistics */ + update_box(cinfo, & boxlist[0]); + /* Perform median-cut to produce final box list */ + numboxes = median_cut(cinfo, boxlist, numboxes, desired_colors); + /* Compute the representative color for each box, fill colormap */ + for (i = 0; i < numboxes; i++) + compute_color(cinfo, & boxlist[i], i); + cinfo->actual_number_of_colors = numboxes; + + free(boxlist); //FIXME?? I don't know if this is correct - VS +} + + +/* + * These routines are concerned with the time-critical task of mapping input + * colors to the nearest color in the selected colormap. + * + * We re-use the histogram space as an "inverse color map", essentially a + * cache for the results of nearest-color searches. All colors within a + * histogram cell will be mapped to the same colormap entry, namely the one + * closest to the cell's center. This may not be quite the closest entry to + * the actual input color, but it's almost as good. A zero in the cache + * indicates we haven't found the nearest color for that cell yet; the array + * is cleared to zeroes before starting the mapping pass. When we find the + * nearest color for a cell, its colormap index plus one is recorded in the + * cache for future use. The pass2 scanning routines call fill_inverse_cmap + * when they need to use an unfilled entry in the cache. + * + * Our method of efficiently finding nearest colors is based on the "locally + * sorted search" idea described by Heckbert and on the incremental distance + * calculation described by Spencer W. Thomas in chapter III.1 of Graphics + * Gems II (James Arvo, ed. Academic Press, 1991). Thomas points out that + * the distances from a given colormap entry to each cell of the histogram can + * be computed quickly using an incremental method: the differences between + * distances to adjacent cells themselves differ by a constant. This allows a + * fairly fast implementation of the "brute force" approach of computing the + * distance from every colormap entry to every histogram cell. Unfortunately, + * it needs a work array to hold the best-distance-so-far for each histogram + * cell (because the inner loop has to be over cells, not colormap entries). + * The work array elements have to be INT32s, so the work array would need + * 256Kb at our recommended precision. This is not feasible in DOS machines. + * + * To get around these problems, we apply Thomas' method to compute the + * nearest colors for only the cells within a small subbox of the histogram. + * The work array need be only as big as the subbox, so the memory usage + * problem is solved. Furthermore, we need not fill subboxes that are never + * referenced in pass2; many images use only part of the color gamut, so a + * fair amount of work is saved. An additional advantage of this + * approach is that we can apply Heckbert's locality criterion to quickly + * eliminate colormap entries that are far away from the subbox; typically + * three-fourths of the colormap entries are rejected by Heckbert's criterion, + * and we need not compute their distances to individual cells in the subbox. + * The speed of this approach is heavily influenced by the subbox size: too + * small means too much overhead, too big loses because Heckbert's criterion + * can't eliminate as many colormap entries. Empirically the best subbox + * size seems to be about 1/512th of the histogram (1/8th in each direction). + * + * Thomas' article also describes a refined method which is asymptotically + * faster than the brute-force method, but it is also far more complex and + * cannot efficiently be applied to small subboxes. It is therefore not + * useful for programs intended to be portable to DOS machines. On machines + * with plenty of memory, filling the whole histogram in one shot with Thomas' + * refined method might be faster than the present code --- but then again, + * it might not be any faster, and it's certainly more complicated. + */ + + +/* log2(histogram cells in update box) for each axis; this can be adjusted */ +#define BOX_C0_LOG (HIST_C0_BITS-3) +#define BOX_C1_LOG (HIST_C1_BITS-3) +#define BOX_C2_LOG (HIST_C2_BITS-3) + +#define BOX_C0_ELEMS (1<actual_number_of_colors; + int maxc0, maxc1, maxc2; + int centerc0, centerc1, centerc2; + int i, x, ncolors; + INT32 minmaxdist, min_dist, max_dist, tdist; + INT32 mindist[MAXNUMCOLORS]; /* min distance to colormap entry i */ + + /* Compute true coordinates of update box's upper corner and center. + * Actually we compute the coordinates of the center of the upper-corner + * histogram cell, which are the upper bounds of the volume we care about. + * Note that since ">>" rounds down, the "center" values may be closer to + * min than to max; hence comparisons to them must be "<=", not "<". + */ + maxc0 = minc0 + ((1 << BOX_C0_SHIFT) - (1 << C0_SHIFT)); + centerc0 = (minc0 + maxc0) >> 1; + maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT)); + centerc1 = (minc1 + maxc1) >> 1; + maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT)); + centerc2 = (minc2 + maxc2) >> 1; + + /* For each color in colormap, find: + * 1. its minimum squared-distance to any point in the update box + * (zero if color is within update box); + * 2. its maximum squared-distance to any point in the update box. + * Both of these can be found by considering only the corners of the box. + * We save the minimum distance for each color in mindist[]; + * only the smallest maximum distance is of interest. + */ + minmaxdist = 0x7FFFFFFFL; + + for (i = 0; i < numcolors; i++) { + /* We compute the squared-c0-distance term, then add in the other two. */ + x = GETJSAMPLE(cinfo->colormap[0][i]); + if (x < minc0) { + tdist = (x - minc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else if (x > maxc0) { + tdist = (x - maxc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + min_dist = 0; + if (x <= centerc0) { + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } + } + + x = GETJSAMPLE(cinfo->colormap[1][i]); + if (x < minc1) { + tdist = (x - minc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc1) { + tdist = (x - maxc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc1) { + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } + } + + x = GETJSAMPLE(cinfo->colormap[2][i]); + if (x < minc2) { + tdist = (x - minc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc2) { + tdist = (x - maxc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc2) { + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } + } + + mindist[i] = min_dist; /* save away the results */ + if (max_dist < minmaxdist) + minmaxdist = max_dist; + } + + /* Now we know that no cell in the update box is more than minmaxdist + * away from some colormap entry. Therefore, only colors that are + * within minmaxdist of some part of the box need be considered. + */ + ncolors = 0; + for (i = 0; i < numcolors; i++) { + if (mindist[i] <= minmaxdist) + colorlist[ncolors++] = (JSAMPLE) i; + } + return ncolors; +} + + +static void +find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, + int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[]) +/* Find the closest colormap entry for each cell in the update box, + * given the list of candidate colors prepared by find_nearby_colors. + * Return the indexes of the closest entries in the bestcolor[] array. + * This routine uses Thomas' incremental distance calculation method to + * find the distance from a colormap entry to successive cells in the box. + */ +{ + int ic0, ic1, ic2; + int i, icolor; + INT32 * bptr; /* pointer into bestdist[] array */ + JSAMPLE * cptr; /* pointer into bestcolor[] array */ + INT32 dist0, dist1; /* initial distance values */ + INT32 dist2; /* current distance in inner loop */ + INT32 xx0, xx1; /* distance increments */ + INT32 xx2; + INT32 inc0, inc1, inc2; /* initial values for increments */ + /* This array holds the distance to the nearest-so-far color for each cell */ + INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Initialize best-distance for each cell of the update box */ + bptr = bestdist; + for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--) + *bptr++ = 0x7FFFFFFFL; + + /* For each color selected by find_nearby_colors, + * compute its distance to the center of each cell in the box. + * If that's less than best-so-far, update best distance and color number. + */ + + /* Nominal steps between cell centers ("x" in Thomas article) */ +#define STEP_C0 ((1 << C0_SHIFT) * C0_SCALE) +#define STEP_C1 ((1 << C1_SHIFT) * C1_SCALE) +#define STEP_C2 ((1 << C2_SHIFT) * C2_SCALE) + + for (i = 0; i < numcolors; i++) { + icolor = GETJSAMPLE(colorlist[i]); + /* Compute (square of) distance from minc0/c1/c2 to this color */ + inc0 = (minc0 - GETJSAMPLE(cinfo->colormap[0][icolor])) * C0_SCALE; + dist0 = inc0*inc0; + inc1 = (minc1 - GETJSAMPLE(cinfo->colormap[1][icolor])) * C1_SCALE; + dist0 += inc1*inc1; + inc2 = (minc2 - GETJSAMPLE(cinfo->colormap[2][icolor])) * C2_SCALE; + dist0 += inc2*inc2; + /* Form the initial difference increments */ + inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0; + inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1; + inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2; + /* Now loop over all cells in box, updating distance per Thomas method */ + bptr = bestdist; + cptr = bestcolor; + xx0 = inc0; + for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) { + dist1 = dist0; + xx1 = inc1; + for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) { + dist2 = dist1; + xx2 = inc2; + for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) { + if (dist2 < *bptr) { + *bptr = dist2; + *cptr = (JSAMPLE) icolor; + } + dist2 += xx2; + xx2 += 2 * STEP_C2 * STEP_C2; + bptr++; + cptr++; + } + dist1 += xx1; + xx1 += 2 * STEP_C1 * STEP_C1; + } + dist0 += xx0; + xx0 += 2 * STEP_C0 * STEP_C0; + } + } +} + + +static void +fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2) +/* Fill the inverse-colormap entries in the update box that contains */ +/* histogram cell c0/c1/c2. (Only that one cell MUST be filled, but */ +/* we can fill as many others as we wish.) */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + int minc0, minc1, minc2; /* lower left corner of update box */ + int ic0, ic1, ic2; + JSAMPLE * cptr; /* pointer into bestcolor[] array */ + histptr cachep; /* pointer into main cache array */ + /* This array lists the candidate colormap indexes. */ + JSAMPLE colorlist[MAXNUMCOLORS]; + int numcolors; /* number of candidate colors */ + /* This array holds the actually closest colormap index for each cell. */ + JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Convert cell coordinates to update box ID */ + c0 >>= BOX_C0_LOG; + c1 >>= BOX_C1_LOG; + c2 >>= BOX_C2_LOG; + + /* Compute true coordinates of update box's origin corner. + * Actually we compute the coordinates of the center of the corner + * histogram cell, which are the lower bounds of the volume we care about. + */ + minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1); + minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1); + minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1); + + /* Determine which colormap entries are close enough to be candidates + * for the nearest entry to some cell in the update box. + */ + numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist); + + /* Determine the actually nearest colors. */ + find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist, + bestcolor); + + /* Save the best color numbers (plus 1) in the main cache array */ + c0 <<= BOX_C0_LOG; /* convert ID back to base cell indexes */ + c1 <<= BOX_C1_LOG; + c2 <<= BOX_C2_LOG; + cptr = bestcolor; + for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) { + for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) { + cachep = & histogram[c0+ic0][c1+ic1][c2]; + for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) { + *cachep++ = (histcell) (GETJSAMPLE(*cptr++) + 1); + } + } + } +} + + +/* + * Map some rows of pixels to the output colormapped representation. + */ + +void +pass2_no_dither (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) +/* This version performs no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + JSAMPROW inptr, outptr; + histptr cachep; + int c0, c1, c2; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + inptr = input_buf[row]; + outptr = output_buf[row]; + for (col = width; col > 0; col--) { + /* get pixel value and index into the cache */ + c0 = GETJSAMPLE(*inptr++) >> C0_SHIFT; + c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT; + c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT; + cachep = & histogram[c0][c1][c2]; + /* If we have not seen this color before, find nearest colormap entry */ + /* and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cinfo, c0,c1,c2); + /* Now emit the colormap index for this cell */ + *outptr++ = (JSAMPLE) (*cachep - 1); + } + } +} + + +void +pass2_fs_dither (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) +/* This version performs Floyd-Steinberg dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */ + LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */ + LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */ + FSERRPTR errorptr; /* => fserrors[] at column before current */ + JSAMPROW inptr; /* => current input pixel */ + JSAMPROW outptr; /* => current output pixel */ + histptr cachep; + int dir; /* +1 or -1 depending on direction */ + int dir3; /* 3*dir, for advancing inptr & errorptr */ + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + JSAMPLE *range_limit = cinfo->sample_range_limit; + int *error_limit = cquantize->error_limiter; + JSAMPROW colormap0 = cinfo->colormap[0]; + JSAMPROW colormap1 = cinfo->colormap[1]; + JSAMPROW colormap2 = cinfo->colormap[2]; + + + for (row = 0; row < num_rows; row++) { + inptr = input_buf[row]; + outptr = output_buf[row]; + if (cquantize->on_odd_row) { + /* work right to left in this row */ + inptr += (width-1) * 3; /* so point to rightmost pixel */ + outptr += width-1; + dir = -1; + dir3 = -3; + errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */ + cquantize->on_odd_row = false; /* flip for next time */ + } else { + /* work left to right in this row */ + dir = 1; + dir3 = 3; + errorptr = cquantize->fserrors; /* => entry before first real column */ + cquantize->on_odd_row = true; /* flip for next time */ + } + /* Preset error values: no error propagated to first pixel from left */ + cur0 = cur1 = cur2 = 0; + /* and no error propagated to row below yet */ + belowerr0 = belowerr1 = belowerr2 = 0; + bpreverr0 = bpreverr1 = bpreverr2 = 0; + + for (col = width; col > 0; col--) { + /* curN holds the error propagated from the previous pixel on the + * current line. Add the error propagated from the previous line + * to form the complete error correction term for this pixel, and + * round the error term (which is expressed * 16) to an integer. + * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct + * for either sign of the error value. + * Note: errorptr points to *previous* column's array entry. + */ + cur0 = RIGHT_SHIFT(cur0 + errorptr[dir3+0] + 8, 4); + cur1 = RIGHT_SHIFT(cur1 + errorptr[dir3+1] + 8, 4); + cur2 = RIGHT_SHIFT(cur2 + errorptr[dir3+2] + 8, 4); + /* Limit the error using transfer function set by init_error_limit. + * See comments with init_error_limit for rationale. + */ + cur0 = error_limit[cur0]; + cur1 = error_limit[cur1]; + cur2 = error_limit[cur2]; + /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. + * The maximum error is +- MAXJSAMPLE (or less with error limiting); + * this sets the required size of the range_limit array. + */ + cur0 += GETJSAMPLE(inptr[0]); + cur1 += GETJSAMPLE(inptr[1]); + cur2 += GETJSAMPLE(inptr[2]); + cur0 = GETJSAMPLE(range_limit[cur0]); + cur1 = GETJSAMPLE(range_limit[cur1]); + cur2 = GETJSAMPLE(range_limit[cur2]); + /* Index into the cache with adjusted pixel value */ + cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT]; + /* If we have not seen this color before, find nearest colormap */ + /* entry and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT); + /* Now emit the colormap index for this cell */ + { int pixcode = *cachep - 1; + *outptr = (JSAMPLE) pixcode; + /* Compute representation error for this pixel */ + cur0 -= GETJSAMPLE(colormap0[pixcode]); + cur1 -= GETJSAMPLE(colormap1[pixcode]); + cur2 -= GETJSAMPLE(colormap2[pixcode]); + } + /* Compute error fractions to be propagated to adjacent pixels. + * Add these into the running sums, and simultaneously shift the + * next-line error sums left by 1 column. + */ + { LOCFSERROR bnexterr, delta; + + bnexterr = cur0; /* Process component 0 */ + delta = cur0 * 2; + cur0 += delta; /* form error * 3 */ + errorptr[0] = (FSERROR) (bpreverr0 + cur0); + cur0 += delta; /* form error * 5 */ + bpreverr0 = belowerr0 + cur0; + belowerr0 = bnexterr; + cur0 += delta; /* form error * 7 */ + bnexterr = cur1; /* Process component 1 */ + delta = cur1 * 2; + cur1 += delta; /* form error * 3 */ + errorptr[1] = (FSERROR) (bpreverr1 + cur1); + cur1 += delta; /* form error * 5 */ + bpreverr1 = belowerr1 + cur1; + belowerr1 = bnexterr; + cur1 += delta; /* form error * 7 */ + bnexterr = cur2; /* Process component 2 */ + delta = cur2 * 2; + cur2 += delta; /* form error * 3 */ + errorptr[2] = (FSERROR) (bpreverr2 + cur2); + cur2 += delta; /* form error * 5 */ + bpreverr2 = belowerr2 + cur2; + belowerr2 = bnexterr; + cur2 += delta; /* form error * 7 */ + } + /* At this point curN contains the 7/16 error value to be propagated + * to the next pixel on the current line, and all the errors for the + * next line have been shifted over. We are therefore ready to move on. + */ + inptr += dir3; /* Advance pixel pointers to next column */ + outptr += dir; + errorptr += dir3; /* advance errorptr to current column */ + } + /* Post-loop cleanup: we must unload the final error values into the + * final fserrors[] entry. Note we need not unload belowerrN because + * it is for the dummy column before or after the actual array. + */ + errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */ + errorptr[1] = (FSERROR) bpreverr1; + errorptr[2] = (FSERROR) bpreverr2; + } +} + + +/* + * Initialize the error-limiting transfer function (lookup table). + * The raw F-S error computation can potentially compute error values of up to + * +- MAXJSAMPLE. But we want the maximum correction applied to a pixel to be + * much less, otherwise obviously wrong pixels will be created. (Typical + * effects include weird fringes at color-area boundaries, isolated bright + * pixels in a dark area, etc.) The standard advice for avoiding this problem + * is to ensure that the "corners" of the color cube are allocated as output + * colors; then repeated errors in the same direction cannot cause cascading + * error buildup. However, that only prevents the error from getting + * completely out of hand; Aaron Giles reports that error limiting improves + * the results even with corner colors allocated. + * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty + * well, but the smoother transfer function used below is even better. Thanks + * to Aaron Giles for this idea. + */ + +static void +init_error_limit (j_decompress_ptr cinfo) +/* Allocate and fill in the error_limiter table */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + int * table; + int in, out; + + table = (int *) malloc((MAXJSAMPLE*2+1) * sizeof(int)); + table += MAXJSAMPLE; /* so can index -MAXJSAMPLE .. +MAXJSAMPLE */ + cquantize->error_limiter = table; + +#define STEPSIZE ((MAXJSAMPLE+1)/16) + /* Map errors 1:1 up to +- MAXJSAMPLE/16 */ + out = 0; + for (in = 0; in < STEPSIZE; in++, out++) { + table[in] = out; table[-in] = -out; + } + /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */ + for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) { + table[in] = out; table[-in] = -out; + } + /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */ + for (; in <= MAXJSAMPLE; in++) { + table[in] = out; table[-in] = -out; + } +#undef STEPSIZE +} + + +/* + * Finish up at the end of each pass. + */ + +void +finish_pass1 (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + + /* Select the representative colors and fill in cinfo->colormap */ + cinfo->colormap = cquantize->sv_colormap; + select_colors(cinfo, cquantize->desired); + /* Force next pass to zero the color index table */ + cquantize->needs_zeroed = true; +} + + +void +finish_pass2 (j_decompress_ptr WXUNUSED(cinfo)) +{ + /* no work */ +} + + +/* + * Initialize for each processing pass. + */ + +void +start_pass_2_quant (j_decompress_ptr cinfo, bool is_pre_scan) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + + if (is_pre_scan) { + /* Set up method pointers */ + cquantize->pub.color_quantize = prescan_quantize; + cquantize->pub.finish_pass = finish_pass1; + cquantize->needs_zeroed = true; /* Always zero histogram */ + } else { + /* Set up method pointers */ + cquantize->pub.color_quantize = pass2_fs_dither; + cquantize->pub.finish_pass = finish_pass2; + + { + size_t arraysize = (size_t) ((cinfo->output_width + 2) * + (3 * sizeof(FSERROR))); + /* Allocate Floyd-Steinberg workspace if we didn't already. */ + if (cquantize->fserrors == NULL) + cquantize->fserrors = (INT16*) malloc(arraysize); + /* Initialize the propagated errors to zero. */ + memset((void *) cquantize->fserrors, 0, arraysize); + /* Make the error-limit table if we didn't already. */ + if (cquantize->error_limiter == NULL) + init_error_limit(cinfo); + cquantize->on_odd_row = false; + } + + } + /* Zero the histogram or inverse color map, if necessary */ + if (cquantize->needs_zeroed) { + for (int i = 0; i < HIST_C0_ELEMS; i++) { + memset((void *) histogram[i], 0, + HIST_C1_ELEMS*HIST_C2_ELEMS * sizeof(histcell)); + } + cquantize->needs_zeroed = false; + } +} + + +/* + * Switch to a new external colormap between output passes. + */ + +void +new_color_map_2_quant (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + + /* Reset the inverse color map */ + cquantize->needs_zeroed = true; +} + + +/* + * Module initialization routine for 2-pass color quantization. + */ + +void +jinit_2pass_quantizer (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize; + int i; + + cquantize = (my_cquantize_ptr) malloc(sizeof(my_cquantizer)); + cinfo->cquantize = (jpeg_color_quantizer *) cquantize; + cquantize->pub.start_pass = start_pass_2_quant; + cquantize->pub.new_color_map = new_color_map_2_quant; + cquantize->fserrors = NULL; /* flag optional arrays not allocated */ + cquantize->error_limiter = NULL; + + + /* Allocate the histogram/inverse colormap storage */ + cquantize->histogram = (hist3d) malloc(HIST_C0_ELEMS * sizeof(hist2d)); + for (i = 0; i < HIST_C0_ELEMS; i++) { + cquantize->histogram[i] = (hist2d) malloc(HIST_C1_ELEMS*HIST_C2_ELEMS * sizeof(histcell)); + } + cquantize->needs_zeroed = true; /* histogram is garbage now */ + + /* Allocate storage for the completed colormap, if required. + * We do this now since it is storage and may affect + * the memory manager's space calculations. + */ + { + /* Make sure color count is acceptable */ + int desired = cinfo->desired_number_of_colors; + + cquantize->sv_colormap = (JSAMPARRAY) malloc(sizeof(JSAMPROW) * 3); + cquantize->sv_colormap[0] = (JSAMPROW) malloc(sizeof(JSAMPLE) * desired); + cquantize->sv_colormap[1] = (JSAMPROW) malloc(sizeof(JSAMPLE) * desired); + cquantize->sv_colormap[2] = (JSAMPROW) malloc(sizeof(JSAMPLE) * desired); + + cquantize->desired = desired; + } + + /* Allocate Floyd-Steinberg workspace if necessary. + * This isn't really needed until pass 2, but again it is storage. + * Although we will cope with a later change in dither_mode, + * we do not promise to honor max_memory_to_use if dither_mode changes. + */ + { + cquantize->fserrors = (FSERRPTR) malloc( + (size_t) ((cinfo->output_width + 2) * (3 * sizeof(FSERROR)))); + /* Might as well create the error-limiting table too. */ + init_error_limit(cinfo); + } +} + + + + + + + + + + +void +prepare_range_limit_table (j_decompress_ptr cinfo) +/* Allocate and fill in the sample_range_limit table */ +{ + JSAMPLE * table; + int i; + + table = (JSAMPLE *) malloc((5 * (MAXJSAMPLE+1) + CENTERJSAMPLE) * sizeof(JSAMPLE)); + cinfo->srl_orig = table; + table += (MAXJSAMPLE+1); /* allow negative subscripts of simple table */ + cinfo->sample_range_limit = table; + /* First segment of "simple" table: limit[x] = 0 for x < 0 */ + memset(table - (MAXJSAMPLE+1), 0, (MAXJSAMPLE+1) * sizeof(JSAMPLE)); + /* Main part of "simple" table: limit[x] = x */ + for (i = 0; i <= MAXJSAMPLE; i++) + table[i] = (JSAMPLE) i; + table += CENTERJSAMPLE; /* Point to where post-IDCT table starts */ + /* End of simple table, rest of first half of post-IDCT table */ + for (i = CENTERJSAMPLE; i < 2*(MAXJSAMPLE+1); i++) + table[i] = MAXJSAMPLE; + /* Second half of post-IDCT table */ + memset(table + (2 * (MAXJSAMPLE+1)), 0, + (2 * (MAXJSAMPLE+1) - CENTERJSAMPLE) * sizeof(JSAMPLE)); + memcpy(table + (4 * (MAXJSAMPLE+1) - CENTERJSAMPLE), + cinfo->sample_range_limit, CENTERJSAMPLE * sizeof(JSAMPLE)); +} + + + + +/* + * wxQuantize + */ + +IMPLEMENT_DYNAMIC_CLASS(wxQuantize, wxObject) + +void wxQuantize::DoQuantize(unsigned w, unsigned h, unsigned char **in_rows, unsigned char **out_rows, + unsigned char *palette, int desiredNoColours) +{ + j_decompress dec; + my_cquantize_ptr cquantize; + + dec.output_width = w; + dec.desired_number_of_colors = desiredNoColours; + prepare_range_limit_table(&dec); + jinit_2pass_quantizer(&dec); + cquantize = (my_cquantize_ptr) dec.cquantize; + + + cquantize->pub.start_pass(&dec, true); + cquantize->pub.color_quantize(&dec, in_rows, out_rows, h); + cquantize->pub.finish_pass(&dec); + + cquantize->pub.start_pass(&dec, false); + cquantize->pub.color_quantize(&dec, in_rows, out_rows, h); + cquantize->pub.finish_pass(&dec); + + + for (int i = 0; i < dec.desired_number_of_colors; i++) { + palette[3 * i + 0] = dec.colormap[0][i]; + palette[3 * i + 1] = dec.colormap[1][i]; + palette[3 * i + 2] = dec.colormap[2][i]; + } + + for (int ii = 0; ii < HIST_C0_ELEMS; ii++) free(cquantize->histogram[ii]); + free(cquantize->histogram); + free(dec.colormap[0]); + free(dec.colormap[1]); + free(dec.colormap[2]); + free(dec.colormap); + free(dec.srl_orig); + + //free(cquantize->error_limiter); + free((void*)(cquantize->error_limiter - MAXJSAMPLE)); // To reverse what was done to it + + free(cquantize->fserrors); + free(cquantize); +} + +// TODO: somehow make use of the Windows system colours, rather than ignoring them for the +// purposes of quantization. + +bool wxQuantize::Quantize(const wxImage& src, wxImage& dest, + wxPalette** pPalette, + int desiredNoColours, + unsigned char** eightBitData, + int flags) + +{ + int i; + + int windowsSystemColourCount = 20; + + int paletteShift = 0; + + // Shift the palette up by the number of Windows system colours, + // if necessary + if (flags & wxQUANTIZE_INCLUDE_WINDOWS_COLOURS) + paletteShift = windowsSystemColourCount; + + // Make room for the Windows system colours +#ifdef __WXMSW__ + if ((flags & wxQUANTIZE_INCLUDE_WINDOWS_COLOURS) && (desiredNoColours > (256 - windowsSystemColourCount))) + desiredNoColours = 256 - windowsSystemColourCount; +#endif + + // create rows info: + int h = src.GetHeight(); + int w = src.GetWidth(); + unsigned char **rows = new unsigned char *[h]; + unsigned char *imgdt = src.GetData(); + for (i = 0; i < h; i++) + rows[i] = imgdt + 3/*RGB*/ * w * i; + + unsigned char palette[3*256]; + + // This is the image as represented by palette indexes. + unsigned char *data8bit = new unsigned char[w * h]; + unsigned char **outrows = new unsigned char *[h]; + for (i = 0; i < h; i++) + outrows[i] = data8bit + w * i; + + //RGB->palette + DoQuantize(w, h, rows, outrows, palette, desiredNoColours); + + delete[] rows; + delete[] outrows; + + // palette->RGB(max.256) + + if (flags & wxQUANTIZE_FILL_DESTINATION_IMAGE) + { + if (!dest.IsOk()) + dest.Create(w, h); + + imgdt = dest.GetData(); + for (i = 0; i < w * h; i++) + { + unsigned char c = data8bit[i]; + imgdt[3 * i + 0/*R*/] = palette[3 * c + 0]; + imgdt[3 * i + 1/*G*/] = palette[3 * c + 1]; + imgdt[3 * i + 2/*B*/] = palette[3 * c + 2]; + } + } + + if (eightBitData && (flags & wxQUANTIZE_RETURN_8BIT_DATA)) + { +#ifdef __WXMSW__ + if (flags & wxQUANTIZE_INCLUDE_WINDOWS_COLOURS) + { + // We need to shift the palette entries up + // to make room for the Windows system colours. + for (i = 0; i < w * h; i++) + data8bit[i] = (unsigned char)(data8bit[i] + paletteShift); + } +#endif + *eightBitData = data8bit; + } + else + delete[] data8bit; + +#if wxUSE_PALETTE + // Make a wxWidgets palette + if (pPalette) + { + unsigned char* r = new unsigned char[256]; + unsigned char* g = new unsigned char[256]; + unsigned char* b = new unsigned char[256]; + +#ifdef __WXMSW__ + // Fill the first 20 entries with Windows system colours + if (flags & wxQUANTIZE_INCLUDE_WINDOWS_COLOURS) + { + HDC hDC = ::GetDC(NULL); + PALETTEENTRY* entries = new PALETTEENTRY[windowsSystemColourCount]; + ::GetSystemPaletteEntries(hDC, 0, windowsSystemColourCount, entries); + ::ReleaseDC(NULL, hDC); + + for (i = 0; i < windowsSystemColourCount; i++) + { + r[i] = entries[i].peRed; + g[i] = entries[i].peGreen; + b[i] = entries[i].peBlue; + } + delete[] entries; + } +#endif + + for (i = 0; i < desiredNoColours; i++) + { + r[i+paletteShift] = palette[i*3 + 0]; + g[i+paletteShift] = palette[i*3 + 1]; + b[i+paletteShift] = palette[i*3 + 2]; + } + + // Blank out any remaining palette entries + for (i = desiredNoColours+paletteShift; i < 256; i++) + { + r[i] = 0; + g[i] = 0; + b[i] = 0; + } + *pPalette = new wxPalette(256, r, g, b); + delete[] r; + delete[] g; + delete[] b; + } +#else // !wxUSE_PALETTE + wxUnusedVar(pPalette); +#endif // wxUSE_PALETTE/!wxUSE_PALETTE + + return true; +} + +// This version sets a palette in the destination image so you don't +// have to manage it yourself. + +bool wxQuantize::Quantize(const wxImage& src, + wxImage& dest, + int desiredNoColours, + unsigned char** eightBitData, + int flags) +{ + wxPalette* palette = NULL; + if ( !Quantize(src, dest, & palette, desiredNoColours, eightBitData, flags) ) + return false; + +#if wxUSE_PALETTE + if (palette) + { + dest.SetPalette(* palette); + delete palette; + } +#endif // wxUSE_PALETTE + + return true; +} + +#endif + // wxUSE_IMAGE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/radiobtncmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/radiobtncmn.cpp new file mode 100644 index 0000000000..5fe82fe1c7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/radiobtncmn.cpp @@ -0,0 +1,95 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/radiobtncmn.cpp +// Purpose: wxRadioButton common code +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_RADIOBTN + +#include "wx/radiobut.h" + +#ifndef WX_PRECOMP + #include "wx/settings.h" + #include "wx/dcscreen.h" +#endif + +extern WXDLLEXPORT_DATA(const char) wxRadioButtonNameStr[] = "radioButton"; +extern WXDLLEXPORT_DATA(const char) wxBitmapRadioButtonNameStr[] = "radioButton"; + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxRadioButtonStyle ) +wxBEGIN_FLAGS( wxRadioButtonStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) + + wxFLAGS_MEMBER(wxRB_GROUP) +wxEND_FLAGS( wxRadioButtonStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioButton, wxControl, "wx/radiobut.h") + +wxBEGIN_PROPERTIES_TABLE(wxRadioButton) + wxEVENT_PROPERTY( Click, wxEVT_RADIOBUTTON, wxCommandEvent ) + wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString(), 0 /*flags*/, \ + wxT("Helpstring"), wxT("group") ) + wxPROPERTY( Value,bool, SetValue, GetValue, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group") ) + wxPROPERTY_FLAGS( WindowStyle, wxRadioButtonStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxRadioButton) + +wxCONSTRUCTOR_6( wxRadioButton, wxWindow*, Parent, wxWindowID, Id, \ + wxString, Label, wxPoint, Position, wxSize, Size, long, WindowStyle ) + + +#endif // wxUSE_RADIOBTN diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/radiocmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/radiocmn.cpp new file mode 100644 index 0000000000..5d69bf5952 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/radiocmn.cpp @@ -0,0 +1,372 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/radiocmn.cpp +// Purpose: wxRadioBox methods common to all ports +// Author: Vadim Zeitlin +// Modified by: +// Created: 03.06.01 +// Copyright: (c) 2001 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_RADIOBOX + +#ifndef WX_PRECOMP + #include "wx/radiobox.h" +#endif //WX_PRECOMP + +#if wxUSE_TOOLTIPS + #include "wx/tooltip.h" +#endif // wxUSE_TOOLTIPS + +#if wxUSE_HELP + #include "wx/cshelp.h" +#endif + +extern WXDLLEXPORT_DATA(const char) wxRadioBoxNameStr[] = "radioBox"; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +// TODO: wxCONSTRUCTOR +#if 0 // wxUSE_EXTENDED_RTTI +wxDEFINE_FLAGS( wxRadioBoxStyle ) + +wxBEGIN_FLAGS( wxRadioBoxStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxRA_SPECIFY_COLS) +wxFLAGS_MEMBER(wxRA_HORIZONTAL) +wxFLAGS_MEMBER(wxRA_SPECIFY_ROWS) +wxFLAGS_MEMBER(wxRA_VERTICAL) + +wxEND_FLAGS( wxRadioBoxStyle ) + +IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioBox, wxControl,"wx/radiobox.h") + +wxBEGIN_PROPERTIES_TABLE(wxRadioBox) +wxEVENT_PROPERTY( Select , wxEVT_RADIOBOX , wxCommandEvent ) +wxPROPERTY_FLAGS( WindowStyle , wxRadioBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +/* + selection + content + label + dimension + item + */ + +#endif + + +// ---------------------------------------------------------------------------- +// wxRadioBoxBase +// ---------------------------------------------------------------------------- + +void wxRadioBoxBase::SetMajorDim(unsigned int majorDim, long style) +{ + wxCHECK_RET( majorDim != 0, wxT("major radiobox dimension can't be 0") ); + + m_majorDim = majorDim; + + int minorDim = (GetCount() + m_majorDim - 1) / m_majorDim; + + if ( style & wxRA_SPECIFY_COLS ) + { + m_numCols = majorDim; + m_numRows = minorDim; + } + else // wxRA_SPECIFY_ROWS + { + m_numCols = minorDim; + m_numRows = majorDim; + } +} + +int wxRadioBoxBase::GetNextItem(int item, wxDirection dir, long style) const +{ + const int itemStart = item; + + int count = GetCount(), + numCols = GetColumnCount(), + numRows = GetRowCount(); + + bool horz = (style & wxRA_SPECIFY_COLS) != 0; + + do + { + switch ( dir ) + { + case wxUP: + if ( horz ) + { + item -= numCols; + } + else // vertical layout + { + if ( !item-- ) + item = count - 1; + } + break; + + case wxLEFT: + if ( horz ) + { + if ( !item-- ) + item = count - 1; + } + else // vertical layout + { + item -= numRows; + } + break; + + case wxDOWN: + if ( horz ) + { + item += numCols; + } + else // vertical layout + { + if ( ++item == count ) + item = 0; + } + break; + + case wxRIGHT: + if ( horz ) + { + if ( ++item == count ) + item = 0; + } + else // vertical layout + { + item += numRows; + } + break; + + default: + wxFAIL_MSG( wxT("unexpected wxDirection value") ); + return wxNOT_FOUND; + } + + // ensure that the item is in range [0..count) + if ( item < 0 ) + { + // first map the item to the one in the same column but in the last + // row + item += count; + + // now there are 2 cases: either it is the first item of the last + // row in which case we need to wrap again and get to the last item + // or we can just go to the previous item + if ( item % (horz ? numCols : numRows) ) + item--; + else + item = count - 1; + } + else if ( item >= count ) + { + // same logic as above + item -= count; + + // ... except that we need to check if this is not the last item, + // not the first one + if ( (item + 1) % (horz ? numCols : numRows) ) + item++; + else + item = 0; + } + + wxASSERT_MSG( item < count && item >= 0, + wxT("logic error in wxRadioBox::GetNextItem()") ); + } + // we shouldn't select the non-active items, continue looking for a + // visible and shown one unless we came back to the item we started from in + // which case bail out to avoid infinite loop + while ( !(IsItemShown(item) && IsItemEnabled(item)) && item != itemStart ); + + return item; +} + +#if wxUSE_TOOLTIPS + +void wxRadioBoxBase::SetItemToolTip(unsigned int item, const wxString& text) +{ + wxASSERT_MSG( item < GetCount(), wxT("Invalid item index") ); + + // extend the array to have entries for all our items on first use + if ( !m_itemsTooltips ) + { + m_itemsTooltips = new wxToolTipArray; + m_itemsTooltips->resize(GetCount()); + } + + wxToolTip *tooltip = (*m_itemsTooltips)[item]; + + bool changed = true; + if ( text.empty() ) + { + if ( tooltip ) + { + // delete the tooltip + wxDELETE(tooltip); + } + else // nothing to do + { + changed = false; + } + } + else // non empty tooltip text + { + if ( tooltip ) + { + // just change the existing tooltip text, don't change the tooltip + tooltip->SetTip(text); + changed = false; + } + else // no tooltip yet + { + // create the new one + tooltip = new wxToolTip(text); + } + } + + if ( changed ) + { + (*m_itemsTooltips)[item] = tooltip; + DoSetItemToolTip(item, tooltip); + } +} + +void +wxRadioBoxBase::DoSetItemToolTip(unsigned int WXUNUSED(item), + wxToolTip * WXUNUSED(tooltip)) +{ + // per-item tooltips not implemented by default +} + +#endif // wxUSE_TOOLTIPS + +wxRadioBoxBase::~wxRadioBoxBase() +{ +#if wxUSE_TOOLTIPS + if ( m_itemsTooltips ) + { + const size_t n = m_itemsTooltips->size(); + for ( size_t i = 0; i < n; i++ ) + delete (*m_itemsTooltips)[i]; + + delete m_itemsTooltips; + } +#endif // wxUSE_TOOLTIPS +} + +#if wxUSE_HELP + +// set helptext for a particular item +void wxRadioBoxBase::SetItemHelpText(unsigned int n, const wxString& helpText) +{ + wxCHECK_RET( n < GetCount(), wxT("Invalid item index") ); + + if ( m_itemsHelpTexts.empty() ) + { + // once-only initialization of the array: reserve space for all items + m_itemsHelpTexts.Add(wxEmptyString, GetCount()); + } + + m_itemsHelpTexts[n] = helpText; +} + +// retrieve helptext for a particular item +wxString wxRadioBoxBase::GetItemHelpText( unsigned int n ) const +{ + wxCHECK_MSG( n < GetCount(), wxEmptyString, wxT("Invalid item index") ); + + return m_itemsHelpTexts.empty() ? wxString() : m_itemsHelpTexts[n]; +} + +// return help text for the item for which wxEVT_HELP was generated. +wxString wxRadioBoxBase::DoGetHelpTextAtPoint(const wxWindow *derived, + const wxPoint& pt, + wxHelpEvent::Origin origin) const +{ + int item; + switch ( origin ) + { + case wxHelpEvent::Origin_HelpButton: + item = GetItemFromPoint(pt); + break; + + case wxHelpEvent::Origin_Keyboard: + item = GetSelection(); + break; + + default: + wxFAIL_MSG( "unknown help even origin" ); + // fall through + + case wxHelpEvent::Origin_Unknown: + // this value is used when we're called from GetHelpText() for the + // radio box itself, so don't return item-specific text in this case + item = wxNOT_FOUND; + } + + if ( item != wxNOT_FOUND ) + { + wxString text = GetItemHelpText(static_cast(item)); + if( !text.empty() ) + return text; + } + + return derived->wxWindowBase::GetHelpTextAtPoint(pt, origin); +} + +#endif // wxUSE_HELP + +#endif // wxUSE_RADIOBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/rearrangectrl.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/rearrangectrl.cpp new file mode 100644 index 0000000000..a6865f9036 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/rearrangectrl.cpp @@ -0,0 +1,339 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/rearrangectrl.cpp +// Purpose: implementation of classes in wx/rearrangectrl.h +// Author: Vadim Zeitlin +// Created: 2008-12-15 +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_REARRANGECTRL + +#ifndef WX_PRECOMP + #include "wx/button.h" + #include "wx/stattext.h" + #include "wx/sizer.h" +#endif // WX_PRECOMP + +#include "wx/rearrangectrl.h" + +// ============================================================================ +// wxRearrangeList implementation +// ============================================================================ + +extern +WXDLLIMPEXP_DATA_CORE(const char) wxRearrangeListNameStr[] = "wxRearrangeList"; + +BEGIN_EVENT_TABLE(wxRearrangeList, wxCheckListBox) + EVT_CHECKLISTBOX(wxID_ANY, wxRearrangeList::OnCheck) +END_EVENT_TABLE() + +bool wxRearrangeList::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayInt& order, + const wxArrayString& items, + long style, + const wxValidator& validator, + const wxString& name) +{ + // construct the array of items in the order in which they should appear in + // the control + const size_t count = items.size(); + wxCHECK_MSG( order.size() == count, false, "arrays not in sync" ); + + wxArrayString itemsInOrder; + itemsInOrder.reserve(count); + size_t n; + for ( n = 0; n < count; n++ ) + { + int idx = order[n]; + if ( idx < 0 ) + idx = -idx - 1; + itemsInOrder.push_back(items[idx]); + } + + // do create the real control + if ( !wxCheckListBox::Create(parent, id, pos, size, itemsInOrder, + style, validator, name) ) + return false; + + // and now check all the items which should be initially checked + for ( n = 0; n < count; n++ ) + { + if ( order[n] >= 0 ) + Check(n); + } + + m_order = order; + + return true; +} + +bool wxRearrangeList::CanMoveCurrentUp() const +{ + const int sel = GetSelection(); + return sel != wxNOT_FOUND && sel != 0; +} + +bool wxRearrangeList::CanMoveCurrentDown() const +{ + const int sel = GetSelection(); + return sel != wxNOT_FOUND && static_cast(sel) != GetCount() - 1; +} + +bool wxRearrangeList::MoveCurrentUp() +{ + const int sel = GetSelection(); + if ( sel == wxNOT_FOUND || sel == 0 ) + return false; + + Swap(sel, sel - 1); + SetSelection(sel - 1); + + return true; +} + +bool wxRearrangeList::MoveCurrentDown() +{ + const int sel = GetSelection(); + if ( sel == wxNOT_FOUND || static_cast(sel) == GetCount() - 1 ) + return false; + + Swap(sel, sel + 1); + SetSelection(sel + 1); + + return true; +} + +void wxRearrangeList::Swap(int pos1, int pos2) +{ + // update the internally stored order + wxSwap(m_order[pos1], m_order[pos2]); + + + // and now also swap all the attributes of the items + + // first the label + const wxString stringTmp = GetString(pos1); + SetString(pos1, GetString(pos2)); + SetString(pos2, stringTmp); + + // then the checked state + const bool checkedTmp = IsChecked(pos1); + Check(pos1, IsChecked(pos2)); + Check(pos2, checkedTmp); + + // and finally the client data, if necessary + switch ( GetClientDataType() ) + { + case wxClientData_None: + // nothing to do + break; + + case wxClientData_Object: + { + wxClientData * const dataTmp = DetachClientObject(pos1); + SetClientObject(pos1, DetachClientObject(pos2)); + SetClientObject(pos2, dataTmp); + } + break; + + case wxClientData_Void: + { + void * const dataTmp = GetClientData(pos1); + SetClientData(pos1, GetClientData(pos2)); + SetClientData(pos2, dataTmp); + } + break; + } +} + +void wxRearrangeList::OnCheck(wxCommandEvent& event) +{ + // update the internal state to match the new item state + const int n = event.GetInt(); + + m_order[n] = ~m_order[n]; + + wxASSERT_MSG( (m_order[n] >= 0) == IsChecked(n), + "discrepancy between internal state and GUI" ); +} + +// ============================================================================ +// wxRearrangeCtrl implementation +// ============================================================================ + +BEGIN_EVENT_TABLE(wxRearrangeCtrl, wxPanel) + EVT_UPDATE_UI(wxID_UP, wxRearrangeCtrl::OnUpdateButtonUI) + EVT_UPDATE_UI(wxID_DOWN, wxRearrangeCtrl::OnUpdateButtonUI) + + EVT_BUTTON(wxID_UP, wxRearrangeCtrl::OnButton) + EVT_BUTTON(wxID_DOWN, wxRearrangeCtrl::OnButton) +END_EVENT_TABLE() + +void wxRearrangeCtrl::Init() +{ + m_list = NULL; +} + +bool +wxRearrangeCtrl::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayInt& order, + const wxArrayString& items, + long style, + const wxValidator& validator, + const wxString& name) +{ + // create all the windows + if ( !wxPanel::Create(parent, id, pos, size, wxTAB_TRAVERSAL, name) ) + return false; + + m_list = new wxRearrangeList(this, wxID_ANY, + wxDefaultPosition, wxDefaultSize, + order, items, + style, validator); + wxButton * const btnUp = new wxButton(this, wxID_UP); + wxButton * const btnDown = new wxButton(this, wxID_DOWN); + + // arrange them in a sizer + wxSizer * const sizerBtns = new wxBoxSizer(wxVERTICAL); + sizerBtns->Add(btnUp, wxSizerFlags().Centre().Border(wxBOTTOM)); + sizerBtns->Add(btnDown, wxSizerFlags().Centre().Border(wxTOP)); + + wxSizer * const sizerTop = new wxBoxSizer(wxHORIZONTAL); + sizerTop->Add(m_list, wxSizerFlags(1).Expand().Border(wxRIGHT)); + sizerTop->Add(sizerBtns, wxSizerFlags(0).Centre().Border(wxLEFT)); + SetSizer(sizerTop); + + m_list->SetFocus(); + + return true; +} + +void wxRearrangeCtrl::OnUpdateButtonUI(wxUpdateUIEvent& event) +{ + event.Enable( event.GetId() == wxID_UP ? m_list->CanMoveCurrentUp() + : m_list->CanMoveCurrentDown() ); +} + +void wxRearrangeCtrl::OnButton(wxCommandEvent& event) +{ + if ( event.GetId() == wxID_UP ) + m_list->MoveCurrentUp(); + else + m_list->MoveCurrentDown(); +} + +// ============================================================================ +// wxRearrangeDialog implementation +// ============================================================================ + +extern +WXDLLIMPEXP_DATA_CORE(const char) wxRearrangeDialogNameStr[] = "wxRearrangeDlg"; + +namespace +{ + +enum wxRearrangeDialogSizerPositions +{ + Pos_Label, + Pos_Ctrl, + Pos_Buttons, + Pos_Max +}; + +} // anonymous namespace + +bool wxRearrangeDialog::Create(wxWindow *parent, + const wxString& message, + const wxString& title, + const wxArrayInt& order, + const wxArrayString& items, + const wxPoint& pos, + const wxString& name) +{ + if ( !wxDialog::Create(parent, wxID_ANY, title, + pos, wxDefaultSize, + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, + name) ) + return false; + + m_ctrl = new wxRearrangeCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, + order, items); + + // notice that the items in this sizer should be inserted accordingly to + // wxRearrangeDialogSizerPositions order + wxSizer * const sizerTop = new wxBoxSizer(wxVERTICAL); + + if ( !message.empty() ) + { + sizerTop->Add(new wxStaticText(this, wxID_ANY, message), + wxSizerFlags().Border()); + } + else + { + // for convenience of other wxRearrangeDialog code that depends on + // positions of sizer items, insert a dummy zero-sized item + sizerTop->AddSpacer(0); + } + + sizerTop->Add(m_ctrl, + wxSizerFlags(1).Expand().Border()); + sizerTop->Add(CreateSeparatedButtonSizer(wxOK | wxCANCEL), + wxSizerFlags().Expand().Border()); + SetSizerAndFit(sizerTop); + + return true; +} + +void wxRearrangeDialog::AddExtraControls(wxWindow *win) +{ + wxSizer * const sizer = GetSizer(); + wxCHECK_RET( sizer, "the dialog must be created first" ); + + wxASSERT_MSG( sizer->GetChildren().GetCount() == Pos_Max, + "calling AddExtraControls() twice?" ); + + sizer->Insert(Pos_Buttons, win, wxSizerFlags().Expand().Border()); + + win->MoveAfterInTabOrder(m_ctrl); + + // we need to update the initial/minimal window size + sizer->SetSizeHints(this); +} + +wxRearrangeList *wxRearrangeDialog::GetList() const +{ + wxCHECK_MSG( m_ctrl, NULL, "the dialog must be created first" ); + + return m_ctrl->GetList(); +} + +wxArrayInt wxRearrangeDialog::GetOrder() const +{ + wxCHECK_MSG( m_ctrl, wxArrayInt(), "the dialog must be created first" ); + + return m_ctrl->GetList()->GetCurrentOrder(); +} + +#endif // wxUSE_REARRANGECTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/regex.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/regex.cpp new file mode 100644 index 0000000000..a93ca08bf5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/regex.cpp @@ -0,0 +1,696 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/regex.cpp +// Purpose: regular expression matching +// Author: Karsten Ballueder and Vadim Zeitlin +// Modified by: +// Created: 13.07.01 +// Copyright: (c) 2000 Karsten Ballueder +// 2001 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_REGEX + +#include "wx/regex.h" + +#ifndef WX_PRECOMP + #include "wx/object.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/crt.h" +#endif //WX_PRECOMP + +// FreeBSD, Watcom and DMars require this, CW doesn't have nor need it. +// Others also don't seem to need it. If you have an error related to +// (not) including please report details to +// wx-dev@lists.wxwindows.org +#if defined(__UNIX__) || defined(__WATCOMC__) || defined(__DIGITALMARS__) +# include +#endif + +#include + +// WXREGEX_USING_BUILTIN defined when using the built-in regex lib +// WXREGEX_USING_RE_SEARCH defined when using re_search in the GNU regex lib +// WXREGEX_IF_NEED_LEN() wrap the len parameter only used with the built-in +// or GNU regex +// WXREGEX_CONVERT_TO_MB defined when the regex lib is using chars and +// wxChar is wide, so conversion must be done +// WXREGEX_CHAR(x) Convert wxChar to wxRegChar +// +#ifdef __REG_NOFRONT +# define WXREGEX_USING_BUILTIN +# define WXREGEX_IF_NEED_LEN(x) ,x +# if wxUSE_UNICODE +# define WXREGEX_CHAR(x) (x).wc_str() +# else +# define WXREGEX_CHAR(x) (x).mb_str() +# endif +#else +# ifdef HAVE_RE_SEARCH +# define WXREGEX_IF_NEED_LEN(x) ,x +# define WXREGEX_USING_RE_SEARCH +# else +# define WXREGEX_IF_NEED_LEN(x) +# endif +# if wxUSE_UNICODE +# define WXREGEX_CONVERT_TO_MB +# endif +# define WXREGEX_CHAR(x) (x).mb_str() +# define wx_regfree regfree +# define wx_regerror regerror +#endif + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +#ifndef WXREGEX_USING_RE_SEARCH + +// the array of offsets for the matches, the usual POSIX regmatch_t array. +class wxRegExMatches +{ +public: + typedef regmatch_t *match_type; + + wxRegExMatches(size_t n) { m_matches = new regmatch_t[n]; } + ~wxRegExMatches() { delete [] m_matches; } + + // we just use casts here because the fields of regmatch_t struct may be 64 + // bit but we're limited to size_t in our public API and are not going to + // change it because operating on strings longer than 4GB using it is + // absolutely impractical anyhow + size_t Start(size_t n) const + { + return wx_truncate_cast(size_t, m_matches[n].rm_so); + } + + size_t End(size_t n) const + { + return wx_truncate_cast(size_t, m_matches[n].rm_eo); + } + + regmatch_t *get() const { return m_matches; } + +private: + regmatch_t *m_matches; +}; + +#else // WXREGEX_USING_RE_SEARCH + +// the array of offsets for the matches, the struct used by the GNU lib +class wxRegExMatches +{ +public: + typedef re_registers *match_type; + + wxRegExMatches(size_t n) + { + m_matches.num_regs = n; + m_matches.start = new regoff_t[n]; + m_matches.end = new regoff_t[n]; + } + + ~wxRegExMatches() + { + delete [] m_matches.start; + delete [] m_matches.end; + } + + size_t Start(size_t n) const { return m_matches.start[n]; } + size_t End(size_t n) const { return m_matches.end[n]; } + + re_registers *get() { return &m_matches; } + +private: + re_registers m_matches; +}; + +#endif // WXREGEX_USING_RE_SEARCH + +// the character type used by the regular expression engine +#ifndef WXREGEX_CONVERT_TO_MB +typedef wxChar wxRegChar; +#else +typedef char wxRegChar; +#endif + +// the real implementation of wxRegEx +class wxRegExImpl +{ +public: + // ctor and dtor + wxRegExImpl(); + ~wxRegExImpl(); + + // return true if Compile() had been called successfully + bool IsValid() const { return m_isCompiled; } + + // RE operations + bool Compile(const wxString& expr, int flags = 0); + bool Matches(const wxRegChar *str, int flags + WXREGEX_IF_NEED_LEN(size_t len)) const; + bool GetMatch(size_t *start, size_t *len, size_t index = 0) const; + size_t GetMatchCount() const; + int Replace(wxString *pattern, const wxString& replacement, + size_t maxMatches = 0) const; + +private: + // return the string containing the error message for the given err code + wxString GetErrorMsg(int errorcode, bool badconv) const; + + // init the members + void Init() + { + m_isCompiled = false; + m_Matches = NULL; + m_nMatches = 0; + } + + // free the RE if compiled + void Free() + { + if ( IsValid() ) + { + wx_regfree(&m_RegEx); + } + + delete m_Matches; + } + + // free the RE if any and reinit the members + void Reinit() + { + Free(); + Init(); + } + + // compiled RE + regex_t m_RegEx; + + // the subexpressions data + wxRegExMatches *m_Matches; + size_t m_nMatches; + + // true if m_RegEx is valid + bool m_isCompiled; +}; + + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxRegExImpl +// ---------------------------------------------------------------------------- + +wxRegExImpl::wxRegExImpl() +{ + Init(); +} + +wxRegExImpl::~wxRegExImpl() +{ + Free(); +} + +wxString wxRegExImpl::GetErrorMsg(int errorcode, bool badconv) const +{ +#ifdef WXREGEX_CONVERT_TO_MB + // currently only needed when using system library in Unicode mode + if ( badconv ) + { + return _("conversion to 8-bit encoding failed"); + } +#else + // 'use' badconv to avoid a compiler warning + (void)badconv; +#endif + + wxString szError; + + // first get the string length needed + int len = wx_regerror(errorcode, &m_RegEx, NULL, 0); + if ( len > 0 ) + { + char* szcmbError = new char[++len]; + + (void)wx_regerror(errorcode, &m_RegEx, szcmbError, len); + + szError = wxConvLibc.cMB2WX(szcmbError); + delete [] szcmbError; + } + else // regerror() returned 0 + { + szError = _("unknown error"); + } + + return szError; +} + +bool wxRegExImpl::Compile(const wxString& expr, int flags) +{ + Reinit(); + +#ifdef WX_NO_REGEX_ADVANCED +# define FLAVORS wxRE_BASIC +#else +# define FLAVORS (wxRE_ADVANCED | wxRE_BASIC) + wxASSERT_MSG( (flags & FLAVORS) != FLAVORS, + wxT("incompatible flags in wxRegEx::Compile") ); +#endif + wxASSERT_MSG( !(flags & ~(FLAVORS | wxRE_ICASE | wxRE_NOSUB | wxRE_NEWLINE)), + wxT("unrecognized flags in wxRegEx::Compile") ); + + // translate our flags to regcomp() ones + int flagsRE = 0; + if ( !(flags & wxRE_BASIC) ) + { +#ifndef WX_NO_REGEX_ADVANCED + if (flags & wxRE_ADVANCED) + flagsRE |= REG_ADVANCED; + else +#endif + flagsRE |= REG_EXTENDED; + } + if ( flags & wxRE_ICASE ) + flagsRE |= REG_ICASE; + if ( flags & wxRE_NOSUB ) + flagsRE |= REG_NOSUB; + if ( flags & wxRE_NEWLINE ) + flagsRE |= REG_NEWLINE; + + // compile it +#ifdef WXREGEX_USING_BUILTIN + bool conv = true; + // FIXME-UTF8: use wc_str() after removing ANSI build + int errorcode = wx_re_comp(&m_RegEx, expr.c_str(), expr.length(), flagsRE); +#else + // FIXME-UTF8: this is potentially broken, we shouldn't even try it + // and should always use builtin regex library (or PCRE?) + const wxWX2MBbuf conv = expr.mbc_str(); + int errorcode = conv ? regcomp(&m_RegEx, conv, flagsRE) : REG_BADPAT; +#endif + + if ( errorcode ) + { + wxLogError(_("Invalid regular expression '%s': %s"), + expr.c_str(), GetErrorMsg(errorcode, !conv).c_str()); + + m_isCompiled = false; + } + else // ok + { + // don't allocate the matches array now, but do it later if necessary + if ( flags & wxRE_NOSUB ) + { + // we don't need it at all + m_nMatches = 0; + } + else + { + // we will alloc the array later (only if really needed) but count + // the number of sub-expressions in the regex right now + + // there is always one for the whole expression + m_nMatches = 1; + + // and some more for bracketed subexperessions + for ( const wxChar *cptr = expr.c_str(); *cptr; cptr++ ) + { + if ( *cptr == wxT('\\') ) + { + // in basic RE syntax groups are inside \(...\) + if ( *++cptr == wxT('(') && (flags & wxRE_BASIC) ) + { + m_nMatches++; + } + } + else if ( *cptr == wxT('(') && !(flags & wxRE_BASIC) ) + { + // we know that the previous character is not an unquoted + // backslash because it would have been eaten above, so we + // have a bare '(' and this indicates a group start for the + // extended syntax. '(?' is used for extensions by perl- + // like REs (e.g. advanced), and is not valid for POSIX + // extended, so ignore them always. + if ( cptr[1] != wxT('?') ) + m_nMatches++; + } + } + } + + m_isCompiled = true; + } + + return IsValid(); +} + +#ifdef WXREGEX_USING_RE_SEARCH + +// On GNU, regexec is implemented as a wrapper around re_search. re_search +// requires a length parameter which the POSIX regexec does not have, +// therefore regexec must do a strlen on the search text each time it is +// called. This can drastically affect performance when matching is done in +// a loop along a string, such as during a search and replace. Therefore if +// re_search is detected by configure, it is used directly. +// +static int ReSearch(const regex_t *preg, + const char *text, + size_t len, + re_registers *matches, + int eflags) +{ + regex_t *pattern = const_cast(preg); + + pattern->not_bol = (eflags & REG_NOTBOL) != 0; + pattern->not_eol = (eflags & REG_NOTEOL) != 0; + pattern->regs_allocated = REGS_FIXED; + + int ret = re_search(pattern, text, len, 0, len, matches); + return ret >= 0 ? 0 : REG_NOMATCH; +} + +#endif // WXREGEX_USING_RE_SEARCH + +bool wxRegExImpl::Matches(const wxRegChar *str, + int flags + WXREGEX_IF_NEED_LEN(size_t len)) const +{ + wxCHECK_MSG( IsValid(), false, wxT("must successfully Compile() first") ); + + // translate our flags to regexec() ones + wxASSERT_MSG( !(flags & ~(wxRE_NOTBOL | wxRE_NOTEOL)), + wxT("unrecognized flags in wxRegEx::Matches") ); + + int flagsRE = 0; + if ( flags & wxRE_NOTBOL ) + flagsRE |= REG_NOTBOL; + if ( flags & wxRE_NOTEOL ) + flagsRE |= REG_NOTEOL; + + // allocate matches array if needed + wxRegExImpl *self = wxConstCast(this, wxRegExImpl); + if ( !m_Matches && m_nMatches ) + { + self->m_Matches = new wxRegExMatches(m_nMatches); + } + + wxRegExMatches::match_type matches = m_Matches ? m_Matches->get() : NULL; + + // do match it +#if defined WXREGEX_USING_BUILTIN + int rc = wx_re_exec(&self->m_RegEx, str, len, NULL, m_nMatches, matches, flagsRE); +#elif defined WXREGEX_USING_RE_SEARCH + int rc = str ? ReSearch(&self->m_RegEx, str, len, matches, flagsRE) : REG_BADPAT; +#else + int rc = str ? regexec(&self->m_RegEx, str, m_nMatches, matches, flagsRE) : REG_BADPAT; +#endif + + switch ( rc ) + { + case 0: + // matched successfully + return true; + + default: + // an error occurred + wxLogError(_("Failed to find match for regular expression: %s"), + GetErrorMsg(rc, !str).c_str()); + // fall through + + case REG_NOMATCH: + // no match + return false; + } +} + +bool wxRegExImpl::GetMatch(size_t *start, size_t *len, size_t index) const +{ + wxCHECK_MSG( IsValid(), false, wxT("must successfully Compile() first") ); + wxCHECK_MSG( m_nMatches, false, wxT("can't use with wxRE_NOSUB") ); + wxCHECK_MSG( m_Matches, false, wxT("must call Matches() first") ); + wxCHECK_MSG( index < m_nMatches, false, wxT("invalid match index") ); + + if ( start ) + *start = m_Matches->Start(index); + if ( len ) + *len = m_Matches->End(index) - m_Matches->Start(index); + + return true; +} + +size_t wxRegExImpl::GetMatchCount() const +{ + wxCHECK_MSG( IsValid(), 0, wxT("must successfully Compile() first") ); + wxCHECK_MSG( m_nMatches, 0, wxT("can't use with wxRE_NOSUB") ); + + return m_nMatches; +} + +int wxRegExImpl::Replace(wxString *text, + const wxString& replacement, + size_t maxMatches) const +{ + wxCHECK_MSG( text, wxNOT_FOUND, wxT("NULL text in wxRegEx::Replace") ); + wxCHECK_MSG( IsValid(), wxNOT_FOUND, wxT("must successfully Compile() first") ); + + // the input string +#ifndef WXREGEX_CONVERT_TO_MB + const wxChar *textstr = text->c_str(); + size_t textlen = text->length(); +#else + const wxWX2MBbuf textstr = WXREGEX_CHAR(*text); + if (!textstr) + { + wxLogError(_("Failed to find match for regular expression: %s"), + GetErrorMsg(0, true).c_str()); + return 0; + } + size_t textlen = strlen(textstr); + text->clear(); +#endif + + // the replacement text + wxString textNew; + + // the result, allow 25% extra + wxString result; + result.reserve(5 * textlen / 4); + + // attempt at optimization: don't iterate over the string if it doesn't + // contain back references at all + bool mayHaveBackrefs = + replacement.find_first_of(wxT("\\&")) != wxString::npos; + + if ( !mayHaveBackrefs ) + { + textNew = replacement; + } + + // the position where we start looking for the match + size_t matchStart = 0; + + // number of replacement made: we won't make more than maxMatches of them + // (unless maxMatches is 0 which doesn't limit the number of replacements) + size_t countRepl = 0; + + // note that "^" shouldn't match after the first call to Matches() so we + // use wxRE_NOTBOL to prevent it from happening + while ( (!maxMatches || countRepl < maxMatches) && + Matches( +#ifndef WXREGEX_CONVERT_TO_MB + textstr + matchStart, +#else + textstr.data() + matchStart, +#endif + countRepl ? wxRE_NOTBOL : 0 + WXREGEX_IF_NEED_LEN(textlen - matchStart)) ) + { + // the string possibly contains back references: we need to calculate + // the replacement text anew after each match + if ( mayHaveBackrefs ) + { + mayHaveBackrefs = false; + textNew.clear(); + textNew.reserve(replacement.length()); + + for ( const wxChar *p = replacement.c_str(); *p; p++ ) + { + size_t index = (size_t)-1; + + if ( *p == wxT('\\') ) + { + if ( wxIsdigit(*++p) ) + { + // back reference + wxChar *end; + index = (size_t)wxStrtoul(p, &end, 10); + p = end - 1; // -1 to compensate for p++ in the loop + } + //else: backslash used as escape character + } + else if ( *p == wxT('&') ) + { + // treat this as "\0" for compatbility with ed and such + index = 0; + } + + // do we have a back reference? + if ( index != (size_t)-1 ) + { + // yes, get its text + size_t start, len; + if ( !GetMatch(&start, &len, index) ) + { + wxFAIL_MSG( wxT("invalid back reference") ); + + // just eat it... + } + else + { + textNew += wxString( +#ifndef WXREGEX_CONVERT_TO_MB + textstr +#else + textstr.data() +#endif + + matchStart + start, + *wxConvCurrent, len); + + mayHaveBackrefs = true; + } + } + else // ordinary character + { + textNew += *p; + } + } + } + + size_t start, len; + if ( !GetMatch(&start, &len) ) + { + // we did have match as Matches() returned true above! + wxFAIL_MSG( wxT("internal logic error in wxRegEx::Replace") ); + + return wxNOT_FOUND; + } + + // an insurance against implementations that don't grow exponentially + // to ensure building the result takes linear time + if (result.capacity() < result.length() + start + textNew.length()) + result.reserve(2 * result.length()); + +#ifndef WXREGEX_CONVERT_TO_MB + result.append(*text, matchStart, start); +#else + result.append(wxString(textstr.data() + matchStart, *wxConvCurrent, start)); +#endif + matchStart += start; + result.append(textNew); + + countRepl++; + + matchStart += len; + } + +#ifndef WXREGEX_CONVERT_TO_MB + result.append(*text, matchStart, wxString::npos); +#else + result.append(wxString(textstr.data() + matchStart, *wxConvCurrent)); +#endif + *text = result; + + return countRepl; +} + +// ---------------------------------------------------------------------------- +// wxRegEx: all methods are mostly forwarded to wxRegExImpl +// ---------------------------------------------------------------------------- + +void wxRegEx::Init() +{ + m_impl = NULL; +} + +wxRegEx::~wxRegEx() +{ + delete m_impl; +} + +bool wxRegEx::Compile(const wxString& expr, int flags) +{ + if ( !m_impl ) + { + m_impl = new wxRegExImpl; + } + + if ( !m_impl->Compile(expr, flags) ) + { + // error message already given in wxRegExImpl::Compile + wxDELETE(m_impl); + + return false; + } + + return true; +} + +bool wxRegEx::Matches(const wxString& str, int flags) const +{ + wxCHECK_MSG( IsValid(), false, wxT("must successfully Compile() first") ); + + return m_impl->Matches(WXREGEX_CHAR(str), flags + WXREGEX_IF_NEED_LEN(str.length())); +} + +bool wxRegEx::GetMatch(size_t *start, size_t *len, size_t index) const +{ + wxCHECK_MSG( IsValid(), false, wxT("must successfully Compile() first") ); + + return m_impl->GetMatch(start, len, index); +} + +wxString wxRegEx::GetMatch(const wxString& text, size_t index) const +{ + size_t start, len; + if ( !GetMatch(&start, &len, index) ) + return wxEmptyString; + + return text.Mid(start, len); +} + +size_t wxRegEx::GetMatchCount() const +{ + wxCHECK_MSG( IsValid(), 0, wxT("must successfully Compile() first") ); + + return m_impl->GetMatchCount(); +} + +int wxRegEx::Replace(wxString *pattern, + const wxString& replacement, + size_t maxMatches) const +{ + wxCHECK_MSG( IsValid(), wxNOT_FOUND, wxT("must successfully Compile() first") ); + + return m_impl->Replace(pattern, replacement, maxMatches); +} + +#endif // wxUSE_REGEX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/rendcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/rendcmn.cpp new file mode 100644 index 0000000000..455d2d5ac8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/rendcmn.cpp @@ -0,0 +1,206 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/rendcmn.cpp +// Purpose: wxRendererNative common functions +// Author: Vadim Zeitlin +// Modified by: +// Created: 28.07.03 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/log.h" + #include "wx/intl.h" +#endif //WX_PRECOMP + +#include "wx/apptrait.h" +#include "wx/renderer.h" + +#include "wx/scopedptr.h" + +#if wxUSE_DYNLIB_CLASS + #include "wx/dynlib.h" +#endif // wxUSE_DYNLIB_CLASS + +// ---------------------------------------------------------------------------- +// wxRendererPtr: auto pointer holding the global renderer +// ---------------------------------------------------------------------------- + +typedef wxScopedPtr wxRendererPtrBase; + +class wxRendererPtr : public wxRendererPtrBase +{ +public: + // return true if we have a renderer, false otherwise + bool IsOk() + { + if ( !m_initialized ) + { + // only try to create the renderer once + m_initialized = true; + + DoInit(); + } + + return get() != NULL; + } + + // return the global and unique wxRendererPtr + static wxRendererPtr& Get(); + +private: + wxRendererPtr() : wxRendererPtrBase(NULL) { m_initialized = false; } + + void DoInit() + { + wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + if ( traits ) + { + // ask the traits object to create a renderer for us + reset(traits->CreateRenderer()); + } + } + + bool m_initialized; + + // just to suppress a gcc warning + friend class wxRendererPtrDummyFriend; + + wxDECLARE_NO_COPY_CLASS(wxRendererPtr); +}; + +// return the global and unique wxRendererPtr +/*static*/ wxRendererPtr& wxRendererPtr::Get() +{ + static wxRendererPtr s_renderer; + + return s_renderer; +} + +#if wxUSE_DYNLIB_CLASS + +// ---------------------------------------------------------------------------- +// wxRendererFromDynLib: represents a renderer dynamically loaded from a DLL +// ---------------------------------------------------------------------------- + +class wxRendererFromDynLib : public wxDelegateRendererNative +{ +public: + // create the object wrapping the given renderer created from this DLL + // + // we take ownership of the pointer and will delete it (and also unload the + // DLL) when we're deleted + wxRendererFromDynLib(wxDynamicLibrary& dll, wxRendererNative *renderer) + : wxDelegateRendererNative(*renderer), + m_renderer(renderer), + m_dllHandle(dll.Detach()) + { + } + + virtual ~wxRendererFromDynLib() + { + delete m_renderer; + wxDynamicLibrary::Unload(m_dllHandle); + } + +private: + wxRendererNative *m_renderer; + wxDllType m_dllHandle; +}; + +#endif // wxUSE_DYNLIB_CLASS + +// ============================================================================ +// wxRendererNative implementation +// ============================================================================ + +wxRendererNative::~wxRendererNative() +{ + // empty but necessary +} + +// ---------------------------------------------------------------------------- +// Managing the global renderer +// ---------------------------------------------------------------------------- + +/* static */ +wxRendererNative& wxRendererNative::Get() +{ + wxRendererPtr& renderer = wxRendererPtr::Get(); + + return renderer.IsOk() ? *renderer.get() : GetDefault(); +} + +/* static */ +wxRendererNative *wxRendererNative::Set(wxRendererNative *rendererNew) +{ + wxRendererPtr& renderer = wxRendererPtr::Get(); + + wxRendererNative *rendererOld = renderer.release(); + + renderer.reset(rendererNew); + + return rendererOld; +} + + +// ---------------------------------------------------------------------------- +// Dynamic renderers loading +// ---------------------------------------------------------------------------- + +#if wxUSE_DYNLIB_CLASS + +/* static */ +wxRendererNative *wxRendererNative::Load(const wxString& name) +{ + wxString fullname = wxDynamicLibrary::CanonicalizePluginName(name); + + wxDynamicLibrary dll(fullname); + if ( !dll.IsLoaded() ) + return NULL; + + // each theme DLL must export a wxCreateRenderer() function with this + // signature + typedef wxRendererNative *(*wxCreateRenderer_t)(); + + wxDYNLIB_FUNCTION(wxCreateRenderer_t, wxCreateRenderer, dll); + if ( !pfnwxCreateRenderer ) + return NULL; + + // create a renderer object + wxRendererNative *renderer = (*pfnwxCreateRenderer)(); + if ( !renderer ) + return NULL; + + // check that its version is compatible with ours + wxRendererVersion ver = renderer->GetVersion(); + if ( !wxRendererVersion::IsCompatible(ver) ) + { + wxLogError(_("Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."), + name.c_str(), ver.version, ver.age); + delete renderer; + + return NULL; + } + + // finally wrap the renderer in an object which will delete it and unload + // the library when it is deleted and return it to the caller + return new wxRendererFromDynLib(dll, renderer); +} + +#endif // wxUSE_DYNLIB_CLASS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/rgncmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/rgncmn.cpp new file mode 100644 index 0000000000..9c756c35da --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/rgncmn.cpp @@ -0,0 +1,191 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/rgncmn.cpp +// Purpose: Methods of wxRegion that have a generic implementation +// Author: Robin Dunn +// Modified by: +// Created: 27-Mar-2003 +// Copyright: (c) Robin Dunn +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/region.h" + +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" + #include "wx/bitmap.h" + #include "wx/image.h" +#endif //WX_PRECOMP + +// ============================================================================ +// wxRegionBase implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// region comparison +// ---------------------------------------------------------------------------- + +bool wxRegionBase::IsEqual(const wxRegion& region) const +{ + if ( m_refData == region.GetRefData() ) + { + // regions are identical, hence equal + return true; + } + + if ( !m_refData || !region.GetRefData() ) + { + // one, but not both, of the regions is invalid + return false; + } + + return DoIsEqual(region); +} + +// ---------------------------------------------------------------------------- +// region to/from bitmap conversions +// ---------------------------------------------------------------------------- + +wxBitmap wxRegionBase::ConvertToBitmap() const +{ + wxRect box = GetBox(); + wxBitmap bmp(box.GetRight() + 1, box.GetBottom() + 1); + wxMemoryDC dc; + dc.SelectObject(bmp); + dc.SetBackground(*wxBLACK_BRUSH); + dc.Clear(); + dc.SetDeviceClippingRegion(*static_cast(this)); + dc.SetBackground(*wxWHITE_BRUSH); + dc.Clear(); + dc.SelectObject(wxNullBitmap); + return bmp; +} + +#if wxUSE_IMAGE + +static bool DoRegionUnion(wxRegionBase& region, + const wxImage& image, + unsigned char loR, + unsigned char loG, + unsigned char loB, + int tolerance) +{ + unsigned char hiR, hiG, hiB; + + hiR = (unsigned char)wxMin(0xFF, loR + tolerance); + hiG = (unsigned char)wxMin(0xFF, loG + tolerance); + hiB = (unsigned char)wxMin(0xFF, loB + tolerance); + + // Loop through the image row by row, pixel by pixel, building up + // rectangles to add to the region. + int width = image.GetWidth(); + int height = image.GetHeight(); + for (int y=0; y < height; y++) + { + wxRect rect; + rect.y = y; + rect.height = 1; + + for (int x=0; x < width; x++) + { + // search for a continuous range of non-transparent pixels + int x0 = x; + while ( x < width) + { + unsigned char R = image.GetRed(x,y); + unsigned char G = image.GetGreen(x,y); + unsigned char B = image.GetBlue(x,y); + if (( R >= loR && R <= hiR) && + ( G >= loG && G <= hiG) && + ( B >= loB && B <= hiB)) // It's transparent + break; + x++; + } + + // Add the run of non-transparent pixels (if any) to the region + if (x > x0) { + rect.x = x0; + rect.width = x - x0; + region.Union(rect); + } + } + } + + return true; +} + + +bool wxRegionBase::Union(const wxBitmap& bmp) +{ + if (bmp.GetMask()) + { + wxImage image = bmp.ConvertToImage(); + wxASSERT_MSG( image.HasMask(), wxT("wxBitmap::ConvertToImage doesn't preserve mask?") ); + return DoRegionUnion(*this, image, + image.GetMaskRed(), + image.GetMaskGreen(), + image.GetMaskBlue(), + 0); + } + else + { + return Union(0, 0, bmp.GetWidth(), bmp.GetHeight()); + } +} + +bool wxRegionBase::Union(const wxBitmap& bmp, + const wxColour& transColour, + int tolerance) +{ + wxImage image = bmp.ConvertToImage(); + return DoRegionUnion(*this, image, + transColour.Red(), + transColour.Green(), + transColour.Blue(), + tolerance); +} + +#endif // wxUSE_IMAGE + +#ifdef wxHAS_REGION_COMBINE +// ============================================================================ +// wxRegionWithCombine +// ============================================================================ + +// implement some wxRegionBase pure virtuals in terms of Combine() +bool wxRegionWithCombine::DoUnionWithRect(const wxRect& rect) +{ + return Combine(rect, wxRGN_OR); +} + +bool wxRegionWithCombine::DoUnionWithRegion(const wxRegion& region) +{ + return DoCombine(region, wxRGN_OR); +} + +bool wxRegionWithCombine::DoIntersect(const wxRegion& region) +{ + return DoCombine(region, wxRGN_AND); +} + +bool wxRegionWithCombine::DoSubtract(const wxRegion& region) +{ + return DoCombine(region, wxRGN_DIFF); +} + +bool wxRegionWithCombine::DoXor(const wxRegion& region) +{ + return DoCombine(region, wxRGN_XOR); +} + +#endif // wxHAS_REGION_COMBINE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/richtooltipcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/richtooltipcmn.cpp new file mode 100644 index 0000000000..6788488ff9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/richtooltipcmn.cpp @@ -0,0 +1,87 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/richtooltipcmn.cpp +// Purpose: wxRichToolTip implementation common to all platforms. +// Author: Vadim Zeitlin +// Created: 2011-10-18 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_RICHTOOLTIP + +#ifndef WX_PRECOMP + #include "wx/icon.h" +#endif // WX_PRECOMP + +#include "wx/private/richtooltip.h" + +// ============================================================================ +// implementation +// ============================================================================ + +wxRichToolTip::wxRichToolTip(const wxString& title, + const wxString& message) : + m_impl(wxRichToolTipImpl::Create(title, message)) +{ +} + +void +wxRichToolTip::SetBackgroundColour(const wxColour& col, const wxColour& colEnd) +{ + m_impl->SetBackgroundColour(col, colEnd); +} + +void wxRichToolTip::SetIcon(int icon) +{ + m_impl->SetStandardIcon(icon); +} + +void wxRichToolTip::SetIcon(const wxIcon& icon) +{ + m_impl->SetCustomIcon(icon); +} + +void wxRichToolTip::SetTimeout(unsigned milliseconds, + unsigned millisecondsDelay) +{ + m_impl->SetTimeout(milliseconds, millisecondsDelay); +} + +void wxRichToolTip::SetTipKind(wxTipKind tipKind) +{ + m_impl->SetTipKind(tipKind); +} + +void wxRichToolTip::SetTitleFont(const wxFont& font) +{ + m_impl->SetTitleFont(font); +} + +void wxRichToolTip::ShowFor(wxWindow* win, const wxRect* rect) +{ + wxCHECK_RET( win, wxS("Must have a valid window") ); + + m_impl->ShowFor(win, rect); +} + +wxRichToolTip::~wxRichToolTip() +{ + delete m_impl; +} + +#endif // wxUSE_RICHTOOLTIP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/sckaddr.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/sckaddr.cpp new file mode 100644 index 0000000000..da66df3cdf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/sckaddr.cpp @@ -0,0 +1,1013 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/sckaddr.cpp +// Purpose: Network address manager +// Author: Guilhem Lavaux +// Created: 26/04/97 +// Modified by: Vadim Zeitlin to use wxSockAddressImpl on 2008-12-28 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SOCKETS + +#ifndef WX_PRECOMP + #include "wx/object.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/thread.h" + + #include + #include + #include + + #include +#endif // !WX_PRECOMP + +#include "wx/socket.h" +#include "wx/sckaddr.h" +#include "wx/private/socket.h" +#include "wx/private/sckaddr.h" + +#include + +#if defined(__UNIX__) && !defined(__WXMSW__) + #include + #include +#endif // __UNIX__ + +#ifndef INADDR_NONE + #define INADDR_NONE INADDR_ANY +#endif + +// ---------------------------------------------------------------------------- +// wxRTTI macros +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxSockAddress, wxObject) +IMPLEMENT_ABSTRACT_CLASS(wxIPaddress, wxSockAddress) +IMPLEMENT_DYNAMIC_CLASS(wxIPV4address, wxIPaddress) +#if wxUSE_IPV6 +IMPLEMENT_DYNAMIC_CLASS(wxIPV6address, wxIPaddress) +#endif +#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) +IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress) +#endif + +// ============================================================================ +// implementation of thread-safe/reentrant functions if they're missing +// ============================================================================ + +// TODO: use POSIX getaddrinfo() (also available in Winsock 2) for simplicity +// and to use the same code for IPv4 and IPv6 support + +#ifdef __WINDOWS__ + #define HAVE_INET_ADDR + + #ifndef HAVE_GETHOSTBYNAME + #define HAVE_GETHOSTBYNAME + #endif + #ifndef HAVE_GETSERVBYNAME + #define HAVE_GETSERVBYNAME + #endif + + // under MSW getxxxbyname() functions are MT-safe (but not reentrant) so + // we don't need to serialize calls to them + #define wxHAS_MT_SAFE_GETBY_FUNCS + + #if wxUSE_IPV6 + #ifdef __VISUALC__ + // this header does dynamic dispatching of getaddrinfo/freeaddrinfo() + // by implementing them in its own code if the system versions are + // not available (as is the case for anything < XP) + #pragma warning(push) + #pragma warning(disable:4706) + #include + #pragma warning(pop) + #else + // TODO: Use wxDynamicLibrary to bind to these functions + // dynamically on older Windows systems, currently a program + // built with wxUSE_IPV6==1 won't even start there, even if + // it doesn't actually use the socket stuff. + #include + #endif + #endif +#endif // __WINDOWS__ + +// we assume that we have gethostbyaddr_r() if and only if we have +// gethostbyname_r() and that it uses the similar conventions to it (see +// comment in configure) +#define HAVE_GETHOSTBYADDR HAVE_GETHOSTBYNAME +#ifdef HAVE_FUNC_GETHOSTBYNAME_R_3 + #define HAVE_FUNC_GETHOSTBYADDR_R_3 +#endif +#ifdef HAVE_FUNC_GETHOSTBYNAME_R_5 + #define HAVE_FUNC_GETHOSTBYADDR_R_5 +#endif +#ifdef HAVE_FUNC_GETHOSTBYNAME_R_6 + #define HAVE_FUNC_GETHOSTBYADDR_R_6 +#endif + +// the _r functions need the extra buffer parameter but unfortunately its type +// differs between different systems and for the systems which use opaque +// structs for it (at least AIX and OpenBSD) it must be zero-filled before +// being passed to the system functions +#ifdef HAVE_FUNC_GETHOSTBYNAME_R_3 + struct wxGethostBuf : hostent_data + { + wxGethostBuf() + { + memset(this, 0, sizeof(hostent_data)); + } + }; +#else + typedef char wxGethostBuf[1024]; +#endif + +#ifdef HAVE_FUNC_GETSERVBYNAME_R_4 + struct wxGetservBuf : servent_data + { + wxGetservBuf() + { + memset(this, 0, sizeof(servent_data)); + } + }; +#else + typedef char wxGetservBuf[1024]; +#endif + +#if defined(wxHAS_MT_SAFE_GETBY_FUNCS) || !wxUSE_THREADS + #define wxLOCK_GETBY_MUTEX(name) +#else // may need mutexes to protect getxxxbyxxx() calls + #if defined(HAVE_GETHOSTBYNAME) || \ + defined(HAVE_GETHOSTBYADDR) || \ + defined(HAVE_GETSERVBYNAME) + #include "wx/thread.h" + + namespace + { + // these mutexes are used to serialize + wxMutex nameLock, // gethostbyname() + addrLock, // gethostbyaddr() + servLock; // getservbyname() + } + + #define wxLOCK_GETBY_MUTEX(name) wxMutexLocker locker(name ## Lock) + #endif // we don't have _r functions +#endif // wxUSE_THREADS + +namespace +{ + +#if defined(HAVE_GETHOSTBYNAME) +hostent *deepCopyHostent(hostent *h, + const hostent *he, + char *buffer, + int size, + int *err) +{ + /* copy old structure */ + memcpy(h, he, sizeof(hostent)); + + /* copy name */ + int len = strlen(h->h_name); + if (len > size) + { + *err = ENOMEM; + return NULL; + } + memcpy(buffer, h->h_name, len); + buffer[len] = '\0'; + h->h_name = buffer; + + /* track position in the buffer */ + int pos = len + 1; + + /* reuse len to store address length */ + len = h->h_length; + + /* ensure pointer alignment */ + unsigned int misalign = sizeof(char *) - pos%sizeof(char *); + if(misalign < sizeof(char *)) + pos += misalign; + + /* leave space for pointer list */ + char **p = h->h_addr_list, **q; + char **h_addr_list = (char **)(buffer + pos); + while(*(p++) != 0) + pos += sizeof(char *); + + /* copy addresses and fill new pointer list */ + for (p = h->h_addr_list, q = h_addr_list; *p != 0; p++, q++) + { + if (size < pos + len) + { + *err = ENOMEM; + return NULL; + } + memcpy(buffer + pos, *p, len); /* copy content */ + *q = buffer + pos; /* set copied pointer to copied content */ + pos += len; + } + *++q = 0; /* null terminate the pointer list */ + h->h_addr_list = h_addr_list; /* copy pointer to pointers */ + + /* ensure word alignment of pointers */ + misalign = sizeof(char *) - pos%sizeof(char *); + if(misalign < sizeof(char *)) + pos += misalign; + + /* leave space for pointer list */ + p = h->h_aliases; + char **h_aliases = (char **)(buffer + pos); + while(*(p++) != 0) + pos += sizeof(char *); + + /* copy aliases and fill new pointer list */ + for (p = h->h_aliases, q = h_aliases; *p != 0; p++, q++) + { + len = strlen(*p); + if (size <= pos + len) + { + *err = ENOMEM; + return NULL; + } + memcpy(buffer + pos, *p, len); /* copy content */ + buffer[pos + len] = '\0'; + *q = buffer + pos; /* set copied pointer to copied content */ + pos += len + 1; + } + *++q = 0; /* null terminate the pointer list */ + h->h_aliases = h_aliases; /* copy pointer to pointers */ + + return h; +} +#endif // HAVE_GETHOSTBYNAME + +hostent *wxGethostbyname_r(const char *hostname, + hostent *h, + wxGethostBuf buffer, + int size, + int *err) +{ + hostent *he; +#if defined(HAVE_FUNC_GETHOSTBYNAME_R_6) + gethostbyname_r(hostname, h, buffer, size, &he, err); +#elif defined(HAVE_FUNC_GETHOSTBYNAME_R_5) + he = gethostbyname_r(hostname, h, buffer, size, err); +#elif defined(HAVE_FUNC_GETHOSTBYNAME_R_3) + wxUnusedVar(var); + *err = gethostbyname_r(hostname, h, &buffer); + he = h; +#elif defined(HAVE_GETHOSTBYNAME) + wxLOCK_GETBY_MUTEX(name); + + he = gethostbyname(hostname); + *err = h_errno; + + if ( he ) + he = deepCopyHostent(h, he, buffer, size, err); +#else + #error "No gethostbyname[_r]()" +#endif + + return he; +} + +hostent *wxGethostbyaddr_r(const char *addr_buf, + int buf_size, + int proto, + hostent *h, + wxGethostBuf buffer, + int size, + int *err) +{ + hostent *he; +#if defined(HAVE_FUNC_GETHOSTBYADDR_R_6) + gethostbyaddr_r(addr_buf, buf_size, proto, h, buffer, size, &he, err); +#elif defined(HAVE_FUNC_GETHOSTBYADDR_R_5) + he = gethostbyaddr_r(addr_buf, buf_size, proto, h, buffer, size, err); +#elif defined(HAVE_FUNC_GETHOSTBYADDR_R_3) + wxUnusedVar(size); + *err = gethostbyaddr_r(addr_buf, buf_size, proto, h, &buffer); + he = h; +#elif defined(HAVE_GETHOSTBYADDR) + wxLOCK_GETBY_MUTEX(addr); + + he = gethostbyaddr(addr_buf, buf_size, proto); + *err = h_errno; + + if ( he ) + he = deepCopyHostent(h, he, buffer, size, err); +#else + #error "No gethostbyaddr[_r]()" +#endif + + return he; +} + +#if defined(HAVE_GETSERVBYNAME) +servent *deepCopyServent(servent *s, + servent *se, + char *buffer, + int size) +{ + /* copy plain old structure */ + memcpy(s, se, sizeof(servent)); + + /* copy name */ + int len = strlen(s->s_name); + if (len >= size) + { + return NULL; + } + memcpy(buffer, s->s_name, len); + buffer[len] = '\0'; + s->s_name = buffer; + + /* track position in the buffer */ + int pos = len + 1; + + /* copy protocol */ + len = strlen(s->s_proto); + if (pos + len >= size) + { + return NULL; + } + memcpy(buffer + pos, s->s_proto, len); + buffer[pos + len] = '\0'; + s->s_proto = buffer + pos; + + /* track position in the buffer */ + pos += len + 1; + + /* ensure pointer alignment */ + unsigned int misalign = sizeof(char *) - pos%sizeof(char *); + if(misalign < sizeof(char *)) + pos += misalign; + + /* leave space for pointer list */ + char **p = s->s_aliases, **q; + char **s_aliases = (char **)(buffer + pos); + while(*(p++) != 0) + pos += sizeof(char *); + + /* copy addresses and fill new pointer list */ + for (p = s->s_aliases, q = s_aliases; *p != 0; p++, q++){ + len = strlen(*p); + if (size <= pos + len) + { + return NULL; + } + memcpy(buffer + pos, *p, len); /* copy content */ + buffer[pos + len] = '\0'; + *q = buffer + pos; /* set copied pointer to copied content */ + pos += len + 1; + } + *++q = 0; /* null terminate the pointer list */ + s->s_aliases = s_aliases; /* copy pointer to pointers */ + return s; +} +#endif // HAVE_GETSERVBYNAME + +servent *wxGetservbyname_r(const char *port, + const char *protocol, + servent *serv, + wxGetservBuf& buffer, + int size) +{ + servent *se; +#if defined(HAVE_FUNC_GETSERVBYNAME_R_6) + getservbyname_r(port, protocol, serv, buffer, size, &se); +#elif defined(HAVE_FUNC_GETSERVBYNAME_R_5) + se = getservbyname_r(port, protocol, serv, buffer, size); +#elif defined(HAVE_FUNC_GETSERVBYNAME_R_4) + wxUnusedVar(size); + if ( getservbyname_r(port, protocol, serv, &buffer) != 0 ) + return NULL; +#elif defined(HAVE_GETSERVBYNAME) + wxLOCK_GETBY_MUTEX(serv); + + se = getservbyname(port, protocol); + if ( se ) + se = deepCopyServent(serv, se, buffer, size); +#else + #error "No getservbyname[_r]()" +#endif + return se; +} + +} // anonymous namespace + +// ============================================================================ +// wxSockAddressImpl implementation +// ============================================================================ + +// FIXME-VC6: helper macros to call Alloc/Get() hiding the ugly dummy argument +#define ALLOC(T) Alloc(static_cast(NULL)) +#define GET(T) Get(static_cast(NULL)) + +// ---------------------------------------------------------------------------- +// INET or INET6 address family +// ---------------------------------------------------------------------------- + +wxString wxSockAddressImpl::GetHostName() const +{ + const void *addrbuf; + int addrbuflen; + +#if wxUSE_IPV6 + if ( m_family == FAMILY_INET6 ) + { + sockaddr_in6 * const addr6 = GET(sockaddr_in6); + addrbuf = &addr6->sin6_addr; + addrbuflen = sizeof(addr6->sin6_addr); + } + else +#endif // wxUSE_IPV6 + { + sockaddr_in * const addr = GET(sockaddr_in); + if ( !addr ) + return wxString(); + + addrbuf = &addr->sin_addr; + addrbuflen = sizeof(addr->sin_addr); + } + + hostent he; + wxGethostBuf buffer; + int err; + if ( !wxGethostbyaddr_r + ( + static_cast(addrbuf), + addrbuflen, + m_family, + &he, + buffer, + sizeof(buffer), + &err + ) ) + { + return wxString(); + } + + return wxString::FromUTF8(he.h_name); +} + +bool wxSockAddressImpl::SetPortName(const wxString& name, const char *protocol) +{ + // test whether it's a number first + unsigned long port; + if ( name.ToULong(&port) ) + { + if ( port > 65535 ) + return false; + } + else // it's a service name + { + wxGetservBuf buffer; + servent se; + if ( !wxGetservbyname_r(name.utf8_str(), protocol, &se, + buffer, sizeof(buffer)) ) + return false; + + // s_port is in network byte order and SetPort() uses the host byte + // order and we prefer to reuse it from here instead of assigning to + // sin_port directly + port = ntohs(se.s_port); + } + + return SetPort(port); +} + +// ---------------------------------------------------------------------------- +// INET address family +// ---------------------------------------------------------------------------- + +void wxSockAddressImpl::CreateINET() +{ + wxASSERT_MSG( Is(FAMILY_UNSPEC), "recreating address as different type?" ); + + m_family = FAMILY_INET; + sockaddr_in * const addr = ALLOC(sockaddr_in); + addr->sin_family = FAMILY_INET; +} + +bool wxSockAddressImpl::SetHostName4(const wxString& name) +{ + sockaddr_in * const addr = GET(sockaddr_in); + if ( !addr ) + return false; + + const wxScopedCharBuffer namebuf(name.utf8_str()); + + // first check if this is an address in quad dotted notation +#if defined(HAVE_INET_ATON) + if ( inet_aton(namebuf, &addr->sin_addr) ) + return true; +#elif defined(HAVE_INET_ADDR) + addr->sin_addr.s_addr = inet_addr(namebuf); + if ( addr->sin_addr.s_addr != INADDR_NONE ) + return true; +#else + #error "Neither inet_aton() nor inet_addr() is available?" +#endif + + // it's a host name, resolve it + hostent he; + wxGethostBuf buffer; + int err; + if ( !wxGethostbyname_r(namebuf, &he, buffer, sizeof(buffer), &err) ) + return false; + + addr->sin_addr.s_addr = ((in_addr *)he.h_addr)->s_addr; + return true; +} + +bool wxSockAddressImpl::GetHostAddress(wxUint32 *address) const +{ + sockaddr_in * const addr = GET(sockaddr_in); + if ( !addr ) + return false; + + *address = ntohl(addr->sin_addr.s_addr); + + return true; +} + +bool wxSockAddressImpl::SetHostAddress(wxUint32 address) +{ + sockaddr_in * const addr = GET(sockaddr_in); + if ( !addr ) + return false; + + addr->sin_addr.s_addr = htonl(address); + + return true; +} + +wxUint16 wxSockAddressImpl::GetPort4() const +{ + sockaddr_in * const addr = GET(sockaddr_in); + if ( !addr ) + return 0; + + return ntohs(addr->sin_port); +} + +bool wxSockAddressImpl::SetPort4(wxUint16 port) +{ + sockaddr_in * const addr = GET(sockaddr_in); + if ( !addr ) + return false; + + addr->sin_port = htons(port); + + return true; +} + +#if wxUSE_IPV6 + +// ---------------------------------------------------------------------------- +// INET6 address family +// ---------------------------------------------------------------------------- + +void wxSockAddressImpl::CreateINET6() +{ + wxASSERT_MSG( Is(FAMILY_UNSPEC), "recreating address as different type?" ); + + m_family = FAMILY_INET6; + sockaddr_in6 * const addr = ALLOC(sockaddr_in6); + addr->sin6_family = FAMILY_INET6; +} + +bool wxSockAddressImpl::SetHostName6(const wxString& hostname) +{ + sockaddr_in6 * const addr = GET(sockaddr_in6); + if ( !addr ) + return false; + + addrinfo hints; + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET6; + + addrinfo *info = NULL; + int rc = getaddrinfo(hostname.utf8_str(), NULL, &hints, &info); + if ( rc ) + { + // use gai_strerror()? + return false; + } + + wxCHECK_MSG( info, false, "should have info on success" ); + + wxASSERT_MSG( int(info->ai_addrlen) == m_len, "unexpected address length" ); + + memcpy(addr, info->ai_addr, info->ai_addrlen); + freeaddrinfo(info); + + return true; +} + +bool wxSockAddressImpl::GetHostAddress(in6_addr *address) const +{ + sockaddr_in6 * const addr = GET(sockaddr_in6); + if ( !addr ) + return false; + + *address = addr->sin6_addr; + + return true; +} + +bool wxSockAddressImpl::SetHostAddress(const in6_addr& address) +{ + sockaddr_in6 * const addr = GET(sockaddr_in6); + if ( !addr ) + return false; + + addr->sin6_addr = address; + + return true; +} + +wxUint16 wxSockAddressImpl::GetPort6() const +{ + sockaddr_in6 * const addr = GET(sockaddr_in6); + if ( !addr ) + return 0; + + return ntohs(addr->sin6_port); +} + +bool wxSockAddressImpl::SetPort6(wxUint16 port) +{ + sockaddr_in6 * const addr = GET(sockaddr_in6); + if ( !addr ) + return false; + + addr->sin6_port = htons(port); + + return true; +} + +bool wxSockAddressImpl::SetToAnyAddress6() +{ + static const in6_addr any = IN6ADDR_ANY_INIT; + + return SetHostAddress(any); +} + +#endif // wxUSE_IPV6 + +#ifdef wxHAS_UNIX_DOMAIN_SOCKETS + +// ---------------------------------------------------------------------------- +// Unix address family +// ---------------------------------------------------------------------------- + +#ifndef UNIX_PATH_MAX + #define UNIX_PATH_MAX (WXSIZEOF(((sockaddr_un *)NULL)->sun_path)) +#endif + +void wxSockAddressImpl::CreateUnix() +{ + wxASSERT_MSG( Is(FAMILY_UNSPEC), "recreating address as different type?" ); + + m_family = FAMILY_UNIX; + sockaddr_un * const addr = ALLOC(sockaddr_un); + addr->sun_family = FAMILY_UNIX; + addr->sun_path[0] = '\0'; +} + +bool wxSockAddressImpl::SetPath(const wxString& path) +{ + sockaddr_un * const addr = GET(sockaddr_un); + if ( !addr ) + return false; + + const wxScopedCharBuffer buf(path.utf8_str()); + if ( strlen(buf) >= UNIX_PATH_MAX ) + return false; + + wxStrlcpy(addr->sun_path, buf, UNIX_PATH_MAX); + + return true; +} + +wxString wxSockAddressImpl::GetPath() const +{ + sockaddr_un * const addr = GET(sockaddr_un); + if ( !addr ) + return wxString(); + + return wxString::FromUTF8(addr->sun_path); +} + +#endif // wxHAS_UNIX_DOMAIN_SOCKETS + +#undef GET +#undef ALLOC + +// ---------------------------------------------------------------------------- +// wxSockAddress +// ---------------------------------------------------------------------------- + +const sockaddr *wxSockAddress::GetAddressData() const +{ + return GetAddress().GetAddr(); +} + +int wxSockAddress::GetAddressDataLen() const +{ + return GetAddress().GetLen(); +} + +void wxSockAddress::Init() +{ + if ( wxIsMainThread() && !wxSocketBase::IsInitialized() ) + { + // we must do it before using any socket functions + (void)wxSocketBase::Initialize(); + } +} + +wxSockAddress::wxSockAddress() +{ + Init(); + + m_impl = new wxSockAddressImpl(); +} + +wxSockAddress::wxSockAddress(const wxSockAddress& other) + : wxObject() +{ + Init(); + + m_impl = new wxSockAddressImpl(*other.m_impl); +} + +wxSockAddress::~wxSockAddress() +{ + delete m_impl; +} + +void wxSockAddress::SetAddress(const wxSockAddressImpl& address) +{ + if ( &address != m_impl ) + { + delete m_impl; + m_impl = new wxSockAddressImpl(address); + } +} + +wxSockAddress& wxSockAddress::operator=(const wxSockAddress& addr) +{ + SetAddress(addr.GetAddress()); + + return *this; +} + +void wxSockAddress::Clear() +{ + m_impl->Clear(); +} + +// ---------------------------------------------------------------------------- +// wxIPaddress +// ---------------------------------------------------------------------------- + +wxSockAddressImpl& wxIPaddress::GetImpl() +{ + if ( m_impl->GetFamily() == wxSockAddressImpl::FAMILY_UNSPEC ) + m_impl->CreateINET(); + + return *m_impl; +} + +bool wxIPaddress::Hostname(const wxString& name) +{ + wxCHECK_MSG( !name.empty(), false, "empty host name is invalid" ); + + m_origHostname = name; + + return GetImpl().SetHostName(name); +} + +bool wxIPaddress::Service(const wxString& name) +{ + return GetImpl().SetPortName(name, "tcp"); +} + +bool wxIPaddress::Service(unsigned short port) +{ + return GetImpl().SetPort(port); +} + +bool wxIPaddress::LocalHost() +{ + return Hostname("localhost"); +} + +wxString wxIPaddress::Hostname() const +{ + return GetImpl().GetHostName(); +} + +unsigned short wxIPaddress::Service() const +{ + return GetImpl().GetPort(); +} + +bool wxIPaddress::operator==(const wxIPaddress& addr) const +{ + return Hostname().Cmp(addr.Hostname()) == 0 && + Service() == addr.Service(); +} + +bool wxIPaddress::AnyAddress() +{ + return GetImpl().SetToAnyAddress(); +} + +// ---------------------------------------------------------------------------- +// wxIPV4address +// ---------------------------------------------------------------------------- + +void wxIPV4address::DoInitImpl() +{ + m_impl->CreateINET(); +} + +bool wxIPV4address::Hostname(unsigned long addr) +{ + if ( !GetImpl().SetHostAddress(addr) ) + { + m_origHostname.clear(); + return false; + } + + m_origHostname = Hostname(); + return true; +} + +bool wxIPV4address::IsLocalHost() const +{ + return Hostname() == "localhost" || IPAddress() == "127.0.0.1"; +} + +wxString wxIPV4address::IPAddress() const +{ + wxUint32 addr; + if ( !GetImpl().GetHostAddress(&addr) ) + return wxString(); + + return wxString::Format + ( + "%u.%u.%u.%u", + (addr >> 24) & 0xff, + (addr >> 16) & 0xff, + (addr >> 8) & 0xff, + addr & 0xff + ); +} + +bool wxIPV4address::BroadcastAddress() +{ + return GetImpl().SetToBroadcastAddress(); +} + +#if wxUSE_IPV6 + +// --------------------------------------------------------------------------- +// wxIPV6address +// --------------------------------------------------------------------------- + +void wxIPV6address::DoInitImpl() +{ + m_impl->CreateINET6(); +} + +bool wxIPV6address::Hostname(unsigned char addr[16]) +{ + unsigned short wk[8]; + for ( int i = 0; i < 8; ++i ) + { + wk[i] = addr[2*i]; + wk[i] <<= 8; + wk[i] |= addr[2*i+1]; + } + + return Hostname + ( + wxString::Format + ( + "%x:%x:%x:%x:%x:%x:%x:%x", + wk[0], wk[1], wk[2], wk[3], wk[4], wk[5], wk[6], wk[7] + ) + ); +} + +bool wxIPV6address::IsLocalHost() const +{ + if ( Hostname() == "localhost" ) + return true; + + wxString addr = IPAddress(); + return addr == wxT("::1") || + addr == wxT("0:0:0:0:0:0:0:1") || + addr == wxT("::ffff:127.0.0.1"); +} + +wxString wxIPV6address::IPAddress() const +{ + union + { + in6_addr addr6; + wxUint8 bytes[16]; + } u; + + if ( !GetImpl().GetHostAddress(&u.addr6) ) + return wxString(); + + const wxUint8 * const addr = u.bytes; + + wxUint16 words[8]; + int i, + prefix_zero_count = 0; + for ( i = 0; i < 8; ++i ) + { + words[i] = addr[i*2]; + words[i] <<= 8; + words[i] |= addr[i*2+1]; + if ( i == prefix_zero_count && words[i] == 0 ) + ++prefix_zero_count; + } + + wxString result; + if ( prefix_zero_count == 8 ) + { + result = wxT( "::" ); + } + else if ( prefix_zero_count == 6 && words[5] == 0xFFFF ) + { + // IPv4 mapped + result.Printf("::ffff:%d.%d.%d.%d", + addr[12], addr[13], addr[14], addr[15]); + } + else // general case + { + result = ":"; + for ( i = prefix_zero_count; i < 8; ++i ) + { + result += wxString::Format(":%x", words[i]); + } + } + + return result; +} + +#endif // wxUSE_IPV6 + +#ifdef wxHAS_UNIX_DOMAIN_SOCKETS + +// --------------------------------------------------------------------------- +// wxUNIXaddress +// --------------------------------------------------------------------------- + +wxSockAddressImpl& wxUNIXaddress::GetUNIX() +{ + if ( m_impl->GetFamily() == wxSockAddressImpl::FAMILY_UNSPEC ) + m_impl->CreateUnix(); + + return *m_impl; +} + +void wxUNIXaddress::Filename(const wxString& fname) +{ + GetUNIX().SetPath(fname); +} + +wxString wxUNIXaddress::Filename() const +{ + return GetUNIX().GetPath(); +} + +#endif // wxHAS_UNIX_DOMAIN_SOCKETS + +#endif // wxUSE_SOCKETS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/sckfile.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/sckfile.cpp new file mode 100644 index 0000000000..4b7b6cee1c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/sckfile.cpp @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/sckfile.cpp +// Purpose: File protocol +// Author: Guilhem Lavaux +// Modified by: +// Created: 20/07/97 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS && wxUSE_PROTOCOL_FILE + +#ifndef WX_PRECOMP +#endif + +#include "wx/uri.h" +#include "wx/wfstream.h" +#include "wx/protocol/file.h" + + +// ---------------------------------------------------------------------------- +// wxFileProto +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxFileProto, wxProtocol) +IMPLEMENT_PROTOCOL(wxFileProto, wxT("file"), NULL, false) + +wxFileProto::wxFileProto() + : wxProtocol() +{ +} + +wxFileProto::~wxFileProto() +{ +} + +wxInputStream *wxFileProto::GetInputStream(const wxString& path) +{ + wxFileInputStream *retval = new wxFileInputStream(wxURI::Unescape(path)); + if ( retval->IsOk() ) + { + m_lastError = wxPROTO_NOERR; + return retval; + } + + m_lastError = wxPROTO_NOFILE; + delete retval; + + return NULL; +} + +#endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/sckipc.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/sckipc.cpp new file mode 100644 index 0000000000..ea1de8eb8e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/sckipc.cpp @@ -0,0 +1,931 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/sckipc.cpp +// Purpose: Interprocess communication implementation (wxSocket version) +// Author: Julian Smart +// Modified by: Guilhem Lavaux (big rewrite) May 1997, 1998 +// Guillermo Rodriguez (updated for wxSocket v2) Jan 2000 +// (callbacks deprecated) Mar 2000 +// Vadim Zeitlin (added support for Unix sockets) Apr 2002 +// (use buffering, many fixes/cleanup) Oct 2008 +// Created: 1993 +// Copyright: (c) Julian Smart 1993 +// (c) Guilhem Lavaux 1997, 1998 +// (c) 2000 Guillermo Rodriguez +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ========================================================================== +// declarations +// ========================================================================== + +// -------------------------------------------------------------------------- +// headers +// -------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SOCKETS && wxUSE_IPC && wxUSE_STREAMS + +#include "wx/sckipc.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/event.h" + #include "wx/module.h" +#endif + +#include +#include +#include + +#include "wx/socket.h" + +// -------------------------------------------------------------------------- +// macros and constants +// -------------------------------------------------------------------------- + +namespace +{ + +// Message codes (don't change them to avoid breaking the existing code using +// wxIPC protocol!) +enum IPCCode +{ + IPC_EXECUTE = 1, + IPC_REQUEST = 2, + IPC_POKE = 3, + IPC_ADVISE_START = 4, + IPC_ADVISE_REQUEST = 5, + IPC_ADVISE = 6, + IPC_ADVISE_STOP = 7, + IPC_REQUEST_REPLY = 8, + IPC_FAIL = 9, + IPC_CONNECT = 10, + IPC_DISCONNECT = 11, + IPC_MAX +}; + +} // anonymous namespace + +// headers needed for umask() +#ifdef __UNIX_LIKE__ + #include + #include +#endif // __UNIX_LIKE__ + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +// get the address object for the given server name, the caller must delete it +static wxSockAddress * +GetAddressFromName(const wxString& serverName, + const wxString& host = wxEmptyString) +{ + // we always use INET sockets under non-Unix systems +#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) + // under Unix, if the server name looks like a path, create a AF_UNIX + // socket instead of AF_INET one + if ( serverName.Find(wxT('/')) != wxNOT_FOUND ) + { + wxUNIXaddress *addr = new wxUNIXaddress; + addr->Filename(serverName); + + return addr; + } +#endif // Unix/!Unix + { + wxIPV4address *addr = new wxIPV4address; + addr->Service(serverName); + if ( !host.empty() ) + { + addr->Hostname(host); + } + + return addr; + } +} + +// -------------------------------------------------------------------------- +// wxTCPEventHandler stuff (private class) +// -------------------------------------------------------------------------- + +class wxTCPEventHandler : public wxEvtHandler +{ +public: + wxTCPEventHandler() : wxEvtHandler() { } + + void Client_OnRequest(wxSocketEvent& event); + void Server_OnRequest(wxSocketEvent& event); + +private: + void HandleDisconnect(wxTCPConnection *connection); + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxTCPEventHandler); +}; + +enum +{ + _CLIENT_ONREQUEST_ID = 1000, + _SERVER_ONREQUEST_ID +}; + +// -------------------------------------------------------------------------- +// wxTCPEventHandlerModule (private class) +// -------------------------------------------------------------------------- + +class wxTCPEventHandlerModule : public wxModule +{ +public: + wxTCPEventHandlerModule() : wxModule() { } + + // get the global wxTCPEventHandler creating it if necessary + static wxTCPEventHandler& GetHandler() + { + if ( !ms_handler ) + ms_handler = new wxTCPEventHandler; + + return *ms_handler; + } + + // as ms_handler is initialized on demand, don't do anything in OnInit() + virtual bool OnInit() { return true; } + virtual void OnExit() { wxDELETE(ms_handler); } + +private: + static wxTCPEventHandler *ms_handler; + + DECLARE_DYNAMIC_CLASS(wxTCPEventHandlerModule) + wxDECLARE_NO_COPY_CLASS(wxTCPEventHandlerModule); +}; + +IMPLEMENT_DYNAMIC_CLASS(wxTCPEventHandlerModule, wxModule) + +wxTCPEventHandler *wxTCPEventHandlerModule::ms_handler = NULL; + +// -------------------------------------------------------------------------- +// wxIPCSocketStreams +// -------------------------------------------------------------------------- + +#define USE_BUFFER + +// this class contains the various (related) streams used by wxTCPConnection +// and also provides a way to read from the socket stream directly +// +// for writing to the stream use the IPCOutput class below +class wxIPCSocketStreams +{ +public: + // ctor initializes all the streams on top of the given socket + // + // note that we use a bigger than default buffer size which matches the + // typical Ethernet MTU (minus TCP header overhead) + wxIPCSocketStreams(wxSocketBase& sock) + : m_socketStream(sock), +#ifdef USE_BUFFER + m_bufferedOut(m_socketStream, 1448), +#else + m_bufferedOut(m_socketStream), +#endif + m_dataIn(m_socketStream), + m_dataOut(m_bufferedOut) + { + } + + // expose the IO methods needed by IPC code (notice that writing is only + // done via IPCOutput) + + // flush output + void Flush() + { +#ifdef USE_BUFFER + m_bufferedOut.Sync(); +#endif + } + + // simple wrappers around the functions with the same name in + // wxDataInputStream + wxUint8 Read8() + { + Flush(); + return m_dataIn.Read8(); + } + + wxUint32 Read32() + { + Flush(); + return m_dataIn.Read32(); + } + + wxString ReadString() + { + Flush(); + return m_dataIn.ReadString(); + } + + // read arbitrary (size-prepended) data + // + // connection parameter is needed to call its GetBufferAtLeast() method + void *ReadData(wxConnectionBase *conn, size_t *size) + { + Flush(); + + wxCHECK_MSG( conn, NULL, "NULL connection parameter" ); + wxCHECK_MSG( size, NULL, "NULL size parameter" ); + + *size = Read32(); + + void * const data = conn->GetBufferAtLeast(*size); + wxCHECK_MSG( data, NULL, "IPC buffer allocation failed" ); + + m_socketStream.Read(data, *size); + + return data; + } + + // same as above but for data preceded by the format + void * + ReadFormatData(wxConnectionBase *conn, wxIPCFormat *format, size_t *size) + { + wxCHECK_MSG( format, NULL, "NULL format parameter" ); + + *format = static_cast(Read8()); + + return ReadData(conn, size); + } + + + // these methods are only used by IPCOutput and not directly + wxDataOutputStream& GetDataOut() { return m_dataOut; } + wxOutputStream& GetUnformattedOut() { return m_bufferedOut; } + +private: + // this is the low-level underlying stream using the connection socket + wxSocketStream m_socketStream; + + // the buffered stream is used to avoid writing all pieces of an IPC + // request to the socket one by one but to instead do it all at once when + // we're done with it +#ifdef USE_BUFFER + wxBufferedOutputStream m_bufferedOut; +#else + wxOutputStream& m_bufferedOut; +#endif + + // finally the data streams are used to be able to write typed data into + // the above streams easily + wxDataInputStream m_dataIn; + wxDataOutputStream m_dataOut; + + wxDECLARE_NO_COPY_CLASS(wxIPCSocketStreams); +}; + +namespace +{ + +// an object of this class should be instantiated on the stack to write to the +// underlying socket stream +// +// this class is intentionally separated from wxIPCSocketStreams to ensure that +// Flush() is always called +class IPCOutput +{ +public: + // construct an object associated with the given streams (which must have + // life time greater than ours as we keep a reference to it) + IPCOutput(wxIPCSocketStreams *streams) + : m_streams(*streams) + { + wxASSERT_MSG( streams, "NULL streams pointer" ); + } + + // dtor calls Flush() really sending the IPC data to the network + ~IPCOutput() { m_streams.Flush(); } + + + // write a byte + void Write8(wxUint8 i) + { + m_streams.GetDataOut().Write8(i); + } + + // write the reply code and a string + void Write(IPCCode code, const wxString& str) + { + Write8(code); + m_streams.GetDataOut().WriteString(str); + } + + // write the reply code, a string and a format in this order + void Write(IPCCode code, const wxString& str, wxIPCFormat format) + { + Write(code, str); + Write8(format); + } + + // write arbitrary data + void WriteData(const void *data, size_t size) + { + m_streams.GetDataOut().Write32(size); + m_streams.GetUnformattedOut().Write(data, size); + } + + +private: + wxIPCSocketStreams& m_streams; + + wxDECLARE_NO_COPY_CLASS(IPCOutput); +}; + +} // anonymous namespace + +// ========================================================================== +// implementation +// ========================================================================== + +IMPLEMENT_DYNAMIC_CLASS(wxTCPServer, wxServerBase) +IMPLEMENT_DYNAMIC_CLASS(wxTCPClient, wxClientBase) +IMPLEMENT_CLASS(wxTCPConnection, wxConnectionBase) + +// -------------------------------------------------------------------------- +// wxTCPClient +// -------------------------------------------------------------------------- + +wxTCPClient::wxTCPClient() + : wxClientBase() +{ +} + +bool wxTCPClient::ValidHost(const wxString& host) +{ + wxIPV4address addr; + + return addr.Hostname(host); +} + +wxConnectionBase *wxTCPClient::MakeConnection(const wxString& host, + const wxString& serverName, + const wxString& topic) +{ + wxSockAddress *addr = GetAddressFromName(serverName, host); + if ( !addr ) + return NULL; + + wxSocketClient * const client = new wxSocketClient(wxSOCKET_WAITALL); + wxIPCSocketStreams * const streams = new wxIPCSocketStreams(*client); + + bool ok = client->Connect(*addr); + delete addr; + + if ( ok ) + { + // Send topic name, and enquire whether this has succeeded + IPCOutput(streams).Write(IPC_CONNECT, topic); + + unsigned char msg = streams->Read8(); + + // OK! Confirmation. + if (msg == IPC_CONNECT) + { + wxTCPConnection * + connection = (wxTCPConnection *)OnMakeConnection (); + + if (connection) + { + if (wxDynamicCast(connection, wxTCPConnection)) + { + connection->m_topic = topic; + connection->m_sock = client; + connection->m_streams = streams; + client->SetEventHandler(wxTCPEventHandlerModule::GetHandler(), + _CLIENT_ONREQUEST_ID); + client->SetClientData(connection); + client->SetNotify(wxSOCKET_INPUT_FLAG | wxSOCKET_LOST_FLAG); + client->Notify(true); + return connection; + } + else + { + delete connection; + // and fall through to delete everything else + } + } + } + } + + // Something went wrong, delete everything + delete streams; + client->Destroy(); + + return NULL; +} + +wxConnectionBase *wxTCPClient::OnMakeConnection() +{ + return new wxTCPConnection(); +} + +// -------------------------------------------------------------------------- +// wxTCPServer +// -------------------------------------------------------------------------- + +wxTCPServer::wxTCPServer() + : wxServerBase() +{ + m_server = NULL; +} + +bool wxTCPServer::Create(const wxString& serverName) +{ + // Destroy previous server, if any + if (m_server) + { + m_server->SetClientData(NULL); + m_server->Destroy(); + m_server = NULL; + } + + wxSockAddress *addr = GetAddressFromName(serverName); + if ( !addr ) + return false; + +#ifdef __UNIX_LIKE__ + mode_t umaskOld; + if ( addr->Type() == wxSockAddress::UNIX ) + { + // ensure that the file doesn't exist as otherwise calling socket() + // would fail + int rc = remove(serverName.fn_str()); + if ( rc < 0 && errno != ENOENT ) + { + delete addr; + + return false; + } + + // also set the umask to prevent the others from reading our file + umaskOld = umask(077); + } + else + { + // unused anyhow but shut down the compiler warnings + umaskOld = 0; + } +#endif // __UNIX_LIKE__ + + // Create a socket listening on the specified port (reusing it to allow + // restarting the server listening on the same port as was used by the + // previous instance of this server) + m_server = new wxSocketServer(*addr, wxSOCKET_WAITALL | wxSOCKET_REUSEADDR); + +#ifdef __UNIX_LIKE__ + if ( addr->Type() == wxSockAddress::UNIX ) + { + // restore the umask + umask(umaskOld); + + // save the file name to remove it later + m_filename = serverName; + } +#endif // __UNIX_LIKE__ + + delete addr; + + if (!m_server->IsOk()) + { + m_server->Destroy(); + m_server = NULL; + + return false; + } + + m_server->SetEventHandler(wxTCPEventHandlerModule::GetHandler(), + _SERVER_ONREQUEST_ID); + m_server->SetClientData(this); + m_server->SetNotify(wxSOCKET_CONNECTION_FLAG); + m_server->Notify(true); + + return true; +} + +wxTCPServer::~wxTCPServer() +{ + if ( m_server ) + { + m_server->SetClientData(NULL); + m_server->Destroy(); + } + +#ifdef __UNIX_LIKE__ + if ( !m_filename.empty() ) + { + if ( remove(m_filename.fn_str()) != 0 ) + { + wxLogDebug(wxT("Stale AF_UNIX file '%s' left."), m_filename.c_str()); + } + } +#endif // __UNIX_LIKE__ +} + +wxConnectionBase * +wxTCPServer::OnAcceptConnection(const wxString& WXUNUSED(topic)) +{ + return new wxTCPConnection(); +} + +// -------------------------------------------------------------------------- +// wxTCPConnection +// -------------------------------------------------------------------------- + +void wxTCPConnection::Init() +{ + m_sock = NULL; + m_streams = NULL; +} + +wxTCPConnection::~wxTCPConnection() +{ + Disconnect(); + + if ( m_sock ) + { + m_sock->SetClientData(NULL); + m_sock->Destroy(); + } + + delete m_streams; +} + +void wxTCPConnection::Compress(bool WXUNUSED(on)) +{ + // TODO +} + +// Calls that CLIENT can make. +bool wxTCPConnection::Disconnect() +{ + if ( !GetConnected() ) + return true; + + // Send the disconnect message to the peer. + IPCOutput(m_streams).Write8(IPC_DISCONNECT); + + if ( m_sock ) + { + m_sock->Notify(false); + m_sock->Close(); + } + + SetConnected(false); + + return true; +} + +bool wxTCPConnection::DoExecute(const void *data, + size_t size, + wxIPCFormat format) +{ + if ( !m_sock->IsConnected() ) + return false; + + // Prepare EXECUTE message + IPCOutput out(m_streams); + out.Write8(IPC_EXECUTE); + out.Write8(format); + + out.WriteData(data, size); + + return true; +} + +const void *wxTCPConnection::Request(const wxString& item, + size_t *size, + wxIPCFormat format) +{ + if ( !m_sock->IsConnected() ) + return NULL; + + IPCOutput(m_streams).Write(IPC_REQUEST, item, format); + + const int ret = m_streams->Read8(); + if ( ret != IPC_REQUEST_REPLY ) + return NULL; + + // ReadData() needs a non-NULL size pointer but the client code can call us + // with NULL pointer (this makes sense if it knows that it always works + // with NUL-terminated strings) + size_t sizeFallback; + return m_streams->ReadData(this, size ? size : &sizeFallback); +} + +bool wxTCPConnection::DoPoke(const wxString& item, + const void *data, + size_t size, + wxIPCFormat format) +{ + if ( !m_sock->IsConnected() ) + return false; + + IPCOutput out(m_streams); + out.Write(IPC_POKE, item, format); + out.WriteData(data, size); + + return true; +} + +bool wxTCPConnection::StartAdvise(const wxString& item) +{ + if ( !m_sock->IsConnected() ) + return false; + + IPCOutput(m_streams).Write(IPC_ADVISE_START, item); + + const int ret = m_streams->Read8(); + + return ret == IPC_ADVISE_START; +} + +bool wxTCPConnection::StopAdvise (const wxString& item) +{ + if ( !m_sock->IsConnected() ) + return false; + + IPCOutput(m_streams).Write(IPC_ADVISE_STOP, item); + + const int ret = m_streams->Read8(); + + return ret == IPC_ADVISE_STOP; +} + +// Calls that SERVER can make +bool wxTCPConnection::DoAdvise(const wxString& item, + const void *data, + size_t size, + wxIPCFormat format) +{ + if ( !m_sock->IsConnected() ) + return false; + + IPCOutput out(m_streams); + out.Write(IPC_ADVISE, item, format); + out.WriteData(data, size); + + return true; +} + +// -------------------------------------------------------------------------- +// wxTCPEventHandler (private class) +// -------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxTCPEventHandler, wxEvtHandler) + EVT_SOCKET(_CLIENT_ONREQUEST_ID, wxTCPEventHandler::Client_OnRequest) + EVT_SOCKET(_SERVER_ONREQUEST_ID, wxTCPEventHandler::Server_OnRequest) +END_EVENT_TABLE() + +void wxTCPEventHandler::HandleDisconnect(wxTCPConnection *connection) +{ + // connection was closed (either gracefully or not): destroy everything + connection->m_sock->Notify(false); + connection->m_sock->Close(); + + // don't leave references to this soon-to-be-dangling connection in the + // socket as it won't be destroyed immediately as its destruction will be + // delayed in case there are more events pending for it + connection->m_sock->SetClientData(NULL); + + connection->SetConnected(false); + connection->OnDisconnect(); +} + +void wxTCPEventHandler::Client_OnRequest(wxSocketEvent &event) +{ + wxSocketBase *sock = event.GetSocket(); + if (!sock) + return; + + wxSocketNotify evt = event.GetSocketEvent(); + wxTCPConnection * const + connection = static_cast(sock->GetClientData()); + + // This socket is being deleted; skip this event + if (!connection) + return; + + if ( evt == wxSOCKET_LOST ) + { + HandleDisconnect(connection); + return; + } + + // Receive message number. + wxIPCSocketStreams * const streams = connection->m_streams; + + const wxString topic = connection->m_topic; + wxString item; + + bool error = false; + + const int msg = streams->Read8(); + switch ( msg ) + { + case IPC_EXECUTE: + { + wxIPCFormat format; + size_t size wxDUMMY_INITIALIZE(0); + void * const + data = streams->ReadFormatData(connection, &format, &size); + if ( data ) + connection->OnExecute(topic, data, size, format); + else + error = true; + } + break; + + case IPC_ADVISE: + { + item = streams->ReadString(); + + wxIPCFormat format; + size_t size wxDUMMY_INITIALIZE(0); + void * const + data = streams->ReadFormatData(connection, &format, &size); + + if ( data ) + connection->OnAdvise(topic, item, data, size, format); + else + error = true; + } + break; + + case IPC_ADVISE_START: + { + item = streams->ReadString(); + + IPCOutput(streams).Write8(connection->OnStartAdvise(topic, item) + ? IPC_ADVISE_START + : IPC_FAIL); + } + break; + + case IPC_ADVISE_STOP: + { + item = streams->ReadString(); + + IPCOutput(streams).Write8(connection->OnStopAdvise(topic, item) + ? IPC_ADVISE_STOP + : IPC_FAIL); + } + break; + + case IPC_POKE: + { + item = streams->ReadString(); + wxIPCFormat format = (wxIPCFormat)streams->Read8(); + + size_t size wxDUMMY_INITIALIZE(0); + void * const data = streams->ReadData(connection, &size); + + if ( data ) + connection->OnPoke(topic, item, data, size, format); + else + error = true; + } + break; + + case IPC_REQUEST: + { + item = streams->ReadString(); + + wxIPCFormat format = (wxIPCFormat)streams->Read8(); + + size_t user_size = wxNO_LEN; + const void *user_data = connection->OnRequest(topic, + item, + &user_size, + format); + + if ( !user_data ) + { + IPCOutput(streams).Write8(IPC_FAIL); + break; + } + + IPCOutput out(streams); + out.Write8(IPC_REQUEST_REPLY); + + if ( user_size == wxNO_LEN ) + { + switch ( format ) + { + case wxIPC_TEXT: + case wxIPC_UTF8TEXT: + user_size = strlen((const char *)user_data) + 1; // includes final NUL + break; + case wxIPC_UNICODETEXT: + user_size = (wcslen((const wchar_t *)user_data) + 1) * sizeof(wchar_t); // includes final NUL + break; + default: + user_size = 0; + } + } + + out.WriteData(user_data, user_size); + } + break; + + case IPC_DISCONNECT: + HandleDisconnect(connection); + break; + + case IPC_FAIL: + wxLogDebug("Unexpected IPC_FAIL received"); + error = true; + break; + + default: + wxLogDebug("Unknown message code %d received.", msg); + error = true; + break; + } + + if ( error ) + IPCOutput(streams).Write8(IPC_FAIL); +} + +void wxTCPEventHandler::Server_OnRequest(wxSocketEvent &event) +{ + wxSocketServer *server = (wxSocketServer *) event.GetSocket(); + if (!server) + return; + wxTCPServer *ipcserv = (wxTCPServer *) server->GetClientData(); + + // This socket is being deleted; skip this event + if (!ipcserv) + return; + + if (event.GetSocketEvent() != wxSOCKET_CONNECTION) + return; + + // Accept the connection, getting a new socket + wxSocketBase *sock = server->Accept(); + if (!sock) + return; + if (!sock->IsOk()) + { + sock->Destroy(); + return; + } + + wxIPCSocketStreams *streams = new wxIPCSocketStreams(*sock); + + { + IPCOutput out(streams); + + const int msg = streams->Read8(); + if ( msg == IPC_CONNECT ) + { + const wxString topic = streams->ReadString(); + + wxTCPConnection *new_connection = + (wxTCPConnection *)ipcserv->OnAcceptConnection (topic); + + if (new_connection) + { + if (wxDynamicCast(new_connection, wxTCPConnection)) + { + // Acknowledge success + out.Write8(IPC_CONNECT); + + new_connection->m_sock = sock; + new_connection->m_streams = streams; + new_connection->m_topic = topic; + sock->SetEventHandler(wxTCPEventHandlerModule::GetHandler(), + _CLIENT_ONREQUEST_ID); + sock->SetClientData(new_connection); + sock->SetNotify(wxSOCKET_INPUT_FLAG | wxSOCKET_LOST_FLAG); + sock->Notify(true); + return; + } + else + { + delete new_connection; + // and fall through to delete everything else + } + } + } + + // Something went wrong, send failure message and delete everything + out.Write8(IPC_FAIL); + } // IPCOutput object is destroyed here, before destroying stream + + delete streams; + sock->Destroy(); +} + +#endif // wxUSE_SOCKETS && wxUSE_IPC && wxUSE_STREAMS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/sckstrm.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/sckstrm.cpp new file mode 100644 index 0000000000..8f64727d78 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/sckstrm.cpp @@ -0,0 +1,87 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/sckstrm.cpp +// Purpose: wxSocket*Stream +// Author: Guilhem Lavaux +// Modified by: +// Created: 17/07/97 +// Copyright: (c) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SOCKETS && wxUSE_STREAMS + +#include "wx/sckstrm.h" + +#ifndef WX_PRECOMP + #include "wx/stream.h" +#endif + +#include "wx/socket.h" + +// --------------------------------------------------------------------------- +// wxSocketOutputStream +// --------------------------------------------------------------------------- + +wxSocketOutputStream::wxSocketOutputStream(wxSocketBase& s) + : m_o_socket(&s) +{ +} + +wxSocketOutputStream::~wxSocketOutputStream() +{ +} + +size_t wxSocketOutputStream::OnSysWrite(const void *buffer, size_t size) +{ + const size_t ret = m_o_socket->Write(buffer, size).LastCount(); + m_lasterror = m_o_socket->Error() + ? m_o_socket->IsClosed() ? wxSTREAM_EOF + : wxSTREAM_WRITE_ERROR + : wxSTREAM_NO_ERROR; + return ret; +} + +// --------------------------------------------------------------------------- +// wxSocketInputStream +// --------------------------------------------------------------------------- + +wxSocketInputStream::wxSocketInputStream(wxSocketBase& s) + : m_i_socket(&s) +{ +} + +wxSocketInputStream::~wxSocketInputStream() +{ +} + +size_t wxSocketInputStream::OnSysRead(void *buffer, size_t size) +{ + const size_t ret = m_i_socket->Read(buffer, size).LastCount(); + m_lasterror = m_i_socket->Error() + ? m_i_socket->IsClosed() ? wxSTREAM_EOF + : wxSTREAM_READ_ERROR + : wxSTREAM_NO_ERROR; + return ret; +} + +// --------------------------------------------------------------------------- +// wxSocketStream +// --------------------------------------------------------------------------- + +wxSocketStream::wxSocketStream(wxSocketBase& s) + : wxSocketInputStream(s), wxSocketOutputStream(s) +{ +} + +wxSocketStream::~wxSocketStream() +{ +} + +#endif // wxUSE_STREAMS && wxUSE_SOCKETS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/scrolbarcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/scrolbarcmn.cpp new file mode 100644 index 0000000000..65db8fb2de --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/scrolbarcmn.cpp @@ -0,0 +1,91 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/scrolbarcmn.cpp +// Purpose: wxScrollBar common code +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SCROLLBAR + +#include "wx/scrolbar.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/settings.h" +#endif + +extern WXDLLEXPORT_DATA(const char) wxScrollBarNameStr[] = "scrollBar"; + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxScrollBarStyle ) +wxBEGIN_FLAGS( wxScrollBarStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) + + wxFLAGS_MEMBER(wxSB_HORIZONTAL) + wxFLAGS_MEMBER(wxSB_VERTICAL) +wxEND_FLAGS( wxScrollBarStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxScrollBar, wxControl, "wx/scrolbar.h") + +wxBEGIN_PROPERTIES_TABLE(wxScrollBar) + wxEVENT_RANGE_PROPERTY( Scroll, wxEVT_SCROLL_TOP, \ + wxEVT_SCROLL_CHANGED, wxScrollEvent ) + + wxPROPERTY( ThumbPosition, int, SetThumbPosition, GetThumbPosition, 0, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + wxPROPERTY( Range, int, SetRange, GetRange, 0, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + wxPROPERTY( ThumbSize, int, SetThumbSize, GetThumbSize, 0, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + wxPROPERTY( PageSize, int, SetPageSize, GetPageSize, 0, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + + wxPROPERTY_FLAGS( WindowStyle, wxScrollBarStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxScrollBar) + +wxCONSTRUCTOR_5( wxScrollBar, wxWindow*, Parent, wxWindowID, Id, \ + wxPoint, Position, wxSize, Size, long, WindowStyle ) + +#endif // wxUSE_SCROLLBAR diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/selectdispatcher.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/selectdispatcher.cpp new file mode 100644 index 0000000000..db763eca32 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/selectdispatcher.cpp @@ -0,0 +1,264 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/selectdispatcher.cpp +// Purpose: implements dispatcher for select() call +// Author: Lukasz Michalski and Vadim Zeitlin +// Created: December 2006 +// Copyright: (c) 2006 Lukasz Michalski +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SELECT_DISPATCHER + +#include "wx/private/selectdispatcher.h" +#include "wx/unix/private.h" + +#ifndef WX_PRECOMP + #include "wx/hash.h" + #include "wx/log.h" + #include "wx/intl.h" +#endif + +#include + +#define wxSelectDispatcher_Trace wxT("selectdispatcher") + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxSelectSets +// ---------------------------------------------------------------------------- + +int wxSelectSets::ms_flags[wxSelectSets::Max] = +{ + wxFDIO_INPUT, + wxFDIO_OUTPUT, + wxFDIO_EXCEPTION, +}; + +const char *wxSelectSets::ms_names[wxSelectSets::Max] = +{ + "input", + "output", + "exceptional", +}; + +wxSelectSets::Callback wxSelectSets::ms_handlers[wxSelectSets::Max] = +{ + &wxFDIOHandler::OnReadWaiting, + &wxFDIOHandler::OnWriteWaiting, + &wxFDIOHandler::OnExceptionWaiting, +}; + +wxSelectSets::wxSelectSets() +{ + for ( int n = 0; n < Max; n++ ) + { + wxFD_ZERO(&m_fds[n]); + } +} + +bool wxSelectSets::HasFD(int fd) const +{ + for ( int n = 0; n < Max; n++ ) + { + if ( wxFD_ISSET(fd, (fd_set*) &m_fds[n]) ) + return true; + } + + return false; +} + +bool wxSelectSets::SetFD(int fd, int flags) +{ + wxCHECK_MSG( fd >= 0, false, wxT("invalid descriptor") ); + + for ( int n = 0; n < Max; n++ ) + { + if ( flags & ms_flags[n] ) + { + wxFD_SET(fd, &m_fds[n]); + } + else if ( wxFD_ISSET(fd, (fd_set*) &m_fds[n]) ) + { + wxFD_CLR(fd, &m_fds[n]); + } + } + + return true; +} + +int wxSelectSets::Select(int nfds, struct timeval *tv) +{ + return select(nfds, &m_fds[Read], &m_fds[Write], &m_fds[Except], tv); +} + +bool wxSelectSets::Handle(int fd, wxFDIOHandler& handler) const +{ + for ( int n = 0; n < Max; n++ ) + { + if ( wxFD_ISSET(fd, (fd_set*) &m_fds[n]) ) + { + wxLogTrace(wxSelectDispatcher_Trace, + wxT("Got %s event on fd %d"), ms_names[n], fd); + (handler.*ms_handlers[n])(); + // callback can modify sets and destroy handler + // this forces that one event can be processed at one time + return true; + } + } + + return false; +} + +// ---------------------------------------------------------------------------- +// wxSelectDispatcher +// ---------------------------------------------------------------------------- + +bool wxSelectDispatcher::RegisterFD(int fd, wxFDIOHandler *handler, int flags) +{ + if ( !wxMappedFDIODispatcher::RegisterFD(fd, handler, flags) ) + return false; + + if ( !m_sets.SetFD(fd, flags) ) + return false; + + if ( fd > m_maxFD ) + m_maxFD = fd; + + wxLogTrace(wxSelectDispatcher_Trace, + wxT("Registered fd %d: input:%d, output:%d, exceptional:%d"), fd, (flags & wxFDIO_INPUT) == wxFDIO_INPUT, (flags & wxFDIO_OUTPUT), (flags & wxFDIO_EXCEPTION) == wxFDIO_EXCEPTION); + return true; +} + +bool wxSelectDispatcher::ModifyFD(int fd, wxFDIOHandler *handler, int flags) +{ + if ( !wxMappedFDIODispatcher::ModifyFD(fd, handler, flags) ) + return false; + + wxASSERT_MSG( fd <= m_maxFD, wxT("logic error: registered fd > m_maxFD?") ); + + wxLogTrace(wxSelectDispatcher_Trace, + wxT("Modified fd %d: input:%d, output:%d, exceptional:%d"), fd, (flags & wxFDIO_INPUT) == wxFDIO_INPUT, (flags & wxFDIO_OUTPUT) == wxFDIO_OUTPUT, (flags & wxFDIO_EXCEPTION) == wxFDIO_EXCEPTION); + return m_sets.SetFD(fd, flags); +} + +bool wxSelectDispatcher::UnregisterFD(int fd) +{ + m_sets.ClearFD(fd); + + if ( !wxMappedFDIODispatcher::UnregisterFD(fd) ) + return false; + + // remove the handler if we don't need it any more + if ( !m_sets.HasFD(fd) ) + { + if ( fd == m_maxFD ) + { + // need to find new max fd + m_maxFD = -1; + for ( wxFDIOHandlerMap::const_iterator it = m_handlers.begin(); + it != m_handlers.end(); + ++it ) + { + if ( it->first > m_maxFD ) + { + m_maxFD = it->first; + } + } + } + } + + wxLogTrace(wxSelectDispatcher_Trace, + wxT("Removed fd %d, current max: %d"), fd, m_maxFD); + return true; +} + +int wxSelectDispatcher::ProcessSets(const wxSelectSets& sets) +{ + int numEvents = 0; + for ( int fd = 0; fd <= m_maxFD; fd++ ) + { + if ( !sets.HasFD(fd) ) + continue; + + wxFDIOHandler * const handler = FindHandler(fd); + if ( !handler ) + { + wxFAIL_MSG( wxT("NULL handler in wxSelectDispatcher?") ); + continue; + } + + if ( sets.Handle(fd, *handler) ) + numEvents++; + } + + return numEvents; +} + +int wxSelectDispatcher::DoSelect(wxSelectSets& sets, int timeout) const +{ + struct timeval tv, + *ptv; + if ( timeout != TIMEOUT_INFINITE ) + { + ptv = &tv; + tv.tv_sec = timeout / 1000; + tv.tv_usec = (timeout % 1000)*1000; + } + else // no timeout + { + ptv = NULL; + } + + int ret = sets.Select(m_maxFD + 1, ptv); + + // TODO: we need to restart select() in this case but for now just return + // as if timeout expired + if ( ret == -1 && errno == EINTR ) + ret = 0; + + return ret; +} + +bool wxSelectDispatcher::HasPending() const +{ + wxSelectSets sets(m_sets); + return DoSelect(sets, 0) > 0; +} + +int wxSelectDispatcher::Dispatch(int timeout) +{ + wxSelectSets sets(m_sets); + switch ( DoSelect(sets, timeout) ) + { + case -1: + wxLogSysError(_("Failed to monitor I/O channels")); + return -1; + + case 0: + // timeout expired without anything happening + return 0; + + default: + return ProcessSets(sets); + } +} + +#endif // wxUSE_SELECT_DISPATCHER diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/settcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/settcmn.cpp new file mode 100644 index 0000000000..c9c011d5f7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/settcmn.cpp @@ -0,0 +1,68 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/settcmn.cpp +// Purpose: common (to all ports) wxWindow functions +// Author: Robert Roebling +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/settings.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" +#endif //WX_PRECOMP + +// ---------------------------------------------------------------------------- +// static data +// ---------------------------------------------------------------------------- + +wxSystemScreenType wxSystemSettings::ms_screen = wxSYS_SCREEN_NONE; + +// ---------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +wxSystemScreenType wxSystemSettings::GetScreenType() +{ + if (ms_screen == wxSYS_SCREEN_NONE) + { + // wxUniv will be used on small devices, too. + int x = GetMetric( wxSYS_SCREEN_X ); + + ms_screen = wxSYS_SCREEN_DESKTOP; + + if (x < 800) + ms_screen = wxSYS_SCREEN_SMALL; + + if (x < 640) + ms_screen = wxSYS_SCREEN_PDA; + + if (x < 200) + ms_screen = wxSYS_SCREEN_TINY; + + // This is probably a bug, but VNC seems to report 0 + if (x < 10) + ms_screen = wxSYS_SCREEN_DESKTOP; + } + + return ms_screen; +} + +void wxSystemSettings::SetScreenType( wxSystemScreenType screen ) +{ + ms_screen = screen; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/sizer.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/sizer.cpp new file mode 100644 index 0000000000..6f810e3e44 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/sizer.cpp @@ -0,0 +1,2795 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/sizer.cpp +// Purpose: provide new wxSizer class for layout +// Author: Robert Roebling and Robin Dunn, contributions by +// Dirk Holtwick, Ron Lee +// Modified by: Ron Lee +// Created: +// Copyright: (c) Robin Dunn, Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/sizer.h" +#include "wx/private/flagscheck.h" + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/math.h" + #include "wx/utils.h" + #include "wx/settings.h" + #include "wx/button.h" + #include "wx/statbox.h" + #include "wx/toplevel.h" +#endif // WX_PRECOMP + +#include "wx/display.h" +#include "wx/vector.h" +#include "wx/listimpl.cpp" + + +//--------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxSizerItem, wxObject) +IMPLEMENT_CLASS(wxSizer, wxObject) +IMPLEMENT_CLASS(wxGridSizer, wxSizer) +IMPLEMENT_CLASS(wxFlexGridSizer, wxGridSizer) +IMPLEMENT_CLASS(wxBoxSizer, wxSizer) +#if wxUSE_STATBOX +IMPLEMENT_CLASS(wxStaticBoxSizer, wxBoxSizer) +#endif +#if wxUSE_BUTTON +IMPLEMENT_CLASS(wxStdDialogButtonSizer, wxBoxSizer) +#endif + +WX_DEFINE_EXPORTED_LIST( wxSizerItemList ) + +/* + TODO PROPERTIES + sizeritem + object + object_ref + minsize + option + flag + border + spacer + option + flag + borfder + boxsizer + orient + staticboxsizer + orient + label + gridsizer + rows + cols + vgap + hgap + flexgridsizer + rows + cols + vgap + hgap + growablerows + growablecols + minsize +*/ + +// ---------------------------------------------------------------------------- +// wxSizerItem +// ---------------------------------------------------------------------------- + +// check for flags conflicts +static const int SIZER_FLAGS_MASK = + wxADD_FLAG(wxCENTRE, + wxADD_FLAG(wxHORIZONTAL, + wxADD_FLAG(wxVERTICAL, + wxADD_FLAG(wxLEFT, + wxADD_FLAG(wxRIGHT, + wxADD_FLAG(wxUP, + wxADD_FLAG(wxDOWN, + wxADD_FLAG(wxALIGN_NOT, + wxADD_FLAG(wxALIGN_CENTER_HORIZONTAL, + wxADD_FLAG(wxALIGN_RIGHT, + wxADD_FLAG(wxALIGN_BOTTOM, + wxADD_FLAG(wxALIGN_CENTER_VERTICAL, + wxADD_FLAG(wxFIXED_MINSIZE, + wxADD_FLAG(wxRESERVE_SPACE_EVEN_IF_HIDDEN, + wxADD_FLAG(wxSTRETCH_NOT, + wxADD_FLAG(wxSHRINK, + wxADD_FLAG(wxGROW, + wxADD_FLAG(wxSHAPED, + 0)))))))))))))))))); + +#define ASSERT_VALID_SIZER_FLAGS(f) wxASSERT_VALID_FLAGS(f, SIZER_FLAGS_MASK) + + +void wxSizerItem::Init(const wxSizerFlags& flags) +{ + Init(); + + m_proportion = flags.GetProportion(); + m_flag = flags.GetFlags(); + m_border = flags.GetBorderInPixels(); + + ASSERT_VALID_SIZER_FLAGS( m_flag ); +} + +wxSizerItem::wxSizerItem() +{ + Init(); + + m_proportion = 0; + m_border = 0; + m_flag = 0; + m_id = wxID_NONE; +} + +// window item +void wxSizerItem::DoSetWindow(wxWindow *window) +{ + wxCHECK_RET( window, wxT("NULL window in wxSizerItem::SetWindow()") ); + + m_kind = Item_Window; + m_window = window; + + // window doesn't become smaller than its initial size, whatever happens + m_minSize = window->GetSize(); + + if ( m_flag & wxFIXED_MINSIZE ) + window->SetMinSize(m_minSize); + + // aspect ratio calculated from initial size + SetRatio(m_minSize); +} + +wxSizerItem::wxSizerItem(wxWindow *window, + int proportion, + int flag, + int border, + wxObject* userData) + : m_kind(Item_None), + m_proportion(proportion), + m_border(border), + m_flag(flag), + m_id(wxID_NONE), + m_userData(userData) +{ + ASSERT_VALID_SIZER_FLAGS( m_flag ); + + DoSetWindow(window); +} + +// sizer item +void wxSizerItem::DoSetSizer(wxSizer *sizer) +{ + m_kind = Item_Sizer; + m_sizer = sizer; +} + +wxSizerItem::wxSizerItem(wxSizer *sizer, + int proportion, + int flag, + int border, + wxObject* userData) + : m_kind(Item_None), + m_sizer(NULL), + m_proportion(proportion), + m_border(border), + m_flag(flag), + m_id(wxID_NONE), + m_ratio(0.0), + m_userData(userData) +{ + ASSERT_VALID_SIZER_FLAGS( m_flag ); + + DoSetSizer(sizer); + + // m_minSize is set later +} + +// spacer item +void wxSizerItem::DoSetSpacer(const wxSize& size) +{ + m_kind = Item_Spacer; + m_spacer = new wxSizerSpacer(size); + m_minSize = size; + SetRatio(size); +} + +wxSize wxSizerItem::AddBorderToSize(const wxSize& size) const +{ + wxSize result = size; + + // Notice that we shouldn't modify the unspecified component(s) of the + // size, it's perfectly valid to have either min or max size specified in + // one direction only and it shouldn't be applied in the other one then. + + if ( result.x != wxDefaultCoord ) + { + if (m_flag & wxWEST) + result.x += m_border; + if (m_flag & wxEAST) + result.x += m_border; + } + + if ( result.y != wxDefaultCoord ) + { + if (m_flag & wxNORTH) + result.y += m_border; + if (m_flag & wxSOUTH) + result.y += m_border; + } + + return result; +} + +wxSizerItem::wxSizerItem(int width, + int height, + int proportion, + int flag, + int border, + wxObject* userData) + : m_kind(Item_None), + m_sizer(NULL), + m_minSize(width, height), // minimal size is the initial size + m_proportion(proportion), + m_border(border), + m_flag(flag), + m_id(wxID_NONE), + m_userData(userData) +{ + ASSERT_VALID_SIZER_FLAGS( m_flag ); + + DoSetSpacer(wxSize(width, height)); +} + +wxSizerItem::~wxSizerItem() +{ + delete m_userData; + Free(); +} + +void wxSizerItem::Free() +{ + switch ( m_kind ) + { + case Item_None: + break; + + case Item_Window: + m_window->SetContainingSizer(NULL); + break; + + case Item_Sizer: + delete m_sizer; + break; + + case Item_Spacer: + delete m_spacer; + break; + + case Item_Max: + default: + wxFAIL_MSG( wxT("unexpected wxSizerItem::m_kind") ); + } + + m_kind = Item_None; +} + +wxSize wxSizerItem::GetSpacer() const +{ + wxSize size; + if ( m_kind == Item_Spacer ) + size = m_spacer->GetSize(); + + return size; +} + + +wxSize wxSizerItem::GetSize() const +{ + wxSize ret; + switch ( m_kind ) + { + case Item_None: + break; + + case Item_Window: + ret = m_window->GetSize(); + break; + + case Item_Sizer: + ret = m_sizer->GetSize(); + break; + + case Item_Spacer: + ret = m_spacer->GetSize(); + break; + + case Item_Max: + default: + wxFAIL_MSG( wxT("unexpected wxSizerItem::m_kind") ); + } + + if (m_flag & wxWEST) + ret.x += m_border; + if (m_flag & wxEAST) + ret.x += m_border; + if (m_flag & wxNORTH) + ret.y += m_border; + if (m_flag & wxSOUTH) + ret.y += m_border; + + return ret; +} + +bool wxSizerItem::InformFirstDirection(int direction, int size, int availableOtherDir) +{ + // The size that come here will be including borders. Child items should get it + // without borders. + if( size>0 ) + { + if( direction==wxHORIZONTAL ) + { + if (m_flag & wxWEST) + size -= m_border; + if (m_flag & wxEAST) + size -= m_border; + } + else if( direction==wxVERTICAL ) + { + if (m_flag & wxNORTH) + size -= m_border; + if (m_flag & wxSOUTH) + size -= m_border; + } + } + + bool didUse = false; + // Pass the information along to the held object + if (IsSizer()) + { + didUse = GetSizer()->InformFirstDirection(direction,size,availableOtherDir); + if (didUse) + m_minSize = GetSizer()->CalcMin(); + } + else if (IsWindow()) + { + didUse = GetWindow()->InformFirstDirection(direction,size,availableOtherDir); + if (didUse) + m_minSize = m_window->GetEffectiveMinSize(); + + // This information is useful for items with wxSHAPED flag, since + // we can request an optimal min size for such an item. Even if + // we overwrite the m_minSize member here, we can read it back from + // the owned window (happens automatically). + if( (m_flag & wxSHAPED) && (m_flag & wxEXPAND) && direction ) + { + if( !wxIsNullDouble(m_ratio) ) + { + wxCHECK_MSG( (m_proportion==0), false, wxT("Shaped item, non-zero proportion in wxSizerItem::InformFirstDirection()") ); + if( direction==wxHORIZONTAL && !wxIsNullDouble(m_ratio) ) + { + // Clip size so that we don't take too much + if( availableOtherDir>=0 && int(size/m_ratio)-m_minSize.y>availableOtherDir ) + size = int((availableOtherDir+m_minSize.y)*m_ratio); + m_minSize = wxSize(size,int(size/m_ratio)); + } + else if( direction==wxVERTICAL ) + { + // Clip size so that we don't take too much + if( availableOtherDir>=0 && int(size*m_ratio)-m_minSize.x>availableOtherDir ) + size = int((availableOtherDir+m_minSize.x)/m_ratio); + m_minSize = wxSize(int(size*m_ratio),size); + } + didUse = true; + } + } + } + + return didUse; +} + +wxSize wxSizerItem::CalcMin() +{ + if (IsSizer()) + { + m_minSize = m_sizer->GetMinSize(); + + // if we have to preserve aspect ratio _AND_ this is + // the first-time calculation, consider ret to be initial size + if ( (m_flag & wxSHAPED) && wxIsNullDouble(m_ratio) ) + SetRatio(m_minSize); + } + else if ( IsWindow() ) + { + // Since the size of the window may change during runtime, we + // should use the current minimal/best size. + m_minSize = m_window->GetEffectiveMinSize(); + } + + return GetMinSizeWithBorder(); +} + +wxSize wxSizerItem::GetMinSizeWithBorder() const +{ + return AddBorderToSize(m_minSize); +} + +wxSize wxSizerItem::GetMaxSizeWithBorder() const +{ + return AddBorderToSize(GetMaxSize()); +} + +void wxSizerItem::SetDimension( const wxPoint& pos_, const wxSize& size_ ) +{ + wxPoint pos = pos_; + wxSize size = size_; + if (m_flag & wxSHAPED) + { + // adjust aspect ratio + int rwidth = (int) (size.y * m_ratio); + if (rwidth > size.x) + { + // fit horizontally + int rheight = (int) (size.x / m_ratio); + // add vertical space + if (m_flag & wxALIGN_CENTER_VERTICAL) + pos.y += (size.y - rheight) / 2; + else if (m_flag & wxALIGN_BOTTOM) + pos.y += (size.y - rheight); + // use reduced dimensions + size.y =rheight; + } + else if (rwidth < size.x) + { + // add horizontal space + if (m_flag & wxALIGN_CENTER_HORIZONTAL) + pos.x += (size.x - rwidth) / 2; + else if (m_flag & wxALIGN_RIGHT) + pos.x += (size.x - rwidth); + size.x = rwidth; + } + } + + // This is what GetPosition() returns. Since we calculate + // borders afterwards, GetPosition() will be the left/top + // corner of the surrounding border. + m_pos = pos; + + if (m_flag & wxWEST) + { + pos.x += m_border; + size.x -= m_border; + } + if (m_flag & wxEAST) + { + size.x -= m_border; + } + if (m_flag & wxNORTH) + { + pos.y += m_border; + size.y -= m_border; + } + if (m_flag & wxSOUTH) + { + size.y -= m_border; + } + + if (size.x < 0) + size.x = 0; + if (size.y < 0) + size.y = 0; + + m_rect = wxRect(pos, size); + + switch ( m_kind ) + { + case Item_None: + wxFAIL_MSG( wxT("can't set size of uninitialized sizer item") ); + break; + + case Item_Window: + { + // Use wxSIZE_FORCE_EVENT here since a sizer item might + // have changed alignment or some other property which would + // not change the size of the window. In such a case, no + // wxSizeEvent would normally be generated and thus the + // control wouldn't get laid out correctly here. +#if 1 + m_window->SetSize(pos.x, pos.y, size.x, size.y, + wxSIZE_ALLOW_MINUS_ONE|wxSIZE_FORCE_EVENT ); +#else + m_window->SetSize(pos.x, pos.y, size.x, size.y, + wxSIZE_ALLOW_MINUS_ONE ); +#endif + break; + } + case Item_Sizer: + m_sizer->SetDimension(pos, size); + break; + + case Item_Spacer: + m_spacer->SetSize(size); + break; + + case Item_Max: + default: + wxFAIL_MSG( wxT("unexpected wxSizerItem::m_kind") ); + } +} + +void wxSizerItem::DeleteWindows() +{ + switch ( m_kind ) + { + case Item_None: + case Item_Spacer: + break; + + case Item_Window: + //We are deleting the window from this sizer - normally + //the window destroys the sizer associated with it, + //which might destroy this, which we don't want + m_window->SetContainingSizer(NULL); + m_window->Destroy(); + //Putting this after the switch will result in a spacer + //not being deleted properly on destruction + m_kind = Item_None; + break; + + case Item_Sizer: + m_sizer->DeleteWindows(); + break; + + case Item_Max: + default: + wxFAIL_MSG( wxT("unexpected wxSizerItem::m_kind") ); + } + +} + +void wxSizerItem::Show( bool show ) +{ + switch ( m_kind ) + { + case Item_None: + wxFAIL_MSG( wxT("can't show uninitialized sizer item") ); + break; + + case Item_Window: + m_window->Show(show); + break; + + case Item_Sizer: + m_sizer->Show(show); + break; + + case Item_Spacer: + m_spacer->Show(show); + break; + + case Item_Max: + default: + wxFAIL_MSG( wxT("unexpected wxSizerItem::m_kind") ); + } +} + +bool wxSizerItem::IsShown() const +{ + if ( m_flag & wxRESERVE_SPACE_EVEN_IF_HIDDEN ) + return true; + + switch ( m_kind ) + { + case Item_None: + // we may be called from CalcMin(), just return false so that we're + // not used + break; + + case Item_Window: + return m_window->IsShown(); + + case Item_Sizer: + // arbitrarily decide that if at least one of our elements is + // shown, so are we (this arbitrariness is the reason for + // deprecating this function) + return m_sizer->AreAnyItemsShown(); + + case Item_Spacer: + return m_spacer->IsShown(); + + case Item_Max: + default: + wxFAIL_MSG( wxT("unexpected wxSizerItem::m_kind") ); + } + + return false; +} + +#if WXWIN_COMPATIBILITY_2_6 +void wxSizerItem::SetOption( int option ) +{ + SetProportion( option ); +} + +int wxSizerItem::GetOption() const +{ + return GetProportion(); +} +#endif // WXWIN_COMPATIBILITY_2_6 + + +//--------------------------------------------------------------------------- +// wxSizer +//--------------------------------------------------------------------------- + +wxSizer::~wxSizer() +{ + WX_CLEAR_LIST(wxSizerItemList, m_children); +} + +wxSizerItem* wxSizer::DoInsert( size_t index, wxSizerItem *item ) +{ + m_children.Insert( index, item ); + + if ( item->GetWindow() ) + item->GetWindow()->SetContainingSizer( this ); + + if ( item->GetSizer() ) + item->GetSizer()->SetContainingWindow( m_containingWindow ); + + return item; +} + +void wxSizer::SetContainingWindow(wxWindow *win) +{ + if ( win == m_containingWindow ) + return; + + m_containingWindow = win; + + // set the same window for all nested sizers as well, they also are in the + // same window + for ( wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + node; + node = node->GetNext() ) + { + wxSizerItem *const item = node->GetData(); + wxSizer *const sizer = item->GetSizer(); + + if ( sizer ) + { + sizer->SetContainingWindow(win); + } + } +} + +#if WXWIN_COMPATIBILITY_2_6 +bool wxSizer::Remove( wxWindow *window ) +{ + return Detach( window ); +} +#endif // WXWIN_COMPATIBILITY_2_6 + +bool wxSizer::Remove( wxSizer *sizer ) +{ + wxASSERT_MSG( sizer, wxT("Removing NULL sizer") ); + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetSizer() == sizer) + { + delete item; + m_children.Erase( node ); + return true; + } + + node = node->GetNext(); + } + + return false; +} + +bool wxSizer::Remove( int index ) +{ + wxCHECK_MSG( index >= 0 && (size_t)index < m_children.GetCount(), + false, + wxT("Remove index is out of range") ); + + wxSizerItemList::compatibility_iterator node = m_children.Item( index ); + + wxCHECK_MSG( node, false, wxT("Failed to find child node") ); + + delete node->GetData(); + m_children.Erase( node ); + + return true; +} + +bool wxSizer::Detach( wxSizer *sizer ) +{ + wxASSERT_MSG( sizer, wxT("Detaching NULL sizer") ); + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetSizer() == sizer) + { + item->DetachSizer(); + delete item; + m_children.Erase( node ); + return true; + } + node = node->GetNext(); + } + + return false; +} + +bool wxSizer::Detach( wxWindow *window ) +{ + wxASSERT_MSG( window, wxT("Detaching NULL window") ); + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetWindow() == window) + { + delete item; + m_children.Erase( node ); + return true; + } + node = node->GetNext(); + } + + return false; +} + +bool wxSizer::Detach( int index ) +{ + wxCHECK_MSG( index >= 0 && (size_t)index < m_children.GetCount(), + false, + wxT("Detach index is out of range") ); + + wxSizerItemList::compatibility_iterator node = m_children.Item( index ); + + wxCHECK_MSG( node, false, wxT("Failed to find child node") ); + + wxSizerItem *item = node->GetData(); + + if ( item->IsSizer() ) + item->DetachSizer(); + + delete item; + m_children.Erase( node ); + return true; +} + +bool wxSizer::Replace( wxWindow *oldwin, wxWindow *newwin, bool recursive ) +{ + wxASSERT_MSG( oldwin, wxT("Replacing NULL window") ); + wxASSERT_MSG( newwin, wxT("Replacing with NULL window") ); + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetWindow() == oldwin) + { + item->AssignWindow(newwin); + newwin->SetContainingSizer( this ); + return true; + } + else if (recursive && item->IsSizer()) + { + if (item->GetSizer()->Replace( oldwin, newwin, true )) + return true; + } + + node = node->GetNext(); + } + + return false; +} + +bool wxSizer::Replace( wxSizer *oldsz, wxSizer *newsz, bool recursive ) +{ + wxASSERT_MSG( oldsz, wxT("Replacing NULL sizer") ); + wxASSERT_MSG( newsz, wxT("Replacing with NULL sizer") ); + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetSizer() == oldsz) + { + item->AssignSizer(newsz); + return true; + } + else if (recursive && item->IsSizer()) + { + if (item->GetSizer()->Replace( oldsz, newsz, true )) + return true; + } + + node = node->GetNext(); + } + + return false; +} + +bool wxSizer::Replace( size_t old, wxSizerItem *newitem ) +{ + wxCHECK_MSG( old < m_children.GetCount(), false, wxT("Replace index is out of range") ); + wxASSERT_MSG( newitem, wxT("Replacing with NULL item") ); + + wxSizerItemList::compatibility_iterator node = m_children.Item( old ); + + wxCHECK_MSG( node, false, wxT("Failed to find child node") ); + + wxSizerItem *item = node->GetData(); + node->SetData(newitem); + + if (item->IsWindow() && item->GetWindow()) + item->GetWindow()->SetContainingSizer(NULL); + + delete item; + + return true; +} + +void wxSizer::Clear( bool delete_windows ) +{ + // First clear the ContainingSizer pointers + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->IsWindow()) + item->GetWindow()->SetContainingSizer( NULL ); + node = node->GetNext(); + } + + // Destroy the windows if needed + if (delete_windows) + DeleteWindows(); + + // Now empty the list + WX_CLEAR_LIST(wxSizerItemList, m_children); +} + +void wxSizer::DeleteWindows() +{ + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + item->DeleteWindows(); + node = node->GetNext(); + } +} + +wxSize wxSizer::ComputeFittingClientSize(wxWindow *window) +{ + wxCHECK_MSG( window, wxDefaultSize, "window can't be NULL" ); + + // take the min size by default and limit it by max size + wxSize size = GetMinClientSize(window); + wxSize sizeMax; + + wxTopLevelWindow *tlw = wxDynamicCast(window, wxTopLevelWindow); + if ( tlw ) + { + // hack for small screen devices where TLWs are always full screen + if ( tlw->IsAlwaysMaximized() ) + { + return tlw->GetClientSize(); + } + + // limit the window to the size of the display it is on + int disp = wxDisplay::GetFromWindow(window); + if ( disp == wxNOT_FOUND ) + { + // or, if we don't know which one it is, of the main one + disp = 0; + } + + sizeMax = wxDisplay(disp).GetClientArea().GetSize(); + + // If determining the display size failed, skip the max size checks as + // we really don't want to create windows of (0, 0) size. + if ( !sizeMax.x || !sizeMax.y ) + return size; + + // space for decorations and toolbars etc. + sizeMax = tlw->WindowToClientSize(sizeMax); + } + else + { + sizeMax = GetMaxClientSize(window); + } + + if ( sizeMax.x != wxDefaultCoord && size.x > sizeMax.x ) + size.x = sizeMax.x; + if ( sizeMax.y != wxDefaultCoord && size.y > sizeMax.y ) + size.y = sizeMax.y; + + return size; +} + +wxSize wxSizer::ComputeFittingWindowSize(wxWindow *window) +{ + wxCHECK_MSG( window, wxDefaultSize, "window can't be NULL" ); + + return window->ClientToWindowSize(ComputeFittingClientSize(window)); +} + +wxSize wxSizer::Fit( wxWindow *window ) +{ + wxCHECK_MSG( window, wxDefaultSize, "window can't be NULL" ); + + // set client size + window->SetClientSize(ComputeFittingClientSize(window)); + + // return entire size + return window->GetSize(); +} + +void wxSizer::FitInside( wxWindow *window ) +{ + wxSize size; + if (window->IsTopLevel()) + size = VirtualFitSize( window ); + else + size = GetMinClientSize( window ); + + window->SetVirtualSize( size ); +} + +void wxSizer::Layout() +{ + // (re)calculates minimums needed for each item and other preparations + // for layout + CalcMin(); + + // Applies the layout and repositions/resizes the items + wxWindow::ChildrenRepositioningGuard repositionGuard(m_containingWindow); + + RecalcSizes(); +} + +void wxSizer::SetSizeHints( wxWindow *window ) +{ + // Preserve the window's max size hints, but set the + // lower bound according to the sizer calculations. + + // This is equivalent to calling Fit(), except that we need to set + // the size hints _in between_ the two steps performed by Fit + // (1. ComputeFittingClientSize, 2. SetClientSize). That's because + // otherwise SetClientSize() could have no effect if there already are + // size hints in effect that forbid requested client size. + + const wxSize clientSize = ComputeFittingClientSize(window); + + window->SetMinClientSize(clientSize); + window->SetClientSize(clientSize); +} + +#if WXWIN_COMPATIBILITY_2_8 +void wxSizer::SetVirtualSizeHints( wxWindow *window ) +{ + FitInside( window ); +} +#endif // WXWIN_COMPATIBILITY_2_8 + +// TODO on mac we need a function that determines how much free space this +// min size contains, in order to make sure that we have 20 pixels of free +// space around the controls +wxSize wxSizer::GetMaxClientSize( wxWindow *window ) const +{ + return window->WindowToClientSize(window->GetMaxSize()); +} + +wxSize wxSizer::GetMinClientSize( wxWindow *WXUNUSED(window) ) +{ + return GetMinSize(); // Already returns client size. +} + +wxSize wxSizer::VirtualFitSize( wxWindow *window ) +{ + wxSize size = GetMinClientSize( window ); + wxSize sizeMax = GetMaxClientSize( window ); + + // Limit the size if sizeMax != wxDefaultSize + + if ( size.x > sizeMax.x && sizeMax.x != wxDefaultCoord ) + size.x = sizeMax.x; + if ( size.y > sizeMax.y && sizeMax.y != wxDefaultCoord ) + size.y = sizeMax.y; + + return size; +} + +wxSize wxSizer::GetMinSize() +{ + wxSize ret( CalcMin() ); + if (ret.x < m_minSize.x) ret.x = m_minSize.x; + if (ret.y < m_minSize.y) ret.y = m_minSize.y; + return ret; +} + +void wxSizer::DoSetMinSize( int width, int height ) +{ + m_minSize.x = width; + m_minSize.y = height; +} + +bool wxSizer::DoSetItemMinSize( wxWindow *window, int width, int height ) +{ + wxASSERT_MSG( window, wxT("SetMinSize for NULL window") ); + + // Is it our immediate child? + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetWindow() == window) + { + item->SetMinSize( width, height ); + return true; + } + node = node->GetNext(); + } + + // No? Search any subsizers we own then + + node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if ( item->GetSizer() && + item->GetSizer()->DoSetItemMinSize( window, width, height ) ) + { + // A child sizer found the requested windw, exit. + return true; + } + node = node->GetNext(); + } + + return false; +} + +bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height ) +{ + wxASSERT_MSG( sizer, wxT("SetMinSize for NULL sizer") ); + + // Is it our immediate child? + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetSizer() == sizer) + { + item->GetSizer()->DoSetMinSize( width, height ); + return true; + } + node = node->GetNext(); + } + + // No? Search any subsizers we own then + + node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if ( item->GetSizer() && + item->GetSizer()->DoSetItemMinSize( sizer, width, height ) ) + { + // A child found the requested sizer, exit. + return true; + } + node = node->GetNext(); + } + + return false; +} + +bool wxSizer::DoSetItemMinSize( size_t index, int width, int height ) +{ + wxSizerItemList::compatibility_iterator node = m_children.Item( index ); + + wxCHECK_MSG( node, false, wxT("Failed to find child node") ); + + wxSizerItem *item = node->GetData(); + + if (item->GetSizer()) + { + // Sizers contains the minimal size in them, if not calculated ... + item->GetSizer()->DoSetMinSize( width, height ); + } + else + { + // ... but the minimal size of spacers and windows is stored via the item + item->SetMinSize( width, height ); + } + + return true; +} + +wxSizerItem* wxSizer::GetItem( wxWindow *window, bool recursive ) +{ + wxASSERT_MSG( window, wxT("GetItem for NULL window") ); + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetWindow() == window) + { + return item; + } + else if (recursive && item->IsSizer()) + { + wxSizerItem *subitem = item->GetSizer()->GetItem( window, true ); + if (subitem) + return subitem; + } + + node = node->GetNext(); + } + + return NULL; +} + +wxSizerItem* wxSizer::GetItem( wxSizer *sizer, bool recursive ) +{ + wxASSERT_MSG( sizer, wxT("GetItem for NULL sizer") ); + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetSizer() == sizer) + { + return item; + } + else if (recursive && item->IsSizer()) + { + wxSizerItem *subitem = item->GetSizer()->GetItem( sizer, true ); + if (subitem) + return subitem; + } + + node = node->GetNext(); + } + + return NULL; +} + +wxSizerItem* wxSizer::GetItem( size_t index ) +{ + wxCHECK_MSG( index < m_children.GetCount(), + NULL, + wxT("GetItem index is out of range") ); + + return m_children.Item( index )->GetData(); +} + +wxSizerItem* wxSizer::GetItemById( int id, bool recursive ) +{ + // This gets a sizer item by the id of the sizer item + // and NOT the id of a window if the item is a window. + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetId() == id) + { + return item; + } + else if (recursive && item->IsSizer()) + { + wxSizerItem *subitem = item->GetSizer()->GetItemById( id, true ); + if (subitem) + return subitem; + } + + node = node->GetNext(); + } + + return NULL; +} + +bool wxSizer::Show( wxWindow *window, bool show, bool recursive ) +{ + wxSizerItem *item = GetItem( window, recursive ); + + if ( item ) + { + item->Show( show ); + return true; + } + + return false; +} + +bool wxSizer::Show( wxSizer *sizer, bool show, bool recursive ) +{ + wxSizerItem *item = GetItem( sizer, recursive ); + + if ( item ) + { + item->Show( show ); + return true; + } + + return false; +} + +bool wxSizer::Show( size_t index, bool show) +{ + wxSizerItem *item = GetItem( index ); + + if ( item ) + { + item->Show( show ); + return true; + } + + return false; +} + +void wxSizer::ShowItems( bool show ) +{ + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + node->GetData()->Show( show ); + node = node->GetNext(); + } +} + +bool wxSizer::AreAnyItemsShown() const +{ + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + if ( node->GetData()->IsShown() ) + return true; + node = node->GetNext(); + } + + return false; +} + +bool wxSizer::IsShown( wxWindow *window ) const +{ + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetWindow() == window) + { + return item->IsShown(); + } + node = node->GetNext(); + } + + wxFAIL_MSG( wxT("IsShown failed to find sizer item") ); + + return false; +} + +bool wxSizer::IsShown( wxSizer *sizer ) const +{ + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + + if (item->GetSizer() == sizer) + { + return item->IsShown(); + } + node = node->GetNext(); + } + + wxFAIL_MSG( wxT("IsShown failed to find sizer item") ); + + return false; +} + +bool wxSizer::IsShown( size_t index ) const +{ + wxCHECK_MSG( index < m_children.GetCount(), + false, + wxT("IsShown index is out of range") ); + + return m_children.Item( index )->GetData()->IsShown(); +} + + +//--------------------------------------------------------------------------- +// wxGridSizer +//--------------------------------------------------------------------------- + +wxGridSizer::wxGridSizer( int cols, int vgap, int hgap ) + : m_rows( cols == 0 ? 1 : 0 ), + m_cols( cols ), + m_vgap( vgap ), + m_hgap( hgap ) +{ + wxASSERT(cols >= 0); +} + +wxGridSizer::wxGridSizer( int cols, const wxSize& gap ) + : m_rows( cols == 0 ? 1 : 0 ), + m_cols( cols ), + m_vgap( gap.GetHeight() ), + m_hgap( gap.GetWidth() ) +{ + wxASSERT(cols >= 0); +} + +wxGridSizer::wxGridSizer( int rows, int cols, int vgap, int hgap ) + : m_rows( rows || cols ? rows : 1 ), + m_cols( cols ), + m_vgap( vgap ), + m_hgap( hgap ) +{ + wxASSERT(rows >= 0 && cols >= 0); +} + +wxGridSizer::wxGridSizer( int rows, int cols, const wxSize& gap ) + : m_rows( rows || cols ? rows : 1 ), + m_cols( cols ), + m_vgap( gap.GetHeight() ), + m_hgap( gap.GetWidth() ) +{ + wxASSERT(rows >= 0 && cols >= 0); +} + +wxSizerItem *wxGridSizer::DoInsert(size_t index, wxSizerItem *item) +{ + // if only the number of columns or the number of rows is specified for a + // sizer, arbitrarily many items can be added to it but if both of them are + // fixed, then the sizer can't have more than that many items -- check for + // this here to ensure that we detect errors as soon as possible + if ( m_cols && m_rows ) + { + const int nitems = m_children.GetCount(); + if ( nitems == m_cols*m_rows ) + { + wxFAIL_MSG( + wxString::Format( + "too many items (%d > %d*%d) in grid sizer (maybe you " + "should omit the number of either rows or columns?)", + nitems + 1, m_cols, m_rows) + ); + + // additionally, continuing to use the specified number of columns + // and rows is not a good idea as callers of CalcRowsCols() expect + // that all sizer items can fit into m_cols-/m_rows-sized arrays + // which is not the case if there are too many items and results in + // crashes, so let it compute the number of rows automatically by + // forgetting the (wrong) number of rows specified (this also has a + // nice side effect of giving only one assert even if there are + // many more items than allowed in this sizer) + m_rows = 0; + } + } + + return wxSizer::DoInsert(index, item); +} + +int wxGridSizer::CalcRowsCols(int& nrows, int& ncols) const +{ + const int nitems = m_children.GetCount(); + + ncols = GetEffectiveColsCount(); + nrows = GetEffectiveRowsCount(); + + // Since Insert() checks for overpopulation, the following + // should only assert if the grid was shrunk via SetRows() / SetCols() + wxASSERT_MSG( nitems <= ncols*nrows, "logic error in wxGridSizer" ); + + return nitems; +} + +void wxGridSizer::RecalcSizes() +{ + int nitems, nrows, ncols; + if ( (nitems = CalcRowsCols(nrows, ncols)) == 0 ) + return; + + wxSize sz( GetSize() ); + wxPoint pt( GetPosition() ); + + int w = (sz.x - (ncols - 1) * m_hgap) / ncols; + int h = (sz.y - (nrows - 1) * m_vgap) / nrows; + + int x = pt.x; + for (int c = 0; c < ncols; c++) + { + int y = pt.y; + for (int r = 0; r < nrows; r++) + { + int i = r * ncols + c; + if (i < nitems) + { + wxSizerItemList::compatibility_iterator node = m_children.Item( i ); + + wxASSERT_MSG( node, wxT("Failed to find SizerItemList node") ); + + SetItemBounds( node->GetData(), x, y, w, h); + } + y = y + h + m_vgap; + } + x = x + w + m_hgap; + } +} + +wxSize wxGridSizer::CalcMin() +{ + int nrows, ncols; + if ( CalcRowsCols(nrows, ncols) == 0 ) + return wxSize(); + + // Find the max width and height for any component + int w = 0; + int h = 0; + + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + while (node) + { + wxSizerItem *item = node->GetData(); + wxSize sz( item->CalcMin() ); + + w = wxMax( w, sz.x ); + h = wxMax( h, sz.y ); + + node = node->GetNext(); + } + + // In case we have a nested sizer with a two step algo , give it + // a chance to adjust to that (we give it width component) + node = m_children.GetFirst(); + bool didChangeMinSize = false; + while (node) + { + wxSizerItem *item = node->GetData(); + didChangeMinSize |= item->InformFirstDirection( wxHORIZONTAL, w, -1 ); + + node = node->GetNext(); + } + + // And redo iteration in case min size changed + if( didChangeMinSize ) + { + node = m_children.GetFirst(); + w = h = 0; + while (node) + { + wxSizerItem *item = node->GetData(); + wxSize sz( item->GetMinSizeWithBorder() ); + + w = wxMax( w, sz.x ); + h = wxMax( h, sz.y ); + + node = node->GetNext(); + } + } + + return wxSize( ncols * w + (ncols-1) * m_hgap, + nrows * h + (nrows-1) * m_vgap ); +} + +void wxGridSizer::SetItemBounds( wxSizerItem *item, int x, int y, int w, int h ) +{ + wxPoint pt( x,y ); + wxSize sz( item->GetMinSizeWithBorder() ); + int flag = item->GetFlag(); + + if ((flag & wxEXPAND) || (flag & wxSHAPED)) + { + sz = wxSize(w, h); + } + else + { + if (flag & wxALIGN_CENTER_HORIZONTAL) + { + pt.x = x + (w - sz.x) / 2; + } + else if (flag & wxALIGN_RIGHT) + { + pt.x = x + (w - sz.x); + } + + if (flag & wxALIGN_CENTER_VERTICAL) + { + pt.y = y + (h - sz.y) / 2; + } + else if (flag & wxALIGN_BOTTOM) + { + pt.y = y + (h - sz.y); + } + } + + item->SetDimension(pt, sz); +} + +//--------------------------------------------------------------------------- +// wxFlexGridSizer +//--------------------------------------------------------------------------- + +wxFlexGridSizer::wxFlexGridSizer( int cols, int vgap, int hgap ) + : wxGridSizer( cols, vgap, hgap ), + m_flexDirection(wxBOTH), + m_growMode(wxFLEX_GROWMODE_SPECIFIED) +{ +} + +wxFlexGridSizer::wxFlexGridSizer( int cols, const wxSize& gap ) + : wxGridSizer( cols, gap ), + m_flexDirection(wxBOTH), + m_growMode(wxFLEX_GROWMODE_SPECIFIED) +{ +} + +wxFlexGridSizer::wxFlexGridSizer( int rows, int cols, int vgap, int hgap ) + : wxGridSizer( rows, cols, vgap, hgap ), + m_flexDirection(wxBOTH), + m_growMode(wxFLEX_GROWMODE_SPECIFIED) +{ +} + +wxFlexGridSizer::wxFlexGridSizer( int rows, int cols, const wxSize& gap ) + : wxGridSizer( rows, cols, gap ), + m_flexDirection(wxBOTH), + m_growMode(wxFLEX_GROWMODE_SPECIFIED) +{ +} + +wxFlexGridSizer::~wxFlexGridSizer() +{ +} + +void wxFlexGridSizer::RecalcSizes() +{ + int nrows, ncols; + if ( !CalcRowsCols(nrows, ncols) ) + return; + + const wxPoint pt(GetPosition()); + const wxSize sz(GetSize()); + + AdjustForGrowables(sz); + + wxSizerItemList::const_iterator i = m_children.begin(); + const wxSizerItemList::const_iterator end = m_children.end(); + + int y = 0; + for ( int r = 0; r < nrows; r++ ) + { + if ( m_rowHeights[r] == -1 ) + { + // this row is entirely hidden, skip it + for ( int c = 0; c < ncols; c++ ) + { + if ( i == end ) + return; + + ++i; + } + + continue; + } + + const int hrow = m_rowHeights[r]; + int h = sz.y - y; // max remaining height, don't overflow it + if ( hrow < h ) + h = hrow; + + int x = 0; + for ( int c = 0; c < ncols && i != end; c++, ++i ) + { + const int wcol = m_colWidths[c]; + + if ( wcol == -1 ) + continue; + + int w = sz.x - x; // max possible value, ensure we don't overflow + if ( wcol < w ) + w = wcol; + + SetItemBounds(*i, pt.x + x, pt.y + y, w, h); + + x += wcol + m_hgap; + } + + if ( i == end ) + return; + + y += hrow + m_vgap; + } +} + +// helper function used in CalcMin() to sum up the sizes of non-hidden items +static int SumArraySizes(const wxArrayInt& sizes, int gap) +{ + // Sum total minimum size, including gaps between rows/columns. + // -1 is used as a magic number meaning empty row/column. + int total = 0; + + const size_t count = sizes.size(); + for ( size_t n = 0; n < count; n++ ) + { + if ( sizes[n] != -1 ) + { + if ( total ) + total += gap; // separate from the previous column + + total += sizes[n]; + } + } + + return total; +} + +void wxFlexGridSizer::FindWidthsAndHeights(int nrows, int ncols) +{ + // We have to recalculate the sizes in case the item minimum size has + // changed since the previous layout, or the item has been hidden using + // wxSizer::Show(). If all the items in a row/column are hidden, the final + // dimension of the row/column will be -1, indicating that the column + // itself is hidden. + m_rowHeights.assign(nrows, -1); + m_colWidths.assign(ncols, -1); + + // n is the index of the item in left-to-right top-to-bottom order + size_t n = 0; + for ( wxSizerItemList::iterator i = m_children.begin(); + i != m_children.end(); + ++i, ++n ) + { + wxSizerItem * const item = *i; + if ( item->IsShown() ) + { + // NOTE: Not doing the calculation here, this is just + // for finding max values. + const wxSize sz(item->GetMinSizeWithBorder()); + + const int row = n / ncols; + const int col = n % ncols; + + if ( sz.y > m_rowHeights[row] ) + m_rowHeights[row] = sz.y; + if ( sz.x > m_colWidths[col] ) + m_colWidths[col] = sz.x; + } + } + + AdjustForFlexDirection(); + + m_calculatedMinSize = wxSize(SumArraySizes(m_colWidths, m_hgap), + SumArraySizes(m_rowHeights, m_vgap)); +} + +wxSize wxFlexGridSizer::CalcMin() +{ + int nrows, + ncols; + + // Number of rows/columns can change as items are added or removed. + if ( !CalcRowsCols(nrows, ncols) ) + return wxSize(); + + + // We have to recalculate the sizes in case the item minimum size has + // changed since the previous layout, or the item has been hidden using + // wxSizer::Show(). If all the items in a row/column are hidden, the final + // dimension of the row/column will be -1, indicating that the column + // itself is hidden. + m_rowHeights.assign(nrows, -1); + m_colWidths.assign(ncols, -1); + + for ( wxSizerItemList::iterator i = m_children.begin(); + i != m_children.end(); + ++i) + { + wxSizerItem * const item = *i; + if ( item->IsShown() ) + { + item->CalcMin(); + } + } + + // The stage of looking for max values in each row/column has been + // made a separate function, since it's reused in AdjustForGrowables. + FindWidthsAndHeights(nrows,ncols); + + return m_calculatedMinSize; +} + +void wxFlexGridSizer::AdjustForFlexDirection() +{ + // the logic in CalcMin works when we resize flexibly in both directions + // but maybe this is not the case + if ( m_flexDirection != wxBOTH ) + { + // select the array corresponding to the direction in which we do *not* + // resize flexibly + wxArrayInt& array = m_flexDirection == wxVERTICAL ? m_colWidths + : m_rowHeights; + + const size_t count = array.GetCount(); + + // find the largest value in this array + size_t n; + int largest = 0; + + for ( n = 0; n < count; ++n ) + { + if ( array[n] > largest ) + largest = array[n]; + } + + // and now fill it with the largest value + for ( n = 0; n < count; ++n ) + { + // don't touch hidden rows + if ( array[n] != -1 ) + array[n] = largest; + } + } +} + +// helper of AdjustForGrowables() which is called for rows/columns separately +// +// parameters: +// delta: the extra space, we do nothing unless it's positive +// growable: indices or growable rows/cols in sizes array +// sizes: the height/widths of rows/cols to adjust +// proportions: proportions of the growable rows/cols or NULL if they all +// should be assumed to have proportion of 1 +static void +DoAdjustForGrowables(int delta, + const wxArrayInt& growable, + wxArrayInt& sizes, + const wxArrayInt *proportions) +{ + if ( delta <= 0 ) + return; + + // total sum of proportions of all non-hidden rows + int sum_proportions = 0; + + // number of currently shown growable rows + int num = 0; + + const int max_idx = sizes.size(); + + const size_t count = growable.size(); + size_t idx; + for ( idx = 0; idx < count; idx++ ) + { + // Since the number of rows/columns can change as items are + // inserted/deleted, we need to verify at runtime that the + // requested growable rows/columns are still valid. + if ( growable[idx] >= max_idx ) + continue; + + // If all items in a row/column are hidden, that row/column will + // have a dimension of -1. This causes the row/column to be + // hidden completely. + if ( sizes[growable[idx]] == -1 ) + continue; + + if ( proportions ) + sum_proportions += (*proportions)[idx]; + + num++; + } + + if ( !num ) + return; + + // the remaining extra free space, adjusted during each iteration + for ( idx = 0; idx < count; idx++ ) + { + if ( growable[idx] >= max_idx ) + continue; + + if ( sizes[ growable[idx] ] == -1 ) + continue; + + int cur_delta; + if ( sum_proportions == 0 ) + { + // no growable rows -- divide extra space evenly among all + cur_delta = delta/num; + num--; + } + else // allocate extra space proportionally + { + const int cur_prop = (*proportions)[idx]; + cur_delta = (delta*cur_prop)/sum_proportions; + sum_proportions -= cur_prop; + } + + sizes[growable[idx]] += cur_delta; + delta -= cur_delta; + } +} + +void wxFlexGridSizer::AdjustForGrowables(const wxSize& sz) +{ +#if wxDEBUG_LEVEL + // by the time this function is called, the sizer should be already fully + // initialized and hence the number of its columns and rows is known and we + // can check that all indices in m_growableCols/Rows are valid (see also + // comments in AddGrowableCol/Row()) + if ( !m_rows || !m_cols ) + { + if ( !m_rows ) + { + int nrows = CalcRows(); + + for ( size_t n = 0; n < m_growableRows.size(); n++ ) + { + wxASSERT_MSG( m_growableRows[n] < nrows, + "invalid growable row index" ); + } + } + + if ( !m_cols ) + { + int ncols = CalcCols(); + + for ( size_t n = 0; n < m_growableCols.size(); n++ ) + { + wxASSERT_MSG( m_growableCols[n] < ncols, + "invalid growable column index" ); + } + } + } +#endif // wxDEBUG_LEVEL + + + if ( (m_flexDirection & wxHORIZONTAL) || (m_growMode != wxFLEX_GROWMODE_NONE) ) + { + DoAdjustForGrowables + ( + sz.x - m_calculatedMinSize.x, + m_growableCols, + m_colWidths, + m_growMode == wxFLEX_GROWMODE_SPECIFIED ? &m_growableColsProportions + : NULL + ); + + // This gives nested objects that benefit from knowing one size + // component in advance the chance to use that. + bool didAdjustMinSize = false; + + // Iterate over all items and inform about column width + const int ncols = GetEffectiveColsCount(); + int col = 0; + for ( wxSizerItemList::iterator i = m_children.begin(); + i != m_children.end(); + ++i ) + { + didAdjustMinSize |= (*i)->InformFirstDirection(wxHORIZONTAL, m_colWidths[col], sz.y - m_calculatedMinSize.y); + if ( ++col == ncols ) + col = 0; + } + + // Only redo if info was actually used + if( didAdjustMinSize ) + { + DoAdjustForGrowables + ( + sz.x - m_calculatedMinSize.x, + m_growableCols, + m_colWidths, + m_growMode == wxFLEX_GROWMODE_SPECIFIED ? &m_growableColsProportions + : NULL + ); + } + } + + if ( (m_flexDirection & wxVERTICAL) || (m_growMode != wxFLEX_GROWMODE_NONE) ) + { + // pass NULL instead of proportions if the grow mode is ALL as we + // should treat all rows as having proportion of 1 then + DoAdjustForGrowables + ( + sz.y - m_calculatedMinSize.y, + m_growableRows, + m_rowHeights, + m_growMode == wxFLEX_GROWMODE_SPECIFIED ? &m_growableRowsProportions + : NULL + ); + } +} + +bool wxFlexGridSizer::IsRowGrowable( size_t idx ) +{ + return m_growableRows.Index( idx ) != wxNOT_FOUND; +} + +bool wxFlexGridSizer::IsColGrowable( size_t idx ) +{ + return m_growableCols.Index( idx ) != wxNOT_FOUND; +} + +void wxFlexGridSizer::AddGrowableRow( size_t idx, int proportion ) +{ + wxASSERT_MSG( !IsRowGrowable( idx ), + "AddGrowableRow() called for growable row" ); + + // notice that we intentionally don't check the index validity here in (the + // common) case when the number of rows was not specified in the ctor -- in + // this case it will be computed only later, when all items are added to + // the sizer, and the check will be done in AdjustForGrowables() + wxCHECK_RET( !m_rows || idx < (size_t)m_rows, "invalid row index" ); + + m_growableRows.Add( idx ); + m_growableRowsProportions.Add( proportion ); +} + +void wxFlexGridSizer::AddGrowableCol( size_t idx, int proportion ) +{ + wxASSERT_MSG( !IsColGrowable( idx ), + "AddGrowableCol() called for growable column" ); + + // see comment in AddGrowableRow(): although it's less common to omit the + // specification of the number of columns, it still can also happen + wxCHECK_RET( !m_cols || idx < (size_t)m_cols, "invalid column index" ); + + m_growableCols.Add( idx ); + m_growableColsProportions.Add( proportion ); +} + +// helper function for RemoveGrowableCol/Row() +static void +DoRemoveFromArrays(size_t idx, wxArrayInt& items, wxArrayInt& proportions) +{ + const size_t count = items.size(); + for ( size_t n = 0; n < count; n++ ) + { + if ( (size_t)items[n] == idx ) + { + items.RemoveAt(n); + proportions.RemoveAt(n); + return; + } + } + + wxFAIL_MSG( wxT("column/row is already not growable") ); +} + +void wxFlexGridSizer::RemoveGrowableCol( size_t idx ) +{ + DoRemoveFromArrays(idx, m_growableCols, m_growableColsProportions); +} + +void wxFlexGridSizer::RemoveGrowableRow( size_t idx ) +{ + DoRemoveFromArrays(idx, m_growableRows, m_growableRowsProportions); +} + +//--------------------------------------------------------------------------- +// wxBoxSizer +//--------------------------------------------------------------------------- + +wxSizerItem *wxBoxSizer::AddSpacer(int size) +{ + return IsVertical() ? Add(0, size) : Add(size, 0); +} + +namespace +{ + +/* + Helper of RecalcSizes(): checks if there is enough remaining space for the + min size of the given item and returns its min size or the entire remaining + space depending on which one is greater. + + This function updates the remaining space parameter to account for the size + effectively allocated to the item. + */ +int +GetMinOrRemainingSize(int orient, const wxSizerItem *item, int *remainingSpace_) +{ + int& remainingSpace = *remainingSpace_; + + wxCoord size; + if ( remainingSpace > 0 ) + { + const wxSize sizeMin = item->GetMinSizeWithBorder(); + size = orient == wxHORIZONTAL ? sizeMin.x : sizeMin.y; + + if ( size >= remainingSpace ) + { + // truncate the item to fit in the remaining space, this is better + // than showing it only partially in general, even if both choices + // are bad -- but there is nothing else we can do + size = remainingSpace; + } + + remainingSpace -= size; + } + else // no remaining space + { + // no space at all left, no need to even query the item for its min + // size as we can't give it to it anyhow + size = 0; + } + + return size; +} + +} // anonymous namespace + +void wxBoxSizer::RecalcSizes() +{ + if ( m_children.empty() ) + return; + + const wxCoord totalMinorSize = GetSizeInMinorDir(m_size); + const wxCoord totalMajorSize = GetSizeInMajorDir(m_size); + + // the amount of free space which we should redistribute among the + // stretchable items (i.e. those with non zero proportion) + int delta = totalMajorSize - GetSizeInMajorDir(m_minSize); + + // declare loop variables used below: + wxSizerItemList::const_iterator i; // iterator in m_children list + unsigned n = 0; // item index in majorSizes array + + + // First, inform item about the available size in minor direction as this + // can change their size in the major direction. Also compute the number of + // visible items and sum of their min sizes in major direction. + + int minMajorSize = 0; + for ( i = m_children.begin(); i != m_children.end(); ++i ) + { + wxSizerItem * const item = *i; + + if ( !item->IsShown() ) + continue; + + wxSize szMinPrev = item->GetMinSizeWithBorder(); + item->InformFirstDirection(m_orient^wxBOTH,totalMinorSize,delta); + wxSize szMin = item->GetMinSizeWithBorder(); + int deltaChange = GetSizeInMajorDir(szMin-szMinPrev); + if( deltaChange ) + { + // Since we passed available space along to the item, it should not + // take too much, so delta should not become negative. + delta -= deltaChange; + } + minMajorSize += GetSizeInMajorDir(item->GetMinSizeWithBorder()); + } + + // update our min size have changed + SizeInMajorDir(m_minSize) = minMajorSize; + + + // space and sum of proportions for the remaining items, both may change + // below + wxCoord remaining = totalMajorSize; + int totalProportion = m_totalProportion; + + // size of the (visible) items in major direction, -1 means "not fixed yet" + wxVector majorSizes(GetItemCount(), wxDefaultCoord); + + + // Check for the degenerated case when we don't have enough space for even + // the min sizes of all the items: in this case we really can't do much + // more than to allocate the min size to as many of fixed size items as + // possible (on the assumption that variable size items such as text zones + // or list boxes may use scrollbars to show their content even if their + // size is less than min size but that fixed size items such as buttons + // will suffer even more if we don't give them their min size) + if ( totalMajorSize < minMajorSize ) + { + // Second degenerated case pass: allocate min size to all fixed size + // items. + for ( i = m_children.begin(), n = 0; i != m_children.end(); ++i, ++n ) + { + wxSizerItem * const item = *i; + + if ( !item->IsShown() ) + continue; + + // deal with fixed size items only during this pass + if ( item->GetProportion() ) + continue; + + majorSizes[n] = GetMinOrRemainingSize(m_orient, item, &remaining); + } + + + // Third degenerated case pass: allocate min size to all the remaining, + // i.e. non-fixed size, items. + for ( i = m_children.begin(), n = 0; i != m_children.end(); ++i, ++n ) + { + wxSizerItem * const item = *i; + + if ( !item->IsShown() ) + continue; + + // we've already dealt with fixed size items above + if ( !item->GetProportion() ) + continue; + + majorSizes[n] = GetMinOrRemainingSize(m_orient, item, &remaining); + } + } + else // we do have enough space to give at least min sizes to all items + { + // Second and maybe more passes in the non-degenerated case: deal with + // fixed size items and items whose min size is greater than what we + // would allocate to them taking their proportion into account. For + // both of them, we will just use their min size, but for the latter we + // also need to reexamine all the items as the items which fitted + // before we adjusted their size upwards might not fit any more. This + // does make for a quadratic algorithm but it's not obvious how to + // avoid it and hopefully it's not a huge problem in practice as the + // sizers don't have many items usually (and, of course, the algorithm + // still reduces into a linear one if there is enough space for all the + // min sizes). + bool nonFixedSpaceChanged = false; + for ( i = m_children.begin(), n = 0; ; ++i, ++n ) + { + if ( nonFixedSpaceChanged ) + { + i = m_children.begin(); + n = 0; + nonFixedSpaceChanged = false; + } + + // check for the end of the loop only after the check above as + // otherwise we wouldn't do another pass if the last child resulted + // in non fixed space reduction + if ( i == m_children.end() ) + break; + + wxSizerItem * const item = *i; + + if ( !item->IsShown() ) + continue; + + // don't check the item which we had already dealt with during a + // previous pass (this is more than an optimization, the code + // wouldn't work correctly if we kept adjusting for the same item + // over and over again) + if ( majorSizes[n] != wxDefaultCoord ) + continue; + + wxCoord minMajor = GetSizeInMajorDir(item->GetMinSizeWithBorder()); + + // it doesn't make sense for min size to be negative but right now + // it's possible to create e.g. a spacer with (-1, 10) as size and + // people do it in their code apparently (see #11842) so ensure + // that we don't use this -1 as real min size as it conflicts with + // the meaning we use for it here and negative min sizes just don't + // make sense anyhow (which is why it might be a better idea to + // deal with them at wxSizerItem level in the future but for now + // this is the minimal fix for the bug) + if ( minMajor < 0 ) + minMajor = 0; + + const int propItem = item->GetProportion(); + if ( propItem ) + { + // is the desired size of this item big enough? + if ( (remaining*propItem)/totalProportion >= minMajor ) + { + // yes, it is, we'll determine the real size of this + // item later, for now just leave it as wxDefaultCoord + continue; + } + + // the proportion of this item won't count, it has + // effectively become fixed + totalProportion -= propItem; + } + + // we can already allocate space for this item + majorSizes[n] = minMajor; + + // change the amount of the space remaining to the other items, + // as this can result in not being able to satisfy their + // proportions any more we will need to redo another loop + // iteration + remaining -= minMajor; + + nonFixedSpaceChanged = true; + } + + // Similar to the previous loop, but dealing with items whose max size + // is less than what we would allocate to them taking their proportion + // into account. + nonFixedSpaceChanged = false; + for ( i = m_children.begin(), n = 0; ; ++i, ++n ) + { + if ( nonFixedSpaceChanged ) + { + i = m_children.begin(); + n = 0; + nonFixedSpaceChanged = false; + } + + // check for the end of the loop only after the check above as + // otherwise we wouldn't do another pass if the last child resulted + // in non fixed space reduction + if ( i == m_children.end() ) + break; + + wxSizerItem * const item = *i; + + if ( !item->IsShown() ) + continue; + + // don't check the item which we had already dealt with during a + // previous pass (this is more than an optimization, the code + // wouldn't work correctly if we kept adjusting for the same item + // over and over again) + if ( majorSizes[n] != wxDefaultCoord ) + continue; + + wxCoord maxMajor = GetSizeInMajorDir(item->GetMaxSizeWithBorder()); + + // must be nonzero, fixed-size items were dealt with in previous loop + const int propItem = item->GetProportion(); + + // is the desired size of this item small enough? + if ( maxMajor < 0 || + (remaining*propItem)/totalProportion <= maxMajor ) + { + // yes, it is, we'll determine the real size of this + // item later, for now just leave it as wxDefaultCoord + continue; + } + + // the proportion of this item won't count, it has + // effectively become fixed + totalProportion -= propItem; + + // we can already allocate space for this item + majorSizes[n] = maxMajor; + + // change the amount of the space remaining to the other items, + // as this can result in not being able to satisfy their + // proportions any more we will need to redo another loop + // iteration + remaining -= maxMajor; + + nonFixedSpaceChanged = true; + } + + // Last by one pass: distribute the remaining space among the non-fixed + // items whose size weren't fixed yet according to their proportions. + for ( i = m_children.begin(), n = 0; i != m_children.end(); ++i, ++n ) + { + wxSizerItem * const item = *i; + + if ( !item->IsShown() ) + continue; + + if ( majorSizes[n] == wxDefaultCoord ) + { + const int propItem = item->GetProportion(); + majorSizes[n] = (remaining*propItem)/totalProportion; + + remaining -= majorSizes[n]; + totalProportion -= propItem; + } + } + } + + + // the position at which we put the next child + wxPoint pt(m_position); + + + // Final pass: finally do position the items correctly using their sizes as + // determined above. + for ( i = m_children.begin(), n = 0; i != m_children.end(); ++i, ++n ) + { + wxSizerItem * const item = *i; + + if ( !item->IsShown() ) + continue; + + const int majorSize = majorSizes[n]; + + const wxSize sizeThis(item->GetMinSizeWithBorder()); + + // apply the alignment in the minor direction + wxPoint posChild(pt); + + wxCoord minorSize = GetSizeInMinorDir(sizeThis); + const int flag = item->GetFlag(); + if ( (flag & (wxEXPAND | wxSHAPED)) || (minorSize > totalMinorSize) ) + { + // occupy all the available space if wxEXPAND was given and also if + // the item is too big to fit -- in this case we truncate it below + // its minimal size which is bad but better than not showing parts + // of the window at all + minorSize = totalMinorSize; + + // do not allow the size in the minor direction to grow beyond the max + // size of the item in the minor direction + const wxCoord maxMinorSize = GetSizeInMinorDir(item->GetMaxSizeWithBorder()); + if ( maxMinorSize >= 0 && minorSize > maxMinorSize ) + minorSize = maxMinorSize; + } + + if ( flag & (IsVertical() ? wxALIGN_RIGHT : wxALIGN_BOTTOM) ) + { + PosInMinorDir(posChild) += totalMinorSize - minorSize; + } + // NB: wxCENTRE is used here only for backwards compatibility, + // wxALIGN_CENTRE should be used in new code + else if ( flag & (wxCENTER | (IsVertical() ? wxALIGN_CENTRE_HORIZONTAL + : wxALIGN_CENTRE_VERTICAL)) ) + { + PosInMinorDir(posChild) += (totalMinorSize - minorSize) / 2; + } + + + // apply RTL adjustment for horizontal sizers: + if ( !IsVertical() && m_containingWindow ) + { + posChild.x = m_containingWindow->AdjustForLayoutDirection + ( + posChild.x, + majorSize, + m_size.x + ); + } + + // finally set size of this child and advance to the next one + item->SetDimension(posChild, SizeFromMajorMinor(majorSize, minorSize)); + + PosInMajorDir(pt) += majorSize; + } +} + +wxSize wxBoxSizer::CalcMin() +{ + m_totalProportion = 0; + m_minSize = wxSize(0, 0); + + // The minimal size for the sizer should be big enough to allocate its + // element at least its minimal size but also, and this is the non trivial + // part, to respect the children proportion. To satisfy the latter + // condition we must find the greatest min-size-to-proportion ratio for all + // elements with non-zero proportion. + float maxMinSizeToProp = 0.; + for ( wxSizerItemList::const_iterator i = m_children.begin(); + i != m_children.end(); + ++i ) + { + wxSizerItem * const item = *i; + + if ( !item->IsShown() ) + continue; + + const wxSize sizeMinThis = item->CalcMin(); + if ( const int propThis = item->GetProportion() ) + { + float minSizeToProp = GetSizeInMajorDir(sizeMinThis); + minSizeToProp /= propThis; + + if ( minSizeToProp > maxMinSizeToProp ) + maxMinSizeToProp = minSizeToProp; + + m_totalProportion += item->GetProportion(); + } + else // fixed size item + { + // Just account for its size directly + SizeInMajorDir(m_minSize) += GetSizeInMajorDir(sizeMinThis); + } + + // In the transversal direction we just need to find the maximum. + if ( GetSizeInMinorDir(sizeMinThis) > GetSizeInMinorDir(m_minSize) ) + SizeInMinorDir(m_minSize) = GetSizeInMinorDir(sizeMinThis); + } + + // Using the max ratio ensures that the min size is big enough for all + // items to have their min size and satisfy the proportions among them. + SizeInMajorDir(m_minSize) += (int)(maxMinSizeToProp*m_totalProportion); + + return m_minSize; +} + +//--------------------------------------------------------------------------- +// wxStaticBoxSizer +//--------------------------------------------------------------------------- + +#if wxUSE_STATBOX + +wxStaticBoxSizer::wxStaticBoxSizer( wxStaticBox *box, int orient ) + : wxBoxSizer( orient ), + m_staticBox( box ) +{ + wxASSERT_MSG( box, wxT("wxStaticBoxSizer needs a static box") ); + + // do this so that our Detach() is called if the static box is destroyed + // before we are + m_staticBox->SetContainingSizer(this); +} + +wxStaticBoxSizer::wxStaticBoxSizer(int orient, wxWindow *win, const wxString& s) + : wxBoxSizer(orient), + m_staticBox(new wxStaticBox(win, wxID_ANY, s)) +{ + // same as above + m_staticBox->SetContainingSizer(this); +} + +wxStaticBoxSizer::~wxStaticBoxSizer() +{ + // As an exception to the general rule that sizers own other sizers that + // they contain but not the windows managed by them, this sizer does own + // the static box associated with it (which is not very logical but + // convenient in practice and, most importantly, can't be changed any more + // because of compatibility). However we definitely should not destroy the + // children of this static box when we're being destroyed, as this would be + // unexpected and break the existing code which worked with the windows + // created as siblings of the static box instead of its children in the + // previous wxWidgets versions, so ensure they are left alive. + + if ( m_staticBox ) + { + // Notice that we must make a copy of the list as it will be changed by + // Reparent() calls in the loop. + const wxWindowList children = m_staticBox->GetChildren(); + wxWindow* const parent = m_staticBox->GetParent(); + for ( wxWindowList::const_iterator i = children.begin(); + i != children.end(); + ++i ) + { + (*i)->Reparent(parent); + } + + delete m_staticBox; + } +} + +void wxStaticBoxSizer::RecalcSizes() +{ + int top_border, other_border; + m_staticBox->GetBordersForSizer(&top_border, &other_border); + + m_staticBox->SetSize( m_position.x, m_position.y, m_size.x, m_size.y ); + + wxSize old_size( m_size ); + m_size.x -= 2*other_border; + m_size.y -= top_border + other_border; + + wxPoint old_pos( m_position ); + if (m_staticBox->GetChildren().GetCount() > 0) + { +#if defined( __WXGTK20__ ) + // if the wxStaticBox has created a wxPizza to contain its children + // (see wxStaticBox::AddChild) then we need to place the items it contains + // in the wxBoxSizer::RecalcSizes() call below using coordinates relative + // to the top-left corner of the staticbox: + m_position.x = m_position.y = 0; +#elif defined(__WXOSX__) && wxOSX_USE_COCOA + // the distance from the 'inner' content view to the embedded controls + // this is independent of the title, therefore top_border is not relevant + m_position.x = m_position.y = 10; +#else + // if the wxStaticBox has children, then these windows must be placed + // by the wxBoxSizer::RecalcSizes() call below using coordinates relative + // to the top-left corner of the staticbox (but unlike wxGTK, we need + // to keep in count the static borders here!): + m_position.x = other_border; + m_position.y = top_border; +#endif + } + else + { + // the windows contained in the staticbox have been created as siblings of the + // staticbox (this is the "old" way of staticbox contents creation); in this + // case we need to position them with coordinates relative to our common parent + m_position.x += other_border; + m_position.y += top_border; + } + + wxBoxSizer::RecalcSizes(); + + m_position = old_pos; + m_size = old_size; +} + +wxSize wxStaticBoxSizer::CalcMin() +{ + int top_border, other_border; + m_staticBox->GetBordersForSizer(&top_border, &other_border); + + wxSize ret( wxBoxSizer::CalcMin() ); + ret.x += 2*other_border; + + // ensure that we're wide enough to show the static box label (there is no + // need to check for the static box best size in vertical direction though) + const int boxWidth = m_staticBox->GetBestSize().x; + if ( ret.x < boxWidth ) + ret.x = boxWidth; + + ret.y += other_border + top_border; + + return ret; +} + +void wxStaticBoxSizer::ShowItems( bool show ) +{ + m_staticBox->Show( show ); + wxBoxSizer::ShowItems( show ); +} + +bool wxStaticBoxSizer::AreAnyItemsShown() const +{ + // We don't need to check the status of our child items: if the box is + // shown, this sizer should be considered shown even if all its elements + // are hidden (or, more prosaically, there are no elements at all). And, + // conversely, if the box is hidden then all our items, which are its + // children, are hidden too. + return m_staticBox->IsShown(); +} + +bool wxStaticBoxSizer::Detach( wxWindow *window ) +{ + // avoid deleting m_staticBox in our dtor if it's being detached from the + // sizer (which can happen because it's being already destroyed for + // example) + if ( window == m_staticBox ) + { + m_staticBox = NULL; + return true; + } + + return wxSizer::Detach( window ); +} + +#endif // wxUSE_STATBOX + +//--------------------------------------------------------------------------- +// wxStdDialogButtonSizer +//--------------------------------------------------------------------------- + +#if wxUSE_BUTTON + +wxStdDialogButtonSizer::wxStdDialogButtonSizer() + : wxBoxSizer(wxHORIZONTAL) +{ + // Vertical buttons with lots of space on either side + // looks rubbish on WinCE, so let's not do this for now. + // If we are going to use vertical buttons, we should + // put the sizer to the right of other controls in the dialog, + // and that's beyond the scope of this sizer. +#ifndef __WXWINCE__ + bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); + // If we have a PDA screen, put yes/no button over + // all other buttons, otherwise on the left side. + if (is_pda) + m_orient = wxVERTICAL; +#endif + + m_buttonAffirmative = NULL; + m_buttonApply = NULL; + m_buttonNegative = NULL; + m_buttonCancel = NULL; + m_buttonHelp = NULL; +} + +void wxStdDialogButtonSizer::AddButton(wxButton *mybutton) +{ + switch (mybutton->GetId()) + { + case wxID_OK: + case wxID_YES: + case wxID_SAVE: + m_buttonAffirmative = mybutton; + break; + case wxID_APPLY: + m_buttonApply = mybutton; + break; + case wxID_NO: + m_buttonNegative = mybutton; + break; + case wxID_CANCEL: + case wxID_CLOSE: + m_buttonCancel = mybutton; + break; + case wxID_HELP: + case wxID_CONTEXT_HELP: + m_buttonHelp = mybutton; + break; + default: + break; + } +} + +void wxStdDialogButtonSizer::SetAffirmativeButton( wxButton *button ) +{ + m_buttonAffirmative = button; +} + +void wxStdDialogButtonSizer::SetNegativeButton( wxButton *button ) +{ + m_buttonNegative = button; +} + +void wxStdDialogButtonSizer::SetCancelButton( wxButton *button ) +{ + m_buttonCancel = button; +} + +void wxStdDialogButtonSizer::Realize() +{ +#ifdef __WXMAC__ + Add(0, 0, 0, wxLEFT, 6); + if (m_buttonHelp) + Add((wxWindow*)m_buttonHelp, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 6); + + if (m_buttonNegative){ + // HIG POLICE BULLETIN - destructive buttons need extra padding + // 24 pixels on either side + Add((wxWindow*)m_buttonNegative, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 12); + } + + // extra whitespace between help/negative and cancel/ok buttons + Add(0, 0, 1, wxEXPAND, 0); + + if (m_buttonCancel){ + Add((wxWindow*)m_buttonCancel, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 6); + // Cancel or help should be default + // m_buttonCancel->SetDefaultButton(); + } + + // Ugh, Mac doesn't really have apply dialogs, so I'll just + // figure the best place is between Cancel and OK + if (m_buttonApply) + Add((wxWindow*)m_buttonApply, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 6); + + if (m_buttonAffirmative){ + Add((wxWindow*)m_buttonAffirmative, 0, wxALIGN_CENTRE | wxLEFT, 6); + + if (m_buttonAffirmative->GetId() == wxID_SAVE){ + // these buttons have set labels under Mac so we should use them + m_buttonAffirmative->SetLabel(_("Save")); + if (m_buttonNegative) + m_buttonNegative->SetLabel(_("Don't Save")); + } + } + + // Extra space around and at the right + Add(12, 40); +#elif defined(__WXGTK20__) + // http://library.gnome.org/devel/hig-book/stable/windows-alert.html.en + // says that the correct button order is + // + // [Help] [Alternative] [Cancel] [Affirmative] + + // Flags ensuring that margins between the buttons are 6 pixels. + const wxSizerFlags + flagsBtn = wxSizerFlags().Centre().Border(wxLEFT | wxRIGHT, 3); + + // Margin around the entire sizer button should be 12. + AddSpacer(9); + + if (m_buttonHelp) + Add(m_buttonHelp, flagsBtn); + + // Align the rest of the buttons to the right. + AddStretchSpacer(); + + if (m_buttonNegative) + Add(m_buttonNegative, flagsBtn); + + if (m_buttonApply) + Add(m_buttonApply, flagsBtn); + + if (m_buttonCancel) + Add(m_buttonCancel, flagsBtn); + + if (m_buttonAffirmative) + Add(m_buttonAffirmative, flagsBtn); + + // Ensure that the right margin is 12 as well. + AddSpacer(9); +#elif defined(__WXMSW__) + // Windows + + // right-justify buttons + Add(0, 0, 1, wxEXPAND, 0); + + if (m_buttonAffirmative){ + Add((wxWindow*)m_buttonAffirmative, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, m_buttonAffirmative->ConvertDialogToPixels(wxSize(2, 0)).x); + } + + if (m_buttonNegative){ + Add((wxWindow*)m_buttonNegative, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, m_buttonNegative->ConvertDialogToPixels(wxSize(2, 0)).x); + } + + if (m_buttonCancel){ + Add((wxWindow*)m_buttonCancel, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, m_buttonCancel->ConvertDialogToPixels(wxSize(2, 0)).x); + } + if (m_buttonApply) + Add((wxWindow*)m_buttonApply, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, m_buttonApply->ConvertDialogToPixels(wxSize(2, 0)).x); + + if (m_buttonHelp) + Add((wxWindow*)m_buttonHelp, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, m_buttonHelp->ConvertDialogToPixels(wxSize(2, 0)).x); +#else + // GTK+1 and any other platform + + // Add(0, 0, 0, wxLEFT, 5); // Not sure what this was for but it unbalances the dialog + if (m_buttonHelp) + Add((wxWindow*)m_buttonHelp, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, m_buttonHelp->ConvertDialogToPixels(wxSize(4, 0)).x); + + // extra whitespace between help and cancel/ok buttons + Add(0, 0, 1, wxEXPAND, 0); + + if (m_buttonApply) + Add((wxWindow*)m_buttonApply, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, m_buttonApply->ConvertDialogToPixels(wxSize(4, 0)).x); + + if (m_buttonAffirmative){ + Add((wxWindow*)m_buttonAffirmative, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, m_buttonAffirmative->ConvertDialogToPixels(wxSize(4, 0)).x); + } + + if (m_buttonNegative){ + Add((wxWindow*)m_buttonNegative, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, m_buttonNegative->ConvertDialogToPixels(wxSize(4, 0)).x); + } + + if (m_buttonCancel){ + Add((wxWindow*)m_buttonCancel, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, m_buttonCancel->ConvertDialogToPixels(wxSize(4, 0)).x); + // Cancel or help should be default + // m_buttonCancel->SetDefaultButton(); + } + +#endif +} + +#endif // wxUSE_BUTTON diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/slidercmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/slidercmn.cpp new file mode 100644 index 0000000000..8da1506d72 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/slidercmn.cpp @@ -0,0 +1,109 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/slidercmn.cpp +// Purpose: wxSlider common code +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart 1998 +// Vadim Zeitlin 2004 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SLIDER + +#include "wx/slider.h" + +extern WXDLLEXPORT_DATA(const char) wxSliderNameStr[] = "slider"; + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxSliderStyle ) +wxBEGIN_FLAGS( wxSliderStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) + + wxFLAGS_MEMBER(wxSL_HORIZONTAL) + wxFLAGS_MEMBER(wxSL_VERTICAL) + wxFLAGS_MEMBER(wxSL_AUTOTICKS) + wxFLAGS_MEMBER(wxSL_LABELS) + wxFLAGS_MEMBER(wxSL_LEFT) + wxFLAGS_MEMBER(wxSL_TOP) + wxFLAGS_MEMBER(wxSL_RIGHT) + wxFLAGS_MEMBER(wxSL_BOTTOM) + wxFLAGS_MEMBER(wxSL_BOTH) + wxFLAGS_MEMBER(wxSL_SELRANGE) + wxFLAGS_MEMBER(wxSL_INVERSE) +wxEND_FLAGS( wxSliderStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider, wxControl, "wx/slider.h") + +wxBEGIN_PROPERTIES_TABLE(wxSlider) + wxEVENT_RANGE_PROPERTY( Scroll, wxEVT_SCROLL_TOP, wxEVT_SCROLL_CHANGED, wxScrollEvent ) + wxEVENT_PROPERTY( Updated, wxEVT_SLIDER, wxCommandEvent ) + + wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + wxPROPERTY( Minimum, int, SetMin, GetMin, 0, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + wxPROPERTY( Maximum, int, SetMax, GetMax, 0, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + wxPROPERTY( PageSize, int, SetPageSize, GetLineSize, 1, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + wxPROPERTY( LineSize, int, SetLineSize, GetLineSize, 1, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + wxPROPERTY( ThumbLength, int, SetThumbLength, GetThumbLength, 1, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + + wxPROPERTY_FLAGS( WindowStyle, wxSliderStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxSlider) + +wxCONSTRUCTOR_8( wxSlider, wxWindow*, Parent, wxWindowID, Id, int, Value, \ + int, Minimum, int, Maximum, wxPoint, Position, wxSize, Size, \ + long, WindowStyle ) + +#endif // wxUSE_SLIDER diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/socket.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/socket.cpp new file mode 100644 index 0000000000..bcb331fcc3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/socket.cpp @@ -0,0 +1,2164 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/socket.cpp +// Purpose: Socket handler classes +// Authors: Guilhem Lavaux, Guillermo Rodriguez Garcia +// Created: April 1997 +// Copyright: (C) 1999-1997, Guilhem Lavaux +// (C) 1999-2000, Guillermo Rodriguez Garcia +// (C) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ========================================================================== +// Declarations +// ========================================================================== + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SOCKETS + +#include "wx/socket.h" + +#ifndef WX_PRECOMP + #include "wx/object.h" + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/event.h" + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/timer.h" + #include "wx/module.h" +#endif + +#include "wx/apptrait.h" +#include "wx/sckaddr.h" +#include "wx/stopwatch.h" +#include "wx/thread.h" +#include "wx/evtloop.h" +#include "wx/link.h" + +#include "wx/private/fd.h" +#include "wx/private/socket.h" + +#ifdef __UNIX__ + #include +#endif + +// we use MSG_NOSIGNAL to avoid getting SIGPIPE when sending data to a remote +// host which closed the connection if it is available, otherwise we rely on +// SO_NOSIGPIPE existency +// +// this should cover all the current Unix systems (Windows never sends any +// signals anyhow) but if we find one that has neither we should explicitly +// ignore SIGPIPE for it +// OpenVMS has neither MSG_NOSIGNAL nor SO_NOSIGPIPE. However the socket sample +// seems to work. Not sure if problems will show up on OpenVMS using sockets. +#ifdef MSG_NOSIGNAL + #define wxSOCKET_MSG_NOSIGNAL MSG_NOSIGNAL +#else // MSG_NOSIGNAL not available (BSD including OS X) + // next best possibility is to use SO_NOSIGPIPE socket option, this covers + // BSD systems (including OS X) -- but if we don't have it neither (AIX and + // old HP-UX do not), we have to fall back to the old way of simply + // disabling SIGPIPE temporarily, so define a class to do it in a safe way + #if defined(__UNIX__) && !defined(SO_NOSIGPIPE) + extern "C" { typedef void (*wxSigHandler_t)(int); } + namespace + { + class IgnoreSignal + { + public: + // ctor disables the given signal + IgnoreSignal(int sig) + : m_handler(signal(sig, SIG_IGN)), + m_sig(sig) + { + } + + // dtor restores the old handler + ~IgnoreSignal() + { + signal(m_sig, m_handler); + } + + private: + const wxSigHandler_t m_handler; + const int m_sig; + + wxDECLARE_NO_COPY_CLASS(IgnoreSignal); + }; + } // anonymous namespace + + #define wxNEEDS_IGNORE_SIGPIPE + #endif // Unix without SO_NOSIGPIPE + + #define wxSOCKET_MSG_NOSIGNAL 0 +#endif + +// DLL options compatibility check: +#include "wx/build.h" +WX_CHECK_BUILD_OPTIONS("wxNet") + +// -------------------------------------------------------------------------- +// macros and constants +// -------------------------------------------------------------------------- + +// event +wxDEFINE_EVENT(wxEVT_SOCKET, wxSocketEvent); + +// discard buffer +#define MAX_DISCARD_SIZE (10 * 1024) + +#define wxTRACE_Socket wxT("wxSocket") + +// -------------------------------------------------------------------------- +// wxWin macros +// -------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxSocketBase, wxObject) +IMPLEMENT_CLASS(wxSocketServer, wxSocketBase) +IMPLEMENT_CLASS(wxSocketClient, wxSocketBase) +IMPLEMENT_CLASS(wxDatagramSocket, wxSocketBase) +IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent, wxEvent) + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +namespace +{ + +void SetTimeValFromMS(timeval& tv, unsigned long ms) +{ + tv.tv_sec = (ms / 1000); + tv.tv_usec = (ms % 1000) * 1000; +} + +} // anonymous namespace + +// -------------------------------------------------------------------------- +// private classes +// -------------------------------------------------------------------------- + +class wxSocketState : public wxObject +{ +public: + wxSocketFlags m_flags; + wxSocketEventFlags m_eventmask; + bool m_notify; + void *m_clientData; + +public: + wxSocketState() : wxObject() {} + + wxDECLARE_NO_COPY_CLASS(wxSocketState); +}; + +// wxSocketWaitModeChanger: temporarily change the socket flags affecting its +// wait mode +class wxSocketWaitModeChanger +{ +public: + // temporarily set the flags to include the flag value which may be either + // wxSOCKET_NOWAIT or wxSOCKET_WAITALL + wxSocketWaitModeChanger(wxSocketBase *socket, int flag) + : m_socket(socket), + m_oldflags(socket->GetFlags()) + + { + // We can be passed only wxSOCKET_WAITALL{_READ,_WRITE} or + // wxSOCKET_NOWAIT{_READ,_WRITE} normally. + wxASSERT_MSG( !(flag & wxSOCKET_WAITALL) || !(flag & wxSOCKET_NOWAIT), + "not a wait flag" ); + + // preserve wxSOCKET_BLOCK value when switching to wxSOCKET_WAITALL + // mode but not when switching to wxSOCKET_NOWAIT as the latter is + // incompatible with wxSOCKET_BLOCK + if ( flag != wxSOCKET_NOWAIT ) + flag |= m_oldflags & wxSOCKET_BLOCK; + + socket->SetFlags(flag); + } + + ~wxSocketWaitModeChanger() + { + m_socket->SetFlags(m_oldflags); + } + +private: + wxSocketBase * const m_socket; + const int m_oldflags; + + wxDECLARE_NO_COPY_CLASS(wxSocketWaitModeChanger); +}; + +// wxSocketRead/WriteGuard are instantiated before starting reading +// from/writing to the socket +class wxSocketReadGuard +{ +public: + wxSocketReadGuard(wxSocketBase *socket) + : m_socket(socket) + { + wxASSERT_MSG( !m_socket->m_reading, "read reentrancy?" ); + + m_socket->m_reading = true; + } + + ~wxSocketReadGuard() + { + m_socket->m_reading = false; + + // connection could have been lost while reading, in this case calling + // ReenableEvents() would assert and is not necessary anyhow + wxSocketImpl * const impl = m_socket->m_impl; + if ( impl && impl->m_fd != INVALID_SOCKET ) + impl->ReenableEvents(wxSOCKET_INPUT_FLAG); + } + +private: + wxSocketBase * const m_socket; + + wxDECLARE_NO_COPY_CLASS(wxSocketReadGuard); +}; + +class wxSocketWriteGuard +{ +public: + wxSocketWriteGuard(wxSocketBase *socket) + : m_socket(socket) + { + wxASSERT_MSG( !m_socket->m_writing, "write reentrancy?" ); + + m_socket->m_writing = true; + } + + ~wxSocketWriteGuard() + { + m_socket->m_writing = false; + + wxSocketImpl * const impl = m_socket->m_impl; + if ( impl && impl->m_fd != INVALID_SOCKET ) + impl->ReenableEvents(wxSOCKET_OUTPUT_FLAG); + } + +private: + wxSocketBase * const m_socket; + + wxDECLARE_NO_COPY_CLASS(wxSocketWriteGuard); +}; + +// ============================================================================ +// wxSocketManager +// ============================================================================ + +wxSocketManager *wxSocketManager::ms_manager = NULL; + +/* static */ +void wxSocketManager::Set(wxSocketManager *manager) +{ + wxASSERT_MSG( !ms_manager, "too late to set manager now" ); + + ms_manager = manager; +} + +/* static */ +void wxSocketManager::Init() +{ + wxASSERT_MSG( !ms_manager, "shouldn't be initialized twice" ); + + /* + Details: Initialize() creates a hidden window as a sink for socket + events, such as 'read completed'. wxMSW has only one message loop + for the main thread. If Initialize is called in a secondary thread, + the socket window will be created for the secondary thread, but + since there is no message loop on this thread, it will never + receive events and all socket operations will time out. + BTW, the main thread must not be stopped using sleep or block + on a semaphore (a bad idea in any case) or socket operations + will time out. + + On the Mac side, Initialize() stores a pointer to the CFRunLoop for + the main thread. Because secondary threads do not have run loops, + adding event notifications to the "Current" loop would have no + effect at all, events would never fire. + */ + wxASSERT_MSG( wxIsMainThread(), + "sockets must be initialized from the main thread" ); + + wxAppConsole * const app = wxAppConsole::GetInstance(); + wxCHECK_RET( app, "sockets can't be initialized without wxApp" ); + + ms_manager = app->GetTraits()->GetSocketManager(); +} + +// ========================================================================== +// wxSocketImpl +// ========================================================================== + +wxSocketImpl::wxSocketImpl(wxSocketBase& wxsocket) + : m_wxsocket(&wxsocket) +{ + m_fd = INVALID_SOCKET; + m_error = wxSOCKET_NOERROR; + m_server = false; + m_stream = true; + + SetTimeout(wxsocket.GetTimeout() * 1000); + + m_establishing = false; + m_reusable = false; + m_broadcast = false; + m_dobind = true; + m_initialRecvBufferSize = -1; + m_initialSendBufferSize = -1; +} + +wxSocketImpl::~wxSocketImpl() +{ + if ( m_fd != INVALID_SOCKET ) + Shutdown(); +} + +bool wxSocketImpl::PreCreateCheck(const wxSockAddressImpl& addr) +{ + if ( m_fd != INVALID_SOCKET ) + { + m_error = wxSOCKET_INVSOCK; + return false; + } + + if ( !addr.IsOk() ) + { + m_error = wxSOCKET_INVADDR; + return false; + } + + return true; +} + +void wxSocketImpl::PostCreation() +{ + // FreeBSD variants can't use MSG_NOSIGNAL, and instead use a socket option +#ifdef SO_NOSIGPIPE + EnableSocketOption(SO_NOSIGPIPE); +#endif + + if ( m_reusable ) + EnableSocketOption(SO_REUSEADDR); + + if ( m_broadcast ) + { + wxASSERT_MSG( !m_stream, "broadcasting is for datagram sockets only" ); + + EnableSocketOption(SO_BROADCAST); + } + + if ( m_initialRecvBufferSize >= 0 ) + SetSocketOption(SO_RCVBUF, m_initialRecvBufferSize); + if ( m_initialSendBufferSize >= 0 ) + SetSocketOption(SO_SNDBUF, m_initialSendBufferSize); + + // we always put our sockets in unblocked mode and handle blocking + // ourselves in DoRead/Write() if wxSOCKET_WAITALL is specified + UnblockAndRegisterWithEventLoop(); +} + +wxSocketError wxSocketImpl::UpdateLocalAddress() +{ + if ( !m_local.IsOk() ) + { + // ensure that we have a valid object using the correct family: correct + // being the same one as our peer uses as we have no other way to + // determine it + m_local.Create(m_peer.GetFamily()); + } + + WX_SOCKLEN_T lenAddr = m_local.GetLen(); + if ( getsockname(m_fd, m_local.GetWritableAddr(), &lenAddr) != 0 ) + { + Close(); + m_error = wxSOCKET_IOERR; + return m_error; + } + + return wxSOCKET_NOERROR; +} + +wxSocketError wxSocketImpl::CreateServer() +{ + if ( !PreCreateCheck(m_local) ) + return m_error; + + m_server = true; + m_stream = true; + + // do create the socket + m_fd = socket(m_local.GetFamily(), SOCK_STREAM, 0); + + if ( m_fd == INVALID_SOCKET ) + { + m_error = wxSOCKET_IOERR; + return wxSOCKET_IOERR; + } + + PostCreation(); + + // and then bind to and listen on it + // + // FIXME: should we test for m_dobind here? + if ( bind(m_fd, m_local.GetAddr(), m_local.GetLen()) != 0 ) + m_error = wxSOCKET_IOERR; + + if ( IsOk() ) + { + if ( listen(m_fd, 5) != 0 ) + m_error = wxSOCKET_IOERR; + } + + if ( !IsOk() ) + { + Close(); + return m_error; + } + + // finally retrieve the address we effectively bound to + return UpdateLocalAddress(); +} + +wxSocketError wxSocketImpl::CreateClient(bool wait) +{ + if ( !PreCreateCheck(m_peer) ) + return m_error; + + m_fd = socket(m_peer.GetFamily(), SOCK_STREAM, 0); + + if ( m_fd == INVALID_SOCKET ) + { + m_error = wxSOCKET_IOERR; + return wxSOCKET_IOERR; + } + + PostCreation(); + + // If a local address has been set, then bind to it before calling connect + if ( m_local.IsOk() ) + { + if ( bind(m_fd, m_local.GetAddr(), m_local.GetLen()) != 0 ) + { + Close(); + m_error = wxSOCKET_IOERR; + return m_error; + } + } + + // Do connect now + int rc = connect(m_fd, m_peer.GetAddr(), m_peer.GetLen()); + if ( rc == SOCKET_ERROR ) + { + wxSocketError err = GetLastError(); + if ( err == wxSOCKET_WOULDBLOCK ) + { + m_establishing = true; + + // block waiting for connection if we should (otherwise just return + // wxSOCKET_WOULDBLOCK to the caller) + if ( wait ) + { + err = SelectWithTimeout(wxSOCKET_CONNECTION_FLAG) + ? wxSOCKET_NOERROR + : wxSOCKET_TIMEDOUT; + m_establishing = false; + } + } + + m_error = err; + } + else // connected + { + m_error = wxSOCKET_NOERROR; + } + + return m_error; +} + + +wxSocketError wxSocketImpl::CreateUDP() +{ + if ( !PreCreateCheck(m_local) ) + return m_error; + + m_stream = false; + m_server = false; + + m_fd = socket(m_local.GetFamily(), SOCK_DGRAM, 0); + + if ( m_fd == INVALID_SOCKET ) + { + m_error = wxSOCKET_IOERR; + return wxSOCKET_IOERR; + } + + PostCreation(); + + if ( m_dobind ) + { + if ( bind(m_fd, m_local.GetAddr(), m_local.GetLen()) != 0 ) + { + Close(); + m_error = wxSOCKET_IOERR; + return m_error; + } + + return UpdateLocalAddress(); + } + + return wxSOCKET_NOERROR; +} + +wxSocketImpl *wxSocketImpl::Accept(wxSocketBase& wxsocket) +{ + wxSockAddressStorage from; + WX_SOCKLEN_T fromlen = sizeof(from); + const wxSOCKET_T fd = accept(m_fd, &from.addr, &fromlen); + + // accepting is similar to reading in the sense that it resets "ready for + // read" flag on the socket + ReenableEvents(wxSOCKET_INPUT_FLAG); + + if ( fd == INVALID_SOCKET ) + return NULL; + + wxSocketManager * const manager = wxSocketManager::Get(); + if ( !manager ) + return NULL; + + wxSocketImpl * const sock = manager->CreateSocket(wxsocket); + if ( !sock ) + return NULL; + + sock->m_fd = fd; + sock->m_peer = wxSockAddressImpl(from.addr, fromlen); + + sock->UnblockAndRegisterWithEventLoop(); + + return sock; +} + + +void wxSocketImpl::Close() +{ + if ( m_fd != INVALID_SOCKET ) + { + DoClose(); + m_fd = INVALID_SOCKET; + } +} + +void wxSocketImpl::Shutdown() +{ + if ( m_fd != INVALID_SOCKET ) + { + shutdown(m_fd, 1 /* SD_SEND */); + Close(); + } +} + +/* + * Sets the timeout for blocking calls. Time is expressed in + * milliseconds. + */ +void wxSocketImpl::SetTimeout(unsigned long millis) +{ + SetTimeValFromMS(m_timeout, millis); +} + +void wxSocketImpl::NotifyOnStateChange(wxSocketNotify event) +{ + m_wxsocket->OnRequest(event); +} + +/* Address handling */ +wxSocketError wxSocketImpl::SetLocal(const wxSockAddressImpl& local) +{ + /* the socket must be initialized, or it must be a server */ + if (m_fd != INVALID_SOCKET && !m_server) + { + m_error = wxSOCKET_INVSOCK; + return wxSOCKET_INVSOCK; + } + + if ( !local.IsOk() ) + { + m_error = wxSOCKET_INVADDR; + return wxSOCKET_INVADDR; + } + + m_local = local; + + return wxSOCKET_NOERROR; +} + +wxSocketError wxSocketImpl::SetPeer(const wxSockAddressImpl& peer) +{ + if ( !peer.IsOk() ) + { + m_error = wxSOCKET_INVADDR; + return wxSOCKET_INVADDR; + } + + m_peer = peer; + + return wxSOCKET_NOERROR; +} + +const wxSockAddressImpl& wxSocketImpl::GetLocal() +{ + if ( !m_local.IsOk() ) + UpdateLocalAddress(); + + return m_local; +} + +// ---------------------------------------------------------------------------- +// wxSocketImpl IO +// ---------------------------------------------------------------------------- + +// this macro wraps the given expression (normally a syscall) in a loop which +// ignores any interruptions, i.e. reevaluates it again if it failed and errno +// is EINTR +#ifdef __UNIX__ + #define DO_WHILE_EINTR( rc, syscall ) \ + do { \ + rc = (syscall); \ + } \ + while ( rc == -1 && errno == EINTR ) +#else + #define DO_WHILE_EINTR( rc, syscall ) rc = (syscall) +#endif + +int wxSocketImpl::RecvStream(void *buffer, int size) +{ + int ret; + DO_WHILE_EINTR( ret, recv(m_fd, static_cast(buffer), size, 0) ); + + if ( !ret ) + { + // receiving 0 bytes for a TCP socket indicates that the connection was + // closed by peer so shut down our end as well (for UDP sockets empty + // datagrams are also possible) + m_establishing = false; + NotifyOnStateChange(wxSOCKET_LOST); + + Shutdown(); + + // do not return an error in this case however + } + + return ret; +} + +int wxSocketImpl::SendStream(const void *buffer, int size) +{ +#ifdef wxNEEDS_IGNORE_SIGPIPE + IgnoreSignal ignore(SIGPIPE); +#endif + + int ret; + DO_WHILE_EINTR( ret, send(m_fd, static_cast(buffer), size, + wxSOCKET_MSG_NOSIGNAL) ); + + return ret; +} + +int wxSocketImpl::RecvDgram(void *buffer, int size) +{ + wxSockAddressStorage from; + WX_SOCKLEN_T fromlen = sizeof(from); + + int ret; + DO_WHILE_EINTR( ret, recvfrom(m_fd, static_cast(buffer), size, + 0, &from.addr, &fromlen) ); + + if ( ret == SOCKET_ERROR ) + return SOCKET_ERROR; + + m_peer = wxSockAddressImpl(from.addr, fromlen); + if ( !m_peer.IsOk() ) + return -1; + + return ret; +} + +int wxSocketImpl::SendDgram(const void *buffer, int size) +{ + if ( !m_peer.IsOk() ) + { + m_error = wxSOCKET_INVADDR; + return -1; + } + + int ret; + DO_WHILE_EINTR( ret, sendto(m_fd, static_cast(buffer), size, + 0, m_peer.GetAddr(), m_peer.GetLen()) ); + + return ret; +} + +int wxSocketImpl::Read(void *buffer, int size) +{ + // server sockets can't be used for IO, only to accept new connections + if ( m_fd == INVALID_SOCKET || m_server ) + { + m_error = wxSOCKET_INVSOCK; + return -1; + } + + int ret = m_stream ? RecvStream(buffer, size) + : RecvDgram(buffer, size); + + m_error = ret == SOCKET_ERROR ? GetLastError() : wxSOCKET_NOERROR; + + return ret; +} + +int wxSocketImpl::Write(const void *buffer, int size) +{ + if ( m_fd == INVALID_SOCKET || m_server ) + { + m_error = wxSOCKET_INVSOCK; + return -1; + } + + int ret = m_stream ? SendStream(buffer, size) + : SendDgram(buffer, size); + + m_error = ret == SOCKET_ERROR ? GetLastError() : wxSOCKET_NOERROR; + + return ret; +} + +// ========================================================================== +// wxSocketBase +// ========================================================================== + +// -------------------------------------------------------------------------- +// Initialization and shutdown +// -------------------------------------------------------------------------- + +namespace +{ + +// counts the number of calls to Initialize() minus the number of calls to +// Shutdown(): we don't really need it any more but it was documented that +// Shutdown() must be called the same number of times as Initialize() and using +// a counter helps us to check it +int gs_socketInitCount = 0; + +} // anonymous namespace + +bool wxSocketBase::IsInitialized() +{ + wxASSERT_MSG( wxIsMainThread(), "unsafe to call from other threads" ); + + return gs_socketInitCount != 0; +} + +bool wxSocketBase::Initialize() +{ + wxCHECK_MSG( wxIsMainThread(), false, + "must be called from the main thread" ); + + if ( !gs_socketInitCount ) + { + wxSocketManager * const manager = wxSocketManager::Get(); + if ( !manager || !manager->OnInit() ) + return false; + } + + gs_socketInitCount++; + + return true; +} + +void wxSocketBase::Shutdown() +{ + wxCHECK_RET( wxIsMainThread(), "must be called from the main thread" ); + + wxCHECK_RET( gs_socketInitCount > 0, "too many calls to Shutdown()" ); + + if ( !--gs_socketInitCount ) + { + wxSocketManager * const manager = wxSocketManager::Get(); + wxCHECK_RET( manager, "should have a socket manager" ); + + manager->OnExit(); + } +} + +// -------------------------------------------------------------------------- +// Ctor and dtor +// -------------------------------------------------------------------------- + +void wxSocketBase::Init() +{ + m_impl = NULL; + m_type = wxSOCKET_UNINIT; + + // state + m_flags = 0; + m_connected = + m_establishing = + m_reading = + m_writing = + m_closed = false; + m_lcount = 0; + m_lcount_read = 0; + m_lcount_write = 0; + m_timeout = 600; + m_beingDeleted = false; + + // pushback buffer + m_unread = NULL; + m_unrd_size = 0; + m_unrd_cur = 0; + + // events + m_id = wxID_ANY; + m_handler = NULL; + m_clientData = NULL; + m_notify = false; + m_eventmask = + m_eventsgot = 0; + + // when we create the first socket in the main thread we initialize the + // OS-dependent socket stuff: notice that this means that the user code + // needs to call wxSocket::Initialize() itself if the first socket it + // creates is not created in the main thread + if ( wxIsMainThread() ) + { + if ( !Initialize() ) + { + wxLogError(_("Cannot initialize sockets")); + } + } +} + +wxSocketBase::wxSocketBase() +{ + Init(); +} + +wxSocketBase::wxSocketBase(wxSocketFlags flags, wxSocketType type) +{ + Init(); + + SetFlags(flags); + + m_type = type; +} + +wxSocketBase::~wxSocketBase() +{ + // Shutdown and close the socket + if (!m_beingDeleted) + Close(); + + // Destroy the implementation object + delete m_impl; + + // Free the pushback buffer + free(m_unread); +} + +bool wxSocketBase::Destroy() +{ + // Delayed destruction: the socket will be deleted during the next idle + // loop iteration. This ensures that all pending events have been + // processed. + m_beingDeleted = true; + + // Shutdown and close the socket + Close(); + + // Suppress events from now on + Notify(false); + + // Schedule this object for deletion instead of destroying it right now if + // it can have other events pending for it and we have a way to do it. + // + // Notice that sockets used in other threads won't have any events for them + // and we shouldn't use delayed destruction mechanism for them as it's not + // MT-safe. + if ( wxIsMainThread() && wxTheApp ) + { + wxTheApp->ScheduleForDestruction(this); + } + else // no app + { + // in wxBase we might have no app object at all, don't leak memory + delete this; + } + + return true; +} + +// ---------------------------------------------------------------------------- +// simple accessors +// ---------------------------------------------------------------------------- + +void wxSocketBase::SetError(wxSocketError error) +{ + m_impl->m_error = error; +} + +wxSocketError wxSocketBase::LastError() const +{ + return m_impl->GetError(); +} + +// -------------------------------------------------------------------------- +// Basic IO calls +// -------------------------------------------------------------------------- + +// The following IO operations update m_lcount: +// {Read, Write, ReadMsg, WriteMsg, Peek, Unread, Discard} +bool wxSocketBase::Close() +{ + // Interrupt pending waits + InterruptWait(); + + ShutdownOutput(); + + m_connected = false; + m_establishing = false; + return true; +} + +void wxSocketBase::ShutdownOutput() +{ + if ( m_impl ) + m_impl->Shutdown(); +} + +wxSocketBase& wxSocketBase::Read(void* buffer, wxUint32 nbytes) +{ + wxSocketReadGuard read(this); + + m_lcount_read = DoRead(buffer, nbytes); + m_lcount = m_lcount_read; + + return *this; +} + +wxUint32 wxSocketBase::DoRead(void* buffer_, wxUint32 nbytes) +{ + wxCHECK_MSG( m_impl, 0, "socket must be valid" ); + + // We use pointer arithmetic here which doesn't work with void pointers. + char *buffer = static_cast(buffer_); + wxCHECK_MSG( buffer, 0, "NULL buffer" ); + + // Try the push back buffer first, even before checking whether the socket + // is valid to allow reading previously pushed back data from an already + // closed socket. + wxUint32 total = GetPushback(buffer, nbytes, false); + nbytes -= total; + buffer += total; + + while ( nbytes ) + { + // our socket is non-blocking so Read() will return immediately if + // there is nothing to read yet and it's more efficient to try it first + // before entering DoWait() which is going to start dispatching GUI + // events and, even more importantly, we must do this under Windows + // where we're not going to get notifications about socket being ready + // for reading before we read all the existing data from it + const int ret = !m_impl->m_stream || m_connected + ? m_impl->Read(buffer, nbytes) + : 0; + if ( ret == -1 ) + { + if ( m_impl->GetLastError() == wxSOCKET_WOULDBLOCK ) + { + // if we don't want to wait, just return immediately + if ( m_flags & wxSOCKET_NOWAIT_READ ) + { + // this shouldn't be counted as an error in this case + SetError(wxSOCKET_NOERROR); + break; + } + + // otherwise wait until the socket becomes ready for reading or + // an error occurs on it + if ( !DoWaitWithTimeout(wxSOCKET_INPUT_FLAG) ) + { + // and exit if the timeout elapsed before it did + SetError(wxSOCKET_TIMEDOUT); + break; + } + + // retry reading + continue; + } + else // "real" error + { + SetError(wxSOCKET_IOERR); + break; + } + } + else if ( ret == 0 ) + { + // for connection-oriented (e.g. TCP) sockets we can only read + // 0 bytes if the other end has been closed, and for connectionless + // ones (UDP) this flag doesn't make sense anyhow so we can set it + // to true too without doing any harm + m_closed = true; + + // we're not going to read anything else and so if we haven't read + // anything (or not everything in wxSOCKET_WAITALL case) already, + // signal an error + if ( (m_flags & wxSOCKET_WAITALL_READ) || !total ) + SetError(wxSOCKET_IOERR); + break; + } + + total += ret; + + // if we are happy to read something and not the entire nbytes bytes, + // then we're done + if ( !(m_flags & wxSOCKET_WAITALL_READ) ) + break; + + nbytes -= ret; + buffer += ret; + } + + return total; +} + +wxSocketBase& wxSocketBase::ReadMsg(void* buffer, wxUint32 nbytes) +{ + struct + { + unsigned char sig[4]; + unsigned char len[4]; + } msg; + + wxSocketReadGuard read(this); + + wxSocketWaitModeChanger changeFlags(this, wxSOCKET_WAITALL_READ); + + bool ok = false; + if ( DoRead(&msg, sizeof(msg)) == sizeof(msg) ) + { + wxUint32 sig = (wxUint32)msg.sig[0]; + sig |= (wxUint32)(msg.sig[1] << 8); + sig |= (wxUint32)(msg.sig[2] << 16); + sig |= (wxUint32)(msg.sig[3] << 24); + + if ( sig == 0xfeeddead ) + { + wxUint32 len = (wxUint32)msg.len[0]; + len |= (wxUint32)(msg.len[1] << 8); + len |= (wxUint32)(msg.len[2] << 16); + len |= (wxUint32)(msg.len[3] << 24); + + wxUint32 len2; + if (len > nbytes) + { + len2 = len - nbytes; + len = nbytes; + } + else + len2 = 0; + + // Don't attempt to read if the msg was zero bytes long. + m_lcount_read = len ? DoRead(buffer, len) : 0; + m_lcount = m_lcount_read; + + if ( len2 ) + { + char discard_buffer[MAX_DISCARD_SIZE]; + long discard_len; + + // NOTE: discarded bytes don't add to m_lcount. + do + { + discard_len = len2 > MAX_DISCARD_SIZE + ? MAX_DISCARD_SIZE + : len2; + discard_len = DoRead(discard_buffer, (wxUint32)discard_len); + len2 -= (wxUint32)discard_len; + } + while ((discard_len > 0) && len2); + } + + if ( !len2 && DoRead(&msg, sizeof(msg)) == sizeof(msg) ) + { + sig = (wxUint32)msg.sig[0]; + sig |= (wxUint32)(msg.sig[1] << 8); + sig |= (wxUint32)(msg.sig[2] << 16); + sig |= (wxUint32)(msg.sig[3] << 24); + + if ( sig == 0xdeadfeed ) + ok = true; + } + } + } + + if ( !ok ) + SetError(wxSOCKET_IOERR); + + return *this; +} + +wxSocketBase& wxSocketBase::Peek(void* buffer, wxUint32 nbytes) +{ + wxSocketReadGuard read(this); + + // Peek() should never block + wxSocketWaitModeChanger changeFlags(this, wxSOCKET_NOWAIT); + + m_lcount = DoRead(buffer, nbytes); + + Pushback(buffer, m_lcount); + + return *this; +} + +wxSocketBase& wxSocketBase::Write(const void *buffer, wxUint32 nbytes) +{ + wxSocketWriteGuard write(this); + + m_lcount_write = DoWrite(buffer, nbytes); + m_lcount = m_lcount_write; + + return *this; +} + +// This function is a mirror image of DoRead() except that it doesn't use the +// push back buffer and doesn't treat 0 return value specially (normally this +// shouldn't happen at all here), so please see comments there for explanations +wxUint32 wxSocketBase::DoWrite(const void *buffer_, wxUint32 nbytes) +{ + wxCHECK_MSG( m_impl, 0, "socket must be valid" ); + + const char *buffer = static_cast(buffer_); + wxCHECK_MSG( buffer, 0, "NULL buffer" ); + + wxUint32 total = 0; + while ( nbytes ) + { + if ( m_impl->m_stream && !m_connected ) + { + if ( (m_flags & wxSOCKET_WAITALL_WRITE) || !total ) + SetError(wxSOCKET_IOERR); + break; + } + + const int ret = m_impl->Write(buffer, nbytes); + if ( ret == -1 ) + { + if ( m_impl->GetLastError() == wxSOCKET_WOULDBLOCK ) + { + if ( m_flags & wxSOCKET_NOWAIT_WRITE ) + break; + + if ( !DoWaitWithTimeout(wxSOCKET_OUTPUT_FLAG) ) + { + SetError(wxSOCKET_TIMEDOUT); + break; + } + + continue; + } + else // "real" error + { + SetError(wxSOCKET_IOERR); + break; + } + } + + total += ret; + + if ( !(m_flags & wxSOCKET_WAITALL_WRITE) ) + break; + + nbytes -= ret; + buffer += ret; + } + + return total; +} + +wxSocketBase& wxSocketBase::WriteMsg(const void *buffer, wxUint32 nbytes) +{ + struct + { + unsigned char sig[4]; + unsigned char len[4]; + } msg; + + wxSocketWriteGuard write(this); + + wxSocketWaitModeChanger changeFlags(this, wxSOCKET_WAITALL_WRITE); + + msg.sig[0] = (unsigned char) 0xad; + msg.sig[1] = (unsigned char) 0xde; + msg.sig[2] = (unsigned char) 0xed; + msg.sig[3] = (unsigned char) 0xfe; + + msg.len[0] = (unsigned char) (nbytes & 0xff); + msg.len[1] = (unsigned char) ((nbytes >> 8) & 0xff); + msg.len[2] = (unsigned char) ((nbytes >> 16) & 0xff); + msg.len[3] = (unsigned char) ((nbytes >> 24) & 0xff); + + bool ok = false; + if ( DoWrite(&msg, sizeof(msg)) == sizeof(msg) ) + { + m_lcount_write = DoWrite(buffer, nbytes); + m_lcount = m_lcount_write; + if ( m_lcount_write == nbytes ) + { + msg.sig[0] = (unsigned char) 0xed; + msg.sig[1] = (unsigned char) 0xfe; + msg.sig[2] = (unsigned char) 0xad; + msg.sig[3] = (unsigned char) 0xde; + msg.len[0] = + msg.len[1] = + msg.len[2] = + msg.len[3] = (char) 0; + + if ( DoWrite(&msg, sizeof(msg)) == sizeof(msg)) + ok = true; + } + } + + if ( !ok ) + SetError(wxSOCKET_IOERR); + + return *this; +} + +wxSocketBase& wxSocketBase::Unread(const void *buffer, wxUint32 nbytes) +{ + if (nbytes != 0) + Pushback(buffer, nbytes); + + SetError(wxSOCKET_NOERROR); + m_lcount = nbytes; + + return *this; +} + +wxSocketBase& wxSocketBase::Discard() +{ + char *buffer = new char[MAX_DISCARD_SIZE]; + wxUint32 ret; + wxUint32 total = 0; + + wxSocketReadGuard read(this); + + wxSocketWaitModeChanger changeFlags(this, wxSOCKET_NOWAIT); + + do + { + ret = DoRead(buffer, MAX_DISCARD_SIZE); + total += ret; + } + while (ret == MAX_DISCARD_SIZE); + + delete[] buffer; + m_lcount = total; + SetError(wxSOCKET_NOERROR); + + return *this; +} + +// -------------------------------------------------------------------------- +// Wait functions +// -------------------------------------------------------------------------- + +/* + This function will check for the events specified in the flags parameter, + and it will return a mask indicating which operations can be performed. + */ +wxSocketEventFlags wxSocketImpl::Select(wxSocketEventFlags flags, + const timeval *timeout) +{ + if ( m_fd == INVALID_SOCKET ) + return (wxSOCKET_LOST_FLAG & flags); + + struct timeval tv; + if ( timeout ) + tv = *timeout; + else + tv.tv_sec = tv.tv_usec = 0; + + // prepare the FD sets, passing NULL for the one(s) we don't use + fd_set + readfds, *preadfds = NULL, + writefds, *pwritefds = NULL, + exceptfds; // always want to know about errors + + if ( flags & wxSOCKET_INPUT_FLAG ) + preadfds = &readfds; + + if ( flags & wxSOCKET_OUTPUT_FLAG ) + pwritefds = &writefds; + + // When using non-blocking connect() the client socket becomes connected + // (successfully or not) when it becomes writable but when using + // non-blocking accept() the server socket becomes connected when it + // becomes readable. + if ( flags & wxSOCKET_CONNECTION_FLAG ) + { + if ( m_server ) + preadfds = &readfds; + else + pwritefds = &writefds; + } + + if ( preadfds ) + { + wxFD_ZERO(preadfds); + wxFD_SET(m_fd, preadfds); + } + + if ( pwritefds ) + { + wxFD_ZERO(pwritefds); + wxFD_SET(m_fd, pwritefds); + } + + wxFD_ZERO(&exceptfds); + wxFD_SET(m_fd, &exceptfds); + + const int rc = select(m_fd + 1, preadfds, pwritefds, &exceptfds, &tv); + + // check for errors first + if ( rc == -1 || wxFD_ISSET(m_fd, &exceptfds) ) + { + m_establishing = false; + + return wxSOCKET_LOST_FLAG & flags; + } + + if ( rc == 0 ) + return 0; + + wxASSERT_MSG( rc == 1, "unexpected select() return value" ); + + wxSocketEventFlags detected = 0; + if ( preadfds && wxFD_ISSET(m_fd, preadfds) ) + { + // check for the case of a server socket waiting for connection + if ( m_server && (flags & wxSOCKET_CONNECTION_FLAG) ) + { + int error; + SOCKOPTLEN_T len = sizeof(error); + m_establishing = false; + getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (char*)&error, &len); + + if ( error ) + detected = wxSOCKET_LOST_FLAG; + else + detected |= wxSOCKET_CONNECTION_FLAG; + } + else // not called to get non-blocking accept() status + { + detected |= wxSOCKET_INPUT_FLAG; + } + } + + if ( pwritefds && wxFD_ISSET(m_fd, pwritefds) ) + { + // check for the case of non-blocking connect() + if ( m_establishing && !m_server ) + { + int error; + SOCKOPTLEN_T len = sizeof(error); + m_establishing = false; + getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (char*)&error, &len); + + if ( error ) + detected = wxSOCKET_LOST_FLAG; + else + detected |= wxSOCKET_CONNECTION_FLAG; + } + else // not called to get non-blocking connect() status + { + detected |= wxSOCKET_OUTPUT_FLAG; + } + } + + return detected & flags; +} + +int +wxSocketBase::DoWait(long seconds, long milliseconds, wxSocketEventFlags flags) +{ + // Use either the provided timeout or the default timeout value associated + // with this socket. + // + // TODO: allow waiting forever, see #9443 + const long timeout = seconds == -1 ? m_timeout * 1000 + : seconds * 1000 + milliseconds; + + return DoWait(timeout, flags); +} + +int +wxSocketBase::DoWait(long timeout, wxSocketEventFlags flags) +{ + wxCHECK_MSG( m_impl, -1, "can't wait on invalid socket" ); + + // we're never going to become ready in a TCP client if we're not connected + // any more (OTOH a server can call this to precisely wait for a connection + // so do wait for it in this case and UDP client is never "connected") + if ( !m_impl->IsServer() && + m_impl->m_stream && !m_connected && !m_establishing ) + return -1; + + // This can be set to true from Interrupt() to exit this function a.s.a.p. + m_interrupt = false; + + + const wxMilliClock_t timeEnd = wxGetLocalTimeMillis() + timeout; + + // Get the active event loop which we'll use for the message dispatching + // when running in the main thread unless this was explicitly disabled by + // setting wxSOCKET_BLOCK flag + wxEventLoopBase *eventLoop; + if ( !(m_flags & wxSOCKET_BLOCK) && wxIsMainThread() ) + { + eventLoop = wxEventLoop::GetActive(); + } + else // in worker thread + { + // We never dispatch messages from threads other than the main one. + eventLoop = NULL; + } + + // Make sure the events we're interested in are enabled before waiting for + // them: this is really necessary here as otherwise this could happen: + // 1. DoRead(wxSOCKET_WAITALL) is called + // 2. There is nothing to read so DoWait(wxSOCKET_INPUT_FLAG) is called + // 3. Some, but not all data appears, wxSocketImplUnix::OnReadWaiting() + // is called and wxSOCKET_INPUT_FLAG events are disabled in it + // 4. Because of wxSOCKET_WAITALL we call DoWait() again but the events + // are still disabled and we block forever + // + // More elegant solution would be nice but for now simply re-enabling the + // events here will do + m_impl->ReenableEvents(flags & (wxSOCKET_INPUT_FLAG | wxSOCKET_OUTPUT_FLAG)); + + + // Wait until we receive the event we're waiting for or the timeout expires + // (but note that we always execute the loop at least once, even if timeout + // is 0 as this is used for polling) + int rc = 0; + for ( bool firstTime = true; !m_interrupt; firstTime = false ) + { + long timeLeft = wxMilliClockToLong(timeEnd - wxGetLocalTimeMillis()); + if ( timeLeft < 0 ) + { + if ( !firstTime ) + break; // timed out + + timeLeft = 0; + } + + wxSocketEventFlags events; + if ( eventLoop ) + { + // reset them before starting to wait + m_eventsgot = 0; + + eventLoop->DispatchTimeout(timeLeft); + + events = m_eventsgot; + } + else // no event loop or waiting in another thread + { + // as explained below, we should always check for wxSOCKET_LOST_FLAG + timeval tv; + SetTimeValFromMS(tv, timeLeft); + events = m_impl->Select(flags | wxSOCKET_LOST_FLAG, &tv); + } + + // always check for wxSOCKET_LOST_FLAG, even if flags doesn't include + // it, as continuing to wait for anything else after getting it is + // pointless + if ( events & wxSOCKET_LOST_FLAG ) + { + m_connected = false; + m_establishing = false; + rc = -1; + break; + } + + // otherwise mask out the bits we're not interested in + events &= flags; + + // Incoming connection (server) or connection established (client)? + if ( events & wxSOCKET_CONNECTION_FLAG ) + { + m_connected = true; + m_establishing = false; + rc = true; + break; + } + + // Data available or output buffer ready? + if ( (events & wxSOCKET_INPUT_FLAG) || (events & wxSOCKET_OUTPUT_FLAG) ) + { + rc = true; + break; + } + } + + return rc; +} + +bool wxSocketBase::Wait(long seconds, long milliseconds) +{ + return DoWait(seconds, milliseconds, + wxSOCKET_INPUT_FLAG | + wxSOCKET_OUTPUT_FLAG | + wxSOCKET_CONNECTION_FLAG) != 0; +} + +bool wxSocketBase::WaitForRead(long seconds, long milliseconds) +{ + // Check pushback buffer before entering DoWait + if ( m_unread ) + return true; + + // Check if the socket is not already ready for input, if it is, there is + // no need to start waiting for it (worse, we'll actually never get a + // notification about the socket becoming ready if it is already under + // Windows) + if ( m_impl->Select(wxSOCKET_INPUT_FLAG) ) + return true; + + return DoWait(seconds, milliseconds, wxSOCKET_INPUT_FLAG) != 0; +} + + +bool wxSocketBase::WaitForWrite(long seconds, long milliseconds) +{ + if ( m_impl->Select(wxSOCKET_OUTPUT_FLAG) ) + return true; + + return DoWait(seconds, milliseconds, wxSOCKET_OUTPUT_FLAG) != 0; +} + +bool wxSocketBase::WaitForLost(long seconds, long milliseconds) +{ + return DoWait(seconds, milliseconds, wxSOCKET_LOST_FLAG) == -1; +} + +// -------------------------------------------------------------------------- +// Miscellaneous +// -------------------------------------------------------------------------- + +// +// Get local or peer address +// + +bool wxSocketBase::GetPeer(wxSockAddress& addr) const +{ + wxCHECK_MSG( m_impl, false, "invalid socket" ); + + const wxSockAddressImpl& peer = m_impl->GetPeer(); + if ( !peer.IsOk() ) + return false; + + addr.SetAddress(peer); + + return true; +} + +bool wxSocketBase::GetLocal(wxSockAddress& addr) const +{ + wxCHECK_MSG( m_impl, false, "invalid socket" ); + + const wxSockAddressImpl& local = m_impl->GetLocal(); + if ( !local.IsOk() ) + return false; + + addr.SetAddress(local); + + return true; +} + +// +// Save and restore socket state +// + +void wxSocketBase::SaveState() +{ + wxSocketState *state; + + state = new wxSocketState(); + + state->m_flags = m_flags; + state->m_notify = m_notify; + state->m_eventmask = m_eventmask; + state->m_clientData = m_clientData; + + m_states.Append(state); +} + +void wxSocketBase::RestoreState() +{ + wxList::compatibility_iterator node; + wxSocketState *state; + + node = m_states.GetLast(); + if (!node) + return; + + state = (wxSocketState *)node->GetData(); + + m_flags = state->m_flags; + m_notify = state->m_notify; + m_eventmask = state->m_eventmask; + m_clientData = state->m_clientData; + + m_states.Erase(node); + delete state; +} + +// +// Timeout and flags +// + +void wxSocketBase::SetTimeout(long seconds) +{ + m_timeout = seconds; + + if (m_impl) + m_impl->SetTimeout(m_timeout * 1000); +} + +void wxSocketBase::SetFlags(wxSocketFlags flags) +{ + // Do some sanity checking on the flags used: not all values can be used + // together. + wxASSERT_MSG( !(flags & wxSOCKET_NOWAIT) || + !(flags & (wxSOCKET_WAITALL | wxSOCKET_BLOCK)), + "Using wxSOCKET_WAITALL or wxSOCKET_BLOCK with " + "wxSOCKET_NOWAIT doesn't make sense" ); + + m_flags = flags; +} + + +// -------------------------------------------------------------------------- +// Event handling +// -------------------------------------------------------------------------- + +void wxSocketBase::OnRequest(wxSocketNotify notification) +{ + wxSocketEventFlags flag = 0; + switch ( notification ) + { + case wxSOCKET_INPUT: + flag = wxSOCKET_INPUT_FLAG; + break; + + case wxSOCKET_OUTPUT: + flag = wxSOCKET_OUTPUT_FLAG; + break; + + case wxSOCKET_CONNECTION: + flag = wxSOCKET_CONNECTION_FLAG; + + // we're now successfully connected + m_connected = true; + m_establishing = false; + + // error was previously set to wxSOCKET_WOULDBLOCK, but this is not + // the case any longer + SetError(wxSOCKET_NOERROR); + break; + + case wxSOCKET_LOST: + flag = wxSOCKET_LOST_FLAG; + + // if we lost the connection the socket is now closed and not + // connected any more + m_connected = false; + m_closed = true; + break; + + default: + wxFAIL_MSG( "unknown wxSocket notification" ); + } + + // remember the events which were generated for this socket, we're going to + // use this in DoWait() + m_eventsgot |= flag; + + // send the wx event if enabled and we're interested in it + if ( m_notify && (m_eventmask & flag) && m_handler ) + { + // don't generate the events when we're inside DoWait() called from our + // own code as we are going to consume the data that has just become + // available ourselves and the user code won't see it at all + if ( (notification == wxSOCKET_INPUT && m_reading) || + (notification == wxSOCKET_OUTPUT && m_writing) ) + { + return; + } + + wxSocketEvent event(m_id); + event.m_event = notification; + event.m_clientData = m_clientData; + event.SetEventObject(this); + + m_handler->AddPendingEvent(event); + } +} + +void wxSocketBase::Notify(bool notify) +{ + m_notify = notify; +} + +void wxSocketBase::SetNotify(wxSocketEventFlags flags) +{ + m_eventmask = flags; +} + +void wxSocketBase::SetEventHandler(wxEvtHandler& handler, int id) +{ + m_handler = &handler; + m_id = id; +} + +// -------------------------------------------------------------------------- +// Pushback buffer +// -------------------------------------------------------------------------- + +void wxSocketBase::Pushback(const void *buffer, wxUint32 size) +{ + if (!size) return; + + if (m_unread == NULL) + m_unread = malloc(size); + else + { + void *tmp; + + tmp = malloc(m_unrd_size + size); + memcpy((char *)tmp + size, m_unread, m_unrd_size); + free(m_unread); + + m_unread = tmp; + } + + m_unrd_size += size; + + memcpy(m_unread, buffer, size); +} + +wxUint32 wxSocketBase::GetPushback(void *buffer, wxUint32 size, bool peek) +{ + wxCHECK_MSG( buffer, 0, "NULL buffer" ); + + if (!m_unrd_size) + return 0; + + if (size > (m_unrd_size-m_unrd_cur)) + size = m_unrd_size-m_unrd_cur; + + memcpy(buffer, (char *)m_unread + m_unrd_cur, size); + + if (!peek) + { + m_unrd_cur += size; + if (m_unrd_size == m_unrd_cur) + { + free(m_unread); + m_unread = NULL; + m_unrd_size = 0; + m_unrd_cur = 0; + } + } + + return size; +} + + +// ========================================================================== +// wxSocketServer +// ========================================================================== + +// -------------------------------------------------------------------------- +// Ctor +// -------------------------------------------------------------------------- + +wxSocketServer::wxSocketServer(const wxSockAddress& addr, + wxSocketFlags flags) + : wxSocketBase(flags, wxSOCKET_SERVER) +{ + wxLogTrace( wxTRACE_Socket, wxT("Opening wxSocketServer") ); + + wxSocketManager * const manager = wxSocketManager::Get(); + m_impl = manager ? manager->CreateSocket(*this) : NULL; + + if (!m_impl) + { + wxLogTrace( wxTRACE_Socket, wxT("*** Failed to create m_impl") ); + return; + } + + // Setup the socket as server + m_impl->SetLocal(addr.GetAddress()); + + if (GetFlags() & wxSOCKET_REUSEADDR) { + m_impl->SetReusable(); + } + if (GetFlags() & wxSOCKET_BROADCAST) { + m_impl->SetBroadcast(); + } + if (GetFlags() & wxSOCKET_NOBIND) { + m_impl->DontDoBind(); + } + + if (m_impl->CreateServer() != wxSOCKET_NOERROR) + { + wxDELETE(m_impl); + + wxLogTrace( wxTRACE_Socket, wxT("*** CreateServer() failed") ); + return; + } + + // Notice that we need a cast as wxSOCKET_T is 64 bit under Win64 and that + // the cast is safe because a wxSOCKET_T is a handle and so limited to 32 + // (or, actually, even 24) bit values anyhow. + wxLogTrace( wxTRACE_Socket, wxT("wxSocketServer on fd %u"), + static_cast(m_impl->m_fd) ); +} + +// -------------------------------------------------------------------------- +// Accept +// -------------------------------------------------------------------------- + +bool wxSocketServer::AcceptWith(wxSocketBase& sock, bool wait) +{ + if ( !m_impl || (m_impl->m_fd == INVALID_SOCKET) || !m_impl->IsServer() ) + { + wxFAIL_MSG( "can only be called for a valid server socket" ); + + SetError(wxSOCKET_INVSOCK); + + return false; + } + + if ( wait ) + { + // wait until we get a connection + if ( !m_impl->SelectWithTimeout(wxSOCKET_INPUT_FLAG) ) + { + SetError(wxSOCKET_TIMEDOUT); + + return false; + } + } + + sock.m_impl = m_impl->Accept(sock); + + if ( !sock.m_impl ) + { + SetError(m_impl->GetLastError()); + + return false; + } + + sock.m_type = wxSOCKET_BASE; + sock.m_connected = true; + + return true; +} + +wxSocketBase *wxSocketServer::Accept(bool wait) +{ + wxSocketBase* sock = new wxSocketBase(); + + sock->SetFlags(m_flags); + + if (!AcceptWith(*sock, wait)) + { + sock->Destroy(); + sock = NULL; + } + + return sock; +} + +bool wxSocketServer::WaitForAccept(long seconds, long milliseconds) +{ + return DoWait(seconds, milliseconds, wxSOCKET_CONNECTION_FLAG) == 1; +} + +wxSOCKET_T wxSocketBase::GetSocket() const +{ + wxASSERT_MSG( m_impl, wxS("Socket not initialised") ); + + return m_impl->m_fd; +} + + +bool wxSocketBase::GetOption(int level, int optname, void *optval, int *optlen) +{ + wxASSERT_MSG( m_impl, wxT("Socket not initialised") ); + + SOCKOPTLEN_T lenreal = *optlen; + if ( getsockopt(m_impl->m_fd, level, optname, + static_cast(optval), &lenreal) != 0 ) + return false; + + *optlen = lenreal; + + return true; +} + +bool +wxSocketBase::SetOption(int level, int optname, const void *optval, int optlen) +{ + wxASSERT_MSG( m_impl, wxT("Socket not initialised") ); + + return setsockopt(m_impl->m_fd, level, optname, + static_cast(optval), optlen) == 0; +} + +bool wxSocketBase::SetLocal(const wxIPV4address& local) +{ + m_localAddress = local; + + return true; +} + +// ========================================================================== +// wxSocketClient +// ========================================================================== + +// -------------------------------------------------------------------------- +// Ctor and dtor +// -------------------------------------------------------------------------- + +wxSocketClient::wxSocketClient(wxSocketFlags flags) + : wxSocketBase(flags, wxSOCKET_CLIENT) +{ + m_initialRecvBufferSize = + m_initialSendBufferSize = -1; +} + +// -------------------------------------------------------------------------- +// Connect +// -------------------------------------------------------------------------- + +bool wxSocketClient::DoConnect(const wxSockAddress& remote, + const wxSockAddress* local, + bool wait) +{ + if ( m_impl ) + { + // Shutdown and destroy the old socket + Close(); + delete m_impl; + } + + m_connected = false; + m_establishing = false; + + // Create and set up the new one + wxSocketManager * const manager = wxSocketManager::Get(); + m_impl = manager ? manager->CreateSocket(*this) : NULL; + if ( !m_impl ) + return false; + + // Reuse makes sense for clients too, if we are trying to rebind to the same port + if (GetFlags() & wxSOCKET_REUSEADDR) + m_impl->SetReusable(); + if (GetFlags() & wxSOCKET_BROADCAST) + m_impl->SetBroadcast(); + if (GetFlags() & wxSOCKET_NOBIND) + m_impl->DontDoBind(); + + // Bind to the local IP address and port, when provided or if one had been + // set before + if ( !local && m_localAddress.GetAddress().IsOk() ) + local = &m_localAddress; + + if ( local ) + m_impl->SetLocal(local->GetAddress()); + + m_impl->SetInitialSocketBuffers(m_initialRecvBufferSize, m_initialSendBufferSize); + + m_impl->SetPeer(remote.GetAddress()); + + // Finally do create the socket and connect to the peer + const wxSocketError err = m_impl->CreateClient(wait); + + if ( err != wxSOCKET_NOERROR ) + { + if ( err == wxSOCKET_WOULDBLOCK ) + { + wxASSERT_MSG( !wait, "shouldn't get this for blocking connect" ); + + m_establishing = true; + } + + return false; + } + + m_connected = true; + return true; +} + +bool wxSocketClient::Connect(const wxSockAddress& remote, bool wait) +{ + return DoConnect(remote, NULL, wait); +} + +bool wxSocketClient::Connect(const wxSockAddress& remote, + const wxSockAddress& local, + bool wait) +{ + return DoConnect(remote, &local, wait); +} + +bool wxSocketClient::WaitOnConnect(long seconds, long milliseconds) +{ + if ( m_connected ) + { + // this happens if the initial attempt to connect succeeded without + // blocking + return true; + } + + wxCHECK_MSG( m_establishing && m_impl, false, + "No connection establishment attempt in progress" ); + + // notice that we return true even if DoWait() returned -1, i.e. if an + // error occurred and connection was lost: this is intentional as we should + // return false only if timeout expired without anything happening + return DoWait(seconds, milliseconds, wxSOCKET_CONNECTION_FLAG) != 0; +} + +// ========================================================================== +// wxDatagramSocket +// ========================================================================== + +wxDatagramSocket::wxDatagramSocket( const wxSockAddress& addr, + wxSocketFlags flags ) + : wxSocketBase( flags, wxSOCKET_DATAGRAM ) +{ + // Create the socket + wxSocketManager * const manager = wxSocketManager::Get(); + m_impl = manager ? manager->CreateSocket(*this) : NULL; + + if (!m_impl) + return; + + // Setup the socket as non connection oriented + m_impl->SetLocal(addr.GetAddress()); + if (flags & wxSOCKET_REUSEADDR) + { + m_impl->SetReusable(); + } + if (GetFlags() & wxSOCKET_BROADCAST) + { + m_impl->SetBroadcast(); + } + if (GetFlags() & wxSOCKET_NOBIND) + { + m_impl->DontDoBind(); + } + + if ( m_impl->CreateUDP() != wxSOCKET_NOERROR ) + { + wxDELETE(m_impl); + return; + } + + // Initialize all stuff + m_connected = false; + m_establishing = false; +} + +wxDatagramSocket& wxDatagramSocket::RecvFrom( wxSockAddress& addr, + void* buf, + wxUint32 nBytes ) +{ + Read(buf, nBytes); + GetPeer(addr); + return (*this); +} + +wxDatagramSocket& wxDatagramSocket::SendTo( const wxSockAddress& addr, + const void* buf, + wxUint32 nBytes ) +{ + wxASSERT_MSG( m_impl, wxT("Socket not initialised") ); + + m_impl->SetPeer(addr.GetAddress()); + Write(buf, nBytes); + return (*this); +} + +// ========================================================================== +// wxSocketModule +// ========================================================================== + +class wxSocketModule : public wxModule +{ +public: + virtual bool OnInit() + { + // wxSocketBase will call Initialize() itself only if sockets are + // really used, don't do it from here + return true; + } + + virtual void OnExit() + { + if ( wxSocketBase::IsInitialized() ) + wxSocketBase::Shutdown(); + } + +private: + DECLARE_DYNAMIC_CLASS(wxSocketModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxSocketModule, wxModule) + +#if defined(wxUSE_SELECT_DISPATCHER) && wxUSE_SELECT_DISPATCHER +// NOTE: we need to force linking against socketiohandler.cpp otherwise in +// static builds of wxWidgets the ManagerSetter::ManagerSetter ctor +// contained there wouldn't be ever called +wxFORCE_LINK_MODULE( socketiohandler ) +#endif + +// same for ManagerSetter in the MSW file +#ifdef __WINDOWS__ + wxFORCE_LINK_MODULE( mswsocket ) +#endif + +// and for OSXManagerSetter in the OS X one +#ifdef __WXOSX__ + wxFORCE_LINK_MODULE( osxsocket ) +#endif + +#endif // wxUSE_SOCKETS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/socketiohandler.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/socketiohandler.cpp new file mode 100644 index 0000000000..92f9e7f5fc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/socketiohandler.cpp @@ -0,0 +1,130 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/socketiohandler.cpp +// Purpose: implementation of wxFDIOHandler for wxSocket +// Author: Angel Vidal, Lukasz Michalski +// Created: 08.24.06 +// Copyright: (c) 2006 Angel vidal +// (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SOCKETS + +#include "wx/app.h" +#include "wx/apptrait.h" +#include "wx/private/socket.h" +#include "wx/link.h" + +// ============================================================================ +// wxSocketFDBasedManager implementation +// ============================================================================ + +bool wxSocketFDBasedManager::OnInit() +{ + wxAppTraits * const traits = wxApp::GetTraitsIfExists(); + if ( !traits ) + return false; + + m_fdioManager = traits->GetFDIOManager(); + return m_fdioManager != NULL; +} + +void wxSocketFDBasedManager::Install_Callback(wxSocketImpl *socket_, + wxSocketNotify event) +{ + wxSocketImplUnix * const + socket = static_cast(socket_); + + wxCHECK_RET( socket->m_fd != -1, + "shouldn't be called on invalid socket" ); + + const wxFDIOManager::Direction d = GetDirForEvent(socket, event); + + int& fd = FD(socket, d); + if ( fd != -1 ) + m_fdioManager->RemoveInput(socket, fd, d); + + fd = m_fdioManager->AddInput(socket, socket->m_fd, d); +} + +void wxSocketFDBasedManager::Uninstall_Callback(wxSocketImpl *socket_, + wxSocketNotify event) +{ + wxSocketImplUnix * const + socket = static_cast(socket_); + + const wxFDIOManager::Direction d = GetDirForEvent(socket, event); + + int& fd = FD(socket, d); + if ( fd != -1 ) + { + m_fdioManager->RemoveInput(socket, fd, d); + fd = -1; + } +} + +wxFDIOManager::Direction +wxSocketFDBasedManager::GetDirForEvent(wxSocketImpl *socket, + wxSocketNotify event) +{ + switch ( event ) + { + default: + wxFAIL_MSG( "unknown socket event" ); + return wxFDIOManager::INPUT; // we must return something + + case wxSOCKET_LOST: + wxFAIL_MSG( "unexpected socket event" ); + return wxFDIOManager::INPUT; // as above + + case wxSOCKET_INPUT: + return wxFDIOManager::INPUT; + + case wxSOCKET_OUTPUT: + return wxFDIOManager::OUTPUT; + + case wxSOCKET_CONNECTION: + // for server sockets we're interested in events indicating + // that a new connection is pending, i.e. that accept() will + // succeed and this is indicated by socket becoming ready for + // reading, while for the other ones we're interested in the + // completion of non-blocking connect() which is indicated by + // the socket becoming ready for writing + return socket->IsServer() ? wxFDIOManager::INPUT + : wxFDIOManager::OUTPUT; + } +} + +// set the wxBase variable to point to our wxSocketManager implementation +// +// see comments in wx/apptrait.h for the explanation of why do we do it +// like this +static struct ManagerSetter +{ + ManagerSetter() + { + static wxSocketFDBasedManager s_manager; + wxAppTraits::SetDefaultSocketManager(&s_manager); + } +} gs_managerSetter; + + +// see the relative linker macro in socket.cpp +wxFORCE_LINK_THIS_MODULE( socketiohandler ); + +#endif // wxUSE_SOCKETS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/spinbtncmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/spinbtncmn.cpp new file mode 100644 index 0000000000..9f2de77485 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/spinbtncmn.cpp @@ -0,0 +1,98 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/spinbtncmn.cpp +// Purpose: wxSpinButton common code +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/app.h" +#endif + +#if wxUSE_SPINBTN + +#include "wx/spinbutt.h" + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxSpinButtonStyle ) +wxBEGIN_FLAGS( wxSpinButtonStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) + + wxFLAGS_MEMBER(wxSP_HORIZONTAL) + wxFLAGS_MEMBER(wxSP_VERTICAL) + wxFLAGS_MEMBER(wxSP_ARROW_KEYS) + wxFLAGS_MEMBER(wxSP_WRAP) +wxEND_FLAGS( wxSpinButtonStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl, "wx/spinbutt.h") + +wxBEGIN_PROPERTIES_TABLE(wxSpinButton) + wxEVENT_RANGE_PROPERTY( Spin, wxEVT_SCROLL_TOP, wxEVT_SCROLL_CHANGED, wxSpinEvent ) + + wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + wxPROPERTY( Min, int, SetMin, GetMin, 0, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + wxPROPERTY( Max, int, SetMax, GetMax, 0, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + + wxPROPERTY_FLAGS( WindowStyle, wxSpinButtonStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxSpinButton) + +wxCONSTRUCTOR_5( wxSpinButton, wxWindow*, Parent, wxWindowID, Id, \ + wxPoint, Position, wxSize, Size, long, WindowStyle ) + +IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent) + + +#endif // wxUSE_SPINBTN diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/spinctrlcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/spinctrlcmn.cpp new file mode 100644 index 0000000000..4a0596b663 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/spinctrlcmn.cpp @@ -0,0 +1,118 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/spinctrlcmn.cpp +// Purpose: define wxSpinCtrl event types +// Author: Peter Most +// Created: 01.11.08 +// Copyright: (c) 2008-2009 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/spinbutt.h" +#include "wx/spinctrl.h" + +#if wxUSE_SPINCTRL + +wxDEFINE_EVENT(wxEVT_SPINCTRL, wxSpinEvent); +wxDEFINE_EVENT(wxEVT_SPINCTRLDOUBLE, wxSpinDoubleEvent); + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxSpinCtrlStyle ) +wxBEGIN_FLAGS( wxSpinCtrlStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxSP_HORIZONTAL) +wxFLAGS_MEMBER(wxSP_VERTICAL) +wxFLAGS_MEMBER(wxSP_ARROW_KEYS) +wxFLAGS_MEMBER(wxSP_WRAP) +wxEND_FLAGS( wxSpinCtrlStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinCtrl, wxControl, "wx/spinctrl.h") + +wxBEGIN_PROPERTIES_TABLE(wxSpinCtrl) +wxEVENT_RANGE_PROPERTY( Spin, wxEVT_SCROLL_TOP, wxEVT_SCROLL_CHANGED, wxSpinEvent ) + +wxEVENT_PROPERTY( Updated, wxEVT_SPINCTRL, wxCommandEvent ) +wxEVENT_PROPERTY( TextUpdated, wxEVT_TEXT, wxCommandEvent ) +wxEVENT_PROPERTY( TextEnter, wxEVT_TEXT_ENTER, wxCommandEvent ) + +wxPROPERTY( ValueString, wxString, SetValue, GetValue, \ + wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) ; +wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) +#if 0 + wxPROPERTY( Min, int, SetMin, GetMin, 0, 0 /*flags*/, wxT("Helpstring"), wxT("group") ) + wxPROPERTY( Max, int, SetMax, GetMax, 0, 0 /*flags*/, wxT("Helpstring"), wxT("group")) +#endif +wxPROPERTY_FLAGS( WindowStyle, wxSpinCtrlStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +/* + TODO PROPERTIES + style wxSP_ARROW_KEYS + */ +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxSpinCtrl) + +wxCONSTRUCTOR_6( wxSpinCtrl, wxWindow*, Parent, wxWindowID, Id, \ + wxString, ValueString, wxPoint, Position, \ + wxSize, Size, long, WindowStyle ) + + +wxString wxPrivate::wxSpinCtrlFormatAsHex(long val, long maxVal) +{ + // We format the value like this is for compatibility with (native + // behaviour of) wxMSW + wxString text; + if ( maxVal < 0x10000 ) + text.Printf(wxS("0x%04lx"), val); + else + text.Printf(wxS("0x%08lx"), val); + + return text; +} + +#endif // wxUSE_SPINCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/srchcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/srchcmn.cpp new file mode 100644 index 0000000000..1e524b5394 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/srchcmn.cpp @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/srchcmn.cpp +// Purpose: common (to all ports) bits of wxSearchCtrl +// Author: Robin Dunn +// Modified by: +// Created: 19-Dec-2006 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SEARCHCTRL + +#include "wx/srchctrl.h" + +#ifndef WX_PRECOMP +#endif + +// ---------------------------------------------------------------------------- + +const char wxSearchCtrlNameStr[] = "searchCtrl"; + +wxDEFINE_EVENT(wxEVT_SEARCHCTRL_CANCEL_BTN, wxCommandEvent); +wxDEFINE_EVENT(wxEVT_SEARCHCTRL_SEARCH_BTN, wxCommandEvent); + + +#endif // wxUSE_SEARCHCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/sstream.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/sstream.cpp new file mode 100644 index 0000000000..009e2c04b6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/sstream.cpp @@ -0,0 +1,203 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/sstream.cpp +// Purpose: string-based streams implementation +// Author: Vadim Zeitlin +// Modified by: Ryan Norton (UTF8 UNICODE) +// Created: 2004-09-19 +// Copyright: (c) 2004 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS + +#include "wx/sstream.h" + +// ============================================================================ +// wxStringInputStream implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// construction/destruction +// ---------------------------------------------------------------------------- + +// TODO: Do we want to include the null char in the stream? If so then +// just add +1 to m_len in the ctor +wxStringInputStream::wxStringInputStream(const wxString& s) +#if wxUSE_UNICODE + // FIXME-UTF8: use wxCharBufferWithLength if we have it + : m_str(s), m_buf(s.utf8_str()), m_len(strlen(m_buf)) +#else + : m_str(s), m_buf(s.mb_str()), m_len(s.length()) +#endif +{ +#if wxUSE_UNICODE + wxASSERT_MSG(m_buf.data() != NULL, wxT("Could not convert string to UTF8!")); +#endif + m_pos = 0; +} + +// ---------------------------------------------------------------------------- +// getlength +// ---------------------------------------------------------------------------- + +wxFileOffset wxStringInputStream::GetLength() const +{ + return m_len; +} + +// ---------------------------------------------------------------------------- +// seek/tell +// ---------------------------------------------------------------------------- + +wxFileOffset wxStringInputStream::OnSysSeek(wxFileOffset ofs, wxSeekMode mode) +{ + switch ( mode ) + { + case wxFromStart: + // nothing to do, ofs already ok + break; + + case wxFromEnd: + ofs += m_len; + break; + + case wxFromCurrent: + ofs += m_pos; + break; + + default: + wxFAIL_MSG( wxT("invalid seek mode") ); + return wxInvalidOffset; + } + + if ( ofs < 0 || ofs > static_cast(m_len) ) + return wxInvalidOffset; + + // FIXME: this can't be right + m_pos = wx_truncate_cast(size_t, ofs); + + return ofs; +} + +wxFileOffset wxStringInputStream::OnSysTell() const +{ + return static_cast(m_pos); +} + +// ---------------------------------------------------------------------------- +// actual IO +// ---------------------------------------------------------------------------- + +size_t wxStringInputStream::OnSysRead(void *buffer, size_t size) +{ + const size_t sizeMax = m_len - m_pos; + + if ( size >= sizeMax ) + { + if ( sizeMax == 0 ) + { + m_lasterror = wxSTREAM_EOF; + return 0; + } + + size = sizeMax; + } + + memcpy(buffer, m_buf.data() + m_pos, size); + m_pos += size; + + return size; +} + +// ============================================================================ +// wxStringOutputStream implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// seek/tell +// ---------------------------------------------------------------------------- + +wxFileOffset wxStringOutputStream::OnSysTell() const +{ + return static_cast(m_pos); +} + +// ---------------------------------------------------------------------------- +// actual IO +// ---------------------------------------------------------------------------- + +size_t wxStringOutputStream::OnSysWrite(const void *buffer, size_t size) +{ + const char *p = static_cast(buffer); + +#if wxUSE_UNICODE + // the part of the string we have here may be incomplete, i.e. it can stop + // in the middle of an UTF-8 character and so converting it would fail; if + // this is the case, accumulate the part which we failed to convert until + // we get the rest (and also take into account the part which we might have + // left unconverted before) + const char *src; + size_t srcLen; + if ( m_unconv.GetDataLen() ) + { + // append the new data to the data remaining since the last time + m_unconv.AppendData(p, size); + src = m_unconv; + srcLen = m_unconv.GetDataLen(); + } + else // no unconverted data left, avoid extra copy + { + src = p; + srcLen = size; + } + + size_t wlen; + wxWCharBuffer wbuf(m_conv.cMB2WC(src, srcLen, &wlen)); + if ( wbuf ) + { + // conversion succeeded, clear the unconverted buffer + m_unconv = wxMemoryBuffer(0); + + m_str->append(wbuf, wlen); + } + else // conversion failed + { + // remember unconverted data if there had been none before (otherwise + // we've already got it in the buffer) + if ( src == p ) + m_unconv.AppendData(src, srcLen); + + // pretend that we wrote the data anyhow, otherwise the caller would + // believe there was an error and this might not be the case, but do + // not update m_pos as m_str hasn't changed + return size; + } +#else // !wxUSE_UNICODE + // no recoding necessary + m_str->append(p, size); +#endif // wxUSE_UNICODE/!wxUSE_UNICODE + + // update position + m_pos += size; + + // return number of bytes actually written + return size; +} + +#endif // wxUSE_STREAMS + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/statbar.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/statbar.cpp new file mode 100644 index 0000000000..4746f7bd94 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/statbar.cpp @@ -0,0 +1,306 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/statbar.cpp +// Purpose: wxStatusBarBase implementation +// Author: Vadim Zeitlin +// Modified by: Francesco Montorsi +// Created: 14.10.01 +// Copyright: (c) 2001 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STATUSBAR + +#include "wx/statusbr.h" + +#ifndef WX_PRECOMP + #include "wx/frame.h" +#endif //WX_PRECOMP + +const char wxStatusBarNameStr[] = "statusBar"; + +// ============================================================================ +// wxStatusBarPane implementation +// ============================================================================ + +bool wxStatusBarPane::SetText(const wxString& text) +{ + if ( text == m_text ) + return false; + + /* + If we have a message to restore on the stack, we update it to + correspond to the current one so that a sequence of calls such as + + 1. SetStatusText("foo") + 2. PushStatusText("bar") + 3. SetStatusText("new foo") + 4. PopStatusText() + + doesn't overwrite the "new foo" which should be shown at the end with + the old value "foo". This would be unexpected and hard to avoid, + especially when PushStatusText() is used internally by wxWidgets + without knowledge of the user program, as it is for showing the menu + and toolbar help strings. + + By updating the top of the stack we ensure that the next call to + PopStatusText() basically becomes a NOP without breaking the balance + between the calls to push and pop as we would have done if we really + called PopStatusText() here. + */ + if ( !m_arrStack.empty() ) + { + m_arrStack.back() = text; + } + + m_text = text; + + return true; +} + +bool wxStatusBarPane::PushText(const wxString& text) +{ + // save the currently shown text + m_arrStack.push_back(m_text); + + // and update the new one if necessary + if ( text == m_text ) + return false; + + m_text = text; + + return true; +} + +bool wxStatusBarPane::PopText() +{ + wxCHECK_MSG( !m_arrStack.empty(), false, "no status message to pop" ); + + const wxString text = m_arrStack.back(); + + m_arrStack.pop_back(); + + if ( text == m_text ) + return false; + + m_text = text; + + return true; +} + +// ============================================================================ +// wxStatusBarBase implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow) + +#include "wx/arrimpl.cpp" // This is a magic incantation which must be done! +WX_DEFINE_EXPORTED_OBJARRAY(wxStatusBarPaneArray) + + +// ---------------------------------------------------------------------------- +// ctor/dtor +// ---------------------------------------------------------------------------- + +wxStatusBarBase::wxStatusBarBase() +{ + m_bSameWidthForAllPanes = true; +} + +wxStatusBarBase::~wxStatusBarBase() +{ + // notify the frame that it doesn't have a status bar any longer to avoid + // dangling pointers + wxFrame *frame = wxDynamicCast(GetParent(), wxFrame); + if ( frame && frame->GetStatusBar() == this ) + frame->SetStatusBar(NULL); +} + +// ---------------------------------------------------------------------------- +// field widths +// ---------------------------------------------------------------------------- + +void wxStatusBarBase::SetFieldsCount(int number, const int *widths) +{ + wxCHECK_RET( number > 0, wxT("invalid field number in SetFieldsCount") ); + + if ( (size_t)number > m_panes.GetCount() ) + { + wxStatusBarPane newPane; + + // add more entries with the default style and zero width + // (this will be set later) + for (size_t i = m_panes.GetCount(); i < (size_t)number; ++i) + m_panes.Add(newPane); + } + else if ( (size_t)number < m_panes.GetCount() ) + { + // remove entries in excess + m_panes.RemoveAt(number, m_panes.GetCount()-number); + } + + // SetStatusWidths will automatically refresh + SetStatusWidths(number, widths); +} + +void wxStatusBarBase::SetStatusWidths(int WXUNUSED_UNLESS_DEBUG(n), + const int widths[]) +{ + wxASSERT_MSG( (size_t)n == m_panes.GetCount(), wxT("field number mismatch") ); + + if (widths == NULL) + { + // special value meaning: override explicit pane widths and make them all + // of the same size + m_bSameWidthForAllPanes = true; + } + else + { + for ( size_t i = 0; i < m_panes.GetCount(); i++ ) + m_panes[i].SetWidth(widths[i]); + + m_bSameWidthForAllPanes = false; + } + + // update the display after the widths changed + Refresh(); +} + +void wxStatusBarBase::SetStatusStyles(int WXUNUSED_UNLESS_DEBUG(n), + const int styles[]) +{ + wxCHECK_RET( styles, wxT("NULL pointer in SetStatusStyles") ); + + wxASSERT_MSG( (size_t)n == m_panes.GetCount(), wxT("field number mismatch") ); + + for ( size_t i = 0; i < m_panes.GetCount(); i++ ) + m_panes[i].SetStyle(styles[i]); + + // update the display after the widths changed + Refresh(); +} + +wxArrayInt wxStatusBarBase::CalculateAbsWidths(wxCoord widthTotal) const +{ + wxArrayInt widths; + + if ( m_bSameWidthForAllPanes ) + { + // Default: all fields have the same width. This is not always + // possible to do exactly (if widthTotal is not divisible by + // m_panes.GetCount()) - if that happens, we distribute the extra + // pixels among all fields: + int widthToUse = widthTotal; + + for ( size_t i = m_panes.GetCount(); i > 0; i-- ) + { + // divide the unassigned width evently between the + // not yet processed fields: + int w = widthToUse / i; + widths.Add(w); + widthToUse -= w; + } + } + else // do not override explicit pane widths + { + // calculate the total width of all the fixed width fields and the + // total number of var field widths counting with multiplicity + size_t nTotalWidth = 0, + nVarCount = 0, + i; + + for ( i = 0; i < m_panes.GetCount(); i++ ) + { + if ( m_panes[i].GetWidth() >= 0 ) + nTotalWidth += m_panes[i].GetWidth(); + else + nVarCount += -m_panes[i].GetWidth(); + } + + // the amount of extra width we have per each var width field + int widthExtra = widthTotal - nTotalWidth; + + // do fill the array + for ( i = 0; i < m_panes.GetCount(); i++ ) + { + if ( m_panes[i].GetWidth() >= 0 ) + widths.Add(m_panes[i].GetWidth()); + else + { + int nVarWidth = widthExtra > 0 ? (widthExtra * (-m_panes[i].GetWidth())) / nVarCount : 0; + nVarCount += m_panes[i].GetWidth(); + widthExtra -= nVarWidth; + widths.Add(nVarWidth); + } + } + } + + return widths; +} + +// ---------------------------------------------------------------------------- +// setting/getting status text +// ---------------------------------------------------------------------------- + +void wxStatusBarBase::SetStatusText(const wxString& text, int number) +{ + wxCHECK_RET( (unsigned)number < m_panes.size(), + "invalid status bar field index" ); + + if ( m_panes[number].SetText(text) ) + DoUpdateStatusText(number); +} + +wxString wxStatusBarBase::GetStatusText(int number) const +{ + wxCHECK_MSG( (unsigned)number < m_panes.size(), wxString(), + "invalid status bar field index" ); + + return m_panes[number].GetText(); +} + +void wxStatusBarBase::SetEllipsizedFlag(int number, bool isEllipsized) +{ + wxCHECK_RET( (unsigned)number < m_panes.size(), + "invalid status bar field index" ); + + m_panes[number].SetIsEllipsized(isEllipsized); +} + +// ---------------------------------------------------------------------------- +// pushing/popping status text +// ---------------------------------------------------------------------------- + +void wxStatusBarBase::PushStatusText(const wxString& text, int number) +{ + wxCHECK_RET( (unsigned)number < m_panes.size(), + "invalid status bar field index" ); + + if ( m_panes[number].PushText(text) ) + DoUpdateStatusText(number); +} + +void wxStatusBarBase::PopStatusText(int number) +{ + wxCHECK_RET( (unsigned)number < m_panes.size(), + "invalid status bar field index" ); + + if ( m_panes[number].PopText() ) + DoUpdateStatusText(number); +} + +#endif // wxUSE_STATUSBAR diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/statbmpcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/statbmpcmn.cpp new file mode 100644 index 0000000000..5768c6c515 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/statbmpcmn.cpp @@ -0,0 +1,86 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/statbmpcmn.cpp +// Purpose: wxStaticBitmap common code +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// declarations +// =========================================================================== + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STATBMP + +#include "wx/statbmp.h" + +extern WXDLLEXPORT_DATA(const char) wxStaticBitmapNameStr[] = "staticBitmap"; + +// --------------------------------------------------------------------------- +// XTI +// --------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxStaticBitmapStyle ) +wxBEGIN_FLAGS( wxStaticBitmapStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) + +wxEND_FLAGS( wxStaticBitmapStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticBitmap, wxControl, "wx/statbmp.h") + +wxBEGIN_PROPERTIES_TABLE(wxStaticBitmap) + wxPROPERTY_FLAGS( WindowStyle, wxStaticBitmapStyle, long, \ + SetWindowStyleFlag, GetWindowStyleFlag, \ + wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), \ + wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxStaticBitmap) + +wxCONSTRUCTOR_5( wxStaticBitmap, wxWindow*, Parent, wxWindowID, Id, \ + wxBitmap, Bitmap, wxPoint, Position, wxSize, Size ) + +/* + TODO PROPERTIES : + bitmap +*/ + +#endif // wxUSE_STATBMP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/statboxcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/statboxcmn.cpp new file mode 100644 index 0000000000..5f0f05cbeb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/statboxcmn.cpp @@ -0,0 +1,89 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/statboxcmn.cpp +// Purpose: wxStaticBox common code +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STATBOX + +#include "wx/statbox.h" + +extern WXDLLEXPORT_DATA(const char) wxStaticBoxNameStr[] = "groupBox"; + +wxStaticBoxBase::wxStaticBoxBase() +{ +#ifndef __WXGTK__ + m_container.DisableSelfFocus(); +#endif +} + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxStaticBoxStyle ) +wxBEGIN_FLAGS( wxStaticBoxStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) +wxEND_FLAGS( wxStaticBoxStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticBox, wxControl, "wx/statbox.h") + +wxBEGIN_PROPERTIES_TABLE(wxStaticBox) + wxPROPERTY( Label, wxString, SetLabel, GetLabel, wxString(), 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + wxPROPERTY_FLAGS( WindowStyle, wxStaticBoxStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxStaticBox) + +wxCONSTRUCTOR_6( wxStaticBox, wxWindow*, Parent, wxWindowID, Id, \ + wxString, Label, wxPoint, Position, wxSize, Size, \ + long, WindowStyle ) + +#endif // wxUSE_STATBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/statlinecmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/statlinecmn.cpp new file mode 100644 index 0000000000..ce311dfccf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/statlinecmn.cpp @@ -0,0 +1,81 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/statlinecmn.cpp +// Purpose: wxStaticLine common code +// Author: Vadim Zeitlin +// Created: 28.06.99 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/statline.h" + +#if wxUSE_STATLINE + +extern WXDLLEXPORT_DATA(const char) wxStaticLineNameStr[] = "staticLine"; + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxStaticLineStyle ) +wxBEGIN_FLAGS( wxStaticLineStyle ) + // new style border flags, we put them first to + // use them for streaming out + wxFLAGS_MEMBER(wxBORDER_SIMPLE) + wxFLAGS_MEMBER(wxBORDER_SUNKEN) + wxFLAGS_MEMBER(wxBORDER_DOUBLE) + wxFLAGS_MEMBER(wxBORDER_RAISED) + wxFLAGS_MEMBER(wxBORDER_STATIC) + wxFLAGS_MEMBER(wxBORDER_NONE) + + // old style border flags + wxFLAGS_MEMBER(wxSIMPLE_BORDER) + wxFLAGS_MEMBER(wxSUNKEN_BORDER) + wxFLAGS_MEMBER(wxDOUBLE_BORDER) + wxFLAGS_MEMBER(wxRAISED_BORDER) + wxFLAGS_MEMBER(wxSTATIC_BORDER) + wxFLAGS_MEMBER(wxBORDER) + + // standard window styles + wxFLAGS_MEMBER(wxTAB_TRAVERSAL) + wxFLAGS_MEMBER(wxCLIP_CHILDREN) + wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) + wxFLAGS_MEMBER(wxWANTS_CHARS) + wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) + wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) + wxFLAGS_MEMBER(wxVSCROLL) + wxFLAGS_MEMBER(wxHSCROLL) + + wxFLAGS_MEMBER(wxLI_HORIZONTAL) + wxFLAGS_MEMBER(wxLI_VERTICAL) +wxEND_FLAGS( wxStaticLineStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticLine, wxControl, "wx/statline.h") + +wxBEGIN_PROPERTIES_TABLE(wxStaticLine) + wxPROPERTY_FLAGS( WindowStyle, wxStaticLineStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxStaticLine) + +wxCONSTRUCTOR_5( wxStaticLine, wxWindow*, Parent, wxWindowID, Id, \ + wxPoint, Position, wxSize, Size, long, WindowStyle) + +#endif // wxUSE_STATLINE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/stattextcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/stattextcmn.cpp new file mode 100644 index 0000000000..ba7d7f602a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/stattextcmn.cpp @@ -0,0 +1,262 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/stattextcmn.cpp +// Purpose: common (to all ports) wxStaticText functions +// Author: Vadim Zeitlin, Francesco Montorsi +// Created: 2007-01-07 (extracted from dlgcmn.cpp) +// Copyright: (c) 1999-2006 Vadim Zeitlin +// (c) 2007 Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STATTEXT + +#ifndef WX_PRECOMP + #include "wx/stattext.h" + #include "wx/button.h" + #include "wx/dcclient.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/settings.h" + #include "wx/sizer.h" + #include "wx/containr.h" +#endif + +#include "wx/textwrapper.h" + +#include "wx/private/markupparser.h" + +extern WXDLLEXPORT_DATA(const char) wxStaticTextNameStr[] = "staticText"; + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxStaticTextStyle ) +wxBEGIN_FLAGS( wxStaticTextStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxST_NO_AUTORESIZE) +wxFLAGS_MEMBER(wxALIGN_LEFT) +wxFLAGS_MEMBER(wxALIGN_RIGHT) +wxFLAGS_MEMBER(wxALIGN_CENTRE) +wxEND_FLAGS( wxStaticTextStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticText, wxControl, "wx/stattext.h") + +wxBEGIN_PROPERTIES_TABLE(wxStaticText) +wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString(), 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) +wxPROPERTY_FLAGS( WindowStyle, wxStaticTextStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxStaticText) + +wxCONSTRUCTOR_6( wxStaticText, wxWindow*, Parent, wxWindowID, Id, \ + wxString, Label, wxPoint, Position, wxSize, Size, long, WindowStyle ) + + +// ---------------------------------------------------------------------------- +// wxTextWrapper +// ---------------------------------------------------------------------------- + +void wxTextWrapper::Wrap(wxWindow *win, const wxString& text, int widthMax) +{ + wxString line; + + wxString::const_iterator lastSpace = text.end(); + wxString::const_iterator lineStart = text.begin(); + for ( wxString::const_iterator p = lineStart; ; ++p ) + { + if ( IsStartOfNewLine() ) + { + OnNewLine(); + + lastSpace = text.end(); + line.clear(); + lineStart = p; + } + + if ( p == text.end() || *p == wxT('\n') ) + { + DoOutputLine(line); + + if ( p == text.end() ) + break; + } + else // not EOL + { + if ( *p == wxT(' ') ) + lastSpace = p; + + line += *p; + + if ( widthMax >= 0 && lastSpace != text.end() ) + { + int width; + win->GetTextExtent(line, &width, NULL); + + if ( width > widthMax ) + { + // remove the last word from this line + line.erase(lastSpace - lineStart, p + 1 - lineStart); + DoOutputLine(line); + + // go back to the last word of this line which we didn't + // output yet + p = lastSpace; + } + } + //else: no wrapping at all or impossible to wrap + } + } +} + + +// ---------------------------------------------------------------------------- +// wxLabelWrapper: helper class for wxStaticTextBase::Wrap() +// ---------------------------------------------------------------------------- + +class wxLabelWrapper : public wxTextWrapper +{ +public: + void WrapLabel(wxWindow *text, int widthMax) + { + m_text.clear(); + Wrap(text, text->GetLabel(), widthMax); + text->SetLabel(m_text); + } + +protected: + virtual void OnOutputLine(const wxString& line) + { + m_text += line; + } + + virtual void OnNewLine() + { + m_text += wxT('\n'); + } + +private: + wxString m_text; +}; + + +// ---------------------------------------------------------------------------- +// wxStaticTextBase +// ---------------------------------------------------------------------------- + +void wxStaticTextBase::Wrap(int width) +{ + wxLabelWrapper wrapper; + wrapper.WrapLabel(this, width); +} + +// ---------------------------------------------------------------------------- +// wxStaticTextBase - generic implementation for wxST_ELLIPSIZE_* support +// ---------------------------------------------------------------------------- + +void wxStaticTextBase::UpdateLabel() +{ + if (!IsEllipsized()) + return; + + wxString newlabel = GetEllipsizedLabel(); + + // we need to touch the "real" label (i.e. the text set inside the control, + // using port-specific functions) instead of the string returned by GetLabel(). + // + // In fact, we must be careful not to touch the original label passed to + // SetLabel() otherwise GetLabel() will behave in a strange way to the user + // (e.g. returning a "Ver...ing" instead of "Very long string") ! + if (newlabel == DoGetLabel()) + return; + DoSetLabel(newlabel); +} + +wxString wxStaticTextBase::GetEllipsizedLabel() const +{ + // this function should be used only by ports which do not support + // ellipsis in static texts: we first remove markup (which cannot + // be handled safely by Ellipsize()) and then ellipsize the result. + + wxString ret(m_labelOrig); + + if (IsEllipsized()) + ret = Ellipsize(ret); + + return ret; +} + +wxString wxStaticTextBase::Ellipsize(const wxString& label) const +{ + wxSize sz(GetSize()); + if (sz.GetWidth() < 2 || sz.GetHeight() < 2) + { + // the size of this window is not valid (yet) + return label; + } + + wxClientDC dc(const_cast(this)); + dc.SetFont(GetFont()); + + wxEllipsizeMode mode; + if ( HasFlag(wxST_ELLIPSIZE_START) ) + mode = wxELLIPSIZE_START; + else if ( HasFlag(wxST_ELLIPSIZE_MIDDLE) ) + mode = wxELLIPSIZE_MIDDLE; + else if ( HasFlag(wxST_ELLIPSIZE_END) ) + mode = wxELLIPSIZE_END; + else + { + wxFAIL_MSG( "should only be called if have one of wxST_ELLIPSIZE_XXX" ); + + return label; + } + + return wxControl::Ellipsize(label, dc, mode, sz.GetWidth()); +} + +#endif // wxUSE_STATTEXT diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/stdpbase.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/stdpbase.cpp new file mode 100644 index 0000000000..41e27e7724 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/stdpbase.cpp @@ -0,0 +1,176 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/stdpbase.cpp +// Purpose: wxStandardPathsBase methods common to all ports +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-10-19 +// Copyright: (c) 2004 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/app.h" +#endif //WX_PRECOMP +#include "wx/apptrait.h" + +#include "wx/filename.h" +#include "wx/stdpaths.h" + +// ---------------------------------------------------------------------------- +// module globals +// ---------------------------------------------------------------------------- + +namespace +{ + +// Derive a class just to be able to create it: wxStandardPaths ctor is +// protected to prevent its misuse, but it also means we can't create an object +// of this class directly. +class wxStandardPathsDefault : public wxStandardPaths +{ +public: + wxStandardPathsDefault() { } +}; + +static wxStandardPathsDefault gs_stdPaths; + +} // anonymous namespace + +// ============================================================================ +// implementation +// ============================================================================ + +/* static */ +wxStandardPaths& wxStandardPathsBase::Get() +{ + wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + wxCHECK_MSG( traits, gs_stdPaths, wxT("create wxApp before calling this") ); + + return traits->GetStandardPaths(); +} + +wxString wxStandardPathsBase::GetExecutablePath() const +{ + if ( !wxTheApp || !wxTheApp->argv ) + return wxEmptyString; + + wxString argv0 = wxTheApp->argv[0]; + if (wxIsAbsolutePath(argv0)) + return argv0; + + // Search PATH.environment variable... + wxPathList pathlist; + pathlist.AddEnvList(wxT("PATH")); + wxString path = pathlist.FindAbsoluteValidPath(argv0); + if ( path.empty() ) + return argv0; // better than nothing + + wxFileName filename(path); + filename.Normalize(); + return filename.GetFullPath(); +} + +wxStandardPaths& wxAppTraitsBase::GetStandardPaths() +{ + return gs_stdPaths; +} + +wxStandardPathsBase::wxStandardPathsBase() +{ + // Set the default information that is used when + // forming some paths (by AppendAppInfo). + // Derived classes can call this in their constructors + // to set the platform-specific settings + UseAppInfo(AppInfo_AppName); +} + +wxStandardPathsBase::~wxStandardPathsBase() +{ + // nothing to do here +} + +wxString wxStandardPathsBase::GetLocalDataDir() const +{ + return GetDataDir(); +} + +wxString wxStandardPathsBase::GetUserLocalDataDir() const +{ + return GetUserDataDir(); +} + +wxString wxStandardPathsBase::GetDocumentsDir() const +{ + return wxFileName::GetHomeDir(); +} + +wxString wxStandardPathsBase::GetAppDocumentsDir() const +{ + const wxString docsDir = GetDocumentsDir(); + wxString appDocsDir = AppendAppInfo(docsDir); + + return wxDirExists(appDocsDir) ? appDocsDir : docsDir; +} + +// return the temporary directory for the current user +wxString wxStandardPathsBase::GetTempDir() const +{ + return wxFileName::GetTempDir(); +} + +/* static */ +wxString +wxStandardPathsBase::AppendPathComponent(const wxString& dir, + const wxString& component) +{ + wxString subdir(dir); + + // empty string indicates that an error has occurred, don't touch it then + if ( !subdir.empty() ) + { + if ( !component.empty() ) + { + const wxChar ch = *(subdir.end() - 1); + if ( !wxFileName::IsPathSeparator(ch) && ch != wxT('.') ) + subdir += wxFileName::GetPathSeparator(); + + subdir += component; + } + } + + return subdir; +} + + +wxString wxStandardPathsBase::AppendAppInfo(const wxString& dir) const +{ + wxString subdir(dir); + + if ( UsesAppInfo(AppInfo_VendorName) ) + { + subdir = AppendPathComponent(subdir, wxTheApp->GetVendorName()); + } + + if ( UsesAppInfo(AppInfo_AppName) ) + { + subdir = AppendPathComponent(subdir, wxTheApp->GetAppName()); + } + + return subdir; +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/stdstream.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/stdstream.cpp new file mode 100644 index 0000000000..f7a0cecf9e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/stdstream.cpp @@ -0,0 +1,292 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/stdstream.cpp +// Purpose: Implementation of std::istream and std::ostream derived +// wrappers for wxInputStream and wxOutputStream +// Author: Jonathan Liu +// Created: 2009-05-02 +// Copyright: (c) 2009 Jonathan Liu +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ========================================================================== +// Declarations +// ========================================================================== + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS && wxUSE_STD_IOSTREAM + +#ifndef WX_PRECOMP +#endif + +#include "wx/stdstream.h" + +#include +#include +#include +#include + +// ========================================================================== +// Helpers +// ========================================================================== + +namespace +{ + +bool +IosSeekDirToWxSeekMode(std::ios_base::seekdir way, + wxSeekMode& seekMode) +{ + switch ( way ) + { + case std::ios_base::beg: + seekMode = wxFromStart; + break; + case std::ios_base::cur: + seekMode = wxFromCurrent; + break; + case std::ios_base::end: + seekMode = wxFromEnd; + break; + default: + return false; + } + + return true; +} + +} // anonymous namespace + +// ========================================================================== +// wxStdInputStreamBuffer +// ========================================================================== + +wxStdInputStreamBuffer::wxStdInputStreamBuffer(wxInputStream& stream) : + m_stream(stream), m_lastChar(EOF) +{ +} + +std::streambuf * +wxStdInputStreamBuffer::setbuf(char *WXUNUSED(s), + std::streamsize WXUNUSED(n)) +{ + return NULL; +} + +std::streampos +wxStdInputStreamBuffer::seekoff(std::streamoff off, + std::ios_base::seekdir way, + std::ios_base::openmode which) +{ + wxSeekMode seekMode; + + if ( !IosSeekDirToWxSeekMode(way, seekMode) ) + return -1; + if ( !(which & std::ios_base::in) ) + return -1; + + off_t newPos = m_stream.SeekI((off_t) off, seekMode); + + if ( newPos != wxInvalidOffset ) + return (std::streampos) newPos; + else + return -1; +} + +std::streampos +wxStdInputStreamBuffer::seekpos(std::streampos sp, + std::ios_base::openmode which) +{ + if ( !(which & std::ios_base::in) ) + return -1; + + off_t newPos = m_stream.SeekI((off_t) sp); + + if ( newPos != wxInvalidOffset ) + return (std::streampos) newPos; + else + return -1; +} + +std::streamsize +wxStdInputStreamBuffer::showmanyc() +{ + if ( m_stream.CanRead() && (off_t) m_stream.GetSize() > m_stream.TellI() ) + return m_stream.GetSize() - m_stream.TellI(); + else + return 0; +} + +std::streamsize +wxStdInputStreamBuffer::xsgetn(char *s, std::streamsize n) +{ + m_stream.Read((void *) s, (size_t) n); + + std::streamsize read = m_stream.LastRead(); + + if ( read > 0 ) + m_lastChar = (unsigned char) s[read - 1]; + + return read; +} + +int +wxStdInputStreamBuffer::underflow() +{ + int ch = m_stream.GetC(); + + if ( m_stream.LastRead() == 1 ) + { + m_stream.Ungetch((char) ch); + return ch; + } + else + { + return EOF; + } +} + +int +wxStdInputStreamBuffer::uflow() +{ + int ch = m_stream.GetC(); + + if ( m_stream.LastRead() == 1 ) + { + m_lastChar = ch; + return ch; + } + else + { + return EOF; + } +} + +int +wxStdInputStreamBuffer::pbackfail(int c) +{ + if ( c == EOF ) + { + if ( m_lastChar == EOF ) + return EOF; + + c = m_lastChar; + m_lastChar = EOF; + } + + return m_stream.Ungetch((char) c) ? c : EOF; +} + +// ========================================================================== +// wxStdOutputStreamBuffer +// ========================================================================== + +wxStdOutputStreamBuffer::wxStdOutputStreamBuffer(wxOutputStream& stream) : + m_stream(stream) +{ +} + +std::streambuf * +wxStdOutputStreamBuffer::setbuf(char *WXUNUSED(s), + std::streamsize WXUNUSED(n)) +{ + return NULL; +} + +std::streampos +wxStdOutputStreamBuffer::seekoff(std::streamoff off, + std::ios_base::seekdir way, + std::ios_base::openmode which) +{ + wxSeekMode seekMode; + + if ( !IosSeekDirToWxSeekMode(way, seekMode) ) + return -1; + if ( !(which & std::ios_base::out) ) + return -1; + + off_t newPos = m_stream.SeekO((off_t) off, seekMode); + + if ( newPos != wxInvalidOffset ) + return (std::streampos) newPos; + else + return -1; +} + +std::streampos +wxStdOutputStreamBuffer::seekpos(std::streampos sp, + std::ios_base::openmode which) +{ + if ( !(which & std::ios_base::out) ) + return -1; + + off_t newPos = m_stream.SeekO((off_t) sp); + + if ( newPos != wxInvalidOffset ) + return (std::streampos) newPos; + else + return -1; +} + +std::streamsize +wxStdOutputStreamBuffer::xsputn(const char *s, + std::streamsize n) +{ + m_stream.Write((const void *) s, (size_t) n); + return (std::streamsize) m_stream.LastWrite(); +} + +int +wxStdOutputStreamBuffer::overflow(int c) +{ + m_stream.PutC(c); + return m_stream.IsOk() ? c : EOF; +} + +// ========================================================================== +// wxStdInputStream and wxStdOutputStream +// ========================================================================== + +// FIXME-VC6: it is impossible to call basic_ios::init() with this +// compiler, it complains about invalid call to non-static member +// function so use a suspicious (as it uses a pointer to not yet +// constructed streambuf) but working workaround +// +// It also doesn't like using istream in the ctor initializer list +// and we must spell it out as basic_istream. +#ifdef __VISUALC6__ + +wxStdInputStream::wxStdInputStream(wxInputStream& stream) + : std::basic_istream >(&m_streamBuffer), + m_streamBuffer(stream) +{ +} + +wxStdOutputStream::wxStdOutputStream(wxOutputStream& stream) + : std::basic_ostream >(&m_streamBuffer), + m_streamBuffer(stream) +{ +} + +#else // !VC6 + +wxStdInputStream::wxStdInputStream(wxInputStream& stream) : + std::istream(NULL), m_streamBuffer(stream) +{ + std::ios::init(&m_streamBuffer); +} + +wxStdOutputStream::wxStdOutputStream(wxOutputStream& stream) : + std::ostream(NULL), m_streamBuffer(stream) +{ + std::ios::init(&m_streamBuffer); +} + +#endif // VC6/!VC6 + +#endif // wxUSE_STREAMS && wxUSE_STD_IOSTREAM diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/stockitem.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/stockitem.cpp new file mode 100644 index 0000000000..fad05d7b8e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/stockitem.cpp @@ -0,0 +1,339 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/stockitem.cpp +// Purpose: Stock buttons, menu and toolbar items labels +// Author: Vaclav Slavik +// Modified by: +// Created: 2004-08-15 +// Copyright: (c) Vaclav Slavik, 2004 +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/stockitem.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/utils.h" // for wxStripMenuCodes() +#endif + +bool wxIsStockID(wxWindowID id) +{ + switch (id) + { + case wxID_ABOUT: + case wxID_ADD: + case wxID_APPLY: + case wxID_BACKWARD: + case wxID_BOLD: + case wxID_BOTTOM: + case wxID_CANCEL: + case wxID_CDROM: + case wxID_CLEAR: + case wxID_CLOSE: + case wxID_CONVERT: + case wxID_COPY: + case wxID_CUT: + case wxID_DELETE: + case wxID_DOWN: + case wxID_EDIT: + case wxID_EXECUTE: + case wxID_EXIT: + case wxID_FILE: + case wxID_FIND: + case wxID_FIRST: + case wxID_FLOPPY: + case wxID_FORWARD: + case wxID_HARDDISK: + case wxID_HELP: + case wxID_HOME: + case wxID_INDENT: + case wxID_INDEX: + case wxID_INFO: + case wxID_ITALIC: + case wxID_JUMP_TO: + case wxID_JUSTIFY_CENTER: + case wxID_JUSTIFY_FILL: + case wxID_JUSTIFY_LEFT: + case wxID_JUSTIFY_RIGHT: + case wxID_LAST: + case wxID_NETWORK: + case wxID_NEW: + case wxID_NO: + case wxID_OK: + case wxID_OPEN: + case wxID_PASTE: + case wxID_PREFERENCES: + case wxID_PREVIEW: + case wxID_PRINT: + case wxID_PROPERTIES: + case wxID_REDO: + case wxID_REFRESH: + case wxID_REMOVE: + case wxID_REPLACE: + case wxID_REVERT_TO_SAVED: + case wxID_SAVE: + case wxID_SAVEAS: + case wxID_SELECTALL: + case wxID_SELECT_COLOR: + case wxID_SELECT_FONT: + case wxID_SORT_ASCENDING: + case wxID_SORT_DESCENDING: + case wxID_SPELL_CHECK: + case wxID_STOP: + case wxID_STRIKETHROUGH: + case wxID_TOP: + case wxID_UNDELETE: + case wxID_UNDERLINE: + case wxID_UNDO: + case wxID_UNINDENT: + case wxID_UP: + case wxID_YES: + case wxID_ZOOM_100: + case wxID_ZOOM_FIT: + case wxID_ZOOM_IN: + case wxID_ZOOM_OUT: + return true; + + default: + return false; + } +} + +wxString wxGetStockLabel(wxWindowID id, long flags) +{ + wxString stockLabel; + +#ifdef __WXMSW__ + // special case: the "Cancel" button shouldn't have a mnemonic under MSW + // for consistency with the native dialogs (which don't use any mnemonic + // for it because it is already bound to Esc implicitly) + if ( id == wxID_CANCEL ) + flags &= ~wxSTOCK_WITH_MNEMONIC; +#endif // __WXMSW__ + + + #define STOCKITEM(stockid, labelWithMnemonic, labelPlain) \ + case stockid: \ + if(flags & wxSTOCK_WITH_MNEMONIC) \ + stockLabel = labelWithMnemonic; \ + else \ + stockLabel = labelPlain; \ + break + + switch (id) + { + STOCKITEM(wxID_ABOUT, _("&About"), _("About")); + STOCKITEM(wxID_ADD, _("Add"), _("Add")); + STOCKITEM(wxID_APPLY, _("&Apply"), _("Apply")); + STOCKITEM(wxID_BACKWARD, _("&Back"), _("Back")); + STOCKITEM(wxID_BOLD, _("&Bold"), _("Bold")); + STOCKITEM(wxID_BOTTOM, _("&Bottom"), _("Bottom")); + STOCKITEM(wxID_CANCEL, _("&Cancel"), _("Cancel")); + STOCKITEM(wxID_CDROM, _("&CD-Rom"), _("CD-Rom")); + STOCKITEM(wxID_CLEAR, _("&Clear"), _("Clear")); + STOCKITEM(wxID_CLOSE, _("&Close"), _("Close")); + STOCKITEM(wxID_CONVERT, _("&Convert"), _("Convert")); + STOCKITEM(wxID_COPY, _("&Copy"), _("Copy")); + STOCKITEM(wxID_CUT, _("Cu&t"), _("Cut")); + STOCKITEM(wxID_DELETE, _("&Delete"), _("Delete")); + STOCKITEM(wxID_DOWN, _("&Down"), _("Down")); + STOCKITEM(wxID_EDIT, _("&Edit"), _("Edit")); + STOCKITEM(wxID_EXECUTE, _("&Execute"), _("Execute")); + STOCKITEM(wxID_EXIT, _("&Quit"), _("Quit")); + STOCKITEM(wxID_FILE, _("&File"), _("File")); + STOCKITEM(wxID_FIND, _("&Find"), _("Find")); + STOCKITEM(wxID_FIRST, _("&First"), _("First")); + STOCKITEM(wxID_FLOPPY, _("&Floppy"), _("Floppy")); + STOCKITEM(wxID_FORWARD, _("&Forward"), _("Forward")); + STOCKITEM(wxID_HARDDISK, _("&Harddisk"), _("Harddisk")); + STOCKITEM(wxID_HELP, _("&Help"), _("Help")); + STOCKITEM(wxID_HOME, _("&Home"), _("Home")); + STOCKITEM(wxID_INDENT, _("Indent"), _("Indent")); + STOCKITEM(wxID_INDEX, _("&Index"), _("Index")); + STOCKITEM(wxID_INFO, _("&Info"), _("Info")); + STOCKITEM(wxID_ITALIC, _("&Italic"), _("Italic")); + STOCKITEM(wxID_JUMP_TO, _("&Jump to"), _("Jump to")); + STOCKITEM(wxID_JUSTIFY_CENTER, _("Centered"), _("Centered")); + STOCKITEM(wxID_JUSTIFY_FILL, _("Justified"), _("Justified")); + STOCKITEM(wxID_JUSTIFY_LEFT, _("Align Left"), _("Align Left")); + STOCKITEM(wxID_JUSTIFY_RIGHT, _("Align Right"), _("Align Right")); + STOCKITEM(wxID_LAST, _("&Last"), _("Last")); + STOCKITEM(wxID_NETWORK, _("&Network"), _("Network")); + STOCKITEM(wxID_NEW, _("&New"), _("New")); + STOCKITEM(wxID_NO, _("&No"), _("No")); + STOCKITEM(wxID_OK, _("&OK"), _("OK")); + STOCKITEM(wxID_OPEN, _("&Open..."), _("Open...")); + STOCKITEM(wxID_PASTE, _("&Paste"), _("Paste")); + STOCKITEM(wxID_PREFERENCES, _("&Preferences"), _("Preferences")); + STOCKITEM(wxID_PREVIEW, _("Print previe&w..."), _("Print preview...")); + STOCKITEM(wxID_PRINT, _("&Print..."), _("Print...")); + STOCKITEM(wxID_PROPERTIES, _("&Properties"), _("Properties")); + STOCKITEM(wxID_REDO, _("&Redo"), _("Redo")); + STOCKITEM(wxID_REFRESH, _("Refresh"), _("Refresh")); + STOCKITEM(wxID_REMOVE, _("Remove"), _("Remove")); + STOCKITEM(wxID_REPLACE, _("Rep&lace"), _("Replace")); + STOCKITEM(wxID_REVERT_TO_SAVED, _("Revert to Saved"), _("Revert to Saved")); + STOCKITEM(wxID_SAVE, _("&Save"), _("Save")); + STOCKITEM(wxID_SAVEAS, _("&Save as"), _("Save as")); + STOCKITEM(wxID_SELECTALL, _("Select &All"), _("Select All")); + STOCKITEM(wxID_SELECT_COLOR, _("&Color"), _("Color")); + STOCKITEM(wxID_SELECT_FONT, _("&Font"), _("Font")); + STOCKITEM(wxID_SORT_ASCENDING, _("&Ascending"), _("Ascending")); + STOCKITEM(wxID_SORT_DESCENDING, _("&Descending"), _("Descending")); + STOCKITEM(wxID_SPELL_CHECK, _("&Spell Check"), _("Spell Check")); + STOCKITEM(wxID_STOP, _("&Stop"), _("Stop")); + STOCKITEM(wxID_STRIKETHROUGH, _("&Strikethrough"), _("Strikethrough")); + STOCKITEM(wxID_TOP, _("&Top"), _("Top")); + STOCKITEM(wxID_UNDELETE, _("Undelete"), _("Undelete")); + STOCKITEM(wxID_UNDERLINE, _("&Underline"), _("Underline")); + STOCKITEM(wxID_UNDO, _("&Undo"), _("Undo")); + STOCKITEM(wxID_UNINDENT, _("&Unindent"), _("Unindent")); + STOCKITEM(wxID_UP, _("&Up"), _("Up")); + STOCKITEM(wxID_YES, _("&Yes"), _("Yes")); + STOCKITEM(wxID_ZOOM_100, _("&Actual Size"), _("Actual Size")); + STOCKITEM(wxID_ZOOM_FIT, _("Zoom to &Fit"), _("Zoom to Fit")); + STOCKITEM(wxID_ZOOM_IN, _("Zoom &In"), _("Zoom In")); + STOCKITEM(wxID_ZOOM_OUT, _("Zoom &Out"), _("Zoom Out")); + + default: + wxFAIL_MSG( wxT("invalid stock item ID") ); + break; + }; + + #undef STOCKITEM + + if ( flags & wxSTOCK_WITHOUT_ELLIPSIS ) + { + wxString baseLabel; + if ( stockLabel.EndsWith("...", &baseLabel) ) + stockLabel = baseLabel; + + // accelerators only make sense for the menu items which should have + // ellipsis too while wxSTOCK_WITHOUT_ELLIPSIS is mostly useful for + // buttons which shouldn't have accelerators in their labels + wxASSERT_MSG( !(flags & wxSTOCK_WITH_ACCELERATOR), + "labels without ellipsis shouldn't use accelerators" ); + } + +#if wxUSE_ACCEL + if ( !stockLabel.empty() && (flags & wxSTOCK_WITH_ACCELERATOR) ) + { + wxAcceleratorEntry accel = wxGetStockAccelerator(id); + if (accel.IsOk()) + stockLabel << wxT('\t') << accel.ToString(); + } +#endif // wxUSE_ACCEL + + return stockLabel; +} + +wxString wxGetStockHelpString(wxWindowID id, wxStockHelpStringClient client) +{ + wxString stockHelp; + + #define STOCKITEM(stockid, ctx, helpstr) \ + case stockid: \ + if (client==ctx) stockHelp = helpstr; \ + break; + + switch (id) + { + // NB: these help string should be not too specific as they could be used + // in completely different programs! + STOCKITEM(wxID_ABOUT, wxSTOCK_MENU, _("Show about dialog")) + STOCKITEM(wxID_COPY, wxSTOCK_MENU, _("Copy selection")) + STOCKITEM(wxID_CUT, wxSTOCK_MENU, _("Cut selection")) + STOCKITEM(wxID_DELETE, wxSTOCK_MENU, _("Delete selection")) + STOCKITEM(wxID_REPLACE, wxSTOCK_MENU, _("Replace selection")) + STOCKITEM(wxID_PASTE, wxSTOCK_MENU, _("Paste selection")) + STOCKITEM(wxID_EXIT, wxSTOCK_MENU, _("Quit this program")) + STOCKITEM(wxID_REDO, wxSTOCK_MENU, _("Redo last action")) + STOCKITEM(wxID_UNDO, wxSTOCK_MENU, _("Undo last action")) + STOCKITEM(wxID_CLOSE, wxSTOCK_MENU, _("Close current document")) + STOCKITEM(wxID_SAVE, wxSTOCK_MENU, _("Save current document")) + STOCKITEM(wxID_SAVEAS, wxSTOCK_MENU, _("Save current document with a different filename")) + + default: + // there's no stock help string for this ID / client + return wxEmptyString; + } + + #undef STOCKITEM + + return stockHelp; +} + +#if wxUSE_ACCEL + +wxAcceleratorEntry wxGetStockAccelerator(wxWindowID id) +{ + wxAcceleratorEntry ret; + + #define STOCKITEM(stockid, flags, keycode) \ + case stockid: \ + ret.Set(flags, keycode, stockid); \ + break; + + switch (id) + { + STOCKITEM(wxID_COPY, wxACCEL_CTRL,'C') + STOCKITEM(wxID_CUT, wxACCEL_CTRL,'X') + STOCKITEM(wxID_FIND, wxACCEL_CTRL,'F') + STOCKITEM(wxID_HELP, wxACCEL_CTRL,'H') + STOCKITEM(wxID_NEW, wxACCEL_CTRL,'N') + STOCKITEM(wxID_OPEN, wxACCEL_CTRL,'O') + STOCKITEM(wxID_PASTE, wxACCEL_CTRL,'V') + STOCKITEM(wxID_PRINT, wxACCEL_CTRL,'P') + STOCKITEM(wxID_REDO, wxACCEL_CTRL | wxACCEL_SHIFT,'Z') + STOCKITEM(wxID_REPLACE, wxACCEL_CTRL,'R') + STOCKITEM(wxID_SAVE, wxACCEL_CTRL,'S') + STOCKITEM(wxID_UNDO, wxACCEL_CTRL,'Z') +#ifdef __WXOSX__ + STOCKITEM(wxID_PREFERENCES, wxACCEL_CTRL,',') +#endif + + default: + // set the wxAcceleratorEntry to return into an invalid state: + // there's no stock accelerator for that. + ret.Set(0, 0, id); + break; + }; + + #undef STOCKITEM + + // always use wxAcceleratorEntry::IsOk on returned value ! + return ret; +} + +#endif // wxUSE_ACCEL + +bool wxIsStockLabel(wxWindowID id, const wxString& label) +{ + if (label.empty()) + return true; + + wxString stock = wxGetStockLabel(id); + + if (label == stock) + return true; + + stock.Replace(wxT("&"), wxEmptyString); + if (label == stock) + return true; + + return false; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/stopwatch.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/stopwatch.cpp new file mode 100644 index 0000000000..47745b8085 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/stopwatch.cpp @@ -0,0 +1,190 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/stopwatch.cpp +// Purpose: wxStopWatch and other non-GUI stuff from wx/timer.h +// Author: +// Original version by Julian Smart +// Vadim Zeitlin got rid of all ifdefs (11.12.99) +// Sylvain Bougnoux added wxStopWatch class +// Guillermo Rodriguez rewrote from scratch (Dic/99) +// Modified by: +// Created: 20.06.2003 (extracted from common/timercmn.cpp) +// Copyright: (c) 1998-2003 wxWidgets Team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/stopwatch.h" + +#if wxUSE_STOPWATCH + +#ifndef WX_PRECOMP + #ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" + #endif + #include "wx/log.h" + #include "wx/thread.h" +#endif //WX_PRECOMP + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxStopWatch +// ---------------------------------------------------------------------------- + +namespace +{ + +#ifdef __WINDOWS__ + +struct PerfCounter +{ + PerfCounter() + { + init = false; + } + + bool CanBeUsed() const + { + return freq.QuadPart != 0; + } + + wxCRIT_SECT_DECLARE_MEMBER(cs); + LARGE_INTEGER freq; + bool init; +} gs_perfCounter; + +#endif // __WINDOWS__ + +const int MILLISECONDS_PER_SECOND = 1000; +const int MICROSECONDS_PER_SECOND = 1000*1000; + +} // anonymous namespace + +void wxStopWatch::DoStart() +{ +#ifdef __WINDOWS__ + if ( !gs_perfCounter.init ) + { + wxCRIT_SECT_LOCKER(lock, gs_perfCounter.cs); + ::QueryPerformanceFrequency(&gs_perfCounter.freq); + + // Just a sanity check: it's not supposed to happen but verify that + // ::QueryPerformanceCounter() succeeds so that we can really use it. + LARGE_INTEGER counter; + if ( !::QueryPerformanceCounter(&counter) ) + { + wxLogDebug("QueryPerformanceCounter() unexpected failed (%s), " + "will not use it.", wxSysErrorMsg()); + + gs_perfCounter.freq.QuadPart = 0; + } + + gs_perfCounter.init = true; + } +#endif // __WINDOWS__ + + m_t0 = GetCurrentClockValue(); +} + +wxLongLong wxStopWatch::GetClockFreq() const +{ +#ifdef __WINDOWS__ + // Under MSW we use the high resolution performance counter timer which has + // its own frequency (usually related to the CPU clock speed). + if ( gs_perfCounter.CanBeUsed() ) + return gs_perfCounter.freq.QuadPart; +#endif // __WINDOWS__ + +#ifdef HAVE_GETTIMEOFDAY + // With gettimeofday() we can have nominally microsecond precision and + // while this is not the case in practice, it's still better than + // millisecond. + return MICROSECONDS_PER_SECOND; +#else // !HAVE_GETTIMEOFDAY + // Currently milliseconds are used everywhere else. + return MILLISECONDS_PER_SECOND; +#endif // HAVE_GETTIMEOFDAY/!HAVE_GETTIMEOFDAY +} + +void wxStopWatch::Start(long t0) +{ + // Calling Start() makes the stop watch run however many times it was + // paused before. + m_pauseCount = 0; + + DoStart(); + + m_t0 -= (wxLongLong(t0)*GetClockFreq())/MILLISECONDS_PER_SECOND; +} + +wxLongLong wxStopWatch::GetCurrentClockValue() const +{ +#ifdef __WINDOWS__ + if ( gs_perfCounter.CanBeUsed() ) + { + LARGE_INTEGER counter; + ::QueryPerformanceCounter(&counter); + return counter.QuadPart; + } +#endif // __WINDOWS__ + +#ifdef HAVE_GETTIMEOFDAY + return wxGetUTCTimeUSec(); +#else // !HAVE_GETTIMEOFDAY + return wxGetUTCTimeMillis(); +#endif // HAVE_GETTIMEOFDAY/!HAVE_GETTIMEOFDAY +} + +wxLongLong wxStopWatch::TimeInMicro() const +{ + const wxLongLong elapsed(m_pauseCount ? m_elapsedBeforePause + : GetCurrentClockValue() - m_t0); + + return (elapsed*MICROSECONDS_PER_SECOND)/GetClockFreq(); +} + +#endif // wxUSE_STOPWATCH + +// ---------------------------------------------------------------------------- +// old timer functions superceded by wxStopWatch +// ---------------------------------------------------------------------------- + +#if wxUSE_LONGLONG + +static wxLongLong wxStartTime = 0l; + +// starts the global timer +void wxStartTimer() +{ + wxStartTime = wxGetUTCTimeMillis(); +} + +// Returns elapsed time in milliseconds +long wxGetElapsedTime(bool resetTimer) +{ + wxLongLong oldTime = wxStartTime; + wxLongLong newTime = wxGetUTCTimeMillis(); + + if ( resetTimer ) + wxStartTime = newTime; + + return (newTime - oldTime).GetLo(); +} + +#endif // wxUSE_LONGLONG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/strconv.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/strconv.cpp new file mode 100644 index 0000000000..b2eaa71576 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/strconv.cpp @@ -0,0 +1,3472 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/strconv.cpp +// Purpose: Unicode conversion classes +// Author: Ove Kaaven, Robert Roebling, Vadim Zeitlin, Vaclav Slavik, +// Ryan Norton, Fredrik Roubert (UTF7) +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1999 Ove Kaaven, Robert Roebling, Vaclav Slavik +// (c) 2000-2003 Vadim Zeitlin +// (c) 2004 Ryan Norton, Fredrik Roubert +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif //__BORLANDC__ + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/hashmap.h" +#endif + +#include "wx/strconv.h" + +#ifndef __WXWINCE__ +#include +#endif + +#include +#include +#include + +#if defined(__WIN32__) && !defined(__WXMICROWIN__) + #include "wx/msw/private.h" + #include "wx/msw/missing.h" + #define wxHAVE_WIN32_MB2WC +#endif + +#ifdef HAVE_ICONV + #include + #include "wx/thread.h" +#endif + +#include "wx/encconv.h" +#include "wx/fontmap.h" + +#ifdef __DARWIN__ +#include "wx/osx/core/private/strconv_cf.h" +#endif //def __DARWIN__ + + +#define TRACE_STRCONV wxT("strconv") + +// WC_UTF16 is defined only if sizeof(wchar_t) == 2, otherwise it's supposed to +// be 4 bytes +#if SIZEOF_WCHAR_T == 2 + #define WC_UTF16 +#endif + + +// ============================================================================ +// implementation +// ============================================================================ + +// helper function of cMB2WC(): check if n bytes at this location are all NUL +static bool NotAllNULs(const char *p, size_t n) +{ + while ( n && *p++ == '\0' ) + n--; + + return n != 0; +} + +// ---------------------------------------------------------------------------- +// UTF-16 en/decoding to/from UCS-4 with surrogates handling +// ---------------------------------------------------------------------------- + +static size_t encode_utf16(wxUint32 input, wxUint16 *output) +{ + if (input <= 0xffff) + { + if (output) + *output = (wxUint16) input; + + return 1; + } + else if (input >= 0x110000) + { + return wxCONV_FAILED; + } + else + { + if (output) + { + *output++ = (wxUint16) ((input >> 10) + 0xd7c0); + *output = (wxUint16) ((input & 0x3ff) + 0xdc00); + } + + return 2; + } +} + +static size_t decode_utf16(const wxUint16* input, wxUint32& output) +{ + if ((*input < 0xd800) || (*input > 0xdfff)) + { + output = *input; + return 1; + } + else if ((input[1] < 0xdc00) || (input[1] > 0xdfff)) + { + output = *input; + return wxCONV_FAILED; + } + else + { + output = ((input[0] - 0xd7c0) << 10) + (input[1] - 0xdc00); + return 2; + } +} + +#ifdef WC_UTF16 + typedef wchar_t wxDecodeSurrogate_t; +#else // !WC_UTF16 + typedef wxUint16 wxDecodeSurrogate_t; +#endif // WC_UTF16/!WC_UTF16 + +// returns the next UTF-32 character from the wchar_t buffer and advances the +// pointer to the character after this one +// +// if an invalid character is found, *pSrc is set to NULL, the caller must +// check for this +static wxUint32 wxDecodeSurrogate(const wxDecodeSurrogate_t **pSrc) +{ + wxUint32 out; + const size_t + n = decode_utf16(reinterpret_cast(*pSrc), out); + if ( n == wxCONV_FAILED ) + *pSrc = NULL; + else + *pSrc += n; + + return out; +} + +// ---------------------------------------------------------------------------- +// wxMBConv +// ---------------------------------------------------------------------------- + +size_t +wxMBConv::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + // although new conversion classes are supposed to implement this function + // directly, the existing ones only implement the old MB2WC() and so, to + // avoid to have to rewrite all conversion classes at once, we provide a + // default (but not efficient) implementation of this one in terms of the + // old function by copying the input to ensure that it's NUL-terminated and + // then using MB2WC() to convert it + // + // moreover, some conversion classes simply can't implement ToWChar() + // directly, the primary example is wxConvLibc: mbstowcs() only handles + // NUL-terminated strings + + // the number of chars [which would be] written to dst [if it were not NULL] + size_t dstWritten = 0; + + // the number of NULs terminating this string + size_t nulLen = 0; // not really needed, but just to avoid warnings + + // if we were not given the input size we just have to assume that the + // string is properly terminated as we have no way of knowing how long it + // is anyhow, but if we do have the size check whether there are enough + // NULs at the end + wxCharBuffer bufTmp; + const char *srcEnd; + if ( srcLen != wxNO_LEN ) + { + // we need to know how to find the end of this string + nulLen = GetMBNulLen(); + if ( nulLen == wxCONV_FAILED ) + return wxCONV_FAILED; + + // if there are enough NULs we can avoid the copy + if ( srcLen < nulLen || NotAllNULs(src + srcLen - nulLen, nulLen) ) + { + // make a copy in order to properly NUL-terminate the string + bufTmp = wxCharBuffer(srcLen + nulLen - 1 /* 1 will be added */); + char * const p = bufTmp.data(); + memcpy(p, src, srcLen); + for ( char *s = p + srcLen; s < p + srcLen + nulLen; s++ ) + *s = '\0'; + + src = bufTmp; + } + + srcEnd = src + srcLen; + } + else // quit after the first loop iteration + { + srcEnd = NULL; + } + + // the idea of this code is straightforward: it converts a NUL-terminated + // chunk of the string during each iteration and updates the output buffer + // with the result + // + // all the complication come from the fact that this function, for + // historical reasons, must behave in 2 subtly different ways when it's + // called with a fixed number of characters and when it's called for the + // entire NUL-terminated string: in the former case (srcEnd != NULL) we + // must count all characters we convert, NUL or not; but in the latter we + // do not count the trailing NUL -- but still count all the NULs inside the + // string + // + // so for the (simple) former case we just always count the trailing NUL, + // but for the latter we need to wait until we see if there is going to be + // another loop iteration and only count it then + for ( ;; ) + { + // try to convert the current chunk + size_t lenChunk = MB2WC(NULL, src, 0); + if ( lenChunk == wxCONV_FAILED ) + return wxCONV_FAILED; + + dstWritten += lenChunk; + if ( !srcEnd ) + dstWritten++; + + if ( !lenChunk ) + { + // nothing left in the input string, conversion succeeded + break; + } + + if ( dst ) + { + if ( dstWritten > dstLen ) + return wxCONV_FAILED; + + // +1 is for trailing NUL + if ( MB2WC(dst, src, lenChunk + 1) == wxCONV_FAILED ) + return wxCONV_FAILED; + + dst += lenChunk; + if ( !srcEnd ) + dst++; + } + + if ( !srcEnd ) + { + // we convert just one chunk in this case as this is the entire + // string anyhow (and we don't count the trailing NUL in this case) + break; + } + + // advance the input pointer past the end of this chunk: notice that we + // will always stop before srcEnd because we know that the chunk is + // always properly NUL-terminated + while ( NotAllNULs(src, nulLen) ) + { + // notice that we must skip over multiple bytes here as we suppose + // that if NUL takes 2 or 4 bytes, then all the other characters do + // too and so if advanced by a single byte we might erroneously + // detect sequences of NUL bytes in the middle of the input + src += nulLen; + } + + // if the buffer ends before this NUL, we shouldn't count it in our + // output so skip the code below + if ( src == srcEnd ) + break; + + // do count this terminator as it's inside the buffer we convert + dstWritten++; + if ( dst ) + dst++; + + src += nulLen; // skip the terminator itself + + if ( src >= srcEnd ) + break; + } + + return dstWritten; +} + +size_t +wxMBConv::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + // the number of chars [which would be] written to dst [if it were not NULL] + size_t dstWritten = 0; + + // if we don't know its length we have no choice but to assume that it is + // NUL-terminated (notice that it can still be NUL-terminated even if + // explicit length is given but it doesn't change our return value) + const bool isNulTerminated = srcLen == wxNO_LEN; + + // make a copy of the input string unless it is already properly + // NUL-terminated + wxWCharBuffer bufTmp; + if ( isNulTerminated ) + { + srcLen = wxWcslen(src) + 1; + } + else if ( srcLen != 0 && src[srcLen - 1] != L'\0' ) + { + // make a copy in order to properly NUL-terminate the string + bufTmp = wxWCharBuffer(srcLen); + memcpy(bufTmp.data(), src, srcLen * sizeof(wchar_t)); + src = bufTmp; + } + + const size_t lenNul = GetMBNulLen(); + for ( const wchar_t * const srcEnd = src + srcLen; + src < srcEnd; + src++ /* skip L'\0' too */ ) + { + // try to convert the current chunk + size_t lenChunk = WC2MB(NULL, src, 0); + if ( lenChunk == wxCONV_FAILED ) + return wxCONV_FAILED; + + dstWritten += lenChunk; + + const wchar_t * const + chunkEnd = isNulTerminated ? srcEnd - 1 : src + wxWcslen(src); + + // our return value accounts for the trailing NUL(s), unlike that of + // WC2MB(), however don't do it for the last NUL we artificially added + // ourselves above + if ( chunkEnd < srcEnd ) + dstWritten += lenNul; + + if ( dst ) + { + if ( dstWritten > dstLen ) + return wxCONV_FAILED; + + // if we know that there is enough space in the destination buffer + // (because we accounted for lenNul in dstWritten above), we can + // convert directly in place -- but otherwise we need another + // temporary buffer to ensure that we don't overwrite the output + wxCharBuffer dstBuf; + char *dstTmp; + if ( chunkEnd == srcEnd ) + { + dstBuf = wxCharBuffer(lenChunk + lenNul - 1); + dstTmp = dstBuf.data(); + } + else + { + dstTmp = dst; + } + + if ( WC2MB(dstTmp, src, lenChunk + lenNul) == wxCONV_FAILED ) + return wxCONV_FAILED; + + if ( dstTmp != dst ) + { + // copy everything up to but excluding the terminating NUL(s) + // into the real output buffer + memcpy(dst, dstTmp, lenChunk); + + // micro-optimization: if dstTmp != dst it means that chunkEnd + // == srcEnd and so we're done, no need to update anything below + break; + } + + dst += lenChunk; + if ( chunkEnd < srcEnd ) + dst += lenNul; + } + + src = chunkEnd; + } + + return dstWritten; +} + +size_t wxMBConv::MB2WC(wchar_t *outBuff, const char *inBuff, size_t outLen) const +{ + size_t rc = ToWChar(outBuff, outLen, inBuff); + if ( rc != wxCONV_FAILED ) + { + // ToWChar() returns the buffer length, i.e. including the trailing + // NUL, while this method doesn't take it into account + rc--; + } + + return rc; +} + +size_t wxMBConv::WC2MB(char *outBuff, const wchar_t *inBuff, size_t outLen) const +{ + size_t rc = FromWChar(outBuff, outLen, inBuff); + if ( rc != wxCONV_FAILED ) + { + rc -= GetMBNulLen(); + } + + return rc; +} + +wxMBConv::~wxMBConv() +{ + // nothing to do here (necessary for Darwin linking probably) +} + +const wxWCharBuffer wxMBConv::cMB2WC(const char *psz) const +{ + if ( psz ) + { + // calculate the length of the buffer needed first + const size_t nLen = ToWChar(NULL, 0, psz); + if ( nLen != wxCONV_FAILED ) + { + // now do the actual conversion + wxWCharBuffer buf(nLen - 1 /* +1 added implicitly */); + + // +1 for the trailing NULL + if ( ToWChar(buf.data(), nLen, psz) != wxCONV_FAILED ) + return buf; + } + } + + return wxWCharBuffer(); +} + +const wxCharBuffer wxMBConv::cWC2MB(const wchar_t *pwz) const +{ + if ( pwz ) + { + const size_t nLen = FromWChar(NULL, 0, pwz); + if ( nLen != wxCONV_FAILED ) + { + wxCharBuffer buf(nLen - 1); + if ( FromWChar(buf.data(), nLen, pwz) != wxCONV_FAILED ) + return buf; + } + } + + return wxCharBuffer(); +} + +const wxWCharBuffer +wxMBConv::cMB2WC(const char *inBuff, size_t inLen, size_t *outLen) const +{ + const size_t dstLen = ToWChar(NULL, 0, inBuff, inLen); + if ( dstLen != wxCONV_FAILED ) + { + // notice that we allocate space for dstLen+1 wide characters here + // because we want the buffer to always be NUL-terminated, even if the + // input isn't (as otherwise the caller has no way to know its length) + wxWCharBuffer wbuf(dstLen); + if ( ToWChar(wbuf.data(), dstLen, inBuff, inLen) != wxCONV_FAILED ) + { + if ( outLen ) + { + *outLen = dstLen; + + // we also need to handle NUL-terminated input strings + // specially: for them the output is the length of the string + // excluding the trailing NUL, however if we're asked to + // convert a specific number of characters we return the length + // of the resulting output even if it's NUL-terminated + if ( inLen == wxNO_LEN ) + (*outLen)--; + } + + return wbuf; + } + } + + if ( outLen ) + *outLen = 0; + + return wxWCharBuffer(); +} + +const wxCharBuffer +wxMBConv::cWC2MB(const wchar_t *inBuff, size_t inLen, size_t *outLen) const +{ + size_t dstLen = FromWChar(NULL, 0, inBuff, inLen); + if ( dstLen != wxCONV_FAILED ) + { + const size_t nulLen = GetMBNulLen(); + + // as above, ensure that the buffer is always NUL-terminated, even if + // the input is not + wxCharBuffer buf(dstLen + nulLen - 1); + memset(buf.data() + dstLen, 0, nulLen); + if ( FromWChar(buf.data(), dstLen, inBuff, inLen) != wxCONV_FAILED ) + { + if ( outLen ) + { + *outLen = dstLen; + + if ( inLen == wxNO_LEN ) + { + // in this case both input and output are NUL-terminated + // and we're not supposed to count NUL + *outLen -= nulLen; + } + } + + return buf; + } + } + + if ( outLen ) + *outLen = 0; + + return wxCharBuffer(); +} + +const wxWCharBuffer wxMBConv::cMB2WC(const wxScopedCharBuffer& buf) const +{ + const size_t srcLen = buf.length(); + if ( srcLen ) + { + const size_t dstLen = ToWChar(NULL, 0, buf, srcLen); + if ( dstLen != wxCONV_FAILED ) + { + wxWCharBuffer wbuf(dstLen); + wbuf.data()[dstLen] = L'\0'; + if ( ToWChar(wbuf.data(), dstLen, buf, srcLen) != wxCONV_FAILED ) + return wbuf; + } + } + + return wxScopedWCharBuffer::CreateNonOwned(L"", 0); +} + +const wxCharBuffer wxMBConv::cWC2MB(const wxScopedWCharBuffer& wbuf) const +{ + const size_t srcLen = wbuf.length(); + if ( srcLen ) + { + const size_t dstLen = FromWChar(NULL, 0, wbuf, srcLen); + if ( dstLen != wxCONV_FAILED ) + { + wxCharBuffer buf(dstLen); + buf.data()[dstLen] = '\0'; + if ( FromWChar(buf.data(), dstLen, wbuf, srcLen) != wxCONV_FAILED ) + return buf; + } + } + + return wxScopedCharBuffer::CreateNonOwned("", 0); +} + +// ---------------------------------------------------------------------------- +// wxMBConvLibc +// ---------------------------------------------------------------------------- + +size_t wxMBConvLibc::MB2WC(wchar_t *buf, const char *psz, size_t n) const +{ + return wxMB2WC(buf, psz, n); +} + +size_t wxMBConvLibc::WC2MB(char *buf, const wchar_t *psz, size_t n) const +{ + return wxWC2MB(buf, psz, n); +} + +// ---------------------------------------------------------------------------- +// wxConvBrokenFileNames +// ---------------------------------------------------------------------------- + +#ifdef __UNIX__ + +wxConvBrokenFileNames::wxConvBrokenFileNames(const wxString& charset) +{ + if ( wxStricmp(charset, wxT("UTF-8")) == 0 || + wxStricmp(charset, wxT("UTF8")) == 0 ) + m_conv = new wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA); + else + m_conv = new wxCSConv(charset); +} + +#endif // __UNIX__ + +// ---------------------------------------------------------------------------- +// UTF-7 +// ---------------------------------------------------------------------------- + +// Implementation (C) 2004 Fredrik Roubert +// +// Changes to work in streaming mode (C) 2008 Vadim Zeitlin + +// +// BASE64 decoding table +// +static const unsigned char utf7unb64[] = +{ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, + 0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, + 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, + 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, + 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, + 0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff +}; + +size_t wxMBConvUTF7::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + DecoderState stateOrig, + *statePtr; + if ( srcLen == wxNO_LEN ) + { + // convert the entire string, up to and including the trailing NUL + srcLen = strlen(src) + 1; + + // when working on the entire strings we don't update nor use the shift + // state from the previous call + statePtr = &stateOrig; + } + else // when working with partial strings we do use the shift state + { + statePtr = const_cast(&m_stateDecoder); + + // also save the old state to be able to rollback to it on error + stateOrig = m_stateDecoder; + } + + // but to simplify the code below we use this variable in both cases + DecoderState& state = *statePtr; + + + // number of characters [which would have been] written to dst [if it were + // not NULL] + size_t len = 0; + + const char * const srcEnd = src + srcLen; + + while ( (src < srcEnd) && (!dst || (len < dstLen)) ) + { + const unsigned char cc = *src++; + + if ( state.IsShifted() ) + { + const unsigned char dc = utf7unb64[cc]; + if ( dc == 0xff ) + { + // end of encoded part, check that nothing was left: there can + // be up to 4 bits of 0 padding but nothing else (we also need + // to check isLSB as we count bits modulo 8 while a valid UTF-7 + // encoded sequence must contain an integral number of UTF-16 + // characters) + if ( state.isLSB || state.bit > 4 || + (state.accum & ((1 << state.bit) - 1)) ) + { + if ( !len ) + state = stateOrig; + + return wxCONV_FAILED; + } + + state.ToDirect(); + + // re-parse this character normally below unless it's '-' which + // is consumed by the decoder + if ( cc == '-' ) + continue; + } + else // valid encoded character + { + // mini base64 decoder: each character is 6 bits + state.bit += 6; + state.accum <<= 6; + state.accum += dc; + + if ( state.bit >= 8 ) + { + // got the full byte, consume it + state.bit -= 8; + unsigned char b = (state.accum >> state.bit) & 0x00ff; + + if ( state.isLSB ) + { + // we've got the full word, output it + if ( dst ) + *dst++ = (state.msb << 8) | b; + len++; + state.isLSB = false; + } + else // MSB + { + // just store it while we wait for LSB + state.msb = b; + state.isLSB = true; + } + } + } + } + + if ( state.IsDirect() ) + { + // start of an encoded segment? + if ( cc == '+' ) + { + if ( *src == '-' ) + { + // just the encoded plus sign, don't switch to shifted mode + if ( dst ) + *dst++ = '+'; + len++; + src++; + } + else if ( utf7unb64[(unsigned)*src] == 0xff ) + { + // empty encoded chunks are not allowed + if ( !len ) + state = stateOrig; + + return wxCONV_FAILED; + } + else // base-64 encoded chunk follows + { + state.ToShifted(); + } + } + else // not '+' + { + // only printable 7 bit ASCII characters (with the exception of + // NUL, TAB, CR and LF) can be used directly + if ( cc >= 0x7f || (cc < ' ' && + !(cc == '\0' || cc == '\t' || cc == '\r' || cc == '\n')) ) + return wxCONV_FAILED; + + if ( dst ) + *dst++ = cc; + len++; + } + } + } + + if ( !len ) + { + // as we didn't read any characters we should be called with the same + // data (followed by some more new data) again later so don't save our + // state + state = stateOrig; + + return wxCONV_FAILED; + } + + return len; +} + +// +// BASE64 encoding table +// +static const unsigned char utf7enb64[] = +{ + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', + 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', '0', '1', '2', '3', + '4', '5', '6', '7', '8', '9', '+', '/' +}; + +// +// UTF-7 encoding table +// +// 0 - Set D (directly encoded characters) +// 1 - Set O (optional direct characters) +// 2 - whitespace characters (optional) +// 3 - special characters +// +static const unsigned char utf7encode[128] = +{ + 0, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 2, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 3, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 3 +}; + +static inline bool wxIsUTF7Direct(wchar_t wc) +{ + return wc < 0x80 && utf7encode[wc] < 1; +} + +size_t wxMBConvUTF7::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + EncoderState stateOrig, + *statePtr; + if ( srcLen == wxNO_LEN ) + { + // we don't apply the stored state when operating on entire strings at + // once + statePtr = &stateOrig; + + srcLen = wxWcslen(src) + 1; + } + else // do use the mode we left the output in previously + { + stateOrig = m_stateEncoder; + statePtr = const_cast(&m_stateEncoder); + } + + EncoderState& state = *statePtr; + + + size_t len = 0; + + const wchar_t * const srcEnd = src + srcLen; + while ( src < srcEnd && (!dst || len < dstLen) ) + { + wchar_t cc = *src++; + if ( wxIsUTF7Direct(cc) ) + { + if ( state.IsShifted() ) + { + // pad with zeros the last encoded block if necessary + if ( state.bit ) + { + if ( dst ) + *dst++ = utf7enb64[((state.accum % 16) << (6 - state.bit)) % 64]; + len++; + } + + state.ToDirect(); + + if ( dst ) + *dst++ = '-'; + len++; + } + + if ( dst ) + *dst++ = (char)cc; + len++; + } + else if ( cc == '+' && state.IsDirect() ) + { + if ( dst ) + { + *dst++ = '+'; + *dst++ = '-'; + } + + len += 2; + } +#ifndef WC_UTF16 + else if (((wxUint32)cc) > 0xffff) + { + // no surrogate pair generation (yet?) + return wxCONV_FAILED; + } +#endif + else + { + if ( state.IsDirect() ) + { + state.ToShifted(); + + if ( dst ) + *dst++ = '+'; + len++; + } + + // BASE64 encode string + for ( ;; ) + { + for ( unsigned lsb = 0; lsb < 2; lsb++ ) + { + state.accum <<= 8; + state.accum += lsb ? cc & 0xff : (cc & 0xff00) >> 8; + + for (state.bit += 8; state.bit >= 6; ) + { + state.bit -= 6; + if ( dst ) + *dst++ = utf7enb64[(state.accum >> state.bit) % 64]; + len++; + } + } + + if ( src == srcEnd || wxIsUTF7Direct(cc = *src) ) + break; + + src++; + } + } + } + + // we need to restore the original encoder state if we were called just to + // calculate the amount of space needed as we will presumably be called + // again to really convert the data now + if ( !dst ) + state = stateOrig; + + return len; +} + +// ---------------------------------------------------------------------------- +// UTF-8 +// ---------------------------------------------------------------------------- + +static const wxUint32 utf8_max[]= + { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff, 0xffffffff }; + +// boundaries of the private use area we use to (temporarily) remap invalid +// characters invalid in a UTF-8 encoded string +const wxUint32 wxUnicodePUA = 0x100000; +const wxUint32 wxUnicodePUAEnd = wxUnicodePUA + 256; + +// this table gives the length of the UTF-8 encoding from its first character: +const unsigned char tableUtf8Lengths[256] = { + // single-byte sequences (ASCII): + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 00..0F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 10..1F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 20..2F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 30..3F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 40..4F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 50..5F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 60..6F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 70..7F + + // these are invalid: + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 80..8F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 90..9F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // A0..AF + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // B0..BF + 0, 0, // C0,C1 + + // two-byte sequences: + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C2..CF + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // D0..DF + + // three-byte sequences: + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // E0..EF + + // four-byte sequences: + 4, 4, 4, 4, 4, // F0..F4 + + // these are invalid again (5- or 6-byte + // sequences and sequences for code points + // above U+10FFFF, as restricted by RFC 3629): + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // F5..FF +}; + +size_t +wxMBConvStrictUTF8::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + wchar_t *out = dstLen ? dst : NULL; + size_t written = 0; + + if ( srcLen == wxNO_LEN ) + srcLen = strlen(src) + 1; + + for ( const char *p = src; ; p++ ) + { + if ( (srcLen == wxNO_LEN ? !*p : !srcLen) ) + { + // all done successfully, just add the trailing NULL if we are not + // using explicit length + if ( srcLen == wxNO_LEN ) + { + if ( out ) + { + if ( !dstLen ) + break; + + *out = L'\0'; + } + + written++; + } + + return written; + } + + if ( out && !dstLen-- ) + break; + + wxUint32 code; + unsigned char c = *p; + + if ( c < 0x80 ) + { + if ( srcLen == 0 ) // the test works for wxNO_LEN too + break; + + if ( srcLen != wxNO_LEN ) + srcLen--; + + code = c; + } + else + { + unsigned len = tableUtf8Lengths[c]; + if ( !len ) + break; + + if ( srcLen < len ) // the test works for wxNO_LEN too + break; + + if ( srcLen != wxNO_LEN ) + srcLen -= len; + + // Char. number range | UTF-8 octet sequence + // (hexadecimal) | (binary) + // ----------------------+---------------------------------------- + // 0000 0000 - 0000 007F | 0xxxxxxx + // 0000 0080 - 0000 07FF | 110xxxxx 10xxxxxx + // 0000 0800 - 0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx + // 0001 0000 - 0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + // + // Code point value is stored in bits marked with 'x', + // lowest-order bit of the value on the right side in the diagram + // above. (from RFC 3629) + + // mask to extract lead byte's value ('x' bits above), by sequence + // length: + static const unsigned char leadValueMask[] = { 0x7F, 0x1F, 0x0F, 0x07 }; + + // mask and value of lead byte's most significant bits, by length: + static const unsigned char leadMarkerMask[] = { 0x80, 0xE0, 0xF0, 0xF8 }; + static const unsigned char leadMarkerVal[] = { 0x00, 0xC0, 0xE0, 0xF0 }; + + len--; // it's more convenient to work with 0-based length here + + // extract the lead byte's value bits: + if ( (c & leadMarkerMask[len]) != leadMarkerVal[len] ) + break; + + code = c & leadValueMask[len]; + + // all remaining bytes, if any, are handled in the same way + // regardless of sequence's length: + for ( ; len; --len ) + { + c = *++p; + if ( (c & 0xC0) != 0x80 ) + return wxCONV_FAILED; + + code <<= 6; + code |= c & 0x3F; + } + } + +#ifdef WC_UTF16 + // cast is ok because wchar_t == wxUint16 if WC_UTF16 + if ( encode_utf16(code, (wxUint16 *)out) == 2 ) + { + if ( out ) + out++; + written++; + } +#else // !WC_UTF16 + if ( out ) + *out = code; +#endif // WC_UTF16/!WC_UTF16 + + if ( out ) + out++; + + written++; + } + + return wxCONV_FAILED; +} + +size_t +wxMBConvStrictUTF8::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + char *out = dstLen ? dst : NULL; + size_t written = 0; + + for ( const wchar_t *wp = src; ; wp++ ) + { + if ( (srcLen == wxNO_LEN ? !*wp : !srcLen) ) + { + // all done successfully, just add the trailing NULL if we are not + // using explicit length + if ( srcLen == wxNO_LEN ) + { + if ( out ) + { + if ( !dstLen ) + break; + + *out = '\0'; + } + + written++; + } + + return written; + } + + if ( srcLen != wxNO_LEN ) + srcLen--; + + wxUint32 code; +#ifdef WC_UTF16 + // cast is ok for WC_UTF16 + if ( decode_utf16((const wxUint16 *)wp, code) == 2 ) + { + // skip the next char too as we decoded a surrogate + wp++; + if ( srcLen != wxNO_LEN ) + srcLen--; + } +#else // wchar_t is UTF-32 + code = *wp & 0x7fffffff; +#endif + + unsigned len; + if ( code <= 0x7F ) + { + len = 1; + if ( out ) + { + if ( dstLen < len ) + break; + + out[0] = (char)code; + } + } + else if ( code <= 0x07FF ) + { + len = 2; + if ( out ) + { + if ( dstLen < len ) + break; + + // NB: this line takes 6 least significant bits, encodes them as + // 10xxxxxx and discards them so that the next byte can be encoded: + out[1] = 0x80 | (code & 0x3F); code >>= 6; + out[0] = 0xC0 | code; + } + } + else if ( code < 0xFFFF ) + { + len = 3; + if ( out ) + { + if ( dstLen < len ) + break; + + out[2] = 0x80 | (code & 0x3F); code >>= 6; + out[1] = 0x80 | (code & 0x3F); code >>= 6; + out[0] = 0xE0 | code; + } + } + else if ( code <= 0x10FFFF ) + { + len = 4; + if ( out ) + { + if ( dstLen < len ) + break; + + out[3] = 0x80 | (code & 0x3F); code >>= 6; + out[2] = 0x80 | (code & 0x3F); code >>= 6; + out[1] = 0x80 | (code & 0x3F); code >>= 6; + out[0] = 0xF0 | code; + } + } + else + { + wxFAIL_MSG( wxT("trying to encode undefined Unicode character") ); + break; + } + + if ( out ) + { + out += len; + dstLen -= len; + } + + written += len; + } + + // we only get here if an error occurs during decoding + return wxCONV_FAILED; +} + +size_t wxMBConvUTF8::ToWChar(wchar_t *buf, size_t n, + const char *psz, size_t srcLen) const +{ + if ( m_options == MAP_INVALID_UTF8_NOT ) + return wxMBConvStrictUTF8::ToWChar(buf, n, psz, srcLen); + + size_t len = 0; + + // The length can be either given explicitly or computed implicitly for the + // NUL-terminated strings. + const bool isNulTerminated = srcLen == wxNO_LEN; + while ((isNulTerminated ? *psz : srcLen--) && ((!buf) || (len < n))) + { + const char *opsz = psz; + bool invalid = false; + unsigned char cc = *psz++, fc = cc; + unsigned cnt; + for (cnt = 0; fc & 0x80; cnt++) + fc <<= 1; + + if (!cnt) + { + // plain ASCII char + if (buf) + *buf++ = cc; + len++; + + // escape the escape character for octal escapes + if ((m_options & MAP_INVALID_UTF8_TO_OCTAL) + && cc == '\\' && (!buf || len < n)) + { + if (buf) + *buf++ = cc; + len++; + } + } + else + { + cnt--; + if (!cnt) + { + // invalid UTF-8 sequence + invalid = true; + } + else + { + unsigned ocnt = cnt - 1; + wxUint32 res = cc & (0x3f >> cnt); + while (cnt--) + { + if (!isNulTerminated && !srcLen) + { + // invalid UTF-8 sequence ending before the end of code + // point. + invalid = true; + break; + } + + cc = *psz; + if ((cc & 0xC0) != 0x80) + { + // invalid UTF-8 sequence + invalid = true; + break; + } + + psz++; + if (!isNulTerminated) + srcLen--; + res = (res << 6) | (cc & 0x3f); + } + + if (invalid || res <= utf8_max[ocnt]) + { + // illegal UTF-8 encoding + invalid = true; + } + else if ((m_options & MAP_INVALID_UTF8_TO_PUA) && + res >= wxUnicodePUA && res < wxUnicodePUAEnd) + { + // if one of our PUA characters turns up externally + // it must also be treated as an illegal sequence + // (a bit like you have to escape an escape character) + invalid = true; + } + else + { +#ifdef WC_UTF16 + // cast is ok because wchar_t == wxUint16 if WC_UTF16 + size_t pa = encode_utf16(res, (wxUint16 *)buf); + if (pa == wxCONV_FAILED) + { + invalid = true; + } + else + { + if (buf) + buf += pa; + len += pa; + } +#else // !WC_UTF16 + if (buf) + *buf++ = (wchar_t)res; + len++; +#endif // WC_UTF16/!WC_UTF16 + } + } + + if (invalid) + { + if (m_options & MAP_INVALID_UTF8_TO_PUA) + { + while (opsz < psz && (!buf || len < n)) + { +#ifdef WC_UTF16 + // cast is ok because wchar_t == wxUuint16 if WC_UTF16 + size_t pa = encode_utf16((unsigned char)*opsz + wxUnicodePUA, (wxUint16 *)buf); + wxASSERT(pa != wxCONV_FAILED); + if (buf) + buf += pa; + opsz++; + len += pa; +#else + if (buf) + *buf++ = (wchar_t)(wxUnicodePUA + (unsigned char)*opsz); + opsz++; + len++; +#endif + } + } + else if (m_options & MAP_INVALID_UTF8_TO_OCTAL) + { + while (opsz < psz && (!buf || len < n)) + { + if ( buf && len + 3 < n ) + { + unsigned char on = *opsz; + *buf++ = L'\\'; + *buf++ = (wchar_t)( L'0' + on / 0100 ); + *buf++ = (wchar_t)( L'0' + (on % 0100) / 010 ); + *buf++ = (wchar_t)( L'0' + on % 010 ); + } + + opsz++; + len += 4; + } + } + else // MAP_INVALID_UTF8_NOT + { + return wxCONV_FAILED; + } + } + } + } + + if ( isNulTerminated ) + { + // Add the trailing NUL in this case if we have a large enough buffer. + if ( buf && (len < n) ) + *buf = 0; + + // And count it in any case. + len++; + } + + return len; +} + +static inline bool isoctal(wchar_t wch) +{ + return L'0' <= wch && wch <= L'7'; +} + +size_t wxMBConvUTF8::FromWChar(char *buf, size_t n, + const wchar_t *psz, size_t srcLen) const +{ + if ( m_options == MAP_INVALID_UTF8_NOT ) + return wxMBConvStrictUTF8::FromWChar(buf, n, psz, srcLen); + + size_t len = 0; + + // The length can be either given explicitly or computed implicitly for the + // NUL-terminated strings. + const bool isNulTerminated = srcLen == wxNO_LEN; + while ((isNulTerminated ? *psz : srcLen--) && ((!buf) || (len < n))) + { + wxUint32 cc; + +#ifdef WC_UTF16 + // cast is ok for WC_UTF16 + size_t pa = decode_utf16((const wxUint16 *)psz, cc); + psz += (pa == wxCONV_FAILED) ? 1 : pa; +#else + cc = (*psz++) & 0x7fffffff; +#endif + + if ( (m_options & MAP_INVALID_UTF8_TO_PUA) + && cc >= wxUnicodePUA && cc < wxUnicodePUAEnd ) + { + if (buf) + *buf++ = (char)(cc - wxUnicodePUA); + len++; + } + else if ( (m_options & MAP_INVALID_UTF8_TO_OCTAL) + && cc == L'\\' && psz[0] == L'\\' ) + { + if (buf) + *buf++ = (char)cc; + psz++; + len++; + } + else if ( (m_options & MAP_INVALID_UTF8_TO_OCTAL) && + cc == L'\\' && + isoctal(psz[0]) && isoctal(psz[1]) && isoctal(psz[2]) ) + { + if (buf) + { + *buf++ = (char) ((psz[0] - L'0') * 0100 + + (psz[1] - L'0') * 010 + + (psz[2] - L'0')); + } + + psz += 3; + len++; + } + else + { + unsigned cnt; + for (cnt = 0; cc > utf8_max[cnt]; cnt++) + { + } + + if (!cnt) + { + // plain ASCII char + if (buf) + *buf++ = (char) cc; + len++; + } + else + { + len += cnt + 1; + if (buf) + { + *buf++ = (char) ((-128 >> cnt) | ((cc >> (cnt * 6)) & (0x3f >> cnt))); + while (cnt--) + *buf++ = (char) (0x80 | ((cc >> (cnt * 6)) & 0x3f)); + } + } + } + } + + if ( isNulTerminated ) + { + // Add the trailing NUL in this case if we have a large enough buffer. + if ( buf && (len < n) ) + *buf = 0; + + // And count it in any case. + len++; + } + + return len; +} + +// ============================================================================ +// UTF-16 +// ============================================================================ + +#ifdef WORDS_BIGENDIAN + #define wxMBConvUTF16straight wxMBConvUTF16BE + #define wxMBConvUTF16swap wxMBConvUTF16LE +#else + #define wxMBConvUTF16swap wxMBConvUTF16BE + #define wxMBConvUTF16straight wxMBConvUTF16LE +#endif + +/* static */ +size_t wxMBConvUTF16Base::GetLength(const char *src, size_t srcLen) +{ + if ( srcLen == wxNO_LEN ) + { + // count the number of bytes in input, including the trailing NULs + const wxUint16 *inBuff = reinterpret_cast(src); + for ( srcLen = 1; *inBuff++; srcLen++ ) + ; + + srcLen *= BYTES_PER_CHAR; + } + else // we already have the length + { + // we can only convert an entire number of UTF-16 characters + if ( srcLen % BYTES_PER_CHAR ) + return wxCONV_FAILED; + } + + return srcLen; +} + +// case when in-memory representation is UTF-16 too +#ifdef WC_UTF16 + +// ---------------------------------------------------------------------------- +// conversions without endianness change +// ---------------------------------------------------------------------------- + +size_t +wxMBConvUTF16straight::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + // set up the scene for using memcpy() (which is presumably more efficient + // than copying the bytes one by one) + srcLen = GetLength(src, srcLen); + if ( srcLen == wxNO_LEN ) + return wxCONV_FAILED; + + const size_t inLen = srcLen / BYTES_PER_CHAR; + if ( dst ) + { + if ( dstLen < inLen ) + return wxCONV_FAILED; + + memcpy(dst, src, srcLen); + } + + return inLen; +} + +size_t +wxMBConvUTF16straight::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + if ( srcLen == wxNO_LEN ) + srcLen = wxWcslen(src) + 1; + + srcLen *= BYTES_PER_CHAR; + + if ( dst ) + { + if ( dstLen < srcLen ) + return wxCONV_FAILED; + + memcpy(dst, src, srcLen); + } + + return srcLen; +} + +// ---------------------------------------------------------------------------- +// endian-reversing conversions +// ---------------------------------------------------------------------------- + +size_t +wxMBConvUTF16swap::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + srcLen = GetLength(src, srcLen); + if ( srcLen == wxNO_LEN ) + return wxCONV_FAILED; + + srcLen /= BYTES_PER_CHAR; + + if ( dst ) + { + if ( dstLen < srcLen ) + return wxCONV_FAILED; + + const wxUint16 *inBuff = reinterpret_cast(src); + for ( size_t n = 0; n < srcLen; n++, inBuff++ ) + { + *dst++ = wxUINT16_SWAP_ALWAYS(*inBuff); + } + } + + return srcLen; +} + +size_t +wxMBConvUTF16swap::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + if ( srcLen == wxNO_LEN ) + srcLen = wxWcslen(src) + 1; + + srcLen *= BYTES_PER_CHAR; + + if ( dst ) + { + if ( dstLen < srcLen ) + return wxCONV_FAILED; + + wxUint16 *outBuff = reinterpret_cast(dst); + for ( size_t n = 0; n < srcLen; n += BYTES_PER_CHAR, src++ ) + { + *outBuff++ = wxUINT16_SWAP_ALWAYS(*src); + } + } + + return srcLen; +} + +#else // !WC_UTF16: wchar_t is UTF-32 + +// ---------------------------------------------------------------------------- +// conversions without endianness change +// ---------------------------------------------------------------------------- + +size_t +wxMBConvUTF16straight::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + srcLen = GetLength(src, srcLen); + if ( srcLen == wxNO_LEN ) + return wxCONV_FAILED; + + const size_t inLen = srcLen / BYTES_PER_CHAR; + size_t outLen = 0; + const wxUint16 *inBuff = reinterpret_cast(src); + for ( const wxUint16 * const inEnd = inBuff + inLen; inBuff < inEnd; ) + { + const wxUint32 ch = wxDecodeSurrogate(&inBuff); + if ( !inBuff ) + return wxCONV_FAILED; + + outLen++; + + if ( dst ) + { + if ( outLen > dstLen ) + return wxCONV_FAILED; + + *dst++ = ch; + } + } + + + return outLen; +} + +size_t +wxMBConvUTF16straight::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + if ( srcLen == wxNO_LEN ) + srcLen = wxWcslen(src) + 1; + + size_t outLen = 0; + wxUint16 *outBuff = reinterpret_cast(dst); + for ( size_t n = 0; n < srcLen; n++ ) + { + wxUint16 cc[2] = { 0 }; + const size_t numChars = encode_utf16(*src++, cc); + if ( numChars == wxCONV_FAILED ) + return wxCONV_FAILED; + + outLen += numChars * BYTES_PER_CHAR; + if ( outBuff ) + { + if ( outLen > dstLen ) + return wxCONV_FAILED; + + *outBuff++ = cc[0]; + if ( numChars == 2 ) + { + // second character of a surrogate + *outBuff++ = cc[1]; + } + } + } + + return outLen; +} + +// ---------------------------------------------------------------------------- +// endian-reversing conversions +// ---------------------------------------------------------------------------- + +size_t +wxMBConvUTF16swap::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + srcLen = GetLength(src, srcLen); + if ( srcLen == wxNO_LEN ) + return wxCONV_FAILED; + + const size_t inLen = srcLen / BYTES_PER_CHAR; + size_t outLen = 0; + const wxUint16 *inBuff = reinterpret_cast(src); + for ( const wxUint16 * const inEnd = inBuff + inLen; inBuff < inEnd; ) + { + wxUint32 ch; + wxUint16 tmp[2]; + + tmp[0] = wxUINT16_SWAP_ALWAYS(*inBuff); + inBuff++; + tmp[1] = wxUINT16_SWAP_ALWAYS(*inBuff); + + const size_t numChars = decode_utf16(tmp, ch); + if ( numChars == wxCONV_FAILED ) + return wxCONV_FAILED; + + if ( numChars == 2 ) + inBuff++; + + outLen++; + + if ( dst ) + { + if ( outLen > dstLen ) + return wxCONV_FAILED; + + *dst++ = ch; + } + } + + + return outLen; +} + +size_t +wxMBConvUTF16swap::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + if ( srcLen == wxNO_LEN ) + srcLen = wxWcslen(src) + 1; + + size_t outLen = 0; + wxUint16 *outBuff = reinterpret_cast(dst); + for ( const wchar_t *srcEnd = src + srcLen; src < srcEnd; src++ ) + { + wxUint16 cc[2] = { 0 }; + const size_t numChars = encode_utf16(*src, cc); + if ( numChars == wxCONV_FAILED ) + return wxCONV_FAILED; + + outLen += numChars * BYTES_PER_CHAR; + if ( outBuff ) + { + if ( outLen > dstLen ) + return wxCONV_FAILED; + + *outBuff++ = wxUINT16_SWAP_ALWAYS(cc[0]); + if ( numChars == 2 ) + { + // second character of a surrogate + *outBuff++ = wxUINT16_SWAP_ALWAYS(cc[1]); + } + } + } + + return outLen; +} + +#endif // WC_UTF16/!WC_UTF16 + + +// ============================================================================ +// UTF-32 +// ============================================================================ + +#ifdef WORDS_BIGENDIAN + #define wxMBConvUTF32straight wxMBConvUTF32BE + #define wxMBConvUTF32swap wxMBConvUTF32LE +#else + #define wxMBConvUTF32swap wxMBConvUTF32BE + #define wxMBConvUTF32straight wxMBConvUTF32LE +#endif + + +WXDLLIMPEXP_DATA_BASE(wxMBConvUTF32LE) wxConvUTF32LE; +WXDLLIMPEXP_DATA_BASE(wxMBConvUTF32BE) wxConvUTF32BE; + +/* static */ +size_t wxMBConvUTF32Base::GetLength(const char *src, size_t srcLen) +{ + if ( srcLen == wxNO_LEN ) + { + // count the number of bytes in input, including the trailing NULs + const wxUint32 *inBuff = reinterpret_cast(src); + for ( srcLen = 1; *inBuff++; srcLen++ ) + ; + + srcLen *= BYTES_PER_CHAR; + } + else // we already have the length + { + // we can only convert an entire number of UTF-32 characters + if ( srcLen % BYTES_PER_CHAR ) + return wxCONV_FAILED; + } + + return srcLen; +} + +// case when in-memory representation is UTF-16 +#ifdef WC_UTF16 + +// ---------------------------------------------------------------------------- +// conversions without endianness change +// ---------------------------------------------------------------------------- + +size_t +wxMBConvUTF32straight::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + srcLen = GetLength(src, srcLen); + if ( srcLen == wxNO_LEN ) + return wxCONV_FAILED; + + const wxUint32 *inBuff = reinterpret_cast(src); + const size_t inLen = srcLen / BYTES_PER_CHAR; + size_t outLen = 0; + for ( size_t n = 0; n < inLen; n++ ) + { + wxUint16 cc[2] = { 0 }; + const size_t numChars = encode_utf16(*inBuff++, cc); + if ( numChars == wxCONV_FAILED ) + return wxCONV_FAILED; + + outLen += numChars; + if ( dst ) + { + if ( outLen > dstLen ) + return wxCONV_FAILED; + + *dst++ = cc[0]; + if ( numChars == 2 ) + { + // second character of a surrogate + *dst++ = cc[1]; + } + } + } + + return outLen; +} + +size_t +wxMBConvUTF32straight::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + if ( srcLen == wxNO_LEN ) + srcLen = wxWcslen(src) + 1; + + if ( !dst ) + { + // optimization: return maximal space which could be needed for this + // string instead of the exact amount which could be less if there are + // any surrogates in the input + // + // we consider that surrogates are rare enough to make it worthwhile to + // avoid running the loop below at the cost of slightly extra memory + // consumption + return srcLen * BYTES_PER_CHAR; + } + + wxUint32 *outBuff = reinterpret_cast(dst); + size_t outLen = 0; + for ( const wchar_t * const srcEnd = src + srcLen; src < srcEnd; ) + { + const wxUint32 ch = wxDecodeSurrogate(&src); + if ( !src ) + return wxCONV_FAILED; + + outLen += BYTES_PER_CHAR; + + if ( outLen > dstLen ) + return wxCONV_FAILED; + + *outBuff++ = ch; + } + + return outLen; +} + +// ---------------------------------------------------------------------------- +// endian-reversing conversions +// ---------------------------------------------------------------------------- + +size_t +wxMBConvUTF32swap::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + srcLen = GetLength(src, srcLen); + if ( srcLen == wxNO_LEN ) + return wxCONV_FAILED; + + const wxUint32 *inBuff = reinterpret_cast(src); + const size_t inLen = srcLen / BYTES_PER_CHAR; + size_t outLen = 0; + for ( size_t n = 0; n < inLen; n++, inBuff++ ) + { + wxUint16 cc[2] = { 0 }; + const size_t numChars = encode_utf16(wxUINT32_SWAP_ALWAYS(*inBuff), cc); + if ( numChars == wxCONV_FAILED ) + return wxCONV_FAILED; + + outLen += numChars; + if ( dst ) + { + if ( outLen > dstLen ) + return wxCONV_FAILED; + + *dst++ = cc[0]; + if ( numChars == 2 ) + { + // second character of a surrogate + *dst++ = cc[1]; + } + } + } + + return outLen; +} + +size_t +wxMBConvUTF32swap::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + if ( srcLen == wxNO_LEN ) + srcLen = wxWcslen(src) + 1; + + if ( !dst ) + { + // optimization: return maximal space which could be needed for this + // string instead of the exact amount which could be less if there are + // any surrogates in the input + // + // we consider that surrogates are rare enough to make it worthwhile to + // avoid running the loop below at the cost of slightly extra memory + // consumption + return srcLen*BYTES_PER_CHAR; + } + + wxUint32 *outBuff = reinterpret_cast(dst); + size_t outLen = 0; + for ( const wchar_t * const srcEnd = src + srcLen; src < srcEnd; ) + { + const wxUint32 ch = wxDecodeSurrogate(&src); + if ( !src ) + return wxCONV_FAILED; + + outLen += BYTES_PER_CHAR; + + if ( outLen > dstLen ) + return wxCONV_FAILED; + + *outBuff++ = wxUINT32_SWAP_ALWAYS(ch); + } + + return outLen; +} + +#else // !WC_UTF16: wchar_t is UTF-32 + +// ---------------------------------------------------------------------------- +// conversions without endianness change +// ---------------------------------------------------------------------------- + +size_t +wxMBConvUTF32straight::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + // use memcpy() as it should be much faster than hand-written loop + srcLen = GetLength(src, srcLen); + if ( srcLen == wxNO_LEN ) + return wxCONV_FAILED; + + const size_t inLen = srcLen/BYTES_PER_CHAR; + if ( dst ) + { + if ( dstLen < inLen ) + return wxCONV_FAILED; + + memcpy(dst, src, srcLen); + } + + return inLen; +} + +size_t +wxMBConvUTF32straight::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + if ( srcLen == wxNO_LEN ) + srcLen = wxWcslen(src) + 1; + + srcLen *= BYTES_PER_CHAR; + + if ( dst ) + { + if ( dstLen < srcLen ) + return wxCONV_FAILED; + + memcpy(dst, src, srcLen); + } + + return srcLen; +} + +// ---------------------------------------------------------------------------- +// endian-reversing conversions +// ---------------------------------------------------------------------------- + +size_t +wxMBConvUTF32swap::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + srcLen = GetLength(src, srcLen); + if ( srcLen == wxNO_LEN ) + return wxCONV_FAILED; + + srcLen /= BYTES_PER_CHAR; + + if ( dst ) + { + if ( dstLen < srcLen ) + return wxCONV_FAILED; + + const wxUint32 *inBuff = reinterpret_cast(src); + for ( size_t n = 0; n < srcLen; n++, inBuff++ ) + { + *dst++ = wxUINT32_SWAP_ALWAYS(*inBuff); + } + } + + return srcLen; +} + +size_t +wxMBConvUTF32swap::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + if ( srcLen == wxNO_LEN ) + srcLen = wxWcslen(src) + 1; + + srcLen *= BYTES_PER_CHAR; + + if ( dst ) + { + if ( dstLen < srcLen ) + return wxCONV_FAILED; + + wxUint32 *outBuff = reinterpret_cast(dst); + for ( size_t n = 0; n < srcLen; n += BYTES_PER_CHAR, src++ ) + { + *outBuff++ = wxUINT32_SWAP_ALWAYS(*src); + } + } + + return srcLen; +} + +#endif // WC_UTF16/!WC_UTF16 + + +// ============================================================================ +// The classes doing conversion using the iconv_xxx() functions +// ============================================================================ + +#ifdef HAVE_ICONV + +// VS: glibc 2.1.3 is broken in that iconv() conversion to/from UCS4 fails with +// E2BIG if output buffer is _exactly_ as big as needed. Such case is +// (unless there's yet another bug in glibc) the only case when iconv() +// returns with (size_t)-1 (which means error) and says there are 0 bytes +// left in the input buffer -- when _real_ error occurs, +// bytes-left-in-input buffer is non-zero. Hence, this alternative test for +// iconv() failure. +// [This bug does not appear in glibc 2.2.] +#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ <= 1 +#define ICONV_FAILED(cres, bufLeft) ((cres == (size_t)-1) && \ + (errno != E2BIG || bufLeft != 0)) +#else +#define ICONV_FAILED(cres, bufLeft) (cres == (size_t)-1) +#endif + +#define ICONV_CHAR_CAST(x) ((ICONV_CONST char **)(x)) + +#define ICONV_T_INVALID ((iconv_t)-1) + +#if SIZEOF_WCHAR_T == 4 + #define WC_BSWAP wxUINT32_SWAP_ALWAYS + #define WC_ENC wxFONTENCODING_UTF32 +#elif SIZEOF_WCHAR_T == 2 + #define WC_BSWAP wxUINT16_SWAP_ALWAYS + #define WC_ENC wxFONTENCODING_UTF16 +#else // sizeof(wchar_t) != 2 nor 4 + // does this ever happen? + #error "Unknown sizeof(wchar_t): please report this to wx-dev@lists.wxwindows.org" +#endif + +// ---------------------------------------------------------------------------- +// wxMBConv_iconv: encapsulates an iconv character set +// ---------------------------------------------------------------------------- + +class wxMBConv_iconv : public wxMBConv +{ +public: + wxMBConv_iconv(const char *name); + virtual ~wxMBConv_iconv(); + + // implement base class virtual methods + virtual size_t ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen = wxNO_LEN) const; + virtual size_t FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen = wxNO_LEN) const; + virtual size_t GetMBNulLen() const; + +#if wxUSE_UNICODE_UTF8 + virtual bool IsUTF8() const; +#endif + + virtual wxMBConv *Clone() const + { + wxMBConv_iconv *p = new wxMBConv_iconv(m_name); + p->m_minMBCharWidth = m_minMBCharWidth; + return p; + } + + bool IsOk() const + { return (m2w != ICONV_T_INVALID) && (w2m != ICONV_T_INVALID); } + +protected: + // the iconv handlers used to translate from multibyte + // to wide char and in the other direction + iconv_t m2w, + w2m; + +#if wxUSE_THREADS + // guards access to m2w and w2m objects + wxMutex m_iconvMutex; +#endif + +private: + // the name (for iconv_open()) of a wide char charset -- if none is + // available on this machine, it will remain NULL + static wxString ms_wcCharsetName; + + // true if the wide char encoding we use (i.e. ms_wcCharsetName) has + // different endian-ness than the native one + static bool ms_wcNeedsSwap; + + + // name of the encoding handled by this conversion + const char *m_name; + + // cached result of GetMBNulLen(); set to 0 meaning "unknown" + // initially + size_t m_minMBCharWidth; +}; + +// make the constructor available for unit testing +WXDLLIMPEXP_BASE wxMBConv* new_wxMBConv_iconv( const char* name ) +{ + wxMBConv_iconv* result = new wxMBConv_iconv( name ); + if ( !result->IsOk() ) + { + delete result; + return 0; + } + + return result; +} + +wxString wxMBConv_iconv::ms_wcCharsetName; +bool wxMBConv_iconv::ms_wcNeedsSwap = false; + +wxMBConv_iconv::wxMBConv_iconv(const char *name) + : m_name(wxStrdup(name)) +{ + m_minMBCharWidth = 0; + + // check for charset that represents wchar_t: + if ( ms_wcCharsetName.empty() ) + { + wxLogTrace(TRACE_STRCONV, wxT("Looking for wide char codeset:")); + +#if wxUSE_FONTMAP + const wxChar *const *names = wxFontMapperBase::GetAllEncodingNames(WC_ENC); +#else // !wxUSE_FONTMAP + static const wxChar *const names_static[] = + { +#if SIZEOF_WCHAR_T == 4 + wxT("UCS-4"), +#elif SIZEOF_WCHAR_T == 2 + wxT("UCS-2"), +#endif + NULL + }; + const wxChar *const *names = names_static; +#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP + + for ( ; *names && ms_wcCharsetName.empty(); ++names ) + { + const wxString nameCS(*names); + + // first try charset with explicit bytesex info (e.g. "UCS-4LE"): + wxString nameXE(nameCS); + +#ifdef WORDS_BIGENDIAN + nameXE += wxT("BE"); +#else // little endian + nameXE += wxT("LE"); +#endif + + wxLogTrace(TRACE_STRCONV, wxT(" trying charset \"%s\""), + nameXE.c_str()); + + m2w = iconv_open(nameXE.ToAscii(), name); + if ( m2w == ICONV_T_INVALID ) + { + // try charset w/o bytesex info (e.g. "UCS4") + wxLogTrace(TRACE_STRCONV, wxT(" trying charset \"%s\""), + nameCS.c_str()); + m2w = iconv_open(nameCS.ToAscii(), name); + + // and check for bytesex ourselves: + if ( m2w != ICONV_T_INVALID ) + { + char buf[2], *bufPtr; + wchar_t wbuf[2]; + size_t insz, outsz; + size_t res; + + buf[0] = 'A'; + buf[1] = 0; + wbuf[0] = 0; + insz = 2; + outsz = SIZEOF_WCHAR_T * 2; + char* wbufPtr = (char*)wbuf; + bufPtr = buf; + + res = iconv( + m2w, ICONV_CHAR_CAST(&bufPtr), &insz, + &wbufPtr, &outsz); + + if (ICONV_FAILED(res, insz)) + { + wxLogLastError(wxT("iconv")); + wxLogError(_("Conversion to charset '%s' doesn't work."), + nameCS.c_str()); + } + else // ok, can convert to this encoding, remember it + { + ms_wcCharsetName = nameCS; + ms_wcNeedsSwap = wbuf[0] != (wchar_t)buf[0]; + } + } + } + else // use charset not requiring byte swapping + { + ms_wcCharsetName = nameXE; + } + } + + wxLogTrace(TRACE_STRCONV, + wxT("iconv wchar_t charset is \"%s\"%s"), + ms_wcCharsetName.empty() ? wxString("") + : ms_wcCharsetName, + ms_wcNeedsSwap ? wxT(" (needs swap)") + : wxT("")); + } + else // we already have ms_wcCharsetName + { + m2w = iconv_open(ms_wcCharsetName.ToAscii(), name); + } + + if ( ms_wcCharsetName.empty() ) + { + w2m = ICONV_T_INVALID; + } + else + { + w2m = iconv_open(name, ms_wcCharsetName.ToAscii()); + if ( w2m == ICONV_T_INVALID ) + { + wxLogTrace(TRACE_STRCONV, + wxT("\"%s\" -> \"%s\" works but not the converse!?"), + ms_wcCharsetName.c_str(), name); + } + } +} + +wxMBConv_iconv::~wxMBConv_iconv() +{ + free(const_cast(m_name)); + + if ( m2w != ICONV_T_INVALID ) + iconv_close(m2w); + if ( w2m != ICONV_T_INVALID ) + iconv_close(w2m); +} + +size_t +wxMBConv_iconv::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + if ( srcLen == wxNO_LEN ) + { + // find the string length: notice that must be done differently for + // NUL-terminated strings and UTF-16/32 which are terminated with 2/4 + // consecutive NULs + const size_t nulLen = GetMBNulLen(); + switch ( nulLen ) + { + default: + return wxCONV_FAILED; + + case 1: + srcLen = strlen(src); // arguably more optimized than our version + break; + + case 2: + case 4: + // for UTF-16/32 not only we need to have 2/4 consecutive NULs + // but they also have to start at character boundary and not + // span two adjacent characters + const char *p; + for ( p = src; NotAllNULs(p, nulLen); p += nulLen ) + ; + srcLen = p - src; + break; + } + + // when we're determining the length of the string ourselves we count + // the terminating NUL(s) as part of it and always NUL-terminate the + // output + srcLen += nulLen; + } + + // we express length in the number of (wide) characters but iconv always + // counts buffer sizes it in bytes + dstLen *= SIZEOF_WCHAR_T; + +#if wxUSE_THREADS + // NB: iconv() is MT-safe, but each thread must use its own iconv_t handle. + // Unfortunately there are a couple of global wxCSConv objects such as + // wxConvLocal that are used all over wx code, so we have to make sure + // the handle is used by at most one thread at the time. Otherwise + // only a few wx classes would be safe to use from non-main threads + // as MB<->WC conversion would fail "randomly". + wxMutexLocker lock(wxConstCast(this, wxMBConv_iconv)->m_iconvMutex); +#endif // wxUSE_THREADS + + size_t res, cres; + const char *pszPtr = src; + + if ( dst ) + { + char* bufPtr = (char*)dst; + + // have destination buffer, convert there + size_t dstLenOrig = dstLen; + cres = iconv(m2w, + ICONV_CHAR_CAST(&pszPtr), &srcLen, + &bufPtr, &dstLen); + + // convert the number of bytes converted as returned by iconv to the + // number of (wide) characters converted that we need + res = (dstLenOrig - dstLen) / SIZEOF_WCHAR_T; + + if (ms_wcNeedsSwap) + { + // convert to native endianness + for ( unsigned i = 0; i < res; i++ ) + dst[i] = WC_BSWAP(dst[i]); + } + } + else // no destination buffer + { + // convert using temp buffer to calculate the size of the buffer needed + wchar_t tbuf[256]; + res = 0; + + do + { + char* bufPtr = (char*)tbuf; + dstLen = 8 * SIZEOF_WCHAR_T; + + cres = iconv(m2w, + ICONV_CHAR_CAST(&pszPtr), &srcLen, + &bufPtr, &dstLen ); + + res += 8 - (dstLen / SIZEOF_WCHAR_T); + } + while ((cres == (size_t)-1) && (errno == E2BIG)); + } + + if (ICONV_FAILED(cres, srcLen)) + { + //VS: it is ok if iconv fails, hence trace only + wxLogTrace(TRACE_STRCONV, wxT("iconv failed: %s"), wxSysErrorMsg(wxSysErrorCode())); + return wxCONV_FAILED; + } + + return res; +} + +size_t wxMBConv_iconv::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ +#if wxUSE_THREADS + // NB: explained in MB2WC + wxMutexLocker lock(wxConstCast(this, wxMBConv_iconv)->m_iconvMutex); +#endif + + if ( srcLen == wxNO_LEN ) + srcLen = wxWcslen(src) + 1; + + size_t inbuflen = srcLen * SIZEOF_WCHAR_T; + size_t outbuflen = dstLen; + size_t res, cres; + + wchar_t *tmpbuf = 0; + + if (ms_wcNeedsSwap) + { + // need to copy to temp buffer to switch endianness + // (doing WC_BSWAP twice on the original buffer won't work, as it + // could be in read-only memory, or be accessed in some other thread) + tmpbuf = (wchar_t *)malloc(inbuflen); + for ( size_t i = 0; i < srcLen; i++ ) + tmpbuf[i] = WC_BSWAP(src[i]); + + src = tmpbuf; + } + + char* inbuf = (char*)src; + if ( dst ) + { + // have destination buffer, convert there + cres = iconv(w2m, ICONV_CHAR_CAST(&inbuf), &inbuflen, &dst, &outbuflen); + + res = dstLen - outbuflen; + } + else // no destination buffer + { + // convert using temp buffer to calculate the size of the buffer needed + char tbuf[256]; + res = 0; + do + { + dst = tbuf; + outbuflen = WXSIZEOF(tbuf); + + cres = iconv(w2m, ICONV_CHAR_CAST(&inbuf), &inbuflen, &dst, &outbuflen); + + res += WXSIZEOF(tbuf) - outbuflen; + } + while ((cres == (size_t)-1) && (errno == E2BIG)); + } + + if (ms_wcNeedsSwap) + { + free(tmpbuf); + } + + if (ICONV_FAILED(cres, inbuflen)) + { + wxLogTrace(TRACE_STRCONV, wxT("iconv failed: %s"), wxSysErrorMsg(wxSysErrorCode())); + return wxCONV_FAILED; + } + + return res; +} + +size_t wxMBConv_iconv::GetMBNulLen() const +{ + if ( m_minMBCharWidth == 0 ) + { + wxMBConv_iconv * const self = wxConstCast(this, wxMBConv_iconv); + +#if wxUSE_THREADS + // NB: explained in MB2WC + wxMutexLocker lock(self->m_iconvMutex); +#endif + + const wchar_t *wnul = L""; + char buf[8]; // should be enough for NUL in any encoding + size_t inLen = sizeof(wchar_t), + outLen = WXSIZEOF(buf); + char *inBuff = (char *)wnul; + char *outBuff = buf; + if ( iconv(w2m, ICONV_CHAR_CAST(&inBuff), &inLen, &outBuff, &outLen) == (size_t)-1 ) + { + self->m_minMBCharWidth = (size_t)-1; + } + else // ok + { + self->m_minMBCharWidth = outBuff - buf; + } + } + + return m_minMBCharWidth; +} + +#if wxUSE_UNICODE_UTF8 +bool wxMBConv_iconv::IsUTF8() const +{ + return wxStricmp(m_name, "UTF-8") == 0 || + wxStricmp(m_name, "UTF8") == 0; +} +#endif + +#endif // HAVE_ICONV + + +// ============================================================================ +// Win32 conversion classes +// ============================================================================ + +#ifdef wxHAVE_WIN32_MB2WC + +// from utils.cpp +#if wxUSE_FONTMAP +extern WXDLLIMPEXP_BASE long wxCharsetToCodepage(const char *charset); +extern WXDLLIMPEXP_BASE long wxEncodingToCodepage(wxFontEncoding encoding); +#endif + +class wxMBConv_win32 : public wxMBConv +{ +public: + wxMBConv_win32() + { + m_CodePage = CP_ACP; + m_minMBCharWidth = 0; + } + + wxMBConv_win32(const wxMBConv_win32& conv) + : wxMBConv() + { + m_CodePage = conv.m_CodePage; + m_minMBCharWidth = conv.m_minMBCharWidth; + } + +#if wxUSE_FONTMAP + wxMBConv_win32(const char* name) + { + m_CodePage = wxCharsetToCodepage(name); + m_minMBCharWidth = 0; + } + + wxMBConv_win32(wxFontEncoding encoding) + { + m_CodePage = wxEncodingToCodepage(encoding); + m_minMBCharWidth = 0; + } +#endif // wxUSE_FONTMAP + + virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const + { + // note that we have to use MB_ERR_INVALID_CHARS flag as it without it + // the behaviour is not compatible with the Unix version (using iconv) + // and break the library itself, e.g. wxTextInputStream::NextChar() + // wouldn't work if reading an incomplete MB char didn't result in an + // error + // + // Moreover, MB_ERR_INVALID_CHARS is only supported on Win 2K SP4 or + // Win XP or newer and it is not supported for UTF-[78] so we always + // use our own conversions in this case. See + // http://blogs.msdn.com/michkap/archive/2005/04/19/409566.aspx + // http://msdn.microsoft.com/library/en-us/intl/unicode_17si.asp + if ( m_CodePage == CP_UTF8 ) + { + return wxMBConvUTF8().MB2WC(buf, psz, n); + } + + if ( m_CodePage == CP_UTF7 ) + { + return wxMBConvUTF7().MB2WC(buf, psz, n); + } + + int flags = 0; + if ( (m_CodePage < 50000 && m_CodePage != CP_SYMBOL) && + IsAtLeastWin2kSP4() ) + { + flags = MB_ERR_INVALID_CHARS; + } + + const size_t len = ::MultiByteToWideChar + ( + m_CodePage, // code page + flags, // flags: fall on error + psz, // input string + -1, // its length (NUL-terminated) + buf, // output string + buf ? n : 0 // size of output buffer + ); + if ( !len ) + { + // function totally failed + return wxCONV_FAILED; + } + + // if we were really converting and didn't use MB_ERR_INVALID_CHARS, + // check if we succeeded, by doing a double trip: + if ( !flags && buf ) + { + const size_t mbLen = strlen(psz); + wxCharBuffer mbBuf(mbLen); + if ( ::WideCharToMultiByte + ( + m_CodePage, + 0, + buf, + -1, + mbBuf.data(), + mbLen + 1, // size in bytes, not length + NULL, + NULL + ) == 0 || + strcmp(mbBuf, psz) != 0 ) + { + // we didn't obtain the same thing we started from, hence + // the conversion was lossy and we consider that it failed + return wxCONV_FAILED; + } + } + + // note that it returns count of written chars for buf != NULL and size + // of the needed buffer for buf == NULL so in either case the length of + // the string (which never includes the terminating NUL) is one less + return len - 1; + } + + virtual size_t WC2MB(char *buf, const wchar_t *pwz, size_t n) const + { + /* + we have a problem here: by default, WideCharToMultiByte() may + replace characters unrepresentable in the target code page with bad + quality approximations such as turning "1/2" symbol (U+00BD) into + "1" for the code pages which don't have it and we, obviously, want + to avoid this at any price + + the trouble is that this function does it _silently_, i.e. it won't + even tell us whether it did or not... Win98/2000 and higher provide + WC_NO_BEST_FIT_CHARS but it doesn't work for the older systems and + we have to resort to a round trip, i.e. check that converting back + results in the same string -- this is, of course, expensive but + otherwise we simply can't be sure to not garble the data. + */ + + // determine if we can rely on WC_NO_BEST_FIT_CHARS: according to MSDN + // it doesn't work with CJK encodings (which we test for rather roughly + // here...) nor with UTF-7/8 nor, of course, with Windows versions not + // supporting it + BOOL usedDef wxDUMMY_INITIALIZE(false); + BOOL *pUsedDef; + int flags; + if ( CanUseNoBestFit() && m_CodePage < 50000 ) + { + // it's our lucky day + flags = WC_NO_BEST_FIT_CHARS; + pUsedDef = &usedDef; + } + else // old system or unsupported encoding + { + flags = 0; + pUsedDef = NULL; + } + + const size_t len = ::WideCharToMultiByte + ( + m_CodePage, // code page + flags, // either none or no best fit + pwz, // input string + -1, // it is (wide) NUL-terminated + buf, // output buffer + buf ? n : 0, // and its size + NULL, // default "replacement" char + pUsedDef // [out] was it used? + ); + + if ( !len ) + { + // function totally failed + return wxCONV_FAILED; + } + + // we did something, check if we really succeeded + if ( flags ) + { + // check if the conversion failed, i.e. if any replacements + // were done + if ( usedDef ) + return wxCONV_FAILED; + } + else // we must resort to double tripping... + { + // first we need to ensure that we really have the MB data: this is + // not the case if we're called with NULL buffer, in which case we + // need to do the conversion yet again + wxCharBuffer bufDef; + if ( !buf ) + { + bufDef = wxCharBuffer(len); + buf = bufDef.data(); + if ( !::WideCharToMultiByte(m_CodePage, flags, pwz, -1, + buf, len, NULL, NULL) ) + return wxCONV_FAILED; + } + + if ( !n ) + n = wcslen(pwz); + wxWCharBuffer wcBuf(n); + if ( MB2WC(wcBuf.data(), buf, n + 1) == wxCONV_FAILED || + wcscmp(wcBuf, pwz) != 0 ) + { + // we didn't obtain the same thing we started from, hence + // the conversion was lossy and we consider that it failed + return wxCONV_FAILED; + } + } + + // see the comment above for the reason of "len - 1" + return len - 1; + } + + virtual size_t GetMBNulLen() const + { + if ( m_minMBCharWidth == 0 ) + { + int len = ::WideCharToMultiByte + ( + m_CodePage, // code page + 0, // no flags + L"", // input string + 1, // translate just the NUL + NULL, // output buffer + 0, // and its size + NULL, // no replacement char + NULL // [out] don't care if it was used + ); + + wxMBConv_win32 * const self = wxConstCast(this, wxMBConv_win32); + switch ( len ) + { + default: + wxLogDebug(wxT("Unexpected NUL length %d"), len); + self->m_minMBCharWidth = (size_t)-1; + break; + + case 0: + self->m_minMBCharWidth = (size_t)-1; + break; + + case 1: + case 2: + case 4: + self->m_minMBCharWidth = len; + break; + } + } + + return m_minMBCharWidth; + } + + virtual wxMBConv *Clone() const { return new wxMBConv_win32(*this); } + + bool IsOk() const { return m_CodePage != -1; } + +private: + static bool CanUseNoBestFit() + { + static int s_isWin98Or2k = -1; + + if ( s_isWin98Or2k == -1 ) + { + int verMaj, verMin; + switch ( wxGetOsVersion(&verMaj, &verMin) ) + { + case wxOS_WINDOWS_9X: + s_isWin98Or2k = verMaj >= 4 && verMin >= 10; + break; + + case wxOS_WINDOWS_NT: + s_isWin98Or2k = verMaj >= 5; + break; + + default: + // unknown: be conservative by default + s_isWin98Or2k = 0; + break; + } + + wxASSERT_MSG( s_isWin98Or2k != -1, wxT("should be set above") ); + } + + return s_isWin98Or2k == 1; + } + + static bool IsAtLeastWin2kSP4() + { +#ifdef __WXWINCE__ + return false; +#else + static int s_isAtLeastWin2kSP4 = -1; + + if ( s_isAtLeastWin2kSP4 == -1 ) + { + OSVERSIONINFOEX ver; + + memset(&ver, 0, sizeof(ver)); + ver.dwOSVersionInfoSize = sizeof(ver); + GetVersionEx((OSVERSIONINFO*)&ver); + + s_isAtLeastWin2kSP4 = + ((ver.dwMajorVersion > 5) || // Vista+ + (ver.dwMajorVersion == 5 && ver.dwMinorVersion > 0) || // XP/2003 + (ver.dwMajorVersion == 5 && ver.dwMinorVersion == 0 && + ver.wServicePackMajor >= 4)) // 2000 SP4+ + ? 1 : 0; + } + + return s_isAtLeastWin2kSP4 == 1; +#endif + } + + + // the code page we're working with + long m_CodePage; + + // cached result of GetMBNulLen(), set to 0 initially meaning + // "unknown" + size_t m_minMBCharWidth; +}; + +#endif // wxHAVE_WIN32_MB2WC + + +// ============================================================================ +// wxEncodingConverter based conversion classes +// ============================================================================ + +#if wxUSE_FONTMAP + +class wxMBConv_wxwin : public wxMBConv +{ +private: + void Init() + { + // Refuse to use broken wxEncodingConverter code for Mac-specific encodings. + // The wxMBConv_cf class does a better job. + m_ok = (m_enc < wxFONTENCODING_MACMIN || m_enc > wxFONTENCODING_MACMAX) && + m2w.Init(m_enc, wxFONTENCODING_UNICODE) && + w2m.Init(wxFONTENCODING_UNICODE, m_enc); + } + +public: + // temporarily just use wxEncodingConverter stuff, + // so that it works while a better implementation is built + wxMBConv_wxwin(const char* name) + { + if (name) + m_enc = wxFontMapperBase::Get()->CharsetToEncoding(name, false); + else + m_enc = wxFONTENCODING_SYSTEM; + + Init(); + } + + wxMBConv_wxwin(wxFontEncoding enc) + { + m_enc = enc; + + Init(); + } + + size_t MB2WC(wchar_t *buf, const char *psz, size_t WXUNUSED(n)) const + { + size_t inbuf = strlen(psz); + if (buf) + { + if (!m2w.Convert(psz, buf)) + return wxCONV_FAILED; + } + return inbuf; + } + + size_t WC2MB(char *buf, const wchar_t *psz, size_t WXUNUSED(n)) const + { + const size_t inbuf = wxWcslen(psz); + if (buf) + { + if (!w2m.Convert(psz, buf)) + return wxCONV_FAILED; + } + + return inbuf; + } + + virtual size_t GetMBNulLen() const + { + switch ( m_enc ) + { + case wxFONTENCODING_UTF16BE: + case wxFONTENCODING_UTF16LE: + return 2; + + case wxFONTENCODING_UTF32BE: + case wxFONTENCODING_UTF32LE: + return 4; + + default: + return 1; + } + } + + virtual wxMBConv *Clone() const { return new wxMBConv_wxwin(m_enc); } + + bool IsOk() const { return m_ok; } + +public: + wxFontEncoding m_enc; + wxEncodingConverter m2w, w2m; + +private: + // were we initialized successfully? + bool m_ok; + + wxDECLARE_NO_COPY_CLASS(wxMBConv_wxwin); +}; + +// make the constructors available for unit testing +WXDLLIMPEXP_BASE wxMBConv* new_wxMBConv_wxwin( const char* name ) +{ + wxMBConv_wxwin* result = new wxMBConv_wxwin( name ); + if ( !result->IsOk() ) + { + delete result; + return 0; + } + + return result; +} + +#endif // wxUSE_FONTMAP + +// ============================================================================ +// wxCSConv implementation +// ============================================================================ + +void wxCSConv::Init() +{ + m_name = NULL; + m_convReal = NULL; +} + +void wxCSConv::SetEncoding(wxFontEncoding encoding) +{ + switch ( encoding ) + { + case wxFONTENCODING_MAX: + case wxFONTENCODING_SYSTEM: + if ( m_name ) + { + // It's ok to not have encoding value if we have a name for it. + m_encoding = wxFONTENCODING_SYSTEM; + } + else // No name neither. + { + // Fall back to the system default encoding in this case (not + // sure how much sense does this make but this is how the old + // code used to behave). +#if wxUSE_INTL + m_encoding = wxLocale::GetSystemEncoding(); + if ( m_encoding == wxFONTENCODING_SYSTEM ) +#endif // wxUSE_INTL + m_encoding = wxFONTENCODING_ISO8859_1; + } + break; + + case wxFONTENCODING_DEFAULT: + // wxFONTENCODING_DEFAULT is same as US-ASCII in this context + m_encoding = wxFONTENCODING_ISO8859_1; + break; + + default: + // Just use the provided encoding. + m_encoding = encoding; + } +} + +wxCSConv::wxCSConv(const wxString& charset) +{ + Init(); + + if ( !charset.empty() ) + { + SetName(charset.ToAscii()); + } + +#if wxUSE_FONTMAP + SetEncoding(wxFontMapperBase::GetEncodingFromName(charset)); +#else + SetEncoding(wxFONTENCODING_SYSTEM); +#endif + + m_convReal = DoCreate(); +} + +wxCSConv::wxCSConv(wxFontEncoding encoding) +{ + if ( encoding == wxFONTENCODING_MAX || encoding == wxFONTENCODING_DEFAULT ) + { + wxFAIL_MSG( wxT("invalid encoding value in wxCSConv ctor") ); + + encoding = wxFONTENCODING_SYSTEM; + } + + Init(); + + SetEncoding(encoding); + + m_convReal = DoCreate(); +} + +wxCSConv::~wxCSConv() +{ + Clear(); +} + +wxCSConv::wxCSConv(const wxCSConv& conv) + : wxMBConv() +{ + Init(); + + SetName(conv.m_name); + SetEncoding(conv.m_encoding); + + m_convReal = DoCreate(); +} + +wxCSConv& wxCSConv::operator=(const wxCSConv& conv) +{ + Clear(); + + SetName(conv.m_name); + SetEncoding(conv.m_encoding); + + m_convReal = DoCreate(); + + return *this; +} + +void wxCSConv::Clear() +{ + free(m_name); + m_name = NULL; + + wxDELETE(m_convReal); +} + +void wxCSConv::SetName(const char *charset) +{ + if ( charset ) + m_name = wxStrdup(charset); +} + +#if wxUSE_FONTMAP + +WX_DECLARE_HASH_MAP( wxFontEncoding, wxString, wxIntegerHash, wxIntegerEqual, + wxEncodingNameCache ); + +static wxEncodingNameCache gs_nameCache; +#endif + +wxMBConv *wxCSConv::DoCreate() const +{ +#if wxUSE_FONTMAP + wxLogTrace(TRACE_STRCONV, + wxT("creating conversion for %s"), + (m_name ? m_name + : (const char*)wxFontMapperBase::GetEncodingName(m_encoding).mb_str())); +#endif // wxUSE_FONTMAP + + // check for the special case of ASCII or ISO8859-1 charset: as we have + // special knowledge of it anyhow, we don't need to create a special + // conversion object + if ( m_encoding == wxFONTENCODING_ISO8859_1 ) + { + // don't convert at all + return NULL; + } + + // we trust OS to do conversion better than we can so try external + // conversion methods first + // + // the full order is: + // 1. OS conversion (iconv() under Unix or Win32 API) + // 2. hard coded conversions for UTF + // 3. wxEncodingConverter as fall back + + // step (1) +#ifdef HAVE_ICONV +#if !wxUSE_FONTMAP + if ( m_name ) +#endif // !wxUSE_FONTMAP + { +#if wxUSE_FONTMAP + wxFontEncoding encoding(m_encoding); +#endif + + if ( m_name ) + { + wxMBConv_iconv *conv = new wxMBConv_iconv(m_name); + if ( conv->IsOk() ) + return conv; + + delete conv; + +#if wxUSE_FONTMAP + encoding = + wxFontMapperBase::Get()->CharsetToEncoding(m_name, false); +#endif // wxUSE_FONTMAP + } +#if wxUSE_FONTMAP + { + const wxEncodingNameCache::iterator it = gs_nameCache.find(encoding); + if ( it != gs_nameCache.end() ) + { + if ( it->second.empty() ) + return NULL; + + wxMBConv_iconv *conv = new wxMBConv_iconv(it->second.ToAscii()); + if ( conv->IsOk() ) + return conv; + + delete conv; + } + + const wxChar* const* names = wxFontMapperBase::GetAllEncodingNames(encoding); + // CS : in case this does not return valid names (eg for MacRoman) + // encoding got a 'failure' entry in the cache all the same, + // although it just has to be created using a different method, so + // only store failed iconv creation attempts (or perhaps we + // shoulnd't do this at all ?) + if ( names[0] != NULL ) + { + for ( ; *names; ++names ) + { + // FIXME-UTF8: wxFontMapperBase::GetAllEncodingNames() + // will need changes that will obsolete this + wxString name(*names); + wxMBConv_iconv *conv = new wxMBConv_iconv(name.ToAscii()); + if ( conv->IsOk() ) + { + gs_nameCache[encoding] = *names; + return conv; + } + + delete conv; + } + + gs_nameCache[encoding] = wxT(""); // cache the failure + } + } +#endif // wxUSE_FONTMAP + } +#endif // HAVE_ICONV + +#ifdef wxHAVE_WIN32_MB2WC + { +#if wxUSE_FONTMAP + wxMBConv_win32 *conv = m_name ? new wxMBConv_win32(m_name) + : new wxMBConv_win32(m_encoding); + if ( conv->IsOk() ) + return conv; + + delete conv; +#else + return NULL; +#endif + } +#endif // wxHAVE_WIN32_MB2WC + +#ifdef __DARWIN__ + { + // leave UTF16 and UTF32 to the built-ins of wx + if ( m_name || ( m_encoding < wxFONTENCODING_UTF16BE || + ( m_encoding >= wxFONTENCODING_MACMIN && m_encoding <= wxFONTENCODING_MACMAX ) ) ) + { +#if wxUSE_FONTMAP + wxMBConv_cf *conv = m_name ? new wxMBConv_cf(m_name) + : new wxMBConv_cf(m_encoding); +#else + wxMBConv_cf *conv = new wxMBConv_cf(m_encoding); +#endif + + if ( conv->IsOk() ) + return conv; + + delete conv; + } + } +#endif // __DARWIN__ + + // step (2) + wxFontEncoding enc = m_encoding; +#if wxUSE_FONTMAP + if ( enc == wxFONTENCODING_SYSTEM && m_name ) + { + // use "false" to suppress interactive dialogs -- we can be called from + // anywhere and popping up a dialog from here is the last thing we want to + // do + enc = wxFontMapperBase::Get()->CharsetToEncoding(m_name, false); + } +#endif // wxUSE_FONTMAP + + switch ( enc ) + { + case wxFONTENCODING_UTF7: + return new wxMBConvUTF7; + + case wxFONTENCODING_UTF8: + return new wxMBConvUTF8; + + case wxFONTENCODING_UTF16BE: + return new wxMBConvUTF16BE; + + case wxFONTENCODING_UTF16LE: + return new wxMBConvUTF16LE; + + case wxFONTENCODING_UTF32BE: + return new wxMBConvUTF32BE; + + case wxFONTENCODING_UTF32LE: + return new wxMBConvUTF32LE; + + default: + // nothing to do but put here to suppress gcc warnings + break; + } + + // step (3) +#if wxUSE_FONTMAP + { + wxMBConv_wxwin *conv = m_name ? new wxMBConv_wxwin(m_name) + : new wxMBConv_wxwin(m_encoding); + if ( conv->IsOk() ) + return conv; + + delete conv; + } + + wxLogTrace(TRACE_STRCONV, + wxT("encoding \"%s\" is not supported by this system"), + (m_name ? wxString(m_name) + : wxFontMapperBase::GetEncodingName(m_encoding))); +#endif // wxUSE_FONTMAP + + return NULL; +} + +bool wxCSConv::IsOk() const +{ + // special case: no convReal created for wxFONTENCODING_ISO8859_1 + if ( m_encoding == wxFONTENCODING_ISO8859_1 ) + return true; // always ok as we do it ourselves + + // m_convReal->IsOk() is called at its own creation, so we know it must + // be ok if m_convReal is non-NULL + return m_convReal != NULL; +} + +size_t wxCSConv::ToWChar(wchar_t *dst, size_t dstLen, + const char *src, size_t srcLen) const +{ + if (m_convReal) + return m_convReal->ToWChar(dst, dstLen, src, srcLen); + + // latin-1 (direct) + if ( srcLen == wxNO_LEN ) + srcLen = strlen(src) + 1; // take trailing NUL too + + if ( dst ) + { + if ( dstLen < srcLen ) + return wxCONV_FAILED; + + for ( size_t n = 0; n < srcLen; n++ ) + dst[n] = (unsigned char)(src[n]); + } + + return srcLen; +} + +size_t wxCSConv::FromWChar(char *dst, size_t dstLen, + const wchar_t *src, size_t srcLen) const +{ + if (m_convReal) + return m_convReal->FromWChar(dst, dstLen, src, srcLen); + + // latin-1 (direct) + if ( srcLen == wxNO_LEN ) + srcLen = wxWcslen(src) + 1; + + if ( dst ) + { + if ( dstLen < srcLen ) + return wxCONV_FAILED; + + for ( size_t n = 0; n < srcLen; n++ ) + { + if ( src[n] > 0xFF ) + return wxCONV_FAILED; + + dst[n] = (char)src[n]; + } + + } + else // still need to check the input validity + { + for ( size_t n = 0; n < srcLen; n++ ) + { + if ( src[n] > 0xFF ) + return wxCONV_FAILED; + } + } + + return srcLen; +} + +size_t wxCSConv::GetMBNulLen() const +{ + if ( m_convReal ) + return m_convReal->GetMBNulLen(); + + // otherwise, we are ISO-8859-1 + return 1; +} + +#if wxUSE_UNICODE_UTF8 +bool wxCSConv::IsUTF8() const +{ + if ( m_convReal ) + return m_convReal->IsUTF8(); + + // otherwise, we are ISO-8859-1 + return false; +} +#endif + + +#if wxUSE_UNICODE + +wxWCharBuffer wxSafeConvertMB2WX(const char *s) +{ + if ( !s ) + return wxWCharBuffer(); + + wxWCharBuffer wbuf(wxConvLibc.cMB2WX(s)); + if ( !wbuf ) + wbuf = wxMBConvUTF8().cMB2WX(s); + if ( !wbuf ) + wbuf = wxConvISO8859_1.cMB2WX(s); + + return wbuf; +} + +wxCharBuffer wxSafeConvertWX2MB(const wchar_t *ws) +{ + if ( !ws ) + return wxCharBuffer(); + + wxCharBuffer buf(wxConvLibc.cWX2MB(ws)); + if ( !buf ) + buf = wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_OCTAL).cWX2MB(ws); + + return buf; +} + +#endif // wxUSE_UNICODE + +// ---------------------------------------------------------------------------- +// globals +// ---------------------------------------------------------------------------- + +// NB: The reason why we create converted objects in this convoluted way, +// using a factory function instead of global variable, is that they +// may be used at static initialization time (some of them are used by +// wxString ctors and there may be a global wxString object). In other +// words, possibly _before_ the converter global object would be +// initialized. + +#undef wxConvLibc +#undef wxConvUTF8 +#undef wxConvUTF7 +#undef wxConvLocal +#undef wxConvISO8859_1 + +#define WX_DEFINE_GLOBAL_CONV2(klass, impl_klass, name, ctor_args) \ + WXDLLIMPEXP_DATA_BASE(klass*) name##Ptr = NULL; \ + WXDLLIMPEXP_BASE klass* wxGet_##name##Ptr() \ + { \ + static impl_klass name##Obj ctor_args; \ + return &name##Obj; \ + } \ + /* this ensures that all global converter objects are created */ \ + /* by the time static initialization is done, i.e. before any */ \ + /* thread is launched: */ \ + static klass* gs_##name##instance = wxGet_##name##Ptr() + +#define WX_DEFINE_GLOBAL_CONV(klass, name, ctor_args) \ + WX_DEFINE_GLOBAL_CONV2(klass, klass, name, ctor_args) + +#ifdef __INTELC__ + // disable warning "variable 'xxx' was declared but never referenced" + #pragma warning(disable: 177) +#endif // Intel C++ + +#ifdef __WINDOWS__ + WX_DEFINE_GLOBAL_CONV2(wxMBConv, wxMBConv_win32, wxConvLibc, wxEMPTY_PARAMETER_VALUE); +#elif 0 // defined(__WXOSX__) + WX_DEFINE_GLOBAL_CONV2(wxMBConv, wxMBConv_cf, wxConvLibc, (wxFONTENCODING_UTF8)); +#else + WX_DEFINE_GLOBAL_CONV2(wxMBConv, wxMBConvLibc, wxConvLibc, wxEMPTY_PARAMETER_VALUE); +#endif + +// NB: we can't use wxEMPTY_PARAMETER_VALUE as final argument here because it's +// passed to WX_DEFINE_GLOBAL_CONV2 after a macro expansion and so still +// provokes an error message about "not enough macro parameters"; and we +// can't use "()" here as the name##Obj declaration would be parsed as a +// function declaration then, so use a semicolon and live with an extra +// empty statement (and hope that no compilers warns about this) +WX_DEFINE_GLOBAL_CONV(wxMBConvStrictUTF8, wxConvUTF8, ;); +WX_DEFINE_GLOBAL_CONV(wxMBConvUTF7, wxConvUTF7, ;); + +WX_DEFINE_GLOBAL_CONV(wxCSConv, wxConvLocal, (wxFONTENCODING_SYSTEM)); +WX_DEFINE_GLOBAL_CONV(wxCSConv, wxConvISO8859_1, (wxFONTENCODING_ISO8859_1)); + +WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvCurrent = wxGet_wxConvLibcPtr(); +WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvUI = wxGet_wxConvLocalPtr(); + +#ifdef __DARWIN__ +// It is important to use this conversion object under Darwin as it ensures +// that Unicode strings are (re)composed correctly even though xnu kernel uses +// decomposed form internally (at least for the file names). +static wxMBConv_cf wxConvMacUTF8DObj(wxFONTENCODING_UTF8); +#endif + +WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvFileName = +#ifdef __DARWIN__ + &wxConvMacUTF8DObj; +#else // !__DARWIN__ + wxGet_wxConvLibcPtr(); +#endif // __DARWIN__/!__DARWIN__ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/stream.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/stream.cpp new file mode 100644 index 0000000000..3dcf8a0c84 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/stream.cpp @@ -0,0 +1,1624 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/stream.cpp +// Purpose: wxStream base classes +// Author: Guilhem Lavaux +// Modified by: VZ (23.11.00) to fix realloc()ing new[]ed memory, +// general code review +// Created: 11/07/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS + +#include "wx/stream.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif + +#include +#include "wx/datstrm.h" +#include "wx/textfile.h" +#include "wx/scopeguard.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// the temporary buffer size used when copying from stream to stream +#define BUF_TEMP_SIZE 4096 + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxStreamBuffer +// ---------------------------------------------------------------------------- + +void wxStreamBuffer::SetError(wxStreamError err) +{ + if ( m_stream && m_stream->m_lasterror == wxSTREAM_NO_ERROR ) + m_stream->m_lasterror = err; +} + +void wxStreamBuffer::InitBuffer() +{ + m_buffer_start = + m_buffer_end = + m_buffer_pos = NULL; + + // if we are going to allocate the buffer, we should free it later as well + m_destroybuf = true; +} + +void wxStreamBuffer::Init() +{ + InitBuffer(); + + m_fixed = true; +} + +void wxStreamBuffer::InitWithStream(wxStreamBase& stream, BufMode mode) +{ + Init(); + + m_stream = &stream; + m_mode = mode; + + m_flushable = true; +} + +wxStreamBuffer::wxStreamBuffer(BufMode mode) +{ + Init(); + + m_stream = NULL; + m_mode = mode; + + m_flushable = false; +} + +wxStreamBuffer::wxStreamBuffer(const wxStreamBuffer& buffer) +{ + // doing this has big chances to lead to a crash when the source buffer is + // destroyed (otherwise assume the caller knows what he does) + wxASSERT_MSG( !buffer.m_destroybuf, + wxT("it's a bad idea to copy this buffer") ); + + m_buffer_start = buffer.m_buffer_start; + m_buffer_end = buffer.m_buffer_end; + m_buffer_pos = buffer.m_buffer_pos; + m_fixed = buffer.m_fixed; + m_flushable = buffer.m_flushable; + m_stream = buffer.m_stream; + m_mode = buffer.m_mode; + m_destroybuf = false; +} + +void wxStreamBuffer::FreeBuffer() +{ + if ( m_destroybuf ) + { + free(m_buffer_start); + m_buffer_start = NULL; + } +} + +wxStreamBuffer::~wxStreamBuffer() +{ + FreeBuffer(); +} + +wxInputStream *wxStreamBuffer::GetInputStream() const +{ + return m_mode == write ? NULL : (wxInputStream *)m_stream; +} + +wxOutputStream *wxStreamBuffer::GetOutputStream() const +{ + return m_mode == read ? NULL : (wxOutputStream *)m_stream; +} + +void wxStreamBuffer::SetBufferIO(void *buffer_start, + void *buffer_end, + bool takeOwnership) +{ + SetBufferIO(buffer_start, (char *)buffer_end - (char *)buffer_start, + takeOwnership); +} + +void wxStreamBuffer::SetBufferIO(void *start, + size_t len, + bool takeOwnership) +{ + // start by freeing the old buffer + FreeBuffer(); + + m_buffer_start = (char *)start; + m_buffer_end = m_buffer_start + len; + + // if we own it, we free it + m_destroybuf = takeOwnership; + + ResetBuffer(); +} + +void wxStreamBuffer::SetBufferIO(size_t bufsize) +{ + if ( bufsize ) + { + // this will free the old buffer and allocate the new one + SetBufferIO(malloc(bufsize), bufsize, true /* take ownership */); + } + else // no buffer size => no buffer + { + // still free the old one + FreeBuffer(); + InitBuffer(); + } +} + +void wxStreamBuffer::ResetBuffer() +{ + if ( m_stream ) + { + m_stream->Reset(); + m_stream->m_lastcount = 0; + } + + m_buffer_pos = m_mode == read && m_flushable + ? m_buffer_end + : m_buffer_start; +} + +void wxStreamBuffer::Truncate() +{ + size_t new_size = m_buffer_pos - m_buffer_start; + if ( m_buffer_pos == m_buffer_end ) + return; + + if ( !new_size ) + { + FreeBuffer(); + InitBuffer(); + return; + } + + char *new_start = (char *)realloc(m_buffer_start, new_size); + wxCHECK_RET( new_size, wxT("shrinking buffer shouldn't fail") ); + + m_buffer_start = new_start; + m_buffer_end = m_buffer_start + new_size; + m_buffer_pos = m_buffer_end; +} + +// fill the buffer with as much data as possible (only for read buffers) +bool wxStreamBuffer::FillBuffer() +{ + wxInputStream *inStream = GetInputStream(); + + // It's legal to have no stream, so we don't complain about it just return false + if ( !inStream ) + return false; + + size_t count = inStream->OnSysRead(GetBufferStart(), GetBufferSize()); + if ( !count ) + return false; + + m_buffer_end = m_buffer_start + count; + m_buffer_pos = m_buffer_start; + + return true; +} + +// write the buffer contents to the stream (only for write buffers) +bool wxStreamBuffer::FlushBuffer() +{ + wxCHECK_MSG( m_flushable, false, wxT("can't flush this buffer") ); + + // FIXME: what is this check for? (VZ) + if ( m_buffer_pos == m_buffer_start ) + return false; + + wxOutputStream *outStream = GetOutputStream(); + + wxCHECK_MSG( outStream, false, wxT("should have a stream in wxStreamBuffer") ); + + size_t current = m_buffer_pos - m_buffer_start; + size_t count = outStream->OnSysWrite(m_buffer_start, current); + if ( count != current ) + return false; + + m_buffer_pos = m_buffer_start; + + return true; +} + +size_t wxStreamBuffer::GetDataLeft() +{ + /* Why is this done? RR. */ + if ( m_buffer_pos == m_buffer_end && m_flushable) + FillBuffer(); + + return GetBytesLeft(); +} + +// copy up to size bytes from our buffer into the provided one +void wxStreamBuffer::GetFromBuffer(void *buffer, size_t size) +{ + // don't get more bytes than left in the buffer + size_t left = GetBytesLeft(); + + if ( size > left ) + size = left; + + memcpy(buffer, m_buffer_pos, size); + m_buffer_pos += size; +} + +// copy the contents of the provided buffer into this one +void wxStreamBuffer::PutToBuffer(const void *buffer, size_t size) +{ + size_t left = GetBytesLeft(); + + if ( size > left ) + { + if ( m_fixed ) + { + // we can't realloc the buffer, so just copy what we can + size = left; + } + else // !m_fixed + { + // realloc the buffer to have enough space for the data + if ( m_buffer_pos + size > m_buffer_end ) + { + size_t delta = m_buffer_pos - m_buffer_start; + size_t new_size = delta + size; + + char *startOld = m_buffer_start; + m_buffer_start = (char *)realloc(m_buffer_start, new_size); + if ( !m_buffer_start ) + { + // don't leak memory if realloc() failed + m_buffer_start = startOld; + + // what else can we do? + return; + } + + // adjust the pointers invalidated by realloc() + m_buffer_pos = m_buffer_start + delta; + m_buffer_end = m_buffer_start + new_size; + } // else: the buffer is big enough + } + } + + memcpy(m_buffer_pos, buffer, size); + m_buffer_pos += size; +} + +void wxStreamBuffer::PutChar(char c) +{ + wxOutputStream *outStream = GetOutputStream(); + + wxCHECK_RET( outStream, wxT("should have a stream in wxStreamBuffer") ); + + // if we don't have buffer at all, just forward this call to the stream, + if ( !HasBuffer() ) + { + outStream->OnSysWrite(&c, sizeof(c)); + } + else + { + // otherwise check we have enough space left + if ( !GetDataLeft() && !FlushBuffer() ) + { + // we don't + SetError(wxSTREAM_WRITE_ERROR); + } + else + { + PutToBuffer(&c, sizeof(c)); + m_stream->m_lastcount = 1; + } + } +} + +char wxStreamBuffer::Peek() +{ + wxCHECK_MSG( m_stream && HasBuffer(), 0, + wxT("should have the stream and the buffer in wxStreamBuffer") ); + + if ( !GetDataLeft() ) + { + SetError(wxSTREAM_READ_ERROR); + return 0; + } + + char c; + GetFromBuffer(&c, sizeof(c)); + m_buffer_pos--; + + return c; +} + +char wxStreamBuffer::GetChar() +{ + wxInputStream *inStream = GetInputStream(); + + wxCHECK_MSG( inStream, 0, wxT("should have a stream in wxStreamBuffer") ); + + char c; + if ( !HasBuffer() ) + { + inStream->OnSysRead(&c, sizeof(c)); + } + else + { + if ( !GetDataLeft() ) + { + SetError(wxSTREAM_READ_ERROR); + c = 0; + } + else + { + GetFromBuffer(&c, sizeof(c)); + m_stream->m_lastcount = 1; + } + } + + return c; +} + +size_t wxStreamBuffer::Read(void *buffer, size_t size) +{ + wxASSERT_MSG( buffer, wxT("Warning: Null pointer is about to be used") ); + + /* Clear buffer first */ + memset(buffer, 0x00, size); + + // lasterror is reset before all new IO calls + if ( m_stream ) + m_stream->Reset(); + + size_t readBytes; + if ( !HasBuffer() ) + { + wxInputStream *inStream = GetInputStream(); + + wxCHECK_MSG( inStream, 0, wxT("should have a stream in wxStreamBuffer") ); + + readBytes = inStream->OnSysRead(buffer, size); + } + else // we have a buffer, use it + { + size_t orig_size = size; + + while ( size > 0 ) + { + size_t left = GetDataLeft(); + + // if the requested number of bytes if greater than the buffer + // size, read data in chunks + if ( size > left ) + { + GetFromBuffer(buffer, left); + size -= left; + buffer = (char *)buffer + left; + + if ( !FillBuffer() ) + { + SetError(wxSTREAM_EOF); + break; + } + } + else // otherwise just do it in one gulp + { + GetFromBuffer(buffer, size); + size = 0; + } + } + + readBytes = orig_size - size; + } + + if ( m_stream ) + m_stream->m_lastcount = readBytes; + + return readBytes; +} + +// this should really be called "Copy()" +size_t wxStreamBuffer::Read(wxStreamBuffer *dbuf) +{ + wxCHECK_MSG( m_mode != write, 0, wxT("can't read from this buffer") ); + + char buf[BUF_TEMP_SIZE]; + size_t nRead, + total = 0; + + do + { + nRead = Read(buf, WXSIZEOF(buf)); + if ( nRead ) + { + nRead = dbuf->Write(buf, nRead); + total += nRead; + } + } + while ( nRead ); + + return total; +} + +size_t wxStreamBuffer::Write(const void *buffer, size_t size) +{ + wxASSERT_MSG( buffer, wxT("Warning: Null pointer is about to be send") ); + + if (m_stream) + { + // lasterror is reset before all new IO calls + m_stream->Reset(); + } + + size_t ret; + + if ( !HasBuffer() && m_fixed ) + { + wxOutputStream *outStream = GetOutputStream(); + + wxCHECK_MSG( outStream, 0, wxT("should have a stream in wxStreamBuffer") ); + + // no buffer, just forward the call to the stream + ret = outStream->OnSysWrite(buffer, size); + } + else // we [may] have a buffer, use it + { + size_t orig_size = size; + + while ( size > 0 ) + { + size_t left = GetBytesLeft(); + + // if the buffer is too large to fit in the stream buffer, split + // it in smaller parts + // + // NB: If stream buffer isn't fixed (as for wxMemoryOutputStream), + // we always go to the second case. + // + // FIXME: fine, but if it fails we should (re)try writing it by + // chunks as this will (hopefully) always work (VZ) + + if ( size > left && m_fixed ) + { + PutToBuffer(buffer, left); + size -= left; + buffer = (char *)buffer + left; + + if ( !FlushBuffer() ) + { + SetError(wxSTREAM_WRITE_ERROR); + + break; + } + + m_buffer_pos = m_buffer_start; + } + else // we can do it in one gulp + { + PutToBuffer(buffer, size); + size = 0; + } + } + + ret = orig_size - size; + } + + if (m_stream) + { + // i am not entirely sure what we do this for + m_stream->m_lastcount = ret; + } + + return ret; +} + +size_t wxStreamBuffer::Write(wxStreamBuffer *sbuf) +{ + wxCHECK_MSG( m_mode != read, 0, wxT("can't write to this buffer") ); + wxCHECK_MSG( sbuf->m_mode != write, 0, wxT("can't read from that buffer") ); + + char buf[BUF_TEMP_SIZE]; + size_t nWrite, + total = 0; + + do + { + size_t nRead = sbuf->Read(buf, WXSIZEOF(buf)); + if ( nRead ) + { + nWrite = Write(buf, nRead); + if ( nWrite < nRead ) + { + // put back data we couldn't copy + wxInputStream *in_stream = (wxInputStream *)sbuf->GetStream(); + + in_stream->Ungetch(buf + nWrite, nRead - nWrite); + } + + total += nWrite; + } + else + { + nWrite = 0; + } + } + while ( nWrite == WXSIZEOF(buf) ); + + return total; +} + +wxFileOffset wxStreamBuffer::Seek(wxFileOffset pos, wxSeekMode mode) +{ + wxFileOffset ret_off, diff; + + wxFileOffset last_access = GetLastAccess(); + + if ( !m_flushable ) + { + switch (mode) + { + case wxFromStart: + diff = pos; + break; + + case wxFromCurrent: + diff = pos + GetIntPosition(); + break; + + case wxFromEnd: + diff = pos + last_access; + break; + + default: + wxFAIL_MSG( wxT("invalid seek mode") ); + + return wxInvalidOffset; + } + if (diff < 0 || diff > last_access) + return wxInvalidOffset; + size_t int_diff = wx_truncate_cast(size_t, diff); + wxCHECK_MSG( (wxFileOffset)int_diff == diff, wxInvalidOffset, wxT("huge file not supported") ); + SetIntPosition(int_diff); + return diff; + } + + switch ( mode ) + { + case wxFromStart: + // We'll try to compute an internal position later ... + ret_off = m_stream->OnSysSeek(pos, wxFromStart); + ResetBuffer(); + return ret_off; + + case wxFromCurrent: + diff = pos + GetIntPosition(); + + if ( (diff > last_access) || (diff < 0) ) + { + // We must take into account the fact that we have read + // something previously. + ret_off = m_stream->OnSysSeek(diff-last_access, wxFromCurrent); + ResetBuffer(); + return ret_off; + } + else + { + size_t int_diff = wx_truncate_cast(size_t, diff); + wxCHECK_MSG( (wxFileOffset)int_diff == diff, wxInvalidOffset, wxT("huge file not supported") ); + SetIntPosition(int_diff); + return diff; + } + + case wxFromEnd: + // Hard to compute: always seek to the requested position. + ret_off = m_stream->OnSysSeek(pos, wxFromEnd); + ResetBuffer(); + return ret_off; + } + + return wxInvalidOffset; +} + +wxFileOffset wxStreamBuffer::Tell() const +{ + wxFileOffset pos; + + // ask the stream for position if we have a real one + if ( m_stream ) + { + pos = m_stream->OnSysTell(); + if ( pos == wxInvalidOffset ) + return wxInvalidOffset; + } + else // no associated stream + { + pos = 0; + } + + pos += GetIntPosition(); + + if ( m_mode == read && m_flushable ) + pos -= GetLastAccess(); + + return pos; +} + +// ---------------------------------------------------------------------------- +// wxStreamBase +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxStreamBase, wxObject) + +wxStreamBase::wxStreamBase() +{ + m_lasterror = wxSTREAM_NO_ERROR; + m_lastcount = 0; +} + +wxStreamBase::~wxStreamBase() +{ +} + +size_t wxStreamBase::GetSize() const +{ + wxFileOffset length = GetLength(); + if ( length == (wxFileOffset)wxInvalidOffset ) + return 0; + + const size_t len = wx_truncate_cast(size_t, length); + wxASSERT_MSG( len == length + size_t(0), wxT("large files not supported") ); + + return len; +} + +wxFileOffset wxStreamBase::OnSysSeek(wxFileOffset WXUNUSED(seek), wxSeekMode WXUNUSED(mode)) +{ + return wxInvalidOffset; +} + +wxFileOffset wxStreamBase::OnSysTell() const +{ + return wxInvalidOffset; +} + +// ---------------------------------------------------------------------------- +// wxInputStream +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxInputStream, wxStreamBase) + +wxInputStream::wxInputStream() +{ + m_wback = NULL; + m_wbacksize = + m_wbackcur = 0; +} + +wxInputStream::~wxInputStream() +{ + free(m_wback); +} + +bool wxInputStream::CanRead() const +{ + // we don't know if there is anything to read or not and by default we + // prefer to be optimistic and try to read data unless we know for sure + // there is no more of it + return m_lasterror != wxSTREAM_EOF; +} + +bool wxInputStream::Eof() const +{ + // the only way the base class can know we're at EOF is when we'd already + // tried to read beyond it in which case last error is set accordingly + return GetLastError() == wxSTREAM_EOF; +} + +char *wxInputStream::AllocSpaceWBack(size_t needed_size) +{ + // get number of bytes left from previous wback buffer + size_t toget = m_wbacksize - m_wbackcur; + + // allocate a buffer large enough to hold prev + new data + char *temp_b = (char *)malloc(needed_size + toget); + + if (!temp_b) + return NULL; + + // copy previous data (and free old buffer) if needed + if (m_wback) + { + memmove(temp_b + needed_size, m_wback + m_wbackcur, toget); + free(m_wback); + } + + // done + m_wback = temp_b; + m_wbackcur = 0; + m_wbacksize = needed_size + toget; + + return m_wback; +} + +size_t wxInputStream::GetWBack(void *buf, size_t size) +{ + wxASSERT_MSG( buf, wxT("Warning: Null pointer is about to be used") ); + + /* Clear buffer first */ + memset(buf, 0x00, size); + + if (!m_wback) + return 0; + + // how many bytes do we have in the buffer? + size_t toget = m_wbacksize - m_wbackcur; + + if ( size < toget ) + { + // we won't read everything + toget = size; + } + + // copy the data from the cache + memcpy(buf, m_wback + m_wbackcur, toget); + + m_wbackcur += toget; + if ( m_wbackcur == m_wbacksize ) + { + // TODO: should we really free it here all the time? maybe keep it? + free(m_wback); + m_wback = NULL; + m_wbacksize = 0; + m_wbackcur = 0; + } + + // return the number of bytes copied + return toget; +} + +size_t wxInputStream::Ungetch(const void *buf, size_t bufsize) +{ + wxASSERT_MSG( buf, wxT("Warning: Null pointer is about to be used in Ungetch()") ); + + if ( m_lasterror != wxSTREAM_NO_ERROR && m_lasterror != wxSTREAM_EOF ) + { + // can't operate on this stream until the error is cleared + return 0; + } + + char *ptrback = AllocSpaceWBack(bufsize); + if (!ptrback) + return 0; + + // Eof() shouldn't return true any longer + if ( m_lasterror == wxSTREAM_EOF ) + m_lasterror = wxSTREAM_NO_ERROR; + + memcpy(ptrback, buf, bufsize); + return bufsize; +} + +bool wxInputStream::Ungetch(char c) +{ + return Ungetch(&c, sizeof(c)) != 0; +} + +int wxInputStream::GetC() +{ + unsigned char c; + Read(&c, sizeof(c)); + return LastRead() ? c : wxEOF; +} + +wxInputStream& wxInputStream::Read(void *buf, size_t size) +{ + wxASSERT_MSG( buf, wxT("Warning: Null pointer is about to be read") ); + + char *p = (char *)buf; + m_lastcount = 0; + + size_t read = GetWBack(buf, size); + for ( ;; ) + { + size -= read; + m_lastcount += read; + p += read; + + if ( !size ) + { + // we read the requested amount of data + break; + } + + if ( p != buf && !CanRead() ) + { + // we have already read something and we would block in OnSysRead() + // now: don't do it but return immediately + break; + } + + read = OnSysRead(p, size); + if ( !read ) + { + // no more data available + break; + } + } + + return *this; +} + +char wxInputStream::Peek() +{ + char c; + Read(&c, sizeof(c)); + if (m_lasterror == wxSTREAM_NO_ERROR) + { + Ungetch(c); + return c; + } + + return 0; +} + +wxInputStream& wxInputStream::Read(wxOutputStream& stream_out) +{ + size_t lastcount = 0; + char buf[BUF_TEMP_SIZE]; + + for ( ;; ) + { + size_t bytes_read = Read(buf, WXSIZEOF(buf)).LastRead(); + if ( !bytes_read ) + break; + + if ( stream_out.Write(buf, bytes_read).LastWrite() != bytes_read ) + break; + + lastcount += bytes_read; + } + + m_lastcount = lastcount; + + return *this; +} + +bool wxInputStream::ReadAll(void *buffer_, size_t size) +{ + char* buffer = static_cast(buffer_); + + size_t totalCount = 0; + + for ( ;; ) + { + const size_t lastCount = Read(buffer, size).LastRead(); + + // There is no point in continuing looping if we can't read anything at + // all. + if ( !lastCount ) + break; + + totalCount += lastCount; + + // ... Or if an error occurred on the stream. + if ( !IsOk() ) + break; + + // Return successfully if we read exactly the requested number of + // bytes (normally the ">" case should never occur and so we could use + // "==" test, but be safe and avoid overflowing size even in case of + // bugs in LastRead()). + if ( lastCount >= size ) + { + size = 0; + break; + } + + // Advance the buffer before trying to read the rest of data. + size -= lastCount; + buffer += lastCount; + } + + m_lastcount = totalCount; + + return size == 0; +} + +wxFileOffset wxInputStream::SeekI(wxFileOffset pos, wxSeekMode mode) +{ + // RR: This code is duplicated in wxBufferedInputStream. This is + // not really a good design, but buffered stream are different + // from all others in that they handle two stream-related objects: + // the stream buffer and parent stream. + + // I don't know whether it should be put as well in wxFileInputStream::OnSysSeek + if (m_lasterror==wxSTREAM_EOF) + m_lasterror=wxSTREAM_NO_ERROR; + + // avoid unnecessary seek operations (optimization) + wxFileOffset currentPos = TellI(), size = GetLength(); + if ((mode == wxFromStart && currentPos == pos) || + (mode == wxFromCurrent && pos == 0) || + (mode == wxFromEnd && size != wxInvalidOffset && currentPos == size-pos)) + return currentPos; + + if (!IsSeekable() && mode == wxFromCurrent && pos > 0) + { + // rather than seeking, we can just read data and discard it; + // this allows to forward-seek also non-seekable streams! + char buf[BUF_TEMP_SIZE]; + size_t bytes_read; + + // read chunks of BUF_TEMP_SIZE bytes until we reach the new position + for ( ; pos >= BUF_TEMP_SIZE; pos -= bytes_read) + { + bytes_read = Read(buf, WXSIZEOF(buf)).LastRead(); + if ( m_lasterror != wxSTREAM_NO_ERROR ) + return wxInvalidOffset; + + wxASSERT(bytes_read == WXSIZEOF(buf)); + } + + // read the last 'pos' bytes + bytes_read = Read(buf, (size_t)pos).LastRead(); + if ( m_lasterror != wxSTREAM_NO_ERROR ) + return wxInvalidOffset; + + wxASSERT(bytes_read == (size_t)pos); + + // we should now have sought to the right position... + return TellI(); + } + + /* RR: A call to SeekI() will automatically invalidate any previous + call to Ungetch(), otherwise it would be possible to SeekI() to + one position, unread some bytes there, SeekI() to another position + and the data would be corrupted. + + GRG: Could add code here to try to navigate within the wback + buffer if possible, but is it really needed? It would only work + when seeking in wxFromCurrent mode, else it would invalidate + anyway... */ + + if (m_wback) + { + wxLogDebug( wxT("Seeking in stream which has data written back to it.") ); + + free(m_wback); + m_wback = NULL; + m_wbacksize = 0; + m_wbackcur = 0; + } + + return OnSysSeek(pos, mode); +} + +wxFileOffset wxInputStream::TellI() const +{ + wxFileOffset pos = OnSysTell(); + + if (pos != wxInvalidOffset) + pos -= (m_wbacksize - m_wbackcur); + + return pos; +} + + +// ---------------------------------------------------------------------------- +// wxOutputStream +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxOutputStream, wxStreamBase) + +wxOutputStream::wxOutputStream() +{ +} + +wxOutputStream::~wxOutputStream() +{ +} + +size_t wxOutputStream::OnSysWrite(const void * WXUNUSED(buffer), + size_t WXUNUSED(bufsize)) +{ + return 0; +} + +void wxOutputStream::PutC(char c) +{ + Write(&c, sizeof(c)); +} + +wxOutputStream& wxOutputStream::Write(const void *buffer, size_t size) +{ + m_lastcount = OnSysWrite(buffer, size); + return *this; +} + +wxOutputStream& wxOutputStream::Write(wxInputStream& stream_in) +{ + stream_in.Read(*this); + return *this; +} + +bool wxOutputStream::WriteAll(const void *buffer_, size_t size) +{ + // This exactly mirrors ReadAll(), see there for more comments. + const char* buffer = static_cast(buffer_); + + size_t totalCount = 0; + + for ( ;; ) + { + const size_t lastCount = Write(buffer, size).LastWrite(); + if ( !lastCount ) + break; + + totalCount += lastCount; + + if ( !IsOk() ) + break; + + if ( lastCount >= size ) + { + size = 0; + break; + } + + size -= lastCount; + buffer += lastCount; + } + + m_lastcount = totalCount; + return size == 0; +} + +wxFileOffset wxOutputStream::TellO() const +{ + return OnSysTell(); +} + +wxFileOffset wxOutputStream::SeekO(wxFileOffset pos, wxSeekMode mode) +{ + return OnSysSeek(pos, mode); +} + +void wxOutputStream::Sync() +{ +} + + +// ---------------------------------------------------------------------------- +// wxCountingOutputStream +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxCountingOutputStream, wxOutputStream) + +wxCountingOutputStream::wxCountingOutputStream () +{ + m_currentPos = + m_lastPos = 0; +} + +wxFileOffset wxCountingOutputStream::GetLength() const +{ + return m_lastPos; +} + +size_t wxCountingOutputStream::OnSysWrite(const void *WXUNUSED(buffer), + size_t size) +{ + m_currentPos += size; + if ( m_currentPos > m_lastPos ) + m_lastPos = m_currentPos; + + return size; +} + +wxFileOffset wxCountingOutputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) +{ + ssize_t new_pos = wx_truncate_cast(ssize_t, pos); + + switch ( mode ) + { + case wxFromStart: + wxCHECK_MSG( (wxFileOffset)new_pos == pos, wxInvalidOffset, wxT("huge position not supported") ); + break; + + case wxFromEnd: + new_pos += m_lastPos; + wxCHECK_MSG( (wxFileOffset)new_pos == (wxFileOffset)(m_lastPos + pos), wxInvalidOffset, wxT("huge position not supported") ); + break; + + case wxFromCurrent: + new_pos += m_currentPos; + wxCHECK_MSG( (wxFileOffset)new_pos == (wxFileOffset)(m_currentPos + pos), wxInvalidOffset, wxT("huge position not supported") ); + break; + + default: + wxFAIL_MSG( wxT("invalid seek mode") ); + return wxInvalidOffset; + } + + m_currentPos = new_pos; + + if ( m_currentPos > m_lastPos ) + m_lastPos = m_currentPos; + + return m_currentPos; +} + +wxFileOffset wxCountingOutputStream::OnSysTell() const +{ + return m_currentPos; +} + +// ---------------------------------------------------------------------------- +// wxFilterInputStream +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxFilterInputStream, wxInputStream) + +wxFilterInputStream::wxFilterInputStream() + : m_parent_i_stream(NULL), + m_owns(false) +{ +} + +wxFilterInputStream::wxFilterInputStream(wxInputStream& stream) + : m_parent_i_stream(&stream), + m_owns(false) +{ +} + +wxFilterInputStream::wxFilterInputStream(wxInputStream *stream) + : m_parent_i_stream(stream), + m_owns(true) +{ +} + +wxFilterInputStream::~wxFilterInputStream() +{ + if (m_owns) + delete m_parent_i_stream; +} + +// ---------------------------------------------------------------------------- +// wxFilterOutputStream +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxFilterOutputStream, wxOutputStream) + +wxFilterOutputStream::wxFilterOutputStream() + : m_parent_o_stream(NULL), + m_owns(false) +{ +} + +wxFilterOutputStream::wxFilterOutputStream(wxOutputStream& stream) + : m_parent_o_stream(&stream), + m_owns(false) +{ +} + +wxFilterOutputStream::wxFilterOutputStream(wxOutputStream *stream) + : m_parent_o_stream(stream), + m_owns(true) +{ +} + +bool wxFilterOutputStream::Close() +{ + if (m_parent_o_stream && m_owns) + return m_parent_o_stream->Close(); + else + return true; +} + +wxFilterOutputStream::~wxFilterOutputStream() +{ + if (m_owns) + delete m_parent_o_stream; +} + +// ---------------------------------------------------------------------------- +// wxFilterClassFactoryBase +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxFilterClassFactoryBase, wxObject) + +wxString wxFilterClassFactoryBase::PopExtension(const wxString& location) const +{ + return location.substr(0, FindExtension(location)); +} + +wxString::size_type wxFilterClassFactoryBase::FindExtension( + const wxString& location) const +{ + for (const wxChar *const *p = GetProtocols(wxSTREAM_FILEEXT); *p; p++) + { + if ( location.EndsWith(*p) ) + return location.length() - wxStrlen(*p); + } + + return wxString::npos; +} + +bool wxFilterClassFactoryBase::CanHandle(const wxString& protocol, + wxStreamProtocolType type) const +{ + if (type == wxSTREAM_FILEEXT) + return FindExtension(protocol) != wxString::npos; + else + for (const wxChar *const *p = GetProtocols(type); *p; p++) + if (protocol == *p) + return true; + + return false; +} + +// ---------------------------------------------------------------------------- +// wxFilterClassFactory +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxFilterClassFactory, wxFilterClassFactoryBase) + +wxFilterClassFactory *wxFilterClassFactory::sm_first = NULL; + +void wxFilterClassFactory::Remove() +{ + if (m_next != this) + { + wxFilterClassFactory **pp = &sm_first; + + while (*pp != this) + pp = &(*pp)->m_next; + + *pp = m_next; + + m_next = this; + } +} + +// ---------------------------------------------------------------------------- +// wxBufferedInputStream +// ---------------------------------------------------------------------------- + +namespace +{ + +// helper function used for initializing the buffer used by +// wxBufferedInput/OutputStream: it simply returns the provided buffer if it's +// not NULL or creates a buffer of the given size otherwise +template +wxStreamBuffer * +CreateBufferIfNeeded(T& stream, wxStreamBuffer *buffer, size_t bufsize = 1024) +{ + return buffer ? buffer : new wxStreamBuffer(bufsize, stream); +} + +} // anonymous namespace + +wxBufferedInputStream::wxBufferedInputStream(wxInputStream& stream, + wxStreamBuffer *buffer) + : wxFilterInputStream(stream) +{ + m_i_streambuf = CreateBufferIfNeeded(*this, buffer); +} + +wxBufferedInputStream::wxBufferedInputStream(wxInputStream& stream, + size_t bufsize) + : wxFilterInputStream(stream) +{ + m_i_streambuf = CreateBufferIfNeeded(*this, NULL, bufsize); +} + +wxBufferedInputStream::~wxBufferedInputStream() +{ + m_parent_i_stream->SeekI(-(wxFileOffset)m_i_streambuf->GetBytesLeft(), + wxFromCurrent); + + delete m_i_streambuf; +} + +char wxBufferedInputStream::Peek() +{ + return m_i_streambuf->Peek(); +} + +wxInputStream& wxBufferedInputStream::Read(void *buf, size_t size) +{ + // reset the error flag + Reset(); + + // first read from the already cached data + m_lastcount = GetWBack(buf, size); + + // do we have to read anything more? + if ( m_lastcount < size ) + { + size -= m_lastcount; + buf = (char *)buf + m_lastcount; + + // the call to wxStreamBuffer::Read() below may reset our m_lastcount + // (but it also may not do it if the buffer is associated to another + // existing stream and wasn't created by us), so save it + size_t countOld = m_lastcount; + + // the new count of the bytes read is the count of bytes read this time + m_lastcount = m_i_streambuf->Read(buf, size); + + // plus those we had read before + m_lastcount += countOld; + } + + return *this; +} + +wxFileOffset wxBufferedInputStream::SeekI(wxFileOffset pos, wxSeekMode mode) +{ + // RR: Look at wxInputStream for comments. + + if (m_lasterror==wxSTREAM_EOF) + Reset(); + + if (m_wback) + { + wxLogDebug( wxT("Seeking in stream which has data written back to it.") ); + + free(m_wback); + m_wback = NULL; + m_wbacksize = 0; + m_wbackcur = 0; + } + + return m_i_streambuf->Seek(pos, mode); +} + +wxFileOffset wxBufferedInputStream::TellI() const +{ + wxFileOffset pos = m_i_streambuf->Tell(); + + if (pos != wxInvalidOffset) + pos -= (m_wbacksize - m_wbackcur); + + return pos; +} + +size_t wxBufferedInputStream::OnSysRead(void *buffer, size_t bufsize) +{ + return m_parent_i_stream->Read(buffer, bufsize).LastRead(); +} + +wxFileOffset wxBufferedInputStream::OnSysSeek(wxFileOffset seek, wxSeekMode mode) +{ + return m_parent_i_stream->SeekI(seek, mode); +} + +wxFileOffset wxBufferedInputStream::OnSysTell() const +{ + return m_parent_i_stream->TellI(); +} + +void wxBufferedInputStream::SetInputStreamBuffer(wxStreamBuffer *buffer) +{ + wxCHECK_RET( buffer, wxT("wxBufferedInputStream needs buffer") ); + + delete m_i_streambuf; + m_i_streambuf = buffer; +} + +// ---------------------------------------------------------------------------- +// wxBufferedOutputStream +// ---------------------------------------------------------------------------- + +wxBufferedOutputStream::wxBufferedOutputStream(wxOutputStream& stream, + wxStreamBuffer *buffer) + : wxFilterOutputStream(stream) +{ + m_o_streambuf = CreateBufferIfNeeded(*this, buffer); +} + +wxBufferedOutputStream::wxBufferedOutputStream(wxOutputStream& stream, + size_t bufsize) + : wxFilterOutputStream(stream) +{ + m_o_streambuf = CreateBufferIfNeeded(*this, NULL, bufsize); +} + +wxBufferedOutputStream::~wxBufferedOutputStream() +{ + Sync(); + delete m_o_streambuf; +} + +bool wxBufferedOutputStream::Close() +{ + Sync(); + return IsOk(); +} + + +wxOutputStream& wxBufferedOutputStream::Write(const void *buffer, size_t size) +{ + m_lastcount = 0; + m_o_streambuf->Write(buffer, size); + return *this; +} + +wxFileOffset wxBufferedOutputStream::SeekO(wxFileOffset pos, wxSeekMode mode) +{ + Sync(); + return m_o_streambuf->Seek(pos, mode); +} + +wxFileOffset wxBufferedOutputStream::TellO() const +{ + return m_o_streambuf->Tell(); +} + +void wxBufferedOutputStream::Sync() +{ + if (m_o_streambuf) + { + m_o_streambuf->FlushBuffer(); + m_parent_o_stream->Sync(); + } +} + +size_t wxBufferedOutputStream::OnSysWrite(const void *buffer, size_t bufsize) +{ + return m_parent_o_stream->Write(buffer, bufsize).LastWrite(); +} + +wxFileOffset wxBufferedOutputStream::OnSysSeek(wxFileOffset seek, wxSeekMode mode) +{ + return m_parent_o_stream->SeekO(seek, mode); +} + +wxFileOffset wxBufferedOutputStream::OnSysTell() const +{ + return m_parent_o_stream->TellO(); +} + +wxFileOffset wxBufferedOutputStream::GetLength() const +{ + return m_parent_o_stream->GetLength() + m_o_streambuf->GetIntPosition(); +} + +void wxBufferedOutputStream::SetOutputStreamBuffer(wxStreamBuffer *buffer) +{ + wxCHECK_RET( buffer, wxT("wxBufferedOutputStream needs buffer") ); + + delete m_o_streambuf; + m_o_streambuf = buffer; +} + +// --------------------------------------------------------------------------- +// wxWrapperInputStream implementation +// --------------------------------------------------------------------------- + +wxWrapperInputStream::wxWrapperInputStream() +{ + m_lasterror = wxSTREAM_READ_ERROR; +} + +wxWrapperInputStream::wxWrapperInputStream(wxInputStream& stream) + : wxFilterInputStream(stream) +{ + SynchronizeLastError(); +} + +wxWrapperInputStream::wxWrapperInputStream(wxInputStream *stream) + : wxFilterInputStream(stream) +{ + if ( m_parent_i_stream ) + SynchronizeLastError(); + else + m_lasterror = wxSTREAM_READ_ERROR; +} + +void wxWrapperInputStream::InitParentStream(wxInputStream& stream) +{ + wxCHECK_RET( !m_parent_i_stream, "Can't init parent stream twice" ); + + m_parent_i_stream = &stream; + + SynchronizeLastError(); +} + +void wxWrapperInputStream::InitParentStream(wxInputStream* stream) +{ + wxCHECK_RET( !m_parent_i_stream, "Can't init parent stream twice" ); + + m_parent_i_stream = stream; + + if ( m_parent_i_stream ) + { + m_owns = true; + + SynchronizeLastError(); + } +} + +wxFileOffset wxWrapperInputStream::GetLength() const +{ + wxCHECK_MSG(m_parent_i_stream, wxInvalidOffset, "Stream not valid"); + + wxON_BLOCK_EXIT_THIS0(wxWrapperInputStream::SynchronizeLastError); + return m_parent_i_stream->GetLength(); +} + +bool wxWrapperInputStream::IsSeekable() const +{ + wxCHECK_MSG(m_parent_i_stream, false, "Stream not valid"); + return m_parent_i_stream->IsSeekable(); +} + +size_t wxWrapperInputStream::OnSysRead(void *buffer, size_t size) +{ + wxCHECK_MSG(m_parent_i_stream, false, "Stream not valid"); + + wxON_BLOCK_EXIT_THIS0(wxWrapperInputStream::SynchronizeLastError); + + m_parent_i_stream->Read(buffer, size); + return m_parent_i_stream->LastRead(); +} + +wxFileOffset wxWrapperInputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) +{ + wxCHECK_MSG(IsSeekable(), false, "Stream not seekable"); + + wxON_BLOCK_EXIT_THIS0(wxWrapperInputStream::SynchronizeLastError); + return m_parent_i_stream->SeekI (pos, mode); +} + +wxFileOffset wxWrapperInputStream::OnSysTell() const +{ + wxCHECK_MSG(m_parent_i_stream, false, "Stream not valid"); + + wxON_BLOCK_EXIT_THIS0(wxWrapperInputStream::SynchronizeLastError); + return m_parent_i_stream->TellI(); +} + +// ---------------------------------------------------------------------------- +// Some IOManip function +// ---------------------------------------------------------------------------- + +wxOutputStream& wxEndL(wxOutputStream& stream) +{ + static const wxChar *eol = wxTextFile::GetEOL(); + + return stream.Write(eol, wxStrlen(eol)); +} + +#endif // wxUSE_STREAMS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/string.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/string.cpp new file mode 100644 index 0000000000..a2f18a8b49 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/string.cpp @@ -0,0 +1,2325 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/string.cpp +// Purpose: wxString class +// Author: Vadim Zeitlin, Ryan Norton +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Vadim Zeitlin +// (c) 2004 Ryan Norton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// headers, declarations, constants +// =========================================================================== + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/wxcrtvararg.h" + #include "wx/intl.h" + #include "wx/log.h" +#endif + +#include + +#ifndef __WXWINCE__ + #include +#endif + +#include +#include + +#include "wx/hashmap.h" +#include "wx/vector.h" +#include "wx/xlocale.h" + +#ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" +#endif // __WINDOWS__ + +#if wxUSE_STD_IOSTREAM + #include +#endif + +// string handling functions used by wxString: +#if wxUSE_UNICODE_UTF8 + #define wxStringMemcpy memcpy + #define wxStringMemcmp memcmp + #define wxStringMemchr memchr + #define wxStringStrlen strlen +#else + #define wxStringMemcpy wxTmemcpy + #define wxStringMemcmp wxTmemcmp + #define wxStringMemchr wxTmemchr + #define wxStringStrlen wxStrlen +#endif + +// define a function declared in wx/buffer.h here as we don't have buffer.cpp +// and don't want to add it just because of this simple function +namespace wxPrivate +{ + +// wxXXXBuffer classes can be (implicitly) used during global statics +// initialization so wrap the status UntypedBufferData variable in a function +// to make it safe to access it even before all global statics are initialized +UntypedBufferData *GetUntypedNullData() +{ + static UntypedBufferData s_untypedNullData(NULL, 0); + + return &s_untypedNullData; +} + +} // namespace wxPrivate + +// --------------------------------------------------------------------------- +// static class variables definition +// --------------------------------------------------------------------------- + +//According to STL _must_ be a -1 size_t +const size_t wxString::npos = (size_t) -1; + +#if wxUSE_STRING_POS_CACHE + +#ifdef wxHAS_COMPILER_TLS + +wxTLS_TYPE(wxString::Cache) wxString::ms_cache; + +#else // !wxHAS_COMPILER_TLS + +struct wxStrCacheInitializer +{ + wxStrCacheInitializer() + { + // calling this function triggers s_cache initialization in it, and + // from now on it becomes safe to call from multiple threads + wxString::GetCache(); + } +}; + +/* +wxString::Cache& wxString::GetCache() +{ + static wxTLS_TYPE(Cache) s_cache; + + return wxTLS_VALUE(s_cache); +} +*/ + +static wxStrCacheInitializer gs_stringCacheInit; + +#endif // wxHAS_COMPILER_TLS/!wxHAS_COMPILER_TLS + +// gdb seems to be unable to display thread-local variables correctly, at least +// not my 6.4.98 version under amd64, so provide this debugging helper to do it +#if wxDEBUG_LEVEL >= 2 + +struct wxStrCacheDumper +{ + static void ShowAll() + { + puts("*** wxString cache dump:"); + for ( unsigned n = 0; n < wxString::Cache::SIZE; n++ ) + { + const wxString::Cache::Element& + c = wxString::GetCacheBegin()[n]; + + printf("\t%u%s\t%p: pos=(%lu, %lu), len=%ld\n", + n, + n == wxString::LastUsedCacheElement() ? " [*]" : "", + c.str, + (unsigned long)c.pos, + (unsigned long)c.impl, + (long)c.len); + } + } +}; + +void wxDumpStrCache() { wxStrCacheDumper::ShowAll(); } + +#endif // wxDEBUG_LEVEL >= 2 + +#ifdef wxPROFILE_STRING_CACHE + +wxString::CacheStats wxString::ms_cacheStats; + +struct wxStrCacheStatsDumper +{ + ~wxStrCacheStatsDumper() + { + const wxString::CacheStats& stats = wxString::ms_cacheStats; + + if ( stats.postot ) + { + puts("*** wxString cache statistics:"); + printf("\tTotal non-trivial calls to PosToImpl(): %u\n", + stats.postot); + printf("\tHits %u (of which %u not used) or %.2f%%\n", + stats.poshits, + stats.mishits, + 100.*float(stats.poshits - stats.mishits)/stats.postot); + printf("\tAverage position requested: %.2f\n", + float(stats.sumpos) / stats.postot); + printf("\tAverage offset after cached hint: %.2f\n", + float(stats.sumofs) / stats.postot); + } + + if ( stats.lentot ) + { + printf("\tNumber of calls to length(): %u, hits=%.2f%%\n", + stats.lentot, 100.*float(stats.lenhits)/stats.lentot); + } + } +}; + +static wxStrCacheStatsDumper s_showCacheStats; + +#endif // wxPROFILE_STRING_CACHE + +#endif // wxUSE_STRING_POS_CACHE + +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +#if wxUSE_STD_IOSTREAM + +#include + +wxSTD ostream& operator<<(wxSTD ostream& os, const wxCStrData& str) +{ +#if wxUSE_UNICODE && !wxUSE_UNICODE_UTF8 + const wxScopedCharBuffer buf(str.AsCharBuf()); + if ( !buf ) + os.clear(wxSTD ios_base::failbit); + else + os << buf.data(); + + return os; +#else + return os << str.AsInternal(); +#endif +} + +wxSTD ostream& operator<<(wxSTD ostream& os, const wxString& str) +{ + return os << str.c_str(); +} + +wxSTD ostream& operator<<(wxSTD ostream& os, const wxScopedCharBuffer& str) +{ + return os << str.data(); +} + +#ifndef __BORLANDC__ +wxSTD ostream& operator<<(wxSTD ostream& os, const wxScopedWCharBuffer& str) +{ + return os << str.data(); +} +#endif + +#if wxUSE_UNICODE && defined(HAVE_WOSTREAM) + +wxSTD wostream& operator<<(wxSTD wostream& wos, const wxString& str) +{ + return wos << str.wc_str(); +} + +wxSTD wostream& operator<<(wxSTD wostream& wos, const wxCStrData& str) +{ + return wos << str.AsWChar(); +} + +wxSTD wostream& operator<<(wxSTD wostream& wos, const wxScopedWCharBuffer& str) +{ + return wos << str.data(); +} + +#endif // wxUSE_UNICODE && defined(HAVE_WOSTREAM) + +#endif // wxUSE_STD_IOSTREAM + +// =========================================================================== +// wxString class core +// =========================================================================== + +#if wxUSE_UNICODE_UTF8 + +void wxString::PosLenToImpl(size_t pos, size_t len, + size_t *implPos, size_t *implLen) const +{ + if ( pos == npos ) + { + *implPos = npos; + } + else // have valid start position + { + const const_iterator b = GetIterForNthChar(pos); + *implPos = wxStringImpl::const_iterator(b.impl()) - m_impl.begin(); + if ( len == npos ) + { + *implLen = npos; + } + else // have valid length too + { + // we need to handle the case of length specifying a substring + // going beyond the end of the string, just as std::string does + const const_iterator e(end()); + const_iterator i(b); + while ( len && i <= e ) + { + ++i; + --len; + } + + *implLen = i.impl() - b.impl(); + } + } +} + +#endif // wxUSE_UNICODE_UTF8 + +// ---------------------------------------------------------------------------- +// wxCStrData converted strings caching +// ---------------------------------------------------------------------------- + +// FIXME-UTF8: temporarily disabled because it doesn't work with global +// string objects; re-enable after fixing this bug and benchmarking +// performance to see if using a hash is a good idea at all +#if 0 + +// For backward compatibility reasons, it must be possible to assign the value +// returned by wxString::c_str() to a char* or wchar_t* variable and work with +// it. Returning wxCharBuffer from (const char*)c_str() wouldn't do the trick, +// because the memory would be freed immediately, but it has to be valid as long +// as the string is not modified, so that code like this still works: +// +// const wxChar *s = str.c_str(); +// while ( s ) { ... } + +// FIXME-UTF8: not thread safe! +// FIXME-UTF8: we currently clear the cached conversion only when the string is +// destroyed, but we should do it when the string is modified, to +// keep memory usage down +// FIXME-UTF8: we do the conversion every time As[W]Char() is called, but if we +// invalidated the cache on every change, we could keep the previous +// conversion +// FIXME-UTF8: add tracing of usage of these two methods - new code is supposed +// to use mb_str() or wc_str() instead of (const [w]char*)c_str() + +template +static inline void DeleteStringFromConversionCache(T& hash, const wxString *s) +{ + typename T::iterator i = hash.find(wxConstCast(s, wxString)); + if ( i != hash.end() ) + { + free(i->second); + hash.erase(i); + } +} + +#if wxUSE_UNICODE +// NB: non-STL implementation doesn't compile with "const wxString*" key type, +// so we have to use wxString* here and const-cast when used +WX_DECLARE_HASH_MAP(wxString*, char*, wxPointerHash, wxPointerEqual, + wxStringCharConversionCache); +static wxStringCharConversionCache gs_stringsCharCache; + +const char* wxCStrData::AsChar() const +{ + // remove previously cache value, if any (see FIXMEs above): + DeleteStringFromConversionCache(gs_stringsCharCache, m_str); + + // convert the string and keep it: + const char *s = gs_stringsCharCache[wxConstCast(m_str, wxString)] = + m_str->mb_str().release(); + + return s + m_offset; +} +#endif // wxUSE_UNICODE + +#if !wxUSE_UNICODE_WCHAR +WX_DECLARE_HASH_MAP(wxString*, wchar_t*, wxPointerHash, wxPointerEqual, + wxStringWCharConversionCache); +static wxStringWCharConversionCache gs_stringsWCharCache; + +const wchar_t* wxCStrData::AsWChar() const +{ + // remove previously cache value, if any (see FIXMEs above): + DeleteStringFromConversionCache(gs_stringsWCharCache, m_str); + + // convert the string and keep it: + const wchar_t *s = gs_stringsWCharCache[wxConstCast(m_str, wxString)] = + m_str->wc_str().release(); + + return s + m_offset; +} +#endif // !wxUSE_UNICODE_WCHAR + +wxString::~wxString() +{ +#if wxUSE_UNICODE + // FIXME-UTF8: do this only if locale is not UTF8 if wxUSE_UNICODE_UTF8 + DeleteStringFromConversionCache(gs_stringsCharCache, this); +#endif +#if !wxUSE_UNICODE_WCHAR + DeleteStringFromConversionCache(gs_stringsWCharCache, this); +#endif +} +#endif + +// =========================================================================== +// wxString class core +// =========================================================================== + +// --------------------------------------------------------------------------- +// construction and conversion +// --------------------------------------------------------------------------- + +#if wxUSE_UNICODE_WCHAR +/* static */ +wxString::SubstrBufFromMB wxString::ConvertStr(const char *psz, size_t nLength, + const wxMBConv& conv) +{ + // anything to do? + if ( !psz || nLength == 0 ) + return SubstrBufFromMB(wxWCharBuffer(L""), 0); + + if ( nLength == npos ) + nLength = wxNO_LEN; + + size_t wcLen; + wxScopedWCharBuffer wcBuf(conv.cMB2WC(psz, nLength, &wcLen)); + if ( !wcLen ) + return SubstrBufFromMB(wxWCharBuffer(L""), 0); + else + return SubstrBufFromMB(wcBuf, wcLen); +} +#endif // wxUSE_UNICODE_WCHAR + +#if wxUSE_UNICODE_UTF8 +/* static */ +wxString::SubstrBufFromMB wxString::ConvertStr(const char *psz, size_t nLength, + const wxMBConv& conv) +{ + // anything to do? + if ( !psz || nLength == 0 ) + return SubstrBufFromMB(wxCharBuffer(""), 0); + + // if psz is already in UTF-8, we don't have to do the roundtrip to + // wchar_t* and back: + if ( conv.IsUTF8() ) + { + // we need to validate the input because UTF8 iterators assume valid + // UTF-8 sequence and psz may be invalid: + if ( wxStringOperations::IsValidUtf8String(psz, nLength) ) + { + // we must pass the real string length to SubstrBufFromMB ctor + if ( nLength == npos ) + nLength = psz ? strlen(psz) : 0; + return SubstrBufFromMB(wxScopedCharBuffer::CreateNonOwned(psz, nLength), + nLength); + } + // else: do the roundtrip through wchar_t* + } + + if ( nLength == npos ) + nLength = wxNO_LEN; + + // first convert to wide string: + size_t wcLen; + wxScopedWCharBuffer wcBuf(conv.cMB2WC(psz, nLength, &wcLen)); + if ( !wcLen ) + return SubstrBufFromMB(wxCharBuffer(""), 0); + + // and then to UTF-8: + SubstrBufFromMB buf(ConvertStr(wcBuf, wcLen, wxMBConvStrictUTF8())); + // widechar -> UTF-8 conversion isn't supposed to ever fail: + wxASSERT_MSG( buf.data, wxT("conversion to UTF-8 failed") ); + + return buf; +} +#endif // wxUSE_UNICODE_UTF8 + +#if wxUSE_UNICODE_UTF8 || !wxUSE_UNICODE +/* static */ +wxString::SubstrBufFromWC wxString::ConvertStr(const wchar_t *pwz, size_t nLength, + const wxMBConv& conv) +{ + // anything to do? + if ( !pwz || nLength == 0 ) + return SubstrBufFromWC(wxCharBuffer(""), 0); + + if ( nLength == npos ) + nLength = wxNO_LEN; + + size_t mbLen; + wxScopedCharBuffer mbBuf(conv.cWC2MB(pwz, nLength, &mbLen)); + if ( !mbLen ) + return SubstrBufFromWC(wxCharBuffer(""), 0); + else + return SubstrBufFromWC(mbBuf, mbLen); +} +#endif // wxUSE_UNICODE_UTF8 || !wxUSE_UNICODE + +// This std::string::c_str()-like method returns a wide char pointer to string +// contents. In wxUSE_UNICODE_WCHAR case it is trivial as it can simply return +// a pointer to the internal representation. Otherwise a conversion is required +// and it returns a temporary buffer. +// +// However for compatibility with c_str() and to avoid breaking existing code +// doing +// +// for ( const wchar_t *p = s.wc_str(); *p; p++ ) +// ... use *p... +// +// we actually need to ensure that the returned buffer is _not_ temporary and +// so we use wxString::m_convertedToWChar to store the returned data +#if !wxUSE_UNICODE_WCHAR + +const wchar_t *wxString::AsWChar(const wxMBConv& conv) const +{ + const char * const strMB = m_impl.c_str(); + const size_t lenMB = m_impl.length(); + + // find out the size of the buffer needed + const size_t lenWC = conv.ToWChar(NULL, 0, strMB, lenMB); + if ( lenWC == wxCONV_FAILED ) + return NULL; + + // keep the same buffer if the string size didn't change: this is not only + // an optimization but also ensure that code which modifies string + // character by character (without changing its length) can continue to use + // the pointer returned by a previous wc_str() call even after changing the + // string + + // TODO-UTF8: we could check for ">" instead of "!=" here as this would + // allow to save on buffer reallocations but at the cost of + // consuming (even) more memory, we should benchmark this to + // determine if it's worth doing + if ( !m_convertedToWChar.m_str || lenWC != m_convertedToWChar.m_len ) + { + if ( !const_cast(this)->m_convertedToWChar.Extend(lenWC) ) + return NULL; + } + + // finally do convert + m_convertedToWChar.m_str[lenWC] = L'\0'; + if ( conv.ToWChar(m_convertedToWChar.m_str, lenWC, + strMB, lenMB) == wxCONV_FAILED ) + return NULL; + + return m_convertedToWChar.m_str; +} + +#endif // !wxUSE_UNICODE_WCHAR + + +// Same thing for mb_str() which returns a normal char pointer to string +// contents: this always requires converting it to the specified encoding in +// non-ANSI build except if we need to convert to UTF-8 and this is what we +// already use internally. +#if wxUSE_UNICODE + +const char *wxString::AsChar(const wxMBConv& conv) const +{ +#if wxUSE_UNICODE_UTF8 + if ( conv.IsUTF8() ) + return m_impl.c_str(); + + const wchar_t * const strWC = AsWChar(wxMBConvStrictUTF8()); + const size_t lenWC = m_convertedToWChar.m_len; +#else // wxUSE_UNICODE_WCHAR + const wchar_t * const strWC = m_impl.c_str(); + const size_t lenWC = m_impl.length(); +#endif // wxUSE_UNICODE_UTF8/wxUSE_UNICODE_WCHAR + + const size_t lenMB = conv.FromWChar(NULL, 0, strWC, lenWC); + if ( lenMB == wxCONV_FAILED ) + return NULL; + + if ( !m_convertedToChar.m_str || lenMB != m_convertedToChar.m_len ) + { + if ( !const_cast(this)->m_convertedToChar.Extend(lenMB) ) + return NULL; + } + + m_convertedToChar.m_str[lenMB] = '\0'; + if ( conv.FromWChar(m_convertedToChar.m_str, lenMB, + strWC, lenWC) == wxCONV_FAILED ) + return NULL; + + return m_convertedToChar.m_str; +} + +#endif // wxUSE_UNICODE + +// shrink to minimal size (releasing extra memory) +bool wxString::Shrink() +{ + wxString tmp(begin(), end()); + swap(tmp); + return tmp.length() == length(); +} + +// deprecated compatibility code: +#if WXWIN_COMPATIBILITY_2_8 && !wxUSE_STL_BASED_WXSTRING && !wxUSE_UNICODE_UTF8 +wxStringCharType *wxString::GetWriteBuf(size_t nLen) +{ + return DoGetWriteBuf(nLen); +} + +void wxString::UngetWriteBuf() +{ + DoUngetWriteBuf(); +} + +void wxString::UngetWriteBuf(size_t nLen) +{ + DoUngetWriteBuf(nLen); +} +#endif // WXWIN_COMPATIBILITY_2_8 && !wxUSE_STL_BASED_WXSTRING && !wxUSE_UNICODE_UTF8 + + +// --------------------------------------------------------------------------- +// data access +// --------------------------------------------------------------------------- + +// all functions are inline in string.h + +// --------------------------------------------------------------------------- +// concatenation operators +// --------------------------------------------------------------------------- + +/* + * concatenation functions come in 5 flavours: + * string + string + * char + string and string + char + * C str + string and string + C str + */ + +wxString operator+(const wxString& str1, const wxString& str2) +{ +#if !wxUSE_STL_BASED_WXSTRING + wxASSERT( str1.IsValid() ); + wxASSERT( str2.IsValid() ); +#endif + + wxString s = str1; + s += str2; + + return s; +} + +wxString operator+(const wxString& str, wxUniChar ch) +{ +#if !wxUSE_STL_BASED_WXSTRING + wxASSERT( str.IsValid() ); +#endif + + wxString s = str; + s += ch; + + return s; +} + +wxString operator+(wxUniChar ch, const wxString& str) +{ +#if !wxUSE_STL_BASED_WXSTRING + wxASSERT( str.IsValid() ); +#endif + + wxString s = ch; + s += str; + + return s; +} + +wxString operator+(const wxString& str, const char *psz) +{ +#if !wxUSE_STL_BASED_WXSTRING + wxASSERT( str.IsValid() ); +#endif + + wxString s; + if ( !s.Alloc(strlen(psz) + str.length()) ) { + wxFAIL_MSG( wxT("out of memory in wxString::operator+") ); + } + s += str; + s += psz; + + return s; +} + +wxString operator+(const wxString& str, const wchar_t *pwz) +{ +#if !wxUSE_STL_BASED_WXSTRING + wxASSERT( str.IsValid() ); +#endif + + wxString s; + if ( !s.Alloc(wxWcslen(pwz) + str.length()) ) { + wxFAIL_MSG( wxT("out of memory in wxString::operator+") ); + } + s += str; + s += pwz; + + return s; +} + +wxString operator+(const char *psz, const wxString& str) +{ +#if !wxUSE_STL_BASED_WXSTRING + wxASSERT( str.IsValid() ); +#endif + + wxString s; + if ( !s.Alloc(strlen(psz) + str.length()) ) { + wxFAIL_MSG( wxT("out of memory in wxString::operator+") ); + } + s = psz; + s += str; + + return s; +} + +wxString operator+(const wchar_t *pwz, const wxString& str) +{ +#if !wxUSE_STL_BASED_WXSTRING + wxASSERT( str.IsValid() ); +#endif + + wxString s; + if ( !s.Alloc(wxWcslen(pwz) + str.length()) ) { + wxFAIL_MSG( wxT("out of memory in wxString::operator+") ); + } + s = pwz; + s += str; + + return s; +} + +// --------------------------------------------------------------------------- +// string comparison +// --------------------------------------------------------------------------- + +bool wxString::IsSameAs(wxUniChar c, bool compareWithCase) const +{ + return (length() == 1) && (compareWithCase ? GetChar(0u) == c + : wxToupper(GetChar(0u)) == wxToupper(c)); +} + +#ifdef HAVE_STD_STRING_COMPARE + +// NB: Comparison code (both if HAVE_STD_STRING_COMPARE and if not) works with +// UTF-8 encoded strings too, thanks to UTF-8's design which allows us to +// sort strings in characters code point order by sorting the byte sequence +// in byte values order (i.e. what strcmp() and memcmp() do). + +int wxString::compare(const wxString& str) const +{ + return m_impl.compare(str.m_impl); +} + +int wxString::compare(size_t nStart, size_t nLen, + const wxString& str) const +{ + size_t pos, len; + PosLenToImpl(nStart, nLen, &pos, &len); + return m_impl.compare(pos, len, str.m_impl); +} + +int wxString::compare(size_t nStart, size_t nLen, + const wxString& str, + size_t nStart2, size_t nLen2) const +{ + size_t pos, len; + PosLenToImpl(nStart, nLen, &pos, &len); + + size_t pos2, len2; + str.PosLenToImpl(nStart2, nLen2, &pos2, &len2); + + return m_impl.compare(pos, len, str.m_impl, pos2, len2); +} + +int wxString::compare(const char* sz) const +{ + return m_impl.compare(ImplStr(sz)); +} + +int wxString::compare(const wchar_t* sz) const +{ + return m_impl.compare(ImplStr(sz)); +} + +int wxString::compare(size_t nStart, size_t nLen, + const char* sz, size_t nCount) const +{ + size_t pos, len; + PosLenToImpl(nStart, nLen, &pos, &len); + + SubstrBufFromMB str(ImplStr(sz, nCount)); + + return m_impl.compare(pos, len, str.data, str.len); +} + +int wxString::compare(size_t nStart, size_t nLen, + const wchar_t* sz, size_t nCount) const +{ + size_t pos, len; + PosLenToImpl(nStart, nLen, &pos, &len); + + SubstrBufFromWC str(ImplStr(sz, nCount)); + + return m_impl.compare(pos, len, str.data, str.len); +} + +#else // !HAVE_STD_STRING_COMPARE + +static inline int wxDoCmp(const wxStringCharType* s1, size_t l1, + const wxStringCharType* s2, size_t l2) +{ + if( l1 == l2 ) + return wxStringMemcmp(s1, s2, l1); + else if( l1 < l2 ) + { + int ret = wxStringMemcmp(s1, s2, l1); + return ret == 0 ? -1 : ret; + } + else + { + int ret = wxStringMemcmp(s1, s2, l2); + return ret == 0 ? +1 : ret; + } +} + +int wxString::compare(const wxString& str) const +{ + return ::wxDoCmp(m_impl.data(), m_impl.length(), + str.m_impl.data(), str.m_impl.length()); +} + +int wxString::compare(size_t nStart, size_t nLen, + const wxString& str) const +{ + wxASSERT(nStart <= length()); + size_type strLen = length() - nStart; + nLen = strLen < nLen ? strLen : nLen; + + size_t pos, len; + PosLenToImpl(nStart, nLen, &pos, &len); + + return ::wxDoCmp(m_impl.data() + pos, len, + str.m_impl.data(), str.m_impl.length()); +} + +int wxString::compare(size_t nStart, size_t nLen, + const wxString& str, + size_t nStart2, size_t nLen2) const +{ + wxASSERT(nStart <= length()); + wxASSERT(nStart2 <= str.length()); + size_type strLen = length() - nStart, + strLen2 = str.length() - nStart2; + nLen = strLen < nLen ? strLen : nLen; + nLen2 = strLen2 < nLen2 ? strLen2 : nLen2; + + size_t pos, len; + PosLenToImpl(nStart, nLen, &pos, &len); + size_t pos2, len2; + str.PosLenToImpl(nStart2, nLen2, &pos2, &len2); + + return ::wxDoCmp(m_impl.data() + pos, len, + str.m_impl.data() + pos2, len2); +} + +int wxString::compare(const char* sz) const +{ + SubstrBufFromMB str(ImplStr(sz, npos)); + if ( str.len == npos ) + str.len = wxStringStrlen(str.data); + return ::wxDoCmp(m_impl.data(), m_impl.length(), str.data, str.len); +} + +int wxString::compare(const wchar_t* sz) const +{ + SubstrBufFromWC str(ImplStr(sz, npos)); + if ( str.len == npos ) + str.len = wxStringStrlen(str.data); + return ::wxDoCmp(m_impl.data(), m_impl.length(), str.data, str.len); +} + +int wxString::compare(size_t nStart, size_t nLen, + const char* sz, size_t nCount) const +{ + wxASSERT(nStart <= length()); + size_type strLen = length() - nStart; + nLen = strLen < nLen ? strLen : nLen; + + size_t pos, len; + PosLenToImpl(nStart, nLen, &pos, &len); + + SubstrBufFromMB str(ImplStr(sz, nCount)); + if ( str.len == npos ) + str.len = wxStringStrlen(str.data); + + return ::wxDoCmp(m_impl.data() + pos, len, str.data, str.len); +} + +int wxString::compare(size_t nStart, size_t nLen, + const wchar_t* sz, size_t nCount) const +{ + wxASSERT(nStart <= length()); + size_type strLen = length() - nStart; + nLen = strLen < nLen ? strLen : nLen; + + size_t pos, len; + PosLenToImpl(nStart, nLen, &pos, &len); + + SubstrBufFromWC str(ImplStr(sz, nCount)); + if ( str.len == npos ) + str.len = wxStringStrlen(str.data); + + return ::wxDoCmp(m_impl.data() + pos, len, str.data, str.len); +} + +#endif // HAVE_STD_STRING_COMPARE/!HAVE_STD_STRING_COMPARE + + +// --------------------------------------------------------------------------- +// find_{first,last}_[not]_of functions +// --------------------------------------------------------------------------- + +#if !wxUSE_STL_BASED_WXSTRING || wxUSE_UNICODE_UTF8 + +// NB: All these functions are implemented with the argument being wxChar*, +// i.e. widechar string in any Unicode build, even though native string +// representation is char* in the UTF-8 build. This is because we couldn't +// use memchr() to determine if a character is in a set encoded as UTF-8. + +size_t wxString::find_first_of(const wxChar* sz, size_t nStart) const +{ + return find_first_of(sz, nStart, wxStrlen(sz)); +} + +size_t wxString::find_first_not_of(const wxChar* sz, size_t nStart) const +{ + return find_first_not_of(sz, nStart, wxStrlen(sz)); +} + +size_t wxString::find_first_of(const wxChar* sz, size_t nStart, size_t n) const +{ + wxASSERT_MSG( nStart <= length(), wxT("invalid index") ); + + size_t idx = nStart; + for ( const_iterator i = begin() + nStart; i != end(); ++idx, ++i ) + { + if ( wxTmemchr(sz, *i, n) ) + return idx; + } + + return npos; +} + +size_t wxString::find_first_not_of(const wxChar* sz, size_t nStart, size_t n) const +{ + wxASSERT_MSG( nStart <= length(), wxT("invalid index") ); + + size_t idx = nStart; + for ( const_iterator i = begin() + nStart; i != end(); ++idx, ++i ) + { + if ( !wxTmemchr(sz, *i, n) ) + return idx; + } + + return npos; +} + + +size_t wxString::find_last_of(const wxChar* sz, size_t nStart) const +{ + return find_last_of(sz, nStart, wxStrlen(sz)); +} + +size_t wxString::find_last_not_of(const wxChar* sz, size_t nStart) const +{ + return find_last_not_of(sz, nStart, wxStrlen(sz)); +} + +size_t wxString::find_last_of(const wxChar* sz, size_t nStart, size_t n) const +{ + size_t len = length(); + + if ( nStart == npos ) + { + nStart = len - 1; + } + else + { + wxASSERT_MSG( nStart <= len, wxT("invalid index") ); + } + + size_t idx = nStart; + for ( const_reverse_iterator i = rbegin() + (len - nStart - 1); + i != rend(); --idx, ++i ) + { + if ( wxTmemchr(sz, *i, n) ) + return idx; + } + + return npos; +} + +size_t wxString::find_last_not_of(const wxChar* sz, size_t nStart, size_t n) const +{ + size_t len = length(); + + if ( nStart == npos ) + { + nStart = len - 1; + } + else + { + wxASSERT_MSG( nStart <= len, wxT("invalid index") ); + } + + size_t idx = nStart; + for ( const_reverse_iterator i = rbegin() + (len - nStart - 1); + i != rend(); --idx, ++i ) + { + if ( !wxTmemchr(sz, *i, n) ) + return idx; + } + + return npos; +} + +size_t wxString::find_first_not_of(wxUniChar ch, size_t nStart) const +{ + wxASSERT_MSG( nStart <= length(), wxT("invalid index") ); + + size_t idx = nStart; + for ( const_iterator i = begin() + nStart; i != end(); ++idx, ++i ) + { + if ( *i != ch ) + return idx; + } + + return npos; +} + +size_t wxString::find_last_not_of(wxUniChar ch, size_t nStart) const +{ + size_t len = length(); + + if ( nStart == npos ) + { + nStart = len - 1; + } + else + { + wxASSERT_MSG( nStart <= len, wxT("invalid index") ); + } + + size_t idx = nStart; + for ( const_reverse_iterator i = rbegin() + (len - nStart - 1); + i != rend(); --idx, ++i ) + { + if ( *i != ch ) + return idx; + } + + return npos; +} + +// the functions above were implemented for wchar_t* arguments in Unicode +// build and char* in ANSI build; below are implementations for the other +// version: +#if wxUSE_UNICODE + #define wxOtherCharType char + #define STRCONV (const wxChar*)wxConvLibc.cMB2WC +#else + #define wxOtherCharType wchar_t + #define STRCONV (const wxChar*)wxConvLibc.cWC2MB +#endif + +size_t wxString::find_first_of(const wxOtherCharType* sz, size_t nStart) const + { return find_first_of(STRCONV(sz), nStart); } + +size_t wxString::find_first_of(const wxOtherCharType* sz, size_t nStart, + size_t n) const + { return find_first_of(STRCONV(sz, n, NULL), nStart, n); } +size_t wxString::find_last_of(const wxOtherCharType* sz, size_t nStart) const + { return find_last_of(STRCONV(sz), nStart); } +size_t wxString::find_last_of(const wxOtherCharType* sz, size_t nStart, + size_t n) const + { return find_last_of(STRCONV(sz, n, NULL), nStart, n); } +size_t wxString::find_first_not_of(const wxOtherCharType* sz, size_t nStart) const + { return find_first_not_of(STRCONV(sz), nStart); } +size_t wxString::find_first_not_of(const wxOtherCharType* sz, size_t nStart, + size_t n) const + { return find_first_not_of(STRCONV(sz, n, NULL), nStart, n); } +size_t wxString::find_last_not_of(const wxOtherCharType* sz, size_t nStart) const + { return find_last_not_of(STRCONV(sz), nStart); } +size_t wxString::find_last_not_of(const wxOtherCharType* sz, size_t nStart, + size_t n) const + { return find_last_not_of(STRCONV(sz, n, NULL), nStart, n); } + +#undef wxOtherCharType +#undef STRCONV + +#endif // !wxUSE_STL_BASED_WXSTRING || wxUSE_UNICODE_UTF8 + +// =========================================================================== +// other common string functions +// =========================================================================== + +int wxString::CmpNoCase(const wxString& s) const +{ +#if !wxUSE_UNICODE_UTF8 + // We compare NUL-delimited chunks of the strings inside the loop. We will + // do as many iterations as there are embedded NULs in the string, i.e. + // usually we will run it just once. + + typedef const wxStringImpl::value_type *pchar_type; + const pchar_type thisBegin = m_impl.c_str(); + const pchar_type thatBegin = s.m_impl.c_str(); + + const pchar_type thisEnd = thisBegin + m_impl.length(); + const pchar_type thatEnd = thatBegin + s.m_impl.length(); + + pchar_type thisCur = thisBegin; + pchar_type thatCur = thatBegin; + + int rc; + for ( ;; ) + { + // Compare until the next NUL, if the strings differ this is the final + // result. + rc = wxStricmp(thisCur, thatCur); + if ( rc ) + break; + + const size_t lenChunk = wxStrlen(thisCur); + thisCur += lenChunk; + thatCur += lenChunk; + + // Skip all the NULs as wxStricmp() doesn't handle them. + for ( ; !*thisCur; thisCur++, thatCur++ ) + { + // Check if we exhausted either of the strings. + if ( thisCur == thisEnd ) + { + // This one is exhausted, is the other one too? + return thatCur == thatEnd ? 0 : -1; + } + + if ( thatCur == thatEnd ) + { + // Because of the test above we know that this one is not + // exhausted yet so it's greater than the other one that is. + return 1; + } + + if ( *thatCur ) + { + // Anything non-NUL is greater than NUL. + return -1; + } + } + } + + return rc; +#else // wxUSE_UNICODE_UTF8 + // CRT functions can't be used for case-insensitive comparison of UTF-8 + // strings so do it in the naive, simple and inefficient way. + + // FIXME-UTF8: use wxUniChar::ToLower/ToUpper once added + const_iterator i1 = begin(); + const_iterator end1 = end(); + const_iterator i2 = s.begin(); + const_iterator end2 = s.end(); + + for ( ; i1 != end1 && i2 != end2; ++i1, ++i2 ) + { + wxUniChar lower1 = (wxChar)wxTolower(*i1); + wxUniChar lower2 = (wxChar)wxTolower(*i2); + if ( lower1 != lower2 ) + return lower1 < lower2 ? -1 : 1; + } + + size_t len1 = length(); + size_t len2 = s.length(); + + if ( len1 < len2 ) + return -1; + else if ( len1 > len2 ) + return 1; + return 0; +#endif // !wxUSE_UNICODE_UTF8/wxUSE_UNICODE_UTF8 +} + + +#if wxUSE_UNICODE + +wxString wxString::FromAscii(const char *ascii, size_t len) +{ + if (!ascii || len == 0) + return wxEmptyString; + + wxString res; + + { + wxStringInternalBuffer buf(res, len); + wxStringCharType *dest = buf; + + for ( ; len > 0; --len ) + { + unsigned char c = (unsigned char)*ascii++; + wxASSERT_MSG( c < 0x80, + wxT("Non-ASCII value passed to FromAscii().") ); + + *dest++ = (wchar_t)c; + } + } + + return res; +} + +wxString wxString::FromAscii(const char *ascii) +{ + return FromAscii(ascii, wxStrlen(ascii)); +} + +wxString wxString::FromAscii(char ascii) +{ + // What do we do with '\0' ? + + unsigned char c = (unsigned char)ascii; + + wxASSERT_MSG( c < 0x80, wxT("Non-ASCII value passed to FromAscii().") ); + + // NB: the cast to wchar_t causes interpretation of 'ascii' as Latin1 value + return wxString(wxUniChar((wchar_t)c)); +} + +const wxScopedCharBuffer wxString::ToAscii() const +{ + // this will allocate enough space for the terminating NUL too + wxCharBuffer buffer(length()); + char *dest = buffer.data(); + + for ( const_iterator i = begin(); i != end(); ++i ) + { + wxUniChar c(*i); + // FIXME-UTF8: unify substituted char ('_') with wxUniChar ('?') + *dest++ = c.IsAscii() ? (char)c : '_'; + + // the output string can't have embedded NULs anyhow, so we can safely + // stop at first of them even if we do have any + if ( !c ) + break; + } + + return buffer; +} + +#endif // wxUSE_UNICODE + +// extract string of length nCount starting at nFirst +wxString wxString::Mid(size_t nFirst, size_t nCount) const +{ + size_t nLen = length(); + + // default value of nCount is npos and means "till the end" + if ( nCount == npos ) + { + nCount = nLen - nFirst; + } + + // out-of-bounds requests return sensible things + if ( nFirst + nCount > nLen ) + { + nCount = nLen - nFirst; + } + + if ( nFirst > nLen ) + { + // AllocCopy() will return empty string + return wxEmptyString; + } + + wxString dest(*this, nFirst, nCount); + if ( dest.length() != nCount ) + { + wxFAIL_MSG( wxT("out of memory in wxString::Mid") ); + } + + return dest; +} + +// check that the string starts with prefix and return the rest of the string +// in the provided pointer if it is not NULL, otherwise return false +bool wxString::StartsWith(const wxString& prefix, wxString *rest) const +{ + if ( compare(0, prefix.length(), prefix) != 0 ) + return false; + + if ( rest ) + { + // put the rest of the string into provided pointer + rest->assign(*this, prefix.length(), npos); + } + + return true; +} + + +// check that the string ends with suffix and return the rest of it in the +// provided pointer if it is not NULL, otherwise return false +bool wxString::EndsWith(const wxString& suffix, wxString *rest) const +{ + int start = length() - suffix.length(); + + if ( start < 0 || compare(start, npos, suffix) != 0 ) + return false; + + if ( rest ) + { + // put the rest of the string into provided pointer + rest->assign(*this, 0, start); + } + + return true; +} + + +// extract nCount last (rightmost) characters +wxString wxString::Right(size_t nCount) const +{ + if ( nCount > length() ) + nCount = length(); + + wxString dest(*this, length() - nCount, nCount); + if ( dest.length() != nCount ) { + wxFAIL_MSG( wxT("out of memory in wxString::Right") ); + } + return dest; +} + +// get all characters after the last occurrence of ch +// (returns the whole string if ch not found) +wxString wxString::AfterLast(wxUniChar ch) const +{ + wxString str; + int iPos = Find(ch, true); + if ( iPos == wxNOT_FOUND ) + str = *this; + else + str.assign(*this, iPos + 1, npos); + + return str; +} + +// extract nCount first (leftmost) characters +wxString wxString::Left(size_t nCount) const +{ + if ( nCount > length() ) + nCount = length(); + + wxString dest(*this, 0, nCount); + if ( dest.length() != nCount ) { + wxFAIL_MSG( wxT("out of memory in wxString::Left") ); + } + return dest; +} + +// get all characters before the first occurrence of ch +// (returns the whole string if ch not found) +wxString wxString::BeforeFirst(wxUniChar ch, wxString *rest) const +{ + int iPos = Find(ch); + if ( iPos == wxNOT_FOUND ) + { + iPos = length(); + if ( rest ) + rest->clear(); + } + else + { + if ( rest ) + rest->assign(*this, iPos + 1, npos); + } + + return wxString(*this, 0, iPos); +} + +/// get all characters before the last occurrence of ch +/// (returns empty string if ch not found) +wxString wxString::BeforeLast(wxUniChar ch, wxString *rest) const +{ + wxString str; + int iPos = Find(ch, true); + if ( iPos != wxNOT_FOUND ) + { + if ( iPos != 0 ) + str.assign(*this, 0, iPos); + + if ( rest ) + rest->assign(*this, iPos + 1, npos); + } + else + { + if ( rest ) + *rest = *this; + } + + return str; +} + +/// get all characters after the first occurrence of ch +/// (returns empty string if ch not found) +wxString wxString::AfterFirst(wxUniChar ch) const +{ + wxString str; + int iPos = Find(ch); + if ( iPos != wxNOT_FOUND ) + str.assign(*this, iPos + 1, npos); + + return str; +} + +// replace first (or all) occurrences of some substring with another one +size_t wxString::Replace(const wxString& strOld, + const wxString& strNew, bool bReplaceAll) +{ + // if we tried to replace an empty string we'd enter an infinite loop below + wxCHECK_MSG( !strOld.empty(), 0, + wxT("wxString::Replace(): invalid parameter") ); + + wxSTRING_INVALIDATE_CACHE(); + + size_t uiCount = 0; // count of replacements made + + // optimize the special common case: replacement of one character by + // another one (in UTF-8 case we can only do this for ASCII characters) + // + // benchmarks show that this special version is around 3 times faster + // (depending on the proportion of matching characters and UTF-8/wchar_t + // build) + if ( strOld.m_impl.length() == 1 && strNew.m_impl.length() == 1 ) + { + const wxStringCharType chOld = strOld.m_impl[0], + chNew = strNew.m_impl[0]; + + // this loop is the simplified version of the one below + for ( size_t pos = 0; ; ) + { + pos = m_impl.find(chOld, pos); + if ( pos == npos ) + break; + + m_impl[pos++] = chNew; + + uiCount++; + + if ( !bReplaceAll ) + break; + } + } + else if ( !bReplaceAll) + { + size_t pos = m_impl.find(strOld.m_impl, 0); + if ( pos != npos ) + { + m_impl.replace(pos, strOld.m_impl.length(), strNew.m_impl); + uiCount = 1; + } + } + else // replace all occurrences + { + const size_t uiOldLen = strOld.m_impl.length(); + const size_t uiNewLen = strNew.m_impl.length(); + + // first scan the string to find all positions at which the replacement + // should be made + wxVector replacePositions; + + size_t pos; + for ( pos = m_impl.find(strOld.m_impl, 0); + pos != npos; + pos = m_impl.find(strOld.m_impl, pos + uiOldLen)) + { + replacePositions.push_back(pos); + ++uiCount; + } + + if ( !uiCount ) + return 0; + + // allocate enough memory for the whole new string + wxString tmp; + tmp.m_impl.reserve(m_impl.length() + uiCount*(uiNewLen - uiOldLen)); + + // copy this string to tmp doing replacements on the fly + size_t replNum = 0; + for ( pos = 0; replNum < uiCount; replNum++ ) + { + const size_t nextReplPos = replacePositions[replNum]; + + if ( pos != nextReplPos ) + { + tmp.m_impl.append(m_impl, pos, nextReplPos - pos); + } + + tmp.m_impl.append(strNew.m_impl); + pos = nextReplPos + uiOldLen; + } + + if ( pos != m_impl.length() ) + { + // append the rest of the string unchanged + tmp.m_impl.append(m_impl, pos, m_impl.length() - pos); + } + + swap(tmp); + } + + return uiCount; +} + +bool wxString::IsAscii() const +{ + for ( const_iterator i = begin(); i != end(); ++i ) + { + if ( !(*i).IsAscii() ) + return false; + } + + return true; +} + +bool wxString::IsWord() const +{ + for ( const_iterator i = begin(); i != end(); ++i ) + { + if ( !wxIsalpha(*i) ) + return false; + } + + return true; +} + +bool wxString::IsNumber() const +{ + if ( empty() ) + return true; + + const_iterator i = begin(); + + if ( *i == wxT('-') || *i == wxT('+') ) + ++i; + + for ( ; i != end(); ++i ) + { + if ( !wxIsdigit(*i) ) + return false; + } + + return true; +} + +wxString wxString::Strip(stripType w) const +{ + wxString s = *this; + if ( w & leading ) s.Trim(false); + if ( w & trailing ) s.Trim(true); + return s; +} + +// --------------------------------------------------------------------------- +// case conversion +// --------------------------------------------------------------------------- + +wxString& wxString::MakeUpper() +{ + for ( iterator it = begin(), en = end(); it != en; ++it ) + *it = (wxChar)wxToupper(*it); + + return *this; +} + +wxString& wxString::MakeLower() +{ + for ( iterator it = begin(), en = end(); it != en; ++it ) + *it = (wxChar)wxTolower(*it); + + return *this; +} + +wxString& wxString::MakeCapitalized() +{ + const iterator en = end(); + iterator it = begin(); + if ( it != en ) + { + *it = (wxChar)wxToupper(*it); + for ( ++it; it != en; ++it ) + *it = (wxChar)wxTolower(*it); + } + + return *this; +} + +// --------------------------------------------------------------------------- +// trimming and padding +// --------------------------------------------------------------------------- + +// some compilers (VC++ 6.0 not to name them) return true for a call to +// isspace('\xEA') in the C locale which seems to be broken to me, but we have +// to live with this by checking that the character is a 7 bit one - even if +// this may fail to detect some spaces (I don't know if Unicode doesn't have +// space-like symbols somewhere except in the first 128 chars), it is arguably +// still better than trimming away accented letters +inline int wxSafeIsspace(wxChar ch) { return (ch < 127) && wxIsspace(ch); } + +// trims spaces (in the sense of isspace) from left or right side +wxString& wxString::Trim(bool bFromRight) +{ + // first check if we're going to modify the string at all + if ( !empty() && + ( + (bFromRight && wxSafeIsspace(GetChar(length() - 1))) || + (!bFromRight && wxSafeIsspace(GetChar(0u))) + ) + ) + { + if ( bFromRight ) + { + // find last non-space character + reverse_iterator psz = rbegin(); + while ( (psz != rend()) && wxSafeIsspace(*psz) ) + ++psz; + + // truncate at trailing space start + erase(psz.base(), end()); + } + else + { + // find first non-space character + iterator psz = begin(); + while ( (psz != end()) && wxSafeIsspace(*psz) ) + ++psz; + + // fix up data and length + erase(begin(), psz); + } + } + + return *this; +} + +// adds nCount characters chPad to the string from either side +wxString& wxString::Pad(size_t nCount, wxUniChar chPad, bool bFromRight) +{ + wxString s(chPad, nCount); + + if ( bFromRight ) + *this += s; + else + { + s += *this; + swap(s); + } + + return *this; +} + +// truncate the string +wxString& wxString::Truncate(size_t uiLen) +{ + if ( uiLen < length() ) + { + erase(begin() + uiLen, end()); + } + //else: nothing to do, string is already short enough + + return *this; +} + +// --------------------------------------------------------------------------- +// finding (return wxNOT_FOUND if not found and index otherwise) +// --------------------------------------------------------------------------- + +// find a character +int wxString::Find(wxUniChar ch, bool bFromEnd) const +{ + size_type idx = bFromEnd ? find_last_of(ch) : find_first_of(ch); + + return (idx == npos) ? wxNOT_FOUND : (int)idx; +} + +// ---------------------------------------------------------------------------- +// conversion to numbers +// ---------------------------------------------------------------------------- + +// The implementation of all the functions below is exactly the same so factor +// it out. Note that number extraction works correctly on UTF-8 strings, so +// we can use wxStringCharType and wx_str() for maximum efficiency. + +#ifndef __WXWINCE__ + #define DO_IF_NOT_WINCE(x) x +#else + #define DO_IF_NOT_WINCE(x) +#endif + +#define WX_STRING_TO_X_TYPE_START \ + wxCHECK_MSG( pVal, false, wxT("NULL output pointer") ); \ + DO_IF_NOT_WINCE( errno = 0; ) \ + const wxStringCharType *start = wx_str(); \ + wxStringCharType *end; + +// notice that we return false without modifying the output parameter at all if +// nothing could be parsed but we do modify it and return false then if we did +// parse something successfully but not the entire string +#define WX_STRING_TO_X_TYPE_END \ + if ( end == start DO_IF_NOT_WINCE(|| errno == ERANGE) ) \ + return false; \ + *pVal = val; \ + return !*end; + +bool wxString::ToLong(long *pVal, int base) const +{ + wxASSERT_MSG( !base || (base > 1 && base <= 36), wxT("invalid base") ); + + WX_STRING_TO_X_TYPE_START + long val = wxStrtol(start, &end, base); + WX_STRING_TO_X_TYPE_END +} + +bool wxString::ToULong(unsigned long *pVal, int base) const +{ + wxASSERT_MSG( !base || (base > 1 && base <= 36), wxT("invalid base") ); + + WX_STRING_TO_X_TYPE_START + unsigned long val = wxStrtoul(start, &end, base); + WX_STRING_TO_X_TYPE_END +} + +bool wxString::ToLongLong(wxLongLong_t *pVal, int base) const +{ + wxASSERT_MSG( !base || (base > 1 && base <= 36), wxT("invalid base") ); + + WX_STRING_TO_X_TYPE_START + wxLongLong_t val = wxStrtoll(start, &end, base); + WX_STRING_TO_X_TYPE_END +} + +bool wxString::ToULongLong(wxULongLong_t *pVal, int base) const +{ + wxASSERT_MSG( !base || (base > 1 && base <= 36), wxT("invalid base") ); + + WX_STRING_TO_X_TYPE_START + wxULongLong_t val = wxStrtoull(start, &end, base); + WX_STRING_TO_X_TYPE_END +} + +bool wxString::ToDouble(double *pVal) const +{ + WX_STRING_TO_X_TYPE_START + double val = wxStrtod(start, &end); + WX_STRING_TO_X_TYPE_END +} + +#if wxUSE_XLOCALE + +bool wxString::ToCLong(long *pVal, int base) const +{ + wxASSERT_MSG( !base || (base > 1 && base <= 36), wxT("invalid base") ); + + WX_STRING_TO_X_TYPE_START +#if (wxUSE_UNICODE_UTF8 || !wxUSE_UNICODE) && defined(wxHAS_XLOCALE_SUPPORT) + long val = wxStrtol_lA(start, &end, base, wxCLocale); +#else + long val = wxStrtol_l(start, &end, base, wxCLocale); +#endif + WX_STRING_TO_X_TYPE_END +} + +bool wxString::ToCULong(unsigned long *pVal, int base) const +{ + wxASSERT_MSG( !base || (base > 1 && base <= 36), wxT("invalid base") ); + + WX_STRING_TO_X_TYPE_START +#if (wxUSE_UNICODE_UTF8 || !wxUSE_UNICODE) && defined(wxHAS_XLOCALE_SUPPORT) + unsigned long val = wxStrtoul_lA(start, &end, base, wxCLocale); +#else + unsigned long val = wxStrtoul_l(start, &end, base, wxCLocale); +#endif + WX_STRING_TO_X_TYPE_END +} + +bool wxString::ToCDouble(double *pVal) const +{ + WX_STRING_TO_X_TYPE_START +#if (wxUSE_UNICODE_UTF8 || !wxUSE_UNICODE) && defined(wxHAS_XLOCALE_SUPPORT) + double val = wxStrtod_lA(start, &end, wxCLocale); +#else + double val = wxStrtod_l(start, &end, wxCLocale); +#endif + WX_STRING_TO_X_TYPE_END +} + +#else // wxUSE_XLOCALE + +// Provide implementation of these functions even when wxUSE_XLOCALE is +// disabled, we still need them in wxWidgets internal code. + +// For integers we just assume the current locale uses the same number +// representation as the C one as there is nothing else we can do. +bool wxString::ToCLong(long *pVal, int base) const +{ + return ToLong(pVal, base); +} + +bool wxString::ToCULong(unsigned long *pVal, int base) const +{ + return ToULong(pVal, base); +} + +// For floating point numbers we have to handle the problem of the decimal +// point which is different in different locales. +bool wxString::ToCDouble(double *pVal) const +{ + // Create a copy of this string using the decimal point instead of whatever + // separator the current locale uses. +#if wxUSE_INTL + wxString sep = wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, + wxLOCALE_CAT_NUMBER); + if ( sep == "." ) + { + // We can avoid an unnecessary string copy in this case. + return ToDouble(pVal); + } +#else // !wxUSE_INTL + // We don't know what the current separator is so it might even be a point + // already, try to parse the string as a double: + if ( ToDouble(pVal) ) + { + // It must have been the point, nothing else to do. + return true; + } + + // Try to guess the separator, using the most common alternative value. + wxString sep(","); +#endif // wxUSE_INTL/!wxUSE_INTL + wxString cstr(*this); + cstr.Replace(".", sep); + + return cstr.ToDouble(pVal); +} + +#endif // wxUSE_XLOCALE/!wxUSE_XLOCALE + +// ---------------------------------------------------------------------------- +// number to string conversion +// ---------------------------------------------------------------------------- + +/* static */ +wxString wxString::FromDouble(double val, int precision) +{ + wxCHECK_MSG( precision >= -1, wxString(), "Invalid negative precision" ); + + wxString format; + if ( precision == -1 ) + { + format = "%g"; + } + else // Use fixed precision. + { + format.Printf("%%.%df", precision); + } + + return wxString::Format(format, val); +} + +/* static */ +wxString wxString::FromCDouble(double val, int precision) +{ + wxCHECK_MSG( precision >= -1, wxString(), "Invalid negative precision" ); + +#if wxUSE_STD_IOSTREAM && wxUSE_STD_STRING + // We assume that we can use the ostream and not wstream for numbers. + wxSTD ostringstream os; + if ( precision != -1 ) + { + os.precision(precision); + os.setf(std::ios::fixed, std::ios::floatfield); + } + + os << val; + return os.str(); +#else // !wxUSE_STD_IOSTREAM + // Can't use iostream locale support, fall back to the manual method + // instead. + wxString s = FromDouble(val, precision); +#if wxUSE_INTL + wxString sep = wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, + wxLOCALE_CAT_NUMBER); +#else // !wxUSE_INTL + // As above, this is the most common alternative value. Notice that here it + // doesn't matter if we guess wrongly and the current separator is already + // ".": we'll just waste a call to Replace() in this case. + wxString sep(","); +#endif // wxUSE_INTL/!wxUSE_INTL + + s.Replace(sep, "."); + return s; +#endif // wxUSE_STD_IOSTREAM/!wxUSE_STD_IOSTREAM +} + +// --------------------------------------------------------------------------- +// formatted output +// --------------------------------------------------------------------------- + +#if !wxUSE_UTF8_LOCALE_ONLY +/* static */ +#ifdef wxNEEDS_WXSTRING_PRINTF_MIXIN +wxString wxStringPrintfMixinBase::DoFormatWchar(const wxChar *format, ...) +#else +wxString wxString::DoFormatWchar(const wxChar *format, ...) +#endif +{ + va_list argptr; + va_start(argptr, format); + + wxString s; + s.PrintfV(format, argptr); + + va_end(argptr); + + return s; +} +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#if wxUSE_UNICODE_UTF8 +/* static */ +wxString wxString::DoFormatUtf8(const char *format, ...) +{ + va_list argptr; + va_start(argptr, format); + + wxString s; + s.PrintfV(format, argptr); + + va_end(argptr); + + return s; +} +#endif // wxUSE_UNICODE_UTF8 + +/* static */ +wxString wxString::FormatV(const wxString& format, va_list argptr) +{ + wxString s; + s.PrintfV(format, argptr); + return s; +} + +#if !wxUSE_UTF8_LOCALE_ONLY +#ifdef wxNEEDS_WXSTRING_PRINTF_MIXIN +int wxStringPrintfMixinBase::DoPrintfWchar(const wxChar *format, ...) +#else +int wxString::DoPrintfWchar(const wxChar *format, ...) +#endif +{ + va_list argptr; + va_start(argptr, format); + +#ifdef wxNEEDS_WXSTRING_PRINTF_MIXIN + // get a pointer to the wxString instance; we have to use dynamic_cast<> + // because it's the only cast that works safely for downcasting when + // multiple inheritance is used: + wxString *str = static_cast(this); +#else + wxString *str = this; +#endif + + int iLen = str->PrintfV(format, argptr); + + va_end(argptr); + + return iLen; +} +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#if wxUSE_UNICODE_UTF8 +int wxString::DoPrintfUtf8(const char *format, ...) +{ + va_list argptr; + va_start(argptr, format); + + int iLen = PrintfV(format, argptr); + + va_end(argptr); + + return iLen; +} +#endif // wxUSE_UNICODE_UTF8 + +/* + Uses wxVsnprintf and places the result into the this string. + + In ANSI build, wxVsnprintf is effectively vsnprintf but in Unicode build + it is vswprintf. Due to a discrepancy between vsnprintf and vswprintf in + the ISO C99 (and thus SUSv3) standard the return value for the case of + an undersized buffer is inconsistent. For conforming vsnprintf + implementations the function must return the number of characters that + would have been printed had the buffer been large enough. For conforming + vswprintf implementations the function must return a negative number + and set errno. + + What vswprintf sets errno to is undefined but Darwin seems to set it to + EOVERFLOW. The only expected errno are EILSEQ and EINVAL. Both of + those are defined in the standard and backed up by several conformance + statements. Note that ENOMEM mentioned in the manual page does not + apply to swprintf, only wprintf and fwprintf. + + Official manual page: + http://www.opengroup.org/onlinepubs/009695399/functions/swprintf.html + + Some conformance statements (AIX, Solaris): + http://www.opengroup.org/csq/view.mhtml?RID=ibm%2FSD1%2F3 + http://www.theopengroup.org/csq/view.mhtml?norationale=1&noreferences=1&RID=Fujitsu%2FSE2%2F10 + + Since EILSEQ and EINVAL are rather common but EOVERFLOW is not and since + EILSEQ and EINVAL are specifically defined to mean the error is other than + an undersized buffer and no other errno are defined we treat those two + as meaning hard errors and everything else gets the old behaviour which + is to keep looping and increasing buffer size until the function succeeds. + + In practice it's impossible to determine before compilation which behaviour + may be used. The vswprintf function may have vsnprintf-like behaviour or + vice-versa. Behaviour detected on one release can theoretically change + with an updated release. Not to mention that configure testing for it + would require the test to be run on the host system, not the build system + which makes cross compilation difficult. Therefore, we make no assumptions + about behaviour and try our best to handle every known case, including the + case where wxVsnprintf returns a negative number and fails to set errno. + + There is yet one more non-standard implementation and that is our own. + Fortunately, that can be detected at compile-time. + + On top of all that, ISO C99 explicitly defines snprintf to write a null + character to the last position of the specified buffer. That would be at + at the given buffer size minus 1. It is supposed to do this even if it + turns out that the buffer is sized too small. + + Darwin (tested on 10.5) follows the C99 behaviour exactly. + + Glibc 2.6 almost follows the C99 behaviour except vswprintf never sets + errno even when it fails. However, it only seems to ever fail due + to an undersized buffer. +*/ +#if wxUSE_UNICODE_UTF8 +template +#else +// we only need one version in non-UTF8 builds and at least two Windows +// compilers have problems with this function template, so use just one +// normal function here +#endif +static int DoStringPrintfV(wxString& str, + const wxString& format, va_list argptr) +{ + int size = 1024; + + for ( ;; ) + { +#if wxUSE_UNICODE_UTF8 + BufferType tmp(str, size + 1); + typename BufferType::CharType *buf = tmp; +#else + wxStringBuffer tmp(str, size + 1); + wxChar *buf = tmp; +#endif + + if ( !buf ) + { + // out of memory + return -1; + } + + // wxVsnprintf() may modify the original arg pointer, so pass it + // only a copy + va_list argptrcopy; + wxVaCopy(argptrcopy, argptr); + +#ifndef __WXWINCE__ + // Set errno to 0 to make it determinate if wxVsnprintf fails to set it. + errno = 0; +#endif + int len = wxVsnprintf(buf, size, format, argptrcopy); + va_end(argptrcopy); + + // some implementations of vsnprintf() don't NUL terminate + // the string if there is not enough space for it so + // always do it manually + // FIXME: This really seems to be the wrong and would be an off-by-one + // bug except the code above allocates an extra character. + buf[size] = wxT('\0'); + + // vsnprintf() may return either -1 (traditional Unix behaviour) or the + // total number of characters which would have been written if the + // buffer were large enough (newer standards such as Unix98) + if ( len < 0 ) + { + // NB: wxVsnprintf() may call either wxCRT_VsnprintfW or + // wxCRT_VsnprintfA in UTF-8 build; wxUSE_WXVSNPRINTF + // is true if *both* of them use our own implementation, + // otherwise we can't be sure +#if wxUSE_WXVSNPRINTF + // we know that our own implementation of wxVsnprintf() returns -1 + // only for a format error - thus there's something wrong with + // the user's format string + buf[0] = '\0'; + return -1; +#else // possibly using system version + // assume it only returns error if there is not enough space, but + // as we don't know how much we need, double the current size of + // the buffer +#ifndef __WXWINCE__ + if( (errno == EILSEQ) || (errno == EINVAL) ) + // If errno was set to one of the two well-known hard errors + // then fail immediately to avoid an infinite loop. + return -1; + else +#endif // __WXWINCE__ + // still not enough, as we don't know how much we need, double the + // current size of the buffer + size *= 2; +#endif // wxUSE_WXVSNPRINTF/!wxUSE_WXVSNPRINTF + } + else if ( len >= size ) + { +#if wxUSE_WXVSNPRINTF + // we know that our own implementation of wxVsnprintf() returns + // size+1 when there's not enough space but that's not the size + // of the required buffer! + size *= 2; // so we just double the current size of the buffer +#else + // some vsnprintf() implementations NUL-terminate the buffer and + // some don't in len == size case, to be safe always add 1 + // FIXME: I don't quite understand this comment. The vsnprintf + // function is specifically defined to return the number of + // characters printed not including the null terminator. + // So OF COURSE you need to add 1 to get the right buffer size. + // The following line is definitely correct, no question. + size = len + 1; +#endif + } + else // ok, there was enough space + { + break; + } + } + + // we could have overshot + str.Shrink(); + + return str.length(); +} + +int wxString::PrintfV(const wxString& format, va_list argptr) +{ +#if wxUSE_UNICODE_UTF8 + #if wxUSE_STL_BASED_WXSTRING + typedef wxStringTypeBuffer Utf8Buffer; + #else + typedef wxStringInternalBuffer Utf8Buffer; + #endif +#endif + +#if wxUSE_UTF8_LOCALE_ONLY + return DoStringPrintfV(*this, format, argptr); +#else + #if wxUSE_UNICODE_UTF8 + if ( wxLocaleIsUtf8 ) + return DoStringPrintfV(*this, format, argptr); + else + // wxChar* version + return DoStringPrintfV(*this, format, argptr); + #else + return DoStringPrintfV(*this, format, argptr); + #endif // UTF8/WCHAR +#endif +} + +// ---------------------------------------------------------------------------- +// misc other operations +// ---------------------------------------------------------------------------- + +// returns true if the string matches the pattern which may contain '*' and +// '?' metacharacters (as usual, '?' matches any character and '*' any number +// of them) +bool wxString::Matches(const wxString& mask) const +{ + // I disable this code as it doesn't seem to be faster (in fact, it seems + // to be much slower) than the old, hand-written code below and using it + // here requires always linking with libregex even if the user code doesn't + // use it +#if 0 // wxUSE_REGEX + // first translate the shell-like mask into a regex + wxString pattern; + pattern.reserve(wxStrlen(pszMask)); + + pattern += wxT('^'); + while ( *pszMask ) + { + switch ( *pszMask ) + { + case wxT('?'): + pattern += wxT('.'); + break; + + case wxT('*'): + pattern += wxT(".*"); + break; + + case wxT('^'): + case wxT('.'): + case wxT('$'): + case wxT('('): + case wxT(')'): + case wxT('|'): + case wxT('+'): + case wxT('\\'): + // these characters are special in a RE, quote them + // (however note that we don't quote '[' and ']' to allow + // using them for Unix shell like matching) + pattern += wxT('\\'); + // fall through + + default: + pattern += *pszMask; + } + + pszMask++; + } + pattern += wxT('$'); + + // and now use it + return wxRegEx(pattern, wxRE_NOSUB | wxRE_EXTENDED).Matches(c_str()); +#else // !wxUSE_REGEX + // TODO: this is, of course, awfully inefficient... + + // FIXME-UTF8: implement using iterators, remove #if +#if wxUSE_UNICODE_UTF8 + const wxScopedWCharBuffer maskBuf = mask.wc_str(); + const wxScopedWCharBuffer txtBuf = wc_str(); + const wxChar *pszMask = maskBuf.data(); + const wxChar *pszTxt = txtBuf.data(); +#else + const wxChar *pszMask = mask.wx_str(); + // the char currently being checked + const wxChar *pszTxt = wx_str(); +#endif + + // the last location where '*' matched + const wxChar *pszLastStarInText = NULL; + const wxChar *pszLastStarInMask = NULL; + +match: + for ( ; *pszMask != wxT('\0'); pszMask++, pszTxt++ ) { + switch ( *pszMask ) { + case wxT('?'): + if ( *pszTxt == wxT('\0') ) + return false; + + // pszTxt and pszMask will be incremented in the loop statement + + break; + + case wxT('*'): + { + // remember where we started to be able to backtrack later + pszLastStarInText = pszTxt; + pszLastStarInMask = pszMask; + + // ignore special chars immediately following this one + // (should this be an error?) + while ( *pszMask == wxT('*') || *pszMask == wxT('?') ) + pszMask++; + + // if there is nothing more, match + if ( *pszMask == wxT('\0') ) + return true; + + // are there any other metacharacters in the mask? + size_t uiLenMask; + const wxChar *pEndMask = wxStrpbrk(pszMask, wxT("*?")); + + if ( pEndMask != NULL ) { + // we have to match the string between two metachars + uiLenMask = pEndMask - pszMask; + } + else { + // we have to match the remainder of the string + uiLenMask = wxStrlen(pszMask); + } + + wxString strToMatch(pszMask, uiLenMask); + const wxChar* pMatch = wxStrstr(pszTxt, strToMatch); + if ( pMatch == NULL ) + return false; + + // -1 to compensate "++" in the loop + pszTxt = pMatch + uiLenMask - 1; + pszMask += uiLenMask - 1; + } + break; + + default: + if ( *pszMask != *pszTxt ) + return false; + break; + } + } + + // match only if nothing left + if ( *pszTxt == wxT('\0') ) + return true; + + // if we failed to match, backtrack if we can + if ( pszLastStarInText ) { + pszTxt = pszLastStarInText + 1; + pszMask = pszLastStarInMask; + + pszLastStarInText = NULL; + + // don't bother resetting pszLastStarInMask, it's unnecessary + + goto match; + } + + return false; +#endif // wxUSE_REGEX/!wxUSE_REGEX +} + +// Count the number of chars +int wxString::Freq(wxUniChar ch) const +{ + int count = 0; + for ( const_iterator i = begin(); i != end(); ++i ) + { + if ( *i == ch ) + count ++; + } + return count; +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/stringimpl.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/stringimpl.cpp new file mode 100644 index 0000000000..3dad9eb3c0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/stringimpl.cpp @@ -0,0 +1,798 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/stringimpl.cpp +// Purpose: wxString class +// Author: Vadim Zeitlin, Ryan Norton +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Vadim Zeitlin +// (c) 2004 Ryan Norton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + * About ref counting: + * 1) all empty strings use g_strEmpty, nRefs = -1 (set in Init()) + * 2) AllocBuffer() sets nRefs to 1, Lock() increments it by one + * 3) Unlock() decrements nRefs and frees memory if it goes to 0 + */ + +// =========================================================================== +// headers, declarations, constants +// =========================================================================== + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/stringimpl.h" + #include "wx/wxcrt.h" +#endif + +#include + +#ifndef __WXWINCE__ + #include +#endif + +#include +#include + +// allocating extra space for each string consumes more memory but speeds up +// the concatenation operations (nLen is the current string's length) +// NB: EXTRA_ALLOC must be >= 0! +#define EXTRA_ALLOC (19 - nLen % 16) + + +// string handling functions used by wxString: +#if wxUSE_UNICODE_UTF8 + #define wxStringMemcpy memcpy + #define wxStringMemcmp memcmp + #define wxStringMemchr memchr +#else + #define wxStringMemcpy wxTmemcpy + #define wxStringMemcmp wxTmemcmp + #define wxStringMemchr wxTmemchr +#endif + + +// --------------------------------------------------------------------------- +// static class variables definition +// --------------------------------------------------------------------------- + +#if !wxUSE_STL_BASED_WXSTRING +//According to STL _must_ be a -1 size_t +const size_t wxStringImpl::npos = (size_t) -1; +#endif + +// ---------------------------------------------------------------------------- +// static data +// ---------------------------------------------------------------------------- + +#if wxUSE_STL_BASED_WXSTRING + +// FIXME-UTF8: get rid of this, have only one wxEmptyString +#if wxUSE_UNICODE_UTF8 +const wxStringCharType WXDLLIMPEXP_BASE *wxEmptyStringImpl = ""; +#endif +const wxChar WXDLLIMPEXP_BASE *wxEmptyString = wxT(""); + +#else + +// for an empty string, GetStringData() will return this address: this +// structure has the same layout as wxStringData and it's data() method will +// return the empty string (dummy pointer) +static const struct +{ + wxStringData data; + wxStringCharType dummy; +} g_strEmpty = { {-1, 0, 0}, wxT('\0') }; + +// empty C style string: points to 'string data' byte of g_strEmpty +#if wxUSE_UNICODE_UTF8 +// FIXME-UTF8: get rid of this, have only one wxEmptyString +const wxStringCharType WXDLLIMPEXP_BASE *wxEmptyStringImpl = &g_strEmpty.dummy; +const wxChar WXDLLIMPEXP_BASE *wxEmptyString = wxT(""); +#else +const wxStringCharType WXDLLIMPEXP_BASE *wxEmptyString = &g_strEmpty.dummy; +#endif + +#endif + + +#if !wxUSE_STL_BASED_WXSTRING + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// this small class is used to gather statistics for performance tuning + +// uncomment this to enable gathering of some statistics about wxString +// efficiency +//#define WXSTRING_STATISTICS + +#ifdef WXSTRING_STATISTICS + class Averager + { + public: + Averager(const wxStringCharType *sz) { m_sz = sz; m_nTotal = m_nCount = 0; } + ~Averager() + { + wxPrintf("wxString %s: total = %lu, average = %f\n", + m_sz, m_nTotal, ((float)m_nTotal)/m_nCount); + } + + void Add(size_t n) { m_nTotal += n; m_nCount++; } + + private: + unsigned long m_nCount, m_nTotal; + const wxStringCharType *m_sz; + } g_averageLength("allocation size"), + g_averageSummandLength("summand length"), + g_averageConcatHit("hit probability in concat"), + g_averageInitialLength("initial string length"); + + #define STATISTICS_ADD(av, val) g_average##av.Add(val) +#else + #define STATISTICS_ADD(av, val) +#endif // WXSTRING_STATISTICS + +// =========================================================================== +// wxStringData class deallocation +// =========================================================================== + +#if defined(__VISUALC__) && defined(_MT) && !defined(_DLL) +# pragma message (__FILE__ ": building with Multithreaded non DLL runtime has a performance impact on wxString!") +void wxStringData::Free() +{ + free(this); +} +#endif + +// =========================================================================== +// wxStringImpl +// =========================================================================== + +// takes nLength elements of psz starting at nPos +void wxStringImpl::InitWith(const wxStringCharType *psz, + size_t nPos, size_t nLength) +{ + Init(); + + // if the length is not given, assume the string to be NUL terminated + if ( nLength == npos ) { + wxASSERT_MSG( nPos <= wxStrlen(psz), wxT("index out of bounds") ); + + nLength = wxStrlen(psz + nPos); + } + + STATISTICS_ADD(InitialLength, nLength); + + if ( nLength > 0 ) { + // trailing '\0' is written in AllocBuffer() + if ( !AllocBuffer(nLength) ) { + wxFAIL_MSG( wxT("out of memory in wxStringImpl::InitWith") ); + return; + } + wxStringMemcpy(m_pchData, psz + nPos, nLength); + } +} + +wxStringImpl::wxStringImpl(const_iterator first, const_iterator last) +{ + if ( last >= first ) + { + InitWith(first.GetPtr(), 0, last - first); + } + else + { + wxFAIL_MSG( wxT("first must be before last") ); + Init(); + } +} + +wxStringImpl::wxStringImpl(size_type n, wxStringCharType ch) +{ + Init(); + append(n, ch); +} + +// --------------------------------------------------------------------------- +// memory allocation +// --------------------------------------------------------------------------- + +// allocates memory needed to store a C string of length nLen +bool wxStringImpl::AllocBuffer(size_t nLen) +{ + // allocating 0 sized buffer doesn't make sense, all empty strings should + // reuse g_strEmpty + wxASSERT( nLen > 0 ); + + // make sure that we don't overflow + wxCHECK( nLen < (INT_MAX / sizeof(wxStringCharType)) - + (sizeof(wxStringData) + EXTRA_ALLOC + 1), false ); + + STATISTICS_ADD(Length, nLen); + + // allocate memory: + // 1) one extra character for '\0' termination + // 2) sizeof(wxStringData) for housekeeping info + wxStringData* pData = (wxStringData*) + malloc(sizeof(wxStringData) + (nLen + EXTRA_ALLOC + 1)*sizeof(wxStringCharType)); + + if ( pData == NULL ) { + // allocation failures are handled by the caller + return false; + } + + pData->nRefs = 1; + pData->nDataLength = nLen; + pData->nAllocLength = nLen + EXTRA_ALLOC; + m_pchData = pData->data(); // data starts after wxStringData + m_pchData[nLen] = wxT('\0'); + return true; +} + +// must be called before changing this string +bool wxStringImpl::CopyBeforeWrite() +{ + wxStringData* pData = GetStringData(); + + if ( pData->IsShared() ) { + pData->Unlock(); // memory not freed because shared + size_t nLen = pData->nDataLength; + if ( !AllocBuffer(nLen) ) { + // allocation failures are handled by the caller + return false; + } + wxStringMemcpy(m_pchData, pData->data(), nLen); + } + + wxASSERT( !GetStringData()->IsShared() ); // we must be the only owner + + return true; +} + +// must be called before replacing contents of this string +bool wxStringImpl::AllocBeforeWrite(size_t nLen) +{ + wxASSERT( nLen != 0 ); // doesn't make any sense + + // must not share string and must have enough space + wxStringData* pData = GetStringData(); + if ( pData->IsShared() || pData->IsEmpty() ) { + // can't work with old buffer, get new one + pData->Unlock(); + if ( !AllocBuffer(nLen) ) { + // allocation failures are handled by the caller + return false; + } + } + else { + if ( nLen > pData->nAllocLength ) { + // realloc the buffer instead of calling malloc() again, this is more + // efficient + STATISTICS_ADD(Length, nLen); + + nLen += EXTRA_ALLOC; + + pData = (wxStringData*) + realloc(pData, + sizeof(wxStringData) + (nLen + 1)*sizeof(wxStringCharType)); + + if ( pData == NULL ) { + // allocation failures are handled by the caller + // keep previous data since reallocation failed + return false; + } + + pData->nAllocLength = nLen; + m_pchData = pData->data(); + } + } + + wxASSERT( !GetStringData()->IsShared() ); // we must be the only owner + + // it doesn't really matter what the string length is as it's going to be + // overwritten later but, for extra safety, set it to 0 for now as we may + // have some junk in m_pchData + GetStringData()->nDataLength = 0; + + return true; +} + +wxStringImpl& wxStringImpl::append(size_t n, wxStringCharType ch) +{ + size_type len = length(); + + if ( !Alloc(len + n) || !CopyBeforeWrite() ) { + wxFAIL_MSG( wxT("out of memory in wxStringImpl::append") ); + return *this; + } + GetStringData()->nDataLength = len + n; + m_pchData[len + n] = '\0'; + for ( size_t i = 0; i < n; ++i ) + m_pchData[len + i] = ch; + return *this; +} + +void wxStringImpl::resize(size_t nSize, wxStringCharType ch) +{ + size_t len = length(); + + if ( nSize < len ) + { + erase(begin() + nSize, end()); + } + else if ( nSize > len ) + { + append(nSize - len, ch); + } + //else: we have exactly the specified length, nothing to do +} + +// allocate enough memory for nLen characters +bool wxStringImpl::Alloc(size_t nLen) +{ + wxStringData *pData = GetStringData(); + if ( pData->nAllocLength <= nLen ) { + if ( pData->IsEmpty() ) { + STATISTICS_ADD(Length, nLen); + + nLen += EXTRA_ALLOC; + + pData = (wxStringData *) + malloc(sizeof(wxStringData) + (nLen + 1)*sizeof(wxStringCharType)); + + if ( pData == NULL ) { + // allocation failure handled by caller + return false; + } + + pData->nRefs = 1; + pData->nDataLength = 0; + pData->nAllocLength = nLen; + m_pchData = pData->data(); // data starts after wxStringData + m_pchData[0u] = wxT('\0'); + } + else if ( pData->IsShared() ) { + pData->Unlock(); // memory not freed because shared + size_t nOldLen = pData->nDataLength; + if ( !AllocBuffer(nLen) ) { + // allocation failure handled by caller + return false; + } + // +1 to copy the terminator, too + memcpy(m_pchData, pData->data(), (nOldLen+1)*sizeof(wxStringCharType)); + GetStringData()->nDataLength = nOldLen; + } + else { + nLen += EXTRA_ALLOC; + + pData = (wxStringData *) + realloc(pData, sizeof(wxStringData) + (nLen + 1)*sizeof(wxStringCharType)); + + if ( pData == NULL ) { + // allocation failure handled by caller + // keep previous data since reallocation failed + return false; + } + + // it's not important if the pointer changed or not (the check for this + // is not faster than assigning to m_pchData in all cases) + pData->nAllocLength = nLen; + m_pchData = pData->data(); + } + } + //else: we've already got enough + return true; +} + +wxStringImpl::iterator wxStringImpl::begin() +{ + if ( !empty() ) + CopyBeforeWrite(); + return m_pchData; +} + +wxStringImpl::iterator wxStringImpl::end() +{ + if ( !empty() ) + CopyBeforeWrite(); + return m_pchData + length(); +} + +wxStringImpl::iterator wxStringImpl::erase(iterator it) +{ + size_type idx = it - begin(); + erase(idx, 1); + return begin() + idx; +} + +wxStringImpl& wxStringImpl::erase(size_t nStart, size_t nLen) +{ + wxASSERT(nStart <= length()); + size_t strLen = length() - nStart; + // delete nLen or up to the end of the string characters + nLen = strLen < nLen ? strLen : nLen; + wxStringImpl strTmp(c_str(), nStart); + strTmp.append(c_str() + nStart + nLen, length() - nStart - nLen); + + swap(strTmp); + return *this; +} + +wxStringImpl& wxStringImpl::insert(size_t nPos, + const wxStringCharType *sz, size_t n) +{ + wxASSERT( nPos <= length() ); + + if ( n == npos ) n = wxStrlen(sz); + if ( n == 0 ) return *this; + + if ( !Alloc(length() + n) || !CopyBeforeWrite() ) { + wxFAIL_MSG( wxT("out of memory in wxStringImpl::insert") ); + return *this; + } + + memmove(m_pchData + nPos + n, m_pchData + nPos, + (length() - nPos) * sizeof(wxStringCharType)); + memcpy(m_pchData + nPos, sz, n * sizeof(wxStringCharType)); + GetStringData()->nDataLength = length() + n; + m_pchData[length()] = '\0'; + + return *this; +} + +void wxStringImpl::swap(wxStringImpl& str) +{ + wxStringCharType* tmp = str.m_pchData; + str.m_pchData = m_pchData; + m_pchData = tmp; +} + +size_t wxStringImpl::find(const wxStringImpl& str, size_t nStart) const +{ + // deal with the special case of empty string first + const size_t nLen = length(); + const size_t nLenOther = str.length(); + + if ( !nLenOther ) + { + // empty string is a substring of anything + return 0; + } + + if ( !nLen ) + { + // the other string is non empty so can't be our substring + return npos; + } + + wxASSERT( str.GetStringData()->IsValid() ); + wxASSERT( nStart <= nLen ); + + const wxStringCharType * const other = str.c_str(); + + // anchor + const wxStringCharType* p = + (const wxStringCharType*)wxStringMemchr(c_str() + nStart, + *other, + nLen - nStart); + + if ( !p ) + return npos; + + while ( p - c_str() + nLenOther <= nLen && + wxStringMemcmp(p, other, nLenOther) ) + { + p++; + + // anchor again + p = (const wxStringCharType*) + wxStringMemchr(p, *other, nLen - (p - c_str())); + + if ( !p ) + return npos; + } + + return p - c_str() + nLenOther <= nLen ? p - c_str() : npos; +} + +size_t wxStringImpl::find(const wxStringCharType* sz, + size_t nStart, size_t n) const +{ + return find(wxStringImpl(sz, n), nStart); +} + +size_t wxStringImpl::find(wxStringCharType ch, size_t nStart) const +{ + wxASSERT( nStart <= length() ); + + const wxStringCharType *p = (const wxStringCharType*) + wxStringMemchr(c_str() + nStart, ch, length() - nStart); + + return p == NULL ? npos : p - c_str(); +} + +size_t wxStringImpl::rfind(const wxStringImpl& str, size_t nStart) const +{ + wxASSERT( str.GetStringData()->IsValid() ); + wxASSERT( nStart == npos || nStart <= length() ); + + if ( length() >= str.length() ) + { + // avoids a corner case later + if ( empty() && str.empty() ) + return 0; + + // "top" is the point where search starts from + size_t top = length() - str.length(); + + if ( nStart == npos ) + nStart = length() - 1; + if ( nStart < top ) + top = nStart; + + const wxStringCharType *cursor = c_str() + top; + do + { + if ( wxStringMemcmp(cursor, str.c_str(), str.length()) == 0 ) + { + return cursor - c_str(); + } + } while ( cursor-- > c_str() ); + } + + return npos; +} + +size_t wxStringImpl::rfind(const wxStringCharType* sz, + size_t nStart, size_t n) const +{ + return rfind(wxStringImpl(sz, n), nStart); +} + +size_t wxStringImpl::rfind(wxStringCharType ch, size_t nStart) const +{ + if ( nStart == npos ) + { + nStart = length(); + } + else + { + wxASSERT( nStart <= length() ); + } + + const wxStringCharType *actual; + for ( actual = c_str() + ( nStart == npos ? length() : nStart + 1 ); + actual > c_str(); --actual ) + { + if ( *(actual - 1) == ch ) + return (actual - 1) - c_str(); + } + + return npos; +} + +wxStringImpl& wxStringImpl::replace(size_t nStart, size_t nLen, + const wxStringCharType *sz, size_t nCount) +{ + // check and adjust parameters + const size_t lenOld = length(); + + wxASSERT_MSG( nStart <= lenOld, + wxT("index out of bounds in wxStringImpl::replace") ); + size_t nEnd = nStart + nLen; + if ( nLen > lenOld - nStart ) + { + // nLen may be out of range, as it can be npos, just clump it down + nLen = lenOld - nStart; + nEnd = lenOld; + } + + if ( nCount == npos ) + nCount = wxStrlen(sz); + + // build the new string from 3 pieces: part of this string before nStart, + // the new substring and the part of this string after nStart+nLen + wxStringImpl tmp; + const size_t lenNew = lenOld + nCount - nLen; + if ( lenNew ) + { + tmp.AllocBuffer(lenOld + nCount - nLen); + + wxStringCharType *dst = tmp.m_pchData; + memcpy(dst, m_pchData, nStart*sizeof(wxStringCharType)); + dst += nStart; + + memcpy(dst, sz, nCount*sizeof(wxStringCharType)); + dst += nCount; + + memcpy(dst, m_pchData + nEnd, (lenOld - nEnd)*sizeof(wxStringCharType)); + } + + // and replace this string contents with the new one + swap(tmp); + return *this; +} + +wxStringImpl wxStringImpl::substr(size_t nStart, size_t nLen) const +{ + if ( nLen == npos ) + nLen = length() - nStart; + return wxStringImpl(*this, nStart, nLen); +} + +// assigns one string to another +wxStringImpl& wxStringImpl::operator=(const wxStringImpl& stringSrc) +{ + wxASSERT( stringSrc.GetStringData()->IsValid() ); + + // don't copy string over itself + if ( m_pchData != stringSrc.m_pchData ) { + if ( stringSrc.GetStringData()->IsEmpty() ) { + Reinit(); + } + else { + // adjust references + GetStringData()->Unlock(); + m_pchData = stringSrc.m_pchData; + GetStringData()->Lock(); + } + } + + return *this; +} + +// assigns a single character +wxStringImpl& wxStringImpl::operator=(wxStringCharType ch) +{ + wxStringCharType c(ch); + if ( !AssignCopy(1, &c) ) { + wxFAIL_MSG( wxT("out of memory in wxStringImpl::operator=(wxStringCharType)") ); + } + return *this; +} + +// assigns C string +wxStringImpl& wxStringImpl::operator=(const wxStringCharType *psz) +{ + if ( !AssignCopy(wxStrlen(psz), psz) ) { + wxFAIL_MSG( wxT("out of memory in wxStringImpl::operator=(const wxStringCharType *)") ); + } + return *this; +} + +// helper function: does real copy +bool wxStringImpl::AssignCopy(size_t nSrcLen, + const wxStringCharType *pszSrcData) +{ + if ( nSrcLen == 0 ) { + Reinit(); + } + else { + if ( !AllocBeforeWrite(nSrcLen) ) { + // allocation failure handled by caller + return false; + } + + // use memmove() and not memcpy() here as we might be copying from our own + // buffer in case of assignment such as "s = s.c_str()" (see #11294) + memmove(m_pchData, pszSrcData, nSrcLen*sizeof(wxStringCharType)); + + GetStringData()->nDataLength = nSrcLen; + m_pchData[nSrcLen] = wxT('\0'); + } + return true; +} + +// --------------------------------------------------------------------------- +// string concatenation +// --------------------------------------------------------------------------- + +// add something to this string +bool wxStringImpl::ConcatSelf(size_t nSrcLen, + const wxStringCharType *pszSrcData, + size_t nMaxLen) +{ + STATISTICS_ADD(SummandLength, nSrcLen); + + nSrcLen = nSrcLen < nMaxLen ? nSrcLen : nMaxLen; + + // concatenating an empty string is a NOP + if ( nSrcLen > 0 ) { + wxStringData *pData = GetStringData(); + size_t nLen = pData->nDataLength; + + // take special care when appending part of this string to itself: the code + // below reallocates our buffer and this invalidates pszSrcData pointer so + // we have to copy it in another temporary string in this case (but avoid + // doing this unnecessarily) + if ( pszSrcData >= m_pchData && pszSrcData < m_pchData + nLen ) + { + wxStringImpl tmp(pszSrcData, nSrcLen); + return ConcatSelf(nSrcLen, tmp.m_pchData, nSrcLen); + } + + size_t nNewLen = nLen + nSrcLen; + + // alloc new buffer if current is too small + if ( pData->IsShared() ) { + STATISTICS_ADD(ConcatHit, 0); + + // we have to allocate another buffer + wxStringData* pOldData = GetStringData(); + if ( !AllocBuffer(nNewLen) ) { + // allocation failure handled by caller + return false; + } + memcpy(m_pchData, pOldData->data(), nLen*sizeof(wxStringCharType)); + pOldData->Unlock(); + } + else if ( nNewLen > pData->nAllocLength ) { + STATISTICS_ADD(ConcatHit, 0); + + reserve(nNewLen); + // we have to grow the buffer + if ( capacity() < nNewLen ) { + // allocation failure handled by caller + return false; + } + } + else { + STATISTICS_ADD(ConcatHit, 1); + + // the buffer is already big enough + } + + // should be enough space + wxASSERT( nNewLen <= GetStringData()->nAllocLength ); + + // fast concatenation - all is done in our buffer + memcpy(m_pchData + nLen, pszSrcData, nSrcLen*sizeof(wxStringCharType)); + + m_pchData[nNewLen] = wxT('\0'); // put terminating '\0' + GetStringData()->nDataLength = nNewLen; // and fix the length + } + //else: the string to append was empty + return true; +} + +// get the pointer to writable buffer of (at least) nLen bytes +wxStringCharType *wxStringImpl::DoGetWriteBuf(size_t nLen) +{ + if ( !AllocBeforeWrite(nLen) ) { + // allocation failure handled by caller + return NULL; + } + + wxASSERT( GetStringData()->nRefs == 1 ); + GetStringData()->Validate(false); + + return m_pchData; +} + +// put string back in a reasonable state after GetWriteBuf +void wxStringImpl::DoUngetWriteBuf() +{ + DoUngetWriteBuf(wxStrlen(m_pchData)); +} + +void wxStringImpl::DoUngetWriteBuf(size_t nLen) +{ + wxStringData * const pData = GetStringData(); + + wxASSERT_MSG( nLen < pData->nAllocLength, wxT("buffer overrun") ); + + // the strings we store are always NUL-terminated + pData->data()[nLen] = wxT('\0'); + pData->nDataLength = nLen; + pData->Validate(true); +} + +#endif // !wxUSE_STL_BASED_WXSTRING diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/stringops.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/stringops.cpp new file mode 100644 index 0000000000..1592706872 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/stringops.cpp @@ -0,0 +1,315 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/stringops.cpp +// Purpose: implementation of wxString primitive operations +// Author: Vaclav Slavik +// Modified by: +// Created: 2007-04-16 +// Copyright: (c) 2007 REA Elektronik GmbH +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// headers +// =========================================================================== + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/stringops.h" +#endif + +// =========================================================================== +// implementation +// =========================================================================== + +#if wxUSE_UNICODE_UTF8 + +// --------------------------------------------------------------------------- +// UTF-8 sequences lengths +// --------------------------------------------------------------------------- + +const unsigned char wxStringOperationsUtf8::ms_utf8IterTable[256] = { + // single-byte sequences (ASCII): + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 00..0F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 10..1F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 20..2F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 30..3F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 40..4F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 50..5F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 60..6F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 70..7F + + // these are invalid, we use step 1 to skip + // over them (should never happen): + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 80..8F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 90..9F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A0..AF + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B0..BF + 1, 1, // C0,C1 + + // two-byte sequences: + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C2..CF + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // D0..DF + + // three-byte sequences: + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // E0..EF + + // four-byte sequences: + 4, 4, 4, 4, 4, // F0..F4 + + // these are invalid again (5- or 6-byte + // sequences and sequences for code points + // above U+10FFFF, as restricted by RFC 3629): + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F5..FF +}; + +// --------------------------------------------------------------------------- +// UTF-8 operations +// --------------------------------------------------------------------------- + +// +// Table 3.1B from Unicode spec: Legal UTF-8 Byte Sequences +// +// Code Points | 1st Byte | 2nd Byte | 3rd Byte | 4th Byte | +// -------------------+----------+----------+----------+----------+ +// U+0000..U+007F | 00..7F | | | | +// U+0080..U+07FF | C2..DF | 80..BF | | | +// U+0800..U+0FFF | E0 | A0..BF | 80..BF | | +// U+1000..U+FFFF | E1..EF | 80..BF | 80..BF | | +// U+10000..U+3FFFF | F0 | 90..BF | 80..BF | 80..BF | +// U+40000..U+FFFFF | F1..F3 | 80..BF | 80..BF | 80..BF | +// U+100000..U+10FFFF | F4 | 80..8F | 80..BF | 80..BF | +// -------------------+----------+----------+----------+----------+ + +bool wxStringOperationsUtf8::IsValidUtf8String(const char *str, size_t len) +{ + if ( !str ) + return true; // empty string is UTF8 string + + const unsigned char *c = (const unsigned char*)str; + const unsigned char * const end = (len == wxStringImpl::npos) ? NULL : c + len; + + for ( ; c != end && *c; ++c ) + { + unsigned char b = *c; + + if ( end != NULL ) + { + // if the string is not NULL-terminated, verify we have enough + // bytes in it left for current character's encoding: + if ( c + ms_utf8IterTable[*c] > end ) + return false; + } + + if ( b <= 0x7F ) // 00..7F + continue; + + else if ( b < 0xC2 ) // invalid lead bytes: 80..C1 + return false; + + // two-byte sequences: + else if ( b <= 0xDF ) // C2..DF + { + b = *(++c); + if ( !(b >= 0x80 && b <= 0xBF ) ) + return false; + } + + // three-byte sequences: + else if ( b == 0xE0 ) + { + b = *(++c); + if ( !(b >= 0xA0 && b <= 0xBF ) ) + return false; + b = *(++c); + if ( !(b >= 0x80 && b <= 0xBF ) ) + return false; + } + else if ( b == 0xED ) + { + b = *(++c); + if ( !(b >= 0x80 && b <= 0x9F ) ) + return false; + b = *(++c); + if ( !(b >= 0x80 && b <= 0xBF ) ) + return false; + } + else if ( b <= 0xEF ) // E1..EC EE..EF + { + for ( int i = 0; i < 2; ++i ) + { + b = *(++c); + if ( !(b >= 0x80 && b <= 0xBF ) ) + return false; + } + } + + // four-byte sequences: + else if ( b == 0xF0 ) + { + b = *(++c); + if ( !(b >= 0x90 && b <= 0xBF ) ) + return false; + for ( int i = 0; i < 2; ++i ) + { + b = *(++c); + if ( !(b >= 0x80 && b <= 0xBF ) ) + return false; + } + } + else if ( b <= 0xF3 ) // F1..F3 + { + for ( int i = 0; i < 3; ++i ) + { + b = *(++c); + if ( !(b >= 0x80 && b <= 0xBF ) ) + return false; + } + } + else if ( b == 0xF4 ) + { + b = *(++c); + if ( !(b >= 0x80 && b <= 0x8F ) ) + return false; + for ( int i = 0; i < 2; ++i ) + { + b = *(++c); + if ( !(b >= 0x80 && b <= 0xBF ) ) + return false; + } + } + else // otherwise, it's invalid lead byte + return false; + } + + return true; +} + +// NB: this is in this file and not unichar.cpp to keep all UTF-8 encoding +// code in single place +wxUniChar::Utf8CharBuffer wxUniChar::AsUTF8() const +{ + Utf8CharBuffer buf = { "" }; // init to avoid g++ 4.1 warning with -O2 + char *out = buf.data; + + value_type code = GetValue(); + + // Char. number range | UTF-8 octet sequence + // (hexadecimal) | (binary) + // ----------------------+--------------------------------------------- + // 0000 0000 - 0000 007F | 0xxxxxxx + // 0000 0080 - 0000 07FF | 110xxxxx 10xxxxxx + // 0000 0800 - 0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx + // 0001 0000 - 0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + // + // Code point value is stored in bits marked with 'x', lowest-order bit + // of the value on the right side in the diagram above. + // (from RFC 3629) + + if ( code <= 0x7F ) + { + out[1] = 0; + out[0] = (char)code; + } + else if ( code <= 0x07FF ) + { + out[2] = 0; + // NB: this line takes 6 least significant bits, encodes them as + // 10xxxxxx and discards them so that the next byte can be encoded: + out[1] = 0x80 | (code & 0x3F); code >>= 6; + out[0] = 0xC0 | code; + } + else if ( code < 0xFFFF ) + { + out[3] = 0; + out[2] = 0x80 | (code & 0x3F); code >>= 6; + out[1] = 0x80 | (code & 0x3F); code >>= 6; + out[0] = 0xE0 | code; + } + else if ( code <= 0x10FFFF ) + { + out[4] = 0; + out[3] = 0x80 | (code & 0x3F); code >>= 6; + out[2] = 0x80 | (code & 0x3F); code >>= 6; + out[1] = 0x80 | (code & 0x3F); code >>= 6; + out[0] = 0xF0 | code; + } + else + { + wxFAIL_MSG( wxT("trying to encode undefined Unicode character") ); + out[0] = 0; + } + + return buf; +} + +wxUniChar +wxStringOperationsUtf8::DecodeNonAsciiChar(wxStringImpl::const_iterator i) +{ + wxASSERT( IsValidUtf8LeadByte(*i) ); + + size_t len = GetUtf8CharLength(*i); + wxASSERT_MSG( len <= 4, wxT("invalid UTF-8 sequence length") ); + + // Char. number range | UTF-8 octet sequence + // (hexadecimal) | (binary) + // ----------------------+--------------------------------------------- + // 0000 0000 - 0000 007F | 0xxxxxxx + // 0000 0080 - 0000 07FF | 110xxxxx 10xxxxxx + // 0000 0800 - 0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx + // 0001 0000 - 0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + // + // Code point value is stored in bits marked with 'x', lowest-order bit + // of the value on the right side in the diagram above. + // (from RFC 3629) + + // mask to extract lead byte's value ('x' bits above), by sequence's length: + static const unsigned char s_leadValueMask[4] = { 0x7F, 0x1F, 0x0F, 0x07 }; +#if wxDEBUG_LEVEL + // mask and value of lead byte's most significant bits, by length: + static const unsigned char s_leadMarkerMask[4] = { 0x80, 0xE0, 0xF0, 0xF8 }; + static const unsigned char s_leadMarkerVal[4] = { 0x00, 0xC0, 0xE0, 0xF0 }; +#endif + + // extract the lead byte's value bits: + wxASSERT_MSG( ((unsigned char)*i & s_leadMarkerMask[len-1]) == + s_leadMarkerVal[len-1], + wxT("invalid UTF-8 lead byte") ); + wxUniChar::value_type code = (unsigned char)*i & s_leadValueMask[len-1]; + + // all remaining bytes, if any, are handled in the same way regardless of + // sequence's length: + for ( ++i ; len > 1; --len, ++i ) + { + wxASSERT_MSG( ((unsigned char)*i & 0xC0) == 0x80, + wxT("invalid UTF-8 byte") ); + + code <<= 6; + code |= (unsigned char)*i & 0x3F; + } + + return wxUniChar(code); +} + +wxCharBuffer wxStringOperationsUtf8::EncodeNChars(size_t n, const wxUniChar& ch) +{ + Utf8CharBuffer once(EncodeChar(ch)); + // the IncIter() table can be used to determine the length of ch's encoding: + size_t len = ms_utf8IterTable[(unsigned char)once.data[0]]; + + wxCharBuffer buf(n * len); + char *ptr = buf.data(); + for ( size_t i = 0; i < n; i++, ptr += len ) + { + memcpy(ptr, once.data, len); + } + + return buf; +} + +#endif // wxUSE_UNICODE_UTF8 diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/strvararg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/strvararg.cpp new file mode 100644 index 0000000000..83d82b3383 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/strvararg.cpp @@ -0,0 +1,737 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/strvararg.cpp +// Purpose: macros for implementing type-safe vararg passing of strings +// Author: Vaclav Slavik +// Created: 2007-02-19 +// Copyright: (c) 2007 REA Elektronik GmbH +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/strvararg.h" +#include "wx/string.h" +#include "wx/crt.h" +#include "wx/private/wxprintf.h" + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxArgNormalizer<> +// ---------------------------------------------------------------------------- + +const wxStringCharType *wxArgNormalizerNative::get() const +{ + return m_value.wx_str(); +} + +const wxStringCharType *wxArgNormalizerNative::get() const +{ + return m_value.AsInternal(); +} + +#if wxUSE_UNICODE_UTF8 && !wxUSE_UTF8_LOCALE_ONLY +wxArgNormalizerWchar::wxArgNormalizerWchar( + const wxString& s, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerWithBuffer(s.wc_str(), fmt, index) +{ +} + +wxArgNormalizerWchar::wxArgNormalizerWchar( + const wxCStrData& s, + const wxFormatString *fmt, unsigned index) + : wxArgNormalizerWithBuffer(s.AsWCharBuf(), fmt, index) +{ +} +#endif // wxUSE_UNICODE_UTF8 && !wxUSE_UTF8_LOCALE_ONLY + +// ---------------------------------------------------------------------------- +// wxArgNormalizedString +// ---------------------------------------------------------------------------- + +wxString wxArgNormalizedString::GetString() const +{ + if ( !IsValid() ) + return wxEmptyString; + +#if wxUSE_UTF8_LOCALE_ONLY + return wxString(reinterpret_cast(m_ptr)); +#else + #if wxUSE_UNICODE_UTF8 + if ( wxLocaleIsUtf8 ) + return wxString(reinterpret_cast(m_ptr)); + else + #endif + return wxString(reinterpret_cast(m_ptr)); +#endif // !wxUSE_UTF8_LOCALE_ONLY +} + +wxArgNormalizedString::operator wxString() const +{ + return GetString(); +} + +// ---------------------------------------------------------------------------- +// wxFormatConverter: class doing the "%s" and "%c" normalization +// ---------------------------------------------------------------------------- + +/* + There are four problems with wxPrintf() etc. format strings: + + 1) The printf vararg macros convert all forms of strings into + wxStringCharType* representation. This may make the format string + incorrect: for example, if %ls was used together with a wchar_t* + variadic argument, this would no longer work, because the templates + would change wchar_t* argument to wxStringCharType* and %ls would now + be incorrect in e.g. UTF-8 build. We need make sure only one specifier + form is used. + + 2) To complicate matters further, the meaning of %s and %c is different + under Windows and on Unix. The Windows/MS convention is as follows: + + In ANSI mode: + + format specifier results in + ----------------------------------- + %s, %hs, %hS char* + %ls, %S, %lS wchar_t* + + In Unicode mode: + + format specifier results in + ----------------------------------- + %hs, %S, %hS char* + %s, %ls, %lS wchar_t* + + (While on POSIX systems we have %C identical to %lc and %c always means + char (in any mode) while %lc always means wchar_t.) + + In other words, we should _only_ use %s on Windows and %ls on Unix for + wxUSE_UNICODE_WCHAR build. + + 3) To make things even worse, we need two forms in UTF-8 build: one for + passing strings to ANSI functions under UTF-8 locales (this one should + use %s) and one for widechar functions used under non-UTF-8 locales + (this one should use %ls). + + And, of course, the same should be done for %c as well. + + + wxScanf() family of functions is simpler, because we don't normalize their + variadic arguments and we only have to handle 2) above and only for widechar + versions. +*/ + +template +class wxFormatConverterBase +{ +public: + typedef T CharType; + + wxFormatConverterBase() + { + m_fmtOrig = NULL; + m_fmtLast = NULL; + m_nCopied = 0; + } + + wxScopedCharTypeBuffer Convert(const CharType *format) + { + // this is reset to NULL if we modify the format string + m_fmtOrig = format; + + while ( *format ) + { + if ( CopyFmtChar(*format++) == wxT('%') ) + { +#if wxUSE_PRINTF_POS_PARAMS + if ( *format >= '0' && *format <= '9' ) + { + SkipDigits(&format); + if ( *format == '$' ) + { + // It was a positional argument specification. + CopyFmtChar(*format++); + } + //else: it was a width specification, nothing else to do. + } +#endif // wxUSE_PRINTF_POS_PARAMS + + // skip any flags + while ( IsFlagChar(*format) ) + CopyFmtChar(*format++); + + // and possible width + if ( *format == wxT('*') ) + CopyFmtChar(*format++); + else + SkipDigits(&format); + + // precision? + if ( *format == wxT('.') ) + { + CopyFmtChar(*format++); + if ( *format == wxT('*') ) + CopyFmtChar(*format++); + else + SkipDigits(&format); + } + + // next we can have a size modifier + SizeModifier size; + + switch ( *format ) + { + case 'h': + size = Size_Short; + format++; + break; + + case 'l': + // "ll" has a different meaning! + if ( format[1] != 'l' ) + { + size = Size_Long; + format++; + break; + } + //else: fall through + + default: + size = Size_Default; + } + + CharType outConv = *format; + SizeModifier outSize = size; + + // and finally we should have the type + switch ( *format ) + { + case wxT('S'): + case wxT('s'): + // all strings were converted into the same form by + // wxArgNormalizer, this form depends on the context + // in which the value is used (scanf/printf/wprintf): + HandleString(*format, size, outConv, outSize); + break; + + case wxT('C'): + case wxT('c'): + HandleChar(*format, size, outConv, outSize); + break; + + default: + // nothing special to do + break; + } + + if ( outConv == *format && outSize == size ) // no change + { + if ( size != Size_Default ) + CopyFmtChar(*(format - 1)); + CopyFmtChar(*format); + } + else // something changed + { + switch ( outSize ) + { + case Size_Long: + InsertFmtChar(wxT('l')); + break; + + case Size_Short: + InsertFmtChar(wxT('h')); + break; + + case Size_Default: + // nothing to do + break; + } + InsertFmtChar(outConv); + } + + format++; + } + } + + // notice that we only translated the string if m_fmtOrig == NULL (as + // set by CopyAllBefore()), otherwise we should simply use the original + // format + if ( m_fmtOrig ) + { + return wxScopedCharTypeBuffer::CreateNonOwned(m_fmtOrig); + } + else + { + // shrink converted format string to actual size (instead of + // over-sized allocation from CopyAllBefore()) and NUL-terminate + // it: + m_fmt.shrink(m_fmtLast - m_fmt.data()); + return m_fmt; + } + } + + virtual ~wxFormatConverterBase() {} + +protected: + enum SizeModifier + { + Size_Default, + Size_Short, + Size_Long + }; + + // called to handle %S or %s; 'conv' is conversion specifier ('S' or 's' + // respectively), 'size' is the preceding size modifier; the new values of + // conversion and size specifiers must be written to outConv and outSize + virtual void HandleString(CharType conv, SizeModifier size, + CharType& outConv, SizeModifier& outSize) = 0; + + // ditto for %C or %c + virtual void HandleChar(CharType conv, SizeModifier size, + CharType& outConv, SizeModifier& outSize) = 0; + +private: + // copy another character to the translated format: this function does the + // copy if we are translating but doesn't do anything at all if we don't, + // so we don't create the translated format string at all unless we really + // need to (i.e. InsertFmtChar() is called) + CharType CopyFmtChar(CharType ch) + { + if ( !m_fmtOrig ) + { + // we're translating, do copy + *(m_fmtLast++) = ch; + } + else + { + // simply increase the count which should be copied by + // CopyAllBefore() later if needed + m_nCopied++; + } + + return ch; + } + + // insert an extra character + void InsertFmtChar(CharType ch) + { + if ( m_fmtOrig ) + { + // so far we haven't translated anything yet + CopyAllBefore(); + } + + *(m_fmtLast++) = ch; + } + + void CopyAllBefore() + { + wxASSERT_MSG( m_fmtOrig && m_fmt.data() == NULL, "logic error" ); + + // the modified format string is guaranteed to be no longer than + // 3/2 of the original (worst case: the entire format string consists + // of "%s" repeated and is expanded to "%ls" on Unix), so we can + // allocate the buffer now and not worry about running out of space if + // we over-allocate a bit: + size_t fmtLen = wxStrlen(m_fmtOrig); + // worst case is of even length, so there's no rounding error in *3/2: + m_fmt.extend(fmtLen * 3 / 2); + + if ( m_nCopied > 0 ) + wxStrncpy(m_fmt.data(), m_fmtOrig, m_nCopied); + m_fmtLast = m_fmt.data() + m_nCopied; + + // we won't need it any longer and resetting it also indicates that we + // modified the format + m_fmtOrig = NULL; + } + + static bool IsFlagChar(CharType ch) + { + return ch == wxT('-') || ch == wxT('+') || + ch == wxT('0') || ch == wxT(' ') || ch == wxT('#'); + } + + void SkipDigits(const CharType **ptpc) + { + while ( **ptpc >= wxT('0') && **ptpc <= wxT('9') ) + CopyFmtChar(*(*ptpc)++); + } + + // the translated format + wxCharTypeBuffer m_fmt; + CharType *m_fmtLast; + + // the original format + const CharType *m_fmtOrig; + + // the number of characters already copied (i.e. already parsed, but left + // unmodified) + size_t m_nCopied; +}; + +#if defined(__WINDOWS__) && !defined(__CYGWIN__) + +// on Windows, we should use %s and %c regardless of the build: +class wxPrintfFormatConverterWchar : public wxFormatConverterBase +{ + virtual void HandleString(CharType WXUNUSED(conv), + SizeModifier WXUNUSED(size), + CharType& outConv, SizeModifier& outSize) + { + outConv = 's'; + outSize = Size_Default; + } + + virtual void HandleChar(CharType WXUNUSED(conv), + SizeModifier WXUNUSED(size), + CharType& outConv, SizeModifier& outSize) + { + outConv = 'c'; + outSize = Size_Default; + } +}; + +#else // !__WINDOWS__ + +// on Unix, it's %s for ANSI functions and %ls for widechar: + +#if !wxUSE_UTF8_LOCALE_ONLY +class wxPrintfFormatConverterWchar : public wxFormatConverterBase +{ + virtual void HandleString(CharType WXUNUSED(conv), + SizeModifier WXUNUSED(size), + CharType& outConv, SizeModifier& outSize) + { + outConv = 's'; + outSize = Size_Long; + } + + virtual void HandleChar(CharType WXUNUSED(conv), + SizeModifier WXUNUSED(size), + CharType& outConv, SizeModifier& outSize) + { + outConv = 'c'; + outSize = Size_Long; + } +}; +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#endif // __WINDOWS__/!__WINDOWS__ + +#if wxUSE_UNICODE_UTF8 +class wxPrintfFormatConverterUtf8 : public wxFormatConverterBase +{ + virtual void HandleString(CharType WXUNUSED(conv), + SizeModifier WXUNUSED(size), + CharType& outConv, SizeModifier& outSize) + { + outConv = 's'; + outSize = Size_Default; + } + + virtual void HandleChar(CharType WXUNUSED(conv), + SizeModifier WXUNUSED(size), + CharType& outConv, SizeModifier& outSize) + { + // chars are represented using wchar_t in both builds, so this is + // the same as above + outConv = 'c'; + outSize = Size_Long; + } +}; +#endif // wxUSE_UNICODE_UTF8 + +#if !wxUSE_UNICODE // FIXME-UTF8: remove +class wxPrintfFormatConverterANSI : public wxFormatConverterBase +{ + virtual void HandleString(CharType WXUNUSED(conv), + SizeModifier WXUNUSED(size), + CharType& outConv, SizeModifier& outSize) + { + outConv = 's'; + outSize = Size_Default; + } + + virtual void HandleChar(CharType WXUNUSED(conv), + SizeModifier WXUNUSED(size), + CharType& outConv, SizeModifier& outSize) + { + outConv = 'c'; + outSize = Size_Default; + } +}; +#endif // ANSI + +#ifndef __WINDOWS__ +/* + + wxScanf() format translation is different, we need to translate %s to %ls + and %c to %lc on Unix (but not Windows and for widechar functions only!). + + So to use native functions in order to get our semantics we must do the + following translations in Unicode mode: + + wxWidgets specifier POSIX specifier + ---------------------------------------- + + %hc, %C, %hC %c + %c %lc + + */ +class wxScanfFormatConverterWchar : public wxFormatConverterBase +{ + virtual void HandleString(CharType conv, SizeModifier size, + CharType& outConv, SizeModifier& outSize) + { + outConv = 's'; + outSize = GetOutSize(conv == 'S', size); + } + + virtual void HandleChar(CharType conv, SizeModifier size, + CharType& outConv, SizeModifier& outSize) + { + outConv = 'c'; + outSize = GetOutSize(conv == 'C', size); + } + + SizeModifier GetOutSize(bool convIsUpper, SizeModifier size) + { + // %S and %hS -> %s and %lS -> %ls + if ( convIsUpper ) + { + if ( size == Size_Long ) + return Size_Long; + else + return Size_Default; + } + else // %s or %c + { + if ( size == Size_Default ) + return Size_Long; + else + return size; + } + } +}; + +const wxScopedWCharBuffer wxScanfConvertFormatW(const wchar_t *format) +{ + return wxScanfFormatConverterWchar().Convert(format); +} +#endif // !__WINDOWS__ + + +// ---------------------------------------------------------------------------- +// wxFormatString +// ---------------------------------------------------------------------------- + +#if !wxUSE_UNICODE_WCHAR +const char* wxFormatString::InputAsChar() +{ + if ( m_char ) + return m_char.data(); + + // in ANSI build, wx_str() returns char*, in UTF-8 build, this function + // is only called under UTF-8 locales, so we should return UTF-8 string, + // which is, again, what wx_str() returns: + if ( m_str ) + return m_str->wx_str(); + + // ditto wxCStrData: + if ( m_cstr ) + return m_cstr->AsInternal(); + + // the last case is that wide string was passed in: in that case, we need + // to convert it: + wxASSERT( m_wchar ); + + m_char = wxConvLibc.cWC2MB(m_wchar.data()); + + return m_char.data(); +} + +const char* wxFormatString::AsChar() +{ + if ( !m_convertedChar ) +#if !wxUSE_UNICODE // FIXME-UTF8: remove this + m_convertedChar = wxPrintfFormatConverterANSI().Convert(InputAsChar()); +#else + m_convertedChar = wxPrintfFormatConverterUtf8().Convert(InputAsChar()); +#endif + + return m_convertedChar.data(); +} +#endif // !wxUSE_UNICODE_WCHAR + +#if wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY +const wchar_t* wxFormatString::InputAsWChar() +{ + if ( m_wchar ) + return m_wchar.data(); + +#if wxUSE_UNICODE_WCHAR + if ( m_str ) + return m_str->wc_str(); + if ( m_cstr ) + return m_cstr->AsInternal(); +#else // wxUSE_UNICODE_UTF8 + if ( m_str ) + { + m_wchar = m_str->wc_str(); + return m_wchar.data(); + } + if ( m_cstr ) + { + m_wchar = m_cstr->AsWCharBuf(); + return m_wchar.data(); + } +#endif // wxUSE_UNICODE_WCHAR/UTF8 + + // the last case is that narrow string was passed in: in that case, we need + // to convert it: + wxASSERT( m_char ); + + m_wchar = wxConvLibc.cMB2WC(m_char.data()); + + return m_wchar.data(); +} + +const wchar_t* wxFormatString::AsWChar() +{ + if ( !m_convertedWChar ) + m_convertedWChar = wxPrintfFormatConverterWchar().Convert(InputAsWChar()); + + return m_convertedWChar.data(); +} +#endif // wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY + +wxString wxFormatString::InputAsString() const +{ + if ( m_str ) + return *m_str; + if ( m_cstr ) + return m_cstr->AsString(); + if ( m_wchar ) + return wxString(m_wchar); + if ( m_char ) + return wxString(m_char); + + wxFAIL_MSG( "invalid wxFormatString - not initialized?" ); + return wxString(); +} + +// ---------------------------------------------------------------------------- +// wxFormatString::GetArgumentType() +// ---------------------------------------------------------------------------- + +namespace +{ + +template +wxFormatString::ArgumentType DoGetArgumentType(const CharType *format, + unsigned n) +{ + wxCHECK_MSG( format, wxFormatString::Arg_Unknown, + "empty format string not allowed here" ); + + wxPrintfConvSpecParser parser(format); + + if ( n > parser.nargs ) + { + // The n-th argument doesn't appear in the format string and is unused. + // This can happen e.g. if a translation of the format string is used + // and the translation language tends to avoid numbers in singular forms. + // The translator would then typically replace "%d" with "One" (e.g. in + // Hebrew). Passing too many vararg arguments does not harm, so its + // better to be more permissive here and allow legitimate uses in favour + // of catching harmless errors. + return wxFormatString::Arg_Unused; + } + + wxCHECK_MSG( parser.pspec[n-1] != NULL, wxFormatString::Arg_Unknown, + "requested argument not found - invalid format string?" ); + + switch ( parser.pspec[n-1]->m_type ) + { + case wxPAT_CHAR: + case wxPAT_WCHAR: + return wxFormatString::Arg_Char; + + case wxPAT_PCHAR: + case wxPAT_PWCHAR: + return wxFormatString::Arg_String; + + case wxPAT_INT: + return wxFormatString::Arg_Int; + case wxPAT_LONGINT: + return wxFormatString::Arg_LongInt; +#ifdef wxLongLong_t + case wxPAT_LONGLONGINT: + return wxFormatString::Arg_LongLongInt; +#endif + case wxPAT_SIZET: + return wxFormatString::Arg_Size_t; + + case wxPAT_DOUBLE: + return wxFormatString::Arg_Double; + case wxPAT_LONGDOUBLE: + return wxFormatString::Arg_LongDouble; + + case wxPAT_POINTER: + return wxFormatString::Arg_Pointer; + + case wxPAT_NINT: + return wxFormatString::Arg_IntPtr; + case wxPAT_NSHORTINT: + return wxFormatString::Arg_ShortIntPtr; + case wxPAT_NLONGINT: + return wxFormatString::Arg_LongIntPtr; + + case wxPAT_STAR: + // "*" requires argument of type int + return wxFormatString::Arg_Int; + + case wxPAT_INVALID: + // (handled after the switch statement) + break; + } + + // silence warning + wxFAIL_MSG( "unexpected argument type" ); + return wxFormatString::Arg_Unknown; +} + +} // anonymous namespace + +wxFormatString::ArgumentType wxFormatString::GetArgumentType(unsigned n) const +{ + if ( m_char ) + return DoGetArgumentType(m_char.data(), n); + else if ( m_wchar ) + return DoGetArgumentType(m_wchar.data(), n); + else if ( m_str ) + return DoGetArgumentType(m_str->wx_str(), n); + else if ( m_cstr ) + return DoGetArgumentType(m_cstr->AsInternal(), n); + + wxFAIL_MSG( "unreachable code" ); + return Arg_Unknown; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/sysopt.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/sysopt.cpp new file mode 100644 index 0000000000..ede2e7a547 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/sysopt.cpp @@ -0,0 +1,111 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/sysopt.cpp +// Purpose: wxSystemOptions +// Author: Julian Smart +// Modified by: +// Created: 2001-07-10 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#if wxUSE_SYSTEM_OPTIONS + +#include "wx/sysopt.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/list.h" + #include "wx/string.h" + #include "wx/arrstr.h" +#endif + +// ---------------------------------------------------------------------------- +// private globals +// ---------------------------------------------------------------------------- + +static wxArrayString gs_optionNames, + gs_optionValues; + +// ============================================================================ +// wxSystemOptions implementation +// ============================================================================ + +// Option functions (arbitrary name/value mapping) +void wxSystemOptions::SetOption(const wxString& name, const wxString& value) +{ + int idx = gs_optionNames.Index(name, false); + if (idx == wxNOT_FOUND) + { + gs_optionNames.Add(name); + gs_optionValues.Add(value); + } + else + { + gs_optionNames[idx] = name; + gs_optionValues[idx] = value; + } +} + +void wxSystemOptions::SetOption(const wxString& name, int value) +{ + SetOption(name, wxString::Format(wxT("%d"), value)); +} + +wxString wxSystemOptions::GetOption(const wxString& name) +{ + wxString val; + + int idx = gs_optionNames.Index(name, false); + if ( idx != wxNOT_FOUND ) + { + val = gs_optionValues[idx]; + } + else // not set explicitly + { + // look in the environment: first for a variable named "wx_appname_name" + // which can be set to affect the behaviour or just this application + // and then for "wx_name" which can be set to change the option globally + wxString var(name); + var.Replace(wxT("."), wxT("_")); // '.'s not allowed in env var names + var.Replace(wxT("-"), wxT("_")); // and neither are '-'s + + wxString appname; + if ( wxTheApp ) + appname = wxTheApp->GetAppName(); + + if ( !appname.empty() ) + val = wxGetenv(wxT("wx_") + appname + wxT('_') + var); + + if ( val.empty() ) + val = wxGetenv(wxT("wx_") + var); + } + + return val; +} + +int wxSystemOptions::GetOptionInt(const wxString& name) +{ + return wxAtoi (GetOption(name)); +} + +bool wxSystemOptions::HasOption(const wxString& name) +{ + return !GetOption(name).empty(); +} + +#endif // wxUSE_SYSTEM_OPTIONS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/tarstrm.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/tarstrm.cpp new file mode 100644 index 0000000000..ef74c3d8ef --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/tarstrm.cpp @@ -0,0 +1,1546 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/tarstrm.cpp +// Purpose: Streams for Tar files +// Author: Mike Wetherell +// Copyright: (c) 2004 Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TARSTREAM + +#include "wx/tarstrm.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" +#endif + +#include "wx/buffer.h" +#include "wx/datetime.h" +#include "wx/scopedptr.h" +#include "wx/filename.h" +#include "wx/thread.h" + +#include + +#ifdef __UNIX__ +#include +#include +#endif + + +///////////////////////////////////////////////////////////////////////////// +// constants + +enum { + TAR_NAME, + TAR_MODE, + TAR_UID, + TAR_GID, + TAR_SIZE, + TAR_MTIME, + TAR_CHKSUM, + TAR_TYPEFLAG, + TAR_LINKNAME, + TAR_MAGIC, + TAR_VERSION, + TAR_UNAME, + TAR_GNAME, + TAR_DEVMAJOR, + TAR_DEVMINOR, + TAR_PREFIX, + TAR_UNUSED, + TAR_NUMFIELDS +}; + +enum { + TAR_BLOCKSIZE = 512 +}; + +// checksum type +enum { + SUM_UNKNOWN, + SUM_UNSIGNED, + SUM_SIGNED +}; + +// type of input tar +enum { + TYPE_OLDTAR, // fields after TAR_LINKNAME are invalid + TYPE_GNUTAR, // all fields except TAR_PREFIX are valid + TYPE_USTAR // all fields are valid +}; + +// signatures +static const char *USTAR_MAGIC = "ustar"; +static const char *USTAR_VERSION = "00"; +static const char *GNU_MAGIC = "ustar "; +static const char *GNU_VERION = " "; + +IMPLEMENT_DYNAMIC_CLASS(wxTarEntry, wxArchiveEntry) +IMPLEMENT_DYNAMIC_CLASS(wxTarClassFactory, wxArchiveClassFactory) + + +///////////////////////////////////////////////////////////////////////////// +// Class factory + +static wxTarClassFactory g_wxTarClassFactory; + +wxTarClassFactory::wxTarClassFactory() +{ + if (this == &g_wxTarClassFactory) + PushFront(); +} + +const wxChar * const * +wxTarClassFactory::GetProtocols(wxStreamProtocolType type) const +{ + static const wxChar *protocols[] = { wxT("tar"), NULL }; + static const wxChar *mimetypes[] = { wxT("application/x-tar"), NULL }; + static const wxChar *fileexts[] = { wxT(".tar"), NULL }; + static const wxChar *empty[] = { NULL }; + + switch (type) { + case wxSTREAM_PROTOCOL: return protocols; + case wxSTREAM_MIMETYPE: return mimetypes; + case wxSTREAM_FILEEXT: return fileexts; + default: return empty; + } +} + + +///////////////////////////////////////////////////////////////////////////// +// tar header block + +typedef wxFileOffset wxTarNumber; + +struct wxTarField { const wxChar *name; int pos; }; + +class wxTarHeaderBlock +{ +public: + wxTarHeaderBlock() + { memset(data, 0, sizeof(data)); } + wxTarHeaderBlock(const wxTarHeaderBlock& hb) + { memcpy(data, hb.data, sizeof(data)); } + + bool Read(wxInputStream& in); + bool Write(wxOutputStream& out); + inline bool WriteField(wxOutputStream& out, int id); + + bool IsAllZeros() const; + wxUint32 Sum(bool SignedSum = false); + wxUint32 SumField(int id); + + char *Get(int id) { return data + fields[id].pos + id; } + static size_t Len(int id) { return fields[id + 1].pos - fields[id].pos; } + static const wxChar *Name(int id) { return fields[id].name; } + static size_t Offset(int id) { return fields[id].pos; } + + bool SetOctal(int id, wxTarNumber n); + wxTarNumber GetOctal(int id); + bool SetPath(const wxString& name, wxMBConv& conv); + +private: + char data[TAR_BLOCKSIZE + TAR_NUMFIELDS]; + static const wxTarField fields[]; + static void check(); +}; + +wxDEFINE_SCOPED_PTR_TYPE(wxTarHeaderBlock) + +// A table giving the field names and offsets in a tar header block +const wxTarField wxTarHeaderBlock::fields[] = +{ + { wxT("name"), 0 }, // 100 + { wxT("mode"), 100 }, // 8 + { wxT("uid"), 108 }, // 8 + { wxT("gid"), 116 }, // 8 + { wxT("size"), 124 }, // 12 + { wxT("mtime"), 136 }, // 12 + { wxT("chksum"), 148 }, // 8 + { wxT("typeflag"), 156 }, // 1 + { wxT("linkname"), 157 }, // 100 + { wxT("magic"), 257 }, // 6 + { wxT("version"), 263 }, // 2 + { wxT("uname"), 265 }, // 32 + { wxT("gname"), 297 }, // 32 + { wxT("devmajor"), 329 }, // 8 + { wxT("devminor"), 337 }, // 8 + { wxT("prefix"), 345 }, // 155 + { wxT("unused"), 500 }, // 12 + { NULL, TAR_BLOCKSIZE } +}; + +void wxTarHeaderBlock::check() +{ +#if 0 + wxCOMPILE_TIME_ASSERT( + WXSIZEOF(fields) == TAR_NUMFIELDS + 1, + Wrong_number_of_elements_in_fields_table + ); +#endif +} + +bool wxTarHeaderBlock::IsAllZeros() const +{ + const char *p = data; + for (size_t i = 0; i < sizeof(data); i++) + if (p[i]) + return false; + return true; +} + +wxUint32 wxTarHeaderBlock::Sum(bool SignedSum /*=false*/) +{ + // the chksum field itself should be blanks during the calculation + memset(Get(TAR_CHKSUM), ' ', Len(TAR_CHKSUM)); + const char *p = data; + wxUint32 n = 0; + + if (SignedSum) + for (size_t i = 0; i < sizeof(data); i++) + n += (signed char)p[i]; + else + for (size_t i = 0; i < sizeof(data); i++) + n += (unsigned char)p[i]; + + return n; +} + +wxUint32 wxTarHeaderBlock::SumField(int id) +{ + unsigned char *p = (unsigned char*)Get(id); + unsigned char *q = p + Len(id); + wxUint32 n = 0; + + while (p < q) + n += *p++; + + return n; +} + +bool wxTarHeaderBlock::Read(wxInputStream& in) +{ + bool ok = true; + + for (int id = 0; id < TAR_NUMFIELDS && ok; id++) + ok = in.Read(Get(id), Len(id)).LastRead() == Len(id); + + return ok; +} + +bool wxTarHeaderBlock::Write(wxOutputStream& out) +{ + bool ok = true; + + for (int id = 0; id < TAR_NUMFIELDS && ok; id++) + ok = WriteField(out, id); + + return ok; +} + +inline bool wxTarHeaderBlock::WriteField(wxOutputStream& out, int id) +{ + return out.Write(Get(id), Len(id)).LastWrite() == Len(id); +} + +wxTarNumber wxTarHeaderBlock::GetOctal(int id) +{ + wxTarNumber n = 0; + const char *p = Get(id); + while (*p == ' ') + p++; + while (*p >= '0' && *p < '8') + n = (n << 3) | (*p++ - '0'); + return n; +} + +bool wxTarHeaderBlock::SetOctal(int id, wxTarNumber n) +{ + // set an octal field, return true if the number fits + char *field = Get(id); + char *p = field + Len(id); + *--p = 0; + while (p > field) { + *--p = char('0' + (n & 7)); + n >>= 3; + } + return n == 0; +} + +bool wxTarHeaderBlock::SetPath(const wxString& name, wxMBConv& conv) +{ + bool badconv = false; + +#if wxUSE_UNICODE + wxCharBuffer nameBuf = name.mb_str(conv); + + // if the conversion fails make an approximation + if (!nameBuf) { + badconv = true; + size_t len = name.length(); + wxCharBuffer approx(len); + for (size_t i = 0; i < len; i++) + { + wxChar c = name[i]; + approx.data()[i] = c & ~0x7F ? '_' : c; + } + nameBuf = approx; + } + + const char *mbName = nameBuf; +#else + const char *mbName = name.c_str(); + (void)conv; +#endif + + bool fits; + bool notGoingToFit = false; + size_t len = strlen(mbName); + size_t maxname = Len(TAR_NAME); + size_t maxprefix = Len(TAR_PREFIX); + size_t i = 0; + size_t nexti = 0; + + for (;;) { + fits = i < maxprefix && len - i <= maxname; + + if (!fits) { + const char *p = strchr(mbName + i, '/'); + if (p) + nexti = p - mbName + 1; + if (!p || nexti - 1 > maxprefix) + notGoingToFit = true; + } + + if (fits || notGoingToFit) { + strncpy(Get(TAR_NAME), mbName + i, maxname); + if (i > 0) + strncpy(Get(TAR_PREFIX), mbName, i - 1); + break; + } + + i = nexti; + } + + return fits && !badconv; +} + + +///////////////////////////////////////////////////////////////////////////// +// Some helpers + +static wxFileOffset RoundUpSize(wxFileOffset size, int factor = 1) +{ + wxFileOffset chunk = TAR_BLOCKSIZE * factor; + return ((size + chunk - 1) / chunk) * chunk; +} + +#ifdef __UNIX__ + +static wxString wxTarUserName(int uid) +{ + struct passwd *ppw; + +#ifdef HAVE_GETPWUID_R +#if defined HAVE_SYSCONF && defined _SC_GETPW_R_SIZE_MAX + long pwsize = sysconf(_SC_GETPW_R_SIZE_MAX); + size_t bufsize(wxMin(wxMax(1024l, pwsize), 32768l)); +#else + size_t bufsize = 1024; +#endif + wxCharBuffer buf(bufsize); + struct passwd pw; + + memset(&pw, 0, sizeof(pw)); + if (getpwuid_r(uid, &pw, buf.data(), bufsize, &ppw) == 0 && pw.pw_name) + return wxString(pw.pw_name, wxConvLibc); +#else + if ((ppw = getpwuid(uid)) != NULL) + return wxString(ppw->pw_name, wxConvLibc); +#endif + return _("unknown"); +} + +static wxString wxTarGroupName(int gid) +{ + struct group *pgr; +#ifdef HAVE_GETGRGID_R +#if defined HAVE_SYSCONF && defined _SC_GETGR_R_SIZE_MAX + long grsize = sysconf(_SC_GETGR_R_SIZE_MAX); + size_t bufsize(wxMin(wxMax(1024l, grsize), 32768l)); +#else + size_t bufsize = 1024; +#endif + wxCharBuffer buf(bufsize); + struct group gr; + + memset(&gr, 0, sizeof(gr)); + if (getgrgid_r(gid, &gr, buf.data(), bufsize, &pgr) == 0 && gr.gr_name) + return wxString(gr.gr_name, wxConvLibc); +#else + if ((pgr = getgrgid(gid)) != NULL) + return wxString(pgr->gr_name, wxConvLibc); +#endif + return _("unknown"); +} + +#endif // __UNIX__ + +// Cache the user and group names since getting them can be expensive, +// get both names and ids at the same time. +// +struct wxTarUser +{ + wxTarUser(); + ~wxTarUser() { delete [] uname; delete [] gname; } + + int uid; + int gid; + + wxChar *uname; + wxChar *gname; +}; + +wxTarUser::wxTarUser() +{ +#ifdef __UNIX__ + uid = getuid(); + gid = getgid(); + wxString usr = wxTarUserName(uid); + wxString grp = wxTarGroupName(gid); +#else + uid = 0; + gid = 0; + wxString usr = wxGetUserId(); + wxString grp = _("unknown"); +#endif + + uname = new wxChar[usr.length() + 1]; + wxStrcpy(uname, usr.c_str()); + + gname = new wxChar[grp.length() + 1]; + wxStrcpy(gname, grp.c_str()); +} + +static const wxTarUser& wxGetTarUser() +{ +#if wxUSE_THREADS + static wxCriticalSection cs; + wxCriticalSectionLocker lock(cs); +#endif + static wxTarUser tu; + return tu; +} + +// ignore the size field for entry types 3, 4, 5 and 6 +// +static inline wxFileOffset GetDataSize(const wxTarEntry& entry) +{ + switch (entry.GetTypeFlag()) { + case wxTAR_CHRTYPE: + case wxTAR_BLKTYPE: + case wxTAR_DIRTYPE: + case wxTAR_FIFOTYPE: + return 0; + default: + return entry.GetSize(); + } +} + + +///////////////////////////////////////////////////////////////////////////// +// Tar Entry +// Holds all the meta-data for a file in the tar + +wxTarEntry::wxTarEntry(const wxString& name /*=wxEmptyString*/, + const wxDateTime& dt /*=wxDateTime::Now()*/, + wxFileOffset size /*=0*/) + : m_Mode(0644), + m_IsModeSet(false), + m_UserId(wxGetTarUser().uid), + m_GroupId(wxGetTarUser().gid), + m_Size(size), + m_Offset(wxInvalidOffset), + m_ModifyTime(dt), + m_TypeFlag(wxTAR_REGTYPE), + m_UserName(wxGetTarUser().uname), + m_GroupName(wxGetTarUser().gname), + m_DevMajor(~0), + m_DevMinor(~0) +{ + if (!name.empty()) + SetName(name); +} + +wxTarEntry::~wxTarEntry() +{ +} + +wxTarEntry::wxTarEntry(const wxTarEntry& e) + : wxArchiveEntry(), + m_Name(e.m_Name), + m_Mode(e.m_Mode), + m_IsModeSet(e.m_IsModeSet), + m_UserId(e.m_UserId), + m_GroupId(e.m_GroupId), + m_Size(e.m_Size), + m_Offset(e.m_Offset), + m_ModifyTime(e.m_ModifyTime), + m_AccessTime(e.m_AccessTime), + m_CreateTime(e.m_CreateTime), + m_TypeFlag(e.m_TypeFlag), + m_LinkName(e.m_LinkName), + m_UserName(e.m_UserName), + m_GroupName(e.m_GroupName), + m_DevMajor(e.m_DevMajor), + m_DevMinor(e.m_DevMinor) +{ +} + +wxTarEntry& wxTarEntry::operator=(const wxTarEntry& e) +{ + if (&e != this) { + m_Name = e.m_Name; + m_Mode = e.m_Mode; + m_IsModeSet = e.m_IsModeSet; + m_UserId = e.m_UserId; + m_GroupId = e.m_GroupId; + m_Size = e.m_Size; + m_Offset = e.m_Offset; + m_ModifyTime = e.m_ModifyTime; + m_AccessTime = e.m_AccessTime; + m_CreateTime = e.m_CreateTime; + m_TypeFlag = e.m_TypeFlag; + m_LinkName = e.m_LinkName; + m_UserName = e.m_UserName; + m_GroupName = e.m_GroupName; + m_DevMajor = e.m_DevMajor; + m_DevMinor = e.m_DevMinor; + } + return *this; +} + +wxString wxTarEntry::GetName(wxPathFormat format /*=wxPATH_NATIVE*/) const +{ + bool isDir = IsDir() && !m_Name.empty(); + + // optimisations for common (and easy) cases + switch (wxFileName::GetFormat(format)) { + case wxPATH_DOS: + { + wxString name(isDir ? m_Name + wxT("\\") : m_Name); + for (size_t i = 0; i < name.length(); i++) + if (name[i] == wxT('/')) + name[i] = wxT('\\'); + return name; + } + + case wxPATH_UNIX: + return isDir ? m_Name + wxT("/") : m_Name; + + default: + ; + } + + wxFileName fn; + + if (isDir) + fn.AssignDir(m_Name, wxPATH_UNIX); + else + fn.Assign(m_Name, wxPATH_UNIX); + + return fn.GetFullPath(format); +} + +void wxTarEntry::SetName(const wxString& name, wxPathFormat format) +{ + bool isDir; + m_Name = GetInternalName(name, format, &isDir); + SetIsDir(isDir); +} + +// Static - Internally tars and zips use forward slashes for the path +// separator, absolute paths aren't allowed, and directory names have a +// trailing slash. This function converts a path into this internal format, +// but without a trailing slash for a directory. +// +wxString wxTarEntry::GetInternalName(const wxString& name, + wxPathFormat format /*=wxPATH_NATIVE*/, + bool *pIsDir /*=NULL*/) +{ + wxString internal; + + if (wxFileName::GetFormat(format) != wxPATH_UNIX) + internal = wxFileName(name, format).GetFullPath(wxPATH_UNIX); + else + internal = name; + + bool isDir = !internal.empty() && internal.Last() == '/'; + if (pIsDir) + *pIsDir = isDir; + if (isDir) + internal.erase(internal.length() - 1); + + while (!internal.empty() && *internal.begin() == '/') + internal.erase(0, 1); + while (!internal.empty() && internal.compare(0, 2, wxT("./")) == 0) + internal.erase(0, 2); + if (internal == wxT(".") || internal == wxT("..")) + internal = wxEmptyString; + + return internal; +} + +bool wxTarEntry::IsDir() const +{ + return m_TypeFlag == wxTAR_DIRTYPE; +} + +void wxTarEntry::SetIsDir(bool isDir) +{ + if (isDir) + m_TypeFlag = wxTAR_DIRTYPE; + else if (m_TypeFlag == wxTAR_DIRTYPE) + m_TypeFlag = wxTAR_REGTYPE; +} + +void wxTarEntry::SetIsReadOnly(bool isReadOnly) +{ + if (isReadOnly) + m_Mode &= ~0222; + else + m_Mode |= 0200; +} + +int wxTarEntry::GetMode() const +{ + if (m_IsModeSet || !IsDir()) + return m_Mode; + else + return m_Mode | 0111; + +} + +void wxTarEntry::SetMode(int mode) +{ + m_Mode = mode & 07777; + m_IsModeSet = true; +} + + +///////////////////////////////////////////////////////////////////////////// +// Input stream + +wxDECLARE_SCOPED_PTR(wxTarEntry, wxTarEntryPtr_) +wxDEFINE_SCOPED_PTR (wxTarEntry, wxTarEntryPtr_) + +wxTarInputStream::wxTarInputStream(wxInputStream& stream, + wxMBConv& conv /*=wxConvLocal*/) + : wxArchiveInputStream(stream, conv) +{ + Init(); +} + +wxTarInputStream::wxTarInputStream(wxInputStream *stream, + wxMBConv& conv /*=wxConvLocal*/) + : wxArchiveInputStream(stream, conv) +{ + Init(); +} + +void wxTarInputStream::Init() +{ + m_pos = wxInvalidOffset; + m_offset = 0; + m_size = wxInvalidOffset; + m_sumType = SUM_UNKNOWN; + m_tarType = TYPE_USTAR; + m_hdr = new wxTarHeaderBlock; + m_HeaderRecs = NULL; + m_GlobalHeaderRecs = NULL; + m_lasterror = m_parent_i_stream->GetLastError(); +} + +wxTarInputStream::~wxTarInputStream() +{ + delete m_hdr; + delete m_HeaderRecs; + delete m_GlobalHeaderRecs; +} + +wxTarEntry *wxTarInputStream::GetNextEntry() +{ + m_lasterror = ReadHeaders(); + + if (!IsOk()) + return NULL; + + wxTarEntryPtr_ entry(new wxTarEntry); + + entry->SetMode(GetHeaderNumber(TAR_MODE)); + entry->SetUserId(GetHeaderNumber(TAR_UID)); + entry->SetGroupId(GetHeaderNumber(TAR_UID)); + entry->SetSize(GetHeaderNumber(TAR_SIZE)); + + entry->SetOffset(m_offset); + + entry->SetDateTime(GetHeaderDate(wxT("mtime"))); + entry->SetAccessTime(GetHeaderDate(wxT("atime"))); + entry->SetCreateTime(GetHeaderDate(wxT("ctime"))); + + entry->SetTypeFlag(*m_hdr->Get(TAR_TYPEFLAG)); + bool isDir = entry->IsDir(); + + entry->SetLinkName(GetHeaderString(TAR_LINKNAME)); + + if (m_tarType != TYPE_OLDTAR) { + entry->SetUserName(GetHeaderString(TAR_UNAME)); + entry->SetGroupName(GetHeaderString(TAR_GNAME)); + + entry->SetDevMajor(GetHeaderNumber(TAR_DEVMAJOR)); + entry->SetDevMinor(GetHeaderNumber(TAR_DEVMINOR)); + } + + entry->SetName(GetHeaderPath(), wxPATH_UNIX); + if (isDir) + entry->SetIsDir(); + + if (m_HeaderRecs) + m_HeaderRecs->clear(); + + m_size = GetDataSize(*entry); + m_pos = 0; + + return entry.release(); +} + +bool wxTarInputStream::OpenEntry(wxTarEntry& entry) +{ + wxFileOffset offset = entry.GetOffset(); + + if (GetLastError() != wxSTREAM_READ_ERROR + && m_parent_i_stream->IsSeekable() + && m_parent_i_stream->SeekI(offset) == offset) + { + m_offset = offset; + m_size = GetDataSize(entry); + m_pos = 0; + m_lasterror = wxSTREAM_NO_ERROR; + return true; + } else { + m_lasterror = wxSTREAM_READ_ERROR; + return false; + } +} + +bool wxTarInputStream::OpenEntry(wxArchiveEntry& entry) +{ + wxTarEntry *tarEntry = wxStaticCast(&entry, wxTarEntry); + return tarEntry ? OpenEntry(*tarEntry) : false; +} + +bool wxTarInputStream::CloseEntry() +{ + if (m_lasterror == wxSTREAM_READ_ERROR) + return false; + if (!IsOpened()) + return true; + + wxFileOffset size = RoundUpSize(m_size); + wxFileOffset remainder = size - m_pos; + + if (remainder && m_parent_i_stream->IsSeekable()) { + wxLogNull nolog; + if (m_parent_i_stream->SeekI(remainder, wxFromCurrent) + != wxInvalidOffset) + remainder = 0; + } + + if (remainder) { + const int BUFSIZE = 8192; + wxCharBuffer buf(BUFSIZE); + + while (remainder > 0 && m_parent_i_stream->IsOk()) + remainder -= m_parent_i_stream->Read( + buf.data(), wxMin(BUFSIZE, remainder)).LastRead(); + } + + m_pos = wxInvalidOffset; + m_offset += size; + m_lasterror = m_parent_i_stream->GetLastError(); + + return IsOk(); +} + +wxStreamError wxTarInputStream::ReadHeaders() +{ + if (!CloseEntry()) + return wxSTREAM_READ_ERROR; + + bool done = false; + + while (!done) { + m_hdr->Read(*m_parent_i_stream); + if (m_parent_i_stream->Eof()) + { + wxLogError(_("incomplete header block in tar")); + } + if (!*m_parent_i_stream) + return wxSTREAM_READ_ERROR; + m_offset += TAR_BLOCKSIZE; + + // an all-zero header marks the end of the tar + if (m_hdr->IsAllZeros()) + return wxSTREAM_EOF; + + // the checksum is supposed to be the unsigned sum of the header bytes, + // but there have been versions of tar that used the signed sum, so + // accept that too, but only if used throughout. + wxUint32 chksum = m_hdr->GetOctal(TAR_CHKSUM); + bool ok = false; + + if (m_sumType != SUM_SIGNED) { + ok = chksum == m_hdr->Sum(); + if (m_sumType == SUM_UNKNOWN) + m_sumType = ok ? SUM_UNSIGNED : SUM_SIGNED; + } + if (m_sumType == SUM_SIGNED) + ok = chksum == m_hdr->Sum(true); + if (!ok) { + wxLogError(_("checksum failure reading tar header block")); + return wxSTREAM_READ_ERROR; + } + + if (strcmp(m_hdr->Get(TAR_MAGIC), USTAR_MAGIC) == 0) + m_tarType = TYPE_USTAR; + else if (strcmp(m_hdr->Get(TAR_MAGIC), GNU_MAGIC) == 0 && + strcmp(m_hdr->Get(TAR_VERSION), GNU_VERION) == 0) + m_tarType = TYPE_GNUTAR; + else + m_tarType = TYPE_OLDTAR; + + if (m_tarType != TYPE_USTAR) + break; + + switch (*m_hdr->Get(TAR_TYPEFLAG)) { + case 'g': ReadExtendedHeader(m_GlobalHeaderRecs); break; + case 'x': ReadExtendedHeader(m_HeaderRecs); break; + default: done = true; + } + } + + return wxSTREAM_NO_ERROR; +} + +wxString wxTarInputStream::GetExtendedHeader(const wxString& key) const +{ + wxTarHeaderRecords::iterator it; + + // look at normal extended header records first + if (m_HeaderRecs) { + it = m_HeaderRecs->find(key); + if (it != m_HeaderRecs->end()) + return wxString(it->second.wc_str(wxConvUTF8), GetConv()); + } + + // if not found, look at the global header records + if (m_GlobalHeaderRecs) { + it = m_GlobalHeaderRecs->find(key); + if (it != m_GlobalHeaderRecs->end()) + return wxString(it->second.wc_str(wxConvUTF8), GetConv()); + } + + return wxEmptyString; +} + +wxString wxTarInputStream::GetHeaderPath() const +{ + wxString path; + + if ((path = GetExtendedHeader(wxT("path"))) != wxEmptyString) + return path; + + path = wxString(m_hdr->Get(TAR_NAME), GetConv()); + if (m_tarType != TYPE_USTAR) + return path; + + const char *prefix = m_hdr->Get(TAR_PREFIX); + return *prefix ? wxString(prefix, GetConv()) + wxT("/") + path : path; +} + +wxDateTime wxTarInputStream::GetHeaderDate(const wxString& key) const +{ + wxString value; + + // try extended header, stored as decimal seconds since the epoch + if ((value = GetExtendedHeader(key)) != wxEmptyString) { + wxLongLong ll; + ll.Assign(wxAtof(value) * 1000.0); + return ll; + } + + if (key == wxT("mtime")) + return wxLongLong(m_hdr->GetOctal(TAR_MTIME)) * 1000L; + + return wxDateTime(); +} + +wxTarNumber wxTarInputStream::GetHeaderNumber(int id) const +{ + wxString value; + + if ((value = GetExtendedHeader(m_hdr->Name(id))) != wxEmptyString) { + wxTarNumber n = 0; + wxString::const_iterator p = value.begin(); + while (p != value.end() && *p == ' ') + p++; + while (isdigit(*p)) + n = n * 10 + (*p++ - '0'); + return n; + } else { + return m_hdr->GetOctal(id); + } +} + +wxString wxTarInputStream::GetHeaderString(int id) const +{ + wxString value; + + if ((value = GetExtendedHeader(m_hdr->Name(id))) != wxEmptyString) + return value; + + return wxString(m_hdr->Get(id), GetConv()); +} + +// An extended header consists of one or more records, each constructed: +// "%d %s=%s\n", , , +// is the byte length, and are UTF-8 + +bool wxTarInputStream::ReadExtendedHeader(wxTarHeaderRecords*& recs) +{ + if (!recs) + recs = new wxTarHeaderRecords; + + // round length up to a whole number of blocks + size_t len = m_hdr->GetOctal(TAR_SIZE); + size_t size = RoundUpSize(len); + + // read in the whole header since it should be small + wxCharBuffer buf(size); + size_t lastread = m_parent_i_stream->Read(buf.data(), size).LastRead(); + if (lastread < len) + len = lastread; + buf.data()[len] = 0; + m_offset += lastread; + + size_t recPos, recSize; + bool ok = true; + + for (recPos = 0; recPos < len && ok; recPos += recSize) { + char *pRec = buf.data() + recPos; + char *p = pRec; + + // read the record size (byte count in ascii decimal) + recSize = 0; + while (isdigit((unsigned char) *p)) + recSize = recSize * 10 + *p++ - '0'; + + // validity checks + if (recPos + recSize > len) + break; + if (recSize < p - pRec + (size_t)3 || *p != ' ' + || pRec[recSize - 1] != '\012') { + ok = false; + continue; + } + + // replace the final '\n' with a nul, to terminate value + pRec[recSize - 1] = 0; + // the key is here, following the space + char *pKey = ++p; + + // look forward for the '=', the value follows + while (*p && *p != '=') + p++; + if (!*p) { + ok = false; + continue; + } + // replace the '=' with a nul, to terminate the key + *p++ = 0; + + wxString key(wxConvUTF8.cMB2WC(pKey), GetConv()); + wxString value(wxConvUTF8.cMB2WC(p), GetConv()); + + // an empty value unsets a previously given value + if (value.empty()) + recs->erase(key); + else + (*recs)[key] = value; + } + + if (!ok || recPos < len || size != lastread) { + wxLogWarning(_("invalid data in extended tar header")); + return false; + } + + return true; +} + +wxFileOffset wxTarInputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) +{ + if (!IsOpened()) { + wxLogError(_("tar entry not open")); + m_lasterror = wxSTREAM_READ_ERROR; + } + if (!IsOk()) + return wxInvalidOffset; + + switch (mode) { + case wxFromStart: break; + case wxFromCurrent: pos += m_pos; break; + case wxFromEnd: pos += m_size; break; + } + + if (pos < 0 || m_parent_i_stream->SeekI(m_offset + pos) == wxInvalidOffset) + return wxInvalidOffset; + + m_pos = pos; + return m_pos; +} + +size_t wxTarInputStream::OnSysRead(void *buffer, size_t size) +{ + if (!IsOpened()) { + wxLogError(_("tar entry not open")); + m_lasterror = wxSTREAM_READ_ERROR; + } + if (!IsOk() || !size) + return 0; + + if (m_pos >= m_size) + size = 0; + else if (m_pos + size > m_size + (size_t)0) + size = m_size - m_pos; + + size_t lastread = m_parent_i_stream->Read(buffer, size).LastRead(); + m_pos += lastread; + + if (m_pos >= m_size) { + m_lasterror = wxSTREAM_EOF; + } else if (!m_parent_i_stream->IsOk()) { + // any other error will have been reported by the underlying stream + if (m_parent_i_stream->Eof()) + { + wxLogError(_("unexpected end of file")); + } + m_lasterror = wxSTREAM_READ_ERROR; + } + + return lastread; +} + + +///////////////////////////////////////////////////////////////////////////// +// Output stream + +wxTarOutputStream::wxTarOutputStream(wxOutputStream& stream, + wxTarFormat format /*=wxTAR_PAX*/, + wxMBConv& conv /*=wxConvLocal*/) + : wxArchiveOutputStream(stream, conv) +{ + Init(format); +} + +wxTarOutputStream::wxTarOutputStream(wxOutputStream *stream, + wxTarFormat format /*=wxTAR_PAX*/, + wxMBConv& conv /*=wxConvLocal*/) + : wxArchiveOutputStream(stream, conv) +{ + Init(format); +} + +void wxTarOutputStream::Init(wxTarFormat format) +{ + m_pos = wxInvalidOffset; + m_maxpos = wxInvalidOffset; + m_size = wxInvalidOffset; + m_headpos = wxInvalidOffset; + m_datapos = wxInvalidOffset; + m_tarstart = wxInvalidOffset; + m_tarsize = 0; + m_pax = format == wxTAR_PAX; + m_BlockingFactor = m_pax ? 10 : 20; + m_chksum = 0; + m_large = false; + m_hdr = new wxTarHeaderBlock; + m_hdr2 = NULL; + m_extendedHdr = NULL; + m_extendedSize = 0; + m_lasterror = m_parent_o_stream->GetLastError(); + m_endrecWritten = false; +} + +wxTarOutputStream::~wxTarOutputStream() +{ + Close(); + delete m_hdr; + delete m_hdr2; + delete [] m_extendedHdr; +} + +bool wxTarOutputStream::PutNextEntry(wxTarEntry *entry) +{ + wxTarEntryPtr_ e(entry); + + if (!CloseEntry()) + return false; + + if (!m_tarsize) { + wxLogNull nolog; + m_tarstart = m_parent_o_stream->TellO(); + } + + if (m_tarstart != wxInvalidOffset) + m_headpos = m_tarstart + m_tarsize; + + if (WriteHeaders(*e)) { + m_pos = 0; + m_maxpos = 0; + m_size = GetDataSize(*e); + if (m_tarstart != wxInvalidOffset) + m_datapos = m_tarstart + m_tarsize; + + // types that are not allowd any data + const char nodata[] = { + wxTAR_LNKTYPE, wxTAR_SYMTYPE, wxTAR_CHRTYPE, wxTAR_BLKTYPE, + wxTAR_DIRTYPE, wxTAR_FIFOTYPE, 0 + }; + int typeflag = e->GetTypeFlag(); + + // pax does now allow data for wxTAR_LNKTYPE + if (!m_pax || typeflag != wxTAR_LNKTYPE) + if (strchr(nodata, typeflag) != NULL) + CloseEntry(); + } + + return IsOk(); +} + +bool wxTarOutputStream::PutNextEntry(const wxString& name, + const wxDateTime& dt, + wxFileOffset size) +{ + return PutNextEntry(new wxTarEntry(name, dt, size)); +} + +bool wxTarOutputStream::PutNextDirEntry(const wxString& name, + const wxDateTime& dt) +{ + wxTarEntry *entry = new wxTarEntry(name, dt); + entry->SetIsDir(); + return PutNextEntry(entry); +} + +bool wxTarOutputStream::PutNextEntry(wxArchiveEntry *entry) +{ + wxTarEntry *tarEntry = wxStaticCast(entry, wxTarEntry); + if (!tarEntry) + delete entry; + return PutNextEntry(tarEntry); +} + +bool wxTarOutputStream::CopyEntry(wxTarEntry *entry, + wxTarInputStream& inputStream) +{ + if (PutNextEntry(entry)) + Write(inputStream); + return IsOk() && inputStream.Eof(); +} + +bool wxTarOutputStream::CopyEntry(wxArchiveEntry *entry, + wxArchiveInputStream& inputStream) +{ + if (PutNextEntry(entry)) + Write(inputStream); + return IsOk() && inputStream.Eof(); +} + +bool wxTarOutputStream::CloseEntry() +{ + if (!IsOpened()) + return true; + + if (m_pos < m_maxpos) { + wxASSERT(m_parent_o_stream->IsSeekable()); + m_parent_o_stream->SeekO(m_datapos + m_maxpos); + m_lasterror = m_parent_o_stream->GetLastError(); + m_pos = m_maxpos; + } + + if (IsOk()) { + wxFileOffset size = RoundUpSize(m_pos); + if (size > m_pos) { + memset(m_hdr, 0, size - m_pos); + m_parent_o_stream->Write(m_hdr, size - m_pos); + m_lasterror = m_parent_o_stream->GetLastError(); + } + m_tarsize += size; + } + + if (IsOk() && m_pos != m_size) + ModifyHeader(); + + m_pos = wxInvalidOffset; + m_maxpos = wxInvalidOffset; + m_size = wxInvalidOffset; + m_headpos = wxInvalidOffset; + m_datapos = wxInvalidOffset; + + return IsOk(); +} + +bool wxTarOutputStream::Close() +{ + if (!CloseEntry() || (m_tarsize == 0 && m_endrecWritten)) + return false; + + memset(m_hdr, 0, sizeof(*m_hdr)); + int count = (RoundUpSize(m_tarsize + 2 * TAR_BLOCKSIZE, m_BlockingFactor) + - m_tarsize) / TAR_BLOCKSIZE; + while (count--) + m_parent_o_stream->Write(m_hdr, TAR_BLOCKSIZE); + + m_tarsize = 0; + m_tarstart = wxInvalidOffset; + m_lasterror = m_parent_o_stream->GetLastError(); + m_endrecWritten = true; + return IsOk(); +} + +bool wxTarOutputStream::WriteHeaders(wxTarEntry& entry) +{ + memset(m_hdr, 0, sizeof(*m_hdr)); + + SetHeaderPath(entry.GetName(wxPATH_UNIX)); + + SetHeaderNumber(TAR_MODE, entry.GetMode()); + SetHeaderNumber(TAR_UID, entry.GetUserId()); + SetHeaderNumber(TAR_GID, entry.GetGroupId()); + + if (entry.GetSize() == wxInvalidOffset) + entry.SetSize(0); + m_large = !SetHeaderNumber(TAR_SIZE, entry.GetSize()); + + SetHeaderDate(wxT("mtime"), entry.GetDateTime()); + if (entry.GetAccessTime().IsValid()) + SetHeaderDate(wxT("atime"), entry.GetAccessTime()); + if (entry.GetCreateTime().IsValid()) + SetHeaderDate(wxT("ctime"), entry.GetCreateTime()); + + *m_hdr->Get(TAR_TYPEFLAG) = char(entry.GetTypeFlag()); + + strcpy(m_hdr->Get(TAR_MAGIC), USTAR_MAGIC); + strcpy(m_hdr->Get(TAR_VERSION), USTAR_VERSION); + + SetHeaderString(TAR_LINKNAME, entry.GetLinkName()); + SetHeaderString(TAR_UNAME, entry.GetUserName()); + SetHeaderString(TAR_GNAME, entry.GetGroupName()); + + if (~entry.GetDevMajor()) + SetHeaderNumber(TAR_DEVMAJOR, entry.GetDevMajor()); + if (~entry.GetDevMinor()) + SetHeaderNumber(TAR_DEVMINOR, entry.GetDevMinor()); + + m_chksum = m_hdr->Sum(); + m_hdr->SetOctal(TAR_CHKSUM, m_chksum); + if (!m_large) + m_chksum -= m_hdr->SumField(TAR_SIZE); + + // The main header is now fully prepared so we know what extended headers + // (if any) will be needed. Output any extended headers before writing + // the main header. + if (m_extendedHdr && *m_extendedHdr) { + wxASSERT(m_pax); + // the extended headers are written to the tar as a file entry, + // so prepare a regular header block for the pseudo-file. + if (!m_hdr2) + m_hdr2 = new wxTarHeaderBlock; + memset(m_hdr2, 0, sizeof(*m_hdr2)); + + // an old tar that doesn't understand extended headers will + // extract it as a file, so give these fields reasonable values + // so that the user will have access to read and remove it. + m_hdr2->SetPath(PaxHeaderPath(wxT("%d/PaxHeaders.%p/%f"), + entry.GetName(wxPATH_UNIX)), GetConv()); + m_hdr2->SetOctal(TAR_MODE, 0600); + strcpy(m_hdr2->Get(TAR_UID), m_hdr->Get(TAR_UID)); + strcpy(m_hdr2->Get(TAR_GID), m_hdr->Get(TAR_GID)); + size_t length = strlen(m_extendedHdr); + m_hdr2->SetOctal(TAR_SIZE, length); + strcpy(m_hdr2->Get(TAR_MTIME), m_hdr->Get(TAR_MTIME)); + *m_hdr2->Get(TAR_TYPEFLAG) = 'x'; + strcpy(m_hdr2->Get(TAR_MAGIC), USTAR_MAGIC); + strcpy(m_hdr2->Get(TAR_VERSION), USTAR_VERSION); + strcpy(m_hdr2->Get(TAR_UNAME), m_hdr->Get(TAR_UNAME)); + strcpy(m_hdr2->Get(TAR_GNAME), m_hdr->Get(TAR_GNAME)); + + m_hdr2->SetOctal(TAR_CHKSUM, m_hdr2->Sum()); + + m_hdr2->Write(*m_parent_o_stream); + m_tarsize += TAR_BLOCKSIZE; + + size_t rounded = RoundUpSize(length); + memset(m_extendedHdr + length, 0, rounded - length); + m_parent_o_stream->Write(m_extendedHdr, rounded); + m_tarsize += rounded; + + *m_extendedHdr = 0; + + // update m_headpos which is used to seek back to fix up the file + // length if it is not known in advance + if (m_tarstart != wxInvalidOffset) + m_headpos = m_tarstart + m_tarsize; + } + + // if don't have extended headers just report error + if (!m_badfit.empty()) { + wxASSERT(!m_pax); + wxLogWarning(_("%s did not fit the tar header for entry '%s'"), + m_badfit.c_str(), entry.GetName().c_str()); + m_badfit.clear(); + } + + m_hdr->Write(*m_parent_o_stream); + m_tarsize += TAR_BLOCKSIZE; + m_lasterror = m_parent_o_stream->GetLastError(); + + return IsOk(); +} + +wxString wxTarOutputStream::PaxHeaderPath(const wxString& format, + const wxString& path) +{ + wxString d = path.BeforeLast(wxT('/')); + wxString f = path.AfterLast(wxT('/')); + wxString ret; + + if (d.empty()) + d = wxT("."); + + ret.reserve(format.length() + path.length() + 16); + + size_t begin = 0; + size_t end; + + for (;;) { + end = format.find('%', begin); + if (end == wxString::npos || end + 1 >= format.length()) + break; + ret << format.substr(begin, end - begin); + switch ( format[end + 1].GetValue() ) { + case 'd': ret << d; break; + case 'f': ret << f; break; + case 'p': ret << wxGetProcessId(); break; + case '%': ret << wxT("%"); break; + } + begin = end + 2; + } + + ret << format.substr(begin); + + return ret; +} + +bool wxTarOutputStream::ModifyHeader() +{ + wxFileOffset originalPos = wxInvalidOffset; + wxFileOffset sizePos = wxInvalidOffset; + + if (!m_large && m_headpos != wxInvalidOffset + && m_parent_o_stream->IsSeekable()) + { + wxLogNull nolog; + originalPos = m_parent_o_stream->TellO(); + if (originalPos != wxInvalidOffset) + sizePos = + m_parent_o_stream->SeekO(m_headpos + m_hdr->Offset(TAR_SIZE)); + } + + if (sizePos == wxInvalidOffset || !m_hdr->SetOctal(TAR_SIZE, m_pos)) { + wxLogError(_("incorrect size given for tar entry")); + m_lasterror = wxSTREAM_WRITE_ERROR; + return false; + } + + m_chksum += m_hdr->SumField(TAR_SIZE); + m_hdr->SetOctal(TAR_CHKSUM, m_chksum); + wxFileOffset sumPos = m_headpos + m_hdr->Offset(TAR_CHKSUM); + + return + m_hdr->WriteField(*m_parent_o_stream, TAR_SIZE) && + m_parent_o_stream->SeekO(sumPos) == sumPos && + m_hdr->WriteField(*m_parent_o_stream, TAR_CHKSUM) && + m_parent_o_stream->SeekO(originalPos) == originalPos; +} + +void wxTarOutputStream::SetHeaderPath(const wxString& name) +{ + if (!m_hdr->SetPath(name, GetConv()) || (m_pax && !name.IsAscii())) + SetExtendedHeader(wxT("path"), name); +} + +bool wxTarOutputStream::SetHeaderNumber(int id, wxTarNumber n) +{ + if (m_hdr->SetOctal(id, n)) { + return true; + } else { + SetExtendedHeader(m_hdr->Name(id), wxLongLong(n).ToString()); + return false; + } +} + +void wxTarOutputStream::SetHeaderString(int id, const wxString& str) +{ + strncpy(m_hdr->Get(id), str.mb_str(GetConv()), m_hdr->Len(id)); + if (str.length() > m_hdr->Len(id)) + SetExtendedHeader(m_hdr->Name(id), str); +} + +void wxTarOutputStream::SetHeaderDate(const wxString& key, + const wxDateTime& datetime) +{ + wxLongLong ll = datetime.IsValid() ? datetime.GetValue() : wxLongLong(0); + wxLongLong secs = ll / 1000L; + + if (key != wxT("mtime") + || !m_hdr->SetOctal(TAR_MTIME, wxTarNumber(secs.GetValue())) + || secs <= 0 || secs >= 0x7fffffff) + { + wxString str; + if (ll >= LONG_MIN && ll <= LONG_MAX) { + str.Printf(wxT("%g"), ll.ToLong() / 1000.0); + } else { + str = ll.ToString(); + str.insert(str.end() - 3, '.'); + } + SetExtendedHeader(key, str); + } +} + +void wxTarOutputStream::SetExtendedHeader(const wxString& key, + const wxString& value) +{ + if (m_pax) { +#if wxUSE_UNICODE + const wxCharBuffer utf_key = key.utf8_str(); + const wxCharBuffer utf_value = value.utf8_str(); +#else + const wxWX2WCbuf wide_key = key.wc_str(GetConv()); + const wxCharBuffer utf_key = wxConvUTF8.cWC2MB(wide_key); + + const wxWX2WCbuf wide_value = value.wc_str(GetConv()); + const wxCharBuffer utf_value = wxConvUTF8.cWC2MB(wide_value); +#endif // wxUSE_UNICODE/!wxUSE_UNICODE + + // a small buffer to format the length field in + char buf[32]; + // length of "99=\n" + unsigned long length = strlen(utf_value) + strlen(utf_key) + 5; + sprintf(buf, "%lu", length); + // the length includes itself + size_t lenlen = strlen(buf); + if (lenlen != 2) { + length += lenlen - 2; + sprintf(buf, "%lu", length); + if (strlen(buf) > lenlen) + sprintf(buf, "%lu", ++length); + } + + // reallocate m_extendedHdr if it's not big enough + if (m_extendedSize < length) { + size_t rounded = RoundUpSize(length); + m_extendedSize <<= 1; + if (rounded > m_extendedSize) + m_extendedSize = rounded; + char *oldHdr = m_extendedHdr; + m_extendedHdr = new char[m_extendedSize]; + if (oldHdr) { + strcpy(m_extendedHdr, oldHdr); + delete oldHdr; + } else { + *m_extendedHdr = 0; + } + } + + // append the new record + char *append = strchr(m_extendedHdr, 0); + sprintf(append, "%s %s=%s\012", buf, + (const char*)utf_key, (const char*)utf_value); + } + else { + // if not pax then make a list of fields to report as errors + if (!m_badfit.empty()) + m_badfit += wxT(", "); + m_badfit += key; + } +} + +void wxTarOutputStream::Sync() +{ + m_parent_o_stream->Sync(); +} + +wxFileOffset wxTarOutputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) +{ + if (!IsOpened()) { + wxLogError(_("tar entry not open")); + m_lasterror = wxSTREAM_WRITE_ERROR; + } + if (!IsOk() || m_datapos == wxInvalidOffset) + return wxInvalidOffset; + + switch (mode) { + case wxFromStart: break; + case wxFromCurrent: pos += m_pos; break; + case wxFromEnd: pos += m_maxpos; break; + } + + if (pos < 0 || m_parent_o_stream->SeekO(m_datapos + pos) == wxInvalidOffset) + return wxInvalidOffset; + + m_pos = pos; + return m_pos; +} + +size_t wxTarOutputStream::OnSysWrite(const void *buffer, size_t size) +{ + if (!IsOpened()) { + wxLogError(_("tar entry not open")); + m_lasterror = wxSTREAM_WRITE_ERROR; + } + if (!IsOk() || !size) + return 0; + + size_t lastwrite = m_parent_o_stream->Write(buffer, size).LastWrite(); + m_pos += lastwrite; + if (m_pos > m_maxpos) + m_maxpos = m_pos; + + if (lastwrite != size) + m_lasterror = wxSTREAM_WRITE_ERROR; + + return lastwrite; +} + +#endif // wxUSE_TARSTREAM diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/taskbarcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/taskbarcmn.cpp new file mode 100644 index 0000000000..54133a57df --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/taskbarcmn.cpp @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////// +// File: src/common/taskbarcmn.cpp +// Purpose: Common parts of wxTaskBarIcon class +// Author: Julian Smart +// Modified by: +// Created: 04/04/2003 +// Copyright: (c) Julian Smart, 2003 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TASKBARICON + +#include "wx/taskbar.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/list.h" + #include "wx/menu.h" +#endif + +extern WXDLLIMPEXP_DATA_CORE(wxList) wxPendingDelete; + +// DLL options compatibility check: +WX_CHECK_BUILD_OPTIONS("wxAdvanced") + +wxDEFINE_EVENT( wxEVT_TASKBAR_MOVE, wxTaskBarIconEvent ); +wxDEFINE_EVENT( wxEVT_TASKBAR_LEFT_DOWN, wxTaskBarIconEvent ); +wxDEFINE_EVENT( wxEVT_TASKBAR_LEFT_UP, wxTaskBarIconEvent ); +wxDEFINE_EVENT( wxEVT_TASKBAR_RIGHT_DOWN, wxTaskBarIconEvent ); +wxDEFINE_EVENT( wxEVT_TASKBAR_RIGHT_UP, wxTaskBarIconEvent ); +wxDEFINE_EVENT( wxEVT_TASKBAR_LEFT_DCLICK, wxTaskBarIconEvent ); +wxDEFINE_EVENT( wxEVT_TASKBAR_RIGHT_DCLICK, wxTaskBarIconEvent ); +wxDEFINE_EVENT( wxEVT_TASKBAR_BALLOON_TIMEOUT, wxTaskBarIconEvent ); +wxDEFINE_EVENT( wxEVT_TASKBAR_BALLOON_CLICK, wxTaskBarIconEvent ); + + +BEGIN_EVENT_TABLE(wxTaskBarIconBase, wxEvtHandler) + EVT_TASKBAR_CLICK(wxTaskBarIconBase::OnRightButtonDown) +END_EVENT_TABLE() + +void wxTaskBarIconBase::OnRightButtonDown(wxTaskBarIconEvent& WXUNUSED(event)) +{ + wxMenu *menu = CreatePopupMenu(); + if (menu) + { + PopupMenu(menu); + delete menu; + } +} + +void wxTaskBarIconBase::Destroy() +{ + wxPendingDelete.Append(this); +} + +#endif // wxUSE_TASKBARICON diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/tbarbase.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/tbarbase.cpp new file mode 100644 index 0000000000..e36d96eccf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/tbarbase.cpp @@ -0,0 +1,761 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/tbarbase.cpp +// Purpose: wxToolBarBase implementation +// Author: Julian Smart +// Modified by: VZ at 11.12.99 (wxScrollableToolBar split off) +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TOOLBAR + +#include "wx/toolbar.h" + +#ifndef WX_PRECOMP + #include "wx/control.h" + #include "wx/frame.h" + #include "wx/settings.h" + #if WXWIN_COMPATIBILITY_2_8 + #include "wx/image.h" + #endif // WXWIN_COMPATIBILITY_2_8 + #include "wx/menu.h" +#endif + +extern WXDLLEXPORT_DATA(const char) wxToolBarNameStr[] = "toolbar"; + +// ---------------------------------------------------------------------------- +// wxWidgets macros +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxToolBarBase, wxControl) +END_EVENT_TABLE() + +#include "wx/listimpl.cpp" + +WX_DEFINE_LIST(wxToolBarToolsList) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxToolBarToolBase +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxToolBarToolBase, wxObject) + +wxToolBarToolBase::~wxToolBarToolBase() +{ +#if wxUSE_MENUS + delete m_dropdownMenu; +#endif + + if ( IsControl() ) + GetControl()->Destroy(); +} + + +bool wxToolBarToolBase::Enable(bool enable) +{ + if ( m_enabled == enable ) + return false; + + m_enabled = enable; + + return true; +} + +bool wxToolBarToolBase::Toggle(bool toggle) +{ + wxASSERT_MSG( CanBeToggled(), wxT("can't toggle this tool") ); + + if ( m_toggled == toggle ) + return false; + + m_toggled = toggle; + + return true; +} + +bool wxToolBarToolBase::SetToggle(bool toggle) +{ + wxItemKind kind = toggle ? wxITEM_CHECK : wxITEM_NORMAL; + if ( m_kind == kind ) + return false; + + m_kind = kind; + + return true; +} + +bool wxToolBarToolBase::SetShortHelp(const wxString& help) +{ + if ( m_shortHelpString == help ) + return false; + + m_shortHelpString = help; + + return true; +} + +bool wxToolBarToolBase::SetLongHelp(const wxString& help) +{ + if ( m_longHelpString == help ) + return false; + + m_longHelpString = help; + + return true; +} + + +#if wxUSE_MENUS +void wxToolBarToolBase::SetDropdownMenu(wxMenu* menu) +{ + delete m_dropdownMenu; + m_dropdownMenu = menu; +} +#endif + + +// ---------------------------------------------------------------------------- +// wxToolBarBase adding/deleting items +// ---------------------------------------------------------------------------- + +wxToolBarBase::wxToolBarBase() +{ + // the list owns the pointers + m_xMargin = m_yMargin = 0; + m_maxRows = m_maxCols = 0; + m_toolPacking = m_toolSeparation = 0; + m_defaultWidth = 16; + m_defaultHeight = 15; +} + +void wxToolBarBase::FixupStyle() +{ + if ( !HasFlag(wxTB_TOP | wxTB_LEFT | wxTB_RIGHT | wxTB_BOTTOM) ) + { + // this is the default + m_windowStyle |= wxTB_TOP; + } +} + +wxToolBarToolBase *wxToolBarBase::DoAddTool(int toolid, + const wxString& label, + const wxBitmap& bitmap, + const wxBitmap& bmpDisabled, + wxItemKind kind, + const wxString& shortHelp, + const wxString& longHelp, + wxObject *clientData, + wxCoord WXUNUSED(xPos), + wxCoord WXUNUSED(yPos)) +{ + InvalidateBestSize(); + return InsertTool(GetToolsCount(), toolid, label, bitmap, bmpDisabled, + kind, shortHelp, longHelp, clientData); +} + +wxToolBarToolBase *wxToolBarBase::InsertTool(size_t pos, + int toolid, + const wxString& label, + const wxBitmap& bitmap, + const wxBitmap& bmpDisabled, + wxItemKind kind, + const wxString& shortHelp, + const wxString& longHelp, + wxObject *clientData) +{ + wxCHECK_MSG( pos <= GetToolsCount(), NULL, + wxT("invalid position in wxToolBar::InsertTool()") ); + + return DoInsertNewTool(pos, CreateTool(toolid, label, bitmap, bmpDisabled, kind, + clientData, shortHelp, longHelp)); +} + +wxToolBarToolBase *wxToolBarBase::AddTool(wxToolBarToolBase *tool) +{ + return InsertTool(GetToolsCount(), tool); +} + +wxToolBarToolBase * +wxToolBarBase::InsertTool(size_t pos, wxToolBarToolBase *tool) +{ + wxCHECK_MSG( pos <= GetToolsCount(), NULL, + wxT("invalid position in wxToolBar::InsertTool()") ); + + if ( !tool || !DoInsertTool(pos, tool) ) + { + return NULL; + } + + m_tools.Insert(pos, tool); + tool->Attach(this); + + return tool; +} + +wxToolBarToolBase * +wxToolBarBase::AddControl(wxControl *control, const wxString& label) +{ + return InsertControl(GetToolsCount(), control, label); +} + +wxToolBarToolBase * +wxToolBarBase::InsertControl(size_t pos, + wxControl *control, + const wxString& label) +{ + wxCHECK_MSG( control, NULL, + wxT("toolbar: can't insert NULL control") ); + + wxCHECK_MSG( control->GetParent() == this, NULL, + wxT("control must have toolbar as parent") ); + + return DoInsertNewTool(pos, CreateTool(control, label)); +} + +wxControl *wxToolBarBase::FindControl( int toolid ) +{ + for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); + node; + node = node->GetNext() ) + { + const wxToolBarToolBase * const tool = node->GetData(); + if ( tool->IsControl() ) + { + wxControl * const control = tool->GetControl(); + + if ( !control ) + { + wxFAIL_MSG( wxT("NULL control in toolbar?") ); + } + else if ( control->GetId() == toolid ) + { + // found + return control; + } + } + } + + return NULL; +} + +wxToolBarToolBase *wxToolBarBase::AddSeparator() +{ + return InsertSeparator(GetToolsCount()); +} + +wxToolBarToolBase *wxToolBarBase::InsertSeparator(size_t pos) +{ + return DoInsertNewTool(pos, CreateSeparator()); +} + +wxToolBarToolBase *wxToolBarBase::AddStretchableSpace() +{ + return InsertStretchableSpace(GetToolsCount()); +} + +wxToolBarToolBase *wxToolBarBase::InsertStretchableSpace(size_t pos) +{ + wxToolBarToolBase * const tool = CreateSeparator(); + if ( tool ) + { + // this is a hack but we know that all the current implementations + // don't really use the tool when it's created, they will do it + // InsertTool() at earliest and maybe even in Realize() much later + // + // so we can create the tool as a plain separator and mark it as being + // a stretchable space later + tool->MakeStretchable(); + } + + return DoInsertNewTool(pos, tool); +} + +wxToolBarToolBase *wxToolBarBase::RemoveTool(int toolid) +{ + size_t pos = 0; + wxToolBarToolsList::compatibility_iterator node; + for ( node = m_tools.GetFirst(); node; node = node->GetNext() ) + { + if ( node->GetData()->GetId() == toolid ) + break; + + pos++; + } + + if ( !node ) + { + // don't give any error messages - sometimes we might call RemoveTool() + // without knowing whether the tool is or not in the toolbar + return NULL; + } + + wxToolBarToolBase *tool = node->GetData(); + wxCHECK_MSG( tool, NULL, "NULL tool in the tools list?" ); + + if ( !DoDeleteTool(pos, tool) ) + return NULL; + + m_tools.Erase(node); + + tool->Detach(); + + return tool; +} + +bool wxToolBarBase::DeleteToolByPos(size_t pos) +{ + wxCHECK_MSG( pos < GetToolsCount(), false, + wxT("invalid position in wxToolBar::DeleteToolByPos()") ); + + wxToolBarToolsList::compatibility_iterator node = m_tools.Item(pos); + + if ( !DoDeleteTool(pos, node->GetData()) ) + { + return false; + } + + delete node->GetData(); + m_tools.Erase(node); + + return true; +} + +bool wxToolBarBase::DeleteTool(int toolid) +{ + size_t pos = 0; + wxToolBarToolsList::compatibility_iterator node; + for ( node = m_tools.GetFirst(); node; node = node->GetNext() ) + { + if ( node->GetData()->GetId() == toolid ) + break; + + pos++; + } + + if ( !node || !DoDeleteTool(pos, node->GetData()) ) + { + return false; + } + + delete node->GetData(); + m_tools.Erase(node); + + return true; +} + +wxToolBarToolBase *wxToolBarBase::FindById(int toolid) const +{ + wxToolBarToolBase *tool = NULL; + + for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); + node; + node = node->GetNext() ) + { + tool = node->GetData(); + if ( tool->GetId() == toolid ) + { + // found + break; + } + + tool = NULL; + } + + return tool; +} + +void wxToolBarBase::UnToggleRadioGroup(wxToolBarToolBase *tool) +{ + wxCHECK_RET( tool, wxT("NULL tool in wxToolBarTool::UnToggleRadioGroup") ); + + if ( !tool->IsButton() || tool->GetKind() != wxITEM_RADIO ) + return; + + wxToolBarToolsList::compatibility_iterator node = m_tools.Find(tool); + wxCHECK_RET( node, wxT("invalid tool in wxToolBarTool::UnToggleRadioGroup") ); + + wxToolBarToolsList::compatibility_iterator nodeNext = node->GetNext(); + while ( nodeNext ) + { + wxToolBarToolBase *toolNext = nodeNext->GetData(); + + if ( !toolNext->IsButton() || toolNext->GetKind() != wxITEM_RADIO ) + break; + + if ( toolNext->Toggle(false) ) + { + DoToggleTool(toolNext, false); + } + + nodeNext = nodeNext->GetNext(); + } + + wxToolBarToolsList::compatibility_iterator nodePrev = node->GetPrevious(); + while ( nodePrev ) + { + wxToolBarToolBase *toolNext = nodePrev->GetData(); + + if ( !toolNext->IsButton() || toolNext->GetKind() != wxITEM_RADIO ) + break; + + if ( toolNext->Toggle(false) ) + { + DoToggleTool(toolNext, false); + } + + nodePrev = nodePrev->GetPrevious(); + } +} + +void wxToolBarBase::ClearTools() +{ + while ( GetToolsCount() ) + { + DeleteToolByPos(0); + } +} + +void wxToolBarBase::AdjustToolBitmapSize() +{ + const wxSize sizeOrig(m_defaultWidth, m_defaultHeight); + + wxSize sizeActual(sizeOrig); + + for ( wxToolBarToolsList::const_iterator i = m_tools.begin(); + i != m_tools.end(); + ++i ) + { + const wxBitmap& bmp = (*i)->GetNormalBitmap(); + if ( bmp.IsOk() ) + sizeActual.IncTo(bmp.GetSize()); + } + + if ( sizeActual != sizeOrig ) + SetToolBitmapSize(sizeActual); +} + +bool wxToolBarBase::Realize() +{ + // check if we have anything to do + if ( m_tools.empty() ) + return false; + + // make sure tool size is large enough for all bitmaps to fit in + AdjustToolBitmapSize(); + + return true; +} + +wxToolBarBase::~wxToolBarBase() +{ + WX_CLEAR_LIST(wxToolBarToolsList, m_tools); + + // notify the frame that it doesn't have a tool bar any longer to avoid + // dangling pointers + wxFrame *frame = wxDynamicCast(GetParent(), wxFrame); + if ( frame && frame->GetToolBar() == this ) + { + frame->SetToolBar(NULL); + } +} + +// ---------------------------------------------------------------------------- +// wxToolBarBase tools state +// ---------------------------------------------------------------------------- + +void wxToolBarBase::EnableTool(int toolid, bool enable) +{ + wxToolBarToolBase *tool = FindById(toolid); + if ( tool ) + { + if ( tool->Enable(enable) ) + { + DoEnableTool(tool, enable); + } + } +} + +void wxToolBarBase::ToggleTool(int toolid, bool toggle) +{ + wxToolBarToolBase *tool = FindById(toolid); + if ( tool && tool->CanBeToggled() ) + { + if ( tool->Toggle(toggle) ) + { + UnToggleRadioGroup(tool); + DoToggleTool(tool, toggle); + } + } +} + +void wxToolBarBase::SetToggle(int toolid, bool toggle) +{ + wxToolBarToolBase *tool = FindById(toolid); + if ( tool ) + { + if ( tool->SetToggle(toggle) ) + { + DoSetToggle(tool, toggle); + } + } +} + +void wxToolBarBase::SetToolShortHelp(int toolid, const wxString& help) +{ + wxToolBarToolBase *tool = FindById(toolid); + if ( tool ) + { + (void)tool->SetShortHelp(help); + } +} + +void wxToolBarBase::SetToolLongHelp(int toolid, const wxString& help) +{ + wxToolBarToolBase *tool = FindById(toolid); + if ( tool ) + { + (void)tool->SetLongHelp(help); + } +} + +wxObject *wxToolBarBase::GetToolClientData(int toolid) const +{ + wxToolBarToolBase *tool = FindById(toolid); + + return tool ? tool->GetClientData() : NULL; +} + +void wxToolBarBase::SetToolClientData(int toolid, wxObject *clientData) +{ + wxToolBarToolBase *tool = FindById(toolid); + + wxCHECK_RET( tool, wxT("no such tool in wxToolBar::SetToolClientData") ); + + tool->SetClientData(clientData); +} + +int wxToolBarBase::GetToolPos(int toolid) const +{ + size_t pos = 0; + wxToolBarToolsList::compatibility_iterator node; + + for ( node = m_tools.GetFirst(); node; node = node->GetNext() ) + { + if ( node->GetData()->GetId() == toolid ) + return pos; + + pos++; + } + + return wxNOT_FOUND; +} + +bool wxToolBarBase::GetToolState(int toolid) const +{ + wxToolBarToolBase *tool = FindById(toolid); + wxCHECK_MSG( tool, false, wxT("no such tool") ); + + return tool->IsToggled(); +} + +bool wxToolBarBase::GetToolEnabled(int toolid) const +{ + wxToolBarToolBase *tool = FindById(toolid); + wxCHECK_MSG( tool, false, wxT("no such tool") ); + + return tool->IsEnabled(); +} + +wxString wxToolBarBase::GetToolShortHelp(int toolid) const +{ + wxToolBarToolBase *tool = FindById(toolid); + wxCHECK_MSG( tool, wxEmptyString, wxT("no such tool") ); + + return tool->GetShortHelp(); +} + +wxString wxToolBarBase::GetToolLongHelp(int toolid) const +{ + wxToolBarToolBase *tool = FindById(toolid); + wxCHECK_MSG( tool, wxEmptyString, wxT("no such tool") ); + + return tool->GetLongHelp(); +} + +// ---------------------------------------------------------------------------- +// wxToolBarBase geometry +// ---------------------------------------------------------------------------- + +void wxToolBarBase::SetMargins(int x, int y) +{ + m_xMargin = x; + m_yMargin = y; +} + +void wxToolBarBase::SetRows(int WXUNUSED(nRows)) +{ + // nothing +} + +bool wxToolBarBase::IsVertical() const +{ + return HasFlag(wxTB_LEFT | wxTB_RIGHT); +} + + +// ---------------------------------------------------------------------------- +// event processing +// ---------------------------------------------------------------------------- + +// Only allow toggle if returns true +bool wxToolBarBase::OnLeftClick(int toolid, bool toggleDown) +{ + wxCommandEvent event(wxEVT_TOOL, toolid); + event.SetEventObject(this); + + // we use SetInt() to make wxCommandEvent::IsChecked() return toggleDown + event.SetInt((int)toggleDown); + + // and SetExtraLong() for backwards compatibility + event.SetExtraLong((long)toggleDown); + + // Send events to this toolbar instead (and thence up the window hierarchy) + HandleWindowEvent(event); + + return true; +} + +// Call when right button down. +void wxToolBarBase::OnRightClick(int toolid, + long WXUNUSED(x), + long WXUNUSED(y)) +{ + wxCommandEvent event(wxEVT_TOOL_RCLICKED, toolid); + event.SetEventObject(this); + event.SetInt(toolid); + + GetEventHandler()->ProcessEvent(event); +} + +// Called when the mouse cursor enters a tool bitmap (no button pressed). +// Argument is wxID_ANY if mouse is exiting the toolbar. +// Note that for this event, the toolid of the window is used, +// and the integer parameter of wxCommandEvent is used to retrieve +// the tool toolid. +void wxToolBarBase::OnMouseEnter(int toolid) +{ + wxCommandEvent event(wxEVT_TOOL_ENTER, GetId()); + event.SetEventObject(this); + event.SetInt(toolid); + + wxFrame *frame = wxDynamicCast(GetParent(), wxFrame); + if ( frame ) + { + wxString help; + if ( toolid != wxID_ANY ) + { + const wxToolBarToolBase * const tool = FindById(toolid); + if ( tool ) + help = tool->GetLongHelp(); + } + + // call DoGiveHelp() even if help string is empty to avoid showing the + // help for the previously selected tool when another one is selected + frame->DoGiveHelp(help, toolid != wxID_ANY); + } + + (void)GetEventHandler()->ProcessEvent(event); +} + +// ---------------------------------------------------------------------------- +// UI updates +// ---------------------------------------------------------------------------- + +// Do the toolbar button updates (check for EVT_UPDATE_UI handlers) +void wxToolBarBase::UpdateWindowUI(long flags) +{ + wxWindowBase::UpdateWindowUI(flags); + + // don't waste time updating state of tools in a hidden toolbar + if ( !IsShown() ) + return; + + wxEvtHandler* evtHandler = GetEventHandler() ; + + for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); + node; + node = node->GetNext() ) + { + wxToolBarToolBase * const tool = node->GetData(); + if ( tool->IsSeparator() ) + continue; + + int toolid = tool->GetId(); + + wxUpdateUIEvent event(toolid); + event.SetEventObject(this); + + if ( evtHandler->ProcessEvent(event) ) + { + if ( event.GetSetEnabled() ) + EnableTool(toolid, event.GetEnabled()); + if ( event.GetSetChecked() ) + ToggleTool(toolid, event.GetChecked()); +#if 0 + if ( event.GetSetText() ) + // Set tooltip? +#endif // 0 + } + } +} + +#if wxUSE_MENUS +bool wxToolBarBase::SetDropdownMenu(int toolid, wxMenu* menu) +{ + wxToolBarToolBase * const tool = FindById(toolid); + wxCHECK_MSG( tool, false, wxT("invalid tool toolid") ); + + wxCHECK_MSG( tool->GetKind() == wxITEM_DROPDOWN, false, + wxT("menu can be only associated with drop down tools") ); + + tool->SetDropdownMenu(menu); + + return true; +} +#endif + +#if WXWIN_COMPATIBILITY_2_8 + +bool wxCreateGreyedImage(const wxImage& in, wxImage& out) +{ +#if wxUSE_IMAGE + out = in.ConvertToGreyscale(); + if ( out.IsOk() ) + return true; +#endif // wxUSE_IMAGE + return false; +} + +#endif // WXWIN_COMPATIBILITY_2_8 + +#endif // wxUSE_TOOLBAR diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/textbuf.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/textbuf.cpp new file mode 100644 index 0000000000..406043e58e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/textbuf.cpp @@ -0,0 +1,278 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/textbuf.cpp +// Purpose: implementation of wxTextBuffer class +// Created: 14.11.01 +// Author: Morten Hanssen, Vadim Zeitlin +// Copyright: (c) 1998-2001 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// headers +// ============================================================================ + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif //__BORLANDC__ + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/log.h" +#endif + +#include "wx/textbuf.h" + +// ============================================================================ +// wxTextBuffer class implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// static methods (always compiled in) +// ---------------------------------------------------------------------------- + +// default type is the native one + +const wxTextFileType wxTextBuffer::typeDefault = +#if defined(__WINDOWS__) || defined(__DOS__) + wxTextFileType_Dos; +#elif defined(__UNIX__) + wxTextFileType_Unix; +#elif defined(__OS2__) + wxTextFileType_Os2; +#else + wxTextFileType_None; + #error "wxTextBuffer: unsupported platform." +#endif + +const wxChar *wxTextBuffer::GetEOL(wxTextFileType type) +{ + switch ( type ) { + default: + wxFAIL_MSG(wxT("bad buffer type in wxTextBuffer::GetEOL.")); + // fall through nevertheless - we must return something... + + case wxTextFileType_None: return wxEmptyString; + case wxTextFileType_Unix: return wxT("\n"); + case wxTextFileType_Dos: return wxT("\r\n"); + case wxTextFileType_Mac: return wxT("\r"); + } +} + +wxString wxTextBuffer::Translate(const wxString& text, wxTextFileType type) +{ + // don't do anything if there is nothing to do + if ( type == wxTextFileType_None ) + return text; + + // nor if it is empty + if ( text.empty() ) + return text; + + wxString eol = GetEOL(type), result; + + // optimization: we know that the length of the new string will be about + // the same as the length of the old one, so prealloc memory to avoid + // unnecessary relocations + result.Alloc(text.Len()); + + wxChar chLast = 0; + for ( wxString::const_iterator i = text.begin(); i != text.end(); ++i ) + { + wxChar ch = *i; + switch ( ch ) { + case wxT('\n'): + // Dos/Unix line termination + result += eol; + chLast = 0; + break; + + case wxT('\r'): + if ( chLast == wxT('\r') ) { + // Mac empty line + result += eol; + } + else { + // just remember it: we don't know whether it is just "\r" + // or "\r\n" yet + chLast = wxT('\r'); + } + break; + + default: + if ( chLast == wxT('\r') ) { + // Mac line termination + result += eol; + + // reset chLast to avoid inserting another eol before the + // next character + chLast = 0; + } + + // add to the current line + result += ch; + } + } + + if ( chLast ) { + // trailing '\r' + result += eol; + } + + return result; +} + +#if wxUSE_TEXTBUFFER + +wxString wxTextBuffer::ms_eof; + +// ---------------------------------------------------------------------------- +// ctors & dtor +// ---------------------------------------------------------------------------- + +wxTextBuffer::wxTextBuffer(const wxString& strBufferName) + : m_strBufferName(strBufferName) +{ + m_nCurLine = 0; + m_isOpened = false; +} + +wxTextBuffer::~wxTextBuffer() +{ + // required here for Darwin +} + +// ---------------------------------------------------------------------------- +// buffer operations +// ---------------------------------------------------------------------------- + +bool wxTextBuffer::Exists() const +{ + return OnExists(); +} + +bool wxTextBuffer::Create(const wxString& strBufferName) +{ + m_strBufferName = strBufferName; + + return Create(); +} + +bool wxTextBuffer::Create() +{ + // buffer name must be either given in ctor or in Create(const wxString&) + wxASSERT( !m_strBufferName.empty() ); + + // if the buffer already exists do nothing + if ( Exists() ) return false; + + if ( !OnOpen(m_strBufferName, WriteAccess) ) + return false; + + OnClose(); + return true; +} + +bool wxTextBuffer::Open(const wxString& strBufferName, const wxMBConv& conv) +{ + m_strBufferName = strBufferName; + + return Open(conv); +} + +bool wxTextBuffer::Open(const wxMBConv& conv) +{ + // buffer name must be either given in ctor or in Open(const wxString&) + wxASSERT( !m_strBufferName.empty() ); + + // open buffer in read-only mode + if ( !OnOpen(m_strBufferName, ReadAccess) ) + return false; + + // read buffer into memory + m_isOpened = OnRead(conv); + + OnClose(); + + return m_isOpened; +} + +// analyse some lines of the buffer trying to guess it's type. +// if it fails, it assumes the native type for our platform. +wxTextFileType wxTextBuffer::GuessType() const +{ + wxASSERT( IsOpened() ); + + // scan the buffer lines + size_t nUnix = 0, // number of '\n's alone + nDos = 0, // number of '\r\n' + nMac = 0; // number of '\r's + + // we take MAX_LINES_SCAN in the beginning, middle and the end of buffer + #define MAX_LINES_SCAN (10) + size_t nCount = m_aLines.GetCount() / 3, + nScan = nCount > 3*MAX_LINES_SCAN ? MAX_LINES_SCAN : nCount / 3; + + #define AnalyseLine(n) \ + switch ( m_aTypes[n] ) { \ + case wxTextFileType_Unix: nUnix++; break; \ + case wxTextFileType_Dos: nDos++; break; \ + case wxTextFileType_Mac: nMac++; break; \ + default: wxFAIL_MSG(wxT("unknown line terminator")); \ + } + + size_t n; + for ( n = 0; n < nScan; n++ ) // the beginning + AnalyseLine(n); + for ( n = (nCount - nScan)/2; n < (nCount + nScan)/2; n++ ) + AnalyseLine(n); + for ( n = nCount - nScan; n < nCount; n++ ) + AnalyseLine(n); + + #undef AnalyseLine + + // interpret the results (FIXME far from being even 50% fool proof) + if ( nScan > 0 && nDos + nUnix + nMac == 0 ) { + // no newlines at all + wxLogWarning(_("'%s' is probably a binary buffer."), m_strBufferName.c_str()); + } + else { + #define GREATER_OF(t1, t2) n##t1 == n##t2 ? typeDefault \ + : n##t1 > n##t2 \ + ? wxTextFileType_##t1 \ + : wxTextFileType_##t2 + +#if !defined(__WATCOMC__) || wxCHECK_WATCOM_VERSION(1,4) + if ( nDos > nUnix ) + return GREATER_OF(Dos, Mac); + else if ( nDos < nUnix ) + return GREATER_OF(Unix, Mac); + else { + // nDos == nUnix + return nMac > nDos ? wxTextFileType_Mac : typeDefault; + } +#endif // __WATCOMC__ + + #undef GREATER_OF + } + + return typeDefault; +} + + +bool wxTextBuffer::Close() +{ + Clear(); + m_isOpened = false; + + return true; +} + +bool wxTextBuffer::Write(wxTextFileType typeNew, const wxMBConv& conv) +{ + return OnWrite(typeNew, conv); +} + +#endif // wxUSE_TEXTBUFFER diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/textcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/textcmn.cpp new file mode 100644 index 0000000000..4cba1dec5b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/textcmn.cpp @@ -0,0 +1,1235 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/textcmn.cpp +// Purpose: implementation of platform-independent functions of wxTextCtrl +// Author: Julian Smart +// Modified by: +// Created: 13.07.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/event.h" +#endif // WX_PRECOMP + +#if wxUSE_TEXTCTRL + +#include "wx/textctrl.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" +#endif // WX_PRECOMP + +#include "wx/ffile.h" + +extern WXDLLEXPORT_DATA(const char) wxTextCtrlNameStr[] = "text"; + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// we don't have any objects of type wxTextCtrlBase in the program, only +// wxTextCtrl, so this cast is safe +#define TEXTCTRL(ptr) ((wxTextCtrl *)(ptr)) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxTextCtrlStyle ) +wxBEGIN_FLAGS( wxTextCtrlStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxTE_PROCESS_ENTER) +wxFLAGS_MEMBER(wxTE_PROCESS_TAB) +wxFLAGS_MEMBER(wxTE_MULTILINE) +wxFLAGS_MEMBER(wxTE_PASSWORD) +wxFLAGS_MEMBER(wxTE_READONLY) +wxFLAGS_MEMBER(wxHSCROLL) +wxFLAGS_MEMBER(wxTE_RICH) +wxFLAGS_MEMBER(wxTE_RICH2) +wxFLAGS_MEMBER(wxTE_AUTO_URL) +wxFLAGS_MEMBER(wxTE_NOHIDESEL) +wxFLAGS_MEMBER(wxTE_LEFT) +wxFLAGS_MEMBER(wxTE_CENTRE) +wxFLAGS_MEMBER(wxTE_RIGHT) +wxFLAGS_MEMBER(wxTE_DONTWRAP) +wxFLAGS_MEMBER(wxTE_CHARWRAP) +wxFLAGS_MEMBER(wxTE_WORDWRAP) +wxEND_FLAGS( wxTextCtrlStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxTextCtrl, wxControl, "wx/textctrl.h") + +wxBEGIN_PROPERTIES_TABLE(wxTextCtrl) +wxEVENT_PROPERTY( TextUpdated, wxEVT_TEXT, wxCommandEvent ) +wxEVENT_PROPERTY( TextEnter, wxEVT_TEXT_ENTER, wxCommandEvent ) + +wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group") ) +wxPROPERTY( Value, wxString, SetValue, GetValue, wxString(), \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) + +wxPROPERTY_FLAGS( WindowStyle, wxTextCtrlStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxTextCtrl) + +wxCONSTRUCTOR_6( wxTextCtrl, wxWindow*, Parent, wxWindowID, Id, \ + wxString, Value, wxPoint, Position, wxSize, Size, \ + long, WindowStyle) + + +IMPLEMENT_DYNAMIC_CLASS(wxTextUrlEvent, wxCommandEvent) + +wxDEFINE_EVENT( wxEVT_TEXT, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TEXT_ENTER, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TEXT_URL, wxTextUrlEvent ); +wxDEFINE_EVENT( wxEVT_TEXT_MAXLEN, wxCommandEvent ); + +IMPLEMENT_ABSTRACT_CLASS(wxTextCtrlBase, wxControl) + +// ============================================================================ +// wxTextAttr implementation +// ============================================================================ + +wxTextAttr::wxTextAttr(const wxColour& colText, + const wxColour& colBack, + const wxFont& font, + wxTextAttrAlignment alignment): m_textAlignment(alignment), m_colText(colText), m_colBack(colBack) +{ + Init(); + + if (m_colText.IsOk()) m_flags |= wxTEXT_ATTR_TEXT_COLOUR; + if (m_colBack.IsOk()) m_flags |= wxTEXT_ATTR_BACKGROUND_COLOUR; + if (alignment != wxTEXT_ALIGNMENT_DEFAULT) + m_flags |= wxTEXT_ATTR_ALIGNMENT; + + GetFontAttributes(font); +} + +// Initialisation +void wxTextAttr::Init() +{ + m_textAlignment = wxTEXT_ALIGNMENT_DEFAULT; + m_flags = 0; + m_leftIndent = 0; + m_leftSubIndent = 0; + m_rightIndent = 0; + + m_fontSize = 12; + m_fontStyle = wxFONTSTYLE_NORMAL; + m_fontWeight = wxFONTWEIGHT_NORMAL; + m_fontUnderlined = false; + m_fontStrikethrough = false; + m_fontEncoding = wxFONTENCODING_DEFAULT; + m_fontFamily = wxFONTFAMILY_DEFAULT; + + m_paragraphSpacingAfter = 0; + m_paragraphSpacingBefore = 0; + m_lineSpacing = 0; + m_bulletStyle = wxTEXT_ATTR_BULLET_STYLE_NONE; + m_textEffects = wxTEXT_ATTR_EFFECT_NONE; + m_textEffectFlags = wxTEXT_ATTR_EFFECT_NONE; + m_outlineLevel = 0; + m_bulletNumber = 0; +} + +// Copy +void wxTextAttr::Copy(const wxTextAttr& attr) +{ + m_colText = attr.m_colText; + m_colBack = attr.m_colBack; + m_textAlignment = attr.m_textAlignment; + m_leftIndent = attr.m_leftIndent; + m_leftSubIndent = attr.m_leftSubIndent; + m_rightIndent = attr.m_rightIndent; + m_tabs = attr.m_tabs; + m_flags = attr.m_flags; + + m_fontSize = attr.m_fontSize; + m_fontStyle = attr.m_fontStyle; + m_fontWeight = attr.m_fontWeight; + m_fontUnderlined = attr.m_fontUnderlined; + m_fontStrikethrough = attr.m_fontStrikethrough; + m_fontFaceName = attr.m_fontFaceName; + m_fontEncoding = attr.m_fontEncoding; + m_fontFamily = attr.m_fontFamily; + m_textEffects = attr.m_textEffects; + m_textEffectFlags = attr.m_textEffectFlags; + + m_paragraphSpacingAfter = attr.m_paragraphSpacingAfter; + m_paragraphSpacingBefore = attr.m_paragraphSpacingBefore; + m_lineSpacing = attr.m_lineSpacing; + m_characterStyleName = attr.m_characterStyleName; + m_paragraphStyleName = attr.m_paragraphStyleName; + m_listStyleName = attr.m_listStyleName; + m_bulletStyle = attr.m_bulletStyle; + m_bulletNumber = attr.m_bulletNumber; + m_bulletText = attr.m_bulletText; + m_bulletFont = attr.m_bulletFont; + m_bulletName = attr.m_bulletName; + m_outlineLevel = attr.m_outlineLevel; + + m_urlTarget = attr.m_urlTarget; +} + +// operators +void wxTextAttr::operator= (const wxTextAttr& attr) +{ + Copy(attr); +} + +// Equality test +bool wxTextAttr::operator== (const wxTextAttr& attr) const +{ + return GetFlags() == attr.GetFlags() && + + (!HasTextColour() || (GetTextColour() == attr.GetTextColour())) && + (!HasBackgroundColour() || (GetBackgroundColour() == attr.GetBackgroundColour())) && + + (!HasAlignment() || (GetAlignment() == attr.GetAlignment())) && + (!HasLeftIndent() || (GetLeftIndent() == attr.GetLeftIndent() && + GetLeftSubIndent() == attr.GetLeftSubIndent())) && + (!HasRightIndent() || (GetRightIndent() == attr.GetRightIndent())) && + (!HasTabs() || (TabsEq(GetTabs(), attr.GetTabs()))) && + + (!HasParagraphSpacingAfter() || (GetParagraphSpacingAfter() == attr.GetParagraphSpacingAfter())) && + (!HasParagraphSpacingBefore() || (GetParagraphSpacingBefore() == attr.GetParagraphSpacingBefore())) && + (!HasLineSpacing() || (GetLineSpacing() == attr.GetLineSpacing())) && + (!HasCharacterStyleName() || (GetCharacterStyleName() == attr.GetCharacterStyleName())) && + (!HasParagraphStyleName() || (GetParagraphStyleName() == attr.GetParagraphStyleName())) && + (!HasListStyleName() || (GetListStyleName() == attr.GetListStyleName())) && + + (!HasBulletStyle() || (GetBulletStyle() == attr.GetBulletStyle())) && + (!HasBulletText() || (GetBulletText() == attr.GetBulletText())) && + (!HasBulletNumber() || (GetBulletNumber() == attr.GetBulletNumber())) && + (GetBulletFont() == attr.GetBulletFont()) && + (!HasBulletName() || (GetBulletName() == attr.GetBulletName())) && + + (!HasTextEffects() || (GetTextEffects() == attr.GetTextEffects() && + GetTextEffectFlags() == attr.GetTextEffectFlags())) && + + (!HasOutlineLevel() || (GetOutlineLevel() == attr.GetOutlineLevel())) && + + (!HasFontSize() || (GetFontSize() == attr.GetFontSize())) && + (!HasFontItalic() || (GetFontStyle() == attr.GetFontStyle())) && + (!HasFontWeight() || (GetFontWeight() == attr.GetFontWeight())) && + (!HasFontUnderlined() || (GetFontUnderlined() == attr.GetFontUnderlined())) && + (!HasFontStrikethrough() || (GetFontStrikethrough() == attr.GetFontStrikethrough())) && + (!HasFontFaceName() || (GetFontFaceName() == attr.GetFontFaceName())) && + (!HasFontEncoding() || (GetFontEncoding() == attr.GetFontEncoding())) && + (!HasFontFamily() || (GetFontFamily() == attr.GetFontFamily())) && + + (!HasURL() || (GetURL() == attr.GetURL())); +} + +// Partial equality test. Only returns false if an attribute doesn't match. +bool wxTextAttr::EqPartial(const wxTextAttr& attr, bool weakTest) const +{ + int flags = attr.GetFlags(); + + if (!weakTest && + ((!HasTextColour() && attr.HasTextColour()) || + (!HasBackgroundColour() && attr.HasBackgroundColour()) || + (!HasFontFaceName() && attr.HasFontFaceName()) || + (!HasFontSize() && attr.HasFontSize()) || + (!HasFontWeight() && attr.HasFontWeight()) || + (!HasFontItalic() && attr.HasFontItalic()) || + (!HasFontUnderlined() && attr.HasFontUnderlined()) || + (!HasFontStrikethrough() && attr.HasFontStrikethrough()) || + (!HasFontEncoding() && attr.HasFontEncoding()) || + (!HasFontFamily() && attr.HasFontFamily()) || + (!HasURL() && attr.HasURL()) || + (!HasAlignment() && attr.HasAlignment()) || + (!HasLeftIndent() && attr.HasLeftIndent()) || + (!HasParagraphSpacingAfter() && attr.HasParagraphSpacingAfter()) || + (!HasParagraphSpacingBefore() && attr.HasParagraphSpacingBefore()) || + (!HasLineSpacing() && attr.HasLineSpacing()) || + (!HasCharacterStyleName() && attr.HasCharacterStyleName()) || + (!HasParagraphStyleName() && attr.HasParagraphStyleName()) || + (!HasListStyleName() && attr.HasListStyleName()) || + (!HasBulletStyle() && attr.HasBulletStyle()) || + (!HasBulletNumber() && attr.HasBulletNumber()) || + (!HasBulletText() && attr.HasBulletText()) || + (!HasBulletName() && attr.HasBulletName()) || + (!HasTabs() && attr.HasTabs()) || + (!HasTextEffects() && attr.HasTextEffects()) || + (!HasOutlineLevel() && attr.HasOutlineLevel()))) + { + return false; + } + + if (HasTextColour() && attr.HasTextColour() && GetTextColour() != attr.GetTextColour()) + return false; + + if (HasBackgroundColour() && attr.HasBackgroundColour() && GetBackgroundColour() != attr.GetBackgroundColour()) + return false; + + if (HasFontFaceName() && attr.HasFontFaceName() && GetFontFaceName() != attr.GetFontFaceName()) + return false; + + // This checks whether the two objects have the same font size dimension (px versus pt) + if (HasFontSize() && attr.HasFontSize() && (flags & wxTEXT_ATTR_FONT) != (GetFlags() & wxTEXT_ATTR_FONT)) + return false; + + if (HasFontPointSize() && attr.HasFontPointSize() && GetFontSize() != attr.GetFontSize()) + return false; + + if (HasFontPixelSize() && attr.HasFontPixelSize() && GetFontSize() != attr.GetFontSize()) + return false; + + if (HasFontWeight() && attr.HasFontWeight() && GetFontWeight() != attr.GetFontWeight()) + return false; + + if (HasFontItalic() && attr.HasFontItalic() && GetFontStyle() != attr.GetFontStyle()) + return false; + + if (HasFontUnderlined() && attr.HasFontUnderlined() && GetFontUnderlined() != attr.GetFontUnderlined()) + return false; + + if (HasFontStrikethrough() && attr.HasFontStrikethrough() && GetFontStrikethrough() != attr.GetFontStrikethrough()) + return false; + + if (HasFontEncoding() && attr.HasFontEncoding() && GetFontEncoding() != attr.GetFontEncoding()) + return false; + + if (HasFontFamily() && attr.HasFontFamily() && GetFontFamily() != attr.GetFontFamily()) + return false; + + if (HasURL() && attr.HasURL() && GetURL() != attr.GetURL()) + return false; + + if (HasAlignment() && attr.HasAlignment() && GetAlignment() != attr.GetAlignment()) + return false; + + if (HasLeftIndent() && attr.HasLeftIndent() && + ((GetLeftIndent() != attr.GetLeftIndent()) || (GetLeftSubIndent() != attr.GetLeftSubIndent()))) + return false; + + if (HasRightIndent() && attr.HasRightIndent() && (GetRightIndent() != attr.GetRightIndent())) + return false; + + if (HasParagraphSpacingAfter() && attr.HasParagraphSpacingAfter() && + (GetParagraphSpacingAfter() != attr.GetParagraphSpacingAfter())) + return false; + + if (HasParagraphSpacingBefore() && attr.HasParagraphSpacingBefore() && + (GetParagraphSpacingBefore() != attr.GetParagraphSpacingBefore())) + return false; + + if (HasLineSpacing() && attr.HasLineSpacing() && (GetLineSpacing() != attr.GetLineSpacing())) + return false; + + if (HasCharacterStyleName() && attr.HasCharacterStyleName() && (GetCharacterStyleName() != attr.GetCharacterStyleName())) + return false; + + if (HasParagraphStyleName() && attr.HasParagraphStyleName() && (GetParagraphStyleName() != attr.GetParagraphStyleName())) + return false; + + if (HasListStyleName() && attr.HasListStyleName() && (GetListStyleName() != attr.GetListStyleName())) + return false; + + if (HasBulletStyle() && attr.HasBulletStyle() && (GetBulletStyle() != attr.GetBulletStyle())) + return false; + + if (HasBulletNumber() && attr.HasBulletNumber() && (GetBulletNumber() != attr.GetBulletNumber())) + return false; + + if (HasBulletText() && attr.HasBulletText() && + (GetBulletText() != attr.GetBulletText()) && + (GetBulletFont() != attr.GetBulletFont())) + return false; + + if (HasBulletName() && attr.HasBulletName() && (GetBulletName() != attr.GetBulletName())) + return false; + + if (HasTabs() && attr.HasTabs() && !TabsEq(GetTabs(), attr.GetTabs())) + return false; + + if ((HasPageBreak() != attr.HasPageBreak())) + return false; + + if (HasTextEffects() && attr.HasTextEffects()) + { + if (!BitlistsEqPartial(GetTextEffects(), attr.GetTextEffects(), GetTextEffectFlags())) + return false; + } + + if (HasOutlineLevel() && attr.HasOutlineLevel() && (GetOutlineLevel() != attr.GetOutlineLevel())) + return false; + + return true; +} + +// Create font from font attributes. +wxFont wxTextAttr::GetFont() const +{ + if ( !HasFont() ) + return wxNullFont; + + int fontSize = 10; + if (HasFontSize()) + fontSize = GetFontSize(); + + wxFontStyle fontStyle = wxFONTSTYLE_NORMAL; + if (HasFontItalic()) + fontStyle = GetFontStyle(); + + wxFontWeight fontWeight = wxFONTWEIGHT_NORMAL; + if (HasFontWeight()) + fontWeight = GetFontWeight(); + + bool underlined = false; + if (HasFontUnderlined()) + underlined = GetFontUnderlined(); + + bool strikethrough = false; + if (HasFontStrikethrough()) + strikethrough = GetFontStrikethrough(); + + wxString fontFaceName; + if (HasFontFaceName()) + fontFaceName = GetFontFaceName(); + + wxFontEncoding encoding = wxFONTENCODING_DEFAULT; + if (HasFontEncoding()) + encoding = GetFontEncoding(); + + wxFontFamily fontFamily = wxFONTFAMILY_DEFAULT; + if (HasFontFamily()) + fontFamily = GetFontFamily(); + + if (HasFontPixelSize()) + { + wxFont font(wxSize(0, fontSize), fontFamily, fontStyle, fontWeight, underlined, fontFaceName, encoding); + if (strikethrough) + font.SetStrikethrough(true); + return font; + } + else + { + wxFont font(fontSize, fontFamily, fontStyle, fontWeight, underlined, fontFaceName, encoding); + if (strikethrough) + font.SetStrikethrough(true); + return font; + } +} + +// Get attributes from font. +bool wxTextAttr::GetFontAttributes(const wxFont& font, int flags) +{ + if (!font.IsOk()) + return false; + + // If we pass both pixel and point size attributes, this is an indication + // to choose the most appropriate units. + if ((flags & wxTEXT_ATTR_FONT) == wxTEXT_ATTR_FONT) + { + if (font.IsUsingSizeInPixels()) + { + m_fontSize = font.GetPixelSize().y; + flags &= ~wxTEXT_ATTR_FONT_POINT_SIZE; + } + else + { + m_fontSize = font.GetPointSize(); + flags &= ~wxTEXT_ATTR_FONT_PIXEL_SIZE; + } + } + else if (flags & wxTEXT_ATTR_FONT_POINT_SIZE) + { + m_fontSize = font.GetPointSize(); + flags &= ~wxTEXT_ATTR_FONT_PIXEL_SIZE; + } + else if (flags & wxTEXT_ATTR_FONT_PIXEL_SIZE) + { + m_fontSize = font.GetPixelSize().y; + } + + if (flags & wxTEXT_ATTR_FONT_ITALIC) + m_fontStyle = font.GetStyle(); + + if (flags & wxTEXT_ATTR_FONT_WEIGHT) + m_fontWeight = font.GetWeight(); + + if (flags & wxTEXT_ATTR_FONT_UNDERLINE) + m_fontUnderlined = font.GetUnderlined(); + + if (flags & wxTEXT_ATTR_FONT_STRIKETHROUGH) + m_fontStrikethrough = font.GetStrikethrough(); + + if (flags & wxTEXT_ATTR_FONT_FACE) + m_fontFaceName = font.GetFaceName(); + + if (flags & wxTEXT_ATTR_FONT_ENCODING) + m_fontEncoding = font.GetEncoding(); + + if (flags & wxTEXT_ATTR_FONT_FAMILY) + { + // wxFont might not know its family, avoid setting m_fontFamily to an + // invalid value and rather pretend that we don't have any font family + // information at all in this case + const wxFontFamily fontFamily = font.GetFamily(); + if ( fontFamily == wxFONTFAMILY_UNKNOWN ) + flags &= ~wxTEXT_ATTR_FONT_FAMILY; + else + m_fontFamily = fontFamily; + } + + m_flags |= flags; + + return true; +} + +// Resets bits in destination so new attributes aren't merged with mutually exclusive ones +static bool wxResetIncompatibleBits(const int mask, const int srcFlags, int& destFlags, int& destBits) +{ + if ((srcFlags & mask) && (destFlags & mask)) + { + destBits &= ~mask; + destFlags &= ~mask; + } + + return true; +} + +bool wxTextAttr::Apply(const wxTextAttr& style, const wxTextAttr* compareWith) +{ + wxTextAttr& destStyle = (*this); + + if (style.HasFontWeight()) + { + if (!(compareWith && compareWith->HasFontWeight() && compareWith->GetFontWeight() == style.GetFontWeight())) + destStyle.SetFontWeight(style.GetFontWeight()); + } + + if (style.HasFontPointSize()) + { + if (!(compareWith && compareWith->HasFontPointSize() && compareWith->GetFontSize() == style.GetFontSize())) + destStyle.SetFontPointSize(style.GetFontSize()); + } + else if (style.HasFontPixelSize()) + { + if (!(compareWith && compareWith->HasFontPixelSize() && compareWith->GetFontSize() == style.GetFontSize())) + destStyle.SetFontPixelSize(style.GetFontSize()); + } + + if (style.HasFontItalic()) + { + if (!(compareWith && compareWith->HasFontItalic() && compareWith->GetFontStyle() == style.GetFontStyle())) + destStyle.SetFontStyle(style.GetFontStyle()); + } + + if (style.HasFontUnderlined()) + { + if (!(compareWith && compareWith->HasFontUnderlined() && compareWith->GetFontUnderlined() == style.GetFontUnderlined())) + destStyle.SetFontUnderlined(style.GetFontUnderlined()); + } + + if (style.HasFontStrikethrough()) + { + if (!(compareWith && compareWith->HasFontStrikethrough() && compareWith->GetFontStrikethrough() == style.GetFontStrikethrough())) + destStyle.SetFontStrikethrough(style.GetFontStrikethrough()); + } + + if (style.HasFontFaceName()) + { + if (!(compareWith && compareWith->HasFontFaceName() && compareWith->GetFontFaceName() == style.GetFontFaceName())) + destStyle.SetFontFaceName(style.GetFontFaceName()); + } + + if (style.HasFontEncoding()) + { + if (!(compareWith && compareWith->HasFontEncoding() && compareWith->GetFontEncoding() == style.GetFontEncoding())) + destStyle.SetFontEncoding(style.GetFontEncoding()); + } + + if (style.HasFontFamily()) + { + if (!(compareWith && compareWith->HasFontFamily() && compareWith->GetFontFamily() == style.GetFontFamily())) + destStyle.SetFontFamily(style.GetFontFamily()); + } + + if (style.GetTextColour().IsOk() && style.HasTextColour()) + { + if (!(compareWith && compareWith->HasTextColour() && compareWith->GetTextColour() == style.GetTextColour())) + destStyle.SetTextColour(style.GetTextColour()); + } + + if (style.GetBackgroundColour().IsOk() && style.HasBackgroundColour()) + { + if (!(compareWith && compareWith->HasBackgroundColour() && compareWith->GetBackgroundColour() == style.GetBackgroundColour())) + destStyle.SetBackgroundColour(style.GetBackgroundColour()); + } + + if (style.HasAlignment()) + { + if (!(compareWith && compareWith->HasAlignment() && compareWith->GetAlignment() == style.GetAlignment())) + destStyle.SetAlignment(style.GetAlignment()); + } + + if (style.HasTabs()) + { + if (!(compareWith && compareWith->HasTabs() && TabsEq(compareWith->GetTabs(), style.GetTabs()))) + destStyle.SetTabs(style.GetTabs()); + } + + if (style.HasLeftIndent()) + { + if (!(compareWith && compareWith->HasLeftIndent() && compareWith->GetLeftIndent() == style.GetLeftIndent() + && compareWith->GetLeftSubIndent() == style.GetLeftSubIndent())) + destStyle.SetLeftIndent(style.GetLeftIndent(), style.GetLeftSubIndent()); + } + + if (style.HasRightIndent()) + { + if (!(compareWith && compareWith->HasRightIndent() && compareWith->GetRightIndent() == style.GetRightIndent())) + destStyle.SetRightIndent(style.GetRightIndent()); + } + + if (style.HasParagraphSpacingAfter()) + { + if (!(compareWith && compareWith->HasParagraphSpacingAfter() && compareWith->GetParagraphSpacingAfter() == style.GetParagraphSpacingAfter())) + destStyle.SetParagraphSpacingAfter(style.GetParagraphSpacingAfter()); + } + + if (style.HasParagraphSpacingBefore()) + { + if (!(compareWith && compareWith->HasParagraphSpacingBefore() && compareWith->GetParagraphSpacingBefore() == style.GetParagraphSpacingBefore())) + destStyle.SetParagraphSpacingBefore(style.GetParagraphSpacingBefore()); + } + + if (style.HasLineSpacing()) + { + if (!(compareWith && compareWith->HasLineSpacing() && compareWith->GetLineSpacing() == style.GetLineSpacing())) + destStyle.SetLineSpacing(style.GetLineSpacing()); + } + + if (style.HasCharacterStyleName()) + { + if (!(compareWith && compareWith->HasCharacterStyleName() && compareWith->GetCharacterStyleName() == style.GetCharacterStyleName())) + destStyle.SetCharacterStyleName(style.GetCharacterStyleName()); + } + + if (style.HasParagraphStyleName()) + { + if (!(compareWith && compareWith->HasParagraphStyleName() && compareWith->GetParagraphStyleName() == style.GetParagraphStyleName())) + destStyle.SetParagraphStyleName(style.GetParagraphStyleName()); + } + + if (style.HasListStyleName()) + { + if (!(compareWith && compareWith->HasListStyleName() && compareWith->GetListStyleName() == style.GetListStyleName())) + destStyle.SetListStyleName(style.GetListStyleName()); + } + + if (style.HasBulletStyle()) + { + if (!(compareWith && compareWith->HasBulletStyle() && compareWith->GetBulletStyle() == style.GetBulletStyle())) + destStyle.SetBulletStyle(style.GetBulletStyle()); + } + + if (style.HasBulletText()) + { + if (!(compareWith && compareWith->HasBulletText() && compareWith->GetBulletText() == style.GetBulletText())) + { + destStyle.SetBulletText(style.GetBulletText()); + destStyle.SetBulletFont(style.GetBulletFont()); + } + } + + if (style.HasBulletNumber()) + { + if (!(compareWith && compareWith->HasBulletNumber() && compareWith->GetBulletNumber() == style.GetBulletNumber())) + destStyle.SetBulletNumber(style.GetBulletNumber()); + } + + if (style.HasBulletName()) + { + if (!(compareWith && compareWith->HasBulletName() && compareWith->GetBulletName() == style.GetBulletName())) + destStyle.SetBulletName(style.GetBulletName()); + } + + if (style.HasURL()) + { + if (!(compareWith && compareWith->HasURL() && compareWith->GetURL() == style.GetURL())) + destStyle.SetURL(style.GetURL()); + } + + if (style.HasPageBreak()) + { + if (!(compareWith && compareWith->HasPageBreak())) + destStyle.SetPageBreak(); + } + + if (style.HasTextEffects()) + { + if (!(compareWith && compareWith->HasTextEffects() && compareWith->GetTextEffects() == style.GetTextEffects())) + { + int destBits = destStyle.GetTextEffects(); + int destFlags = destStyle.GetTextEffectFlags(); + + int srcBits = style.GetTextEffects(); + int srcFlags = style.GetTextEffectFlags(); + + // Reset incompatible bits in the destination + wxResetIncompatibleBits((wxTEXT_ATTR_EFFECT_SUPERSCRIPT|wxTEXT_ATTR_EFFECT_SUBSCRIPT), srcFlags, destFlags, destBits); + wxResetIncompatibleBits((wxTEXT_ATTR_EFFECT_CAPITALS|wxTEXT_ATTR_EFFECT_SMALL_CAPITALS), srcFlags, destFlags, destBits); + wxResetIncompatibleBits((wxTEXT_ATTR_EFFECT_STRIKETHROUGH|wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH), srcFlags, destFlags, destBits); + + CombineBitlists(destBits, srcBits, destFlags, srcFlags); + + destStyle.SetTextEffects(destBits); + destStyle.SetTextEffectFlags(destFlags); + } + } + + if (style.HasOutlineLevel()) + { + if (!(compareWith && compareWith->HasOutlineLevel() && compareWith->GetOutlineLevel() == style.GetOutlineLevel())) + destStyle.SetOutlineLevel(style.GetOutlineLevel()); + } + + return true; +} + +/* static */ +wxTextAttr wxTextAttr::Combine(const wxTextAttr& attr, + const wxTextAttr& attrDef, + const wxTextCtrlBase *text) +{ + wxFont font; + if (attr.HasFont()) + font = attr.GetFont(); + + if ( !font.IsOk() ) + { + if (attrDef.HasFont()) + font = attrDef.GetFont(); + + if ( text && !font.IsOk() ) + font = text->GetFont(); + } + + wxColour colFg = attr.GetTextColour(); + if ( !colFg.IsOk() ) + { + colFg = attrDef.GetTextColour(); + + if ( text && !colFg.IsOk() ) + colFg = text->GetForegroundColour(); + } + + wxColour colBg = attr.GetBackgroundColour(); + if ( !colBg.IsOk() ) + { + colBg = attrDef.GetBackgroundColour(); + + if ( text && !colBg.IsOk() ) + colBg = text->GetBackgroundColour(); + } + + wxTextAttr newAttr(colFg, colBg, font); + + if (attr.HasAlignment()) + newAttr.SetAlignment(attr.GetAlignment()); + else if (attrDef.HasAlignment()) + newAttr.SetAlignment(attrDef.GetAlignment()); + + if (attr.HasTabs()) + newAttr.SetTabs(attr.GetTabs()); + else if (attrDef.HasTabs()) + newAttr.SetTabs(attrDef.GetTabs()); + + if (attr.HasLeftIndent()) + newAttr.SetLeftIndent(attr.GetLeftIndent(), attr.GetLeftSubIndent()); + else if (attrDef.HasLeftIndent()) + newAttr.SetLeftIndent(attrDef.GetLeftIndent(), attr.GetLeftSubIndent()); + + if (attr.HasRightIndent()) + newAttr.SetRightIndent(attr.GetRightIndent()); + else if (attrDef.HasRightIndent()) + newAttr.SetRightIndent(attrDef.GetRightIndent()); + + return newAttr; +} + +/// Compare tabs +bool wxTextAttr::TabsEq(const wxArrayInt& tabs1, const wxArrayInt& tabs2) +{ + if (tabs1.GetCount() != tabs2.GetCount()) + return false; + + size_t i; + for (i = 0; i < tabs1.GetCount(); i++) + { + if (tabs1[i] != tabs2[i]) + return false; + } + return true; +} + +// Remove attributes +bool wxTextAttr::RemoveStyle(wxTextAttr& destStyle, const wxTextAttr& style) +{ + int flags = style.GetFlags(); + int destFlags = destStyle.GetFlags(); + + // We must treat text effects specially, since we must remove only some. + if (style.HasTextEffects() && (style.GetTextEffectFlags() != 0)) + { + int newTextEffectFlags = destStyle.GetTextEffectFlags() & ~style.GetTextEffectFlags(); + int newTextEffects = destStyle.GetTextEffects() & ~style.GetTextEffectFlags(); + destStyle.SetTextEffects(newTextEffects); + destStyle.SetTextEffectFlags(newTextEffectFlags); + + // Don't remove wxTEXT_ATTR_EFFECTS unless the resulting flags are zero + if (newTextEffectFlags != 0) + flags &= ~wxTEXT_ATTR_EFFECTS; + } + + destStyle.SetFlags(destFlags & ~flags); + + return true; +} + +/// Combine two bitlists, specifying the bits of interest with separate flags. +bool wxTextAttr::CombineBitlists(int& valueA, int valueB, int& flagsA, int flagsB) +{ + // We want to apply B's bits to A, taking into account each's flags which indicate which bits + // are to be taken into account. A zero in B's bits should reset that bit in A but only if B's flags + // indicate it. + + // First, reset the 0 bits from B. We make a mask so we're only dealing with B's zero + // bits at this point, ignoring any 1 bits in B or 0 bits in B that are not relevant. + int valueA2 = ~(~valueB & flagsB) & valueA; + + // Now combine the 1 bits. + int valueA3 = (valueB & flagsB) | valueA2; + + valueA = valueA3; + flagsA = (flagsA | flagsB); + + return true; +} + +/// Compare two bitlists +bool wxTextAttr::BitlistsEqPartial(int valueA, int valueB, int flags) +{ + int relevantBitsA = valueA & flags; + int relevantBitsB = valueB & flags; + return relevantBitsA == relevantBitsB; +} + +/// Split into paragraph and character styles +bool wxTextAttr::SplitParaCharStyles(const wxTextAttr& style, wxTextAttr& parStyle, wxTextAttr& charStyle) +{ + wxTextAttr defaultCharStyle1(style); + wxTextAttr defaultParaStyle1(style); + defaultCharStyle1.SetFlags(defaultCharStyle1.GetFlags()&wxTEXT_ATTR_CHARACTER); + defaultParaStyle1.SetFlags(defaultParaStyle1.GetFlags()&wxTEXT_ATTR_PARAGRAPH); + + charStyle.Apply(defaultCharStyle1); + parStyle.Apply(defaultParaStyle1); + + return true; +} + +// apply styling to text range +bool wxTextCtrlBase::SetStyle(long WXUNUSED(start), long WXUNUSED(end), + const wxTextAttr& WXUNUSED(style)) +{ + // to be implemented in derived classes + return false; +} + +// get the styling at the given position +bool wxTextCtrlBase::GetStyle(long WXUNUSED(position), wxTextAttr& WXUNUSED(style)) +{ + // to be implemented in derived classes + return false; +} + +// change default text attributes +bool wxTextCtrlBase::SetDefaultStyle(const wxTextAttr& style) +{ + // keep the old attributes if the new style doesn't specify them unless the + // new style is empty - then reset m_defaultStyle (as there is no other way + // to do it) + if ( style.IsDefault() ) + m_defaultStyle = style; + else + m_defaultStyle = wxTextAttr::Combine(style, m_defaultStyle, this); + + return true; +} + +// ---------------------------------------------------------------------------- +// file IO functions +// ---------------------------------------------------------------------------- + +bool wxTextAreaBase::DoLoadFile(const wxString& filename, int WXUNUSED(fileType)) +{ +#if wxUSE_FFILE + wxFFile file(filename); + if ( file.IsOpened() ) + { + wxString text; + if ( file.ReadAll(&text) ) + { + SetValue(text); + + DiscardEdits(); + m_filename = filename; + + return true; + } + } +#else + (void)filename; // avoid compiler warning about unreferenced parameter +#endif // wxUSE_FFILE + + wxLogError(_("File couldn't be loaded.")); + + return false; +} + +bool wxTextAreaBase::DoSaveFile(const wxString& filename, int WXUNUSED(fileType)) +{ +#if wxUSE_FFILE + wxFFile file(filename, wxT("w")); + if ( file.IsOpened() && file.Write(GetValue()) ) + { + // if it worked, save for future calls + m_filename = filename; + + // it's not modified any longer + DiscardEdits(); + + return true; + } +#else + (void)filename; // avoid compiler warning about unreferenced parameter +#endif // wxUSE_FFILE + + return false; +} + +bool wxTextAreaBase::SaveFile(const wxString& filename, int fileType) +{ + wxString filenameToUse = filename.empty() ? m_filename : filename; + if ( filenameToUse.empty() ) + { + // what kind of message to give? is it an error or a program bug? + wxLogDebug(wxT("Can't save textctrl to file without filename.")); + + return false; + } + + return DoSaveFile(filenameToUse, fileType); +} + +// ---------------------------------------------------------------------------- +// stream-like insertion operator +// ---------------------------------------------------------------------------- + +wxTextCtrl& wxTextCtrlBase::operator<<(const wxString& s) +{ + AppendText(s); + return *TEXTCTRL(this); +} + +wxTextCtrl& wxTextCtrlBase::operator<<(double d) +{ + return *this << wxString::Format("%.2f", d); +} + +wxTextCtrl& wxTextCtrlBase::operator<<(int i) +{ + return *this << wxString::Format("%d", i); +} + +wxTextCtrl& wxTextCtrlBase::operator<<(long l) +{ + return *this << wxString::Format("%ld", l); +} + +// ---------------------------------------------------------------------------- +// streambuf methods implementation +// ---------------------------------------------------------------------------- + +#if wxHAS_TEXT_WINDOW_STREAM + +int wxTextCtrlBase::overflow(int c) +{ + AppendText((wxChar)c); + + // return something different from EOF + return 0; +} + +#endif // wxHAS_TEXT_WINDOW_STREAM + +// ---------------------------------------------------------------------------- +// emulating key presses +// ---------------------------------------------------------------------------- + +bool wxTextCtrlBase::EmulateKeyPress(const wxKeyEvent& event) +{ + bool handled = false; + // we have a native implementation for Win32 and so don't need this one +#ifndef __WIN32__ + wxChar ch = 0; + int keycode = event.GetKeyCode(); + + long from, to; + GetSelection(&from,&to); + long insert = GetInsertionPoint(); + long last = GetLastPosition(); + + // catch arrow left and right + + switch ( keycode ) + { + case WXK_LEFT: + if ( event.ShiftDown() ) + SetSelection( (from > 0 ? from - 1 : 0) , to ); + else + { + if ( from != to ) + insert = from; + else if ( insert > 0 ) + insert -= 1; + SetInsertionPoint( insert ); + } + handled = true; + break; + case WXK_RIGHT: + if ( event.ShiftDown() ) + SetSelection( from, (to < last ? to + 1 : last) ); + else + { + if ( from != to ) + insert = to; + else if ( insert < last ) + insert += 1; + SetInsertionPoint( insert ); + } + handled = true; + break; + case WXK_NUMPAD0: + case WXK_NUMPAD1: + case WXK_NUMPAD2: + case WXK_NUMPAD3: + case WXK_NUMPAD4: + case WXK_NUMPAD5: + case WXK_NUMPAD6: + case WXK_NUMPAD7: + case WXK_NUMPAD8: + case WXK_NUMPAD9: + ch = (wxChar)(wxT('0') + keycode - WXK_NUMPAD0); + break; + + case WXK_MULTIPLY: + case WXK_NUMPAD_MULTIPLY: + ch = wxT('*'); + break; + + case WXK_ADD: + case WXK_NUMPAD_ADD: + ch = wxT('+'); + break; + + case WXK_SUBTRACT: + case WXK_NUMPAD_SUBTRACT: + ch = wxT('-'); + break; + + case WXK_DECIMAL: + case WXK_NUMPAD_DECIMAL: + ch = wxT('.'); + break; + + case WXK_DIVIDE: + case WXK_NUMPAD_DIVIDE: + ch = wxT('/'); + break; + + case WXK_DELETE: + case WXK_NUMPAD_DELETE: + // delete the character at cursor + { + const long pos = GetInsertionPoint(); + if ( pos < GetLastPosition() ) + Remove(pos, pos + 1); + handled = true; + } + break; + + case WXK_BACK: + // delete the character before the cursor + { + const long pos = GetInsertionPoint(); + if ( pos > 0 ) + Remove(pos - 1, pos); + handled = true; + } + break; + + default: +#if wxUSE_UNICODE + if ( event.GetUnicodeKey() ) + { + ch = event.GetUnicodeKey(); + } + else +#endif + if ( keycode < 256 && keycode >= 0 && wxIsprint(keycode) ) + { + // FIXME this is not going to work for non letters... + if ( !event.ShiftDown() ) + { + keycode = wxTolower(keycode); + } + + ch = (wxChar)keycode; + } + else + { + ch = wxT('\0'); + } + } + + if ( ch ) + { + WriteText(ch); + + handled = true; + } +#else // __WIN32__ + wxUnusedVar(event); +#endif // !__WIN32__/__WIN32__ + + return handled; +} + +// ---------------------------------------------------------------------------- +// Other miscellaneous stuff +// ---------------------------------------------------------------------------- + +bool wxTextCtrlBase::SetHint(const wxString& hint) +{ + wxCHECK_MSG( IsSingleLine(), false, + wxS("Hints can only be set for single line text controls") ); + + return wxTextEntry::SetHint(hint); +} + +// do the window-specific processing after processing the update event +void wxTextCtrlBase::DoUpdateWindowUI(wxUpdateUIEvent& event) +{ + // call inherited, but skip the wxControl's version, and call directly the + // wxWindow's one instead, because the only reason why we are overriding this + // function is that we want to use SetValue() instead of wxControl::SetLabel() + wxWindowBase::DoUpdateWindowUI(event); + + // update text + if ( event.GetSetText() ) + { + if ( event.GetText() != GetValue() ) + SetValue(event.GetText()); + } +} + +// ---------------------------------------------------------------------------- +// hit testing +// ---------------------------------------------------------------------------- + +wxTextCtrlHitTestResult +wxTextAreaBase::HitTest(const wxPoint& pt, wxTextCoord *x, wxTextCoord *y) const +{ + // implement in terms of the other overload as the native ports typically + // can get the position and not (x, y) pair directly (although wxUniv + // directly gets x and y -- and so overrides this method as well) + long pos; + wxTextCtrlHitTestResult rc = HitTest(pt, &pos); + + if ( rc != wxTE_HT_UNKNOWN ) + { + PositionToXY(pos, x, y); + } + + return rc; +} + +wxTextCtrlHitTestResult +wxTextAreaBase::HitTest(const wxPoint& WXUNUSED(pt), long * WXUNUSED(pos)) const +{ + // not implemented + return wxTE_HT_UNKNOWN; +} + +wxPoint wxTextAreaBase::PositionToCoords(long pos) const +{ + wxCHECK_MSG( IsValidPosition(pos), wxDefaultPosition, + wxS("Position argument out of range.") ); + + return DoPositionToCoords(pos); +} + +wxPoint wxTextAreaBase::DoPositionToCoords(long WXUNUSED(pos)) const +{ + return wxDefaultPosition; +} + +#else // !wxUSE_TEXTCTRL + +// define this one even if !wxUSE_TEXTCTRL because it is also used by other +// controls (wxComboBox and wxSpinCtrl) + +wxDEFINE_EVENT( wxEVT_TEXT, wxCommandEvent ); + +#endif // wxUSE_TEXTCTRL/!wxUSE_TEXTCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/textentrycmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/textentrycmn.cpp new file mode 100644 index 0000000000..b1480e322e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/textentrycmn.cpp @@ -0,0 +1,416 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/textentrycmn.cpp +// Purpose: wxTextEntryBase implementation +// Author: Vadim Zeitlin +// Created: 2007-09-26 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TEXTCTRL || wxUSE_COMBOBOX + +#ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/dataobj.h" +#endif //WX_PRECOMP + +#include "wx/textentry.h" +#include "wx/textcompleter.h" +#include "wx/clipbrd.h" + +// ---------------------------------------------------------------------------- +// wxTextEntryHintData +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxTextEntryHintData wxBIND_OR_CONNECT_HACK_ONLY_BASE_CLASS +{ +public: + wxTextEntryHintData(wxTextEntryBase *entry, wxWindow *win) + : m_entry(entry), + m_win(win), + m_text(m_entry->GetValue()) + { + wxBIND_OR_CONNECT_HACK(win, wxEVT_SET_FOCUS, wxFocusEventHandler, + wxTextEntryHintData::OnSetFocus, this); + wxBIND_OR_CONNECT_HACK(win, wxEVT_KILL_FOCUS, wxFocusEventHandler, + wxTextEntryHintData::OnKillFocus, this); + wxBIND_OR_CONNECT_HACK(win, wxEVT_TEXT, + wxCommandEventHandler, + wxTextEntryHintData::OnTextChanged, this); + } + + // default dtor is ok + + // Get the real text of the control such as it was before we replaced it + // with the hint. + const wxString& GetText() const { return m_text; } + + // Set the hint to show, shouldn't be empty normally. + // + // This should be called after creating a new wxTextEntryHintData object + // and may be called more times in the future. + void SetHintString(const wxString& hint) + { + m_hint = hint; + + if ( !m_win->HasFocus() ) + ShowHintIfAppropriate(); + //else: The new hint will be shown later when we lose focus. + } + + const wxString& GetHintString() const { return m_hint; } + + // This is called whenever the text control contents changes. + // + // We call it ourselves when this change generates an event but it's also + // necessary to call it explicitly from wxTextEntry::ChangeValue() as it, + // by design, does not generate any events. + void HandleTextUpdate(const wxString& text) + { + m_text = text; + + // If we're called because of a call to Set or ChangeValue(), the + // control may still have the hint text colour, reset it in this case. + RestoreTextColourIfNecessary(); + } + +private: + // Show the hint in the window if we should do it, i.e. if the window + // doesn't have any text of its own. + void ShowHintIfAppropriate() + { + // Never overwrite existing window text. + if ( !m_text.empty() ) + return; + + // Save the old text colour and set a more inconspicuous one for the + // hint. + m_colFg = m_win->GetForegroundColour(); + m_win->SetForegroundColour(*wxLIGHT_GREY); + + m_entry->DoSetValue(m_hint, wxTextEntryBase::SetValue_NoEvent); + } + + // Restore the original text colour if we had changed it to show the hint + // and not restored it yet. + void RestoreTextColourIfNecessary() + { + if ( m_colFg.IsOk() ) + { + m_win->SetForegroundColour(m_colFg); + m_colFg = wxColour(); + } + } + + void OnSetFocus(wxFocusEvent& event) + { + // If we had been showing the hint before, remove it now and restore + // the normal colour. + if ( m_text.empty() ) + { + RestoreTextColourIfNecessary(); + + m_entry->DoSetValue(wxString(), wxTextEntryBase::SetValue_NoEvent); + } + + event.Skip(); + } + + void OnKillFocus(wxFocusEvent& event) + { + // Restore the hint if the user didn't enter anything. + ShowHintIfAppropriate(); + + event.Skip(); + } + + void OnTextChanged(wxCommandEvent& event) + { + // Update the stored window text. + // + // Notice that we can't use GetValue() nor wxCommandEvent::GetString() + // which uses it internally because this would just forward back to us + // so go directly to the private method which returns the real control + // contents. + HandleTextUpdate(m_entry->DoGetValue()); + + event.Skip(); + } + + + // the text control we're associated with (as its interface and its window) + wxTextEntryBase * const m_entry; + wxWindow * const m_win; + + // the original foreground colour of m_win before we changed it + wxColour m_colFg; + + // The hint passed to wxTextEntry::SetHint(), never empty. + wxString m_hint; + + // The real text of the window. + wxString m_text; + + + wxDECLARE_NO_COPY_CLASS(wxTextEntryHintData); +}; + +// ============================================================================ +// wxTextEntryBase implementation +// ============================================================================ + +wxTextEntryBase::~wxTextEntryBase() +{ + delete m_hintData; +} + +// ---------------------------------------------------------------------------- +// text accessors +// ---------------------------------------------------------------------------- + +wxString wxTextEntryBase::GetValue() const +{ + return m_hintData ? m_hintData->GetText() : DoGetValue(); +} + +wxString wxTextEntryBase::GetRange(long from, long to) const +{ + wxString sel; + wxString value = GetValue(); + + if ( from < to && (long)value.length() >= to ) + { + sel = value.substr(from, to - from); + } + + return sel; +} + +// ---------------------------------------------------------------------------- +// text operations +// ---------------------------------------------------------------------------- + +void wxTextEntryBase::ChangeValue(const wxString& value) +{ + DoSetValue(value, SetValue_NoEvent); + + // As we didn't generate any events for wxTextEntryHintData to catch, + // notify it explicitly about our changed contents. + if ( m_hintData ) + m_hintData->HandleTextUpdate(value); +} + +void wxTextEntryBase::AppendText(const wxString& text) +{ + SetInsertionPointEnd(); + WriteText(text); +} + +void wxTextEntryBase::DoSetValue(const wxString& value, int flags) +{ + if ( value != DoGetValue() ) + { + EventsSuppressor noeventsIf(this, !(flags & SetValue_SendEvent)); + + SelectAll(); + WriteText(value); + + SetInsertionPoint(0); + } + else // Same value, no need to do anything. + { + // Except that we still need to generate the event for consistency with + // the normal case when the text does change. + if ( flags & SetValue_SendEvent ) + SendTextUpdatedEvent(GetEditableWindow()); + } +} + +void wxTextEntryBase::Replace(long from, long to, const wxString& value) +{ + { + EventsSuppressor noevents(this); + Remove(from, to); + } + + SetInsertionPoint(from); + WriteText(value); +} + +// ---------------------------------------------------------------------------- +// selection +// ---------------------------------------------------------------------------- + +bool wxTextEntryBase::HasSelection() const +{ + long from, to; + GetSelection(&from, &to); + + return from < to; +} + +void wxTextEntryBase::RemoveSelection() +{ + long from, to; + GetSelection(& from, & to); + if (from != -1 && to != -1) + Remove(from, to); +} + +wxString wxTextEntryBase::GetStringSelection() const +{ + long from, to; + GetSelection(&from, &to); + + return GetRange(from, to); +} + +// ---------------------------------------------------------------------------- +// clipboard +// ---------------------------------------------------------------------------- + +bool wxTextEntryBase::CanCopy() const +{ + return HasSelection(); +} + +bool wxTextEntryBase::CanCut() const +{ + return CanCopy() && IsEditable(); +} + +bool wxTextEntryBase::CanPaste() const +{ + if ( IsEditable() ) + { +#if wxUSE_CLIPBOARD + // check if there is any text on the clipboard + if ( wxTheClipboard->IsSupported(wxDF_TEXT) +#if wxUSE_UNICODE + || wxTheClipboard->IsSupported(wxDF_UNICODETEXT) +#endif // wxUSE_UNICODE + ) + { + return true; + } +#endif // wxUSE_CLIPBOARD + } + + return false; +} + +// ---------------------------------------------------------------------------- +// hints support +// ---------------------------------------------------------------------------- + +bool wxTextEntryBase::SetHint(const wxString& hint) +{ + if ( !hint.empty() ) + { + if ( !m_hintData ) + m_hintData = new wxTextEntryHintData(this, GetEditableWindow()); + + m_hintData->SetHintString(hint); + } + else if ( m_hintData ) + { + // Setting empty hint removes any currently set one. + delete m_hintData; + m_hintData = NULL; + } + //else: Setting empty hint when we don't have any doesn't do anything. + + return true; +} + +wxString wxTextEntryBase::GetHint() const +{ + return m_hintData ? m_hintData->GetHintString() : wxString(); +} + +// ---------------------------------------------------------------------------- +// margins support +// ---------------------------------------------------------------------------- + +bool wxTextEntryBase::DoSetMargins(const wxPoint& WXUNUSED(pt)) +{ + return false; +} + +wxPoint wxTextEntryBase::DoGetMargins() const +{ + return wxPoint(-1, -1); +} + +// ---------------------------------------------------------------------------- +// events +// ---------------------------------------------------------------------------- + +/* static */ +bool wxTextEntryBase::SendTextUpdatedEvent(wxWindow *win) +{ + wxCHECK_MSG( win, false, "can't send an event without a window" ); + + wxCommandEvent event(wxEVT_TEXT, win->GetId()); + + // do not do this as it could be very inefficient if the text control + // contains a lot of text and we're not using ref-counted wxString + // implementation -- instead, event.GetString() will query the control for + // its current text if needed + //event.SetString(win->GetValue()); + + event.SetEventObject(win); + return win->HandleWindowEvent(event); +} + +// ---------------------------------------------------------------------------- +// auto-completion stubs +// ---------------------------------------------------------------------------- + +wxTextCompleter::~wxTextCompleter() +{ +} + +bool wxTextCompleterSimple::Start(const wxString& prefix) +{ + m_index = 0; + m_completions.clear(); + GetCompletions(prefix, m_completions); + + return !m_completions.empty(); +} + +wxString wxTextCompleterSimple::GetNext() +{ + if ( m_index == m_completions.size() ) + return wxString(); + + return m_completions[m_index++]; +} + +bool wxTextEntryBase::DoAutoCompleteCustom(wxTextCompleter *completer) +{ + // We don't do anything here but we still need to delete the completer for + // consistency with the ports that do implement this method and take + // ownership of the pointer. + delete completer; + + return false; +} + +#endif // wxUSE_TEXTCTRL || wxUSE_COMBOBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/textfile.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/textfile.cpp new file mode 100644 index 0000000000..6cb4e68783 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/textfile.cpp @@ -0,0 +1,286 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/textfile.cpp +// Purpose: implementation of wxTextFile class +// Author: Vadim Zeitlin +// Modified by: +// Created: 03.04.98 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// headers +// ============================================================================ + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif //__BORLANDC__ + +#if !wxUSE_FILE || !wxUSE_TEXTBUFFER + #undef wxUSE_TEXTFILE + #define wxUSE_TEXTFILE 0 +#endif // wxUSE_FILE + +#if wxUSE_TEXTFILE + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/file.h" + #include "wx/log.h" +#endif + +#include "wx/textfile.h" +#include "wx/filename.h" +#include "wx/buffer.h" + +// ============================================================================ +// wxTextFile class implementation +// ============================================================================ + +wxTextFile::wxTextFile(const wxString& strFileName) + : wxTextBuffer(strFileName) +{ +} + + +// ---------------------------------------------------------------------------- +// file operations +// ---------------------------------------------------------------------------- + +bool wxTextFile::OnExists() const +{ + return wxFile::Exists(m_strBufferName); +} + + +bool wxTextFile::OnOpen(const wxString &strBufferName, wxTextBufferOpenMode OpenMode) +{ + wxFile::OpenMode FileOpenMode; + + switch ( OpenMode ) + { + default: + wxFAIL_MSG( wxT("unknown open mode in wxTextFile::Open") ); + // fall through + + case ReadAccess : + FileOpenMode = wxFile::read; + break; + + case WriteAccess : + FileOpenMode = wxFile::write; + break; + } + + return m_file.Open(strBufferName.c_str(), FileOpenMode); +} + + +bool wxTextFile::OnClose() +{ + return m_file.Close(); +} + + +bool wxTextFile::OnRead(const wxMBConv& conv) +{ + // file should be opened + wxASSERT_MSG( m_file.IsOpened(), wxT("can't read closed file") ); + + // read the entire file in memory: this is not the most efficient thing to + // do it but there is no good way to avoid it in Unicode build because if + // we read the file block by block we can't convert each block to Unicode + // separately (the last multibyte char in the block might be only partially + // read and so the conversion would fail) and, as the file contents is kept + // in memory by wxTextFile anyhow, it shouldn't be a big problem to read + // the file entirely + size_t bufSize = 0; + + // number of bytes to (try to) read from disk at once + static const size_t BLOCK_SIZE = 4096; + + wxCharBuffer buf; + + // first determine if the file is seekable or not and so whether we can + // determine its length in advance + wxFileOffset fileLength; + { + wxLogNull logNull; + fileLength = m_file.Length(); + } + + // some non-seekable files under /proc under Linux pretend that they're + // seekable but always return 0; others do return an error + const bool seekable = fileLength != wxInvalidOffset && fileLength != 0; + if ( seekable ) + { + // we know the required length, so set the buffer size in advance + bufSize = fileLength; + if ( !buf.extend(bufSize) ) + return false; + + // if the file is seekable, also check that we're at its beginning + wxASSERT_MSG( m_file.Tell() == 0, wxT("should be at start of file") ); + + char *dst = buf.data(); + for ( size_t nRemaining = bufSize; nRemaining > 0; ) + { + size_t nToRead = BLOCK_SIZE; + + // the file size could have changed, avoid overflowing the buffer + // even if it did + if ( nToRead > nRemaining ) + nToRead = nRemaining; + + ssize_t nRead = m_file.Read(dst, nToRead); + + if ( nRead == wxInvalidOffset ) + { + // read error (error message already given in wxFile::Read) + return false; + } + + if ( nRead == 0 ) + { + // this file can't be empty because we checked for this above + // so this must be the end of file + break; + } + + dst += nRead; + nRemaining -= nRead; + } + + wxASSERT_MSG( dst - buf.data() == (wxFileOffset)bufSize, + wxT("logic error") ); + } + else // file is not seekable + { + char block[BLOCK_SIZE]; + for ( ;; ) + { + ssize_t nRead = m_file.Read(block, WXSIZEOF(block)); + + if ( nRead == wxInvalidOffset ) + { + // read error (error message already given in wxFile::Read) + return false; + } + + if ( nRead == 0 ) + { + // if no bytes have been read, presumably this is a + // valid-but-empty file + if ( bufSize == 0 ) + return true; + + // otherwise we've finished reading the file + break; + } + + // extend the buffer for new data + if ( !buf.extend(bufSize + nRead) ) + return false; + + // and append it to the buffer + memcpy(buf.data() + bufSize, block, nRead); + bufSize += nRead; + } + } + + const wxString str(buf, conv, bufSize); + + // there's no risk of this happening in ANSI build +#if wxUSE_UNICODE + if ( bufSize > 4 && str.empty() ) + { + wxLogError(_("Failed to convert file \"%s\" to Unicode."), GetName()); + return false; + } +#endif // wxUSE_UNICODE + + // we don't need this memory any more + buf.reset(); + + + // now break the buffer in lines + + // the beginning of the current line, changes inside the loop + wxString::const_iterator lineStart = str.begin(); + const wxString::const_iterator end = str.end(); + for ( wxString::const_iterator p = lineStart; p != end; p++ ) + { + const wxChar ch = *p; + if ( ch == '\r' || ch == '\n' ) + { + // Determine the kind of line ending this is. + wxTextFileType lineType = wxTextFileType_None; + if ( ch == '\r' ) + { + wxString::const_iterator next = p + 1; + if ( next != end && *next == '\n' ) + lineType = wxTextFileType_Dos; + else + lineType = wxTextFileType_Mac; + } + else // ch == '\n' + { + lineType = wxTextFileType_Unix; + } + + AddLine(wxString(lineStart, p), lineType); + + // DOS EOL is the only one consisting of two chars, not one. + if ( lineType == wxTextFileType_Dos ) + p++; + + lineStart = p + 1; + } + } + + // anything in the last line? + if ( lineStart != end ) + { + // Add the last line; notice that it is certainly not terminated with a + // newline, otherwise it would be handled above. + wxString lastLine(lineStart, end); + AddLine(lastLine, wxTextFileType_None); + } + + return true; +} + + +bool wxTextFile::OnWrite(wxTextFileType typeNew, const wxMBConv& conv) +{ + wxFileName fn = m_strBufferName; + + // We do NOT want wxPATH_NORM_CASE here, or the case will not + // be preserved. + if ( !fn.IsAbsolute() ) + fn.Normalize(wxPATH_NORM_ENV_VARS | wxPATH_NORM_DOTS | wxPATH_NORM_TILDE | + wxPATH_NORM_ABSOLUTE | wxPATH_NORM_LONG); + + wxTempFile fileTmp(fn.GetFullPath()); + + if ( !fileTmp.IsOpened() ) { + wxLogError(_("can't write buffer '%s' to disk."), m_strBufferName.c_str()); + return false; + } + + size_t nCount = GetLineCount(); + for ( size_t n = 0; n < nCount; n++ ) { + fileTmp.Write(GetLine(n) + + GetEOL(typeNew == wxTextFileType_None ? GetLineType(n) + : typeNew), + conv); + } + + // replace the old file with this one + return fileTmp.Commit(); +} + +#endif // wxUSE_TEXTFILE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/textmeasurecmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/textmeasurecmn.cpp new file mode 100644 index 0000000000..8d828d4b71 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/textmeasurecmn.cpp @@ -0,0 +1,280 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/textmeasurecmn.cpp +// Purpose: wxTextMeasureBase implementation +// Author: Manuel Martin +// Created: 2012-10-05 +// Copyright: (c) 1997-2012 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifndef WX_PRECOMP + #include "wx/dc.h" + #include "wx/window.h" +#endif //WX_PRECOMP + +#include "wx/private/textmeasure.h" + +// ============================================================================ +// wxTextMeasureBase implementation +// ============================================================================ + +wxTextMeasureBase::wxTextMeasureBase(const wxDC *dc, const wxFont *theFont) + : m_dc(dc), + m_win(NULL), + m_font(theFont) +{ + wxASSERT_MSG( dc, wxS("wxTextMeasure needs a valid wxDC") ); + + // By default, use wxDC version, we'll explicitly reset this to false in + // the derived classes if the DC is of native variety. + m_useDCImpl = true; +} + +wxTextMeasureBase::wxTextMeasureBase(const wxWindow *win, const wxFont *theFont) + : m_dc(NULL), + m_win(win), + m_font(theFont) +{ + wxASSERT_MSG( win, wxS("wxTextMeasure needs a valid wxWindow") ); + + // We don't have any wxDC so we can't forward to it. + m_useDCImpl = false; +} + +wxFont wxTextMeasureBase::GetFont() const +{ + return m_font ? *m_font + : m_win ? m_win->GetFont() + : m_dc->GetFont(); +} + +void wxTextMeasureBase::CallGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent, + wxCoord *externalLeading) +{ + if ( m_useDCImpl ) + m_dc->GetTextExtent(string, width, height, descent, externalLeading); + else + DoGetTextExtent(string, width, height, descent, externalLeading); +} + +void wxTextMeasureBase::GetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent, + wxCoord *externalLeading) +{ + // To make the code simpler, make sure that the width and height pointers + // are always valid, even if they point to dummy variables. + int unusedWidth, unusedHeight; + if ( !width ) + width = &unusedWidth; + if ( !height ) + height = &unusedHeight; + + // Avoid even setting up the DC for measuring if we don't actually need to + // measure anything. + if ( string.empty() && !descent && !externalLeading ) + { + *width = + *height = 0; + + return; + } + + MeasuringGuard guard(*this); + + CallGetTextExtent(string, width, height, descent, externalLeading); +} + +void wxTextMeasureBase::GetMultiLineTextExtent(const wxString& text, + wxCoord *width, + wxCoord *height, + wxCoord *heightOneLine) +{ + MeasuringGuard guard(*this); + + wxCoord widthTextMax = 0, widthLine, + heightTextTotal = 0, heightLineDefault = 0, heightLine = 0; + + wxString curLine; + for ( wxString::const_iterator pc = text.begin(); ; ++pc ) + { + if ( pc == text.end() || *pc == wxS('\n') ) + { + if ( curLine.empty() ) + { + // we can't use GetTextExtent - it will return 0 for both width + // and height and an empty line should count in height + // calculation + + // assume that this line has the same height as the previous + // one + if ( !heightLineDefault ) + heightLineDefault = heightLine; + + if ( !heightLineDefault ) + { + // but we don't know it yet - choose something reasonable + int dummy; + CallGetTextExtent(wxS("W"), &dummy, &heightLineDefault); + } + + heightTextTotal += heightLineDefault; + } + else + { + CallGetTextExtent(curLine, &widthLine, &heightLine); + if ( widthLine > widthTextMax ) + widthTextMax = widthLine; + heightTextTotal += heightLine; + } + + if ( pc == text.end() ) + { + break; + } + else // '\n' + { + curLine.clear(); + } + } + else + { + curLine += *pc; + } + } + + if ( width ) + *width = widthTextMax; + if ( height ) + *height = heightTextTotal; + if ( heightOneLine ) + *heightOneLine = heightLine; +} + +wxSize wxTextMeasureBase::GetLargestStringExtent(size_t n, + const wxString* strings) +{ + MeasuringGuard guard(*this); + + wxCoord w, h, widthMax = 0, heightMax = 0; + for ( size_t i = 0; i < n; ++i ) + { + CallGetTextExtent(strings[i], &w, &h); + + if ( w > widthMax ) + widthMax = w; + if ( h > heightMax ) + heightMax = h; + } + + return wxSize(widthMax, heightMax); +} + +bool wxTextMeasureBase::GetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX) +{ + widths.Empty(); + if ( text.empty() ) + return true; + + MeasuringGuard guard(*this); + + widths.Add(0, text.length()); + + return DoGetPartialTextExtents(text, widths, scaleX); +} + +// ---------------------------------------------------------------------------- +// Generic and inefficient DoGetPartialTextExtents() implementation. +// ---------------------------------------------------------------------------- + +// Each element of the widths array will be the width of the string up to and +// including the corresponding character in text. This is the generic +// implementation, the port-specific classes should do this with native APIs +// if available and if faster. Note: pango_layout_index_to_pos is much slower +// than calling GetTextExtent!! + +#define FWC_SIZE 256 + +class FontWidthCache +{ +public: + FontWidthCache() : m_scaleX(1), m_widths(NULL) { } + ~FontWidthCache() { delete []m_widths; } + + void Reset() + { + if ( !m_widths ) + m_widths = new int[FWC_SIZE]; + + memset(m_widths, 0, sizeof(int)*FWC_SIZE); + } + + wxFont m_font; + double m_scaleX; + int *m_widths; +}; + +static FontWidthCache s_fontWidthCache; + +bool wxTextMeasureBase::DoGetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX) +{ + int totalWidth = 0; + + // reset the cache if font or horizontal scale have changed + if ( !s_fontWidthCache.m_widths || + !wxIsSameDouble(s_fontWidthCache.m_scaleX, scaleX) || + (s_fontWidthCache.m_font != *m_font) ) + { + s_fontWidthCache.Reset(); + s_fontWidthCache.m_font = *m_font; + s_fontWidthCache.m_scaleX = scaleX; + } + + // Calculate the position of each character based on the widths of + // the previous characters. This is inexact for not fixed fonts. + int n = 0; + for ( wxString::const_iterator it = text.begin(); + it != text.end(); + ++it ) + { + const wxChar c = *it; + unsigned int c_int = (unsigned int)c; + + int w; + if ((c_int < FWC_SIZE) && (s_fontWidthCache.m_widths[c_int] != 0)) + { + w = s_fontWidthCache.m_widths[c_int]; + } + else + { + DoGetTextExtent(c, &w, NULL); + if (c_int < FWC_SIZE) + s_fontWidthCache.m_widths[c_int] = w; + } + + totalWidth += w; + widths[n++] = totalWidth; + } + + return true; +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/threadinfo.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/threadinfo.cpp new file mode 100644 index 0000000000..e77682db17 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/threadinfo.cpp @@ -0,0 +1,103 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/threadinfo.cpp +// Purpose: declaration of wxThreadSpecificInfo: thread-specific information +// Author: Vaclav Slavik +// Created: 2013-09-14 +// Copyright: (c) 2013 Vaclav Slavik +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#include "wx/private/threadinfo.h" + +#if wxUSE_THREADS + +#include "wx/tls.h" +#include "wx/thread.h" +#include "wx/sharedptr.h" +#include "wx/vector.h" + +namespace +{ + +// All thread info objects are stored in a global list so that they are +// freed when global objects are destroyed and no memory leaks are reported. + +// Notice that we must be using accessor functions instead of simple global +// variables here as this code could be executed during global initialization +// time, i.e. before any globals in this module were initialzied. +inline wxCriticalSection& GetAllThreadInfosCS() +{ + static wxCriticalSection s_csAllThreadInfos; + + return s_csAllThreadInfos; +} + +typedef wxVector< wxSharedPtr > wxAllThreadInfos; +inline wxAllThreadInfos& GetAllThreadInfos() +{ + static wxAllThreadInfos s_allThreadInfos; + + return s_allThreadInfos; +} + +// Pointer to the current thread's instance +inline wxTLS_TYPE_REF(wxThreadSpecificInfo*) GetThisThreadInfo() +{ + static wxTLS_TYPE(wxThreadSpecificInfo*) s_thisThreadInfo; + + return s_thisThreadInfo; +} + +#define wxTHIS_THREAD_INFO wxTLS_VALUE(GetThisThreadInfo()) + +} // anonymous namespace + + +wxThreadSpecificInfo& wxThreadSpecificInfo::Get() +{ + if ( !wxTHIS_THREAD_INFO ) + { + wxTHIS_THREAD_INFO = new wxThreadSpecificInfo; + wxCriticalSectionLocker lock(GetAllThreadInfosCS()); + GetAllThreadInfos().push_back( + wxSharedPtr(wxTHIS_THREAD_INFO)); + } + return *wxTHIS_THREAD_INFO; +} + +void wxThreadSpecificInfo::ThreadCleanUp() +{ + if ( !wxTHIS_THREAD_INFO ) + return; // nothing to do, not used by this thread at all + + // find this thread's instance in GetAllThreadInfos() and destroy it + wxCriticalSectionLocker lock(GetAllThreadInfosCS()); + for ( wxAllThreadInfos::iterator i = GetAllThreadInfos().begin(); + i != GetAllThreadInfos().end(); + ++i ) + { + if ( i->get() == wxTHIS_THREAD_INFO ) + { + GetAllThreadInfos().erase(i); + wxTHIS_THREAD_INFO = NULL; + break; + } + } +} + +#else // !wxUSE_THREADS + +wxThreadSpecificInfo& wxThreadSpecificInfo::Get() +{ + static wxThreadSpecificInfo s_instance; + return s_instance; +} + +#endif // wxUSE_THREADS/wxUSE_THREADS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/time.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/time.cpp new file mode 100644 index 0000000000..011b601490 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/time.cpp @@ -0,0 +1,361 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/time.cpp +// Purpose: Implementation of time-related functions. +// Author: Vadim Zeitlin +// Created: 2011-11-26 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/time.h" + +#ifndef WX_PRECOMP + #ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" + #endif + #include "wx/intl.h" + #include "wx/log.h" +#endif + +#ifndef WX_GMTOFF_IN_TM + // Define it for some systems which don't (always) use configure but are + // known to have tm_gmtoff field. + #if defined(__DARWIN__) + #define WX_GMTOFF_IN_TM + #endif +#endif + +#if defined(__VISAGECPP__) && !defined(HAVE_FTIME) + #define HAVE_FTIME +# if __IBMCPP__ >= 400 + # define ftime(x) _ftime(x) +# endif +#endif + +#ifndef __WXWINCE__ +#include +#else +#include "wx/msw/private.h" +#include "wx/msw/wince/time.h" +#endif + + +#if !defined(__WXMAC__) && !defined(__WXWINCE__) + #include // for time_t +#endif + +#if defined(HAVE_GETTIMEOFDAY) + #include + #include +#elif defined(HAVE_FTIME) + #include +#endif + +#if defined(__DJGPP__) || defined(__WINE__) + #include + #include +#endif + +namespace +{ + +const int MILLISECONDS_PER_SECOND = 1000; +const int MICROSECONDS_PER_MILLISECOND = 1000; +const int MICROSECONDS_PER_SECOND = 1000*1000; + +} // anonymous namespace + +// ============================================================================ +// implementation +// ============================================================================ + +// NB: VC8 safe time functions could/should be used for wxMSW as well probably +#if defined(__WXWINCE__) && defined(__VISUALC8__) + +struct tm *wxLocaltime_r(const time_t *t, struct tm* tm) +{ + __time64_t t64 = *t; + return _localtime64_s(tm, &t64) == 0 ? tm : NULL; +} + +struct tm *wxGmtime_r(const time_t* t, struct tm* tm) +{ + __time64_t t64 = *t; + return _gmtime64_s(tm, &t64) == 0 ? tm : NULL; +} + +#else // !wxWinCE with VC8 + +#if (!defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)) && wxUSE_THREADS && !defined(__WINDOWS__) +static wxMutex timeLock; +#endif + +#ifndef HAVE_LOCALTIME_R +struct tm *wxLocaltime_r(const time_t* ticks, struct tm* temp) +{ +#if wxUSE_THREADS && !defined(__WINDOWS__) + // No need to waste time with a mutex on windows since it's using + // thread local storage for localtime anyway. + wxMutexLocker locker(timeLock); +#endif + + // Borland CRT crashes when passed 0 ticks for some reason, see SF bug 1704438 +#ifdef __BORLANDC__ + if ( !*ticks ) + return NULL; +#endif + + const tm * const t = localtime(ticks); + if ( !t ) + return NULL; + + memcpy(temp, t, sizeof(struct tm)); + return temp; +} +#endif // !HAVE_LOCALTIME_R + +#ifndef HAVE_GMTIME_R +struct tm *wxGmtime_r(const time_t* ticks, struct tm* temp) +{ +#if wxUSE_THREADS && !defined(__WINDOWS__) + // No need to waste time with a mutex on windows since it's + // using thread local storage for gmtime anyway. + wxMutexLocker locker(timeLock); +#endif + +#ifdef __BORLANDC__ + if ( !*ticks ) + return NULL; +#endif + + const tm * const t = gmtime(ticks); + if ( !t ) + return NULL; + + memcpy(temp, gmtime(ticks), sizeof(struct tm)); + return temp; +} +#endif // !HAVE_GMTIME_R + +#endif // wxWinCE with VC8/other platforms + +// returns the time zone in the C sense, i.e. the difference UTC - local +// (in seconds) +int wxGetTimeZone() +{ +#ifdef WX_GMTOFF_IN_TM + // set to true when the timezone is set + static bool s_timezoneSet = false; + static long gmtoffset = LONG_MAX; // invalid timezone + + // ensure that the timezone variable is set by calling wxLocaltime_r + if ( !s_timezoneSet ) + { + // just call wxLocaltime_r() instead of figuring out whether this + // system supports tzset(), _tzset() or something else + time_t t = time(NULL); + struct tm tm; + + wxLocaltime_r(&t, &tm); + s_timezoneSet = true; + + // note that GMT offset is the opposite of time zone and so to return + // consistent results in both WX_GMTOFF_IN_TM and !WX_GMTOFF_IN_TM + // cases we have to negate it + gmtoffset = -tm.tm_gmtoff; + + // this function is supposed to return the same value whether DST is + // enabled or not, so we need to use an additional offset if DST is on + // as tm_gmtoff already does include it + if ( tm.tm_isdst ) + gmtoffset += 3600; + } + return (int)gmtoffset; +#elif defined(__DJGPP__) || defined(__WINE__) + struct timeb tb; + ftime(&tb); + return tb.timezone*60; +#elif defined(__VISUALC__) + // We must initialize the time zone information before using it (this will + // be done only once internally). + _tzset(); + + // Starting with VC++ 8 timezone variable is deprecated and is not even + // available in some standard library version so use the new function for + // accessing it instead. + #if wxCHECK_VISUALC_VERSION(8) + long t; + _get_timezone(&t); + return t; + #else // VC++ < 8 + return timezone; + #endif +#else // Use some kind of time zone variable. + // In any case we must initialize the time zone before using it. + tzset(); + + #if defined(WX_TIMEZONE) // If WX_TIMEZONE was defined by configure, use it. + return WX_TIMEZONE; + #elif defined(__BORLANDC__) || defined(__MINGW32__) || defined(__VISAGECPP__) + return _timezone; + #else // unknown platform -- assume it has timezone + return timezone; + #endif // different time zone variables +#endif // different ways to determine time zone +} + +// Get local time as seconds since 00:00:00, Jan 1st 1970 +long wxGetLocalTime() +{ + struct tm tm; + time_t t0, t1; + + // This cannot be made static because mktime can overwrite it. + // + memset(&tm, 0, sizeof(tm)); + tm.tm_year = 70; + tm.tm_mon = 0; + tm.tm_mday = 5; // not Jan 1st 1970 due to mktime 'feature' + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; // let mktime guess + + // Note that mktime assumes that the struct tm contains local time. + // + t1 = time(&t1); // now + t0 = mktime(&tm); // origin + + // Return the difference in seconds. + // + if (( t0 != (time_t)-1 ) && ( t1 != (time_t)-1 )) + return (long)difftime(t1, t0) + (60 * 60 * 24 * 4); + + wxLogSysError(_("Failed to get the local system time")); + return -1; +} + +// Get UTC time as seconds since 00:00:00, Jan 1st 1970 +long wxGetUTCTime() +{ + return (long)time(NULL); +} + +#if wxUSE_LONGLONG + +wxLongLong wxGetUTCTimeUSec() +{ +#if defined(__WINDOWS__) + FILETIME ft; + ::GetSystemTimeAsFileTime(&ft); + + // FILETIME is in 100ns or 0.1us since 1601-01-01, transform to us since + // 1970-01-01. + wxLongLong t(ft.dwHighDateTime, ft.dwLowDateTime); + t /= 10; + t -= wxLL(11644473600000000); // Unix - Windows epochs difference in us. + return t; +#else // non-MSW + +#ifdef HAVE_GETTIMEOFDAY + timeval tv; + if ( wxGetTimeOfDay(&tv) != -1 ) + { + wxLongLong val(tv.tv_sec); + val *= MICROSECONDS_PER_SECOND; + val += tv.tv_usec; + return val; + } +#endif // HAVE_GETTIMEOFDAY + + // Fall back to lesser precision function. + return wxGetUTCTimeMillis()*MICROSECONDS_PER_MILLISECOND; +#endif // MSW/!MSW +} + +// Get local time as milliseconds since 00:00:00, Jan 1st 1970 +wxLongLong wxGetUTCTimeMillis() +{ + // If possible, use a function which avoids conversions from + // broken-up time structures to milliseconds +#if defined(__WINDOWS__) + FILETIME ft; + ::GetSystemTimeAsFileTime(&ft); + + // FILETIME is expressed in 100ns (or 0.1us) units since 1601-01-01, + // transform them to ms since 1970-01-01. + wxLongLong t(ft.dwHighDateTime, ft.dwLowDateTime); + t /= 10000; + t -= wxLL(11644473600000); // Unix - Windows epochs difference in ms. + return t; +#else // !__WINDOWS__ + wxLongLong val = MILLISECONDS_PER_SECOND; + +#if defined(HAVE_GETTIMEOFDAY) + struct timeval tp; + if ( wxGetTimeOfDay(&tp) != -1 ) + { + val *= tp.tv_sec; + return (val + (tp.tv_usec / MICROSECONDS_PER_MILLISECOND)); + } + else + { + wxLogError(_("wxGetTimeOfDay failed.")); + return 0; + } +#elif defined(HAVE_FTIME) + struct timeb tp; + + // ftime() is void and not int in some mingw32 headers, so don't + // test the return code (well, it shouldn't fail anyhow...) + (void)::ftime(&tp); + val *= tp.time; + return (val + tp.millitm); +#else // no gettimeofday() nor ftime() + // If your platform/compiler does not support ms resolution please + // do NOT just shut off these warnings, drop me a line instead at + // + + #if defined(__VISUALC__) || defined (__WATCOMC__) + #pragma message("wxStopWatch will be up to second resolution!") + #elif defined(__BORLANDC__) + #pragma message "wxStopWatch will be up to second resolution!" + #else + #warning "wxStopWatch will be up to second resolution!" + #endif // compiler + + val *= wxGetUTCTime(); + return val; +#endif // time functions + +#endif // __WINDOWS__/!__WINDOWS__ +} + +wxLongLong wxGetLocalTimeMillis() +{ + return wxGetUTCTimeMillis() - wxGetTimeZone()*MILLISECONDS_PER_SECOND; +} + +#else // !wxUSE_LONGLONG + +double wxGetLocalTimeMillis(void) +{ + return (double(clock()) / double(CLOCKS_PER_SEC)) * 1000.0; +} + +#endif // wxUSE_LONGLONG/!wxUSE_LONGLONG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/timercmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/timercmn.cpp new file mode 100644 index 0000000000..f117f9aaf0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/timercmn.cpp @@ -0,0 +1,138 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/timercmn.cpp +// Purpose: wxTimerBase implementation +// Author: Julian Smart, Guillermo Rodriguez, Vadim Zeitlin +// Modified by: VZ: extracted all non-wxTimer stuff in stopwatch.cpp (20.06.03) +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// (c) 1999 Guillermo Rodriguez +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxWin headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TIMER + +#ifndef WX_PRECOMP + #include "wx/app.h" +#endif + +#include "wx/timer.h" +#include "wx/apptrait.h" +#include "wx/private/timer.h" + +// ---------------------------------------------------------------------------- +// wxWin macros +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxTimerEvent, wxEvent) + +wxDEFINE_EVENT(wxEVT_TIMER, wxTimerEvent); + +// ============================================================================ +// wxTimerBase implementation +// ============================================================================ + +wxTimer::~wxTimer() +{ + Stop(); + + delete m_impl; +} + +void wxTimer::Init() +{ + wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + m_impl = traits ? traits->CreateTimerImpl(this) : NULL; + if ( !m_impl ) + { + wxFAIL_MSG( wxT("No timer implementation for this platform") ); + + } +} + +// ============================================================================ +// rest of wxTimer implementation forwarded to wxTimerImpl +// ============================================================================ + +void wxTimer::SetOwner(wxEvtHandler *owner, int timerid) +{ + wxCHECK_RET( m_impl, wxT("uninitialized timer") ); + + m_impl->SetOwner(owner, timerid); +} + +wxEvtHandler *wxTimer::GetOwner() const +{ + wxCHECK_MSG( m_impl, NULL, wxT("uninitialized timer") ); + + return m_impl->GetOwner(); +} + +bool wxTimer::Start(int milliseconds, bool oneShot) +{ + wxCHECK_MSG( m_impl, false, wxT("uninitialized timer") ); + + return m_impl->Start(milliseconds, oneShot); +} + +void wxTimer::Stop() +{ + wxCHECK_RET( m_impl, wxT("uninitialized timer") ); + + if ( m_impl->IsRunning() ) + m_impl->Stop(); +} + +void wxTimer::Notify() +{ + // the base class version generates an event if it has owner - which it + // should because otherwise nobody can process timer events + wxCHECK_RET( GetOwner(), wxT("wxTimer::Notify() should be overridden.") ); + + m_impl->SendEvent(); +} + +bool wxTimer::IsRunning() const +{ + wxCHECK_MSG( m_impl, false, wxT("uninitialized timer") ); + + return m_impl->IsRunning(); +} + +int wxTimer::GetId() const +{ + wxCHECK_MSG( m_impl, wxID_ANY, wxT("uninitialized timer") ); + + return m_impl->GetId(); +} + +int wxTimer::GetInterval() const +{ + wxCHECK_MSG( m_impl, -1, wxT("uninitialized timer") ); + + return m_impl->GetInterval(); +} + +bool wxTimer::IsOneShot() const +{ + wxCHECK_MSG( m_impl, false, wxT("uninitialized timer") ); + + return m_impl->IsOneShot(); +} + +#endif // wxUSE_TIMER + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/timerimpl.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/timerimpl.cpp new file mode 100644 index 0000000000..d4d800d472 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/timerimpl.cpp @@ -0,0 +1,83 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/timerimpl.cpp +// Purpose: wxTimerBase implementation +// Author: Julian Smart, Guillermo Rodriguez, Vadim Zeitlin +// Modified by: VZ: extracted all non-wxTimer stuff in stopwatch.cpp (20.06.03) +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// (c) 1999 Guillermo Rodriguez +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxWin headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TIMER + +#include "wx/private/timer.h" +#include "wx/utils.h" // for wxNewId() +#include "wx/thread.h" + +wxTimerImpl::wxTimerImpl(wxTimer *timer) +{ + m_timer = timer; + m_owner = NULL; + m_idTimer = wxID_ANY; + m_milli = 0; + m_oneShot = false; +} + +void wxTimerImpl::SetOwner(wxEvtHandler *owner, int timerid) +{ + m_owner = owner; + m_idTimer = timerid == wxID_ANY ? wxNewId() : timerid; +} + +void wxTimerImpl::SendEvent() +{ + wxTimerEvent event(*m_timer); + (void)m_owner->SafelyProcessEvent(event); +} + +bool wxTimerImpl::Start(int milliseconds, bool oneShot) +{ + // under MSW timers only work when they're started from the main thread so + // let the caller know about it +#if wxUSE_THREADS + wxASSERT_MSG( wxThread::IsMain(), + wxT("timer can only be started from the main thread") ); +#endif // wxUSE_THREADS + + if ( IsRunning() ) + { + // not stopping the already running timer might work for some + // platforms (no problems under MSW) but leads to mysterious crashes + // on the others (GTK), so to be on the safe side do it here + Stop(); + } + + if ( milliseconds != -1 ) + { + m_milli = milliseconds; + } + + m_oneShot = oneShot; + + return true; +} + + +#endif // wxUSE_TIMER + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/tokenzr.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/tokenzr.cpp new file mode 100644 index 0000000000..9d7926919b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/tokenzr.cpp @@ -0,0 +1,295 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/tokenzr.cpp +// Purpose: String tokenizer +// Author: Guilhem Lavaux +// Modified by: Vadim Zeitlin (almost full rewrite) +// Created: 04/22/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/tokenzr.h" + +#ifndef WX_PRECOMP + #include "wx/arrstr.h" + #include "wx/crt.h" +#endif + +// Required for wxIs... functions +#include + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// helpers +// ---------------------------------------------------------------------------- + +static wxString::const_iterator +find_first_of(const wxChar *delims, size_t len, + const wxString::const_iterator& from, + const wxString::const_iterator& end) +{ + wxASSERT_MSG( from <= end, wxT("invalid index") ); + + for ( wxString::const_iterator i = from; i != end; ++i ) + { + if ( wxTmemchr(delims, *i, len) ) + return i; + } + + return end; +} + +static wxString::const_iterator +find_first_not_of(const wxChar *delims, size_t len, + const wxString::const_iterator& from, + const wxString::const_iterator& end) +{ + wxASSERT_MSG( from <= end, wxT("invalid index") ); + + for ( wxString::const_iterator i = from; i != end; ++i ) + { + if ( !wxTmemchr(delims, *i, len) ) + return i; + } + + return end; +} + +// ---------------------------------------------------------------------------- +// wxStringTokenizer construction +// ---------------------------------------------------------------------------- + +wxStringTokenizer::wxStringTokenizer(const wxString& str, + const wxString& delims, + wxStringTokenizerMode mode) +{ + SetString(str, delims, mode); +} + +void wxStringTokenizer::SetString(const wxString& str, + const wxString& delims, + wxStringTokenizerMode mode) +{ + if ( mode == wxTOKEN_DEFAULT ) + { + // by default, we behave like strtok() if the delimiters are only + // whitespace characters and as wxTOKEN_RET_EMPTY otherwise (for + // whitespace delimiters, strtok() behaviour is better because we want + // to count consecutive spaces as one delimiter) + wxString::const_iterator p; + for ( p = delims.begin(); p != delims.end(); ++p ) + { + if ( !wxIsspace(*p) ) + break; + } + + if ( p != delims.end() ) + { + // not whitespace char in delims + mode = wxTOKEN_RET_EMPTY; + } + else + { + // only whitespaces + mode = wxTOKEN_STRTOK; + } + } + +#if wxUSE_UNICODE // FIXME-UTF8: only wc_str() + m_delims = delims.wc_str(); +#else + m_delims = delims.mb_str(); +#endif + m_delimsLen = delims.length(); + + m_mode = mode; + + Reinit(str); +} + +void wxStringTokenizer::Reinit(const wxString& str) +{ + wxASSERT_MSG( IsOk(), wxT("you should call SetString() first") ); + + m_string = str; + m_stringEnd = m_string.end(); + m_pos = m_string.begin(); + m_lastDelim = wxT('\0'); + m_hasMoreTokens = MoreTokens_Unknown; +} + +// ---------------------------------------------------------------------------- +// access to the tokens +// ---------------------------------------------------------------------------- + +// do we have more of them? +bool wxStringTokenizer::HasMoreTokens() const +{ + // GetNextToken() calls HasMoreTokens() and so HasMoreTokens() is called + // twice in every interation in the following common usage patten: + // while ( HasMoreTokens() ) + // GetNextToken(); + // We optimize this case by caching HasMoreTokens() return value here: + if ( m_hasMoreTokens == MoreTokens_Unknown ) + { + bool r = DoHasMoreTokens(); + wxConstCast(this, wxStringTokenizer)->m_hasMoreTokens = + r ? MoreTokens_Yes : MoreTokens_No; + return r; + } + else + return m_hasMoreTokens == MoreTokens_Yes; +} + +bool wxStringTokenizer::DoHasMoreTokens() const +{ + wxCHECK_MSG( IsOk(), false, wxT("you should call SetString() first") ); + + if ( find_first_not_of(m_delims, m_delimsLen, m_pos, m_stringEnd) + != m_stringEnd ) + { + // there are non delimiter characters left, so we do have more tokens + return true; + } + + switch ( m_mode ) + { + case wxTOKEN_RET_EMPTY: + case wxTOKEN_RET_DELIMS: + // special hack for wxTOKEN_RET_EMPTY: we should return the initial + // empty token even if there are only delimiters after it + return !m_string.empty() && m_pos == m_string.begin(); + + case wxTOKEN_RET_EMPTY_ALL: + // special hack for wxTOKEN_RET_EMPTY_ALL: we can know if we had + // already returned the trailing empty token after the last + // delimiter by examining m_lastDelim: it is set to NUL if we run + // up to the end of the string in GetNextToken(), but if it is not + // NUL yet we still have this last token to return even if m_pos is + // already at m_string.length() + return m_pos < m_stringEnd || m_lastDelim != wxT('\0'); + + case wxTOKEN_INVALID: + case wxTOKEN_DEFAULT: + wxFAIL_MSG( wxT("unexpected tokenizer mode") ); + // fall through + + case wxTOKEN_STRTOK: + // never return empty delimiters + break; + } + + return false; +} + +// count the number of (remaining) tokens in the string +size_t wxStringTokenizer::CountTokens() const +{ + wxCHECK_MSG( IsOk(), 0, wxT("you should call SetString() first") ); + + // VZ: this function is IMHO not very useful, so it's probably not very + // important if its implementation here is not as efficient as it + // could be -- but OTOH like this we're sure to get the correct answer + // in all modes + wxStringTokenizer tkz(wxString(m_pos, m_stringEnd), m_delims, m_mode); + + size_t count = 0; + while ( tkz.HasMoreTokens() ) + { + count++; + + (void)tkz.GetNextToken(); + } + + return count; +} + +// ---------------------------------------------------------------------------- +// token extraction +// ---------------------------------------------------------------------------- + +wxString wxStringTokenizer::GetNextToken() +{ + wxString token; + do + { + if ( !HasMoreTokens() ) + { + break; + } + + m_hasMoreTokens = MoreTokens_Unknown; + + // find the end of this token + wxString::const_iterator pos = + find_first_of(m_delims, m_delimsLen, m_pos, m_stringEnd); + + // and the start of the next one + if ( pos == m_stringEnd ) + { + // no more delimiters, the token is everything till the end of + // string + token.assign(m_pos, m_stringEnd); + + // skip the token + m_pos = m_stringEnd; + + // it wasn't terminated + m_lastDelim = wxT('\0'); + } + else // we found a delimiter at pos + { + // in wxTOKEN_RET_DELIMS mode we return the delimiter character + // with token, otherwise leave it out + wxString::const_iterator tokenEnd(pos); + if ( m_mode == wxTOKEN_RET_DELIMS ) + ++tokenEnd; + + token.assign(m_pos, tokenEnd); + + // skip the token and the trailing delimiter + m_pos = pos + 1; + + m_lastDelim = (pos == m_stringEnd) ? wxT('\0') : (wxChar)*pos; + } + } + while ( !AllowEmpty() && token.empty() ); + + return token; +} + +// ---------------------------------------------------------------------------- +// public functions +// ---------------------------------------------------------------------------- + +wxArrayString wxStringTokenize(const wxString& str, + const wxString& delims, + wxStringTokenizerMode mode) +{ + wxArrayString tokens; + wxStringTokenizer tk(str, delims, mode); + while ( tk.HasMoreTokens() ) + { + tokens.Add(tk.GetNextToken()); + } + + return tokens; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/toplvcmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/toplvcmn.cpp new file mode 100644 index 0000000000..ef693690c5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/toplvcmn.cpp @@ -0,0 +1,464 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/toplvcmn.cpp +// Purpose: common (for all platforms) wxTopLevelWindow functions +// Author: Julian Smart, Vadim Zeitlin +// Created: 01/02/97 +// Copyright: (c) 1998 Robert Roebling and Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/toplevel.h" + +#ifndef WX_PRECOMP + #include "wx/dcclient.h" + #include "wx/app.h" +#endif // WX_PRECOMP + +#include "wx/display.h" + +// ---------------------------------------------------------------------------- +// event table +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxTopLevelWindowBase, wxWindow) + EVT_CLOSE(wxTopLevelWindowBase::OnCloseWindow) + EVT_SIZE(wxTopLevelWindowBase::OnSize) +END_EVENT_TABLE() + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_ABSTRACT_CLASS(wxTopLevelWindow, wxWindow) + +// ---------------------------------------------------------------------------- +// construction/destruction +// ---------------------------------------------------------------------------- + +wxTopLevelWindowBase::wxTopLevelWindowBase() +{ + // Unlike windows, top level windows are created hidden by default. + m_isShown = false; +} + +wxTopLevelWindowBase::~wxTopLevelWindowBase() +{ + // don't let wxTheApp keep any stale pointers to us + if ( wxTheApp && wxTheApp->GetTopWindow() == this ) + wxTheApp->SetTopWindow(NULL); + + wxTopLevelWindows.DeleteObject(this); + + // delete any our top level children which are still pending for deletion + // immediately: this could happen if a child (e.g. a temporary dialog + // created with this window as parent) was Destroy()'d) while this window + // was deleted directly (with delete, or maybe just because it was created + // on the stack) immediately afterwards and before the child TLW was really + // destroyed -- not destroying it now would leave it alive with a dangling + // parent pointer and result in a crash later + for ( wxObjectList::iterator i = wxPendingDelete.begin(); + i != wxPendingDelete.end(); + ) + { + wxWindow * const win = wxDynamicCast(*i, wxWindow); + if ( win && wxGetTopLevelParent(win->GetParent()) == this ) + { + wxPendingDelete.erase(i); + + delete win; + + // deleting it invalidated the list (and not only one node because + // it could have resulted in deletion of other objects to) + i = wxPendingDelete.begin(); + } + else + { + ++i; + } + } + + if ( IsLastBeforeExit() ) + { + // no other (important) windows left, quit the app + wxTheApp->ExitMainLoop(); + } +} + +bool wxTopLevelWindowBase::Destroy() +{ + // We can't delay the destruction if our parent is being already destroyed + // as we will be deleted anyhow during its destruction and the pointer + // stored in wxPendingDelete would become invalid, so just delete ourselves + // immediately in this case. + if ( wxWindow* parent = GetParent() ) + { + if ( parent->IsBeingDeleted() ) + return wxNonOwnedWindow::Destroy(); + } + + // delayed destruction: the frame will be deleted during the next idle + // loop iteration + if ( !wxPendingDelete.Member(this) ) + wxPendingDelete.Append(this); + + // normally we want to hide the window immediately so that it doesn't get + // stuck on the screen while it's being destroyed, however we shouldn't + // hide the last visible window as then we might not get any idle events + // any more as no events will be sent to the hidden window and without idle + // events we won't prune wxPendingDelete list and the application won't + // terminate + for ( wxWindowList::const_iterator i = wxTopLevelWindows.begin(), + end = wxTopLevelWindows.end(); + i != end; + ++i ) + { + wxTopLevelWindow * const win = static_cast(*i); + if ( win != this && win->IsShown() ) + { + // there remains at least one other visible TLW, we can hide this + // one + Hide(); + + break; + } + } + + return true; +} + +bool wxTopLevelWindowBase::IsLastBeforeExit() const +{ + // first of all, automatically exiting the app on last window close can be + // completely disabled at wxTheApp level + if ( !wxTheApp || !wxTheApp->GetExitOnFrameDelete() ) + return false; + + // second, never terminate the application after closing a child TLW + // because this would close its parent unexpectedly -- notice that this + // check is not redundant with the loop below, as the parent might return + // false from its ShouldPreventAppExit() -- except if the child is being + // deleted as part of the parent destruction + if ( GetParent() && !GetParent()->IsBeingDeleted() ) + return false; + + wxWindowList::const_iterator i; + const wxWindowList::const_iterator end = wxTopLevelWindows.end(); + + // then decide whether we should exit at all + for ( i = wxTopLevelWindows.begin(); i != end; ++i ) + { + wxTopLevelWindow * const win = static_cast(*i); + if ( win->ShouldPreventAppExit() ) + { + // there remains at least one important TLW, don't exit + return false; + } + } + + // if yes, close all the other windows: this could still fail + for ( i = wxTopLevelWindows.begin(); i != end; ++i ) + { + // don't close twice the windows which are already marked for deletion + wxTopLevelWindow * const win = static_cast(*i); + if ( !wxPendingDelete.Member(win) && !win->Close() ) + { + // one of the windows refused to close, don't exit + // + // NB: of course, by now some other windows could have been already + // closed but there is really nothing we can do about it as we + // have no way just to ask the window if it can close without + // forcing it to do it + return false; + } + } + + return true; +} + +// ---------------------------------------------------------------------------- +// wxTopLevelWindow geometry +// ---------------------------------------------------------------------------- + +void wxTopLevelWindowBase::SetMinSize(const wxSize& minSize) +{ + SetSizeHints(minSize, GetMaxSize()); +} + +void wxTopLevelWindowBase::SetMaxSize(const wxSize& maxSize) +{ + SetSizeHints(GetMinSize(), maxSize); +} + +void wxTopLevelWindowBase::GetRectForTopLevelChildren(int *x, int *y, int *w, int *h) +{ + GetPosition(x,y); + GetSize(w,h); +} + +/* static */ +wxSize wxTopLevelWindowBase::GetDefaultSize() +{ + wxSize size = wxGetClientDisplayRect().GetSize(); +#ifndef __WXOSX_IPHONE__ + // create proportionally bigger windows on small screens + if ( size.x >= 1024 ) + size.x = 400; + else if ( size.x >= 800 ) + size.x = 300; + else if ( size.x >= 320 ) + size.x = 240; + + if ( size.y >= 768 ) + size.y = 250; + else if ( size.y > 200 ) + { + size.y *= 2; + size.y /= 3; + } +#endif + return size; +} + +void wxTopLevelWindowBase::DoCentre(int dir) +{ + // on some platforms centering top level windows is impossible + // because they are always maximized by guidelines or limitations + // + // and centering a maximized window doesn't make sense as its position + // can't change + if ( IsAlwaysMaximized() || IsMaximized() ) + return; + + // we need the display rect anyhow so store it first: notice that we should + // be centered on the same display as our parent window, the display of + // this window itself is not really defined yet + int nDisplay = wxDisplay::GetFromWindow(GetParent() ? GetParent() : this); + wxDisplay dpy(nDisplay == wxNOT_FOUND ? 0 : nDisplay); + const wxRect rectDisplay(dpy.GetClientArea()); + + // what should we centre this window on? + wxRect rectParent; + if ( !(dir & wxCENTRE_ON_SCREEN) && GetParent() ) + { + // centre on parent window: notice that we need screen coordinates for + // positioning this TLW + rectParent = GetParent()->GetScreenRect(); + + // if the parent is entirely off screen (happens at least with MDI + // parent frame under Mac but could happen elsewhere too if the frame + // was hidden/moved away for some reason), don't use it as otherwise + // this window wouldn't be visible at all + if ( !rectParent.Intersects(rectDisplay) ) + { + // just centre on screen then + rectParent = rectDisplay; + } + } + else + { + // we were explicitly asked to centre this window on the entire screen + // or if we have no parent anyhow and so can't centre on it + rectParent = rectDisplay; + } + + if ( !(dir & wxBOTH) ) + dir |= wxBOTH; // if neither is specified, center in both directions + + // the new window rect candidate + wxRect rect = GetRect().CentreIn(rectParent, dir & ~wxCENTRE_ON_SCREEN); + + // we don't want to place the window off screen if Centre() is called as + // this is (almost?) never wanted and it would be very difficult to prevent + // it from happening from the user code if we didn't check for it here + if ( !rectDisplay.Contains(rect.GetTopLeft()) ) + { + // move the window just enough to make the corner visible + int dx = rectDisplay.GetLeft() - rect.GetLeft(); + int dy = rectDisplay.GetTop() - rect.GetTop(); + rect.Offset(dx > 0 ? dx : 0, dy > 0 ? dy : 0); + } + + if ( !rectDisplay.Contains(rect.GetBottomRight()) ) + { + // do the same for this corner too + int dx = rectDisplay.GetRight() - rect.GetRight(); + int dy = rectDisplay.GetBottom() - rect.GetBottom(); + rect.Offset(dx < 0 ? dx : 0, dy < 0 ? dy : 0); + } + + // the window top left and bottom right corner are both visible now and + // although the window might still be not entirely on screen (with 2 + // staggered displays for example) we wouldn't be able to improve the + // layout much in such case, so we stop here + + // -1 could be valid coordinate here if there are several displays + SetSize(rect, wxSIZE_ALLOW_MINUS_ONE); +} + +// ---------------------------------------------------------------------------- +// wxTopLevelWindow size management: we exclude the areas taken by +// menu/status/toolbars from the client area, so the client area is what's +// really available for the frame contents +// ---------------------------------------------------------------------------- + +void wxTopLevelWindowBase::DoScreenToClient(int *x, int *y) const +{ + wxWindow::DoScreenToClient(x, y); + + // translate the wxWindow client coords to our client coords + wxPoint pt(GetClientAreaOrigin()); + if ( x ) + *x -= pt.x; + if ( y ) + *y -= pt.y; +} + +void wxTopLevelWindowBase::DoClientToScreen(int *x, int *y) const +{ + // our client area origin (0, 0) may be really something like (0, 30) for + // wxWindow if we have a toolbar, account for it before translating + wxPoint pt(GetClientAreaOrigin()); + if ( x ) + *x += pt.x; + if ( y ) + *y += pt.y; + + wxWindow::DoClientToScreen(x, y); +} + +bool wxTopLevelWindowBase::IsAlwaysMaximized() const +{ +#if defined(__SMARTPHONE__) || defined(__POCKETPC__) + return true; +#else + return false; +#endif +} + +// ---------------------------------------------------------------------------- +// icons +// ---------------------------------------------------------------------------- + +wxIcon wxTopLevelWindowBase::GetIcon() const +{ + return m_icons.IsEmpty() ? wxIcon() : m_icons.GetIcon( -1 ); +} + +void wxTopLevelWindowBase::SetIcon(const wxIcon& icon) +{ + // passing wxNullIcon to SetIcon() is possible (it means that we shouldn't + // have any icon), but adding an invalid icon to wxIconBundle is not + wxIconBundle icons; + if ( icon.IsOk() ) + icons.AddIcon(icon); + + SetIcons(icons); +} + +// ---------------------------------------------------------------------------- +// event handlers +// ---------------------------------------------------------------------------- + +// default resizing behaviour - if only ONE subwindow, resize to fill the +// whole client area +void wxTopLevelWindowBase::DoLayout() +{ + // We are called during the window destruction several times, e.g. as + // wxFrame tries to adjust to its tool/status bars disappearing. But + // actually doing the layout is pretty useless in this case as the window + // will disappear anyhow -- so just don't bother. + if ( IsBeingDeleted() ) + return; + + + // if we're using constraints or sizers - do use them + if ( GetAutoLayout() ) + { + Layout(); + } + else + { + // do we have _exactly_ one child? + wxWindow *child = NULL; + for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + wxWindow *win = node->GetData(); + + // exclude top level and managed windows (status bar isn't + // currently in the children list except under wxMac anyhow, but + // it makes no harm to test for it) + if ( !win->IsTopLevel() && !IsOneOfBars(win) ) + { + if ( child ) + { + return; // it's our second subwindow - nothing to do + } + + child = win; + } + } + + // do we have any children at all? + if ( child && child->IsShown() ) + { + // exactly one child - set it's size to fill the whole frame + int clientW, clientH; + DoGetClientSize(&clientW, &clientH); + + child->SetSize(0, 0, clientW, clientH); + } + } +} + +// The default implementation for the close window event. +void wxTopLevelWindowBase::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) +{ + Destroy(); +} + +bool wxTopLevelWindowBase::SendIconizeEvent(bool iconized) +{ + wxIconizeEvent event(GetId(), iconized); + event.SetEventObject(this); + + return GetEventHandler()->ProcessEvent(event); +} + +// do the window-specific processing after processing the update event +void wxTopLevelWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event) +{ + // call inherited, but skip the wxControl's version, and call directly the + // wxWindow's one instead, because the only reason why we are overriding this + // function is that we want to use SetTitle() instead of wxControl::SetLabel() + wxWindowBase::DoUpdateWindowUI(event); + + // update title + if ( event.GetSetText() ) + { + if ( event.GetText() != GetTitle() ) + SetTitle(event.GetText()); + } +} + +void wxTopLevelWindowBase::RequestUserAttention(int WXUNUSED(flags)) +{ + // it's probably better than do nothing, isn't it? + Raise(); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/translation.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/translation.cpp new file mode 100644 index 0000000000..455fb315d0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/translation.cpp @@ -0,0 +1,2051 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/translation.cpp +// Purpose: Internationalization and localisation for wxWidgets +// Author: Vadim Zeitlin, Vaclav Slavik, +// Michael N. Filippov +// (2003/09/30 - PluralForms support) +// Created: 2010-04-23 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declaration +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_INTL + +#ifndef WX_PRECOMP + #include "wx/dynarray.h" + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/hashmap.h" + #include "wx/module.h" +#endif // WX_PRECOMP + +// standard headers +#include +#include + +#include "wx/arrstr.h" +#include "wx/dir.h" +#include "wx/file.h" +#include "wx/filename.h" +#include "wx/tokenzr.h" +#include "wx/fontmap.h" +#include "wx/stdpaths.h" +#include "wx/private/threadinfo.h" + +#ifdef __WINDOWS__ + #include "wx/dynlib.h" + #include "wx/scopedarray.h" + #include "wx/msw/wrapwin.h" + #include "wx/msw/missing.h" +#endif +#ifdef __WXOSX__ + #include "wx/osx/core/cfstring.h" + #include + #include +#endif + +// ---------------------------------------------------------------------------- +// simple types +// ---------------------------------------------------------------------------- + +typedef wxUint32 size_t32; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// magic number identifying the .mo format file +const size_t32 MSGCATALOG_MAGIC = 0x950412de; +const size_t32 MSGCATALOG_MAGIC_SW = 0xde120495; + +#define TRACE_I18N wxS("i18n") + +// ============================================================================ +// implementation +// ============================================================================ + +namespace +{ + +#if !wxUSE_UNICODE +// We need to keep track of (char*) msgids in non-Unicode legacy builds. Instead +// of making the public wxMsgCatalog and wxTranslationsLoader APIs ugly, we +// store them in this global map. +wxStringToStringHashMap gs_msgIdCharset; +#endif + +// ---------------------------------------------------------------------------- +// Platform specific helpers +// ---------------------------------------------------------------------------- + +void LogTraceArray(const char *prefix, const wxArrayString& arr) +{ + wxLogTrace(TRACE_I18N, "%s: [%s]", prefix, wxJoin(arr, ',')); +} + +void LogTraceLargeArray(const wxString& prefix, const wxArrayString& arr) +{ + wxLogTrace(TRACE_I18N, "%s:", prefix); + for ( wxArrayString::const_iterator i = arr.begin(); i != arr.end(); ++i ) + wxLogTrace(TRACE_I18N, " %s", *i); +} + +// Use locale-based detection as a fallback +wxString GetPreferredUILanguageFallback(const wxArrayString& WXUNUSED(available)) +{ + const wxString lang = wxLocale::GetLanguageCanonicalName(wxLocale::GetSystemLanguage()); + wxLogTrace(TRACE_I18N, " - obtained best language from locale: %s", lang); + return lang; +} + +#ifdef __WINDOWS__ + +wxString GetPreferredUILanguage(const wxArrayString& available) +{ + typedef BOOL (WINAPI *GetUserPreferredUILanguages_t)(DWORD, PULONG, PWSTR, PULONG); + static GetUserPreferredUILanguages_t s_pfnGetUserPreferredUILanguages = NULL; + static bool s_initDone = false; + if ( !s_initDone ) + { + wxLoadedDLL dllKernel32("kernel32.dll"); + wxDL_INIT_FUNC(s_pfn, GetUserPreferredUILanguages, dllKernel32); + s_initDone = true; + } + + if ( s_pfnGetUserPreferredUILanguages ) + { + ULONG numLangs; + ULONG bufferSize = 0; + if ( (*s_pfnGetUserPreferredUILanguages)(MUI_LANGUAGE_NAME, + &numLangs, + NULL, + &bufferSize) ) + { + wxScopedArray langs(new WCHAR[bufferSize]); + if ( (*s_pfnGetUserPreferredUILanguages)(MUI_LANGUAGE_NAME, + &numLangs, + langs.get(), + &bufferSize) ) + { + wxArrayString preferred; + + WCHAR *buf = langs.get(); + for ( unsigned i = 0; i < numLangs; i++ ) + { + const wxString lang(buf); + preferred.push_back(lang); + buf += lang.length() + 1; + } + LogTraceArray(" - system preferred languages", preferred); + + for ( wxArrayString::const_iterator j = preferred.begin(); + j != preferred.end(); + ++j ) + { + wxString lang(*j); + lang.Replace("-", "_"); + if ( available.Index(lang, /*bCase=*/false) != wxNOT_FOUND ) + return lang; + size_t pos = lang.find('_'); + if ( pos != wxString::npos ) + { + lang = lang.substr(0, pos); + if ( available.Index(lang, /*bCase=*/false) != wxNOT_FOUND ) + return lang; + } + } + } + } + } + + return GetPreferredUILanguageFallback(available); +} + +#elif defined(__WXOSX__) + +void LogTraceArray(const char *prefix, CFArrayRef arr) +{ + wxString s; + const unsigned count = CFArrayGetCount(arr); + if ( count ) + { + s += wxCFStringRef::AsString((CFStringRef)CFArrayGetValueAtIndex(arr, 0)); + for ( unsigned i = 1 ; i < count; i++ ) + s += "," + wxCFStringRef::AsString((CFStringRef)CFArrayGetValueAtIndex(arr, i)); + } + wxLogTrace(TRACE_I18N, "%s: [%s]", prefix, s); +} + +wxString GetPreferredUILanguage(const wxArrayString& available) +{ + wxStringToStringHashMap availableNormalized; + wxCFRef availableArr( + CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks)); + + for ( wxArrayString::const_iterator i = available.begin(); + i != available.end(); + ++i ) + { + wxString lang(*i); + wxCFStringRef code_wx(*i); + wxCFStringRef code_norm( + CFLocaleCreateCanonicalLanguageIdentifierFromString(kCFAllocatorDefault, code_wx)); + CFArrayAppendValue(availableArr, code_norm); + availableNormalized[code_norm.AsString()] = *i; + } + LogTraceArray(" - normalized available list", availableArr); + + wxCFRef prefArr( + CFBundleCopyLocalizationsForPreferences(availableArr, NULL)); + LogTraceArray(" - system preferred languages", prefArr); + + unsigned prefArrLength = CFArrayGetCount(prefArr); + if ( prefArrLength > 0 ) + { + // Lookup the name in 'available' by index -- we need to get the + // original value corresponding to the normalized one chosen. + wxString lang(wxCFStringRef::AsString((CFStringRef)CFArrayGetValueAtIndex(prefArr, 0))); + wxStringToStringHashMap::const_iterator i = availableNormalized.find(lang); + if ( i == availableNormalized.end() ) + return lang; + else + return i->second; + } + + return GetPreferredUILanguageFallback(available); +} + +#else + +// On Unix, there's just one language=locale setting, so we should always +// use that. +#define GetPreferredUILanguage GetPreferredUILanguageFallback + +#endif + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// Plural forms parser +// ---------------------------------------------------------------------------- + +/* + Simplified Grammar + +Expression: + LogicalOrExpression '?' Expression ':' Expression + LogicalOrExpression + +LogicalOrExpression: + LogicalAndExpression "||" LogicalOrExpression // to (a || b) || c + LogicalAndExpression + +LogicalAndExpression: + EqualityExpression "&&" LogicalAndExpression // to (a && b) && c + EqualityExpression + +EqualityExpression: + RelationalExpression "==" RelationalExperession + RelationalExpression "!=" RelationalExperession + RelationalExpression + +RelationalExpression: + MultiplicativeExpression '>' MultiplicativeExpression + MultiplicativeExpression '<' MultiplicativeExpression + MultiplicativeExpression ">=" MultiplicativeExpression + MultiplicativeExpression "<=" MultiplicativeExpression + MultiplicativeExpression + +MultiplicativeExpression: + PmExpression '%' PmExpression + PmExpression + +PmExpression: + N + Number + '(' Expression ')' +*/ + +class wxPluralFormsToken +{ +public: + enum Type + { + T_ERROR, T_EOF, T_NUMBER, T_N, T_PLURAL, T_NPLURALS, T_EQUAL, T_ASSIGN, + T_GREATER, T_GREATER_OR_EQUAL, T_LESS, T_LESS_OR_EQUAL, + T_REMINDER, T_NOT_EQUAL, + T_LOGICAL_AND, T_LOGICAL_OR, T_QUESTION, T_COLON, T_SEMICOLON, + T_LEFT_BRACKET, T_RIGHT_BRACKET + }; + Type type() const { return m_type; } + void setType(Type t) { m_type = t; } + // for T_NUMBER only + typedef int Number; + Number number() const { return m_number; } + void setNumber(Number num) { m_number = num; } +private: + Type m_type; + Number m_number; +}; + + +class wxPluralFormsScanner +{ +public: + wxPluralFormsScanner(const char* s); + const wxPluralFormsToken& token() const { return m_token; } + bool nextToken(); // returns false if error +private: + const char* m_s; + wxPluralFormsToken m_token; +}; + +wxPluralFormsScanner::wxPluralFormsScanner(const char* s) : m_s(s) +{ + nextToken(); +} + +bool wxPluralFormsScanner::nextToken() +{ + wxPluralFormsToken::Type type = wxPluralFormsToken::T_ERROR; + while (isspace((unsigned char) *m_s)) + { + ++m_s; + } + if (*m_s == 0) + { + type = wxPluralFormsToken::T_EOF; + } + else if (isdigit((unsigned char) *m_s)) + { + wxPluralFormsToken::Number number = *m_s++ - '0'; + while (isdigit((unsigned char) *m_s)) + { + number = number * 10 + (*m_s++ - '0'); + } + m_token.setNumber(number); + type = wxPluralFormsToken::T_NUMBER; + } + else if (isalpha((unsigned char) *m_s)) + { + const char* begin = m_s++; + while (isalnum((unsigned char) *m_s)) + { + ++m_s; + } + size_t size = m_s - begin; + if (size == 1 && memcmp(begin, "n", size) == 0) + { + type = wxPluralFormsToken::T_N; + } + else if (size == 6 && memcmp(begin, "plural", size) == 0) + { + type = wxPluralFormsToken::T_PLURAL; + } + else if (size == 8 && memcmp(begin, "nplurals", size) == 0) + { + type = wxPluralFormsToken::T_NPLURALS; + } + } + else if (*m_s == '=') + { + ++m_s; + if (*m_s == '=') + { + ++m_s; + type = wxPluralFormsToken::T_EQUAL; + } + else + { + type = wxPluralFormsToken::T_ASSIGN; + } + } + else if (*m_s == '>') + { + ++m_s; + if (*m_s == '=') + { + ++m_s; + type = wxPluralFormsToken::T_GREATER_OR_EQUAL; + } + else + { + type = wxPluralFormsToken::T_GREATER; + } + } + else if (*m_s == '<') + { + ++m_s; + if (*m_s == '=') + { + ++m_s; + type = wxPluralFormsToken::T_LESS_OR_EQUAL; + } + else + { + type = wxPluralFormsToken::T_LESS; + } + } + else if (*m_s == '%') + { + ++m_s; + type = wxPluralFormsToken::T_REMINDER; + } + else if (*m_s == '!' && m_s[1] == '=') + { + m_s += 2; + type = wxPluralFormsToken::T_NOT_EQUAL; + } + else if (*m_s == '&' && m_s[1] == '&') + { + m_s += 2; + type = wxPluralFormsToken::T_LOGICAL_AND; + } + else if (*m_s == '|' && m_s[1] == '|') + { + m_s += 2; + type = wxPluralFormsToken::T_LOGICAL_OR; + } + else if (*m_s == '?') + { + ++m_s; + type = wxPluralFormsToken::T_QUESTION; + } + else if (*m_s == ':') + { + ++m_s; + type = wxPluralFormsToken::T_COLON; + } else if (*m_s == ';') { + ++m_s; + type = wxPluralFormsToken::T_SEMICOLON; + } + else if (*m_s == '(') + { + ++m_s; + type = wxPluralFormsToken::T_LEFT_BRACKET; + } + else if (*m_s == ')') + { + ++m_s; + type = wxPluralFormsToken::T_RIGHT_BRACKET; + } + m_token.setType(type); + return type != wxPluralFormsToken::T_ERROR; +} + +class wxPluralFormsNode; + +// NB: Can't use wxDEFINE_SCOPED_PTR_TYPE because wxPluralFormsNode is not +// fully defined yet: +class wxPluralFormsNodePtr +{ +public: + wxPluralFormsNodePtr(wxPluralFormsNode *p = NULL) : m_p(p) {} + ~wxPluralFormsNodePtr(); + wxPluralFormsNode& operator*() const { return *m_p; } + wxPluralFormsNode* operator->() const { return m_p; } + wxPluralFormsNode* get() const { return m_p; } + wxPluralFormsNode* release(); + void reset(wxPluralFormsNode *p); + +private: + wxPluralFormsNode *m_p; +}; + +class wxPluralFormsNode +{ +public: + wxPluralFormsNode(const wxPluralFormsToken& t) : m_token(t) {} + const wxPluralFormsToken& token() const { return m_token; } + const wxPluralFormsNode* node(unsigned i) const + { return m_nodes[i].get(); } + void setNode(unsigned i, wxPluralFormsNode* n); + wxPluralFormsNode* releaseNode(unsigned i); + wxPluralFormsToken::Number evaluate(wxPluralFormsToken::Number n) const; + +private: + wxPluralFormsToken m_token; + wxPluralFormsNodePtr m_nodes[3]; +}; + +wxPluralFormsNodePtr::~wxPluralFormsNodePtr() +{ + delete m_p; +} +wxPluralFormsNode* wxPluralFormsNodePtr::release() +{ + wxPluralFormsNode *p = m_p; + m_p = NULL; + return p; +} +void wxPluralFormsNodePtr::reset(wxPluralFormsNode *p) +{ + if (p != m_p) + { + delete m_p; + m_p = p; + } +} + + +void wxPluralFormsNode::setNode(unsigned i, wxPluralFormsNode* n) +{ + m_nodes[i].reset(n); +} + +wxPluralFormsNode* wxPluralFormsNode::releaseNode(unsigned i) +{ + return m_nodes[i].release(); +} + +wxPluralFormsToken::Number +wxPluralFormsNode::evaluate(wxPluralFormsToken::Number n) const +{ + switch (token().type()) + { + // leaf + case wxPluralFormsToken::T_NUMBER: + return token().number(); + case wxPluralFormsToken::T_N: + return n; + // 2 args + case wxPluralFormsToken::T_EQUAL: + return node(0)->evaluate(n) == node(1)->evaluate(n); + case wxPluralFormsToken::T_NOT_EQUAL: + return node(0)->evaluate(n) != node(1)->evaluate(n); + case wxPluralFormsToken::T_GREATER: + return node(0)->evaluate(n) > node(1)->evaluate(n); + case wxPluralFormsToken::T_GREATER_OR_EQUAL: + return node(0)->evaluate(n) >= node(1)->evaluate(n); + case wxPluralFormsToken::T_LESS: + return node(0)->evaluate(n) < node(1)->evaluate(n); + case wxPluralFormsToken::T_LESS_OR_EQUAL: + return node(0)->evaluate(n) <= node(1)->evaluate(n); + case wxPluralFormsToken::T_REMINDER: + { + wxPluralFormsToken::Number number = node(1)->evaluate(n); + if (number != 0) + { + return node(0)->evaluate(n) % number; + } + else + { + return 0; + } + } + case wxPluralFormsToken::T_LOGICAL_AND: + return node(0)->evaluate(n) && node(1)->evaluate(n); + case wxPluralFormsToken::T_LOGICAL_OR: + return node(0)->evaluate(n) || node(1)->evaluate(n); + // 3 args + case wxPluralFormsToken::T_QUESTION: + return node(0)->evaluate(n) + ? node(1)->evaluate(n) + : node(2)->evaluate(n); + default: + return 0; + } +} + + +class wxPluralFormsCalculator +{ +public: + wxPluralFormsCalculator() : m_nplurals(0), m_plural(0) {} + + // input: number, returns msgstr index + int evaluate(int n) const; + + // input: text after "Plural-Forms:" (e.g. "nplurals=2; plural=(n != 1);"), + // if s == 0, creates default handler + // returns 0 if error + static wxPluralFormsCalculator* make(const char* s = 0); + + ~wxPluralFormsCalculator() {} + + void init(wxPluralFormsToken::Number nplurals, wxPluralFormsNode* plural); + +private: + wxPluralFormsToken::Number m_nplurals; + wxPluralFormsNodePtr m_plural; +}; + +wxDEFINE_SCOPED_PTR(wxPluralFormsCalculator, wxPluralFormsCalculatorPtr) + +void wxPluralFormsCalculator::init(wxPluralFormsToken::Number nplurals, + wxPluralFormsNode* plural) +{ + m_nplurals = nplurals; + m_plural.reset(plural); +} + +int wxPluralFormsCalculator::evaluate(int n) const +{ + if (m_plural.get() == 0) + { + return 0; + } + wxPluralFormsToken::Number number = m_plural->evaluate(n); + if (number < 0 || number > m_nplurals) + { + return 0; + } + return number; +} + + +class wxPluralFormsParser +{ +public: + wxPluralFormsParser(wxPluralFormsScanner& scanner) : m_scanner(scanner) {} + bool parse(wxPluralFormsCalculator& rCalculator); + +private: + wxPluralFormsNode* parsePlural(); + // stops at T_SEMICOLON, returns 0 if error + wxPluralFormsScanner& m_scanner; + const wxPluralFormsToken& token() const; + bool nextToken(); + + wxPluralFormsNode* expression(); + wxPluralFormsNode* logicalOrExpression(); + wxPluralFormsNode* logicalAndExpression(); + wxPluralFormsNode* equalityExpression(); + wxPluralFormsNode* multiplicativeExpression(); + wxPluralFormsNode* relationalExpression(); + wxPluralFormsNode* pmExpression(); +}; + +bool wxPluralFormsParser::parse(wxPluralFormsCalculator& rCalculator) +{ + if (token().type() != wxPluralFormsToken::T_NPLURALS) + return false; + if (!nextToken()) + return false; + if (token().type() != wxPluralFormsToken::T_ASSIGN) + return false; + if (!nextToken()) + return false; + if (token().type() != wxPluralFormsToken::T_NUMBER) + return false; + wxPluralFormsToken::Number nplurals = token().number(); + if (!nextToken()) + return false; + if (token().type() != wxPluralFormsToken::T_SEMICOLON) + return false; + if (!nextToken()) + return false; + if (token().type() != wxPluralFormsToken::T_PLURAL) + return false; + if (!nextToken()) + return false; + if (token().type() != wxPluralFormsToken::T_ASSIGN) + return false; + if (!nextToken()) + return false; + wxPluralFormsNode* plural = parsePlural(); + if (plural == 0) + return false; + if (token().type() != wxPluralFormsToken::T_SEMICOLON) + return false; + if (!nextToken()) + return false; + if (token().type() != wxPluralFormsToken::T_EOF) + return false; + rCalculator.init(nplurals, plural); + return true; +} + +wxPluralFormsNode* wxPluralFormsParser::parsePlural() +{ + wxPluralFormsNode* p = expression(); + if (p == NULL) + { + return NULL; + } + wxPluralFormsNodePtr n(p); + if (token().type() != wxPluralFormsToken::T_SEMICOLON) + { + return NULL; + } + return n.release(); +} + +const wxPluralFormsToken& wxPluralFormsParser::token() const +{ + return m_scanner.token(); +} + +bool wxPluralFormsParser::nextToken() +{ + if (!m_scanner.nextToken()) + return false; + return true; +} + +wxPluralFormsNode* wxPluralFormsParser::expression() +{ + wxPluralFormsNode* p = logicalOrExpression(); + if (p == NULL) + return NULL; + wxPluralFormsNodePtr n(p); + if (token().type() == wxPluralFormsToken::T_QUESTION) + { + wxPluralFormsNodePtr qn(new wxPluralFormsNode(token())); + if (!nextToken()) + { + return 0; + } + p = expression(); + if (p == 0) + { + return 0; + } + qn->setNode(1, p); + if (token().type() != wxPluralFormsToken::T_COLON) + { + return 0; + } + if (!nextToken()) + { + return 0; + } + p = expression(); + if (p == 0) + { + return 0; + } + qn->setNode(2, p); + qn->setNode(0, n.release()); + return qn.release(); + } + return n.release(); +} + +wxPluralFormsNode*wxPluralFormsParser::logicalOrExpression() +{ + wxPluralFormsNode* p = logicalAndExpression(); + if (p == NULL) + return NULL; + wxPluralFormsNodePtr ln(p); + if (token().type() == wxPluralFormsToken::T_LOGICAL_OR) + { + wxPluralFormsNodePtr un(new wxPluralFormsNode(token())); + if (!nextToken()) + { + return 0; + } + p = logicalOrExpression(); + if (p == 0) + { + return 0; + } + wxPluralFormsNodePtr rn(p); // right + if (rn->token().type() == wxPluralFormsToken::T_LOGICAL_OR) + { + // see logicalAndExpression comment + un->setNode(0, ln.release()); + un->setNode(1, rn->releaseNode(0)); + rn->setNode(0, un.release()); + return rn.release(); + } + + + un->setNode(0, ln.release()); + un->setNode(1, rn.release()); + return un.release(); + } + return ln.release(); +} + +wxPluralFormsNode* wxPluralFormsParser::logicalAndExpression() +{ + wxPluralFormsNode* p = equalityExpression(); + if (p == NULL) + return NULL; + wxPluralFormsNodePtr ln(p); // left + if (token().type() == wxPluralFormsToken::T_LOGICAL_AND) + { + wxPluralFormsNodePtr un(new wxPluralFormsNode(token())); // up + if (!nextToken()) + { + return NULL; + } + p = logicalAndExpression(); + if (p == 0) + { + return NULL; + } + wxPluralFormsNodePtr rn(p); // right + if (rn->token().type() == wxPluralFormsToken::T_LOGICAL_AND) + { +// transform 1 && (2 && 3) -> (1 && 2) && 3 +// u r +// l r -> u 3 +// 2 3 l 2 + un->setNode(0, ln.release()); + un->setNode(1, rn->releaseNode(0)); + rn->setNode(0, un.release()); + return rn.release(); + } + + un->setNode(0, ln.release()); + un->setNode(1, rn.release()); + return un.release(); + } + return ln.release(); +} + +wxPluralFormsNode* wxPluralFormsParser::equalityExpression() +{ + wxPluralFormsNode* p = relationalExpression(); + if (p == NULL) + return NULL; + wxPluralFormsNodePtr n(p); + if (token().type() == wxPluralFormsToken::T_EQUAL + || token().type() == wxPluralFormsToken::T_NOT_EQUAL) + { + wxPluralFormsNodePtr qn(new wxPluralFormsNode(token())); + if (!nextToken()) + { + return NULL; + } + p = relationalExpression(); + if (p == NULL) + { + return NULL; + } + qn->setNode(1, p); + qn->setNode(0, n.release()); + return qn.release(); + } + return n.release(); +} + +wxPluralFormsNode* wxPluralFormsParser::relationalExpression() +{ + wxPluralFormsNode* p = multiplicativeExpression(); + if (p == NULL) + return NULL; + wxPluralFormsNodePtr n(p); + if (token().type() == wxPluralFormsToken::T_GREATER + || token().type() == wxPluralFormsToken::T_LESS + || token().type() == wxPluralFormsToken::T_GREATER_OR_EQUAL + || token().type() == wxPluralFormsToken::T_LESS_OR_EQUAL) + { + wxPluralFormsNodePtr qn(new wxPluralFormsNode(token())); + if (!nextToken()) + { + return NULL; + } + p = multiplicativeExpression(); + if (p == NULL) + { + return NULL; + } + qn->setNode(1, p); + qn->setNode(0, n.release()); + return qn.release(); + } + return n.release(); +} + +wxPluralFormsNode* wxPluralFormsParser::multiplicativeExpression() +{ + wxPluralFormsNode* p = pmExpression(); + if (p == NULL) + return NULL; + wxPluralFormsNodePtr n(p); + if (token().type() == wxPluralFormsToken::T_REMINDER) + { + wxPluralFormsNodePtr qn(new wxPluralFormsNode(token())); + if (!nextToken()) + { + return NULL; + } + p = pmExpression(); + if (p == NULL) + { + return NULL; + } + qn->setNode(1, p); + qn->setNode(0, n.release()); + return qn.release(); + } + return n.release(); +} + +wxPluralFormsNode* wxPluralFormsParser::pmExpression() +{ + wxPluralFormsNodePtr n; + if (token().type() == wxPluralFormsToken::T_N + || token().type() == wxPluralFormsToken::T_NUMBER) + { + n.reset(new wxPluralFormsNode(token())); + if (!nextToken()) + { + return NULL; + } + } + else if (token().type() == wxPluralFormsToken::T_LEFT_BRACKET) { + if (!nextToken()) + { + return NULL; + } + wxPluralFormsNode* p = expression(); + if (p == NULL) + { + return NULL; + } + n.reset(p); + if (token().type() != wxPluralFormsToken::T_RIGHT_BRACKET) + { + return NULL; + } + if (!nextToken()) + { + return NULL; + } + } + else + { + return NULL; + } + return n.release(); +} + +wxPluralFormsCalculator* wxPluralFormsCalculator::make(const char* s) +{ + wxPluralFormsCalculatorPtr calculator(new wxPluralFormsCalculator); + if (s != NULL) + { + wxPluralFormsScanner scanner(s); + wxPluralFormsParser p(scanner); + if (!p.parse(*calculator)) + { + return NULL; + } + } + return calculator.release(); +} + + + + +// ---------------------------------------------------------------------------- +// wxMsgCatalogFile corresponds to one disk-file message catalog. +// +// This is a "low-level" class and is used only by wxMsgCatalog +// NOTE: for the documentation of the binary catalog (.MO) files refer to +// the GNU gettext manual: +// http://www.gnu.org/software/autoconf/manual/gettext/MO-Files.html +// ---------------------------------------------------------------------------- + +class wxMsgCatalogFile +{ +public: + typedef wxScopedCharBuffer DataBuffer; + + // ctor & dtor + wxMsgCatalogFile(); + ~wxMsgCatalogFile(); + + // load the catalog from disk + bool LoadFile(const wxString& filename, + wxPluralFormsCalculatorPtr& rPluralFormsCalculator); + bool LoadData(const DataBuffer& data, + wxPluralFormsCalculatorPtr& rPluralFormsCalculator); + + // fills the hash with string-translation pairs + bool FillHash(wxStringToStringHashMap& hash, const wxString& domain) const; + + // return the charset of the strings in this catalog or empty string if + // none/unknown + wxString GetCharset() const { return m_charset; } + +private: + // this implementation is binary compatible with GNU gettext() version 0.10 + + // an entry in the string table + struct wxMsgTableEntry + { + size_t32 nLen; // length of the string + size_t32 ofsString; // pointer to the string + }; + + // header of a .mo file + struct wxMsgCatalogHeader + { + size_t32 magic, // offset +00: magic id + revision, // +04: revision + numStrings; // +08: number of strings in the file + size_t32 ofsOrigTable, // +0C: start of original string table + ofsTransTable; // +10: start of translated string table + size_t32 nHashSize, // +14: hash table size + ofsHashTable; // +18: offset of hash table start + }; + + // all data is stored here + DataBuffer m_data; + + // data description + size_t32 m_numStrings; // number of strings in this domain + wxMsgTableEntry *m_pOrigTable, // pointer to original strings + *m_pTransTable; // translated + + wxString m_charset; // from the message catalog header + + + // swap the 2 halves of 32 bit integer if needed + size_t32 Swap(size_t32 ui) const + { + return m_bSwapped ? (ui << 24) | ((ui & 0xff00) << 8) | + ((ui >> 8) & 0xff00) | (ui >> 24) + : ui; + } + + const char *StringAtOfs(wxMsgTableEntry *pTable, size_t32 n) const + { + const wxMsgTableEntry * const ent = pTable + n; + + // this check could fail for a corrupt message catalog + size_t32 ofsString = Swap(ent->ofsString); + if ( ofsString + Swap(ent->nLen) > m_data.length()) + { + return NULL; + } + + return m_data.data() + ofsString; + } + + bool m_bSwapped; // wrong endianness? + + wxDECLARE_NO_COPY_CLASS(wxMsgCatalogFile); +}; + +// ---------------------------------------------------------------------------- +// wxMsgCatalogFile class +// ---------------------------------------------------------------------------- + +wxMsgCatalogFile::wxMsgCatalogFile() +{ +} + +wxMsgCatalogFile::~wxMsgCatalogFile() +{ +} + +// open disk file and read in it's contents +bool wxMsgCatalogFile::LoadFile(const wxString& filename, + wxPluralFormsCalculatorPtr& rPluralFormsCalculator) +{ + wxFile fileMsg(filename); + if ( !fileMsg.IsOpened() ) + return false; + + // get the file size (assume it is less than 4GB...) + wxFileOffset lenFile = fileMsg.Length(); + if ( lenFile == wxInvalidOffset ) + return false; + + size_t nSize = wx_truncate_cast(size_t, lenFile); + wxASSERT_MSG( nSize == lenFile + size_t(0), wxS("message catalog bigger than 4GB?") ); + + wxMemoryBuffer filedata; + + // read the whole file in memory + if ( fileMsg.Read(filedata.GetWriteBuf(nSize), nSize) != lenFile ) + return false; + + filedata.UngetWriteBuf(nSize); + + bool ok = LoadData + ( + DataBuffer::CreateOwned((char*)filedata.release(), nSize), + rPluralFormsCalculator + ); + if ( !ok ) + { + wxLogWarning(_("'%s' is not a valid message catalog."), filename.c_str()); + return false; + } + + return true; +} + + +bool wxMsgCatalogFile::LoadData(const DataBuffer& data, + wxPluralFormsCalculatorPtr& rPluralFormsCalculator) +{ + // examine header + bool bValid = data.length() > sizeof(wxMsgCatalogHeader); + + const wxMsgCatalogHeader *pHeader = (wxMsgCatalogHeader *)data.data(); + if ( bValid ) { + // we'll have to swap all the integers if it's true + m_bSwapped = pHeader->magic == MSGCATALOG_MAGIC_SW; + + // check the magic number + bValid = m_bSwapped || pHeader->magic == MSGCATALOG_MAGIC; + } + + if ( !bValid ) { + // it's either too short or has incorrect magic number + wxLogWarning(_("Invalid message catalog.")); + return false; + } + + m_data = data; + + // initialize + m_numStrings = Swap(pHeader->numStrings); + m_pOrigTable = (wxMsgTableEntry *)(data.data() + + Swap(pHeader->ofsOrigTable)); + m_pTransTable = (wxMsgTableEntry *)(data.data() + + Swap(pHeader->ofsTransTable)); + + // now parse catalog's header and try to extract catalog charset and + // plural forms formula from it: + + const char* headerData = StringAtOfs(m_pOrigTable, 0); + if ( headerData && headerData[0] == '\0' ) + { + // Extract the charset: + const char * const header = StringAtOfs(m_pTransTable, 0); + const char * + cset = strstr(header, "Content-Type: text/plain; charset="); + if ( cset ) + { + cset += 34; // strlen("Content-Type: text/plain; charset=") + + const char * const csetEnd = strchr(cset, '\n'); + if ( csetEnd ) + { + m_charset = wxString(cset, csetEnd - cset); + if ( m_charset == wxS("CHARSET") ) + { + // "CHARSET" is not valid charset, but lazy translator + m_charset.clear(); + } + } + } + // else: incorrectly filled Content-Type header + + // Extract plural forms: + const char * plurals = strstr(header, "Plural-Forms:"); + if ( plurals ) + { + plurals += 13; // strlen("Plural-Forms:") + const char * const pluralsEnd = strchr(plurals, '\n'); + if ( pluralsEnd ) + { + const size_t pluralsLen = pluralsEnd - plurals; + wxCharBuffer buf(pluralsLen); + strncpy(buf.data(), plurals, pluralsLen); + wxPluralFormsCalculator * const + pCalculator = wxPluralFormsCalculator::make(buf); + if ( pCalculator ) + { + rPluralFormsCalculator.reset(pCalculator); + } + else + { + wxLogVerbose(_("Failed to parse Plural-Forms: '%s'"), + buf.data()); + } + } + } + + if ( !rPluralFormsCalculator.get() ) + rPluralFormsCalculator.reset(wxPluralFormsCalculator::make()); + } + + // everything is fine + return true; +} + +bool wxMsgCatalogFile::FillHash(wxStringToStringHashMap& hash, + const wxString& domain) const +{ + wxUnusedVar(domain); // silence warning in Unicode build + + // conversion to use to convert catalog strings to the GUI encoding + wxMBConv *inputConv = NULL; + wxMBConv *inputConvPtr = NULL; // same as inputConv but safely deleteable + + if ( !m_charset.empty() ) + { +#if !wxUSE_UNICODE && wxUSE_FONTMAP + // determine if we need any conversion at all + wxFontEncoding encCat = wxFontMapperBase::GetEncodingFromName(m_charset); + if ( encCat != wxLocale::GetSystemEncoding() ) +#endif + { + inputConvPtr = + inputConv = new wxCSConv(m_charset); + } + } + else // no need or not possible to convert the encoding + { +#if wxUSE_UNICODE + // we must somehow convert the narrow strings in the message catalog to + // wide strings, so use the default conversion if we have no charset + inputConv = wxConvCurrent; +#endif + } + +#if !wxUSE_UNICODE + wxString msgIdCharset = gs_msgIdCharset[domain]; + + // conversion to apply to msgid strings before looking them up: we only + // need it if the msgids are neither in 7 bit ASCII nor in the same + // encoding as the catalog + wxCSConv *sourceConv = msgIdCharset.empty() || (msgIdCharset == m_charset) + ? NULL + : new wxCSConv(msgIdCharset); +#endif // !wxUSE_UNICODE + + for (size_t32 i = 0; i < m_numStrings; i++) + { + const char *data = StringAtOfs(m_pOrigTable, i); + if (!data) + return false; // may happen for invalid MO files + + wxString msgid; +#if wxUSE_UNICODE + msgid = wxString(data, *inputConv); +#else // ASCII + if ( inputConv && sourceConv ) + msgid = wxString(inputConv->cMB2WC(data), *sourceConv); + else + msgid = data; +#endif // wxUSE_UNICODE + + data = StringAtOfs(m_pTransTable, i); + if (!data) + return false; // may happen for invalid MO files + + size_t length = Swap(m_pTransTable[i].nLen); + size_t offset = 0; + size_t index = 0; + while (offset < length) + { + const char * const str = data + offset; + + wxString msgstr; +#if wxUSE_UNICODE + msgstr = wxString(str, *inputConv); +#else + if ( inputConv ) + msgstr = wxString(inputConv->cMB2WC(str), *wxConvUI); + else + msgstr = str; +#endif // wxUSE_UNICODE/!wxUSE_UNICODE + + if ( !msgstr.empty() ) + { + hash[index == 0 ? msgid : msgid + wxChar(index)] = msgstr; + } + + // skip this string + // IMPORTANT: accesses to the 'data' pointer are valid only for + // the first 'length+1' bytes (GNU specs says that the + // final NUL is not counted in length); using wxStrnlen() + // we make sure we don't access memory beyond the valid range + // (which otherwise may happen for invalid MO files): + offset += wxStrnlen(str, length - offset) + 1; + ++index; + } + } + +#if !wxUSE_UNICODE + delete sourceConv; +#endif + delete inputConvPtr; + + return true; +} + + +// ---------------------------------------------------------------------------- +// wxMsgCatalog class +// ---------------------------------------------------------------------------- + +#if !wxUSE_UNICODE +wxMsgCatalog::~wxMsgCatalog() +{ + if ( m_conv ) + { + if ( wxConvUI == m_conv ) + { + // we only change wxConvUI if it points to wxConvLocal so we reset + // it back to it too + wxConvUI = &wxConvLocal; + } + + delete m_conv; + } +} +#endif // !wxUSE_UNICODE + +/* static */ +wxMsgCatalog *wxMsgCatalog::CreateFromFile(const wxString& filename, + const wxString& domain) +{ + wxScopedPtr cat(new wxMsgCatalog(domain)); + + wxMsgCatalogFile file; + + if ( !file.LoadFile(filename, cat->m_pluralFormsCalculator) ) + return NULL; + + if ( !file.FillHash(cat->m_messages, domain) ) + return NULL; + + return cat.release(); +} + +/* static */ +wxMsgCatalog *wxMsgCatalog::CreateFromData(const wxScopedCharBuffer& data, + const wxString& domain) +{ + wxScopedPtr cat(new wxMsgCatalog(domain)); + + wxMsgCatalogFile file; + + if ( !file.LoadData(data, cat->m_pluralFormsCalculator) ) + return NULL; + + if ( !file.FillHash(cat->m_messages, domain) ) + return NULL; + + return cat.release(); +} + +const wxString *wxMsgCatalog::GetString(const wxString& str, unsigned n) const +{ + int index = 0; + if (n != UINT_MAX) + { + index = m_pluralFormsCalculator->evaluate(n); + } + wxStringToStringHashMap::const_iterator i; + if (index != 0) + { + i = m_messages.find(wxString(str) + wxChar(index)); // plural + } + else + { + i = m_messages.find(str); + } + + if ( i != m_messages.end() ) + { + return &i->second; + } + else + return NULL; +} + + +// ---------------------------------------------------------------------------- +// wxTranslations +// ---------------------------------------------------------------------------- + +namespace +{ + +wxTranslations *gs_translations = NULL; +bool gs_translationsOwned = false; + +} // anonymous namespace + + +/*static*/ +wxTranslations *wxTranslations::Get() +{ + return gs_translations; +} + +/*static*/ +void wxTranslations::Set(wxTranslations *t) +{ + if ( gs_translationsOwned ) + delete gs_translations; + gs_translations = t; + gs_translationsOwned = true; +} + +/*static*/ +void wxTranslations::SetNonOwned(wxTranslations *t) +{ + if ( gs_translationsOwned ) + delete gs_translations; + gs_translations = t; + gs_translationsOwned = false; +} + + +wxTranslations::wxTranslations() +{ + m_pMsgCat = NULL; + m_loader = new wxFileTranslationsLoader; +} + + +wxTranslations::~wxTranslations() +{ + delete m_loader; + + // free catalogs memory + wxMsgCatalog *pTmpCat; + while ( m_pMsgCat != NULL ) + { + pTmpCat = m_pMsgCat; + m_pMsgCat = m_pMsgCat->m_pNext; + delete pTmpCat; + } +} + + +void wxTranslations::SetLoader(wxTranslationsLoader *loader) +{ + wxCHECK_RET( loader, "loader can't be NULL" ); + + delete m_loader; + m_loader = loader; +} + + +void wxTranslations::SetLanguage(wxLanguage lang) +{ + if ( lang == wxLANGUAGE_DEFAULT ) + SetLanguage(""); + else + SetLanguage(wxLocale::GetLanguageCanonicalName(lang)); +} + +void wxTranslations::SetLanguage(const wxString& lang) +{ + m_lang = lang; +} + + +wxArrayString wxTranslations::GetAvailableTranslations(const wxString& domain) const +{ + wxCHECK_MSG( m_loader, wxArrayString(), "loader can't be NULL" ); + + return m_loader->GetAvailableTranslations(domain); +} + + +bool wxTranslations::AddStdCatalog() +{ + if ( !AddCatalog(wxS("wxstd")) ) + return false; + + // there may be a catalog with toolkit specific overrides, it is not + // an error if this does not exist + wxString port(wxPlatformInfo::Get().GetPortIdName()); + if ( !port.empty() ) + { + AddCatalog(port.BeforeFirst(wxS('/')).MakeLower()); + } + + return true; +} + + +bool wxTranslations::AddCatalog(const wxString& domain) +{ + return AddCatalog(domain, wxLANGUAGE_ENGLISH_US); +} + +#if !wxUSE_UNICODE +bool wxTranslations::AddCatalog(const wxString& domain, + wxLanguage msgIdLanguage, + const wxString& msgIdCharset) +{ + gs_msgIdCharset[domain] = msgIdCharset; + return AddCatalog(domain, msgIdLanguage); +} +#endif // !wxUSE_UNICODE + +bool wxTranslations::AddCatalog(const wxString& domain, + wxLanguage msgIdLanguage) +{ + const wxString msgIdLang = wxLocale::GetLanguageCanonicalName(msgIdLanguage); + const wxString domain_lang = GetBestTranslation(domain, msgIdLang); + + if ( domain_lang.empty() ) + { + wxLogTrace(TRACE_I18N, + wxS("no suitable translation for domain '%s' found"), + domain); + return false; + } + + wxLogTrace(TRACE_I18N, + wxS("adding '%s' translation for domain '%s' (msgid language '%s')"), + domain_lang, domain, msgIdLang); + + return LoadCatalog(domain, domain_lang, msgIdLang); +} + + +bool wxTranslations::LoadCatalog(const wxString& domain, const wxString& lang, const wxString& msgIdLang) +{ + wxCHECK_MSG( m_loader, false, "loader can't be NULL" ); + + wxMsgCatalog *cat = NULL; + +#if wxUSE_FONTMAP + // first look for the catalog for this language and the current locale: + // notice that we don't use the system name for the locale as this would + // force us to install catalogs in different locations depending on the + // system but always use the canonical name + wxFontEncoding encSys = wxLocale::GetSystemEncoding(); + if ( encSys != wxFONTENCODING_SYSTEM ) + { + wxString fullname(lang); + fullname << wxS('.') << wxFontMapperBase::GetEncodingName(encSys); + + cat = m_loader->LoadCatalog(domain, fullname); + } +#endif // wxUSE_FONTMAP + + if ( !cat ) + { + // Next try: use the provided name language name: + cat = m_loader->LoadCatalog(domain, lang); + } + + if ( !cat ) + { + // Also try just base locale name: for things like "fr_BE" (Belgium + // French) we should use fall back on plain "fr" if no Belgium-specific + // message catalogs exist + wxString baselang = lang.BeforeFirst('_'); + if ( lang != baselang ) + cat = m_loader->LoadCatalog(domain, baselang); + } + + if ( !cat ) + { + // It is OK to not load catalog if the msgid language and m_language match, + // in which case we can directly display the texts embedded in program's + // source code: + if ( msgIdLang == lang ) + return true; + } + + if ( cat ) + { + // add it to the head of the list so that in GetString it will + // be searched before the catalogs added earlier + cat->m_pNext = m_pMsgCat; + m_pMsgCat = cat; + + return true; + } + else + { + // Nothing worked, the catalog just isn't there + wxLogTrace(TRACE_I18N, + "Catalog \"%s.mo\" not found for language \"%s\".", + domain, lang); + return false; + } +} + +// check if the given catalog is loaded +bool wxTranslations::IsLoaded(const wxString& domain) const +{ + return FindCatalog(domain) != NULL; +} + +wxString wxTranslations::GetBestTranslation(const wxString& domain, + wxLanguage msgIdLanguage) +{ + const wxString lang = wxLocale::GetLanguageCanonicalName(msgIdLanguage); + return GetBestTranslation(domain, lang); +} + +wxString wxTranslations::GetBestTranslation(const wxString& domain, + const wxString& msgIdLanguage) +{ + // explicitly set language should always be respected + if ( !m_lang.empty() ) + return m_lang; + + wxArrayString available(GetAvailableTranslations(domain)); + // it's OK to have duplicates, so just add msgid language + available.push_back(msgIdLanguage); + available.push_back(msgIdLanguage.BeforeFirst('_')); + + wxLogTrace(TRACE_I18N, "choosing best language for domain '%s'", domain); + LogTraceArray(" - available translations", available); + const wxString lang = GetPreferredUILanguage(available); + wxLogTrace(TRACE_I18N, " => using language '%s'", lang); + return lang; +} + + +/* static */ +const wxString& wxTranslations::GetUntranslatedString(const wxString& str) +{ + wxLocaleUntranslatedStrings& strings = wxThreadInfo.untranslatedStrings; + + wxLocaleUntranslatedStrings::iterator i = strings.find(str); + if ( i == strings.end() ) + return *strings.insert(str).first; + + return *i; +} + + +const wxString *wxTranslations::GetTranslatedString(const wxString& origString, + const wxString& domain) const +{ + return GetTranslatedString(origString, UINT_MAX, domain); +} + +const wxString *wxTranslations::GetTranslatedString(const wxString& origString, + unsigned n, + const wxString& domain) const +{ + if ( origString.empty() ) + return NULL; + + const wxString *trans = NULL; + wxMsgCatalog *pMsgCat; + + if ( !domain.empty() ) + { + pMsgCat = FindCatalog(domain); + + // does the catalog exist? + if ( pMsgCat != NULL ) + trans = pMsgCat->GetString(origString, n); + } + else + { + // search in all domains + for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext ) + { + trans = pMsgCat->GetString(origString, n); + if ( trans != NULL ) // take the first found + break; + } + } + + if ( trans == NULL ) + { + wxLogTrace + ( + TRACE_I18N, + "string \"%s\"%s not found in %slocale '%s'.", + origString, + (n != UINT_MAX ? wxString::Format("[%ld]", (long)n) : wxString()), + (!domain.empty() ? wxString::Format("domain '%s' ", domain) : wxString()), + m_lang + ); + } + + return trans; +} + + +wxString wxTranslations::GetHeaderValue(const wxString& header, + const wxString& domain) const +{ + if ( header.empty() ) + return wxEmptyString; + + const wxString *trans = NULL; + wxMsgCatalog *pMsgCat; + + if ( !domain.empty() ) + { + pMsgCat = FindCatalog(domain); + + // does the catalog exist? + if ( pMsgCat == NULL ) + return wxEmptyString; + + trans = pMsgCat->GetString(wxEmptyString, UINT_MAX); + } + else + { + // search in all domains + for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext ) + { + trans = pMsgCat->GetString(wxEmptyString, UINT_MAX); + if ( trans != NULL ) // take the first found + break; + } + } + + if ( !trans || trans->empty() ) + return wxEmptyString; + + size_t found = trans->find(header); + if ( found == wxString::npos ) + return wxEmptyString; + + found += header.length() + 2 /* ': ' */; + + // Every header is separated by \n + + size_t endLine = trans->find(wxS('\n'), found); + size_t len = (endLine == wxString::npos) ? + wxString::npos : (endLine - found); + + return trans->substr(found, len); +} + + +// find catalog by name in a linked list, return NULL if !found +wxMsgCatalog *wxTranslations::FindCatalog(const wxString& domain) const +{ + // linear search in the linked list + wxMsgCatalog *pMsgCat; + for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext ) + { + if ( pMsgCat->GetDomain() == domain ) + return pMsgCat; + } + + return NULL; +} + +// ---------------------------------------------------------------------------- +// wxFileTranslationsLoader +// ---------------------------------------------------------------------------- + +namespace +{ + +// the list of the directories to search for message catalog files +wxArrayString gs_searchPrefixes; + +// return the directories to search for message catalogs under the given +// prefix, separated by wxPATH_SEP +wxString GetMsgCatalogSubdirs(const wxString& prefix, const wxString& lang) +{ + // Search first in Unix-standard prefix/lang/LC_MESSAGES, then in + // prefix/lang. + // + // Note that we use LC_MESSAGES on all platforms and not just Unix, because + // it doesn't cost much to look into one more directory and doing it this + // way has two important benefits: + // a) we don't break compatibility with wx-2.6 and older by stopping to + // look in a directory where the catalogs used to be and thus silently + // breaking apps after they are recompiled against the latest wx + // b) it makes it possible to package app's support files in the same + // way on all target platforms + const wxString prefixAndLang = wxFileName(prefix, lang).GetFullPath(); + + wxString searchPath; + searchPath.reserve(4*prefixAndLang.length()); + + searchPath +#ifdef __WXOSX__ + << prefixAndLang << ".lproj/LC_MESSAGES" << wxPATH_SEP + << prefixAndLang << ".lproj" << wxPATH_SEP +#endif + << prefixAndLang << wxFILE_SEP_PATH << "LC_MESSAGES" << wxPATH_SEP + << prefixAndLang << wxPATH_SEP + ; + + return searchPath; +} + +bool HasMsgCatalogInDir(const wxString& dir, const wxString& domain) +{ + return wxFileName(dir, domain, "mo").FileExists() || + wxFileName(dir + wxFILE_SEP_PATH + "LC_MESSAGES", domain, "mo").FileExists(); +} + +// get prefixes to locale directories; if lang is empty, don't point to +// OSX's .lproj bundles +wxArrayString GetSearchPrefixes() +{ + wxArrayString paths; + + // first take the entries explicitly added by the program + paths = gs_searchPrefixes; + +#if wxUSE_STDPATHS + // then look in the standard location + wxString stdp; + stdp = wxStandardPaths::Get().GetResourcesDir(); + if ( paths.Index(stdp) == wxNOT_FOUND ) + paths.Add(stdp); +#endif // wxUSE_STDPATHS + + // last look in default locations +#ifdef __UNIX__ + // LC_PATH is a standard env var containing the search path for the .mo + // files + const char *pszLcPath = wxGetenv("LC_PATH"); + if ( pszLcPath ) + { + const wxString lcp = pszLcPath; + if ( paths.Index(lcp) == wxNOT_FOUND ) + paths.Add(lcp); + } + + // also add the one from where wxWin was installed: + wxString wxp = wxGetInstallPrefix(); + if ( !wxp.empty() ) + { + wxp += wxS("/share/locale"); + if ( paths.Index(wxp) == wxNOT_FOUND ) + paths.Add(wxp); + } +#endif // __UNIX__ + + return paths; +} + +// construct the search path for the given language +wxString GetFullSearchPath(const wxString& lang) +{ + wxString searchPath; + searchPath.reserve(500); + + const wxArrayString prefixes = GetSearchPrefixes(); + + for ( wxArrayString::const_iterator i = prefixes.begin(); + i != prefixes.end(); + ++i ) + { + const wxString p = GetMsgCatalogSubdirs(*i, lang); + + if ( !searchPath.empty() ) + searchPath += wxPATH_SEP; + searchPath += p; + } + + return searchPath; +} + +} // anonymous namespace + + +void wxFileTranslationsLoader::AddCatalogLookupPathPrefix(const wxString& prefix) +{ + if ( gs_searchPrefixes.Index(prefix) == wxNOT_FOUND ) + { + gs_searchPrefixes.Add(prefix); + } + //else: already have it +} + + +wxMsgCatalog *wxFileTranslationsLoader::LoadCatalog(const wxString& domain, + const wxString& lang) +{ + wxString searchPath = GetFullSearchPath(lang); + + LogTraceLargeArray + ( + wxString::Format("looking for \"%s.mo\" in search path", domain), + wxSplit(searchPath, wxPATH_SEP[0]) + ); + + wxFileName fn(domain); + fn.SetExt(wxS("mo")); + + wxString strFullName; + if ( !wxFindFileInPath(&strFullName, searchPath, fn.GetFullPath()) ) + return NULL; + + // open file and read its data + wxLogVerbose(_("using catalog '%s' from '%s'."), domain, strFullName.c_str()); + wxLogTrace(TRACE_I18N, wxS("Using catalog \"%s\"."), strFullName.c_str()); + + return wxMsgCatalog::CreateFromFile(strFullName, domain); +} + + +wxArrayString wxFileTranslationsLoader::GetAvailableTranslations(const wxString& domain) const +{ + wxArrayString langs; + const wxArrayString prefixes = GetSearchPrefixes(); + + LogTraceLargeArray + ( + wxString::Format("looking for available translations of \"%s\" in search path", domain), + prefixes + ); + + for ( wxArrayString::const_iterator i = prefixes.begin(); + i != prefixes.end(); + ++i ) + { + if ( i->empty() ) + continue; + wxDir dir; + if ( !dir.Open(*i) ) + continue; + + wxString lang; + for ( bool ok = dir.GetFirst(&lang, "", wxDIR_DIRS); + ok; + ok = dir.GetNext(&lang) ) + { + const wxString langdir = *i + wxFILE_SEP_PATH + lang; + if ( HasMsgCatalogInDir(langdir, domain) ) + { +#ifdef __WXOSX__ + wxString rest; + if ( lang.EndsWith(".lproj", &rest) ) + lang = rest; +#endif // __WXOSX__ + + wxLogTrace(TRACE_I18N, + "found %s translation of \"%s\" in %s", + lang, domain, langdir); + langs.push_back(lang); + } + } + } + + return langs; +} + + +// ---------------------------------------------------------------------------- +// wxResourceTranslationsLoader +// ---------------------------------------------------------------------------- + +#ifdef __WINDOWS__ + +wxMsgCatalog *wxResourceTranslationsLoader::LoadCatalog(const wxString& domain, + const wxString& lang) +{ + const void *mo_data = NULL; + size_t mo_size = 0; + + const wxString resname = wxString::Format("%s_%s", domain, lang); + + if ( !wxLoadUserResource(&mo_data, &mo_size, + resname, + GetResourceType().t_str(), + GetModule()) ) + return NULL; + + wxLogTrace(TRACE_I18N, + "Using catalog from Windows resource \"%s\".", resname); + + wxMsgCatalog *cat = wxMsgCatalog::CreateFromData( + wxCharBuffer::CreateNonOwned(static_cast(mo_data), mo_size), + domain); + + if ( !cat ) + { + wxLogWarning(_("Resource '%s' is not a valid message catalog."), resname); + } + + return cat; +} + +namespace +{ + +struct EnumCallbackData +{ + wxString prefix; + wxArrayString langs; +}; + +BOOL CALLBACK EnumTranslations(HMODULE WXUNUSED(hModule), + LPCTSTR WXUNUSED(lpszType), + LPTSTR lpszName, + LONG_PTR lParam) +{ + wxString name(lpszName); + name.MakeLower(); // resource names are case insensitive + + EnumCallbackData *data = reinterpret_cast(lParam); + + wxString lang; + if ( name.StartsWith(data->prefix, &lang) && !lang.empty() ) + data->langs.push_back(lang); + + return TRUE; // continue enumeration +} + +} // anonymous namespace + + +wxArrayString wxResourceTranslationsLoader::GetAvailableTranslations(const wxString& domain) const +{ + EnumCallbackData data; + data.prefix = domain + "_"; + data.prefix.MakeLower(); // resource names are case insensitive + + if ( !EnumResourceNames(GetModule(), + GetResourceType().t_str(), + EnumTranslations, + reinterpret_cast(&data)) ) + { + const DWORD err = GetLastError(); + if ( err != NO_ERROR && err != ERROR_RESOURCE_TYPE_NOT_FOUND ) + { + wxLogSysError(_("Couldn't enumerate translations")); + } + } + + return data.langs; +} + +#endif // __WINDOWS__ + + +// ---------------------------------------------------------------------------- +// wxTranslationsModule module (for destruction of gs_translations) +// ---------------------------------------------------------------------------- + +class wxTranslationsModule: public wxModule +{ + DECLARE_DYNAMIC_CLASS(wxTranslationsModule) + public: + wxTranslationsModule() {} + + bool OnInit() + { + return true; + } + + void OnExit() + { + if ( gs_translationsOwned ) + delete gs_translations; + gs_translations = NULL; + gs_translationsOwned = true; + } +}; + +IMPLEMENT_DYNAMIC_CLASS(wxTranslationsModule, wxModule) + +#endif // wxUSE_INTL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/treebase.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/treebase.cpp new file mode 100644 index 0000000000..7283ea3981 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/treebase.cpp @@ -0,0 +1,375 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/treebase.cpp +// Purpose: Base wxTreeCtrl classes +// Author: Julian Smart +// Created: 01/02/97 +// Modified: +// Copyright: (c) 1998 Robert Roebling, Julian Smart et al +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================= +// declarations +// ============================================================================= + +// ----------------------------------------------------------------------------- +// headers +// ----------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TREECTRL + +#include "wx/treectrl.h" +#include "wx/imaglist.h" + +extern WXDLLEXPORT_DATA(const char) wxTreeCtrlNameStr[] = "treeCtrl"; + +// ---------------------------------------------------------------------------- +// events +// ---------------------------------------------------------------------------- + +wxDEFINE_EVENT( wxEVT_TREE_BEGIN_DRAG, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_BEGIN_RDRAG, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_BEGIN_LABEL_EDIT, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_END_LABEL_EDIT, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_DELETE_ITEM, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_GET_INFO, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_SET_INFO, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_EXPANDED, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_EXPANDING, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_COLLAPSED, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_COLLAPSING, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_SEL_CHANGED, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_SEL_CHANGING, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_KEY_DOWN, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_ACTIVATED, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_RIGHT_CLICK, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_MIDDLE_CLICK, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_END_DRAG, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_STATE_IMAGE_CLICK, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_GETTOOLTIP, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_TREE_ITEM_MENU, wxTreeEvent ); + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +wxDEFINE_FLAGS( wxTreeCtrlStyle ) +wxBEGIN_FLAGS( wxTreeCtrlStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxTR_EDIT_LABELS) +wxFLAGS_MEMBER(wxTR_NO_BUTTONS) +wxFLAGS_MEMBER(wxTR_HAS_BUTTONS) +wxFLAGS_MEMBER(wxTR_TWIST_BUTTONS) +wxFLAGS_MEMBER(wxTR_NO_LINES) +wxFLAGS_MEMBER(wxTR_FULL_ROW_HIGHLIGHT) +wxFLAGS_MEMBER(wxTR_LINES_AT_ROOT) +wxFLAGS_MEMBER(wxTR_HIDE_ROOT) +wxFLAGS_MEMBER(wxTR_ROW_LINES) +wxFLAGS_MEMBER(wxTR_HAS_VARIABLE_ROW_HEIGHT) +wxFLAGS_MEMBER(wxTR_SINGLE) +wxFLAGS_MEMBER(wxTR_MULTIPLE) +#if WXWIN_COMPATIBILITY_2_8 +wxFLAGS_MEMBER(wxTR_EXTENDED) +#endif +wxFLAGS_MEMBER(wxTR_DEFAULT_STYLE) +wxEND_FLAGS( wxTreeCtrlStyle ) + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxTreeCtrl, wxControl, "wx/treectrl.h") + +wxBEGIN_PROPERTIES_TABLE(wxTreeCtrl) +wxEVENT_PROPERTY( TextUpdated, wxEVT_TEXT, wxCommandEvent ) +wxEVENT_RANGE_PROPERTY( TreeEvent, wxEVT_TREE_BEGIN_DRAG, \ + wxEVT_TREE_STATE_IMAGE_CLICK, wxTreeEvent ) + +wxPROPERTY_FLAGS( WindowStyle, wxTreeCtrlStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxTreeCtrl) + +wxCONSTRUCTOR_5( wxTreeCtrl, wxWindow*, Parent, wxWindowID, Id, \ + wxPoint, Position, wxSize, Size, long, WindowStyle ) + +// ---------------------------------------------------------------------------- +// Tree event +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxNotifyEvent) + +wxTreeEvent::wxTreeEvent(wxEventType commandType, + wxTreeCtrlBase *tree, + const wxTreeItemId& item) + : wxNotifyEvent(commandType, tree->GetId()), + m_item(item) +{ + m_editCancelled = false; + + SetEventObject(tree); + + if ( item.IsOk() ) + SetClientObject(tree->GetItemData(item)); +} + +wxTreeEvent::wxTreeEvent(wxEventType commandType, int id) + : wxNotifyEvent(commandType, id) +{ + m_itemOld = 0l; + m_editCancelled = false; +} + +wxTreeEvent::wxTreeEvent(const wxTreeEvent & event) + : wxNotifyEvent(event) +{ + m_evtKey = event.m_evtKey; + m_item = event.m_item; + m_itemOld = event.m_itemOld; + m_pointDrag = event.m_pointDrag; + m_label = event.m_label; + m_editCancelled = event.m_editCancelled; +} + +// ---------------------------------------------------------------------------- +// wxTreeCtrlBase +// ---------------------------------------------------------------------------- + +wxTreeCtrlBase::wxTreeCtrlBase() +{ + m_imageListNormal = + m_imageListState = NULL; + m_ownsImageListNormal = + m_ownsImageListState = false; + + // arbitrary default + m_spacing = 18; + + // quick DoGetBestSize calculation + m_quickBestSize = true; + + Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(wxTreeCtrlBase::OnCharHook)); +} + +wxTreeCtrlBase::~wxTreeCtrlBase() +{ + if (m_ownsImageListNormal) + delete m_imageListNormal; + if (m_ownsImageListState) + delete m_imageListState; +} + +void wxTreeCtrlBase::SetItemState(const wxTreeItemId& item, int state) +{ + if ( state == wxTREE_ITEMSTATE_NEXT ) + { + int current = GetItemState(item); + if ( current == wxTREE_ITEMSTATE_NONE ) + return; + state = current + 1; + if ( m_imageListState && state >= m_imageListState->GetImageCount() ) + state = 0; + } + else if ( state == wxTREE_ITEMSTATE_PREV ) + { + int current = GetItemState(item); + if ( current == wxTREE_ITEMSTATE_NONE ) + return; + state = current - 1; + if ( state == -1 ) + state = m_imageListState ? m_imageListState->GetImageCount() - 1 : 0; + } + // else: wxTREE_ITEMSTATE_NONE depending on platform + + DoSetItemState(item, state); +} + +static void +wxGetBestTreeSize(const wxTreeCtrlBase* treeCtrl, wxTreeItemId id, wxSize& size) +{ + wxRect rect; + + if ( treeCtrl->GetBoundingRect(id, rect, true /* just the item */) ) + { + // Translate to logical position so we get the full extent +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + rect.x += treeCtrl->GetScrollPos(wxHORIZONTAL); + rect.y += treeCtrl->GetScrollPos(wxVERTICAL); +#endif + + size.IncTo(wxSize(rect.GetRight(), rect.GetBottom())); + } + + wxTreeItemIdValue cookie; + for ( wxTreeItemId item = treeCtrl->GetFirstChild(id, cookie); + item.IsOk(); + item = treeCtrl->GetNextChild(id, cookie) ) + { + wxGetBestTreeSize(treeCtrl, item, size); + } +} + +wxSize wxTreeCtrlBase::DoGetBestSize() const +{ + wxSize size; + + // this doesn't really compute the total bounding rectangle of all items + // but a not too bad guess of it which has the advantage of not having to + // examine all (potentially hundreds or thousands) items in the control + + if (GetQuickBestSize()) + { + for ( wxTreeItemId item = GetRootItem(); + item.IsOk(); + item = GetLastChild(item) ) + { + wxRect rect; + + // last parameter is "true" to get only the dimensions of the text + // label, we don't want to get the entire item width as it's determined + // by the current size + if ( GetBoundingRect(item, rect, true) ) + { + if ( size.x < rect.x + rect.width ) + size.x = rect.x + rect.width; + if ( size.y < rect.y + rect.height ) + size.y = rect.y + rect.height; + } + } + } + else // use precise, if potentially slow, size computation method + { + // iterate over all items recursively + wxTreeItemId idRoot = GetRootItem(); + if ( idRoot.IsOk() ) + wxGetBestTreeSize(this, idRoot, size); + } + + // need some minimal size even for empty tree + if ( !size.x || !size.y ) + size = wxControl::DoGetBestSize(); + else + { + // Add border size + size += GetWindowBorderSize(); + + CacheBestSize(size); + } + + return size; +} + +void wxTreeCtrlBase::ExpandAll() +{ + if ( IsEmpty() ) + return; + + ExpandAllChildren(GetRootItem()); +} + +void wxTreeCtrlBase::ExpandAllChildren(const wxTreeItemId& item) +{ + Freeze(); + // expand this item first, this might result in its children being added on + // the fly + if ( item != GetRootItem() || !HasFlag(wxTR_HIDE_ROOT) ) + Expand(item); + //else: expanding hidden root item is unsupported and unnecessary + + // then (recursively) expand all the children + wxTreeItemIdValue cookie; + for ( wxTreeItemId idCurr = GetFirstChild(item, cookie); + idCurr.IsOk(); + idCurr = GetNextChild(item, cookie) ) + { + ExpandAllChildren(idCurr); + } + Thaw(); +} + +void wxTreeCtrlBase::CollapseAll() +{ + if ( IsEmpty() ) + return; + + CollapseAllChildren(GetRootItem()); +} + +void wxTreeCtrlBase::CollapseAllChildren(const wxTreeItemId& item) +{ + Freeze(); + // first (recursively) collapse all the children + wxTreeItemIdValue cookie; + for ( wxTreeItemId idCurr = GetFirstChild(item, cookie); + idCurr.IsOk(); + idCurr = GetNextChild(item, cookie) ) + { + CollapseAllChildren(idCurr); + } + + // then collapse this element too unless it's the hidden root which can't + // be collapsed + if ( item != GetRootItem() || !HasFlag(wxTR_HIDE_ROOT) ) + Collapse(item); + Thaw(); +} + +bool wxTreeCtrlBase::IsEmpty() const +{ + return !GetRootItem().IsOk(); +} + +void wxTreeCtrlBase::OnCharHook(wxKeyEvent& event) +{ + if ( GetEditControl() ) + { + bool discardChanges = false; + switch ( event.GetKeyCode() ) + { + case WXK_ESCAPE: + discardChanges = true; + // fall through + + case WXK_RETURN: + EndEditLabel(GetFocusedItem(), discardChanges); + + // Do not call Skip() below. + return; + } + } + + event.Skip(); +} + +#endif // wxUSE_TREECTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/txtstrm.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/txtstrm.cpp new file mode 100644 index 0000000000..9e3fa8a793 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/txtstrm.cpp @@ -0,0 +1,543 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/txtstrm.cpp +// Purpose: Text stream classes +// Author: Guilhem Lavaux +// Modified by: +// Created: 28/06/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS + +#include "wx/txtstrm.h" + +#ifndef WX_PRECOMP + #include "wx/crt.h" +#endif + +#include + +// ---------------------------------------------------------------------------- +// wxTextInputStream +// ---------------------------------------------------------------------------- + +#if wxUSE_UNICODE +wxTextInputStream::wxTextInputStream(wxInputStream &s, + const wxString &sep, + const wxMBConv& conv) + : m_input(s), m_separators(sep), m_conv(conv.Clone()) +{ + memset((void*)m_lastBytes, 0, 10); +} +#else +wxTextInputStream::wxTextInputStream(wxInputStream &s, const wxString &sep) + : m_input(s), m_separators(sep) +{ + memset((void*)m_lastBytes, 0, 10); +} +#endif + +wxTextInputStream::~wxTextInputStream() +{ +#if wxUSE_UNICODE + delete m_conv; +#endif // wxUSE_UNICODE +} + +void wxTextInputStream::UngetLast() +{ + size_t byteCount = 0; + while(m_lastBytes[byteCount]) // pseudo ANSI strlen (even for Unicode!) + byteCount++; + m_input.Ungetch(m_lastBytes, byteCount); + memset((void*)m_lastBytes, 0, 10); +} + +wxChar wxTextInputStream::NextChar() +{ +#if wxUSE_UNICODE + wxChar wbuf[2]; + memset((void*)m_lastBytes, 0, 10); + for(size_t inlen = 0; inlen < 9; inlen++) + { + // actually read the next character + m_lastBytes[inlen] = m_input.GetC(); + + if(m_input.LastRead() <= 0) + return wxEOT; + + switch ( m_conv->ToWChar(wbuf, WXSIZEOF(wbuf), m_lastBytes, inlen + 1) ) + { + case 0: + // this is a bug in converter object as it should either fail + // or decode non-empty string to something non-empty + wxFAIL_MSG("ToWChar() can't return 0 for non-empty input"); + break; + + case wxCONV_FAILED: + // the buffer probably doesn't contain enough bytes to decode + // as a complete character, try with more bytes + break; + + default: + // if we couldn't decode a single character during the last + // loop iteration we shouldn't be able to decode 2 or more of + // them with an extra single byte, something fishy is going on + wxFAIL_MSG("unexpected decoding result"); + // fall through nevertheless and return at least something + + case 1: + // we finally decoded a character + return wbuf[0]; + } + } + + // there should be no encoding which requires more than nine bytes for one + // character so something must be wrong with our conversion but we have no + // way to signal it from here + return wxEOT; +#else + m_lastBytes[0] = m_input.GetC(); + + if(m_input.LastRead() <= 0) + return wxEOT; + + return m_lastBytes[0]; +#endif + +} + +wxChar wxTextInputStream::NextNonSeparators() +{ + for (;;) + { + wxChar c = NextChar(); + if (c == wxEOT) return (wxChar) 0; + + if (c != wxT('\n') && + c != wxT('\r') && + m_separators.Find(c) < 0) + return c; + } + +} + +bool wxTextInputStream::EatEOL(const wxChar &c) +{ + if (c == wxT('\n')) return true; // eat on UNIX + + if (c == wxT('\r')) // eat on both Mac and DOS + { + wxChar c2 = NextChar(); + if(c2 == wxEOT) return true; // end of stream reached, had enough :-) + + if (c2 != wxT('\n')) UngetLast(); // Don't eat on Mac + return true; + } + + return false; +} + +wxUint32 wxTextInputStream::Read32(int base) +{ + wxASSERT_MSG( !base || (base > 1 && base <= 36), wxT("invalid base") ); + if(!m_input) return 0; + + wxString word = ReadWord(); + if(word.empty()) + return 0; + return wxStrtoul(word.c_str(), 0, base); +} + +wxUint16 wxTextInputStream::Read16(int base) +{ + return (wxUint16)Read32(base); +} + +wxUint8 wxTextInputStream::Read8(int base) +{ + return (wxUint8)Read32(base); +} + +wxInt32 wxTextInputStream::Read32S(int base) +{ + wxASSERT_MSG( !base || (base > 1 && base <= 36), wxT("invalid base") ); + if(!m_input) return 0; + + wxString word = ReadWord(); + if(word.empty()) + return 0; + return wxStrtol(word.c_str(), 0, base); +} + +wxInt16 wxTextInputStream::Read16S(int base) +{ + return (wxInt16)Read32S(base); +} + +wxInt8 wxTextInputStream::Read8S(int base) +{ + return (wxInt8)Read32S(base); +} + +double wxTextInputStream::ReadDouble() +{ + if(!m_input) return 0; + wxString word = ReadWord(); + if(word.empty()) + return 0; + return wxStrtod(word.c_str(), 0); +} + +#if WXWIN_COMPATIBILITY_2_6 + +wxString wxTextInputStream::ReadString() +{ + return ReadLine(); +} + +#endif // WXWIN_COMPATIBILITY_2_6 + +wxString wxTextInputStream::ReadLine() +{ + wxString line; + + while ( !m_input.Eof() ) + { + wxChar c = NextChar(); + if(c == wxEOT) + break; + + if (EatEOL(c)) + break; + + line += c; + } + + return line; +} + +wxString wxTextInputStream::ReadWord() +{ + wxString word; + + if ( !m_input ) + return word; + + wxChar c = NextNonSeparators(); + if ( !c ) + return word; + + word += c; + + while ( !m_input.Eof() ) + { + c = NextChar(); + if(c == wxEOT) + break; + + if (m_separators.Find(c) >= 0) + break; + + if (EatEOL(c)) + break; + + word += c; + } + + return word; +} + +wxTextInputStream& wxTextInputStream::operator>>(wxString& word) +{ + word = ReadWord(); + return *this; +} + +wxTextInputStream& wxTextInputStream::operator>>(char& c) +{ + c = m_input.GetC(); + if(m_input.LastRead() <= 0) c = 0; + + if (EatEOL(c)) + c = '\n'; + + return *this; +} + +#if wxUSE_UNICODE && wxWCHAR_T_IS_REAL_TYPE + +wxTextInputStream& wxTextInputStream::operator>>(wchar_t& wc) +{ + wc = GetChar(); + + return *this; +} + +#endif // wxUSE_UNICODE + +wxTextInputStream& wxTextInputStream::operator>>(wxInt16& i) +{ + i = (wxInt16)Read16(); + return *this; +} + +wxTextInputStream& wxTextInputStream::operator>>(wxInt32& i) +{ + i = (wxInt32)Read32(); + return *this; +} + +wxTextInputStream& wxTextInputStream::operator>>(wxUint16& i) +{ + i = Read16(); + return *this; +} + +wxTextInputStream& wxTextInputStream::operator>>(wxUint32& i) +{ + i = Read32(); + return *this; +} + +wxTextInputStream& wxTextInputStream::operator>>(double& i) +{ + i = ReadDouble(); + return *this; +} + +wxTextInputStream& wxTextInputStream::operator>>(float& f) +{ + f = (float)ReadDouble(); + return *this; +} + + + +#if wxUSE_UNICODE +wxTextOutputStream::wxTextOutputStream(wxOutputStream& s, + wxEOL mode, + const wxMBConv& conv) + : m_output(s), m_conv(conv.Clone()) +#else +wxTextOutputStream::wxTextOutputStream(wxOutputStream& s, wxEOL mode) + : m_output(s) +#endif +{ + m_mode = mode; + if (m_mode == wxEOL_NATIVE) + { +#if defined(__WINDOWS__) || defined(__WXPM__) + m_mode = wxEOL_DOS; +#else + m_mode = wxEOL_UNIX; +#endif + } +} + +wxTextOutputStream::~wxTextOutputStream() +{ +#if wxUSE_UNICODE + delete m_conv; +#endif // wxUSE_UNICODE +} + +void wxTextOutputStream::SetMode(wxEOL mode) +{ + m_mode = mode; + if (m_mode == wxEOL_NATIVE) + { +#if defined(__WINDOWS__) || defined(__WXPM__) + m_mode = wxEOL_DOS; +#else + m_mode = wxEOL_UNIX; +#endif + } +} + +void wxTextOutputStream::Write32(wxUint32 i) +{ + wxString str; + str.Printf(wxT("%u"), i); + + WriteString(str); +} + +void wxTextOutputStream::Write16(wxUint16 i) +{ + wxString str; + str.Printf(wxT("%u"), (unsigned)i); + + WriteString(str); +} + +void wxTextOutputStream::Write8(wxUint8 i) +{ + wxString str; + str.Printf(wxT("%u"), (unsigned)i); + + WriteString(str); +} + +void wxTextOutputStream::WriteDouble(double d) +{ + wxString str; + + str.Printf(wxT("%f"), d); + WriteString(str); +} + +void wxTextOutputStream::WriteString(const wxString& string) +{ + size_t len = string.length(); + + wxString out; + out.reserve(len); + + for ( size_t i = 0; i < len; i++ ) + { + const wxChar c = string[i]; + if ( c == wxT('\n') ) + { + switch ( m_mode ) + { + case wxEOL_DOS: + out << wxT("\r\n"); + continue; + + case wxEOL_MAC: + out << wxT('\r'); + continue; + + default: + wxFAIL_MSG( wxT("unknown EOL mode in wxTextOutputStream") ); + // fall through + + case wxEOL_UNIX: + // don't treat '\n' specially + ; + } + } + + out << c; + } + +#if wxUSE_UNICODE + // FIXME-UTF8: use wxCharBufferWithLength if/when we have it + wxCharBuffer buffer = m_conv->cWC2MB(out.wc_str(), out.length(), &len); + m_output.Write(buffer, len); +#else + m_output.Write(out.c_str(), out.length() ); +#endif +} + +wxTextOutputStream& wxTextOutputStream::PutChar(wxChar c) +{ +#if wxUSE_UNICODE + WriteString( wxString(&c, *m_conv, 1) ); +#else + WriteString( wxString(&c, wxConvLocal, 1) ); +#endif + return *this; +} + +void wxTextOutputStream::Flush() +{ +#if wxUSE_UNICODE + const size_t len = m_conv->FromWChar(NULL, 0, L"", 1); + if ( len > m_conv->GetMBNulLen() ) + { + wxCharBuffer buf(len); + m_conv->FromWChar(buf.data(), len, L"", 1); + m_output.Write(buf, len - m_conv->GetMBNulLen()); + } +#endif // wxUSE_UNICODE +} + +wxTextOutputStream& wxTextOutputStream::operator<<(const wxString& string) +{ + WriteString( string ); + return *this; +} + +wxTextOutputStream& wxTextOutputStream::operator<<(char c) +{ + WriteString( wxString::FromAscii(c) ); + + return *this; +} + +#if wxUSE_UNICODE && wxWCHAR_T_IS_REAL_TYPE + +wxTextOutputStream& wxTextOutputStream::operator<<(wchar_t wc) +{ + WriteString( wxString(&wc, *m_conv, 1) ); + + return *this; +} + +#endif // wxUSE_UNICODE + +wxTextOutputStream& wxTextOutputStream::operator<<(wxInt16 c) +{ + wxString str; + str.Printf(wxT("%d"), (signed int)c); + WriteString(str); + + return *this; +} + +wxTextOutputStream& wxTextOutputStream::operator<<(wxInt32 c) +{ + wxString str; + str.Printf(wxT("%ld"), (signed long)c); + WriteString(str); + + return *this; +} + +wxTextOutputStream& wxTextOutputStream::operator<<(wxUint16 c) +{ + wxString str; + str.Printf(wxT("%u"), (unsigned int)c); + WriteString(str); + + return *this; +} + +wxTextOutputStream& wxTextOutputStream::operator<<(wxUint32 c) +{ + wxString str; + str.Printf(wxT("%lu"), (unsigned long)c); + WriteString(str); + + return *this; +} + +wxTextOutputStream &wxTextOutputStream::operator<<(double f) +{ + WriteDouble(f); + return *this; +} + +wxTextOutputStream& wxTextOutputStream::operator<<(float f) +{ + WriteDouble((double)f); + return *this; +} + +wxTextOutputStream &endl( wxTextOutputStream &stream ) +{ + return stream.PutChar(wxT('\n')); +} + +#endif + // wxUSE_STREAMS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/uiactioncmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/uiactioncmn.cpp new file mode 100644 index 0000000000..32a8d2f2d4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/uiactioncmn.cpp @@ -0,0 +1,148 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/uiactioncmn.cpp +// Purpose: wxUIActionSimulator common implementation +// Author: Kevin Ollivier, Steven Lamerton, Vadim Zeitlin +// Modified by: +// Created: 2010-03-06 +// Copyright: (c) Kevin Ollivier +// (c) 2010 Steven Lamerton +// (c) 2010 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#if wxUSE_UIACTIONSIMULATOR + +#include "wx/uiaction.h" + +bool wxUIActionSimulator::MouseClick(int button) +{ + MouseDown(button); + MouseUp(button); + + return true; +} + +#ifndef __WXOSX__ + +bool wxUIActionSimulator::MouseDblClick(int button) +{ + MouseDown(button); + MouseUp(button); + MouseDown(button); + MouseUp(button); + + return true; +} + +bool wxUIActionSimulator::MouseDragDrop(long x1, long y1, long x2, long y2, + int button) +{ + MouseMove(x1, y1); + MouseDown(button); + MouseMove(x2, y2); + MouseUp(button); + + return true; +} + +#endif + +bool +wxUIActionSimulator::Key(int keycode, int modifiers, bool isDown) +{ + wxASSERT_MSG( (modifiers & wxMOD_ALTGR) != wxMOD_ALTGR, + "wxMOD_ALTGR is not implemented" ); + wxASSERT_MSG( !(modifiers & wxMOD_META ), + "wxMOD_META is not implemented" ); + wxASSERT_MSG( !(modifiers & wxMOD_WIN ), + "wxMOD_WIN is not implemented" ); + + if ( isDown ) + SimulateModifiers(modifiers, true); + + bool rc = DoKey(keycode, modifiers, isDown); + + if ( !isDown ) + SimulateModifiers(modifiers, false); + + return rc; +} + +void wxUIActionSimulator::SimulateModifiers(int modifiers, bool isDown) +{ + if ( modifiers & wxMOD_SHIFT ) + DoKey(WXK_SHIFT, modifiers, isDown); + if ( modifiers & wxMOD_ALT ) + DoKey(WXK_ALT, modifiers, isDown); + if ( modifiers & wxMOD_CONTROL ) + DoKey(WXK_CONTROL, modifiers, isDown); +} + +bool wxUIActionSimulator::Char(int keycode, int modifiers) +{ + switch(keycode) + { + case '0': + keycode = '0'; + break; + case '1': + keycode = '1'; + break; + case '2': + keycode = '2'; + break; + case '3': + keycode = '3'; + break; + case '4': + keycode = '4'; + break; + case '5': + keycode = '5'; + break; + case '6': + keycode = '6'; + break; + case '7': + keycode = '7'; + break; + case '8': + keycode = '8'; + break; + case '9': + keycode = '9'; + break; + case '+': + keycode = '+'; + break; + case '-': + keycode = '-'; + break; + case '.': + keycode = '.'; + break; + default: + break; + }; + + Key(keycode, modifiers, true); + Key(keycode, modifiers, false); + + return true; +} + +bool wxUIActionSimulator::Text(const char *s) +{ + while ( *s != '\0' ) + { + const char ch = *s++; + if ( !Char(ch, isupper(ch) ? wxMOD_SHIFT : 0) ) + return false; + } + + return true; +} + +#endif // wxUSE_UIACTIONSIMULATOR diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/unichar.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/unichar.cpp new file mode 100644 index 0000000000..de95fcd001 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/unichar.cpp @@ -0,0 +1,183 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/unichar.cpp +// Purpose: wxUniChar and wxUniCharRef classes +// Author: Vaclav Slavik +// Created: 2007-03-19 +// Copyright: (c) 2007 REA Elektronik GmbH +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// headers +// =========================================================================== + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/strconv.h" // wxConvLibc + #include "wx/log.h" +#endif + +#include "wx/unichar.h" +#include "wx/string.h" + +// =========================================================================== +// implementation +// =========================================================================== + +// --------------------------------------------------------------------------- +// wxUniChar +// --------------------------------------------------------------------------- + +/* static */ +wxUniChar::value_type wxUniChar::FromHi8bit(char c) +{ +#if wxUSE_UTF8_LOCALE_ONLY + wxFAIL_MSG( "invalid UTF-8 character" ); + wxUnusedVar(c); + + return wxT('?'); // FIXME-UTF8: what to use as failure character? +#else + char cbuf[2]; + cbuf[0] = c; + cbuf[1] = '\0'; + wchar_t wbuf[2]; + if ( wxConvLibc.ToWChar(wbuf, 2, cbuf, 2) != 2 ) + { + wxFAIL_MSG( "invalid multibyte character" ); + return wxT('?'); // FIXME-UTF8: what to use as failure character? + } + return wbuf[0]; +#endif +} + +/* static */ +char wxUniChar::ToHi8bit(wxUniChar::value_type v) +{ + char c; + if ( !GetAsHi8bit(v, &c) ) + { + wxFAIL_MSG( "character cannot be converted to single byte" ); + c = '?'; // FIXME-UTF8: what to use as failure character? + } + + return c; +} + +/* static */ +bool wxUniChar::GetAsHi8bit(value_type v, char *c) +{ + wchar_t wbuf[2]; + wbuf[0] = v; + wbuf[1] = L'\0'; + char cbuf[2]; + if ( wxConvLibc.FromWChar(cbuf, 2, wbuf, 2) != 2 ) + return false; + + *c = cbuf[0]; + return true; +} + +// --------------------------------------------------------------------------- +// wxUniCharRef +// --------------------------------------------------------------------------- + +#if wxUSE_UNICODE_UTF8 +wxUniChar wxUniCharRef::UniChar() const +{ + return wxStringOperations::DecodeChar(m_pos); +} + +wxUniCharRef& wxUniCharRef::operator=(const wxUniChar& c) +{ + wxStringOperations::Utf8CharBuffer utf(wxStringOperations::EncodeChar(c)); + size_t lenOld = wxStringOperations::GetUtf8CharLength(*m_pos); + size_t lenNew = wxStringOperations::GetUtf8CharLength(utf[0]); + + if ( lenNew == lenOld ) + { + // this is the simpler case: if the new value's UTF-8 code has the + // same length, we can just replace it: + + iterator pos(m_pos); + for ( size_t i = 0; i < lenNew; ++i, ++pos ) + *pos = utf[i]; + } + else // length of character encoding in UTF-8 changed + { + // the worse case is when the new value has either longer or shorter + // code -- in that case, we have to use wxStringImpl::replace() and + // this invalidates all iterators, so we have to update them too: + + wxStringImpl& strimpl = m_str.m_impl; + + int iterDiff = lenNew - lenOld; + size_t posIdx = m_pos - strimpl.begin(); + + // compute positions of outstanding iterators for this string after the + // replacement is done (there is only a small number of iterators at + // any time, so we use an array on the stack to avoid unneeded + // allocation): + static const size_t STATIC_SIZE = 32; + size_t indexes_a[STATIC_SIZE]; + size_t *indexes = indexes_a; + size_t iterNum = 0; + wxStringIteratorNode *it; + for ( it = m_str.m_iterators.ptr; it; it = it->m_next, ++iterNum ) + { + wxASSERT( it->m_iter || it->m_citer ); + + if ( iterNum == STATIC_SIZE ) + { + wxLogTrace( wxT("utf8"), wxT("unexpectedly many iterators") ); + + size_t total = iterNum + 1; + for ( wxStringIteratorNode *it2 = it; it2; it2 = it2->m_next ) + total++; + indexes = new size_t[total]; + memcpy(indexes, indexes_a, sizeof(size_t) * STATIC_SIZE); + } + + size_t idx = it->m_iter + ? (*it->m_iter - strimpl.begin()) + : (*it->m_citer - strimpl.begin()); + + if ( idx > posIdx ) + idx += iterDiff; + + indexes[iterNum] = idx; + } + + // update the string: + strimpl.replace(m_pos, m_pos + lenOld, utf, lenNew); + +#if wxUSE_STRING_POS_CACHE + m_str.InvalidateCache(); +#endif // wxUSE_STRING_POS_CACHE + + // finally, set the iterators to valid values again (note that this + // updates m_pos as well): + size_t i; + for ( i = 0, it = m_str.m_iterators.ptr; it; it = it->m_next, ++i ) + { + wxASSERT( i < iterNum ); + wxASSERT( it->m_iter || it->m_citer ); + + if ( it->m_iter ) + *it->m_iter = strimpl.begin() + indexes[i]; + else // it->m_citer + *it->m_citer = strimpl.begin() + indexes[i]; + } + + if ( indexes != indexes_a ) + delete[] indexes; + } + + return *this; +} +#endif // wxUSE_UNICODE_UTF8 diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/unictabl.inc b/3rdparty/wxwidgets3.0-3.0.1/src/common/unictabl.inc new file mode 100644 index 0000000000..2993424abc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/unictabl.inc @@ -0,0 +1,897 @@ + + +/* + * This file is #included by encconv.cpp + * + * + * *** *** CAUTION! *** *** + * Do not modify this file by hand! It is generated by shell + * script $(WXWIN)/misc/unictabl/regenerate + * + * Parts of this file are based on tables published by Unicode, Inc. + * Original tables are freely available at + * ftp://ftp.unicode.org/Public/MAPPINGS + * + * Original copyright info as present in mapping tables follows: + * + * + * Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved. + * + * This file is provided as-is by Unicode, Inc. (The Unicode Consortium). + * No claims are made as to fitness for any particular purpose. No + * warranties of any kind are expressed or implied. The recipient + * agrees to determine applicability of information provided. If this + * file has been provided on optical media by Unicode, Inc., the sole + * remedy for any claim will be exchange of defective media within 90 + * days of receipt. + * + * Unicode, Inc. hereby grants the right to freely use the information + * supplied in this file in the creation of products supporting the + * Unicode Standard, and to make copies of this file in any form for + * internal or external distribution as long as this notice remains + * attached. + */ + + + + +/* + * ISO8859_1 to Unicode recoding table + * based on file mappings/8859-1.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_1[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF + }; + + +/* + * ISO8859_10 to Unicode recoding table + * based on file mappings/8859-10.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_10[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0104, 0x0112, 0x0122, 0x012A, 0x0128, 0x0136, 0x00A7, + 0x013B, 0x0110, 0x0160, 0x0166, 0x017D, 0x00AD, 0x016A, 0x014A, + 0x00B0, 0x0105, 0x0113, 0x0123, 0x012B, 0x0129, 0x0137, 0x00B7, + 0x013C, 0x0111, 0x0161, 0x0167, 0x017E, 0x2015, 0x016B, 0x014B, + 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E, + 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x00CF, + 0x00D0, 0x0145, 0x014C, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x0168, + 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, + 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F, + 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x00EF, + 0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169, + 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138 + }; + + +/* + * ISO8859_13 to Unicode recoding table + * based on file mappings/8859-13.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_13[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x201D, 0x00A2, 0x00A3, 0x00A4, 0x201E, 0x00A6, 0x00A7, + 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x201C, 0x00B5, 0x00B6, 0x00B7, + 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6, + 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112, + 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B, + 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7, + 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF, + 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113, + 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C, + 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7, + 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x2019 + }; + + +/* + * ISO8859_14 to Unicode recoding table + * based on file mappings/8859-14.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_14[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x1E02, 0x1E03, 0x00A3, 0x010A, 0x010B, 0x1E0A, 0x00A7, + 0x1E80, 0x00A9, 0x1E82, 0x1E0B, 0x1EF2, 0x00AD, 0x00AE, 0x0178, + 0x1E1E, 0x1E1F, 0x0120, 0x0121, 0x1E40, 0x1E41, 0x00B6, 0x1E56, + 0x1E81, 0x1E57, 0x1E83, 0x1E60, 0x1EF3, 0x1E84, 0x1E85, 0x1E61, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x0174, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x1E6A, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x0176, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x0175, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x1E6B, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x0177, 0x00FF + }; + + +/* + * ISO8859_15 to Unicode recoding table + * based on file mappings/8859-15.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_15[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AC, 0x00A5, 0x0160, 0x00A7, + 0x0161, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x017D, 0x00B5, 0x00B6, 0x00B7, + 0x017E, 0x00B9, 0x00BA, 0x00BB, 0x0152, 0x0153, 0x0178, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF + }; + + +/* + * ISO8859_2 to Unicode recoding table + * based on file mappings/8859-2.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_2[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7, + 0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B, + 0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7, + 0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C, + 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, + 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E, + 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, + 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF, + 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, + 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F, + 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, + 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9 + }; + + +/* + * ISO8859_3 to Unicode recoding table + * based on file mappings/8859-3.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_3[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0x0000, 0x0124, 0x00A7, + 0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0x0000, 0x017B, + 0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7, + 0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0x0000, 0x017C, + 0x00C0, 0x00C1, 0x00C2, 0x0000, 0x00C4, 0x010A, 0x0108, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x0000, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7, + 0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x0000, 0x00E4, 0x010B, 0x0109, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x0000, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7, + 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9 + }; + + +/* + * ISO8859_4 to Unicode recoding table + * based on file mappings/8859-4.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_4[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0104, 0x0138, 0x0156, 0x00A4, 0x0128, 0x013B, 0x00A7, + 0x00A8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00AD, 0x017D, 0x00AF, + 0x00B0, 0x0105, 0x02DB, 0x0157, 0x00B4, 0x0129, 0x013C, 0x02C7, + 0x00B8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014A, 0x017E, 0x014B, + 0x0100, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x012E, + 0x010C, 0x00C9, 0x0118, 0x00CB, 0x0116, 0x00CD, 0x00CE, 0x012A, + 0x0110, 0x0145, 0x014C, 0x0136, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x0172, 0x00DA, 0x00DB, 0x00DC, 0x0168, 0x016A, 0x00DF, + 0x0101, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x012F, + 0x010D, 0x00E9, 0x0119, 0x00EB, 0x0117, 0x00ED, 0x00EE, 0x012B, + 0x0111, 0x0146, 0x014D, 0x0137, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9 + }; + + +/* + * ISO8859_5 to Unicode recoding table + * based on file mappings/8859-5.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_5[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, + 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F, + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, + 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, + 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F + }; + + +/* + * ISO8859_6 to Unicode recoding table + * based on file mappings/8859-6.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_6[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0000, 0x0000, 0x0000, 0x00A4, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x060C, 0x00AD, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x061B, 0x0000, 0x0000, 0x0000, 0x061F, + 0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, + 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F, + 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, + 0x0638, 0x0639, 0x063A, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, + 0x0648, 0x0649, 0x064A, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F, + 0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 + }; + + +/* + * ISO8859_7 to Unicode recoding table + * based on file mappings/8859-7.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_7[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x2018, 0x2019, 0x00A3, 0x0000, 0x0000, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x0000, 0x00AB, 0x00AC, 0x00AD, 0x0000, 0x2015, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x0385, 0x0386, 0x00B7, + 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F, + 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, + 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, + 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, + 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF, + 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, + 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, + 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, + 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000 + }; + + +/* + * ISO8859_8 to Unicode recoding table + * based on file mappings/8859-8.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_8[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x203E, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2017, + 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, + 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, + 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, + 0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 + }; + + +/* + * ISO8859_9 to Unicode recoding table + * based on file mappings/8859-9.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__ISO8859_9[128] = { + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, + 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, + 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF + }; + + +/* + * CP1250 to Unicode recoding table + * based on file mappings/CP1250.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__CP1250[128] = { + 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021, + 0x0000, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179, + 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x0000, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A, + 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B, + 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C, + 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, + 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E, + 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, + 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF, + 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, + 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F, + 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, + 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9 + }; + + +/* + * CP1251 to Unicode recoding table + * based on file mappings/CP1251.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__CP1251[128] = { + 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, + 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, + 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x0000, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F, + 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7, + 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407, + 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7, + 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457, + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F + }; + + +/* + * CP1252 to Unicode recoding table + * based on file mappings/CP1252.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__CP1252[128] = { + 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000, + 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x017E, 0x0178, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF + }; + + +/* + * CP1253 to Unicode recoding table + * based on file mappings/CP1253.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__CP1253[128] = { + 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000, + 0x00A0, 0x0385, 0x0386, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x0000, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7, + 0x0388, 0x0389, 0x038A, 0x00BB, 0x038C, 0x00BD, 0x038E, 0x038F, + 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, + 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, + 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, + 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF, + 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, + 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, + 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, + 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x0000 + }; + + +/* + * CP1254 to Unicode recoding table + * based on file mappings/CP1254.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__CP1254[128] = { + 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000, + 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x0000, 0x0178, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, + 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, + 0x011E, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, + 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x0130, 0x015E, 0x00DF, + 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, + 0x011F, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, + 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x0131, 0x015F, 0x00FF + }; + + +/* + * CP1255 to Unicode recoding table + * based on file mappings/CP1255.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__CP1255[128] = { + 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x02DC, 0x2122, 0x0000, 0x203A, 0x0000, 0x0000, 0x0000, 0x0000, + 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, + 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7, + 0x05B8, 0x05B9, 0x0000, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF, + 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3, + 0x05F4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, + 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, + 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, + 0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x200E, 0x200F, 0x0000 + }; + + +/* + * CP1256 to Unicode recoding table + * based on file mappings/CP1256.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__CP1256[128] = { + 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, + 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688, + 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x06A9, 0x2122, 0x0691, 0x203A, 0x0153, 0x200C, 0x200D, 0x06BA, + 0x00A0, 0x060C, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, + 0x00A8, 0x00A9, 0x06BE, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00B8, 0x00B9, 0x061B, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x061F, + 0x06C1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, + 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F, + 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00D7, + 0x0637, 0x0638, 0x0639, 0x063A, 0x0640, 0x0641, 0x0642, 0x0643, + 0x00E0, 0x0644, 0x00E2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00E7, + 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x0649, 0x064A, 0x00EE, 0x00EF, + 0x064B, 0x064C, 0x064D, 0x064E, 0x00F4, 0x064F, 0x0650, 0x00F7, + 0x0651, 0x00F9, 0x0652, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x06D2 + }; + + +/* + * CP1257 to Unicode recoding table + * based on file mappings/CP1257.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__CP1257[128] = { + 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021, + 0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x00A8, 0x02C7, 0x00B8, + 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, + 0x0000, 0x2122, 0x0000, 0x203A, 0x0000, 0x00AF, 0x02DB, 0x0000, + 0x00A0, 0x0000, 0x00A2, 0x00A3, 0x00A4, 0x0000, 0x00A6, 0x00A7, + 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6, + 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, + 0x00F8, 0x00B9, 0x0157, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00E6, + 0x0104, 0x012E, 0x0100, 0x0106, 0x00C4, 0x00C5, 0x0118, 0x0112, + 0x010C, 0x00C9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012A, 0x013B, + 0x0160, 0x0143, 0x0145, 0x00D3, 0x014C, 0x00D5, 0x00D6, 0x00D7, + 0x0172, 0x0141, 0x015A, 0x016A, 0x00DC, 0x017B, 0x017D, 0x00DF, + 0x0105, 0x012F, 0x0101, 0x0107, 0x00E4, 0x00E5, 0x0119, 0x0113, + 0x010D, 0x00E9, 0x017A, 0x0117, 0x0123, 0x0137, 0x012B, 0x013C, + 0x0161, 0x0144, 0x0146, 0x00F3, 0x014D, 0x00F5, 0x00F6, 0x00F7, + 0x0173, 0x0142, 0x015B, 0x016B, 0x00FC, 0x017C, 0x017E, 0x02D9 + }; + + +/* + * CP866 to Unicode recoding table + * based on file mappings/CP866.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__CP866[128] = { + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, + 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E, + 0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0 + }; + + +/* + * KOI8 to Unicode recoding table + * based on file mappings/KOI8-R.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__KOI8[128] = { + 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, + 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, + 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248, + 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7, + 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, + 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E, + 0x255F, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, + 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x00A9, + 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, + 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, + 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, + 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A, + 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, + 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, + 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, + 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A + }; + + +/* + * KOI8_U to Unicode recoding table + * based on file mappings/KOI8-U.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__KOI8_U[128] = { + 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, + 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, + 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248, + 0x2264, 0x2265, 0x00A0, 0x2321, 0x00B0, 0x00B2, 0x00B7, 0x00F7, + 0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457, + 0x2557, 0x2558, 0x2559, 0x255A, 0x255B, 0x0491, 0x255D, 0x255E, + 0x255F, 0x2560, 0x2561, 0x0401, 0x0403, 0x2563, 0x0406, 0x0407, + 0x2566, 0x2567, 0x2568, 0x2569, 0x256A, 0x0490, 0x256C, 0x00A9, + 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, + 0x0445, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, + 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, + 0x044C, 0x044B, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x044A, + 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, + 0x0425, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, + 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, + 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A + }; + + + + + +/* + * + * Unicode to 7bit ASCII fallback + * (for use with wxRECODE_SUBSTITUTE recoding mode) + * + */ + +static const struct { + wxUint16 c /*code*/; + wxUint8 s /*inaccurate substitution*/; +} encoding_unicode_fallback[] = { + + {0x00AB, 0x22}, + {0x00BB, 0x22}, + {0x00C0, 0x41}, + {0x00C1, 0x41}, + {0x00C2, 0x41}, + {0x00C3, 0x41}, + {0x00C4, 0x41}, + {0x00C5, 0x41}, + {0x00C7, 0x43}, + {0x00C8, 0x45}, + {0x00C9, 0x45}, + {0x00CA, 0x45}, + {0x00CB, 0x45}, + {0x00CC, 0x49}, + {0x00CD, 0x49}, + {0x00CE, 0x49}, + {0x00CF, 0x49}, + {0x00D1, 0x4E}, + {0x00D2, 0x4F}, + {0x00D3, 0x4F}, + {0x00D4, 0x4F}, + {0x00D5, 0x4F}, + {0x00D6, 0x4F}, + {0x00D8, 0x4F}, + {0x00D9, 0x55}, + {0x00DA, 0x55}, + {0x00DB, 0x55}, + {0x00DC, 0x55}, + {0x00DD, 0x59}, + {0x00E0, 0x61}, + {0x00E1, 0x61}, + {0x00E2, 0x61}, + {0x00E3, 0x61}, + {0x00E4, 0x61}, + {0x00E5, 0x61}, + {0x00E7, 0x63}, + {0x00E8, 0x65}, + {0x00E9, 0x65}, + {0x00EA, 0x65}, + {0x00EB, 0x65}, + {0x00EC, 0x69}, + {0x00ED, 0x69}, + {0x00EE, 0x69}, + {0x00EF, 0x69}, + {0x00F1, 0x6E}, + {0x00F2, 0x6F}, + {0x00F3, 0x6F}, + {0x00F4, 0x6F}, + {0x00F5, 0x6F}, + {0x00F6, 0x6F}, + {0x00F8, 0x6F}, + {0x00F9, 0x75}, + {0x00FA, 0x75}, + {0x00FB, 0x75}, + {0x00FC, 0x75}, + {0x00FD, 0x79}, + {0x00FF, 0x79}, + {0x0100, 0x41}, + {0x0101, 0x61}, + {0x0102, 0x41}, + {0x0103, 0x61}, + {0x0104, 0x41}, + {0x0105, 0x61}, + {0x0106, 0x43}, + {0x0107, 0x63}, + {0x0108, 0x43}, + {0x0109, 0x63}, + {0x010A, 0x43}, + {0x010B, 0x63}, + {0x010C, 0x43}, + {0x010D, 0x63}, + {0x010E, 0x44}, + {0x010F, 0x64}, + {0x0110, 0x44}, + {0x0111, 0x64}, + {0x0112, 0x45}, + {0x0113, 0x65}, + {0x0116, 0x45}, + {0x0117, 0x65}, + {0x0118, 0x45}, + {0x0119, 0x65}, + {0x011A, 0x45}, + {0x011B, 0x65}, + {0x011C, 0x47}, + {0x011D, 0x67}, + {0x011E, 0x47}, + {0x011F, 0x67}, + {0x0120, 0x47}, + {0x0121, 0x67}, + {0x0122, 0x47}, + {0x0123, 0x67}, + {0x0124, 0x48}, + {0x0125, 0x68}, + {0x0126, 0x48}, + {0x0127, 0x68}, + {0x0128, 0x49}, + {0x0129, 0x69}, + {0x012A, 0x49}, + {0x012B, 0x69}, + {0x012E, 0x49}, + {0x012F, 0x69}, + {0x0130, 0x49}, + {0x0134, 0x4A}, + {0x0135, 0x6A}, + {0x0136, 0x4B}, + {0x0137, 0x6B}, + {0x0139, 0x4C}, + {0x013A, 0x6C}, + {0x013B, 0x4C}, + {0x013C, 0x6C}, + {0x013D, 0x4C}, + {0x013E, 0x6C}, + {0x0141, 0x4C}, + {0x0142, 0x6C}, + {0x0143, 0x4E}, + {0x0144, 0x6E}, + {0x0145, 0x4E}, + {0x0146, 0x6E}, + {0x0147, 0x4E}, + {0x0148, 0x6E}, + {0x014C, 0x4F}, + {0x014D, 0x6F}, + {0x0150, 0x4F}, + {0x0151, 0x6F}, + {0x0154, 0x52}, + {0x0155, 0x72}, + {0x0156, 0x52}, + {0x0157, 0x72}, + {0x0158, 0x52}, + {0x0159, 0x72}, + {0x015A, 0x53}, + {0x015B, 0x73}, + {0x015C, 0x53}, + {0x015D, 0x73}, + {0x015E, 0x53}, + {0x015F, 0x73}, + {0x0160, 0x53}, + {0x0161, 0x73}, + {0x0162, 0x54}, + {0x0163, 0x74}, + {0x0164, 0x54}, + {0x0165, 0x74}, + {0x0166, 0x54}, + {0x0167, 0x74}, + {0x0168, 0x55}, + {0x0169, 0x75}, + {0x016A, 0x55}, + {0x016B, 0x75}, + {0x016C, 0x55}, + {0x016D, 0x75}, + {0x016E, 0x55}, + {0x016F, 0x75}, + {0x0170, 0x55}, + {0x0171, 0x75}, + {0x0172, 0x55}, + {0x0173, 0x75}, + {0x0174, 0x57}, + {0x0175, 0x77}, + {0x0176, 0x59}, + {0x0177, 0x79}, + {0x0178, 0x59}, + {0x0179, 0x5A}, + {0x017A, 0x7A}, + {0x017B, 0x5A}, + {0x017C, 0x7A}, + {0x017D, 0x5A}, + {0x017E, 0x7A}, + {0x0192, 0x66}, + {0x1E02, 0x42}, + {0x1E03, 0x62}, + {0x1E0A, 0x44}, + {0x1E0B, 0x64}, + {0x1E1E, 0x46}, + {0x1E1F, 0x66}, + {0x1E40, 0x4D}, + {0x1E41, 0x6D}, + {0x1E56, 0x50}, + {0x1E57, 0x70}, + {0x1E60, 0x53}, + {0x1E61, 0x73}, + {0x1E6A, 0x54}, + {0x1E6B, 0x74}, + {0x1E80, 0x57}, + {0x1E81, 0x77}, + {0x1E82, 0x57}, + {0x1E83, 0x77}, + {0x1E84, 0x57}, + {0x1E85, 0x77}, + {0x1EF2, 0x59}, + {0x1EF3, 0x79}, + {0x2013, 0x2D}, + {0x2014, 0x2D}, + {0x2018, 0x27}, + {0x2019, 0x27}, + {0x201A, 0x27}, + {0x201C, 0x22}, + {0x201D, 0x22}, + {0x201E, 0x22}, + {0x2039, 0x27}, + {0x203A, 0x27}, + {0, 0} + }; + +static const unsigned encoding_unicode_fallback_count = 200; + + + + +/* + * + * Table of all supported encodings: + * + */ + +static const struct { + wxFontEncoding encoding; // encoding identifier + const wxUint16 *table; // 8bit to unicode table +} encodings_list[] = { + + { wxFONTENCODING_ISO8859_1, encoding_table__ISO8859_1}, + { wxFONTENCODING_ISO8859_10, encoding_table__ISO8859_10}, + { wxFONTENCODING_ISO8859_13, encoding_table__ISO8859_13}, + { wxFONTENCODING_ISO8859_14, encoding_table__ISO8859_14}, + { wxFONTENCODING_ISO8859_15, encoding_table__ISO8859_15}, + { wxFONTENCODING_ISO8859_2, encoding_table__ISO8859_2}, + { wxFONTENCODING_ISO8859_3, encoding_table__ISO8859_3}, + { wxFONTENCODING_ISO8859_4, encoding_table__ISO8859_4}, + { wxFONTENCODING_ISO8859_5, encoding_table__ISO8859_5}, + { wxFONTENCODING_ISO8859_6, encoding_table__ISO8859_6}, + { wxFONTENCODING_ISO8859_7, encoding_table__ISO8859_7}, + { wxFONTENCODING_ISO8859_8, encoding_table__ISO8859_8}, + { wxFONTENCODING_ISO8859_9, encoding_table__ISO8859_9}, + { wxFONTENCODING_CP1250, encoding_table__CP1250}, + { wxFONTENCODING_CP1251, encoding_table__CP1251}, + { wxFONTENCODING_CP1252, encoding_table__CP1252}, + { wxFONTENCODING_CP1253, encoding_table__CP1253}, + { wxFONTENCODING_CP1254, encoding_table__CP1254}, + { wxFONTENCODING_CP1255, encoding_table__CP1255}, + { wxFONTENCODING_CP1256, encoding_table__CP1256}, + { wxFONTENCODING_CP1257, encoding_table__CP1257}, + { wxFONTENCODING_KOI8, encoding_table__KOI8}, + { wxFONTENCODING_KOI8_U, encoding_table__KOI8_U}, + { wxFONTENCODING_CP866, encoding_table__CP866}, + {wxFONTENCODING_MAX /*anything*/, NULL} + }; diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/uri.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/uri.cpp new file mode 100644 index 0000000000..d6279eed2b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/uri.cpp @@ -0,0 +1,1087 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/uri.cpp +// Purpose: Implementation of a URI parser +// Author: Ryan Norton, +// Vadim Zeitlin (UTF-8 URI support, many other changes) +// Created: 10/26/04 +// Copyright: (c) 2004 Ryan Norton, +// 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// declarations +// =========================================================================== + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/crt.h" +#endif + +#include "wx/uri.h" + +// --------------------------------------------------------------------------- +// definitions +// --------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxURI, wxObject) + +// =========================================================================== +// wxURI implementation +// =========================================================================== + +// --------------------------------------------------------------------------- +// Constructors and cleanup +// --------------------------------------------------------------------------- + +wxURI::wxURI() + : m_hostType(wxURI_REGNAME), + m_fields(0) +{ +} + +wxURI::wxURI(const wxString& uri) + : m_hostType(wxURI_REGNAME), + m_fields(0) +{ + Create(uri); +} + +bool wxURI::Create(const wxString& uri) +{ + if (m_fields) + Clear(); + + return Parse(uri.utf8_str()); +} + +void wxURI::Clear() +{ + m_scheme = + m_userinfo = + m_server = + m_port = + m_path = + m_query = + m_fragment = wxEmptyString; + + m_hostType = wxURI_REGNAME; + + m_fields = 0; +} + +// --------------------------------------------------------------------------- +// Escaped characters handling +// --------------------------------------------------------------------------- + +// Converts a character into a numeric hexadecimal value, or -1 if the passed +// in character is not a valid hex character + +/* static */ +int wxURI::CharToHex(char c) +{ + if ((c >= 'A') && (c <= 'Z')) + return c - 'A' + 10; + if ((c >= 'a') && (c <= 'z')) + return c - 'a' + 10; + if ((c >= '0') && (c <= '9')) + return c - '0'; + + return -1; +} + +int wxURI::DecodeEscape(wxString::const_iterator& i) +{ + int hi = CharToHex(*++i); + if ( hi == -1 ) + return -1; + + int lo = CharToHex(*++i); + if ( lo == -1 ) + return -1; + + return (hi << 4) | lo; +} + +/* static */ +wxString wxURI::Unescape(const wxString& uri) +{ + // the unescaped version can't be longer than the original one + wxCharBuffer buf(uri.length()); + char *p = buf.data(); + + for ( wxString::const_iterator i = uri.begin(); i != uri.end(); ++i, ++p ) + { + char c = *i; + if ( c == '%' ) + { + int n = wxURI::DecodeEscape(i); + if ( n == -1 ) + return wxString(); + + wxASSERT_MSG( n >= 0 && n <= 0xff, "unexpected character value" ); + + c = static_cast(n); + } + + *p = c; + } + + *p = '\0'; + + // by default assume that the URI is in UTF-8, this is the most common + // practice + wxString s = wxString::FromUTF8(buf); + if ( s.empty() ) + { + // if it isn't, use latin-1 as a fallback -- at least this always + // succeeds + s = wxCSConv(wxFONTENCODING_ISO8859_1).cMB2WC(buf); + } + + return s; +} + +void wxURI::AppendNextEscaped(wxString& s, const char *& p) +{ + // check for an already encoded character: + // + // pct-encoded = "%" HEXDIG HEXDIG + if ( p[0] == '%' && IsHex(p[1]) && IsHex(p[2]) ) + { + s += *p++; + s += *p++; + s += *p++; + } + else // really needs escaping + { + static const char* hexDigits = "0123456789abcdef"; + + const char c = *p++; + + s += '%'; + s += hexDigits[(c >> 4) & 15]; + s += hexDigits[c & 15]; + } +} + +// --------------------------------------------------------------------------- +// GetUser +// GetPassword +// +// Gets the username and password via the old URL method. +// --------------------------------------------------------------------------- +wxString wxURI::GetUser() const +{ + // if there is no colon at all, find() returns npos and this method returns + // the entire string which is correct as it means that password was omitted + return m_userinfo(0, m_userinfo.find(':')); +} + +wxString wxURI::GetPassword() const +{ + size_t posColon = m_userinfo.find(':'); + + if ( posColon == wxString::npos ) + return ""; + + return m_userinfo(posColon + 1, wxString::npos); +} + +// combine all URI fields in a single string, applying funcDecode to each +// component which it may make sense to decode (i.e. "unescape") +wxString wxURI::DoBuildURI(wxString (*funcDecode)(const wxString&)) const +{ + wxString ret; + + if (HasScheme()) + ret += m_scheme + ":"; + + if (HasServer()) + { + ret += "//"; + + if (HasUserInfo()) + ret += funcDecode(m_userinfo) + "@"; + + if (m_hostType == wxURI_REGNAME) + ret += funcDecode(m_server); + else + ret += m_server; + + if (HasPort()) + ret += ":" + m_port; + } + + ret += funcDecode(m_path); + + if (HasQuery()) + ret += "?" + funcDecode(m_query); + + if (HasFragment()) + ret += "#" + funcDecode(m_fragment); + + return ret; +} + +// --------------------------------------------------------------------------- +// Comparison +// --------------------------------------------------------------------------- + +bool wxURI::operator==(const wxURI& uri) const +{ + if (HasScheme()) + { + if(m_scheme != uri.m_scheme) + return false; + } + else if (uri.HasScheme()) + return false; + + + if (HasServer()) + { + if (HasUserInfo()) + { + if (m_userinfo != uri.m_userinfo) + return false; + } + else if (uri.HasUserInfo()) + return false; + + if (m_server != uri.m_server || + m_hostType != uri.m_hostType) + return false; + + if (HasPort()) + { + if(m_port != uri.m_port) + return false; + } + else if (uri.HasPort()) + return false; + } + else if (uri.HasServer()) + return false; + + + if (HasPath()) + { + if(m_path != uri.m_path) + return false; + } + else if (uri.HasPath()) + return false; + + if (HasQuery()) + { + if (m_query != uri.m_query) + return false; + } + else if (uri.HasQuery()) + return false; + + if (HasFragment()) + { + if (m_fragment != uri.m_fragment) + return false; + } + else if (uri.HasFragment()) + return false; + + return true; +} + +// --------------------------------------------------------------------------- +// IsReference +// +// if there is no authority or scheme, it is a reference +// --------------------------------------------------------------------------- + +bool wxURI::IsReference() const +{ + return !HasScheme() || !HasServer(); +} + +// --------------------------------------------------------------------------- +// Parse +// +// Master URI parsing method. Just calls the individual parsing methods +// +// URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] +// URI-reference = URI / relative +// --------------------------------------------------------------------------- + +bool wxURI::Parse(const char *uri) +{ + uri = ParseScheme(uri); + if ( uri ) + uri = ParseAuthority(uri); + if ( uri ) + uri = ParsePath(uri); + if ( uri ) + uri = ParseQuery(uri); + if ( uri ) + uri = ParseFragment(uri); + + // we only succeed if we parsed the entire string + return uri && *uri == '\0'; +} + +const char* wxURI::ParseScheme(const char *uri) +{ + const char * const start = uri; + + // assume that we have a scheme if we have the valid start of it + if ( IsAlpha(*uri) ) + { + m_scheme += *uri++; + + //scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) + while (IsAlpha(*uri) || IsDigit(*uri) || + *uri == '+' || + *uri == '-' || + *uri == '.') + { + m_scheme += *uri++; + } + + //valid scheme? + if (*uri == ':') + { + //mark the scheme as valid + m_fields |= wxURI_SCHEME; + + //move reference point up to input buffer + ++uri; + } + else // no valid scheme finally + { + uri = start; // rewind + m_scheme.clear(); + } + } + //else: can't have schema, possible a relative URI + + return uri; +} + +const char* wxURI::ParseAuthority(const char* uri) +{ + // authority = [ userinfo "@" ] host [ ":" port ] + if ( uri[0] == '/' && uri[1] == '/' ) + { + //skip past the two slashes + uri += 2; + + // ############# DEVIATION FROM RFC ######################### + // Don't parse the server component for file URIs + if(m_scheme != "file") + { + //normal way + uri = ParseUserInfo(uri); + uri = ParseServer(uri); + return ParsePort(uri); + } + } + + return uri; +} + +const char* wxURI::ParseUserInfo(const char* uri) +{ + const char * const start = uri; + + // userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) + while ( *uri && *uri != '@' && *uri != '/' && *uri != '#' && *uri != '?' ) + { + if ( IsUnreserved(*uri) || IsSubDelim(*uri) || *uri == ':' ) + m_userinfo += *uri++; + else + AppendNextEscaped(m_userinfo, uri); + } + + if ( *uri++ == '@' ) + { + // valid userinfo + m_fields |= wxURI_USERINFO; + } + else + { + uri = start; // rewind + m_userinfo.clear(); + } + + return uri; +} + +const char* wxURI::ParseServer(const char* uri) +{ + const char * const start = uri; + + // host = IP-literal / IPv4address / reg-name + // IP-literal = "[" ( IPv6address / IPvFuture ) "]" + if (*uri == '[') + { + ++uri; + if (ParseIPv6address(uri) && *uri == ']') + { + m_hostType = wxURI_IPV6ADDRESS; + + m_server.assign(start + 1, uri - start - 1); + ++uri; + } + else + { + uri = start + 1; // skip the leading '[' again + + if (ParseIPvFuture(uri) && *uri == ']') + { + m_hostType = wxURI_IPVFUTURE; + + m_server.assign(start + 1, uri - start - 1); + ++uri; + } + else // unrecognized IP literal + { + uri = start; + } + } + } + else // IPv4 or a reg-name + { + if (ParseIPv4address(uri)) + { + m_hostType = wxURI_IPV4ADDRESS; + + m_server.assign(start, uri - start); + } + else + { + uri = start; + } + } + + if ( m_hostType == wxURI_REGNAME ) + { + uri = start; + // reg-name = *( unreserved / pct-encoded / sub-delims ) + while ( *uri && *uri != '/' && *uri != ':' && *uri != '#' && *uri != '?' ) + { + if ( IsUnreserved(*uri) || IsSubDelim(*uri) ) + m_server += *uri++; + else + AppendNextEscaped(m_server, uri); + } + } + + m_fields |= wxURI_SERVER; + + return uri; +} + + +const char* wxURI::ParsePort(const char* uri) +{ + // port = *DIGIT + if( *uri == ':' ) + { + ++uri; + while ( IsDigit(*uri) ) + { + m_port += *uri++; + } + + m_fields |= wxURI_PORT; + } + + return uri; +} + +const char* wxURI::ParsePath(const char* uri) +{ + /// hier-part = "//" authority path-abempty + /// / path-absolute + /// / path-rootless + /// / path-empty + /// + /// relative-part = "//" authority path-abempty + /// / path-absolute + /// / path-noscheme + /// / path-empty + /// + /// path-abempty = *( "/" segment ) + /// path-absolute = "/" [ segment-nz *( "/" segment ) ] + /// path-noscheme = segment-nz-nc *( "/" segment ) + /// path-rootless = segment-nz *( "/" segment ) + /// path-empty = 0 + /// + /// segment = *pchar + /// segment-nz = 1*pchar + /// segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" ) + /// ; non-zero-length segment without any colon ":" + /// + /// pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + + if ( IsEndPath(*uri) ) + return uri; + + const bool isAbs = *uri == '/'; + if ( isAbs ) + m_path += *uri++; + + wxArrayString segments; + wxString segment; + for ( ;; ) + { + const bool endPath = IsEndPath(*uri); + if ( endPath || *uri == '/' ) + { + // end of a segment, look at what we got + if ( segment == ".." ) + { + if ( !segments.empty() && *segments.rbegin() != ".." ) + segments.pop_back(); + else if ( !isAbs ) + segments.push_back(".."); + } + else if ( segment == "." ) + { + // normally we ignore "." but the last one should be taken into + // account as "path/." is the same as "path/" and not just "path" + if ( endPath ) + segments.push_back(""); + } + else // normal segment + { + segments.push_back(segment); + } + + if ( endPath ) + break; + + segment.clear(); + ++uri; + continue; + } + + if ( IsUnreserved(*uri) || IsSubDelim(*uri) || *uri == ':' || *uri == '@' ) + segment += *uri++; + else + AppendNextEscaped(segment, uri); + } + + m_path += wxJoin(segments, '/', '\0'); + m_fields |= wxURI_PATH; + + return uri; +} + + +const char* wxURI::ParseQuery(const char* uri) +{ + // query = *( pchar / "/" / "?" ) + if ( *uri == '?' ) + { + ++uri; + while ( *uri && *uri != '#' ) + { + if ( IsUnreserved(*uri) || IsSubDelim(*uri) || + *uri == ':' || *uri == '@' || *uri == '/' || *uri == '?' ) + m_query += *uri++; + else + AppendNextEscaped(m_query, uri); + } + + m_fields |= wxURI_QUERY; + } + + return uri; +} + + +const char* wxURI::ParseFragment(const char* uri) +{ + // fragment = *( pchar / "/" / "?" ) + if ( *uri == '#' ) + { + ++uri; + while ( *uri ) + { + if ( IsUnreserved(*uri) || IsSubDelim(*uri) || + *uri == ':' || *uri == '@' || *uri == '/' || *uri == '?') + m_fragment += *uri++; + else + AppendNextEscaped(m_fragment, uri); + } + + m_fields |= wxURI_FRAGMENT; + } + + return uri; +} + +// --------------------------------------------------------------------------- +// Resolve +// +// Builds missing components of this uri from a base uri +// +// A version of the algorithm outlined in the RFC is used here +// (it is shown in comments) +// +// Note that an empty URI inherits all components +// --------------------------------------------------------------------------- + +/* static */ +wxArrayString wxURI::SplitInSegments(const wxString& path) +{ + return wxSplit(path, '/', '\0' /* no escape character */); +} + +void wxURI::Resolve(const wxURI& base, int flags) +{ + wxASSERT_MSG(!base.IsReference(), + "wxURI to inherit from must not be a reference!"); + + // If we aren't being strict, enable the older (pre-RFC2396) loophole that + // allows this uri to inherit other properties from the base uri - even if + // the scheme is defined + if ( !(flags & wxURI_STRICT) && + HasScheme() && base.HasScheme() && + m_scheme == base.m_scheme ) + { + m_fields -= wxURI_SCHEME; + } + + + // Do nothing if this is an absolute wxURI + // if defined(R.scheme) then + // T.scheme = R.scheme; + // T.authority = R.authority; + // T.path = remove_dot_segments(R.path); + // T.query = R.query; + if (HasScheme()) + return; + + //No scheme - inherit + m_scheme = base.m_scheme; + m_fields |= wxURI_SCHEME; + + // All we need to do for relative URIs with an + // authority component is just inherit the scheme + // if defined(R.authority) then + // T.authority = R.authority; + // T.path = remove_dot_segments(R.path); + // T.query = R.query; + if (HasServer()) + return; + + //No authority - inherit + if (base.HasUserInfo()) + { + m_userinfo = base.m_userinfo; + m_fields |= wxURI_USERINFO; + } + + m_server = base.m_server; + m_hostType = base.m_hostType; + m_fields |= wxURI_SERVER; + + if (base.HasPort()) + { + m_port = base.m_port; + m_fields |= wxURI_PORT; + } + + + // Simple path inheritance from base + if (!HasPath()) + { + // T.path = Base.path; + m_path = base.m_path; + m_fields |= wxURI_PATH; + + + // if defined(R.query) then + // T.query = R.query; + // else + // T.query = Base.query; + // endif; + if (!HasQuery()) + { + m_query = base.m_query; + m_fields |= wxURI_QUERY; + } + } + else if ( m_path.empty() || m_path[0u] != '/' ) + { + // if (R.path starts-with "/") then + // T.path = remove_dot_segments(R.path); + // else + // T.path = merge(Base.path, R.path); + // T.path = remove_dot_segments(T.path); + // endif; + // T.query = R.query; + // + // So we don't do anything for absolute paths and implement merge for + // the relative ones + + wxArrayString our(SplitInSegments(m_path)), + result(SplitInSegments(base.m_path)); + + if ( !result.empty() ) + result.pop_back(); + + if ( our.empty() ) + { + // if we have an empty path it means we were constructed from a "." + // string or something similar (e.g. "././././"), it should count + // as (empty) segment + our.push_back(""); + } + + const wxArrayString::const_iterator end = our.end(); + for ( wxArrayString::const_iterator i = our.begin(); i != end; ++i ) + { + if ( i->empty() || *i == "." ) + { + // as in ParsePath(), while normally we ignore the empty + // segments, we need to take account of them at the end + if ( i == end - 1 ) + result.push_back(""); + continue; + } + + if ( *i == ".." ) + { + if ( !result.empty() ) + { + result.pop_back(); + + if ( i == end - 1 ) + result.push_back(""); + } + //else: just ignore, extra ".." don't accumulate + } + else + { + if ( result.empty() ) + { + // ensure that the resulting path will always be absolute + result.push_back(""); + } + + result.push_back(*i); + } + } + + m_path = wxJoin(result, '/', '\0'); + } + + //T.fragment = R.fragment; +} + +// --------------------------------------------------------------------------- +// ParseH16 +// +// Parses 1 to 4 hex values. Returns true if the first character of the input +// string is a valid hex character. It is the caller's responsibility to move +// the input string back to its original position on failure. +// --------------------------------------------------------------------------- + +bool wxURI::ParseH16(const char*& uri) +{ + // h16 = 1*4HEXDIG + if(!IsHex(*++uri)) + return false; + + if(IsHex(*++uri) && IsHex(*++uri) && IsHex(*++uri)) + ++uri; + + return true; +} + +// --------------------------------------------------------------------------- +// ParseIPXXX +// +// Parses a certain version of an IP address and moves the input string past +// it. Returns true if the input string contains the proper version of an ip +// address. It is the caller's responsibility to move the input string back +// to its original position on failure. +// --------------------------------------------------------------------------- + +bool wxURI::ParseIPv4address(const char*& uri) +{ + //IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet + // + //dec-octet = DIGIT ; 0-9 + // / %x31-39 DIGIT ; 10-99 + // / "1" 2DIGIT ; 100-199 + // / "2" %x30-34 DIGIT ; 200-249 + // / "25" %x30-35 ; 250-255 + size_t iIPv4 = 0; + if (IsDigit(*uri)) + { + ++iIPv4; + + + //each ip part must be between 0-255 (dupe of version in for loop) + if( IsDigit(*++uri) && IsDigit(*++uri) && + //100 or less (note !) + !( (*(uri-2) < '2') || + //240 or less + (*(uri-2) == '2' && + (*(uri-1) < '5' || (*(uri-1) == '5' && *uri <= '5')) + ) + ) + ) + { + return false; + } + + if(IsDigit(*uri))++uri; + + //compilers should unroll this loop + for(; iIPv4 < 4; ++iIPv4) + { + if (*uri != '.' || !IsDigit(*++uri)) + break; + + //each ip part must be between 0-255 + if( IsDigit(*++uri) && IsDigit(*++uri) && + //100 or less (note !) + !( (*(uri-2) < '2') || + //240 or less + (*(uri-2) == '2' && + (*(uri-1) < '5' || (*(uri-1) == '5' && *uri <= '5')) + ) + ) + ) + { + return false; + } + if(IsDigit(*uri))++uri; + } + } + return iIPv4 == 4; +} + +bool wxURI::ParseIPv6address(const char*& uri) +{ + // IPv6address = 6( h16 ":" ) ls32 + // / "::" 5( h16 ":" ) ls32 + // / [ h16 ] "::" 4( h16 ":" ) ls32 + // / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + // / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + // / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + // / [ *4( h16 ":" ) h16 ] "::" ls32 + // / [ *5( h16 ":" ) h16 ] "::" h16 + // / [ *6( h16 ":" ) h16 ] "::" + + size_t numPrefix = 0, + maxPostfix; + + bool bEndHex = false; + + for( ; numPrefix < 6; ++numPrefix) + { + if(!ParseH16(uri)) + { + --uri; + bEndHex = true; + break; + } + + if(*uri != ':') + { + break; + } + } + + if(!bEndHex && !ParseH16(uri)) + { + --uri; + + if (numPrefix) + return false; + + if (*uri == ':') + { + if (*++uri != ':') + return false; + + maxPostfix = 5; + } + else + maxPostfix = 6; + } + else + { + if (*uri != ':' || *(uri+1) != ':') + { + if (numPrefix != 6) + return false; + + while (*--uri != ':') {} + ++uri; + + const char * const start = uri; + //parse ls32 + // ls32 = ( h16 ":" h16 ) / IPv4address + if (ParseH16(uri) && *uri == ':' && ParseH16(uri)) + return true; + + uri = start; + + if (ParseIPv4address(uri)) + return true; + else + return false; + } + else + { + uri += 2; + + if (numPrefix > 3) + maxPostfix = 0; + else + maxPostfix = 4 - numPrefix; + } + } + + bool bAllowAltEnding = maxPostfix == 0; + + for(; maxPostfix != 0; --maxPostfix) + { + if(!ParseH16(uri) || *uri != ':') + return false; + } + + if(numPrefix <= 4) + { + const char * const start = uri; + //parse ls32 + // ls32 = ( h16 ":" h16 ) / IPv4address + if (ParseH16(uri) && *uri == ':' && ParseH16(uri)) + return true; + + uri = start; + + if (ParseIPv4address(uri)) + return true; + + uri = start; + + if (!bAllowAltEnding) + return false; + } + + if(numPrefix <= 5 && ParseH16(uri)) + return true; + + return true; +} + +bool wxURI::ParseIPvFuture(const char*& uri) +{ + // IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" ) + if (*++uri != 'v' || !IsHex(*++uri)) + return false; + + while (IsHex(*++uri)) + ; + + if (*uri != '.' || !(IsUnreserved(*++uri) || IsSubDelim(*uri) || *uri == ':')) + return false; + + while(IsUnreserved(*++uri) || IsSubDelim(*uri) || *uri == ':') {} + + return true; +} + + +// --------------------------------------------------------------------------- +// IsXXX +// +// Returns true if the passed in character meets the criteria of the method +// --------------------------------------------------------------------------- + +// unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" +bool wxURI::IsUnreserved(char c) +{ + return IsAlpha(c) || + IsDigit(c) || + c == '-' || + c == '.' || + c == '_' || + c == '~' + ; +} + +bool wxURI::IsReserved(char c) +{ + return IsGenDelim(c) || IsSubDelim(c); +} + +// gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" +bool wxURI::IsGenDelim(char c) +{ + return c == ':' || + c == '/' || + c == '?' || + c == '#' || + c == '[' || + c == ']' || + c == '@'; +} + +// sub-delims = "!" / "$" / "&" / "'" / "(" / ")" +// / "*" / "+" / "," / ";" / "=" +bool wxURI::IsSubDelim(char c) +{ + return c == '!' || + c == '$' || + c == '&' || + c == '\'' || + c == '(' || + c == ')' || + c == '*' || + c == '+' || + c == ',' || + c == ';' || + c == '=' + ; +} + +bool wxURI::IsHex(char c) +{ + return IsDigit(c) || + (c >= 'a' && c <= 'f') || + (c >= 'A' && c <= 'F'); +} + +bool wxURI::IsAlpha(char c) +{ + return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); +} + +bool wxURI::IsDigit(char c) +{ + return c >= '0' && c <= '9'; +} + +bool wxURI::IsEndPath(char c) +{ + return c == '\0' || c == '#' || c == '?'; +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/url.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/url.cpp new file mode 100644 index 0000000000..8d6eb49aa2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/url.cpp @@ -0,0 +1,495 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/url.cpp +// Purpose: URL parser +// Author: Guilhem Lavaux +// Modified by: +// Created: 20/07/1997 +// Copyright: (c) 1997, 1998 Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_URL + +#include "wx/url.h" + +#ifndef WX_PRECOMP + #include "wx/list.h" + #include "wx/string.h" + #include "wx/utils.h" + #include "wx/module.h" +#endif + +#include +#include + +IMPLEMENT_CLASS(wxURL, wxURI) + +// Protocols list +wxProtoInfo *wxURL::ms_protocols = NULL; + +// Enforce linking of protocol classes: +USE_PROTOCOL(wxFileProto) + +#if wxUSE_PROTOCOL_HTTP +USE_PROTOCOL(wxHTTP) + + wxHTTP *wxURL::ms_proxyDefault = NULL; + bool wxURL::ms_useDefaultProxy = false; +#endif + +#if wxUSE_PROTOCOL_FTP +USE_PROTOCOL(wxFTP) +#endif + +// -------------------------------------------------------------- +// +// wxURL +// +// -------------------------------------------------------------- + +// -------------------------------------------------------------- +// Construction +// -------------------------------------------------------------- + +wxURL::wxURL(const wxString& url) : wxURI(url) +{ + Init(url); + ParseURL(); +} + +wxURL::wxURL(const wxURI& uri) : wxURI(uri) +{ + Init(uri.BuildURI()); + ParseURL(); +} + +wxURL::wxURL(const wxURL& url) : wxURI(url) +{ + Init(url.GetURL()); + ParseURL(); +} + +void wxURL::Init(const wxString& url) +{ + m_protocol = NULL; + m_error = wxURL_NOERR; + m_url = url; +#if wxUSE_URL_NATIVE + m_nativeImp = CreateNativeImpObject(); +#endif + +#if wxUSE_PROTOCOL_HTTP + if ( ms_useDefaultProxy && !ms_proxyDefault ) + { + SetDefaultProxy( wxGetenv(wxT("HTTP_PROXY")) ); + + if ( !ms_proxyDefault ) + { + // don't try again + ms_useDefaultProxy = false; + } + } + + m_useProxy = ms_proxyDefault != NULL; + m_proxy = ms_proxyDefault; +#endif // wxUSE_PROTOCOL_HTTP + +} + +// -------------------------------------------------------------- +// Assignment +// -------------------------------------------------------------- + +wxURL& wxURL::operator = (const wxString& url) +{ + wxURI::operator = (url); + Free(); + Init(url); + ParseURL(); + + return *this; +} + +wxURL& wxURL::operator = (const wxURI& uri) +{ + if (&uri != this) + { + wxURI::operator = (uri); + Free(); + Init(uri.BuildURI()); + ParseURL(); + } + + return *this; +} + +wxURL& wxURL::operator = (const wxURL& url) +{ + if (&url != this) + { + wxURI::operator = (url); + Free(); + Init(url.GetURL()); + ParseURL(); + } + + return *this; +} + +// -------------------------------------------------------------- +// ParseURL +// +// Builds the URL and takes care of the old protocol stuff +// -------------------------------------------------------------- + +bool wxURL::ParseURL() +{ + // If the URL was already parsed (m_protocol != NULL), pass this section. + if (!m_protocol) + { + // Clean up + CleanData(); + + // Make sure we have a protocol/scheme + if (!HasScheme()) + { + m_error = wxURL_SNTXERR; + return false; + } + + // Find and create the protocol object + if (!FetchProtocol()) + { + m_error = wxURL_NOPROTO; + return false; + } + + // Do we need a host name ? + if (m_protoinfo->m_needhost) + { + // Make sure we have one, then + if (!HasServer()) + { + m_error = wxURL_SNTXERR; + return false; + } + } + } + +#if wxUSE_PROTOCOL_HTTP + if (m_useProxy) + { + // Third, we rebuild the URL. + m_url = m_scheme + wxT(":"); + if (m_protoinfo->m_needhost) + m_url = m_url + wxT("//") + m_server; + + // We initialize specific variables. + if (m_protocol) + m_protocol->Destroy(); + m_protocol = m_proxy; // FIXME: we should clone the protocol + } +#endif // wxUSE_PROTOCOL_HTTP + + m_error = wxURL_NOERR; + return true; +} + +// -------------------------------------------------------------- +// Destruction/Cleanup +// -------------------------------------------------------------- + +void wxURL::CleanData() +{ +#if wxUSE_PROTOCOL_HTTP + if (!m_useProxy) +#endif // wxUSE_PROTOCOL_HTTP + { + if (m_protocol) + { + // Need to safely delete the socket (pending events) + m_protocol->Destroy(); + m_protocol = NULL; + } + } +} + +void wxURL::Free() +{ + CleanData(); +#if wxUSE_PROTOCOL_HTTP + if (m_proxy && m_proxy != ms_proxyDefault) + delete m_proxy; +#endif // wxUSE_PROTOCOL_HTTP +#if wxUSE_URL_NATIVE + delete m_nativeImp; +#endif +} + +wxURL::~wxURL() +{ + Free(); +} + +// -------------------------------------------------------------- +// FetchProtocol +// -------------------------------------------------------------- + +bool wxURL::FetchProtocol() +{ + wxProtoInfo *info = ms_protocols; + + while (info) + { + if (m_scheme == info->m_protoname) + { + if ( m_port.empty() ) + m_port = info->m_servname; + m_protoinfo = info; + m_protocol = (wxProtocol *)m_protoinfo->m_cinfo->CreateObject(); + return true; + } + info = info->next; + } + return false; +} + +// -------------------------------------------------------------- +// GetInputStream +// -------------------------------------------------------------- + +wxInputStream *wxURL::GetInputStream() +{ + if (!m_protocol) + { + m_error = wxURL_NOPROTO; + return NULL; + } + + m_error = wxURL_NOERR; + if (HasUserInfo()) + { + size_t dwPasswordPos = m_userinfo.find(':'); + + if (dwPasswordPos == wxString::npos) + m_protocol->SetUser(Unescape(m_userinfo)); + else + { + m_protocol->SetUser(Unescape(m_userinfo(0, dwPasswordPos))); + m_protocol->SetPassword(Unescape(m_userinfo(dwPasswordPos+1, m_userinfo.length() + 1))); + } + } + +#if wxUSE_URL_NATIVE + // give the native implementation to return a better stream + // such as the native WinINet functionality under MS-Windows + if (m_nativeImp) + { + wxInputStream *rc; + rc = m_nativeImp->GetInputStream(this); + if (rc != 0) + return rc; + } + // else use the standard behaviour +#endif // wxUSE_URL_NATIVE + +#if wxUSE_SOCKETS + wxIPV4address addr; + + // m_protoinfo is NULL when we use a proxy + if ( +#if wxUSE_PROTOCOL_HTTP + !m_useProxy && +#endif // wxUSE_PROTOCOL_HTTP + m_protoinfo->m_needhost ) + { + if (!addr.Hostname(m_server)) + { + m_error = wxURL_NOHOST; + return NULL; + } + + addr.Service(m_port); + + if (!m_protocol->Connect(addr, true)) // Watcom needs the 2nd arg for some reason + { + m_error = wxURL_CONNERR; + return NULL; + } + } +#endif // wxUSE_SOCKETS + + wxString fullPath; + +#if wxUSE_PROTOCOL_HTTP + // When we use a proxy, we have to pass the whole URL to it. + if (m_useProxy) + fullPath += m_url; +#endif // wxUSE_PROTOCOL_HTTP + + if(m_path.empty()) + fullPath += wxT("/"); + else + fullPath += m_path; + + if (HasQuery()) + fullPath += wxT("?") + m_query; + + if (HasFragment()) + fullPath += wxT("#") + m_fragment; + + wxInputStream *the_i_stream = m_protocol->GetInputStream(fullPath); + + if (!the_i_stream) + { + m_error = wxURL_PROTOERR; + return NULL; + } + + return the_i_stream; +} + +#if wxUSE_PROTOCOL_HTTP +void wxURL::SetDefaultProxy(const wxString& url_proxy) +{ + if ( !url_proxy ) + { + if ( ms_proxyDefault ) + { + ms_proxyDefault->Close(); + wxDELETE(ms_proxyDefault); + } + } + else + { + wxString tmp_str = url_proxy; + int pos = tmp_str.Find(wxT(':')); + if (pos == wxNOT_FOUND) + return; + + wxString hostname = tmp_str(0, pos), + port = tmp_str(pos+1, tmp_str.length()-pos); + wxIPV4address addr; + + if (!addr.Hostname(hostname)) + return; + if (!addr.Service(port)) + return; + + if (ms_proxyDefault) + // Finally, when all is right, we connect the new proxy. + ms_proxyDefault->Close(); + else + ms_proxyDefault = new wxHTTP(); + ms_proxyDefault->Connect(addr, true); // Watcom needs the 2nd arg for some reason + } +} + +void wxURL::SetProxy(const wxString& url_proxy) +{ + if ( !url_proxy ) + { + if ( m_proxy && m_proxy != ms_proxyDefault ) + { + m_proxy->Close(); + delete m_proxy; + } + + m_useProxy = false; + } + else + { + wxString tmp_str; + wxString hostname, port; + int pos; + wxIPV4address addr; + + tmp_str = url_proxy; + pos = tmp_str.Find(wxT(':')); + // This is an invalid proxy name. + if (pos == wxNOT_FOUND) + return; + + hostname = tmp_str(0, pos); + port = tmp_str(pos+1, tmp_str.length()-pos); + + addr.Hostname(hostname); + addr.Service(port); + + // Finally, create the whole stuff. + if (m_proxy && m_proxy != ms_proxyDefault) + delete m_proxy; + m_proxy = new wxHTTP(); + m_proxy->Connect(addr, true); // Watcom needs the 2nd arg for some reason + + CleanData(); + // Reparse url. + m_useProxy = true; + ParseURL(); + } +} +#endif // wxUSE_PROTOCOL_HTTP + +// ---------------------------------------------------------------------- +// wxURLModule +// +// A module which deletes the default proxy if we created it +// ---------------------------------------------------------------------- + +#if wxUSE_SOCKETS + +class wxURLModule : public wxModule +{ +public: + wxURLModule(); + + virtual bool OnInit(); + virtual void OnExit(); + +private: + DECLARE_DYNAMIC_CLASS(wxURLModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxURLModule, wxModule) + +wxURLModule::wxURLModule() +{ + // we must be cleaned up before wxSocketModule as otherwise deleting + // ms_proxyDefault from our OnExit() won't work (and can actually crash) + AddDependency(wxClassInfo::FindClass(wxT("wxSocketModule"))); +} + +bool wxURLModule::OnInit() +{ +#if wxUSE_PROTOCOL_HTTP + // env var HTTP_PROXY contains the address of the default proxy to use if + // set, but don't try to create this proxy right now because it will slow + // down the program startup (especially if there is no DNS server + // available, in which case it may take up to 1 minute) + + if ( wxGetenv(wxT("HTTP_PROXY")) ) + { + wxURL::ms_useDefaultProxy = true; + } +#endif // wxUSE_PROTOCOL_HTTP + return true; +} + +void wxURLModule::OnExit() +{ +#if wxUSE_PROTOCOL_HTTP + wxDELETE(wxURL::ms_proxyDefault); +#endif // wxUSE_PROTOCOL_HTTP +} + +#endif // wxUSE_SOCKETS + + +#endif // wxUSE_URL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/ustring.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/ustring.cpp new file mode 100644 index 0000000000..ab70ce5ae2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/ustring.cpp @@ -0,0 +1,537 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/ustring.cpp +// Purpose: wxUString class +// Author: Robert Roebling +// Created: 2008-07-25 +// Copyright: (c) 2008 Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/ustring.h" + +#ifndef WX_PRECOMP + #include "wx/crt.h" + #include "wx/log.h" +#endif + +wxUString &wxUString::assignFromAscii( const char *str ) +{ + size_type len = wxStrlen( str ); + + wxU32CharBuffer buffer( len ); + wxChar32 *ptr = buffer.data(); + + size_type i; + for (i = 0; i < len; i++) + { + *ptr = *str; + ptr++; + str++; + } + + return assign( buffer ); +} + +wxUString &wxUString::assignFromAscii( const char *str, size_type n ) +{ + size_type len = 0; + const char *s = str; + while (len < n && *s) + { + len++; + s++; + } + + wxU32CharBuffer buffer( len ); + wxChar32 *ptr = buffer.data(); + + size_type i; + for (i = 0; i < len; i++) + { + *ptr = *str; + ptr++; + str++; + } + + return *this; +} + +// ---------------------------------------------------------------------------- +// UTF-8 +// ---------------------------------------------------------------------------- + +// this table gives the length of the UTF-8 encoding from its first character: +const unsigned char tableUtf8Lengths[256] = { + // single-byte sequences (ASCII): + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 00..0F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 10..1F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 20..2F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 30..3F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 40..4F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 50..5F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 60..6F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 70..7F + + // these are invalid: + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 80..8F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 90..9F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // A0..AF + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // B0..BF + 0, 0, // C0,C1 + + // two-byte sequences: + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C2..CF + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // D0..DF + + // three-byte sequences: + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // E0..EF + + // four-byte sequences: + 4, 4, 4, 4, 4, // F0..F4 + + // these are invalid again (5- or 6-byte + // sequences and sequences for code points + // above U+10FFFF, as restricted by RFC 3629): + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // F5..FF +}; + +wxUString &wxUString::assignFromUTF8( const char *str ) +{ + if (!str) + return assign( wxUString() ); + + size_type ucs4_len = 0; + const char *p = str; + while (*p) + { + unsigned char c = *p; + size_type len = tableUtf8Lengths[c]; + if (!len) + return assign( wxUString() ); // don't try to convert invalid UTF-8 + ucs4_len++; + p += len; + } + + wxU32CharBuffer buffer( ucs4_len ); + wxChar32 *out = buffer.data(); + + p = str; + while (*p) + { + unsigned char c = *p; + if (c < 0x80) + { + *out = c; + p++; + } + else + { + size_type len = tableUtf8Lengths[c]; // len == 0 is caught above + + // Char. number range | UTF-8 octet sequence + // (hexadecimal) | (binary) + // ----------------------+---------------------------------------- + // 0000 0000 - 0000 007F | 0xxxxxxx + // 0000 0080 - 0000 07FF | 110xxxxx 10xxxxxx + // 0000 0800 - 0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx + // 0001 0000 - 0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + // + // Code point value is stored in bits marked with 'x', + // lowest-order bit of the value on the right side in the diagram + // above. (from RFC 3629) + + // mask to extract lead byte's value ('x' bits above), by sequence + // length: + static const unsigned char leadValueMask[] = { 0x7F, 0x1F, 0x0F, 0x07 }; + + // mask and value of lead byte's most significant bits, by length: + static const unsigned char leadMarkerMask[] = { 0x80, 0xE0, 0xF0, 0xF8 }; + static const unsigned char leadMarkerVal[] = { 0x00, 0xC0, 0xE0, 0xF0 }; + + len--; // it's more convenient to work with 0-based length here + + // extract the lead byte's value bits: + if ( (c & leadMarkerMask[len]) != leadMarkerVal[len] ) + break; + + wxChar32 code = c & leadValueMask[len]; + + // all remaining bytes, if any, are handled in the same way + // regardless of sequence's length: + for ( ; len; --len ) + { + c = *++p; + if ( (c & 0xC0) != 0x80 ) + return assign( wxUString() ); // don't try to convert invalid UTF-8 + + code <<= 6; + code |= c & 0x3F; + } + + *out = code; + p++; + } + out++; + } + + return assign( buffer.data() ); +} + +wxUString &wxUString::assignFromUTF8( const char *str, size_type n ) +{ + if (!str) + return assign( wxUString() ); + + size_type ucs4_len = 0; + size_type utf8_pos = 0; + const char *p = str; + while (*p) + { + unsigned char c = *p; + size_type len = tableUtf8Lengths[c]; + if (!len) + return assign( wxUString() ); // don't try to convert invalid UTF-8 + if (utf8_pos + len > n) + break; + utf8_pos += len; + ucs4_len ++; + p += len; + } + + wxU32CharBuffer buffer( ucs4_len ); + wxChar32 *out = buffer.data(); + + utf8_pos = 0; + p = str; + while (*p) + { + unsigned char c = *p; + if (c < 0x80) + { + if (utf8_pos + 1 > n) + break; + utf8_pos++; + + *out = c; + p++; + } + else + { + size_type len = tableUtf8Lengths[c]; // len == 0 is caught above + if (utf8_pos + len > n) + break; + utf8_pos += len; + + // Char. number range | UTF-8 octet sequence + // (hexadecimal) | (binary) + // ----------------------+---------------------------------------- + // 0000 0000 - 0000 007F | 0xxxxxxx + // 0000 0080 - 0000 07FF | 110xxxxx 10xxxxxx + // 0000 0800 - 0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx + // 0001 0000 - 0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + // + // Code point value is stored in bits marked with 'x', + // lowest-order bit of the value on the right side in the diagram + // above. (from RFC 3629) + + // mask to extract lead byte's value ('x' bits above), by sequence + // length: + static const unsigned char leadValueMask[] = { 0x7F, 0x1F, 0x0F, 0x07 }; + + // mask and value of lead byte's most significant bits, by length: + static const unsigned char leadMarkerMask[] = { 0x80, 0xE0, 0xF0, 0xF8 }; + static const unsigned char leadMarkerVal[] = { 0x00, 0xC0, 0xE0, 0xF0 }; + + len--; // it's more convenient to work with 0-based length here + + // extract the lead byte's value bits: + if ( (c & leadMarkerMask[len]) != leadMarkerVal[len] ) + break; + + wxChar32 code = c & leadValueMask[len]; + + // all remaining bytes, if any, are handled in the same way + // regardless of sequence's length: + for ( ; len; --len ) + { + c = *++p; + if ( (c & 0xC0) != 0x80 ) + return assign( wxUString() ); // don't try to convert invalid UTF-8 + + code <<= 6; + code |= c & 0x3F; + } + + *out = code; + p++; + } + out++; + } + + *out = 0; + + return assign( buffer.data() ); +} + +wxUString &wxUString::assignFromUTF16( const wxChar16* str, size_type n ) +{ + if (!str) + return assign( wxUString() ); + + size_type ucs4_len = 0; + size_type utf16_pos = 0; + const wxChar16 *p = str; + while (*p) + { + size_type len; + if ((*p < 0xd800) || (*p > 0xdfff)) + { + len = 1; + } + else if ((p[1] < 0xdc00) || (p[1] > 0xdfff)) + { + return assign( wxUString() ); // don't try to convert invalid UTF-16 + } + else + { + len = 2; + } + + if (utf16_pos + len > n) + break; + + ucs4_len++; + p += len; + utf16_pos += len; + } + + wxU32CharBuffer buffer( ucs4_len ); + wxChar32 *out = buffer.data(); + + utf16_pos = 0; + + p = str; + while (*p) + { + if ((*p < 0xd800) || (*p > 0xdfff)) + { + if (utf16_pos + 1 > n) + break; + + *out = *p; + p++; + utf16_pos++; + } + else + { + if (utf16_pos + 2 > n) + break; + + *out = ((p[0] - 0xd7c0) << 10) + (p[1] - 0xdc00); + p += 2; + utf16_pos += 2; + } + out++; + } + + return assign( buffer.data() ); +} + +wxUString &wxUString::assignFromUTF16( const wxChar16* str ) +{ + if (!str) + return assign( wxUString() ); + + size_type ucs4_len = 0; + const wxChar16 *p = str; + while (*p) + { + size_type len; + if ((*p < 0xd800) || (*p > 0xdfff)) + { + len = 1; + } + else if ((p[1] < 0xdc00) || (p[1] > 0xdfff)) + { + return assign( wxUString() ); // don't try to convert invalid UTF-16 + } + else + { + len = 2; + } + + ucs4_len++; + p += len; + } + + wxU32CharBuffer buffer( ucs4_len ); + wxChar32 *out = buffer.data(); + + p = str; + while (*p) + { + if ((*p < 0xd800) || (*p > 0xdfff)) + { + *out = *p; + p++; + } + else + { + *out = ((p[0] - 0xd7c0) << 10) + (p[1] - 0xdc00); + p += 2; + } + out++; + } + + return assign( buffer.data() ); +} + +wxUString &wxUString::assignFromCString( const char* str ) +{ + if (!str) + return assign( wxUString() ); + + wxScopedWCharBuffer buffer = wxConvLibc.cMB2WC( str ); + + return assign( buffer ); +} + +wxUString &wxUString::assignFromCString( const char* str, const wxMBConv &conv ) +{ + if (!str) + return assign( wxUString() ); + + wxScopedWCharBuffer buffer = conv.cMB2WC( str ); + + return assign( buffer ); +} + +wxScopedCharBuffer wxUString::utf8_str() const +{ + size_type utf8_length = 0; + const wxChar32 *ptr = data(); + + while (*ptr) + { + wxChar32 code = *ptr; + ptr++; + + if ( code <= 0x7F ) + { + utf8_length++; + } + else if ( code <= 0x07FF ) + { + utf8_length += 2; + } + else if ( code < 0xFFFF ) + { + utf8_length += 3; + } + else if ( code <= 0x10FFFF ) + { + utf8_length += 4; + } + else + { + // invalid range, skip + } + } + + wxCharBuffer result( utf8_length ); + + char *out = result.data(); + + ptr = data(); + while (*ptr) + { + wxChar32 code = *ptr; + ptr++; + + if ( code <= 0x7F ) + { + out[0] = (char)code; + out++; + } + else if ( code <= 0x07FF ) + { + out[1] = 0x80 | (code & 0x3F); code >>= 6; + out[0] = 0xC0 | code; + out += 2; + } + else if ( code < 0xFFFF ) + { + out[2] = 0x80 | (code & 0x3F); code >>= 6; + out[1] = 0x80 | (code & 0x3F); code >>= 6; + out[0] = 0xE0 | code; + out += 3; + } + else if ( code <= 0x10FFFF ) + { + out[3] = 0x80 | (code & 0x3F); code >>= 6; + out[2] = 0x80 | (code & 0x3F); code >>= 6; + out[1] = 0x80 | (code & 0x3F); code >>= 6; + out[0] = 0xF0 | code; + out += 4; + } + else + { + // invalid range, skip + } + } + + return result; +} + +wxScopedU16CharBuffer wxUString::utf16_str() const +{ + size_type utf16_length = 0; + const wxChar32 *ptr = data(); + + while (*ptr) + { + wxChar32 code = *ptr; + ptr++; + + // TODO: error range checks + + if (code < 0x10000) + utf16_length++; + else + utf16_length += 2; + } + + wxU16CharBuffer result( utf16_length ); + wxChar16 *out = result.data(); + + ptr = data(); + + while (*ptr) + { + wxChar32 code = *ptr; + ptr++; + + // TODO: error range checks + + if (code < 0x10000) + { + out[0] = code; + out++; + } + else + { + out[0] = (code - 0x10000) / 0x400 + 0xd800; + out[1] = (code - 0x10000) % 0x400 + 0xdc00; + out += 2; + } + } + + return result; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/utilscmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/utilscmn.cpp new file mode 100644 index 0000000000..6c7d0c351a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/utilscmn.cpp @@ -0,0 +1,1602 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/utilscmn.cpp +// Purpose: Miscellaneous utility functions and classes +// Author: Julian Smart +// Modified by: +// Created: 29/01/98 +// Copyright: (c) 1998 Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/string.h" + #include "wx/utils.h" + #include "wx/intl.h" + #include "wx/log.h" + + #if wxUSE_GUI + #include "wx/window.h" + #include "wx/frame.h" + #include "wx/menu.h" + #include "wx/msgdlg.h" + #include "wx/textdlg.h" + #include "wx/textctrl.h" // for wxTE_PASSWORD + #if wxUSE_ACCEL + #include "wx/menuitem.h" + #include "wx/accel.h" + #endif // wxUSE_ACCEL + #endif // wxUSE_GUI +#endif // WX_PRECOMP + +#include "wx/apptrait.h" + +#include "wx/process.h" +#include "wx/txtstrm.h" +#include "wx/uri.h" +#include "wx/mimetype.h" +#include "wx/config.h" +#include "wx/versioninfo.h" + +#if defined(__WXWINCE__) && wxUSE_DATETIME + #include "wx/datetime.h" +#endif + +#include +#include +#include +#include + +#if !wxONLY_WATCOM_EARLIER_THAN(1,4) + #if !(defined(_MSC_VER) && (_MSC_VER > 800)) + #include + #endif +#endif + +#if wxUSE_GUI + #include "wx/notebook.h" + #include "wx/statusbr.h" +#endif // wxUSE_GUI + +#ifndef __WXWINCE__ + #include +#else + #include "wx/msw/wince/time.h" +#endif + +#ifdef __WXMAC__ + #include "wx/osx/private.h" +#endif + +#if !defined(__WXWINCE__) + #include + #include +#endif + +#if defined(__WINDOWS__) + #include "wx/msw/private.h" + #include "wx/filesys.h" +#endif + +#if wxUSE_GUI && defined(__WXGTK__) + #include // for GTK_XXX_VERSION constants +#endif + +#if wxUSE_BASE + +// ============================================================================ +// implementation +// ============================================================================ + +// Array used in DecToHex conversion routine. +static const wxChar hexArray[] = wxT("0123456789ABCDEF"); + +// Convert 2-digit hex number to decimal +int wxHexToDec(const wxString& str) +{ + char buf[2]; + buf[0] = str.GetChar(0); + buf[1] = str.GetChar(1); + return wxHexToDec((const char*) buf); +} + +// Convert decimal integer to 2-character hex string +void wxDecToHex(int dec, wxChar *buf) +{ + int firstDigit = (int)(dec/16.0); + int secondDigit = (int)(dec - (firstDigit*16.0)); + buf[0] = hexArray[firstDigit]; + buf[1] = hexArray[secondDigit]; + buf[2] = 0; +} + +// Convert decimal integer to 2 characters +void wxDecToHex(int dec, char* ch1, char* ch2) +{ + int firstDigit = (int)(dec/16.0); + int secondDigit = (int)(dec - (firstDigit*16.0)); + (*ch1) = (char) hexArray[firstDigit]; + (*ch2) = (char) hexArray[secondDigit]; +} + +// Convert decimal integer to 2-character hex string +wxString wxDecToHex(int dec) +{ + wxChar buf[3]; + wxDecToHex(dec, buf); + return wxString(buf); +} + +// ---------------------------------------------------------------------------- +// misc functions +// ---------------------------------------------------------------------------- + +// Return the current date/time +wxString wxNow() +{ +#ifdef __WXWINCE__ +#if wxUSE_DATETIME + wxDateTime now = wxDateTime::Now(); + return now.Format(); +#else + return wxEmptyString; +#endif +#else + time_t now = time(NULL); + char *date = ctime(&now); + date[24] = '\0'; + return wxString::FromAscii(date); +#endif +} + +#if WXWIN_COMPATIBILITY_2_8 +void wxUsleep(unsigned long milliseconds) +{ + wxMilliSleep(milliseconds); +} +#endif + +const wxChar *wxGetInstallPrefix() +{ + wxString prefix; + + if ( wxGetEnv(wxT("WXPREFIX"), &prefix) ) + return prefix.c_str(); + +#ifdef wxINSTALL_PREFIX + return wxT(wxINSTALL_PREFIX); +#else + return wxEmptyString; +#endif +} + +wxString wxGetDataDir() +{ + wxString dir = wxGetInstallPrefix(); + dir << wxFILE_SEP_PATH << wxT("share") << wxFILE_SEP_PATH << wxT("wx"); + return dir; +} + +bool wxIsPlatformLittleEndian() +{ + // Are we little or big endian? This method is from Harbison & Steele. + union + { + long l; + char c[sizeof(long)]; + } u; + u.l = 1; + + return u.c[0] == 1; +} + + +// ---------------------------------------------------------------------------- +// wxPlatform +// ---------------------------------------------------------------------------- + +/* + * Class to make it easier to specify platform-dependent values + */ + +wxArrayInt* wxPlatform::sm_customPlatforms = NULL; + +void wxPlatform::Copy(const wxPlatform& platform) +{ + m_longValue = platform.m_longValue; + m_doubleValue = platform.m_doubleValue; + m_stringValue = platform.m_stringValue; +} + +wxPlatform wxPlatform::If(int platform, long value) +{ + if (Is(platform)) + return wxPlatform(value); + else + return wxPlatform(); +} + +wxPlatform wxPlatform::IfNot(int platform, long value) +{ + if (!Is(platform)) + return wxPlatform(value); + else + return wxPlatform(); +} + +wxPlatform& wxPlatform::ElseIf(int platform, long value) +{ + if (Is(platform)) + m_longValue = value; + return *this; +} + +wxPlatform& wxPlatform::ElseIfNot(int platform, long value) +{ + if (!Is(platform)) + m_longValue = value; + return *this; +} + +wxPlatform wxPlatform::If(int platform, double value) +{ + if (Is(platform)) + return wxPlatform(value); + else + return wxPlatform(); +} + +wxPlatform wxPlatform::IfNot(int platform, double value) +{ + if (!Is(platform)) + return wxPlatform(value); + else + return wxPlatform(); +} + +wxPlatform& wxPlatform::ElseIf(int platform, double value) +{ + if (Is(platform)) + m_doubleValue = value; + return *this; +} + +wxPlatform& wxPlatform::ElseIfNot(int platform, double value) +{ + if (!Is(platform)) + m_doubleValue = value; + return *this; +} + +wxPlatform wxPlatform::If(int platform, const wxString& value) +{ + if (Is(platform)) + return wxPlatform(value); + else + return wxPlatform(); +} + +wxPlatform wxPlatform::IfNot(int platform, const wxString& value) +{ + if (!Is(platform)) + return wxPlatform(value); + else + return wxPlatform(); +} + +wxPlatform& wxPlatform::ElseIf(int platform, const wxString& value) +{ + if (Is(platform)) + m_stringValue = value; + return *this; +} + +wxPlatform& wxPlatform::ElseIfNot(int platform, const wxString& value) +{ + if (!Is(platform)) + m_stringValue = value; + return *this; +} + +wxPlatform& wxPlatform::Else(long value) +{ + m_longValue = value; + return *this; +} + +wxPlatform& wxPlatform::Else(double value) +{ + m_doubleValue = value; + return *this; +} + +wxPlatform& wxPlatform::Else(const wxString& value) +{ + m_stringValue = value; + return *this; +} + +void wxPlatform::AddPlatform(int platform) +{ + if (!sm_customPlatforms) + sm_customPlatforms = new wxArrayInt; + sm_customPlatforms->Add(platform); +} + +void wxPlatform::ClearPlatforms() +{ + wxDELETE(sm_customPlatforms); +} + +/// Function for testing current platform + +bool wxPlatform::Is(int platform) +{ +#ifdef __WINDOWS__ + if (platform == wxOS_WINDOWS) + return true; +#endif +#ifdef __WXWINCE__ + if (platform == wxOS_WINDOWS_CE) + return true; +#endif + +#if 0 + +// FIXME: wxWinPocketPC and wxWinSmartPhone are unknown symbols + +#if defined(__WXWINCE__) && defined(__POCKETPC__) + if (platform == wxWinPocketPC) + return true; +#endif +#if defined(__WXWINCE__) && defined(__SMARTPHONE__) + if (platform == wxWinSmartPhone) + return true; +#endif + +#endif + +#ifdef __WXGTK__ + if (platform == wxPORT_GTK) + return true; +#endif +#ifdef __WXMAC__ + if (platform == wxPORT_MAC) + return true; +#endif +#ifdef __WXX11__ + if (platform == wxPORT_X11) + return true; +#endif +#ifdef __UNIX__ + if (platform == wxOS_UNIX) + return true; +#endif +#ifdef __OS2__ + if (platform == wxOS_OS2) + return true; +#endif +#ifdef __WXPM__ + if (platform == wxPORT_PM) + return true; +#endif +#ifdef __WXCOCOA__ + if (platform == wxPORT_MAC) + return true; +#endif + + if (sm_customPlatforms && sm_customPlatforms->Index(platform) != wxNOT_FOUND) + return true; + + return false; +} + +// ---------------------------------------------------------------------------- +// network and user id functions +// ---------------------------------------------------------------------------- + +// Get Full RFC822 style email address +bool wxGetEmailAddress(wxChar *address, int maxSize) +{ + wxString email = wxGetEmailAddress(); + if ( !email ) + return false; + + wxStrlcpy(address, email.t_str(), maxSize); + + return true; +} + +wxString wxGetEmailAddress() +{ + wxString email; + + wxString host = wxGetFullHostName(); + if ( !host.empty() ) + { + wxString user = wxGetUserId(); + if ( !user.empty() ) + { + email << user << wxT('@') << host; + } + } + + return email; +} + +wxString wxGetUserId() +{ + static const int maxLoginLen = 256; // FIXME arbitrary number + + wxString buf; + bool ok = wxGetUserId(wxStringBuffer(buf, maxLoginLen), maxLoginLen); + + if ( !ok ) + buf.Empty(); + + return buf; +} + +wxString wxGetUserName() +{ + static const int maxUserNameLen = 1024; // FIXME arbitrary number + + wxString buf; + bool ok = wxGetUserName(wxStringBuffer(buf, maxUserNameLen), maxUserNameLen); + + if ( !ok ) + buf.Empty(); + + return buf; +} + +wxString wxGetHostName() +{ + static const size_t hostnameSize = 257; + + wxString buf; + bool ok = wxGetHostName(wxStringBuffer(buf, hostnameSize), hostnameSize); + + if ( !ok ) + buf.Empty(); + + return buf; +} + +wxString wxGetFullHostName() +{ + static const size_t hostnameSize = 257; + + wxString buf; + bool ok = wxGetFullHostName(wxStringBuffer(buf, hostnameSize), hostnameSize); + + if ( !ok ) + buf.Empty(); + + return buf; +} + +wxString wxGetHomeDir() +{ + wxString home; + wxGetHomeDir(&home); + + return home; +} + +#if 0 + +wxString wxGetCurrentDir() +{ + wxString dir; + size_t len = 1024; + bool ok; + do + { + ok = getcwd(dir.GetWriteBuf(len + 1), len) != NULL; + dir.UngetWriteBuf(); + + if ( !ok ) + { + if ( errno != ERANGE ) + { + wxLogSysError(wxT("Failed to get current directory")); + + return wxEmptyString; + } + else + { + // buffer was too small, retry with a larger one + len *= 2; + } + } + //else: ok + } while ( !ok ); + + return dir; +} + +#endif // 0 + +// ---------------------------------------------------------------------------- +// Environment +// ---------------------------------------------------------------------------- + +#ifdef __WXOSX__ +#if wxOSX_USE_COCOA_OR_CARBON + #include +#endif +#endif + +bool wxGetEnvMap(wxEnvVariableHashMap *map) +{ + wxCHECK_MSG( map, false, wxS("output pointer can't be NULL") ); + +#if defined(__VISUALC__) + // This variable only exists to force the CRT to fill the wide char array, + // it might only have it in narrow char version until now as we use main() + // (and not _wmain()) as our entry point. + static wxChar* s_dummyEnvVar = _tgetenv(wxT("TEMP")); + + wxChar **env = _tenviron; +#elif defined(__VMS) + // Now this routine wil give false for OpenVMS + // TODO : should we do something with logicals? + char **env=NULL; +#elif defined(__DARWIN__) +#if wxOSX_USE_COCOA_OR_CARBON + // Under Mac shared libraries don't have access to the global environ + // variable so use this Mac-specific function instead as advised by + // environ(7) under Darwin + char ***penv = _NSGetEnviron(); + if ( !penv ) + return false; + char **env = *penv; +#else + char **env=NULL; + // todo translate NSProcessInfo environment into map +#endif +#else // non-MSVC non-Mac + // Not sure if other compilers have _tenviron so use the (more standard) + // ANSI version only for them. + + // Both POSIX and Single UNIX Specification say that this variable must + // exist but not that it must be declared anywhere and, indeed, it's not + // declared in several common systems (some BSDs, Solaris with native CC) + // so we (re)declare it ourselves to deal with these cases. However we do + // not do this under MSW where there can be DLL-related complications, i.e. + // the variable might be DLL-imported or not. Luckily we don't have to + // worry about this as all MSW compilers do seem to define it in their + // standard headers anyhow so we can just rely on already having the + // correct declaration. And if this turns out to be wrong, we can always + // add a configure test checking whether it is declared later. +#ifndef __WINDOWS__ + extern char **environ; +#endif // !__WINDOWS__ + + char **env = environ; +#endif + + if ( env ) + { + wxString name, + value; + while ( *env ) + { + const wxString var(*env); + + name = var.BeforeFirst(wxS('='), &value); + + (*map)[name] = value; + + env++; + } + + return true; + } + + return false; +} + +// ---------------------------------------------------------------------------- +// wxExecute +// ---------------------------------------------------------------------------- + +// wxDoExecuteWithCapture() helper: reads an entire stream into one array if +// the stream is non-NULL (it doesn't do anything if it's NULL). +// +// returns true if ok, false if error +#if wxUSE_STREAMS +static bool ReadAll(wxInputStream *is, wxArrayString& output) +{ + if ( !is ) + return true; + + // the stream could be already at EOF or in wxSTREAM_BROKEN_PIPE state + is->Reset(); + + // Notice that wxTextInputStream doesn't work correctly with wxConvAuto + // currently, see #14720, so use the current locale conversion explicitly + // under assumption that any external program should be using it too. + wxTextInputStream tis(*is, " \t" +#if wxUSE_UNICODE + , wxConvLibc +#endif + ); + + for ( ;; ) + { + wxString line = tis.ReadLine(); + + // check for EOF before other errors as it's not really an error + if ( is->Eof() ) + { + // add the last, possibly incomplete, line + if ( !line.empty() ) + output.Add(line); + break; + } + + // any other error is fatal + if ( !*is ) + return false; + + output.Add(line); + } + + return true; +} +#endif // wxUSE_STREAMS + +// this is a private function because it hasn't a clean interface: the first +// array is passed by reference, the second by pointer - instead we have 2 +// public versions of wxExecute() below +static long wxDoExecuteWithCapture(const wxString& command, + wxArrayString& output, + wxArrayString* error, + int flags, + const wxExecuteEnv *env) +{ + // create a wxProcess which will capture the output + wxProcess *process = new wxProcess; + process->Redirect(); + + long rc = wxExecute(command, wxEXEC_SYNC | flags, process, env); + +#if wxUSE_STREAMS + // Notice that while -1 indicates an error exit code for us, a program + // exiting with this code could still have written something to its stdout + // and, especially, stderr, so we still need to read from them. + if ( !ReadAll(process->GetInputStream(), output) ) + rc = -1; + + if ( error ) + { + if ( !ReadAll(process->GetErrorStream(), *error) ) + rc = -1; + } +#else + wxUnusedVar(output); + wxUnusedVar(error); +#endif // wxUSE_STREAMS/!wxUSE_STREAMS + + delete process; + + return rc; +} + +long wxExecute(const wxString& command, wxArrayString& output, int flags, + const wxExecuteEnv *env) +{ + return wxDoExecuteWithCapture(command, output, NULL, flags, env); +} + +long wxExecute(const wxString& command, + wxArrayString& output, + wxArrayString& error, + int flags, + const wxExecuteEnv *env) +{ + return wxDoExecuteWithCapture(command, output, &error, flags, env); +} + +// ---------------------------------------------------------------------------- +// Id functions +// ---------------------------------------------------------------------------- + +// Id generation +static int wxCurrentId = 100; + +int wxNewId() +{ + // skip the part of IDs space that contains hard-coded values: + if (wxCurrentId == wxID_LOWEST) + wxCurrentId = wxID_HIGHEST + 1; + + return wxCurrentId++; +} + +int +wxGetCurrentId(void) { return wxCurrentId; } + +void +wxRegisterId (int id) +{ + if (id >= wxCurrentId) + wxCurrentId = id + 1; +} + +// ---------------------------------------------------------------------------- +// wxQsort, adapted by RR to allow user_data +// ---------------------------------------------------------------------------- + +/* This file is part of the GNU C Library. + Written by Douglas C. Schmidt (schmidt@ics.uci.edu). + + Douglas Schmidt kindly gave permission to relicence the + code under the wxWindows licence: + +From: "Douglas C. Schmidt" +To: Robert Roebling +Subject: Re: qsort licence +Date: Mon, 23 Jul 2007 03:44:25 -0500 +Sender: schmidt@dre.vanderbilt.edu +Message-Id: <20070723084426.64F511000A8@tango.dre.vanderbilt.edu> + +Hi Robert, + +> [...] I'm asking if you'd be willing to relicence your code +> under the wxWindows licence. [...] + +That's fine with me [...] + +Thanks, + + Doug */ + + +/* Byte-wise swap two items of size SIZE. */ +#define SWAP(a, b, size) \ + do \ + { \ + size_t __size = (size); \ + char *__a = (a), *__b = (b); \ + do \ + { \ + char __tmp = *__a; \ + *__a++ = *__b; \ + *__b++ = __tmp; \ + } while (--__size > 0); \ + } while (0) + +/* Discontinue quicksort algorithm when partition gets below this size. + This particular magic number was chosen to work best on a Sun 4/260. */ +#define MAX_THRESH 4 + +/* Stack node declarations used to store unfulfilled partition obligations. */ +typedef struct + { + char *lo; + char *hi; + } stack_node; + +/* The next 4 #defines implement a very fast in-line stack abstraction. */ +#define STACK_SIZE (8 * sizeof(unsigned long int)) +#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top)) +#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi))) +#define STACK_NOT_EMPTY (stack < top) + + +/* Order size using quicksort. This implementation incorporates + four optimizations discussed in Sedgewick: + + 1. Non-recursive, using an explicit stack of pointer that store the + next array partition to sort. To save time, this maximum amount + of space required to store an array of MAX_INT is allocated on the + stack. Assuming a 32-bit integer, this needs only 32 * + sizeof(stack_node) == 136 bits. Pretty cheap, actually. + + 2. Chose the pivot element using a median-of-three decision tree. + This reduces the probability of selecting a bad pivot value and + eliminates certain extraneous comparisons. + + 3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving + insertion sort to order the MAX_THRESH items within each partition. + This is a big win, since insertion sort is faster for small, mostly + sorted array segments. + + 4. The larger of the two sub-partitions is always pushed onto the + stack first, with the algorithm then concentrating on the + smaller partition. This *guarantees* no more than log (n) + stack size is needed (actually O(1) in this case)! */ + +void wxQsort(void* pbase, size_t total_elems, + size_t size, wxSortCallback cmp, const void* user_data) +{ + char *base_ptr = (char *) pbase; + const size_t max_thresh = MAX_THRESH * size; + + if (total_elems == 0) + /* Avoid lossage with unsigned arithmetic below. */ + return; + + if (total_elems > MAX_THRESH) + { + char *lo = base_ptr; + char *hi = &lo[size * (total_elems - 1)]; + stack_node stack[STACK_SIZE]; + stack_node *top = stack; + + PUSH (NULL, NULL); + + while (STACK_NOT_EMPTY) + { + char *left_ptr; + char *right_ptr; + + /* Select median value from among LO, MID, and HI. Rearrange + LO and HI so the three values are sorted. This lowers the + probability of picking a pathological pivot value and + skips a comparison for both the LEFT_PTR and RIGHT_PTR. */ + + char *mid = lo + size * ((hi - lo) / size >> 1); + + if ((*cmp) ((void *) mid, (void *) lo, user_data) < 0) + SWAP (mid, lo, size); + if ((*cmp) ((void *) hi, (void *) mid, user_data) < 0) + SWAP (mid, hi, size); + else + goto jump_over; + if ((*cmp) ((void *) mid, (void *) lo, user_data) < 0) + SWAP (mid, lo, size); + jump_over:; + left_ptr = lo + size; + right_ptr = hi - size; + + /* Here's the famous ``collapse the walls'' section of quicksort. + Gotta like those tight inner loops! They are the main reason + that this algorithm runs much faster than others. */ + do + { + while ((*cmp) ((void *) left_ptr, (void *) mid, user_data) < 0) + left_ptr += size; + + while ((*cmp) ((void *) mid, (void *) right_ptr, user_data) < 0) + right_ptr -= size; + + if (left_ptr < right_ptr) + { + SWAP (left_ptr, right_ptr, size); + if (mid == left_ptr) + mid = right_ptr; + else if (mid == right_ptr) + mid = left_ptr; + left_ptr += size; + right_ptr -= size; + } + else if (left_ptr == right_ptr) + { + left_ptr += size; + right_ptr -= size; + break; + } + } + while (left_ptr <= right_ptr); + + /* Set up pointers for next iteration. First determine whether + left and right partitions are below the threshold size. If so, + ignore one or both. Otherwise, push the larger partition's + bounds on the stack and continue sorting the smaller one. */ + + if ((size_t) (right_ptr - lo) <= max_thresh) + { + if ((size_t) (hi - left_ptr) <= max_thresh) + /* Ignore both small partitions. */ + POP (lo, hi); + else + /* Ignore small left partition. */ + lo = left_ptr; + } + else if ((size_t) (hi - left_ptr) <= max_thresh) + /* Ignore small right partition. */ + hi = right_ptr; + else if ((right_ptr - lo) > (hi - left_ptr)) + { + /* Push larger left partition indices. */ + PUSH (lo, right_ptr); + lo = left_ptr; + } + else + { + /* Push larger right partition indices. */ + PUSH (left_ptr, hi); + hi = right_ptr; + } + } + } + + /* Once the BASE_PTR array is partially sorted by quicksort the rest + is completely sorted using insertion sort, since this is efficient + for partitions below MAX_THRESH size. BASE_PTR points to the beginning + of the array to sort, and END_PTR points at the very last element in + the array (*not* one beyond it!). */ + + { + char *const end_ptr = &base_ptr[size * (total_elems - 1)]; + char *tmp_ptr = base_ptr; + char *thresh = base_ptr + max_thresh; + if ( thresh > end_ptr ) + thresh = end_ptr; + char *run_ptr; + + /* Find smallest element in first threshold and place it at the + array's beginning. This is the smallest array element, + and the operation speeds up insertion sort's inner loop. */ + + for (run_ptr = tmp_ptr + size; run_ptr <= thresh; run_ptr += size) + if ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, user_data) < 0) + tmp_ptr = run_ptr; + + if (tmp_ptr != base_ptr) + SWAP (tmp_ptr, base_ptr, size); + + /* Insertion sort, running from left-hand-side up to right-hand-side. */ + + run_ptr = base_ptr + size; + while ((run_ptr += size) <= end_ptr) + { + tmp_ptr = run_ptr - size; + while ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, user_data) < 0) + tmp_ptr -= size; + + tmp_ptr += size; + if (tmp_ptr != run_ptr) + { + char *trav; + + trav = run_ptr + size; + while (--trav >= run_ptr) + { + char c = *trav; + char *hi, *lo; + + for (hi = lo = trav; (lo -= size) >= tmp_ptr; hi = lo) + *hi = *lo; + *hi = c; + } + } + } + } +} + +#endif // wxUSE_BASE + + + +// ============================================================================ +// GUI-only functions from now on +// ============================================================================ + +#if wxUSE_GUI + +// this function is only really implemented for X11-based ports, including GTK1 +// (GTK2 sets detectable auto-repeat automatically anyhow) +#if !(defined(__WXX11__) || defined(__WXMOTIF__) || \ + (defined(__WXGTK__) && !defined(__WXGTK20__))) +bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) ) +{ + return true; +} +#endif // !X11-based port + +// ---------------------------------------------------------------------------- +// Launch default browser +// ---------------------------------------------------------------------------- + +#if defined(__WINDOWS__) + +// implemented in a port-specific utils source file: +bool wxDoLaunchDefaultBrowser(const wxString& url, const wxString& scheme, int flags); + +#elif defined(__WXX11__) || defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXCOCOA__) || \ + (defined(__WXOSX__) ) + +// implemented in a port-specific utils source file: +bool wxDoLaunchDefaultBrowser(const wxString& url, int flags); + +#else + +// a "generic" implementation: +bool wxDoLaunchDefaultBrowser(const wxString& url, int flags) +{ + // on other platforms try to use mime types or wxExecute... + + bool ok = false; + wxString cmd; + +#if wxUSE_MIMETYPE + wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(wxT("html")); + if ( ft ) + { + wxString mt; + ft->GetMimeType(&mt); + + ok = ft->GetOpenCommand(&cmd, wxFileType::MessageParameters(url)); + delete ft; + } +#endif // wxUSE_MIMETYPE + + if ( !ok || cmd.empty() ) + { + // fallback to checking for the BROWSER environment variable + if ( !wxGetEnv(wxT("BROWSER"), &cmd) || cmd.empty() ) + cmd << wxT(' ') << url; + } + + ok = ( !cmd.empty() && wxExecute(cmd) ); + if (ok) + return ok; + + // no file type for HTML extension + wxLogError(_("No default application configured for HTML files.")); + + return false; +} +#endif + +static bool DoLaunchDefaultBrowserHelper(const wxString& urlOrig, int flags) +{ + // NOTE: we don't have to care about the wxBROWSER_NOBUSYCURSOR flag + // as it was already handled by wxLaunchDefaultBrowser + + wxUnusedVar(flags); + + wxString url(urlOrig), scheme; + wxURI uri(url); + + // this check is useful to avoid that wxURI recognizes as scheme parts of + // the filename, in case urlOrig is a local filename + // (e.g. "C:\\test.txt" when parsed by wxURI reports a scheme == "C") + bool hasValidScheme = uri.HasScheme() && uri.GetScheme().length() > 1; + +#if defined(__WINDOWS__) + + // NOTE: when testing wxMSW's wxLaunchDefaultBrowser all possible forms + // of the URL/flags should be tested; e.g.: + // + // for (int i=0; i<2; i++) + // { + // // test arguments without a valid URL scheme: + // wxLaunchDefaultBrowser("C:\\test.txt", i==0 ? 0 : wxBROWSER_NEW_WINDOW); + // wxLaunchDefaultBrowser("wxwidgets.org", i==0 ? 0 : wxBROWSER_NEW_WINDOW); + // + // // test arguments with different valid schemes: + // wxLaunchDefaultBrowser("file:/C%3A/test.txt", i==0 ? 0 : wxBROWSER_NEW_WINDOW); + // wxLaunchDefaultBrowser("http://wxwidgets.org", i==0 ? 0 : wxBROWSER_NEW_WINDOW); + // wxLaunchDefaultBrowser("mailto:user@host.org", i==0 ? 0 : wxBROWSER_NEW_WINDOW); + // } + // (assuming you have a C:\test.txt file) + + if ( !hasValidScheme ) + { + if (wxFileExists(urlOrig) || wxDirExists(urlOrig)) + { + scheme = "file"; + // do not prepend the file scheme to the URL as ShellExecuteEx() doesn't like it + } + else + { + url.Prepend(wxS("http://")); + scheme = "http"; + } + } + else if ( hasValidScheme ) + { + scheme = uri.GetScheme(); + + if ( uri.GetScheme() == "file" ) + { + // TODO: extract URLToFileName() to some always compiled in + // function +#if wxUSE_FILESYSTEM + // ShellExecuteEx() doesn't like the "file" scheme when opening local files; + // remove it + url = wxFileSystem::URLToFileName(url).GetFullPath(); +#endif // wxUSE_FILESYSTEM + } + } + + if (wxDoLaunchDefaultBrowser(url, scheme, flags)) + return true; + //else: call wxLogSysError +#else + if ( !hasValidScheme ) + { + // set the scheme of url to "http" or "file" if it does not have one + if (wxFileExists(urlOrig) || wxDirExists(urlOrig)) + url.Prepend(wxS("file://")); + else + url.Prepend(wxS("http://")); + } + + if (wxDoLaunchDefaultBrowser(url, flags)) + return true; + //else: call wxLogSysError +#endif + + wxLogSysError(_("Failed to open URL \"%s\" in default browser."), + url.c_str()); + + return false; +} + +bool wxLaunchDefaultBrowser(const wxString& url, int flags) +{ + // NOTE: as documented, "url" may be both a real well-formed URL + // and a local file name + + if ( flags & wxBROWSER_NOBUSYCURSOR ) + return DoLaunchDefaultBrowserHelper(url, flags); + + wxBusyCursor bc; + return DoLaunchDefaultBrowserHelper(url, flags); +} + +// ---------------------------------------------------------------------------- +// Menu accelerators related functions +// ---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_6 +wxChar *wxStripMenuCodes(const wxChar *in, wxChar *out) +{ +#if wxUSE_MENUS + wxString s = wxMenuItem::GetLabelText(in); +#else + wxString str(in); + wxString s = wxStripMenuCodes(str); +#endif // wxUSE_MENUS + if ( out ) + { + // go smash their buffer if it's not big enough - I love char * params + memcpy(out, s.c_str(), s.length() * sizeof(wxChar)); + } + else + { + out = new wxChar[s.length() + 1]; + wxStrcpy(out, s.c_str()); + } + + return out; +} +#endif + +wxString wxStripMenuCodes(const wxString& in, int flags) +{ + wxASSERT_MSG( flags, wxT("this is useless to call without any flags") ); + + wxString out; + + size_t len = in.length(); + out.reserve(len); + + for ( wxString::const_iterator it = in.begin(); it != in.end(); ++it ) + { + wxChar ch = *it; + if ( (flags & wxStrip_Mnemonics) && ch == wxT('&') ) + { + // skip it, it is used to introduce the accel char (or to quote + // itself in which case it should still be skipped): note that it + // can't be the last character of the string + if ( ++it == in.end() ) + { + wxLogDebug(wxT("Invalid menu string '%s'"), in.c_str()); + break; + } + else + { + // use the next char instead + ch = *it; + } + } + else if ( (flags & wxStrip_Accel) && ch == wxT('\t') ) + { + // everything after TAB is accel string, exit the loop + break; + } + + out += ch; + } + + return out; +} + +// ---------------------------------------------------------------------------- +// Window search functions +// ---------------------------------------------------------------------------- + +/* + * If parent is non-NULL, look through children for a label or title + * matching the specified string. If NULL, look through all top-level windows. + * + */ + +wxWindow * +wxFindWindowByLabel (const wxString& title, wxWindow * parent) +{ + return wxWindow::FindWindowByLabel( title, parent ); +} + + +/* + * If parent is non-NULL, look through children for a name + * matching the specified string. If NULL, look through all top-level windows. + * + */ + +wxWindow * +wxFindWindowByName (const wxString& name, wxWindow * parent) +{ + return wxWindow::FindWindowByName( name, parent ); +} + +// Returns menu item id or wxNOT_FOUND if none. +int +wxFindMenuItemId(wxFrame *frame, + const wxString& menuString, + const wxString& itemString) +{ +#if wxUSE_MENUS + wxMenuBar *menuBar = frame->GetMenuBar (); + if ( menuBar ) + return menuBar->FindMenuItem (menuString, itemString); +#else // !wxUSE_MENUS + wxUnusedVar(frame); + wxUnusedVar(menuString); + wxUnusedVar(itemString); +#endif // wxUSE_MENUS/!wxUSE_MENUS + + return wxNOT_FOUND; +} + +// Try to find the deepest child that contains 'pt'. +// We go backwards, to try to allow for controls that are spacially +// within other controls, but are still siblings (e.g. buttons within +// static boxes). Static boxes are likely to be created _before_ controls +// that sit inside them. +wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt) +{ + if (!win->IsShown()) + return NULL; + + // Hack for wxNotebook case: at least in wxGTK, all pages + // claim to be shown, so we must only deal with the selected one. +#if wxUSE_NOTEBOOK + if (wxDynamicCast(win, wxNotebook)) + { + wxNotebook* nb = (wxNotebook*) win; + int sel = nb->GetSelection(); + if (sel >= 0) + { + wxWindow* child = nb->GetPage(sel); + wxWindow* foundWin = wxFindWindowAtPoint(child, pt); + if (foundWin) + return foundWin; + } + } +#endif + + wxWindowList::compatibility_iterator node = win->GetChildren().GetLast(); + while (node) + { + wxWindow* child = node->GetData(); + wxWindow* foundWin = wxFindWindowAtPoint(child, pt); + if (foundWin) + return foundWin; + node = node->GetPrevious(); + } + + wxPoint pos = win->GetPosition(); + wxSize sz = win->GetSize(); + if ( !win->IsTopLevel() && win->GetParent() ) + { + pos = win->GetParent()->ClientToScreen(pos); + } + + wxRect rect(pos, sz); + if (rect.Contains(pt)) + return win; + + return NULL; +} + +wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt) +{ + // Go backwards through the list since windows + // on top are likely to have been appended most + // recently. + wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetLast(); + while (node) + { + wxWindow* win = node->GetData(); + wxWindow* found = wxFindWindowAtPoint(win, pt); + if (found) + return found; + node = node->GetPrevious(); + } + return NULL; +} + +// ---------------------------------------------------------------------------- +// GUI helpers +// ---------------------------------------------------------------------------- + +/* + * N.B. these convenience functions must be separate from msgdlgg.cpp, textdlgg.cpp + * since otherwise the generic code may be pulled in unnecessarily. + */ + +#if wxUSE_MSGDLG + +int wxMessageBox(const wxString& message, const wxString& caption, long style, + wxWindow *parent, int WXUNUSED(x), int WXUNUSED(y) ) +{ + // add the appropriate icon unless this was explicitly disabled by use of + // wxICON_NONE + if ( !(style & wxICON_NONE) && !(style & wxICON_MASK) ) + { + style |= style & wxYES ? wxICON_QUESTION : wxICON_INFORMATION; + } + + wxMessageDialog dialog(parent, message, caption, style); + + int ans = dialog.ShowModal(); + switch ( ans ) + { + case wxID_OK: + return wxOK; + case wxID_YES: + return wxYES; + case wxID_NO: + return wxNO; + case wxID_CANCEL: + return wxCANCEL; + case wxID_HELP: + return wxHELP; + } + + wxFAIL_MSG( wxT("unexpected return code from wxMessageDialog") ); + + return wxCANCEL; +} + +wxVersionInfo wxGetLibraryVersionInfo() +{ + // don't translate these strings, they're for diagnostics purposes only + wxString msg; + msg.Printf(wxS("wxWidgets Library (%s port)\n") + wxS("Version %d.%d.%d (Unicode: %s, debug level: %d),\n") + wxS("compiled at %s %s\n\n") + wxS("Runtime version of toolkit used is %d.%d.\n"), + wxPlatformInfo::Get().GetPortIdName(), + wxMAJOR_VERSION, + wxMINOR_VERSION, + wxRELEASE_NUMBER, +#if wxUSE_UNICODE_UTF8 + "UTF-8", +#elif wxUSE_UNICODE + "wchar_t", +#else + "none", +#endif + wxDEBUG_LEVEL, + __TDATE__, + __TTIME__, + wxPlatformInfo::Get().GetToolkitMajorVersion(), + wxPlatformInfo::Get().GetToolkitMinorVersion() + ); + +#ifdef __WXGTK__ + msg += wxString::Format("Compile-time GTK+ version is %d.%d.%d.\n", + GTK_MAJOR_VERSION, + GTK_MINOR_VERSION, + GTK_MICRO_VERSION); +#endif // __WXGTK__ + + return wxVersionInfo(wxS("wxWidgets"), + wxMAJOR_VERSION, + wxMINOR_VERSION, + wxRELEASE_NUMBER, + msg, + wxS("Copyright (c) 1995-2013 wxWidgets team")); +} + +void wxInfoMessageBox(wxWindow* parent) +{ + wxVersionInfo info = wxGetLibraryVersionInfo(); + wxString msg = info.ToString(); + + msg << wxS("\n") << info.GetCopyright(); + + wxMessageBox(msg, wxT("wxWidgets information"), + wxICON_INFORMATION | wxOK, + parent); +} + +#endif // wxUSE_MSGDLG + +#if wxUSE_TEXTDLG + +wxString wxGetTextFromUser(const wxString& message, const wxString& caption, + const wxString& defaultValue, wxWindow *parent, + wxCoord x, wxCoord y, bool centre ) +{ + wxString str; + long style = wxTextEntryDialogStyle; + + if (centre) + style |= wxCENTRE; + else + style &= ~wxCENTRE; + + wxTextEntryDialog dialog(parent, message, caption, defaultValue, style, wxPoint(x, y)); + + if (dialog.ShowModal() == wxID_OK) + { + str = dialog.GetValue(); + } + + return str; +} + +wxString wxGetPasswordFromUser(const wxString& message, + const wxString& caption, + const wxString& defaultValue, + wxWindow *parent, + wxCoord x, wxCoord y, bool centre ) +{ + wxString str; + long style = wxTextEntryDialogStyle; + + if (centre) + style |= wxCENTRE; + else + style &= ~wxCENTRE; + + wxPasswordEntryDialog dialog(parent, message, caption, defaultValue, + style, wxPoint(x, y)); + if ( dialog.ShowModal() == wxID_OK ) + { + str = dialog.GetValue(); + } + + return str; +} + +#endif // wxUSE_TEXTDLG + +// ---------------------------------------------------------------------------- +// wxSafeYield and supporting functions +// ---------------------------------------------------------------------------- + +void wxEnableTopLevelWindows(bool enable) +{ + wxWindowList::compatibility_iterator node; + for ( node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() ) + node->GetData()->Enable(enable); +} + +#if defined(__WXOSX__) && wxOSX_USE_COCOA + +// defined in evtloop.mm + +#else + +wxWindowDisabler::wxWindowDisabler(bool disable) +{ + m_disabled = disable; + if ( disable ) + DoDisable(); +} + +wxWindowDisabler::wxWindowDisabler(wxWindow *winToSkip) +{ + m_disabled = true; + DoDisable(winToSkip); +} + +void wxWindowDisabler::DoDisable(wxWindow *winToSkip) +{ + // remember the top level windows which were already disabled, so that we + // don't reenable them later + m_winDisabled = NULL; + + wxWindowList::compatibility_iterator node; + for ( node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() ) + { + wxWindow *winTop = node->GetData(); + if ( winTop == winToSkip ) + continue; + + // we don't need to disable the hidden or already disabled windows + if ( winTop->IsEnabled() && winTop->IsShown() ) + { + winTop->Disable(); + } + else + { + if ( !m_winDisabled ) + { + m_winDisabled = new wxWindowList; + } + + m_winDisabled->Append(winTop); + } + } +} + +wxWindowDisabler::~wxWindowDisabler() +{ + if ( !m_disabled ) + return; + + wxWindowList::compatibility_iterator node; + for ( node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() ) + { + wxWindow *winTop = node->GetData(); + if ( !m_winDisabled || !m_winDisabled->Find(winTop) ) + { + winTop->Enable(); + } + //else: had been already disabled, don't reenable + } + + delete m_winDisabled; +} + +#endif + +// Yield to other apps/messages and disable user input to all windows except +// the given one +bool wxSafeYield(wxWindow *win, bool onlyIfNeeded) +{ + wxWindowDisabler wd(win); + + bool rc; + if (onlyIfNeeded) + rc = wxYieldIfNeeded(); + else + rc = wxYield(); + + return rc; +} + +// ---------------------------------------------------------------------------- +// wxApp::Yield() wrappers for backwards compatibility +// ---------------------------------------------------------------------------- + +bool wxYield() +{ + return wxTheApp && wxTheApp->Yield(); +} + +bool wxYieldIfNeeded() +{ + return wxTheApp && wxTheApp->Yield(true); +} + +#endif // wxUSE_GUI diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/valgen.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/valgen.cpp new file mode 100644 index 0000000000..19c26df510 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/valgen.cpp @@ -0,0 +1,711 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/valgen.cpp +// Purpose: wxGenericValidator class +// Author: Kevin Smith +// Modified by: +// Created: Jan 22 1999 +// Copyright: (c) 1999 Kevin Smith +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_VALIDATORS + +#ifndef WX_PRECOMP + #include "wx/dynarray.h" + #include "wx/utils.h" + #include "wx/intl.h" + #include "wx/choice.h" + #include "wx/combobox.h" + #include "wx/radiobox.h" + #include "wx/radiobut.h" + #include "wx/checkbox.h" + #include "wx/scrolbar.h" + #include "wx/gauge.h" + #include "wx/stattext.h" + #include "wx/textctrl.h" + #include "wx/button.h" + #include "wx/listbox.h" + #include "wx/slider.h" + #include "wx/checklst.h" +#endif + +#include "wx/spinctrl.h" +// #include "wx/datectrl.h" -- can't use it in this (core) file for now + +#if wxUSE_SPINBTN + #include "wx/spinbutt.h" +#endif +#if wxUSE_TOGGLEBTN + #include "wx/tglbtn.h" +#endif +#include "wx/filename.h" + +#include "wx/valgen.h" + +IMPLEMENT_CLASS(wxGenericValidator, wxValidator) + +wxGenericValidator::wxGenericValidator(bool *val) +{ + Initialize(); + m_pBool = val; +} + +wxGenericValidator::wxGenericValidator(int *val) +{ + Initialize(); + m_pInt = val; +} + +wxGenericValidator::wxGenericValidator(wxString *val) +{ + Initialize(); + m_pString = val; +} + +wxGenericValidator::wxGenericValidator(wxArrayInt *val) +{ + Initialize(); + m_pArrayInt = val; +} + +#if wxUSE_DATETIME + +wxGenericValidator::wxGenericValidator(wxDateTime *val) +{ + Initialize(); + m_pDateTime = val; +} + +#endif // wxUSE_DATETIME + +wxGenericValidator::wxGenericValidator(wxFileName *val) +{ + Initialize(); + m_pFileName = val; +} + +wxGenericValidator::wxGenericValidator(float *val) +{ + Initialize(); + m_pFloat = val; +} + +wxGenericValidator::wxGenericValidator(double *val) +{ + Initialize(); + m_pDouble = val; +} + +wxGenericValidator::wxGenericValidator(const wxGenericValidator& val) + : wxValidator() +{ + Copy(val); +} + +bool wxGenericValidator::Copy(const wxGenericValidator& val) +{ + wxValidator::Copy(val); + + m_pBool = val.m_pBool; + m_pInt = val.m_pInt; + m_pString = val.m_pString; + m_pArrayInt = val.m_pArrayInt; +#if wxUSE_DATETIME + m_pDateTime = val.m_pDateTime; +#endif // wxUSE_DATETIME + m_pFileName = val.m_pFileName; + m_pFloat = val.m_pFloat; + m_pDouble = val.m_pDouble; + + return true; +} + +// Called to transfer data to the window +bool wxGenericValidator::TransferToWindow(void) +{ + if ( !m_validatorWindow ) + return false; + + // bool controls +#if wxUSE_CHECKBOX + if (wxDynamicCast(m_validatorWindow, wxCheckBox)) + { + wxCheckBox* pControl = (wxCheckBox*) m_validatorWindow; + if (m_pBool) + { + pControl->SetValue(*m_pBool); + return true; + } + } else +#endif +#if wxUSE_RADIOBTN + if (wxDynamicCast(m_validatorWindow, wxRadioButton)) + { + wxRadioButton* pControl = (wxRadioButton*) m_validatorWindow; + if (m_pBool) + { + pControl->SetValue(*m_pBool) ; + return true; + } + } else +#endif + +#if wxUSE_TOGGLEBTN + if (wxDynamicCast(m_validatorWindow, wxToggleButton)) + { + wxToggleButton * pControl = (wxToggleButton *) m_validatorWindow; + if (m_pBool) + { + pControl->SetValue(*m_pBool); + return true; + } + } else +#if (defined(__WXMAC__) || defined(__WXMSW__) || defined(__WXGTK20__)) && !defined(__WXUNIVERSAL__) + if (wxDynamicCast(m_validatorWindow, wxBitmapToggleButton)) + { + wxBitmapToggleButton * pControl = (wxBitmapToggleButton *) m_validatorWindow; + if (m_pBool) + { + pControl->SetValue(*m_pBool); + return true; + } + } else +#endif +#endif + + // int controls +#if wxUSE_GAUGE + if (wxDynamicCast(m_validatorWindow, wxGauge)) + { + wxGauge* pControl = (wxGauge*) m_validatorWindow; + if (m_pInt) + { + pControl->SetValue(*m_pInt); + return true; + } + } else +#endif +#if wxUSE_RADIOBOX + if (wxDynamicCast(m_validatorWindow, wxRadioBox)) + { + wxRadioBox* pControl = (wxRadioBox*) m_validatorWindow; + if (m_pInt) + { + pControl->SetSelection(*m_pInt) ; + return true; + } + } else +#endif +#if wxUSE_SCROLLBAR + if (wxDynamicCast(m_validatorWindow, wxScrollBar)) + { + wxScrollBar* pControl = (wxScrollBar*) m_validatorWindow; + if (m_pInt) + { + pControl->SetThumbPosition(*m_pInt) ; + return true; + } + } else +#endif +#if wxUSE_SPINCTRL && !defined(__WXMOTIF__) + if (wxDynamicCast(m_validatorWindow, wxSpinCtrl)) + { + wxSpinCtrl* pControl = (wxSpinCtrl*) m_validatorWindow; + if (m_pInt) + { + pControl->SetValue(*m_pInt); + return true; + } + } else +#endif +#if wxUSE_SPINBTN + if (wxDynamicCast(m_validatorWindow, wxSpinButton)) + { + wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow; + if (m_pInt) + { + pControl->SetValue(*m_pInt) ; + return true; + } + } else +#endif +#if wxUSE_SLIDER + if (wxDynamicCast(m_validatorWindow, wxSlider)) + { + wxSlider* pControl = (wxSlider*) m_validatorWindow; + if (m_pInt) + { + pControl->SetValue(*m_pInt) ; + return true; + } + } else +#endif + + // date time controls +#if 0 // wxUSE_DATEPICKCTRL -- temporary fix for shared build linking + if (wxDynamicCast(m_validatorWindow, wxDatePickerCtrl)) + { + wxDatePickerCtrl* pControl = (wxDatePickerCtrl*) m_validatorWindow; + if (m_pDateTime) + { + pControl->SetValue(*m_pDateTime) ; + return true; + } + } else +#endif + + // string controls +#if wxUSE_BUTTON + if (wxDynamicCast(m_validatorWindow, wxButton)) + { + wxButton* pControl = (wxButton*) m_validatorWindow; + if (m_pString) + { + pControl->SetLabel(*m_pString) ; + return true; + } + } else +#endif +#if wxUSE_COMBOBOX + if (wxDynamicCast(m_validatorWindow, wxComboBox)) + { + wxComboBox* pControl = (wxComboBox*) m_validatorWindow; + if (m_pInt) + { + pControl->SetSelection(*m_pInt) ; + return true; + } + else if (m_pString) + { + if (pControl->FindString(* m_pString) != wxNOT_FOUND) + { + pControl->SetStringSelection(* m_pString); + } + if ((m_validatorWindow->GetWindowStyle() & wxCB_READONLY) == 0) + { + pControl->SetValue(* m_pString); + } + return true; + } + } else +#endif +#if wxUSE_CHOICE + if (wxDynamicCast(m_validatorWindow, wxChoice)) + { + wxChoice* pControl = (wxChoice*) m_validatorWindow; + if (m_pInt) + { + pControl->SetSelection(*m_pInt) ; + return true; + } + else if (m_pString) + { + if (pControl->FindString(* m_pString) != wxNOT_FOUND) + { + pControl->SetStringSelection(* m_pString); + } + return true; + } + } else +#endif +#if wxUSE_STATTEXT + if (wxDynamicCast(m_validatorWindow, wxStaticText)) + { + wxStaticText* pControl = (wxStaticText*) m_validatorWindow; + if (m_pString) + { + pControl->SetLabel(*m_pString) ; + return true; + } + } else +#endif +#if wxUSE_TEXTCTRL + if (wxDynamicCast(m_validatorWindow, wxTextCtrl)) + { + wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow; + if (m_pString) + { + pControl->SetValue(*m_pString) ; + return true; + } + else if (m_pInt) + { + wxString str; + str.Printf(wxT("%d"), *m_pInt); + pControl->SetValue(str); + return true; + } + else if (m_pFileName) + { + pControl->SetValue(m_pFileName->GetFullPath()); + return true; + } + else if (m_pFloat) + { + pControl->SetValue(wxString::Format(wxT("%g"), *m_pFloat)); + return true; + } + else if (m_pDouble) + { + pControl->SetValue(wxString::Format(wxT("%g"), *m_pDouble)); + return true; + } + } else +#endif + + // array controls +#if wxUSE_CHECKLISTBOX + // NOTE: wxCheckListBox is a wxListBox, so wxCheckListBox MUST come first: + if (wxDynamicCast(m_validatorWindow, wxCheckListBox)) + { + wxCheckListBox* pControl = (wxCheckListBox*) m_validatorWindow; + if (m_pArrayInt) + { + // clear all selections + size_t i, + count = pControl->GetCount(); + for ( i = 0 ; i < count; i++ ) + pControl->Check(i, false); + + // select each item in our array + count = m_pArrayInt->GetCount(); + for ( i = 0 ; i < count; i++ ) + pControl->Check(m_pArrayInt->Item(i)); + + return true; + } + else + return false; + } else +#endif +#if wxUSE_LISTBOX + if (wxDynamicCast(m_validatorWindow, wxListBox)) + { + wxListBox* pControl = (wxListBox*) m_validatorWindow; + if (m_pArrayInt) + { + // clear all selections + size_t i, + count = pControl->GetCount(); + for ( i = 0 ; i < count; i++ ) + pControl->Deselect(i); + + // select each item in our array + count = m_pArrayInt->GetCount(); + for ( i = 0 ; i < count; i++ ) + pControl->SetSelection(m_pArrayInt->Item(i)); + + return true; + } + } else +#endif + { // to match the last 'else' above + } + + // unrecognized control, or bad pointer + return false; +} + +// Called to transfer data from the window +bool wxGenericValidator::TransferFromWindow(void) +{ + if ( !m_validatorWindow ) + return false; + + // BOOL CONTROLS ************************************** +#if wxUSE_CHECKBOX + if (wxDynamicCast(m_validatorWindow, wxCheckBox)) + { + wxCheckBox* pControl = (wxCheckBox*) m_validatorWindow; + if (m_pBool) + { + *m_pBool = pControl->GetValue() ; + return true; + } + } else +#endif +#if wxUSE_RADIOBTN + if (wxDynamicCast(m_validatorWindow, wxRadioButton)) + { + wxRadioButton* pControl = (wxRadioButton*) m_validatorWindow; + if (m_pBool) + { + *m_pBool = pControl->GetValue() ; + return true; + } + } else +#endif +#if wxUSE_TOGGLEBTN + if (wxDynamicCast(m_validatorWindow, wxToggleButton)) + { + wxToggleButton *pControl = (wxToggleButton *) m_validatorWindow; + if (m_pBool) + { + *m_pBool = pControl->GetValue() ; + return true; + } + } else +#if (defined(__WXMAC__) || defined(__WXMSW__) || defined(__WXGTK20__)) && !defined(__WXUNIVERSAL__) + if (wxDynamicCast(m_validatorWindow, wxBitmapToggleButton)) + { + wxBitmapToggleButton *pControl = (wxBitmapToggleButton *) m_validatorWindow; + if (m_pBool) + { + *m_pBool = pControl->GetValue() ; + return true; + } + } else +#endif +#endif + + // INT CONTROLS *************************************** +#if wxUSE_GAUGE + if (wxDynamicCast(m_validatorWindow, wxGauge)) + { + wxGauge* pControl = (wxGauge*) m_validatorWindow; + if (m_pInt) + { + *m_pInt = pControl->GetValue() ; + return true; + } + } else +#endif +#if wxUSE_RADIOBOX + if (wxDynamicCast(m_validatorWindow, wxRadioBox)) + { + wxRadioBox* pControl = (wxRadioBox*) m_validatorWindow; + if (m_pInt) + { + *m_pInt = pControl->GetSelection() ; + return true; + } + } else +#endif +#if wxUSE_SCROLLBAR + if (wxDynamicCast(m_validatorWindow, wxScrollBar)) + { + wxScrollBar* pControl = (wxScrollBar*) m_validatorWindow; + if (m_pInt) + { + *m_pInt = pControl->GetThumbPosition() ; + return true; + } + } else +#endif +#if wxUSE_SPINCTRL && !defined(__WXMOTIF__) + if (wxDynamicCast(m_validatorWindow, wxSpinCtrl)) + { + wxSpinCtrl* pControl = (wxSpinCtrl*) m_validatorWindow; + if (m_pInt) + { + *m_pInt=pControl->GetValue(); + return true; + } + } else +#endif +#if wxUSE_SPINBTN + if (wxDynamicCast(m_validatorWindow, wxSpinButton)) + { + wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow; + if (m_pInt) + { + *m_pInt = pControl->GetValue() ; + return true; + } + } else +#endif +#if wxUSE_SLIDER + if (wxDynamicCast(m_validatorWindow, wxSlider)) + { + wxSlider* pControl = (wxSlider*) m_validatorWindow; + if (m_pInt) + { + *m_pInt = pControl->GetValue() ; + return true; + } + } else +#endif + + // DATE TIME CONTROLS ************************************ +#if 0 // wxUSE_DATEPICKCTRL -- temporary fix for shared build linking + if (wxDynamicCast(m_validatorWindow, wxDatePickerCtrl)) + { + wxDatePickerCtrl* pControl = (wxDatePickerCtrl*) m_validatorWindow; + if (m_pDateTime) + { + *m_pDateTime = pControl->GetValue() ; + return true; + } + } else +#endif + + // STRING CONTROLS ************************************ +#if wxUSE_BUTTON + if (wxDynamicCast(m_validatorWindow, wxButton)) + { + wxButton* pControl = (wxButton*) m_validatorWindow; + if (m_pString) + { + *m_pString = pControl->GetLabel() ; + return true; + } + } else +#endif +#if wxUSE_COMBOBOX + if (wxDynamicCast(m_validatorWindow, wxComboBox)) + { + wxComboBox* pControl = (wxComboBox*) m_validatorWindow; + if (m_pInt) + { + *m_pInt = pControl->GetSelection() ; + return true; + } + else if (m_pString) + { + if (m_validatorWindow->GetWindowStyle() & wxCB_READONLY) + *m_pString = pControl->GetStringSelection(); + else + *m_pString = pControl->GetValue(); + return true; + } + } else +#endif +#if wxUSE_CHOICE + if (wxDynamicCast(m_validatorWindow, wxChoice)) + { + wxChoice* pControl = (wxChoice*) m_validatorWindow; + if (m_pInt) + { + *m_pInt = pControl->GetSelection() ; + return true; + } + else if (m_pString) + { + *m_pString = pControl->GetStringSelection(); + return true; + } + } else +#endif +#if wxUSE_STATTEXT + if (wxDynamicCast(m_validatorWindow, wxStaticText)) + { + wxStaticText* pControl = (wxStaticText*) m_validatorWindow; + if (m_pString) + { + *m_pString = pControl->GetLabel() ; + return true; + } + } else +#endif +#if wxUSE_TEXTCTRL + if (wxDynamicCast(m_validatorWindow, wxTextCtrl)) + { + wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow; + if (m_pString) + { + *m_pString = pControl->GetValue() ; + return true; + } + else if (m_pInt) + { + *m_pInt = wxAtoi(pControl->GetValue()); + return true; + } + else if (m_pFileName) + { + m_pFileName->Assign(pControl->GetValue()); + return true; + } + else if (m_pFloat) + { + *m_pFloat = (float)wxAtof(pControl->GetValue()); + return true; + } + else if (m_pDouble) + { + *m_pDouble = wxAtof(pControl->GetValue()); + return true; + } + } else +#endif + + // ARRAY CONTROLS ************************************* +#if wxUSE_CHECKLISTBOX + // NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox MUST come first: + if (wxDynamicCast(m_validatorWindow, wxCheckListBox)) + { + wxCheckListBox* pControl = (wxCheckListBox*) m_validatorWindow; + if (m_pArrayInt) + { + // clear our array + m_pArrayInt->Clear(); + + // add each selected item to our array + size_t i, + count = pControl->GetCount(); + for ( i = 0; i < count; i++ ) + { + if (pControl->IsChecked(i)) + m_pArrayInt->Add(i); + } + + return true; + } + else + return false; + } else +#endif +#if wxUSE_LISTBOX + if (wxDynamicCast(m_validatorWindow, wxListBox)) + { + wxListBox* pControl = (wxListBox*) m_validatorWindow; + if (m_pArrayInt) + { + // clear our array + m_pArrayInt->Clear(); + + // add each selected item to our array + size_t i, + count = pControl->GetCount(); + for ( i = 0; i < count; i++ ) + { + if (pControl->IsSelected(i)) + m_pArrayInt->Add(i); + } + + return true; + } + } else +#endif + + // unrecognized control, or bad pointer + return false; + + return false; +} + +/* + Called by constructors to initialize ALL data members +*/ +void wxGenericValidator::Initialize() +{ + m_pBool = NULL; + m_pInt = NULL; + m_pString = NULL; + m_pArrayInt = NULL; +#if wxUSE_DATETIME + m_pDateTime = NULL; +#endif // wxUSE_DATETIME + m_pFileName = NULL; + m_pFloat = NULL; + m_pDouble = NULL; +} + +#endif // wxUSE_VALIDATORS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/validate.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/validate.cpp new file mode 100644 index 0000000000..306cac028d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/validate.cpp @@ -0,0 +1,44 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/validate.cpp +// Purpose: wxValidator +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_VALIDATORS + +#include "wx/validate.h" + +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif + +const wxValidator wxDefaultValidator; + +IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler) + +// VZ: personally, I think true would be more appropriate - these bells are +// _annoying_ +bool wxValidator::ms_isSilent = false; + +wxValidator::wxValidator() +{ + m_validatorWindow = NULL; +} + +wxValidator::~wxValidator() +{ +} + +#endif + // wxUSE_VALIDATORS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/valnum.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/valnum.cpp new file mode 100644 index 0000000000..4b12bbf531 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/valnum.cpp @@ -0,0 +1,299 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/valnum.cpp +// Purpose: Numeric validator classes implementation +// Author: Vadim Zeitlin based on the submission of Fulvio Senore +// Created: 2010-11-06 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// Declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_VALIDATORS && wxUSE_TEXTCTRL + +#ifndef WX_PRECOMP + #include "wx/textctrl.h" + #include "wx/combobox.h" +#endif + +#include "wx/valnum.h" +#include "wx/numformatter.h" + +// ============================================================================ +// wxNumValidatorBase implementation +// ============================================================================ + +BEGIN_EVENT_TABLE(wxNumValidatorBase, wxValidator) + EVT_CHAR(wxNumValidatorBase::OnChar) + EVT_KILL_FOCUS(wxNumValidatorBase::OnKillFocus) +END_EVENT_TABLE() + +int wxNumValidatorBase::GetFormatFlags() const +{ + int flags = wxNumberFormatter::Style_None; + if ( m_style & wxNUM_VAL_THOUSANDS_SEPARATOR ) + flags |= wxNumberFormatter::Style_WithThousandsSep; + if ( m_style & wxNUM_VAL_NO_TRAILING_ZEROES ) + flags |= wxNumberFormatter::Style_NoTrailingZeroes; + + return flags; +} + +wxTextEntry *wxNumValidatorBase::GetTextEntry() const +{ +#if wxUSE_TEXTCTRL + if ( wxTextCtrl *text = wxDynamicCast(m_validatorWindow, wxTextCtrl) ) + return text; +#endif // wxUSE_TEXTCTRL + +#if wxUSE_COMBOBOX + if ( wxComboBox *combo = wxDynamicCast(m_validatorWindow, wxComboBox) ) + return combo; +#endif // wxUSE_COMBOBOX + + wxFAIL_MSG("Can only be used with wxTextCtrl or wxComboBox"); + + return NULL; +} + +void +wxNumValidatorBase::GetCurrentValueAndInsertionPoint(wxString& val, + int& pos) const +{ + wxTextEntry * const control = GetTextEntry(); + if ( !control ) + return; + + val = control->GetValue(); + pos = control->GetInsertionPoint(); + + long selFrom, selTo; + control->GetSelection(&selFrom, &selTo); + + const long selLen = selTo - selFrom; + if ( selLen ) + { + // Remove selected text because pressing a key would make it disappear. + val.erase(selFrom, selLen); + + // And adjust the insertion point to have correct position in the new + // string. + if ( pos > selFrom ) + { + if ( pos >= selTo ) + pos -= selLen; + else + pos = selFrom; + } + } +} + +bool wxNumValidatorBase::IsMinusOk(const wxString& val, int pos) const +{ + // Minus is only ever accepted in the beginning of the string. + if ( pos != 0 ) + return false; + + // And then only if there is no existing minus sign there. + if ( !val.empty() && val[0] == '-' ) + return false; + + return true; +} + +void wxNumValidatorBase::OnChar(wxKeyEvent& event) +{ + // By default we just validate this key so don't prevent the normal + // handling from taking place. + event.Skip(); + + if ( !m_validatorWindow ) + return; + +#if wxUSE_UNICODE + const int ch = event.GetUnicodeKey(); + if ( ch == WXK_NONE ) + { + // It's a character without any Unicode equivalent at all, e.g. cursor + // arrow or function key, we never filter those. + return; + } +#else // !wxUSE_UNICODE + const int ch = event.GetKeyCode(); + if ( ch > WXK_DELETE ) + { + // Not a character neither. + return; + } +#endif // wxUSE_UNICODE/!wxUSE_UNICODE + + if ( ch < WXK_SPACE || ch == WXK_DELETE ) + { + // Allow ASCII control characters and Delete. + return; + } + + // Check if this character is allowed in the current state. + wxString val; + int pos; + GetCurrentValueAndInsertionPoint(val, pos); + + if ( !IsCharOk(val, pos, ch) ) + { + if ( !wxValidator::IsSilent() ) + wxBell(); + + // Do not skip the event in this case, stop handling it here. + event.Skip(false); + } +} + +void wxNumValidatorBase::OnKillFocus(wxFocusEvent& event) +{ + wxTextEntry * const control = GetTextEntry(); + if ( !control ) + return; + + // When we change the control value below, its "modified" status is reset + // so we need to explicitly keep it marked as modified if it was so in the + // first place. + // + // Notice that only wxTextCtrl (and not wxTextEntry) has + // IsModified()/MarkDirty() methods hence the need for dynamic cast. + wxTextCtrl * const text = wxDynamicCast(m_validatorWindow, wxTextCtrl); + const bool wasModified = text ? text->IsModified() : false; + + control->ChangeValue(NormalizeString(control->GetValue())); + + if ( wasModified ) + text->MarkDirty(); + + event.Skip(); +} + +// ============================================================================ +// wxIntegerValidatorBase implementation +// ============================================================================ + +wxString wxIntegerValidatorBase::ToString(LongestValueType value) const +{ + return wxNumberFormatter::ToString(value, GetFormatFlags()); +} + +bool +wxIntegerValidatorBase::FromString(const wxString& s, LongestValueType *value) +{ + return wxNumberFormatter::FromString(s, value); +} + +bool +wxIntegerValidatorBase::IsCharOk(const wxString& val, int pos, wxChar ch) const +{ + // We may accept minus sign if we can represent negative numbers at all. + if ( ch == '-' ) + { + // Notice that entering '-' can make our value invalid, for example if + // we're limited to -5..15 range and the current value is 12, then the + // new value would be (invalid) -12. We consider it better to let the + // user do this because perhaps he is going to press Delete key next to + // make it -2 and forcing him to delete 1 first would be unnatural. + // + // TODO: It would be nice to indicate that the current control contents + // is invalid (if it's indeed going to be the case) once + // wxValidator supports doing this non-intrusively. + return m_min < 0 && IsMinusOk(val, pos); + } + + // We only accept digits here (remember that '-' is taken care of by the + // base class already). + if ( ch < '0' || ch > '9' ) + return false; + + // And the value after insertion needs to be in the defined range. + LongestValueType value; + if ( !FromString(GetValueAfterInsertingChar(val, pos, ch), &value) ) + return false; + + return IsInRange(value); +} + +// ============================================================================ +// wxFloatingPointValidatorBase implementation +// ============================================================================ + +wxString wxFloatingPointValidatorBase::ToString(LongestValueType value) const +{ + return wxNumberFormatter::ToString(value, m_precision, GetFormatFlags()); +} + +bool +wxFloatingPointValidatorBase::FromString(const wxString& s, + LongestValueType *value) +{ + return wxNumberFormatter::FromString(s, value); +} + +bool +wxFloatingPointValidatorBase::IsCharOk(const wxString& val, + int pos, + wxChar ch) const +{ + // We may accept minus sign if we can represent negative numbers at all. + if ( ch == '-' ) + return m_min < 0 && IsMinusOk(val, pos); + + const wxChar separator = wxNumberFormatter::GetDecimalSeparator(); + if ( ch == separator ) + { + if ( val.find(separator) != wxString::npos ) + { + // There is already a decimal separator, can't insert another one. + return false; + } + + // Prepending a separator before the minus sign isn't allowed. + if ( pos == 0 && !val.empty() && val[0] == '-' ) + return false; + + // Otherwise always accept it, adding a decimal separator doesn't + // change the number value and, in particular, can't make it invalid. + // OTOH the checks below might not pass because strings like "." or + // "-." are not valid numbers so parsing them would fail, hence we need + // to treat it specially here. + return true; + } + + // Must be a digit then. + if ( ch < '0' || ch > '9' ) + return false; + + // Check whether the value we'd obtain if we accepted this key is correct. + const wxString newval(GetValueAfterInsertingChar(val, pos, ch)); + + LongestValueType value; + if ( !FromString(newval, &value) ) + return false; + + // Also check that it doesn't have too many decimal digits. + const size_t posSep = newval.find(separator); + if ( posSep != wxString::npos && newval.length() - posSep - 1 > m_precision ) + return false; + + // Finally check whether it is in the range. + return IsInRange(value); +} + +#endif // wxUSE_VALIDATORS && wxUSE_TEXTCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/valtext.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/valtext.cpp new file mode 100644 index 0000000000..4a89f4f1e7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/valtext.cpp @@ -0,0 +1,335 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/valtext.cpp +// Purpose: wxTextValidator +// Author: Julian Smart +// Modified by: Francesco Montorsi +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_VALIDATORS && (wxUSE_TEXTCTRL || wxUSE_COMBOBOX) + +#include "wx/valtext.h" + +#ifndef WX_PRECOMP + #include + #include "wx/textctrl.h" + #include "wx/combobox.h" + #include "wx/utils.h" + #include "wx/msgdlg.h" + #include "wx/intl.h" +#endif + +#include +#include +#include + +#include "wx/combo.h" + +// ---------------------------------------------------------------------------- +// global helpers +// ---------------------------------------------------------------------------- + +static bool wxIsNumeric(const wxString& val) +{ + for ( wxString::const_iterator i = val.begin(); i != val.end(); ++i ) + { + // Allow for "," (French) as well as "." -- in future we should + // use wxSystemSettings or other to do better localisation + if ((!wxIsdigit(*i)) && + (*i != wxS('.')) && (*i != wxS(',')) && (*i != wxS('e')) && + (*i != wxS('E')) && (*i != wxS('+')) && (*i != wxS('-'))) + return false; + } + return true; +} + +// ---------------------------------------------------------------------------- +// wxTextValidator +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxTextValidator, wxValidator) +BEGIN_EVENT_TABLE(wxTextValidator, wxValidator) + EVT_CHAR(wxTextValidator::OnChar) +END_EVENT_TABLE() + +wxTextValidator::wxTextValidator(long style, wxString *val) +{ + m_stringValue = val; + SetStyle(style); +} + +wxTextValidator::wxTextValidator(const wxTextValidator& val) + : wxValidator() +{ + Copy(val); +} + +void wxTextValidator::SetStyle(long style) +{ + m_validatorStyle = style; + +#if wxDEBUG_LEVEL + int check; + check = (int)HasFlag(wxFILTER_ALPHA) + (int)HasFlag(wxFILTER_ALPHANUMERIC) + + (int)HasFlag(wxFILTER_DIGITS) + (int)HasFlag(wxFILTER_NUMERIC); + wxASSERT_MSG(check <= 1, + "It makes sense to use only one of the wxFILTER_ALPHA/wxFILTER_ALPHANUMERIC/" + "wxFILTER_SIMPLE_NUMBER/wxFILTER_NUMERIC styles"); + + wxASSERT_MSG(((int)HasFlag(wxFILTER_INCLUDE_LIST) + (int)HasFlag(wxFILTER_INCLUDE_CHAR_LIST) <= 1) && + ((int)HasFlag(wxFILTER_EXCLUDE_LIST) + (int)HasFlag(wxFILTER_EXCLUDE_CHAR_LIST) <= 1), + "Using both wxFILTER_[IN|EX]CLUDE_LIST _and_ wxFILTER_[IN|EX]CLUDE_CHAR_LIST " + "doesn't work since wxTextValidator internally uses the same array for both"); + + check = (int)HasFlag(wxFILTER_INCLUDE_LIST) + (int)HasFlag(wxFILTER_INCLUDE_CHAR_LIST) + + (int)HasFlag(wxFILTER_EXCLUDE_LIST) + (int)HasFlag(wxFILTER_EXCLUDE_CHAR_LIST); + wxASSERT_MSG(check <= 1, + "Using both an include/exclude list may lead to unexpected results"); +#endif // wxDEBUG_LEVEL +} + +bool wxTextValidator::Copy(const wxTextValidator& val) +{ + wxValidator::Copy(val); + + m_validatorStyle = val.m_validatorStyle; + m_stringValue = val.m_stringValue; + + m_includes = val.m_includes; + m_excludes = val.m_excludes; + + return true; +} + +wxTextEntry *wxTextValidator::GetTextEntry() +{ +#if wxUSE_TEXTCTRL + if (wxDynamicCast(m_validatorWindow, wxTextCtrl)) + { + return (wxTextCtrl*)m_validatorWindow; + } +#endif + +#if wxUSE_COMBOBOX + if (wxDynamicCast(m_validatorWindow, wxComboBox)) + { + return (wxComboBox*)m_validatorWindow; + } +#endif + +#if wxUSE_COMBOCTRL + if (wxDynamicCast(m_validatorWindow, wxComboCtrl)) + { + return (wxComboCtrl*)m_validatorWindow; + } +#endif + + wxFAIL_MSG( + "wxTextValidator can only be used with wxTextCtrl, wxComboBox, " + "or wxComboCtrl" + ); + + return NULL; +} + +// Called when the value in the window must be validated. +// This function can pop up an error message. +bool wxTextValidator::Validate(wxWindow *parent) +{ + // If window is disabled, simply return + if ( !m_validatorWindow->IsEnabled() ) + return true; + + wxTextEntry * const text = GetTextEntry(); + if ( !text ) + return false; + + wxString val(text->GetValue()); + + wxString errormsg; + + // We can only do some kinds of validation once the input is complete, so + // check for them here: + if ( HasFlag(wxFILTER_EMPTY) && val.empty() ) + errormsg = _("Required information entry is empty."); + else if ( HasFlag(wxFILTER_INCLUDE_LIST) && m_includes.Index(val) == wxNOT_FOUND ) + errormsg = wxString::Format(_("'%s' is invalid"), val); + else if ( HasFlag(wxFILTER_EXCLUDE_LIST) && m_excludes.Index(val) != wxNOT_FOUND ) + errormsg = wxString::Format(_("'%s' is invalid"), val); + else if ( !(errormsg = IsValid(val)).empty() ) + { + // NB: this format string should always contain exactly one '%s' + wxString buf; + buf.Printf(errormsg, val.c_str()); + errormsg = buf; + } + + if ( !errormsg.empty() ) + { + m_validatorWindow->SetFocus(); + wxMessageBox(errormsg, _("Validation conflict"), + wxOK | wxICON_EXCLAMATION, parent); + + return false; + } + + return true; +} + +// Called to transfer data to the window +bool wxTextValidator::TransferToWindow() +{ + if ( m_stringValue ) + { + wxTextEntry * const text = GetTextEntry(); + if ( !text ) + return false; + + text->SetValue(*m_stringValue); + } + + return true; +} + +// Called to transfer data to the window +bool wxTextValidator::TransferFromWindow() +{ + if ( m_stringValue ) + { + wxTextEntry * const text = GetTextEntry(); + if ( !text ) + return false; + + *m_stringValue = text->GetValue(); + } + + return true; +} + +// IRIX mipsPro refuses to compile wxStringCheck() if func is inline so +// let's work around this by using this non-template function instead of +// wxStringCheck(). And while this might be fractionally less efficient because +// the function call won't be inlined like this, we don't care enough about +// this to add extra #ifs for non-IRIX case. +namespace +{ + +bool CheckString(bool (*func)(const wxUniChar&), const wxString& str) +{ + for ( wxString::const_iterator i = str.begin(); i != str.end(); ++i ) + { + if ( !func(*i) ) + return false; + } + + return true; +} + +} // anonymous namespace + +wxString wxTextValidator::IsValid(const wxString& val) const +{ + // wxFILTER_EMPTY is checked for in wxTextValidator::Validate + + if ( HasFlag(wxFILTER_ASCII) && !val.IsAscii() ) + return _("'%s' should only contain ASCII characters."); + if ( HasFlag(wxFILTER_ALPHA) && !CheckString(wxIsalpha, val) ) + return _("'%s' should only contain alphabetic characters."); + if ( HasFlag(wxFILTER_ALPHANUMERIC) && !CheckString(wxIsalnum, val) ) + return _("'%s' should only contain alphabetic or numeric characters."); + if ( HasFlag(wxFILTER_DIGITS) && !CheckString(wxIsdigit, val) ) + return _("'%s' should only contain digits."); + if ( HasFlag(wxFILTER_NUMERIC) && !wxIsNumeric(val) ) + return _("'%s' should be numeric."); + if ( HasFlag(wxFILTER_INCLUDE_CHAR_LIST) && !ContainsOnlyIncludedCharacters(val) ) + return _("'%s' is invalid"); + if ( HasFlag(wxFILTER_EXCLUDE_CHAR_LIST) && ContainsExcludedCharacters(val) ) + return _("'%s' is invalid"); + + return wxEmptyString; +} + +bool wxTextValidator::ContainsOnlyIncludedCharacters(const wxString& val) const +{ + for ( wxString::const_iterator i = val.begin(); i != val.end(); ++i ) + if (m_includes.Index((wxString) *i) == wxNOT_FOUND) + // one character of 'val' is NOT present in m_includes... + return false; + + // all characters of 'val' are present in m_includes + return true; +} + +bool wxTextValidator::ContainsExcludedCharacters(const wxString& val) const +{ + for ( wxString::const_iterator i = val.begin(); i != val.end(); ++i ) + if (m_excludes.Index((wxString) *i) != wxNOT_FOUND) + // one character of 'val' is present in m_excludes... + return true; + + // all characters of 'val' are NOT present in m_excludes + return false; +} + +void wxTextValidator::SetCharIncludes(const wxString& chars) +{ + wxArrayString arr; + + for ( wxString::const_iterator i = chars.begin(); i != chars.end(); ++i ) + arr.Add(*i); + + SetIncludes(arr); +} + +void wxTextValidator::SetCharExcludes(const wxString& chars) +{ + wxArrayString arr; + + for ( wxString::const_iterator i = chars.begin(); i != chars.end(); ++i ) + arr.Add(*i); + + SetExcludes(arr); +} + +void wxTextValidator::OnChar(wxKeyEvent& event) +{ + if (!m_validatorWindow) + { + event.Skip(); + return; + } + + int keyCode = event.GetKeyCode(); + + // we don't filter special keys and delete + if (keyCode < WXK_SPACE || keyCode == WXK_DELETE || keyCode >= WXK_START) + { + event.Skip(); + return; + } + + wxString str((wxUniChar)keyCode, 1); + if (!IsValid(str).empty()) + { + if ( !wxValidator::IsSilent() ) + wxBell(); + + // eat message + return; + } + else + event.Skip(); +} + + +#endif + // wxUSE_VALIDATORS && (wxUSE_TEXTCTRL || wxUSE_COMBOBOX) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/variant.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/variant.cpp new file mode 100644 index 0000000000..5fc1931bba --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/variant.cpp @@ -0,0 +1,2510 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/variant.cpp +// Purpose: wxVariant class, container for any type +// Author: Julian Smart +// Modified by: +// Created: 10/09/98 +// Copyright: (c) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/variant.h" + +#if wxUSE_VARIANT + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/math.h" + #include "wx/crt.h" + #if wxUSE_STREAMS + #include "wx/stream.h" + #endif +#endif + +#if wxUSE_STD_IOSTREAM + #if wxUSE_IOSTREAMH + #include + #else + #include + #endif +#endif + +#if wxUSE_STREAMS + #include "wx/txtstrm.h" +#endif + +#include "wx/string.h" +#include "wx/tokenzr.h" + +wxVariant WXDLLIMPEXP_BASE wxNullVariant; + + +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxVariantList) + +/* + * wxVariant + */ + +IMPLEMENT_DYNAMIC_CLASS(wxVariant, wxObject) + +wxVariant::wxVariant() + : wxObject() +{ +} + +bool wxVariant::IsNull() const +{ + return (m_refData == NULL); +} + +void wxVariant::MakeNull() +{ + UnRef(); +} + +void wxVariant::Clear() +{ + m_name = wxEmptyString; +} + +wxVariant::wxVariant(const wxVariant& variant) + : wxObject() +{ + if (!variant.IsNull()) + Ref(variant); + + m_name = variant.m_name; +} + +wxVariant::wxVariant(wxVariantData* data, const wxString& name) // User-defined data + : wxObject() +{ + m_refData = data; + m_name = name; +} + +wxVariant::~wxVariant() +{ +} + +wxObjectRefData *wxVariant::CreateRefData() const +{ + // We cannot create any particular wxVariantData. + wxFAIL_MSG("wxVariant::CreateRefData() cannot be implemented"); + return NULL; +} + +wxObjectRefData *wxVariant::CloneRefData(const wxObjectRefData *data) const +{ + return ((wxVariantData*) data)->Clone(); +} + +// Assignment +void wxVariant::operator= (const wxVariant& variant) +{ + Ref(variant); + m_name = variant.m_name; +} + +// myVariant = new wxStringVariantData("hello") +void wxVariant::operator= (wxVariantData* variantData) +{ + UnRef(); + m_refData = variantData; +} + +bool wxVariant::operator== (const wxVariant& variant) const +{ + if (IsNull() || variant.IsNull()) + return (IsNull() == variant.IsNull()); + + if (GetType() != variant.GetType()) + return false; + + return (GetData()->Eq(* variant.GetData())); +} + +bool wxVariant::operator!= (const wxVariant& variant) const +{ + return (!(*this == variant)); +} + +wxString wxVariant::MakeString() const +{ + if (!IsNull()) + { + wxString str; + if (GetData()->Write(str)) + return str; + } + return wxEmptyString; +} + +void wxVariant::SetData(wxVariantData* data) +{ + UnRef(); + m_refData = data; +} + +bool wxVariant::Unshare() +{ + if ( !m_refData || m_refData->GetRefCount() == 1 ) + return true; + + wxObject::UnShare(); + + return (m_refData && m_refData->GetRefCount() == 1); +} + + +// Returns a string representing the type of the variant, +// e.g. "string", "bool", "list", "double", "long" +wxString wxVariant::GetType() const +{ + if (IsNull()) + return wxString(wxT("null")); + else + return GetData()->GetType(); +} + + +bool wxVariant::IsType(const wxString& type) const +{ + return (GetType() == type); +} + +bool wxVariant::IsValueKindOf(const wxClassInfo* type) const +{ + wxClassInfo* info=GetData()->GetValueClassInfo(); + return info ? info->IsKindOf(type) : false ; +} + +// ----------------------------------------------------------------- +// wxVariant <-> wxAny conversion code +// ----------------------------------------------------------------- + +#if wxUSE_ANY + +wxAnyToVariantRegistration:: + wxAnyToVariantRegistration(wxVariantDataFactory factory) + : m_factory(factory) +{ + wxPreRegisterAnyToVariant(this); +} + +wxAnyToVariantRegistration::~wxAnyToVariantRegistration() +{ +} + +wxVariant::wxVariant(const wxAny& any) + : wxObject() +{ + wxVariant variant; + if ( !any.GetAs(&variant) ) + { + wxFAIL_MSG("wxAny of this type cannot be converted to wxVariant"); + return; + } + + *this = variant; +} + +wxAny wxVariant::GetAny() const +{ + if ( IsNull() ) + return wxAny(); + + wxAny any; + wxVariantData* data = GetData(); + + if ( data->GetAsAny(&any) ) + return any; + + // If everything else fails, wrap the whole wxVariantData + return wxAny(data); +} + +#endif // wxUSE_ANY + +// ----------------------------------------------------------------- +// wxVariantDataLong +// ----------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxVariantDataLong: public wxVariantData +{ +public: + wxVariantDataLong() { m_value = 0; } + wxVariantDataLong(long value) { m_value = value; } + + inline long GetValue() const { return m_value; } + inline void SetValue(long value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; + + virtual bool Read(wxString& str); + virtual bool Write(wxString& str) const; +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& str); + virtual bool Write(wxSTD ostream& str) const; +#endif +#if wxUSE_STREAMS + virtual bool Read(wxInputStream& str); + virtual bool Write(wxOutputStream &str) const; +#endif // wxUSE_STREAMS + + wxVariantData* Clone() const { return new wxVariantDataLong(m_value); } + + virtual wxString GetType() const { return wxT("long"); } + +#if wxUSE_ANY + // Since wxAny does not have separate type for integers shorter than + // longlong, we do not usually implement wxVariant->wxAny conversion + // here (but in wxVariantDataLongLong instead). + #ifndef wxLongLong_t + DECLARE_WXANY_CONVERSION() + #else + bool GetAsAny(wxAny* any) const + { + *any = m_value; + return true; + } + #endif +#endif // wxUSE_ANY + +protected: + long m_value; +}; + +#ifndef wxLongLong_t +IMPLEMENT_TRIVIAL_WXANY_CONVERSION(long, wxVariantDataLong) +#endif + +bool wxVariantDataLong::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( (data.GetType() == wxT("long")), wxT("wxVariantDataLong::Eq: argument mismatch") ); + + wxVariantDataLong& otherData = (wxVariantDataLong&) data; + + return (otherData.m_value == m_value); +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataLong::Write(wxSTD ostream& str) const +{ + wxString s; + Write(s); + str << (const char*) s.mb_str(); + return true; +} +#endif + +bool wxVariantDataLong::Write(wxString& str) const +{ + str.Printf(wxT("%ld"), m_value); + return true; +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataLong::Read(wxSTD istream& str) +{ + str >> m_value; + return true; +} +#endif + +#if wxUSE_STREAMS +bool wxVariantDataLong::Write(wxOutputStream& str) const +{ + wxTextOutputStream s(str); + + s.Write32((size_t)m_value); + return true; +} + +bool wxVariantDataLong::Read(wxInputStream& str) +{ + wxTextInputStream s(str); + m_value = s.Read32(); + return true; +} +#endif // wxUSE_STREAMS + +bool wxVariantDataLong::Read(wxString& str) +{ + m_value = wxAtol(str); + return true; +} + +// wxVariant + +wxVariant::wxVariant(long val, const wxString& name) +{ + m_refData = new wxVariantDataLong(val); + m_name = name; +} + +wxVariant::wxVariant(int val, const wxString& name) +{ + m_refData = new wxVariantDataLong((long)val); + m_name = name; +} + +wxVariant::wxVariant(short val, const wxString& name) +{ + m_refData = new wxVariantDataLong((long)val); + m_name = name; +} + +bool wxVariant::operator== (long value) const +{ + long thisValue; + if (!Convert(&thisValue)) + return false; + else + return (value == thisValue); +} + +bool wxVariant::operator!= (long value) const +{ + return (!((*this) == value)); +} + +void wxVariant::operator= (long value) +{ + if (GetType() == wxT("long") && + m_refData->GetRefCount() == 1) + { + ((wxVariantDataLong*)GetData())->SetValue(value); + } + else + { + UnRef(); + m_refData = new wxVariantDataLong(value); + } +} + +long wxVariant::GetLong() const +{ + long value; + if (Convert(& value)) + return value; + else + { + wxFAIL_MSG(wxT("Could not convert to a long")); + return 0; + } +} + +// ----------------------------------------------------------------- +// wxVariantDoubleData +// ----------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxVariantDoubleData: public wxVariantData +{ +public: + wxVariantDoubleData() { m_value = 0.0; } + wxVariantDoubleData(double value) { m_value = value; } + + inline double GetValue() const { return m_value; } + inline void SetValue(double value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; + virtual bool Read(wxString& str); +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& str); +#endif +#if wxUSE_STREAMS + virtual bool Read(wxInputStream& str); + virtual bool Write(wxOutputStream &str) const; +#endif // wxUSE_STREAMS + virtual wxString GetType() const { return wxT("double"); } + + wxVariantData* Clone() const { return new wxVariantDoubleData(m_value); } + + DECLARE_WXANY_CONVERSION() +protected: + double m_value; +}; + +IMPLEMENT_TRIVIAL_WXANY_CONVERSION(double, wxVariantDoubleData) + +bool wxVariantDoubleData::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( (data.GetType() == wxT("double")), wxT("wxVariantDoubleData::Eq: argument mismatch") ); + + wxVariantDoubleData& otherData = (wxVariantDoubleData&) data; + + return wxIsSameDouble(otherData.m_value, m_value); +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDoubleData::Write(wxSTD ostream& str) const +{ + wxString s; + Write(s); + str << (const char*) s.mb_str(); + return true; +} +#endif + +bool wxVariantDoubleData::Write(wxString& str) const +{ + str.Printf(wxT("%.14g"), m_value); + return true; +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDoubleData::Read(wxSTD istream& str) +{ + str >> m_value; + return true; +} +#endif + +#if wxUSE_STREAMS +bool wxVariantDoubleData::Write(wxOutputStream& str) const +{ + wxTextOutputStream s(str); + s.WriteDouble((double)m_value); + return true; +} + +bool wxVariantDoubleData::Read(wxInputStream& str) +{ + wxTextInputStream s(str); + m_value = (float)s.ReadDouble(); + return true; +} +#endif // wxUSE_STREAMS + +bool wxVariantDoubleData::Read(wxString& str) +{ + m_value = wxAtof(str); + return true; +} + +// wxVariant double code + +wxVariant::wxVariant(double val, const wxString& name) +{ + m_refData = new wxVariantDoubleData(val); + m_name = name; +} + +bool wxVariant::operator== (double value) const +{ + double thisValue; + if (!Convert(&thisValue)) + return false; + + return wxIsSameDouble(value, thisValue); +} + +bool wxVariant::operator!= (double value) const +{ + return (!((*this) == value)); +} + +void wxVariant::operator= (double value) +{ + if (GetType() == wxT("double") && + m_refData->GetRefCount() == 1) + { + ((wxVariantDoubleData*)GetData())->SetValue(value); + } + else + { + UnRef(); + m_refData = new wxVariantDoubleData(value); + } +} + +double wxVariant::GetDouble() const +{ + double value; + if (Convert(& value)) + return value; + else + { + wxFAIL_MSG(wxT("Could not convert to a double number")); + return 0.0; + } +} + +// ----------------------------------------------------------------- +// wxVariantBoolData +// ----------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxVariantDataBool: public wxVariantData +{ +public: + wxVariantDataBool() { m_value = 0; } + wxVariantDataBool(bool value) { m_value = value; } + + inline bool GetValue() const { return m_value; } + inline void SetValue(bool value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; + virtual bool Read(wxString& str); +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& str); +#endif +#if wxUSE_STREAMS + virtual bool Read(wxInputStream& str); + virtual bool Write(wxOutputStream& str) const; +#endif // wxUSE_STREAMS + virtual wxString GetType() const { return wxT("bool"); } + + wxVariantData* Clone() const { return new wxVariantDataBool(m_value); } + + DECLARE_WXANY_CONVERSION() +protected: + bool m_value; +}; + +IMPLEMENT_TRIVIAL_WXANY_CONVERSION(bool, wxVariantDataBool) + +bool wxVariantDataBool::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( (data.GetType() == wxT("bool")), wxT("wxVariantDataBool::Eq: argument mismatch") ); + + wxVariantDataBool& otherData = (wxVariantDataBool&) data; + + return (otherData.m_value == m_value); +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataBool::Write(wxSTD ostream& str) const +{ + wxString s; + Write(s); + str << (const char*) s.mb_str(); + return true; +} +#endif + +bool wxVariantDataBool::Write(wxString& str) const +{ + str.Printf(wxT("%d"), (int) m_value); + return true; +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataBool::Read(wxSTD istream& WXUNUSED(str)) +{ + wxFAIL_MSG(wxT("Unimplemented")); +// str >> (long) m_value; + return false; +} +#endif + +#if wxUSE_STREAMS +bool wxVariantDataBool::Write(wxOutputStream& str) const +{ + wxTextOutputStream s(str); + + s.Write8(m_value); + return true; +} + +bool wxVariantDataBool::Read(wxInputStream& str) +{ + wxTextInputStream s(str); + + m_value = s.Read8() != 0; + return true; +} +#endif // wxUSE_STREAMS + +bool wxVariantDataBool::Read(wxString& str) +{ + m_value = (wxAtol(str) != 0); + return true; +} + +// wxVariant **** + +wxVariant::wxVariant(bool val, const wxString& name) +{ + m_refData = new wxVariantDataBool(val); + m_name = name; +} + +bool wxVariant::operator== (bool value) const +{ + bool thisValue; + if (!Convert(&thisValue)) + return false; + else + return (value == thisValue); +} + +bool wxVariant::operator!= (bool value) const +{ + return (!((*this) == value)); +} + +void wxVariant::operator= (bool value) +{ + if (GetType() == wxT("bool") && + m_refData->GetRefCount() == 1) + { + ((wxVariantDataBool*)GetData())->SetValue(value); + } + else + { + UnRef(); + m_refData = new wxVariantDataBool(value); + } +} + +bool wxVariant::GetBool() const +{ + bool value; + if (Convert(& value)) + return value; + else + { + wxFAIL_MSG(wxT("Could not convert to a bool")); + return 0; + } +} + +// ----------------------------------------------------------------- +// wxVariantDataChar +// ----------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxVariantDataChar: public wxVariantData +{ +public: + wxVariantDataChar() { m_value = 0; } + wxVariantDataChar(const wxUniChar& value) { m_value = value; } + + inline wxUniChar GetValue() const { return m_value; } + inline void SetValue(const wxUniChar& value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& str); + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Read(wxString& str); + virtual bool Write(wxString& str) const; +#if wxUSE_STREAMS + virtual bool Read(wxInputStream& str); + virtual bool Write(wxOutputStream& str) const; +#endif // wxUSE_STREAMS + virtual wxString GetType() const { return wxT("char"); } + wxVariantData* Clone() const { return new wxVariantDataChar(m_value); } + + DECLARE_WXANY_CONVERSION() +protected: + wxUniChar m_value; +}; + +IMPLEMENT_TRIVIAL_WXANY_CONVERSION(wxUniChar, wxVariantDataChar) + +bool wxVariantDataChar::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( (data.GetType() == wxT("char")), wxT("wxVariantDataChar::Eq: argument mismatch") ); + + wxVariantDataChar& otherData = (wxVariantDataChar&) data; + + return (otherData.m_value == m_value); +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataChar::Write(wxSTD ostream& str) const +{ + str << wxString(m_value); + return true; +} +#endif + +bool wxVariantDataChar::Write(wxString& str) const +{ + str = m_value; + return true; +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataChar::Read(wxSTD istream& WXUNUSED(str)) +{ + wxFAIL_MSG(wxT("Unimplemented")); + + return false; +} +#endif + +#if wxUSE_STREAMS +bool wxVariantDataChar::Write(wxOutputStream& str) const +{ + wxTextOutputStream s(str); + + // FIXME-UTF8: this should be just "s << m_value;" after removal of + // ANSI build and addition of wxUniChar to wxTextOutputStream: + s << (wxChar)m_value; + + return true; +} + +bool wxVariantDataChar::Read(wxInputStream& str) +{ + wxTextInputStream s(str); + + // FIXME-UTF8: this should be just "s >> m_value;" after removal of + // ANSI build and addition of wxUniChar to wxTextInputStream: + wxChar ch; + s >> ch; + m_value = ch; + + return true; +} +#endif // wxUSE_STREAMS + +bool wxVariantDataChar::Read(wxString& str) +{ + m_value = str[0u]; + return true; +} + +wxVariant::wxVariant(const wxUniChar& val, const wxString& name) +{ + m_refData = new wxVariantDataChar(val); + m_name = name; +} + +wxVariant::wxVariant(char val, const wxString& name) +{ + m_refData = new wxVariantDataChar(val); + m_name = name; +} + +wxVariant::wxVariant(wchar_t val, const wxString& name) +{ + m_refData = new wxVariantDataChar(val); + m_name = name; +} + +bool wxVariant::operator==(const wxUniChar& value) const +{ + wxUniChar thisValue; + if (!Convert(&thisValue)) + return false; + else + return (value == thisValue); +} + +wxVariant& wxVariant::operator=(const wxUniChar& value) +{ + if (GetType() == wxT("char") && + m_refData->GetRefCount() == 1) + { + ((wxVariantDataChar*)GetData())->SetValue(value); + } + else + { + UnRef(); + m_refData = new wxVariantDataChar(value); + } + + return *this; +} + +wxUniChar wxVariant::GetChar() const +{ + wxUniChar value; + if (Convert(& value)) + return value; + else + { + wxFAIL_MSG(wxT("Could not convert to a char")); + return wxUniChar(0); + } +} + +// ---------------------------------------------------------------------------- +// wxVariantDataString +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxVariantDataString: public wxVariantData +{ +public: + wxVariantDataString() { } + wxVariantDataString(const wxString& value) { m_value = value; } + + inline wxString GetValue() const { return m_value; } + inline void SetValue(const wxString& value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Read(wxString& str); + virtual bool Write(wxString& str) const; +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& WXUNUSED(str)) { return false; } +#endif +#if wxUSE_STREAMS + virtual bool Read(wxInputStream& str); + virtual bool Write(wxOutputStream& str) const; +#endif // wxUSE_STREAMS + virtual wxString GetType() const { return wxT("string"); } + wxVariantData* Clone() const { return new wxVariantDataString(m_value); } + + DECLARE_WXANY_CONVERSION() +protected: + wxString m_value; +}; + +IMPLEMENT_TRIVIAL_WXANY_CONVERSION(wxString, wxVariantDataString) + +#if wxUSE_ANY +// This allows converting string literal wxAnys to string variants +wxVariantData* wxVariantDataFromConstCharPAny(const wxAny& any) +{ + return new wxVariantDataString(wxANY_AS(any, const char*)); +} + +wxVariantData* wxVariantDataFromConstWchar_tPAny(const wxAny& any) +{ + return new wxVariantDataString(wxANY_AS(any, const wchar_t*)); +} + +_REGISTER_WXANY_CONVERSION(const char*, + ConstCharP, + wxVariantDataFromConstCharPAny) +_REGISTER_WXANY_CONVERSION(const wchar_t*, + ConstWchar_tP, + wxVariantDataFromConstWchar_tPAny) +#endif + +bool wxVariantDataString::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( (data.GetType() == wxT("string")), wxT("wxVariantDataString::Eq: argument mismatch") ); + + wxVariantDataString& otherData = (wxVariantDataString&) data; + + return (otherData.m_value == m_value); +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataString::Write(wxSTD ostream& str) const +{ + str << (const char*) m_value.mb_str(); + return true; +} +#endif + +bool wxVariantDataString::Write(wxString& str) const +{ + str = m_value; + return true; +} + +#if wxUSE_STREAMS +bool wxVariantDataString::Write(wxOutputStream& str) const +{ + // why doesn't wxOutputStream::operator<< take "const wxString&" + wxTextOutputStream s(str); + s.WriteString(m_value); + return true; +} + +bool wxVariantDataString::Read(wxInputStream& str) +{ + wxTextInputStream s(str); + + m_value = s.ReadLine(); + return true; +} +#endif // wxUSE_STREAMS + +bool wxVariantDataString::Read(wxString& str) +{ + m_value = str; + return true; +} + +// wxVariant **** + +wxVariant::wxVariant(const wxString& val, const wxString& name) +{ + m_refData = new wxVariantDataString(val); + m_name = name; +} + +wxVariant::wxVariant(const char* val, const wxString& name) +{ + m_refData = new wxVariantDataString(wxString(val)); + m_name = name; +} + +wxVariant::wxVariant(const wchar_t* val, const wxString& name) +{ + m_refData = new wxVariantDataString(wxString(val)); + m_name = name; +} + +wxVariant::wxVariant(const wxCStrData& val, const wxString& name) +{ + m_refData = new wxVariantDataString(val.AsString()); + m_name = name; +} + +wxVariant::wxVariant(const wxScopedCharBuffer& val, const wxString& name) +{ + m_refData = new wxVariantDataString(wxString(val)); + m_name = name; +} + +wxVariant::wxVariant(const wxScopedWCharBuffer& val, const wxString& name) +{ + m_refData = new wxVariantDataString(wxString(val)); + m_name = name; +} + +#if wxUSE_STD_STRING +wxVariant::wxVariant(const std::string& val, const wxString& name) +{ + m_refData = new wxVariantDataString(wxString(val)); + m_name = name; +} + +wxVariant::wxVariant(const wxStdWideString& val, const wxString& name) +{ + m_refData = new wxVariantDataString(wxString(val)); + m_name = name; +} +#endif // wxUSE_STD_STRING + +bool wxVariant::operator== (const wxString& value) const +{ + wxString thisValue; + if (!Convert(&thisValue)) + return false; + + return value == thisValue; +} + +bool wxVariant::operator!= (const wxString& value) const +{ + return (!((*this) == value)); +} + +wxVariant& wxVariant::operator= (const wxString& value) +{ + if (GetType() == wxT("string") && + m_refData->GetRefCount() == 1) + { + ((wxVariantDataString*)GetData())->SetValue(value); + } + else + { + UnRef(); + m_refData = new wxVariantDataString(value); + } + return *this; +} + +wxString wxVariant::GetString() const +{ + wxString value; + if (!Convert(& value)) + { + wxFAIL_MSG(wxT("Could not convert to a string")); + } + + return value; +} + +// ---------------------------------------------------------------------------- +// wxVariantDataWxObjectPtr +// ---------------------------------------------------------------------------- + +class wxVariantDataWxObjectPtr: public wxVariantData +{ +public: + wxVariantDataWxObjectPtr() { } + wxVariantDataWxObjectPtr(wxObject* value) { m_value = value; } + + inline wxObject* GetValue() const { return m_value; } + inline void SetValue(wxObject* value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& str); +#endif + virtual bool Read(wxString& str); + virtual wxString GetType() const ; + virtual wxVariantData* Clone() const { return new wxVariantDataWxObjectPtr(m_value); } + + virtual wxClassInfo* GetValueClassInfo(); + + DECLARE_WXANY_CONVERSION() +protected: + wxObject* m_value; +}; + +IMPLEMENT_TRIVIAL_WXANY_CONVERSION(wxObject*, wxVariantDataWxObjectPtr) + +bool wxVariantDataWxObjectPtr::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( data.GetType() == GetType(), wxT("wxVariantDataWxObjectPtr::Eq: argument mismatch") ); + + wxVariantDataWxObjectPtr& otherData = (wxVariantDataWxObjectPtr&) data; + + return (otherData.m_value == m_value); +} + +wxString wxVariantDataWxObjectPtr::GetType() const +{ + wxString returnVal(wxT("wxObject*")); + + if (m_value) + { + returnVal = m_value->GetClassInfo()->GetClassName(); + returnVal += wxT("*"); + } + + return returnVal; +} + +wxClassInfo* wxVariantDataWxObjectPtr::GetValueClassInfo() +{ + wxClassInfo* returnVal=NULL; + + if (m_value) returnVal = m_value->GetClassInfo(); + + return returnVal; +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataWxObjectPtr::Write(wxSTD ostream& str) const +{ + wxString s; + Write(s); + str << (const char*) s.mb_str(); + return true; +} +#endif + +bool wxVariantDataWxObjectPtr::Write(wxString& str) const +{ + str.Printf(wxT("%s(%p)"), GetType().c_str(), static_cast(m_value)); + return true; +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataWxObjectPtr::Read(wxSTD istream& WXUNUSED(str)) +{ + // Not implemented + return false; +} +#endif + +bool wxVariantDataWxObjectPtr::Read(wxString& WXUNUSED(str)) +{ + // Not implemented + return false; +} + +// wxVariant + +wxVariant::wxVariant( wxObject* val, const wxString& name) +{ + m_refData = new wxVariantDataWxObjectPtr(val); + m_name = name; +} + +bool wxVariant::operator== (wxObject* value) const +{ + return (value == ((wxVariantDataWxObjectPtr*)GetData())->GetValue()); +} + +bool wxVariant::operator!= (wxObject* value) const +{ + return (!((*this) == (wxObject*) value)); +} + +void wxVariant::operator= (wxObject* value) +{ + UnRef(); + m_refData = new wxVariantDataWxObjectPtr(value); +} + +wxObject* wxVariant::GetWxObjectPtr() const +{ + return (wxObject*) ((wxVariantDataWxObjectPtr*) m_refData)->GetValue(); +} + +// ---------------------------------------------------------------------------- +// wxVariantDataVoidPtr +// ---------------------------------------------------------------------------- + +class wxVariantDataVoidPtr: public wxVariantData +{ +public: + wxVariantDataVoidPtr() { } + wxVariantDataVoidPtr(void* value) { m_value = value; } + + inline void* GetValue() const { return m_value; } + inline void SetValue(void* value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& str); +#endif + virtual bool Read(wxString& str); + virtual wxString GetType() const { return wxT("void*"); } + virtual wxVariantData* Clone() const { return new wxVariantDataVoidPtr(m_value); } + + DECLARE_WXANY_CONVERSION() +protected: + void* m_value; +}; + +IMPLEMENT_TRIVIAL_WXANY_CONVERSION(void*, wxVariantDataVoidPtr) + +bool wxVariantDataVoidPtr::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( data.GetType() == wxT("void*"), wxT("wxVariantDataVoidPtr::Eq: argument mismatch") ); + + wxVariantDataVoidPtr& otherData = (wxVariantDataVoidPtr&) data; + + return (otherData.m_value == m_value); +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataVoidPtr::Write(wxSTD ostream& str) const +{ + wxString s; + Write(s); + str << (const char*) s.mb_str(); + return true; +} +#endif + +bool wxVariantDataVoidPtr::Write(wxString& str) const +{ + str.Printf(wxT("%p"), m_value); + return true; +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataVoidPtr::Read(wxSTD istream& WXUNUSED(str)) +{ + // Not implemented + return false; +} +#endif + +bool wxVariantDataVoidPtr::Read(wxString& WXUNUSED(str)) +{ + // Not implemented + return false; +} + +// wxVariant + +wxVariant::wxVariant( void* val, const wxString& name) +{ + m_refData = new wxVariantDataVoidPtr(val); + m_name = name; +} + +bool wxVariant::operator== (void* value) const +{ + return (value == ((wxVariantDataVoidPtr*)GetData())->GetValue()); +} + +bool wxVariant::operator!= (void* value) const +{ + return (!((*this) == (void*) value)); +} + +void wxVariant::operator= (void* value) +{ + if (GetType() == wxT("void*") && (m_refData->GetRefCount() == 1)) + { + ((wxVariantDataVoidPtr*)GetData())->SetValue(value); + } + else + { + UnRef(); + m_refData = new wxVariantDataVoidPtr(value); + } +} + +void* wxVariant::GetVoidPtr() const +{ + // handling this specially is convenient when working with COM, see #9873 + if ( IsNull() ) + return NULL; + + wxASSERT( GetType() == wxT("void*") ); + + return (void*) ((wxVariantDataVoidPtr*) m_refData)->GetValue(); +} + +// ---------------------------------------------------------------------------- +// wxVariantDataDateTime +// ---------------------------------------------------------------------------- + +#if wxUSE_DATETIME + +class wxVariantDataDateTime: public wxVariantData +{ +public: + wxVariantDataDateTime() { } + wxVariantDataDateTime(const wxDateTime& value) { m_value = value; } + + inline wxDateTime GetValue() const { return m_value; } + inline void SetValue(const wxDateTime& value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& str); +#endif + virtual bool Read(wxString& str); + virtual wxString GetType() const { return wxT("datetime"); } + virtual wxVariantData* Clone() const { return new wxVariantDataDateTime(m_value); } + + DECLARE_WXANY_CONVERSION() +protected: + wxDateTime m_value; +}; + +IMPLEMENT_TRIVIAL_WXANY_CONVERSION(wxDateTime, wxVariantDataDateTime) + +bool wxVariantDataDateTime::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( (data.GetType() == wxT("datetime")), wxT("wxVariantDataDateTime::Eq: argument mismatch") ); + + wxVariantDataDateTime& otherData = (wxVariantDataDateTime&) data; + + return (otherData.m_value == m_value); +} + + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataDateTime::Write(wxSTD ostream& str) const +{ + wxString value; + Write( value ); + str << value.c_str(); + return true; +} +#endif + + +bool wxVariantDataDateTime::Write(wxString& str) const +{ + if ( m_value.IsValid() ) + str = m_value.Format(); + else + str = wxS("Invalid"); + return true; +} + + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataDateTime::Read(wxSTD istream& WXUNUSED(str)) +{ + // Not implemented + return false; +} +#endif + + +bool wxVariantDataDateTime::Read(wxString& str) +{ + if ( str == wxS("Invalid") ) + { + m_value = wxInvalidDateTime; + return true; + } + + wxString::const_iterator end; + return m_value.ParseDateTime(str, &end) && end == str.end(); +} + +// wxVariant + +wxVariant::wxVariant(const wxDateTime& val, const wxString& name) // Date +{ + m_refData = new wxVariantDataDateTime(val); + m_name = name; +} + +bool wxVariant::operator== (const wxDateTime& value) const +{ + wxDateTime thisValue; + if (!Convert(&thisValue)) + return false; + + return value.IsEqualTo(thisValue); +} + +bool wxVariant::operator!= (const wxDateTime& value) const +{ + return (!((*this) == value)); +} + +void wxVariant::operator= (const wxDateTime& value) +{ + if (GetType() == wxT("datetime") && + m_refData->GetRefCount() == 1) + { + ((wxVariantDataDateTime*)GetData())->SetValue(value); + } + else + { + UnRef(); + m_refData = new wxVariantDataDateTime(value); + } +} + +wxDateTime wxVariant::GetDateTime() const +{ + wxDateTime value; + if (!Convert(& value)) + { + wxFAIL_MSG(wxT("Could not convert to a datetime")); + } + + return value; +} + +#endif // wxUSE_DATETIME + +// ---------------------------------------------------------------------------- +// wxVariantDataArrayString +// ---------------------------------------------------------------------------- + +class wxVariantDataArrayString: public wxVariantData +{ +public: + wxVariantDataArrayString() { } + wxVariantDataArrayString(const wxArrayString& value) { m_value = value; } + + wxArrayString GetValue() const { return m_value; } + void SetValue(const wxArrayString& value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& str); +#endif + virtual bool Read(wxString& str); + virtual wxString GetType() const { return wxT("arrstring"); } + virtual wxVariantData* Clone() const { return new wxVariantDataArrayString(m_value); } + + DECLARE_WXANY_CONVERSION() +protected: + wxArrayString m_value; +}; + +IMPLEMENT_TRIVIAL_WXANY_CONVERSION(wxArrayString, wxVariantDataArrayString) + +bool wxVariantDataArrayString::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( data.GetType() == GetType(), wxT("wxVariantDataArrayString::Eq: argument mismatch") ); + + wxVariantDataArrayString& otherData = (wxVariantDataArrayString&) data; + + return otherData.m_value == m_value; +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataArrayString::Write(wxSTD ostream& WXUNUSED(str)) const +{ + // Not implemented + return false; +} +#endif + +bool wxVariantDataArrayString::Write(wxString& str) const +{ + size_t count = m_value.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + if ( n ) + str += wxT(';'); + + str += m_value[n]; + } + + return true; +} + + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataArrayString::Read(wxSTD istream& WXUNUSED(str)) +{ + // Not implemented + return false; +} +#endif + + +bool wxVariantDataArrayString::Read(wxString& str) +{ + wxStringTokenizer tk(str, wxT(";")); + while ( tk.HasMoreTokens() ) + { + m_value.Add(tk.GetNextToken()); + } + + return true; +} + +// wxVariant + +wxVariant::wxVariant(const wxArrayString& val, const wxString& name) // Strings +{ + m_refData = new wxVariantDataArrayString(val); + m_name = name; +} + +bool wxVariant::operator==(const wxArrayString& WXUNUSED(value)) const +{ + wxFAIL_MSG( wxT("TODO") ); + + return false; +} + +bool wxVariant::operator!=(const wxArrayString& value) const +{ + return !(*this == value); +} + +void wxVariant::operator=(const wxArrayString& value) +{ + if (GetType() == wxT("arrstring") && + m_refData->GetRefCount() == 1) + { + ((wxVariantDataArrayString *)GetData())->SetValue(value); + } + else + { + UnRef(); + m_refData = new wxVariantDataArrayString(value); + } +} + +wxArrayString wxVariant::GetArrayString() const +{ + if ( GetType() == wxT("arrstring") ) + return ((wxVariantDataArrayString *)GetData())->GetValue(); + + return wxArrayString(); +} + +// ---------------------------------------------------------------------------- +// wxVariantDataLongLong +// ---------------------------------------------------------------------------- + +#if wxUSE_LONGLONG + +class WXDLLIMPEXP_BASE wxVariantDataLongLong : public wxVariantData +{ +public: + wxVariantDataLongLong() { m_value = 0; } + wxVariantDataLongLong(wxLongLong value) { m_value = value; } + + wxLongLong GetValue() const { return m_value; } + void SetValue(wxLongLong value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; + + virtual bool Read(wxString& str); + virtual bool Write(wxString& str) const; +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& str); + virtual bool Write(wxSTD ostream& str) const; +#endif +#if wxUSE_STREAMS + virtual bool Read(wxInputStream& str); + virtual bool Write(wxOutputStream &str) const; +#endif // wxUSE_STREAMS + + wxVariantData* Clone() const + { + return new wxVariantDataLongLong(m_value); + } + + virtual wxString GetType() const { return wxS("longlong"); } + + DECLARE_WXANY_CONVERSION() +protected: + wxLongLong m_value; +}; + +// +// wxLongLong type requires customized wxAny conversion code +// +#if wxUSE_ANY +#ifdef wxLongLong_t + +bool wxVariantDataLongLong::GetAsAny(wxAny* any) const +{ + *any = m_value.GetValue(); + return true; +} + +wxVariantData* wxVariantDataLongLong::VariantDataFactory(const wxAny& any) +{ + return new wxVariantDataLongLong(wxANY_AS(any, wxLongLong_t)); +} + +REGISTER_WXANY_CONVERSION(wxLongLong_t, wxVariantDataLongLong) + +#else // if !defined(wxLongLong_t) + +bool wxVariantDataLongLong::GetAsAny(wxAny* any) const +{ + *any = m_value; + return true; +} + +wxVariantData* wxVariantDataLongLong::VariantDataFactory(const wxAny& any) +{ + return new wxVariantDataLongLong(wxANY_AS(any, wxLongLong)); +} + +REGISTER_WXANY_CONVERSION(wxLongLong, wxVariantDataLongLong) + +#endif // defined(wxLongLong_t)/!defined(wxLongLong_t) +#endif // wxUSE_ANY + +bool wxVariantDataLongLong::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( (data.GetType() == wxS("longlong")), + "wxVariantDataLongLong::Eq: argument mismatch" ); + + wxVariantDataLongLong& otherData = (wxVariantDataLongLong&) data; + + return (otherData.m_value == m_value); +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataLongLong::Write(wxSTD ostream& str) const +{ + wxString s; + Write(s); + str << (const char*) s.mb_str(); + return true; +} +#endif + +bool wxVariantDataLongLong::Write(wxString& str) const +{ +#ifdef wxLongLong_t + str.Printf(wxS("%lld"), m_value.GetValue()); + return true; +#else + return false; +#endif +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataLongLong::Read(wxSTD istream& WXUNUSED(str)) +{ + wxFAIL_MSG(wxS("Unimplemented")); + return false; +} +#endif + +#if wxUSE_STREAMS +bool wxVariantDataLongLong::Write(wxOutputStream& str) const +{ + wxTextOutputStream s(str); + s.Write32(m_value.GetLo()); + s.Write32(m_value.GetHi()); + return true; +} + +bool wxVariantDataLongLong::Read(wxInputStream& str) +{ + wxTextInputStream s(str); + unsigned long lo = s.Read32(); + long hi = s.Read32(); + m_value = wxLongLong(hi, lo); + return true; +} +#endif // wxUSE_STREAMS + +bool wxVariantDataLongLong::Read(wxString& str) +{ +#ifdef wxLongLong_t + wxLongLong_t value_t; + if ( !str.ToLongLong(&value_t) ) + return false; + m_value = value_t; + return true; +#else + return false; +#endif +} + +// wxVariant + +wxVariant::wxVariant(wxLongLong val, const wxString& name) +{ + m_refData = new wxVariantDataLongLong(val); + m_name = name; +} + +bool wxVariant::operator==(wxLongLong value) const +{ + wxLongLong thisValue; + if ( !Convert(&thisValue) ) + return false; + else + return (value == thisValue); +} + +bool wxVariant::operator!=(wxLongLong value) const +{ + return (!((*this) == value)); +} + +void wxVariant::operator=(wxLongLong value) +{ + if ( GetType() == wxS("longlong") && + m_refData->GetRefCount() == 1 ) + { + ((wxVariantDataLongLong*)GetData())->SetValue(value); + } + else + { + UnRef(); + m_refData = new wxVariantDataLongLong(value); + } +} + +wxLongLong wxVariant::GetLongLong() const +{ + wxLongLong value; + if ( Convert(&value) ) + { + return value; + } + else + { + wxFAIL_MSG(wxT("Could not convert to a long long")); + return 0; + } +} + +#endif // wxUSE_LONGLONG + +// ---------------------------------------------------------------------------- +// wxVariantDataULongLong +// ---------------------------------------------------------------------------- + +#if wxUSE_LONGLONG + +class WXDLLIMPEXP_BASE wxVariantDataULongLong : public wxVariantData +{ +public: + wxVariantDataULongLong() { m_value = 0; } + wxVariantDataULongLong(wxULongLong value) { m_value = value; } + + wxULongLong GetValue() const { return m_value; } + void SetValue(wxULongLong value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; + + virtual bool Read(wxString& str); + virtual bool Write(wxString& str) const; +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& str); + virtual bool Write(wxSTD ostream& str) const; +#endif +#if wxUSE_STREAMS + virtual bool Read(wxInputStream& str); + virtual bool Write(wxOutputStream &str) const; +#endif // wxUSE_STREAMS + + wxVariantData* Clone() const + { + return new wxVariantDataULongLong(m_value); + } + + virtual wxString GetType() const { return wxS("ulonglong"); } + + DECLARE_WXANY_CONVERSION() +protected: + wxULongLong m_value; +}; + +// +// wxULongLong type requires customized wxAny conversion code +// +#if wxUSE_ANY +#ifdef wxLongLong_t + +bool wxVariantDataULongLong::GetAsAny(wxAny* any) const +{ + *any = m_value.GetValue(); + return true; +} + +wxVariantData* wxVariantDataULongLong::VariantDataFactory(const wxAny& any) +{ + return new wxVariantDataULongLong(wxANY_AS(any, wxULongLong_t)); +} + +REGISTER_WXANY_CONVERSION(wxULongLong_t, wxVariantDataULongLong) + +#else // if !defined(wxLongLong_t) + +bool wxVariantDataULongLong::GetAsAny(wxAny* any) const +{ + *any = m_value; + return true; +} + +wxVariantData* wxVariantDataULongLong::VariantDataFactory(const wxAny& any) +{ + return new wxVariantDataULongLong(wxANY_AS(any, wxULongLong)); +} + +REGISTER_WXANY_CONVERSION(wxULongLong, wxVariantDataULongLong) + +#endif // defined(wxLongLong_t)/!defined(wxLongLong_t) +#endif // wxUSE_ANY + + +bool wxVariantDataULongLong::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( (data.GetType() == wxS("ulonglong")), + "wxVariantDataULongLong::Eq: argument mismatch" ); + + wxVariantDataULongLong& otherData = (wxVariantDataULongLong&) data; + + return (otherData.m_value == m_value); +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataULongLong::Write(wxSTD ostream& str) const +{ + wxString s; + Write(s); + str << (const char*) s.mb_str(); + return true; +} +#endif + +bool wxVariantDataULongLong::Write(wxString& str) const +{ +#ifdef wxLongLong_t + str.Printf(wxS("%llu"), m_value.GetValue()); + return true; +#else + return false; +#endif +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataULongLong::Read(wxSTD istream& WXUNUSED(str)) +{ + wxFAIL_MSG(wxS("Unimplemented")); + return false; +} +#endif + +#if wxUSE_STREAMS +bool wxVariantDataULongLong::Write(wxOutputStream& str) const +{ + wxTextOutputStream s(str); + s.Write32(m_value.GetLo()); + s.Write32(m_value.GetHi()); + return true; +} + +bool wxVariantDataULongLong::Read(wxInputStream& str) +{ + wxTextInputStream s(str); + unsigned long lo = s.Read32(); + long hi = s.Read32(); + m_value = wxULongLong(hi, lo); + return true; +} +#endif // wxUSE_STREAMS + +bool wxVariantDataULongLong::Read(wxString& str) +{ +#ifdef wxLongLong_t + wxULongLong_t value_t; + if ( !str.ToULongLong(&value_t) ) + return false; + m_value = value_t; + return true; +#else + return false; +#endif +} + +// wxVariant + +wxVariant::wxVariant(wxULongLong val, const wxString& name) +{ + m_refData = new wxVariantDataULongLong(val); + m_name = name; +} + +bool wxVariant::operator==(wxULongLong value) const +{ + wxULongLong thisValue; + if ( !Convert(&thisValue) ) + return false; + else + return (value == thisValue); +} + +bool wxVariant::operator!=(wxULongLong value) const +{ + return (!((*this) == value)); +} + +void wxVariant::operator=(wxULongLong value) +{ + if ( GetType() == wxS("ulonglong") && + m_refData->GetRefCount() == 1 ) + { + ((wxVariantDataULongLong*)GetData())->SetValue(value); + } + else + { + UnRef(); + m_refData = new wxVariantDataULongLong(value); + } +} + +wxULongLong wxVariant::GetULongLong() const +{ + wxULongLong value; + if ( Convert(&value) ) + { + return value; + } + else + { + wxFAIL_MSG(wxT("Could not convert to a long long")); + return 0; + } +} + +#endif // wxUSE_LONGLONG + +// ---------------------------------------------------------------------------- +// wxVariantDataList +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxVariantDataList: public wxVariantData +{ +public: + wxVariantDataList() {} + wxVariantDataList(const wxVariantList& list); + virtual ~wxVariantDataList(); + + wxVariantList& GetValue() { return m_value; } + void SetValue(const wxVariantList& value) ; + + virtual bool Eq(wxVariantData& data) const; +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; +#if wxUSE_STD_IOSTREAM + virtual bool Read(wxSTD istream& str); +#endif + virtual bool Read(wxString& str); + virtual wxString GetType() const { return wxT("list"); } + + void Clear(); + + wxVariantData* Clone() const { return new wxVariantDataList(m_value); } + + DECLARE_WXANY_CONVERSION() +protected: + wxVariantList m_value; +}; + +#if wxUSE_ANY + +// +// Convert to/from list of wxAnys +// + +bool wxVariantDataList::GetAsAny(wxAny* any) const +{ + wxAnyList dst; + wxVariantList::compatibility_iterator node = m_value.GetFirst(); + while (node) + { + wxVariant* pVar = node->GetData(); + dst.push_back(new wxAny(((const wxVariant&)*pVar))); + node = node->GetNext(); + } + + *any = dst; + return true; +} + +wxVariantData* wxVariantDataList::VariantDataFactory(const wxAny& any) +{ + wxAnyList src = wxANY_AS(any, wxAnyList); + wxVariantList dst; + wxAnyList::compatibility_iterator node = src.GetFirst(); + while (node) + { + wxAny* pAny = node->GetData(); + dst.push_back(new wxVariant(*pAny)); + node = node->GetNext(); + } + + return new wxVariantDataList(dst); +} + +REGISTER_WXANY_CONVERSION(wxAnyList, wxVariantDataList) + +#endif // wxUSE_ANY + +wxVariantDataList::wxVariantDataList(const wxVariantList& list) +{ + SetValue(list); +} + +wxVariantDataList::~wxVariantDataList() +{ + Clear(); +} + +void wxVariantDataList::SetValue(const wxVariantList& value) +{ + Clear(); + wxVariantList::compatibility_iterator node = value.GetFirst(); + while (node) + { + wxVariant* var = node->GetData(); + m_value.Append(new wxVariant(*var)); + node = node->GetNext(); + } +} + +void wxVariantDataList::Clear() +{ + wxVariantList::compatibility_iterator node = m_value.GetFirst(); + while (node) + { + wxVariant* var = node->GetData(); + delete var; + node = node->GetNext(); + } + m_value.Clear(); +} + +bool wxVariantDataList::Eq(wxVariantData& data) const +{ + wxASSERT_MSG( (data.GetType() == wxT("list")), wxT("wxVariantDataList::Eq: argument mismatch") ); + + wxVariantDataList& listData = (wxVariantDataList&) data; + wxVariantList::compatibility_iterator node1 = m_value.GetFirst(); + wxVariantList::compatibility_iterator node2 = listData.GetValue().GetFirst(); + while (node1 && node2) + { + wxVariant* var1 = node1->GetData(); + wxVariant* var2 = node2->GetData(); + if ((*var1) != (*var2)) + return false; + node1 = node1->GetNext(); + node2 = node2->GetNext(); + } + if (node1 || node2) return false; + return true; +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataList::Write(wxSTD ostream& str) const +{ + wxString s; + Write(s); + str << (const char*) s.mb_str(); + return true; +} +#endif + +bool wxVariantDataList::Write(wxString& str) const +{ + str = wxEmptyString; + wxVariantList::compatibility_iterator node = m_value.GetFirst(); + while (node) + { + wxVariant* var = node->GetData(); + if (node != m_value.GetFirst()) + str += wxT(" "); + wxString str1; + str += var->MakeString(); + node = node->GetNext(); + } + + return true; +} + +#if wxUSE_STD_IOSTREAM +bool wxVariantDataList::Read(wxSTD istream& WXUNUSED(str)) +{ + wxFAIL_MSG(wxT("Unimplemented")); + // TODO + return false; +} +#endif + +bool wxVariantDataList::Read(wxString& WXUNUSED(str)) +{ + wxFAIL_MSG(wxT("Unimplemented")); + // TODO + return false; +} + +// wxVariant + +wxVariant::wxVariant(const wxVariantList& val, const wxString& name) // List of variants +{ + m_refData = new wxVariantDataList(val); + m_name = name; +} + +bool wxVariant::operator== (const wxVariantList& value) const +{ + wxASSERT_MSG( (GetType() == wxT("list")), wxT("Invalid type for == operator") ); + + wxVariantDataList other(value); + return (GetData()->Eq(other)); +} + +bool wxVariant::operator!= (const wxVariantList& value) const +{ + return (!((*this) == value)); +} + +void wxVariant::operator= (const wxVariantList& value) +{ + if (GetType() == wxT("list") && + m_refData->GetRefCount() == 1) + { + ((wxVariantDataList*)GetData())->SetValue(value); + } + else + { + UnRef(); + m_refData = new wxVariantDataList(value); + } +} + +wxVariantList& wxVariant::GetList() const +{ + wxASSERT( (GetType() == wxT("list")) ); + + return (wxVariantList&) ((wxVariantDataList*) m_refData)->GetValue(); +} + +// Make empty list +void wxVariant::NullList() +{ + SetData(new wxVariantDataList()); +} + +// Append to list +void wxVariant::Append(const wxVariant& value) +{ + wxVariantList& list = GetList(); + + list.Append(new wxVariant(value)); +} + +// Insert at front of list +void wxVariant::Insert(const wxVariant& value) +{ + wxVariantList& list = GetList(); + + list.Insert(new wxVariant(value)); +} + +// Returns true if the variant is a member of the list +bool wxVariant::Member(const wxVariant& value) const +{ + wxVariantList& list = GetList(); + + wxVariantList::compatibility_iterator node = list.GetFirst(); + while (node) + { + wxVariant* other = node->GetData(); + if (value == *other) + return true; + node = node->GetNext(); + } + return false; +} + +// Deletes the nth element of the list +bool wxVariant::Delete(size_t item) +{ + wxVariantList& list = GetList(); + + wxASSERT_MSG( (item < list.GetCount()), wxT("Invalid index to Delete") ); + wxVariantList::compatibility_iterator node = list.Item(item); + wxVariant* variant = node->GetData(); + delete variant; + list.Erase(node); + return true; +} + +// Clear list +void wxVariant::ClearList() +{ + if (!IsNull() && (GetType() == wxT("list"))) + { + ((wxVariantDataList*) m_refData)->Clear(); + } + else + { + if (!GetType().IsSameAs(wxT("list"))) + UnRef(); + + m_refData = new wxVariantDataList; + } +} + +// Treat a list variant as an array +wxVariant wxVariant::operator[] (size_t idx) const +{ + wxASSERT_MSG( GetType() == wxT("list"), wxT("Invalid type for array operator") ); + + if (GetType() == wxT("list")) + { + wxVariantDataList* data = (wxVariantDataList*) m_refData; + wxASSERT_MSG( (idx < data->GetValue().GetCount()), wxT("Invalid index for array") ); + return *(data->GetValue().Item(idx)->GetData()); + } + return wxNullVariant; +} + +wxVariant& wxVariant::operator[] (size_t idx) +{ + // We can't return a reference to a variant for a string list, since the string + // is actually stored as a char*, not a variant. + + wxASSERT_MSG( (GetType() == wxT("list")), wxT("Invalid type for array operator") ); + + wxVariantDataList* data = (wxVariantDataList*) m_refData; + wxASSERT_MSG( (idx < data->GetValue().GetCount()), wxT("Invalid index for array") ); + + return * (data->GetValue().Item(idx)->GetData()); +} + +// Return the number of elements in a list +size_t wxVariant::GetCount() const +{ + wxASSERT_MSG( GetType() == wxT("list"), wxT("Invalid type for GetCount()") ); + + if (GetType() == wxT("list")) + { + wxVariantDataList* data = (wxVariantDataList*) m_refData; + return data->GetValue().GetCount(); + } + return 0; +} + +// ---------------------------------------------------------------------------- +// Type conversion +// ---------------------------------------------------------------------------- + +bool wxVariant::Convert(long* value) const +{ + wxString type(GetType()); + if (type == wxS("double")) + *value = (long) (((wxVariantDoubleData*)GetData())->GetValue()); + else if (type == wxS("long")) + *value = ((wxVariantDataLong*)GetData())->GetValue(); + else if (type == wxS("bool")) + *value = (long) (((wxVariantDataBool*)GetData())->GetValue()); + else if (type == wxS("string")) + *value = wxAtol(((wxVariantDataString*)GetData())->GetValue()); +#if wxUSE_LONGLONG + else if (type == wxS("longlong")) + { + wxLongLong v = ((wxVariantDataLongLong*)GetData())->GetValue(); + // Don't convert if return value would be vague + if ( v < LONG_MIN || v > LONG_MAX ) + return false; + *value = v.ToLong(); + } + else if (type == wxS("ulonglong")) + { + wxULongLong v = ((wxVariantDataULongLong*)GetData())->GetValue(); + // Don't convert if return value would be vague + if ( v.GetHi() ) + return false; + *value = (long) v.ToULong(); + } +#endif + else + return false; + + return true; +} + +bool wxVariant::Convert(bool* value) const +{ + wxString type(GetType()); + if (type == wxT("double")) + *value = ((int) (((wxVariantDoubleData*)GetData())->GetValue()) != 0); + else if (type == wxT("long")) + *value = (((wxVariantDataLong*)GetData())->GetValue() != 0); + else if (type == wxT("bool")) + *value = ((wxVariantDataBool*)GetData())->GetValue(); + else if (type == wxT("string")) + { + wxString val(((wxVariantDataString*)GetData())->GetValue()); + val.MakeLower(); + if (val == wxT("true") || val == wxT("yes") || val == wxT('1') ) + *value = true; + else if (val == wxT("false") || val == wxT("no") || val == wxT('0') ) + *value = false; + else + return false; + } + else + return false; + + return true; +} + +bool wxVariant::Convert(double* value) const +{ + wxString type(GetType()); + if (type == wxT("double")) + *value = ((wxVariantDoubleData*)GetData())->GetValue(); + else if (type == wxT("long")) + *value = (double) (((wxVariantDataLong*)GetData())->GetValue()); + else if (type == wxT("bool")) + *value = (double) (((wxVariantDataBool*)GetData())->GetValue()); + else if (type == wxT("string")) + *value = (double) wxAtof(((wxVariantDataString*)GetData())->GetValue()); +#if wxUSE_LONGLONG + else if (type == wxS("longlong")) + { + *value = ((wxVariantDataLongLong*)GetData())->GetValue().ToDouble(); + } + else if (type == wxS("ulonglong")) + { + *value = ((wxVariantDataULongLong*)GetData())->GetValue().ToDouble(); + } +#endif + else + return false; + + return true; +} + +bool wxVariant::Convert(wxUniChar* value) const +{ + wxString type(GetType()); + if (type == wxT("char")) + *value = ((wxVariantDataChar*)GetData())->GetValue(); + else if (type == wxT("long")) + *value = (char) (((wxVariantDataLong*)GetData())->GetValue()); + else if (type == wxT("bool")) + *value = (char) (((wxVariantDataBool*)GetData())->GetValue()); + else if (type == wxS("string")) + { + // Also accept strings of length 1 + const wxString& str = (((wxVariantDataString*)GetData())->GetValue()); + if ( str.length() == 1 ) + *value = str[0]; + else + return false; + } + else + return false; + + return true; +} + +bool wxVariant::Convert(char* value) const +{ + wxUniChar ch; + if ( !Convert(&ch) ) + return false; + *value = ch; + return true; +} + +bool wxVariant::Convert(wchar_t* value) const +{ + wxUniChar ch; + if ( !Convert(&ch) ) + return false; + *value = ch; + return true; +} + +bool wxVariant::Convert(wxString* value) const +{ + *value = MakeString(); + return true; +} + +#if wxUSE_LONGLONG +bool wxVariant::Convert(wxLongLong* value) const +{ + wxString type(GetType()); + if (type == wxS("longlong")) + *value = ((wxVariantDataLongLong*)GetData())->GetValue(); + else if (type == wxS("long")) + *value = ((wxVariantDataLong*)GetData())->GetValue(); + else if (type == wxS("string")) + { + wxString s = ((wxVariantDataString*)GetData())->GetValue(); +#ifdef wxLongLong_t + wxLongLong_t value_t; + if ( !s.ToLongLong(&value_t) ) + return false; + *value = value_t; +#else + long l_value; + if ( !s.ToLong(&l_value) ) + return false; + *value = l_value; +#endif + } + else if (type == wxS("bool")) + *value = (long) (((wxVariantDataBool*)GetData())->GetValue()); + else if (type == wxS("double")) + { + value->Assign(((wxVariantDoubleData*)GetData())->GetValue()); + } + else if (type == wxS("ulonglong")) + *value = ((wxVariantDataULongLong*)GetData())->GetValue(); + else + return false; + + return true; +} + +bool wxVariant::Convert(wxULongLong* value) const +{ + wxString type(GetType()); + if (type == wxS("ulonglong")) + *value = ((wxVariantDataULongLong*)GetData())->GetValue(); + else if (type == wxS("long")) + *value = ((wxVariantDataLong*)GetData())->GetValue(); + else if (type == wxS("string")) + { + wxString s = ((wxVariantDataString*)GetData())->GetValue(); +#ifdef wxLongLong_t + wxULongLong_t value_t; + if ( !s.ToULongLong(&value_t) ) + return false; + *value = value_t; +#else + unsigned long l_value; + if ( !s.ToULong(&l_value) ) + return false; + *value = l_value; +#endif + } + else if (type == wxS("bool")) + *value = (long) (((wxVariantDataBool*)GetData())->GetValue()); + else if (type == wxS("double")) + { + double value_d = ((wxVariantDoubleData*)GetData())->GetValue(); + + if ( value_d < 0.0 ) + return false; + +#ifdef wxLongLong_t + *value = (wxULongLong_t) value_d; +#else + wxLongLong temp; + temp.Assign(value_d); + *value = temp; +#endif + } + else if (type == wxS("longlong")) + *value = ((wxVariantDataLongLong*)GetData())->GetValue(); + else + return false; + + return true; +} +#endif // wxUSE_LONGLONG + +#if wxUSE_DATETIME +bool wxVariant::Convert(wxDateTime* value) const +{ + wxString type(GetType()); + if (type == wxT("datetime")) + { + *value = ((wxVariantDataDateTime*)GetData())->GetValue(); + return true; + } + + // Fallback to string conversion + wxString val; + if ( !Convert(&val) ) + return false; + + // Try to parse this as either date and time, only date or only time + // checking that the entire string was parsed + wxString::const_iterator end; + if ( value->ParseDateTime(val, &end) && end == val.end() ) + return true; + + if ( value->ParseDate(val, &end) && end == val.end() ) + return true; + + if ( value->ParseTime(val, &end) && end == val.end() ) + return true; + + return false; +} +#endif // wxUSE_DATETIME + +#endif // wxUSE_VARIANT diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/webview.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/webview.cpp new file mode 100644 index 0000000000..afaf3ffd09 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/webview.cpp @@ -0,0 +1,111 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: webview.cpp +// Purpose: Common interface and events for web view component +// Author: Marianne Gagnon +// Copyright: (c) 2010 Marianne Gagnon, 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if wxUSE_WEBVIEW + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#include "wx/webview.h" + +#if defined(__WXOSX_COCOA__) || defined(__WXOSX_CARBON__) +#include "wx/osx/webview_webkit.h" +#elif defined(__WXGTK__) +#include "wx/gtk/webview_webkit.h" +#elif defined(__WXMSW__) +#include "wx/msw/webview_ie.h" +#endif + +// DLL options compatibility check: +#include "wx/app.h" +WX_CHECK_BUILD_OPTIONS("wxWEBVIEW") + +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewNameStr[] = "wxWebView"; +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewDefaultURLStr[] = "about:blank"; +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendIE[] = "wxWebViewIE"; +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendWebKit[] = "wxWebViewWebKit"; + +#ifdef __WXMSW__ +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendDefault[] = "wxWebViewIE"; +#else +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendDefault[] = "wxWebViewWebKit"; +#endif + +wxIMPLEMENT_ABSTRACT_CLASS(wxWebView, wxControl); +wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewEvent, wxCommandEvent); + +wxDEFINE_EVENT( wxEVT_WEBVIEW_NAVIGATING, wxWebViewEvent ); +wxDEFINE_EVENT( wxEVT_WEBVIEW_NAVIGATED, wxWebViewEvent ); +wxDEFINE_EVENT( wxEVT_WEBVIEW_LOADED, wxWebViewEvent ); +wxDEFINE_EVENT( wxEVT_WEBVIEW_ERROR, wxWebViewEvent ); +wxDEFINE_EVENT( wxEVT_WEBVIEW_NEWWINDOW, wxWebViewEvent ); +wxDEFINE_EVENT( wxEVT_WEBVIEW_TITLE_CHANGED, wxWebViewEvent ); + +wxStringWebViewFactoryMap wxWebView::m_factoryMap; + +// static +wxWebView* wxWebView::New(const wxString& backend) +{ + wxStringWebViewFactoryMap::iterator iter = FindFactory(backend); + + if(iter == m_factoryMap.end()) + return NULL; + else + return (*iter).second->Create(); +} + +// static +wxWebView* wxWebView::New(wxWindow* parent, wxWindowID id, const wxString& url, + const wxPoint& pos, const wxSize& size, + const wxString& backend, long style, + const wxString& name) +{ + wxStringWebViewFactoryMap::iterator iter = FindFactory(backend); + + if(iter == m_factoryMap.end()) + return NULL; + else + return (*iter).second->Create(parent, id, url, pos, size, style, name); + +} + +// static +void wxWebView::RegisterFactory(const wxString& backend, + wxSharedPtr factory) +{ + m_factoryMap[backend] = factory; +} + +// static +wxStringWebViewFactoryMap::iterator wxWebView::FindFactory(const wxString &backend) +{ + // Initialise the map, it checks internally for existing factories + InitFactoryMap(); + + return m_factoryMap.find(backend); +} + +// static +void wxWebView::InitFactoryMap() +{ +#ifdef __WXMSW__ + if(m_factoryMap.find(wxWebViewBackendIE) == m_factoryMap.end()) + RegisterFactory(wxWebViewBackendIE, wxSharedPtr + (new wxWebViewFactoryIE)); +#else + if(m_factoryMap.find(wxWebViewBackendWebKit) == m_factoryMap.end()) + RegisterFactory(wxWebViewBackendWebKit, wxSharedPtr + (new wxWebViewFactoryWebKit)); +#endif +} + +#endif // wxUSE_WEBVIEW diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/webviewarchivehandler.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/webviewarchivehandler.cpp new file mode 100644 index 0000000000..cb8f608a29 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/webviewarchivehandler.cpp @@ -0,0 +1,117 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: webviewfilehandler.cpp +// Purpose: Custom webview handler to allow archive browsing +// Author: Steven Lamerton +// Copyright: (c) 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if wxUSE_WEBVIEW + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#include "wx/webviewarchivehandler.h" +#include "wx/filesys.h" + +//Taken from wx/filesys.cpp +static wxString EscapeFileNameCharsInURL(const char *in) +{ + wxString s; + + for ( const unsigned char *p = (const unsigned char*)in; *p; ++p ) + { + const unsigned char c = *p; + + if ( c == '/' || c == '-' || c == '.' || c == '_' || c == '~' || + (c >= '0' && c <= '9') || + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') ) + { + s << c; + } + else + { + s << wxString::Format("%%%02x", c); + } + } + + return s; +} + +wxWebViewArchiveHandler::wxWebViewArchiveHandler(const wxString& scheme) : + wxWebViewHandler(scheme) +{ + m_fileSystem = new wxFileSystem(); +} + +wxWebViewArchiveHandler::~wxWebViewArchiveHandler() +{ + wxDELETE(m_fileSystem); +} + +wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri) +{ + //If there is a fragment at the end of the path then we need to strip it + //off as not all backends do this for us + wxString path = uri; + size_t hashloc = uri.find('#'); + if(hashloc != wxString::npos) + { + path = uri.substr(0, hashloc); + } + + //We iterate through the string to see if there is a protocol description + size_t start = wxString::npos; + for(size_t i = 0; i < path.length(); i++) + { + if(path[i] == ';' && path.substr(i, 10) == ";protocol=") + { + start = i; + break; + } + } + + //We do not have a protocol string so we just pass the path withouth the + if(start == wxString::npos) + { + size_t doubleslash = path.find("//"); + //The path is incorrectly formed without // after the scheme + if(doubleslash == wxString::npos) + return NULL; + + wxString fspath = "file:" + + EscapeFileNameCharsInURL(path.substr(doubleslash + 2).c_str()); + return m_fileSystem->OpenFile(fspath); + } + //Otherwise we need to extract the protocol + else + { + size_t end = path.find('/', start); + //For the path to be valid there must to a path after the protocol + if(end == wxString::npos) + { + return NULL; + } + wxString mainpath = path.substr(0, start); + wxString archivepath = path.substr(end); + wxString protstring = path.substr(start, end - start); + wxString protocol = protstring.substr(10); + //We can now construct the correct path + size_t doubleslash = path.find("//"); + //The path is incorrectly formed without // after the first protocol + if(doubleslash == wxString::npos) + return NULL; + + wxString fspath = "file:" + + EscapeFileNameCharsInURL(mainpath.substr(doubleslash + 2).c_str()) + + "#" + protocol +":" + archivepath; + return m_fileSystem->OpenFile(fspath); + } +} + +#endif // wxUSE_WEBVIEW diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/webviewfshandler.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/webviewfshandler.cpp new file mode 100644 index 0000000000..3b62dcfe42 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/webviewfshandler.cpp @@ -0,0 +1,37 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: webviewfshandler.cpp +// Purpose: Custom webview handler for virtual file system +// Author: Nick Matthews +// Copyright: (c) 2012 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if wxUSE_WEBVIEW + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#include "wx/webviewfshandler.h" +#include "wx/filesys.h" + +wxWebViewFSHandler::wxWebViewFSHandler(const wxString& scheme) : + wxWebViewHandler(scheme) +{ + m_fileSystem = new wxFileSystem(); +} + +wxWebViewFSHandler::~wxWebViewFSHandler() +{ + wxDELETE(m_fileSystem); +} + +wxFSFile* wxWebViewFSHandler::GetFile(const wxString &uri) +{ + return m_fileSystem->OpenFile(uri); +} + +#endif // wxUSE_WEBVIEW diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/wfstream.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/wfstream.cpp new file mode 100644 index 0000000000..362b1861d6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/wfstream.cpp @@ -0,0 +1,430 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/wfstream.cpp +// Purpose: "File stream" classes +// Author: Julian Smart +// Modified by: +// Created: 11/07/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STREAMS + +#include "wx/wfstream.h" + +#ifndef WX_PRECOMP + #include "wx/stream.h" +#endif + +#include + +#if wxUSE_FILE + +// ---------------------------------------------------------------------------- +// wxFileInputStream +// ---------------------------------------------------------------------------- + +wxFileInputStream::wxFileInputStream(const wxString& fileName) + : wxInputStream() +{ + m_file = new wxFile(fileName, wxFile::read); + m_file_destroy = true; + if ( !m_file->IsOpened() ) + m_lasterror = wxSTREAM_READ_ERROR; +} + +wxFileInputStream::wxFileInputStream() + : wxInputStream() +{ + m_file_destroy = false; + m_file = NULL; +} + +wxFileInputStream::wxFileInputStream(wxFile& file) +{ + m_file = &file; + m_file_destroy = false; +} + +wxFileInputStream::wxFileInputStream(int fd) +{ + m_file = new wxFile(fd); + m_file_destroy = true; +} + +wxFileInputStream::~wxFileInputStream() +{ + if (m_file_destroy) + delete m_file; +} + +wxFileOffset wxFileInputStream::GetLength() const +{ + return m_file->Length(); +} + +size_t wxFileInputStream::OnSysRead(void *buffer, size_t size) +{ + ssize_t ret = m_file->Read(buffer, size); + + // NB: we can't use a switch here because HP-UX CC doesn't allow + // switching over long long (which size_t is in 64bit mode) + + if ( !ret ) + { + // nothing read, so nothing more to read + m_lasterror = wxSTREAM_EOF; + } + else if ( ret == wxInvalidOffset ) + { + m_lasterror = wxSTREAM_READ_ERROR; + ret = 0; + } + else + { + // normal case + m_lasterror = wxSTREAM_NO_ERROR; + } + + return ret; +} + +wxFileOffset wxFileInputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) +{ + return m_file->Seek(pos, mode); +} + +wxFileOffset wxFileInputStream::OnSysTell() const +{ + return m_file->Tell(); +} + +bool wxFileInputStream::IsOk() const +{ + return wxInputStream::IsOk() && m_file->IsOpened(); +} + +// ---------------------------------------------------------------------------- +// wxFileOutputStream +// ---------------------------------------------------------------------------- + +wxFileOutputStream::wxFileOutputStream(const wxString& fileName) +{ + m_file = new wxFile(fileName, wxFile::write); + m_file_destroy = true; + + if (!m_file->IsOpened()) + m_lasterror = wxSTREAM_WRITE_ERROR; +} + +wxFileOutputStream::wxFileOutputStream(wxFile& file) +{ + m_file = &file; + m_file_destroy = false; +} + +wxFileOutputStream::wxFileOutputStream() + : wxOutputStream() +{ + m_file_destroy = false; + m_file = NULL; +} + +wxFileOutputStream::wxFileOutputStream(int fd) +{ + m_file = new wxFile(fd); + m_file_destroy = true; +} + +wxFileOutputStream::~wxFileOutputStream() +{ + if (m_file_destroy) + { + Sync(); + delete m_file; + } +} + +size_t wxFileOutputStream::OnSysWrite(const void *buffer, size_t size) +{ + size_t ret = m_file->Write(buffer, size); + + m_lasterror = m_file->Error() ? wxSTREAM_WRITE_ERROR : wxSTREAM_NO_ERROR; + + return ret; +} + +wxFileOffset wxFileOutputStream::OnSysTell() const +{ + return m_file->Tell(); +} + +wxFileOffset wxFileOutputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) +{ + return m_file->Seek(pos, mode); +} + +void wxFileOutputStream::Sync() +{ + wxOutputStream::Sync(); + m_file->Flush(); +} + +wxFileOffset wxFileOutputStream::GetLength() const +{ + return m_file->Length(); +} + +bool wxFileOutputStream::IsOk() const +{ + return wxOutputStream::IsOk() && m_file->IsOpened(); +} + +// ---------------------------------------------------------------------------- +// wxTempFileOutputStream +// ---------------------------------------------------------------------------- + +wxTempFileOutputStream::wxTempFileOutputStream(const wxString& fileName) +{ + m_file = new wxTempFile(fileName); + + if (!m_file->IsOpened()) + m_lasterror = wxSTREAM_WRITE_ERROR; +} + +wxTempFileOutputStream::~wxTempFileOutputStream() +{ + if (m_file->IsOpened()) + Discard(); + delete m_file; +} + +size_t wxTempFileOutputStream::OnSysWrite(const void *buffer, size_t size) +{ + if (IsOk() && m_file->Write(buffer, size)) + return size; + m_lasterror = wxSTREAM_WRITE_ERROR; + return 0; +} + +// ---------------------------------------------------------------------------- +// wxFileStream +// ---------------------------------------------------------------------------- + +wxFileStream::wxFileStream(const wxString& fileName) + : wxFileInputStream(), + wxFileOutputStream() +{ + wxFileOutputStream::m_file = + wxFileInputStream::m_file = new wxFile(fileName, wxFile::read_write); + + // this is a bit ugly as streams are symmetric but we still have to delete + // the file we created above exactly once so we decide to (arbitrarily) do + // it in wxFileInputStream + wxFileInputStream::m_file_destroy = true; +} + +bool wxFileStream::IsOk() const +{ + return wxFileOutputStream::IsOk() && wxFileInputStream::IsOk(); +} + +#endif // wxUSE_FILE + +#if wxUSE_FFILE + +// ---------------------------------------------------------------------------- +// wxFFileInputStream +// ---------------------------------------------------------------------------- + +wxFFileInputStream::wxFFileInputStream(const wxString& fileName, + const wxString& mode) + : wxInputStream() +{ + m_file = new wxFFile(fileName, mode); + m_file_destroy = true; + + if (!m_file->IsOpened()) + m_lasterror = wxSTREAM_WRITE_ERROR; +} + +wxFFileInputStream::wxFFileInputStream() + : wxInputStream() +{ + m_file = NULL; + m_file_destroy = false; +} + +wxFFileInputStream::wxFFileInputStream(wxFFile& file) +{ + m_file = &file; + m_file_destroy = false; +} + +wxFFileInputStream::wxFFileInputStream(FILE *file) +{ + m_file = new wxFFile(file); + m_file_destroy = true; +} + +wxFFileInputStream::~wxFFileInputStream() +{ + if (m_file_destroy) + delete m_file; +} + +wxFileOffset wxFFileInputStream::GetLength() const +{ + return m_file->Length(); +} + +size_t wxFFileInputStream::OnSysRead(void *buffer, size_t size) +{ + ssize_t ret = m_file->Read(buffer, size); + + // It is not safe to call Eof() if the file is not opened. + if (!m_file->IsOpened() || m_file->Eof()) + m_lasterror = wxSTREAM_EOF; + if (ret == wxInvalidOffset) + { + m_lasterror = wxSTREAM_READ_ERROR; + ret = 0; + } + + return ret; +} + +wxFileOffset wxFFileInputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) +{ + return m_file->Seek(pos, mode) ? m_file->Tell() : wxInvalidOffset; +} + +wxFileOffset wxFFileInputStream::OnSysTell() const +{ + return m_file->Tell(); +} + +bool wxFFileInputStream::IsOk() const +{ + return wxStreamBase::IsOk() && m_file->IsOpened(); +} + +// ---------------------------------------------------------------------------- +// wxFFileOutputStream +// ---------------------------------------------------------------------------- + +wxFFileOutputStream::wxFFileOutputStream(const wxString& fileName, + const wxString& mode) +{ + m_file = new wxFFile(fileName, mode); + m_file_destroy = true; + + if (!m_file->IsOpened()) + { + m_lasterror = wxSTREAM_WRITE_ERROR; + } + else + { + if (m_file->Error()) + m_lasterror = wxSTREAM_WRITE_ERROR; + } +} + +wxFFileOutputStream::wxFFileOutputStream(wxFFile& file) +{ + m_file = &file; + m_file_destroy = false; +} + +wxFFileOutputStream::wxFFileOutputStream() + : wxOutputStream() +{ + m_file = NULL; + m_file_destroy = false; +} + +wxFFileOutputStream::wxFFileOutputStream(FILE *file) +{ + m_file = new wxFFile(file); + m_file_destroy = true; +} + +wxFFileOutputStream::~wxFFileOutputStream() +{ + if (m_file_destroy) + { + Sync(); + delete m_file; + } +} + +size_t wxFFileOutputStream::OnSysWrite(const void *buffer, size_t size) +{ + size_t ret = m_file->Write(buffer, size); + // It is not safe to call Error() if the file is not opened. + if (!m_file->IsOpened() || m_file->Error()) + m_lasterror = wxSTREAM_WRITE_ERROR; + else + m_lasterror = wxSTREAM_NO_ERROR; + return ret; +} + +wxFileOffset wxFFileOutputStream::OnSysTell() const +{ + return m_file->Tell(); +} + +wxFileOffset wxFFileOutputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) +{ + return m_file->Seek(pos, mode) ? m_file->Tell() : wxInvalidOffset; +} + +void wxFFileOutputStream::Sync() +{ + wxOutputStream::Sync(); + m_file->Flush(); +} + +wxFileOffset wxFFileOutputStream::GetLength() const +{ + return m_file->Length(); +} + +bool wxFFileOutputStream::IsOk() const +{ + return wxStreamBase::IsOk() && m_file->IsOpened(); +} + +// ---------------------------------------------------------------------------- +// wxFFileStream +// ---------------------------------------------------------------------------- + +wxFFileStream::wxFFileStream(const wxString& fileName, const wxString& mode) + : wxFFileInputStream(), + wxFFileOutputStream() +{ + wxASSERT_MSG( mode.find_first_of('+') != wxString::npos, + "must be opened in read-write mode for this class to work" ); + + wxFFileOutputStream::m_file = + wxFFileInputStream::m_file = new wxFFile(fileName, mode); + + // see comment in wxFileStream ctor + wxFFileInputStream::m_file_destroy = true; +} + +bool wxFFileStream::IsOk() const +{ + return wxFFileOutputStream::IsOk() && wxFFileInputStream::IsOk(); +} + +#endif //wxUSE_FFILE + +#endif // wxUSE_STREAMS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/wincmn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/wincmn.cpp new file mode 100644 index 0000000000..ad4887093b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/wincmn.cpp @@ -0,0 +1,4057 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/wincmn.cpp +// Purpose: common (to all ports) wxWindow functions +// Author: Julian Smart, Vadim Zeitlin +// Modified by: +// Created: 13/07/98 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/log.h" + #include "wx/intl.h" + #include "wx/frame.h" + #include "wx/window.h" + #include "wx/control.h" + #include "wx/checkbox.h" + #include "wx/radiobut.h" + #include "wx/statbox.h" + #include "wx/textctrl.h" + #include "wx/settings.h" + #include "wx/dialog.h" + #include "wx/msgdlg.h" + #include "wx/msgout.h" + #include "wx/statusbr.h" + #include "wx/toolbar.h" + #include "wx/dcclient.h" + #include "wx/scrolbar.h" + #include "wx/layout.h" + #include "wx/sizer.h" + #include "wx/menu.h" +#endif //WX_PRECOMP + +#if wxUSE_DRAG_AND_DROP + #include "wx/dnd.h" +#endif // wxUSE_DRAG_AND_DROP + +#if wxUSE_ACCESSIBILITY + #include "wx/access.h" +#endif + +#if wxUSE_HELP + #include "wx/cshelp.h" +#endif // wxUSE_HELP + +#if wxUSE_TOOLTIPS + #include "wx/tooltip.h" +#endif // wxUSE_TOOLTIPS + +#if wxUSE_CARET + #include "wx/caret.h" +#endif // wxUSE_CARET + +#if wxUSE_SYSTEM_OPTIONS + #include "wx/sysopt.h" +#endif + +#include "wx/platinfo.h" +#include "wx/recguard.h" +#include "wx/private/window.h" + +#ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" +#endif + +// Windows List +WXDLLIMPEXP_DATA_CORE(wxWindowList) wxTopLevelWindows; + +// globals +#if wxUSE_MENUS +wxMenu *wxCurrentPopupMenu = NULL; +#endif // wxUSE_MENUS + +extern WXDLLEXPORT_DATA(const char) wxPanelNameStr[] = "panel"; + +namespace wxMouseCapture +{ + +// Check if the given window is in the capture stack. +bool IsInCaptureStack(wxWindowBase* win); + +} // wxMouseCapture + +// ---------------------------------------------------------------------------- +// static data +// ---------------------------------------------------------------------------- + + +IMPLEMENT_ABSTRACT_CLASS(wxWindowBase, wxEvtHandler) + +// ---------------------------------------------------------------------------- +// event table +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxWindowBase, wxEvtHandler) + EVT_SYS_COLOUR_CHANGED(wxWindowBase::OnSysColourChanged) + EVT_INIT_DIALOG(wxWindowBase::OnInitDialog) + EVT_MIDDLE_DOWN(wxWindowBase::OnMiddleClick) + +#if wxUSE_HELP + EVT_HELP(wxID_ANY, wxWindowBase::OnHelp) +#endif // wxUSE_HELP + + EVT_SIZE(wxWindowBase::InternalOnSize) +END_EVENT_TABLE() + +// ============================================================================ +// implementation of the common functionality of the wxWindow class +// ============================================================================ + +// ---------------------------------------------------------------------------- +// XTI +// ---------------------------------------------------------------------------- + +#if wxUSE_EXTENDED_RTTI + +// windows that are created from a parent window during its Create method, +// eg. spin controls in a calendar controls must never been streamed out +// separately otherwise chaos occurs. Right now easiest is to test for negative ids, +// as windows with negative ids never can be recreated anyway + + +bool wxWindowStreamingCallback( const wxObject *object, wxObjectWriter *, + wxObjectWriterCallback *, const wxStringToAnyHashMap & ) +{ + const wxWindow * win = wx_dynamic_cast(const wxWindow*, object); + if ( win && win->GetId() < 0 ) + return false; + return true; +} + +wxIMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxWindow, wxWindowBase, "wx/window.h", \ + wxWindowStreamingCallback) + +// make wxWindowList known before the property is used + +wxCOLLECTION_TYPE_INFO( wxWindow*, wxWindowList ); + +template<> void wxCollectionToVariantArray( wxWindowList const &theList, + wxAnyList &value) +{ + wxListCollectionToAnyList( theList, value ); +} + +wxDEFINE_FLAGS( wxWindowStyle ) + +wxBEGIN_FLAGS( wxWindowStyle ) +// new style border flags, we put them first to +// use them for streaming out + +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxEND_FLAGS( wxWindowStyle ) + +wxBEGIN_PROPERTIES_TABLE(wxWindow) +wxEVENT_PROPERTY( Close, wxEVT_CLOSE_WINDOW, wxCloseEvent) +wxEVENT_PROPERTY( Create, wxEVT_CREATE, wxWindowCreateEvent ) +wxEVENT_PROPERTY( Destroy, wxEVT_DESTROY, wxWindowDestroyEvent ) +// Always constructor Properties first + +wxREADONLY_PROPERTY( Parent,wxWindow*, GetParent, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) +wxPROPERTY( Id,wxWindowID, SetId, GetId, -1 /*wxID_ANY*/, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group") ) +wxPROPERTY( Position,wxPoint, SetPosition, GetPosition, wxDefaultPosition, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) // pos +wxPROPERTY( Size,wxSize, SetSize, GetSize, wxDefaultSize, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) // size +wxPROPERTY( WindowStyle, long, SetWindowStyleFlag, GetWindowStyleFlag, \ + wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) // style +wxPROPERTY( Name,wxString, SetName, GetName, wxEmptyString, 0 /*flags*/, \ + wxT("Helpstring"), wxT("group") ) + +// Then all relations of the object graph + +wxREADONLY_PROPERTY_COLLECTION( Children, wxWindowList, wxWindowBase*, \ + GetWindowChildren, wxPROP_OBJECT_GRAPH /*flags*/, \ + wxT("Helpstring"), wxT("group")) + +// and finally all other properties + +wxPROPERTY( ExtraStyle, long, SetExtraStyle, GetExtraStyle, wxEMPTY_PARAMETER_VALUE, \ + 0 /*flags*/, wxT("Helpstring"), wxT("group")) // extstyle +wxPROPERTY( BackgroundColour, wxColour, SetBackgroundColour, GetBackgroundColour, \ + wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) // bg +wxPROPERTY( ForegroundColour, wxColour, SetForegroundColour, GetForegroundColour, \ + wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, wxT("Helpstring"), wxT("group")) // fg +wxPROPERTY( Enabled, bool, Enable, IsEnabled, wxAny((bool)true), 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) +wxPROPERTY( Shown, bool, Show, IsShown, wxAny((bool)true), 0 /*flags*/, \ + wxT("Helpstring"), wxT("group")) + +#if 0 +// possible property candidates (not in xrc) or not valid in all subclasses +wxPROPERTY( Title,wxString, SetTitle, GetTitle, wxEmptyString ) +wxPROPERTY( Font, wxFont, SetFont, GetWindowFont , ) +wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxEmptyString ) +// MaxHeight, Width, MinHeight, Width +// TODO switch label to control and title to toplevels + +wxPROPERTY( ThemeEnabled, bool, SetThemeEnabled, GetThemeEnabled, ) +//wxPROPERTY( Cursor, wxCursor, SetCursor, GetCursor, ) +// wxPROPERTY( ToolTip, wxString, SetToolTip, GetToolTipText, ) +wxPROPERTY( AutoLayout, bool, SetAutoLayout, GetAutoLayout, ) +#endif +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxWindow) + +wxCONSTRUCTOR_DUMMY(wxWindow) + +#else + +#ifndef __WXUNIVERSAL__ +IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase) +#endif + +#endif + +// ---------------------------------------------------------------------------- +// initialization +// ---------------------------------------------------------------------------- + +// the default initialization +wxWindowBase::wxWindowBase() +{ + // no window yet, no parent nor children + m_parent = NULL; + m_windowId = wxID_ANY; + + // no constraints on the minimal window size + m_minWidth = + m_maxWidth = wxDefaultCoord; + m_minHeight = + m_maxHeight = wxDefaultCoord; + + // invalidiated cache value + m_bestSizeCache = wxDefaultSize; + + // window are created enabled and visible by default + m_isShown = + m_isEnabled = true; + + // the default event handler is just this window + m_eventHandler = this; + +#if wxUSE_VALIDATORS + // no validator + m_windowValidator = NULL; +#endif // wxUSE_VALIDATORS + + // the colours/fonts are default for now, so leave m_font, + // m_backgroundColour and m_foregroundColour uninitialized and set those + m_hasBgCol = + m_hasFgCol = + m_hasFont = false; + m_inheritBgCol = + m_inheritFgCol = + m_inheritFont = false; + + // no style bits + m_exStyle = + m_windowStyle = 0; + + m_backgroundStyle = wxBG_STYLE_ERASE; + +#if wxUSE_CONSTRAINTS + // no constraints whatsoever + m_constraints = NULL; + m_constraintsInvolvedIn = NULL; +#endif // wxUSE_CONSTRAINTS + + m_windowSizer = NULL; + m_containingSizer = NULL; + m_autoLayout = false; + +#if wxUSE_DRAG_AND_DROP + m_dropTarget = NULL; +#endif // wxUSE_DRAG_AND_DROP + +#if wxUSE_TOOLTIPS + m_tooltip = NULL; +#endif // wxUSE_TOOLTIPS + +#if wxUSE_CARET + m_caret = NULL; +#endif // wxUSE_CARET + +#if wxUSE_PALETTE + m_hasCustomPalette = false; +#endif // wxUSE_PALETTE + +#if wxUSE_ACCESSIBILITY + m_accessible = NULL; +#endif + + m_virtualSize = wxDefaultSize; + + m_scrollHelper = NULL; + + m_windowVariant = wxWINDOW_VARIANT_NORMAL; +#if wxUSE_SYSTEM_OPTIONS + if ( wxSystemOptions::HasOption(wxWINDOW_DEFAULT_VARIANT) ) + { + m_windowVariant = (wxWindowVariant) wxSystemOptions::GetOptionInt( wxWINDOW_DEFAULT_VARIANT ) ; + } +#endif + + // Whether we're using the current theme for this window (wxGTK only for now) + m_themeEnabled = false; + + // This is set to true by SendDestroyEvent() which should be called by the + // most derived class to ensure that the destruction event is sent as soon + // as possible to allow its handlers to still see the undestroyed window + m_isBeingDeleted = false; + + m_freezeCount = 0; +} + +// common part of window creation process +bool wxWindowBase::CreateBase(wxWindowBase *parent, + wxWindowID id, + const wxPoint& WXUNUSED(pos), + const wxSize& size, + long style, + const wxString& name) +{ + // ids are limited to 16 bits under MSW so if you care about portability, + // it's not a good idea to use ids out of this range (and negative ids are + // reserved for wxWidgets own usage) + wxASSERT_MSG( id == wxID_ANY || (id >= 0 && id < 32767) || + (id >= wxID_AUTO_LOWEST && id <= wxID_AUTO_HIGHEST), + wxT("invalid id value") ); + + // generate a new id if the user doesn't care about it + if ( id == wxID_ANY ) + { + m_windowId = NewControlId(); + } + else // valid id specified + { + m_windowId = id; + } + + // don't use SetWindowStyleFlag() here, this function should only be called + // to change the flag after creation as it tries to reflect the changes in + // flags by updating the window dynamically and we don't need this here + m_windowStyle = style; + + // assume the user doesn't want this window to shrink beneath its initial + // size, this worked like this in wxWidgets 2.8 and before and generally + // often makes sense for child windows (for top level ones it definitely + // does not as the user should be able to resize the window) + // + // note that we can't use IsTopLevel() from ctor + if ( size != wxDefaultSize && !wxTopLevelWindows.Find((wxWindow *)this) ) + SetMinSize(size); + + SetName(name); + SetParent(parent); + + return true; +} + +bool wxWindowBase::CreateBase(wxWindowBase *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& wxVALIDATOR_PARAM(validator), + const wxString& name) +{ + if ( !CreateBase(parent, id, pos, size, style, name) ) + return false; + +#if wxUSE_VALIDATORS + SetValidator(validator); +#endif // wxUSE_VALIDATORS + + // if the parent window has wxWS_EX_VALIDATE_RECURSIVELY set, we want to + // have it too - like this it's possible to set it only in the top level + // dialog/frame and all children will inherit it by defult + if ( parent && (parent->GetExtraStyle() & wxWS_EX_VALIDATE_RECURSIVELY) ) + { + SetExtraStyle(GetExtraStyle() | wxWS_EX_VALIDATE_RECURSIVELY); + } + + return true; +} + +bool wxWindowBase::ToggleWindowStyle(int flag) +{ + wxASSERT_MSG( flag, wxT("flags with 0 value can't be toggled") ); + + bool rc; + long style = GetWindowStyleFlag(); + if ( style & flag ) + { + style &= ~flag; + rc = false; + } + else // currently off + { + style |= flag; + rc = true; + } + + SetWindowStyleFlag(style); + + return rc; +} + +// ---------------------------------------------------------------------------- +// destruction +// ---------------------------------------------------------------------------- + +// common clean up +wxWindowBase::~wxWindowBase() +{ + wxASSERT_MSG( !wxMouseCapture::IsInCaptureStack(this), + "Destroying window before releasing mouse capture: this " + "will result in a crash later." ); + + // FIXME if these 2 cases result from programming errors in the user code + // we should probably assert here instead of silently fixing them + + // Just in case the window has been Closed, but we're then deleting + // immediately: don't leave dangling pointers. + wxPendingDelete.DeleteObject(this); + + // Just in case we've loaded a top-level window via LoadNativeDialog but + // we weren't a dialog class + wxTopLevelWindows.DeleteObject((wxWindow*)this); + + // Any additional event handlers should be popped before the window is + // deleted as otherwise the last handler will be left with a dangling + // pointer to this window result in a difficult to diagnose crash later on. + wxASSERT_MSG( GetEventHandler() == this, + wxT("any pushed event handlers must have been removed") ); + +#if wxUSE_MENUS + // The associated popup menu can still be alive, disassociate from it in + // this case + if ( wxCurrentPopupMenu && wxCurrentPopupMenu->GetInvokingWindow() == this ) + wxCurrentPopupMenu->SetInvokingWindow(NULL); +#endif // wxUSE_MENUS + + wxASSERT_MSG( GetChildren().GetCount() == 0, wxT("children not destroyed") ); + + // notify the parent about this window destruction + if ( m_parent ) + m_parent->RemoveChild(this); + +#if wxUSE_CARET + delete m_caret; +#endif // wxUSE_CARET + +#if wxUSE_VALIDATORS + delete m_windowValidator; +#endif // wxUSE_VALIDATORS + +#if wxUSE_CONSTRAINTS + // Have to delete constraints/sizer FIRST otherwise sizers may try to look + // at deleted windows as they delete themselves. + DeleteRelatedConstraints(); + + if ( m_constraints ) + { + // This removes any dangling pointers to this window in other windows' + // constraintsInvolvedIn lists. + UnsetConstraints(m_constraints); + wxDELETE(m_constraints); + } +#endif // wxUSE_CONSTRAINTS + + if ( m_containingSizer ) + m_containingSizer->Detach( (wxWindow*)this ); + + delete m_windowSizer; + +#if wxUSE_DRAG_AND_DROP + delete m_dropTarget; +#endif // wxUSE_DRAG_AND_DROP + +#if wxUSE_TOOLTIPS + delete m_tooltip; +#endif // wxUSE_TOOLTIPS + +#if wxUSE_ACCESSIBILITY + delete m_accessible; +#endif + +#if wxUSE_HELP + // NB: this has to be called unconditionally, because we don't know + // whether this window has associated help text or not + wxHelpProvider *helpProvider = wxHelpProvider::Get(); + if ( helpProvider ) + helpProvider->RemoveHelp(this); +#endif +} + +bool wxWindowBase::IsBeingDeleted() const +{ + return m_isBeingDeleted || + (!IsTopLevel() && m_parent && m_parent->IsBeingDeleted()); +} + +void wxWindowBase::SendDestroyEvent() +{ + if ( m_isBeingDeleted ) + { + // we could have been already called from a more derived class dtor, + // e.g. ~wxTLW calls us and so does ~wxWindow and the latter call + // should be simply ignored + return; + } + + m_isBeingDeleted = true; + + wxWindowDestroyEvent event; + event.SetEventObject(this); + event.SetId(GetId()); + GetEventHandler()->ProcessEvent(event); +} + +bool wxWindowBase::Destroy() +{ + // If our handle is invalid, it means that this window has never been + // created, either because creating it failed or, more typically, because + // this wxWindow object was default-constructed and its Create() method had + // never been called. As we didn't send wxWindowCreateEvent in this case + // (which is sent after successful creation), don't send the matching + // wxWindowDestroyEvent neither. + if ( GetHandle() ) + SendDestroyEvent(); + + delete this; + + return true; +} + +bool wxWindowBase::Close(bool force) +{ + wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId); + event.SetEventObject(this); + event.SetCanVeto(!force); + + // return false if window wasn't closed because the application vetoed the + // close event + return HandleWindowEvent(event) && !event.GetVeto(); +} + +bool wxWindowBase::DestroyChildren() +{ + wxWindowList::compatibility_iterator node; + for ( ;; ) + { + // we iterate until the list becomes empty + node = GetChildren().GetFirst(); + if ( !node ) + break; + + wxWindow *child = node->GetData(); + + // note that we really want to delete it immediately so don't call the + // possible overridden Destroy() version which might not delete the + // child immediately resulting in problems with our (top level) child + // outliving its parent + child->wxWindowBase::Destroy(); + + wxASSERT_MSG( !GetChildren().Find(child), + wxT("child didn't remove itself using RemoveChild()") ); + } + + return true; +} + +// ---------------------------------------------------------------------------- +// size/position related methods +// ---------------------------------------------------------------------------- + +// centre the window with respect to its parent in either (or both) directions +void wxWindowBase::DoCentre(int dir) +{ + wxCHECK_RET( !(dir & wxCENTRE_ON_SCREEN) && GetParent(), + wxT("this method only implements centering child windows") ); + + SetSize(GetRect().CentreIn(GetParent()->GetClientSize(), dir)); +} + +// fits the window around the children +void wxWindowBase::Fit() +{ + SetSize(GetBestSize()); +} + +// fits virtual size (ie. scrolled area etc.) around children +void wxWindowBase::FitInside() +{ + SetVirtualSize( GetBestVirtualSize() ); +} + +// On Mac, scrollbars are explicitly children. +#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) +static bool wxHasRealChildren(const wxWindowBase* win) +{ + int realChildCount = 0; + + for ( wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + wxWindow *win = node->GetData(); + if ( !win->IsTopLevel() && win->IsShown() +#if wxUSE_SCROLLBAR + && !wxDynamicCast(win, wxScrollBar) +#endif + ) + realChildCount ++; + } + return (realChildCount > 0); +} +#endif + +void wxWindowBase::InvalidateBestSize() +{ + m_bestSizeCache = wxDefaultSize; + + // parent's best size calculation may depend on its children's + // as long as child window we are in is not top level window itself + // (because the TLW size is never resized automatically) + // so let's invalidate it as well to be safe: + if (m_parent && !IsTopLevel()) + m_parent->InvalidateBestSize(); +} + +// return the size best suited for the current window +wxSize wxWindowBase::DoGetBestSize() const +{ + wxSize best; + + if ( m_windowSizer ) + { + best = m_windowSizer->GetMinSize(); + } +#if wxUSE_CONSTRAINTS + else if ( m_constraints ) + { + wxConstCast(this, wxWindowBase)->SatisfyConstraints(); + + // our minimal acceptable size is such that all our windows fit inside + int maxX = 0, + maxY = 0; + + for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + wxLayoutConstraints *c = node->GetData()->GetConstraints(); + if ( !c ) + { + // it's not normal that we have an unconstrained child, but + // what can we do about it? + continue; + } + + int x = c->right.GetValue(), + y = c->bottom.GetValue(); + + if ( x > maxX ) + maxX = x; + + if ( y > maxY ) + maxY = y; + + // TODO: we must calculate the overlaps somehow, otherwise we + // will never return a size bigger than the current one :-( + } + + best = wxSize(maxX, maxY); + } +#endif // wxUSE_CONSTRAINTS + else if ( !GetChildren().empty() +#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) + && wxHasRealChildren(this) +#endif + ) + { + // our minimal acceptable size is such that all our visible child + // windows fit inside + int maxX = 0, + maxY = 0; + + for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + wxWindow *win = node->GetData(); + if ( win->IsTopLevel() + || !win->IsShown() +#if wxUSE_STATUSBAR + || wxDynamicCast(win, wxStatusBar) +#endif // wxUSE_STATUSBAR + ) + { + // dialogs and frames lie in different top level windows - + // don't deal with them here; as for the status bars, they + // don't lie in the client area at all + continue; + } + + int wx, wy, ww, wh; + win->GetPosition(&wx, &wy); + + // if the window hadn't been positioned yet, assume that it is in + // the origin + if ( wx == wxDefaultCoord ) + wx = 0; + if ( wy == wxDefaultCoord ) + wy = 0; + + win->GetSize(&ww, &wh); + if ( wx + ww > maxX ) + maxX = wx + ww; + if ( wy + wh > maxY ) + maxY = wy + wh; + } + + best = wxSize(maxX, maxY); + } + else // ! has children + { + wxSize size = GetMinSize(); + if ( !size.IsFullySpecified() ) + { + // if the window doesn't define its best size we assume that it can + // be arbitrarily small -- usually this is not the case, of course, + // but we have no way to know what the limit is, it should really + // override DoGetBestClientSize() itself to tell us + size.SetDefaults(wxSize(1, 1)); + } + + // return as-is, unadjusted by the client size difference. + return size; + } + + // Add any difference between size and client size + wxSize diff = GetSize() - GetClientSize(); + best.x += wxMax(0, diff.x); + best.y += wxMax(0, diff.y); + + return best; +} + +// helper of GetWindowBorderSize(): as many ports don't implement support for +// wxSYS_BORDER/EDGE_X/Y metrics in their wxSystemSettings, use hard coded +// fallbacks in this case +static int wxGetMetricOrDefault(wxSystemMetric what, const wxWindowBase* win) +{ + int rc = wxSystemSettings::GetMetric( + what, static_cast(const_cast(win))); + if ( rc == -1 ) + { + switch ( what ) + { + case wxSYS_BORDER_X: + case wxSYS_BORDER_Y: + // 2D border is by default 1 pixel wide + rc = 1; + break; + + case wxSYS_EDGE_X: + case wxSYS_EDGE_Y: + // 3D borders are by default 2 pixels + rc = 2; + break; + + default: + wxFAIL_MSG( wxT("unexpected wxGetMetricOrDefault() argument") ); + rc = 0; + } + } + + return rc; +} + +wxSize wxWindowBase::GetWindowBorderSize() const +{ + wxSize size; + + switch ( GetBorder() ) + { + case wxBORDER_NONE: + // nothing to do, size is already (0, 0) + break; + + case wxBORDER_SIMPLE: + case wxBORDER_STATIC: + size.x = wxGetMetricOrDefault(wxSYS_BORDER_X, this); + size.y = wxGetMetricOrDefault(wxSYS_BORDER_Y, this); + break; + + case wxBORDER_SUNKEN: + case wxBORDER_RAISED: + size.x = wxMax(wxGetMetricOrDefault(wxSYS_EDGE_X, this), + wxGetMetricOrDefault(wxSYS_BORDER_X, this)); + size.y = wxMax(wxGetMetricOrDefault(wxSYS_EDGE_Y, this), + wxGetMetricOrDefault(wxSYS_BORDER_Y, this)); + break; + + case wxBORDER_DOUBLE: + size.x = wxGetMetricOrDefault(wxSYS_EDGE_X, this) + + wxGetMetricOrDefault(wxSYS_BORDER_X, this); + size.y = wxGetMetricOrDefault(wxSYS_EDGE_Y, this) + + wxGetMetricOrDefault(wxSYS_BORDER_Y, this); + break; + + default: + wxFAIL_MSG(wxT("Unknown border style.")); + break; + } + + // we have borders on both sides + return size*2; +} + +bool +wxWindowBase::InformFirstDirection(int direction, + int size, + int availableOtherDir) +{ + return GetSizer() && GetSizer()->InformFirstDirection(direction, + size, + availableOtherDir); +} + +wxSize wxWindowBase::GetEffectiveMinSize() const +{ + // merge the best size with the min size, giving priority to the min size + wxSize min = GetMinSize(); + + if (min.x == wxDefaultCoord || min.y == wxDefaultCoord) + { + wxSize best = GetBestSize(); + if (min.x == wxDefaultCoord) min.x = best.x; + if (min.y == wxDefaultCoord) min.y = best.y; + } + + return min; +} + +wxSize wxWindowBase::DoGetBorderSize() const +{ + // there is one case in which we can implement it for all ports easily + if ( GetBorder() == wxBORDER_NONE ) + return wxSize(0, 0); + + // otherwise use the difference between the real size and the client size + // as a fallback: notice that this is incorrect in general as client size + // also doesn't take the scrollbars into account + return GetSize() - GetClientSize(); +} + +wxSize wxWindowBase::GetBestSize() const +{ + if ( !m_windowSizer && m_bestSizeCache.IsFullySpecified() ) + return m_bestSizeCache; + + // call DoGetBestClientSize() first, if a derived class overrides it wants + // it to be used + wxSize size = DoGetBestClientSize(); + if ( size != wxDefaultSize ) + size += DoGetBorderSize(); + else + size = DoGetBestSize(); + + // Ensure that the best size is at least as large as min size. + size.IncTo(GetMinSize()); + + // And not larger than max size. + size.DecToIfSpecified(GetMaxSize()); + + // Finally cache result and return. + CacheBestSize(size); + return size; +} + +int wxWindowBase::GetBestHeight(int width) const +{ + const int height = DoGetBestClientHeight(width); + + return height == wxDefaultCoord + ? GetBestSize().y + : height + DoGetBorderSize().y; +} + +int wxWindowBase::GetBestWidth(int height) const +{ + const int width = DoGetBestClientWidth(height); + + return width == wxDefaultCoord + ? GetBestSize().x + : width + DoGetBorderSize().x; +} + +void wxWindowBase::SetMinSize(const wxSize& minSize) +{ + m_minWidth = minSize.x; + m_minHeight = minSize.y; + + InvalidateBestSize(); +} + +void wxWindowBase::SetMaxSize(const wxSize& maxSize) +{ + m_maxWidth = maxSize.x; + m_maxHeight = maxSize.y; + + InvalidateBestSize(); +} + +void wxWindowBase::SetInitialSize(const wxSize& size) +{ + // Set the min size to the size passed in. This will usually either be + // wxDefaultSize or the size passed to this window's ctor/Create function. + SetMinSize(size); + + // Merge the size with the best size if needed + wxSize best = GetEffectiveMinSize(); + + // If the current size doesn't match then change it + if (GetSize() != best) + SetSize(best); +} + + +// by default the origin is not shifted +wxPoint wxWindowBase::GetClientAreaOrigin() const +{ + return wxPoint(0,0); +} + +wxSize wxWindowBase::ClientToWindowSize(const wxSize& size) const +{ + const wxSize diff(GetSize() - GetClientSize()); + + return wxSize(size.x == -1 ? -1 : size.x + diff.x, + size.y == -1 ? -1 : size.y + diff.y); +} + +wxSize wxWindowBase::WindowToClientSize(const wxSize& size) const +{ + const wxSize diff(GetSize() - GetClientSize()); + + return wxSize(size.x == -1 ? -1 : size.x - diff.x, + size.y == -1 ? -1 : size.y - diff.y); +} + +void wxWindowBase::SetWindowVariant( wxWindowVariant variant ) +{ + if ( m_windowVariant != variant ) + { + m_windowVariant = variant; + + DoSetWindowVariant(variant); + } +} + +void wxWindowBase::DoSetWindowVariant( wxWindowVariant variant ) +{ + // adjust the font height to correspond to our new variant (notice that + // we're only called if something really changed) + wxFont font = GetFont(); + int size = font.GetPointSize(); + switch ( variant ) + { + case wxWINDOW_VARIANT_NORMAL: + break; + + case wxWINDOW_VARIANT_SMALL: + size = wxRound(size * 3.0 / 4.0); + break; + + case wxWINDOW_VARIANT_MINI: + size = wxRound(size * 2.0 / 3.0); + break; + + case wxWINDOW_VARIANT_LARGE: + size = wxRound(size * 5.0 / 4.0); + break; + + default: + wxFAIL_MSG(wxT("unexpected window variant")); + break; + } + + font.SetPointSize(size); + SetFont(font); +} + +void wxWindowBase::DoSetSizeHints( int minW, int minH, + int maxW, int maxH, + int WXUNUSED(incW), int WXUNUSED(incH) ) +{ + wxCHECK_RET( (minW == wxDefaultCoord || maxW == wxDefaultCoord || minW <= maxW) && + (minH == wxDefaultCoord || maxH == wxDefaultCoord || minH <= maxH), + wxT("min width/height must be less than max width/height!") ); + + m_minWidth = minW; + m_maxWidth = maxW; + m_minHeight = minH; + m_maxHeight = maxH; +} + + +#if WXWIN_COMPATIBILITY_2_8 +void wxWindowBase::SetVirtualSizeHints(int WXUNUSED(minW), int WXUNUSED(minH), + int WXUNUSED(maxW), int WXUNUSED(maxH)) +{ +} + +void wxWindowBase::SetVirtualSizeHints(const wxSize& WXUNUSED(minsize), + const wxSize& WXUNUSED(maxsize)) +{ +} +#endif // WXWIN_COMPATIBILITY_2_8 + +void wxWindowBase::DoSetVirtualSize( int x, int y ) +{ + m_virtualSize = wxSize(x, y); +} + +wxSize wxWindowBase::DoGetVirtualSize() const +{ + // we should use the entire client area so if it is greater than our + // virtual size, expand it to fit (otherwise if the window is big enough we + // wouldn't be using parts of it) + wxSize size = GetClientSize(); + if ( m_virtualSize.x > size.x ) + size.x = m_virtualSize.x; + + if ( m_virtualSize.y >= size.y ) + size.y = m_virtualSize.y; + + return size; +} + +void wxWindowBase::DoGetScreenPosition(int *x, int *y) const +{ + // screen position is the same as (0, 0) in client coords for non TLWs (and + // TLWs override this method) + if ( x ) + *x = 0; + if ( y ) + *y = 0; + + ClientToScreen(x, y); +} + +void wxWindowBase::SendSizeEvent(int flags) +{ + wxSizeEvent event(GetSize(), GetId()); + event.SetEventObject(this); + if ( flags & wxSEND_EVENT_POST ) + wxPostEvent(GetEventHandler(), event); + else + HandleWindowEvent(event); +} + +void wxWindowBase::SendSizeEventToParent(int flags) +{ + wxWindow * const parent = GetParent(); + if ( parent && !parent->IsBeingDeleted() ) + parent->SendSizeEvent(flags); +} + +bool wxWindowBase::CanScroll(int orient) const +{ + return (m_windowStyle & + (orient == wxHORIZONTAL ? wxHSCROLL : wxVSCROLL)) != 0; +} + +bool wxWindowBase::HasScrollbar(int orient) const +{ + // if scrolling in the given direction is disabled, we can't have the + // corresponding scrollbar no matter what + if ( !CanScroll(orient) ) + return false; + + const wxSize sizeVirt = GetVirtualSize(); + const wxSize sizeClient = GetClientSize(); + + return orient == wxHORIZONTAL ? sizeVirt.x > sizeClient.x + : sizeVirt.y > sizeClient.y; +} + +// ---------------------------------------------------------------------------- +// show/hide/enable/disable the window +// ---------------------------------------------------------------------------- + +bool wxWindowBase::Show(bool show) +{ + if ( show != m_isShown ) + { + m_isShown = show; + + return true; + } + else + { + return false; + } +} + +bool wxWindowBase::IsEnabled() const +{ + return IsThisEnabled() && (IsTopLevel() || !GetParent() || GetParent()->IsEnabled()); +} + +void wxWindowBase::NotifyWindowOnEnableChange(bool enabled) +{ + // Under some platforms there is no need to update the window state + // explicitly, it will become disabled when its parent is. On other ones we + // do need to disable all windows recursively though. +#ifndef wxHAS_NATIVE_ENABLED_MANAGEMENT + DoEnable(enabled); +#endif // !defined(wxHAS_NATIVE_ENABLED_MANAGEMENT) + + // Disabling a top level window is typically done when showing a modal + // dialog and we don't need to disable its children in this case, they will + // be logically disabled anyhow (i.e. their IsEnabled() will return false) + // and the TLW won't accept any input for them. Moreover, explicitly + // disabling them would look ugly as the entire TLW would be greyed out + // whenever a modal dialog is shown and no native applications under any + // platform behave like this. + if ( IsTopLevel() && !enabled ) + return; + + // When disabling (or enabling back) a non-TLW window we need to + // recursively propagate the change of the state to its children, otherwise + // they would still show as enabled even though they wouldn't actually + // accept any input (at least under MSW where children don't accept input + // if any of the windows in their parent chain is enabled). +#ifndef wxHAS_NATIVE_ENABLED_MANAGEMENT + for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + wxWindowBase * const child = node->GetData(); + if ( !child->IsTopLevel() && child->IsThisEnabled() ) + child->NotifyWindowOnEnableChange(enabled); + } +#endif // !defined(wxHAS_NATIVE_ENABLED_MANAGEMENT) +} + +bool wxWindowBase::Enable(bool enable) +{ + if ( enable == IsThisEnabled() ) + return false; + + m_isEnabled = enable; + + // If we call DoEnable() from NotifyWindowOnEnableChange(), we don't need + // to do it from here. +#ifdef wxHAS_NATIVE_ENABLED_MANAGEMENT + DoEnable(enable); +#endif // !defined(wxHAS_NATIVE_ENABLED_MANAGEMENT) + + NotifyWindowOnEnableChange(enable); + + return true; +} + +bool wxWindowBase::IsShownOnScreen() const +{ + // A window is shown on screen if it itself is shown and so are all its + // parents. But if a window is toplevel one, then its always visible on + // screen if IsShown() returns true, even if it has a hidden parent. + return IsShown() && + (IsTopLevel() || GetParent() == NULL || GetParent()->IsShownOnScreen()); +} + +// ---------------------------------------------------------------------------- +// RTTI +// ---------------------------------------------------------------------------- + +bool wxWindowBase::IsTopLevel() const +{ + return false; +} + +// ---------------------------------------------------------------------------- +// Freeze/Thaw +// ---------------------------------------------------------------------------- + +void wxWindowBase::Freeze() +{ + if ( !m_freezeCount++ ) + { + // physically freeze this window: + DoFreeze(); + + // and recursively freeze all children: + for ( wxWindowList::iterator i = GetChildren().begin(); + i != GetChildren().end(); ++i ) + { + wxWindow *child = *i; + if ( child->IsTopLevel() ) + continue; + + child->Freeze(); + } + } +} + +void wxWindowBase::Thaw() +{ + wxASSERT_MSG( m_freezeCount, "Thaw() without matching Freeze()" ); + + if ( !--m_freezeCount ) + { + // recursively thaw all children: + for ( wxWindowList::iterator i = GetChildren().begin(); + i != GetChildren().end(); ++i ) + { + wxWindow *child = *i; + if ( child->IsTopLevel() ) + continue; + + child->Thaw(); + } + + // physically thaw this window: + DoThaw(); + } +} + +// ---------------------------------------------------------------------------- +// Dealing with parents and children. +// ---------------------------------------------------------------------------- + +bool wxWindowBase::IsDescendant(wxWindowBase* win) const +{ + // Iterate until we find this window in the parent chain or exhaust it. + while ( win ) + { + if ( win == this ) + return true; + + // Stop iterating on reaching the top level window boundary. + if ( win->IsTopLevel() ) + break; + + win = win->GetParent(); + } + + return false; +} + +void wxWindowBase::AddChild(wxWindowBase *child) +{ + wxCHECK_RET( child, wxT("can't add a NULL child") ); + + // this should never happen and it will lead to a crash later if it does + // because RemoveChild() will remove only one node from the children list + // and the other(s) one(s) will be left with dangling pointers in them + wxASSERT_MSG( !GetChildren().Find((wxWindow*)child), wxT("AddChild() called twice") ); + + GetChildren().Append((wxWindow*)child); + child->SetParent(this); + + // adding a child while frozen will assert when thawed, so freeze it as if + // it had been already present when we were frozen + if ( IsFrozen() && !child->IsTopLevel() ) + child->Freeze(); +} + +void wxWindowBase::RemoveChild(wxWindowBase *child) +{ + wxCHECK_RET( child, wxT("can't remove a NULL child") ); + + // removing a child while frozen may result in permanently frozen window + // if used e.g. from Reparent(), so thaw it + // + // NB: IsTopLevel() doesn't return true any more when a TLW child is being + // removed from its ~wxWindowBase, so check for IsBeingDeleted() too + if ( IsFrozen() && !child->IsBeingDeleted() && !child->IsTopLevel() ) + child->Thaw(); + + GetChildren().DeleteObject((wxWindow *)child); + child->SetParent(NULL); +} + +void wxWindowBase::SetParent(wxWindowBase *parent) +{ + // This assert catches typos which may result in using "this" instead of + // "parent" when creating the window. This doesn't happen often but when it + // does the results are unpleasant because the program typically just + // crashes when due to a stack overflow or something similar and this + // assert doesn't cost much (OTOH doing a more general check that the + // parent is not one of our children would be more expensive and probably + // not worth it). + wxASSERT_MSG( parent != this, wxS("Can't use window as its own parent") ); + + m_parent = (wxWindow *)parent; +} + +bool wxWindowBase::Reparent(wxWindowBase *newParent) +{ + wxWindow *oldParent = GetParent(); + if ( newParent == oldParent ) + { + // nothing done + return false; + } + + const bool oldEnabledState = IsEnabled(); + + // unlink this window from the existing parent. + if ( oldParent ) + { + oldParent->RemoveChild(this); + } + else + { + wxTopLevelWindows.DeleteObject((wxWindow *)this); + } + + // add it to the new one + if ( newParent ) + { + newParent->AddChild(this); + } + else + { + wxTopLevelWindows.Append((wxWindow *)this); + } + + // We need to notify window (and its subwindows) if by changing the parent + // we also change our enabled/disabled status. + const bool newEnabledState = IsEnabled(); + if ( newEnabledState != oldEnabledState ) + { + NotifyWindowOnEnableChange(newEnabledState); + } + + return true; +} + +// ---------------------------------------------------------------------------- +// event handler stuff +// ---------------------------------------------------------------------------- + +void wxWindowBase::SetEventHandler(wxEvtHandler *handler) +{ + wxCHECK_RET(handler != NULL, "SetEventHandler(NULL) called"); + + m_eventHandler = handler; +} + +void wxWindowBase::SetNextHandler(wxEvtHandler *WXUNUSED(handler)) +{ + // disable wxEvtHandler chain mechanism for wxWindows: + // wxWindow uses its own stack mechanism which doesn't mix well with wxEvtHandler's one + + wxFAIL_MSG("wxWindow cannot be part of a wxEvtHandler chain"); +} +void wxWindowBase::SetPreviousHandler(wxEvtHandler *WXUNUSED(handler)) +{ + // we can't simply wxFAIL here as in SetNextHandler: in fact the last + // handler of our stack when is destroyed will be Unlink()ed and thus + // will call this function to update the pointer of this window... + + //wxFAIL_MSG("wxWindow cannot be part of a wxEvtHandler chain"); +} + +void wxWindowBase::PushEventHandler(wxEvtHandler *handlerToPush) +{ + wxCHECK_RET( handlerToPush != NULL, "PushEventHandler(NULL) called" ); + + // the new handler is going to be part of the wxWindow stack of event handlers: + // it can't be part also of an event handler double-linked chain: + wxASSERT_MSG(handlerToPush->IsUnlinked(), + "The handler being pushed in the wxWindow stack shouldn't be part of " + "a wxEvtHandler chain; call Unlink() on it first"); + + wxEvtHandler *handlerOld = GetEventHandler(); + wxCHECK_RET( handlerOld, "an old event handler is NULL?" ); + + // now use wxEvtHandler double-linked list to implement a stack: + handlerToPush->SetNextHandler(handlerOld); + + if (handlerOld != this) + handlerOld->SetPreviousHandler(handlerToPush); + + SetEventHandler(handlerToPush); + +#if wxDEBUG_LEVEL + // final checks of the operations done above: + wxASSERT_MSG( handlerToPush->GetPreviousHandler() == NULL, + "the first handler of the wxWindow stack should " + "have no previous handlers set" ); + wxASSERT_MSG( handlerToPush->GetNextHandler() != NULL, + "the first handler of the wxWindow stack should " + "have non-NULL next handler" ); + + wxEvtHandler* pLast = handlerToPush; + while ( pLast && pLast != this ) + pLast = pLast->GetNextHandler(); + wxASSERT_MSG( pLast->GetNextHandler() == NULL, + "the last handler of the wxWindow stack should " + "have this window as next handler" ); +#endif // wxDEBUG_LEVEL +} + +wxEvtHandler *wxWindowBase::PopEventHandler(bool deleteHandler) +{ + // we need to pop the wxWindow stack, i.e. we need to remove the first handler + + wxEvtHandler *firstHandler = GetEventHandler(); + wxCHECK_MSG( firstHandler != NULL, NULL, "wxWindow cannot have a NULL event handler" ); + wxCHECK_MSG( firstHandler != this, NULL, "cannot pop the wxWindow itself" ); + wxCHECK_MSG( firstHandler->GetPreviousHandler() == NULL, NULL, + "the first handler of the wxWindow stack should have no previous handlers set" ); + + wxEvtHandler *secondHandler = firstHandler->GetNextHandler(); + wxCHECK_MSG( secondHandler != NULL, NULL, + "the first handler of the wxWindow stack should have non-NULL next handler" ); + + firstHandler->SetNextHandler(NULL); + + // It is harmless but useless to unset the previous handler of the window + // itself as it's always NULL anyhow, so don't do this. + if ( secondHandler != this ) + secondHandler->SetPreviousHandler(NULL); + + // now firstHandler is completely unlinked; set secondHandler as the new window event handler + SetEventHandler(secondHandler); + + if ( deleteHandler ) + { + wxDELETE(firstHandler); + } + + return firstHandler; +} + +bool wxWindowBase::RemoveEventHandler(wxEvtHandler *handlerToRemove) +{ + wxCHECK_MSG( handlerToRemove != NULL, false, "RemoveEventHandler(NULL) called" ); + wxCHECK_MSG( handlerToRemove != this, false, "Cannot remove the window itself" ); + + if (handlerToRemove == GetEventHandler()) + { + // removing the first event handler is equivalent to "popping" the stack + PopEventHandler(false); + return true; + } + + // NOTE: the wxWindow event handler list is always terminated with "this" handler + wxEvtHandler *handlerCur = GetEventHandler()->GetNextHandler(); + while ( handlerCur != this && handlerCur ) + { + wxEvtHandler *handlerNext = handlerCur->GetNextHandler(); + + if ( handlerCur == handlerToRemove ) + { + handlerCur->Unlink(); + + wxASSERT_MSG( handlerCur != GetEventHandler(), + "the case Remove == Pop should was already handled" ); + return true; + } + + handlerCur = handlerNext; + } + + wxFAIL_MSG( wxT("where has the event handler gone?") ); + + return false; +} + +bool wxWindowBase::HandleWindowEvent(wxEvent& event) const +{ + // SafelyProcessEvent() will handle exceptions nicely + return GetEventHandler()->SafelyProcessEvent(event); +} + +// ---------------------------------------------------------------------------- +// colours, fonts &c +// ---------------------------------------------------------------------------- + +void wxWindowBase::InheritAttributes() +{ + const wxWindowBase * const parent = GetParent(); + if ( !parent ) + return; + + // we only inherit attributes which had been explicitly set for the parent + // which ensures that this only happens if the user really wants it and + // not by default which wouldn't make any sense in modern GUIs where the + // controls don't all use the same fonts (nor colours) + if ( parent->m_inheritFont && !m_hasFont ) + SetFont(parent->GetFont()); + + // in addition, there is a possibility to explicitly forbid inheriting + // colours at each class level by overriding ShouldInheritColours() + if ( ShouldInheritColours() ) + { + if ( parent->m_inheritFgCol && !m_hasFgCol ) + SetForegroundColour(parent->GetForegroundColour()); + + // inheriting (solid) background colour is wrong as it totally breaks + // any kind of themed backgrounds + // + // instead, the controls should use the same background as their parent + // (ideally by not drawing it at all) +#if 0 + if ( parent->m_inheritBgCol && !m_hasBgCol ) + SetBackgroundColour(parent->GetBackgroundColour()); +#endif // 0 + } +} + +/* static */ wxVisualAttributes +wxWindowBase::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +{ + // it is important to return valid values for all attributes from here, + // GetXXX() below rely on this + wxVisualAttributes attrs; + attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); + + // On Smartphone/PocketPC, wxSYS_COLOUR_WINDOW is a better reflection of + // the usual background colour than wxSYS_COLOUR_BTNFACE. + // It's a pity that wxSYS_COLOUR_WINDOW isn't always a suitable background + // colour on other platforms. + +#if defined(__WXWINCE__) && (defined(__SMARTPHONE__) || defined(__POCKETPC__)) + attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); +#else + attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); +#endif + return attrs; +} + +wxColour wxWindowBase::GetBackgroundColour() const +{ + if ( !m_backgroundColour.IsOk() ) + { + wxASSERT_MSG( !m_hasBgCol, wxT("we have invalid explicit bg colour?") ); + + // get our default background colour + wxColour colBg = GetDefaultAttributes().colBg; + + // we must return some valid colour to avoid redoing this every time + // and also to avoid surprising the applications written for older + // wxWidgets versions where GetBackgroundColour() always returned + // something -- so give them something even if it doesn't make sense + // for this window (e.g. it has a themed background) + if ( !colBg.IsOk() ) + colBg = GetClassDefaultAttributes().colBg; + + return colBg; + } + else + return m_backgroundColour; +} + +wxColour wxWindowBase::GetForegroundColour() const +{ + // logic is the same as above + if ( !m_hasFgCol && !m_foregroundColour.IsOk() ) + { + wxColour colFg = GetDefaultAttributes().colFg; + + if ( !colFg.IsOk() ) + colFg = GetClassDefaultAttributes().colFg; + + return colFg; + } + else + return m_foregroundColour; +} + +bool wxWindowBase::SetBackgroundStyle(wxBackgroundStyle style) +{ + // The checks below shouldn't be triggered if we're not really changing the + // style. + if ( style == m_backgroundStyle ) + return true; + + // Transparent background style can be only set before creation because of + // wxGTK limitation. + wxCHECK_MSG( (style != wxBG_STYLE_TRANSPARENT) || !GetHandle(), + false, + "wxBG_STYLE_TRANSPARENT style can only be set before " + "Create()-ing the window." ); + + // And once it is set, wxBG_STYLE_TRANSPARENT can't be unset. + wxCHECK_MSG( (m_backgroundStyle != wxBG_STYLE_TRANSPARENT) || + (style == wxBG_STYLE_TRANSPARENT), + false, + "wxBG_STYLE_TRANSPARENT can't be unset once it was set." ); + + m_backgroundStyle = style; + + return true; +} + +bool wxWindowBase::IsTransparentBackgroundSupported(wxString *reason) const +{ + if ( reason ) + *reason = _("This platform does not support background transparency."); + + return false; +} + +bool wxWindowBase::SetBackgroundColour( const wxColour &colour ) +{ + if ( colour == m_backgroundColour ) + return false; + + m_hasBgCol = colour.IsOk(); + + m_inheritBgCol = m_hasBgCol; + m_backgroundColour = colour; + SetThemeEnabled( !m_hasBgCol && !m_foregroundColour.IsOk() ); + return true; +} + +bool wxWindowBase::SetForegroundColour( const wxColour &colour ) +{ + if (colour == m_foregroundColour ) + return false; + + m_hasFgCol = colour.IsOk(); + m_inheritFgCol = m_hasFgCol; + m_foregroundColour = colour; + SetThemeEnabled( !m_hasFgCol && !m_backgroundColour.IsOk() ); + return true; +} + +bool wxWindowBase::SetCursor(const wxCursor& cursor) +{ + // setting an invalid cursor is ok, it means that we don't have any special + // cursor + if ( m_cursor.IsSameAs(cursor) ) + { + // no change + return false; + } + + m_cursor = cursor; + + return true; +} + +wxFont wxWindowBase::GetFont() const +{ + // logic is the same as in GetBackgroundColour() + if ( !m_font.IsOk() ) + { + wxASSERT_MSG( !m_hasFont, wxT("we have invalid explicit font?") ); + + wxFont font = GetDefaultAttributes().font; + if ( !font.IsOk() ) + font = GetClassDefaultAttributes().font; + + return font; + } + else + return m_font; +} + +bool wxWindowBase::SetFont(const wxFont& font) +{ + if ( font == m_font ) + { + // no change + return false; + } + + m_font = font; + m_hasFont = font.IsOk(); + m_inheritFont = m_hasFont; + + InvalidateBestSize(); + + return true; +} + +#if wxUSE_PALETTE + +void wxWindowBase::SetPalette(const wxPalette& pal) +{ + m_hasCustomPalette = true; + m_palette = pal; + + // VZ: can anyone explain me what do we do here? + wxWindowDC d((wxWindow *) this); + d.SetPalette(pal); +} + +wxWindow *wxWindowBase::GetAncestorWithCustomPalette() const +{ + wxWindow *win = (wxWindow *)this; + while ( win && !win->HasCustomPalette() ) + { + win = win->GetParent(); + } + + return win; +} + +#endif // wxUSE_PALETTE + +#if wxUSE_CARET +void wxWindowBase::SetCaret(wxCaret *caret) +{ + if ( m_caret ) + { + delete m_caret; + } + + m_caret = caret; + + if ( m_caret ) + { + wxASSERT_MSG( m_caret->GetWindow() == this, + wxT("caret should be created associated to this window") ); + } +} +#endif // wxUSE_CARET + +#if wxUSE_VALIDATORS +// ---------------------------------------------------------------------------- +// validators +// ---------------------------------------------------------------------------- + +void wxWindowBase::SetValidator(const wxValidator& validator) +{ + if ( m_windowValidator ) + delete m_windowValidator; + + m_windowValidator = (wxValidator *)validator.Clone(); + + if ( m_windowValidator ) + m_windowValidator->SetWindow(this); +} +#endif // wxUSE_VALIDATORS + +// ---------------------------------------------------------------------------- +// update region stuff +// ---------------------------------------------------------------------------- + +wxRect wxWindowBase::GetUpdateClientRect() const +{ + wxRegion rgnUpdate = GetUpdateRegion(); + rgnUpdate.Intersect(GetClientRect()); + wxRect rectUpdate = rgnUpdate.GetBox(); + wxPoint ptOrigin = GetClientAreaOrigin(); + rectUpdate.x -= ptOrigin.x; + rectUpdate.y -= ptOrigin.y; + + return rectUpdate; +} + +bool wxWindowBase::DoIsExposed(int x, int y) const +{ + return m_updateRegion.Contains(x, y) != wxOutRegion; +} + +bool wxWindowBase::DoIsExposed(int x, int y, int w, int h) const +{ + return m_updateRegion.Contains(x, y, w, h) != wxOutRegion; +} + +void wxWindowBase::ClearBackground() +{ + // wxGTK uses its own version, no need to add never used code +#ifndef __WXGTK__ + wxClientDC dc((wxWindow *)this); + wxBrush brush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID); + dc.SetBackground(brush); + dc.Clear(); +#endif // __WXGTK__ +} + +// ---------------------------------------------------------------------------- +// find child window by id or name +// ---------------------------------------------------------------------------- + +wxWindow *wxWindowBase::FindWindow(long id) const +{ + if ( id == m_windowId ) + return (wxWindow *)this; + + wxWindowBase *res = NULL; + wxWindowList::compatibility_iterator node; + for ( node = m_children.GetFirst(); node && !res; node = node->GetNext() ) + { + wxWindowBase *child = node->GetData(); + + // As usual, don't recurse into child dialogs, finding a button in a + // child dialog when looking in this window would be unexpected. + if ( child->IsTopLevel() ) + continue; + + res = child->FindWindow( id ); + } + + return (wxWindow *)res; +} + +wxWindow *wxWindowBase::FindWindow(const wxString& name) const +{ + if ( name == m_windowName ) + return (wxWindow *)this; + + wxWindowBase *res = NULL; + wxWindowList::compatibility_iterator node; + for ( node = m_children.GetFirst(); node && !res; node = node->GetNext() ) + { + wxWindow *child = node->GetData(); + + // As in FindWindow() overload above, never recurse into child dialogs. + if ( child->IsTopLevel() ) + continue; + + res = child->FindWindow(name); + } + + return (wxWindow *)res; +} + + +// find any window by id or name or label: If parent is non-NULL, look through +// children for a label or title matching the specified string. If NULL, look +// through all top-level windows. +// +// to avoid duplicating code we reuse the same helper function but with +// different comparators + +typedef bool (*wxFindWindowCmp)(const wxWindow *win, + const wxString& label, long id); + +static +bool wxFindWindowCmpLabels(const wxWindow *win, const wxString& label, + long WXUNUSED(id)) +{ + return win->GetLabel() == label; +} + +static +bool wxFindWindowCmpNames(const wxWindow *win, const wxString& label, + long WXUNUSED(id)) +{ + return win->GetName() == label; +} + +static +bool wxFindWindowCmpIds(const wxWindow *win, const wxString& WXUNUSED(label), + long id) +{ + return win->GetId() == id; +} + +// recursive helper for the FindWindowByXXX() functions +static +wxWindow *wxFindWindowRecursively(const wxWindow *parent, + const wxString& label, + long id, + wxFindWindowCmp cmp) +{ + if ( parent ) + { + // see if this is the one we're looking for + if ( (*cmp)(parent, label, id) ) + return (wxWindow *)parent; + + // It wasn't, so check all its children + for ( wxWindowList::compatibility_iterator node = parent->GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + // recursively check each child + wxWindow *win = (wxWindow *)node->GetData(); + wxWindow *retwin = wxFindWindowRecursively(win, label, id, cmp); + if (retwin) + return retwin; + } + } + + // Not found + return NULL; +} + +// helper for FindWindowByXXX() +static +wxWindow *wxFindWindowHelper(const wxWindow *parent, + const wxString& label, + long id, + wxFindWindowCmp cmp) +{ + if ( parent ) + { + // just check parent and all its children + return wxFindWindowRecursively(parent, label, id, cmp); + } + + // start at very top of wx's windows + for ( wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); + node; + node = node->GetNext() ) + { + // recursively check each window & its children + wxWindow *win = node->GetData(); + wxWindow *retwin = wxFindWindowRecursively(win, label, id, cmp); + if (retwin) + return retwin; + } + + return NULL; +} + +/* static */ +wxWindow * +wxWindowBase::FindWindowByLabel(const wxString& title, const wxWindow *parent) +{ + return wxFindWindowHelper(parent, title, 0, wxFindWindowCmpLabels); +} + +/* static */ +wxWindow * +wxWindowBase::FindWindowByName(const wxString& title, const wxWindow *parent) +{ + wxWindow *win = wxFindWindowHelper(parent, title, 0, wxFindWindowCmpNames); + + if ( !win ) + { + // fall back to the label + win = FindWindowByLabel(title, parent); + } + + return win; +} + +/* static */ +wxWindow * +wxWindowBase::FindWindowById( long id, const wxWindow* parent ) +{ + return wxFindWindowHelper(parent, wxEmptyString, id, wxFindWindowCmpIds); +} + +// ---------------------------------------------------------------------------- +// dialog oriented functions +// ---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_8 +void wxWindowBase::MakeModal(bool modal) +{ + // Disable all other windows + if ( IsTopLevel() ) + { + wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); + while (node) + { + wxWindow *win = node->GetData(); + if (win != this) + win->Enable(!modal); + + node = node->GetNext(); + } + } +} +#endif // WXWIN_COMPATIBILITY_2_8 + +#if wxUSE_VALIDATORS + +namespace +{ + +// This class encapsulates possibly recursive iteration on window children done +// by Validate() and TransferData{To,From}Window() and allows to avoid code +// duplication in all three functions. +class ValidationTraverserBase +{ +public: + wxEXPLICIT ValidationTraverserBase(wxWindowBase* win) + : m_win(static_cast(win)) + { + } + + // Traverse all the direct children calling OnDo() on them and also all + // grandchildren if wxWS_EX_VALIDATE_RECURSIVELY is used, calling + // OnRecurse() for them. + bool DoForAllChildren() + { + const bool recurse = m_win->HasExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY); + + wxWindowList& children = m_win->GetChildren(); + for ( wxWindowList::iterator i = children.begin(); + i != children.end(); + ++i ) + { + wxWindow* const child = static_cast(*i); + wxValidator* const validator = child->GetValidator(); + if ( validator && !OnDo(validator) ) + { + return false; + } + + // Notice that validation should never recurse into top level + // children, e.g. some other dialog which might happen to be + // currently shown. + if ( recurse && !child->IsTopLevel() && !OnRecurse(child) ) + { + return false; + } + } + + return true; + } + + // Give it a virtual dtor just to suppress gcc warnings about a class with + // virtual methods but non-virtual dtor -- even if this is completely safe + // here as we never use the objects of this class polymorphically. + virtual ~ValidationTraverserBase() { } + +protected: + // Called for each child, validator is guaranteed to be non-NULL. + virtual bool OnDo(wxValidator* validator) = 0; + + // Called for each child if we need to recurse into its children. + virtual bool OnRecurse(wxWindow* child) = 0; + + + // The window whose children we're traversing. + wxWindow* const m_win; + + wxDECLARE_NO_COPY_CLASS(ValidationTraverserBase); +}; + +} // anonymous namespace + +#endif // wxUSE_VALIDATORS + +bool wxWindowBase::Validate() +{ +#if wxUSE_VALIDATORS + class ValidateTraverser : public ValidationTraverserBase + { + public: + wxEXPLICIT ValidateTraverser(wxWindowBase* win) + : ValidationTraverserBase(win) + { + } + + virtual bool OnDo(wxValidator* validator) + { + return validator->Validate(m_win); + } + + virtual bool OnRecurse(wxWindow* child) + { + return child->Validate(); + } + }; + + return ValidateTraverser(this).DoForAllChildren(); +#else // !wxUSE_VALIDATORS + return true; +#endif // wxUSE_VALIDATORS/!wxUSE_VALIDATORS +} + +bool wxWindowBase::TransferDataToWindow() +{ +#if wxUSE_VALIDATORS + class DataToWindowTraverser : public ValidationTraverserBase + { + public: + wxEXPLICIT DataToWindowTraverser(wxWindowBase* win) + : ValidationTraverserBase(win) + { + } + + virtual bool OnDo(wxValidator* validator) + { + if ( !validator->TransferToWindow() ) + { + wxLogWarning(_("Could not transfer data to window")); +#if wxUSE_LOG + wxLog::FlushActive(); +#endif // wxUSE_LOG + + return false; + } + + return true; + } + + virtual bool OnRecurse(wxWindow* child) + { + return child->TransferDataToWindow(); + } + }; + + return DataToWindowTraverser(this).DoForAllChildren(); +#else // !wxUSE_VALIDATORS + return true; +#endif // wxUSE_VALIDATORS/!wxUSE_VALIDATORS +} + +bool wxWindowBase::TransferDataFromWindow() +{ +#if wxUSE_VALIDATORS + class DataFromWindowTraverser : public ValidationTraverserBase + { + public: + DataFromWindowTraverser(wxWindowBase* win) + : ValidationTraverserBase(win) + { + } + + virtual bool OnDo(wxValidator* validator) + { + return validator->TransferFromWindow(); + } + + virtual bool OnRecurse(wxWindow* child) + { + return child->TransferDataFromWindow(); + } + }; + + return DataFromWindowTraverser(this).DoForAllChildren(); +#else // !wxUSE_VALIDATORS + return true; +#endif // wxUSE_VALIDATORS/!wxUSE_VALIDATORS +} + +void wxWindowBase::InitDialog() +{ + wxInitDialogEvent event(GetId()); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent(event); +} + +// ---------------------------------------------------------------------------- +// context-sensitive help support +// ---------------------------------------------------------------------------- + +#if wxUSE_HELP + +// associate this help text with this window +void wxWindowBase::SetHelpText(const wxString& text) +{ + wxHelpProvider *helpProvider = wxHelpProvider::Get(); + if ( helpProvider ) + { + helpProvider->AddHelp(this, text); + } +} + +#if WXWIN_COMPATIBILITY_2_8 +// associate this help text with all windows with the same id as this +// one +void wxWindowBase::SetHelpTextForId(const wxString& text) +{ + wxHelpProvider *helpProvider = wxHelpProvider::Get(); + if ( helpProvider ) + { + helpProvider->AddHelp(GetId(), text); + } +} +#endif // WXWIN_COMPATIBILITY_2_8 + +// get the help string associated with this window (may be empty) +// default implementation forwards calls to the help provider +wxString +wxWindowBase::GetHelpTextAtPoint(const wxPoint & WXUNUSED(pt), + wxHelpEvent::Origin WXUNUSED(origin)) const +{ + wxString text; + wxHelpProvider *helpProvider = wxHelpProvider::Get(); + if ( helpProvider ) + { + text = helpProvider->GetHelp(this); + } + + return text; +} + +// show help for this window +void wxWindowBase::OnHelp(wxHelpEvent& event) +{ + wxHelpProvider *helpProvider = wxHelpProvider::Get(); + if ( helpProvider ) + { + wxPoint pos = event.GetPosition(); + const wxHelpEvent::Origin origin = event.GetOrigin(); + if ( origin == wxHelpEvent::Origin_Keyboard ) + { + // if the help event was generated from keyboard it shouldn't + // appear at the mouse position (which is still the only position + // associated with help event) if the mouse is far away, although + // we still do use the mouse position if it's over the window + // because we suppose the user looks approximately at the mouse + // already and so it would be more convenient than showing tooltip + // at some arbitrary position which can be quite far from it + const wxRect rectClient = GetClientRect(); + if ( !rectClient.Contains(ScreenToClient(pos)) ) + { + // position help slightly under and to the right of this window + pos = ClientToScreen(wxPoint( + 2*GetCharWidth(), + rectClient.height + GetCharHeight() + )); + } + } + + if ( helpProvider->ShowHelpAtPoint(this, pos, origin) ) + { + // skip the event.Skip() below + return; + } + } + + event.Skip(); +} + +#endif // wxUSE_HELP + +// ---------------------------------------------------------------------------- +// tooltips +// ---------------------------------------------------------------------------- + +#if wxUSE_TOOLTIPS + +wxString wxWindowBase::GetToolTipText() const +{ + return m_tooltip ? m_tooltip->GetTip() : wxString(); +} + +void wxWindowBase::SetToolTip( const wxString &tip ) +{ + // don't create the new tooltip if we already have one + if ( m_tooltip ) + { + m_tooltip->SetTip( tip ); + } + else + { + SetToolTip( new wxToolTip( tip ) ); + } + + // setting empty tooltip text does not remove the tooltip any more - use + // SetToolTip(NULL) for this +} + +void wxWindowBase::DoSetToolTip(wxToolTip *tooltip) +{ + if ( m_tooltip != tooltip ) + { + if ( m_tooltip ) + delete m_tooltip; + + m_tooltip = tooltip; + } +} + +bool wxWindowBase::CopyToolTip(wxToolTip *tip) +{ + SetToolTip(tip ? new wxToolTip(tip->GetTip()) : NULL); + + return tip != NULL; +} + +#endif // wxUSE_TOOLTIPS + +// ---------------------------------------------------------------------------- +// constraints and sizers +// ---------------------------------------------------------------------------- + +#if wxUSE_CONSTRAINTS + +void wxWindowBase::SetConstraints( wxLayoutConstraints *constraints ) +{ + if ( m_constraints ) + { + UnsetConstraints(m_constraints); + delete m_constraints; + } + m_constraints = constraints; + if ( m_constraints ) + { + // Make sure other windows know they're part of a 'meaningful relationship' + if ( m_constraints->left.GetOtherWindow() && (m_constraints->left.GetOtherWindow() != this) ) + m_constraints->left.GetOtherWindow()->AddConstraintReference(this); + if ( m_constraints->top.GetOtherWindow() && (m_constraints->top.GetOtherWindow() != this) ) + m_constraints->top.GetOtherWindow()->AddConstraintReference(this); + if ( m_constraints->right.GetOtherWindow() && (m_constraints->right.GetOtherWindow() != this) ) + m_constraints->right.GetOtherWindow()->AddConstraintReference(this); + if ( m_constraints->bottom.GetOtherWindow() && (m_constraints->bottom.GetOtherWindow() != this) ) + m_constraints->bottom.GetOtherWindow()->AddConstraintReference(this); + if ( m_constraints->width.GetOtherWindow() && (m_constraints->width.GetOtherWindow() != this) ) + m_constraints->width.GetOtherWindow()->AddConstraintReference(this); + if ( m_constraints->height.GetOtherWindow() && (m_constraints->height.GetOtherWindow() != this) ) + m_constraints->height.GetOtherWindow()->AddConstraintReference(this); + if ( m_constraints->centreX.GetOtherWindow() && (m_constraints->centreX.GetOtherWindow() != this) ) + m_constraints->centreX.GetOtherWindow()->AddConstraintReference(this); + if ( m_constraints->centreY.GetOtherWindow() && (m_constraints->centreY.GetOtherWindow() != this) ) + m_constraints->centreY.GetOtherWindow()->AddConstraintReference(this); + } +} + +// This removes any dangling pointers to this window in other windows' +// constraintsInvolvedIn lists. +void wxWindowBase::UnsetConstraints(wxLayoutConstraints *c) +{ + if ( c ) + { + if ( c->left.GetOtherWindow() && (c->left.GetOtherWindow() != this) ) + c->left.GetOtherWindow()->RemoveConstraintReference(this); + if ( c->top.GetOtherWindow() && (c->top.GetOtherWindow() != this) ) + c->top.GetOtherWindow()->RemoveConstraintReference(this); + if ( c->right.GetOtherWindow() && (c->right.GetOtherWindow() != this) ) + c->right.GetOtherWindow()->RemoveConstraintReference(this); + if ( c->bottom.GetOtherWindow() && (c->bottom.GetOtherWindow() != this) ) + c->bottom.GetOtherWindow()->RemoveConstraintReference(this); + if ( c->width.GetOtherWindow() && (c->width.GetOtherWindow() != this) ) + c->width.GetOtherWindow()->RemoveConstraintReference(this); + if ( c->height.GetOtherWindow() && (c->height.GetOtherWindow() != this) ) + c->height.GetOtherWindow()->RemoveConstraintReference(this); + if ( c->centreX.GetOtherWindow() && (c->centreX.GetOtherWindow() != this) ) + c->centreX.GetOtherWindow()->RemoveConstraintReference(this); + if ( c->centreY.GetOtherWindow() && (c->centreY.GetOtherWindow() != this) ) + c->centreY.GetOtherWindow()->RemoveConstraintReference(this); + } +} + +// Back-pointer to other windows we're involved with, so if we delete this +// window, we must delete any constraints we're involved with. +void wxWindowBase::AddConstraintReference(wxWindowBase *otherWin) +{ + if ( !m_constraintsInvolvedIn ) + m_constraintsInvolvedIn = new wxWindowList; + if ( !m_constraintsInvolvedIn->Find((wxWindow *)otherWin) ) + m_constraintsInvolvedIn->Append((wxWindow *)otherWin); +} + +// REMOVE back-pointer to other windows we're involved with. +void wxWindowBase::RemoveConstraintReference(wxWindowBase *otherWin) +{ + if ( m_constraintsInvolvedIn ) + m_constraintsInvolvedIn->DeleteObject((wxWindow *)otherWin); +} + +// Reset any constraints that mention this window +void wxWindowBase::DeleteRelatedConstraints() +{ + if ( m_constraintsInvolvedIn ) + { + wxWindowList::compatibility_iterator node = m_constraintsInvolvedIn->GetFirst(); + while (node) + { + wxWindow *win = node->GetData(); + wxLayoutConstraints *constr = win->GetConstraints(); + + // Reset any constraints involving this window + if ( constr ) + { + constr->left.ResetIfWin(this); + constr->top.ResetIfWin(this); + constr->right.ResetIfWin(this); + constr->bottom.ResetIfWin(this); + constr->width.ResetIfWin(this); + constr->height.ResetIfWin(this); + constr->centreX.ResetIfWin(this); + constr->centreY.ResetIfWin(this); + } + + wxWindowList::compatibility_iterator next = node->GetNext(); + m_constraintsInvolvedIn->Erase(node); + node = next; + } + + wxDELETE(m_constraintsInvolvedIn); + } +} + +#endif // wxUSE_CONSTRAINTS + +void wxWindowBase::SetSizer(wxSizer *sizer, bool deleteOld) +{ + if ( sizer == m_windowSizer) + return; + + if ( m_windowSizer ) + { + m_windowSizer->SetContainingWindow(NULL); + + if ( deleteOld ) + delete m_windowSizer; + } + + m_windowSizer = sizer; + if ( m_windowSizer ) + { + m_windowSizer->SetContainingWindow((wxWindow *)this); + } + + SetAutoLayout(m_windowSizer != NULL); +} + +void wxWindowBase::SetSizerAndFit(wxSizer *sizer, bool deleteOld) +{ + SetSizer( sizer, deleteOld ); + sizer->SetSizeHints( (wxWindow*) this ); +} + + +void wxWindowBase::SetContainingSizer(wxSizer* sizer) +{ + // adding a window to a sizer twice is going to result in fatal and + // hard to debug problems later because when deleting the second + // associated wxSizerItem we're going to dereference a dangling + // pointer; so try to detect this as early as possible + wxASSERT_MSG( !sizer || m_containingSizer != sizer, + wxT("Adding a window to the same sizer twice?") ); + + m_containingSizer = sizer; +} + +#if wxUSE_CONSTRAINTS + +void wxWindowBase::SatisfyConstraints() +{ + wxLayoutConstraints *constr = GetConstraints(); + bool wasOk = constr && constr->AreSatisfied(); + + ResetConstraints(); // Mark all constraints as unevaluated + + int noChanges = 1; + + // if we're a top level panel (i.e. our parent is frame/dialog), our + // own constraints will never be satisfied any more unless we do it + // here + if ( wasOk ) + { + while ( noChanges > 0 ) + { + LayoutPhase1(&noChanges); + } + } + + LayoutPhase2(&noChanges); +} + +#endif // wxUSE_CONSTRAINTS + +bool wxWindowBase::Layout() +{ + // If there is a sizer, use it instead of the constraints + if ( GetSizer() ) + { + int w = 0, h = 0; + GetVirtualSize(&w, &h); + GetSizer()->SetDimension( 0, 0, w, h ); + } +#if wxUSE_CONSTRAINTS + else + { + SatisfyConstraints(); // Find the right constraints values + SetConstraintSizes(); // Recursively set the real window sizes + } +#endif + + return true; +} + +void wxWindowBase::InternalOnSize(wxSizeEvent& event) +{ + if ( GetAutoLayout() ) + Layout(); + + event.Skip(); +} + +#if wxUSE_CONSTRAINTS + +// first phase of the constraints evaluation: set our own constraints +bool wxWindowBase::LayoutPhase1(int *noChanges) +{ + wxLayoutConstraints *constr = GetConstraints(); + + return !constr || constr->SatisfyConstraints(this, noChanges); +} + +// second phase: set the constraints for our children +bool wxWindowBase::LayoutPhase2(int *noChanges) +{ + *noChanges = 0; + + // Layout children + DoPhase(1); + + // Layout grand children + DoPhase(2); + + return true; +} + +// Do a phase of evaluating child constraints +bool wxWindowBase::DoPhase(int phase) +{ + // the list containing the children for which the constraints are already + // set correctly + wxWindowList succeeded; + + // the max number of iterations we loop before concluding that we can't set + // the constraints + static const int maxIterations = 500; + + for ( int noIterations = 0; noIterations < maxIterations; noIterations++ ) + { + int noChanges = 0; + + // loop over all children setting their constraints + for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + wxWindow *child = node->GetData(); + if ( child->IsTopLevel() ) + { + // top level children are not inside our client area + continue; + } + + if ( !child->GetConstraints() || succeeded.Find(child) ) + { + // this one is either already ok or nothing we can do about it + continue; + } + + int tempNoChanges = 0; + bool success = phase == 1 ? child->LayoutPhase1(&tempNoChanges) + : child->LayoutPhase2(&tempNoChanges); + noChanges += tempNoChanges; + + if ( success ) + { + succeeded.Append(child); + } + } + + if ( !noChanges ) + { + // constraints are set + break; + } + } + + return true; +} + +void wxWindowBase::ResetConstraints() +{ + wxLayoutConstraints *constr = GetConstraints(); + if ( constr ) + { + constr->left.SetDone(false); + constr->top.SetDone(false); + constr->right.SetDone(false); + constr->bottom.SetDone(false); + constr->width.SetDone(false); + constr->height.SetDone(false); + constr->centreX.SetDone(false); + constr->centreY.SetDone(false); + } + + wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + while (node) + { + wxWindow *win = node->GetData(); + if ( !win->IsTopLevel() ) + win->ResetConstraints(); + node = node->GetNext(); + } +} + +// Need to distinguish between setting the 'fake' size for windows and sizers, +// and setting the real values. +void wxWindowBase::SetConstraintSizes(bool recurse) +{ + wxLayoutConstraints *constr = GetConstraints(); + if ( constr && constr->AreSatisfied() ) + { + ChildrenRepositioningGuard repositionGuard(this); + + int x = constr->left.GetValue(); + int y = constr->top.GetValue(); + int w = constr->width.GetValue(); + int h = constr->height.GetValue(); + + if ( (constr->width.GetRelationship() != wxAsIs ) || + (constr->height.GetRelationship() != wxAsIs) ) + { + // We really shouldn't set negative sizes for the windows so make + // them at least of 1*1 size + SetSize(x, y, w > 0 ? w : 1, h > 0 ? h : 1); + } + else + { + // If we don't want to resize this window, just move it... + Move(x, y); + } + } + else if ( constr ) + { + wxLogDebug(wxT("Constraints not satisfied for %s named '%s'."), + GetClassInfo()->GetClassName(), + GetName().c_str()); + } + + if ( recurse ) + { + wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + while (node) + { + wxWindow *win = node->GetData(); + if ( !win->IsTopLevel() && win->GetConstraints() ) + win->SetConstraintSizes(); + node = node->GetNext(); + } + } +} + +// Only set the size/position of the constraint (if any) +void wxWindowBase::SetSizeConstraint(int x, int y, int w, int h) +{ + wxLayoutConstraints *constr = GetConstraints(); + if ( constr ) + { + if ( x != wxDefaultCoord ) + { + constr->left.SetValue(x); + constr->left.SetDone(true); + } + if ( y != wxDefaultCoord ) + { + constr->top.SetValue(y); + constr->top.SetDone(true); + } + if ( w != wxDefaultCoord ) + { + constr->width.SetValue(w); + constr->width.SetDone(true); + } + if ( h != wxDefaultCoord ) + { + constr->height.SetValue(h); + constr->height.SetDone(true); + } + } +} + +void wxWindowBase::MoveConstraint(int x, int y) +{ + wxLayoutConstraints *constr = GetConstraints(); + if ( constr ) + { + if ( x != wxDefaultCoord ) + { + constr->left.SetValue(x); + constr->left.SetDone(true); + } + if ( y != wxDefaultCoord ) + { + constr->top.SetValue(y); + constr->top.SetDone(true); + } + } +} + +void wxWindowBase::GetSizeConstraint(int *w, int *h) const +{ + wxLayoutConstraints *constr = GetConstraints(); + if ( constr ) + { + *w = constr->width.GetValue(); + *h = constr->height.GetValue(); + } + else + GetSize(w, h); +} + +void wxWindowBase::GetClientSizeConstraint(int *w, int *h) const +{ + wxLayoutConstraints *constr = GetConstraints(); + if ( constr ) + { + *w = constr->width.GetValue(); + *h = constr->height.GetValue(); + } + else + GetClientSize(w, h); +} + +void wxWindowBase::GetPositionConstraint(int *x, int *y) const +{ + wxLayoutConstraints *constr = GetConstraints(); + if ( constr ) + { + *x = constr->left.GetValue(); + *y = constr->top.GetValue(); + } + else + GetPosition(x, y); +} + +#endif // wxUSE_CONSTRAINTS + +void wxWindowBase::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) const +{ + wxWindow *parent = GetParent(); + if ( !(sizeFlags & wxSIZE_NO_ADJUSTMENTS) && parent ) + { + wxPoint pt(parent->GetClientAreaOrigin()); + x += pt.x; + y += pt.y; + } +} + +// ---------------------------------------------------------------------------- +// Update UI processing +// ---------------------------------------------------------------------------- + +void wxWindowBase::UpdateWindowUI(long flags) +{ + wxUpdateUIEvent event(GetId()); + event.SetEventObject(this); + + if ( GetEventHandler()->ProcessEvent(event) ) + { + DoUpdateWindowUI(event); + } + + if (flags & wxUPDATE_UI_RECURSE) + { + wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + while (node) + { + wxWindow* child = (wxWindow*) node->GetData(); + child->UpdateWindowUI(flags); + node = node->GetNext(); + } + } +} + +// do the window-specific processing after processing the update event +void wxWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event) +{ + if ( event.GetSetEnabled() ) + Enable(event.GetEnabled()); + + if ( event.GetSetShown() ) + Show(event.GetShown()); +} + +// ---------------------------------------------------------------------------- +// Idle processing +// ---------------------------------------------------------------------------- + +// Send idle event to window and all subwindows +bool wxWindowBase::SendIdleEvents(wxIdleEvent& event) +{ + bool needMore = false; + + OnInternalIdle(); + + // should we send idle event to this window? + if (wxIdleEvent::GetMode() == wxIDLE_PROCESS_ALL || + HasExtraStyle(wxWS_EX_PROCESS_IDLE)) + { + event.SetEventObject(this); + HandleWindowEvent(event); + + if (event.MoreRequested()) + needMore = true; + } + wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + for (; node; node = node->GetNext()) + { + wxWindow* child = node->GetData(); + if (child->SendIdleEvents(event)) + needMore = true; + } + + return needMore; +} + +void wxWindowBase::OnInternalIdle() +{ + if ( wxUpdateUIEvent::CanUpdate(this) ) + UpdateWindowUI(wxUPDATE_UI_FROMIDLE); +} + +// ---------------------------------------------------------------------------- +// dialog units translations +// ---------------------------------------------------------------------------- + +// Windows' computes dialog units using average character width over upper- +// and lower-case ASCII alphabet and not using the average character width +// metadata stored in the font; see +// http://support.microsoft.com/default.aspx/kb/145994 for detailed discussion. +// It's important that we perform the conversion in identical way, because +// dialog units natively exist only on Windows and Windows HIG is expressed +// using them. +wxSize wxWindowBase::GetDlgUnitBase() const +{ + const wxWindowBase * const parent = wxGetTopLevelParent((wxWindow*)this); + + wxCHECK_MSG( parent, wxDefaultSize, wxS("Must have TLW parent") ); + + if ( !parent->m_font.IsOk() ) + { + // Default GUI font is used. This is the most common case, so + // cache the results. + static wxSize s_defFontSize; + if ( s_defFontSize.x == 0 ) + s_defFontSize = wxPrivate::GetAverageASCIILetterSize(*parent); + return s_defFontSize; + } + else + { + // Custom font, we always need to compute the result + return wxPrivate::GetAverageASCIILetterSize(*parent); + } +} + +wxPoint wxWindowBase::ConvertPixelsToDialog(const wxPoint& pt) const +{ + const wxSize base = GetDlgUnitBase(); + + // NB: wxMulDivInt32() is used, because it correctly rounds the result + + wxPoint pt2 = wxDefaultPosition; + if (pt.x != wxDefaultCoord) + pt2.x = wxMulDivInt32(pt.x, 4, base.x); + if (pt.y != wxDefaultCoord) + pt2.y = wxMulDivInt32(pt.y, 8, base.y); + + return pt2; +} + +wxPoint wxWindowBase::ConvertDialogToPixels(const wxPoint& pt) const +{ + const wxSize base = GetDlgUnitBase(); + + wxPoint pt2 = wxDefaultPosition; + if (pt.x != wxDefaultCoord) + pt2.x = wxMulDivInt32(pt.x, base.x, 4); + if (pt.y != wxDefaultCoord) + pt2.y = wxMulDivInt32(pt.y, base.y, 8); + + return pt2; +} + +// ---------------------------------------------------------------------------- +// event handlers +// ---------------------------------------------------------------------------- + +// propagate the colour change event to the subwindows +void wxWindowBase::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event)) +{ + wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + while ( node ) + { + // Only propagate to non-top-level windows + wxWindow *win = node->GetData(); + if ( !win->IsTopLevel() ) + { + wxSysColourChangedEvent event2; + event2.SetEventObject(win); + win->GetEventHandler()->ProcessEvent(event2); + } + + node = node->GetNext(); + } + + Refresh(); +} + +// the default action is to populate dialog with data when it's created, +// and nudge the UI into displaying itself correctly in case +// we've turned the wxUpdateUIEvents frequency down low. +void wxWindowBase::OnInitDialog( wxInitDialogEvent &WXUNUSED(event) ) +{ + TransferDataToWindow(); + + // Update the UI at this point + UpdateWindowUI(wxUPDATE_UI_RECURSE); +} + +// ---------------------------------------------------------------------------- +// menu-related functions +// ---------------------------------------------------------------------------- + +#if wxUSE_MENUS + +bool wxWindowBase::PopupMenu(wxMenu *menu, int x, int y) +{ + wxCHECK_MSG( menu, false, "can't popup NULL menu" ); + + wxMenuInvokingWindowSetter + setInvokingWin(*menu, static_cast(this)); + + wxCurrentPopupMenu = menu; + const bool rc = DoPopupMenu(menu, x, y); + wxCurrentPopupMenu = NULL; + + return rc; +} + +// this is used to pass the id of the selected item from the menu event handler +// to the main function itself +// +// it's ok to use a global here as there can be at most one popup menu shown at +// any time +static int gs_popupMenuSelection = wxID_NONE; + +void wxWindowBase::InternalOnPopupMenu(wxCommandEvent& event) +{ + // store the id in a global variable where we'll retrieve it from later + gs_popupMenuSelection = event.GetId(); +} + +void wxWindowBase::InternalOnPopupMenuUpdate(wxUpdateUIEvent& WXUNUSED(event)) +{ + // nothing to do but do not skip it +} + +int +wxWindowBase::DoGetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y) +{ + gs_popupMenuSelection = wxID_NONE; + + Connect(wxEVT_MENU, + wxCommandEventHandler(wxWindowBase::InternalOnPopupMenu), + NULL, + this); + + // it is common to construct the menu passed to this function dynamically + // using some fixed range of ids which could clash with the ids used + // elsewhere in the program, which could result in some menu items being + // unintentionally disabled or otherwise modified by update UI handlers + // elsewhere in the program code and this is difficult to avoid in the + // program itself, so instead we just temporarily suspend UI updating while + // this menu is shown + Connect(wxEVT_UPDATE_UI, + wxUpdateUIEventHandler(wxWindowBase::InternalOnPopupMenuUpdate), + NULL, + this); + + PopupMenu(&menu, x, y); + + Disconnect(wxEVT_UPDATE_UI, + wxUpdateUIEventHandler(wxWindowBase::InternalOnPopupMenuUpdate), + NULL, + this); + Disconnect(wxEVT_MENU, + wxCommandEventHandler(wxWindowBase::InternalOnPopupMenu), + NULL, + this); + + return gs_popupMenuSelection; +} + +#endif // wxUSE_MENUS + +// methods for drawing the sizers in a visible way: this is currently only +// enabled for "full debug" builds with wxDEBUG_LEVEL==2 as it doesn't work +// that well and also because we don't want to leave it enabled in default +// builds used for production +#if wxDEBUG_LEVEL > 1 + +static void DrawSizers(wxWindowBase *win); + +static void DrawBorder(wxWindowBase *win, const wxRect& rect, bool fill, const wxPen* pen) +{ + wxClientDC dc((wxWindow *)win); + dc.SetPen(*pen); + dc.SetBrush(fill ? wxBrush(pen->GetColour(), wxBRUSHSTYLE_CROSSDIAG_HATCH) : + *wxTRANSPARENT_BRUSH); + dc.DrawRectangle(rect.Deflate(1, 1)); +} + +static void DrawSizer(wxWindowBase *win, wxSizer *sizer) +{ + const wxSizerItemList& items = sizer->GetChildren(); + for ( wxSizerItemList::const_iterator i = items.begin(), + end = items.end(); + i != end; + ++i ) + { + wxSizerItem *item = *i; + if ( item->IsSizer() ) + { + DrawBorder(win, item->GetRect().Deflate(2), false, wxRED_PEN); + DrawSizer(win, item->GetSizer()); + } + else if ( item->IsSpacer() ) + { + DrawBorder(win, item->GetRect().Deflate(2), true, wxBLUE_PEN); + } + else if ( item->IsWindow() ) + { + DrawSizers(item->GetWindow()); + } + else + wxFAIL_MSG("inconsistent wxSizerItem status!"); + } +} + +static void DrawSizers(wxWindowBase *win) +{ + DrawBorder(win, win->GetClientSize(), false, wxGREEN_PEN); + + wxSizer *sizer = win->GetSizer(); + if ( sizer ) + { + DrawSizer(win, sizer); + } + else // no sizer, still recurse into the children + { + const wxWindowList& children = win->GetChildren(); + for ( wxWindowList::const_iterator i = children.begin(), + end = children.end(); + i != end; + ++i ) + { + DrawSizers(*i); + } + + // show all kind of sizes of this window; see the "window sizing" topic + // overview for more info about the various differences: + wxSize fullSz = win->GetSize(); + wxSize clientSz = win->GetClientSize(); + wxSize bestSz = win->GetBestSize(); + wxSize minSz = win->GetMinSize(); + wxSize maxSz = win->GetMaxSize(); + wxSize virtualSz = win->GetVirtualSize(); + + wxMessageOutputDebug dbgout; + dbgout.Printf( + "%-10s => fullsz=%4d;%-4d clientsz=%4d;%-4d bestsz=%4d;%-4d minsz=%4d;%-4d maxsz=%4d;%-4d virtualsz=%4d;%-4d\n", + win->GetName(), + fullSz.x, fullSz.y, + clientSz.x, clientSz.y, + bestSz.x, bestSz.y, + minSz.x, minSz.y, + maxSz.x, maxSz.y, + virtualSz.x, virtualSz.y); + } +} + +#endif // wxDEBUG_LEVEL + +// process special middle clicks +void wxWindowBase::OnMiddleClick( wxMouseEvent& event ) +{ + if ( event.ControlDown() && event.AltDown() ) + { +#if wxDEBUG_LEVEL > 1 + // Ctrl-Alt-Shift-mclick makes the sizers visible in debug builds + if ( event.ShiftDown() ) + { + DrawSizers(this); + } + else +#endif // __WXDEBUG__ + { +#if wxUSE_MSGDLG + // just Ctrl-Alt-middle click shows information about wx version + ::wxInfoMessageBox((wxWindow*)this); +#endif // wxUSE_MSGDLG + } + } + else + { + event.Skip(); + } +} + +// ---------------------------------------------------------------------------- +// accessibility +// ---------------------------------------------------------------------------- + +#if wxUSE_ACCESSIBILITY +void wxWindowBase::SetAccessible(wxAccessible* accessible) +{ + if (m_accessible && (accessible != m_accessible)) + delete m_accessible; + m_accessible = accessible; + if (m_accessible) + m_accessible->SetWindow((wxWindow*) this); +} + +// Returns the accessible object, creating if necessary. +wxAccessible* wxWindowBase::GetOrCreateAccessible() +{ + if (!m_accessible) + m_accessible = CreateAccessible(); + return m_accessible; +} + +// Override to create a specific accessible object. +wxAccessible* wxWindowBase::CreateAccessible() +{ + return new wxWindowAccessible((wxWindow*) this); +} + +#endif + +// ---------------------------------------------------------------------------- +// list classes implementation +// ---------------------------------------------------------------------------- + +#if wxUSE_STD_CONTAINERS + +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxWindowList) + +#else // !wxUSE_STD_CONTAINERS + +void wxWindowListNode::DeleteData() +{ + delete (wxWindow *)GetData(); +} + +#endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS + +// ---------------------------------------------------------------------------- +// borders +// ---------------------------------------------------------------------------- + +wxBorder wxWindowBase::GetBorder(long flags) const +{ + wxBorder border = (wxBorder)(flags & wxBORDER_MASK); + if ( border == wxBORDER_DEFAULT ) + { + border = GetDefaultBorder(); + } + else if ( border == wxBORDER_THEME ) + { + border = GetDefaultBorderForControl(); + } + + return border; +} + +wxBorder wxWindowBase::GetDefaultBorder() const +{ + return wxBORDER_NONE; +} + +// ---------------------------------------------------------------------------- +// hit testing +// ---------------------------------------------------------------------------- + +wxHitTest wxWindowBase::DoHitTest(wxCoord x, wxCoord y) const +{ + // here we just check if the point is inside the window or not + + // check the top and left border first + bool outside = x < 0 || y < 0; + if ( !outside ) + { + // check the right and bottom borders too + wxSize size = GetSize(); + outside = x >= size.x || y >= size.y; + } + + return outside ? wxHT_WINDOW_OUTSIDE : wxHT_WINDOW_INSIDE; +} + +// ---------------------------------------------------------------------------- +// mouse capture +// ---------------------------------------------------------------------------- + +// Private data used for mouse capture tracking. +namespace wxMouseCapture +{ + +// Stack of the windows which previously had the capture, the top most element +// is the window that has the mouse capture now. +// +// NB: We use wxVector and not wxStack to be able to examine all of the stack +// elements for debug checks, but only the stack operations should be +// performed with this vector. +wxVector stack; + +// Flag preventing reentrancy in {Capture,Release}Mouse(). +wxRecursionGuardFlag changing; + +bool IsInCaptureStack(wxWindowBase* win) +{ + for ( wxVector::const_iterator it = stack.begin(); + it != stack.end(); + ++it ) + { + if ( *it == win ) + return true; + } + + return false; +} + +} // wxMouseCapture + +void wxWindowBase::CaptureMouse() +{ + wxLogTrace(wxT("mousecapture"), wxT("CaptureMouse(%p)"), static_cast(this)); + + wxRecursionGuard guard(wxMouseCapture::changing); + wxASSERT_MSG( !guard.IsInside(), wxT("recursive CaptureMouse call?") ); + + wxASSERT_MSG( !wxMouseCapture::IsInCaptureStack(this), + "Recapturing the mouse in the same window?" ); + + wxWindow *winOld = GetCapture(); + if ( winOld ) + ((wxWindowBase*) winOld)->DoReleaseMouse(); + + DoCaptureMouse(); + + wxMouseCapture::stack.push_back(static_cast(this)); +} + +void wxWindowBase::ReleaseMouse() +{ + wxLogTrace(wxT("mousecapture"), wxT("ReleaseMouse(%p)"), static_cast(this)); + + wxRecursionGuard guard(wxMouseCapture::changing); + wxASSERT_MSG( !guard.IsInside(), wxT("recursive ReleaseMouse call?") ); + +#if wxDEBUG_LEVEL + wxWindow* const winCapture = GetCapture(); + if ( !winCapture ) + { + wxFAIL_MSG + ( + wxString::Format + ( + "Releasing mouse in %p(%s) but it is not captured", + this, GetClassInfo()->GetClassName() + ) + ); + } + else if ( winCapture != this ) + { + wxFAIL_MSG + ( + wxString::Format + ( + "Releasing mouse in %p(%s) but it is captured by %p(%s)", + this, GetClassInfo()->GetClassName(), + winCapture, winCapture->GetClassInfo()->GetClassName() + ) + ); + } +#endif // wxDEBUG_LEVEL + + DoReleaseMouse(); + + wxCHECK_RET( !wxMouseCapture::stack.empty(), + "Releasing mouse capture but capture stack empty?" ); + wxCHECK_RET( wxMouseCapture::stack.back() == this, + "Window releasing mouse capture not top of capture stack?" ); + + wxMouseCapture::stack.pop_back(); + + // Restore the capture to the previous window, if any. + if ( !wxMouseCapture::stack.empty() ) + { + ((wxWindowBase*)wxMouseCapture::stack.back())->DoCaptureMouse(); + } + + wxLogTrace(wxT("mousecapture"), + wxT("After ReleaseMouse() mouse is captured by %p"), + static_cast(GetCapture())); +} + +static void DoNotifyWindowAboutCaptureLost(wxWindow *win) +{ + wxMouseCaptureLostEvent event(win->GetId()); + event.SetEventObject(win); + if ( !win->GetEventHandler()->ProcessEvent(event) ) + { + // windows must handle this event, otherwise the app wouldn't behave + // correctly if it loses capture unexpectedly; see the discussion here: + // http://sourceforge.net/tracker/index.php?func=detail&aid=1153662&group_id=9863&atid=109863 + // http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/82376 + wxFAIL_MSG( wxT("window that captured the mouse didn't process wxEVT_MOUSE_CAPTURE_LOST") ); + } +} + +/* static */ +void wxWindowBase::NotifyCaptureLost() +{ + // don't do anything if capture lost was expected, i.e. resulted from + // a wx call to ReleaseMouse or CaptureMouse: + wxRecursionGuard guard(wxMouseCapture::changing); + if ( guard.IsInside() ) + return; + + // if the capture was lost unexpectedly, notify every window that has + // capture (on stack or current) about it and clear the stack: + while ( !wxMouseCapture::stack.empty() ) + { + DoNotifyWindowAboutCaptureLost(wxMouseCapture::stack.back()); + + wxMouseCapture::stack.pop_back(); + } +} + +#if wxUSE_HOTKEY + +bool +wxWindowBase::RegisterHotKey(int WXUNUSED(hotkeyId), + int WXUNUSED(modifiers), + int WXUNUSED(keycode)) +{ + // not implemented + return false; +} + +bool wxWindowBase::UnregisterHotKey(int WXUNUSED(hotkeyId)) +{ + // not implemented + return false; +} + +#endif // wxUSE_HOTKEY + +// ---------------------------------------------------------------------------- +// event processing +// ---------------------------------------------------------------------------- + +bool wxWindowBase::TryBefore(wxEvent& event) +{ +#if wxUSE_VALIDATORS + // Can only use the validator of the window which + // is receiving the event + if ( event.GetEventObject() == this ) + { + wxValidator * const validator = GetValidator(); + if ( validator && validator->ProcessEventLocally(event) ) + { + return true; + } + } +#endif // wxUSE_VALIDATORS + + return wxEvtHandler::TryBefore(event); +} + +bool wxWindowBase::TryAfter(wxEvent& event) +{ + // carry on up the parent-child hierarchy if the propagation count hasn't + // reached zero yet + if ( event.ShouldPropagate() ) + { + // honour the requests to stop propagation at this window: this is + // used by the dialogs, for example, to prevent processing the events + // from the dialog controls in the parent frame which rarely, if ever, + // makes sense + if ( !(GetExtraStyle() & wxWS_EX_BLOCK_EVENTS) ) + { + wxWindow *parent = GetParent(); + if ( parent && !parent->IsBeingDeleted() ) + { + wxPropagateOnce propagateOnce(event, this); + + return parent->GetEventHandler()->ProcessEvent(event); + } + } + } + + return wxEvtHandler::TryAfter(event); +} + +// ---------------------------------------------------------------------------- +// window relationships +// ---------------------------------------------------------------------------- + +wxWindow *wxWindowBase::DoGetSibling(WindowOrder order) const +{ + wxCHECK_MSG( GetParent(), NULL, + wxT("GetPrev/NextSibling() don't work for TLWs!") ); + + wxWindowList& siblings = GetParent()->GetChildren(); + wxWindowList::compatibility_iterator i = siblings.Find((wxWindow *)this); + wxCHECK_MSG( i, NULL, wxT("window not a child of its parent?") ); + + if ( order == OrderBefore ) + i = i->GetPrevious(); + else // OrderAfter + i = i->GetNext(); + + return i ? i->GetData() : NULL; +} + +// ---------------------------------------------------------------------------- +// keyboard navigation +// ---------------------------------------------------------------------------- + +// Navigates in the specified direction inside this window +bool wxWindowBase::DoNavigateIn(int flags) +{ +#ifdef wxHAS_NATIVE_TAB_TRAVERSAL + // native code doesn't process our wxNavigationKeyEvents anyhow + wxUnusedVar(flags); + return false; +#else // !wxHAS_NATIVE_TAB_TRAVERSAL + wxNavigationKeyEvent eventNav; + wxWindow *focused = FindFocus(); + eventNav.SetCurrentFocus(focused); + eventNav.SetEventObject(focused); + eventNav.SetFlags(flags); + return GetEventHandler()->ProcessEvent(eventNav); +#endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL +} + +bool wxWindowBase::HandleAsNavigationKey(const wxKeyEvent& event) +{ + if ( event.GetKeyCode() != WXK_TAB ) + return false; + + int flags = wxNavigationKeyEvent::FromTab; + + if ( event.ShiftDown() ) + flags |= wxNavigationKeyEvent::IsBackward; + else + flags |= wxNavigationKeyEvent::IsForward; + + if ( event.ControlDown() ) + flags |= wxNavigationKeyEvent::WinChange; + + Navigate(flags); + return true; +} + +void wxWindowBase::DoMoveInTabOrder(wxWindow *win, WindowOrder move) +{ + // check that we're not a top level window + wxCHECK_RET( GetParent(), + wxT("MoveBefore/AfterInTabOrder() don't work for TLWs!") ); + + // detect the special case when we have nothing to do anyhow and when the + // code below wouldn't work + if ( win == this ) + return; + + // find the target window in the siblings list + wxWindowList& siblings = GetParent()->GetChildren(); + wxWindowList::compatibility_iterator i = siblings.Find(win); + wxCHECK_RET( i, wxT("MoveBefore/AfterInTabOrder(): win is not a sibling") ); + + // unfortunately, when wxUSE_STD_CONTAINERS == 1 DetachNode() is not + // implemented so we can't just move the node around + wxWindow *self = (wxWindow *)this; + siblings.DeleteObject(self); + if ( move == OrderAfter ) + { + i = i->GetNext(); + } + + if ( i ) + { + siblings.Insert(i, self); + } + else // OrderAfter and win was the last sibling + { + siblings.Append(self); + } +} + +// ---------------------------------------------------------------------------- +// focus handling +// ---------------------------------------------------------------------------- + +/*static*/ wxWindow* wxWindowBase::FindFocus() +{ + wxWindowBase *win = DoFindFocus(); + return win ? win->GetMainWindowOfCompositeControl() : NULL; +} + +bool wxWindowBase::HasFocus() const +{ + wxWindowBase* const win = DoFindFocus(); + return win && + (this == win || this == win->GetMainWindowOfCompositeControl()); +} + +// ---------------------------------------------------------------------------- +// drag and drop +// ---------------------------------------------------------------------------- + +#if wxUSE_DRAG_AND_DROP && !defined(__WXMSW__) + +namespace +{ + +class DragAcceptFilesTarget : public wxFileDropTarget +{ +public: + DragAcceptFilesTarget(wxWindowBase *win) : m_win(win) {} + + virtual bool OnDropFiles(wxCoord x, wxCoord y, + const wxArrayString& filenames) + { + wxDropFilesEvent event(wxEVT_DROP_FILES, + filenames.size(), + wxCArrayString(filenames).Release()); + event.SetEventObject(m_win); + event.m_pos.x = x; + event.m_pos.y = y; + + return m_win->HandleWindowEvent(event); + } + +private: + wxWindowBase * const m_win; + + wxDECLARE_NO_COPY_CLASS(DragAcceptFilesTarget); +}; + + +} // anonymous namespace + +// Generic version of DragAcceptFiles(). It works by installing a simple +// wxFileDropTarget-to-EVT_DROP_FILES adaptor and therefore cannot be used +// together with explicit SetDropTarget() calls. +void wxWindowBase::DragAcceptFiles(bool accept) +{ + if ( accept ) + { + wxASSERT_MSG( !GetDropTarget(), + "cannot use DragAcceptFiles() and SetDropTarget() together" ); + SetDropTarget(new DragAcceptFilesTarget(this)); + } + else + { + SetDropTarget(NULL); + } +} + +#endif // wxUSE_DRAG_AND_DROP && !defined(__WXMSW__) + +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +wxWindow* wxGetTopLevelParent(wxWindow *win) +{ + while ( win && !win->IsTopLevel() ) + win = win->GetParent(); + + return win; +} + +#if wxUSE_ACCESSIBILITY +// ---------------------------------------------------------------------------- +// accessible object for windows +// ---------------------------------------------------------------------------- + +// Can return either a child object, or an integer +// representing the child element, starting from 1. +wxAccStatus wxWindowAccessible::HitTest(const wxPoint& WXUNUSED(pt), int* WXUNUSED(childId), wxAccessible** WXUNUSED(childObject)) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + return wxACC_NOT_IMPLEMENTED; +} + +// Returns the rectangle for this object (id = 0) or a child element (id > 0). +wxAccStatus wxWindowAccessible::GetLocation(wxRect& rect, int elementId) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + wxWindow* win = NULL; + if (elementId == 0) + { + win = GetWindow(); + } + else + { + if (elementId <= (int) GetWindow()->GetChildren().GetCount()) + { + win = GetWindow()->GetChildren().Item(elementId-1)->GetData(); + } + else + return wxACC_FAIL; + } + if (win) + { + rect = win->GetRect(); + if (win->GetParent() && !wxDynamicCast(win, wxTopLevelWindow)) + rect.SetPosition(win->GetParent()->ClientToScreen(rect.GetPosition())); + return wxACC_OK; + } + + return wxACC_NOT_IMPLEMENTED; +} + +// Navigates from fromId to toId/toObject. +wxAccStatus wxWindowAccessible::Navigate(wxNavDir navDir, int fromId, + int* WXUNUSED(toId), wxAccessible** toObject) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + switch (navDir) + { + case wxNAVDIR_FIRSTCHILD: + { + if (GetWindow()->GetChildren().GetCount() == 0) + return wxACC_FALSE; + wxWindow* childWindow = (wxWindow*) GetWindow()->GetChildren().GetFirst()->GetData(); + *toObject = childWindow->GetOrCreateAccessible(); + + return wxACC_OK; + } + case wxNAVDIR_LASTCHILD: + { + if (GetWindow()->GetChildren().GetCount() == 0) + return wxACC_FALSE; + wxWindow* childWindow = (wxWindow*) GetWindow()->GetChildren().GetLast()->GetData(); + *toObject = childWindow->GetOrCreateAccessible(); + + return wxACC_OK; + } + case wxNAVDIR_RIGHT: + case wxNAVDIR_DOWN: + case wxNAVDIR_NEXT: + { + wxWindowList::compatibility_iterator node = + wxWindowList::compatibility_iterator(); + if (fromId == 0) + { + // Can't navigate to sibling of this window + // if we're a top-level window. + if (!GetWindow()->GetParent()) + return wxACC_NOT_IMPLEMENTED; + + node = GetWindow()->GetParent()->GetChildren().Find(GetWindow()); + } + else + { + if (fromId <= (int) GetWindow()->GetChildren().GetCount()) + node = GetWindow()->GetChildren().Item(fromId-1); + } + + if (node && node->GetNext()) + { + wxWindow* nextWindow = node->GetNext()->GetData(); + *toObject = nextWindow->GetOrCreateAccessible(); + return wxACC_OK; + } + else + return wxACC_FALSE; + } + case wxNAVDIR_LEFT: + case wxNAVDIR_UP: + case wxNAVDIR_PREVIOUS: + { + wxWindowList::compatibility_iterator node = + wxWindowList::compatibility_iterator(); + if (fromId == 0) + { + // Can't navigate to sibling of this window + // if we're a top-level window. + if (!GetWindow()->GetParent()) + return wxACC_NOT_IMPLEMENTED; + + node = GetWindow()->GetParent()->GetChildren().Find(GetWindow()); + } + else + { + if (fromId <= (int) GetWindow()->GetChildren().GetCount()) + node = GetWindow()->GetChildren().Item(fromId-1); + } + + if (node && node->GetPrevious()) + { + wxWindow* previousWindow = node->GetPrevious()->GetData(); + *toObject = previousWindow->GetOrCreateAccessible(); + return wxACC_OK; + } + else + return wxACC_FALSE; + } + } + + return wxACC_NOT_IMPLEMENTED; +} + +// Gets the name of the specified object. +wxAccStatus wxWindowAccessible::GetName(int childId, wxString* name) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + wxString title; + + // If a child, leave wxWidgets to call the function on the actual + // child object. + if (childId > 0) + return wxACC_NOT_IMPLEMENTED; + + // This will eventually be replaced by specialised + // accessible classes, one for each kind of wxWidgets + // control or window. +#if wxUSE_BUTTON + if (wxDynamicCast(GetWindow(), wxButton)) + title = ((wxButton*) GetWindow())->GetLabel(); + else +#endif + title = GetWindow()->GetName(); + + if (!title.empty()) + { + *name = title; + return wxACC_OK; + } + else + return wxACC_NOT_IMPLEMENTED; +} + +// Gets the number of children. +wxAccStatus wxWindowAccessible::GetChildCount(int* childId) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + *childId = (int) GetWindow()->GetChildren().GetCount(); + return wxACC_OK; +} + +// Gets the specified child (starting from 1). +// If *child is NULL and return value is wxACC_OK, +// this means that the child is a simple element and +// not an accessible object. +wxAccStatus wxWindowAccessible::GetChild(int childId, wxAccessible** child) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + if (childId == 0) + { + *child = this; + return wxACC_OK; + } + + if (childId > (int) GetWindow()->GetChildren().GetCount()) + return wxACC_FAIL; + + wxWindow* childWindow = GetWindow()->GetChildren().Item(childId-1)->GetData(); + *child = childWindow->GetOrCreateAccessible(); + if (*child) + return wxACC_OK; + else + return wxACC_FAIL; +} + +// Gets the parent, or NULL. +wxAccStatus wxWindowAccessible::GetParent(wxAccessible** parent) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + wxWindow* parentWindow = GetWindow()->GetParent(); + if (!parentWindow) + { + *parent = NULL; + return wxACC_OK; + } + else + { + *parent = parentWindow->GetOrCreateAccessible(); + if (*parent) + return wxACC_OK; + else + return wxACC_FAIL; + } +} + +// Performs the default action. childId is 0 (the action for this object) +// or > 0 (the action for a child). +// Return wxACC_NOT_SUPPORTED if there is no default action for this +// window (e.g. an edit control). +wxAccStatus wxWindowAccessible::DoDefaultAction(int WXUNUSED(childId)) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + return wxACC_NOT_IMPLEMENTED; +} + +// Gets the default action for this object (0) or > 0 (the action for a child). +// Return wxACC_OK even if there is no action. actionName is the action, or the empty +// string if there is no action. +// The retrieved string describes the action that is performed on an object, +// not what the object does as a result. For example, a toolbar button that prints +// a document has a default action of "Press" rather than "Prints the current document." +wxAccStatus wxWindowAccessible::GetDefaultAction(int WXUNUSED(childId), wxString* WXUNUSED(actionName)) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + return wxACC_NOT_IMPLEMENTED; +} + +// Returns the description for this object or a child. +wxAccStatus wxWindowAccessible::GetDescription(int WXUNUSED(childId), wxString* description) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + wxString ht(GetWindow()->GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Keyboard)); + if (!ht.empty()) + { + *description = ht; + return wxACC_OK; + } + return wxACC_NOT_IMPLEMENTED; +} + +// Returns help text for this object or a child, similar to tooltip text. +wxAccStatus wxWindowAccessible::GetHelpText(int WXUNUSED(childId), wxString* helpText) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + wxString ht(GetWindow()->GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Keyboard)); + if (!ht.empty()) + { + *helpText = ht; + return wxACC_OK; + } + return wxACC_NOT_IMPLEMENTED; +} + +// Returns the keyboard shortcut for this object or child. +// Return e.g. ALT+K +wxAccStatus wxWindowAccessible::GetKeyboardShortcut(int WXUNUSED(childId), wxString* WXUNUSED(shortcut)) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + return wxACC_NOT_IMPLEMENTED; +} + +// Returns a role constant. +wxAccStatus wxWindowAccessible::GetRole(int childId, wxAccRole* role) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + // If a child, leave wxWidgets to call the function on the actual + // child object. + if (childId > 0) + return wxACC_NOT_IMPLEMENTED; + + if (wxDynamicCast(GetWindow(), wxControl)) + return wxACC_NOT_IMPLEMENTED; +#if wxUSE_STATUSBAR + if (wxDynamicCast(GetWindow(), wxStatusBar)) + return wxACC_NOT_IMPLEMENTED; +#endif +#if wxUSE_TOOLBAR + if (wxDynamicCast(GetWindow(), wxToolBar)) + return wxACC_NOT_IMPLEMENTED; +#endif + + //*role = wxROLE_SYSTEM_CLIENT; + *role = wxROLE_SYSTEM_CLIENT; + return wxACC_OK; + + #if 0 + return wxACC_NOT_IMPLEMENTED; + #endif +} + +// Returns a state constant. +wxAccStatus wxWindowAccessible::GetState(int childId, long* state) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + // If a child, leave wxWidgets to call the function on the actual + // child object. + if (childId > 0) + return wxACC_NOT_IMPLEMENTED; + + if (wxDynamicCast(GetWindow(), wxControl)) + return wxACC_NOT_IMPLEMENTED; + +#if wxUSE_STATUSBAR + if (wxDynamicCast(GetWindow(), wxStatusBar)) + return wxACC_NOT_IMPLEMENTED; +#endif +#if wxUSE_TOOLBAR + if (wxDynamicCast(GetWindow(), wxToolBar)) + return wxACC_NOT_IMPLEMENTED; +#endif + + *state = 0; + return wxACC_OK; + + #if 0 + return wxACC_NOT_IMPLEMENTED; + #endif +} + +// Returns a localized string representing the value for the object +// or child. +wxAccStatus wxWindowAccessible::GetValue(int WXUNUSED(childId), wxString* WXUNUSED(strValue)) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + return wxACC_NOT_IMPLEMENTED; +} + +// Selects the object or child. +wxAccStatus wxWindowAccessible::Select(int WXUNUSED(childId), wxAccSelectionFlags WXUNUSED(selectFlags)) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + return wxACC_NOT_IMPLEMENTED; +} + +// Gets the window with the keyboard focus. +// If childId is 0 and child is NULL, no object in +// this subhierarchy has the focus. +// If this object has the focus, child should be 'this'. +wxAccStatus wxWindowAccessible::GetFocus(int* WXUNUSED(childId), wxAccessible** WXUNUSED(child)) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + return wxACC_NOT_IMPLEMENTED; +} + +#if wxUSE_VARIANT +// Gets a variant representing the selected children +// of this object. +// Acceptable values: +// - a null variant (IsNull() returns true) +// - a list variant (GetType() == wxT("list") +// - an integer representing the selected child element, +// or 0 if this object is selected (GetType() == wxT("long") +// - a "void*" pointer to a wxAccessible child object +wxAccStatus wxWindowAccessible::GetSelections(wxVariant* WXUNUSED(selections)) +{ + wxASSERT( GetWindow() != NULL ); + if (!GetWindow()) + return wxACC_FAIL; + + return wxACC_NOT_IMPLEMENTED; +} +#endif // wxUSE_VARIANT + +#endif // wxUSE_ACCESSIBILITY + +// ---------------------------------------------------------------------------- +// RTL support +// ---------------------------------------------------------------------------- + +wxCoord +wxWindowBase::AdjustForLayoutDirection(wxCoord x, + wxCoord width, + wxCoord widthTotal) const +{ + if ( GetLayoutDirection() == wxLayout_RightToLeft ) + { + x = widthTotal - x - width; + } + + return x; +} + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/windowid.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/windowid.cpp new file mode 100644 index 0000000000..d0ee64ff54 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/windowid.cpp @@ -0,0 +1,300 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/common/windowid.cpp +// Purpose: wxWindowID class - a class for managing window ids +// Author: Brian Vanderburg II +// Created: 2007-09-21 +// Copyright: (c) 2007 Brian Vanderburg II +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// Needed headers +// ---------------------------------------------------------------------------- +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/intl.h" +#endif //WX_PRECOMP + +#include "wx/hashmap.h" + +// Not needed, included in defs.h +// #include "wx/windowid.h" + +#define wxTRACE_WINDOWID wxT("windowid") + +namespace +{ + +#if wxUSE_AUTOID_MANAGEMENT + + +// initially no ids are in use and we allocate them consecutively, but after we +// exhaust the entire range, we wrap around and reuse the ids freed in the +// meanwhile +static const wxUint8 ID_FREE = 0; +static const wxUint8 ID_STARTCOUNT = 1; +static const wxUint8 ID_COUNTTOOLARGE = 254; +static const wxUint8 ID_RESERVED = 255; + +// we use a two level count, most IDs will be used less than ID_COUNTTOOLARGE-1 +// thus we store their count directly in this array, however when the same ID +// is reused a great number of times (more than or equal to ID_COUNTTOOLARGE), +// the hash map stores the actual count +wxUint8 gs_autoIdsRefCount[wxID_AUTO_HIGHEST - wxID_AUTO_LOWEST + 1] = { 0 }; + +// NB: this variable is allocated (again) only when an ID gets at least +// ID_COUNTTOOLARGE refs, and is freed when the latest entry in the map gets +// freed. The cell storing the count for an ID is freed only when its count +// gets to zero (not when it goes below ID_COUNTTOOLARGE, so as to avoid +// degenerate cases) +wxLongToLongHashMap *gs_autoIdsLargeRefCount = NULL; + +// this is an optimization used until we wrap around wxID_AUTO_HIGHEST: if this +// value is < wxID_AUTO_HIGHEST we know that we haven't wrapped yet and so can +// allocate the ids simply by incrementing it +wxWindowID gs_nextAutoId = wxID_AUTO_LOWEST; + +// Reserve an ID +void ReserveIdRefCount(wxWindowID winid) +{ + wxCHECK_RET(winid >= wxID_AUTO_LOWEST && winid <= wxID_AUTO_HIGHEST, + wxT("invalid id range")); + + winid -= wxID_AUTO_LOWEST; + + wxCHECK_RET(gs_autoIdsRefCount[winid] == ID_FREE, + wxT("id already in use or already reserved")); + gs_autoIdsRefCount[winid] = ID_RESERVED; +} + +// Unreserve and id +void UnreserveIdRefCount(wxWindowID winid) +{ + wxCHECK_RET(winid >= wxID_AUTO_LOWEST && winid <= wxID_AUTO_HIGHEST, + wxT("invalid id range")); + + winid -= wxID_AUTO_LOWEST; + + wxCHECK_RET(gs_autoIdsRefCount[winid] == ID_RESERVED, + wxT("id already in use or not reserved")); + gs_autoIdsRefCount[winid] = ID_FREE; +} + +// Get the usage count of an id +int GetIdRefCount(wxWindowID winid) +{ + wxCHECK_MSG(winid >= wxID_AUTO_LOWEST && winid <= wxID_AUTO_HIGHEST, 0, + wxT("invalid id range")); + + winid -= wxID_AUTO_LOWEST; + int refCount = gs_autoIdsRefCount[winid]; + if (refCount == ID_COUNTTOOLARGE) + refCount = (*gs_autoIdsLargeRefCount)[winid]; + return refCount; +} + +// Increase the count for an id +void IncIdRefCount(wxWindowID winid) +{ + wxCHECK_RET(winid >= wxID_AUTO_LOWEST && winid <= wxID_AUTO_HIGHEST, + wxT("invalid id range")); + + winid -= wxID_AUTO_LOWEST; + + wxCHECK_RET(gs_autoIdsRefCount[winid] != ID_FREE, wxT("id should first be reserved")); + + if(gs_autoIdsRefCount[winid] == ID_RESERVED) + { + gs_autoIdsRefCount[winid] = ID_STARTCOUNT; + } + else if (gs_autoIdsRefCount[winid] >= ID_COUNTTOOLARGE-1) + { + if (gs_autoIdsRefCount[winid] == ID_COUNTTOOLARGE-1) + { + // we need to allocate a cell, and maybe the hash map itself + if (!gs_autoIdsLargeRefCount) + gs_autoIdsLargeRefCount = new wxLongToLongHashMap; + (*gs_autoIdsLargeRefCount)[winid] = ID_COUNTTOOLARGE-1; + + gs_autoIdsRefCount[winid] = ID_COUNTTOOLARGE; + } + ++(*gs_autoIdsLargeRefCount)[winid]; + } + else + { + gs_autoIdsRefCount[winid]++; + } + + wxLogTrace(wxTRACE_WINDOWID, wxT("Increasing ref count of ID %d to %d"), + winid + wxID_AUTO_LOWEST, GetIdRefCount(winid + wxID_AUTO_LOWEST)); +} + +// Decrease the count for an id +void DecIdRefCount(wxWindowID winid) +{ + wxCHECK_RET(winid >= wxID_AUTO_LOWEST && winid <= wxID_AUTO_HIGHEST, + wxT("invalid id range")); + + winid -= wxID_AUTO_LOWEST; + + wxCHECK_RET(gs_autoIdsRefCount[winid] != ID_FREE, wxT("id count already 0")); + + // DecIdRefCount is only called on an ID that has been IncIdRefCount'ed' + // so it should never be reserved, but test anyway + if(gs_autoIdsRefCount[winid] == ID_RESERVED) + { + wxFAIL_MSG(wxT("reserve id being decreased")); + gs_autoIdsRefCount[winid] = ID_FREE; + } + else if(gs_autoIdsRefCount[winid] == ID_COUNTTOOLARGE) + { + long &largeCount = (*gs_autoIdsLargeRefCount)[winid]; + --largeCount; + if (largeCount == 0) + { + gs_autoIdsLargeRefCount->erase (winid); + gs_autoIdsRefCount[winid] = ID_FREE; + + if (gs_autoIdsLargeRefCount->empty()) + wxDELETE (gs_autoIdsLargeRefCount); + } + } + else + gs_autoIdsRefCount[winid]--; + + wxLogTrace(wxTRACE_WINDOWID, wxT("Decreasing ref count of ID %d to %d"), + winid + wxID_AUTO_LOWEST, GetIdRefCount(winid + wxID_AUTO_LOWEST)); +} + +#else // wxUSE_AUTOID_MANAGEMENT + +static wxWindowID gs_nextAutoId = wxID_AUTO_HIGHEST; + +#endif + +} // anonymous namespace + + +#if wxUSE_AUTOID_MANAGEMENT + +void wxWindowIDRef::Assign(wxWindowID winid) +{ + if ( winid != m_id ) + { + // decrease count if it is in the managed range + if ( m_id >= wxID_AUTO_LOWEST && m_id <= wxID_AUTO_HIGHEST ) + DecIdRefCount(m_id); + + m_id = winid; + + // increase count if it is in the managed range + if ( m_id >= wxID_AUTO_LOWEST && m_id <= wxID_AUTO_HIGHEST ) + IncIdRefCount(m_id); + } +} + +#endif // wxUSE_AUTOID_MANAGEMENT + + + +wxWindowID wxIdManager::ReserveId(int count) +{ + wxASSERT_MSG(count > 0, wxT("can't allocate less than 1 id")); + + +#if wxUSE_AUTOID_MANAGEMENT + if ( gs_nextAutoId + count - 1 <= wxID_AUTO_HIGHEST ) + { + wxWindowID winid = gs_nextAutoId; + + while(count--) + { + ReserveIdRefCount(gs_nextAutoId++); + } + + return winid; + } + else + { + int found = 0; + + for(wxWindowID winid = wxID_AUTO_LOWEST; winid <= wxID_AUTO_HIGHEST; winid++) + { + if(GetIdRefCount(winid) == 0) + { + found++; + if(found == count) + { + // Imagine this: 100 free IDs left. Then NewId(50) takes 50 + // so 50 left. Then, the 25 before that last 50 are freed, but + // gs_nextAutoId does not decrement and stays where it is at + // with 50 free. Then NewId(75) gets called, and since there + // are only 50 left according to gs_nextAutoId, it does a + // search and finds the 75 at the end. Then NewId(10) gets + // called, and accorind to gs_nextAutoId, their are still + // 50 at the end so it returns them without testing the ref + // To fix this, the next ID is also updated here as needed + if(winid >= gs_nextAutoId) + gs_nextAutoId = winid + 1; + + while(count--) + ReserveIdRefCount(winid--); + + return winid + 1; + } + } + else + { + found = 0; + } + } + } + + wxLogError(_("Out of window IDs. Recommend shutting down application.")); + return wxID_NONE; +#else // !wxUSE_AUTOID_MANAGEMENT + // Make sure enough in the range + wxWindowID winid; + + winid = gs_nextAutoId - count + 1; + + if ( winid >= wxID_AUTO_LOWEST && winid <= wxID_AUTO_HIGHEST ) + { + // There is enough, but it may be time to wrap + if(winid == wxID_AUTO_LOWEST) + gs_nextAutoId = wxID_AUTO_HIGHEST; + else + gs_nextAutoId = winid - 1; + + return winid; + } + else + { + // There is not enough at the low end of the range or + // count was big enough to wrap around to the positive + // Surely 'count' is not so big to take up much of the range + gs_nextAutoId = wxID_AUTO_HIGHEST - count; + return gs_nextAutoId + 1; + } +#endif // wxUSE_AUTOID_MANAGEMENT/!wxUSE_AUTOID_MANAGEMENT +} + +void wxIdManager::UnreserveId(wxWindowID winid, int count) +{ + wxASSERT_MSG(count > 0, wxT("can't unreserve less than 1 id")); + +#if wxUSE_AUTOID_MANAGEMENT + while (count--) + UnreserveIdRefCount(winid++); +#else + wxUnusedVar(winid); + wxUnusedVar(count); +#endif +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/wrapsizer.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/wrapsizer.cpp new file mode 100644 index 0000000000..e1b112bed5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/wrapsizer.cpp @@ -0,0 +1,589 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/wrapsizer.cpp +// Purpose: provides wxWrapSizer class for layout +// Author: Arne Steinarson +// Created: 2008-05-08 +// Copyright: (c) Arne Steinarson +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/wrapsizer.h" +#include "wx/vector.h" + +namespace +{ + +// ---------------------------------------------------------------------------- +// helper local classes +// ---------------------------------------------------------------------------- + +// This object changes the item proportion to INT_MAX in its ctor and restores +// it back in the dtor. +class wxPropChanger : public wxObject +{ +public: + wxPropChanger(wxSizer& sizer, wxSizerItem& item) + : m_sizer(sizer), + m_item(item), + m_propOld(item.GetProportion()) + { + // ensure that this item expands more than all the other ones + item.SetProportion(INT_MAX); + } + + ~wxPropChanger() + { + // check if the sizer still has this item, it could have been removed + if ( m_sizer.GetChildren().Find(&m_item) ) + m_item.SetProportion(m_propOld); + } + +private: + wxSizer& m_sizer; + wxSizerItem& m_item; + const int m_propOld; + + wxDECLARE_NO_COPY_CLASS(wxPropChanger); +}; + +} // anonymous namespace + +// ============================================================================ +// wxWrapSizer implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxWrapSizer, wxBoxSizer) + +wxWrapSizer::wxWrapSizer(int orient, int flags) + : wxBoxSizer(orient), + m_flags(flags), + m_dirInform(0), + m_availSize(-1), + m_availableOtherDir(0), + m_lastUsed(true), + m_minSizeMinor(0), + m_maxSizeMajor(0), + m_minItemMajor(INT_MAX), + m_rows(orient ^ wxBOTH) +{ +} + +wxWrapSizer::~wxWrapSizer() +{ + ClearRows(); +} + +void wxWrapSizer::ClearRows() +{ + // all elements of the row sizers are also elements of this one (we + // directly add pointers to elements of our own m_children list to the row + // sizers in RecalcSizes()), so we need to detach them from the row sizer + // to avoid double deletion + wxSizerItemList& rows = m_rows.GetChildren(); + for ( wxSizerItemList::iterator i = rows.begin(), + end = rows.end(); + i != end; + ++i ) + { + wxSizerItem * const item = *i; + wxSizer * const row = item->GetSizer(); + if ( !row ) + { + wxFAIL_MSG( "all elements of m_rows must be sizers" ); + continue; + } + + row->GetChildren().clear(); + + wxPropChanger * const + propChanger = static_cast(item->GetUserData()); + if ( propChanger ) + { + // this deletes propChanger and so restores the old proportion + item->SetUserData(NULL); + } + } +} + +wxSizer *wxWrapSizer::GetRowSizer(size_t n) +{ + const wxSizerItemList& rows = m_rows.GetChildren(); + if ( n < rows.size() ) + return rows[n]->GetSizer(); + + wxSizer * const sizer = new wxBoxSizer(GetOrientation()); + m_rows.Add(sizer, wxSizerFlags().Expand()); + return sizer; +} + +bool wxWrapSizer::InformFirstDirection(int direction, + int size, + int availableOtherDir) +{ + if ( !direction ) + return false; + + // Store the values for later use + m_availSize = size; + m_availableOtherDir = availableOtherDir + + (direction == wxHORIZONTAL ? m_minSize.y + : m_minSize.x); + m_dirInform = direction; + m_lastUsed = false; + return true; +} + + +void wxWrapSizer::AdjustLastRowItemProp(size_t n, wxSizerItem *itemLast) +{ + if ( !itemLast || !(m_flags & wxEXTEND_LAST_ON_EACH_LINE) ) + { + // nothing to do + return; + } + + wxSizerItem * const item = m_rows.GetItem(n); + wxCHECK_RET( item, "invalid sizer item" ); + + // store the item we modified and its original proportion + item->SetUserData(new wxPropChanger(*this, *itemLast)); +} + +wxSize wxWrapSizer::CalcMin() +{ + if ( m_children.empty() ) + return wxSize(); + + // We come here to calculate min size in two different situations: + // 1 - Immediately after InformFirstDirection, then we find a min size that + // uses one dimension maximally and the other direction minimally. + // 2 - Ordinary case, get a sensible min size value using the current line + // layout, trying to maintain the possibility to re-arrange lines by + // sizing + + if ( !m_lastUsed ) + { + // Case 1 above: InformFirstDirection() has just been called + m_lastUsed = true; + + // There are two different algorithms for finding a useful min size for + // a wrap sizer, depending on whether the first reported size component + // is the opposite as our own orientation (the simpler case) or the same + // one (more complicated). + if ( m_dirInform == m_orient ) + CalcMinFromMajor(m_availSize); + else + CalcMinFromMinor(m_availSize); + } + else // Case 2 above: not immediately after InformFirstDirection() + { + if ( m_availSize > 0 ) + { + wxSize szAvail; // Keep track of boundary so we don't overflow + if ( m_dirInform == m_orient ) + szAvail = SizeFromMajorMinor(m_availSize, m_availableOtherDir); + else + szAvail = SizeFromMajorMinor(m_availableOtherDir, m_availSize); + + CalcMinFittingSize(szAvail); + } + else // Initial calculation, before we have size available to us + { + CalcMaxSingleItemSize(); + } + } + + return m_minSize; +} + +void wxWrapSizer::CalcMinFittingSize(const wxSize& szBoundary) +{ + // Min size based on current line layout. It is important to + // provide a smaller size when possible to allow for resizing with + // the help of re-arranging the lines. + wxSize sizeMin = SizeFromMajorMinor(m_maxSizeMajor, m_minSizeMinor); + if ( m_minSizeMinor < SizeInMinorDir(m_size) && + m_maxSizeMajor < SizeInMajorDir(m_size) ) + { + m_minSize = sizeMin; + } + else + { + // Try making it a bit more narrow + bool done = false; + if ( m_minItemMajor != INT_MAX && m_maxSizeMajor > 0 ) + { + // We try to present a lower min value by removing an item in + // the major direction (and preserving current minor min size). + CalcMinFromMajor(m_maxSizeMajor - m_minItemMajor); + if ( m_minSize.x <= szBoundary.x && m_minSize.y <= szBoundary.y ) + { + SizeInMinorDir(m_minSize) = SizeInMinorDir(sizeMin); + done = true; + } + } + + if ( !done ) + { + // If failed finding little smaller area, go back to what we had + m_minSize = sizeMin; + } + } +} + +void wxWrapSizer::CalcMaxSingleItemSize() +{ + // Find max item size in each direction + int maxMajor = 0; // Widest item + int maxMinor = 0; // Line height + for ( wxSizerItemList::const_iterator i = m_children.begin(); + i != m_children.end(); + ++i ) + { + wxSizerItem * const item = *i; + if ( item->IsShown() ) + { + wxSize sz = item->CalcMin(); + if ( SizeInMajorDir(sz) > maxMajor ) + maxMajor = SizeInMajorDir(sz); + if ( SizeInMinorDir(sz) > maxMinor ) + maxMinor = SizeInMinorDir(sz); + } + } + + // This is, of course, not our real minimal size but if we return more + // than this it would be impossible to shrink us to one row/column so + // we have to pretend that this is all we need for now. + m_minSize = SizeFromMajorMinor(maxMajor, maxMinor); +} + +void wxWrapSizer::CalcMinFromMajor(int totMajor) +{ + // Algorithm for calculating min size: (assuming horizontal orientation) + // This is the simpler case (known major size) + // X: Given, totMajor + // Y: Based on X, calculate how many lines needed + + int maxTotalMajor = 0; // max of rowTotalMajor over all rows + int minorSum = 0; // sum of sizes of all rows in minor direction + int maxRowMinor = 0; // max of item minor sizes in this row + int rowTotalMajor = 0; // sum of major sizes of items in this row + + // pack the items in each row until we reach totMajor, then start a new row + for ( wxSizerItemList::const_iterator i = m_children.begin(); + i != m_children.end(); + ++i ) + { + wxSizerItem * const item = *i; + if ( !item->IsShown() ) + continue; + + wxSize minItemSize = item->CalcMin(); + const int itemMajor = SizeInMajorDir(minItemSize); + const int itemMinor = SizeInMinorDir(minItemSize); + + // check if this is the first item in a new row: if so, we have to put + // it in it, whether it fits or not, as it would never fit better + // anyhow + // + // otherwise check if we have enough space left for this item here + if ( !rowTotalMajor || rowTotalMajor + itemMajor <= totMajor ) + { + // continue this row + rowTotalMajor += itemMajor; + if ( itemMinor > maxRowMinor ) + maxRowMinor = itemMinor; + } + else // start a new row + { + // minor size of the row is the max of minor sizes of its items + minorSum += maxRowMinor; + if ( rowTotalMajor > maxTotalMajor ) + maxTotalMajor = rowTotalMajor; + maxRowMinor = itemMinor; + rowTotalMajor = itemMajor; + } + } + + // account for the last (unfinished) row too + minorSum += maxRowMinor; + if ( rowTotalMajor > maxTotalMajor ) + maxTotalMajor = rowTotalMajor; + + m_minSize = SizeFromMajorMinor(maxTotalMajor, minorSum); +} + +// Helper struct for CalcMinFromMinor +struct wxWrapLine +{ + wxWrapLine() : m_first(NULL), m_width(0) { } + wxSizerItem *m_first; + int m_width; // Width of line +}; + +void wxWrapSizer::CalcMinFromMinor(int totMinor) +{ + // Algorithm for calculating min size: + // This is the more complex case (known minor size) + + // First step, find total sum of all items in primary direction + // and max item size in secondary direction, that gives initial + // estimate of the minimum number of lines. + + int totMajor = 0; // Sum of widths + int maxMinor = 0; // Line height + int maxMajor = 0; // Widest item + int itemCount = 0; + wxSizerItemList::compatibility_iterator node = m_children.GetFirst(); + wxSize sz; + while (node) + { + wxSizerItem *item = node->GetData(); + if ( item->IsShown() ) + { + sz = item->CalcMin(); + totMajor += SizeInMajorDir(sz); + if ( SizeInMinorDir(sz)>maxMinor ) + maxMinor = SizeInMinorDir(sz); + if ( SizeInMajorDir(sz)>maxMinor ) + maxMajor = SizeInMajorDir(sz); + itemCount++; + } + node = node->GetNext(); + } + + // The trivial case + if ( !itemCount || totMajor==0 || maxMinor==0 ) + { + m_minSize = wxSize(0,0); + return; + } + + // First attempt, use lines of average size: + int nrLines = totMinor / maxMinor; // Rounding down is right here + if ( nrLines<=1 ) + { + // Another simple case, everything fits on one line + m_minSize = SizeFromMajorMinor(totMajor,maxMinor); + return; + } + + int lineSize = totMajor / nrLines; + if ( lineSize lines; + + int sumMinor; // Sum of all minor sizes (height of all lines) + + // While we still have items 'spilling over' extend the tested line width + for ( ;; ) + { + wxWrapLine *line = new wxWrapLine; + lines.push_back( line ); + + int tailSize = 0; // Width of what exceeds nrLines + maxMinor = 0; + sumMinor = 0; + for ( node=m_children.GetFirst(); node; node=node->GetNext() ) + { + wxSizerItem *item = node->GetData(); + if ( item->IsShown() ) + { + sz = item->GetMinSizeWithBorder(); + if ( line->m_width+SizeInMajorDir(sz)>lineSize ) + { + line = new wxWrapLine; + lines.push_back(line); + sumMinor += maxMinor; + maxMinor = 0; + } + line->m_width += SizeInMajorDir(sz); + if ( line->m_width && !line->m_first ) + line->m_first = item; + if ( SizeInMinorDir(sz)>maxMinor ) + maxMinor = SizeInMinorDir(sz); + if ( sumMinor+maxMinor>totMinor ) + { + // Keep track of widest tail item + if ( SizeInMajorDir(sz)>tailSize ) + tailSize = SizeInMajorDir(sz); + } + } + } + + if ( tailSize ) + { + // Now look how much we need to extend our size + // We know we must have at least one more line than nrLines + // (otherwise no tail size). + int bestExtSize = 0; // Minimum extension width for current tailSize + for ( int ix=0; ixm_width; // Left over at end of this line + int extSize = GetSizeInMajorDir(lines[ix+1]->m_first->GetMinSizeWithBorder()) - size; + if ( (extSize>=tailSize && (extSizebestExtSize && bestExtSize::iterator it=lines.begin(); it m_maxSizeMajor ) + m_maxSizeMajor = rowMajor; + + // And adjust proportion of its last item if necessary. + AdjustLastRowItemProp(n, itemLast); +} + +void wxWrapSizer::RecalcSizes() +{ + // First restore any proportions we may have changed and remove the old rows + ClearRows(); + + if ( m_children.empty() ) + return; + + // Put all our items into as many row box sizers as needed. + const int majorSize = SizeInMajorDir(m_size); // max size of each row + int rowTotalMajor = 0; // running row major size + int maxRowMinor = 0; + + m_minSizeMinor = 0; + m_minItemMajor = INT_MAX; + m_maxSizeMajor = 0; + + // We need at least one row + size_t nRow = 0; + wxSizer *sizer = GetRowSizer(nRow); + + wxSizerItem *itemLast = NULL, // last item processed in this row + *itemSpace = NULL; // spacer which we delayed adding + + // Now put our child items into child sizers instead + for ( wxSizerItemList::iterator i = m_children.begin(); + i != m_children.end(); + ++i ) + { + wxSizerItem * const item = *i; + if ( !item->IsShown() ) + continue; + + wxSize minItemSize = item->GetMinSizeWithBorder(); + const int itemMajor = SizeInMajorDir(minItemSize); + const int itemMinor = SizeInMinorDir(minItemSize); + if ( itemMajor > 0 && itemMajor < m_minItemMajor ) + m_minItemMajor = itemMajor; + + // Is there more space on this line? Notice that if this is the first + // item we add it unconditionally as it wouldn't fit in the next line + // any better than in this one. + if ( !rowTotalMajor || rowTotalMajor + itemMajor <= majorSize ) + { + // There is enough space here + rowTotalMajor += itemMajor; + if ( itemMinor > maxRowMinor ) + maxRowMinor = itemMinor; + } + else // Start a new row + { + FinishRow(nRow, rowTotalMajor, maxRowMinor, itemLast); + + rowTotalMajor = itemMajor; + maxRowMinor = itemMinor; + + // Get a new empty sizer to insert into + sizer = GetRowSizer(++nRow); + + itemLast = + itemSpace = NULL; + } + + // Only remove first/last spaces if that flag is set + if ( (m_flags & wxREMOVE_LEADING_SPACES) && IsSpaceItem(item) ) + { + // Remember space only if we have a first item + if ( itemLast ) + itemSpace = item; + } + else // not a space + { + if ( itemLast && itemSpace ) + { + // We had a spacer after a real item and now that we add + // another real item to the same row we need to add the spacer + // between them two. + sizer->Add(itemSpace); + } + + // Notice that we reuse a pointer to our own sizer item here, so we + // must remember to remove it by calling ClearRows() to avoid + // double deletion later + sizer->Add(item); + + itemLast = item; + itemSpace = NULL; + } + + // If item is a window, it now has a pointer to the child sizer, + // which is wrong. Set it to point to us. + if ( wxWindow *win = item->GetWindow() ) + win->SetContainingSizer(this); + } + + FinishRow(nRow, rowTotalMajor, maxRowMinor, itemLast); + + // Now do layout on row sizer + m_rows.SetDimension(m_position, m_size); +} + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/wxcrt.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/wxcrt.cpp new file mode 100644 index 0000000000..29ecbaa552 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/wxcrt.cpp @@ -0,0 +1,1296 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/wxcrt.cpp +// Purpose: wxChar CRT wrappers implementation +// Author: Ove Kaven +// Modified by: Ron Lee, Francesco Montorsi +// Created: 09/04/99 +// Copyright: (c) wxWidgets copyright +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// headers, declarations, constants +// =========================================================================== + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/crt.h" +#include "wx/strconv.h" // wxMBConv::cWC2MB() + +#define _ISOC9X_SOURCE 1 // to get vsscanf() +#define _BSD_SOURCE 1 // to still get strdup() + +#include +#include +#include +#include + +#ifdef __SGI__ + // wide character functions are declared in std namespace under IRIX + using namespace std; + + // and this one is only declared if __c99 is defined which is not the case + // for C++ builds, so declare it ourselves + extern "C" int vswscanf(const wchar_t *, const wchar_t *, va_list); +#endif + +#ifndef __WXWINCE__ + #include + #include +#else + #include "wx/msw/wince/time.h" +#endif + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/hash.h" + #include "wx/utils.h" // for wxMin and wxMax + #include "wx/log.h" +#endif + +#ifdef HAVE_LANGINFO_H + #include +#endif + +#ifdef __WXWINCE__ + // there is no errno.h under CE apparently + #define wxSET_ERRNO(value) +#else + #include + + #define wxSET_ERRNO(value) errno = value +#endif + +#if defined(__DARWIN__) + #include "wx/osx/core/cfref.h" + #include + #include "wx/osx/core/cfstring.h" + #include +#endif + +WXDLLIMPEXP_BASE size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n) +{ + // assume that we have mbsrtowcs() too if we have wcsrtombs() +#ifdef HAVE_WCSRTOMBS + mbstate_t mbstate; + memset(&mbstate, 0, sizeof(mbstate_t)); +#endif + + if (buf) { + if (!n || !*psz) { + if (n) *buf = wxT('\0'); + return 0; + } +#ifdef HAVE_WCSRTOMBS + return mbsrtowcs(buf, &psz, n, &mbstate); +#else + return mbstowcs(buf, psz, n); +#endif + } + + // Note that we rely on common (and required by Unix98 but unfortunately not + // C99) extension which allows to call mbs(r)towcs() with NULL output pointer + // to just get the size of the needed buffer -- this is needed as otherwise + // we have no idea about how much space we need. Currently all supported + // compilers do provide it and if they don't, HAVE_WCSRTOMBS shouldn't be + // defined at all. +#ifdef HAVE_WCSRTOMBS + return mbsrtowcs(NULL, &psz, 0, &mbstate); +#else + return mbstowcs(NULL, psz, 0); +#endif +} + +WXDLLIMPEXP_BASE size_t wxWC2MB(char *buf, const wchar_t *pwz, size_t n) +{ +#ifdef HAVE_WCSRTOMBS + mbstate_t mbstate; + memset(&mbstate, 0, sizeof(mbstate_t)); +#endif + + if (buf) { + if (!n || !*pwz) { + // glibc2.1 chokes on null input + if (n) *buf = '\0'; + return 0; + } +#ifdef HAVE_WCSRTOMBS + return wcsrtombs(buf, &pwz, n, &mbstate); +#else + return wcstombs(buf, pwz, n); +#endif + } + +#ifdef HAVE_WCSRTOMBS + return wcsrtombs(NULL, &pwz, 0, &mbstate); +#else + return wcstombs(NULL, pwz, 0); +#endif +} + +char* wxSetlocale(int category, const char *locale) +{ +#ifdef __WXWINCE__ + // FIXME-CE: there is no setlocale() in CE CRT, use SetThreadLocale()? + wxUnusedVar(category); + wxUnusedVar(locale); + + return NULL; +#else // !__WXWINCE__ +#ifdef __WXMAC__ + char *rv = NULL ; + if ( locale != NULL && locale[0] == 0 ) + { + // the attempt to use newlocale(LC_ALL_MASK, "", NULL); + // here in order to deduce the language along the environment vars rules + // lead to strange crashes later... + + // we have to emulate the behaviour under OS X + wxCFRef userLocaleRef(CFLocaleCopyCurrent()); + wxCFStringRef str(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode))); + wxString langFull = str.AsString()+"_"; + str.reset(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode))); + langFull += str.AsString(); + rv = setlocale(category, langFull.c_str()); + } + else + rv = setlocale(category, locale); +#else + char *rv = setlocale(category, locale); +#endif + if ( locale != NULL /* setting locale, not querying */ && + rv /* call was successful */ ) + { + wxUpdateLocaleIsUtf8(); + } + return rv; +#endif // __WXWINCE__/!__WXWINCE__ +} + +// ============================================================================ +// printf() functions business +// ============================================================================ + +// special test mode: define all functions below even if we don't really need +// them to be able to test them +#ifdef wxTEST_PRINTF + #undef wxFprintf + #undef wxPrintf + #undef wxSprintf + #undef wxVfprintf + #undef wxVsprintf + #undef wxVprintf + #undef wxVsnprintf_ + + #define wxNEED_WPRINTF + + int wxCRT_VfprintfW( FILE *stream, const wchar_t *format, va_list argptr ); +#endif + +#if defined(__DMC__) +/* Digital Mars adds count to _stprintf (C99) so convert */ +int wxCRT_SprintfW (wchar_t * __RESTRICT s, const wchar_t * __RESTRICT format, ... ) +{ + va_list arglist; + + va_start( arglist, format ); + int iLen = swprintf ( s, -1, format, arglist ); + va_end( arglist ); + return iLen ; +} +#endif //__DMC__ + +// ---------------------------------------------------------------------------- +// implement the standard IO functions for wide char if libc doesn't have them +// ---------------------------------------------------------------------------- + +#ifndef wxCRT_FputsW +int wxCRT_FputsW(const wchar_t *ws, FILE *stream) +{ + wxCharBuffer buf(wxConvLibc.cWC2MB(ws)); + if ( !buf ) + return -1; + + // counting the number of wide characters written isn't worth the trouble, + // simply distinguish between ok and error + return wxCRT_FputsA(buf, stream) == -1 ? -1 : 0; +} +#endif // !wxCRT_FputsW + +#ifndef wxCRT_PutsW +int wxCRT_PutsW(const wchar_t *ws) +{ + int rc = wxCRT_FputsW(ws, stdout); + if ( rc != -1 ) + { + if ( wxCRT_FputsW(L"\n", stdout) == -1 ) + return -1; + + rc++; + } + + return rc; +} +#endif // !wxCRT_PutsW + +#ifndef wxCRT_FputcW +int /* not wint_t */ wxCRT_FputcW(wchar_t wc, FILE *stream) +{ + wchar_t ws[2] = { wc, L'\0' }; + + return wxCRT_FputsW(ws, stream); +} +#endif // !wxCRT_FputcW + +// NB: we only implement va_list functions here, the ones taking ... are +// defined below for wxNEED_PRINTF_CONVERSION case anyhow and we reuse +// the definitions there to avoid duplicating them here +#ifdef wxNEED_WPRINTF + +// TODO: implement the scanf() functions +static int vwscanf(const wchar_t *format, va_list argptr) +{ + wxFAIL_MSG( wxT("TODO") ); + + return -1; +} + +static int vfwscanf(FILE *stream, const wchar_t *format, va_list argptr) +{ + wxFAIL_MSG( wxT("TODO") ); + + return -1; +} + +#define vswprintf wxCRT_VsnprintfW + +static int vfwprintf(FILE *stream, const wchar_t *format, va_list argptr) +{ + wxString s; + int rc = s.PrintfV(format, argptr); + + if ( rc != -1 ) + { + // we can't do much better without Unicode support in libc... + if ( fprintf(stream, "%s", (const char*)s.mb_str() ) == -1 ) + return -1; + } + + return rc; +} + +static int vwprintf(const wchar_t *format, va_list argptr) +{ + return wxCRT_VfprintfW(stdout, format, argptr); +} + +#endif // wxNEED_WPRINTF + +#ifdef wxNEED_VSWSCANF +static int vswscanf(const wchar_t *ws, const wchar_t *format, va_list argptr) +{ + // The best we can do without proper Unicode support in glibc is to + // convert the strings into MB representation and run ANSI version + // of the function. This doesn't work with %c and %s because of difference + // in size of char and wchar_t, though. + + wxCHECK_MSG( wxStrstr(format, L"%s") == NULL, -1, + wxT("incomplete vswscanf implementation doesn't allow %s") ); + wxCHECK_MSG( wxStrstr(format, L"%c") == NULL, -1, + wxT("incomplete vswscanf implementation doesn't allow %c") ); + + return wxCRT_VsscanfA(static_cast(wxConvLibc.cWC2MB(ws)), + wxConvLibc.cWC2MB(format), argptr); +} +#endif + +// ---------------------------------------------------------------------------- +// wxPrintf(), wxScanf() and relatives +// ---------------------------------------------------------------------------- + +// FIXME-UTF8: do format conversion using (modified) wxFormatConverter in +// template wrappers, not here; note that it will needed to +// translate all forms of string specifiers to %(l)s for wxPrintf(), +// but it only should do what it did in 2.8 for wxScanf()! + +#ifndef wxCRT_PrintfW +int wxCRT_PrintfW( const wchar_t *format, ... ) +{ + va_list argptr; + va_start(argptr, format); + + int ret = vwprintf( format, argptr ); + + va_end(argptr); + + return ret; +} +#endif + +#ifndef wxCRT_FprintfW +int wxCRT_FprintfW( FILE *stream, const wchar_t *format, ... ) +{ + va_list argptr; + va_start( argptr, format ); + + int ret = vfwprintf( stream, format, argptr ); + + va_end(argptr); + + return ret; +} +#endif + +#ifndef wxCRT_VfprintfW +int wxCRT_VfprintfW( FILE *stream, const wchar_t *format, va_list argptr ) +{ + return vfwprintf( stream, format, argptr ); +} +#endif + +#ifndef wxCRT_VprintfW +int wxCRT_VprintfW( const wchar_t *format, va_list argptr ) +{ + return vwprintf( format, argptr ); +} +#endif + +#ifndef wxCRT_VsprintfW +int wxCRT_VsprintfW( wchar_t *str, const wchar_t *format, va_list argptr ) +{ + // same as for wxSprintf() + return vswprintf(str, INT_MAX / 4, format, argptr); +} +#endif + +#ifndef wxCRT_ScanfW +int wxCRT_ScanfW(const wchar_t *format, ...) +{ + va_list argptr; + va_start(argptr, format); + +#ifdef __VMS +#if (__DECCXX_VER >= 70100000) && !defined(__STD_CFRONT) && !defined( __NONAMESPACE_STD ) + int ret = std::vwscanf(format, argptr); +#else + int ret = vwscanf(format, argptr); +#endif +#else + int ret = vwscanf(format, argptr); +#endif + + va_end(argptr); + + return ret; +} +#endif + +#ifndef wxCRT_SscanfW +int wxCRT_SscanfW(const wchar_t *str, const wchar_t *format, ...) +{ + va_list argptr; + va_start(argptr, format); + +#ifdef __VMS +#if (__DECCXX_VER >= 70100000) && !defined(__STD_CFRONT) && !defined( __NONAMESPACE_STD ) + int ret = std::vswscanf(str, format, argptr); +#else + int ret = vswscanf(str, format, argptr); +#endif +#else + int ret = vswscanf(str, format, argptr); +#endif + + va_end(argptr); + + return ret; +} +#endif + +#ifndef wxCRT_FscanfW +int wxCRT_FscanfW(FILE *stream, const wchar_t *format, ...) +{ + va_list argptr; + va_start(argptr, format); +#ifdef __VMS +#if (__DECCXX_VER >= 70100000) && !defined(__STD_CFRONT) && !defined( __NONAMESPACE_STD ) + int ret = std::vfwscanf(stream, format, argptr); +#else + int ret = vfwscanf(stream, format, argptr); +#endif +#else + int ret = vfwscanf(stream, format, argptr); +#endif + + va_end(argptr); + + return ret; +} +#endif + +#ifndef wxCRT_VsscanfW +int wxCRT_VsscanfW(const wchar_t *str, const wchar_t *format, va_list argptr) +{ +#ifdef __VMS +#if (__DECCXX_VER >= 70100000) && !defined(__STD_CFRONT) && !defined( __NONAMESPACE_STD ) + return std::vswscanf(str, format, argptr); +#else + return vswscanf(str, format, argptr); +#endif +#else + return vswscanf(str, format, argptr); +#endif +} +#endif + + +// ---------------------------------------------------------------------------- +// wrappers to printf and scanf function families +// ---------------------------------------------------------------------------- + +#if !wxUSE_UTF8_LOCALE_ONLY +int wxDoSprintfWchar(char *str, const wxChar *format, ...) +{ + va_list argptr; + va_start(argptr, format); + + int rv = wxVsprintf(str, format, argptr); + + va_end(argptr); + return rv; +} +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#if wxUSE_UNICODE_UTF8 +int wxDoSprintfUtf8(char *str, const char *format, ...) +{ + va_list argptr; + va_start(argptr, format); + + int rv = wxVsprintf(str, format, argptr); + + va_end(argptr); + return rv; +} +#endif // wxUSE_UNICODE_UTF8 + +#if wxUSE_UNICODE + +#if !wxUSE_UTF8_LOCALE_ONLY +int wxDoSprintfWchar(wchar_t *str, const wxChar *format, ...) +{ + va_list argptr; + va_start(argptr, format); + + int rv = wxVsprintf(str, format, argptr); + + va_end(argptr); + return rv; +} +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#if wxUSE_UNICODE_UTF8 +int wxDoSprintfUtf8(wchar_t *str, const char *format, ...) +{ + va_list argptr; + va_start(argptr, format); + + int rv = wxVsprintf(str, format, argptr); + + va_end(argptr); + return rv; +} +#endif // wxUSE_UNICODE_UTF8 + +#endif // wxUSE_UNICODE + +#if !wxUSE_UTF8_LOCALE_ONLY +int wxDoSnprintfWchar(char *str, size_t size, const wxChar *format, ...) +{ + va_list argptr; + va_start(argptr, format); + + int rv = wxVsnprintf(str, size, format, argptr); + + va_end(argptr); + return rv; +} +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#if wxUSE_UNICODE_UTF8 +int wxDoSnprintfUtf8(char *str, size_t size, const char *format, ...) +{ + va_list argptr; + va_start(argptr, format); + + int rv = wxVsnprintf(str, size, format, argptr); + + va_end(argptr); + return rv; +} +#endif // wxUSE_UNICODE_UTF8 + +#if wxUSE_UNICODE + +#if !wxUSE_UTF8_LOCALE_ONLY +int wxDoSnprintfWchar(wchar_t *str, size_t size, const wxChar *format, ...) +{ + va_list argptr; + va_start(argptr, format); + + int rv = wxVsnprintf(str, size, format, argptr); + + va_end(argptr); + return rv; +} +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#if wxUSE_UNICODE_UTF8 +int wxDoSnprintfUtf8(wchar_t *str, size_t size, const char *format, ...) +{ + va_list argptr; + va_start(argptr, format); + + int rv = wxVsnprintf(str, size, format, argptr); + + va_end(argptr); + return rv; +} +#endif // wxUSE_UNICODE_UTF8 + +#endif // wxUSE_UNICODE + + +#ifdef HAVE_BROKEN_VSNPRINTF_DECL + #define vsnprintf wx_fixed_vsnprintf +#endif + +#if wxUSE_UNICODE + +namespace +{ + +#if !wxUSE_UTF8_LOCALE_ONLY +int ConvertStringToBuf(const wxString& s, char *out, size_t outsize) +{ + const wxCharBuffer buf(s.mb_str()); + + const size_t len = buf.length(); + if ( outsize > len ) + { + memcpy(out, buf, len+1); + } + else // not enough space + { + memcpy(out, buf, outsize-1); + out[outsize-1] = '\0'; + } + + return len; +} +#endif // !wxUSE_UTF8_LOCALE_ONLY + +#if wxUSE_UNICODE_UTF8 +int ConvertStringToBuf(const wxString& s, wchar_t *out, size_t outsize) +{ + const wxWX2WCbuf buf(s.wc_str()); + size_t len = s.length(); // same as buf length for wchar_t* + if ( outsize > len ) + { + memcpy(out, buf, (len+1) * sizeof(wchar_t)); + } + else // not enough space + { + memcpy(out, buf, (outsize-1) * sizeof(wchar_t)); + out[outsize-1] = 0; + } + return len; +} +#endif // wxUSE_UNICODE_UTF8 + +} // anonymous namespace + +template +static size_t PrintfViaString(T *out, size_t outsize, + const wxString& format, va_list argptr) +{ + wxString s; + s.PrintfV(format, argptr); + + return ConvertStringToBuf(s, out, outsize); +} +#endif // wxUSE_UNICODE + +int wxVsprintf(char *str, const wxString& format, va_list argptr) +{ +#if wxUSE_UTF8_LOCALE_ONLY + return wxCRT_VsprintfA(str, format.wx_str(), argptr); +#else + #if wxUSE_UNICODE_UTF8 + if ( wxLocaleIsUtf8 ) + return wxCRT_VsprintfA(str, format.wx_str(), argptr); + else + #endif + #if wxUSE_UNICODE + return PrintfViaString(str, wxNO_LEN, format, argptr); + #else + return wxCRT_VsprintfA(str, format.mb_str(), argptr); + #endif +#endif +} + +#if wxUSE_UNICODE +int wxVsprintf(wchar_t *str, const wxString& format, va_list argptr) +{ +#if wxUSE_UNICODE_WCHAR +#ifdef __DMC__ +/* +This fails with a bug similar to +http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=c++.beta&artnum=680 +in DMC 8.49 and 8.50 +I don't see it being used in the wxWidgets sources at present (oct 2007) CE +*/ +#pragma message ( "warning ::::: wxVsprintf(wchar_t *str, const wxString& format, va_list argptr) not yet implemented" ) + wxFAIL_MSG( wxT("TODO") ); + + return -1; +#else + return wxCRT_VsprintfW(str, format.wc_str(), argptr); +#endif //DMC +#else // wxUSE_UNICODE_UTF8 + #if !wxUSE_UTF8_LOCALE_ONLY + if ( !wxLocaleIsUtf8 ) + return wxCRT_VsprintfW(str, format.wc_str(), argptr); + else + #endif + return PrintfViaString(str, wxNO_LEN, format, argptr); +#endif // wxUSE_UNICODE_UTF8 +} +#endif // wxUSE_UNICODE + +int wxVsnprintf(char *str, size_t size, const wxString& format, va_list argptr) +{ + int rv; +#if wxUSE_UTF8_LOCALE_ONLY + rv = wxCRT_VsnprintfA(str, size, format.wx_str(), argptr); +#else + #if wxUSE_UNICODE_UTF8 + if ( wxLocaleIsUtf8 ) + rv = wxCRT_VsnprintfA(str, size, format.wx_str(), argptr); + else + #endif + #if wxUSE_UNICODE + { + // NB: if this code is called, then wxString::PrintV() would use the + // wchar_t* version of wxVsnprintf(), so it's safe to use PrintV() + // from here + rv = PrintfViaString(str, size, format, argptr); + } + #else + rv = wxCRT_VsnprintfA(str, size, format.mb_str(), argptr); + #endif +#endif + + // VsnprintfTestCase reveals that glibc's implementation of vswprintf + // doesn't nul terminate on truncation. + str[size - 1] = 0; + + return rv; +} + +#if wxUSE_UNICODE +int wxVsnprintf(wchar_t *str, size_t size, const wxString& format, va_list argptr) +{ + int rv; + +#if wxUSE_UNICODE_WCHAR + rv = wxCRT_VsnprintfW(str, size, format.wc_str(), argptr); +#else // wxUSE_UNICODE_UTF8 + #if !wxUSE_UTF8_LOCALE_ONLY + if ( !wxLocaleIsUtf8 ) + rv = wxCRT_VsnprintfW(str, size, format.wc_str(), argptr); + else + #endif + { + // NB: if this code is called, then wxString::PrintV() would use the + // char* version of wxVsnprintf(), so it's safe to use PrintV() + // from here + rv = PrintfViaString(str, size, format, argptr); + } +#endif // wxUSE_UNICODE_UTF8 + + // VsnprintfTestCase reveals that glibc's implementation of vswprintf + // doesn't nul terminate on truncation. + str[size - 1] = 0; + + return rv; +} +#endif // wxUSE_UNICODE + + +// ---------------------------------------------------------------------------- +// ctype.h stuff (currently unused) +// ---------------------------------------------------------------------------- + +#ifndef wxCRT_StrdupA +WXDLLIMPEXP_BASE char *wxCRT_StrdupA(const char *s) +{ + return strcpy((char *)malloc(strlen(s) + 1), s); +} +#endif // wxCRT_StrdupA + +#ifndef wxCRT_StrdupW +WXDLLIMPEXP_BASE wchar_t * wxCRT_StrdupW(const wchar_t *pwz) +{ + size_t size = (wxWcslen(pwz) + 1) * sizeof(wchar_t); + wchar_t *ret = (wchar_t *) malloc(size); + memcpy(ret, pwz, size); + return ret; +} +#endif // wxCRT_StrdupW + +#ifndef wxWCHAR_T_IS_WXCHAR16 +size_t wxStrlen(const wxChar16 *s ) +{ + if (!s) return 0; + size_t i=0; + while (*s!=0) { ++i; ++s; }; + return i; +} + +wxChar16* wxStrdup(const wxChar16* s) +{ + size_t size = (wxStrlen(s) + 1) * sizeof(wxChar16); + wxChar16 *ret = (wxChar16*) malloc(size); + memcpy(ret, s, size); + return ret; +} +#endif + +#ifndef wxWCHAR_T_IS_WXCHAR32 +size_t wxStrlen(const wxChar32 *s ) +{ + if (!s) return 0; + size_t i=0; + while (*s!=0) { ++i; ++s; }; + return i; +} + +wxChar32* wxStrdup(const wxChar32* s) +{ + size_t size = (wxStrlen(s) + 1) * sizeof(wxChar32); + wxChar32 *ret = (wxChar32*) malloc(size); + if ( ret ) + memcpy(ret, s, size); + return ret; +} +#endif + +#ifndef wxCRT_StricmpA +WXDLLIMPEXP_BASE int wxCRT_StricmpA(const char *psz1, const char *psz2) +{ + char c1, c2; + do { + c1 = wxTolower(*psz1++); + c2 = wxTolower(*psz2++); + } while ( c1 && (c1 == c2) ); + return c1 - c2; +} +#endif // !defined(wxCRT_StricmpA) + +#ifndef wxCRT_StricmpW +WXDLLIMPEXP_BASE int wxCRT_StricmpW(const wchar_t *psz1, const wchar_t *psz2) +{ + wchar_t c1, c2; + do { + c1 = wxTolower(*psz1++); + c2 = wxTolower(*psz2++); + } while ( c1 && (c1 == c2) ); + return c1 - c2; +} +#endif // !defined(wxCRT_StricmpW) + +#ifndef wxCRT_StrnicmpA +WXDLLIMPEXP_BASE int wxCRT_StrnicmpA(const char *s1, const char *s2, size_t n) +{ + // initialize the variables just to suppress stupid gcc warning + char c1 = 0, c2 = 0; + while (n && ((c1 = wxTolower(*s1)) == (c2 = wxTolower(*s2)) ) && c1) n--, s1++, s2++; + if (n) { + if (c1 < c2) return -1; + if (c1 > c2) return 1; + } + return 0; +} +#endif // !defined(wxCRT_StrnicmpA) + +#ifndef wxCRT_StrnicmpW +WXDLLIMPEXP_BASE int wxCRT_StrnicmpW(const wchar_t *s1, const wchar_t *s2, size_t n) +{ + // initialize the variables just to suppress stupid gcc warning + wchar_t c1 = 0, c2 = 0; + while (n && ((c1 = wxTolower(*s1)) == (c2 = wxTolower(*s2)) ) && c1) n--, s1++, s2++; + if (n) { + if (c1 < c2) return -1; + if (c1 > c2) return 1; + } + return 0; +} +#endif // !defined(wxCRT_StrnicmpW) + +// ---------------------------------------------------------------------------- +// string.h functions +// ---------------------------------------------------------------------------- + +// this (and wxCRT_StrncmpW below) are extern "C" because they are needed +// by regex code, the rest isn't needed, so it's not declared as extern "C" +#ifndef wxCRT_StrlenW +extern "C" WXDLLIMPEXP_BASE size_t wxCRT_StrlenW(const wchar_t *s) +{ + size_t n = 0; + while ( *s++ ) + n++; + + return n; +} +#endif + +// ---------------------------------------------------------------------------- +// stdlib.h functions +// ---------------------------------------------------------------------------- + +#ifndef wxCRT_GetenvW +WXDLLIMPEXP_BASE wchar_t* wxCRT_GetenvW(const wchar_t *name) +{ + // NB: buffer returned by getenv() is allowed to be overwritten next + // time getenv() is called, so it is OK to use static string + // buffer to hold the data. + static wxWCharBuffer value; + value = wxConvLibc.cMB2WC(getenv(wxConvLibc.cWC2MB(name))); + return value.data(); +} +#endif // !wxCRT_GetenvW + +#ifndef wxCRT_StrftimeW +WXDLLIMPEXP_BASE size_t +wxCRT_StrftimeW(wchar_t *s, size_t maxsize, const wchar_t *fmt, const struct tm *tm) +{ + if ( !maxsize ) + return 0; + + wxCharBuffer buf(maxsize); + + wxCharBuffer bufFmt(wxConvLibc.cWX2MB(fmt)); + if ( !bufFmt ) + return 0; + + size_t ret = strftime(buf.data(), maxsize, bufFmt, tm); + if ( !ret ) + return 0; + + wxWCharBuffer wbuf = wxConvLibc.cMB2WX(buf); + if ( !wbuf ) + return 0; + + wxCRT_StrncpyW(s, wbuf, maxsize); + return wxCRT_StrlenW(s); +} +#endif // !wxCRT_StrftimeW + +#ifdef wxLongLong_t +template +static wxULongLong_t +wxCRT_StrtoullBase(const T* nptr, T** endptr, int base, T* sign) +{ + wxULongLong_t sum = 0; + wxString wxstr(nptr); + wxString::const_iterator i = wxstr.begin(); + wxString::const_iterator end = wxstr.end(); + + // Skip spaces + while ( i != end && wxIsspace(*i) ) ++i; + + // Starts with sign? + *sign = wxT(' '); + if ( i != end ) + { + T c = *i; + if ( c == wxT('+') || c == wxT('-') ) + { + *sign = c; + ++i; + } + } + + // Starts with octal or hexadecimal prefix? + if ( i != end && *i == wxT('0') ) + { + ++i; + if ( i != end ) + { + if ( (*i == wxT('x')) || (*i == wxT('X')) ) + { + // Hexadecimal prefix: use base 16 if auto-detecting. + if ( base == 0 ) + base = 16; + + // If we do use base 16, just skip "x" as well. + if ( base == 16 ) + { + ++i; + } + else // Not using base 16 + { + // Then it's an error. + if ( endptr ) + *endptr = (T*) nptr; + wxSET_ERRNO(EINVAL); + return sum; + } + } + else if ( base == 0 ) + { + base = 8; + } + } + else + --i; + } + + if ( base == 0 ) + base = 10; + + for ( ; i != end; ++i ) + { + unsigned int n; + + T c = *i; + if ( c >= '0' ) + { + if ( c <= '9' ) + n = c - wxT('0'); + else + n = wxTolower(c) - wxT('a') + 10; + } + else + break; + + if ( n >= (unsigned int)base ) + // Invalid character (for this base) + break; + + wxULongLong_t prevsum = sum; + sum = (sum * base) + n; + + if ( sum < prevsum ) + { + wxSET_ERRNO(ERANGE); + break; + } + } + + if ( endptr ) + { + *endptr = (T*)(nptr + (i - wxstr.begin())); + } + + return sum; +} + +template +static wxULongLong_t wxCRT_DoStrtoull(const T* nptr, T** endptr, int base) +{ + T sign; + wxULongLong_t uval = ::wxCRT_StrtoullBase(nptr, endptr, base, &sign); + + if ( sign == wxT('-') ) + { + wxSET_ERRNO(ERANGE); + uval = 0; + } + + return uval; +} + +template +static wxLongLong_t wxCRT_DoStrtoll(const T* nptr, T** endptr, int base) +{ + T sign; + wxULongLong_t uval = ::wxCRT_StrtoullBase(nptr, endptr, base, &sign); + wxLongLong_t val = 0; + + if ( sign == wxT('-') ) + { + if (uval <= (wxULongLong_t)wxINT64_MAX + 1) + { + val = -(wxLongLong_t)uval; + } + else + { + wxSET_ERRNO(ERANGE); + } + } + else if ( uval <= wxINT64_MAX ) + { + val = uval; + } + else + { + wxSET_ERRNO(ERANGE); + } + + return val; +} + +#ifndef wxCRT_StrtollA +wxLongLong_t wxCRT_StrtollA(const char* nptr, char** endptr, int base) + { return wxCRT_DoStrtoll(nptr, endptr, base); } +#endif +#ifndef wxCRT_StrtollW +wxLongLong_t wxCRT_StrtollW(const wchar_t* nptr, wchar_t** endptr, int base) + { return wxCRT_DoStrtoll(nptr, endptr, base); } +#endif + +#ifndef wxCRT_StrtoullA +wxULongLong_t wxCRT_StrtoullA(const char* nptr, char** endptr, int base) + { return wxCRT_DoStrtoull(nptr, endptr, base); } +#endif +#ifndef wxCRT_StrtoullW +wxULongLong_t wxCRT_StrtoullW(const wchar_t* nptr, wchar_t** endptr, int base) + { return wxCRT_DoStrtoull(nptr, endptr, base); } +#endif + +#endif // wxLongLong_t + +// ---------------------------------------------------------------------------- +// strtok() functions +// ---------------------------------------------------------------------------- + +template +static T *wxCRT_DoStrtok(T *psz, const T *delim, T **save_ptr) +{ + if (!psz) + { + psz = *save_ptr; + if ( !psz ) + return NULL; + } + + psz += wxStrspn(psz, delim); + if (!*psz) + { + *save_ptr = NULL; + return NULL; + } + + T *ret = psz; + psz = wxStrpbrk(psz, delim); + if (!psz) + { + *save_ptr = NULL; + } + else + { + *psz = wxT('\0'); + *save_ptr = psz + 1; + } + + return ret; +} + +#ifndef wxCRT_StrtokA +char *wxCRT_StrtokA(char *psz, const char *delim, char **save_ptr) + { return wxCRT_DoStrtok(psz, delim, save_ptr); } +#endif +#ifndef wxCRT_StrtokW +wchar_t *wxCRT_StrtokW(wchar_t *psz, const wchar_t *delim, wchar_t **save_ptr) + { return wxCRT_DoStrtok(psz, delim, save_ptr); } +#endif + +// ---------------------------------------------------------------------------- +// missing C RTL functions +// ---------------------------------------------------------------------------- + +#ifdef wxNEED_STRDUP + +char *strdup(const char *s) +{ + char *dest = (char*) malloc( strlen( s ) + 1 ) ; + if ( dest ) + strcpy( dest , s ) ; + return dest ; +} +#endif // wxNEED_STRDUP + +#if defined(__WXWINCE__) && (_WIN32_WCE <= 211) + +void *calloc( size_t num, size_t size ) +{ + void** ptr = (void **)malloc(num * size); + memset( ptr, 0, num * size); + return ptr; +} + +#endif // __WXWINCE__ <= 211 + +// ============================================================================ +// wxLocaleIsUtf8 +// ============================================================================ + +#if wxUSE_UNICODE_UTF8 + +#if !wxUSE_UTF8_LOCALE_ONLY +bool wxLocaleIsUtf8 = false; // the safer setting if not known +#endif + +static bool wxIsLocaleUtf8() +{ + // NB: we intentionally don't use wxLocale::GetSystemEncodingName(), + // because a) it may be unavailable in some builds and b) has slightly + // different semantics (default locale instead of current) + +#if defined(HAVE_LANGINFO_H) && defined(CODESET) + // GNU libc provides current character set this way (this conforms to + // Unix98) + const char *charset = nl_langinfo(CODESET); + if ( charset ) + { + // "UTF-8" is used by modern glibc versions, but test other variants + // as well, just in case: + if ( strcmp(charset, "UTF-8") == 0 || + strcmp(charset, "utf-8") == 0 || + strcmp(charset, "UTF8") == 0 || + strcmp(charset, "utf8") == 0 ) + { + return true; + } + } +#endif // HAVE_LANGINFO_H + + // check if we're running under the "C" locale: it is 7bit subset + // of UTF-8, so it can be safely used with the UTF-8 build: + const char *lc_ctype = setlocale(LC_CTYPE, NULL); + if ( lc_ctype && + (strcmp(lc_ctype, "C") == 0 || strcmp(lc_ctype, "POSIX") == 0) ) + { + return true; + } + + // we don't know what charset libc is using, so assume the worst + // to be safe: + return false; +} + +void wxUpdateLocaleIsUtf8() +{ +#if wxUSE_UTF8_LOCALE_ONLY + if ( !wxIsLocaleUtf8() ) + { + wxLogFatalError(wxT("This program requires UTF-8 locale to run.")); + } +#else // !wxUSE_UTF8_LOCALE_ONLY + wxLocaleIsUtf8 = wxIsLocaleUtf8(); +#endif +} + +#endif // wxUSE_UNICODE_UTF8 + +// ============================================================================ +// wx wrappers for CRT functions +// ============================================================================ + +#if wxUSE_UNICODE_WCHAR + #define CALL_ANSI_OR_UNICODE(return_kw, callA, callW) return_kw callW +#elif wxUSE_UNICODE_UTF8 && !wxUSE_UTF8_LOCALE_ONLY + #define CALL_ANSI_OR_UNICODE(return_kw, callA, callW) \ + return_kw wxLocaleIsUtf8 ? callA : callW +#else // ANSI or UTF8 only + #define CALL_ANSI_OR_UNICODE(return_kw, callA, callW) return_kw callA +#endif + +int wxPuts(const wxString& s) +{ + // under IRIX putws() takes a non-const argument so use wchar_str() instead + // of wc_str() + CALL_ANSI_OR_UNICODE(return, + wxCRT_PutsA(s.mb_str()), + wxCRT_PutsW(s.wchar_str())); +} + +int wxFputs(const wxString& s, FILE *stream) +{ + CALL_ANSI_OR_UNICODE(return, + wxCRT_FputsA(s.mb_str(), stream), + wxCRT_FputsW(s.wc_str(), stream)); +} + +int wxFputc(const wxUniChar& c, FILE *stream) +{ +#if !wxUSE_UNICODE // FIXME-UTF8: temporary, remove this with ANSI build + return wxCRT_FputcA((char)c, stream); +#else + CALL_ANSI_OR_UNICODE(return, + wxCRT_FputsA(c.AsUTF8(), stream), + wxCRT_FputcW((wchar_t)c, stream)); +#endif +} + +#ifdef wxCRT_PerrorA + +void wxPerror(const wxString& s) +{ +#ifdef wxCRT_PerrorW + CALL_ANSI_OR_UNICODE(wxEMPTY_PARAMETER_VALUE, + wxCRT_PerrorA(s.mb_str()), + wxCRT_PerrorW(s.wc_str())); +#else + wxCRT_PerrorA(s.mb_str()); +#endif +} + +#endif // wxCRT_PerrorA + +wchar_t *wxFgets(wchar_t *s, int size, FILE *stream) +{ + wxCHECK_MSG( s, NULL, "empty buffer passed to wxFgets()" ); + + wxCharBuffer buf(size - 1); + // FIXME: this reads too little data if wxConvLibc uses UTF-8 ('size' wide + // characters may be encoded by up to 'size'*4 bytes), but what + // else can we do? + if ( wxFgets(buf.data(), size, stream) == NULL ) + return NULL; + + if ( wxConvLibc.ToWChar(s, size, buf, wxNO_LEN) == wxCONV_FAILED ) + return NULL; + + return s; +} + +// ---------------------------------------------------------------------------- +// wxScanf() and friends +// ---------------------------------------------------------------------------- + +#ifdef HAVE_VSSCANF // __VISUALC__ and __DMC__ see wx/crt.h +int wxVsscanf(const char *str, const char *format, va_list ap) + { return wxCRT_VsscanfA(str, format, ap); } +int wxVsscanf(const wchar_t *str, const wchar_t *format, va_list ap) + { return wxCRT_VsscanfW(str, format, ap); } +int wxVsscanf(const wxCharBuffer& str, const char *format, va_list ap) + { return wxCRT_VsscanfA(static_cast(str), format, ap); } +int wxVsscanf(const wxWCharBuffer& str, const wchar_t *format, va_list ap) + { return wxCRT_VsscanfW(str, format, ap); } +int wxVsscanf(const wxString& str, const char *format, va_list ap) + { return wxCRT_VsscanfA(static_cast(str.mb_str()), format, ap); } +int wxVsscanf(const wxString& str, const wchar_t *format, va_list ap) + { return wxCRT_VsscanfW(str.wc_str(), format, ap); } +int wxVsscanf(const wxCStrData& str, const char *format, va_list ap) + { return wxCRT_VsscanfA(static_cast(str.AsCharBuf()), format, ap); } +int wxVsscanf(const wxCStrData& str, const wchar_t *format, va_list ap) + { return wxCRT_VsscanfW(str.AsWCharBuf(), format, ap); } +#endif // HAVE_NO_VSSCANF diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/wxprintf.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/wxprintf.cpp new file mode 100644 index 0000000000..69cb20cbae --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/wxprintf.cpp @@ -0,0 +1,248 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/wxprintf.cpp +// Purpose: wxWidgets wxPrintf() implementation +// Author: Ove Kaven +// Modified by: Ron Lee, Francesco Montorsi +// Created: 09/04/99 +// Copyright: (c) wxWidgets copyright +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// headers, declarations, constants +// =========================================================================== + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/hash.h" + #include "wx/utils.h" // for wxMin and wxMax + #include "wx/log.h" +#endif + +#include "wx/private/wxprintf.h" + + +// ============================================================================ +// printf() implementation +// ============================================================================ + +// special test mode: define all functions below even if we don't really need +// them to be able to test them +#ifdef wxTEST_PRINTF + #undef wxCRT_VsnprintfW + #undef wxCRT_VsnprintfA +#endif + +// ---------------------------------------------------------------------------- +// implement [v]snprintf() if the system doesn't provide a safe one +// or if the system's one does not support positional parameters +// (very useful for i18n purposes) +// ---------------------------------------------------------------------------- + +// ---------------------------------------------------------------------------- +// common code for both ANSI and Unicode versions +// ---------------------------------------------------------------------------- + +#if !defined(wxCRT_VsnprintfW) || !defined(wxCRT_VsnprintfA) + + +// Copy chars from source to dest converting '%%' to '%'. Takes at most maxIn +// chars from source and write at most outMax chars to dest, returns the +// number of chars actually written. Does not treat null specially. +template +static int wxCopyStrWithPercents( + size_t maxOut, + CharType *dest, + size_t maxIn, + const CharType *source) +{ + size_t written = 0; + + if (maxIn == 0) + return 0; + + size_t i; + for ( i = 0; i < maxIn-1 && written < maxOut; source++, i++) + { + dest[written++] = *source; + if (*(source+1) == wxT('%')) + { + // skip this additional '%' character + source++; + i++; + } + } + + if (i < maxIn && written < maxOut) + // copy last character inconditionally + dest[written++] = *source; + + return written; +} + +template +static int wxDoVsnprintf(CharType *buf, size_t lenMax, + const CharType *format, va_list argptr) +{ + // useful for debugging, to understand if we are really using this function + // rather than the system implementation +#if 0 + wprintf(L"Using wxCRT_VsnprintfW\n"); +#endif + + wxPrintfConvSpecParser parser(format); + + wxPrintfArg argdata[wxMAX_SVNPRINTF_ARGUMENTS]; + + size_t i; + + // number of characters in the buffer so far, must be less than lenMax + size_t lenCur = 0; + + if (parser.posarg_present && parser.nonposarg_present) + { + buf[0] = 0; + return -1; // format strings with both positional and + } // non-positional conversion specifier are unsupported !! + + // on platforms where va_list is an array type, it is necessary to make a + // copy to be able to pass it to LoadArg as a reference. + bool ok = true; + va_list ap; + wxVaCopy(ap, argptr); + + // now load arguments from stack + for (i=0; i < parser.nargs && ok; i++) + { + // !pspec[i] means that the user forgot a positional parameter (e.g. %$1s %$3s); + // LoadArg == false means that wxPrintfConvSpec::Parse failed to set the + // conversion specifier 'type' to a valid value... + ok = parser.pspec[i] && parser.pspec[i]->LoadArg(&argdata[i], ap); + } + + va_end(ap); + + // something failed while loading arguments from the variable list... + // (e.g. the user repeated twice the same positional argument) + if (!ok) + { + buf[0] = 0; + return -1; + } + + // finally, process each conversion specifier with its own argument + const CharType *toparse = format; + for (i=0; i < parser.nargs; i++) + { + wxPrintfConvSpec& spec = parser.specs[i]; + + // skip any asterisks, they're processed as part of the conversion they + // apply to + if ( spec.m_type == wxPAT_STAR ) + continue; + + // copy in the output buffer the portion of the format string between + // last specifier and the current one + size_t tocopy = ( spec.m_pArgPos - toparse ); + + lenCur += wxCopyStrWithPercents(lenMax - lenCur, buf + lenCur, + tocopy, toparse); + if (lenCur == lenMax) + { + buf[lenMax - 1] = 0; + return lenMax+1; // not enough space in the output buffer ! + } + + // process this specifier directly in the output buffer + int n = spec.Process(buf+lenCur, lenMax - lenCur, + &argdata[spec.m_pos], lenCur); + if (n == -1) + { + buf[lenMax-1] = wxT('\0'); // be sure to always NUL-terminate the string + return lenMax+1; // not enough space in the output buffer ! + } + lenCur += n; + + // the +1 is because wxPrintfConvSpec::m_pArgEnd points to the last character + // of the format specifier, but we are not interested to it... + toparse = spec.m_pArgEnd + 1; + } + + // copy portion of the format string after last specifier + // NOTE: toparse is pointing to the character just after the last processed + // conversion specifier + // NOTE2: the +1 is because we want to copy also the '\0' + size_t tocopy = wxStrlen(format) + 1 - ( toparse - format ) ; + + lenCur += wxCopyStrWithPercents(lenMax - lenCur, buf + lenCur, + tocopy, toparse) - 1; + if (buf[lenCur]) + { + buf[lenCur] = 0; + return lenMax+1; // not enough space in the output buffer ! + } + + // Don't do: + // wxASSERT(lenCur == wxStrlen(buf)); + // in fact if we embedded NULLs in the output buffer (using %c with a '\0') + // such check would fail + + return lenCur; +} + +#endif // !defined(wxCRT_VsnprintfW) || !defined(wxCRT_VsnprintfA) + +// ---------------------------------------------------------------------------- +// wxCRT_VsnprintfW +// ---------------------------------------------------------------------------- + +#if !defined(wxCRT_VsnprintfW) + +#if !wxUSE_WXVSNPRINTFW + #error "wxUSE_WXVSNPRINTFW must be 1 if our wxCRT_VsnprintfW is used" +#endif + +int wxCRT_VsnprintfW(wchar_t *buf, size_t len, + const wchar_t *format, va_list argptr) +{ + return wxDoVsnprintf(buf, len, format, argptr); +} + +#else // wxCRT_VsnprintfW is defined + +#if wxUSE_WXVSNPRINTFW + #error "wxUSE_WXVSNPRINTFW must be 0 if our wxCRT_VsnprintfW is not used" +#endif + +#endif // !wxCRT_VsnprintfW + +// ---------------------------------------------------------------------------- +// wxCRT_VsnprintfA +// ---------------------------------------------------------------------------- + +#ifndef wxCRT_VsnprintfA + +#if !wxUSE_WXVSNPRINTFA + #error "wxUSE_WXVSNPRINTFA must be 1 if our wxCRT_VsnprintfA is used" +#endif + +int wxCRT_VsnprintfA(char *buf, size_t len, + const char *format, va_list argptr) +{ + return wxDoVsnprintf(buf, len, format, argptr); +} + +#else // wxCRT_VsnprintfA is defined + +#if wxUSE_WXVSNPRINTFA + #error "wxUSE_WXVSNPRINTFA must be 0 if our wxCRT_VsnprintfA is not used" +#endif + +#endif // !wxCRT_VsnprintfA diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/xlocale.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/xlocale.cpp new file mode 100644 index 0000000000..26ac4df2a3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/xlocale.cpp @@ -0,0 +1,370 @@ +////////////////////////////////////////////////////////////////////////////// +// Name: src/common/xlocale.cpp +// Purpose: xlocale wrappers/impl to provide some xlocale wrappers +// Author: Brian Vanderburg II, Vadim Zeitlin +// Created: 2008-01-07 +// Copyright: (c) 2008 Brian Vanderburg II +// 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_XLOCALE + +#ifndef WX_PRECOMP + #include "wx/module.h" +#endif + +#include "wx/xlocale.h" + +#include +#include + +// ---------------------------------------------------------------------------- +// module globals +// ---------------------------------------------------------------------------- + +// This is the C locale object, it is created on demand +static wxXLocale *gs_cLocale = NULL; + +wxXLocale wxNullXLocale; + + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// Module for gs_cLocale cleanup +// ---------------------------------------------------------------------------- + +class wxXLocaleModule : public wxModule +{ +public: + virtual bool OnInit() { return true; } + virtual void OnExit() { wxDELETE(gs_cLocale); } + + DECLARE_DYNAMIC_CLASS(wxXLocaleModule) +}; + +IMPLEMENT_DYNAMIC_CLASS(wxXLocaleModule, wxModule) + + +// ============================================================================ +// wxXLocale implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// common parts +// ---------------------------------------------------------------------------- + +// Get the C locale +wxXLocale& wxXLocale::GetCLocale() +{ + if ( !gs_cLocale ) + { + // Notice that we need a separate variable because clang 3.1 refuses to + // cast nullptr (which is how NULL is defined in it) to anything. + static wxXLocaleCTag* const tag = NULL; + gs_cLocale = new wxXLocale(tag); + } + + return *gs_cLocale; +} + +#ifdef wxHAS_XLOCALE_SUPPORT + +wxXLocale::wxXLocale(wxLanguage lang) +{ + const wxLanguageInfo * const info = wxLocale::GetLanguageInfo(lang); + if ( !info ) + { + m_locale = NULL; + } + else + { + Init(info->GetLocaleName().c_str()); + } +} + +#if wxCHECK_VISUALC_VERSION(8) + +// ---------------------------------------------------------------------------- +// implementation using MSVC locale API +// ---------------------------------------------------------------------------- + +void wxXLocale::Init(const char *loc) +{ + if (!loc || *loc == '\0') + return; + + m_locale = _create_locale(LC_ALL, loc); +} + +void wxXLocale::Free() +{ + if ( m_locale ) + _free_locale(m_locale); +} + +#elif defined(HAVE_LOCALE_T) + +// ---------------------------------------------------------------------------- +// implementation using xlocale API +// ---------------------------------------------------------------------------- + +void wxXLocale::Init(const char *loc) +{ + if (!loc || *loc == '\0') + return; + + m_locale = newlocale(LC_ALL_MASK, loc, NULL); + if (!m_locale) + { + // NOTE: here we do something similar to what wxSetLocaleTryUTF8() does + // in wxLocale code (but with newlocale() calls instead of wxSetlocale()) + wxString buf(loc); + wxString buf2; + buf2 = buf + wxS(".UTF-8"); + m_locale = newlocale(LC_ALL_MASK, buf2.c_str(), NULL); + if ( !m_locale ) + { + buf2 = buf + wxS(".utf-8"); + m_locale = newlocale(LC_ALL_MASK, buf2.c_str(), NULL); + } + if ( !m_locale ) + { + buf2 = buf + wxS(".UTF8"); + m_locale = newlocale(LC_ALL_MASK, buf2.c_str(), NULL); + } + if ( !m_locale ) + { + buf2 = buf + wxS(".utf8"); + m_locale = newlocale(LC_ALL_MASK, buf2.c_str(), NULL); + } + } + + // TODO: wxLocale performs many more manipulations of the given locale + // string in the attempt to set a valid locale; reusing that code + // (changing it to take a generic wxTryLocale callback) would be nice +} + +void wxXLocale::Free() +{ + if ( m_locale ) + freelocale(m_locale); +} + +#else + #error "Unknown xlocale support." +#endif + +#endif // wxHAS_XLOCALE_SUPPORT + +#ifndef wxHAS_XLOCALE_SUPPORT + +// ============================================================================ +// Implementation of wxFoo_l() functions for "C" locale without xlocale support +// ============================================================================ + +// ---------------------------------------------------------------------------- +// character classification and transformation functions +// ---------------------------------------------------------------------------- + +// lookup table and macros for character type functions +#define CTYPE_ALNUM 0x0001 +#define CTYPE_ALPHA 0x0002 +#define CTYPE_CNTRL 0x0004 +#define CTYPE_DIGIT 0x0008 +#define CTYPE_GRAPH 0x0010 +#define CTYPE_LOWER 0x0020 +#define CTYPE_PRINT 0x0040 +#define CTYPE_PUNCT 0x0080 +#define CTYPE_SPACE 0x0100 +#define CTYPE_UPPER 0x0200 +#define CTYPE_XDIGIT 0x0400 + +static const unsigned int gs_lookup[] = +{ + 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, + 0x0004, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0004, 0x0004, + 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, + 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, + 0x0140, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D0, + 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D0, + 0x0459, 0x0459, 0x0459, 0x0459, 0x0459, 0x0459, 0x0459, 0x0459, + 0x0459, 0x0459, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D0, + 0x00D0, 0x0653, 0x0653, 0x0653, 0x0653, 0x0653, 0x0653, 0x0253, + 0x0253, 0x0253, 0x0253, 0x0253, 0x0253, 0x0253, 0x0253, 0x0253, + 0x0253, 0x0253, 0x0253, 0x0253, 0x0253, 0x0253, 0x0253, 0x0253, + 0x0253, 0x0253, 0x0253, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D0, + 0x00D0, 0x0473, 0x0473, 0x0473, 0x0473, 0x0473, 0x0473, 0x0073, + 0x0073, 0x0073, 0x0073, 0x0073, 0x0073, 0x0073, 0x0073, 0x0073, + 0x0073, 0x0073, 0x0073, 0x0073, 0x0073, 0x0073, 0x0073, 0x0073, + 0x0073, 0x0073, 0x0073, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x0004 +}; + + +#define CTYPE_TEST(c, t) ( (c) <= 127 && (gs_lookup[(c)] & (t)) ) + + +// ctype functions +#define GEN_ISFUNC(name, test) \ +int name(const wxUniChar& c, const wxXLocale& loc) \ +{ \ + wxCHECK(loc.IsOk(), false); \ + return CTYPE_TEST(c.GetValue(), test); \ +} + +GEN_ISFUNC(wxIsalnum_l, CTYPE_ALNUM) +GEN_ISFUNC(wxIsalpha_l, CTYPE_ALPHA) +GEN_ISFUNC(wxIscntrl_l, CTYPE_CNTRL) +GEN_ISFUNC(wxIsdigit_l, CTYPE_DIGIT) +GEN_ISFUNC(wxIsgraph_l, CTYPE_GRAPH) +GEN_ISFUNC(wxIslower_l, CTYPE_LOWER) +GEN_ISFUNC(wxIsprint_l, CTYPE_PRINT) +GEN_ISFUNC(wxIspunct_l, CTYPE_PUNCT) +GEN_ISFUNC(wxIsspace_l, CTYPE_SPACE) +GEN_ISFUNC(wxIsupper_l, CTYPE_UPPER) +GEN_ISFUNC(wxIsxdigit_l, CTYPE_XDIGIT) + +int wxTolower_l(const wxUniChar& c, const wxXLocale& loc) +{ + wxCHECK(loc.IsOk(), false); + + if(CTYPE_TEST(c.GetValue(), CTYPE_UPPER)) + { + return c - 'A' + 'a'; + } + + return c; +} + +int wxToupper_l(const wxUniChar& c, const wxXLocale& loc) +{ + wxCHECK(loc.IsOk(), false); + + if(CTYPE_TEST(c.GetValue(), CTYPE_LOWER)) + { + return c - 'a' + 'A'; + } + + return c; +} + + +// ---------------------------------------------------------------------------- +// string --> number conversion functions +// ---------------------------------------------------------------------------- + +/* + WARNING: the implementation of the wxStrtoX_l() functions below is unsafe + in a multi-threaded environment as we temporary change the locale + and if in the meanwhile an other thread performs some locale-dependent + operation, it may get unexpected results... + However this is the best we can do without reinventing the wheel in the + case !wxHAS_XLOCALE_SUPPORT... +*/ + +namespace +{ + +// Helper class that changes LC_NUMERIC facet of the global locale in its ctor +// to "C" locale and restores it in its dtor later. +class CNumericLocaleSetter +{ +public: + CNumericLocaleSetter() + : m_oldLocale(wxStrdupA(setlocale(LC_NUMERIC, NULL))) + { + if ( !wxSetlocale(LC_NUMERIC, "C") ) + { + // Setting locale to "C" should really always work. + wxFAIL_MSG( wxS("Couldn't set LC_NUMERIC to \"C\"") ); + } + } + + ~CNumericLocaleSetter() + { + wxSetlocale(LC_NUMERIC, m_oldLocale); + free(m_oldLocale); + } + +private: + char * const m_oldLocale; + + wxDECLARE_NO_COPY_CLASS(CNumericLocaleSetter); +}; + +} // anonymous namespace + +double wxStrtod_l(const wchar_t* str, wchar_t **endptr, const wxXLocale& loc) +{ + wxCHECK( loc.IsOk(), 0. ); + + CNumericLocaleSetter locSetter; + + return wxStrtod(str, endptr); +} + +double wxStrtod_l(const char* str, char **endptr, const wxXLocale& loc) +{ + wxCHECK( loc.IsOk(), 0. ); + + CNumericLocaleSetter locSetter; + + return wxStrtod(str, endptr); +} + +long wxStrtol_l(const wchar_t* str, wchar_t **endptr, int base, const wxXLocale& loc) +{ + wxCHECK( loc.IsOk(), 0 ); + + CNumericLocaleSetter locSetter; + + return wxStrtol(str, endptr, base); +} + +long wxStrtol_l(const char* str, char **endptr, int base, const wxXLocale& loc) +{ + wxCHECK( loc.IsOk(), 0 ); + + CNumericLocaleSetter locSetter; + + return wxStrtol(str, endptr, base); +} + +unsigned long wxStrtoul_l(const wchar_t* str, wchar_t **endptr, int base, const wxXLocale& loc) +{ + wxCHECK( loc.IsOk(), 0 ); + + CNumericLocaleSetter locSetter; + + return wxStrtoul(str, endptr, base); +} + +unsigned long wxStrtoul_l(const char* str, char **endptr, int base, const wxXLocale& loc) +{ + wxCHECK( loc.IsOk(), 0 ); + + CNumericLocaleSetter locSetter; + + return wxStrtoul(str, endptr, base); +} + +#endif // !defined(wxHAS_XLOCALE_SUPPORT) + +#endif // wxUSE_XLOCALE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/xpmdecod.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/xpmdecod.cpp new file mode 100644 index 0000000000..f76418958c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/xpmdecod.cpp @@ -0,0 +1,830 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/xpmdecod.cpp +// Purpose: wxXPMDecoder +// Author: John Cristy, Vaclav Slavik +// Copyright: (c) John Cristy, Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + +This file is partially based on source code of ImageMagick by John Cristy. Its +license is as follows: + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % +% X X PPPP M M % +% X X P P MM MM % +% X PPPP M M M % +% X X P M M % +% X X P M M % +% % +% % +% Read/Write ImageMagick Image Format. % +% % +% % +% Software Design % +% John Cristy % +% July 1992 % +% % +% % +% Copyright (C) 2001 ImageMagick Studio, a non-profit organization dedicated % +% to making software imaging solutions freely available. % +% % +% Permission is hereby granted, free of charge, to any person obtaining a % +% copy of this software and associated documentation files ("ImageMagick"), % +% to deal in ImageMagick without restriction, including without limitation % +% the rights to use, copy, modify, merge, publish, distribute, sublicense, % +% and/or sell copies of ImageMagick, and to permit persons to whom the % +% ImageMagick is furnished to do so, subject to the following conditions: % +% % +% The above copyright notice and this permission notice shall be included in % +% all copies or substantial portions of ImageMagick. % +% % +% The software is provided "as is", without warranty of any kind, express or % +% implied, including but not limited to the warranties of merchantability, % +% fitness for a particular purpose and noninfringement. In no event shall % +% ImageMagick Studio be liable for any claim, damages or other liability, % +% whether in an action of contract, tort or otherwise, arising from, out of % +% or in connection with ImageMagick or the use or other dealings in % +% ImageMagick. % +% % +% Except as contained in this notice, the name of the ImageMagick Studio % +% shall not be used in advertising or otherwise to promote the sale, use or % +% other dealings in ImageMagick without prior written authorization from the % +% ImageMagick Studio. % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% +*/ + +/* + * Also contains some pieces from libxpm and its modification for win32 by + * HeDu : + * + * Copyright (C) 1989-95 GROUPE BULL + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of GROUPE BULL shall not be + * used in advertising or otherwise to promote the sale, use or other dealings + * in this Software without prior written authorization from GROUPE BULL. + */ + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGE && wxUSE_XPM + +#include "wx/xpmdecod.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/hashmap.h" + #include "wx/stream.h" + #include "wx/image.h" + #include "wx/palette.h" +#endif + +#include +#include + +#if wxUSE_STREAMS +bool wxXPMDecoder::CanRead(wxInputStream& stream) +{ + unsigned char buf[9]; + + if ( !stream.Read(buf, WXSIZEOF(buf)) ) + return false; + + return memcmp(buf, "/* XPM */", WXSIZEOF(buf)) == 0; +} + +wxImage wxXPMDecoder::ReadFile(wxInputStream& stream) +{ + size_t length = stream.GetSize(); + wxCHECK_MSG( length != 0, wxNullImage, + wxT("Cannot read XPM from stream of unknown size") ); + + // use a smart buffer to be sure to free memory even when we return on + // error + wxCharBuffer buffer(length); + + char *xpm_buffer = (char *)buffer.data(); + if ( stream.Read(xpm_buffer, length).GetLastError() == wxSTREAM_READ_ERROR ) + return wxNullImage; + xpm_buffer[length] = '\0'; + + /* + * Remove comments from the file: + */ + char *p, *q; + for (p = xpm_buffer; *p != '\0'; p++) + { + if ( (*p == '"') || (*p == '\'') ) + { + if (*p == '"') + { + for (p++; *p != '\0'; p++) + if ( (*p == '"') && (*(p - 1) != '\\') ) + break; + } + else // *p == '\'' + { + for (p++; *p != '\0'; p++) + if ( (*p == '\'') && (*(p - 1) != '\\') ) + break; + } + if (*p == '\0') + break; + continue; + } + if ( (*p != '/') || (*(p + 1) != '*') ) + continue; + for (q = p + 2; *q != '\0'; q++) + { + if ( (*q == '*') && (*(q + 1) == '/') ) + break; + } + + // memmove allows overlaps (unlike strcpy): + size_t cpylen = strlen(q + 2) + 1; + memmove(p, q + 2, cpylen); + } + + /* + * Remove unquoted characters: + */ + size_t i = 0; + for (p = xpm_buffer; *p != '\0'; p++) + { + if ( *p != '"' ) + continue; + for (q = p + 1; *q != '\0'; q++) + if (*q == '"') + break; + strncpy(xpm_buffer + i, p + 1, q - p - 1); + i += q - p - 1; + xpm_buffer[i++] = '\n'; + p = q + 1; + } + xpm_buffer[i] = '\0'; + + /* + * Create array of lines and convert \n's to \0's: + */ + const char **xpm_lines; + size_t lines_cnt = 0; + size_t line; + + for (p = xpm_buffer; *p != '\0'; p++) + { + if ( *p == '\n' ) + lines_cnt++; + } + + if ( !lines_cnt ) + { + // this doesn't really look an XPM image + return wxNullImage; + } + + xpm_lines = new const char*[lines_cnt + 1]; + xpm_lines[0] = xpm_buffer; + line = 1; + for (p = xpm_buffer; (*p != '\0') && (line < lines_cnt); p++) + { + if ( *p == '\n' ) + { + xpm_lines[line] = p + 1; + *p = '\0'; + line++; + } + } + + xpm_lines[lines_cnt] = NULL; + + /* + * Read the image: + */ + wxImage img = ReadData(xpm_lines); + + delete[] xpm_lines; + + return img; +} +#endif // wxUSE_STREAMS + + +/*****************************************************************************\ +* rgbtab.h * +* * +* A hard coded rgb.txt. To keep it short I removed all colornames with * +* trailing numbers, Blue3 etc, except the GrayXX. Sorry Grey-lovers I prefer * +* Gray ;-). But Grey is recognized on lookups, only on save Gray will be * +* used, maybe you want to do some substitue there too. * +* * +* To save memory the RGBs are coded in one long value, as done by the RGB * +* macro. * +* * +* Developed by HeDu 3/94 (hedu@cul-ipn.uni-kiel.de) * +\*****************************************************************************/ + + +typedef struct +{ + const char *name; + wxUint32 rgb; +} rgbRecord; + +#define myRGB(r,g,b) ((wxUint32)r<<16|(wxUint32)g<<8|(wxUint32)b) + +static const rgbRecord theRGBRecords[] = +{ + {"aliceblue", myRGB(240, 248, 255)}, + {"antiquewhite", myRGB(250, 235, 215)}, + {"aquamarine", myRGB(50, 191, 193)}, + {"azure", myRGB(240, 255, 255)}, + {"beige", myRGB(245, 245, 220)}, + {"bisque", myRGB(255, 228, 196)}, + {"black", myRGB(0, 0, 0)}, + {"blanchedalmond", myRGB(255, 235, 205)}, + {"blue", myRGB(0, 0, 255)}, + {"blueviolet", myRGB(138, 43, 226)}, + {"brown", myRGB(165, 42, 42)}, + {"burlywood", myRGB(222, 184, 135)}, + {"cadetblue", myRGB(95, 146, 158)}, + {"chartreuse", myRGB(127, 255, 0)}, + {"chocolate", myRGB(210, 105, 30)}, + {"coral", myRGB(255, 114, 86)}, + {"cornflowerblue", myRGB(34, 34, 152)}, + {"cornsilk", myRGB(255, 248, 220)}, + {"cyan", myRGB(0, 255, 255)}, + {"darkgoldenrod", myRGB(184, 134, 11)}, + {"darkgreen", myRGB(0, 86, 45)}, + {"darkkhaki", myRGB(189, 183, 107)}, + {"darkolivegreen", myRGB(85, 86, 47)}, + {"darkorange", myRGB(255, 140, 0)}, + {"darkorchid", myRGB(139, 32, 139)}, + {"darksalmon", myRGB(233, 150, 122)}, + {"darkseagreen", myRGB(143, 188, 143)}, + {"darkslateblue", myRGB(56, 75, 102)}, + {"darkslategray", myRGB(47, 79, 79)}, + {"darkturquoise", myRGB(0, 166, 166)}, + {"darkviolet", myRGB(148, 0, 211)}, + {"deeppink", myRGB(255, 20, 147)}, + {"deepskyblue", myRGB(0, 191, 255)}, + {"dimgray", myRGB(84, 84, 84)}, + {"dodgerblue", myRGB(30, 144, 255)}, + {"firebrick", myRGB(142, 35, 35)}, + {"floralwhite", myRGB(255, 250, 240)}, + {"forestgreen", myRGB(80, 159, 105)}, + {"gainsboro", myRGB(220, 220, 220)}, + {"ghostwhite", myRGB(248, 248, 255)}, + {"gold", myRGB(218, 170, 0)}, + {"goldenrod", myRGB(239, 223, 132)}, + {"gray", myRGB(126, 126, 126)}, + {"gray0", myRGB(0, 0, 0)}, + {"gray1", myRGB(3, 3, 3)}, + {"gray10", myRGB(26, 26, 26)}, + {"gray100", myRGB(255, 255, 255)}, + {"gray11", myRGB(28, 28, 28)}, + {"gray12", myRGB(31, 31, 31)}, + {"gray13", myRGB(33, 33, 33)}, + {"gray14", myRGB(36, 36, 36)}, + {"gray15", myRGB(38, 38, 38)}, + {"gray16", myRGB(41, 41, 41)}, + {"gray17", myRGB(43, 43, 43)}, + {"gray18", myRGB(46, 46, 46)}, + {"gray19", myRGB(48, 48, 48)}, + {"gray2", myRGB(5, 5, 5)}, + {"gray20", myRGB(51, 51, 51)}, + {"gray21", myRGB(54, 54, 54)}, + {"gray22", myRGB(56, 56, 56)}, + {"gray23", myRGB(59, 59, 59)}, + {"gray24", myRGB(61, 61, 61)}, + {"gray25", myRGB(64, 64, 64)}, + {"gray26", myRGB(66, 66, 66)}, + {"gray27", myRGB(69, 69, 69)}, + {"gray28", myRGB(71, 71, 71)}, + {"gray29", myRGB(74, 74, 74)}, + {"gray3", myRGB(8, 8, 8)}, + {"gray30", myRGB(77, 77, 77)}, + {"gray31", myRGB(79, 79, 79)}, + {"gray32", myRGB(82, 82, 82)}, + {"gray33", myRGB(84, 84, 84)}, + {"gray34", myRGB(87, 87, 87)}, + {"gray35", myRGB(89, 89, 89)}, + {"gray36", myRGB(92, 92, 92)}, + {"gray37", myRGB(94, 94, 94)}, + {"gray38", myRGB(97, 97, 97)}, + {"gray39", myRGB(99, 99, 99)}, + {"gray4", myRGB(10, 10, 10)}, + {"gray40", myRGB(102, 102, 102)}, + {"gray41", myRGB(105, 105, 105)}, + {"gray42", myRGB(107, 107, 107)}, + {"gray43", myRGB(110, 110, 110)}, + {"gray44", myRGB(112, 112, 112)}, + {"gray45", myRGB(115, 115, 115)}, + {"gray46", myRGB(117, 117, 117)}, + {"gray47", myRGB(120, 120, 120)}, + {"gray48", myRGB(122, 122, 122)}, + {"gray49", myRGB(125, 125, 125)}, + {"gray5", myRGB(13, 13, 13)}, + {"gray50", myRGB(127, 127, 127)}, + {"gray51", myRGB(130, 130, 130)}, + {"gray52", myRGB(133, 133, 133)}, + {"gray53", myRGB(135, 135, 135)}, + {"gray54", myRGB(138, 138, 138)}, + {"gray55", myRGB(140, 140, 140)}, + {"gray56", myRGB(143, 143, 143)}, + {"gray57", myRGB(145, 145, 145)}, + {"gray58", myRGB(148, 148, 148)}, + {"gray59", myRGB(150, 150, 150)}, + {"gray6", myRGB(15, 15, 15)}, + {"gray60", myRGB(153, 153, 153)}, + {"gray61", myRGB(156, 156, 156)}, + {"gray62", myRGB(158, 158, 158)}, + {"gray63", myRGB(161, 161, 161)}, + {"gray64", myRGB(163, 163, 163)}, + {"gray65", myRGB(166, 166, 166)}, + {"gray66", myRGB(168, 168, 168)}, + {"gray67", myRGB(171, 171, 171)}, + {"gray68", myRGB(173, 173, 173)}, + {"gray69", myRGB(176, 176, 176)}, + {"gray7", myRGB(18, 18, 18)}, + {"gray70", myRGB(179, 179, 179)}, + {"gray71", myRGB(181, 181, 181)}, + {"gray72", myRGB(184, 184, 184)}, + {"gray73", myRGB(186, 186, 186)}, + {"gray74", myRGB(189, 189, 189)}, + {"gray75", myRGB(191, 191, 191)}, + {"gray76", myRGB(194, 194, 194)}, + {"gray77", myRGB(196, 196, 196)}, + {"gray78", myRGB(199, 199, 199)}, + {"gray79", myRGB(201, 201, 201)}, + {"gray8", myRGB(20, 20, 20)}, + {"gray80", myRGB(204, 204, 204)}, + {"gray81", myRGB(207, 207, 207)}, + {"gray82", myRGB(209, 209, 209)}, + {"gray83", myRGB(212, 212, 212)}, + {"gray84", myRGB(214, 214, 214)}, + {"gray85", myRGB(217, 217, 217)}, + {"gray86", myRGB(219, 219, 219)}, + {"gray87", myRGB(222, 222, 222)}, + {"gray88", myRGB(224, 224, 224)}, + {"gray89", myRGB(227, 227, 227)}, + {"gray9", myRGB(23, 23, 23)}, + {"gray90", myRGB(229, 229, 229)}, + {"gray91", myRGB(232, 232, 232)}, + {"gray92", myRGB(235, 235, 235)}, + {"gray93", myRGB(237, 237, 237)}, + {"gray94", myRGB(240, 240, 240)}, + {"gray95", myRGB(242, 242, 242)}, + {"gray96", myRGB(245, 245, 245)}, + {"gray97", myRGB(247, 247, 247)}, + {"gray98", myRGB(250, 250, 250)}, + {"gray99", myRGB(252, 252, 252)}, + {"green", myRGB(0, 255, 0)}, + {"greenyellow", myRGB(173, 255, 47)}, + {"honeydew", myRGB(240, 255, 240)}, + {"hotpink", myRGB(255, 105, 180)}, + {"indianred", myRGB(107, 57, 57)}, + {"ivory", myRGB(255, 255, 240)}, + {"khaki", myRGB(179, 179, 126)}, + {"lavender", myRGB(230, 230, 250)}, + {"lavenderblush", myRGB(255, 240, 245)}, + {"lawngreen", myRGB(124, 252, 0)}, + {"lemonchiffon", myRGB(255, 250, 205)}, + {"lightblue", myRGB(176, 226, 255)}, + {"lightcoral", myRGB(240, 128, 128)}, + {"lightcyan", myRGB(224, 255, 255)}, + {"lightgoldenrod", myRGB(238, 221, 130)}, + {"lightgoldenrodyellow", myRGB(250, 250, 210)}, + {"lightgray", myRGB(168, 168, 168)}, + {"lightpink", myRGB(255, 182, 193)}, + {"lightsalmon", myRGB(255, 160, 122)}, + {"lightseagreen", myRGB(32, 178, 170)}, + {"lightskyblue", myRGB(135, 206, 250)}, + {"lightslateblue", myRGB(132, 112, 255)}, + {"lightslategray", myRGB(119, 136, 153)}, + {"lightsteelblue", myRGB(124, 152, 211)}, + {"lightyellow", myRGB(255, 255, 224)}, + {"limegreen", myRGB(0, 175, 20)}, + {"linen", myRGB(250, 240, 230)}, + {"magenta", myRGB(255, 0, 255)}, + {"maroon", myRGB(143, 0, 82)}, + {"mediumaquamarine", myRGB(0, 147, 143)}, + {"mediumblue", myRGB(50, 50, 204)}, + {"mediumforestgreen", myRGB(50, 129, 75)}, + {"mediumgoldenrod", myRGB(209, 193, 102)}, + {"mediumorchid", myRGB(189, 82, 189)}, + {"mediumpurple", myRGB(147, 112, 219)}, + {"mediumseagreen", myRGB(52, 119, 102)}, + {"mediumslateblue", myRGB(106, 106, 141)}, + {"mediumspringgreen", myRGB(35, 142, 35)}, + {"mediumturquoise", myRGB(0, 210, 210)}, + {"mediumvioletred", myRGB(213, 32, 121)}, + {"midnightblue", myRGB(47, 47, 100)}, + {"mintcream", myRGB(245, 255, 250)}, + {"mistyrose", myRGB(255, 228, 225)}, + {"moccasin", myRGB(255, 228, 181)}, + {"navajowhite", myRGB(255, 222, 173)}, + {"navy", myRGB(35, 35, 117)}, + {"navyblue", myRGB(35, 35, 117)}, + {"oldlace", myRGB(253, 245, 230)}, + {"olivedrab", myRGB(107, 142, 35)}, + {"orange", myRGB(255, 135, 0)}, + {"orangered", myRGB(255, 69, 0)}, + {"orchid", myRGB(239, 132, 239)}, + {"palegoldenrod", myRGB(238, 232, 170)}, + {"palegreen", myRGB(115, 222, 120)}, + {"paleturquoise", myRGB(175, 238, 238)}, + {"palevioletred", myRGB(219, 112, 147)}, + {"papayawhip", myRGB(255, 239, 213)}, + {"peachpuff", myRGB(255, 218, 185)}, + {"peru", myRGB(205, 133, 63)}, + {"pink", myRGB(255, 181, 197)}, + {"plum", myRGB(197, 72, 155)}, + {"powderblue", myRGB(176, 224, 230)}, + {"purple", myRGB(160, 32, 240)}, + {"red", myRGB(255, 0, 0)}, + {"rosybrown", myRGB(188, 143, 143)}, + {"royalblue", myRGB(65, 105, 225)}, + {"saddlebrown", myRGB(139, 69, 19)}, + {"salmon", myRGB(233, 150, 122)}, + {"sandybrown", myRGB(244, 164, 96)}, + {"seagreen", myRGB(82, 149, 132)}, + {"seashell", myRGB(255, 245, 238)}, + {"sienna", myRGB(150, 82, 45)}, + {"silver", myRGB(192, 192, 192)}, + {"skyblue", myRGB(114, 159, 255)}, + {"slateblue", myRGB(126, 136, 171)}, + {"slategray", myRGB(112, 128, 144)}, + {"snow", myRGB(255, 250, 250)}, + {"springgreen", myRGB(65, 172, 65)}, + {"steelblue", myRGB(84, 112, 170)}, + {"tan", myRGB(222, 184, 135)}, + {"thistle", myRGB(216, 191, 216)}, + {"tomato", myRGB(255, 99, 71)}, + {"transparent", myRGB(0, 0, 1)}, + {"turquoise", myRGB(25, 204, 223)}, + {"violet", myRGB(156, 62, 206)}, + {"violetred", myRGB(243, 62, 150)}, + {"wheat", myRGB(245, 222, 179)}, + {"white", myRGB(255, 255, 255)}, + {"whitesmoke", myRGB(245, 245, 245)}, + {"yellow", myRGB(255, 255, 0)}, + {"yellowgreen", myRGB(50, 216, 56)}, + {NULL, myRGB(0, 0, 0)} +}; +static const int numTheRGBRecords = 235; + +static unsigned char ParseHexadecimal(char digit1, char digit2) +{ + unsigned char i1, i2; + + if (digit1 >= 'a') + i1 = (unsigned char)(digit1 - 'a' + 0x0A); + else if (digit1 >= 'A') + i1 = (unsigned char)(digit1 - 'A' + 0x0A); + else + i1 = (unsigned char)(digit1 - '0'); + if (digit2 >= 'a') + i2 = (unsigned char)(digit2 - 'a' + 0x0A); + else if (digit2 >= 'A') + i2 = (unsigned char)(digit2 - 'A' + 0x0A); + else + i2 = (unsigned char)(digit2 - '0'); + return (unsigned char)(0x10 * i1 + i2); +} + +static bool GetRGBFromName(const char *inname, bool *isNone, + unsigned char *r, unsigned char*g, unsigned char *b) +{ + int left, right, middle; + int cmp; + wxUint32 rgbVal; + char *name; + char *grey, *p; + + // Neither #rrggbb nor #rrrrggggbbbb are in database, we parse them directly + size_t inname_len = strlen(inname); + if ( *inname == '#' && (inname_len == 7 || inname_len == 13)) + { + size_t ofs = (inname_len == 7) ? 2 : 4; + *r = ParseHexadecimal(inname[1], inname[2]); + *g = ParseHexadecimal(inname[1*ofs+1], inname[1*ofs+2]); + *b = ParseHexadecimal(inname[2*ofs+1], inname[2*ofs+2]); + *isNone = false; + return true; + } + + name = wxStrdupA(inname); + + // theRGBRecords[] has no names with spaces, and no grey, but a + // lot of gray... + + // so first extract ' ' + while ((p = strchr(name, ' ')) != NULL) + { + while (*(p)) // till eof of string + { + *p = *(p + 1); // copy to the left + p++; + } + } + // fold to lower case + p = name; + while (*p) + { + *p = (char)tolower(*p); + p++; + } + + // substitute Grey with Gray, else rgbtab.h would have more than 100 + // 'duplicate' entries + if ( (grey = strstr(name, "grey")) != NULL ) + grey[2] = 'a'; + + // check for special 'none' colour: + bool found; + if ( strcmp(name, "none") == 0 ) + { + *isNone = true; + found = true; + } + else // not "None" + { + found = false; + + // binary search: + left = 0; + right = numTheRGBRecords - 1; + do + { + middle = (left + right) / 2; + cmp = strcmp(name, theRGBRecords[middle].name); + if ( cmp == 0 ) + { + rgbVal = theRGBRecords[middle].rgb; + *r = (unsigned char)((rgbVal >> 16) & 0xFF); + *g = (unsigned char)((rgbVal >> 8) & 0xFF); + *b = (unsigned char)((rgbVal) & 0xFF); + *isNone = false; + found = true; + break; + } + else if ( cmp < 0 ) + { + right = middle - 1; + } + else // cmp > 0 + { + left = middle + 1; + } + } while (left <= right); + } + + free(name); + + return found; +} + +static const char *ParseColor(const char *data) +{ + static const char *const targets[] = + {"c ", "g ", "g4 ", "m ", "b ", "s ", NULL}; + + const char *p, *r; + const char *q; + int i; + + for (i = 0; targets[i] != NULL; i++) + { + r = data; + for (q = targets[i]; *r != '\0'; r++) + { + if ( *r != *q ) + continue; + if ( !isspace((int) (*(r - 1))) ) + continue; + p = r; + for (;;) + { + if ( *q == '\0' ) + return p; + if ( *p++ != *q++ ) + break; + } + q = targets[i]; + } + } + return NULL; +} + +struct wxXPMColourMapData +{ + wxXPMColourMapData() { R = G = B = 0; } + unsigned char R,G,B; +}; +WX_DECLARE_STRING_HASH_MAP(wxXPMColourMapData, wxXPMColourMap); + +wxImage wxXPMDecoder::ReadData(const char* const* xpm_data) +{ + wxCHECK_MSG(xpm_data, wxNullImage, wxT("NULL XPM data") ); + + wxImage img; + int count; + unsigned width, height, colors_cnt, chars_per_pixel; + size_t i, j, i_key; + char key[64]; + const char *clr_def; + wxXPMColourMap clr_tbl; + wxXPMColourMap::iterator it; + wxString maskKey; + wxString keyString; + + /* + * Read hints and initialize structures: + */ + + count = sscanf(xpm_data[0], "%u %u %u %u", + &width, &height, &colors_cnt, &chars_per_pixel); + if ( count != 4 || width * height * colors_cnt == 0 ) + { + wxLogError(_("XPM: incorrect header format!")); + return wxNullImage; + } + + // VS: XPM color map this large would be insane, since XPMs are encoded with + // 92 possible values on each position, 92^64 is *way* larger space than + // 8bit RGB... + wxCHECK_MSG(chars_per_pixel < 64, wxNullImage, wxT("XPM colormaps this large not supported.")); + + if (!img.Create(width, height, false)) + return wxNullImage; + + key[chars_per_pixel] = '\0'; + + /* + * Create colour map: + */ + wxXPMColourMapData clr_data; + for (i = 0; i < colors_cnt; i++) + { + const char *xmpColLine = xpm_data[1 + i]; + + // we must have at least " x y" after the colour index, hence +5 + if ( !xmpColLine || strlen(xmpColLine) < chars_per_pixel + 5 ) + { + wxLogError(_("XPM: incorrect colour description in line %d"), + (int)(1 + i)); + return wxNullImage; + } + + for (i_key = 0; i_key < chars_per_pixel; i_key++) + key[i_key] = xmpColLine[i_key]; + clr_def = ParseColor(xmpColLine + chars_per_pixel); + + if ( clr_def == NULL ) + { + wxLogError(_("XPM: malformed colour definition '%s' at line %d!"), + xmpColLine, (int)(1 + i)); + return wxNullImage; + } + + bool isNone = false; + if ( !GetRGBFromName(clr_def, &isNone, + &clr_data.R, &clr_data.G, &clr_data.B) ) + { + wxLogError(_("XPM: malformed colour definition '%s' at line %d!"), + xmpColLine, (int)(1 + i)); + return wxNullImage; + } + + keyString = key; + if ( isNone ) + maskKey = keyString; + + clr_tbl[keyString] = clr_data; + } + + // deal with the mask: we must replace pseudo-colour "None" with the mask + // colour (which can be any colour not otherwise used in the image) + if (!maskKey.empty()) + { + wxLongToLongHashMap rgb_table; + long rgb; + const size_t n = clr_tbl.size(); + wxXPMColourMap::const_iterator iter = clr_tbl.begin(); + for (i = 0; i < n; ++i, ++iter) + { + const wxXPMColourMapData& data = iter->second; + rgb = (data.R << 16) + (data.G << 8) + data.B; + rgb_table[rgb]; + } + for (rgb = 0; rgb <= 0xffffff && rgb_table.count(rgb); ++rgb) + ; + if (rgb > 0xffffff) + { + wxLogError(_("XPM: no colors left to use for mask!")); + return wxNullImage; + } + + wxXPMColourMapData& maskData = clr_tbl[maskKey]; + maskData.R = wxByte(rgb >> 16); + maskData.G = wxByte(rgb >> 8); + maskData.B = wxByte(rgb); + + img.SetMaskColour(maskData.R, maskData.G, maskData.B); + } + + /* + * Parse image data: + */ + + unsigned char *img_data = img.GetData(); + wxXPMColourMap::iterator entry; + wxXPMColourMap::iterator end = clr_tbl.end(); + + for (j = 0; j < height; j++) + { + for (i = 0; i < width; i++, img_data += 3) + { + const char *xpmImgLine = xpm_data[1 + colors_cnt + j]; + if ( !xpmImgLine || strlen(xpmImgLine) < width*chars_per_pixel ) + { + wxLogError(_("XPM: truncated image data at line %d!"), + (int)(1 + colors_cnt + j)); + return wxNullImage; + } + + for (i_key = 0; i_key < chars_per_pixel; i_key++) + { + key[i_key] = xpmImgLine[chars_per_pixel * i + i_key]; + } + + keyString = key; + entry = clr_tbl.find(keyString); + if ( entry == end ) + { + wxLogError(_("XPM: Malformed pixel data!")); + + // better return right now as otherwise we risk to flood the + // user with error messages as something seems to be seriously + // wrong with the file and so we could give this message for + // each remaining pixel if we don't bail out + return wxNullImage; + } + + img_data[0] = entry->second.R; + img_data[1] = entry->second.G; + img_data[2] = entry->second.B; + } + } +#if wxUSE_PALETTE + unsigned char* r = new unsigned char[colors_cnt]; + unsigned char* g = new unsigned char[colors_cnt]; + unsigned char* b = new unsigned char[colors_cnt]; + + for (it = clr_tbl.begin(), i = 0; it != clr_tbl.end(); it++, i++) + { + r[i] = it->second.R; + g[i] = it->second.G; + b[i] = it->second.B; + } + wxASSERT(i == colors_cnt); + img.SetPalette(wxPalette(colors_cnt, r, g, b)); + delete[] r; + delete[] g; + delete[] b; +#endif // wxUSE_PALETTE + return img; +} + +#endif // wxUSE_IMAGE && wxUSE_XPM diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/xti.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/xti.cpp new file mode 100644 index 0000000000..e7dc6d1ee0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/xti.cpp @@ -0,0 +1,971 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/xti.cpp +// Purpose: runtime metadata information (extended class info) +// Author: Stefan Csomor +// Modified by: +// Created: 27/07/03 +// Copyright: (c) 1997 Julian Smart +// (c) 2003 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_EXTENDED_RTTI + +#ifndef WX_PRECOMP + #include "wx/object.h" + #include "wx/list.h" + #include "wx/hash.h" +#endif + +#include "wx/xti.h" +#include "wx/xml/xml.h" +#include "wx/tokenzr.h" +#include "wx/range.h" + +#include + +#include "wx/beforestd.h" +#include +#include +#include +#include "wx/afterstd.h" + +using namespace std; + +// ---------------------------------------------------------------------------- +// wxEnumData +// ---------------------------------------------------------------------------- + +wxEnumData::wxEnumData( wxEnumMemberData* data ) +{ + m_members = data; + for ( m_count = 0; m_members[m_count].m_name; m_count++) + {}; +} + +bool wxEnumData::HasEnumMemberValue(const wxChar *name, int *value) const +{ + int i; + for (i = 0; m_members[i].m_name; i++ ) + { + if (!wxStrcmp(name, m_members[i].m_name)) + { + if ( value ) + *value = m_members[i].m_value; + return true; + } + } + return false; +} + +int wxEnumData::GetEnumMemberValue(const wxChar *name) const +{ + int i; + for (i = 0; m_members[i].m_name; i++ ) + { + if (!wxStrcmp(name, m_members[i].m_name)) + { + return m_members[i].m_value; + } + } + return 0; +} + +const wxChar *wxEnumData::GetEnumMemberName(int value) const +{ + int i; + for (i = 0; m_members[i].m_name; i++) + if (value == m_members[i].m_value) + return m_members[i].m_name; + + return wxEmptyString; +} + +int wxEnumData::GetEnumMemberValueByIndex( int idx ) const +{ + // we should cache the count in order to avoid out-of-bounds errors + return m_members[idx].m_value; +} + +const wxChar * wxEnumData::GetEnumMemberNameByIndex( int idx ) const +{ + // we should cache the count in order to avoid out-of-bounds errors + return m_members[idx].m_name; +} + +// ---------------------------------------------------------------------------- +// Type Information +// ---------------------------------------------------------------------------- + +// ---------------------------------------------------------------------------- +// value streaming +// ---------------------------------------------------------------------------- + +// streamer specializations +// for all built-in types + +// bool + +template<> void wxStringReadValue(const wxString &s, bool &data ) +{ + int intdata; + wxSscanf(s, wxT("%d"), &intdata ); + data = (bool)(intdata != 0); +} + +template<> void wxStringWriteValue(wxString &s, const bool &data ) +{ + s = wxString::Format(wxT("%d"), data ); +} + +// char + +template<> void wxStringReadValue(const wxString &s, char &data ) +{ + int intdata; + wxSscanf(s, wxT("%d"), &intdata ); + data = char(intdata); +} + +template<> void wxStringWriteValue(wxString &s, const char &data ) +{ + s = wxString::Format(wxT("%d"), data ); +} + +// unsigned char + +template<> void wxStringReadValue(const wxString &s, unsigned char &data ) +{ + int intdata; + wxSscanf(s, wxT("%d"), &intdata ); + data = (unsigned char)(intdata); +} + +template<> void wxStringWriteValue(wxString &s, const unsigned char &data ) +{ + s = wxString::Format(wxT("%d"), data ); +} + +// int + +template<> void wxStringReadValue(const wxString &s, int &data ) +{ + wxSscanf(s, wxT("%d"), &data ); +} + +template<> void wxStringWriteValue(wxString &s, const int &data ) +{ + s = wxString::Format(wxT("%d"), data ); +} + +// unsigned int + +template<> void wxStringReadValue(const wxString &s, unsigned int &data ) +{ + wxSscanf(s, wxT("%d"), &data ); +} + +template<> void wxStringWriteValue(wxString &s, const unsigned int &data ) +{ + s = wxString::Format(wxT("%d"), data ); +} + +// long + +template<> void wxStringReadValue(const wxString &s, long &data ) +{ + wxSscanf(s, wxT("%ld"), &data ); +} + +template<> void wxStringWriteValue(wxString &s, const long &data ) +{ + s = wxString::Format(wxT("%ld"), data ); +} + +// unsigned long + +template<> void wxStringReadValue(const wxString &s, unsigned long &data ) +{ + wxSscanf(s, wxT("%ld"), &data ); +} + +template<> void wxStringWriteValue(wxString &s, const unsigned long &data ) +{ + s = wxString::Format(wxT("%ld"), data ); +} + +#ifdef wxLongLong_t +template<> void wxStringReadValue(const wxString &s, wxLongLong_t &data ) +{ + wxSscanf(s, wxT("%lld"), &data ); +} + +template<> void wxStringWriteValue(wxString &s, const wxLongLong_t &data ) +{ + s = wxString::Format(wxT("%lld"), data ); +} + +template<> void wxStringReadValue(const wxString &s, wxULongLong_t &data ) +{ + wxSscanf(s, wxT("%lld"), &data ); +} + +template<> void wxStringWriteValue(wxString &s, const wxULongLong_t &data ) +{ + s = wxString::Format(wxT("%lld"), data ); +} +#endif +// float + +template<> void wxStringReadValue(const wxString &s, float &data ) +{ + wxSscanf(s, wxT("%f"), &data ); +} + +template<> void wxStringWriteValue(wxString &s, const float &data ) +{ + s = wxString::Format(wxT("%f"), data ); +} + +// double + +template<> void wxStringReadValue(const wxString &s, double &data ) +{ + wxSscanf(s, wxT("%lf"), &data ); +} + +template<> void wxStringWriteValue(wxString &s, const double &data ) +{ + s = wxString::Format(wxT("%lf"), data ); +} + +// wxString + +template<> void wxStringReadValue(const wxString &s, wxString &data ) +{ + data = s; +} + +template<> void wxStringWriteValue(wxString &s, const wxString &data ) +{ + s = data; +} + + +// built-ins +// + +#if wxUSE_FUNC_TEMPLATE_POINTER + #define wxBUILTIN_TYPE_INFO( element, type ) \ + wxBuiltInTypeInfo \ + s_typeInfo##type(element, &wxToStringConverter, \ + &wxFromStringConverter, typeid(type).name()); +#else + #define wxBUILTIN_TYPE_INFO( element, type ) \ + void _toString##element( const wxAny& data, wxString &result ) \ + { wxToStringConverter void wxStringReadValue(const wxString &s , wxRange &data) +{ + int minValue, maxValue; + wxSscanf(s, wxT("%d,%d"), &minValue , &maxValue); + data = wxRange(minValue, maxValue); +} + +template<> void wxStringWriteValue(wxString &s , const wxRange &data) +{ + s = wxString::Format(wxT("%d,%d"), data.GetMin() , data.GetMax()); +} + +wxCUSTOM_TYPE_INFO(wxRange, wxToStringConverter , wxFromStringConverter) + +// other types + +wxCOLLECTION_TYPE_INFO( wxString, wxArrayString ); + +template<> void wxCollectionToVariantArray( wxArrayString const &theArray, + wxAnyList &value) +{ + wxArrayCollectionToVariantArray( theArray, value ); +} + +wxTypeInfoMap *wxTypeInfo::ms_typeTable = NULL; + +wxTypeInfo *wxTypeInfo::FindType(const wxString& typeName) +{ + wxTypeInfoMap::iterator iter = ms_typeTable->find(typeName); + + if (iter == ms_typeTable->end()) + return NULL; + + return (wxTypeInfo *)iter->second; +} + +wxClassTypeInfo::wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo, + wxVariant2StringFnc to, + wxString2VariantFnc from, + const wxString &name) : + wxTypeInfo( kind, to, from, name) +{ + wxASSERT_MSG( kind == wxT_OBJECT_PTR || kind == wxT_OBJECT, + wxT("Illegal Kind for Enum Type")); m_classInfo = classInfo; +} + +wxEventSourceTypeInfo::wxEventSourceTypeInfo( int eventType, wxClassInfo* eventClass, + wxVariant2StringFnc to, + wxString2VariantFnc from ) : + wxTypeInfo ( wxT_DELEGATE, to, from, wxEmptyString ) +{ + m_eventClass = eventClass; + m_eventType = eventType; + m_lastEventType = -1; +} + +wxEventSourceTypeInfo::wxEventSourceTypeInfo( int eventType, int lastEventType, + wxClassInfo* eventClass, + wxVariant2StringFnc to, + wxString2VariantFnc from ) : + wxTypeInfo ( wxT_DELEGATE, to, from, wxEmptyString ) +{ + m_eventClass = eventClass; + m_eventType = eventType; + m_lastEventType = lastEventType; +} + +void wxTypeInfo::Register() +{ + if ( ms_typeTable == NULL ) + ms_typeTable = new wxTypeInfoMap(); + + if( !m_name.empty() ) + (*ms_typeTable)[m_name] = this; +} + +void wxTypeInfo::Unregister() +{ + if( !m_name.empty() ) + ms_typeTable->erase(m_name); +} + +// removing header dependency on string tokenizer + +void wxSetStringToArray( const wxString &s, wxArrayString &array ) +{ + wxStringTokenizer tokenizer(s, wxT("| \t\n"), wxTOKEN_STRTOK); + wxString flag; + array.Clear(); + while (tokenizer.HasMoreTokens()) + { + array.Add(tokenizer.GetNextToken()); + } +} + +// ---------------------------------------------------------------------------- +// wxPropertyInfo +// ---------------------------------------------------------------------------- + +void wxPropertyInfo::Insert(wxPropertyInfo* &iter) +{ + m_next = NULL; + if ( iter == NULL ) + iter = this; + else + { + wxPropertyInfo* i = iter; + while( i->m_next ) + i = i->m_next; + + i->m_next = this; + } +} + +void wxPropertyInfo::Remove() +{ + if ( this == m_itsClass->m_firstProperty ) + { + m_itsClass->m_firstProperty = m_next; + } + else + { + wxPropertyInfo *info = m_itsClass->m_firstProperty; + while (info) + { + if ( info->m_next == this ) + { + info->m_next = m_next; + break; + } + + info = info->m_next; + } + } + +} + +// ---------------------------------------------------------------------------- +// wxHandlerInfo +// ---------------------------------------------------------------------------- + +void wxHandlerInfo::Insert(wxHandlerInfo* &iter) +{ + m_next = NULL; + if ( iter == NULL ) + iter = this; + else + { + wxHandlerInfo* i = iter; + while( i->m_next ) + i = i->m_next; + + i->m_next = this; + } +} + +void wxHandlerInfo::Remove() +{ + if ( this == m_itsClass->m_firstHandler ) + { + m_itsClass->m_firstHandler = m_next; + } + else + { + wxHandlerInfo *info = m_itsClass->m_firstHandler; + while (info) + { + if ( info->m_next == this ) + { + info->m_next = m_next; + break; + } + + info = info->m_next; + } + } +} + + +// ---------------------------------------------------------------------------- +// wxClassInfo +// ---------------------------------------------------------------------------- + +bool wxClassInfo::Create(wxObject *object, int ParamCount, wxAny *Params) const +{ + if ( ParamCount != m_constructorPropertiesCount ) + { + // FIXME: shouldn't we just return false and let the caller handle it? + wxLogError( _("Illegal Parameter Count for Create Method") ); + return false; + } + + return m_constructor->Create( object, Params ); +} + +wxObject *wxClassInfo::ConstructObject(int ParamCount, wxAny *Params) const +{ + if ( ParamCount != m_constructorPropertiesCount ) + { + // FIXME: shouldn't we just return NULL and let the caller handle this case? + wxLogError( _("Illegal Parameter Count for ConstructObject Method") ); + return NULL; + } + + wxObject *object = NULL; + if (!m_constructor->Create( object, Params )) + return NULL; + return object; +} + +bool wxClassInfo::IsKindOf(const wxClassInfo *info) const +{ + if ( info != 0 ) + { + if ( info == this ) + return true; + + for ( int i = 0; m_parents[i]; ++ i ) + { + if ( m_parents[i]->IsKindOf( info ) ) + return true; + } + } + return false; +} + +const wxPropertyAccessor *wxClassInfo::FindAccessor(const wxChar *PropertyName) const +{ + const wxPropertyInfo* info = FindPropertyInfo( PropertyName ); + + if ( info ) + return info->GetAccessor(); + + return NULL; +} + +wxPropertyInfo *wxClassInfo::FindPropertyInfoInThisClass (const wxChar *PropertyName) const +{ + wxPropertyInfo* info = GetFirstProperty(); + + while( info ) + { + if ( wxStrcmp( info->GetName(), PropertyName ) == 0 ) + return info; + info = info->GetNext(); + } + + return 0; +} + +const wxPropertyInfo *wxClassInfo::FindPropertyInfo (const wxChar *PropertyName) const +{ + const wxPropertyInfo* info = FindPropertyInfoInThisClass( PropertyName ); + if ( info ) + return info; + + const wxClassInfo** parents = GetParents(); + for ( int i = 0; parents[i]; ++ i ) + { + if ( ( info = parents[i]->FindPropertyInfo( PropertyName ) ) != NULL ) + return info; + } + + return 0; +} + +wxHandlerInfo *wxClassInfo::FindHandlerInfoInThisClass (const wxChar *PropertyName) const +{ + wxHandlerInfo* info = GetFirstHandler(); + + while( info ) + { + if ( wxStrcmp( info->GetName(), PropertyName ) == 0 ) + return info; + info = info->GetNext(); + } + + return 0; +} + +const wxHandlerInfo *wxClassInfo::FindHandlerInfo (const wxChar *PropertyName) const +{ + const wxHandlerInfo* info = FindHandlerInfoInThisClass( PropertyName ); + + if ( info ) + return info; + + const wxClassInfo** parents = GetParents(); + for ( int i = 0; parents[i]; ++ i ) + { + if ( ( info = parents[i]->FindHandlerInfo( PropertyName ) ) != NULL ) + return info; + } + + return 0; +} + +wxObjectStreamingCallback wxClassInfo::GetStreamingCallback() const +{ + if ( m_streamingCallback ) + return m_streamingCallback; + + wxObjectStreamingCallback retval = NULL; + const wxClassInfo** parents = GetParents(); + for ( int i = 0; parents[i] && retval == NULL; ++ i ) + { + retval = parents[i]->GetStreamingCallback(); + } + return retval; +} + +bool wxClassInfo::BeforeWriteObject( const wxObject *obj, wxObjectWriter *streamer, + wxObjectWriterCallback *writercallback, const wxStringToAnyHashMap &metadata) const +{ + wxObjectStreamingCallback sb = GetStreamingCallback(); + if ( sb ) + return (*sb)(obj, streamer, writercallback, metadata ); + + return true; +} + +void wxClassInfo::SetProperty(wxObject *object, const wxChar *propertyName, + const wxAny &value) const +{ + const wxPropertyAccessor *accessor; + + accessor = FindAccessor(propertyName); + wxASSERT(accessor->HasSetter()); + accessor->SetProperty( object, value ); +} + +wxAny wxClassInfo::GetProperty(wxObject *object, const wxChar *propertyName) const +{ + const wxPropertyAccessor *accessor; + + accessor = FindAccessor(propertyName); + wxASSERT(accessor->HasGetter()); + wxAny result; + accessor->GetProperty(object,result); + return result; +} + +wxAnyList wxClassInfo::GetPropertyCollection(wxObject *object, + const wxChar *propertyName) const +{ + const wxPropertyAccessor *accessor; + + accessor = FindAccessor(propertyName); + wxASSERT(accessor->HasGetter()); + wxAnyList result; + accessor->GetPropertyCollection(object,result); + return result; +} + +void wxClassInfo::AddToPropertyCollection(wxObject *object, const wxChar *propertyName, + const wxAny& value) const +{ + const wxPropertyAccessor *accessor; + + accessor = FindAccessor(propertyName); + wxASSERT(accessor->HasAdder()); + accessor->AddToPropertyCollection( object, value ); +} + +// void wxClassInfo::GetProperties( wxPropertyInfoMap &map ) const +// The map parameter (the name map that is) seems something special +// to MSVC and so we use a other name. +void wxClassInfo::GetProperties( wxPropertyInfoMap &infomap ) const +{ + const wxPropertyInfo *pi = GetFirstProperty(); + while( pi ) + { + if ( infomap.find( pi->GetName() ) == infomap.end() ) + infomap[pi->GetName()] = (wxPropertyInfo*) pi; + + pi = pi->GetNext(); + } + + const wxClassInfo** parents = GetParents(); + for ( int i = 0; parents[i]; ++ i ) + { + parents[i]->GetProperties( infomap ); + } +} + +wxObject* wxClassInfo::AnyToObjectPtr( const wxAny &data) const +{ + return m_variantOfPtrToObjectConverter(data); +} + +void wxClassInfo::CallOnAny( const wxAny &data, wxObjectFunctor* functor ) const +{ + if ( data.GetTypeInfo()->GetKind() == wxT_OBJECT ) + return m_variantToObjectConverter(data, functor); + else + return (*functor)(m_variantOfPtrToObjectConverter(data)); +} + +wxAny wxClassInfo::ObjectPtrToAny( wxObject* obj) const +{ + return m_objectToVariantConverter(obj); +} + +bool wxClassInfo::NeedsDirectConstruction() const +{ + return wx_dynamic_cast(wxObjectAllocator*, m_constructor) != NULL; +} + +// ---------------------------------------------------------------------------- +// wxDynamicObject support +// ---------------------------------------------------------------------------- + +// Dynamic Objects are objects that have a real superclass instance and carry their +// own attributes in a hash map. Like this it is possible to create the objects and +// stream them, as if their class information was already available from compiled data + +struct wxDynamicObject::wxDynamicObjectInternal +{ + wxDynamicObjectInternal() {} + + wxStringToAnyHashMap m_properties; +}; + +typedef list< wxDynamicObject* > wxDynamicObjectList; + +struct wxDynamicClassInfo::wxDynamicClassInfoInternal +{ + wxDynamicObjectList m_dynamicObjects; +}; + +// instantiates this object with an instance of its superclass +wxDynamicObject::wxDynamicObject(wxObject* superClassInstance, const wxDynamicClassInfo *info) +{ + m_superClassInstance = superClassInstance; + m_classInfo = info; + m_data = new wxDynamicObjectInternal; +} + +wxDynamicObject::~wxDynamicObject() +{ + wx_dynamic_cast(const wxDynamicClassInfo*, m_classInfo)-> + m_data->m_dynamicObjects.remove( this ); + delete m_data; + delete m_superClassInstance; +} + +void wxDynamicObject::SetProperty (const wxChar *propertyName, const wxAny &value) +{ + wxASSERT_MSG(m_classInfo->FindPropertyInfoInThisClass(propertyName), + wxT("Accessing Unknown Property in a Dynamic Object") ); + m_data->m_properties[propertyName] = value; +} + +wxAny wxDynamicObject::GetProperty (const wxChar *propertyName) const +{ + wxASSERT_MSG(m_classInfo->FindPropertyInfoInThisClass(propertyName), + wxT("Accessing Unknown Property in a Dynamic Object") ); + return m_data->m_properties[propertyName]; +} + +void wxDynamicObject::RemoveProperty( const wxChar *propertyName ) +{ + wxASSERT_MSG(m_classInfo->FindPropertyInfoInThisClass(propertyName), + wxT("Removing Unknown Property in a Dynamic Object") ); + m_data->m_properties.erase( propertyName ); +} + +void wxDynamicObject::RenameProperty( const wxChar *oldPropertyName, + const wxChar *newPropertyName ) +{ + wxASSERT_MSG(m_classInfo->FindPropertyInfoInThisClass(oldPropertyName), + wxT("Renaming Unknown Property in a Dynamic Object") ); + + wxAny value = m_data->m_properties[oldPropertyName]; + m_data->m_properties.erase( oldPropertyName ); + m_data->m_properties[newPropertyName] = value; +} + + +// ---------------------------------------------------------------------------- +// wxDynamicClassInfo +// ---------------------------------------------------------------------------- + +wxDynamicClassInfo::wxDynamicClassInfo( const wxChar *unitName, + const wxChar *className, + const wxClassInfo* superClass ) : + wxClassInfo( unitName, className, new const wxClassInfo*[2]) +{ + GetParents()[0] = superClass; + GetParents()[1] = NULL; + m_data = new wxDynamicClassInfoInternal; +} + +wxDynamicClassInfo::~wxDynamicClassInfo() +{ + delete[] GetParents(); + delete m_data; +} + +wxObject *wxDynamicClassInfo::AllocateObject() const +{ + wxObject* parent = GetParents()[0]->AllocateObject(); + wxDynamicObject *obj = new wxDynamicObject( parent, this ); + m_data->m_dynamicObjects.push_back( obj ); + return obj; +} + +bool wxDynamicClassInfo::Create (wxObject *object, int paramCount, wxAny *params) const +{ + wxDynamicObject *dynobj = wx_dynamic_cast( wxDynamicObject *, object ); + wxASSERT_MSG( dynobj, + wxT("cannot call wxDynamicClassInfo::Create on ") + wxT("an object other than wxDynamicObject") ); + + return GetParents()[0]->Create( dynobj->GetSuperClassInstance(), paramCount, params ); +} + +// get number of parameters for constructor +int wxDynamicClassInfo::GetCreateParamCount() const +{ + return GetParents()[0]->GetCreateParamCount(); +} + +// get i-th constructor parameter +const wxChar* wxDynamicClassInfo::GetCreateParamName(int i) const +{ + return GetParents()[0]->GetCreateParamName( i ); +} + +void wxDynamicClassInfo::SetProperty(wxObject *object, const wxChar *propertyName, const wxAny &value) const +{ + wxDynamicObject* dynobj = wx_dynamic_cast(wxDynamicObject*, object); + wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") ); + if ( FindPropertyInfoInThisClass(propertyName) ) + dynobj->SetProperty( propertyName, value ); + else + GetParents()[0]->SetProperty( dynobj->GetSuperClassInstance(), propertyName, value ); +} + +wxAny wxDynamicClassInfo::GetProperty(wxObject *object, const wxChar *propertyName) const +{ + wxDynamicObject* dynobj = wx_dynamic_cast(wxDynamicObject*, object); + wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") ); + if ( FindPropertyInfoInThisClass(propertyName) ) + return dynobj->GetProperty( propertyName ); + else + return GetParents()[0]->GetProperty( dynobj->GetSuperClassInstance(), propertyName ); +} + +void wxDynamicClassInfo::AddProperty( const wxChar *propertyName, const wxTypeInfo* typeInfo ) +{ + EnsureInfosInited(); + new wxPropertyInfo( m_firstProperty, this, propertyName, typeInfo->GetTypeName(), new wxGenericPropertyAccessor( propertyName ), wxAny() ); +} + +void wxDynamicClassInfo::AddHandler( const wxChar *handlerName, wxObjectEventFunction address, const wxClassInfo* eventClassInfo ) +{ + EnsureInfosInited(); + new wxHandlerInfo( m_firstHandler, this, handlerName, address, eventClassInfo ); +} + +// removes an existing runtime-property +void wxDynamicClassInfo::RemoveProperty( const wxChar *propertyName ) +{ + for ( wxDynamicObjectList::iterator iter = m_data->m_dynamicObjects.begin(); iter != m_data->m_dynamicObjects.end(); ++iter ) + (*iter)->RemoveProperty( propertyName ); + delete FindPropertyInfoInThisClass(propertyName); +} + +// removes an existing runtime-handler +void wxDynamicClassInfo::RemoveHandler( const wxChar *handlerName ) +{ + delete FindHandlerInfoInThisClass(handlerName); +} + +// renames an existing runtime-property +void wxDynamicClassInfo::RenameProperty( const wxChar *oldPropertyName, const wxChar *newPropertyName ) +{ + wxPropertyInfo* pi = FindPropertyInfoInThisClass(oldPropertyName); + wxASSERT_MSG( pi,wxT("not existing property") ); + pi->m_name = newPropertyName; + wx_dynamic_cast(wxGenericPropertyAccessor*, pi->GetAccessor())->RenameProperty( oldPropertyName, newPropertyName ); + for ( wxDynamicObjectList::iterator iter = m_data->m_dynamicObjects.begin(); iter != m_data->m_dynamicObjects.end(); ++iter ) + (*iter)->RenameProperty( oldPropertyName, newPropertyName ); +} + +// renames an existing runtime-handler +void wxDynamicClassInfo::RenameHandler( const wxChar *oldHandlerName, const wxChar *newHandlerName ) +{ + wxASSERT_MSG(FindHandlerInfoInThisClass(oldHandlerName),wxT("not existing handler") ); + FindHandlerInfoInThisClass(oldHandlerName)->m_name = newHandlerName; +} + +// ---------------------------------------------------------------------------- +// wxGenericPropertyAccessor +// ---------------------------------------------------------------------------- + +struct wxGenericPropertyAccessor::wxGenericPropertyAccessorInternal +{ + char filler; +}; + +wxGenericPropertyAccessor::wxGenericPropertyAccessor( const wxString& propertyName ) +: wxPropertyAccessor( NULL, NULL, NULL, NULL ) +{ + m_data = new wxGenericPropertyAccessorInternal; + m_propertyName = propertyName; + m_getterName = wxT("Get")+propertyName; + m_setterName = wxT("Set")+propertyName; +} + +wxGenericPropertyAccessor::~wxGenericPropertyAccessor() +{ + delete m_data; +} + +void wxGenericPropertyAccessor::SetProperty(wxObject *object, const wxAny &value) const +{ + wxDynamicObject* dynobj = wx_dynamic_cast(wxDynamicObject*, object); + wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") ); + dynobj->SetProperty(m_propertyName.c_str(), value ); +} + +void wxGenericPropertyAccessor::GetProperty(const wxObject *object, wxAny& value) const +{ + const wxDynamicObject* dynobj = wx_dynamic_cast( const wxDynamicObject * , object ); + wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") ); + value = dynobj->GetProperty( m_propertyName.c_str() ); +} + +// ---------------------------------------------------------------------------- +// wxGenericPropertyAccessor +// ---------------------------------------------------------------------------- + +wxString wxAnyGetAsString( const wxAny& data) +{ + if ( data.IsNull() || data.GetTypeInfo()==NULL ) + return wxEmptyString; + + wxString s; + data.GetTypeInfo()->ConvertToString(data,s); + return s; +} + +const wxObject* wxAnyGetAsObjectPtr( const wxAny& data) +{ + if ( !data.IsNull() ) + { + const wxClassTypeInfo* ti = wx_dynamic_cast(const wxClassTypeInfo*, data.GetTypeInfo()); + if( ti ) + return ti->GetClassInfo()->AnyToObjectPtr(data); + } + return NULL; +} + +wxObjectFunctor::~wxObjectFunctor() +{}; + +#endif // wxUSE_EXTENDED_RTTI diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/xtistrm.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/xtistrm.cpp new file mode 100644 index 0000000000..d96db65eb3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/xtistrm.cpp @@ -0,0 +1,680 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/xtistrm.cpp +// Purpose: streaming runtime metadata information +// Author: Stefan Csomor +// Modified by: +// Created: 27/07/03 +// Copyright: (c) 2003 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_EXTENDED_RTTI + +#include "wx/xtistrm.h" + +#ifndef WX_PRECOMP + #include "wx/object.h" + #include "wx/hash.h" + #include "wx/event.h" +#endif + +#include "wx/tokenzr.h" +#include "wx/txtstrm.h" + +// STL headers: + +#include "wx/beforestd.h" +#include +#include +#include +#include "wx/afterstd.h" +using namespace std; + + +// ---------------------------------------------------------------------------- +// wxObjectWriter +// ---------------------------------------------------------------------------- + +struct wxObjectWriter::wxObjectWriterInternal +{ + map< const wxObject*, int > m_writtenObjects; + int m_nextId; +}; + +wxObjectWriter::wxObjectWriter() +{ + m_data = new wxObjectWriterInternal; + m_data->m_nextId = 0; +} + +wxObjectWriter::~wxObjectWriter() +{ + delete m_data; +} + +struct wxObjectWriter::wxObjectWriterInternalPropertiesData +{ + char nothing; +}; + +void wxObjectWriter::ClearObjectContext() +{ + delete m_data; + m_data = new wxObjectWriterInternal(); + m_data->m_nextId = 0; +} + +void wxObjectWriter::WriteObject(const wxObject *object, const wxClassInfo *classInfo, + wxObjectWriterCallback *writercallback, const wxString &name, + const wxStringToAnyHashMap &metadata ) +{ + DoBeginWriteTopLevelEntry( name ); + WriteObject( object, classInfo, writercallback, false, metadata); + DoEndWriteTopLevelEntry( name ); +} + +void wxObjectWriter::WriteObject(const wxObject *object, const wxClassInfo *classInfo, + wxObjectWriterCallback *writercallback, bool isEmbedded, + const wxStringToAnyHashMap &metadata ) +{ + if ( !classInfo->BeforeWriteObject( object, this, writercallback, metadata) ) + return; + + if ( writercallback->BeforeWriteObject( this, object, classInfo, metadata) ) + { + if ( object == NULL ) + DoWriteNullObject(); + else if ( IsObjectKnown( object ) ) + DoWriteRepeatedObject( GetObjectID(object) ); + else + { + int oid = m_data->m_nextId++; + if ( !isEmbedded ) + m_data->m_writtenObjects[object] = oid; + + // in case this object is a wxDynamicObject we also have to insert is superclass + // instance with the same id, so that object relations are streamed out correctly + const wxDynamicObject* dynobj = wx_dynamic_cast(const wxDynamicObject*, object); + if ( !isEmbedded && dynobj ) + m_data->m_writtenObjects[dynobj->GetSuperClassInstance()] = oid; + + DoBeginWriteObject( object, classInfo, oid, metadata ); + wxObjectWriterInternalPropertiesData data; + WriteAllProperties( object, classInfo, writercallback, &data ); + DoEndWriteObject( object, classInfo, oid ); + } + writercallback->AfterWriteObject( this,object, classInfo ); + } +} + +void wxObjectWriter::FindConnectEntry(const wxEvtHandler * evSource, + const wxEventSourceTypeInfo* dti, + const wxObject* &sink, + const wxHandlerInfo *&handler) +{ + wxList *dynamicEvents = evSource->GetDynamicEventTable(); + + if ( dynamicEvents ) + { + for ( wxList::const_iterator node = dynamicEvents->begin(); node != dynamicEvents->end(); ++node ) + { + wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)(*node); + + // find the match + if ( entry->m_fn && + (dti->GetEventType() == entry->m_eventType) && + (entry->m_id == -1 ) && + (entry->m_fn->GetEvtHandler() != NULL ) ) + { + sink = entry->m_fn->GetEvtHandler(); + const wxClassInfo* sinkClassInfo = sink->GetClassInfo(); + const wxHandlerInfo* sinkHandler = sinkClassInfo->GetFirstHandler(); + while ( sinkHandler ) + { + if ( sinkHandler->GetEventFunction() == entry->m_fn->GetEvtMethod() ) + { + handler = sinkHandler; + break; + } + sinkHandler = sinkHandler->GetNext(); + } + break; + } + } + } +} +void wxObjectWriter::WriteAllProperties( const wxObject * obj, const wxClassInfo* ci, + wxObjectWriterCallback *writercallback, + wxObjectWriterInternalPropertiesData * data ) +{ + wxPropertyInfoMap map; + ci->GetProperties( map ); + for ( int i = 0; i < ci->GetCreateParamCount(); ++i ) + { + wxString name = ci->GetCreateParamName(i); + wxPropertyInfoMap::const_iterator iter = map.find(name); + const wxPropertyInfo* prop = iter == map.end() ? NULL : iter->second; + if ( prop ) + { + WriteOneProperty( obj, prop->GetDeclaringClass(), prop, writercallback, data ); + } + else + { + wxLogError( _("Create Parameter %s not found in declared RTTI Parameters"), name.c_str() ); + } + map.erase( name ); + } + { // Extra block for broken compilers + for( wxPropertyInfoMap::iterator iter = map.begin(); iter != map.end(); ++iter ) + { + const wxPropertyInfo* prop = iter->second; + if ( prop->GetFlags() & wxPROP_OBJECT_GRAPH ) + { + WriteOneProperty( obj, prop->GetDeclaringClass(), prop, writercallback, data ); + } + } + } + { // Extra block for broken compilers + for( wxPropertyInfoMap::iterator iter = map.begin(); iter != map.end(); ++iter ) + { + const wxPropertyInfo* prop = iter->second; + if ( !(prop->GetFlags() & wxPROP_OBJECT_GRAPH) ) + { + WriteOneProperty( obj, prop->GetDeclaringClass(), prop, writercallback, data ); + } + } + } +} + +class WXDLLIMPEXP_BASE wxObjectPropertyWriter: public wxObjectWriterFunctor +{ +public: + wxObjectPropertyWriter(const wxClassTypeInfo* cti, + wxObjectWriterCallback *writercallback, + wxObjectWriter* writer, + wxStringToAnyHashMap &props) : + m_cti(cti),m_persister(writercallback),m_writer(writer),m_props(props) + {} + + virtual void operator()(const wxObject *vobj) + { + m_writer->WriteObject( vobj, (vobj ? vobj->GetClassInfo() : m_cti->GetClassInfo() ), + m_persister, m_cti->GetKind()== wxT_OBJECT, m_props ); + } +private: + const wxClassTypeInfo* m_cti; + wxObjectWriterCallback *m_persister; + wxObjectWriter* m_writer; + wxStringToAnyHashMap& m_props; +}; + +void wxObjectWriter::WriteOneProperty( const wxObject *obj, const wxClassInfo* ci, + const wxPropertyInfo* pi, wxObjectWriterCallback *writercallback, + wxObjectWriterInternalPropertiesData *WXUNUSED(data) ) +{ + if ( pi->GetFlags() & wxPROP_DONT_STREAM ) + return; + + // make sure that we are picking the correct object for accessing the property + const wxDynamicObject* dynobj = wx_dynamic_cast(const wxDynamicObject*, obj ); + if ( dynobj && (wx_dynamic_cast(const wxDynamicClassInfo*, ci) == NULL) ) + obj = dynobj->GetSuperClassInstance(); + + if ( pi->GetTypeInfo()->GetKind() == wxT_COLLECTION ) + { + wxAnyList data; + pi->GetAccessor()->GetPropertyCollection(obj, data); + const wxTypeInfo * elementType = + wx_dynamic_cast( const wxCollectionTypeInfo*, pi->GetTypeInfo() )->GetElementType(); + if ( !data.empty() ) + { + DoBeginWriteProperty( pi ); + for ( wxAnyList::const_iterator iter = data.begin(); iter != data.end(); ++iter ) + { + DoBeginWriteElement(); + const wxAny* valptr = *iter; + if ( writercallback->BeforeWriteProperty( this, obj, pi, *valptr ) ) + { + const wxClassTypeInfo* cti = + wx_dynamic_cast( const wxClassTypeInfo*, elementType ); + if ( cti ) + { + wxStringToAnyHashMap md; + wxObjectPropertyWriter pw(cti,writercallback,this, md); + + const wxClassInfo* pci = cti->GetClassInfo(); + pci->CallOnAny( *valptr, &pw); + } + else + { + DoWriteSimpleType( *valptr ); + } + } + DoEndWriteElement(); + } + DoEndWriteProperty( pi ); + } + } + else + { + const wxEventSourceTypeInfo* dti = + wx_dynamic_cast( const wxEventSourceTypeInfo* , pi->GetTypeInfo() ); + if ( dti ) + { + const wxObject* sink = NULL; + const wxHandlerInfo *handler = NULL; + + const wxEvtHandler * evSource = wx_dynamic_cast(const wxEvtHandler *, obj); + if ( evSource ) + { + FindConnectEntry( evSource, dti, sink, handler ); + if ( writercallback->BeforeWriteDelegate( this, obj, ci, pi, sink, handler ) ) + { + if ( sink != NULL && handler != NULL ) + { + DoBeginWriteProperty( pi ); + if ( IsObjectKnown( sink ) ) + { + DoWriteDelegate( obj, ci, pi, sink, GetObjectID( sink ), + sink->GetClassInfo(), handler ); + DoEndWriteProperty( pi ); + } + else + { + wxLogError( wxT("Streaming delegates for not already ") + wxT("streamed objects not yet supported") ); + } + } + } + } + else + { + wxLogError(_("Illegal Object Class (Non-wxEvtHandler) as Event Source") ); + } + } + else + { + wxAny value; + pi->GetAccessor()->GetProperty(obj, value); + + // avoid streaming out void objects + // TODO Verify + if( value.IsNull() ) + return; + + if ( pi->GetFlags() & wxPROP_ENUM_STORE_LONG ) + { + const wxEnumTypeInfo *eti = + wx_dynamic_cast(const wxEnumTypeInfo*, pi->GetTypeInfo() ); + if ( eti ) + { + eti->ConvertFromLong( wxANY_AS(value, long ), value ); + } + else + { + wxLogError( _("Type must have enum - long conversion") ); + } + } + + // avoid streaming out default values + if ( pi->GetTypeInfo()->HasStringConverters() && + !pi->GetDefaultValue().IsNull() ) // TODO Verify + { + if ( wxAnyGetAsString(value) == wxAnyGetAsString(pi->GetDefaultValue()) ) + return; + } + + // avoid streaming out null objects + const wxClassTypeInfo* cti = + wx_dynamic_cast( const wxClassTypeInfo* , pi->GetTypeInfo() ); + + if ( cti && cti->GetKind() == wxT_OBJECT_PTR && wxAnyGetAsObjectPtr(value) == NULL ) + return; + + if ( writercallback->BeforeWriteProperty( this, obj, pi, value ) ) + { + DoBeginWriteProperty( pi ); + if ( cti ) + { + if ( cti->HasStringConverters() ) + { + wxString stringValue; + cti->ConvertToString( value, stringValue ); + wxAny convertedValue(stringValue); + DoWriteSimpleType( convertedValue ); + } + else + { + wxStringToAnyHashMap md; + wxObjectPropertyWriter pw(cti,writercallback,this, md); + + const wxClassInfo* pci = cti->GetClassInfo(); + pci->CallOnAny(value, &pw); + } + } + else + { + DoWriteSimpleType( value ); + } + DoEndWriteProperty( pi ); + } + } + } +} + +int wxObjectWriter::GetObjectID(const wxObject *obj) +{ + if ( !IsObjectKnown( obj ) ) + return wxInvalidObjectID; + + return m_data->m_writtenObjects[obj]; +} + +bool wxObjectWriter::IsObjectKnown( const wxObject *obj ) +{ + return m_data->m_writtenObjects.find( obj ) != m_data->m_writtenObjects.end(); +} + + +// ---------------------------------------------------------------------------- +// wxObjectReader +// ---------------------------------------------------------------------------- + +struct wxObjectReader::wxObjectReaderInternal +{ + map m_classInfos; +}; + +wxObjectReader::wxObjectReader() +{ + m_data = new wxObjectReaderInternal; +} + +wxObjectReader::~wxObjectReader() +{ + delete m_data; +} + +wxClassInfo* wxObjectReader::GetObjectClassInfo(int objectID) +{ + if ( objectID == wxNullObjectID || objectID == wxInvalidObjectID ) + { + wxLogError( _("Invalid or Null Object ID passed to GetObjectClassInfo" ) ); + return NULL; + } + if ( m_data->m_classInfos.find(objectID) == m_data->m_classInfos.end() ) + { + wxLogError( _("Unknown Object passed to GetObjectClassInfo" ) ); + return NULL; + } + return m_data->m_classInfos[objectID]; +} + +void wxObjectReader::SetObjectClassInfo(int objectID, wxClassInfo *classInfo ) +{ + if ( objectID == wxNullObjectID || objectID == wxInvalidObjectID ) + { + wxLogError( _("Invalid or Null Object ID passed to GetObjectClassInfo" ) ); + return; + } + if ( m_data->m_classInfos.find(objectID) != m_data->m_classInfos.end() ) + { + wxLogError( _("Already Registered Object passed to SetObjectClassInfo" ) ); + return; + } + m_data->m_classInfos[objectID] = classInfo; +} + +bool wxObjectReader::HasObjectClassInfo( int objectID ) +{ + if ( objectID == wxNullObjectID || objectID == wxInvalidObjectID ) + { + wxLogError( _("Invalid or Null Object ID passed to HasObjectClassInfo" ) ); + return false; + } + return m_data->m_classInfos.find(objectID) != m_data->m_classInfos.end(); +} + + +// ---------------------------------------------------------------------------- +// reading xml in +// ---------------------------------------------------------------------------- + +/* +Reading components has not to be extended for components +as properties are always sought by typeinfo over all levels +and create params are always toplevel class only +*/ + + +// ---------------------------------------------------------------------------- +// wxObjectRuntimeReaderCallback - depersisting to memory +// ---------------------------------------------------------------------------- + +struct wxObjectRuntimeReaderCallback::wxObjectRuntimeReaderCallbackInternal +{ + map m_objects; + + void SetObject(int objectID, wxObject *obj ) + { + if ( m_objects.find(objectID) != m_objects.end() ) + { + wxLogError( _("Passing a already registered object to SetObject") ); + return ; + } + m_objects[objectID] = obj; + } + wxObject* GetObject( int objectID ) + { + if ( objectID == wxNullObjectID ) + return NULL; + if ( m_objects.find(objectID) == m_objects.end() ) + { + wxLogError( _("Passing an unknown object to GetObject") ); + return NULL; + } + + return m_objects[objectID]; + } +}; + +wxObjectRuntimeReaderCallback::wxObjectRuntimeReaderCallback() +{ + m_data = new wxObjectRuntimeReaderCallbackInternal(); +} + +wxObjectRuntimeReaderCallback::~wxObjectRuntimeReaderCallback() +{ + delete m_data; +} + +void wxObjectRuntimeReaderCallback::AllocateObject(int objectID, wxClassInfo *classInfo, + wxStringToAnyHashMap &WXUNUSED(metadata)) +{ + wxObject *O; + O = classInfo->CreateObject(); + m_data->SetObject(objectID, O); +} + +void wxObjectRuntimeReaderCallback::CreateObject(int objectID, + const wxClassInfo *classInfo, + int paramCount, + wxAny *params, + int *objectIdValues, + const wxClassInfo **objectClassInfos, + wxStringToAnyHashMap &WXUNUSED(metadata)) +{ + wxObject *o; + o = m_data->GetObject(objectID); + for ( int i = 0; i < paramCount; ++i ) + { + if ( objectIdValues[i] != wxInvalidObjectID ) + { + wxObject *o; + o = m_data->GetObject(objectIdValues[i]); + // if this is a dynamic object and we are asked for another class + // than wxDynamicObject we cast it down manually. + wxDynamicObject *dyno = wx_dynamic_cast( wxDynamicObject *, o); + if ( dyno!=NULL && (objectClassInfos[i] != dyno->GetClassInfo()) ) + { + o = dyno->GetSuperClassInstance(); + } + params[i] = objectClassInfos[i]->ObjectPtrToAny(o); + } + } + classInfo->Create(o, paramCount, params); +} + +void wxObjectRuntimeReaderCallback::ConstructObject(int objectID, + const wxClassInfo *classInfo, + int paramCount, + wxAny *params, + int *objectIdValues, + const wxClassInfo **objectClassInfos, + wxStringToAnyHashMap &WXUNUSED(metadata)) +{ + wxObject *o; + for ( int i = 0; i < paramCount; ++i ) + { + if ( objectIdValues[i] != wxInvalidObjectID ) + { + wxObject *o; + o = m_data->GetObject(objectIdValues[i]); + // if this is a dynamic object and we are asked for another class + // than wxDynamicObject we cast it down manually. + wxDynamicObject *dyno = wx_dynamic_cast( wxDynamicObject *, o); + if ( dyno!=NULL && (objectClassInfos[i] != dyno->GetClassInfo()) ) + { + o = dyno->GetSuperClassInstance(); + } + params[i] = objectClassInfos[i]->ObjectPtrToAny(o); + } + } + o = classInfo->ConstructObject(paramCount, params); + m_data->SetObject(objectID, o); +} + + +void wxObjectRuntimeReaderCallback::DestroyObject(int objectID, wxClassInfo *WXUNUSED(classInfo)) +{ + wxObject *o; + o = m_data->GetObject(objectID); + delete o; +} + +void wxObjectRuntimeReaderCallback::SetProperty(int objectID, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + const wxAny &value) +{ + wxObject *o; + o = m_data->GetObject(objectID); + classInfo->SetProperty( o, propertyInfo->GetName().c_str(), value ); +} + +void wxObjectRuntimeReaderCallback::SetPropertyAsObject(int objectID, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + int valueObjectId) +{ + wxObject *o, *valo; + o = m_data->GetObject(objectID); + valo = m_data->GetObject(valueObjectId); + const wxClassInfo* valClassInfo = + (wx_dynamic_cast(const wxClassTypeInfo*,propertyInfo->GetTypeInfo()))->GetClassInfo(); + + // if this is a dynamic object and we are asked for another class + // than wxDynamicObject we cast it down manually. + wxDynamicObject *dynvalo = wx_dynamic_cast( wxDynamicObject *, valo); + if ( dynvalo!=NULL && (valClassInfo != dynvalo->GetClassInfo()) ) + { + valo = dynvalo->GetSuperClassInstance(); + } + + classInfo->SetProperty( o, propertyInfo->GetName().c_str(), + valClassInfo->ObjectPtrToAny(valo) ); +} + +void wxObjectRuntimeReaderCallback::SetConnect(int eventSourceObjectID, + const wxClassInfo *WXUNUSED(eventSourceClassInfo), + const wxPropertyInfo *delegateInfo, + const wxClassInfo *WXUNUSED(eventSinkClassInfo), + const wxHandlerInfo* handlerInfo, + int eventSinkObjectID ) +{ + wxEvtHandler *ehsource = + wx_dynamic_cast( wxEvtHandler* , m_data->GetObject( eventSourceObjectID ) ); + wxEvtHandler *ehsink = + wx_dynamic_cast( wxEvtHandler *,m_data->GetObject(eventSinkObjectID) ); + + if ( ehsource && ehsink ) + { + const wxEventSourceTypeInfo *delegateTypeInfo = + wx_dynamic_cast(const wxEventSourceTypeInfo*,delegateInfo->GetTypeInfo()); + if( delegateTypeInfo && delegateTypeInfo->GetLastEventType() == -1 ) + { + ehsource->Connect( -1, delegateTypeInfo->GetEventType(), + handlerInfo->GetEventFunction(), NULL /*user data*/, + ehsink ); + } + else + { + for ( wxEventType iter = delegateTypeInfo->GetEventType(); + iter <= delegateTypeInfo->GetLastEventType(); ++iter ) + { + ehsource->Connect( -1, iter, + handlerInfo->GetEventFunction(), NULL /*user data*/, + ehsink ); + } + } + } +} + +wxObject *wxObjectRuntimeReaderCallback::GetObject(int objectID) +{ + return m_data->GetObject( objectID ); +} + +void wxObjectRuntimeReaderCallback::AddToPropertyCollection( int objectID, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + const wxAny &value) +{ + wxObject *o; + o = m_data->GetObject(objectID); + classInfo->AddToPropertyCollection( o, propertyInfo->GetName().c_str(), value ); +} + +void wxObjectRuntimeReaderCallback::AddToPropertyCollectionAsObject(int objectID, + const wxClassInfo *classInfo, + const wxPropertyInfo* propertyInfo, + int valueObjectId) +{ + wxObject *o, *valo; + o = m_data->GetObject(objectID); + valo = m_data->GetObject(valueObjectId); + const wxCollectionTypeInfo * collectionTypeInfo = + wx_dynamic_cast( const wxCollectionTypeInfo *, propertyInfo->GetTypeInfo() ); + const wxClassInfo* valClassInfo = + (wx_dynamic_cast(const wxClassTypeInfo*,collectionTypeInfo->GetElementType()))->GetClassInfo(); + + // if this is a dynamic object and we are asked for another class + // than wxDynamicObject we cast it down manually. + wxDynamicObject *dynvalo = wx_dynamic_cast( wxDynamicObject *, valo); + if ( dynvalo!=NULL && (valClassInfo != dynvalo->GetClassInfo()) ) + { + valo = dynvalo->GetSuperClassInstance(); + } + + classInfo->AddToPropertyCollection( o, propertyInfo->GetName().c_str(), + valClassInfo->ObjectPtrToAny(valo) ); +} + +#endif // wxUSE_EXTENDED_RTTI diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/xtixml.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/xtixml.cpp new file mode 100644 index 0000000000..4a37afe6b6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/xtixml.cpp @@ -0,0 +1,552 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/xtixml.cpp +// Purpose: streaming runtime metadata information +// Author: Stefan Csomor +// Modified by: +// Created: 27/07/03 +// Copyright: (c) 2003 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#if wxUSE_EXTENDED_RTTI + +#include "wx/xtistrm.h" + +#ifndef WX_PRECOMP + #include "wx/object.h" + #include "wx/hash.h" + #include "wx/event.h" +#endif + +#include "wx/xml/xml.h" +#include "wx/tokenzr.h" +#include "wx/txtstrm.h" +#include "wx/xtistrm.h" +#include "wx/xtixml.h" + +// STL headers + +#include "wx/beforestd.h" +#include +#include +#include +#include "wx/afterstd.h" + +using namespace std; + + + + +// ---------------------------------------------------------------------------- +// wxObjectXmlWriter +// ---------------------------------------------------------------------------- + +// convenience functions + +void wxXmlAddContentToNode( wxXmlNode* node, const wxString& data ) +{ + node->AddChild(new wxXmlNode(wxXML_TEXT_NODE, wxT("value"), data ) ); +} + +wxString wxXmlGetContentFromNode( wxXmlNode *node ) +{ + if ( node->GetChildren() ) + return node->GetChildren()->GetContent(); + else + return wxEmptyString; +} + +struct wxObjectXmlWriter::wxObjectXmlWriterInternal +{ + wxXmlNode *m_root; + wxXmlNode *m_current; + vector< wxXmlNode * > m_objectStack; + + void Push( wxXmlNode *newCurrent ) + { + m_objectStack.push_back( m_current ); + m_current = newCurrent; + } + + void Pop() + { + m_current = m_objectStack.back(); + m_objectStack.pop_back(); + } +}; + +wxObjectXmlWriter::wxObjectXmlWriter( wxXmlNode * rootnode ) +{ + m_data = new wxObjectXmlWriterInternal(); + m_data->m_root = rootnode; + m_data->m_current = rootnode; +} + +wxObjectXmlWriter::~wxObjectXmlWriter() +{ + delete m_data; +} + +void wxObjectXmlWriter::DoBeginWriteTopLevelEntry( const wxString &name ) +{ + wxXmlNode *pnode; + pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("entry")); + pnode->AddProperty(wxString(wxT("name")), name); + m_data->m_current->AddChild(pnode); + m_data->Push( pnode ); +} + +void wxObjectXmlWriter::DoEndWriteTopLevelEntry( const wxString &WXUNUSED(name) ) +{ + m_data->Pop(); +} + +void wxObjectXmlWriter::DoBeginWriteObject(const wxObject *WXUNUSED(object), + const wxClassInfo *classInfo, + int objectID, const wxStringToAnyHashMap &metadata ) +{ + wxXmlNode *pnode; + pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object")); + pnode->AddProperty(wxT("class"), wxString(classInfo->GetClassName())); + pnode->AddProperty(wxT("id"), wxString::Format( wxT("%d"), objectID ) ); + + wxStringToAnyHashMap::const_iterator it, en; + for( it = metadata.begin(), en = metadata.end(); it != en; ++it ) + { + pnode->AddProperty( it->first, wxAnyGetAsString(it->second) ); + } + + m_data->m_current->AddChild(pnode); + m_data->Push( pnode ); +} + +void wxObjectXmlWriter::DoEndWriteObject(const wxObject *WXUNUSED(object), + const wxClassInfo *WXUNUSED(classInfo), + int WXUNUSED(objectID) ) +{ + m_data->Pop(); +} + +void wxObjectXmlWriter::DoWriteSimpleType( const wxAny &value ) +{ + wxXmlAddContentToNode( m_data->m_current,wxAnyGetAsString(value) ); +} + +void wxObjectXmlWriter::DoBeginWriteElement() +{ + wxXmlNode *pnode; + pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("element") ); + m_data->m_current->AddChild(pnode); + m_data->Push( pnode ); +} + +void wxObjectXmlWriter::DoEndWriteElement() +{ + m_data->Pop(); +} + +void wxObjectXmlWriter::DoBeginWriteProperty(const wxPropertyInfo *pi ) +{ + wxXmlNode *pnode; + pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("prop") ); + pnode->AddProperty(wxT("name"), pi->GetName() ); + m_data->m_current->AddChild(pnode); + m_data->Push( pnode ); +} + +void wxObjectXmlWriter::DoEndWriteProperty(const wxPropertyInfo *WXUNUSED(propInfo) ) +{ + m_data->Pop(); +} + +void wxObjectXmlWriter::DoWriteRepeatedObject( int objectID ) +{ + wxXmlNode *pnode; + pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object")); + pnode->AddProperty(wxString(wxT("href")), wxString::Format( wxT("%d"), objectID ) ); + m_data->m_current->AddChild(pnode); +} + +void wxObjectXmlWriter::DoWriteNullObject() +{ + wxXmlNode *pnode; + pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object")); + m_data->m_current->AddChild(pnode); +} + +void wxObjectXmlWriter::DoWriteDelegate( const wxObject *WXUNUSED(object), + const wxClassInfo* WXUNUSED(classInfo), + const wxPropertyInfo *WXUNUSED(pi), + const wxObject *eventSink, int sinkObjectID, + const wxClassInfo* WXUNUSED(eventSinkClassInfo), + const wxHandlerInfo* handlerInfo ) +{ + if ( eventSink != NULL && handlerInfo != NULL ) + { + wxXmlAddContentToNode( m_data->m_current, + wxString::Format(wxT("%d.%s"), sinkObjectID, handlerInfo->GetName().c_str()) ); + } +} + + +// ---------------------------------------------------------------------------- +// wxObjectXmlReader +// ---------------------------------------------------------------------------- + +/* +Reading components has not to be extended for components +as properties are always sought by typeinfo over all levels +and create params are always toplevel class only +*/ + +int wxObjectXmlReader::ReadComponent(wxXmlNode *node, wxObjectReaderCallback *callbacks) +{ + wxASSERT_MSG( callbacks, wxT("Does not support reading without a Depersistor") ); + wxString className; + wxClassInfo *classInfo; + + wxAny *createParams; + int *createParamOids; + const wxClassInfo** createClassInfos; + wxXmlNode *children; + int objectID; + wxString ObjectIdString; + + children = node->GetChildren(); + if (!children) + { + // check for a null object or href + if (node->GetAttribute(wxT("href"), &ObjectIdString ) ) + { + objectID = atoi( ObjectIdString.ToAscii() ); + if ( HasObjectClassInfo( objectID ) ) + { + return objectID; + } + else + { + wxLogError( _("Forward hrefs are not supported") ); + return wxInvalidObjectID; + } + } + if ( !node->GetAttribute(wxT("id"), &ObjectIdString ) ) + { + return wxNullObjectID; + } + } + if (!node->GetAttribute(wxT("class"), &className)) + { + // No class name. Eek. FIXME: error handling + return wxInvalidObjectID; + } + + classInfo = wxClassInfo::FindClass(className); + if ( classInfo == NULL ) + { + wxLogError( wxString::Format(_("unknown class %s"),className ) ); + return wxInvalidObjectID; + } + + if ( children != NULL && children->GetType() == wxXML_TEXT_NODE ) + { + wxLogError(_("objects cannot have XML Text Nodes") ); + return wxInvalidObjectID; + } + if (!node->GetAttribute(wxT("id"), &ObjectIdString)) + { + wxLogError(_("Objects must have an id attribute") ); + // No object id. Eek. FIXME: error handling + return wxInvalidObjectID; + } + objectID = atoi( ObjectIdString.ToAscii() ); + + // is this object already has been streamed in, return it here + if ( HasObjectClassInfo( objectID ) ) + { + wxLogError ( wxString::Format(_("Doubly used id : %d"), objectID ) ); + return wxInvalidObjectID; + } + + // new object, start with allocation + // first make the object know to our internal registry + SetObjectClassInfo( objectID, classInfo ); + + wxStringToAnyHashMap metadata; + wxXmlProperty *xp = node->GetAttributes(); + while ( xp ) + { + if ( xp->GetName() != wxString(wxT("class")) && + xp->GetName() != wxString(wxT("id")) ) + { + metadata[xp->GetName()] = wxAny( xp->GetValue() ); + } + xp = xp->GetNext(); + } + if ( !classInfo->NeedsDirectConstruction() ) + callbacks->AllocateObject(objectID, classInfo, metadata); + + // + // stream back the Create parameters first + createParams = new wxAny[ classInfo->GetCreateParamCount() ]; + createParamOids = new int[classInfo->GetCreateParamCount() ]; + createClassInfos = new const wxClassInfo*[classInfo->GetCreateParamCount() ]; + +#if wxUSE_UNICODE + typedef map PropertyNodes; + typedef vector PropertyNames; +#else + typedef map PropertyNodes; + typedef vector PropertyNames; +#endif + PropertyNodes propertyNodes; + PropertyNames propertyNames; + + while( children ) + { + wxString name; + children->GetAttribute( wxT("name"), &name ); + propertyNames.push_back( (const wxChar*)name.c_str() ); + propertyNodes[(const wxChar*)name.c_str()] = children->GetChildren(); + children = children->GetNext(); + } + + for ( int i = 0; i GetCreateParamCount(); ++i ) + { + const wxChar* paramName = classInfo->GetCreateParamName(i); + PropertyNodes::iterator propiter = propertyNodes.find( paramName ); + const wxPropertyInfo* pi = classInfo->FindPropertyInfo( paramName ); + if ( pi == 0 ) + { + wxLogError( wxString::Format(_("Unknown Property %s"),paramName) ); + } + // if we don't have the value of a create param set in the xml + // we use the default value + if ( propiter != propertyNodes.end() ) + { + wxXmlNode* prop = propiter->second; + if ( pi->GetTypeInfo()->IsObjectType() ) + { + createParamOids[i] = ReadComponent( prop, callbacks ); + createClassInfos[i] = + wx_dynamic_cast(const wxClassTypeInfo*, pi->GetTypeInfo())->GetClassInfo(); + } + else + { + createParamOids[i] = wxInvalidObjectID; + createParams[i] = ReadValue( prop, pi->GetTypeInfo() ); + if( pi->GetFlags() & wxPROP_ENUM_STORE_LONG ) + { + const wxEnumTypeInfo *eti = + wx_dynamic_cast(const wxEnumTypeInfo*, pi->GetTypeInfo() ); + if ( eti ) + { + long realval; + eti->ConvertToLong( createParams[i], realval ); + createParams[i] = wxAny( realval ); + } + else + { + wxLogError( _("Type must have enum - long conversion") ); + } + } + createClassInfos[i] = NULL; + } + + for ( size_t j = 0; j < propertyNames.size(); ++j ) + { + if ( propertyNames[j] == paramName ) + { + propertyNames[j] = wxEmptyString; + break; + } + } + } + else + { + if ( pi->GetTypeInfo()->IsObjectType() ) + { + createParamOids[i] = wxNullObjectID; + createClassInfos[i] = + wx_dynamic_cast(const wxClassTypeInfo*, pi->GetTypeInfo())->GetClassInfo(); + } + else + { + createParams[i] = pi->GetDefaultValue(); + createParamOids[i] = wxInvalidObjectID; + } + } + } + + // got the parameters. Call the Create method + if ( classInfo->NeedsDirectConstruction() ) + callbacks->ConstructObject(objectID, classInfo, + classInfo->GetCreateParamCount(), + createParams, createParamOids, createClassInfos, metadata ); + else + callbacks->CreateObject(objectID, classInfo, + classInfo->GetCreateParamCount(), + createParams, createParamOids, createClassInfos, metadata ); + + // now stream in the rest of the properties, in the sequence their + // properties were written in the xml + for ( size_t j = 0; j < propertyNames.size(); ++j ) + { + if ( !propertyNames[j].empty() ) + { + PropertyNodes::iterator propiter = propertyNodes.find( propertyNames[j] ); + if ( propiter != propertyNodes.end() ) + { + wxXmlNode* prop = propiter->second; + const wxPropertyInfo* pi = + classInfo->FindPropertyInfo( propertyNames[j].c_str() ); + if ( pi->GetTypeInfo()->GetKind() == wxT_COLLECTION ) + { + const wxCollectionTypeInfo* collType = + wx_dynamic_cast( const wxCollectionTypeInfo*, pi->GetTypeInfo() ); + const wxTypeInfo * elementType = collType->GetElementType(); + while( prop ) + { + if ( prop->GetName() != wxT("element") ) + { + wxLogError( _("A non empty collection must consist of 'element' nodes" ) ); + break; + } + + wxXmlNode* elementContent = prop->GetChildren(); + if ( elementContent ) + { + // we skip empty elements + if ( elementType->IsObjectType() ) + { + int valueId = ReadComponent( elementContent, callbacks ); + if ( valueId != wxInvalidObjectID ) + { + if ( pi->GetAccessor()->HasAdder() ) + callbacks->AddToPropertyCollectionAsObject( objectID, classInfo, pi, valueId ); + // TODO for collections we must have a notation on taking over ownership or not + if ( elementType->GetKind() == wxT_OBJECT && valueId != wxNullObjectID ) + callbacks->DestroyObject( valueId, GetObjectClassInfo( valueId ) ); + } + } + else + { + wxAny elementValue = ReadValue( elementContent, elementType ); + if ( pi->GetAccessor()->HasAdder() ) + callbacks->AddToPropertyCollection( objectID, classInfo,pi, elementValue ); + } + } + prop = prop->GetNext(); + } + } + else if ( pi->GetTypeInfo()->IsObjectType() ) + { + // and object can either be streamed out a string or as an object + // in case we have no node, then the object's streaming out has been vetoed + if ( prop ) + { + if ( prop->GetName() == wxT("object") ) + { + int valueId = ReadComponent( prop, callbacks ); + if ( valueId != wxInvalidObjectID ) + { + callbacks->SetPropertyAsObject( objectID, classInfo, pi, valueId ); + if ( pi->GetTypeInfo()->GetKind() == wxT_OBJECT && valueId != wxNullObjectID ) + callbacks->DestroyObject( valueId, GetObjectClassInfo( valueId ) ); + } + } + else + { + wxASSERT( pi->GetTypeInfo()->HasStringConverters() ); + wxAny nodeval = ReadValue( prop, pi->GetTypeInfo() ); + callbacks->SetProperty( objectID, classInfo,pi, nodeval ); + } + } + } + else if ( pi->GetTypeInfo()->IsDelegateType() ) + { + if ( prop ) + { + wxString resstring = prop->GetContent(); + wxInt32 pos = resstring.Find('.'); + if ( pos != wxNOT_FOUND ) + { + int sinkOid = atol(resstring.Left(pos).ToAscii()); + wxString handlerName = resstring.Mid(pos+1); + wxClassInfo* sinkClassInfo = GetObjectClassInfo( sinkOid ); + + callbacks->SetConnect( objectID, classInfo, pi, sinkClassInfo, + sinkClassInfo->FindHandlerInfo(handlerName.c_str()), sinkOid ); + } + else + { + wxLogError( _("incorrect event handler string, missing dot") ); + } + } + + } + else + { + wxAny nodeval = ReadValue( prop, pi->GetTypeInfo() ); + if( pi->GetFlags() & wxPROP_ENUM_STORE_LONG ) + { + const wxEnumTypeInfo *eti = + wx_dynamic_cast(const wxEnumTypeInfo*, pi->GetTypeInfo() ); + if ( eti ) + { + long realval; + eti->ConvertToLong( nodeval, realval ); + nodeval = wxAny( realval ); + } + else + { + wxLogError( _("Type must have enum - long conversion") ); + } + } + callbacks->SetProperty( objectID, classInfo,pi, nodeval ); + } + } + } + } + + delete[] createParams; + delete[] createParamOids; + delete[] createClassInfos; + + return objectID; +} + +wxAny wxObjectXmlReader::ReadValue(wxXmlNode *node, + const wxTypeInfo *type ) +{ + wxString content; + if ( node ) + content = node->GetContent(); + wxAny result; + type->ConvertFromString( content, result ); + return result; +} + +int wxObjectXmlReader::ReadObject( const wxString &name, wxObjectReaderCallback *callbacks) +{ + wxXmlNode *iter = m_parent->GetChildren(); + while ( iter ) + { + wxString entryName; + if ( iter->GetAttribute(wxT("name"), &entryName) ) + { + if ( entryName == name ) + return ReadComponent( iter->GetChildren(), callbacks ); + } + iter = iter->GetNext(); + } + return wxInvalidObjectID; +} + +#endif // wxUSE_EXTENDED_RTTI diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/zipstrm.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/zipstrm.cpp new file mode 100644 index 0000000000..07b526d15f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/zipstrm.cpp @@ -0,0 +1,2438 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/common/zipstrm.cpp +// Purpose: Streams for Zip files +// Author: Mike Wetherell +// Copyright: (c) Mike Wetherell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ZIPSTREAM + +#include "wx/zipstrm.h" + +#ifndef WX_PRECOMP + #include "wx/hashmap.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" +#endif + +#include "wx/datstrm.h" +#include "wx/zstream.h" +#include "wx/mstream.h" +#include "wx/scopedptr.h" +#include "wx/wfstream.h" +#include "zlib.h" + +// value for the 'version needed to extract' field (20 means 2.0) +enum { + VERSION_NEEDED_TO_EXTRACT = 20 +}; + +// signatures for the various records (PKxx) +enum { + CENTRAL_MAGIC = 0x02014b50, // central directory record + LOCAL_MAGIC = 0x04034b50, // local header + END_MAGIC = 0x06054b50, // end of central directory record + SUMS_MAGIC = 0x08074b50 // data descriptor (info-zip) +}; + +// unix file attributes. zip stores them in the high 16 bits of the +// 'external attributes' field, hence the extra zeros. +enum { + wxZIP_S_IFMT = 0xF0000000, + wxZIP_S_IFDIR = 0x40000000, + wxZIP_S_IFREG = 0x80000000 +}; + +// minimum sizes for the various records +enum { + CENTRAL_SIZE = 46, + LOCAL_SIZE = 30, + END_SIZE = 22, + SUMS_SIZE = 12 +}; + +// The number of bytes that must be written to an wxZipOutputStream before +// a zip entry is created. The purpose of this latency is so that +// OpenCompressor() can see a little data before deciding which compressor +// it should use. +enum { + OUTPUT_LATENCY = 4096 +}; + +// Some offsets into the local header +enum { + SUMS_OFFSET = 14 +}; + +IMPLEMENT_DYNAMIC_CLASS(wxZipEntry, wxArchiveEntry) +IMPLEMENT_DYNAMIC_CLASS(wxZipClassFactory, wxArchiveClassFactory) + + +///////////////////////////////////////////////////////////////////////////// +// Helpers + +// read a string of a given length +// +static wxString ReadString(wxInputStream& stream, wxUint16 len, wxMBConv& conv) +{ + if (len == 0) + return wxEmptyString; + +#if wxUSE_UNICODE + wxCharBuffer buf(len); + stream.Read(buf.data(), len); + wxString str(buf, conv); +#else + wxString str; + (void)conv; + { + wxStringBuffer buf(str, len); + stream.Read(buf, len); + } +#endif + + return str; +} + +// Decode a little endian wxUint32 number from a character array +// +static inline wxUint32 CrackUint32(const char *m) +{ + const unsigned char *n = (const unsigned char*)m; + return (n[3] << 24) | (n[2] << 16) | (n[1] << 8) | n[0]; +} + +// Decode a little endian wxUint16 number from a character array +// +static inline wxUint16 CrackUint16(const char *m) +{ + const unsigned char *n = (const unsigned char*)m; + return (n[1] << 8) | n[0]; +} + +// Temporarily lower the logging level in debug mode to avoid a warning +// from SeekI about seeking on a stream with data written back to it. +// +static wxFileOffset QuietSeek(wxInputStream& stream, wxFileOffset pos) +{ +#if wxUSE_LOG + wxLogLevel level = wxLog::GetLogLevel(); + wxLog::SetLogLevel(wxLOG_Debug - 1); + wxFileOffset result = stream.SeekI(pos); + wxLog::SetLogLevel(level); + return result; +#else + return stream.SeekI(pos); +#endif +} + + +///////////////////////////////////////////////////////////////////////////// +// Class factory + +static wxZipClassFactory g_wxZipClassFactory; + +wxZipClassFactory::wxZipClassFactory() +{ + if (this == &g_wxZipClassFactory) + PushFront(); +} + +const wxChar * const * +wxZipClassFactory::GetProtocols(wxStreamProtocolType type) const +{ + static const wxChar *protocols[] = { wxT("zip"), NULL }; + static const wxChar *mimetypes[] = { wxT("application/zip"), NULL }; + static const wxChar *fileexts[] = { wxT(".zip"), wxT(".htb"), NULL }; + static const wxChar *empty[] = { NULL }; + + switch (type) { + case wxSTREAM_PROTOCOL: return protocols; + case wxSTREAM_MIMETYPE: return mimetypes; + case wxSTREAM_FILEEXT: return fileexts; + default: return empty; + } +} + + +///////////////////////////////////////////////////////////////////////////// +// Read a zip header + +class wxZipHeader +{ +public: + wxZipHeader(wxInputStream& stream, size_t size); + + inline wxUint8 Read8(); + inline wxUint16 Read16(); + inline wxUint32 Read32(); + + const char *GetData() const { return m_data; } + size_t GetSize() const { return m_size; } + operator bool() const { return m_ok; } + + size_t Seek(size_t pos) { m_pos = pos; return m_pos; } + size_t Skip(size_t size) { m_pos += size; return m_pos; } + + wxZipHeader& operator>>(wxUint8& n) { n = Read8(); return *this; } + wxZipHeader& operator>>(wxUint16& n) { n = Read16(); return *this; } + wxZipHeader& operator>>(wxUint32& n) { n = Read32(); return *this; } + +private: + char m_data[64]; + size_t m_size; + size_t m_pos; + bool m_ok; +}; + +wxZipHeader::wxZipHeader(wxInputStream& stream, size_t size) + : m_size(0), + m_pos(0), + m_ok(false) +{ + wxCHECK_RET(size <= sizeof(m_data), wxT("buffer too small")); + m_size = stream.Read(m_data, size).LastRead(); + m_ok = m_size == size; +} + +inline wxUint8 wxZipHeader::Read8() +{ + wxASSERT(m_pos < m_size); + return m_data[m_pos++]; +} + +inline wxUint16 wxZipHeader::Read16() +{ + wxASSERT(m_pos + 2 <= m_size); + wxUint16 n = CrackUint16(m_data + m_pos); + m_pos += 2; + return n; +} + +inline wxUint32 wxZipHeader::Read32() +{ + wxASSERT(m_pos + 4 <= m_size); + wxUint32 n = CrackUint32(m_data + m_pos); + m_pos += 4; + return n; +} + + +///////////////////////////////////////////////////////////////////////////// +// Stored input stream +// Trival decompressor for files which are 'stored' in the zip file. + +class wxStoredInputStream : public wxFilterInputStream +{ +public: + wxStoredInputStream(wxInputStream& stream); + + void Open(wxFileOffset len) { Close(); m_len = len; } + void Close() { m_pos = 0; m_lasterror = wxSTREAM_NO_ERROR; } + + virtual char Peek() { return wxInputStream::Peek(); } + virtual wxFileOffset GetLength() const { return m_len; } + +protected: + virtual size_t OnSysRead(void *buffer, size_t size); + virtual wxFileOffset OnSysTell() const { return m_pos; } + +private: + wxFileOffset m_pos; + wxFileOffset m_len; + + wxDECLARE_NO_COPY_CLASS(wxStoredInputStream); +}; + +wxStoredInputStream::wxStoredInputStream(wxInputStream& stream) + : wxFilterInputStream(stream), + m_pos(0), + m_len(0) +{ +} + +size_t wxStoredInputStream::OnSysRead(void *buffer, size_t size) +{ + size_t count = wx_truncate_cast(size_t, + wxMin(size + wxFileOffset(0), m_len - m_pos + size_t(0))); + count = m_parent_i_stream->Read(buffer, count).LastRead(); + m_pos += count; + + if (count < size) + m_lasterror = m_pos == m_len ? wxSTREAM_EOF : wxSTREAM_READ_ERROR; + + return count; +} + + +///////////////////////////////////////////////////////////////////////////// +// Stored output stream +// Trival compressor for files which are 'stored' in the zip file. + +class wxStoredOutputStream : public wxFilterOutputStream +{ +public: + wxStoredOutputStream(wxOutputStream& stream) : + wxFilterOutputStream(stream), m_pos(0) { } + + bool Close() { + m_pos = 0; + m_lasterror = wxSTREAM_NO_ERROR; + return true; + } + +protected: + virtual size_t OnSysWrite(const void *buffer, size_t size); + virtual wxFileOffset OnSysTell() const { return m_pos; } + +private: + wxFileOffset m_pos; + wxDECLARE_NO_COPY_CLASS(wxStoredOutputStream); +}; + +size_t wxStoredOutputStream::OnSysWrite(const void *buffer, size_t size) +{ + if (!IsOk() || !size) + return 0; + size_t count = m_parent_o_stream->Write(buffer, size).LastWrite(); + if (count != size) + m_lasterror = wxSTREAM_WRITE_ERROR; + m_pos += count; + return count; +} + + +///////////////////////////////////////////////////////////////////////////// +// wxRawInputStream +// +// Used to handle the unusal case of raw copying an entry of unknown +// length. This can only happen when the zip being copied from is being +// read from a non-seekable stream, and also was original written to a +// non-seekable stream. +// +// In this case there's no option but to decompress the stream to find +// it's length, but we can still write the raw compressed data to avoid the +// compression overhead (which is the greater one). +// +// Usage is like this: +// m_rawin = new wxRawInputStream(*m_parent_i_stream); +// m_decomp = m_rawin->Open(OpenDecompressor(m_rawin->GetTee())); +// +// The wxRawInputStream owns a wxTeeInputStream object, the role of which +// is something like the unix 'tee' command; it is a transparent filter, but +// allows the data read to be read a second time via an extra method 'GetData'. +// +// The wxRawInputStream then draws data through the tee using a decompressor +// then instead of returning the decompressed data, retuns the raw data +// from wxTeeInputStream::GetData(). + +class wxTeeInputStream : public wxFilterInputStream +{ +public: + wxTeeInputStream(wxInputStream& stream); + + size_t GetCount() const { return m_end - m_start; } + size_t GetData(char *buffer, size_t size); + + void Open(); + bool Final(); + + wxInputStream& Read(void *buffer, size_t size); + +protected: + virtual size_t OnSysRead(void *buffer, size_t size); + virtual wxFileOffset OnSysTell() const { return m_pos; } + +private: + wxFileOffset m_pos; + wxMemoryBuffer m_buf; + size_t m_start; + size_t m_end; + + wxDECLARE_NO_COPY_CLASS(wxTeeInputStream); +}; + +wxTeeInputStream::wxTeeInputStream(wxInputStream& stream) + : wxFilterInputStream(stream), + m_pos(0), m_buf(8192), m_start(0), m_end(0) +{ +} + +void wxTeeInputStream::Open() +{ + m_pos = m_start = m_end = 0; + m_lasterror = wxSTREAM_NO_ERROR; +} + +bool wxTeeInputStream::Final() +{ + bool final = m_end == m_buf.GetDataLen(); + m_end = m_buf.GetDataLen(); + return final; +} + +wxInputStream& wxTeeInputStream::Read(void *buffer, size_t size) +{ + size_t count = wxInputStream::Read(buffer, size).LastRead(); + m_end = m_buf.GetDataLen(); + m_buf.AppendData(buffer, count); + return *this; +} + +size_t wxTeeInputStream::OnSysRead(void *buffer, size_t size) +{ + size_t count = m_parent_i_stream->Read(buffer, size).LastRead(); + if (count < size) + m_lasterror = m_parent_i_stream->GetLastError(); + return count; +} + +size_t wxTeeInputStream::GetData(char *buffer, size_t size) +{ + if (m_wbacksize) { + size_t len = m_buf.GetDataLen(); + len = len > m_wbacksize ? len - m_wbacksize : 0; + m_buf.SetDataLen(len); + if (m_end > len) { + wxFAIL; // we've already returned data that's now being ungot + m_end = len; + } + m_parent_i_stream->Reset(); + m_parent_i_stream->Ungetch(m_wback, m_wbacksize); + free(m_wback); + m_wback = NULL; + m_wbacksize = 0; + m_wbackcur = 0; + } + + if (size > GetCount()) + size = GetCount(); + if (size) { + memcpy(buffer, m_buf + m_start, size); + m_start += size; + wxASSERT(m_start <= m_end); + } + + if (m_start == m_end && m_start > 0 && m_buf.GetDataLen() > 0) { + size_t len = m_buf.GetDataLen(); + char *buf = (char*)m_buf.GetWriteBuf(len); + len -= m_end; + memmove(buf, buf + m_end, len); + m_buf.UngetWriteBuf(len); + m_start = m_end = 0; + } + + return size; +} + +class wxRawInputStream : public wxFilterInputStream +{ +public: + wxRawInputStream(wxInputStream& stream); + virtual ~wxRawInputStream() { delete m_tee; } + + wxInputStream* Open(wxInputStream *decomp); + wxInputStream& GetTee() const { return *m_tee; } + +protected: + virtual size_t OnSysRead(void *buffer, size_t size); + virtual wxFileOffset OnSysTell() const { return m_pos; } + +private: + wxFileOffset m_pos; + wxTeeInputStream *m_tee; + + enum { BUFSIZE = 8192 }; + wxCharBuffer m_dummy; + + wxDECLARE_NO_COPY_CLASS(wxRawInputStream); +}; + +wxRawInputStream::wxRawInputStream(wxInputStream& stream) + : wxFilterInputStream(stream), + m_pos(0), + m_tee(new wxTeeInputStream(stream)), + m_dummy(BUFSIZE) +{ +} + +wxInputStream *wxRawInputStream::Open(wxInputStream *decomp) +{ + if (decomp) { + m_parent_i_stream = decomp; + m_pos = 0; + m_lasterror = wxSTREAM_NO_ERROR; + m_tee->Open(); + return this; + } else { + return NULL; + } +} + +size_t wxRawInputStream::OnSysRead(void *buffer, size_t size) +{ + char *buf = (char*)buffer; + size_t count = 0; + + while (count < size && IsOk()) + { + while (m_parent_i_stream->IsOk() && m_tee->GetCount() == 0) + m_parent_i_stream->Read(m_dummy.data(), BUFSIZE); + + size_t n = m_tee->GetData(buf + count, size - count); + count += n; + + if (n == 0 && m_tee->Final()) + m_lasterror = m_parent_i_stream->GetLastError(); + } + + m_pos += count; + return count; +} + + +///////////////////////////////////////////////////////////////////////////// +// Zlib streams than can be reused without recreating. + +class wxZlibOutputStream2 : public wxZlibOutputStream +{ +public: + wxZlibOutputStream2(wxOutputStream& stream, int level) : + wxZlibOutputStream(stream, level, wxZLIB_NO_HEADER) { } + + bool Open(wxOutputStream& stream); + bool Close() { DoFlush(true); m_pos = wxInvalidOffset; return IsOk(); } +}; + +bool wxZlibOutputStream2::Open(wxOutputStream& stream) +{ + wxCHECK(m_pos == wxInvalidOffset, false); + + m_deflate->next_out = m_z_buffer; + m_deflate->avail_out = m_z_size; + m_pos = 0; + m_lasterror = wxSTREAM_NO_ERROR; + m_parent_o_stream = &stream; + + if (deflateReset(m_deflate) != Z_OK) { + wxLogError(_("can't re-initialize zlib deflate stream")); + m_lasterror = wxSTREAM_WRITE_ERROR; + return false; + } + + return true; +} + +class wxZlibInputStream2 : public wxZlibInputStream +{ +public: + wxZlibInputStream2(wxInputStream& stream) : + wxZlibInputStream(stream, wxZLIB_NO_HEADER) { } + + bool Open(wxInputStream& stream); +}; + +bool wxZlibInputStream2::Open(wxInputStream& stream) +{ + m_inflate->avail_in = 0; + m_pos = 0; + m_lasterror = wxSTREAM_NO_ERROR; + m_parent_i_stream = &stream; + + if (inflateReset(m_inflate) != Z_OK) { + wxLogError(_("can't re-initialize zlib inflate stream")); + m_lasterror = wxSTREAM_READ_ERROR; + return false; + } + + return true; +} + + +///////////////////////////////////////////////////////////////////////////// +// Class to hold wxZipEntry's Extra and LocalExtra fields + +class wxZipMemory +{ +public: + wxZipMemory() : m_data(NULL), m_size(0), m_capacity(0), m_ref(1) { } + + wxZipMemory *AddRef() { m_ref++; return this; } + void Release() { if (--m_ref == 0) delete this; } + + char *GetData() const { return m_data; } + size_t GetSize() const { return m_size; } + size_t GetCapacity() const { return m_capacity; } + + wxZipMemory *Unique(size_t size); + +private: + ~wxZipMemory() { delete [] m_data; } + + char *m_data; + size_t m_size; + size_t m_capacity; + int m_ref; + + wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(wxZipMemory) +}; + +wxZipMemory *wxZipMemory::Unique(size_t size) +{ + wxZipMemory *zm; + + if (m_ref > 1) { + --m_ref; + zm = new wxZipMemory; + } else { + zm = this; + } + + if (zm->m_capacity < size) { + delete [] zm->m_data; + zm->m_data = new char[size]; + zm->m_capacity = size; + } + + zm->m_size = size; + return zm; +} + +static inline wxZipMemory *AddRef(wxZipMemory *zm) +{ + if (zm) + zm->AddRef(); + return zm; +} + +static inline void Release(wxZipMemory *zm) +{ + if (zm) + zm->Release(); +} + +static void Copy(wxZipMemory*& dest, wxZipMemory *src) +{ + Release(dest); + dest = AddRef(src); +} + +static void Unique(wxZipMemory*& zm, size_t size) +{ + if (!zm && size) + zm = new wxZipMemory; + if (zm) + zm = zm->Unique(size); +} + + +///////////////////////////////////////////////////////////////////////////// +// Collection of weak references to entries + +WX_DECLARE_HASH_MAP(long, wxZipEntry*, wxIntegerHash, + wxIntegerEqual, wxOffsetZipEntryMap_); + +class wxZipWeakLinks +{ +public: + wxZipWeakLinks() : m_ref(1) { } + + void Release(const wxZipInputStream* WXUNUSED(x)) + { if (--m_ref == 0) delete this; } + void Release(wxFileOffset key) + { RemoveEntry(key); if (--m_ref == 0) delete this; } + + wxZipWeakLinks *AddEntry(wxZipEntry *entry, wxFileOffset key); + void RemoveEntry(wxFileOffset key) + { m_entries.erase(wx_truncate_cast(key_type, key)); } + wxZipEntry *GetEntry(wxFileOffset key) const; + bool IsEmpty() const { return m_entries.empty(); } + +private: + ~wxZipWeakLinks() { wxASSERT(IsEmpty()); } + + typedef wxOffsetZipEntryMap_::key_type key_type; + + int m_ref; + wxOffsetZipEntryMap_ m_entries; + + wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(wxZipWeakLinks) +}; + +wxZipWeakLinks *wxZipWeakLinks::AddEntry(wxZipEntry *entry, wxFileOffset key) +{ + m_entries[wx_truncate_cast(key_type, key)] = entry; + m_ref++; + return this; +} + +wxZipEntry *wxZipWeakLinks::GetEntry(wxFileOffset key) const +{ + wxOffsetZipEntryMap_::const_iterator it = + m_entries.find(wx_truncate_cast(key_type, key)); + return it != m_entries.end() ? it->second : NULL; +} + + +///////////////////////////////////////////////////////////////////////////// +// ZipEntry + +wxZipEntry::wxZipEntry( + const wxString& name /*=wxEmptyString*/, + const wxDateTime& dt /*=wxDateTime::Now()*/, + wxFileOffset size /*=wxInvalidOffset*/) + : + m_SystemMadeBy(wxZIP_SYSTEM_MSDOS), + m_VersionMadeBy(wxMAJOR_VERSION * 10 + wxMINOR_VERSION), + m_VersionNeeded(VERSION_NEEDED_TO_EXTRACT), + m_Flags(0), + m_Method(wxZIP_METHOD_DEFAULT), + m_DateTime(dt), + m_Crc(0), + m_CompressedSize(wxInvalidOffset), + m_Size(size), + m_Key(wxInvalidOffset), + m_Offset(wxInvalidOffset), + m_DiskStart(0), + m_InternalAttributes(0), + m_ExternalAttributes(0), + m_Extra(NULL), + m_LocalExtra(NULL), + m_zipnotifier(NULL), + m_backlink(NULL) +{ + if (!name.empty()) + SetName(name); +} + +wxZipEntry::~wxZipEntry() +{ + if (m_backlink) + m_backlink->Release(m_Key); + Release(m_Extra); + Release(m_LocalExtra); +} + +wxZipEntry::wxZipEntry(const wxZipEntry& e) + : wxArchiveEntry(e), + m_SystemMadeBy(e.m_SystemMadeBy), + m_VersionMadeBy(e.m_VersionMadeBy), + m_VersionNeeded(e.m_VersionNeeded), + m_Flags(e.m_Flags), + m_Method(e.m_Method), + m_DateTime(e.m_DateTime), + m_Crc(e.m_Crc), + m_CompressedSize(e.m_CompressedSize), + m_Size(e.m_Size), + m_Name(e.m_Name), + m_Key(e.m_Key), + m_Offset(e.m_Offset), + m_Comment(e.m_Comment), + m_DiskStart(e.m_DiskStart), + m_InternalAttributes(e.m_InternalAttributes), + m_ExternalAttributes(e.m_ExternalAttributes), + m_Extra(AddRef(e.m_Extra)), + m_LocalExtra(AddRef(e.m_LocalExtra)), + m_zipnotifier(NULL), + m_backlink(NULL) +{ +} + +wxZipEntry& wxZipEntry::operator=(const wxZipEntry& e) +{ + if (&e != this) { + m_SystemMadeBy = e.m_SystemMadeBy; + m_VersionMadeBy = e.m_VersionMadeBy; + m_VersionNeeded = e.m_VersionNeeded; + m_Flags = e.m_Flags; + m_Method = e.m_Method; + m_DateTime = e.m_DateTime; + m_Crc = e.m_Crc; + m_CompressedSize = e.m_CompressedSize; + m_Size = e.m_Size; + m_Name = e.m_Name; + m_Key = e.m_Key; + m_Offset = e.m_Offset; + m_Comment = e.m_Comment; + m_DiskStart = e.m_DiskStart; + m_InternalAttributes = e.m_InternalAttributes; + m_ExternalAttributes = e.m_ExternalAttributes; + Copy(m_Extra, e.m_Extra); + Copy(m_LocalExtra, e.m_LocalExtra); + m_zipnotifier = NULL; + if (m_backlink) { + m_backlink->Release(m_Key); + m_backlink = NULL; + } + } + return *this; +} + +wxString wxZipEntry::GetName(wxPathFormat format /*=wxPATH_NATIVE*/) const +{ + bool isDir = IsDir() && !m_Name.empty(); + + // optimisations for common (and easy) cases + switch (wxFileName::GetFormat(format)) { + case wxPATH_DOS: + { + wxString name(isDir ? m_Name + wxT("\\") : m_Name); + for (size_t i = 0; i < name.length(); i++) + if (name[i] == wxT('/')) + name[i] = wxT('\\'); + return name; + } + + case wxPATH_UNIX: + return isDir ? m_Name + wxT("/") : m_Name; + + default: + ; + } + + wxFileName fn; + + if (isDir) + fn.AssignDir(m_Name, wxPATH_UNIX); + else + fn.Assign(m_Name, wxPATH_UNIX); + + return fn.GetFullPath(format); +} + +// Static - Internally tars and zips use forward slashes for the path +// separator, absolute paths aren't allowed, and directory names have a +// trailing slash. This function converts a path into this internal format, +// but without a trailing slash for a directory. +// +wxString wxZipEntry::GetInternalName(const wxString& name, + wxPathFormat format /*=wxPATH_NATIVE*/, + bool *pIsDir /*=NULL*/) +{ + wxString internal; + + if (wxFileName::GetFormat(format) != wxPATH_UNIX) + internal = wxFileName(name, format).GetFullPath(wxPATH_UNIX); + else + internal = name; + + bool isDir = !internal.empty() && internal.Last() == '/'; + if (pIsDir) + *pIsDir = isDir; + if (isDir) + internal.erase(internal.length() - 1); + + while (!internal.empty() && *internal.begin() == '/') + internal.erase(0, 1); + while (!internal.empty() && internal.compare(0, 2, wxT("./")) == 0) + internal.erase(0, 2); + if (internal == wxT(".") || internal == wxT("..")) + internal = wxEmptyString; + + return internal; +} + +void wxZipEntry::SetSystemMadeBy(int system) +{ + int mode = GetMode(); + bool wasUnix = IsMadeByUnix(); + + m_SystemMadeBy = (wxUint8)system; + + if (!wasUnix && IsMadeByUnix()) { + SetIsDir(IsDir()); + SetMode(mode); + } else if (wasUnix && !IsMadeByUnix()) { + m_ExternalAttributes &= 0xffff; + } +} + +void wxZipEntry::SetIsDir(bool isDir /*=true*/) +{ + if (isDir) + m_ExternalAttributes |= wxZIP_A_SUBDIR; + else + m_ExternalAttributes &= ~wxZIP_A_SUBDIR; + + if (IsMadeByUnix()) { + m_ExternalAttributes &= ~wxZIP_S_IFMT; + if (isDir) + m_ExternalAttributes |= wxZIP_S_IFDIR; + else + m_ExternalAttributes |= wxZIP_S_IFREG; + } +} + +// Return unix style permission bits +// +int wxZipEntry::GetMode() const +{ + // return unix permissions if present + if (IsMadeByUnix()) + return (m_ExternalAttributes >> 16) & 0777; + + // otherwise synthesize from the dos attribs + int mode = 0644; + if (m_ExternalAttributes & wxZIP_A_RDONLY) + mode &= ~0200; + if (m_ExternalAttributes & wxZIP_A_SUBDIR) + mode |= 0111; + + return mode; +} + +// Set unix permissions +// +void wxZipEntry::SetMode(int mode) +{ + // Set dos attrib bits to be compatible + if (mode & 0222) + m_ExternalAttributes &= ~wxZIP_A_RDONLY; + else + m_ExternalAttributes |= wxZIP_A_RDONLY; + + // set the actual unix permission bits if the system type allows + if (IsMadeByUnix()) { + m_ExternalAttributes &= ~(0777L << 16); + m_ExternalAttributes |= (mode & 0777L) << 16; + } +} + +const char *wxZipEntry::GetExtra() const +{ + return m_Extra ? m_Extra->GetData() : NULL; +} + +size_t wxZipEntry::GetExtraLen() const +{ + return m_Extra ? m_Extra->GetSize() : 0; +} + +void wxZipEntry::SetExtra(const char *extra, size_t len) +{ + Unique(m_Extra, len); + if (len) + memcpy(m_Extra->GetData(), extra, len); +} + +const char *wxZipEntry::GetLocalExtra() const +{ + return m_LocalExtra ? m_LocalExtra->GetData() : NULL; +} + +size_t wxZipEntry::GetLocalExtraLen() const +{ + return m_LocalExtra ? m_LocalExtra->GetSize() : 0; +} + +void wxZipEntry::SetLocalExtra(const char *extra, size_t len) +{ + Unique(m_LocalExtra, len); + if (len) + memcpy(m_LocalExtra->GetData(), extra, len); +} + +void wxZipEntry::SetNotifier(wxZipNotifier& notifier) +{ + wxArchiveEntry::UnsetNotifier(); + m_zipnotifier = ¬ifier; + m_zipnotifier->OnEntryUpdated(*this); +} + +void wxZipEntry::Notify() +{ + if (m_zipnotifier) + m_zipnotifier->OnEntryUpdated(*this); + else if (GetNotifier()) + GetNotifier()->OnEntryUpdated(*this); +} + +void wxZipEntry::UnsetNotifier() +{ + wxArchiveEntry::UnsetNotifier(); + m_zipnotifier = NULL; +} + +size_t wxZipEntry::ReadLocal(wxInputStream& stream, wxMBConv& conv) +{ + wxUint16 nameLen, extraLen; + wxUint32 compressedSize, size, crc; + + wxZipHeader ds(stream, LOCAL_SIZE - 4); + if (!ds) + return 0; + + ds >> m_VersionNeeded >> m_Flags >> m_Method; + SetDateTime(wxDateTime().SetFromDOS(ds.Read32())); + ds >> crc >> compressedSize >> size >> nameLen >> extraLen; + + bool sumsValid = (m_Flags & wxZIP_SUMS_FOLLOW) == 0; + + if (sumsValid || crc) + m_Crc = crc; + if ((sumsValid || compressedSize) || m_Method == wxZIP_METHOD_STORE) + m_CompressedSize = compressedSize; + if ((sumsValid || size) || m_Method == wxZIP_METHOD_STORE) + m_Size = size; + + SetName(ReadString(stream, nameLen, conv), wxPATH_UNIX); + if (stream.LastRead() != nameLen + 0u) + return 0; + + if (extraLen || GetLocalExtraLen()) { + Unique(m_LocalExtra, extraLen); + if (extraLen) { + stream.Read(m_LocalExtra->GetData(), extraLen); + if (stream.LastRead() != extraLen + 0u) + return 0; + } + } + + return LOCAL_SIZE + nameLen + extraLen; +} + +size_t wxZipEntry::WriteLocal(wxOutputStream& stream, wxMBConv& conv) const +{ + wxString unixName = GetName(wxPATH_UNIX); + const wxWX2MBbuf name_buf = unixName.mb_str(conv); + const char *name = name_buf; + if (!name) name = ""; + wxUint16 nameLen = wx_truncate_cast(wxUint16, strlen(name)); + + wxDataOutputStream ds(stream); + + ds << m_VersionNeeded << m_Flags << m_Method; + ds.Write32(GetDateTime().GetAsDOS()); + + ds.Write32(m_Crc); + ds.Write32(m_CompressedSize != wxInvalidOffset ? + wx_truncate_cast(wxUint32, m_CompressedSize) : 0); + ds.Write32(m_Size != wxInvalidOffset ? + wx_truncate_cast(wxUint32, m_Size) : 0); + + ds << nameLen; + wxUint16 extraLen = wx_truncate_cast(wxUint16, GetLocalExtraLen()); + ds.Write16(extraLen); + + stream.Write(name, nameLen); + if (extraLen) + stream.Write(m_LocalExtra->GetData(), extraLen); + + return LOCAL_SIZE + nameLen + extraLen; +} + +size_t wxZipEntry::ReadCentral(wxInputStream& stream, wxMBConv& conv) +{ + wxUint16 nameLen, extraLen, commentLen; + + wxZipHeader ds(stream, CENTRAL_SIZE - 4); + if (!ds) + return 0; + + ds >> m_VersionMadeBy >> m_SystemMadeBy; + + SetVersionNeeded(ds.Read16()); + SetFlags(ds.Read16()); + SetMethod(ds.Read16()); + SetDateTime(wxDateTime().SetFromDOS(ds.Read32())); + SetCrc(ds.Read32()); + SetCompressedSize(ds.Read32()); + SetSize(ds.Read32()); + + ds >> nameLen >> extraLen >> commentLen + >> m_DiskStart >> m_InternalAttributes >> m_ExternalAttributes; + SetOffset(ds.Read32()); + + SetName(ReadString(stream, nameLen, conv), wxPATH_UNIX); + if (stream.LastRead() != nameLen + 0u) + return 0; + + if (extraLen || GetExtraLen()) { + Unique(m_Extra, extraLen); + if (extraLen) { + stream.Read(m_Extra->GetData(), extraLen); + if (stream.LastRead() != extraLen + 0u) + return 0; + } + } + + if (commentLen) { + m_Comment = ReadString(stream, commentLen, conv); + if (stream.LastRead() != commentLen + 0u) + return 0; + } else { + m_Comment.clear(); + } + + return CENTRAL_SIZE + nameLen + extraLen + commentLen; +} + +size_t wxZipEntry::WriteCentral(wxOutputStream& stream, wxMBConv& conv) const +{ + wxString unixName = GetName(wxPATH_UNIX); + const wxWX2MBbuf name_buf = unixName.mb_str(conv); + const char *name = name_buf; + if (!name) name = ""; + wxUint16 nameLen = wx_truncate_cast(wxUint16, strlen(name)); + + const wxWX2MBbuf comment_buf = m_Comment.mb_str(conv); + const char *comment = comment_buf; + if (!comment) comment = ""; + wxUint16 commentLen = wx_truncate_cast(wxUint16, strlen(comment)); + + wxUint16 extraLen = wx_truncate_cast(wxUint16, GetExtraLen()); + + wxDataOutputStream ds(stream); + + ds << CENTRAL_MAGIC << m_VersionMadeBy << m_SystemMadeBy; + + ds.Write16(wx_truncate_cast(wxUint16, GetVersionNeeded())); + ds.Write16(wx_truncate_cast(wxUint16, GetFlags())); + ds.Write16(wx_truncate_cast(wxUint16, GetMethod())); + ds.Write32(GetDateTime().GetAsDOS()); + ds.Write32(GetCrc()); + ds.Write32(wx_truncate_cast(wxUint32, GetCompressedSize())); + ds.Write32(wx_truncate_cast(wxUint32, GetSize())); + ds.Write16(nameLen); + ds.Write16(extraLen); + + ds << commentLen << m_DiskStart << m_InternalAttributes + << m_ExternalAttributes << wx_truncate_cast(wxUint32, GetOffset()); + + stream.Write(name, nameLen); + if (extraLen) + stream.Write(GetExtra(), extraLen); + stream.Write(comment, commentLen); + + return CENTRAL_SIZE + nameLen + extraLen + commentLen; +} + +// Info-zip prefixes this record with a signature, but pkzip doesn't. So if +// the 1st value is the signature then it is probably an info-zip record, +// though there is a small chance that it is in fact a pkzip record which +// happens to have the signature as it's CRC. +// +size_t wxZipEntry::ReadDescriptor(wxInputStream& stream) +{ + wxZipHeader ds(stream, SUMS_SIZE); + if (!ds) + return 0; + + m_Crc = ds.Read32(); + m_CompressedSize = ds.Read32(); + m_Size = ds.Read32(); + + // if 1st value is the signature then this is probably an info-zip record + if (m_Crc == SUMS_MAGIC) + { + wxZipHeader buf(stream, 8); + wxUint32 u1 = buf.GetSize() >= 4 ? buf.Read32() : (wxUint32)LOCAL_MAGIC; + wxUint32 u2 = buf.GetSize() == 8 ? buf.Read32() : 0; + + // look for the signature of the following record to decide which + if ((u1 == LOCAL_MAGIC || u1 == CENTRAL_MAGIC) && + (u2 != LOCAL_MAGIC && u2 != CENTRAL_MAGIC)) + { + // it's a pkzip style record after all! + if (buf.GetSize() > 0) + stream.Ungetch(buf.GetData(), buf.GetSize()); + } + else + { + // it's an info-zip record as expected + if (buf.GetSize() > 4) + stream.Ungetch(buf.GetData() + 4, buf.GetSize() - 4); + m_Crc = wx_truncate_cast(wxUint32, m_CompressedSize); + m_CompressedSize = m_Size; + m_Size = u1; + return SUMS_SIZE + 4; + } + } + + return SUMS_SIZE; +} + +size_t wxZipEntry::WriteDescriptor(wxOutputStream& stream, wxUint32 crc, + wxFileOffset compressedSize, wxFileOffset size) +{ + m_Crc = crc; + m_CompressedSize = compressedSize; + m_Size = size; + + wxDataOutputStream ds(stream); + + ds.Write32(crc); + ds.Write32(wx_truncate_cast(wxUint32, compressedSize)); + ds.Write32(wx_truncate_cast(wxUint32, size)); + + return SUMS_SIZE; +} + + +///////////////////////////////////////////////////////////////////////////// +// wxZipEndRec - holds the end of central directory record + +class wxZipEndRec +{ +public: + wxZipEndRec(); + + int GetDiskNumber() const { return m_DiskNumber; } + int GetStartDisk() const { return m_StartDisk; } + int GetEntriesHere() const { return m_EntriesHere; } + int GetTotalEntries() const { return m_TotalEntries; } + wxFileOffset GetSize() const { return m_Size; } + wxFileOffset GetOffset() const { return m_Offset; } + wxString GetComment() const { return m_Comment; } + + void SetDiskNumber(int num) + { m_DiskNumber = wx_truncate_cast(wxUint16, num); } + void SetStartDisk(int num) + { m_StartDisk = wx_truncate_cast(wxUint16, num); } + void SetEntriesHere(int num) + { m_EntriesHere = wx_truncate_cast(wxUint16, num); } + void SetTotalEntries(int num) + { m_TotalEntries = wx_truncate_cast(wxUint16, num); } + void SetSize(wxFileOffset size) + { m_Size = wx_truncate_cast(wxUint32, size); } + void SetOffset(wxFileOffset offset) + { m_Offset = wx_truncate_cast(wxUint32, offset); } + void SetComment(const wxString& comment) + { m_Comment = comment; } + + bool Read(wxInputStream& stream, wxMBConv& conv); + bool Write(wxOutputStream& stream, wxMBConv& conv) const; + +private: + wxUint16 m_DiskNumber; + wxUint16 m_StartDisk; + wxUint16 m_EntriesHere; + wxUint16 m_TotalEntries; + wxUint32 m_Size; + wxUint32 m_Offset; + wxString m_Comment; +}; + +wxZipEndRec::wxZipEndRec() + : m_DiskNumber(0), + m_StartDisk(0), + m_EntriesHere(0), + m_TotalEntries(0), + m_Size(0), + m_Offset(0) +{ +} + +bool wxZipEndRec::Write(wxOutputStream& stream, wxMBConv& conv) const +{ + const wxWX2MBbuf comment_buf = m_Comment.mb_str(conv); + const char *comment = comment_buf; + if (!comment) comment = ""; + wxUint16 commentLen = (wxUint16)strlen(comment); + + wxDataOutputStream ds(stream); + + ds << END_MAGIC << m_DiskNumber << m_StartDisk << m_EntriesHere + << m_TotalEntries << m_Size << m_Offset << commentLen; + + stream.Write(comment, commentLen); + + return stream.IsOk(); +} + +bool wxZipEndRec::Read(wxInputStream& stream, wxMBConv& conv) +{ + wxZipHeader ds(stream, END_SIZE - 4); + if (!ds) + return false; + + wxUint16 commentLen; + + ds >> m_DiskNumber >> m_StartDisk >> m_EntriesHere + >> m_TotalEntries >> m_Size >> m_Offset >> commentLen; + + if (commentLen) { + m_Comment = ReadString(stream, commentLen, conv); + if (stream.LastRead() != commentLen + 0u) + return false; + } + + if (m_DiskNumber != 0 || m_StartDisk != 0 || + m_EntriesHere != m_TotalEntries) + { + wxLogWarning(_("assuming this is a multi-part zip concatenated")); + } + + return true; +} + + +///////////////////////////////////////////////////////////////////////////// +// A weak link from an input stream to an output stream + +class wxZipStreamLink +{ +public: + wxZipStreamLink(wxZipOutputStream *stream) : m_ref(1), m_stream(stream) { } + + wxZipStreamLink *AddRef() { m_ref++; return this; } + wxZipOutputStream *GetOutputStream() const { return m_stream; } + + void Release(class wxZipInputStream *WXUNUSED(s)) + { if (--m_ref == 0) delete this; } + void Release(class wxZipOutputStream *WXUNUSED(s)) + { m_stream = NULL; if (--m_ref == 0) delete this; } + +private: + ~wxZipStreamLink() { } + + int m_ref; + wxZipOutputStream *m_stream; + + wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(wxZipStreamLink) +}; + + +///////////////////////////////////////////////////////////////////////////// +// Input stream + +// leave the default wxZipEntryPtr free for users +wxDECLARE_SCOPED_PTR(wxZipEntry, wxZipEntryPtr_) +wxDEFINE_SCOPED_PTR (wxZipEntry, wxZipEntryPtr_) + +// constructor +// +wxZipInputStream::wxZipInputStream(wxInputStream& stream, + wxMBConv& conv /*=wxConvLocal*/) + : wxArchiveInputStream(stream, conv) +{ + Init(); +} + +wxZipInputStream::wxZipInputStream(wxInputStream *stream, + wxMBConv& conv /*=wxConvLocal*/) + : wxArchiveInputStream(stream, conv) +{ + Init(); +} + +#if WXWIN_COMPATIBILITY_2_6 && wxUSE_FFILE + +// Part of the compatibility constructor, which has been made inline to +// avoid a problem with it not being exported by mingw 3.2.3 +// +void wxZipInputStream::Init(const wxString& file) +{ + // no error messages + wxLogNull nolog; + Init(); + m_allowSeeking = true; + wxFFileInputStream *ffile; + ffile = static_cast(m_parent_i_stream); + wxZipEntryPtr_ entry; + + if (ffile->IsOk()) { + do { + entry.reset(GetNextEntry()); + } + while (entry.get() != NULL && entry->GetInternalName() != file); + } + + if (entry.get() == NULL) + m_lasterror = wxSTREAM_READ_ERROR; +} + +wxInputStream* wxZipInputStream::OpenFile(const wxString& archive) +{ + wxLogNull nolog; + return new wxFFileInputStream(archive); +} + +#endif // WXWIN_COMPATIBILITY_2_6 && wxUSE_FFILE + +void wxZipInputStream::Init() +{ + m_store = new wxStoredInputStream(*m_parent_i_stream); + m_inflate = NULL; + m_rawin = NULL; + m_raw = false; + m_headerSize = 0; + m_decomp = NULL; + m_parentSeekable = false; + m_weaklinks = new wxZipWeakLinks; + m_streamlink = NULL; + m_offsetAdjustment = 0; + m_position = wxInvalidOffset; + m_signature = 0; + m_TotalEntries = 0; + m_lasterror = m_parent_i_stream->GetLastError(); +#if WXWIN_COMPATIBILITY_2_6 + m_allowSeeking = false; +#endif +} + +wxZipInputStream::~wxZipInputStream() +{ + CloseDecompressor(m_decomp); + + delete m_store; + delete m_inflate; + delete m_rawin; + + m_weaklinks->Release(this); + + if (m_streamlink) + m_streamlink->Release(this); +} + +wxString wxZipInputStream::GetComment() +{ + if (m_position == wxInvalidOffset) + if (!LoadEndRecord()) + return wxEmptyString; + + if (!m_parentSeekable && Eof() && m_signature) { + m_lasterror = wxSTREAM_NO_ERROR; + m_lasterror = ReadLocal(true); + } + + return m_Comment; +} + +int wxZipInputStream::GetTotalEntries() +{ + if (m_position == wxInvalidOffset) + LoadEndRecord(); + return m_TotalEntries; +} + +wxZipStreamLink *wxZipInputStream::MakeLink(wxZipOutputStream *out) +{ + wxZipStreamLink *link = NULL; + + if (!m_parentSeekable && (IsOpened() || !Eof())) { + link = new wxZipStreamLink(out); + if (m_streamlink) + m_streamlink->Release(this); + m_streamlink = link->AddRef(); + } + + return link; +} + +bool wxZipInputStream::LoadEndRecord() +{ + wxCHECK(m_position == wxInvalidOffset, false); + if (!IsOk()) + return false; + + m_position = 0; + + // First find the end-of-central-directory record. + if (!FindEndRecord()) { + // failed, so either this is a non-seekable stream (ok), or not a zip + if (m_parentSeekable) { + m_lasterror = wxSTREAM_READ_ERROR; + wxLogError(_("invalid zip file")); + return false; + } + else { + wxLogNull nolog; + wxFileOffset pos = m_parent_i_stream->TellI(); + if (pos != wxInvalidOffset) + m_offsetAdjustment = m_position = pos; + return true; + } + } + + wxZipEndRec endrec; + + // Read in the end record + wxFileOffset endPos = m_parent_i_stream->TellI() - 4; + if (!endrec.Read(*m_parent_i_stream, GetConv())) + return false; + + m_TotalEntries = endrec.GetTotalEntries(); + m_Comment = endrec.GetComment(); + + wxUint32 magic = m_TotalEntries ? CENTRAL_MAGIC : END_MAGIC; + + // Now find the central-directory. we have the file offset of + // the CD, so look there first. + if (m_parent_i_stream->SeekI(endrec.GetOffset()) != wxInvalidOffset && + ReadSignature() == magic) { + m_signature = magic; + m_position = endrec.GetOffset(); + m_offsetAdjustment = 0; + return true; + } + + // If it's not there, then it could be that the zip has been appended + // to a self extractor, so take the CD size (also in endrec), subtract + // it from the file offset of the end-central-directory and look there. + if (m_parent_i_stream->SeekI(endPos - endrec.GetSize()) + != wxInvalidOffset && ReadSignature() == magic) { + m_signature = magic; + m_position = endPos - endrec.GetSize(); + m_offsetAdjustment = m_position - endrec.GetOffset(); + return true; + } + + wxLogError(_("can't find central directory in zip")); + m_lasterror = wxSTREAM_READ_ERROR; + return false; +} + +// Find the end-of-central-directory record. +// If found the stream will be positioned just past the 4 signature bytes. +// +bool wxZipInputStream::FindEndRecord() +{ + if (!m_parent_i_stream->IsSeekable()) + return false; + + // usually it's 22 bytes in size and the last thing in the file + { + wxLogNull nolog; + if (m_parent_i_stream->SeekI(-END_SIZE, wxFromEnd) == wxInvalidOffset) + return false; + } + + m_parentSeekable = true; + m_signature = 0; + char magic[4]; + if (m_parent_i_stream->Read(magic, 4).LastRead() != 4) + return false; + if ((m_signature = CrackUint32(magic)) == END_MAGIC) + return true; + + // unfortunately, the record has a comment field that can be up to 65535 + // bytes in length, so if the signature not found then search backwards. + wxFileOffset pos = m_parent_i_stream->TellI(); + const int BUFSIZE = 1024; + wxCharBuffer buf(BUFSIZE); + + memcpy(buf.data(), magic, 3); + wxFileOffset minpos = wxMax(pos - 65535L, 0); + + while (pos > minpos) { + size_t len = wx_truncate_cast(size_t, + pos - wxMax(pos - (BUFSIZE - 3), minpos)); + memcpy(buf.data() + len, buf, 3); + pos -= len; + + if (m_parent_i_stream->SeekI(pos, wxFromStart) == wxInvalidOffset || + m_parent_i_stream->Read(buf.data(), len).LastRead() != len) + return false; + + char *p = buf.data() + len; + + while (p-- > buf.data()) { + if ((m_signature = CrackUint32(p)) == END_MAGIC) { + size_t remainder = buf.data() + len - p; + if (remainder > 4) + m_parent_i_stream->Ungetch(p + 4, remainder - 4); + return true; + } + } + } + + return false; +} + +wxZipEntry *wxZipInputStream::GetNextEntry() +{ + if (m_position == wxInvalidOffset) + if (!LoadEndRecord()) + return NULL; + + m_lasterror = m_parentSeekable ? ReadCentral() : ReadLocal(); + if (!IsOk()) + return NULL; + + wxZipEntryPtr_ entry(new wxZipEntry(m_entry)); + entry->m_backlink = m_weaklinks->AddEntry(entry.get(), entry->GetKey()); + return entry.release(); +} + +wxStreamError wxZipInputStream::ReadCentral() +{ + if (!AtHeader()) + CloseEntry(); + + if (m_signature == END_MAGIC) + return wxSTREAM_EOF; + + if (m_signature != CENTRAL_MAGIC) { + wxLogError(_("error reading zip central directory")); + return wxSTREAM_READ_ERROR; + } + + if (QuietSeek(*m_parent_i_stream, m_position + 4) == wxInvalidOffset) + return wxSTREAM_READ_ERROR; + + size_t size = m_entry.ReadCentral(*m_parent_i_stream, GetConv()); + if (!size) { + m_signature = 0; + return wxSTREAM_READ_ERROR; + } + + m_position += size; + m_signature = ReadSignature(); + + if (m_offsetAdjustment) + m_entry.SetOffset(m_entry.GetOffset() + m_offsetAdjustment); + m_entry.SetKey(m_entry.GetOffset()); + + return wxSTREAM_NO_ERROR; +} + +wxStreamError wxZipInputStream::ReadLocal(bool readEndRec /*=false*/) +{ + if (!AtHeader()) + CloseEntry(); + + if (!m_signature) + m_signature = ReadSignature(); + + if (m_signature == CENTRAL_MAGIC || m_signature == END_MAGIC) { + if (m_streamlink && !m_streamlink->GetOutputStream()) { + m_streamlink->Release(this); + m_streamlink = NULL; + } + } + + while (m_signature == CENTRAL_MAGIC) { + if (m_weaklinks->IsEmpty() && m_streamlink == NULL) + return wxSTREAM_EOF; + + size_t size = m_entry.ReadCentral(*m_parent_i_stream, GetConv()); + m_position += size; + m_signature = 0; + if (!size) + return wxSTREAM_READ_ERROR; + + wxZipEntry *entry = m_weaklinks->GetEntry(m_entry.GetOffset()); + if (entry) { + entry->SetSystemMadeBy(m_entry.GetSystemMadeBy()); + entry->SetVersionMadeBy(m_entry.GetVersionMadeBy()); + entry->SetComment(m_entry.GetComment()); + entry->SetDiskStart(m_entry.GetDiskStart()); + entry->SetInternalAttributes(m_entry.GetInternalAttributes()); + entry->SetExternalAttributes(m_entry.GetExternalAttributes()); + Copy(entry->m_Extra, m_entry.m_Extra); + entry->Notify(); + m_weaklinks->RemoveEntry(entry->GetOffset()); + } + + m_signature = ReadSignature(); + } + + if (m_signature == END_MAGIC) { + if (readEndRec || m_streamlink) { + wxZipEndRec endrec; + endrec.Read(*m_parent_i_stream, GetConv()); + m_Comment = endrec.GetComment(); + m_signature = 0; + if (m_streamlink) { + m_streamlink->GetOutputStream()->SetComment(endrec.GetComment()); + m_streamlink->Release(this); + m_streamlink = NULL; + } + } + return wxSTREAM_EOF; + } + + if (m_signature == LOCAL_MAGIC) { + m_headerSize = m_entry.ReadLocal(*m_parent_i_stream, GetConv()); + m_signature = 0; + m_entry.SetOffset(m_position); + m_entry.SetKey(m_position); + + if (m_headerSize) { + m_TotalEntries++; + return wxSTREAM_NO_ERROR; + } + } + + wxLogError(_("error reading zip local header")); + return wxSTREAM_READ_ERROR; +} + +wxUint32 wxZipInputStream::ReadSignature() +{ + char magic[4]; + m_parent_i_stream->Read(magic, 4); + return m_parent_i_stream->LastRead() == 4 ? CrackUint32(magic) : 0; +} + +bool wxZipInputStream::OpenEntry(wxArchiveEntry& entry) +{ + wxZipEntry *zipEntry = wxStaticCast(&entry, wxZipEntry); + return zipEntry ? OpenEntry(*zipEntry) : false; +} + +// Open an entry +// +bool wxZipInputStream::DoOpen(wxZipEntry *entry, bool raw) +{ + if (m_position == wxInvalidOffset) + if (!LoadEndRecord()) + return false; + if (m_lasterror == wxSTREAM_READ_ERROR) + return false; + if (IsOpened()) + CloseEntry(); + + m_raw = raw; + + if (entry) { + if (AfterHeader() && entry->GetKey() == m_entry.GetOffset()) + return true; + // can only open the current entry on a non-seekable stream + wxCHECK(m_parentSeekable, false); + } + + m_lasterror = wxSTREAM_READ_ERROR; + + if (entry) + m_entry = *entry; + + if (m_parentSeekable) { + if (QuietSeek(*m_parent_i_stream, m_entry.GetOffset()) + == wxInvalidOffset) + return false; + if (ReadSignature() != LOCAL_MAGIC) { + wxLogError(_("bad zipfile offset to entry")); + return false; + } + } + + if (m_parentSeekable || AtHeader()) { + m_headerSize = m_entry.ReadLocal(*m_parent_i_stream, GetConv()); + if (m_headerSize && m_parentSeekable) { + wxZipEntry *ref = m_weaklinks->GetEntry(m_entry.GetKey()); + if (ref) { + Copy(ref->m_LocalExtra, m_entry.m_LocalExtra); + ref->Notify(); + m_weaklinks->RemoveEntry(ref->GetKey()); + } + if (entry && entry != ref) { + Copy(entry->m_LocalExtra, m_entry.m_LocalExtra); + entry->Notify(); + } + } + } + + if (m_headerSize) + m_lasterror = wxSTREAM_NO_ERROR; + return IsOk(); +} + +bool wxZipInputStream::OpenDecompressor(bool raw /*=false*/) +{ + wxASSERT(AfterHeader()); + + wxFileOffset compressedSize = m_entry.GetCompressedSize(); + + if (raw) + m_raw = true; + + if (m_raw) { + if (compressedSize != wxInvalidOffset) { + m_store->Open(compressedSize); + m_decomp = m_store; + } else { + if (!m_rawin) + m_rawin = new wxRawInputStream(*m_parent_i_stream); + m_decomp = m_rawin->Open(OpenDecompressor(m_rawin->GetTee())); + } + } else { + if (compressedSize != wxInvalidOffset && + (m_entry.GetMethod() != wxZIP_METHOD_DEFLATE || + wxZlibInputStream::CanHandleGZip())) { + m_store->Open(compressedSize); + m_decomp = OpenDecompressor(*m_store); + } else { + m_decomp = OpenDecompressor(*m_parent_i_stream); + } + } + + m_crcAccumulator = crc32(0, Z_NULL, 0); + m_lasterror = m_decomp ? m_decomp->GetLastError() : wxSTREAM_READ_ERROR; + return IsOk(); +} + +// Can be overridden to add support for additional decompression methods +// +wxInputStream *wxZipInputStream::OpenDecompressor(wxInputStream& stream) +{ + switch (m_entry.GetMethod()) { + case wxZIP_METHOD_STORE: + if (m_entry.GetSize() == wxInvalidOffset) { + wxLogError(_("stored file length not in Zip header")); + break; + } + m_store->Open(m_entry.GetSize()); + return m_store; + + case wxZIP_METHOD_DEFLATE: + if (!m_inflate) + m_inflate = new wxZlibInputStream2(stream); + else + m_inflate->Open(stream); + return m_inflate; + + default: + wxLogError(_("unsupported Zip compression method")); + } + + return NULL; +} + +bool wxZipInputStream::CloseDecompressor(wxInputStream *decomp) +{ + if (decomp && decomp == m_rawin) + return CloseDecompressor(m_rawin->GetFilterInputStream()); + if (decomp != m_store && decomp != m_inflate) + delete decomp; + return true; +} + +// Closes the current entry and positions the underlying stream at the start +// of the next entry +// +bool wxZipInputStream::CloseEntry() +{ + if (AtHeader()) + return true; + if (m_lasterror == wxSTREAM_READ_ERROR) + return false; + + if (!m_parentSeekable) { + if (!IsOpened() && !OpenDecompressor(true)) + return false; + + const int BUFSIZE = 8192; + wxCharBuffer buf(BUFSIZE); + while (IsOk()) + Read(buf.data(), BUFSIZE); + + m_position += m_headerSize + m_entry.GetCompressedSize(); + } + + if (m_lasterror == wxSTREAM_EOF) + m_lasterror = wxSTREAM_NO_ERROR; + + CloseDecompressor(m_decomp); + m_decomp = NULL; + m_entry = wxZipEntry(); + m_headerSize = 0; + m_raw = false; + + return IsOk(); +} + +size_t wxZipInputStream::OnSysRead(void *buffer, size_t size) +{ + if (!IsOpened()) + if ((AtHeader() && !DoOpen()) || !OpenDecompressor()) + m_lasterror = wxSTREAM_READ_ERROR; + if (!IsOk() || !size) + return 0; + + size_t count = m_decomp->Read(buffer, size).LastRead(); + if (!m_raw) + m_crcAccumulator = crc32(m_crcAccumulator, (Byte*)buffer, count); + if (count < size) + m_lasterror = m_decomp->GetLastError(); + + if (Eof()) { + if ((m_entry.GetFlags() & wxZIP_SUMS_FOLLOW) != 0) { + m_headerSize += m_entry.ReadDescriptor(*m_parent_i_stream); + wxZipEntry *entry = m_weaklinks->GetEntry(m_entry.GetKey()); + + if (entry) { + entry->SetCrc(m_entry.GetCrc()); + entry->SetCompressedSize(m_entry.GetCompressedSize()); + entry->SetSize(m_entry.GetSize()); + entry->Notify(); + } + } + + if (!m_raw) { + m_lasterror = wxSTREAM_READ_ERROR; + + if (m_entry.GetSize() != TellI()) + { + wxLogError(_("reading zip stream (entry %s): bad length"), + m_entry.GetName().c_str()); + } + else if (m_crcAccumulator != m_entry.GetCrc()) + { + wxLogError(_("reading zip stream (entry %s): bad crc"), + m_entry.GetName().c_str()); + } + else + { + m_lasterror = wxSTREAM_EOF; + } + } + } + + return count; +} + +#if WXWIN_COMPATIBILITY_2_6 + +// Borrowed from VS's zip stream (c) 1999 Vaclav Slavik +// +wxFileOffset wxZipInputStream::OnSysSeek(wxFileOffset seek, wxSeekMode mode) +{ + // seeking works when the stream is created with the compatibility + // constructor + if (!m_allowSeeking) + return wxInvalidOffset; + if (!IsOpened()) + if ((AtHeader() && !DoOpen()) || !OpenDecompressor()) + m_lasterror = wxSTREAM_READ_ERROR; + if (!IsOk()) + return wxInvalidOffset; + + // NB: since ZIP files don't natively support seeking, we have to + // implement a brute force workaround -- reading all the data + // between current and the new position (or between beginning of + // the file and new position...) + + wxFileOffset nextpos; + wxFileOffset pos = TellI(); + + switch ( mode ) + { + case wxFromCurrent : nextpos = seek + pos; break; + case wxFromStart : nextpos = seek; break; + case wxFromEnd : nextpos = GetLength() + seek; break; + default : nextpos = pos; break; /* just to fool compiler, never happens */ + } + + wxFileOffset toskip wxDUMMY_INITIALIZE(0); + if ( nextpos >= pos ) + { + toskip = nextpos - pos; + } + else + { + wxZipEntry current(m_entry); + if (!OpenEntry(current)) + { + m_lasterror = wxSTREAM_READ_ERROR; + return pos; + } + toskip = nextpos; + } + + if ( toskip > 0 ) + { + const int BUFSIZE = 4096; + size_t sz; + char buffer[BUFSIZE]; + while ( toskip > 0 ) + { + sz = wx_truncate_cast(size_t, wxMin(toskip, BUFSIZE)); + Read(buffer, sz); + toskip -= sz; + } + } + + pos = nextpos; + return pos; +} + +#endif // WXWIN_COMPATIBILITY_2_6 + + +///////////////////////////////////////////////////////////////////////////// +// Output stream + +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxZipEntryList_) + +wxZipOutputStream::wxZipOutputStream(wxOutputStream& stream, + int level /*=-1*/, + wxMBConv& conv /*=wxConvLocal*/) + : wxArchiveOutputStream(stream, conv) +{ + Init(level); +} + +wxZipOutputStream::wxZipOutputStream(wxOutputStream *stream, + int level /*=-1*/, + wxMBConv& conv /*=wxConvLocal*/) + : wxArchiveOutputStream(stream, conv) +{ + Init(level); +} + +void wxZipOutputStream::Init(int level) +{ + m_store = new wxStoredOutputStream(*m_parent_o_stream); + m_deflate = NULL; + m_backlink = NULL; + m_initialData = new char[OUTPUT_LATENCY]; + m_initialSize = 0; + m_pending = NULL; + m_raw = false; + m_headerOffset = 0; + m_headerSize = 0; + m_entrySize = 0; + m_comp = NULL; + m_level = level; + m_offsetAdjustment = wxInvalidOffset; + m_endrecWritten = false; +} + +wxZipOutputStream::~wxZipOutputStream() +{ + Close(); + WX_CLEAR_LIST(wxZipEntryList_, m_entries); + delete m_store; + delete m_deflate; + delete m_pending; + delete [] m_initialData; + if (m_backlink) + m_backlink->Release(this); +} + +bool wxZipOutputStream::PutNextEntry( + const wxString& name, + const wxDateTime& dt /*=wxDateTime::Now()*/, + wxFileOffset size /*=wxInvalidOffset*/) +{ + return PutNextEntry(new wxZipEntry(name, dt, size)); +} + +bool wxZipOutputStream::PutNextDirEntry( + const wxString& name, + const wxDateTime& dt /*=wxDateTime::Now()*/) +{ + wxZipEntry *entry = new wxZipEntry(name, dt); + entry->SetIsDir(); + return PutNextEntry(entry); +} + +bool wxZipOutputStream::CopyEntry(wxZipEntry *entry, + wxZipInputStream& inputStream) +{ + wxZipEntryPtr_ e(entry); + + return + inputStream.DoOpen(e.get(), true) && + DoCreate(e.release(), true) && + Write(inputStream).IsOk() && inputStream.Eof(); +} + +bool wxZipOutputStream::PutNextEntry(wxArchiveEntry *entry) +{ + wxZipEntry *zipEntry = wxStaticCast(entry, wxZipEntry); + if (!zipEntry) + delete entry; + return PutNextEntry(zipEntry); +} + +bool wxZipOutputStream::CopyEntry(wxArchiveEntry *entry, + wxArchiveInputStream& stream) +{ + wxZipEntry *zipEntry = wxStaticCast(entry, wxZipEntry); + + if (!zipEntry || !stream.OpenEntry(*zipEntry)) { + delete entry; + return false; + } + + return CopyEntry(zipEntry, static_cast(stream)); +} + +bool wxZipOutputStream::CopyArchiveMetaData(wxZipInputStream& inputStream) +{ + m_Comment = inputStream.GetComment(); + if (m_backlink) + m_backlink->Release(this); + m_backlink = inputStream.MakeLink(this); + return true; +} + +bool wxZipOutputStream::CopyArchiveMetaData(wxArchiveInputStream& stream) +{ + return CopyArchiveMetaData(static_cast(stream)); +} + +void wxZipOutputStream::SetLevel(int level) +{ + if (level != m_level) { + if (m_comp != m_deflate) + delete m_deflate; + m_deflate = NULL; + m_level = level; + } +} + +bool wxZipOutputStream::DoCreate(wxZipEntry *entry, bool raw /*=false*/) +{ + CloseEntry(); + + m_pending = entry; + if (!m_pending) + return false; + + // write the signature bytes right away + wxDataOutputStream ds(*m_parent_o_stream); + ds << LOCAL_MAGIC; + + // and if this is the first entry test for seekability + if (m_headerOffset == 0 && m_parent_o_stream->IsSeekable()) { +#if wxUSE_LOG + bool logging = wxLog::IsEnabled(); + wxLogNull nolog; +#endif // wxUSE_LOG + wxFileOffset here = m_parent_o_stream->TellO(); + + if (here != wxInvalidOffset && here >= 4) { + if (m_parent_o_stream->SeekO(here - 4) == here - 4) { + m_offsetAdjustment = here - 4; +#if wxUSE_LOG + wxLog::EnableLogging(logging); +#endif // wxUSE_LOG + m_parent_o_stream->SeekO(here); + } + } + } + + m_pending->SetOffset(m_headerOffset); + + m_crcAccumulator = crc32(0, Z_NULL, 0); + + if (raw) + m_raw = true; + + m_lasterror = wxSTREAM_NO_ERROR; + return true; +} + +// Can be overridden to add support for additional compression methods +// +wxOutputStream *wxZipOutputStream::OpenCompressor( + wxOutputStream& stream, + wxZipEntry& entry, + const Buffer bufs[]) +{ + if (entry.GetMethod() == wxZIP_METHOD_DEFAULT) { + if (GetLevel() == 0 + && (IsParentSeekable() + || entry.GetCompressedSize() != wxInvalidOffset + || entry.GetSize() != wxInvalidOffset)) { + entry.SetMethod(wxZIP_METHOD_STORE); + } else { + int size = 0; + for (int i = 0; bufs[i].m_data; ++i) + size += bufs[i].m_size; + entry.SetMethod(size <= 6 ? + wxZIP_METHOD_STORE : wxZIP_METHOD_DEFLATE); + } + } + + switch (entry.GetMethod()) { + case wxZIP_METHOD_STORE: + if (entry.GetCompressedSize() == wxInvalidOffset) + entry.SetCompressedSize(entry.GetSize()); + return m_store; + + case wxZIP_METHOD_DEFLATE: + { + int defbits = wxZIP_DEFLATE_NORMAL; + switch (GetLevel()) { + case 0: case 1: + defbits = wxZIP_DEFLATE_SUPERFAST; + break; + case 2: case 3: case 4: + defbits = wxZIP_DEFLATE_FAST; + break; + case 8: case 9: + defbits = wxZIP_DEFLATE_EXTRA; + break; + } + entry.SetFlags((entry.GetFlags() & ~wxZIP_DEFLATE_MASK) | + defbits | wxZIP_SUMS_FOLLOW); + + if (!m_deflate) + m_deflate = new wxZlibOutputStream2(stream, GetLevel()); + else + m_deflate->Open(stream); + + return m_deflate; + } + + default: + wxLogError(_("unsupported Zip compression method")); + } + + return NULL; +} + +bool wxZipOutputStream::CloseCompressor(wxOutputStream *comp) +{ + if (comp == m_deflate) + m_deflate->Close(); + else if (comp != m_store) + delete comp; + return true; +} + +// This is called when OUPUT_LATENCY bytes has been written to the +// wxZipOutputStream to actually create the zip entry. +// +void wxZipOutputStream::CreatePendingEntry(const void *buffer, size_t size) +{ + wxASSERT(IsOk() && m_pending && !m_comp); + wxZipEntryPtr_ spPending(m_pending); + m_pending = NULL; + + Buffer bufs[] = { + { m_initialData, m_initialSize }, + { (const char*)buffer, size }, + { NULL, 0 } + }; + + if (m_raw) + m_comp = m_store; + else + m_comp = OpenCompressor(*m_store, *spPending, + m_initialSize ? bufs : bufs + 1); + + if (IsParentSeekable() + || (spPending->m_Crc + && spPending->m_CompressedSize != wxInvalidOffset + && spPending->m_Size != wxInvalidOffset)) + spPending->m_Flags &= ~wxZIP_SUMS_FOLLOW; + else + if (spPending->m_CompressedSize != wxInvalidOffset) + spPending->m_Flags |= wxZIP_SUMS_FOLLOW; + + m_headerSize = spPending->WriteLocal(*m_parent_o_stream, GetConv()); + m_lasterror = m_parent_o_stream->GetLastError(); + + if (IsOk()) { + m_entries.push_back(spPending.release()); + OnSysWrite(m_initialData, m_initialSize); + } + + m_initialSize = 0; +} + +// This is called to write out the zip entry when Close has been called +// before OUTPUT_LATENCY bytes has been written to the wxZipOutputStream. +// +void wxZipOutputStream::CreatePendingEntry() +{ + wxASSERT(IsOk() && m_pending && !m_comp); + wxZipEntryPtr_ spPending(m_pending); + m_pending = NULL; + m_lasterror = wxSTREAM_WRITE_ERROR; + + if (!m_raw) { + // Initially compresses the data to memory, then fall back to 'store' + // if the compressor makes the data larger rather than smaller. + wxMemoryOutputStream mem; + Buffer bufs[] = { { m_initialData, m_initialSize }, { NULL, 0 } }; + wxOutputStream *comp = OpenCompressor(mem, *spPending, bufs); + + if (!comp) + return; + if (comp != m_store) { + bool ok = comp->Write(m_initialData, m_initialSize).IsOk(); + CloseCompressor(comp); + if (!ok) + return; + } + + m_entrySize = m_initialSize; + m_crcAccumulator = crc32(0, (Byte*)m_initialData, m_initialSize); + + if (mem.GetSize() > 0 && mem.GetSize() < m_initialSize) { + m_initialSize = mem.GetSize(); + mem.CopyTo(m_initialData, m_initialSize); + } else { + spPending->SetMethod(wxZIP_METHOD_STORE); + } + + spPending->SetSize(m_entrySize); + spPending->SetCrc(m_crcAccumulator); + spPending->SetCompressedSize(m_initialSize); + } + + spPending->m_Flags &= ~wxZIP_SUMS_FOLLOW; + m_headerSize = spPending->WriteLocal(*m_parent_o_stream, GetConv()); + + if (m_parent_o_stream->IsOk()) { + m_entries.push_back(spPending.release()); + m_comp = m_store; + m_store->Write(m_initialData, m_initialSize); + } + + m_initialSize = 0; + m_lasterror = m_parent_o_stream->GetLastError(); +} + +// Write the 'central directory' and the 'end-central-directory' records. +// +bool wxZipOutputStream::Close() +{ + CloseEntry(); + + if (m_lasterror == wxSTREAM_WRITE_ERROR + || (m_entries.size() == 0 && m_endrecWritten)) + { + wxFilterOutputStream::Close(); + return false; + } + + wxZipEndRec endrec; + + endrec.SetEntriesHere(m_entries.size()); + endrec.SetTotalEntries(m_entries.size()); + endrec.SetOffset(m_headerOffset); + endrec.SetComment(m_Comment); + + wxZipEntryList_::iterator it; + wxFileOffset size = 0; + + for (it = m_entries.begin(); it != m_entries.end(); ++it) { + size += (*it)->WriteCentral(*m_parent_o_stream, GetConv()); + delete *it; + } + m_entries.clear(); + + endrec.SetSize(size); + endrec.Write(*m_parent_o_stream, GetConv()); + + m_lasterror = m_parent_o_stream->GetLastError(); + m_endrecWritten = true; + + if (!wxFilterOutputStream::Close() || !IsOk()) + return false; + m_lasterror = wxSTREAM_EOF; + return true; +} + +// Finish writing the current entry +// +bool wxZipOutputStream::CloseEntry() +{ + if (IsOk() && m_pending) + CreatePendingEntry(); + if (!IsOk()) + return false; + if (!m_comp) + return true; + + CloseCompressor(m_comp); + m_comp = NULL; + + wxFileOffset compressedSize = m_store->TellO(); + + wxZipEntry& entry = *m_entries.back(); + + // When writing raw the crc and size can't be checked + if (m_raw) { + m_crcAccumulator = entry.GetCrc(); + m_entrySize = entry.GetSize(); + } + + // Write the sums in the trailing 'data descriptor' if necessary + if (entry.m_Flags & wxZIP_SUMS_FOLLOW) { + wxASSERT(!IsParentSeekable()); + m_headerOffset += + entry.WriteDescriptor(*m_parent_o_stream, m_crcAccumulator, + compressedSize, m_entrySize); + m_lasterror = m_parent_o_stream->GetLastError(); + } + + // If the local header didn't have the correct crc and size written to + // it then seek back and fix it + else if (m_crcAccumulator != entry.GetCrc() + || m_entrySize != entry.GetSize() + || compressedSize != entry.GetCompressedSize()) + { + if (IsParentSeekable()) { + wxFileOffset here = m_parent_o_stream->TellO(); + wxFileOffset headerOffset = m_headerOffset + m_offsetAdjustment; + m_parent_o_stream->SeekO(headerOffset + SUMS_OFFSET); + entry.WriteDescriptor(*m_parent_o_stream, m_crcAccumulator, + compressedSize, m_entrySize); + m_parent_o_stream->SeekO(here); + m_lasterror = m_parent_o_stream->GetLastError(); + } else { + m_lasterror = wxSTREAM_WRITE_ERROR; + } + } + + m_headerOffset += m_headerSize + compressedSize; + m_headerSize = 0; + m_entrySize = 0; + m_store->Close(); + m_raw = false; + + if (IsOk()) + m_lasterror = m_parent_o_stream->GetLastError(); + else + wxLogError(_("error writing zip entry '%s': bad crc or length"), + entry.GetName().c_str()); + return IsOk(); +} + +void wxZipOutputStream::Sync() +{ + if (IsOk() && m_pending) + CreatePendingEntry(NULL, 0); + if (!m_comp) + m_lasterror = wxSTREAM_WRITE_ERROR; + if (IsOk()) { + m_comp->Sync(); + m_lasterror = m_comp->GetLastError(); + } +} + +size_t wxZipOutputStream::OnSysWrite(const void *buffer, size_t size) +{ + if (IsOk() && m_pending) { + if (m_initialSize + size < OUTPUT_LATENCY) { + memcpy(m_initialData + m_initialSize, buffer, size); + m_initialSize += size; + return size; + } else { + CreatePendingEntry(buffer, size); + } + } + + if (!m_comp) + m_lasterror = wxSTREAM_WRITE_ERROR; + if (!IsOk() || !size) + return 0; + + if (m_comp->Write(buffer, size).LastWrite() != size) + m_lasterror = wxSTREAM_WRITE_ERROR; + m_crcAccumulator = crc32(m_crcAccumulator, (Byte*)buffer, size); + m_entrySize += m_comp->LastWrite(); + + return m_comp->LastWrite(); +} + +#endif // wxUSE_ZIPSTREAM diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/common/zstream.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/common/zstream.cpp new file mode 100644 index 0000000000..e10e3d774e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/common/zstream.cpp @@ -0,0 +1,451 @@ +////////////////////////////////////////////////////////////////////////////// +// Name: src/common/zstream.cpp +// Purpose: Compressed stream classes +// Author: Guilhem Lavaux +// Modified by: Mike Wetherell +// Created: 11/07/98 +// Copyright: (c) Guilhem Lavaux +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ZLIB && wxUSE_STREAMS + +#include "wx/zstream.h" +#include "wx/versioninfo.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" +#endif + + +// normally, the compiler options should contain -I../zlib, but it is +// apparently not the case for all MSW makefiles and so, unless we use +// configure (which defines __WX_SETUP_H__) or it is explicitly overridden by +// the user (who can define wxUSE_ZLIB_H_IN_PATH), we hardcode the path here +#if defined(__WINDOWS__) && !defined(__WX_SETUP_H__) && !defined(wxUSE_ZLIB_H_IN_PATH) + #include "../zlib/zlib.h" +#else + #include "zlib.h" +#endif + +enum { + ZSTREAM_BUFFER_SIZE = 16384, + ZSTREAM_GZIP = 0x10, // gzip header + ZSTREAM_AUTO = 0x20 // auto detect between gzip and zlib +}; + + +wxVersionInfo wxGetZlibVersionInfo() +{ + int major, + minor, + build; + + if ( sscanf(zlibVersion(), "%d.%d.%d", &major, &minor, &build) != 3 ) + { + major = + minor = + build = 0; + } + + return wxVersionInfo("zlib", major, minor, build); +} + +///////////////////////////////////////////////////////////////////////////// +// Zlib Class factory + +IMPLEMENT_DYNAMIC_CLASS(wxZlibClassFactory, wxFilterClassFactory) + +static wxZlibClassFactory g_wxZlibClassFactory; + +wxZlibClassFactory::wxZlibClassFactory() +{ + if (this == &g_wxZlibClassFactory) + PushFront(); +} + +const wxChar * const * +wxZlibClassFactory::GetProtocols(wxStreamProtocolType type) const +{ + static const wxChar *mimes[] = { wxT("application/x-deflate"), NULL }; + static const wxChar *encs[] = { wxT("deflate"), NULL }; + static const wxChar *empty[] = { NULL }; + + switch (type) { + case wxSTREAM_MIMETYPE: return mimes; + case wxSTREAM_ENCODING: return encs; + default: return empty; + } +} + + +///////////////////////////////////////////////////////////////////////////// +// Gzip Class factory + +IMPLEMENT_DYNAMIC_CLASS(wxGzipClassFactory, wxFilterClassFactory) + +static wxGzipClassFactory g_wxGzipClassFactory; + +wxGzipClassFactory::wxGzipClassFactory() +{ + if (this == &g_wxGzipClassFactory && wxZlibInputStream::CanHandleGZip()) + PushFront(); +} + +const wxChar * const * +wxGzipClassFactory::GetProtocols(wxStreamProtocolType type) const +{ + static const wxChar *protos[] = + { wxT("gzip"), NULL }; + static const wxChar *mimes[] = + { wxT("application/gzip"), wxT("application/x-gzip"), NULL }; + static const wxChar *encs[] = + { wxT("gzip"), NULL }; + static const wxChar *exts[] = + { wxT(".gz"), wxT(".gzip"), NULL }; + static const wxChar *empty[] = + { NULL }; + + switch (type) { + case wxSTREAM_PROTOCOL: return protos; + case wxSTREAM_MIMETYPE: return mimes; + case wxSTREAM_ENCODING: return encs; + case wxSTREAM_FILEEXT: return exts; + default: return empty; + } +} + + +////////////////////// +// wxZlibInputStream +////////////////////// + +wxZlibInputStream::wxZlibInputStream(wxInputStream& stream, int flags) + : wxFilterInputStream(stream) +{ + Init(flags); +} + +wxZlibInputStream::wxZlibInputStream(wxInputStream *stream, int flags) + : wxFilterInputStream(stream) +{ + Init(flags); +} + +void wxZlibInputStream::Init(int flags) +{ + m_inflate = NULL; + m_z_buffer = new unsigned char[ZSTREAM_BUFFER_SIZE]; + m_z_size = ZSTREAM_BUFFER_SIZE; + m_pos = 0; + + // if gzip is asked for but not supported... + if ((flags == wxZLIB_GZIP || flags == wxZLIB_AUTO) && !CanHandleGZip()) { + if (flags == wxZLIB_AUTO) { + // an error will come later if the input turns out not to be a zlib + flags = wxZLIB_ZLIB; + } + else { + wxLogError(_("Gzip not supported by this version of zlib")); + m_lasterror = wxSTREAM_READ_ERROR; + return; + } + } + + if (m_z_buffer) { + m_inflate = new z_stream_s; + + if (m_inflate) { + memset(m_inflate, 0, sizeof(z_stream_s)); + + // see zlib.h for documentation on windowBits + int windowBits = MAX_WBITS; + switch (flags) { + case wxZLIB_NO_HEADER: windowBits = -MAX_WBITS; break; + case wxZLIB_ZLIB: windowBits = MAX_WBITS; break; + case wxZLIB_GZIP: windowBits = MAX_WBITS | ZSTREAM_GZIP; break; + case wxZLIB_AUTO: windowBits = MAX_WBITS | ZSTREAM_AUTO; break; + default: wxFAIL_MSG(wxT("Invalid zlib flag")); + } + + if (inflateInit2(m_inflate, windowBits) == Z_OK) + return; + } + } + + wxLogError(_("Can't initialize zlib inflate stream.")); + m_lasterror = wxSTREAM_READ_ERROR; +} + +wxZlibInputStream::~wxZlibInputStream() +{ + inflateEnd(m_inflate); + delete m_inflate; + + delete [] m_z_buffer; +} + +size_t wxZlibInputStream::OnSysRead(void *buffer, size_t size) +{ + wxASSERT_MSG(m_inflate && m_z_buffer, wxT("Inflate stream not open")); + + if (!m_inflate || !m_z_buffer) + m_lasterror = wxSTREAM_READ_ERROR; + if (!IsOk() || !size) + return 0; + + int err = Z_OK; + m_inflate->next_out = (unsigned char *)buffer; + m_inflate->avail_out = size; + + while (err == Z_OK && m_inflate->avail_out > 0) { + if (m_inflate->avail_in == 0 && m_parent_i_stream->IsOk()) { + m_parent_i_stream->Read(m_z_buffer, m_z_size); + m_inflate->next_in = m_z_buffer; + m_inflate->avail_in = m_parent_i_stream->LastRead(); + } + err = inflate(m_inflate, Z_SYNC_FLUSH); + } + + switch (err) { + case Z_OK: + break; + + case Z_STREAM_END: + if (m_inflate->avail_out) { + // Unread any data taken from past the end of the deflate stream, so that + // any additional data can be read from the underlying stream (the crc + // in a gzip for example) + if (m_inflate->avail_in) { + m_parent_i_stream->Reset(); + m_parent_i_stream->Ungetch(m_inflate->next_in, m_inflate->avail_in); + m_inflate->avail_in = 0; + } + m_lasterror = wxSTREAM_EOF; + } + break; + + case Z_BUF_ERROR: + // Indicates that zlib was expecting more data, but the parent stream + // has none. Other than Eof the error will have been already reported + // by the parent strean, + m_lasterror = wxSTREAM_READ_ERROR; + if (m_parent_i_stream->Eof()) + { + wxLogError(_("Can't read inflate stream: unexpected EOF in underlying stream.")); + } + break; + + default: + wxString msg(m_inflate->msg, *wxConvCurrent); + if (!msg) + msg = wxString::Format(_("zlib error %d"), err); + wxLogError(_("Can't read from inflate stream: %s"), msg.c_str()); + m_lasterror = wxSTREAM_READ_ERROR; + } + + size -= m_inflate->avail_out; + m_pos += size; + return size; +} + +/* static */ bool wxZlibInputStream::CanHandleGZip() +{ + const char *dot = strchr(zlibVersion(), '.'); + int major = atoi(zlibVersion()); + int minor = dot ? atoi(dot + 1) : 0; + return major > 1 || (major == 1 && minor >= 2); +} + +bool wxZlibInputStream::SetDictionary(const char *data, const size_t datalen) +{ + return (inflateSetDictionary(m_inflate, (Bytef*)data, datalen) == Z_OK); +} + +bool wxZlibInputStream::SetDictionary(const wxMemoryBuffer &buf) +{ + return SetDictionary((char*)buf.GetData(), buf.GetDataLen()); +} + + +////////////////////// +// wxZlibOutputStream +////////////////////// + +wxZlibOutputStream::wxZlibOutputStream(wxOutputStream& stream, + int level, + int flags) + : wxFilterOutputStream(stream) +{ + Init(level, flags); +} + +wxZlibOutputStream::wxZlibOutputStream(wxOutputStream *stream, + int level, + int flags) + : wxFilterOutputStream(stream) +{ + Init(level, flags); +} + +void wxZlibOutputStream::Init(int level, int flags) +{ + m_deflate = NULL; + m_z_buffer = new unsigned char[ZSTREAM_BUFFER_SIZE]; + m_z_size = ZSTREAM_BUFFER_SIZE; + m_pos = 0; + + if ( level == -1 ) + { + level = Z_DEFAULT_COMPRESSION; + } + else + { + wxASSERT_MSG(level >= 0 && level <= 9, wxT("wxZlibOutputStream compression level must be between 0 and 9!")); + } + + // if gzip is asked for but not supported... + if (flags == wxZLIB_GZIP && !CanHandleGZip()) { + wxLogError(_("Gzip not supported by this version of zlib")); + m_lasterror = wxSTREAM_WRITE_ERROR; + return; + } + + if (m_z_buffer) { + m_deflate = new z_stream_s; + + if (m_deflate) { + memset(m_deflate, 0, sizeof(z_stream_s)); + m_deflate->next_out = m_z_buffer; + m_deflate->avail_out = m_z_size; + + // see zlib.h for documentation on windowBits + int windowBits = MAX_WBITS; + switch (flags) { + case wxZLIB_NO_HEADER: windowBits = -MAX_WBITS; break; + case wxZLIB_ZLIB: windowBits = MAX_WBITS; break; + case wxZLIB_GZIP: windowBits = MAX_WBITS | ZSTREAM_GZIP; break; + default: wxFAIL_MSG(wxT("Invalid zlib flag")); + } + + if (deflateInit2(m_deflate, level, Z_DEFLATED, windowBits, + 8, Z_DEFAULT_STRATEGY) == Z_OK) + return; + } + } + + wxLogError(_("Can't initialize zlib deflate stream.")); + m_lasterror = wxSTREAM_WRITE_ERROR; +} + +bool wxZlibOutputStream::Close() + { + DoFlush(true); + deflateEnd(m_deflate); + wxDELETE(m_deflate); + wxDELETEA(m_z_buffer); + + return wxFilterOutputStream::Close() && IsOk(); + } + +void wxZlibOutputStream::DoFlush(bool final) +{ + if (!m_deflate || !m_z_buffer) + m_lasterror = wxSTREAM_WRITE_ERROR; + if (!IsOk()) + return; + + int err = Z_OK; + bool done = false; + + while (err == Z_OK || err == Z_STREAM_END) { + size_t len = m_z_size - m_deflate->avail_out; + if (len) { + if (m_parent_o_stream->Write(m_z_buffer, len).LastWrite() != len) { + m_lasterror = wxSTREAM_WRITE_ERROR; + wxLogDebug(wxT("wxZlibOutputStream: Error writing to underlying stream")); + break; + } + m_deflate->next_out = m_z_buffer; + m_deflate->avail_out = m_z_size; + } + + if (done) + break; + err = deflate(m_deflate, final ? Z_FINISH : Z_FULL_FLUSH); + done = m_deflate->avail_out != 0 || err == Z_STREAM_END; + } +} + +size_t wxZlibOutputStream::OnSysWrite(const void *buffer, size_t size) +{ + wxASSERT_MSG(m_deflate && m_z_buffer, wxT("Deflate stream not open")); + + if (!m_deflate || !m_z_buffer) + { + // notice that this will make IsOk() test just below return false + m_lasterror = wxSTREAM_WRITE_ERROR; + } + + if (!IsOk() || !size) + return 0; + + int err = Z_OK; + m_deflate->next_in = (unsigned char *)buffer; + m_deflate->avail_in = size; + + while (err == Z_OK && m_deflate->avail_in > 0) { + if (m_deflate->avail_out == 0) { + m_parent_o_stream->Write(m_z_buffer, m_z_size); + if (m_parent_o_stream->LastWrite() != m_z_size) { + m_lasterror = wxSTREAM_WRITE_ERROR; + wxLogDebug(wxT("wxZlibOutputStream: Error writing to underlying stream")); + break; + } + + m_deflate->next_out = m_z_buffer; + m_deflate->avail_out = m_z_size; + } + + err = deflate(m_deflate, Z_NO_FLUSH); + } + + if (err != Z_OK) { + m_lasterror = wxSTREAM_WRITE_ERROR; + wxString msg(m_deflate->msg, *wxConvCurrent); + if (!msg) + msg = wxString::Format(_("zlib error %d"), err); + wxLogError(_("Can't write to deflate stream: %s"), msg.c_str()); + } + + size -= m_deflate->avail_in; + m_pos += size; + return size; +} + +/* static */ bool wxZlibOutputStream::CanHandleGZip() +{ + return wxZlibInputStream::CanHandleGZip(); +} + +bool wxZlibOutputStream::SetDictionary(const char *data, const size_t datalen) +{ + return (deflateSetDictionary(m_deflate, (Bytef*)data, datalen) == Z_OK); +} + +bool wxZlibOutputStream::SetDictionary(const wxMemoryBuffer &buf) +{ + return SetDictionary((char*)buf.GetData(), buf.GetDataLen()); +} + +#endif + // wxUSE_ZLIB && wxUSE_STREAMS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/aboutdlgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/aboutdlgg.cpp new file mode 100644 index 0000000000..9cb175334d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/aboutdlgg.cpp @@ -0,0 +1,330 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/aboutdlgg.cpp +// Purpose: implements wxGenericAboutBox() function +// Author: Vadim Zeitlin +// Created: 2006-10-08 +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ABOUTDLG + +#ifndef WX_PRECOMP + #include "wx/sizer.h" + #include "wx/statbmp.h" + #include "wx/stattext.h" + #include "wx/button.h" +#endif //WX_PRECOMP + +#include "wx/aboutdlg.h" +#include "wx/generic/aboutdlgg.h" + +#include "wx/hyperlink.h" +#include "wx/collpane.h" + +// ============================================================================ +// implementation +// ============================================================================ + +// helper function: returns all array elements in a single comma-separated and +// newline-terminated string +static wxString AllAsString(const wxArrayString& a) +{ + wxString s; + const size_t count = a.size(); + s.reserve(20*count); + for ( size_t n = 0; n < count; n++ ) + { + s << a[n] << (n == count - 1 ? wxT("\n") : wxT(", ")); + } + + return s; +} + +// ---------------------------------------------------------------------------- +// wxAboutDialogInfo +// ---------------------------------------------------------------------------- + +wxString wxAboutDialogInfo::GetDescriptionAndCredits() const +{ + wxString s = GetDescription(); + if ( !s.empty() ) + s << wxT('\n'); + + if ( HasDevelopers() ) + s << wxT('\n') << _("Developed by ") << AllAsString(GetDevelopers()); + + if ( HasDocWriters() ) + s << wxT('\n') << _("Documentation by ") << AllAsString(GetDocWriters()); + + if ( HasArtists() ) + s << wxT('\n') << _("Graphics art by ") << AllAsString(GetArtists()); + + if ( HasTranslators() ) + s << wxT('\n') << _("Translations by ") << AllAsString(GetTranslators()); + + return s; +} + +wxIcon wxAboutDialogInfo::GetIcon() const +{ + wxIcon icon = m_icon; + if ( !icon.IsOk() && wxTheApp ) + { + const wxTopLevelWindow * const + tlw = wxDynamicCast(wxTheApp->GetTopWindow(), wxTopLevelWindow); + if ( tlw ) + icon = tlw->GetIcon(); + } + + return icon; +} + +wxString wxAboutDialogInfo::GetCopyrightToDisplay() const +{ + wxString ret = m_copyright; + +#if wxUSE_UNICODE + const wxString copyrightSign = wxString::FromUTF8("\xc2\xa9"); + ret.Replace("(c)", copyrightSign); + ret.Replace("(C)", copyrightSign); +#endif // wxUSE_UNICODE + + return ret; +} + +void wxAboutDialogInfo::SetVersion(const wxString& version, + const wxString& longVersion) +{ + if ( version.empty() ) + { + m_version.clear(); + + wxASSERT_MSG( longVersion.empty(), + "long version should be empty if version is"); + + m_longVersion.clear(); + } + else // setting valid version + { + m_version = version; + + if ( longVersion.empty() ) + m_longVersion = _("Version ") + m_version; + else + m_longVersion = longVersion; + } +} + +// ---------------------------------------------------------------------------- +// wxGenericAboutDialog +// ---------------------------------------------------------------------------- + +bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info, wxWindow* parent) +{ + if ( !wxDialog::Create(parent, wxID_ANY, wxString::Format(_("About %s"), info.GetName()), + wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE) ) + return false; + + m_sizerText = new wxBoxSizer(wxVERTICAL); + wxString nameAndVersion = info.GetName(); + if ( info.HasVersion() ) + nameAndVersion << wxT(' ') << info.GetVersion(); + wxStaticText *label = new wxStaticText(this, wxID_ANY, nameAndVersion); + wxFont fontBig(*wxNORMAL_FONT); + fontBig.SetPointSize(fontBig.GetPointSize() + 2); + fontBig.SetWeight(wxFONTWEIGHT_BOLD); + label->SetFont(fontBig); + + m_sizerText->Add(label, wxSizerFlags().Centre().Border()); + m_sizerText->AddSpacer(5); + + AddText(info.GetCopyrightToDisplay()); + AddText(info.GetDescription()); + + if ( info.HasWebSite() ) + { +#if wxUSE_HYPERLINKCTRL + AddControl(new wxHyperlinkCtrl(this, wxID_ANY, + info.GetWebSiteDescription(), + info.GetWebSiteURL())); +#else + AddText(info.GetWebSiteURL()); +#endif // wxUSE_HYPERLINKCTRL/!wxUSE_HYPERLINKCTRL + } + +#if wxUSE_COLLPANE + if ( info.HasLicence() ) + AddCollapsiblePane(_("License"), info.GetLicence()); + + if ( info.HasDevelopers() ) + AddCollapsiblePane(_("Developers"), + AllAsString(info.GetDevelopers())); + + if ( info.HasDocWriters() ) + AddCollapsiblePane(_("Documentation writers"), + AllAsString(info.GetDocWriters())); + + if ( info.HasArtists() ) + AddCollapsiblePane(_("Artists"), + AllAsString(info.GetArtists())); + + if ( info.HasTranslators() ) + AddCollapsiblePane(_("Translators"), + AllAsString(info.GetTranslators())); +#endif // wxUSE_COLLPANE + + DoAddCustomControls(); + + + wxSizer *sizerIconAndText = new wxBoxSizer(wxHORIZONTAL); +#if wxUSE_STATBMP + wxIcon icon = info.GetIcon(); + if ( icon.IsOk() ) + { + sizerIconAndText->Add(new wxStaticBitmap(this, wxID_ANY, icon), + wxSizerFlags().Border(wxRIGHT)); + } +#endif // wxUSE_STATBMP + sizerIconAndText->Add(m_sizerText, wxSizerFlags(1).Expand()); + + wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL); + sizerTop->Add(sizerIconAndText, wxSizerFlags(1).Expand().Border()); + +// Mac typically doesn't use OK buttons just for dismissing dialogs. +#if !defined(__WXMAC__) + wxSizer *sizerBtns = CreateButtonSizer(wxOK); + if ( sizerBtns ) + { + sizerTop->Add(sizerBtns, wxSizerFlags().Expand().Border()); + } +#endif + + SetSizerAndFit(sizerTop); + + CentreOnParent(); + +#if !wxUSE_MODAL_ABOUT_DIALOG + Connect(wxEVT_CLOSE_WINDOW, + wxCloseEventHandler(wxGenericAboutDialog::OnCloseWindow)); + Connect(wxID_OK, wxEVT_BUTTON, + wxCommandEventHandler(wxGenericAboutDialog::OnOK)); +#endif // !wxUSE_MODAL_ABOUT_DIALOG + + return true; +} + +void wxGenericAboutDialog::AddControl(wxWindow *win, const wxSizerFlags& flags) +{ + wxCHECK_RET( m_sizerText, wxT("can only be called after Create()") ); + wxASSERT_MSG( win, wxT("can't add NULL window to about dialog") ); + + m_sizerText->Add(win, flags); +} + +void wxGenericAboutDialog::AddControl(wxWindow *win) +{ + AddControl(win, wxSizerFlags().Border(wxDOWN).Centre()); +} + +void wxGenericAboutDialog::AddText(const wxString& text) +{ + if ( !text.empty() ) + AddControl(new wxStaticText(this, wxID_ANY, text)); +} + +#if wxUSE_COLLPANE +void wxGenericAboutDialog::AddCollapsiblePane(const wxString& title, + const wxString& text) +{ + wxCollapsiblePane *pane = new wxCollapsiblePane(this, wxID_ANY, title); + wxWindow * const paneContents = pane->GetPane(); + wxStaticText *txt = new wxStaticText(paneContents, wxID_ANY, text, + wxDefaultPosition, wxDefaultSize, + wxALIGN_CENTRE); + + // don't make the text unreasonably wide + static const int maxWidth = wxGetDisplaySize().x/3; + txt->Wrap(maxWidth); + + + // we need a sizer to make this text expand to fill the entire pane area + wxSizer * const sizerPane = new wxBoxSizer(wxHORIZONTAL); + sizerPane->Add(txt, wxSizerFlags(1).Expand()); + paneContents->SetSizer(sizerPane); + + // NB: all the wxCollapsiblePanes must be added with a null proportion value + m_sizerText->Add(pane, wxSizerFlags(0).Expand().Border(wxBOTTOM)); +} +#endif + +#if !wxUSE_MODAL_ABOUT_DIALOG + +void wxGenericAboutDialog::OnCloseWindow(wxCloseEvent& event) +{ + // safeguards in case the window is still shown using ShowModal + if ( !IsModal() ) + Destroy(); + + event.Skip(); +} + +void wxGenericAboutDialog::OnOK(wxCommandEvent& event) +{ + // safeguards in case the window is still shown using ShowModal + if ( !IsModal() ) + { + // By default a modeless dialog would be just hidden, destroy this one + // instead. + Destroy(); + } + else + event.Skip(); +} + +#endif // !wxUSE_MODAL_ABOUT_DIALOG + +// ---------------------------------------------------------------------------- +// public functions +// ---------------------------------------------------------------------------- + +void wxGenericAboutBox(const wxAboutDialogInfo& info, wxWindow* parent) +{ +#if wxUSE_MODAL_ABOUT_DIALOG + wxGenericAboutDialog dlg(info, parent); + dlg.ShowModal(); +#else + wxGenericAboutDialog* dlg = new wxGenericAboutDialog(info, parent); + dlg->Show(); +#endif +} + +// currently wxAboutBox is implemented natively only under these platforms, for +// the others we provide a generic fallback here +#if !defined(__WXMSW__) && !defined(__WXMAC__) && \ + (!defined(__WXGTK20__) || defined(__WXUNIVERSAL__)) + +void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent) +{ + wxGenericAboutBox(info, parent); +} + +#endif // platforms without native about dialog + + +#endif // wxUSE_ABOUTDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/accel.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/accel.cpp new file mode 100644 index 0000000000..e540ec9c03 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/accel.cpp @@ -0,0 +1,219 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/accel.cpp +// Purpose: generic implementation of wxAcceleratorTable class +// Author: Robert Roebling +// Modified: VZ pn 31.05.01: use typed lists, Unicode cleanup, Add/Remove +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ACCEL + +#ifndef WX_PRECOMP + #include "wx/list.h" + #include "wx/event.h" +#endif // WX_PRECOMP + +#include "wx/accel.h" + +#include + +// ---------------------------------------------------------------------------- +// wxAccelList: a list of wxAcceleratorEntries +// ---------------------------------------------------------------------------- + +WX_DECLARE_LIST(wxAcceleratorEntry, wxAccelList); +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxAccelList) + +// ---------------------------------------------------------------------------- +// wxAccelRefData: the data used by wxAcceleratorTable +// ---------------------------------------------------------------------------- + +class wxAccelRefData : public wxObjectRefData +{ +public: + wxAccelRefData() + { + } + + wxAccelRefData(const wxAccelRefData& data) + : wxObjectRefData() + { + m_accels = data.m_accels; + } + + virtual ~wxAccelRefData() + { + WX_CLEAR_LIST(wxAccelList, m_accels); + } + + wxAccelList m_accels; +}; + +// macro which can be used to access wxAccelRefData from wxAcceleratorTable +#define M_ACCELDATA ((wxAccelRefData *)m_refData) + + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxAcceleratorTable ctors +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) + +wxAcceleratorTable::wxAcceleratorTable() +{ +} + +wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]) +{ + m_refData = new wxAccelRefData; + + for ( int i = 0; i < n; i++ ) + { + const wxAcceleratorEntry& entry = entries[i]; + + int keycode = entry.GetKeyCode(); + if ( wxIsascii(keycode) ) + keycode = wxToupper(keycode); + + M_ACCELDATA->m_accels.Append(new wxAcceleratorEntry(entry.GetFlags(), + keycode, + entry.GetCommand())); + } +} + +wxAcceleratorTable::~wxAcceleratorTable() +{ +} + +bool wxAcceleratorTable::IsOk() const +{ + return m_refData != NULL; +} + +// ---------------------------------------------------------------------------- +// wxAcceleratorTable updating +// ---------------------------------------------------------------------------- + +void wxAcceleratorTable::Add(const wxAcceleratorEntry& entry) +{ + AllocExclusive(); + + if ( !m_refData ) + { + m_refData = new wxAccelRefData; + } + + M_ACCELDATA->m_accels.Append(new wxAcceleratorEntry(entry)); +} + +void wxAcceleratorTable::Remove(const wxAcceleratorEntry& entry) +{ + AllocExclusive(); + + wxAccelList::compatibility_iterator node = M_ACCELDATA->m_accels.GetFirst(); + while ( node ) + { + const wxAcceleratorEntry *entryCur = node->GetData(); + + // given entry contains only the information of the accelerator key + // because it was set that way during creation so do not use the + // comparison operator which also checks the command field + if ((entryCur->GetKeyCode() == entry.GetKeyCode()) && + (entryCur->GetFlags() == entry.GetFlags())) + { + delete node->GetData(); + M_ACCELDATA->m_accels.Erase(node); + + return; + } + + node = node->GetNext(); + } + + wxFAIL_MSG(wxT("deleting inexistent accel from wxAcceleratorTable")); +} + +// ---------------------------------------------------------------------------- +// wxAcceleratorTable: find a command for the given key press +// ---------------------------------------------------------------------------- + +const wxAcceleratorEntry * +wxAcceleratorTable::GetEntry(const wxKeyEvent& event) const +{ + if ( !IsOk() ) + { + // not an error, the accel table is just empty + return NULL; + } + + wxAccelList::compatibility_iterator node = M_ACCELDATA->m_accels.GetFirst(); + while ( node ) + { + const wxAcceleratorEntry *entry = node->GetData(); + + // is the key the same? + if ( event.m_keyCode == entry->GetKeyCode() ) + { + int flags = entry->GetFlags(); + + // now check flags + if ( (((flags & wxACCEL_CTRL) != 0) == event.ControlDown()) && + (((flags & wxACCEL_SHIFT) != 0) == event.ShiftDown()) && + (((flags & wxACCEL_ALT) != 0) == event.AltDown()) ) + { + return entry; + } + } + + node = node->GetNext(); + } + + return NULL; +} + +wxMenuItem *wxAcceleratorTable::GetMenuItem(const wxKeyEvent& event) const +{ + const wxAcceleratorEntry *entry = GetEntry(event); + + return entry ? entry->GetMenuItem() : NULL; +} + +int wxAcceleratorTable::GetCommand(const wxKeyEvent& event) const +{ + const wxAcceleratorEntry *entry = GetEntry(event); + + return entry ? entry->GetCommand() : -1; +} + +wxObjectRefData *wxAcceleratorTable::CreateRefData() const +{ + return new wxAccelRefData; +} + +wxObjectRefData *wxAcceleratorTable::CloneRefData(const wxObjectRefData *data) const +{ + return new wxAccelRefData(*(wxAccelRefData *)data); +} + +#endif // wxUSE_ACCEL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/animateg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/animateg.cpp new file mode 100644 index 0000000000..f267c21cdb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/animateg.cpp @@ -0,0 +1,696 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/animateg.cpp +// Purpose: wxAnimation and wxAnimationCtrl +// Author: Julian Smart and Guillermo Rodriguez Garcia +// Modified by: Francesco Montorsi +// Created: 13/8/99 +// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif //__BORLANDC__ + +#if wxUSE_ANIMATIONCTRL + +#include "wx/animate.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/image.h" + #include "wx/dcmemory.h" + #include "wx/dcclient.h" + #include "wx/module.h" +#endif + +#include "wx/wfstream.h" +#include "wx/gifdecod.h" +#include "wx/anidecod.h" + +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxAnimationDecoderList) + +wxAnimationDecoderList wxAnimation::sm_handlers; + + +// ---------------------------------------------------------------------------- +// wxAnimation +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxAnimation, wxAnimationBase) +#define M_ANIMDATA static_cast(m_refData) + +wxSize wxAnimation::GetSize() const +{ + wxCHECK_MSG( IsOk(), wxDefaultSize, wxT("invalid animation") ); + + return M_ANIMDATA->GetAnimationSize(); +} + +unsigned int wxAnimation::GetFrameCount() const +{ + wxCHECK_MSG( IsOk(), 0, wxT("invalid animation") ); + + return M_ANIMDATA->GetFrameCount(); +} + +wxImage wxAnimation::GetFrame(unsigned int i) const +{ + wxCHECK_MSG( IsOk(), wxNullImage, wxT("invalid animation") ); + + wxImage ret; + if (!M_ANIMDATA->ConvertToImage(i, &ret)) + return wxNullImage; + return ret; +} + +int wxAnimation::GetDelay(unsigned int i) const +{ + wxCHECK_MSG( IsOk(), 0, wxT("invalid animation") ); + + return M_ANIMDATA->GetDelay(i); +} + +wxPoint wxAnimation::GetFramePosition(unsigned int frame) const +{ + wxCHECK_MSG( IsOk(), wxDefaultPosition, wxT("invalid animation") ); + + return M_ANIMDATA->GetFramePosition(frame); +} + +wxSize wxAnimation::GetFrameSize(unsigned int frame) const +{ + wxCHECK_MSG( IsOk(), wxDefaultSize, wxT("invalid animation") ); + + return M_ANIMDATA->GetFrameSize(frame); +} + +wxAnimationDisposal wxAnimation::GetDisposalMethod(unsigned int frame) const +{ + wxCHECK_MSG( IsOk(), wxANIM_UNSPECIFIED, wxT("invalid animation") ); + + return M_ANIMDATA->GetDisposalMethod(frame); +} + +wxColour wxAnimation::GetTransparentColour(unsigned int frame) const +{ + wxCHECK_MSG( IsOk(), wxNullColour, wxT("invalid animation") ); + + return M_ANIMDATA->GetTransparentColour(frame); +} + +wxColour wxAnimation::GetBackgroundColour() const +{ + wxCHECK_MSG( IsOk(), wxNullColour, wxT("invalid animation") ); + + return M_ANIMDATA->GetBackgroundColour(); +} + +bool wxAnimation::LoadFile(const wxString& filename, wxAnimationType type) +{ + wxFileInputStream stream(filename); + if ( !stream.IsOk() ) + return false; + + return Load(stream, type); +} + +bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type) +{ + UnRef(); + + const wxAnimationDecoder *handler; + if ( type == wxANIMATION_TYPE_ANY ) + { + for ( wxAnimationDecoderList::compatibility_iterator node = sm_handlers.GetFirst(); + node; node = node->GetNext() ) + { + handler=(const wxAnimationDecoder*)node->GetData(); + + if ( handler->CanRead(stream) ) + { + // do a copy of the handler from the static list which we will own + // as our reference data + m_refData = handler->Clone(); + return M_ANIMDATA->Load(stream); + } + } + + wxLogWarning( _("No handler found for animation type.") ); + return false; + } + + handler = FindHandler(type); + + if (handler == NULL) + { + wxLogWarning( _("No animation handler for type %ld defined."), type ); + + return false; + } + + + // do a copy of the handler from the static list which we will own + // as our reference data + m_refData = handler->Clone(); + + if (stream.IsSeekable() && !M_ANIMDATA->CanRead(stream)) + { + wxLogError(_("Animation file is not of type %ld."), type); + return false; + } + else + return M_ANIMDATA->Load(stream); +} + + +// ---------------------------------------------------------------------------- +// animation decoders +// ---------------------------------------------------------------------------- + +void wxAnimation::AddHandler( wxAnimationDecoder *handler ) +{ + // Check for an existing handler of the type being added. + if (FindHandler( handler->GetType() ) == 0) + { + sm_handlers.Append( handler ); + } + else + { + // This is not documented behaviour, merely the simplest 'fix' + // for preventing duplicate additions. If someone ever has + // a good reason to add and remove duplicate handlers (and they + // may) we should probably refcount the duplicates. + + wxLogDebug( wxT("Adding duplicate animation handler for '%d' type"), + handler->GetType() ); + delete handler; + } +} + +void wxAnimation::InsertHandler( wxAnimationDecoder *handler ) +{ + // Check for an existing handler of the type being added. + if (FindHandler( handler->GetType() ) == 0) + { + sm_handlers.Insert( handler ); + } + else + { + // see AddHandler for additional comments. + wxLogDebug( wxT("Inserting duplicate animation handler for '%d' type"), + handler->GetType() ); + delete handler; + } +} + +const wxAnimationDecoder *wxAnimation::FindHandler( wxAnimationType animType ) +{ + wxAnimationDecoderList::compatibility_iterator node = sm_handlers.GetFirst(); + while (node) + { + const wxAnimationDecoder *handler = (const wxAnimationDecoder *)node->GetData(); + if (handler->GetType() == animType) return handler; + node = node->GetNext(); + } + return 0; +} + +void wxAnimation::InitStandardHandlers() +{ +#if wxUSE_GIF + AddHandler(new wxGIFDecoder); +#endif // wxUSE_GIF +#if wxUSE_ICO_CUR + AddHandler(new wxANIDecoder); +#endif // wxUSE_ICO_CUR +} + +void wxAnimation::CleanUpHandlers() +{ + wxAnimationDecoderList::compatibility_iterator node = sm_handlers.GetFirst(); + while (node) + { + wxAnimationDecoder *handler = (wxAnimationDecoder *)node->GetData(); + wxAnimationDecoderList::compatibility_iterator next = node->GetNext(); + delete handler; + node = next; + } + + sm_handlers.Clear(); +} + + +// A module to allow wxAnimation initialization/cleanup +// without calling these functions from app.cpp or from +// the user's application. + +class wxAnimationModule: public wxModule +{ +DECLARE_DYNAMIC_CLASS(wxAnimationModule) +public: + wxAnimationModule() {} + bool OnInit() { wxAnimation::InitStandardHandlers(); return true; } + void OnExit() { wxAnimation::CleanUpHandlers(); } +}; + +IMPLEMENT_DYNAMIC_CLASS(wxAnimationModule, wxModule) + + +// ---------------------------------------------------------------------------- +// wxAnimationCtrl +// ---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxAnimationCtrl, wxAnimationCtrlBase) +BEGIN_EVENT_TABLE(wxAnimationCtrl, wxAnimationCtrlBase) + EVT_PAINT(wxAnimationCtrl::OnPaint) + EVT_SIZE(wxAnimationCtrl::OnSize) + EVT_TIMER(wxID_ANY, wxAnimationCtrl::OnTimer) +END_EVENT_TABLE() + +void wxAnimationCtrl::Init() +{ + m_currentFrame = 0; + m_looped = false; + m_isPlaying = false; + + // use the window background colour by default to be consistent + // with the GTK+ native version + m_useWinBackgroundColour = true; +} + +bool wxAnimationCtrl::Create(wxWindow *parent, wxWindowID id, + const wxAnimation& animation, const wxPoint& pos, + const wxSize& size, long style, const wxString& name) +{ + m_timer.SetOwner(this); + + if (!base_type::Create(parent, id, pos, size, style, wxDefaultValidator, name)) + return false; + + // by default we get the same background colour of our parent + SetBackgroundColour(parent->GetBackgroundColour()); + + SetAnimation(animation); + + return true; +} + +wxAnimationCtrl::~wxAnimationCtrl() +{ + Stop(); +} + +bool wxAnimationCtrl::LoadFile(const wxString& filename, wxAnimationType type) +{ + wxFileInputStream fis(filename); + if (!fis.IsOk()) + return false; + return Load(fis, type); +} + +bool wxAnimationCtrl::Load(wxInputStream& stream, wxAnimationType type) +{ + wxAnimation anim; + if ( !anim.Load(stream, type) || !anim.IsOk() ) + return false; + + SetAnimation(anim); + return true; +} + +wxSize wxAnimationCtrl::DoGetBestSize() const +{ + if (m_animation.IsOk() && !this->HasFlag(wxAC_NO_AUTORESIZE)) + return m_animation.GetSize(); + + return wxSize(100, 100); +} + +void wxAnimationCtrl::SetAnimation(const wxAnimation& animation) +{ + if (IsPlaying()) + Stop(); + + // set new animation even if it's wxNullAnimation + m_animation = animation; + if (!m_animation.IsOk()) + { + DisplayStaticImage(); + return; + } + + if (m_animation.GetBackgroundColour() == wxNullColour) + SetUseWindowBackgroundColour(); + if (!this->HasFlag(wxAC_NO_AUTORESIZE)) + FitToAnimation(); + + DisplayStaticImage(); +} + +void wxAnimationCtrl::SetInactiveBitmap(const wxBitmap &bmp) +{ + // if the bitmap has an associated mask, we need to set our background to + // the colour of our parent otherwise when calling DrawCurrentFrame() + // (which uses the bitmap's mask), our background colour would be used for + // transparent areas - and that's not what we want (at least for + // consistency with the GTK version) + if ( bmp.GetMask() != NULL && GetParent() != NULL ) + SetBackgroundColour(GetParent()->GetBackgroundColour()); + + wxAnimationCtrlBase::SetInactiveBitmap(bmp); +} + +void wxAnimationCtrl::FitToAnimation() +{ + SetSize(m_animation.GetSize()); +} + +bool wxAnimationCtrl::SetBackgroundColour(const wxColour& colour) +{ + if ( !wxWindow::SetBackgroundColour(colour) ) + return false; + + // if not playing, then this change must be seen immediately (unless + // there's an inactive bitmap set which has higher priority than bg colour) + if ( !IsPlaying() ) + DisplayStaticImage(); + + return true; +} + + +// ---------------------------------------------------------------------------- +// wxAnimationCtrl - stop/play methods +// ---------------------------------------------------------------------------- + +void wxAnimationCtrl::Stop() +{ + m_timer.Stop(); + m_isPlaying = false; + + // reset frame counter + m_currentFrame = 0; + + DisplayStaticImage(); +} + +bool wxAnimationCtrl::Play(bool looped) +{ + if (!m_animation.IsOk()) + return false; + + m_looped = looped; + m_currentFrame = 0; + + if (!RebuildBackingStoreUpToFrame(0)) + return false; + + m_isPlaying = true; + + // do a ClearBackground() to avoid that e.g. the custom static bitmap which + // was eventually shown previously remains partially drawn + ClearBackground(); + + // DrawCurrentFrame() will use our updated backing store + wxClientDC clientDC(this); + DrawCurrentFrame(clientDC); + + // start the timer + int delay = m_animation.GetDelay(0); + if (delay == 0) + delay = 1; // 0 is invalid timeout for wxTimer. + m_timer.Start(delay, true); + + return true; +} + + + +// ---------------------------------------------------------------------------- +// wxAnimationCtrl - rendering methods +// ---------------------------------------------------------------------------- + +bool wxAnimationCtrl::RebuildBackingStoreUpToFrame(unsigned int frame) +{ + // if we've not created the backing store yet or it's too + // small, then recreate it + wxSize sz = m_animation.GetSize(), + winsz = GetClientSize(); + int w = wxMin(sz.GetWidth(), winsz.GetWidth()); + int h = wxMin(sz.GetHeight(), winsz.GetHeight()); + + if ( !m_backingStore.IsOk() || + m_backingStore.GetWidth() < w || m_backingStore.GetHeight() < h ) + { + if (!m_backingStore.Create(w, h)) + return false; + } + + wxMemoryDC dc; + dc.SelectObject(m_backingStore); + + // Draw the background + DisposeToBackground(dc); + + // Draw all intermediate frames that haven't been removed from the animation + for (unsigned int i = 0; i < frame; i++) + { + if (m_animation.GetDisposalMethod(i) == wxANIM_DONOTREMOVE || + m_animation.GetDisposalMethod(i) == wxANIM_UNSPECIFIED) + { + DrawFrame(dc, i); + } + else if (m_animation.GetDisposalMethod(i) == wxANIM_TOBACKGROUND) + DisposeToBackground(dc, m_animation.GetFramePosition(i), + m_animation.GetFrameSize(i)); + } + + // finally draw this frame + DrawFrame(dc, frame); + dc.SelectObject(wxNullBitmap); + + return true; +} + +void wxAnimationCtrl::IncrementalUpdateBackingStore() +{ + wxMemoryDC dc; + dc.SelectObject(m_backingStore); + + // OPTIMIZATION: + // since wxAnimationCtrl can only play animations forward, without skipping + // frames, we can be sure that m_backingStore contains the m_currentFrame-1 + // frame and thus we just need to dispose the m_currentFrame-1 frame and + // render the m_currentFrame-th one. + + if (m_currentFrame == 0) + { + // before drawing the first frame always dispose to bg colour + DisposeToBackground(dc); + } + else + { + switch (m_animation.GetDisposalMethod(m_currentFrame-1)) + { + case wxANIM_TOBACKGROUND: + DisposeToBackground(dc, m_animation.GetFramePosition(m_currentFrame-1), + m_animation.GetFrameSize(m_currentFrame-1)); + break; + + case wxANIM_TOPREVIOUS: + // this disposal should never be used too often. + // E.g. GIF specification explicitly say to keep the usage of this + // disposal limited to the minimum. + // In fact it may require a lot of time to restore + if (m_currentFrame == 1) + { + // if 0-th frame disposal is to restore to previous frame, + // the best we can do is to restore to background + DisposeToBackground(dc); + } + else + if (!RebuildBackingStoreUpToFrame(m_currentFrame-2)) + Stop(); + break; + + case wxANIM_DONOTREMOVE: + case wxANIM_UNSPECIFIED: + break; + } + } + + // now just draw the current frame on the top of the backing store + DrawFrame(dc, m_currentFrame); + dc.SelectObject(wxNullBitmap); +} + +void wxAnimationCtrl::DisplayStaticImage() +{ + wxASSERT(!IsPlaying()); + + // m_bmpStaticReal will be updated only if necessary... + UpdateStaticImage(); + + if (m_bmpStaticReal.IsOk()) + { + // copy the inactive bitmap in the backing store + // eventually using the mask if the static bitmap has one + if ( m_bmpStaticReal.GetMask() ) + { + wxMemoryDC temp; + temp.SelectObject(m_backingStore); + DisposeToBackground(temp); + temp.DrawBitmap(m_bmpStaticReal, 0, 0, true /* use mask */); + } + else + m_backingStore = m_bmpStaticReal; + } + else + { + // put in the backing store the first frame of the animation + if (!m_animation.IsOk() || + !RebuildBackingStoreUpToFrame(0)) + { + m_animation = wxNullAnimation; + DisposeToBackground(); + } + } + + Refresh(); +} + +void wxAnimationCtrl::DrawFrame(wxDC &dc, unsigned int frame) +{ + // PERFORMANCE NOTE: + // this draw stuff is not as fast as possible: the wxAnimationDecoder + // needs first to convert from its internal format to wxImage RGB24; + // the wxImage is then converted as a wxBitmap and finally blitted. + // If wxAnimationDecoder had a function to convert directly from its + // internal format to a port-specific wxBitmap, it would be somewhat faster. + wxBitmap bmp(m_animation.GetFrame(frame)); + dc.DrawBitmap(bmp, m_animation.GetFramePosition(frame), + true /* use mask */); +} + +void wxAnimationCtrl::DrawCurrentFrame(wxDC& dc) +{ + wxASSERT( m_backingStore.IsOk() ); + + // m_backingStore always contains the current frame + dc.DrawBitmap(m_backingStore, 0, 0, true /* use mask in case it's present */); +} + +void wxAnimationCtrl::DisposeToBackground() +{ + // clear the backing store + wxMemoryDC dc; + dc.SelectObject(m_backingStore); + if ( dc.IsOk() ) + DisposeToBackground(dc); +} + +void wxAnimationCtrl::DisposeToBackground(wxDC& dc) +{ + wxColour col = IsUsingWindowBackgroundColour() + ? GetBackgroundColour() + : m_animation.GetBackgroundColour(); + + wxBrush brush(col); + dc.SetBackground(brush); + dc.Clear(); +} + +void wxAnimationCtrl::DisposeToBackground(wxDC& dc, const wxPoint &pos, const wxSize &sz) +{ + wxColour col = IsUsingWindowBackgroundColour() + ? GetBackgroundColour() + : m_animation.GetBackgroundColour(); + wxBrush brush(col); + dc.SetBrush(brush); // SetBrush and not SetBackground !! + dc.SetPen(*wxTRANSPARENT_PEN); + dc.DrawRectangle(pos, sz); +} + +// ---------------------------------------------------------------------------- +// wxAnimationCtrl - event handlers +// ---------------------------------------------------------------------------- + +void wxAnimationCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + // VERY IMPORTANT: the wxPaintDC *must* be created in any case + wxPaintDC dc(this); + + if ( m_backingStore.IsOk() ) + { + // NOTE: we draw the bitmap explicitly ignoring the mask (if any); + // i.e. we don't want to combine the backing store with the + // possibly wrong preexisting contents of the window! + dc.DrawBitmap(m_backingStore, 0, 0, false /* no mask */); + } + else + { + // m_animation is not valid and thus we don't have a valid backing store... + // clear then our area to the background colour + DisposeToBackground(dc); + } +} + +void wxAnimationCtrl::OnTimer(wxTimerEvent &WXUNUSED(event)) +{ + m_currentFrame++; + if (m_currentFrame == m_animation.GetFrameCount()) + { + // Should a non-looped animation display the last frame? + if (!m_looped) + { + Stop(); + return; + } + else + m_currentFrame = 0; // let's restart + } + + IncrementalUpdateBackingStore(); + + wxClientDC dc(this); + DrawCurrentFrame(dc); + +#ifdef __WXMAC__ + // without this, the animation currently doesn't redraw under Mac + Refresh(); +#endif // __WXMAC__ + + // Set the timer for the next frame + int delay = m_animation.GetDelay(m_currentFrame); + if (delay == 0) + delay = 1; // 0 is invalid timeout for wxTimer. + m_timer.Start(delay, true); +} + +void wxAnimationCtrl::OnSize(wxSizeEvent &WXUNUSED(event)) +{ + // NB: resizing an animation control may take a lot of time + // for big animations as the backing store must be + // extended and rebuilt. Try to avoid it e.g. using + // a null proportion value for your wxAnimationCtrls + // when using them inside sizers. + if (m_animation.IsOk()) + { + // be careful to change the backing store *only* if we are + // playing the animation as otherwise we may be displaying + // the inactive bitmap and overwriting the backing store + // with the last played frame is wrong in this case + if (IsPlaying()) + { + if (!RebuildBackingStoreUpToFrame(m_currentFrame)) + Stop(); // in case we are playing + } + } +} + +#endif // wxUSE_ANIMATIONCTRL + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/bannerwindow.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/bannerwindow.cpp new file mode 100644 index 0000000000..f5452cd886 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/bannerwindow.cpp @@ -0,0 +1,343 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/bannerwindow.h +// Purpose: wxBannerWindow class implementation +// Author: Vadim Zeitlin +// Created: 2011-08-16 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_BANNERWINDOW + +#include "wx/bannerwindow.h" + +#ifndef WX_PRECOMP + #include "wx/bitmap.h" + #include "wx/colour.h" +#endif + +#include "wx/dcbuffer.h" + +namespace +{ + +// Some constants for banner layout, currently they're hard coded but we could +// easily make them configurable if needed later. +const int MARGIN_X = 5; +const int MARGIN_Y = 5; + +} // anonymous namespace + +const char wxBannerWindowNameStr[] = "bannerwindow"; + +BEGIN_EVENT_TABLE(wxBannerWindow, wxWindow) + EVT_SIZE(wxBannerWindow::OnSize) + EVT_PAINT(wxBannerWindow::OnPaint) +END_EVENT_TABLE() + +void wxBannerWindow::Init() +{ + m_direction = wxLEFT; + + m_colStart = *wxWHITE; + m_colEnd = *wxBLUE; +} + +bool +wxBannerWindow::Create(wxWindow* parent, + wxWindowID winid, + wxDirection dir, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if ( !wxWindow::Create(parent, winid, pos, size, style, name) ) + return false; + + wxASSERT_MSG + ( + dir == wxLEFT || dir == wxRIGHT || dir == wxTOP || dir == wxBOTTOM, + wxS("Invalid banner direction") + ); + + m_direction = dir; + + SetBackgroundStyle(wxBG_STYLE_PAINT); + + return true; +} + +void wxBannerWindow::SetBitmap(const wxBitmap& bmp) +{ + m_bitmap = bmp; + + m_colBitmapBg = wxColour(); + + InvalidateBestSize(); + + Refresh(); +} + +void wxBannerWindow::SetText(const wxString& title, const wxString& message) +{ + m_title = title; + m_message = message; + + InvalidateBestSize(); + + Refresh(); +} + +void wxBannerWindow::SetGradient(const wxColour& start, const wxColour& end) +{ + m_colStart = start; + m_colEnd = end; + + Refresh(); +} + +wxFont wxBannerWindow::GetTitleFont() const +{ + wxFont font = GetFont(); + font.MakeBold().MakeLarger(); + return font; +} + +wxSize wxBannerWindow::DoGetBestClientSize() const +{ + if ( m_bitmap.IsOk() ) + { + return m_bitmap.GetSize(); + } + else + { + wxClientDC dc(const_cast(this)); + const wxSize sizeText = dc.GetMultiLineTextExtent(m_message); + + dc.SetFont(GetTitleFont()); + + const wxSize sizeTitle = dc.GetTextExtent(m_title); + + wxSize sizeWin(wxMax(sizeTitle.x, sizeText.x), sizeTitle.y + sizeText.y); + + // If we draw the text vertically width and height are swapped. + if ( m_direction == wxLEFT || m_direction == wxRIGHT ) + wxSwap(sizeWin.x, sizeWin.y); + + sizeWin += 2*wxSize(MARGIN_X, MARGIN_Y); + + return sizeWin; + } +} + +void wxBannerWindow::OnSize(wxSizeEvent& event) +{ + Refresh(); + + event.Skip(); +} + +void wxBannerWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + if ( m_bitmap.IsOk() && m_title.empty() && m_message.empty() ) + { + // No need for buffering in this case. + wxPaintDC dc(this); + + DrawBitmapBackground(dc); + } + else // We need to compose our contents ourselves. + { + wxAutoBufferedPaintDC dc(this); + + // Deal with the background first. + if ( m_bitmap.IsOk() ) + { + DrawBitmapBackground(dc); + } + else // Draw gradient background. + { + wxDirection gradientDir; + if ( m_direction == wxLEFT ) + { + gradientDir = wxTOP; + } + else if ( m_direction == wxRIGHT ) + { + gradientDir = wxBOTTOM; + } + else // For both wxTOP and wxBOTTOM. + { + gradientDir = wxRIGHT; + } + + dc.GradientFillLinear(GetClientRect(), m_colStart, m_colEnd, + gradientDir); + } + + // Now draw the text on top of it. + dc.SetFont(GetTitleFont()); + + wxPoint pos(MARGIN_X, MARGIN_Y); + DrawBannerTextLine(dc, m_title, pos); + pos.y += dc.GetTextExtent(m_title).y; + + dc.SetFont(GetFont()); + + wxArrayString lines = wxSplit(m_message, '\n', '\0'); + const unsigned numLines = lines.size(); + for ( unsigned n = 0; n < numLines; n++ ) + { + const wxString& line = lines[n]; + + DrawBannerTextLine(dc, line, pos); + pos.y += dc.GetTextExtent(line).y; + } + } +} + +wxColour wxBannerWindow::GetBitmapBg() +{ + if ( m_colBitmapBg.IsOk() ) + return m_colBitmapBg; + + // Determine the colour to use to extend the bitmap. It's the colour of the + // bitmap pixels at the edge closest to the area where it can be extended. + wxImage image(m_bitmap.ConvertToImage()); + + // The point we get the colour from. The choice is arbitrary and in general + // the bitmap should have the same colour on the entire edge of this point + // for extending it to look good. + wxPoint p; + + wxSize size = image.GetSize(); + size.x--; + size.y--; + + switch ( m_direction ) + { + case wxTOP: + case wxBOTTOM: + // The bitmap will be extended to the right. + p.x = size.x; + p.y = 0; + break; + + case wxLEFT: + // The bitmap will be extended from the top. + p.x = 0; + p.y = 0; + break; + + case wxRIGHT: + // The bitmap will be extended to the bottom. + p.x = 0; + p.y = size.y; + break; + + // This case is there only to prevent g++ warnings about not handling + // some enum elements in the switch, it can't really happen. + case wxALL: + wxFAIL_MSG( wxS("Unreachable") ); + } + + m_colBitmapBg.Set(image.GetRed(p.x, p.y), + image.GetGreen(p.x, p.y), + image.GetBlue(p.x, p.y)); + + return m_colBitmapBg; +} + +void wxBannerWindow::DrawBitmapBackground(wxDC& dc) +{ + // We may need to fill the part of the background not covered by the bitmap + // with the solid colour extending the bitmap, this rectangle will hold the + // area to be filled (which could be empty if the bitmap is big enough). + wxRect rectSolid; + + const wxSize size = GetClientSize(); + + switch ( m_direction ) + { + case wxTOP: + case wxBOTTOM: + // Draw the bitmap at the origin, its rightmost could be truncated, + // as it's meant to be. + dc.DrawBitmap(m_bitmap, 0, 0); + + rectSolid.x = m_bitmap.GetWidth(); + rectSolid.width = size.x - rectSolid.x; + rectSolid.height = size.y; + break; + + case wxLEFT: + // The top most part of the bitmap may be truncated but its bottom + // must be always visible so intentionally draw it possibly partly + // outside of the window. + rectSolid.width = size.x; + rectSolid.height = size.y - m_bitmap.GetHeight(); + dc.DrawBitmap(m_bitmap, 0, rectSolid.height); + break; + + case wxRIGHT: + // Draw the bitmap at the origin, possibly truncating its + // bottommost part. + dc.DrawBitmap(m_bitmap, 0, 0); + + rectSolid.y = m_bitmap.GetHeight(); + rectSolid.height = size.y - rectSolid.y; + rectSolid.width = size.x; + break; + + // This case is there only to prevent g++ warnings about not handling + // some enum elements in the switch, it can't really happen. + case wxALL: + wxFAIL_MSG( wxS("Unreachable") ); + } + + if ( rectSolid.width > 0 && rectSolid.height > 0 ) + { + dc.SetPen(*wxTRANSPARENT_PEN); + dc.SetBrush(GetBitmapBg()); + dc.DrawRectangle(rectSolid); + } +} + +void +wxBannerWindow::DrawBannerTextLine(wxDC& dc, + const wxString& str, + const wxPoint& pos) +{ + switch ( m_direction ) + { + case wxTOP: + case wxBOTTOM: + // The simple case: we just draw the text normally. + dc.DrawText(str, pos); + break; + + case wxLEFT: + // We draw the text vertically and start from the lower left + // corner and not the upper left one as usual. + dc.DrawRotatedText(str, pos.y, GetClientSize().y - pos.x, 90); + break; + + case wxRIGHT: + // We also draw the text vertically but now we start from the upper + // right corner and draw it from top to bottom. + dc.DrawRotatedText(str, GetClientSize().x - pos.y, pos.x, -90); + break; + + case wxALL: + wxFAIL_MSG( wxS("Unreachable") ); + } +} + +#endif // wxUSE_BANNERWINDOW diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/bmpcboxg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/bmpcboxg.cpp new file mode 100644 index 0000000000..9a948eed8c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/bmpcboxg.cpp @@ -0,0 +1,358 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/bmpcboxg.cpp +// Purpose: wxBitmapComboBox +// Author: Jaakko Salli +// Modified by: +// Created: Aug-31-2006 +// Copyright: (c) 2005 Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_BITMAPCOMBOBOX + +#include "wx/bmpcbox.h" + +#if defined(wxGENERIC_BITMAPCOMBOBOX) + +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif + +#include "wx/odcombo.h" +#include "wx/settings.h" +#include "wx/dc.h" + +#if wxUSE_IMAGE + #include "wx/image.h" +#endif + + +#define IMAGE_SPACING_CTRL_VERTICAL 7 // Spacing used in control size calculation + + +// ============================================================================ +// implementation +// ============================================================================ + + +BEGIN_EVENT_TABLE(wxBitmapComboBox, wxOwnerDrawnComboBox) + EVT_SIZE(wxBitmapComboBox::OnSize) +END_EVENT_TABLE() + + +IMPLEMENT_DYNAMIC_CLASS(wxBitmapComboBox, wxOwnerDrawnComboBox) + +void wxBitmapComboBox::Init() +{ + m_inResize = false; +} + +wxBitmapComboBox::wxBitmapComboBox(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator, + const wxString& name) + : wxOwnerDrawnComboBox(), + wxBitmapComboBoxBase() +{ + Init(); + + Create(parent,id,value,pos,size,choices,style,validator,name); +} + +bool wxBitmapComboBox::Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator, + const wxString& name) +{ + if ( !wxOwnerDrawnComboBox::Create(parent, id, value, + pos, size, + choices, style, + validator, name) ) + { + return false; + } + + UpdateInternals(); + + return true; +} + +bool wxBitmapComboBox::Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + int n, + const wxString choices[], + long style, + const wxValidator& validator, + const wxString& name) +{ + if ( !wxOwnerDrawnComboBox::Create(parent, id, value, + pos, size, n, + choices, style, + validator, name) ) + { + return false; + } + + UpdateInternals(); + + return true; +} + +wxBitmapComboBox::~wxBitmapComboBox() +{ + DoClear(); +} + +// ---------------------------------------------------------------------------- +// Item manipulation +// ---------------------------------------------------------------------------- + +void wxBitmapComboBox::SetItemBitmap(unsigned int n, const wxBitmap& bitmap) +{ + OnAddBitmap(bitmap); + DoSetItemBitmap(n, bitmap); + + if ( (int)n == GetSelection() ) + Refresh(); +} + +int wxBitmapComboBox::DoInsertItems(const wxArrayStringsAdapter & items, + unsigned int pos, + void **clientData, wxClientDataType type) +{ + const unsigned int numItems = items.GetCount(); + const unsigned int countNew = GetCount() + numItems; + + wxASSERT( numItems == 1 || !HasFlag(wxCB_SORT) ); // Sanity check + + m_bitmaps.Alloc(countNew); + + for ( unsigned int i = 0; i < numItems; i++ ) + { + m_bitmaps.Insert(new wxBitmap(wxNullBitmap), pos + i); + } + + const int index = wxOwnerDrawnComboBox::DoInsertItems(items, pos, + clientData, type); + + if ( index == wxNOT_FOUND ) + { + for ( int i = numItems-1; i >= 0; i-- ) + BCBDoDeleteOneItem(pos + i); + } + else if ( ((unsigned int)index) != pos ) + { + // Move pre-inserted empty bitmap into correct position + // (usually happens when combo box has wxCB_SORT style) + wxBitmap* bmp = static_cast(m_bitmaps[pos]); + m_bitmaps.RemoveAt(pos); + m_bitmaps.Insert(bmp, index); + } + + return index; +} + +int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap) +{ + const int n = wxOwnerDrawnComboBox::Append(item); + if(n != wxNOT_FOUND) + SetItemBitmap(n, bitmap); + return n; +} + +int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap, + void *clientData) +{ + const int n = wxOwnerDrawnComboBox::Append(item, clientData); + if(n != wxNOT_FOUND) + SetItemBitmap(n, bitmap); + return n; +} + +int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap, + wxClientData *clientData) +{ + const int n = wxOwnerDrawnComboBox::Append(item, clientData); + if(n != wxNOT_FOUND) + SetItemBitmap(n, bitmap); + return n; +} + +int wxBitmapComboBox::Insert(const wxString& item, + const wxBitmap& bitmap, + unsigned int pos) +{ + const int n = wxOwnerDrawnComboBox::Insert(item, pos); + if(n != wxNOT_FOUND) + SetItemBitmap(n, bitmap); + return n; +} + +int wxBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, + unsigned int pos, void *clientData) +{ + const int n = wxOwnerDrawnComboBox::Insert(item, pos, clientData); + if(n != wxNOT_FOUND) + SetItemBitmap(n, bitmap); + return n; +} + +int wxBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, + unsigned int pos, wxClientData *clientData) +{ + const int n = wxOwnerDrawnComboBox::Insert(item, pos, clientData); + if(n != wxNOT_FOUND) + SetItemBitmap(n, bitmap); + return n; +} + +void wxBitmapComboBox::DoClear() +{ + wxOwnerDrawnComboBox::DoClear(); + wxBitmapComboBoxBase::BCBDoClear(); +} + +void wxBitmapComboBox::DoDeleteOneItem(unsigned int n) +{ + wxOwnerDrawnComboBox::DoDeleteOneItem(n); + wxBitmapComboBoxBase::BCBDoDeleteOneItem(n); +} + +// ---------------------------------------------------------------------------- +// wxBitmapComboBox event handlers and such +// ---------------------------------------------------------------------------- + +void wxBitmapComboBox::OnSize(wxSizeEvent& event) +{ + // Prevent infinite looping + if ( !m_inResize ) + { + m_inResize = true; + DetermineIndent(); + m_inResize = false; + } + + event.Skip(); +} + +wxSize wxBitmapComboBox::DoGetBestSize() const +{ + wxSize sz = wxOwnerDrawnComboBox::DoGetBestSize(); + + if ( HasFlag(wxCB_READONLY) ) + { + // Scale control to match height of highest image. + int h2 = m_usedImgSize.y + IMAGE_SPACING_CTRL_VERTICAL; + + if ( h2 > sz.y ) + sz.y = h2; + + CacheBestSize(sz); + } + + return sz; +} + +// ---------------------------------------------------------------------------- +// wxBitmapComboBox miscellaneous +// ---------------------------------------------------------------------------- + +bool wxBitmapComboBox::SetFont(const wxFont& font) +{ + bool res = wxOwnerDrawnComboBox::SetFont(font); + UpdateInternals(); + return res; +} + +// ---------------------------------------------------------------------------- +// wxBitmapComboBox item drawing and measuring +// ---------------------------------------------------------------------------- + +void wxBitmapComboBox::OnDrawBackground(wxDC& dc, + const wxRect& rect, + int item, + int flags) const +{ + if ( GetCustomPaintWidth() == 0 || + !(flags & wxODCB_PAINTING_SELECTED) || + item < 0 || + ( (flags & wxODCB_PAINTING_CONTROL) && (GetInternalFlags() & wxCC_FULL_BUTTON)) ) + { + wxOwnerDrawnComboBox::OnDrawBackground(dc, rect, item, flags); + return; + } + + wxBitmapComboBoxBase::DrawBackground(dc, rect, item, flags); +} + +void wxBitmapComboBox::OnDrawItem(wxDC& dc, + const wxRect& rect, + int item, + int flags) const +{ + wxString text; + int imgAreaWidth = m_imgAreaWidth; + + if ( imgAreaWidth == 0 ) + { + wxOwnerDrawnComboBox::OnDrawItem(dc, rect, item, flags); + return; + } + + if ( flags & wxODCB_PAINTING_CONTROL ) + { + text = GetValue(); + if ( !HasFlag(wxCB_READONLY) ) + text.clear(); + } + else + { + text = GetString(item); + } + + wxBitmapComboBoxBase::DrawItem(dc, rect, item, text, flags); +} + +wxCoord wxBitmapComboBox::OnMeasureItem(size_t item) const +{ + return wxBitmapComboBoxBase::MeasureItem(item); +} + +wxCoord wxBitmapComboBox::OnMeasureItemWidth(size_t item) const +{ + wxCoord x, y; + GetTextExtent(GetString(item), &x, &y, 0, 0); + x += m_imgAreaWidth; + return x; +} + +#endif // defined(wxGENERIC_BITMAPCOMBOBOX) + +#endif // wxUSE_BITMAPCOMBOBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/busyinfo.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/busyinfo.cpp new file mode 100644 index 0000000000..003853d86a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/busyinfo.cpp @@ -0,0 +1,133 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/busyinfo.cpp +// Purpose: Information window when app is busy +// Author: Vaclav Slavik +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#if wxUSE_BUSYINFO + +// for all others, include the necessary headers +#ifndef WX_PRECOMP + #include "wx/frame.h" + #include "wx/stattext.h" + #include "wx/panel.h" + #include "wx/utils.h" +#endif + +#include "wx/busyinfo.h" +#include "wx/generic/stattextg.h" + +class WXDLLEXPORT wxInfoFrame : public wxFrame +{ +public: + wxInfoFrame(wxWindow *parent, const wxString& message); + +private: + wxDECLARE_NO_COPY_CLASS(wxInfoFrame); +}; + + +wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message) + : wxFrame(parent, wxID_ANY, wxT("Busy"), + wxDefaultPosition, wxDefaultSize, +#if defined(__WXX11__) + wxRESIZE_BORDER +#else + wxSIMPLE_BORDER +#endif + | wxFRAME_TOOL_WINDOW | wxSTAY_ON_TOP) +{ + wxPanel *panel = new wxPanel( this ); +#ifdef __WXGTK__ + wxGenericStaticText *text = new wxGenericStaticText(panel, wxID_ANY, message); +#else + wxStaticText *text = new wxStaticText(panel, wxID_ANY, message); +#endif + + panel->SetCursor(*wxHOURGLASS_CURSOR); + text->SetCursor(*wxHOURGLASS_CURSOR); + + // make the frame of at least the standard size (400*80) but big enough + // for the text we show + wxSize sizeText = text->GetBestSize(); +#ifdef __WXPM__ + int nX = 0; + int nY = 0; + int nWidth = 0; + int nHeight = 0; + int nParentHeight = parent->GetClientSize().y; + int nParentWidth = parent->GetClientSize().x; + int nColor; + + SetBackgroundColour(wxT("WHITE")); + nColor = (LONG)GetBackgroundColour().GetPixel(); + + ::WinSetPresParam( GetHwnd() + ,PP_BACKGROUNDCOLOR + ,sizeof(LONG) + ,(PVOID)&nColor + ); + panel->SetBackgroundColour(wxT("WHITE")); + nColor = (LONG)panel->GetBackgroundColour().GetPixel(); + + ::WinSetPresParam( GetHwndOf(panel) + ,PP_BACKGROUNDCOLOR + ,sizeof(LONG) + ,(PVOID)&nColor + ); + nWidth = wxMax(sizeText.x, 340) + 60; + nHeight = wxMax(sizeText.y, 40) + 40; + nX = (nParentWidth - nWidth) / 2; + nY = (nParentHeight / 2) - (nHeight / 2); + nY = nParentHeight - (nY + nHeight); + ::WinSetWindowPos( m_hFrame + ,HWND_TOP + ,nX + ,nY + ,nWidth + ,nHeight + ,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE + ); + text->SetBackgroundColour(wxT("WHITE")); + nColor = (LONG)text->GetBackgroundColour().GetPixel(); + + ::WinSetPresParam( GetHwndOf(text) + ,PP_BACKGROUNDCOLOR + ,sizeof(LONG) + ,(PVOID)&nColor + ); + text->Center(wxBOTH); +#else + SetClientSize(wxMax(sizeText.x, 340) + 60, wxMax(sizeText.y, 40) + 40); + + // need to size the panel correctly first so that text->Centre() works + panel->SetSize(GetClientSize()); + + text->Centre(wxBOTH); + Centre(wxBOTH); +#endif +} + +wxBusyInfo::wxBusyInfo(const wxString& message, wxWindow *parent) +{ + m_InfoFrame = new wxInfoFrame(parent, message); + m_InfoFrame->Show(true); + m_InfoFrame->Refresh(); + m_InfoFrame->Update(); +} + +wxBusyInfo::~wxBusyInfo() +{ + m_InfoFrame->Show(false); + m_InfoFrame->Close(); +} + +#endif // wxUSE_BUSYINFO diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/buttonbar.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/buttonbar.cpp new file mode 100644 index 0000000000..a2529b0091 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/buttonbar.cpp @@ -0,0 +1,560 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/buttonbar.cpp +// Purpose: wxButtonToolBar implementation +// Author: Julian Smart, after Robert Roebling, Vadim Zeitlin, SciTech +// Modified by: +// Created: 2006-04-13 +// Copyright: (c) Julian Smart, Robert Roebling, Vadim Zeitlin, +// SciTech Software, Inc. +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// Currently, only for Mac as a toolbar replacement. +#if defined(__WXMAC__) && wxUSE_TOOLBAR && wxUSE_BMPBUTTON + +#include "wx/generic/buttonbar.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/app.h" + #include "wx/log.h" + #include "wx/frame.h" + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/image.h" +#endif + +// ---------------------------------------------------------------------------- +// wxButtonToolBarTool: our implementation of wxToolBarToolBase +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxButtonToolBarTool : public wxToolBarToolBase +{ +public: + wxButtonToolBarTool(wxButtonToolBar *tbar, + int id, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled, + wxItemKind kind, + wxObject *clientData, + const wxString& shortHelp, + const wxString& longHelp) + : wxToolBarToolBase(tbar, id, label, bmpNormal, bmpDisabled, kind, + clientData, shortHelp, longHelp) + { + m_x = m_y = wxDefaultCoord; + m_width = + m_height = 0; + + m_button = NULL; + } + + wxButtonToolBarTool(wxButtonToolBar *tbar, + wxControl *control, + const wxString& label) + : wxToolBarToolBase(tbar, control, label) + { + m_x = m_y = wxDefaultCoord; + m_width = + m_height = 0; + m_button = NULL; + } + + wxBitmapButton* GetButton() const { return m_button; } + void SetButton(wxBitmapButton* button) { m_button = button; } + +public: + // the tool position (for controls) + wxCoord m_x; + wxCoord m_y; + wxCoord m_width; + wxCoord m_height; + +private: + // the control representing the button + wxBitmapButton* m_button; +}; + +// ============================================================================ +// wxButtonToolBar implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxButtonToolBar, wxControl) + +BEGIN_EVENT_TABLE(wxButtonToolBar, wxControl) + EVT_BUTTON(wxID_ANY, wxButtonToolBar::OnCommand) + EVT_PAINT(wxButtonToolBar::OnPaint) + EVT_LEFT_UP(wxButtonToolBar::OnLeftUp) +END_EVENT_TABLE() + +// ---------------------------------------------------------------------------- +// wxButtonToolBar creation +// ---------------------------------------------------------------------------- + +void wxButtonToolBar::Init() +{ + // no tools yet + m_needsLayout = false; + + // unknown widths for the tools and separators + m_widthSeparator = wxDefaultCoord; + + m_maxWidth = m_maxHeight = 0; + + m_labelMargin = 2; + m_labelHeight = 0; + + SetMargins(8, 2); + SetToolPacking(8); +} + +bool wxButtonToolBar::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if ( !wxToolBarBase::Create(parent, id, pos, size, style, + wxDefaultValidator, name) ) + { + return false; + } + + // wxColour lightBackground(244, 244, 244); + + wxFont font(wxSMALL_FONT->GetPointSize(), + wxNORMAL_FONT->GetFamily(), + wxNORMAL_FONT->GetStyle(), + wxFONTWEIGHT_NORMAL); + SetFont(font); + + // Calculate the label height if necessary + if (GetWindowStyle() & wxTB_TEXT) + { + wxClientDC dc(this); + dc.SetFont(font); + int w, h; + dc.GetTextExtent(wxT("X"), & w, & h); + m_labelHeight = h; + } + return true; +} + +wxButtonToolBar::~wxButtonToolBar() +{ +} + +// ---------------------------------------------------------------------------- +// wxButtonToolBar tool-related methods +// ---------------------------------------------------------------------------- + +wxToolBarToolBase *wxButtonToolBar::FindToolForPosition(wxCoord x, wxCoord y) const +{ + // check the "other" direction first: it must be inside the toolbar or we + // don't risk finding anything + if ( IsVertical() ) + { + if ( x < 0 || x > m_maxWidth ) + return NULL; + + // we always use x, even for a vertical toolbar, this makes the code + // below simpler + x = y; + } + else // horizontal + { + if ( y < 0 || y > m_maxHeight ) + return NULL; + } + + for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); + node; + node = node->GetNext() ) + { + wxButtonToolBarTool *tool = (wxButtonToolBarTool*) node->GetData(); + wxRect rectTool = GetToolRect(tool); + + wxCoord startTool, endTool; + GetRectLimits(rectTool, &startTool, &endTool); + + if ( x >= startTool && x <= endTool ) + { + // don't return the separators from here, they don't accept any + // input anyhow + return tool->IsSeparator() ? NULL : tool; + } + } + + return NULL; +} + +void wxButtonToolBar::GetRectLimits(const wxRect& rect, + wxCoord *start, + wxCoord *end) const +{ + wxCHECK_RET( start && end, wxT("NULL pointer in GetRectLimits") ); + + if ( IsVertical() ) + { + *start = rect.GetTop(); + *end = rect.GetBottom(); + } + else // horizontal + { + *start = rect.GetLeft(); + *end = rect.GetRight(); + } +} + + +void wxButtonToolBar::SetToolShortHelp(int id, const wxString& help) +{ + wxToolBarToolBase *tool = FindById(id); + + wxCHECK_RET( tool, wxT("SetToolShortHelp: no such tool") ); + + // TODO: set tooltip/short help + tool->SetShortHelp(help); +} + +bool wxButtonToolBar::DoInsertTool(size_t WXUNUSED(pos), + wxToolBarToolBase * WXUNUSED(tool)) +{ + return true; +} + +bool wxButtonToolBar::DoDeleteTool(size_t WXUNUSED(pos), + wxToolBarToolBase * WXUNUSED(tool)) +{ + // TODO + return true; +} + +void wxButtonToolBar::DoEnableTool(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(enable)) +{ + // TODO +} + +void wxButtonToolBar::DoToggleTool(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(toggle)) +{ + // TODO +} + +void wxButtonToolBar::DoSetToggle(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(toggle)) +{ + // TODO +} + +wxToolBarToolBase *wxButtonToolBar::CreateTool(int id, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled, + wxItemKind kind, + wxObject *clientData, + const wxString& shortHelp, + const wxString& longHelp) +{ + return new wxButtonToolBarTool(this, id, label, bmpNormal, bmpDisabled, kind, + clientData, shortHelp, longHelp); +} + +wxToolBarToolBase *wxButtonToolBar::CreateTool(wxControl *control, + const wxString& label) +{ + return new wxButtonToolBarTool(this, control, label); +} + +// ---------------------------------------------------------------------------- +// wxButtonToolBar geometry +// ---------------------------------------------------------------------------- + +wxRect wxButtonToolBar::GetToolRect(wxToolBarToolBase *toolBase) const +{ + const wxButtonToolBarTool *tool = (wxButtonToolBarTool *)toolBase; + + wxRect rect; + + wxCHECK_MSG( tool, rect, wxT("GetToolRect: NULL tool") ); + + // ensure that we always have the valid tool position + if ( m_needsLayout ) + { + wxConstCast(this, wxButtonToolBar)->DoLayout(); + } + + rect.x = tool->m_x - (m_toolPacking/2); + rect.y = tool->m_y; + + if ( IsVertical() ) + { + if (tool->IsButton()) + { + rect.width = m_defaultWidth; + rect.height = m_defaultHeight; + if (tool->GetButton()) + rect.SetSize(wxSize(tool->m_width, tool->m_height)); + } + else if (tool->IsSeparator()) + { + rect.width = m_defaultWidth; + rect.height = m_widthSeparator; + } + else // control + { + rect.width = tool->m_width; + rect.height = tool->m_height; + } + } + else // horizontal + { + if (tool->IsButton()) + { + rect.width = m_defaultWidth; + rect.height = m_defaultHeight; + if (tool->GetButton()) + rect.SetSize(wxSize(tool->m_width, tool->m_height)); + } + else if (tool->IsSeparator()) + { + rect.width = m_widthSeparator; + rect.height = m_defaultHeight; + } + else // control + { + rect.width = tool->m_width; + rect.height = tool->m_height; + } + } + + rect.width += m_toolPacking; + + return rect; +} + +bool wxButtonToolBar::Realize() +{ + if ( !wxToolBarBase::Realize() ) + return false; + + m_needsLayout = true; + DoLayout(); + + SetInitialSize(wxSize(m_maxWidth, m_maxHeight)); + + return true; +} + +void wxButtonToolBar::DoLayout() +{ + m_needsLayout = false; + + wxCoord x = m_xMargin, + y = m_yMargin; + + int maxHeight = 0; + + const wxCoord widthTool = IsVertical() ? m_defaultHeight : m_defaultWidth; + wxCoord margin = IsVertical() ? m_xMargin : m_yMargin; + wxCoord *pCur = IsVertical() ? &y : &x; + + // calculate the positions of all elements + for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); + node; + node = node->GetNext() ) + { + wxButtonToolBarTool *tool = (wxButtonToolBarTool *) node->GetData(); + + tool->m_x = x; + tool->m_y = y; + + if (tool->IsButton()) + { + if (!tool->GetButton()) + { + wxBitmapButton* bmpButton = new wxBitmapButton(this, tool->GetId(), tool->GetNormalBitmap(), wxPoint(tool->m_x, tool->m_y), wxDefaultSize, + wxBU_AUTODRAW|wxBORDER_NONE); + if (!tool->GetShortHelp().empty()) + bmpButton->SetLabel(tool->GetShortHelp()); + + tool->SetButton(bmpButton); + } + else + { + tool->GetButton()->Move(wxPoint(tool->m_x, tool->m_y)); + } + + int w = widthTool; + if (tool->GetButton()) + { + wxSize sz = tool->GetButton()->GetSize(); + w = sz.x; + + if (m_labelHeight > 0) + { + sz.y += (m_labelHeight + m_labelMargin); + + if (!tool->GetShortHelp().empty()) + { + wxClientDC dc(this); + dc.SetFont(GetFont()); + int tw, th; + dc.GetTextExtent(tool->GetShortHelp(), & tw, & th); + + // If the label is bigger than the icon, the label width + // becomes the new tool width, and we need to centre the + // the bitmap in this box. + if (tw > sz.x) + { + int newX = int(tool->m_x + (tw - sz.x)/2.0); + tool->GetButton()->Move(newX, tool->m_y); + sz.x = tw; + } + } + } + + maxHeight = wxMax(maxHeight, sz.y); + + tool->m_width = sz.x; + tool->m_height = sz.y; + w = sz.x; + } + + *pCur += (w + GetToolPacking()); + } + else if (tool->IsSeparator()) + { + *pCur += m_widthSeparator; + } + else if (!IsVertical()) // horizontal control + { + wxControl *control = tool->GetControl(); + wxSize size = control->GetSize(); + tool->m_y += (m_defaultHeight - size.y)/2; + tool->m_width = size.x; + tool->m_height = size.y; + + *pCur += tool->m_width; + + maxHeight = wxMax(maxHeight, size.y); + } + *pCur += margin; + } + + // calculate the total toolbar size + m_maxWidth = x + 2*m_xMargin; + m_maxHeight = maxHeight + 2*m_yMargin; + + if ((GetWindowStyle() & wxTB_NODIVIDER) == 0) + m_maxHeight += 2; + +} + +wxSize wxButtonToolBar::DoGetBestClientSize() const +{ + return wxSize(m_maxWidth, m_maxHeight); +} + +// receives button commands +void wxButtonToolBar::OnCommand(wxCommandEvent& event) +{ + wxButtonToolBarTool* tool = (wxButtonToolBarTool*) FindById(event.GetId()); + if (!tool) + { + event.Skip(); + return; + } + + if (tool->CanBeToggled()) + tool->Toggle(tool->IsToggled()); + + // TODO: handle toggle items + OnLeftClick(event.GetId(), false); + + if (tool->GetKind() == wxITEM_RADIO) + UnToggleRadioGroup(tool); + + if (tool->CanBeToggled()) + Refresh(); +} + +// paints a border +void wxButtonToolBar::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + + dc.SetFont(GetFont()); + dc.SetBackgroundMode(wxTRANSPARENT); + + for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); + node; + node = node->GetNext() ) + { + wxButtonToolBarTool *tool = (wxButtonToolBarTool*) node->GetData(); + wxRect rectTool = GetToolRect(tool); + if (tool->IsToggled()) + { + wxRect backgroundRect = rectTool; + backgroundRect.y = -1; backgroundRect.height = GetClientSize().y + 1; + wxBrush brush(wxColour(219, 219, 219)); + wxPen pen(wxColour(159, 159, 159)); + dc.SetBrush(brush); + dc.SetPen(pen); + dc.DrawRectangle(backgroundRect); + } + + if (m_labelHeight > 0 && !tool->GetShortHelp().empty()) + { + int tw, th; + dc.GetTextExtent(tool->GetShortHelp(), & tw, & th); + + int x = tool->m_x; + dc.DrawText(tool->GetShortHelp(), x, tool->m_y + tool->GetButton()->GetSize().y + m_labelMargin); + } + } + + if ((GetWindowStyle() & wxTB_NODIVIDER) == 0) + { + wxPen pen(wxColour(159, 159, 159)); + dc.SetPen(pen); + int x1 = 0; + int y1 = GetClientSize().y-1; + int x2 = GetClientSize().x; + int y2 = y1; + dc.DrawLine(x1, y1, x2, y2); + } +} + +// detects mouse clicks outside buttons +void wxButtonToolBar::OnLeftUp(wxMouseEvent& event) +{ + if (m_labelHeight > 0) + { + wxButtonToolBarTool* tool = (wxButtonToolBarTool*) FindToolForPosition(event.GetX(), event.GetY()); + if (tool && tool->GetButton() && (event.GetY() > (tool->m_y + tool->GetButton()->GetSize().y))) + { + wxCommandEvent event(wxEVT_BUTTON, tool->GetId()); + event.SetEventObject(tool->GetButton()); + if (!GetEventHandler()->ProcessEvent(event)) + event.Skip(); + } + } +} + +#endif // wxUSE_TOOLBAR && wxUSE_BMPBUTTON diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/calctrlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/calctrlg.cpp new file mode 100644 index 0000000000..40a549fbf4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/calctrlg.cpp @@ -0,0 +1,1724 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/calctrlg.cpp +// Purpose: implementation of the wxGenericCalendarCtrl +// Author: Vadim Zeitlin +// Modified by: +// Created: 29.12.99 +// Copyright: (c) 1999 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/brush.h" + #include "wx/combobox.h" + #include "wx/listbox.h" + #include "wx/stattext.h" + #include "wx/textctrl.h" +#endif //WX_PRECOMP + + +#if wxUSE_CALENDARCTRL + +#include "wx/spinctrl.h" +#include "wx/calctrl.h" +#include "wx/generic/calctrlg.h" + +#define DEBUG_PAINT 0 + +// ---------------------------------------------------------------------------- +// wxWin macros +// ---------------------------------------------------------------------------- + +#ifdef wxHAS_NATIVE_CALENDARCTRL + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxGenericCalendarCtrl, wxControl,"wx/calctrl.h") + +#endif + +BEGIN_EVENT_TABLE(wxGenericCalendarCtrl, wxControl) + EVT_PAINT(wxGenericCalendarCtrl::OnPaint) + + EVT_CHAR(wxGenericCalendarCtrl::OnChar) + + EVT_LEFT_DOWN(wxGenericCalendarCtrl::OnClick) + EVT_LEFT_DCLICK(wxGenericCalendarCtrl::OnDClick) + + EVT_SYS_COLOUR_CHANGED(wxGenericCalendarCtrl::OnSysColourChanged) +END_EVENT_TABLE() + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// helper functions +// ---------------------------------------------------------------------------- + +namespace +{ + +// add attributes that are set in attr +void AddAttr(wxCalendarDateAttr *self, const wxCalendarDateAttr& attr) +{ + if (attr.HasTextColour()) + self->SetTextColour(attr.GetTextColour()); + if (attr.HasBackgroundColour()) + self->SetBackgroundColour(attr.GetBackgroundColour()); + if (attr.HasBorderColour()) + self->SetBorderColour(attr.GetBorderColour()); + if (attr.HasFont()) + self->SetFont(attr.GetFont()); + if (attr.HasBorder()) + self->SetBorder(attr.GetBorder()); + if (attr.IsHoliday()) + self->SetHoliday(true); +} + +// remove attributes that are set in attr +void DelAttr(wxCalendarDateAttr *self, const wxCalendarDateAttr &attr) +{ + if (attr.HasTextColour()) + self->SetTextColour(wxNullColour); + if (attr.HasBackgroundColour()) + self->SetBackgroundColour(wxNullColour); + if (attr.HasBorderColour()) + self->SetBorderColour(wxNullColour); + if (attr.HasFont()) + self->SetFont(wxNullFont); + if (attr.HasBorder()) + self->SetBorder(wxCAL_BORDER_NONE); + if (attr.IsHoliday()) + self->SetHoliday(false); +} + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// wxGenericCalendarCtrl +// ---------------------------------------------------------------------------- + +wxGenericCalendarCtrl::wxGenericCalendarCtrl(wxWindow *parent, + wxWindowID id, + const wxDateTime& date, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + Init(); + + (void)Create(parent, id, date, pos, size, style, name); +} + +void wxGenericCalendarCtrl::Init() +{ + m_comboMonth = NULL; + m_spinYear = NULL; + m_staticYear = NULL; + m_staticMonth = NULL; + + m_userChangedYear = false; + + m_widthCol = + m_heightRow = + m_calendarWeekWidth = 0; + + wxDateTime::WeekDay wd; + for ( wd = wxDateTime::Sun; wd < wxDateTime::Inv_WeekDay; wxNextWDay(wd) ) + { + m_weekdays[wd] = wxDateTime::GetWeekDayName(wd, wxDateTime::Name_Abbr); + } + + for ( size_t n = 0; n < WXSIZEOF(m_attrs); n++ ) + { + m_attrs[n] = NULL; + } + + InitColours(); +} + +void wxGenericCalendarCtrl::InitColours() +{ + m_colHighlightFg = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + m_colHighlightBg = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); + m_colBackground = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); + m_colSurrounding = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT); + + m_colHolidayFg = *wxRED; + // don't set m_colHolidayBg - by default, same as our bg colour + + m_colHeaderFg = *wxBLUE; + m_colHeaderBg = *wxLIGHT_GREY; +} + +bool wxGenericCalendarCtrl::Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& date, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if ( !wxControl::Create(parent, id, pos, size, + style | wxCLIP_CHILDREN | wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE, + wxDefaultValidator, name) ) + { + return false; + } + + // needed to get the arrow keys normally used for the dialog navigation + SetWindowStyle(style | wxWANTS_CHARS); + + m_date = date.IsValid() ? date : wxDateTime::Today(); + + m_lowdate = wxDefaultDateTime; + m_highdate = wxDefaultDateTime; + + if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + { + CreateYearSpinCtrl(); + m_staticYear = new wxStaticText(GetParent(), wxID_ANY, m_date.Format(wxT("%Y")), + wxDefaultPosition, wxDefaultSize, + wxALIGN_CENTRE); + CreateMonthComboBox(); + m_staticMonth = new wxStaticText(GetParent(), wxID_ANY, m_date.Format(wxT("%B")), + wxDefaultPosition, wxDefaultSize, + wxALIGN_CENTRE); + } + + ShowCurrentControls(); + + // we need to set the position as well because the main control position + // is not the same as the one specified in pos if we have the controls + // above it + SetInitialSize(size); + SetPosition(pos); + + // Since we don't paint the whole background make sure that the platform + // will use the right one. + SetBackgroundColour(m_colBackground); + + SetHolidayAttrs(); + + return true; +} + +wxGenericCalendarCtrl::~wxGenericCalendarCtrl() +{ + for ( size_t n = 0; n < WXSIZEOF(m_attrs); n++ ) + { + delete m_attrs[n]; + } + + if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + { + delete m_comboMonth; + delete m_staticMonth; + delete m_spinYear; + delete m_staticYear; + } +} + +void wxGenericCalendarCtrl::SetWindowStyleFlag(long style) +{ + // changing this style doesn't work because the controls are not + // created/shown/hidden accordingly + wxASSERT_MSG( (style & wxCAL_SEQUENTIAL_MONTH_SELECTION) == + (m_windowStyle & wxCAL_SEQUENTIAL_MONTH_SELECTION), + wxT("wxCAL_SEQUENTIAL_MONTH_SELECTION can't be changed after creation") ); + + wxControl::SetWindowStyleFlag(style); +} + +// ---------------------------------------------------------------------------- +// Create the wxComboBox and wxSpinCtrl +// ---------------------------------------------------------------------------- + +void wxGenericCalendarCtrl::CreateMonthComboBox() +{ + m_comboMonth = new wxComboBox(GetParent(), wxID_ANY, + wxEmptyString, + wxDefaultPosition, + wxDefaultSize, + 0, NULL, + wxCB_READONLY | wxCLIP_SIBLINGS); + + wxDateTime::Month m; + for ( m = wxDateTime::Jan; m < wxDateTime::Inv_Month; wxNextMonth(m) ) + { + m_comboMonth->Append(wxDateTime::GetMonthName(m)); + } + + m_comboMonth->SetSelection(GetDate().GetMonth()); + m_comboMonth->SetSize(wxDefaultCoord, + wxDefaultCoord, + wxDefaultCoord, + wxDefaultCoord, + wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT); + + m_comboMonth->Connect(m_comboMonth->GetId(), wxEVT_COMBOBOX, + wxCommandEventHandler(wxGenericCalendarCtrl::OnMonthChange), + NULL, this); +} + +void wxGenericCalendarCtrl::CreateYearSpinCtrl() +{ + m_spinYear = new wxSpinCtrl(GetParent(), wxID_ANY, + GetDate().Format(wxT("%Y")), + wxDefaultPosition, + wxDefaultSize, + wxSP_ARROW_KEYS | wxCLIP_SIBLINGS, + -4300, 10000, GetDate().GetYear()); + + m_spinYear->Connect(m_spinYear->GetId(), wxEVT_TEXT, + wxCommandEventHandler(wxGenericCalendarCtrl::OnYearTextChange), + NULL, this); + + m_spinYear->Connect(m_spinYear->GetId(), wxEVT_SPINCTRL, + wxSpinEventHandler(wxGenericCalendarCtrl::OnYearChange), + NULL, this); +} + +// ---------------------------------------------------------------------------- +// forward wxWin functions to subcontrols +// ---------------------------------------------------------------------------- + +bool wxGenericCalendarCtrl::Destroy() +{ + if ( m_staticYear ) + m_staticYear->Destroy(); + if ( m_spinYear ) + m_spinYear->Destroy(); + if ( m_comboMonth ) + m_comboMonth->Destroy(); + if ( m_staticMonth ) + m_staticMonth->Destroy(); + + m_staticYear = NULL; + m_spinYear = NULL; + m_comboMonth = NULL; + m_staticMonth = NULL; + + return wxControl::Destroy(); +} + +bool wxGenericCalendarCtrl::Show(bool show) +{ + if ( !wxControl::Show(show) ) + { + return false; + } + + if ( !(GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + { + if ( GetMonthControl() ) + { + GetMonthControl()->Show(show); + GetYearControl()->Show(show); + } + } + + return true; +} + +bool wxGenericCalendarCtrl::Enable(bool enable) +{ + if ( !wxControl::Enable(enable) ) + { + return false; + } + + if ( !(GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + { + GetMonthControl()->Enable(enable); + GetYearControl()->Enable(enable); + } + + return true; +} + +// ---------------------------------------------------------------------------- +// enable/disable month/year controls +// ---------------------------------------------------------------------------- + +void wxGenericCalendarCtrl::ShowCurrentControls() +{ + if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + { + if ( AllowMonthChange() ) + { + m_comboMonth->Show(); + m_staticMonth->Hide(); + + if ( AllowYearChange() ) + { + m_spinYear->Show(); + m_staticYear->Hide(); + + // skip the rest + return; + } + } + else + { + m_comboMonth->Hide(); + m_staticMonth->Show(); + } + + // year change not allowed here + m_spinYear->Hide(); + m_staticYear->Show(); + } + //else: these controls are not even created, don't show/hide them +} + +wxControl *wxGenericCalendarCtrl::GetMonthControl() const +{ + return AllowMonthChange() ? (wxControl *)m_comboMonth : (wxControl *)m_staticMonth; +} + +wxControl *wxGenericCalendarCtrl::GetYearControl() const +{ + return AllowYearChange() ? (wxControl *)m_spinYear : (wxControl *)m_staticYear; +} + +void wxGenericCalendarCtrl::EnableYearChange(bool enable) +{ + if ( enable != AllowYearChange() ) + { + long style = GetWindowStyle(); + if ( enable ) + style &= ~wxCAL_NO_YEAR_CHANGE; + else + style |= wxCAL_NO_YEAR_CHANGE; + SetWindowStyle(style); + + ShowCurrentControls(); + if ( GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION ) + { + Refresh(); + } + } +} + +bool wxGenericCalendarCtrl::EnableMonthChange(bool enable) +{ + if ( !wxCalendarCtrlBase::EnableMonthChange(enable) ) + return false; + + ShowCurrentControls(); + if ( GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION ) + Refresh(); + + return true; +} + +// ---------------------------------------------------------------------------- +// changing date +// ---------------------------------------------------------------------------- + +bool wxGenericCalendarCtrl::SetDate(const wxDateTime& date) +{ + bool retval = true; + + bool sameMonth = m_date.GetMonth() == date.GetMonth(), + sameYear = m_date.GetYear() == date.GetYear(); + + if ( IsDateInRange(date) ) + { + if ( sameMonth && sameYear ) + { + // just change the day + ChangeDay(date); + } + else + { + if ( AllowMonthChange() && (AllowYearChange() || sameYear) ) + { + // change everything + m_date = date; + + if ( !(GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + { + // update the controls + m_comboMonth->SetSelection(m_date.GetMonth()); + + if ( AllowYearChange() ) + { + if ( !m_userChangedYear ) + m_spinYear->SetValue(m_date.Format(wxT("%Y"))); + } + } + + // as the month changed, holidays did too + SetHolidayAttrs(); + + // update the calendar + Refresh(); + } + else + { + // forbidden + retval = false; + } + } + } + + m_userChangedYear = false; + + return retval; +} + +void wxGenericCalendarCtrl::ChangeDay(const wxDateTime& date) +{ + if ( m_date != date ) + { + // we need to refresh the row containing the old date and the one + // containing the new one + wxDateTime dateOld = m_date; + m_date = date; + + RefreshDate(dateOld); + + // if the date is in the same row, it was already drawn correctly + if ( GetWeek(m_date) != GetWeek(dateOld) ) + { + RefreshDate(m_date); + } + } +} + +void wxGenericCalendarCtrl::SetDateAndNotify(const wxDateTime& date) +{ + const wxDateTime dateOld = GetDate(); + if ( date != dateOld && SetDate(date) ) + { + GenerateAllChangeEvents(dateOld); + } +} + +// ---------------------------------------------------------------------------- +// date range +// ---------------------------------------------------------------------------- + +bool wxGenericCalendarCtrl::SetLowerDateLimit(const wxDateTime& date /* = wxDefaultDateTime */) +{ + bool retval = true; + + if ( !(date.IsValid()) || ( ( m_highdate.IsValid() ) ? ( date <= m_highdate ) : true ) ) + { + m_lowdate = date; + } + else + { + retval = false; + } + + return retval; +} + +bool wxGenericCalendarCtrl::SetUpperDateLimit(const wxDateTime& date /* = wxDefaultDateTime */) +{ + bool retval = true; + + if ( !(date.IsValid()) || ( ( m_lowdate.IsValid() ) ? ( date >= m_lowdate ) : true ) ) + { + m_highdate = date; + } + else + { + retval = false; + } + + return retval; +} + +bool wxGenericCalendarCtrl::SetDateRange(const wxDateTime& lowerdate /* = wxDefaultDateTime */, const wxDateTime& upperdate /* = wxDefaultDateTime */) +{ + bool retval = true; + + if ( + ( !( lowerdate.IsValid() ) || ( ( upperdate.IsValid() ) ? ( lowerdate <= upperdate ) : true ) ) && + ( !( upperdate.IsValid() ) || ( ( lowerdate.IsValid() ) ? ( upperdate >= lowerdate ) : true ) ) ) + { + m_lowdate = lowerdate; + m_highdate = upperdate; + } + else + { + retval = false; + } + + return retval; +} + +bool wxGenericCalendarCtrl::GetDateRange(wxDateTime *lowerdate, + wxDateTime *upperdate) const +{ + if ( lowerdate ) + *lowerdate = m_lowdate; + if ( upperdate ) + *upperdate = m_highdate; + + return m_lowdate.IsValid() || m_highdate.IsValid(); +} + +// ---------------------------------------------------------------------------- +// date helpers +// ---------------------------------------------------------------------------- + +wxDateTime wxGenericCalendarCtrl::GetStartDate() const +{ + wxDateTime::Tm tm = m_date.GetTm(); + + wxDateTime date = wxDateTime(1, tm.mon, tm.year); + + // rewind back + date.SetToPrevWeekDay(GetWeekStart()); + + if ( GetWindowStyle() & wxCAL_SHOW_SURROUNDING_WEEKS ) + { + // We want to offset the calendar if we start on the first.. + if ( date.GetDay() == 1 ) + { + date -= wxDateSpan::Week(); + } + } + + return date; +} + +bool wxGenericCalendarCtrl::IsDateShown(const wxDateTime& date) const +{ + if ( !(GetWindowStyle() & wxCAL_SHOW_SURROUNDING_WEEKS) ) + { + return date.GetMonth() == m_date.GetMonth(); + } + else + { + return true; + } +} + +bool wxGenericCalendarCtrl::IsDateInRange(const wxDateTime& date) const +{ + // Check if the given date is in the range specified + return ( ( ( m_lowdate.IsValid() ) ? ( date >= m_lowdate ) : true ) + && ( ( m_highdate.IsValid() ) ? ( date <= m_highdate ) : true ) ); +} + +bool wxGenericCalendarCtrl::AdjustDateToRange(wxDateTime *date) const +{ + if ( m_lowdate.IsValid() && *date < m_lowdate ) + { + *date = m_lowdate; + return true; + } + + if ( m_highdate.IsValid() && *date > m_highdate ) + { + *date = m_highdate; + return true; + } + + return false; +} + +size_t wxGenericCalendarCtrl::GetWeek(const wxDateTime& date) const +{ + size_t retval = date.GetWeekOfMonth(HasFlag(wxCAL_MONDAY_FIRST) + ? wxDateTime::Monday_First + : wxDateTime::Sunday_First); + + if ( (GetWindowStyle() & wxCAL_SHOW_SURROUNDING_WEEKS) ) + { + // we need to offset an extra week if we "start" on the 1st of the month + wxDateTime::Tm tm = date.GetTm(); + + wxDateTime datetest = wxDateTime(1, tm.mon, tm.year); + + // rewind back + datetest.SetToPrevWeekDay(GetWeekStart()); + + if ( datetest.GetDay() == 1 ) + { + retval += 1; + } + } + + return retval; +} + +// ---------------------------------------------------------------------------- +// size management +// ---------------------------------------------------------------------------- + +// this is a composite control and it must arrange its parts each time its +// size or position changes: the combobox and spinctrl are along the top of +// the available area and the calendar takes up the rest of the space + +// the static controls are supposed to be always smaller than combo/spin so we +// always use the latter for size calculations and position the static to take +// the same space + +// the constants used for the layout +#define VERT_MARGIN 5 // distance between combo and calendar +#define HORZ_MARGIN 5 // spin + +wxSize wxGenericCalendarCtrl::DoGetBestSize() const +{ + // calc the size of the calendar + const_cast(this)->RecalcGeometry(); + + wxCoord width = 7*m_widthCol + m_calendarWeekWidth, + height = 7*m_heightRow + m_rowOffset + VERT_MARGIN; + + if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + { + const wxSize bestSizeCombo = m_comboMonth->GetBestSize(); + + height += wxMax(bestSizeCombo.y, m_spinYear->GetBestSize().y) + + VERT_MARGIN; + + wxCoord w2 = bestSizeCombo.x + HORZ_MARGIN + GetCharWidth()*8; + if ( width < w2 ) + width = w2; + } + + wxSize best(width, height); + if ( !HasFlag(wxBORDER_NONE) ) + { + best += GetWindowBorderSize(); + } + + CacheBestSize(best); + + return best; +} + +void wxGenericCalendarCtrl::DoMoveWindow(int x, int y, int width, int height) +{ + int yDiff; + + if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) && m_staticMonth ) + { + wxSize sizeCombo = m_comboMonth->GetEffectiveMinSize(); + wxSize sizeStatic = m_staticMonth->GetSize(); + wxSize sizeSpin = m_spinYear->GetSize(); + + int maxHeight = wxMax(sizeSpin.y, sizeCombo.y); + int dy = (maxHeight - sizeStatic.y) / 2; + m_comboMonth->Move(x, y + (maxHeight - sizeCombo.y)/2); + m_staticMonth->SetSize(x, y + dy, sizeCombo.x, -1); + + int xDiff = sizeCombo.x + HORZ_MARGIN; + + m_spinYear->SetSize(x + xDiff, y + (maxHeight - sizeSpin.y)/2, width - xDiff, maxHeight); + m_staticYear->SetSize(x + xDiff, y + dy, width - xDiff, sizeStatic.y); + + yDiff = maxHeight + VERT_MARGIN; + } + else // no controls on the top + { + yDiff = 0; + } + + wxControl::DoMoveWindow(x, y + yDiff, width, height - yDiff); +} + +void wxGenericCalendarCtrl::DoGetSize(int *width, int *height) const +{ + wxControl::DoGetSize( width, height ); +} + +void wxGenericCalendarCtrl::RecalcGeometry() +{ + wxClientDC dc(this); + + dc.SetFont(GetFont()); + + // determine the column width (weekday names are not necessarily wider + // than the numbers (in some languages), so let's not assume that they are) + m_widthCol = 0; + for ( int day = 10; day <= 31; day++) + { + wxCoord width; + dc.GetTextExtent(wxString::Format(wxT("%d"), day), &width, &m_heightRow); + if ( width > m_widthCol ) + { + // 1.5 times the width gives nice margins even if the weekday + // names are short + m_widthCol = width+width/2; + } + } + wxDateTime::WeekDay wd; + for ( wd = wxDateTime::Sun; wd < wxDateTime::Inv_WeekDay; wxNextWDay(wd) ) + { + wxCoord width; + dc.GetTextExtent(m_weekdays[wd], &width, &m_heightRow); + if ( width > m_widthCol ) + { + m_widthCol = width; + } + } + + m_calendarWeekWidth = HasFlag( wxCAL_SHOW_WEEK_NUMBERS ) + ? dc.GetTextExtent( wxString::Format( wxT( "%d" ), 42 )).GetWidth() + 4 : 0; + + // leave some margins + m_widthCol += 2; + m_heightRow += 2; + + m_rowOffset = HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) ? m_heightRow : 0; // conditional in relation to style +} + +// ---------------------------------------------------------------------------- +// drawing +// ---------------------------------------------------------------------------- + +void wxGenericCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + + dc.SetFont(GetFont()); + + RecalcGeometry(); + +#if DEBUG_PAINT + wxLogDebug("--- starting to paint, selection: %s, week %u\n", + m_date.Format("%a %d-%m-%Y %H:%M:%S").c_str(), + GetWeek(m_date)); +#endif + + wxCoord y = 0; + wxCoord x0 = m_calendarWeekWidth; + + if ( HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + { + // draw the sequential month-selector + + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); + dc.SetTextForeground(*wxBLACK); + dc.SetBrush(wxBrush(m_colHeaderBg, wxBRUSHSTYLE_SOLID)); + dc.SetPen(wxPen(m_colHeaderBg, 1, wxPENSTYLE_SOLID)); + dc.DrawRectangle(0, y, GetClientSize().x, m_heightRow); + + // Get extent of month-name + year + wxCoord monthw, monthh; + wxString headertext = m_date.Format(wxT("%B %Y")); + dc.GetTextExtent(headertext, &monthw, &monthh); + + // draw month-name centered above weekdays + wxCoord monthx = ((m_widthCol * 7) - monthw) / 2 + x0; + wxCoord monthy = ((m_heightRow - monthh) / 2) + y; + dc.DrawText(headertext, monthx, monthy); + + // calculate the "month-arrows" + wxPoint leftarrow[3]; + wxPoint rightarrow[3]; + + int arrowheight = monthh / 2; + + leftarrow[0] = wxPoint(0, arrowheight / 2); + leftarrow[1] = wxPoint(arrowheight / 2, 0); + leftarrow[2] = wxPoint(arrowheight / 2, arrowheight - 1); + + rightarrow[0] = wxPoint(0,0); + rightarrow[1] = wxPoint(arrowheight / 2, arrowheight / 2); + rightarrow[2] = wxPoint(0, arrowheight - 1); + + // draw the "month-arrows" + + wxCoord arrowy = (m_heightRow - arrowheight) / 2; + wxCoord larrowx = (m_widthCol - (arrowheight / 2)) / 2 + x0; + wxCoord rarrowx = ((m_widthCol - (arrowheight / 2)) / 2) + m_widthCol*6 + x0; + m_leftArrowRect = m_rightArrowRect = wxRect(0,0,0,0); + + if ( AllowMonthChange() ) + { + wxDateTime ldpm = wxDateTime(1,m_date.GetMonth(), m_date.GetYear()) - wxDateSpan::Day(); // last day prev month + // Check if range permits change + if ( IsDateInRange(ldpm) && ( ( ldpm.GetYear() == m_date.GetYear() ) ? true : AllowYearChange() ) ) + { + m_leftArrowRect = wxRect(larrowx - 3, arrowy - 3, (arrowheight / 2) + 8, (arrowheight + 6)); + dc.SetBrush(*wxBLACK_BRUSH); + dc.SetPen(*wxBLACK_PEN); + dc.DrawPolygon(3, leftarrow, larrowx , arrowy, wxWINDING_RULE); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.DrawRectangle(m_leftArrowRect); + } + wxDateTime fdnm = wxDateTime(1,m_date.GetMonth(), m_date.GetYear()) + wxDateSpan::Month(); // first day next month + if ( IsDateInRange(fdnm) && ( ( fdnm.GetYear() == m_date.GetYear() ) ? true : AllowYearChange() ) ) + { + m_rightArrowRect = wxRect(rarrowx - 4, arrowy - 3, (arrowheight / 2) + 8, (arrowheight + 6)); + dc.SetBrush(*wxBLACK_BRUSH); + dc.SetPen(*wxBLACK_PEN); + dc.DrawPolygon(3, rightarrow, rarrowx , arrowy, wxWINDING_RULE); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.DrawRectangle(m_rightArrowRect); + } + } + + y += m_heightRow; + } + + // first draw the week days + if ( IsExposed(x0, y, x0 + 7*m_widthCol, m_heightRow) ) + { +#if DEBUG_PAINT + wxLogDebug("painting the header"); +#endif + + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); + dc.SetTextForeground(m_colHeaderFg); + dc.SetBrush(wxBrush(m_colHeaderBg, wxBRUSHSTYLE_SOLID)); + dc.SetPen(wxPen(m_colHeaderBg, 1, wxPENSTYLE_SOLID)); + dc.DrawRectangle(0, y, GetClientSize().x, m_heightRow); + + bool startOnMonday = HasFlag(wxCAL_MONDAY_FIRST); + for ( int wd = 0; wd < 7; wd++ ) + { + size_t n; + if ( startOnMonday ) + n = wd == 6 ? 0 : wd + 1; + else + n = wd; + wxCoord dayw, dayh; + dc.GetTextExtent(m_weekdays[n], &dayw, &dayh); + dc.DrawText(m_weekdays[n], x0 + (wd*m_widthCol) + ((m_widthCol- dayw) / 2), y); // center the day-name + } + } + + // then the calendar itself + dc.SetTextForeground(*wxBLACK); + //dc.SetFont(*wxNORMAL_FONT); + + y += m_heightRow; + + // draw column with calendar week nr + if ( HasFlag( wxCAL_SHOW_WEEK_NUMBERS ) && IsExposed( 0, y, m_calendarWeekWidth, m_heightRow * 6 )) + { + dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetBrush(wxBrush(m_colHeaderBg, wxSOLID)); + dc.SetPen(wxPen(m_colHeaderBg, 1, wxSOLID)); + dc.DrawRectangle( 0, y, m_calendarWeekWidth, m_heightRow * 6 ); + wxDateTime date = GetStartDate(); + for ( size_t i = 0; i < 6; ++i ) + { + const int weekNr = date.GetWeekOfYear(); + wxString text = wxString::Format( wxT( "%d" ), weekNr ); + dc.DrawText( text, m_calendarWeekWidth - dc.GetTextExtent( text ).GetWidth() - 2, y + m_heightRow * i ); + date += wxDateSpan::Week(); + } + } + + wxDateTime date = GetStartDate(); + +#if DEBUG_PAINT + wxLogDebug("starting calendar from %s\n", + date.Format("%a %d-%m-%Y %H:%M:%S").c_str()); +#endif + + dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID); + for ( size_t nWeek = 1; nWeek <= 6; nWeek++, y += m_heightRow ) + { + // if the update region doesn't intersect this row, don't paint it + if ( !IsExposed(x0, y, x0 + 7*m_widthCol, m_heightRow - 1) ) + { + date += wxDateSpan::Week(); + + continue; + } + +#if DEBUG_PAINT + wxLogDebug("painting week %d at y = %d\n", nWeek, y); +#endif + + for ( int wd = 0; wd < 7; wd++ ) + { + dc.SetTextBackground(m_colBackground); + if ( IsDateShown(date) ) + { + // don't use wxDate::Format() which prepends 0s + unsigned int day = date.GetDay(); + wxString dayStr = wxString::Format(wxT("%u"), day); + wxCoord width; + dc.GetTextExtent(dayStr, &width, NULL); + + bool changedColours = false, + changedFont = false; + + bool isSel = false; + wxCalendarDateAttr *attr = NULL; + + if ( date.GetMonth() != m_date.GetMonth() || !IsDateInRange(date) ) + { + // draw the days of adjacent months in different colour + dc.SetTextForeground(m_colSurrounding); + changedColours = true; + } + else + { + isSel = date.IsSameDate(m_date); + attr = m_attrs[day - 1]; + + if ( isSel ) + { + dc.SetTextForeground(m_colHighlightFg); + dc.SetTextBackground(m_colHighlightBg); + + changedColours = true; + } + else if ( attr ) + { + wxColour colFg, colBg; + + if ( attr->IsHoliday() ) + { + colFg = m_colHolidayFg; + colBg = m_colHolidayBg; + } + else + { + colFg = attr->GetTextColour(); + colBg = attr->GetBackgroundColour(); + } + + if ( colFg.IsOk() ) + { + dc.SetTextForeground(colFg); + changedColours = true; + } + + if ( colBg.IsOk() ) + { + dc.SetTextBackground(colBg); + changedColours = true; + } + + if ( attr->HasFont() ) + { + dc.SetFont(attr->GetFont()); + changedFont = true; + } + } + } + + wxCoord x = wd*m_widthCol + (m_widthCol - width) / 2 + x0; + dc.DrawText(dayStr, x, y + 1); + + if ( !isSel && attr && attr->HasBorder() ) + { + wxColour colBorder; + if ( attr->HasBorderColour() ) + { + colBorder = attr->GetBorderColour(); + } + else + { + colBorder = GetForegroundColour(); + } + + wxPen pen(colBorder, 1, wxPENSTYLE_SOLID); + dc.SetPen(pen); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + + switch ( attr->GetBorder() ) + { + case wxCAL_BORDER_SQUARE: + dc.DrawRectangle(x - 2, y, + width + 4, m_heightRow); + break; + + case wxCAL_BORDER_ROUND: + dc.DrawEllipse(x - 2, y, + width + 4, m_heightRow); + break; + + default: + wxFAIL_MSG(wxT("unknown border type")); + } + } + + if ( changedColours ) + { + dc.SetTextForeground(GetForegroundColour()); + dc.SetTextBackground(GetBackgroundColour()); + } + + if ( changedFont ) + { + dc.SetFont(GetFont()); + } + } + //else: just don't draw it + + date += wxDateSpan::Day(); + } + } + + // Greying out out-of-range background + bool showSurrounding = (GetWindowStyle() & wxCAL_SHOW_SURROUNDING_WEEKS) != 0; + + date = ( showSurrounding ) ? GetStartDate() : wxDateTime(1, m_date.GetMonth(), m_date.GetYear()); + if ( !IsDateInRange(date) ) + { + wxDateTime firstOOR = GetLowerDateLimit() - wxDateSpan::Day(); // first out-of-range + + wxBrush oorbrush = *wxLIGHT_GREY_BRUSH; + oorbrush.SetStyle(wxBRUSHSTYLE_FDIAGONAL_HATCH); + + HighlightRange(&dc, date, firstOOR, wxTRANSPARENT_PEN, &oorbrush); + } + + date = ( showSurrounding ) ? GetStartDate() + wxDateSpan::Weeks(6) - wxDateSpan::Day() : wxDateTime().SetToLastMonthDay(m_date.GetMonth(), m_date.GetYear()); + if ( !IsDateInRange(date) ) + { + wxDateTime firstOOR = GetUpperDateLimit() + wxDateSpan::Day(); // first out-of-range + + wxBrush oorbrush = *wxLIGHT_GREY_BRUSH; + oorbrush.SetStyle(wxBRUSHSTYLE_FDIAGONAL_HATCH); + + HighlightRange(&dc, firstOOR, date, wxTRANSPARENT_PEN, &oorbrush); + } + +#if DEBUG_PAINT + wxLogDebug("+++ finished painting"); +#endif +} + +void wxGenericCalendarCtrl::RefreshDate(const wxDateTime& date) +{ + RecalcGeometry(); + + wxRect rect; + + // always refresh the whole row at once because our OnPaint() will draw + // the whole row anyhow - and this allows the small optimization in + // OnClick() below to work + rect.x = m_calendarWeekWidth; + + rect.y = (m_heightRow * GetWeek(date)) + m_rowOffset; + + rect.width = 7*m_widthCol; + rect.height = m_heightRow; + +#ifdef __WXMSW__ + // VZ: for some reason, the selected date seems to occupy more space under + // MSW - this is probably some bug in the font size calculations, but I + // don't know where exactly. This fix is ugly and leads to more + // refreshes than really needed, but without it the selected days + // leaves even more ugly underscores on screen. + rect.Inflate(0, 1); +#endif // MSW + +#if DEBUG_PAINT + wxLogDebug("*** refreshing week %d at (%d, %d)-(%d, %d)\n", + GetWeek(date), + rect.x, rect.y, + rect.x + rect.width, rect.y + rect.height); +#endif + + Refresh(true, &rect); +} + +void wxGenericCalendarCtrl::HighlightRange(wxPaintDC* pDC, const wxDateTime& fromdate, const wxDateTime& todate, const wxPen* pPen, const wxBrush* pBrush) +{ + // Highlights the given range using pen and brush + // Does nothing if todate < fromdate + + +#if DEBUG_PAINT + wxLogDebug("+++ HighlightRange: (%s) - (%s) +++", fromdate.Format("%d %m %Y"), todate.Format("%d %m %Y")); +#endif + + if ( todate >= fromdate ) + { + // do stuff + // date-coordinates + int fd, fw; + int td, tw; + + // implicit: both dates must be currently shown - checked by GetDateCoord + if ( GetDateCoord(fromdate, &fd, &fw) && GetDateCoord(todate, &td, &tw) ) + { +#if DEBUG_PAINT + wxLogDebug("Highlight range: (%i, %i) - (%i, %i)", fd, fw, td, tw); +#endif + if ( ( (tw - fw) == 1 ) && ( td < fd ) ) + { + // special case: interval 7 days or less not in same week + // split in two separate intervals + wxDateTime tfd = fromdate + wxDateSpan::Days(7-fd); + wxDateTime ftd = tfd + wxDateSpan::Day(); +#if DEBUG_PAINT + wxLogDebug("Highlight: Separate segments"); +#endif + // draw separately + HighlightRange(pDC, fromdate, tfd, pPen, pBrush); + HighlightRange(pDC, ftd, todate, pPen, pBrush); + } + else + { + int numpoints; + wxPoint corners[8]; // potentially 8 corners in polygon + wxCoord x0 = m_calendarWeekWidth; + + if ( fw == tw ) + { + // simple case: same week + numpoints = 4; + corners[0] = wxPoint(x0 + (fd - 1) * m_widthCol, (fw * m_heightRow) + m_rowOffset); + corners[1] = wxPoint(x0 + (fd - 1) * m_widthCol, ((fw + 1 ) * m_heightRow) + m_rowOffset); + corners[2] = wxPoint(x0 + td * m_widthCol, ((tw + 1) * m_heightRow) + m_rowOffset); + corners[3] = wxPoint(x0 + td * m_widthCol, (tw * m_heightRow) + m_rowOffset); + } + else + { + int cidx = 0; + // "complex" polygon + corners[cidx] = wxPoint(x0 + (fd - 1) * m_widthCol, (fw * m_heightRow) + m_rowOffset); cidx++; + + if ( fd > 1 ) + { + corners[cidx] = wxPoint(x0 + (fd - 1) * m_widthCol, ((fw + 1) * m_heightRow) + m_rowOffset); cidx++; + corners[cidx] = wxPoint(x0, ((fw + 1) * m_heightRow) + m_rowOffset); cidx++; + } + + corners[cidx] = wxPoint(x0, ((tw + 1) * m_heightRow) + m_rowOffset); cidx++; + corners[cidx] = wxPoint(x0 + td * m_widthCol, ((tw + 1) * m_heightRow) + m_rowOffset); cidx++; + + if ( td < 7 ) + { + corners[cidx] = wxPoint(x0 + td * m_widthCol, (tw * m_heightRow) + m_rowOffset); cidx++; + corners[cidx] = wxPoint(x0 + 7 * m_widthCol, (tw * m_heightRow) + m_rowOffset); cidx++; + } + + corners[cidx] = wxPoint(x0 + 7 * m_widthCol, (fw * m_heightRow) + m_rowOffset); cidx++; + + numpoints = cidx; + } + + // draw the polygon + pDC->SetBrush(*pBrush); + pDC->SetPen(*pPen); + pDC->DrawPolygon(numpoints, corners); + } + } + } + // else do nothing +#if DEBUG_PAINT + wxLogDebug("--- HighlightRange ---"); +#endif +} + +bool wxGenericCalendarCtrl::GetDateCoord(const wxDateTime& date, int *day, int *week) const +{ + bool retval = true; + +#if DEBUG_PAINT + wxLogDebug("+++ GetDateCoord: (%s) +++", date.Format("%d %m %Y")); +#endif + + if ( IsDateShown(date) ) + { + bool startOnMonday = HasFlag(wxCAL_MONDAY_FIRST); + + // Find day + *day = date.GetWeekDay(); + + if ( *day == 0 ) // sunday + { + *day = ( startOnMonday ) ? 7 : 1; + } + else + { + *day += ( startOnMonday ) ? 0 : 1; + } + + int targetmonth = date.GetMonth() + (12 * date.GetYear()); + int thismonth = m_date.GetMonth() + (12 * m_date.GetYear()); + + // Find week + if ( targetmonth == thismonth ) + { + *week = GetWeek(date); + } + else + { + if ( targetmonth < thismonth ) + { + *week = 1; // trivial + } + else // targetmonth > thismonth + { + wxDateTime ldcm; + int lastweek; + int lastday; + + // get the datecoord of the last day in the month currently shown +#if DEBUG_PAINT + wxLogDebug(" +++ LDOM +++"); +#endif + GetDateCoord(ldcm.SetToLastMonthDay(m_date.GetMonth(), m_date.GetYear()), &lastday, &lastweek); +#if DEBUG_PAINT + wxLogDebug(" --- LDOM ---"); +#endif + + wxTimeSpan span = date - ldcm; + + int daysfromlast = span.GetDays(); +#if DEBUG_PAINT + wxLogDebug("daysfromlast: %i", daysfromlast); +#endif + if ( daysfromlast + lastday > 7 ) // past week boundary + { + int wholeweeks = (daysfromlast / 7); + *week = wholeweeks + lastweek; + if ( (daysfromlast - (7 * wholeweeks) + lastday) > 7 ) + { + *week += 1; + } + } + else + { + *week = lastweek; + } + } + } + } + else + { + *day = -1; + *week = -1; + retval = false; + } + +#if DEBUG_PAINT + wxLogDebug("--- GetDateCoord: (%s) = (%i, %i) ---", date.Format("%d %m %Y"), *day, *week); +#endif + + return retval; +} + +// ---------------------------------------------------------------------------- +// mouse handling +// ---------------------------------------------------------------------------- + +void wxGenericCalendarCtrl::OnDClick(wxMouseEvent& event) +{ + if ( HitTest(event.GetPosition()) != wxCAL_HITTEST_DAY ) + { + event.Skip(); + } + else + { + GenerateEvent(wxEVT_CALENDAR_DOUBLECLICKED); + } +} + +void wxGenericCalendarCtrl::OnClick(wxMouseEvent& event) +{ + wxDateTime date; + wxDateTime::WeekDay wday; + switch ( HitTest(event.GetPosition(), &date, &wday) ) + { + case wxCAL_HITTEST_DAY: + if ( IsDateInRange(date) ) + { + ChangeDay(date); + + GenerateEvent(wxEVT_CALENDAR_SEL_CHANGED); + + // we know that the month/year never change when the user + // clicks on the control so there is no need to call + // GenerateAllChangeEvents() here, we know which event to send + GenerateEvent(wxEVT_CALENDAR_DAY_CHANGED); + } + break; + + case wxCAL_HITTEST_WEEK: + { + wxCalendarEvent send( this, date, wxEVT_CALENDAR_WEEK_CLICKED ); + HandleWindowEvent( send ); + } + break; + + case wxCAL_HITTEST_HEADER: + { + wxCalendarEvent eventWd(this, GetDate(), + wxEVT_CALENDAR_WEEKDAY_CLICKED); + eventWd.SetWeekDay(wday); + (void)GetEventHandler()->ProcessEvent(eventWd); + } + break; + + case wxCAL_HITTEST_DECMONTH: + case wxCAL_HITTEST_INCMONTH: + case wxCAL_HITTEST_SURROUNDING_WEEK: + SetDateAndNotify(date); // we probably only want to refresh the control. No notification.. (maybe as an option?) + break; + + default: + wxFAIL_MSG(wxT("unknown hittest code")); + // fall through + + case wxCAL_HITTEST_NOWHERE: + event.Skip(); + break; + } + + // as we don't (always) skip the message, we're not going to receive the + // focus on click by default if we don't do it ourselves + SetFocus(); +} + +wxCalendarHitTestResult wxGenericCalendarCtrl::HitTest(const wxPoint& pos, + wxDateTime *date, + wxDateTime::WeekDay *wd) +{ + RecalcGeometry(); + + // the position where the calendar really begins + wxCoord x0 = m_calendarWeekWidth; + + if ( HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) ) + { + // Header: month + + // we need to find out if the hit is on left arrow, on month or on right arrow + // left arrow? + if ( m_leftArrowRect.Contains(pos) ) + { + if ( date ) + { + if ( IsDateInRange(m_date - wxDateSpan::Month()) ) + { + *date = m_date - wxDateSpan::Month(); + } + else + { + *date = GetLowerDateLimit(); + } + } + + return wxCAL_HITTEST_DECMONTH; + } + + if ( m_rightArrowRect.Contains(pos) ) + { + if ( date ) + { + if ( IsDateInRange(m_date + wxDateSpan::Month()) ) + { + *date = m_date + wxDateSpan::Month(); + } + else + { + *date = GetUpperDateLimit(); + } + } + + return wxCAL_HITTEST_INCMONTH; + } + } + + if ( pos.x - x0 < 0 ) + { + if ( pos.x >= 0 && pos.y > m_rowOffset + m_heightRow && pos.y <= m_rowOffset + m_heightRow * 7 ) + { + if ( date ) + { + *date = GetStartDate(); + *date += wxDateSpan::Week() * (( pos.y - m_rowOffset ) / m_heightRow - 1 ); + } + if ( wd ) + *wd = GetWeekStart(); + return wxCAL_HITTEST_WEEK; + } + else // early exit -> the rest of the function checks for clicks on days + return wxCAL_HITTEST_NOWHERE; + } + + // header: week days + int wday = (pos.x - x0) / m_widthCol; + if ( wday > 6 ) + return wxCAL_HITTEST_NOWHERE; + if ( pos.y < (m_heightRow + m_rowOffset)) + { + if ( pos.y > m_rowOffset ) + { + if ( wd ) + { + if ( HasFlag(wxCAL_MONDAY_FIRST) ) + { + wday = wday == 6 ? 0 : wday + 1; + } + + *wd = (wxDateTime::WeekDay)wday; + } + + return wxCAL_HITTEST_HEADER; + } + else + { + return wxCAL_HITTEST_NOWHERE; + } + } + + int week = (pos.y - (m_heightRow + m_rowOffset)) / m_heightRow; + if ( week >= 6 || wday >= 7 ) + { + return wxCAL_HITTEST_NOWHERE; + } + + wxDateTime dt = GetStartDate() + wxDateSpan::Days(7*week + wday); + + if ( IsDateShown(dt) ) + { + if ( date ) + *date = dt; + + if ( dt.GetMonth() == m_date.GetMonth() ) + { + + return wxCAL_HITTEST_DAY; + } + else + { + return wxCAL_HITTEST_SURROUNDING_WEEK; + } + } + else + { + return wxCAL_HITTEST_NOWHERE; + } +} + +// ---------------------------------------------------------------------------- +// subcontrols events handling +// ---------------------------------------------------------------------------- + +void wxGenericCalendarCtrl::OnMonthChange(wxCommandEvent& event) +{ + wxDateTime::Tm tm = m_date.GetTm(); + + wxDateTime::Month mon = (wxDateTime::Month)event.GetInt(); + if ( tm.mday > wxDateTime::GetNumberOfDays(mon, tm.year) ) + { + tm.mday = wxDateTime::GetNumberOfDays(mon, tm.year); + } + + wxDateTime dt(tm.mday, mon, tm.year); + if ( AdjustDateToRange(&dt) ) + { + // The date must have been changed to ensure it's in valid range, + // reflect this in the month choice control. + m_comboMonth->SetSelection(dt.GetMonth()); + } + + SetDateAndNotify(dt); +} + +void wxGenericCalendarCtrl::HandleYearChange(wxCommandEvent& event) +{ + int year = (int)event.GetInt(); + if ( year == INT_MIN ) + { + // invalid year in the spin control, ignore it + return; + } + + wxDateTime::Tm tm = m_date.GetTm(); + + if ( tm.mday > wxDateTime::GetNumberOfDays(tm.mon, year) ) + { + tm.mday = wxDateTime::GetNumberOfDays(tm.mon, year); + } + + wxDateTime dt(tm.mday, tm.mon, year); + if ( AdjustDateToRange(&dt) ) + { + // As above, if the date was changed to keep it in valid range, its + // possibly changed year must be shown in the GUI. + m_spinYear->SetValue(dt.GetYear()); + } + + SetDateAndNotify(dt); +} + +void wxGenericCalendarCtrl::OnYearChange(wxSpinEvent& event) +{ + HandleYearChange( event ); +} + +void wxGenericCalendarCtrl::OnYearTextChange(wxCommandEvent& event) +{ + SetUserChangedYear(); + HandleYearChange(event); +} + +// Responds to colour changes, and passes event on to children. +void wxGenericCalendarCtrl::OnSysColourChanged(wxSysColourChangedEvent& event) +{ + // reinit colours + InitColours(); + + // Propagate the event to the children + wxControl::OnSysColourChanged(event); + + // Redraw control area + SetBackgroundColour(m_colBackground); + Refresh(); +} + +// ---------------------------------------------------------------------------- +// keyboard interface +// ---------------------------------------------------------------------------- + +void wxGenericCalendarCtrl::OnChar(wxKeyEvent& event) +{ + switch ( event.GetKeyCode() ) + { + case wxT('+'): + case WXK_ADD: + SetDateAndNotify(m_date + wxDateSpan::Year()); + break; + + case wxT('-'): + case WXK_SUBTRACT: + SetDateAndNotify(m_date - wxDateSpan::Year()); + break; + + case WXK_PAGEUP: + SetDateAndNotify(m_date - wxDateSpan::Month()); + break; + + case WXK_PAGEDOWN: + SetDateAndNotify(m_date + wxDateSpan::Month()); + break; + + case WXK_RIGHT: + if ( event.ControlDown() ) + { + wxDateTime target = m_date.SetToNextWeekDay(GetWeekEnd()); + AdjustDateToRange(&target); + SetDateAndNotify(target); + } + else + SetDateAndNotify(m_date + wxDateSpan::Day()); + break; + + case WXK_LEFT: + if ( event.ControlDown() ) + { + wxDateTime target = m_date.SetToPrevWeekDay(GetWeekStart()); + AdjustDateToRange(&target); + SetDateAndNotify(target); + } + else + SetDateAndNotify(m_date - wxDateSpan::Day()); + break; + + case WXK_UP: + SetDateAndNotify(m_date - wxDateSpan::Week()); + break; + + case WXK_DOWN: + SetDateAndNotify(m_date + wxDateSpan::Week()); + break; + + case WXK_HOME: + if ( event.ControlDown() ) + SetDateAndNotify(wxDateTime::Today()); + else + SetDateAndNotify(wxDateTime(1, m_date.GetMonth(), m_date.GetYear())); + break; + + case WXK_END: + SetDateAndNotify(wxDateTime(m_date).SetToLastMonthDay()); + break; + + case WXK_RETURN: + GenerateEvent(wxEVT_CALENDAR_DOUBLECLICKED); + break; + + default: + event.Skip(); + } +} + +// ---------------------------------------------------------------------------- +// holidays handling +// ---------------------------------------------------------------------------- + +void wxGenericCalendarCtrl::SetHoliday(size_t day) +{ + wxCHECK_RET( day > 0 && day < 32, wxT("invalid day in SetHoliday") ); + + wxCalendarDateAttr *attr = GetAttr(day); + if ( !attr ) + { + attr = new wxCalendarDateAttr; + } + + attr->SetHoliday(true); + + // can't use SetAttr() because it would delete this pointer + m_attrs[day - 1] = attr; +} + +void wxGenericCalendarCtrl::ResetHolidayAttrs() +{ + for ( size_t day = 0; day < 31; day++ ) + { + if ( m_attrs[day] ) + { + m_attrs[day]->SetHoliday(false); + } + } +} + +void wxGenericCalendarCtrl::Mark(size_t day, bool mark) +{ + wxCHECK_RET( day > 0 && day < 32, wxT("invalid day in Mark") ); + + const wxCalendarDateAttr& m = wxCalendarDateAttr::GetMark(); + if (mark) { + if ( m_attrs[day - 1] ) + AddAttr(m_attrs[day - 1], m); + else + SetAttr(day, new wxCalendarDateAttr(m)); + } + else { + if ( m_attrs[day - 1] ) + DelAttr(m_attrs[day - 1], m); + } +} + +//static +wxVisualAttributes +wxGenericCalendarCtrl::GetClassDefaultAttributes(wxWindowVariant variant) +{ + // Use the same color scheme as wxListBox + return wxListBox::GetClassDefaultAttributes(variant); +} + +#endif // wxUSE_CALENDARCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/caret.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/caret.cpp new file mode 100644 index 0000000000..0f5aa7ac51 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/caret.cpp @@ -0,0 +1,298 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/caret.cpp +// Purpose: generic wxCaret class implementation +// Author: Vadim Zeitlin (original code by Robert Roebling) +// Modified by: +// Created: 25.05.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CARET + +#ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/dcclient.h" + #include "wx/dcmemory.h" +#endif //WX_PRECOMP + +#include "wx/caret.h" + +// ---------------------------------------------------------------------------- +// global variables for this module +// ---------------------------------------------------------------------------- + +// the blink time (common to all carets for MSW compatibility) +static int gs_blinkTime = 500; // in milliseconds + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// timer stuff +// ---------------------------------------------------------------------------- + +wxCaretTimer::wxCaretTimer(wxCaret *caret) +{ + m_caret = caret; +} + +void wxCaretTimer::Notify() +{ + m_caret->OnTimer(); +} + +void wxCaret::OnTimer() +{ + // don't blink the caret when we don't have the focus + if ( m_hasFocus ) + Blink(); +} + +// ---------------------------------------------------------------------------- +// wxCaret static functions and data +// ---------------------------------------------------------------------------- + +int wxCaretBase::GetBlinkTime() +{ + return gs_blinkTime; +} + +void wxCaretBase::SetBlinkTime(int milliseconds) +{ + gs_blinkTime = milliseconds; + +#ifdef _WXGTK__ + GtkSettings *settings = gtk_settings_get_default(); + if (millseconds == 0) + { + gtk_settings_set_long_property(settings, "gtk-cursor-blink", gtk_false, NULL); + } + else + { + gtk_settings_set_long_property(settings, "gtk-cursor-blink", gtk_true, NULL); + gtk_settings_set_long_property(settings, "gtk-cursor-time", milliseconds, NULL); + } +#endif +} + +// ---------------------------------------------------------------------------- +// initialization and destruction +// ---------------------------------------------------------------------------- + +void wxCaret::InitGeneric() +{ + m_hasFocus = true; + m_blinkedOut = true; +#ifndef wxHAS_CARET_USING_OVERLAYS + m_xOld = + m_yOld = -1; + m_bmpUnderCaret.Create(m_width, m_height); +#endif +} + +wxCaret::~wxCaret() +{ + if ( IsVisible() ) + { + // stop blinking + if ( m_timer.IsRunning() ) + m_timer.Stop(); + } +} + +// ---------------------------------------------------------------------------- +// showing/hiding/moving the caret (base class interface) +// ---------------------------------------------------------------------------- + +void wxCaret::DoShow() +{ + int blinkTime = GetBlinkTime(); + if ( blinkTime ) + m_timer.Start(blinkTime); + + if ( m_blinkedOut ) + Blink(); +} + +void wxCaret::DoHide() +{ + m_timer.Stop(); + + if ( !m_blinkedOut ) + { + Blink(); + } +} + +void wxCaret::DoMove() +{ +#ifdef wxHAS_CARET_USING_OVERLAYS + m_overlay.Reset(); +#endif + if ( IsVisible() ) + { + if ( !m_blinkedOut ) + { + // hide it right now and it will be shown the next time it blinks + Blink(); + + // but if the caret is not blinking, we should blink it back into + // visibility manually + if ( !m_timer.IsRunning() ) + Blink(); + } + } + //else: will be shown at the correct location when it is shown +} + +void wxCaret::DoSize() +{ + int countVisible = m_countVisible; + if (countVisible > 0) + { + m_countVisible = 0; + DoHide(); + } +#ifdef wxHAS_CARET_USING_OVERLAYS + m_overlay.Reset(); +#else + // Change bitmap size + m_bmpUnderCaret = wxBitmap(m_width, m_height); +#endif + if (countVisible > 0) + { + m_countVisible = countVisible; + DoShow(); + } +} + +// ---------------------------------------------------------------------------- +// handling the focus +// ---------------------------------------------------------------------------- + +void wxCaret::OnSetFocus() +{ + m_hasFocus = true; + + if ( IsVisible() ) + Refresh(); +} + +void wxCaret::OnKillFocus() +{ + m_hasFocus = false; + + if ( IsVisible() ) + { + // the caret must be shown - otherwise, if it is hidden now, it will + // stay so until the focus doesn't return because it won't blink any + // more + + // hide it first if it isn't hidden ... + if ( !m_blinkedOut ) + Blink(); + + // .. and show it in the new style + Blink(); + } +} + +// ---------------------------------------------------------------------------- +// drawing the caret +// ---------------------------------------------------------------------------- + +void wxCaret::Blink() +{ + m_blinkedOut = !m_blinkedOut; + + Refresh(); +} + +void wxCaret::Refresh() +{ + wxClientDC dcWin(GetWindow()); +// this is the new code, switch to 0 if this gives problems +#ifdef wxHAS_CARET_USING_OVERLAYS + wxDCOverlay dcOverlay( m_overlay, &dcWin, m_x, m_y, m_width , m_height ); + if ( m_blinkedOut ) + { + dcOverlay.Clear(); + } + else + { + DoDraw( &dcWin, GetWindow() ); + } +#else + wxMemoryDC dcMem; + dcMem.SelectObject(m_bmpUnderCaret); + if ( m_blinkedOut ) + { + // restore the old image + dcWin.Blit(m_xOld, m_yOld, m_width, m_height, + &dcMem, 0, 0); + m_xOld = + m_yOld = -1; + } + else + { + if ( m_xOld == -1 && m_yOld == -1 ) + { + // save the part we're going to overdraw + dcMem.Blit(0, 0, m_width, m_height, + &dcWin, m_x, m_y); + + m_xOld = m_x; + m_yOld = m_y; + } + //else: we already saved the image below the caret, don't do it any + // more + + // and draw the caret there + DoDraw(&dcWin, GetWindow()); + } +#endif +} + +void wxCaret::DoDraw(wxDC *dc, wxWindow* win) +{ + wxPen pen(*wxBLACK_PEN); + wxBrush brush(*wxBLACK_BRUSH); + if (win) + { + wxColour backgroundColour(win->GetBackgroundColour()); + if (backgroundColour.Red() < 100 && + backgroundColour.Green() < 100 && + backgroundColour.Blue() < 100) + { + pen = *wxWHITE_PEN; + brush = *wxWHITE_BRUSH; + } + } + dc->SetPen( pen ); + dc->SetBrush(m_hasFocus ? brush : *wxTRANSPARENT_BRUSH); + + // VZ: unfortunately, the rectangle comes out a pixel smaller when this is + // done under wxGTK - no idea why + //dc->SetLogicalFunction(wxINVERT); + + dc->DrawRectangle(m_x, m_y, m_width, m_height); +} + +#endif // wxUSE_CARET diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/choicbkg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/choicbkg.cpp new file mode 100644 index 0000000000..e397cc0003 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/choicbkg.cpp @@ -0,0 +1,253 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/choicbkg.cpp +// Purpose: generic implementation of wxChoicebook +// Author: Vadim Zeitlin +// Modified by: Wlodzimierz ABX Skiba from generic/listbkg.cpp +// Created: 15.09.04 +// Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CHOICEBOOK + +#include "wx/choicebk.h" + +#ifndef WX_PRECOMP + #include "wx/settings.h" + #include "wx/choice.h" + #include "wx/sizer.h" +#endif + +#include "wx/imaglist.h" + +// ---------------------------------------------------------------------------- +// various wxWidgets macros +// ---------------------------------------------------------------------------- + +// check that the page index is valid +#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount()) + +// ---------------------------------------------------------------------------- +// event table +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxChoicebook, wxBookCtrlBase) + +wxDEFINE_EVENT( wxEVT_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_CHOICEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); + +BEGIN_EVENT_TABLE(wxChoicebook, wxBookCtrlBase) + EVT_CHOICE(wxID_ANY, wxChoicebook::OnChoiceSelected) +END_EVENT_TABLE() + +// ============================================================================ +// wxChoicebook implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxChoicebook creation +// ---------------------------------------------------------------------------- + +bool +wxChoicebook::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT ) + { + style |= wxBK_TOP; + } + + // no border for this control, it doesn't look nice together with + // wxChoice border + style &= ~wxBORDER_MASK; + style |= wxBORDER_NONE; + + if ( !wxControl::Create(parent, id, pos, size, style, + wxDefaultValidator, name) ) + return false; + + m_bookctrl = new wxChoice + ( + this, + wxID_ANY, + wxDefaultPosition, + wxDefaultSize + ); + + wxSizer* mainSizer = new wxBoxSizer(IsVertical() ? wxVERTICAL : wxHORIZONTAL); + + if (style & wxBK_RIGHT || style & wxBK_BOTTOM) + mainSizer->Add(0, 0, 1, wxEXPAND, 0); + + m_controlSizer = new wxBoxSizer(IsVertical() ? wxHORIZONTAL : wxVERTICAL); + m_controlSizer->Add(m_bookctrl, 1, (IsVertical() ? wxALIGN_CENTRE_VERTICAL : wxALIGN_CENTRE) |wxGROW, 0); + mainSizer->Add(m_controlSizer, 0, (IsVertical() ? (int) wxGROW : (int) wxALIGN_CENTRE_VERTICAL)|wxALL, m_controlMargin); + SetSizer(mainSizer); + return true; +} + +// ---------------------------------------------------------------------------- +// accessing the pages +// ---------------------------------------------------------------------------- + +bool wxChoicebook::SetPageText(size_t n, const wxString& strText) +{ + GetChoiceCtrl()->SetString(n, strText); + + return true; +} + +wxString wxChoicebook::GetPageText(size_t n) const +{ + return GetChoiceCtrl()->GetString(n); +} + +int wxChoicebook::GetPageImage(size_t WXUNUSED(n)) const +{ + return wxNOT_FOUND; +} + +bool wxChoicebook::SetPageImage(size_t WXUNUSED(n), int WXUNUSED(imageId)) +{ + // fail silently, the code may be written to use one of several book + // classes and call SetPageImage() unconditionally, it's better to just + // ignore it (which is the best we can do short of rewriting this class to + // use wxBitmapComboBox anyhow) than complain loudly about a rather + // harmless problem + + return false; +} + +// ---------------------------------------------------------------------------- +// miscellaneous other stuff +// ---------------------------------------------------------------------------- + +void wxChoicebook::DoSetWindowVariant(wxWindowVariant variant) +{ + wxBookCtrlBase::DoSetWindowVariant(variant); + if (m_bookctrl) + m_bookctrl->SetWindowVariant(variant); +} + +void wxChoicebook::SetImageList(wxImageList *imageList) +{ + // TODO: can be implemented in form of static bitmap near choice control + + wxBookCtrlBase::SetImageList(imageList); +} + +// ---------------------------------------------------------------------------- +// selection +// ---------------------------------------------------------------------------- + +wxBookCtrlEvent* wxChoicebook::CreatePageChangingEvent() const +{ + return new wxBookCtrlEvent(wxEVT_CHOICEBOOK_PAGE_CHANGING, m_windowId); +} + +void wxChoicebook::MakeChangedEvent(wxBookCtrlEvent &event) +{ + event.SetEventType(wxEVT_CHOICEBOOK_PAGE_CHANGED); +} + +// ---------------------------------------------------------------------------- +// adding/removing the pages +// ---------------------------------------------------------------------------- + +bool +wxChoicebook::InsertPage(size_t n, + wxWindow *page, + const wxString& text, + bool bSelect, + int imageId) +{ + if ( !wxBookCtrlBase::InsertPage(n, page, text, bSelect, imageId) ) + return false; + + GetChoiceCtrl()->Insert(text, n); + + // if the inserted page is before the selected one, we must update the + // index of the selected page + if ( int(n) <= m_selection ) + { + // one extra page added + m_selection++; + GetChoiceCtrl()->Select(m_selection); + } + + if ( !DoSetSelectionAfterInsertion(n, bSelect) ) + page->Hide(); + + return true; +} + +wxWindow *wxChoicebook::DoRemovePage(size_t page) +{ + wxWindow *win = wxBookCtrlBase::DoRemovePage(page); + + if ( win ) + { + GetChoiceCtrl()->Delete(page); + + DoSetSelectionAfterRemoval(page); + } + + return win; +} + + +bool wxChoicebook::DeleteAllPages() +{ + GetChoiceCtrl()->Clear(); + return wxBookCtrlBase::DeleteAllPages(); +} + +// ---------------------------------------------------------------------------- +// wxChoicebook events +// ---------------------------------------------------------------------------- + +void wxChoicebook::OnChoiceSelected(wxCommandEvent& eventChoice) +{ + if ( eventChoice.GetEventObject() != m_bookctrl ) + { + eventChoice.Skip(); + return; + } + + const int selNew = eventChoice.GetSelection(); + + if ( selNew == m_selection ) + { + // this event can only come from our own Select(m_selection) below + // which we call when the page change is vetoed, so we should simply + // ignore it + return; + } + + SetSelection(selNew); + + // change wasn't allowed, return to previous state + if (m_selection != selNew) + GetChoiceCtrl()->Select(m_selection); +} + +#endif // wxUSE_CHOICEBOOK diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/choicdgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/choicdgg.cpp new file mode 100644 index 0000000000..6acb6833f9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/choicdgg.cpp @@ -0,0 +1,671 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/choicdgg.cpp +// Purpose: Choice dialogs +// Author: Julian Smart +// Modified by: 03.11.00: VZ to add wxArrayString and multiple sel functions +// Created: 04/01/98 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CHOICEDLG + +#ifndef WX_PRECOMP + #include + #include "wx/utils.h" + #include "wx/dialog.h" + #include "wx/button.h" + #include "wx/listbox.h" + #include "wx/checklst.h" + #include "wx/stattext.h" + #include "wx/intl.h" + #include "wx/sizer.h" + #include "wx/arrstr.h" +#endif + +#include "wx/statline.h" +#include "wx/settings.h" +#include "wx/generic/choicdgg.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +#define wxID_LISTBOX 3000 + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +// convert wxArrayString into a wxString[] which must be delete[]d by caller +static int ConvertWXArrayToC(const wxArrayString& aChoices, wxString **choices); + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// helpers +// ---------------------------------------------------------------------------- + +int ConvertWXArrayToC(const wxArrayString& aChoices, wxString **choices) +{ + int n = aChoices.GetCount(); + *choices = new wxString[n]; + + for ( int i = 0; i < n; i++ ) + { + (*choices)[i] = aChoices[i]; + } + + return n; +} + +// ---------------------------------------------------------------------------- +// wrapper functions +// ---------------------------------------------------------------------------- + +wxString wxGetSingleChoice( const wxString& message, + const wxString& caption, + int n, const wxString *choices, + wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), + bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height), + int initialSelection) +{ + wxSingleChoiceDialog dialog(parent, message, caption, n, choices); + + dialog.SetSelection(initialSelection); + + wxString choice; + if ( dialog.ShowModal() == wxID_OK ) + choice = dialog.GetStringSelection(); + + return choice; +} + +wxString wxGetSingleChoice( const wxString& message, + const wxString& caption, + const wxArrayString& aChoices, + wxWindow *parent, + int x, int y, + bool centre, + int width, int height, + int initialSelection) +{ + wxString *choices; + int n = ConvertWXArrayToC(aChoices, &choices); + wxString res = wxGetSingleChoice(message, caption, n, choices, parent, + x, y, centre, width, height, + initialSelection); + delete [] choices; + + return res; +} + +wxString wxGetSingleChoice( const wxString& message, + const wxString& caption, + const wxArrayString& choices, + int initialSelection, + wxWindow *parent) +{ + return wxGetSingleChoice(message, caption, choices, parent, + wxDefaultCoord, wxDefaultCoord, + true, wxCHOICE_WIDTH, wxCHOICE_HEIGHT, + initialSelection); +} + +wxString wxGetSingleChoice( const wxString& message, + const wxString& caption, + int n, const wxString *choices, + int initialSelection, + wxWindow *parent) +{ + return wxGetSingleChoice(message, caption, n, choices, parent, + wxDefaultCoord, wxDefaultCoord, + true, wxCHOICE_WIDTH, wxCHOICE_HEIGHT, + initialSelection); +} + +int wxGetSingleChoiceIndex( const wxString& message, + const wxString& caption, + int n, const wxString *choices, + wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), + bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height), + int initialSelection) +{ + wxSingleChoiceDialog dialog(parent, message, caption, n, choices); + + dialog.SetSelection(initialSelection); + + int choice; + if ( dialog.ShowModal() == wxID_OK ) + choice = dialog.GetSelection(); + else + choice = -1; + + return choice; +} + +int wxGetSingleChoiceIndex( const wxString& message, + const wxString& caption, + const wxArrayString& aChoices, + wxWindow *parent, + int x, int y, + bool centre, + int width, int height, + int initialSelection) +{ + wxString *choices; + int n = ConvertWXArrayToC(aChoices, &choices); + int res = wxGetSingleChoiceIndex(message, caption, n, choices, parent, + x, y, centre, width, height, + initialSelection); + delete [] choices; + + return res; +} + +int wxGetSingleChoiceIndex( const wxString& message, + const wxString& caption, + const wxArrayString& choices, + int initialSelection, + wxWindow *parent) +{ + return wxGetSingleChoiceIndex(message, caption, choices, parent, + wxDefaultCoord, wxDefaultCoord, + true, wxCHOICE_WIDTH, wxCHOICE_HEIGHT, + initialSelection); +} + + +int wxGetSingleChoiceIndex( const wxString& message, + const wxString& caption, + int n, const wxString *choices, + int initialSelection, + wxWindow *parent) +{ + return wxGetSingleChoiceIndex(message, caption, n, choices, parent, + wxDefaultCoord, wxDefaultCoord, + true, wxCHOICE_WIDTH, wxCHOICE_HEIGHT, + initialSelection); +} + + +void *wxGetSingleChoiceData( const wxString& message, + const wxString& caption, + int n, const wxString *choices, + void **client_data, + wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), + bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height), + int initialSelection) +{ + wxSingleChoiceDialog dialog(parent, message, caption, n, choices, + client_data); + + dialog.SetSelection(initialSelection); + + void *data; + if ( dialog.ShowModal() == wxID_OK ) + data = dialog.GetSelectionData(); + else + data = NULL; + + return data; +} + +void *wxGetSingleChoiceData( const wxString& message, + const wxString& caption, + const wxArrayString& aChoices, + void **client_data, + wxWindow *parent, + int x, int y, + bool centre, + int width, int height, + int initialSelection) +{ + wxString *choices; + int n = ConvertWXArrayToC(aChoices, &choices); + void *res = wxGetSingleChoiceData(message, caption, n, choices, + client_data, parent, + x, y, centre, width, height, + initialSelection); + delete [] choices; + + return res; +} + +void* wxGetSingleChoiceData( const wxString& message, + const wxString& caption, + const wxArrayString& choices, + void **client_data, + int initialSelection, + wxWindow *parent) +{ + return wxGetSingleChoiceData(message, caption, choices, + client_data, parent, + wxDefaultCoord, wxDefaultCoord, + true, wxCHOICE_WIDTH, wxCHOICE_HEIGHT, + initialSelection); +} + +void* wxGetSingleChoiceData( const wxString& message, + const wxString& caption, + int n, const wxString *choices, + void **client_data, + int initialSelection, + wxWindow *parent) +{ + return wxGetSingleChoiceData(message, caption, n, choices, + client_data, parent, + wxDefaultCoord, wxDefaultCoord, + true, wxCHOICE_WIDTH, wxCHOICE_HEIGHT, + initialSelection); +} + + +int wxGetSelectedChoices(wxArrayInt& selections, + const wxString& message, + const wxString& caption, + int n, const wxString *choices, + wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), + bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height)) +{ + wxMultiChoiceDialog dialog(parent, message, caption, n, choices); + + // call this even if selections array is empty and this then (correctly) + // deselects the first item which is selected by default + dialog.SetSelections(selections); + + if ( dialog.ShowModal() != wxID_OK ) + { + // NB: intentionally do not clear the selections array here, the caller + // might want to preserve its original contents if the dialog was + // cancelled + return -1; + } + + selections = dialog.GetSelections(); + return selections.GetCount(); +} + +int wxGetSelectedChoices(wxArrayInt& selections, + const wxString& message, + const wxString& caption, + const wxArrayString& aChoices, + wxWindow *parent, + int x, int y, + bool centre, + int width, int height) +{ + wxString *choices; + int n = ConvertWXArrayToC(aChoices, &choices); + int res = wxGetSelectedChoices(selections, message, caption, + n, choices, parent, + x, y, centre, width, height); + delete [] choices; + + return res; +} + +#if WXWIN_COMPATIBILITY_2_8 +size_t wxGetMultipleChoices(wxArrayInt& selections, + const wxString& message, + const wxString& caption, + int n, const wxString *choices, + wxWindow *parent, + int x, int y, + bool centre, + int width, int height) +{ + int rc = wxGetSelectedChoices(selections, message, caption, + n, choices, + parent, x, y, centre, width, height); + if ( rc == -1 ) + { + selections.clear(); + return 0; + } + + return rc; +} + +size_t wxGetMultipleChoices(wxArrayInt& selections, + const wxString& message, + const wxString& caption, + const wxArrayString& aChoices, + wxWindow *parent, + int x, int y, + bool centre, + int width, int height) +{ + int rc = wxGetSelectedChoices(selections, message, caption, + aChoices, + parent, x, y, centre, width, height); + if ( rc == -1 ) + { + selections.clear(); + return 0; + } + + return rc; +} +#endif // WXWIN_COMPATIBILITY_2_8 + +// ---------------------------------------------------------------------------- +// wxAnyChoiceDialog +// ---------------------------------------------------------------------------- + +bool wxAnyChoiceDialog::Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + int n, const wxString *choices, + long styleDlg, + const wxPoint& pos, + long styleLbox) +{ + // extract the buttons styles from the dialog one and remove them from it + const long styleBtns = styleDlg & (wxOK | wxCANCEL); + styleDlg &= ~styleBtns; + + if ( !wxDialog::Create(parent, wxID_ANY, caption, pos, wxDefaultSize, styleDlg) ) + return false; + + wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); + + // 1) text message + topsizer-> + Add(CreateTextSizer(message), wxSizerFlags().Expand().TripleBorder()); + + // 2) list box + m_listbox = CreateList(n, choices, styleLbox); + + if ( n > 0 ) + m_listbox->SetSelection(0); + + topsizer-> + Add(m_listbox, wxSizerFlags().Expand().Proportion(1).TripleBorder(wxLEFT | wxRIGHT)); + + // 3) buttons if any + wxSizer * + buttonSizer = CreateSeparatedButtonSizer(styleBtns); + if ( buttonSizer ) + { + topsizer->Add(buttonSizer, wxSizerFlags().Expand().DoubleBorder()); + } + + SetSizer( topsizer ); + + topsizer->SetSizeHints( this ); + topsizer->Fit( this ); + + if ( styleDlg & wxCENTRE ) + Centre(wxBOTH); + + m_listbox->SetFocus(); + + return true; +} + +bool wxAnyChoiceDialog::Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + long styleDlg, + const wxPoint& pos, + long styleLbox) +{ + wxCArrayString chs(choices); + return Create(parent, message, caption, chs.GetCount(), chs.GetStrings(), + styleDlg, pos, styleLbox); +} + +wxListBoxBase *wxAnyChoiceDialog::CreateList(int n, const wxString *choices, long styleLbox) +{ + return new wxListBox( this, wxID_LISTBOX, + wxDefaultPosition, wxDefaultSize, + n, choices, + styleLbox ); +} + +// ---------------------------------------------------------------------------- +// wxSingleChoiceDialog +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog) + EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) +#ifndef __SMARTPHONE__ + EVT_LISTBOX_DCLICK(wxID_LISTBOX, wxSingleChoiceDialog::OnListBoxDClick) +#endif +#ifdef __WXWINCE__ + EVT_JOY_BUTTON_DOWN(wxSingleChoiceDialog::OnJoystickButtonDown) +#endif +END_EVENT_TABLE() + +IMPLEMENT_DYNAMIC_CLASS(wxSingleChoiceDialog, wxDialog) + +bool wxSingleChoiceDialog::Create( wxWindow *parent, + const wxString& message, + const wxString& caption, + int n, + const wxString *choices, + void **clientData, + long style, + const wxPoint& pos ) +{ + if ( !wxAnyChoiceDialog::Create(parent, message, caption, + n, choices, + style, pos) ) + return false; + + m_selection = n > 0 ? 0 : -1; + + if (clientData) + { + for (int i = 0; i < n; i++) + m_listbox->SetClientData(i, clientData[i]); + } + + return true; +} + +bool wxSingleChoiceDialog::Create( wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + void **clientData, + long style, + const wxPoint& pos ) +{ + wxCArrayString chs(choices); + return Create( parent, message, caption, chs.GetCount(), chs.GetStrings(), + clientData, style, pos ); +} + +// Set the selection +void wxSingleChoiceDialog::SetSelection(int sel) +{ + wxCHECK_RET( sel >= 0 && (unsigned)sel < m_listbox->GetCount(), + "Invalid initial selection" ); + + m_listbox->SetSelection(sel); + m_selection = sel; +} + +void wxSingleChoiceDialog::OnOK(wxCommandEvent& WXUNUSED(event)) +{ + DoChoice(); +} + +#ifndef __SMARTPHONE__ +void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event)) +{ + DoChoice(); +} +#endif + +#ifdef __WXWINCE__ +void wxSingleChoiceDialog::OnJoystickButtonDown(wxJoystickEvent& WXUNUSED(event)) +{ + DoChoice(); +} +#endif + +void wxSingleChoiceDialog::DoChoice() +{ + m_selection = m_listbox->GetSelection(); + m_stringSelection = m_listbox->GetStringSelection(); + + if ( m_listbox->HasClientUntypedData() ) + SetClientData(m_listbox->GetClientData(m_selection)); + + EndModal(wxID_OK); +} + +// ---------------------------------------------------------------------------- +// wxMultiChoiceDialog +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxMultiChoiceDialog, wxDialog) + +bool wxMultiChoiceDialog::Create( wxWindow *parent, + const wxString& message, + const wxString& caption, + int n, + const wxString *choices, + long style, + const wxPoint& pos ) +{ + long styleLbox; +#if wxUSE_CHECKLISTBOX + styleLbox = wxLB_ALWAYS_SB; +#else + styleLbox = wxLB_ALWAYS_SB | wxLB_EXTENDED; +#endif + + if ( !wxAnyChoiceDialog::Create(parent, message, caption, + n, choices, + style, pos, + styleLbox) ) + return false; + + return true; +} + +bool wxMultiChoiceDialog::Create( wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxArrayString& choices, + long style, + const wxPoint& pos ) +{ + wxCArrayString chs(choices); + return Create( parent, message, caption, chs.GetCount(), + chs.GetStrings(), style, pos ); +} + +void wxMultiChoiceDialog::SetSelections(const wxArrayInt& selections) +{ +#if wxUSE_CHECKLISTBOX + wxCheckListBox* checkListBox = wxDynamicCast(m_listbox, wxCheckListBox); + if (checkListBox) + { + // first clear all currently selected items + size_t n, + count = checkListBox->GetCount(); + for ( n = 0; n < count; ++n ) + { + if (checkListBox->IsChecked(n)) + checkListBox->Check(n, false); + } + + // now select the ones which should be selected + count = selections.GetCount(); + for ( n = 0; n < count; n++ ) + { + checkListBox->Check(selections[n]); + } + + return; + } +#endif + + // first clear all currently selected items + size_t n, + count = m_listbox->GetCount(); + for ( n = 0; n < count; ++n ) + { + m_listbox->Deselect(n); + } + + // now select the ones which should be selected + count = selections.GetCount(); + for ( n = 0; n < count; n++ ) + { + m_listbox->Select(selections[n]); + } +} + +bool wxMultiChoiceDialog::TransferDataFromWindow() +{ + m_selections.Empty(); + +#if wxUSE_CHECKLISTBOX + wxCheckListBox* checkListBox = wxDynamicCast(m_listbox, wxCheckListBox); + if (checkListBox) + { + size_t count = checkListBox->GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + if ( checkListBox->IsChecked(n) ) + m_selections.Add(n); + } + return true; + } +#endif + + size_t count = m_listbox->GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + if ( m_listbox->IsSelected(n) ) + m_selections.Add(n); + } + + return true; +} + +#if wxUSE_CHECKLISTBOX + +wxListBoxBase *wxMultiChoiceDialog::CreateList(int n, const wxString *choices, long styleLbox) +{ + return new wxCheckListBox( this, wxID_LISTBOX, + wxDefaultPosition, wxDefaultSize, + n, choices, + styleLbox ); +} + +#endif // wxUSE_CHECKLISTBOX + +#endif // wxUSE_CHOICEDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/clrpickerg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/clrpickerg.cpp new file mode 100644 index 0000000000..b76115f04a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/clrpickerg.cpp @@ -0,0 +1,138 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/clrpickerg.cpp +// Purpose: wxGenericColourButton class implementation +// Author: Francesco Montorsi (readapted code written by Vadim Zeitlin) +// Modified by: +// Created: 15/04/2006 +// Copyright: (c) Vadim Zeitlin, Francesco Montorsi +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_COLOURPICKERCTRL + +#include "wx/clrpicker.h" +#include "wx/colordlg.h" +#include "wx/dcmemory.h" + + +// ============================================================================ +// implementation +// ============================================================================ + +wxColourData wxGenericColourButton::ms_data; +IMPLEMENT_DYNAMIC_CLASS(wxGenericColourButton, wxBitmapButton) + +// ---------------------------------------------------------------------------- +// wxGenericColourButton +// ---------------------------------------------------------------------------- + +bool wxGenericColourButton::Create( wxWindow *parent, wxWindowID id, + const wxColour &col, const wxPoint &pos, + const wxSize &size, long style, + const wxValidator& validator, const wxString &name) +{ + m_bitmap = wxBitmap( 60, 13 ); + + // create this button + if (!wxBitmapButton::Create( parent, id, m_bitmap, pos, + size, style | wxBU_AUTODRAW, validator, name )) + { + wxFAIL_MSG( wxT("wxGenericColourButton creation failed") ); + return false; + } + + // and handle user clicks on it + Connect(GetId(), wxEVT_BUTTON, + wxCommandEventHandler(wxGenericColourButton::OnButtonClick), + NULL, this); + + m_colour = col; + UpdateColour(); + InitColourData(); + + return true; +} + +void wxGenericColourButton::InitColourData() +{ + ms_data.SetChooseFull(true); + unsigned char grey = 0; + for (int i = 0; i < 16; i++, grey += 16) + { + // fill with grey tones the custom colors palette + wxColour colour(grey, grey, grey); + ms_data.SetCustomColour(i, colour); + } +} + +void wxGenericColourButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev)) +{ + // update the wxColouData to be shown in the dialog + ms_data.SetColour(m_colour); + + // create the colour dialog and display it + wxColourDialog dlg(this, &ms_data); + if (dlg.ShowModal() == wxID_OK) + { + ms_data = dlg.GetColourData(); + SetColour(ms_data.GetColour()); + + // fire an event + wxColourPickerEvent event(this, GetId(), m_colour); + GetEventHandler()->ProcessEvent(event); + } +} + +void wxGenericColourButton::UpdateColour() +{ + wxMemoryDC dc(m_bitmap); + dc.SetPen( *wxTRANSPARENT_PEN ); + dc.SetBrush( wxBrush(m_colour) ); + dc.DrawRectangle( 0,0,m_bitmap.GetWidth(),m_bitmap.GetHeight() ); + + if ( HasFlag(wxCLRP_SHOW_LABEL) ) + { + wxColour col( ~m_colour.Red(), ~m_colour.Green(), ~m_colour.Blue() ); + dc.SetTextForeground( col ); + dc.SetFont( GetFont() ); + dc.DrawText( m_colour.GetAsString(wxC2S_HTML_SYNTAX), 0, 0 ); + } + + dc.SelectObject( wxNullBitmap ); + SetBitmapLabel( m_bitmap ); +} + +wxSize wxGenericColourButton::DoGetBestSize() const +{ + wxSize sz(wxBitmapButton::DoGetBestSize()); +#ifdef __WXMAC__ + sz.y += 6; +#else + sz.y += 2; +#endif + sz.x += 30; + if ( HasFlag(wxCLRP_SHOW_LABEL) ) + return sz; + + // if we have no label, then make this button a square + // (like e.g. native GTK version of this control) ??? + // sz.SetWidth(sz.GetHeight()); + return sz; +} + +#endif // wxUSE_COLOURPICKERCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/collpaneg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/collpaneg.cpp new file mode 100644 index 0000000000..1dc4e47e6e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/collpaneg.cpp @@ -0,0 +1,299 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/collpaneg.cpp +// Purpose: wxGenericCollapsiblePane +// Author: Francesco Montorsi +// Modified By: +// Created: 8/10/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/defs.h" + +#if wxUSE_COLLPANE && wxUSE_BUTTON && wxUSE_STATLINE + +#include "wx/collpane.h" + +#ifndef WX_PRECOMP + #include "wx/toplevel.h" + #include "wx/button.h" + #include "wx/sizer.h" + #include "wx/panel.h" +#endif // !WX_PRECOMP + +#include "wx/statline.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// ============================================================================ +// implementation +// ============================================================================ + +const char wxCollapsiblePaneNameStr[] = "collapsiblePane"; + +//----------------------------------------------------------------------------- +// wxGenericCollapsiblePane +//----------------------------------------------------------------------------- + +wxDEFINE_EVENT( wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEvent ); +IMPLEMENT_DYNAMIC_CLASS(wxGenericCollapsiblePane, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxCollapsiblePaneEvent, wxCommandEvent) + +BEGIN_EVENT_TABLE(wxGenericCollapsiblePane, wxControl) + EVT_BUTTON(wxID_ANY, wxGenericCollapsiblePane::OnButton) + EVT_SIZE(wxGenericCollapsiblePane::OnSize) +END_EVENT_TABLE() + +void wxGenericCollapsiblePane::Init() +{ + m_pButton = NULL; + m_pPane = NULL; + m_pStaticLine = NULL; + m_sz = NULL; +} + +bool wxGenericCollapsiblePane::Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& val, + const wxString& name) +{ + if ( !wxControl::Create(parent, id, pos, size, style, val, name) ) + return false; + + m_strLabel = label; + + // sizer containing the expand button and possibly a static line + m_sz = new wxBoxSizer(wxHORIZONTAL); + +#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) + // on Mac we use the special disclosure triangle button + m_pStaticLine = NULL; + m_pButton = new wxDisclosureTriangle(this, wxID_ANY, GetBtnLabel()); + m_sz->Add(m_pButton); +#else + // create children and lay them out using a wxBoxSizer + // (so that we automatically get RTL features) + m_pButton = new wxButton(this, wxID_ANY, GetBtnLabel(), wxPoint(0, 0), + wxDefaultSize, wxBU_EXACTFIT); + m_pStaticLine = new wxStaticLine(this, wxID_ANY); + + // on other platforms we put the static line and the button horizontally + m_sz->Add(m_pButton, 0, wxLEFT|wxTOP|wxBOTTOM, GetBorder()); + m_sz->Add(m_pStaticLine, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT, GetBorder()); +#endif + + // FIXME: at least under wxCE and wxGTK1 the background is black if we don't do + // this, no idea why... +#if defined(__WXWINCE__) || defined(__WXGTK__) + SetBackgroundColour(parent->GetBackgroundColour()); +#endif + + // do not set sz as our sizers since we handle the pane window without using sizers + m_pPane = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, + wxTAB_TRAVERSAL|wxNO_BORDER, wxT("wxCollapsiblePanePane") ); + + // start as collapsed: + m_pPane->Hide(); + + return true; +} + +wxGenericCollapsiblePane::~wxGenericCollapsiblePane() +{ + if (m_pButton) + m_pButton->SetContainingSizer(NULL); + + if (m_pStaticLine) + m_pStaticLine->SetContainingSizer(NULL); + + // our sizer is not deleted automatically since we didn't use SetSizer()! + wxDELETE(m_sz); +} + +wxSize wxGenericCollapsiblePane::DoGetBestSize() const +{ + // NB: do not use GetSize() but rather GetMinSize() + wxSize sz = m_sz->GetMinSize(); + + // when expanded, we need more vertical space + if ( IsExpanded() ) + { + sz.SetWidth(wxMax( sz.GetWidth(), m_pPane->GetBestSize().x )); + sz.SetHeight(sz.y + GetBorder() + m_pPane->GetBestSize().y); + } + + return sz; +} + +wxString wxGenericCollapsiblePane::GetBtnLabel() const +{ + // on mac the triangle indicates the state, no string change +#ifdef __WXMAC__ + return m_strLabel; +#else + return m_strLabel + (IsCollapsed() ? wxT(" >>") : wxT(" <<")); +#endif +} + +void wxGenericCollapsiblePane::OnStateChange(const wxSize& sz) +{ + // minimal size has priority over the best size so set here our min size +// SetMinSize(sz); + SetSize(sz); + + if (this->HasFlag(wxCP_NO_TLW_RESIZE)) + { + // the user asked to explicitly handle the resizing itself... + return; + } + + + wxTopLevelWindow *top = + wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow); + if ( !top ) + return; + + wxSizer *sizer = top->GetSizer(); + if ( !sizer ) + return; + + const wxSize newBestSize = sizer->ComputeFittingClientSize(top); + top->SetMinClientSize(newBestSize); + + // we shouldn't attempt to resize a maximized window, whatever happens + if ( !top->IsMaximized() ) + top->SetClientSize(newBestSize); +} + +void wxGenericCollapsiblePane::Collapse(bool collapse) +{ + // optimization + if ( IsCollapsed() == collapse ) + return; + + InvalidateBestSize(); + + // update our state + m_pPane->Show(!collapse); + + // update button label +#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) + m_pButton->SetOpen( !collapse ); +#else + // NB: this must be done after updating our "state" + m_pButton->SetLabel(GetBtnLabel()); +#endif + + + OnStateChange(GetBestSize()); +} + +void wxGenericCollapsiblePane::SetLabel(const wxString &label) +{ + m_strLabel = label; +#ifdef __WXMAC__ + m_pButton->SetLabel(GetBtnLabel()); +#else + m_pButton->SetLabel(GetBtnLabel()); + m_pButton->SetInitialSize(); +#endif + + Layout(); +} + +bool wxGenericCollapsiblePane::Layout() +{ +#ifdef __WXMAC__ + if (!m_pButton || !m_pPane || !m_sz) + return false; // we need to complete the creation first! +#else + if (!m_pButton || !m_pStaticLine || !m_pPane || !m_sz) + return false; // we need to complete the creation first! +#endif + + wxSize oursz(GetSize()); + + // move & resize the button and the static line + m_sz->SetDimension(0, 0, oursz.GetWidth(), m_sz->GetMinSize().GetHeight()); + m_sz->Layout(); + + if ( IsExpanded() ) + { + // move & resize the container window + int yoffset = m_sz->GetSize().GetHeight() + GetBorder(); + m_pPane->SetSize(0, yoffset, + oursz.x, oursz.y - yoffset); + + // this is very important to make the pane window layout show correctly + m_pPane->Layout(); + } + + return true; +} + +int wxGenericCollapsiblePane::GetBorder() const +{ +#if defined( __WXMAC__ ) + return 6; +#elif defined(__WXMSW__) + wxASSERT(m_pButton); + return m_pButton->ConvertDialogToPixels(wxSize(2, 0)).x; +#else + return 5; +#endif +} + + + +//----------------------------------------------------------------------------- +// wxGenericCollapsiblePane - event handlers +//----------------------------------------------------------------------------- + +void wxGenericCollapsiblePane::OnButton(wxCommandEvent& event) +{ + if ( event.GetEventObject() != m_pButton ) + { + event.Skip(); + return; + } + + Collapse(!IsCollapsed()); + + // this change was generated by the user - send the event + wxCollapsiblePaneEvent ev(this, GetId(), IsCollapsed()); + GetEventHandler()->ProcessEvent(ev); +} + +void wxGenericCollapsiblePane::OnSize(wxSizeEvent& WXUNUSED(event)) +{ +#if 0 // for debug only + wxClientDC dc(this); + dc.SetPen(*wxBLACK_PEN); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.DrawRectangle(wxPoint(0,0), GetSize()); + dc.SetPen(*wxRED_PEN); + dc.DrawRectangle(wxPoint(0,0), GetBestSize()); +#endif + + Layout(); +} + +#endif // wxUSE_COLLPANE && wxUSE_BUTTON && wxUSE_STATLINE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/colour.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/colour.cpp new file mode 100644 index 0000000000..f16c134514 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/colour.cpp @@ -0,0 +1,56 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/colour.cpp +// Purpose: wxColour class +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/colour.h" + +#ifndef WX_PRECOMP + #include "wx/gdicmn.h" +#endif + +// Colour + +void wxColour::Init() +{ + m_red = + m_blue = + m_green = 0; + m_alpha = wxALPHA_OPAQUE; + m_isInit = false; +} + +void wxColour::InitRGBA(unsigned char r, + unsigned char g, + unsigned char b, + unsigned char a) +{ + m_red = r; + m_green = g; + m_blue = b; + m_alpha = a; + m_isInit = true; +} + +wxColour& wxColour::operator=(const wxColour& col) +{ + m_red = col.m_red; + m_green = col.m_green; + m_blue = col.m_blue; + m_alpha = col.m_alpha; + m_isInit = col.m_isInit; + return *this; +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/colrdlgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/colrdlgg.cpp new file mode 100644 index 0000000000..60bdf6a787 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/colrdlgg.cpp @@ -0,0 +1,578 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/colrdlgg.cpp +// Purpose: Choice dialogs +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_COLOURDLG + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/intl.h" + #include "wx/dialog.h" + #include "wx/listbox.h" + #include "wx/button.h" + #include "wx/stattext.h" + #include "wx/layout.h" + #include "wx/dcclient.h" + #include "wx/sizer.h" + #include "wx/slider.h" +#endif + +#if wxUSE_STATLINE + #include "wx/statline.h" +#endif + +#include "wx/colourdata.h" +#include "wx/generic/colrdlgg.h" + +IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog) + +BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog) + EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom) +#if wxUSE_SLIDER + EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider) + EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider) + EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider) +#endif + EVT_PAINT(wxGenericColourDialog::OnPaint) + EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent) + EVT_CLOSE(wxGenericColourDialog::OnCloseWindow) +END_EVENT_TABLE() + + +/* + * Generic wxColourDialog + */ + +// don't change the number of elements (48) in this array, the code below is +// hardcoded to use it +static const wxChar *const wxColourDialogNames[] = +{ + wxT("ORANGE"), + wxT("GOLDENROD"), + wxT("WHEAT"), + wxT("SPRING GREEN"), + wxT("SKY BLUE"), + wxT("SLATE BLUE"), + wxT("MEDIUM VIOLET RED"), + wxT("PURPLE"), + + wxT("RED"), + wxT("YELLOW"), + wxT("MEDIUM SPRING GREEN"), + wxT("PALE GREEN"), + wxT("CYAN"), + wxT("LIGHT STEEL BLUE"), + wxT("ORCHID"), + wxT("LIGHT MAGENTA"), + + wxT("BROWN"), + wxT("YELLOW"), + wxT("GREEN"), + wxT("CADET BLUE"), + wxT("MEDIUM BLUE"), + wxT("MAGENTA"), + wxT("MAROON"), + wxT("ORANGE RED"), + + wxT("FIREBRICK"), + wxT("CORAL"), + wxT("FOREST GREEN"), + wxT("AQUAMARINE"), + wxT("BLUE"), + wxT("NAVY"), + wxT("THISTLE"), + wxT("MEDIUM VIOLET RED"), + + wxT("INDIAN RED"), + wxT("GOLD"), + wxT("MEDIUM SEA GREEN"), + wxT("MEDIUM BLUE"), + wxT("MIDNIGHT BLUE"), + wxT("GREY"), + wxT("PURPLE"), + wxT("KHAKI"), + + wxT("BLACK"), + wxT("MEDIUM FOREST GREEN"), + wxT("KHAKI"), + wxT("DARK GREY"), + wxT("SEA GREEN"), + wxT("LIGHT GREY"), + wxT("MEDIUM SLATE BLUE"), + wxT("WHITE") +}; + +wxGenericColourDialog::wxGenericColourDialog() +{ + m_whichKind = 1; + m_colourSelection = -1; +} + +wxGenericColourDialog::wxGenericColourDialog(wxWindow *parent, + wxColourData *data) +{ + m_whichKind = 1; + m_colourSelection = -1; + Create(parent, data); +} + +wxGenericColourDialog::~wxGenericColourDialog() +{ +} + +void wxGenericColourDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) +{ + EndModal(wxID_CANCEL); +} + +bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data) +{ + if ( !wxDialog::Create(GetParentForModalDialog(parent, 0), wxID_ANY, + _("Choose colour"), + wxPoint(0, 0), wxSize(900, 900)) ) + return false; + + if (data) + m_colourData = *data; + + InitializeColours(); + CalculateMeasurements(); + CreateWidgets(); + + return true; +} + +int wxGenericColourDialog::ShowModal() +{ + return wxDialog::ShowModal(); +} + + +// Internal functions +void wxGenericColourDialog::OnMouseEvent(wxMouseEvent& event) +{ + if (event.ButtonDown(1)) + { + int x = (int)event.GetX(); + int y = (int)event.GetY(); + +#ifdef __WXPM__ + // Handle OS/2's reverse coordinate system and account for the dialog title + int nClientHeight; + + GetClientSize(NULL, &nClientHeight); + y = (nClientHeight - y) + 20; +#endif + if ((x >= m_standardColoursRect.x && x <= (m_standardColoursRect.x + m_standardColoursRect.width)) && + (y >= m_standardColoursRect.y && y <= (m_standardColoursRect.y + m_standardColoursRect.height))) + { + int selX = (int)(x - m_standardColoursRect.x)/(m_smallRectangleSize.x + m_gridSpacing); + int selY = (int)(y - m_standardColoursRect.y)/(m_smallRectangleSize.y + m_gridSpacing); + int ptr = (int)(selX + selY*8); + OnBasicColourClick(ptr); + } + else if ((x >= m_customColoursRect.x && x <= (m_customColoursRect.x + m_customColoursRect.width)) && + (y >= m_customColoursRect.y && y <= (m_customColoursRect.y + m_customColoursRect.height))) + { + int selX = (int)(x - m_customColoursRect.x)/(m_smallRectangleSize.x + m_gridSpacing); + int selY = (int)(y - m_customColoursRect.y)/(m_smallRectangleSize.y + m_gridSpacing); + int ptr = (int)(selX + selY*8); + OnCustomColourClick(ptr); + } + else + event.Skip(); + } + else + event.Skip(); +} + +void wxGenericColourDialog::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + + PaintBasicColours(dc); + PaintCustomColours(dc); + PaintCustomColour(dc); + PaintHighlight(dc, true); +} + +void wxGenericColourDialog::CalculateMeasurements() +{ + m_smallRectangleSize.x = 18; + m_smallRectangleSize.y = 14; + m_customRectangleSize.x = 40; + m_customRectangleSize.y = 40; + + m_gridSpacing = 6; + m_sectionSpacing = 15; + + m_standardColoursRect.x = 10; +#ifdef __WXPM__ + m_standardColoursRect.y = 15 + 20; /* OS/2 needs to account for dialog titlebar */ +#else + m_standardColoursRect.y = 15; +#endif + m_standardColoursRect.width = (8*m_smallRectangleSize.x) + (7*m_gridSpacing); + m_standardColoursRect.height = (6*m_smallRectangleSize.y) + (5*m_gridSpacing); + + m_customColoursRect.x = m_standardColoursRect.x; + m_customColoursRect.y = m_standardColoursRect.y + m_standardColoursRect.height + 20; + m_customColoursRect.width = (8*m_smallRectangleSize.x) + (7*m_gridSpacing); + m_customColoursRect.height = (2*m_smallRectangleSize.y) + (1*m_gridSpacing); + + m_singleCustomColourRect.x = m_customColoursRect.width + m_customColoursRect.x + m_sectionSpacing; + m_singleCustomColourRect.y = 80; + m_singleCustomColourRect.width = m_customRectangleSize.x; + m_singleCustomColourRect.height = m_customRectangleSize.y; + + m_okButtonX = 10; + m_customButtonX = m_singleCustomColourRect.x ; + m_buttonY = m_customColoursRect.y + m_customColoursRect.height + 10; +} + +void wxGenericColourDialog::CreateWidgets() +{ + wxBeginBusyCursor(); + + wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL ); + + const int sliderHeight = 160; + + // first sliders +#if wxUSE_SLIDER + const int sliderX = m_singleCustomColourRect.x + m_singleCustomColourRect.width + m_sectionSpacing; + + m_redSlider = new wxSlider(this, wxID_RED_SLIDER, m_colourData.m_dataColour.Red(), 0, 255, + wxDefaultPosition, wxSize(wxDefaultCoord, sliderHeight), wxSL_VERTICAL|wxSL_LABELS|wxSL_INVERSE); + m_greenSlider = new wxSlider(this, wxID_GREEN_SLIDER, m_colourData.m_dataColour.Green(), 0, 255, + wxDefaultPosition, wxSize(wxDefaultCoord, sliderHeight), wxSL_VERTICAL|wxSL_LABELS|wxSL_INVERSE); + m_blueSlider = new wxSlider(this, wxID_BLUE_SLIDER, m_colourData.m_dataColour.Blue(), 0, 255, + wxDefaultPosition, wxSize(wxDefaultCoord, sliderHeight), wxSL_VERTICAL|wxSL_LABELS|wxSL_INVERSE); + + wxBoxSizer *sliderSizer = new wxBoxSizer( wxHORIZONTAL ); + + sliderSizer->Add(sliderX, sliderHeight ); + + wxSizerFlags flagsRight; + flagsRight.Align(wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL).DoubleBorder(); + + sliderSizer->Add(m_redSlider, flagsRight); + sliderSizer->Add(m_greenSlider,flagsRight); + sliderSizer->Add(m_blueSlider,flagsRight); + + topSizer->Add(sliderSizer, wxSizerFlags().Centre().DoubleBorder()); +#else + topSizer->Add(1, sliderHeight, wxSizerFlags(1).Centre().TripleBorder()); +#endif // wxUSE_SLIDER + + // then the custom button + topSizer->Add(new wxButton(this, wxID_ADD_CUSTOM, + _("Add to custom colours") ), + wxSizerFlags().DoubleHorzBorder()); + + // then the standard buttons + wxSizer *buttonsizer = CreateSeparatedButtonSizer(wxOK | wxCANCEL); + if ( buttonsizer ) + { + topSizer->Add(buttonsizer, wxSizerFlags().Expand().DoubleBorder()); + } + + SetAutoLayout( true ); + SetSizer( topSizer ); + + topSizer->SetSizeHints( this ); + topSizer->Fit( this ); + + Centre( wxBOTH ); + + wxEndBusyCursor(); +} + +void wxGenericColourDialog::InitializeColours(void) +{ + size_t i; + + for (i = 0; i < WXSIZEOF(wxColourDialogNames); i++) + { + wxColour col = wxTheColourDatabase->Find(wxColourDialogNames[i]); + if (col.IsOk()) + m_standardColours[i].Set(col.Red(), col.Green(), col.Blue()); + else + m_standardColours[i].Set(0, 0, 0); + } + + for (i = 0; i < WXSIZEOF(m_customColours); i++) + { + wxColour c = m_colourData.GetCustomColour(i); + if (c.IsOk()) + m_customColours[i] = m_colourData.GetCustomColour(i); + else + m_customColours[i] = wxColour(255, 255, 255); + } + + wxColour curr = m_colourData.GetColour(); + if ( curr.IsOk() ) + { + bool m_initColourFound = false; + + for (i = 0; i < WXSIZEOF(wxColourDialogNames); i++) + { + if ( m_standardColours[i] == curr && !m_initColourFound ) + { + m_whichKind = 1; + m_colourSelection = i; + m_initColourFound = true; + break; + } + } + if ( !m_initColourFound ) + { + for ( i = 0; i < WXSIZEOF(m_customColours); i++ ) + { + if ( m_customColours[i] == curr ) + { + m_whichKind = 2; + m_colourSelection = i; + break; + } + } + } + m_colourData.m_dataColour.Set( curr.Red(), curr.Green(), curr.Blue() ); + } + else + { + m_whichKind = 1; + m_colourSelection = 0; + m_colourData.m_dataColour.Set( 0, 0, 0 ); + } +} + +void wxGenericColourDialog::PaintBasicColours(wxDC& dc) +{ + int i; + for (i = 0; i < 6; i++) + { + int j; + for (j = 0; j < 8; j++) + { + int ptr = i*8 + j; + + int x = (j*(m_smallRectangleSize.x+m_gridSpacing) + m_standardColoursRect.x); + int y = (i*(m_smallRectangleSize.y+m_gridSpacing) + m_standardColoursRect.y); + + dc.SetPen(*wxBLACK_PEN); + wxBrush brush(m_standardColours[ptr]); + dc.SetBrush(brush); + + dc.DrawRectangle( x, y, m_smallRectangleSize.x, m_smallRectangleSize.y); + } + } +} + +void wxGenericColourDialog::PaintCustomColours(wxDC& dc) +{ + int i; + for (i = 0; i < 2; i++) + { + int j; + for (j = 0; j < 8; j++) + { + int ptr = i*8 + j; + + int x = (j*(m_smallRectangleSize.x+m_gridSpacing)) + m_customColoursRect.x; + int y = (i*(m_smallRectangleSize.y+m_gridSpacing)) + m_customColoursRect.y; + + dc.SetPen(*wxBLACK_PEN); + + wxBrush brush(m_customColours[ptr]); + dc.SetBrush(brush); + + dc.DrawRectangle( x, y, m_smallRectangleSize.x, m_smallRectangleSize.y); + } + } +} + +void wxGenericColourDialog::PaintHighlight(wxDC& dc, bool draw) +{ + if ( m_colourSelection < 0 ) + return; + + // Number of pixels bigger than the standard rectangle size + // for drawing a highlight + int deltaX = 2; + int deltaY = 2; + + if (m_whichKind == 1) + { + // Standard colours + int y = (int)(m_colourSelection / 8); + int x = (int)(m_colourSelection - (y*8)); + + x = (x*(m_smallRectangleSize.x + m_gridSpacing) + m_standardColoursRect.x) - deltaX; + y = (y*(m_smallRectangleSize.y + m_gridSpacing) + m_standardColoursRect.y) - deltaY; + + if (draw) + dc.SetPen(*wxBLACK_PEN); + else + dc.SetPen(*wxLIGHT_GREY_PEN); + + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.DrawRectangle( x, y, (m_smallRectangleSize.x + (2*deltaX)), (m_smallRectangleSize.y + (2*deltaY))); + } + else + { + // User-defined colours + int y = (int)(m_colourSelection / 8); + int x = (int)(m_colourSelection - (y*8)); + + x = (x*(m_smallRectangleSize.x + m_gridSpacing) + m_customColoursRect.x) - deltaX; + y = (y*(m_smallRectangleSize.y + m_gridSpacing) + m_customColoursRect.y) - deltaY; + + if (draw) + dc.SetPen(*wxBLACK_PEN); + else + dc.SetPen(*wxLIGHT_GREY_PEN); + + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.DrawRectangle( x, y, (m_smallRectangleSize.x + (2*deltaX)), (m_smallRectangleSize.y + (2*deltaY))); + } +} + +void wxGenericColourDialog::PaintCustomColour(wxDC& dc) +{ + dc.SetPen(*wxBLACK_PEN); + + wxBrush *brush = new wxBrush(m_colourData.m_dataColour); + dc.SetBrush(*brush); + + dc.DrawRectangle( m_singleCustomColourRect.x, m_singleCustomColourRect.y, + m_customRectangleSize.x, m_customRectangleSize.y); + + dc.SetBrush(wxNullBrush); + delete brush; +} + +void wxGenericColourDialog::OnBasicColourClick(int which) +{ + wxClientDC dc(this); + + PaintHighlight(dc, false); + m_whichKind = 1; + m_colourSelection = which; + +#if wxUSE_SLIDER + m_redSlider->SetValue( m_standardColours[m_colourSelection].Red() ); + m_greenSlider->SetValue( m_standardColours[m_colourSelection].Green() ); + m_blueSlider->SetValue( m_standardColours[m_colourSelection].Blue() ); +#endif // wxUSE_SLIDER + + m_colourData.m_dataColour.Set(m_standardColours[m_colourSelection].Red(), + m_standardColours[m_colourSelection].Green(), + m_standardColours[m_colourSelection].Blue()); + + PaintCustomColour(dc); + PaintHighlight(dc, true); +} + +void wxGenericColourDialog::OnCustomColourClick(int which) +{ + wxClientDC dc(this); + PaintHighlight(dc, false); + m_whichKind = 2; + m_colourSelection = which; + +#if wxUSE_SLIDER + m_redSlider->SetValue( m_customColours[m_colourSelection].Red() ); + m_greenSlider->SetValue( m_customColours[m_colourSelection].Green() ); + m_blueSlider->SetValue( m_customColours[m_colourSelection].Blue() ); +#endif // wxUSE_SLIDER + + m_colourData.m_dataColour.Set(m_customColours[m_colourSelection].Red(), + m_customColours[m_colourSelection].Green(), + m_customColours[m_colourSelection].Blue()); + + PaintCustomColour(dc); + PaintHighlight(dc, true); +} + +/* +void wxGenericColourDialog::OnOk(void) +{ + Show(false); +} + +void wxGenericColourDialog::OnCancel(void) +{ + colourDialogCancelled = true; + Show(false); +} +*/ + +void wxGenericColourDialog::OnAddCustom(wxCommandEvent& WXUNUSED(event)) +{ + wxClientDC dc(this); + if (m_whichKind != 2) + { + PaintHighlight(dc, false); + m_whichKind = 2; + m_colourSelection = 0; + PaintHighlight(dc, true); + } + + m_customColours[m_colourSelection].Set(m_colourData.m_dataColour.Red(), + m_colourData.m_dataColour.Green(), + m_colourData.m_dataColour.Blue()); + + m_colourData.SetCustomColour(m_colourSelection, m_customColours[m_colourSelection]); + + PaintCustomColours(dc); +} + +#if wxUSE_SLIDER + +void wxGenericColourDialog::OnRedSlider(wxCommandEvent& WXUNUSED(event)) +{ + if (!m_redSlider) + return; + + wxClientDC dc(this); + m_colourData.m_dataColour.Set((unsigned char)m_redSlider->GetValue(), m_colourData.m_dataColour.Green(), m_colourData.m_dataColour.Blue()); + PaintCustomColour(dc); +} + +void wxGenericColourDialog::OnGreenSlider(wxCommandEvent& WXUNUSED(event)) +{ + if (!m_greenSlider) + return; + + wxClientDC dc(this); + m_colourData.m_dataColour.Set(m_colourData.m_dataColour.Red(), (unsigned char)m_greenSlider->GetValue(), m_colourData.m_dataColour.Blue()); + PaintCustomColour(dc); +} + +void wxGenericColourDialog::OnBlueSlider(wxCommandEvent& WXUNUSED(event)) +{ + if (!m_blueSlider) + return; + + wxClientDC dc(this); + m_colourData.m_dataColour.Set(m_colourData.m_dataColour.Red(), m_colourData.m_dataColour.Green(), (unsigned char)m_blueSlider->GetValue()); + PaintCustomColour(dc); +} + +#endif // wxUSE_SLIDER + +#endif // wxUSE_COLOURDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/combog.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/combog.cpp new file mode 100644 index 0000000000..9d14f00991 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/combog.cpp @@ -0,0 +1,504 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/combog.cpp +// Purpose: Generic wxComboCtrl +// Author: Jaakko Salli +// Modified by: +// Created: Apr-30-2006 +// Copyright: (c) 2005 Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_COMBOCTRL + +#include "wx/combo.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/combobox.h" + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/textctrl.h" +#endif + +#include "wx/dcbuffer.h" + +// ---------------------------------------------------------------------------- +// Some constant adjustments to make the generic more bearable + +#if defined(__WXUNIVERSAL__) + +// position adjustment for wxTextCtrl, to achieve zero left margin +// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp +#define TEXTCTRLXADJUST 0 + +#define TEXTXADJUST 0 // how much is read-only text's x adjusted +#define DEFAULT_DROPBUTTON_WIDTH 19 + +#elif defined(__WXMSW__) + +// position adjustment for wxTextCtrl, to achieve zero left margin +// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp +#define TEXTCTRLXADJUST 2 + +#define TEXTXADJUST 0 // how much is read-only text's x adjusted +#define DEFAULT_DROPBUTTON_WIDTH 17 + +#elif defined(__WXGTK__) + +// position adjustment for wxTextCtrl, to achieve zero left margin +// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp +#define TEXTCTRLXADJUST -1 + +#define TEXTXADJUST 1 // how much is read-only text's x adjusted +#define DEFAULT_DROPBUTTON_WIDTH 23 + +#elif defined(__WXMAC__) + +// position adjustment for wxTextCtrl, to achieve zero left margin +// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp +#define TEXTCTRLXADJUST 0 + +#define TEXTXADJUST 0 // how much is read-only text's x adjusted +#define DEFAULT_DROPBUTTON_WIDTH 22 + +#else + +// position adjustment for wxTextCtrl, to achieve zero left margin +// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp +#define TEXTCTRLXADJUST 0 + +#define TEXTXADJUST 0 // how much is read-only text's x adjusted +#define DEFAULT_DROPBUTTON_WIDTH 19 + +#endif + + +// ============================================================================ +// implementation +// ============================================================================ + +// Only implement if no native or it wasn't fully featured +#ifndef wxCOMBOCONTROL_FULLY_FEATURED + + +// ---------------------------------------------------------------------------- +// wxGenericComboCtrl +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxGenericComboCtrl, wxComboCtrlBase) + EVT_PAINT(wxGenericComboCtrl::OnPaintEvent) + EVT_MOUSE_EVENTS(wxGenericComboCtrl::OnMouseEvent) +END_EVENT_TABLE() + + +IMPLEMENT_DYNAMIC_CLASS(wxGenericComboCtrl, wxComboCtrlBase) + +void wxGenericComboCtrl::Init() +{ +} + +bool wxGenericComboCtrl::Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + // + // Note that technically we only support 'default' border and wxNO_BORDER. + long border = style & wxBORDER_MASK; + int tcBorder = wxNO_BORDER; + +#if defined(__WXUNIVERSAL__) + if ( !border ) + border = wxBORDER_SIMPLE; +#elif defined(__WXMSW__) + if ( !border ) + // For XP, have 1-width custom border, for older version use sunken + /*if ( wxUxThemeEngine::GetIfActive() ) + { + border = wxBORDER_NONE; + m_widthCustomBorder = 1; + } + else*/ + border = wxBORDER_SUNKEN; +#else + + // + // Generic version is optimized for wxGTK + // + + #define UNRELIABLE_TEXTCTRL_BORDER + + if ( !border ) + { + if ( style & wxCB_READONLY ) + { + m_widthCustomBorder = 1; + } + else + { + m_widthCustomBorder = 0; + tcBorder = 0; + } + } + else + { + // Have textctrl instead use the border given. + tcBorder = border; + } + + // Because we are going to have button outside the border, + // let's use wxBORDER_NONE for the whole control. + border = wxBORDER_NONE; + + Customize( wxCC_BUTTON_OUTSIDE_BORDER | + wxCC_NO_TEXT_AUTO_SELECT | + wxCC_BUTTON_STAYS_DOWN ); + +#endif + + style = (style & ~(wxBORDER_MASK)) | border; + if ( style & wxCC_STD_BUTTON ) + m_iFlags |= wxCC_POPUP_ON_MOUSE_UP; + + // create main window + if ( !wxComboCtrlBase::Create(parent, + id, + value, + pos, + size, + style | wxFULL_REPAINT_ON_RESIZE, + validator, + name) ) + return false; + + // Create textctrl, if necessary + CreateTextCtrl( tcBorder ); + + // Add keyboard input handlers for main control and textctrl + InstallInputHandlers(); + + // Set background style for double-buffering, when needed + // (cannot use when system draws background automatically) + if ( !HasTransparentBackground() ) + SetBackgroundStyle( wxBG_STYLE_PAINT ); + + // SetInitialSize should be called last + SetInitialSize(size); + + return true; +} + +wxGenericComboCtrl::~wxGenericComboCtrl() +{ +} + +void wxGenericComboCtrl::OnResize() +{ + + // Recalculates button and textctrl areas + CalculateAreas(DEFAULT_DROPBUTTON_WIDTH); + +#if 0 + // Move separate button control, if any, to correct position + if ( m_btn ) + { + wxSize sz = GetClientSize(); + m_btn->SetSize( m_btnArea.x + m_btnSpacingX, + (sz.y-m_btnSize.y)/2, + m_btnSize.x, + m_btnSize.y ); + } +#endif + + // Move textctrl, if any, accordingly + PositionTextCtrl( TEXTCTRLXADJUST ); +} + +void wxGenericComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) ) +{ + // Determine wxDC to use based on need to double-buffer or + // use system-generated transparent background portions + wxDC* dcPtr; + if ( HasTransparentBackground() ) + dcPtr = new wxPaintDC(this); + else + dcPtr = new wxAutoBufferedPaintDC(this); + wxDC& dc = *dcPtr; + + wxSize sz = GetClientSize(); + const wxRect& butRect = m_btnArea; + wxRect tcRect = m_tcArea; + wxRect fullRect(0, 0, sz.x, sz.y); + + // artificial simple border + if ( m_widthCustomBorder ) + { + int customBorder = m_widthCustomBorder; + + // Set border colour +#ifdef __WXMAC__ + wxPen pen1( wxColour(133,133,133), + customBorder, + wxSOLID ); +#else + wxPen pen1( wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT), + customBorder, + wxPENSTYLE_SOLID); +#endif + dc.SetPen( pen1 ); + + // area around both controls + wxRect rect2(fullRect); + if ( m_iFlags & wxCC_IFLAG_BUTTON_OUTSIDE ) + { + rect2 = tcRect; + if ( customBorder == 1 ) + { + rect2.Inflate(1); + } + else + { + #ifdef __WXGTK__ + rect2.x -= 1; + rect2.y -= 1; + #else + rect2.x -= customBorder; + rect2.y -= customBorder; + #endif + rect2.width += 1 + customBorder; + rect2.height += 1 + customBorder; + } + } + + dc.SetBrush( *wxTRANSPARENT_BRUSH ); + dc.DrawRectangle(rect2); + } + + // Clear the main background if the system doesn't do it by itself + if ( !HasTransparentBackground() && + (tcRect.x > 0 || tcRect.y > 0) ) + { + wxColour winCol = GetParent()->GetBackgroundColour(); + dc.SetBrush(winCol); + dc.SetPen(winCol); + + dc.DrawRectangle(fullRect); + } + + if ( !m_btn ) + { + // Standard button rendering + DrawButton(dc, butRect); + } + + // paint required portion on the control + if ( !m_text || m_widthCustomPaint ) + { + wxASSERT( m_widthCustomPaint >= 0 ); + + // Clear the text-control area background + wxColour tcCol = GetBackgroundColour(); + dc.SetBrush(tcCol); + dc.SetPen(tcCol); + dc.DrawRectangle(tcRect); + + // this is intentionally here to allow drawed rectangle's + // right edge to be hidden + if ( m_text ) + tcRect.width = m_widthCustomPaint; + + dc.SetFont( GetFont() ); + + dc.SetClippingRegion(tcRect); + if ( m_popupInterface ) + m_popupInterface->PaintComboControl(dc, tcRect); + else + wxComboPopup::DefaultPaintComboControl(this, dc, tcRect); + } + + delete dcPtr; +} + +void wxGenericComboCtrl::OnMouseEvent( wxMouseEvent& event ) +{ + int mx = event.m_x; + bool isOnButtonArea = m_btnArea.Contains(mx,event.m_y); + int handlerFlags = isOnButtonArea ? wxCC_MF_ON_BUTTON : 0; + + if ( PreprocessMouseEvent(event,handlerFlags) ) + return; + + const bool ctrlIsButton = wxPlatformIs(wxOS_WINDOWS); + + if ( ctrlIsButton && + (m_windowStyle & (wxCC_SPECIAL_DCLICK|wxCB_READONLY)) == wxCB_READONLY ) + { + // if no textctrl and no special double-click, then the entire control acts + // as a button + handlerFlags |= wxCC_MF_ON_BUTTON; + if ( HandleButtonMouseEvent(event,handlerFlags) ) + return; + } + else + { + if ( isOnButtonArea || HasCapture() || + (m_widthCustomPaint && mx < (m_tcArea.x+m_widthCustomPaint)) ) + { + handlerFlags |= wxCC_MF_ON_CLICK_AREA; + + if ( HandleButtonMouseEvent(event,handlerFlags) ) + return; + } + else if ( m_btnState ) + { + // otherwise need to clear the hover status + m_btnState = 0; + RefreshRect(m_btnArea); + } + } + + // + // This will handle left_down and left_dclick events outside button in a Windows/GTK-like manner. + // See header file for further information on this method. + HandleNormalMouseEvent(event); + +} + +void wxGenericComboCtrl::SetCustomPaintWidth( int width ) +{ +#ifdef UNRELIABLE_TEXTCTRL_BORDER + // + // If starting/stopping to show an image in front + // of a writable text-field, then re-create textctrl + // with different kind of border (because we can't + // assume that textctrl fully supports wxNO_BORDER). + // + wxTextCtrl* tc = GetTextCtrl(); + + if ( tc && (m_iFlags & wxCC_BUTTON_OUTSIDE_BORDER) ) + { + int borderType = tc->GetWindowStyle() & wxBORDER_MASK; + int tcCreateStyle = -1; + + if ( width > 0 ) + { + // Re-create textctrl with no border + if ( borderType != wxNO_BORDER ) + { + m_widthCustomBorder = 1; + tcCreateStyle = wxNO_BORDER; + } + } + else if ( width == 0 ) + { + // Re-create textctrl with normal border + if ( borderType == wxNO_BORDER ) + { + m_widthCustomBorder = 0; + tcCreateStyle = 0; + } + } + + // Common textctrl re-creation code + if ( tcCreateStyle != -1 ) + { + tc->RemoveEventHandler(m_textEvtHandler); + delete m_textEvtHandler; + + CreateTextCtrl( tcCreateStyle ); + + InstallInputHandlers(); + } + } +#endif // UNRELIABLE_TEXTCTRL_BORDER + + wxComboCtrlBase::SetCustomPaintWidth( width ); +} + +bool wxGenericComboCtrl::IsKeyPopupToggle(const wxKeyEvent& event) const +{ + int keycode = event.GetKeyCode(); + bool isPopupShown = IsPopupShown(); + + // This code is AFAIK appropriate for wxGTK. + + if ( isPopupShown ) + { + if ( keycode == WXK_ESCAPE || + ( keycode == WXK_UP && event.AltDown() ) ) + return true; + } + else + { + if ( (keycode == WXK_DOWN && event.AltDown()) || + (keycode == WXK_F4) ) + return true; + } + + return false; +} + +#ifdef __WXUNIVERSAL__ + +bool wxGenericComboCtrl::PerformAction(const wxControlAction& action, + long numArg, + const wxString& strArg) +{ + bool processed = false; + if ( action == wxACTION_COMBOBOX_POPUP ) + { + if ( !IsPopupShown() ) + { + ShowPopup(); + + processed = true; + } + } + else if ( action == wxACTION_COMBOBOX_DISMISS ) + { + if ( IsPopupShown() ) + { + HidePopup(); + + processed = true; + } + } + + if ( !processed ) + { + // pass along + return wxControl::PerformAction(action, numArg, strArg); + } + + return true; +} + +#endif // __WXUNIVERSAL__ + +// If native wxComboCtrl was not defined, then prepare a simple +// front-end so that wxRTTI works as expected. +#ifndef _WX_COMBOCONTROL_H_ +IMPLEMENT_DYNAMIC_CLASS(wxComboCtrl, wxGenericComboCtrl) +#endif + +#endif // !wxCOMBOCONTROL_FULLY_FEATURED + +#endif // wxUSE_COMBOCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/commandlinkbuttong.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/commandlinkbuttong.cpp new file mode 100644 index 0000000000..8a8d001c2e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/commandlinkbuttong.cpp @@ -0,0 +1,116 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/commandlinkbuttong.cpp +// Purpose: wxGenericCommandLinkButton +// Author: Rickard Westerlund +// Created: 2010-06-23 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_COMMANDLINKBUTTON + +#include "wx/commandlinkbutton.h" +#include "wx/artprov.h" + +wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCommandLinkButton, wxButton, "wx/commandlinkbutton.h") + +wxDEFINE_FLAGS( wxCommandLinkButtonStyle ) +wxBEGIN_FLAGS( wxCommandLinkButtonStyle ) +// new style border flags, we put them first to +// use them for streaming out +wxFLAGS_MEMBER(wxBORDER_SIMPLE) +wxFLAGS_MEMBER(wxBORDER_SUNKEN) +wxFLAGS_MEMBER(wxBORDER_DOUBLE) +wxFLAGS_MEMBER(wxBORDER_RAISED) +wxFLAGS_MEMBER(wxBORDER_STATIC) +wxFLAGS_MEMBER(wxBORDER_NONE) + +// old style border flags +wxFLAGS_MEMBER(wxSIMPLE_BORDER) +wxFLAGS_MEMBER(wxSUNKEN_BORDER) +wxFLAGS_MEMBER(wxDOUBLE_BORDER) +wxFLAGS_MEMBER(wxRAISED_BORDER) +wxFLAGS_MEMBER(wxSTATIC_BORDER) +wxFLAGS_MEMBER(wxBORDER) + +// standard window styles +wxFLAGS_MEMBER(wxTAB_TRAVERSAL) +wxFLAGS_MEMBER(wxCLIP_CHILDREN) +wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) +wxFLAGS_MEMBER(wxWANTS_CHARS) +wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) +wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) +wxFLAGS_MEMBER(wxVSCROLL) +wxFLAGS_MEMBER(wxHSCROLL) + +wxFLAGS_MEMBER(wxBU_AUTODRAW) +wxFLAGS_MEMBER(wxBU_LEFT) +wxFLAGS_MEMBER(wxBU_RIGHT) +wxFLAGS_MEMBER(wxBU_TOP) +wxFLAGS_MEMBER(wxBU_BOTTOM) +wxEND_FLAGS( wxCommandLinkButtonStyle ) + +wxBEGIN_PROPERTIES_TABLE(wxCommandLinkButton) +wxPROPERTY( MainLabel, wxString, SetMainLabel, GetMainLabel, wxString(), \ + 0 /*flags*/, wxT("The main label"), wxT("group") ) + +wxPROPERTY( Note, wxString, SetNote, GetNote, wxString(), \ + 0 /*flags*/, wxT("The link URL"), wxT("group") ) +wxPROPERTY_FLAGS( WindowStyle, wxCommandLinkButtonStyle, long, SetWindowStyleFlag, \ + GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \ + wxT("The link style"), wxT("group")) // style +wxEND_PROPERTIES_TABLE() + +wxEMPTY_HANDLERS_TABLE(wxCommandLinkButton) + +wxCONSTRUCTOR_7( wxCommandLinkButton, wxWindow*, Parent, wxWindowID, Id, wxString, \ + MainLabel, wxString, Note, wxPoint, Position, wxSize, Size, long, WindowStyle ) + +// ---------------------------------------------------------------------------- +// Generic command link button +// ---------------------------------------------------------------------------- + +bool wxGenericCommandLinkButton::Create(wxWindow *parent, + wxWindowID id, + const wxString& mainLabel, + const wxString& note, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + if ( !wxButton::Create(parent, + id, + mainLabel + '\n' + note, + pos, + size, + style, + validator, + name) ) + return false; + + if ( !HasNativeBitmap() ) + SetDefaultBitmap(); + + return true; + +} + +void wxGenericCommandLinkButton::SetDefaultBitmap() +{ + SetBitmap(wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_BUTTON)); +} + +#endif // wxUSE_COMMANDLINKBUTTON diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/datavgen.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/datavgen.cpp new file mode 100644 index 0000000000..4e15c71aee --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/datavgen.cpp @@ -0,0 +1,5323 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/datavgen.cpp +// Purpose: wxDataViewCtrl generic implementation +// Author: Robert Roebling +// Modified by: Francesco Montorsi, Guru Kathiresan, Bo Yang +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_DATAVIEWCTRL + +#include "wx/dataview.h" + +#ifdef wxUSE_GENERICDATAVIEWCTRL + +#ifndef WX_PRECOMP + #ifdef __WXMSW__ + #include "wx/msw/private.h" + #include "wx/msw/wrapwin.h" + #include "wx/msw/wrapcctl.h" // include "properly" + #endif + #include "wx/sizer.h" + #include "wx/log.h" + #include "wx/dcclient.h" + #include "wx/timer.h" + #include "wx/settings.h" + #include "wx/msgdlg.h" + #include "wx/dcscreen.h" + #include "wx/frame.h" +#endif + +#include "wx/stockitem.h" +#include "wx/popupwin.h" +#include "wx/renderer.h" +#include "wx/dcbuffer.h" +#include "wx/icon.h" +#include "wx/list.h" +#include "wx/listimpl.cpp" +#include "wx/imaglist.h" +#include "wx/headerctrl.h" +#include "wx/dnd.h" +#include "wx/stopwatch.h" +#include "wx/weakref.h" + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +class wxDataViewColumn; +class wxDataViewHeaderWindow; +class wxDataViewCtrl; + +//----------------------------------------------------------------------------- +// classes +//----------------------------------------------------------------------------- + +static const int SCROLL_UNIT_X = 15; + +// the cell padding on the left/right +static const int PADDING_RIGHTLEFT = 3; + +// the expander space margin +static const int EXPANDER_MARGIN = 4; + +#ifdef __WXMSW__ +static const int EXPANDER_OFFSET = 4; +#else +static const int EXPANDER_OFFSET = 1; +#endif + +// Below is the compare stuff. +// For the generic implementation, both the leaf nodes and the nodes are sorted for +// fast search when needed +static wxDataViewModel* g_model; + +// The column is either the index of the column to be used for sorting or one +// of the special values in this enum: +enum +{ + // Sort when we're thawed later. + SortColumn_OnThaw = -3, + + // Don't sort at all. + SortColumn_None = -2, + + // Sort using the model default sort order. + SortColumn_Default = -1 +}; + +static int g_column = SortColumn_None; +static bool g_asending = true; + +// ---------------------------------------------------------------------------- +// helper functions +// ---------------------------------------------------------------------------- + +namespace +{ + +// Return the expander column or, if it is not set, the first column and also +// set it as the expander one for the future. +wxDataViewColumn* GetExpanderColumnOrFirstOne(wxDataViewCtrl* dataview) +{ + wxDataViewColumn* expander = dataview->GetExpanderColumn(); + if (!expander) + { + // TODO-RTL: last column for RTL support + expander = dataview->GetColumnAt( 0 ); + dataview->SetExpanderColumn(expander); + } + + return expander; +} + +wxTextCtrl *CreateEditorTextCtrl(wxWindow *parent, const wxRect& labelRect, const wxString& value) +{ + wxTextCtrl* ctrl = new wxTextCtrl(parent, wxID_ANY, value, + wxPoint(labelRect.x,labelRect.y), + wxSize(labelRect.width,labelRect.height), + wxTE_PROCESS_ENTER); + + // Adjust size of wxTextCtrl editor to fit text, even if it means being + // wider than the corresponding column (this is how Explorer behaves). + const int fitting = ctrl->GetSizeFromTextSize(ctrl->GetTextExtent(ctrl->GetValue())).x; + const int current = ctrl->GetSize().x; + const int maxwidth = ctrl->GetParent()->GetSize().x - ctrl->GetPosition().x; + + // Adjust size so that it fits all content. Don't change anything if the + // allocated space is already larger than needed and don't extend wxDVC's + // boundaries. + int width = wxMin(wxMax(current, fitting), maxwidth); + + if ( width != current ) + ctrl->SetSize(wxSize(width, -1)); + + // select the text in the control an place the cursor at the end + ctrl->SetInsertionPointEnd(); + ctrl->SelectAll(); + + return ctrl; +} + +} // anonymous namespace + +//----------------------------------------------------------------------------- +// wxDataViewColumn +//----------------------------------------------------------------------------- + +void wxDataViewColumn::Init(int width, wxAlignment align, int flags) +{ + m_width = width; + m_minWidth = 0; + m_align = align; + m_flags = flags; + m_sort = false; + m_sortAscending = true; +} + +int wxDataViewColumn::GetWidth() const +{ + switch ( m_width ) + { + case wxCOL_WIDTH_DEFAULT: + return wxDVC_DEFAULT_WIDTH; + + case wxCOL_WIDTH_AUTOSIZE: + wxCHECK_MSG( m_owner, wxDVC_DEFAULT_WIDTH, "no owner control" ); + return m_owner->GetBestColumnWidth(m_owner->GetColumnIndex(this)); + + default: + return m_width; + } +} + +void wxDataViewColumn::UpdateDisplay() +{ + if (m_owner) + { + int idx = m_owner->GetColumnIndex( this ); + m_owner->OnColumnChange( idx ); + } +} + +void wxDataViewColumn::UnsetAsSortKey() +{ + m_sort = false; + + if ( m_owner ) + m_owner->SetSortingColumnIndex(wxNOT_FOUND); + + UpdateDisplay(); +} + +void wxDataViewColumn::SetSortOrder(bool ascending) +{ + if ( !m_owner ) + return; + + // First unset the old sort column if any. + int oldSortKey = m_owner->GetSortingColumnIndex(); + if ( oldSortKey != wxNOT_FOUND ) + { + m_owner->GetColumn(oldSortKey)->UnsetAsSortKey(); + } + + // Now set this one as the new sort column. + const int idx = m_owner->GetColumnIndex(this); + m_owner->SetSortingColumnIndex(idx); + + m_sort = true; + m_sortAscending = ascending; + + // Call this directly instead of using UpdateDisplay() as we already have + // the column index, no need to look it up again. + m_owner->OnColumnChange(idx); +} + +//----------------------------------------------------------------------------- +// wxDataViewHeaderWindow +//----------------------------------------------------------------------------- + +class wxDataViewHeaderWindow : public wxHeaderCtrl +{ +public: + wxDataViewHeaderWindow(wxDataViewCtrl *parent) + : wxHeaderCtrl(parent) + { + } + + wxDataViewCtrl *GetOwner() const + { return static_cast(GetParent()); } + +protected: + // implement/override wxHeaderCtrl functions by forwarding them to the main + // control + virtual const wxHeaderColumn& GetColumn(unsigned int idx) const + { + return *(GetOwner()->GetColumn(idx)); + } + + virtual bool UpdateColumnWidthToFit(unsigned int idx, int widthTitle) + { + wxDataViewCtrl * const owner = GetOwner(); + + int widthContents = owner->GetBestColumnWidth(idx); + owner->GetColumn(idx)->SetWidth(wxMax(widthTitle, widthContents)); + owner->OnColumnChange(idx); + + return true; + } + +private: + void FinishEditing(); + + bool SendEvent(wxEventType type, unsigned int n) + { + wxDataViewCtrl * const owner = GetOwner(); + wxDataViewEvent event(type, owner->GetId()); + + event.SetEventObject(owner); + event.SetColumn(n); + event.SetDataViewColumn(owner->GetColumn(n)); + event.SetModel(owner->GetModel()); + + // for events created by wxDataViewHeaderWindow the + // row / value fields are not valid + return owner->ProcessWindowEvent(event); + } + + void OnClick(wxHeaderCtrlEvent& event) + { + FinishEditing(); + + const unsigned idx = event.GetColumn(); + + if ( SendEvent(wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, idx) ) + return; + + // default handling for the column click is to sort by this column or + // toggle its sort order + wxDataViewCtrl * const owner = GetOwner(); + wxDataViewColumn * const col = owner->GetColumn(idx); + if ( !col->IsSortable() ) + { + // no default handling for non-sortable columns + event.Skip(); + return; + } + + if ( col->IsSortKey() ) + { + // already using this column for sorting, just change the order + col->ToggleSortOrder(); + } + else // not using this column for sorting yet + { + col->SetSortOrder(true); + } + + wxDataViewModel * const model = owner->GetModel(); + if ( model ) + model->Resort(); + + owner->OnColumnChange(idx); + + SendEvent(wxEVT_DATAVIEW_COLUMN_SORTED, idx); + } + + void OnRClick(wxHeaderCtrlEvent& event) + { + if ( !SendEvent(wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, + event.GetColumn()) ) + event.Skip(); + } + + void OnResize(wxHeaderCtrlEvent& event) + { + FinishEditing(); + + wxDataViewCtrl * const owner = GetOwner(); + + const unsigned col = event.GetColumn(); + owner->GetColumn(col)->SetWidth(event.GetWidth()); + GetOwner()->OnColumnChange(col); + } + + void OnEndReorder(wxHeaderCtrlEvent& event) + { + FinishEditing(); + + wxDataViewCtrl * const owner = GetOwner(); + owner->ColumnMoved(owner->GetColumn(event.GetColumn()), + event.GetNewOrder()); + } + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxDataViewHeaderWindow); +}; + +BEGIN_EVENT_TABLE(wxDataViewHeaderWindow, wxHeaderCtrl) + EVT_HEADER_CLICK(wxID_ANY, wxDataViewHeaderWindow::OnClick) + EVT_HEADER_RIGHT_CLICK(wxID_ANY, wxDataViewHeaderWindow::OnRClick) + + EVT_HEADER_RESIZING(wxID_ANY, wxDataViewHeaderWindow::OnResize) + EVT_HEADER_END_RESIZE(wxID_ANY, wxDataViewHeaderWindow::OnResize) + + EVT_HEADER_END_REORDER(wxID_ANY, wxDataViewHeaderWindow::OnEndReorder) +END_EVENT_TABLE() + +//----------------------------------------------------------------------------- +// wxDataViewRenameTimer +//----------------------------------------------------------------------------- + +class wxDataViewRenameTimer: public wxTimer +{ +private: + wxDataViewMainWindow *m_owner; + +public: + wxDataViewRenameTimer( wxDataViewMainWindow *owner ); + void Notify(); +}; + +//----------------------------------------------------------------------------- +// wxDataViewTreeNode +//----------------------------------------------------------------------------- + +class wxDataViewTreeNode; +WX_DEFINE_ARRAY( wxDataViewTreeNode *, wxDataViewTreeNodes ); + +int LINKAGEMODE wxGenericTreeModelNodeCmp( wxDataViewTreeNode ** node1, + wxDataViewTreeNode ** node2); + +class wxDataViewTreeNode +{ +public: + wxDataViewTreeNode(wxDataViewTreeNode *parent, const wxDataViewItem& item) + : m_parent(parent), + m_item(item), + m_branchData(NULL) + { + } + + ~wxDataViewTreeNode() + { + if ( m_branchData ) + { + wxDataViewTreeNodes& nodes = m_branchData->children; + for ( wxDataViewTreeNodes::iterator i = nodes.begin(); + i != nodes.end(); + ++i ) + { + delete *i; + } + + delete m_branchData; + } + } + + static wxDataViewTreeNode* CreateRootNode() + { + wxDataViewTreeNode *n = new wxDataViewTreeNode(NULL, wxDataViewItem()); + n->m_branchData = new BranchNodeData; + n->m_branchData->open = true; + return n; + } + + wxDataViewTreeNode * GetParent() const { return m_parent; } + + const wxDataViewTreeNodes& GetChildNodes() const + { + wxASSERT( m_branchData != NULL ); + return m_branchData->children; + } + + void InsertChild(wxDataViewTreeNode *node, unsigned index) + { + if ( !m_branchData ) + m_branchData = new BranchNodeData; + + m_branchData->children.Insert(node, index); + + // TODO: insert into sorted array directly in O(log n) instead of resorting in O(n log n) + if (g_column >= -1) + m_branchData->children.Sort( &wxGenericTreeModelNodeCmp ); + } + + void RemoveChild(wxDataViewTreeNode *node) + { + wxCHECK_RET( m_branchData != NULL, "leaf node doesn't have children" ); + m_branchData->children.Remove(node); + } + + // returns position of child node for given item in children list or wxNOT_FOUND + int FindChildByItem(const wxDataViewItem& item) const + { + if ( !m_branchData ) + return wxNOT_FOUND; + + const wxDataViewTreeNodes& nodes = m_branchData->children; + const int len = nodes.size(); + for ( int i = 0; i < len; i++ ) + { + if ( nodes[i]->m_item == item ) + return i; + } + return wxNOT_FOUND; + } + + const wxDataViewItem & GetItem() const { return m_item; } + void SetItem( const wxDataViewItem & item ) { m_item = item; } + + int GetIndentLevel() const + { + int ret = 0; + const wxDataViewTreeNode * node = this; + while( node->GetParent()->GetParent() != NULL ) + { + node = node->GetParent(); + ret ++; + } + return ret; + } + + bool IsOpen() const + { + return m_branchData && m_branchData->open; + } + + void ToggleOpen() + { + // We do not allow the (invisible) root node to be collapsed because + // there is no way to expand it again. + if ( !m_parent ) + return; + + wxCHECK_RET( m_branchData != NULL, "can't open leaf node" ); + + int sum = 0; + + const wxDataViewTreeNodes& nodes = m_branchData->children; + const int len = nodes.GetCount(); + for ( int i = 0;i < len; i ++) + sum += 1 + nodes[i]->GetSubTreeCount(); + + if (m_branchData->open) + { + ChangeSubTreeCount(-sum); + m_branchData->open = !m_branchData->open; + } + else + { + m_branchData->open = !m_branchData->open; + ChangeSubTreeCount(+sum); + } + } + + // "HasChildren" property corresponds to model's IsContainer(). Note that it may be true + // even if GetChildNodes() is empty; see below. + bool HasChildren() const + { + return m_branchData != NULL; + } + + void SetHasChildren(bool has) + { + // The invisible root item always has children, so ignore any attempts + // to change this. + if ( !m_parent ) + return; + + if ( !has ) + { + wxDELETE(m_branchData); + } + else if ( m_branchData == NULL ) + { + m_branchData = new BranchNodeData; + } + } + + int GetSubTreeCount() const + { + return m_branchData ? m_branchData->subTreeCount : 0; + } + + void ChangeSubTreeCount( int num ) + { + wxASSERT( m_branchData != NULL ); + + if( !m_branchData->open ) + return; + + m_branchData->subTreeCount += num; + wxASSERT( m_branchData->subTreeCount >= 0 ); + + if( m_parent ) + m_parent->ChangeSubTreeCount(num); + } + + void Resort() + { + if ( !m_branchData ) + return; + + if (g_column >= -1) + { + wxDataViewTreeNodes& nodes = m_branchData->children; + + nodes.Sort( &wxGenericTreeModelNodeCmp ); + int len = nodes.GetCount(); + for (int i = 0; i < len; i ++) + { + if ( nodes[i]->HasChildren() ) + nodes[i]->Resort(); + } + } + } + + +private: + wxDataViewTreeNode *m_parent; + + // Corresponding model item. + wxDataViewItem m_item; + + // Data specific to non-leaf (branch, inner) nodes. They are kept in a + // separate struct in order to conserve memory. + struct BranchNodeData + { + BranchNodeData() + : open(false), + subTreeCount(0) + { + } + + // Child nodes. Note that this may be empty even if m_hasChildren in + // case this branch of the tree wasn't expanded and realized yet. + wxDataViewTreeNodes children; + + // Is the branch node currently open (expanded)? + bool open; + + // Total count of expanded (i.e. visible with the help of some + // scrolling) items in the subtree, but excluding this node. I.e. it is + // 0 for leaves and is the number of rows the subtree occupies for + // branch nodes. + int subTreeCount; + }; + + BranchNodeData *m_branchData; +}; + + +int LINKAGEMODE wxGenericTreeModelNodeCmp( wxDataViewTreeNode ** node1, + wxDataViewTreeNode ** node2) +{ + return g_model->Compare( (*node1)->GetItem(), (*node2)->GetItem(), g_column, g_asending ); +} + + +//----------------------------------------------------------------------------- +// wxDataViewMainWindow +//----------------------------------------------------------------------------- + +WX_DEFINE_SORTED_ARRAY_SIZE_T(unsigned int, wxDataViewSelection); + +class wxDataViewMainWindow: public wxWindow +{ +public: + wxDataViewMainWindow( wxDataViewCtrl *parent, + wxWindowID id, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + const wxString &name = wxT("wxdataviewctrlmainwindow") ); + virtual ~wxDataViewMainWindow(); + + bool IsList() const { return GetModel()->IsListModel(); } + bool IsVirtualList() const { return m_root == NULL; } + + // notifications from wxDataViewModel + bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item ); + bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item ); + bool ItemChanged( const wxDataViewItem &item ); + bool ValueChanged( const wxDataViewItem &item, unsigned int model_column ); + bool Cleared(); + void Resort() + { + if (!IsVirtualList()) + { + SortPrepare(); + m_root->Resort(); + } + UpdateDisplay(); + } + + // Override the base class method to resort if needed, i.e. if + // SortPrepare() was called -- and ignored -- while we were frozen. + virtual void DoThaw() + { + if ( g_column == SortColumn_OnThaw ) + { + Resort(); + g_column = SortColumn_None; + } + + wxWindow::DoThaw(); + } + + void SortPrepare() + { + g_model = GetModel(); + + wxDataViewColumn* col = GetOwner()->GetSortingColumn(); + if( !col ) + { + if (g_model->HasDefaultCompare()) + { + // See below for the explanation of IsFrozen() test. + if ( IsFrozen() ) + g_column = SortColumn_OnThaw; + else + g_column = SortColumn_Default; + } + else + g_column = SortColumn_None; + + g_asending = true; + return; + } + + // Avoid sorting while the window is frozen, this allows to quickly add + // many items without resorting after each addition and only resort + // them all at once when the window is finally thawed, see above. + if ( IsFrozen() ) + { + g_column = SortColumn_OnThaw; + return; + } + + g_column = col->GetModelColumn(); + g_asending = col->IsSortOrderAscending(); + } + + void SetOwner( wxDataViewCtrl* owner ) { m_owner = owner; } + wxDataViewCtrl *GetOwner() { return m_owner; } + const wxDataViewCtrl *GetOwner() const { return m_owner; } + + wxDataViewModel* GetModel() { return GetOwner()->GetModel(); } + const wxDataViewModel* GetModel() const { return GetOwner()->GetModel(); } + +#if wxUSE_DRAG_AND_DROP + wxBitmap CreateItemBitmap( unsigned int row, int &indent ); +#endif // wxUSE_DRAG_AND_DROP + void OnPaint( wxPaintEvent &event ); + void OnCharHook( wxKeyEvent &event ); + void OnChar( wxKeyEvent &event ); + void OnVerticalNavigation(int delta, const wxKeyEvent& event); + void OnLeftKey(); + void OnRightKey(); + void OnMouse( wxMouseEvent &event ); + void OnSetFocus( wxFocusEvent &event ); + void OnKillFocus( wxFocusEvent &event ); + + void UpdateDisplay(); + void RecalculateDisplay(); + void OnInternalIdle(); + + void OnRenameTimer(); + + void ScrollWindow( int dx, int dy, const wxRect *rect = NULL ); + void ScrollTo( int rows, int column ); + + unsigned GetCurrentRow() const { return m_currentRow; } + bool HasCurrentRow() { return m_currentRow != (unsigned int)-1; } + void ChangeCurrentRow( unsigned int row ); + bool TryAdvanceCurrentColumn(wxDataViewTreeNode *node, bool forward); + + wxDataViewColumn *GetCurrentColumn() const { return m_currentCol; } + void ClearCurrentColumn() { m_currentCol = NULL; } + + bool IsSingleSel() const { return !GetParent()->HasFlag(wxDV_MULTIPLE); } + bool IsEmpty() { return GetRowCount() == 0; } + + int GetCountPerPage() const; + int GetEndOfLastCol() const; + unsigned int GetFirstVisibleRow() const; + + // I change this method to un const because in the tree view, + // the displaying number of the tree are changing along with the + // expanding/collapsing of the tree nodes + unsigned int GetLastVisibleRow(); + unsigned int GetRowCount() const; + + const wxDataViewSelection& GetSelections() const { return m_selection; } + void SetSelections( const wxDataViewSelection & sel ) + { m_selection = sel; UpdateDisplay(); } + void Select( const wxArrayInt& aSelections ); + void SelectAllRows( bool on ); + void SelectRow( unsigned int row, bool on ); + void SelectRows( unsigned int from, unsigned int to, bool on ); + void ReverseRowSelection( unsigned int row ); + bool IsRowSelected( unsigned int row ); + void SendSelectionChangedEvent( const wxDataViewItem& item); + + void RefreshRow( unsigned int row ); + void RefreshRows( unsigned int from, unsigned int to ); + void RefreshRowsAfter( unsigned int firstRow ); + + // returns the colour to be used for drawing the rules + wxColour GetRuleColour() const + { + return wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT); + } + + wxRect GetLineRect( unsigned int row ) const; + + int GetLineStart( unsigned int row ) const; // row * m_lineHeight in fixed mode + int GetLineHeight( unsigned int row ) const; // m_lineHeight in fixed mode + int GetLineAt( unsigned int y ) const; // y / m_lineHeight in fixed mode + + void SetRowHeight( int lineHeight ) { m_lineHeight = lineHeight; } + int GetRowHeight() const { return m_lineHeight; } + int GetDefaultRowHeight() const; + + // Some useful functions for row and item mapping + wxDataViewItem GetItemByRow( unsigned int row ) const; + int GetRowByItem( const wxDataViewItem & item ) const; + + wxDataViewTreeNode * GetTreeNodeByRow( unsigned int row ) const; + // We did not need this temporarily + // wxDataViewTreeNode * GetTreeNodeByItem( const wxDataViewItem & item ); + + // Methods for building the mapping tree + void BuildTree( wxDataViewModel * model ); + void DestroyTree(); + void HitTest( const wxPoint & point, wxDataViewItem & item, wxDataViewColumn* &column ); + wxRect GetItemRect( const wxDataViewItem & item, const wxDataViewColumn* column ); + + void Expand( unsigned int row ); + void Collapse( unsigned int row ); + bool IsExpanded( unsigned int row ) const; + bool HasChildren( unsigned int row ) const; + +#if wxUSE_DRAG_AND_DROP + bool EnableDragSource( const wxDataFormat &format ); + bool EnableDropTarget( const wxDataFormat &format ); + + void RemoveDropHint(); + wxDragResult OnDragOver( wxDataFormat format, wxCoord x, wxCoord y, wxDragResult def ); + bool OnDrop( wxDataFormat format, wxCoord x, wxCoord y ); + wxDragResult OnData( wxDataFormat format, wxCoord x, wxCoord y, wxDragResult def ); + void OnLeave(); +#endif // wxUSE_DRAG_AND_DROP + + void OnColumnsCountChanged(); + + // Called by wxDataViewCtrl and our own OnRenameTimer() to start edit the + // specified item in the given column. + void StartEditing(const wxDataViewItem& item, const wxDataViewColumn* col); + void FinishEditing(); + +private: + int RecalculateCount() const; + + // Return false only if the event was vetoed by its handler. + bool SendExpanderEvent(wxEventType type, const wxDataViewItem& item); + + wxDataViewTreeNode * FindNode( const wxDataViewItem & item ); + + wxDataViewColumn *FindColumnForEditing(const wxDataViewItem& item, wxDataViewCellMode mode); + + bool IsCellEditableInMode(const wxDataViewItem& item, const wxDataViewColumn *col, wxDataViewCellMode mode) const; + + void DrawCellBackground( wxDataViewRenderer* cell, wxDC& dc, const wxRect& rect ); + +private: + wxDataViewCtrl *m_owner; + int m_lineHeight; + bool m_dirty; + + wxDataViewColumn *m_currentCol; + unsigned int m_currentRow; + wxDataViewSelection m_selection; + + wxDataViewRenameTimer *m_renameTimer; + bool m_lastOnSame; + + bool m_hasFocus; + bool m_useCellFocus; + bool m_currentColSetByKeyboard; + +#if wxUSE_DRAG_AND_DROP + int m_dragCount; + wxPoint m_dragStart; + + bool m_dragEnabled; + wxDataFormat m_dragFormat; + + bool m_dropEnabled; + wxDataFormat m_dropFormat; + bool m_dropHint; + unsigned int m_dropHintLine; +#endif // wxUSE_DRAG_AND_DROP + + // for double click logic + unsigned int m_lineLastClicked, + m_lineBeforeLastClicked, + m_lineSelectSingleOnUp; + + // the pen used to draw horiz/vertical rules + wxPen m_penRule; + + // the pen used to draw the expander and the lines + wxPen m_penExpander; + + // This is the tree structure of the model + wxDataViewTreeNode * m_root; + int m_count; + + // This is the tree node under the cursor + wxDataViewTreeNode * m_underMouse; + + // The control used for editing or NULL. + wxWeakRef m_editorCtrl; + + // Id m_editorCtrl is non-NULL, pointer to the associated renderer. + wxDataViewRenderer* m_editorRenderer; + +private: + DECLARE_DYNAMIC_CLASS(wxDataViewMainWindow) + DECLARE_EVENT_TABLE() +}; + +// --------------------------------------------------------- +// wxGenericDataViewModelNotifier +// --------------------------------------------------------- + +class wxGenericDataViewModelNotifier: public wxDataViewModelNotifier +{ +public: + wxGenericDataViewModelNotifier( wxDataViewMainWindow *mainWindow ) + { m_mainWindow = mainWindow; } + + virtual bool ItemAdded( const wxDataViewItem & parent, const wxDataViewItem & item ) + { return m_mainWindow->ItemAdded( parent , item ); } + virtual bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item ) + { return m_mainWindow->ItemDeleted( parent, item ); } + virtual bool ItemChanged( const wxDataViewItem & item ) + { return m_mainWindow->ItemChanged(item); } + virtual bool ValueChanged( const wxDataViewItem & item , unsigned int col ) + { return m_mainWindow->ValueChanged( item, col ); } + virtual bool Cleared() + { return m_mainWindow->Cleared(); } + virtual void Resort() + { m_mainWindow->Resort(); } + + wxDataViewMainWindow *m_mainWindow; +}; + +// --------------------------------------------------------- +// wxDataViewRenderer +// --------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxDataViewRenderer, wxDataViewRendererBase) + +wxDataViewRenderer::wxDataViewRenderer( const wxString &varianttype, + wxDataViewCellMode mode, + int align) : + wxDataViewCustomRendererBase( varianttype, mode, align ) +{ + m_align = align; + m_mode = mode; + m_ellipsizeMode = wxELLIPSIZE_MIDDLE; + m_dc = NULL; +} + +wxDataViewRenderer::~wxDataViewRenderer() +{ + delete m_dc; +} + +wxDC *wxDataViewRenderer::GetDC() +{ + if (m_dc == NULL) + { + if (GetOwner() == NULL) + return NULL; + if (GetOwner()->GetOwner() == NULL) + return NULL; + m_dc = new wxClientDC( GetOwner()->GetOwner() ); + } + + return m_dc; +} + +void wxDataViewRenderer::SetAlignment( int align ) +{ + m_align=align; +} + +int wxDataViewRenderer::GetAlignment() const +{ + return m_align; +} + +// --------------------------------------------------------- +// wxDataViewCustomRenderer +// --------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxDataViewCustomRenderer, wxDataViewRenderer) + +wxDataViewCustomRenderer::wxDataViewCustomRenderer( const wxString &varianttype, + wxDataViewCellMode mode, int align ) : + wxDataViewRenderer( varianttype, mode, align ) +{ +} + +// --------------------------------------------------------- +// wxDataViewTextRenderer +// --------------------------------------------------------- + +IMPLEMENT_CLASS(wxDataViewTextRenderer, wxDataViewRenderer) + +wxDataViewTextRenderer::wxDataViewTextRenderer( const wxString &varianttype, + wxDataViewCellMode mode, int align ) : + wxDataViewRenderer( varianttype, mode, align ) +{ +} + +bool wxDataViewTextRenderer::SetValue( const wxVariant &value ) +{ + m_text = value.GetString(); + + return true; +} + +bool wxDataViewTextRenderer::GetValue( wxVariant& WXUNUSED(value) ) const +{ + return false; +} + +bool wxDataViewTextRenderer::HasEditorCtrl() const +{ + return true; +} + +wxWindow* wxDataViewTextRenderer::CreateEditorCtrl( wxWindow *parent, + wxRect labelRect, const wxVariant &value ) +{ + return CreateEditorTextCtrl(parent, labelRect, value); +} + +bool wxDataViewTextRenderer::GetValueFromEditorCtrl( wxWindow *editor, wxVariant &value ) +{ + wxTextCtrl *text = (wxTextCtrl*) editor; + value = text->GetValue(); + return true; +} + +bool wxDataViewTextRenderer::Render(wxRect rect, wxDC *dc, int state) +{ + RenderText(m_text, 0, rect, dc, state); + return true; +} + +wxSize wxDataViewTextRenderer::GetSize() const +{ + if (!m_text.empty()) + return GetTextExtent(m_text); + else + return wxSize(wxDVC_DEFAULT_RENDERER_SIZE,wxDVC_DEFAULT_RENDERER_SIZE); +} + +// --------------------------------------------------------- +// wxDataViewBitmapRenderer +// --------------------------------------------------------- + +IMPLEMENT_CLASS(wxDataViewBitmapRenderer, wxDataViewRenderer) + +wxDataViewBitmapRenderer::wxDataViewBitmapRenderer( const wxString &varianttype, + wxDataViewCellMode mode, int align ) : + wxDataViewRenderer( varianttype, mode, align ) +{ +} + +bool wxDataViewBitmapRenderer::SetValue( const wxVariant &value ) +{ + if (value.GetType() == wxT("wxBitmap")) + m_bitmap << value; + if (value.GetType() == wxT("wxIcon")) + m_icon << value; + + return true; +} + +bool wxDataViewBitmapRenderer::GetValue( wxVariant& WXUNUSED(value) ) const +{ + return false; +} + +bool wxDataViewBitmapRenderer::Render( wxRect cell, wxDC *dc, int WXUNUSED(state) ) +{ + if (m_bitmap.IsOk()) + dc->DrawBitmap( m_bitmap, cell.x, cell.y, true /* use mask */ ); + else if (m_icon.IsOk()) + dc->DrawIcon( m_icon, cell.x, cell.y ); + + return true; +} + +wxSize wxDataViewBitmapRenderer::GetSize() const +{ + if (m_bitmap.IsOk()) + return wxSize( m_bitmap.GetWidth(), m_bitmap.GetHeight() ); + else if (m_icon.IsOk()) + return wxSize( m_icon.GetWidth(), m_icon.GetHeight() ); + + return wxSize(wxDVC_DEFAULT_RENDERER_SIZE,wxDVC_DEFAULT_RENDERER_SIZE); +} + +// --------------------------------------------------------- +// wxDataViewToggleRenderer +// --------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxDataViewToggleRenderer, wxDataViewRenderer) + +wxDataViewToggleRenderer::wxDataViewToggleRenderer( const wxString &varianttype, + wxDataViewCellMode mode, int align ) : + wxDataViewRenderer( varianttype, mode, align ) +{ + m_toggle = false; +} + +bool wxDataViewToggleRenderer::SetValue( const wxVariant &value ) +{ + m_toggle = value.GetBool(); + + return true; +} + +bool wxDataViewToggleRenderer::GetValue( wxVariant &WXUNUSED(value) ) const +{ + return false; +} + +bool wxDataViewToggleRenderer::Render( wxRect cell, wxDC *dc, int WXUNUSED(state) ) +{ + int flags = 0; + if (m_toggle) + flags |= wxCONTROL_CHECKED; + if (GetMode() != wxDATAVIEW_CELL_ACTIVATABLE || + GetEnabled() == false) + flags |= wxCONTROL_DISABLED; + + // Ensure that the check boxes always have at least the minimal required + // size, otherwise DrawCheckBox() doesn't really work well. If this size is + // greater than the cell size, the checkbox will be truncated but this is a + // lesser evil. + wxSize size = cell.GetSize(); + size.IncTo(GetSize()); + cell.SetSize(size); + + wxRendererNative::Get().DrawCheckBox( + GetOwner()->GetOwner(), + *dc, + cell, + flags ); + + return true; +} + +bool wxDataViewToggleRenderer::WXActivateCell(const wxRect& WXUNUSED(cellRect), + wxDataViewModel *model, + const wxDataViewItem& item, + unsigned int col, + const wxMouseEvent *mouseEvent) +{ + if ( mouseEvent ) + { + // Only react to clicks directly on the checkbox, not elsewhere in the + // same cell. + if ( !wxRect(GetSize()).Contains(mouseEvent->GetPosition()) ) + return false; + } + + model->ChangeValue(!m_toggle, item, col); + return true; +} + +wxSize wxDataViewToggleRenderer::GetSize() const +{ + // the window parameter is not used by GetCheckBoxSize() so it's + // safe to pass NULL + return wxRendererNative::Get().GetCheckBoxSize(NULL); +} + +// --------------------------------------------------------- +// wxDataViewProgressRenderer +// --------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxDataViewProgressRenderer, wxDataViewRenderer) + +wxDataViewProgressRenderer::wxDataViewProgressRenderer( const wxString &label, + const wxString &varianttype, wxDataViewCellMode mode, int align ) : + wxDataViewRenderer( varianttype, mode, align ) +{ + m_label = label; + m_value = 0; +} + +bool wxDataViewProgressRenderer::SetValue( const wxVariant &value ) +{ + m_value = (long) value; + + if (m_value < 0) m_value = 0; + if (m_value > 100) m_value = 100; + + return true; +} + +bool wxDataViewProgressRenderer::GetValue( wxVariant &value ) const +{ + value = (long) m_value; + return true; +} + +bool +wxDataViewProgressRenderer::Render(wxRect rect, wxDC *dc, int WXUNUSED(state)) +{ + // deflate the rect to leave a small border between bars in adjacent rows + wxRect bar = rect.Deflate(0, 1); + + dc->SetBrush( *wxTRANSPARENT_BRUSH ); + dc->SetPen( *wxBLACK_PEN ); + dc->DrawRectangle( bar ); + + bar.width = (int)(bar.width * m_value / 100.); + dc->SetPen( *wxTRANSPARENT_PEN ); + + const wxDataViewItemAttr& attr = GetAttr(); + dc->SetBrush( attr.HasColour() ? wxBrush(attr.GetColour()) + : *wxBLUE_BRUSH ); + dc->DrawRectangle( bar ); + + return true; +} + +wxSize wxDataViewProgressRenderer::GetSize() const +{ + // Return -1 width because a progress bar fits any width; unlike most + // renderers, it doesn't have a "good" width for the content. This makes it + // grow to the whole column, which is pretty much always the desired + // behaviour. Keep the height fixed so that the progress bar isn't too fat. + return wxSize(-1, 12); +} + +// --------------------------------------------------------- +// wxDataViewIconTextRenderer +// --------------------------------------------------------- + +IMPLEMENT_CLASS(wxDataViewIconTextRenderer, wxDataViewRenderer) + +wxDataViewIconTextRenderer::wxDataViewIconTextRenderer( +const wxString &varianttype, wxDataViewCellMode mode, int align ) : + wxDataViewRenderer( varianttype, mode, align ) +{ + SetMode(mode); + SetAlignment(align); +} + +bool wxDataViewIconTextRenderer::SetValue( const wxVariant &value ) +{ + m_value << value; + return true; +} + +bool wxDataViewIconTextRenderer::GetValue( wxVariant& WXUNUSED(value) ) const +{ + return false; +} + +bool wxDataViewIconTextRenderer::Render(wxRect rect, wxDC *dc, int state) +{ + int xoffset = 0; + + const wxIcon& icon = m_value.GetIcon(); + if ( icon.IsOk() ) + { + dc->DrawIcon(icon, rect.x, rect.y + (rect.height - icon.GetHeight())/2); + xoffset = icon.GetWidth()+4; + } + + RenderText(m_value.GetText(), xoffset, rect, dc, state); + + return true; +} + +wxSize wxDataViewIconTextRenderer::GetSize() const +{ + if (!m_value.GetText().empty()) + { + wxSize size = GetTextExtent(m_value.GetText()); + + if (m_value.GetIcon().IsOk()) + size.x += m_value.GetIcon().GetWidth() + 4; + return size; + } + return wxSize(80,20); +} + +wxWindow* wxDataViewIconTextRenderer::CreateEditorCtrl(wxWindow *parent, wxRect labelRect, const wxVariant& value) +{ + wxDataViewIconText iconText; + iconText << value; + + wxString text = iconText.GetText(); + + // adjust the label rect to take the width of the icon into account + if (iconText.GetIcon().IsOk()) + { + int w = iconText.GetIcon().GetWidth() + 4; + labelRect.x += w; + labelRect.width -= w; + } + + return CreateEditorTextCtrl(parent, labelRect, text); +} + +bool wxDataViewIconTextRenderer::GetValueFromEditorCtrl( wxWindow *editor, wxVariant& value ) +{ + wxTextCtrl *text = (wxTextCtrl*) editor; + + // The icon can't be edited so get its old value and reuse it. + wxVariant valueOld; + wxDataViewColumn* const col = GetOwner(); + GetView()->GetModel()->GetValue(valueOld, m_item, col->GetModelColumn()); + + wxDataViewIconText iconText; + iconText << valueOld; + + // But replace the text with the value entered by user. + iconText.SetText(text->GetValue()); + + value << iconText; + return true; +} + +//----------------------------------------------------------------------------- +// wxDataViewDropTarget +//----------------------------------------------------------------------------- + +#if wxUSE_DRAG_AND_DROP + +class wxBitmapCanvas: public wxWindow +{ +public: + wxBitmapCanvas( wxWindow *parent, const wxBitmap &bitmap, const wxSize &size ) : + wxWindow( parent, wxID_ANY, wxPoint(0,0), size ) + { + m_bitmap = bitmap; + Connect( wxEVT_PAINT, wxPaintEventHandler(wxBitmapCanvas::OnPaint) ); + } + + void OnPaint( wxPaintEvent &WXUNUSED(event) ) + { + wxPaintDC dc(this); + dc.DrawBitmap( m_bitmap, 0, 0); + } + + wxBitmap m_bitmap; +}; + +class wxDataViewDropSource: public wxDropSource +{ +public: + wxDataViewDropSource( wxDataViewMainWindow *win, unsigned int row ) : + wxDropSource( win ) + { + m_win = win; + m_row = row; + m_hint = NULL; + } + + ~wxDataViewDropSource() + { + delete m_hint; + } + + virtual bool GiveFeedback( wxDragResult WXUNUSED(effect) ) + { + wxPoint pos = wxGetMousePosition(); + + if (!m_hint) + { + int liney = m_win->GetLineStart( m_row ); + int linex = 0; + m_win->GetOwner()->CalcUnscrolledPosition( 0, liney, NULL, &liney ); + m_win->ClientToScreen( &linex, &liney ); + m_dist_x = pos.x - linex; + m_dist_y = pos.y - liney; + + int indent = 0; + wxBitmap ib = m_win->CreateItemBitmap( m_row, indent ); + m_dist_x -= indent; + m_hint = new wxFrame( m_win->GetParent(), wxID_ANY, wxEmptyString, + wxPoint(pos.x - m_dist_x, pos.y + 5 ), + ib.GetSize(), + wxFRAME_TOOL_WINDOW | + wxFRAME_FLOAT_ON_PARENT | + wxFRAME_NO_TASKBAR | + wxNO_BORDER ); + new wxBitmapCanvas( m_hint, ib, ib.GetSize() ); + m_hint->Show(); + } + else + { + m_hint->Move( pos.x - m_dist_x, pos.y + 5 ); + m_hint->SetTransparent( 128 ); + } + + return false; + } + + wxDataViewMainWindow *m_win; + unsigned int m_row; + wxFrame *m_hint; + int m_dist_x,m_dist_y; +}; + + +class wxDataViewDropTarget: public wxDropTarget +{ +public: + wxDataViewDropTarget( wxDataObject *obj, wxDataViewMainWindow *win ) : + wxDropTarget( obj ) + { + m_win = win; + } + + virtual wxDragResult OnDragOver( wxCoord x, wxCoord y, wxDragResult def ) + { + wxDataFormat format = GetMatchingPair(); + if (format == wxDF_INVALID) + return wxDragNone; + return m_win->OnDragOver( format, x, y, def); + } + + virtual bool OnDrop( wxCoord x, wxCoord y ) + { + wxDataFormat format = GetMatchingPair(); + if (format == wxDF_INVALID) + return false; + return m_win->OnDrop( format, x, y ); + } + + virtual wxDragResult OnData( wxCoord x, wxCoord y, wxDragResult def ) + { + wxDataFormat format = GetMatchingPair(); + if (format == wxDF_INVALID) + return wxDragNone; + if (!GetData()) + return wxDragNone; + return m_win->OnData( format, x, y, def ); + } + + virtual void OnLeave() + { m_win->OnLeave(); } + + wxDataViewMainWindow *m_win; +}; + +#endif // wxUSE_DRAG_AND_DROP + +//----------------------------------------------------------------------------- +// wxDataViewRenameTimer +//----------------------------------------------------------------------------- + +wxDataViewRenameTimer::wxDataViewRenameTimer( wxDataViewMainWindow *owner ) +{ + m_owner = owner; +} + +void wxDataViewRenameTimer::Notify() +{ + m_owner->OnRenameTimer(); +} + +//----------------------------------------------------------------------------- +// wxDataViewMainWindow +//----------------------------------------------------------------------------- + +// The tree building helper, declared firstly +static void BuildTreeHelper( const wxDataViewModel * model, const wxDataViewItem & item, + wxDataViewTreeNode * node); + +int LINKAGEMODE wxDataViewSelectionCmp( unsigned int row1, unsigned int row2 ) +{ + if (row1 > row2) return 1; + if (row1 == row2) return 0; + return -1; +} + +IMPLEMENT_ABSTRACT_CLASS(wxDataViewMainWindow, wxWindow) + +BEGIN_EVENT_TABLE(wxDataViewMainWindow,wxWindow) + EVT_PAINT (wxDataViewMainWindow::OnPaint) + EVT_MOUSE_EVENTS (wxDataViewMainWindow::OnMouse) + EVT_SET_FOCUS (wxDataViewMainWindow::OnSetFocus) + EVT_KILL_FOCUS (wxDataViewMainWindow::OnKillFocus) + EVT_CHAR_HOOK (wxDataViewMainWindow::OnCharHook) + EVT_CHAR (wxDataViewMainWindow::OnChar) +END_EVENT_TABLE() + +wxDataViewMainWindow::wxDataViewMainWindow( wxDataViewCtrl *parent, wxWindowID id, + const wxPoint &pos, const wxSize &size, const wxString &name ) : + wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE, name ), + m_selection( wxDataViewSelectionCmp ) + +{ + SetOwner( parent ); + + m_editorRenderer = NULL; + + m_lastOnSame = false; + m_renameTimer = new wxDataViewRenameTimer( this ); + + // TODO: user better initial values/nothing selected + m_currentCol = NULL; + m_currentColSetByKeyboard = false; + m_useCellFocus = false; + m_currentRow = (unsigned)-1; + m_lineHeight = GetDefaultRowHeight(); + +#if wxUSE_DRAG_AND_DROP + m_dragCount = 0; + m_dragStart = wxPoint(0,0); + + m_dragEnabled = false; + m_dropEnabled = false; + m_dropHint = false; + m_dropHintLine = (unsigned int) -1; +#endif // wxUSE_DRAG_AND_DROP + + m_lineLastClicked = (unsigned int) -1; + m_lineBeforeLastClicked = (unsigned int) -1; + m_lineSelectSingleOnUp = (unsigned int) -1; + + m_hasFocus = false; + + SetBackgroundColour( *wxWHITE ); + + SetBackgroundStyle(wxBG_STYLE_CUSTOM); + + m_penRule = wxPen(GetRuleColour()); + + // compose a pen whichcan draw black lines + // TODO: maybe there is something system colour to use + m_penExpander = wxPen(wxColour(0,0,0)); + + m_root = wxDataViewTreeNode::CreateRootNode(); + + // Make m_count = -1 will cause the class recaculate the real displaying number of rows. + m_count = -1; + m_underMouse = NULL; + UpdateDisplay(); +} + +wxDataViewMainWindow::~wxDataViewMainWindow() +{ + DestroyTree(); + delete m_renameTimer; +} + + +int wxDataViewMainWindow::GetDefaultRowHeight() const +{ +#ifdef __WXMSW__ + // We would like to use the same line height that Explorer uses. This is + // different from standard ListView control since Vista. + if ( wxGetWinVersion() >= wxWinVersion_Vista ) + return wxMax(16, GetCharHeight()) + 6; // 16 = mini icon height + else +#endif // __WXMSW__ + return wxMax(16, GetCharHeight()) + 1; // 16 = mini icon height +} + + + +#if wxUSE_DRAG_AND_DROP +bool wxDataViewMainWindow::EnableDragSource( const wxDataFormat &format ) +{ + m_dragFormat = format; + m_dragEnabled = format != wxDF_INVALID; + + return true; +} + +bool wxDataViewMainWindow::EnableDropTarget( const wxDataFormat &format ) +{ + m_dropFormat = format; + m_dropEnabled = format != wxDF_INVALID; + + if (m_dropEnabled) + SetDropTarget( new wxDataViewDropTarget( new wxCustomDataObject( format ), this ) ); + + return true; +} + +void wxDataViewMainWindow::RemoveDropHint() +{ + if (m_dropHint) + { + m_dropHint = false; + RefreshRow( m_dropHintLine ); + m_dropHintLine = (unsigned int) -1; + } +} + +wxDragResult wxDataViewMainWindow::OnDragOver( wxDataFormat format, wxCoord x, + wxCoord y, wxDragResult def ) +{ + int xx = x; + int yy = y; + m_owner->CalcUnscrolledPosition( xx, yy, &xx, &yy ); + unsigned int row = GetLineAt( yy ); + + if ((row >= GetRowCount()) || (xx > GetEndOfLastCol())) + { + RemoveDropHint(); + return wxDragNone; + } + + wxDataViewItem item = GetItemByRow( row ); + + wxDataViewModel *model = GetModel(); + + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, m_owner->GetId() ); + event.SetEventObject( m_owner ); + event.SetItem( item ); + event.SetModel( model ); + event.SetDataFormat( format ); + event.SetDropEffect( def ); + if (!m_owner->HandleWindowEvent( event )) + { + RemoveDropHint(); + return wxDragNone; + } + + if (!event.IsAllowed()) + { + RemoveDropHint(); + return wxDragNone; + } + + + if (m_dropHint && (row != m_dropHintLine)) + RefreshRow( m_dropHintLine ); + m_dropHint = true; + m_dropHintLine = row; + RefreshRow( row ); + + return def; +} + +bool wxDataViewMainWindow::OnDrop( wxDataFormat format, wxCoord x, wxCoord y ) +{ + RemoveDropHint(); + + int xx = x; + int yy = y; + m_owner->CalcUnscrolledPosition( xx, yy, &xx, &yy ); + unsigned int row = GetLineAt( yy ); + + if ((row >= GetRowCount()) || (xx > GetEndOfLastCol())) + return false; + + wxDataViewItem item = GetItemByRow( row ); + + wxDataViewModel *model = GetModel(); + + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, m_owner->GetId() ); + event.SetEventObject( m_owner ); + event.SetItem( item ); + event.SetModel( model ); + event.SetDataFormat( format ); + if (!m_owner->HandleWindowEvent( event )) + return false; + + if (!event.IsAllowed()) + return false; + + return true; +} + +wxDragResult wxDataViewMainWindow::OnData( wxDataFormat format, wxCoord x, wxCoord y, + wxDragResult def ) +{ + int xx = x; + int yy = y; + m_owner->CalcUnscrolledPosition( xx, yy, &xx, &yy ); + unsigned int row = GetLineAt( yy ); + + if ((row >= GetRowCount()) || (xx > GetEndOfLastCol())) + return wxDragNone; + + wxDataViewItem item = GetItemByRow( row ); + + wxDataViewModel *model = GetModel(); + + wxCustomDataObject *obj = (wxCustomDataObject *) GetDropTarget()->GetDataObject(); + + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_DROP, m_owner->GetId() ); + event.SetEventObject( m_owner ); + event.SetItem( item ); + event.SetModel( model ); + event.SetDataFormat( format ); + event.SetDataSize( obj->GetSize() ); + event.SetDataBuffer( obj->GetData() ); + event.SetDropEffect( def ); + if (!m_owner->HandleWindowEvent( event )) + return wxDragNone; + + if (!event.IsAllowed()) + return wxDragNone; + + return def; +} + +void wxDataViewMainWindow::OnLeave() +{ + RemoveDropHint(); +} + +wxBitmap wxDataViewMainWindow::CreateItemBitmap( unsigned int row, int &indent ) +{ + int height = GetLineHeight( row ); + int width = 0; + unsigned int cols = GetOwner()->GetColumnCount(); + unsigned int col; + for (col = 0; col < cols; col++) + { + wxDataViewColumn *column = GetOwner()->GetColumnAt(col); + if (column->IsHidden()) + continue; // skip it! + width += column->GetWidth(); + } + + indent = 0; + if (!IsList()) + { + wxDataViewTreeNode *node = GetTreeNodeByRow(row); + indent = GetOwner()->GetIndent() * node->GetIndentLevel(); + indent = indent + m_lineHeight; + // try to use the m_lineHeight as the expander space + } + width -= indent; + + wxBitmap bitmap( width, height ); + wxMemoryDC dc( bitmap ); + dc.SetFont( GetFont() ); + dc.SetPen( *wxBLACK_PEN ); + dc.SetBrush( *wxWHITE_BRUSH ); + dc.DrawRectangle( 0,0,width,height ); + + wxDataViewModel *model = m_owner->GetModel(); + + wxDataViewColumn * const + expander = GetExpanderColumnOrFirstOne(GetOwner()); + + int x = 0; + for (col = 0; col < cols; col++) + { + wxDataViewColumn *column = GetOwner()->GetColumnAt( col ); + wxDataViewRenderer *cell = column->GetRenderer(); + + if (column->IsHidden()) + continue; // skip it! + + width = column->GetWidth(); + + if (column == expander) + width -= indent; + + wxDataViewItem item = GetItemByRow( row ); + cell->PrepareForItem(model, item, column->GetModelColumn()); + + wxRect item_rect(x, 0, width, height); + item_rect.Deflate(PADDING_RIGHTLEFT, 0); + + // dc.SetClippingRegion( item_rect ); + cell->WXCallRender(item_rect, &dc, 0); + // dc.DestroyClippingRegion(); + + x += width; + } + + return bitmap; +} + +#endif // wxUSE_DRAG_AND_DROP + + +// Draw focus rect for individual cell. Unlike native focus rect, we render +// this in foreground text color (typically white) to enhance contrast and +// make it visible. +static void DrawSelectedCellFocusRect(wxDC& dc, const wxRect& rect) +{ + // (This code is based on wxRendererGeneric::DrawFocusRect and modified.) + + // draw the pixels manually because the "dots" in wxPen with wxDOT style + // may be short traits and not really dots + // + // note that to behave in the same manner as DrawRect(), we must exclude + // the bottom and right borders from the rectangle + wxCoord x1 = rect.GetLeft(), + y1 = rect.GetTop(), + x2 = rect.GetRight(), + y2 = rect.GetBottom(); + + wxDCPenChanger pen(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); + + wxCoord z; + for ( z = x1 + 1; z < x2; z += 2 ) + dc.DrawPoint(z, rect.GetTop()); + + wxCoord shift = z == x2 ? 0 : 1; + for ( z = y1 + shift; z < y2; z += 2 ) + dc.DrawPoint(x2, z); + + shift = z == y2 ? 0 : 1; + for ( z = x2 - shift; z > x1; z -= 2 ) + dc.DrawPoint(z, y2); + + shift = z == x1 ? 0 : 1; + for ( z = y2 - shift; z > y1; z -= 2 ) + dc.DrawPoint(x1, z); +} + + +void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) +{ + wxDataViewModel *model = GetModel(); + wxAutoBufferedPaintDC dc( this ); + + dc.SetBrush(GetOwner()->GetBackgroundColour()); + dc.SetPen( *wxTRANSPARENT_PEN ); + dc.DrawRectangle(GetClientSize()); + + if ( IsEmpty() ) + { + // No items to draw. + return; + } + + // prepare the DC + GetOwner()->PrepareDC( dc ); + dc.SetFont( GetFont() ); + + wxRect update = GetUpdateRegion().GetBox(); + m_owner->CalcUnscrolledPosition( update.x, update.y, &update.x, &update.y ); + + // compute which items needs to be redrawn + unsigned int item_start = GetLineAt( wxMax(0,update.y) ); + unsigned int item_count = + wxMin( (int)( GetLineAt( wxMax(0,update.y+update.height) ) - item_start + 1), + (int)(GetRowCount( ) - item_start)); + unsigned int item_last = item_start + item_count; + + // Send the event to wxDataViewCtrl itself. + wxWindow * const parent = GetParent(); + wxDataViewEvent cache_event(wxEVT_DATAVIEW_CACHE_HINT, parent->GetId()); + cache_event.SetEventObject(parent); + cache_event.SetCache(item_start, item_last - 1); + parent->ProcessWindowEvent(cache_event); + + // compute which columns needs to be redrawn + unsigned int cols = GetOwner()->GetColumnCount(); + if ( !cols ) + { + // we assume that we have at least one column below and painting an + // empty control is unnecessary anyhow + return; + } + + unsigned int col_start = 0; + unsigned int x_start; + for (x_start = 0; col_start < cols; col_start++) + { + wxDataViewColumn *col = GetOwner()->GetColumnAt(col_start); + if (col->IsHidden()) + continue; // skip it! + + unsigned int w = col->GetWidth(); + if (x_start+w >= (unsigned int)update.x) + break; + + x_start += w; + } + + unsigned int col_last = col_start; + unsigned int x_last = x_start; + for (; col_last < cols; col_last++) + { + wxDataViewColumn *col = GetOwner()->GetColumnAt(col_last); + if (col->IsHidden()) + continue; // skip it! + + if (x_last > (unsigned int)update.GetRight()) + break; + + x_last += col->GetWidth(); + } + + // Draw background of alternate rows specially if required + if ( m_owner->HasFlag(wxDV_ROW_LINES) ) + { + wxColour altRowColour = m_owner->m_alternateRowColour; + if ( !altRowColour.IsOk() ) + { + // Determine the alternate rows colour automatically from the + // background colour. + const wxColour bgColour = m_owner->GetBackgroundColour(); + + // Depending on the background, alternate row color + // will be 3% more dark or 50% brighter. + int alpha = bgColour.GetRGB() > 0x808080 ? 97 : 150; + altRowColour = bgColour.ChangeLightness(alpha); + } + + dc.SetPen(*wxTRANSPARENT_PEN); + dc.SetBrush(wxBrush(altRowColour)); + + for (unsigned int item = item_start; item < item_last; item++) + { + if ( item % 2 ) + { + dc.DrawRectangle(x_start, + GetLineStart(item), + GetClientSize().GetWidth(), + GetLineHeight(item)); + } + } + } + + // Draw horizontal rules if required + if ( m_owner->HasFlag(wxDV_HORIZ_RULES) ) + { + dc.SetPen(m_penRule); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + + for (unsigned int i = item_start; i <= item_last; i++) + { + int y = GetLineStart( i ); + dc.DrawLine(x_start, y, x_last, y); + } + } + + // Draw vertical rules if required + if ( m_owner->HasFlag(wxDV_VERT_RULES) ) + { + dc.SetPen(m_penRule); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + + // NB: Vertical rules are drawn in the last pixel of a column so that + // they align perfectly with native MSW wxHeaderCtrl as well as for + // consistency with MSW native list control. There's no vertical + // rule at the most-left side of the control. + + int x = x_start - 1; + for (unsigned int i = col_start; i < col_last; i++) + { + wxDataViewColumn *col = GetOwner()->GetColumnAt(i); + if (col->IsHidden()) + continue; // skip it + + x += col->GetWidth(); + + dc.DrawLine(x, GetLineStart( item_start ), + x, GetLineStart( item_last ) ); + } + } + + // redraw the background for the items which are selected/current + for (unsigned int item = item_start; item < item_last; item++) + { + bool selected = m_selection.Index( item ) != wxNOT_FOUND; + + if (selected || item == m_currentRow) + { + wxRect rect( x_start, GetLineStart( item ), + x_last - x_start, GetLineHeight( item ) ); + + // draw selection and whole-item focus: + if ( selected ) + { + int flags = wxCONTROL_SELECTED; + if (m_hasFocus) + flags |= wxCONTROL_FOCUSED; + + wxRendererNative::Get().DrawItemSelectionRect + ( + this, + dc, + rect, + flags + ); + } + + // draw keyboard focus rect if applicable + if ( item == m_currentRow && m_hasFocus ) + { + bool renderColumnFocus = false; + + if ( m_useCellFocus && m_currentCol && m_currentColSetByKeyboard ) + { + renderColumnFocus = true; + + // If this is container node without columns, render full-row focus: + if ( !IsList() ) + { + wxDataViewTreeNode *node = GetTreeNodeByRow(item); + if ( node->HasChildren() && !model->HasContainerColumns(node->GetItem()) ) + renderColumnFocus = false; + } + } + + if ( renderColumnFocus ) + { + for ( unsigned int i = col_start; i < col_last; i++ ) + { + wxDataViewColumn *col = GetOwner()->GetColumnAt(i); + if ( col->IsHidden() ) + continue; + + rect.width = col->GetWidth(); + + if ( col == m_currentCol ) + { + // make the rect more visible by adding a small + // margin around it: + rect.Deflate(1, 1); + + if ( selected ) + { + // DrawFocusRect() uses XOR and is all but + // invisible against dark-blue background. Use + // the same color used for selected text. + DrawSelectedCellFocusRect(dc, rect); + } + else + { + wxRendererNative::Get().DrawFocusRect + ( + this, + dc, + rect, + 0 + ); + } + break; + } + + rect.x += rect.width; + } + } + else + { + // render focus rectangle for the whole row + wxRendererNative::Get().DrawFocusRect + ( + this, + dc, + rect, + selected ? (int)wxCONTROL_SELECTED : 0 + ); + } + } + } + } + +#if wxUSE_DRAG_AND_DROP + if (m_dropHint) + { + wxRect rect( x_start, GetLineStart( m_dropHintLine ), + x_last - x_start, GetLineHeight( m_dropHintLine ) ); + dc.SetPen( *wxBLACK_PEN ); + dc.SetBrush( *wxTRANSPARENT_BRUSH ); + dc.DrawRectangle( rect ); + } +#endif // wxUSE_DRAG_AND_DROP + + wxDataViewColumn * const + expander = GetExpanderColumnOrFirstOne(GetOwner()); + + // redraw all cells for all rows which must be repainted and all columns + wxRect cell_rect; + cell_rect.x = x_start; + for (unsigned int i = col_start; i < col_last; i++) + { + wxDataViewColumn *col = GetOwner()->GetColumnAt( i ); + wxDataViewRenderer *cell = col->GetRenderer(); + cell_rect.width = col->GetWidth(); + + if ( col->IsHidden() || cell_rect.width <= 0 ) + continue; // skip it! + + for (unsigned int item = item_start; item < item_last; item++) + { + // get the cell value and set it into the renderer + wxDataViewTreeNode *node = NULL; + wxDataViewItem dataitem; + + if (!IsVirtualList()) + { + node = GetTreeNodeByRow(item); + if( node == NULL ) + continue; + + dataitem = node->GetItem(); + + // Skip all columns of "container" rows except the expander + // column itself unless HasContainerColumns() overrides this. + if ( col != expander && + model->IsContainer(dataitem) && + !model->HasContainerColumns(dataitem) ) + continue; + } + else + { + dataitem = wxDataViewItem( wxUIntToPtr(item+1) ); + } + + // update cell_rect + cell_rect.y = GetLineStart( item ); + cell_rect.height = GetLineHeight( item ); + + cell->PrepareForItem(model, dataitem, col->GetModelColumn()); + + // draw the background + bool selected = m_selection.Index( item ) != wxNOT_FOUND; + if ( !selected ) + DrawCellBackground( cell, dc, cell_rect ); + + // deal with the expander + int indent = 0; + if ((!IsList()) && (col == expander)) + { + // Calculate the indent first + indent = GetOwner()->GetIndent() * node->GetIndentLevel(); + + // we reserve m_lineHeight of horizontal space for the expander + // but leave EXPANDER_MARGIN around the expander itself + int exp_x = cell_rect.x + indent + EXPANDER_MARGIN; + + indent += m_lineHeight; + + // draw expander if needed and visible + if ( node->HasChildren() && exp_x < cell_rect.GetRight() ) + { + dc.SetPen( m_penExpander ); + dc.SetBrush( wxNullBrush ); + + int exp_size = m_lineHeight - 2*EXPANDER_MARGIN; + int exp_y = cell_rect.y + (cell_rect.height - exp_size)/2 + + EXPANDER_MARGIN - EXPANDER_OFFSET; + + const wxRect rect(exp_x, exp_y, exp_size, exp_size); + + int flag = 0; + if ( m_underMouse == node ) + flag |= wxCONTROL_CURRENT; + if ( node->IsOpen() ) + flag |= wxCONTROL_EXPANDED; + + // ensure that we don't overflow the cell (which might + // happen if the column is very narrow) + wxDCClipper clip(dc, cell_rect); + + wxRendererNative::Get().DrawTreeItemButton( this, dc, rect, flag); + } + + // force the expander column to left-center align + cell->SetAlignment( wxALIGN_CENTER_VERTICAL ); + } + + wxRect item_rect = cell_rect; + item_rect.Deflate(PADDING_RIGHTLEFT, 0); + + // account for the tree indent (harmless if we're not indented) + item_rect.x += indent; + item_rect.width -= indent; + + if ( item_rect.width <= 0 ) + continue; + + int state = 0; + if (m_hasFocus && selected) + state |= wxDATAVIEW_CELL_SELECTED; + + // TODO: it would be much more efficient to create a clipping + // region for the entire column being rendered (in the OnPaint + // of wxDataViewMainWindow) instead of a single clip region for + // each cell. However it would mean that each renderer should + // respect the given wxRect's top & bottom coords, eventually + // violating only the left & right coords - however the user can + // make its own renderer and thus we cannot be sure of that. + wxDCClipper clip(dc, item_rect); + + cell->WXCallRender(item_rect, &dc, state); + } + + cell_rect.x += cell_rect.width; + } +} + + +void wxDataViewMainWindow::DrawCellBackground( wxDataViewRenderer* cell, wxDC& dc, const wxRect& rect ) +{ + wxRect rectBg( rect ); + + // don't overlap the horizontal rules + if ( m_owner->HasFlag(wxDV_HORIZ_RULES) ) + { + rectBg.x++; + rectBg.width--; + } + + // don't overlap the vertical rules + if ( m_owner->HasFlag(wxDV_VERT_RULES) ) + { + rectBg.y++; + rectBg.height--; + } + + cell->RenderBackground(&dc, rectBg); +} + +void wxDataViewMainWindow::OnRenameTimer() +{ + // We have to call this here because changes may just have + // been made and no screen update taken place. + if ( m_dirty ) + { + // TODO: use wxTheApp->SafeYieldFor(NULL, wxEVT_CATEGORY_UI) instead + // (needs to be tested!) + wxSafeYield(); + } + + wxDataViewItem item = GetItemByRow( m_currentRow ); + + StartEditing( item, m_currentCol ); +} + +void +wxDataViewMainWindow::StartEditing(const wxDataViewItem& item, + const wxDataViewColumn* col) +{ + wxDataViewRenderer* renderer = col->GetRenderer(); + if ( !IsCellEditableInMode(item, col, wxDATAVIEW_CELL_EDITABLE) ) + return; + + const wxRect itemRect = GetItemRect(item, col); + if ( renderer->StartEditing(item, itemRect) ) + { + // Save the renderer to be able to finish/cancel editing it later and + // save the control to be able to detect if we're still editing it. + m_editorRenderer = renderer; + m_editorCtrl = renderer->GetEditorCtrl(); + } +} + +void wxDataViewMainWindow::FinishEditing() +{ + if ( m_editorCtrl ) + { + m_editorRenderer->FinishEditing(); + } +} + +void wxDataViewHeaderWindow::FinishEditing() +{ + wxDataViewMainWindow *win = static_cast(GetOwner()->GetMainWindow()); + win->FinishEditing(); +} + +//----------------------------------------------------------------------------- +// Helper class for do operation on the tree node +//----------------------------------------------------------------------------- +class DoJob +{ +public: + DoJob() { } + virtual ~DoJob() { } + + // The return value control how the tree-walker tranverse the tree + enum + { + DONE, // Job done, stop traversing and return + SKIP_SUBTREE, // Ignore the current node's subtree and continue + CONTINUE // Job not done, continue + }; + + virtual int operator() ( wxDataViewTreeNode * node ) = 0; +}; + +bool Walker( wxDataViewTreeNode * node, DoJob & func ) +{ + wxCHECK_MSG( node, false, "can't walk NULL node" ); + + switch( func( node ) ) + { + case DoJob::DONE: + return true; + case DoJob::SKIP_SUBTREE: + return false; + case DoJob::CONTINUE: + break; + } + + if ( node->HasChildren() ) + { + const wxDataViewTreeNodes& nodes = node->GetChildNodes(); + + for ( wxDataViewTreeNodes::const_iterator i = nodes.begin(); + i != nodes.end(); + ++i ) + { + if ( Walker(*i, func) ) + return true; + } + } + + return false; +} + +bool wxDataViewMainWindow::ItemAdded(const wxDataViewItem & parent, const wxDataViewItem & item) +{ + if (IsVirtualList()) + { + wxDataViewVirtualListModel *list_model = + (wxDataViewVirtualListModel*) GetModel(); + m_count = list_model->GetCount(); + } + else + { + SortPrepare(); + + wxDataViewTreeNode *parentNode = FindNode(parent); + + if ( !parentNode ) + return false; + + wxDataViewItemArray modelSiblings; + GetModel()->GetChildren(parent, modelSiblings); + const int modelSiblingsSize = modelSiblings.size(); + + int posInModel = modelSiblings.Index(item, /*fromEnd=*/true); + wxCHECK_MSG( posInModel != wxNOT_FOUND, false, "adding non-existent item?" ); + + wxDataViewTreeNode *itemNode = new wxDataViewTreeNode(parentNode, item); + itemNode->SetHasChildren(GetModel()->IsContainer(item)); + + parentNode->SetHasChildren(true); + + const wxDataViewTreeNodes& nodeSiblings = parentNode->GetChildNodes(); + const int nodeSiblingsSize = nodeSiblings.size(); + + int nodePos = 0; + + if ( posInModel == modelSiblingsSize - 1 ) + { + nodePos = nodeSiblingsSize; + } + else if ( modelSiblingsSize == nodeSiblingsSize + 1 ) + { + // This is the simple case when our node tree already matches the + // model and only this one item is missing. + nodePos = posInModel; + } + else + { + // It's possible that a larger discrepancy between the model and + // our realization exists. This can happen e.g. when adding a bunch + // of items to the model and then calling ItemsAdded() just once + // afterwards. In this case, we must find the right position by + // looking at sibling items. + + // append to the end if we won't find a better position: + nodePos = nodeSiblingsSize; + + for ( int nextItemPos = posInModel + 1; + nextItemPos < modelSiblingsSize; + nextItemPos++ ) + { + int nextNodePos = parentNode->FindChildByItem(modelSiblings[nextItemPos]); + if ( nextNodePos != wxNOT_FOUND ) + { + nodePos = nextNodePos; + break; + } + } + } + + parentNode->ChangeSubTreeCount(+1); + parentNode->InsertChild(itemNode, nodePos); + + m_count = -1; + } + + GetOwner()->InvalidateColBestWidths(); + UpdateDisplay(); + + return true; +} + +bool wxDataViewMainWindow::ItemDeleted(const wxDataViewItem& parent, + const wxDataViewItem& item) +{ + if (IsVirtualList()) + { + wxDataViewVirtualListModel *list_model = + (wxDataViewVirtualListModel*) GetModel(); + m_count = list_model->GetCount(); + + if ( !m_selection.empty() ) + { + const int row = GetRowByItem(item); + + int rowIndexInSelection = wxNOT_FOUND; + + const size_t selCount = m_selection.size(); + for ( size_t i = 0; i < selCount; i++ ) + { + if ( m_selection[i] == (unsigned)row ) + rowIndexInSelection = i; + else if ( m_selection[i] > (unsigned)row ) + m_selection[i]--; + } + + if ( rowIndexInSelection != wxNOT_FOUND ) + m_selection.RemoveAt(rowIndexInSelection); + } + + } + else // general case + { + wxDataViewTreeNode *parentNode = FindNode(parent); + + // Notice that it is possible that the item being deleted is not in the + // tree at all, for example we could be deleting a never shown (because + // collapsed) item in a tree model. So it's not an error if we don't know + // about this item, just return without doing anything then. + if ( !parentNode ) + return true; + + wxCHECK_MSG( parentNode->HasChildren(), false, "parent node doesn't have children?" ); + const wxDataViewTreeNodes& parentsChildren = parentNode->GetChildNodes(); + + // We can't use FindNode() to find 'item', because it was already + // removed from the model by the time ItemDeleted() is called, so we + // have to do it manually. We keep track of its position as well for + // later use. + int itemPosInNode = 0; + wxDataViewTreeNode *itemNode = NULL; + for ( wxDataViewTreeNodes::const_iterator i = parentsChildren.begin(); + i != parentsChildren.end(); + ++i, ++itemPosInNode ) + { + if( (*i)->GetItem() == item ) + { + itemNode = *i; + break; + } + } + + // If the parent wasn't expanded, it's possible that we didn't have a + // node corresponding to 'item' and so there's nothing left to do. + if ( !itemNode ) + { + // If this was the last child to be removed, it's possible the parent + // node became a leaf. Let's ask the model about it. + if ( parentNode->GetChildNodes().empty() ) + parentNode->SetHasChildren(GetModel()->IsContainer(parent)); + + return true; + } + + // Delete the item from wxDataViewTreeNode representation: + const int itemsDeleted = 1 + itemNode->GetSubTreeCount(); + + parentNode->RemoveChild(itemNode); + delete itemNode; + parentNode->ChangeSubTreeCount(-itemsDeleted); + + // Make the row number invalid and get a new valid one when user call GetRowCount + m_count = -1; + + // If this was the last child to be removed, it's possible the parent + // node became a leaf. Let's ask the model about it. + if ( parentNode->GetChildNodes().empty() ) + { + bool isContainer = GetModel()->IsContainer(parent); + parentNode->SetHasChildren(isContainer); + if ( isContainer ) + { + // If it's still a container, make sure we show "+" icon for it + // and not "-" one as there is nothing to collapse any more. + if ( parentNode->IsOpen() ) + parentNode->ToggleOpen(); + } + } + + // Update selection by removing 'item' and its entire children tree from the selection. + if ( !m_selection.empty() ) + { + // we can't call GetRowByItem() on 'item', as it's already deleted, so compute it from + // the parent ('parentNode') and position in its list of children + int itemRow; + if ( itemPosInNode == 0 ) + { + // 1st child, row number is that of the parent parentNode + 1 + itemRow = GetRowByItem(parentNode->GetItem()) + 1; + } + else + { + // row number is that of the sibling above 'item' + its subtree if any + 1 + const wxDataViewTreeNode *siblingNode = parentNode->GetChildNodes()[itemPosInNode - 1]; + + itemRow = GetRowByItem(siblingNode->GetItem()) + + siblingNode->GetSubTreeCount() + + 1; + } + + wxDataViewSelection newsel(wxDataViewSelectionCmp); + + const size_t numSelections = m_selection.size(); + for ( size_t i = 0; i < numSelections; ++i ) + { + const int s = m_selection[i]; + if ( s < itemRow ) + newsel.push_back(s); + else if ( s >= itemRow + itemsDeleted ) + newsel.push_back(s - itemsDeleted); + // else: deleted item, remove from selection + } + + m_selection = newsel; + } + } + + // Change the current row to the last row if the current exceed the max row number + if ( m_currentRow >= GetRowCount() ) + ChangeCurrentRow(m_count - 1); + + GetOwner()->InvalidateColBestWidths(); + UpdateDisplay(); + + return true; +} + +bool wxDataViewMainWindow::ItemChanged(const wxDataViewItem & item) +{ + SortPrepare(); + g_model->Resort(); + + GetOwner()->InvalidateColBestWidths(); + + // Send event + wxWindow *parent = GetParent(); + wxDataViewEvent le(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, parent->GetId()); + le.SetEventObject(parent); + le.SetModel(GetModel()); + le.SetItem(item); + parent->ProcessWindowEvent(le); + + return true; +} + +bool wxDataViewMainWindow::ValueChanged( const wxDataViewItem & item, unsigned int model_column ) +{ + int view_column = m_owner->GetModelColumnIndex(model_column); + if ( view_column == wxNOT_FOUND ) + return false; + + // NOTE: to be valid, we cannot use e.g. INT_MAX - 1 +/*#define MAX_VIRTUAL_WIDTH 100000 + + wxRect rect( 0, row*m_lineHeight, MAX_VIRTUAL_WIDTH, m_lineHeight ); + m_owner->CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + Refresh( true, &rect ); + + return true; +*/ + SortPrepare(); + g_model->Resort(); + + GetOwner()->InvalidateColBestWidth(view_column); + + // Send event + wxWindow *parent = GetParent(); + wxDataViewEvent le(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, parent->GetId()); + le.SetEventObject(parent); + le.SetModel(GetModel()); + le.SetItem(item); + le.SetColumn(view_column); + le.SetDataViewColumn(GetOwner()->GetColumn(view_column)); + parent->ProcessWindowEvent(le); + + return true; +} + +bool wxDataViewMainWindow::Cleared() +{ + DestroyTree(); + m_selection.Clear(); + m_currentRow = (unsigned)-1; + + if (GetModel()) + { + SortPrepare(); + BuildTree( GetModel() ); + } + else + { + m_count = 0; + } + + GetOwner()->InvalidateColBestWidths(); + UpdateDisplay(); + + return true; +} + +void wxDataViewMainWindow::UpdateDisplay() +{ + m_dirty = true; + m_underMouse = NULL; +} + +void wxDataViewMainWindow::OnInternalIdle() +{ + wxWindow::OnInternalIdle(); + + if (m_dirty) + { + RecalculateDisplay(); + m_dirty = false; + } +} + +void wxDataViewMainWindow::RecalculateDisplay() +{ + wxDataViewModel *model = GetModel(); + if (!model) + { + Refresh(); + return; + } + + int width = GetEndOfLastCol(); + int height = GetLineStart( GetRowCount() ); + + SetVirtualSize( width, height ); + GetOwner()->SetScrollRate( 10, m_lineHeight ); + + Refresh(); +} + +void wxDataViewMainWindow::ScrollWindow( int dx, int dy, const wxRect *rect ) +{ + m_underMouse = NULL; + + wxWindow::ScrollWindow( dx, dy, rect ); + + if (GetOwner()->m_headerArea) + GetOwner()->m_headerArea->ScrollWindow( dx, 0 ); +} + +void wxDataViewMainWindow::ScrollTo( int rows, int column ) +{ + m_underMouse = NULL; + + int x, y; + m_owner->GetScrollPixelsPerUnit( &x, &y ); + int sy = GetLineStart( rows )/y; + int sx = -1; + if( column != -1 ) + { + wxRect rect = GetClientRect(); + int colnum = 0; + int x_start, w = 0; + int xx, yy, xe; + m_owner->CalcUnscrolledPosition( rect.x, rect.y, &xx, &yy ); + for (x_start = 0; colnum < column; colnum++) + { + wxDataViewColumn *col = GetOwner()->GetColumnAt(colnum); + if (col->IsHidden()) + continue; // skip it! + + w = col->GetWidth(); + x_start += w; + } + + int x_end = x_start + w; + xe = xx + rect.width; + if( x_end > xe ) + { + sx = ( xx + x_end - xe )/x; + } + if( x_start < xx ) + { + sx = x_start/x; + } + } + m_owner->Scroll( sx, sy ); +} + +int wxDataViewMainWindow::GetCountPerPage() const +{ + wxSize size = GetClientSize(); + return size.y / m_lineHeight; +} + +int wxDataViewMainWindow::GetEndOfLastCol() const +{ + int width = 0; + unsigned int i; + for (i = 0; i < GetOwner()->GetColumnCount(); i++) + { + const wxDataViewColumn *c = + const_cast(GetOwner())->GetColumnAt( i ); + + if (!c->IsHidden()) + width += c->GetWidth(); + } + return width; +} + +unsigned int wxDataViewMainWindow::GetFirstVisibleRow() const +{ + int x = 0; + int y = 0; + m_owner->CalcUnscrolledPosition( x, y, &x, &y ); + + return GetLineAt( y ); +} + +unsigned int wxDataViewMainWindow::GetLastVisibleRow() +{ + wxSize client_size = GetClientSize(); + m_owner->CalcUnscrolledPosition( client_size.x, client_size.y, + &client_size.x, &client_size.y ); + + // we should deal with the pixel here + unsigned int row = GetLineAt(client_size.y) - 1; + + return wxMin( GetRowCount()-1, row ); +} + +unsigned int wxDataViewMainWindow::GetRowCount() const +{ + if ( m_count == -1 ) + { + wxDataViewMainWindow* const + self = const_cast(this); + self->m_count = RecalculateCount(); + self->UpdateDisplay(); + } + return m_count; +} + +void wxDataViewMainWindow::ChangeCurrentRow( unsigned int row ) +{ + m_currentRow = row; + + // send event +} + +void wxDataViewMainWindow::SelectAllRows( bool on ) +{ + if (IsEmpty()) + return; + + if (on) + { + m_selection.Clear(); + for (unsigned int i = 0; i < GetRowCount(); i++) + m_selection.Add( i ); + Refresh(); + } + else + { + unsigned int first_visible = GetFirstVisibleRow(); + unsigned int last_visible = GetLastVisibleRow(); + unsigned int i; + for (i = 0; i < m_selection.GetCount(); i++) + { + unsigned int row = m_selection[i]; + if ((row >= first_visible) && (row <= last_visible)) + RefreshRow( row ); + } + m_selection.Clear(); + } +} + +void wxDataViewMainWindow::SelectRow( unsigned int row, bool on ) +{ + if (m_selection.Index( row ) == wxNOT_FOUND) + { + if (on) + { + m_selection.Add( row ); + RefreshRow( row ); + } + } + else + { + if (!on) + { + m_selection.Remove( row ); + RefreshRow( row ); + } + } +} + +void wxDataViewMainWindow::SelectRows( unsigned int from, unsigned int to, bool on ) +{ + if (from > to) + { + unsigned int tmp = from; + from = to; + to = tmp; + } + + unsigned int i; + for (i = from; i <= to; i++) + { + if (m_selection.Index( i ) == wxNOT_FOUND) + { + if (on) + m_selection.Add( i ); + } + else + { + if (!on) + m_selection.Remove( i ); + } + } + RefreshRows( from, to ); +} + +void wxDataViewMainWindow::Select( const wxArrayInt& aSelections ) +{ + for (size_t i=0; i < aSelections.GetCount(); i++) + { + int n = aSelections[i]; + + m_selection.Add( n ); + RefreshRow( n ); + } +} + +void wxDataViewMainWindow::ReverseRowSelection( unsigned int row ) +{ + if (m_selection.Index( row ) == wxNOT_FOUND) + m_selection.Add( row ); + else + m_selection.Remove( row ); + RefreshRow( row ); +} + +bool wxDataViewMainWindow::IsRowSelected( unsigned int row ) +{ + return (m_selection.Index( row ) != wxNOT_FOUND); +} + +void wxDataViewMainWindow::SendSelectionChangedEvent( const wxDataViewItem& item) +{ + wxWindow *parent = GetParent(); + wxDataViewEvent le(wxEVT_DATAVIEW_SELECTION_CHANGED, parent->GetId()); + + le.SetEventObject(parent); + le.SetModel(GetModel()); + le.SetItem( item ); + + parent->ProcessWindowEvent(le); +} + +void wxDataViewMainWindow::RefreshRow( unsigned int row ) +{ + wxRect rect( 0, GetLineStart( row ), GetEndOfLastCol(), GetLineHeight( row ) ); + m_owner->CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + + wxSize client_size = GetClientSize(); + wxRect client_rect( 0, 0, client_size.x, client_size.y ); + wxRect intersect_rect = client_rect.Intersect( rect ); + if (intersect_rect.width > 0) + Refresh( true, &intersect_rect ); +} + +void wxDataViewMainWindow::RefreshRows( unsigned int from, unsigned int to ) +{ + if (from > to) + { + unsigned int tmp = to; + to = from; + from = tmp; + } + + wxRect rect( 0, GetLineStart( from ), GetEndOfLastCol(), GetLineStart( (to-from+1) ) ); + m_owner->CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + + wxSize client_size = GetClientSize(); + wxRect client_rect( 0, 0, client_size.x, client_size.y ); + wxRect intersect_rect = client_rect.Intersect( rect ); + if (intersect_rect.width > 0) + Refresh( true, &intersect_rect ); +} + +void wxDataViewMainWindow::RefreshRowsAfter( unsigned int firstRow ) +{ + wxSize client_size = GetClientSize(); + int start = GetLineStart( firstRow ); + m_owner->CalcScrolledPosition( start, 0, &start, NULL ); + if (start > client_size.y) return; + + wxRect rect( 0, start, client_size.x, client_size.y - start ); + + Refresh( true, &rect ); +} + +wxRect wxDataViewMainWindow::GetLineRect( unsigned int row ) const +{ + wxRect rect; + rect.x = 0; + rect.y = GetLineStart( row ); + rect.width = GetEndOfLastCol(); + rect.height = GetLineHeight( row ); + + return rect; +} + +int wxDataViewMainWindow::GetLineStart( unsigned int row ) const +{ + const wxDataViewModel *model = GetModel(); + + if (GetOwner()->GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT) + { + // TODO make more efficient + + int start = 0; + + unsigned int r; + for (r = 0; r < row; r++) + { + const wxDataViewTreeNode* node = GetTreeNodeByRow(r); + if (!node) return start; + + wxDataViewItem item = node->GetItem(); + + unsigned int cols = GetOwner()->GetColumnCount(); + unsigned int col; + int height = m_lineHeight; + for (col = 0; col < cols; col++) + { + const wxDataViewColumn *column = GetOwner()->GetColumn(col); + if (column->IsHidden()) + continue; // skip it! + + if ((col != 0) && + model->IsContainer(item) && + !model->HasContainerColumns(item)) + continue; // skip it! + + wxDataViewRenderer *renderer = + const_cast(column->GetRenderer()); + renderer->PrepareForItem(model, item, column->GetModelColumn()); + + height = wxMax( height, renderer->GetSize().y ); + } + + start += height; + } + + return start; + } + else + { + return row * m_lineHeight; + } +} + +int wxDataViewMainWindow::GetLineAt( unsigned int y ) const +{ + const wxDataViewModel *model = GetModel(); + + // check for the easy case first + if ( !GetOwner()->HasFlag(wxDV_VARIABLE_LINE_HEIGHT) ) + return y / m_lineHeight; + + // TODO make more efficient + unsigned int row = 0; + unsigned int yy = 0; + for (;;) + { + const wxDataViewTreeNode* node = GetTreeNodeByRow(row); + if (!node) + { + // not really correct... + return row + ((y-yy) / m_lineHeight); + } + + wxDataViewItem item = node->GetItem(); + + unsigned int cols = GetOwner()->GetColumnCount(); + unsigned int col; + int height = m_lineHeight; + for (col = 0; col < cols; col++) + { + const wxDataViewColumn *column = GetOwner()->GetColumn(col); + if (column->IsHidden()) + continue; // skip it! + + if ((col != 0) && + model->IsContainer(item) && + !model->HasContainerColumns(item)) + continue; // skip it! + + wxDataViewRenderer *renderer = + const_cast(column->GetRenderer()); + renderer->PrepareForItem(model, item, column->GetModelColumn()); + + height = wxMax( height, renderer->GetSize().y ); + } + + yy += height; + if (y < yy) + return row; + + row++; + } +} + +int wxDataViewMainWindow::GetLineHeight( unsigned int row ) const +{ + const wxDataViewModel *model = GetModel(); + + if (GetOwner()->GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT) + { + wxASSERT( !IsVirtualList() ); + + const wxDataViewTreeNode* node = GetTreeNodeByRow(row); + // wxASSERT( node ); + if (!node) return m_lineHeight; + + wxDataViewItem item = node->GetItem(); + + int height = m_lineHeight; + + unsigned int cols = GetOwner()->GetColumnCount(); + unsigned int col; + for (col = 0; col < cols; col++) + { + const wxDataViewColumn *column = GetOwner()->GetColumn(col); + if (column->IsHidden()) + continue; // skip it! + + if ((col != 0) && + model->IsContainer(item) && + !model->HasContainerColumns(item)) + continue; // skip it! + + wxDataViewRenderer *renderer = + const_cast(column->GetRenderer()); + renderer->PrepareForItem(model, item, column->GetModelColumn()); + + height = wxMax( height, renderer->GetSize().y ); + } + + return height; + } + else + { + return m_lineHeight; + } +} + + +class RowToTreeNodeJob: public DoJob +{ +public: + RowToTreeNodeJob( unsigned int row , int current, wxDataViewTreeNode * node ) + { + this->row = row; + this->current = current; + ret = NULL; + parent = node; + } + + virtual int operator() ( wxDataViewTreeNode * node ) + { + current ++; + if( current == static_cast(row)) + { + ret = node; + return DoJob::DONE; + } + + if( node->GetSubTreeCount() + current < static_cast(row) ) + { + current += node->GetSubTreeCount(); + return DoJob::SKIP_SUBTREE; + } + else + { + parent = node; + + // If the current node has only leaf children, we can find the + // desired node directly. This can speed up finding the node + // in some cases, and will have a very good effect for list views. + if ( node->HasChildren() && + (int)node->GetChildNodes().size() == node->GetSubTreeCount() ) + { + const int index = static_cast(row) - current - 1; + ret = node->GetChildNodes()[index]; + return DoJob::DONE; + } + + return DoJob::CONTINUE; + } + } + + wxDataViewTreeNode * GetResult() const + { return ret; } + +private: + unsigned int row; + int current; + wxDataViewTreeNode * ret; + wxDataViewTreeNode * parent; +}; + +wxDataViewTreeNode * wxDataViewMainWindow::GetTreeNodeByRow(unsigned int row) const +{ + wxASSERT( !IsVirtualList() ); + + if ( row == (unsigned)-1 ) + return NULL; + + RowToTreeNodeJob job( row , -2, m_root ); + Walker( m_root , job ); + return job.GetResult(); +} + +wxDataViewItem wxDataViewMainWindow::GetItemByRow(unsigned int row) const +{ + wxDataViewItem item; + if (IsVirtualList()) + { + if ( row < GetRowCount() ) + item = wxDataViewItem(wxUIntToPtr(row+1)); + } + else + { + wxDataViewTreeNode *node = GetTreeNodeByRow(row); + if ( node ) + item = node->GetItem(); + } + + return item; +} + +bool +wxDataViewMainWindow::SendExpanderEvent(wxEventType type, + const wxDataViewItem& item) +{ + wxWindow *parent = GetParent(); + wxDataViewEvent le(type, parent->GetId()); + + le.SetEventObject(parent); + le.SetModel(GetModel()); + le.SetItem( item ); + + return !parent->ProcessWindowEvent(le) || le.IsAllowed(); +} + +bool wxDataViewMainWindow::IsExpanded( unsigned int row ) const +{ + if (IsList()) + return false; + + wxDataViewTreeNode * node = GetTreeNodeByRow(row); + if (!node) + return false; + + if (!node->HasChildren()) + return false; + + return node->IsOpen(); +} + +bool wxDataViewMainWindow::HasChildren( unsigned int row ) const +{ + if (IsList()) + return false; + + wxDataViewTreeNode * node = GetTreeNodeByRow(row); + if (!node) + return false; + + if (!node->HasChildren()) + return false; + + return true; +} + +void wxDataViewMainWindow::Expand( unsigned int row ) +{ + if (IsList()) + return; + + wxDataViewTreeNode * node = GetTreeNodeByRow(row); + if (!node) + return; + + if (!node->HasChildren()) + return; + + if (!node->IsOpen()) + { + if ( !SendExpanderEvent(wxEVT_DATAVIEW_ITEM_EXPANDING, node->GetItem()) ) + { + // Vetoed by the event handler. + return; + } + + node->ToggleOpen(); + + // build the children of current node + if( node->GetChildNodes().empty() ) + { + SortPrepare(); + ::BuildTreeHelper(GetModel(), node->GetItem(), node); + } + + // By expanding the node all row indices that are currently in the selection list + // and are greater than our node have become invalid. So we have to correct that now. + const unsigned rowAdjustment = node->GetSubTreeCount(); + for(unsigned i=0; i row) + ChangeCurrentRow(m_currentRow + rowAdjustment); + + m_count = -1; + UpdateDisplay(); + // Send the expanded event + SendExpanderEvent(wxEVT_DATAVIEW_ITEM_EXPANDED,node->GetItem()); + } +} + +void wxDataViewMainWindow::Collapse(unsigned int row) +{ + if (IsList()) + return; + + wxDataViewTreeNode *node = GetTreeNodeByRow(row); + if (!node) + return; + + if (!node->HasChildren()) + return; + + if (node->IsOpen()) + { + if ( !SendExpanderEvent(wxEVT_DATAVIEW_ITEM_COLLAPSING,node->GetItem()) ) + { + // Vetoed by the event handler. + return; + } + + // Find out if there are selected items below the current node. + bool selectCollapsingRow = false; + const unsigned rowAdjustment = node->GetSubTreeCount(); + unsigned maxRowToBeTested = row + rowAdjustment; + for(unsigned i=0; i row && testRow <= maxRowToBeTested) + { + selectCollapsingRow = true; + // get out as soon as we have found a node that is selected + break; + } + } + + node->ToggleOpen(); + + // If the node to be closed has selected items the user won't see those any longer. + // We select the collapsing node in this case. + if(selectCollapsingRow) + { + SelectAllRows(false); + ChangeCurrentRow(row); + SelectRow(row, true); + SendSelectionChangedEvent(GetItemByRow(row)); + } + else + { + // if there were no selected items below our node we still need to "fix" the + // selection list to adjust for the changing of the row indices. + // We actually do the opposite of what we are doing in Expand(). + for(unsigned i=0; i row && m_currentRow <= maxRowToBeTested) + ChangeCurrentRow(row); + else if(m_currentRow > row) + ChangeCurrentRow(m_currentRow - rowAdjustment); + } + + m_count = -1; + UpdateDisplay(); + SendExpanderEvent(wxEVT_DATAVIEW_ITEM_COLLAPSED,node->GetItem()); + } +} + +wxDataViewTreeNode * wxDataViewMainWindow::FindNode( const wxDataViewItem & item ) +{ + const wxDataViewModel * model = GetModel(); + if( model == NULL ) + return NULL; + + if (!item.IsOk()) + return m_root; + + // Compose the parent-chain for the item we are looking for + wxVector parentChain; + wxDataViewItem it( item ); + while( it.IsOk() ) + { + parentChain.push_back(it); + it = model->GetParent(it); + } + + // Find the item along the parent-chain. + // This algorithm is designed to speed up the node-finding method + wxDataViewTreeNode* node = m_root; + for( unsigned iter = parentChain.size()-1; ; --iter ) + { + if( node->HasChildren() ) + { + if( node->GetChildNodes().empty() ) + { + // Even though the item is a container, it doesn't have any + // child nodes in the control's representation yet. We have + // to realize its subtree now. + SortPrepare(); + ::BuildTreeHelper(model, node->GetItem(), node); + } + + const wxDataViewTreeNodes& nodes = node->GetChildNodes(); + bool found = false; + + for (unsigned i = 0; i < nodes.GetCount(); ++i) + { + wxDataViewTreeNode* currentNode = nodes[i]; + if (currentNode->GetItem() == parentChain[iter]) + { + if (currentNode->GetItem() == item) + return currentNode; + + node = currentNode; + found = true; + break; + } + } + if (!found) + return NULL; + } + else + return NULL; + + if ( !iter ) + break; + } + return NULL; +} + +void wxDataViewMainWindow::HitTest( const wxPoint & point, wxDataViewItem & item, + wxDataViewColumn* &column ) +{ + wxDataViewColumn *col = NULL; + unsigned int cols = GetOwner()->GetColumnCount(); + unsigned int colnum = 0; + int x, y; + m_owner->CalcUnscrolledPosition( point.x, point.y, &x, &y ); + for (unsigned x_start = 0; colnum < cols; colnum++) + { + col = GetOwner()->GetColumnAt(colnum); + if (col->IsHidden()) + continue; // skip it! + + unsigned int w = col->GetWidth(); + if (x_start+w >= (unsigned int)x) + break; + + x_start += w; + } + + column = col; + item = GetItemByRow( GetLineAt( y ) ); +} + +wxRect wxDataViewMainWindow::GetItemRect( const wxDataViewItem & item, + const wxDataViewColumn* column ) +{ + int xpos = 0; + int width = 0; + + unsigned int cols = GetOwner()->GetColumnCount(); + // If column is null the loop will compute the combined width of all columns. + // Otherwise, it will compute the x position of the column we are looking for. + for (unsigned int i = 0; i < cols; i++) + { + wxDataViewColumn* col = GetOwner()->GetColumnAt( i ); + + if (col == column) + break; + + if (col->IsHidden()) + continue; // skip it! + + xpos += col->GetWidth(); + width += col->GetWidth(); + } + + if(column != 0) + { + // If we have a column, we need can get its width directly. + if(column->IsHidden()) + width = 0; + else + width = column->GetWidth(); + + } + else + { + // If we have no column, we reset the x position back to zero. + xpos = 0; + } + + // we have to take an expander column into account and compute its indentation + // to get the correct x position where the actual text is + int indent = 0; + int row = GetRowByItem(item); + if (!IsList() && + (column == 0 || GetExpanderColumnOrFirstOne(GetOwner()) == column) ) + { + wxDataViewTreeNode* node = GetTreeNodeByRow(row); + indent = GetOwner()->GetIndent() * node->GetIndentLevel(); + indent = indent + m_lineHeight; // use m_lineHeight as the width of the expander + } + + wxRect itemRect( xpos + indent, + GetLineStart( row ), + width - indent, + GetLineHeight( row ) ); + + GetOwner()->CalcScrolledPosition( itemRect.x, itemRect.y, + &itemRect.x, &itemRect.y ); + + return itemRect; +} + +int wxDataViewMainWindow::RecalculateCount() const +{ + if (IsVirtualList()) + { + wxDataViewVirtualListModel *list_model = + (wxDataViewVirtualListModel*) GetModel(); + + return list_model->GetCount(); + } + else + { + return m_root->GetSubTreeCount(); + } +} + +class ItemToRowJob : public DoJob +{ +public: + ItemToRowJob(const wxDataViewItem& item_, wxVector::reverse_iterator iter) + : m_iter(iter), + item(item_) + { + ret = -1; + } + + // Maybe binary search will help to speed up this process + virtual int operator() ( wxDataViewTreeNode * node) + { + ret ++; + if( node->GetItem() == item ) + { + return DoJob::DONE; + } + + if( node->GetItem() == *m_iter ) + { + m_iter++; + return DoJob::CONTINUE; + } + else + { + ret += node->GetSubTreeCount(); + return DoJob::SKIP_SUBTREE; + } + + } + + // the row number is begin from zero + int GetResult() const + { return ret -1; } + +private: + wxVector::reverse_iterator m_iter; + wxDataViewItem item; + int ret; + +}; + +int wxDataViewMainWindow::GetRowByItem(const wxDataViewItem & item) const +{ + const wxDataViewModel * model = GetModel(); + if( model == NULL ) + return -1; + + if (IsVirtualList()) + { + return wxPtrToUInt( item.GetID() ) -1; + } + else + { + if( !item.IsOk() ) + return -1; + + // Compose the parent-chain of the item we are looking for + wxVector parentChain; + wxDataViewItem it( item ); + while( it.IsOk() ) + { + parentChain.push_back(it); + it = model->GetParent(it); + } + + // add an 'invalid' item to represent our 'invisible' root node + parentChain.push_back(wxDataViewItem()); + + // the parent chain was created by adding the deepest parent first. + // so if we want to start at the root node, we have to iterate backwards through the vector + ItemToRowJob job( item, parentChain.rbegin() ); + Walker( m_root, job ); + return job.GetResult(); + } +} + +static void BuildTreeHelper( const wxDataViewModel * model, const wxDataViewItem & item, + wxDataViewTreeNode * node) +{ + if( !model->IsContainer( item ) ) + return; + + wxDataViewItemArray children; + unsigned int num = model->GetChildren( item, children); + + for ( unsigned int index = 0; index < num; index++ ) + { + wxDataViewTreeNode *n = new wxDataViewTreeNode(node, children[index]); + + if( model->IsContainer(children[index]) ) + n->SetHasChildren( true ); + + node->InsertChild(n, index); + } + + wxASSERT( node->IsOpen() ); + node->ChangeSubTreeCount(+num); +} + +void wxDataViewMainWindow::BuildTree(wxDataViewModel * model) +{ + DestroyTree(); + + if (GetModel()->IsVirtualListModel()) + { + m_count = -1; + return; + } + + m_root = wxDataViewTreeNode::CreateRootNode(); + + // First we define a invalid item to fetch the top-level elements + wxDataViewItem item; + SortPrepare(); + BuildTreeHelper( model, item, m_root); + m_count = -1; +} + +void wxDataViewMainWindow::DestroyTree() +{ + if (!IsVirtualList()) + { + wxDELETE(m_root); + m_count = 0; + } +} + +wxDataViewColumn* +wxDataViewMainWindow::FindColumnForEditing(const wxDataViewItem& item, wxDataViewCellMode mode) +{ + // Edit the current column editable in 'mode'. If no column is focused + // (typically because the user has full row selected), try to find the + // first editable column (this would typically be a checkbox for + // wxDATAVIEW_CELL_ACTIVATABLE and we don't want to force the user to set + // focus on the checkbox column; or on the only editable text column). + + wxDataViewColumn *candidate = m_currentCol; + + if ( candidate && + !IsCellEditableInMode(item, candidate, mode) && + !m_currentColSetByKeyboard ) + { + // If current column was set by mouse to something not editable (in + // 'mode') and the user pressed Space/F2 to edit it, treat the + // situation as if there was whole-row focus, because that's what is + // visually indicated and the mouse click could very well be targeted + // on the row rather than on an individual cell. + // + // But if it was done by keyboard, respect that even if the column + // isn't editable, because focus is visually on that column and editing + // something else would be surprising. + candidate = NULL; + } + + if ( !candidate ) + { + const unsigned cols = GetOwner()->GetColumnCount(); + for ( unsigned i = 0; i < cols; i++ ) + { + wxDataViewColumn *c = GetOwner()->GetColumnAt(i); + if ( c->IsHidden() ) + continue; + + if ( IsCellEditableInMode(item, c, mode) ) + { + candidate = c; + break; + } + } + } + + // If on container item without columns, only the expander column + // may be directly editable: + if ( candidate && + GetOwner()->GetExpanderColumn() != candidate && + GetModel()->IsContainer(item) && + !GetModel()->HasContainerColumns(item) ) + { + candidate = GetOwner()->GetExpanderColumn(); + } + + if ( !candidate ) + return NULL; + + if ( !IsCellEditableInMode(item, candidate, mode) ) + return NULL; + + return candidate; +} + +bool wxDataViewMainWindow::IsCellEditableInMode(const wxDataViewItem& item, + const wxDataViewColumn *col, + wxDataViewCellMode mode) const +{ + if ( col->GetRenderer()->GetMode() != mode ) + return false; + + if ( !GetModel()->IsEnabled(item, col->GetModelColumn()) ) + return false; + + return true; +} + +void wxDataViewMainWindow::OnCharHook(wxKeyEvent& event) +{ + if ( m_editorCtrl ) + { + // Handle any keys special for the in-place editor and return without + // calling Skip() below. + switch ( event.GetKeyCode() ) + { + case WXK_ESCAPE: + m_editorRenderer->CancelEditing(); + return; + + case WXK_RETURN: + m_editorRenderer->FinishEditing(); + return; + } + } + + event.Skip(); +} + +void wxDataViewMainWindow::OnChar( wxKeyEvent &event ) +{ + wxWindow * const parent = GetParent(); + + // propagate the char event upwards + wxKeyEvent eventForParent(event); + eventForParent.SetEventObject(parent); + if ( parent->ProcessWindowEvent(eventForParent) ) + return; + + if ( parent->HandleAsNavigationKey(event) ) + return; + + // no item -> nothing to do + if (!HasCurrentRow()) + { + event.Skip(); + return; + } + + // don't use m_linesPerPage directly as it might not be computed yet + const int pageSize = GetCountPerPage(); + wxCHECK_RET( pageSize, wxT("should have non zero page size") ); + + switch ( event.GetKeyCode() ) + { + case WXK_RETURN: + if ( event.HasModifiers() ) + { + event.Skip(); + break; + } + else + { + // Enter activates the item, i.e. sends wxEVT_DATAVIEW_ITEM_ACTIVATED to + // it. Only if that event is not handled do we activate column renderer (which + // is normally done by Space) or even inline editing. + + const wxDataViewItem item = GetItemByRow(m_currentRow); + + wxDataViewEvent le(wxEVT_DATAVIEW_ITEM_ACTIVATED, + parent->GetId()); + le.SetItem(item); + le.SetEventObject(parent); + le.SetModel(GetModel()); + + if ( parent->ProcessWindowEvent(le) ) + break; + // else: fall through to WXK_SPACE handling + } + + case WXK_SPACE: + if ( event.HasModifiers() ) + { + event.Skip(); + break; + } + else + { + // Space toggles activatable items or -- if not activatable -- + // starts inline editing (this is normally done using F2 on + // Windows, but Space is common everywhere else, so use it too + // for greater cross-platform compatibility). + + const wxDataViewItem item = GetItemByRow(m_currentRow); + + // Activate the current activatable column. If not column is focused (typically + // because the user has full row selected), try to find the first activatable + // column (this would typically be a checkbox and we don't want to force the user + // to set focus on the checkbox column). + wxDataViewColumn *activatableCol = FindColumnForEditing(item, wxDATAVIEW_CELL_ACTIVATABLE); + + if ( activatableCol ) + { + const unsigned colIdx = activatableCol->GetModelColumn(); + const wxRect cell_rect = GetOwner()->GetItemRect(item, activatableCol); + + wxDataViewRenderer *cell = activatableCol->GetRenderer(); + cell->PrepareForItem(GetModel(), item, colIdx); + cell->WXActivateCell(cell_rect, GetModel(), item, colIdx, NULL); + + break; + } + // else: fall through to WXK_F2 handling + } + + case WXK_F2: + if ( event.HasModifiers() ) + { + event.Skip(); + break; + } + else + { + if( !m_selection.empty() ) + { + // Mimic Windows 7 behavior: edit the item that has focus + // if it is selected and the first selected item if focus + // is out of selection. + int sel; + if ( m_selection.Index(m_currentRow) != wxNOT_FOUND ) + sel = m_currentRow; + else + sel = m_selection[0]; + + + const wxDataViewItem item = GetItemByRow(sel); + + // Edit the current column. If no column is focused + // (typically because the user has full row selected), try + // to find the first editable column. + wxDataViewColumn *editableCol = FindColumnForEditing(item, wxDATAVIEW_CELL_EDITABLE); + + if ( editableCol ) + GetOwner()->EditItem(item, editableCol); + } + } + break; + + case WXK_UP: + OnVerticalNavigation( -1, event ); + break; + + case WXK_DOWN: + OnVerticalNavigation( +1, event ); + break; + // Add the process for tree expanding/collapsing + case WXK_LEFT: + OnLeftKey(); + break; + + case WXK_RIGHT: + OnRightKey(); + break; + + case WXK_END: + OnVerticalNavigation( +(int)GetRowCount(), event ); + break; + + case WXK_HOME: + OnVerticalNavigation( -(int)GetRowCount(), event ); + break; + + case WXK_PAGEUP: + OnVerticalNavigation( -(pageSize - 1), event ); + break; + + case WXK_PAGEDOWN: + OnVerticalNavigation( +(pageSize - 1), event ); + break; + + default: + event.Skip(); + } +} + +void wxDataViewMainWindow::OnVerticalNavigation(int delta, const wxKeyEvent& event) +{ + // if there is no selection, we cannot move it anywhere + if (!HasCurrentRow() || IsEmpty()) + return; + + int newRow = (int)m_currentRow + delta; + + // let's keep the new row inside the allowed range + if ( newRow < 0 ) + newRow = 0; + + const int rowCount = (int)GetRowCount(); + if ( newRow >= rowCount ) + newRow = rowCount - 1; + + unsigned int oldCurrent = m_currentRow; + unsigned int newCurrent = (unsigned int)newRow; + + // in single selection we just ignore Shift as we can't select several + // items anyhow + if ( event.ShiftDown() && !IsSingleSel() ) + { + RefreshRow( oldCurrent ); + + ChangeCurrentRow( newCurrent ); + + // select all the items between the old and the new one + if ( oldCurrent > newCurrent ) + { + newCurrent = oldCurrent; + oldCurrent = m_currentRow; + } + + SelectRows( oldCurrent, newCurrent, true ); + if (oldCurrent!=newCurrent) + SendSelectionChangedEvent(GetItemByRow(m_selection[0])); + } + else // !shift + { + RefreshRow( oldCurrent ); + + // all previously selected items are unselected unless ctrl is held + if ( !event.ControlDown() ) + SelectAllRows(false); + + ChangeCurrentRow( newCurrent ); + + if ( !event.ControlDown() ) + { + SelectRow( m_currentRow, true ); + SendSelectionChangedEvent(GetItemByRow(m_currentRow)); + } + else + RefreshRow( m_currentRow ); + } + + GetOwner()->EnsureVisible( m_currentRow, -1 ); +} + +void wxDataViewMainWindow::OnLeftKey() +{ + if ( IsList() ) + { + TryAdvanceCurrentColumn(NULL, /*forward=*/false); + } + else + { + wxDataViewTreeNode* node = GetTreeNodeByRow(m_currentRow); + if ( !node ) + return; + + if ( TryAdvanceCurrentColumn(node, /*forward=*/false) ) + return; + + // Because TryAdvanceCurrentColumn() return false, we are at the first + // column or using whole-row selection. In this situation, we can use + // the standard TreeView handling of the left key. + if (node->HasChildren() && node->IsOpen()) + { + Collapse(m_currentRow); + } + else + { + // if the node is already closed, we move the selection to its parent + wxDataViewTreeNode *parent_node = node->GetParent(); + + if (parent_node) + { + int parent = GetRowByItem( parent_node->GetItem() ); + if ( parent >= 0 ) + { + unsigned int row = m_currentRow; + SelectRow( row, false); + SelectRow( parent, true ); + ChangeCurrentRow( parent ); + GetOwner()->EnsureVisible( parent, -1 ); + SendSelectionChangedEvent( parent_node->GetItem() ); + } + } + } + } +} + +void wxDataViewMainWindow::OnRightKey() +{ + if ( IsList() ) + { + TryAdvanceCurrentColumn(NULL, /*forward=*/true); + } + else + { + wxDataViewTreeNode* node = GetTreeNodeByRow(m_currentRow); + if ( !node ) + return; + + if ( node->HasChildren() ) + { + if ( !node->IsOpen() ) + { + Expand( m_currentRow ); + } + else + { + // if the node is already open, we move the selection to the first child + unsigned int row = m_currentRow; + SelectRow( row, false ); + SelectRow( row + 1, true ); + ChangeCurrentRow( row + 1 ); + GetOwner()->EnsureVisible( row + 1, -1 ); + SendSelectionChangedEvent( GetItemByRow(row+1) ); + } + } + else + { + TryAdvanceCurrentColumn(node, /*forward=*/true); + } + } +} + +bool wxDataViewMainWindow::TryAdvanceCurrentColumn(wxDataViewTreeNode *node, bool forward) +{ + if ( GetOwner()->GetColumnCount() == 0 ) + return false; + + if ( !m_useCellFocus ) + return false; + + if ( node ) + { + // navigation shouldn't work in branch nodes without other columns: + if ( node->HasChildren() && !GetModel()->HasContainerColumns(node->GetItem()) ) + return false; + } + + if ( m_currentCol == NULL || !m_currentColSetByKeyboard ) + { + if ( forward ) + { + m_currentCol = GetOwner()->GetColumnAt(1); + m_currentColSetByKeyboard = true; + RefreshRow(m_currentRow); + return true; + } + else + return false; + } + + int idx = GetOwner()->GetColumnIndex(m_currentCol) + (forward ? +1 : -1); + + if ( idx >= (int)GetOwner()->GetColumnCount() ) + return false; + + GetOwner()->EnsureVisible(m_currentRow, idx); + + if ( idx < 1 ) + { + // We are going to the left of the second column. Reset to whole-row + // focus (which means first column would be edited). + m_currentCol = NULL; + RefreshRow(m_currentRow); + return true; + } + + m_currentCol = GetOwner()->GetColumnAt(idx); + m_currentColSetByKeyboard = true; + RefreshRow(m_currentRow); + return true; +} + +void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) +{ + if (event.GetEventType() == wxEVT_MOUSEWHEEL) + { + // let the base handle mouse wheel events. + event.Skip(); + return; + } + + if(event.ButtonDown()) + { + // Not skipping button down events would prevent the system from + // setting focus to this window as most (all?) of them do by default, + // so skip it to enable default handling. + event.Skip(); + } + + int x = event.GetX(); + int y = event.GetY(); + m_owner->CalcUnscrolledPosition( x, y, &x, &y ); + wxDataViewColumn *col = NULL; + + int xpos = 0; + unsigned int cols = GetOwner()->GetColumnCount(); + unsigned int i; + for (i = 0; i < cols; i++) + { + wxDataViewColumn *c = GetOwner()->GetColumnAt( i ); + if (c->IsHidden()) + continue; // skip it! + + if (x < xpos + c->GetWidth()) + { + col = c; + break; + } + xpos += c->GetWidth(); + } + + wxDataViewModel* const model = GetModel(); + + const unsigned int current = GetLineAt( y ); + const wxDataViewItem item = GetItemByRow(current); + + // Handle right clicking here, before everything else as context menu + // events should be sent even when we click outside of any item, unlike all + // the other ones. + if (event.RightUp()) + { + wxWindow *parent = GetParent(); + wxDataViewEvent le(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, parent->GetId()); + le.SetEventObject(parent); + le.SetModel(model); + + if ( item.IsOk() && col ) + { + le.SetItem( item ); + le.SetColumn( col->GetModelColumn() ); + le.SetDataViewColumn( col ); + } + + parent->ProcessWindowEvent(le); + return; + } + +#if wxUSE_DRAG_AND_DROP + if (event.Dragging() || ((m_dragCount > 0) && event.Leaving())) + { + if (m_dragCount == 0) + { + // we have to report the raw, physical coords as we want to be + // able to call HitTest(event.m_pointDrag) from the user code to + // get the item being dragged + m_dragStart = event.GetPosition(); + } + + m_dragCount++; + if ((m_dragCount < 3) && (event.Leaving())) + m_dragCount = 3; + else if (m_dragCount != 3) + return; + + if (event.LeftIsDown()) + { + m_owner->CalcUnscrolledPosition( m_dragStart.x, m_dragStart.y, + &m_dragStart.x, &m_dragStart.y ); + unsigned int drag_item_row = GetLineAt( m_dragStart.y ); + wxDataViewItem itemDragged = GetItemByRow( drag_item_row ); + + // Notify cell about drag + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, m_owner->GetId() ); + event.SetEventObject( m_owner ); + event.SetItem( itemDragged ); + event.SetModel( model ); + if (!m_owner->HandleWindowEvent( event )) + return; + + if (!event.IsAllowed()) + return; + + wxDataObject *obj = event.GetDataObject(); + if (!obj) + return; + + wxDataViewDropSource drag( this, drag_item_row ); + drag.SetData( *obj ); + /* wxDragResult res = */ drag.DoDragDrop(event.GetDragFlags()); + delete obj; + } + return; + } + else + { + m_dragCount = 0; + } +#endif // wxUSE_DRAG_AND_DROP + + // Check if we clicked outside the item area. + if ((current >= GetRowCount()) || !col) + { + // Follow Windows convention here: clicking either left or right (but + // not middle) button clears the existing selection. + if (m_owner && (event.LeftDown() || event.RightDown())) + { + if (!GetSelections().empty()) + { + m_owner->UnselectAll(); + SendSelectionChangedEvent(wxDataViewItem()); + } + } + event.Skip(); + return; + } + + wxDataViewRenderer *cell = col->GetRenderer(); + wxDataViewColumn* const + expander = GetExpanderColumnOrFirstOne(GetOwner()); + + // Test whether the mouse is hovering over the expander (a.k.a tree "+" + // button) and also determine the offset of the real cell start, skipping + // the indentation and the expander itself. + bool hoverOverExpander = false; + int itemOffset = 0; + if ((!IsList()) && (expander == col)) + { + wxDataViewTreeNode * node = GetTreeNodeByRow(current); + + int indent = node->GetIndentLevel(); + itemOffset = GetOwner()->GetIndent()*indent; + + if ( node->HasChildren() ) + { + // we make the rectangle we are looking in a bit bigger than the actual + // visual expander so the user can hit that little thing reliably + wxRect rect(xpos + itemOffset, + GetLineStart( current ) + (GetLineHeight(current) - m_lineHeight)/2, + m_lineHeight, m_lineHeight); + + if( rect.Contains(x, y) ) + { + // So the mouse is over the expander + hoverOverExpander = true; + if (m_underMouse && m_underMouse != node) + { + // wxLogMessage("Undo the row: %d", GetRowByItem(m_underMouse->GetItem())); + RefreshRow(GetRowByItem(m_underMouse->GetItem())); + } + if (m_underMouse != node) + { + // wxLogMessage("Do the row: %d", current); + RefreshRow(current); + } + m_underMouse = node; + } + } + + // Account for the expander as well, even if this item doesn't have it, + // its parent does so it still counts for the offset. + itemOffset += m_lineHeight; + } + if (!hoverOverExpander) + { + if (m_underMouse != NULL) + { + // wxLogMessage("Undo the row: %d", GetRowByItem(m_underMouse->GetItem())); + RefreshRow(GetRowByItem(m_underMouse->GetItem())); + m_underMouse = NULL; + } + } + + bool simulateClick = false; + + if (event.ButtonDClick()) + { + m_renameTimer->Stop(); + m_lastOnSame = false; + } + + bool ignore_other_columns = + ((expander != col) && + (model->IsContainer(item)) && + (!model->HasContainerColumns(item))); + + if (event.LeftDClick()) + { + if(hoverOverExpander) + { + // a double click on the expander will be converted into a "simulated" normal click + simulateClick = true; + } + else if ( current == m_lineLastClicked ) + { + wxWindow *parent = GetParent(); + wxDataViewEvent le(wxEVT_DATAVIEW_ITEM_ACTIVATED, parent->GetId()); + le.SetItem( item ); + le.SetColumn( col->GetModelColumn() ); + le.SetDataViewColumn( col ); + le.SetEventObject(parent); + le.SetModel(GetModel()); + + parent->ProcessWindowEvent(le); + return; + } + else + { + // The first click was on another item, so don't interpret this as + // a double click, but as a simple click instead + simulateClick = true; + } + } + + if (event.LeftUp() && !hoverOverExpander) + { + if (m_lineSelectSingleOnUp != (unsigned int)-1) + { + // select single line + SelectAllRows( false ); + SelectRow( m_lineSelectSingleOnUp, true ); + SendSelectionChangedEvent( GetItemByRow(m_lineSelectSingleOnUp) ); + } + + // If the user click the expander, we do not do editing even if the column + // with expander are editable + if (m_lastOnSame && !ignore_other_columns) + { + if ((col == m_currentCol) && (current == m_currentRow) && + IsCellEditableInMode(item, col, wxDATAVIEW_CELL_EDITABLE) ) + { + m_renameTimer->Start( 100, true ); + } + } + + m_lastOnSame = false; + m_lineSelectSingleOnUp = (unsigned int)-1; + } + else if(!event.LeftUp()) + { + // This is necessary, because after a DnD operation in + // from and to ourself, the up event is swallowed by the + // DnD code. So on next non-up event (which means here and + // now) m_lineSelectSingleOnUp should be reset. + m_lineSelectSingleOnUp = (unsigned int)-1; + } + + if (event.RightDown()) + { + m_lineBeforeLastClicked = m_lineLastClicked; + m_lineLastClicked = current; + + // If the item is already selected, do not update the selection. + // Multi-selections should not be cleared if a selected item is clicked. + if (!IsRowSelected(current)) + { + SelectAllRows(false); + const unsigned oldCurrent = m_currentRow; + ChangeCurrentRow(current); + SelectRow(m_currentRow,true); + RefreshRow(oldCurrent); + SendSelectionChangedEvent(GetItemByRow( m_currentRow ) ); + } + } + else if (event.MiddleDown()) + { + } + + if((event.LeftDown() || simulateClick) && hoverOverExpander) + { + wxDataViewTreeNode* node = GetTreeNodeByRow(current); + + // hoverOverExpander being true tells us that our node must be + // valid and have children. + // So we don't need any extra checks. + if( node->IsOpen() ) + Collapse(current); + else + Expand(current); + } + else if ((event.LeftDown() || simulateClick) && !hoverOverExpander) + { + m_lineBeforeLastClicked = m_lineLastClicked; + m_lineLastClicked = current; + + unsigned int oldCurrentRow = m_currentRow; + bool oldWasSelected = IsRowSelected(m_currentRow); + + bool cmdModifierDown = event.CmdDown(); + if ( IsSingleSel() || !(cmdModifierDown || event.ShiftDown()) ) + { + if ( IsSingleSel() || !IsRowSelected(current) ) + { + SelectAllRows( false ); + ChangeCurrentRow(current); + SelectRow(m_currentRow,true); + SendSelectionChangedEvent(GetItemByRow( m_currentRow ) ); + } + else // multi sel & current is highlighted & no mod keys + { + m_lineSelectSingleOnUp = current; + ChangeCurrentRow(current); // change focus + } + } + else // multi sel & either ctrl or shift is down + { + if (cmdModifierDown) + { + ChangeCurrentRow(current); + ReverseRowSelection(m_currentRow); + SendSelectionChangedEvent(GetItemByRow(m_currentRow)); + } + else if (event.ShiftDown()) + { + ChangeCurrentRow(current); + + unsigned int lineFrom = oldCurrentRow, + lineTo = current; + + if ( lineTo < lineFrom ) + { + lineTo = lineFrom; + lineFrom = m_currentRow; + } + + SelectRows(lineFrom, lineTo, true); + SendSelectionChangedEvent(GetItemByRow(m_selection[0]) ); + } + else // !ctrl, !shift + { + // test in the enclosing if should make it impossible + wxFAIL_MSG( wxT("how did we get here?") ); + } + } + + if (m_currentRow != oldCurrentRow) + RefreshRow( oldCurrentRow ); + + wxDataViewColumn *oldCurrentCol = m_currentCol; + + // Update selection here... + m_currentCol = col; + m_currentColSetByKeyboard = false; + + // This flag is used to decide whether we should start editing the item + // label. We do it if the user clicks twice (but not double clicks, + // i.e. simulateClick is false) on the same item but not if the click + // was used for something else already, e.g. selecting the item (so it + // must have been already selected) or giving the focus to the control + // (so it must have had focus already). + m_lastOnSame = !simulateClick && ((col == oldCurrentCol) && + (current == oldCurrentRow)) && oldWasSelected && + HasFocus(); + + // Call ActivateCell() after everything else as under GTK+ + if ( IsCellEditableInMode(item, col, wxDATAVIEW_CELL_ACTIVATABLE) ) + { + // notify cell about click + + wxRect cell_rect( xpos + itemOffset, + GetLineStart( current ), + col->GetWidth() - itemOffset, + GetLineHeight( current ) ); + + // Note that PrepareForItem() should be called after GetLineStart() + // call in cell_rect initialization above as GetLineStart() calls + // PrepareForItem() for other items from inside it. + cell->PrepareForItem(model, item, col->GetModelColumn()); + + // Report position relative to the cell's custom area, i.e. + // not the entire space as given by the control but the one + // used by the renderer after calculation of alignment etc. + // + // Notice that this results in negative coordinates when clicking + // in the upper left corner of a centre-aligned cell which doesn't + // fill its column entirely so this is somewhat surprising, but we + // do it like this for compatibility with the native GTK+ version, + // see #12270. + + // adjust the rectangle ourselves to account for the alignment + int align = cell->GetAlignment(); + if ( align == wxDVR_DEFAULT_ALIGNMENT ) + align = cell->GetOwner()->GetAlignment() | wxALIGN_CENTRE_VERTICAL; + + wxRect rectItem = cell_rect; + const wxSize size = cell->GetSize(); + if ( size.x >= 0 && size.x < cell_rect.width ) + { + if ( align & wxALIGN_CENTER_HORIZONTAL ) + rectItem.x += (cell_rect.width - size.x)/2; + else if ( align & wxALIGN_RIGHT ) + rectItem.x += cell_rect.width - size.x; + // else: wxALIGN_LEFT is the default + } + + if ( size.y >= 0 && size.y < cell_rect.height ) + { + if ( align & wxALIGN_CENTER_VERTICAL ) + rectItem.y += (cell_rect.height - size.y)/2; + else if ( align & wxALIGN_BOTTOM ) + rectItem.y += cell_rect.height - size.y; + // else: wxALIGN_TOP is the default + } + + wxMouseEvent event2(event); + event2.m_x -= rectItem.x; + event2.m_y -= rectItem.y; + m_owner->CalcUnscrolledPosition(event2.m_x, event2.m_y, &event2.m_x, &event2.m_y); + + /* ignore ret */ cell->WXActivateCell + ( + cell_rect, + model, + item, + col->GetModelColumn(), + &event2 + ); + } + } +} + +void wxDataViewMainWindow::OnSetFocus( wxFocusEvent &event ) +{ + m_hasFocus = true; + + if (HasCurrentRow()) + Refresh(); + + event.Skip(); +} + +void wxDataViewMainWindow::OnKillFocus( wxFocusEvent &event ) +{ + m_hasFocus = false; + + if (HasCurrentRow()) + Refresh(); + + event.Skip(); +} + +void wxDataViewMainWindow::OnColumnsCountChanged() +{ + int editableCount = 0; + + const unsigned cols = GetOwner()->GetColumnCount(); + for ( unsigned i = 0; i < cols; i++ ) + { + wxDataViewColumn *c = GetOwner()->GetColumnAt(i); + if ( c->IsHidden() ) + continue; + if ( c->GetRenderer()->GetMode() != wxDATAVIEW_CELL_INERT ) + editableCount++; + } + + m_useCellFocus = (editableCount > 0); + + UpdateDisplay(); +} + +//----------------------------------------------------------------------------- +// wxDataViewCtrl +//----------------------------------------------------------------------------- + +WX_DEFINE_LIST(wxDataViewColumnList) + +IMPLEMENT_DYNAMIC_CLASS(wxDataViewCtrl, wxDataViewCtrlBase) +BEGIN_EVENT_TABLE(wxDataViewCtrl, wxDataViewCtrlBase) + EVT_SIZE(wxDataViewCtrl::OnSize) +END_EVENT_TABLE() + +wxDataViewCtrl::~wxDataViewCtrl() +{ + if (m_notifier) + GetModel()->RemoveNotifier( m_notifier ); + + m_cols.Clear(); + m_colsBestWidths.clear(); +} + +void wxDataViewCtrl::Init() +{ + m_cols.DeleteContents(true); + m_notifier = NULL; + + // No sorting column at start + m_sortingColumnIdx = wxNOT_FOUND; + + m_headerArea = NULL; + m_clientArea = NULL; + + m_colsDirty = false; +} + +bool wxDataViewCtrl::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ +// if ( (style & wxBORDER_MASK) == 0) +// style |= wxBORDER_SUNKEN; + + Init(); + + if (!wxControl::Create( parent, id, pos, size, + style | wxScrolledWindowStyle, validator, name)) + return false; + + SetInitialSize(size); + +#ifdef __WXMAC__ + MacSetClipChildren( true ); +#endif + + m_clientArea = new wxDataViewMainWindow( this, wxID_ANY ); + + // We use the cursor keys for moving the selection, not scrolling, so call + // this method to ensure wxScrollHelperEvtHandler doesn't catch all + // keyboard events forwarded to us from wxListMainWindow. + DisableKeyboardScrolling(); + + if (HasFlag(wxDV_NO_HEADER)) + m_headerArea = NULL; + else + m_headerArea = new wxDataViewHeaderWindow(this); + + SetTargetWindow( m_clientArea ); + + wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL ); + if (m_headerArea) + sizer->Add( m_headerArea, 0, wxGROW ); + sizer->Add( m_clientArea, 1, wxGROW ); + SetSizer( sizer ); + + return true; +} + +wxBorder wxDataViewCtrl::GetDefaultBorder() const +{ + return wxBORDER_THEME; +} + +#ifdef __WXMSW__ +WXLRESULT wxDataViewCtrl::MSWWindowProc(WXUINT nMsg, + WXWPARAM wParam, + WXLPARAM lParam) +{ + WXLRESULT rc = wxDataViewCtrlBase::MSWWindowProc(nMsg, wParam, lParam); + +#ifndef __WXWINCE__ + // we need to process arrows ourselves for scrolling + if ( nMsg == WM_GETDLGCODE ) + { + rc |= DLGC_WANTARROWS; + } +#endif + + return rc; +} +#endif + +wxSize wxDataViewCtrl::GetSizeAvailableForScrollTarget(const wxSize& size) +{ + wxSize newsize = size; + if (!HasFlag(wxDV_NO_HEADER) && (m_headerArea)) + newsize.y -= m_headerArea->GetSize().y; + + return newsize; +} + +void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) ) +{ + // We need to override OnSize so that our scrolled + // window a) does call Layout() to use sizers for + // positioning the controls but b) does not query + // the sizer for their size and use that for setting + // the scrollable area as set that ourselves by + // calling SetScrollbar() further down. + + Layout(); + + AdjustScrollbars(); + + // We must redraw the headers if their height changed. Normally this + // shouldn't happen as the control shouldn't let itself be resized beneath + // its minimal height but avoid the display artefacts that appear if it + // does happen, e.g. because there is really not enough vertical space. + if ( !HasFlag(wxDV_NO_HEADER) && m_headerArea && + m_headerArea->GetSize().y <= m_headerArea->GetBestSize(). y ) + { + m_headerArea->Refresh(); + } +} + +void wxDataViewCtrl::SetFocus() +{ + if (m_clientArea) + m_clientArea->SetFocus(); +} + +bool wxDataViewCtrl::SetFont(const wxFont & font) +{ + if (!wxControl::SetFont(font)) + return false; + + if (m_headerArea) + m_headerArea->SetFont(font); + + if (m_clientArea) + { + m_clientArea->SetFont(font); + m_clientArea->SetRowHeight(m_clientArea->GetDefaultRowHeight()); + } + + if (m_headerArea || m_clientArea) + { + InvalidateColBestWidths(); + Layout(); + } + + return true; +} + + + +bool wxDataViewCtrl::AssociateModel( wxDataViewModel *model ) +{ + if (!wxDataViewCtrlBase::AssociateModel( model )) + return false; + + if (model) + { + m_notifier = new wxGenericDataViewModelNotifier( m_clientArea ); + model->AddNotifier( m_notifier ); + } + else if (m_notifier) + { + m_notifier->Cleared(); + m_notifier = NULL; + } + + m_clientArea->DestroyTree(); + + if (model) + { + m_clientArea->BuildTree(model); + } + + m_clientArea->UpdateDisplay(); + + return true; +} + +#if wxUSE_DRAG_AND_DROP + +bool wxDataViewCtrl::EnableDragSource( const wxDataFormat &format ) +{ + return m_clientArea->EnableDragSource( format ); +} + +bool wxDataViewCtrl::EnableDropTarget( const wxDataFormat &format ) +{ + return m_clientArea->EnableDropTarget( format ); +} + +#endif // wxUSE_DRAG_AND_DROP + +bool wxDataViewCtrl::AppendColumn( wxDataViewColumn *col ) +{ + if (!wxDataViewCtrlBase::AppendColumn(col)) + return false; + + m_cols.Append( col ); + m_colsBestWidths.push_back(CachedColWidthInfo()); + OnColumnsCountChanged(); + return true; +} + +bool wxDataViewCtrl::PrependColumn( wxDataViewColumn *col ) +{ + if (!wxDataViewCtrlBase::PrependColumn(col)) + return false; + + m_cols.Insert( col ); + m_colsBestWidths.insert(m_colsBestWidths.begin(), CachedColWidthInfo()); + OnColumnsCountChanged(); + return true; +} + +bool wxDataViewCtrl::InsertColumn( unsigned int pos, wxDataViewColumn *col ) +{ + if (!wxDataViewCtrlBase::InsertColumn(pos,col)) + return false; + + m_cols.Insert( pos, col ); + m_colsBestWidths.insert(m_colsBestWidths.begin() + pos, CachedColWidthInfo()); + OnColumnsCountChanged(); + return true; +} + +void wxDataViewCtrl::OnColumnChange(unsigned int idx) +{ + if ( m_headerArea ) + m_headerArea->UpdateColumn(idx); + + m_clientArea->UpdateDisplay(); +} + +void wxDataViewCtrl::OnColumnsCountChanged() +{ + if (m_headerArea) + m_headerArea->SetColumnCount(GetColumnCount()); + + m_clientArea->OnColumnsCountChanged(); +} + +void wxDataViewCtrl::DoSetExpanderColumn() +{ + wxDataViewColumn* column = GetExpanderColumn(); + if ( column ) + { + int index = GetColumnIndex(column); + if ( index != wxNOT_FOUND ) + InvalidateColBestWidth(index); + } + + m_clientArea->UpdateDisplay(); +} + +void wxDataViewCtrl::DoSetIndent() +{ + m_clientArea->UpdateDisplay(); +} + +unsigned int wxDataViewCtrl::GetColumnCount() const +{ + return m_cols.GetCount(); +} + +bool wxDataViewCtrl::SetRowHeight( int lineHeight ) +{ + if ( !m_clientArea ) + return false; + + m_clientArea->SetRowHeight(lineHeight); + + return true; +} + +wxDataViewColumn* wxDataViewCtrl::GetColumn( unsigned int idx ) const +{ + return m_cols[idx]; +} + +wxDataViewColumn *wxDataViewCtrl::GetColumnAt(unsigned int pos) const +{ + // columns can't be reordered if there is no header window which allows + // to do this + const unsigned idx = m_headerArea ? m_headerArea->GetColumnsOrder()[pos] + : pos; + + return GetColumn(idx); +} + +int wxDataViewCtrl::GetColumnIndex(const wxDataViewColumn *column) const +{ + const unsigned count = m_cols.size(); + for ( unsigned n = 0; n < count; n++ ) + { + if ( m_cols[n] == column ) + return n; + } + + return wxNOT_FOUND; +} + +int wxDataViewCtrl::GetModelColumnIndex( unsigned int model_column ) const +{ + const int count = GetColumnCount(); + for ( int index = 0; index < count; index++ ) + { + wxDataViewColumn* column = GetColumn(index); + if ( column->GetModelColumn() == model_column ) + return index; + } + return wxNOT_FOUND; +} + +unsigned int wxDataViewCtrl::GetBestColumnWidth(int idx) const +{ + if ( m_colsBestWidths[idx].width != 0 ) + return m_colsBestWidths[idx].width; + + const int count = m_clientArea->GetRowCount(); + wxDataViewColumn *column = GetColumn(idx); + wxDataViewRenderer *renderer = + const_cast(column->GetRenderer()); + + class MaxWidthCalculator + { + public: + MaxWidthCalculator(const wxDataViewCtrl *dvc, + wxDataViewMainWindow *clientArea, + wxDataViewRenderer *renderer, + const wxDataViewModel *model, + unsigned int model_column, + int expanderSize) + : m_width(0), + m_dvc(dvc), + m_clientArea(clientArea), + m_renderer(renderer), + m_model(model), + m_model_column(model_column), + m_expanderSize(expanderSize) + + { + int index = dvc->GetModelColumnIndex( model_column ); + wxDataViewColumn* column = index == wxNOT_FOUND ? NULL : dvc->GetColumn(index); + m_isExpanderCol = + !clientArea->IsList() && + (column == 0 || + GetExpanderColumnOrFirstOne(const_cast(dvc)) == column ); + } + + void UpdateWithWidth(int width) + { + m_width = wxMax(m_width, width); + } + + void UpdateWithRow(int row) + { + int indent = 0; + wxDataViewItem item; + + if ( m_isExpanderCol ) + { + wxDataViewTreeNode *node = m_clientArea->GetTreeNodeByRow(row); + item = node->GetItem(); + indent = m_dvc->GetIndent() * node->GetIndentLevel() + m_expanderSize; + } + else + { + item = m_clientArea->GetItemByRow(row); + } + + m_renderer->PrepareForItem(m_model, item, m_model_column); + m_width = wxMax(m_width, m_renderer->GetSize().x + indent); + } + + int GetMaxWidth() const { return m_width; } + + private: + int m_width; + const wxDataViewCtrl *m_dvc; + wxDataViewMainWindow *m_clientArea; + wxDataViewRenderer *m_renderer; + const wxDataViewModel *m_model; + unsigned m_model_column; + bool m_isExpanderCol; + int m_expanderSize; + }; + + MaxWidthCalculator calculator(this, m_clientArea, renderer, + GetModel(), column->GetModelColumn(), + m_clientArea->GetRowHeight()); + + calculator.UpdateWithWidth(column->GetMinWidth()); + + if ( m_headerArea ) + calculator.UpdateWithWidth(m_headerArea->GetColumnTitleWidth(*column)); + + // The code below deserves some explanation. For very large controls, we + // simply can't afford to calculate sizes for all items, it takes too + // long. So the best we can do is to check the first and the last N/2 + // items in the control for some sufficiently large N and calculate best + // sizes from that. That can result in the calculated best width being too + // small for some outliers, but it's better to get slightly imperfect + // result than to wait several seconds after every update. To avoid highly + // visible miscalculations, we also include all currently visible items + // no matter what. Finally, the value of N is determined dynamically by + // measuring how much time we spent on the determining item widths so far. + +#if wxUSE_STOPWATCH + int top_part_end = count; + static const long CALC_TIMEOUT = 20/*ms*/; + // don't call wxStopWatch::Time() too often + static const unsigned CALC_CHECK_FREQ = 100; + wxStopWatch timer; +#else + // use some hard-coded limit, that's the best we can do without timer + int top_part_end = wxMin(500, count); +#endif // wxUSE_STOPWATCH/!wxUSE_STOPWATCH + + int row = 0; + + for ( row = 0; row < top_part_end; row++ ) + { +#if wxUSE_STOPWATCH + if ( row % CALC_CHECK_FREQ == CALC_CHECK_FREQ-1 && + timer.Time() > CALC_TIMEOUT ) + break; +#endif // wxUSE_STOPWATCH + calculator.UpdateWithRow(row); + } + + // row is the first unmeasured item now; that's our value of N/2 + + if ( row < count ) + { + top_part_end = row; + + // add bottom N/2 items now: + const int bottom_part_start = wxMax(row, count - row); + for ( row = bottom_part_start; row < count; row++ ) + { + calculator.UpdateWithRow(row); + } + + // finally, include currently visible items in the calculation: + const wxPoint origin = CalcUnscrolledPosition(wxPoint(0, 0)); + int first_visible = m_clientArea->GetLineAt(origin.y); + int last_visible = m_clientArea->GetLineAt(origin.y + GetClientSize().y); + + first_visible = wxMax(first_visible, top_part_end); + last_visible = wxMin(bottom_part_start, last_visible); + + for ( row = first_visible; row < last_visible; row++ ) + { + calculator.UpdateWithRow(row); + } + + wxLogTrace("dataview", + "determined best size from %d top, %d bottom plus %d more visible items out of %d total", + top_part_end, + count - bottom_part_start, + wxMax(0, last_visible - first_visible), + count); + } + + int max_width = calculator.GetMaxWidth(); + if ( max_width > 0 ) + max_width += 2 * PADDING_RIGHTLEFT; + + const_cast(this)->m_colsBestWidths[idx].width = max_width; + return max_width; +} + +void wxDataViewCtrl::ColumnMoved(wxDataViewColumn * WXUNUSED(col), + unsigned int WXUNUSED(new_pos)) +{ + // do _not_ reorder m_cols elements here, they should always be in the + // order in which columns were added, we only display the columns in + // different order + m_clientArea->UpdateDisplay(); +} + +bool wxDataViewCtrl::DeleteColumn( wxDataViewColumn *column ) +{ + wxDataViewColumnList::compatibility_iterator ret = m_cols.Find( column ); + if (!ret) + return false; + + m_colsBestWidths.erase(m_colsBestWidths.begin() + GetColumnIndex(column)); + m_cols.Erase(ret); + + if ( m_clientArea->GetCurrentColumn() == column ) + m_clientArea->ClearCurrentColumn(); + + OnColumnsCountChanged(); + + return true; +} + +bool wxDataViewCtrl::ClearColumns() +{ + SetExpanderColumn(NULL); + m_cols.Clear(); + m_sortingColumnIdx = wxNOT_FOUND; + m_colsBestWidths.clear(); + + m_clientArea->ClearCurrentColumn(); + + OnColumnsCountChanged(); + + return true; +} + +void wxDataViewCtrl::InvalidateColBestWidth(int idx) +{ + m_colsBestWidths[idx].width = 0; + m_colsBestWidths[idx].dirty = true; + m_colsDirty = true; +} + +void wxDataViewCtrl::InvalidateColBestWidths() +{ + // mark all columns as dirty: + m_colsBestWidths.clear(); + m_colsBestWidths.resize(m_cols.size()); + m_colsDirty = true; +} + +void wxDataViewCtrl::UpdateColWidths() +{ + m_colsDirty = false; + + if ( !m_headerArea ) + return; + + const unsigned len = m_colsBestWidths.size(); + for ( unsigned i = 0; i < len; i++ ) + { + // Note that we have to have an explicit 'dirty' flag here instead of + // checking if the width==0, as is done in GetBestColumnWidth(). + // + // Testing width==0 wouldn't work correctly if some code called + // GetWidth() after col. width invalidation but before + // wxDataViewCtrl::UpdateColWidths() was called at idle time. This + // would result in the header's column width getting out of sync with + // the control itself. + if ( m_colsBestWidths[i].dirty ) + { + m_headerArea->UpdateColumn(i); + m_colsBestWidths[i].dirty = false; + } + } +} + +void wxDataViewCtrl::OnInternalIdle() +{ + wxDataViewCtrlBase::OnInternalIdle(); + + if ( m_colsDirty ) + UpdateColWidths(); +} + +int wxDataViewCtrl::GetColumnPosition( const wxDataViewColumn *column ) const +{ + unsigned int len = GetColumnCount(); + for ( unsigned int i = 0; i < len; i++ ) + { + wxDataViewColumn * col = GetColumnAt(i); + if (column==col) + return i; + } + + return wxNOT_FOUND; +} + +wxDataViewColumn *wxDataViewCtrl::GetSortingColumn() const +{ + return m_sortingColumnIdx == wxNOT_FOUND ? NULL + : GetColumn(m_sortingColumnIdx); +} + +wxDataViewItem wxDataViewCtrl::DoGetCurrentItem() const +{ + return GetItemByRow(m_clientArea->GetCurrentRow()); +} + +void wxDataViewCtrl::DoSetCurrentItem(const wxDataViewItem& item) +{ + const int row = m_clientArea->GetRowByItem(item); + + const unsigned oldCurrent = m_clientArea->GetCurrentRow(); + if ( static_cast(row) != oldCurrent ) + { + m_clientArea->ChangeCurrentRow(row); + m_clientArea->RefreshRow(oldCurrent); + m_clientArea->RefreshRow(row); + } +} + +wxDataViewColumn *wxDataViewCtrl::GetCurrentColumn() const +{ + return m_clientArea->GetCurrentColumn(); +} + +int wxDataViewCtrl::GetSelectedItemsCount() const +{ + return m_clientArea->GetSelections().size(); +} + +int wxDataViewCtrl::GetSelections( wxDataViewItemArray & sel ) const +{ + sel.Empty(); + const wxDataViewSelection& selections = m_clientArea->GetSelections(); + + const size_t len = selections.size(); + for ( size_t i = 0; i < len; i++ ) + { + wxDataViewItem item = m_clientArea->GetItemByRow(selections[i]); + if ( item.IsOk() ) + { + sel.Add(item); + } + else + { + wxFAIL_MSG( "invalid item in selection - bad internal state" ); + } + } + + return sel.size(); +} + +void wxDataViewCtrl::SetSelections( const wxDataViewItemArray & sel ) +{ + wxDataViewSelection selection(wxDataViewSelectionCmp); + + wxDataViewItem last_parent; + + int len = sel.GetCount(); + for( int i = 0; i < len; i ++ ) + { + wxDataViewItem item = sel[i]; + wxDataViewItem parent = GetModel()->GetParent( item ); + if (parent) + { + if (parent != last_parent) + ExpandAncestors(item); + } + + last_parent = parent; + int row = m_clientArea->GetRowByItem( item ); + if( row >= 0 ) + selection.Add( static_cast(row) ); + } + + m_clientArea->SetSelections( selection ); +} + +void wxDataViewCtrl::Select( const wxDataViewItem & item ) +{ + ExpandAncestors( item ); + + int row = m_clientArea->GetRowByItem( item ); + if( row >= 0 ) + { + // Unselect all rows before select another in the single select mode + if (m_clientArea->IsSingleSel()) + m_clientArea->SelectAllRows(false); + + m_clientArea->SelectRow(row, true); + + // Also set focus to the selected item + m_clientArea->ChangeCurrentRow( row ); + } +} + +void wxDataViewCtrl::Unselect( const wxDataViewItem & item ) +{ + int row = m_clientArea->GetRowByItem( item ); + if( row >= 0 ) + m_clientArea->SelectRow(row, false); +} + +bool wxDataViewCtrl::IsSelected( const wxDataViewItem & item ) const +{ + int row = m_clientArea->GetRowByItem( item ); + if( row >= 0 ) + { + return m_clientArea->IsRowSelected(row); + } + return false; +} + +void wxDataViewCtrl::SetAlternateRowColour(const wxColour& colour) +{ + m_alternateRowColour = colour; +} + +void wxDataViewCtrl::SelectAll() +{ + m_clientArea->SelectAllRows(true); +} + +void wxDataViewCtrl::UnselectAll() +{ + m_clientArea->SelectAllRows(false); +} + +void wxDataViewCtrl::EnsureVisible( int row, int column ) +{ + if( row < 0 ) + row = 0; + if( row > (int) m_clientArea->GetRowCount() ) + row = m_clientArea->GetRowCount(); + + int first = m_clientArea->GetFirstVisibleRow(); + int last = m_clientArea->GetLastVisibleRow(); + if( row < first ) + m_clientArea->ScrollTo( row, column ); + else if( row > last ) + m_clientArea->ScrollTo( row - last + first, column ); + else + m_clientArea->ScrollTo( first, column ); +} + +void wxDataViewCtrl::EnsureVisible( const wxDataViewItem & item, const wxDataViewColumn * column ) +{ + ExpandAncestors( item ); + + m_clientArea->RecalculateDisplay(); + + int row = m_clientArea->GetRowByItem(item); + if( row >= 0 ) + { + if( column == NULL ) + EnsureVisible(row, -1); + else + EnsureVisible( row, GetColumnIndex(column) ); + } + +} + +void wxDataViewCtrl::HitTest( const wxPoint & point, wxDataViewItem & item, + wxDataViewColumn* &column ) const +{ + m_clientArea->HitTest(point, item, column); +} + +wxRect wxDataViewCtrl::GetItemRect( const wxDataViewItem & item, + const wxDataViewColumn* column ) const +{ + return m_clientArea->GetItemRect(item, column); +} + +wxDataViewItem wxDataViewCtrl::GetItemByRow( unsigned int row ) const +{ + return m_clientArea->GetItemByRow( row ); +} + +int wxDataViewCtrl::GetRowByItem( const wxDataViewItem & item ) const +{ + return m_clientArea->GetRowByItem( item ); +} + +void wxDataViewCtrl::Expand( const wxDataViewItem & item ) +{ + ExpandAncestors( item ); + + int row = m_clientArea->GetRowByItem( item ); + if (row != -1) + { + m_clientArea->Expand(row); + InvalidateColBestWidths(); + } +} + +void wxDataViewCtrl::Collapse( const wxDataViewItem & item ) +{ + int row = m_clientArea->GetRowByItem( item ); + if (row != -1) + { + m_clientArea->Collapse(row); + InvalidateColBestWidths(); + } +} + +bool wxDataViewCtrl::IsExpanded( const wxDataViewItem & item ) const +{ + int row = m_clientArea->GetRowByItem( item ); + if (row != -1) + return m_clientArea->IsExpanded(row); + return false; +} + +void wxDataViewCtrl::EditItem(const wxDataViewItem& item, const wxDataViewColumn *column) +{ + wxCHECK_RET( item.IsOk(), "invalid item" ); + wxCHECK_RET( column, "no column provided" ); + + m_clientArea->StartEditing(item, column); +} + +#endif // !wxUSE_GENERICDATAVIEWCTRL + +#endif // wxUSE_DATAVIEWCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/datectlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/datectlg.cpp new file mode 100644 index 0000000000..6ea3d01c4a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/datectlg.cpp @@ -0,0 +1,484 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/datectlg.cpp +// Purpose: generic wxDatePickerCtrlGeneric implementation +// Author: Andreas Pflug +// Modified by: +// Created: 2005-01-19 +// Copyright: (c) 2005 Andreas Pflug +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_DATEPICKCTRL + +#ifndef WX_PRECOMP + #include "wx/dialog.h" + #include "wx/dcmemory.h" + #include "wx/intl.h" + #include "wx/panel.h" + #include "wx/textctrl.h" + #include "wx/valtext.h" +#endif + +#include "wx/calctrl.h" +#include "wx/combo.h" + +#include "wx/datectrl.h" +#include "wx/generic/datectrl.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + + +// ---------------------------------------------------------------------------- +// global variables +// ---------------------------------------------------------------------------- + + +// ---------------------------------------------------------------------------- +// local classes +// ---------------------------------------------------------------------------- + +class wxCalendarComboPopup : public wxCalendarCtrl, + public wxComboPopup +{ +public: + + wxCalendarComboPopup() : wxCalendarCtrl(), + wxComboPopup() + { + } + + virtual void Init() + { + } + + // NB: Don't create lazily since it didn't work that way before + // wxComboCtrl was used, and changing behaviour would almost + // certainly introduce new bugs. + virtual bool Create(wxWindow* parent) + { + if ( !wxCalendarCtrl::Create(parent, wxID_ANY, wxDefaultDateTime, + wxPoint(0, 0), wxDefaultSize, + wxCAL_SEQUENTIAL_MONTH_SELECTION + | wxCAL_SHOW_HOLIDAYS | wxBORDER_SUNKEN) ) + return false; + + SetFormat(GetLocaleDateFormat()); + + m_useSize = wxCalendarCtrl::GetBestSize(); + + wxWindow* tx = m_combo->GetTextCtrl(); + if ( !tx ) + tx = m_combo; + + tx->Connect(wxEVT_KILL_FOCUS, + wxFocusEventHandler(wxCalendarComboPopup::OnKillTextFocus), + NULL, this); + + return true; + } + + virtual wxSize GetAdjustedSize(int WXUNUSED(minWidth), + int WXUNUSED(prefHeight), + int WXUNUSED(maxHeight)) + { + return m_useSize; + } + + virtual wxWindow *GetControl() { return this; } + + void SetDateValue(const wxDateTime& date) + { + if ( date.IsValid() ) + { + m_combo->SetText(date.Format(m_format)); + SetDate(date); + } + else // invalid date + { + wxASSERT_MSG( HasDPFlag(wxDP_ALLOWNONE), + wxT("this control must have a valid date") ); + + m_combo->SetText(wxEmptyString); + } + } + + bool IsTextEmpty() const + { + return m_combo->GetTextCtrl()->IsEmpty(); + } + + bool ParseDateTime(const wxString& s, wxDateTime* pDt) + { + wxASSERT(pDt); + + if ( !s.empty() ) + { + pDt->ParseFormat(s, m_format); + if ( !pDt->IsValid() ) + return false; + } + + return true; + } + + void SendDateEvent(const wxDateTime& dt) + { + // Sends both wxCalendarEvent and wxDateEvent + wxWindow* datePicker = m_combo->GetParent(); + + wxCalendarEvent cev(datePicker, dt, wxEVT_CALENDAR_SEL_CHANGED); + datePicker->GetEventHandler()->ProcessEvent(cev); + + wxDateEvent event(datePicker, dt, wxEVT_DATE_CHANGED); + datePicker->GetEventHandler()->ProcessEvent(event); + } + +private: + + void OnCalKey(wxKeyEvent & ev) + { + if (ev.GetKeyCode() == WXK_ESCAPE && !ev.HasModifiers()) + Dismiss(); + else + ev.Skip(); + } + + void OnSelChange(wxCalendarEvent &ev) + { + m_combo->SetText(GetDate().Format(m_format)); + + if ( ev.GetEventType() == wxEVT_CALENDAR_DOUBLECLICKED ) + { + Dismiss(); + } + + SendDateEvent(GetDate()); + } + + void OnKillTextFocus(wxFocusEvent &ev) + { + ev.Skip(); + + const wxDateTime& dtOld = GetDate(); + + wxDateTime dt; + wxString value = m_combo->GetValue(); + if ( !ParseDateTime(value, &dt) ) + { + if ( !HasDPFlag(wxDP_ALLOWNONE) ) + dt = dtOld; + } + + m_combo->SetText(GetStringValueFor(dt)); + + if ( !dt.IsValid() && HasDPFlag(wxDP_ALLOWNONE) ) + return; + + // notify that we had to change the date after validation + if ( (dt.IsValid() && (!dtOld.IsValid() || dt != dtOld)) || + (!dt.IsValid() && dtOld.IsValid()) ) + { + SetDate(dt); + SendDateEvent(dt); + } + } + + bool HasDPFlag(int flag) const + { + return m_combo->GetParent()->HasFlag(flag); + } + + // Return the format to be used for the dates shown by the control. This + // functions honours wxDP_SHOWCENTURY flag. + wxString GetLocaleDateFormat() const + { +#if wxUSE_INTL + wxString fmt = wxLocale::GetInfo(wxLOCALE_SHORT_DATE_FMT); + if ( HasDPFlag(wxDP_SHOWCENTURY) ) + fmt.Replace("%y", "%Y"); + + return fmt; +#else // !wxUSE_INTL + return wxT("x"); +#endif // wxUSE_INTL/!wxUSE_INTL + } + + bool SetFormat(const wxString& fmt) + { + m_format = fmt; + + if ( m_combo ) + { + wxArrayString allowedChars; + for ( wxChar c = wxT('0'); c <= wxT('9'); c++ ) + allowedChars.Add(wxString(c, 1)); + + const wxChar *p2 = m_format.c_str(); + while ( *p2 ) + { + if ( *p2 == '%') + p2 += 2; + else + allowedChars.Add(wxString(*p2++, 1)); + } + + #if wxUSE_VALIDATORS + wxTextValidator tv(wxFILTER_INCLUDE_CHAR_LIST); + tv.SetIncludes(allowedChars); + m_combo->SetValidator(tv); + #endif + + if ( GetDate().IsValid() ) + m_combo->SetText(GetDate().Format(m_format)); + } + + return true; + } + + virtual void SetStringValue(const wxString& s) + { + wxDateTime dt; + if ( !s.empty() && ParseDateTime(s, &dt) ) + SetDate(dt); + //else: keep the old value + } + + virtual wxString GetStringValue() const + { + return GetStringValueFor(GetDate()); + } + +private: + // returns either the given date representation using the current format or + // an empty string if it's invalid + wxString GetStringValueFor(const wxDateTime& dt) const + { + wxString val; + if ( dt.IsValid() ) + val = dt.Format(m_format); + + return val; + } + + wxSize m_useSize; + wxString m_format; + + DECLARE_EVENT_TABLE() +}; + + +BEGIN_EVENT_TABLE(wxCalendarComboPopup, wxCalendarCtrl) + EVT_KEY_DOWN(wxCalendarComboPopup::OnCalKey) + EVT_CALENDAR_SEL_CHANGED(wxID_ANY, wxCalendarComboPopup::OnSelChange) + EVT_CALENDAR_PAGE_CHANGED(wxID_ANY, wxCalendarComboPopup::OnSelChange) + EVT_CALENDAR(wxID_ANY, wxCalendarComboPopup::OnSelChange) +END_EVENT_TABLE() + + +// ============================================================================ +// wxDatePickerCtrlGeneric implementation +// ============================================================================ + +BEGIN_EVENT_TABLE(wxDatePickerCtrlGeneric, wxDatePickerCtrlBase) + EVT_TEXT(wxID_ANY, wxDatePickerCtrlGeneric::OnText) + EVT_SIZE(wxDatePickerCtrlGeneric::OnSize) + EVT_SET_FOCUS(wxDatePickerCtrlGeneric::OnFocus) +END_EVENT_TABLE() + +#ifndef wxHAS_NATIVE_DATEPICKCTRL + IMPLEMENT_DYNAMIC_CLASS(wxDatePickerCtrl, wxControl) +#endif + +// ---------------------------------------------------------------------------- +// creation +// ---------------------------------------------------------------------------- + +bool wxDatePickerCtrlGeneric::Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& date, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + wxASSERT_MSG( !(style & wxDP_SPIN), + wxT("wxDP_SPIN style not supported, use wxDP_DEFAULT") ); + + if ( !wxControl::Create(parent, id, pos, size, + style | wxCLIP_CHILDREN | wxWANTS_CHARS | wxBORDER_NONE, + validator, name) ) + { + return false; + } + + InheritAttributes(); + + m_combo = new wxComboCtrl(this, -1, wxEmptyString, + wxDefaultPosition, wxDefaultSize); + + m_combo->SetCtrlMainWnd(this); + + m_popup = new wxCalendarComboPopup(); + +#if defined(__WXMSW__) + // without this keyboard navigation in month control doesn't work + m_combo->UseAltPopupWindow(); +#endif + m_combo->SetPopupControl(m_popup); + + m_popup->SetDateValue(date.IsValid() ? date : wxDateTime::Today()); + + SetInitialSize(size); + + return true; +} + + +void wxDatePickerCtrlGeneric::Init() +{ + m_combo = NULL; + m_popup = NULL; +} + +wxDatePickerCtrlGeneric::~wxDatePickerCtrlGeneric() +{ +} + +bool wxDatePickerCtrlGeneric::Destroy() +{ + if ( m_combo ) + m_combo->Destroy(); + + m_combo = NULL; + m_popup = NULL; + + return wxControl::Destroy(); +} + +// ---------------------------------------------------------------------------- +// overridden base class methods +// ---------------------------------------------------------------------------- + +wxSize wxDatePickerCtrlGeneric::DoGetBestSize() const +{ + // A better solution would be to use a custom text control that would have + // the best size determined by the current date format and let m_combo take + // care of the best size computation, but this isn't easily possible with + // wxComboCtrl currently, so we compute our own best size here instead even + // if this means adding some extra margins to account for text control + // borders, space between it and the button and so on. + wxSize size = m_combo->GetButtonSize(); + + wxTextCtrl* const text = m_combo->GetTextCtrl(); + size.x += text->GetTextExtent(text->GetValue()).x; + size.x += 2*text->GetCharWidth(); // This is the margin mentioned above. + + return size; +} + +wxWindowList wxDatePickerCtrlGeneric::GetCompositeWindowParts() const +{ + wxWindowList parts; + parts.push_back(m_combo); + parts.push_back(m_popup); + return parts; +} + +// ---------------------------------------------------------------------------- +// wxDatePickerCtrlGeneric API +// ---------------------------------------------------------------------------- + +bool +wxDatePickerCtrlGeneric::SetDateRange(const wxDateTime& lowerdate, + const wxDateTime& upperdate) +{ + return m_popup->SetDateRange(lowerdate, upperdate); +} + + +wxDateTime wxDatePickerCtrlGeneric::GetValue() const +{ + if ( HasFlag(wxDP_ALLOWNONE) && m_popup->IsTextEmpty() ) + return wxInvalidDateTime; + return m_popup->GetDate(); +} + + +void wxDatePickerCtrlGeneric::SetValue(const wxDateTime& date) +{ + m_popup->SetDateValue(date); +} + + +bool wxDatePickerCtrlGeneric::GetRange(wxDateTime *dt1, wxDateTime *dt2) const +{ + return m_popup->GetDateRange(dt1, dt2); +} + + +void +wxDatePickerCtrlGeneric::SetRange(const wxDateTime &dt1, const wxDateTime &dt2) +{ + m_popup->SetDateRange(dt1, dt2); +} + +wxCalendarCtrl *wxDatePickerCtrlGeneric::GetCalendar() const +{ + return m_popup; +} + +// ---------------------------------------------------------------------------- +// event handlers +// ---------------------------------------------------------------------------- + + +void wxDatePickerCtrlGeneric::OnSize(wxSizeEvent& event) +{ + if ( m_combo ) + m_combo->SetSize(GetClientSize()); + + event.Skip(); +} + + +void wxDatePickerCtrlGeneric::OnText(wxCommandEvent &ev) +{ + ev.SetEventObject(this); + ev.SetId(GetId()); + GetParent()->GetEventHandler()->ProcessEvent(ev); + + // We'll create an additional event if the date is valid. + // If the date isn't valid, the user's probably in the middle of typing + wxDateTime dt; + if ( !m_popup || !m_popup->ParseDateTime(m_combo->GetValue(), &dt) ) + return; + + m_popup->SendDateEvent(dt); +} + + +void wxDatePickerCtrlGeneric::OnFocus(wxFocusEvent& WXUNUSED(event)) +{ + m_combo->SetFocus(); +} + + +#endif // wxUSE_DATEPICKCTRL + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/dbgrptg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/dbgrptg.cpp new file mode 100644 index 0000000000..99416162ce --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/dbgrptg.cpp @@ -0,0 +1,537 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/dbgrptg.cpp +// Purpose: implementation of wxDebugReportPreviewStd +// Author: Vadim Zeitlin, Andrej Putrin +// Modified by: +// Created: 2005-01-21 +// Copyright: (c) 2005 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_DEBUGREPORT && wxUSE_XML + +#include "wx/debugrpt.h" + +#ifndef WX_PRECOMP + #include "wx/sizer.h" + #include "wx/checklst.h" + #include "wx/textctrl.h" + #include "wx/intl.h" + #include "wx/stattext.h" + #include "wx/filedlg.h" + #include "wx/valtext.h" + #include "wx/button.h" +#endif // WX_PRECOMP + +#include "wx/filename.h" +#ifdef wxUSE_FFILE + #include "wx/ffile.h" +#else + #include "wx/file.h" +#endif +#include "wx/mimetype.h" + +#include "wx/statline.h" + +#ifdef __WXMSW__ + #include "wx/evtloop.h" // for SetCriticalWindow() + #include "wx/scopeguard.h" +#endif // __WXMSW__ + +// ---------------------------------------------------------------------------- +// wxDumpPreviewDlg: simple class for showing ASCII preview of dump files +// ---------------------------------------------------------------------------- + +class wxDumpPreviewDlg : public wxDialog +{ +public: + wxDumpPreviewDlg(wxWindow *parent, + const wxString& title, + const wxString& text); + +private: + // the text we show + wxTextCtrl *m_text; + + wxDECLARE_NO_COPY_CLASS(wxDumpPreviewDlg); +}; + +wxDumpPreviewDlg::wxDumpPreviewDlg(wxWindow *parent, + const wxString& title, + const wxString& text) + : wxDialog(parent, wxID_ANY, title, + wxDefaultPosition, wxDefaultSize, + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) +{ + // create controls + // --------------- + + // use wxTE_RICH2 style to avoid 64kB limit under MSW and display big files + // faster than with wxTE_RICH + m_text = new wxTextCtrl(this, wxID_ANY, wxEmptyString, + wxPoint(0, 0), wxDefaultSize, + wxTE_MULTILINE | + wxTE_READONLY | + wxTE_NOHIDESEL | + wxTE_RICH2); + m_text->SetValue(text); + + // use fixed-width font + m_text->SetFont(wxFont(12, wxFONTFAMILY_TELETYPE, + wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); + + wxButton *btnClose = new wxButton(this, wxID_CANCEL, _("Close")); + + + // layout them + // ----------- + + wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL), + *sizerBtns = new wxBoxSizer(wxHORIZONTAL); + + sizerBtns->Add(btnClose, 0, 0, 1); + + sizerTop->Add(m_text, 1, wxEXPAND); + sizerTop->Add(sizerBtns, 0, wxALIGN_RIGHT | wxTOP | wxBOTTOM | wxRIGHT, 1); + + // set the sizer &c + // ---------------- + + // make the text window bigger to show more contents of the file + sizerTop->SetItemMinSize(m_text, 600, 300); + SetSizer(sizerTop); + + Layout(); + Fit(); + + m_text->SetFocus(); +} + +// ---------------------------------------------------------------------------- +// wxDumpOpenExternalDlg: choose a command for opening the given file +// ---------------------------------------------------------------------------- + +class wxDumpOpenExternalDlg : public wxDialog +{ +public: + wxDumpOpenExternalDlg(wxWindow *parent, const wxFileName& filename); + + // return the command chosed by user to open this file + const wxString& GetCommand() const { return m_command; } + + wxString m_command; + +private: + +#if wxUSE_FILEDLG + void OnBrowse(wxCommandEvent& event); +#endif // wxUSE_FILEDLG + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxDumpOpenExternalDlg); +}; + +BEGIN_EVENT_TABLE(wxDumpOpenExternalDlg, wxDialog) + +#if wxUSE_FILEDLG + EVT_BUTTON(wxID_MORE, wxDumpOpenExternalDlg::OnBrowse) +#endif + +END_EVENT_TABLE() + + +wxDumpOpenExternalDlg::wxDumpOpenExternalDlg(wxWindow *parent, + const wxFileName& filename) + : wxDialog(parent, + wxID_ANY, + wxString::Format + ( + _("Open file \"%s\""), + filename.GetFullPath().c_str() + )) +{ + // create controls + // --------------- + + wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL); + sizerTop->Add(new wxStaticText(this, wxID_ANY, + wxString::Format + ( + _("Enter command to open file \"%s\":"), + filename.GetFullName().c_str() + )), + wxSizerFlags().Border()); + + wxSizer *sizerH = new wxBoxSizer(wxHORIZONTAL); + + wxTextCtrl *command = new wxTextCtrl + ( + this, + wxID_ANY, + wxEmptyString, + wxDefaultPosition, + wxSize(250, wxDefaultCoord), + 0 +#if wxUSE_VALIDATORS + ,wxTextValidator(wxFILTER_NONE, &m_command) +#endif + ); + sizerH->Add(command, + wxSizerFlags(1).Align(wxALIGN_CENTER_VERTICAL)); + +#if wxUSE_FILEDLG + + wxButton *browse = new wxButton(this, wxID_MORE, wxT(">>"), + wxDefaultPosition, wxDefaultSize, + wxBU_EXACTFIT); + sizerH->Add(browse, + wxSizerFlags(0).Align(wxALIGN_CENTER_VERTICAL). Border(wxLEFT)); + +#endif // wxUSE_FILEDLG + + sizerTop->Add(sizerH, wxSizerFlags(0).Expand().Border()); + + sizerTop->Add(new wxStaticLine(this), wxSizerFlags().Expand().Border()); + + sizerTop->Add(CreateStdDialogButtonSizer(wxOK | wxCANCEL), + wxSizerFlags().Align(wxALIGN_RIGHT).Border()); + + // set the sizer &c + // ---------------- + + SetSizer(sizerTop); + + Layout(); + Fit(); + + command->SetFocus(); +} + +#if wxUSE_FILEDLG + +void wxDumpOpenExternalDlg::OnBrowse(wxCommandEvent& ) +{ + wxFileName fname(m_command); + wxFileDialog dlg(this, + wxFileSelectorPromptStr, + fname.GetPathWithSep(), + fname.GetFullName() +#ifdef __WXMSW__ + , _("Executable files (*.exe)|*.exe|") + wxALL_FILES +#endif // __WXMSW__ + ); + if ( dlg.ShowModal() == wxID_OK ) + { + m_command = dlg.GetPath(); + TransferDataToWindow(); + } +} + +#endif // wxUSE_FILEDLG + +// ---------------------------------------------------------------------------- +// wxDebugReportDialog: class showing debug report to the user +// ---------------------------------------------------------------------------- + +class wxDebugReportDialog : public wxDialog +{ +public: + wxDebugReportDialog(wxDebugReport& dbgrpt); + + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); + +private: + void OnView(wxCommandEvent& ); + void OnViewUpdate(wxUpdateUIEvent& ); + void OnOpen(wxCommandEvent& ); + + + // small helper: add wxEXPAND and wxALL flags + static wxSizerFlags SizerFlags(int proportion) + { + return wxSizerFlags(proportion).Expand().Border(); + } + + + wxDebugReport& m_dbgrpt; + + wxCheckListBox *m_checklst; + wxTextCtrl *m_notes; + + wxArrayString m_files; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxDebugReportDialog); +}; + +// ============================================================================ +// wxDebugReportDialog implementation +// ============================================================================ + +BEGIN_EVENT_TABLE(wxDebugReportDialog, wxDialog) + EVT_BUTTON(wxID_VIEW_DETAILS, wxDebugReportDialog::OnView) + EVT_UPDATE_UI(wxID_VIEW_DETAILS, wxDebugReportDialog::OnViewUpdate) + EVT_BUTTON(wxID_OPEN, wxDebugReportDialog::OnOpen) + EVT_UPDATE_UI(wxID_OPEN, wxDebugReportDialog::OnViewUpdate) +END_EVENT_TABLE() + + +// ---------------------------------------------------------------------------- +// construction +// ---------------------------------------------------------------------------- + +wxDebugReportDialog::wxDebugReportDialog(wxDebugReport& dbgrpt) + : wxDialog(NULL, wxID_ANY, + wxString::Format(_("Debug report \"%s\""), + dbgrpt.GetReportName().c_str()), + wxDefaultPosition, + wxDefaultSize, + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER), + m_dbgrpt(dbgrpt) +{ + // upper part of the dialog: explanatory message + wxString msg; + wxString debugDir = dbgrpt.GetDirectory(); + + // The temporary directory can be the short form on Windows; + // normalize it for the benefit of users. +#ifdef __WXMSW__ + wxFileName debugDirFilename(debugDir, wxEmptyString); + debugDirFilename.Normalize(wxPATH_NORM_LONG); + debugDir = debugDirFilename.GetPath(); +#endif + msg << _("A debug report has been generated in the directory\n") + << wxT('\n') + << wxT(" \"") << debugDir << wxT("\"\n") + << wxT('\n') + << _("The report contains the files listed below. If any of these files contain private information,\nplease uncheck them and they will be removed from the report.\n") + << wxT('\n') + << _("If you wish to suppress this debug report completely, please choose the \"Cancel\" button,\nbut be warned that it may hinder improving the program, so if\nat all possible please do continue with the report generation.\n") + << wxT('\n') + << _(" Thank you and we're sorry for the inconvenience!\n") + << wxT("\n\n"); // just some white space to separate from other stuff + + const wxSizerFlags flagsFixed(SizerFlags(0)); + const wxSizerFlags flagsExpand(SizerFlags(1)); + const wxSizerFlags flagsExpand2(SizerFlags(2)); + + wxSizer *sizerPreview = + new wxStaticBoxSizer(wxVERTICAL, this, _("&Debug report preview:")); + sizerPreview->Add(CreateTextSizer(msg), SizerFlags(0).Centre()); + + // ... and the list of files in this debug report with buttons to view them + wxSizer *sizerFileBtns = new wxBoxSizer(wxVERTICAL); + sizerFileBtns->AddStretchSpacer(1); + sizerFileBtns->Add(new wxButton(this, wxID_VIEW_DETAILS, _("&View...")), + wxSizerFlags().Border(wxBOTTOM)); + sizerFileBtns->Add(new wxButton(this, wxID_OPEN, _("&Open...")), + wxSizerFlags().Border(wxTOP)); + sizerFileBtns->AddStretchSpacer(1); + + m_checklst = new wxCheckListBox(this, wxID_ANY); + + wxSizer *sizerFiles = new wxBoxSizer(wxHORIZONTAL); + sizerFiles->Add(m_checklst, flagsExpand); + sizerFiles->Add(sizerFileBtns, flagsFixed); + + sizerPreview->Add(sizerFiles, flagsExpand2); + + + // lower part of the dialog: notes field + wxSizer *sizerNotes = new wxStaticBoxSizer(wxVERTICAL, this, _("&Notes:")); + + msg = _("If you have any additional information pertaining to this bug\nreport, please enter it here and it will be joined to it:"); + + m_notes = new wxTextCtrl(this, wxID_ANY, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + wxTE_MULTILINE); + + sizerNotes->Add(CreateTextSizer(msg), flagsFixed); + sizerNotes->Add(m_notes, flagsExpand); + + + wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL); + sizerTop->Add(sizerPreview, flagsExpand2); + sizerTop->AddSpacer(5); + sizerTop->Add(sizerNotes, flagsExpand); + sizerTop->Add(CreateStdDialogButtonSizer(wxOK | wxCANCEL), flagsFixed); + + SetSizerAndFit(sizerTop); + Layout(); + CentreOnScreen(); +} + +// ---------------------------------------------------------------------------- +// data exchange +// ---------------------------------------------------------------------------- + +bool wxDebugReportDialog::TransferDataToWindow() +{ + // all files are included in the report by default + const size_t count = m_dbgrpt.GetFilesCount(); + for ( size_t n = 0; n < count; n++ ) + { + wxString name, + desc; + if ( m_dbgrpt.GetFile(n, &name, &desc) ) + { + m_checklst->Append(name + wxT(" (") + desc + wxT(')')); + m_checklst->Check(n); + + m_files.Add(name); + } + } + + return true; +} + +bool wxDebugReportDialog::TransferDataFromWindow() +{ + // any unchecked files should be removed from the report + const size_t count = m_checklst->GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + if ( !m_checklst->IsChecked(n) ) + { + m_dbgrpt.RemoveFile(m_files[n]); + } + } + + // if the user entered any notes, add them to the report + const wxString notes = m_notes->GetValue(); + if ( !notes.empty() ) + { + // for now filename fixed, could make it configurable in the future... + m_dbgrpt.AddText(wxT("notes.txt"), notes, wxT("user notes")); + } + + return true; +} + +// ---------------------------------------------------------------------------- +// event handlers +// ---------------------------------------------------------------------------- + +void wxDebugReportDialog::OnView(wxCommandEvent& ) +{ + const int sel = m_checklst->GetSelection(); + wxCHECK_RET( sel != wxNOT_FOUND, wxT("invalid selection in OnView()") ); + + wxFileName fn(m_dbgrpt.GetDirectory(), m_files[sel]); + wxString str; + + const wxString& fullPath = fn.GetFullPath(); +#if wxUSE_FFILE + wxFFile file(fullPath); +#elif wxUSE_FILE + wxFile file(fullPath); +#endif + if ( file.IsOpened() && file.ReadAll(&str) ) + { + wxDumpPreviewDlg dlg(this, m_files[sel], str); + dlg.ShowModal(); + } +} + +void wxDebugReportDialog::OnOpen(wxCommandEvent& ) +{ + const int sel = m_checklst->GetSelection(); + wxCHECK_RET( sel != wxNOT_FOUND, wxT("invalid selection in OnOpen()") ); + + wxFileName fn(m_dbgrpt.GetDirectory(), m_files[sel]); + + // try to get the command to open this kind of files ourselves + wxString command; +#if wxUSE_MIMETYPE + wxFileType * + ft = wxTheMimeTypesManager->GetFileTypeFromExtension(fn.GetExt()); + if ( ft ) + { + command = ft->GetOpenCommand(fn.GetFullPath()); + delete ft; + } +#endif // wxUSE_MIMETYPE + + // if we couldn't, ask the user + if ( command.empty() ) + { + wxDumpOpenExternalDlg dlg(this, fn); + if ( dlg.ShowModal() == wxID_OK ) + { + // get the command chosen by the user and append file name to it + + // if we don't have place marker for file name in the command... + wxString cmd = dlg.GetCommand(); + if ( !cmd.empty() ) + { +#if wxUSE_MIMETYPE + if ( cmd.find(wxT('%')) != wxString::npos ) + { + command = wxFileType::ExpandCommand(cmd, fn.GetFullPath()); + } + else // no %s nor %1 +#endif // wxUSE_MIMETYPE + { + // append the file name to the end + command << cmd << wxT(" \"") << fn.GetFullPath() << wxT('"'); + } + } + } + } + + if ( !command.empty() ) + ::wxExecute(command); +} + +void wxDebugReportDialog::OnViewUpdate(wxUpdateUIEvent& event) +{ + int sel = m_checklst->GetSelection(); + if (sel >= 0) + { + wxFileName fn(m_dbgrpt.GetDirectory(), m_files[sel]); + event.Enable(fn.FileExists()); + } + else + event.Enable(false); +} + + +// ============================================================================ +// wxDebugReportPreviewStd implementation +// ============================================================================ + +bool wxDebugReportPreviewStd::Show(wxDebugReport& dbgrpt) const +{ + if ( !dbgrpt.GetFilesCount() ) + return false; + + wxDebugReportDialog dlg(dbgrpt); + +#ifdef __WXMSW__ + // before entering the event loop (from ShowModal()), block the event + // handling for all other windows as this could result in more crashes + wxEventLoop::SetCriticalWindow(&dlg); + + wxON_BLOCK_EXIT1( wxEventLoop::SetCriticalWindow, + static_cast(NULL) ); +#endif // __WXMSW__ + + return dlg.ShowModal() == wxID_OK && dbgrpt.GetFilesCount() != 0; +} + +#endif // wxUSE_DEBUGREPORT && wxUSE_XML diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/dcpsg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/dcpsg.cpp new file mode 100644 index 0000000000..b5c493b0f4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/dcpsg.cpp @@ -0,0 +1,2408 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/dcpsg.cpp +// Purpose: Generic wxPostScriptDC implementation +// Author: Julian Smart, Robert Roebling, Markus Holzhem +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT + +#include "wx/generic/dcpsg.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/dcmemory.h" + #include "wx/math.h" + #include "wx/image.h" + #include "wx/icon.h" +#endif // WX_PRECOMP + +#include "wx/prntbase.h" +#include "wx/generic/prntdlgg.h" +#include "wx/paper.h" +#include "wx/filename.h" +#include "wx/stdpaths.h" + +#ifdef __WXMSW__ + +#ifdef DrawText +#undef DrawText +#endif + +#ifdef StartDoc +#undef StartDoc +#endif + +#ifdef GetCharWidth +#undef GetCharWidth +#endif + +#ifdef FindWindow +#undef FindWindow +#endif + +#endif + +//----------------------------------------------------------------------------- +// start and end of document/page +//----------------------------------------------------------------------------- + +static const char *wxPostScriptHeaderConicTo = "\ +/conicto {\n\ + /to_y exch def\n\ + /to_x exch def\n\ + /conic_cntrl_y exch def\n\ + /conic_cntrl_x exch def\n\ + currentpoint\n\ + /p0_y exch def\n\ + /p0_x exch def\n\ + /p1_x p0_x conic_cntrl_x p0_x sub 2 3 div mul add def\n\ + /p1_y p0_y conic_cntrl_y p0_y sub 2 3 div mul add def\n\ + /p2_x p1_x to_x p0_x sub 1 3 div mul add def\n\ + /p2_y p1_y to_y p0_y sub 1 3 div mul add def\n\ + p1_x p1_y p2_x p2_y to_x to_y curveto\n\ +} bind def\n\ +"; + +static const char *wxPostScriptHeaderEllipse = "\ +/ellipsedict 8 dict def\n\ +ellipsedict /mtrx matrix put\n\ +/ellipse {\n\ + ellipsedict begin\n\ + /endangle exch def\n\ + /startangle exch def\n\ + /yrad exch def\n\ + /xrad exch def\n\ + /y exch def\n\ + /x exch def\n\ + /savematrix mtrx currentmatrix def\n\ + x y translate\n\ + xrad yrad scale\n\ + 0 0 1 startangle endangle arc\n\ + savematrix setmatrix\n\ + end\n\ + } def\n\ +"; + +static const char *wxPostScriptHeaderEllipticArc= "\ +/ellipticarcdict 8 dict def\n\ +ellipticarcdict /mtrx matrix put\n\ +/ellipticarc\n\ +{ ellipticarcdict begin\n\ + /do_fill exch def\n\ + /endangle exch def\n\ + /startangle exch def\n\ + /yrad exch def\n\ + /xrad exch def \n\ + /y exch def\n\ + /x exch def\n\ + /savematrix mtrx currentmatrix def\n\ + x y translate\n\ + xrad yrad scale\n\ + do_fill { 0 0 moveto } if\n\ + 0 0 1 startangle endangle arc\n\ + savematrix setmatrix\n\ + do_fill { fill }{ stroke } ifelse\n\ + end\n\ +} def\n"; + +static const char *wxPostScriptHeaderSpline = "\ +/DrawSplineSection {\n\ + /y3 exch def\n\ + /x3 exch def\n\ + /y2 exch def\n\ + /x2 exch def\n\ + /y1 exch def\n\ + /x1 exch def\n\ + /xa x1 x2 x1 sub 0.666667 mul add def\n\ + /ya y1 y2 y1 sub 0.666667 mul add def\n\ + /xb x3 x2 x3 sub 0.666667 mul add def\n\ + /yb y3 y2 y3 sub 0.666667 mul add def\n\ + x1 y1 lineto\n\ + xa ya xb yb x3 y3 curveto\n\ + } def\n\ +"; + +static const char *wxPostScriptHeaderColourImage = "\ +% define 'colorimage' if it isn't defined\n\ +% ('colortogray' and 'mergeprocs' come from xwd2ps\n\ +% via xgrab)\n\ +/colorimage where % do we know about 'colorimage'?\n\ + { pop } % yes: pop off the 'dict' returned\n\ + { % no: define one\n\ + /colortogray { % define an RGB->I function\n\ + /rgbdata exch store % call input 'rgbdata'\n\ + rgbdata length 3 idiv\n\ + /npixls exch store\n\ + /rgbindx 0 store\n\ + 0 1 npixls 1 sub {\n\ + grays exch\n\ + rgbdata rgbindx get 20 mul % Red\n\ + rgbdata rgbindx 1 add get 32 mul % Green\n\ + rgbdata rgbindx 2 add get 12 mul % Blue\n\ + add add 64 idiv % I = .5G + .31R + .18B\n\ + put\n\ + /rgbindx rgbindx 3 add store\n\ + } for\n\ + grays 0 npixls getinterval\n\ + } bind def\n\ +\n\ + % Utility procedure for colorimage operator.\n\ + % This procedure takes two procedures off the\n\ + % stack and merges them into a single procedure.\n\ +\n\ + /mergeprocs { % def\n\ + dup length\n\ + 3 -1 roll\n\ + dup\n\ + length\n\ + dup\n\ + 5 1 roll\n\ + 3 -1 roll\n\ + add\n\ + array cvx\n\ + dup\n\ + 3 -1 roll\n\ + 0 exch\n\ + putinterval\n\ + dup\n\ + 4 2 roll\n\ + putinterval\n\ + } bind def\n\ +\n\ + /colorimage { % def\n\ + pop pop % remove 'false 3' operands\n\ + {colortogray} mergeprocs\n\ + image\n\ + } bind def\n\ + } ifelse % end of 'false' case\n\ +"; + +static const char wxPostScriptHeaderReencodeISO1[] = + "\n/reencodeISO {\n" +"dup dup findfont dup length dict begin\n" +"{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n" +"/Encoding ISOLatin1Encoding def\n" +"currentdict end definefont\n" +"} def\n" +"/ISOLatin1Encoding [\n" +"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" +"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" +"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" +"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" +"/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n" +"/parenleft/parenright/asterisk/plus/comma/minus/period/slash\n" +"/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n" +"/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N\n" +"/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n" +"/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n" +"/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde\n" +"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" +"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n" +"/.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve\n" +"/dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut\n"; + +static const char wxPostScriptHeaderReencodeISO2[] = +"/ogonek/caron/space/exclamdown/cent/sterling/currency/yen/brokenbar\n" +"/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot\n" +"/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior\n" +"/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine\n" +"/guillemotright/onequarter/onehalf/threequarters/questiondown\n" +"/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla\n" +"/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex\n" +"/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis\n" +"/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute\n" +"/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis\n" +"/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave\n" +"/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex\n" +"/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis\n" +"/yacute/thorn/ydieresis\n" + "] def\n\n"; + +//------------------------------------------------------------------------------- +// wxPostScriptDC +//------------------------------------------------------------------------------- + + +IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC) + +wxPostScriptDC::wxPostScriptDC() + : wxDC(new wxPostScriptDCImpl(this)) +{ +} + +wxPostScriptDC::wxPostScriptDC(const wxPrintData& printData) + : wxDC(new wxPostScriptDCImpl(this, printData)) +{ +} + +// conversion +static const double RAD2DEG = 180.0 / M_PI; + +// we don't want to use only 72 dpi from PS print +static const int DPI = 600; +static const double PS2DEV = 600.0 / 72.0; +static const double DEV2PS = 72.0 / 600.0; + +#define XLOG2DEV(x) ((double)(LogicalToDeviceX(x)) * DEV2PS) +#define XLOG2DEVREL(x) ((double)(LogicalToDeviceXRel(x)) * DEV2PS) +#define YLOG2DEV(x) ((m_pageHeight - (double)LogicalToDeviceY(x)) * DEV2PS) +#define YLOG2DEVREL(x) ((double)(LogicalToDeviceYRel(x)) * DEV2PS) + + +IMPLEMENT_ABSTRACT_CLASS(wxPostScriptDCImpl, wxDCImpl) + +//------------------------------------------------------------------------------- + +wxPostScriptDCImpl::wxPostScriptDCImpl( wxPostScriptDC *owner ) : + wxDCImpl( owner ) +{ + Init(); + + m_pageHeight = 842 * PS2DEV; + + m_ok = true; +} + +wxPostScriptDCImpl::wxPostScriptDCImpl( wxPostScriptDC *owner, const wxPrintData& data ) : + wxDCImpl( owner ) +{ + Init(); + + // this calculates m_pageHeight required for + // taking the inverted Y axis into account + SetPrintData( data ); + + m_ok = true; +} + + +wxPostScriptDCImpl::wxPostScriptDCImpl( wxPrinterDC *owner ) : + wxDCImpl( owner ) +{ + Init(); + + m_pageHeight = 842 * PS2DEV; + + m_ok = true; +} + +wxPostScriptDCImpl::wxPostScriptDCImpl( wxPrinterDC *owner, const wxPrintData& data ) : + wxDCImpl( owner ) +{ + Init(); + + // this calculates m_pageHeight required for + // taking the inverted Y axis into account + SetPrintData( data ); + + m_ok = true; +} + +void wxPostScriptDCImpl::Init() +{ + m_pstream = NULL; + + m_currentRed = 0; + m_currentGreen = 0; + m_currentBlue = 0; + + m_pageNumber = 0; + + m_clipping = false; + + m_underlinePosition = 0.0; + m_underlineThickness = 0.0; + +} + +wxPostScriptDCImpl::~wxPostScriptDCImpl () +{ + if (m_pstream) + { + fclose( m_pstream ); + m_pstream = NULL; + } +} + +bool wxPostScriptDCImpl::IsOk() const +{ + return m_ok; +} + +wxRect wxPostScriptDCImpl::GetPaperRect() const +{ + int w = 0; + int h = 0; + DoGetSize( &w, &h ); + return wxRect(0,0,w,h); +} + +int wxPostScriptDCImpl::GetResolution() const +{ + return DPI; +} + +void wxPostScriptDCImpl::DoSetClippingRegion (wxCoord x, wxCoord y, wxCoord w, wxCoord h) +{ + wxCHECK_RET( m_ok , wxT("invalid postscript dc") ); + + if (m_clipping) + DestroyClippingRegion(); + + m_clipX1 = x; + m_clipY1 = y; + m_clipX2 = x + w; + m_clipY2 = y + h; + + m_clipping = true; + + wxString buffer; + buffer.Printf( "gsave\n" + "newpath\n" + "%f %f moveto\n" + "%f %f lineto\n" + "%f %f lineto\n" + "%f %f lineto\n" + "closepath clip newpath\n", + XLOG2DEV(x), YLOG2DEV(y), + XLOG2DEV(x+w), YLOG2DEV(y), + XLOG2DEV(x+w), YLOG2DEV(y+h), + XLOG2DEV(x), YLOG2DEV(y+h) ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); +} + + +void wxPostScriptDCImpl::DestroyClippingRegion() +{ + wxCHECK_RET( m_ok , wxT("invalid postscript dc") ); + + if (m_clipping) + { + m_clipping = false; + PsPrint( "grestore\n" ); + } + + wxDCImpl::DestroyClippingRegion(); +} + +void wxPostScriptDCImpl::Clear() +{ + // This should fail silently to avoid unnecessary + // asserts + // wxFAIL_MSG( wxT("wxPostScriptDCImpl::Clear not implemented.") ); +} + +bool wxPostScriptDCImpl::DoFloodFill (wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxColour &WXUNUSED(col), wxFloodFillStyle WXUNUSED(style)) +{ + wxFAIL_MSG( wxT("wxPostScriptDCImpl::FloodFill not implemented.") ); + return false; +} + +bool wxPostScriptDCImpl::DoGetPixel (wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxColour * WXUNUSED(col)) const +{ + wxFAIL_MSG( wxT("wxPostScriptDCImpl::GetPixel not implemented.") ); + return false; +} + +void wxPostScriptDCImpl::DoCrossHair (wxCoord WXUNUSED(x), wxCoord WXUNUSED(y)) +{ + wxFAIL_MSG( wxT("wxPostScriptDCImpl::CrossHair not implemented.") ); +} + +void wxPostScriptDCImpl::DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) +{ + wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); + + if ( m_pen.IsTransparent() ) + return; + + SetPen( m_pen ); + + wxString buffer; + buffer.Printf( "newpath\n" + "%f %f moveto\n" + "%f %f lineto\n" + "stroke\n", + XLOG2DEV(x1), YLOG2DEV(y1), + XLOG2DEV(x2), YLOG2DEV(y2) ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( x1, y1 ); + CalcBoundingBox( x2, y2 ); +} + +void wxPostScriptDCImpl::DoDrawArc (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc) +{ + wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); + + wxCoord dx = x1 - xc; + wxCoord dy = y1 - yc; + double radius = sqrt( (double)(dx*dx+dy*dy) ); + double alpha1, alpha2; + + if (x1 == x2 && y1 == y2) + { + alpha1 = 0.0; + alpha2 = 360.0; + } + else if ( wxIsNullDouble(radius) ) + { + alpha1 = + alpha2 = 0.0; + } + else + { + alpha1 = (x1 - xc == 0) ? + (y1 - yc < 0) ? 90.0 : -90.0 : + -atan2(double(y1-yc), double(x1-xc)) * RAD2DEG; + alpha2 = (x2 - xc == 0) ? + (y2 - yc < 0) ? 90.0 : -90.0 : + -atan2(double(y2-yc), double(x2-xc)) * RAD2DEG; + } + while (alpha1 <= 0) alpha1 += 360; + while (alpha2 <= 0) alpha2 += 360; // adjust angles to be between + while (alpha1 > 360) alpha1 -= 360; // 0 and 360 degree + while (alpha2 > 360) alpha2 -= 360; + + int i_radius = wxRound( radius ); + + if ( m_brush.IsNonTransparent() ) + { + SetBrush( m_brush ); + + wxString buffer; + buffer.Printf( "newpath\n" + "%f %f %f %f %f %f ellipse\n" + "%f %f lineto\n" + "closepath\n" + "fill\n", + XLOG2DEV(xc), YLOG2DEV(yc), + XLOG2DEVREL(i_radius), YLOG2DEVREL(i_radius), + alpha1, alpha2, + XLOG2DEV(xc), YLOG2DEV(yc) ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( xc-i_radius, yc-i_radius ); + CalcBoundingBox( xc+i_radius, yc+i_radius ); + } + + if ( m_pen.IsNonTransparent() ) + { + SetPen( m_pen ); + + wxString buffer; + buffer.Printf( "newpath\n" + "%f %f %f %f %f %f ellipse\n" + "stroke\n", + XLOG2DEV(xc), YLOG2DEV(yc), + XLOG2DEVREL(i_radius), YLOG2DEVREL(i_radius), + alpha1, alpha2 ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( xc-i_radius, yc-i_radius ); + CalcBoundingBox( xc+i_radius, yc+i_radius ); + } +} + +void wxPostScriptDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea) +{ + wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); + + if ( sa >= 360 || sa <= -360 ) + sa -= int(sa/360)*360; + if ( ea >= 360 || ea <=- 360 ) + ea -= int(ea/360)*360; + if ( sa < 0 ) + sa += 360; + if ( ea < 0 ) + ea += 360; + + if ( wxIsSameDouble(sa, ea) ) + { + DoDrawEllipse(x,y,w,h); + return; + } + + if ( m_brush.IsNonTransparent() ) + { + SetBrush( m_brush ); + + wxString buffer; + buffer.Printf( "newpath\n" + "%f %f %f %f %f %f true ellipticarc\n", + XLOG2DEV(x+w/2), YLOG2DEV(y+h/2), + XLOG2DEVREL(w/2), YLOG2DEVREL(h/2), + sa, ea ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( x ,y ); + CalcBoundingBox( x+w, y+h ); + } + + if ( m_pen.IsNonTransparent() ) + { + SetPen( m_pen ); + + wxString buffer; + buffer.Printf( "newpath\n" + "%f %f %f %f %f %f false ellipticarc\n", + XLOG2DEV(x+w/2), YLOG2DEV(y+h/2), + XLOG2DEVREL(w/2), YLOG2DEVREL(h/2), + sa, ea ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( x ,y ); + CalcBoundingBox( x+w, y+h ); + } +} + +void wxPostScriptDCImpl::DoDrawPoint (wxCoord x, wxCoord y) +{ + wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); + + if ( m_pen.IsTransparent() ) + return; + + SetPen (m_pen); + + wxString buffer; + buffer.Printf( "newpath\n" + "%f %f moveto\n" + "%f %f lineto\n" + "stroke\n", + XLOG2DEV(x), YLOG2DEV(y), + XLOG2DEV(x+1), YLOG2DEV(y) ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( x, y ); +} + +void wxPostScriptDCImpl::DoDrawPolygon (int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle) +{ + wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); + + if (n <= 0) return; + + if ( m_brush.IsNonTransparent() ) + { + SetBrush( m_brush ); + + PsPrint( "newpath\n" ); + + double xx = XLOG2DEV(points[0].x + xoffset); + double yy = YLOG2DEV(points[0].y + yoffset); + + wxString buffer; + buffer.Printf( "%f %f moveto\n", xx, yy ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( points[0].x + xoffset, points[0].y + yoffset ); + + for (int i = 1; i < n; i++) + { + xx = XLOG2DEV(points[i].x + xoffset); + yy = YLOG2DEV(points[i].y + yoffset); + + buffer.Printf( "%f %f lineto\n", xx, yy ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( points[i].x + xoffset, points[i].y + yoffset); + } + + PsPrint( (fillStyle == wxODDEVEN_RULE ? "eofill\n" : "fill\n") ); + } + + if ( m_pen.IsNonTransparent() ) + { + SetPen( m_pen ); + + PsPrint( "newpath\n" ); + + double xx = XLOG2DEV(points[0].x + xoffset); + double yy = YLOG2DEV(points[0].y + yoffset); + + wxString buffer; + buffer.Printf( "%f %f moveto\n", xx, yy ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( points[0].x + xoffset, points[0].y + yoffset ); + + for (int i = 1; i < n; i++) + { + xx = XLOG2DEV(points[i].x + xoffset); + yy = YLOG2DEV(points[i].y + yoffset); + + buffer.Printf( "%f %f lineto\n", xx, yy ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( points[i].x + xoffset, points[i].y + yoffset); + } + + PsPrint( "closepath\n" ); + PsPrint( "stroke\n" ); + } +} + +void wxPostScriptDCImpl::DoDrawPolyPolygon (int n, const int count[], const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle) +{ + wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); + + if (n <= 0) return; + + if ( m_brush.IsNonTransparent() ) + { + SetBrush( m_brush ); + + PsPrint( "newpath\n" ); + + int ofs = 0; + for (int i = 0; i < n; ofs += count[i++]) + { + double xx = XLOG2DEV(points[ofs].x + xoffset); + double yy = YLOG2DEV(points[ofs].y + yoffset); + + wxString buffer; + buffer.Printf( "%f %f moveto\n", xx, yy ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( points[ofs].x + xoffset, points[ofs].y + yoffset ); + + for (int j = 1; j < count[i]; j++) + { + xx = XLOG2DEV(points[ofs+j].x + xoffset); + yy = YLOG2DEV(points[ofs+j].y + yoffset); + + buffer.Printf( "%f %f lineto\n", xx, yy ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( points[ofs+j].x + xoffset, points[ofs+j].y + yoffset); + } + } + PsPrint( (fillStyle == wxODDEVEN_RULE ? "eofill\n" : "fill\n") ); + } + + if ( m_pen.IsNonTransparent() ) + { + SetPen( m_pen ); + + PsPrint( "newpath\n" ); + + int ofs = 0; + for (int i = 0; i < n; ofs += count[i++]) + { + double xx = XLOG2DEV(points[ofs].x + xoffset); + double yy = YLOG2DEV(points[ofs].y + yoffset); + + wxString buffer; + buffer.Printf( "%f %f moveto\n", xx, yy ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( points[ofs].x + xoffset, points[ofs].y + yoffset ); + + for (int j = 1; j < count[i]; j++) + { + xx = XLOG2DEV(points[ofs+j].x + xoffset); + yy = YLOG2DEV(points[ofs+j].y + yoffset); + + buffer.Printf( "%f %f lineto\n", xx, yy ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( points[ofs+j].x + xoffset, points[ofs+j].y + yoffset); + } + } + PsPrint( "closepath\n" ); + PsPrint( "stroke\n" ); + } +} + +void wxPostScriptDCImpl::DoDrawLines (int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset) +{ + wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); + + if ( m_pen.IsTransparent() ) + return; + + if (n <= 0) return; + + SetPen (m_pen); + + int i; + for ( i =0; iGetTextExtent(text, &text_w, &text_h, &text_descent); + + int size = m_font.GetPointSize(); + +// wxCoord by = y + (wxCoord)floor( double(size) * 2.0 / 3.0 ); // approximate baseline +// commented by V. Slavik and replaced by accurate version +// - note that there is still rounding error in text_descent! + wxCoord by = y + size - text_descent; // baseline + + wxString buffer; + buffer.Printf( "%f %f moveto\n", XLOG2DEV(x), YLOG2DEV(by) ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + PsPrint( "(" ); + + for ( const char *p = textbuf; *p != '\0'; p++ ) + { + int c = (unsigned char)*p; + if (c == ')' || c == '(' || c == '\\') + { + /* Cope with special characters */ + PsPrint( "\\" ); + PsPrint( (char) c ); + } + else if ( c >= 128 ) + { + /* Cope with character codes > 127 */ + buffer.Printf( "\\%o", c ); + PsPrint( buffer ); + } + else + { + PsPrint( (char) c ); + } + } + + PsPrint( ") show\n" ); + + if (m_font.GetUnderlined()) + { + wxCoord uy = (wxCoord)(y + size - m_underlinePosition); + + buffer.Printf( "gsave\n" + "%f %f moveto\n" + "%f setlinewidth\n" + "%f %f lineto\n" + "stroke\n" + "grestore\n", + XLOG2DEV(x), YLOG2DEV(uy), + m_underlineThickness, + XLOG2DEV(x + text_w), YLOG2DEV(uy) ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + } + + CalcBoundingBox( x, y ); + CalcBoundingBox( x + size * text.length() * 2/3 , y ); +} + +void wxPostScriptDCImpl::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord y, double angle ) +{ + if ( wxIsNullDouble(angle) ) + { + DoDrawText(text, x, y); + return; + } + + wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); + + SetFont( m_font ); + + if (m_textForegroundColour.IsOk()) + { + unsigned char red = m_textForegroundColour.Red(); + unsigned char blue = m_textForegroundColour.Blue(); + unsigned char green = m_textForegroundColour.Green(); + + if (!m_colour) + { + // Anything not white is black + if (! (red == (unsigned char) 255 && + blue == (unsigned char) 255 && + green == (unsigned char) 255)) + { + red = (unsigned char) 0; + green = (unsigned char) 0; + blue = (unsigned char) 0; + } + } + + // maybe setgray here ? + if (!(red == m_currentRed && green == m_currentGreen && blue == m_currentBlue)) + { + double redPS = (double)(red) / 255.0; + double bluePS = (double)(blue) / 255.0; + double greenPS = (double)(green) / 255.0; + + wxString buffer; + buffer.Printf( "%f %f %f setrgbcolor\n", redPS, greenPS, bluePS ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + m_currentRed = red; + m_currentBlue = blue; + m_currentGreen = green; + } + } + + int size = m_font.GetPointSize(); + + wxString buffer; + buffer.Printf( "%f %f moveto\n", XLOG2DEV(x), YLOG2DEV(y)); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + buffer.Printf( "%f rotate\n", angle ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + PsPrint( "(" ); + const wxWX2MBbuf textbuf = text.mb_str(); + if ( textbuf ) + { + for ( const char *p = textbuf; *p != '\0'; p++ ) + { + int c = (unsigned char)*p; + if (c == ')' || c == '(' || c == '\\') + { + /* Cope with special characters */ + PsPrint( "\\" ); + PsPrint( (char) c ); + } + else if ( c >= 128 ) + { + /* Cope with character codes > 127 */ + buffer.Printf( "\\%o", c); + PsPrint( buffer ); + } + else + { + PsPrint( (char) c ); + } + } + } + + PsPrint( ") show\n" ); + + buffer.Printf( "%f rotate\n", -angle ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + if (m_font.GetUnderlined()) + { + wxCoord uy = (wxCoord)(y + size - m_underlinePosition); + wxCoord w, h; + GetOwner()->GetTextExtent(text, &w, &h); + + buffer.Printf( + "gsave\n" + "%f %f moveto\n" + "%f setlinewidth\n" + "%f %f lineto\n" + "stroke\n" + "grestore\n", + XLOG2DEV(x), YLOG2DEV(uy), + m_underlineThickness, + XLOG2DEV(x + w), YLOG2DEV(uy) ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + } + + CalcBoundingBox( x, y ); + CalcBoundingBox( x + size * text.length() * 2/3 , y ); +} + +void wxPostScriptDCImpl::SetBackground (const wxBrush& brush) +{ + m_backgroundBrush = brush; +} + +void wxPostScriptDCImpl::SetLogicalFunction(wxRasterOperationMode WXUNUSED(function)) +{ + wxFAIL_MSG( wxT("wxPostScriptDCImpl::SetLogicalFunction not implemented.") ); +} + +#if wxUSE_SPLINES +void wxPostScriptDCImpl::DoDrawSpline( const wxPointList *points ) +{ + wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); + + SetPen( m_pen ); + + // a and b are not used + //double a, b; + double c, d, x1, y1, x2, y2, x3, y3; + wxPoint *p, *q; + + wxPointList::compatibility_iterator node = points->GetFirst(); + p = node->GetData(); + x1 = p->x; + y1 = p->y; + + node = node->GetNext(); + p = node->GetData(); + c = p->x; + d = p->y; + x3 = + #if 0 + a = + #endif + (double)(x1 + c) / 2; + y3 = + #if 0 + b = + #endif + (double)(y1 + d) / 2; + + wxString buffer; + buffer.Printf( "newpath\n" + "%f %f moveto\n" + "%f %f lineto\n", + XLOG2DEV(wxRound(x1)), YLOG2DEV(wxRound(y1)), + XLOG2DEV(wxRound(x3)), YLOG2DEV(wxRound(y3)) ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( (wxCoord)x1, (wxCoord)y1 ); + CalcBoundingBox( (wxCoord)x3, (wxCoord)y3 ); + + node = node->GetNext(); + while (node) + { + q = node->GetData(); + + x1 = x3; + y1 = y3; + x2 = c; + y2 = d; + c = q->x; + d = q->y; + x3 = (double)(x2 + c) / 2; + y3 = (double)(y2 + d) / 2; + + buffer.Printf( "%f %f %f %f %f %f DrawSplineSection\n", + XLOG2DEV(wxRound(x1)), YLOG2DEV(wxRound(y1)), + XLOG2DEV(wxRound(x2)), YLOG2DEV(wxRound(y2)), + XLOG2DEV(wxRound(x3)), YLOG2DEV(wxRound(y3)) ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + + CalcBoundingBox( (wxCoord)x1, (wxCoord)y1 ); + CalcBoundingBox( (wxCoord)x3, (wxCoord)y3 ); + + node = node->GetNext(); + } + + /* + At this point, (x2,y2) and (c,d) are the position of the + next-to-last and last point respectively, in the point list + */ + + buffer.Printf( "%f %f lineto\nstroke\n", XLOG2DEV(wxRound(c)), YLOG2DEV(wxRound(d)) ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); +} +#endif // wxUSE_SPLINES + +wxCoord wxPostScriptDCImpl::GetCharWidth() const +{ + // Chris Breeze: reasonable approximation using wxMODERN/Courier + return (wxCoord) (GetCharHeight() * 72.0 / 120.0); +} + +void wxPostScriptDCImpl::SetPrintData(const wxPrintData& data) +{ + m_printData = data; + + wxPaperSize id = m_printData.GetPaperId(); + wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(id); + if (!paper) paper = wxThePrintPaperDatabase->FindPaperType(wxPAPER_A4); + int w = 595; + int h = 842; + if (paper) + { + w = paper->GetSizeDeviceUnits().x; + h = paper->GetSizeDeviceUnits().y; + } + + if (m_printData.GetOrientation() == wxLANDSCAPE) + m_pageHeight = w * PS2DEV; + else + m_pageHeight = h * PS2DEV; +} + +void wxPostScriptDCImpl::ComputeScaleAndOrigin() +{ + const wxRealPoint origScale(m_scaleX, m_scaleY); + + wxDCImpl::ComputeScaleAndOrigin(); + + // If scale has changed call SetPen to recalculate the line width + // and SetFont to recalculate font size + if ( wxRealPoint(m_scaleX, m_scaleY) != origScale && m_pen.IsOk() ) + { + SetPen( m_pen ); + SetFont( m_font ); + } +} + +void wxPostScriptDCImpl::DoGetSize(int* width, int* height) const +{ + wxPaperSize id = m_printData.GetPaperId(); + + wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(id); + + if (!paper) paper = wxThePrintPaperDatabase->FindPaperType(wxPAPER_A4); + + int w = 595; + int h = 842; + if (paper) + { + w = paper->GetSizeDeviceUnits().x; + h = paper->GetSizeDeviceUnits().y; + } + + if (m_printData.GetOrientation() == wxLANDSCAPE) + { + int tmp = w; + w = h; + h = tmp; + } + + if (width) + *width = wxRound( w * PS2DEV ); + + if (height) + *height = wxRound( h * PS2DEV ); +} + +void wxPostScriptDCImpl::DoGetSizeMM(int *width, int *height) const +{ + wxPaperSize id = m_printData.GetPaperId(); + + wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(id); + + if (!paper) paper = wxThePrintPaperDatabase->FindPaperType(wxPAPER_A4); + + int w = 210; + int h = 297; + if (paper) + { + w = paper->GetWidth() / 10; + h = paper->GetHeight() / 10; + } + + if (m_printData.GetOrientation() == wxLANDSCAPE) + { + int tmp = w; + w = h; + h = tmp; + } + + if (width) *width = w; + if (height) *height = h; +} + +// Resolution in pixels per logical inch +wxSize wxPostScriptDCImpl::GetPPI(void) const +{ + return wxSize( DPI, DPI ); +} + + +bool wxPostScriptDCImpl::StartDoc( const wxString& WXUNUSED(message) ) +{ + wxCHECK_MSG( m_ok, false, wxT("invalid postscript dc") ); + + if (m_printData.GetPrintMode() != wxPRINT_MODE_STREAM ) + { + if (m_printData.GetFilename() == wxEmptyString) + { + wxString filename = wxFileName::CreateTempFileName( wxT("ps") ); + m_printData.SetFilename(filename); + } + + m_pstream = wxFopen( m_printData.GetFilename(), wxT("w+") ); + + if (!m_pstream) + { + wxLogError( _("Cannot open file for PostScript printing!")); + m_ok = false; + return false; + } + } + + m_ok = true; + + wxString buffer; + + PsPrint( "%!PS-Adobe-2.0\n" ); + + PsPrint( "%%Creator: wxWidgets PostScript renderer\n" ); + + buffer.Printf( "%%%%CreationDate: %s\n", wxNow() ); + PsPrint( buffer ); + + if (m_printData.GetOrientation() == wxLANDSCAPE) + PsPrint( "%%Orientation: Landscape\n" ); + else + PsPrint( "%%Orientation: Portrait\n" ); + + const wxChar *paper; + switch (m_printData.GetPaperId()) + { + case wxPAPER_LETTER: paper = wxT("Letter"); break; // Letter: paper ""; 8 1/2 by 11 inches + case wxPAPER_LEGAL: paper = wxT("Legal"); break; // Legal, 8 1/2 by 14 inches + case wxPAPER_A4: paper = wxT("A4"); break; // A4 Sheet, 210 by 297 millimeters + case wxPAPER_TABLOID: paper = wxT("Tabloid"); break; // Tabloid, 11 by 17 inches + case wxPAPER_LEDGER: paper = wxT("Ledger"); break; // Ledger, 17 by 11 inches + case wxPAPER_STATEMENT: paper = wxT("Statement"); break; // Statement, 5 1/2 by 8 1/2 inches + case wxPAPER_EXECUTIVE: paper = wxT("Executive"); break; // Executive, 7 1/4 by 10 1/2 inches + case wxPAPER_A3: paper = wxT("A3"); break; // A3 sheet, 297 by 420 millimeters + case wxPAPER_A5: paper = wxT("A5"); break; // A5 sheet, 148 by 210 millimeters + case wxPAPER_B4: paper = wxT("B4"); break; // B4 sheet, 250 by 354 millimeters + case wxPAPER_B5: paper = wxT("B5"); break; // B5 sheet, 182-by-257-millimeter paper + case wxPAPER_FOLIO: paper = wxT("Folio"); break; // Folio, 8-1/2-by-13-inch paper + case wxPAPER_QUARTO: paper = wxT("Quaro"); break; // Quarto, 215-by-275-millimeter paper + case wxPAPER_10X14: paper = wxT("10x14"); break; // 10-by-14-inch sheet + default: paper = wxT("A4"); + } + + buffer.Printf( "%%%%DocumentPaperSizes: %s\n", paper ); + PsPrint( buffer ); + + PsPrint( "%%EndComments\n\n" ); + + PsPrint( "%%BeginProlog\n" ); + PsPrint( wxPostScriptHeaderConicTo ); + PsPrint( wxPostScriptHeaderEllipse ); + PsPrint( wxPostScriptHeaderEllipticArc ); + PsPrint( wxPostScriptHeaderColourImage ); + PsPrint( wxPostScriptHeaderReencodeISO1 ); + PsPrint( wxPostScriptHeaderReencodeISO2 ); + if (wxPostScriptHeaderSpline) + PsPrint( wxPostScriptHeaderSpline ); + PsPrint( "%%EndProlog\n" ); + + SetBrush( *wxBLACK_BRUSH ); + SetPen( *wxBLACK_PEN ); + SetBackground( *wxWHITE_BRUSH ); + SetTextForeground( *wxBLACK ); + + // set origin according to paper size + SetDeviceOrigin( 0,0 ); + + m_pageNumber = 1; + return true; +} + +void wxPostScriptDCImpl::EndDoc () +{ + wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); + + if (m_clipping) + { + m_clipping = false; + PsPrint( "grestore\n" ); + } + + if ( m_pstream ) { + fclose( m_pstream ); + m_pstream = NULL; + } + +#if 0 + // THE FOLLOWING HAS BEEN CONTRIBUTED BY Andy Fyfe + wxCoord wx_printer_translate_x, wx_printer_translate_y; + double wx_printer_scale_x, wx_printer_scale_y; + + wx_printer_translate_x = (wxCoord)m_printData.GetPrinterTranslateX(); + wx_printer_translate_y = (wxCoord)m_printData.GetPrinterTranslateY(); + + wx_printer_scale_x = m_printData.GetPrinterScaleX(); + wx_printer_scale_y = m_printData.GetPrinterScaleY(); + + // Compute the bounding box. Note that it is in the default user + // coordinate system, thus we have to convert the values. + wxCoord minX = (wxCoord) XLOG2DEV(m_minX); + wxCoord minY = (wxCoord) YLOG2DEV(m_minY); + wxCoord maxX = (wxCoord) XLOG2DEV(m_maxX); + wxCoord maxY = (wxCoord) YLOG2DEV(m_maxY); + + // LOG2DEV may have changed the minimum to maximum vice versa + if ( minX > maxX ) { wxCoord tmp = minX; minX = maxX; maxX = tmp; } + if ( minY > maxY ) { wxCoord tmp = minY; minY = maxY; maxY = tmp; } + + // account for used scaling (boundingbox is before scaling in ps-file) + double scale_x = m_printData.GetPrinterScaleX() / ms_PSScaleFactor; + double scale_y = m_printData.GetPrinterScaleY() / ms_PSScaleFactor; + + wxCoord llx, lly, urx, ury; + llx = (wxCoord) ((minX+wx_printer_translate_x)*scale_x); + lly = (wxCoord) ((minY+wx_printer_translate_y)*scale_y); + urx = (wxCoord) ((maxX+wx_printer_translate_x)*scale_x); + ury = (wxCoord) ((maxY+wx_printer_translate_y)*scale_y); + // (end of bounding box computation) + + + // If we're landscape, our sense of "x" and "y" is reversed. + if (m_printData.GetOrientation() == wxLANDSCAPE) + { + wxCoord tmp; + tmp = llx; llx = lly; lly = tmp; + tmp = urx; urx = ury; ury = tmp; + + // We need either the two lines that follow, or we need to subtract + // min_x from real_translate_y, which is commented out below. + llx = llx - (wxCoord)(m_minX*wx_printer_scale_y); + urx = urx - (wxCoord)(m_minX*wx_printer_scale_y); + } + + // The Adobe specifications call for integers; we round as to make + // the bounding larger. + PsPrintf( wxT("%%%%BoundingBox: %d %d %d %d\n"), + (wxCoord)floor((double)llx), (wxCoord)floor((double)lly), + (wxCoord)ceil((double)urx), (wxCoord)ceil((double)ury) ); + + // To check the correctness of the bounding box, postscript commands + // to draw a box corresponding to the bounding box are generated below. + // But since we typically don't want to print such a box, the postscript + // commands are generated within comments. These lines appear before any + // adjustment of scale, rotation, or translation, and hence are in the + // default user coordinates. + PsPrint( "% newpath\n" ); + PsPrintf( wxT("%% %d %d moveto\n"), llx, lly ); + PsPrintf( wxT("%% %d %d lineto\n"), urx, lly ); + PsPrintf( wxT("%% %d %d lineto\n"), urx, ury ); + PsPrintf( wxT("%% %d %d lineto closepath stroke\n"), llx, ury ); +#endif + +#ifndef __WXMSW__ + wxPostScriptPrintNativeData *data = + (wxPostScriptPrintNativeData *) m_printData.GetNativeData(); + + if (m_ok && (m_printData.GetPrintMode() == wxPRINT_MODE_PRINTER)) + { + wxString command; + command += data->GetPrinterCommand(); + command += wxT(" "); + command += data->GetPrinterOptions(); + command += wxT(" "); + command += m_printData.GetFilename(); + + wxExecute( command, true ); + wxRemoveFile( m_printData.GetFilename() ); + } +#endif +} + +void wxPostScriptDCImpl::StartPage() +{ + wxCHECK_RET( m_ok, wxT("invalid postscript dc") ); + + wxString buffer; + buffer.Printf( wxT("%%%%Page: %d\n"), m_pageNumber++ ); + PsPrint( buffer ); + +#if 0 + wxPostScriptPrintNativeData *data = + (wxPostScriptPrintNativeData *) m_printData.GetNativeData(); + + wxCoord translate_x = (wxCoord)data->GetPrinterTranslateX(); + wxCoord translate_y = (wxCoord)data->GetPrinterTranslateY(); + + buffer.Printf( "%d %d translate\n", translate_x, translate_y ); + PsPrint( buffer ); + + double scale_x = data->GetPrinterScaleX(); + double scale_y = data->GetPrinterScaleY(); + + buffer.Printf( "%f %f scale\n", scale_x, scale_y ); + buffer.Replace( ",", "." ); + PsPrint( buffer ); + +#endif + + // Each page starts with an "initgraphics" which resets the + // transformation and so we need to rotate the page for + // landscape printing) + + // I copied this one from a PostScript tutorial, but to no avail. RR. + // PsPrint( "90 rotate llx neg ury nef translate\n" ); + + if (m_printData.GetOrientation() == wxLANDSCAPE) + PsPrint( "90 rotate\n" ); +} + +void wxPostScriptDCImpl::EndPage () +{ + wxCHECK_RET( m_ok , wxT("invalid postscript dc") ); + + PsPrint( "showpage\n" ); +} + +bool wxPostScriptDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, + wxCoord fwidth, wxCoord fheight, + wxDC *source, + wxCoord xsrc, wxCoord ysrc, + wxRasterOperationMode rop, + bool WXUNUSED(useMask), wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask) ) +{ + wxCHECK_MSG( m_ok, false, wxT("invalid postscript dc") ); + + wxCHECK_MSG( source, false, wxT("invalid source dc") ); + + // blit into a bitmap + wxBitmap bitmap( (int)fwidth, (int)fheight ); + wxMemoryDC memDC; + memDC.SelectObject(bitmap); + memDC.Blit(0, 0, fwidth, fheight, source, xsrc, ysrc, rop); /* TODO: Blit transparently? */ + memDC.SelectObject(wxNullBitmap); + + //draw bitmap. scaling and positioning is done there + GetOwner()->DrawBitmap( bitmap, xdest, ydest ); + + return true; +} + +wxCoord wxPostScriptDCImpl::GetCharHeight() const +{ + if (m_font.IsOk()) + return m_font.GetPointSize(); + else + return 12; +} + +void wxPostScriptDCImpl::PsPrint( const wxString& str ) +{ + const wxCharBuffer psdata(str.utf8_str()); + + wxPostScriptPrintNativeData *data = + (wxPostScriptPrintNativeData *) m_printData.GetNativeData(); + + switch (m_printData.GetPrintMode()) + { +#if wxUSE_STREAMS + // append to output stream + case wxPRINT_MODE_STREAM: + { + wxOutputStream* outputstream = data->GetOutputStream(); + wxCHECK_RET( outputstream, wxT("invalid outputstream") ); + outputstream->Write( psdata, strlen( psdata ) ); + } + break; +#endif // wxUSE_STREAMS + + // save data into file + default: + wxCHECK_RET( m_pstream, wxT("invalid postscript dc") ); + fwrite( psdata, 1, strlen( psdata ), m_pstream ); + } +} + +void wxPostScriptDCImpl::DoGetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent, wxCoord *externalLeading, + const wxFont *theFont ) const +{ + const wxFont *fontToUse = theFont; + + if (!fontToUse) fontToUse = &m_font; + + const float fontSize = + fontToUse->GetPointSize() * GetFontPointSizeAdjustment(72.0); + + if (string.empty()) + { + if (x) (*x) = 0; + if (y) (*y) = 0; + if (descent) (*descent) = 0; + if (externalLeading) (*externalLeading) = 0; + return; + } + + // GTK 2.0 + + const wxWX2MBbuf strbuf = string.mb_str(); + + // conversion failed (non e.g. ISO characters) + if ( !strbuf ) + return; + +#if !wxUSE_AFM_FOR_POSTSCRIPT + /* Provide a VERY rough estimate (avoid using it). + * Produces accurate results for mono-spaced font + * such as Courier (aka wxMODERN) */ + + if ( x ) + *x = strlen (strbuf) * fontSize * 72.0 / 120.0; + if ( y ) + *y = (wxCoord) (fontSize * 1.32); /* allow for descender */ + if (descent) *descent = 0; + if (externalLeading) *externalLeading = 0; +#else + + /* method for calculating string widths in postscript: + / read in the AFM (adobe font metrics) file for the + / actual font, parse it and extract the character widths + / and also the descender. this may be improved, but for now + / it works well. the AFM file is only read in if the + / font is changed. this may be chached in the future. + / calls to GetTextExtent with the font unchanged are rather + / efficient!!! + / + / for each font and style used there is an AFM file necessary. + / currently i have only files for the roman font family. + / I try to get files for the other ones! + / + / CAVE: the size of the string is currently always calculated + / in 'points' (1/72 of an inch). this should later on be + / changed to depend on the mapping mode. + / CAVE: the path to the AFM files must be set before calling this + / fun3B3Bction. this is usually done by a call like the following: + / wxSetAFMPath("d:\\wxw161\\afm\\"); + / + / example: + / + / wxPostScriptDC dc(NULL, true); + / if (dc.IsOk()){ + / wxSetAFMPath("d:\\wxw161\\afm\\"); + / dc.StartDoc("Test"); + / dc.StartPage(); + / wxCoord w,h; + / dc.SetFont(new wxFont(10, wxROMAN, wxNORMAL, wxNORMAL)); + / dc.GetTextExtent("Hallo",&w,&h); + / dc.EndPage(); + / dc.EndDoc(); + / } + / + / by steve (stefan.hammes@urz.uni-heidelberg.de) + / created: 10.09.94 + / updated: 14.05.95 */ + + /* these static vars are for storing the state between calls */ + static int lastFamily= INT_MIN; + static int lastSize= INT_MIN; + static int lastStyle= INT_MIN; + static int lastWeight= INT_MIN; + static int lastDescender = INT_MIN; + static int lastWidths[256]; /* widths of the characters */ + + double UnderlinePosition = 0.0; + double UnderlineThickness = 0.0; + + // Get actual parameters + int Family = fontToUse->GetFamily(); + int Size = fontToUse->GetPointSize(); + int Style = fontToUse->GetStyle(); + int Weight = fontToUse->GetWeight(); + + // If we have another font, read the font-metrics + if (Family!=lastFamily || Size!=lastSize || Style!=lastStyle || Weight!=lastWeight) + { + // Store actual values + lastFamily = Family; + lastSize = Size; + lastStyle = Style; + lastWeight = Weight; + + const wxChar *name; + + switch (Family) + { + case wxMODERN: + case wxTELETYPE: + { + if ((Style == wxITALIC) && (Weight == wxBOLD)) name = wxT("CourBoO.afm"); + else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = wxT("CourBo.afm"); + else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = wxT("CourO.afm"); + else name = wxT("Cour.afm"); + break; + } + case wxROMAN: + { + if ((Style == wxITALIC) && (Weight == wxBOLD)) name = wxT("TimesBoO.afm"); + else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = wxT("TimesBo.afm"); + else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = wxT("TimesO.afm"); + else name = wxT("TimesRo.afm"); + break; + } + case wxSCRIPT: + { + name = wxT("Zapf.afm"); + break; + } + case wxSWISS: + default: + { + if ((Style == wxITALIC) && (Weight == wxBOLD)) name = wxT("HelvBoO.afm"); + else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = wxT("HelvBo.afm"); + else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = wxT("HelvO.afm"); + else name = wxT("Helv.afm"); + break; + } + } + + FILE *afmFile = NULL; + + // Get the directory of the AFM files + wxString afmName; + + // VZ: I don't know if the cast always works under Unix but it clearly + // never does under Windows where the pointer is + // wxWindowsPrintNativeData and so calling GetFontMetricPath() on + // it just crashes +#ifndef __WIN32__ + wxPostScriptPrintNativeData *data = + wxDynamicCast(m_printData.GetNativeData(), wxPostScriptPrintNativeData); + + if (data && !data->GetFontMetricPath().empty()) + { + afmName = data->GetFontMetricPath(); + afmName << wxFILE_SEP_PATH << name; + } +#endif // __WIN32__ + + if ( !afmName.empty() ) + afmFile = wxFopen(afmName, wxT("r")); + + if ( !afmFile ) + { +#if defined(__UNIX__) && !defined(__VMS__) + afmName = wxGetDataDir(); +#else // !__UNIX__ + afmName = wxStandardPaths::Get().GetDataDir(); +#endif // __UNIX__/!__UNIX__ + + afmName << wxFILE_SEP_PATH +#if defined(__LINUX__) || defined(__FREEBSD__) + << wxT("gs_afm") << wxFILE_SEP_PATH +#else + << wxT("afm") << wxFILE_SEP_PATH +#endif + << name; + afmFile = wxFopen(afmName,wxT("r")); + } + + /* 2. open and process the file + / a short explanation of the AFM format: + / we have for each character a line, which gives its size + / e.g.: + / + / C 63 ; WX 444 ; N question ; B 49 -14 395 676 ; + / + / that means, we have a character with ascii code 63, and width + / (444/1000 * fontSize) points. + / the other data is ignored for now! + / + / when the font has changed, we read in the right AFM file and store the + / character widths in an array, which is processed below (see point 3.). */ + if (afmFile==NULL) + { + wxLogDebug( wxT("GetTextExtent: can't open AFM file '%s'"), afmName.c_str() ); + wxLogDebug( wxT(" using approximate values")); + for (int i=0; i<256; i++) lastWidths[i] = 500; /* an approximate value */ + lastDescender = -150; /* dito. */ + } + else + { + /* init the widths array */ + for(int i=0; i<256; i++) lastWidths[i] = INT_MIN; + /* some variables for holding parts of a line */ + char cString[10], semiString[10], WXString[10]; + char descString[20]; + char upString[30], utString[30]; + char encString[50]; + char line[256]; + int ascii,cWidth; + /* read in the file and parse it */ + while(fgets(line,sizeof(line),afmFile)!=NULL) + { + /* A.) check for descender definition */ + if (strncmp(line,"Descender",9)==0) + { + if ((sscanf(line,"%s%d",descString,&lastDescender)!=2) || + (strcmp(descString,"Descender")!=0)) + { + wxLogDebug( wxT("AFM-file '%s': line '%s' has error (bad descender)"), afmName.c_str(),line ); + } + } + /* JC 1.) check for UnderlinePosition */ + else if(strncmp(line,"UnderlinePosition",17)==0) + { + if ((sscanf(line,"%s%lf",upString,&UnderlinePosition)!=2) || + (strcmp(upString,"UnderlinePosition")!=0)) + { + wxLogDebug( wxT("AFM-file '%s': line '%s' has error (bad UnderlinePosition)"), afmName.c_str(), line ); + } + } + /* JC 2.) check for UnderlineThickness */ + else if(strncmp(line,"UnderlineThickness",18)==0) + { + if ((sscanf(line,"%s%lf",utString,&UnderlineThickness)!=2) || + (strcmp(utString,"UnderlineThickness")!=0)) + { + wxLogDebug( wxT("AFM-file '%s': line '%s' has error (bad UnderlineThickness)"), afmName.c_str(), line ); + } + } + /* JC 3.) check for EncodingScheme */ + else if(strncmp(line,"EncodingScheme",14)==0) + { + if ((sscanf(line,"%s%s",utString,encString)!=2) || + (strcmp(utString,"EncodingScheme")!=0)) + { + wxLogDebug( wxT("AFM-file '%s': line '%s' has error (bad EncodingScheme)"), afmName.c_str(), line ); + } + else if (strncmp(encString, "AdobeStandardEncoding", 21)) + { + wxLogDebug( wxT("AFM-file '%s': line '%s' has error (unsupported EncodingScheme %s)"), + afmName.c_str(),line, encString); + } + } + /* B.) check for char-width */ + else if(strncmp(line,"C ",2)==0) + { + if (sscanf(line,"%s%d%s%s%d",cString,&ascii,semiString,WXString,&cWidth)!=5) + { + wxLogDebug(wxT("AFM-file '%s': line '%s' has an error (bad character width)"),afmName.c_str(),line); + } + if(strcmp(cString,"C")!=0 || strcmp(semiString,";")!=0 || strcmp(WXString,"WX")!=0) + { + wxLogDebug(wxT("AFM-file '%s': line '%s' has a format error"),afmName.c_str(),line); + } + /* printf(" char '%c'=%d has width '%d'\n",ascii,ascii,cWidth); */ + if (ascii>=0 && ascii<256) + { + lastWidths[ascii] = cWidth; /* store width */ + } + else + { + /* MATTHEW: this happens a lot; don't print an error */ + /* wxLogDebug("AFM-file '%s': ASCII value %d out of range",afmName.c_str(),ascii); */ + } + } + /* C.) ignore other entries. */ + } + fclose(afmFile); + } + /* hack to compute correct values for german 'Umlaute' + / the correct way would be to map the character names + / like 'adieresis' to corresp. positions of ISOEnc and read + / these values from AFM files, too. Maybe later ... */ + + // NB: casts to int are needed to suppress gcc 3.3 warnings + lastWidths[196] = lastWidths[(int)'A']; // U+00C4 A Umlaute + lastWidths[228] = lastWidths[(int)'a']; // U+00E4 a Umlaute + lastWidths[214] = lastWidths[(int)'O']; // U+00D6 O Umlaute + lastWidths[246] = lastWidths[(int)'o']; // U+00F6 o Umlaute + lastWidths[220] = lastWidths[(int)'U']; // U+00DC U Umlaute + lastWidths[252] = lastWidths[(int)'u']; // U+00FC u Umlaute + lastWidths[223] = lastWidths[(int)251]; // U+00DF eszett (scharfes s) + + /* JC: calculate UnderlineThickness/UnderlinePosition */ + + // VS: dirty, but is there any better solution? + double *pt; + pt = (double*) &m_underlinePosition; + *pt = YLOG2DEVREL((wxCoord)(UnderlinePosition * fontSize)) / 1000.0f; + pt = (double*) &m_underlineThickness; + *pt = YLOG2DEVREL((wxCoord)(UnderlineThickness * fontSize)) / 1000.0f; + + } + + + /* 3. now the font metrics are read in, calc size this + / is done by adding the widths of the characters in the + / string. they are given in 1/1000 of the size! */ + + long sum=0; + float height=fontSize; /* by default */ + unsigned char *p=(unsigned char *)wxMBSTRINGCAST strbuf; + if(!p) + { + // String couldn't be converted which used to SEGV as reported here: + // http://bugs.debian.org/702378 + // http://trac.wxwidgets.org/ticket/15300 + // Upstream suggests "just return if the conversion failed". + if (x) (*x) = 0; + if (y) (*y) = 0; + if (descent) (*descent) = 0; + if (externalLeading) (*externalLeading) = 0; + return; + } + for(; *p; p++) + { + if(lastWidths[*p]== INT_MIN) + { + wxLogDebug(wxT("GetTextExtent: undefined width for character '%c' (%d)"), *p,*p); + sum += lastWidths[(unsigned char)' ']; /* assume space */ + } + else + { + sum += lastWidths[*p]; + } + } + + double widthSum = sum; + widthSum *= fontSize; + widthSum /= 1000.0F; + + /* add descender to height (it is usually a negative value) */ + //if (lastDescender != INT_MIN) + //{ + // height += (wxCoord)(((-lastDescender)/1000.0F) * Size); /* MATTHEW: forgot scale */ + //} + // - commented by V. Slavik - height already contains descender in it + // (judging from few experiments) + + /* return size values */ + if ( x ) + *x = (wxCoord)widthSum; + if ( y ) + *y = (wxCoord)height; + + /* return other parameters */ + if (descent) + { + if(lastDescender!=INT_MIN) + { + *descent = (wxCoord)(((-lastDescender)/1000.0F) * fontSize); /* MATTHEW: forgot scale */ + } + else + { + *descent = 0; + } + } + + /* currently no idea how to calculate this! */ + if (externalLeading) *externalLeading = 0; +#endif + // Use AFM +} + + +#endif // wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT + +// vi:sts=4:sw=4:et diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/descrip.mms b/3rdparty/wxwidgets3.0-3.0.1/src/generic/descrip.mms new file mode 100644 index 0000000000..0c61de6fd8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/descrip.mms @@ -0,0 +1,313 @@ +#***************************************************************************** +# * +# Make file for VMS * +# Author : J.Jansen (joukj@hrem.nano.tudelft.nl) * +# Date : 21 January 2013 * +# * +#***************************************************************************** +.first + define wx [--.include.wx] + +.ifdef __WXMOTIF__ +CXX_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)\ + /assume=(nostdnew,noglobal_array_new) +CC_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short) +.else +.ifdef __WXGTK__ +CXX_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm\ + /assume=(nostdnew,noglobal_array_new) +CC_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm +.else +.ifdef __WXX11__ +CXX_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\ + /name=(as_is,short)/assume=(nostdnew,noglobal_array_new) +CC_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\ + /name=(as_is,short) +.else +.ifdef __WXGTK2__ +CXX_DEFINE = /define=(__WXGTK__=1,VMS_GTK2==1)/float=ieee\ + /name=(as_is,short)/assume=(nostdnew,noglobal_array_new) +CC_DEFINE = /define=(__WX_GTK__=1,VMS_GTK2==1)/float=ieee\ + /name=(as_is,short) +.else +CXX_DEFINE = +CC_DEFINE = +.endif +.endif +.endif +.endif + +.suffixes : .cpp + +.cpp.obj : + cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp +.c.obj : + cc $(CFLAGS)$(CC_DEFINE) $(MMS$TARGET_NAME).c + +OBJECTS = \ + aboutdlgg.obj,\ + busyinfo.obj,\ + calctrlg.obj,\ + caret.obj,\ + choicbkg.obj,\ + choicdgg.obj,\ + datectlg.obj,\ + dcpsg.obj,\ + dirctrlg.obj,\ + dirdlgg.obj,\ + fdrepdlg.obj,\ + fontdlgg.obj,\ + grid.obj,\ + gridctrl.obj,\ + gridsel.obj,\ + helpext.obj,\ + htmllbox.obj,\ + imaglist.obj,\ + laywin.obj,\ + listbkg.obj,\ + listctrl.obj,\ + logg.obj,\ + msgdlgg.obj,\ + numdlgg.obj,\ + odcombo.obj,\ + printps.obj,\ + prntdlgg.obj,\ + propdlg.obj,\ + progdlgg.obj,\ + renderg.obj,\ + sashwin.obj,\ + scrlwing.obj,\ + selstore.obj,\ + splitter.obj,\ + tabg.obj,\ + textdlgg.obj,\ + tipdlg.obj,\ + tipwin.obj,\ + toolbkg.obj,\ + treebkg.obj,\ + treectlg.obj,\ + wizard.obj,\ + hyperlinkg.obj,\ + filepickerg.obj,\ + bmpcboxg.obj,\ + filectrlg.obj,srchctlg.obj,notifmsgg.obj,headerctrlg.obj,\ + grideditors.obj,vlbox.obj,vscroll.obj,stattextg.obj,\ + editlbox.obj,datavgen.obj,dbgrptg.obj,dragimgg.obj,\ + richmsgdlgg.obj,commandlinkbuttong.obj,spinctlg.obj,\ + markuptext.obj,bannerwindow.obj,timectrlg.obj,richtooltipg.obj\ + ,statbmpg.obj,splash.obj + +SOURCES = \ + aboutdlgg.cpp,\ + accel.cpp,\ + animateg.cpp,\ + busyinfo.cpp,\ + calctrlg.cpp,\ + caret.cpp,\ + choicbkg.cpp,\ + choicdgg.cpp,\ + collpaneg.cpp,\ + colrdlgg.cpp,\ + clrpickerg.cpp,\ + datectlg.cpp,\ + dcpsg.cpp,\ + dirctrlg.cpp,\ + dirdlgg.cpp,\ + filedlgg.cpp,\ + fdrepdlg.cpp,\ + fontdlgg.cpp,\ + fontpickerg.cpp,\ + grid.cpp,\ + gridctrl.cpp,\ + gridsel.cpp,\ + helpext.cpp,\ + htmllbox.cpp,\ + imaglist.cpp,\ + laywin.cpp,\ + listbkg.cpp,\ + listctrl.cpp,\ + logg.cpp,\ + msgdlgg.cpp,\ + notebook.cpp,\ + numdlgg.cpp,\ + odcombo.cpp,\ + paletteg.cpp,\ + printps.cpp,\ + prntdlgg.cpp,\ + propdlg.cpp,\ + progdlgg.cpp,\ + renderg.cpp,\ + sashwin.cpp,\ + selstore.cpp,\ + splitter.cpp,\ + statline.cpp,\ + statusbr.cpp,\ + tabg.cpp,\ + textdlgg.cpp,\ + tipdlg.cpp,\ + tipwin.cpp,\ + toolbkg.cpp,\ + treebkg.cpp,\ + treectlg.cpp,\ + wizard.cpp,\ + dragimgg.cpp,\ + fdrepdlg.cpp,\ + htmllbox.cpp,\ + listbkg.cpp,\ + mdig.cpp,\ + scrlwing.cpp,\ + spinctlg.cpp,\ + splash.cpp,\ + timer.cpp,\ + vlbox.cpp,\ + hyperlinkg.cpp,\ + filepickerg.cpp,\ + vscroll.cpp,\ + icon.cpp,bmpcboxg.cpp,filectrlg.cpp,srchctlg.cpp,notifmsgg.cpp\ + ,headerctrlg.cpp,grideditors.cpp,stattextg.cpp,editlbox.cpp,\ + datavgen.cpp,dbgrptg.cpp,dragimgg.cpp,richmsgdlgg.cpp,\ + commandlinkbuttong.cpp,spinctlg.cpp markuptext.cpp \ + bannerwindow.cpp timectrlg.cpp richtooltipg.cpp statbmpg.cpp \ + textmeasure.cpp + +.ifdef __WXMOTIF__ +OBJECTS0=statusbr.obj,statline.obj,notebook.obj,spinctlg.obj,collpaneg.obj,\ + combog.obj,animateg.obj,colrdlgg.obj,clrpickerg.obj,fontpickerg.obj,\ + mdig.obj,infobar.obj,textmeasure.obj +.else +.ifdef __WXX11__ +OBJECTS0=accel.obj,filedlgg.obj,dragimgg.obj,fdrepdlg.obj,htmllbox.obj,\ + listbkg.obj,mdig.obj,spinctlg.obj,timer.obj,\ + combog.obj,icon.obj,collpaneg.obj,animateg.obj,\ + colrdlgg.obj,clrpickerg.obj,fontpickerg.obj,infobar.obj,textmeasure.obj +.else +.ifdef __WXGTK__ +OBJECTS0=accel.obj,statusbr.obj,filedlgg.obj,paletteg.obj,\ + combog.obj,icon.obj,collpaneg.obj,animateg.obj,\ + colrdlgg.obj,clrpickerg.obj,fontpickerg.obj,infobar.obj,textmeasure.obj +.else +OBJECTS0=accel.obj,statusbr.obj,filedlgg.obj,paletteg.obj,\ + combog.obj,icon.obj +.endif +.endif +.endif + +all : $(SOURCES) + $(MMS)$(MMSQUALIFIERS) $(OBJECTS) + $(MMS)$(MMSQUALIFIERS) $(OBJECTS0) +.ifdef __WXMOTIF__ + library/crea [--.lib]libwx_motif.olb $(OBJECTS) + library [--.lib]libwx_motif.olb $(OBJECTS0) +.else +.ifdef __WXGTK__ + library/crea [--.lib]libwx_gtk.olb $(OBJECTS) + library [--.lib]libwx_gtk.olb $(OBJECTS0) +.else +.ifdef __WXGTK2__ + library/crea [--.lib]libwx_gtk2.olb $(OBJECTS) + library [--.lib]libwx_gtk2.olb $(OBJECTS0) +.else +.ifdef __WXX11__ + library/crea [--.lib]libwx_x11_univ.olb $(OBJECTS) + library [--.lib]libwx_x11_univ.olb $(OBJECTS0) +.endif +.endif +.endif +.endif + +$(OBJECTS) : [--.include.wx]setup.h +$(OBJECTS0) : [--.include.wx]setup.h + +aboutdlgg.obj : aboutdlgg.cpp +accel.obj : accel.cpp +animateg.obj : animateg.cpp +busyinfo.obj : busyinfo.cpp +calctrlg.obj : calctrlg.cpp +caret.obj : caret.cpp +choicdgg.obj : choicdgg.cpp +clrpickerg.obj : clrpickerg.cpp +collpaneg.obj : collpaneg.cpp +colrdlgg.obj : colrdlgg.cpp +datectlg.obj : datectlg.cpp +dcpsg.obj : dcpsg.cpp +dirctrlg.obj : dirctrlg.cpp +dirdlgg.obj : dirdlgg.cpp +filedlgg.obj : filedlgg.cpp +fontdlgg.obj : fontdlgg.cpp +fdrepdlg.obj : fdrepdlg.cpp +grid.obj : grid.cpp +gridctrl.obj : gridctrl.cpp +gridsel.obj : gridsel.cpp +helpext.obj : helpext.cpp +htmllbox.obj : htmllbox.cpp +icon.obj : icon.cpp +imaglist.obj : imaglist.cpp +laywin.obj : laywin.cpp +listctrl.obj : listctrl.cpp + cxx $(CXXFLAGS)$(CXX_DEFINE)/warn=disable=(INTTRUNCATED) listctrl.cpp +logg.obj : logg.cpp +msgdlgg.obj : msgdlgg.cpp +notebook.obj : notebook.cpp +numdlgg.obj : numdlgg.cpp +odcombo.obj : odcombo.cpp +paletteg.obj : paletteg.cpp +printps.obj : printps.cpp +prntdlgg.obj : prntdlgg.cpp +progdlgg.obj : progdlgg.cpp +propdlg.obj : propdlg.cpp +scrlwing.obj : scrlwing.cpp +spinctlg.obj : spinctlg.cpp +renderg.obj : renderg.cpp +sashwin.obj : sashwin.cpp +selstore.obj : selstore.cpp +splitter.obj : splitter.cpp +statline.obj : statline.cpp +statusbr.obj : statusbr.cpp +tabg.obj : tabg.cpp +textdlgg.obj : textdlgg.cpp +tipdlg.obj : tipdlg.cpp +tipwin.obj : tipwin.cpp +treectlg.obj : treectlg.cpp +wizard.obj : wizard.cpp +dragimgg.obj : dragimgg.cpp +fdrepdlg.obj : fdrepdlg.cpp +htmllbox.obj : htmllbox.cpp +listbkg.obj : listbkg.cpp +mdig.obj : mdig.cpp +scrlwing.obj : scrlwing.cpp +spinctlg.obj : spinctlg.cpp +splash.obj : splash.cpp +timer.obj : timer.cpp +vlbox.obj : vlbox.cpp +vscroll.obj : vscroll.cpp + cxx $(CXXFLAGS)$(CXX_DEFINE)/nowarn vscroll.cpp +listbkg.obj : listbkg.cpp +choicbkg.obj : choicbkg.cpp +toolbkg.obj : toolbkg.cpp +treebkg.obj : treebkg.cpp +combog.obj : combog.cpp +fontpickerg.obj : fontpickerg.cpp +hyperlinkg.obj : hyperlinkg.cpp +filepickerg.obj : filepickerg.cpp +bmpcboxg.obj : bmpcboxg.cpp +filectrlg.obj : filectrlg.cpp +srchctlg.obj : srchctlg.cpp +notifmsgg.obj : notifmsgg.cpp +stattextg.obj : stattextg.cpp +headerctrlg.obj : headerctrlg.cpp +grideditors.obj : grideditors.cpp +infobar.obj : infobar.cpp +datavgen.obj : datavgen.cpp + cxx $(CXXFLAGS)$(CXX_DEFINE)/warn=disable=(UNSCOMZER) datavgen.cpp +dbgrptg.obj : dbgrptg.cpp +dragimgg.obj : dragimgg.cpp +richmsgdlgg.obj : richmsgdlgg.cpp +commandlinkbuttong.obj : commandlinkbuttong.cpp +spinctlg.obj : spinctlg.cpp +markuptext.obj : markuptext.cpp +bannerwindow.obj : bannerwindow.cpp +timectrlg.obj : timectrlg.cpp +richtooltipg.obj : richtooltipg.cpp +statbmpg.obj : statbmpg.cpp +textmeasure.obj : textmeasure.cpp +editlbox.obj : editlbox.cpp diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/dirctrlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/dirctrlg.cpp new file mode 100644 index 0000000000..06635ed405 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/dirctrlg.cpp @@ -0,0 +1,1815 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/dirctrlg.cpp +// Purpose: wxGenericDirCtrl +// Author: Harm van der Heijden, Robert Roebling, Julian Smart +// Modified by: +// Created: 12/12/98 +// Copyright: (c) Harm van der Heijden, Robert Roebling and Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_DIRDLG || wxUSE_FILEDLG + +#include "wx/generic/dirctrlg.h" + +#ifndef WX_PRECOMP + #include "wx/hash.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/button.h" + #include "wx/icon.h" + #include "wx/settings.h" + #include "wx/msgdlg.h" + #include "wx/choice.h" + #include "wx/textctrl.h" + #include "wx/layout.h" + #include "wx/sizer.h" + #include "wx/textdlg.h" + #include "wx/gdicmn.h" + #include "wx/image.h" + #include "wx/module.h" +#endif + +#include "wx/filename.h" +#include "wx/filefn.h" +#include "wx/imaglist.h" +#include "wx/tokenzr.h" +#include "wx/dir.h" +#include "wx/artprov.h" +#include "wx/mimetype.h" + +#if wxUSE_STATLINE + #include "wx/statline.h" +#endif + +#if defined(__WXMAC__) + #include "wx/osx/private.h" // includes mac headers +#endif + +#ifdef __WINDOWS__ +#include +#include "wx/msw/winundef.h" +#include "wx/volume.h" + +// MinGW has _getdrive() and _chdrive(), Cygwin doesn't. +#if defined(__GNUWIN32__) && !defined(__CYGWIN__) + #define wxHAS_DRIVE_FUNCTIONS +#endif + +#ifdef wxHAS_DRIVE_FUNCTIONS + #include +#endif + +#endif // __WINDOWS__ + +#if defined(__OS2__) || defined(__DOS__) + #ifdef __OS2__ + #define INCL_BASE + #include + #ifndef __EMX__ + #include + #endif + #include + #include + #endif +#endif // __OS2__ + +#if defined(__WXMAC__) +// #include "MoreFilesX.h" +#endif + +#ifdef __BORLANDC__ + #include "dos.h" +#endif + +extern WXDLLEXPORT_DATA(const char) wxFileSelectorDefaultWildcardStr[]; + +// If compiled under Windows, this macro can cause problems +#ifdef GetFirstChild +#undef GetFirstChild +#endif + +bool wxIsDriveAvailable(const wxString& dirName); + +// ---------------------------------------------------------------------------- +// events +// ---------------------------------------------------------------------------- + +wxDEFINE_EVENT( wxEVT_DIRCTRL_SELECTIONCHANGED, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_DIRCTRL_FILEACTIVATED, wxTreeEvent ); + +// ---------------------------------------------------------------------------- +// wxGetAvailableDrives, for WINDOWS, DOS, OS2, MAC, UNIX (returns "/") +// ---------------------------------------------------------------------------- + +size_t wxGetAvailableDrives(wxArrayString &paths, wxArrayString &names, wxArrayInt &icon_ids) +{ +#ifdef wxHAS_FILESYSTEM_VOLUMES + +#ifdef __WXWINCE__ + // No logical drives; return "\" + paths.Add(wxT("\\")); + names.Add(wxT("\\")); + icon_ids.Add(wxFileIconsTable::computer); +#elif defined(__WIN32__) && wxUSE_FSVOLUME + // TODO: this code (using wxFSVolumeBase) should be used for all platforms + // but unfortunately wxFSVolumeBase is not implemented everywhere + const wxArrayString as = wxFSVolumeBase::GetVolumes(); + + for (size_t i = 0; i < as.GetCount(); i++) + { + wxString path = as[i]; + wxFSVolume vol(path); + int imageId; + switch (vol.GetKind()) + { + case wxFS_VOL_FLOPPY: + if ( (path == wxT("a:\\")) || (path == wxT("b:\\")) ) + imageId = wxFileIconsTable::floppy; + else + imageId = wxFileIconsTable::removeable; + break; + case wxFS_VOL_DVDROM: + case wxFS_VOL_CDROM: + imageId = wxFileIconsTable::cdrom; + break; + case wxFS_VOL_NETWORK: + if (path[0] == wxT('\\')) + continue; // skip "\\computer\folder" + imageId = wxFileIconsTable::drive; + break; + case wxFS_VOL_DISK: + case wxFS_VOL_OTHER: + default: + imageId = wxFileIconsTable::drive; + break; + } + paths.Add(path); + names.Add(vol.GetDisplayName()); + icon_ids.Add(imageId); + } +#elif defined(__OS2__) + APIRET rc; + ULONG ulDriveNum = 0; + ULONG ulDriveMap = 0; + rc = ::DosQueryCurrentDisk(&ulDriveNum, &ulDriveMap); + if ( rc == 0) + { + size_t i = 0; + while (i < 26) + { + if (ulDriveMap & ( 1 << i )) + { + const wxString path = wxFileName::GetVolumeString( + 'A' + i, wxPATH_GET_SEPARATOR); + const wxString name = wxFileName::GetVolumeString( + 'A' + i, wxPATH_NO_SEPARATOR); + + // Note: If _filesys is unsupported by some compilers, + // we can always replace it by DosQueryFSAttach + char filesysname[20]; +#ifdef __WATCOMC__ + ULONG cbBuffer = sizeof(filesysname); + PFSQBUFFER2 pfsqBuffer = (PFSQBUFFER2)filesysname; + APIRET rc = ::DosQueryFSAttach(name.fn_str(),0,FSAIL_QUERYNAME,pfsqBuffer,&cbBuffer); + if (rc != NO_ERROR) + { + filesysname[0] = '\0'; + } +#else + _filesys(name.fn_str(), filesysname, sizeof(filesysname)); +#endif + /* FAT, LAN, HPFS, CDFS, NFS */ + int imageId; + if (path == wxT("A:\\") || path == wxT("B:\\")) + imageId = wxFileIconsTable::floppy; + else if (!strcmp(filesysname, "CDFS")) + imageId = wxFileIconsTable::cdrom; + else if (!strcmp(filesysname, "LAN") || + !strcmp(filesysname, "NFS")) + imageId = wxFileIconsTable::drive; + else + imageId = wxFileIconsTable::drive; + paths.Add(path); + names.Add(name); + icon_ids.Add(imageId); + } + i ++; + } + } +#else // !__WIN32__, !__OS2__ + /* If we can switch to the drive, it exists. */ + for ( char drive = 'A'; drive <= 'Z'; drive++ ) + { + const wxString + path = wxFileName::GetVolumeString(drive, wxPATH_GET_SEPARATOR); + + if (wxIsDriveAvailable(path)) + { + paths.Add(path); + names.Add(wxFileName::GetVolumeString(drive, wxPATH_NO_SEPARATOR)); + icon_ids.Add(drive <= 2 ? wxFileIconsTable::floppy + : wxFileIconsTable::drive); + } + } +#endif // __WIN32__/!__WIN32__ + +#elif defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON + + ItemCount volumeIndex = 1; + OSErr err = noErr ; + + while( noErr == err ) + { + HFSUniStr255 volumeName ; + FSRef fsRef ; + FSVolumeInfo volumeInfo ; + err = FSGetVolumeInfo(0, volumeIndex, NULL, kFSVolInfoFlags , &volumeInfo , &volumeName, &fsRef); + if( noErr == err ) + { + wxString path = wxMacFSRefToPath( &fsRef ) ; + wxString name = wxMacHFSUniStrToString( &volumeName ) ; + + if ( (volumeInfo.flags & kFSVolFlagSoftwareLockedMask) || (volumeInfo.flags & kFSVolFlagHardwareLockedMask) ) + { + icon_ids.Add(wxFileIconsTable::cdrom); + } + else + { + icon_ids.Add(wxFileIconsTable::drive); + } + // todo other removable + + paths.Add(path); + names.Add(name); + volumeIndex++ ; + } + } + +#elif defined(__UNIX__) + paths.Add(wxT("/")); + names.Add(wxT("/")); + icon_ids.Add(wxFileIconsTable::computer); +#else + #error "Unsupported platform in wxGenericDirCtrl!" +#endif + wxASSERT_MSG( (paths.GetCount() == names.GetCount()), wxT("The number of paths and their human readable names should be equal in number.")); + wxASSERT_MSG( (paths.GetCount() == icon_ids.GetCount()), wxT("Wrong number of icons for available drives.")); + return paths.GetCount(); +} + +// ---------------------------------------------------------------------------- +// wxIsDriveAvailable +// ---------------------------------------------------------------------------- + +#if defined(__DOS__) + +bool wxIsDriveAvailable(const wxString& dirName) +{ + // FIXME: this method leads to hang up under Watcom for some reason +#ifdef __WATCOMC__ + wxUnusedVar(dirName); +#else + if ( dirName.length() == 3 && dirName[1u] == wxT(':') ) + { + wxString dirNameLower(dirName.Lower()); + // VS: always return true for removable media, since Win95 doesn't + // like it when MS-DOS app accesses empty floppy drive + return (dirNameLower[0u] == wxT('a') || + dirNameLower[0u] == wxT('b') || + wxDirExists(dirNameLower)); + } + else +#endif + return true; +} + +#elif defined(__WINDOWS__) || defined(__OS2__) + +int setdrive(int WXUNUSED_IN_WINCE(drive)) +{ +#ifdef __WXWINCE__ + return 0; +#elif defined(wxHAS_DRIVE_FUNCTIONS) + return _chdrive(drive); +#else + wxChar newdrive[4]; + + if (drive < 1 || drive > 31) + return -1; + newdrive[0] = (wxChar)(wxT('A') + drive - 1); + newdrive[1] = wxT(':'); +#ifdef __OS2__ + newdrive[2] = wxT('\\'); + newdrive[3] = wxT('\0'); +#else + newdrive[2] = wxT('\0'); +#endif +#if defined(__WINDOWS__) + if (::SetCurrentDirectory(newdrive)) +#else + // VA doesn't know what LPSTR is and has its own set + if (!DosSetCurrentDir((PSZ)newdrive)) +#endif + return 0; + else + return -1; +#endif // !GNUWIN32 +} + +bool wxIsDriveAvailable(const wxString& WXUNUSED_IN_WINCE(dirName)) +{ +#ifdef __WXWINCE__ + return false; +#else +#ifdef __WIN32__ + UINT errorMode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); +#endif + bool success = true; + + // Check if this is a root directory and if so, + // whether the drive is available. + if (dirName.length() == 3 && dirName[(size_t)1] == wxT(':')) + { + wxString dirNameLower(dirName.Lower()); +#ifndef wxHAS_DRIVE_FUNCTIONS + success = wxDirExists(dirNameLower); +#else + #if defined(__OS2__) + // Avoid changing to drive since no media may be inserted. + if (dirNameLower[(size_t)0] == 'a' || dirNameLower[(size_t)0] == 'b') + return success; + #endif + int currentDrive = _getdrive(); + int thisDrive = (int) (dirNameLower[(size_t)0] - 'a' + 1) ; + int err = setdrive( thisDrive ) ; + setdrive( currentDrive ); + + if (err == -1) + { + success = false; + } +#endif + } +#ifdef __WIN32__ + (void) SetErrorMode(errorMode); +#endif + + return success; +#endif +} +#endif // __WINDOWS__ || __OS2__ + +#endif // wxUSE_DIRDLG || wxUSE_FILEDLG + + + +#if wxUSE_DIRDLG + +// Function which is called by quick sort. We want to override the default wxArrayString behaviour, +// and sort regardless of case. +static int wxCMPFUNC_CONV wxDirCtrlStringCompareFunction(const wxString& strFirst, const wxString& strSecond) +{ + return strFirst.CmpNoCase(strSecond); +} + +//----------------------------------------------------------------------------- +// wxDirItemData +//----------------------------------------------------------------------------- + +wxDirItemData::wxDirItemData(const wxString& path, const wxString& name, + bool isDir) +{ + m_path = path; + m_name = name; + /* Insert logic to detect hidden files here + * In UnixLand we just check whether the first char is a dot + * For FileNameFromPath read LastDirNameInThisPath ;-) */ + // m_isHidden = (bool)(wxFileNameFromPath(*m_path)[0] == '.'); + m_isHidden = false; + m_isExpanded = false; + m_isDir = isDir; +} + +void wxDirItemData::SetNewDirName(const wxString& path) +{ + m_path = path; + m_name = wxFileNameFromPath(path); +} + +bool wxDirItemData::HasSubDirs() const +{ + if (m_path.empty()) + return false; + + wxDir dir; + { + wxLogNull nolog; + if ( !dir.Open(m_path) ) + return false; + } + + return dir.HasSubDirs(); +} + +bool wxDirItemData::HasFiles(const wxString& WXUNUSED(spec)) const +{ + if (m_path.empty()) + return false; + + wxDir dir; + { + wxLogNull nolog; + if ( !dir.Open(m_path) ) + return false; + } + + return dir.HasFiles(); +} + +//----------------------------------------------------------------------------- +// wxGenericDirCtrl +//----------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxGenericDirCtrl, wxControl) + EVT_TREE_ITEM_EXPANDING (wxID_TREECTRL, wxGenericDirCtrl::OnExpandItem) + EVT_TREE_ITEM_COLLAPSED (wxID_TREECTRL, wxGenericDirCtrl::OnCollapseItem) + EVT_TREE_BEGIN_LABEL_EDIT (wxID_TREECTRL, wxGenericDirCtrl::OnBeginEditItem) + EVT_TREE_END_LABEL_EDIT (wxID_TREECTRL, wxGenericDirCtrl::OnEndEditItem) + EVT_TREE_SEL_CHANGED (wxID_TREECTRL, wxGenericDirCtrl::OnTreeSelChange) + EVT_TREE_ITEM_ACTIVATED (wxID_TREECTRL, wxGenericDirCtrl::OnItemActivated) + EVT_SIZE (wxGenericDirCtrl::OnSize) +END_EVENT_TABLE() + +wxGenericDirCtrl::wxGenericDirCtrl(void) +{ + Init(); +} + +void wxGenericDirCtrl::ExpandRoot() +{ + ExpandDir(m_rootId); // automatically expand first level + + // Expand and select the default path + if (!m_defaultPath.empty()) + { + ExpandPath(m_defaultPath); + } +#ifdef __UNIX__ + else + { + // On Unix, there's only one node under the (hidden) root node. It + // represents the / path, so the user would always have to expand it; + // let's do it ourselves + ExpandPath( wxT("/") ); + } +#endif +} + +bool wxGenericDirCtrl::Create(wxWindow *parent, + const wxWindowID treeid, + const wxString& dir, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& filter, + int defaultFilter, + const wxString& name) +{ + if (!wxControl::Create(parent, treeid, pos, size, style, wxDefaultValidator, name)) + return false; + + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); + + Init(); + + long treeStyle = wxTR_HAS_BUTTONS; + + // On Windows CE, if you hide the root, you get a crash when + // attempting to access data for children of the root item. +#ifndef __WXWINCE__ + treeStyle |= wxTR_HIDE_ROOT; +#endif + +#ifdef __WXGTK20__ + treeStyle |= wxTR_NO_LINES; +#endif + + if (style & wxDIRCTRL_EDIT_LABELS) + treeStyle |= wxTR_EDIT_LABELS; + + if (style & wxDIRCTRL_MULTIPLE) + treeStyle |= wxTR_MULTIPLE; + + if ((style & wxDIRCTRL_3D_INTERNAL) == 0) + treeStyle |= wxNO_BORDER; + + m_treeCtrl = CreateTreeCtrl(this, wxID_TREECTRL, + wxPoint(0,0), GetClientSize(), treeStyle); + + if (!filter.empty() && (style & wxDIRCTRL_SHOW_FILTERS)) + m_filterListCtrl = new wxDirFilterListCtrl(this, wxID_FILTERLISTCTRL); + + m_defaultPath = dir; + m_filter = filter; + + if (m_filter.empty()) + m_filter = wxFileSelectorDefaultWildcardStr; + + SetFilterIndex(defaultFilter); + + if (m_filterListCtrl) + m_filterListCtrl->FillFilterList(filter, defaultFilter); + + m_treeCtrl->SetImageList(wxTheFileIconsTable->GetSmallImageList()); + + m_showHidden = false; + wxDirItemData* rootData = new wxDirItemData(wxEmptyString, wxEmptyString, true); + + wxString rootName; + +#if defined(__WINDOWS__) || defined(__OS2__) || defined(__DOS__) + rootName = _("Computer"); +#else + rootName = _("Sections"); +#endif + + m_rootId = m_treeCtrl->AddRoot( rootName, 3, -1, rootData); + m_treeCtrl->SetItemHasChildren(m_rootId); + + ExpandRoot(); + + SetInitialSize(size); + DoResize(); + + return true; +} + +wxGenericDirCtrl::~wxGenericDirCtrl() +{ +} + +void wxGenericDirCtrl::Init() +{ + m_showHidden = false; + m_currentFilter = 0; + m_currentFilterStr = wxEmptyString; // Default: any file + m_treeCtrl = NULL; + m_filterListCtrl = NULL; +} + +wxTreeCtrl* wxGenericDirCtrl::CreateTreeCtrl(wxWindow *parent, wxWindowID treeid, const wxPoint& pos, const wxSize& size, long treeStyle) +{ + return new wxTreeCtrl(parent, treeid, pos, size, treeStyle); +} + +void wxGenericDirCtrl::ShowHidden( bool show ) +{ + if ( m_showHidden == show ) + return; + + m_showHidden = show; + + if ( HasFlag(wxDIRCTRL_MULTIPLE) ) + { + wxArrayString paths; + GetPaths(paths); + ReCreateTree(); + for ( unsigned n = 0; n < paths.size(); n++ ) + { + ExpandPath(paths[n]); + } + } + else + { + wxString path = GetPath(); + ReCreateTree(); + SetPath(path); + } +} + +const wxTreeItemId +wxGenericDirCtrl::AddSection(const wxString& path, const wxString& name, int imageId) +{ + wxDirItemData *dir_item = new wxDirItemData(path,name,true); + + wxTreeItemId treeid = AppendItem( m_rootId, name, imageId, -1, dir_item); + + m_treeCtrl->SetItemHasChildren(treeid); + + return treeid; +} + +void wxGenericDirCtrl::SetupSections() +{ + wxArrayString paths, names; + wxArrayInt icons; + + size_t n, count = wxGetAvailableDrives(paths, names, icons); + +#ifdef __WXGTK20__ + wxString home = wxGetHomeDir(); + AddSection( home, _("Home directory"), 1); + home += wxT("/Desktop"); + AddSection( home, _("Desktop"), 1); +#endif + + for (n = 0; n < count; n++) + AddSection(paths[n], names[n], icons[n]); +} + +void wxGenericDirCtrl::SetFocus() +{ + // we don't need focus ourselves, give it to the tree so that the user + // could navigate it + if (m_treeCtrl) + m_treeCtrl->SetFocus(); +} + +void wxGenericDirCtrl::OnBeginEditItem(wxTreeEvent &event) +{ + // don't rename the main entry "Sections" + if (event.GetItem() == m_rootId) + { + event.Veto(); + return; + } + + // don't rename the individual sections + if (m_treeCtrl->GetItemParent( event.GetItem() ) == m_rootId) + { + event.Veto(); + return; + } +} + +void wxGenericDirCtrl::OnEndEditItem(wxTreeEvent &event) +{ + if (event.IsEditCancelled()) + return; + + if ((event.GetLabel().empty()) || + (event.GetLabel() == wxT(".")) || + (event.GetLabel() == wxT("..")) || + (event.GetLabel().Find(wxT('/')) != wxNOT_FOUND) || + (event.GetLabel().Find(wxT('\\')) != wxNOT_FOUND) || + (event.GetLabel().Find(wxT('|')) != wxNOT_FOUND)) + { + wxMessageDialog dialog(this, _("Illegal directory name."), _("Error"), wxOK | wxICON_ERROR ); + dialog.ShowModal(); + event.Veto(); + return; + } + + wxTreeItemId treeid = event.GetItem(); + wxDirItemData *data = GetItemData( treeid ); + wxASSERT( data ); + + wxString new_name( wxPathOnly( data->m_path ) ); + new_name += wxString(wxFILE_SEP_PATH); + new_name += event.GetLabel(); + + wxLogNull log; + + if (wxFileExists(new_name)) + { + wxMessageDialog dialog(this, _("File name exists already."), _("Error"), wxOK | wxICON_ERROR ); + dialog.ShowModal(); + event.Veto(); + } + + if (wxRenameFile(data->m_path,new_name)) + { + data->SetNewDirName( new_name ); + } + else + { + wxMessageDialog dialog(this, _("Operation not permitted."), _("Error"), wxOK | wxICON_ERROR ); + dialog.ShowModal(); + event.Veto(); + } +} + +void wxGenericDirCtrl::OnTreeSelChange(wxTreeEvent &event) +{ + wxTreeEvent changedEvent(wxEVT_DIRCTRL_SELECTIONCHANGED, GetId()); + + changedEvent.SetEventObject(this); + changedEvent.SetItem(event.GetItem()); + changedEvent.SetClientObject(m_treeCtrl->GetItemData(event.GetItem())); + + if (GetEventHandler()->SafelyProcessEvent(changedEvent) && !changedEvent.IsAllowed()) + event.Veto(); + else + event.Skip(); +} + +void wxGenericDirCtrl::OnItemActivated(wxTreeEvent &event) +{ + wxTreeItemId treeid = event.GetItem(); + const wxDirItemData *data = GetItemData(treeid); + + if (data->m_isDir) + { + // is dir + event.Skip(); + } + else + { + // is file + wxTreeEvent changedEvent(wxEVT_DIRCTRL_FILEACTIVATED, GetId()); + + changedEvent.SetEventObject(this); + changedEvent.SetItem(treeid); + changedEvent.SetClientObject(m_treeCtrl->GetItemData(treeid)); + + if (GetEventHandler()->SafelyProcessEvent(changedEvent) && !changedEvent.IsAllowed()) + event.Veto(); + else + event.Skip(); + } +} + +void wxGenericDirCtrl::OnExpandItem(wxTreeEvent &event) +{ + wxTreeItemId parentId = event.GetItem(); + + // VS: this is needed because the event handler is called from wxTreeCtrl + // ctor when wxTR_HIDE_ROOT was specified + + if (!m_rootId.IsOk()) + m_rootId = m_treeCtrl->GetRootItem(); + + ExpandDir(parentId); +} + +void wxGenericDirCtrl::OnCollapseItem(wxTreeEvent &event ) +{ + CollapseDir(event.GetItem()); +} + +void wxGenericDirCtrl::CollapseDir(wxTreeItemId parentId) +{ + wxTreeItemId child; + + wxDirItemData *data = GetItemData(parentId); + if (!data->m_isExpanded) + return; + + data->m_isExpanded = false; + + m_treeCtrl->Freeze(); + if (parentId != m_treeCtrl->GetRootItem()) + m_treeCtrl->CollapseAndReset(parentId); + m_treeCtrl->DeleteChildren(parentId); + m_treeCtrl->Thaw(); +} + +void wxGenericDirCtrl::PopulateNode(wxTreeItemId parentId) +{ + wxDirItemData *data = GetItemData(parentId); + + if (data->m_isExpanded) + return; + + data->m_isExpanded = true; + + if (parentId == m_treeCtrl->GetRootItem()) + { + SetupSections(); + return; + } + + wxASSERT(data); + + wxString search,path,filename; + + wxString dirName(data->m_path); + +#if (defined(__WINDOWS__) && !defined(__WXWINCE__)) || defined(__DOS__) || defined(__OS2__) + // Check if this is a root directory and if so, + // whether the drive is available. + if (!wxIsDriveAvailable(dirName)) + { + data->m_isExpanded = false; + //wxMessageBox(wxT("Sorry, this drive is not available.")); + return; + } +#endif + + // This may take a longish time. Go to busy cursor + wxBusyCursor busy; + +#if defined(__WINDOWS__) || defined(__DOS__) || defined(__OS2__) + if (dirName.Last() == ':') + dirName += wxString(wxFILE_SEP_PATH); +#endif + + wxArrayString dirs; + wxArrayString filenames; + + wxDir d; + wxString eachFilename; + + wxLogNull log; + d.Open(dirName); + + if (d.IsOpened()) + { + int style = wxDIR_DIRS; + if (m_showHidden) style |= wxDIR_HIDDEN; + if (d.GetFirst(& eachFilename, wxEmptyString, style)) + { + do + { + if ((eachFilename != wxT(".")) && (eachFilename != wxT(".."))) + { + dirs.Add(eachFilename); + } + } + while (d.GetNext(&eachFilename)); + } + } + dirs.Sort(wxDirCtrlStringCompareFunction); + + // Now do the filenames -- but only if we're allowed to + if (!HasFlag(wxDIRCTRL_DIR_ONLY)) + { + d.Open(dirName); + + if (d.IsOpened()) + { + int style = wxDIR_FILES; + if (m_showHidden) style |= wxDIR_HIDDEN; + // Process each filter (ex: "JPEG Files (*.jpg;*.jpeg)|*.jpg;*.jpeg") + wxStringTokenizer strTok; + wxString curFilter; + strTok.SetString(m_currentFilterStr,wxT(";")); + while(strTok.HasMoreTokens()) + { + curFilter = strTok.GetNextToken(); + if (d.GetFirst(& eachFilename, curFilter, style)) + { + do + { + if ((eachFilename != wxT(".")) && (eachFilename != wxT(".."))) + { + filenames.Add(eachFilename); + } + } + while (d.GetNext(& eachFilename)); + } + } + } + filenames.Sort(wxDirCtrlStringCompareFunction); + } + + // Now we really know whether we have any children so tell the tree control + // about it. + m_treeCtrl->SetItemHasChildren(parentId, !dirs.empty() || !filenames.empty()); + + // Add the sorted dirs + size_t i; + for (i = 0; i < dirs.GetCount(); i++) + { + eachFilename = dirs[i]; + path = dirName; + if (!wxEndsWithPathSeparator(path)) + path += wxString(wxFILE_SEP_PATH); + path += eachFilename; + + wxDirItemData *dir_item = new wxDirItemData(path,eachFilename,true); + wxTreeItemId treeid = AppendItem( parentId, eachFilename, + wxFileIconsTable::folder, -1, dir_item); + m_treeCtrl->SetItemImage( treeid, wxFileIconsTable::folder_open, + wxTreeItemIcon_Expanded ); + + // assume that it does have children by default as it can take a long + // time to really check for this (think remote drives...) + // + // and if we're wrong, we'll correct the icon later if + // the user really tries to open this item + m_treeCtrl->SetItemHasChildren(treeid); + } + + // Add the sorted filenames + if (!HasFlag(wxDIRCTRL_DIR_ONLY)) + { + for (i = 0; i < filenames.GetCount(); i++) + { + eachFilename = filenames[i]; + path = dirName; + if (!wxEndsWithPathSeparator(path)) + path += wxString(wxFILE_SEP_PATH); + path += eachFilename; + //path = dirName + wxString(wxT("/")) + eachFilename; + wxDirItemData *dir_item = new wxDirItemData(path,eachFilename,false); + int image_id = wxFileIconsTable::file; + if (eachFilename.Find(wxT('.')) != wxNOT_FOUND) + image_id = wxTheFileIconsTable->GetIconID(eachFilename.AfterLast(wxT('.'))); + (void) AppendItem( parentId, eachFilename, image_id, -1, dir_item); + } + } +} + +void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId) +{ + // ExpandDir() will not actually expand the tree node, just populate it + PopulateNode(parentId); +} + +void wxGenericDirCtrl::ReCreateTree() +{ + CollapseDir(m_treeCtrl->GetRootItem()); + ExpandRoot(); +} + +void wxGenericDirCtrl::CollapseTree() +{ + wxTreeItemIdValue cookie; + wxTreeItemId child = m_treeCtrl->GetFirstChild(m_rootId, cookie); + while (child.IsOk()) + { + CollapseDir(child); + child = m_treeCtrl->GetNextChild(m_rootId, cookie); + } +} + +// Find the child that matches the first part of 'path'. +// E.g. if a child path is "/usr" and 'path' is "/usr/include" +// then the child for /usr is returned. +wxTreeItemId wxGenericDirCtrl::FindChild(wxTreeItemId parentId, const wxString& path, bool& done) +{ + wxString path2(path); + + // Make sure all separators are as per the current platform + path2.Replace(wxT("\\"), wxString(wxFILE_SEP_PATH)); + path2.Replace(wxT("/"), wxString(wxFILE_SEP_PATH)); + + // Append a separator to foil bogus substring matching + path2 += wxString(wxFILE_SEP_PATH); + + // In MSW or PM, case is not significant +#if defined(__WINDOWS__) || defined(__DOS__) || defined(__OS2__) + path2.MakeLower(); +#endif + + wxTreeItemIdValue cookie; + wxTreeItemId childId = m_treeCtrl->GetFirstChild(parentId, cookie); + while (childId.IsOk()) + { + wxDirItemData* data = GetItemData(childId); + + if (data && !data->m_path.empty()) + { + wxString childPath(data->m_path); + if (!wxEndsWithPathSeparator(childPath)) + childPath += wxString(wxFILE_SEP_PATH); + + // In MSW and PM, case is not significant +#if defined(__WINDOWS__) || defined(__DOS__) || defined(__OS2__) + childPath.MakeLower(); +#endif + + if (childPath.length() <= path2.length()) + { + wxString path3 = path2.Mid(0, childPath.length()); + if (childPath == path3) + { + if (path3.length() == path2.length()) + done = true; + else + done = false; + return childId; + } + } + } + + childId = m_treeCtrl->GetNextChild(parentId, cookie); + } + wxTreeItemId invalid; + return invalid; +} + +// Try to expand as much of the given path as possible, +// and select the given tree item. +bool wxGenericDirCtrl::ExpandPath(const wxString& path) +{ + bool done = false; + wxTreeItemId treeid = FindChild(m_rootId, path, done); + wxTreeItemId lastId = treeid; // The last non-zero treeid + while (treeid.IsOk() && !done) + { + ExpandDir(treeid); + + treeid = FindChild(treeid, path, done); + if (treeid.IsOk()) + lastId = treeid; + } + if (!lastId.IsOk()) + return false; + + wxDirItemData *data = GetItemData(lastId); + if (data->m_isDir) + { + m_treeCtrl->Expand(lastId); + } + if (HasFlag(wxDIRCTRL_SELECT_FIRST) && data->m_isDir) + { + // Find the first file in this directory + wxTreeItemIdValue cookie; + wxTreeItemId childId = m_treeCtrl->GetFirstChild(lastId, cookie); + bool selectedChild = false; + while (childId.IsOk()) + { + data = GetItemData(childId); + + if (data && data->m_path != wxEmptyString && !data->m_isDir) + { + m_treeCtrl->SelectItem(childId); + m_treeCtrl->EnsureVisible(childId); + selectedChild = true; + break; + } + childId = m_treeCtrl->GetNextChild(lastId, cookie); + } + if (!selectedChild) + { + m_treeCtrl->SelectItem(lastId); + m_treeCtrl->EnsureVisible(lastId); + } + } + else + { + m_treeCtrl->SelectItem(lastId); + m_treeCtrl->EnsureVisible(lastId); + } + + return true; +} + + +bool wxGenericDirCtrl::CollapsePath(const wxString& path) +{ + bool done = false; + wxTreeItemId treeid = FindChild(m_rootId, path, done); + wxTreeItemId lastId = treeid; // The last non-zero treeid + + while ( treeid.IsOk() && !done ) + { + CollapseDir(treeid); + + treeid = FindChild(treeid, path, done); + + if ( treeid.IsOk() ) + lastId = treeid; + } + + if ( !lastId.IsOk() ) + return false; + + m_treeCtrl->SelectItem(lastId); + m_treeCtrl->EnsureVisible(lastId); + + return true; +} + +wxDirItemData* wxGenericDirCtrl::GetItemData(wxTreeItemId itemId) +{ + return static_cast(m_treeCtrl->GetItemData(itemId)); +} + +wxString wxGenericDirCtrl::GetPath(wxTreeItemId itemId) const +{ + const wxDirItemData* + data = static_cast(m_treeCtrl->GetItemData(itemId)); + + return data->m_path; +} + +wxString wxGenericDirCtrl::GetPath() const +{ + // Allow calling GetPath() in multiple selection from OnSelFilter + if (m_treeCtrl->HasFlag(wxTR_MULTIPLE)) + { + wxArrayTreeItemIds items; + m_treeCtrl->GetSelections(items); + if (items.size() > 0) + { + // return first string only + wxTreeItemId treeid = items[0]; + return GetPath(treeid); + } + + return wxEmptyString; + } + + wxTreeItemId treeid = m_treeCtrl->GetSelection(); + if (treeid) + { + return GetPath(treeid); + } + else + return wxEmptyString; +} + +void wxGenericDirCtrl::GetPaths(wxArrayString& paths) const +{ + paths.clear(); + + wxArrayTreeItemIds items; + m_treeCtrl->GetSelections(items); + for ( unsigned n = 0; n < items.size(); n++ ) + { + wxTreeItemId treeid = items[n]; + paths.push_back(GetPath(treeid)); + } +} + +wxString wxGenericDirCtrl::GetFilePath() const +{ + wxTreeItemId treeid = m_treeCtrl->GetSelection(); + if (treeid) + { + wxDirItemData* data = (wxDirItemData*) m_treeCtrl->GetItemData(treeid); + if (data->m_isDir) + return wxEmptyString; + else + return data->m_path; + } + else + return wxEmptyString; +} + +void wxGenericDirCtrl::GetFilePaths(wxArrayString& paths) const +{ + paths.clear(); + + wxArrayTreeItemIds items; + m_treeCtrl->GetSelections(items); + for ( unsigned n = 0; n < items.size(); n++ ) + { + wxTreeItemId treeid = items[n]; + wxDirItemData* data = (wxDirItemData*) m_treeCtrl->GetItemData(treeid); + if ( !data->m_isDir ) + paths.Add(data->m_path); + } +} + +void wxGenericDirCtrl::SetPath(const wxString& path) +{ + m_defaultPath = path; + if (m_rootId) + ExpandPath(path); +} + +void wxGenericDirCtrl::SelectPath(const wxString& path, bool select) +{ + bool done = false; + wxTreeItemId treeid = FindChild(m_rootId, path, done); + wxTreeItemId lastId = treeid; // The last non-zero treeid + while ( treeid.IsOk() && !done ) + { + treeid = FindChild(treeid, path, done); + if ( treeid.IsOk() ) + lastId = treeid; + } + if ( !lastId.IsOk() ) + return; + + if ( done ) + { + m_treeCtrl->SelectItem(treeid, select); + } +} + +void wxGenericDirCtrl::SelectPaths(const wxArrayString& paths) +{ + if ( HasFlag(wxDIRCTRL_MULTIPLE) ) + { + UnselectAll(); + for ( unsigned n = 0; n < paths.size(); n++ ) + { + SelectPath(paths[n]); + } + } +} + +void wxGenericDirCtrl::UnselectAll() +{ + m_treeCtrl->UnselectAll(); +} + +// Not used +#if 0 +void wxGenericDirCtrl::FindChildFiles(wxTreeItemId treeid, int dirFlags, wxArrayString& filenames) +{ + wxDirItemData *data = (wxDirItemData *) m_treeCtrl->GetItemData(treeid); + + // This may take a longish time. Go to busy cursor + wxBusyCursor busy; + + wxASSERT(data); + + wxString search,path,filename; + + wxString dirName(data->m_path); + +#if defined(__WINDOWS__) || defined(__OS2__) + if (dirName.Last() == ':') + dirName += wxString(wxFILE_SEP_PATH); +#endif + + wxDir d; + wxString eachFilename; + + wxLogNull log; + d.Open(dirName); + + if (d.IsOpened()) + { + if (d.GetFirst(& eachFilename, m_currentFilterStr, dirFlags)) + { + do + { + if ((eachFilename != wxT(".")) && (eachFilename != wxT(".."))) + { + filenames.Add(eachFilename); + } + } + while (d.GetNext(& eachFilename)) ; + } + } +} +#endif + +void wxGenericDirCtrl::SetFilterIndex(int n) +{ + m_currentFilter = n; + + wxString f, d; + if (ExtractWildcard(m_filter, n, f, d)) + m_currentFilterStr = f; + else +#ifdef __UNIX__ + m_currentFilterStr = wxT("*"); +#else + m_currentFilterStr = wxT("*.*"); +#endif +} + +void wxGenericDirCtrl::SetFilter(const wxString& filter) +{ + m_filter = filter; + + if (!filter.empty() && !m_filterListCtrl && HasFlag(wxDIRCTRL_SHOW_FILTERS)) + m_filterListCtrl = new wxDirFilterListCtrl(this, wxID_FILTERLISTCTRL); + else if (filter.empty() && m_filterListCtrl) + { + m_filterListCtrl->Destroy(); + m_filterListCtrl = NULL; + } + + wxString f, d; + if (ExtractWildcard(m_filter, m_currentFilter, f, d)) + m_currentFilterStr = f; + else +#ifdef __UNIX__ + m_currentFilterStr = wxT("*"); +#else + m_currentFilterStr = wxT("*.*"); +#endif + // current filter index is meaningless after filter change, set it to zero + SetFilterIndex(0); + if (m_filterListCtrl) + m_filterListCtrl->FillFilterList(m_filter, 0); +} + +// Extract description and actual filter from overall filter string +bool wxGenericDirCtrl::ExtractWildcard(const wxString& filterStr, int n, wxString& filter, wxString& description) +{ + wxArrayString filters, descriptions; + int count = wxParseCommonDialogsFilter(filterStr, descriptions, filters); + if (count > 0 && n < count) + { + filter = filters[n]; + description = descriptions[n]; + return true; + } + + return false; +} + + +void wxGenericDirCtrl::DoResize() +{ + wxSize sz = GetClientSize(); + int verticalSpacing = 3; + if (m_treeCtrl) + { + wxSize filterSz ; + if (m_filterListCtrl) + { + filterSz = m_filterListCtrl->GetSize(); + sz.y -= (filterSz.y + verticalSpacing); + } + m_treeCtrl->SetSize(0, 0, sz.x, sz.y); + if (m_filterListCtrl) + { + m_filterListCtrl->SetSize(0, sz.y + verticalSpacing, sz.x, filterSz.y); + // Don't know why, but this needs refreshing after a resize (wxMSW) + m_filterListCtrl->Refresh(); + } + } +} + + +void wxGenericDirCtrl::OnSize(wxSizeEvent& WXUNUSED(event)) +{ + DoResize(); +} + +wxTreeItemId wxGenericDirCtrl::AppendItem (const wxTreeItemId & parent, + const wxString & text, + int image, int selectedImage, + wxTreeItemData * data) +{ + wxTreeCtrl *treeCtrl = GetTreeCtrl (); + + wxASSERT (treeCtrl); + + if (treeCtrl) + { + return treeCtrl->AppendItem (parent, text, image, selectedImage, data); + } + else + { + return wxTreeItemId(); + } +} + + +//----------------------------------------------------------------------------- +// wxDirFilterListCtrl +//----------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxDirFilterListCtrl, wxChoice) + +BEGIN_EVENT_TABLE(wxDirFilterListCtrl, wxChoice) + EVT_CHOICE(wxID_ANY, wxDirFilterListCtrl::OnSelFilter) +END_EVENT_TABLE() + +bool wxDirFilterListCtrl::Create(wxGenericDirCtrl* parent, + const wxWindowID treeid, + const wxPoint& pos, + const wxSize& size, + long style) +{ + m_dirCtrl = parent; + + // by default our border style is determined by the style of our parent + if ( !(style & wxBORDER_MASK) ) + { + style |= parent->HasFlag(wxDIRCTRL_3D_INTERNAL) ? wxBORDER_SUNKEN + : wxBORDER_NONE; + } + + return wxChoice::Create(parent, treeid, pos, size, 0, NULL, style); +} + +void wxDirFilterListCtrl::Init() +{ + m_dirCtrl = NULL; +} + +void wxDirFilterListCtrl::OnSelFilter(wxCommandEvent& WXUNUSED(event)) +{ + int sel = GetSelection(); + + if (m_dirCtrl->HasFlag(wxDIRCTRL_MULTIPLE)) + { + wxArrayString paths; + m_dirCtrl->GetPaths(paths); + + m_dirCtrl->SetFilterIndex(sel); + + // If the filter has changed, the view is out of date, so + // collapse the tree. + m_dirCtrl->ReCreateTree(); + + // Expand and select the previously selected paths + for (unsigned int i = 0; i < paths.GetCount(); i++) + { + m_dirCtrl->ExpandPath(paths.Item(i)); + } + } + else + { + wxString currentPath = m_dirCtrl->GetPath(); + + m_dirCtrl->SetFilterIndex(sel); + m_dirCtrl->ReCreateTree(); + + // Try to restore the selection, or at least the directory + m_dirCtrl->ExpandPath(currentPath); + } +} + +void wxDirFilterListCtrl::FillFilterList(const wxString& filter, int defaultFilter) +{ + Clear(); + wxArrayString descriptions, filters; + size_t n = (size_t) wxParseCommonDialogsFilter(filter, descriptions, filters); + + if (n > 0 && defaultFilter < (int) n) + { + for (size_t i = 0; i < n; i++) + Append(descriptions[i]); + SetSelection(defaultFilter); + } +} +#endif // wxUSE_DIRDLG + +#if wxUSE_DIRDLG || wxUSE_FILEDLG + +// ---------------------------------------------------------------------------- +// wxFileIconsTable icons +// ---------------------------------------------------------------------------- + +#ifndef __WXGTK20__ +/* Computer (c) Julian Smart */ +static const char* const file_icons_tbl_computer_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 42 1", +"r c #4E7FD0", +"$ c #7198D9", +"; c #DCE6F6", +"q c #FFFFFF", +"u c #4A7CCE", +"# c #779DDB", +"w c #95B2E3", +"y c #7FA2DD", +"f c #3263B4", +"= c #EAF0FA", +"< c #B1C7EB", +"% c #6992D7", +"9 c #D9E4F5", +"o c #9BB7E5", +"6 c #F7F9FD", +", c #BED0EE", +"3 c #F0F5FC", +"1 c #A8C0E8", +" c None", +"0 c #FDFEFF", +"4 c #C4D5F0", +"@ c #81A4DD", +"e c #4377CD", +"- c #E2EAF8", +"i c #9FB9E5", +"> c #CCDAF2", +"+ c #89A9DF", +"s c #5584D1", +"t c #5D89D3", +": c #D2DFF4", +"5 c #FAFCFE", +"2 c #F5F8FD", +"8 c #DFE8F7", +"& c #5E8AD4", +"X c #638ED5", +"a c #CEDCF2", +"p c #90AFE2", +"d c #2F5DA9", +"* c #5282D0", +"7 c #E5EDF9", +". c #A2BCE6", +"O c #8CACE0", +/* pixels */ +" ", +" .XXXXXXXXXXX ", +" oXO++@#$%&*X ", +" oX=-;:>,<1%X ", +" oX23=-;:4,$X ", +" oX5633789:@X ", +" oX05623=78+X ", +" oXqq05623=OX ", +" oX,,,,,<<<$X ", +" wXXXXXXXXXXe ", +" XrtX%$$y@+O,, ", +" uyiiiiiiiii@< ", +" ouiiiiiiiiiipAdd(wxArtProvider::GetBitmap(wxART_FOLDER, + wxART_CMN_DIALOG, + wxSize(16, 16))); + // folder_open + m_smallImageList->Add(wxArtProvider::GetBitmap(wxART_FOLDER_OPEN, + wxART_CMN_DIALOG, + wxSize(16, 16))); + // computer +#ifdef __WXGTK20__ + // GTK24 uses this icon in the file open dialog + m_smallImageList->Add(wxArtProvider::GetBitmap(wxART_HARDDISK, + wxART_CMN_DIALOG, + wxSize(16, 16))); +#else + m_smallImageList->Add(wxIcon(file_icons_tbl_computer_xpm)); +#endif + // drive + m_smallImageList->Add(wxArtProvider::GetBitmap(wxART_HARDDISK, + wxART_CMN_DIALOG, + wxSize(16, 16))); + // cdrom + m_smallImageList->Add(wxArtProvider::GetBitmap(wxART_CDROM, + wxART_CMN_DIALOG, + wxSize(16, 16))); + // floppy + m_smallImageList->Add(wxArtProvider::GetBitmap(wxART_FLOPPY, + wxART_CMN_DIALOG, + wxSize(16, 16))); + // removeable + m_smallImageList->Add(wxArtProvider::GetBitmap(wxART_REMOVABLE, + wxART_CMN_DIALOG, + wxSize(16, 16))); + // file + m_smallImageList->Add(wxArtProvider::GetBitmap(wxART_NORMAL_FILE, + wxART_CMN_DIALOG, + wxSize(16, 16))); + // executable + if (GetIconID(wxEmptyString, wxT("application/x-executable")) == file) + { + m_smallImageList->Add(wxArtProvider::GetBitmap(wxART_EXECUTABLE_FILE, + wxART_CMN_DIALOG, + wxSize(16, 16))); + delete m_HashTable->Get(wxT("exe")); + m_HashTable->Delete(wxT("exe")); + m_HashTable->Put(wxT("exe"), new wxFileIconEntry(executable)); + } + /* else put into list by GetIconID + (KDE defines application/x-executable for *.exe and has nice icon) + */ +} + +wxImageList *wxFileIconsTable::GetSmallImageList() +{ + if (!m_smallImageList) + Create(); + + return m_smallImageList; +} + +#if wxUSE_MIMETYPE && wxUSE_IMAGE && (!defined(__WINDOWS__) || wxUSE_WXDIB) +// VS: we don't need this function w/o wxMimeTypesManager because we'll only have +// one icon and we won't resize it + +static wxBitmap CreateAntialiasedBitmap(const wxImage& img) +{ + const unsigned int size = 16; + + wxImage smallimg (size, size); + unsigned char *p1, *p2, *ps; + unsigned char mr = img.GetMaskRed(), + mg = img.GetMaskGreen(), + mb = img.GetMaskBlue(); + + unsigned x, y; + unsigned sr, sg, sb, smask; + + p1 = img.GetData(), p2 = img.GetData() + 3 * size*2, ps = smallimg.GetData(); + smallimg.SetMaskColour(mr, mr, mr); + + for (y = 0; y < size; y++) + { + for (x = 0; x < size; x++) + { + sr = sg = sb = smask = 0; + if (p1[0] != mr || p1[1] != mg || p1[2] != mb) + sr += p1[0], sg += p1[1], sb += p1[2]; + else smask++; + p1 += 3; + if (p1[0] != mr || p1[1] != mg || p1[2] != mb) + sr += p1[0], sg += p1[1], sb += p1[2]; + else smask++; + p1 += 3; + if (p2[0] != mr || p2[1] != mg || p2[2] != mb) + sr += p2[0], sg += p2[1], sb += p2[2]; + else smask++; + p2 += 3; + if (p2[0] != mr || p2[1] != mg || p2[2] != mb) + sr += p2[0], sg += p2[1], sb += p2[2]; + else smask++; + p2 += 3; + + if (smask > 2) + ps[0] = ps[1] = ps[2] = mr; + else + { + ps[0] = (unsigned char)(sr >> 2); + ps[1] = (unsigned char)(sg >> 2); + ps[2] = (unsigned char)(sb >> 2); + } + ps += 3; + } + p1 += size*2 * 3, p2 += size*2 * 3; + } + + return wxBitmap(smallimg); +} + +// This function is currently not unused anymore +#if 0 +// finds empty borders and return non-empty area of image: +static wxImage CutEmptyBorders(const wxImage& img) +{ + unsigned char mr = img.GetMaskRed(), + mg = img.GetMaskGreen(), + mb = img.GetMaskBlue(); + unsigned char *dt = img.GetData(), *dttmp; + unsigned w = img.GetWidth(), h = img.GetHeight(); + + unsigned top, bottom, left, right, i; + bool empt; + +#define MK_DTTMP(x,y) dttmp = dt + ((x + y * w) * 3) +#define NOEMPTY_PIX(empt) if (dttmp[0] != mr || dttmp[1] != mg || dttmp[2] != mb) {empt = false; break;} + + for (empt = true, top = 0; empt && top < h; top++) + { + MK_DTTMP(0, top); + for (i = 0; i < w; i++, dttmp+=3) + NOEMPTY_PIX(empt) + } + for (empt = true, bottom = h-1; empt && bottom > top; bottom--) + { + MK_DTTMP(0, bottom); + for (i = 0; i < w; i++, dttmp+=3) + NOEMPTY_PIX(empt) + } + for (empt = true, left = 0; empt && left < w; left++) + { + MK_DTTMP(left, 0); + for (i = 0; i < h; i++, dttmp+=3*w) + NOEMPTY_PIX(empt) + } + for (empt = true, right = w-1; empt && right > left; right--) + { + MK_DTTMP(right, 0); + for (i = 0; i < h; i++, dttmp+=3*w) + NOEMPTY_PIX(empt) + } + top--, left--, bottom++, right++; + + return img.GetSubImage(wxRect(left, top, right - left + 1, bottom - top + 1)); +} +#endif // #if 0 + +#endif // wxUSE_MIMETYPE + +int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime) +{ + if (!m_smallImageList) + Create(); + +#if wxUSE_MIMETYPE + if (!extension.empty()) + { + wxFileIconEntry *entry = (wxFileIconEntry*) m_HashTable->Get(extension); + if (entry) return (entry -> iconid); + } + + wxFileType *ft = (mime.empty()) ? + wxTheMimeTypesManager -> GetFileTypeFromExtension(extension) : + wxTheMimeTypesManager -> GetFileTypeFromMimeType(mime); + + wxIconLocation iconLoc; + wxIcon ic; + + { + wxLogNull logNull; + if ( ft && ft->GetIcon(&iconLoc) ) + { + ic = wxIcon( iconLoc ); + } + } + + delete ft; + + if ( !ic.IsOk() ) + { + int newid = file; + m_HashTable->Put(extension, new wxFileIconEntry(newid)); + return newid; + } + + wxBitmap bmp; + bmp.CopyFromIcon(ic); + + if ( !bmp.IsOk() ) + { + int newid = file; + m_HashTable->Put(extension, new wxFileIconEntry(newid)); + return newid; + } + + const unsigned int size = 16; + + int treeid = m_smallImageList->GetImageCount(); + if ((bmp.GetWidth() == (int) size) && (bmp.GetHeight() == (int) size)) + { + m_smallImageList->Add(bmp); + } +#if wxUSE_IMAGE && (!defined(__WINDOWS__) || wxUSE_WXDIB) + else + { + wxImage img = bmp.ConvertToImage(); + + if ((img.GetWidth() != size*2) || (img.GetHeight() != size*2)) +// m_smallImageList->Add(CreateAntialiasedBitmap(CutEmptyBorders(img).Rescale(size*2, size*2))); + m_smallImageList->Add(CreateAntialiasedBitmap(img.Rescale(size*2, size*2))); + else + m_smallImageList->Add(CreateAntialiasedBitmap(img)); + } +#endif // wxUSE_IMAGE + + m_HashTable->Put(extension, new wxFileIconEntry(treeid)); + return treeid; + +#else // !wxUSE_MIMETYPE + + wxUnusedVar(mime); + if (extension == wxT("exe")) + return executable; + else + return file; +#endif // wxUSE_MIMETYPE/!wxUSE_MIMETYPE +} + +#endif // wxUSE_DIRDLG || wxUSE_FILEDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/dirdlgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/dirdlgg.cpp new file mode 100644 index 0000000000..80ddf5ca5e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/dirdlgg.cpp @@ -0,0 +1,371 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/dirdlgg.cpp +// Purpose: wxDirDialog +// Author: Harm van der Heijden, Robert Roebling & Julian Smart +// Modified by: +// Created: 12/12/98 +// Copyright: (c) Harm van der Heijden, Robert Roebling, Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_DIRDLG + +#ifndef WX_PRECOMP + #include "wx/textctrl.h" + #include "wx/button.h" + #include "wx/checkbox.h" + #include "wx/sizer.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/msgdlg.h" + #include "wx/bmpbuttn.h" +#endif + +#include "wx/statline.h" +#include "wx/dirctrl.h" +#include "wx/generic/dirdlgg.h" +#include "wx/artprov.h" +#include "wx/menu.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +static const int ID_DIRCTRL = 1000; +static const int ID_TEXTCTRL = 1001; +static const int ID_NEW = 1004; +static const int ID_SHOW_HIDDEN = 1005; +static const int ID_GO_HOME = 1006; + +//----------------------------------------------------------------------------- +// wxGenericDirDialog +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGenericDirDialog, wxDialog) + +BEGIN_EVENT_TABLE(wxGenericDirDialog, wxDialog) + EVT_CLOSE (wxGenericDirDialog::OnCloseWindow) + EVT_BUTTON (wxID_OK, wxGenericDirDialog::OnOK) + EVT_BUTTON (ID_NEW, wxGenericDirDialog::OnNew) + EVT_BUTTON (ID_GO_HOME, wxGenericDirDialog::OnGoHome) + EVT_TREE_KEY_DOWN (wxID_ANY, wxGenericDirDialog::OnTreeKeyDown) + EVT_TREE_SEL_CHANGED (wxID_ANY, wxGenericDirDialog::OnTreeSelected) + EVT_TEXT_ENTER (ID_TEXTCTRL, wxGenericDirDialog::OnOK) + EVT_CHECKBOX (ID_SHOW_HIDDEN, wxGenericDirDialog::OnShowHidden) +END_EVENT_TABLE() + +wxGenericDirDialog::wxGenericDirDialog(wxWindow* parent, const wxString& title, + const wxString& defaultPath, long style, + const wxPoint& pos, const wxSize& sz, + const wxString& name) +{ + Create(parent, title, defaultPath, style, pos, sz, name); +} + +bool wxGenericDirDialog::Create(wxWindow* parent, + const wxString& title, + const wxString& defaultPath, long style, + const wxPoint& pos, + const wxSize& sz, + const wxString& name) +{ + wxBusyCursor cursor; + + parent = GetParentForModalDialog(parent, style); + + if (!wxDirDialogBase::Create(parent, title, defaultPath, style, pos, sz, name)) + return false; + + m_path = defaultPath; + if (m_path == wxT("~")) + wxGetHomeDir(&m_path); + if (m_path == wxT(".")) + m_path = wxGetCwd(); + + wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); + + // smartphones does not support or do not waste space for wxButtons +#if defined(__SMARTPHONE__) + + wxMenu *dirMenu = new wxMenu; + dirMenu->Append(ID_GO_HOME, _("Home")); + + if (!HasFlag(wxDD_DIR_MUST_EXIST)) + { + dirMenu->Append(ID_NEW, _("New directory")); + } + + dirMenu->AppendCheckItem(ID_SHOW_HIDDEN, _("Show hidden directories")); + dirMenu->AppendSeparator(); + dirMenu->Append(wxID_CANCEL, _("Cancel")); + +#else + + // 0) 'New' and 'Home' Buttons + wxSizer* buttonsizer = new wxBoxSizer( wxHORIZONTAL ); + + // VS: 'Home directory' concept is unknown to MS-DOS +#if !defined(__DOS__) + wxBitmapButton* homeButton = + new wxBitmapButton(this, ID_GO_HOME, + wxArtProvider::GetBitmap(wxART_GO_HOME, wxART_BUTTON)); + buttonsizer->Add( homeButton, 0, wxLEFT|wxRIGHT, 10 ); +#endif + + // I'm not convinced we need a New button, and we tend to get annoying + // accidental-editing with label editing enabled. + if (!HasFlag(wxDD_DIR_MUST_EXIST)) + { + wxBitmapButton* newButton = + new wxBitmapButton(this, ID_NEW, + wxArtProvider::GetBitmap(wxART_NEW_DIR, wxART_BUTTON)); + buttonsizer->Add( newButton, 0, wxRIGHT, 10 ); +#if wxUSE_TOOLTIPS + newButton->SetToolTip(_("Create new directory")); +#endif + } + +#if wxUSE_TOOLTIPS + homeButton->SetToolTip(_("Go to home directory")); +#endif + + topsizer->Add( buttonsizer, 0, wxTOP | wxALIGN_RIGHT, 10 ); + +#endif // __SMARTPHONE__/!__SMARTPHONE__ + + // 1) dir ctrl + m_dirCtrl = NULL; // this is necessary, event handler called from + // wxGenericDirCtrl would crash otherwise! + long dirStyle = wxDIRCTRL_DIR_ONLY | wxDEFAULT_CONTROL_BORDER; + +#ifdef __WXMSW__ + if (!HasFlag(wxDD_DIR_MUST_EXIST)) + { + // Only under Windows do we need the wxTR_EDIT_LABEL tree control style + // before we can call EditLabel (required for "New directory") + dirStyle |= wxDIRCTRL_EDIT_LABELS; + } +#endif + + m_dirCtrl = new wxGenericDirCtrl(this, ID_DIRCTRL, + m_path, wxDefaultPosition, + wxSize(300, 200), + dirStyle); + + wxSizerFlags flagsBorder2; + flagsBorder2.DoubleBorder(wxTOP | wxLEFT | wxRIGHT); + + topsizer->Add(m_dirCtrl, wxSizerFlags(flagsBorder2).Proportion(1).Expand()); + +#ifndef __SMARTPHONE__ + // TODO: Make this an option depending on a flag? + wxCheckBox * + check = new wxCheckBox(this, ID_SHOW_HIDDEN, _("Show &hidden directories")); + topsizer->Add(check, wxSizerFlags(flagsBorder2).Right()); +#endif // !__SMARTPHONE__ + + // 2) text ctrl + m_input = new wxTextCtrl( this, ID_TEXTCTRL, m_path, wxDefaultPosition ); + topsizer->Add(m_input, wxSizerFlags(flagsBorder2).Expand()); + + // 3) buttons if any + wxSizer *buttonSizer = CreateSeparatedButtonSizer(wxOK | wxCANCEL); + if ( buttonSizer ) + { + topsizer->Add(buttonSizer, wxSizerFlags().Expand().DoubleBorder()); + } + +#ifdef __SMARTPHONE__ + // overwrite menu set by CreateSeparatedButtonSizer() call above + SetRightMenu(wxID_ANY, _("Options"), dirMenu); +#endif + + m_input->SetFocus(); + + SetAutoLayout( true ); + SetSizer( topsizer ); + + topsizer->SetSizeHints( this ); + topsizer->Fit( this ); + + Centre( wxBOTH ); + + return true; +} + +void wxGenericDirDialog::EndModal(int retCode) +{ + // before proceeding, change the current working directory if user asked so + if (retCode == wxID_OK && HasFlag(wxDD_CHANGE_DIR)) + wxSetWorkingDirectory(m_path); + + wxDialog::EndModal(retCode); +} + +void wxGenericDirDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) +{ + EndModal(wxID_CANCEL); +} + +void wxGenericDirDialog::OnOK(wxCommandEvent& WXUNUSED(event)) +{ + m_path = m_input->GetValue(); + + // Does the path exist? (User may have typed anything in m_input) + if (wxDirExists(m_path)) + { + // OK, path exists, we're done. + EndModal(wxID_OK); + return; + } + + // Interact with user, find out if the dir is a typo or to be created + wxString msg; + msg.Printf(_("The directory '%s' does not exist\nCreate it now?"), + m_path.c_str()); + wxMessageDialog dialog(this, msg, _("Directory does not exist"), + wxYES_NO | wxICON_WARNING); + + if ( dialog.ShowModal() == wxID_YES ) + { + // Okay, let's make it + wxLogNull log; + if (wxMkdir(m_path)) + { + // The new dir was created okay. + EndModal(wxID_OK); + return; + } + else + { + // Trouble... + msg.Printf(_("Failed to create directory '%s'\n(Do you have the required permissions?)"), + m_path.c_str()); + wxMessageDialog errmsg(this, msg, _("Error creating directory"), wxOK | wxICON_ERROR); + errmsg.ShowModal(); + // We still don't have a valid dir. Back to the main dialog. + } + } + // User has answered NO to create dir. +} + +void wxGenericDirDialog::SetPath(const wxString& path) +{ + m_dirCtrl->SetPath(path); + m_path = path; +} + +wxString wxGenericDirDialog::GetPath(void) const +{ + return m_path; +} + +int wxGenericDirDialog::ShowModal() +{ + m_input->SetValue( m_path ); + return wxDialog::ShowModal(); +} + +void wxGenericDirDialog::OnTreeSelected( wxTreeEvent &event ) +{ + if (!m_dirCtrl) + return; + + wxTreeItemId item = event.GetItem(); + + wxDirItemData *data = NULL; + + if(item.IsOk()) + data = (wxDirItemData*)m_dirCtrl->GetTreeCtrl()->GetItemData(item); + + if (data) + m_input->SetValue( data->m_path ); +} + +void wxGenericDirDialog::OnTreeKeyDown( wxTreeEvent &WXUNUSED(event) ) +{ + if (!m_dirCtrl) + return; + + wxDirItemData *data = (wxDirItemData*)m_dirCtrl->GetTreeCtrl()->GetItemData(m_dirCtrl->GetTreeCtrl()->GetSelection()); + if (data) + m_input->SetValue( data->m_path ); +} + +void wxGenericDirDialog::OnShowHidden( wxCommandEvent& event ) +{ + if (!m_dirCtrl) + return; + + m_dirCtrl->ShowHidden( event.GetInt() != 0 ); +} + +void wxGenericDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) ) +{ + wxTreeItemId id = m_dirCtrl->GetTreeCtrl()->GetSelection(); + if ((id == m_dirCtrl->GetTreeCtrl()->GetRootItem()) || + (m_dirCtrl->GetTreeCtrl()->GetItemParent(id) == m_dirCtrl->GetTreeCtrl()->GetRootItem())) + { + wxMessageDialog msg(this, _("You cannot add a new directory to this section."), + _("Create directory"), wxOK | wxICON_INFORMATION ); + msg.ShowModal(); + return; + } + + wxTreeItemId parent = id ; // m_dirCtrl->GetTreeCtrl()->GetItemParent( id ); + wxDirItemData *data = (wxDirItemData*)m_dirCtrl->GetTreeCtrl()->GetItemData( parent ); + wxASSERT( data ); + + wxString new_name( _("NewName") ); + wxString path( data->m_path ); + if (!wxEndsWithPathSeparator(path)) + path += wxFILE_SEP_PATH; + path += new_name; + if (wxDirExists(path)) + { + // try NewName0, NewName1 etc. + int i = 0; + do { + new_name = _("NewName"); + wxString num; + num.Printf( wxT("%d"), i ); + new_name += num; + + path = data->m_path; + if (!wxEndsWithPathSeparator(path)) + path += wxFILE_SEP_PATH; + path += new_name; + i++; + } while (wxDirExists(path)); + } + + wxLogNull log; + if (!wxMkdir(path)) + { + wxMessageDialog dialog(this, _("Operation not permitted."), _("Error"), wxOK | wxICON_ERROR ); + dialog.ShowModal(); + return; + } + + wxDirItemData *new_data = new wxDirItemData( path, new_name, true ); + + // TODO: THIS CODE DOESN'T WORK YET. We need to avoid duplication of the first child + // of the parent. + wxTreeItemId new_id = m_dirCtrl->GetTreeCtrl()->AppendItem( parent, new_name, 0, 0, new_data ); + m_dirCtrl->GetTreeCtrl()->EnsureVisible( new_id ); + m_dirCtrl->GetTreeCtrl()->EditLabel( new_id ); +} + +void wxGenericDirDialog::OnGoHome(wxCommandEvent& WXUNUSED(event)) +{ + SetPath(wxGetUserHome()); +} + +#endif // wxUSE_DIRDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/dragimgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/dragimgg.cpp new file mode 100644 index 0000000000..15561e5e54 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/dragimgg.cpp @@ -0,0 +1,572 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/dragimgg.cpp +// Purpose: Generic wxDragImage implementation +// Author: Julian Smart +// Modified by: +// Created: 29/2/2000 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_DRAGIMAGE + +#ifndef WX_PRECOMP + #include + #include "wx/window.h" + #include "wx/frame.h" + #include "wx/dcclient.h" + #include "wx/dcscreen.h" + #include "wx/dcmemory.h" + #include "wx/settings.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/image.h" +#endif + +#define wxUSE_IMAGE_IN_DRAGIMAGE 1 + +#include "wx/generic/dragimgg.h" + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGenericDragImage, wxObject) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxGenericDragImage ctors/dtor +// ---------------------------------------------------------------------------- + +wxGenericDragImage::~wxGenericDragImage() +{ + if (m_windowDC) + { + delete m_windowDC; + } +} + +void wxGenericDragImage::Init() +{ + m_isDirty = false; + m_isShown = false; + m_windowDC = NULL; + m_window = NULL; + m_fullScreen = false; +#ifdef wxHAS_NATIVE_OVERLAY + m_dcOverlay = NULL; +#else + m_pBackingBitmap = NULL; +#endif +} + +#if WXWIN_COMPATIBILITY_2_6 +wxGenericDragImage::wxGenericDragImage(const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + Init(); + Create(cursor); +} + +wxGenericDragImage::wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + Init(); + + Create(image, cursor); +} + +wxGenericDragImage::wxGenericDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + Init(); + + Create(image, cursor); +} + +wxGenericDragImage::wxGenericDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + Init(); + + Create(str, cursor); +} + +bool wxGenericDragImage::Create(const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + return Create(cursor); +} + +bool wxGenericDragImage::Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + return Create(image, cursor); +} + +bool wxGenericDragImage::Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + return Create(image, cursor); +} + +bool wxGenericDragImage::Create(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + return Create(str, cursor); +} +#endif // WXWIN_COMPATIBILITY_2_6 + +// Attributes +//////////////////////////////////////////////////////////////////////////// + + +// Operations +//////////////////////////////////////////////////////////////////////////// + +// Create a drag image with a virtual image (need to override DoDrawImage, GetImageRect) +bool wxGenericDragImage::Create(const wxCursor& cursor) +{ + m_cursor = cursor; + + return true; +} + +// Create a drag image from a bitmap and optional cursor +bool wxGenericDragImage::Create(const wxBitmap& image, const wxCursor& cursor) +{ + // We don't have to combine the cursor explicitly since we simply show the cursor + // as we drag. This currently will only work within one window. + + m_cursor = cursor; + m_bitmap = image; + + return true ; +} + +// Create a drag image from an icon and optional cursor +bool wxGenericDragImage::Create(const wxIcon& image, const wxCursor& cursor) +{ + // We don't have to combine the cursor explicitly since we simply show the cursor + // as we drag. This currently will only work within one window. + + m_cursor = cursor; + m_icon = image; + + return true ; +} + +// Create a drag image from a string and optional cursor +bool wxGenericDragImage::Create(const wxString& str, const wxCursor& cursor) +{ + wxFont font(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); + + wxCoord w = 0, h = 0; + wxScreenDC dc; + dc.SetFont(font); + dc.GetTextExtent(str, & w, & h); + dc.SetFont(wxNullFont); + + wxMemoryDC dc2; + + // Sometimes GetTextExtent isn't accurate enough, so make it longer + wxBitmap bitmap((int) ((w+2) * 1.5), (int) h+2); + dc2.SelectObject(bitmap); + + dc2.SetFont(font); + dc2.SetBackground(* wxWHITE_BRUSH); + dc2.Clear(); + dc2.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); + dc2.SetTextForeground(* wxLIGHT_GREY); + dc2.DrawText(str, 0, 0); + dc2.DrawText(str, 1, 0); + dc2.DrawText(str, 2, 0); + dc2.DrawText(str, 1, 1); + dc2.DrawText(str, 2, 1); + dc2.DrawText(str, 1, 2); + dc2.DrawText(str, 2, 2); + + dc2.SetTextForeground(* wxBLACK); + dc2.DrawText(str, 1, 1); + + dc2.SelectObject(wxNullBitmap); + +#if wxUSE_IMAGE_IN_DRAGIMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB) + // Make the bitmap masked + wxImage image = bitmap.ConvertToImage(); + image.SetMaskColour(255, 255, 255); + bitmap = wxBitmap(image); +#endif + + return Create(bitmap, cursor); +} + +#if wxUSE_TREECTRL +// Create a drag image for the given tree control item +bool wxGenericDragImage::Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id) +{ + wxString str = treeCtrl.GetItemText(id); + return Create(str); +} +#endif + +#if wxUSE_LISTCTRL +// Create a drag image for the given list control item +bool wxGenericDragImage::Create(const wxListCtrl& listCtrl, long id) +{ + wxString str = listCtrl.GetItemText(id); + return Create(str); +} +#endif + +// Begin drag +bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot, + wxWindow* window, + bool fullScreen, + wxRect* rect) +{ + wxCHECK_MSG( window, false, wxT("Window must not be null in BeginDrag.")); + + // The image should be offset by this amount + m_offset = hotspot; + m_window = window; + m_fullScreen = fullScreen; + + if (rect) + m_boundingRect = * rect; + + m_isDirty = false; + m_isShown = false; + + if (m_cursor.IsOk()) + { + m_oldCursor = window->GetCursor(); + window->SetCursor(m_cursor); + } + + window->CaptureMouse(); + + // Make a copy of the window so we can repair damage done as the image is + // dragged. + + wxSize clientSize; + wxPoint pt; + if (!m_fullScreen) + { + clientSize = window->GetClientSize(); + m_boundingRect.x = 0; m_boundingRect.y = 0; + m_boundingRect.width = clientSize.x; m_boundingRect.height = clientSize.y; + } + else + { + int w, h; + wxDisplaySize(& w, & h); + clientSize.x = w; clientSize.y = h; + if (rect) + { + pt.x = m_boundingRect.x; pt.y = m_boundingRect.y; + clientSize.x = m_boundingRect.width; clientSize.y = m_boundingRect.height; + } + else + { + m_boundingRect.x = 0; m_boundingRect.y = 0; + m_boundingRect.width = w; m_boundingRect.height = h; + } + } + +#ifndef wxHAS_NATIVE_OVERLAY + wxBitmap* backing = (m_pBackingBitmap ? m_pBackingBitmap : (wxBitmap*) & m_backingBitmap); + + if (!backing->IsOk() || (backing->GetWidth() < clientSize.x || backing->GetHeight() < clientSize.y)) + (*backing) = wxBitmap(clientSize.x, clientSize.y); +#endif // !wxHAS_NATIVE_OVERLAY + + if (!m_fullScreen) + { + m_windowDC = new wxClientDC(window); + } + else + { + m_windowDC = new wxScreenDC; + +#if 0 + // Use m_boundingRect to limit the area considered. + ((wxScreenDC*) m_windowDC)->StartDrawingOnTop(rect); +#endif + + m_windowDC->SetClippingRegion(m_boundingRect.x, m_boundingRect.y, + m_boundingRect.width, m_boundingRect.height); + } + + return true; +} + +// Begin drag. hotspot is the location of the drag position relative to the upper-left +// corner of the image. This is full screen only. fullScreenRect gives the +// position of the window on the screen, to restrict the drag to. +bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, wxWindow* fullScreenRect) +{ + wxRect rect; + + int x = fullScreenRect->GetPosition().x; + int y = fullScreenRect->GetPosition().y; + + wxSize sz = fullScreenRect->GetSize(); + + if (fullScreenRect->GetParent() && !wxDynamicCast(fullScreenRect, wxFrame)) + fullScreenRect->GetParent()->ClientToScreen(& x, & y); + + rect.x = x; rect.y = y; + rect.width = sz.x; rect.height = sz.y; + + return BeginDrag(hotspot, window, true, & rect); +} + +// End drag +bool wxGenericDragImage::EndDrag() +{ + if (m_window) + { +#ifdef __WXMSW__ + // Under Windows we can be pretty sure this test will give + // the correct results + if (wxWindow::GetCapture() == m_window) +#endif + m_window->ReleaseMouse(); + + if (m_cursor.IsOk() && m_oldCursor.IsOk()) + { + m_window->SetCursor(m_oldCursor); + } + } + + if (m_windowDC) + { +#ifdef wxHAS_NATIVE_OVERLAY + m_overlay.Reset(); +#else + m_windowDC->DestroyClippingRegion(); +#endif + wxDELETE(m_windowDC); + } + +#ifndef wxHAS_NATIVE_OVERLAY + m_repairBitmap = wxNullBitmap; +#endif + + return true; +} + +// Move the image: call from OnMouseMove. Pt is in window client coordinates if window +// is non-NULL, or in screen coordinates if NULL. +bool wxGenericDragImage::Move(const wxPoint& pt) +{ + wxASSERT_MSG( (m_windowDC != NULL), wxT("No window DC in wxGenericDragImage::Move()") ); + + wxPoint pt2(pt); + if (m_fullScreen) + pt2 = m_window->ClientToScreen(pt); + + // Erase at old position, then show at the current position + wxPoint oldPos = m_position; + + bool eraseOldImage = (m_isDirty && m_isShown); + + if (m_isShown) + RedrawImage(oldPos - m_offset, pt2 - m_offset, eraseOldImage, true); + + m_position = pt2; + + if (m_isShown) + m_isDirty = true; + + return true; +} + +bool wxGenericDragImage::Show() +{ + wxASSERT_MSG( (m_windowDC != NULL), wxT("No window DC in wxGenericDragImage::Show()") ); + + // Show at the current position + + if (!m_isShown) + { + // This is where we restore the backing bitmap, in case + // something has changed on the window. + +#ifndef wxHAS_NATIVE_OVERLAY + wxBitmap* backing = (m_pBackingBitmap ? m_pBackingBitmap : (wxBitmap*) & m_backingBitmap); + wxMemoryDC memDC; + memDC.SelectObject(* backing); + + UpdateBackingFromWindow(* m_windowDC, memDC, m_boundingRect, wxRect(0, 0, m_boundingRect.width, m_boundingRect.height)); + + //memDC.Blit(0, 0, m_boundingRect.width, m_boundingRect.height, m_windowDC, m_boundingRect.x, m_boundingRect.y); + memDC.SelectObject(wxNullBitmap); +#endif // !wxHAS_NATIVE_OVERLAY + + RedrawImage(m_position - m_offset, m_position - m_offset, false, true); + } + + m_isShown = true; + m_isDirty = true; + + return true; +} + +bool wxGenericDragImage::UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC, + const wxRect& sourceRect, const wxRect& destRect) const +{ + return destDC.Blit(destRect.x, destRect.y, destRect.width, destRect.height, & windowDC, + sourceRect.x, sourceRect.y); +} + +bool wxGenericDragImage::Hide() +{ + wxASSERT_MSG( (m_windowDC != NULL), wxT("No window DC in wxGenericDragImage::Hide()") ); + + // Repair the old position + + if (m_isShown && m_isDirty) + { + RedrawImage(m_position - m_offset, m_position - m_offset, true, false); + } + + m_isShown = false; + m_isDirty = false; + + return true; +} + +// More efficient: erase and redraw simultaneously if possible +bool wxGenericDragImage::RedrawImage(const wxPoint& oldPos, + const wxPoint& newPos, + bool eraseOld, bool drawNew) +{ + if (!m_windowDC) + return false; + +#ifdef wxHAS_NATIVE_OVERLAY + wxUnusedVar(oldPos); + + wxDCOverlay dcoverlay( m_overlay, (wxWindowDC*) m_windowDC ) ; + if ( eraseOld ) + dcoverlay.Clear() ; + if (drawNew) + DoDrawImage(*m_windowDC, newPos); +#else // !wxHAS_NATIVE_OVERLAY + wxBitmap* backing = (m_pBackingBitmap ? m_pBackingBitmap : (wxBitmap*) & m_backingBitmap); + if (!backing->IsOk()) + return false; + + wxRect oldRect(GetImageRect(oldPos)); + wxRect newRect(GetImageRect(newPos)); + + wxRect fullRect; + + // Full rect: the combination of both rects + if (eraseOld && drawNew) + { + int oldRight = oldRect.GetRight(); + int oldBottom = oldRect.GetBottom(); + int newRight = newRect.GetRight(); + int newBottom = newRect.GetBottom(); + + wxPoint topLeft = wxPoint(wxMin(oldPos.x, newPos.x), wxMin(oldPos.y, newPos.y)); + wxPoint bottomRight = wxPoint(wxMax(oldRight, newRight), wxMax(oldBottom, newBottom)); + + fullRect.x = topLeft.x; fullRect.y = topLeft.y; + fullRect.SetRight(bottomRight.x); + fullRect.SetBottom(bottomRight.y); + } + else if (eraseOld) + fullRect = oldRect; + else if (drawNew) + fullRect = newRect; + + // Make the bitmap bigger than it need be, so we don't + // keep reallocating all the time. + int excess = 50; + + if (!m_repairBitmap.IsOk() || (m_repairBitmap.GetWidth() < fullRect.GetWidth() || m_repairBitmap.GetHeight() < fullRect.GetHeight())) + { + m_repairBitmap = wxBitmap(fullRect.GetWidth() + excess, fullRect.GetHeight() + excess); + } + + wxMemoryDC memDC; + memDC.SelectObject(* backing); + + wxMemoryDC memDCTemp; + memDCTemp.SelectObject(m_repairBitmap); + + // Draw the backing bitmap onto the repair bitmap. + // If full-screen, we may have specified the rect on the + // screen that we're using for our backing bitmap. + // So subtract this when we're blitting from the backing bitmap + // (translate from screen to backing-bitmap coords). + + memDCTemp.Blit(0, 0, fullRect.GetWidth(), fullRect.GetHeight(), & memDC, fullRect.x - m_boundingRect.x, fullRect.y - m_boundingRect.y); + + // If drawing, draw the image onto the mem DC + if (drawNew) + { + wxPoint pos(newPos.x - fullRect.x, newPos.y - fullRect.y) ; + DoDrawImage(memDCTemp, pos); + } + + // Now blit to the window + // Finally, blit the temp mem DC to the window. + m_windowDC->Blit(fullRect.x, fullRect.y, fullRect.width, fullRect.height, & memDCTemp, 0, 0); + + memDCTemp.SelectObject(wxNullBitmap); + memDC.SelectObject(wxNullBitmap); +#endif // wxHAS_NATIVE_OVERLAY/!wxHAS_NATIVE_OVERLAY + + return true; +} + +// Override this if you are using a virtual image (drawing your own image) +bool wxGenericDragImage::DoDrawImage(wxDC& dc, const wxPoint& pos) const +{ + if (m_bitmap.IsOk()) + { + dc.DrawBitmap(m_bitmap, pos.x, pos.y, (m_bitmap.GetMask() != 0)); + return true; + } + else if (m_icon.IsOk()) + { + dc.DrawIcon(m_icon, pos.x, pos.y); + return true; + } + else + return false; +} + +// Override this if you are using a virtual image (drawing your own image) +wxRect wxGenericDragImage::GetImageRect(const wxPoint& pos) const +{ + if (m_bitmap.IsOk()) + { + return wxRect(pos.x, pos.y, m_bitmap.GetWidth(), m_bitmap.GetHeight()); + } + else if (m_icon.IsOk()) + { + return wxRect(pos.x, pos.y, m_icon.GetWidth(), m_icon.GetHeight()); + } + else + { + return wxRect(pos.x, pos.y, 0, 0); + } +} + +#endif // wxUSE_DRAGIMAGE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/editlbox.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/editlbox.cpp new file mode 100644 index 0000000000..a236e62f59 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/editlbox.cpp @@ -0,0 +1,402 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/editlbox.cpp +// Purpose: ListBox with editable items +// Author: Vaclav Slavik +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_EDITABLELISTBOX + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include "wx/editlbox.h" +#include "wx/sizer.h" +#include "wx/listctrl.h" + +// ============================================================================ +// implementation +// ============================================================================ + +const char wxEditableListBoxNameStr[] = "editableListBox"; + +static const char* const eledit_xpm[] = { +"16 16 3 1", +" c None", +". c #000000", +"+ c #00007F", +" ", +" ", +" .. .. ", +" . ", +" . ", +" ++++ . ++++ ", +" ++ . ++ ++", +" +++++ . ++++++", +" ++ ++ . ++ ", +" ++ ++ . ++ ++", +" +++++ . ++++ ", +" . ", +" . ", +" .. .. ", +" ", +" "}; + +static const char* const elnew_xpm[] = { +"16 16 5 1", +" c None", +". c #7F7F7F", +"+ c #FFFFFF", +"@ c #FFFF00", +"# c #000000", +" ", +" ", +" . .+ .@ ", +" . .@.@# # # ", +" @.@+.... # ", +" ... @@ ", +" @ . @. # ", +" .# .@ ", +" . # ", +" # ", +" # ", +" # ", +" # ", +" # # # # # # ", +" ", +" "}; + +static const char* const eldel_xpm[] = { +"16 16 3 1", +" c None", +". c #7F0000", +"+ c #FFFFFF", +" ", +" ", +" ", +" ..+ ..+ ", +" ....+ ..+ ", +" ....+ ..+ ", +" ...+ .+ ", +" .....+ ", +" ...+ ", +" .....+ ", +" ...+ ..+ ", +" ...+ ..+ ", +" ...+ .+ ", +" ...+ .+ ", +" . . ", +" "}; + +static const char* const eldown_xpm[] = { +"16 16 2 1", +" c None", +". c #000000", +" ", +" ", +" ... ", +" ... ", +" ... ", +" ... ", +" ... ", +" ... ", +" ........... ", +" ......... ", +" ....... ", +" ..... ", +" ... ", +" . ", +" ", +" "}; + +static const char* const elup_xpm[] = { +"16 16 2 1", +" c None", +". c #000000", +" ", +" . ", +" ... ", +" ..... ", +" ....... ", +" ......... ", +" ........... ", +" ... ", +" ... ", +" ... ", +" ... ", +" ... ", +" ... ", +" ", +" ", +" "}; + +// list control with auto-resizable column: +class CleverListCtrl : public wxListCtrl +{ +public: + CleverListCtrl(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxLC_ICON, + const wxValidator& validator = wxDefaultValidator, + const wxString &name = wxListCtrlNameStr) + : wxListCtrl(parent, id, pos, size, style, validator, name) + { + CreateColumns(); + } + + void CreateColumns() + { + InsertColumn(0, wxT("item")); + SizeColumns(); + } + + void SizeColumns() + { + int w = GetSize().x; +#ifdef __WXMSW__ + w -= wxSystemSettings::GetMetric(wxSYS_VSCROLL_X) + 6; +#else + w -= 2*wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); +#endif + if (w < 0) w = 0; + SetColumnWidth(0, w); + } + +private: + DECLARE_EVENT_TABLE() + void OnSize(wxSizeEvent& event) + { + SizeColumns(); + event.Skip(); + } +}; + +BEGIN_EVENT_TABLE(CleverListCtrl, wxListCtrl) + EVT_SIZE(CleverListCtrl::OnSize) +END_EVENT_TABLE() + + +// ---------------------------------------------------------------------------- +// wxEditableListBox +// ---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxEditableListBox, wxPanel) + +// NB: generate the IDs at runtime to avoid conflict with XRCID values, +// they could cause XRCCTRL() failures in XRC-based dialogs +const wxWindowIDRef wxID_ELB_DELETE = wxWindow::NewControlId(); +const wxWindowIDRef wxID_ELB_EDIT = wxWindow::NewControlId(); +const wxWindowIDRef wxID_ELB_NEW = wxWindow::NewControlId(); +const wxWindowIDRef wxID_ELB_UP = wxWindow::NewControlId(); +const wxWindowIDRef wxID_ELB_DOWN = wxWindow::NewControlId(); +const wxWindowIDRef wxID_ELB_LISTCTRL = wxWindow::NewControlId(); + +BEGIN_EVENT_TABLE(wxEditableListBox, wxPanel) + EVT_LIST_ITEM_SELECTED(wxID_ELB_LISTCTRL, wxEditableListBox::OnItemSelected) + EVT_LIST_END_LABEL_EDIT(wxID_ELB_LISTCTRL, wxEditableListBox::OnEndLabelEdit) + EVT_BUTTON(wxID_ELB_NEW, wxEditableListBox::OnNewItem) + EVT_BUTTON(wxID_ELB_UP, wxEditableListBox::OnUpItem) + EVT_BUTTON(wxID_ELB_DOWN, wxEditableListBox::OnDownItem) + EVT_BUTTON(wxID_ELB_EDIT, wxEditableListBox::OnEditItem) + EVT_BUTTON(wxID_ELB_DELETE, wxEditableListBox::OnDelItem) +END_EVENT_TABLE() + +bool wxEditableListBox::Create(wxWindow *parent, wxWindowID id, + const wxString& label, + const wxPoint& pos, const wxSize& size, + long style, + const wxString& name) +{ + if (!wxPanel::Create(parent, id, pos, size, wxTAB_TRAVERSAL, name)) + return false; + + m_style = style; + + wxSizer *sizer = new wxBoxSizer(wxVERTICAL); + + wxPanel *subp = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, + wxSUNKEN_BORDER | wxTAB_TRAVERSAL); + wxSizer *subsizer = new wxBoxSizer(wxHORIZONTAL); + subsizer->Add(new wxStaticText(subp, wxID_ANY, label), 1, wxALIGN_CENTRE_VERTICAL | wxLEFT, 4); + +#ifdef __WXMSW__ + #define BTN_BORDER 4 + // FIXME - why is this needed? There's some reason why sunken border is + // ignored by sizers in wxMSW but not in wxGTK that I can't + // figure out... +#else + #define BTN_BORDER 0 +#endif + + if ( m_style & wxEL_ALLOW_EDIT ) + { + m_bEdit = new wxBitmapButton(subp, wxID_ELB_EDIT, wxBitmap(eledit_xpm)); + subsizer->Add(m_bEdit, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + } + + if ( m_style & wxEL_ALLOW_NEW ) + { + m_bNew = new wxBitmapButton(subp, wxID_ELB_NEW, wxBitmap(elnew_xpm)); + subsizer->Add(m_bNew, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + } + + if ( m_style & wxEL_ALLOW_DELETE ) + { + m_bDel = new wxBitmapButton(subp, wxID_ELB_DELETE, wxBitmap(eldel_xpm)); + subsizer->Add(m_bDel, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + } + + if (!(m_style & wxEL_NO_REORDER)) + { + m_bUp = new wxBitmapButton(subp, wxID_ELB_UP, wxBitmap(elup_xpm)); + subsizer->Add(m_bUp, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + + m_bDown = new wxBitmapButton(subp, wxID_ELB_DOWN, wxBitmap(eldown_xpm)); + subsizer->Add(m_bDown, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + } + +#if wxUSE_TOOLTIPS + if ( m_bEdit ) m_bEdit->SetToolTip(_("Edit item")); + if ( m_bNew ) m_bNew->SetToolTip(_("New item")); + if ( m_bDel ) m_bDel->SetToolTip(_("Delete item")); + if ( m_bUp ) m_bUp->SetToolTip(_("Move up")); + if ( m_bDown ) m_bDown->SetToolTip(_("Move down")); +#endif + + subp->SetSizer(subsizer); + subsizer->Fit(subp); + + sizer->Add(subp, 0, wxEXPAND); + + long st = wxLC_REPORT | wxLC_NO_HEADER | wxLC_SINGLE_SEL | wxSUNKEN_BORDER; + if ( style & wxEL_ALLOW_EDIT ) + st |= wxLC_EDIT_LABELS; + m_listCtrl = new CleverListCtrl(this, wxID_ELB_LISTCTRL, + wxDefaultPosition, wxDefaultSize, st); + wxArrayString empty_ar; + SetStrings(empty_ar); + + sizer->Add(m_listCtrl, 1, wxEXPAND); + + SetSizer(sizer); + Layout(); + + return true; +} + +void wxEditableListBox::SetStrings(const wxArrayString& strings) +{ + m_listCtrl->DeleteAllItems(); + size_t i; + + for (i = 0; i < strings.GetCount(); i++) + m_listCtrl->InsertItem(i, strings[i]); + + m_listCtrl->InsertItem(strings.GetCount(), wxEmptyString); + m_listCtrl->SetItemState(0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); +} + +void wxEditableListBox::GetStrings(wxArrayString& strings) const +{ + strings.Clear(); + + for (int i = 0; i < m_listCtrl->GetItemCount()-1; i++) + strings.Add(m_listCtrl->GetItemText(i)); +} + +void wxEditableListBox::OnItemSelected(wxListEvent& event) +{ + m_selection = event.GetIndex(); + if (!(m_style & wxEL_NO_REORDER)) + { + m_bUp->Enable(m_selection != 0 && m_selection < m_listCtrl->GetItemCount()-1); + m_bDown->Enable(m_selection < m_listCtrl->GetItemCount()-2); + } + + if (m_style & wxEL_ALLOW_EDIT) + m_bEdit->Enable(m_selection < m_listCtrl->GetItemCount()-1); + if (m_style & wxEL_ALLOW_DELETE) + m_bDel->Enable(m_selection < m_listCtrl->GetItemCount()-1); +} + +void wxEditableListBox::OnNewItem(wxCommandEvent& WXUNUSED(event)) +{ + m_listCtrl->SetItemState(m_listCtrl->GetItemCount()-1, + wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); + m_listCtrl->EditLabel(m_selection); +} + +void wxEditableListBox::OnEndLabelEdit(wxListEvent& event) +{ + if ( event.GetIndex() == m_listCtrl->GetItemCount()-1 && + !event.GetText().empty() ) + { + // The user edited last (empty) line, i.e. added new entry. We have to + // add new empty line here so that adding one more line is still + // possible: + m_listCtrl->InsertItem(m_listCtrl->GetItemCount(), wxEmptyString); + + // Simulate a wxEVT_LIST_ITEM_SELECTED event for the new item, + // so that the buttons are enabled/disabled properly + wxListEvent selectionEvent(wxEVT_LIST_ITEM_SELECTED, m_listCtrl->GetId()); + selectionEvent.m_itemIndex = event.GetIndex(); + m_listCtrl->GetEventHandler()->ProcessEvent(selectionEvent); + } +} + +void wxEditableListBox::OnDelItem(wxCommandEvent& WXUNUSED(event)) +{ + m_listCtrl->DeleteItem(m_selection); + m_listCtrl->SetItemState(m_selection, + wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); +} + +void wxEditableListBox::OnEditItem(wxCommandEvent& WXUNUSED(event)) +{ + m_listCtrl->EditLabel(m_selection); +} + +void wxEditableListBox::SwapItems(long i1, long i2) +{ + // swap the text + wxString t1 = m_listCtrl->GetItemText(i1); + wxString t2 = m_listCtrl->GetItemText(i2); + m_listCtrl->SetItemText(i1, t2); + m_listCtrl->SetItemText(i2, t1); + + // swap the item data + wxUIntPtr d1 = m_listCtrl->GetItemData(i1); + wxUIntPtr d2 = m_listCtrl->GetItemData(i2); + m_listCtrl->SetItemPtrData(i1, d2); + m_listCtrl->SetItemPtrData(i2, d1); +} + + +void wxEditableListBox::OnUpItem(wxCommandEvent& WXUNUSED(event)) +{ + SwapItems(m_selection - 1, m_selection); + m_listCtrl->SetItemState(m_selection - 1, + wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); +} + +void wxEditableListBox::OnDownItem(wxCommandEvent& WXUNUSED(event)) +{ + SwapItems(m_selection + 1, m_selection); + m_listCtrl->SetItemState(m_selection + 1, + wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); +} + +#endif // wxUSE_EDITABLELISTBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/fdrepdlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/fdrepdlg.cpp new file mode 100644 index 0000000000..af1ebb03ef --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/fdrepdlg.cpp @@ -0,0 +1,292 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/fdrepdlg.cpp +// Purpose: Find/Replace dialogs +// Author: Markus Greither and Vadim Zeitlin +// Modified by: +// Created: 05/25/01 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FINDREPLDLG + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + + #include "wx/sizer.h" + + #include "wx/button.h" + #include "wx/checkbox.h" + #include "wx/radiobox.h" + #include "wx/stattext.h" + #include "wx/textctrl.h" + #include "wx/settings.h" +#endif + +#include "wx/fdrepdlg.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxGenericFindReplaceDialog, wxDialog) + +BEGIN_EVENT_TABLE(wxGenericFindReplaceDialog, wxDialog) + EVT_BUTTON(wxID_FIND, wxGenericFindReplaceDialog::OnFind) + EVT_BUTTON(wxID_REPLACE, wxGenericFindReplaceDialog::OnReplace) + EVT_BUTTON(wxID_REPLACE_ALL, wxGenericFindReplaceDialog::OnReplaceAll) + EVT_BUTTON(wxID_CANCEL, wxGenericFindReplaceDialog::OnCancel) + + EVT_UPDATE_UI(wxID_FIND, wxGenericFindReplaceDialog::OnUpdateFindUI) + EVT_UPDATE_UI(wxID_REPLACE, wxGenericFindReplaceDialog::OnUpdateFindUI) + EVT_UPDATE_UI(wxID_REPLACE_ALL, wxGenericFindReplaceDialog::OnUpdateFindUI) + + EVT_CLOSE(wxGenericFindReplaceDialog::OnCloseWindow) +END_EVENT_TABLE() + +// ---------------------------------------------------------------------------- +// wxGenericFindReplaceDialog +// ---------------------------------------------------------------------------- + +void wxGenericFindReplaceDialog::Init() +{ + m_FindReplaceData = NULL; + + m_chkWord = + m_chkCase = NULL; + + m_radioDir = NULL; + + m_textFind = + m_textRepl = NULL; +} + +bool wxGenericFindReplaceDialog::Create(wxWindow *parent, + wxFindReplaceData *data, + const wxString& title, + int style) +{ + parent = GetParentForModalDialog(parent, style); + + if ( !wxDialog::Create(parent, wxID_ANY, title, + wxDefaultPosition, wxDefaultSize, + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER + | style) ) + { + return false; + } + + SetData(data); + + wxCHECK_MSG( m_FindReplaceData, false, + wxT("can't create dialog without data") ); + + bool isPda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); + + wxBoxSizer *leftsizer = new wxBoxSizer( wxVERTICAL ); + + // 3 columns because there is a spacer in the middle + wxFlexGridSizer *sizer2Col = new wxFlexGridSizer(3); + sizer2Col->AddGrowableCol(2); + + sizer2Col->Add(new wxStaticText(this, wxID_ANY, _("Search for:"), + wxDefaultPosition, wxSize(80, wxDefaultCoord)), + 0, + wxALIGN_CENTRE_VERTICAL | wxALIGN_RIGHT); + + sizer2Col->Add(10, 0); + + m_textFind = new wxTextCtrl(this, wxID_ANY, m_FindReplaceData->GetFindString()); + sizer2Col->Add(m_textFind, 1, wxALIGN_CENTRE_VERTICAL | wxEXPAND); + + if ( style & wxFR_REPLACEDIALOG ) + { + sizer2Col->Add(new wxStaticText(this, wxID_ANY, _("Replace with:"), + wxDefaultPosition, wxSize(80, wxDefaultCoord)), + 0, + wxALIGN_CENTRE_VERTICAL | + wxALIGN_RIGHT | wxTOP, 5); + + sizer2Col->Add(isPda ? 2 : 10, 0); + + m_textRepl = new wxTextCtrl(this, wxID_ANY, + m_FindReplaceData->GetReplaceString()); + sizer2Col->Add(m_textRepl, 1, + wxALIGN_CENTRE_VERTICAL | wxEXPAND | wxTOP, 5); + } + + leftsizer->Add(sizer2Col, 0, wxEXPAND | wxALL, 5); + + wxBoxSizer *optsizer = new wxBoxSizer( isPda ? wxVERTICAL : wxHORIZONTAL ); + + wxBoxSizer *chksizer = new wxBoxSizer( wxVERTICAL); + + m_chkWord = new wxCheckBox(this, wxID_ANY, _("Whole word")); + chksizer->Add(m_chkWord, 0, wxALL, 3); + + m_chkCase = new wxCheckBox(this, wxID_ANY, _("Match case")); + chksizer->Add(m_chkCase, 0, wxALL, 3); + + optsizer->Add(chksizer, 0, wxALL, 10); + + static const wxString searchDirections[] = {_("Up"), _("Down")}; + int majorDimension = 0; + int rbStyle ; + if (isPda) + rbStyle = wxRA_SPECIFY_ROWS; + else + rbStyle = wxRA_SPECIFY_COLS; + + m_radioDir = new wxRadioBox(this, wxID_ANY, _("Search direction"), + wxDefaultPosition, wxDefaultSize, + WXSIZEOF(searchDirections), searchDirections, + majorDimension, rbStyle); + + optsizer->Add(m_radioDir, 0, wxALL, isPda ? 5 : 10); + + leftsizer->Add(optsizer); + + wxBoxSizer *bttnsizer = new wxBoxSizer(wxVERTICAL); + + wxButton* btn = new wxButton(this, wxID_FIND); + btn->SetDefault(); + bttnsizer->Add(btn, 0, wxALL, 3); + + bttnsizer->Add(new wxButton(this, wxID_CANCEL), 0, wxALL, 3); + + if ( style & wxFR_REPLACEDIALOG ) + { + bttnsizer->Add(new wxButton(this, wxID_REPLACE, _("&Replace")), + 0, wxALL, 3); + + bttnsizer->Add(new wxButton(this, wxID_REPLACE_ALL, _("Replace &all")), + 0, wxALL, 3); + } + + wxBoxSizer *topsizer = new wxBoxSizer( wxHORIZONTAL ); + + topsizer->Add(leftsizer, 1, wxALL, isPda ? 0 : 5); + topsizer->Add(bttnsizer, 0, wxALL, isPda ? 0 : 5); + + int flags = m_FindReplaceData->GetFlags(); + + if ( flags & wxFR_MATCHCASE ) + m_chkCase->SetValue(true); + + if ( flags & wxFR_WHOLEWORD ) + m_chkWord->SetValue(true); + + m_radioDir->SetSelection( flags & wxFR_DOWN ); + + if ( style & wxFR_NOMATCHCASE ) + m_chkCase->Enable(false); + + if ( style & wxFR_NOWHOLEWORD ) + m_chkWord->Enable(false); + + if ( style & wxFR_NOUPDOWN) + m_radioDir->Enable(false); + + SetAutoLayout( true ); + SetSizer( topsizer ); + + topsizer->SetSizeHints( this ); + topsizer->Fit( this ); + + Centre( wxBOTH ); + + m_textFind->SetFocus(); + + return true; +} + +// ---------------------------------------------------------------------------- +// send the notification event +// ---------------------------------------------------------------------------- + +void wxGenericFindReplaceDialog::SendEvent(const wxEventType& evtType) +{ + wxFindDialogEvent event(evtType, GetId()); + event.SetEventObject(this); + event.SetFindString(m_textFind->GetValue()); + if ( HasFlag(wxFR_REPLACEDIALOG) ) + { + event.SetReplaceString(m_textRepl->GetValue()); + } + + int flags = 0; + + if ( m_chkCase->GetValue() ) + flags |= wxFR_MATCHCASE; + + if ( m_chkWord->GetValue() ) + flags |= wxFR_WHOLEWORD; + + if ( !m_radioDir || m_radioDir->GetSelection() == 1 ) + { + flags |= wxFR_DOWN; + } + + event.SetFlags(flags); + + wxFindReplaceDialogBase::Send(event); +} + +// ---------------------------------------------------------------------------- +// event handlers +// ---------------------------------------------------------------------------- + +void wxGenericFindReplaceDialog::OnFind(wxCommandEvent& WXUNUSED(event)) +{ + SendEvent(wxEVT_FIND_NEXT); +} + +void wxGenericFindReplaceDialog::OnReplace(wxCommandEvent& WXUNUSED(event)) +{ + SendEvent(wxEVT_FIND_REPLACE); +} + +void wxGenericFindReplaceDialog::OnReplaceAll(wxCommandEvent& WXUNUSED(event)) +{ + SendEvent(wxEVT_FIND_REPLACE_ALL); +} + +void wxGenericFindReplaceDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) +{ + SendEvent(wxEVT_FIND_CLOSE); + + Show(false); +} + +void wxGenericFindReplaceDialog::OnUpdateFindUI(wxUpdateUIEvent &event) +{ + // we can't search for empty strings + event.Enable( !m_textFind->GetValue().empty() ); +} + +void wxGenericFindReplaceDialog::OnCloseWindow(wxCloseEvent &) +{ + SendEvent(wxEVT_FIND_CLOSE); +} + +#endif // wxUSE_FINDREPLDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/filectrlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/filectrlg.cpp new file mode 100644 index 0000000000..1dfba4421c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/filectrlg.cpp @@ -0,0 +1,1479 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/filectrlg.cpp +// Purpose: wxGenericFileCtrl Implementation +// Author: Diaa M. Sami +// Created: 2007-07-07 +// Copyright: (c) Diaa M. Sami +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#if wxUSE_FILECTRL + +#include "wx/generic/filectrlg.h" + +#ifndef WX_PRECOMP + #include "wx/settings.h" + #include "wx/sizer.h" + #include "wx/stattext.h" + #include "wx/checkbox.h" + #include "wx/msgdlg.h" + #include "wx/log.h" + #include "wx/filedlg.h" +#endif + +#include "wx/clntdata.h" +#include "wx/file.h" // for wxS_IXXX constants only +#include "wx/generic/dirctrlg.h" // for wxFileIconsTable +#include "wx/dir.h" +#include "wx/tokenzr.h" +#include "wx/imaglist.h" + +#ifdef __WINDOWS__ + #include "wx/msw/wrapwin.h" +#endif + +#if defined(__WXWINCE__) +#define IsTopMostDir(dir) (dir == wxT("\\") || dir == wxT("/")) +#elif (defined(__DOS__) || defined(__WINDOWS__) || defined (__OS2__)) +#define IsTopMostDir(dir) (dir.empty()) +#else +#define IsTopMostDir(dir) (dir == wxT("/")) +#endif + + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +static +int wxCALLBACK wxFileDataNameCompare( wxIntPtr data1, wxIntPtr data2, wxIntPtr sortOrder) +{ + wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1); + wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2); + + if (fd1->GetFileName() == wxT("..")) + return -sortOrder; + if (fd2->GetFileName() == wxT("..")) + return sortOrder; + if (fd1->IsDir() && !fd2->IsDir()) + return -sortOrder; + if (fd2->IsDir() && !fd1->IsDir()) + return sortOrder; + + return sortOrder*wxStrcmp( fd1->GetFileName(), fd2->GetFileName() ); +} + +static +int wxCALLBACK wxFileDataSizeCompare(wxIntPtr data1, wxIntPtr data2, wxIntPtr sortOrder) +{ + wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1); + wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2); + + if (fd1->GetFileName() == wxT("..")) + return -sortOrder; + if (fd2->GetFileName() == wxT("..")) + return sortOrder; + if (fd1->IsDir() && !fd2->IsDir()) + return -sortOrder; + if (fd2->IsDir() && !fd1->IsDir()) + return sortOrder; + if (fd1->IsLink() && !fd2->IsLink()) + return -sortOrder; + if (fd2->IsLink() && !fd1->IsLink()) + return sortOrder; + + return fd1->GetSize() > fd2->GetSize() ? sortOrder : -sortOrder; +} + +static +int wxCALLBACK wxFileDataTypeCompare(wxIntPtr data1, wxIntPtr data2, wxIntPtr sortOrder) +{ + wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1); + wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2); + + if (fd1->GetFileName() == wxT("..")) + return -sortOrder; + if (fd2->GetFileName() == wxT("..")) + return sortOrder; + if (fd1->IsDir() && !fd2->IsDir()) + return -sortOrder; + if (fd2->IsDir() && !fd1->IsDir()) + return sortOrder; + if (fd1->IsLink() && !fd2->IsLink()) + return -sortOrder; + if (fd2->IsLink() && !fd1->IsLink()) + return sortOrder; + + return sortOrder*wxStrcmp( fd1->GetFileType(), fd2->GetFileType() ); +} + +static +int wxCALLBACK wxFileDataTimeCompare(wxIntPtr data1, wxIntPtr data2, wxIntPtr sortOrder) +{ + wxFileData *fd1 = (wxFileData *)wxUIntToPtr(data1); + wxFileData *fd2 = (wxFileData *)wxUIntToPtr(data2); + + if (fd1->GetFileName() == wxT("..")) + return -sortOrder; + if (fd2->GetFileName() == wxT("..")) + return sortOrder; + if (fd1->IsDir() && !fd2->IsDir()) + return -sortOrder; + if (fd2->IsDir() && !fd1->IsDir()) + return sortOrder; + + return fd1->GetDateTime().IsLaterThan(fd2->GetDateTime()) ? sortOrder : -sortOrder; +} + +// defined in src/generic/dirctrlg.cpp +extern size_t wxGetAvailableDrives(wxArrayString &paths, wxArrayString &names, wxArrayInt &icon_ids); + +//----------------------------------------------------------------------------- +// wxFileData +//----------------------------------------------------------------------------- + +wxFileData::wxFileData( const wxString &filePath, const wxString &fileName, fileType type, int image_id ) +{ + Init(); + m_fileName = fileName; + m_filePath = filePath; + m_type = type; + m_image = image_id; + + ReadData(); +} + +void wxFileData::Init() +{ + m_size = 0; + m_type = wxFileData::is_file; + m_image = wxFileIconsTable::file; +} + +void wxFileData::Copy( const wxFileData& fileData ) +{ + m_fileName = fileData.GetFileName(); + m_filePath = fileData.GetFilePath(); + m_size = fileData.GetSize(); + m_dateTime = fileData.GetDateTime(); + m_permissions = fileData.GetPermissions(); + m_type = fileData.GetType(); + m_image = fileData.GetImageId(); +} + +void wxFileData::ReadData() +{ + if (IsDrive()) + { + m_size = 0; + return; + } + +#if defined(__DOS__) || (defined(__WINDOWS__) && !defined(__WXWINCE__)) || defined(__OS2__) + // c:\.. is a drive don't stat it + if ((m_fileName == wxT("..")) && (m_filePath.length() <= 5)) + { + m_type = is_drive; + m_size = 0; + return; + } +#endif // __DOS__ || __WINDOWS__ + +#ifdef __WXWINCE__ + + // WinCE + + DWORD fileAttribs = GetFileAttributes(m_filePath.fn_str()); + m_type |= (fileAttribs & FILE_ATTRIBUTE_DIRECTORY) != 0 ? is_dir : 0; + + wxString p, f, ext; + wxFileName::SplitPath(m_filePath, & p, & f, & ext); + if (wxStricmp(ext, wxT("exe")) == 0) + m_type |= is_exe; + + // Find out size + m_size = 0; + HANDLE fileHandle = CreateFile(m_filePath.fn_str(), + GENERIC_READ, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL); + + if (fileHandle != INVALID_HANDLE_VALUE) + { + m_size = GetFileSize(fileHandle, 0); + CloseHandle(fileHandle); + } + + m_dateTime = wxFileModificationTime(m_filePath); + +#else + + // OTHER PLATFORMS + + wxStructStat buff; + +#if defined(__UNIX__) && (!defined( __OS2__ ) && !defined(__VMS)) + const bool hasStat = lstat( m_filePath.fn_str(), &buff ) == 0; + if ( hasStat ) + m_type |= S_ISLNK(buff.st_mode) ? is_link : 0; +#else // no lstat() + const bool hasStat = wxStat( m_filePath, &buff ) == 0; +#endif + + if ( hasStat ) + { + m_type |= (buff.st_mode & S_IFDIR) != 0 ? is_dir : 0; + m_type |= (buff.st_mode & wxS_IXUSR) != 0 ? is_exe : 0; + + m_size = buff.st_size; + + m_dateTime = buff.st_mtime; + } +#endif + // __WXWINCE__ + +#if defined(__UNIX__) + if ( hasStat ) + { + m_permissions.Printf(wxT("%c%c%c%c%c%c%c%c%c"), + buff.st_mode & wxS_IRUSR ? wxT('r') : wxT('-'), + buff.st_mode & wxS_IWUSR ? wxT('w') : wxT('-'), + buff.st_mode & wxS_IXUSR ? wxT('x') : wxT('-'), + buff.st_mode & wxS_IRGRP ? wxT('r') : wxT('-'), + buff.st_mode & wxS_IWGRP ? wxT('w') : wxT('-'), + buff.st_mode & wxS_IXGRP ? wxT('x') : wxT('-'), + buff.st_mode & wxS_IROTH ? wxT('r') : wxT('-'), + buff.st_mode & wxS_IWOTH ? wxT('w') : wxT('-'), + buff.st_mode & wxS_IXOTH ? wxT('x') : wxT('-')); + } +#elif defined(__WIN32__) + DWORD attribs = ::GetFileAttributes(m_filePath.c_str()); + if (attribs != (DWORD)-1) + { + m_permissions.Printf(wxT("%c%c%c%c"), + attribs & FILE_ATTRIBUTE_ARCHIVE ? wxT('A') : wxT(' '), + attribs & FILE_ATTRIBUTE_READONLY ? wxT('R') : wxT(' '), + attribs & FILE_ATTRIBUTE_HIDDEN ? wxT('H') : wxT(' '), + attribs & FILE_ATTRIBUTE_SYSTEM ? wxT('S') : wxT(' ')); + } +#endif + + // try to get a better icon + if (m_image == wxFileIconsTable::file) + { + if (m_fileName.Find(wxT('.'), true) != wxNOT_FOUND) + { + m_image = wxTheFileIconsTable->GetIconID( m_fileName.AfterLast(wxT('.'))); + } else if (IsExe()) + { + m_image = wxFileIconsTable::executable; + } + } +} + +wxString wxFileData::GetFileType() const +{ + if (IsDir()) + return _(""); + else if (IsLink()) + return _(""); + else if (IsDrive()) + return _(""); + else if (m_fileName.Find(wxT('.'), true) != wxNOT_FOUND) + return m_fileName.AfterLast(wxT('.')); + + return wxEmptyString; +} + +wxString wxFileData::GetModificationTime() const +{ + // want time as 01:02 so they line up nicely, no %r in WIN32 + return m_dateTime.FormatDate() + wxT(" ") + m_dateTime.Format(wxT("%I:%M:%S %p")); +} + +wxString wxFileData::GetHint() const +{ + wxString s = m_filePath; + s += wxT(" "); + + if (IsDir()) + s += _(""); + else if (IsLink()) + s += _(""); + else if (IsDrive()) + s += _(""); + else // plain file + s += wxString::Format(wxPLURAL("%ld byte", "%ld bytes", m_size), + wxLongLong(m_size).ToString().c_str()); + + s += wxT(' '); + + if ( !IsDrive() ) + { + s << GetModificationTime() + << wxT(" ") + << m_permissions; + } + + return s; +} + +wxString wxFileData::GetEntry( fileListFieldType num ) const +{ + wxString s; + switch ( num ) + { + case FileList_Name: + s = m_fileName; + break; + + case FileList_Size: + if (!IsDir() && !IsLink() && !IsDrive()) + s = wxLongLong(m_size).ToString(); + break; + + case FileList_Type: + s = GetFileType(); + break; + + case FileList_Time: + if (!IsDrive()) + s = GetModificationTime(); + break; + +#if defined(__UNIX__) || defined(__WIN32__) + case FileList_Perm: + s = m_permissions; + break; +#endif // defined(__UNIX__) || defined(__WIN32__) + + default: + wxFAIL_MSG( wxT("unexpected field in wxFileData::GetEntry()") ); + } + + return s; +} + +void wxFileData::SetNewName( const wxString &filePath, const wxString &fileName ) +{ + m_fileName = fileName; + m_filePath = filePath; +} + +void wxFileData::MakeItem( wxListItem &item ) +{ + item.m_text = m_fileName; + item.ClearAttributes(); + if (IsExe()) + item.SetTextColour(*wxRED); + if (IsDir()) + item.SetTextColour(*wxBLUE); + + item.m_image = m_image; + + if (IsLink()) + { + wxColour dg = wxTheColourDatabase->Find( wxT("MEDIUM GREY") ); + if ( dg.IsOk() ) + item.SetTextColour(dg); + } + item.m_data = wxPtrToUInt(this); +} + +//----------------------------------------------------------------------------- +// wxFileListCtrl +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxFileListCtrl,wxListCtrl) + +BEGIN_EVENT_TABLE(wxFileListCtrl,wxListCtrl) + EVT_LIST_DELETE_ITEM(wxID_ANY, wxFileListCtrl::OnListDeleteItem) + EVT_LIST_DELETE_ALL_ITEMS(wxID_ANY, wxFileListCtrl::OnListDeleteAllItems) + EVT_LIST_END_LABEL_EDIT(wxID_ANY, wxFileListCtrl::OnListEndLabelEdit) + EVT_LIST_COL_CLICK(wxID_ANY, wxFileListCtrl::OnListColClick) +END_EVENT_TABLE() + + +wxFileListCtrl::wxFileListCtrl() +{ + m_showHidden = false; + m_sort_forward = true; + m_sort_field = wxFileData::FileList_Name; +} + +wxFileListCtrl::wxFileListCtrl(wxWindow *win, + wxWindowID id, + const wxString& wild, + bool showHidden, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator &validator, + const wxString &name) + : wxListCtrl(win, id, pos, size, style, validator, name), + m_wild(wild) +{ + wxImageList *imageList = wxTheFileIconsTable->GetSmallImageList(); + + SetImageList( imageList, wxIMAGE_LIST_SMALL ); + + m_showHidden = showHidden; + + m_sort_forward = true; + m_sort_field = wxFileData::FileList_Name; + + m_dirName = wxT("*"); + + if (style & wxLC_REPORT) + ChangeToReportMode(); +} + +void wxFileListCtrl::ChangeToListMode() +{ + ClearAll(); + SetSingleStyle( wxLC_LIST ); + UpdateFiles(); +} + +void wxFileListCtrl::ChangeToReportMode() +{ + ClearAll(); + SetSingleStyle( wxLC_REPORT ); + + // do this since WIN32 does mm/dd/yy UNIX does mm/dd/yyyy + // don't hardcode since mm/dd is dd/mm elsewhere + int w, h; + wxDateTime dt(22, wxDateTime::Dec, 2002, 22, 22, 22); + wxString txt = dt.FormatDate() + wxT("22") + dt.Format(wxT("%I:%M:%S %p")); + GetTextExtent(txt, &w, &h); + + InsertColumn( 0, _("Name"), wxLIST_FORMAT_LEFT, w ); + InsertColumn( 1, _("Size"), wxLIST_FORMAT_LEFT, w/2 ); + InsertColumn( 2, _("Type"), wxLIST_FORMAT_LEFT, w/2 ); + InsertColumn( 3, _("Modified"), wxLIST_FORMAT_LEFT, w ); +#if defined(__UNIX__) + GetTextExtent(wxT("Permissions 2"), &w, &h); + InsertColumn( 4, _("Permissions"), wxLIST_FORMAT_LEFT, w ); +#elif defined(__WIN32__) + GetTextExtent(wxT("Attributes 2"), &w, &h); + InsertColumn( 4, _("Attributes"), wxLIST_FORMAT_LEFT, w ); +#endif + + UpdateFiles(); +} + +void wxFileListCtrl::ChangeToSmallIconMode() +{ + ClearAll(); + SetSingleStyle( wxLC_SMALL_ICON ); + UpdateFiles(); +} + +void wxFileListCtrl::ShowHidden( bool show ) +{ + m_showHidden = show; + UpdateFiles(); +} + +long wxFileListCtrl::Add( wxFileData *fd, wxListItem &item ) +{ + long ret = -1; + item.m_mask = wxLIST_MASK_TEXT + wxLIST_MASK_DATA + wxLIST_MASK_IMAGE; + fd->MakeItem( item ); + long my_style = GetWindowStyleFlag(); + if (my_style & wxLC_REPORT) + { + ret = InsertItem( item ); + for (int i = 1; i < wxFileData::FileList_Max; i++) + SetItem( item.m_itemId, i, fd->GetEntry((wxFileData::fileListFieldType)i) ); + } + else if ((my_style & wxLC_LIST) || (my_style & wxLC_SMALL_ICON)) + { + ret = InsertItem( item ); + } + return ret; +} + +void wxFileListCtrl::UpdateItem(const wxListItem &item) +{ + wxFileData *fd = (wxFileData*)GetItemData(item); + wxCHECK_RET(fd, wxT("invalid filedata")); + + fd->ReadData(); + + SetItemText(item, fd->GetFileName()); + SetItemImage(item, fd->GetImageId()); + + if (GetWindowStyleFlag() & wxLC_REPORT) + { + for (int i = 1; i < wxFileData::FileList_Max; i++) + SetItem( item.m_itemId, i, fd->GetEntry((wxFileData::fileListFieldType)i) ); + } +} + +void wxFileListCtrl::UpdateFiles() +{ + // don't do anything before ShowModal() call which sets m_dirName + if ( m_dirName == wxT("*") ) + return; + + wxBusyCursor bcur; // this may take a while... + + DeleteAllItems(); + + wxListItem item; + item.m_itemId = 0; + item.m_col = 0; + +#if (defined(__WINDOWS__) || defined(__DOS__) || defined(__WXMAC__) || defined(__OS2__)) && !defined(__WXWINCE__) + if ( IsTopMostDir(m_dirName) ) + { + wxArrayString names, paths; + wxArrayInt icons; + const size_t count = wxGetAvailableDrives(paths, names, icons); + + for ( size_t n = 0; n < count; n++ ) + { + // use paths[n] as the drive name too as our HandleAction() can't + // deal with the drive names (of the form "System (C:)") currently + // as it mistakenly treats them as file names + // + // it would be preferable to show names, and not paths, in the + // dialog just as the native dialog does but for this we must: + // a) store the item type as item data and modify HandleAction() + // to use it instead of wxDirExists() to check whether the item + // is a directory + // b) store the drives by their drive letters and not their + // descriptions as otherwise it's pretty confusing to the user + wxFileData *fd = new wxFileData(paths[n], paths[n], + wxFileData::is_drive, icons[n]); + if (Add(fd, item) != -1) + item.m_itemId++; + else + delete fd; + } + } + else +#endif // defined(__DOS__) || defined(__WINDOWS__) + { + // Real directory... + if ( !IsTopMostDir(m_dirName) && !m_dirName.empty() ) + { + wxString p(wxPathOnly(m_dirName)); +#if (defined(__UNIX__) || defined(__WXWINCE__)) && !defined(__OS2__) + if (p.empty()) p = wxT("/"); +#endif // __UNIX__ + wxFileData *fd = new wxFileData(p, wxT(".."), wxFileData::is_dir, wxFileIconsTable::folder); + if (Add(fd, item) != -1) + item.m_itemId++; + else + delete fd; + } + + wxString dirname(m_dirName); +#if defined(__DOS__) || defined(__WINDOWS__) || defined(__OS2__) + if (dirname.length() == 2 && dirname[1u] == wxT(':')) + dirname << wxT('\\'); +#endif // defined(__DOS__) || defined(__WINDOWS__) || defined(__OS2__) + + if (dirname.empty()) + dirname = wxFILE_SEP_PATH; + + wxLogNull logNull; + wxDir dir(dirname); + + if ( dir.IsOpened() ) + { + wxString dirPrefix(dirname); + if (dirPrefix.Last() != wxFILE_SEP_PATH) + dirPrefix += wxFILE_SEP_PATH; + + int hiddenFlag = m_showHidden ? wxDIR_HIDDEN : 0; + + bool cont; + wxString f; + + // Get the directories first (not matched against wildcards): + cont = dir.GetFirst(&f, wxEmptyString, wxDIR_DIRS | hiddenFlag); + while (cont) + { + wxFileData *fd = new wxFileData(dirPrefix + f, f, wxFileData::is_dir, wxFileIconsTable::folder); + if (Add(fd, item) != -1) + item.m_itemId++; + else + delete fd; + + cont = dir.GetNext(&f); + } + + // Tokenize the wildcard string, so we can handle more than 1 + // search pattern in a wildcard. + wxStringTokenizer tokenWild(m_wild, wxT(";")); + while ( tokenWild.HasMoreTokens() ) + { + cont = dir.GetFirst(&f, tokenWild.GetNextToken(), + wxDIR_FILES | hiddenFlag); + while (cont) + { + wxFileData *fd = new wxFileData(dirPrefix + f, f, wxFileData::is_file, wxFileIconsTable::file); + if (Add(fd, item) != -1) + item.m_itemId++; + else + delete fd; + + cont = dir.GetNext(&f); + } + } + } + } + + SortItems(m_sort_field, m_sort_forward); +} + +void wxFileListCtrl::SetWild( const wxString &wild ) +{ + if (wild.Find(wxT('|')) != wxNOT_FOUND) + return; + + m_wild = wild; + UpdateFiles(); +} + +void wxFileListCtrl::MakeDir() +{ + wxString new_name( _("NewName") ); + wxString path( m_dirName ); + path += wxFILE_SEP_PATH; + path += new_name; + if (wxFileExists(path)) + { + // try NewName0, NewName1 etc. + int i = 0; + do { + new_name = _("NewName"); + wxString num; + num.Printf( wxT("%d"), i ); + new_name += num; + + path = m_dirName; + path += wxFILE_SEP_PATH; + path += new_name; + i++; + } while (wxFileExists(path)); + } + + wxLogNull log; + if (!wxMkdir(path)) + { + wxMessageDialog dialog(this, _("Operation not permitted."), _("Error"), wxOK | wxICON_ERROR ); + dialog.ShowModal(); + return; + } + + wxFileData *fd = new wxFileData( path, new_name, wxFileData::is_dir, wxFileIconsTable::folder ); + wxListItem item; + item.m_itemId = 0; + item.m_col = 0; + long itemid = Add( fd, item ); + + if (itemid != -1) + { + SortItems(m_sort_field, m_sort_forward); + itemid = FindItem( 0, wxPtrToUInt(fd) ); + EnsureVisible( itemid ); + EditLabel( itemid ); + } + else + delete fd; +} + +void wxFileListCtrl::GoToParentDir() +{ + if (!IsTopMostDir(m_dirName)) + { + size_t len = m_dirName.length(); + if (wxEndsWithPathSeparator(m_dirName)) + m_dirName.Remove( len-1, 1 ); + wxString fname( wxFileNameFromPath(m_dirName) ); + m_dirName = wxPathOnly( m_dirName ); +#if defined(__DOS__) || defined(__WINDOWS__) || defined(__OS2__) + if (!m_dirName.empty()) + { + if (m_dirName.Last() == wxT('.')) + m_dirName = wxEmptyString; + } +#elif defined(__UNIX__) + if (m_dirName.empty()) + m_dirName = wxT("/"); +#endif + UpdateFiles(); + long id = FindItem( 0, fname ); + if (id != wxNOT_FOUND) + { + SetItemState( id, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED ); + EnsureVisible( id ); + } + } +} + +void wxFileListCtrl::GoToHomeDir() +{ + wxString s = wxGetUserHome( wxString() ); + GoToDir(s); +} + +void wxFileListCtrl::GoToDir( const wxString &dir ) +{ + if (!wxDirExists(dir)) return; + + m_dirName = dir; + UpdateFiles(); + + SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED ); + + EnsureVisible( 0 ); +} + +void wxFileListCtrl::FreeItemData(wxListItem& item) +{ + if ( item.m_data ) + { + wxFileData *fd = (wxFileData*)item.m_data; + delete fd; + + item.m_data = 0; + } +} + +void wxFileListCtrl::OnListDeleteItem( wxListEvent &event ) +{ + FreeItemData(event.m_item); +} + +void wxFileListCtrl::OnListDeleteAllItems( wxListEvent & WXUNUSED(event) ) +{ + FreeAllItemsData(); +} + +void wxFileListCtrl::FreeAllItemsData() +{ + wxListItem item; + item.m_mask = wxLIST_MASK_DATA; + + item.m_itemId = GetNextItem( -1, wxLIST_NEXT_ALL ); + while ( item.m_itemId != -1 ) + { + GetItem( item ); + FreeItemData(item); + item.m_itemId = GetNextItem( item.m_itemId, wxLIST_NEXT_ALL ); + } +} + +void wxFileListCtrl::OnListEndLabelEdit( wxListEvent &event ) +{ + wxFileData *fd = (wxFileData*)event.m_item.m_data; + wxASSERT( fd ); + + if ((event.GetLabel().empty()) || + (event.GetLabel() == wxT(".")) || + (event.GetLabel() == wxT("..")) || + (event.GetLabel().First( wxFILE_SEP_PATH ) != wxNOT_FOUND)) + { + wxMessageDialog dialog(this, _("Illegal directory name."), _("Error"), wxOK | wxICON_ERROR ); + dialog.ShowModal(); + event.Veto(); + return; + } + + wxString new_name( wxPathOnly( fd->GetFilePath() ) ); + new_name += wxFILE_SEP_PATH; + new_name += event.GetLabel(); + + wxLogNull log; + + if (wxFileExists(new_name)) + { + wxMessageDialog dialog(this, _("File name exists already."), _("Error"), wxOK | wxICON_ERROR ); + dialog.ShowModal(); + event.Veto(); + } + + if (wxRenameFile(fd->GetFilePath(),new_name)) + { + fd->SetNewName( new_name, event.GetLabel() ); + + SetItemState( event.GetItem(), wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED ); + + UpdateItem( event.GetItem() ); + EnsureVisible( event.GetItem() ); + } + else + { + wxMessageDialog dialog(this, _("Operation not permitted."), _("Error"), wxOK | wxICON_ERROR ); + dialog.ShowModal(); + event.Veto(); + } +} + +void wxFileListCtrl::OnListColClick( wxListEvent &event ) +{ + int col = event.GetColumn(); + + switch (col) + { + case wxFileData::FileList_Name : + case wxFileData::FileList_Size : + case wxFileData::FileList_Type : + case wxFileData::FileList_Time : break; + default : return; + } + + if ((wxFileData::fileListFieldType)col == m_sort_field) + m_sort_forward = !m_sort_forward; + else + m_sort_field = (wxFileData::fileListFieldType)col; + + SortItems(m_sort_field, m_sort_forward); +} + +void wxFileListCtrl::SortItems(wxFileData::fileListFieldType field, bool forward) +{ + m_sort_field = field; + m_sort_forward = forward; + const long sort_dir = forward ? 1 : -1; + + switch (m_sort_field) + { + case wxFileData::FileList_Size : + wxListCtrl::SortItems(wxFileDataSizeCompare, sort_dir); + break; + + case wxFileData::FileList_Type : + wxListCtrl::SortItems(wxFileDataTypeCompare, sort_dir); + break; + + case wxFileData::FileList_Time : + wxListCtrl::SortItems(wxFileDataTimeCompare, sort_dir); + break; + + case wxFileData::FileList_Name : + default : + wxListCtrl::SortItems(wxFileDataNameCompare, sort_dir); + break; + } +} + +wxFileListCtrl::~wxFileListCtrl() +{ + // Normally the data are freed via an EVT_LIST_DELETE_ALL_ITEMS event and + // wxFileListCtrl::OnListDeleteAllItems. But if the event is generated after + // the destruction of the wxFileListCtrl we need to free any data here: + FreeAllItemsData(); +} + +#define ID_CHOICE (wxID_FILECTRL + 1) +#define ID_TEXT (wxID_FILECTRL + 2) +#define ID_FILELIST_CTRL (wxID_FILECTRL + 3) +#define ID_CHECK (wxID_FILECTRL + 4) + +/////////////////////////////////////////////////////////////////////////////// +// wxGenericFileCtrl implementation +/////////////////////////////////////////////////////////////////////////////// + +IMPLEMENT_DYNAMIC_CLASS( wxGenericFileCtrl, wxNavigationEnabled ) + +BEGIN_EVENT_TABLE( wxGenericFileCtrl, wxNavigationEnabled ) + EVT_LIST_ITEM_SELECTED( ID_FILELIST_CTRL, wxGenericFileCtrl::OnSelected ) + EVT_LIST_ITEM_ACTIVATED( ID_FILELIST_CTRL, wxGenericFileCtrl::OnActivated ) + EVT_CHOICE( ID_CHOICE, wxGenericFileCtrl::OnChoiceFilter ) + EVT_TEXT_ENTER( ID_TEXT, wxGenericFileCtrl::OnTextEnter ) + EVT_TEXT( ID_TEXT, wxGenericFileCtrl::OnTextChange ) + EVT_CHECKBOX( ID_CHECK, wxGenericFileCtrl::OnCheck ) +END_EVENT_TABLE() + +bool wxGenericFileCtrl::Create( wxWindow *parent, + wxWindowID id, + const wxString& defaultDirectory, + const wxString& defaultFileName, + const wxString& wildCard, + long style, + const wxPoint& pos, + const wxSize& size, + const wxString& name ) +{ + this->m_style = style; + m_inSelected = false; + m_noSelChgEvent = false; + m_check = NULL; + + // check that the styles are not contradictory + wxASSERT_MSG( !( ( m_style & wxFC_SAVE ) && ( m_style & wxFC_OPEN ) ), + wxT( "can't specify both wxFC_SAVE and wxFC_OPEN at once" ) ); + + wxASSERT_MSG( !( ( m_style & wxFC_SAVE ) && ( m_style & wxFC_MULTIPLE ) ), + wxT( "wxFC_MULTIPLE can't be used with wxFC_SAVE" ) ); + + wxNavigationEnabled::Create( parent, id, + pos, size, + wxTAB_TRAVERSAL, + wxDefaultValidator, + name ); + + m_dir = defaultDirectory; + + m_ignoreChanges = true; + + if ( ( m_dir.empty() ) || ( m_dir == wxT( "." ) ) ) + { + m_dir = wxGetCwd(); + if ( m_dir.empty() ) + m_dir = wxFILE_SEP_PATH; + } + + const size_t len = m_dir.length(); + if ( ( len > 1 ) && ( wxEndsWithPathSeparator( m_dir ) ) ) + m_dir.Remove( len - 1, 1 ); + + m_filterExtension = wxEmptyString; + + // layout + + const bool is_pda = ( wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA ); + + wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer *staticsizer = new wxBoxSizer( wxHORIZONTAL ); + if ( is_pda ) + staticsizer->Add( new wxStaticText( this, wxID_ANY, _( "Current directory:" ) ), + wxSizerFlags().DoubleBorder(wxRIGHT) ); + m_static = new wxStaticText( this, wxID_ANY, m_dir ); + staticsizer->Add( m_static, 1 ); + mainsizer->Add( staticsizer, wxSizerFlags().Expand().Border()); + + long style2 = wxLC_LIST; + if ( !( m_style & wxFC_MULTIPLE ) ) + style2 |= wxLC_SINGLE_SEL; + +#ifdef __WXWINCE__ + style2 |= wxSIMPLE_BORDER; +#else + style2 |= wxSUNKEN_BORDER; +#endif + + m_list = new wxFileListCtrl( this, ID_FILELIST_CTRL, + wxEmptyString, false, + wxDefaultPosition, wxSize( 400, 140 ), + style2 ); + + m_text = new wxTextCtrl( this, ID_TEXT, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + wxTE_PROCESS_ENTER ); + m_choice = new wxChoice( this, ID_CHOICE ); + + if ( is_pda ) + { + // PDAs have a different screen layout + mainsizer->Add( m_list, wxSizerFlags( 1 ).Expand().HorzBorder() ); + + wxBoxSizer *textsizer = new wxBoxSizer( wxHORIZONTAL ); + textsizer->Add( m_text, wxSizerFlags( 1 ).Centre().Border() ); + textsizer->Add( m_choice, wxSizerFlags( 1 ).Centre().Border() ); + mainsizer->Add( textsizer, wxSizerFlags().Expand() ); + + } + else // !is_pda + { + mainsizer->Add( m_list, wxSizerFlags( 1 ).Expand().Border() ); + mainsizer->Add( m_text, wxSizerFlags().Expand().Border() ); + + wxBoxSizer *choicesizer = new wxBoxSizer( wxHORIZONTAL ); + choicesizer->Add( m_choice, wxSizerFlags( 1 ).Centre() ); + + if ( !( m_style & wxFC_NOSHOWHIDDEN ) ) + { + m_check = new wxCheckBox( this, ID_CHECK, _( "Show &hidden files" ) ); + choicesizer->Add( m_check, wxSizerFlags().Centre().DoubleBorder(wxLEFT) ); + } + + mainsizer->Add( choicesizer, wxSizerFlags().Expand().Border() ); + } + + SetWildcard( wildCard ); + + SetAutoLayout( true ); + SetSizer( mainsizer ); + + if ( !is_pda ) + { + mainsizer->Fit( this ); + } + + m_list->GoToDir( m_dir ); + UpdateControls(); + m_text->SetValue( m_fileName ); + + m_ignoreChanges = false; + + // must be after m_ignoreChanges = false + SetFilename( defaultFileName ); + + return true; +} + +// NB: there is an unfortunate mismatch between wxFileName and wxFileDialog +// method names but our GetDirectory() does correspond to wxFileName:: +// GetPath() while our GetPath() is wxFileName::GetFullPath() +wxString wxGenericFileCtrl::GetPath() const +{ + wxASSERT_MSG ( !(m_style & wxFC_MULTIPLE), "use GetPaths() instead" ); + + return DoGetFileName().GetFullPath(); +} + +wxString wxGenericFileCtrl::GetFilename() const +{ + wxASSERT_MSG ( !(m_style & wxFC_MULTIPLE), "use GetFilenames() instead" ); + + return DoGetFileName().GetFullName(); +} + +wxString wxGenericFileCtrl::GetDirectory() const +{ + // don't check for wxFC_MULTIPLE here, this one is probably safe to call in + // any case as it can be always taken to mean "current directory" + return DoGetFileName().GetPath(); +} + +wxFileName wxGenericFileCtrl::DoGetFileName() const +{ + wxFileName fn; + + wxString value = m_text->GetValue(); + if ( value.empty() ) + { + // nothing in the text control, get the selected file from the list + wxListItem item; + item.m_itemId = m_list->GetNextItem(-1, wxLIST_NEXT_ALL, + wxLIST_STATE_SELECTED); + m_list->GetItem(item); + + fn.Assign(m_list->GetDir(), item.m_text); + } + else // user entered the value + { + // the path can be either absolute or relative + fn.Assign(value); + if ( fn.IsRelative() ) + fn.MakeAbsolute(m_list->GetDir()); + } + + return fn; +} + +// helper used in DoGetFilenames() and needed because Borland can't compile +// operator?: inline +static inline wxString GetFileNameOrPath(const wxFileName& fn, bool fullPath) +{ + return fullPath ? fn.GetFullPath() : fn.GetFullName(); +} + +void +wxGenericFileCtrl::DoGetFilenames(wxArrayString& filenames, bool fullPath) const +{ + filenames.clear(); + + const wxString dir = m_list->GetDir(); + + const wxString value = m_text->GetValue(); + if ( !value.empty() ) + { + wxFileName fn(value); + if ( fn.IsRelative() ) + fn.MakeAbsolute(dir); + + filenames.push_back(GetFileNameOrPath(fn, fullPath)); + return; + } + + const int numSel = m_list->GetSelectedItemCount(); + if ( !numSel ) + return; + + filenames.reserve(numSel); + + wxListItem item; + item.m_mask = wxLIST_MASK_TEXT; + item.m_itemId = -1; + for ( ;; ) + { + item.m_itemId = m_list->GetNextItem(item.m_itemId, wxLIST_NEXT_ALL, + wxLIST_STATE_SELECTED); + + if ( item.m_itemId == -1 ) + break; + + m_list->GetItem(item); + + const wxFileName fn(dir, item.m_text); + filenames.push_back(GetFileNameOrPath(fn, fullPath)); + } +} + +bool wxGenericFileCtrl::SetDirectory( const wxString& dir ) +{ + m_ignoreChanges = true; + m_list->GoToDir( dir ); + UpdateControls(); + m_ignoreChanges = false; + + return wxFileName( dir ).SameAs( m_list->GetDir() ); +} + +bool wxGenericFileCtrl::SetFilename( const wxString& name ) +{ + const long item = m_list->FindItem( -1, name ); + + if ( item == -1 ) // file not found either because it doesn't exist or the + // current filter doesn't show it. + return false; + + m_noSelChgEvent = true; + + // Deselect selected items + { + const int numSelectedItems = m_list->GetSelectedItemCount(); + + if ( numSelectedItems > 0 ) + { + long itemIndex = -1; + + for ( ;; ) + { + itemIndex = m_list->GetNextItem( itemIndex, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); + if ( itemIndex == -1 ) + break; + + m_list->SetItemState( itemIndex, 0, wxLIST_STATE_SELECTED ); + } + } + } + + m_list->SetItemState( item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED ); + m_list->EnsureVisible( item ); + + m_noSelChgEvent = false; + + return true; +} + +void wxGenericFileCtrl::DoSetFilterIndex( int filterindex ) +{ + wxClientData *pcd = m_choice->GetClientObject( filterindex ); + if ( !pcd ) + return; + + const wxString& str = ((static_cast(pcd))->GetData()); + m_list->SetWild( str ); + m_filterIndex = filterindex; + if ( str.Left( 2 ) == wxT( "*." ) ) + { + m_filterExtension = str.Mid( 1 ); + if ( m_filterExtension == wxT( ".*" ) ) + m_filterExtension.clear(); + } + else + { + m_filterExtension.clear(); + } + + GenerateFilterChangedEvent( this, this ); +} + +void wxGenericFileCtrl::SetWildcard( const wxString& wildCard ) +{ + if ( wildCard.empty() || wildCard == wxFileSelectorDefaultWildcardStr ) + { + m_wildCard = wxString::Format( _( "All files (%s)|%s" ), + wxFileSelectorDefaultWildcardStr, + wxFileSelectorDefaultWildcardStr ); + } + else + m_wildCard = wildCard; + + wxArrayString wildDescriptions, wildFilters; + const size_t count = wxParseCommonDialogsFilter( m_wildCard, + wildDescriptions, + wildFilters ); + wxCHECK_RET( count, wxT( "wxFileDialog: bad wildcard string" ) ); + + m_choice->Clear(); + + for ( size_t n = 0; n < count; n++ ) + { + m_choice->Append(wildDescriptions[n], new wxStringClientData(wildFilters[n])); + } + + SetFilterIndex( 0 ); +} + +void wxGenericFileCtrl::SetFilterIndex( int filterindex ) +{ + m_choice->SetSelection( filterindex ); + + DoSetFilterIndex( filterindex ); +} + +void wxGenericFileCtrl::OnChoiceFilter( wxCommandEvent &event ) +{ + DoSetFilterIndex( ( int )event.GetInt() ); +} + +void wxGenericFileCtrl::OnCheck( wxCommandEvent &event ) +{ + m_list->ShowHidden( event.GetInt() != 0 ); +} + +void wxGenericFileCtrl::OnActivated( wxListEvent &event ) +{ + HandleAction( event.m_item.m_text ); +} + +void wxGenericFileCtrl::OnTextEnter( wxCommandEvent &WXUNUSED( event ) ) +{ + HandleAction( m_text->GetValue() ); +} + +void wxGenericFileCtrl::OnTextChange( wxCommandEvent &WXUNUSED( event ) ) +{ + if ( !m_ignoreChanges ) + { + // Clear selections. Otherwise when the user types in a value they may + // not get the file whose name they typed. + if ( m_list->GetSelectedItemCount() > 0 ) + { + long item = m_list->GetNextItem( -1, wxLIST_NEXT_ALL, + wxLIST_STATE_SELECTED ); + while ( item != -1 ) + { + m_list->SetItemState( item, 0, wxLIST_STATE_SELECTED ); + item = m_list->GetNextItem( item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); + } + } + } +} + +void wxGenericFileCtrl::OnSelected( wxListEvent &event ) +{ + if ( m_ignoreChanges ) + return; + + if ( m_inSelected ) + return; + + m_inSelected = true; + const wxString filename( event.m_item.m_text ); + +#ifdef __WXWINCE__ + // No double-click on most WinCE devices, so do action immediately. + HandleAction( filename ); +#else + if ( filename == wxT( ".." ) ) + { + m_inSelected = false; + return; + } + + wxString dir = m_list->GetDir(); + if ( !IsTopMostDir( dir ) ) + dir += wxFILE_SEP_PATH; + dir += filename; + if ( wxDirExists( dir ) ) + { + m_inSelected = false; + + return; + } + + + m_ignoreChanges = true; + m_text->SetValue( filename ); + + if ( m_list->GetSelectedItemCount() > 1 ) + { + m_text->Clear(); + } + + if ( !m_noSelChgEvent ) + GenerateSelectionChangedEvent( this, this ); + + m_ignoreChanges = false; +#endif + m_inSelected = false; +} + +void wxGenericFileCtrl::HandleAction( const wxString &fn ) +{ + if ( m_ignoreChanges ) + return; + + wxString filename( fn ); + if ( filename.empty() ) + { + return; + } + if ( filename == wxT( "." ) ) return; + + wxString dir = m_list->GetDir(); + + // "some/place/" means they want to chdir not try to load "place" + const bool want_dir = filename.Last() == wxFILE_SEP_PATH; + if ( want_dir ) + filename = filename.RemoveLast(); + + if ( filename == wxT( ".." ) ) + { + m_ignoreChanges = true; + m_list->GoToParentDir(); + + GenerateFolderChangedEvent( this, this ); + + UpdateControls(); + m_ignoreChanges = false; + return; + } + +#ifdef __UNIX__ + if ( filename == wxT( "~" ) ) + { + m_ignoreChanges = true; + m_list->GoToHomeDir(); + + GenerateFolderChangedEvent( this, this ); + + UpdateControls(); + m_ignoreChanges = false; + return; + } + + if ( filename.BeforeFirst( wxT( '/' ) ) == wxT( "~" ) ) + { + filename = wxString( wxGetUserHome() ) + filename.Remove( 0, 1 ); + } +#endif // __UNIX__ + + if ( !( m_style & wxFC_SAVE ) ) + { + if ( ( filename.Find( wxT( '*' ) ) != wxNOT_FOUND ) || + ( filename.Find( wxT( '?' ) ) != wxNOT_FOUND ) ) + { + if ( filename.Find( wxFILE_SEP_PATH ) != wxNOT_FOUND ) + { + wxMessageBox( _( "Illegal file specification." ), + _( "Error" ), wxOK | wxICON_ERROR, this ); + return; + } + m_list->SetWild( filename ); + return; + } + } + + if ( !IsTopMostDir( dir ) ) + dir += wxFILE_SEP_PATH; + if ( !wxIsAbsolutePath( filename ) ) + { + dir += filename; + filename = dir; + } + + if ( wxDirExists( filename ) ) + { + m_ignoreChanges = true; + m_list->GoToDir( filename ); + UpdateControls(); + + GenerateFolderChangedEvent( this, this ); + + m_ignoreChanges = false; + return; + } + + // they really wanted a dir, but it doesn't exist + if ( want_dir ) + { + wxMessageBox( _( "Directory doesn't exist." ), _( "Error" ), + wxOK | wxICON_ERROR, this ); + return; + } + + // append the default extension to the filename if it doesn't have any + // + // VZ: the logic of testing for !wxFileExists() only for the open file + // dialog is not entirely clear to me, why don't we allow saving to a + // file without extension as well? + if ( !( m_style & wxFC_OPEN ) || !wxFileExists( filename ) ) + { + filename = wxFileDialogBase::AppendExtension( filename, m_filterExtension ); + GenerateFileActivatedEvent( this, this, wxFileName( filename ).GetFullName() ); + return; + } + + GenerateFileActivatedEvent( this, this ); +} + +bool wxGenericFileCtrl::SetPath( const wxString& path ) +{ + if ( !wxFileName::FileExists( ( path ) ) ) + return false; + + wxString ext; + wxFileName::SplitPath( path, &m_dir, &m_fileName, &ext ); + if ( !ext.empty() ) + { + m_fileName += wxT( "." ); + m_fileName += ext; + } + + SetDirectory( m_dir ); + SetFilename( m_fileName ); + + return true; +} + +void wxGenericFileCtrl::GetPaths( wxArrayString& paths ) const +{ + DoGetFilenames( paths, true ); +} + +void wxGenericFileCtrl::GetFilenames( wxArrayString& files ) const +{ + DoGetFilenames( files, false ); +} + +void wxGenericFileCtrl::UpdateControls() +{ + const wxString dir = m_list->GetDir(); + m_static->SetLabel( dir ); +} + +void wxGenericFileCtrl::GoToParentDir() +{ + m_list->GoToParentDir(); + UpdateControls(); +} + +void wxGenericFileCtrl::GoToHomeDir() +{ + m_list->GoToHomeDir(); + UpdateControls(); +} + +#endif // wxUSE_FILECTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/filedlgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/filedlgg.cpp new file mode 100644 index 0000000000..9ec0842c64 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/filedlgg.cpp @@ -0,0 +1,406 @@ +////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/filedlgg.cpp +// Purpose: wxGenericFileDialog +// Author: Robert Roebling +// Modified by: +// Created: 12/12/98 +// Copyright: (c) Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FILEDLG + +// NOTE : it probably also supports MAC, untested +#if !defined(__UNIX__) && !defined(__DOS__) && !defined(__WIN32__) && !defined(__OS2__) +#error wxGenericFileDialog currently only supports Unix, win32 and DOS +#endif + +#ifndef WX_PRECOMP + #ifdef __WXMSW__ + #include "wx/msw/wrapwin.h" + #endif + #include "wx/hash.h" + #include "wx/intl.h" + #include "wx/settings.h" + #include "wx/log.h" + #include "wx/msgdlg.h" + #include "wx/bmpbuttn.h" + #include "wx/checkbox.h" + #include "wx/choice.h" + #include "wx/stattext.h" + #include "wx/textctrl.h" + #include "wx/sizer.h" + #include "wx/filedlg.h" // wxFD_OPEN, wxFD_SAVE... +#endif + +#include "wx/longlong.h" +#include "wx/config.h" +#include "wx/imaglist.h" +#include "wx/artprov.h" +#include "wx/filefn.h" +#include "wx/filectrl.h" +#include "wx/generic/filedlgg.h" +#include "wx/debug.h" +#include "wx/modalhook.h" + +#if wxUSE_TOOLTIPS + #include "wx/tooltip.h" +#endif +#if wxUSE_CONFIG + #include "wx/config.h" +#endif + +#ifndef __WXWINCE__ + #include + #include +#endif + +#ifdef __UNIX__ + #include + #include + #ifndef __VMS + # include + #endif +#endif + +#ifdef __WINDOWS__ + #include "wx/msw/mslu.h" +#endif + +#ifdef __WATCOMC__ + #include +#endif + +#ifndef __WXWINCE__ +#include +#endif + +#if defined(__UNIX__) || defined(__DOS__) +#include +#endif + +#if defined(__WXWINCE__) +#define IsTopMostDir(dir) (dir == wxT("\\") || dir == wxT("/")) +#elif (defined(__DOS__) || defined(__WINDOWS__) || defined (__OS2__)) +#define IsTopMostDir(dir) (dir.empty()) +#else +#define IsTopMostDir(dir) (dir == wxT("/")) +#endif + +//----------------------------------------------------------------------------- +// wxGenericFileDialog +//----------------------------------------------------------------------------- + +#define ID_LIST_MODE (wxID_FILEDLGG ) +#define ID_REPORT_MODE (wxID_FILEDLGG + 1) +#define ID_UP_DIR (wxID_FILEDLGG + 2) +#define ID_HOME_DIR (wxID_FILEDLGG + 3) +#define ID_NEW_DIR (wxID_FILEDLGG + 4) +#define ID_FILE_CTRL (wxID_FILEDLGG + 5) + +IMPLEMENT_DYNAMIC_CLASS(wxGenericFileDialog, wxFileDialogBase) + +BEGIN_EVENT_TABLE(wxGenericFileDialog,wxDialog) + EVT_BUTTON(ID_LIST_MODE, wxGenericFileDialog::OnList) + EVT_BUTTON(ID_REPORT_MODE, wxGenericFileDialog::OnReport) + EVT_BUTTON(ID_UP_DIR, wxGenericFileDialog::OnUp) + EVT_BUTTON(ID_HOME_DIR, wxGenericFileDialog::OnHome) + EVT_BUTTON(ID_NEW_DIR, wxGenericFileDialog::OnNew) + EVT_BUTTON(wxID_OK, wxGenericFileDialog::OnOk) + EVT_FILECTRL_FILEACTIVATED(ID_FILE_CTRL, wxGenericFileDialog::OnFileActivated) + + EVT_UPDATE_UI(ID_UP_DIR, wxGenericFileDialog::OnUpdateButtonsUI) +#if defined(__DOS__) || defined(__WINDOWS__) || defined(__OS2__) + EVT_UPDATE_UI(ID_NEW_DIR, wxGenericFileDialog::OnUpdateButtonsUI) +#endif // defined(__DOS__) || defined(__WINDOWS__) || defined(__OS2__) +END_EVENT_TABLE() + +long wxGenericFileDialog::ms_lastViewStyle = wxLC_LIST; +bool wxGenericFileDialog::ms_lastShowHidden = false; + +void wxGenericFileDialog::Init() +{ + m_bypassGenericImpl = false; + + m_filectrl = NULL; + m_upDirButton = NULL; + m_newDirButton = NULL; +} + +wxGenericFileDialog::wxGenericFileDialog(wxWindow *parent, + const wxString& message, + const wxString& defaultDir, + const wxString& defaultFile, + const wxString& wildCard, + long style, + const wxPoint& pos, + const wxSize& sz, + const wxString& name, + bool bypassGenericImpl ) : wxFileDialogBase() +{ + Init(); + Create( parent, message, defaultDir, defaultFile, wildCard, style, pos, sz, name, bypassGenericImpl ); +} + +bool wxGenericFileDialog::Create( wxWindow *parent, + const wxString& message, + const wxString& defaultDir, + const wxString& defaultFile, + const wxString& wildCard, + long style, + const wxPoint& pos, + const wxSize& sz, + const wxString& name, + bool bypassGenericImpl ) +{ + m_bypassGenericImpl = bypassGenericImpl; + + parent = GetParentForModalDialog(parent, style); + + if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFile, + wildCard, style, pos, sz, name)) + { + return false; + } + + if (m_bypassGenericImpl) + return true; + + if (!wxDialog::Create( parent, wxID_ANY, message, pos, sz, + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | style, name + )) + { + return false; + } + +#if wxUSE_CONFIG + if (wxConfig::Get(false)) + { + wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ViewStyle"), + &ms_lastViewStyle); + wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ShowHidden"), + &ms_lastShowHidden); + } +#endif + + if ((m_dir.empty()) || (m_dir == wxT("."))) + { + m_dir = wxGetCwd(); + if (m_dir.empty()) + m_dir = wxFILE_SEP_PATH; + } + + const size_t len = m_dir.length(); + if ((len > 1) && (wxEndsWithPathSeparator(m_dir))) + m_dir.Remove( len-1, 1 ); + + m_filterExtension = wxEmptyString; + + // layout + + const bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); + + wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer *buttonsizer = new wxBoxSizer( wxHORIZONTAL ); + AddBitmapButton( ID_LIST_MODE, wxART_LIST_VIEW, + _("View files as a list view"), buttonsizer ); + AddBitmapButton( ID_REPORT_MODE, wxART_REPORT_VIEW, + _("View files as a detailed view"), buttonsizer ); + buttonsizer->Add( 30, 5, 1 ); + m_upDirButton = AddBitmapButton( ID_UP_DIR, wxART_GO_DIR_UP, + _("Go to parent directory"), buttonsizer ); + +#ifndef __DOS__ // VS: Home directory is meaningless in MS-DOS... + AddBitmapButton( ID_HOME_DIR, wxART_GO_HOME, + _("Go to home directory"), buttonsizer ); + buttonsizer->Add( 20, 20 ); +#endif //!__DOS__ + + m_newDirButton = AddBitmapButton( ID_NEW_DIR, wxART_NEW_DIR, + _("Create new directory"), buttonsizer ); + + if (is_pda) + mainsizer->Add( buttonsizer, wxSizerFlags().Expand() ); + else + mainsizer->Add( buttonsizer, wxSizerFlags().Expand() + .Border( wxLEFT | wxRIGHT | wxTOP ) ); + + long style2 = 0; + if ( HasFdFlag(wxFD_MULTIPLE) ) + style2 |= wxFC_MULTIPLE; + + m_filectrl = new wxGenericFileCtrl( this, ID_FILE_CTRL, + m_dir, defaultFile, + wildCard, + style2, + wxDefaultPosition, wxSize(540,200) + ); + + m_filectrl->ShowHidden( ms_lastShowHidden ); + + if (ms_lastViewStyle == wxLC_LIST) + { + m_filectrl->ChangeToListMode(); + } + else if (ms_lastViewStyle == wxLC_REPORT) + { + m_filectrl->ChangeToReportMode(); + } + + mainsizer->Add(m_filectrl, wxSizerFlags(1).Expand().HorzBorder()); + + wxSizer *bsizer = CreateButtonSizer(wxOK | wxCANCEL); + if ( bsizer ) + { + if (is_pda) + mainsizer->Add(bsizer, wxSizerFlags().Expand().Border()); + else + mainsizer->Add(bsizer, wxSizerFlags().Expand().DoubleBorder()); + } + + SetSizer( mainsizer ); + + if (!is_pda) + { + mainsizer->SetSizeHints( this ); + + Centre( wxBOTH ); + } + + return true; +} + +wxGenericFileDialog::~wxGenericFileDialog() +{ + if (!m_bypassGenericImpl) + { +#if wxUSE_CONFIG + if (wxConfig::Get(false)) + { + wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ViewStyle"), + ms_lastViewStyle); + wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ShowHidden"), + ms_lastShowHidden); + } +#endif + } +} + +wxBitmapButton* wxGenericFileDialog::AddBitmapButton( wxWindowID winId, + const wxArtID& artId, + const wxString& tip, + wxSizer *sizer) +{ + wxBitmapButton *but = new wxBitmapButton(this, winId, + wxArtProvider::GetBitmap(artId, wxART_BUTTON)); + but->SetToolTip(tip); + sizer->Add(but, wxSizerFlags().Border()); + return but; +} + +int wxGenericFileDialog::ShowModal() +{ + WX_HOOK_MODAL_DIALOG(); + + if (CreateExtraControl()) + { + wxSizer *sizer = GetSizer(); + sizer->Insert(2 /* after m_filectrl */, m_extraControl, + wxSizerFlags().Expand().HorzBorder()); + sizer->Fit(this); + } + + m_filectrl->SetDirectory(m_dir); + + return wxDialog::ShowModal(); +} + +bool wxGenericFileDialog::Show( bool show ) +{ + // Called by ShowModal, so don't repeate the update +#ifndef __WIN32__ + if (show) + { + m_filectrl->SetDirectory(m_dir); + } +#endif + + return wxDialog::Show( show ); +} + +void wxGenericFileDialog::OnOk( wxCommandEvent &WXUNUSED(event) ) +{ + wxArrayString selectedFiles; + m_filectrl->GetFilenames(selectedFiles); + + if (selectedFiles.Count() == 0) + return; + + if (selectedFiles.Count() == 1) + { + SetPath( selectedFiles[0] ); + } + + EndModal(wxID_OK); +} + +void wxGenericFileDialog::OnList( wxCommandEvent &WXUNUSED(event) ) +{ + m_filectrl->ChangeToListMode(); + ms_lastViewStyle = wxLC_LIST; + m_filectrl->GetFileList()->SetFocus(); +} + +void wxGenericFileDialog::OnReport( wxCommandEvent &WXUNUSED(event) ) +{ + m_filectrl->ChangeToReportMode(); + ms_lastViewStyle = wxLC_REPORT; + m_filectrl->GetFileList()->SetFocus(); +} + +void wxGenericFileDialog::OnUp( wxCommandEvent &WXUNUSED(event) ) +{ + m_filectrl->GoToParentDir(); + m_filectrl->GetFileList()->SetFocus(); +} + +void wxGenericFileDialog::OnHome( wxCommandEvent &WXUNUSED(event) ) +{ + m_filectrl->GoToHomeDir(); + m_filectrl->SetFocus(); +} + +void wxGenericFileDialog::OnNew( wxCommandEvent &WXUNUSED(event) ) +{ + m_filectrl->GetFileList()->MakeDir(); +} + +void wxGenericFileDialog::OnFileActivated( wxFileCtrlEvent &WXUNUSED(event) ) +{ + wxCommandEvent dummy; + OnOk( dummy ); +} + +void wxGenericFileDialog::OnUpdateButtonsUI(wxUpdateUIEvent& event) +{ + // surprisingly, we can be called before m_filectrl is set in Create() as + // wxFileCtrl ctor itself can generate idle events, so we need this test + if ( m_filectrl ) + event.Enable( !IsTopMostDir(m_filectrl->GetShownDirectory()) ); +} + +#ifdef wxHAS_GENERIC_FILEDIALOG + +IMPLEMENT_DYNAMIC_CLASS(wxFileDialog, wxGenericFileDialog) + +#endif // wxHAS_GENERIC_FILEDIALOG + +#endif // wxUSE_FILEDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/filepickerg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/filepickerg.cpp new file mode 100644 index 0000000000..225da729d2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/filepickerg.cpp @@ -0,0 +1,155 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/filepickerg.cpp +// Purpose: wxGenericFileDirButton class implementation +// Author: Francesco Montorsi +// Modified by: +// Created: 15/04/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL + +#include "wx/filename.h" +#include "wx/filepicker.h" + +#include "wx/scopedptr.h" + + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxGenericFileButton, wxButton) +IMPLEMENT_DYNAMIC_CLASS(wxGenericDirButton, wxButton) + +// ---------------------------------------------------------------------------- +// wxGenericFileButton +// ---------------------------------------------------------------------------- + +bool wxGenericFileDirButton::Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxString& path, + const wxString& message, + const wxString& wildcard, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + m_pickerStyle = style; + + // If the special wxPB_SMALL flag is used, ignore the provided label and + // use the shortest possible label and the smallest possible button fitting + // it. + long styleButton = 0; + wxString labelButton; + if ( m_pickerStyle & wxPB_SMALL ) + { + labelButton = _("..."); + styleButton = wxBU_EXACTFIT; + } + else + { + labelButton = label; + } + + // create this button + if ( !wxButton::Create(parent, id, labelButton, + pos, size, styleButton, validator, name) ) + { + wxFAIL_MSG( wxT("wxGenericFileButton creation failed") ); + return false; + } + + // and handle user clicks on it + Connect(GetId(), wxEVT_BUTTON, + wxCommandEventHandler(wxGenericFileDirButton::OnButtonClick), + NULL, this); + + // create the dialog associated with this button + m_path = path; + m_message = message; + m_wildcard = wildcard; + + return true; +} + +void wxGenericFileDirButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev)) +{ + wxScopedPtr p(CreateDialog()); + if (p->ShowModal() == wxID_OK) + { + // save updated path in m_path + UpdatePathFromDialog(p.get()); + + // fire an event + wxFileDirPickerEvent event(GetEventType(), this, GetId(), m_path); + GetEventHandler()->ProcessEvent(event); + } +} + +void wxGenericFileDirButton::SetInitialDirectory(const wxString& dir) +{ + m_initialDir = dir; +} + +// ---------------------------------------------------------------------------- +// wxGenericFileButton +// ---------------------------------------------------------------------------- + +wxDialog *wxGenericFileButton::CreateDialog() +{ + // Determine the initial directory for the dialog: it comes either from the + // default path, if it has it, or from the separately specified initial + // directory that can be set even if the path is e.g. empty. + wxFileName fn(m_path); + wxString initialDir = fn.GetPath(); + if ( initialDir.empty() ) + initialDir = m_initialDir; + + return new wxFileDialog + ( + GetDialogParent(), + m_message, + initialDir, + fn.GetFullName(), + m_wildcard, + GetDialogStyle() + ); +} + +// ---------------------------------------------------------------------------- +// wxGenericDirButton +// ---------------------------------------------------------------------------- + +wxDialog *wxGenericDirButton::CreateDialog() +{ + wxDirDialog* const dialog = new wxDirDialog + ( + GetDialogParent(), + m_message, + m_path.empty() ? m_initialDir : m_path, + GetDialogStyle() + ); + return dialog; +} + +#endif // wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/fontdlgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/fontdlgg.cpp new file mode 100644 index 0000000000..58a7835c96 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/fontdlgg.cpp @@ -0,0 +1,626 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/fontdlgg.cpp +// Purpose: Generic font dialog +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#if wxUSE_FONTDLG && (!defined(__WXGTK__) || defined(__WXGPE__) || defined(__WXUNIVERSAL__)) + +#ifndef WX_PRECOMP + #include + #include "wx/crt.h" + #include "wx/utils.h" + #include "wx/dialog.h" + #include "wx/listbox.h" + #include "wx/button.h" + #include "wx/stattext.h" + #include "wx/layout.h" + #include "wx/dcclient.h" + #include "wx/choice.h" + #include "wx/checkbox.h" + #include "wx/intl.h" + #include "wx/settings.h" + #include "wx/sizer.h" +#endif + +#include +#include + +#include "wx/fontdlg.h" +#include "wx/generic/fontdlgg.h" + +#if USE_SPINCTRL_FOR_POINT_SIZE +#include "wx/spinctrl.h" +#endif + +//----------------------------------------------------------------------------- +// helper class - wxFontPreviewer +//----------------------------------------------------------------------------- + +class WXDLLEXPORT wxFontPreviewer : public wxWindow +{ +public: + wxFontPreviewer(wxWindow *parent, const wxSize& sz = wxDefaultSize) : wxWindow(parent, wxID_ANY, wxDefaultPosition, sz) + { + } + +private: + void OnPaint(wxPaintEvent& event); + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxFontPreviewer, wxWindow) + EVT_PAINT(wxFontPreviewer::OnPaint) +END_EVENT_TABLE() + +void wxFontPreviewer::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + + wxSize size = GetSize(); + wxFont font = GetFont(); + + dc.SetPen(*wxBLACK_PEN); + dc.SetBrush(*wxWHITE_BRUSH); + dc.DrawRectangle(0, 0, size.x, size.y); + + if ( font.IsOk() ) + { + dc.SetFont(font); + dc.SetTextForeground(GetForegroundColour()); + dc.SetClippingRegion(2, 2, size.x-4, size.y-4); + dc.DrawText(_("ABCDEFGabcdefg12345"), + 10, (size.y - dc.GetTextExtent(wxT("X")).y)/2); + dc.DestroyClippingRegion(); + } +} + +//----------------------------------------------------------------------------- +// helper functions +//----------------------------------------------------------------------------- + +static const wxChar *wxFontWeightIntToString(int weight) +{ + switch (weight) + { + case wxLIGHT: + return wxT("Light"); + case wxBOLD: + return wxT("Bold"); + case wxNORMAL: + default: + return wxT("Normal"); + } +} + +static const wxChar *wxFontStyleIntToString(int style) +{ + switch (style) + { + case wxITALIC: + return wxT("Italic"); + case wxSLANT: + return wxT("Slant"); + case wxNORMAL: + default: + return wxT("Normal"); + } +} + +static const wxChar *wxFontFamilyIntToString(int family) +{ + switch (family) + { + case wxROMAN: + return wxT("Roman"); + case wxDECORATIVE: + return wxT("Decorative"); + case wxMODERN: + return wxT("Modern"); + case wxSCRIPT: + return wxT("Script"); + case wxTELETYPE: + return wxT("Teletype"); + case wxSWISS: + default: + return wxT("Swiss"); + } +} + +static int wxFontFamilyStringToInt(const wxString& family) +{ + if (family.empty()) + return wxSWISS; + + if (wxStrcmp(family, wxT("Roman")) == 0) + return wxROMAN; + else if (wxStrcmp(family, wxT("Decorative")) == 0) + return wxDECORATIVE; + else if (wxStrcmp(family, wxT("Modern")) == 0) + return wxMODERN; + else if (wxStrcmp(family, wxT("Script")) == 0) + return wxSCRIPT; + else if (wxStrcmp(family, wxT("Teletype")) == 0) + return wxTELETYPE; + else return wxSWISS; +} + +static int wxFontStyleStringToInt(const wxString& style) +{ + if (style.empty()) + return wxNORMAL; + if (wxStrcmp(style, wxT("Italic")) == 0) + return wxITALIC; + else if (wxStrcmp(style, wxT("Slant")) == 0) + return wxSLANT; + else + return wxNORMAL; +} + +static int wxFontWeightStringToInt(const wxString& weight) +{ + if (weight.empty()) + return wxNORMAL; + if (wxStrcmp(weight, wxT("Bold")) == 0) + return wxBOLD; + else if (wxStrcmp(weight, wxT("Light")) == 0) + return wxLIGHT; + else + return wxNORMAL; +} + +//----------------------------------------------------------------------------- +// wxGenericFontDialog +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog, wxDialog) + +BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog) + EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont) + EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont) + EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont) + EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont) + EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont) +#if USE_SPINCTRL_FOR_POINT_SIZE + EVT_SPINCTRL(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeSize) + EVT_TEXT(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont) +#else + EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont) +#endif + EVT_CLOSE(wxGenericFontDialog::OnCloseWindow) +END_EVENT_TABLE() + + +#define NUM_COLS 48 +static wxString wxColourDialogNames[NUM_COLS]={wxT("ORANGE"), + wxT("GOLDENROD"), + wxT("WHEAT"), + wxT("SPRING GREEN"), + wxT("SKY BLUE"), + wxT("SLATE BLUE"), + wxT("MEDIUM VIOLET RED"), + wxT("PURPLE"), + + wxT("RED"), + wxT("YELLOW"), + wxT("MEDIUM SPRING GREEN"), + wxT("PALE GREEN"), + wxT("CYAN"), + wxT("LIGHT STEEL BLUE"), + wxT("ORCHID"), + wxT("LIGHT MAGENTA"), + + wxT("BROWN"), + wxT("YELLOW"), + wxT("GREEN"), + wxT("CADET BLUE"), + wxT("MEDIUM BLUE"), + wxT("MAGENTA"), + wxT("MAROON"), + wxT("ORANGE RED"), + + wxT("FIREBRICK"), + wxT("CORAL"), + wxT("FOREST GREEN"), + wxT("AQUARAMINE"), + wxT("BLUE"), + wxT("NAVY"), + wxT("THISTLE"), + wxT("MEDIUM VIOLET RED"), + + wxT("INDIAN RED"), + wxT("GOLD"), + wxT("MEDIUM SEA GREEN"), + wxT("MEDIUM BLUE"), + wxT("MIDNIGHT BLUE"), + wxT("GREY"), + wxT("PURPLE"), + wxT("KHAKI"), + + wxT("BLACK"), + wxT("MEDIUM FOREST GREEN"), + wxT("KHAKI"), + wxT("DARK GREY"), + wxT("SEA GREEN"), + wxT("LIGHT GREY"), + wxT("MEDIUM SLATE BLUE"), + wxT("WHITE") + }; + +/* + * Generic wxFontDialog + */ + +void wxGenericFontDialog::Init() +{ + m_useEvents = false; + m_previewer = NULL; + Create( m_parent ) ; +} + +wxGenericFontDialog::~wxGenericFontDialog() +{ +} + +void wxGenericFontDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) +{ + EndModal(wxID_CANCEL); +} + +bool wxGenericFontDialog::DoCreate(wxWindow *parent) +{ + parent = GetParentForModalDialog(parent, 0); + + if ( !wxDialog::Create( parent , wxID_ANY , wxT("Choose Font") , + wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, + wxT("fontdialog") ) ) + { + wxFAIL_MSG( wxT("wxFontDialog creation failed") ); + return false; + } + + InitializeFont(); + CreateWidgets(); + + // sets initial font in preview area + DoChangeFont(); + + return true; +} + +int wxGenericFontDialog::ShowModal() +{ + int ret = wxDialog::ShowModal(); + + if (ret != wxID_CANCEL) + { + m_fontData.m_chosenFont = m_dialogFont; + } + + return ret; +} + +// This should be application-settable +static bool ShowToolTips() { return false; } + +void wxGenericFontDialog::CreateWidgets() +{ + wxString *families = new wxString[6], + *styles = new wxString[3], + *weights = new wxString[3]; + families[0] = _("Roman"); + families[1] = _("Decorative"); + families[2] = _("Modern"); + families[3] = _("Script"); + families[4] = _("Swiss" ); + families[5] = _("Teletype" ); + styles[0] = _("Normal"); + styles[1] = _("Italic"); + styles[2] = _("Slant"); + weights[0] = _("Normal"); + weights[1] = _("Light"); + weights[2] = _("Bold"); + +#if !USE_SPINCTRL_FOR_POINT_SIZE + wxString *pointSizes = new wxString[40]; + int i; + for ( i = 0; i < 40; i++) + { + wxChar buf[5]; + wxSprintf(buf, wxT("%d"), i + 1); + pointSizes[i] = buf; + } +#endif + + // layout + + bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); + int noCols, noRows; + if (is_pda) + { + noCols = 2; noRows = 3; + } + else + { + noCols = 3; noRows = 2; + } + + wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); + this->SetSizer(itemBoxSizer2); + this->SetAutoLayout(true); + + wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer2->Add(itemBoxSizer3, 1, wxGROW|wxALL, 5); + + wxFlexGridSizer* itemGridSizer4 = new wxFlexGridSizer(noRows, noCols, 0, 0); + itemBoxSizer3->Add(itemGridSizer4, 0, wxGROW, 5); + + wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); + itemGridSizer4->Add(itemBoxSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW, 5); + wxStaticText* itemStaticText6 = new wxStaticText( this, wxID_STATIC, _("&Font family:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); + + wxChoice* itemChoice7 = new wxChoice( this, wxID_FONT_FAMILY, wxDefaultPosition, wxDefaultSize, 5, families, 0 ); + itemChoice7->SetHelpText(_("The font family.")); + if (ShowToolTips()) + itemChoice7->SetToolTip(_("The font family.")); + itemBoxSizer5->Add(itemChoice7, 0, wxALIGN_LEFT|wxALL, 5); + + wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL); + itemGridSizer4->Add(itemBoxSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW, 5); + wxStaticText* itemStaticText9 = new wxStaticText( this, wxID_STATIC, _("&Style:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer8->Add(itemStaticText9, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); + + wxChoice* itemChoice10 = new wxChoice( this, wxID_FONT_STYLE, wxDefaultPosition, wxDefaultSize, 3, styles, 0 ); + itemChoice10->SetHelpText(_("The font style.")); + if (ShowToolTips()) + itemChoice10->SetToolTip(_("The font style.")); + itemBoxSizer8->Add(itemChoice10, 0, wxALIGN_LEFT|wxALL, 5); + + wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL); + itemGridSizer4->Add(itemBoxSizer11, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW, 5); + wxStaticText* itemStaticText12 = new wxStaticText( this, wxID_STATIC, _("&Weight:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer11->Add(itemStaticText12, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); + + wxChoice* itemChoice13 = new wxChoice( this, wxID_FONT_WEIGHT, wxDefaultPosition, wxDefaultSize, 3, weights, 0 ); + itemChoice13->SetHelpText(_("The font weight.")); + if (ShowToolTips()) + itemChoice13->SetToolTip(_("The font weight.")); + itemBoxSizer11->Add(itemChoice13, 0, wxALIGN_LEFT|wxALL, 5); + + wxBoxSizer* itemBoxSizer14 = new wxBoxSizer(wxVERTICAL); + itemGridSizer4->Add(itemBoxSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW, 5); + if (m_fontData.GetEnableEffects()) + { + wxStaticText* itemStaticText15 = new wxStaticText( this, wxID_STATIC, _("C&olour:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer14->Add(itemStaticText15, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); + + wxSize colourSize = wxDefaultSize; + if (is_pda) + colourSize.x = 100; + + wxChoice* itemChoice16 = new wxChoice( this, wxID_FONT_COLOUR, wxDefaultPosition, colourSize, NUM_COLS, wxColourDialogNames, 0 ); + itemChoice16->SetHelpText(_("The font colour.")); + if (ShowToolTips()) + itemChoice16->SetToolTip(_("The font colour.")); + itemBoxSizer14->Add(itemChoice16, 0, wxALIGN_LEFT|wxALL, 5); + } + + wxBoxSizer* itemBoxSizer17 = new wxBoxSizer(wxVERTICAL); + itemGridSizer4->Add(itemBoxSizer17, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW, 5); + wxStaticText* itemStaticText18 = new wxStaticText( this, wxID_STATIC, _("&Point size:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer17->Add(itemStaticText18, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); + +#if USE_SPINCTRL_FOR_POINT_SIZE + wxSpinCtrl* spinCtrl = new wxSpinCtrl(this, wxID_FONT_SIZE, wxT("12"), wxDefaultPosition, wxSize(80, wxDefaultCoord), wxSP_ARROW_KEYS, 1, 500, 12); + spinCtrl->SetHelpText(_("The font point size.")); + if (ShowToolTips()) + spinCtrl->SetToolTip(_("The font point size.")); + + itemBoxSizer17->Add(spinCtrl, 0, wxALIGN_LEFT|wxALL, 5); +#else + wxChoice* itemChoice19 = new wxChoice( this, wxID_FONT_SIZE, wxDefaultPosition, wxDefaultSize, 40, pointSizes, 0 ); + itemChoice19->SetHelpText(_("The font point size.")); + if (ShowToolTips()) + itemChoice19->SetToolTip(_("The font point size.")); + itemBoxSizer17->Add(itemChoice19, 0, wxALIGN_LEFT|wxALL, 5); +#endif + + if (m_fontData.GetEnableEffects()) + { + wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxVERTICAL); + itemGridSizer4->Add(itemBoxSizer20, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); + wxCheckBox* itemCheckBox21 = new wxCheckBox( this, wxID_FONT_UNDERLINE, _("&Underline"), wxDefaultPosition, wxDefaultSize, 0 ); + itemCheckBox21->SetValue(false); + itemCheckBox21->SetHelpText(_("Whether the font is underlined.")); + if (ShowToolTips()) + itemCheckBox21->SetToolTip(_("Whether the font is underlined.")); + itemBoxSizer20->Add(itemCheckBox21, 0, wxALIGN_LEFT|wxALL, 5); + } + + if (!is_pda) + itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + + wxStaticText* itemStaticText23 = new wxStaticText( this, wxID_STATIC, _("Preview:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer3->Add(itemStaticText23, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); + + wxFontPreviewer* itemWindow24 = new wxFontPreviewer( this ); + m_previewer = itemWindow24; + itemWindow24->SetHelpText(_("Shows the font preview.")); + if (ShowToolTips()) + itemWindow24->SetToolTip(_("Shows the font preview.")); + itemBoxSizer3->Add(itemWindow24, 1, wxGROW|wxALL, 5); + + wxBoxSizer* itemBoxSizer25 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer3->Add(itemBoxSizer25, 0, wxGROW, 5); + itemBoxSizer25->Add(5, 5, 1, wxGROW|wxALL, 5); + +#ifdef __WXMAC__ + wxButton* itemButton28 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + if (ShowToolTips()) + itemButton28->SetToolTip(_("Click to cancel the font selection.")); + itemBoxSizer25->Add(itemButton28, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxButton* itemButton27 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton27->SetDefault(); + itemButton27->SetHelpText(_("Click to confirm the font selection.")); + if (ShowToolTips()) + itemButton27->SetToolTip(_("Click to confirm the font selection.")); + itemBoxSizer25->Add(itemButton27, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); +#else + wxButton* itemButton27 = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton27->SetDefault(); + itemButton27->SetHelpText(_("Click to confirm the font selection.")); + if (ShowToolTips()) + itemButton27->SetToolTip(_("Click to confirm the font selection.")); + itemBoxSizer25->Add(itemButton27, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxButton* itemButton28 = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + if (ShowToolTips()) + itemButton28->SetToolTip(_("Click to cancel the font selection.")); + itemBoxSizer25->Add(itemButton28, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); +#endif + + m_familyChoice = (wxChoice*) FindWindow(wxID_FONT_FAMILY); + m_styleChoice = (wxChoice*) FindWindow(wxID_FONT_STYLE); + m_weightChoice = (wxChoice*) FindWindow(wxID_FONT_WEIGHT); + m_colourChoice = (wxChoice*) FindWindow(wxID_FONT_COLOUR); + m_underLineCheckBox = (wxCheckBox*) FindWindow(wxID_FONT_UNDERLINE); + + m_familyChoice->SetStringSelection( wxFontFamilyIntToString(m_dialogFont.GetFamily()) ); + m_styleChoice->SetStringSelection(wxFontStyleIntToString(m_dialogFont.GetStyle())); + m_weightChoice->SetStringSelection(wxFontWeightIntToString(m_dialogFont.GetWeight())); + + if (m_colourChoice) + { + wxString name(wxTheColourDatabase->FindName(m_fontData.GetColour())); + if ( name.empty() ) + m_colourChoice->SetStringSelection(wxT("BLACK")); + else + m_colourChoice->SetStringSelection(name); + } + + if (m_underLineCheckBox) + { + m_underLineCheckBox->SetValue(m_dialogFont.GetUnderlined()); + } + +#if USE_SPINCTRL_FOR_POINT_SIZE + spinCtrl->SetValue(m_dialogFont.GetPointSize()); +#else + m_pointSizeChoice = (wxChoice*) FindWindow(wxID_FONT_SIZE); + m_pointSizeChoice->SetSelection(m_dialogFont.GetPointSize()-1); +#endif + + GetSizer()->SetItemMinSize(m_previewer, is_pda ? 100 : 430, is_pda ? 40 : 100); + GetSizer()->SetSizeHints(this); + GetSizer()->Fit(this); + + Centre(wxBOTH); + + delete[] families; + delete[] styles; + delete[] weights; +#if !USE_SPINCTRL_FOR_POINT_SIZE + delete[] pointSizes; +#endif + + // Don't block events any more + m_useEvents = true; + +} + +void wxGenericFontDialog::InitializeFont() +{ + int fontFamily = wxSWISS; + int fontWeight = wxNORMAL; + int fontStyle = wxNORMAL; + int fontSize = 12; + bool fontUnderline = false; + + if (m_fontData.m_initialFont.IsOk()) + { + fontFamily = m_fontData.m_initialFont.GetFamily(); + fontWeight = m_fontData.m_initialFont.GetWeight(); + fontStyle = m_fontData.m_initialFont.GetStyle(); + fontSize = m_fontData.m_initialFont.GetPointSize(); + fontUnderline = m_fontData.m_initialFont.GetUnderlined(); + } + + m_dialogFont = wxFont(fontSize, fontFamily, fontStyle, + fontWeight, fontUnderline); + + if (m_previewer) + m_previewer->SetFont(m_dialogFont); +} + +void wxGenericFontDialog::OnChangeFont(wxCommandEvent& WXUNUSED(event)) +{ + DoChangeFont(); +} + +void wxGenericFontDialog::DoChangeFont() +{ + if (!m_useEvents) return; + + int fontFamily = wxFontFamilyStringToInt(m_familyChoice->GetStringSelection()); + int fontWeight = wxFontWeightStringToInt(m_weightChoice->GetStringSelection()); + int fontStyle = wxFontStyleStringToInt(m_styleChoice->GetStringSelection()); +#if USE_SPINCTRL_FOR_POINT_SIZE + wxSpinCtrl* fontSizeCtrl = wxDynamicCast(FindWindow(wxID_FONT_SIZE), wxSpinCtrl); + int fontSize = fontSizeCtrl->GetValue(); +#else + int fontSize = wxAtoi(m_pointSizeChoice->GetStringSelection()); +#endif + + // Start with previous underline setting, we want to retain it even if we can't edit it + // m_dialogFont is always initialized because of the call to InitializeFont + int fontUnderline = m_dialogFont.GetUnderlined(); + + if (m_underLineCheckBox) + { + fontUnderline = m_underLineCheckBox->GetValue(); + } + + m_dialogFont = wxFont(fontSize, fontFamily, fontStyle, fontWeight, (fontUnderline != 0)); + m_previewer->SetFont(m_dialogFont); + + if ( m_colourChoice ) + { + if ( !m_colourChoice->GetStringSelection().empty() ) + { + wxColour col = wxTheColourDatabase->Find(m_colourChoice->GetStringSelection()); + if (col.IsOk()) + { + m_fontData.m_fontColour = col; + } + } + } + // Update color here so that we can also use the color originally passed in + // (EnableEffects may be false) + if (m_fontData.m_fontColour.IsOk()) + m_previewer->SetForegroundColour(m_fontData.m_fontColour); + + m_previewer->Refresh(); +} + +#if USE_SPINCTRL_FOR_POINT_SIZE +void wxGenericFontDialog::OnChangeSize(wxSpinEvent& WXUNUSED(event)) +{ + DoChangeFont(); +} +#endif + +#endif + // wxUSE_FONTDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/fontpickerg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/fontpickerg.cpp new file mode 100644 index 0000000000..62599b7892 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/fontpickerg.cpp @@ -0,0 +1,118 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/fontpickerg.cpp +// Purpose: wxGenericFontButton class implementation +// Author: Francesco Montorsi +// Modified by: +// Created: 15/04/2006 +// Copyright: (c) Francesco Montorsi +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FONTPICKERCTRL + +#include "wx/fontpicker.h" + +#include "wx/fontdlg.h" + + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxGenericFontButton, wxButton) + +// ---------------------------------------------------------------------------- +// wxGenericFontButton +// ---------------------------------------------------------------------------- + +bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id, + const wxFont &initial, const wxPoint &pos, + const wxSize &size, long style, + const wxValidator& validator, const wxString &name) +{ + wxString label = (style & wxFNTP_FONTDESC_AS_LABEL) ? + wxString() : // label will be updated by UpdateFont + _("Choose font"); + + // create this button + if (!wxButton::Create( parent, id, label, pos, + size, style, validator, name )) + { + wxFAIL_MSG( wxT("wxGenericFontButton creation failed") ); + return false; + } + + // and handle user clicks on it + Connect(GetId(), wxEVT_BUTTON, + wxCommandEventHandler(wxGenericFontButton::OnButtonClick), + NULL, this); + + m_selectedFont = initial.IsOk() ? initial : *wxNORMAL_FONT; + UpdateFont(); + InitFontData(); + + return true; +} + +void wxGenericFontButton::InitFontData() +{ + m_data.SetAllowSymbols(true); + m_data.SetColour(*wxBLACK); + m_data.EnableEffects(true); +} + +void wxGenericFontButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev)) +{ + // update the wxFontData to be shown in the dialog + m_data.SetInitialFont(m_selectedFont); + + // create the font dialog and display it + wxFontDialog dlg(this, m_data); + if (dlg.ShowModal() == wxID_OK) + { + m_data = dlg.GetFontData(); + SetSelectedFont(m_data.GetChosenFont()); + + // fire an event + wxFontPickerEvent event(this, GetId(), m_selectedFont); + GetEventHandler()->ProcessEvent(event); + } +} + +void wxGenericFontButton::UpdateFont() +{ + if ( !m_selectedFont.IsOk() ) + return; + + SetForegroundColour(m_data.GetColour()); + + if (HasFlag(wxFNTP_USEFONT_FOR_LABEL)) + { + // use currently selected font for the label... + wxButton::SetFont(m_selectedFont); + } + + if (HasFlag(wxFNTP_FONTDESC_AS_LABEL)) + { + SetLabel(wxString::Format(wxT("%s, %d"), + m_selectedFont.GetFaceName().c_str(), + m_selectedFont.GetPointSize())); + } +} + +#endif // wxUSE_FONTPICKERCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/fswatcherg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/fswatcherg.cpp new file mode 100644 index 0000000000..a188a3095f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/fswatcherg.cpp @@ -0,0 +1,21 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/fswatcherg.cpp +// Purpose: wxPollingFileSystemWatcher +// Author: Bartosz Bekier +// Created: 2009-05-26 +// Copyright: (c) 2009 Bartosz Bekier +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_FSWATCHER + +#include "wx/fswatcher.h" + +#endif // wxUSE_FSWATCHER diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/graphicc.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/graphicc.cpp new file mode 100644 index 0000000000..767bd09ec6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/graphicc.cpp @@ -0,0 +1,2677 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/graphicc.cpp +// Purpose: cairo device context class +// Author: Stefan Csomor +// Modified by: +// Created: 2006-10-03 +// Copyright: (c) 2006 Stefan Csomor +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_GRAPHICS_CONTEXT + +#include "wx/graphics.h" + +#if wxUSE_CAIRO + +// keep cairo.h from defining dllimport as we're defining the symbols inside +// the wx dll in order to load them dynamically. +#define cairo_public + +#include + +bool wxCairoInit(); + +#ifndef WX_PRECOMP + #include "wx/bitmap.h" + #include "wx/icon.h" + #include "wx/dcclient.h" + #include "wx/dcmemory.h" + #include "wx/dcprint.h" + #include "wx/window.h" +#endif + +#include "wx/private/graphics.h" +#include "wx/rawbmp.h" +#include "wx/vector.h" + +using namespace std; + +//----------------------------------------------------------------------------- +// device context implementation +// +// more and more of the dc functionality should be implemented by calling +// the appropricate wxCairoContext, but we will have to do that step by step +// also coordinate conversions should be moved to native matrix ops +//----------------------------------------------------------------------------- + +// we always stock two context states, one at entry, to be able to preserve the +// state we were called with, the other one after changing to HI Graphics orientation +// (this one is used for getting back clippings etc) + +//----------------------------------------------------------------------------- +// wxGraphicsPath implementation +//----------------------------------------------------------------------------- + +// TODO remove this dependency (gdiplus needs the macros) + +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +#include +#ifdef __WXMSW__ +#include +// Notice that the order is important: cairo-win32.h includes windows.h which +// pollutes the global name space with macros so include our own header which +// #undefines them after it. +#include "wx/msw/private.h" +#endif + +#ifdef __WXGTK__ +#include +#include "wx/fontutil.h" +#ifndef __WXGTK3__ +#include "wx/gtk/dc.h" +#endif +#endif + +#ifdef __WXMAC__ +#include "wx/osx/private.h" +#include +#include +#endif + +class WXDLLIMPEXP_CORE wxCairoPathData : public wxGraphicsPathData +{ +public : + wxCairoPathData(wxGraphicsRenderer* renderer, cairo_t* path = NULL); + ~wxCairoPathData(); + + virtual wxGraphicsObjectRefData *Clone() const; + + // + // These are the path primitives from which everything else can be constructed + // + + // begins a new subpath at (x,y) + virtual void MoveToPoint( wxDouble x, wxDouble y ); + + // adds a straight line from the current point to (x,y) + virtual void AddLineToPoint( wxDouble x, wxDouble y ); + + // adds a cubic Bezier curve from the current point, using two control points and an end point + virtual void AddCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y ); + + + // adds an arc of a circle centering at (x,y) with radius (r) from startAngle to endAngle + virtual void AddArc( wxDouble x, wxDouble y, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise ) ; + + // gets the last point of the current path, (0,0) if not yet set + virtual void GetCurrentPoint( wxDouble* x, wxDouble* y) const; + + // adds another path + virtual void AddPath( const wxGraphicsPathData* path ); + + // closes the current sub-path + virtual void CloseSubpath(); + + // + // These are convenience functions which - if not available natively will be assembled + // using the primitives from above + // + + /* + + // appends a rectangle as a new closed subpath + virtual void AddRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) ; + // appends an ellipsis as a new closed subpath fitting the passed rectangle + virtual void AddEllipsis( wxDouble x, wxDouble y, wxDouble w , wxDouble h ) ; + + // draws a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1) + virtual void AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, wxDouble y2, wxDouble r ) ; + */ + + // returns the native path + virtual void * GetNativePath() const ; + + // give the native path returned by GetNativePath() back (there might be some deallocations necessary) + virtual void UnGetNativePath(void *p) const; + + // transforms each point of this path by the matrix + virtual void Transform( const wxGraphicsMatrixData* matrix ) ; + + // gets the bounding box enclosing all points (possibly including control points) + virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h) const; + + virtual bool Contains( wxDouble x, wxDouble y, wxPolygonFillMode fillStyle = wxWINDING_RULE) const; + +private : + cairo_t* m_pathContext; +}; + +class WXDLLIMPEXP_CORE wxCairoMatrixData : public wxGraphicsMatrixData +{ +public : + wxCairoMatrixData(wxGraphicsRenderer* renderer, const cairo_matrix_t* matrix = NULL ) ; + virtual ~wxCairoMatrixData() ; + + virtual wxGraphicsObjectRefData *Clone() const ; + + // concatenates the matrix + virtual void Concat( const wxGraphicsMatrixData *t ); + + // sets the matrix to the respective values + virtual void Set(wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, + wxDouble tx=0.0, wxDouble ty=0.0); + + // gets the component valuess of the matrix + virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL, + wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const; + + // makes this the inverse matrix + virtual void Invert(); + + // returns true if the elements of the transformation matrix are equal ? + virtual bool IsEqual( const wxGraphicsMatrixData* t) const ; + + // return true if this is the identity matrix + virtual bool IsIdentity() const; + + // + // transformation + // + + // add the translation to this matrix + virtual void Translate( wxDouble dx , wxDouble dy ); + + // add the scale to this matrix + virtual void Scale( wxDouble xScale , wxDouble yScale ); + + // add the rotation to this matrix (radians) + virtual void Rotate( wxDouble angle ); + + // + // apply the transforms + // + + // applies that matrix to the point + virtual void TransformPoint( wxDouble *x, wxDouble *y ) const; + + // applies the matrix except for translations + virtual void TransformDistance( wxDouble *dx, wxDouble *dy ) const; + + // returns the native representation + virtual void * GetNativeMatrix() const; +private: + cairo_matrix_t m_matrix ; +} ; + +// Common base class for pens and brushes. +class wxCairoPenBrushBaseData : public wxGraphicsObjectRefData +{ +public: + wxCairoPenBrushBaseData(wxGraphicsRenderer* renderer, + const wxColour& col, + bool isTransparent); + virtual ~wxCairoPenBrushBaseData(); + + virtual void Apply( wxGraphicsContext* context ); + +protected: + // Call this to use the given bitmap as stipple. Bitmap must be non-null + // and valid. + void InitStipple(wxBitmap* bmp); + + // Call this to use the given hatch style. Hatch style must be valid. + void InitHatch(wxHatchStyle hatchStyle); + + + double m_red; + double m_green; + double m_blue; + double m_alpha; + + cairo_pattern_t* m_pattern; + class wxCairoBitmapData* m_bmpdata; + +private: + // Called once to allocate m_pattern if needed. + void InitHatchPattern(cairo_t* ctext); + + wxHatchStyle m_hatchStyle; + + wxDECLARE_NO_COPY_CLASS(wxCairoPenBrushBaseData); +}; + +class WXDLLIMPEXP_CORE wxCairoPenData : public wxCairoPenBrushBaseData +{ +public: + wxCairoPenData( wxGraphicsRenderer* renderer, const wxPen &pen ); + ~wxCairoPenData(); + + void Init(); + + virtual void Apply( wxGraphicsContext* context ); + virtual wxDouble GetWidth() { return m_width; } + +private : + double m_width; + + cairo_line_cap_t m_cap; + cairo_line_join_t m_join; + + int m_count; + const double *m_lengths; + double *m_userLengths; + + wxDECLARE_NO_COPY_CLASS(wxCairoPenData); +}; + +class WXDLLIMPEXP_CORE wxCairoBrushData : public wxCairoPenBrushBaseData +{ +public: + wxCairoBrushData( wxGraphicsRenderer* renderer ); + wxCairoBrushData( wxGraphicsRenderer* renderer, const wxBrush &brush ); + + void CreateLinearGradientBrush(wxDouble x1, wxDouble y1, + wxDouble x2, wxDouble y2, + const wxGraphicsGradientStops& stops); + void CreateRadialGradientBrush(wxDouble xo, wxDouble yo, + wxDouble xc, wxDouble yc, wxDouble radius, + const wxGraphicsGradientStops& stops); + +protected: + virtual void Init(); + + // common part of Create{Linear,Radial}GradientBrush() + void AddGradientStops(const wxGraphicsGradientStops& stops); +}; + +class wxCairoFontData : public wxGraphicsObjectRefData +{ +public: + wxCairoFontData( wxGraphicsRenderer* renderer, const wxFont &font, const wxColour& col ); + wxCairoFontData(wxGraphicsRenderer* renderer, + double sizeInPixels, + const wxString& facename, + int flags, + const wxColour& col); + ~wxCairoFontData(); + + virtual bool Apply( wxGraphicsContext* context ); +#ifdef __WXGTK__ + const wxFont& GetFont() const { return m_wxfont; } +#endif +private : + void InitColour(const wxColour& col); + void InitFontComponents(const wxString& facename, + cairo_font_slant_t slant, + cairo_font_weight_t weight); + + double m_size; + double m_red; + double m_green; + double m_blue; + double m_alpha; +#ifdef __WXMAC__ + cairo_font_face_t *m_font; +#elif defined(__WXGTK__) + wxFont m_wxfont; +#endif + + // These members are used when the font is created from its face name and + // flags (and not from wxFont) and also even when creating it from wxFont + // on the platforms not covered above. + // + // Notice that we can't use cairo_font_face_t instead of storing those, + // even though it would be simpler and need less #ifdefs, because + // cairo_toy_font_face_create() that we'd need to create it is only + // available in Cairo 1.8 and we require just 1.2 currently. If we do drop + // support for < 1.8 versions in the future it would be definitely better + // to use cairo_toy_font_face_create() instead. + wxCharBuffer m_fontName; + cairo_font_slant_t m_slant; + cairo_font_weight_t m_weight; +}; + +class wxCairoBitmapData : public wxGraphicsBitmapData +{ +public: + wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitmap& bmp ); +#if wxUSE_IMAGE + wxCairoBitmapData(wxGraphicsRenderer* renderer, const wxImage& image); +#endif // wxUSE_IMAGE + wxCairoBitmapData( wxGraphicsRenderer* renderer, cairo_surface_t* bitmap ); + ~wxCairoBitmapData(); + + virtual cairo_surface_t* GetCairoSurface() { return m_surface; } + virtual cairo_pattern_t* GetCairoPattern() { return m_pattern; } + virtual void* GetNativeBitmap() const { return m_surface; } + virtual wxSize GetSize() { return wxSize(m_width, m_height); } + +#if wxUSE_IMAGE + wxImage ConvertToImage() const; +#endif // wxUSE_IMAGE + +private : + // Allocate m_buffer for the bitmap of the given size in the given format. + // + // Returns the stride used for the buffer. + int InitBuffer(int width, int height, cairo_format_t format); + + // Really create the surface using the buffer (which was supposed to be + // filled since InitBuffer() call). + void InitSurface(cairo_format_t format, int stride); + + + cairo_surface_t* m_surface; + cairo_pattern_t* m_pattern; + int m_width; + int m_height; + unsigned char* m_buffer; +}; + +class WXDLLIMPEXP_CORE wxCairoContext : public wxGraphicsContext +{ +public: + wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC& dc ); + wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC& dc ); + wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC& dc ); +#ifdef __WXGTK__ + wxCairoContext( wxGraphicsRenderer* renderer, GdkWindow *window ); +#endif +#ifdef __WXMSW__ + wxCairoContext( wxGraphicsRenderer* renderer, HDC context ); +#endif + wxCairoContext( wxGraphicsRenderer* renderer, cairo_t *context ); + wxCairoContext( wxGraphicsRenderer* renderer, wxWindow *window); + + // If this ctor is used, Init() must be called by the derived class later. + wxCairoContext( wxGraphicsRenderer* renderer ); + + virtual ~wxCairoContext(); + + virtual bool ShouldOffset() const + { + if ( !m_enableOffset ) + return false; + + int penwidth = 0 ; + if ( !m_pen.IsNull() ) + { + penwidth = (int)((wxCairoPenData*)m_pen.GetRefData())->GetWidth(); + if ( penwidth == 0 ) + penwidth = 1; + } + return ( penwidth % 2 ) == 1; + } + + virtual void Clip( const wxRegion ®ion ); +#ifdef __WXMSW__ + cairo_surface_t* m_mswSurface; + WindowHDC m_mswWindowHDC; +#endif + + // clips drawings to the rect + virtual void Clip( wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + + // resets the clipping to original extent + virtual void ResetClip(); + + virtual void * GetNativeContext(); + + virtual bool SetAntialiasMode(wxAntialiasMode antialias); + + virtual bool SetInterpolationQuality(wxInterpolationQuality interpolation); + + virtual bool SetCompositionMode(wxCompositionMode op); + + virtual void BeginLayer(wxDouble opacity); + + virtual void EndLayer(); + + virtual void StrokePath( const wxGraphicsPath& p ); + virtual void FillPath( const wxGraphicsPath& p , wxPolygonFillMode fillStyle = wxWINDING_RULE ); + + virtual void Translate( wxDouble dx , wxDouble dy ); + virtual void Scale( wxDouble xScale , wxDouble yScale ); + virtual void Rotate( wxDouble angle ); + + // concatenates this transform with the current transform of this context + virtual void ConcatTransform( const wxGraphicsMatrix& matrix ); + + // sets the transform of this context + virtual void SetTransform( const wxGraphicsMatrix& matrix ); + + // gets the matrix of this context + virtual wxGraphicsMatrix GetTransform() const; + + virtual void DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + virtual void DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + virtual void DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + virtual void PushState(); + virtual void PopState(); + + virtual void GetTextExtent( const wxString &str, wxDouble *width, wxDouble *height, + wxDouble *descent, wxDouble *externalLeading ) const; + virtual void GetPartialTextExtents(const wxString& text, wxArrayDouble& widths) const; + +protected: + virtual void DoDrawText( const wxString &str, wxDouble x, wxDouble y ); + + void Init(cairo_t *context); + +private: + cairo_t* m_context; + + wxVector m_layerOpacities; + + wxDECLARE_NO_COPY_CLASS(wxCairoContext); +}; + +#if wxUSE_IMAGE +// ---------------------------------------------------------------------------- +// wxCairoImageContext: context associated with a wxImage. +// ---------------------------------------------------------------------------- + +class wxCairoImageContext : public wxCairoContext +{ +public: + wxCairoImageContext(wxGraphicsRenderer* renderer, wxImage& image) : + wxCairoContext(renderer), + m_image(image), + m_data(renderer, image) + { + Init(cairo_create(m_data.GetCairoSurface())); + } + + virtual ~wxCairoImageContext() + { + m_image = m_data.ConvertToImage(); + } + +private: + wxImage& m_image; + wxCairoBitmapData m_data; + + wxDECLARE_NO_COPY_CLASS(wxCairoImageContext); +}; +#endif // wxUSE_IMAGE + +// ---------------------------------------------------------------------------- +// wxCairoPenBrushBaseData implementation +//----------------------------------------------------------------------------- + +wxCairoPenBrushBaseData::wxCairoPenBrushBaseData(wxGraphicsRenderer* renderer, + const wxColour& col, + bool isTransparent) + : wxGraphicsObjectRefData(renderer) +{ + m_hatchStyle = wxHATCHSTYLE_INVALID; + m_pattern = NULL; + m_bmpdata = NULL; + + if ( isTransparent ) + { + m_red = + m_green = + m_blue = + m_alpha = 0; + } + else // non-transparent + { + m_red = col.Red()/255.0; + m_green = col.Green()/255.0; + m_blue = col.Blue()/255.0; + m_alpha = col.Alpha()/255.0; + } +} + +wxCairoPenBrushBaseData::~wxCairoPenBrushBaseData() +{ + if (m_bmpdata) + { + // Deleting the bitmap data also deletes the pattern referenced by + // m_pattern, so set it to NULL to avoid deleting it twice. + delete m_bmpdata; + m_pattern = NULL; + } + if (m_pattern) + cairo_pattern_destroy(m_pattern); +} + +void wxCairoPenBrushBaseData::InitHatchPattern(cairo_t* ctext) +{ + cairo_surface_t* const + surface = cairo_surface_create_similar( + cairo_get_target(ctext), CAIRO_CONTENT_COLOR_ALPHA, 10, 10 + ); + + cairo_t* const cr = cairo_create(surface); + cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE); + cairo_set_line_width(cr, 1); + cairo_set_line_join(cr,CAIRO_LINE_JOIN_MITER); + + switch ( m_hatchStyle ) + { + case wxHATCHSTYLE_CROSS: + cairo_move_to(cr, 5, 0); + cairo_line_to(cr, 5, 10); + cairo_move_to(cr, 0, 5); + cairo_line_to(cr, 10, 5); + break; + + case wxHATCHSTYLE_BDIAGONAL: + cairo_move_to(cr, 0, 10); + cairo_line_to(cr, 10, 0); + break; + + case wxHATCHSTYLE_FDIAGONAL: + cairo_move_to(cr, 0, 0); + cairo_line_to(cr, 10, 10); + break; + + case wxHATCHSTYLE_CROSSDIAG: + cairo_move_to(cr, 0, 0); + cairo_line_to(cr, 10, 10); + cairo_move_to(cr, 10, 0); + cairo_line_to(cr, 0, 10); + break; + + case wxHATCHSTYLE_HORIZONTAL: + cairo_move_to(cr, 0, 5); + cairo_line_to(cr, 10, 5); + break; + + case wxHATCHSTYLE_VERTICAL: + cairo_move_to(cr, 5, 0); + cairo_line_to(cr, 5, 10); + break; + + default: + wxFAIL_MSG(wxS("Invalid hatch pattern style.")); + } + + cairo_set_source_rgba(cr, m_red, m_green, m_blue, m_alpha); + cairo_stroke(cr); + + cairo_destroy(cr); + + m_pattern = cairo_pattern_create_for_surface(surface); + cairo_surface_destroy(surface); + cairo_pattern_set_extend(m_pattern, CAIRO_EXTEND_REPEAT); +} + +void wxCairoPenBrushBaseData::InitStipple(wxBitmap* bmp) +{ + wxCHECK_RET( bmp && bmp->IsOk(), wxS("Invalid stippled bitmap") ); + + m_bmpdata = new wxCairoBitmapData(GetRenderer(), *bmp); + m_pattern = m_bmpdata->GetCairoPattern(); + cairo_pattern_set_extend(m_pattern, CAIRO_EXTEND_REPEAT); +} + +void wxCairoPenBrushBaseData::InitHatch(wxHatchStyle hatchStyle) +{ + // We can't create m_pattern right now as we don't have the Cairo context + // needed for it, so just remember that we need to do it. + m_hatchStyle = hatchStyle; +} + +void wxCairoPenBrushBaseData::Apply( wxGraphicsContext* context ) +{ + cairo_t* const ctext = (cairo_t*) context->GetNativeContext(); + + if ( m_hatchStyle != wxHATCHSTYLE_INVALID && !m_pattern ) + InitHatchPattern(ctext); + + if ( m_pattern ) + cairo_set_source(ctext, m_pattern); + else + cairo_set_source_rgba(ctext, m_red, m_green, m_blue, m_alpha); +} + +//----------------------------------------------------------------------------- +// wxCairoPenData implementation +//----------------------------------------------------------------------------- + +wxCairoPenData::~wxCairoPenData() +{ + delete[] m_userLengths; +} + +void wxCairoPenData::Init() +{ + m_lengths = NULL; + m_userLengths = NULL; + m_width = 0; + m_count = 0; +} + +wxCairoPenData::wxCairoPenData( wxGraphicsRenderer* renderer, const wxPen &pen ) + : wxCairoPenBrushBaseData(renderer, pen.GetColour(), pen.IsTransparent()) +{ + Init(); + m_width = pen.GetWidth(); + if (m_width <= 0.0) + m_width = 0.1; + + switch ( pen.GetCap() ) + { + case wxCAP_ROUND : + m_cap = CAIRO_LINE_CAP_ROUND; + break; + + case wxCAP_PROJECTING : + m_cap = CAIRO_LINE_CAP_SQUARE; + break; + + case wxCAP_BUTT : + m_cap = CAIRO_LINE_CAP_BUTT; + break; + + default : + m_cap = CAIRO_LINE_CAP_BUTT; + break; + } + + switch ( pen.GetJoin() ) + { + case wxJOIN_BEVEL : + m_join = CAIRO_LINE_JOIN_BEVEL; + break; + + case wxJOIN_MITER : + m_join = CAIRO_LINE_JOIN_MITER; + break; + + case wxJOIN_ROUND : + m_join = CAIRO_LINE_JOIN_ROUND; + break; + + default : + m_join = CAIRO_LINE_JOIN_MITER; + break; + } + + const double dashUnit = m_width < 1.0 ? 1.0 : m_width; + const double dotted[] = + { + dashUnit , dashUnit + 2.0 + }; + static const double short_dashed[] = + { + 9.0 , 6.0 + }; + static const double dashed[] = + { + 19.0 , 9.0 + }; + static const double dotted_dashed[] = + { + 9.0 , 6.0 , 3.0 , 3.0 + }; + + switch ( pen.GetStyle() ) + { + case wxPENSTYLE_SOLID : + break; + + case wxPENSTYLE_DOT : + m_count = WXSIZEOF(dotted); + m_userLengths = new double[ m_count ] ; + memcpy( m_userLengths, dotted, sizeof(dotted) ); + m_lengths = m_userLengths; + break; + + case wxPENSTYLE_LONG_DASH : + m_lengths = dashed ; + m_count = WXSIZEOF(dashed); + break; + + case wxPENSTYLE_SHORT_DASH : + m_lengths = short_dashed ; + m_count = WXSIZEOF(short_dashed); + break; + + case wxPENSTYLE_DOT_DASH : + m_lengths = dotted_dashed ; + m_count = WXSIZEOF(dotted_dashed); + break; + + case wxPENSTYLE_USER_DASH : + { + wxDash *wxdashes ; + m_count = pen.GetDashes( &wxdashes ) ; + if ((wxdashes != NULL) && (m_count > 0)) + { + m_userLengths = new double[m_count] ; + for ( int i = 0 ; i < m_count ; ++i ) + { + m_userLengths[i] = wxdashes[i] * dashUnit ; + + if ( i % 2 == 1 && m_userLengths[i] < dashUnit + 2.0 ) + m_userLengths[i] = dashUnit + 2.0 ; + else if ( i % 2 == 0 && m_userLengths[i] < dashUnit ) + m_userLengths[i] = dashUnit ; + } + } + m_lengths = m_userLengths ; + } + break; + + case wxPENSTYLE_STIPPLE : + case wxPENSTYLE_STIPPLE_MASK : + case wxPENSTYLE_STIPPLE_MASK_OPAQUE : + InitStipple(pen.GetStipple()); + break; + + default : + if ( pen.GetStyle() >= wxPENSTYLE_FIRST_HATCH + && pen.GetStyle() <= wxPENSTYLE_LAST_HATCH ) + { + InitHatch(static_cast(pen.GetStyle())); + } + break; + } +} + +void wxCairoPenData::Apply( wxGraphicsContext* context ) +{ + wxCairoPenBrushBaseData::Apply(context); + + cairo_t * ctext = (cairo_t*) context->GetNativeContext(); + cairo_set_line_width(ctext,m_width); + cairo_set_line_cap(ctext,m_cap); + cairo_set_line_join(ctext,m_join); + cairo_set_dash(ctext,(double*)m_lengths,m_count,0.0); +} + +//----------------------------------------------------------------------------- +// wxCairoBrushData implementation +//----------------------------------------------------------------------------- + +wxCairoBrushData::wxCairoBrushData( wxGraphicsRenderer* renderer ) + : wxCairoPenBrushBaseData(renderer, wxColour(), true /* transparent */) +{ + Init(); +} + +wxCairoBrushData::wxCairoBrushData( wxGraphicsRenderer* renderer, + const wxBrush &brush ) + : wxCairoPenBrushBaseData(renderer, brush.GetColour(), brush.IsTransparent()) +{ + Init(); + + switch ( brush.GetStyle() ) + { + case wxBRUSHSTYLE_STIPPLE: + case wxBRUSHSTYLE_STIPPLE_MASK: + case wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE: + InitStipple(brush.GetStipple()); + break; + + default: + if ( brush.IsHatch() ) + InitHatch(static_cast(brush.GetStyle())); + break; + } +} + +void wxCairoBrushData::AddGradientStops(const wxGraphicsGradientStops& stops) +{ + // loop over all the stops, they include the beginning and ending ones + const unsigned numStops = stops.GetCount(); + for ( unsigned n = 0; n < numStops; n++ ) + { + const wxGraphicsGradientStop stop = stops.Item(n); + + const wxColour col = stop.GetColour(); + + cairo_pattern_add_color_stop_rgba + ( + m_pattern, + stop.GetPosition(), + col.Red()/255.0, + col.Green()/255.0, + col.Blue()/255.0, + col.Alpha()/255.0 + ); + } + + wxASSERT_MSG(cairo_pattern_status(m_pattern) == CAIRO_STATUS_SUCCESS, + wxT("Couldn't create cairo pattern")); +} + +void +wxCairoBrushData::CreateLinearGradientBrush(wxDouble x1, wxDouble y1, + wxDouble x2, wxDouble y2, + const wxGraphicsGradientStops& stops) +{ + m_pattern = cairo_pattern_create_linear(x1,y1,x2,y2); + + AddGradientStops(stops); +} + +void +wxCairoBrushData::CreateRadialGradientBrush(wxDouble xo, wxDouble yo, + wxDouble xc, wxDouble yc, + wxDouble radius, + const wxGraphicsGradientStops& stops) +{ + m_pattern = cairo_pattern_create_radial(xo,yo,0.0,xc,yc,radius); + + AddGradientStops(stops); +} + +void wxCairoBrushData::Init() +{ + m_pattern = NULL; + m_bmpdata = NULL; +} + +//----------------------------------------------------------------------------- +// wxCairoFontData implementation +//----------------------------------------------------------------------------- + +void wxCairoFontData::InitColour(const wxColour& col) +{ + m_red = col.Red()/255.0; + m_green = col.Green()/255.0; + m_blue = col.Blue()/255.0; + m_alpha = col.Alpha()/255.0; +} + +void +wxCairoFontData::InitFontComponents(const wxString& facename, + cairo_font_slant_t slant, + cairo_font_weight_t weight) +{ + m_fontName = facename.mb_str(wxConvUTF8); + m_slant = slant; + m_weight = weight; +} + +wxCairoFontData::wxCairoFontData( wxGraphicsRenderer* renderer, const wxFont &font, + const wxColour& col ) + : wxGraphicsObjectRefData(renderer) +#ifdef __WXGTK__ + , m_wxfont(font) +#endif +{ + InitColour(col); + + m_size = font.GetPointSize(); + +#ifdef __WXMAC__ + m_font = cairo_quartz_font_face_create_for_cgfont( font.OSXGetCGFont() ); +#elif defined(__WXGTK__) +#else + InitFontComponents + ( + font.GetFaceName(), + font.GetStyle() == wxFONTSTYLE_ITALIC ? CAIRO_FONT_SLANT_ITALIC + : CAIRO_FONT_SLANT_NORMAL, + font.GetWeight() == wxFONTWEIGHT_BOLD ? CAIRO_FONT_WEIGHT_BOLD + : CAIRO_FONT_WEIGHT_NORMAL + ); +#endif +} + +wxCairoFontData::wxCairoFontData(wxGraphicsRenderer* renderer, + double sizeInPixels, + const wxString& facename, + int flags, + const wxColour& col) : + wxGraphicsObjectRefData(renderer) +{ + InitColour(col); + + // Resolution for Cairo image surfaces is 72 DPI meaning that the sizes in + // points and pixels are identical, so we can just pass the size in pixels + // directly to cairo_set_font_size(). + m_size = sizeInPixels; + +#if defined(__WXMAC__) + m_font = NULL; +#endif + + // There is no need to set m_underlined under wxGTK in this case, it can + // only be used if m_font != NULL. + + InitFontComponents + ( + facename, + flags & wxFONTFLAG_ITALIC ? CAIRO_FONT_SLANT_ITALIC + : CAIRO_FONT_SLANT_NORMAL, + flags & wxFONTFLAG_BOLD ? CAIRO_FONT_WEIGHT_BOLD + : CAIRO_FONT_WEIGHT_NORMAL + ); +} + +wxCairoFontData::~wxCairoFontData() +{ +#ifdef __WXMAC__ + if ( m_font ) + cairo_font_face_destroy( m_font ); +#endif +} + +bool wxCairoFontData::Apply( wxGraphicsContext* context ) +{ + cairo_t * ctext = (cairo_t*) context->GetNativeContext(); + cairo_set_source_rgba(ctext,m_red,m_green, m_blue,m_alpha); +#ifdef __WXGTK__ + if (m_wxfont.IsOk()) + { + // Nothing to do, the caller uses Pango layout functions to do + // everything. + return true; + } +#elif defined(__WXMAC__) + if ( m_font ) + { + cairo_set_font_face(ctext, m_font); + cairo_set_font_size(ctext, m_size ); + return true; + } +#endif + + // If we get here, we must be on a platform without native font support or + // we're using toy Cairo API even under wxGTK/wxMac. + cairo_select_font_face(ctext, m_fontName, m_slant, m_weight ); + cairo_set_font_size(ctext, m_size ); + + // Indicate that we don't use native fonts for the platforms which care + // about this (currently only wxGTK). + return false; +} + +//----------------------------------------------------------------------------- +// wxCairoPathData implementation +//----------------------------------------------------------------------------- + +wxCairoPathData::wxCairoPathData( wxGraphicsRenderer* renderer, cairo_t* pathcontext) + : wxGraphicsPathData(renderer) +{ + if (pathcontext) + { + m_pathContext = pathcontext; + } + else + { + cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,1,1); + m_pathContext = cairo_create(surface); + cairo_surface_destroy (surface); + } +} + +wxCairoPathData::~wxCairoPathData() +{ + cairo_destroy(m_pathContext); +} + +wxGraphicsObjectRefData *wxCairoPathData::Clone() const +{ + cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,1,1); + cairo_t* pathcontext = cairo_create(surface); + cairo_surface_destroy (surface); + + cairo_path_t* path = cairo_copy_path(m_pathContext); + cairo_append_path(pathcontext, path); + cairo_path_destroy(path); + return new wxCairoPathData( GetRenderer() ,pathcontext); +} + + +void* wxCairoPathData::GetNativePath() const +{ + return cairo_copy_path(m_pathContext) ; +} + +void wxCairoPathData::UnGetNativePath(void *p) const +{ + cairo_path_destroy((cairo_path_t*)p); +} + +// +// The Primitives +// + +void wxCairoPathData::MoveToPoint( wxDouble x , wxDouble y ) +{ + cairo_move_to(m_pathContext,x,y); +} + +void wxCairoPathData::AddLineToPoint( wxDouble x , wxDouble y ) +{ + cairo_line_to(m_pathContext,x,y); +} + +void wxCairoPathData::AddPath( const wxGraphicsPathData* path ) +{ + cairo_path_t* p = (cairo_path_t*)path->GetNativePath(); + cairo_append_path(m_pathContext, p); + UnGetNativePath(p); +} + +void wxCairoPathData::CloseSubpath() +{ + cairo_close_path(m_pathContext); +} + +void wxCairoPathData::AddCurveToPoint( wxDouble cx1, wxDouble cy1, wxDouble cx2, wxDouble cy2, wxDouble x, wxDouble y ) +{ + cairo_curve_to(m_pathContext,cx1,cy1,cx2,cy2,x,y); +} + +// gets the last point of the current path, (0,0) if not yet set +void wxCairoPathData::GetCurrentPoint( wxDouble* x, wxDouble* y) const +{ + double dx,dy; + cairo_get_current_point(m_pathContext,&dx,&dy); + if (x) + *x = dx; + if (y) + *y = dy; +} + +void wxCairoPathData::AddArc( wxDouble x, wxDouble y, wxDouble r, double startAngle, double endAngle, bool clockwise ) +{ + // as clockwise means positive in our system (y pointing downwards) + // TODO make this interpretation dependent of the + // real device trans + if ( clockwise||(endAngle-startAngle)>=2*M_PI) + cairo_arc(m_pathContext,x,y,r,startAngle,endAngle); + else + cairo_arc_negative(m_pathContext,x,y,r,startAngle,endAngle); +} + +// transforms each point of this path by the matrix +void wxCairoPathData::Transform( const wxGraphicsMatrixData* matrix ) +{ + // as we don't have a true path object, we have to apply the inverse + // matrix to the context + cairo_matrix_t m = *((cairo_matrix_t*) matrix->GetNativeMatrix()); + cairo_matrix_invert( &m ); + cairo_transform(m_pathContext,&m); +} + +// gets the bounding box enclosing all points (possibly including control points) +void wxCairoPathData::GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *h) const +{ + double x1,y1,x2,y2; + + cairo_stroke_extents( m_pathContext, &x1, &y1, &x2, &y2 ); + if ( x2 < x1 ) + { + *x = x2; + *w = x1-x2; + } + else + { + *x = x1; + *w = x2-x1; + } + + if( y2 < y1 ) + { + *y = y2; + *h = y1-y2; + } + else + { + *y = y1; + *h = y2-y1; + } +} + +bool wxCairoPathData::Contains( wxDouble x, wxDouble y, wxPolygonFillMode fillStyle ) const +{ + cairo_set_fill_rule(m_pathContext,fillStyle==wxODDEVEN_RULE ? CAIRO_FILL_RULE_EVEN_ODD : CAIRO_FILL_RULE_WINDING); + return cairo_in_fill( m_pathContext, x, y) != 0; +} + +//----------------------------------------------------------------------------- +// wxCairoMatrixData implementation +//----------------------------------------------------------------------------- + +wxCairoMatrixData::wxCairoMatrixData(wxGraphicsRenderer* renderer, const cairo_matrix_t* matrix ) + : wxGraphicsMatrixData(renderer) +{ + if ( matrix ) + m_matrix = *matrix; +} + +wxCairoMatrixData::~wxCairoMatrixData() +{ + // nothing to do +} + +wxGraphicsObjectRefData *wxCairoMatrixData::Clone() const +{ + return new wxCairoMatrixData(GetRenderer(),&m_matrix); +} + +// concatenates the matrix +void wxCairoMatrixData::Concat( const wxGraphicsMatrixData *t ) +{ + cairo_matrix_multiply( &m_matrix, &m_matrix, (cairo_matrix_t*) t->GetNativeMatrix()); +} + +// sets the matrix to the respective values +void wxCairoMatrixData::Set(wxDouble a, wxDouble b, wxDouble c, wxDouble d, + wxDouble tx, wxDouble ty) +{ + cairo_matrix_init( &m_matrix, a, b, c, d, tx, ty); +} + +// gets the component valuess of the matrix +void wxCairoMatrixData::Get(wxDouble* a, wxDouble* b, wxDouble* c, + wxDouble* d, wxDouble* tx, wxDouble* ty) const +{ + if (a) *a = m_matrix.xx; + if (b) *b = m_matrix.yx; + if (c) *c = m_matrix.xy; + if (d) *d = m_matrix.yy; + if (tx) *tx= m_matrix.x0; + if (ty) *ty= m_matrix.y0; +} + +// makes this the inverse matrix +void wxCairoMatrixData::Invert() +{ + cairo_matrix_invert( &m_matrix ); +} + +// returns true if the elements of the transformation matrix are equal ? +bool wxCairoMatrixData::IsEqual( const wxGraphicsMatrixData* t) const +{ + const cairo_matrix_t* tm = (cairo_matrix_t*) t->GetNativeMatrix(); + return ( + m_matrix.xx == tm->xx && + m_matrix.yx == tm->yx && + m_matrix.xy == tm->xy && + m_matrix.yy == tm->yy && + m_matrix.x0 == tm->x0 && + m_matrix.y0 == tm->y0 ) ; +} + +// return true if this is the identity matrix +bool wxCairoMatrixData::IsIdentity() const +{ + return ( m_matrix.xx == 1 && m_matrix.yy == 1 && + m_matrix.yx == 0 && m_matrix.xy == 0 && m_matrix.x0 == 0 && m_matrix.y0 == 0); +} + +// +// transformation +// + +// add the translation to this matrix +void wxCairoMatrixData::Translate( wxDouble dx , wxDouble dy ) +{ + cairo_matrix_translate( &m_matrix, dx, dy) ; +} + +// add the scale to this matrix +void wxCairoMatrixData::Scale( wxDouble xScale , wxDouble yScale ) +{ + cairo_matrix_scale( &m_matrix, xScale, yScale) ; +} + +// add the rotation to this matrix (radians) +void wxCairoMatrixData::Rotate( wxDouble angle ) +{ + cairo_matrix_rotate( &m_matrix, angle) ; +} + +// +// apply the transforms +// + +// applies that matrix to the point +void wxCairoMatrixData::TransformPoint( wxDouble *x, wxDouble *y ) const +{ + double lx = *x, ly = *y ; + cairo_matrix_transform_point( &m_matrix, &lx, &ly); + *x = lx; + *y = ly; +} + +// applies the matrix except for translations +void wxCairoMatrixData::TransformDistance( wxDouble *dx, wxDouble *dy ) const +{ + double lx = *dx, ly = *dy ; + cairo_matrix_transform_distance( &m_matrix, &lx, &ly); + *dx = lx; + *dy = ly; +} + +// returns the native representation +void * wxCairoMatrixData::GetNativeMatrix() const +{ + return (void*) &m_matrix; +} + +// ---------------------------------------------------------------------------- +// wxCairoBitmap implementation +// ---------------------------------------------------------------------------- + +int wxCairoBitmapData::InitBuffer(int width, int height, cairo_format_t format) +{ + wxUnusedVar(format); // Only really unused with Cairo < 1.6. + + // Determine the stride: use cairo_format_stride_for_width() if available + // but fall back to 4*width for the earlier versions as this is what that + // function always returns, even in latest Cairo, anyhow. + int stride; +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 6, 0) + if ( cairo_version() >= CAIRO_VERSION_ENCODE(1, 6, 0) ) + { + stride = cairo_format_stride_for_width(format, width); + + // All our code would totally break if stride were not a multiple of 4 + // so ensure this is the case. + if ( stride % 4 ) + { + wxFAIL_MSG("Unexpected Cairo image surface stride."); + + stride += 4 - stride % 4; + } + } + else +#endif + stride = 4*width; + + m_width = width; + m_height = height; + m_buffer = new unsigned char[height*stride]; + + return stride; +} + +void wxCairoBitmapData::InitSurface(cairo_format_t format, int stride) +{ + m_surface = cairo_image_surface_create_for_data( + m_buffer, format, m_width, m_height, stride); + m_pattern = cairo_pattern_create_for_surface(m_surface); +} + +wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, cairo_surface_t* bitmap ) : + wxGraphicsBitmapData( renderer ) +{ + m_surface = bitmap; + m_pattern = cairo_pattern_create_for_surface(m_surface); +} + +wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitmap& bmp ) : wxGraphicsBitmapData( renderer ) +{ + wxCHECK_RET( bmp.IsOk(), wxT("Invalid bitmap in wxCairoContext::DrawBitmap")); + +#ifdef wxHAS_RAW_BITMAP + // Create a surface object and copy the bitmap pixel data to it. if the + // image has alpha (or a mask represented as alpha) then we'll use a + // different format and iterator than if it doesn't... + cairo_format_t bufferFormat = bmp.GetDepth() == 32 +#if defined(__WXGTK__) && !defined(__WXGTK3__) + || bmp.GetMask() +#endif + ? CAIRO_FORMAT_ARGB32 + : CAIRO_FORMAT_RGB24; + + int stride = InitBuffer(bmp.GetWidth(), bmp.GetHeight(), bufferFormat); + + wxBitmap bmpSource = bmp; // we need a non-const instance + wxUint32* data = (wxUint32*)m_buffer; + + if ( bufferFormat == CAIRO_FORMAT_ARGB32 ) + { + // use the bitmap's alpha + wxAlphaPixelData + pixData(bmpSource, wxPoint(0, 0), wxSize(m_width, m_height)); + wxCHECK_RET( pixData, wxT("Failed to gain raw access to bitmap data.")); + + wxAlphaPixelData::Iterator p(pixData); + for (int y=0; yGetBitmap(); + bufferFormat = CAIRO_FORMAT_ARGB32; + data = (wxUint32*)m_buffer; + wxNativePixelData + pixData(bmpMask, wxPoint(0, 0), wxSize(m_width, m_height)); + wxCHECK_RET( pixData, wxT("Failed to gain raw access to mask data.")); + + wxNativePixelData::Iterator p(pixData); + for (int y=0; y(m_buffer); + const unsigned char* src = image.GetData(); + + if ( bufferFormat == CAIRO_FORMAT_ARGB32 ) + { + const unsigned char* alpha = image.GetAlpha(); + + for ( int y = 0; y < m_height; y++ ) + { + wxUint32* const rowStartDst = dst; + + for ( int x = 0; x < m_width; x++ ) + { + const unsigned char a = *alpha++; + + *dst++ = a << 24 | + Premultiply(a, src[0]) << 16 | + Premultiply(a, src[1]) << 8 | + Premultiply(a, src[2]); + src += 3; + } + + dst = rowStartDst + stride / 4; + } + } + else // RGB + { + for ( int y = 0; y < m_height; y++ ) + { + wxUint32* const rowStartDst = dst; + + for ( int x = 0; x < m_width; x++ ) + { + *dst++ = src[0] << 16 | + src[1] << 8 | + src[2]; + src += 3; + } + + dst = rowStartDst + stride / 4; + } + } + + InitSurface(bufferFormat, stride); +} + +wxImage wxCairoBitmapData::ConvertToImage() const +{ + wxImage image(m_width, m_height, false /* don't clear */); + + // Get the surface type and format. + wxCHECK_MSG( cairo_surface_get_type(m_surface) == CAIRO_SURFACE_TYPE_IMAGE, + wxNullImage, + wxS("Can't convert non-image surface to image.") ); + + switch ( cairo_image_surface_get_format(m_surface) ) + { + case CAIRO_FORMAT_ARGB32: + image.SetAlpha(); + break; + + case CAIRO_FORMAT_RGB24: + // Nothing to do, we don't use alpha by default. + break; + + case CAIRO_FORMAT_A8: + case CAIRO_FORMAT_A1: + wxFAIL_MSG(wxS("Unsupported Cairo image surface type.")); + return wxNullImage; + + default: + wxFAIL_MSG(wxS("Unknown Cairo image surface type.")); + return wxNullImage; + } + + // Prepare for copying data. + const wxUint32* src = (wxUint32*)cairo_image_surface_get_data(m_surface); + wxCHECK_MSG( src, wxNullImage, wxS("Failed to get Cairo surface data.") ); + + int stride = cairo_image_surface_get_stride(m_surface); + wxCHECK_MSG( stride > 0, wxNullImage, + wxS("Failed to get Cairo surface stride.") ); + + // As we work with wxUint32 pointers and not char ones, we need to adjust + // the stride accordingly. This should be lossless as the stride must be a + // multiple of pixel size. + wxASSERT_MSG( !(stride % sizeof(wxUint32)), wxS("Unexpected stride.") ); + stride /= sizeof(wxUint32); + + unsigned char* dst = image.GetData(); + unsigned char *alpha = image.GetAlpha(); + if ( alpha ) + { + // We need to also copy alpha and undo the pre-multiplication as Cairo + // stores pre-multiplied values in this format while wxImage does not. + for ( int y = 0; y < m_height; y++ ) + { + const wxUint32* const rowStart = src; + for ( int x = 0; x < m_width; x++ ) + { + const wxUint32 argb = *src++; + + const unsigned char a = argb >> 24; + *alpha++ = a; + + // Copy the RGB data undoing the pre-multiplication. + *dst++ = Unpremultiply(a, argb >> 16); + *dst++ = Unpremultiply(a, argb >> 8); + *dst++ = Unpremultiply(a, argb); + } + + src = rowStart + stride; + } + } + else // RGB + { + // Things are pretty simple in this case, just copy RGB bytes. + for ( int y = 0; y < m_height; y++ ) + { + const wxUint32* const rowStart = src; + for ( int x = 0; x < m_width; x++ ) + { + const wxUint32 argb = *src++; + + *dst++ = (argb & 0x00ff0000) >> 16; + *dst++ = (argb & 0x0000ff00) >> 8; + *dst++ = (argb & 0x000000ff); + } + + src = rowStart + stride; + } + } + + return image; +} + +#endif // wxUSE_IMAGE + +wxCairoBitmapData::~wxCairoBitmapData() +{ + if (m_pattern) + cairo_pattern_destroy(m_pattern); + + if (m_surface) + cairo_surface_destroy(m_surface); + + delete [] m_buffer; +} + +//----------------------------------------------------------------------------- +// wxCairoContext implementation +//----------------------------------------------------------------------------- + +class wxCairoOffsetHelper +{ +public : + wxCairoOffsetHelper( cairo_t* ctx , bool offset ) + { + m_ctx = ctx; + m_offset = offset; + if ( m_offset ) + cairo_translate( m_ctx, 0.5, 0.5 ); + } + ~wxCairoOffsetHelper( ) + { + if ( m_offset ) + cairo_translate( m_ctx, -0.5, -0.5 ); + } +public : + cairo_t* m_ctx; + bool m_offset; +} ; + +wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC& dc ) +: wxGraphicsContext(renderer) +{ +#ifdef __WXMSW__ + // wxMSW contexts always use MM_ANISOTROPIC, which messes up + // text rendering when printing using Cairo. Switch it to MM_TEXT + // map mode to avoid this problem. + HDC hdc = (HDC)dc.GetHDC(); + ::SetMapMode(hdc, MM_TEXT); + m_mswSurface = cairo_win32_printing_surface_create(hdc); + Init( cairo_create(m_mswSurface) ); +#endif + +#ifdef __WXGTK20__ + const wxDCImpl *impl = dc.GetImpl(); + cairo_t* cr = static_cast(impl->GetCairoContext()); + if (cr) + Init(cairo_reference(cr)); +#endif + wxSize sz = dc.GetSize(); + m_width = sz.x; + m_height = sz.y; + + wxPoint org = dc.GetDeviceOrigin(); + cairo_translate( m_context, org.x, org.y ); + + double sx,sy; + dc.GetUserScale( &sx, &sy ); + +// TODO: Determine if these fixes are needed on other platforms too. +// On MSW, without this the printer context will not respect wxDC SetMapMode calls. +// For example, using dc.SetMapMode(wxMM_POINTS) can let us share printer and screen +// drawing code +#ifdef __WXMSW__ + double lsx,lsy; + dc.GetLogicalScale( &lsx, &lsy ); + sx *= lsx; + sy *= lsy; +#endif + cairo_scale( m_context, sx, sy ); + + org = dc.GetLogicalOrigin(); + cairo_translate( m_context, -org.x, -org.y ); +} + +wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC& dc ) +: wxGraphicsContext(renderer) +{ + int width, height; + dc.GetSize( &width, &height ); + m_width = width; + m_height = height; + + m_enableOffset = true; + +#ifdef __WXMSW__ + m_mswSurface = cairo_win32_surface_create((HDC)dc.GetHDC()); + Init( cairo_create(m_mswSurface) ); +#endif + +#ifdef __WXGTK3__ + cairo_t* cr = static_cast(dc.GetImpl()->GetCairoContext()); + if (cr) + Init(cairo_reference(cr)); +#elif defined __WXGTK20__ + wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); + Init( gdk_cairo_create( impldc->GetGDKWindow() ) ); + +#if 0 + wxGraphicsMatrix matrix = CreateMatrix(); + + wxPoint org = dc.GetDeviceOrigin(); + matrix.Translate( org.x, org.y ); + + org = dc.GetLogicalOrigin(); + matrix.Translate( -org.x, -org.y ); + + double sx,sy; + dc.GetUserScale( &sx, &sy ); + matrix.Scale( sx, sy ); + + ConcatTransform( matrix ); +#endif +#endif + +#ifdef __WXMAC__ + CGContextRef cgcontext = (CGContextRef)dc.GetWindow()->MacGetCGContextRef(); + cairo_surface_t* surface = cairo_quartz_surface_create_for_cg_context(cgcontext, width, height); + Init( cairo_create( surface ) ); + cairo_surface_destroy( surface ); +#endif +} + +wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC& dc ) +: wxGraphicsContext(renderer) +{ + int width, height; + dc.GetSize( &width, &height ); + m_width = width; + m_height = height; + + m_enableOffset = true; + +#ifdef __WXMSW__ + + HDC hdc = (HDC)dc.GetHDC(); + + HBITMAP bitmap = (HBITMAP)GetCurrentObject(hdc, OBJ_BITMAP); + + BITMAP info; + bool hasBitmap = false; + + // cairo_win32_surface_create creates a 24-bit bitmap, + // so if we have alpha, we need to create a 32-bit surface instead. + if (!GetObject(bitmap, sizeof(info), &info) || info.bmBitsPixel < 32) + m_mswSurface = cairo_win32_surface_create(hdc); + else { + hasBitmap = true; + m_mswSurface = cairo_image_surface_create_for_data((unsigned char*)info.bmBits, + CAIRO_FORMAT_ARGB32, + info.bmWidth, + info.bmHeight, + info.bmWidthBytes); + } + + Init( cairo_create(m_mswSurface) ); + // If we've created a image surface, we need to flip the Y axis so that + // all drawing will appear right side up. + if (hasBitmap) { + cairo_matrix_t matrix; + cairo_matrix_init(&matrix, 1.0, 0.0, 0.0, -1.0, 0.0, height); + cairo_set_matrix(m_context, &matrix); + } +#endif + +#ifdef __WXGTK3__ + cairo_t* cr = static_cast(dc.GetImpl()->GetCairoContext()); + if (cr) + Init(cairo_reference(cr)); +#elif defined __WXGTK20__ + wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); + Init( gdk_cairo_create( impldc->GetGDKWindow() ) ); + +#if 0 + wxGraphicsMatrix matrix = CreateMatrix(); + + wxPoint org = dc.GetDeviceOrigin(); + matrix.Translate( org.x, org.y ); + + org = dc.GetLogicalOrigin(); + matrix.Translate( -org.x, -org.y ); + + double sx,sy; + dc.GetUserScale( &sx, &sy ); + matrix.Scale( sx, sy ); + + ConcatTransform( matrix ); +#endif +#endif + +#ifdef __WXMAC__ + CGContextRef cgcontext = (CGContextRef)dc.GetWindow()->MacGetCGContextRef(); + cairo_surface_t* surface = cairo_quartz_surface_create_for_cg_context(cgcontext, width, height); + Init( cairo_create( surface ) ); + cairo_surface_destroy( surface ); +#endif +} + +#ifdef __WXGTK20__ +wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, GdkWindow *window ) +: wxGraphicsContext(renderer) +{ + Init( gdk_cairo_create( window ) ); + +#ifdef __WXGTK3__ + m_width = gdk_window_get_width(window); + m_height = gdk_window_get_height(window); +#else + int width, height; + gdk_drawable_get_size(window, &width, &height); + m_width = width; + m_height = height; +#endif +} +#endif + +#ifdef __WXMSW__ +wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, HDC handle ) +: wxGraphicsContext(renderer) +{ + m_mswSurface = cairo_win32_surface_create(handle); + Init( cairo_create(m_mswSurface) ); + m_width = + m_height = 0; +} +#endif + + +wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, cairo_t *context ) +: wxGraphicsContext(renderer) +{ + Init( context ); + m_width = + m_height = 0; +} + +wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, wxWindow *window) + : wxGraphicsContext(renderer) +#ifdef __WXMSW__ + , m_mswWindowHDC(GetHwndOf(window)) +#endif +{ + m_enableOffset = true; +#ifdef __WXGTK__ + // something along these lines (copied from dcclient) + + // Some controls don't have m_wxwindow - like wxStaticBox, but the user + // code should still be able to create wxClientDCs for them, so we will + // use the parent window here then. + if (window->m_wxwindow == NULL) + { + window = window->GetParent(); + } + + wxASSERT_MSG( window->m_wxwindow, wxT("wxCairoContext needs a widget") ); + + Init(gdk_cairo_create(window->GTKGetDrawingWindow())); + + wxSize sz = window->GetSize(); + m_width = sz.x; + m_height = sz.y; +#endif + +#ifdef __WXMSW__ + m_mswSurface = cairo_win32_surface_create((HDC)m_mswWindowHDC); + Init(cairo_create(m_mswSurface)); +#endif + +} + +wxCairoContext::wxCairoContext(wxGraphicsRenderer* renderer) : + wxGraphicsContext(renderer) +{ + m_context = NULL; +} + +wxCairoContext::~wxCairoContext() +{ + if ( m_context ) + { + PopState(); + PopState(); + cairo_destroy(m_context); + } +#ifdef __WXMSW__ + if ( m_mswSurface ) + cairo_surface_destroy(m_mswSurface); +#endif +} + +void wxCairoContext::Init(cairo_t *context) +{ + m_context = context ; + PushState(); + PushState(); +} + + +void wxCairoContext::Clip( const wxRegion& region ) +{ + // Create a path with all the rectangles in the region + wxGraphicsPath path = GetRenderer()->CreatePath(); + wxRegionIterator ri(region); + while (ri) + { + path.AddRectangle(ri.GetX(), ri.GetY(), ri.GetW(), ri.GetH()); + ++ri; + } + + // Put it in the context + cairo_path_t* cp = (cairo_path_t*) path.GetNativePath() ; + cairo_append_path(m_context, cp); + + // clip to that path + cairo_clip(m_context); + path.UnGetNativePath(cp); +} + +void wxCairoContext::Clip( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +{ + // Create a path with this rectangle + wxGraphicsPath path = GetRenderer()->CreatePath(); + path.AddRectangle(x,y,w,h); + + // Put it in the context + cairo_path_t* cp = (cairo_path_t*) path.GetNativePath() ; + cairo_append_path(m_context, cp); + + // clip to that path + cairo_clip(m_context); + path.UnGetNativePath(cp); +} + +void wxCairoContext::ResetClip() +{ + cairo_reset_clip(m_context); +} + + +void wxCairoContext::StrokePath( const wxGraphicsPath& path ) +{ + if ( !m_pen.IsNull() ) + { + wxCairoOffsetHelper helper( m_context, ShouldOffset() ) ; + cairo_path_t* cp = (cairo_path_t*) path.GetNativePath() ; + cairo_append_path(m_context,cp); + ((wxCairoPenData*)m_pen.GetRefData())->Apply(this); + cairo_stroke(m_context); + path.UnGetNativePath(cp); + } +} + +void wxCairoContext::FillPath( const wxGraphicsPath& path , wxPolygonFillMode fillStyle ) +{ + if ( !m_brush.IsNull() ) + { + wxCairoOffsetHelper helper( m_context, ShouldOffset() ) ; + cairo_path_t* cp = (cairo_path_t*) path.GetNativePath() ; + cairo_append_path(m_context,cp); + ((wxCairoBrushData*)m_brush.GetRefData())->Apply(this); + cairo_set_fill_rule(m_context,fillStyle==wxODDEVEN_RULE ? CAIRO_FILL_RULE_EVEN_ODD : CAIRO_FILL_RULE_WINDING); + cairo_fill(m_context); + path.UnGetNativePath(cp); + } +} + +void wxCairoContext::Rotate( wxDouble angle ) +{ + cairo_rotate(m_context,angle); +} + +void wxCairoContext::Translate( wxDouble dx , wxDouble dy ) +{ + cairo_translate(m_context,dx,dy); +} + +void wxCairoContext::Scale( wxDouble xScale , wxDouble yScale ) +{ + cairo_scale(m_context,xScale,yScale); +} + +// concatenates this transform with the current transform of this context +void wxCairoContext::ConcatTransform( const wxGraphicsMatrix& matrix ) +{ + cairo_transform(m_context,(const cairo_matrix_t *) matrix.GetNativeMatrix()); +} + +// sets the transform of this context +void wxCairoContext::SetTransform( const wxGraphicsMatrix& matrix ) +{ + cairo_set_matrix(m_context,(const cairo_matrix_t*) matrix.GetNativeMatrix()); +} + +// gets the matrix of this context +wxGraphicsMatrix wxCairoContext::GetTransform() const +{ + wxGraphicsMatrix matrix = CreateMatrix(); + cairo_get_matrix(m_context,(cairo_matrix_t*) matrix.GetNativeMatrix()); + return matrix; +} + + + +void wxCairoContext::PushState() +{ + cairo_save(m_context); +} + +void wxCairoContext::PopState() +{ + cairo_restore(m_context); +} + +void wxCairoContext::DrawBitmap( const wxBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +{ + wxGraphicsBitmap bitmap = GetRenderer()->CreateBitmap(bmp); + DrawBitmap(bitmap, x, y, w, h); + +} + +void wxCairoContext::DrawBitmap(const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +{ + PushState(); + + // In case we're scaling the image by using a width and height different + // than the bitmap's size create a pattern transformation on the surface and + // draw the transformed pattern. + wxCairoBitmapData* data = static_cast(bmp.GetRefData()); + cairo_pattern_t* pattern = data->GetCairoPattern(); + wxSize size = data->GetSize(); + + wxDouble scaleX = w / size.GetWidth(); + wxDouble scaleY = h / size.GetHeight(); + + // prepare to draw the image + cairo_translate(m_context, x, y); + cairo_scale(m_context, scaleX, scaleY); + cairo_set_source(m_context, pattern); + // use the original size here since the context is scaled already... + cairo_rectangle(m_context, 0, 0, size.GetWidth(), size.GetHeight()); + // fill the rectangle using the pattern + cairo_fill(m_context); + + PopState(); +} + +void wxCairoContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) +{ + // An icon is a bitmap on wxGTK, so do this the easy way. When we want to + // start using the Cairo backend on other platforms then we may need to + // fiddle with this... + DrawBitmap(icon, x, y, w, h); +} + + +void wxCairoContext::DoDrawText(const wxString& str, wxDouble x, wxDouble y) +{ + wxCHECK_RET( !m_font.IsNull(), + wxT("wxCairoContext::DrawText - no valid font set") ); + + if ( str.empty()) + return; + + const wxCharBuffer data = str.utf8_str(); + if ( !data ) + return; + + if ( ((wxCairoFontData*)m_font.GetRefData())->Apply(this) ) + { +#ifdef __WXGTK__ + PangoLayout *layout = pango_cairo_create_layout (m_context); + const wxFont& font = static_cast(m_font.GetRefData())->GetFont(); + pango_layout_set_font_description(layout, font.GetNativeFontInfo()->description); + pango_layout_set_text(layout, data, data.length()); + font.GTKSetPangoAttrs(layout); + + cairo_move_to(m_context, x, y); + pango_cairo_show_layout (m_context, layout); + + g_object_unref (layout); + + // Don't use Cairo text API, we already did everything. + return; +#endif + } + + // Cairo's x,y for drawing text is at the baseline, so we need to adjust + // the position we move to by the ascent. + cairo_font_extents_t fe; + cairo_font_extents(m_context, &fe); + cairo_move_to(m_context, x, y+fe.ascent); + + cairo_show_text(m_context, data); +} + +void wxCairoContext::GetTextExtent( const wxString &str, wxDouble *width, wxDouble *height, + wxDouble *descent, wxDouble *externalLeading ) const +{ + wxCHECK_RET( !m_font.IsNull(), wxT("wxCairoContext::GetTextExtent - no valid font set") ); + + if ( width ) + *width = 0; + if ( height ) + *height = 0; + if ( descent ) + *descent = 0; + if ( externalLeading ) + *externalLeading = 0; + + if ( str.empty()) + return; + + if ( ((wxCairoFontData*)m_font.GetRefData())->Apply((wxCairoContext*)this) ) + { +#ifdef __WXGTK__ + int w, h; + + PangoLayout *layout = pango_cairo_create_layout (m_context); + const wxFont& font = static_cast(m_font.GetRefData())->GetFont(); + pango_layout_set_font_description(layout, font.GetNativeFontInfo()->description); + const wxCharBuffer data = str.utf8_str(); + if ( !data ) + { + return; + } + pango_layout_set_text(layout, data, data.length()); + pango_layout_get_pixel_size (layout, &w, &h); + if ( width ) + *width = w; + if ( height ) + *height = h; + if (descent) + { + PangoLayoutIter *iter = pango_layout_get_iter(layout); + int baseline = pango_layout_iter_get_baseline(iter); + pango_layout_iter_free(iter); + *descent = h - PANGO_PIXELS(baseline); + } + g_object_unref (layout); + return; +#endif + } + + if (width) + { + const wxWX2MBbuf buf(str.mb_str(wxConvUTF8)); + cairo_text_extents_t te; + cairo_text_extents(m_context, buf, &te); + *width = te.width; + } + + if (height || descent || externalLeading) + { + cairo_font_extents_t fe; + cairo_font_extents(m_context, &fe); + + // some backends have negative descents + + if ( fe.descent < 0 ) + fe.descent = -fe.descent; + + if ( fe.height < (fe.ascent + fe.descent ) ) + { + // some backends are broken re height ... (eg currently ATSUI) + fe.height = fe.ascent + fe.descent; + } + + if (height) + *height = fe.height; + if ( descent ) + *descent = fe.descent; + if ( externalLeading ) + *externalLeading = wxMax(0, fe.height - (fe.ascent + fe.descent)); + } +} + +void wxCairoContext::GetPartialTextExtents(const wxString& text, wxArrayDouble& widths) const +{ + widths.Empty(); + wxCHECK_RET( !m_font.IsNull(), wxT("wxCairoContext::GetPartialTextExtents - no valid font set") ); +#ifdef __WXGTK__ + const wxCharBuffer data = text.utf8_str(); + int w = 0; + if (data.length()) + { + PangoLayout* layout = pango_cairo_create_layout(m_context); + const wxFont& font = static_cast(m_font.GetRefData())->GetFont(); + pango_layout_set_font_description(layout, font.GetNativeFontInfo()->description); + pango_layout_set_text(layout, data, data.length()); + PangoLayoutIter* iter = pango_layout_get_iter(layout); + PangoRectangle rect; + do { + pango_layout_iter_get_cluster_extents(iter, NULL, &rect); + w += rect.width; + widths.Add(PANGO_PIXELS(w)); + } while (pango_layout_iter_next_cluster(iter)); + pango_layout_iter_free(iter); + g_object_unref(layout); + } + size_t i = widths.GetCount(); + const size_t len = text.length(); + while (i++ < len) + widths.Add(PANGO_PIXELS(w)); +#else + // TODO +#endif +} + +void * wxCairoContext::GetNativeContext() +{ + return m_context; +} + +bool wxCairoContext::SetAntialiasMode(wxAntialiasMode antialias) +{ + if (m_antialias == antialias) + return true; + + m_antialias = antialias; + + cairo_antialias_t antialiasMode; + switch (antialias) + { + case wxANTIALIAS_DEFAULT: + antialiasMode = CAIRO_ANTIALIAS_DEFAULT; + break; + case wxANTIALIAS_NONE: + antialiasMode = CAIRO_ANTIALIAS_NONE; + break; + default: + return false; + } + cairo_set_antialias(m_context, antialiasMode); + return true; +} + +bool wxCairoContext::SetInterpolationQuality(wxInterpolationQuality WXUNUSED(interpolation)) +{ + // placeholder + return false; +} + +bool wxCairoContext::SetCompositionMode(wxCompositionMode op) +{ + if ( m_composition == op ) + return true; + + m_composition = op; + cairo_operator_t cop; + switch (op) + { + case wxCOMPOSITION_CLEAR: + cop = CAIRO_OPERATOR_CLEAR; + break; + case wxCOMPOSITION_SOURCE: + cop = CAIRO_OPERATOR_SOURCE; + break; + case wxCOMPOSITION_OVER: + cop = CAIRO_OPERATOR_OVER; + break; + case wxCOMPOSITION_IN: + cop = CAIRO_OPERATOR_IN; + break; + case wxCOMPOSITION_OUT: + cop = CAIRO_OPERATOR_OUT; + break; + case wxCOMPOSITION_ATOP: + cop = CAIRO_OPERATOR_ATOP; + break; + case wxCOMPOSITION_DEST: + cop = CAIRO_OPERATOR_DEST; + break; + case wxCOMPOSITION_DEST_OVER: + cop = CAIRO_OPERATOR_DEST_OVER; + break; + case wxCOMPOSITION_DEST_IN: + cop = CAIRO_OPERATOR_DEST_IN; + break; + case wxCOMPOSITION_DEST_OUT: + cop = CAIRO_OPERATOR_DEST_OUT; + break; + case wxCOMPOSITION_DEST_ATOP: + cop = CAIRO_OPERATOR_DEST_ATOP; + break; + case wxCOMPOSITION_XOR: + cop = CAIRO_OPERATOR_XOR; + break; + case wxCOMPOSITION_ADD: + cop = CAIRO_OPERATOR_ADD; + break; + default: + return false; + } + cairo_set_operator(m_context, cop); + return true; +} + +void wxCairoContext::BeginLayer(wxDouble opacity) +{ + m_layerOpacities.push_back(opacity); + cairo_push_group(m_context); +} + +void wxCairoContext::EndLayer() +{ + float opacity = m_layerOpacities.back(); + m_layerOpacities.pop_back(); + cairo_pop_group_to_source(m_context); + cairo_paint_with_alpha(m_context,opacity); +} + +//----------------------------------------------------------------------------- +// wxCairoRenderer declaration +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxCairoRenderer : public wxGraphicsRenderer +{ +public : + wxCairoRenderer() {} + + virtual ~wxCairoRenderer() {} + + // Context + + virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc); + virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc); + virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc); + + virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ); + + virtual wxGraphicsContext * CreateContextFromNativeWindow( void * window ); +#if wxUSE_IMAGE + virtual wxGraphicsContext * CreateContextFromImage(wxImage& image); +#endif // wxUSE_IMAGE + + virtual wxGraphicsContext * CreateContext( wxWindow* window ); + + virtual wxGraphicsContext * CreateMeasuringContext(); +#ifdef __WXMSW__ +#if wxUSE_ENH_METAFILE + virtual wxGraphicsContext * CreateContext( const wxEnhMetaFileDC& dc); +#endif +#endif + // Path + + virtual wxGraphicsPath CreatePath(); + + // Matrix + + virtual wxGraphicsMatrix CreateMatrix( wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, + wxDouble tx=0.0, wxDouble ty=0.0); + + + virtual wxGraphicsPen CreatePen(const wxPen& pen) ; + + virtual wxGraphicsBrush CreateBrush(const wxBrush& brush ) ; + + virtual wxGraphicsBrush + CreateLinearGradientBrush(wxDouble x1, wxDouble y1, + wxDouble x2, wxDouble y2, + const wxGraphicsGradientStops& stops); + + virtual wxGraphicsBrush + CreateRadialGradientBrush(wxDouble xo, wxDouble yo, + wxDouble xc, wxDouble yc, + wxDouble radius, + const wxGraphicsGradientStops& stops); + + // sets the font + virtual wxGraphicsFont CreateFont( const wxFont &font , const wxColour &col = *wxBLACK ) ; + virtual wxGraphicsFont CreateFont(double sizeInPixels, + const wxString& facename, + int flags = wxFONTFLAG_DEFAULT, + const wxColour& col = *wxBLACK); + + // create a native bitmap representation + virtual wxGraphicsBitmap CreateBitmap( const wxBitmap &bitmap ); +#if wxUSE_IMAGE + virtual wxGraphicsBitmap CreateBitmapFromImage(const wxImage& image); + virtual wxImage CreateImageFromBitmap(const wxGraphicsBitmap& bmp); +#endif // wxUSE_IMAGE + + // create a graphics bitmap from a native bitmap + virtual wxGraphicsBitmap CreateBitmapFromNativeBitmap( void* bitmap ); + + // create a subimage from a native image representation + virtual wxGraphicsBitmap CreateSubBitmap( const wxGraphicsBitmap &bitmap, wxDouble x, wxDouble y, wxDouble w, wxDouble h ); + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxCairoRenderer) +} ; + +//----------------------------------------------------------------------------- +// wxCairoRenderer implementation +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxCairoRenderer,wxGraphicsRenderer) + +static wxCairoRenderer gs_cairoGraphicsRenderer; + +#ifdef __WXGTK__ + #define ENSURE_LOADED_OR_RETURN(returnOnFail) +#else + #define ENSURE_LOADED_OR_RETURN(returnOnFail) \ + if (!wxCairoInit()) \ + return returnOnFail +#endif + +wxGraphicsContext * wxCairoRenderer::CreateContext( const wxWindowDC& dc) +{ + ENSURE_LOADED_OR_RETURN(NULL); + return new wxCairoContext(this,dc); +} + +wxGraphicsContext * wxCairoRenderer::CreateContext( const wxMemoryDC& dc) +{ + ENSURE_LOADED_OR_RETURN(NULL); + return new wxCairoContext(this,dc); +} + +wxGraphicsContext * wxCairoRenderer::CreateContext( const wxPrinterDC& dc) +{ + ENSURE_LOADED_OR_RETURN(NULL); + return new wxCairoContext(this, dc); +} + +#ifdef __WXMSW__ +#if wxUSE_ENH_METAFILE +wxGraphicsContext * wxCairoRenderer::CreateContext( const wxEnhMetaFileDC& WXUNUSED(dc) ) +{ + return NULL; +} +#endif +#endif + +wxGraphicsContext * wxCairoRenderer::CreateContextFromNativeContext( void * context ) +{ + ENSURE_LOADED_OR_RETURN(NULL); +#ifdef __WXMSW__ + return new wxCairoContext(this,(HDC)context); +#else + return new wxCairoContext(this,(cairo_t*)context); +#endif +} + + +wxGraphicsContext * wxCairoRenderer::CreateContextFromNativeWindow( void * window ) +{ +#ifdef __WXGTK__ + return new wxCairoContext(this, static_cast(window)); +#else + wxUnusedVar(window); + return NULL; +#endif +} + +#if wxUSE_IMAGE +wxGraphicsContext * wxCairoRenderer::CreateContextFromImage(wxImage& image) +{ + ENSURE_LOADED_OR_RETURN(NULL); + return new wxCairoImageContext(this, image); +} +#endif // wxUSE_IMAGE + +wxGraphicsContext * wxCairoRenderer::CreateMeasuringContext() +{ +#ifdef __WXGTK__ + return CreateContextFromNativeWindow(gdk_get_default_root_window()); +#else + return NULL; + // TODO +#endif +} + +wxGraphicsContext * wxCairoRenderer::CreateContext( wxWindow* window ) +{ + ENSURE_LOADED_OR_RETURN(NULL); + return new wxCairoContext(this, window ); +} + +// Path + +wxGraphicsPath wxCairoRenderer::CreatePath() +{ + wxGraphicsPath path; + ENSURE_LOADED_OR_RETURN(path); + path.SetRefData( new wxCairoPathData(this) ); + return path; +} + + +// Matrix + +wxGraphicsMatrix wxCairoRenderer::CreateMatrix( wxDouble a, wxDouble b, wxDouble c, wxDouble d, + wxDouble tx, wxDouble ty) + +{ + wxGraphicsMatrix m; + ENSURE_LOADED_OR_RETURN(m); + wxCairoMatrixData* data = new wxCairoMatrixData( this ); + data->Set( a,b,c,d,tx,ty ) ; + m.SetRefData(data); + return m; +} + +wxGraphicsPen wxCairoRenderer::CreatePen(const wxPen& pen) +{ + wxGraphicsPen p; + ENSURE_LOADED_OR_RETURN(p); + if (pen.IsOk() && pen.GetStyle() != wxPENSTYLE_TRANSPARENT) + { + p.SetRefData(new wxCairoPenData( this, pen )); + } + return p; +} + +wxGraphicsBrush wxCairoRenderer::CreateBrush(const wxBrush& brush ) +{ + wxGraphicsBrush p; + ENSURE_LOADED_OR_RETURN(p); + if (brush.IsOk() && brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT) + { + p.SetRefData(new wxCairoBrushData( this, brush )); + } + return p; +} + +wxGraphicsBrush +wxCairoRenderer::CreateLinearGradientBrush(wxDouble x1, wxDouble y1, + wxDouble x2, wxDouble y2, + const wxGraphicsGradientStops& stops) +{ + wxGraphicsBrush p; + ENSURE_LOADED_OR_RETURN(p); + wxCairoBrushData* d = new wxCairoBrushData( this ); + d->CreateLinearGradientBrush(x1, y1, x2, y2, stops); + p.SetRefData(d); + return p; +} + +wxGraphicsBrush +wxCairoRenderer::CreateRadialGradientBrush(wxDouble xo, wxDouble yo, + wxDouble xc, wxDouble yc, wxDouble r, + const wxGraphicsGradientStops& stops) +{ + wxGraphicsBrush p; + ENSURE_LOADED_OR_RETURN(p); + wxCairoBrushData* d = new wxCairoBrushData( this ); + d->CreateRadialGradientBrush(xo, yo, xc, yc, r, stops); + p.SetRefData(d); + return p; +} + +wxGraphicsFont wxCairoRenderer::CreateFont( const wxFont &font , const wxColour &col ) +{ + wxGraphicsFont p; + ENSURE_LOADED_OR_RETURN(p); + if ( font.IsOk() ) + { + p.SetRefData(new wxCairoFontData( this , font, col )); + } + return p; +} + +wxGraphicsFont +wxCairoRenderer::CreateFont(double sizeInPixels, + const wxString& facename, + int flags, + const wxColour& col) +{ + wxGraphicsFont font; + ENSURE_LOADED_OR_RETURN(font); + font.SetRefData(new wxCairoFontData(this, sizeInPixels, facename, flags, col)); + return font; +} + +wxGraphicsBitmap wxCairoRenderer::CreateBitmap( const wxBitmap& bmp ) +{ + wxGraphicsBitmap p; + ENSURE_LOADED_OR_RETURN(p); + if ( bmp.IsOk() ) + { + p.SetRefData(new wxCairoBitmapData( this , bmp )); + } + return p; +} + +#if wxUSE_IMAGE + +wxGraphicsBitmap wxCairoRenderer::CreateBitmapFromImage(const wxImage& image) +{ + wxGraphicsBitmap bmp; + + ENSURE_LOADED_OR_RETURN(bmp); + + if ( image.IsOk() ) + { + bmp.SetRefData(new wxCairoBitmapData(this, image)); + } + + return bmp; +} + +wxImage wxCairoRenderer::CreateImageFromBitmap(const wxGraphicsBitmap& bmp) +{ + wxImage image; + ENSURE_LOADED_OR_RETURN(image); + + const wxCairoBitmapData* const + data = static_cast(bmp.GetGraphicsData()); + if (data) + image = data->ConvertToImage(); + + return image; +} + +#endif // wxUSE_IMAGE + + +wxGraphicsBitmap wxCairoRenderer::CreateBitmapFromNativeBitmap( void* bitmap ) +{ + wxGraphicsBitmap p; + ENSURE_LOADED_OR_RETURN(p); + if ( bitmap != NULL ) + { + p.SetRefData(new wxCairoBitmapData( this , (cairo_surface_t*) bitmap )); + } + return p; +} + +wxGraphicsBitmap +wxCairoRenderer::CreateSubBitmap(const wxGraphicsBitmap& WXUNUSED(bitmap), + wxDouble WXUNUSED(x), + wxDouble WXUNUSED(y), + wxDouble WXUNUSED(w), + wxDouble WXUNUSED(h)) +{ + wxGraphicsBitmap p; + wxFAIL_MSG("wxCairoRenderer::CreateSubBitmap is not implemented."); + return p; +} + +wxGraphicsRenderer* wxGraphicsRenderer::GetCairoRenderer() +{ + return &gs_cairoGraphicsRenderer; +} + +#else // !wxUSE_CAIRO + +wxGraphicsRenderer* wxGraphicsRenderer::GetCairoRenderer() +{ + return NULL; +} + +#endif // wxUSE_CAIRO/!wxUSE_CAIRO + +// MSW and OS X have their own native default renderers, but the other ports +// use Cairo by default +#if !(defined(__WXMSW__) || defined(__WXOSX__)) +wxGraphicsRenderer* wxGraphicsRenderer::GetDefaultRenderer() +{ + return GetCairoRenderer(); +} +#endif // !(__WXMSW__ || __WXOSX__) + +#endif // wxUSE_GRAPHICS_CONTEXT diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/grid.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/grid.cpp new file mode 100644 index 0000000000..e292e452ba --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/grid.cpp @@ -0,0 +1,9337 @@ +/////////////////////////////////////////////////////////////////////////// +// Name: src/generic/grid.cpp +// Purpose: wxGrid and related classes +// Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) +// Modified by: Robin Dunn, Vadim Zeitlin, Santiago Palacios +// Created: 1/08/1999 +// Copyright: (c) Michael Bedward (mbedward@ozemail.com.au) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + TODO: + + - Replace use of wxINVERT with wxOverlay + - Make Begin/EndBatch() the same as the generic Freeze/Thaw() + - Review the column reordering code, it's a mess. + - Implement row reordering after dealing with the columns. + */ + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_GRID + +#include "wx/grid.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/log.h" + #include "wx/textctrl.h" + #include "wx/checkbox.h" + #include "wx/combobox.h" + #include "wx/valtext.h" + #include "wx/intl.h" + #include "wx/math.h" + #include "wx/listbox.h" +#endif + +#include "wx/textfile.h" +#include "wx/spinctrl.h" +#include "wx/tokenzr.h" +#include "wx/renderer.h" +#include "wx/headerctrl.h" +#include "wx/hashset.h" + +#include "wx/generic/gridsel.h" +#include "wx/generic/gridctrl.h" +#include "wx/generic/grideditors.h" +#include "wx/generic/private/grid.h" + +const char wxGridNameStr[] = "grid"; + +#if defined(__WXMOTIF__) + #define WXUNUSED_MOTIF(identifier) WXUNUSED(identifier) +#else + #define WXUNUSED_MOTIF(identifier) identifier +#endif + +#if defined(__WXGTK__) + #define WXUNUSED_GTK(identifier) WXUNUSED(identifier) +#else + #define WXUNUSED_GTK(identifier) identifier +#endif + +// Required for wxIs... functions +#include + +WX_DECLARE_HASH_SET_WITH_DECL_PTR(int, wxIntegerHash, wxIntegerEqual, + wxGridFixedIndicesSet, class WXDLLIMPEXP_ADV); + + +// ---------------------------------------------------------------------------- +// globals +// ---------------------------------------------------------------------------- + +namespace +{ + +//#define DEBUG_ATTR_CACHE +#ifdef DEBUG_ATTR_CACHE + static size_t gs_nAttrCacheHits = 0; + static size_t gs_nAttrCacheMisses = 0; +#endif + +// this struct simply combines together the default header renderers +// +// as the renderers ctors are trivial, there is no problem with making them +// globals +struct DefaultHeaderRenderers +{ + wxGridColumnHeaderRendererDefault colRenderer; + wxGridRowHeaderRendererDefault rowRenderer; + wxGridCornerHeaderRendererDefault cornerRenderer; +} gs_defaultHeaderRenderers; + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +wxGridCellCoords wxGridNoCellCoords( -1, -1 ); +wxRect wxGridNoCellRect( -1, -1, -1, -1 ); + +namespace +{ + +// scroll line size +const size_t GRID_SCROLL_LINE_X = 15; +const size_t GRID_SCROLL_LINE_Y = GRID_SCROLL_LINE_X; + +// the size of hash tables used a bit everywhere (the max number of elements +// in these hash tables is the number of rows/columns) +const int GRID_HASH_SIZE = 100; + +// the minimal distance in pixels the mouse needs to move to start a drag +// operation +const int DRAG_SENSITIVITY = 3; + +} // anonymous namespace + +#include "wx/arrimpl.cpp" + +WX_DEFINE_OBJARRAY(wxGridCellCoordsArray) +WX_DEFINE_OBJARRAY(wxGridCellWithAttrArray) + +// ---------------------------------------------------------------------------- +// events +// ---------------------------------------------------------------------------- + +wxDEFINE_EVENT( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_CELL_RIGHT_DCLICK, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_CELL_BEGIN_DRAG, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_LABEL_LEFT_DCLICK, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_LABEL_RIGHT_DCLICK, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_ROW_SIZE, wxGridSizeEvent ); +wxDEFINE_EVENT( wxEVT_GRID_COL_SIZE, wxGridSizeEvent ); +wxDEFINE_EVENT( wxEVT_GRID_COL_AUTO_SIZE, wxGridSizeEvent ); +wxDEFINE_EVENT( wxEVT_GRID_COL_MOVE, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_COL_SORT, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEvent ); +wxDEFINE_EVENT( wxEVT_GRID_CELL_CHANGING, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_CELL_CHANGED, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_SELECT_CELL, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_EDITOR_SHOWN, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_EDITOR_HIDDEN, wxGridEvent ); +wxDEFINE_EVENT( wxEVT_GRID_EDITOR_CREATED, wxGridEditorCreatedEvent ); +wxDEFINE_EVENT( wxEVT_GRID_TABBING, wxGridEvent ); + +// ---------------------------------------------------------------------------- +// private helpers +// ---------------------------------------------------------------------------- + +namespace +{ + + // ensure that first is less or equal to second, swapping the values if + // necessary + void EnsureFirstLessThanSecond(int& first, int& second) + { + if ( first > second ) + wxSwap(first, second); + } + +} // anonymous namespace + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_ABSTRACT_CLASS(wxGridCellEditorEvtHandler, wxEvtHandler) + +BEGIN_EVENT_TABLE( wxGridCellEditorEvtHandler, wxEvtHandler ) + EVT_KILL_FOCUS( wxGridCellEditorEvtHandler::OnKillFocus ) + EVT_KEY_DOWN( wxGridCellEditorEvtHandler::OnKeyDown ) + EVT_CHAR( wxGridCellEditorEvtHandler::OnChar ) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(wxGridHeaderCtrl, wxHeaderCtrl) + EVT_HEADER_CLICK(wxID_ANY, wxGridHeaderCtrl::OnClick) + EVT_HEADER_DCLICK(wxID_ANY, wxGridHeaderCtrl::OnDoubleClick) + EVT_HEADER_RIGHT_CLICK(wxID_ANY, wxGridHeaderCtrl::OnRightClick) + + EVT_HEADER_BEGIN_RESIZE(wxID_ANY, wxGridHeaderCtrl::OnBeginResize) + EVT_HEADER_RESIZING(wxID_ANY, wxGridHeaderCtrl::OnResizing) + EVT_HEADER_END_RESIZE(wxID_ANY, wxGridHeaderCtrl::OnEndResize) + + EVT_HEADER_BEGIN_REORDER(wxID_ANY, wxGridHeaderCtrl::OnBeginReorder) + EVT_HEADER_END_REORDER(wxID_ANY, wxGridHeaderCtrl::OnEndReorder) +END_EVENT_TABLE() + +wxGridOperations& wxGridRowOperations::Dual() const +{ + static wxGridColumnOperations s_colOper; + + return s_colOper; +} + +wxGridOperations& wxGridColumnOperations::Dual() const +{ + static wxGridRowOperations s_rowOper; + + return s_rowOper; +} + +// ---------------------------------------------------------------------------- +// wxGridCellWorker is an (almost) empty common base class for +// wxGridCellRenderer and wxGridCellEditor managing ref counting +// ---------------------------------------------------------------------------- + +void wxGridCellWorker::SetParameters(const wxString& WXUNUSED(params)) +{ + // nothing to do +} + +wxGridCellWorker::~wxGridCellWorker() +{ +} + +// ---------------------------------------------------------------------------- +// wxGridHeaderLabelsRenderer and related classes +// ---------------------------------------------------------------------------- + +void wxGridHeaderLabelsRenderer::DrawLabel(const wxGrid& grid, + wxDC& dc, + const wxString& value, + const wxRect& rect, + int horizAlign, + int vertAlign, + int textOrientation) const +{ + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); + dc.SetTextForeground(grid.GetLabelTextColour()); + dc.SetFont(grid.GetLabelFont()); + grid.DrawTextRectangle(dc, value, rect, horizAlign, vertAlign, textOrientation); +} + + +void wxGridRowHeaderRendererDefault::DrawBorder(const wxGrid& WXUNUSED(grid), + wxDC& dc, + wxRect& rect) const +{ + dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW))); + dc.DrawLine(rect.GetRight(), rect.GetTop(), + rect.GetRight(), rect.GetBottom()); + dc.DrawLine(rect.GetLeft(), rect.GetTop(), + rect.GetLeft(), rect.GetBottom()); + dc.DrawLine(rect.GetLeft(), rect.GetBottom(), + rect.GetRight() + 1, rect.GetBottom()); + + dc.SetPen(*wxWHITE_PEN); + dc.DrawLine(rect.GetLeft() + 1, rect.GetTop(), + rect.GetLeft() + 1, rect.GetBottom()); + dc.DrawLine(rect.GetLeft() + 1, rect.GetTop(), + rect.GetRight(), rect.GetTop()); + + rect.Deflate(2); +} + +void wxGridColumnHeaderRendererDefault::DrawBorder(const wxGrid& WXUNUSED(grid), + wxDC& dc, + wxRect& rect) const +{ + dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW))); + dc.DrawLine(rect.GetRight(), rect.GetTop(), + rect.GetRight(), rect.GetBottom()); + dc.DrawLine(rect.GetLeft(), rect.GetTop(), + rect.GetRight(), rect.GetTop()); + dc.DrawLine(rect.GetLeft(), rect.GetBottom(), + rect.GetRight() + 1, rect.GetBottom()); + + dc.SetPen(*wxWHITE_PEN); + dc.DrawLine(rect.GetLeft(), rect.GetTop() + 1, + rect.GetLeft(), rect.GetBottom()); + dc.DrawLine(rect.GetLeft(), rect.GetTop() + 1, + rect.GetRight(), rect.GetTop() + 1); + + rect.Deflate(2); +} + +void wxGridCornerHeaderRendererDefault::DrawBorder(const wxGrid& WXUNUSED(grid), + wxDC& dc, + wxRect& rect) const +{ + dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW))); + dc.DrawLine(rect.GetRight() - 1, rect.GetBottom() - 1, + rect.GetRight() - 1, rect.GetTop()); + dc.DrawLine(rect.GetRight() - 1, rect.GetBottom() - 1, + rect.GetLeft(), rect.GetBottom() - 1); + dc.DrawLine(rect.GetLeft(), rect.GetTop(), + rect.GetRight(), rect.GetTop()); + dc.DrawLine(rect.GetLeft(), rect.GetTop(), + rect.GetLeft(), rect.GetBottom()); + + dc.SetPen(*wxWHITE_PEN); + dc.DrawLine(rect.GetLeft() + 1, rect.GetTop() + 1, + rect.GetRight() - 1, rect.GetTop() + 1); + dc.DrawLine(rect.GetLeft() + 1, rect.GetTop() + 1, + rect.GetLeft() + 1, rect.GetBottom() - 1); + + rect.Deflate(2); +} + +// ---------------------------------------------------------------------------- +// wxGridCellAttr +// ---------------------------------------------------------------------------- + +void wxGridCellAttr::Init(wxGridCellAttr *attrDefault) +{ + m_isReadOnly = Unset; + + m_renderer = NULL; + m_editor = NULL; + + m_attrkind = wxGridCellAttr::Cell; + + m_sizeRows = m_sizeCols = 1; + m_overflow = UnsetOverflow; + + SetDefAttr(attrDefault); +} + +wxGridCellAttr *wxGridCellAttr::Clone() const +{ + wxGridCellAttr *attr = new wxGridCellAttr(m_defGridAttr); + + if ( HasTextColour() ) + attr->SetTextColour(GetTextColour()); + if ( HasBackgroundColour() ) + attr->SetBackgroundColour(GetBackgroundColour()); + if ( HasFont() ) + attr->SetFont(GetFont()); + if ( HasAlignment() ) + attr->SetAlignment(m_hAlign, m_vAlign); + + attr->SetSize( m_sizeRows, m_sizeCols ); + + if ( m_renderer ) + { + attr->SetRenderer(m_renderer); + m_renderer->IncRef(); + } + if ( m_editor ) + { + attr->SetEditor(m_editor); + m_editor->IncRef(); + } + + if ( IsReadOnly() ) + attr->SetReadOnly(); + + attr->SetOverflow( m_overflow == Overflow ); + attr->SetKind( m_attrkind ); + + return attr; +} + +void wxGridCellAttr::MergeWith(wxGridCellAttr *mergefrom) +{ + if ( !HasTextColour() && mergefrom->HasTextColour() ) + SetTextColour(mergefrom->GetTextColour()); + if ( !HasBackgroundColour() && mergefrom->HasBackgroundColour() ) + SetBackgroundColour(mergefrom->GetBackgroundColour()); + if ( !HasFont() && mergefrom->HasFont() ) + SetFont(mergefrom->GetFont()); + if ( !HasAlignment() && mergefrom->HasAlignment() ) + { + int hAlign, vAlign; + mergefrom->GetAlignment( &hAlign, &vAlign); + SetAlignment(hAlign, vAlign); + } + if ( !HasSize() && mergefrom->HasSize() ) + mergefrom->GetSize( &m_sizeRows, &m_sizeCols ); + + // Directly access member functions as GetRender/Editor don't just return + // m_renderer/m_editor + // + // Maybe add support for merge of Render and Editor? + if (!HasRenderer() && mergefrom->HasRenderer() ) + { + m_renderer = mergefrom->m_renderer; + m_renderer->IncRef(); + } + if ( !HasEditor() && mergefrom->HasEditor() ) + { + m_editor = mergefrom->m_editor; + m_editor->IncRef(); + } + if ( !HasReadWriteMode() && mergefrom->HasReadWriteMode() ) + SetReadOnly(mergefrom->IsReadOnly()); + + if (!HasOverflowMode() && mergefrom->HasOverflowMode() ) + SetOverflow(mergefrom->GetOverflow()); + + SetDefAttr(mergefrom->m_defGridAttr); +} + +void wxGridCellAttr::SetSize(int num_rows, int num_cols) +{ + // The size of a cell is normally 1,1 + + // If this cell is larger (2,2) then this is the top left cell + // the other cells that will be covered (lower right cells) must be + // set to negative or zero values such that + // row + num_rows of the covered cell points to the larger cell (this cell) + // same goes for the col + num_cols. + + // Size of 0,0 is NOT valid, neither is <=0 and any positive value + + wxASSERT_MSG( (!((num_rows > 0) && (num_cols <= 0)) || + !((num_rows <= 0) && (num_cols > 0)) || + !((num_rows == 0) && (num_cols == 0))), + wxT("wxGridCellAttr::SetSize only takes two positive values or negative/zero values")); + + m_sizeRows = num_rows; + m_sizeCols = num_cols; +} + +const wxColour& wxGridCellAttr::GetTextColour() const +{ + if (HasTextColour()) + { + return m_colText; + } + else if (m_defGridAttr && m_defGridAttr != this) + { + return m_defGridAttr->GetTextColour(); + } + else + { + wxFAIL_MSG(wxT("Missing default cell attribute")); + return wxNullColour; + } +} + +const wxColour& wxGridCellAttr::GetBackgroundColour() const +{ + if (HasBackgroundColour()) + { + return m_colBack; + } + else if (m_defGridAttr && m_defGridAttr != this) + { + return m_defGridAttr->GetBackgroundColour(); + } + else + { + wxFAIL_MSG(wxT("Missing default cell attribute")); + return wxNullColour; + } +} + +const wxFont& wxGridCellAttr::GetFont() const +{ + if (HasFont()) + { + return m_font; + } + else if (m_defGridAttr && m_defGridAttr != this) + { + return m_defGridAttr->GetFont(); + } + else + { + wxFAIL_MSG(wxT("Missing default cell attribute")); + return wxNullFont; + } +} + +void wxGridCellAttr::GetAlignment(int *hAlign, int *vAlign) const +{ + if (HasAlignment()) + { + if ( hAlign ) + *hAlign = m_hAlign; + if ( vAlign ) + *vAlign = m_vAlign; + } + else if (m_defGridAttr && m_defGridAttr != this) + { + m_defGridAttr->GetAlignment(hAlign, vAlign); + } + else + { + wxFAIL_MSG(wxT("Missing default cell attribute")); + } +} + +void wxGridCellAttr::GetNonDefaultAlignment(int *hAlign, int *vAlign) const +{ + if ( hAlign && m_hAlign != wxALIGN_INVALID ) + *hAlign = m_hAlign; + + if ( vAlign && m_vAlign != wxALIGN_INVALID ) + *vAlign = m_vAlign; +} + +void wxGridCellAttr::GetSize( int *num_rows, int *num_cols ) const +{ + if ( num_rows ) + *num_rows = m_sizeRows; + if ( num_cols ) + *num_cols = m_sizeCols; +} + +// GetRenderer and GetEditor use a slightly different decision path about +// which attribute to use. If a non-default attr object has one then it is +// used, otherwise the default editor or renderer is fetched from the grid and +// used. It should be the default for the data type of the cell. If it is +// NULL (because the table has a type that the grid does not have in its +// registry), then the grid's default editor or renderer is used. + +wxGridCellRenderer* wxGridCellAttr::GetRenderer(const wxGrid* grid, int row, int col) const +{ + wxGridCellRenderer *renderer = NULL; + + if ( m_renderer && this != m_defGridAttr ) + { + // use the cells renderer if it has one + renderer = m_renderer; + renderer->IncRef(); + } + else // no non-default cell renderer + { + // get default renderer for the data type + if ( grid ) + { + // GetDefaultRendererForCell() will do IncRef() for us + renderer = grid->GetDefaultRendererForCell(row, col); + } + + if ( renderer == NULL ) + { + if ( (m_defGridAttr != NULL) && (m_defGridAttr != this) ) + { + // if we still don't have one then use the grid default + // (no need for IncRef() here neither) + renderer = m_defGridAttr->GetRenderer(NULL, 0, 0); + } + else // default grid attr + { + // use m_renderer which we had decided not to use initially + renderer = m_renderer; + if ( renderer ) + renderer->IncRef(); + } + } + } + + // we're supposed to always find something + wxASSERT_MSG(renderer, wxT("Missing default cell renderer")); + + return renderer; +} + +// same as above, except for s/renderer/editor/g +wxGridCellEditor* wxGridCellAttr::GetEditor(const wxGrid* grid, int row, int col) const +{ + wxGridCellEditor *editor = NULL; + + if ( m_editor && this != m_defGridAttr ) + { + // use the cells editor if it has one + editor = m_editor; + editor->IncRef(); + } + else // no non default cell editor + { + // get default editor for the data type + if ( grid ) + { + // GetDefaultEditorForCell() will do IncRef() for us + editor = grid->GetDefaultEditorForCell(row, col); + } + + if ( editor == NULL ) + { + if ( (m_defGridAttr != NULL) && (m_defGridAttr != this) ) + { + // if we still don't have one then use the grid default + // (no need for IncRef() here neither) + editor = m_defGridAttr->GetEditor(NULL, 0, 0); + } + else // default grid attr + { + // use m_editor which we had decided not to use initially + editor = m_editor; + if ( editor ) + editor->IncRef(); + } + } + } + + // we're supposed to always find something + wxASSERT_MSG(editor, wxT("Missing default cell editor")); + + return editor; +} + +// ---------------------------------------------------------------------------- +// wxGridCellAttrData +// ---------------------------------------------------------------------------- + +void wxGridCellAttrData::SetAttr(wxGridCellAttr *attr, int row, int col) +{ + // Note: contrary to wxGridRowOrColAttrData::SetAttr, we must not + // touch attribute's reference counting explicitly, since this + // is managed by class wxGridCellWithAttr + int n = FindIndex(row, col); + if ( n == wxNOT_FOUND ) + { + if ( attr ) + { + // add the attribute + m_attrs.Add(new wxGridCellWithAttr(row, col, attr)); + } + //else: nothing to do + } + else // we already have an attribute for this cell + { + if ( attr ) + { + // change the attribute + m_attrs[(size_t)n].ChangeAttr(attr); + } + else + { + // remove this attribute + m_attrs.RemoveAt((size_t)n); + } + } +} + +wxGridCellAttr *wxGridCellAttrData::GetAttr(int row, int col) const +{ + wxGridCellAttr *attr = NULL; + + int n = FindIndex(row, col); + if ( n != wxNOT_FOUND ) + { + attr = m_attrs[(size_t)n].attr; + attr->IncRef(); + } + + return attr; +} + +void wxGridCellAttrData::UpdateAttrRows( size_t pos, int numRows ) +{ + size_t count = m_attrs.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + wxGridCellCoords& coords = m_attrs[n].coords; + wxCoord row = coords.GetRow(); + if ((size_t)row >= pos) + { + if (numRows > 0) + { + // If rows inserted, include row counter where necessary + coords.SetRow(row + numRows); + } + else if (numRows < 0) + { + // If rows deleted ... + if ((size_t)row >= pos - numRows) + { + // ...either decrement row counter (if row still exists)... + coords.SetRow(row + numRows); + } + else + { + // ...or remove the attribute + m_attrs.RemoveAt(n); + n--; + count--; + } + } + } + } +} + +void wxGridCellAttrData::UpdateAttrCols( size_t pos, int numCols ) +{ + size_t count = m_attrs.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + wxGridCellCoords& coords = m_attrs[n].coords; + wxCoord col = coords.GetCol(); + if ( (size_t)col >= pos ) + { + if ( numCols > 0 ) + { + // If rows inserted, include row counter where necessary + coords.SetCol(col + numCols); + } + else if (numCols < 0) + { + // If rows deleted ... + if ((size_t)col >= pos - numCols) + { + // ...either decrement row counter (if row still exists)... + coords.SetCol(col + numCols); + } + else + { + // ...or remove the attribute + m_attrs.RemoveAt(n); + n--; + count--; + } + } + } + } +} + +int wxGridCellAttrData::FindIndex(int row, int col) const +{ + size_t count = m_attrs.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + const wxGridCellCoords& coords = m_attrs[n].coords; + if ( (coords.GetRow() == row) && (coords.GetCol() == col) ) + { + return n; + } + } + + return wxNOT_FOUND; +} + +// ---------------------------------------------------------------------------- +// wxGridRowOrColAttrData +// ---------------------------------------------------------------------------- + +wxGridRowOrColAttrData::~wxGridRowOrColAttrData() +{ + size_t count = m_attrs.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + m_attrs[n]->DecRef(); + } +} + +wxGridCellAttr *wxGridRowOrColAttrData::GetAttr(int rowOrCol) const +{ + wxGridCellAttr *attr = NULL; + + int n = m_rowsOrCols.Index(rowOrCol); + if ( n != wxNOT_FOUND ) + { + attr = m_attrs[(size_t)n]; + attr->IncRef(); + } + + return attr; +} + +void wxGridRowOrColAttrData::SetAttr(wxGridCellAttr *attr, int rowOrCol) +{ + int i = m_rowsOrCols.Index(rowOrCol); + if ( i == wxNOT_FOUND ) + { + if ( attr ) + { + // store the new attribute, taking its ownership + m_rowsOrCols.Add(rowOrCol); + m_attrs.Add(attr); + } + // nothing to remove + } + else // we have an attribute for this row or column + { + size_t n = (size_t)i; + + // notice that this code works correctly even when the old attribute is + // the same as the new one: as we own of it, we must call DecRef() on + // it in any case and this won't result in destruction of the new + // attribute if it's the same as old one because it must have ref count + // of at least 2 to be passed to us while we keep a reference to it too + m_attrs[n]->DecRef(); + + if ( attr ) + { + // replace the attribute with the new one + m_attrs[n] = attr; + } + else // remove the attribute + { + m_rowsOrCols.RemoveAt(n); + m_attrs.RemoveAt(n); + } + } +} + +void wxGridRowOrColAttrData::UpdateAttrRowsOrCols( size_t pos, int numRowsOrCols ) +{ + size_t count = m_attrs.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + int & rowOrCol = m_rowsOrCols[n]; + if ( (size_t)rowOrCol >= pos ) + { + if ( numRowsOrCols > 0 ) + { + // If rows inserted, include row counter where necessary + rowOrCol += numRowsOrCols; + } + else if ( numRowsOrCols < 0) + { + // If rows deleted, either decrement row counter (if row still exists) + if ((size_t)rowOrCol >= pos - numRowsOrCols) + rowOrCol += numRowsOrCols; + else + { + m_rowsOrCols.RemoveAt(n); + m_attrs[n]->DecRef(); + m_attrs.RemoveAt(n); + n--; + count--; + } + } + } + } +} + +// ---------------------------------------------------------------------------- +// wxGridCellAttrProvider +// ---------------------------------------------------------------------------- + +wxGridCellAttrProvider::wxGridCellAttrProvider() +{ + m_data = NULL; +} + +wxGridCellAttrProvider::~wxGridCellAttrProvider() +{ + delete m_data; +} + +void wxGridCellAttrProvider::InitData() +{ + m_data = new wxGridCellAttrProviderData; +} + +wxGridCellAttr *wxGridCellAttrProvider::GetAttr(int row, int col, + wxGridCellAttr::wxAttrKind kind ) const +{ + wxGridCellAttr *attr = NULL; + if ( m_data ) + { + switch (kind) + { + case (wxGridCellAttr::Any): + // Get cached merge attributes. + // Currently not used as no cache implemented as not mutable + // attr = m_data->m_mergeAttr.GetAttr(row, col); + if (!attr) + { + // Basically implement old version. + // Also check merge cache, so we don't have to re-merge every time.. + wxGridCellAttr *attrcell = m_data->m_cellAttrs.GetAttr(row, col); + wxGridCellAttr *attrrow = m_data->m_rowAttrs.GetAttr(row); + wxGridCellAttr *attrcol = m_data->m_colAttrs.GetAttr(col); + + if ((attrcell != attrrow) && (attrrow != attrcol) && (attrcell != attrcol)) + { + // Two or more are non NULL + attr = new wxGridCellAttr; + attr->SetKind(wxGridCellAttr::Merged); + + // Order is important.. + if (attrcell) + { + attr->MergeWith(attrcell); + attrcell->DecRef(); + } + if (attrcol) + { + attr->MergeWith(attrcol); + attrcol->DecRef(); + } + if (attrrow) + { + attr->MergeWith(attrrow); + attrrow->DecRef(); + } + + // store merge attr if cache implemented + //attr->IncRef(); + //m_data->m_mergeAttr.SetAttr(attr, row, col); + } + else + { + // one or none is non null return it or null. + if (attrrow) + attr = attrrow; + if (attrcol) + { + if (attr) + attr->DecRef(); + attr = attrcol; + } + if (attrcell) + { + if (attr) + attr->DecRef(); + attr = attrcell; + } + } + } + break; + + case (wxGridCellAttr::Cell): + attr = m_data->m_cellAttrs.GetAttr(row, col); + break; + + case (wxGridCellAttr::Col): + attr = m_data->m_colAttrs.GetAttr(col); + break; + + case (wxGridCellAttr::Row): + attr = m_data->m_rowAttrs.GetAttr(row); + break; + + default: + // unused as yet... + // (wxGridCellAttr::Default): + // (wxGridCellAttr::Merged): + break; + } + } + + return attr; +} + +void wxGridCellAttrProvider::SetAttr(wxGridCellAttr *attr, + int row, int col) +{ + if ( !m_data ) + InitData(); + + m_data->m_cellAttrs.SetAttr(attr, row, col); +} + +void wxGridCellAttrProvider::SetRowAttr(wxGridCellAttr *attr, int row) +{ + if ( !m_data ) + InitData(); + + m_data->m_rowAttrs.SetAttr(attr, row); +} + +void wxGridCellAttrProvider::SetColAttr(wxGridCellAttr *attr, int col) +{ + if ( !m_data ) + InitData(); + + m_data->m_colAttrs.SetAttr(attr, col); +} + +void wxGridCellAttrProvider::UpdateAttrRows( size_t pos, int numRows ) +{ + if ( m_data ) + { + m_data->m_cellAttrs.UpdateAttrRows( pos, numRows ); + + m_data->m_rowAttrs.UpdateAttrRowsOrCols( pos, numRows ); + } +} + +void wxGridCellAttrProvider::UpdateAttrCols( size_t pos, int numCols ) +{ + if ( m_data ) + { + m_data->m_cellAttrs.UpdateAttrCols( pos, numCols ); + + m_data->m_colAttrs.UpdateAttrRowsOrCols( pos, numCols ); + } +} + +const wxGridColumnHeaderRenderer& +wxGridCellAttrProvider::GetColumnHeaderRenderer(int WXUNUSED(col)) +{ + return gs_defaultHeaderRenderers.colRenderer; +} + +const wxGridRowHeaderRenderer& +wxGridCellAttrProvider::GetRowHeaderRenderer(int WXUNUSED(row)) +{ + return gs_defaultHeaderRenderers.rowRenderer; +} + +const wxGridCornerHeaderRenderer& wxGridCellAttrProvider::GetCornerRenderer() +{ + return gs_defaultHeaderRenderers.cornerRenderer; +} + +// ---------------------------------------------------------------------------- +// wxGridTableBase +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS( wxGridTableBase, wxObject ) + +wxGridTableBase::wxGridTableBase() +{ + m_view = NULL; + m_attrProvider = NULL; +} + +wxGridTableBase::~wxGridTableBase() +{ + delete m_attrProvider; +} + +void wxGridTableBase::SetAttrProvider(wxGridCellAttrProvider *attrProvider) +{ + delete m_attrProvider; + m_attrProvider = attrProvider; +} + +bool wxGridTableBase::CanHaveAttributes() +{ + if ( ! GetAttrProvider() ) + { + // use the default attr provider by default + SetAttrProvider(new wxGridCellAttrProvider); + } + + return true; +} + +wxGridCellAttr *wxGridTableBase::GetAttr(int row, int col, wxGridCellAttr::wxAttrKind kind) +{ + if ( m_attrProvider ) + return m_attrProvider->GetAttr(row, col, kind); + else + return NULL; +} + +void wxGridTableBase::SetAttr(wxGridCellAttr* attr, int row, int col) +{ + if ( m_attrProvider ) + { + if ( attr ) + attr->SetKind(wxGridCellAttr::Cell); + m_attrProvider->SetAttr(attr, row, col); + } + else + { + // as we take ownership of the pointer and don't store it, we must + // free it now + wxSafeDecRef(attr); + } +} + +void wxGridTableBase::SetRowAttr(wxGridCellAttr *attr, int row) +{ + if ( m_attrProvider ) + { + attr->SetKind(wxGridCellAttr::Row); + m_attrProvider->SetRowAttr(attr, row); + } + else + { + // as we take ownership of the pointer and don't store it, we must + // free it now + wxSafeDecRef(attr); + } +} + +void wxGridTableBase::SetColAttr(wxGridCellAttr *attr, int col) +{ + if ( m_attrProvider ) + { + attr->SetKind(wxGridCellAttr::Col); + m_attrProvider->SetColAttr(attr, col); + } + else + { + // as we take ownership of the pointer and don't store it, we must + // free it now + wxSafeDecRef(attr); + } +} + +bool wxGridTableBase::InsertRows( size_t WXUNUSED(pos), + size_t WXUNUSED(numRows) ) +{ + wxFAIL_MSG( wxT("Called grid table class function InsertRows\nbut your derived table class does not override this function") ); + + return false; +} + +bool wxGridTableBase::AppendRows( size_t WXUNUSED(numRows) ) +{ + wxFAIL_MSG( wxT("Called grid table class function AppendRows\nbut your derived table class does not override this function")); + + return false; +} + +bool wxGridTableBase::DeleteRows( size_t WXUNUSED(pos), + size_t WXUNUSED(numRows) ) +{ + wxFAIL_MSG( wxT("Called grid table class function DeleteRows\nbut your derived table class does not override this function")); + + return false; +} + +bool wxGridTableBase::InsertCols( size_t WXUNUSED(pos), + size_t WXUNUSED(numCols) ) +{ + wxFAIL_MSG( wxT("Called grid table class function InsertCols\nbut your derived table class does not override this function")); + + return false; +} + +bool wxGridTableBase::AppendCols( size_t WXUNUSED(numCols) ) +{ + wxFAIL_MSG(wxT("Called grid table class function AppendCols\nbut your derived table class does not override this function")); + + return false; +} + +bool wxGridTableBase::DeleteCols( size_t WXUNUSED(pos), + size_t WXUNUSED(numCols) ) +{ + wxFAIL_MSG( wxT("Called grid table class function DeleteCols\nbut your derived table class does not override this function")); + + return false; +} + +wxString wxGridTableBase::GetRowLabelValue( int row ) +{ + wxString s; + + // RD: Starting the rows at zero confuses users, + // no matter how much it makes sense to us geeks. + s << row + 1; + + return s; +} + +wxString wxGridTableBase::GetColLabelValue( int col ) +{ + // default col labels are: + // cols 0 to 25 : A-Z + // cols 26 to 675 : AA-ZZ + // etc. + + wxString s; + unsigned int i, n; + for ( n = 1; ; n++ ) + { + s += (wxChar) (wxT('A') + (wxChar)(col % 26)); + col = col / 26 - 1; + if ( col < 0 ) + break; + } + + // reverse the string... + wxString s2; + for ( i = 0; i < n; i++ ) + { + s2 += s[n - i - 1]; + } + + return s2; +} + +wxString wxGridTableBase::GetTypeName( int WXUNUSED(row), int WXUNUSED(col) ) +{ + return wxGRID_VALUE_STRING; +} + +bool wxGridTableBase::CanGetValueAs( int WXUNUSED(row), int WXUNUSED(col), + const wxString& typeName ) +{ + return typeName == wxGRID_VALUE_STRING; +} + +bool wxGridTableBase::CanSetValueAs( int row, int col, const wxString& typeName ) +{ + return CanGetValueAs(row, col, typeName); +} + +long wxGridTableBase::GetValueAsLong( int WXUNUSED(row), int WXUNUSED(col) ) +{ + return 0; +} + +double wxGridTableBase::GetValueAsDouble( int WXUNUSED(row), int WXUNUSED(col) ) +{ + return 0.0; +} + +bool wxGridTableBase::GetValueAsBool( int WXUNUSED(row), int WXUNUSED(col) ) +{ + return false; +} + +void wxGridTableBase::SetValueAsLong( int WXUNUSED(row), int WXUNUSED(col), + long WXUNUSED(value) ) +{ +} + +void wxGridTableBase::SetValueAsDouble( int WXUNUSED(row), int WXUNUSED(col), + double WXUNUSED(value) ) +{ +} + +void wxGridTableBase::SetValueAsBool( int WXUNUSED(row), int WXUNUSED(col), + bool WXUNUSED(value) ) +{ +} + +void* wxGridTableBase::GetValueAsCustom( int WXUNUSED(row), int WXUNUSED(col), + const wxString& WXUNUSED(typeName) ) +{ + return NULL; +} + +void wxGridTableBase::SetValueAsCustom( int WXUNUSED(row), int WXUNUSED(col), + const wxString& WXUNUSED(typeName), + void* WXUNUSED(value) ) +{ +} + +////////////////////////////////////////////////////////////////////// +// +// Message class for the grid table to send requests and notifications +// to the grid view +// + +wxGridTableMessage::wxGridTableMessage() +{ + m_table = NULL; + m_id = -1; + m_comInt1 = -1; + m_comInt2 = -1; +} + +wxGridTableMessage::wxGridTableMessage( wxGridTableBase *table, int id, + int commandInt1, int commandInt2 ) +{ + m_table = table; + m_id = id; + m_comInt1 = commandInt1; + m_comInt2 = commandInt2; +} + +////////////////////////////////////////////////////////////////////// +// +// A basic grid table for string data. An object of this class will +// created by wxGrid if you don't specify an alternative table class. +// + +WX_DEFINE_OBJARRAY(wxGridStringArray) + +IMPLEMENT_DYNAMIC_CLASS( wxGridStringTable, wxGridTableBase ) + +wxGridStringTable::wxGridStringTable() + : wxGridTableBase() +{ + m_numCols = 0; +} + +wxGridStringTable::wxGridStringTable( int numRows, int numCols ) + : wxGridTableBase() +{ + m_numCols = numCols; + + m_data.Alloc( numRows ); + + wxArrayString sa; + sa.Alloc( numCols ); + sa.Add( wxEmptyString, numCols ); + + m_data.Add( sa, numRows ); +} + +wxString wxGridStringTable::GetValue( int row, int col ) +{ + wxCHECK_MSG( (row >= 0 && row < GetNumberRows()) && + (col >= 0 && col < GetNumberCols()), + wxEmptyString, + wxT("invalid row or column index in wxGridStringTable") ); + + return m_data[row][col]; +} + +void wxGridStringTable::SetValue( int row, int col, const wxString& value ) +{ + wxCHECK_RET( (row >= 0 && row < GetNumberRows()) && + (col >= 0 && col < GetNumberCols()), + wxT("invalid row or column index in wxGridStringTable") ); + + m_data[row][col] = value; +} + +void wxGridStringTable::Clear() +{ + int row, col; + int numRows, numCols; + + numRows = m_data.GetCount(); + if ( numRows > 0 ) + { + numCols = m_data[0].GetCount(); + + for ( row = 0; row < numRows; row++ ) + { + for ( col = 0; col < numCols; col++ ) + { + m_data[row][col] = wxEmptyString; + } + } + } +} + +bool wxGridStringTable::InsertRows( size_t pos, size_t numRows ) +{ + if ( pos >= m_data.size() ) + { + return AppendRows( numRows ); + } + + wxArrayString sa; + sa.Alloc( m_numCols ); + sa.Add( wxEmptyString, m_numCols ); + m_data.Insert( sa, pos, numRows ); + + if ( GetView() ) + { + wxGridTableMessage msg( this, + wxGRIDTABLE_NOTIFY_ROWS_INSERTED, + pos, + numRows ); + + GetView()->ProcessTableMessage( msg ); + } + + return true; +} + +bool wxGridStringTable::AppendRows( size_t numRows ) +{ + wxArrayString sa; + if ( m_numCols > 0 ) + { + sa.Alloc( m_numCols ); + sa.Add( wxEmptyString, m_numCols ); + } + + m_data.Add( sa, numRows ); + + if ( GetView() ) + { + wxGridTableMessage msg( this, + wxGRIDTABLE_NOTIFY_ROWS_APPENDED, + numRows ); + + GetView()->ProcessTableMessage( msg ); + } + + return true; +} + +bool wxGridStringTable::DeleteRows( size_t pos, size_t numRows ) +{ + size_t curNumRows = m_data.GetCount(); + + if ( pos >= curNumRows ) + { + wxFAIL_MSG( wxString::Format + ( + wxT("Called wxGridStringTable::DeleteRows(pos=%lu, N=%lu)\nPos value is invalid for present table with %lu rows"), + (unsigned long)pos, + (unsigned long)numRows, + (unsigned long)curNumRows + ) ); + + return false; + } + + if ( numRows > curNumRows - pos ) + { + numRows = curNumRows - pos; + } + + if ( numRows >= curNumRows ) + { + m_data.Clear(); + } + else + { + m_data.RemoveAt( pos, numRows ); + } + + if ( GetView() ) + { + wxGridTableMessage msg( this, + wxGRIDTABLE_NOTIFY_ROWS_DELETED, + pos, + numRows ); + + GetView()->ProcessTableMessage( msg ); + } + + return true; +} + +bool wxGridStringTable::InsertCols( size_t pos, size_t numCols ) +{ + if ( pos >= static_cast(m_numCols) ) + { + return AppendCols( numCols ); + } + + if ( !m_colLabels.IsEmpty() ) + { + m_colLabels.Insert( wxEmptyString, pos, numCols ); + + for ( size_t i = pos; i < pos + numCols; i++ ) + m_colLabels[i] = wxGridTableBase::GetColLabelValue( i ); + } + + for ( size_t row = 0; row < m_data.size(); row++ ) + { + for ( size_t col = pos; col < pos + numCols; col++ ) + { + m_data[row].Insert( wxEmptyString, col ); + } + } + + m_numCols += numCols; + + if ( GetView() ) + { + wxGridTableMessage msg( this, + wxGRIDTABLE_NOTIFY_COLS_INSERTED, + pos, + numCols ); + + GetView()->ProcessTableMessage( msg ); + } + + return true; +} + +bool wxGridStringTable::AppendCols( size_t numCols ) +{ + for ( size_t row = 0; row < m_data.size(); row++ ) + { + m_data[row].Add( wxEmptyString, numCols ); + } + + m_numCols += numCols; + + if ( GetView() ) + { + wxGridTableMessage msg( this, + wxGRIDTABLE_NOTIFY_COLS_APPENDED, + numCols ); + + GetView()->ProcessTableMessage( msg ); + } + + return true; +} + +bool wxGridStringTable::DeleteCols( size_t pos, size_t numCols ) +{ + size_t row; + + size_t curNumRows = m_data.GetCount(); + size_t curNumCols = m_numCols; + + if ( pos >= curNumCols ) + { + wxFAIL_MSG( wxString::Format + ( + wxT("Called wxGridStringTable::DeleteCols(pos=%lu, N=%lu)\nPos value is invalid for present table with %lu cols"), + (unsigned long)pos, + (unsigned long)numCols, + (unsigned long)curNumCols + ) ); + return false; + } + + int colID; + if ( GetView() ) + colID = GetView()->GetColAt( pos ); + else + colID = pos; + + if ( numCols > curNumCols - colID ) + { + numCols = curNumCols - colID; + } + + if ( !m_colLabels.IsEmpty() ) + { + // m_colLabels stores just as many elements as it needs, e.g. if only + // the label of the first column had been set it would have only one + // element and not numCols, so account for it + int numRemaining = m_colLabels.size() - colID; + if (numRemaining > 0) + m_colLabels.RemoveAt( colID, wxMin(numCols, numRemaining) ); + } + + if ( numCols >= curNumCols ) + { + for ( row = 0; row < curNumRows; row++ ) + { + m_data[row].Clear(); + } + + m_numCols = 0; + } + else // something will be left + { + for ( row = 0; row < curNumRows; row++ ) + { + m_data[row].RemoveAt( colID, numCols ); + } + + m_numCols -= numCols; + } + + if ( GetView() ) + { + wxGridTableMessage msg( this, + wxGRIDTABLE_NOTIFY_COLS_DELETED, + pos, + numCols ); + + GetView()->ProcessTableMessage( msg ); + } + + return true; +} + +wxString wxGridStringTable::GetRowLabelValue( int row ) +{ + if ( row > (int)(m_rowLabels.GetCount()) - 1 ) + { + // using default label + // + return wxGridTableBase::GetRowLabelValue( row ); + } + else + { + return m_rowLabels[row]; + } +} + +wxString wxGridStringTable::GetColLabelValue( int col ) +{ + if ( col > (int)(m_colLabels.GetCount()) - 1 ) + { + // using default label + // + return wxGridTableBase::GetColLabelValue( col ); + } + else + { + return m_colLabels[col]; + } +} + +void wxGridStringTable::SetRowLabelValue( int row, const wxString& value ) +{ + if ( row > (int)(m_rowLabels.GetCount()) - 1 ) + { + int n = m_rowLabels.GetCount(); + int i; + + for ( i = n; i <= row; i++ ) + { + m_rowLabels.Add( wxGridTableBase::GetRowLabelValue(i) ); + } + } + + m_rowLabels[row] = value; +} + +void wxGridStringTable::SetColLabelValue( int col, const wxString& value ) +{ + if ( col > (int)(m_colLabels.GetCount()) - 1 ) + { + int n = m_colLabels.GetCount(); + int i; + + for ( i = n; i <= col; i++ ) + { + m_colLabels.Add( wxGridTableBase::GetColLabelValue(i) ); + } + } + + m_colLabels[col] = value; +} + + +////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE(wxGridSubwindow, wxWindow) + EVT_MOUSE_CAPTURE_LOST(wxGridSubwindow::OnMouseCaptureLost) +END_EVENT_TABLE() + +void wxGridSubwindow::OnMouseCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event)) +{ + m_owner->CancelMouseCapture(); +} + +BEGIN_EVENT_TABLE( wxGridRowLabelWindow, wxGridSubwindow ) + EVT_PAINT( wxGridRowLabelWindow::OnPaint ) + EVT_MOUSEWHEEL( wxGridRowLabelWindow::OnMouseWheel ) + EVT_MOUSE_EVENTS( wxGridRowLabelWindow::OnMouseEvent ) +END_EVENT_TABLE() + +void wxGridRowLabelWindow::OnPaint( wxPaintEvent& WXUNUSED(event) ) +{ + wxPaintDC dc(this); + + // NO - don't do this because it will set both the x and y origin + // coords to match the parent scrolled window and we just want to + // set the y coord - MB + // + // m_owner->PrepareDC( dc ); + + int x, y; + m_owner->CalcUnscrolledPosition( 0, 0, &x, &y ); + wxPoint pt = dc.GetDeviceOrigin(); + dc.SetDeviceOrigin( pt.x, pt.y-y ); + + wxArrayInt rows = m_owner->CalcRowLabelsExposed( GetUpdateRegion() ); + m_owner->DrawRowLabels( dc, rows ); +} + +void wxGridRowLabelWindow::OnMouseEvent( wxMouseEvent& event ) +{ + m_owner->ProcessRowLabelMouseEvent( event ); +} + +void wxGridRowLabelWindow::OnMouseWheel( wxMouseEvent& event ) +{ + if (!m_owner->GetEventHandler()->ProcessEvent( event )) + event.Skip(); +} + +////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE( wxGridColLabelWindow, wxGridSubwindow ) + EVT_PAINT( wxGridColLabelWindow::OnPaint ) + EVT_MOUSEWHEEL( wxGridColLabelWindow::OnMouseWheel ) + EVT_MOUSE_EVENTS( wxGridColLabelWindow::OnMouseEvent ) +END_EVENT_TABLE() + +void wxGridColLabelWindow::OnPaint( wxPaintEvent& WXUNUSED(event) ) +{ + wxPaintDC dc(this); + + // NO - don't do this because it will set both the x and y origin + // coords to match the parent scrolled window and we just want to + // set the x coord - MB + // + // m_owner->PrepareDC( dc ); + + int x, y; + m_owner->CalcUnscrolledPosition( 0, 0, &x, &y ); + wxPoint pt = dc.GetDeviceOrigin(); + if (GetLayoutDirection() == wxLayout_RightToLeft) + dc.SetDeviceOrigin( pt.x+x, pt.y ); + else + dc.SetDeviceOrigin( pt.x-x, pt.y ); + + wxArrayInt cols = m_owner->CalcColLabelsExposed( GetUpdateRegion() ); + m_owner->DrawColLabels( dc, cols ); +} + +void wxGridColLabelWindow::OnMouseEvent( wxMouseEvent& event ) +{ + m_owner->ProcessColLabelMouseEvent( event ); +} + +void wxGridColLabelWindow::OnMouseWheel( wxMouseEvent& event ) +{ + if (!m_owner->GetEventHandler()->ProcessEvent( event )) + event.Skip(); +} + +////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE( wxGridCornerLabelWindow, wxGridSubwindow ) + EVT_MOUSEWHEEL( wxGridCornerLabelWindow::OnMouseWheel ) + EVT_MOUSE_EVENTS( wxGridCornerLabelWindow::OnMouseEvent ) + EVT_PAINT( wxGridCornerLabelWindow::OnPaint ) +END_EVENT_TABLE() + +void wxGridCornerLabelWindow::OnPaint( wxPaintEvent& WXUNUSED(event) ) +{ + wxPaintDC dc(this); + + m_owner->DrawCornerLabel(dc); +} + +void wxGridCornerLabelWindow::OnMouseEvent( wxMouseEvent& event ) +{ + m_owner->ProcessCornerLabelMouseEvent( event ); +} + +void wxGridCornerLabelWindow::OnMouseWheel( wxMouseEvent& event ) +{ + if (!m_owner->GetEventHandler()->ProcessEvent(event)) + event.Skip(); +} + +////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE( wxGridWindow, wxGridSubwindow ) + EVT_PAINT( wxGridWindow::OnPaint ) + EVT_MOUSEWHEEL( wxGridWindow::OnMouseWheel ) + EVT_MOUSE_EVENTS( wxGridWindow::OnMouseEvent ) + EVT_KEY_DOWN( wxGridWindow::OnKeyDown ) + EVT_KEY_UP( wxGridWindow::OnKeyUp ) + EVT_CHAR( wxGridWindow::OnChar ) + EVT_SET_FOCUS( wxGridWindow::OnFocus ) + EVT_KILL_FOCUS( wxGridWindow::OnFocus ) + EVT_ERASE_BACKGROUND( wxGridWindow::OnEraseBackground ) +END_EVENT_TABLE() + +void wxGridWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) +{ + wxPaintDC dc( this ); + m_owner->PrepareDC( dc ); + wxRegion reg = GetUpdateRegion(); + wxGridCellCoordsArray dirtyCells = m_owner->CalcCellsExposed( reg ); + m_owner->DrawGridCellArea( dc, dirtyCells ); + + m_owner->DrawGridSpace( dc ); + + m_owner->DrawAllGridLines( dc, reg ); + + m_owner->DrawHighlight( dc, dirtyCells ); +} + +void wxGrid::Render( wxDC& dc, + const wxPoint& position, + const wxSize& size, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + int style ) +{ + wxCHECK_RET( bottomRight.GetCol() < GetNumberCols(), + "Invalid right column" ); + wxCHECK_RET( bottomRight.GetRow() < GetNumberRows(), + "Invalid bottom row" ); + + // store user settings and reset later + + // remove grid selection, don't paint selection colour + // unless we have wxGRID_DRAW_SELECTION + // block selections are the only ones catered for here + wxGridCellCoordsArray selectedCells; + bool hasSelection = IsSelection(); + if ( hasSelection && !( style & wxGRID_DRAW_SELECTION ) ) + { + selectedCells = GetSelectionBlockTopLeft(); + // non block selections may not have a bottom right + if ( GetSelectionBlockBottomRight().size() ) + selectedCells.Add( GetSelectionBlockBottomRight()[ 0 ] ); + + ClearSelection(); + } + + // store user device origin + wxCoord userOriginX, userOriginY; + dc.GetDeviceOrigin( &userOriginX, &userOriginY ); + + // store user scale + double scaleUserX, scaleUserY; + dc.GetUserScale( &scaleUserX, &scaleUserY ); + + // set defaults if necessary + wxGridCellCoords leftTop( topLeft ), rightBottom( bottomRight ); + if ( leftTop.GetCol() < 0 ) + leftTop.SetCol(0); + if ( leftTop.GetRow() < 0 ) + leftTop.SetRow(0); + if ( rightBottom.GetCol() < 0 ) + rightBottom.SetCol(GetNumberCols() - 1); + if ( rightBottom.GetRow() < 0 ) + rightBottom.SetRow(GetNumberRows() - 1); + + // get grid offset, size and cell parameters + wxPoint pointOffSet; + wxSize sizeGrid; + wxGridCellCoordsArray renderCells; + wxArrayInt arrayCols; + wxArrayInt arrayRows; + + GetRenderSizes( leftTop, rightBottom, + pointOffSet, sizeGrid, + renderCells, + arrayCols, arrayRows ); + + // add headers/labels to dimensions + if ( style & wxGRID_DRAW_ROWS_HEADER ) + sizeGrid.x += GetRowLabelSize(); + if ( style & wxGRID_DRAW_COLS_HEADER ) + sizeGrid.y += GetColLabelSize(); + + // get render start position in logical units + wxPoint positionRender = GetRenderPosition( dc, position ); + + wxCoord originX = dc.LogicalToDeviceX( positionRender.x ); + wxCoord originY = dc.LogicalToDeviceY( positionRender.y ); + + dc.SetDeviceOrigin( originX, originY ); + + SetRenderScale( dc, positionRender, size, sizeGrid ); + + // draw row headers at specified origin + if ( GetRowLabelSize() > 0 && ( style & wxGRID_DRAW_ROWS_HEADER ) ) + { + if ( style & wxGRID_DRAW_COLS_HEADER ) + { + DrawCornerLabel( dc ); // do only if both col and row labels drawn + originY += dc.LogicalToDeviceYRel( GetColLabelSize() ); + } + + originY -= dc.LogicalToDeviceYRel( pointOffSet.y ); + dc.SetDeviceOrigin( originX, originY ); + + DrawRowLabels( dc, arrayRows ); + + // reset for columns + if ( style & wxGRID_DRAW_COLS_HEADER ) + originY -= dc.LogicalToDeviceYRel( GetColLabelSize() ); + + originY += dc.LogicalToDeviceYRel( pointOffSet.y ); + // X offset so we don't overwrite row labels + originX += dc.LogicalToDeviceXRel( GetRowLabelSize() ); + } + + // subtract col offset where startcol > 0 + originX -= dc.LogicalToDeviceXRel( pointOffSet.x ); + // no y offset for col labels, they are at the Y origin + + // draw column labels + if ( style & wxGRID_DRAW_COLS_HEADER ) + { + dc.SetDeviceOrigin( originX, originY ); + DrawColLabels( dc, arrayCols ); + // don't overwrite the labels, increment originY + originY += dc.LogicalToDeviceYRel( GetColLabelSize() ); + } + + // set device origin to draw grid cells and lines + originY -= dc.LogicalToDeviceYRel( pointOffSet.y ); + dc.SetDeviceOrigin( originX, originY ); + + // draw cell area background + dc.SetBrush( GetDefaultCellBackgroundColour() ); + dc.SetPen( *wxTRANSPARENT_PEN ); + // subtract headers from grid area dimensions + wxSize sizeCells( sizeGrid ); + if ( style & wxGRID_DRAW_ROWS_HEADER ) + sizeCells.x -= GetRowLabelSize(); + if ( style & wxGRID_DRAW_COLS_HEADER ) + sizeCells.y -= GetColLabelSize(); + + dc.DrawRectangle( pointOffSet, sizeCells ); + + // draw cells + DrawGridCellArea( dc, renderCells ); + + // draw grid lines + if ( style & wxGRID_DRAW_CELL_LINES ) + { + wxRegion regionClip( pointOffSet.x, pointOffSet.y, + sizeCells.x, sizeCells.y ); + + DrawRangeGridLines(dc, regionClip, renderCells[0], renderCells.Last()); + } + + // draw render rectangle bounding lines + DoRenderBox( dc, style, + pointOffSet, sizeCells, + leftTop, rightBottom ); + + // restore user setings + dc.SetDeviceOrigin( userOriginX, userOriginY ); + dc.SetUserScale( scaleUserX, scaleUserY ); + + if ( selectedCells.size() && !( style & wxGRID_DRAW_SELECTION ) ) + { + SelectBlock( selectedCells[ 0 ].GetRow(), + selectedCells[ 0 ].GetCol(), + selectedCells[ selectedCells.size() -1 ].GetRow(), + selectedCells[ selectedCells.size() -1 ].GetCol() ); + } +} + +void +wxGrid::SetRenderScale(wxDC& dc, + const wxPoint& pos, const wxSize& size, + const wxSize& sizeGrid ) +{ + double scaleX, scaleY; + wxSize sizeTemp; + + if ( size.GetWidth() != wxDefaultSize.GetWidth() ) // size.x was specified + sizeTemp.SetWidth( size.GetWidth() ); + else + sizeTemp.SetWidth( dc.DeviceToLogicalXRel( dc.GetSize().GetWidth() ) + - pos.x ); + + if ( size.GetHeight() != wxDefaultSize.GetHeight() ) // size.y was specified + sizeTemp.SetHeight( size.GetHeight() ); + else + sizeTemp.SetHeight( dc.DeviceToLogicalYRel( dc.GetSize().GetHeight() ) + - pos.y ); + + scaleX = (double)( (double) sizeTemp.GetWidth() / (double) sizeGrid.GetWidth() ); + scaleY = (double)( (double) sizeTemp.GetHeight() / (double) sizeGrid.GetHeight() ); + + dc.SetUserScale( wxMin( scaleX, scaleY), wxMin( scaleX, scaleY ) ); +} + +// get grid rendered size, origin offset and fill cell arrays +void wxGrid::GetRenderSizes( const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + wxPoint& pointOffSet, wxSize& sizeGrid, + wxGridCellCoordsArray& renderCells, + wxArrayInt& arrayCols, wxArrayInt& arrayRows ) +{ + pointOffSet.x = 0; + pointOffSet.y = 0; + sizeGrid.SetWidth( 0 ); + sizeGrid.SetHeight( 0 ); + + int col, row; + + wxGridSizesInfo sizeinfo = GetColSizes(); + for ( col = 0; col <= bottomRight.GetCol(); col++ ) + { + if ( col < topLeft.GetCol() ) + { + pointOffSet.x += sizeinfo.GetSize( col ); + } + else + { + for ( row = topLeft.GetRow(); row <= bottomRight.GetRow(); row++ ) + { + renderCells.Add( wxGridCellCoords( row, col )); + arrayRows.Add( row ); // column labels rendered in DrawColLabels + } + arrayCols.Add( col ); // row labels rendered in DrawRowLabels + sizeGrid.x += sizeinfo.GetSize( col ); + } + } + + sizeinfo = GetRowSizes(); + for ( row = 0; row <= bottomRight.GetRow(); row++ ) + { + if ( row < topLeft.GetRow() ) + pointOffSet.y += sizeinfo.GetSize( row ); + else + sizeGrid.y += sizeinfo.GetSize( row ); + } +} + +// get render start position +// if position not specified use dc draw extents MaxX and MaxY +wxPoint wxGrid::GetRenderPosition( wxDC& dc, const wxPoint& position ) +{ + wxPoint positionRender( position ); + + if ( !positionRender.IsFullySpecified() ) + { + if ( positionRender.x == wxDefaultPosition.x ) + positionRender.x = dc.MaxX(); + + if ( positionRender.y == wxDefaultPosition.y ) + positionRender.y = dc.MaxY(); + } + + return positionRender; +} + +// draw render rectangle bounding lines +// useful where there is multi cell row or col clipping and no cell border +void wxGrid::DoRenderBox( wxDC& dc, const int& style, + const wxPoint& pointOffSet, + const wxSize& sizeCells, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight ) +{ + if ( !( style & wxGRID_DRAW_BOX_RECT ) ) + return; + + int bottom = pointOffSet.y + sizeCells.GetY(), + right = pointOffSet.x + sizeCells.GetX() - 1; + + // horiz top line if we are not drawing column header/labels + if ( !( style & wxGRID_DRAW_COLS_HEADER ) ) + { + int left = pointOffSet.x; + left += ( style & wxGRID_DRAW_COLS_HEADER ) + ? - GetRowLabelSize() : 0; + dc.SetPen( GetRowGridLinePen( topLeft.GetRow() ) ); + dc.DrawLine( left, + pointOffSet.y, + right, + pointOffSet.y ); + } + + // horiz bottom line + dc.SetPen( GetRowGridLinePen( bottomRight.GetRow() ) ); + dc.DrawLine( pointOffSet.x, bottom - 1, right, bottom - 1 ); + + // left vertical line if we are not drawing row header/labels + if ( !( style & wxGRID_DRAW_ROWS_HEADER ) ) + { + int top = pointOffSet.y; + top += ( style & wxGRID_DRAW_COLS_HEADER ) + ? - GetColLabelSize() : 0; + dc.SetPen( GetColGridLinePen( topLeft.GetCol() ) ); + dc.DrawLine( pointOffSet.x -1, + top, + pointOffSet.x - 1, + bottom - 1 ); + } + + // right vertical line + dc.SetPen( GetColGridLinePen( bottomRight.GetCol() ) ); + dc.DrawLine( right, pointOffSet.y, right, bottom - 1 ); +} + +void wxGridWindow::ScrollWindow( int dx, int dy, const wxRect *rect ) +{ + wxWindow::ScrollWindow( dx, dy, rect ); + m_owner->GetGridRowLabelWindow()->ScrollWindow( 0, dy, rect ); + m_owner->GetGridColLabelWindow()->ScrollWindow( dx, 0, rect ); +} + +void wxGridWindow::OnMouseEvent( wxMouseEvent& event ) +{ + if (event.ButtonDown(wxMOUSE_BTN_LEFT) && FindFocus() != this) + SetFocus(); + + m_owner->ProcessGridCellMouseEvent( event ); +} + +void wxGridWindow::OnMouseWheel( wxMouseEvent& event ) +{ + if (!m_owner->GetEventHandler()->ProcessEvent( event )) + event.Skip(); +} + +// This seems to be required for wxMotif/wxGTK otherwise the mouse +// cursor must be in the cell edit control to get key events +// +void wxGridWindow::OnKeyDown( wxKeyEvent& event ) +{ + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) + event.Skip(); +} + +void wxGridWindow::OnKeyUp( wxKeyEvent& event ) +{ + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) + event.Skip(); +} + +void wxGridWindow::OnChar( wxKeyEvent& event ) +{ + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) + event.Skip(); +} + +void wxGridWindow::OnEraseBackground( wxEraseEvent& WXUNUSED(event) ) +{ +} + +void wxGridWindow::OnFocus(wxFocusEvent& event) +{ + // and if we have any selection, it has to be repainted, because it + // uses different colour when the grid is not focused: + if ( m_owner->IsSelection() ) + { + Refresh(); + } + else + { + // NB: Note that this code is in "else" branch only because the other + // branch refreshes everything and so there's no point in calling + // Refresh() again, *not* because it should only be done if + // !IsSelection(). If the above code is ever optimized to refresh + // only selected area, this needs to be moved out of the "else" + // branch so that it's always executed. + + // current cell cursor {dis,re}appears on focus change: + const wxGridCellCoords cursorCoords(m_owner->GetGridCursorRow(), + m_owner->GetGridCursorCol()); + const wxRect cursor = + m_owner->BlockToDeviceRect(cursorCoords, cursorCoords); + Refresh(true, &cursor); + } + + if ( !m_owner->GetEventHandler()->ProcessEvent( event ) ) + event.Skip(); +} + +#define internalXToCol(x) XToCol(x, true) +#define internalYToRow(y) YToRow(y, true) + +///////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE( wxGrid, wxScrolledWindow ) + EVT_PAINT( wxGrid::OnPaint ) + EVT_SIZE( wxGrid::OnSize ) + EVT_KEY_DOWN( wxGrid::OnKeyDown ) + EVT_KEY_UP( wxGrid::OnKeyUp ) + EVT_CHAR ( wxGrid::OnChar ) + EVT_ERASE_BACKGROUND( wxGrid::OnEraseBackground ) + EVT_COMMAND(wxID_ANY, wxEVT_GRID_HIDE_EDITOR, wxGrid::OnHideEditor ) +END_EVENT_TABLE() + +bool wxGrid::Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, + long style, const wxString& name) +{ + if (!wxScrolledWindow::Create(parent, id, pos, size, + style | wxWANTS_CHARS, name)) + return false; + + m_colMinWidths = wxLongToLongHashMap(GRID_HASH_SIZE); + m_rowMinHeights = wxLongToLongHashMap(GRID_HASH_SIZE); + + Create(); + SetInitialSize(size); + CalcDimensions(); + + return true; +} + +wxGrid::~wxGrid() +{ + if ( m_winCapture ) + m_winCapture->ReleaseMouse(); + + // Ensure that the editor control is destroyed before the grid is, + // otherwise we crash later when the editor tries to do something with the + // half destroyed grid + HideCellEditControl(); + + // Must do this or ~wxScrollHelper will pop the wrong event handler + SetTargetWindow(this); + ClearAttrCache(); + wxSafeDecRef(m_defaultCellAttr); + +#ifdef DEBUG_ATTR_CACHE + size_t total = gs_nAttrCacheHits + gs_nAttrCacheMisses; + wxPrintf(wxT("wxGrid attribute cache statistics: " + "total: %u, hits: %u (%u%%)\n"), + total, gs_nAttrCacheHits, + total ? (gs_nAttrCacheHits*100) / total : 0); +#endif + + // if we own the table, just delete it, otherwise at least don't leave it + // with dangling view pointer + if ( m_ownTable ) + delete m_table; + else if ( m_table && m_table->GetView() == this ) + m_table->SetView(NULL); + + delete m_typeRegistry; + delete m_selection; + + delete m_setFixedRows; + delete m_setFixedCols; +} + +// +// ----- internal init and update functions +// + +// NOTE: If using the default visual attributes works everywhere then this can +// be removed as well as the #else cases below. +#define _USE_VISATTR 0 + +void wxGrid::Create() +{ + // create the type registry + m_typeRegistry = new wxGridTypeRegistry; + + m_cellEditCtrlEnabled = false; + + m_defaultCellAttr = new wxGridCellAttr(); + + // Set default cell attributes + m_defaultCellAttr->SetDefAttr(m_defaultCellAttr); + m_defaultCellAttr->SetKind(wxGridCellAttr::Default); + m_defaultCellAttr->SetFont(GetFont()); + m_defaultCellAttr->SetAlignment(wxALIGN_LEFT, wxALIGN_TOP); + m_defaultCellAttr->SetRenderer(new wxGridCellStringRenderer); + m_defaultCellAttr->SetEditor(new wxGridCellTextEditor); + +#if _USE_VISATTR + wxVisualAttributes gva = wxListBox::GetClassDefaultAttributes(); + wxVisualAttributes lva = wxPanel::GetClassDefaultAttributes(); + + m_defaultCellAttr->SetTextColour(gva.colFg); + m_defaultCellAttr->SetBackgroundColour(gva.colBg); + +#else + m_defaultCellAttr->SetTextColour( + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); + m_defaultCellAttr->SetBackgroundColour( + wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); +#endif + + m_numRows = 0; + m_numCols = 0; + m_currentCellCoords = wxGridNoCellCoords; + + // subwindow components that make up the wxGrid + m_rowLabelWin = new wxGridRowLabelWindow(this); + CreateColumnWindow(); + m_cornerLabelWin = new wxGridCornerLabelWindow(this); + m_gridWin = new wxGridWindow( this ); + + SetTargetWindow( m_gridWin ); + +#if _USE_VISATTR + wxColour gfg = gva.colFg; + wxColour gbg = gva.colBg; + wxColour lfg = lva.colFg; + wxColour lbg = lva.colBg; +#else + wxColour gfg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ); + wxColour gbg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ); + wxColour lfg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ); + wxColour lbg = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ); +#endif + + m_cornerLabelWin->SetOwnForegroundColour(lfg); + m_cornerLabelWin->SetOwnBackgroundColour(lbg); + m_rowLabelWin->SetOwnForegroundColour(lfg); + m_rowLabelWin->SetOwnBackgroundColour(lbg); + m_colWindow->SetOwnForegroundColour(lfg); + m_colWindow->SetOwnBackgroundColour(lbg); + + m_gridWin->SetOwnForegroundColour(gfg); + m_gridWin->SetOwnBackgroundColour(gbg); + + m_labelBackgroundColour = m_rowLabelWin->GetBackgroundColour(); + m_labelTextColour = m_rowLabelWin->GetForegroundColour(); + + // now that we have the grid window, use its font to compute the default + // row height + m_defaultRowHeight = m_gridWin->GetCharHeight(); +#if defined(__WXMOTIF__) || defined(__WXGTK__) // see also text ctrl sizing in ShowCellEditControl() + m_defaultRowHeight += 8; +#else + m_defaultRowHeight += 4; +#endif + +} + +void wxGrid::CreateColumnWindow() +{ + if ( m_useNativeHeader ) + { + m_colWindow = new wxGridHeaderCtrl(this); + m_colLabelHeight = m_colWindow->GetBestSize().y; + } + else // draw labels ourselves + { + m_colWindow = new wxGridColLabelWindow(this); + m_colLabelHeight = WXGRID_DEFAULT_COL_LABEL_HEIGHT; + } +} + +bool wxGrid::CreateGrid( int numRows, int numCols, + wxGridSelectionModes selmode ) +{ + wxCHECK_MSG( !m_created, + false, + wxT("wxGrid::CreateGrid or wxGrid::SetTable called more than once") ); + + return SetTable(new wxGridStringTable(numRows, numCols), true, selmode); +} + +void wxGrid::SetSelectionMode(wxGridSelectionModes selmode) +{ + wxCHECK_RET( m_created, + wxT("Called wxGrid::SetSelectionMode() before calling CreateGrid()") ); + + m_selection->SetSelectionMode( selmode ); +} + +wxGrid::wxGridSelectionModes wxGrid::GetSelectionMode() const +{ + wxCHECK_MSG( m_created, wxGridSelectCells, + wxT("Called wxGrid::GetSelectionMode() before calling CreateGrid()") ); + + return m_selection->GetSelectionMode(); +} + +bool +wxGrid::SetTable(wxGridTableBase *table, + bool takeOwnership, + wxGrid::wxGridSelectionModes selmode ) +{ + bool checkSelection = false; + if ( m_created ) + { + // stop all processing + m_created = false; + + if (m_table) + { + m_table->SetView(0); + if( m_ownTable ) + delete m_table; + m_table = NULL; + } + + wxDELETE(m_selection); + + m_ownTable = false; + m_numRows = 0; + m_numCols = 0; + checkSelection = true; + + // kill row and column size arrays + m_colWidths.Empty(); + m_colRights.Empty(); + m_rowHeights.Empty(); + m_rowBottoms.Empty(); + } + + if (table) + { + m_numRows = table->GetNumberRows(); + m_numCols = table->GetNumberCols(); + + if ( m_useNativeHeader ) + GetGridColHeader()->SetColumnCount(m_numCols); + + m_table = table; + m_table->SetView( this ); + m_ownTable = takeOwnership; + m_selection = new wxGridSelection( this, selmode ); + if (checkSelection) + { + // If the newly set table is smaller than the + // original one current cell and selection regions + // might be invalid, + m_selectedBlockCorner = wxGridNoCellCoords; + m_currentCellCoords = + wxGridCellCoords(wxMin(m_numRows, m_currentCellCoords.GetRow()), + wxMin(m_numCols, m_currentCellCoords.GetCol())); + if (m_selectedBlockTopLeft.GetRow() >= m_numRows || + m_selectedBlockTopLeft.GetCol() >= m_numCols) + { + m_selectedBlockTopLeft = wxGridNoCellCoords; + m_selectedBlockBottomRight = wxGridNoCellCoords; + } + else + m_selectedBlockBottomRight = + wxGridCellCoords(wxMin(m_numRows, + m_selectedBlockBottomRight.GetRow()), + wxMin(m_numCols, + m_selectedBlockBottomRight.GetCol())); + } + CalcDimensions(); + + m_created = true; + } + + InvalidateBestSize(); + + return m_created; +} + +void wxGrid::Init() +{ + m_created = false; + + m_cornerLabelWin = NULL; + m_rowLabelWin = NULL; + m_colWindow = NULL; + m_gridWin = NULL; + + m_table = NULL; + m_ownTable = false; + + m_selection = NULL; + m_defaultCellAttr = NULL; + m_typeRegistry = NULL; + m_winCapture = NULL; + + m_rowLabelWidth = WXGRID_DEFAULT_ROW_LABEL_WIDTH; + m_colLabelHeight = WXGRID_DEFAULT_COL_LABEL_HEIGHT; + + m_setFixedRows = + m_setFixedCols = NULL; + + // init attr cache + m_attrCache.row = -1; + m_attrCache.col = -1; + m_attrCache.attr = NULL; + + m_labelFont = GetFont(); + m_labelFont.SetWeight( wxBOLD ); + + m_rowLabelHorizAlign = wxALIGN_CENTRE; + m_rowLabelVertAlign = wxALIGN_CENTRE; + + m_colLabelHorizAlign = wxALIGN_CENTRE; + m_colLabelVertAlign = wxALIGN_CENTRE; + m_colLabelTextOrientation = wxHORIZONTAL; + + m_defaultColWidth = WXGRID_DEFAULT_COL_WIDTH; + m_defaultRowHeight = 0; // this will be initialized after creation + + m_minAcceptableColWidth = WXGRID_MIN_COL_WIDTH; + m_minAcceptableRowHeight = WXGRID_MIN_ROW_HEIGHT; + + m_gridLineColour = wxColour( 192,192,192 ); + m_gridLinesEnabled = true; + m_gridLinesClipHorz = + m_gridLinesClipVert = true; + m_cellHighlightColour = *wxBLACK; + m_cellHighlightPenWidth = 2; + m_cellHighlightROPenWidth = 1; + + m_canDragColMove = false; + + m_cursorMode = WXGRID_CURSOR_SELECT_CELL; + m_winCapture = NULL; + m_canDragRowSize = true; + m_canDragColSize = true; + m_canDragGridSize = true; + m_canDragCell = false; + m_dragLastPos = -1; + m_dragRowOrCol = -1; + m_isDragging = false; + m_startDragPos = wxDefaultPosition; + + m_sortCol = wxNOT_FOUND; + m_sortIsAscending = true; + + m_useNativeHeader = + m_nativeColumnLabels = false; + + m_waitForSlowClick = false; + + m_rowResizeCursor = wxCursor( wxCURSOR_SIZENS ); + m_colResizeCursor = wxCursor( wxCURSOR_SIZEWE ); + + m_currentCellCoords = wxGridNoCellCoords; + + m_selectedBlockTopLeft = + m_selectedBlockBottomRight = + m_selectedBlockCorner = wxGridNoCellCoords; + + m_selectionBackground = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); + m_selectionForeground = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + + m_editable = true; // default for whole grid + + m_inOnKeyDown = false; + m_batchCount = 0; + + m_extraWidth = + m_extraHeight = 0; + + // we can't call SetScrollRate() as the window isn't created yet but OTOH + // we don't need to call it neither as the scroll position is (0, 0) right + // now anyhow, so just set the parameters directly + m_xScrollPixelsPerLine = GRID_SCROLL_LINE_X; + m_yScrollPixelsPerLine = GRID_SCROLL_LINE_Y; + + m_tabBehaviour = Tab_Stop; +} + +// ---------------------------------------------------------------------------- +// the idea is to call these functions only when necessary because they create +// quite big arrays which eat memory mostly unnecessary - in particular, if +// default widths/heights are used for all rows/columns, we may not use these +// arrays at all +// +// with some extra code, it should be possible to only store the widths/heights +// different from default ones (resulting in space savings for huge grids) but +// this is not done currently +// ---------------------------------------------------------------------------- + +void wxGrid::InitRowHeights() +{ + m_rowHeights.Empty(); + m_rowBottoms.Empty(); + + m_rowHeights.Alloc( m_numRows ); + m_rowBottoms.Alloc( m_numRows ); + + m_rowHeights.Add( m_defaultRowHeight, m_numRows ); + + int rowBottom = 0; + for ( int i = 0; i < m_numRows; i++ ) + { + rowBottom += m_defaultRowHeight; + m_rowBottoms.Add( rowBottom ); + } +} + +void wxGrid::InitColWidths() +{ + m_colWidths.Empty(); + m_colRights.Empty(); + + m_colWidths.Alloc( m_numCols ); + m_colRights.Alloc( m_numCols ); + + m_colWidths.Add( m_defaultColWidth, m_numCols ); + + for ( int i = 0; i < m_numCols; i++ ) + { + int colRight = ( GetColPos( i ) + 1 ) * m_defaultColWidth; + m_colRights.Add( colRight ); + } +} + +int wxGrid::GetColWidth(int col) const +{ + if ( m_colWidths.IsEmpty() ) + return m_defaultColWidth; + + // a negative width indicates a hidden column + return m_colWidths[col] > 0 ? m_colWidths[col] : 0; +} + +int wxGrid::GetColLeft(int col) const +{ + if ( m_colRights.IsEmpty() ) + return GetColPos( col ) * m_defaultColWidth; + + return m_colRights[col] - GetColWidth(col); +} + +int wxGrid::GetColRight(int col) const +{ + return m_colRights.IsEmpty() ? (GetColPos( col ) + 1) * m_defaultColWidth + : m_colRights[col]; +} + +int wxGrid::GetRowHeight(int row) const +{ + // no custom heights / hidden rows + if ( m_rowHeights.IsEmpty() ) + return m_defaultRowHeight; + + // a negative height indicates a hidden row + return m_rowHeights[row] > 0 ? m_rowHeights[row] : 0; +} + +int wxGrid::GetRowTop(int row) const +{ + if ( m_rowBottoms.IsEmpty() ) + return row * m_defaultRowHeight; + + return m_rowBottoms[row] - GetRowHeight(row); +} + +int wxGrid::GetRowBottom(int row) const +{ + return m_rowBottoms.IsEmpty() ? (row + 1) * m_defaultRowHeight + : m_rowBottoms[row]; +} + +void wxGrid::CalcDimensions() +{ + // compute the size of the scrollable area + int w = m_numCols > 0 ? GetColRight(GetColAt(m_numCols - 1)) : 0; + int h = m_numRows > 0 ? GetRowBottom(m_numRows - 1) : 0; + + w += m_extraWidth; + h += m_extraHeight; + + // take into account editor if shown + if ( IsCellEditControlShown() ) + { + int w2, h2; + int r = m_currentCellCoords.GetRow(); + int c = m_currentCellCoords.GetCol(); + int x = GetColLeft(c); + int y = GetRowTop(r); + + // how big is the editor + wxGridCellAttr* attr = GetCellAttr(r, c); + wxGridCellEditor* editor = attr->GetEditor(this, r, c); + editor->GetControl()->GetSize(&w2, &h2); + w2 += x; + h2 += y; + if ( w2 > w ) + w = w2; + if ( h2 > h ) + h = h2; + editor->DecRef(); + attr->DecRef(); + } + + // preserve (more or less) the previous position + int x, y; + GetViewStart( &x, &y ); + + // ensure the position is valid for the new scroll ranges + if ( x >= w ) + x = wxMax( w - 1, 0 ); + if ( y >= h ) + y = wxMax( h - 1, 0 ); + + // update the virtual size and refresh the scrollbars to reflect it + m_gridWin->SetVirtualSize(w, h); + Scroll(x, y); + AdjustScrollbars(); + + // if our OnSize() hadn't been called (it would if we have scrollbars), we + // still must reposition the children + CalcWindowSizes(); +} + +wxSize wxGrid::GetSizeAvailableForScrollTarget(const wxSize& size) +{ + wxSize sizeGridWin(size); + sizeGridWin.x -= m_rowLabelWidth; + sizeGridWin.y -= m_colLabelHeight; + + return sizeGridWin; +} + +void wxGrid::CalcWindowSizes() +{ + // escape if the window is has not been fully created yet + + if ( m_cornerLabelWin == NULL ) + return; + + int cw, ch; + GetClientSize( &cw, &ch ); + + // the grid may be too small to have enough space for the labels yet, don't + // size the windows to negative sizes in this case + int gw = cw - m_rowLabelWidth; + int gh = ch - m_colLabelHeight; + if (gw < 0) + gw = 0; + if (gh < 0) + gh = 0; + + if ( m_cornerLabelWin && m_cornerLabelWin->IsShown() ) + m_cornerLabelWin->SetSize( 0, 0, m_rowLabelWidth, m_colLabelHeight ); + + if ( m_colWindow && m_colWindow->IsShown() ) + m_colWindow->SetSize( m_rowLabelWidth, 0, gw, m_colLabelHeight ); + + if ( m_rowLabelWin && m_rowLabelWin->IsShown() ) + m_rowLabelWin->SetSize( 0, m_colLabelHeight, m_rowLabelWidth, gh ); + + if ( m_gridWin && m_gridWin->IsShown() ) + m_gridWin->SetSize( m_rowLabelWidth, m_colLabelHeight, gw, gh ); +} + +// this is called when the grid table sends a message +// to indicate that it has been redimensioned +// +bool wxGrid::Redimension( wxGridTableMessage& msg ) +{ + int i; + bool result = false; + + // Clear the attribute cache as the attribute might refer to a different + // cell than stored in the cache after adding/removing rows/columns. + ClearAttrCache(); + + // By the same reasoning, the editor should be dismissed if columns are + // added or removed. And for consistency, it should IMHO always be + // removed, not only if the cell "underneath" it actually changes. + // For now, I intentionally do not save the editor's content as the + // cell it might want to save that stuff to might no longer exist. + HideCellEditControl(); + + switch ( msg.GetId() ) + { + case wxGRIDTABLE_NOTIFY_ROWS_INSERTED: + { + size_t pos = msg.GetCommandInt(); + int numRows = msg.GetCommandInt2(); + + m_numRows += numRows; + + if ( !m_rowHeights.IsEmpty() ) + { + m_rowHeights.Insert( m_defaultRowHeight, pos, numRows ); + m_rowBottoms.Insert( 0, pos, numRows ); + + int bottom = 0; + if ( pos > 0 ) + bottom = m_rowBottoms[pos - 1]; + + for ( i = pos; i < m_numRows; i++ ) + { + bottom += m_rowHeights[i]; + m_rowBottoms[i] = bottom; + } + } + + if ( m_currentCellCoords == wxGridNoCellCoords ) + { + // if we have just inserted cols into an empty grid the current + // cell will be undefined... + // + SetCurrentCell( 0, 0 ); + } + + if ( m_selection ) + m_selection->UpdateRows( pos, numRows ); + wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider(); + if (attrProvider) + attrProvider->UpdateAttrRows( pos, numRows ); + + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_rowLabelWin->Refresh(); + } + } + result = true; + break; + + case wxGRIDTABLE_NOTIFY_ROWS_APPENDED: + { + int numRows = msg.GetCommandInt(); + int oldNumRows = m_numRows; + m_numRows += numRows; + + if ( !m_rowHeights.IsEmpty() ) + { + m_rowHeights.Add( m_defaultRowHeight, numRows ); + m_rowBottoms.Add( 0, numRows ); + + int bottom = 0; + if ( oldNumRows > 0 ) + bottom = m_rowBottoms[oldNumRows - 1]; + + for ( i = oldNumRows; i < m_numRows; i++ ) + { + bottom += m_rowHeights[i]; + m_rowBottoms[i] = bottom; + } + } + + if ( m_currentCellCoords == wxGridNoCellCoords ) + { + // if we have just inserted cols into an empty grid the current + // cell will be undefined... + // + SetCurrentCell( 0, 0 ); + } + + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_rowLabelWin->Refresh(); + } + } + result = true; + break; + + case wxGRIDTABLE_NOTIFY_ROWS_DELETED: + { + size_t pos = msg.GetCommandInt(); + int numRows = msg.GetCommandInt2(); + m_numRows -= numRows; + + if ( !m_rowHeights.IsEmpty() ) + { + m_rowHeights.RemoveAt( pos, numRows ); + m_rowBottoms.RemoveAt( pos, numRows ); + + int h = 0; + for ( i = 0; i < m_numRows; i++ ) + { + h += m_rowHeights[i]; + m_rowBottoms[i] = h; + } + } + + if ( !m_numRows ) + { + m_currentCellCoords = wxGridNoCellCoords; + } + else + { + if ( m_currentCellCoords.GetRow() >= m_numRows ) + m_currentCellCoords.Set( 0, 0 ); + } + + if ( m_selection ) + m_selection->UpdateRows( pos, -((int)numRows) ); + wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider(); + if (attrProvider) + { + attrProvider->UpdateAttrRows( pos, -((int)numRows) ); + +// ifdef'd out following patch from Paul Gammans +#if 0 + // No need to touch column attributes, unless we + // removed _all_ rows, in this case, we remove + // all column attributes. + // I hate to do this here, but the + // needed data is not available inside UpdateAttrRows. + if ( !GetNumberRows() ) + attrProvider->UpdateAttrCols( 0, -GetNumberCols() ); +#endif + } + + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_rowLabelWin->Refresh(); + } + } + result = true; + break; + + case wxGRIDTABLE_NOTIFY_COLS_INSERTED: + { + size_t pos = msg.GetCommandInt(); + int numCols = msg.GetCommandInt2(); + m_numCols += numCols; + + if ( m_useNativeHeader ) + GetGridColHeader()->SetColumnCount(m_numCols); + + if ( !m_colAt.IsEmpty() ) + { + //Shift the column IDs + for ( i = 0; i < m_numCols - numCols; i++ ) + { + if ( m_colAt[i] >= (int)pos ) + m_colAt[i] += numCols; + } + + m_colAt.Insert( pos, pos, numCols ); + + //Set the new columns' positions + for ( i = pos + 1; i < (int)pos + numCols; i++ ) + { + m_colAt[i] = i; + } + } + + if ( !m_colWidths.IsEmpty() ) + { + m_colWidths.Insert( m_defaultColWidth, pos, numCols ); + m_colRights.Insert( 0, pos, numCols ); + + int right = 0; + if ( pos > 0 ) + right = m_colRights[GetColAt( pos - 1 )]; + + int colPos; + for ( colPos = pos; colPos < m_numCols; colPos++ ) + { + i = GetColAt( colPos ); + + right += m_colWidths[i]; + m_colRights[i] = right; + } + } + + if ( m_currentCellCoords == wxGridNoCellCoords ) + { + // if we have just inserted cols into an empty grid the current + // cell will be undefined... + // + SetCurrentCell( 0, 0 ); + } + + if ( m_selection ) + m_selection->UpdateCols( pos, numCols ); + wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider(); + if (attrProvider) + attrProvider->UpdateAttrCols( pos, numCols ); + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_colWindow->Refresh(); + } + } + result = true; + break; + + case wxGRIDTABLE_NOTIFY_COLS_APPENDED: + { + int numCols = msg.GetCommandInt(); + int oldNumCols = m_numCols; + m_numCols += numCols; + + if ( !m_colAt.IsEmpty() ) + { + m_colAt.Add( 0, numCols ); + + //Set the new columns' positions + for ( i = oldNumCols; i < m_numCols; i++ ) + { + m_colAt[i] = i; + } + } + + if ( !m_colWidths.IsEmpty() ) + { + m_colWidths.Add( m_defaultColWidth, numCols ); + m_colRights.Add( 0, numCols ); + + int right = 0; + if ( oldNumCols > 0 ) + right = m_colRights[GetColAt( oldNumCols - 1 )]; + + int colPos; + for ( colPos = oldNumCols; colPos < m_numCols; colPos++ ) + { + i = GetColAt( colPos ); + + right += m_colWidths[i]; + m_colRights[i] = right; + } + } + + // Notice that this must be called after updating m_colWidths above + // as the native grid control will check whether the new columns + // are shown which results in accessing m_colWidths array. + if ( m_useNativeHeader ) + GetGridColHeader()->SetColumnCount(m_numCols); + + if ( m_currentCellCoords == wxGridNoCellCoords ) + { + // if we have just inserted cols into an empty grid the current + // cell will be undefined... + // + SetCurrentCell( 0, 0 ); + } + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_colWindow->Refresh(); + } + } + result = true; + break; + + case wxGRIDTABLE_NOTIFY_COLS_DELETED: + { + size_t pos = msg.GetCommandInt(); + int numCols = msg.GetCommandInt2(); + m_numCols -= numCols; + if ( m_useNativeHeader ) + GetGridColHeader()->SetColumnCount(m_numCols); + + if ( !m_colAt.IsEmpty() ) + { + int colID = GetColAt( pos ); + + m_colAt.RemoveAt( pos, numCols ); + + //Shift the column IDs + int colPos; + for ( colPos = 0; colPos < m_numCols; colPos++ ) + { + if ( m_colAt[colPos] > colID ) + m_colAt[colPos] -= numCols; + } + } + + if ( !m_colWidths.IsEmpty() ) + { + m_colWidths.RemoveAt( pos, numCols ); + m_colRights.RemoveAt( pos, numCols ); + + int w = 0; + int colPos; + for ( colPos = 0; colPos < m_numCols; colPos++ ) + { + i = GetColAt( colPos ); + + w += m_colWidths[i]; + m_colRights[i] = w; + } + } + + if ( !m_numCols ) + { + m_currentCellCoords = wxGridNoCellCoords; + } + else + { + if ( m_currentCellCoords.GetCol() >= m_numCols ) + m_currentCellCoords.Set( 0, 0 ); + } + + if ( m_selection ) + m_selection->UpdateCols( pos, -((int)numCols) ); + wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider(); + if (attrProvider) + { + attrProvider->UpdateAttrCols( pos, -((int)numCols) ); + +// ifdef'd out following patch from Paul Gammans +#if 0 + // No need to touch row attributes, unless we + // removed _all_ columns, in this case, we remove + // all row attributes. + // I hate to do this here, but the + // needed data is not available inside UpdateAttrCols. + if ( !GetNumberCols() ) + attrProvider->UpdateAttrRows( 0, -GetNumberRows() ); +#endif + } + + if ( !GetBatchCount() ) + { + CalcDimensions(); + m_colWindow->Refresh(); + } + } + result = true; + break; + } + + InvalidateBestSize(); + + if (result && !GetBatchCount() ) + m_gridWin->Refresh(); + + return result; +} + +wxArrayInt wxGrid::CalcRowLabelsExposed( const wxRegion& reg ) const +{ + wxRegionIterator iter( reg ); + wxRect r; + + wxArrayInt rowlabels; + + int top, bottom; + while ( iter ) + { + r = iter.GetRect(); + + // TODO: remove this when we can... + // There is a bug in wxMotif that gives garbage update + // rectangles if you jump-scroll a long way by clicking the + // scrollbar with middle button. This is a work-around + // +#if defined(__WXMOTIF__) + int cw, ch; + m_gridWin->GetClientSize( &cw, &ch ); + if ( r.GetTop() > ch ) + r.SetTop( 0 ); + r.SetBottom( wxMin( r.GetBottom(), ch ) ); +#endif + + // logical bounds of update region + // + int dummy; + CalcUnscrolledPosition( 0, r.GetTop(), &dummy, &top ); + CalcUnscrolledPosition( 0, r.GetBottom(), &dummy, &bottom ); + + // find the row labels within these bounds + // + int row; + for ( row = internalYToRow(top); row < m_numRows; row++ ) + { + if ( GetRowBottom(row) < top ) + continue; + + if ( GetRowTop(row) > bottom ) + break; + + rowlabels.Add( row ); + } + + ++iter; + } + + return rowlabels; +} + +wxArrayInt wxGrid::CalcColLabelsExposed( const wxRegion& reg ) const +{ + wxRegionIterator iter( reg ); + wxRect r; + + wxArrayInt colLabels; + + int left, right; + while ( iter ) + { + r = iter.GetRect(); + + // TODO: remove this when we can... + // There is a bug in wxMotif that gives garbage update + // rectangles if you jump-scroll a long way by clicking the + // scrollbar with middle button. This is a work-around + // +#if defined(__WXMOTIF__) + int cw, ch; + m_gridWin->GetClientSize( &cw, &ch ); + if ( r.GetLeft() > cw ) + r.SetLeft( 0 ); + r.SetRight( wxMin( r.GetRight(), cw ) ); +#endif + + // logical bounds of update region + // + int dummy; + CalcUnscrolledPosition( r.GetLeft(), 0, &left, &dummy ); + CalcUnscrolledPosition( r.GetRight(), 0, &right, &dummy ); + + // find the cells within these bounds + // + int col; + int colPos; + for ( colPos = GetColPos( internalXToCol(left) ); colPos < m_numCols; colPos++ ) + { + col = GetColAt( colPos ); + + if ( GetColRight(col) < left ) + continue; + + if ( GetColLeft(col) > right ) + break; + + colLabels.Add( col ); + } + + ++iter; + } + + return colLabels; +} + +wxGridCellCoordsArray wxGrid::CalcCellsExposed( const wxRegion& reg ) const +{ + wxRect r; + + wxGridCellCoordsArray cellsExposed; + + int left, top, right, bottom; + for ( wxRegionIterator iter(reg); iter; ++iter ) + { + r = iter.GetRect(); + + // Skip 0-height cells, they're invisible anyhow, don't waste time + // getting their rectangles and so on. + if ( !r.GetHeight() ) + continue; + + // TODO: remove this when we can... + // There is a bug in wxMotif that gives garbage update + // rectangles if you jump-scroll a long way by clicking the + // scrollbar with middle button. This is a work-around + // +#if defined(__WXMOTIF__) + int cw, ch; + m_gridWin->GetClientSize( &cw, &ch ); + if ( r.GetTop() > ch ) r.SetTop( 0 ); + if ( r.GetLeft() > cw ) r.SetLeft( 0 ); + r.SetRight( wxMin( r.GetRight(), cw ) ); + r.SetBottom( wxMin( r.GetBottom(), ch ) ); +#endif + + // logical bounds of update region + // + CalcUnscrolledPosition( r.GetLeft(), r.GetTop(), &left, &top ); + CalcUnscrolledPosition( r.GetRight(), r.GetBottom(), &right, &bottom ); + + // find the cells within these bounds + wxArrayInt cols; + for ( int row = internalYToRow(top); row < m_numRows; row++ ) + { + if ( GetRowBottom(row) <= top ) + continue; + + if ( GetRowTop(row) > bottom ) + break; + + // add all dirty cells in this row: notice that the columns which + // are dirty don't depend on the row so we compute them only once + // for the first dirty row and then reuse for all the next ones + if ( cols.empty() ) + { + // do determine the dirty columns + for ( int pos = XToPos(left); pos <= XToPos(right); pos++ ) + cols.push_back(GetColAt(pos)); + + // if there are no dirty columns at all, nothing to do + if ( cols.empty() ) + break; + } + + const size_t count = cols.size(); + for ( size_t n = 0; n < count; n++ ) + cellsExposed.Add(wxGridCellCoords(row, cols[n])); + } + } + + return cellsExposed; +} + + +void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event ) +{ + int x, y, row; + wxPoint pos( event.GetPosition() ); + CalcUnscrolledPosition( pos.x, pos.y, &x, &y ); + + if ( event.Dragging() ) + { + if (!m_isDragging) + m_isDragging = true; + + if ( event.LeftIsDown() ) + { + switch ( m_cursorMode ) + { + case WXGRID_CURSOR_RESIZE_ROW: + { + int cw, ch, left, dummy; + m_gridWin->GetClientSize( &cw, &ch ); + CalcUnscrolledPosition( 0, 0, &left, &dummy ); + + wxClientDC dc( m_gridWin ); + PrepareDC( dc ); + y = wxMax( y, + GetRowTop(m_dragRowOrCol) + + GetRowMinimalHeight(m_dragRowOrCol) ); + dc.SetLogicalFunction(wxINVERT); + if ( m_dragLastPos >= 0 ) + { + dc.DrawLine( left, m_dragLastPos, left+cw, m_dragLastPos ); + } + dc.DrawLine( left, y, left+cw, y ); + m_dragLastPos = y; + } + break; + + case WXGRID_CURSOR_SELECT_ROW: + { + if ( (row = YToRow( y )) >= 0 ) + { + if ( m_selection ) + m_selection->SelectRow(row, event); + } + } + break; + + // default label to suppress warnings about "enumeration value + // 'xxx' not handled in switch + default: + break; + } + } + return; + } + + if ( m_isDragging && (event.Entering() || event.Leaving()) ) + return; + + if (m_isDragging) + m_isDragging = false; + + // ------------ Entering or leaving the window + // + if ( event.Entering() || event.Leaving() ) + { + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL, m_rowLabelWin); + } + + // ------------ Left button pressed + // + else if ( event.LeftDown() ) + { + row = YToEdgeOfRow(y); + if ( row != wxNOT_FOUND && CanDragRowSize(row) ) + { + ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, m_rowLabelWin); + } + else // not a request to start resizing + { + row = YToRow(y); + if ( row >= 0 && + !SendEvent( wxEVT_GRID_LABEL_LEFT_CLICK, row, -1, event ) ) + { + if ( !event.ShiftDown() && !event.CmdDown() ) + ClearSelection(); + if ( m_selection ) + { + if ( event.ShiftDown() ) + { + m_selection->SelectBlock + ( + m_currentCellCoords.GetRow(), 0, + row, GetNumberCols() - 1, + event + ); + } + else + { + m_selection->SelectRow(row, event); + } + } + + ChangeCursorMode(WXGRID_CURSOR_SELECT_ROW, m_rowLabelWin); + } + } + } + + // ------------ Left double click + // + else if (event.LeftDClick() ) + { + row = YToEdgeOfRow(y); + if ( row != wxNOT_FOUND && CanDragRowSize(row) ) + { + // adjust row height depending on label text + // + // TODO: generate RESIZING event, see #10754 + AutoSizeRowLabelSize( row ); + + SendGridSizeEvent(wxEVT_GRID_ROW_SIZE, row, -1, event); + + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL, GetColLabelWindow()); + m_dragLastPos = -1; + } + else // not on row separator or it's not resizable + { + row = YToRow(y); + if ( row >=0 && + !SendEvent( wxEVT_GRID_LABEL_LEFT_DCLICK, row, -1, event ) ) + { + // no default action at the moment + } + } + } + + // ------------ Left button released + // + else if ( event.LeftUp() ) + { + if ( m_cursorMode == WXGRID_CURSOR_RESIZE_ROW ) + DoEndDragResizeRow(event); + + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL, m_rowLabelWin); + m_dragLastPos = -1; + } + + // ------------ Right button down + // + else if ( event.RightDown() ) + { + row = YToRow(y); + if ( row >=0 && + !SendEvent( wxEVT_GRID_LABEL_RIGHT_CLICK, row, -1, event ) ) + { + // no default action at the moment + } + } + + // ------------ Right double click + // + else if ( event.RightDClick() ) + { + row = YToRow(y); + if ( row >= 0 && + !SendEvent( wxEVT_GRID_LABEL_RIGHT_DCLICK, row, -1, event ) ) + { + // no default action at the moment + } + } + + // ------------ No buttons down and mouse moving + // + else if ( event.Moving() ) + { + m_dragRowOrCol = YToEdgeOfRow( y ); + if ( m_dragRowOrCol != wxNOT_FOUND ) + { + if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) + { + if ( CanDragRowSize(m_dragRowOrCol) ) + ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, m_rowLabelWin, false); + } + } + else if ( m_cursorMode != WXGRID_CURSOR_SELECT_CELL ) + { + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL, m_rowLabelWin, false); + } + } +} + +void wxGrid::UpdateColumnSortingIndicator(int col) +{ + wxCHECK_RET( col != wxNOT_FOUND, "invalid column index" ); + + if ( m_useNativeHeader ) + GetGridColHeader()->UpdateColumn(col); + else if ( m_nativeColumnLabels ) + m_colWindow->Refresh(); + //else: sorting indicator display not yet implemented in grid version +} + +void wxGrid::SetSortingColumn(int col, bool ascending) +{ + if ( col == m_sortCol ) + { + // we are already using this column for sorting (or not sorting at all) + // but we might still change the sorting order, check for it + if ( m_sortCol != wxNOT_FOUND && ascending != m_sortIsAscending ) + { + m_sortIsAscending = ascending; + + UpdateColumnSortingIndicator(m_sortCol); + } + } + else // we're changing the column used for sorting + { + const int sortColOld = m_sortCol; + + // change it before updating the column as we want GetSortingColumn() + // to return the correct new value + m_sortCol = col; + + if ( sortColOld != wxNOT_FOUND ) + UpdateColumnSortingIndicator(sortColOld); + + if ( m_sortCol != wxNOT_FOUND ) + { + m_sortIsAscending = ascending; + UpdateColumnSortingIndicator(m_sortCol); + } + } +} + +void wxGrid::DoColHeaderClick(int col) +{ + // we consider that the grid was resorted if this event is processed and + // not vetoed + if ( SendEvent(wxEVT_GRID_COL_SORT, -1, col) == 1 ) + { + SetSortingColumn(col, IsSortingBy(col) ? !m_sortIsAscending : true); + Refresh(); + } +} + +void wxGrid::DoStartResizeCol(int col) +{ + m_dragRowOrCol = col; + m_dragLastPos = -1; + DoUpdateResizeColWidth(GetColWidth(m_dragRowOrCol)); +} + +void wxGrid::DoUpdateResizeCol(int x) +{ + int cw, ch, dummy, top; + m_gridWin->GetClientSize( &cw, &ch ); + CalcUnscrolledPosition( 0, 0, &dummy, &top ); + + wxClientDC dc( m_gridWin ); + PrepareDC( dc ); + + x = wxMax( x, GetColLeft(m_dragRowOrCol) + GetColMinimalWidth(m_dragRowOrCol)); + dc.SetLogicalFunction(wxINVERT); + if ( m_dragLastPos >= 0 ) + { + dc.DrawLine( m_dragLastPos, top, m_dragLastPos, top + ch ); + } + dc.DrawLine( x, top, x, top + ch ); + m_dragLastPos = x; +} + +void wxGrid::DoUpdateResizeColWidth(int w) +{ + DoUpdateResizeCol(GetColLeft(m_dragRowOrCol) + w); +} + +void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event ) +{ + int x; + CalcUnscrolledPosition( event.GetPosition().x, 0, &x, NULL ); + + int col = XToCol(x); + if ( event.Dragging() ) + { + if (!m_isDragging) + { + m_isDragging = true; + + if ( m_cursorMode == WXGRID_CURSOR_MOVE_COL && col != -1 ) + DoStartMoveCol(col); + } + + if ( event.LeftIsDown() ) + { + switch ( m_cursorMode ) + { + case WXGRID_CURSOR_RESIZE_COL: + DoUpdateResizeCol(x); + break; + + case WXGRID_CURSOR_SELECT_COL: + { + if ( col != -1 ) + { + if ( m_selection ) + m_selection->SelectCol(col, event); + } + } + break; + + case WXGRID_CURSOR_MOVE_COL: + { + int posNew = XToPos(x); + int colNew = GetColAt(posNew); + + // determine the position of the drop marker + int markerX; + if ( x >= GetColLeft(colNew) + (GetColWidth(colNew) / 2) ) + markerX = GetColRight(colNew); + else + markerX = GetColLeft(colNew); + + if ( markerX != m_dragLastPos ) + { + wxClientDC dc( GetColLabelWindow() ); + DoPrepareDC(dc); + + int cw, ch; + GetColLabelWindow()->GetClientSize( &cw, &ch ); + + markerX++; + + //Clean up the last indicator + if ( m_dragLastPos >= 0 ) + { + wxPen pen( GetColLabelWindow()->GetBackgroundColour(), 2 ); + dc.SetPen(pen); + dc.DrawLine( m_dragLastPos + 1, 0, m_dragLastPos + 1, ch ); + dc.SetPen(wxNullPen); + + if ( XToCol( m_dragLastPos ) != -1 ) + DrawColLabel( dc, XToCol( m_dragLastPos ) ); + } + + const wxColour *color; + //Moving to the same place? Don't draw a marker + if ( colNew == m_dragRowOrCol ) + color = wxLIGHT_GREY; + else + color = wxBLUE; + + //Draw the marker + wxPen pen( *color, 2 ); + dc.SetPen(pen); + + dc.DrawLine( markerX, 0, markerX, ch ); + + dc.SetPen(wxNullPen); + + m_dragLastPos = markerX - 1; + } + } + break; + + // default label to suppress warnings about "enumeration value + // 'xxx' not handled in switch + default: + break; + } + } + return; + } + + if ( m_isDragging && (event.Entering() || event.Leaving()) ) + return; + + if (m_isDragging) + m_isDragging = false; + + // ------------ Entering or leaving the window + // + if ( event.Entering() || event.Leaving() ) + { + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL, GetColLabelWindow()); + } + + // ------------ Left button pressed + // + else if ( event.LeftDown() ) + { + int colEdge = XToEdgeOfCol(x); + if ( colEdge != wxNOT_FOUND && CanDragColSize(colEdge) ) + { + ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, GetColLabelWindow()); + } + else // not a request to start resizing + { + if ( col >= 0 && + !SendEvent( wxEVT_GRID_LABEL_LEFT_CLICK, -1, col, event ) ) + { + if ( m_canDragColMove ) + { + //Show button as pressed + wxClientDC dc( GetColLabelWindow() ); + int colLeft = GetColLeft( col ); + int colRight = GetColRight( col ) - 1; + dc.SetPen( wxPen( GetColLabelWindow()->GetBackgroundColour(), 1 ) ); + dc.DrawLine( colLeft, 1, colLeft, m_colLabelHeight-1 ); + dc.DrawLine( colLeft, 1, colRight, 1 ); + + ChangeCursorMode(WXGRID_CURSOR_MOVE_COL, GetColLabelWindow()); + } + else + { + if ( !event.ShiftDown() && !event.CmdDown() ) + ClearSelection(); + if ( m_selection ) + { + if ( event.ShiftDown() ) + { + m_selection->SelectBlock + ( + 0, m_currentCellCoords.GetCol(), + GetNumberRows() - 1, col, + event + ); + } + else + { + m_selection->SelectCol(col, event); + } + } + + ChangeCursorMode(WXGRID_CURSOR_SELECT_COL, GetColLabelWindow()); + } + } + } + } + + // ------------ Left double click + // + if ( event.LeftDClick() ) + { + const int colEdge = XToEdgeOfCol(x); + if ( colEdge == -1 ) + { + if ( col >= 0 && + ! SendEvent( wxEVT_GRID_LABEL_LEFT_DCLICK, -1, col, event ) ) + { + // no default action at the moment + } + } + else + { + // adjust column width depending on label text + // + // TODO: generate RESIZING event, see #10754 + if ( !SendGridSizeEvent(wxEVT_GRID_COL_AUTO_SIZE, -1, colEdge, event) ) + AutoSizeColLabelSize( colEdge ); + + SendGridSizeEvent(wxEVT_GRID_COL_SIZE, -1, colEdge, event); + + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL, GetColLabelWindow()); + m_dragLastPos = -1; + } + } + + // ------------ Left button released + // + else if ( event.LeftUp() ) + { + switch ( m_cursorMode ) + { + case WXGRID_CURSOR_RESIZE_COL: + DoEndDragResizeCol(event); + break; + + case WXGRID_CURSOR_MOVE_COL: + if ( m_dragLastPos == -1 || col == m_dragRowOrCol ) + { + // the column didn't actually move anywhere + if ( col != -1 ) + DoColHeaderClick(col); + m_colWindow->Refresh(); // "unpress" the column + } + else + { + // get the position of the column we're over + int pos = XToPos(x); + + // insert the column being dragged either before or after + // it, depending on where exactly it was dropped, so + // find the index of the column we're over: notice + // that the existing "col" variable may be invalid but + // we need a valid one here + const int colValid = GetColAt(pos); + + // and check if we're on the "near" (usually left but right + // in RTL case) part of the column + bool onNearPart; + const int middle = GetColLeft(colValid) + + GetColWidth(colValid)/2; + if ( GetLayoutDirection() == wxLayout_LeftToRight ) + onNearPart = (x <= middle); + else // wxLayout_RightToLeft + onNearPart = (x > middle); + + // adjust for the column being dragged itself + if ( pos < GetColPos(m_dragRowOrCol) ) + pos++; + + // and if it's on the near part of the target column, + // insert it before it, not after + if ( onNearPart ) + pos--; + + DoEndMoveCol(pos); + } + break; + + case WXGRID_CURSOR_SELECT_COL: + case WXGRID_CURSOR_SELECT_CELL: + case WXGRID_CURSOR_RESIZE_ROW: + case WXGRID_CURSOR_SELECT_ROW: + if ( col != -1 ) + DoColHeaderClick(col); + break; + } + + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL, GetColLabelWindow()); + m_dragLastPos = -1; + } + + // ------------ Right button down + // + else if ( event.RightDown() ) + { + if ( col >= 0 && + !SendEvent( wxEVT_GRID_LABEL_RIGHT_CLICK, -1, col, event ) ) + { + // no default action at the moment + } + } + + // ------------ Right double click + // + else if ( event.RightDClick() ) + { + if ( col >= 0 && + !SendEvent( wxEVT_GRID_LABEL_RIGHT_DCLICK, -1, col, event ) ) + { + // no default action at the moment + } + } + + // ------------ No buttons down and mouse moving + // + else if ( event.Moving() ) + { + m_dragRowOrCol = XToEdgeOfCol( x ); + if ( m_dragRowOrCol >= 0 ) + { + if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) + { + if ( CanDragColSize(m_dragRowOrCol) ) + ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, GetColLabelWindow(), false); + } + } + else if ( m_cursorMode != WXGRID_CURSOR_SELECT_CELL ) + { + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL, GetColLabelWindow(), false); + } + } +} + +void wxGrid::ProcessCornerLabelMouseEvent( wxMouseEvent& event ) +{ + if ( event.LeftDown() ) + { + // indicate corner label by having both row and + // col args == -1 + // + if ( !SendEvent( wxEVT_GRID_LABEL_LEFT_CLICK, -1, -1, event ) ) + { + SelectAll(); + } + } + else if ( event.LeftDClick() ) + { + SendEvent( wxEVT_GRID_LABEL_LEFT_DCLICK, -1, -1, event ); + } + else if ( event.RightDown() ) + { + if ( !SendEvent( wxEVT_GRID_LABEL_RIGHT_CLICK, -1, -1, event ) ) + { + // no default action at the moment + } + } + else if ( event.RightDClick() ) + { + if ( !SendEvent( wxEVT_GRID_LABEL_RIGHT_DCLICK, -1, -1, event ) ) + { + // no default action at the moment + } + } +} + +void wxGrid::CancelMouseCapture() +{ + // cancel operation currently in progress, whatever it is + if ( m_winCapture ) + { + m_isDragging = false; + m_startDragPos = wxDefaultPosition; + + m_cursorMode = WXGRID_CURSOR_SELECT_CELL; + m_winCapture->SetCursor( *wxSTANDARD_CURSOR ); + m_winCapture = NULL; + + // remove traces of whatever we drew on screen + Refresh(); + } +} + +void wxGrid::ChangeCursorMode(CursorMode mode, + wxWindow *win, + bool captureMouse) +{ +#if wxUSE_LOG_TRACE + static const wxChar *const cursorModes[] = + { + wxT("SELECT_CELL"), + wxT("RESIZE_ROW"), + wxT("RESIZE_COL"), + wxT("SELECT_ROW"), + wxT("SELECT_COL"), + wxT("MOVE_COL"), + }; + + wxLogTrace(wxT("grid"), + wxT("wxGrid cursor mode (mouse capture for %s): %s -> %s"), + win == m_colWindow ? wxT("colLabelWin") + : win ? wxT("rowLabelWin") + : wxT("gridWin"), + cursorModes[m_cursorMode], cursorModes[mode]); +#endif // wxUSE_LOG_TRACE + + if ( mode == m_cursorMode && + win == m_winCapture && + captureMouse == (m_winCapture != NULL)) + return; + + if ( !win ) + { + // by default use the grid itself + win = m_gridWin; + } + + if ( m_winCapture ) + { + m_winCapture->ReleaseMouse(); + m_winCapture = NULL; + } + + m_cursorMode = mode; + + switch ( m_cursorMode ) + { + case WXGRID_CURSOR_RESIZE_ROW: + win->SetCursor( m_rowResizeCursor ); + break; + + case WXGRID_CURSOR_RESIZE_COL: + win->SetCursor( m_colResizeCursor ); + break; + + case WXGRID_CURSOR_MOVE_COL: + win->SetCursor( wxCursor(wxCURSOR_HAND) ); + break; + + default: + win->SetCursor( *wxSTANDARD_CURSOR ); + break; + } + + // we need to capture mouse when resizing + bool resize = m_cursorMode == WXGRID_CURSOR_RESIZE_ROW || + m_cursorMode == WXGRID_CURSOR_RESIZE_COL; + + if ( captureMouse && resize ) + { + win->CaptureMouse(); + m_winCapture = win; + } +} + +// ---------------------------------------------------------------------------- +// grid mouse event processing +// ---------------------------------------------------------------------------- + +bool +wxGrid::DoGridCellDrag(wxMouseEvent& event, + const wxGridCellCoords& coords, + bool isFirstDrag) +{ + bool performDefault = true ; + + if ( coords == wxGridNoCellCoords ) + return performDefault; // we're outside any valid cell + + // Hide the edit control, so it won't interfere with drag-shrinking. + if ( IsCellEditControlShown() ) + { + HideCellEditControl(); + SaveEditControlValue(); + } + + switch ( event.GetModifiers() ) + { + case wxMOD_CONTROL: + if ( m_selectedBlockCorner == wxGridNoCellCoords) + m_selectedBlockCorner = coords; + UpdateBlockBeingSelected(m_selectedBlockCorner, coords); + break; + + case wxMOD_NONE: + if ( CanDragCell() ) + { + if ( isFirstDrag ) + { + if ( m_selectedBlockCorner == wxGridNoCellCoords) + m_selectedBlockCorner = coords; + + // if event is handled by user code, no further processing + if ( SendEvent(wxEVT_GRID_CELL_BEGIN_DRAG, coords, event) != 0 ) + performDefault = false; + + return performDefault; + } + } + + UpdateBlockBeingSelected(m_currentCellCoords, coords); + break; + + default: + // we don't handle the other key modifiers + event.Skip(); + } + + return performDefault; +} + +void wxGrid::DoGridLineDrag(wxMouseEvent& event, const wxGridOperations& oper) +{ + wxClientDC dc(m_gridWin); + PrepareDC(dc); + dc.SetLogicalFunction(wxINVERT); + + const wxRect rectWin(CalcUnscrolledPosition(wxPoint(0, 0)), + m_gridWin->GetClientSize()); + + // erase the previously drawn line, if any + if ( m_dragLastPos >= 0 ) + oper.DrawParallelLineInRect(dc, rectWin, m_dragLastPos); + + // we need the vertical position for rows and horizontal for columns here + m_dragLastPos = oper.Dual().Select(CalcUnscrolledPosition(event.GetPosition())); + + // don't allow resizing beneath the minimal size + const int posMin = oper.GetLineStartPos(this, m_dragRowOrCol) + + oper.GetMinimalLineSize(this, m_dragRowOrCol); + if ( m_dragLastPos < posMin ) + m_dragLastPos = posMin; + + // and draw it at the new position + oper.DrawParallelLineInRect(dc, rectWin, m_dragLastPos); +} + +void wxGrid::DoGridDragEvent(wxMouseEvent& event, const wxGridCellCoords& coords) +{ + if ( !m_isDragging ) + { + // Don't start doing anything until the mouse has been dragged far + // enough + const wxPoint& pt = event.GetPosition(); + if ( m_startDragPos == wxDefaultPosition ) + { + m_startDragPos = pt; + return; + } + + if ( abs(m_startDragPos.x - pt.x) <= DRAG_SENSITIVITY && + abs(m_startDragPos.y - pt.y) <= DRAG_SENSITIVITY ) + return; + } + + const bool isFirstDrag = !m_isDragging; + m_isDragging = true; + + switch ( m_cursorMode ) + { + case WXGRID_CURSOR_SELECT_CELL: + // no further handling if handled by user + if ( DoGridCellDrag(event, coords, isFirstDrag) == false ) + return; + break; + + case WXGRID_CURSOR_RESIZE_ROW: + DoGridLineDrag(event, wxGridRowOperations()); + break; + + case WXGRID_CURSOR_RESIZE_COL: + DoGridLineDrag(event, wxGridColumnOperations()); + break; + + default: + event.Skip(); + } + + if ( isFirstDrag ) + { + wxASSERT_MSG( !m_winCapture, "shouldn't capture the mouse twice" ); + + m_winCapture = m_gridWin; + m_winCapture->CaptureMouse(); + } +} + +void +wxGrid::DoGridCellLeftDown(wxMouseEvent& event, + const wxGridCellCoords& coords, + const wxPoint& pos) +{ + if ( SendEvent(wxEVT_GRID_CELL_LEFT_CLICK, coords, event) ) + { + // event handled by user code, no need to do anything here + return; + } + + if ( !event.CmdDown() ) + ClearSelection(); + + if ( event.ShiftDown() ) + { + if ( m_selection ) + { + m_selection->SelectBlock(m_currentCellCoords, coords, event); + m_selectedBlockCorner = coords; + } + } + else if ( XToEdgeOfCol(pos.x) < 0 && YToEdgeOfRow(pos.y) < 0 ) + { + DisableCellEditControl(); + MakeCellVisible( coords ); + + if ( event.CmdDown() ) + { + if ( m_selection ) + { + m_selection->ToggleCellSelection(coords, event); + } + + m_selectedBlockTopLeft = wxGridNoCellCoords; + m_selectedBlockBottomRight = wxGridNoCellCoords; + m_selectedBlockCorner = coords; + } + else + { + if ( m_selection ) + { + // In row or column selection mode just clicking on the cell + // should select the row or column containing it: this is more + // convenient for the kinds of controls that use such selection + // mode and is compatible with 2.8 behaviour (see #12062). + switch ( m_selection->GetSelectionMode() ) + { + case wxGridSelectCells: + case wxGridSelectRowsOrColumns: + // nothing to do in these cases + break; + + case wxGridSelectRows: + m_selection->SelectRow(coords.GetRow()); + break; + + case wxGridSelectColumns: + m_selection->SelectCol(coords.GetCol()); + break; + } + } + + m_waitForSlowClick = m_currentCellCoords == coords && + coords != wxGridNoCellCoords; + SetCurrentCell( coords ); + } + } +} + +void +wxGrid::DoGridCellLeftDClick(wxMouseEvent& event, + const wxGridCellCoords& coords, + const wxPoint& pos) +{ + if ( XToEdgeOfCol(pos.x) < 0 && YToEdgeOfRow(pos.y) < 0 ) + { + if ( !SendEvent(wxEVT_GRID_CELL_LEFT_DCLICK, coords, event) ) + { + // we want double click to select a cell and start editing + // (i.e. to behave in same way as sequence of two slow clicks): + m_waitForSlowClick = true; + } + } +} + +void +wxGrid::DoGridCellLeftUp(wxMouseEvent& event, const wxGridCellCoords& coords) +{ + if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) + { + if (m_winCapture) + { + m_winCapture->ReleaseMouse(); + m_winCapture = NULL; + } + + if ( coords == m_currentCellCoords && m_waitForSlowClick && CanEnableCellControl() ) + { + ClearSelection(); + EnableCellEditControl(); + + wxGridCellAttr *attr = GetCellAttr(coords); + wxGridCellEditor *editor = attr->GetEditor(this, coords.GetRow(), coords.GetCol()); + editor->StartingClick(); + editor->DecRef(); + attr->DecRef(); + + m_waitForSlowClick = false; + } + else if ( m_selectedBlockTopLeft != wxGridNoCellCoords && + m_selectedBlockBottomRight != wxGridNoCellCoords ) + { + if ( m_selection ) + { + m_selection->SelectBlock( m_selectedBlockTopLeft, + m_selectedBlockBottomRight, + event ); + } + + m_selectedBlockTopLeft = wxGridNoCellCoords; + m_selectedBlockBottomRight = wxGridNoCellCoords; + + // Show the edit control, if it has been hidden for + // drag-shrinking. + ShowCellEditControl(); + } + } + else if ( m_cursorMode == WXGRID_CURSOR_RESIZE_ROW ) + { + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL); + DoEndDragResizeRow(event); + } + else if ( m_cursorMode == WXGRID_CURSOR_RESIZE_COL ) + { + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL); + DoEndDragResizeCol(event); + } + + m_dragLastPos = -1; +} + +void +wxGrid::DoGridMouseMoveEvent(wxMouseEvent& WXUNUSED(event), + const wxGridCellCoords& coords, + const wxPoint& pos) +{ + if ( coords.GetRow() < 0 || coords.GetCol() < 0 ) + { + // out of grid cell area + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL); + return; + } + + int dragRow = YToEdgeOfRow( pos.y ); + int dragCol = XToEdgeOfCol( pos.x ); + + // Dragging on the corner of a cell to resize in both + // directions is not implemented yet... + // + if ( dragRow >= 0 && dragCol >= 0 ) + { + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL); + return; + } + + if ( dragRow >= 0 && CanDragGridSize() && CanDragRowSize(dragRow) ) + { + if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) + { + m_dragRowOrCol = dragRow; + ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, NULL, false); + } + } + // When using the native header window we can only resize the columns by + // dragging the dividers in it because we can't make it enter into the + // column resizing mode programmatically + else if ( dragCol >= 0 && !m_useNativeHeader && + CanDragGridSize() && CanDragColSize(dragCol) ) + { + if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) + { + m_dragRowOrCol = dragCol; + ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, NULL, false); + } + } + else // Neither on a row or col edge + { + if ( m_cursorMode != WXGRID_CURSOR_SELECT_CELL ) + { + ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL); + } + } +} + +void wxGrid::ProcessGridCellMouseEvent(wxMouseEvent& event) +{ + if ( event.Entering() || event.Leaving() ) + { + // we don't care about these events but we must not reset m_isDragging + // if they happen so return before anything else is done + event.Skip(); + return; + } + + const wxPoint pos = CalcUnscrolledPosition(event.GetPosition()); + + // coordinates of the cell under mouse + wxGridCellCoords coords = XYToCell(pos); + + int cell_rows, cell_cols; + GetCellSize( coords.GetRow(), coords.GetCol(), &cell_rows, &cell_cols ); + if ( (cell_rows < 0) || (cell_cols < 0) ) + { + coords.SetRow(coords.GetRow() + cell_rows); + coords.SetCol(coords.GetCol() + cell_cols); + } + + if ( event.Dragging() ) + { + if ( event.LeftIsDown() ) + DoGridDragEvent(event, coords); + else + event.Skip(); + return; + } + + m_isDragging = false; + m_startDragPos = wxDefaultPosition; + + // deal with various button presses + if ( event.IsButton() ) + { + if ( coords != wxGridNoCellCoords ) + { + DisableCellEditControl(); + + if ( event.LeftDown() ) + DoGridCellLeftDown(event, coords, pos); + else if ( event.LeftDClick() ) + DoGridCellLeftDClick(event, coords, pos); + else if ( event.RightDown() ) + SendEvent(wxEVT_GRID_CELL_RIGHT_CLICK, coords, event); + else if ( event.RightDClick() ) + SendEvent(wxEVT_GRID_CELL_RIGHT_DCLICK, coords, event); + } + + // this one should be called even if we're not over any cell + if ( event.LeftUp() ) + { + DoGridCellLeftUp(event, coords); + } + } + else if ( event.Moving() ) + { + DoGridMouseMoveEvent(event, coords, pos); + } + else // unknown mouse event? + { + event.Skip(); + } +} + +// this function returns true only if the size really changed +bool wxGrid::DoEndDragResizeLine(const wxGridOperations& oper) +{ + if ( m_dragLastPos == -1 ) + return false; + + const wxGridOperations& doper = oper.Dual(); + + const wxSize size = m_gridWin->GetClientSize(); + + const wxPoint ptOrigin = CalcUnscrolledPosition(wxPoint(0, 0)); + + // erase the last line we drew + wxClientDC dc(m_gridWin); + PrepareDC(dc); + dc.SetLogicalFunction(wxINVERT); + + const int posLineStart = oper.Select(ptOrigin); + const int posLineEnd = oper.Select(ptOrigin) + oper.Select(size); + + oper.DrawParallelLine(dc, posLineStart, posLineEnd, m_dragLastPos); + + // temporarily hide the edit control before resizing + HideCellEditControl(); + SaveEditControlValue(); + + // do resize the line + const int lineStart = oper.GetLineStartPos(this, m_dragRowOrCol); + const int lineSizeOld = oper.GetLineSize(this, m_dragRowOrCol); + oper.SetLineSize(this, m_dragRowOrCol, + wxMax(m_dragLastPos - lineStart, + oper.GetMinimalLineSize(this, m_dragRowOrCol))); + const bool + sizeChanged = oper.GetLineSize(this, m_dragRowOrCol) != lineSizeOld; + + m_dragLastPos = -1; + + // refresh now if we're not frozen + if ( !GetBatchCount() ) + { + // we need to refresh everything beyond the resized line in the header + // window + + // get the position from which to refresh in the other direction + wxRect rect(CellToRect(oper.MakeCoords(m_dragRowOrCol, 0))); + rect.SetPosition(CalcScrolledPosition(rect.GetPosition())); + + // we only need the ordinate (for rows) or abscissa (for columns) here, + // and need to cover the entire window in the other direction + oper.Select(rect) = 0; + + wxRect rectHeader(rect.GetPosition(), + oper.MakeSize + ( + oper.GetHeaderWindowSize(this), + doper.Select(size) - doper.Select(rect) + )); + + oper.GetHeaderWindow(this)->Refresh(true, &rectHeader); + + + // also refresh the grid window: extend the rectangle + if ( m_table ) + { + oper.SelectSize(rect) = oper.Select(size); + + int subtractLines = 0; + int line = doper.PosToLine(this, posLineStart); + if ( line >= 0 ) + { + // ensure that if we have a multi-cell block we redraw all of + // it by increasing the refresh area to cover it entirely if a + // part of it is affected + const int lineEnd = doper.PosToLine(this, posLineEnd, true); + for ( ; line < lineEnd; line++ ) + { + int cellLines = oper.Select( + GetCellSize(oper.MakeCoords(m_dragRowOrCol, line))); + if ( cellLines < subtractLines ) + subtractLines = cellLines; + } + } + + int startPos = + oper.GetLineStartPos(this, m_dragRowOrCol + subtractLines); + startPos = doper.CalcScrolledPosition(this, startPos); + + doper.Select(rect) = startPos; + doper.SelectSize(rect) = doper.Select(size) - startPos; + + m_gridWin->Refresh(false, &rect); + } + } + + // show the edit control back again + ShowCellEditControl(); + + return sizeChanged; +} + +void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event) +{ + // TODO: generate RESIZING event, see #10754 + + if ( DoEndDragResizeLine(wxGridRowOperations()) ) + SendGridSizeEvent(wxEVT_GRID_ROW_SIZE, m_dragRowOrCol, -1, event); +} + +void wxGrid::DoEndDragResizeCol(const wxMouseEvent& event) +{ + // TODO: generate RESIZING event, see #10754 + + if ( DoEndDragResizeLine(wxGridColumnOperations()) ) + SendGridSizeEvent(wxEVT_GRID_COL_SIZE, -1, m_dragRowOrCol, event); +} + +void wxGrid::DoStartMoveCol(int col) +{ + m_dragRowOrCol = col; +} + +void wxGrid::DoEndMoveCol(int pos) +{ + wxASSERT_MSG( m_dragRowOrCol != -1, "no matching DoStartMoveCol?" ); + + if ( SendEvent(wxEVT_GRID_COL_MOVE, -1, m_dragRowOrCol) != -1 ) + SetColPos(m_dragRowOrCol, pos); + //else: vetoed by user + + m_dragRowOrCol = -1; +} + +void wxGrid::RefreshAfterColPosChange() +{ + // recalculate the column rights as the column positions have changed, + // unless we calculate them dynamically because all columns widths are the + // same and it's easy to do + if ( !m_colWidths.empty() ) + { + int colRight = 0; + for ( int colPos = 0; colPos < m_numCols; colPos++ ) + { + int colID = GetColAt( colPos ); + + // Ignore the currently hidden columns. + const int width = m_colWidths[colID]; + if ( width > 0 ) + colRight += width; + + m_colRights[colID] = colRight; + } + } + + // and make the changes visible + if ( m_useNativeHeader ) + { + if ( m_colAt.empty() ) + GetGridColHeader()->ResetColumnsOrder(); + else + GetGridColHeader()->SetColumnsOrder(m_colAt); + } + else + { + m_colWindow->Refresh(); + } + m_gridWin->Refresh(); +} + +void wxGrid::SetColumnsOrder(const wxArrayInt& order) +{ + m_colAt = order; + + RefreshAfterColPosChange(); +} + +void wxGrid::SetColPos(int idx, int pos) +{ + // we're going to need m_colAt now, initialize it if needed + if ( m_colAt.empty() ) + { + m_colAt.reserve(m_numCols); + for ( int i = 0; i < m_numCols; i++ ) + m_colAt.push_back(i); + } + + wxHeaderCtrl::MoveColumnInOrderArray(m_colAt, idx, pos); + + RefreshAfterColPosChange(); +} + +void wxGrid::ResetColPos() +{ + m_colAt.clear(); + + RefreshAfterColPosChange(); +} + +void wxGrid::EnableDragColMove( bool enable ) +{ + if ( m_canDragColMove == enable ) + return; + + if ( m_useNativeHeader ) + { + // update all columns to make them [not] reorderable + GetGridColHeader()->SetColumnCount(m_numCols); + } + + m_canDragColMove = enable; + + // we use to call ResetColPos() from here if !enable but this doesn't seem + // right as it would mean there would be no way to "freeze" the current + // columns order by disabling moving them after putting them in the desired + // order, whereas now you can always call ResetColPos() manually if needed +} + + +// +// ------ interaction with data model +// +bool wxGrid::ProcessTableMessage( wxGridTableMessage& msg ) +{ + switch ( msg.GetId() ) + { + case wxGRIDTABLE_REQUEST_VIEW_GET_VALUES: + return GetModelValues(); + + case wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES: + return SetModelValues(); + + case wxGRIDTABLE_NOTIFY_ROWS_INSERTED: + case wxGRIDTABLE_NOTIFY_ROWS_APPENDED: + case wxGRIDTABLE_NOTIFY_ROWS_DELETED: + case wxGRIDTABLE_NOTIFY_COLS_INSERTED: + case wxGRIDTABLE_NOTIFY_COLS_APPENDED: + case wxGRIDTABLE_NOTIFY_COLS_DELETED: + return Redimension( msg ); + + default: + return false; + } +} + +// The behaviour of this function depends on the grid table class +// Clear() function. For the default wxGridStringTable class the +// behaviour is to replace all cell contents with wxEmptyString but +// not to change the number of rows or cols. +// +void wxGrid::ClearGrid() +{ + if ( m_table ) + { + if (IsCellEditControlEnabled()) + DisableCellEditControl(); + + m_table->Clear(); + if (!GetBatchCount()) + m_gridWin->Refresh(); + } +} + +bool +wxGrid::DoModifyLines(bool (wxGridTableBase::*funcModify)(size_t, size_t), + int pos, int num, bool WXUNUSED(updateLabels) ) +{ + wxCHECK_MSG( m_created, false, "must finish creating the grid first" ); + + if ( !m_table ) + return false; + + if ( IsCellEditControlEnabled() ) + DisableCellEditControl(); + + return (m_table->*funcModify)(pos, num); + + // the table will have sent the results of the insert row + // operation to this view object as a grid table message +} + +bool +wxGrid::DoAppendLines(bool (wxGridTableBase::*funcAppend)(size_t), + int num, bool WXUNUSED(updateLabels)) +{ + wxCHECK_MSG( m_created, false, "must finish creating the grid first" ); + + if ( !m_table ) + return false; + + return (m_table->*funcAppend)(num); +} + +// ---------------------------------------------------------------------------- +// event generation helpers +// ---------------------------------------------------------------------------- + +bool +wxGrid::SendGridSizeEvent(wxEventType type, + int row, int col, + const wxMouseEvent& mouseEv) +{ + int rowOrCol = row == -1 ? col : row; + + wxGridSizeEvent gridEvt( GetId(), + type, + this, + rowOrCol, + mouseEv.GetX() + GetRowLabelSize(), + mouseEv.GetY() + GetColLabelSize(), + mouseEv); + + return GetEventHandler()->ProcessEvent(gridEvt); +} + +// Generate a grid event based on a mouse event and return: +// -1 if the event was vetoed +// +1 if the event was processed (but not vetoed) +// 0 if the event wasn't handled +int +wxGrid::SendEvent(const wxEventType type, + int row, int col, + const wxMouseEvent& mouseEv) +{ + bool claimed, vetoed; + + if ( type == wxEVT_GRID_RANGE_SELECT ) + { + // Right now, it should _never_ end up here! + wxGridRangeSelectEvent gridEvt( GetId(), + type, + this, + m_selectedBlockTopLeft, + m_selectedBlockBottomRight, + true, + mouseEv); + + claimed = GetEventHandler()->ProcessEvent(gridEvt); + vetoed = !gridEvt.IsAllowed(); + } + else if ( type == wxEVT_GRID_LABEL_LEFT_CLICK || + type == wxEVT_GRID_LABEL_LEFT_DCLICK || + type == wxEVT_GRID_LABEL_RIGHT_CLICK || + type == wxEVT_GRID_LABEL_RIGHT_DCLICK ) + { + wxPoint pos = mouseEv.GetPosition(); + + if ( mouseEv.GetEventObject() == GetGridRowLabelWindow() ) + pos.y += GetColLabelSize(); + if ( mouseEv.GetEventObject() == GetGridColLabelWindow() ) + pos.x += GetRowLabelSize(); + + wxGridEvent gridEvt( GetId(), + type, + this, + row, col, + pos.x, + pos.y, + false, + mouseEv); + claimed = GetEventHandler()->ProcessEvent(gridEvt); + vetoed = !gridEvt.IsAllowed(); + } + else + { + wxGridEvent gridEvt( GetId(), + type, + this, + row, col, + mouseEv.GetX() + GetRowLabelSize(), + mouseEv.GetY() + GetColLabelSize(), + false, + mouseEv); + + if ( type == wxEVT_GRID_CELL_BEGIN_DRAG ) + { + // by default the dragging is not supported, the user code must + // explicitly allow the event for it to take place + gridEvt.Veto(); + } + + claimed = GetEventHandler()->ProcessEvent(gridEvt); + vetoed = !gridEvt.IsAllowed(); + } + + // A Veto'd event may not be `claimed' so test this first + if (vetoed) + return -1; + + return claimed ? 1 : 0; +} + +// Generate a grid event of specified type, return value same as above +// +int +wxGrid::SendEvent(const wxEventType type, int row, int col, const wxString& s) +{ + wxGridEvent gridEvt( GetId(), type, this, row, col ); + gridEvt.SetString(s); + + const bool claimed = GetEventHandler()->ProcessEvent(gridEvt); + + // A Veto'd event may not be `claimed' so test this first + if ( !gridEvt.IsAllowed() ) + return -1; + + return claimed ? 1 : 0; +} + +void wxGrid::OnPaint( wxPaintEvent& WXUNUSED(event) ) +{ + // needed to prevent zillions of paint events on MSW + wxPaintDC dc(this); +} + +void wxGrid::Refresh(bool eraseb, const wxRect* rect) +{ + // Don't do anything if between Begin/EndBatch... + // EndBatch() will do all this on the last nested one anyway. + if ( m_created && !GetBatchCount() ) + { + // Refresh to get correct scrolled position: + wxScrolledWindow::Refresh(eraseb, rect); + + if (rect) + { + int rect_x, rect_y, rectWidth, rectHeight; + int width_label, width_cell, height_label, height_cell; + int x, y; + + // Copy rectangle can get scroll offsets.. + rect_x = rect->GetX(); + rect_y = rect->GetY(); + rectWidth = rect->GetWidth(); + rectHeight = rect->GetHeight(); + + width_label = m_rowLabelWidth - rect_x; + if (width_label > rectWidth) + width_label = rectWidth; + + height_label = m_colLabelHeight - rect_y; + if (height_label > rectHeight) + height_label = rectHeight; + + if (rect_x > m_rowLabelWidth) + { + x = rect_x - m_rowLabelWidth; + width_cell = rectWidth; + } + else + { + x = 0; + width_cell = rectWidth - (m_rowLabelWidth - rect_x); + } + + if (rect_y > m_colLabelHeight) + { + y = rect_y - m_colLabelHeight; + height_cell = rectHeight; + } + else + { + y = 0; + height_cell = rectHeight - (m_colLabelHeight - rect_y); + } + + // Paint corner label part intersecting rect. + if ( width_label > 0 && height_label > 0 ) + { + wxRect anotherrect(rect_x, rect_y, width_label, height_label); + m_cornerLabelWin->Refresh(eraseb, &anotherrect); + } + + // Paint col labels part intersecting rect. + if ( width_cell > 0 && height_label > 0 ) + { + wxRect anotherrect(x, rect_y, width_cell, height_label); + m_colWindow->Refresh(eraseb, &anotherrect); + } + + // Paint row labels part intersecting rect. + if ( width_label > 0 && height_cell > 0 ) + { + wxRect anotherrect(rect_x, y, width_label, height_cell); + m_rowLabelWin->Refresh(eraseb, &anotherrect); + } + + // Paint cell area part intersecting rect. + if ( width_cell > 0 && height_cell > 0 ) + { + wxRect anotherrect(x, y, width_cell, height_cell); + m_gridWin->Refresh(eraseb, &anotherrect); + } + } + else + { + m_cornerLabelWin->Refresh(eraseb, NULL); + m_colWindow->Refresh(eraseb, NULL); + m_rowLabelWin->Refresh(eraseb, NULL); + m_gridWin->Refresh(eraseb, NULL); + } + } +} + +void wxGrid::OnSize(wxSizeEvent& WXUNUSED(event)) +{ + if (m_targetWindow != this) // check whether initialisation has been done + { + // reposition our children windows + CalcWindowSizes(); + } +} + +void wxGrid::OnKeyDown( wxKeyEvent& event ) +{ + if ( m_inOnKeyDown ) + { + // shouldn't be here - we are going round in circles... + // + wxFAIL_MSG( wxT("wxGrid::OnKeyDown called while already active") ); + } + + m_inOnKeyDown = true; + + // propagate the event up and see if it gets processed + wxWindow *parent = GetParent(); + wxKeyEvent keyEvt( event ); + keyEvt.SetEventObject( parent ); + + if ( !parent->GetEventHandler()->ProcessEvent( keyEvt ) ) + { + if (GetLayoutDirection() == wxLayout_RightToLeft) + { + if (event.GetKeyCode() == WXK_RIGHT) + event.m_keyCode = WXK_LEFT; + else if (event.GetKeyCode() == WXK_LEFT) + event.m_keyCode = WXK_RIGHT; + } + + // try local handlers + switch ( event.GetKeyCode() ) + { + case WXK_UP: + if ( event.ControlDown() ) + MoveCursorUpBlock( event.ShiftDown() ); + else + MoveCursorUp( event.ShiftDown() ); + break; + + case WXK_DOWN: + if ( event.ControlDown() ) + MoveCursorDownBlock( event.ShiftDown() ); + else + MoveCursorDown( event.ShiftDown() ); + break; + + case WXK_LEFT: + if ( event.ControlDown() ) + MoveCursorLeftBlock( event.ShiftDown() ); + else + MoveCursorLeft( event.ShiftDown() ); + break; + + case WXK_RIGHT: + if ( event.ControlDown() ) + MoveCursorRightBlock( event.ShiftDown() ); + else + MoveCursorRight( event.ShiftDown() ); + break; + + case WXK_RETURN: + case WXK_NUMPAD_ENTER: + if ( event.ControlDown() ) + { + event.Skip(); // to let the edit control have the return + } + else + { + if ( GetGridCursorRow() < GetNumberRows()-1 ) + { + MoveCursorDown( event.ShiftDown() ); + } + else + { + // at the bottom of a column + DisableCellEditControl(); + } + } + break; + + case WXK_ESCAPE: + ClearSelection(); + break; + + case WXK_TAB: + { + // send an event to the grid's parents for custom handling + wxGridEvent gridEvt(GetId(), wxEVT_GRID_TABBING, this, + GetGridCursorRow(), GetGridCursorCol(), + -1, -1, false, event); + if ( ProcessWindowEvent(gridEvt) ) + { + // the event has been handled so no need for more processing + break; + } + } + DoGridProcessTab( event ); + break; + + case WXK_HOME: + GoToCell(event.ControlDown() ? 0 + : m_currentCellCoords.GetRow(), + 0); + break; + + case WXK_END: + GoToCell(event.ControlDown() ? m_numRows - 1 + : m_currentCellCoords.GetRow(), + m_numCols - 1); + break; + + case WXK_PAGEUP: + MovePageUp(); + break; + + case WXK_PAGEDOWN: + MovePageDown(); + break; + + case WXK_SPACE: + // Ctrl-Space selects the current column, Shift-Space -- the + // current row and Ctrl-Shift-Space -- everything + switch ( m_selection ? event.GetModifiers() : wxMOD_NONE ) + { + case wxMOD_CONTROL: + m_selection->SelectCol(m_currentCellCoords.GetCol()); + break; + + case wxMOD_SHIFT: + m_selection->SelectRow(m_currentCellCoords.GetRow()); + break; + + case wxMOD_CONTROL | wxMOD_SHIFT: + m_selection->SelectBlock(0, 0, + m_numRows - 1, m_numCols - 1); + break; + + case wxMOD_NONE: + if ( !IsEditable() ) + { + MoveCursorRight(false); + break; + } + //else: fall through + + default: + event.Skip(); + } + break; + + default: + event.Skip(); + break; + } + } + + m_inOnKeyDown = false; +} + +void wxGrid::OnKeyUp( wxKeyEvent& event ) +{ + // try local handlers + // + if ( event.GetKeyCode() == WXK_SHIFT ) + { + if ( m_selectedBlockTopLeft != wxGridNoCellCoords && + m_selectedBlockBottomRight != wxGridNoCellCoords ) + { + if ( m_selection ) + { + m_selection->SelectBlock( + m_selectedBlockTopLeft, + m_selectedBlockBottomRight, + event); + } + } + + m_selectedBlockTopLeft = wxGridNoCellCoords; + m_selectedBlockBottomRight = wxGridNoCellCoords; + m_selectedBlockCorner = wxGridNoCellCoords; + } +} + +void wxGrid::OnChar( wxKeyEvent& event ) +{ + // is it possible to edit the current cell at all? + if ( !IsCellEditControlEnabled() && CanEnableCellControl() ) + { + // yes, now check whether the cells editor accepts the key + int row = m_currentCellCoords.GetRow(); + int col = m_currentCellCoords.GetCol(); + wxGridCellAttr *attr = GetCellAttr(row, col); + wxGridCellEditor *editor = attr->GetEditor(this, row, col); + + // is special and will always start editing, for + // other keys - ask the editor itself + if ( (event.GetKeyCode() == WXK_F2 && !event.HasModifiers()) + || editor->IsAcceptedKey(event) ) + { + // ensure cell is visble + MakeCellVisible(row, col); + EnableCellEditControl(); + + // a problem can arise if the cell is not completely + // visible (even after calling MakeCellVisible the + // control is not created and calling StartingKey will + // crash the app + if ( event.GetKeyCode() != WXK_F2 && editor->IsCreated() && m_cellEditCtrlEnabled ) + editor->StartingKey(event); + } + else + { + event.Skip(); + } + + editor->DecRef(); + attr->DecRef(); + } + else + { + event.Skip(); + } +} + +void wxGrid::OnEraseBackground(wxEraseEvent&) +{ +} + +void wxGrid::DoGridProcessTab(wxKeyboardState& kbdState) +{ + const bool isForwardTab = !kbdState.ShiftDown(); + + // TAB processing only changes when we are at the borders of the grid, so + // let's first handle the common behaviour when we are not at the border. + if ( isForwardTab ) + { + if ( GetGridCursorCol() < GetNumberCols() - 1 ) + { + MoveCursorRight( false ); + return; + } + } + else // going back + { + if ( GetGridCursorCol() ) + { + MoveCursorLeft( false ); + return; + } + } + + + // We only get here if the cursor is at the border of the grid, apply the + // configured behaviour. + switch ( m_tabBehaviour ) + { + case Tab_Stop: + // Nothing special to do, we remain at the current cell. + break; + + case Tab_Wrap: + // Go to the beginning of the next or the end of the previous row. + if ( isForwardTab ) + { + if ( GetGridCursorRow() < GetNumberRows() - 1 ) + { + GoToCell( GetGridCursorRow() + 1, 0 ); + return; + } + } + else + { + if ( GetGridCursorRow() > 0 ) + { + GoToCell( GetGridCursorRow() - 1, GetNumberCols() - 1 ); + return; + } + } + break; + + case Tab_Leave: + if ( Navigate( isForwardTab ? wxNavigationKeyEvent::IsForward + : wxNavigationKeyEvent::IsBackward ) ) + return; + break; + } + + // If we remain in this cell, stop editing it if we were doing so. + DisableCellEditControl(); +} + +bool wxGrid::SetCurrentCell( const wxGridCellCoords& coords ) +{ + if ( SendEvent(wxEVT_GRID_SELECT_CELL, coords) == -1 ) + { + // the event has been vetoed - do nothing + return false; + } + +#if !defined(__WXMAC__) + wxClientDC dc( m_gridWin ); + PrepareDC( dc ); +#endif + + if ( m_currentCellCoords != wxGridNoCellCoords ) + { + DisableCellEditControl(); + + if ( IsVisible( m_currentCellCoords, false ) ) + { + wxRect r; + r = BlockToDeviceRect( m_currentCellCoords, m_currentCellCoords ); + if ( !m_gridLinesEnabled ) + { + r.x--; + r.y--; + r.width++; + r.height++; + } + + wxGridCellCoordsArray cells = CalcCellsExposed( r ); + + // Otherwise refresh redraws the highlight! + m_currentCellCoords = coords; + +#if defined(__WXMAC__) + m_gridWin->Refresh(true /*, & r */); +#else + DrawGridCellArea( dc, cells ); + DrawAllGridLines( dc, r ); +#endif + } + } + + m_currentCellCoords = coords; + + wxGridCellAttr *attr = GetCellAttr( coords ); +#if !defined(__WXMAC__) + DrawCellHighlight( dc, attr ); +#endif + attr->DecRef(); + + return true; +} + +void +wxGrid::UpdateBlockBeingSelected(int topRow, int leftCol, + int bottomRow, int rightCol) +{ + MakeCellVisible(m_selectedBlockCorner); + m_selectedBlockCorner = wxGridCellCoords(bottomRow, rightCol); + + if ( m_selection ) + { + switch ( m_selection->GetSelectionMode() ) + { + default: + wxFAIL_MSG( "unknown selection mode" ); + // fall through + + case wxGridSelectCells: + // arbitrary blocks selection allowed so just use the cell + // coordinates as is + break; + + case wxGridSelectRows: + // only full rows selection allowd, ensure that we do select + // full rows + leftCol = 0; + rightCol = GetNumberCols() - 1; + break; + + case wxGridSelectColumns: + // same as above but for columns + topRow = 0; + bottomRow = GetNumberRows() - 1; + break; + + case wxGridSelectRowsOrColumns: + // in this mode we can select only full rows or full columns so + // it doesn't make sense to select blocks at all (and we can't + // extend the block because there is no preferred direction, we + // could only extend it to cover the entire grid but this is + // not useful) + return; + } + } + + EnsureFirstLessThanSecond(topRow, bottomRow); + EnsureFirstLessThanSecond(leftCol, rightCol); + + wxGridCellCoords updateTopLeft = wxGridCellCoords(topRow, leftCol), + updateBottomRight = wxGridCellCoords(bottomRow, rightCol); + + // First the case that we selected a completely new area + if ( m_selectedBlockTopLeft == wxGridNoCellCoords || + m_selectedBlockBottomRight == wxGridNoCellCoords ) + { + wxRect rect; + rect = BlockToDeviceRect( wxGridCellCoords ( topRow, leftCol ), + wxGridCellCoords ( bottomRow, rightCol ) ); + m_gridWin->Refresh( false, &rect ); + } + + // Now handle changing an existing selection area. + else if ( m_selectedBlockTopLeft != updateTopLeft || + m_selectedBlockBottomRight != updateBottomRight ) + { + // Compute two optimal update rectangles: + // Either one rectangle is a real subset of the + // other, or they are (almost) disjoint! + wxRect rect[4]; + bool need_refresh[4]; + need_refresh[0] = + need_refresh[1] = + need_refresh[2] = + need_refresh[3] = false; + int i; + + // Store intermediate values + wxCoord oldLeft = m_selectedBlockTopLeft.GetCol(); + wxCoord oldTop = m_selectedBlockTopLeft.GetRow(); + wxCoord oldRight = m_selectedBlockBottomRight.GetCol(); + wxCoord oldBottom = m_selectedBlockBottomRight.GetRow(); + + // Determine the outer/inner coordinates. + EnsureFirstLessThanSecond(oldLeft, leftCol); + EnsureFirstLessThanSecond(oldTop, topRow); + EnsureFirstLessThanSecond(rightCol, oldRight); + EnsureFirstLessThanSecond(bottomRow, oldBottom); + + // Now, either the stuff marked old is the outer + // rectangle or we don't have a situation where one + // is contained in the other. + + if ( oldLeft < leftCol ) + { + // Refresh the newly selected or deselected + // area to the left of the old or new selection. + need_refresh[0] = true; + rect[0] = BlockToDeviceRect( + wxGridCellCoords( oldTop, oldLeft ), + wxGridCellCoords( oldBottom, leftCol - 1 ) ); + } + + if ( oldTop < topRow ) + { + // Refresh the newly selected or deselected + // area above the old or new selection. + need_refresh[1] = true; + rect[1] = BlockToDeviceRect( + wxGridCellCoords( oldTop, leftCol ), + wxGridCellCoords( topRow - 1, rightCol ) ); + } + + if ( oldRight > rightCol ) + { + // Refresh the newly selected or deselected + // area to the right of the old or new selection. + need_refresh[2] = true; + rect[2] = BlockToDeviceRect( + wxGridCellCoords( oldTop, rightCol + 1 ), + wxGridCellCoords( oldBottom, oldRight ) ); + } + + if ( oldBottom > bottomRow ) + { + // Refresh the newly selected or deselected + // area below the old or new selection. + need_refresh[3] = true; + rect[3] = BlockToDeviceRect( + wxGridCellCoords( bottomRow + 1, leftCol ), + wxGridCellCoords( oldBottom, rightCol ) ); + } + + // various Refresh() calls + for (i = 0; i < 4; i++ ) + if ( need_refresh[i] && rect[i] != wxGridNoCellRect ) + m_gridWin->Refresh( false, &(rect[i]) ); + } + + // change selection + m_selectedBlockTopLeft = updateTopLeft; + m_selectedBlockBottomRight = updateBottomRight; +} + +// +// ------ functions to get/send data (see also public functions) +// + +bool wxGrid::GetModelValues() +{ + // Hide the editor, so it won't hide a changed value. + HideCellEditControl(); + + if ( m_table ) + { + // all we need to do is repaint the grid + // + m_gridWin->Refresh(); + return true; + } + + return false; +} + +bool wxGrid::SetModelValues() +{ + int row, col; + + // Disable the editor, so it won't hide a changed value. + // Do we also want to save the current value of the editor first? + // I think so ... + DisableCellEditControl(); + + if ( m_table ) + { + for ( row = 0; row < m_numRows; row++ ) + { + for ( col = 0; col < m_numCols; col++ ) + { + m_table->SetValue( row, col, GetCellValue(row, col) ); + } + } + + return true; + } + + return false; +} + +// Note - this function only draws cells that are in the list of +// exposed cells (usually set from the update region by +// CalcExposedCells) +// +void wxGrid::DrawGridCellArea( wxDC& dc, const wxGridCellCoordsArray& cells ) +{ + if ( !m_numRows || !m_numCols ) + return; + + int i, numCells = cells.GetCount(); + int row, col, cell_rows, cell_cols; + wxGridCellCoordsArray redrawCells; + + for ( i = numCells - 1; i >= 0; i-- ) + { + row = cells[i].GetRow(); + col = cells[i].GetCol(); + GetCellSize( row, col, &cell_rows, &cell_cols ); + + // If this cell is part of a multicell block, find owner for repaint + if ( cell_rows <= 0 || cell_cols <= 0 ) + { + wxGridCellCoords cell( row + cell_rows, col + cell_cols ); + bool marked = false; + for ( int j = 0; j < numCells; j++ ) + { + if ( cell == cells[j] ) + { + marked = true; + break; + } + } + + if (!marked) + { + int count = redrawCells.GetCount(); + for (int j = 0; j < count; j++) + { + if ( cell == redrawCells[j] ) + { + marked = true; + break; + } + } + + if (!marked) + redrawCells.Add( cell ); + } + + // don't bother drawing this cell + continue; + } + + // If this cell is empty, find cell to left that might want to overflow + if (m_table && m_table->IsEmptyCell(row, col)) + { + for ( int l = 0; l < cell_rows; l++ ) + { + // find a cell in this row to leave already marked for repaint + int left = col; + for (int k = 0; k < int(redrawCells.GetCount()); k++) + if ((redrawCells[k].GetCol() < left) && + (redrawCells[k].GetRow() == row)) + { + left = redrawCells[k].GetCol(); + } + + if (left == col) + left = 0; // oh well + + for (int j = col - 1; j >= left; j--) + { + if (!m_table->IsEmptyCell(row + l, j)) + { + if (GetCellOverflow(row + l, j)) + { + wxGridCellCoords cell(row + l, j); + bool marked = false; + + for (int k = 0; k < numCells; k++) + { + if ( cell == cells[k] ) + { + marked = true; + break; + } + } + + if (!marked) + { + int count = redrawCells.GetCount(); + for (int k = 0; k < count; k++) + { + if ( cell == redrawCells[k] ) + { + marked = true; + break; + } + } + if (!marked) + redrawCells.Add( cell ); + } + } + break; + } + } + } + } + + DrawCell( dc, cells[i] ); + } + + numCells = redrawCells.GetCount(); + + for ( i = numCells - 1; i >= 0; i-- ) + { + DrawCell( dc, redrawCells[i] ); + } +} + +void wxGrid::DrawGridSpace( wxDC& dc ) +{ + int cw, ch; + m_gridWin->GetClientSize( &cw, &ch ); + + int right, bottom; + CalcUnscrolledPosition( cw, ch, &right, &bottom ); + + int rightCol = m_numCols > 0 ? GetColRight(GetColAt( m_numCols - 1 )) : 0; + int bottomRow = m_numRows > 0 ? GetRowBottom(m_numRows - 1) : 0; + + if ( right > rightCol || bottom > bottomRow ) + { + int left, top; + CalcUnscrolledPosition( 0, 0, &left, &top ); + + dc.SetBrush(GetDefaultCellBackgroundColour()); + dc.SetPen( *wxTRANSPARENT_PEN ); + + if ( right > rightCol ) + { + dc.DrawRectangle( rightCol, top, right - rightCol, ch ); + } + + if ( bottom > bottomRow ) + { + dc.DrawRectangle( left, bottomRow, cw, bottom - bottomRow ); + } + } +} + +void wxGrid::DrawCell( wxDC& dc, const wxGridCellCoords& coords ) +{ + int row = coords.GetRow(); + int col = coords.GetCol(); + + if ( GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 ) + return; + + // we draw the cell border ourselves + wxGridCellAttr* attr = GetCellAttr(row, col); + + bool isCurrent = coords == m_currentCellCoords; + + wxRect rect = CellToRect( row, col ); + + // if the editor is shown, we should use it and not the renderer + // Note: However, only if it is really _shown_, i.e. not hidden! + if ( isCurrent && IsCellEditControlShown() ) + { + // NB: this "#if..." is temporary and fixes a problem where the + // edit control is erased by this code after being rendered. + // On wxMac (QD build only), the cell editor is a wxTextCntl and is rendered + // implicitly, causing this out-of order render. +#if !defined(__WXMAC__) + wxGridCellEditor *editor = attr->GetEditor(this, row, col); + editor->PaintBackground(dc, rect, *attr); + editor->DecRef(); +#endif + } + else + { + // but all the rest is drawn by the cell renderer and hence may be customized + wxGridCellRenderer *renderer = attr->GetRenderer(this, row, col); + renderer->Draw(*this, *attr, dc, rect, row, col, IsInSelection(coords)); + renderer->DecRef(); + } + + attr->DecRef(); +} + +void wxGrid::DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr ) +{ + // don't show highlight when the grid doesn't have focus + if ( !HasFocus() ) + return; + + int row = m_currentCellCoords.GetRow(); + int col = m_currentCellCoords.GetCol(); + + if ( GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 ) + return; + + wxRect rect = CellToRect(row, col); + + // hmmm... what could we do here to show that the cell is disabled? + // for now, I just draw a thinner border than for the other ones, but + // it doesn't look really good + + int penWidth = attr->IsReadOnly() ? m_cellHighlightROPenWidth : m_cellHighlightPenWidth; + + if (penWidth > 0) + { + // The center of the drawn line is where the position/width/height of + // the rectangle is actually at (on wxMSW at least), so the + // size of the rectangle is reduced to compensate for the thickness of + // the line. If this is too strange on non-wxMSW platforms then + // please #ifdef this appropriately. + rect.x += penWidth / 2; + rect.y += penWidth / 2; + rect.width -= penWidth - 1; + rect.height -= penWidth - 1; + + // Now draw the rectangle + // use the cellHighlightColour if the cell is inside a selection, this + // will ensure the cell is always visible. + dc.SetPen(wxPen(IsInSelection(row,col) ? m_selectionForeground + : m_cellHighlightColour, + penWidth)); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.DrawRectangle(rect); + } +} + +wxPen wxGrid::GetDefaultGridLinePen() +{ + return wxPen(GetGridLineColour()); +} + +wxPen wxGrid::GetRowGridLinePen(int WXUNUSED(row)) +{ + return GetDefaultGridLinePen(); +} + +wxPen wxGrid::GetColGridLinePen(int WXUNUSED(col)) +{ + return GetDefaultGridLinePen(); +} + +void wxGrid::DrawCellBorder( wxDC& dc, const wxGridCellCoords& coords ) +{ + int row = coords.GetRow(); + int col = coords.GetCol(); + if ( GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 ) + return; + + + wxRect rect = CellToRect( row, col ); + + // right hand border + dc.SetPen( GetColGridLinePen(col) ); + dc.DrawLine( rect.x + rect.width, rect.y, + rect.x + rect.width, rect.y + rect.height + 1 ); + + // bottom border + dc.SetPen( GetRowGridLinePen(row) ); + dc.DrawLine( rect.x, rect.y + rect.height, + rect.x + rect.width, rect.y + rect.height); +} + +void wxGrid::DrawHighlight(wxDC& dc, const wxGridCellCoordsArray& cells) +{ + // This if block was previously in wxGrid::OnPaint but that doesn't + // seem to get called under wxGTK - MB + // + if ( m_currentCellCoords == wxGridNoCellCoords && + m_numRows && m_numCols ) + { + m_currentCellCoords.Set(0, 0); + } + + if ( IsCellEditControlShown() ) + { + // don't show highlight when the edit control is shown + return; + } + + // if the active cell was repainted, repaint its highlight too because it + // might have been damaged by the grid lines + size_t count = cells.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + wxGridCellCoords cell = cells[n]; + + // If we are using attributes, then we may have just exposed another + // cell in a partially-visible merged cluster of cells. If the "anchor" + // (upper left) cell of this merged cluster is the cell indicated by + // m_currentCellCoords, then we need to refresh the cell highlight even + // though the "anchor" itself is not part of our update segment. + if ( CanHaveAttributes() ) + { + int rows = 0, + cols = 0; + GetCellSize(cell.GetRow(), cell.GetCol(), &rows, &cols); + + if ( rows < 0 ) + cell.SetRow(cell.GetRow() + rows); + + if ( cols < 0 ) + cell.SetCol(cell.GetCol() + cols); + } + + if ( cell == m_currentCellCoords ) + { + wxGridCellAttr* attr = GetCellAttr(m_currentCellCoords); + DrawCellHighlight(dc, attr); + attr->DecRef(); + + break; + } + } +} + +// Used by wxGrid::Render() to draw the grid lines only for the cells in the +// specified range. +void +wxGrid::DrawRangeGridLines(wxDC& dc, + const wxRegion& reg, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight) +{ + if ( !m_gridLinesEnabled ) + return; + + int top, left, width, height; + reg.GetBox( left, top, width, height ); + + // create a clipping region + wxRegion clippedcells( dc.LogicalToDeviceX( left ), + dc.LogicalToDeviceY( top ), + dc.LogicalToDeviceXRel( width ), + dc.LogicalToDeviceYRel( height ) ); + + // subtract multi cell span area from clipping region for lines + wxRect rect; + for ( int row = topLeft.GetRow(); row <= bottomRight.GetRow(); row++ ) + { + for ( int col = topLeft.GetCol(); col <= bottomRight.GetCol(); col++ ) + { + int cell_rows, cell_cols; + GetCellSize( row, col, &cell_rows, &cell_cols ); + if ( cell_rows > 1 || cell_cols > 1 ) // multi cell + { + rect = CellToRect( row, col ); + // cater for scaling + // device origin already set in ::Render() for x, y + rect.x = dc.LogicalToDeviceX( rect.x ); + rect.y = dc.LogicalToDeviceY( rect.y ); + rect.width = dc.LogicalToDeviceXRel( rect.width ); + rect.height = dc.LogicalToDeviceYRel( rect.height ) - 1; + clippedcells.Subtract( rect ); + } + else if ( cell_rows < 0 || cell_cols < 0 ) // part of multicell + { + rect = CellToRect( row + cell_rows, col + cell_cols ); + rect.x = dc.LogicalToDeviceX( rect.x ); + rect.y = dc.LogicalToDeviceY( rect.y ); + rect.width = dc.LogicalToDeviceXRel( rect.width ); + rect.height = dc.LogicalToDeviceYRel( rect.height ) - 1; + clippedcells.Subtract( rect ); + } + } + } + + dc.SetDeviceClippingRegion( clippedcells ); + + DoDrawGridLines(dc, + top, left, top + height, left + width, + topLeft.GetRow(), topLeft.GetCol(), + bottomRight.GetRow(), bottomRight.GetCol()); + + dc.DestroyClippingRegion(); +} + +// This is used to redraw all grid lines e.g. when the grid line colour +// has been changed +// +void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & WXUNUSED(reg) ) +{ + if ( !m_gridLinesEnabled ) + return; + + int top, bottom, left, right; + + int cw, ch; + m_gridWin->GetClientSize(&cw, &ch); + CalcUnscrolledPosition( 0, 0, &left, &top ); + CalcUnscrolledPosition( cw, ch, &right, &bottom ); + + // avoid drawing grid lines past the last row and col + if ( m_gridLinesClipHorz ) + { + if ( !m_numCols ) + return; + + const int lastColRight = GetColRight(GetColAt(m_numCols - 1)); + if ( right > lastColRight ) + right = lastColRight; + } + + if ( m_gridLinesClipVert ) + { + if ( !m_numRows ) + return; + + const int lastRowBottom = GetRowBottom(m_numRows - 1); + if ( bottom > lastRowBottom ) + bottom = lastRowBottom; + } + + // no gridlines inside multicells, clip them out + int leftCol = GetColPos( internalXToCol(left) ); + int topRow = internalYToRow(top); + int rightCol = GetColPos( internalXToCol(right) ); + int bottomRow = internalYToRow(bottom); + + wxRegion clippedcells(0, 0, cw, ch); + + int cell_rows, cell_cols; + wxRect rect; + + for ( int j = topRow; j <= bottomRow; j++ ) + { + for ( int colPos = leftCol; colPos <= rightCol; colPos++ ) + { + int i = GetColAt( colPos ); + + GetCellSize( j, i, &cell_rows, &cell_cols ); + if ((cell_rows > 1) || (cell_cols > 1)) + { + rect = CellToRect(j,i); + CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + clippedcells.Subtract(rect); + } + else if ((cell_rows < 0) || (cell_cols < 0)) + { + rect = CellToRect(j + cell_rows, i + cell_cols); + CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + clippedcells.Subtract(rect); + } + } + } + + dc.SetDeviceClippingRegion( clippedcells ); + + DoDrawGridLines(dc, + top, left, bottom, right, + topRow, leftCol, m_numRows, m_numCols); + + dc.DestroyClippingRegion(); +} + +void +wxGrid::DoDrawGridLines(wxDC& dc, + int top, int left, + int bottom, int right, + int topRow, int leftCol, + int bottomRow, int rightCol) +{ + // horizontal grid lines + for ( int i = topRow; i < bottomRow; i++ ) + { + int bot = GetRowBottom(i) - 1; + + if ( bot > bottom ) + break; + + if ( bot >= top ) + { + dc.SetPen( GetRowGridLinePen(i) ); + dc.DrawLine( left, bot, right, bot ); + } + } + + // vertical grid lines + for ( int colPos = leftCol; colPos < rightCol; colPos++ ) + { + int i = GetColAt( colPos ); + + int colRight = GetColRight(i); +#ifdef __WXGTK__ + if (GetLayoutDirection() != wxLayout_RightToLeft) +#endif + colRight--; + + if ( colRight > right ) + break; + + if ( colRight >= left ) + { + dc.SetPen( GetColGridLinePen(i) ); + dc.DrawLine( colRight, top, colRight, bottom ); + } + } +} + +void wxGrid::DrawRowLabels( wxDC& dc, const wxArrayInt& rows) +{ + if ( !m_numRows ) + return; + + const size_t numLabels = rows.GetCount(); + for ( size_t i = 0; i < numLabels; i++ ) + { + DrawRowLabel( dc, rows[i] ); + } +} + +void wxGrid::DrawRowLabel( wxDC& dc, int row ) +{ + if ( GetRowHeight(row) <= 0 || m_rowLabelWidth <= 0 ) + return; + + wxGridCellAttrProvider * const + attrProvider = m_table ? m_table->GetAttrProvider() : NULL; + + // notice that an explicit static_cast is needed to avoid a compilation + // error with VC7.1 which, for some reason, tries to instantiate (abstract) + // wxGridRowHeaderRenderer class without it + const wxGridRowHeaderRenderer& + rend = attrProvider ? attrProvider->GetRowHeaderRenderer(row) + : static_cast + (gs_defaultHeaderRenderers.rowRenderer); + + wxRect rect(0, GetRowTop(row), m_rowLabelWidth, GetRowHeight(row)); + rend.DrawBorder(*this, dc, rect); + + int hAlign, vAlign; + GetRowLabelAlignment(&hAlign, &vAlign); + + rend.DrawLabel(*this, dc, GetRowLabelValue(row), + rect, hAlign, vAlign, wxHORIZONTAL); +} + +void wxGrid::UseNativeColHeader(bool native) +{ + if ( native == m_useNativeHeader ) + return; + + delete m_colWindow; + m_useNativeHeader = native; + + CreateColumnWindow(); + + if ( m_useNativeHeader ) + GetGridColHeader()->SetColumnCount(m_numCols); + CalcWindowSizes(); +} + +void wxGrid::SetUseNativeColLabels( bool native ) +{ + wxASSERT_MSG( !m_useNativeHeader, + "doesn't make sense when using native header" ); + + m_nativeColumnLabels = native; + if (native) + { + int height = wxRendererNative::Get().GetHeaderButtonHeight( this ); + SetColLabelSize( height ); + } + + GetColLabelWindow()->Refresh(); + m_cornerLabelWin->Refresh(); +} + +void wxGrid::DrawColLabels( wxDC& dc,const wxArrayInt& cols ) +{ + if ( !m_numCols ) + return; + + const size_t numLabels = cols.GetCount(); + for ( size_t i = 0; i < numLabels; i++ ) + { + DrawColLabel( dc, cols[i] ); + } +} + +void wxGrid::DrawCornerLabel(wxDC& dc) +{ + wxRect rect(wxSize(m_rowLabelWidth, m_colLabelHeight)); + + if ( m_nativeColumnLabels ) + { + rect.Deflate(1); + + wxRendererNative::Get().DrawHeaderButton(m_cornerLabelWin, dc, rect, 0); + } + else + { + rect.width++; + rect.height++; + + wxGridCellAttrProvider * const + attrProvider = m_table ? m_table->GetAttrProvider() : NULL; + const wxGridCornerHeaderRenderer& + rend = attrProvider ? attrProvider->GetCornerRenderer() + : static_cast + (gs_defaultHeaderRenderers.cornerRenderer); + + rend.DrawBorder(*this, dc, rect); + } +} + +void wxGrid::DrawColLabel(wxDC& dc, int col) +{ + if ( GetColWidth(col) <= 0 || m_colLabelHeight <= 0 ) + return; + + int colLeft = GetColLeft(col); + + wxRect rect(colLeft, 0, GetColWidth(col), m_colLabelHeight); + wxGridCellAttrProvider * const + attrProvider = m_table ? m_table->GetAttrProvider() : NULL; + const wxGridColumnHeaderRenderer& + rend = attrProvider ? attrProvider->GetColumnHeaderRenderer(col) + : static_cast + (gs_defaultHeaderRenderers.colRenderer); + + if ( m_nativeColumnLabels ) + { + wxRendererNative::Get().DrawHeaderButton + ( + GetColLabelWindow(), + dc, + rect, + 0, + IsSortingBy(col) + ? IsSortOrderAscending() + ? wxHDR_SORT_ICON_UP + : wxHDR_SORT_ICON_DOWN + : wxHDR_SORT_ICON_NONE + ); + rect.Deflate(2); + } + else + { + // It is reported that we need to erase the background to avoid display + // artefacts, see #12055. + wxDCBrushChanger setBrush(dc, m_colWindow->GetBackgroundColour()); + dc.DrawRectangle(rect); + + rend.DrawBorder(*this, dc, rect); + } + + int hAlign, vAlign; + GetColLabelAlignment(&hAlign, &vAlign); + const int orient = GetColLabelTextOrientation(); + + rend.DrawLabel(*this, dc, GetColLabelValue(col), rect, hAlign, vAlign, orient); +} + +// TODO: these 2 functions should be replaced with wxDC::DrawLabel() to which +// we just have to add textOrientation support +void wxGrid::DrawTextRectangle( wxDC& dc, + const wxString& value, + const wxRect& rect, + int horizAlign, + int vertAlign, + int textOrientation ) const +{ + wxArrayString lines; + + StringToLines( value, lines ); + + DrawTextRectangle(dc, lines, rect, horizAlign, vertAlign, textOrientation); +} + +void wxGrid::DrawTextRectangle(wxDC& dc, + const wxArrayString& lines, + const wxRect& rect, + int horizAlign, + int vertAlign, + int textOrientation) const +{ + if ( lines.empty() ) + return; + + wxDCClipper clip(dc, rect); + + long textWidth, + textHeight; + + if ( textOrientation == wxHORIZONTAL ) + GetTextBoxSize( dc, lines, &textWidth, &textHeight ); + else + GetTextBoxSize( dc, lines, &textHeight, &textWidth ); + + int x = 0, + y = 0; + switch ( vertAlign ) + { + case wxALIGN_BOTTOM: + if ( textOrientation == wxHORIZONTAL ) + y = rect.y + (rect.height - textHeight - 1); + else + x = rect.x + rect.width - textWidth; + break; + + case wxALIGN_CENTRE: + if ( textOrientation == wxHORIZONTAL ) + y = rect.y + ((rect.height - textHeight) / 2); + else + x = rect.x + ((rect.width - textWidth) / 2); + break; + + case wxALIGN_TOP: + default: + if ( textOrientation == wxHORIZONTAL ) + y = rect.y + 1; + else + x = rect.x + 1; + break; + } + + // Align each line of a multi-line label + size_t nLines = lines.GetCount(); + for ( size_t l = 0; l < nLines; l++ ) + { + const wxString& line = lines[l]; + + if ( line.empty() ) + { + *(textOrientation == wxHORIZONTAL ? &y : &x) += dc.GetCharHeight(); + continue; + } + + wxCoord lineWidth = 0, + lineHeight = 0; + dc.GetTextExtent(line, &lineWidth, &lineHeight); + + switch ( horizAlign ) + { + case wxALIGN_RIGHT: + if ( textOrientation == wxHORIZONTAL ) + x = rect.x + (rect.width - lineWidth - 1); + else + y = rect.y + lineWidth + 1; + break; + + case wxALIGN_CENTRE: + if ( textOrientation == wxHORIZONTAL ) + x = rect.x + ((rect.width - lineWidth) / 2); + else + y = rect.y + rect.height - ((rect.height - lineWidth) / 2); + break; + + case wxALIGN_LEFT: + default: + if ( textOrientation == wxHORIZONTAL ) + x = rect.x + 1; + else + y = rect.y + rect.height - 1; + break; + } + + if ( textOrientation == wxHORIZONTAL ) + { + dc.DrawText( line, x, y ); + y += lineHeight; + } + else + { + dc.DrawRotatedText( line, x, y, 90.0 ); + x += lineHeight; + } + } +} + +// Split multi-line text up into an array of strings. +// Any existing contents of the string array are preserved. +// +// TODO: refactor wxTextFile::Read() and reuse the same code from here +void wxGrid::StringToLines( const wxString& value, wxArrayString& lines ) const +{ + int startPos = 0; + int pos; + wxString eol = wxTextFile::GetEOL( wxTextFileType_Unix ); + wxString tVal = wxTextFile::Translate( value, wxTextFileType_Unix ); + + while ( startPos < (int)tVal.length() ) + { + pos = tVal.Mid(startPos).Find( eol ); + if ( pos < 0 ) + { + break; + } + else if ( pos == 0 ) + { + lines.Add( wxEmptyString ); + } + else + { + lines.Add( tVal.Mid(startPos, pos) ); + } + + startPos += pos + 1; + } + + if ( startPos < (int)tVal.length() ) + { + lines.Add( tVal.Mid( startPos ) ); + } +} + +void wxGrid::GetTextBoxSize( const wxDC& dc, + const wxArrayString& lines, + long *width, long *height ) const +{ + wxCoord w = 0; + wxCoord h = 0; + wxCoord lineW = 0, lineH = 0; + + size_t i; + for ( i = 0; i < lines.GetCount(); i++ ) + { + dc.GetTextExtent( lines[i], &lineW, &lineH ); + w = wxMax( w, lineW ); + h += lineH; + } + + *width = w; + *height = h; +} + +// +// ------ Batch processing. +// +void wxGrid::EndBatch() +{ + if ( m_batchCount > 0 ) + { + m_batchCount--; + if ( !m_batchCount ) + { + CalcDimensions(); + m_rowLabelWin->Refresh(); + m_colWindow->Refresh(); + m_cornerLabelWin->Refresh(); + m_gridWin->Refresh(); + } + } +} + +// Use this, rather than wxWindow::Refresh(), to force an immediate +// repainting of the grid. Has no effect if you are already inside a +// BeginBatch / EndBatch block. +// +void wxGrid::ForceRefresh() +{ + BeginBatch(); + EndBatch(); +} + +bool wxGrid::Enable(bool enable) +{ + if ( !wxScrolledWindow::Enable(enable) ) + return false; + + // redraw in the new state + m_gridWin->Refresh(); + + return true; +} + +// +// ------ Edit control functions +// + +void wxGrid::EnableEditing( bool edit ) +{ + if ( edit != m_editable ) + { + if (!edit) + EnableCellEditControl(edit); + m_editable = edit; + } +} + +void wxGrid::EnableCellEditControl( bool enable ) +{ + if (! m_editable) + return; + + if ( enable != m_cellEditCtrlEnabled ) + { + if ( enable ) + { + if ( SendEvent(wxEVT_GRID_EDITOR_SHOWN) == -1 ) + return; + + // this should be checked by the caller! + wxASSERT_MSG( CanEnableCellControl(), wxT("can't enable editing for this cell!") ); + + // do it before ShowCellEditControl() + m_cellEditCtrlEnabled = enable; + + ShowCellEditControl(); + } + else + { + SendEvent(wxEVT_GRID_EDITOR_HIDDEN); + + HideCellEditControl(); + SaveEditControlValue(); + + // do it after HideCellEditControl() + m_cellEditCtrlEnabled = enable; + } + } +} + +bool wxGrid::IsCurrentCellReadOnly() const +{ + wxGridCellAttr* + attr = const_cast(this)->GetCellAttr(m_currentCellCoords); + bool readonly = attr->IsReadOnly(); + attr->DecRef(); + + return readonly; +} + +bool wxGrid::CanEnableCellControl() const +{ + return m_editable && (m_currentCellCoords != wxGridNoCellCoords) && + !IsCurrentCellReadOnly(); +} + +bool wxGrid::IsCellEditControlEnabled() const +{ + // the cell edit control might be disable for all cells or just for the + // current one if it's read only + return m_cellEditCtrlEnabled ? !IsCurrentCellReadOnly() : false; +} + +bool wxGrid::IsCellEditControlShown() const +{ + bool isShown = false; + + if ( m_cellEditCtrlEnabled ) + { + int row = m_currentCellCoords.GetRow(); + int col = m_currentCellCoords.GetCol(); + wxGridCellAttr* attr = GetCellAttr(row, col); + wxGridCellEditor* editor = attr->GetEditor((wxGrid*) this, row, col); + attr->DecRef(); + + if ( editor ) + { + if ( editor->IsCreated() ) + { + isShown = editor->GetControl()->IsShown(); + } + + editor->DecRef(); + } + } + + return isShown; +} + +void wxGrid::ShowCellEditControl() +{ + if ( IsCellEditControlEnabled() ) + { + if ( !IsVisible( m_currentCellCoords, false ) ) + { + m_cellEditCtrlEnabled = false; + return; + } + else + { + wxRect rect = CellToRect( m_currentCellCoords ); + int row = m_currentCellCoords.GetRow(); + int col = m_currentCellCoords.GetCol(); + + // if this is part of a multicell, find owner (topleft) + int cell_rows, cell_cols; + GetCellSize( row, col, &cell_rows, &cell_cols ); + if ( cell_rows <= 0 || cell_cols <= 0 ) + { + row += cell_rows; + col += cell_cols; + m_currentCellCoords.SetRow( row ); + m_currentCellCoords.SetCol( col ); + } + + // erase the highlight and the cell contents because the editor + // might not cover the entire cell + wxClientDC dc( m_gridWin ); + PrepareDC( dc ); + wxGridCellAttr* attr = GetCellAttr(row, col); + dc.SetBrush(wxBrush(attr->GetBackgroundColour())); + dc.SetPen(*wxTRANSPARENT_PEN); + dc.DrawRectangle(rect); + + // convert to scrolled coords + CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + + int nXMove = 0; + if (rect.x < 0) + nXMove = rect.x; + + // cell is shifted by one pixel + // However, don't allow x or y to become negative + // since the SetSize() method interprets that as + // "don't change." + if (rect.x > 0) + rect.x--; + if (rect.y > 0) + rect.y--; + + wxGridCellEditor* editor = attr->GetEditor(this, row, col); + if ( !editor->IsCreated() ) + { + editor->Create(m_gridWin, wxID_ANY, + new wxGridCellEditorEvtHandler(this, editor)); + + wxGridEditorCreatedEvent evt(GetId(), + wxEVT_GRID_EDITOR_CREATED, + this, + row, + col, + editor->GetControl()); + GetEventHandler()->ProcessEvent(evt); + } + + // resize editor to overflow into righthand cells if allowed + int maxWidth = rect.width; + wxString value = GetCellValue(row, col); + if ( (value != wxEmptyString) && (attr->GetOverflow()) ) + { + int y; + GetTextExtent(value, &maxWidth, &y, NULL, NULL, &attr->GetFont()); + if (maxWidth < rect.width) + maxWidth = rect.width; + } + + int client_right = m_gridWin->GetClientSize().GetWidth(); + if (rect.x + maxWidth > client_right) + maxWidth = client_right - rect.x; + + if ((maxWidth > rect.width) && (col < m_numCols) && m_table) + { + GetCellSize( row, col, &cell_rows, &cell_cols ); + // may have changed earlier + for (int i = col + cell_cols; i < m_numCols; i++) + { + int c_rows, c_cols; + GetCellSize( row, i, &c_rows, &c_cols ); + + // looks weird going over a multicell + if (m_table->IsEmptyCell( row, i ) && + (rect.width < maxWidth) && (c_rows == 1)) + { + rect.width += GetColWidth( i ); + } + else + break; + } + + if (rect.GetRight() > client_right) + rect.SetRight( client_right - 1 ); + } + + editor->SetCellAttr( attr ); + editor->SetSize( rect ); + if (nXMove != 0) + editor->GetControl()->Move( + editor->GetControl()->GetPosition().x + nXMove, + editor->GetControl()->GetPosition().y ); + editor->Show( true, attr ); + + // recalc dimensions in case we need to + // expand the scrolled window to account for editor + CalcDimensions(); + + editor->BeginEdit(row, col, this); + editor->SetCellAttr(NULL); + + editor->DecRef(); + attr->DecRef(); + } + } +} + +void wxGrid::HideCellEditControl() +{ + if ( IsCellEditControlEnabled() ) + { + int row = m_currentCellCoords.GetRow(); + int col = m_currentCellCoords.GetCol(); + + wxGridCellAttr *attr = GetCellAttr(row, col); + wxGridCellEditor *editor = attr->GetEditor(this, row, col); + const bool editorHadFocus = editor->GetControl()->HasFocus(); + editor->Show( false ); + editor->DecRef(); + attr->DecRef(); + + // return the focus to the grid itself if the editor had it + // + // note that we must not do this unconditionally to avoid stealing + // focus from the window which just received it if we are hiding the + // editor precisely because we lost focus + if ( editorHadFocus ) + m_gridWin->SetFocus(); + + // refresh whole row to the right + wxRect rect( CellToRect(row, col) ); + CalcScrolledPosition(rect.x, rect.y, &rect.x, &rect.y ); + rect.width = m_gridWin->GetClientSize().GetWidth() - rect.x; + +#ifdef __WXMAC__ + // ensure that the pixels under the focus ring get refreshed as well + rect.Inflate(10, 10); +#endif + + m_gridWin->Refresh( false, &rect ); + } +} + +void wxGrid::SaveEditControlValue() +{ + if ( IsCellEditControlEnabled() ) + { + int row = m_currentCellCoords.GetRow(); + int col = m_currentCellCoords.GetCol(); + + wxString oldval = GetCellValue(row, col); + + wxGridCellAttr* attr = GetCellAttr(row, col); + wxGridCellEditor* editor = attr->GetEditor(this, row, col); + + wxString newval; + bool changed = editor->EndEdit(row, col, this, oldval, &newval); + + if ( changed && SendEvent(wxEVT_GRID_CELL_CHANGING, newval) != -1 ) + { + editor->ApplyEdit(row, col, this); + + // for compatibility reasons dating back to wx 2.8 when this event + // was called wxEVT_GRID_CELL_CHANGE and wxEVT_GRID_CELL_CHANGING + // didn't exist we allow vetoing this one too + if ( SendEvent(wxEVT_GRID_CELL_CHANGED, oldval) == -1 ) + { + // Event has been vetoed, set the data back. + SetCellValue(row, col, oldval); + } + } + + editor->DecRef(); + attr->DecRef(); + } +} + +void wxGrid::OnHideEditor(wxCommandEvent& WXUNUSED(event)) +{ + DisableCellEditControl(); +} + +// +// ------ Grid location functions +// Note that all of these functions work with the logical coordinates of +// grid cells and labels so you will need to convert from device +// coordinates for mouse events etc. +// + +wxGridCellCoords wxGrid::XYToCell(int x, int y) const +{ + int row = YToRow(y); + int col = XToCol(x); + + return row == -1 || col == -1 ? wxGridNoCellCoords + : wxGridCellCoords(row, col); +} + +// compute row or column from some (unscrolled) coordinate value, using either +// m_defaultRowHeight/m_defaultColWidth or binary search on array of +// m_rowBottoms/m_colRights to do it quickly in O(log n) time. +// NOTE: This may not work correctly for reordered columns. +int wxGrid::PosToLinePos(int coord, + bool clipToMinMax, + const wxGridOperations& oper) const +{ + const int numLines = oper.GetNumberOfLines(this); + + if ( coord < 0 ) + return clipToMinMax && numLines > 0 ? 0 : wxNOT_FOUND; + + const int defaultLineSize = oper.GetDefaultLineSize(this); + wxCHECK_MSG( defaultLineSize, -1, "can't have 0 default line size" ); + + int maxPos = coord / defaultLineSize, + minPos = 0; + + // check for the simplest case: if we have no explicit line sizes + // configured, then we already know the line this position falls in + const wxArrayInt& lineEnds = oper.GetLineEnds(this); + if ( lineEnds.empty() ) + { + if ( maxPos < numLines ) + return maxPos; + + return clipToMinMax ? numLines - 1 : -1; + } + + + // binary search is quite efficient and we can't really make any assumptions + // on where to start here since row and columns could be of size 0 if they are + // hidden. While this could be made more efficient, some profiling will be + // necessary to determine if it really is a performance bottleneck + maxPos = numLines - 1; + + // check if the position is beyond the last column + const int lineAtMaxPos = oper.GetLineAt(this, maxPos); + if ( coord >= lineEnds[lineAtMaxPos] ) + return clipToMinMax ? maxPos : -1; + + // or before the first one + const int lineAt0 = oper.GetLineAt(this, 0); + if ( coord < lineEnds[lineAt0] ) + return 0; + + + // finally do perform the binary search + while ( minPos < maxPos ) + { + wxCHECK_MSG( lineEnds[oper.GetLineAt(this, minPos)] <= coord && + coord < lineEnds[oper.GetLineAt(this, maxPos)], + -1, + "wxGrid: internal error in PosToLinePos()" ); + + if ( coord >= lineEnds[oper.GetLineAt(this, maxPos - 1)] ) + return maxPos; + else + maxPos--; + + const int median = minPos + (maxPos - minPos + 1) / 2; + if ( coord < lineEnds[oper.GetLineAt(this, median)] ) + maxPos = median; + else + minPos = median; + } + + return maxPos; +} + +int +wxGrid::PosToLine(int coord, + bool clipToMinMax, + const wxGridOperations& oper) const +{ + int pos = PosToLinePos(coord, clipToMinMax, oper); + + return pos == wxNOT_FOUND ? wxNOT_FOUND : oper.GetLineAt(this, pos); +} + +int wxGrid::YToRow(int y, bool clipToMinMax) const +{ + return PosToLine(y, clipToMinMax, wxGridRowOperations()); +} + +int wxGrid::XToCol(int x, bool clipToMinMax) const +{ + return PosToLine(x, clipToMinMax, wxGridColumnOperations()); +} + +int wxGrid::XToPos(int x) const +{ + return PosToLinePos(x, true /* clip */, wxGridColumnOperations()); +} + +// return the row/col number such that the pos is near the edge of, or -1 if +// not near an edge. +// +// notice that position can only possibly be near an edge if the row/column is +// large enough to still allow for an "inner" area that is _not_ near the edge +// (i.e., if the height/width is smaller than WXGRID_LABEL_EDGE_ZONE, pos will +// _never_ be considered to be near the edge). +int wxGrid::PosToEdgeOfLine(int pos, const wxGridOperations& oper) const +{ + // Get the bottom or rightmost line that could match. + int line = oper.PosToLine(this, pos, true); + + if ( oper.GetLineSize(this, line) > WXGRID_LABEL_EDGE_ZONE ) + { + // We know that we are in this line, test whether we are close enough + // to start or end border, respectively. + if ( abs(oper.GetLineEndPos(this, line) - pos) < WXGRID_LABEL_EDGE_ZONE ) + return line; + else if ( line > 0 && + pos - oper.GetLineStartPos(this, + line) < WXGRID_LABEL_EDGE_ZONE ) + { + // We need to find the previous visible line, so skip all the + // hidden (of size 0) ones. + do + { + line = oper.GetLineBefore(this, line); + } + while ( line >= 0 && oper.GetLineSize(this, line) == 0 ); + + // It can possibly be -1 here. + return line; + } + } + + return -1; +} + +int wxGrid::YToEdgeOfRow(int y) const +{ + return PosToEdgeOfLine(y, wxGridRowOperations()); +} + +int wxGrid::XToEdgeOfCol(int x) const +{ + return PosToEdgeOfLine(x, wxGridColumnOperations()); +} + +wxRect wxGrid::CellToRect( int row, int col ) const +{ + wxRect rect( -1, -1, -1, -1 ); + + if ( row >= 0 && row < m_numRows && + col >= 0 && col < m_numCols ) + { + int i, cell_rows, cell_cols; + rect.width = rect.height = 0; + GetCellSize( row, col, &cell_rows, &cell_cols ); + // if negative then find multicell owner + if (cell_rows < 0) + row += cell_rows; + if (cell_cols < 0) + col += cell_cols; + GetCellSize( row, col, &cell_rows, &cell_cols ); + + rect.x = GetColLeft(col); + rect.y = GetRowTop(row); + for (i=col; i < col + cell_cols; i++) + rect.width += GetColWidth(i); + for (i=row; i < row + cell_rows; i++) + rect.height += GetRowHeight(i); + + // if grid lines are enabled, then the area of the cell is a bit smaller + if (m_gridLinesEnabled) + { + rect.width -= 1; + rect.height -= 1; + } + } + + return rect; +} + +bool wxGrid::IsVisible( int row, int col, bool wholeCellVisible ) const +{ + // get the cell rectangle in logical coords + // + wxRect r( CellToRect( row, col ) ); + + // convert to device coords + // + int left, top, right, bottom; + CalcScrolledPosition( r.GetLeft(), r.GetTop(), &left, &top ); + CalcScrolledPosition( r.GetRight(), r.GetBottom(), &right, &bottom ); + + // check against the client area of the grid window + int cw, ch; + m_gridWin->GetClientSize( &cw, &ch ); + + if ( wholeCellVisible ) + { + // is the cell wholly visible ? + return ( left >= 0 && right <= cw && + top >= 0 && bottom <= ch ); + } + else + { + // is the cell partly visible ? + // + return ( ((left >= 0 && left < cw) || (right > 0 && right <= cw)) && + ((top >= 0 && top < ch) || (bottom > 0 && bottom <= ch)) ); + } +} + +// make the specified cell location visible by doing a minimal amount +// of scrolling +// +void wxGrid::MakeCellVisible( int row, int col ) +{ + int i; + int xpos = -1, ypos = -1; + + if ( row >= 0 && row < m_numRows && + col >= 0 && col < m_numCols ) + { + // get the cell rectangle in logical coords + wxRect r( CellToRect( row, col ) ); + + // convert to device coords + int left, top, right, bottom; + CalcScrolledPosition( r.GetLeft(), r.GetTop(), &left, &top ); + CalcScrolledPosition( r.GetRight(), r.GetBottom(), &right, &bottom ); + + int cw, ch; + m_gridWin->GetClientSize( &cw, &ch ); + + if ( top < 0 ) + { + ypos = r.GetTop(); + } + else if ( bottom > ch ) + { + int h = r.GetHeight(); + ypos = r.GetTop(); + for ( i = row - 1; i >= 0; i-- ) + { + int rowHeight = GetRowHeight(i); + if ( h + rowHeight > ch ) + break; + + h += rowHeight; + ypos -= rowHeight; + } + + // we divide it later by GRID_SCROLL_LINE, make sure that we don't + // have rounding errors (this is important, because if we do, + // we might not scroll at all and some cells won't be redrawn) + // + // Sometimes GRID_SCROLL_LINE / 2 is not enough, + // so just add a full scroll unit... + ypos += m_yScrollPixelsPerLine; + } + + // special handling for wide cells - show always left part of the cell! + // Otherwise, e.g. when stepping from row to row, it would jump between + // left and right part of the cell on every step! +// if ( left < 0 ) + if ( left < 0 || (right - left) >= cw ) + { + xpos = r.GetLeft(); + } + else if ( right > cw ) + { + // position the view so that the cell is on the right + int x0, y0; + CalcUnscrolledPosition(0, 0, &x0, &y0); + xpos = x0 + (right - cw); + + // see comment for ypos above + xpos += m_xScrollPixelsPerLine; + } + + if ( xpos != -1 || ypos != -1 ) + { + if ( xpos != -1 ) + xpos /= m_xScrollPixelsPerLine; + if ( ypos != -1 ) + ypos /= m_yScrollPixelsPerLine; + Scroll( xpos, ypos ); + AdjustScrollbars(); + } + } +} + +// +// ------ Grid cursor movement functions +// + +bool +wxGrid::DoMoveCursor(bool expandSelection, + const wxGridDirectionOperations& diroper) +{ + if ( m_currentCellCoords == wxGridNoCellCoords ) + return false; + + if ( expandSelection ) + { + wxGridCellCoords coords = m_selectedBlockCorner; + if ( coords == wxGridNoCellCoords ) + coords = m_currentCellCoords; + + if ( diroper.IsAtBoundary(coords) ) + return false; + + diroper.Advance(coords); + + UpdateBlockBeingSelected(m_currentCellCoords, coords); + } + else // don't expand selection + { + ClearSelection(); + + if ( diroper.IsAtBoundary(m_currentCellCoords) ) + return false; + + wxGridCellCoords coords = m_currentCellCoords; + diroper.Advance(coords); + + GoToCell(coords); + } + + return true; +} + +bool wxGrid::MoveCursorUp(bool expandSelection) +{ + return DoMoveCursor(expandSelection, + wxGridBackwardOperations(this, wxGridRowOperations())); +} + +bool wxGrid::MoveCursorDown(bool expandSelection) +{ + return DoMoveCursor(expandSelection, + wxGridForwardOperations(this, wxGridRowOperations())); +} + +bool wxGrid::MoveCursorLeft(bool expandSelection) +{ + return DoMoveCursor(expandSelection, + wxGridBackwardOperations(this, wxGridColumnOperations())); +} + +bool wxGrid::MoveCursorRight(bool expandSelection) +{ + return DoMoveCursor(expandSelection, + wxGridForwardOperations(this, wxGridColumnOperations())); +} + +bool wxGrid::DoMoveCursorByPage(const wxGridDirectionOperations& diroper) +{ + if ( m_currentCellCoords == wxGridNoCellCoords ) + return false; + + if ( diroper.IsAtBoundary(m_currentCellCoords) ) + return false; + + const int oldRow = m_currentCellCoords.GetRow(); + int newRow = diroper.MoveByPixelDistance(oldRow, m_gridWin->GetClientSize().y); + if ( newRow == oldRow ) + { + wxGridCellCoords coords(m_currentCellCoords); + diroper.Advance(coords); + newRow = coords.GetRow(); + } + + GoToCell(newRow, m_currentCellCoords.GetCol()); + + return true; +} + +bool wxGrid::MovePageUp() +{ + return DoMoveCursorByPage( + wxGridBackwardOperations(this, wxGridRowOperations())); +} + +bool wxGrid::MovePageDown() +{ + return DoMoveCursorByPage( + wxGridForwardOperations(this, wxGridRowOperations())); +} + +// helper of DoMoveCursorByBlock(): advance the cell coordinates using diroper +// until we find a non-empty cell or reach the grid end +void +wxGrid::AdvanceToNextNonEmpty(wxGridCellCoords& coords, + const wxGridDirectionOperations& diroper) +{ + while ( !diroper.IsAtBoundary(coords) ) + { + diroper.Advance(coords); + if ( !m_table->IsEmpty(coords) ) + break; + } +} + +bool +wxGrid::DoMoveCursorByBlock(bool expandSelection, + const wxGridDirectionOperations& diroper) +{ + if ( !m_table || m_currentCellCoords == wxGridNoCellCoords ) + return false; + + if ( diroper.IsAtBoundary(m_currentCellCoords) ) + return false; + + wxGridCellCoords coords(m_currentCellCoords); + if ( m_table->IsEmpty(coords) ) + { + // we are in an empty cell: find the next block of non-empty cells + AdvanceToNextNonEmpty(coords, diroper); + } + else // current cell is not empty + { + diroper.Advance(coords); + if ( m_table->IsEmpty(coords) ) + { + // we started at the end of a block, find the next one + AdvanceToNextNonEmpty(coords, diroper); + } + else // we're in a middle of a block + { + // go to the end of it, i.e. find the last cell before the next + // empty one + while ( !diroper.IsAtBoundary(coords) ) + { + wxGridCellCoords coordsNext(coords); + diroper.Advance(coordsNext); + if ( m_table->IsEmpty(coordsNext) ) + break; + + coords = coordsNext; + } + } + } + + if ( expandSelection ) + { + UpdateBlockBeingSelected(m_currentCellCoords, coords); + } + else + { + ClearSelection(); + GoToCell(coords); + } + + return true; +} + +bool wxGrid::MoveCursorUpBlock(bool expandSelection) +{ + return DoMoveCursorByBlock( + expandSelection, + wxGridBackwardOperations(this, wxGridRowOperations()) + ); +} + +bool wxGrid::MoveCursorDownBlock( bool expandSelection ) +{ + return DoMoveCursorByBlock( + expandSelection, + wxGridForwardOperations(this, wxGridRowOperations()) + ); +} + +bool wxGrid::MoveCursorLeftBlock( bool expandSelection ) +{ + return DoMoveCursorByBlock( + expandSelection, + wxGridBackwardOperations(this, wxGridColumnOperations()) + ); +} + +bool wxGrid::MoveCursorRightBlock( bool expandSelection ) +{ + return DoMoveCursorByBlock( + expandSelection, + wxGridForwardOperations(this, wxGridColumnOperations()) + ); +} + +// +// ------ Label values and formatting +// + +void wxGrid::GetRowLabelAlignment( int *horiz, int *vert ) const +{ + if ( horiz ) + *horiz = m_rowLabelHorizAlign; + if ( vert ) + *vert = m_rowLabelVertAlign; +} + +void wxGrid::GetColLabelAlignment( int *horiz, int *vert ) const +{ + if ( horiz ) + *horiz = m_colLabelHorizAlign; + if ( vert ) + *vert = m_colLabelVertAlign; +} + +int wxGrid::GetColLabelTextOrientation() const +{ + return m_colLabelTextOrientation; +} + +wxString wxGrid::GetRowLabelValue( int row ) const +{ + if ( m_table ) + { + return m_table->GetRowLabelValue( row ); + } + else + { + wxString s; + s << row; + return s; + } +} + +wxString wxGrid::GetColLabelValue( int col ) const +{ + if ( m_table ) + { + return m_table->GetColLabelValue( col ); + } + else + { + wxString s; + s << col; + return s; + } +} + +void wxGrid::SetRowLabelSize( int width ) +{ + wxASSERT( width >= 0 || width == wxGRID_AUTOSIZE ); + + if ( width == wxGRID_AUTOSIZE ) + { + width = CalcColOrRowLabelAreaMinSize(wxGRID_ROW); + } + + if ( width != m_rowLabelWidth ) + { + if ( width == 0 ) + { + m_rowLabelWin->Show( false ); + m_cornerLabelWin->Show( false ); + } + else if ( m_rowLabelWidth == 0 ) + { + m_rowLabelWin->Show( true ); + if ( m_colLabelHeight > 0 ) + m_cornerLabelWin->Show( true ); + } + + m_rowLabelWidth = width; + InvalidateBestSize(); + CalcWindowSizes(); + wxScrolledWindow::Refresh( true ); + } +} + +void wxGrid::SetColLabelSize( int height ) +{ + wxASSERT( height >=0 || height == wxGRID_AUTOSIZE ); + + if ( height == wxGRID_AUTOSIZE ) + { + height = CalcColOrRowLabelAreaMinSize(wxGRID_COLUMN); + } + + if ( height != m_colLabelHeight ) + { + if ( height == 0 ) + { + m_colWindow->Show( false ); + m_cornerLabelWin->Show( false ); + } + else if ( m_colLabelHeight == 0 ) + { + m_colWindow->Show( true ); + if ( m_rowLabelWidth > 0 ) + m_cornerLabelWin->Show( true ); + } + + m_colLabelHeight = height; + InvalidateBestSize(); + CalcWindowSizes(); + wxScrolledWindow::Refresh( true ); + } +} + +void wxGrid::SetLabelBackgroundColour( const wxColour& colour ) +{ + if ( m_labelBackgroundColour != colour ) + { + m_labelBackgroundColour = colour; + m_rowLabelWin->SetBackgroundColour( colour ); + m_colWindow->SetBackgroundColour( colour ); + m_cornerLabelWin->SetBackgroundColour( colour ); + + if ( !GetBatchCount() ) + { + m_rowLabelWin->Refresh(); + m_colWindow->Refresh(); + m_cornerLabelWin->Refresh(); + } + } +} + +void wxGrid::SetLabelTextColour( const wxColour& colour ) +{ + if ( m_labelTextColour != colour ) + { + m_labelTextColour = colour; + if ( !GetBatchCount() ) + { + m_rowLabelWin->Refresh(); + m_colWindow->Refresh(); + } + } +} + +void wxGrid::SetLabelFont( const wxFont& font ) +{ + m_labelFont = font; + if ( !GetBatchCount() ) + { + m_rowLabelWin->Refresh(); + m_colWindow->Refresh(); + } +} + +void wxGrid::SetRowLabelAlignment( int horiz, int vert ) +{ + // allow old (incorrect) defs to be used + switch ( horiz ) + { + case wxLEFT: horiz = wxALIGN_LEFT; break; + case wxRIGHT: horiz = wxALIGN_RIGHT; break; + case wxCENTRE: horiz = wxALIGN_CENTRE; break; + } + + switch ( vert ) + { + case wxTOP: vert = wxALIGN_TOP; break; + case wxBOTTOM: vert = wxALIGN_BOTTOM; break; + case wxCENTRE: vert = wxALIGN_CENTRE; break; + } + + if ( horiz == wxALIGN_LEFT || horiz == wxALIGN_CENTRE || horiz == wxALIGN_RIGHT ) + { + m_rowLabelHorizAlign = horiz; + } + + if ( vert == wxALIGN_TOP || vert == wxALIGN_CENTRE || vert == wxALIGN_BOTTOM ) + { + m_rowLabelVertAlign = vert; + } + + if ( !GetBatchCount() ) + { + m_rowLabelWin->Refresh(); + } +} + +void wxGrid::SetColLabelAlignment( int horiz, int vert ) +{ + // allow old (incorrect) defs to be used + switch ( horiz ) + { + case wxLEFT: horiz = wxALIGN_LEFT; break; + case wxRIGHT: horiz = wxALIGN_RIGHT; break; + case wxCENTRE: horiz = wxALIGN_CENTRE; break; + } + + switch ( vert ) + { + case wxTOP: vert = wxALIGN_TOP; break; + case wxBOTTOM: vert = wxALIGN_BOTTOM; break; + case wxCENTRE: vert = wxALIGN_CENTRE; break; + } + + if ( horiz == wxALIGN_LEFT || horiz == wxALIGN_CENTRE || horiz == wxALIGN_RIGHT ) + { + m_colLabelHorizAlign = horiz; + } + + if ( vert == wxALIGN_TOP || vert == wxALIGN_CENTRE || vert == wxALIGN_BOTTOM ) + { + m_colLabelVertAlign = vert; + } + + if ( !GetBatchCount() ) + { + m_colWindow->Refresh(); + } +} + +// Note: under MSW, the default column label font must be changed because it +// does not support vertical printing +// +// Example: wxFont font(9, wxSWISS, wxNORMAL, wxBOLD); +// pGrid->SetLabelFont(font); +// pGrid->SetColLabelTextOrientation(wxVERTICAL); +// +void wxGrid::SetColLabelTextOrientation( int textOrientation ) +{ + if ( textOrientation == wxHORIZONTAL || textOrientation == wxVERTICAL ) + m_colLabelTextOrientation = textOrientation; + + if ( !GetBatchCount() ) + m_colWindow->Refresh(); +} + +void wxGrid::SetRowLabelValue( int row, const wxString& s ) +{ + if ( m_table ) + { + m_table->SetRowLabelValue( row, s ); + if ( !GetBatchCount() ) + { + wxRect rect = CellToRect( row, 0 ); + if ( rect.height > 0 ) + { + CalcScrolledPosition(0, rect.y, &rect.x, &rect.y); + rect.x = 0; + rect.width = m_rowLabelWidth; + m_rowLabelWin->Refresh( true, &rect ); + } + } + } +} + +void wxGrid::SetColLabelValue( int col, const wxString& s ) +{ + if ( m_table ) + { + m_table->SetColLabelValue( col, s ); + if ( !GetBatchCount() ) + { + if ( m_useNativeHeader ) + { + GetGridColHeader()->UpdateColumn(col); + } + else + { + wxRect rect = CellToRect( 0, col ); + if ( rect.width > 0 ) + { + CalcScrolledPosition(rect.x, 0, &rect.x, &rect.y); + rect.y = 0; + rect.height = m_colLabelHeight; + GetColLabelWindow()->Refresh( true, &rect ); + } + } + } + } +} + +void wxGrid::SetGridLineColour( const wxColour& colour ) +{ + if ( m_gridLineColour != colour ) + { + m_gridLineColour = colour; + + if ( GridLinesEnabled() ) + RedrawGridLines(); + } +} + +void wxGrid::SetCellHighlightColour( const wxColour& colour ) +{ + if ( m_cellHighlightColour != colour ) + { + m_cellHighlightColour = colour; + + wxClientDC dc( m_gridWin ); + PrepareDC( dc ); + wxGridCellAttr* attr = GetCellAttr(m_currentCellCoords); + DrawCellHighlight(dc, attr); + attr->DecRef(); + } +} + +void wxGrid::SetCellHighlightPenWidth(int width) +{ + if (m_cellHighlightPenWidth != width) + { + m_cellHighlightPenWidth = width; + + // Just redrawing the cell highlight is not enough since that won't + // make any visible change if the thickness is getting smaller. + int row = m_currentCellCoords.GetRow(); + int col = m_currentCellCoords.GetCol(); + if ( row == -1 || col == -1 || GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 ) + return; + + wxRect rect = CellToRect(row, col); + m_gridWin->Refresh(true, &rect); + } +} + +void wxGrid::SetCellHighlightROPenWidth(int width) +{ + if (m_cellHighlightROPenWidth != width) + { + m_cellHighlightROPenWidth = width; + + // Just redrawing the cell highlight is not enough since that won't + // make any visible change if the thickness is getting smaller. + int row = m_currentCellCoords.GetRow(); + int col = m_currentCellCoords.GetCol(); + if ( row == -1 || col == -1 || + GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 ) + return; + + wxRect rect = CellToRect(row, col); + m_gridWin->Refresh(true, &rect); + } +} + +void wxGrid::RedrawGridLines() +{ + // the lines will be redrawn when the window is thawn + if ( GetBatchCount() ) + return; + + if ( GridLinesEnabled() ) + { + wxClientDC dc( m_gridWin ); + PrepareDC( dc ); + DrawAllGridLines( dc, wxRegion() ); + } + else // remove the grid lines + { + m_gridWin->Refresh(); + } +} + +void wxGrid::EnableGridLines( bool enable ) +{ + if ( enable != m_gridLinesEnabled ) + { + m_gridLinesEnabled = enable; + + RedrawGridLines(); + } +} + +void wxGrid::DoClipGridLines(bool& var, bool clip) +{ + if ( clip != var ) + { + var = clip; + + if ( GridLinesEnabled() ) + RedrawGridLines(); + } +} + +int wxGrid::GetDefaultRowSize() const +{ + return m_defaultRowHeight; +} + +int wxGrid::GetRowSize( int row ) const +{ + wxCHECK_MSG( row >= 0 && row < m_numRows, 0, wxT("invalid row index") ); + + return GetRowHeight(row); +} + +int wxGrid::GetDefaultColSize() const +{ + return m_defaultColWidth; +} + +int wxGrid::GetColSize( int col ) const +{ + wxCHECK_MSG( col >= 0 && col < m_numCols, 0, wxT("invalid column index") ); + + return GetColWidth(col); +} + +// ============================================================================ +// access to the grid attributes: each of them has a default value in the grid +// itself and may be overidden on a per-cell basis +// ============================================================================ + +// ---------------------------------------------------------------------------- +// setting default attributes +// ---------------------------------------------------------------------------- + +void wxGrid::SetDefaultCellBackgroundColour( const wxColour& col ) +{ + m_defaultCellAttr->SetBackgroundColour(col); +#ifdef __WXGTK__ + m_gridWin->SetBackgroundColour(col); +#endif +} + +void wxGrid::SetDefaultCellTextColour( const wxColour& col ) +{ + m_defaultCellAttr->SetTextColour(col); +} + +void wxGrid::SetDefaultCellAlignment( int horiz, int vert ) +{ + m_defaultCellAttr->SetAlignment(horiz, vert); +} + +void wxGrid::SetDefaultCellOverflow( bool allow ) +{ + m_defaultCellAttr->SetOverflow(allow); +} + +void wxGrid::SetDefaultCellFont( const wxFont& font ) +{ + m_defaultCellAttr->SetFont(font); +} + +// For editors and renderers the type registry takes precedence over the +// default attr, so we need to register the new editor/renderer for the string +// data type in order to make setting a default editor/renderer appear to +// work correctly. + +void wxGrid::SetDefaultRenderer(wxGridCellRenderer *renderer) +{ + RegisterDataType(wxGRID_VALUE_STRING, + renderer, + GetDefaultEditorForType(wxGRID_VALUE_STRING)); +} + +void wxGrid::SetDefaultEditor(wxGridCellEditor *editor) +{ + RegisterDataType(wxGRID_VALUE_STRING, + GetDefaultRendererForType(wxGRID_VALUE_STRING), + editor); +} + +// ---------------------------------------------------------------------------- +// access to the default attributes +// ---------------------------------------------------------------------------- + +wxColour wxGrid::GetDefaultCellBackgroundColour() const +{ + return m_defaultCellAttr->GetBackgroundColour(); +} + +wxColour wxGrid::GetDefaultCellTextColour() const +{ + return m_defaultCellAttr->GetTextColour(); +} + +wxFont wxGrid::GetDefaultCellFont() const +{ + return m_defaultCellAttr->GetFont(); +} + +void wxGrid::GetDefaultCellAlignment( int *horiz, int *vert ) const +{ + m_defaultCellAttr->GetAlignment(horiz, vert); +} + +bool wxGrid::GetDefaultCellOverflow() const +{ + return m_defaultCellAttr->GetOverflow(); +} + +wxGridCellRenderer *wxGrid::GetDefaultRenderer() const +{ + return m_defaultCellAttr->GetRenderer(NULL, 0, 0); +} + +wxGridCellEditor *wxGrid::GetDefaultEditor() const +{ + return m_defaultCellAttr->GetEditor(NULL, 0, 0); +} + +// ---------------------------------------------------------------------------- +// access to cell attributes +// ---------------------------------------------------------------------------- + +wxColour wxGrid::GetCellBackgroundColour(int row, int col) const +{ + wxGridCellAttr *attr = GetCellAttr(row, col); + wxColour colour = attr->GetBackgroundColour(); + attr->DecRef(); + + return colour; +} + +wxColour wxGrid::GetCellTextColour( int row, int col ) const +{ + wxGridCellAttr *attr = GetCellAttr(row, col); + wxColour colour = attr->GetTextColour(); + attr->DecRef(); + + return colour; +} + +wxFont wxGrid::GetCellFont( int row, int col ) const +{ + wxGridCellAttr *attr = GetCellAttr(row, col); + wxFont font = attr->GetFont(); + attr->DecRef(); + + return font; +} + +void wxGrid::GetCellAlignment( int row, int col, int *horiz, int *vert ) const +{ + wxGridCellAttr *attr = GetCellAttr(row, col); + attr->GetAlignment(horiz, vert); + attr->DecRef(); +} + +bool wxGrid::GetCellOverflow( int row, int col ) const +{ + wxGridCellAttr *attr = GetCellAttr(row, col); + bool allow = attr->GetOverflow(); + attr->DecRef(); + + return allow; +} + +wxGrid::CellSpan +wxGrid::GetCellSize( int row, int col, int *num_rows, int *num_cols ) const +{ + wxGridCellAttr *attr = GetCellAttr(row, col); + attr->GetSize( num_rows, num_cols ); + attr->DecRef(); + + if ( *num_rows == 1 && *num_cols == 1 ) + return CellSpan_None; // just a normal cell + + if ( *num_rows < 0 || *num_cols < 0 ) + return CellSpan_Inside; // covered by a multi-span cell + + // this cell spans multiple cells to its right/bottom + return CellSpan_Main; +} + +wxGridCellRenderer* wxGrid::GetCellRenderer(int row, int col) const +{ + wxGridCellAttr* attr = GetCellAttr(row, col); + wxGridCellRenderer* renderer = attr->GetRenderer(this, row, col); + attr->DecRef(); + + return renderer; +} + +wxGridCellEditor* wxGrid::GetCellEditor(int row, int col) const +{ + wxGridCellAttr* attr = GetCellAttr(row, col); + wxGridCellEditor* editor = attr->GetEditor(this, row, col); + attr->DecRef(); + + return editor; +} + +bool wxGrid::IsReadOnly(int row, int col) const +{ + wxGridCellAttr* attr = GetCellAttr(row, col); + bool isReadOnly = attr->IsReadOnly(); + attr->DecRef(); + + return isReadOnly; +} + +// ---------------------------------------------------------------------------- +// attribute support: cache, automatic provider creation, ... +// ---------------------------------------------------------------------------- + +bool wxGrid::CanHaveAttributes() const +{ + if ( !m_table ) + { + return false; + } + + return m_table->CanHaveAttributes(); +} + +void wxGrid::ClearAttrCache() +{ + if ( m_attrCache.row != -1 ) + { + wxGridCellAttr *oldAttr = m_attrCache.attr; + m_attrCache.attr = NULL; + m_attrCache.row = -1; + // wxSafeDecRec(...) might cause event processing that accesses + // the cached attribute, if one exists (e.g. by deleting the + // editor stored within the attribute). Therefore it is important + // to invalidate the cache before calling wxSafeDecRef! + wxSafeDecRef(oldAttr); + } +} + +void wxGrid::RefreshAttr(int row, int col) +{ + if ( m_attrCache.row == row && m_attrCache.col == col ) + ClearAttrCache(); +} + + +void wxGrid::CacheAttr(int row, int col, wxGridCellAttr *attr) const +{ + if ( attr != NULL ) + { + wxGrid * const self = const_cast(this); + + self->ClearAttrCache(); + self->m_attrCache.row = row; + self->m_attrCache.col = col; + self->m_attrCache.attr = attr; + wxSafeIncRef(attr); + } +} + +bool wxGrid::LookupAttr(int row, int col, wxGridCellAttr **attr) const +{ + if ( row == m_attrCache.row && col == m_attrCache.col ) + { + *attr = m_attrCache.attr; + wxSafeIncRef(m_attrCache.attr); + +#ifdef DEBUG_ATTR_CACHE + gs_nAttrCacheHits++; +#endif + + return true; + } + else + { +#ifdef DEBUG_ATTR_CACHE + gs_nAttrCacheMisses++; +#endif + + return false; + } +} + +wxGridCellAttr *wxGrid::GetCellAttr(int row, int col) const +{ + wxGridCellAttr *attr = NULL; + // Additional test to avoid looking at the cache e.g. for + // wxNoCellCoords, as this will confuse memory management. + if ( row >= 0 ) + { + if ( !LookupAttr(row, col, &attr) ) + { + attr = m_table ? m_table->GetAttr(row, col, wxGridCellAttr::Any) + : NULL; + CacheAttr(row, col, attr); + } + } + + if (attr) + { + attr->SetDefAttr(m_defaultCellAttr); + } + else + { + attr = m_defaultCellAttr; + attr->IncRef(); + } + + return attr; +} + +wxGridCellAttr *wxGrid::GetOrCreateCellAttr(int row, int col) const +{ + wxGridCellAttr *attr = NULL; + bool canHave = ((wxGrid*)this)->CanHaveAttributes(); + + wxCHECK_MSG( canHave, attr, wxT("Cell attributes not allowed")); + wxCHECK_MSG( m_table, attr, wxT("must have a table") ); + + attr = m_table->GetAttr(row, col, wxGridCellAttr::Cell); + if ( !attr ) + { + attr = new wxGridCellAttr(m_defaultCellAttr); + + // artificially inc the ref count to match DecRef() in caller + attr->IncRef(); + m_table->SetAttr(attr, row, col); + } + + return attr; +} + +// ---------------------------------------------------------------------------- +// setting column attributes (wrappers around SetColAttr) +// ---------------------------------------------------------------------------- + +void wxGrid::SetColFormatBool(int col) +{ + SetColFormatCustom(col, wxGRID_VALUE_BOOL); +} + +void wxGrid::SetColFormatNumber(int col) +{ + SetColFormatCustom(col, wxGRID_VALUE_NUMBER); +} + +void wxGrid::SetColFormatFloat(int col, int width, int precision) +{ + wxString typeName = wxGRID_VALUE_FLOAT; + if ( (width != -1) || (precision != -1) ) + { + typeName << wxT(':') << width << wxT(',') << precision; + } + + SetColFormatCustom(col, typeName); +} + +void wxGrid::SetColFormatCustom(int col, const wxString& typeName) +{ + wxGridCellAttr *attr = m_table->GetAttr(-1, col, wxGridCellAttr::Col ); + if (!attr) + attr = new wxGridCellAttr; + wxGridCellRenderer *renderer = GetDefaultRendererForType(typeName); + attr->SetRenderer(renderer); + wxGridCellEditor *editor = GetDefaultEditorForType(typeName); + attr->SetEditor(editor); + + SetColAttr(col, attr); + +} + +// ---------------------------------------------------------------------------- +// setting cell attributes: this is forwarded to the table +// ---------------------------------------------------------------------------- + +void wxGrid::SetAttr(int row, int col, wxGridCellAttr *attr) +{ + if ( CanHaveAttributes() ) + { + m_table->SetAttr(attr, row, col); + ClearAttrCache(); + } + else + { + wxSafeDecRef(attr); + } +} + +void wxGrid::SetRowAttr(int row, wxGridCellAttr *attr) +{ + if ( CanHaveAttributes() ) + { + m_table->SetRowAttr(attr, row); + ClearAttrCache(); + } + else + { + wxSafeDecRef(attr); + } +} + +void wxGrid::SetColAttr(int col, wxGridCellAttr *attr) +{ + if ( CanHaveAttributes() ) + { + m_table->SetColAttr(attr, col); + ClearAttrCache(); + } + else + { + wxSafeDecRef(attr); + } +} + +void wxGrid::SetCellBackgroundColour( int row, int col, const wxColour& colour ) +{ + if ( CanHaveAttributes() ) + { + wxGridCellAttr *attr = GetOrCreateCellAttr(row, col); + attr->SetBackgroundColour(colour); + attr->DecRef(); + } +} + +void wxGrid::SetCellTextColour( int row, int col, const wxColour& colour ) +{ + if ( CanHaveAttributes() ) + { + wxGridCellAttr *attr = GetOrCreateCellAttr(row, col); + attr->SetTextColour(colour); + attr->DecRef(); + } +} + +void wxGrid::SetCellFont( int row, int col, const wxFont& font ) +{ + if ( CanHaveAttributes() ) + { + wxGridCellAttr *attr = GetOrCreateCellAttr(row, col); + attr->SetFont(font); + attr->DecRef(); + } +} + +void wxGrid::SetCellAlignment( int row, int col, int horiz, int vert ) +{ + if ( CanHaveAttributes() ) + { + wxGridCellAttr *attr = GetOrCreateCellAttr(row, col); + attr->SetAlignment(horiz, vert); + attr->DecRef(); + } +} + +void wxGrid::SetCellOverflow( int row, int col, bool allow ) +{ + if ( CanHaveAttributes() ) + { + wxGridCellAttr *attr = GetOrCreateCellAttr(row, col); + attr->SetOverflow(allow); + attr->DecRef(); + } +} + +void wxGrid::SetCellSize( int row, int col, int num_rows, int num_cols ) +{ + if ( CanHaveAttributes() ) + { + int cell_rows, cell_cols; + + wxGridCellAttr *attr = GetOrCreateCellAttr(row, col); + attr->GetSize(&cell_rows, &cell_cols); + attr->SetSize(num_rows, num_cols); + attr->DecRef(); + + // Cannot set the size of a cell to 0 or negative values + // While it is perfectly legal to do that, this function cannot + // handle all the possibilies, do it by hand by getting the CellAttr. + // You can only set the size of a cell to 1,1 or greater with this fn + wxASSERT_MSG( !((cell_rows < 1) || (cell_cols < 1)), + wxT("wxGrid::SetCellSize setting cell size that is already part of another cell")); + wxASSERT_MSG( !((num_rows < 1) || (num_cols < 1)), + wxT("wxGrid::SetCellSize setting cell size to < 1")); + + // if this was already a multicell then "turn off" the other cells first + if ((cell_rows > 1) || (cell_cols > 1)) + { + int i, j; + for (j=row; j < row + cell_rows; j++) + { + for (i=col; i < col + cell_cols; i++) + { + if ((i != col) || (j != row)) + { + wxGridCellAttr *attr_stub = GetOrCreateCellAttr(j, i); + attr_stub->SetSize( 1, 1 ); + attr_stub->DecRef(); + } + } + } + } + + // mark the cells that will be covered by this cell to + // negative or zero values to point back at this cell + if (((num_rows > 1) || (num_cols > 1)) && (num_rows >= 1) && (num_cols >= 1)) + { + int i, j; + for (j=row; j < row + num_rows; j++) + { + for (i=col; i < col + num_cols; i++) + { + if ((i != col) || (j != row)) + { + wxGridCellAttr *attr_stub = GetOrCreateCellAttr(j, i); + attr_stub->SetSize( row - j, col - i ); + attr_stub->DecRef(); + } + } + } + } + } +} + +void wxGrid::SetCellRenderer(int row, int col, wxGridCellRenderer *renderer) +{ + if ( CanHaveAttributes() ) + { + wxGridCellAttr *attr = GetOrCreateCellAttr(row, col); + attr->SetRenderer(renderer); + attr->DecRef(); + } +} + +void wxGrid::SetCellEditor(int row, int col, wxGridCellEditor* editor) +{ + if ( CanHaveAttributes() ) + { + wxGridCellAttr *attr = GetOrCreateCellAttr(row, col); + attr->SetEditor(editor); + attr->DecRef(); + } +} + +void wxGrid::SetReadOnly(int row, int col, bool isReadOnly) +{ + if ( CanHaveAttributes() ) + { + wxGridCellAttr *attr = GetOrCreateCellAttr(row, col); + attr->SetReadOnly(isReadOnly); + attr->DecRef(); + } +} + +// ---------------------------------------------------------------------------- +// Data type registration +// ---------------------------------------------------------------------------- + +void wxGrid::RegisterDataType(const wxString& typeName, + wxGridCellRenderer* renderer, + wxGridCellEditor* editor) +{ + m_typeRegistry->RegisterDataType(typeName, renderer, editor); +} + + +wxGridCellEditor * wxGrid::GetDefaultEditorForCell(int row, int col) const +{ + wxString typeName = m_table->GetTypeName(row, col); + return GetDefaultEditorForType(typeName); +} + +wxGridCellRenderer * wxGrid::GetDefaultRendererForCell(int row, int col) const +{ + wxString typeName = m_table->GetTypeName(row, col); + return GetDefaultRendererForType(typeName); +} + +wxGridCellEditor * wxGrid::GetDefaultEditorForType(const wxString& typeName) const +{ + int index = m_typeRegistry->FindOrCloneDataType(typeName); + if ( index == wxNOT_FOUND ) + { + wxFAIL_MSG(wxString::Format(wxT("Unknown data type name [%s]"), typeName.c_str())); + + return NULL; + } + + return m_typeRegistry->GetEditor(index); +} + +wxGridCellRenderer * wxGrid::GetDefaultRendererForType(const wxString& typeName) const +{ + int index = m_typeRegistry->FindOrCloneDataType(typeName); + if ( index == wxNOT_FOUND ) + { + wxFAIL_MSG(wxString::Format(wxT("Unknown data type name [%s]"), typeName.c_str())); + + return NULL; + } + + return m_typeRegistry->GetRenderer(index); +} + +// ---------------------------------------------------------------------------- +// row/col size +// ---------------------------------------------------------------------------- + +void wxGrid::DoDisableLineResize(int line, wxGridFixedIndicesSet *& setFixed) +{ + if ( !setFixed ) + { + setFixed = new wxGridFixedIndicesSet; + } + + setFixed->insert(line); +} + +bool +wxGrid::DoCanResizeLine(int line, const wxGridFixedIndicesSet *setFixed) const +{ + return !setFixed || !setFixed->count(line); +} + +void wxGrid::EnableDragRowSize( bool enable ) +{ + m_canDragRowSize = enable; +} + +void wxGrid::EnableDragColSize( bool enable ) +{ + m_canDragColSize = enable; +} + +void wxGrid::EnableDragGridSize( bool enable ) +{ + m_canDragGridSize = enable; +} + +void wxGrid::EnableDragCell( bool enable ) +{ + m_canDragCell = enable; +} + +void wxGrid::SetDefaultRowSize( int height, bool resizeExistingRows ) +{ + m_defaultRowHeight = wxMax( height, m_minAcceptableRowHeight ); + + if ( resizeExistingRows ) + { + // since we are resizing all rows to the default row size, + // we can simply clear the row heights and row bottoms + // arrays (which also allows us to take advantage of + // some speed optimisations) + m_rowHeights.Empty(); + m_rowBottoms.Empty(); + if ( !GetBatchCount() ) + CalcDimensions(); + } +} + +namespace +{ + +// This is a common part of SetRowSize() and SetColSize() which takes care of +// updating the height/width of a row/column depending on its current value and +// the new one. +// +// Returns the difference between the new and the old size. +int UpdateRowOrColSize(int& sizeCurrent, int sizeNew) +{ + // On input here sizeCurrent can be negative if it's currently hidden (the + // real size is its absolute value then). And sizeNew can be 0 to indicate + // that the row/column should be hidden or -1 to indicate that it should be + // shown again. + + if ( sizeNew < 0 ) + { + // We're showing back a previously hidden row/column. + wxASSERT_MSG( sizeNew == -1, wxS("New size must be positive or -1.") ); + + // If it's already visible, simply do nothing. + if ( sizeCurrent >= 0 ) + return 0; + + // Otherwise show it by restoring its old size. + sizeCurrent = -sizeCurrent; + + // This is positive which is correct. + return sizeCurrent; + } + else if ( sizeNew == 0 ) + { + // We're hiding a row/column. + + // If it's already hidden, simply do nothing. + if ( sizeCurrent <= 0 ) + return 0; + + // Otherwise hide it and also remember the shown size to be able to + // restore it later. + sizeCurrent = -sizeCurrent; + + // This is negative which is correct. + return sizeCurrent; + } + else // We're just changing the row/column size. + { + // Here it could have been hidden or not previously. + const int sizeOld = sizeCurrent < 0 ? 0 : sizeCurrent; + + sizeCurrent = sizeNew; + + return sizeCurrent - sizeOld; + } +} + +} // anonymous namespace + +void wxGrid::SetRowSize( int row, int height ) +{ + // See comment in SetColSize + if ( height > 0 && height < GetRowMinimalAcceptableHeight()) + return; + + // The value of -1 is special and means to fit the height to the row label. + // As with the columns, ignore attempts to auto-size the hidden rows. + if ( height == -1 && GetRowHeight(row) != 0 ) + { + long w, h; + wxArrayString lines; + wxClientDC dc(m_rowLabelWin); + dc.SetFont(GetLabelFont()); + StringToLines(GetRowLabelValue( row ), lines); + GetTextBoxSize( dc, lines, &w, &h ); + + // As with the columns, don't make the row smaller than minimal height. + height = wxMax(h, GetRowMinimalHeight(row)); + } + + DoSetRowSize(row, height); +} + +void wxGrid::DoSetRowSize( int row, int height ) +{ + wxCHECK_RET( row >= 0 && row < m_numRows, wxT("invalid row index") ); + + if ( m_rowHeights.IsEmpty() ) + { + // need to really create the array + InitRowHeights(); + } + + const int diff = UpdateRowOrColSize(m_rowHeights[row], height); + if ( !diff ) + return; + + for ( int i = row; i < m_numRows; i++ ) + { + m_rowBottoms[i] += diff; + } + + InvalidateBestSize(); + + if ( !GetBatchCount() ) + { + CalcDimensions(); + Refresh(); + } +} + +void wxGrid::SetDefaultColSize( int width, bool resizeExistingCols ) +{ + // we dont allow zero default column width + m_defaultColWidth = wxMax( wxMax( width, m_minAcceptableColWidth ), 1 ); + + if ( resizeExistingCols ) + { + // since we are resizing all columns to the default column size, + // we can simply clear the col widths and col rights + // arrays (which also allows us to take advantage of + // some speed optimisations) + m_colWidths.Empty(); + m_colRights.Empty(); + if ( !GetBatchCount() ) + CalcDimensions(); + } +} + +void wxGrid::SetColSize( int col, int width ) +{ + // we intentionally don't test whether the width is less than + // GetColMinimalWidth() here but we do compare it with + // GetColMinimalAcceptableWidth() as otherwise things currently break (see + // #651) -- and we also always allow the width of 0 as it has the special + // sense of hiding the column + if ( width > 0 && width < GetColMinimalAcceptableWidth() ) + return; + + // The value of -1 is special and means to fit the width to the column label. + // + // Notice that we currently don't support auto-sizing hidden columns (we + // could, but it's not clear whether this is really needed and it would + // make the code more complex), and for them passing -1 simply means to + // show the column back using its old size. + if ( width == -1 && GetColWidth(col) != 0 ) + { + long w, h; + wxArrayString lines; + wxClientDC dc(m_colWindow); + dc.SetFont(GetLabelFont()); + StringToLines(GetColLabelValue(col), lines); + if ( GetColLabelTextOrientation() == wxHORIZONTAL ) + GetTextBoxSize( dc, lines, &w, &h ); + else + GetTextBoxSize( dc, lines, &h, &w ); + width = w + 6; + + // Check that it is not less than the minimal width and do use the + // possibly greater than minimal-acceptable-width minimal-width itself + // here as we shouldn't become too small when auto-sizing, otherwise + // the column could be resized to be too small by double clicking its + // divider line (which ends up in a call to this function) even though + // it couldn't be resized to this size by dragging it. + width = wxMax(width, GetColMinimalWidth(col)); + } + + DoSetColSize(col, width); +} + +void wxGrid::DoSetColSize( int col, int width ) +{ + wxCHECK_RET( col >= 0 && col < m_numCols, wxT("invalid column index") ); + + if ( m_colWidths.IsEmpty() ) + { + // need to really create the array + InitColWidths(); + } + + const int diff = UpdateRowOrColSize(m_colWidths[col], width); + if ( !diff ) + return; + + if ( m_useNativeHeader ) + GetGridColHeader()->UpdateColumn(col); + //else: will be refreshed when the header is redrawn + + for ( int colPos = GetColPos(col); colPos < m_numCols; colPos++ ) + { + m_colRights[GetColAt(colPos)] += diff; + } + + InvalidateBestSize(); + + if ( !GetBatchCount() ) + { + CalcDimensions(); + Refresh(); + } +} + +void wxGrid::SetColMinimalWidth( int col, int width ) +{ + if (width > GetColMinimalAcceptableWidth()) + { + wxLongToLongHashMap::key_type key = (wxLongToLongHashMap::key_type)col; + m_colMinWidths[key] = width; + } +} + +void wxGrid::SetRowMinimalHeight( int row, int width ) +{ + if (width > GetRowMinimalAcceptableHeight()) + { + wxLongToLongHashMap::key_type key = (wxLongToLongHashMap::key_type)row; + m_rowMinHeights[key] = width; + } +} + +int wxGrid::GetColMinimalWidth(int col) const +{ + wxLongToLongHashMap::key_type key = (wxLongToLongHashMap::key_type)col; + wxLongToLongHashMap::const_iterator it = m_colMinWidths.find(key); + + return it != m_colMinWidths.end() ? (int)it->second : m_minAcceptableColWidth; +} + +int wxGrid::GetRowMinimalHeight(int row) const +{ + wxLongToLongHashMap::key_type key = (wxLongToLongHashMap::key_type)row; + wxLongToLongHashMap::const_iterator it = m_rowMinHeights.find(key); + + return it != m_rowMinHeights.end() ? (int)it->second : m_minAcceptableRowHeight; +} + +void wxGrid::SetColMinimalAcceptableWidth( int width ) +{ + // We do allow a width of 0 since this gives us + // an easy way to temporarily hiding columns. + if ( width >= 0 ) + m_minAcceptableColWidth = width; +} + +void wxGrid::SetRowMinimalAcceptableHeight( int height ) +{ + // We do allow a height of 0 since this gives us + // an easy way to temporarily hiding rows. + if ( height >= 0 ) + m_minAcceptableRowHeight = height; +} + +int wxGrid::GetColMinimalAcceptableWidth() const +{ + return m_minAcceptableColWidth; +} + +int wxGrid::GetRowMinimalAcceptableHeight() const +{ + return m_minAcceptableRowHeight; +} + +// ---------------------------------------------------------------------------- +// auto sizing +// ---------------------------------------------------------------------------- + +void +wxGrid::AutoSizeColOrRow(int colOrRow, bool setAsMin, wxGridDirection direction) +{ + const bool column = direction == wxGRID_COLUMN; + + // We don't support auto-sizing hidden rows or columns, this doesn't seem + // to make much sense. + if ( column ) + { + if ( GetColWidth(colOrRow) == 0 ) + return; + } + else + { + if ( GetRowHeight(colOrRow) == 0 ) + return; + } + + wxClientDC dc(m_gridWin); + + // cancel editing of cell + HideCellEditControl(); + SaveEditControlValue(); + + // initialize both of them just to avoid compiler warnings even if only + // really needs to be initialized here + int row, + col; + if ( column ) + { + row = -1; + col = colOrRow; + } + else + { + row = colOrRow; + col = -1; + } + + wxCoord extent, extentMax = 0; + int max = column ? m_numRows : m_numCols; + for ( int rowOrCol = 0; rowOrCol < max; rowOrCol++ ) + { + if ( column ) + { + if ( !IsRowShown(rowOrCol) ) + continue; + + row = rowOrCol; + col = colOrRow; + } + else + { + if ( !IsColShown(rowOrCol) ) + continue; + + row = colOrRow; + col = rowOrCol; + } + + // we need to account for the cells spanning multiple columns/rows: + // while they may need a lot of space, they don't need all of it in + // this column/row + int numRows, numCols; + const CellSpan span = GetCellSize(row, col, &numRows, &numCols); + if ( span == CellSpan_Inside ) + { + // we need to get the size of the main cell, not of a cell hidden + // by it + row += numRows; + col += numCols; + + // get the size of the main cell too + GetCellSize(row, col, &numRows, &numCols); + } + + // get cell ( main cell if CellSpan_Inside ) renderer best size + wxGridCellAttr *attr = GetCellAttr(row, col); + wxGridCellRenderer *renderer = attr->GetRenderer(this, row, col); + if ( renderer ) + { + wxSize size = renderer->GetBestSize(*this, *attr, dc, row, col); + extent = column ? size.x : size.y; + + if ( span != CellSpan_None ) + { + // we spread the size of a spanning cell over all the cells it + // covers evenly -- this is probably not ideal but we can't + // really do much better here + // + // notice that numCols and numRows are never 0 as they + // correspond to the size of the main cell of the span and not + // of the cell inside it + extent /= column ? numCols : numRows; + } + + if ( extent > extentMax ) + extentMax = extent; + + renderer->DecRef(); + } + + attr->DecRef(); + } + + // now also compare with the column label extent + wxCoord w, h; + dc.SetFont( GetLabelFont() ); + + if ( column ) + { + dc.GetMultiLineTextExtent( GetColLabelValue(colOrRow), &w, &h ); + if ( GetColLabelTextOrientation() == wxVERTICAL ) + w = h; + } + else + dc.GetMultiLineTextExtent( GetRowLabelValue(colOrRow), &w, &h ); + + extent = column ? w : h; + if ( extent > extentMax ) + extentMax = extent; + + if ( !extentMax ) + { + // empty column - give default extent (notice that if extentMax is less + // than default extent but != 0, it's OK) + extentMax = column ? m_defaultColWidth : m_defaultRowHeight; + } + else + { + if ( column ) + // leave some space around text + extentMax += 10; + else + extentMax += 6; + } + + if ( column ) + { + // Ensure automatic width is not less than minimal width. See the + // comment in SetColSize() for explanation of why this isn't done + // in SetColSize(). + if ( !setAsMin ) + extentMax = wxMax(extentMax, GetColMinimalWidth(colOrRow)); + + SetColSize( colOrRow, extentMax ); + if ( !GetBatchCount() ) + { + if ( m_useNativeHeader ) + { + GetGridColHeader()->UpdateColumn(colOrRow); + } + else + { + int cw, ch, dummy; + m_gridWin->GetClientSize( &cw, &ch ); + wxRect rect ( CellToRect( 0, colOrRow ) ); + rect.y = 0; + CalcScrolledPosition(rect.x, 0, &rect.x, &dummy); + rect.width = cw - rect.x; + rect.height = m_colLabelHeight; + GetColLabelWindow()->Refresh( true, &rect ); + } + } + } + else + { + // Ensure automatic width is not less than minimal height. See the + // comment in SetColSize() for explanation of why this isn't done + // in SetRowSize(). + if ( !setAsMin ) + extentMax = wxMax(extentMax, GetRowMinimalHeight(colOrRow)); + + SetRowSize(colOrRow, extentMax); + if ( !GetBatchCount() ) + { + int cw, ch, dummy; + m_gridWin->GetClientSize( &cw, &ch ); + wxRect rect( CellToRect( colOrRow, 0 ) ); + rect.x = 0; + CalcScrolledPosition(0, rect.y, &dummy, &rect.y); + rect.width = m_rowLabelWidth; + rect.height = ch - rect.y; + m_rowLabelWin->Refresh( true, &rect ); + } + } + + if ( setAsMin ) + { + if ( column ) + SetColMinimalWidth(colOrRow, extentMax); + else + SetRowMinimalHeight(colOrRow, extentMax); + } +} + +wxCoord wxGrid::CalcColOrRowLabelAreaMinSize(wxGridDirection direction) +{ + // calculate size for the rows or columns? + const bool calcRows = direction == wxGRID_ROW; + + wxClientDC dc(calcRows ? GetGridRowLabelWindow() + : GetGridColLabelWindow()); + dc.SetFont(GetLabelFont()); + + // which dimension should we take into account for calculations? + // + // for columns, the text can be only horizontal so it's easy but for rows + // we also have to take into account the text orientation + const bool + useWidth = calcRows || (GetColLabelTextOrientation() == wxVERTICAL); + + wxArrayString lines; + wxCoord extentMax = 0; + + const int numRowsOrCols = calcRows ? m_numRows : m_numCols; + for ( int rowOrCol = 0; rowOrCol < numRowsOrCols; rowOrCol++ ) + { + lines.Clear(); + + wxString label = calcRows ? GetRowLabelValue(rowOrCol) + : GetColLabelValue(rowOrCol); + StringToLines(label, lines); + + long w, h; + GetTextBoxSize(dc, lines, &w, &h); + + const wxCoord extent = useWidth ? w : h; + if ( extent > extentMax ) + extentMax = extent; + } + + if ( !extentMax ) + { + // empty column - give default extent (notice that if extentMax is less + // than default extent but != 0, it's OK) + extentMax = calcRows ? GetDefaultRowLabelSize() + : GetDefaultColLabelSize(); + } + + // leave some space around text (taken from AutoSizeColOrRow) + if ( calcRows ) + extentMax += 10; + else + extentMax += 6; + + return extentMax; +} + +int wxGrid::SetOrCalcColumnSizes(bool calcOnly, bool setAsMin) +{ + int width = m_rowLabelWidth; + + wxGridUpdateLocker locker; + if(!calcOnly) + locker.Create(this); + + for ( int col = 0; col < m_numCols; col++ ) + { + if ( !calcOnly ) + AutoSizeColumn(col, setAsMin); + + width += GetColWidth(col); + } + + return width; +} + +int wxGrid::SetOrCalcRowSizes(bool calcOnly, bool setAsMin) +{ + int height = m_colLabelHeight; + + wxGridUpdateLocker locker; + if(!calcOnly) + locker.Create(this); + + for ( int row = 0; row < m_numRows; row++ ) + { + if ( !calcOnly ) + AutoSizeRow(row, setAsMin); + + height += GetRowHeight(row); + } + + return height; +} + +void wxGrid::AutoSize() +{ + wxGridUpdateLocker locker(this); + + wxSize size(SetOrCalcColumnSizes(false) - m_rowLabelWidth + m_extraWidth, + SetOrCalcRowSizes(false) - m_colLabelHeight + m_extraHeight); + + // we know that we're not going to have scrollbars so disable them now to + // avoid trouble in SetClientSize() which can otherwise set the correct + // client size but also leave space for (not needed any more) scrollbars + SetScrollbars(m_xScrollPixelsPerLine, m_yScrollPixelsPerLine, + 0, 0, 0, 0, true); + + SetClientSize(size.x + m_rowLabelWidth, size.y + m_colLabelHeight); +} + +void wxGrid::AutoSizeRowLabelSize( int row ) +{ + // Hide the edit control, so it + // won't interfere with drag-shrinking. + if ( IsCellEditControlShown() ) + { + HideCellEditControl(); + SaveEditControlValue(); + } + + // autosize row height depending on label text + SetRowSize(row, -1); + + ForceRefresh(); +} + +void wxGrid::AutoSizeColLabelSize( int col ) +{ + // Hide the edit control, so it + // won't interfere with drag-shrinking. + if ( IsCellEditControlShown() ) + { + HideCellEditControl(); + SaveEditControlValue(); + } + + // autosize column width depending on label text + SetColSize(col, -1); + + ForceRefresh(); +} + +wxSize wxGrid::DoGetBestSize() const +{ + wxGrid * const self = const_cast(this); + + // we do the same as in AutoSize() here with the exception that we don't + // change the column/row sizes, only calculate them + wxSize size(self->SetOrCalcColumnSizes(true) - m_rowLabelWidth + m_extraWidth, + self->SetOrCalcRowSizes(true) - m_colLabelHeight + m_extraHeight); + + return wxSize(size.x + m_rowLabelWidth, size.y + m_colLabelHeight) + + GetWindowBorderSize(); +} + +void wxGrid::Fit() +{ + AutoSize(); +} + +#if WXWIN_COMPATIBILITY_2_8 +wxPen& wxGrid::GetDividerPen() const +{ + return wxNullPen; +} +#endif // WXWIN_COMPATIBILITY_2_8 + +// ---------------------------------------------------------------------------- +// cell value accessor functions +// ---------------------------------------------------------------------------- + +void wxGrid::SetCellValue( int row, int col, const wxString& s ) +{ + if ( m_table ) + { + m_table->SetValue( row, col, s ); + if ( !GetBatchCount() ) + { + int dummy; + wxRect rect( CellToRect( row, col ) ); + rect.x = 0; + rect.width = m_gridWin->GetClientSize().GetWidth(); + CalcScrolledPosition(0, rect.y, &dummy, &rect.y); + m_gridWin->Refresh( false, &rect ); + } + + if ( m_currentCellCoords.GetRow() == row && + m_currentCellCoords.GetCol() == col && + IsCellEditControlShown()) + // Note: If we are using IsCellEditControlEnabled, + // this interacts badly with calling SetCellValue from + // an EVT_GRID_CELL_CHANGE handler. + { + HideCellEditControl(); + ShowCellEditControl(); // will reread data from table + } + } +} + +// ---------------------------------------------------------------------------- +// block, row and column selection +// ---------------------------------------------------------------------------- + +void wxGrid::SelectRow( int row, bool addToSelected ) +{ + if ( !m_selection ) + return; + + if ( !addToSelected ) + ClearSelection(); + + m_selection->SelectRow(row); +} + +void wxGrid::SelectCol( int col, bool addToSelected ) +{ + if ( !m_selection ) + return; + + if ( !addToSelected ) + ClearSelection(); + + m_selection->SelectCol(col); +} + +void wxGrid::SelectBlock(int topRow, int leftCol, int bottomRow, int rightCol, + bool addToSelected) +{ + if ( !m_selection ) + return; + + if ( !addToSelected ) + ClearSelection(); + + m_selection->SelectBlock(topRow, leftCol, bottomRow, rightCol); +} + +void wxGrid::SelectAll() +{ + if ( m_numRows > 0 && m_numCols > 0 ) + { + if ( m_selection ) + m_selection->SelectBlock( 0, 0, m_numRows - 1, m_numCols - 1 ); + } +} + +// ---------------------------------------------------------------------------- +// cell, row and col deselection +// ---------------------------------------------------------------------------- + +void wxGrid::DeselectLine(int line, const wxGridOperations& oper) +{ + if ( !m_selection ) + return; + + const wxGridSelectionModes mode = m_selection->GetSelectionMode(); + if ( mode == oper.GetSelectionMode() || + mode == wxGrid::wxGridSelectRowsOrColumns ) + { + const wxGridCellCoords c(oper.MakeCoords(line, 0)); + if ( m_selection->IsInSelection(c) ) + m_selection->ToggleCellSelection(c); + } + else if ( mode != oper.Dual().GetSelectionMode() ) + { + const int nOther = oper.Dual().GetNumberOfLines(this); + for ( int i = 0; i < nOther; i++ ) + { + const wxGridCellCoords c(oper.MakeCoords(line, i)); + if ( m_selection->IsInSelection(c) ) + m_selection->ToggleCellSelection(c); + } + } + //else: can only select orthogonal lines so no lines in this direction + // could have been selected anyhow +} + +void wxGrid::DeselectRow(int row) +{ + DeselectLine(row, wxGridRowOperations()); +} + +void wxGrid::DeselectCol(int col) +{ + DeselectLine(col, wxGridColumnOperations()); +} + +void wxGrid::DeselectCell( int row, int col ) +{ + if ( m_selection && m_selection->IsInSelection(row, col) ) + m_selection->ToggleCellSelection(row, col); +} + +bool wxGrid::IsSelection() const +{ + return ( m_selection && (m_selection->IsSelection() || + ( m_selectedBlockTopLeft != wxGridNoCellCoords && + m_selectedBlockBottomRight != wxGridNoCellCoords) ) ); +} + +bool wxGrid::IsInSelection( int row, int col ) const +{ + return ( m_selection && (m_selection->IsInSelection( row, col ) || + ( row >= m_selectedBlockTopLeft.GetRow() && + col >= m_selectedBlockTopLeft.GetCol() && + row <= m_selectedBlockBottomRight.GetRow() && + col <= m_selectedBlockBottomRight.GetCol() )) ); +} + +wxGridCellCoordsArray wxGrid::GetSelectedCells() const +{ + if (!m_selection) + { + wxGridCellCoordsArray a; + return a; + } + + return m_selection->m_cellSelection; +} + +wxGridCellCoordsArray wxGrid::GetSelectionBlockTopLeft() const +{ + if (!m_selection) + { + wxGridCellCoordsArray a; + return a; + } + + return m_selection->m_blockSelectionTopLeft; +} + +wxGridCellCoordsArray wxGrid::GetSelectionBlockBottomRight() const +{ + if (!m_selection) + { + wxGridCellCoordsArray a; + return a; + } + + return m_selection->m_blockSelectionBottomRight; +} + +wxArrayInt wxGrid::GetSelectedRows() const +{ + if (!m_selection) + { + wxArrayInt a; + return a; + } + + return m_selection->m_rowSelection; +} + +wxArrayInt wxGrid::GetSelectedCols() const +{ + if (!m_selection) + { + wxArrayInt a; + return a; + } + + return m_selection->m_colSelection; +} + +void wxGrid::ClearSelection() +{ + wxRect r1 = BlockToDeviceRect(m_selectedBlockTopLeft, + m_selectedBlockBottomRight); + wxRect r2 = BlockToDeviceRect(m_currentCellCoords, + m_selectedBlockCorner); + + m_selectedBlockTopLeft = + m_selectedBlockBottomRight = + m_selectedBlockCorner = wxGridNoCellCoords; + + if ( !r1.IsEmpty() ) + RefreshRect(r1, false); + if ( !r2.IsEmpty() ) + RefreshRect(r2, false); + + if ( m_selection ) + m_selection->ClearSelection(); +} + +// This function returns the rectangle that encloses the given block +// in device coords clipped to the client size of the grid window. +// +wxRect wxGrid::BlockToDeviceRect( const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight ) const +{ + wxRect resultRect; + wxRect tempCellRect = CellToRect(topLeft); + if ( tempCellRect != wxGridNoCellRect ) + { + resultRect = tempCellRect; + } + else + { + resultRect = wxRect(0, 0, 0, 0); + } + + tempCellRect = CellToRect(bottomRight); + if ( tempCellRect != wxGridNoCellRect ) + { + resultRect += tempCellRect; + } + else + { + // If both inputs were "wxGridNoCellRect," then there's nothing to do. + return wxGridNoCellRect; + } + + // Ensure that left/right and top/bottom pairs are in order. + int left = resultRect.GetLeft(); + int top = resultRect.GetTop(); + int right = resultRect.GetRight(); + int bottom = resultRect.GetBottom(); + + int leftCol = topLeft.GetCol(); + int topRow = topLeft.GetRow(); + int rightCol = bottomRight.GetCol(); + int bottomRow = bottomRight.GetRow(); + + if (left > right) + { + int tmp = left; + left = right; + right = tmp; + + tmp = leftCol; + leftCol = rightCol; + rightCol = tmp; + } + + if (top > bottom) + { + int tmp = top; + top = bottom; + bottom = tmp; + + tmp = topRow; + topRow = bottomRow; + bottomRow = tmp; + } + + // The following loop is ONLY necessary to detect and handle merged cells. + int cw, ch; + m_gridWin->GetClientSize( &cw, &ch ); + + // Get the origin coordinates: notice that they will be negative if the + // grid is scrolled downwards/to the right. + int gridOriginX = 0; + int gridOriginY = 0; + CalcScrolledPosition(gridOriginX, gridOriginY, &gridOriginX, &gridOriginY); + + int onScreenLeftmostCol = internalXToCol(-gridOriginX); + int onScreenUppermostRow = internalYToRow(-gridOriginY); + + int onScreenRightmostCol = internalXToCol(-gridOriginX + cw); + int onScreenBottommostRow = internalYToRow(-gridOriginY + ch); + + // Bound our loop so that we only examine the portion of the selected block + // that is shown on screen. Therefore, we compare the Top-Left block values + // to the Top-Left screen values, and the Bottom-Right block values to the + // Bottom-Right screen values, choosing appropriately. + const int visibleTopRow = wxMax(topRow, onScreenUppermostRow); + const int visibleBottomRow = wxMin(bottomRow, onScreenBottommostRow); + const int visibleLeftCol = wxMax(leftCol, onScreenLeftmostCol); + const int visibleRightCol = wxMin(rightCol, onScreenRightmostCol); + + for ( int j = visibleTopRow; j <= visibleBottomRow; j++ ) + { + for ( int i = visibleLeftCol; i <= visibleRightCol; i++ ) + { + if ( (j == visibleTopRow) || (j == visibleBottomRow) || + (i == visibleLeftCol) || (i == visibleRightCol) ) + { + tempCellRect = CellToRect( j, i ); + + if (tempCellRect.x < left) + left = tempCellRect.x; + if (tempCellRect.y < top) + top = tempCellRect.y; + if (tempCellRect.x + tempCellRect.width > right) + right = tempCellRect.x + tempCellRect.width; + if (tempCellRect.y + tempCellRect.height > bottom) + bottom = tempCellRect.y + tempCellRect.height; + } + else + { + i = visibleRightCol; // jump over inner cells. + } + } + } + + // Convert to scrolled coords + CalcScrolledPosition( left, top, &left, &top ); + CalcScrolledPosition( right, bottom, &right, &bottom ); + + if (right < 0 || bottom < 0 || left > cw || top > ch) + return wxRect(0,0,0,0); + + resultRect.SetLeft( wxMax(0, left) ); + resultRect.SetTop( wxMax(0, top) ); + resultRect.SetRight( wxMin(cw, right) ); + resultRect.SetBottom( wxMin(ch, bottom) ); + + return resultRect; +} + +void wxGrid::DoSetSizes(const wxGridSizesInfo& sizeInfo, + const wxGridOperations& oper) +{ + BeginBatch(); + oper.SetDefaultLineSize(this, sizeInfo.m_sizeDefault, true); + const int numLines = oper.GetNumberOfLines(this); + for ( int i = 0; i < numLines; i++ ) + { + int size = sizeInfo.GetSize(i); + if ( size != sizeInfo.m_sizeDefault) + oper.SetLineSize(this, i, size); + } + EndBatch(); +} + +void wxGrid::SetColSizes(const wxGridSizesInfo& sizeInfo) +{ + DoSetSizes(sizeInfo, wxGridColumnOperations()); +} + +void wxGrid::SetRowSizes(const wxGridSizesInfo& sizeInfo) +{ + DoSetSizes(sizeInfo, wxGridRowOperations()); +} + +wxGridSizesInfo::wxGridSizesInfo(int defSize, const wxArrayInt& allSizes) +{ + m_sizeDefault = defSize; + for ( size_t i = 0; i < allSizes.size(); i++ ) + { + if ( allSizes[i] != defSize ) + m_customSizes[i] = allSizes[i]; + } +} + +int wxGridSizesInfo::GetSize(unsigned pos) const +{ + wxUnsignedToIntHashMap::const_iterator it = m_customSizes.find(pos); + + // if it's not found return the default + if ( it == m_customSizes.end() ) + return m_sizeDefault; + + // otherwise return 0 if it's hidden, currently there is no way to get + // its size before it had been hidden + if ( it->second < 0 ) + return 0; + + return it->second; +} + +// ---------------------------------------------------------------------------- +// drop target +// ---------------------------------------------------------------------------- + +#if wxUSE_DRAG_AND_DROP + +// this allow setting drop target directly on wxGrid +void wxGrid::SetDropTarget(wxDropTarget *dropTarget) +{ + GetGridWindow()->SetDropTarget(dropTarget); +} + +#endif // wxUSE_DRAG_AND_DROP + +// ---------------------------------------------------------------------------- +// grid event classes +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS( wxGridEvent, wxNotifyEvent ) + +wxGridEvent::wxGridEvent( int id, wxEventType type, wxObject* obj, + int row, int col, int x, int y, bool sel, + bool control, bool shift, bool alt, bool meta ) + : wxNotifyEvent( type, id ), + wxKeyboardState(control, shift, alt, meta) +{ + Init(row, col, x, y, sel); + + SetEventObject(obj); +} + +IMPLEMENT_DYNAMIC_CLASS( wxGridSizeEvent, wxNotifyEvent ) + +wxGridSizeEvent::wxGridSizeEvent( int id, wxEventType type, wxObject* obj, + int rowOrCol, int x, int y, + bool control, bool shift, bool alt, bool meta ) + : wxNotifyEvent( type, id ), + wxKeyboardState(control, shift, alt, meta) +{ + Init(rowOrCol, x, y); + + SetEventObject(obj); +} + + +IMPLEMENT_DYNAMIC_CLASS( wxGridRangeSelectEvent, wxNotifyEvent ) + +wxGridRangeSelectEvent::wxGridRangeSelectEvent(int id, wxEventType type, wxObject* obj, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + bool sel, bool control, + bool shift, bool alt, bool meta ) + : wxNotifyEvent( type, id ), + wxKeyboardState(control, shift, alt, meta) +{ + Init(topLeft, bottomRight, sel); + + SetEventObject(obj); +} + + +IMPLEMENT_DYNAMIC_CLASS(wxGridEditorCreatedEvent, wxCommandEvent) + +wxGridEditorCreatedEvent::wxGridEditorCreatedEvent(int id, wxEventType type, + wxObject* obj, int row, + int col, wxControl* ctrl) + : wxCommandEvent(type, id) +{ + SetEventObject(obj); + m_row = row; + m_col = col; + m_ctrl = ctrl; +} + + +// ---------------------------------------------------------------------------- +// wxGridTypeRegistry +// ---------------------------------------------------------------------------- + +wxGridTypeRegistry::~wxGridTypeRegistry() +{ + size_t count = m_typeinfo.GetCount(); + for ( size_t i = 0; i < count; i++ ) + delete m_typeinfo[i]; +} + +void wxGridTypeRegistry::RegisterDataType(const wxString& typeName, + wxGridCellRenderer* renderer, + wxGridCellEditor* editor) +{ + wxGridDataTypeInfo* info = new wxGridDataTypeInfo(typeName, renderer, editor); + + // is it already registered? + int loc = FindRegisteredDataType(typeName); + if ( loc != wxNOT_FOUND ) + { + delete m_typeinfo[loc]; + m_typeinfo[loc] = info; + } + else + { + m_typeinfo.Add(info); + } +} + +int wxGridTypeRegistry::FindRegisteredDataType(const wxString& typeName) +{ + size_t count = m_typeinfo.GetCount(); + for ( size_t i = 0; i < count; i++ ) + { + if ( typeName == m_typeinfo[i]->m_typeName ) + { + return i; + } + } + + return wxNOT_FOUND; +} + +int wxGridTypeRegistry::FindDataType(const wxString& typeName) +{ + int index = FindRegisteredDataType(typeName); + if ( index == wxNOT_FOUND ) + { + // check whether this is one of the standard ones, in which case + // register it "on the fly" +#if wxUSE_TEXTCTRL + if ( typeName == wxGRID_VALUE_STRING ) + { + RegisterDataType(wxGRID_VALUE_STRING, + new wxGridCellStringRenderer, + new wxGridCellTextEditor); + } + else +#endif // wxUSE_TEXTCTRL +#if wxUSE_CHECKBOX + if ( typeName == wxGRID_VALUE_BOOL ) + { + RegisterDataType(wxGRID_VALUE_BOOL, + new wxGridCellBoolRenderer, + new wxGridCellBoolEditor); + } + else +#endif // wxUSE_CHECKBOX +#if wxUSE_TEXTCTRL + if ( typeName == wxGRID_VALUE_NUMBER ) + { + RegisterDataType(wxGRID_VALUE_NUMBER, + new wxGridCellNumberRenderer, + new wxGridCellNumberEditor); + } + else if ( typeName == wxGRID_VALUE_FLOAT ) + { + RegisterDataType(wxGRID_VALUE_FLOAT, + new wxGridCellFloatRenderer, + new wxGridCellFloatEditor); + } + else +#endif // wxUSE_TEXTCTRL +#if wxUSE_COMBOBOX + if ( typeName == wxGRID_VALUE_CHOICE ) + { + RegisterDataType(wxGRID_VALUE_CHOICE, + new wxGridCellStringRenderer, + new wxGridCellChoiceEditor); + } + else +#endif // wxUSE_COMBOBOX + { + return wxNOT_FOUND; + } + + // we get here only if just added the entry for this type, so return + // the last index + index = m_typeinfo.GetCount() - 1; + } + + return index; +} + +int wxGridTypeRegistry::FindOrCloneDataType(const wxString& typeName) +{ + int index = FindDataType(typeName); + if ( index == wxNOT_FOUND ) + { + // the first part of the typename is the "real" type, anything after ':' + // are the parameters for the renderer + index = FindDataType(typeName.BeforeFirst(wxT(':'))); + if ( index == wxNOT_FOUND ) + { + return wxNOT_FOUND; + } + + wxGridCellRenderer *renderer = GetRenderer(index); + wxGridCellRenderer *rendererOld = renderer; + renderer = renderer->Clone(); + rendererOld->DecRef(); + + wxGridCellEditor *editor = GetEditor(index); + wxGridCellEditor *editorOld = editor; + editor = editor->Clone(); + editorOld->DecRef(); + + // do it even if there are no parameters to reset them to defaults + wxString params = typeName.AfterFirst(wxT(':')); + renderer->SetParameters(params); + editor->SetParameters(params); + + // register the new typename + RegisterDataType(typeName, renderer, editor); + + // we just registered it, it's the last one + index = m_typeinfo.GetCount() - 1; + } + + return index; +} + +wxGridCellRenderer* wxGridTypeRegistry::GetRenderer(int index) +{ + wxGridCellRenderer* renderer = m_typeinfo[index]->m_renderer; + if (renderer) + renderer->IncRef(); + + return renderer; +} + +wxGridCellEditor* wxGridTypeRegistry::GetEditor(int index) +{ + wxGridCellEditor* editor = m_typeinfo[index]->m_editor; + if (editor) + editor->IncRef(); + + return editor; +} + +#endif // wxUSE_GRID diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/gridctrl.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/gridctrl.cpp new file mode 100644 index 0000000000..25c3359d3b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/gridctrl.cpp @@ -0,0 +1,952 @@ +/////////////////////////////////////////////////////////////////////////// +// Name: src/generic/gridctrl.cpp +// Purpose: wxGrid controls +// Author: Paul Gammans, Roger Gammans +// Modified by: +// Created: 11/04/2001 +// Copyright: (c) The Computer Surgery (paul@compsurg.co.uk) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_GRID + +#include "wx/generic/gridctrl.h" +#include "wx/generic/grideditors.h" + +#ifndef WX_PRECOMP + #include "wx/textctrl.h" + #include "wx/dc.h" + #include "wx/combobox.h" + #include "wx/settings.h" + #include "wx/log.h" + #include "wx/checkbox.h" +#endif // WX_PRECOMP + +#include "wx/tokenzr.h" +#include "wx/renderer.h" + + +// ---------------------------------------------------------------------------- +// wxGridCellRenderer +// ---------------------------------------------------------------------------- + +void wxGridCellRenderer::Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int WXUNUSED(row), int WXUNUSED(col), + bool isSelected) +{ + dc.SetBackgroundMode( wxBRUSHSTYLE_SOLID ); + + wxColour clr; + if ( grid.IsThisEnabled() ) + { + if ( isSelected ) + { + if ( grid.HasFocus() ) + clr = grid.GetSelectionBackground(); + else + clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW); + } + else + { + clr = attr.GetBackgroundColour(); + } + } + else // grey out fields if the grid is disabled + { + clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); + } + + dc.SetBrush(clr); + dc.SetPen( *wxTRANSPARENT_PEN ); + dc.DrawRectangle(rect); +} + + +// ---------------------------------------------------------------------------- +// wxGridCellDateTimeRenderer +// ---------------------------------------------------------------------------- + +#if wxUSE_DATETIME + +// Enables a grid cell to display a formatted date and or time + +wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(const wxString& outformat, const wxString& informat) +{ + m_iformat = informat; + m_oformat = outformat; + m_tz = wxDateTime::Local; + m_dateDef = wxDefaultDateTime; +} + +wxGridCellRenderer *wxGridCellDateTimeRenderer::Clone() const +{ + wxGridCellDateTimeRenderer *renderer = new wxGridCellDateTimeRenderer; + renderer->m_iformat = m_iformat; + renderer->m_oformat = m_oformat; + renderer->m_dateDef = m_dateDef; + renderer->m_tz = m_tz; + + return renderer; +} + +wxString wxGridCellDateTimeRenderer::GetString(const wxGrid& grid, int row, int col) +{ + wxGridTableBase *table = grid.GetTable(); + + bool hasDatetime = false; + wxDateTime val; + wxString text; + if ( table->CanGetValueAs(row, col, wxGRID_VALUE_DATETIME) ) + { + void * tempval = table->GetValueAsCustom(row, col,wxGRID_VALUE_DATETIME); + + if (tempval) + { + val = *((wxDateTime *)tempval); + hasDatetime = true; + delete (wxDateTime *)tempval; + } + + } + + if (!hasDatetime ) + { + text = table->GetValue(row, col); + const char * const end = val.ParseFormat(text, m_iformat, m_dateDef); + hasDatetime = end && !*end; + } + + if ( hasDatetime ) + text = val.Format(m_oformat, m_tz ); + + // If we failed to parse string just show what we where given? + return text; +} + +void wxGridCellDateTimeRenderer::Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rectCell, + int row, int col, + bool isSelected) +{ + wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected); + + SetTextColoursAndFont(grid, attr, dc, isSelected); + + // draw the text right aligned by default + int hAlign = wxALIGN_RIGHT, + vAlign = wxALIGN_INVALID; + attr.GetNonDefaultAlignment(&hAlign, &vAlign); + + wxRect rect = rectCell; + rect.Inflate(-1); + + grid.DrawTextRectangle(dc, GetString(grid, row, col), rect, hAlign, vAlign); +} + +wxSize wxGridCellDateTimeRenderer::GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col) +{ + return DoGetBestSize(attr, dc, GetString(grid, row, col)); +} + +void wxGridCellDateTimeRenderer::SetParameters(const wxString& params) +{ + if (!params.empty()) + m_oformat=params; +} + +#endif // wxUSE_DATETIME + +// ---------------------------------------------------------------------------- +// wxGridCellEnumRenderer +// ---------------------------------------------------------------------------- +// Renders a number as a textual equivalent. +// eg data in cell is 0,1,2 ... n the cell could be rendered as "John","Fred"..."Bob" + + +wxGridCellEnumRenderer::wxGridCellEnumRenderer(const wxString& choices) +{ + if (!choices.empty()) + SetParameters(choices); +} + +wxGridCellRenderer *wxGridCellEnumRenderer::Clone() const +{ + wxGridCellEnumRenderer *renderer = new wxGridCellEnumRenderer; + renderer->m_choices = m_choices; + return renderer; +} + +wxString wxGridCellEnumRenderer::GetString(const wxGrid& grid, int row, int col) +{ + wxGridTableBase *table = grid.GetTable(); + wxString text; + if ( table->CanGetValueAs(row, col, wxGRID_VALUE_NUMBER) ) + { + int choiceno = table->GetValueAsLong(row, col); + text.Printf(wxT("%s"), m_choices[ choiceno ].c_str() ); + } + else + { + text = table->GetValue(row, col); + } + + + //If we faild to parse string just show what we where given? + return text; +} + +void wxGridCellEnumRenderer::Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rectCell, + int row, int col, + bool isSelected) +{ + wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected); + + SetTextColoursAndFont(grid, attr, dc, isSelected); + + // draw the text right aligned by default + int hAlign = wxALIGN_RIGHT, + vAlign = wxALIGN_INVALID; + attr.GetNonDefaultAlignment(&hAlign, &vAlign); + + wxRect rect = rectCell; + rect.Inflate(-1); + + grid.DrawTextRectangle(dc, GetString(grid, row, col), rect, hAlign, vAlign); +} + +wxSize wxGridCellEnumRenderer::GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col) +{ + return DoGetBestSize(attr, dc, GetString(grid, row, col)); +} + +void wxGridCellEnumRenderer::SetParameters(const wxString& params) +{ + if ( !params ) + { + // what can we do? + return; + } + + m_choices.Empty(); + + wxStringTokenizer tk(params, wxT(',')); + while ( tk.HasMoreTokens() ) + { + m_choices.Add(tk.GetNextToken()); + } +} + + +// ---------------------------------------------------------------------------- +// wxGridCellAutoWrapStringRenderer +// ---------------------------------------------------------------------------- + + +void +wxGridCellAutoWrapStringRenderer::Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rectCell, + int row, int col, + bool isSelected) { + + + wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected); + + // now we only have to draw the text + SetTextColoursAndFont(grid, attr, dc, isSelected); + + int horizAlign, vertAlign; + attr.GetAlignment(&horizAlign, &vertAlign); + + wxRect rect = rectCell; + rect.Inflate(-1); + + grid.DrawTextRectangle(dc, GetTextLines(grid,dc,attr,rect,row,col), + rect, horizAlign, vertAlign); +} + + +wxArrayString +wxGridCellAutoWrapStringRenderer::GetTextLines(wxGrid& grid, + wxDC& dc, + const wxGridCellAttr& attr, + const wxRect& rect, + int row, int col) +{ + dc.SetFont(attr.GetFont()); + const wxCoord maxWidth = rect.GetWidth(); + + // Transform logical lines into physical ones, wrapping the longer ones. + const wxArrayString + logicalLines = wxSplit(grid.GetCellValue(row, col), '\n', '\0'); + + // Trying to do anything if the column is hidden anyhow doesn't make sense + // and we run into problems in BreakLine() in this case. + if ( maxWidth <= 0 ) + return logicalLines; + + wxArrayString physicalLines; + for ( wxArrayString::const_iterator it = logicalLines.begin(); + it != logicalLines.end(); + ++it ) + { + const wxString& line = *it; + + if ( dc.GetTextExtent(line).x > maxWidth ) + { + // Line does not fit, break it up. + BreakLine(dc, line, maxWidth, physicalLines); + } + else // The entire line fits as is + { + physicalLines.push_back(line); + } + } + + return physicalLines; +} + +void +wxGridCellAutoWrapStringRenderer::BreakLine(wxDC& dc, + const wxString& logicalLine, + wxCoord maxWidth, + wxArrayString& lines) +{ + wxCoord lineWidth = 0; + wxString line; + + // For each word + wxStringTokenizer wordTokenizer(logicalLine, wxS(" \t"), wxTOKEN_RET_DELIMS); + while ( wordTokenizer.HasMoreTokens() ) + { + const wxString word = wordTokenizer.GetNextToken(); + const wxCoord wordWidth = dc.GetTextExtent(word).x; + if ( lineWidth + wordWidth < maxWidth ) + { + // Word fits, just add it to this line. + line += word; + lineWidth += wordWidth; + } + else + { + // Word does not fit, check whether the word is itself wider that + // available width + if ( wordWidth < maxWidth ) + { + // Word can fit in a new line, put it at the beginning + // of the new line. + lines.push_back(line); + line = word; + lineWidth = wordWidth; + } + else // Word cannot fit in available width at all. + { + if ( !line.empty() ) + { + lines.push_back(line); + line.clear(); + lineWidth = 0; + } + + // Break it up in several lines. + lineWidth = BreakWord(dc, word, maxWidth, lines, line); + } + } + } + + if ( !line.empty() ) + lines.push_back(line); +} + + +wxCoord +wxGridCellAutoWrapStringRenderer::BreakWord(wxDC& dc, + const wxString& word, + wxCoord maxWidth, + wxArrayString& lines, + wxString& line) +{ + wxArrayInt widths; + dc.GetPartialTextExtents(word, widths); + + // TODO: Use binary search to find the first element > maxWidth. + const unsigned count = widths.size(); + unsigned n; + for ( n = 0; n < count; n++ ) + { + if ( widths[n] > maxWidth ) + break; + } + + if ( n == 0 ) + { + // This is a degenerate case: the first character of the word is + // already wider than the available space, so we just can't show it + // completely and have to put the first character in this line. + n = 1; + } + + lines.push_back(word.substr(0, n)); + + // Check if the remainder of the string fits in one line. + // + // Unfortunately we can't use the existing partial text extents as the + // extent of the remainder may be different when it's rendered in a + // separate line instead of as part of the same one, so we have to + // recompute it. + const wxString rest = word.substr(n); + const wxCoord restWidth = dc.GetTextExtent(rest).x; + if ( restWidth <= maxWidth ) + { + line = rest; + return restWidth; + } + + // Break the rest of the word into lines. + // + // TODO: Perhaps avoid recursion? The code is simpler like this but using a + // loop in this function would probably be more efficient. + return BreakWord(dc, rest, maxWidth, lines, line); +} + +wxSize +wxGridCellAutoWrapStringRenderer::GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col) +{ + const int lineHeight = dc.GetCharHeight(); + + // Search for a shape no taller than the golden ratio. + wxSize size; + for ( size.x = 10; ; size.x += 10 ) + { + const size_t + numLines = GetTextLines(grid, dc, attr, size, row, col).size(); + size.y = numLines * lineHeight; + if ( size.x >= size.y*1.68 ) + break; + } + + return size; +} + +// ---------------------------------------------------------------------------- +// wxGridCellStringRenderer +// ---------------------------------------------------------------------------- + +void wxGridCellStringRenderer::SetTextColoursAndFont(const wxGrid& grid, + const wxGridCellAttr& attr, + wxDC& dc, + bool isSelected) +{ + dc.SetBackgroundMode( wxBRUSHSTYLE_TRANSPARENT ); + + // TODO some special colours for attr.IsReadOnly() case? + + // different coloured text when the grid is disabled + if ( grid.IsThisEnabled() ) + { + if ( isSelected ) + { + wxColour clr; + if ( grid.HasFocus() ) + clr = grid.GetSelectionBackground(); + else + clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW); + dc.SetTextBackground( clr ); + dc.SetTextForeground( grid.GetSelectionForeground() ); + } + else + { + dc.SetTextBackground( attr.GetBackgroundColour() ); + dc.SetTextForeground( attr.GetTextColour() ); + } + } + else + { + dc.SetTextBackground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); + dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + } + + dc.SetFont( attr.GetFont() ); +} + +wxSize wxGridCellStringRenderer::DoGetBestSize(const wxGridCellAttr& attr, + wxDC& dc, + const wxString& text) +{ + wxCoord x = 0, y = 0, max_x = 0; + dc.SetFont(attr.GetFont()); + wxStringTokenizer tk(text, wxT('\n')); + while ( tk.HasMoreTokens() ) + { + dc.GetTextExtent(tk.GetNextToken(), &x, &y); + max_x = wxMax(max_x, x); + } + + y *= 1 + text.Freq(wxT('\n')); // multiply by the number of lines. + + return wxSize(max_x, y); +} + +wxSize wxGridCellStringRenderer::GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col) +{ + return DoGetBestSize(attr, dc, grid.GetCellValue(row, col)); +} + +void wxGridCellStringRenderer::Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rectCell, + int row, int col, + bool isSelected) +{ + wxRect rect = rectCell; + rect.Inflate(-1); + + // erase only this cells background, overflow cells should have been erased + wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected); + + int hAlign, vAlign; + attr.GetAlignment(&hAlign, &vAlign); + + int overflowCols = 0; + + if (attr.GetOverflow()) + { + int cols = grid.GetNumberCols(); + int best_width = GetBestSize(grid,attr,dc,row,col).GetWidth(); + int cell_rows, cell_cols; + attr.GetSize( &cell_rows, &cell_cols ); // shouldn't get here if <= 0 + if ((best_width > rectCell.width) && (col < cols) && grid.GetTable()) + { + int i, c_cols, c_rows; + for (i = col+cell_cols; i < cols; i++) + { + bool is_empty = true; + for (int j=row; j < row + cell_rows; j++) + { + // check w/ anchor cell for multicell block + grid.GetCellSize(j, i, &c_rows, &c_cols); + if (c_rows > 0) + c_rows = 0; + if (!grid.GetTable()->IsEmptyCell(j + c_rows, i)) + { + is_empty = false; + break; + } + } + + if (is_empty) + { + rect.width += grid.GetColSize(i); + } + else + { + i--; + break; + } + + if (rect.width >= best_width) + break; + } + + overflowCols = i - col - cell_cols + 1; + if (overflowCols >= cols) + overflowCols = cols - 1; + } + + if (overflowCols > 0) // redraw overflow cells w/ proper hilight + { + hAlign = wxALIGN_LEFT; // if oveflowed then it's left aligned + wxRect clip = rect; + clip.x += rectCell.width; + // draw each overflow cell individually + int col_end = col + cell_cols + overflowCols; + if (col_end >= grid.GetNumberCols()) + col_end = grid.GetNumberCols() - 1; + for (int i = col + cell_cols; i <= col_end; i++) + { + clip.width = grid.GetColSize(i) - 1; + dc.DestroyClippingRegion(); + dc.SetClippingRegion(clip); + + SetTextColoursAndFont(grid, attr, dc, + grid.IsInSelection(row,i)); + + grid.DrawTextRectangle(dc, grid.GetCellValue(row, col), + rect, hAlign, vAlign); + clip.x += grid.GetColSize(i) - 1; + } + + rect = rectCell; + rect.Inflate(-1); + rect.width++; + dc.DestroyClippingRegion(); + } + } + + // now we only have to draw the text + SetTextColoursAndFont(grid, attr, dc, isSelected); + + grid.DrawTextRectangle(dc, grid.GetCellValue(row, col), + rect, hAlign, vAlign); +} + +// ---------------------------------------------------------------------------- +// wxGridCellNumberRenderer +// ---------------------------------------------------------------------------- + +wxString wxGridCellNumberRenderer::GetString(const wxGrid& grid, int row, int col) +{ + wxGridTableBase *table = grid.GetTable(); + wxString text; + if ( table->CanGetValueAs(row, col, wxGRID_VALUE_NUMBER) ) + { + text.Printf(wxT("%ld"), table->GetValueAsLong(row, col)); + } + else + { + text = table->GetValue(row, col); + } + + return text; +} + +void wxGridCellNumberRenderer::Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rectCell, + int row, int col, + bool isSelected) +{ + wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected); + + SetTextColoursAndFont(grid, attr, dc, isSelected); + + // draw the text right aligned by default + int hAlign = wxALIGN_RIGHT, + vAlign = wxALIGN_INVALID; + attr.GetNonDefaultAlignment(&hAlign, &vAlign); + + wxRect rect = rectCell; + rect.Inflate(-1); + + grid.DrawTextRectangle(dc, GetString(grid, row, col), rect, hAlign, vAlign); +} + +wxSize wxGridCellNumberRenderer::GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col) +{ + return DoGetBestSize(attr, dc, GetString(grid, row, col)); +} + +// ---------------------------------------------------------------------------- +// wxGridCellFloatRenderer +// ---------------------------------------------------------------------------- + +wxGridCellFloatRenderer::wxGridCellFloatRenderer(int width, + int precision, + int format) +{ + SetWidth(width); + SetPrecision(precision); + SetFormat(format); +} + +wxGridCellRenderer *wxGridCellFloatRenderer::Clone() const +{ + wxGridCellFloatRenderer *renderer = new wxGridCellFloatRenderer; + renderer->m_width = m_width; + renderer->m_precision = m_precision; + renderer->m_style = m_style; + renderer->m_format = m_format; + + return renderer; +} + +wxString wxGridCellFloatRenderer::GetString(const wxGrid& grid, int row, int col) +{ + wxGridTableBase *table = grid.GetTable(); + + bool hasDouble; + double val; + wxString text; + if ( table->CanGetValueAs(row, col, wxGRID_VALUE_FLOAT) ) + { + val = table->GetValueAsDouble(row, col); + hasDouble = true; + } + else + { + text = table->GetValue(row, col); + hasDouble = text.ToDouble(&val); + } + + if ( hasDouble ) + { + if ( !m_format ) + { + if ( m_width == -1 ) + { + if ( m_precision == -1 ) + { + // default width/precision + m_format = wxT("%"); + } + else + { + m_format.Printf(wxT("%%.%d"), m_precision); + } + } + else if ( m_precision == -1 ) + { + // default precision + m_format.Printf(wxT("%%%d."), m_width); + } + else + { + m_format.Printf(wxT("%%%d.%d"), m_width, m_precision); + } + + bool isUpper = ( ( m_style & wxGRID_FLOAT_FORMAT_UPPER ) == wxGRID_FLOAT_FORMAT_UPPER); + if ( ( m_style & wxGRID_FLOAT_FORMAT_SCIENTIFIC ) == wxGRID_FLOAT_FORMAT_SCIENTIFIC) + m_format += isUpper ? wxT('E') : wxT('e'); + else if ( ( m_style & wxGRID_FLOAT_FORMAT_COMPACT ) == wxGRID_FLOAT_FORMAT_COMPACT) + m_format += isUpper ? wxT('G') : wxT('g'); + else + m_format += wxT('f'); + } + + text.Printf(m_format, val); + + } + //else: text already contains the string + + return text; +} + +void wxGridCellFloatRenderer::Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rectCell, + int row, int col, + bool isSelected) +{ + wxGridCellRenderer::Draw(grid, attr, dc, rectCell, row, col, isSelected); + + SetTextColoursAndFont(grid, attr, dc, isSelected); + + // draw the text right aligned by default + int hAlign = wxALIGN_RIGHT, + vAlign = wxALIGN_INVALID; + attr.GetNonDefaultAlignment(&hAlign, &vAlign); + + wxRect rect = rectCell; + rect.Inflate(-1); + + grid.DrawTextRectangle(dc, GetString(grid, row, col), rect, hAlign, vAlign); +} + +wxSize wxGridCellFloatRenderer::GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col) +{ + return DoGetBestSize(attr, dc, GetString(grid, row, col)); +} + +void wxGridCellFloatRenderer::SetParameters(const wxString& params) +{ + if ( !params ) + { + // reset to defaults + SetWidth(-1); + SetPrecision(-1); + SetFormat(wxGRID_FLOAT_FORMAT_DEFAULT); + } + else + { + wxString rest; + wxString tmp = params.BeforeFirst(wxT(','), &rest); + if ( !tmp.empty() ) + { + long width; + if ( tmp.ToLong(&width) ) + { + SetWidth((int)width); + } + else + { + wxLogDebug(wxT("Invalid wxGridCellFloatRenderer width parameter string '%s ignored"), params.c_str()); + } + } + + tmp = rest.BeforeFirst(wxT(',')); + if ( !tmp.empty() ) + { + long precision; + if ( tmp.ToLong(&precision) ) + { + SetPrecision((int)precision); + } + else + { + wxLogDebug(wxT("Invalid wxGridCellFloatRenderer precision parameter string '%s ignored"), params.c_str()); + } + } + + tmp = rest.AfterFirst(wxT(',')); + if ( !tmp.empty() ) + { + if ( tmp[0] == wxT('f') ) + { + SetFormat(wxGRID_FLOAT_FORMAT_FIXED); + } + else if ( tmp[0] == wxT('e') ) + { + SetFormat(wxGRID_FLOAT_FORMAT_SCIENTIFIC); + } + else if ( tmp[0] == wxT('g') ) + { + SetFormat(wxGRID_FLOAT_FORMAT_COMPACT); + } + else if ( tmp[0] == wxT('E') ) + { + SetFormat(wxGRID_FLOAT_FORMAT_SCIENTIFIC | + wxGRID_FLOAT_FORMAT_UPPER); + } + else if ( tmp[0] == wxT('F') ) + { + SetFormat(wxGRID_FLOAT_FORMAT_FIXED | + wxGRID_FLOAT_FORMAT_UPPER); + } + else if ( tmp[0] == wxT('G') ) + { + SetFormat(wxGRID_FLOAT_FORMAT_COMPACT | + wxGRID_FLOAT_FORMAT_UPPER); + } + else + { + wxLogDebug("Invalid wxGridCellFloatRenderer format " + "parameter string '%s ignored", params); + } + } + } +} + +// ---------------------------------------------------------------------------- +// wxGridCellBoolRenderer +// ---------------------------------------------------------------------------- + +wxSize wxGridCellBoolRenderer::ms_sizeCheckMark; + +wxSize wxGridCellBoolRenderer::GetBestSize(wxGrid& grid, + wxGridCellAttr& WXUNUSED(attr), + wxDC& WXUNUSED(dc), + int WXUNUSED(row), + int WXUNUSED(col)) +{ + // compute it only once (no locks for MT safeness in GUI thread...) + if ( !ms_sizeCheckMark.x ) + { + ms_sizeCheckMark = wxRendererNative::Get().GetCheckBoxSize(&grid); + } + + return ms_sizeCheckMark; +} + +void wxGridCellBoolRenderer::Draw(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + const wxRect& rect, + int row, int col, + bool isSelected) +{ + wxGridCellRenderer::Draw(grid, attr, dc, rect, row, col, isSelected); + + // draw a check mark in the centre (ignoring alignment - TODO) + wxSize size = GetBestSize(grid, attr, dc, row, col); + + // don't draw outside the cell + wxCoord minSize = wxMin(rect.width, rect.height); + if ( size.x >= minSize || size.y >= minSize ) + { + // and even leave (at least) 1 pixel margin + size.x = size.y = minSize; + } + + // draw a border around checkmark + int vAlign, hAlign; + attr.GetAlignment(&hAlign, &vAlign); + + wxRect rectBorder; + if (hAlign == wxALIGN_CENTRE) + { + rectBorder.x = rect.x + rect.width / 2 - size.x / 2; + rectBorder.y = rect.y + rect.height / 2 - size.y / 2; + rectBorder.width = size.x; + rectBorder.height = size.y; + } + else if (hAlign == wxALIGN_LEFT) + { + rectBorder.x = rect.x + 2; + rectBorder.y = rect.y + rect.height / 2 - size.y / 2; + rectBorder.width = size.x; + rectBorder.height = size.y; + } + else if (hAlign == wxALIGN_RIGHT) + { + rectBorder.x = rect.x + rect.width - size.x - 2; + rectBorder.y = rect.y + rect.height / 2 - size.y / 2; + rectBorder.width = size.x; + rectBorder.height = size.y; + } + + bool value; + if ( grid.GetTable()->CanGetValueAs(row, col, wxGRID_VALUE_BOOL) ) + { + value = grid.GetTable()->GetValueAsBool(row, col); + } + else + { + wxString cellval( grid.GetTable()->GetValue(row, col) ); + value = wxGridCellBoolEditor::IsTrueValue(cellval); + } + + int flags = 0; + if (value) + flags |= wxCONTROL_CHECKED; + + wxRendererNative::Get().DrawCheckBox( &grid, dc, rectBorder, flags ); +} + +#endif // wxUSE_GRID + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/grideditors.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/grideditors.cpp new file mode 100644 index 0000000000..4cc103ca73 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/grideditors.cpp @@ -0,0 +1,1714 @@ +/////////////////////////////////////////////////////////////////////////// +// Name: src/generic/grideditors.cpp +// Purpose: wxGridCellEditorEvtHandler and wxGrid editors +// Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) +// Modified by: Robin Dunn, Vadim Zeitlin, Santiago Palacios +// Created: 1/08/1999 +// Copyright: (c) Michael Bedward (mbedward@ozemail.com.au) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_GRID + +#include "wx/grid.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/log.h" + #include "wx/textctrl.h" + #include "wx/checkbox.h" + #include "wx/combobox.h" + #include "wx/intl.h" + #include "wx/math.h" + #include "wx/listbox.h" +#endif + +#include "wx/valnum.h" +#include "wx/textfile.h" +#include "wx/spinctrl.h" +#include "wx/tokenzr.h" +#include "wx/renderer.h" +#include "wx/headerctrl.h" + +#include "wx/generic/gridsel.h" +#include "wx/generic/grideditors.h" +#include "wx/generic/private/grid.h" + +#if defined(__WXMOTIF__) + #define WXUNUSED_MOTIF(identifier) WXUNUSED(identifier) +#else + #define WXUNUSED_MOTIF(identifier) identifier +#endif + +#if defined(__WXGTK__) + #define WXUNUSED_GTK(identifier) WXUNUSED(identifier) +#else + #define WXUNUSED_GTK(identifier) identifier +#endif + +#ifdef __WXOSX__ +#include "wx/osx/private.h" +#endif + +// Required for wxIs... functions +#include + +// ============================================================================ +// implementation +// ============================================================================ + +wxDEFINE_EVENT( wxEVT_GRID_HIDE_EDITOR, wxCommandEvent ); + +// ---------------------------------------------------------------------------- +// wxGridCellEditorEvtHandler +// ---------------------------------------------------------------------------- + +void wxGridCellEditorEvtHandler::OnKillFocus(wxFocusEvent& event) +{ + // We must let the native control have this event so in any case don't mark + // it as handled, otherwise various weird problems can happen (see #11681). + event.Skip(); + + // Don't disable the cell if we're just starting to edit it + if (m_inSetFocus) + return; + + // Tell the grid to dismiss the control but don't do it immediately as it + // could result in the editor being destroyed right now and a crash in the + // code searching for the next event handler, so post an event asking the + // grid to do it slightly later instead. + + // FIXME-VC6: Once we drop support for VC6, we should use a simpler + // m_grid->CallAfter(&wxGrid::DisableCellEditControl) and get + // rid of wxEVT_GRID_HIDE_EDITOR entirely. + m_grid->GetEventHandler()-> + AddPendingEvent(wxCommandEvent(wxEVT_GRID_HIDE_EDITOR)); +} + +void wxGridCellEditorEvtHandler::OnKeyDown(wxKeyEvent& event) +{ + switch ( event.GetKeyCode() ) + { + case WXK_ESCAPE: + m_editor->Reset(); + m_grid->DisableCellEditControl(); + break; + + case WXK_TAB: + m_grid->GetEventHandler()->ProcessEvent( event ); + break; + + case WXK_RETURN: + case WXK_NUMPAD_ENTER: + if (!m_grid->GetEventHandler()->ProcessEvent(event)) + m_editor->HandleReturn(event); + break; + + default: + event.Skip(); + break; + } +} + +void wxGridCellEditorEvtHandler::OnChar(wxKeyEvent& event) +{ + int row = m_grid->GetGridCursorRow(); + int col = m_grid->GetGridCursorCol(); + wxRect rect = m_grid->CellToRect( row, col ); + int cw, ch; + m_grid->GetGridWindow()->GetClientSize( &cw, &ch ); + + // if cell width is smaller than grid client area, cell is wholly visible + bool wholeCellVisible = (rect.GetWidth() < cw); + + switch ( event.GetKeyCode() ) + { + case WXK_ESCAPE: + case WXK_TAB: + case WXK_RETURN: + case WXK_NUMPAD_ENTER: + break; + + case WXK_HOME: + { + if ( wholeCellVisible ) + { + // no special processing needed... + event.Skip(); + break; + } + + // do special processing for partly visible cell... + + // get the widths of all cells previous to this one + int colXPos = 0; + for ( int i = 0; i < col; i++ ) + { + colXPos += m_grid->GetColSize(i); + } + + int xUnit = 1, yUnit = 1; + m_grid->GetScrollPixelsPerUnit(&xUnit, &yUnit); + if (col != 0) + { + m_grid->Scroll(colXPos / xUnit - 1, m_grid->GetScrollPos(wxVERTICAL)); + } + else + { + m_grid->Scroll(colXPos / xUnit, m_grid->GetScrollPos(wxVERTICAL)); + } + event.Skip(); + break; + } + + case WXK_END: + { + if ( wholeCellVisible ) + { + // no special processing needed... + event.Skip(); + break; + } + + // do special processing for partly visible cell... + + int textWidth = 0; + wxString value = m_grid->GetCellValue(row, col); + if ( wxEmptyString != value ) + { + // get width of cell CONTENTS (text) + int y; + wxFont font = m_grid->GetCellFont(row, col); + m_grid->GetTextExtent(value, &textWidth, &y, NULL, NULL, &font); + + // try to RIGHT align the text by scrolling + int client_right = m_grid->GetGridWindow()->GetClientSize().GetWidth(); + + // (m_grid->GetScrollLineX()*2) is a factor for not scrolling to far, + // otherwise the last part of the cell content might be hidden below the scroll bar + // FIXME: maybe there is a more suitable correction? + textWidth -= (client_right - (m_grid->GetScrollLineX() * 2)); + if ( textWidth < 0 ) + { + textWidth = 0; + } + } + + // get the widths of all cells previous to this one + int colXPos = 0; + for ( int i = 0; i < col; i++ ) + { + colXPos += m_grid->GetColSize(i); + } + + // and add the (modified) text width of the cell contents + // as we'd like to see the last part of the cell contents + colXPos += textWidth; + + int xUnit = 1, yUnit = 1; + m_grid->GetScrollPixelsPerUnit(&xUnit, &yUnit); + m_grid->Scroll(colXPos / xUnit - 1, m_grid->GetScrollPos(wxVERTICAL)); + event.Skip(); + break; + } + + default: + event.Skip(); + break; + } +} + +// ---------------------------------------------------------------------------- +// wxGridCellEditor +// ---------------------------------------------------------------------------- + +wxGridCellEditor::wxGridCellEditor() +{ + m_control = NULL; + m_attr = NULL; +} + +wxGridCellEditor::~wxGridCellEditor() +{ + Destroy(); +} + +void wxGridCellEditor::Create(wxWindow* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + wxEvtHandler* evtHandler) +{ + if ( evtHandler ) + m_control->PushEventHandler(evtHandler); +} + +void wxGridCellEditor::PaintBackground(wxDC& dc, + const wxRect& rectCell, + const wxGridCellAttr& attr) +{ + // erase the background because we might not fill the cell + dc.SetPen(*wxTRANSPARENT_PEN); + dc.SetBrush(wxBrush(attr.GetBackgroundColour())); + dc.DrawRectangle(rectCell); +} + +void wxGridCellEditor::Destroy() +{ + if (m_control) + { + m_control->PopEventHandler( true /* delete it*/ ); + + m_control->Destroy(); + m_control = NULL; + } +} + +void wxGridCellEditor::Show(bool show, wxGridCellAttr *attr) +{ + wxASSERT_MSG(m_control, wxT("The wxGridCellEditor must be created first!")); + + m_control->Show(show); + + if ( show ) + { + // set the colours/fonts if we have any + if ( attr ) + { + m_colFgOld = m_control->GetForegroundColour(); + m_control->SetForegroundColour(attr->GetTextColour()); + + m_colBgOld = m_control->GetBackgroundColour(); + m_control->SetBackgroundColour(attr->GetBackgroundColour()); + +// Workaround for GTK+1 font setting problem on some platforms +#if !defined(__WXGTK__) || defined(__WXGTK20__) + m_fontOld = m_control->GetFont(); + m_control->SetFont(attr->GetFont()); +#endif + + // can't do anything more in the base class version, the other + // attributes may only be used by the derived classes + } + } + else + { + // restore the standard colours fonts + if ( m_colFgOld.IsOk() ) + { + m_control->SetForegroundColour(m_colFgOld); + m_colFgOld = wxNullColour; + } + + if ( m_colBgOld.IsOk() ) + { + m_control->SetBackgroundColour(m_colBgOld); + m_colBgOld = wxNullColour; + } + +// Workaround for GTK+1 font setting problem on some platforms +#if !defined(__WXGTK__) || defined(__WXGTK20__) + if ( m_fontOld.IsOk() ) + { + m_control->SetFont(m_fontOld); + m_fontOld = wxNullFont; + } +#endif + } +} + +void wxGridCellEditor::SetSize(const wxRect& rect) +{ + wxASSERT_MSG(m_control, wxT("The wxGridCellEditor must be created first!")); + + m_control->SetSize(rect, wxSIZE_ALLOW_MINUS_ONE); +} + +void wxGridCellEditor::HandleReturn(wxKeyEvent& event) +{ + event.Skip(); +} + +bool wxGridCellEditor::IsAcceptedKey(wxKeyEvent& event) +{ + bool ctrl = event.ControlDown(); + bool alt; + +#ifdef __WXMAC__ + // On the Mac the Alt key is more like shift and is used for entry of + // valid characters, so check for Ctrl and Meta instead. + alt = event.MetaDown(); +#else // !__WXMAC__ + alt = event.AltDown(); +#endif // __WXMAC__/!__WXMAC__ + + // Assume it's not a valid char if ctrl or alt is down, but if both are + // down then it may be because of an AltGr key combination, so let them + // through in that case. + if ((ctrl || alt) && !(ctrl && alt)) + return false; + +#if wxUSE_UNICODE + if ( static_cast(event.GetUnicodeKey()) == WXK_NONE ) + return false; +#else + if ( event.GetKeyCode() > WXK_START ) + return false; +#endif + + return true; +} + +void wxGridCellEditor::StartingKey(wxKeyEvent& event) +{ + event.Skip(); +} + +void wxGridCellEditor::StartingClick() +{ +} + +#if wxUSE_TEXTCTRL + +// ---------------------------------------------------------------------------- +// wxGridCellTextEditor +// ---------------------------------------------------------------------------- + +wxGridCellTextEditor::wxGridCellTextEditor(size_t maxChars) +{ + m_maxChars = maxChars; +} + +void wxGridCellTextEditor::Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler) +{ + DoCreate(parent, id, evtHandler); +} + +void wxGridCellTextEditor::DoCreate(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler, + long style) +{ + style |= wxTE_PROCESS_ENTER | wxTE_PROCESS_TAB | wxNO_BORDER; + + wxTextCtrl* const text = new wxTextCtrl(parent, id, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + style); + text->SetMargins(0, 0); + m_control = text; + +#ifdef __WXOSX__ + wxWidgetImpl* impl = m_control->GetPeer(); + impl->SetNeedsFocusRect(false); +#endif + // set max length allowed in the textctrl, if the parameter was set + if ( m_maxChars != 0 ) + { + Text()->SetMaxLength(m_maxChars); + } +#if wxUSE_VALIDATORS + // validate text in textctrl, if validator is set + if ( m_validator ) + { + Text()->SetValidator(*m_validator); + } +#endif + + wxGridCellEditor::Create(parent, id, evtHandler); +} + +void wxGridCellTextEditor::PaintBackground(wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rectCell), + const wxGridCellAttr& WXUNUSED(attr)) +{ + // as we fill the entire client area, + // don't do anything here to minimize flicker +} + +void wxGridCellTextEditor::SetSize(const wxRect& rectOrig) +{ + wxRect rect(rectOrig); + + // Make the edit control large enough to allow for internal margins + // + // TODO: remove this if the text ctrl sizing is improved esp. for unix + // +#if defined(__WXGTK__) + if (rect.x != 0) + { + rect.x += 1; + rect.y += 1; + rect.width -= 1; + rect.height -= 1; + } +#elif defined(__WXMSW__) + if ( rect.x == 0 ) + rect.x += 2; + else + rect.x += 3; + + if ( rect.y == 0 ) + rect.y += 2; + else + rect.y += 3; + + rect.width -= 2; + rect.height -= 2; +#elif defined(__WXOSX__) + rect.x += 1; + rect.y += 1; + + rect.width -= 1; + rect.height -= 1; +#else + int extra_x = ( rect.x > 2 ) ? 2 : 1; + int extra_y = ( rect.y > 2 ) ? 2 : 1; + + #if defined(__WXMOTIF__) + extra_x *= 2; + extra_y *= 2; + #endif + + rect.SetLeft( wxMax(0, rect.x - extra_x) ); + rect.SetTop( wxMax(0, rect.y - extra_y) ); + rect.SetRight( rect.GetRight() + 2 * extra_x ); + rect.SetBottom( rect.GetBottom() + 2 * extra_y ); +#endif + + wxGridCellEditor::SetSize(rect); +} + +void wxGridCellTextEditor::BeginEdit(int row, int col, wxGrid* grid) +{ + wxASSERT_MSG(m_control, wxT("The wxGridCellEditor must be created first!")); + + m_value = grid->GetTable()->GetValue(row, col); + + DoBeginEdit(m_value); +} + +void wxGridCellTextEditor::DoBeginEdit(const wxString& startValue) +{ + Text()->SetValue(startValue); + Text()->SetInsertionPointEnd(); + Text()->SelectAll(); + Text()->SetFocus(); +} + +bool wxGridCellTextEditor::EndEdit(int WXUNUSED(row), + int WXUNUSED(col), + const wxGrid* WXUNUSED(grid), + const wxString& WXUNUSED(oldval), + wxString *newval) +{ + wxCHECK_MSG( m_control, false, + "wxGridCellTextEditor must be created first!" ); + + const wxString value = Text()->GetValue(); + if ( value == m_value ) + return false; + + m_value = value; + + if ( newval ) + *newval = m_value; + + return true; +} + +void wxGridCellTextEditor::ApplyEdit(int row, int col, wxGrid* grid) +{ + grid->GetTable()->SetValue(row, col, m_value); + m_value.clear(); +} + +void wxGridCellTextEditor::Reset() +{ + wxASSERT_MSG( m_control, "wxGridCellTextEditor must be created first!" ); + + DoReset(m_value); +} + +void wxGridCellTextEditor::DoReset(const wxString& startValue) +{ + Text()->SetValue(startValue); + Text()->SetInsertionPointEnd(); +} + +bool wxGridCellTextEditor::IsAcceptedKey(wxKeyEvent& event) +{ + switch ( event.GetKeyCode() ) + { + case WXK_DELETE: + case WXK_BACK: + return true; + + default: + return wxGridCellEditor::IsAcceptedKey(event); + } +} + +void wxGridCellTextEditor::StartingKey(wxKeyEvent& event) +{ + // Since this is now happening in the EVT_CHAR event EmulateKeyPress is no + // longer an appropriate way to get the character into the text control. + // Do it ourselves instead. We know that if we get this far that we have + // a valid character, so not a whole lot of testing needs to be done. + + wxTextCtrl* tc = Text(); + int ch; + + bool isPrintable; + +#if wxUSE_UNICODE + ch = event.GetUnicodeKey(); + if ( ch != WXK_NONE ) + isPrintable = true; + else +#endif // wxUSE_UNICODE + { + ch = event.GetKeyCode(); + isPrintable = ch >= WXK_SPACE && ch < WXK_START; + } + + switch (ch) + { + case WXK_DELETE: + // Delete the initial character when starting to edit with DELETE. + tc->Remove(0, 1); + break; + + case WXK_BACK: + // Delete the last character when starting to edit with BACKSPACE. + { + const long pos = tc->GetLastPosition(); + tc->Remove(pos - 1, pos); + } + break; + + default: + if ( isPrintable ) + tc->WriteText(static_cast(ch)); + break; + } +} + +void wxGridCellTextEditor::HandleReturn( wxKeyEvent& + WXUNUSED_GTK(WXUNUSED_MOTIF(event)) ) +{ +#if defined(__WXMOTIF__) || defined(__WXGTK__) + // wxMotif needs a little extra help... + size_t pos = (size_t)( Text()->GetInsertionPoint() ); + wxString s( Text()->GetValue() ); + s = s.Left(pos) + wxT("\n") + s.Mid(pos); + Text()->SetValue(s); + Text()->SetInsertionPoint( pos ); +#else + // the other ports can handle a Return key press + // + event.Skip(); +#endif +} + +void wxGridCellTextEditor::SetParameters(const wxString& params) +{ + if ( !params ) + { + // reset to default + m_maxChars = 0; + } + else + { + long tmp; + if ( params.ToLong(&tmp) ) + { + m_maxChars = (size_t)tmp; + } + else + { + wxLogDebug( wxT("Invalid wxGridCellTextEditor parameter string '%s' ignored"), params.c_str() ); + } + } +} + +#if wxUSE_VALIDATORS +void wxGridCellTextEditor::SetValidator(const wxValidator& validator) +{ + m_validator.reset(static_cast(validator.Clone())); +} +#endif + +wxGridCellEditor *wxGridCellTextEditor::Clone() const +{ + wxGridCellTextEditor* editor = new wxGridCellTextEditor(m_maxChars); +#if wxUSE_VALIDATORS + if ( m_validator ) + { + editor->SetValidator(*m_validator); + } +#endif + return editor; +} + +// return the value in the text control +wxString wxGridCellTextEditor::GetValue() const +{ + return Text()->GetValue(); +} + +// ---------------------------------------------------------------------------- +// wxGridCellNumberEditor +// ---------------------------------------------------------------------------- + +wxGridCellNumberEditor::wxGridCellNumberEditor(int min, int max) +{ + m_min = min; + m_max = max; +} + +void wxGridCellNumberEditor::Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler) +{ +#if wxUSE_SPINCTRL + if ( HasRange() ) + { + // create a spin ctrl + m_control = new wxSpinCtrl(parent, wxID_ANY, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + wxSP_ARROW_KEYS, + m_min, m_max); + + wxGridCellEditor::Create(parent, id, evtHandler); + } + else +#endif + { + // just a text control + wxGridCellTextEditor::Create(parent, id, evtHandler); + +#if wxUSE_VALIDATORS + Text()->SetValidator(wxIntegerValidator()); +#endif + } +} + +void wxGridCellNumberEditor::BeginEdit(int row, int col, wxGrid* grid) +{ + // first get the value + wxGridTableBase *table = grid->GetTable(); + if ( table->CanGetValueAs(row, col, wxGRID_VALUE_NUMBER) ) + { + m_value = table->GetValueAsLong(row, col); + } + else + { + m_value = 0; + wxString sValue = table->GetValue(row, col); + if (! sValue.ToLong(&m_value) && ! sValue.empty()) + { + wxFAIL_MSG( wxT("this cell doesn't have numeric value") ); + return; + } + } + +#if wxUSE_SPINCTRL + if ( HasRange() ) + { + Spin()->SetValue((int)m_value); + Spin()->SetFocus(); + } + else +#endif + { + DoBeginEdit(GetString()); + } +} + +bool wxGridCellNumberEditor::EndEdit(int WXUNUSED(row), + int WXUNUSED(col), + const wxGrid* WXUNUSED(grid), + const wxString& oldval, wxString *newval) +{ + long value = 0; + wxString text; + +#if wxUSE_SPINCTRL + if ( HasRange() ) + { + value = Spin()->GetValue(); + if ( value == m_value ) + return false; + + text.Printf(wxT("%ld"), value); + } + else // using unconstrained input +#endif // wxUSE_SPINCTRL + { + text = Text()->GetValue(); + if ( text.empty() ) + { + if ( oldval.empty() ) + return false; + } + else // non-empty text now (maybe 0) + { + if ( !text.ToLong(&value) ) + return false; + + // if value == m_value == 0 but old text was "" and new one is + // "0" something still did change + if ( value == m_value && (value || !oldval.empty()) ) + return false; + } + } + + m_value = value; + + if ( newval ) + *newval = text; + + return true; +} + +void wxGridCellNumberEditor::ApplyEdit(int row, int col, wxGrid* grid) +{ + wxGridTableBase * const table = grid->GetTable(); + if ( table->CanSetValueAs(row, col, wxGRID_VALUE_NUMBER) ) + table->SetValueAsLong(row, col, m_value); + else + table->SetValue(row, col, wxString::Format("%ld", m_value)); +} + +void wxGridCellNumberEditor::Reset() +{ +#if wxUSE_SPINCTRL + if ( HasRange() ) + { + Spin()->SetValue((int)m_value); + } + else +#endif + { + DoReset(GetString()); + } +} + +bool wxGridCellNumberEditor::IsAcceptedKey(wxKeyEvent& event) +{ + if ( wxGridCellEditor::IsAcceptedKey(event) ) + { + int keycode = event.GetKeyCode(); + if ( (keycode < 128) && + (wxIsdigit(keycode) || keycode == '+' || keycode == '-')) + { + return true; + } + } + + return false; +} + +void wxGridCellNumberEditor::StartingKey(wxKeyEvent& event) +{ + int keycode = event.GetKeyCode(); + if ( !HasRange() ) + { + if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-') + { + wxGridCellTextEditor::StartingKey(event); + + // skip Skip() below + return; + } + } +#if wxUSE_SPINCTRL + else + { + if ( wxIsdigit(keycode) ) + { + wxSpinCtrl* spin = (wxSpinCtrl*)m_control; + spin->SetValue(keycode - '0'); + spin->SetSelection(1,1); + return; + } + } +#endif + + event.Skip(); +} + +void wxGridCellNumberEditor::SetParameters(const wxString& params) +{ + if ( !params ) + { + // reset to default + m_min = + m_max = -1; + } + else + { + long tmp; + if ( params.BeforeFirst(wxT(',')).ToLong(&tmp) ) + { + m_min = (int)tmp; + + if ( params.AfterFirst(wxT(',')).ToLong(&tmp) ) + { + m_max = (int)tmp; + + // skip the error message below + return; + } + } + + wxLogDebug(wxT("Invalid wxGridCellNumberEditor parameter string '%s' ignored"), params.c_str()); + } +} + +// return the value in the spin control if it is there (the text control otherwise) +wxString wxGridCellNumberEditor::GetValue() const +{ + wxString s; + +#if wxUSE_SPINCTRL + if ( HasRange() ) + { + long value = Spin()->GetValue(); + s.Printf(wxT("%ld"), value); + } + else +#endif + { + s = Text()->GetValue(); + } + + return s; +} + +// ---------------------------------------------------------------------------- +// wxGridCellFloatEditor +// ---------------------------------------------------------------------------- + +wxGridCellFloatEditor::wxGridCellFloatEditor(int width, + int precision, + int format) +{ + m_width = width; + m_precision = precision; + m_style = format; +} + +void wxGridCellFloatEditor::Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler) +{ + wxGridCellTextEditor::Create(parent, id, evtHandler); + +#if wxUSE_VALIDATORS + Text()->SetValidator(wxFloatingPointValidator(m_precision)); +#endif +} + +void wxGridCellFloatEditor::BeginEdit(int row, int col, wxGrid* grid) +{ + // first get the value + wxGridTableBase * const table = grid->GetTable(); + if ( table->CanGetValueAs(row, col, wxGRID_VALUE_FLOAT) ) + { + m_value = table->GetValueAsDouble(row, col); + } + else + { + m_value = 0.0; + + const wxString value = table->GetValue(row, col); + if ( !value.empty() ) + { + if ( !value.ToDouble(&m_value) ) + { + wxFAIL_MSG( wxT("this cell doesn't have float value") ); + return; + } + } + } + + DoBeginEdit(GetString()); +} + +bool wxGridCellFloatEditor::EndEdit(int WXUNUSED(row), + int WXUNUSED(col), + const wxGrid* WXUNUSED(grid), + const wxString& oldval, wxString *newval) +{ + const wxString text(Text()->GetValue()); + + double value; + if ( !text.empty() ) + { + if ( !text.ToDouble(&value) ) + return false; + } + else // new value is empty string + { + if ( oldval.empty() ) + return false; // nothing changed + + value = 0.; + } + + // the test for empty strings ensures that we don't skip the value setting + // when "" is replaced by "0" or vice versa as "" numeric value is also 0. + if ( wxIsSameDouble(value, m_value) && !text.empty() && !oldval.empty() ) + return false; // nothing changed + + m_value = value; + + if ( newval ) + *newval = text; + + return true; +} + +void wxGridCellFloatEditor::ApplyEdit(int row, int col, wxGrid* grid) +{ + wxGridTableBase * const table = grid->GetTable(); + + if ( table->CanSetValueAs(row, col, wxGRID_VALUE_FLOAT) ) + table->SetValueAsDouble(row, col, m_value); + else + table->SetValue(row, col, Text()->GetValue()); +} + +void wxGridCellFloatEditor::Reset() +{ + DoReset(GetString()); +} + +void wxGridCellFloatEditor::StartingKey(wxKeyEvent& event) +{ + int keycode = event.GetKeyCode(); + char tmpbuf[2]; + tmpbuf[0] = (char) keycode; + tmpbuf[1] = '\0'; + wxString strbuf(tmpbuf, *wxConvCurrent); + +#if wxUSE_INTL + bool is_decimal_point = ( strbuf == + wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER) ); +#else + bool is_decimal_point = ( strbuf == wxT(".") ); +#endif + + if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-' + || is_decimal_point ) + { + wxGridCellTextEditor::StartingKey(event); + + // skip Skip() below + return; + } + + event.Skip(); +} + +void wxGridCellFloatEditor::SetParameters(const wxString& params) +{ + if ( !params ) + { + // reset to default + m_width = + m_precision = -1; + m_style = wxGRID_FLOAT_FORMAT_DEFAULT; + m_format.clear(); + } + else + { + wxString rest; + wxString tmp = params.BeforeFirst(wxT(','), &rest); + if ( !tmp.empty() ) + { + long width; + if ( tmp.ToLong(&width) ) + { + m_width = (int)width; + } + else + { + wxLogDebug(wxT("Invalid wxGridCellFloatRenderer width parameter string '%s ignored"), params.c_str()); + } + } + + tmp = rest.BeforeFirst(wxT(',')); + if ( !tmp.empty() ) + { + long precision; + if ( tmp.ToLong(&precision) ) + { + m_precision = (int)precision; + } + else + { + wxLogDebug(wxT("Invalid wxGridCellFloatRenderer precision parameter string '%s ignored"), params.c_str()); + } + } + + tmp = rest.AfterFirst(wxT(',')); + if ( !tmp.empty() ) + { + if ( tmp[0] == wxT('f') ) + { + m_style = wxGRID_FLOAT_FORMAT_FIXED; + } + else if ( tmp[0] == wxT('e') ) + { + m_style = wxGRID_FLOAT_FORMAT_SCIENTIFIC; + } + else if ( tmp[0] == wxT('g') ) + { + m_style = wxGRID_FLOAT_FORMAT_COMPACT; + } + else if ( tmp[0] == wxT('E') ) + { + m_style = wxGRID_FLOAT_FORMAT_SCIENTIFIC | + wxGRID_FLOAT_FORMAT_UPPER; + } + else if ( tmp[0] == wxT('F') ) + { + m_style = wxGRID_FLOAT_FORMAT_FIXED | + wxGRID_FLOAT_FORMAT_UPPER; + } + else if ( tmp[0] == wxT('G') ) + { + m_style = wxGRID_FLOAT_FORMAT_COMPACT | + wxGRID_FLOAT_FORMAT_UPPER; + } + else + { + wxLogDebug("Invalid wxGridCellFloatRenderer format " + "parameter string '%s ignored", params); + } + } + } +} + +wxString wxGridCellFloatEditor::GetString() +{ + if ( !m_format ) + { + if ( m_precision == -1 && m_width != -1) + { + // default precision + m_format.Printf(wxT("%%%d."), m_width); + } + else if ( m_precision != -1 && m_width == -1) + { + // default width + m_format.Printf(wxT("%%.%d"), m_precision); + } + else if ( m_precision != -1 && m_width != -1 ) + { + m_format.Printf(wxT("%%%d.%d"), m_width, m_precision); + } + else + { + // default width/precision + m_format = wxT("%"); + } + + bool isUpper = (m_style & wxGRID_FLOAT_FORMAT_UPPER) != 0; + if ( m_style & wxGRID_FLOAT_FORMAT_SCIENTIFIC ) + m_format += isUpper ? wxT('E') : wxT('e'); + else if ( m_style & wxGRID_FLOAT_FORMAT_COMPACT ) + m_format += isUpper ? wxT('G') : wxT('g'); + else + m_format += wxT('f'); + } + + return wxString::Format(m_format, m_value); +} + +bool wxGridCellFloatEditor::IsAcceptedKey(wxKeyEvent& event) +{ + if ( wxGridCellEditor::IsAcceptedKey(event) ) + { + const int keycode = event.GetKeyCode(); + if ( wxIsascii(keycode) ) + { +#if wxUSE_INTL + const wxString decimalPoint = + wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER); +#else + const wxString decimalPoint(wxT('.')); +#endif + + // accept digits, 'e' as in '1e+6', also '-', '+', and '.' + if ( wxIsdigit(keycode) || + tolower(keycode) == 'e' || + keycode == decimalPoint || + keycode == '+' || + keycode == '-' ) + { + return true; + } + } + } + + return false; +} + +#endif // wxUSE_TEXTCTRL + +#if wxUSE_CHECKBOX + +// ---------------------------------------------------------------------------- +// wxGridCellBoolEditor +// ---------------------------------------------------------------------------- + +// the default values for GetValue() +wxString wxGridCellBoolEditor::ms_stringValues[2] = { wxT(""), wxT("1") }; + +void wxGridCellBoolEditor::Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler) +{ + m_control = new wxCheckBox(parent, id, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + wxNO_BORDER); + + wxGridCellEditor::Create(parent, id, evtHandler); +} + +void wxGridCellBoolEditor::SetSize(const wxRect& r) +{ + bool resize = false; + wxSize size = m_control->GetSize(); + wxCoord minSize = wxMin(r.width, r.height); + + // check if the checkbox is not too big/small for this cell + wxSize sizeBest = m_control->GetBestSize(); + if ( !(size == sizeBest) ) + { + // reset to default size if it had been made smaller + size = sizeBest; + + resize = true; + } + + if ( size.x >= minSize || size.y >= minSize ) + { + // leave 1 pixel margin + size.x = size.y = minSize - 2; + + resize = true; + } + + if ( resize ) + { + m_control->SetSize(size); + } + + // position it in the centre of the rectangle (TODO: support alignment?) + +#if defined(__WXGTK__) || defined (__WXMOTIF__) + // the checkbox without label still has some space to the right in wxGTK, + // so shift it to the right + size.x -= 8; +#elif defined(__WXMSW__) + // here too, but in other way + size.x += 1; + size.y -= 2; +#endif + + int hAlign = wxALIGN_CENTRE; + int vAlign = wxALIGN_CENTRE; + if (GetCellAttr()) + GetCellAttr()->GetAlignment(& hAlign, & vAlign); + + int x = 0, y = 0; + if (hAlign == wxALIGN_LEFT) + { + x = r.x + 2; + +#ifdef __WXMSW__ + x += 2; +#endif + + y = r.y + r.height / 2 - size.y / 2; + } + else if (hAlign == wxALIGN_RIGHT) + { + x = r.x + r.width - size.x - 2; + y = r.y + r.height / 2 - size.y / 2; + } + else if (hAlign == wxALIGN_CENTRE) + { + x = r.x + r.width / 2 - size.x / 2; + y = r.y + r.height / 2 - size.y / 2; + } + + m_control->Move(x, y); +} + +void wxGridCellBoolEditor::Show(bool show, wxGridCellAttr *attr) +{ + m_control->Show(show); + + if ( show ) + { + wxColour colBg = attr ? attr->GetBackgroundColour() : *wxLIGHT_GREY; + CBox()->SetBackgroundColour(colBg); + } +} + +void wxGridCellBoolEditor::BeginEdit(int row, int col, wxGrid* grid) +{ + wxASSERT_MSG(m_control, + wxT("The wxGridCellEditor must be created first!")); + + if (grid->GetTable()->CanGetValueAs(row, col, wxGRID_VALUE_BOOL)) + { + m_value = grid->GetTable()->GetValueAsBool(row, col); + } + else + { + wxString cellval( grid->GetTable()->GetValue(row, col) ); + + if ( cellval == ms_stringValues[false] ) + m_value = false; + else if ( cellval == ms_stringValues[true] ) + m_value = true; + else + { + // do not try to be smart here and convert it to true or false + // because we'll still overwrite it with something different and + // this risks to be very surprising for the user code, let them + // know about it + wxFAIL_MSG( wxT("invalid value for a cell with bool editor!") ); + } + } + + CBox()->SetValue(m_value); + CBox()->SetFocus(); +} + +bool wxGridCellBoolEditor::EndEdit(int WXUNUSED(row), + int WXUNUSED(col), + const wxGrid* WXUNUSED(grid), + const wxString& WXUNUSED(oldval), + wxString *newval) +{ + bool value = CBox()->GetValue(); + if ( value == m_value ) + return false; + + m_value = value; + + if ( newval ) + *newval = GetValue(); + + return true; +} + +void wxGridCellBoolEditor::ApplyEdit(int row, int col, wxGrid* grid) +{ + wxGridTableBase * const table = grid->GetTable(); + if ( table->CanSetValueAs(row, col, wxGRID_VALUE_BOOL) ) + table->SetValueAsBool(row, col, m_value); + else + table->SetValue(row, col, GetValue()); +} + +void wxGridCellBoolEditor::Reset() +{ + wxASSERT_MSG(m_control, + wxT("The wxGridCellEditor must be created first!")); + + CBox()->SetValue(m_value); +} + +void wxGridCellBoolEditor::StartingClick() +{ + CBox()->SetValue(!CBox()->GetValue()); +} + +bool wxGridCellBoolEditor::IsAcceptedKey(wxKeyEvent& event) +{ + if ( wxGridCellEditor::IsAcceptedKey(event) ) + { + int keycode = event.GetKeyCode(); + switch ( keycode ) + { + case WXK_SPACE: + case '+': + case '-': + return true; + } + } + + return false; +} + +void wxGridCellBoolEditor::StartingKey(wxKeyEvent& event) +{ + int keycode = event.GetKeyCode(); + switch ( keycode ) + { + case WXK_SPACE: + CBox()->SetValue(!CBox()->GetValue()); + break; + + case '+': + CBox()->SetValue(true); + break; + + case '-': + CBox()->SetValue(false); + break; + } +} + +wxString wxGridCellBoolEditor::GetValue() const +{ + return ms_stringValues[CBox()->GetValue()]; +} + +/* static */ void +wxGridCellBoolEditor::UseStringValues(const wxString& valueTrue, + const wxString& valueFalse) +{ + ms_stringValues[false] = valueFalse; + ms_stringValues[true] = valueTrue; +} + +/* static */ bool +wxGridCellBoolEditor::IsTrueValue(const wxString& value) +{ + return value == ms_stringValues[true]; +} + +#endif // wxUSE_CHECKBOX + +#if wxUSE_COMBOBOX + +// ---------------------------------------------------------------------------- +// wxGridCellChoiceEditor +// ---------------------------------------------------------------------------- + +wxGridCellChoiceEditor::wxGridCellChoiceEditor(const wxArrayString& choices, + bool allowOthers) + : m_choices(choices), + m_allowOthers(allowOthers) { } + +wxGridCellChoiceEditor::wxGridCellChoiceEditor(size_t count, + const wxString choices[], + bool allowOthers) + : m_allowOthers(allowOthers) +{ + if ( count ) + { + m_choices.Alloc(count); + for ( size_t n = 0; n < count; n++ ) + { + m_choices.Add(choices[n]); + } + } +} + +wxGridCellEditor *wxGridCellChoiceEditor::Clone() const +{ + wxGridCellChoiceEditor *editor = new wxGridCellChoiceEditor; + editor->m_allowOthers = m_allowOthers; + editor->m_choices = m_choices; + + return editor; +} + +void wxGridCellChoiceEditor::Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler) +{ + int style = wxTE_PROCESS_ENTER | + wxTE_PROCESS_TAB | + wxBORDER_NONE; + + if ( !m_allowOthers ) + style |= wxCB_READONLY; + m_control = new wxComboBox(parent, id, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + m_choices, + style); + + wxGridCellEditor::Create(parent, id, evtHandler); +} + +void wxGridCellChoiceEditor::SetSize(const wxRect& rect) +{ + wxASSERT_MSG(m_control, + wxT("The wxGridCellChoiceEditor must be created first!")); + + // Check that the height is not too small to fit the combobox. + wxRect rectTallEnough = rect; + const wxSize bestSize = m_control->GetBestSize(); + const wxCoord diffY = bestSize.GetHeight() - rectTallEnough.GetHeight(); + if ( diffY > 0 ) + { + // Do make it tall enough. + rectTallEnough.height += diffY; + + // Also centre the effective rectangle vertically with respect to the + // original one. + rectTallEnough.y -= diffY/2; + } + //else: The rectangle provided is already tall enough. + + wxGridCellEditor::SetSize(rectTallEnough); +} + +void wxGridCellChoiceEditor::PaintBackground(wxDC& dc, + const wxRect& rectCell, + const wxGridCellAttr& attr) +{ + // as we fill the entire client area, don't do anything here to minimize + // flicker + + // TODO: It doesn't actually fill the client area since the height of a + // combo always defaults to the standard. Until someone has time to + // figure out the right rectangle to paint, just do it the normal way. + wxGridCellEditor::PaintBackground(dc, rectCell, attr); +} + +void wxGridCellChoiceEditor::BeginEdit(int row, int col, wxGrid* grid) +{ + wxASSERT_MSG(m_control, + wxT("The wxGridCellEditor must be created first!")); + + wxGridCellEditorEvtHandler* evtHandler = NULL; + if (m_control) + evtHandler = wxDynamicCast(m_control->GetEventHandler(), wxGridCellEditorEvtHandler); + + // Don't immediately end if we get a kill focus event within BeginEdit + if (evtHandler) + evtHandler->SetInSetFocus(true); + + m_value = grid->GetTable()->GetValue(row, col); + + Reset(); // this updates combo box to correspond to m_value + + Combo()->SetFocus(); + +#ifdef __WXOSX_COCOA__ + // This is a work around for the combobox being simply dismissed when a + // choice is made in it under OS X. The bug is almost certainly due to a + // problem in focus events generation logic but it's not obvious to fix and + // for now this at least allows to use wxGrid. + Combo()->Popup(); +#endif + + if (evtHandler) + { + // When dropping down the menu, a kill focus event + // happens after this point, so we can't reset the flag yet. +#if !defined(__WXGTK20__) + evtHandler->SetInSetFocus(false); +#endif + } +} + +bool wxGridCellChoiceEditor::EndEdit(int WXUNUSED(row), + int WXUNUSED(col), + const wxGrid* WXUNUSED(grid), + const wxString& WXUNUSED(oldval), + wxString *newval) +{ + const wxString value = Combo()->GetValue(); + if ( value == m_value ) + return false; + + m_value = value; + + if ( newval ) + *newval = value; + + return true; +} + +void wxGridCellChoiceEditor::ApplyEdit(int row, int col, wxGrid* grid) +{ + grid->GetTable()->SetValue(row, col, m_value); +} + +void wxGridCellChoiceEditor::Reset() +{ + if (m_allowOthers) + { + Combo()->SetValue(m_value); + Combo()->SetInsertionPointEnd(); + } + else // the combobox is read-only + { + // find the right position, or default to the first if not found + int pos = Combo()->FindString(m_value); + if (pos == wxNOT_FOUND) + pos = 0; + Combo()->SetSelection(pos); + } +} + +void wxGridCellChoiceEditor::SetParameters(const wxString& params) +{ + if ( !params ) + { + // what can we do? + return; + } + + m_choices.Empty(); + + wxStringTokenizer tk(params, wxT(',')); + while ( tk.HasMoreTokens() ) + { + m_choices.Add(tk.GetNextToken()); + } +} + +// return the value in the text control +wxString wxGridCellChoiceEditor::GetValue() const +{ + return Combo()->GetValue(); +} + +#endif // wxUSE_COMBOBOX + +#if wxUSE_COMBOBOX + +// ---------------------------------------------------------------------------- +// wxGridCellEnumEditor +// ---------------------------------------------------------------------------- + +// A cell editor which displays an enum number as a textual equivalent. eg +// data in cell is 0,1,2 ... n the cell could be displayed as +// "John","Fred"..."Bob" in the combo choice box + +wxGridCellEnumEditor::wxGridCellEnumEditor(const wxString& choices) + :wxGridCellChoiceEditor() +{ + m_index = -1; + + if (!choices.empty()) + SetParameters(choices); +} + +wxGridCellEditor *wxGridCellEnumEditor::Clone() const +{ + wxGridCellEnumEditor *editor = new wxGridCellEnumEditor(); + editor->m_index = m_index; + return editor; +} + +void wxGridCellEnumEditor::BeginEdit(int row, int col, wxGrid* grid) +{ + wxASSERT_MSG(m_control, + wxT("The wxGridCellEnumEditor must be Created first!")); + + wxGridCellEditorEvtHandler* evtHandler = NULL; + if (m_control) + evtHandler = wxDynamicCast(m_control->GetEventHandler(), wxGridCellEditorEvtHandler); + + // Don't immediately end if we get a kill focus event within BeginEdit + if (evtHandler) + evtHandler->SetInSetFocus(true); + + wxGridTableBase *table = grid->GetTable(); + + if ( table->CanGetValueAs(row, col, wxGRID_VALUE_NUMBER) ) + { + m_index = table->GetValueAsLong(row, col); + } + else + { + wxString startValue = table->GetValue(row, col); + if (startValue.IsNumber() && !startValue.empty()) + { + startValue.ToLong(&m_index); + } + else + { + m_index = -1; + } + } + + Combo()->SetSelection(m_index); + Combo()->SetFocus(); + +#ifdef __WXOSX_COCOA__ + // This is a work around for the combobox being simply dismissed when a + // choice is made in it under OS X. The bug is almost certainly due to a + // problem in focus events generation logic but it's not obvious to fix and + // for now this at least allows to use wxGrid. + Combo()->Popup(); +#endif + + if (evtHandler) + { + // When dropping down the menu, a kill focus event + // happens after this point, so we can't reset the flag yet. +#if !defined(__WXGTK20__) + evtHandler->SetInSetFocus(false); +#endif + } +} + +bool wxGridCellEnumEditor::EndEdit(int WXUNUSED(row), + int WXUNUSED(col), + const wxGrid* WXUNUSED(grid), + const wxString& WXUNUSED(oldval), + wxString *newval) +{ + long idx = Combo()->GetSelection(); + if ( idx == m_index ) + return false; + + m_index = idx; + + if ( newval ) + newval->Printf("%ld", m_index); + + return true; +} + +void wxGridCellEnumEditor::ApplyEdit(int row, int col, wxGrid* grid) +{ + wxGridTableBase * const table = grid->GetTable(); + if ( table->CanSetValueAs(row, col, wxGRID_VALUE_NUMBER) ) + table->SetValueAsLong(row, col, m_index); + else + table->SetValue(row, col, wxString::Format("%ld", m_index)); +} + +#endif // wxUSE_COMBOBOX + +// ---------------------------------------------------------------------------- +// wxGridCellAutoWrapStringEditor +// ---------------------------------------------------------------------------- + +void +wxGridCellAutoWrapStringEditor::Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler) +{ + wxGridCellTextEditor::DoCreate(parent, id, evtHandler, + wxTE_MULTILINE | wxTE_RICH); +} + + +#endif // wxUSE_GRID diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/gridsel.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/gridsel.cpp new file mode 100644 index 0000000000..e79f7f2031 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/gridsel.cpp @@ -0,0 +1,1238 @@ +/////////////////////////////////////////////////////////////////////////// +// Name: src/generic/gridsel.cpp +// Purpose: wxGridSelection +// Author: Stefan Neis +// Modified by: +// Created: 20/02/1999 +// Copyright: (c) Stefan Neis (Stefan.Neis@t-online.de) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#if wxUSE_GRID + +#include "wx/generic/gridsel.h" + + +// Some explanation for the members of the class: +// m_cellSelection stores individual selected cells +// -- this is only used if m_selectionMode == wxGridSelectCells +// m_blockSelectionTopLeft and m_blockSelectionBottomRight +// store the upper left and lower right corner of selected Blocks +// m_rowSelection and m_colSelection store individual selected +// rows and columns; maybe those are superfluous and should be +// treated as blocks? + +wxGridSelection::wxGridSelection( wxGrid * grid, + wxGrid::wxGridSelectionModes sel ) +{ + m_grid = grid; + m_selectionMode = sel; +} + +bool wxGridSelection::IsSelection() +{ + return ( m_cellSelection.GetCount() || m_blockSelectionTopLeft.GetCount() || + m_rowSelection.GetCount() || m_colSelection.GetCount() ); +} + +bool wxGridSelection::IsInSelection( int row, int col ) +{ + size_t count; + + // First check whether the given cell is individually selected + // (if m_selectionMode is wxGridSelectCells). + if ( m_selectionMode == wxGrid::wxGridSelectCells ) + { + count = m_cellSelection.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + wxGridCellCoords& coords = m_cellSelection[n]; + if ( row == coords.GetRow() && col == coords.GetCol() ) + return true; + } + } + + // Now check whether the given cell is + // contained in one of the selected blocks. + count = m_blockSelectionTopLeft.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + wxGridCellCoords& coords1 = m_blockSelectionTopLeft[n]; + wxGridCellCoords& coords2 = m_blockSelectionBottomRight[n]; + if ( BlockContainsCell(coords1.GetRow(), coords1.GetCol(), + coords2.GetRow(), coords2.GetCol(), + row, col ) ) + return true; + } + + // Now check whether the given cell is + // contained in one of the selected rows + // (unless we are in column selection mode). + if ( m_selectionMode != wxGrid::wxGridSelectColumns ) + { + count = m_rowSelection.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + if ( row == m_rowSelection[n] ) + return true; + } + } + + // Now check whether the given cell is + // contained in one of the selected columns + // (unless we are in row selection mode). + if ( m_selectionMode != wxGrid::wxGridSelectRows ) + { + count = m_colSelection.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + if ( col == m_colSelection[n] ) + return true; + } + } + + return false; +} + +// Change the selection mode +void wxGridSelection::SetSelectionMode( wxGrid::wxGridSelectionModes selmode ) +{ + // if selection mode is unchanged return immediately + if (selmode == m_selectionMode) + return; + + if ( m_selectionMode != wxGrid::wxGridSelectCells ) + { + // if changing form row to column selection + // or vice versa, clear the selection. + if ( selmode != wxGrid::wxGridSelectCells ) + ClearSelection(); + + m_selectionMode = selmode; + } + else + { + // if changing from cell selection to something else, + // promote selected cells/blocks to whole rows/columns. + size_t n; + while ( ( n = m_cellSelection.GetCount() ) > 0 ) + { + n--; + wxGridCellCoords& coords = m_cellSelection[n]; + int row = coords.GetRow(); + int col = coords.GetCol(); + m_cellSelection.RemoveAt(n); + if (selmode == wxGrid::wxGridSelectRows) + SelectRow( row ); + else // selmode == wxGridSelectColumns) + SelectCol( col ); + } + + // Note that m_blockSelectionTopLeft's size may be changing! + for (n = 0; n < m_blockSelectionTopLeft.GetCount(); n++) + { + wxGridCellCoords& coords = m_blockSelectionTopLeft[n]; + int topRow = coords.GetRow(); + int leftCol = coords.GetCol(); + coords = m_blockSelectionBottomRight[n]; + int bottomRow = coords.GetRow(); + int rightCol = coords.GetCol(); + + if (selmode == wxGrid::wxGridSelectRows) + { + if (leftCol != 0 || rightCol != m_grid->GetNumberCols() - 1 ) + { + m_blockSelectionTopLeft.RemoveAt(n); + m_blockSelectionBottomRight.RemoveAt(n); + SelectBlockNoEvent( topRow, 0, + bottomRow, m_grid->GetNumberCols() - 1); + } + } + else // selmode == wxGridSelectColumns) + { + if (topRow != 0 || bottomRow != m_grid->GetNumberRows() - 1 ) + { + m_blockSelectionTopLeft.RemoveAt(n); + m_blockSelectionBottomRight.RemoveAt(n); + SelectBlockNoEvent(0, leftCol, + m_grid->GetNumberRows() - 1, rightCol); + } + } + } + + m_selectionMode = selmode; + } +} + +void wxGridSelection::SelectRow(int row, const wxKeyboardState& kbd) +{ + if ( m_selectionMode == wxGrid::wxGridSelectColumns ) + return; + + size_t count, n; + + // Remove single cells contained in newly selected block. + if ( m_selectionMode == wxGrid::wxGridSelectCells ) + { + count = m_cellSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + wxGridCellCoords& coords = m_cellSelection[n]; + if ( BlockContainsCell( row, 0, row, m_grid->GetNumberCols() - 1, + coords.GetRow(), coords.GetCol() ) ) + { + m_cellSelection.RemoveAt(n); + n--; + count--; + } + } + } + + // Simplify list of selected blocks (if possible) + count = m_blockSelectionTopLeft.GetCount(); + bool done = false; + + for ( n = 0; n < count; n++ ) + { + wxGridCellCoords& coords1 = m_blockSelectionTopLeft[n]; + wxGridCellCoords& coords2 = m_blockSelectionBottomRight[n]; + + // Remove block if it is a subset of the row + if ( coords1.GetRow() == row && row == coords2.GetRow() ) + { + m_blockSelectionTopLeft.RemoveAt(n); + m_blockSelectionBottomRight.RemoveAt(n); + n--; + count--; + } + else if ( coords1.GetCol() == 0 && + coords2.GetCol() == m_grid->GetNumberCols() - 1 ) + { + // silently return, if row is contained in block + if ( coords1.GetRow() <= row && row <= coords2.GetRow() ) + return; + // expand block, if it touched row + else if ( coords1.GetRow() == row + 1) + { + coords1.SetRow(row); + done = true; + } + else if ( coords2.GetRow() == row - 1) + { + coords2.SetRow(row); + done = true; + } + } + } + + // Unless we successfully handled the row, + // check whether row is already selected. + if ( !done ) + { + count = m_rowSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + if ( row == m_rowSelection[n] ) + return; + } + + // Add row to selection + m_rowSelection.Add(row); + } + + // Update View: + if ( !m_grid->GetBatchCount() ) + { + wxRect r = m_grid->BlockToDeviceRect( wxGridCellCoords( row, 0 ), + wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ) ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + } + + // Send Event + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( row, 0 ), + wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ), + true, + kbd); + + m_grid->GetEventHandler()->ProcessEvent( gridEvt ); +} + +void wxGridSelection::SelectCol(int col, const wxKeyboardState& kbd) +{ + if ( m_selectionMode == wxGrid::wxGridSelectRows ) + return; + size_t count, n; + + // Remove single cells contained in newly selected block. + if ( m_selectionMode == wxGrid::wxGridSelectCells ) + { + count = m_cellSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + wxGridCellCoords& coords = m_cellSelection[n]; + if ( BlockContainsCell( 0, col, m_grid->GetNumberRows() - 1, col, + coords.GetRow(), coords.GetCol() ) ) + { + m_cellSelection.RemoveAt(n); + n--; + count--; + } + } + } + + // Simplify list of selected blocks (if possible) + count = m_blockSelectionTopLeft.GetCount(); + bool done = false; + for ( n = 0; n < count; n++ ) + { + wxGridCellCoords& coords1 = m_blockSelectionTopLeft[n]; + wxGridCellCoords& coords2 = m_blockSelectionBottomRight[n]; + + // Remove block if it is a subset of the column + if ( coords1.GetCol() == col && col == coords2.GetCol() ) + { + m_blockSelectionTopLeft.RemoveAt(n); + m_blockSelectionBottomRight.RemoveAt(n); + n--; + count--; + } + else if ( coords1.GetRow() == 0 && + coords2.GetRow() == m_grid->GetNumberRows() - 1 ) + { + // silently return, if row is contained in block + if ( coords1.GetCol() <= col && col <= coords2.GetCol() ) + return; + // expand block, if it touched col + else if ( coords1.GetCol() == col + 1) + { + coords1.SetCol(col); + done = true; + } + else if ( coords2.GetCol() == col - 1) + { + coords2.SetCol(col); + done = true; + } + } + } + + // Unless we successfully handled the column, + // Check whether col is already selected. + if ( !done ) + { + count = m_colSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + if ( col == m_colSelection[n] ) + return; + } + + // Add col to selection + m_colSelection.Add(col); + } + + // Update View: + if ( !m_grid->GetBatchCount() ) + { + wxRect r = m_grid->BlockToDeviceRect( wxGridCellCoords( 0, col ), + wxGridCellCoords( m_grid->GetNumberRows() - 1, col ) ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + } + + // Send Event + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( 0, col ), + wxGridCellCoords( m_grid->GetNumberRows() - 1, col ), + true, + kbd ); + + m_grid->GetEventHandler()->ProcessEvent( gridEvt ); +} + +void wxGridSelection::SelectBlock( int topRow, int leftCol, + int bottomRow, int rightCol, + const wxKeyboardState& kbd, + bool sendEvent ) +{ + // Fix the coordinates of the block if needed. + switch ( m_selectionMode ) + { + default: + wxFAIL_MSG( "unknown selection mode" ); + // fall through + + case wxGrid::wxGridSelectCells: + // nothing to do -- in this mode arbitrary blocks can be selected + break; + + case wxGrid::wxGridSelectRows: + leftCol = 0; + rightCol = m_grid->GetNumberCols() - 1; + break; + + case wxGrid::wxGridSelectColumns: + topRow = 0; + bottomRow = m_grid->GetNumberRows() - 1; + break; + + case wxGrid::wxGridSelectRowsOrColumns: + // block selection doesn't make sense for this mode, we could only + // select the entire grid but this wouldn't be useful + return; + } + + if ( topRow > bottomRow ) + { + int temp = topRow; + topRow = bottomRow; + bottomRow = temp; + } + + if ( leftCol > rightCol ) + { + int temp = leftCol; + leftCol = rightCol; + rightCol = temp; + } + + // Handle single cell selection in SelectCell. + // (MB: added check for selection mode here to prevent + // crashes if, for example, we are select rows and the + // grid only has 1 col) + if ( m_selectionMode == wxGrid::wxGridSelectCells && + topRow == bottomRow && leftCol == rightCol ) + { + SelectCell( topRow, leftCol, kbd, sendEvent ); + } + + size_t count, n; + + if ( m_selectionMode == wxGrid::wxGridSelectRows ) + { + // find out which rows are already selected: + wxArrayInt alreadyselected; + alreadyselected.Add(0,bottomRow-topRow+1); + for( n = 0; n < m_rowSelection.GetCount(); n++) + { + int row = m_rowSelection[n]; + if( (row >= topRow) && (row <= bottomRow) ) + { + alreadyselected[ row - topRow ]=1; + } + } + + // add the newly selected rows: + for ( int row = topRow; row <= bottomRow; row++ ) + { + if ( alreadyselected[ row - topRow ] == 0 ) + { + m_rowSelection.Add( row ); + } + } + } + else if ( m_selectionMode == wxGrid::wxGridSelectColumns ) + { + // find out which columns are already selected: + wxArrayInt alreadyselected; + alreadyselected.Add(0,rightCol-leftCol+1); + for( n = 0; n < m_colSelection.GetCount(); n++) + { + int col = m_colSelection[n]; + if( (col >= leftCol) && (col <= rightCol) ) + { + alreadyselected[ col - leftCol ]=1; + } + } + + // add the newly selected columns: + for ( int col = leftCol; col <= rightCol; col++ ) + { + if ( alreadyselected[ col - leftCol ] == 0 ) + { + m_colSelection.Add( col ); + } + } + } + else + { + // Remove single cells contained in newly selected block. + if ( m_selectionMode == wxGrid::wxGridSelectCells ) + { + count = m_cellSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + wxGridCellCoords& coords = m_cellSelection[n]; + if ( BlockContainsCell( topRow, leftCol, bottomRow, rightCol, + coords.GetRow(), coords.GetCol() ) ) + { + m_cellSelection.RemoveAt(n); + n--; + count--; + } + } + } + + // If a block containing the selection is already selected, return, + // if a block contained in the selection is found, remove it. + + count = m_blockSelectionTopLeft.GetCount(); + for ( n = 0; n < count; n++ ) + { + wxGridCellCoords& coords1 = m_blockSelectionTopLeft[n]; + wxGridCellCoords& coords2 = m_blockSelectionBottomRight[n]; + + switch ( BlockContain( coords1.GetRow(), coords1.GetCol(), + coords2.GetRow(), coords2.GetCol(), + topRow, leftCol, bottomRow, rightCol ) ) + { + case 1: + return; + + case -1: + m_blockSelectionTopLeft.RemoveAt(n); + m_blockSelectionBottomRight.RemoveAt(n); + n--; + count--; + break; + + default: + break; + } + } + + // If a row containing the selection is already selected, return, + // if a row contained in newly selected block is found, remove it. + count = m_rowSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + switch ( BlockContain( m_rowSelection[n], 0, + m_rowSelection[n], m_grid->GetNumberCols() - 1, + topRow, leftCol, bottomRow, rightCol ) ) + { + case 1: + return; + + case -1: + m_rowSelection.RemoveAt(n); + n--; + count--; + break; + + default: + break; + } + } + + // Same for columns. + count = m_colSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + switch ( BlockContain( 0, m_colSelection[n], + m_grid->GetNumberRows() - 1, m_colSelection[n], + topRow, leftCol, bottomRow, rightCol ) ) + { + case 1: + return; + + case -1: + m_colSelection.RemoveAt(n); + n--; + count--; + break; + + default: + break; + } + } + + m_blockSelectionTopLeft.Add( wxGridCellCoords( topRow, leftCol ) ); + m_blockSelectionBottomRight.Add( wxGridCellCoords( bottomRow, rightCol ) ); + } + // Update View: + if ( !m_grid->GetBatchCount() ) + { + wxRect r = m_grid->BlockToDeviceRect( wxGridCellCoords( topRow, leftCol ), + wxGridCellCoords( bottomRow, rightCol ) ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + } + + // Send Event, if not disabled. + if ( sendEvent ) + { + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( topRow, leftCol ), + wxGridCellCoords( bottomRow, rightCol ), + true, + kbd); + m_grid->GetEventHandler()->ProcessEvent( gridEvt ); + } +} + +void wxGridSelection::SelectCell( int row, int col, + const wxKeyboardState& kbd, + bool sendEvent ) +{ + if ( IsInSelection ( row, col ) ) + return; + + wxGridCellCoords selectedTopLeft, selectedBottomRight; + if ( m_selectionMode == wxGrid::wxGridSelectRows ) + { + m_rowSelection.Add( row ); + selectedTopLeft = wxGridCellCoords( row, 0 ); + selectedBottomRight = wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ); + } + else if ( m_selectionMode == wxGrid::wxGridSelectColumns ) + { + m_colSelection.Add( col ); + selectedTopLeft = wxGridCellCoords( 0, col ); + selectedBottomRight = wxGridCellCoords( m_grid->GetNumberRows() - 1, col ); + } + else + { + m_cellSelection.Add( wxGridCellCoords( row, col ) ); + selectedTopLeft = wxGridCellCoords( row, col ); + selectedBottomRight = wxGridCellCoords( row, col ); + } + + // Update View: + if ( !m_grid->GetBatchCount() ) + { + wxRect r = m_grid->BlockToDeviceRect( + selectedTopLeft, + selectedBottomRight ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + } + + // Send event + if (sendEvent) + { + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + selectedTopLeft, + selectedBottomRight, + true, + kbd); + m_grid->GetEventHandler()->ProcessEvent( gridEvt ); + } +} + +void +wxGridSelection::ToggleCellSelection(int row, int col, + const wxKeyboardState& kbd) +{ + // if the cell is not selected, select it + if ( !IsInSelection ( row, col ) ) + { + SelectCell(row, col, kbd); + + return; + } + + // otherwise deselect it. This can be simple or more or + // less difficult, depending on how the cell is selected. + size_t count, n; + + // The simplest case: The cell is contained in m_cellSelection + // Then it can't be contained in rows/cols/block (since those + // would remove the cell from m_cellSelection on creation), so + // we just have to remove it from m_cellSelection. + + if ( m_selectionMode == wxGrid::wxGridSelectCells ) + { + count = m_cellSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + const wxGridCellCoords& sel = m_cellSelection[n]; + if ( row == sel.GetRow() && col == sel.GetCol() ) + { + wxGridCellCoords coords = m_cellSelection[n]; + m_cellSelection.RemoveAt(n); + if ( !m_grid->GetBatchCount() ) + { + wxRect r = m_grid->BlockToDeviceRect( coords, coords ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + } + + // Send event + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( row, col ), + wxGridCellCoords( row, col ), + false, + kbd ); + m_grid->GetEventHandler()->ProcessEvent( gridEvt ); + + return; + } + } + } + + // The most difficult case: The cell is member of one or even several + // blocks. Split each such block in up to 4 new parts, that don't + // contain the cell to be selected, like this: + // |---------------------------| + // | | + // | part 1 | + // | | + // |---------------------------| + // | part 3 |x| part 4 | + // |---------------------------| + // | | + // | part 2 | + // | | + // |---------------------------| + // (The x marks the newly deselected cell). + // Note: in row selection mode, we only need part1 and part2; + // in column selection mode, we only need part 3 and part4, + // which are expanded to whole columns automatically! + + count = m_blockSelectionTopLeft.GetCount(); + for ( n = 0; n < count; n++ ) + { + wxGridCellCoords& coords1 = m_blockSelectionTopLeft[n]; + wxGridCellCoords& coords2 = m_blockSelectionBottomRight[n]; + int topRow = coords1.GetRow(); + int leftCol = coords1.GetCol(); + int bottomRow = coords2.GetRow(); + int rightCol = coords2.GetCol(); + + if ( BlockContainsCell( topRow, leftCol, bottomRow, rightCol, row, col ) ) + { + // remove the block + m_blockSelectionTopLeft.RemoveAt(n); + m_blockSelectionBottomRight.RemoveAt(n); + n--; + count--; + + // add up to 4 smaller blocks and set update region + if ( m_selectionMode != wxGrid::wxGridSelectColumns ) + { + if ( topRow < row ) + SelectBlockNoEvent(topRow, leftCol, row - 1, rightCol); + if ( bottomRow > row ) + SelectBlockNoEvent(row + 1, leftCol, bottomRow, rightCol); + } + + if ( m_selectionMode != wxGrid::wxGridSelectRows ) + { + if ( leftCol < col ) + SelectBlockNoEvent(row, leftCol, row, col - 1); + if ( rightCol > col ) + SelectBlockNoEvent(row, col + 1, row, rightCol); + } + } + } + + bool rowSelectionWasChanged = false; + // remove a cell from a row, adding up to two new blocks + if ( m_selectionMode != wxGrid::wxGridSelectColumns ) + { + count = m_rowSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + if ( m_rowSelection[n] == row ) + { + m_rowSelection.RemoveAt(n); + n--; + count--; + + rowSelectionWasChanged = true; + + if (m_selectionMode == wxGrid::wxGridSelectCells) + { + if ( col > 0 ) + SelectBlockNoEvent(row, 0, row, col - 1); + if ( col < m_grid->GetNumberCols() - 1 ) + SelectBlockNoEvent( row, col + 1, + row, m_grid->GetNumberCols() - 1); + } + } + } + } + + bool colSelectionWasChanged = false; + // remove a cell from a column, adding up to two new blocks + if ( m_selectionMode != wxGrid::wxGridSelectRows ) + { + count = m_colSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + if ( m_colSelection[n] == col ) + { + m_colSelection.RemoveAt(n); + n--; + count--; + + colSelectionWasChanged = true; + + if (m_selectionMode == wxGrid::wxGridSelectCells) + { + if ( row > 0 ) + SelectBlockNoEvent(0, col, row - 1, col); + if ( row < m_grid->GetNumberRows() - 1 ) + SelectBlockNoEvent(row + 1, col, + m_grid->GetNumberRows() - 1, col); + } + } + } + } + + // Refresh the screen and send the event; according to m_selectionMode, + // we need to either update only the cell, or the whole row/column. + wxRect r; + if ( m_selectionMode == wxGrid::wxGridSelectCells ) + { + if ( !m_grid->GetBatchCount() ) + { + r = m_grid->BlockToDeviceRect( + wxGridCellCoords( row, col ), + wxGridCellCoords( row, col ) ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + } + + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( row, col ), + wxGridCellCoords( row, col ), + false, + kbd ); + m_grid->GetEventHandler()->ProcessEvent( gridEvt ); + } + else // rows/columns selection mode + { + if ( m_selectionMode != wxGrid::wxGridSelectColumns && + rowSelectionWasChanged ) + { + int numCols = m_grid->GetNumberCols(); + for ( int colFrom = 0, colTo = 0; colTo <= numCols; ++colTo ) + { + if ( m_colSelection.Index(colTo) >= 0 || colTo == numCols ) + { + if ( colFrom < colTo ) + { + if ( !m_grid->GetBatchCount() ) + { + r = m_grid->BlockToDeviceRect( + wxGridCellCoords( row, colFrom ), + wxGridCellCoords( row, colTo-1 ) ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + } + + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( row, colFrom ), + wxGridCellCoords( row, colTo - 1 ), + false, + kbd ); + m_grid->GetEventHandler()->ProcessEvent( gridEvt ); + } + + colFrom = colTo + 1; + } + } + } + + if ( m_selectionMode != wxGrid::wxGridSelectRows && + colSelectionWasChanged ) + { + int numRows = m_grid->GetNumberRows(); + for ( int rowFrom = 0, rowTo = 0; rowTo <= numRows; ++rowTo ) + { + if ( m_rowSelection.Index(rowTo) >= 0 || rowTo == numRows ) + { + if (rowFrom < rowTo) + { + if ( !m_grid->GetBatchCount() ) + { + r = m_grid->BlockToDeviceRect( + wxGridCellCoords( rowFrom, col ), + wxGridCellCoords( rowTo - 1, col ) ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + } + + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( rowFrom, col ), + wxGridCellCoords( rowTo - 1, col ), + false, + kbd ); + m_grid->GetEventHandler()->ProcessEvent( gridEvt ); + } + + rowFrom = rowTo + 1; + } + } + } + } +} + +void wxGridSelection::ClearSelection() +{ + size_t n; + wxRect r; + wxGridCellCoords coords1, coords2; + + // deselect all individual cells and update the screen + if ( m_selectionMode == wxGrid::wxGridSelectCells ) + { + while ( ( n = m_cellSelection.GetCount() ) > 0) + { + n--; + coords1 = m_cellSelection[n]; + m_cellSelection.RemoveAt(n); + if ( !m_grid->GetBatchCount() ) + { + r = m_grid->BlockToDeviceRect( coords1, coords1 ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif + } + } + } + + // deselect all blocks and update the screen + while ( ( n = m_blockSelectionTopLeft.GetCount() ) > 0) + { + n--; + coords1 = m_blockSelectionTopLeft[n]; + coords2 = m_blockSelectionBottomRight[n]; + m_blockSelectionTopLeft.RemoveAt(n); + m_blockSelectionBottomRight.RemoveAt(n); + if ( !m_grid->GetBatchCount() ) + { + r = m_grid->BlockToDeviceRect( coords1, coords2 ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif + } + } + + // deselect all rows and update the screen + if ( m_selectionMode != wxGrid::wxGridSelectColumns ) + { + while ( ( n = m_rowSelection.GetCount() ) > 0) + { + n--; + int row = m_rowSelection[n]; + m_rowSelection.RemoveAt(n); + if ( !m_grid->GetBatchCount() ) + { + r = m_grid->BlockToDeviceRect( wxGridCellCoords( row, 0 ), + wxGridCellCoords( row, m_grid->GetNumberCols() - 1 ) ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif + } + } + } + + // deselect all columns and update the screen + if ( m_selectionMode != wxGrid::wxGridSelectRows ) + { + while ( ( n = m_colSelection.GetCount() ) > 0) + { + n--; + int col = m_colSelection[n]; + m_colSelection.RemoveAt(n); + if ( !m_grid->GetBatchCount() ) + { + r = m_grid->BlockToDeviceRect( wxGridCellCoords( 0, col ), + wxGridCellCoords( m_grid->GetNumberRows() - 1, col ) ); + ((wxWindow *)m_grid->m_gridWin)->Refresh( false, &r ); + +#ifdef __WXMAC__ + ((wxWindow *)m_grid->m_gridWin)->Update(); +#endif + } + } + } + + // One deselection event, indicating deselection of _all_ cells. + // (No finer grained events for each of the smaller regions + // deselected above!) + wxGridRangeSelectEvent gridEvt( m_grid->GetId(), + wxEVT_GRID_RANGE_SELECT, + m_grid, + wxGridCellCoords( 0, 0 ), + wxGridCellCoords( + m_grid->GetNumberRows() - 1, + m_grid->GetNumberCols() - 1 ), + false ); + + m_grid->GetEventHandler()->ProcessEvent(gridEvt); +} + + +void wxGridSelection::UpdateRows( size_t pos, int numRows ) +{ + size_t count = m_cellSelection.GetCount(); + size_t n; + for ( n = 0; n < count; n++ ) + { + wxGridCellCoords& coords = m_cellSelection[n]; + wxCoord row = coords.GetRow(); + if ((size_t)row >= pos) + { + if (numRows > 0) + { + // If rows inserted, increase row counter where necessary + coords.SetRow(row + numRows); + } + else if (numRows < 0) + { + // If rows deleted ... + if ((size_t)row >= pos - numRows) + { + // ...either decrement row counter (if row still exists)... + coords.SetRow(row + numRows); + } + else + { + // ...or remove the attribute + m_cellSelection.RemoveAt(n); + n--; + count--; + } + } + } + } + + count = m_blockSelectionTopLeft.GetCount(); + for ( n = 0; n < count; n++ ) + { + wxGridCellCoords& coords1 = m_blockSelectionTopLeft[n]; + wxGridCellCoords& coords2 = m_blockSelectionBottomRight[n]; + wxCoord row1 = coords1.GetRow(); + wxCoord row2 = coords2.GetRow(); + + if ((size_t)row2 >= pos) + { + if (numRows > 0) + { + // If rows inserted, increase row counter where necessary + coords2.SetRow( row2 + numRows ); + if ((size_t)row1 >= pos) + coords1.SetRow( row1 + numRows ); + } + else if (numRows < 0) + { + // If rows deleted ... + if ((size_t)row2 >= pos - numRows) + { + // ...either decrement row counter (if row still exists)... + coords2.SetRow( row2 + numRows ); + if ((size_t)row1 >= pos) + coords1.SetRow( wxMax(row1 + numRows, (int)pos) ); + + } + else + { + if ((size_t)row1 >= pos) + { + // ...or remove the attribute + m_blockSelectionTopLeft.RemoveAt(n); + m_blockSelectionBottomRight.RemoveAt(n); + n--; + count--; + } + else + coords2.SetRow( pos ); + } + } + } + } + + count = m_rowSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + int rowOrCol_ = m_rowSelection[n]; + + if ((size_t) rowOrCol_ >= pos) + { + if ( numRows > 0 ) + { + m_rowSelection[n] += numRows; + } + else if ( numRows < 0 ) + { + if ((size_t)rowOrCol_ >= (pos - numRows)) + m_rowSelection[n] += numRows; + else + { + m_rowSelection.RemoveAt( n ); + n--; + count--; + } + } + } + } + // No need to touch selected columns, unless we removed _all_ + // rows, in this case, we remove all columns from the selection. + + if ( !m_grid->GetNumberRows() ) + m_colSelection.Clear(); +} + + +void wxGridSelection::UpdateCols( size_t pos, int numCols ) +{ + size_t count = m_cellSelection.GetCount(); + size_t n; + + for ( n = 0; n < count; n++ ) + { + wxGridCellCoords& coords = m_cellSelection[n]; + wxCoord col = coords.GetCol(); + if ((size_t)col >= pos) + { + if (numCols > 0) + { + // If rows inserted, increase row counter where necessary + coords.SetCol(col + numCols); + } + else if (numCols < 0) + { + // If rows deleted ... + if ((size_t)col >= pos - numCols) + { + // ...either decrement row counter (if row still exists)... + coords.SetCol(col + numCols); + } + else + { + // ...or remove the attribute + m_cellSelection.RemoveAt(n); + n--; + count--; + } + } + } + } + + count = m_blockSelectionTopLeft.GetCount(); + for ( n = 0; n < count; n++ ) + { + wxGridCellCoords& coords1 = m_blockSelectionTopLeft[n]; + wxGridCellCoords& coords2 = m_blockSelectionBottomRight[n]; + wxCoord col1 = coords1.GetCol(); + wxCoord col2 = coords2.GetCol(); + + if ((size_t)col2 >= pos) + { + if (numCols > 0) + { + // If rows inserted, increase row counter where necessary + coords2.SetCol(col2 + numCols); + if ((size_t)col1 >= pos) + coords1.SetCol(col1 + numCols); + } + else if (numCols < 0) + { + // If cols deleted ... + if ((size_t)col2 >= pos - numCols) + { + // ...either decrement col counter (if col still exists)... + coords2.SetCol(col2 + numCols); + if ( (size_t) col1 >= pos) + coords1.SetCol( wxMax(col1 + numCols, (int)pos) ); + + } + else + { + if ((size_t)col1 >= pos) + { + // ...or remove the attribute + m_blockSelectionTopLeft.RemoveAt(n); + m_blockSelectionBottomRight.RemoveAt(n); + n--; + count--; + } + else + coords2.SetCol(pos); + } + } + } + } + + count = m_colSelection.GetCount(); + for ( n = 0; n < count; n++ ) + { + int rowOrCol = m_colSelection[n]; + + if ((size_t)rowOrCol >= pos) + { + if ( numCols > 0 ) + m_colSelection[n] += numCols; + else if ( numCols < 0 ) + { + if ((size_t)rowOrCol >= (pos - numCols)) + m_colSelection[n] += numCols; + else + { + m_colSelection.RemoveAt( n ); + n--; + count--; + } + } + } + } + + // No need to touch selected rows, unless we removed _all_ + // columns, in this case, we remove all rows from the selection. + if ( !m_grid->GetNumberCols() ) + m_rowSelection.Clear(); +} + +int wxGridSelection::BlockContain( int topRow1, int leftCol1, + int bottomRow1, int rightCol1, + int topRow2, int leftCol2, + int bottomRow2, int rightCol2 ) +// returns 1, if Block1 contains Block2, +// -1, if Block2 contains Block1, +// 0, otherwise +{ + if ( topRow1 <= topRow2 && bottomRow2 <= bottomRow1 && + leftCol1 <= leftCol2 && rightCol2 <= rightCol1 ) + return 1; + else if ( topRow2 <= topRow1 && bottomRow1 <= bottomRow2 && + leftCol2 <= leftCol1 && rightCol1 <= rightCol2 ) + return -1; + + return 0; +} + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/headerctrlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/headerctrlg.cpp new file mode 100644 index 0000000000..6dcccfdce8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/headerctrlg.cpp @@ -0,0 +1,720 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/headerctrlg.cpp +// Purpose: generic wxHeaderCtrl implementation +// Author: Vadim Zeitlin +// Created: 2008-12-03 +// Copyright: (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_HEADERCTRL + +#include "wx/headerctrl.h" + +#ifdef wxHAS_GENERIC_HEADERCTRL + +#include "wx/dcbuffer.h" +#include "wx/renderer.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +namespace +{ + +const unsigned COL_NONE = (unsigned)-1; + +} // anonymous namespace + +// ============================================================================ +// wxHeaderCtrl implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl creation +// ---------------------------------------------------------------------------- + +void wxHeaderCtrl::Init() +{ + m_numColumns = 0; + m_hover = + m_colBeingResized = + m_colBeingReordered = COL_NONE; + m_dragOffset = 0; + m_scrollOffset = 0; +} + +bool wxHeaderCtrl::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if ( !wxHeaderCtrlBase::Create(parent, id, pos, size, + style, wxDefaultValidator, name) ) + return false; + + // tell the system to not paint the background at all to avoid flicker as + // we paint the entire window area in our OnPaint() + SetBackgroundStyle(wxBG_STYLE_CUSTOM); + + return true; +} + +wxHeaderCtrl::~wxHeaderCtrl() +{ +} + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl columns manipulation +// ---------------------------------------------------------------------------- + +void wxHeaderCtrl::DoSetCount(unsigned int count) +{ + // update the column indices order array before changing m_numColumns + DoResizeColumnIndices(m_colIndices, count); + + m_numColumns = count; + + InvalidateBestSize(); + Refresh(); +} + +unsigned int wxHeaderCtrl::DoGetCount() const +{ + return m_numColumns; +} + +void wxHeaderCtrl::DoUpdate(unsigned int idx) +{ + InvalidateBestSize(); + + // we need to refresh not only this column but also the ones after it in + // case it was shown or hidden or its width changed -- it would be nice to + // avoid doing this unnecessary by storing the old column width (TODO) + RefreshColsAfter(idx); +} + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl scrolling +// ---------------------------------------------------------------------------- + +void wxHeaderCtrl::DoScrollHorz(int dx) +{ + m_scrollOffset += dx; + + // don't call our own version which calls this function! + wxControl::ScrollWindow(dx, 0); +} + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl geometry +// ---------------------------------------------------------------------------- + +wxSize wxHeaderCtrl::DoGetBestSize() const +{ + wxWindow *win = GetParent(); + int height = wxRendererNative::Get().GetHeaderButtonHeight( win ); + + // the vertical size is rather arbitrary but it looks better if we leave + // some space around the text + const wxSize size(IsEmpty() ? wxHeaderCtrlBase::DoGetBestSize().x + : GetColEnd(GetColumnCount() - 1), + height ); // (7*GetCharHeight())/4); + CacheBestSize(size); + return size; +} + +int wxHeaderCtrl::GetColStart(unsigned int idx) const +{ + int pos = m_scrollOffset; + for ( unsigned n = 0; ; n++ ) + { + const unsigned i = m_colIndices[n]; + if ( i == idx ) + break; + + const wxHeaderColumn& col = GetColumn(i); + if ( col.IsShown() ) + pos += col.GetWidth(); + } + + return pos; +} + +int wxHeaderCtrl::GetColEnd(unsigned int idx) const +{ + int x = GetColStart(idx); + + return x + GetColumn(idx).GetWidth(); +} + +unsigned int wxHeaderCtrl::FindColumnAtPoint(int x, bool *onSeparator) const +{ + int pos = 0; + const unsigned count = GetColumnCount(); + for ( unsigned n = 0; n < count; n++ ) + { + const unsigned idx = m_colIndices[n]; + const wxHeaderColumn& col = GetColumn(idx); + if ( col.IsHidden() ) + continue; + + pos += col.GetWidth(); + + // if the column is resizable, check if we're approximatively over the + // line separating it from the next column + // + // TODO: don't hardcode sensitivity + if ( col.IsResizeable() && abs(x - pos) < 8 ) + { + if ( onSeparator ) + *onSeparator = true; + return idx; + } + + // inside this column? + if ( x < pos ) + { + if ( onSeparator ) + *onSeparator = false; + return idx; + } + } + + if ( onSeparator ) + *onSeparator = false; + return COL_NONE; +} + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl repainting +// ---------------------------------------------------------------------------- + +void wxHeaderCtrl::RefreshCol(unsigned int idx) +{ + wxRect rect = GetClientRect(); + rect.x += GetColStart(idx); + rect.width = GetColumn(idx).GetWidth(); + + RefreshRect(rect); +} + +void wxHeaderCtrl::RefreshColIfNotNone(unsigned int idx) +{ + if ( idx != COL_NONE ) + RefreshCol(idx); +} + +void wxHeaderCtrl::RefreshColsAfter(unsigned int idx) +{ + wxRect rect = GetClientRect(); + const int ofs = GetColStart(idx); + rect.x += ofs; + rect.width -= ofs; + + RefreshRect(rect); +} + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl dragging/resizing/reordering +// ---------------------------------------------------------------------------- + +bool wxHeaderCtrl::IsResizing() const +{ + return m_colBeingResized != COL_NONE; +} + +bool wxHeaderCtrl::IsReordering() const +{ + return m_colBeingReordered != COL_NONE; +} + +void wxHeaderCtrl::ClearMarkers() +{ + wxClientDC dc(this); + + wxDCOverlay dcover(m_overlay, &dc); + dcover.Clear(); +} + +void wxHeaderCtrl::EndDragging() +{ + // We currently only use markers for reordering, not for resizing + if (IsReordering()) + { + ClearMarkers(); + m_overlay.Reset(); + } + + // don't use the special dragging cursor any more + SetCursor(wxNullCursor); +} + +void wxHeaderCtrl::CancelDragging() +{ + wxASSERT_MSG( IsDragging(), + "shouldn't be called if we're not dragging anything" ); + + EndDragging(); + + unsigned int& col = IsResizing() ? m_colBeingResized : m_colBeingReordered; + + wxHeaderCtrlEvent event(wxEVT_HEADER_DRAGGING_CANCELLED, GetId()); + event.SetEventObject(this); + event.SetColumn(col); + + GetEventHandler()->ProcessEvent(event); + + col = COL_NONE; +} + +int wxHeaderCtrl::ConstrainByMinWidth(unsigned int col, int& xPhysical) +{ + const int xStart = GetColStart(col); + + // notice that GetMinWidth() returns 0 if there is no minimal width so it + // still makes sense to use it even in this case + const int xMinEnd = xStart + GetColumn(col).GetMinWidth(); + + if ( xPhysical < xMinEnd ) + xPhysical = xMinEnd; + + return xPhysical - xStart; +} + +void wxHeaderCtrl::StartOrContinueResizing(unsigned int col, int xPhysical) +{ + wxHeaderCtrlEvent event(IsResizing() ? wxEVT_HEADER_RESIZING + : wxEVT_HEADER_BEGIN_RESIZE, + GetId()); + event.SetEventObject(this); + event.SetColumn(col); + + event.SetWidth(ConstrainByMinWidth(col, xPhysical)); + + if ( GetEventHandler()->ProcessEvent(event) && !event.IsAllowed() ) + { + if ( IsResizing() ) + { + ReleaseMouse(); + CancelDragging(); + } + //else: nothing to do -- we just don't start to resize + } + else // go ahead with resizing + { + if ( !IsResizing() ) + { + m_colBeingResized = col; + SetCursor(wxCursor(wxCURSOR_SIZEWE)); + CaptureMouse(); + } + //else: we had already done the above when we started + + } +} + +void wxHeaderCtrl::EndResizing(int xPhysical) +{ + wxASSERT_MSG( IsResizing(), "shouldn't be called if we're not resizing" ); + + EndDragging(); + + ReleaseMouse(); + + wxHeaderCtrlEvent event(wxEVT_HEADER_END_RESIZE, GetId()); + event.SetEventObject(this); + event.SetColumn(m_colBeingResized); + event.SetWidth(ConstrainByMinWidth(m_colBeingResized, xPhysical)); + + GetEventHandler()->ProcessEvent(event); + + m_colBeingResized = COL_NONE; +} + +void wxHeaderCtrl::UpdateReorderingMarker(int xPhysical) +{ + wxClientDC dc(this); + + wxDCOverlay dcover(m_overlay, &dc); + dcover.Clear(); + + dc.SetPen(*wxBLUE); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + + // draw the phantom position of the column being dragged + int x = xPhysical - m_dragOffset; + int y = GetClientSize().y; + dc.DrawRectangle(x, 0, + GetColumn(m_colBeingReordered).GetWidth(), y); + + // and also a hint indicating where it is going to be inserted if it's + // dropped now + unsigned int col = FindColumnAtPoint(xPhysical); + if ( col != COL_NONE ) + { + static const int DROP_MARKER_WIDTH = 4; + + dc.SetBrush(*wxBLUE); + dc.DrawRectangle(GetColEnd(col) - DROP_MARKER_WIDTH/2, 0, + DROP_MARKER_WIDTH, y); + } +} + +void wxHeaderCtrl::StartReordering(unsigned int col, int xPhysical) +{ + wxHeaderCtrlEvent event(wxEVT_HEADER_BEGIN_REORDER, GetId()); + event.SetEventObject(this); + event.SetColumn(col); + + if ( GetEventHandler()->ProcessEvent(event) && !event.IsAllowed() ) + { + // don't start dragging it, nothing to do otherwise + return; + } + + m_dragOffset = xPhysical - GetColStart(col); + + m_colBeingReordered = col; + SetCursor(wxCursor(wxCURSOR_HAND)); + CaptureMouse(); + + // do not call UpdateReorderingMarker() here: we don't want to give + // feedback for reordering until the user starts to really move the mouse + // as he might want to just click on the column and not move it at all +} + +bool wxHeaderCtrl::EndReordering(int xPhysical) +{ + wxASSERT_MSG( IsReordering(), "shouldn't be called if we're not reordering" ); + + EndDragging(); + + ReleaseMouse(); + + const int colOld = m_colBeingReordered, + colNew = FindColumnAtPoint(xPhysical); + + m_colBeingReordered = COL_NONE; + + if ( xPhysical - GetColStart(colOld) == m_dragOffset ) + return false; + + if ( colNew != colOld ) + { + wxHeaderCtrlEvent event(wxEVT_HEADER_END_REORDER, GetId()); + event.SetEventObject(this); + event.SetColumn(colOld); + + const unsigned pos = GetColumnPos(FindColumnAtPoint(xPhysical)); + event.SetNewOrder(pos); + + if ( !GetEventHandler()->ProcessEvent(event) || event.IsAllowed() ) + { + // do reorder the columns + DoMoveCol(colOld, pos); + } + } + + // whether we moved the column or not, the user did move the mouse and so + // did try to do it so return true + return true; +} + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl column reordering +// ---------------------------------------------------------------------------- + +void wxHeaderCtrl::DoSetColumnsOrder(const wxArrayInt& order) +{ + m_colIndices = order; + Refresh(); +} + +wxArrayInt wxHeaderCtrl::DoGetColumnsOrder() const +{ + return m_colIndices; +} + +void wxHeaderCtrl::DoMoveCol(unsigned int idx, unsigned int pos) +{ + MoveColumnInOrderArray(m_colIndices, idx, pos); + + Refresh(); +} + +// ---------------------------------------------------------------------------- +// wxHeaderCtrl event handlers +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxHeaderCtrl, wxHeaderCtrlBase) + EVT_PAINT(wxHeaderCtrl::OnPaint) + + EVT_MOUSE_EVENTS(wxHeaderCtrl::OnMouse) + + EVT_MOUSE_CAPTURE_LOST(wxHeaderCtrl::OnCaptureLost) + + EVT_KEY_DOWN(wxHeaderCtrl::OnKeyDown) +END_EVENT_TABLE() + +void wxHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + int w, h; + GetClientSize(&w, &h); + +#ifdef __WXGTK__ +// int vw; +// GetVirtualSize(&vw, NULL); +#endif + + wxAutoBufferedPaintDC dc(this); + + dc.SetBackground(GetBackgroundColour()); + dc.Clear(); + + // account for the horizontal scrollbar offset in the parent window + dc.SetDeviceOrigin(m_scrollOffset, 0); + + const unsigned int count = m_numColumns; + int xpos = 0; + for ( unsigned int i = 0; i < count; i++ ) + { + const unsigned idx = m_colIndices[i]; + const wxHeaderColumn& col = GetColumn(idx); + if ( col.IsHidden() ) + continue; + + int colWidth = col.GetWidth(); + + wxHeaderSortIconType sortArrow; + if ( col.IsSortKey() ) + { + sortArrow = col.IsSortOrderAscending() ? wxHDR_SORT_ICON_UP + : wxHDR_SORT_ICON_DOWN; + } + else // not sorting by this column + { + sortArrow = wxHDR_SORT_ICON_NONE; + } + + int state = 0; + if ( IsEnabled() ) + { + if ( idx == m_hover ) + state = wxCONTROL_CURRENT; + } + else // disabled + { + state = wxCONTROL_DISABLED; + } + + if (i == 0) + state |= wxCONTROL_SPECIAL; + + wxHeaderButtonParams params; + params.m_labelText = col.GetTitle(); + params.m_labelBitmap = col.GetBitmap(); + params.m_labelAlignment = col.GetAlignment(); + +#ifdef __WXGTK__ + if (i == count-1) + { +// colWidth = wxMax( colWidth, vw - xpos ); + state |= wxCONTROL_DIRTY; + } +#endif + + wxRendererNative::Get().DrawHeaderButton + ( + this, + dc, + wxRect(xpos, 0, colWidth, h), + state, + sortArrow, + ¶ms + ); + + xpos += colWidth; + } +} + +void wxHeaderCtrl::OnCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event)) +{ + if ( IsDragging() ) + CancelDragging(); +} + +void wxHeaderCtrl::OnKeyDown(wxKeyEvent& event) +{ + if ( event.GetKeyCode() == WXK_ESCAPE ) + { + if ( IsDragging() ) + { + ReleaseMouse(); + CancelDragging(); + + return; + } + } + + event.Skip(); +} + +void wxHeaderCtrl::OnMouse(wxMouseEvent& mevent) +{ + // do this in advance to allow simply returning if we're not interested, + // we'll undo it if we do handle the event below + mevent.Skip(); + + + // account for the control displacement + const int xPhysical = mevent.GetX(); + const int xLogical = xPhysical - m_scrollOffset; + + // first deal with the [continuation of any] dragging operations in + // progress + if ( IsResizing() ) + { + if ( mevent.LeftUp() ) + EndResizing(xPhysical); + else // update the live separator position + StartOrContinueResizing(m_colBeingResized, xPhysical); + + return; + } + + if ( IsReordering() ) + { + if ( !mevent.LeftUp() ) + { + // update the column position + UpdateReorderingMarker(xPhysical); + + return; + } + + // finish reordering and continue to generate a click event below if we + // didn't really reorder anything + if ( EndReordering(xPhysical) ) + return; + } + + + // find if the event is over a column at all + bool onSeparator; + const unsigned col = mevent.Leaving() + ? (onSeparator = false, COL_NONE) + : FindColumnAtPoint(xLogical, &onSeparator); + + + // update the highlighted column if it changed + if ( col != m_hover ) + { + const unsigned hoverOld = m_hover; + m_hover = col; + + RefreshColIfNotNone(hoverOld); + RefreshColIfNotNone(m_hover); + } + + // update mouse cursor as it moves around + if ( mevent.Moving() ) + { + SetCursor(onSeparator ? wxCursor(wxCURSOR_SIZEWE) : wxNullCursor); + return; + } + + // all the other events only make sense when they happen over a column + if ( col == COL_NONE ) + return; + + + // enter various dragging modes on left mouse press + if ( mevent.LeftDown() ) + { + if ( onSeparator ) + { + // start resizing the column + wxASSERT_MSG( !IsResizing(), "reentering column resize mode?" ); + StartOrContinueResizing(col, xPhysical); + } + else // on column itself + { + // start dragging the column + wxASSERT_MSG( !IsReordering(), "reentering column move mode?" ); + + StartReordering(col, xPhysical); + } + + return; + } + + // determine the type of header event corresponding to click events + wxEventType evtType = wxEVT_NULL; + const bool click = mevent.ButtonUp(), + dblclk = mevent.ButtonDClick(); + if ( click || dblclk ) + { + switch ( mevent.GetButton() ) + { + case wxMOUSE_BTN_LEFT: + // treat left double clicks on separator specially + if ( onSeparator && dblclk ) + { + evtType = wxEVT_HEADER_SEPARATOR_DCLICK; + } + else // not double click on separator + { + evtType = click ? wxEVT_HEADER_CLICK + : wxEVT_HEADER_DCLICK; + } + break; + + case wxMOUSE_BTN_RIGHT: + evtType = click ? wxEVT_HEADER_RIGHT_CLICK + : wxEVT_HEADER_RIGHT_DCLICK; + break; + + case wxMOUSE_BTN_MIDDLE: + evtType = click ? wxEVT_HEADER_MIDDLE_CLICK + : wxEVT_HEADER_MIDDLE_DCLICK; + break; + + default: + // ignore clicks from other mouse buttons + ; + } + } + + if ( evtType == wxEVT_NULL ) + return; + + wxHeaderCtrlEvent event(evtType, GetId()); + event.SetEventObject(this); + event.SetColumn(col); + + if ( GetEventHandler()->ProcessEvent(event) ) + mevent.Skip(false); +} + +#endif // wxHAS_GENERIC_HEADERCTRL + +#endif // wxUSE_HEADERCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/helpext.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/helpext.cpp new file mode 100644 index 0000000000..af4644ad85 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/helpext.cpp @@ -0,0 +1,487 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/helpext.cpp +// Purpose: an external help controller for wxWidgets +// Author: Karsten Ballueder +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Karsten Ballueder +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_HELP && !defined(__WXWINCE__) + +#ifndef WX_PRECOMP + #include "wx/list.h" + #include "wx/string.h" + #include "wx/utils.h" + #include "wx/intl.h" + #include "wx/msgdlg.h" + #include "wx/choicdlg.h" + #include "wx/log.h" +#endif + +#include "wx/filename.h" +#include "wx/textfile.h" +#include "wx/generic/helpext.h" + +#include +#include +#include + +#if !defined(__WINDOWS__) && !defined(__OS2__) + #include +#endif + +#ifdef __WINDOWS__ +#include "wx/msw/mslu.h" +#endif + +#ifdef __WXMSW__ +#include +#include "wx/msw/winundef.h" +#endif + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// Name for map file. +#define WXEXTHELP_MAPFILE wxT("wxhelp.map") + +// Character introducing comments/documentation field in map file. +#define WXEXTHELP_COMMENTCHAR ';' + +// The ID of the Contents section +#define WXEXTHELP_CONTENTS_ID 0 + +// Name of environment variable to set help browser. +#define WXEXTHELP_ENVVAR_BROWSER wxT("WX_HELPBROWSER") + +// Is browser a netscape browser? +#define WXEXTHELP_ENVVAR_BROWSERISNETSCAPE wxT("WX_HELPBROWSER_NS") + +IMPLEMENT_CLASS(wxExtHelpController, wxHelpControllerBase) + +wxExtHelpController::wxExtHelpController(wxWindow* parentWindow) + : wxHelpControllerBase(parentWindow) +{ + m_MapList = NULL; + m_NumOfEntries = 0; + m_BrowserIsNetscape = false; + + wxChar *browser = wxGetenv(WXEXTHELP_ENVVAR_BROWSER); + if (browser) + { + m_BrowserName = browser; + browser = wxGetenv(WXEXTHELP_ENVVAR_BROWSERISNETSCAPE); + m_BrowserIsNetscape = browser && (wxAtoi(browser) != 0); + } +} + +wxExtHelpController::~wxExtHelpController() +{ + DeleteList(); +} + +#if WXWIN_COMPATIBILITY_2_8 +void wxExtHelpController::SetBrowser(const wxString& browsername, bool isNetscape) +{ + m_BrowserName = browsername; + m_BrowserIsNetscape = isNetscape; +} +#endif + +void wxExtHelpController::SetViewer(const wxString& viewer, long flags) +{ + m_BrowserName = viewer; + m_BrowserIsNetscape = (flags & wxHELP_NETSCAPE) != 0; +} + +bool wxExtHelpController::DisplayHelp(const wxString &relativeURL) +{ + // construct hte URL to open -- it's just a file + wxString url(wxT("file://") + m_helpDir); + url << wxFILE_SEP_PATH << relativeURL; + + // use the explicit browser program if specified + if ( !m_BrowserName.empty() ) + { + if ( m_BrowserIsNetscape ) + { + wxString command; + command << m_BrowserName + << wxT(" -remote openURL(") << url << wxT(')'); + if ( wxExecute(command, wxEXEC_SYNC) != -1 ) + return true; + } + + if ( wxExecute(m_BrowserName + wxT(' ') + url, wxEXEC_SYNC) != -1 ) + return true; + } + //else: either no browser explicitly specified or we failed to open it + + // just use default browser + return wxLaunchDefaultBrowser(url); +} + +class wxExtHelpMapEntry : public wxObject +{ +public: + int entryid; + wxString url; + wxString doc; + + wxExtHelpMapEntry(int iid, wxString const &iurl, wxString const &idoc) + { entryid = iid; url = iurl; doc = idoc; } +}; + +void wxExtHelpController::DeleteList() +{ + if (m_MapList) + { + wxList::compatibility_iterator node = m_MapList->GetFirst(); + while (node) + { + delete (wxExtHelpMapEntry *)node->GetData(); + m_MapList->Erase(node); + node = m_MapList->GetFirst(); + } + + wxDELETE(m_MapList); + } +} + +// This must be called to tell the controller where to find the documentation. +// @param file - NOT a filename, but a directory name. +// @return true on success +bool wxExtHelpController::Initialize(const wxString& file) +{ + return LoadFile(file); +} + +bool wxExtHelpController::ParseMapFileLine(const wxString& line) +{ + const wxChar *p = line.c_str(); + + // skip whitespace + while ( isascii(*p) && wxIsspace(*p) ) + p++; + + // skip empty lines and comments + if ( *p == wxT('\0') || *p == WXEXTHELP_COMMENTCHAR ) + return true; + + // the line is of the form "num url" so we must have an integer now + wxChar *end; + const unsigned long id = wxStrtoul(p, &end, 0); + + if ( end == p ) + return false; + + p = end; + while ( isascii(*p) && wxIsspace(*p) ) + p++; + + // next should be the URL + wxString url; + url.reserve(line.length()); + while ( isascii(*p) && !wxIsspace(*p) ) + url += *p++; + + while ( isascii(*p) && wxIsspace(*p) ) + p++; + + // and finally the optional description of the entry after comment + wxString doc; + if ( *p == WXEXTHELP_COMMENTCHAR ) + { + p++; + while ( isascii(*p) && wxIsspace(*p) ) + p++; + doc = p; + } + + m_MapList->Append(new wxExtHelpMapEntry(id, url, doc)); + m_NumOfEntries++; + + return true; +} + +// file is a misnomer as it's the name of the base help directory +bool wxExtHelpController::LoadFile(const wxString& file) +{ + wxFileName helpDir(wxFileName::DirName(file)); + helpDir.MakeAbsolute(); + + bool dirExists = false; + +#if wxUSE_INTL + // If a locale is set, look in file/localename, i.e. If passed + // "/usr/local/myapp/help" and the current wxLocale is set to be "de", then + // look in "/usr/local/myapp/help/de/" first and fall back to + // "/usr/local/myapp/help" if that doesn't exist. + const wxLocale * const loc = wxGetLocale(); + if ( loc ) + { + wxString locName = loc->GetName(); + + // the locale is in general of the form xx_YY.zzzz, try the full firm + // first and then also more general ones + wxFileName helpDirLoc(helpDir); + helpDirLoc.AppendDir(locName); + dirExists = helpDirLoc.DirExists(); + + if ( ! dirExists ) + { + // try without encoding + const wxString locNameWithoutEncoding = locName.BeforeLast(wxT('.')); + if ( !locNameWithoutEncoding.empty() ) + { + helpDirLoc = helpDir; + helpDirLoc.AppendDir(locNameWithoutEncoding); + dirExists = helpDirLoc.DirExists(); + } + } + + if ( !dirExists ) + { + // try without country part + wxString locNameWithoutCountry = locName.BeforeLast(wxT('_')); + if ( !locNameWithoutCountry.empty() ) + { + helpDirLoc = helpDir; + helpDirLoc.AppendDir(locNameWithoutCountry); + dirExists = helpDirLoc.DirExists(); + } + } + + if ( dirExists ) + helpDir = helpDirLoc; + } +#endif // wxUSE_INTL + + if ( ! dirExists && !helpDir.DirExists() ) + { + wxLogError(_("Help directory \"%s\" not found."), + helpDir.GetFullPath().c_str()); + return false; + } + + const wxFileName mapFile(helpDir.GetFullPath(), WXEXTHELP_MAPFILE); + if ( ! mapFile.FileExists() ) + { + wxLogError(_("Help file \"%s\" not found."), + mapFile.GetFullPath().c_str()); + return false; + } + + DeleteList(); + m_MapList = new wxList; + m_NumOfEntries = 0; + + wxTextFile input; + if ( !input.Open(mapFile.GetFullPath()) ) + return false; + + for ( wxString& line = input.GetFirstLine(); + !input.Eof(); + line = input.GetNextLine() ) + { + if ( !ParseMapFileLine(line) ) + { + wxLogWarning(_("Line %lu of map file \"%s\" has invalid syntax, skipped."), + (unsigned long)input.GetCurrentLine(), + mapFile.GetFullPath().c_str()); + } + } + + if ( !m_NumOfEntries ) + { + wxLogError(_("No valid mappings found in the file \"%s\"."), + mapFile.GetFullPath().c_str()); + return false; + } + + m_helpDir = helpDir.GetFullPath(); // now it's valid + return true; +} + + +bool wxExtHelpController::DisplayContents() +{ + if (! m_NumOfEntries) + return false; + + wxString contents; + wxList::compatibility_iterator node = m_MapList->GetFirst(); + wxExtHelpMapEntry *entry; + while (node) + { + entry = (wxExtHelpMapEntry *)node->GetData(); + if (entry->entryid == WXEXTHELP_CONTENTS_ID) + { + contents = entry->url; + break; + } + + node = node->GetNext(); + } + + bool rc = false; + wxString file; + file << m_helpDir << wxFILE_SEP_PATH << contents; + if (file.Contains(wxT('#'))) + file = file.BeforeLast(wxT('#')); + if ( wxFileExists(file) ) + rc = DisplaySection(WXEXTHELP_CONTENTS_ID); + + // if not found, open homemade toc: + return rc ? true : KeywordSearch(wxEmptyString); +} + +bool wxExtHelpController::DisplaySection(int sectionNo) +{ + if (! m_NumOfEntries) + return false; + + wxBusyCursor b; // display a busy cursor + wxList::compatibility_iterator node = m_MapList->GetFirst(); + wxExtHelpMapEntry *entry; + while (node) + { + entry = (wxExtHelpMapEntry *)node->GetData(); + if (entry->entryid == sectionNo) + return DisplayHelp(entry->url); + node = node->GetNext(); + } + + return false; +} + +bool wxExtHelpController::DisplaySection(const wxString& section) +{ + bool isFilename = (section.Find(wxT(".htm")) != -1); + + if (isFilename) + return DisplayHelp(section); + else + return KeywordSearch(section); +} + +bool wxExtHelpController::DisplayBlock(long blockNo) +{ + return DisplaySection((int)blockNo); +} + +bool wxExtHelpController::KeywordSearch(const wxString& k, + wxHelpSearchMode WXUNUSED(mode)) +{ + if (! m_NumOfEntries) + return false; + + wxString *choices = new wxString[m_NumOfEntries]; + wxString *urls = new wxString[m_NumOfEntries]; + + int idx = 0; + bool rc = false; + bool showAll = k.empty(); + + wxList::compatibility_iterator node = m_MapList->GetFirst(); + + { + // display a busy cursor + wxBusyCursor b; + wxString compA, compB; + wxExtHelpMapEntry *entry; + + // we compare case insensitive + if (! showAll) + { + compA = k; + compA.LowerCase(); + } + + while (node) + { + entry = (wxExtHelpMapEntry *)node->GetData(); + compB = entry->doc; + + bool testTarget = ! compB.empty(); + if (testTarget && ! showAll) + { + compB.LowerCase(); + testTarget = compB.Contains(compA); + } + + if (testTarget) + { + urls[idx] = entry->url; + // doesn't work: + // choices[idx] = (**i).doc.Contains((**i).doc.Before(WXEXTHELP_COMMENTCHAR)); + //if (choices[idx].empty()) // didn't contain the ';' + // choices[idx] = (**i).doc; + choices[idx] = wxEmptyString; + for (int j=0; ; j++) + { + wxChar targetChar = entry->doc.c_str()[j]; + if ((targetChar == 0) || (targetChar == WXEXTHELP_COMMENTCHAR)) + break; + + choices[idx] << targetChar; + } + + idx++; + } + + node = node->GetNext(); + } + } + + switch (idx) + { + case 0: + wxMessageBox(_("No entries found.")); + break; + + case 1: + rc = DisplayHelp(urls[0]); + break; + + default: + if (showAll) + idx = wxGetSingleChoiceIndex(_("Help Index"), + _("Help Index"), + idx, choices); + else + idx = wxGetSingleChoiceIndex(_("Relevant entries:"), + _("Entries found"), + idx, choices); + + if (idx >= 0) + rc = DisplayHelp(urls[idx]); + break; + } + + delete [] urls; + delete [] choices; + + return rc; +} + + +bool wxExtHelpController::Quit() +{ + return true; +} + +void wxExtHelpController::OnQuit() +{ +} + +#endif // wxUSE_HELP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/htmllbox.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/htmllbox.cpp new file mode 100644 index 0000000000..1018e1bad9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/htmllbox.cpp @@ -0,0 +1,723 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/htmllbox.cpp +// Purpose: implementation of wxHtmlListBox +// Author: Vadim Zeitlin +// Modified by: +// Created: 31.05.03 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/dcclient.h" +#endif //WX_PRECOMP + +#if wxUSE_HTML + +#include "wx/htmllbox.h" + +#include "wx/html/htmlcell.h" +#include "wx/html/winpars.h" + +// this hack forces the linker to always link in m_* files +#include "wx/html/forcelnk.h" +FORCE_WXHTML_MODULES() + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// small border always added to the cells: +static const wxCoord CELL_BORDER = 2; + +const char wxHtmlListBoxNameStr[] = "htmlListBox"; +const char wxSimpleHtmlListBoxNameStr[] = "simpleHtmlListBox"; + +// ============================================================================ +// private classes +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxHtmlListBoxCache +// ---------------------------------------------------------------------------- + +// this class is used by wxHtmlListBox to cache the parsed representation of +// the items to avoid doing it anew each time an item must be drawn +class wxHtmlListBoxCache +{ +private: + // invalidate a single item, used by Clear() and InvalidateRange() + void InvalidateItem(size_t n) + { + m_items[n] = (size_t)-1; + wxDELETE(m_cells[n]); + } + +public: + wxHtmlListBoxCache() + { + for ( size_t n = 0; n < SIZE; n++ ) + { + m_items[n] = (size_t)-1; + m_cells[n] = NULL; + } + + m_next = 0; + } + + ~wxHtmlListBoxCache() + { + for ( size_t n = 0; n < SIZE; n++ ) + { + delete m_cells[n]; + } + } + + // completely invalidate the cache + void Clear() + { + for ( size_t n = 0; n < SIZE; n++ ) + { + InvalidateItem(n); + } + } + + // return the cached cell for this index or NULL if none + wxHtmlCell *Get(size_t item) const + { + for ( size_t n = 0; n < SIZE; n++ ) + { + if ( m_items[n] == item ) + return m_cells[n]; + } + + return NULL; + } + + // returns true if we already have this item cached + bool Has(size_t item) const { return Get(item) != NULL; } + + // ensure that the item is cached + void Store(size_t item, wxHtmlCell *cell) + { + delete m_cells[m_next]; + m_cells[m_next] = cell; + m_items[m_next] = item; + + // advance to the next item wrapping around if there are no more + if ( ++m_next == SIZE ) + m_next = 0; + } + + // forget the cached value of the item(s) between the given ones (inclusive) + void InvalidateRange(size_t from, size_t to) + { + for ( size_t n = 0; n < SIZE; n++ ) + { + if ( m_items[n] >= from && m_items[n] <= to ) + { + InvalidateItem(n); + } + } + } + +private: + // the max number of the items we cache + enum { SIZE = 50 }; + + // the index of the LRU (oldest) cell + size_t m_next; + + // the parsed representation of the cached item or NULL + wxHtmlCell *m_cells[SIZE]; + + // the index of the currently cached item (only valid if m_cells != NULL) + size_t m_items[SIZE]; +}; + +// ---------------------------------------------------------------------------- +// wxHtmlListBoxStyle +// ---------------------------------------------------------------------------- + +// just forward wxDefaultHtmlRenderingStyle callbacks to the main class so that +// they could be overridden by the user code +class wxHtmlListBoxStyle : public wxDefaultHtmlRenderingStyle +{ +public: + wxHtmlListBoxStyle(const wxHtmlListBox& hlbox) : m_hlbox(hlbox) { } + + virtual wxColour GetSelectedTextColour(const wxColour& colFg) + { + // by default wxHtmlListBox doesn't implement GetSelectedTextColour() + // and returns wxNullColour from it, so use the default HTML colour for + // selection + wxColour col = m_hlbox.GetSelectedTextColour(colFg); + if ( !col.IsOk() ) + { + col = wxDefaultHtmlRenderingStyle::GetSelectedTextColour(colFg); + } + + return col; + } + + virtual wxColour GetSelectedTextBgColour(const wxColour& colBg) + { + wxColour col = m_hlbox.GetSelectedTextBgColour(colBg); + if ( !col.IsOk() ) + { + col = wxDefaultHtmlRenderingStyle::GetSelectedTextBgColour(colBg); + } + + return col; + } + +private: + const wxHtmlListBox& m_hlbox; + + wxDECLARE_NO_COPY_CLASS(wxHtmlListBoxStyle); +}; + +// ---------------------------------------------------------------------------- +// event tables +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxHtmlListBox, wxVListBox) + EVT_SIZE(wxHtmlListBox::OnSize) + EVT_MOTION(wxHtmlListBox::OnMouseMove) + EVT_LEFT_DOWN(wxHtmlListBox::OnLeftDown) +END_EVENT_TABLE() + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_ABSTRACT_CLASS(wxHtmlListBox, wxVListBox) + + +// ---------------------------------------------------------------------------- +// wxHtmlListBox creation +// ---------------------------------------------------------------------------- + +wxHtmlListBox::wxHtmlListBox() + : wxHtmlWindowMouseHelper(this) +{ + Init(); +} + +// normal constructor which calls Create() internally +wxHtmlListBox::wxHtmlListBox(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) + : wxHtmlWindowMouseHelper(this) +{ + Init(); + + (void)Create(parent, id, pos, size, style, name); +} + +void wxHtmlListBox::Init() +{ + m_htmlParser = NULL; + m_htmlRendStyle = new wxHtmlListBoxStyle(*this); + m_cache = new wxHtmlListBoxCache; +} + +bool wxHtmlListBox::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + return wxVListBox::Create(parent, id, pos, size, style, name); +} + +wxHtmlListBox::~wxHtmlListBox() +{ + delete m_cache; + + if ( m_htmlParser ) + { + delete m_htmlParser->GetDC(); + delete m_htmlParser; + } + + delete m_htmlRendStyle; +} + +// ---------------------------------------------------------------------------- +// wxHtmlListBox appearance +// ---------------------------------------------------------------------------- + +wxColour +wxHtmlListBox::GetSelectedTextColour(const wxColour& WXUNUSED(colFg)) const +{ + return wxNullColour; +} + +wxColour +wxHtmlListBox::GetSelectedTextBgColour(const wxColour& WXUNUSED(colBg)) const +{ + return GetSelectionBackground(); +} + +// ---------------------------------------------------------------------------- +// wxHtmlListBox items markup +// ---------------------------------------------------------------------------- + +wxString wxHtmlListBox::OnGetItemMarkup(size_t n) const +{ + // we don't even need to wrap the value returned by OnGetItem() inside + // "" and "" because wxHTML can parse it even + // without these tags + return OnGetItem(n); +} + +// ---------------------------------------------------------------------------- +// wxHtmlListBox cache handling +// ---------------------------------------------------------------------------- + +void wxHtmlListBox::CacheItem(size_t n) const +{ + if ( !m_cache->Has(n) ) + { + if ( !m_htmlParser ) + { + wxHtmlListBox *self = wxConstCast(this, wxHtmlListBox); + + self->m_htmlParser = new wxHtmlWinParser(self); + m_htmlParser->SetDC(new wxClientDC(self)); + m_htmlParser->SetFS(&self->m_filesystem); +#if !wxUSE_UNICODE + if (GetFont().IsOk()) + m_htmlParser->SetInputEncoding(GetFont().GetEncoding()); +#endif + // use system's default GUI font by default: + m_htmlParser->SetStandardFonts(); + } + + wxHtmlContainerCell *cell = (wxHtmlContainerCell *)m_htmlParser-> + Parse(OnGetItemMarkup(n)); + wxCHECK_RET( cell, wxT("wxHtmlParser::Parse() returned NULL?") ); + + // set the cell's ID to item's index so that CellCoordsToPhysical() + // can quickly find the item: + cell->SetId(wxString::Format(wxT("%lu"), (unsigned long)n)); + + cell->Layout(GetClientSize().x - 2*GetMargins().x); + + m_cache->Store(n, cell); + } +} + +void wxHtmlListBox::OnSize(wxSizeEvent& event) +{ + // we need to relayout all the cached cells + m_cache->Clear(); + + event.Skip(); +} + +void wxHtmlListBox::RefreshRow(size_t line) +{ + m_cache->InvalidateRange(line, line); + + wxVListBox::RefreshRow(line); +} + +void wxHtmlListBox::RefreshRows(size_t from, size_t to) +{ + m_cache->InvalidateRange(from, to); + + wxVListBox::RefreshRows(from, to); +} + +void wxHtmlListBox::RefreshAll() +{ + m_cache->Clear(); + + wxVListBox::RefreshAll(); +} + +void wxHtmlListBox::SetItemCount(size_t count) +{ + // the items are going to change, forget the old ones + m_cache->Clear(); + + wxVListBox::SetItemCount(count); +} + +// ---------------------------------------------------------------------------- +// wxHtmlListBox implementation of wxVListBox pure virtuals +// ---------------------------------------------------------------------------- + +void +wxHtmlListBox::OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const +{ + if ( IsSelected(n) ) + { + if ( DoDrawSolidBackground + ( + GetSelectedTextBgColour(GetBackgroundColour()), + dc, + rect, + n + ) ) + { + return; + } + //else: no custom selection background colour, use base class version + } + + wxVListBox::OnDrawBackground(dc, rect, n); +} + +void wxHtmlListBox::OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const +{ + CacheItem(n); + + wxHtmlCell *cell = m_cache->Get(n); + wxCHECK_RET( cell, wxT("this cell should be cached!") ); + + wxHtmlRenderingInfo htmlRendInfo; + + // draw the selected cell in selected state ourselves if we're using custom + // colours (to test for this, check the callbacks by passing them any dummy + // (but valid, to avoid asserts) colour): + if ( IsSelected(n) && + (GetSelectedTextColour(*wxBLACK).IsOk() || + GetSelectedTextBgColour(*wxWHITE).IsOk()) ) + { + wxHtmlSelection htmlSel; + htmlSel.Set(wxPoint(0,0), cell, wxPoint(INT_MAX, INT_MAX), cell); + htmlRendInfo.SetSelection(&htmlSel); + htmlRendInfo.SetStyle(m_htmlRendStyle); + htmlRendInfo.GetState().SetSelectionState(wxHTML_SEL_IN); + } + //else: normal item or selected item with default colours, its background + // was already taken care of in the base class + + // note that we can't stop drawing exactly at the window boundary as then + // even the visible cells part could be not drawn, so always draw the + // entire cell + cell->Draw(dc, + rect.x + CELL_BORDER, rect.y + CELL_BORDER, + 0, INT_MAX, htmlRendInfo); +} + +wxCoord wxHtmlListBox::OnMeasureItem(size_t n) const +{ + CacheItem(n); + + wxHtmlCell *cell = m_cache->Get(n); + wxCHECK_MSG( cell, 0, wxT("this cell should be cached!") ); + + return cell->GetHeight() + cell->GetDescent() + 4; +} + +// ---------------------------------------------------------------------------- +// wxHtmlListBox implementation of wxHtmlListBoxWinInterface +// ---------------------------------------------------------------------------- + +void wxHtmlListBox::SetHTMLWindowTitle(const wxString& WXUNUSED(title)) +{ + // nothing to do +} + +void wxHtmlListBox::OnHTMLLinkClicked(const wxHtmlLinkInfo& link) +{ + OnLinkClicked(GetItemForCell(link.GetHtmlCell()), link); +} + +void wxHtmlListBox::OnLinkClicked(size_t WXUNUSED(n), + const wxHtmlLinkInfo& link) +{ + wxHtmlLinkEvent event(GetId(), link); + GetEventHandler()->ProcessEvent(event); +} + +wxHtmlOpeningStatus +wxHtmlListBox::OnHTMLOpeningURL(wxHtmlURLType WXUNUSED(type), + const wxString& WXUNUSED(url), + wxString *WXUNUSED(redirect)) const +{ + return wxHTML_OPEN; +} + +wxPoint wxHtmlListBox::HTMLCoordsToWindow(wxHtmlCell *cell, + const wxPoint& pos) const +{ + return CellCoordsToPhysical(pos, cell); +} + +wxWindow* wxHtmlListBox::GetHTMLWindow() { return this; } + +wxColour wxHtmlListBox::GetHTMLBackgroundColour() const +{ + return GetBackgroundColour(); +} + +void wxHtmlListBox::SetHTMLBackgroundColour(const wxColour& WXUNUSED(clr)) +{ + // nothing to do +} + +void wxHtmlListBox::SetHTMLBackgroundImage(const wxBitmap& WXUNUSED(bmpBg)) +{ + // nothing to do +} + +void wxHtmlListBox::SetHTMLStatusText(const wxString& WXUNUSED(text)) +{ + // nothing to do +} + +wxCursor wxHtmlListBox::GetHTMLCursor(HTMLCursor type) const +{ + // we don't want to show text selection cursor in listboxes + if (type == HTMLCursor_Text) + return wxHtmlWindow::GetDefaultHTMLCursor(HTMLCursor_Default); + + // in all other cases, use the same cursor as wxHtmlWindow: + return wxHtmlWindow::GetDefaultHTMLCursor(type); +} + +// ---------------------------------------------------------------------------- +// wxHtmlListBox handling of HTML links +// ---------------------------------------------------------------------------- + +wxPoint wxHtmlListBox::GetRootCellCoords(size_t n) const +{ + wxPoint pos(CELL_BORDER, CELL_BORDER); + pos += GetMargins(); + pos.y += GetRowsHeight(GetVisibleBegin(), n); + return pos; +} + +bool wxHtmlListBox::PhysicalCoordsToCell(wxPoint& pos, wxHtmlCell*& cell) const +{ + int n = VirtualHitTest(pos.y); + if ( n == wxNOT_FOUND ) + return false; + + // convert mouse coordinates to coords relative to item's wxHtmlCell: + pos -= GetRootCellCoords(n); + + CacheItem(n); + cell = m_cache->Get(n); + + return true; +} + +size_t wxHtmlListBox::GetItemForCell(const wxHtmlCell *cell) const +{ + wxCHECK_MSG( cell, 0, wxT("no cell") ); + + cell = cell->GetRootCell(); + + wxCHECK_MSG( cell, 0, wxT("no root cell") ); + + // the cell's ID contains item index, see CacheItem(): + unsigned long n; + if ( !cell->GetId().ToULong(&n) ) + { + wxFAIL_MSG( wxT("unexpected root cell's ID") ); + return 0; + } + + return n; +} + +wxPoint +wxHtmlListBox::CellCoordsToPhysical(const wxPoint& pos, wxHtmlCell *cell) const +{ + return pos + GetRootCellCoords(GetItemForCell(cell)); +} + +void wxHtmlListBox::OnInternalIdle() +{ + wxVListBox::OnInternalIdle(); + + if ( wxHtmlWindowMouseHelper::DidMouseMove() ) + { + wxPoint pos = ScreenToClient(wxGetMousePosition()); + wxHtmlCell *cell; + + if ( !PhysicalCoordsToCell(pos, cell) ) + return; + + wxHtmlWindowMouseHelper::HandleIdle(cell, pos); + } +} + +void wxHtmlListBox::OnMouseMove(wxMouseEvent& event) +{ + wxHtmlWindowMouseHelper::HandleMouseMoved(); + event.Skip(); +} + +void wxHtmlListBox::OnLeftDown(wxMouseEvent& event) +{ + wxPoint pos = event.GetPosition(); + wxHtmlCell *cell; + + if ( !PhysicalCoordsToCell(pos, cell) ) + { + event.Skip(); + return; + } + + if ( !wxHtmlWindowMouseHelper::HandleMouseClick(cell, pos, event) ) + { + // no link was clicked, so let the listbox code handle the click (e.g. + // by selecting another item in the list): + event.Skip(); + } +} + + +// ---------------------------------------------------------------------------- +// wxSimpleHtmlListBox +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxSimpleHtmlListBox, wxHtmlListBox) + + +bool wxSimpleHtmlListBox::Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + int n, const wxString choices[], + long style, + const wxValidator& wxVALIDATOR_PARAM(validator), + const wxString& name) +{ + if (!wxHtmlListBox::Create(parent, id, pos, size, style, name)) + return false; + +#if wxUSE_VALIDATORS + SetValidator(validator); +#endif + + Append(n, choices); + + return true; +} + +bool wxSimpleHtmlListBox::Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& wxVALIDATOR_PARAM(validator), + const wxString& name) +{ + if (!wxHtmlListBox::Create(parent, id, pos, size, style, name)) + return false; + +#if wxUSE_VALIDATORS + SetValidator(validator); +#endif + + Append(choices); + + return true; +} + +wxSimpleHtmlListBox::~wxSimpleHtmlListBox() +{ + wxItemContainer::Clear(); +} + +void wxSimpleHtmlListBox::DoClear() +{ + wxASSERT(m_items.GetCount() == m_HTMLclientData.GetCount()); + + m_items.Clear(); + m_HTMLclientData.Clear(); + + UpdateCount(); +} + +void wxSimpleHtmlListBox::Clear() +{ + DoClear(); +} + +void wxSimpleHtmlListBox::DoDeleteOneItem(unsigned int n) +{ + m_items.RemoveAt(n); + + m_HTMLclientData.RemoveAt(n); + + UpdateCount(); +} + +int wxSimpleHtmlListBox::DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, + wxClientDataType type) +{ + const unsigned int count = items.GetCount(); + + m_items.Insert(wxEmptyString, pos, count); + m_HTMLclientData.Insert(NULL, pos, count); + + for ( unsigned int i = 0; i < count; ++i, ++pos ) + { + m_items[pos] = items[i]; + AssignNewItemClientData(pos, clientData, i, type); + } + + UpdateCount(); + + return pos - 1; +} + +void wxSimpleHtmlListBox::SetString(unsigned int n, const wxString& s) +{ + wxCHECK_RET( IsValid(n), + wxT("invalid index in wxSimpleHtmlListBox::SetString") ); + + m_items[n]=s; + RefreshRow(n); +} + +wxString wxSimpleHtmlListBox::GetString(unsigned int n) const +{ + wxCHECK_MSG( IsValid(n), wxEmptyString, + wxT("invalid index in wxSimpleHtmlListBox::GetString") ); + + return m_items[n]; +} + +void wxSimpleHtmlListBox::UpdateCount() +{ + wxASSERT(m_items.GetCount() == m_HTMLclientData.GetCount()); + wxHtmlListBox::SetItemCount(m_items.GetCount()); + + // very small optimization: if you need to add lot of items to + // a wxSimpleHtmlListBox be sure to use the + // wxSimpleHtmlListBox::Append(const wxArrayString&) method instead! + if (!this->IsFrozen()) + RefreshAll(); +} + +#endif // wxUSE_HTML diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/hyperlinkg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/hyperlinkg.cpp new file mode 100644 index 0000000000..eb8485955d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/hyperlinkg.cpp @@ -0,0 +1,296 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/hyperlinkg.cpp +// Purpose: Hyperlink control +// Author: David Norris , Otto Wyss +// Modified by: Ryan Norton, Francesco Montorsi +// Created: 04/02/2005 +// Copyright: (c) 2005 David Norris +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +//--------------------------------------------------------------------------- +// Pre-compiled header stuff +//--------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_HYPERLINKCTRL + +//--------------------------------------------------------------------------- +// Includes +//--------------------------------------------------------------------------- + +#include "wx/hyperlink.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" // for wxLaunchDefaultBrowser + #include "wx/dcclient.h" + #include "wx/menu.h" + #include "wx/log.h" + #include "wx/dataobj.h" +#endif + +#include "wx/clipbrd.h" +#include "wx/renderer.h" + +// ============================================================================ +// implementation +// ============================================================================ + +// reserved for internal use only +#define wxHYPERLINK_POPUP_COPY_ID 16384 + +// ---------------------------------------------------------------------------- +// wxGenericHyperlinkCtrl +// ---------------------------------------------------------------------------- + +bool wxGenericHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id, + const wxString& label, const wxString& url, const wxPoint& pos, + const wxSize& size, long style, const wxString& name) +{ + // do validation checks: + CheckParams(label, url, style); + + if ((style & wxHL_ALIGN_LEFT) == 0) + style |= wxFULL_REPAINT_ON_RESIZE; + + if (!wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name)) + return false; + + // set to non empty strings both the url and the label + SetURL(url.empty() ? label : url); + SetLabel(label.empty() ? url : label); + + Init(); + SetForegroundColour(m_normalColour); + + // by default the font of an hyperlink control is underlined + wxFont f = GetFont(); + f.SetUnderlined(true); + SetFont(f); + + SetInitialSize(size); + + + // connect our event handlers: + // NOTE: since this class is the base class of the GTK+'s native implementation + // of wxHyperlinkCtrl, we cannot use the static macros in BEGIN/END_EVENT_TABLE + // blocks, otherwise the GTK+'s native impl of wxHyperlinkCtrl would not + // behave correctly (as we intercept events doing things which interfere + // with GTK+'s native handling): + + Connect( wxEVT_PAINT, wxPaintEventHandler(wxGenericHyperlinkCtrl::OnPaint) ); + Connect( wxEVT_SET_FOCUS, wxFocusEventHandler(wxGenericHyperlinkCtrl::OnFocus) ); + Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler(wxGenericHyperlinkCtrl::OnFocus) ); + Connect( wxEVT_CHAR, wxKeyEventHandler(wxGenericHyperlinkCtrl::OnChar) ); + Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeaveWindow) ); + + Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeftDown) ); + Connect( wxEVT_LEFT_UP, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeftUp) ); + Connect( wxEVT_MOTION, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnMotion) ); + + ConnectMenuHandlers(); + + return true; +} + +void wxGenericHyperlinkCtrl::Init() +{ + m_rollover = false; + m_clicking = false; + m_visited = false; + + // colours + m_normalColour = *wxBLUE; + m_hoverColour = *wxRED; + m_visitedColour = wxColour("#551a8b"); +} + +void wxGenericHyperlinkCtrl::ConnectMenuHandlers() +{ + // Connect the event handlers for the context menu. + Connect( wxEVT_RIGHT_UP, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnRightUp) ); + Connect( wxHYPERLINK_POPUP_COPY_ID, wxEVT_MENU, + wxCommandEventHandler(wxGenericHyperlinkCtrl::OnPopUpCopy) ); +} + +wxSize wxGenericHyperlinkCtrl::DoGetBestClientSize() const +{ + wxClientDC dc((wxWindow *)this); + return dc.GetTextExtent(GetLabel()); +} + + +void wxGenericHyperlinkCtrl::SetNormalColour(const wxColour &colour) +{ + m_normalColour = colour; + if (!m_visited) + { + SetForegroundColour(m_normalColour); + Refresh(); + } +} + +void wxGenericHyperlinkCtrl::SetVisitedColour(const wxColour &colour) +{ + m_visitedColour = colour; + if (m_visited) + { + SetForegroundColour(m_visitedColour); + Refresh(); + } +} + +void wxGenericHyperlinkCtrl::DoContextMenu(const wxPoint &pos) +{ + wxMenu *menuPopUp = new wxMenu(wxEmptyString, wxMENU_TEAROFF); + menuPopUp->Append(wxHYPERLINK_POPUP_COPY_ID, _("&Copy URL")); + PopupMenu( menuPopUp, pos ); + delete menuPopUp; +} + +wxRect wxGenericHyperlinkCtrl::GetLabelRect() const +{ + // our best size is always the size of the label without borders + wxSize c(GetClientSize()), b(GetBestSize()); + wxPoint offset; + + // the label is always centered vertically + offset.y = (c.GetHeight()-b.GetHeight())/2; + + if (HasFlag(wxHL_ALIGN_CENTRE)) + offset.x = (c.GetWidth()-b.GetWidth())/2; + else if (HasFlag(wxHL_ALIGN_RIGHT)) + offset.x = c.GetWidth()-b.GetWidth(); + else if (HasFlag(wxHL_ALIGN_LEFT)) + offset.x = 0; + return wxRect(offset, b); +} + + + +// ---------------------------------------------------------------------------- +// wxGenericHyperlinkCtrl - event handlers +// ---------------------------------------------------------------------------- + +void wxGenericHyperlinkCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + dc.SetFont(GetFont()); + dc.SetTextForeground(GetForegroundColour()); + dc.SetTextBackground(GetBackgroundColour()); + + dc.DrawText(GetLabel(), GetLabelRect().GetTopLeft()); + if (HasFocus()) + { + wxRendererNative::Get().DrawFocusRect(this, dc, GetClientRect(), wxCONTROL_SELECTED); + } +} + +void wxGenericHyperlinkCtrl::OnFocus(wxFocusEvent& event) +{ + Refresh(); + event.Skip(); +} + +void wxGenericHyperlinkCtrl::OnChar(wxKeyEvent& event) +{ + switch (event.m_keyCode) + { + default: + event.Skip(); + break; + case WXK_SPACE: + case WXK_NUMPAD_SPACE: + SetForegroundColour(m_visitedColour); + m_visited = true; + SendEvent(); + break; + } +} + +void wxGenericHyperlinkCtrl::OnLeftDown(wxMouseEvent& event) +{ + // the left click must start from the hyperlink rect + m_clicking = GetLabelRect().Contains(event.GetPosition()); +} + +void wxGenericHyperlinkCtrl::OnLeftUp(wxMouseEvent& event) +{ + // the click must be started and ended in the hyperlink rect + if (!m_clicking || !GetLabelRect().Contains(event.GetPosition())) + return; + + SetForegroundColour(m_visitedColour); + m_visited = true; + m_clicking = false; + + // send the event + SendEvent(); +} + +void wxGenericHyperlinkCtrl::OnRightUp(wxMouseEvent& event) +{ + if( GetWindowStyle() & wxHL_CONTEXTMENU ) + if ( GetLabelRect().Contains(event.GetPosition()) ) + DoContextMenu(wxPoint(event.m_x, event.m_y)); +} + +void wxGenericHyperlinkCtrl::OnMotion(wxMouseEvent& event) +{ + wxRect textrc = GetLabelRect(); + + if (textrc.Contains(event.GetPosition())) + { + SetCursor(wxCursor(wxCURSOR_HAND)); + SetForegroundColour(m_hoverColour); + m_rollover = true; + Refresh(); + } + else if (m_rollover) + { + SetCursor(*wxSTANDARD_CURSOR); + SetForegroundColour(!m_visited ? m_normalColour : m_visitedColour); + m_rollover = false; + Refresh(); + } +} + +void wxGenericHyperlinkCtrl::OnLeaveWindow(wxMouseEvent& WXUNUSED(event) ) +{ + // NB: when the label rect and the client size rect have the same + // height this function is indispensable to remove the "rollover" + // effect as the OnMotion() event handler could not be called + // in that case moving the mouse out of the label vertically... + + if (m_rollover) + { + SetCursor(*wxSTANDARD_CURSOR); + SetForegroundColour(!m_visited ? m_normalColour : m_visitedColour); + m_rollover = false; + Refresh(); + } +} + +void wxGenericHyperlinkCtrl::OnPopUpCopy( wxCommandEvent& WXUNUSED(event) ) +{ +#if wxUSE_CLIPBOARD + if (!wxTheClipboard->Open()) + return; + + wxTextDataObject *data = new wxTextDataObject( m_url ); + wxTheClipboard->SetData( data ); + wxTheClipboard->Close(); +#endif // wxUSE_CLIPBOARD +} + +#endif // wxUSE_HYPERLINKCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/icon.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/icon.cpp new file mode 100644 index 0000000000..ffe0335ad0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/icon.cpp @@ -0,0 +1,46 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/icon.cpp +// Purpose: wxIcon implementation for ports where it's same as wxBitmap +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/icon.h" + +//----------------------------------------------------------------------------- +// wxIcon +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) + +wxIcon::wxIcon(const char* const* bits) : + wxBitmap( bits ) +{ +} + +#ifdef wxNEEDS_CHARPP +wxIcon::wxIcon(char **bits) : + wxBitmap( bits ) +{ +} +#endif + +wxIcon::wxIcon() : wxBitmap() +{ +} + +void wxIcon::CopyFromBitmap(const wxBitmap& bmp) +{ + wxIcon *icon = (wxIcon*)(&bmp); + *this = *icon; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/imaglist.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/imaglist.cpp new file mode 100644 index 0000000000..ba98cc4003 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/imaglist.cpp @@ -0,0 +1,273 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/imaglist.cpp +// Purpose: +// Author: Robert Roebling +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_IMAGLIST && !defined(wxHAS_NATIVE_IMAGELIST) + +#include "wx/imaglist.h" + +#ifndef WX_PRECOMP + #include "wx/dc.h" + #include "wx/icon.h" + #include "wx/image.h" +#endif + +//----------------------------------------------------------------------------- +// wxImageList +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGenericImageList, wxObject) +IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxGenericImageList) + +wxGenericImageList::wxGenericImageList( int width, int height, bool mask, int initialCount ) +{ + (void)Create(width, height, mask, initialCount); +} + +wxGenericImageList::~wxGenericImageList() +{ + (void)RemoveAll(); +} + +int wxGenericImageList::GetImageCount() const +{ + return m_images.GetCount(); +} + +bool wxGenericImageList::Create( int width, int height, bool WXUNUSED(mask), int WXUNUSED(initialCount) ) +{ + m_width = width; + m_height = height; + + return Create(); +} + +bool wxGenericImageList::Create() +{ + return true; +} + +int wxGenericImageList::Add( const wxBitmap &bitmap ) +{ + wxASSERT_MSG( (bitmap.GetWidth() >= m_width && bitmap.GetHeight() == m_height) + || (m_width == 0 && m_height == 0), + wxT("invalid bitmap size in wxImageList: this might work ") + wxT("on this platform but definitely won't under Windows.") ); + + const int index = int(m_images.GetCount()); + + if (bitmap.IsKindOf(wxCLASSINFO(wxIcon))) + { + m_images.Append( new wxIcon( (const wxIcon&) bitmap ) ); + } + else + { + // Mimic behaviour of Windows ImageList_Add that automatically breaks up the added + // bitmap into sub-images of the correct size + if (m_width > 0 && bitmap.GetWidth() > m_width && bitmap.GetHeight() >= m_height) + { + int numImages = bitmap.GetWidth() / m_width; + for (int subIndex = 0; subIndex < numImages; subIndex++) + { + wxRect rect(m_width * subIndex, 0, m_width, m_height); + wxBitmap tmpBmp = bitmap.GetSubBitmap(rect); + m_images.Append( new wxBitmap(tmpBmp) ); + } + } + else + { + m_images.Append( new wxBitmap(bitmap) ); + } + } + + if (m_width == 0 && m_height == 0) + { + m_width = bitmap.GetWidth(); + m_height = bitmap.GetHeight(); + } + + return index; +} + +int wxGenericImageList::Add( const wxBitmap& bitmap, const wxBitmap& mask ) +{ + wxBitmap bmp(bitmap); + if (mask.IsOk()) + bmp.SetMask(new wxMask(mask)); + return Add(bmp); +} + +int wxGenericImageList::Add( const wxBitmap& bitmap, const wxColour& maskColour ) +{ + wxImage img = bitmap.ConvertToImage(); + img.SetMaskColour(maskColour.Red(), maskColour.Green(), maskColour.Blue()); + return Add(wxBitmap(img)); +} + +const wxBitmap *wxGenericImageList::GetBitmapPtr( int index ) const +{ + wxObjectList::compatibility_iterator node = m_images.Item( index ); + + wxCHECK_MSG( node, NULL, wxT("wrong index in image list") ); + + return (wxBitmap*)node->GetData(); +} + +// Get the bitmap +wxBitmap wxGenericImageList::GetBitmap(int index) const +{ + const wxBitmap* bmp = GetBitmapPtr(index); + if (bmp) + return *bmp; + else + return wxNullBitmap; +} + +// Get the icon +wxIcon wxGenericImageList::GetIcon(int index) const +{ + const wxBitmap* bmp = GetBitmapPtr(index); + if (bmp) + { + wxIcon icon; + icon.CopyFromBitmap(*bmp); + return icon; + } + else + return wxNullIcon; +} + +bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap ) +{ + wxObjectList::compatibility_iterator node = m_images.Item( index ); + + wxCHECK_MSG( node, false, wxT("wrong index in image list") ); + + wxBitmap* newBitmap = (bitmap.IsKindOf(wxCLASSINFO(wxIcon))) ? + #if defined(__VISAGECPP__) + //just can't do this in VisualAge now, with all this new Bitmap-Icon stuff + //so construct it from a bitmap object until I can figure this nonsense out. (DW) + new wxBitmap(bitmap) + #else + new wxBitmap( (const wxIcon&) bitmap ) + #endif + : new wxBitmap(bitmap) ; + + if (index == (int) m_images.GetCount() - 1) + { + delete node->GetData(); + m_images.Erase( node ); + m_images.Append( newBitmap ); + } + else + { + wxObjectList::compatibility_iterator next = node->GetNext(); + delete node->GetData(); + m_images.Erase( node ); + m_images.Insert( next, newBitmap ); + } + + return true; +} + +bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap, const wxBitmap &mask ) +{ + wxObjectList::compatibility_iterator node = m_images.Item( index ); + + wxCHECK_MSG( node, false, wxT("wrong index in image list") ); + + wxBitmap* newBitmap = (bitmap.IsKindOf(wxCLASSINFO(wxIcon))) ? + #if defined(__VISAGECPP__) + //just can't do this in VisualAge now, with all this new Bitmap-Icon stuff + //so construct it from a bitmap object until I can figure this nonsense out. (DW) + new wxBitmap(bitmap) + #else + new wxBitmap( (const wxIcon&) bitmap ) + #endif + : new wxBitmap(bitmap) ; + + if (index == (int) m_images.GetCount() - 1) + { + delete node->GetData(); + m_images.Erase( node ); + m_images.Append( newBitmap ); + } + else + { + wxObjectList::compatibility_iterator next = node->GetNext(); + delete node->GetData(); + m_images.Erase( node ); + m_images.Insert( next, newBitmap ); + } + + if (mask.IsOk()) + newBitmap->SetMask(new wxMask(mask)); + + return true; +} + +bool wxGenericImageList::Remove( int index ) +{ + wxObjectList::compatibility_iterator node = m_images.Item( index ); + + wxCHECK_MSG( node, false, wxT("wrong index in image list") ); + + delete node->GetData(); + m_images.Erase( node ); + + return true; +} + +bool wxGenericImageList::RemoveAll() +{ + WX_CLEAR_LIST(wxObjectList, m_images); + m_images.Clear(); + + return true; +} + +bool wxGenericImageList::GetSize( int index, int &width, int &height ) const +{ + width = 0; + height = 0; + + wxObjectList::compatibility_iterator node = m_images.Item( index ); + + wxCHECK_MSG( node, false, wxT("wrong index in image list") ); + + wxBitmap *bm = (wxBitmap*)node->GetData(); + width = bm->GetWidth(); + height = bm->GetHeight(); + + return true; +} + +bool wxGenericImageList::Draw( int index, wxDC &dc, int x, int y, + int flags, bool WXUNUSED(solidBackground) ) +{ + wxObjectList::compatibility_iterator node = m_images.Item( index ); + + wxCHECK_MSG( node, false, wxT("wrong index in image list") ); + + wxBitmap *bm = (wxBitmap*)node->GetData(); + + if (bm->IsKindOf(wxCLASSINFO(wxIcon))) + dc.DrawIcon( * ((wxIcon*) bm), x, y); + else + dc.DrawBitmap( *bm, x, y, (flags & wxIMAGELIST_DRAW_TRANSPARENT) > 0 ); + + return true; +} + +#endif // wxUSE_IMAGLIST diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/infobar.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/infobar.cpp new file mode 100644 index 0000000000..3ae926223a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/infobar.cpp @@ -0,0 +1,330 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/infobar.cpp +// Purpose: generic wxInfoBar implementation +// Author: Vadim Zeitlin +// Created: 2009-07-28 +// Copyright: (c) 2009 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_INFOBAR + +#include "wx/infobar.h" + +#ifndef WX_PRECOMP + #include "wx/bmpbuttn.h" + #include "wx/button.h" + #include "wx/dcmemory.h" + #include "wx/settings.h" + #include "wx/statbmp.h" + #include "wx/stattext.h" + #include "wx/sizer.h" +#endif // WX_PRECOMP + +#include "wx/artprov.h" +#include "wx/scopeguard.h" + +BEGIN_EVENT_TABLE(wxInfoBarGeneric, wxInfoBarBase) + EVT_BUTTON(wxID_ANY, wxInfoBarGeneric::OnButton) +END_EVENT_TABLE() + +// ============================================================================ +// implementation +// ============================================================================ + +void wxInfoBarGeneric::Init() +{ + m_icon = NULL; + m_text = NULL; + m_button = NULL; + + m_showEffect = + m_hideEffect = wxSHOW_EFFECT_MAX; + + // use default effect duration + m_effectDuration = 0; +} + +bool wxInfoBarGeneric::Create(wxWindow *parent, wxWindowID winid) +{ + // calling Hide() before Create() ensures that we're created initially + // hidden + Hide(); + if ( !wxWindow::Create(parent, winid) ) + return false; + + // use special, easy to notice, colours + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); + + // create the controls: icon, text and the button to dismiss the + // message. + + // the icon is not shown unless it's assigned a valid bitmap + m_icon = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap); + + m_text = new wxStaticText(this, wxID_ANY, ""); + m_text->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT)); + + m_button = wxBitmapButton::NewCloseButton(this, wxID_ANY); + m_button->SetToolTip(_("Hide this notification message.")); + + // center the text inside the sizer with an icon to the left of it and a + // button at the very right + // + // NB: AddButton() relies on the button being the last control in the sizer + // and being preceded by a spacer + wxSizer * const sizer = new wxBoxSizer(wxHORIZONTAL); + sizer->Add(m_icon, wxSizerFlags().Centre().Border()); + sizer->Add(m_text, wxSizerFlags().Centre()); + sizer->AddStretchSpacer(); + sizer->Add(m_button, wxSizerFlags().Centre().Border()); + SetSizer(sizer); + + return true; +} + +bool wxInfoBarGeneric::SetFont(const wxFont& font) +{ + if ( !wxInfoBarBase::SetFont(font) ) + return false; + + // check that we're not called before Create() + if ( m_text ) + m_text->SetFont(font); + + return true; +} + +bool wxInfoBarGeneric::SetForegroundColour(const wxColor& colour) +{ + if ( !wxInfoBarBase::SetForegroundColour(colour) ) + return false; + + if ( m_text ) + m_text->SetForegroundColour(colour); + + return true; +} + +wxInfoBarGeneric::BarPlacement wxInfoBarGeneric::GetBarPlacement() const +{ + wxSizer * const sizer = GetContainingSizer(); + if ( !sizer ) + return BarPlacement_Unknown; + + // FIXME-VC6: can't compare "const wxInfoBarGeneric *" and "wxWindow *", + // so need this workaround + wxWindow * const self = const_cast(this); + const wxSizerItemList& siblings = sizer->GetChildren(); + if ( siblings.GetFirst()->GetData()->GetWindow() == self ) + return BarPlacement_Top; + else if ( siblings.GetLast()->GetData()->GetWindow() == self ) + return BarPlacement_Bottom; + else + return BarPlacement_Unknown; +} + +wxShowEffect wxInfoBarGeneric::GetShowEffect() const +{ + if ( m_showEffect != wxSHOW_EFFECT_MAX ) + return m_showEffect; + + switch ( GetBarPlacement() ) + { + case BarPlacement_Top: + return wxSHOW_EFFECT_SLIDE_TO_BOTTOM; + + case BarPlacement_Bottom: + return wxSHOW_EFFECT_SLIDE_TO_TOP; + + default: + wxFAIL_MSG( "unknown info bar placement" ); + // fall through + + case BarPlacement_Unknown: + return wxSHOW_EFFECT_NONE; + } +} + +wxShowEffect wxInfoBarGeneric::GetHideEffect() const +{ + if ( m_hideEffect != wxSHOW_EFFECT_MAX ) + return m_hideEffect; + + switch ( GetBarPlacement() ) + { + case BarPlacement_Top: + return wxSHOW_EFFECT_SLIDE_TO_TOP; + + case BarPlacement_Bottom: + return wxSHOW_EFFECT_SLIDE_TO_BOTTOM; + + default: + wxFAIL_MSG( "unknown info bar placement" ); + // fall through + + case BarPlacement_Unknown: + return wxSHOW_EFFECT_NONE; + } +} + +void wxInfoBarGeneric::UpdateParent() +{ + wxWindow * const parent = GetParent(); + parent->Layout(); +} + +void wxInfoBarGeneric::DoHide() +{ + HideWithEffect(GetHideEffect(), GetEffectDuration()); + + UpdateParent(); +} + +void wxInfoBarGeneric::DoShow() +{ + // re-layout the parent first so that the window expands into an already + // unoccupied by the other controls area: for this we need to change our + // internal visibility flag to force Layout() to take us into account (an + // alternative solution to this hack would be to temporarily set + // wxRESERVE_SPACE_EVEN_IF_HIDDEN flag but it's not really batter) + + // just change the internal flag indicating that the window is visible, + // without really showing it + wxWindowBase::Show(); + + // adjust the parent layout to account for us + UpdateParent(); + + // reset the flag back before really showing the window or it wouldn't be + // shown at all because it would believe itself already visible + wxWindowBase::Show(false); + + + // finally do really show the window. + ShowWithEffect(GetShowEffect(), GetEffectDuration()); +} + +void wxInfoBarGeneric::ShowMessage(const wxString& msg, int flags) +{ + // first update the controls + const int icon = flags & wxICON_MASK; + if ( !icon || (icon == wxICON_NONE) ) + { + m_icon->Hide(); + } + else // do show an icon + { + m_icon->SetBitmap(wxArtProvider::GetBitmap( + wxArtProvider::GetMessageBoxIconId(flags), + wxART_BUTTON)); + m_icon->Show(); + } + + // notice the use of EscapeMnemonics() to ensure that "&" come through + // correctly + m_text->SetLabel(wxControl::EscapeMnemonics(msg)); + + + // then show this entire window if not done yet + if ( !IsShown() ) + { + DoShow(); + } + else // we're already shown + { + // just update the layout to correspond to the new message + Layout(); + } +} + +void wxInfoBarGeneric::Dismiss() +{ + DoHide(); +} + +void wxInfoBarGeneric::AddButton(wxWindowID btnid, const wxString& label) +{ + wxSizer * const sizer = GetSizer(); + wxCHECK_RET( sizer, "must be created first" ); + + // user-added buttons replace the standard close button so remove it if we + // hadn't done it yet + if ( sizer->Detach(m_button) ) + { + m_button->Hide(); + } + + wxButton * const button = new wxButton(this, btnid, label); + +#ifdef __WXMAC__ + // smaller buttons look better in the (narrow) info bar under OS X + button->SetWindowVariant(wxWINDOW_VARIANT_SMALL); +#endif // __WXMAC__ + + sizer->Add(button, wxSizerFlags().Centre().DoubleBorder()); +} + +void wxInfoBarGeneric::RemoveButton(wxWindowID btnid) +{ + wxSizer * const sizer = GetSizer(); + wxCHECK_RET( sizer, "must be created first" ); + + // iterate over the sizer items in reverse order to find the last added + // button with this id (ids of all buttons should be unique anyhow but if + // they are repeated removing the last added one probably makes more sense) + const wxSizerItemList& items = sizer->GetChildren(); + for ( wxSizerItemList::compatibility_iterator node = items.GetLast(); + node != items.GetFirst(); + node = node->GetPrevious() ) + { + const wxSizerItem * const item = node->GetData(); + + // if we reached the spacer separating the buttons from the text + // preceding them without finding our button, it must mean it's not + // there at all + if ( item->IsSpacer() ) + { + wxFAIL_MSG( wxString::Format("button with id %d not found", btnid) ); + return; + } + + // check if we found our button + if ( item->GetWindow()->GetId() == btnid ) + { + delete item->GetWindow(); + break; + } + } + + // check if there are any custom buttons left + if ( sizer->GetChildren().GetLast()->GetData()->IsSpacer() ) + { + // if the last item is the spacer, none are left so restore the + // standard close button + sizer->Add(m_button, wxSizerFlags().Centre().DoubleBorder()); + m_button->Show(); + } +} + +void wxInfoBarGeneric::OnButton(wxCommandEvent& WXUNUSED(event)) +{ + DoHide(); +} + +#endif // wxUSE_INFOBAR diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/laywin.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/laywin.cpp new file mode 100644 index 0000000000..5cb58f3f6a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/laywin.cpp @@ -0,0 +1,346 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/laywin.cpp +// Purpose: Implements a simple layout algorithm, plus +// wxSashLayoutWindow which is an example of a window with +// layout-awareness (via event handlers). This is suited to +// IDE-style window layout. +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/frame.h" +#endif + +#include "wx/laywin.h" +#include "wx/mdi.h" + + +IMPLEMENT_DYNAMIC_CLASS(wxQueryLayoutInfoEvent, wxEvent) +IMPLEMENT_DYNAMIC_CLASS(wxCalculateLayoutEvent, wxEvent) + +wxDEFINE_EVENT( wxEVT_QUERY_LAYOUT_INFO, wxQueryLayoutInfoEvent ); +wxDEFINE_EVENT( wxEVT_CALCULATE_LAYOUT, wxCalculateLayoutEvent ); + + +// ---------------------------------------------------------------------------- +// wxSashLayoutWindow +// ---------------------------------------------------------------------------- + +#if wxUSE_SASH +IMPLEMENT_CLASS(wxSashLayoutWindow, wxSashWindow) +BEGIN_EVENT_TABLE(wxSashLayoutWindow, wxSashWindow) + EVT_CALCULATE_LAYOUT(wxSashLayoutWindow::OnCalculateLayout) + EVT_QUERY_LAYOUT_INFO(wxSashLayoutWindow::OnQueryLayoutInfo) +END_EVENT_TABLE() + +bool wxSashLayoutWindow::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, + const wxSize& size, long style, const wxString& name) +{ + return wxSashWindow::Create(parent, id, pos, size, style, name); +} + +void wxSashLayoutWindow::Init() +{ + m_orientation = wxLAYOUT_HORIZONTAL; + m_alignment = wxLAYOUT_TOP; +#ifdef __WXMAC__ + MacSetClipChildren( true ) ; +#endif +} + +// This is the function that wxLayoutAlgorithm calls to ascertain the window +// dimensions. +void wxSashLayoutWindow::OnQueryLayoutInfo(wxQueryLayoutInfoEvent& event) +{ + // int flags = event.GetFlags(); + int requestedLength = event.GetRequestedLength(); + + event.SetOrientation(m_orientation); + event.SetAlignment(m_alignment); + + if (m_orientation == wxLAYOUT_HORIZONTAL) + event.SetSize(wxSize(requestedLength, m_defaultSize.y)); + else + event.SetSize(wxSize(m_defaultSize.x, requestedLength)); +} + +// Called by parent to allow window to take a bit out of the +// client rectangle, and size itself if not in wxLAYOUT_QUERY mode. + +void wxSashLayoutWindow::OnCalculateLayout(wxCalculateLayoutEvent& event) +{ + wxRect clientSize(event.GetRect()); + + int flags = event.GetFlags(); + + if (!IsShown()) + return; + + // Let's assume that all windows stretch the full extent of the window in + // the direction of that window orientation. This will work for non-docking toolbars, + // and the status bar. Note that the windows have to have been created in a certain + // order to work, else you might get a left-aligned window going to the bottom + // of the window, and the status bar appearing to the right of it. The + // status bar would have to be created after or before the toolbar(s). + + wxRect thisRect; + + // Try to stretch + int length = (GetOrientation() == wxLAYOUT_HORIZONTAL) ? clientSize.width : clientSize.height; + wxLayoutOrientation orient = GetOrientation(); + + // We assume that a window that says it's horizontal, wants to be stretched in that + // direction. Is this distinction too fine? Do we assume that any horizontal + // window needs to be stretched in that direction? Possibly. + int whichDimension = (GetOrientation() == wxLAYOUT_HORIZONTAL) ? wxLAYOUT_LENGTH_X : wxLAYOUT_LENGTH_Y; + + wxQueryLayoutInfoEvent infoEvent(GetId()); + infoEvent.SetEventObject(this); + infoEvent.SetRequestedLength(length); + infoEvent.SetFlags(orient | whichDimension); + + if (!GetEventHandler()->ProcessEvent(infoEvent)) + return; + + wxSize sz = infoEvent.GetSize(); + + if (sz.x == 0 && sz.y == 0) // Assume it's invisible + return; + + // Now we know the size it wants to be. We wish to decide where to place it, i.e. + // how it's aligned. + switch (GetAlignment()) + { + case wxLAYOUT_TOP: + { + thisRect.x = clientSize.x; thisRect.y = clientSize.y; + thisRect.width = sz.x; thisRect.height = sz.y; + clientSize.y += thisRect.height; + clientSize.height -= thisRect.height; + break; + } + case wxLAYOUT_LEFT: + { + thisRect.x = clientSize.x; thisRect.y = clientSize.y; + thisRect.width = sz.x; thisRect.height = sz.y; + clientSize.x += thisRect.width; + clientSize.width -= thisRect.width; + break; + } + case wxLAYOUT_RIGHT: + { + thisRect.x = clientSize.x + (clientSize.width - sz.x); thisRect.y = clientSize.y; + thisRect.width = sz.x; thisRect.height = sz.y; + clientSize.width -= thisRect.width; + break; + } + case wxLAYOUT_BOTTOM: + { + thisRect.x = clientSize.x; thisRect.y = clientSize.y + (clientSize.height - sz.y); + thisRect.width = sz.x; thisRect.height = sz.y; + clientSize.height -= thisRect.height; + break; + } + case wxLAYOUT_NONE: + { + break; + } + + } + + if ((flags & wxLAYOUT_QUERY) == 0) + { + // If not in query mode, resize the window. + // TODO: add wxRect& form to wxWindow::SetSize + wxSize sz2 = GetSize(); + wxPoint pos = GetPosition(); + SetSize(thisRect.x, thisRect.y, thisRect.width, thisRect.height); + + // Make sure the sash is erased when the window is resized + if ((pos.x != thisRect.x || pos.y != thisRect.y || sz2.x != thisRect.width || sz2.y != thisRect.height) && + (GetSashVisible(wxSASH_TOP) || GetSashVisible(wxSASH_RIGHT) || GetSashVisible(wxSASH_BOTTOM) || GetSashVisible(wxSASH_LEFT))) + Refresh(true); + + } + + event.SetRect(clientSize); +} +#endif // wxUSE_SASH + + +// ---------------------------------------------------------------------------- +// wxLayoutAlgorithm +// ---------------------------------------------------------------------------- + +#if wxUSE_MDI_ARCHITECTURE + +// Lays out windows for an MDI frame. The MDI client area gets what's left +// over. +bool wxLayoutAlgorithm::LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* r) +{ + int cw, ch; + frame->GetClientSize(& cw, & ch); + + wxRect rect(0, 0, cw, ch); + if (r) + rect = * r; + + wxCalculateLayoutEvent event; + event.SetRect(rect); + + wxWindowList::compatibility_iterator node = frame->GetChildren().GetFirst(); + while (node) + { + wxWindow* win = node->GetData(); + + event.SetId(win->GetId()); + event.SetEventObject(win); + event.SetFlags(0); // ?? + + win->GetEventHandler()->ProcessEvent(event); + + node = node->GetNext(); + } + + wxWindow* clientWindow = frame->GetClientWindow(); + + rect = event.GetRect(); + + clientWindow->SetSize(rect.x, rect.y, rect.width, rect.height); + + return true; +} + +#endif // wxUSE_MDI_ARCHITECTURE + +bool wxLayoutAlgorithm::LayoutFrame(wxFrame* frame, wxWindow* mainWindow) +{ + return LayoutWindow(frame, mainWindow); +} + +// Layout algorithm for any window. mainWindow gets what's left over. +bool wxLayoutAlgorithm::LayoutWindow(wxWindow* parent, wxWindow* mainWindow) +{ + // Test if the parent is a sash window, and if so, + // reduce the available space to allow space for any active edges. + + int leftMargin = 0, rightMargin = 0, topMargin = 0, bottomMargin = 0; +#if wxUSE_SASH + if (wxDynamicCast(parent, wxSashWindow)) + { + wxSashWindow* sashWindow = (wxSashWindow*) parent; + + leftMargin = sashWindow->GetExtraBorderSize(); + rightMargin = sashWindow->GetExtraBorderSize(); + topMargin = sashWindow->GetExtraBorderSize(); + bottomMargin = sashWindow->GetExtraBorderSize(); + + if (sashWindow->GetSashVisible(wxSASH_LEFT)) + leftMargin += sashWindow->GetDefaultBorderSize(); + if (sashWindow->GetSashVisible(wxSASH_RIGHT)) + rightMargin += sashWindow->GetDefaultBorderSize(); + if (sashWindow->GetSashVisible(wxSASH_TOP)) + topMargin += sashWindow->GetDefaultBorderSize(); + if (sashWindow->GetSashVisible(wxSASH_BOTTOM)) + bottomMargin += sashWindow->GetDefaultBorderSize(); + } +#endif // wxUSE_SASH + + int cw, ch; + parent->GetClientSize(& cw, & ch); + + wxRect rect(leftMargin, topMargin, cw - leftMargin - rightMargin, ch - topMargin - bottomMargin); + + wxCalculateLayoutEvent event; + event.SetRect(rect); + + // Find the last layout-aware window, so we can make it fill all remaining + // space. + wxWindow *lastAwareWindow = NULL; + wxWindowList::compatibility_iterator node = parent->GetChildren().GetFirst(); + + while (node) + { + wxWindow* win = node->GetData(); + + if (win->IsShown()) + { + wxCalculateLayoutEvent tempEvent(win->GetId()); + tempEvent.SetEventObject(win); + tempEvent.SetFlags(wxLAYOUT_QUERY); + tempEvent.SetRect(event.GetRect()); + if (win->GetEventHandler()->ProcessEvent(tempEvent)) + lastAwareWindow = win; + } + + node = node->GetNext(); + } + + // Now do a dummy run to see if we have any space left for the final window (fail if not) + node = parent->GetChildren().GetFirst(); + while (node) + { + wxWindow* win = node->GetData(); + + // If mainWindow is NULL and we're at the last window, + // skip this, because we'll simply make it fit the remaining space. + if (win->IsShown() && (win != mainWindow) && (mainWindow != NULL || win != lastAwareWindow)) + { + event.SetId(win->GetId()); + event.SetEventObject(win); + event.SetFlags(wxLAYOUT_QUERY); + + win->GetEventHandler()->ProcessEvent(event); + } + + node = node->GetNext(); + } + + if (event.GetRect().GetWidth() < 0 || event.GetRect().GetHeight() < 0) + return false; + + event.SetRect(rect); + + node = parent->GetChildren().GetFirst(); + while (node) + { + wxWindow* win = node->GetData(); + + // If mainWindow is NULL and we're at the last window, + // skip this, because we'll simply make it fit the remaining space. + if (win->IsShown() && (win != mainWindow) && (mainWindow != NULL || win != lastAwareWindow)) + { + event.SetId(win->GetId()); + event.SetEventObject(win); + event.SetFlags(0); // ?? + + win->GetEventHandler()->ProcessEvent(event); + } + + node = node->GetNext(); + } + + rect = event.GetRect(); + + if (mainWindow) + mainWindow->SetSize(rect.x, rect.y, wxMax(0, rect.width), wxMax(0, rect.height)); + else if (lastAwareWindow) + { + // Fit the remaining space + lastAwareWindow->SetSize(rect.x, rect.y, wxMax(0, rect.width), wxMax(0, rect.height)); + } + + return true; +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/listbkg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/listbkg.cpp new file mode 100644 index 0000000000..c9584d1ff3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/listbkg.cpp @@ -0,0 +1,409 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/listbkg.cpp +// Purpose: generic implementation of wxListbook +// Author: Vadim Zeitlin +// Modified by: +// Created: 19.08.03 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_LISTBOOK + +#include "wx/listbook.h" + +#ifndef WX_PRECOMP + #include "wx/settings.h" +#endif + +#include "wx/listctrl.h" +#include "wx/statline.h" +#include "wx/imaglist.h" + +// ---------------------------------------------------------------------------- +// various wxWidgets macros +// ---------------------------------------------------------------------------- + +// check that the page index is valid +#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount()) + +// ---------------------------------------------------------------------------- +// event table +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxListbook, wxBookCtrlBase) + +wxDEFINE_EVENT( wxEVT_LISTBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_LISTBOOK_PAGE_CHANGED, wxBookCtrlEvent ); + +BEGIN_EVENT_TABLE(wxListbook, wxBookCtrlBase) + EVT_SIZE(wxListbook::OnSize) + EVT_LIST_ITEM_SELECTED(wxID_ANY, wxListbook::OnListSelected) +END_EVENT_TABLE() + +// ============================================================================ +// wxListbook implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxListbook creation +// ---------------------------------------------------------------------------- + +bool +wxListbook::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT ) + { +#ifdef __WXMAC__ + style |= wxBK_TOP; +#else // !__WXMAC__ + style |= wxBK_LEFT; +#endif // __WXMAC__/!__WXMAC__ + } + + // no border for this control, it doesn't look nice together with + // wxListCtrl border + style &= ~wxBORDER_MASK; + style |= wxBORDER_NONE; + + if ( !wxControl::Create(parent, id, pos, size, style, + wxDefaultValidator, name) ) + return false; + + m_bookctrl = new wxListView + ( + this, + wxID_ANY, + wxDefaultPosition, + wxDefaultSize, + GetListCtrlFlags() + ); + + if ( GetListView()->InReportView() ) + GetListView()->InsertColumn(0, wxS("Pages")); + +#ifdef __WXMSW__ + // On XP with themes enabled the GetViewRect used in GetControllerSize() to + // determine the space needed for the list view will incorrectly return + // (0,0,0,0) the first time. So send a pending event so OnSize will be + // called again after the window is ready to go. Technically we don't + // need to do this on non-XP windows, but if things are already sized + // correctly then nothing changes and so there is no harm. + wxSizeEvent evt; + GetEventHandler()->AddPendingEvent(evt); +#endif + return true; +} + +// ---------------------------------------------------------------------------- +// wxListCtrl flags +// ---------------------------------------------------------------------------- + +long wxListbook::GetListCtrlFlags() const +{ + // We'd like to always use wxLC_ICON mode but it doesn't work with the + // native wxListCtrl under MSW unless we do have icons for all the items, + // so we can't use it if we have no image list. In this case we'd like to + // use wxLC_LIST mode because it works correctly for both horizontally and + // vertically laid out controls, but MSW native wxListCtrl insists on + // creating multiple columns if there are too many items and there doesn't + // seem anything to do about it, so we have to use wxLC_REPORT mode in this + // case there. + + long flags = IsVertical() ? wxLC_ALIGN_LEFT : wxLC_ALIGN_TOP; + if ( GetImageList() ) + { + flags |= wxLC_ICON; + } + else // No images. + { +#ifdef __WXMSW__ + if ( !IsVertical() ) + { + // Notice that we intentionally overwrite the alignment flags here + // by not using "|=", alignment isn't used for report view. + flags = wxLC_REPORT | wxLC_NO_HEADER; + } + else +#endif // __WXMSW__ + { + flags |= wxLC_LIST; + } + } + + // Use single selection in any case. + return flags | wxLC_SINGLE_SEL; +} + +// ---------------------------------------------------------------------------- +// wxListbook geometry management +// ---------------------------------------------------------------------------- + +void wxListbook::OnSize(wxSizeEvent& event) +{ + // arrange the icons before calling SetClientSize(), otherwise it wouldn't + // account for the scrollbars the list control might need and, at least + // under MSW, we'd finish with an ugly looking list control with both + // vertical and horizontal scrollbar (with one of them being added because + // the other one is not accounted for in client size computations) + wxListView * const list = GetListView(); + if ( list ) + list->Arrange(); + + event.Skip(); +} + +int wxListbook::HitTest(const wxPoint& pt, long *flags) const +{ + int pagePos = wxNOT_FOUND; + + if ( flags ) + *flags = wxBK_HITTEST_NOWHERE; + + // convert from listbook control coordinates to list control coordinates + const wxListView * const list = GetListView(); + const wxPoint listPt = list->ScreenToClient(ClientToScreen(pt)); + + // is the point inside list control? + if ( wxRect(list->GetSize()).Contains(listPt) ) + { + int flagsList; + pagePos = list->HitTest(listPt, flagsList); + + if ( flags ) + { + if ( pagePos != wxNOT_FOUND ) + *flags = 0; + + if ( flagsList & (wxLIST_HITTEST_ONITEMICON | + wxLIST_HITTEST_ONITEMSTATEICON ) ) + *flags |= wxBK_HITTEST_ONICON; + + if ( flagsList & wxLIST_HITTEST_ONITEMLABEL ) + *flags |= wxBK_HITTEST_ONLABEL; + } + } + else // not over list control at all + { + if ( flags && GetPageRect().Contains(pt) ) + *flags |= wxBK_HITTEST_ONPAGE; + } + + return pagePos; +} + +void wxListbook::UpdateSize() +{ + // we should find a more elegant way to force a layout than generating this + // dummy event + wxSizeEvent sz(GetSize(), GetId()); + GetEventHandler()->ProcessEvent(sz); +} + +// ---------------------------------------------------------------------------- +// accessing the pages +// ---------------------------------------------------------------------------- + +bool wxListbook::SetPageText(size_t n, const wxString& strText) +{ + GetListView()->SetItemText(n, strText); + + return true; +} + +wxString wxListbook::GetPageText(size_t n) const +{ + return GetListView()->GetItemText(n); +} + +int wxListbook::GetPageImage(size_t n) const +{ + wxListItem item; + item.SetId(n); + + if (GetListView()->GetItem(item)) + { + return item.GetImage(); + } + else + { + return wxNOT_FOUND; + } +} + +bool wxListbook::SetPageImage(size_t n, int imageId) +{ + return GetListView()->SetItemImage(n, imageId); +} + +// ---------------------------------------------------------------------------- +// image list stuff +// ---------------------------------------------------------------------------- + +void wxListbook::SetImageList(wxImageList *imageList) +{ + const long flagsOld = GetListCtrlFlags(); + + wxBookCtrlBase::SetImageList(imageList); + + const long flagsNew = GetListCtrlFlags(); + + wxListView * const list = GetListView(); + + // We may need to change the list control mode if the image list presence + // has changed. + if ( flagsNew != flagsOld ) + { + // Preserve the selection which is lost when changing the mode + const int oldSel = GetSelection(); + + list->SetWindowStyleFlag(flagsNew); + if ( list->InReportView() ) + list->InsertColumn(0, wxS("Pages")); + + // Restore selection + if ( oldSel != wxNOT_FOUND ) + SetSelection(oldSel); + } + + list->SetImageList(imageList, wxIMAGE_LIST_NORMAL); +} + +// ---------------------------------------------------------------------------- +// selection +// ---------------------------------------------------------------------------- + +void wxListbook::UpdateSelectedPage(size_t newsel) +{ + m_selection = newsel; + GetListView()->Select(newsel); + GetListView()->Focus(newsel); +} + +wxBookCtrlEvent* wxListbook::CreatePageChangingEvent() const +{ + return new wxBookCtrlEvent(wxEVT_LISTBOOK_PAGE_CHANGING, m_windowId); +} + +void wxListbook::MakeChangedEvent(wxBookCtrlEvent &event) +{ + event.SetEventType(wxEVT_LISTBOOK_PAGE_CHANGED); +} + + +// ---------------------------------------------------------------------------- +// adding/removing the pages +// ---------------------------------------------------------------------------- + +bool +wxListbook::InsertPage(size_t n, + wxWindow *page, + const wxString& text, + bool bSelect, + int imageId) +{ + if ( !wxBookCtrlBase::InsertPage(n, page, text, bSelect, imageId) ) + return false; + + GetListView()->InsertItem(n, text, imageId); + + // if the inserted page is before the selected one, we must update the + // index of the selected page + if ( int(n) <= m_selection ) + { + // one extra page added + m_selection++; + GetListView()->Select(m_selection); + GetListView()->Focus(m_selection); + } + + if ( !DoSetSelectionAfterInsertion(n, bSelect) ) + page->Hide(); + + UpdateSize(); + + return true; +} + +wxWindow *wxListbook::DoRemovePage(size_t page) +{ + wxWindow *win = wxBookCtrlBase::DoRemovePage(page); + + if ( win ) + { + GetListView()->DeleteItem(page); + + DoSetSelectionAfterRemoval(page); + + GetListView()->Arrange(); + UpdateSize(); + } + + return win; +} + + +bool wxListbook::DeleteAllPages() +{ + GetListView()->DeleteAllItems(); + if (!wxBookCtrlBase::DeleteAllPages()) + return false; + + UpdateSize(); + + return true; +} + +// ---------------------------------------------------------------------------- +// wxListbook events +// ---------------------------------------------------------------------------- + +void wxListbook::OnListSelected(wxListEvent& eventList) +{ + if ( eventList.GetEventObject() != m_bookctrl ) + { + eventList.Skip(); + return; + } + + const int selNew = eventList.GetIndex(); + + if ( selNew == m_selection ) + { + // this event can only come from our own Select(m_selection) below + // which we call when the page change is vetoed, so we should simply + // ignore it + return; + } + + SetSelection(selNew); + + // change wasn't allowed, return to previous state + if (m_selection != selNew) + { + GetListView()->Select(m_selection); + GetListView()->Focus(m_selection); + } +} + +#endif // wxUSE_LISTBOOK diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/listctrl.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/listctrl.cpp new file mode 100644 index 0000000000..f17dd0124f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/listctrl.cpp @@ -0,0 +1,5477 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/listctrl.cpp +// Purpose: generic implementation of wxListCtrl +// Author: Robert Roebling +// Vadim Zeitlin (virtual list control support) +// Copyright: (c) 1998 Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// TODO +// +// 1. we need to implement searching/sorting for virtual controls somehow +// 2. when changing selection the lines are refreshed twice + + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_LISTCTRL + +#include "wx/listctrl.h" + +#ifndef WX_PRECOMP + #include "wx/scrolwin.h" + #include "wx/timer.h" + #include "wx/settings.h" + #include "wx/dynarray.h" + #include "wx/dcclient.h" + #include "wx/dcscreen.h" + #include "wx/math.h" + #include "wx/settings.h" + #include "wx/sizer.h" +#endif + +#include "wx/imaglist.h" +#include "wx/renderer.h" +#include "wx/generic/private/listctrl.h" + +#ifdef __WXMAC__ + #include "wx/osx/private.h" +#endif + +#if defined(__WXMSW__) && !defined(__WXWINCE__) && !defined(__WXUNIVERSAL__) + #define "wx/msw/wrapwin.h" +#endif + +// NOTE: If using the wxListBox visual attributes works everywhere then this can +// be removed, as well as the #else case below. +#define _USE_VISATTR 0 + + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// // the height of the header window (FIXME: should depend on its font!) +// static const int HEADER_HEIGHT = 23; + +static const int SCROLL_UNIT_X = 15; + +// the spacing between the lines (in report mode) +static const int LINE_SPACING = 0; + +// extra margins around the text label +#ifdef __WXGTK__ +static const int EXTRA_WIDTH = 6; +#else +static const int EXTRA_WIDTH = 4; +#endif + +#ifdef __WXGTK__ +static const int EXTRA_HEIGHT = 6; +#else +static const int EXTRA_HEIGHT = 4; +#endif + +// margin between the window and the items +static const int EXTRA_BORDER_X = 2; +static const int EXTRA_BORDER_Y = 2; + +// offset for the header window +static const int HEADER_OFFSET_X = 0; +static const int HEADER_OFFSET_Y = 0; + +// margin between rows of icons in [small] icon view +static const int MARGIN_BETWEEN_ROWS = 6; + +// when autosizing the columns, add some slack +static const int AUTOSIZE_COL_MARGIN = 10; + +// default width for the header columns +static const int WIDTH_COL_DEFAULT = 80; + +// the space between the image and the text in the report mode +static const int IMAGE_MARGIN_IN_REPORT_MODE = 5; + +// the space between the image and the text in the report mode in header +static const int HEADER_IMAGE_MARGIN_IN_REPORT_MODE = 2; + + + +// ---------------------------------------------------------------------------- +// arrays/list implementations +// ---------------------------------------------------------------------------- + +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxListItemDataList) + +#include "wx/arrimpl.cpp" +WX_DEFINE_OBJARRAY(wxListLineDataArray) + +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxListHeaderDataList) + + +// ---------------------------------------------------------------------------- +// wxListItemData +// ---------------------------------------------------------------------------- + +wxListItemData::~wxListItemData() +{ + // in the virtual list control the attributes are managed by the main + // program, so don't delete them + if ( !m_owner->IsVirtual() ) + delete m_attr; + + delete m_rect; +} + +void wxListItemData::Init() +{ + m_image = -1; + m_data = 0; + + m_attr = NULL; +} + +wxListItemData::wxListItemData(wxListMainWindow *owner) +{ + Init(); + + m_owner = owner; + + if ( owner->InReportView() ) + m_rect = NULL; + else + m_rect = new wxRect; +} + +void wxListItemData::SetItem( const wxListItem &info ) +{ + if ( info.m_mask & wxLIST_MASK_TEXT ) + SetText(info.m_text); + if ( info.m_mask & wxLIST_MASK_IMAGE ) + m_image = info.m_image; + if ( info.m_mask & wxLIST_MASK_DATA ) + m_data = info.m_data; + + if ( info.HasAttributes() ) + { + if ( m_attr ) + m_attr->AssignFrom(*info.GetAttributes()); + else + m_attr = new wxListItemAttr(*info.GetAttributes()); + } + + if ( m_rect ) + { + m_rect->x = + m_rect->y = + m_rect->height = 0; + m_rect->width = info.m_width; + } +} + +void wxListItemData::SetPosition( int x, int y ) +{ + wxCHECK_RET( m_rect, wxT("unexpected SetPosition() call") ); + + m_rect->x = x; + m_rect->y = y; +} + +void wxListItemData::SetSize( int width, int height ) +{ + wxCHECK_RET( m_rect, wxT("unexpected SetSize() call") ); + + if ( width != -1 ) + m_rect->width = width; + if ( height != -1 ) + m_rect->height = height; +} + +bool wxListItemData::IsHit( int x, int y ) const +{ + wxCHECK_MSG( m_rect, false, wxT("can't be called in this mode") ); + + return wxRect(GetX(), GetY(), GetWidth(), GetHeight()).Contains(x, y); +} + +int wxListItemData::GetX() const +{ + wxCHECK_MSG( m_rect, 0, wxT("can't be called in this mode") ); + + return m_rect->x; +} + +int wxListItemData::GetY() const +{ + wxCHECK_MSG( m_rect, 0, wxT("can't be called in this mode") ); + + return m_rect->y; +} + +int wxListItemData::GetWidth() const +{ + wxCHECK_MSG( m_rect, 0, wxT("can't be called in this mode") ); + + return m_rect->width; +} + +int wxListItemData::GetHeight() const +{ + wxCHECK_MSG( m_rect, 0, wxT("can't be called in this mode") ); + + return m_rect->height; +} + +void wxListItemData::GetItem( wxListItem &info ) const +{ + long mask = info.m_mask; + if ( !mask ) + // by default, get everything for backwards compatibility + mask = -1; + + if ( mask & wxLIST_MASK_TEXT ) + info.m_text = m_text; + if ( mask & wxLIST_MASK_IMAGE ) + info.m_image = m_image; + if ( mask & wxLIST_MASK_DATA ) + info.m_data = m_data; + + if ( m_attr ) + { + if ( m_attr->HasTextColour() ) + info.SetTextColour(m_attr->GetTextColour()); + if ( m_attr->HasBackgroundColour() ) + info.SetBackgroundColour(m_attr->GetBackgroundColour()); + if ( m_attr->HasFont() ) + info.SetFont(m_attr->GetFont()); + } +} + +//----------------------------------------------------------------------------- +// wxListHeaderData +//----------------------------------------------------------------------------- + +void wxListHeaderData::Init() +{ + m_mask = 0; + m_image = -1; + m_format = 0; + m_width = 0; + m_xpos = 0; + m_ypos = 0; + m_height = 0; + m_state = 0; +} + +wxListHeaderData::wxListHeaderData() +{ + Init(); +} + +wxListHeaderData::wxListHeaderData( const wxListItem &item ) +{ + Init(); + + SetItem( item ); +} + +void wxListHeaderData::SetItem( const wxListItem &item ) +{ + m_mask = item.m_mask; + + if ( m_mask & wxLIST_MASK_TEXT ) + m_text = item.m_text; + + if ( m_mask & wxLIST_MASK_IMAGE ) + m_image = item.m_image; + + if ( m_mask & wxLIST_MASK_FORMAT ) + m_format = item.m_format; + + if ( m_mask & wxLIST_MASK_WIDTH ) + SetWidth(item.m_width); + + if ( m_mask & wxLIST_MASK_STATE ) + SetState(item.m_state); +} + +void wxListHeaderData::SetPosition( int x, int y ) +{ + m_xpos = x; + m_ypos = y; +} + +void wxListHeaderData::SetHeight( int h ) +{ + m_height = h; +} + +void wxListHeaderData::SetWidth( int w ) +{ + m_width = w < 0 ? WIDTH_COL_DEFAULT : w; +} + +void wxListHeaderData::SetState( int flag ) +{ + m_state = flag; +} + +void wxListHeaderData::SetFormat( int format ) +{ + m_format = format; +} + +bool wxListHeaderData::HasImage() const +{ + return m_image != -1; +} + +bool wxListHeaderData::IsHit( int x, int y ) const +{ + return ((x >= m_xpos) && (x <= m_xpos+m_width) && (y >= m_ypos) && (y <= m_ypos+m_height)); +} + +void wxListHeaderData::GetItem( wxListItem& item ) +{ + long mask = item.m_mask; + if ( !mask ) + { + // by default, get everything for backwards compatibility + mask = -1; + } + + if ( mask & wxLIST_MASK_STATE ) + item.m_state = m_state; + if ( mask & wxLIST_MASK_TEXT ) + item.m_text = m_text; + if ( mask & wxLIST_MASK_IMAGE ) + item.m_image = m_image; + if ( mask & wxLIST_MASK_WIDTH ) + item.m_width = m_width; + if ( mask & wxLIST_MASK_FORMAT ) + item.m_format = m_format; +} + +int wxListHeaderData::GetImage() const +{ + return m_image; +} + +int wxListHeaderData::GetWidth() const +{ + return m_width; +} + +int wxListHeaderData::GetFormat() const +{ + return m_format; +} + +int wxListHeaderData::GetState() const +{ + return m_state; +} + +//----------------------------------------------------------------------------- +// wxListLineData +//----------------------------------------------------------------------------- + +inline int wxListLineData::GetMode() const +{ + return m_owner->GetListCtrl()->GetWindowStyleFlag() & wxLC_MASK_TYPE; +} + +inline bool wxListLineData::InReportView() const +{ + return m_owner->HasFlag(wxLC_REPORT); +} + +inline bool wxListLineData::IsVirtual() const +{ + return m_owner->IsVirtual(); +} + +wxListLineData::wxListLineData( wxListMainWindow *owner ) +{ + m_owner = owner; + + if ( InReportView() ) + m_gi = NULL; + else // !report + m_gi = new GeometryInfo; + + m_highlighted = false; + + InitItems( GetMode() == wxLC_REPORT ? m_owner->GetColumnCount() : 1 ); +} + +void wxListLineData::CalculateSize( wxDC *dc, int spacing ) +{ + wxListItemDataList::compatibility_iterator node = m_items.GetFirst(); + wxCHECK_RET( node, wxT("no subitems at all??") ); + + wxListItemData *item = node->GetData(); + + wxString s; + wxCoord lw, lh; + + switch ( GetMode() ) + { + case wxLC_ICON: + case wxLC_SMALL_ICON: + m_gi->m_rectAll.width = spacing; + + s = item->GetText(); + + if ( s.empty() ) + { + lh = + m_gi->m_rectLabel.width = + m_gi->m_rectLabel.height = 0; + } + else // has label + { + dc->GetTextExtent( s, &lw, &lh ); + lw += EXTRA_WIDTH; + lh += EXTRA_HEIGHT; + + m_gi->m_rectAll.height = spacing + lh; + if (lw > spacing) + m_gi->m_rectAll.width = lw; + + m_gi->m_rectLabel.width = lw; + m_gi->m_rectLabel.height = lh; + } + + if (item->HasImage()) + { + int w, h; + m_owner->GetImageSize( item->GetImage(), w, h ); + m_gi->m_rectIcon.width = w + 8; + m_gi->m_rectIcon.height = h + 8; + + if ( m_gi->m_rectIcon.width > m_gi->m_rectAll.width ) + m_gi->m_rectAll.width = m_gi->m_rectIcon.width; + if ( m_gi->m_rectIcon.height + lh > m_gi->m_rectAll.height - 4 ) + m_gi->m_rectAll.height = m_gi->m_rectIcon.height + lh + 4; + } + + if ( item->HasText() ) + { + m_gi->m_rectHighlight.width = m_gi->m_rectLabel.width; + m_gi->m_rectHighlight.height = m_gi->m_rectLabel.height; + } + else // no text, highlight the icon + { + m_gi->m_rectHighlight.width = m_gi->m_rectIcon.width; + m_gi->m_rectHighlight.height = m_gi->m_rectIcon.height; + } + break; + + case wxLC_LIST: + s = item->GetTextForMeasuring(); + + dc->GetTextExtent( s, &lw, &lh ); + lw += EXTRA_WIDTH; + lh += EXTRA_HEIGHT; + + m_gi->m_rectLabel.width = lw; + m_gi->m_rectLabel.height = lh; + + m_gi->m_rectAll.width = lw; + m_gi->m_rectAll.height = lh; + + if (item->HasImage()) + { + int w, h; + m_owner->GetImageSize( item->GetImage(), w, h ); + m_gi->m_rectIcon.width = w; + m_gi->m_rectIcon.height = h; + + m_gi->m_rectAll.width += 4 + w; + if (h > m_gi->m_rectAll.height) + m_gi->m_rectAll.height = h; + } + + m_gi->m_rectHighlight.width = m_gi->m_rectAll.width; + m_gi->m_rectHighlight.height = m_gi->m_rectAll.height; + break; + + case wxLC_REPORT: + wxFAIL_MSG( wxT("unexpected call to SetSize") ); + break; + + default: + wxFAIL_MSG( wxT("unknown mode") ); + break; + } +} + +void wxListLineData::SetPosition( int x, int y, int spacing ) +{ + wxListItemDataList::compatibility_iterator node = m_items.GetFirst(); + wxCHECK_RET( node, wxT("no subitems at all??") ); + + wxListItemData *item = node->GetData(); + + switch ( GetMode() ) + { + case wxLC_ICON: + case wxLC_SMALL_ICON: + m_gi->m_rectAll.x = x; + m_gi->m_rectAll.y = y; + + if ( item->HasImage() ) + { + m_gi->m_rectIcon.x = m_gi->m_rectAll.x + 4 + + (m_gi->m_rectAll.width - m_gi->m_rectIcon.width) / 2; + m_gi->m_rectIcon.y = m_gi->m_rectAll.y + 4; + } + + if ( item->HasText() ) + { + if (m_gi->m_rectAll.width > spacing) + m_gi->m_rectLabel.x = m_gi->m_rectAll.x + (EXTRA_WIDTH/2); + else + m_gi->m_rectLabel.x = m_gi->m_rectAll.x + (EXTRA_WIDTH/2) + (spacing / 2) - (m_gi->m_rectLabel.width / 2); + m_gi->m_rectLabel.y = m_gi->m_rectAll.y + m_gi->m_rectAll.height + 2 - m_gi->m_rectLabel.height; + m_gi->m_rectHighlight.x = m_gi->m_rectLabel.x - 2; + m_gi->m_rectHighlight.y = m_gi->m_rectLabel.y - 2; + } + else // no text, highlight the icon + { + m_gi->m_rectHighlight.x = m_gi->m_rectIcon.x - 4; + m_gi->m_rectHighlight.y = m_gi->m_rectIcon.y - 4; + } + break; + + case wxLC_LIST: + m_gi->m_rectAll.x = x; + m_gi->m_rectAll.y = y; + + m_gi->m_rectHighlight.x = m_gi->m_rectAll.x; + m_gi->m_rectHighlight.y = m_gi->m_rectAll.y; + m_gi->m_rectLabel.y = m_gi->m_rectAll.y + 2; + + if (item->HasImage()) + { + m_gi->m_rectIcon.x = m_gi->m_rectAll.x + 2; + m_gi->m_rectIcon.y = m_gi->m_rectAll.y + 2; + m_gi->m_rectLabel.x = m_gi->m_rectAll.x + 4 + (EXTRA_WIDTH/2) + m_gi->m_rectIcon.width; + } + else + { + m_gi->m_rectLabel.x = m_gi->m_rectAll.x + (EXTRA_WIDTH/2); + } + break; + + case wxLC_REPORT: + wxFAIL_MSG( wxT("unexpected call to SetPosition") ); + break; + + default: + wxFAIL_MSG( wxT("unknown mode") ); + break; + } +} + +void wxListLineData::InitItems( int num ) +{ + for (int i = 0; i < num; i++) + m_items.Append( new wxListItemData(m_owner) ); +} + +void wxListLineData::SetItem( int index, const wxListItem &info ) +{ + wxListItemDataList::compatibility_iterator node = m_items.Item( index ); + wxCHECK_RET( node, wxT("invalid column index in SetItem") ); + + wxListItemData *item = node->GetData(); + item->SetItem( info ); +} + +void wxListLineData::GetItem( int index, wxListItem &info ) +{ + wxListItemDataList::compatibility_iterator node = m_items.Item( index ); + if (node) + { + wxListItemData *item = node->GetData(); + item->GetItem( info ); + } +} + +wxString wxListLineData::GetText(int index) const +{ + wxString s; + + wxListItemDataList::compatibility_iterator node = m_items.Item( index ); + if (node) + { + wxListItemData *item = node->GetData(); + s = item->GetText(); + } + + return s; +} + +void wxListLineData::SetText( int index, const wxString& s ) +{ + wxListItemDataList::compatibility_iterator node = m_items.Item( index ); + if (node) + { + wxListItemData *item = node->GetData(); + item->SetText( s ); + } +} + +void wxListLineData::SetImage( int index, int image ) +{ + wxListItemDataList::compatibility_iterator node = m_items.Item( index ); + wxCHECK_RET( node, wxT("invalid column index in SetImage()") ); + + wxListItemData *item = node->GetData(); + item->SetImage(image); +} + +int wxListLineData::GetImage( int index ) const +{ + wxListItemDataList::compatibility_iterator node = m_items.Item( index ); + wxCHECK_MSG( node, -1, wxT("invalid column index in GetImage()") ); + + wxListItemData *item = node->GetData(); + return item->GetImage(); +} + +wxListItemAttr *wxListLineData::GetAttr() const +{ + wxListItemDataList::compatibility_iterator node = m_items.GetFirst(); + wxCHECK_MSG( node, NULL, wxT("invalid column index in GetAttr()") ); + + wxListItemData *item = node->GetData(); + return item->GetAttr(); +} + +void wxListLineData::SetAttr(wxListItemAttr *attr) +{ + wxListItemDataList::compatibility_iterator node = m_items.GetFirst(); + wxCHECK_RET( node, wxT("invalid column index in SetAttr()") ); + + wxListItemData *item = node->GetData(); + item->SetAttr(attr); +} + +void wxListLineData::ApplyAttributes(wxDC *dc, + const wxRect& rectHL, + bool highlighted, + bool current) +{ + const wxListItemAttr * const attr = GetAttr(); + + wxWindow * const listctrl = m_owner->GetParent(); + + const bool hasFocus = listctrl->HasFocus() +#if defined(__WXMAC__) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON + && IsControlActive( (ControlRef)listctrl->GetHandle() ) +#endif + ; + + // fg colour + + // don't use foreground colour for drawing highlighted items - this might + // make them completely invisible (and there is no way to do bit + // arithmetics on wxColour, unfortunately) + wxColour colText; + if ( highlighted ) + { +#ifdef __WXMAC__ + if ( hasFocus ) + colText = *wxWHITE; + else + colText = *wxBLACK; +#else + if ( hasFocus ) + colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + else + colText = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT); +#endif + } + else if ( attr && attr->HasTextColour() ) + colText = attr->GetTextColour(); + else + colText = listctrl->GetForegroundColour(); + + dc->SetTextForeground(colText); + + // font + wxFont font; + if ( attr && attr->HasFont() ) + font = attr->GetFont(); + else + font = listctrl->GetFont(); + + dc->SetFont(font); + + // background + if ( highlighted ) + { + // Use the renderer method to ensure that the selected items use the + // native look. + int flags = wxCONTROL_SELECTED; + if ( hasFocus ) + flags |= wxCONTROL_FOCUSED; + if (current) + flags |= wxCONTROL_CURRENT; + wxRendererNative::Get(). + DrawItemSelectionRect( m_owner, *dc, rectHL, flags ); + } + else if ( attr && attr->HasBackgroundColour() ) + { + // Draw the background using the items custom background colour. + dc->SetBrush(attr->GetBackgroundColour()); + dc->SetPen(*wxTRANSPARENT_PEN); + dc->DrawRectangle(rectHL); + } + + // just for debugging to better see where the items are +#if 0 + dc->SetPen(*wxRED_PEN); + dc->SetBrush(*wxTRANSPARENT_BRUSH); + dc->DrawRectangle( m_gi->m_rectAll ); + dc->SetPen(*wxGREEN_PEN); + dc->DrawRectangle( m_gi->m_rectIcon ); +#endif +} + +void wxListLineData::Draw(wxDC *dc, bool current) +{ + wxListItemDataList::compatibility_iterator node = m_items.GetFirst(); + wxCHECK_RET( node, wxT("no subitems at all??") ); + + ApplyAttributes(dc, m_gi->m_rectHighlight, IsHighlighted(), current); + + wxListItemData *item = node->GetData(); + if (item->HasImage()) + { + // centre the image inside our rectangle, this looks nicer when items + // ae aligned in a row + const wxRect& rectIcon = m_gi->m_rectIcon; + + m_owner->DrawImage(item->GetImage(), dc, rectIcon.x, rectIcon.y); + } + + if (item->HasText()) + { + const wxRect& rectLabel = m_gi->m_rectLabel; + + wxDCClipper clipper(*dc, rectLabel); + dc->DrawText(item->GetText(), rectLabel.x, rectLabel.y); + } +} + +void wxListLineData::DrawInReportMode( wxDC *dc, + const wxRect& rect, + const wxRect& rectHL, + bool highlighted, + bool current ) +{ + // TODO: later we should support setting different attributes for + // different columns - to do it, just add "col" argument to + // GetAttr() and move these lines into the loop below + + ApplyAttributes(dc, rectHL, highlighted, current); + + wxCoord x = rect.x + HEADER_OFFSET_X, + yMid = rect.y + rect.height/2; +#ifdef __WXGTK__ + // This probably needs to be done + // on all platforms as the icons + // otherwise nearly touch the border + x += 2; +#endif + + size_t col = 0; + for ( wxListItemDataList::compatibility_iterator node = m_items.GetFirst(); + node; + node = node->GetNext(), col++ ) + { + wxListItemData *item = node->GetData(); + + int width = m_owner->GetColumnWidth(col); + int xOld = x; + x += width; + + width -= 8; + const int wText = width; + wxDCClipper clipper(*dc, xOld, rect.y, wText, rect.height); + + if ( item->HasImage() ) + { + int ix, iy; + m_owner->GetImageSize( item->GetImage(), ix, iy ); + m_owner->DrawImage( item->GetImage(), dc, xOld, yMid - iy/2 ); + + ix += IMAGE_MARGIN_IN_REPORT_MODE; + + xOld += ix; + width -= ix; + } + + if ( item->HasText() ) + DrawTextFormatted(dc, item->GetText(), col, xOld, yMid, width); + } +} + +void wxListLineData::DrawTextFormatted(wxDC *dc, + const wxString& textOrig, + int col, + int x, + int yMid, + int width) +{ + // we don't support displaying multiple lines currently (and neither does + // wxMSW FWIW) so just merge all the lines + wxString text(textOrig); + text.Replace(wxT("\n"), wxT(" ")); + + wxCoord w, h; + dc->GetTextExtent(text, &w, &h); + + const wxCoord y = yMid - (h + 1)/2; + + wxDCClipper clipper(*dc, x, y, width, h); + + // determine if the string can fit inside the current width + if (w <= width) + { + // it can, draw it using the items alignment + wxListItem item; + m_owner->GetColumn(col, item); + switch ( item.GetAlign() ) + { + case wxLIST_FORMAT_LEFT: + // nothing to do + break; + + case wxLIST_FORMAT_RIGHT: + x += width - w; + break; + + case wxLIST_FORMAT_CENTER: + x += (width - w) / 2; + break; + + default: + wxFAIL_MSG( wxT("unknown list item format") ); + break; + } + + dc->DrawText(text, x, y); + } + else // otherwise, truncate and add an ellipsis if possible + { + // determine the base width + wxString ellipsis(wxT("...")); + wxCoord base_w; + dc->GetTextExtent(ellipsis, &base_w, &h); + + // continue until we have enough space or only one character left + wxCoord w_c, h_c; + size_t len = text.length(); + wxString drawntext = text.Left(len); + while (len > 1) + { + dc->GetTextExtent(drawntext.Last(), &w_c, &h_c); + drawntext.RemoveLast(); + len--; + w -= w_c; + if (w + base_w <= width) + break; + } + + // if still not enough space, remove ellipsis characters + while (ellipsis.length() > 0 && w + base_w > width) + { + ellipsis = ellipsis.Left(ellipsis.length() - 1); + dc->GetTextExtent(ellipsis, &base_w, &h); + } + + // now draw the text + dc->DrawText(drawntext, x, y); + dc->DrawText(ellipsis, x + w, y); + } +} + +bool wxListLineData::Highlight( bool on ) +{ + wxCHECK_MSG( !IsVirtual(), false, wxT("unexpected call to Highlight") ); + + if ( on == m_highlighted ) + return false; + + m_highlighted = on; + + return true; +} + +void wxListLineData::ReverseHighlight( void ) +{ + Highlight(!IsHighlighted()); +} + +//----------------------------------------------------------------------------- +// wxListHeaderWindow +//----------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxListHeaderWindow,wxWindow) + EVT_PAINT (wxListHeaderWindow::OnPaint) + EVT_MOUSE_EVENTS (wxListHeaderWindow::OnMouse) +END_EVENT_TABLE() + +void wxListHeaderWindow::Init() +{ + m_currentCursor = NULL; + m_isDragging = false; + m_dirty = false; + m_sendSetColumnWidth = false; +} + +wxListHeaderWindow::wxListHeaderWindow() +{ + Init(); + + m_owner = NULL; + m_resizeCursor = NULL; +} + +bool wxListHeaderWindow::Create( wxWindow *win, + wxWindowID id, + wxListMainWindow *owner, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString &name ) +{ + if ( !wxWindow::Create(win, id, pos, size, style, name) ) + return false; + + Init(); + + m_owner = owner; + m_resizeCursor = new wxCursor( wxCURSOR_SIZEWE ); + +#if _USE_VISATTR + wxVisualAttributes attr = wxPanel::GetClassDefaultAttributes(); + SetOwnForegroundColour( attr.colFg ); + SetOwnBackgroundColour( attr.colBg ); + if (!m_hasFont) + SetOwnFont( attr.font ); +#else + SetOwnForegroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); + SetOwnBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); + if (!m_hasFont) + SetOwnFont( wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT )); +#endif + + return true; +} + +wxListHeaderWindow::~wxListHeaderWindow() +{ + delete m_resizeCursor; +} + +#ifdef __WXUNIVERSAL__ +#include "wx/univ/renderer.h" +#include "wx/univ/theme.h" +#endif + +// shift the DC origin to match the position of the main window horz +// scrollbar: this allows us to always use logical coords +void wxListHeaderWindow::AdjustDC(wxDC& dc) +{ + wxGenericListCtrl *parent = m_owner->GetListCtrl(); + + int xpix; + parent->GetScrollPixelsPerUnit( &xpix, NULL ); + + int view_start; + parent->GetViewStart( &view_start, NULL ); + + + int org_x = 0; + int org_y = 0; + dc.GetDeviceOrigin( &org_x, &org_y ); + + // account for the horz scrollbar offset +#ifdef __WXGTK__ + if (GetLayoutDirection() == wxLayout_RightToLeft) + { + // Maybe we just have to check for m_signX + // in the DC, but I leave the #ifdef __WXGTK__ + // for now + dc.SetDeviceOrigin( org_x + (view_start * xpix), org_y ); + } + else +#endif + dc.SetDeviceOrigin( org_x - (view_start * xpix), org_y ); +} + +void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) +{ + wxGenericListCtrl *parent = m_owner->GetListCtrl(); + + wxPaintDC dc( this ); + + AdjustDC( dc ); + + dc.SetFont( GetFont() ); + + // width and height of the entire header window + int w, h; + GetClientSize( &w, &h ); + parent->CalcUnscrolledPosition(w, 0, &w, NULL); + + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); + dc.SetTextForeground(GetForegroundColour()); + + int x = HEADER_OFFSET_X; + int numColumns = m_owner->GetColumnCount(); + wxListItem item; + for ( int i = 0; i < numColumns && x < w; i++ ) + { + m_owner->GetColumn( i, item ); + int wCol = item.m_width; + + int cw = wCol; + int ch = h; + + int flags = 0; + if (!m_parent->IsEnabled()) + flags |= wxCONTROL_DISABLED; + +// NB: The code below is not really Mac-specific, but since we are close +// to 2.8 release and I don't have time to test on other platforms, I +// defined this only for wxMac. If this behaviour is desired on +// other platforms, please go ahead and revise or remove the #ifdef. +#ifdef __WXMAC__ + if ( !m_owner->IsVirtual() && (item.m_mask & wxLIST_MASK_STATE) && + (item.m_state & wxLIST_STATE_SELECTED) ) + flags |= wxCONTROL_SELECTED; +#endif + + if (i == 0) + flags |= wxCONTROL_SPECIAL; // mark as first column + + wxRendererNative::Get().DrawHeaderButton + ( + this, + dc, + wxRect(x, HEADER_OFFSET_Y, cw, ch), + flags + ); + + // see if we have enough space for the column label + + // for this we need the width of the text + wxCoord wLabel; + wxCoord hLabel; + dc.GetTextExtent(item.GetText(), &wLabel, &hLabel); + wLabel += 2 * EXTRA_WIDTH; + + // and the width of the icon, if any + int ix = 0, iy = 0; // init them just to suppress the compiler warnings + const int image = item.m_image; + wxImageList *imageList; + if ( image != -1 ) + { + imageList = m_owner->GetSmallImageList(); + if ( imageList ) + { + imageList->GetSize(image, ix, iy); + wLabel += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE; + } + } + else + { + imageList = NULL; + } + + // ignore alignment if there is not enough space anyhow + int xAligned; + switch ( wLabel < cw ? item.GetAlign() : wxLIST_FORMAT_LEFT ) + { + default: + wxFAIL_MSG( wxT("unknown list item format") ); + // fall through + + case wxLIST_FORMAT_LEFT: + xAligned = x; + break; + + case wxLIST_FORMAT_RIGHT: + xAligned = x + cw - wLabel; + break; + + case wxLIST_FORMAT_CENTER: + xAligned = x + (cw - wLabel) / 2; + break; + } + + // draw the text and image clipping them so that they + // don't overwrite the column boundary + wxDCClipper clipper(dc, x, HEADER_OFFSET_Y, cw, h); + + // if we have an image, draw it on the right of the label + if ( imageList ) + { + imageList->Draw + ( + image, + dc, + xAligned + wLabel - ix - HEADER_IMAGE_MARGIN_IN_REPORT_MODE, + HEADER_OFFSET_Y + (h - iy)/2, + wxIMAGELIST_DRAW_TRANSPARENT + ); + } + + dc.DrawText( item.GetText(), + xAligned + EXTRA_WIDTH, (h - hLabel) / 2 ); + + x += wCol; + } + + // Fill in what's missing to the right of the columns, otherwise we will + // leave an unpainted area when columns are removed (and it looks better) + if ( x < w ) + { + wxRendererNative::Get().DrawHeaderButton + ( + this, + dc, + wxRect(x, HEADER_OFFSET_Y, w - x, h), + wxCONTROL_DIRTY // mark as last column + ); + } +} + +void wxListHeaderWindow::OnInternalIdle() +{ + wxWindow::OnInternalIdle(); + + if (m_sendSetColumnWidth) + { + m_owner->SetColumnWidth( m_colToSend, m_widthToSend ); + m_sendSetColumnWidth = false; + } +} + +void wxListHeaderWindow::DrawCurrent() +{ +#if 1 + // m_owner->SetColumnWidth( m_column, m_currentX - m_minX ); + m_sendSetColumnWidth = true; + m_colToSend = m_column; + m_widthToSend = m_currentX - m_minX; +#else + int x1 = m_currentX; + int y1 = 0; + m_owner->ClientToScreen( &x1, &y1 ); + + int x2 = m_currentX; + int y2 = 0; + m_owner->GetClientSize( NULL, &y2 ); + m_owner->ClientToScreen( &x2, &y2 ); + + wxScreenDC dc; + dc.SetLogicalFunction( wxINVERT ); + dc.SetPen( wxPen(*wxBLACK, 2) ); + dc.SetBrush( *wxTRANSPARENT_BRUSH ); + + AdjustDC(dc); + + dc.DrawLine( x1, y1, x2, y2 ); + + dc.SetLogicalFunction( wxCOPY ); + + dc.SetPen( wxNullPen ); + dc.SetBrush( wxNullBrush ); +#endif +} + +void wxListHeaderWindow::OnMouse( wxMouseEvent &event ) +{ + wxGenericListCtrl *parent = m_owner->GetListCtrl(); + + // we want to work with logical coords + int x; + parent->CalcUnscrolledPosition(event.GetX(), 0, &x, NULL); + int y = event.GetY(); + + if (m_isDragging) + { + SendListEvent(wxEVT_LIST_COL_DRAGGING, event.GetPosition()); + + // we don't draw the line beyond our window, but we allow dragging it + // there + int w = 0; + GetClientSize( &w, NULL ); + parent->CalcUnscrolledPosition(w, 0, &w, NULL); + w -= 6; + + // erase the line if it was drawn + if ( m_currentX < w ) + DrawCurrent(); + + if (event.ButtonUp()) + { + ReleaseMouse(); + m_isDragging = false; + m_dirty = true; + m_owner->SetColumnWidth( m_column, m_currentX - m_minX ); + SendListEvent(wxEVT_LIST_COL_END_DRAG, event.GetPosition()); + } + else + { + if (x > m_minX + 7) + m_currentX = x; + else + m_currentX = m_minX + 7; + + // draw in the new location + if ( m_currentX < w ) + DrawCurrent(); + } + } + else // not dragging + { + m_minX = 0; + bool hit_border = false; + + // end of the current column + int xpos = 0; + + // find the column where this event occurred + int col, + countCol = m_owner->GetColumnCount(); + for (col = 0; col < countCol; col++) + { + xpos += m_owner->GetColumnWidth( col ); + m_column = col; + + if ( (abs(x-xpos) < 3) && (y < 22) ) + { + // near the column border + hit_border = true; + break; + } + + if ( x < xpos ) + { + // inside the column + break; + } + + m_minX = xpos; + } + + if ( col == countCol ) + m_column = -1; + + if (event.LeftDown() || event.RightUp()) + { + if (hit_border && event.LeftDown()) + { + if ( SendListEvent(wxEVT_LIST_COL_BEGIN_DRAG, + event.GetPosition()) ) + { + m_isDragging = true; + m_currentX = x; + CaptureMouse(); + DrawCurrent(); + } + //else: column resizing was vetoed by the user code + } + else // click on a column + { + // record the selected state of the columns + if (event.LeftDown()) + { + for (int i=0; i < m_owner->GetColumnCount(); i++) + { + wxListItem colItem; + m_owner->GetColumn(i, colItem); + long state = colItem.GetState(); + if (i == m_column) + colItem.SetState(state | wxLIST_STATE_SELECTED); + else + colItem.SetState(state & ~wxLIST_STATE_SELECTED); + m_owner->SetColumn(i, colItem); + } + } + + SendListEvent( event.LeftDown() + ? wxEVT_LIST_COL_CLICK + : wxEVT_LIST_COL_RIGHT_CLICK, + event.GetPosition()); + } + } + else if (event.Moving()) + { + bool setCursor; + if (hit_border) + { + setCursor = m_currentCursor == wxSTANDARD_CURSOR; + m_currentCursor = m_resizeCursor; + } + else + { + setCursor = m_currentCursor != wxSTANDARD_CURSOR; + m_currentCursor = wxSTANDARD_CURSOR; + } + + if ( setCursor ) + SetCursor(*m_currentCursor); + } + } +} + +bool wxListHeaderWindow::SendListEvent(wxEventType type, const wxPoint& pos) +{ + wxWindow *parent = GetParent(); + wxListEvent le( type, parent->GetId() ); + le.SetEventObject( parent ); + le.m_pointDrag = pos; + + // the position should be relative to the parent window, not + // this one for compatibility with MSW and common sense: the + // user code doesn't know anything at all about this header + // window, so why should it get positions relative to it? + le.m_pointDrag.y -= GetSize().y; + + le.m_col = m_column; + return !parent->GetEventHandler()->ProcessEvent( le ) || le.IsAllowed(); +} + +//----------------------------------------------------------------------------- +// wxListRenameTimer (internal) +//----------------------------------------------------------------------------- + +wxListRenameTimer::wxListRenameTimer( wxListMainWindow *owner ) +{ + m_owner = owner; +} + +void wxListRenameTimer::Notify() +{ + m_owner->OnRenameTimer(); +} + +//----------------------------------------------------------------------------- +// wxListFindTimer (internal) +//----------------------------------------------------------------------------- + +void wxListFindTimer::Notify() +{ + m_owner->OnFindTimer(); +} + +//----------------------------------------------------------------------------- +// wxListTextCtrlWrapper (internal) +//----------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxListTextCtrlWrapper, wxEvtHandler) + EVT_CHAR (wxListTextCtrlWrapper::OnChar) + EVT_KEY_UP (wxListTextCtrlWrapper::OnKeyUp) + EVT_KILL_FOCUS (wxListTextCtrlWrapper::OnKillFocus) +END_EVENT_TABLE() + +wxListTextCtrlWrapper::wxListTextCtrlWrapper(wxListMainWindow *owner, + wxTextCtrl *text, + size_t itemEdit) + : m_startValue(owner->GetItemText(itemEdit)), + m_itemEdited(itemEdit) +{ + m_owner = owner; + m_text = text; + m_aboutToFinish = false; + + wxGenericListCtrl *parent = m_owner->GetListCtrl(); + + wxRect rectLabel = owner->GetLineLabelRect(itemEdit); + + parent->CalcScrolledPosition(rectLabel.x, rectLabel.y, + &rectLabel.x, &rectLabel.y); + + m_text->Create(owner, wxID_ANY, m_startValue, + wxPoint(rectLabel.x-4,rectLabel.y-4), + wxSize(rectLabel.width+11,rectLabel.height+8)); + m_text->SetFocus(); + + m_text->PushEventHandler(this); +} + +void wxListTextCtrlWrapper::EndEdit(EndReason reason) +{ + m_aboutToFinish = true; + + switch ( reason ) + { + case End_Accept: + // Notify the owner about the changes + AcceptChanges(); + + // Even if vetoed, close the control (consistent with MSW) + Finish( true ); + break; + + case End_Discard: + m_owner->OnRenameCancelled(m_itemEdited); + + Finish( true ); + break; + + case End_Destroy: + // Don't generate any notifications for the control being destroyed + // and don't set focus to it neither. + Finish(false); + break; + } +} + +void wxListTextCtrlWrapper::Finish( bool setfocus ) +{ + m_text->RemoveEventHandler(this); + m_owner->ResetTextControl( m_text ); + + wxPendingDelete.Append( this ); + + if (setfocus) + m_owner->SetFocus(); +} + +bool wxListTextCtrlWrapper::AcceptChanges() +{ + const wxString value = m_text->GetValue(); + + // notice that we should always call OnRenameAccept() to generate the "end + // label editing" event, even if the user hasn't really changed anything + if ( !m_owner->OnRenameAccept(m_itemEdited, value) ) + { + // vetoed by the user + return false; + } + + // accepted, do rename the item (unless nothing changed) + if ( value != m_startValue ) + m_owner->SetItemText(m_itemEdited, value); + + return true; +} + +void wxListTextCtrlWrapper::OnChar( wxKeyEvent &event ) +{ + if ( !CheckForEndEditKey(event) ) + event.Skip(); +} + +bool wxListTextCtrlWrapper::CheckForEndEditKey(const wxKeyEvent& event) +{ + switch ( event.m_keyCode ) + { + case WXK_RETURN: + EndEdit( End_Accept ); + break; + + case WXK_ESCAPE: + EndEdit( End_Discard ); + break; + + default: + return false; + } + + return true; +} + +void wxListTextCtrlWrapper::OnKeyUp( wxKeyEvent &event ) +{ + if (m_aboutToFinish) + { + // auto-grow the textctrl: + wxSize parentSize = m_owner->GetSize(); + wxPoint myPos = m_text->GetPosition(); + wxSize mySize = m_text->GetSize(); + int sx, sy; + m_text->GetTextExtent(m_text->GetValue() + wxT("MM"), &sx, &sy); + if (myPos.x + sx > parentSize.x) + sx = parentSize.x - myPos.x; + if (mySize.x > sx) + sx = mySize.x; + m_text->SetSize(sx, wxDefaultCoord); + } + + event.Skip(); +} + +void wxListTextCtrlWrapper::OnKillFocus( wxFocusEvent &event ) +{ + if ( !m_aboutToFinish ) + { + if ( !AcceptChanges() ) + m_owner->OnRenameCancelled( m_itemEdited ); + + Finish( false ); + } + + // We must let the native text control handle focus + event.Skip(); +} + +//----------------------------------------------------------------------------- +// wxListMainWindow +//----------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxListMainWindow, wxWindow) + EVT_PAINT (wxListMainWindow::OnPaint) + EVT_MOUSE_EVENTS (wxListMainWindow::OnMouse) + EVT_CHAR_HOOK (wxListMainWindow::OnCharHook) + EVT_CHAR (wxListMainWindow::OnChar) + EVT_KEY_DOWN (wxListMainWindow::OnKeyDown) + EVT_KEY_UP (wxListMainWindow::OnKeyUp) + EVT_SET_FOCUS (wxListMainWindow::OnSetFocus) + EVT_KILL_FOCUS (wxListMainWindow::OnKillFocus) + EVT_SCROLLWIN (wxListMainWindow::OnScroll) + EVT_CHILD_FOCUS (wxListMainWindow::OnChildFocus) +END_EVENT_TABLE() + +void wxListMainWindow::Init() +{ + m_dirty = true; + m_countVirt = 0; + m_lineFrom = + m_lineTo = (size_t)-1; + m_linesPerPage = 0; + + m_headerWidth = + m_lineHeight = 0; + + m_small_image_list = NULL; + m_normal_image_list = NULL; + + m_small_spacing = 30; + m_normal_spacing = 40; + + m_hasFocus = false; + m_dragCount = 0; + m_isCreated = false; + + m_lastOnSame = false; + m_renameTimer = new wxListRenameTimer( this ); + m_findTimer = NULL; + m_findBell = 0; // default is to not ring bell at all + m_textctrlWrapper = NULL; + + m_current = + m_lineLastClicked = + m_lineSelectSingleOnUp = + m_lineBeforeLastClicked = (size_t)-1; +} + +wxListMainWindow::wxListMainWindow() +{ + Init(); + + m_highlightBrush = + m_highlightUnfocusedBrush = NULL; +} + +wxListMainWindow::wxListMainWindow( wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size ) + : wxWindow( parent, id, pos, size, + wxWANTS_CHARS | wxBORDER_NONE ) +{ + Init(); + + m_highlightBrush = new wxBrush + ( + wxSystemSettings::GetColour + ( + wxSYS_COLOUR_HIGHLIGHT + ), + wxBRUSHSTYLE_SOLID + ); + + m_highlightUnfocusedBrush = new wxBrush + ( + wxSystemSettings::GetColour + ( + wxSYS_COLOUR_BTNSHADOW + ), + wxBRUSHSTYLE_SOLID + ); + + wxVisualAttributes attr = wxGenericListCtrl::GetClassDefaultAttributes(); + SetOwnForegroundColour( attr.colFg ); + SetOwnBackgroundColour( attr.colBg ); + if (!m_hasFont) + SetOwnFont( attr.font ); +} + +wxListMainWindow::~wxListMainWindow() +{ + if ( m_textctrlWrapper ) + m_textctrlWrapper->EndEdit(wxListTextCtrlWrapper::End_Destroy); + + DoDeleteAllItems(); + WX_CLEAR_LIST(wxListHeaderDataList, m_columns); + WX_CLEAR_ARRAY(m_aColWidths); + + delete m_highlightBrush; + delete m_highlightUnfocusedBrush; + delete m_renameTimer; + delete m_findTimer; +} + +void wxListMainWindow::SetReportView(bool inReportView) +{ + const size_t count = m_lines.size(); + for ( size_t n = 0; n < count; n++ ) + { + m_lines[n].SetReportView(inReportView); + } +} + +void wxListMainWindow::CacheLineData(size_t line) +{ + wxGenericListCtrl *listctrl = GetListCtrl(); + + wxListLineData *ld = GetDummyLine(); + + size_t countCol = GetColumnCount(); + for ( size_t col = 0; col < countCol; col++ ) + { + ld->SetText(col, listctrl->OnGetItemText(line, col)); + ld->SetImage(col, listctrl->OnGetItemColumnImage(line, col)); + } + + ld->SetAttr(listctrl->OnGetItemAttr(line)); +} + +wxListLineData *wxListMainWindow::GetDummyLine() const +{ + wxASSERT_MSG( !IsEmpty(), wxT("invalid line index") ); + wxASSERT_MSG( IsVirtual(), wxT("GetDummyLine() shouldn't be called") ); + + wxListMainWindow *self = wxConstCast(this, wxListMainWindow); + + // we need to recreate the dummy line if the number of columns in the + // control changed as it would have the incorrect number of fields + // otherwise + if ( !m_lines.IsEmpty() && + m_lines[0].m_items.GetCount() != (size_t)GetColumnCount() ) + { + self->m_lines.Clear(); + } + + if ( m_lines.IsEmpty() ) + { + wxListLineData *line = new wxListLineData(self); + self->m_lines.Add(line); + + // don't waste extra memory -- there never going to be anything + // else/more in this array + self->m_lines.Shrink(); + } + + return &m_lines[0]; +} + +// ---------------------------------------------------------------------------- +// line geometry (report mode only) +// ---------------------------------------------------------------------------- + +wxCoord wxListMainWindow::GetLineHeight() const +{ + // we cache the line height as calling GetTextExtent() is slow + if ( !m_lineHeight ) + { + wxListMainWindow *self = wxConstCast(this, wxListMainWindow); + + wxClientDC dc( self ); + dc.SetFont( GetFont() ); + + wxCoord y; + dc.GetTextExtent(wxT("H"), NULL, &y); + + if ( m_small_image_list && m_small_image_list->GetImageCount() ) + { + int iw = 0, ih = 0; + m_small_image_list->GetSize(0, iw, ih); + y = wxMax(y, ih); + } + + y += EXTRA_HEIGHT; + self->m_lineHeight = y + LINE_SPACING; + } + + return m_lineHeight; +} + +wxCoord wxListMainWindow::GetLineY(size_t line) const +{ + wxASSERT_MSG( InReportView(), wxT("only works in report mode") ); + + return LINE_SPACING + line * GetLineHeight(); +} + +wxRect wxListMainWindow::GetLineRect(size_t line) const +{ + if ( !InReportView() ) + return GetLine(line)->m_gi->m_rectAll; + + wxRect rect; + rect.x = HEADER_OFFSET_X; + rect.y = GetLineY(line); + rect.width = GetHeaderWidth(); + rect.height = GetLineHeight(); + + return rect; +} + +wxRect wxListMainWindow::GetLineLabelRect(size_t line) const +{ + if ( !InReportView() ) + return GetLine(line)->m_gi->m_rectLabel; + + int image_x = 0; + wxListLineData *data = GetLine(line); + wxListItemDataList::compatibility_iterator node = data->m_items.GetFirst(); + if (node) + { + wxListItemData *item = node->GetData(); + if ( item->HasImage() ) + { + int ix, iy; + GetImageSize( item->GetImage(), ix, iy ); + image_x = 3 + ix + IMAGE_MARGIN_IN_REPORT_MODE; + } + } + + wxRect rect; + rect.x = image_x + HEADER_OFFSET_X; + rect.y = GetLineY(line); + rect.width = GetColumnWidth(0) - image_x; + rect.height = GetLineHeight(); + + return rect; +} + +wxRect wxListMainWindow::GetLineIconRect(size_t line) const +{ + if ( !InReportView() ) + return GetLine(line)->m_gi->m_rectIcon; + + wxListLineData *ld = GetLine(line); + wxASSERT_MSG( ld->HasImage(), wxT("should have an image") ); + + wxRect rect; + rect.x = HEADER_OFFSET_X; + rect.y = GetLineY(line); + GetImageSize(ld->GetImage(), rect.width, rect.height); + + return rect; +} + +wxRect wxListMainWindow::GetLineHighlightRect(size_t line) const +{ + return InReportView() ? GetLineRect(line) + : GetLine(line)->m_gi->m_rectHighlight; +} + +long wxListMainWindow::HitTestLine(size_t line, int x, int y) const +{ + wxASSERT_MSG( line < GetItemCount(), wxT("invalid line in HitTestLine") ); + + wxListLineData *ld = GetLine(line); + + if ( ld->HasImage() && GetLineIconRect(line).Contains(x, y) ) + return wxLIST_HITTEST_ONITEMICON; + + // VS: Testing for "ld->HasText() || InReportView()" instead of + // "ld->HasText()" is needed to make empty lines in report view + // possible + if ( ld->HasText() || InReportView() ) + { + wxRect rect = InReportView() ? GetLineRect(line) + : GetLineLabelRect(line); + + if ( rect.Contains(x, y) ) + return wxLIST_HITTEST_ONITEMLABEL; + } + + return 0; +} + +// ---------------------------------------------------------------------------- +// highlight (selection) handling +// ---------------------------------------------------------------------------- + +bool wxListMainWindow::IsHighlighted(size_t line) const +{ + if ( IsVirtual() ) + { + return m_selStore.IsSelected(line); + } + else // !virtual + { + wxListLineData *ld = GetLine(line); + wxCHECK_MSG( ld, false, wxT("invalid index in IsHighlighted") ); + + return ld->IsHighlighted(); + } +} + +void wxListMainWindow::HighlightLines( size_t lineFrom, + size_t lineTo, + bool highlight ) +{ + if ( IsVirtual() ) + { + wxArrayInt linesChanged; + if ( !m_selStore.SelectRange(lineFrom, lineTo, highlight, + &linesChanged) ) + { + // meny items changed state, refresh everything + RefreshLines(lineFrom, lineTo); + } + else // only a few items changed state, refresh only them + { + size_t count = linesChanged.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + RefreshLine(linesChanged[n]); + } + } + } + else // iterate over all items in non report view + { + for ( size_t line = lineFrom; line <= lineTo; line++ ) + { + if ( HighlightLine(line, highlight) ) + RefreshLine(line); + } + } +} + +bool wxListMainWindow::HighlightLine( size_t line, bool highlight ) +{ + bool changed; + + if ( IsVirtual() ) + { + changed = m_selStore.SelectItem(line, highlight); + } + else // !virtual + { + wxListLineData *ld = GetLine(line); + wxCHECK_MSG( ld, false, wxT("invalid index in HighlightLine") ); + + changed = ld->Highlight(highlight); + } + + if ( changed ) + { + SendNotify( line, highlight ? wxEVT_LIST_ITEM_SELECTED + : wxEVT_LIST_ITEM_DESELECTED ); + } + + return changed; +} + +void wxListMainWindow::RefreshLine( size_t line ) +{ + if ( InReportView() ) + { + size_t visibleFrom, visibleTo; + GetVisibleLinesRange(&visibleFrom, &visibleTo); + + if ( line < visibleFrom || line > visibleTo ) + return; + } + + wxRect rect = GetLineRect(line); + + GetListCtrl()->CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + RefreshRect( rect ); +} + +void wxListMainWindow::RefreshLines( size_t lineFrom, size_t lineTo ) +{ + // we suppose that they are ordered by caller + wxASSERT_MSG( lineFrom <= lineTo, wxT("indices in disorder") ); + + wxASSERT_MSG( lineTo < GetItemCount(), wxT("invalid line range") ); + + if ( InReportView() ) + { + size_t visibleFrom, visibleTo; + GetVisibleLinesRange(&visibleFrom, &visibleTo); + + if ( lineFrom < visibleFrom ) + lineFrom = visibleFrom; + if ( lineTo > visibleTo ) + lineTo = visibleTo; + + wxRect rect; + rect.x = 0; + rect.y = GetLineY(lineFrom); + rect.width = GetClientSize().x; + rect.height = GetLineY(lineTo) - rect.y + GetLineHeight(); + + GetListCtrl()->CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + RefreshRect( rect ); + } + else // !report + { + // TODO: this should be optimized... + for ( size_t line = lineFrom; line <= lineTo; line++ ) + { + RefreshLine(line); + } + } +} + +void wxListMainWindow::RefreshAfter( size_t lineFrom ) +{ + if ( InReportView() ) + { + size_t visibleFrom, visibleTo; + GetVisibleLinesRange(&visibleFrom, &visibleTo); + + if ( lineFrom < visibleFrom ) + lineFrom = visibleFrom; + else if ( lineFrom > visibleTo ) + return; + + wxRect rect; + rect.x = 0; + rect.y = GetLineY(lineFrom); + GetListCtrl()->CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + + wxSize size = GetClientSize(); + rect.width = size.x; + + // refresh till the bottom of the window + rect.height = size.y - rect.y; + + RefreshRect( rect ); + } + else // !report + { + // TODO: how to do it more efficiently? + m_dirty = true; + } +} + +void wxListMainWindow::RefreshSelected() +{ + if ( IsEmpty() ) + return; + + size_t from, to; + if ( InReportView() ) + { + GetVisibleLinesRange(&from, &to); + } + else // !virtual + { + from = 0; + to = GetItemCount() - 1; + } + + if ( HasCurrent() && m_current >= from && m_current <= to ) + RefreshLine(m_current); + + for ( size_t line = from; line <= to; line++ ) + { + // NB: the test works as expected even if m_current == -1 + if ( line != m_current && IsHighlighted(line) ) + RefreshLine(line); + } +} + +void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) +{ + // Note: a wxPaintDC must be constructed even if no drawing is + // done (a Windows requirement). + wxPaintDC dc( this ); + + if ( IsEmpty() ) + { + // nothing to draw or not the moment to draw it + return; + } + + if ( m_dirty ) + RecalculatePositions( false ); + + GetListCtrl()->PrepareDC( dc ); + + int dev_x, dev_y; + GetListCtrl()->CalcScrolledPosition( 0, 0, &dev_x, &dev_y ); + + dc.SetFont( GetFont() ); + + if ( InReportView() ) + { + int lineHeight = GetLineHeight(); + + size_t visibleFrom, visibleTo; + GetVisibleLinesRange(&visibleFrom, &visibleTo); + + wxRect rectLine; + int xOrig = dc.LogicalToDeviceX( 0 ); + int yOrig = dc.LogicalToDeviceY( 0 ); + + // tell the caller cache to cache the data + if ( IsVirtual() ) + { + wxListEvent evCache(wxEVT_LIST_CACHE_HINT, + GetParent()->GetId()); + evCache.SetEventObject( GetParent() ); + evCache.m_oldItemIndex = visibleFrom; + evCache.m_item.m_itemId = + evCache.m_itemIndex = visibleTo; + GetParent()->GetEventHandler()->ProcessEvent( evCache ); + } + + for ( size_t line = visibleFrom; line <= visibleTo; line++ ) + { + rectLine = GetLineRect(line); + + + if ( !IsExposed(rectLine.x + xOrig, rectLine.y + yOrig, + rectLine.width, rectLine.height) ) + { + // don't redraw unaffected lines to avoid flicker + continue; + } + + GetLine(line)->DrawInReportMode( &dc, + rectLine, + GetLineHighlightRect(line), + IsHighlighted(line), + line == m_current ); + } + + if ( HasFlag(wxLC_HRULES) ) + { + wxPen pen(GetRuleColour(), 1, wxPENSTYLE_SOLID); + wxSize clientSize = GetClientSize(); + + size_t i = visibleFrom; + if (i == 0) i = 1; // Don't draw the first one + for ( ; i <= visibleTo; i++ ) + { + dc.SetPen(pen); + dc.SetBrush( *wxTRANSPARENT_BRUSH ); + dc.DrawLine(0 - dev_x, i * lineHeight, + clientSize.x - dev_x, i * lineHeight); + } + + // Draw last horizontal rule + if ( visibleTo == GetItemCount() - 1 ) + { + dc.SetPen( pen ); + dc.SetBrush( *wxTRANSPARENT_BRUSH ); + dc.DrawLine(0 - dev_x, (m_lineTo + 1) * lineHeight, + clientSize.x - dev_x , (m_lineTo + 1) * lineHeight ); + } + } + + // Draw vertical rules if required + if ( HasFlag(wxLC_VRULES) && !IsEmpty() ) + { + wxPen pen(GetRuleColour(), 1, wxPENSTYLE_SOLID); + wxRect firstItemRect, lastItemRect; + + GetItemRect(visibleFrom, firstItemRect); + GetItemRect(visibleTo, lastItemRect); + int x = firstItemRect.GetX(); + dc.SetPen(pen); + dc.SetBrush(* wxTRANSPARENT_BRUSH); + + for (int col = 0; col < GetColumnCount(); col++) + { + int colWidth = GetColumnWidth(col); + x += colWidth; + int x_pos = x - dev_x; + if (col < GetColumnCount()-1) x_pos -= 2; + dc.DrawLine(x_pos, firstItemRect.GetY() - 1 - dev_y, + x_pos, lastItemRect.GetBottom() + 1 - dev_y); + } + } + } + else // !report + { + size_t count = GetItemCount(); + for ( size_t i = 0; i < count; i++ ) + { + GetLine(i)->Draw( &dc, i == m_current ); + } + } + + // DrawFocusRect() is unusable under Mac, it draws outside of the highlight + // rectangle somehow and so leaves traces when the item is not selected any + // more, see #12229. +#ifndef __WXMAC__ + if ( HasCurrent() ) + { + int flags = 0; + if ( IsHighlighted(m_current) ) + flags |= wxCONTROL_SELECTED; + + wxRendererNative::Get(). + DrawFocusRect(this, dc, GetLineHighlightRect(m_current), flags); + } +#endif // !__WXMAC__ +} + +void wxListMainWindow::HighlightAll( bool on ) +{ + if ( IsSingleSel() ) + { + wxASSERT_MSG( !on, wxT("can't do this in a single selection control") ); + + // we just have one item to turn off + if ( HasCurrent() && IsHighlighted(m_current) ) + { + HighlightLine(m_current, false); + RefreshLine(m_current); + } + } + else // multi selection + { + if ( !IsEmpty() ) + HighlightLines(0, GetItemCount() - 1, on); + } +} + +void wxListMainWindow::OnChildFocus(wxChildFocusEvent& WXUNUSED(event)) +{ + // Do nothing here. This prevents the default handler in wxScrolledWindow + // from needlessly scrolling the window when the edit control is + // dismissed. See ticket #9563. +} + +void wxListMainWindow::SendNotify( size_t line, + wxEventType command, + const wxPoint& point ) +{ + wxListEvent le( command, GetParent()->GetId() ); + le.SetEventObject( GetParent() ); + + le.m_item.m_itemId = + le.m_itemIndex = line; + + // set only for events which have position + if ( point != wxDefaultPosition ) + le.m_pointDrag = point; + + // don't try to get the line info for virtual list controls: the main + // program has it anyhow and if we did it would result in accessing all + // the lines, even those which are not visible now and this is precisely + // what we're trying to avoid + if ( !IsVirtual() ) + { + if ( line != (size_t)-1 ) + { + GetLine(line)->GetItem( 0, le.m_item ); + } + //else: this happens for wxEVT_LIST_ITEM_FOCUSED event + } + //else: there may be no more such item + + GetParent()->GetEventHandler()->ProcessEvent( le ); +} + +void wxListMainWindow::ChangeCurrent(size_t current) +{ + m_current = current; + + // as the current item changed, we shouldn't start editing it when the + // "slow click" timer expires as the click happened on another item + if ( m_renameTimer->IsRunning() ) + m_renameTimer->Stop(); + + SendNotify(current, wxEVT_LIST_ITEM_FOCUSED); +} + +wxTextCtrl *wxListMainWindow::EditLabel(long item, wxClassInfo* textControlClass) +{ + wxCHECK_MSG( (item >= 0) && ((size_t)item < GetItemCount()), NULL, + wxT("wrong index in wxGenericListCtrl::EditLabel()") ); + + wxASSERT_MSG( textControlClass->IsKindOf(wxCLASSINFO(wxTextCtrl)), + wxT("EditLabel() needs a text control") ); + + size_t itemEdit = (size_t)item; + + wxListEvent le( wxEVT_LIST_BEGIN_LABEL_EDIT, GetParent()->GetId() ); + le.SetEventObject( GetParent() ); + le.m_item.m_itemId = + le.m_itemIndex = item; + wxListLineData *data = GetLine(itemEdit); + wxCHECK_MSG( data, NULL, wxT("invalid index in EditLabel()") ); + data->GetItem( 0, le.m_item ); + + if ( GetParent()->GetEventHandler()->ProcessEvent( le ) && !le.IsAllowed() ) + { + // vetoed by user code + return NULL; + } + + if ( m_dirty ) + { + // Ensure the display is updated before we start editing. + Update(); + } + + wxTextCtrl * const text = (wxTextCtrl *)textControlClass->CreateObject(); + m_textctrlWrapper = new wxListTextCtrlWrapper(this, text, item); + return m_textctrlWrapper->GetText(); +} + +void wxListMainWindow::OnRenameTimer() +{ + wxCHECK_RET( HasCurrent(), wxT("unexpected rename timer") ); + + EditLabel( m_current ); +} + +bool wxListMainWindow::OnRenameAccept(size_t itemEdit, const wxString& value) +{ + wxListEvent le( wxEVT_LIST_END_LABEL_EDIT, GetParent()->GetId() ); + le.SetEventObject( GetParent() ); + le.m_item.m_itemId = + le.m_itemIndex = itemEdit; + + wxListLineData *data = GetLine(itemEdit); + + wxCHECK_MSG( data, false, wxT("invalid index in OnRenameAccept()") ); + + data->GetItem( 0, le.m_item ); + le.m_item.m_text = value; + return !GetParent()->GetEventHandler()->ProcessEvent( le ) || + le.IsAllowed(); +} + +void wxListMainWindow::OnRenameCancelled(size_t itemEdit) +{ + // let owner know that the edit was cancelled + wxListEvent le( wxEVT_LIST_END_LABEL_EDIT, GetParent()->GetId() ); + + le.SetEditCanceled(true); + + le.SetEventObject( GetParent() ); + le.m_item.m_itemId = + le.m_itemIndex = itemEdit; + + wxListLineData *data = GetLine(itemEdit); + wxCHECK_RET( data, wxT("invalid index in OnRenameCancelled()") ); + + data->GetItem( 0, le.m_item ); + GetEventHandler()->ProcessEvent( le ); +} + +void wxListMainWindow::OnFindTimer() +{ + m_findPrefix.clear(); + if ( m_findBell ) + m_findBell = 1; +} + +void wxListMainWindow::EnableBellOnNoMatch( bool on ) +{ + m_findBell = on; +} + +void wxListMainWindow::OnMouse( wxMouseEvent &event ) +{ +#ifdef __WXMAC__ + // On wxMac we can't depend on the EVT_KILL_FOCUS event to properly + // shutdown the edit control when the mouse is clicked elsewhere on the + // listctrl because the order of events is different (or something like + // that), so explicitly end the edit if it is active. + if ( event.LeftDown() && m_textctrlWrapper ) + m_textctrlWrapper->EndEdit(wxListTextCtrlWrapper::End_Accept); +#endif // __WXMAC__ + + if ( event.LeftDown() ) + { + // Ensure we skip the event to let the system set focus to this window. + event.Skip(); + } + + // Pretend that the event happened in wxListCtrl itself. + wxMouseEvent me(event); + me.SetEventObject( GetParent() ); + me.SetId(GetParent()->GetId()); + if ( GetParent()->GetEventHandler()->ProcessEvent( me )) + return; + + if (event.GetEventType() == wxEVT_MOUSEWHEEL) + { + // let the base class handle mouse wheel events. + event.Skip(); + return; + } + + if ( !HasCurrent() || IsEmpty() ) + { + if (event.RightDown()) + { + SendNotify( (size_t)-1, wxEVT_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); + + wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU, + GetParent()->GetId(), + ClientToScreen(event.GetPosition())); + evtCtx.SetEventObject(GetParent()); + GetParent()->GetEventHandler()->ProcessEvent(evtCtx); + } + return; + } + + if (m_dirty) + return; + + if ( !(event.Dragging() || event.ButtonDown() || event.LeftUp() || + event.ButtonDClick()) ) + return; + + int x = event.GetX(); + int y = event.GetY(); + GetListCtrl()->CalcUnscrolledPosition( x, y, &x, &y ); + + // where did we hit it (if we did)? + long hitResult = 0; + + size_t count = GetItemCount(), + current; + + if ( InReportView() ) + { + current = y / GetLineHeight(); + if ( current < count ) + hitResult = HitTestLine(current, x, y); + } + else // !report + { + // TODO: optimize it too! this is less simple than for report view but + // enumerating all items is still not a way to do it!! + for ( current = 0; current < count; current++ ) + { + hitResult = HitTestLine(current, x, y); + if ( hitResult ) + break; + } + } + + // Update drag events counter first as we must do it even if the mouse is + // not on any item right now as we must keep count in case we started + // dragging from the empty control area but continued to do it over a valid + // item -- in this situation we must not start dragging this item. + if (event.Dragging()) + m_dragCount++; + else + m_dragCount = 0; + + // The only mouse event that can be generated without any valid item is + // wxEVT_LIST_ITEM_RIGHT_CLICK as it can be useful to have a global + // popup menu for the list control itself which should be shown even when + // the user clicks outside of any item. + if ( !hitResult ) + { + // outside of any item + if (event.RightDown()) + { + SendNotify( (size_t) -1, wxEVT_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); + + wxContextMenuEvent evtCtx( + wxEVT_CONTEXT_MENU, + GetParent()->GetId(), + ClientToScreen(event.GetPosition())); + evtCtx.SetEventObject(GetParent()); + GetParent()->GetEventHandler()->ProcessEvent(evtCtx); + } + else + { + // reset the selection and bail out + HighlightAll(false); + } + + return; + } + + if ( event.Dragging() ) + { + if (m_dragCount == 1) + { + // we have to report the raw, physical coords as we want to be + // able to call HitTest(event.m_pointDrag) from the user code to + // get the item being dragged + m_dragStart = event.GetPosition(); + } + + if (m_dragCount != 3) + return; + + int command = event.RightIsDown() ? wxEVT_LIST_BEGIN_RDRAG + : wxEVT_LIST_BEGIN_DRAG; + + SendNotify( m_lineLastClicked, command, m_dragStart ); + + return; + } + + bool forceClick = false; + if (event.ButtonDClick()) + { + if ( m_renameTimer->IsRunning() ) + m_renameTimer->Stop(); + + m_lastOnSame = false; + + if ( current == m_lineLastClicked ) + { + SendNotify( current, wxEVT_LIST_ITEM_ACTIVATED ); + + return; + } + else + { + // The first click was on another item, so don't interpret this as + // a double click, but as a simple click instead + forceClick = true; + } + } + + if (event.LeftUp()) + { + if (m_lineSelectSingleOnUp != (size_t)-1) + { + // select single line + HighlightAll( false ); + ReverseHighlight(m_lineSelectSingleOnUp); + } + + if (m_lastOnSame) + { + if ((current == m_current) && + (hitResult == wxLIST_HITTEST_ONITEMLABEL) && + HasFlag(wxLC_EDIT_LABELS) ) + { + if ( !InReportView() || + GetLineLabelRect(current).Contains(x, y) ) + { + int dclick = wxSystemSettings::GetMetric(wxSYS_DCLICK_MSEC); + m_renameTimer->Start(dclick > 0 ? dclick : 250, true); + } + } + + m_lastOnSame = false; + } + + m_lineSelectSingleOnUp = (size_t)-1; + } + else + { + // This is necessary, because after a DnD operation in + // from and to ourself, the up event is swallowed by the + // DnD code. So on next non-up event (which means here and + // now) m_lineSelectSingleOnUp should be reset. + m_lineSelectSingleOnUp = (size_t)-1; + } + if (event.RightDown()) + { + m_lineBeforeLastClicked = m_lineLastClicked; + m_lineLastClicked = current; + + // If the item is already selected, do not update the selection. + // Multi-selections should not be cleared if a selected item is clicked. + if (!IsHighlighted(current)) + { + HighlightAll(false); + ChangeCurrent(current); + ReverseHighlight(m_current); + } + + SendNotify( current, wxEVT_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); + + // Allow generation of context menu event + event.Skip(); + } + else if (event.MiddleDown()) + { + SendNotify( current, wxEVT_LIST_ITEM_MIDDLE_CLICK ); + } + else if ( event.LeftDown() || forceClick ) + { + m_lineBeforeLastClicked = m_lineLastClicked; + m_lineLastClicked = current; + + size_t oldCurrent = m_current; + bool oldWasSelected = IsHighlighted(m_current); + + bool cmdModifierDown = event.CmdDown(); + if ( IsSingleSel() || !(cmdModifierDown || event.ShiftDown()) ) + { + if ( IsSingleSel() || !IsHighlighted(current) ) + { + HighlightAll( false ); + + ChangeCurrent(current); + + ReverseHighlight(m_current); + } + else // multi sel & current is highlighted & no mod keys + { + m_lineSelectSingleOnUp = current; + ChangeCurrent(current); // change focus + } + } + else // multi sel & either ctrl or shift is down + { + if (cmdModifierDown) + { + ChangeCurrent(current); + + ReverseHighlight(m_current); + } + else if (event.ShiftDown()) + { + ChangeCurrent(current); + + size_t lineFrom = oldCurrent, + lineTo = current; + + if ( lineTo < lineFrom ) + { + lineTo = lineFrom; + lineFrom = m_current; + } + + HighlightLines(lineFrom, lineTo); + } + else // !ctrl, !shift + { + // test in the enclosing if should make it impossible + wxFAIL_MSG( wxT("how did we get here?") ); + } + } + + if (m_current != oldCurrent) + RefreshLine( oldCurrent ); + + // Set the flag telling us whether the next click on this item should + // start editing its label. This should happen if we clicked on the + // current item and it was already selected, i.e. if this click was not + // done to select it. + // + // It should not happen if this was a double click (forceClick is true) + // nor if we hadn't had the focus before as then this click was used to + // give focus to the control. + m_lastOnSame = (m_current == oldCurrent) && oldWasSelected && + !forceClick && HasFocus(); + } +} + +void wxListMainWindow::MoveToItem(size_t item) +{ + if ( item == (size_t)-1 ) + return; + + wxRect rect = GetLineRect(item); + + int client_w, client_h; + GetClientSize( &client_w, &client_h ); + + const int hLine = GetLineHeight(); + + int view_x = SCROLL_UNIT_X * GetListCtrl()->GetScrollPos( wxHORIZONTAL ); + int view_y = hLine * GetListCtrl()->GetScrollPos( wxVERTICAL ); + + if ( InReportView() ) + { + // the next we need the range of lines shown it might be different, + // so recalculate it + ResetVisibleLinesRange(); + + if (rect.y < view_y) + GetListCtrl()->Scroll( -1, rect.y / hLine ); + if (rect.y + rect.height + 5 > view_y + client_h) + GetListCtrl()->Scroll( -1, (rect.y + rect.height - client_h + hLine) / hLine ); + +#ifdef __WXMAC__ + // At least on Mac the visible lines value will get reset inside of + // Scroll *before* it actually scrolls the window because of the + // Update() that happens there, so it will still have the wrong value. + // So let's reset it again and wait for it to be recalculated in the + // next paint event. I would expect this problem to show up in wxGTK + // too but couldn't duplicate it there. Perhaps the order of events + // is different... --Robin + ResetVisibleLinesRange(); +#endif + } + else // !report + { + int sx = -1, + sy = -1; + + if (rect.x-view_x < 5) + sx = (rect.x - 5) / SCROLL_UNIT_X; + if (rect.x + rect.width - 5 > view_x + client_w) + sx = (rect.x + rect.width - client_w + SCROLL_UNIT_X) / SCROLL_UNIT_X; + + if (rect.y-view_y < 5) + sy = (rect.y - 5) / hLine; + if (rect.y + rect.height - 5 > view_y + client_h) + sy = (rect.y + rect.height - client_h + hLine) / hLine; + + GetListCtrl()->Scroll(sx, sy); + } +} + +bool wxListMainWindow::ScrollList(int WXUNUSED(dx), int dy) +{ + if ( !InReportView() ) + { + // TODO: this should work in all views but is not implemented now + return false; + } + + size_t top, bottom; + GetVisibleLinesRange(&top, &bottom); + + if ( bottom == (size_t)-1 ) + return 0; + + ResetVisibleLinesRange(); + + int hLine = GetLineHeight(); + + GetListCtrl()->Scroll(-1, top + dy / hLine); + +#ifdef __WXMAC__ + // see comment in MoveToItem() for why we do this + ResetVisibleLinesRange(); +#endif + + return true; +} + +// ---------------------------------------------------------------------------- +// keyboard handling +// ---------------------------------------------------------------------------- + +void wxListMainWindow::OnArrowChar(size_t newCurrent, const wxKeyEvent& event) +{ + wxCHECK_RET( newCurrent < (size_t)GetItemCount(), + wxT("invalid item index in OnArrowChar()") ); + + size_t oldCurrent = m_current; + + // in single selection we just ignore Shift as we can't select several + // items anyhow + if ( event.ShiftDown() && !IsSingleSel() ) + { + ChangeCurrent(newCurrent); + + // refresh the old focus to remove it + RefreshLine( oldCurrent ); + + // select all the items between the old and the new one + if ( oldCurrent > newCurrent ) + { + newCurrent = oldCurrent; + oldCurrent = m_current; + } + + HighlightLines(oldCurrent, newCurrent); + } + else // !shift + { + // all previously selected items are unselected unless ctrl is held + // in a multiselection control + if ( !event.ControlDown() || IsSingleSel() ) + HighlightAll(false); + + ChangeCurrent(newCurrent); + + // refresh the old focus to remove it + RefreshLine( oldCurrent ); + + // in single selection mode we must always have a selected item + if ( !event.ControlDown() || IsSingleSel() ) + HighlightLine( m_current, true ); + } + + RefreshLine( m_current ); + + MoveToFocus(); +} + +void wxListMainWindow::OnKeyDown( wxKeyEvent &event ) +{ + wxWindow *parent = GetParent(); + + // propagate the key event upwards + wxKeyEvent ke(event); + ke.SetEventObject( parent ); + ke.SetId(GetParent()->GetId()); + if (parent->GetEventHandler()->ProcessEvent( ke )) + return; + + // send a list event + wxListEvent le( wxEVT_LIST_KEY_DOWN, parent->GetId() ); + le.m_item.m_itemId = + le.m_itemIndex = m_current; + if (HasCurrent()) + GetLine(m_current)->GetItem( 0, le.m_item ); + le.m_code = event.GetKeyCode(); + le.SetEventObject( parent ); + if (parent->GetEventHandler()->ProcessEvent( le )) + return; + + event.Skip(); +} + +void wxListMainWindow::OnKeyUp( wxKeyEvent &event ) +{ + wxWindow *parent = GetParent(); + + // propagate the key event upwards + wxKeyEvent ke(event); + ke.SetEventObject( parent ); + ke.SetId(GetParent()->GetId()); + if (parent->GetEventHandler()->ProcessEvent( ke )) + return; + + event.Skip(); +} + +void wxListMainWindow::OnCharHook( wxKeyEvent &event ) +{ + if ( m_textctrlWrapper ) + { + // When an in-place editor is active we should ensure that it always + // gets the key events that are special to it. + if ( m_textctrlWrapper->CheckForEndEditKey(event) ) + { + // Skip the call to wxEvent::Skip() below. + return; + } + } + + event.Skip(); +} + +void wxListMainWindow::OnChar( wxKeyEvent &event ) +{ + wxWindow *parent = GetParent(); + + // propagate the char event upwards + wxKeyEvent ke(event); + ke.SetEventObject( parent ); + ke.SetId(GetParent()->GetId()); + if (parent->GetEventHandler()->ProcessEvent( ke )) + return; + + if ( HandleAsNavigationKey(event) ) + return; + + // no item -> nothing to do + if (!HasCurrent()) + { + event.Skip(); + return; + } + + // don't use m_linesPerPage directly as it might not be computed yet + const int pageSize = GetCountPerPage(); + wxCHECK_RET( pageSize, wxT("should have non zero page size") ); + + if (GetLayoutDirection() == wxLayout_RightToLeft) + { + if (event.GetKeyCode() == WXK_RIGHT) + event.m_keyCode = WXK_LEFT; + else if (event.GetKeyCode() == WXK_LEFT) + event.m_keyCode = WXK_RIGHT; + } + + int keyCode = event.GetKeyCode(); + switch ( keyCode ) + { + case WXK_UP: + if ( m_current > 0 ) + OnArrowChar( m_current - 1, event ); + break; + + case WXK_DOWN: + if ( m_current < (size_t)GetItemCount() - 1 ) + OnArrowChar( m_current + 1, event ); + break; + + case WXK_END: + if (!IsEmpty()) + OnArrowChar( GetItemCount() - 1, event ); + break; + + case WXK_HOME: + if (!IsEmpty()) + OnArrowChar( 0, event ); + break; + + case WXK_PAGEUP: + { + int steps = InReportView() ? pageSize - 1 + : m_current % pageSize; + + int index = m_current - steps; + if (index < 0) + index = 0; + + OnArrowChar( index, event ); + } + break; + + case WXK_PAGEDOWN: + { + int steps = InReportView() + ? pageSize - 1 + : pageSize - (m_current % pageSize) - 1; + + size_t index = m_current + steps; + size_t count = GetItemCount(); + if ( index >= count ) + index = count - 1; + + OnArrowChar( index, event ); + } + break; + + case WXK_LEFT: + if ( !InReportView() ) + { + int index = m_current - pageSize; + if (index < 0) + index = 0; + + OnArrowChar( index, event ); + } + break; + + case WXK_RIGHT: + if ( !InReportView() ) + { + size_t index = m_current + pageSize; + + size_t count = GetItemCount(); + if ( index >= count ) + index = count - 1; + + OnArrowChar( index, event ); + } + break; + + case WXK_SPACE: + if ( IsSingleSel() ) + { + if ( event.ControlDown() ) + { + ReverseHighlight(m_current); + } + else // normal space press + { + SendNotify( m_current, wxEVT_LIST_ITEM_ACTIVATED ); + } + } + else // multiple selection + { + ReverseHighlight(m_current); + } + break; + + case WXK_RETURN: + case WXK_EXECUTE: + SendNotify( m_current, wxEVT_LIST_ITEM_ACTIVATED ); + break; + + default: + if ( !event.HasModifiers() && + ((keyCode >= '0' && keyCode <= '9') || + (keyCode >= 'a' && keyCode <= 'z') || + (keyCode >= 'A' && keyCode <= 'Z') || + (keyCode == '_') || + (keyCode == '+') || + (keyCode == '*') || + (keyCode == '-'))) + { + // find the next item starting with the given prefix + wxChar ch = (wxChar)keyCode; + size_t item; + + // if the same character is typed multiple times then go to the + // next entry starting with that character instead of searching + // for an item starting with multiple copies of this character, + // this is more useful and is how it works under Windows. + if ( m_findPrefix.length() == 1 && m_findPrefix[0] == ch ) + { + item = PrefixFindItem(m_current, ch); + } + else + { + const wxString newPrefix(m_findPrefix + ch); + item = PrefixFindItem(m_current, newPrefix); + if ( item != (size_t)-1 ) + m_findPrefix = newPrefix; + } + + // also start the timer to reset the current prefix if the user + // doesn't press any more alnum keys soon -- we wouldn't want + // to use this prefix for a new item search + if ( !m_findTimer ) + { + m_findTimer = new wxListFindTimer( this ); + } + + // Notice that we should start the timer even if we didn't find + // anything to make sure we reset the search state later. + m_findTimer->Start(wxListFindTimer::DELAY, wxTIMER_ONE_SHOT); + + // restart timer even when there's no match so bell get's reset + if ( item != (size_t)-1 ) + { + // Select the found item and go to it. + HighlightAll(false); + SetItemState(item, + wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED, + wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED); + + // Reset the bell flag if it had been temporarily disabled + // before. + if ( m_findBell ) + m_findBell = 1; + } + else // No such item + { + // Signal it with a bell if enabled. + if ( m_findBell == 1 ) + { + ::wxBell(); + + // Disable it for the next unsuccessful match, we only + // beep once, this is usually enough and continuing to + // do it would be annoying. + m_findBell = -1; + } + } + } + else + { + event.Skip(); + } + } +} + +// ---------------------------------------------------------------------------- +// focus handling +// ---------------------------------------------------------------------------- + +void wxListMainWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) ) +{ + if ( GetParent() ) + { + wxFocusEvent event( wxEVT_SET_FOCUS, GetParent()->GetId() ); + event.SetEventObject( GetParent() ); + if ( GetParent()->GetEventHandler()->ProcessEvent( event) ) + return; + } + + // wxGTK sends us EVT_SET_FOCUS events even if we had never got + // EVT_KILL_FOCUS before which means that we finish by redrawing the items + // which are already drawn correctly resulting in horrible flicker - avoid + // it + if ( !m_hasFocus ) + { + m_hasFocus = true; + + RefreshSelected(); + } +} + +void wxListMainWindow::OnKillFocus( wxFocusEvent &WXUNUSED(event) ) +{ + if ( GetParent() ) + { + wxFocusEvent event( wxEVT_KILL_FOCUS, GetParent()->GetId() ); + event.SetEventObject( GetParent() ); + if ( GetParent()->GetEventHandler()->ProcessEvent( event) ) + return; + } + + m_hasFocus = false; + RefreshSelected(); +} + +void wxListMainWindow::DrawImage( int index, wxDC *dc, int x, int y ) +{ + if ( HasFlag(wxLC_ICON) && (m_normal_image_list)) + { + m_normal_image_list->Draw( index, *dc, x, y, wxIMAGELIST_DRAW_TRANSPARENT ); + } + else if ( HasFlag(wxLC_SMALL_ICON) && (m_small_image_list)) + { + m_small_image_list->Draw( index, *dc, x, y, wxIMAGELIST_DRAW_TRANSPARENT ); + } + else if ( HasFlag(wxLC_LIST) && (m_small_image_list)) + { + m_small_image_list->Draw( index, *dc, x, y, wxIMAGELIST_DRAW_TRANSPARENT ); + } + else if ( InReportView() && (m_small_image_list)) + { + m_small_image_list->Draw( index, *dc, x, y, wxIMAGELIST_DRAW_TRANSPARENT ); + } +} + +void wxListMainWindow::GetImageSize( int index, int &width, int &height ) const +{ + if ( HasFlag(wxLC_ICON) && m_normal_image_list ) + { + m_normal_image_list->GetSize( index, width, height ); + } + else if ( HasFlag(wxLC_SMALL_ICON) && m_small_image_list ) + { + m_small_image_list->GetSize( index, width, height ); + } + else if ( HasFlag(wxLC_LIST) && m_small_image_list ) + { + m_small_image_list->GetSize( index, width, height ); + } + else if ( InReportView() && m_small_image_list ) + { + m_small_image_list->GetSize( index, width, height ); + } + else + { + width = + height = 0; + } +} + +void wxListMainWindow::SetImageList( wxImageList *imageList, int which ) +{ + m_dirty = true; + + // calc the spacing from the icon size + int width = 0, height = 0; + + if ((imageList) && (imageList->GetImageCount()) ) + imageList->GetSize(0, width, height); + + if (which == wxIMAGE_LIST_NORMAL) + { + m_normal_image_list = imageList; + m_normal_spacing = width + 8; + } + + if (which == wxIMAGE_LIST_SMALL) + { + m_small_image_list = imageList; + m_small_spacing = width + 14; + m_lineHeight = 0; // ensure that the line height will be recalc'd + } +} + +void wxListMainWindow::SetItemSpacing( int spacing, bool isSmall ) +{ + m_dirty = true; + if (isSmall) + m_small_spacing = spacing; + else + m_normal_spacing = spacing; +} + +int wxListMainWindow::GetItemSpacing( bool isSmall ) +{ + return isSmall ? m_small_spacing : m_normal_spacing; +} + +// ---------------------------------------------------------------------------- +// columns +// ---------------------------------------------------------------------------- + +int +wxListMainWindow::ComputeMinHeaderWidth(const wxListHeaderData* column) const +{ + wxClientDC dc(const_cast(this)); + + int width = dc.GetTextExtent(column->GetText()).x + AUTOSIZE_COL_MARGIN; + + width += 2*EXTRA_WIDTH; + + // check for column header's image availability + const int image = column->GetImage(); + if ( image != -1 ) + { + if ( m_small_image_list ) + { + int ix = 0, iy = 0; + m_small_image_list->GetSize(image, ix, iy); + width += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE; + } + } + + return width; +} + +void wxListMainWindow::SetColumn( int col, const wxListItem &item ) +{ + wxListHeaderDataList::compatibility_iterator node = m_columns.Item( col ); + + wxCHECK_RET( node, wxT("invalid column index in SetColumn") ); + + wxListHeaderData *column = node->GetData(); + column->SetItem( item ); + + if ( item.m_width == wxLIST_AUTOSIZE_USEHEADER ) + column->SetWidth(ComputeMinHeaderWidth(column)); + + wxListHeaderWindow *headerWin = GetListCtrl()->m_headerWin; + if ( headerWin ) + headerWin->m_dirty = true; + + m_dirty = true; + + // invalidate it as it has to be recalculated + m_headerWidth = 0; +} + +void wxListMainWindow::SetColumnWidth( int col, int width ) +{ + wxCHECK_RET( col >= 0 && col < GetColumnCount(), + wxT("invalid column index") ); + + wxCHECK_RET( InReportView(), + wxT("SetColumnWidth() can only be called in report mode.") ); + + m_dirty = true; + + wxListHeaderWindow *headerWin = GetListCtrl()->m_headerWin; + if ( headerWin ) + headerWin->m_dirty = true; + + wxListHeaderDataList::compatibility_iterator node = m_columns.Item( col ); + wxCHECK_RET( node, wxT("no column?") ); + + wxListHeaderData *column = node->GetData(); + + size_t count = GetItemCount(); + + if (width == wxLIST_AUTOSIZE_USEHEADER) + { + width = ComputeMinHeaderWidth(column); + } + else if ( width == wxLIST_AUTOSIZE ) + { + width = ComputeMinHeaderWidth(column); + + if ( !IsVirtual() ) + { + wxClientDC dc(this); + dc.SetFont( GetFont() ); + + int max = AUTOSIZE_COL_MARGIN; + + // if the cached column width isn't valid then recalculate it + if (m_aColWidths.Item(col)->bNeedsUpdate) + { + for (size_t i = 0; i < count; i++) + { + wxListLineData *line = GetLine( i ); + wxListItemDataList::compatibility_iterator n = line->m_items.Item( col ); + + wxCHECK_RET( n, wxT("no subitem?") ); + + wxListItemData *itemData = n->GetData(); + wxListItem item; + + itemData->GetItem(item); + int itemWidth = GetItemWidthWithImage(&item); + if (itemWidth > max) + max = itemWidth; + } + + m_aColWidths.Item(col)->bNeedsUpdate = false; + m_aColWidths.Item(col)->nMaxWidth = max; + } + + max = m_aColWidths.Item(col)->nMaxWidth + AUTOSIZE_COL_MARGIN; + if ( width < max ) + width = max; + } + } + + column->SetWidth( width ); + + // invalidate it as it has to be recalculated + m_headerWidth = 0; +} + +int wxListMainWindow::GetHeaderWidth() const +{ + if ( !m_headerWidth ) + { + wxListMainWindow *self = wxConstCast(this, wxListMainWindow); + + size_t count = GetColumnCount(); + for ( size_t col = 0; col < count; col++ ) + { + self->m_headerWidth += GetColumnWidth(col); + } + } + + return m_headerWidth; +} + +void wxListMainWindow::GetColumn( int col, wxListItem &item ) const +{ + wxListHeaderDataList::compatibility_iterator node = m_columns.Item( col ); + wxCHECK_RET( node, wxT("invalid column index in GetColumn") ); + + wxListHeaderData *column = node->GetData(); + column->GetItem( item ); +} + +int wxListMainWindow::GetColumnWidth( int col ) const +{ + wxListHeaderDataList::compatibility_iterator node = m_columns.Item( col ); + wxCHECK_MSG( node, 0, wxT("invalid column index") ); + + wxListHeaderData *column = node->GetData(); + return column->GetWidth(); +} + +// ---------------------------------------------------------------------------- +// item state +// ---------------------------------------------------------------------------- + +void wxListMainWindow::SetItem( wxListItem &item ) +{ + long id = item.m_itemId; + wxCHECK_RET( id >= 0 && (size_t)id < GetItemCount(), + wxT("invalid item index in SetItem") ); + + if ( !IsVirtual() ) + { + wxListLineData *line = GetLine((size_t)id); + line->SetItem( item.m_col, item ); + + // Set item state if user wants + if ( item.m_mask & wxLIST_MASK_STATE ) + SetItemState( item.m_itemId, item.m_state, item.m_state ); + + if (InReportView()) + { + // update the Max Width Cache if needed + int width = GetItemWidthWithImage(&item); + + if (width > m_aColWidths.Item(item.m_col)->nMaxWidth) + m_aColWidths.Item(item.m_col)->nMaxWidth = width; + } + } + + // update the item on screen unless we're going to update everything soon + // anyhow + if ( !m_dirty ) + { + wxRect rectItem; + GetItemRect(id, rectItem); + RefreshRect(rectItem); + } +} + +void wxListMainWindow::SetItemStateAll(long state, long stateMask) +{ + if ( IsEmpty() ) + return; + + // first deal with selection + if ( stateMask & wxLIST_STATE_SELECTED ) + { + // set/clear select state + if ( IsVirtual() ) + { + // optimized version for virtual listctrl. + m_selStore.SelectRange(0, GetItemCount() - 1, state == wxLIST_STATE_SELECTED); + Refresh(); + } + else if ( state & wxLIST_STATE_SELECTED ) + { + const long count = GetItemCount(); + for( long i = 0; i < count; i++ ) + { + SetItemState( i, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED ); + } + + } + else + { + // clear for non virtual (somewhat optimized by using GetNextItem()) + long i = -1; + while ( (i = GetNextItem(i, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED)) != -1 ) + { + SetItemState( i, 0, wxLIST_STATE_SELECTED ); + } + } + } + + if ( HasCurrent() && (state == 0) && (stateMask & wxLIST_STATE_FOCUSED) ) + { + // unfocus all: only one item can be focussed, so clearing focus for + // all items is simply clearing focus of the focussed item. + SetItemState(m_current, state, stateMask); + } + //(setting focus to all items makes no sense, so it is not handled here.) +} + +void wxListMainWindow::SetItemState( long litem, long state, long stateMask ) +{ + if ( litem == -1 ) + { + SetItemStateAll(state, stateMask); + return; + } + + wxCHECK_RET( litem >= 0 && (size_t)litem < GetItemCount(), + wxT("invalid list ctrl item index in SetItem") ); + + size_t oldCurrent = m_current; + size_t item = (size_t)litem; // safe because of the check above + + // do we need to change the focus? + if ( stateMask & wxLIST_STATE_FOCUSED ) + { + if ( state & wxLIST_STATE_FOCUSED ) + { + // don't do anything if this item is already focused + if ( item != m_current ) + { + ChangeCurrent(item); + + if ( oldCurrent != (size_t)-1 ) + { + if ( IsSingleSel() ) + { + HighlightLine(oldCurrent, false); + } + + RefreshLine(oldCurrent); + } + + RefreshLine( m_current ); + } + } + else // unfocus + { + // don't do anything if this item is not focused + if ( item == m_current ) + { + ResetCurrent(); + + if ( IsSingleSel() ) + { + // we must unselect the old current item as well or we + // might end up with more than one selected item in a + // single selection control + HighlightLine(oldCurrent, false); + } + + RefreshLine( oldCurrent ); + } + } + } + + // do we need to change the selection state? + if ( stateMask & wxLIST_STATE_SELECTED ) + { + bool on = (state & wxLIST_STATE_SELECTED) != 0; + + if ( IsSingleSel() ) + { + if ( on ) + { + // selecting the item also makes it the focused one in the + // single sel mode + if ( m_current != item ) + { + ChangeCurrent(item); + + if ( oldCurrent != (size_t)-1 ) + { + HighlightLine( oldCurrent, false ); + RefreshLine( oldCurrent ); + } + } + } + else // off + { + // only the current item may be selected anyhow + if ( item != m_current ) + return; + } + } + + if ( HighlightLine(item, on) ) + { + RefreshLine(item); + } + } +} + +int wxListMainWindow::GetItemState( long item, long stateMask ) const +{ + wxCHECK_MSG( item >= 0 && (size_t)item < GetItemCount(), 0, + wxT("invalid list ctrl item index in GetItemState()") ); + + int ret = wxLIST_STATE_DONTCARE; + + if ( stateMask & wxLIST_STATE_FOCUSED ) + { + if ( (size_t)item == m_current ) + ret |= wxLIST_STATE_FOCUSED; + } + + if ( stateMask & wxLIST_STATE_SELECTED ) + { + if ( IsHighlighted(item) ) + ret |= wxLIST_STATE_SELECTED; + } + + return ret; +} + +void wxListMainWindow::GetItem( wxListItem &item ) const +{ + wxCHECK_RET( item.m_itemId >= 0 && (size_t)item.m_itemId < GetItemCount(), + wxT("invalid item index in GetItem") ); + + wxListLineData *line = GetLine((size_t)item.m_itemId); + line->GetItem( item.m_col, item ); + + // Get item state if user wants it + if ( item.m_mask & wxLIST_MASK_STATE ) + item.m_state = GetItemState( item.m_itemId, wxLIST_STATE_SELECTED | + wxLIST_STATE_FOCUSED ); +} + +// ---------------------------------------------------------------------------- +// item count +// ---------------------------------------------------------------------------- + +size_t wxListMainWindow::GetItemCount() const +{ + return IsVirtual() ? m_countVirt : m_lines.GetCount(); +} + +void wxListMainWindow::SetItemCount(long count) +{ + // Update the current item if it's not valid any longer (notice that this + // invalidates it completely if the control is becoming empty, which is the + // right thing to do). + if ( HasCurrent() && m_current >= (size_t)count ) + ChangeCurrent(count - 1); + + m_selStore.SetItemCount(count); + m_countVirt = count; + + ResetVisibleLinesRange(); + + // scrollbars must be reset + m_dirty = true; +} + +int wxListMainWindow::GetSelectedItemCount() const +{ + // deal with the quick case first + if ( IsSingleSel() ) + return HasCurrent() ? IsHighlighted(m_current) : false; + + // virtual controls remmebers all its selections itself + if ( IsVirtual() ) + return m_selStore.GetSelectedCount(); + + // TODO: we probably should maintain the number of items selected even for + // non virtual controls as enumerating all lines is really slow... + size_t countSel = 0; + size_t count = GetItemCount(); + for ( size_t line = 0; line < count; line++ ) + { + if ( GetLine(line)->IsHighlighted() ) + countSel++; + } + + return countSel; +} + +// ---------------------------------------------------------------------------- +// item position/size +// ---------------------------------------------------------------------------- + +wxRect wxListMainWindow::GetViewRect() const +{ + wxASSERT_MSG( !HasFlag(wxLC_LIST), "not implemented for list view" ); + + // we need to find the longest/tallest label + wxCoord xMax = 0, yMax = 0; + const int count = GetItemCount(); + if ( count ) + { + for ( int i = 0; i < count; i++ ) + { + // we need logical, not physical, coordinates here, so use + // GetLineRect() instead of GetItemRect() + wxRect r = GetLineRect(i); + + wxCoord x = r.GetRight(), + y = r.GetBottom(); + + if ( x > xMax ) + xMax = x; + if ( y > yMax ) + yMax = y; + } + } + + // some fudge needed to make it look prettier + xMax += 2 * EXTRA_BORDER_X; + yMax += 2 * EXTRA_BORDER_Y; + + // account for the scrollbars if necessary + const wxSize sizeAll = GetClientSize(); + if ( xMax > sizeAll.x ) + yMax += wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y); + if ( yMax > sizeAll.y ) + xMax += wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); + + return wxRect(0, 0, xMax, yMax); +} + +bool +wxListMainWindow::GetSubItemRect(long item, long subItem, wxRect& rect) const +{ + wxCHECK_MSG( subItem == wxLIST_GETSUBITEMRECT_WHOLEITEM || InReportView(), + false, + wxT("GetSubItemRect only meaningful in report view") ); + wxCHECK_MSG( item >= 0 && (size_t)item < GetItemCount(), false, + wxT("invalid item in GetSubItemRect") ); + + // ensure that we're laid out, otherwise we could return nonsense + if ( m_dirty ) + { + wxConstCast(this, wxListMainWindow)-> + RecalculatePositions(true /* no refresh */); + } + + rect = GetLineRect((size_t)item); + + // Adjust rect to specified column + if ( subItem != wxLIST_GETSUBITEMRECT_WHOLEITEM ) + { + wxCHECK_MSG( subItem >= 0 && subItem < GetColumnCount(), false, + wxT("invalid subItem in GetSubItemRect") ); + + for (int i = 0; i < subItem; i++) + { + rect.x += GetColumnWidth(i); + } + rect.width = GetColumnWidth(subItem); + } + + GetListCtrl()->CalcScrolledPosition(rect.x, rect.y, &rect.x, &rect.y); + + return true; +} + +bool wxListMainWindow::GetItemPosition(long item, wxPoint& pos) const +{ + wxRect rect; + GetItemRect(item, rect); + + pos.x = rect.x; + pos.y = rect.y; + + return true; +} + +// ---------------------------------------------------------------------------- +// geometry calculation +// ---------------------------------------------------------------------------- + +void wxListMainWindow::RecalculatePositions(bool noRefresh) +{ + const int lineHeight = GetLineHeight(); + + wxClientDC dc( this ); + dc.SetFont( GetFont() ); + + const size_t count = GetItemCount(); + + int iconSpacing; + if ( HasFlag(wxLC_ICON) && m_normal_image_list ) + iconSpacing = m_normal_spacing; + else if ( HasFlag(wxLC_SMALL_ICON) && m_small_image_list ) + iconSpacing = m_small_spacing; + else + iconSpacing = 0; + + // Note that we do not call GetClientSize() here but + // GetSize() and subtract the border size for sunken + // borders manually. This is technically incorrect, + // but we need to know the client area's size WITHOUT + // scrollbars here. Since we don't know if there are + // any scrollbars, we use GetSize() instead. Another + // solution would be to call SetScrollbars() here to + // remove the scrollbars and call GetClientSize() then, + // but this might result in flicker and - worse - will + // reset the scrollbars to 0 which is not good at all + // if you resize a dialog/window, but don't want to + // reset the window scrolling. RR. + // Furthermore, we actually do NOT subtract the border + // width as 2 pixels is just the extra space which we + // need around the actual content in the window. Other- + // wise the text would e.g. touch the upper border. RR. + int clientWidth, + clientHeight; + GetSize( &clientWidth, &clientHeight ); + + if ( InReportView() ) + { + // all lines have the same height and we scroll one line per step + int entireHeight = count * lineHeight + LINE_SPACING; + + m_linesPerPage = clientHeight / lineHeight; + + ResetVisibleLinesRange(); + + GetListCtrl()->SetScrollbars( SCROLL_UNIT_X, lineHeight, + GetHeaderWidth() / SCROLL_UNIT_X, + (entireHeight + lineHeight - 1) / lineHeight, + GetListCtrl()->GetScrollPos(wxHORIZONTAL), + GetListCtrl()->GetScrollPos(wxVERTICAL), + true ); + } + else // !report + { + // we have 3 different layout strategies: either layout all items + // horizontally/vertically (wxLC_ALIGN_XXX styles explicitly given) or + // to arrange them in top to bottom, left to right (don't ask me why + // not the other way round...) order + if ( HasFlag(wxLC_ALIGN_LEFT | wxLC_ALIGN_TOP) ) + { + int x = EXTRA_BORDER_X; + int y = EXTRA_BORDER_Y; + + wxCoord widthMax = 0; + + size_t i; + for ( i = 0; i < count; i++ ) + { + wxListLineData *line = GetLine(i); + line->CalculateSize( &dc, iconSpacing ); + line->SetPosition( x, y, iconSpacing ); + + wxSize sizeLine = GetLineSize(i); + + if ( HasFlag(wxLC_ALIGN_TOP) ) + { + if ( sizeLine.x > widthMax ) + widthMax = sizeLine.x; + + y += sizeLine.y; + } + else // wxLC_ALIGN_LEFT + { + x += sizeLine.x + MARGIN_BETWEEN_ROWS; + } + } + + if ( HasFlag(wxLC_ALIGN_TOP) ) + { + // traverse the items again and tweak their sizes so that they are + // all the same in a row + for ( i = 0; i < count; i++ ) + { + wxListLineData *line = GetLine(i); + line->m_gi->ExtendWidth(widthMax); + } + } + + GetListCtrl()->SetScrollbars + ( + SCROLL_UNIT_X, + lineHeight, + (x + SCROLL_UNIT_X) / SCROLL_UNIT_X, + (y + lineHeight) / lineHeight, + GetListCtrl()->GetScrollPos( wxHORIZONTAL ), + GetListCtrl()->GetScrollPos( wxVERTICAL ), + true + ); + } + else // "flowed" arrangement, the most complicated case + { + // at first we try without any scrollbars, if the items don't fit into + // the window, we recalculate after subtracting the space taken by the + // scrollbar + + int entireWidth = 0; + + for (int tries = 0; tries < 2; tries++) + { + entireWidth = 2 * EXTRA_BORDER_X; + + if (tries == 1) + { + // Now we have decided that the items do not fit into the + // client area, so we need a scrollbar + entireWidth += SCROLL_UNIT_X; + } + + int x = EXTRA_BORDER_X; + int y = EXTRA_BORDER_Y; + + // Note that "row" here is vertical, i.e. what is called + // "column" in many other places in wxWidgets. + int maxWidthInThisRow = 0; + + m_linesPerPage = 0; + int currentlyVisibleLines = 0; + + for (size_t i = 0; i < count; i++) + { + currentlyVisibleLines++; + wxListLineData *line = GetLine( i ); + line->CalculateSize( &dc, iconSpacing ); + line->SetPosition( x, y, iconSpacing ); + + wxSize sizeLine = GetLineSize( i ); + + if ( maxWidthInThisRow < sizeLine.x ) + maxWidthInThisRow = sizeLine.x; + + y += sizeLine.y; + if (currentlyVisibleLines > m_linesPerPage) + m_linesPerPage = currentlyVisibleLines; + + // Have we reached the end of the row either because no + // more items would fit or because there are simply no more + // items? + if ( y + sizeLine.y >= clientHeight + || i == count - 1) + { + // Adjust all items in this row to have the same + // width to ensure that they all align horizontally in + // icon view. + if ( HasFlag(wxLC_ICON) || HasFlag(wxLC_SMALL_ICON) ) + { + size_t firstRowLine = i - currentlyVisibleLines + 1; + for (size_t j = firstRowLine; j <= i; j++) + { + GetLine(j)->m_gi->ExtendWidth(maxWidthInThisRow); + } + } + + currentlyVisibleLines = 0; + y = EXTRA_BORDER_Y; + maxWidthInThisRow += MARGIN_BETWEEN_ROWS; + x += maxWidthInThisRow; + entireWidth += maxWidthInThisRow; + maxWidthInThisRow = 0; + } + + if ( (tries == 0) && + (entireWidth + SCROLL_UNIT_X > clientWidth) ) + { + clientHeight -= wxSystemSettings:: + GetMetric(wxSYS_HSCROLL_Y); + m_linesPerPage = 0; + break; + } + + if ( i == count - 1 ) + tries = 1; // Everything fits, no second try required. + } + } + + GetListCtrl()->SetScrollbars + ( + SCROLL_UNIT_X, + lineHeight, + (entireWidth + SCROLL_UNIT_X) / SCROLL_UNIT_X, + 0, + GetListCtrl()->GetScrollPos( wxHORIZONTAL ), + 0, + true + ); + } + } + + if ( !noRefresh ) + { + // FIXME: why should we call it from here? + UpdateCurrent(); + + RefreshAll(); + } +} + +void wxListMainWindow::RefreshAll() +{ + m_dirty = false; + Refresh(); + + wxListHeaderWindow *headerWin = GetListCtrl()->m_headerWin; + if ( headerWin && headerWin->m_dirty ) + { + headerWin->m_dirty = false; + headerWin->Refresh(); + } +} + +void wxListMainWindow::UpdateCurrent() +{ + if ( !HasCurrent() && !IsEmpty() ) + ChangeCurrent(0); +} + +long wxListMainWindow::GetNextItem( long item, + int WXUNUSED(geometry), + int state ) const +{ + long ret = item, + max = GetItemCount(); + wxCHECK_MSG( (ret == -1) || (ret < max), -1, + wxT("invalid listctrl index in GetNextItem()") ); + + // notice that we start with the next item (or the first one if item == -1) + // and this is intentional to allow writing a simple loop to iterate over + // all selected items + ret++; + if ( ret == max ) + // this is not an error because the index was OK initially, + // just no such item + return -1; + + if ( !state ) + // any will do + return (size_t)ret; + + size_t count = GetItemCount(); + for ( size_t line = (size_t)ret; line < count; line++ ) + { + if ( (state & wxLIST_STATE_FOCUSED) && (line == m_current) ) + return line; + + if ( (state & wxLIST_STATE_SELECTED) && IsHighlighted(line) ) + return line; + } + + return -1; +} + +// ---------------------------------------------------------------------------- +// deleting stuff +// ---------------------------------------------------------------------------- + +void wxListMainWindow::DeleteItem( long lindex ) +{ + size_t count = GetItemCount(); + + wxCHECK_RET( (lindex >= 0) && ((size_t)lindex < count), + wxT("invalid item index in DeleteItem") ); + + size_t index = (size_t)lindex; + + // we don't need to adjust the index for the previous items + if ( HasCurrent() && m_current >= index ) + { + // if the current item is being deleted, we want the next one to + // become selected - unless there is no next one - so don't adjust + // m_current in this case + if ( m_current != index || m_current == count - 1 ) + m_current--; + } + + if ( InReportView() ) + { + // mark the Column Max Width cache as dirty if the items in the line + // we're deleting contain the Max Column Width + wxListLineData * const line = GetLine(index); + wxListItemDataList::compatibility_iterator n; + wxListItemData *itemData; + wxListItem item; + int itemWidth; + + for (size_t i = 0; i < m_columns.GetCount(); i++) + { + n = line->m_items.Item( i ); + itemData = n->GetData(); + itemData->GetItem(item); + + itemWidth = GetItemWidthWithImage(&item); + + if (itemWidth >= m_aColWidths.Item(i)->nMaxWidth) + m_aColWidths.Item(i)->bNeedsUpdate = true; + } + + ResetVisibleLinesRange(); + } + + SendNotify( index, wxEVT_LIST_DELETE_ITEM, wxDefaultPosition ); + + if ( IsVirtual() ) + { + m_countVirt--; + m_selStore.OnItemDelete(index); + } + else + { + m_lines.RemoveAt( index ); + } + + // we need to refresh the (vert) scrollbar as the number of items changed + m_dirty = true; + + RefreshAfter(index); +} + +void wxListMainWindow::DeleteColumn( int col ) +{ + wxListHeaderDataList::compatibility_iterator node = m_columns.Item( col ); + + wxCHECK_RET( node, wxT("invalid column index in DeleteColumn()") ); + + m_dirty = true; + delete node->GetData(); + m_columns.Erase( node ); + + if ( !IsVirtual() ) + { + // update all the items + for ( size_t i = 0; i < m_lines.GetCount(); i++ ) + { + wxListLineData * const line = GetLine(i); + + // In the following atypical but possible scenario it can be + // legal to call DeleteColumn() but the items may not have any + // values for it: + // 1. In report view, insert a second column. + // 2. Still in report view, add an item with 2 values. + // 3. Switch to an icon (or list) view. + // 4. Add an item -- necessarily with 1 value only. + // 5. Switch back to report view. + // 6. Call DeleteColumn(). + // So we need to check for this as otherwise we would simply crash + // if this happens. + if ( line->m_items.GetCount() <= static_cast(col) ) + continue; + + wxListItemDataList::compatibility_iterator n = line->m_items.Item( col ); + delete n->GetData(); + line->m_items.Erase(n); + } + } + + if ( InReportView() ) // we only cache max widths when in Report View + { + delete m_aColWidths.Item(col); + m_aColWidths.RemoveAt(col); + } + + // invalidate it as it has to be recalculated + m_headerWidth = 0; +} + +void wxListMainWindow::DoDeleteAllItems() +{ + if ( IsEmpty() ) + // nothing to do - in particular, don't send the event + return; + + ResetCurrent(); + + // to make the deletion of all items faster, we don't send the + // notifications for each item deletion in this case but only one event + // for all of them: this is compatible with wxMSW and documented in + // DeleteAllItems() description + + wxListEvent event( wxEVT_LIST_DELETE_ALL_ITEMS, GetParent()->GetId() ); + event.SetEventObject( GetParent() ); + GetParent()->GetEventHandler()->ProcessEvent( event ); + + if ( IsVirtual() ) + { + m_countVirt = 0; + m_selStore.Clear(); + } + + if ( InReportView() ) + { + ResetVisibleLinesRange(); + for (size_t i = 0; i < m_aColWidths.GetCount(); i++) + { + m_aColWidths.Item(i)->bNeedsUpdate = true; + } + } + + m_lines.Clear(); +} + +void wxListMainWindow::DeleteAllItems() +{ + DoDeleteAllItems(); + + RecalculatePositions(); +} + +void wxListMainWindow::DeleteEverything() +{ + WX_CLEAR_LIST(wxListHeaderDataList, m_columns); + WX_CLEAR_ARRAY(m_aColWidths); + + DeleteAllItems(); +} + +// ---------------------------------------------------------------------------- +// scanning for an item +// ---------------------------------------------------------------------------- + +void wxListMainWindow::EnsureVisible( long index ) +{ + wxCHECK_RET( index >= 0 && (size_t)index < GetItemCount(), + wxT("invalid index in EnsureVisible") ); + + // We have to call this here because the label in question might just have + // been added and its position is not known yet + if ( m_dirty ) + RecalculatePositions(true /* no refresh */); + + MoveToItem((size_t)index); +} + +long wxListMainWindow::FindItem(long start, const wxString& str, bool partial ) +{ + if (str.empty()) + return wxNOT_FOUND; + + long pos = start; + wxString str_upper = str.Upper(); + if (pos < 0) + pos = 0; + + size_t count = GetItemCount(); + for ( size_t i = (size_t)pos; i < count; i++ ) + { + wxListLineData *line = GetLine(i); + wxString line_upper = line->GetText(0).Upper(); + if (!partial) + { + if (line_upper == str_upper ) + return i; + } + else + { + if (line_upper.find(str_upper) == 0) + return i; + } + } + + return wxNOT_FOUND; +} + +long wxListMainWindow::FindItem(long start, wxUIntPtr data) +{ + long pos = start; + if (pos < 0) + pos = 0; + + size_t count = GetItemCount(); + for (size_t i = (size_t)pos; i < count; i++) + { + wxListLineData *line = GetLine(i); + wxListItem item; + line->GetItem( 0, item ); + if (item.m_data == data) + return i; + } + + return wxNOT_FOUND; +} + +long wxListMainWindow::FindItem( const wxPoint& pt ) +{ + size_t topItem; + GetVisibleLinesRange( &topItem, NULL ); + + wxPoint p; + GetItemPosition( GetItemCount() - 1, p ); + if ( p.y == 0 ) + return topItem; + + long id = (long)floor( pt.y * double(GetItemCount() - topItem - 1) / p.y + topItem ); + if ( id >= 0 && id < (long)GetItemCount() ) + return id; + + return wxNOT_FOUND; +} + +long wxListMainWindow::HitTest( int x, int y, int &flags ) const +{ + GetListCtrl()->CalcUnscrolledPosition( x, y, &x, &y ); + + size_t count = GetItemCount(); + + if ( InReportView() ) + { + size_t current = y / GetLineHeight(); + if ( current < count ) + { + flags = HitTestLine(current, x, y); + if ( flags ) + return current; + } + } + else // !report + { + // TODO: optimize it too! this is less simple than for report view but + // enumerating all items is still not a way to do it!! + for ( size_t current = 0; current < count; current++ ) + { + flags = HitTestLine(current, x, y); + if ( flags ) + return current; + } + } + + return wxNOT_FOUND; +} + +// ---------------------------------------------------------------------------- +// adding stuff +// ---------------------------------------------------------------------------- + +void wxListMainWindow::InsertItem( wxListItem &item ) +{ + wxASSERT_MSG( !IsVirtual(), wxT("can't be used with virtual control") ); + + int count = GetItemCount(); + wxCHECK_RET( item.m_itemId >= 0, wxT("invalid item index") ); + + if (item.m_itemId > count) + item.m_itemId = count; + + size_t id = item.m_itemId; + + m_dirty = true; + + if ( InReportView() ) + { + ResetVisibleLinesRange(); + + const unsigned col = item.GetColumn(); + wxCHECK_RET( col < m_aColWidths.size(), "invalid item column" ); + + // calculate the width of the item and adjust the max column width + wxColWidthInfo *pWidthInfo = m_aColWidths.Item(col); + int width = GetItemWidthWithImage(&item); + item.SetWidth(width); + if (width > pWidthInfo->nMaxWidth) + pWidthInfo->nMaxWidth = width; + } + + wxListLineData *line = new wxListLineData(this); + + line->SetItem( item.m_col, item ); + if ( item.m_mask & wxLIST_MASK_IMAGE ) + { + // Reset the buffered height if it's not big enough for the new image. + int image = item.GetImage(); + if ( m_small_image_list && image != -1 && InReportView() ) + { + int imageWidth, imageHeight; + m_small_image_list->GetSize(image, imageWidth, imageHeight); + + if ( imageHeight > m_lineHeight ) + m_lineHeight = 0; + } + } + + m_lines.Insert( line, id ); + + m_dirty = true; + + // If an item is selected at or below the point of insertion, we need to + // increment the member variables because the current row's index has gone + // up by one + if ( HasCurrent() && m_current >= id ) + m_current++; + + SendNotify(id, wxEVT_LIST_INSERT_ITEM); + + RefreshLines(id, GetItemCount() - 1); +} + +long wxListMainWindow::InsertColumn( long col, const wxListItem &item ) +{ + long idx = -1; + + m_dirty = true; + if ( InReportView() ) + { + wxListHeaderData *column = new wxListHeaderData( item ); + if (item.m_width == wxLIST_AUTOSIZE_USEHEADER) + column->SetWidth(ComputeMinHeaderWidth(column)); + + wxColWidthInfo *colWidthInfo = new wxColWidthInfo(); + + bool insert = (col >= 0) && ((size_t)col < m_columns.GetCount()); + if ( insert ) + { + wxListHeaderDataList::compatibility_iterator + node = m_columns.Item( col ); + m_columns.Insert( node, column ); + m_aColWidths.Insert( colWidthInfo, col ); + idx = col; + } + else + { + idx = m_aColWidths.GetCount(); + m_columns.Append( column ); + m_aColWidths.Add( colWidthInfo ); + } + + if ( !IsVirtual() ) + { + // update all the items + for ( size_t i = 0; i < m_lines.GetCount(); i++ ) + { + wxListLineData * const line = GetLine(i); + wxListItemData * const data = new wxListItemData(this); + if ( insert ) + line->m_items.Insert(col, data); + else + line->m_items.Append(data); + } + } + + // invalidate it as it has to be recalculated + m_headerWidth = 0; + } + return idx; +} + +int wxListMainWindow::GetItemWidthWithImage(wxListItem * item) +{ + int width = 0; + wxClientDC dc(this); + + dc.SetFont( GetFont() ); + + if (item->GetImage() != -1) + { + int ix, iy; + GetImageSize( item->GetImage(), ix, iy ); + width += ix + 5; + } + + if (!item->GetText().empty()) + { + wxCoord w; + dc.GetTextExtent( item->GetText(), &w, NULL ); + width += w; + } + + return width; +} + +// ---------------------------------------------------------------------------- +// sorting +// ---------------------------------------------------------------------------- + +static wxListCtrlCompare list_ctrl_compare_func_2; +static wxIntPtr list_ctrl_compare_data; + +int LINKAGEMODE list_ctrl_compare_func_1( wxListLineData **arg1, wxListLineData **arg2 ) +{ + wxListLineData *line1 = *arg1; + wxListLineData *line2 = *arg2; + wxListItem item; + line1->GetItem( 0, item ); + wxUIntPtr data1 = item.m_data; + line2->GetItem( 0, item ); + wxUIntPtr data2 = item.m_data; + return list_ctrl_compare_func_2( data1, data2, list_ctrl_compare_data ); +} + +void wxListMainWindow::SortItems( wxListCtrlCompare fn, wxIntPtr data ) +{ + // selections won't make sense any more after sorting the items so reset + // them + HighlightAll(false); + ResetCurrent(); + + list_ctrl_compare_func_2 = fn; + list_ctrl_compare_data = data; + m_lines.Sort( list_ctrl_compare_func_1 ); + m_dirty = true; +} + +// ---------------------------------------------------------------------------- +// scrolling +// ---------------------------------------------------------------------------- + +void wxListMainWindow::OnScroll(wxScrollWinEvent& event) +{ + // update our idea of which lines are shown when we redraw the window the + // next time + ResetVisibleLinesRange(); + + if ( event.GetOrientation() == wxHORIZONTAL && HasHeader() ) + { + wxGenericListCtrl* lc = GetListCtrl(); + wxCHECK_RET( lc, wxT("no listctrl window?") ); + + if (lc->m_headerWin) // when we use wxLC_NO_HEADER, m_headerWin==NULL + { + lc->m_headerWin->Refresh(); + lc->m_headerWin->Update(); + } + } +} + +int wxListMainWindow::GetCountPerPage() const +{ + if ( !m_linesPerPage ) + { + wxConstCast(this, wxListMainWindow)-> + m_linesPerPage = GetClientSize().y / GetLineHeight(); + } + + return m_linesPerPage; +} + +void wxListMainWindow::GetVisibleLinesRange(size_t *from, size_t *to) +{ + wxASSERT_MSG( InReportView(), wxT("this is for report mode only") ); + + if ( m_lineFrom == (size_t)-1 ) + { + size_t count = GetItemCount(); + if ( count ) + { + m_lineFrom = GetListCtrl()->GetScrollPos(wxVERTICAL); + + // this may happen if SetScrollbars() hadn't been called yet + if ( m_lineFrom >= count ) + m_lineFrom = count - 1; + + // we redraw one extra line but this is needed to make the redrawing + // logic work when there is a fractional number of lines on screen + m_lineTo = m_lineFrom + m_linesPerPage; + if ( m_lineTo >= count ) + m_lineTo = count - 1; + } + else // empty control + { + m_lineFrom = 0; + m_lineTo = (size_t)-1; + } + } + + wxASSERT_MSG( IsEmpty() || + (m_lineFrom <= m_lineTo && m_lineTo < GetItemCount()), + wxT("GetVisibleLinesRange() returns incorrect result") ); + + if ( from ) + *from = m_lineFrom; + if ( to ) + *to = m_lineTo; +} + +size_t +wxListMainWindow::PrefixFindItem(size_t idParent, + const wxString& prefixOrig) const +{ + // if no items then just return + if ( idParent == (size_t)-1 ) + return idParent; + + // match is case insensitive as this is more convenient to the user: having + // to press Shift-letter to go to the item starting with a capital letter + // would be too bothersome + wxString prefix = prefixOrig.Lower(); + + // determine the starting point: we shouldn't take the current item (this + // allows to switch between two items starting with the same letter just by + // pressing it) but we shouldn't jump to the next one if the user is + // continuing to type as otherwise he might easily skip the item he wanted + size_t itemid = idParent; + if ( prefix.length() == 1 ) + { + itemid += 1; + } + + // look for the item starting with the given prefix after it + while ( ( itemid < (size_t)GetItemCount() ) && + !GetLine(itemid)->GetText(0).Lower().StartsWith(prefix) ) + { + itemid += 1; + } + + // if we haven't found anything... + if ( !( itemid < (size_t)GetItemCount() ) ) + { + // ... wrap to the beginning + itemid = 0; + + // and try all the items (stop when we get to the one we started from) + while ( ( itemid < (size_t)GetItemCount() ) && itemid != idParent && + !GetLine(itemid)->GetText(0).Lower().StartsWith(prefix) ) + { + itemid += 1; + } + // If we haven't found the item, id will be (size_t)-1, as per + // documentation + if ( !( itemid < (size_t)GetItemCount() ) || + ( ( itemid == idParent ) && + !GetLine(itemid)->GetText(0).Lower().StartsWith(prefix) ) ) + { + itemid = (size_t)-1; + } + } + + return itemid; +} + +// ------------------------------------------------------------------------------------- +// wxGenericListCtrl +// ------------------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGenericListCtrl, wxControl) + +BEGIN_EVENT_TABLE(wxGenericListCtrl,wxListCtrlBase) + EVT_SIZE(wxGenericListCtrl::OnSize) + EVT_SCROLLWIN(wxGenericListCtrl::OnScroll) +END_EVENT_TABLE() + +void wxGenericListCtrl::Init() +{ + m_imageListNormal = NULL; + m_imageListSmall = NULL; + m_imageListState = NULL; + + m_ownsImageListNormal = + m_ownsImageListSmall = + m_ownsImageListState = false; + + m_mainWin = NULL; + m_headerWin = NULL; +} + +wxGenericListCtrl::~wxGenericListCtrl() +{ + if (m_ownsImageListNormal) + delete m_imageListNormal; + if (m_ownsImageListSmall) + delete m_imageListSmall; + if (m_ownsImageListState) + delete m_imageListState; +} + +void wxGenericListCtrl::CreateOrDestroyHeaderWindowAsNeeded() +{ + bool needs_header = HasHeader(); + bool has_header = (m_headerWin != NULL); + + if (needs_header == has_header) + return; + + if (needs_header) + { + // Notice that we must initialize m_headerWin first, and create the + // real window only later, so that the test in the beginning of the + // function blocks repeated creation of the header as it could happen + // before via wxNavigationEnabled::AddChild() -> ToggleWindowStyle() -> + // SetWindowStyleFlag(). + m_headerWin = new wxListHeaderWindow(); + m_headerWin->Create + ( + this, wxID_ANY, m_mainWin, + wxPoint(0,0), + wxSize + ( + GetClientSize().x, + wxRendererNative::Get().GetHeaderButtonHeight(this) + ), + wxTAB_TRAVERSAL + ); + +#if defined( __WXMAC__ ) + static wxFont font( wxOSX_SYSTEM_FONT_SMALL ); + m_headerWin->SetFont( font ); +#endif + + GetSizer()->Prepend( m_headerWin, 0, wxGROW ); + } + else + { + GetSizer()->Detach( m_headerWin ); + + wxDELETE(m_headerWin); + } +} + +bool wxGenericListCtrl::Create(wxWindow *parent, + wxWindowID id, + const wxPoint &pos, + const wxSize &size, + long style, + const wxValidator &validator, + const wxString &name) +{ + Init(); + + // just like in other ports, an assert will fail if the user doesn't give any type style: + wxASSERT_MSG( (style & wxLC_MASK_TYPE), + wxT("wxListCtrl style should have exactly one mode bit set") ); + + if ( !wxListCtrlBase::Create( parent, id, pos, size, + style | wxVSCROLL | wxHSCROLL, + validator, name ) ) + return false; + + m_mainWin = new wxListMainWindow(this, wxID_ANY, wxPoint(0, 0), size); + + SetTargetWindow( m_mainWin ); + + // We use the cursor keys for moving the selection, not scrolling, so call + // this method to ensure wxScrollHelperEvtHandler doesn't catch all + // keyboard events forwarded to us from wxListMainWindow. + DisableKeyboardScrolling(); + + wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL ); + sizer->Add( m_mainWin, 1, wxGROW ); + SetSizer( sizer ); + + CreateOrDestroyHeaderWindowAsNeeded(); + + SetInitialSize(size); + + return true; +} + +wxBorder wxGenericListCtrl::GetDefaultBorder() const +{ + return wxBORDER_THEME; +} + +#if defined(__WXMSW__) && !defined(__WXWINCE__) && !defined(__WXUNIVERSAL__) +WXLRESULT wxGenericListCtrl::MSWWindowProc(WXUINT nMsg, + WXWPARAM wParam, + WXLPARAM lParam) +{ + WXLRESULT rc = wxListCtrlBase::MSWWindowProc(nMsg, wParam, lParam); + + // we need to process arrows ourselves for scrolling + if ( nMsg == WM_GETDLGCODE ) + { + rc |= DLGC_WANTARROWS; + } + + return rc; +} +#endif // __WXMSW__ + +wxSize wxGenericListCtrl::GetSizeAvailableForScrollTarget(const wxSize& size) +{ + wxSize newsize = size; + if (m_headerWin) + newsize.y -= m_headerWin->GetSize().y; + + return newsize; +} + +void wxGenericListCtrl::OnScroll(wxScrollWinEvent& event) +{ + // update our idea of which lines are shown when we redraw + // the window the next time + m_mainWin->ResetVisibleLinesRange(); + + if ( event.GetOrientation() == wxHORIZONTAL && HasHeader() ) + { + m_headerWin->Refresh(); + m_headerWin->Update(); + } + + // Let the window be scrolled as usual by the default handler. + event.Skip(); +} + +void wxGenericListCtrl::SetSingleStyle( long style, bool add ) +{ + wxASSERT_MSG( !(style & wxLC_VIRTUAL), + wxT("wxLC_VIRTUAL can't be [un]set") ); + + long flag = GetWindowStyle(); + + if (add) + { + if (style & wxLC_MASK_TYPE) + flag &= ~(wxLC_MASK_TYPE | wxLC_VIRTUAL); + if (style & wxLC_MASK_ALIGN) + flag &= ~wxLC_MASK_ALIGN; + if (style & wxLC_MASK_SORT) + flag &= ~wxLC_MASK_SORT; + } + + if (add) + flag |= style; + else + flag &= ~style; + + // some styles can be set without recreating everything (as happens in + // SetWindowStyleFlag() which calls wxListMainWindow::DeleteEverything()) + if ( !(style & ~(wxLC_HRULES | wxLC_VRULES)) ) + { + Refresh(); + wxWindow::SetWindowStyleFlag(flag); + } + else + { + SetWindowStyleFlag( flag ); + } +} + +void wxGenericListCtrl::SetWindowStyleFlag( long flag ) +{ + // we add wxHSCROLL and wxVSCROLL in ctor unconditionally and it never + // makes sense to remove them as we'll always add scrollbars anyhow when + // needed + flag |= wxHSCROLL | wxVSCROLL; + + const bool wasInReportView = HasFlag(wxLC_REPORT); + + // update the window style first so that the header is created or destroyed + // corresponding to the new style + wxWindow::SetWindowStyleFlag( flag ); + + if (m_mainWin) + { + const bool inReportView = (flag & wxLC_REPORT) != 0; + if ( inReportView != wasInReportView ) + { + // we need to notify the main window about this change as it must + // update its data structures + m_mainWin->SetReportView(inReportView); + } + + // m_mainWin->DeleteEverything(); wxMSW doesn't do that + + CreateOrDestroyHeaderWindowAsNeeded(); + + GetSizer()->Layout(); + } +} + +bool wxGenericListCtrl::GetColumn(int col, wxListItem &item) const +{ + m_mainWin->GetColumn( col, item ); + return true; +} + +bool wxGenericListCtrl::SetColumn( int col, const wxListItem& item ) +{ + m_mainWin->SetColumn( col, item ); + return true; +} + +int wxGenericListCtrl::GetColumnWidth( int col ) const +{ + return m_mainWin->GetColumnWidth( col ); +} + +bool wxGenericListCtrl::SetColumnWidth( int col, int width ) +{ + m_mainWin->SetColumnWidth( col, width ); + return true; +} + +int wxGenericListCtrl::GetCountPerPage() const +{ + return m_mainWin->GetCountPerPage(); // different from Windows ? +} + +bool wxGenericListCtrl::GetItem( wxListItem &info ) const +{ + m_mainWin->GetItem( info ); + return true; +} + +bool wxGenericListCtrl::SetItem( wxListItem &info ) +{ + m_mainWin->SetItem( info ); + return true; +} + +long wxGenericListCtrl::SetItem( long index, int col, const wxString& label, int imageId ) +{ + wxListItem info; + info.m_text = label; + info.m_mask = wxLIST_MASK_TEXT; + info.m_itemId = index; + info.m_col = col; + if ( imageId > -1 ) + { + info.m_image = imageId; + info.m_mask |= wxLIST_MASK_IMAGE; + } + + m_mainWin->SetItem(info); + return true; +} + +int wxGenericListCtrl::GetItemState( long item, long stateMask ) const +{ + return m_mainWin->GetItemState( item, stateMask ); +} + +bool wxGenericListCtrl::SetItemState( long item, long state, long stateMask ) +{ + m_mainWin->SetItemState( item, state, stateMask ); + return true; +} + +bool +wxGenericListCtrl::SetItemImage( long item, int image, int WXUNUSED(selImage) ) +{ + return SetItemColumnImage(item, 0, image); +} + +bool +wxGenericListCtrl::SetItemColumnImage( long item, long column, int image ) +{ + wxListItem info; + info.m_image = image; + info.m_mask = wxLIST_MASK_IMAGE; + info.m_itemId = item; + info.m_col = column; + m_mainWin->SetItem( info ); + return true; +} + +wxString wxGenericListCtrl::GetItemText( long item, int col ) const +{ + return m_mainWin->GetItemText(item, col); +} + +void wxGenericListCtrl::SetItemText( long item, const wxString& str ) +{ + m_mainWin->SetItemText(item, str); +} + +wxUIntPtr wxGenericListCtrl::GetItemData( long item ) const +{ + wxListItem info; + info.m_mask = wxLIST_MASK_DATA; + info.m_itemId = item; + m_mainWin->GetItem( info ); + return info.m_data; +} + +bool wxGenericListCtrl::SetItemPtrData( long item, wxUIntPtr data ) +{ + wxListItem info; + info.m_mask = wxLIST_MASK_DATA; + info.m_itemId = item; + info.m_data = data; + m_mainWin->SetItem( info ); + return true; +} + +wxRect wxGenericListCtrl::GetViewRect() const +{ + return m_mainWin->GetViewRect(); +} + +bool wxGenericListCtrl::GetItemRect(long item, wxRect& rect, int code) const +{ + return GetSubItemRect(item, wxLIST_GETSUBITEMRECT_WHOLEITEM, rect, code); +} + +bool wxGenericListCtrl::GetSubItemRect(long item, + long subItem, + wxRect& rect, + int WXUNUSED(code)) const +{ + if ( !m_mainWin->GetSubItemRect( item, subItem, rect ) ) + return false; + + if ( m_mainWin->HasHeader() ) + rect.y += m_headerWin->GetSize().y + 1; + + return true; +} + +bool wxGenericListCtrl::GetItemPosition( long item, wxPoint& pos ) const +{ + m_mainWin->GetItemPosition( item, pos ); + return true; +} + +bool wxGenericListCtrl::SetItemPosition( long WXUNUSED(item), const wxPoint& WXUNUSED(pos) ) +{ + return false; +} + +int wxGenericListCtrl::GetItemCount() const +{ + return m_mainWin->GetItemCount(); +} + +int wxGenericListCtrl::GetColumnCount() const +{ + return m_mainWin->GetColumnCount(); +} + +void wxGenericListCtrl::SetItemSpacing( int spacing, bool isSmall ) +{ + m_mainWin->SetItemSpacing( spacing, isSmall ); +} + +wxSize wxGenericListCtrl::GetItemSpacing() const +{ + const int spacing = m_mainWin->GetItemSpacing(HasFlag(wxLC_SMALL_ICON)); + + return wxSize(spacing, spacing); +} + +#if WXWIN_COMPATIBILITY_2_6 +int wxGenericListCtrl::GetItemSpacing( bool isSmall ) const +{ + return m_mainWin->GetItemSpacing( isSmall ); +} +#endif // WXWIN_COMPATIBILITY_2_6 + +void wxGenericListCtrl::SetItemTextColour( long item, const wxColour &col ) +{ + wxListItem info; + info.m_itemId = item; + info.SetTextColour( col ); + m_mainWin->SetItem( info ); +} + +wxColour wxGenericListCtrl::GetItemTextColour( long item ) const +{ + wxListItem info; + info.m_itemId = item; + m_mainWin->GetItem( info ); + return info.GetTextColour(); +} + +void wxGenericListCtrl::SetItemBackgroundColour( long item, const wxColour &col ) +{ + wxListItem info; + info.m_itemId = item; + info.SetBackgroundColour( col ); + m_mainWin->SetItem( info ); +} + +wxColour wxGenericListCtrl::GetItemBackgroundColour( long item ) const +{ + wxListItem info; + info.m_itemId = item; + m_mainWin->GetItem( info ); + return info.GetBackgroundColour(); +} + +void wxGenericListCtrl::SetItemFont( long item, const wxFont &f ) +{ + wxListItem info; + info.m_itemId = item; + info.SetFont( f ); + m_mainWin->SetItem( info ); +} + +wxFont wxGenericListCtrl::GetItemFont( long item ) const +{ + wxListItem info; + info.m_itemId = item; + m_mainWin->GetItem( info ); + return info.GetFont(); +} + +int wxGenericListCtrl::GetSelectedItemCount() const +{ + return m_mainWin->GetSelectedItemCount(); +} + +wxColour wxGenericListCtrl::GetTextColour() const +{ + return GetForegroundColour(); +} + +void wxGenericListCtrl::SetTextColour(const wxColour& col) +{ + SetForegroundColour(col); +} + +long wxGenericListCtrl::GetTopItem() const +{ + size_t top; + m_mainWin->GetVisibleLinesRange(&top, NULL); + return (long)top; +} + +long wxGenericListCtrl::GetNextItem( long item, int geom, int state ) const +{ + return m_mainWin->GetNextItem( item, geom, state ); +} + +wxImageList *wxGenericListCtrl::GetImageList(int which) const +{ + if (which == wxIMAGE_LIST_NORMAL) + return m_imageListNormal; + else if (which == wxIMAGE_LIST_SMALL) + return m_imageListSmall; + else if (which == wxIMAGE_LIST_STATE) + return m_imageListState; + + return NULL; +} + +void wxGenericListCtrl::SetImageList( wxImageList *imageList, int which ) +{ + if ( which == wxIMAGE_LIST_NORMAL ) + { + if (m_ownsImageListNormal) + delete m_imageListNormal; + m_imageListNormal = imageList; + m_ownsImageListNormal = false; + } + else if ( which == wxIMAGE_LIST_SMALL ) + { + if (m_ownsImageListSmall) + delete m_imageListSmall; + m_imageListSmall = imageList; + m_ownsImageListSmall = false; + } + else if ( which == wxIMAGE_LIST_STATE ) + { + if (m_ownsImageListState) + delete m_imageListState; + m_imageListState = imageList; + m_ownsImageListState = false; + } + + m_mainWin->SetImageList( imageList, which ); +} + +void wxGenericListCtrl::AssignImageList(wxImageList *imageList, int which) +{ + SetImageList(imageList, which); + if ( which == wxIMAGE_LIST_NORMAL ) + m_ownsImageListNormal = true; + else if ( which == wxIMAGE_LIST_SMALL ) + m_ownsImageListSmall = true; + else if ( which == wxIMAGE_LIST_STATE ) + m_ownsImageListState = true; +} + +bool wxGenericListCtrl::Arrange( int WXUNUSED(flag) ) +{ + return 0; +} + +bool wxGenericListCtrl::DeleteItem( long item ) +{ + m_mainWin->DeleteItem( item ); + return true; +} + +bool wxGenericListCtrl::DeleteAllItems() +{ + m_mainWin->DeleteAllItems(); + return true; +} + +bool wxGenericListCtrl::DeleteAllColumns() +{ + size_t count = m_mainWin->m_columns.GetCount(); + for ( size_t n = 0; n < count; n++ ) + DeleteColumn( 0 ); + return true; +} + +void wxGenericListCtrl::ClearAll() +{ + m_mainWin->DeleteEverything(); +} + +bool wxGenericListCtrl::DeleteColumn( int col ) +{ + m_mainWin->DeleteColumn( col ); + + // if we don't have the header any longer, we need to relayout the window + // if ( !GetColumnCount() ) + + + // Ensure that the non-existent columns are really removed from display. + Refresh(); + + return true; +} + +wxTextCtrl *wxGenericListCtrl::EditLabel(long item, + wxClassInfo* textControlClass) +{ + return m_mainWin->EditLabel( item, textControlClass ); +} + +wxTextCtrl *wxGenericListCtrl::GetEditControl() const +{ + return m_mainWin->GetEditControl(); +} + +bool wxGenericListCtrl::EnsureVisible( long item ) +{ + m_mainWin->EnsureVisible( item ); + return true; +} + +long wxGenericListCtrl::FindItem( long start, const wxString& str, bool partial ) +{ + return m_mainWin->FindItem( start, str, partial ); +} + +long wxGenericListCtrl::FindItem( long start, wxUIntPtr data ) +{ + return m_mainWin->FindItem( start, data ); +} + +long wxGenericListCtrl::FindItem( long WXUNUSED(start), const wxPoint& pt, + int WXUNUSED(direction)) +{ + return m_mainWin->FindItem( pt ); +} + +// TODO: sub item hit testing +long wxGenericListCtrl::HitTest(const wxPoint& point, int& flags, long *) const +{ + return m_mainWin->HitTest( (int)point.x, (int)point.y, flags ); +} + +long wxGenericListCtrl::InsertItem( wxListItem& info ) +{ + m_mainWin->InsertItem( info ); + return info.m_itemId; +} + +long wxGenericListCtrl::InsertItem( long index, const wxString &label ) +{ + wxListItem info; + info.m_text = label; + info.m_mask = wxLIST_MASK_TEXT; + info.m_itemId = index; + return InsertItem( info ); +} + +long wxGenericListCtrl::InsertItem( long index, int imageIndex ) +{ + wxListItem info; + info.m_mask = wxLIST_MASK_IMAGE; + info.m_image = imageIndex; + info.m_itemId = index; + return InsertItem( info ); +} + +long wxGenericListCtrl::InsertItem( long index, const wxString &label, int imageIndex ) +{ + wxListItem info; + info.m_text = label; + info.m_image = imageIndex; + info.m_mask = wxLIST_MASK_TEXT; + if (imageIndex > -1) + info.m_mask |= wxLIST_MASK_IMAGE; + info.m_itemId = index; + return InsertItem( info ); +} + +long wxGenericListCtrl::DoInsertColumn( long col, const wxListItem &item ) +{ + wxCHECK_MSG( InReportView(), -1, wxT("can't add column in non report mode") ); + + long idx = m_mainWin->InsertColumn( col, item ); + + // NOTE: if wxLC_NO_HEADER was given, then we are in report view mode but + // still have m_headerWin==NULL + if (m_headerWin) + m_headerWin->Refresh(); + + return idx; +} + +bool wxGenericListCtrl::ScrollList( int dx, int dy ) +{ + return m_mainWin->ScrollList(dx, dy); +} + +// Sort items. +// fn is a function which takes 3 long arguments: item1, item2, data. +// item1 is the long data associated with a first item (NOT the index). +// item2 is the long data associated with a second item (NOT the index). +// data is the same value as passed to SortItems. +// The return value is a negative number if the first item should precede the second +// item, a positive number of the second item should precede the first, +// or zero if the two items are equivalent. +// data is arbitrary data to be passed to the sort function. + +bool wxGenericListCtrl::SortItems( wxListCtrlCompare fn, wxIntPtr data ) +{ + m_mainWin->SortItems( fn, data ); + return true; +} + +// ---------------------------------------------------------------------------- +// event handlers +// ---------------------------------------------------------------------------- + +void wxGenericListCtrl::OnSize(wxSizeEvent& WXUNUSED(event)) +{ + if (!m_mainWin) return; + + // We need to override OnSize so that our scrolled + // window a) does call Layout() to use sizers for + // positioning the controls but b) does not query + // the sizer for their size and use that for setting + // the scrollable area as set that ourselves by + // calling SetScrollbar() further down. + + Layout(); + + m_mainWin->RecalculatePositions(); + + AdjustScrollbars(); +} + +void wxGenericListCtrl::OnInternalIdle() +{ + wxWindow::OnInternalIdle(); + + if (m_mainWin->m_dirty) + m_mainWin->RecalculatePositions(); +} + +// ---------------------------------------------------------------------------- +// font/colours +// ---------------------------------------------------------------------------- + +bool wxGenericListCtrl::SetBackgroundColour( const wxColour &colour ) +{ + if (m_mainWin) + { + m_mainWin->SetBackgroundColour( colour ); + m_mainWin->m_dirty = true; + } + + return true; +} + +bool wxGenericListCtrl::SetForegroundColour( const wxColour &colour ) +{ + if ( !wxWindow::SetForegroundColour( colour ) ) + return false; + + if (m_mainWin) + { + m_mainWin->SetForegroundColour( colour ); + m_mainWin->m_dirty = true; + } + + return true; +} + +bool wxGenericListCtrl::SetFont( const wxFont &font ) +{ + if ( !wxWindow::SetFont( font ) ) + return false; + + if (m_mainWin) + { + m_mainWin->SetFont( font ); + m_mainWin->m_dirty = true; + } + + if (m_headerWin) + { + m_headerWin->SetFont( font ); + // CalculateAndSetHeaderHeight(); + } + + Refresh(); + + return true; +} + +// static +wxVisualAttributes +wxGenericListCtrl::GetClassDefaultAttributes(wxWindowVariant variant) +{ +#if _USE_VISATTR + // Use the same color scheme as wxListBox + return wxListBox::GetClassDefaultAttributes(variant); +#else + wxUnusedVar(variant); + wxVisualAttributes attr; + attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT); + attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX); + attr.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + return attr; +#endif +} + +// ---------------------------------------------------------------------------- +// methods forwarded to m_mainWin +// ---------------------------------------------------------------------------- + +#if wxUSE_DRAG_AND_DROP + +void wxGenericListCtrl::SetDropTarget( wxDropTarget *dropTarget ) +{ + m_mainWin->SetDropTarget( dropTarget ); +} + +wxDropTarget *wxGenericListCtrl::GetDropTarget() const +{ + return m_mainWin->GetDropTarget(); +} + +#endif + +bool wxGenericListCtrl::SetCursor( const wxCursor &cursor ) +{ + return m_mainWin ? m_mainWin->wxWindow::SetCursor(cursor) : false; +} + +wxColour wxGenericListCtrl::GetBackgroundColour() const +{ + return m_mainWin ? m_mainWin->GetBackgroundColour() : wxColour(); +} + +wxColour wxGenericListCtrl::GetForegroundColour() const +{ + return m_mainWin ? m_mainWin->GetForegroundColour() : wxColour(); +} + +bool wxGenericListCtrl::DoPopupMenu( wxMenu *menu, int x, int y ) +{ +#if wxUSE_MENUS + return m_mainWin->PopupMenu( menu, x, y ); +#else + return false; +#endif +} + +wxSize wxGenericListCtrl::DoGetBestClientSize() const +{ + // The base class version can compute the best size in report view only. + wxSize sizeBest = wxListCtrlBase::DoGetBestClientSize(); + + if ( !InReportView() ) + { + // Ensure that our minimal width is at least big enough to show all our + // items. This is important for wxListbook to size itself correctly. + + // Remember the offset of the first item: this corresponds to the + // margins around the item so we will add it to the minimal size below + // to ensure that we have equal margins on all sides. + wxPoint ofs; + + // We can iterate over all items as there shouldn't be too many of them + // in non-report view. If it ever becomes a problem, we could examine + // just the first few items probably, the determination of the best + // size is less important if we will need scrollbars anyhow. + for ( int n = 0; n < GetItemCount(); n++ ) + { + const wxRect itemRect = m_mainWin->GetLineRect(n); + if ( !n ) + { + // Remember the position of the first item as all the rest are + // offset by at least this number of pixels too. + ofs = itemRect.GetPosition(); + } + + sizeBest.IncTo(itemRect.GetSize()); + } + + sizeBest.IncBy(2*ofs); + + + // If we have the scrollbars we need to account for them too. And to + // make sure the scrollbars status is up to date we need to call this + // function to set them. + m_mainWin->RecalculatePositions(true /* no refresh */); + + // Unfortunately we can't use wxWindow::HasScrollbar() here as we need + // to use m_mainWin client/virtual size for determination of whether we + // use scrollbars and not the size of this window itself. Maybe that + // function should be extended to work correctly in the case when our + // scrollbars manage a different window from this one but currently it + // doesn't work. + const wxSize sizeClient = m_mainWin->GetClientSize(); + const wxSize sizeVirt = m_mainWin->GetVirtualSize(); + + if ( sizeVirt.x > sizeClient.x /* HasScrollbar(wxHORIZONTAL) */ ) + sizeBest.y += wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y); + + if ( sizeVirt.y > sizeClient.y /* HasScrollbar(wxVERTICAL) */ ) + sizeBest.x += wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); + } + + return sizeBest; +} + +// ---------------------------------------------------------------------------- +// virtual list control support +// ---------------------------------------------------------------------------- + +wxString wxGenericListCtrl::OnGetItemText(long WXUNUSED(item), long WXUNUSED(col)) const +{ + // this is a pure virtual function, in fact - which is not really pure + // because the controls which are not virtual don't need to implement it + wxFAIL_MSG( wxT("wxGenericListCtrl::OnGetItemText not supposed to be called") ); + + return wxEmptyString; +} + +int wxGenericListCtrl::OnGetItemImage(long WXUNUSED(item)) const +{ + wxCHECK_MSG(!GetImageList(wxIMAGE_LIST_SMALL), + -1, + wxT("List control has an image list, OnGetItemImage or OnGetItemColumnImage should be overridden.")); + return -1; +} + +int wxGenericListCtrl::OnGetItemColumnImage(long item, long column) const +{ + if (!column) + return OnGetItemImage(item); + + return -1; +} + +void wxGenericListCtrl::SetItemCount(long count) +{ + wxASSERT_MSG( IsVirtual(), wxT("this is for virtual controls only") ); + + m_mainWin->SetItemCount(count); +} + +void wxGenericListCtrl::RefreshItem(long item) +{ + m_mainWin->RefreshLine(item); +} + +void wxGenericListCtrl::RefreshItems(long itemFrom, long itemTo) +{ + m_mainWin->RefreshLines(itemFrom, itemTo); +} + +void wxGenericListCtrl::EnableBellOnNoMatch( bool on ) +{ + m_mainWin->EnableBellOnNoMatch(on); +} + +// Generic wxListCtrl is more or less a container for two other +// windows which drawings are done upon. These are namely +// 'm_headerWin' and 'm_mainWin'. +// Here we override 'virtual wxWindow::Refresh()' to mimic the +// behaviour wxListCtrl has under wxMSW. +// +void wxGenericListCtrl::Refresh(bool eraseBackground, const wxRect *rect) +{ + if (!rect) + { + // The easy case, no rectangle specified. + if (m_headerWin) + m_headerWin->Refresh(eraseBackground); + + if (m_mainWin) + m_mainWin->Refresh(eraseBackground); + } + else + { + // Refresh the header window + if (m_headerWin) + { + wxRect rectHeader = m_headerWin->GetRect(); + rectHeader.Intersect(*rect); + if (rectHeader.GetWidth() && rectHeader.GetHeight()) + { + int x, y; + m_headerWin->GetPosition(&x, &y); + rectHeader.Offset(-x, -y); + m_headerWin->Refresh(eraseBackground, &rectHeader); + } + } + + // Refresh the main window + if (m_mainWin) + { + wxRect rectMain = m_mainWin->GetRect(); + rectMain.Intersect(*rect); + if (rectMain.GetWidth() && rectMain.GetHeight()) + { + int x, y; + m_mainWin->GetPosition(&x, &y); + rectMain.Offset(-x, -y); + m_mainWin->Refresh(eraseBackground, &rectMain); + } + } + } +} + +void wxGenericListCtrl::Update() +{ + if ( m_mainWin ) + { + if ( m_mainWin->m_dirty ) + m_mainWin->RecalculatePositions(); + + m_mainWin->Update(); + } + + if ( m_headerWin ) + m_headerWin->Update(); +} + +#endif // wxUSE_LISTCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/logg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/logg.cpp new file mode 100644 index 0000000000..6204463346 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/logg.cpp @@ -0,0 +1,1090 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/logg.cpp +// Purpose: wxLog-derived classes which need GUI support (the rest is in +// src/common/log.cpp) +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.09.99 (extracted from src/common/log.cpp) +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/button.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/menu.h" + #include "wx/frame.h" + #include "wx/filedlg.h" + #include "wx/msgdlg.h" + #include "wx/textctrl.h" + #include "wx/sizer.h" + #include "wx/statbmp.h" + #include "wx/settings.h" + #include "wx/wxcrtvararg.h" +#endif // WX_PRECOMP + +#if wxUSE_LOGGUI || wxUSE_LOGWINDOW + +#include "wx/file.h" +#include "wx/clipbrd.h" +#include "wx/dataobj.h" +#include "wx/textfile.h" +#include "wx/statline.h" +#include "wx/artprov.h" +#include "wx/collpane.h" +#include "wx/arrstr.h" +#include "wx/msgout.h" + +#ifdef __WXMSW__ + // for OutputDebugString() + #include "wx/msw/private.h" +#endif // Windows + + +#ifdef __WXPM__ + #include +#endif + +#if wxUSE_LOG_DIALOG + #include "wx/listctrl.h" + #include "wx/imaglist.h" + #include "wx/image.h" +#endif // wxUSE_LOG_DIALOG/!wxUSE_LOG_DIALOG + +#include "wx/time.h" + +// the suffix we add to the button to show that the dialog can be expanded +#define EXPAND_SUFFIX wxT(" >>") + +#define CAN_SAVE_FILES (wxUSE_FILE && wxUSE_FILEDLG) + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +#if wxUSE_LOG_DIALOG + +// this function is a wrapper around strftime(3) +// allows to exclude the usage of wxDateTime +static wxString TimeStamp(const wxString& format, time_t t) +{ + wxChar buf[4096]; + struct tm tm; + if ( !wxStrftime(buf, WXSIZEOF(buf), format, wxLocaltime_r(&t, &tm)) ) + { + // buffer is too small? + wxFAIL_MSG(wxT("strftime() failed")); + } + return wxString(buf); +} + + +class wxLogDialog : public wxDialog +{ +public: + wxLogDialog(wxWindow *parent, + const wxArrayString& messages, + const wxArrayInt& severity, + const wxArrayLong& timess, + const wxString& caption, + long style); + virtual ~wxLogDialog(); + + // event handlers + void OnOk(wxCommandEvent& event); +#if wxUSE_CLIPBOARD + void OnCopy(wxCommandEvent& event); +#endif // wxUSE_CLIPBOARD +#if CAN_SAVE_FILES + void OnSave(wxCommandEvent& event); +#endif // CAN_SAVE_FILES + void OnListItemActivated(wxListEvent& event); + +private: + // create controls needed for the details display + void CreateDetailsControls(wxWindow *); + + // if necessary truncates the given string and adds an ellipsis + wxString EllipsizeString(const wxString &text) + { + if (ms_maxLength > 0 && + text.length() > ms_maxLength) + { + wxString ret(text); + ret.Truncate(ms_maxLength); + ret << "..."; + return ret; + } + + return text; + } + +#if CAN_SAVE_FILES || wxUSE_CLIPBOARD + // return the contents of the dialog as a multiline string + wxString GetLogMessages() const; +#endif // CAN_SAVE_FILES || wxUSE_CLIPBOARD + + + // the data for the listctrl + wxArrayString m_messages; + wxArrayInt m_severity; + wxArrayLong m_times; + + // the controls which are not shown initially (but only when details + // button is pressed) + wxListCtrl *m_listctrl; + + // the translated "Details" string + static wxString ms_details; + + // the maximum length of the log message + static size_t ms_maxLength; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxLogDialog); +}; + +BEGIN_EVENT_TABLE(wxLogDialog, wxDialog) + EVT_BUTTON(wxID_OK, wxLogDialog::OnOk) +#if wxUSE_CLIPBOARD + EVT_BUTTON(wxID_COPY, wxLogDialog::OnCopy) +#endif // wxUSE_CLIPBOARD +#if CAN_SAVE_FILES + EVT_BUTTON(wxID_SAVE, wxLogDialog::OnSave) +#endif // CAN_SAVE_FILES + EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxLogDialog::OnListItemActivated) +END_EVENT_TABLE() + +#endif // wxUSE_LOG_DIALOG + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +#if CAN_SAVE_FILES + +// pass an uninitialized file object, the function will ask the user for the +// filename and try to open it, returns true on success (file was opened), +// false if file couldn't be opened/created and -1 if the file selection +// dialog was cancelled +static int OpenLogFile(wxFile& file, wxString *filename = NULL, wxWindow *parent = NULL); + +#endif // CAN_SAVE_FILES + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxLogGui implementation (FIXME MT-unsafe) +// ---------------------------------------------------------------------------- + +#if wxUSE_LOGGUI + +wxLogGui::wxLogGui() +{ + Clear(); +} + +void wxLogGui::Clear() +{ + m_bErrors = + m_bWarnings = + m_bHasMessages = false; + + m_aMessages.Empty(); + m_aSeverity.Empty(); + m_aTimes.Empty(); +} + +int wxLogGui::GetSeverityIcon() const +{ + return m_bErrors ? wxICON_STOP + : m_bWarnings ? wxICON_EXCLAMATION + : wxICON_INFORMATION; +} + +wxString wxLogGui::GetTitle() const +{ + wxString titleFormat; + switch ( GetSeverityIcon() ) + { + case wxICON_STOP: + titleFormat = _("%s Error"); + break; + + case wxICON_EXCLAMATION: + titleFormat = _("%s Warning"); + break; + + default: + wxFAIL_MSG( "unexpected icon severity" ); + // fall through + + case wxICON_INFORMATION: + titleFormat = _("%s Information"); + } + + return wxString::Format(titleFormat, wxTheApp->GetAppDisplayName()); +} + +void +wxLogGui::DoShowSingleLogMessage(const wxString& message, + const wxString& title, + int style) +{ + wxMessageBox(message, title, wxOK | style); +} + +void +wxLogGui::DoShowMultipleLogMessages(const wxArrayString& messages, + const wxArrayInt& severities, + const wxArrayLong& times, + const wxString& title, + int style) +{ +#if wxUSE_LOG_DIALOG + wxLogDialog dlg(NULL, + messages, severities, times, + title, style); + + // clear the message list before showing the dialog because while it's + // shown some new messages may appear + Clear(); + + (void)dlg.ShowModal(); +#else // !wxUSE_LOG_DIALOG + // start from the most recent message + wxString message; + const size_t nMsgCount = messages.size(); + message.reserve(nMsgCount*100); + for ( size_t n = nMsgCount; n > 0; n-- ) { + message << m_aMessages[n - 1] << wxT("\n"); + } + + DoShowSingleLogMessage(message, title, style); +#endif // wxUSE_LOG_DIALOG/!wxUSE_LOG_DIALOG +} + +void wxLogGui::Flush() +{ + wxLog::Flush(); + + if ( !m_bHasMessages ) + return; + + // do it right now to block any new calls to Flush() while we're here + m_bHasMessages = false; + + // note that this must be done before examining m_aMessages as it may log + // yet another message + const unsigned repeatCount = LogLastRepeatIfNeeded(); + + const size_t nMsgCount = m_aMessages.size(); + + if ( repeatCount > 0 ) + { + m_aMessages[nMsgCount - 1] << " (" << m_aMessages[nMsgCount - 2] << ")"; + } + + const wxString title = GetTitle(); + const int style = GetSeverityIcon(); + + // avoid showing other log dialogs until we're done with the dialog we're + // showing right now: nested modal dialogs make for really bad UI! + Suspend(); + + if ( nMsgCount == 1 ) + { + // make a copy before calling Clear() + const wxString message(m_aMessages[0]); + Clear(); + + DoShowSingleLogMessage(message, title, style); + } + else // more than one message + { + wxArrayString messages; + wxArrayInt severities; + wxArrayLong times; + + messages.swap(m_aMessages); + severities.swap(m_aSeverity); + times.swap(m_aTimes); + + Clear(); + + DoShowMultipleLogMessages(messages, severities, times, title, style); + } + + // allow flushing the logs again + Resume(); +} + +// log all kinds of messages +void wxLogGui::DoLogRecord(wxLogLevel level, + const wxString& msg, + const wxLogRecordInfo& info) +{ + switch ( level ) + { + case wxLOG_Info: + if ( GetVerbose() ) + case wxLOG_Message: + { + m_aMessages.Add(msg); + m_aSeverity.Add(wxLOG_Message); + m_aTimes.Add((long)info.timestamp); + m_bHasMessages = true; + } + break; + + case wxLOG_Status: +#if wxUSE_STATUSBAR + { + wxFrame *pFrame = NULL; + + // check if the frame was passed to us explicitly + wxUIntPtr ptr = 0; + if ( info.GetNumValue(wxLOG_KEY_FRAME, &ptr) ) + { + pFrame = static_cast(wxUIntToPtr(ptr)); + } + + // find the top window and set it's status text if it has any + if ( pFrame == NULL ) { + wxWindow *pWin = wxTheApp->GetTopWindow(); + if ( wxDynamicCast(pWin, wxFrame) ) { + pFrame = (wxFrame *)pWin; + } + } + + if ( pFrame && pFrame->GetStatusBar() ) + pFrame->SetStatusText(msg); + } +#endif // wxUSE_STATUSBAR + break; + + case wxLOG_Error: + if ( !m_bErrors ) { +#if !wxUSE_LOG_DIALOG + // discard earlier informational messages if this is the 1st + // error because they might not make sense any more and showing + // them in a message box might be confusing + m_aMessages.Empty(); + m_aSeverity.Empty(); + m_aTimes.Empty(); +#endif // wxUSE_LOG_DIALOG + m_bErrors = true; + } + // fall through + + case wxLOG_Warning: + if ( !m_bErrors ) { + // for the warning we don't discard the info messages + m_bWarnings = true; + } + + m_aMessages.Add(msg); + m_aSeverity.Add((int)level); + m_aTimes.Add((long)info.timestamp); + m_bHasMessages = true; + break; + + case wxLOG_Debug: + case wxLOG_Trace: + // let the base class deal with debug/trace messages + wxLog::DoLogRecord(level, msg, info); + break; + + case wxLOG_FatalError: + case wxLOG_Max: + // fatal errors are shown immediately and terminate the program so + // we should never see them here + wxFAIL_MSG("unexpected log level"); + break; + + case wxLOG_Progress: + case wxLOG_User: + // just ignore those: passing them to the base class would result + // in asserts from DoLogText() because DoLogTextAtLevel() would + // call it as it doesn't know how to handle these levels otherwise + break; + } +} + +#endif // wxUSE_LOGGUI + +// ---------------------------------------------------------------------------- +// wxLogWindow and wxLogFrame implementation +// ---------------------------------------------------------------------------- + +#if wxUSE_LOGWINDOW + +// log frame class +// --------------- +class wxLogFrame : public wxFrame +{ +public: + // ctor & dtor + wxLogFrame(wxWindow *pParent, wxLogWindow *log, const wxString& szTitle); + virtual ~wxLogFrame(); + + // Don't prevent the application from exiting if just this frame remains. + virtual bool ShouldPreventAppExit() const { return false; } + + // menu callbacks + void OnClose(wxCommandEvent& event); + void OnCloseWindow(wxCloseEvent& event); +#if CAN_SAVE_FILES + void OnSave(wxCommandEvent& event); +#endif // CAN_SAVE_FILES + void OnClear(wxCommandEvent& event); + + // do show the message in the text control + void ShowLogMessage(const wxString& message) + { + m_pTextCtrl->AppendText(message + wxS('\n')); + } + +private: + // use standard ids for our commands! + enum + { + Menu_Close = wxID_CLOSE, + Menu_Save = wxID_SAVE, + Menu_Clear = wxID_CLEAR + }; + + // common part of OnClose() and OnCloseWindow() + void DoClose(); + + wxTextCtrl *m_pTextCtrl; + wxLogWindow *m_log; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxLogFrame); +}; + +BEGIN_EVENT_TABLE(wxLogFrame, wxFrame) + // wxLogWindow menu events + EVT_MENU(Menu_Close, wxLogFrame::OnClose) +#if CAN_SAVE_FILES + EVT_MENU(Menu_Save, wxLogFrame::OnSave) +#endif // CAN_SAVE_FILES + EVT_MENU(Menu_Clear, wxLogFrame::OnClear) + + EVT_CLOSE(wxLogFrame::OnCloseWindow) +END_EVENT_TABLE() + +wxLogFrame::wxLogFrame(wxWindow *pParent, wxLogWindow *log, const wxString& szTitle) + : wxFrame(pParent, wxID_ANY, szTitle) +{ + m_log = log; + + m_pTextCtrl = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, + wxDefaultSize, + wxTE_MULTILINE | + wxHSCROLL | + // needed for Win32 to avoid 65Kb limit but it doesn't work well + // when using RichEdit 2.0 which we always do in the Unicode build +#if !wxUSE_UNICODE + wxTE_RICH | +#endif // !wxUSE_UNICODE + wxTE_READONLY); + +#if wxUSE_MENUS + // create menu + wxMenuBar *pMenuBar = new wxMenuBar; + wxMenu *pMenu = new wxMenu; +#if CAN_SAVE_FILES + pMenu->Append(Menu_Save, _("Save &As..."), _("Save log contents to file")); +#endif // CAN_SAVE_FILES + pMenu->Append(Menu_Clear, _("C&lear"), _("Clear the log contents")); + pMenu->AppendSeparator(); + pMenu->Append(Menu_Close, _("&Close"), _("Close this window")); + pMenuBar->Append(pMenu, _("&Log")); + SetMenuBar(pMenuBar); +#endif // wxUSE_MENUS + +#if wxUSE_STATUSBAR + // status bar for menu prompts + CreateStatusBar(); +#endif // wxUSE_STATUSBAR +} + +void wxLogFrame::DoClose() +{ + if ( m_log->OnFrameClose(this) ) + { + // instead of closing just hide the window to be able to Show() it + // later + Show(false); + } +} + +void wxLogFrame::OnClose(wxCommandEvent& WXUNUSED(event)) +{ + DoClose(); +} + +void wxLogFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) +{ + DoClose(); +} + +#if CAN_SAVE_FILES +void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event)) +{ + wxString filename; + wxFile file; + int rc = OpenLogFile(file, &filename, this); + if ( rc == -1 ) + { + // cancelled + return; + } + + bool bOk = rc != 0; + + // retrieve text and save it + // ------------------------- + int nLines = m_pTextCtrl->GetNumberOfLines(); + for ( int nLine = 0; bOk && nLine < nLines; nLine++ ) { + bOk = file.Write(m_pTextCtrl->GetLineText(nLine) + + wxTextFile::GetEOL()); + } + + if ( bOk ) + bOk = file.Close(); + + if ( !bOk ) { + wxLogError(_("Can't save log contents to file.")); + } + else { + wxLogStatus((wxFrame*)this, _("Log saved to the file '%s'."), filename.c_str()); + } +} +#endif // CAN_SAVE_FILES + +void wxLogFrame::OnClear(wxCommandEvent& WXUNUSED(event)) +{ + m_pTextCtrl->Clear(); +} + +wxLogFrame::~wxLogFrame() +{ + m_log->OnFrameDelete(this); +} + +// wxLogWindow +// ----------- + +wxLogWindow::wxLogWindow(wxWindow *pParent, + const wxString& szTitle, + bool bShow, + bool bDoPass) +{ + // Initialize it to NULL to ensure that we don't crash if any log messages + // are generated before the frame is fully created (while this doesn't + // happen normally, it might, in principle). + m_pLogFrame = NULL; + + PassMessages(bDoPass); + + m_pLogFrame = new wxLogFrame(pParent, this, szTitle); + + if ( bShow ) + m_pLogFrame->Show(); +} + +void wxLogWindow::Show(bool bShow) +{ + m_pLogFrame->Show(bShow); +} + +void wxLogWindow::DoLogTextAtLevel(wxLogLevel level, const wxString& msg) +{ + if ( !m_pLogFrame ) + return; + + // don't put trace messages in the text window for 2 reasons: + // 1) there are too many of them + // 2) they may provoke other trace messages (e.g. wxMSW code uses + // wxLogTrace to log Windows messages and adding text to the control + // sends more of them) thus sending a program into an infinite loop + if ( level == wxLOG_Trace ) + return; + + m_pLogFrame->ShowLogMessage(msg); +} + +wxFrame *wxLogWindow::GetFrame() const +{ + return m_pLogFrame; +} + +bool wxLogWindow::OnFrameClose(wxFrame * WXUNUSED(frame)) +{ + // allow to close + return true; +} + +void wxLogWindow::OnFrameDelete(wxFrame * WXUNUSED(frame)) +{ + m_pLogFrame = NULL; +} + +wxLogWindow::~wxLogWindow() +{ + // may be NULL if log frame already auto destroyed itself + delete m_pLogFrame; +} + +#endif // wxUSE_LOGWINDOW + +// ---------------------------------------------------------------------------- +// wxLogDialog +// ---------------------------------------------------------------------------- + +#if wxUSE_LOG_DIALOG + +wxString wxLogDialog::ms_details; +size_t wxLogDialog::ms_maxLength = 0; + +wxLogDialog::wxLogDialog(wxWindow *parent, + const wxArrayString& messages, + const wxArrayInt& severity, + const wxArrayLong& times, + const wxString& caption, + long style) + : wxDialog(parent, wxID_ANY, caption, + wxDefaultPosition, wxDefaultSize, + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) +{ + // init the static variables: + + if ( ms_details.empty() ) + { + // ensure that we won't loop here if wxGetTranslation() + // happens to pop up a Log message while translating this :-) + ms_details = wxTRANSLATE("&Details"); + ms_details = wxGetTranslation(ms_details); +#ifdef __SMARTPHONE__ + ms_details = wxStripMenuCodes(ms_details); +#endif + } + + if ( ms_maxLength == 0 ) + { + ms_maxLength = (2 * wxGetDisplaySize().x/3) / GetCharWidth(); + } + + size_t count = messages.GetCount(); + m_messages.Alloc(count); + m_severity.Alloc(count); + m_times.Alloc(count); + + for ( size_t n = 0; n < count; n++ ) + { + m_messages.Add(messages[n]); + m_severity.Add(severity[n]); + m_times.Add(times[n]); + } + + m_listctrl = NULL; + + bool isPda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); + + // create the controls which are always shown and layout them: we use + // sizers even though our window is not resizable to calculate the size of + // the dialog properly + wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL); + wxBoxSizer *sizerAll = new wxBoxSizer(isPda ? wxVERTICAL : wxHORIZONTAL); + + if (!isPda) + { + wxStaticBitmap *icon = new wxStaticBitmap + ( + this, + wxID_ANY, + wxArtProvider::GetMessageBoxIcon(style) + ); + sizerAll->Add(icon, wxSizerFlags().Centre()); + } + + // create the text sizer with a minimal size so that we are sure it won't be too small + wxString message = EllipsizeString(messages.Last()); + wxSizer *szText = CreateTextSizer(message); + szText->SetMinSize(wxMin(300, wxGetDisplaySize().x / 3), -1); + + sizerAll->Add(szText, wxSizerFlags(1).Centre().Border(wxLEFT | wxRIGHT)); + + wxButton *btnOk = new wxButton(this, wxID_OK); + sizerAll->Add(btnOk, wxSizerFlags().Centre()); + + sizerTop->Add(sizerAll, wxSizerFlags().Expand().Border()); + + + // add the details pane +#ifndef __SMARTPHONE__ + +#if wxUSE_COLLPANE + wxCollapsiblePane * const + collpane = new wxCollapsiblePane(this, wxID_ANY, ms_details); + sizerTop->Add(collpane, wxSizerFlags(1).Expand().Border()); + + wxWindow *win = collpane->GetPane(); +#else + wxPanel* win = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, + wxBORDER_NONE); +#endif + wxSizer * const paneSz = new wxBoxSizer(wxVERTICAL); + + CreateDetailsControls(win); + + paneSz->Add(m_listctrl, wxSizerFlags(1).Expand().Border(wxTOP)); + +#if wxUSE_CLIPBOARD || CAN_SAVE_FILES + wxBoxSizer * const btnSizer = new wxBoxSizer(wxHORIZONTAL); + + wxSizerFlags flagsBtn; + flagsBtn.Border(wxLEFT); + +#if wxUSE_CLIPBOARD + btnSizer->Add(new wxButton(win, wxID_COPY), flagsBtn); +#endif // wxUSE_CLIPBOARD + +#if CAN_SAVE_FILES + btnSizer->Add(new wxButton(win, wxID_SAVE), flagsBtn); +#endif // CAN_SAVE_FILES + + paneSz->Add(btnSizer, wxSizerFlags().Right().Border(wxTOP|wxBOTTOM)); +#endif // wxUSE_CLIPBOARD || CAN_SAVE_FILES + + win->SetSizer(paneSz); + paneSz->SetSizeHints(win); +#else // __SMARTPHONE__ + SetLeftMenu(wxID_OK); + SetRightMenu(wxID_MORE, ms_details + EXPAND_SUFFIX); +#endif // __SMARTPHONE__/!__SMARTPHONE__ + + SetSizerAndFit(sizerTop); + + Centre(); + + if (isPda) + { + // Move up the screen so that when we expand the dialog, + // there's enough space. + Move(wxPoint(GetPosition().x, GetPosition().y / 2)); + } +} + +void wxLogDialog::CreateDetailsControls(wxWindow *parent) +{ + wxString fmt = wxLog::GetTimestamp(); + bool hasTimeStamp = !fmt.IsEmpty(); + + // create the list ctrl now + m_listctrl = new wxListCtrl(parent, wxID_ANY, + wxDefaultPosition, wxDefaultSize, + wxBORDER_SIMPLE | + wxLC_REPORT | + wxLC_NO_HEADER | + wxLC_SINGLE_SEL); +#ifdef __WXWINCE__ + // This makes a big aesthetic difference on WinCE but I + // don't want to risk problems on other platforms + m_listctrl->Hide(); +#endif + + // no need to translate these strings as they're not shown to the + // user anyhow (we use wxLC_NO_HEADER style) + m_listctrl->InsertColumn(0, wxT("Message")); + + if (hasTimeStamp) + m_listctrl->InsertColumn(1, wxT("Time")); + + // prepare the imagelist + static const int ICON_SIZE = 16; + wxImageList *imageList = new wxImageList(ICON_SIZE, ICON_SIZE); + + // order should be the same as in the switch below! + static const char* const icons[] = + { + wxART_ERROR, + wxART_WARNING, + wxART_INFORMATION + }; + + bool loadedIcons = true; + + for ( size_t icon = 0; icon < WXSIZEOF(icons); icon++ ) + { + wxBitmap bmp = wxArtProvider::GetBitmap(icons[icon], wxART_MESSAGE_BOX, + wxSize(ICON_SIZE, ICON_SIZE)); + + // This may very well fail if there are insufficient colours available. + // Degrade gracefully. + if ( !bmp.IsOk() ) + { + loadedIcons = false; + + break; + } + + imageList->Add(bmp); + } + + m_listctrl->SetImageList(imageList, wxIMAGE_LIST_SMALL); + + // fill the listctrl + size_t count = m_messages.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + int image; + + if ( loadedIcons ) + { + switch ( m_severity[n] ) + { + case wxLOG_Error: + image = 0; + break; + + case wxLOG_Warning: + image = 1; + break; + + default: + image = 2; + } + } + else // failed to load images + { + image = -1; + } + + wxString msg = m_messages[n]; + msg.Replace(wxT("\n"), wxT(" ")); + msg = EllipsizeString(msg); + + m_listctrl->InsertItem(n, msg, image); + + if (hasTimeStamp) + m_listctrl->SetItem(n, 1, TimeStamp(fmt, (time_t)m_times[n])); + } + + // let the columns size themselves + m_listctrl->SetColumnWidth(0, wxLIST_AUTOSIZE); + if (hasTimeStamp) + m_listctrl->SetColumnWidth(1, wxLIST_AUTOSIZE); + + // calculate an approximately nice height for the listctrl + int height = GetCharHeight()*(count + 4); + + // but check that the dialog won't fall fown from the screen + // + // we use GetMinHeight() to get the height of the dialog part without the + // details and we consider that the "Save" button below and the separator + // line (and the margins around it) take about as much, hence double it + int heightMax = wxGetDisplaySize().y - GetPosition().y - 2*GetMinHeight(); + + // we should leave a margin + heightMax *= 9; + heightMax /= 10; + + m_listctrl->SetSize(wxDefaultCoord, wxMin(height, heightMax)); +} + +void wxLogDialog::OnListItemActivated(wxListEvent& event) +{ + // show the activated item in a message box + // This allow the user to correctly display the logs which are longer + // than the listctrl and thus gets truncated or those which contains + // newlines. + + // NB: don't do: + // wxString str = m_listctrl->GetItemText(event.GetIndex()); + // as there's a 260 chars limit on the items inside a wxListCtrl in wxMSW. + wxString str = m_messages[event.GetIndex()]; + + // wxMessageBox will nicely handle the '\n' in the string (if any) + // and supports long strings + wxMessageBox(str, wxT("Log message"), wxOK, this); +} + +void wxLogDialog::OnOk(wxCommandEvent& WXUNUSED(event)) +{ + EndModal(wxID_OK); +} + +#if CAN_SAVE_FILES || wxUSE_CLIPBOARD + +wxString wxLogDialog::GetLogMessages() const +{ + wxString fmt = wxLog::GetTimestamp(); + if ( fmt.empty() ) + { + // use the default format + fmt = "%c"; + } + + const size_t count = m_messages.GetCount(); + + wxString text; + text.reserve(count*m_messages[0].length()); + for ( size_t n = 0; n < count; n++ ) + { + text << TimeStamp(fmt, (time_t)m_times[n]) + << ": " + << m_messages[n] + << wxTextFile::GetEOL(); + } + + return text; +} + +#endif // CAN_SAVE_FILES || wxUSE_CLIPBOARD + +#if wxUSE_CLIPBOARD + +void wxLogDialog::OnCopy(wxCommandEvent& WXUNUSED(event)) +{ + wxClipboardLocker clip; + if ( !clip || + !wxTheClipboard->AddData(new wxTextDataObject(GetLogMessages())) ) + { + wxLogError(_("Failed to copy dialog contents to the clipboard.")); + } +} + +#endif // wxUSE_CLIPBOARD + +#if CAN_SAVE_FILES + +void wxLogDialog::OnSave(wxCommandEvent& WXUNUSED(event)) +{ + wxFile file; + int rc = OpenLogFile(file, NULL, this); + if ( rc == -1 ) + { + // cancelled + return; + } + + if ( !rc || !file.Write(GetLogMessages()) || !file.Close() ) + { + wxLogError(_("Can't save log contents to file.")); + } +} + +#endif // CAN_SAVE_FILES + +wxLogDialog::~wxLogDialog() +{ + if ( m_listctrl ) + { + delete m_listctrl->GetImageList(wxIMAGE_LIST_SMALL); + } +} + +#endif // wxUSE_LOG_DIALOG + +#if CAN_SAVE_FILES + +// pass an uninitialized file object, the function will ask the user for the +// filename and try to open it, returns true on success (file was opened), +// false if file couldn't be opened/created and -1 if the file selection +// dialog was cancelled +static int OpenLogFile(wxFile& file, wxString *pFilename, wxWindow *parent) +{ + // get the file name + // ----------------- + wxString filename = wxSaveFileSelector(wxT("log"), wxT("txt"), wxT("log.txt"), parent); + if ( !filename ) { + // cancelled + return -1; + } + + // open file + // --------- + bool bOk = true; // suppress warning about it being possible uninitialized + if ( wxFile::Exists(filename) ) { + bool bAppend = false; + wxString strMsg; + strMsg.Printf(_("Append log to file '%s' (choosing [No] will overwrite it)?"), + filename.c_str()); + switch ( wxMessageBox(strMsg, _("Question"), + wxICON_QUESTION | wxYES_NO | wxCANCEL) ) { + case wxYES: + bAppend = true; + break; + + case wxNO: + bAppend = false; + break; + + case wxCANCEL: + return -1; + + default: + wxFAIL_MSG(_("invalid message box return value")); + } + + if ( bAppend ) { + bOk = file.Open(filename, wxFile::write_append); + } + else { + bOk = file.Create(filename, true /* overwrite */); + } + } + else { + bOk = file.Create(filename); + } + + if ( pFilename ) + *pFilename = filename; + + return bOk; +} + +#endif // CAN_SAVE_FILES + +#endif // !(wxUSE_LOGGUI || wxUSE_LOGWINDOW) + +#if wxUSE_LOG && wxUSE_TEXTCTRL + +// ---------------------------------------------------------------------------- +// wxLogTextCtrl implementation +// ---------------------------------------------------------------------------- + +wxLogTextCtrl::wxLogTextCtrl(wxTextCtrl *pTextCtrl) +{ + m_pTextCtrl = pTextCtrl; +} + +void wxLogTextCtrl::DoLogText(const wxString& msg) +{ + m_pTextCtrl->AppendText(msg + wxS('\n')); +} + +#endif // wxUSE_LOG && wxUSE_TEXTCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/markuptext.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/markuptext.cpp new file mode 100644 index 0000000000..03c587c91a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/markuptext.cpp @@ -0,0 +1,253 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/markuptext.cpp +// Purpose: wxMarkupText implementation +// Author: Vadim Zeitlin +// Created: 2011-02-21 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_MARKUP + +#ifndef WX_PRECOMP + #include "wx/gdicmn.h" + #include "wx/control.h" + #include "wx/dc.h" +#endif // WX_PRECOMP + +#include "wx/generic/private/markuptext.h" + +#include "wx/private/markupparserattr.h" + +namespace +{ + +// ---------------------------------------------------------------------------- +// wxMarkupParserMeasureOutput: measure the extends of a markup string. +// ---------------------------------------------------------------------------- + +class wxMarkupParserMeasureOutput : public wxMarkupParserAttrOutput +{ +public: + // Initialize the base class with the font to use. As we don't care about + // colours (which don't affect the text measurements), don't bother to + // specify them at all. + wxMarkupParserMeasureOutput(wxDC& dc, int *visibleHeight) + : wxMarkupParserAttrOutput(dc.GetFont(), wxColour(), wxColour()), + m_dc(dc), + m_visibleHeight(visibleHeight) + { + if ( visibleHeight ) + *visibleHeight = 0; + } + + const wxSize& GetSize() const { return m_size; } + + + virtual void OnText(const wxString& text_) + { + const wxString text(wxControl::RemoveMnemonics(text_)); + + // TODO-MULTILINE-MARKUP: Must use GetMultiLineTextExtent(). + const wxSize size = m_dc.GetTextExtent(text); + + m_size.x += size.x; + if ( size.y > m_size.y ) + m_size.y = size.y; + + if ( m_visibleHeight ) + { + wxFontMetrics tm = m_dc.GetFontMetrics(); + int visibleHeight = tm.ascent - tm.internalLeading; + if ( *m_visibleHeight < visibleHeight ) + *m_visibleHeight = visibleHeight; + } + } + + virtual void OnAttrStart(const Attr& attr) + { + m_dc.SetFont(attr.font); + } + + virtual void OnAttrEnd(const Attr& WXUNUSED(attr)) + { + m_dc.SetFont(GetFont()); + } + +private: + wxDC& m_dc; + + // The values that we compute. + wxSize m_size; + int * const m_visibleHeight; // may be NULL + + wxDECLARE_NO_COPY_CLASS(wxMarkupParserMeasureOutput); +}; + +// ---------------------------------------------------------------------------- +// wxMarkupParserRenderOutput: render a markup string. +// ---------------------------------------------------------------------------- + +class wxMarkupParserRenderOutput : public wxMarkupParserAttrOutput +{ +public: + // Notice that the bottom of rectangle passed to our ctor is used as the + // baseline for the text we draw, i.e. it needs to be adjusted to exclude + // descent by the caller. + wxMarkupParserRenderOutput(wxDC& dc, + const wxRect& rect, + int flags) + : wxMarkupParserAttrOutput(dc.GetFont(), + dc.GetTextForeground(), + wxColour()), + m_dc(dc), + m_rect(rect), + m_flags(flags) + { + m_pos = m_rect.x; + + // We don't initialize the base class initial text background colour to + // the valid value because we want to be able to detect when we revert + // to the "absence of background colour" and set the background mode to + // be transparent in OnAttrStart() below. But do remember it to be able + // to restore it there later -- this doesn't affect us as the text + // background isn't used anyhow when the background mode is transparent + // but it might affect the caller if it sets the background mode to + // opaque and draws some text after using us. + m_origTextBackground = dc.GetTextBackground(); + } + + virtual void OnText(const wxString& text_) + { + wxString text; + int indexAccel = wxControl::FindAccelIndex(text_, &text); + if ( !(m_flags & wxMarkupText::Render_ShowAccels) ) + indexAccel = wxNOT_FOUND; + + // Adjust the position (unfortunately we need to do this manually as + // there is no notion of current text position in wx API) rectangle to + // ensure that all text segments use the same baseline (as there is + // nothing equivalent to Windows SetTextAlign(TA_BASELINE) neither). + wxRect rect(m_rect); + rect.x = m_pos; + + int descent; + m_dc.GetTextExtent(text, &rect.width, &rect.height, &descent); + rect.height -= descent; + rect.y += m_rect.height - rect.height; + + wxRect bounds; + m_dc.DrawLabel(text, wxBitmap(), + rect, wxALIGN_LEFT | wxALIGN_TOP, + indexAccel, + &bounds); + + // TODO-MULTILINE-MARKUP: Must update vertical position too. + m_pos += bounds.width; + } + + virtual void OnAttrStart(const Attr& attr) + { + m_dc.SetFont(attr.font); + if ( attr.foreground.IsOk() ) + m_dc.SetTextForeground(attr.foreground); + + if ( attr.background.IsOk() ) + { + // Setting the background colour is not enough, we must also change + // the mode to ensure that it is actually used. + m_dc.SetBackgroundMode(wxSOLID); + m_dc.SetTextBackground(attr.background); + } + } + + virtual void OnAttrEnd(const Attr& attr) + { + // We always restore the font because we always change it... + m_dc.SetFont(GetFont()); + + // ...but we only need to restore the colours if we had changed them. + if ( attr.foreground.IsOk() ) + m_dc.SetTextForeground(GetAttr().foreground); + + if ( attr.background.IsOk() ) + { + wxColour background = GetAttr().background; + if ( !background.IsOk() ) + { + // Invalid background colour indicates that the background + // should actually be made transparent and in this case the + // actual value of background colour doesn't matter but we also + // restore it just in case, see comment in the ctor. + m_dc.SetBackgroundMode(wxTRANSPARENT); + background = m_origTextBackground; + } + + m_dc.SetTextBackground(background); + } + } + +private: + wxDC& m_dc; + const wxRect m_rect; + const int m_flags; + + wxColour m_origTextBackground; + + // Current horizontal text output position. + // + // TODO-MULTILINE-MARKUP: Must keep vertical position too. + int m_pos; + + wxDECLARE_NO_COPY_CLASS(wxMarkupParserRenderOutput); +}; + +} // anonymous namespace + +// ============================================================================ +// wxMarkupText implementation +// ============================================================================ + +wxSize wxMarkupText::Measure(wxDC& dc, int *visibleHeight) const +{ + wxMarkupParserMeasureOutput out(dc, visibleHeight); + wxMarkupParser parser(out); + if ( !parser.Parse(m_markup) ) + { + wxFAIL_MSG( "Invalid markup" ); + return wxDefaultSize; + } + + return out.GetSize(); +} + +void wxMarkupText::Render(wxDC& dc, const wxRect& rect, int flags) +{ + // We want to center the above-baseline parts of the letter vertically, so + // we use the visible height and not the total height (which includes + // descent and internal leading) here. + int visibleHeight; + wxRect rectText(rect.GetPosition(), Measure(dc, &visibleHeight)); + rectText.height = visibleHeight; + + wxMarkupParserRenderOutput out(dc, rectText.CentreIn(rect), flags); + wxMarkupParser parser(out); + parser.Parse(m_markup); +} + +#endif // wxUSE_MARKUP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/mask.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/mask.cpp new file mode 100644 index 0000000000..504a462855 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/mask.cpp @@ -0,0 +1,75 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/mask.cpp +// Purpose: generic wxMask implementation +// Author: Vadim Zeitlin +// Created: 2006-09-28 +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/bitmap.h" + #include "wx/image.h" +#endif // WX_PRECOMP + +#if wxUSE_GENERIC_MASK + +// ============================================================================ +// wxMask implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) + +void wxMask::FreeData() +{ + m_bitmap = wxNullBitmap; +} + +bool wxMask::InitFromColour(const wxBitmap& bitmap, const wxColour& colour) +{ +#if wxUSE_IMAGE + const wxColour clr(bitmap.QuantizeColour(colour)); + + wxImage imgSrc(bitmap.ConvertToImage()); + imgSrc.SetMask(false); + wxImage image(imgSrc.ConvertToMono(clr.Red(), clr.Green(), clr.Blue())); + if ( !image.IsOk() ) + return false; + + m_bitmap = wxBitmap(image, 1); + + return m_bitmap.IsOk(); +#else // !wxUSE_IMAGE + wxUnusedVar(bitmap); + wxUnusedVar(colour); + + return false; +#endif // wxUSE_IMAGE/!wxUSE_IMAGE +} + +bool wxMask::InitFromMonoBitmap(const wxBitmap& bitmap) +{ + wxCHECK_MSG( bitmap.IsOk(), false, wxT("Invalid bitmap") ); + wxCHECK_MSG( bitmap.GetDepth() == 1, false, wxT("Cannot create mask from colour bitmap") ); + + m_bitmap = bitmap; + + return true; +} + +#endif // wxUSE_GENERIC_MASK diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/mdig.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/mdig.cpp new file mode 100644 index 0000000000..c4a9a21f7b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/mdig.cpp @@ -0,0 +1,642 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/mdig.cpp +// Purpose: Generic MDI (Multiple Document Interface) classes +// Author: Hans Van Leemputten +// Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes +// Created: 29/07/2002 +// Copyright: (c) 2002 Hans Van Leemputten +// (c) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// declarations +// =========================================================================== + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_MDI + +#ifndef WX_PRECOMP + #include "wx/menu.h" + #include "wx/intl.h" + #include "wx/log.h" +#endif //WX_PRECOMP + +#include "wx/mdi.h" +#include "wx/generic/mdig.h" +#include "wx/notebook.h" +#include "wx/scopeguard.h" + +#include "wx/stockitem.h" + +enum MDI_MENU_ID +{ + wxWINDOWCLOSE = 4001, + wxWINDOWCLOSEALL, + wxWINDOWNEXT, + wxWINDOWPREV +}; + +//----------------------------------------------------------------------------- +// wxGenericMDIParentFrame +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGenericMDIParentFrame, wxFrame) + +BEGIN_EVENT_TABLE(wxGenericMDIParentFrame, wxFrame) + EVT_CLOSE(wxGenericMDIParentFrame::OnClose) +#if wxUSE_MENUS + EVT_MENU(wxID_ANY, wxGenericMDIParentFrame::OnWindowMenu) +#endif +END_EVENT_TABLE() + +void wxGenericMDIParentFrame::Init() +{ +#if wxUSE_MENUS + m_pMyMenuBar = NULL; +#endif // wxUSE_MENUS +} + +wxGenericMDIParentFrame::~wxGenericMDIParentFrame() +{ + // Make sure the client window is destructed before the menu bars are! + wxDELETE(m_clientWindow); + +#if wxUSE_MENUS + wxDELETE(m_pMyMenuBar); + + RemoveWindowMenu(GetMenuBar()); +#endif // wxUSE_MENUS +} + +bool wxGenericMDIParentFrame::Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + // this style can be used to prevent a window from having the standard MDI + // "Window" menu + if ( !(style & wxFRAME_NO_WINDOW_MENU) ) + { +#if wxUSE_MENUS + m_windowMenu = new wxMenu; + + m_windowMenu->Append(wxWINDOWCLOSE, _("Cl&ose")); + m_windowMenu->Append(wxWINDOWCLOSEALL, _("Close All")); + m_windowMenu->AppendSeparator(); + m_windowMenu->Append(wxWINDOWNEXT, _("&Next")); + m_windowMenu->Append(wxWINDOWPREV, _("&Previous")); +#endif // wxUSE_MENUS + } + + // the scrolling styles don't make sense neither for us nor for our client + // window (to which they're supposed to apply) + style &= ~(wxHSCROLL | wxVSCROLL); + + if ( !wxFrame::Create( parent, id, title, pos, size, style, name ) ) + return false; + + wxGenericMDIClientWindow * const client = OnCreateGenericClient(); + if ( !client->CreateGenericClient(this) ) + return false; + + m_clientWindow = client; + + return true; +} + +wxGenericMDIClientWindow *wxGenericMDIParentFrame::OnCreateGenericClient() +{ + return new wxGenericMDIClientWindow; +} + +bool wxGenericMDIParentFrame::CloseAll() +{ + wxGenericMDIClientWindow * const client = GetGenericClientWindow(); + if ( !client ) + return true; // none of the windows left + + wxBookCtrlBase * const book = client->GetBookCtrl(); + while ( book->GetPageCount() ) + { + wxGenericMDIChildFrame * const child = client->GetChild(0); + if ( !child->Close() ) + { + // it refused to close, don't close the remaining ones neither + return false; + } + } + + return true; +} + +#if wxUSE_MENUS +void wxGenericMDIParentFrame::SetWindowMenu(wxMenu* pMenu) +{ + // Replace the window menu from the currently loaded menu bar. + wxMenuBar *pMenuBar = GetMenuBar(); + + if (m_windowMenu) + { + RemoveWindowMenu(pMenuBar); + + wxDELETE(m_windowMenu); + } + + if (pMenu) + { + m_windowMenu = pMenu; + + AddWindowMenu(pMenuBar); + } +} + +void wxGenericMDIParentFrame::SetMenuBar(wxMenuBar *pMenuBar) +{ + // Remove the Window menu from the old menu bar + RemoveWindowMenu(GetMenuBar()); + // Add the Window menu to the new menu bar. + AddWindowMenu(pMenuBar); + + wxFrame::SetMenuBar(pMenuBar); +} +#endif // wxUSE_MENUS + +void wxGenericMDIParentFrame::WXSetChildMenuBar(wxGenericMDIChildFrame *pChild) +{ +#if wxUSE_MENUS + if (pChild == NULL) + { + // No Child, set Our menu bar back. + SetMenuBar(m_pMyMenuBar); + + // Make sure we know our menu bar is in use + m_pMyMenuBar = NULL; + } + else + { + if (pChild->GetMenuBar() == NULL) + return; + + // Do we need to save the current bar? + if (m_pMyMenuBar == NULL) + m_pMyMenuBar = GetMenuBar(); + + SetMenuBar(pChild->GetMenuBar()); + } +#endif // wxUSE_MENUS +} + +wxGenericMDIClientWindow * +wxGenericMDIParentFrame::GetGenericClientWindow() const +{ + return static_cast(m_clientWindow); +} + +wxBookCtrlBase *wxGenericMDIParentFrame::GetBookCtrl() const +{ + wxGenericMDIClientWindow * const client = GetGenericClientWindow(); + return client ? client->GetBookCtrl() : NULL; +} + +void wxGenericMDIParentFrame::AdvanceActive(bool forward) +{ + wxBookCtrlBase * const book = GetBookCtrl(); + if ( book ) + book->AdvanceSelection(forward); +} + +void wxGenericMDIParentFrame::WXUpdateChildTitle(wxGenericMDIChildFrame *child) +{ + wxGenericMDIClientWindow * const client = GetGenericClientWindow(); + + const int pos = client->FindChild(child); + if ( pos == wxNOT_FOUND ) + return; + + client->GetBookCtrl()->SetPageText(pos, child->GetTitle()); +} + +void wxGenericMDIParentFrame::WXActivateChild(wxGenericMDIChildFrame *child) +{ + wxGenericMDIClientWindow * const client = GetGenericClientWindow(); + + const int pos = client->FindChild(child); + if ( pos == wxNOT_FOUND ) + return; + + client->GetBookCtrl()->SetSelection(pos); +} + +void wxGenericMDIParentFrame::WXRemoveChild(wxGenericMDIChildFrame *child) +{ + const bool removingActive = WXIsActiveChild(child); + if ( removingActive ) + { + SetActiveChild(NULL); + WXSetChildMenuBar(NULL); + } + + wxGenericMDIClientWindow * const client = GetGenericClientWindow(); + wxCHECK_RET( client, "should have client window" ); + + wxBookCtrlBase * const book = client->GetBookCtrl(); + + // Remove page if still there + int pos = client->FindChild(child); + if ( pos != wxNOT_FOUND ) + { + if ( book->RemovePage(pos) ) + book->Refresh(); + } + + if ( removingActive ) + { + // Set the new selection to a remaining page + const size_t count = book->GetPageCount(); + if ( count > (size_t)pos ) + { + book->SetSelection(pos); + } + else + { + if ( count > 0 ) + book->SetSelection(count - 1); + } + } +} + +bool +wxGenericMDIParentFrame::WXIsActiveChild(wxGenericMDIChildFrame *child) const +{ + return static_cast(GetActiveChild()) == child; +} + +#if wxUSE_MENUS +void wxGenericMDIParentFrame::RemoveWindowMenu(wxMenuBar *pMenuBar) +{ + if (pMenuBar && m_windowMenu) + { + // Remove old window menu + int pos = pMenuBar->FindMenu(_("&Window")); + if (pos != wxNOT_FOUND) + { + wxASSERT(m_windowMenu == pMenuBar->GetMenu(pos)); // DBG:: We're going to delete the wrong menu!!! + pMenuBar->Remove(pos); + } + } +} + +void wxGenericMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar) +{ + if (pMenuBar && m_windowMenu) + { + int pos = pMenuBar->FindMenu(wxGetStockLabel(wxID_HELP,false)); + if (pos == wxNOT_FOUND) + { + pMenuBar->Append(m_windowMenu, _("&Window")); + } + else + { + pMenuBar->Insert(pos, m_windowMenu, _("&Window")); + } + } +} + +void wxGenericMDIParentFrame::OnWindowMenu(wxCommandEvent &event) +{ + switch ( event.GetId() ) + { + case wxWINDOWCLOSE: + if ( m_currentChild ) + m_currentChild->Close(); + break; + + case wxWINDOWCLOSEALL: + CloseAll(); + break; + + case wxWINDOWNEXT: + ActivateNext(); + break; + + case wxWINDOWPREV: + ActivatePrevious(); + break; + + default: + event.Skip(); + } +} +#endif // wxUSE_MENUS + +void wxGenericMDIParentFrame::OnClose(wxCloseEvent& event) +{ + if ( !CloseAll() ) + event.Veto(); + else + event.Skip(); +} + +bool wxGenericMDIParentFrame::ProcessEvent(wxEvent& event) +{ + if ( m_currentChild ) + { + // the menu events should be given to the child as we show its menu bar + // as our own + const wxEventType eventType = event.GetEventType(); + if ( eventType == wxEVT_MENU || + eventType == wxEVT_UPDATE_UI ) + { + // set the flag indicating that this event was forwarded to the + // child from the parent and so shouldn't be propagated upwards if + // not processed to avoid infinite loop + m_childHandler = m_currentChild; + wxON_BLOCK_EXIT_NULL(m_childHandler); + + if ( m_currentChild->ProcessWindowEvent(event) ) + return true; + } + } + + return wxMDIParentFrameBase::ProcessEvent(event); +} + +// ---------------------------------------------------------------------------- +// wxGenericMDIChildFrame +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGenericMDIChildFrame, wxFrame) + +BEGIN_EVENT_TABLE(wxGenericMDIChildFrame, wxFrame) + EVT_MENU_HIGHLIGHT_ALL(wxGenericMDIChildFrame::OnMenuHighlight) + + EVT_CLOSE(wxGenericMDIChildFrame::OnClose) +END_EVENT_TABLE() + +void wxGenericMDIChildFrame::Init() +{ +#if wxUSE_MENUS + m_pMenuBar = NULL; +#endif // wxUSE_MENUS + +#if !wxUSE_GENERIC_MDI_AS_NATIVE + m_mdiParentGeneric = NULL; +#endif +} + +wxGenericMDIChildFrame::~wxGenericMDIChildFrame() +{ + wxGenericMDIParentFrame * const parent = GetGenericMDIParent(); + + // it could happen that we don't have a valid parent if we hadn't been ever + // really created -- but in this case there is nothing else to do neither + if ( parent ) + parent->WXRemoveChild(this); + +#if wxUSE_MENUS + delete m_pMenuBar; +#endif // wxUSE_MENUS +} + +bool wxGenericMDIChildFrame::Create(wxGenericMDIParentFrame *parent, + wxWindowID id, + const wxString& title, + const wxPoint& WXUNUSED(pos), + const wxSize& size, + long WXUNUSED(style), + const wxString& name) +{ + // unfortunately we can't use the base class m_mdiParent field unless + // wxGenericMDIParentFrame is wxMDIParentFrame +#if wxUSE_GENERIC_MDI_AS_NATIVE + m_mdiParent = parent; +#else // generic != native + // leave m_mdiParent NULL, we don't have it + m_mdiParentGeneric = parent; +#endif + + wxBookCtrlBase * const book = parent->GetBookCtrl(); + + wxASSERT_MSG( book, "Missing MDI client window." ); + + // note that we ignore the styles, none of the usual TLW styles apply to + // this (child) window + if ( !wxWindow::Create(book, id, wxDefaultPosition, size, 0, name) ) + return false; + + m_title = title; + book->AddPage(this, title, true); + + return true; +} + +#if wxUSE_MENUS +void wxGenericMDIChildFrame::SetMenuBar( wxMenuBar *menu_bar ) +{ + wxMenuBar *pOldMenuBar = m_pMenuBar; + m_pMenuBar = menu_bar; + + if (m_pMenuBar) + { + wxGenericMDIParentFrame *parent = GetGenericMDIParent(); + + if ( parent ) + { + m_pMenuBar->SetParent(parent); + + if ( parent->WXIsActiveChild(this) ) + { + // Replace current menu bars + if (pOldMenuBar) + parent->WXSetChildMenuBar(NULL); + parent->WXSetChildMenuBar(this); + } + } + } +} + +wxMenuBar *wxGenericMDIChildFrame::GetMenuBar() const +{ + return m_pMenuBar; +} +#endif // wxUSE_MENUS + +void wxGenericMDIChildFrame::SetTitle(const wxString& title) +{ + m_title = title; + + wxGenericMDIParentFrame * const parent = GetGenericMDIParent(); + if ( parent ) + parent->WXUpdateChildTitle(this); + //else: it's ok, we might be not created yet +} + +void wxGenericMDIChildFrame::Activate() +{ + wxGenericMDIParentFrame * const parent = GetGenericMDIParent(); + + wxCHECK_RET( parent, "can't activate MDI child without parent" ); + parent->WXActivateChild(this); +} + +void wxGenericMDIChildFrame::OnMenuHighlight(wxMenuEvent& event) +{ + wxGenericMDIParentFrame * const parent = GetGenericMDIParent(); + if ( parent) + { + // we don't have any help text for this item, + // but may be the MDI frame does? + parent->OnMenuHighlight(event); + } +} + +void wxGenericMDIChildFrame::OnClose(wxCloseEvent& WXUNUSED(event)) +{ + // we're not a TLW so don't delay the destruction of this window + delete this; +} + +bool wxGenericMDIChildFrame::TryAfter(wxEvent& event) +{ + // we shouldn't propagate the event to the parent if we received it from it + // in the first place + wxGenericMDIParentFrame * const parent = GetGenericMDIParent(); + if ( parent && parent->WXIsInsideChildHandler(this) ) + return false; + + return wxTDIChildFrame::TryAfter(event); +} + +// ---------------------------------------------------------------------------- +// wxGenericMDIClientWindow +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGenericMDIClientWindow, wxWindow) + +bool +wxGenericMDIClientWindow::CreateGenericClient(wxWindow *parent) +{ + if ( !wxWindow::Create(parent, wxID_ANY) ) + return false; + + m_notebook = new wxNotebook(this, wxID_ANY); + m_notebook->Connect + ( + wxEVT_NOTEBOOK_PAGE_CHANGED, + wxNotebookEventHandler( + wxGenericMDIClientWindow::OnPageChanged), + NULL, + this + ); + + // now that we have a notebook to resize, hook up OnSize() too + Connect(wxEVT_SIZE, wxSizeEventHandler(wxGenericMDIClientWindow::OnSize)); + + return true; +} + +wxBookCtrlBase *wxGenericMDIClientWindow::GetBookCtrl() const +{ + return m_notebook; +} + +wxGenericMDIChildFrame *wxGenericMDIClientWindow::GetChild(size_t pos) const +{ + return static_cast(GetBookCtrl()->GetPage(pos)); +} + +int wxGenericMDIClientWindow::FindChild(wxGenericMDIChildFrame *child) const +{ + wxBookCtrlBase * const book = GetBookCtrl(); + const size_t count = book->GetPageCount(); + for ( size_t pos = 0; pos < count; pos++ ) + { + if ( book->GetPage(pos) == child ) + return pos; + } + + return wxNOT_FOUND; +} + +void wxGenericMDIClientWindow::PageChanged(int oldSelection, int newSelection) +{ + // Don't do anything if nothing changed + if (oldSelection == newSelection) + return; + + // Again check if we really need to do this... + if (newSelection != -1) + { + wxGenericMDIChildFrame * const child = GetChild(newSelection); + + if ( child->GetGenericMDIParent()->WXIsActiveChild(child) ) + return; + } + + // Notify old active child that it has been deactivated + if (oldSelection != -1) + { + wxGenericMDIChildFrame * const oldChild = GetChild(oldSelection); + if (oldChild) + { + wxActivateEvent event(wxEVT_ACTIVATE, false, oldChild->GetId()); + event.SetEventObject( oldChild ); + oldChild->GetEventHandler()->ProcessEvent(event); + } + } + + // Notify new active child that it has been activated + if (newSelection != -1) + { + wxGenericMDIChildFrame * const activeChild = GetChild(newSelection); + if ( activeChild ) + { + wxActivateEvent event(wxEVT_ACTIVATE, true, activeChild->GetId()); + event.SetEventObject( activeChild ); + activeChild->GetEventHandler()->ProcessEvent(event); + + wxGenericMDIParentFrame * const + parent = activeChild->GetGenericMDIParent(); + + if ( parent ) + { + // this is a dirty hack as activeChild is not really a + // wxMDIChildFrame at all but we still want to store it in the + // base class m_currentChild field and this will work as long + // as we only use as wxMDIChildFrameBase pointer (which it is) + parent->SetActiveChild( + reinterpret_cast(activeChild)); + parent->WXSetChildMenuBar(activeChild); + } + } + } +} + +void wxGenericMDIClientWindow::OnPageChanged(wxBookCtrlEvent& event) +{ + PageChanged(event.GetOldSelection(), event.GetSelection()); + + event.Skip(); +} + +void wxGenericMDIClientWindow::OnSize(wxSizeEvent& WXUNUSED(event)) +{ + m_notebook->SetSize(GetClientSize()); +} + +#endif // wxUSE_MDI + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/msgdlgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/msgdlgg.cpp new file mode 100644 index 0000000000..5fbded43cc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/msgdlgg.cpp @@ -0,0 +1,280 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/msgdlgg.cpp +// Purpose: wxGenericMessageDialog +// Author: Julian Smart, Robert Roebling +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart and Robert Roebling +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#if wxUSE_MSGDLG + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/dialog.h" + #include "wx/button.h" + #include "wx/stattext.h" + #include "wx/statbmp.h" + #include "wx/layout.h" + #include "wx/intl.h" + #include "wx/icon.h" + #include "wx/sizer.h" + #include "wx/app.h" + #include "wx/settings.h" +#endif + +#include +#include + +#define __WX_COMPILING_MSGDLGG_CPP__ 1 +#include "wx/msgdlg.h" +#include "wx/artprov.h" +#include "wx/textwrapper.h" +#include "wx/modalhook.h" + +#if wxUSE_STATLINE + #include "wx/statline.h" +#endif + +// ---------------------------------------------------------------------------- +// wxTitleTextWrapper: simple class to create wrapped text in "title font" +// ---------------------------------------------------------------------------- + +class wxTitleTextWrapper : public wxTextSizerWrapper +{ +public: + wxTitleTextWrapper(wxWindow *win) + : wxTextSizerWrapper(win) + { + } + +protected: + virtual wxWindow *OnCreateLine(const wxString& s) + { + wxWindow * const win = wxTextSizerWrapper::OnCreateLine(s); + + win->SetFont(win->GetFont().Larger().MakeBold()); + + return win; + } +}; + +// ---------------------------------------------------------------------------- +// icons +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) + EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) + EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) + EVT_BUTTON(wxID_HELP, wxGenericMessageDialog::OnHelp) + EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel) +END_EVENT_TABLE() + +IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog) + +wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, + const wxString& message, + const wxString& caption, + long style, + const wxPoint& pos) + : wxMessageDialogBase(GetParentForModalDialog(parent, style), + message, + caption, + style), + m_pos(pos) +{ + m_created = false; +} + +wxSizer *wxGenericMessageDialog::CreateMsgDlgButtonSizer() +{ +#ifndef __SMARTPHONE__ + if ( HasCustomLabels() ) + { + wxStdDialogButtonSizer * const sizerStd = new wxStdDialogButtonSizer; + + wxButton *btnDef = NULL; + + if ( m_dialogStyle & wxOK ) + { + btnDef = new wxButton(this, wxID_OK, GetCustomOKLabel()); + sizerStd->AddButton(btnDef); + } + + if ( m_dialogStyle & wxCANCEL ) + { + wxButton * const + cancel = new wxButton(this, wxID_CANCEL, GetCustomCancelLabel()); + sizerStd->AddButton(cancel); + + if ( m_dialogStyle & wxCANCEL_DEFAULT ) + btnDef = cancel; + } + + if ( m_dialogStyle & wxYES_NO ) + { + wxButton * const + yes = new wxButton(this, wxID_YES, GetCustomYesLabel()); + sizerStd->AddButton(yes); + + wxButton * const + no = new wxButton(this, wxID_NO, GetCustomNoLabel()); + sizerStd->AddButton(no); + if ( m_dialogStyle & wxNO_DEFAULT ) + btnDef = no; + else if ( !btnDef ) + btnDef = yes; + } + + if ( m_dialogStyle & wxHELP ) + { + wxButton * const + help = new wxButton(this, wxID_HELP, GetCustomHelpLabel()); + sizerStd->AddButton(help); + } + + if ( btnDef ) + { + btnDef->SetDefault(); + btnDef->SetFocus(); + } + + sizerStd->Realize(); + + return CreateSeparatedSizer(sizerStd); + } +#endif // !__SMARTPHONE__ + + // Use standard labels for all buttons + return CreateSeparatedButtonSizer + ( + m_dialogStyle & (wxOK | wxCANCEL | wxHELP | wxYES_NO | + wxNO_DEFAULT | wxCANCEL_DEFAULT) + ); +} + +void wxGenericMessageDialog::DoCreateMsgdialog() +{ + wxDialog::Create(m_parent, wxID_ANY, m_caption, m_pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE); + + wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer *icon_text = new wxBoxSizer( wxHORIZONTAL ); + +#if wxUSE_STATBMP + // 1) icon + if (m_dialogStyle & wxICON_MASK) + { + wxStaticBitmap *icon = new wxStaticBitmap + ( + this, + wxID_ANY, + wxArtProvider::GetMessageBoxIcon(m_dialogStyle) + ); + if ( wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA ) + topsizer->Add( icon, 0, wxTOP|wxLEFT|wxRIGHT | wxALIGN_LEFT, 10 ); + else + icon_text->Add(icon, wxSizerFlags().Top().Border(wxRIGHT, 20)); + } +#endif // wxUSE_STATBMP + +#if wxUSE_STATTEXT + // 2) text + + wxBoxSizer * const textsizer = new wxBoxSizer(wxVERTICAL); + + // We want to show the main message in a different font to make it stand + // out if the extended message is used as well. This looks better and is + // more consistent with the native dialogs under MSW and GTK. + wxString lowerMessage; + if ( !m_extendedMessage.empty() ) + { + wxTitleTextWrapper titleWrapper(this); + textsizer->Add(CreateTextSizer(GetMessage(), titleWrapper), + wxSizerFlags().Border(wxBOTTOM, 20)); + + lowerMessage = GetExtendedMessage(); + } + else // no extended message + { + lowerMessage = GetMessage(); + } + + textsizer->Add(CreateTextSizer(lowerMessage)); + + icon_text->Add(textsizer, 0, wxALIGN_CENTER, 10); + topsizer->Add( icon_text, 1, wxLEFT|wxRIGHT|wxTOP, 10 ); +#endif // wxUSE_STATTEXT + + // 3) optional checkbox and detailed text + AddMessageDialogCheckBox( topsizer ); + AddMessageDialogDetails( topsizer ); + + // 4) buttons + wxSizer *sizerBtn = CreateMsgDlgButtonSizer(); + if ( sizerBtn ) + topsizer->Add(sizerBtn, 0, wxEXPAND | wxALL, 10 ); + + SetAutoLayout( true ); + SetSizer( topsizer ); + + topsizer->SetSizeHints( this ); + topsizer->Fit( this ); + wxSize size( GetSize() ); + if (size.x < size.y*3/2) + { + size.x = size.y*3/2; + SetSize( size ); + } + + Centre( wxBOTH | wxCENTER_FRAME); +} + +void wxGenericMessageDialog::OnYes(wxCommandEvent& WXUNUSED(event)) +{ + EndModal( wxID_YES ); +} + +void wxGenericMessageDialog::OnNo(wxCommandEvent& WXUNUSED(event)) +{ + EndModal( wxID_NO ); +} + +void wxGenericMessageDialog::OnHelp(wxCommandEvent& WXUNUSED(event)) +{ + EndModal( wxID_HELP ); +} + +void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) +{ + // Allow cancellation via ESC/Close button except if + // only YES and NO are specified. + const long style = GetMessageDialogStyle(); + if ( (style & wxYES_NO) != wxYES_NO || (style & wxCANCEL) ) + { + EndModal( wxID_CANCEL ); + } +} + +int wxGenericMessageDialog::ShowModal() +{ + WX_HOOK_MODAL_DIALOG(); + + if ( !m_created ) + { + m_created = true; + DoCreateMsgdialog(); + } + + return wxMessageDialogBase::ShowModal(); +} + +#endif // wxUSE_MSGDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/notebook.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/notebook.cpp new file mode 100644 index 0000000000..8caf0cda1e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/notebook.cpp @@ -0,0 +1,755 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/notebook.cpp +// Purpose: generic implementation of wxNotebook +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_NOTEBOOK + +#include "wx/notebook.h" + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/log.h" + #include "wx/dcclient.h" + #include "wx/settings.h" +#endif + +#include "wx/imaglist.h" +#include "wx/generic/tabg.h" + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// check that the page index is valid +#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount()) + +// ---------------------------------------------------------------------------- +// event table +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase) + EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange) + EVT_SIZE(wxNotebook::OnSize) + EVT_PAINT(wxNotebook::OnPaint) + EVT_MOUSE_EVENTS(wxNotebook::OnMouseEvent) + EVT_SET_FOCUS(wxNotebook::OnSetFocus) + EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) +END_EVENT_TABLE() + +// ============================================================================ +// implementation +// ============================================================================ + +// ============================================================================ +// Private class +// ============================================================================ + +WX_DECLARE_HASH_MAP(int, wxNotebookPage*, wxIntegerHash, wxIntegerEqual, + wxIntToNotebookPageHashMap); + +WX_DECLARE_HASH_MAP(wxNotebookPage*, int, wxPointerHash, wxPointerEqual, + wxNotebookPageToIntHashMap); + +// This reuses wxTabView to draw the tabs. +class WXDLLEXPORT wxNotebookTabView: public wxTabView +{ +DECLARE_DYNAMIC_CLASS(wxNotebookTabView) +public: + wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR); + virtual ~wxNotebookTabView(void); + + // Called when a tab is activated + virtual void OnTabActivate(int activateId, int deactivateId); + // Allows vetoing + virtual bool OnTabPreActivate(int activateId, int deactivateId); + + // map integer ids used by wxTabView to wxNotebookPage pointers + int GetId(wxNotebookPage *page); + wxNotebookPage *GetPage(int id) { return m_idToPage[id]; } + +protected: + wxNotebook* m_notebook; + +private: + wxIntToNotebookPageHashMap m_idToPage; + wxNotebookPageToIntHashMap m_pageToId; + int m_nextid; +}; + +static int GetPageId(wxTabView *tabview, wxNotebookPage *page) +{ + return static_cast(tabview)->GetId(page); +} + +// ---------------------------------------------------------------------------- +// wxNotebook construction +// ---------------------------------------------------------------------------- + +// common part of all ctors +void wxNotebook::Init() +{ + m_tabView = NULL; + m_selection = -1; +} + +// default for dynamic class +wxNotebook::wxNotebook() +{ + Init(); +} + +// the same arguments as for wxControl +wxNotebook::wxNotebook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + Init(); + + Create(parent, id, pos, size, style, name); +} + +// Create() function +bool wxNotebook::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + // base init + SetName(name); + + if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT ) + style |= wxBK_TOP; + + m_windowId = id == wxID_ANY ? NewControlId() : id; + + if (!wxControl::Create(parent, id, pos, size, style|wxNO_BORDER, wxDefaultValidator, name)) + return false; + + SetTabView(new wxNotebookTabView(this)); + + return true; +} + +// dtor +wxNotebook::~wxNotebook() +{ + delete m_tabView; +} + +// ---------------------------------------------------------------------------- +// wxNotebook accessors +// ---------------------------------------------------------------------------- +int wxNotebook::GetRowCount() const +{ + // TODO + return 0; +} + +int wxNotebook::SetSelection(size_t nPage) +{ + wxASSERT( IS_VALID_PAGE(nPage) ); + + wxNotebookPage* pPage = GetPage(nPage); + + m_tabView->SetTabSelection(GetPageId(m_tabView, pPage)); + + // TODO + return 0; +} + +int wxNotebook::ChangeSelection(size_t nPage) +{ + // FIXME: currently it does generate events too + return SetSelection(nPage); +} + +#if 0 +void wxNotebook::AdvanceSelection(bool bForward) +{ + int nSel = GetSelection(); + int nMax = GetPageCount() - 1; + if ( bForward ) + SetSelection(nSel == nMax ? 0 : nSel + 1); + else + SetSelection(nSel == 0 ? nMax : nSel - 1); +} +#endif + +bool wxNotebook::SetPageText(size_t nPage, const wxString& strText) +{ + wxASSERT( IS_VALID_PAGE(nPage) ); + + wxNotebookPage* page = GetPage(nPage); + if (page) + { + m_tabView->SetTabText(GetPageId(m_tabView, page), strText); + Refresh(); + return true; + } + + return false; +} + +wxString wxNotebook::GetPageText(size_t nPage) const +{ + wxASSERT( IS_VALID_PAGE(nPage) ); + + wxNotebookPage* page = ((wxNotebook*)this)->GetPage(nPage); + if (page) + return m_tabView->GetTabText(GetPageId(m_tabView, page)); + else + return wxEmptyString; +} + +int wxNotebook::GetPageImage(size_t WXUNUSED_UNLESS_DEBUG(nPage)) const +{ + wxASSERT( IS_VALID_PAGE(nPage) ); + + // TODO + return 0; +} + +bool wxNotebook::SetPageImage(size_t WXUNUSED_UNLESS_DEBUG(nPage), + int WXUNUSED(nImage)) +{ + wxASSERT( IS_VALID_PAGE(nPage) ); + + // TODO + return false; +} + +// set the size (the same for all pages) +void wxNotebook::SetPageSize(const wxSize& WXUNUSED(size)) +{ + // TODO +} + +// set the padding between tabs (in pixels) +void wxNotebook::SetPadding(const wxSize& WXUNUSED(padding)) +{ + // TODO +} + +// set the size of the tabs for wxNB_FIXEDWIDTH controls +void wxNotebook::SetTabSize(const wxSize& WXUNUSED(sz)) +{ + // TODO +} + +// ---------------------------------------------------------------------------- +// wxNotebook operations +// ---------------------------------------------------------------------------- + +// remove one page from the notebook and delete it +bool wxNotebook::DeletePage(size_t nPage) +{ + wxCHECK( IS_VALID_PAGE(nPage), false ); + + if (m_selection != -1) + { + m_pages[m_selection]->Show(false); + m_pages[m_selection]->Lower(); + } + + wxNotebookPage* pPage = GetPage(nPage); + + m_tabView->RemoveTab(GetPageId(m_tabView, pPage)); + + m_pages.Remove(pPage); + delete pPage; + + if (m_pages.GetCount() == 0) + { + m_selection = -1; + m_tabView->SetTabSelection(-1, false); + } + else if (m_selection > -1) + { + m_selection = -1; + + m_tabView->SetTabSelection(GetPageId(m_tabView, GetPage(0)), false); + + if (m_selection != 0) + ChangePage(-1, 0); + } + + RefreshLayout(false); + + return true; +} + +bool wxNotebook::DeletePage(wxNotebookPage* page) +{ + int pagePos = FindPagePosition(page); + if (pagePos > -1) + return DeletePage(pagePos); + else + return false; +} + +bool wxNotebook::RemovePage(size_t nPage) +{ + return DoRemovePage(nPage) != NULL; +} + +// remove one page from the notebook +wxWindow* wxNotebook::DoRemovePage(size_t nPage) +{ + wxCHECK( IS_VALID_PAGE(nPage), NULL ); + + m_pages[nPage]->Show(false); + // m_pages[nPage]->Lower(); + + wxNotebookPage* pPage = GetPage(nPage); + + m_tabView->RemoveTab(GetPageId(m_tabView, pPage)); + + m_pages.Remove(pPage); + + if (m_pages.GetCount() == 0) + { + m_selection = -1; + m_tabView->SetTabSelection(-1, true); + } + else if (m_selection > -1) + { + // Only change the selection if the page we + // deleted was the selection. + if (nPage == (size_t)m_selection) + { + m_selection = -1; + // Select the first tab. Generates a ChangePage. + m_tabView->SetTabSelection(0, true); + } + else + { + // We must adjust which tab we think is selected. + // If greater than the page we deleted, it must be moved down + // a notch. + if (size_t(m_selection) > nPage) + m_selection -- ; + } + } + + RefreshLayout(false); + + return pPage; +} + +bool wxNotebook::RemovePage(wxNotebookPage* page) +{ + int pagePos = FindPagePosition(page); + if (pagePos > -1) + return RemovePage(pagePos); + else + return false; +} + +// Find the position of the wxNotebookPage, -1 if not found. +int wxNotebook::FindPagePosition(wxNotebookPage* page) const +{ + size_t nPageCount = GetPageCount(); + size_t nPage; + for ( nPage = 0; nPage < nPageCount; nPage++ ) + if (m_pages[nPage] == page) + return nPage; + return -1; +} + +// remove all pages +bool wxNotebook::DeleteAllPages() +{ + m_tabView->ClearTabs(true); + + size_t nPageCount = GetPageCount(); + size_t nPage; + for ( nPage = 0; nPage < nPageCount; nPage++ ) + delete m_pages[nPage]; + + m_pages.Clear(); + + return true; +} + +// same as AddPage() but does it at given position +bool wxNotebook::InsertPage(size_t nPage, + wxNotebookPage *pPage, + const wxString& strText, + bool bSelect, + int WXUNUSED(imageId)) +{ + wxASSERT( pPage != NULL ); + wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), false ); + + m_tabView->AddTab(GetPageId(m_tabView, pPage), strText); + + if (!bSelect) + pPage->Show(false); + + // save the pointer to the page + m_pages.Insert(pPage, nPage); + + if (bSelect) + { + // This will cause ChangePage to be called, via OnSelPage + + m_tabView->SetTabSelection(GetPageId(m_tabView, pPage), true); + } + + // some page must be selected: either this one or the first one if there is + // still no selection + if ( m_selection == -1 ) + ChangePage(-1, 0); + + RefreshLayout(false); + + return true; +} + +// ---------------------------------------------------------------------------- +// wxNotebook callbacks +// ---------------------------------------------------------------------------- + +// @@@ OnSize() is used for setting the font when it's called for the first +// time because doing it in ::Create() doesn't work (for unknown reasons) +void wxNotebook::OnSize(wxSizeEvent& event) +{ + static bool s_bFirstTime = true; + if ( s_bFirstTime ) { + // TODO: any first-time-size processing. + s_bFirstTime = false; + } + + RefreshLayout(); + + // Processing continues to next OnSize + event.Skip(); +} + +// This was supposed to cure the non-display of the notebook +// until the user resizes the window. +// What's going on? +void wxNotebook::OnInternalIdle() +{ + wxWindow::OnInternalIdle(); + +#if 0 + static bool s_bFirstTime = true; + if ( s_bFirstTime ) { + /* + wxSize sz(GetSize()); + sz.x ++; + SetSize(sz); + sz.x --; + SetSize(sz); + */ + + /* + wxSize sz(GetSize()); + wxSizeEvent sizeEvent(sz, GetId()); + sizeEvent.SetEventObject(this); + GetEventHandler()->ProcessEvent(sizeEvent); + Refresh(); + */ + s_bFirstTime = false; + } +#endif +} + +// Implementation: calculate the layout of the view rect +// and resize the children if required +bool wxNotebook::RefreshLayout(bool force) +{ + if (m_tabView) + { + wxRect oldRect = m_tabView->GetViewRect(); + + int cw, ch; + GetClientSize(& cw, & ch); + + int tabHeight = m_tabView->GetTotalTabHeight(); + wxRect rect; + rect.x = 4; + rect.y = tabHeight + 4; + rect.width = cw - 8; + rect.height = ch - 4 - rect.y ; + + m_tabView->SetViewRect(rect); + + m_tabView->LayoutTabs(); + + // Need to do it a 2nd time to get the tab height with + // the new view width, since changing the view width changes the + // tab layout. + tabHeight = m_tabView->GetTotalTabHeight(); + rect.x = 4; + rect.y = tabHeight + 4; + rect.width = cw - 8; + rect.height = ch - 4 - rect.y ; + + m_tabView->SetViewRect(rect); + + m_tabView->LayoutTabs(); + + if (!force && (rect == oldRect)) + return false; + + // fit the notebook page to the tab control's display area + + size_t nCount = m_pages.Count(); + for ( size_t nPage = 0; nPage < nCount; nPage++ ) { + wxNotebookPage *pPage = m_pages[nPage]; + wxRect clientRect = GetAvailableClientSize(); + if (pPage->IsShown()) + { + pPage->SetSize(clientRect.x, clientRect.y, clientRect.width, clientRect.height); + if ( pPage->GetAutoLayout() ) + pPage->Layout(); + } + } + Refresh(); + } + return true; +} + +void wxNotebook::OnSelChange(wxBookCtrlEvent& event) +{ + // is it our tab control? + if ( event.GetEventObject() == this ) + { + if (event.GetSelection() != m_selection) + ChangePage(event.GetOldSelection(), event.GetSelection()); + } + + // we want to give others a chance to process this message as well + event.Skip(); +} + +void wxNotebook::OnSetFocus(wxFocusEvent& event) +{ + // set focus to the currently selected page if any + if ( m_selection != -1 ) + m_pages[m_selection]->SetFocus(); + + event.Skip(); +} + +void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event) +{ + if ( event.IsWindowChange() ) + { + // change pages + AdvanceSelection(event.GetDirection()); + } + else { + // pass to the parent + if ( GetParent() ) + { + event.SetCurrentFocus(this); + GetParent()->ProcessWindowEvent(event); + } + } +} + +// ---------------------------------------------------------------------------- +// wxNotebook base class virtuals +// ---------------------------------------------------------------------------- + +// override these 2 functions to do nothing: everything is done in OnSize + +void wxNotebook::SetConstraintSizes(bool /* recurse */) +{ + // don't set the sizes of the pages - their correct size is not yet known + wxControl::SetConstraintSizes(false); +} + +bool wxNotebook::DoPhase(int /* nPhase */) +{ + return true; +} + +void wxNotebook::Command(wxCommandEvent& WXUNUSED(event)) +{ + wxFAIL_MSG(wxT("wxNotebook::Command not implemented")); +} + +// ---------------------------------------------------------------------------- +// wxNotebook helper functions +// ---------------------------------------------------------------------------- + +// hide the currently active panel and show the new one +void wxNotebook::ChangePage(int nOldSel, int nSel) +{ + // cout << "ChangePage: " << nOldSel << ", " << nSel << "\n"; + wxASSERT( nOldSel != nSel ); // impossible + + if ( nOldSel != -1 ) { + m_pages[nOldSel]->Show(false); + m_pages[nOldSel]->Lower(); + } + + wxNotebookPage *pPage = m_pages[nSel]; + + wxRect clientRect = GetAvailableClientSize(); + pPage->SetSize(clientRect.x, clientRect.y, clientRect.width, clientRect.height); + + Refresh(); + + pPage->Show(true); + pPage->Raise(); + pPage->SetFocus(); + + m_selection = nSel; +} + +void wxNotebook::OnMouseEvent(wxMouseEvent& event) +{ + if (m_tabView) + m_tabView->OnEvent(event); +} + +void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event) ) +{ + wxPaintDC dc(this); + if (m_tabView) + m_tabView->Draw(dc); +} + +wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const +{ + // MBN: since the total tab height is really a function of the + // width, this should really call + // GetTotalTabHeightPretendingWidthIs(), but the current + // implementation will suffice, provided the wxNotebook has been + // created with a sensible initial width. + return wxSize( sizePage.x + 12, + sizePage.y + m_tabView->GetTotalTabHeight() + 6 + 4 ); +} + +wxRect wxNotebook::GetAvailableClientSize() +{ + int cw, ch; + GetClientSize(& cw, & ch); + + int tabHeight = m_tabView->GetTotalTabHeight(); + + // TODO: these margins should be configurable. + wxRect rect; + rect.x = 6; + rect.y = tabHeight + 6; + rect.width = cw - 12; + rect.height = ch - 4 - rect.y ; + + return rect; +} + +/* + * wxNotebookTabView + */ + +IMPLEMENT_CLASS(wxNotebookTabView, wxTabView) + +wxNotebookTabView::wxNotebookTabView(wxNotebook *notebook, long style) + : wxTabView(style), m_nextid(1) +{ + m_notebook = notebook; + + m_notebook->SetTabView(this); + + SetWindow(m_notebook); +} + +wxNotebookTabView::~wxNotebookTabView(void) +{ +} + +int wxNotebookTabView::GetId(wxNotebookPage *page) +{ + int& id = m_pageToId[page]; + + if (!id) + { + id = m_nextid++; + m_idToPage[id] = page; + } + + return id; +} + +// Called when a tab is activated +void wxNotebookTabView::OnTabActivate(int activateId, int deactivateId) +{ + if (!m_notebook) + return; + + wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId()); + + // Translate from wxTabView's ids (which aren't position-dependent) + // to wxNotebook's (which are). + wxNotebookPage* pActive = GetPage(activateId); + wxNotebookPage* pDeactive = GetPage(deactivateId); + + int activatePos = m_notebook->FindPagePosition(pActive); + int deactivatePos = m_notebook->FindPagePosition(pDeactive); + + event.SetEventObject(m_notebook); + event.SetSelection(activatePos); + event.SetOldSelection(deactivatePos); + m_notebook->GetEventHandler()->ProcessEvent(event); +} + +// Allows Vetoing +bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId) +{ + bool retval = true; + + if (m_notebook) + { + wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGING, m_notebook->GetId()); + + // Translate from wxTabView's ids (which aren't position-dependent) + // to wxNotebook's (which are). + wxNotebookPage* pActive = GetPage(activateId); + wxNotebookPage* pDeactive = GetPage(deactivateId); + + int activatePos = m_notebook->FindPagePosition(pActive); + int deactivatePos = m_notebook->FindPagePosition(pDeactive); + + event.SetEventObject(m_notebook); + event.SetSelection(activatePos); + event.SetOldSelection(deactivatePos); + if (m_notebook->GetEventHandler()->ProcessEvent(event)) + { + retval = event.IsAllowed(); + } + } + return retval; +} + +#endif // wxUSE_NOTEBOOK diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/notifmsgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/notifmsgg.cpp new file mode 100644 index 0000000000..c941cfa39b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/notifmsgg.cpp @@ -0,0 +1,244 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/notifmsgg.cpp +// Purpose: generic implementation of wxGenericNotificationMessage +// Author: Vadim Zeitlin +// Created: 2007-11-24 +// Copyright: (c) 2007 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef wxUSE_LIBHILDON + #define wxUSE_LIBHILDON 0 +#endif + +#ifndef wxUSE_LIBHILDON2 + #define wxUSE_LIBHILDON2 0 +#endif + +#if wxUSE_NOTIFICATION_MESSAGE && (!wxUSE_LIBHILDON || !wxUSE_LIBHILDON2) + +#ifndef WX_PRECOMP + #include "wx/dialog.h" + #include "wx/timer.h" + #include "wx/sizer.h" + #include "wx/statbmp.h" +#endif //WX_PRECOMP + +#include "wx/artprov.h" + +// even if the platform has the native implementation, we still normally want +// to use the generic one (unless it's totally unsuitable for the target UI as +// is the case of Hildon) because it may provide more features, so include +// wx/generic/notifmsg.h to get wxGenericNotificationMessage declaration even +// if wx/notifmsg.h only declares wxNotificationMessage itself (if it already +// uses the generic version, the second inclusion will do no harm) +#include "wx/notifmsg.h" +#include "wx/generic/notifmsg.h" + +// ---------------------------------------------------------------------------- +// wxNotificationMessageDialog +// ---------------------------------------------------------------------------- + +class wxNotificationMessageDialog : public wxDialog +{ +public: + wxNotificationMessageDialog(wxWindow *parent, + const wxString& text, + int timeout, + int flags); + + void Set(wxWindow *parent, + const wxString& text, + int timeout, + int flags); + + bool IsAutomatic() const { return m_timer.IsRunning(); } + void SetDeleteOnHide() { m_deleteOnHide = true; } + +private: + void OnClose(wxCloseEvent& event); + void OnTimer(wxTimerEvent& event); + + // if true, delete the dialog when it should disappear, otherwise just hide + // it (initially false) + bool m_deleteOnHide; + + // timer which will hide this dialog when it expires, if it's not running + // it means we were created without timeout + wxTimer m_timer; + + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxNotificationMessageDialog); +}; + +// ============================================================================ +// wxNotificationMessageDialog implementation +// ============================================================================ + +BEGIN_EVENT_TABLE(wxNotificationMessageDialog, wxDialog) + EVT_CLOSE(wxNotificationMessageDialog::OnClose) + + EVT_TIMER(wxID_ANY, wxNotificationMessageDialog::OnTimer) +END_EVENT_TABLE() + +wxNotificationMessageDialog::wxNotificationMessageDialog(wxWindow *parent, + const wxString& text, + int timeout, + int flags) + : wxDialog(parent, wxID_ANY, _("Notice"), + wxDefaultPosition, wxDefaultSize, + 0 /* no caption, no border styles */), + m_timer(this) +{ + m_deleteOnHide = false; + + Set(parent, text, timeout, flags); +} + +void +wxNotificationMessageDialog::Set(wxWindow * WXUNUSED(parent), + const wxString& text, + int timeout, + int flags) +{ + wxSizer * const sizerTop = new wxBoxSizer(wxHORIZONTAL); + if ( flags & wxICON_MASK ) + { + sizerTop->Add(new wxStaticBitmap + ( + this, + wxID_ANY, + wxArtProvider::GetMessageBoxIcon(flags) + ), + wxSizerFlags().Centre().Border()); + } + + sizerTop->Add(CreateTextSizer(text), wxSizerFlags(1).Border()); + SetSizerAndFit(sizerTop); + + if ( timeout != wxGenericNotificationMessage::Timeout_Never ) + { + // wxTimer uses ms, timeout is in seconds + m_timer.Start(timeout*1000, true /* one shot only */); + } + else if ( m_timer.IsRunning() ) + { + m_timer.Stop(); + } +} + +void wxNotificationMessageDialog::OnClose(wxCloseEvent& event) +{ + if ( m_deleteOnHide ) + { + // we don't need to keep this dialog alive any more + Destroy(); + } + else // don't really close, just hide, as we can be shown again later + { + event.Veto(); + + Hide(); + } +} + +void wxNotificationMessageDialog::OnTimer(wxTimerEvent& WXUNUSED(event)) +{ + if ( m_deleteOnHide ) + Destroy(); + else + Hide(); +} + +// ============================================================================ +// wxGenericNotificationMessage implementation +// ============================================================================ + +int wxGenericNotificationMessage::ms_timeout = 10; + +/* static */ void wxGenericNotificationMessage::SetDefaultTimeout(int timeout) +{ + wxASSERT_MSG( timeout > 0, + "negative or zero default timeout doesn't make sense" ); + + ms_timeout = timeout; +} + +void wxGenericNotificationMessage::Init() +{ + m_dialog = NULL; +} + +wxGenericNotificationMessage::~wxGenericNotificationMessage() +{ + if ( m_dialog->IsAutomatic() ) + { + // we want to allow the user to create an automatically hidden + // notification just by creating a local wxGenericNotificationMessage object + // and so we shouldn't hide the notification when this object goes out + // of scope + m_dialog->SetDeleteOnHide(); + } + else // manual dialog, hide it immediately + { + // OTOH for permanently shown dialogs only the code can hide them and + // if the object is deleted, we must do it now as it won't be + // accessible programmatically any more + delete m_dialog; + } +} + +bool wxGenericNotificationMessage::Show(int timeout) +{ + if ( timeout == Timeout_Auto ) + { + timeout = GetDefaultTimeout(); + } + + if ( !m_dialog ) + { + m_dialog = new wxNotificationMessageDialog + ( + GetParent(), + GetFullMessage(), + timeout, + GetFlags() + ); + } + else // update the existing dialog + { + m_dialog->Set(GetParent(), GetFullMessage(), timeout, GetFlags()); + } + + m_dialog->Show(); + + return true; +} + +bool wxGenericNotificationMessage::Close() +{ + if ( !m_dialog ) + return false; + + m_dialog->Hide(); + + return true; +} + +#endif // wxUSE_NOTIFICATION_MESSAGE && (!wxUSE_LIBHILDON || !wxUSE_LIBHILDON2) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/numdlgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/numdlgg.cpp new file mode 100644 index 0000000000..8b742e7edd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/numdlgg.cpp @@ -0,0 +1,181 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/numdlgg.cpp +// Purpose: wxGetNumberFromUser implementation +// Author: Vadim Zeitlin +// Modified by: +// Created: 23.07.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_NUMBERDLG + +#ifndef WX_PRECOMP + #include + + #include "wx/utils.h" + #include "wx/dialog.h" + #include "wx/button.h" + #include "wx/stattext.h" + #include "wx/textctrl.h" + #include "wx/intl.h" + #include "wx/sizer.h" +#endif + +#if wxUSE_STATLINE + #include "wx/statline.h" +#endif + +#if wxUSE_SPINCTRL +#include "wx/spinctrl.h" +#endif + +// this is where wxGetNumberFromUser() is declared +#include "wx/numdlg.h" + +#if !wxUSE_SPINCTRL + // wxTextCtrl will do instead of wxSpinCtrl if we don't have it + #define wxSpinCtrl wxTextCtrl +#endif + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxNumberEntryDialog +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxNumberEntryDialog, wxDialog) + EVT_BUTTON(wxID_OK, wxNumberEntryDialog::OnOK) + EVT_BUTTON(wxID_CANCEL, wxNumberEntryDialog::OnCancel) +END_EVENT_TABLE() + +IMPLEMENT_CLASS(wxNumberEntryDialog, wxDialog) + +wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent, + const wxString& message, + const wxString& prompt, + const wxString& caption, + long value, + long min, + long max, + const wxPoint& pos) + : wxDialog(GetParentForModalDialog(parent, 0), + wxID_ANY, caption, + pos, wxDefaultSize) +{ + m_value = value; + m_max = max; + m_min = min; + + wxBeginBusyCursor(); + + wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); +#if wxUSE_STATTEXT + // 1) text message + topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 ); +#endif + + // 2) prompt and text ctrl + wxBoxSizer *inputsizer = new wxBoxSizer( wxHORIZONTAL ); + +#if wxUSE_STATTEXT + // prompt if any + if (!prompt.empty()) + inputsizer->Add( new wxStaticText( this, wxID_ANY, prompt ), 0, wxCENTER | wxLEFT, 10 ); +#endif + + // spin ctrl + wxString valStr; + valStr.Printf(wxT("%ld"), m_value); + m_spinctrl = new wxSpinCtrl(this, wxID_ANY, valStr, wxDefaultPosition, wxSize( 140, wxDefaultCoord ), wxSP_ARROW_KEYS, (int)m_min, (int)m_max, (int)m_value); + inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 ); + // add both + topsizer->Add( inputsizer, 0, wxEXPAND | wxLEFT|wxRIGHT, 5 ); + + // 3) buttons if any + wxSizer *buttonSizer = CreateSeparatedButtonSizer(wxOK | wxCANCEL); + if ( buttonSizer ) + { + topsizer->Add(buttonSizer, wxSizerFlags().Expand().DoubleBorder()); + } + + SetSizer( topsizer ); + SetAutoLayout( true ); + + topsizer->SetSizeHints( this ); + topsizer->Fit( this ); + + Centre( wxBOTH ); + + m_spinctrl->SetSelection(-1, -1); + m_spinctrl->SetFocus(); + + wxEndBusyCursor(); +} + +void wxNumberEntryDialog::OnOK(wxCommandEvent& WXUNUSED(event)) +{ +#if !wxUSE_SPINCTRL + wxString tmp = m_spinctrl->GetValue(); + if ( wxSscanf(tmp, wxT("%ld"), &m_value) != 1 ) + EndModal(wxID_CANCEL); + else +#else + m_value = m_spinctrl->GetValue(); +#endif + if ( m_value < m_min || m_value > m_max ) + { + // not a number or out of range + m_value = -1; + EndModal(wxID_CANCEL); + } + + EndModal(wxID_OK); +} + +void wxNumberEntryDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) +{ + EndModal(wxID_CANCEL); +} + +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +// wxGetTextFromUser is in utilscmn.cpp + +long wxGetNumberFromUser(const wxString& msg, + const wxString& prompt, + const wxString& title, + long value, + long min, + long max, + wxWindow *parent, + const wxPoint& pos) +{ + wxNumberEntryDialog dialog(parent, msg, prompt, title, + value, min, max, pos); + if (dialog.ShowModal() == wxID_OK) + return dialog.GetValue(); + + return -1; +} + +#endif // wxUSE_NUMBERDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/odcombo.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/odcombo.cpp new file mode 100644 index 0000000000..d48bf5a085 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/odcombo.cpp @@ -0,0 +1,1208 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/odcombo.cpp +// Purpose: wxOwnerDrawnComboBox, wxVListBoxComboPopup +// Author: Jaakko Salli +// Modified by: +// Created: Apr-30-2006 +// Copyright: (c) 2005 Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ODCOMBOBOX + +#include "wx/odcombo.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/combobox.h" + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/dialog.h" + #include "wx/textctrl.h" +#endif + +#include "wx/combo.h" + +// ============================================================================ +// implementation +// ============================================================================ + +// time in milliseconds before partial completion buffer drops +#define wxODCB_PARTIAL_COMPLETION_TIME 1000 + +// ---------------------------------------------------------------------------- +// wxVListBoxComboPopup is a wxVListBox customized to act as a popup control +// +// ---------------------------------------------------------------------------- + + +BEGIN_EVENT_TABLE(wxVListBoxComboPopup, wxVListBox) + EVT_MOTION(wxVListBoxComboPopup::OnMouseMove) + EVT_KEY_DOWN(wxVListBoxComboPopup::OnKey) + EVT_CHAR(wxVListBoxComboPopup::OnChar) + EVT_LEFT_UP(wxVListBoxComboPopup::OnLeftClick) +END_EVENT_TABLE() + + +void wxVListBoxComboPopup::Init() +{ + m_widestWidth = 0; + m_widestItem = -1; + m_widthsDirty = false; + m_findWidest = false; + m_itemHeight = 0; + m_value = -1; + m_itemHover = -1; + m_clientDataItemsType = wxClientData_None; + m_partialCompletionString = wxEmptyString; +} + +bool wxVListBoxComboPopup::Create(wxWindow* parent) +{ + if ( !wxVListBox::Create(parent, + wxID_ANY, + wxDefaultPosition, + wxDefaultSize, + wxBORDER_SIMPLE | wxLB_INT_HEIGHT | wxWANTS_CHARS) ) + return false; + + m_useFont = m_combo->GetFont(); + + wxVListBox::SetItemCount(m_strings.GetCount()); + + // TODO: Move this to SetFont + m_itemHeight = GetCharHeight() + 0; + + return true; +} + +wxVListBoxComboPopup::~wxVListBoxComboPopup() +{ + Clear(); +} + +void wxVListBoxComboPopup::SetFocus() +{ + // Suppress SetFocus() warning by simply not calling it. This combo popup + // has already been designed with the assumption that SetFocus() may not + // do anything useful, so it really doesn't need to be called. +#ifdef __WXMSW__ + // +#else + wxVListBox::SetFocus(); +#endif +} + +bool wxVListBoxComboPopup::LazyCreate() +{ + // NB: There is a bug with wxVListBox that can be avoided by creating + // it later (bug causes empty space to be shown if initial selection + // is at the end of a list longer than the control can show at once). + return true; +} + +// paint the control itself +void wxVListBoxComboPopup::PaintComboControl( wxDC& dc, const wxRect& rect ) +{ + if ( !(m_combo->GetWindowStyle() & wxODCB_STD_CONTROL_PAINT) ) + { + int flags = wxODCB_PAINTING_CONTROL; + + if ( m_combo->ShouldDrawFocus() ) + flags |= wxODCB_PAINTING_SELECTED; + + OnDrawBg(dc, rect, m_value, flags); + + if ( m_value >= 0 ) + { + OnDrawItem(dc,rect,m_value,flags); + return; + } + } + + wxComboPopup::PaintComboControl(dc,rect); +} + +void wxVListBoxComboPopup::OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const +{ + // TODO: Maybe this code could be moved to wxVListBox::OnPaint? + dc.SetFont(m_useFont); + + int flags = 0; + + // Set correct text colour for selected items + if ( wxVListBox::GetSelection() == (int) n ) + { + dc.SetTextForeground( wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT) ); + flags |= wxODCB_PAINTING_SELECTED; + } + else + { + dc.SetTextForeground( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT) ); + } + + OnDrawItem(dc,rect,(int)n,flags); +} + +wxCoord wxVListBoxComboPopup::OnMeasureItem(size_t n) const +{ + wxOwnerDrawnComboBox* combo = (wxOwnerDrawnComboBox*) m_combo; + + wxASSERT_MSG( wxDynamicCast(combo, wxOwnerDrawnComboBox), + wxT("you must subclass wxVListBoxComboPopup for drawing and measuring methods") ); + + wxCoord h = combo->OnMeasureItem(n); + if ( h < 0 ) + h = m_itemHeight; + return h; +} + +wxCoord wxVListBoxComboPopup::OnMeasureItemWidth(size_t n) const +{ + wxOwnerDrawnComboBox* combo = (wxOwnerDrawnComboBox*) m_combo; + + wxASSERT_MSG( wxDynamicCast(combo, wxOwnerDrawnComboBox), + wxT("you must subclass wxVListBoxComboPopup for drawing and measuring methods") ); + + return combo->OnMeasureItemWidth(n); +} + +void wxVListBoxComboPopup::OnDrawBg( wxDC& dc, + const wxRect& rect, + int item, + int flags ) const +{ + wxOwnerDrawnComboBox* combo = (wxOwnerDrawnComboBox*) m_combo; + + wxASSERT_MSG( wxDynamicCast(combo, wxOwnerDrawnComboBox), + wxT("you must subclass wxVListBoxComboPopup for drawing and measuring methods") ); + + if ( IsCurrent((size_t)item) && !(flags & wxODCB_PAINTING_CONTROL) ) + flags |= wxODCB_PAINTING_SELECTED; + + combo->OnDrawBackground(dc,rect,item,flags); +} + +void wxVListBoxComboPopup::OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const +{ + OnDrawBg(dc,rect,(int)n,0); +} + +// This is called from wxVListBoxComboPopup::OnDrawItem, with text colour and font prepared +void wxVListBoxComboPopup::OnDrawItem( wxDC& dc, const wxRect& rect, int item, int flags ) const +{ + wxOwnerDrawnComboBox* combo = (wxOwnerDrawnComboBox*) m_combo; + + wxASSERT_MSG( wxDynamicCast(combo, wxOwnerDrawnComboBox), + wxT("you must subclass wxVListBoxComboPopup for drawing and measuring methods") ); + + combo->OnDrawItem(dc,rect,item,flags); +} + +void wxVListBoxComboPopup::DismissWithEvent() +{ + StopPartialCompletion(); + + int selection = wxVListBox::GetSelection(); + + Dismiss(); + + if ( selection != wxNOT_FOUND ) + m_stringValue = m_strings[selection]; + else + m_stringValue = wxEmptyString; + + if ( m_stringValue != m_combo->GetValue() ) + m_combo->SetValueByUser(m_stringValue); + + m_value = selection; + + SendComboBoxEvent(selection); +} + +void wxVListBoxComboPopup::SendComboBoxEvent( int selection ) +{ + wxCommandEvent evt(wxEVT_COMBOBOX,m_combo->GetId()); + + evt.SetEventObject(m_combo); + + evt.SetInt(selection); + + // Set client data, if any + if ( selection >= 0 && (int)m_clientDatas.GetCount() > selection ) + { + void* clientData = m_clientDatas[selection]; + if ( m_clientDataItemsType == wxClientData_Object ) + evt.SetClientObject((wxClientData*)clientData); + else + evt.SetClientData(clientData); + } + + m_combo->GetEventHandler()->AddPendingEvent(evt); +} + +// returns true if key was consumed +bool wxVListBoxComboPopup::HandleKey( int keycode, bool saturate, wxChar keychar ) +{ + const int itemCount = GetCount(); + + // keys do nothing in the empty control and returning immediately avoids + // using invalid indices below + if ( !itemCount ) + return false; + + int value = m_value; + int comboStyle = m_combo->GetWindowStyle(); + + if ( keychar > 0 ) + { + // we have character equivalent of the keycode; filter out these that + // are not printable characters + if ( !wxIsprint(keychar) ) + keychar = 0; + } + + const bool readOnly = (comboStyle & wxCB_READONLY) != 0; + + if ( keycode == WXK_DOWN || keycode == WXK_NUMPAD_DOWN || ( keycode == WXK_RIGHT && readOnly ) ) + { + value++; + StopPartialCompletion(); + } + else if ( keycode == WXK_UP || keycode == WXK_NUMPAD_UP || ( keycode == WXK_LEFT && readOnly ) ) + { + value--; + StopPartialCompletion(); + } + else if ( keycode == WXK_PAGEDOWN || keycode == WXK_NUMPAD_PAGEDOWN ) + { + value+=10; + StopPartialCompletion(); + } + else if ( keycode == WXK_PAGEUP || keycode == WXK_NUMPAD_PAGEUP ) + { + value-=10; + StopPartialCompletion(); + } + else if ( ( keycode == WXK_HOME || keycode == WXK_NUMPAD_HOME ) && readOnly ) + { + value=0; + StopPartialCompletion(); + } + else if ( ( keycode == WXK_END || keycode == WXK_NUMPAD_END ) && readOnly ) + { + value=itemCount-1; + StopPartialCompletion(); + } + else if ( keychar && readOnly ) + { + // Try partial completion + + // find the new partial completion string +#if wxUSE_TIMER + if (m_partialCompletionTimer.IsRunning()) + m_partialCompletionString+=wxString(keychar); + else +#endif // wxUSE_TIMER + m_partialCompletionString=wxString(keychar); + + // now search through the values to see if this is found + int found = -1; + unsigned int length=m_partialCompletionString.length(); + int i; + for (i=0; i= length) && (! m_partialCompletionString.CmpNoCase(item.Left(length)))) + { + found=i; + break; + } + } + + if (found<0) + { + StopPartialCompletion(); + ::wxBell(); + return true; // to stop the first value being set + } + else + { + value=i; +#if wxUSE_TIMER + m_partialCompletionTimer.Start(wxODCB_PARTIAL_COMPLETION_TIME, true); +#endif // wxUSE_TIMER + } + } + else + return false; + + if ( saturate ) + { + if ( value >= itemCount ) + value = itemCount - 1; + else if ( value < 0 ) + value = 0; + } + else + { + if ( value >= itemCount ) + value -= itemCount; + else if ( value < 0 ) + value += itemCount; + } + + if ( value == m_value ) + // Even if value was same, don't skip the event + // (good for consistency) + return true; + + if ( value >= 0 ) + m_combo->ChangeValue(m_strings[value]); + + // The m_combo->SetValue() call above sets m_value to the index of this + // string. But if there are more identical string, the index is of the + // first occurrence, which may be wrong, so set the index explicitly here, + // _after_ the SetValue() call. + m_value = value; + + SendComboBoxEvent(m_value); + + return true; +} + +// stop partial completion +void wxVListBoxComboPopup::StopPartialCompletion() +{ + m_partialCompletionString = wxEmptyString; +#if wxUSE_TIMER + m_partialCompletionTimer.Stop(); +#endif // wxUSE_TIMER +} + +void wxVListBoxComboPopup::OnComboDoubleClick() +{ + // Cycle on dclick (disable saturation to allow true cycling). + if ( !::wxGetKeyState(WXK_SHIFT) ) + HandleKey(WXK_DOWN,false); + else + HandleKey(WXK_UP,false); +} + +void wxVListBoxComboPopup::OnComboKeyEvent( wxKeyEvent& event ) +{ + // Saturated key movement on + if ( !HandleKey(event.GetKeyCode(), true) ) + event.Skip(); +} + +void wxVListBoxComboPopup::OnComboCharEvent( wxKeyEvent& event ) +{ + // unlike in OnComboKeyEvent, wxEVT_CHAR contains meaningful + // printable character information, so pass it +#if wxUSE_UNICODE + const wxChar charcode = event.GetUnicodeKey(); +#else + const wxChar charcode = (wxChar)event.GetKeyCode(); +#endif + + if ( !HandleKey(event.GetKeyCode(), true, charcode) ) + event.Skip(); +} + +void wxVListBoxComboPopup::OnPopup() +{ + // *must* set value after size is set (this is because of a vlbox bug) + wxVListBox::SetSelection(m_value); +} + +void wxVListBoxComboPopup::OnMouseMove(wxMouseEvent& event) +{ + event.Skip(); + + // Move selection to cursor if it is inside the popup + + int y = event.GetPosition().y; + int fromBottom = GetClientSize().y - y; + + // Since in any case we need to find out if the last item is only + // partially visible, we might just as well replicate the HitTest + // loop here. + const size_t lineMax = GetVisibleEnd(); + for ( size_t line = GetVisibleBegin(); line < lineMax; line++ ) + { + y -= OnGetRowHeight(line); + if ( y < 0 ) + { + // Only change selection if item is fully visible + if ( (y + fromBottom) >= 0 ) + { + wxVListBox::SetSelection((int)line); + return; + } + } + } +} + +void wxVListBoxComboPopup::OnLeftClick(wxMouseEvent& WXUNUSED(event)) +{ + DismissWithEvent(); +} + +void wxVListBoxComboPopup::OnKey(wxKeyEvent& event) +{ + // Hide popup if certain key or key combination was pressed + if ( m_combo->IsKeyPopupToggle(event) ) + { + StopPartialCompletion(); + Dismiss(); + } + else if ( event.AltDown() ) + { + // On both wxGTK and wxMSW, pressing Alt down seems to + // completely freeze things in popup (ie. arrow keys and + // enter won't work). + return; + } + // Select item if ENTER is pressed + else if ( event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER ) + { + DismissWithEvent(); + } + else + { + // completion is handled in OnChar() below + event.Skip(); + } +} + +void wxVListBoxComboPopup::OnChar(wxKeyEvent& event) +{ + if ( m_combo->GetWindowStyle() & wxCB_READONLY ) + { + // Process partial completion key codes here, but not the arrow keys as + // the base class will do that for us +#if wxUSE_UNICODE + const wxChar charcode = event.GetUnicodeKey(); +#else + const wxChar charcode = (wxChar)event.GetKeyCode(); +#endif + if ( wxIsprint(charcode) ) + { + OnComboCharEvent(event); + SetSelection(m_value); // ensure the highlight bar moves + return; // don't skip the event + } + } + + event.Skip(); +} + +void wxVListBoxComboPopup::Insert( const wxString& item, int pos ) +{ + // Need to change selection? + wxString strValue; + if ( !(m_combo->GetWindowStyle() & wxCB_READONLY) && + m_combo->GetValue() == item ) + { + m_value = pos; + } + + m_strings.Insert(item,pos); + if ( (int)m_clientDatas.size() >= pos ) + m_clientDatas.Insert(NULL, pos); + + m_widths.Insert(-1,pos); + m_widthsDirty = true; + + if ( IsCreated() ) + wxVListBox::SetItemCount( wxVListBox::GetItemCount()+1 ); +} + +int wxVListBoxComboPopup::Append(const wxString& item) +{ + int pos = (int)m_strings.GetCount(); + + if ( m_combo->GetWindowStyle() & wxCB_SORT ) + { + // Find position + // TODO: Could be optimized with binary search + wxArrayString strings = m_strings; + unsigned int i; + + for ( i=0; i n ) + return m_clientDatas[n]; + + return NULL; +} + +void wxVListBoxComboPopup::Delete( unsigned int item ) +{ + // Remove client data, if set + if ( m_clientDatas.GetCount() ) + { + if ( m_clientDataItemsType == wxClientData_Object ) + delete (wxClientData*) m_clientDatas[item]; + + m_clientDatas.RemoveAt(item); + } + + m_strings.RemoveAt(item); + m_widths.RemoveAt(item); + + if ( (int)item == m_widestItem ) + m_findWidest = true; + + int sel = GetSelection(); + + if ( IsCreated() ) + wxVListBox::SetItemCount( wxVListBox::GetItemCount()-1 ); + + // Fix selection + if ( (int)item < sel ) + SetSelection(sel-1); + else if ( (int)item == sel ) + SetSelection(wxNOT_FOUND); +} + +int wxVListBoxComboPopup::FindString(const wxString& s, bool bCase) const +{ + return m_strings.Index(s, bCase); +} + +bool wxVListBoxComboPopup::FindItem(const wxString& item, wxString* trueItem) +{ + int idx = m_strings.Index(item, false); + if ( idx == wxNOT_FOUND ) + return false; + if ( trueItem != NULL ) + *trueItem = m_strings[idx]; + return true; +} + +unsigned int wxVListBoxComboPopup::GetCount() const +{ + return m_strings.GetCount(); +} + +wxString wxVListBoxComboPopup::GetString( int item ) const +{ + return m_strings[item]; +} + +void wxVListBoxComboPopup::SetString( int item, const wxString& str ) +{ + m_strings[item] = str; + ItemWidthChanged(item); +} + +wxString wxVListBoxComboPopup::GetStringValue() const +{ + return m_stringValue; +} + +void wxVListBoxComboPopup::SetSelection( int item ) +{ + wxCHECK_RET( item == wxNOT_FOUND || ((unsigned int)item < GetCount()), + wxT("invalid index in wxVListBoxComboPopup::SetSelection") ); + + m_value = item; + + if ( item >= 0 ) + m_stringValue = m_strings[item]; + else + m_stringValue = wxEmptyString; + + if ( IsCreated() ) + wxVListBox::SetSelection(item); +} + +int wxVListBoxComboPopup::GetSelection() const +{ + return m_value; +} + +void wxVListBoxComboPopup::SetStringValue( const wxString& value ) +{ + int index = m_strings.Index(value); + + m_stringValue = value; + + if ( index >= 0 && index < (int)wxVListBox::GetItemCount() ) + { + wxVListBox::SetSelection(index); + m_value = index; + } +} + +void wxVListBoxComboPopup::CalcWidths() +{ + bool doFindWidest = m_findWidest; + + // Measure items with dirty width. + if ( m_widthsDirty ) + { + unsigned int i; + unsigned int n = m_widths.GetCount(); + int dirtyHandled = 0; + wxArrayInt& widths = m_widths; + + // I think using wxDC::GetTextExtent is faster than + // wxWindow::GetTextExtent (assuming same dc is used + // for all calls, as we do here). + wxClientDC dc(m_combo); + if ( !m_useFont.IsOk() ) + m_useFont = m_combo->GetFont(); + dc.SetFont(m_useFont); + + for ( i=0; i= m_widestWidth ) + { + m_widestWidth = x; + m_widestItem = (int)i; + } + else if ( (int)i == m_widestItem ) + { + // Width of previously widest item has been decreased, so + // we'll have to check all to find current widest item. + doFindWidest = true; + } + + dirtyHandled++; + } + } + + m_widthsDirty = false; + } + + if ( doFindWidest ) + { + unsigned int i; + unsigned int n = m_widths.GetCount(); + + int bestWidth = -1; + int bestIndex = -1; + + for ( i=0; i bestWidth ) + { + bestIndex = (int)i; + bestWidth = w; + } + } + + m_widestWidth = bestWidth; + m_widestItem = bestIndex; + + m_findWidest = false; + } +} + +wxSize wxVListBoxComboPopup::GetAdjustedSize( int minWidth, int prefHeight, int maxHeight ) +{ + int height = 250; + + maxHeight -= 2; // Must take borders into account + + if ( m_strings.GetCount() ) + { + if ( prefHeight > 0 ) + height = prefHeight; + + if ( height > maxHeight ) + height = maxHeight; + + int totalHeight = GetTotalHeight(); // + 3; + + // Take borders into account on Mac or scrollbars always appear +#if defined(__WXMAC__) + totalHeight += 2; +#endif + if ( height >= totalHeight ) + { + height = totalHeight; + } + else + { + // Adjust height to a multiple of the height of the first item + // NB: Calculations that take variable height into account + // are unnecessary. + int fih = GetLineHeight(0); + height -= height % fih; + } + } + else + height = 50; + + CalcWidths(); + + // Take scrollbar into account in width calculations + int widestWidth = m_widestWidth + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); + return wxSize(minWidth > widestWidth ? minWidth : widestWidth, + height+2); +} + +//void wxVListBoxComboPopup::Populate( int n, const wxString choices[] ) +void wxVListBoxComboPopup::Populate( const wxArrayString& choices ) +{ + int i; + + int n = choices.GetCount(); + + for ( i=0; iGetWindowStyle() & wxCB_SORT ) + m_strings.Sort(); + + // Find initial selection + wxString strValue = m_combo->GetValue(); + if ( !strValue.empty() ) + m_value = m_strings.Index(strValue); +} + +// ---------------------------------------------------------------------------- +// wxOwnerDrawnComboBox +// ---------------------------------------------------------------------------- + + +BEGIN_EVENT_TABLE(wxOwnerDrawnComboBox, wxComboCtrl) +END_EVENT_TABLE() + +void wxOwnerDrawnComboBox::Init() +{ +} + +bool wxOwnerDrawnComboBox::Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + return wxComboCtrl::Create(parent,id,value,pos,size,style,validator,name); +} + +wxOwnerDrawnComboBox::wxOwnerDrawnComboBox(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator, + const wxString& name) +{ + Init(); + + Create(parent,id,value,pos,size,choices,style, validator, name); +} + +bool wxOwnerDrawnComboBox::Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator, + const wxString& name) +{ + m_initChs = choices; + //wxCArrayString chs(choices); + + //return Create(parent, id, value, pos, size, chs.GetCount(), + // chs.GetStrings(), style, validator, name); + return Create(parent, id, value, pos, size, 0, + NULL, style, validator, name); +} + +bool wxOwnerDrawnComboBox::Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + int n, + const wxString choices[], + long style, + const wxValidator& validator, + const wxString& name) +{ + + if ( !Create(parent, id, value, pos, size, style, + validator, name) ) + { + return false; + } + + int i; + for ( i=0; iClearClientDatas(); +} + +void wxOwnerDrawnComboBox::DoSetPopupControl(wxComboPopup* popup) +{ + if ( !popup ) + { + popup = new wxVListBoxComboPopup(); + } + + wxComboCtrl::DoSetPopupControl(popup); + + wxASSERT(popup); + + // Add initial choices to the wxVListBox + if ( !GetVListBoxComboPopup()->GetCount() ) + { + GetVListBoxComboPopup()->Populate(m_initChs); + m_initChs.Clear(); + } +} + +// ---------------------------------------------------------------------------- +// wxOwnerDrawnComboBox item manipulation methods +// ---------------------------------------------------------------------------- + +void wxOwnerDrawnComboBox::DoClear() +{ + EnsurePopupControl(); + + GetVListBoxComboPopup()->Clear(); + + // NB: This really needs to be SetValue() instead of ChangeValue(), + // as wxTextEntry API expects an event to be sent. + SetValue(wxEmptyString); +} + +void wxOwnerDrawnComboBox::Clear() +{ + DoClear(); +} + +void wxOwnerDrawnComboBox::DoDeleteOneItem(unsigned int n) +{ + wxCHECK_RET( IsValid(n), wxT("invalid index in wxOwnerDrawnComboBox::Delete") ); + + if ( GetSelection() == (int) n ) + ChangeValue(wxEmptyString); + + GetVListBoxComboPopup()->Delete(n); +} + +unsigned int wxOwnerDrawnComboBox::GetCount() const +{ + if ( !m_popupInterface ) + return m_initChs.GetCount(); + + return GetVListBoxComboPopup()->GetCount(); +} + +wxString wxOwnerDrawnComboBox::GetString(unsigned int n) const +{ + wxCHECK_MSG( IsValid(n), wxEmptyString, wxT("invalid index in wxOwnerDrawnComboBox::GetString") ); + + if ( !m_popupInterface ) + return m_initChs.Item(n); + + return GetVListBoxComboPopup()->GetString(n); +} + +void wxOwnerDrawnComboBox::SetString(unsigned int n, const wxString& s) +{ + EnsurePopupControl(); + + wxCHECK_RET( IsValid(n), wxT("invalid index in wxOwnerDrawnComboBox::SetString") ); + + GetVListBoxComboPopup()->SetString(n,s); +} + +int wxOwnerDrawnComboBox::FindString(const wxString& s, bool bCase) const +{ + if ( !m_popupInterface ) + return m_initChs.Index(s, bCase); + + return GetVListBoxComboPopup()->FindString(s, bCase); +} + +void wxOwnerDrawnComboBox::Select(int n) +{ + EnsurePopupControl(); + + wxCHECK_RET( (n == wxNOT_FOUND) || IsValid(n), wxT("invalid index in wxOwnerDrawnComboBox::Select") ); + + GetVListBoxComboPopup()->SetSelection(n); + + wxString str; + if ( n >= 0 ) + str = GetVListBoxComboPopup()->GetString(n); + + // Refresh text portion in control + if ( m_text ) + m_text->ChangeValue( str ); + else + m_valueString = str; + + Refresh(); +} + +int wxOwnerDrawnComboBox::GetSelection() const +{ + if ( !m_popupInterface ) + return m_initChs.Index(m_valueString); + + return GetVListBoxComboPopup()->GetSelection(); +} + +void wxOwnerDrawnComboBox::GetSelection(long *from, long *to) const +{ + wxComboCtrl::GetSelection(from, to); +} + +int wxOwnerDrawnComboBox::DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, + wxClientDataType type) +{ + EnsurePopupControl(); + + const unsigned int count = items.GetCount(); + + if ( HasFlag(wxCB_SORT) ) + { + int n = pos; + + for ( unsigned int i = 0; i < count; ++i ) + { + n = GetVListBoxComboPopup()->Append(items[i]); + AssignNewItemClientData(n, clientData, i, type); + } + + return n; + } + else + { + for ( unsigned int i = 0; i < count; ++i, ++pos ) + { + GetVListBoxComboPopup()->Insert(items[i], pos); + AssignNewItemClientData(pos, clientData, i, type); + } + + return pos - 1; + } +} + +void wxOwnerDrawnComboBox::DoSetItemClientData(unsigned int n, void* clientData) +{ + EnsurePopupControl(); + + GetVListBoxComboPopup()->SetItemClientData(n, clientData, + GetClientDataType()); +} + +void* wxOwnerDrawnComboBox::DoGetItemClientData(unsigned int n) const +{ + if ( !m_popupInterface ) + return NULL; + + return GetVListBoxComboPopup()->GetItemClientData(n); +} + +// ---------------------------------------------------------------------------- +// wxOwnerDrawnComboBox item drawing and measuring default implementations +// ---------------------------------------------------------------------------- + +void wxOwnerDrawnComboBox::OnDrawItem( wxDC& dc, + const wxRect& rect, + int item, + int flags ) const +{ + if ( flags & wxODCB_PAINTING_CONTROL ) + { + wxString text; + + if ( !ShouldUseHintText() ) + { + text = GetValue(); + } + else + { + text = GetHint(); + wxColour col = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT); + dc.SetTextForeground(col); + } + + dc.DrawText( text, + rect.x + GetMargins().x, + (rect.height-dc.GetCharHeight())/2 + rect.y ); + } + else + { + dc.DrawText( GetVListBoxComboPopup()->GetString(item), rect.x + 2, rect.y ); + } +} + +wxCoord wxOwnerDrawnComboBox::OnMeasureItem( size_t WXUNUSED(item) ) const +{ + return -1; +} + +wxCoord wxOwnerDrawnComboBox::OnMeasureItemWidth( size_t WXUNUSED(item) ) const +{ + return -1; +} + +wxSize wxOwnerDrawnComboBox::DoGetBestSize() const +{ + if ( GetCount() == 0 ) + return wxComboCtrlBase::DoGetBestSize(); + + wxOwnerDrawnComboBox* odc = const_cast(this); + // TODO: this class may also have GetHightestItemHeight() and + // GetHightestItem() methods, and so set the whole (edit part + arrow) + // control's height according with this max height, not only max width. + return GetSizeFromTextSize(odc->GetWidestItemWidth()); +} + +void wxOwnerDrawnComboBox::OnDrawBackground(wxDC& dc, + const wxRect& rect, + int WXUNUSED(item), + int flags) const +{ + // We need only to explicitly draw background for items + // that should have selected background. Also, call PrepareBackground + // always when painting the control so that clipping is done properly. + + if ( (flags & wxODCB_PAINTING_SELECTED) || + ((flags & wxODCB_PAINTING_CONTROL) && HasFlag(wxCB_READONLY)) ) + { + int bgFlags = wxCONTROL_SELECTED; + + if ( !(flags & wxODCB_PAINTING_CONTROL) ) + bgFlags |= wxCONTROL_ISSUBMENU; + + PrepareBackground(dc, rect, bgFlags); + } +} + +#endif // wxUSE_ODCOMBOBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/paletteg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/paletteg.cpp new file mode 100644 index 0000000000..746f3cedc3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/paletteg.cpp @@ -0,0 +1,157 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/paletteg.cpp +// Purpose: +// Author: Robert Roebling +// Created: 01/02/97 +// Copyright: (c) 1998 Robert Roebling and Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#if wxUSE_PALETTE + +#include "wx/palette.h" + +//----------------------------------------------------------------------------- +// wxPalette +//----------------------------------------------------------------------------- + +struct wxPaletteEntry +{ + unsigned char red, green, blue; +}; + +class wxPaletteRefData : public wxGDIRefData +{ +public: + wxPaletteRefData(); + wxPaletteRefData(const wxPaletteRefData& palette); + virtual ~wxPaletteRefData(); + + int m_count; + wxPaletteEntry *m_entries; +}; + +wxPaletteRefData::wxPaletteRefData() +{ + m_count = 0; + m_entries = NULL; +} + +wxPaletteRefData::wxPaletteRefData(const wxPaletteRefData& palette) +{ + m_count = palette.m_count; + m_entries = new wxPaletteEntry[m_count]; + for ( int i = 0; i < m_count; i++ ) + m_entries[i] = palette.m_entries[i]; +} + +wxPaletteRefData::~wxPaletteRefData() +{ + delete[] m_entries; +} + +//----------------------------------------------------------------------------- + +#define M_PALETTEDATA ((wxPaletteRefData *)m_refData) + +IMPLEMENT_DYNAMIC_CLASS(wxPalette,wxGDIObject) + +wxPalette::wxPalette() +{ + m_refData = NULL; +} + +wxPalette::wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue) +{ + Create(n, red, green, blue); +} + +wxPalette::~wxPalette() +{ +} + +int wxPalette::GetColoursCount() const +{ + if (m_refData) + return M_PALETTEDATA->m_count; + + return 0; +} + +bool wxPalette::Create(int n, + const unsigned char *red, + const unsigned char *green, + const unsigned char *blue) +{ + UnRef(); + m_refData = new wxPaletteRefData(); + + M_PALETTEDATA->m_count = n; + M_PALETTEDATA->m_entries = new wxPaletteEntry[n]; + + wxPaletteEntry *e = M_PALETTEDATA->m_entries; + for (int i = 0; i < n; i++, e++) + { + e->red = red[i]; + e->green = green[i]; + e->blue = blue[i]; + } + + return true; +} + +int wxPalette::GetPixel( unsigned char red, + unsigned char green, + unsigned char blue ) const +{ + if (!m_refData) return wxNOT_FOUND; + + int closest = 0; + double d,distance = 1000.0; // max. dist is 256 + + wxPaletteEntry *e = M_PALETTEDATA->m_entries; + for (int i = 0; i < M_PALETTEDATA->m_count; i++, e++) + { + if ((d = 0.299 * abs(red - e->red) + + 0.587 * abs(green - e->green) + + 0.114 * abs(blue - e->blue)) < distance) { + distance = d; + closest = i; + } + } + return closest; +} + +bool wxPalette::GetRGB(int pixel, + unsigned char *red, + unsigned char *green, + unsigned char *blue) const +{ + if (!m_refData) return false; + if (pixel >= M_PALETTEDATA->m_count) return false; + + wxPaletteEntry& p = M_PALETTEDATA->m_entries[pixel]; + if (red) *red = p.red; + if (green) *green = p.green; + if (blue) *blue = p.blue; + return true; +} + +wxGDIRefData *wxPalette::CreateGDIRefData() const +{ + return new wxPaletteRefData; +} + +wxGDIRefData *wxPalette::CloneGDIRefData(const wxGDIRefData *data) const +{ + return new wxPaletteRefData(*static_cast(data)); +} + +#endif // wxUSE_PALETTE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/preferencesg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/preferencesg.cpp new file mode 100644 index 0000000000..97236af305 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/preferencesg.cpp @@ -0,0 +1,260 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/preferencesg.cpp +// Purpose: Implementation of wxPreferencesEditor. +// Author: Vaclav Slavik +// Created: 2013-02-19 +// Copyright: (c) 2013 Vaclav Slavik +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PREFERENCES_EDITOR + +#include "wx/private/preferences.h" + +#ifndef wxHAS_PREF_EDITOR_NATIVE + +#include "wx/app.h" +#include "wx/dialog.h" +#include "wx/notebook.h" +#include "wx/sizer.h" +#include "wx/sharedptr.h" +#include "wx/scopedptr.h" +#include "wx/scopeguard.h" +#include "wx/vector.h" + +namespace +{ + +class wxGenericPrefsDialog : public wxDialog +{ +public: + wxGenericPrefsDialog(wxWindow *parent, const wxString& title) + : wxDialog(parent, wxID_ANY, title, + wxDefaultPosition, wxDefaultSize, + wxDEFAULT_FRAME_STYLE & ~(wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX)) + { + SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY); + + wxSizer *sizer = new wxBoxSizer(wxVERTICAL); + + m_notebook = new wxNotebook(this, wxID_ANY); + sizer->Add(m_notebook, wxSizerFlags(1).Expand().DoubleBorder()); + +#ifdef __WXGTK__ + SetEscapeId(wxID_CLOSE); + sizer->Add(CreateButtonSizer(wxCLOSE), wxSizerFlags().Expand().DoubleBorder(wxBOTTOM)); +#else + sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), + wxSizerFlags().Expand().DoubleBorder(wxLEFT|wxRIGHT|wxBOTTOM)); +#endif + SetSizer(sizer); + } + + void AddPage(wxPreferencesPage *page) + { + wxWindow *win = page->CreateWindow(m_notebook); + m_notebook->AddPage(win, page->GetName()); + } + + int GetSelectedPage() const + { + return m_notebook->GetSelection(); + } + + void SelectPage(int page) + { + m_notebook->ChangeSelection(page); + } + +private: + wxNotebook *m_notebook; +}; + + +class wxGenericPreferencesEditorImplBase : public wxPreferencesEditorImpl +{ +public: + void SetTitle(const wxString& title) + { + m_title = title; + } + + virtual void AddPage(wxPreferencesPage* page) + { + m_pages.push_back(wxSharedPtr(page)); + } + +protected: + wxGenericPrefsDialog *CreateDialog(wxWindow *parent) + { + if ( m_title.empty() ) + { + // Use the default title, which should include the application name + // under both MSW and GTK (and OSX uses its own native + // implementation anyhow). + m_title.Printf(_("%s Preferences"), wxTheApp->GetAppDisplayName()); + } + + wxGenericPrefsDialog *dlg = new wxGenericPrefsDialog(parent, m_title); + + // TODO: Don't create all pages immediately like this, do it on demand + // when a page is selected in the notebook (as is done on OS X). + // + // Currently, creating all pages is necessary so that the notebook + // can determine its best size. We'll need to extend + // wxPreferencesPage with a GetBestSize() virtual method to make + // it possible to defer the creation. + for ( Pages::const_iterator i = m_pages.begin(); + i != m_pages.end(); + ++i ) + { + dlg->AddPage(i->get()); + } + + dlg->Fit(); + + return dlg; + } + + typedef wxVector< wxSharedPtr > Pages; + Pages m_pages; + +private: + wxString m_title; +}; + + +#ifdef wxHAS_PREF_EDITOR_MODELESS + +class wxModelessPreferencesEditorImpl : public wxGenericPreferencesEditorImplBase +{ +public: + virtual ~wxModelessPreferencesEditorImpl() + { + // m_win may already be destroyed if this destructor is called from + // wxApp's destructor. In that case, all windows -- including this + // one -- would already be destroyed by now. + if ( m_win ) + m_win->Destroy(); + } + + virtual void Show(wxWindow* parent) + { + if ( !m_win ) + { + wxWindow *win = CreateDialog(parent); + win->Show(); + m_win = win; + } + else + { + // Ideally, we'd reparent the dialog under 'parent', but it's + // probably not worth the hassle. We know the old parent is still + // valid, because otherwise Dismiss() would have been called and + // m_win cleared. + m_win->Raise(); + } + } + + virtual void Dismiss() + { + if ( m_win ) + { + m_win->Close(/*force=*/true); + m_win = NULL; + } + } + +private: + wxWeakRef m_win; +}; + +inline +wxGenericPreferencesEditorImplBase* NewGenericImpl() +{ + return new wxModelessPreferencesEditorImpl; +} + +#else // !wxHAS_PREF_EDITOR_MODELESS + +class wxModalPreferencesEditorImpl : public wxGenericPreferencesEditorImplBase +{ +public: + wxModalPreferencesEditorImpl() + { + m_dlg = NULL; + m_currentPage = -1; + } + + virtual void Show(wxWindow* parent) + { + wxScopedPtr dlg(CreateDialog(parent)); + + // Store it for Dismiss() but ensure that the pointer is reset to NULL + // when the dialog is destroyed on leaving this function. + m_dlg = dlg.get(); + wxON_BLOCK_EXIT_NULL(m_dlg); + + // Restore the previously selected page, if any. + if ( m_currentPage != -1 ) + dlg->SelectPage(m_currentPage); + + // Don't remember the last selected page if the dialog was cancelled. + if ( dlg->ShowModal() != wxID_CANCEL ) + m_currentPage = dlg->GetSelectedPage(); + } + + virtual void Dismiss() + { + if ( m_dlg ) + { + m_dlg->EndModal(wxID_CANCEL); + m_dlg = NULL; + } + } + +private: + wxGenericPrefsDialog* m_dlg; + int m_currentPage; + + wxDECLARE_NO_COPY_CLASS(wxModalPreferencesEditorImpl); +}; + +inline +wxGenericPreferencesEditorImplBase* NewGenericImpl() +{ + return new wxModalPreferencesEditorImpl; +} + +#endif // !wxHAS_PREF_EDITOR_MODELESS + +} // anonymous namespace + +/*static*/ +wxPreferencesEditorImpl* wxPreferencesEditorImpl::Create(const wxString& title) +{ + wxGenericPreferencesEditorImplBase* const impl = NewGenericImpl(); + + impl->SetTitle(title); + + return impl; +} + +#endif // !wxHAS_PREF_EDITOR_NATIVE + +#endif // wxUSE_PREFERENCES_EDITOR diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/printps.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/printps.cpp new file mode 100644 index 0000000000..00de8a9666 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/printps.cpp @@ -0,0 +1,371 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/printps.cpp +// Purpose: Postscript print/preview framework +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT && (!defined(__WXMSW__) || wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW) + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/dc.h" + #include "wx/app.h" + #include "wx/msgdlg.h" + #include "wx/intl.h" + #include "wx/progdlg.h" + #include "wx/log.h" + #include "wx/dcprint.h" +#endif + +#include "wx/generic/printps.h" +#include "wx/printdlg.h" +#include "wx/generic/prntdlgg.h" +#include "wx/progdlg.h" +#include "wx/paper.h" + +#include + +// ---------------------------------------------------------------------------- +// wxWin macros +// ---------------------------------------------------------------------------- + + IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase) + IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// Printer +// ---------------------------------------------------------------------------- + +wxPostScriptPrinter::wxPostScriptPrinter(wxPrintDialogData *data) + : wxPrinterBase(data) +{ +} + +wxPostScriptPrinter::~wxPostScriptPrinter() +{ +} + +bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) +{ + sm_abortIt = false; + sm_abortWindow = NULL; + + if (!printout) + { + sm_lastError = wxPRINTER_ERROR; + return false; + } + + if (m_printDialogData.GetMinPage() < 1) + m_printDialogData.SetMinPage(1); + if (m_printDialogData.GetMaxPage() < 1) + m_printDialogData.SetMaxPage(9999); + + // Create a suitable device context + wxDC *dc; + if (prompt) + { + dc = PrintDialog(parent); + if (!dc) + return false; + } + else + { + dc = new wxPostScriptDC(GetPrintDialogData().GetPrintData()); + } + + // May have pressed cancel. + if (!dc || !dc->IsOk()) + { + if (dc) delete dc; + sm_lastError = wxPRINTER_ERROR; + return false; + } + + wxSize ScreenPixels = wxGetDisplaySize(); + wxSize ScreenMM = wxGetDisplaySizeMM(); + + printout->SetPPIScreen( (int) ((ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth()), + (int) ((ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight()) ); + printout->SetPPIPrinter( dc->GetResolution(), + dc->GetResolution() ); + + // Set printout parameters + printout->SetDC(dc); + + int w, h; + dc->GetSize(&w, &h); + printout->SetPageSizePixels((int)w, (int)h); + printout->SetPaperRectPixels(wxRect(0, 0, w, h)); + int mw, mh; + dc->GetSizeMM(&mw, &mh); + printout->SetPageSizeMM((int)mw, (int)mh); + + // Create an abort window + wxBeginBusyCursor(); + + printout->OnPreparePrinting(); + + // Get some parameters from the printout, if defined + int fromPage, toPage; + int minPage, maxPage; + printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage); + + if (maxPage == 0) + { + sm_lastError = wxPRINTER_ERROR; + wxEndBusyCursor(); + return false; + } + + // Only set min and max, because from and to have been + // set by the user + m_printDialogData.SetMinPage(minPage); + m_printDialogData.SetMaxPage(maxPage); + + if (m_printDialogData.GetFromPage() < minPage) + m_printDialogData.SetFromPage( minPage ); + if (m_printDialogData.GetToPage() > maxPage) + m_printDialogData.SetToPage( maxPage ); + + int + pagesPerCopy = m_printDialogData.GetToPage()-m_printDialogData.GetFromPage()+1, + totalPages = pagesPerCopy * m_printDialogData.GetNoCopies(), + printedPages = 0; + // Open the progress bar dialog + wxProgressDialog *progressDialog = new wxProgressDialog ( + printout->GetTitle(), + _("Printing..."), + totalPages, + parent, + wxPD_CAN_ABORT|wxPD_AUTO_HIDE|wxPD_APP_MODAL); + + printout->OnBeginPrinting(); + + sm_lastError = wxPRINTER_NO_ERROR; + + bool keepGoing = true; + + int copyCount; + for (copyCount = 1; copyCount <= m_printDialogData.GetNoCopies(); copyCount ++) + { + if (!printout->OnBeginDocument(m_printDialogData.GetFromPage(), m_printDialogData.GetToPage())) + { + wxEndBusyCursor(); + wxLogError(_("Could not start printing.")); + sm_lastError = wxPRINTER_ERROR; + break; + } + if (sm_abortIt) + { + sm_lastError = wxPRINTER_CANCELLED; + break; + } + + int pn; + for (pn = m_printDialogData.GetFromPage(); keepGoing && (pn <= m_printDialogData.GetToPage()) && printout->HasPage(pn); + pn++) + { + if (sm_abortIt) + { + keepGoing = false; + sm_lastError = wxPRINTER_CANCELLED; + break; + } + else + { + wxString msg; + msg.Printf(_("Printing page %d..."), printedPages+1); + if(progressDialog->Update(printedPages++, msg)) + { + dc->StartPage(); + printout->OnPrintPage(pn); + dc->EndPage(); + } + else + { + sm_abortIt = true; + sm_lastError = wxPRINTER_CANCELLED; + keepGoing = false; + } + } + wxYield(); + } + printout->OnEndDocument(); + } + + printout->OnEndPrinting(); + delete progressDialog; + + wxEndBusyCursor(); + + delete dc; + + return (sm_lastError == wxPRINTER_NO_ERROR); +} + +wxDC* wxPostScriptPrinter::PrintDialog(wxWindow *parent) +{ + wxDC* dc = NULL; + + wxGenericPrintDialog dialog( parent, &m_printDialogData ); + if (dialog.ShowModal() == wxID_OK) + { + dc = dialog.GetPrintDC(); + m_printDialogData = dialog.GetPrintDialogData(); + + if (dc == NULL) + sm_lastError = wxPRINTER_ERROR; + else + sm_lastError = wxPRINTER_NO_ERROR; + } + else + sm_lastError = wxPRINTER_CANCELLED; + + return dc; +} + +bool wxPostScriptPrinter::Setup(wxWindow *WXUNUSED(parent)) +{ +#if 0 + wxGenericPrintDialog* dialog = new wxGenericPrintDialog(parent, & m_printDialogData); + dialog->GetPrintDialogData().SetSetupDialog(true); + + int ret = dialog->ShowModal(); + + if (ret == wxID_OK) + { + m_printDialogData = dialog->GetPrintDialogData(); + } + + dialog->Destroy(); + + return (ret == wxID_OK); +#endif + + return false; +} + +// ---------------------------------------------------------------------------- +// Print preview +// ---------------------------------------------------------------------------- + +void wxPostScriptPrintPreview::Init(wxPrintout * WXUNUSED(printout), + wxPrintout * WXUNUSED(printoutForPrinting)) +{ + // Have to call it here since base constructor can't call it + DetermineScaling(); +} + +wxPostScriptPrintPreview::wxPostScriptPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintDialogData *data) + : wxPrintPreviewBase(printout, printoutForPrinting, data) +{ + Init(printout, printoutForPrinting); +} + +wxPostScriptPrintPreview::wxPostScriptPrintPreview(wxPrintout *printout, + wxPrintout *printoutForPrinting, + wxPrintData *data) + : wxPrintPreviewBase(printout, printoutForPrinting, data) +{ + Init(printout, printoutForPrinting); +} + +wxPostScriptPrintPreview::~wxPostScriptPrintPreview() +{ +} + +bool wxPostScriptPrintPreview::Print(bool interactive) +{ + if (!m_printPrintout) + return false; + + // Assume that on Unix, the preview may use the PostScript + // (generic) version, but printing using the native system is required. + // TODO: make a generic print preview class from which wxPostScriptPrintPreview + // is derived. +#ifdef __UNIX__ + wxPrinter printer(& m_printDialogData); +#else + wxPostScriptPrinter printer(& m_printDialogData); +#endif + return printer.Print(m_previewFrame, m_printPrintout, interactive); +} + +void wxPostScriptPrintPreview::DetermineScaling() +{ + wxPaperSize paperType = m_printDialogData.GetPrintData().GetPaperId(); + if (paperType == wxPAPER_NONE) + paperType = wxPAPER_NONE; + + wxPrintPaperType *paper = wxThePrintPaperDatabase->FindPaperType(paperType); + if (!paper) + paper = wxThePrintPaperDatabase->FindPaperType(wxPAPER_A4); + + if (paper) + { + int resolution = 600; // TODO, this is correct, but get this from wxPSDC somehow + + const wxSize screenPPI = wxGetDisplayPPI(); + int logPPIScreenX = screenPPI.GetWidth(); + int logPPIScreenY = screenPPI.GetHeight(); + int logPPIPrinterX = resolution; + int logPPIPrinterY = resolution; + + m_previewPrintout->SetPPIScreen( logPPIScreenX, logPPIScreenY ); + m_previewPrintout->SetPPIPrinter( logPPIPrinterX, logPPIPrinterY ); + + wxSize sizeDevUnits(paper->GetSizeDeviceUnits()); + sizeDevUnits.x = (wxCoord)((float)sizeDevUnits.x * resolution / 72.0); + sizeDevUnits.y = (wxCoord)((float)sizeDevUnits.y * resolution / 72.0); + wxSize sizeTenthsMM(paper->GetSize()); + wxSize sizeMM(sizeTenthsMM.x / 10, sizeTenthsMM.y / 10); + + // If in landscape mode, we need to swap the width and height. + if ( m_printDialogData.GetPrintData().GetOrientation() == wxLANDSCAPE ) + { + m_pageWidth = sizeDevUnits.y; + m_pageHeight = sizeDevUnits.x; + m_previewPrintout->SetPageSizeMM(sizeMM.y, sizeMM.x); + } + else + { + m_pageWidth = sizeDevUnits.x; + m_pageHeight = sizeDevUnits.y; + m_previewPrintout->SetPageSizeMM(sizeMM.x, sizeMM.y); + } + m_previewPrintout->SetPageSizePixels(m_pageWidth, m_pageHeight); + m_previewPrintout->SetPaperRectPixels(wxRect(0, 0, m_pageWidth, m_pageHeight)); + + // At 100%, the page should look about page-size on the screen. + m_previewScaleX = float(logPPIScreenX) / logPPIPrinterX; + m_previewScaleY = float(logPPIScreenY) / logPPIPrinterY; + } +} + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/prntdlgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/prntdlgg.cpp new file mode 100644 index 0000000000..41d3dda771 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/prntdlgg.cpp @@ -0,0 +1,1102 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/prntdlgg.cpp +// Purpose: Generic print dialogs +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PRINTING_ARCHITECTURE && (!defined(__WXMSW__) || wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW) + +#include "wx/generic/prntdlgg.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/dc.h" + #include "wx/stattext.h" + #include "wx/statbox.h" + #include "wx/button.h" + #include "wx/checkbox.h" + #include "wx/textctrl.h" + #include "wx/radiobox.h" + #include "wx/filedlg.h" + #include "wx/combobox.h" + #include "wx/intl.h" + #include "wx/sizer.h" + #include "wx/cmndata.h" +#endif + +#if wxUSE_STATLINE + #include "wx/statline.h" +#endif + +#if wxUSE_POSTSCRIPT + #include "wx/generic/dcpsg.h" +#endif + +#include "wx/prntbase.h" +#include "wx/printdlg.h" +#include "wx/paper.h" +#include "wx/filename.h" +#include "wx/tokenzr.h" +#include "wx/imaglist.h" + +#include +#include + +#ifndef __WXUNIVERSAL__ + +#if wxUSE_GTKPRINT + #include "wx/link.h" + wxFORCE_LINK_MODULE(gtk_print) +#endif + +#endif // !wxUniv + +// ---------------------------------------------------------------------------- +// global vars +// ---------------------------------------------------------------------------- + +extern wxPrintPaperDatabase *wxThePrintPaperDatabase; + +#if wxUSE_POSTSCRIPT + +//---------------------------------------------------------------------------- +// wxPostScriptNativeData +//---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxPostScriptPrintNativeData, wxPrintNativeDataBase) + +wxPostScriptPrintNativeData::wxPostScriptPrintNativeData() +{ + m_previewCommand = wxEmptyString; +#ifdef __VMS__ + m_printerCommand = wxT("print"); + m_printerOptions = wxT("/nonotify/queue=psqueue"); + m_afmPath = wxT("sys$ps_font_metrics:"); +#endif + +#ifdef __WXMSW__ + m_printerCommand = wxT("print"); + m_printerOptions = wxEmptyString; + m_afmPath = wxT("c:\\windows\\system\\"); +#endif + +#if !defined(__VMS__) && !defined(__WXMSW__) + m_printerCommand = wxT("lpr"); + m_printerOptions = wxEmptyString; + m_afmPath = wxEmptyString; +#endif + + m_printerScaleX = 1.0; + m_printerScaleY = 1.0; + m_printerTranslateX = 0; + m_printerTranslateY = 0; +} + +wxPostScriptPrintNativeData::~wxPostScriptPrintNativeData() +{ +} + +bool wxPostScriptPrintNativeData::TransferTo( wxPrintData &WXUNUSED(data) ) +{ + return true; +} + +bool wxPostScriptPrintNativeData::TransferFrom( const wxPrintData &WXUNUSED(data) ) +{ + return true; +} + +// ---------------------------------------------------------------------------- +// Generic print dialog for non-Windows printing use. +// ---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxGenericPrintDialog, wxPrintDialogBase) + +BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxPrintDialogBase) + EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) + EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) + EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) +END_EVENT_TABLE() + +wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, + wxPrintDialogData* data) + : wxPrintDialogBase(GetParentForModalDialog(parent, 0), + wxID_ANY, _("Print"), + wxPoint(0,0), wxSize(600, 600), + wxDEFAULT_DIALOG_STYLE | + wxTAB_TRAVERSAL) +{ + if ( data ) + m_printDialogData = *data; + + Init(parent); +} + +wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, + wxPrintData* data) + : wxPrintDialogBase(GetParentForModalDialog(parent, 0), + wxID_ANY, _("Print"), + wxPoint(0,0), wxSize(600, 600), + wxDEFAULT_DIALOG_STYLE | + wxTAB_TRAVERSAL) +{ + if ( data ) + m_printDialogData = *data; + + Init(parent); +} + +void wxGenericPrintDialog::Init(wxWindow * WXUNUSED(parent)) +{ + // wxDialog::Create(parent, wxID_ANY, _("Print"), wxPoint(0,0), wxSize(600, 600), + // wxDEFAULT_DIALOG_STYLE | wxTAB_TRAVERSAL); + + wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL ); + + // 1) top row + + wxPrintFactory* factory = wxPrintFactory::GetFactory(); + + wxStaticBoxSizer *topsizer = new wxStaticBoxSizer( + new wxStaticBox( this, wxID_ANY, _( "Printer options" ) ), wxHORIZONTAL ); + wxFlexGridSizer *flex = new wxFlexGridSizer( 2 ); + flex->AddGrowableCol( 1 ); + topsizer->Add( flex, 1, wxGROW ); + + m_printToFileCheckBox = new wxCheckBox( this, wxPRINTID_PRINTTOFILE, _("Print to File") ); + flex->Add( m_printToFileCheckBox, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_setupButton = new wxButton(this, wxPRINTID_SETUP, _("Setup...") ); + flex->Add( m_setupButton, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); + + if (!factory->HasPrintSetupDialog()) + m_setupButton->Enable( false ); + + if (factory->HasPrinterLine()) + { + flex->Add( new wxStaticText( this, wxID_ANY, _("Printer:") ), + 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + flex->Add( new wxStaticText( this, wxID_ANY, factory->CreatePrinterLine() ), + 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + } + + if (factory->HasStatusLine()) + { + flex->Add( new wxStaticText( this, wxID_ANY, _("Status:") ), + 0, wxALIGN_CENTER_VERTICAL|(wxALL-wxTOP), 5 ); + flex->Add( new wxStaticText( this, wxID_ANY, factory->CreateStatusLine() ), + 0, wxALIGN_CENTER_VERTICAL|(wxALL-wxTOP), 5 ); + } + + mainsizer->Add( topsizer, 0, wxLEFT|wxTOP|wxRIGHT|wxGROW, 10 ); + + // 2) middle row with radio box + + wxString *choices = new wxString[2]; + choices[0] = _("All"); + choices[1] = _("Pages"); + + m_fromText = NULL; + m_toText = NULL; + m_rangeRadioBox = NULL; + + if (m_printDialogData.GetFromPage() != 0) + { + m_rangeRadioBox = new wxRadioBox(this, wxPRINTID_RANGE, _("Print Range"), + wxDefaultPosition, wxDefaultSize, + 2, choices); + m_rangeRadioBox->SetSelection(1); + + mainsizer->Add( m_rangeRadioBox, 0, wxLEFT|wxTOP|wxRIGHT, 10 ); + } + + // 3) bottom row + + wxBoxSizer *bottomsizer = new wxBoxSizer( wxHORIZONTAL ); + + if (m_printDialogData.GetFromPage() != 0) + { + bottomsizer->Add( new wxStaticText(this, wxPRINTID_STATIC, _("From:") ), 0, wxCENTER|wxALL, 5 ); + m_fromText = new wxTextCtrl(this, wxPRINTID_FROM, wxEmptyString, wxDefaultPosition, wxSize(40, wxDefaultCoord)); + bottomsizer->Add( m_fromText, 1, wxCENTER|wxRIGHT, 10 ); + + bottomsizer->Add( new wxStaticText(this, wxPRINTID_STATIC, _("To:") ), 0, wxCENTER|wxALL, 5); + m_toText = new wxTextCtrl(this, wxPRINTID_TO, wxEmptyString, wxDefaultPosition, wxSize(40, wxDefaultCoord)); + bottomsizer->Add( m_toText, 1, wxCENTER|wxRIGHT, 10 ); + } + + bottomsizer->Add( new wxStaticText(this, wxPRINTID_STATIC, _("Copies:") ), 0, wxCENTER|wxALL, 5 ); + m_noCopiesText = new wxTextCtrl(this, wxPRINTID_COPIES, wxEmptyString, wxPoint(252, 130), wxSize(40, wxDefaultCoord)); + bottomsizer->Add( m_noCopiesText, 1, wxCENTER|wxRIGHT, 10 ); + + mainsizer->Add( bottomsizer, 0, wxTOP|wxLEFT|wxRIGHT, 12 ); + + // 4) buttons + + wxSizer *sizerBtn = CreateSeparatedButtonSizer( wxOK|wxCANCEL); + if ( sizerBtn ) + mainsizer->Add(sizerBtn, 0, wxEXPAND|wxALL, 10 ); + + SetAutoLayout( true ); + SetSizer( mainsizer ); + + mainsizer->Fit( this ); + Centre(wxBOTH); + + // Calls wxWindow::OnInitDialog and then wxGenericPrintDialog::TransferDataToWindow + InitDialog(); + delete[] choices; +} + +int wxGenericPrintDialog::ShowModal() +{ + return wxDialog::ShowModal(); +} + +wxGenericPrintDialog::~wxGenericPrintDialog() +{ +} + +void wxGenericPrintDialog::OnOK(wxCommandEvent& WXUNUSED(event)) +{ + TransferDataFromWindow(); + + // An empty 'to' field signals printing just the + // 'from' page. + if (m_printDialogData.GetToPage() < 1) + m_printDialogData.SetToPage(m_printDialogData.GetFromPage()); + + // There are some interactions between the global setup data + // and the standard print dialog. The global printing 'mode' + // is determined by whether the user checks Print to file + // or not. + if (m_printDialogData.GetPrintToFile()) + { + m_printDialogData.GetPrintData().SetPrintMode(wxPRINT_MODE_FILE); + + wxFileName fname( m_printDialogData.GetPrintData().GetFilename() ); + + wxFileDialog dialog( this, _("PostScript file"), + fname.GetPath(), fname.GetFullName(), wxT("*.ps"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); + if (dialog.ShowModal() != wxID_OK) return; + + m_printDialogData.GetPrintData().SetFilename( dialog.GetPath() ); + } + else + { + m_printDialogData.GetPrintData().SetPrintMode(wxPRINT_MODE_PRINTER); + } + + EndModal(wxID_OK); +} + +void wxGenericPrintDialog::OnRange(wxCommandEvent& event) +{ + if (!m_fromText) return; + + if (event.GetInt() == 0) + { + m_fromText->Enable(false); + m_toText->Enable(false); + } + else if (event.GetInt() == 1) + { + m_fromText->Enable(true); + m_toText->Enable(true); + } +} + +void wxGenericPrintDialog::OnSetup(wxCommandEvent& WXUNUSED(event)) +{ + wxPrintFactory* factory = wxPrintFactory::GetFactory(); + + if (factory->HasPrintSetupDialog()) + { + // The print setup dialog should change the + // print data in-place if not cancelled. + wxDialog *dialog = factory->CreatePrintSetupDialog( this, &m_printDialogData.GetPrintData() ); + dialog->ShowModal(); + dialog->Destroy(); + } +} + +bool wxGenericPrintDialog::TransferDataToWindow() +{ + if(m_printDialogData.GetFromPage() != 0) + { + if(m_fromText) + { + if (m_printDialogData.GetEnablePageNumbers()) + { + m_fromText->Enable(true); + m_toText->Enable(true); + if (m_printDialogData.GetFromPage() > 0) + m_fromText->SetValue(wxString::Format(wxT("%d"), m_printDialogData.GetFromPage())); + if (m_printDialogData.GetToPage() > 0) + m_toText->SetValue(wxString::Format(wxT("%d"), m_printDialogData.GetToPage())); + if(m_rangeRadioBox) + { + if (m_printDialogData.GetAllPages() || m_printDialogData.GetFromPage() == 0) + m_rangeRadioBox->SetSelection(0); + else + m_rangeRadioBox->SetSelection(1); + } + } + else + { + m_fromText->Enable(false); + m_toText->Enable(false); + if(m_rangeRadioBox) + { + m_rangeRadioBox->SetSelection(0); + m_rangeRadioBox->wxRadioBox::Enable(1, false); + } + } + } + } + m_noCopiesText->SetValue( + wxString::Format(wxT("%d"), m_printDialogData.GetNoCopies())); + + m_printToFileCheckBox->SetValue(m_printDialogData.GetPrintToFile()); + m_printToFileCheckBox->Enable(m_printDialogData.GetEnablePrintToFile()); + return true; +} + +bool wxGenericPrintDialog::TransferDataFromWindow() +{ + long res = 0; + if(m_printDialogData.GetFromPage() != -1) + { + if (m_printDialogData.GetEnablePageNumbers()) + { + if(m_fromText) + { + wxString value = m_fromText->GetValue(); + if (value.ToLong( &res )) + m_printDialogData.SetFromPage( res ); + } + if(m_toText) + { + wxString value = m_toText->GetValue(); + if (value.ToLong( &res )) + m_printDialogData.SetToPage( res ); + } + } + if(m_rangeRadioBox) + { + if (m_rangeRadioBox->GetSelection() == 0) + { + m_printDialogData.SetAllPages(true); + + // This means all pages, more or less + m_printDialogData.SetFromPage(1); + m_printDialogData.SetToPage(32000); + } + else + m_printDialogData.SetAllPages(false); + } + } + else + { // continuous printing + m_printDialogData.SetFromPage(1); + m_printDialogData.SetToPage(32000); + } + + wxString value = m_noCopiesText->GetValue(); + if (value.ToLong( &res )) + m_printDialogData.SetNoCopies( res ); + + m_printDialogData.SetPrintToFile(m_printToFileCheckBox->GetValue()); + + return true; +} + +wxDC *wxGenericPrintDialog::GetPrintDC() +{ + return new wxPostScriptDC(GetPrintDialogData().GetPrintData()); +} + +// ---------------------------------------------------------------------------- +// Generic print setup dialog +// ---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) + +BEGIN_EVENT_TABLE(wxGenericPrintSetupDialog, wxDialog) + EVT_LIST_ITEM_ACTIVATED(wxPRINTID_PRINTER, wxGenericPrintSetupDialog::OnPrinter) +END_EVENT_TABLE() + +wxGenericPrintSetupDialog::wxGenericPrintSetupDialog(wxWindow *parent, wxPrintData* data): +wxDialog(parent, wxID_ANY, _("Print Setup"), wxPoint(0,0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL) +{ + Init(data); +} + +/* XPM */ +static const char* const check_xpm[] = { +/* width height ncolors chars_per_pixel */ +"16 16 3 1", +/* colors */ +" s None c None", +"X c #000000", +". c #808080", +/* pixels */ +" ", +" ", +" ", +" .. ", +" XX ", +" XX. ", +" .XX ", +" XX ", +" X XX. ", +" XX .XX ", +" XX XX ", +" XXXX. ", +" XX. ", +" . ", +" ", +" " +}; + + +void wxGenericPrintSetupDialog::Init(wxPrintData* data) +{ + if ( data ) + m_printData = *data; + + m_targetData = data; + + wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL ); + + // printer selection + + wxStaticBoxSizer *printer_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Printer") ), wxVERTICAL ); + main_sizer->Add( printer_sizer, 0, wxALL|wxGROW, 10 ); + + m_printerListCtrl = new wxListCtrl( this, wxPRINTID_PRINTER, + wxDefaultPosition, wxSize(wxDefaultCoord,100), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER ); + wxImageList *image_list = new wxImageList; + image_list->Add( wxBitmap(check_xpm) ); + m_printerListCtrl->AssignImageList( image_list, wxIMAGE_LIST_SMALL ); + + m_printerListCtrl->InsertColumn( 0, wxT(" "), wxLIST_FORMAT_LEFT, 20 ); + m_printerListCtrl->InsertColumn( 1, wxT("Printer"), wxLIST_FORMAT_LEFT, 150 ); + m_printerListCtrl->InsertColumn( 2, wxT("Device"), wxLIST_FORMAT_LEFT, 150 ); + m_printerListCtrl->InsertColumn( 3, wxT("Status"), wxLIST_FORMAT_LEFT, 80 ); + + wxListItem item; + item.SetMask( wxLIST_MASK_TEXT ); + item.SetColumn( 1 ); + item.SetText( _("Default printer") ); + item.SetId( m_printerListCtrl->InsertItem( item ) ); + + if (data->GetPrinterName().empty()) + { + wxListItem item2; + item2.SetId( item.GetId() ); + item2.SetMask( wxLIST_MASK_IMAGE ); + item2.SetImage( 0 ); + m_printerListCtrl->SetItem( item2 ); + // also select item + m_printerListCtrl->SetItemState( item.GetId(), wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED ); + } + + item.SetId( 1+ item.GetId() ); + + wxArrayString errors; + wxArrayString output; + long res = wxExecute( wxT("lpstat -v"), output, errors, wxEXEC_NODISABLE ); + if (res >= 0 && errors.GetCount() == 0) + { + size_t i; + for (i = 0; i < output.GetCount(); i++) + { + wxStringTokenizer tok( output[i], wxT(" ") ); + wxString tmp = tok.GetNextToken(); // "device" + if (tmp != wxT("device")) + break; // the lpstat syntax must have changed. + tmp = tok.GetNextToken(); // "for" + if (tmp != wxT("for")) + break; // the lpstat syntax must have changed. + tmp = tok.GetNextToken(); // "hp_deskjet930c:" + if (tmp[tmp.length()-1] == wxT(':')) + tmp.Remove(tmp.length()-1,1); + wxString name = tmp; + item.SetText( name ); + item.SetId( m_printerListCtrl->InsertItem( item ) ); + tmp = tok.GetNextToken(); // "parallel:/dev/lp0" + item.SetColumn( 2 ); + item.SetText( tmp ); + m_printerListCtrl->SetItem( item ); + if (data->GetPrinterName() == name) + { + wxListItem item2; + item2.SetId( item.GetId() ); + item2.SetMask( wxLIST_MASK_IMAGE ); + item2.SetImage( 0 ); + m_printerListCtrl->SetItem( item2 ); + // also select item + m_printerListCtrl->SetItemState( item.GetId(), wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED ); + } + + wxString command = wxT("lpstat -p "); + command += name; + wxArrayString errors2; + wxArrayString output2; + res = wxExecute( command, output2, errors2, wxEXEC_NODISABLE ); + if (res >= 0 && errors2.GetCount() == 0 && output2.GetCount() > 0) + { + tmp = output2[0]; // "printer hp_deskjet930c is idle. enable since ..." + int pos = tmp.Find( wxT('.') ); + if (pos != wxNOT_FOUND) + tmp.Remove( (size_t)pos, tmp.length()-(size_t)pos ); + wxStringTokenizer tok2( tmp, wxT(" ") ); + tmp = tok2.GetNextToken(); // "printer" + tmp = tok2.GetNextToken(); // "hp_deskjet930c" + tmp = wxEmptyString; + while (tok2.HasMoreTokens()) + { + tmp += tok2.GetNextToken(); + tmp += wxT(" "); + } + item.SetColumn( 3 ); + item.SetText( tmp ); + m_printerListCtrl->SetItem( item ); + } + + item.SetColumn( 1 ); + item.SetId( 1+ item.GetId() ); + } + } + + + printer_sizer->Add( m_printerListCtrl, 0, wxALL|wxGROW, 5 ); + + wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL ); + main_sizer->Add( item1, 0, wxALL, 5 ); + + // printer options (on the left) + + wxBoxSizer *item2 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBox *item4 = new wxStaticBox( this, wxPRINTID_STATIC, _("Paper size") ); + wxStaticBoxSizer *item3 = new wxStaticBoxSizer( item4, wxVERTICAL ); + + m_paperTypeChoice = CreatePaperTypeChoice(); + item3->Add( m_paperTypeChoice, 0, wxALIGN_CENTER|wxALL, 5 ); + + item2->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 ); + + wxString strs6[] = + { + _("Portrait"), + _("Landscape") + }; + m_orientationRadioBox= new wxRadioBox( this, wxPRINTID_ORIENTATION, _("Orientation"), wxDefaultPosition, wxDefaultSize, 2, strs6, 1, wxRA_SPECIFY_ROWS ); + item2->Add( m_orientationRadioBox, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + wxStaticBox *item8 = new wxStaticBox( this, wxID_ANY, _("Options") ); + wxStaticBoxSizer *item7 = new wxStaticBoxSizer( item8, wxHORIZONTAL ); + + m_colourCheckBox = new wxCheckBox( this, wxPRINTID_PRINTCOLOUR, _("Print in colour") ); + item7->Add( m_colourCheckBox, 0, wxALIGN_CENTER|wxALL, 5 ); + + item2->Add( item7, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + item1->Add( item2, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + // spooling options (on the right) + + wxStaticBox *item11 = new wxStaticBox( this, wxID_ANY, _("Print spooling") ); + wxStaticBoxSizer *item10 = new wxStaticBoxSizer( item11, wxVERTICAL ); + + wxStaticText *item12 = new wxStaticText( this, wxID_ANY, _("Printer command:") ); + item10->Add( item12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + wxBoxSizer *item13 = new wxBoxSizer( wxHORIZONTAL ); + + item13->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 ); + + m_printerCommandText = new wxTextCtrl( this, wxPRINTID_COMMAND, wxEmptyString, wxDefaultPosition, wxSize(160,wxDefaultCoord) ); + item13->Add( m_printerCommandText, 0, wxALIGN_CENTER|wxALL, 5 ); + + item10->Add( item13, 0, wxALIGN_CENTER|wxALL, 0 ); + + wxStaticText *item15 = new wxStaticText( this, wxID_ANY, _("Printer options:") ); + item10->Add( item15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + wxBoxSizer *item16 = new wxBoxSizer( wxHORIZONTAL ); + + item16->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 ); + + m_printerOptionsText = new wxTextCtrl( this, wxPRINTID_OPTIONS, wxEmptyString, wxDefaultPosition, wxSize(160,wxDefaultCoord) ); + item16->Add( m_printerOptionsText, 0, wxALIGN_CENTER|wxALL, 5 ); + + item10->Add( item16, 0, wxALIGN_CENTER|wxALL, 0 ); + + item1->Add( item10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + +#if wxUSE_STATLINE + // static line + main_sizer->Add( new wxStaticLine( this, wxID_ANY ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 ); +#endif + + // buttons + + main_sizer->Add( CreateButtonSizer( wxOK|wxCANCEL), 0, wxEXPAND|wxALL, 10 ); + + SetAutoLayout( true ); + SetSizer( main_sizer ); + + main_sizer->Fit( this ); + Centre(wxBOTH); + + + Fit(); + Centre(wxBOTH); + + InitDialog(); +} + +wxGenericPrintSetupDialog::~wxGenericPrintSetupDialog() +{ +} + +void wxGenericPrintSetupDialog::OnPrinter(wxListEvent& event) +{ + // Delete check mark + for (long item = 0; item < m_printerListCtrl->GetItemCount(); item++) + m_printerListCtrl->SetItemImage( item, -1 ); + + m_printerListCtrl->SetItemImage( event.GetIndex(), 0 ); + + if (event.GetIndex() == 0) + { + m_printerCommandText->SetValue( wxT("lpr") ); + } + else + { + wxListItem li; + li.SetColumn( 1 ); + li.SetMask( wxLIST_MASK_TEXT ); + li.SetId( event.GetIndex() ); + m_printerListCtrl->GetItem( li ); + m_printerCommandText->SetValue( wxT("lpr -P") + li.GetText() ); + } +} + +bool wxGenericPrintSetupDialog::TransferDataToWindow() +{ + wxPostScriptPrintNativeData *data = + (wxPostScriptPrintNativeData *) m_printData.GetNativeData(); + + if (m_printerCommandText && !data->GetPrinterCommand().empty()) + m_printerCommandText->SetValue(data->GetPrinterCommand()); + if (m_printerOptionsText && !data->GetPrinterOptions().empty()) + m_printerOptionsText->SetValue(data->GetPrinterOptions()); + if (m_colourCheckBox) + m_colourCheckBox->SetValue(m_printData.GetColour()); + + if (m_orientationRadioBox) + { + if (m_printData.GetOrientation() == wxPORTRAIT) + m_orientationRadioBox->SetSelection(0); + else + m_orientationRadioBox->SetSelection(1); + } + return true; +} + +bool wxGenericPrintSetupDialog::TransferDataFromWindow() +{ + wxPostScriptPrintNativeData *data = + (wxPostScriptPrintNativeData *) m_printData.GetNativeData(); + + // find selected printer + long id = m_printerListCtrl->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); + if (id == 0) + { + m_printData.SetPrinterName( wxEmptyString ); + } + else + { + wxListItem item; + item.SetId( id ); + item.SetMask( wxLIST_MASK_TEXT ); + item.SetColumn( 1 ); + m_printerListCtrl->GetItem( item ); + m_printData.SetPrinterName( item.GetText() ); + } + + if (m_printerCommandText) + data->SetPrinterCommand(m_printerCommandText->GetValue()); + if (m_printerOptionsText) + data->SetPrinterOptions(m_printerOptionsText->GetValue()); + if (m_colourCheckBox) + m_printData.SetColour(m_colourCheckBox->GetValue()); + if (m_orientationRadioBox) + { + int sel = m_orientationRadioBox->GetSelection(); + if (sel == 0) + m_printData.SetOrientation(wxPORTRAIT); + else + m_printData.SetOrientation(wxLANDSCAPE); + } + if (m_paperTypeChoice) + { + int selectedItem = m_paperTypeChoice->GetSelection(); + if (selectedItem != -1) + { + wxPrintPaperType *paper = wxThePrintPaperDatabase->Item(selectedItem); + if (paper != NULL) + m_printData.SetPaperId( paper->GetId()); + } + } + + if (m_targetData) + *m_targetData = m_printData; + + return true; +} + +wxComboBox *wxGenericPrintSetupDialog::CreatePaperTypeChoice() +{ + size_t n = wxThePrintPaperDatabase->GetCount(); + wxString *choices = new wxString [n]; + size_t sel = 0; + + for (size_t i = 0; i < n; i++) + { + wxPrintPaperType *paper = wxThePrintPaperDatabase->Item(i); + choices[i] = paper->GetName(); + if (m_printData.GetPaperId() == paper->GetId()) + sel = i; + } + + int width = 250; + + wxComboBox *choice = new wxComboBox( this, + wxPRINTID_PAPERSIZE, + _("Paper size"), + wxDefaultPosition, + wxSize(width, wxDefaultCoord), + n, choices ); + + delete[] choices; + + choice->SetSelection(sel); + return choice; +} + +#endif // wxUSE_POSTSCRIPT + +// ---------------------------------------------------------------------------- +// Generic page setup dialog +// ---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxGenericPageSetupDialog, wxPageSetupDialogBase) + +BEGIN_EVENT_TABLE(wxGenericPageSetupDialog, wxPageSetupDialogBase) + EVT_BUTTON(wxPRINTID_SETUP, wxGenericPageSetupDialog::OnPrinter) +END_EVENT_TABLE() + +wxGenericPageSetupDialog::wxGenericPageSetupDialog( wxWindow *parent, + wxPageSetupDialogData* data) + : wxPageSetupDialogBase( parent, + wxID_ANY, + _("Page setup"), + wxPoint(0,0), + wxSize(600, 600), + wxDEFAULT_DIALOG_STYLE|wxTAB_TRAVERSAL ) +{ + if (data) + m_pageData = *data; + + int textWidth = 80; + + wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL ); + + // 1) top + wxStaticBoxSizer *topsizer = new wxStaticBoxSizer( + new wxStaticBox(this,wxPRINTID_STATIC, _("Paper size")), wxHORIZONTAL ); + + size_t n = wxThePrintPaperDatabase->GetCount(); + wxString *choices = new wxString [n]; + + for (size_t i = 0; i < n; i++) + { + wxPrintPaperType *paper = wxThePrintPaperDatabase->Item(i); + choices[i] = paper->GetName(); + } + + m_paperTypeChoice = new wxComboBox( this, + wxPRINTID_PAPERSIZE, + _("Paper size"), + wxDefaultPosition, + wxSize(300, wxDefaultCoord), + n, choices ); + topsizer->Add( m_paperTypeChoice, 1, wxEXPAND|wxALL, 5 ); +// m_paperTypeChoice->SetSelection(sel); + + mainsizer->Add( topsizer, 0, wxTOP|wxLEFT|wxRIGHT | wxEXPAND, 10 ); + + // 2) middle sizer with radio box + + wxString *choices2 = new wxString[2]; + choices2[0] = _("Portrait"); + choices2[1] = _("Landscape"); + m_orientationRadioBox = new wxRadioBox(this, wxPRINTID_ORIENTATION, _("Orientation"), + wxDefaultPosition, wxDefaultSize, 2, choices2, 2); + m_orientationRadioBox->SetSelection(0); + + mainsizer->Add( m_orientationRadioBox, 0, wxTOP|wxLEFT|wxRIGHT, 10 ); + + // 3) margins + + wxBoxSizer *table = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer *column1 = new wxBoxSizer( wxVERTICAL ); + column1->Add( new wxStaticText(this, wxPRINTID_STATIC, _("Left margin (mm):")),1,wxALL|wxALIGN_RIGHT,5 ); + column1->Add( new wxStaticText(this, wxPRINTID_STATIC, _("Top margin (mm):")),1,wxALL|wxALIGN_RIGHT,5 ); + table->Add( column1, 0, wxALL | wxEXPAND, 5 ); + + wxBoxSizer *column2 = new wxBoxSizer( wxVERTICAL ); + m_marginLeftText = new wxTextCtrl(this, wxPRINTID_LEFTMARGIN, wxEmptyString, wxDefaultPosition, wxSize(textWidth, wxDefaultCoord)); + m_marginTopText = new wxTextCtrl(this, wxPRINTID_TOPMARGIN, wxEmptyString, wxDefaultPosition, wxSize(textWidth, wxDefaultCoord)); + column2->Add( m_marginLeftText, 1, wxALL, 5 ); + column2->Add( m_marginTopText, 1, wxALL, 5 ); + table->Add( column2, 0, wxRIGHT|wxTOP|wxBOTTOM | wxEXPAND, 5 ); + + wxBoxSizer *column3 = new wxBoxSizer( wxVERTICAL ); + column3->Add( new wxStaticText(this, wxPRINTID_STATIC, _("Right margin (mm):")),1,wxALL|wxALIGN_RIGHT,5 ); + column3->Add( new wxStaticText(this, wxPRINTID_STATIC, _("Bottom margin (mm):")),1,wxALL|wxALIGN_RIGHT,5 ); + table->Add( column3, 0, wxALL | wxEXPAND, 5 ); + + wxBoxSizer *column4 = new wxBoxSizer( wxVERTICAL ); + m_marginRightText = new wxTextCtrl(this, wxPRINTID_RIGHTMARGIN, wxEmptyString, wxDefaultPosition, wxSize(textWidth, wxDefaultCoord)); + m_marginBottomText = new wxTextCtrl(this, wxPRINTID_BOTTOMMARGIN, wxEmptyString, wxDefaultPosition, wxSize(textWidth, wxDefaultCoord)); + column4->Add( m_marginRightText, 1, wxALL, 5 ); + column4->Add( m_marginBottomText, 1, wxALL, 5 ); + table->Add( column4, 0, wxRIGHT|wxTOP|wxBOTTOM | wxEXPAND, 5 ); + + mainsizer->Add( table, 0 ); + +#if wxUSE_STATLINE + // 5) static line + mainsizer->Add( new wxStaticLine( this, wxID_ANY ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 ); +#endif + + // 6) buttons + + wxSizer* buttonsizer = CreateButtonSizer( wxOK|wxCANCEL); + + if (wxPrintFactory::GetFactory()->HasPrintSetupDialog()) + { + m_printerButton = new wxButton(this, wxPRINTID_SETUP, _("Printer...") ); + buttonsizer->Add( m_printerButton, 0, wxLEFT|wxRIGHT, 10 ); + if ( !m_pageData.GetEnablePrinter() ) + m_printerButton->Enable(false); + } + else + { + m_printerButton = NULL; + } + + // if (m_printData.GetEnableHelp()) + // wxButton *helpButton = new wxButton(this, (wxFunction)wxGenericPageSetupHelpProc, _("Help"), wxDefaultCoord, wxDefaultCoord, buttonWidth, buttonHeight); + mainsizer->Add( buttonsizer, 0, wxEXPAND|wxALL, 10 ); + + + SetAutoLayout( true ); + SetSizer( mainsizer ); + + mainsizer->Fit( this ); + Centre(wxBOTH); + + InitDialog(); + + delete[] choices; + delete [] choices2; +} + +wxGenericPageSetupDialog::~wxGenericPageSetupDialog() +{ +} + +wxPageSetupDialogData& wxGenericPageSetupDialog::GetPageSetupDialogData() +{ + return m_pageData; +} + +bool wxGenericPageSetupDialog::TransferDataToWindow() +{ + if (m_marginLeftText) + m_marginLeftText->SetValue(wxString::Format(wxT("%d"), m_pageData.GetMarginTopLeft().x)); + if (m_marginTopText) + m_marginTopText->SetValue(wxString::Format(wxT("%d"), m_pageData.GetMarginTopLeft().y)); + if (m_marginRightText) + m_marginRightText->SetValue(wxString::Format(wxT("%d"), m_pageData.GetMarginBottomRight().x)); + if (m_marginBottomText) + m_marginBottomText->SetValue(wxString::Format(wxT("%d"), m_pageData.GetMarginBottomRight().y)); + + if (m_orientationRadioBox) + { + if (m_pageData.GetPrintData().GetOrientation() == wxPORTRAIT) + m_orientationRadioBox->SetSelection(0); + else + m_orientationRadioBox->SetSelection(1); + } + + // Find the paper type from either the current paper size in the wxPageSetupDialogData, or + // failing that, the id in the wxPrintData object. + + wxPrintPaperType* type = wxThePrintPaperDatabase->FindPaperType( + wxSize(m_pageData.GetPaperSize().x * 10, m_pageData.GetPaperSize().y * 10)); + + if (!type && m_pageData.GetPrintData().GetPaperId() != wxPAPER_NONE) + type = wxThePrintPaperDatabase->FindPaperType(m_pageData.GetPrintData().GetPaperId()); + + if (type) + { + m_paperTypeChoice->SetStringSelection(type->GetName()); + } + + return true; +} + +bool wxGenericPageSetupDialog::TransferDataFromWindow() +{ + if (m_marginLeftText && m_marginTopText) + { + int left = wxAtoi( m_marginLeftText->GetValue().c_str() ); + int top = wxAtoi( m_marginTopText->GetValue().c_str() ); + m_pageData.SetMarginTopLeft( wxPoint(left,top) ); + } + if (m_marginRightText && m_marginBottomText) + { + int right = wxAtoi( m_marginRightText->GetValue().c_str() ); + int bottom = wxAtoi( m_marginBottomText->GetValue().c_str() ); + m_pageData.SetMarginBottomRight( wxPoint(right,bottom) ); + } + + if (m_orientationRadioBox) + { + int sel = m_orientationRadioBox->GetSelection(); + if (sel == 0) + { + m_pageData.GetPrintData().SetOrientation(wxPORTRAIT); + } + else + { + m_pageData.GetPrintData().SetOrientation(wxLANDSCAPE); + } + } + + if (m_paperTypeChoice) + { + int selectedItem = m_paperTypeChoice->GetSelection(); + if (selectedItem != -1) + { + wxPrintPaperType *paper = wxThePrintPaperDatabase->Item(selectedItem); + if ( paper ) + { + m_pageData.SetPaperSize(wxSize(paper->GetWidth()/10, paper->GetHeight()/10)); + m_pageData.GetPrintData().SetPaperId(paper->GetId()); + } + } + } + + return true; +} + +wxComboBox *wxGenericPageSetupDialog::CreatePaperTypeChoice(int *x, int *y) +{ +/* + if (!wxThePrintPaperDatabase) + { + wxThePrintPaperDatabase = new wxPrintPaperDatabase; + wxThePrintPaperDatabase->CreateDatabase(); + } +*/ + + size_t n = wxThePrintPaperDatabase->GetCount(); + wxString *choices = new wxString [n]; + + for (size_t i = 0; i < n; i++) + { + wxPrintPaperType *paper = wxThePrintPaperDatabase->Item(i); + choices[i] = paper->GetName(); + } + + (void) new wxStaticText(this, wxPRINTID_STATIC, _("Paper size"), wxPoint(*x, *y)); + *y += 25; + + wxComboBox *choice = new wxComboBox( this, + wxPRINTID_PAPERSIZE, + _("Paper size"), + wxPoint(*x, *y), + wxSize(300, wxDefaultCoord), + n, choices ); + *y += 35; + delete[] choices; + +// choice->SetSelection(sel); + return choice; +} + +void wxGenericPageSetupDialog::OnPrinter(wxCommandEvent& WXUNUSED(event)) +{ + // We no longer query GetPrintMode, so we can eliminate the need + // to call SetPrintMode. + // This has the limitation that we can't explicitly call the PostScript + // print setup dialog from the generic Page Setup dialog under Windows, + // but since this choice would only happen when trying to do PostScript + // printing under Windows (and only in 16-bit Windows which + // doesn't have a Windows-specific page setup dialog) it's worth it. + + // First save the current settings, so the wxPrintData object is up to date. + TransferDataFromWindow(); + + // Transfer the current print settings from this dialog to the page setup dialog. + +#if 0 + // Use print factory later + + wxPrintDialogData data; + data = GetPageSetupData().GetPrintData(); + data.SetSetupDialog(true); + wxPrintDialog printDialog(this, & data); + printDialog.ShowModal(); + + // Transfer the page setup print settings from the page dialog to this dialog again, in case + // the page setup dialog changed something. + GetPageSetupData().GetPrintData() = printDialog.GetPrintDialogData().GetPrintData(); + GetPageSetupData().CalculatePaperSizeFromId(); // Make sure page size reflects the id in wxPrintData + + // Now update the dialog in case the page setup dialog changed some of our settings. + TransferDataToWindow(); +#endif +} + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/progdlgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/progdlgg.cpp new file mode 100644 index 0000000000..a036308435 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/progdlgg.cpp @@ -0,0 +1,828 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/progdlgg.cpp +// Purpose: wxGenericProgressDialog class +// Author: Karsten Ballueder +// Modified by: +// Created: 09.05.1999 +// Copyright: (c) Karsten Ballueder +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PROGRESSDLG + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/frame.h" + #include "wx/button.h" + #include "wx/stattext.h" + #include "wx/sizer.h" + #include "wx/event.h" + #include "wx/gauge.h" + #include "wx/intl.h" + #include "wx/dcclient.h" + #include "wx/timer.h" + #include "wx/settings.h" + #include "wx/app.h" +#endif + +#include "wx/progdlg.h" +#include "wx/evtloop.h" + +// --------------------------------------------------------------------------- +// macros +// --------------------------------------------------------------------------- + +/* Macro for avoiding #ifdefs when value have to be different depending on size of + device we display on - take it from something like wxDesktopPolicy in the future + */ + +#if defined(__SMARTPHONE__) + #define wxLARGESMALL(large,small) small +#else + #define wxLARGESMALL(large,small) large +#endif + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +#define LAYOUT_MARGIN wxLARGESMALL(8,2) + +static const int wxID_SKIP = 32000; // whatever + +// ---------------------------------------------------------------------------- +// event tables +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxGenericProgressDialog, wxDialog) + EVT_BUTTON(wxID_CANCEL, wxGenericProgressDialog::OnCancel) + EVT_BUTTON(wxID_SKIP, wxGenericProgressDialog::OnSkip) + + EVT_CLOSE(wxGenericProgressDialog::OnClose) +END_EVENT_TABLE() + +// ============================================================================ +// wxGenericProgressDialog implementation +// ============================================================================ + +wxIMPLEMENT_CLASS(wxProgressDialog, wxDialog) + +// ---------------------------------------------------------------------------- +// wxGenericProgressDialog creation +// ---------------------------------------------------------------------------- + +void wxGenericProgressDialog::Init() +{ + // we may disappear at any moment, let the others know about it + SetExtraStyle(GetExtraStyle() | wxWS_EX_TRANSIENT); + + // Initialize all our members that we always use (even when we don't + // create a valid window in this class). + + m_pdStyle = 0; + m_parentTop = NULL; + + m_gauge = NULL; + m_msg = NULL; + m_elapsed = + m_estimated = + m_remaining = NULL; + + m_state = Uncancelable; + m_maximum = 0; + + m_timeStart = wxGetCurrentTime(); + m_timeStop = (unsigned long)-1; + m_break = 0; + + m_skip = false; + +#if !defined(__SMARTPHONE__) + m_btnAbort = + m_btnSkip = NULL; +#endif + + m_display_estimated = + m_last_timeupdate = + m_ctdelay = 0; + + m_delay = 3; + + m_winDisabler = NULL; + m_tempEventLoop = NULL; +} + +wxGenericProgressDialog::wxGenericProgressDialog() + : wxDialog() +{ + Init(); +} + +wxGenericProgressDialog::wxGenericProgressDialog(const wxString& title, + const wxString& message, + int maximum, + wxWindow *parent, + int style) + : wxDialog() +{ + Init(); + + Create( title, message, maximum, parent, style ); +} + +void wxGenericProgressDialog::SetTopParent(wxWindow* parent) +{ + m_parentTop = GetParentForModalDialog(parent, GetWindowStyle()); +} + +bool wxGenericProgressDialog::Create( const wxString& title, + const wxString& message, + int maximum, + wxWindow *parent, + int style ) +{ + SetTopParent(parent); + + m_parentTop = wxGetTopLevelParent(parent); + m_pdStyle = style; + + wxWindow* const + realParent = GetParentForModalDialog(parent, GetWindowStyle()); + + if (!wxDialog::Create(realParent, wxID_ANY, title)) + return false; + + SetMaximum(maximum); + + // We need a running event loop in order to update the dialog and be able + // to process clicks on its buttons, so ensure that there is one running + // even if this means we have to start it ourselves (this happens most + // commonly during the program initialization, e.g. for the progress + // dialogs shown from overridden wxApp::OnInit()). + if ( !wxEventLoopBase::GetActive() ) + { + m_tempEventLoop = new wxEventLoop; + wxEventLoop::SetActive(m_tempEventLoop); + } + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + // we have to remove the "Close" button from the title bar then as it is + // confusing to have it - it doesn't work anyhow + // + // FIXME: should probably have a (extended?) window style for this + if ( !HasPDFlag(wxPD_CAN_ABORT) ) + { + EnableCloseButton(false); + } +#endif // wxMSW + +#if defined(__SMARTPHONE__) + SetLeftMenu(); +#endif + + m_state = HasPDFlag(wxPD_CAN_ABORT) ? Continue : Uncancelable; + + // top-level sizerTop + wxSizer * const sizerTop = new wxBoxSizer(wxVERTICAL); + + m_msg = new wxStaticText(this, wxID_ANY, message); + sizerTop->Add(m_msg, 0, wxLEFT | wxRIGHT | wxTOP, 2*LAYOUT_MARGIN); + + int gauge_style = wxGA_HORIZONTAL; + if ( style & wxPD_SMOOTH ) + gauge_style |= wxGA_SMOOTH; + +#ifdef __WXMSW__ + maximum /= m_factor; +#endif + + m_gauge = new wxGauge + ( + this, + wxID_ANY, + maximum, + wxDefaultPosition, + // make the progress bar sufficiently long + wxSize(wxMin(wxGetClientDisplayRect().width/3, 300), -1), + gauge_style + ); + + sizerTop->Add(m_gauge, 0, wxLEFT | wxRIGHT | wxTOP | wxEXPAND, 2*LAYOUT_MARGIN); + m_gauge->SetValue(0); + + // create the estimated/remaining/total time zones if requested + m_elapsed = + m_estimated = + m_remaining = NULL; + + // also count how many labels we really have + size_t nTimeLabels = 0; + + wxSizer * const sizerLabels = new wxFlexGridSizer(2); + + if ( style & wxPD_ELAPSED_TIME ) + { + nTimeLabels++; + + m_elapsed = CreateLabel(GetElapsedLabel(), sizerLabels); + } + + if ( style & wxPD_ESTIMATED_TIME ) + { + nTimeLabels++; + + m_estimated = CreateLabel(GetEstimatedLabel(), sizerLabels); + } + + if ( style & wxPD_REMAINING_TIME ) + { + nTimeLabels++; + + m_remaining = CreateLabel(GetRemainingLabel(), sizerLabels); + } + sizerTop->Add(sizerLabels, 0, wxALIGN_CENTER_HORIZONTAL | wxTOP, LAYOUT_MARGIN); + +#if defined(__SMARTPHONE__) + if ( HasPDFlag(wxPD_CAN_SKIP) ) + SetRightMenu(wxID_SKIP, _("Skip")); + if ( HasPDFlag(wxPD_CAN_ABORT) ) + SetLeftMenu(wxID_CANCEL); +#else + m_btnAbort = + m_btnSkip = NULL; + + wxBoxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL); + + // Windows dialogs usually have buttons in the lower right corner + const int sizerFlags = +#if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXOSX__) + wxALIGN_RIGHT | wxALL +#else // !MSW + wxALIGN_CENTER_HORIZONTAL | wxBOTTOM | wxTOP +#endif // MSW/!MSW + ; + + if ( HasPDFlag(wxPD_CAN_SKIP) ) + { + m_btnSkip = new wxButton(this, wxID_SKIP, _("&Skip")); + + buttonSizer->Add(m_btnSkip, 0, sizerFlags, LAYOUT_MARGIN); + } + + if ( HasPDFlag(wxPD_CAN_ABORT) ) + { + m_btnAbort = new wxButton(this, wxID_CANCEL); + + buttonSizer->Add(m_btnAbort, 0, sizerFlags, LAYOUT_MARGIN); + } + + if ( !HasPDFlag(wxPD_CAN_SKIP | wxPD_CAN_ABORT) ) + buttonSizer->AddSpacer(LAYOUT_MARGIN); + + sizerTop->Add(buttonSizer, 0, sizerFlags, LAYOUT_MARGIN ); +#endif // __SMARTPHONE__/!__SMARTPHONE__ + + SetSizerAndFit(sizerTop); + + Centre(wxCENTER_FRAME | wxBOTH); + + DisableOtherWindows(); + + Show(); + Enable(); + + // this one can be initialized even if the others are unknown for now + // + // NB: do it after calling Layout() to keep the labels correctly aligned + if ( m_elapsed ) + { + SetTimeLabel(0, m_elapsed); + } + + Update(); + return true; +} + +void wxGenericProgressDialog::UpdateTimeEstimates(int value, + unsigned long &elapsedTime, + unsigned long &estimatedTime, + unsigned long &remainingTime) +{ + unsigned long elapsed = wxGetCurrentTime() - m_timeStart; + if ( value != 0 && (m_last_timeupdate < elapsed || value == m_maximum) ) + { + m_last_timeupdate = elapsed; + unsigned long estimated = m_break + + (unsigned long)(( (double) (elapsed-m_break) * m_maximum ) / ((double)value)) ; + if ( estimated > m_display_estimated + && m_ctdelay >= 0 + ) + { + ++m_ctdelay; + } + else if ( estimated < m_display_estimated + && m_ctdelay <= 0 + ) + { + --m_ctdelay; + } + else + { + m_ctdelay = 0; + } + if ( m_ctdelay >= m_delay // enough confirmations for a higher value + || m_ctdelay <= (m_delay*-1) // enough confirmations for a lower value + || value == m_maximum // to stay consistent + || elapsed > m_display_estimated // to stay consistent + || ( elapsed > 0 && elapsed < 4 ) // additional updates in the beginning + ) + { + m_display_estimated = estimated; + m_ctdelay = 0; + } + } + + if ( value != 0 ) + { + long display_remaining = m_display_estimated - elapsed; + if ( display_remaining < 0 ) + { + display_remaining = 0; + } + + estimatedTime = m_display_estimated; + remainingTime = display_remaining; + } + + elapsedTime = elapsed; +} + +// static +wxString wxGenericProgressDialog::GetFormattedTime(unsigned long timeInSec) +{ + wxString timeAsHMS; + + if ( timeInSec == (unsigned long)-1 ) + { + timeAsHMS = _("Unknown"); + } + else + { + unsigned hours = timeInSec / 3600; + unsigned minutes = (timeInSec % 3600) / 60; + unsigned seconds = timeInSec % 60; + timeAsHMS.Printf("%u:%02u:%02u", hours, minutes, seconds); + } + + return timeAsHMS; +} + +wxStaticText * +wxGenericProgressDialog::CreateLabel(const wxString& text, wxSizer *sizer) +{ + wxStaticText *label = new wxStaticText(this, wxID_ANY, text); + wxStaticText *value = new wxStaticText(this, wxID_ANY, _("unknown")); + + // select placement most native or nice on target GUI +#if defined(__SMARTPHONE__) + // value and time to the left in two rows + sizer->Add(label, 1, wxALIGN_LEFT); + sizer->Add(value, 1, wxALIGN_LEFT); +#elif defined(__WXMSW__) || defined(__WXPM__) || defined(__WXMAC__) || defined(__WXGTK20__) + // value and time centered in one row + sizer->Add(label, 1, wxLARGESMALL(wxALIGN_RIGHT,wxALIGN_LEFT) | wxTOP | wxRIGHT, LAYOUT_MARGIN); + sizer->Add(value, 1, wxALIGN_LEFT | wxTOP, LAYOUT_MARGIN); +#else + // value and time to the right in one row + sizer->Add(label); + sizer->Add(value, 0, wxLEFT, LAYOUT_MARGIN); +#endif + + return value; +} + +// ---------------------------------------------------------------------------- +// wxGenericProgressDialog operations +// ---------------------------------------------------------------------------- + +bool +wxGenericProgressDialog::Update(int value, const wxString& newmsg, bool *skip) +{ + if ( !DoBeforeUpdate(skip) ) + return false; + + wxCHECK_MSG( m_gauge, false, "dialog should be fully created" ); + +#ifdef __WXMSW__ + value /= m_factor; +#endif // __WXMSW__ + + wxASSERT_MSG( value <= m_maximum, wxT("invalid progress value") ); + + m_gauge->SetValue(value); + + UpdateMessage(newmsg); + + if ( (m_elapsed || m_remaining || m_estimated) && (value != 0) ) + { + unsigned long elapsed; + unsigned long display_remaining; + + UpdateTimeEstimates( value, + elapsed, + m_display_estimated, + display_remaining ); + + SetTimeLabel(elapsed, m_elapsed); + SetTimeLabel(m_display_estimated, m_estimated); + SetTimeLabel(display_remaining, m_remaining); + } + + if ( value == m_maximum ) + { + if ( m_state == Finished ) + { + // ignore multiple calls to Update(m_maximum): it may sometimes be + // troublesome to ensure that Update() is not called twice with the + // same value (e.g. because of the rounding errors) and if we don't + // return now we're going to generate asserts below + return true; + } + + // so that we return true below and that out [Cancel] handler knew what + // to do + m_state = Finished; + if( !HasPDFlag(wxPD_AUTO_HIDE) ) + { + EnableClose(); + DisableSkip(); +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + EnableCloseButton(); +#endif // __WXMSW__ + + if ( newmsg.empty() ) + { + // also provide the finishing message if the application didn't + m_msg->SetLabel(_("Done.")); + } + + // allow the window to repaint: + // NOTE: since we yield only for UI events with this call, there + // should be no side-effects + wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI); + + // NOTE: this call results in a new event loop being created + // and to a call to ProcessPendingEvents() (which may generate + // unwanted re-entrancies). + (void)ShowModal(); + } + else // auto hide + { + // reenable other windows before hiding this one because otherwise + // Windows wouldn't give the focus back to the window which had + // been previously focused because it would still be disabled + ReenableOtherWindows(); + + Hide(); + } + } + else // not at maximum yet + { + DoAfterUpdate(); + } + + // update the display in case yielding above didn't do it + Update(); + + return m_state != Canceled; +} + +bool wxGenericProgressDialog::Pulse(const wxString& newmsg, bool *skip) +{ + if ( !DoBeforeUpdate(skip) ) + return false; + + wxCHECK_MSG( m_gauge, false, "dialog should be fully created" ); + + // show a bit of progress + m_gauge->Pulse(); + + UpdateMessage(newmsg); + + if (m_elapsed || m_remaining || m_estimated) + { + unsigned long elapsed = wxGetCurrentTime() - m_timeStart; + + SetTimeLabel(elapsed, m_elapsed); + SetTimeLabel((unsigned long)-1, m_estimated); + SetTimeLabel((unsigned long)-1, m_remaining); + } + + DoAfterUpdate(); + + return m_state != Canceled; +} + +bool wxGenericProgressDialog::DoBeforeUpdate(bool *skip) +{ + // we have to yield because not only we want to update the display but + // also to process the clicks on the cancel and skip buttons + // NOTE: using YieldFor() this call shouldn't give re-entrancy problems + // for event handlers not interested to UI/user-input events. + wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI|wxEVT_CATEGORY_USER_INPUT); + + Update(); + + if ( m_skip && skip && !*skip ) + { + *skip = true; + m_skip = false; + EnableSkip(); + } + + return m_state != Canceled; +} + +void wxGenericProgressDialog::DoAfterUpdate() +{ + // allow the window to repaint: + // NOTE: since we yield only for UI events with this call, there + // should be no side-effects + wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI); +} + +void wxGenericProgressDialog::Resume() +{ + m_state = Continue; + m_ctdelay = m_delay; // force an update of the elapsed/estimated/remaining time + m_break += wxGetCurrentTime()-m_timeStop; + + EnableAbort(); + EnableSkip(); + m_skip = false; +} + +bool wxGenericProgressDialog::Show( bool show ) +{ + // reenable other windows before hiding this one because otherwise + // Windows wouldn't give the focus back to the window which had + // been previously focused because it would still be disabled + if(!show) + ReenableOtherWindows(); + + return wxDialog::Show(show); +} + +int wxGenericProgressDialog::GetValue() const +{ + wxCHECK_MSG( m_gauge, -1, "dialog should be fully created" ); + + return m_gauge->GetValue(); +} + +int wxGenericProgressDialog::GetRange() const +{ + return m_maximum; +} + +wxString wxGenericProgressDialog::GetMessage() const +{ + return m_msg->GetLabel(); +} + +void wxGenericProgressDialog::SetRange(int maximum) +{ + wxCHECK_RET( m_gauge, "dialog should be fully created" ); + + wxCHECK_RET( maximum > 0, "Invalid range" ); + + m_gauge->SetRange(maximum); + + SetMaximum(maximum); +} + +void wxGenericProgressDialog::SetMaximum(int maximum) +{ + m_maximum = maximum; + +#if defined(__WXMSW__) || defined(__WXPM__) + // we can't have values > 65,536 in the progress control under Windows, so + // scale everything down + m_factor = m_maximum / 65536 + 1; +#endif // __WXMSW__ +} + + +bool wxGenericProgressDialog::WasCancelled() const +{ + return HasPDFlag(wxPD_CAN_ABORT) && m_state == Canceled; +} + +bool wxGenericProgressDialog::WasSkipped() const +{ + return HasPDFlag(wxPD_CAN_SKIP) && m_skip; +} + +// static +void wxGenericProgressDialog::SetTimeLabel(unsigned long val, + wxStaticText *label) +{ + if ( label ) + { + wxString s; + + if (val != (unsigned long)-1) + { + s = GetFormattedTime(val); + } + else + { + s = _("Unknown"); + } + + if ( s != label->GetLabel() ) + label->SetLabel(s); + } +} + +// ---------------------------------------------------------------------------- +// event handlers +// ---------------------------------------------------------------------------- + +void wxGenericProgressDialog::OnCancel(wxCommandEvent& event) +{ + if ( m_state == Finished ) + { + // this means that the count down is already finished and we're being + // shown as a modal dialog - so just let the default handler do the job + event.Skip(); + } + else + { + // request to cancel was received, the next time Update() is called we + // will handle it + m_state = Canceled; + + // update the buttons state immediately so that the user knows that the + // request has been noticed + DisableAbort(); + DisableSkip(); + + // save the time when the dialog was stopped + m_timeStop = wxGetCurrentTime(); + } +} + +void wxGenericProgressDialog::OnSkip(wxCommandEvent& WXUNUSED(event)) +{ + DisableSkip(); + m_skip = true; +} + +void wxGenericProgressDialog::OnClose(wxCloseEvent& event) +{ + if ( m_state == Uncancelable ) + { + // can't close this dialog + event.Veto(); + } + else if ( m_state == Finished ) + { + // let the default handler close the window as we already terminated + event.Skip(); + } + else + { + // next Update() will notice it + m_state = Canceled; + DisableAbort(); + DisableSkip(); + + m_timeStop = wxGetCurrentTime(); + } +} + +// ---------------------------------------------------------------------------- +// destruction +// ---------------------------------------------------------------------------- + +wxGenericProgressDialog::~wxGenericProgressDialog() +{ + // normally this should have been already done, but just in case + ReenableOtherWindows(); + + if ( m_tempEventLoop ) + { + wxEventLoopBase::SetActive(NULL); + delete m_tempEventLoop; + } +} + +void wxGenericProgressDialog::DisableOtherWindows() +{ + if ( HasPDFlag(wxPD_APP_MODAL) ) + { + m_winDisabler = new wxWindowDisabler(this); + } + else + { + if ( m_parentTop ) + m_parentTop->Disable(); + m_winDisabler = NULL; + } +} + +void wxGenericProgressDialog::ReenableOtherWindows() +{ + if ( HasPDFlag(wxPD_APP_MODAL) ) + { + wxDELETE(m_winDisabler); + } + else + { + if ( m_parentTop ) + m_parentTop->Enable(); + } +} + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +void wxGenericProgressDialog::EnableSkip(bool enable) +{ + if ( HasPDFlag(wxPD_CAN_SKIP) ) + { +#ifdef __SMARTPHONE__ + if(enable) + SetRightMenu(wxID_SKIP, _("Skip")); + else + SetRightMenu(); +#else + if(m_btnSkip) + m_btnSkip->Enable(enable); +#endif + } +} + +void wxGenericProgressDialog::EnableAbort(bool enable) +{ + if( HasPDFlag(wxPD_CAN_ABORT) ) + { +#ifdef __SMARTPHONE__ + if(enable) + SetLeftMenu(wxID_CANCEL); // stock buttons makes Cancel label + else + SetLeftMenu(); +#else + if(m_btnAbort) + m_btnAbort->Enable(enable); +#endif + } +} + +void wxGenericProgressDialog::EnableClose() +{ + if(HasPDFlag(wxPD_CAN_ABORT)) + { +#ifdef __SMARTPHONE__ + SetLeftMenu(wxID_CANCEL, _("Close")); +#else + if(m_btnAbort) + { + m_btnAbort->Enable(); + m_btnAbort->SetLabel(_("Close")); + } +#endif + } +} + +void wxGenericProgressDialog::UpdateMessage(const wxString &newmsg) +{ + if ( !newmsg.empty() && newmsg != m_msg->GetLabel() ) + { + m_msg->SetLabel(newmsg); + + // allow the window to repaint: + // NOTE: since we yield only for UI events with this call, there + // should be no side-effects + wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI); + } +} + +#endif // wxUSE_PROGRESSDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/propdlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/propdlg.cpp new file mode 100644 index 0000000000..d33530a831 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/propdlg.cpp @@ -0,0 +1,233 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/propdlg.cpp +// Purpose: wxPropertySheetDialog +// Author: Julian Smart +// Modified by: +// Created: 2005-03-12 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_BOOKCTRL + +#ifndef WX_PRECOMP + #include "wx/button.h" + #include "wx/sizer.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/msgdlg.h" +#endif + +#include "wx/bookctrl.h" + +#if wxUSE_NOTEBOOK +#include "wx/notebook.h" +#endif +#if wxUSE_CHOICEBOOK +#include "wx/choicebk.h" +#endif +#if wxUSE_TOOLBOOK +#include "wx/toolbook.h" +#endif +#if wxUSE_LISTBOOK +#include "wx/listbook.h" +#endif +#if wxUSE_TREEBOOK +#include "wx/treebook.h" +#endif + +#include "wx/generic/propdlg.h" +#include "wx/sysopt.h" + +//----------------------------------------------------------------------------- +// wxPropertySheetDialog +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxPropertySheetDialog, wxDialog) + +BEGIN_EVENT_TABLE(wxPropertySheetDialog, wxDialog) + EVT_ACTIVATE(wxPropertySheetDialog::OnActivate) + EVT_IDLE(wxPropertySheetDialog::OnIdle) +END_EVENT_TABLE() + +bool wxPropertySheetDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title, + const wxPoint& pos, const wxSize& sz, long style, + const wxString& name) +{ + parent = GetParentForModalDialog(parent, style); + + if (!wxDialog::Create(parent, id, title, pos, sz, style|wxCLIP_CHILDREN, name)) + return false; + + wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL ); + SetSizer(topSizer); + + // This gives more space around the edges + m_innerSizer = new wxBoxSizer( wxVERTICAL ); + +#if defined(__SMARTPHONE__) || defined(__POCKETPC__) + m_sheetOuterBorder = 0; +#endif + topSizer->Add(m_innerSizer, 1, wxGROW|wxALL, m_sheetOuterBorder); + + m_bookCtrl = CreateBookCtrl(); + AddBookCtrl(m_innerSizer); + + return true; +} + +void wxPropertySheetDialog::Init() +{ + m_sheetStyle = wxPROPSHEET_DEFAULT; + m_innerSizer = NULL; + m_bookCtrl = NULL; + m_sheetOuterBorder = 2; + m_sheetInnerBorder = 5; +} + +// Layout the dialog, to be called after pages have been created +void wxPropertySheetDialog::LayoutDialog(int centreFlags) +{ +#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__) + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); + if (centreFlags) + Centre(centreFlags); +#else + wxUnusedVar(centreFlags); +#endif +#if defined(__SMARTPHONE__) + if (m_bookCtrl) + m_bookCtrl->SetFocus(); +#endif +} + +// Creates the buttons, if any +void wxPropertySheetDialog::CreateButtons(int flags) +{ +#ifdef __POCKETPC__ + // keep system option status + const wxChar *optionName = wxT("wince.dialog.real-ok-cancel"); + const int status = wxSystemOptions::GetOptionInt(optionName); + wxSystemOptions::SetOption(optionName,0); +#endif + + wxSizer *buttonSizer = CreateButtonSizer(flags); + if( buttonSizer ) + { + m_innerSizer->Add( buttonSizer, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxRIGHT, 2); + m_innerSizer->AddSpacer(2); + } + +#ifdef __POCKETPC__ + // restore system option + wxSystemOptions::SetOption(optionName,status); +#endif +} + +// Creates the book control +wxBookCtrlBase* wxPropertySheetDialog::CreateBookCtrl() +{ + int style = wxCLIP_CHILDREN | wxBK_DEFAULT; + + wxBookCtrlBase* bookCtrl = NULL; + +#if wxUSE_NOTEBOOK + if (GetSheetStyle() & wxPROPSHEET_NOTEBOOK) + bookCtrl = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style ); +#endif +#if wxUSE_CHOICEBOOK + if (GetSheetStyle() & wxPROPSHEET_CHOICEBOOK) + bookCtrl = new wxChoicebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style ); +#endif +#if wxUSE_TOOLBOOK +#if defined(__WXMAC__) && wxUSE_TOOLBAR && wxUSE_BMPBUTTON + if (GetSheetStyle() & wxPROPSHEET_BUTTONTOOLBOOK) + bookCtrl = new wxToolbook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style|wxTBK_BUTTONBAR ); + else +#endif + if ((GetSheetStyle() & wxPROPSHEET_TOOLBOOK) || (GetSheetStyle() & wxPROPSHEET_BUTTONTOOLBOOK)) + bookCtrl = new wxToolbook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style ); +#endif +#if wxUSE_LISTBOOK + if (GetSheetStyle() & wxPROPSHEET_LISTBOOK) + bookCtrl = new wxListbook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style ); +#endif +#if wxUSE_TREEBOOK + if (GetSheetStyle() & wxPROPSHEET_TREEBOOK) + bookCtrl = new wxTreebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style ); +#endif + if (!bookCtrl) + bookCtrl = new wxBookCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style ); + + if (GetSheetStyle() & wxPROPSHEET_SHRINKTOFIT) + bookCtrl->SetFitToCurrentPage(true); + + return bookCtrl; +} + +// Adds the book control to the inner sizer. +void wxPropertySheetDialog::AddBookCtrl(wxSizer* sizer) +{ +#if defined(__POCKETPC__) && wxUSE_NOTEBOOK + // The book control has to be sized larger than the dialog because of a border bug + // in WinCE + int borderSize = -2; + sizer->Add( m_bookCtrl, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxRIGHT, borderSize ); +#else + sizer->Add( m_bookCtrl, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, m_sheetInnerBorder ); +#endif +} + +void wxPropertySheetDialog::OnActivate(wxActivateEvent& event) +{ +#if defined(__SMARTPHONE__) + // Attempt to focus the choice control: not yet working, but might + // be a step in the right direction. OnActivate overrides the default + // handler in toplevel.cpp that sets the focus for the first child of + // of the dialog (the choicebook). + if (event.GetActive()) + { + wxChoicebook* choiceBook = wxDynamicCast(GetBookCtrl(), wxChoicebook); + if (choiceBook) + choiceBook->SetFocus(); + } + else +#endif + event.Skip(); +} + +// Resize dialog if necessary +void wxPropertySheetDialog::OnIdle(wxIdleEvent& event) +{ + event.Skip(); + + if ((GetSheetStyle() & wxPROPSHEET_SHRINKTOFIT) && GetBookCtrl()) + { + int sel = GetBookCtrl()->GetSelection(); + if (sel != -1 && sel != m_selectedPage) + { + GetBookCtrl()->InvalidateBestSize(); + InvalidateBestSize(); + SetSizeHints(-1, -1, -1, -1); + + m_selectedPage = sel; + LayoutDialog(0); + } + } +} + +// Override function in base +wxWindow* wxPropertySheetDialog::GetContentWindow() const +{ + return GetBookCtrl(); +} + +#endif // wxUSE_BOOKCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/regiong.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/regiong.cpp new file mode 100644 index 0000000000..e9d08aeb5d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/regiong.cpp @@ -0,0 +1,1933 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/regiong.cpp +// Purpose: generic wxRegion class +// Author: David Elliott +// Modified by: +// Created: 2004/04/12 +// Copyright: (c) 2004 David Elliott +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/region.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" +#endif + +// ======================================================================== +// Classes to interface with X.org code +// ======================================================================== + +typedef struct Box +{ + wxCoord x1, x2, y1, y2; +} Box, BOX, BoxRec, *BoxPtr; + +typedef struct REGION *Region; + +struct REGION +{ +public: + // Default constructor initializes nothing + REGION() {} + + REGION(const wxRect& rect) + { + rects = &extents; + numRects = 1; + extents.x1 = rect.x; + extents.y1 = rect.y; + extents.x2 = rect.x + rect.width; + extents.y2 = rect.y + rect.height; + size = 1; + } + + BoxPtr GetBox(int i) + { + return i < numRects ? rects + i : NULL; + } + + // X.org methods + static bool XClipBox( + Region r, + wxRect *rect); + static bool XOffsetRegion( + register Region pRegion, + register int x, + register int y); + static bool XIntersectRegion( + Region reg1, + Region reg2, /* source regions */ + register Region newReg); /* destination Region */ + static bool XUnionRegion( + Region reg1, + Region reg2, /* source regions */ + Region newReg); /* destination Region */ + static bool XSubtractRegion( + Region regM, + Region regS, + register Region regD); + static bool XXorRegion(Region sra, Region srb, Region dr); + static bool XEmptyRegion( + Region r); + static bool XEqualRegion(Region r1, Region r2); + static bool XPointInRegion( + Region pRegion, + int x, int y); + static wxRegionContain XRectInRegion( + register Region region, + int rx, int ry, + unsigned int rwidth, unsigned int rheight); + +protected: + static Region XCreateRegion(void); + static void miSetExtents ( + Region pReg); + static bool XDestroyRegion(Region r); + static int miIntersectO ( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + wxCoord y1, + wxCoord y2); + static void miRegionCopy( + register Region dstrgn, + register Region rgn); + static int miCoalesce( + register Region pReg, /* Region to coalesce */ + int prevStart, /* Index of start of previous band */ + int curStart); /* Index of start of current band */ + static void miRegionOp( + register Region newReg, /* Place to store result */ + Region reg1, /* First region in operation */ + Region reg2, /* 2d region in operation */ + int (*overlapFunc)( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + wxCoord y1, + wxCoord y2), /* Function to call for over- + * lapping bands */ + int (*nonOverlap1Func)( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register wxCoord y1, + register wxCoord y2), /* Function to call for non- + * overlapping bands in region + * 1 */ + int (*nonOverlap2Func)( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register wxCoord y1, + register wxCoord y2)); /* Function to call for non- + * overlapping bands in region + * 2 */ + static int miUnionNonO ( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register wxCoord y1, + register wxCoord y2); + static int miUnionO ( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + register wxCoord y1, + register wxCoord y2); + static int miSubtractNonO1 ( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register wxCoord y1, + register wxCoord y2); + static int miSubtractO ( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + register wxCoord y1, + register wxCoord y2); +protected: + long size; + long numRects; + Box *rects; + Box extents; +}; + +// ======================================================================== +// wxRegionRefData +// ======================================================================== + +class wxRegionRefData : public wxGDIRefData, + public REGION +{ +public: + wxRegionRefData() + : wxGDIRefData(), + REGION() + { + size = 1; + numRects = 0; + rects = ( BOX * )malloc( (unsigned) sizeof( BOX )); + extents.x1 = 0; + extents.x2 = 0; + extents.y1 = 0; + extents.y2 = 0; + } + + wxRegionRefData(const wxPoint& topLeft, const wxPoint& bottomRight) + : wxGDIRefData(), + REGION() + { + rects = (BOX*)malloc(sizeof(BOX)); + size = 1; + numRects = 1; + extents.x1 = topLeft.x; + extents.y1 = topLeft.y; + extents.x2 = bottomRight.x; + extents.y2 = bottomRight.y; + *rects = extents; + } + + wxRegionRefData(const wxRect& rect) + : wxGDIRefData(), + REGION(rect) + { + rects = (BOX*)malloc(sizeof(BOX)); + *rects = extents; + } + + wxRegionRefData(const wxRegionRefData& refData) + : wxGDIRefData(), + REGION() + { + size = refData.size; + numRects = refData.numRects; + rects = (Box*)malloc(numRects*sizeof(Box)); + memcpy(rects, refData.rects, numRects*sizeof(Box)); + extents = refData.extents; + } + + virtual ~wxRegionRefData() + { + free(rects); + } + +private: + // Don't allow this + wxRegionRefData(const REGION&); +}; + +// ======================================================================== +// wxRegionGeneric +// ======================================================================== +//IMPLEMENT_DYNAMIC_CLASS(wxRegionGeneric, wxGDIObject) + +#define M_REGIONDATA ((wxRegionRefData *)m_refData) +#define M_REGIONDATA_OF(rgn) ((wxRegionRefData *)(rgn.m_refData)) + +// ---------------------------------------------------------------------------- +// wxRegionGeneric construction +// ---------------------------------------------------------------------------- + +wxRegionGeneric::wxRegionGeneric() +{ +} + +wxRegionGeneric::~wxRegionGeneric() +{ +} + +wxRegionGeneric::wxRegionGeneric(wxCoord x, wxCoord y, wxCoord w, wxCoord h) +{ + m_refData = new wxRegionRefData(wxRect(x,y,w,h)); +} + +wxRegionGeneric::wxRegionGeneric(const wxRect& rect) +{ + m_refData = new wxRegionRefData(rect); +} + +wxRegionGeneric::wxRegionGeneric(const wxPoint& topLeft, const wxPoint& bottomRight) +{ + m_refData = new wxRegionRefData(topLeft, bottomRight); +} + +wxRegionGeneric::wxRegionGeneric(const wxBitmap& bmp) +{ + wxFAIL_MSG("NOT IMPLEMENTED: wxRegionGeneric::wxRegionGeneric(const wxBitmap& bmp)"); +} + +wxRegionGeneric::wxRegionGeneric(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle) +{ + wxFAIL_MSG("NOT IMPLEMENTED: wxRegionGeneric::wxRegionGeneric(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle)"); +} + +wxRegionGeneric::wxRegionGeneric(const wxBitmap& bmp, const wxColour& transp, int tolerance) +{ + wxFAIL_MSG("NOT IMPLEMENTED: wxRegionGeneric::wxRegionGeneric(const wxBitmap& bmp, const wxColour& transp, int tolerance)"); +} + +void wxRegionGeneric::Clear() +{ + UnRef(); + if (!m_refData) + m_refData = new wxRegionRefData(wxRect(0,0,0,0)); +} + +wxGDIRefData *wxRegionGeneric::CreateGDIRefData() const +{ + return new wxRegionRefData; +} + +wxGDIRefData *wxRegionGeneric::CloneGDIRefData(const wxGDIRefData *data) const +{ + return new wxRegionRefData(*(wxRegionRefData *)data); +} + +bool wxRegionGeneric::DoIsEqual(const wxRegion& region) const +{ + return REGION::XEqualRegion(M_REGIONDATA,M_REGIONDATA_OF(region)); +} + +bool wxRegionGeneric::DoGetBox(wxCoord& x, wxCoord& y, wxCoord&w, wxCoord &h) const +{ + if ( !m_refData ) + return false; + + wxRect rect; + REGION::XClipBox(M_REGIONDATA,&rect); + x = rect.x; + y = rect.y; + w = rect.width; + h = rect.height; + return true; +} + +// ---------------------------------------------------------------------------- +// wxRegionGeneric operations +// ---------------------------------------------------------------------------- + +bool wxRegionGeneric::DoUnionWithRect(const wxRect& rect) +{ + if ( rect.IsEmpty() ) + { + // nothing to do + return true; + } + + AllocExclusive(); + REGION region(rect); + return REGION::XUnionRegion(®ion,M_REGIONDATA,M_REGIONDATA); +} + +bool wxRegionGeneric::DoUnionWithRegion(const wxRegion& region) +{ + AllocExclusive(); + return REGION::XUnionRegion(M_REGIONDATA_OF(region),M_REGIONDATA,M_REGIONDATA); +} + +bool wxRegionGeneric::DoIntersect(const wxRegion& region) +{ + AllocExclusive(); + return REGION::XIntersectRegion(M_REGIONDATA_OF(region),M_REGIONDATA,M_REGIONDATA); +} + +bool wxRegionGeneric::DoSubtract(const wxRegion& region) +{ + if ( region.IsEmpty() ) + { + // nothing to do + return true; + } + + return REGION::XSubtractRegion(M_REGIONDATA_OF(region),M_REGIONDATA,M_REGIONDATA); +} + +bool wxRegionGeneric::DoXor(const wxRegion& region) +{ + AllocExclusive(); + return REGION::XXorRegion(M_REGIONDATA_OF(region),M_REGIONDATA,M_REGIONDATA); +} + +bool wxRegionGeneric::DoOffset(wxCoord x, wxCoord y) +{ + AllocExclusive(); + return REGION::XOffsetRegion(M_REGIONDATA, x, y); +} + +// ---------------------------------------------------------------------------- +// wxRegionGeneric comparison +// ---------------------------------------------------------------------------- + +bool wxRegionGeneric::IsEmpty() const +{ + wxASSERT(m_refData); + return REGION::XEmptyRegion(M_REGIONDATA); +} + +// Does the region contain the point (x,y)? +wxRegionContain wxRegionGeneric::DoContainsPoint(wxCoord x, wxCoord y) const +{ + wxASSERT(m_refData); + return REGION::XPointInRegion(M_REGIONDATA,x,y) ? wxInRegion : wxOutRegion; +} + +// Does the region contain the rectangle rect? +wxRegionContain wxRegionGeneric::DoContainsRect(const wxRect& rect) const +{ + wxASSERT(m_refData); + return REGION::XRectInRegion(M_REGIONDATA,rect.x,rect.y,rect.width,rect.height); +} + +// ======================================================================== +// wxRegionIteratorGeneric +// ======================================================================== +//IMPLEMENT_DYNAMIC_CLASS(wxRegionIteratorGeneric,wxObject) + +wxRegionIteratorGeneric::wxRegionIteratorGeneric() +{ + m_current = 0; +} + +wxRegionIteratorGeneric::wxRegionIteratorGeneric(const wxRegionGeneric& region) +: m_region(region) +{ + m_current = 0; +} + +wxRegionIteratorGeneric::wxRegionIteratorGeneric(const wxRegionIteratorGeneric& iterator) +: m_region(iterator.m_region) +{ + m_current = iterator.m_current; +} + +void wxRegionIteratorGeneric::Reset(const wxRegionGeneric& region) +{ + m_region = region; + m_current = 0; +} + +bool wxRegionIteratorGeneric::HaveRects() const +{ + return M_REGIONDATA_OF(m_region)->GetBox(m_current); +} + +wxRegionIteratorGeneric& wxRegionIteratorGeneric::operator++() +{ + ++m_current; + return *this; +} + +wxRegionIteratorGeneric wxRegionIteratorGeneric::operator++(int) +{ + wxRegionIteratorGeneric copy(*this); + ++*this; + return copy; +} + +wxRect wxRegionIteratorGeneric::GetRect() const +{ + wxASSERT(m_region.m_refData); + const Box *box = M_REGIONDATA_OF(m_region)->GetBox(m_current); + wxASSERT(box); + return wxRect + ( box->x1 + , box->y1 + , box->x2 - box->x1 + , box->y2 - box->y1 + ); +} + +long wxRegionIteratorGeneric::GetX() const +{ + wxASSERT(m_region.m_refData); + const Box *box = M_REGIONDATA_OF(m_region)->GetBox(m_current); + wxASSERT(box); + return box->x1; +} + +long wxRegionIteratorGeneric::GetY() const +{ + wxASSERT(m_region.m_refData); + const Box *box = M_REGIONDATA_OF(m_region)->GetBox(m_current); + wxASSERT(box); + return box->y1; +} + +long wxRegionIteratorGeneric::GetW() const +{ + wxASSERT(m_region.m_refData); + const Box *box = M_REGIONDATA_OF(m_region)->GetBox(m_current); + wxASSERT(box); + return box->x2 - box->x1; +} + +long wxRegionIteratorGeneric::GetH() const +{ + wxASSERT(m_region.m_refData); + const Box *box = M_REGIONDATA_OF(m_region)->GetBox(m_current); + wxASSERT(box); + return box->y2 - box->y1; +} + +wxRegionIteratorGeneric::~wxRegionIteratorGeneric() +{ +} + + +// ======================================================================== +// The guts (from X.org) +// ======================================================================== + +/************************************************************************ + +Copyright 1987, 1988, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + + +Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +************************************************************************/ + +/* 1 if two BOXs overlap. + * 0 if two BOXs do not overlap. + * Remember, x2 and y2 are not in the region + */ +#define EXTENTCHECK(r1, r2) \ + ((r1)->x2 > (r2)->x1 && \ + (r1)->x1 < (r2)->x2 && \ + (r1)->y2 > (r2)->y1 && \ + (r1)->y1 < (r2)->y2) + +/* + * Check to see if there is enough memory in the present region. + */ +#define MEMCHECK(reg, rect, firstrect){\ + if ((reg)->numRects >= ((reg)->size - 1)){\ + (firstrect) = (BOX *) realloc \ + ((char *)(firstrect), (unsigned) (2 * (sizeof(BOX)) * ((reg)->size)));\ + if ((firstrect) == 0)\ + return(0);\ + (reg)->size *= 2;\ + (rect) = &(firstrect)[(reg)->numRects];\ + }\ + } + +#define EMPTY_REGION(pReg) pReg->numRects = 0 + +#define REGION_NOT_EMPTY(pReg) pReg->numRects + +#define INBOX(r, x, y) \ + ( ( ((r).x2 > x)) && \ + ( ((r).x1 <= x)) && \ + ( ((r).y2 > y)) && \ + ( ((r).y1 <= y)) ) + +/* + * The functions in this file implement the Region abstraction, similar to one + * used in the X11 sample server. A Region is simply an area, as the name + * implies, and is implemented as a "y-x-banded" array of rectangles. To + * explain: Each Region is made up of a certain number of rectangles sorted + * by y coordinate first, and then by x coordinate. + * + * Furthermore, the rectangles are banded such that every rectangle with a + * given upper-left y coordinate (y1) will have the same lower-right y + * coordinate (y2) and vice versa. If a rectangle has scanlines in a band, it + * will span the entire vertical distance of the band. This means that some + * areas that could be merged into a taller rectangle will be represented as + * several shorter rectangles to account for shorter rectangles to its left + * or right but within its "vertical scope". + * + * An added constraint on the rectangles is that they must cover as much + * horizontal area as possible. E.g. no two rectangles in a band are allowed + * to touch. + * + * Whenever possible, bands will be merged together to cover a greater vertical + * distance (and thus reduce the number of rectangles). Two bands can be merged + * only if the bottom of one touches the top of the other and they have + * rectangles in the same places (of the same width, of course). This maintains + * the y-x-banding that's so nice to have... + */ + +/* Create a new empty region */ +Region REGION::XCreateRegion(void) +{ + Region temp = new REGION; + + if (!temp) + return (Region) NULL; + + temp->rects = ( BOX * )malloc( (unsigned) sizeof( BOX )); + + if (!temp->rects) + { + delete temp; + return (Region) NULL; + } + temp->numRects = 0; + temp->extents.x1 = 0; + temp->extents.y1 = 0; + temp->extents.x2 = 0; + temp->extents.y2 = 0; + temp->size = 1; + return( temp ); +} + +bool REGION::XClipBox(Region r, wxRect *rect) +{ + rect->x = r->extents.x1; + rect->y = r->extents.y1; + rect->width = r->extents.x2 - r->extents.x1; + rect->height = r->extents.y2 - r->extents.y1; + return true; +} + +/*- + *----------------------------------------------------------------------- + * miSetExtents -- + * Reset the extents of a region to what they should be. Called by + * miSubtract and miIntersect b/c they can't figure it out along the + * way or do so easily, as miUnion can. + * + * Results: + * None. + * + * Side Effects: + * The region's 'extents' structure is overwritten. + * + *----------------------------------------------------------------------- + */ +void REGION:: +miSetExtents (Region pReg) +{ + BoxPtr pBox, pBoxEnd, pExtents; + + if (pReg->numRects == 0) + { + pReg->extents.x1 = 0; + pReg->extents.y1 = 0; + pReg->extents.x2 = 0; + pReg->extents.y2 = 0; + return; + } + + pExtents = &pReg->extents; + pBox = pReg->rects; + pBoxEnd = &pBox[pReg->numRects - 1]; + + /* + * Since pBox is the first rectangle in the region, it must have the + * smallest y1 and since pBoxEnd is the last rectangle in the region, + * it must have the largest y2, because of banding. Initialize x1 and + * x2 from pBox and pBoxEnd, resp., as good things to initialize them + * to... + */ + pExtents->x1 = pBox->x1; + pExtents->y1 = pBox->y1; + pExtents->x2 = pBoxEnd->x2; + pExtents->y2 = pBoxEnd->y2; + + wxASSERT_LEVEL_2(pExtents->y1 < pExtents->y2); + while (pBox <= pBoxEnd) + { + if (pBox->x1 < pExtents->x1) + { + pExtents->x1 = pBox->x1; + } + if (pBox->x2 > pExtents->x2) + { + pExtents->x2 = pBox->x2; + } + pBox++; + } + wxASSERT_LEVEL_2(pExtents->x1 < pExtents->x2); +} + +bool REGION:: +XDestroyRegion( + Region r) +{ + free( (char *) r->rects ); + delete r; + return true; +} + +/* TranslateRegion(pRegion, x, y) + translates in place + added by raymond +*/ + +bool REGION:: +XOffsetRegion( + register Region pRegion, + register int x, + register int y) +{ + int nbox; + BOX *pbox; + + pbox = pRegion->rects; + nbox = pRegion->numRects; + + while(nbox--) + { + pbox->x1 += x; + pbox->x2 += x; + pbox->y1 += y; + pbox->y2 += y; + pbox++; + } + pRegion->extents.x1 += x; + pRegion->extents.x2 += x; + pRegion->extents.y1 += y; + pRegion->extents.y2 += y; + return 1; +} + +/*====================================================================== + * Region Intersection + *====================================================================*/ +/*- + *----------------------------------------------------------------------- + * miIntersectO -- + * Handle an overlapping band for miIntersect. + * + * Results: + * None. + * + * Side Effects: + * Rectangles may be added to the region. + * + *----------------------------------------------------------------------- + */ +/* static void*/ +int REGION:: +miIntersectO ( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + wxCoord y1, + wxCoord y2) +{ + wxCoord x1; + wxCoord x2; + BoxPtr pNextRect; + + pNextRect = &pReg->rects[pReg->numRects]; + + while ((r1 != r1End) && (r2 != r2End)) + { + x1 = wxMax(r1->x1,r2->x1); + x2 = wxMin(r1->x2,r2->x2); + + /* + * If there's any overlap between the two rectangles, add that + * overlap to the new region. + * There's no need to check for subsumption because the only way + * such a need could arise is if some region has two rectangles + * right next to each other. Since that should never happen... + */ + if (x1 < x2) + { + wxASSERT_LEVEL_2(y1rects); + pNextRect->x1 = x1; + pNextRect->y1 = y1; + pNextRect->x2 = x2; + pNextRect->y2 = y2; + pReg->numRects += 1; + pNextRect++; + wxASSERT_LEVEL_2(pReg->numRects <= pReg->size); + } + + /* + * Need to advance the pointers. Shift the one that extends + * to the right the least, since the other still has a chance to + * overlap with that region's next rectangle, if you see what I mean. + */ + if (r1->x2 < r2->x2) + { + r1++; + } + else if (r2->x2 < r1->x2) + { + r2++; + } + else + { + r1++; + r2++; + } + } + return 0; /* lint */ +} + +bool REGION:: +XIntersectRegion( + Region reg1, + Region reg2, /* source regions */ + register Region newReg) /* destination Region */ +{ + /* check for trivial reject */ + if ( (!(reg1->numRects)) || (!(reg2->numRects)) || + (!EXTENTCHECK(®1->extents, ®2->extents))) + newReg->numRects = 0; + else + miRegionOp (newReg, reg1, reg2, + miIntersectO, NULL, NULL); + + /* + * Can't alter newReg's extents before we call miRegionOp because + * it might be one of the source regions and miRegionOp depends + * on the extents of those regions being the same. Besides, this + * way there's no checking against rectangles that will be nuked + * due to coalescing, so we have to examine fewer rectangles. + */ + miSetExtents(newReg); + return 1; +} + +void REGION:: +miRegionCopy( + register Region dstrgn, + register Region rgn) + +{ + if (dstrgn != rgn) /* don't want to copy to itself */ + { + if (dstrgn->size < rgn->numRects) + { + if (dstrgn->rects) + { + BOX *prevRects = dstrgn->rects; + + dstrgn->rects = (BOX *) + realloc((char *) dstrgn->rects, + (unsigned) rgn->numRects * (sizeof(BOX))); + if (!dstrgn->rects) + { + free(prevRects); + return; + } + } + dstrgn->size = rgn->numRects; + } + dstrgn->numRects = rgn->numRects; + dstrgn->extents.x1 = rgn->extents.x1; + dstrgn->extents.y1 = rgn->extents.y1; + dstrgn->extents.x2 = rgn->extents.x2; + dstrgn->extents.y2 = rgn->extents.y2; + + memcpy((char *) dstrgn->rects, (char *) rgn->rects, + (int) (rgn->numRects * sizeof(BOX))); + } +} + +/*====================================================================== + * Generic Region Operator + *====================================================================*/ + +/*- + *----------------------------------------------------------------------- + * miCoalesce -- + * Attempt to merge the boxes in the current band with those in the + * previous one. Used only by miRegionOp. + * + * Results: + * The new index for the previous band. + * + * Side Effects: + * If coalescing takes place: + * - rectangles in the previous band will have their y2 fields + * altered. + * - pReg->numRects will be decreased. + * + *----------------------------------------------------------------------- + */ +/* static int*/ +int REGION:: +miCoalesce( + register Region pReg, /* Region to coalesce */ + int prevStart, /* Index of start of previous band */ + int curStart) /* Index of start of current band */ +{ + BoxPtr pPrevBox; /* Current box in previous band */ + BoxPtr pCurBox; /* Current box in current band */ + BoxPtr pRegEnd; /* End of region */ + int curNumRects; /* Number of rectangles in current + * band */ + int prevNumRects; /* Number of rectangles in previous + * band */ + int bandY1; /* Y1 coordinate for current band */ + + pRegEnd = &pReg->rects[pReg->numRects]; + + pPrevBox = &pReg->rects[prevStart]; + prevNumRects = curStart - prevStart; + + /* + * Figure out how many rectangles are in the current band. Have to do + * this because multiple bands could have been added in miRegionOp + * at the end when one region has been exhausted. + */ + pCurBox = &pReg->rects[curStart]; + bandY1 = pCurBox->y1; + for (curNumRects = 0; + (pCurBox != pRegEnd) && (pCurBox->y1 == bandY1); + curNumRects++) + { + pCurBox++; + } + + if (pCurBox != pRegEnd) + { + /* + * If more than one band was added, we have to find the start + * of the last band added so the next coalescing job can start + * at the right place... (given when multiple bands are added, + * this may be pointless -- see above). + */ + pRegEnd--; + while (pRegEnd[-1].y1 == pRegEnd->y1) + { + pRegEnd--; + } + curStart = pRegEnd - pReg->rects; + pRegEnd = pReg->rects + pReg->numRects; + } + + if ((curNumRects == prevNumRects) && (curNumRects != 0)) + { + pCurBox -= curNumRects; + /* + * The bands may only be coalesced if the bottom of the previous + * matches the top scanline of the current. + */ + if (pPrevBox->y2 == pCurBox->y1) + { + /* + * Make sure the bands have boxes in the same places. This + * assumes that boxes have been added in such a way that they + * cover the most area possible. I.e. two boxes in a band must + * have some horizontal space between them. + */ + do + { + if ((pPrevBox->x1 != pCurBox->x1) || + (pPrevBox->x2 != pCurBox->x2)) + { + /* + * The bands don't line up so they can't be coalesced. + */ + return (curStart); + } + pPrevBox++; + pCurBox++; + prevNumRects -= 1; + } while (prevNumRects != 0); + + pReg->numRects -= curNumRects; + pCurBox -= curNumRects; + pPrevBox -= curNumRects; + + /* + * The bands may be merged, so set the bottom y of each box + * in the previous band to that of the corresponding box in + * the current band. + */ + do + { + pPrevBox->y2 = pCurBox->y2; + pPrevBox++; + pCurBox++; + curNumRects -= 1; + } while (curNumRects != 0); + + /* + * If only one band was added to the region, we have to backup + * curStart to the start of the previous band. + * + * If more than one band was added to the region, copy the + * other bands down. The assumption here is that the other bands + * came from the same region as the current one and no further + * coalescing can be done on them since it's all been done + * already... curStart is already in the right place. + */ + if (pCurBox == pRegEnd) + { + curStart = prevStart; + } + else + { + do + { + *pPrevBox++ = *pCurBox++; + } while (pCurBox != pRegEnd); + } + + } + } + return (curStart); +} + +/*- + *----------------------------------------------------------------------- + * miRegionOp -- + * Apply an operation to two regions. Called by miUnion, miInverse, + * miSubtract, miIntersect... + * + * Results: + * None. + * + * Side Effects: + * The new region is overwritten. + * + * Notes: + * The idea behind this function is to view the two regions as sets. + * Together they cover a rectangle of area that this function divides + * into horizontal bands where points are covered only by one region + * or by both. For the first case, the nonOverlapFunc is called with + * each the band and the band's upper and lower extents. For the + * second, the overlapFunc is called to process the entire band. It + * is responsible for clipping the rectangles in the band, though + * this function provides the boundaries. + * At the end of each band, the new region is coalesced, if possible, + * to reduce the number of rectangles in the region. + * + *----------------------------------------------------------------------- + */ +/* static void*/ +void REGION:: +miRegionOp( + register Region newReg, /* Place to store result */ + Region reg1, /* First region in operation */ + Region reg2, /* 2d region in operation */ + int (*overlapFunc)( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + wxCoord y1, + wxCoord y2), /* Function to call for over- + * lapping bands */ + int (*nonOverlap1Func)( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register wxCoord y1, + register wxCoord y2), /* Function to call for non- + * overlapping bands in region + * 1 */ + int (*nonOverlap2Func)( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register wxCoord y1, + register wxCoord y2)) /* Function to call for non- + * overlapping bands in region + * 2 */ +{ + BoxPtr r1; /* Pointer into first region */ + BoxPtr r2; /* Pointer into 2d region */ + BoxPtr r1End; /* End of 1st region */ + BoxPtr r2End; /* End of 2d region */ + wxCoord ybot; /* Bottom of intersection */ + wxCoord ytop; /* Top of intersection */ + BoxPtr oldRects; /* Old rects for newReg */ + int prevBand; /* Index of start of + * previous band in newReg */ + int curBand; /* Index of start of current + * band in newReg */ + BoxPtr r1BandEnd; /* End of current band in r1 */ + BoxPtr r2BandEnd; /* End of current band in r2 */ + wxCoord top; /* Top of non-overlapping + * band */ + wxCoord bot; /* Bottom of non-overlapping + * band */ + + /* + * Initialization: + * set r1, r2, r1End and r2End appropriately, preserve the important + * parts of the destination region until the end in case it's one of + * the two source regions, then mark the "new" region empty, allocating + * another array of rectangles for it to use. + */ + r1 = reg1->rects; + r2 = reg2->rects; + r1End = r1 + reg1->numRects; + r2End = r2 + reg2->numRects; + + oldRects = newReg->rects; + + EMPTY_REGION(newReg); + + /* + * Allocate a reasonable number of rectangles for the new region. The idea + * is to allocate enough so the individual functions don't need to + * reallocate and copy the array, which is time consuming, yet we don't + * have to worry about using too much memory. I hope to be able to + * nuke the realloc() at the end of this function eventually. + */ + newReg->size = wxMax(reg1->numRects,reg2->numRects) * 2; + + newReg->rects = (BoxPtr)malloc((unsigned) (sizeof(BoxRec) * newReg->size)); + + if (!newReg->rects) + { + newReg->size = 0; + return; + } + + /* + * Initialize ybot and ytop. + * In the upcoming loop, ybot and ytop serve different functions depending + * on whether the band being handled is an overlapping or non-overlapping + * band. + * In the case of a non-overlapping band (only one of the regions + * has points in the band), ybot is the bottom of the most recent + * intersection and thus clips the top of the rectangles in that band. + * ytop is the top of the next intersection between the two regions and + * serves to clip the bottom of the rectangles in the current band. + * For an overlapping band (where the two regions intersect), ytop clips + * the top of the rectangles of both regions and ybot clips the bottoms. + */ + if (reg1->extents.y1 < reg2->extents.y1) + ybot = reg1->extents.y1; + else + ybot = reg2->extents.y1; + + /* + * prevBand serves to mark the start of the previous band so rectangles + * can be coalesced into larger rectangles. qv. miCoalesce, above. + * In the beginning, there is no previous band, so prevBand == curBand + * (curBand is set later on, of course, but the first band will always + * start at index 0). prevBand and curBand must be indices because of + * the possible expansion, and resultant moving, of the new region's + * array of rectangles. + */ + prevBand = 0; + + do + { + curBand = newReg->numRects; + + /* + * This algorithm proceeds one source-band (as opposed to a + * destination band, which is determined by where the two regions + * intersect) at a time. r1BandEnd and r2BandEnd serve to mark the + * rectangle after the last one in the current band for their + * respective regions. + */ + r1BandEnd = r1; + while ((r1BandEnd != r1End) && (r1BandEnd->y1 == r1->y1)) + { + r1BandEnd++; + } + + r2BandEnd = r2; + while ((r2BandEnd != r2End) && (r2BandEnd->y1 == r2->y1)) + { + r2BandEnd++; + } + + /* + * First handle the band that doesn't intersect, if any. + * + * Note that attention is restricted to one band in the + * non-intersecting region at once, so if a region has n + * bands between the current position and the next place it overlaps + * the other, this entire loop will be passed through n times. + */ + if (r1->y1 < r2->y1) + { + top = wxMax(r1->y1,ybot); + bot = wxMin(r1->y2,r2->y1); + + if ((top != bot) && (nonOverlap1Func != NULL)) + { + (* nonOverlap1Func) (newReg, r1, r1BandEnd, top, bot); + } + + ytop = r2->y1; + } + else if (r2->y1 < r1->y1) + { + top = wxMax(r2->y1,ybot); + bot = wxMin(r2->y2,r1->y1); + + if ((top != bot) && (nonOverlap2Func != NULL)) + { + (* nonOverlap2Func) (newReg, r2, r2BandEnd, top, bot); + } + + ytop = r1->y1; + } + else + { + ytop = r1->y1; + } + + /* + * If any rectangles got added to the region, try and coalesce them + * with rectangles from the previous band. Note we could just do + * this test in miCoalesce, but some machines incur a not + * inconsiderable cost for function calls, so... + */ + if (newReg->numRects != curBand) + { + prevBand = miCoalesce (newReg, prevBand, curBand); + } + + /* + * Now see if we've hit an intersecting band. The two bands only + * intersect if ybot > ytop + */ + ybot = wxMin(r1->y2, r2->y2); + curBand = newReg->numRects; + if (ybot > ytop) + { + (* overlapFunc) (newReg, r1, r1BandEnd, r2, r2BandEnd, ytop, ybot); + + } + + if (newReg->numRects != curBand) + { + prevBand = miCoalesce (newReg, prevBand, curBand); + } + + /* + * If we've finished with a band (y2 == ybot) we skip forward + * in the region to the next band. + */ + if (r1->y2 == ybot) + { + r1 = r1BandEnd; + } + if (r2->y2 == ybot) + { + r2 = r2BandEnd; + } + } while ((r1 != r1End) && (r2 != r2End)); + + /* + * Deal with whichever region still has rectangles left. + */ + curBand = newReg->numRects; + if (r1 != r1End) + { + if (nonOverlap1Func != NULL) + { + do + { + r1BandEnd = r1; + while ((r1BandEnd < r1End) && (r1BandEnd->y1 == r1->y1)) + { + r1BandEnd++; + } + (* nonOverlap1Func) (newReg, r1, r1BandEnd, + wxMax(r1->y1,ybot), r1->y2); + r1 = r1BandEnd; + } while (r1 != r1End); + } + } + else if ((r2 != r2End) && (nonOverlap2Func != NULL)) + { + do + { + r2BandEnd = r2; + while ((r2BandEnd < r2End) && (r2BandEnd->y1 == r2->y1)) + { + r2BandEnd++; + } + (* nonOverlap2Func) (newReg, r2, r2BandEnd, + wxMax(r2->y1,ybot), r2->y2); + r2 = r2BandEnd; + } while (r2 != r2End); + } + + if (newReg->numRects != curBand) + { + (void) miCoalesce (newReg, prevBand, curBand); + } + + /* + * A bit of cleanup. To keep regions from growing without bound, + * we shrink the array of rectangles to match the new number of + * rectangles in the region. This never goes to 0, however... + * + * Only do this stuff if the number of rectangles allocated is more than + * twice the number of rectangles in the region (a simple optimization...). + */ + if (newReg->numRects < (newReg->size >> 1)) + { + if (REGION_NOT_EMPTY(newReg)) + { + BoxPtr prev_rects = newReg->rects; + newReg->size = newReg->numRects; + newReg->rects = (BoxPtr) realloc ((char *) newReg->rects, + (unsigned) (sizeof(BoxRec) * newReg->size)); + if (! newReg->rects) + newReg->rects = prev_rects; + } + else + { + /* + * No point in doing the extra work involved in an realloc if + * the region is empty + */ + newReg->size = 1; + free((char *) newReg->rects); + newReg->rects = (BoxPtr) malloc(sizeof(BoxRec)); + } + } + free ((char *) oldRects); + return; +} + +/*====================================================================== + * Region Union + *====================================================================*/ + +/*- + *----------------------------------------------------------------------- + * miUnionNonO -- + * Handle a non-overlapping band for the union operation. Just + * Adds the rectangles into the region. Doesn't have to check for + * subsumption or anything. + * + * Results: + * None. + * + * Side Effects: + * pReg->numRects is incremented and the final rectangles overwritten + * with the rectangles we're passed. + * + *----------------------------------------------------------------------- + */ +/* static void*/ +int REGION:: +miUnionNonO ( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register wxCoord y1, + register wxCoord y2) +{ + BoxPtr pNextRect; + + pNextRect = &pReg->rects[pReg->numRects]; + + wxASSERT_LEVEL_2(y1 < y2); + + while (r != rEnd) + { + wxASSERT_LEVEL_2(r->x1 < r->x2); + MEMCHECK(pReg, pNextRect, pReg->rects); + pNextRect->x1 = r->x1; + pNextRect->y1 = y1; + pNextRect->x2 = r->x2; + pNextRect->y2 = y2; + pReg->numRects += 1; + pNextRect++; + + wxASSERT_LEVEL_2(pReg->numRects<=pReg->size); + r++; + } + return 0; /* lint */ +} + + +/*- + *----------------------------------------------------------------------- + * miUnionO -- + * Handle an overlapping band for the union operation. Picks the + * left-most rectangle each time and merges it into the region. + * + * Results: + * None. + * + * Side Effects: + * Rectangles are overwritten in pReg->rects and pReg->numRects will + * be changed. + * + *----------------------------------------------------------------------- + */ + +/* static void*/ +int REGION:: +miUnionO ( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + register wxCoord y1, + register wxCoord y2) +{ + BoxPtr pNextRect; + + pNextRect = &pReg->rects[pReg->numRects]; + +#define MERGERECT(r) \ + if ((pReg->numRects != 0) && \ + (pNextRect[-1].y1 == y1) && \ + (pNextRect[-1].y2 == y2) && \ + (pNextRect[-1].x2 >= r->x1)) \ + { \ + if (pNextRect[-1].x2 < r->x2) \ + { \ + pNextRect[-1].x2 = r->x2; \ + wxASSERT_LEVEL_2(pNextRect[-1].x1rects); \ + pNextRect->y1 = y1; \ + pNextRect->y2 = y2; \ + pNextRect->x1 = r->x1; \ + pNextRect->x2 = r->x2; \ + pReg->numRects += 1; \ + pNextRect += 1; \ + } \ + wxASSERT_LEVEL_2(pReg->numRects<=pReg->size);\ + r++; + + wxASSERT_LEVEL_2 (y1x1 < r2->x1) + { + MERGERECT(r1); + } + else + { + MERGERECT(r2); + } + } + + if (r1 != r1End) + { + do + { + MERGERECT(r1); + } while (r1 != r1End); + } + else while (r2 != r2End) + { + MERGERECT(r2); + } + return 0; /* lint */ +} + +bool REGION:: +XUnionRegion( + Region reg1, + Region reg2, /* source regions */ + Region newReg) /* destination Region */ +{ + /* checks all the simple cases */ + + /* + * Region 1 and 2 are the same or region 1 is empty + */ + if ( (reg1 == reg2) || (!(reg1->numRects)) ) + { + if (newReg != reg2) + miRegionCopy(newReg, reg2); + return 1; + } + + /* + * if nothing to union (region 2 empty) + */ + if (!(reg2->numRects)) + { + if (newReg != reg1) + miRegionCopy(newReg, reg1); + return 1; + } + + /* + * Region 1 completely subsumes region 2 + */ + if ((reg1->numRects == 1) && + (reg1->extents.x1 <= reg2->extents.x1) && + (reg1->extents.y1 <= reg2->extents.y1) && + (reg1->extents.x2 >= reg2->extents.x2) && + (reg1->extents.y2 >= reg2->extents.y2)) + { + if (newReg != reg1) + miRegionCopy(newReg, reg1); + return 1; + } + + /* + * Region 2 completely subsumes region 1 + */ + if ((reg2->numRects == 1) && + (reg2->extents.x1 <= reg1->extents.x1) && + (reg2->extents.y1 <= reg1->extents.y1) && + (reg2->extents.x2 >= reg1->extents.x2) && + (reg2->extents.y2 >= reg1->extents.y2)) + { + if (newReg != reg2) + miRegionCopy(newReg, reg2); + return 1; + } + + miRegionOp (newReg, reg1, reg2, miUnionO, + miUnionNonO, miUnionNonO); + + newReg->extents.x1 = wxMin(reg1->extents.x1, reg2->extents.x1); + newReg->extents.y1 = wxMin(reg1->extents.y1, reg2->extents.y1); + newReg->extents.x2 = wxMax(reg1->extents.x2, reg2->extents.x2); + newReg->extents.y2 = wxMax(reg1->extents.y2, reg2->extents.y2); + + return 1; +} + +/*====================================================================== + * Region Subtraction + *====================================================================*/ + +/*- + *----------------------------------------------------------------------- + * miSubtractNonO -- + * Deal with non-overlapping band for subtraction. Any parts from + * region 2 we discard. Anything from region 1 we add to the region. + * + * Results: + * None. + * + * Side Effects: + * pReg may be affected. + * + *----------------------------------------------------------------------- + */ +/* static void*/ +int REGION:: +miSubtractNonO1 ( + register Region pReg, + register BoxPtr r, + BoxPtr rEnd, + register wxCoord y1, + register wxCoord y2) +{ + BoxPtr pNextRect; + + pNextRect = &pReg->rects[pReg->numRects]; + + wxASSERT_LEVEL_2(y1x1x2); + MEMCHECK(pReg, pNextRect, pReg->rects); + pNextRect->x1 = r->x1; + pNextRect->y1 = y1; + pNextRect->x2 = r->x2; + pNextRect->y2 = y2; + pReg->numRects += 1; + pNextRect++; + + wxASSERT_LEVEL_2(pReg->numRects <= pReg->size); + + r++; + } + return 0; /* lint */ +} + +/*- + *----------------------------------------------------------------------- + * miSubtractO -- + * Overlapping band subtraction. x1 is the left-most point not yet + * checked. + * + * Results: + * None. + * + * Side Effects: + * pReg may have rectangles added to it. + * + *----------------------------------------------------------------------- + */ +/* static void*/ +int REGION:: +miSubtractO ( + register Region pReg, + register BoxPtr r1, + BoxPtr r1End, + register BoxPtr r2, + BoxPtr r2End, + register wxCoord y1, + register wxCoord y2) +{ + BoxPtr pNextRect; + int x1; + + x1 = r1->x1; + + wxASSERT_LEVEL_2(y1rects[pReg->numRects]; + + while ((r1 != r1End) && (r2 != r2End)) + { + if (r2->x2 <= x1) + { + /* + * Subtrahend missed the boat: go to next subtrahend. + */ + r2++; + } + else if (r2->x1 <= x1) + { + /* + * Subtrahend precedes minuend: nuke left edge of minuend. + */ + x1 = r2->x2; + if (x1 >= r1->x2) + { + /* + * Minuend completely covered: advance to next minuend and + * reset left fence to edge of new minuend. + */ + r1++; + if (r1 != r1End) + x1 = r1->x1; + } + else + { + /* + * Subtrahend now used up since it doesn't extend beyond + * minuend + */ + r2++; + } + } + else if (r2->x1 < r1->x2) + { + /* + * Left part of subtrahend covers part of minuend: add uncovered + * part of minuend to region and skip to next subtrahend. + */ + wxASSERT_LEVEL_2(x1x1); + MEMCHECK(pReg, pNextRect, pReg->rects); + pNextRect->x1 = x1; + pNextRect->y1 = y1; + pNextRect->x2 = r2->x1; + pNextRect->y2 = y2; + pReg->numRects += 1; + pNextRect++; + + wxASSERT_LEVEL_2(pReg->numRects<=pReg->size); + + x1 = r2->x2; + if (x1 >= r1->x2) + { + /* + * Minuend used up: advance to new... + */ + r1++; + if (r1 != r1End) + x1 = r1->x1; + } + else + { + /* + * Subtrahend used up + */ + r2++; + } + } + else + { + /* + * Minuend used up: add any remaining piece before advancing. + */ + if (r1->x2 > x1) + { + MEMCHECK(pReg, pNextRect, pReg->rects); + pNextRect->x1 = x1; + pNextRect->y1 = y1; + pNextRect->x2 = r1->x2; + pNextRect->y2 = y2; + pReg->numRects += 1; + pNextRect++; + wxASSERT_LEVEL_2(pReg->numRects<=pReg->size); + } + r1++; + if (r1 != r1End) + x1 = r1->x1; + } + } + + /* + * Add remaining minuend rectangles to region. + */ + while (r1 != r1End) + { + wxASSERT_LEVEL_2(x1x2); + MEMCHECK(pReg, pNextRect, pReg->rects); + pNextRect->x1 = x1; + pNextRect->y1 = y1; + pNextRect->x2 = r1->x2; + pNextRect->y2 = y2; + pReg->numRects += 1; + pNextRect++; + + wxASSERT_LEVEL_2(pReg->numRects<=pReg->size); + + r1++; + if (r1 != r1End) + { + x1 = r1->x1; + } + } + return 0; /* lint */ +} + +/*- + *----------------------------------------------------------------------- + * miSubtract -- + * Subtract regS from regM and leave the result in regD. + * S stands for subtrahend, M for minuend and D for difference. + * + * Results: + * true. + * + * Side Effects: + * regD is overwritten. + * + *----------------------------------------------------------------------- + */ + +bool REGION::XSubtractRegion(Region regM, Region regS, register Region regD) +{ + /* check for trivial reject */ + if ( (!(regM->numRects)) || (!(regS->numRects)) || + (!EXTENTCHECK(®M->extents, ®S->extents)) ) + { + miRegionCopy(regD, regM); + return true; + } + + miRegionOp (regD, regM, regS, miSubtractO, + miSubtractNonO1, NULL); + + /* + * Can't alter newReg's extents before we call miRegionOp because + * it might be one of the source regions and miRegionOp depends + * on the extents of those regions being the unaltered. Besides, this + * way there's no checking against rectangles that will be nuked + * due to coalescing, so we have to examine fewer rectangles. + */ + miSetExtents (regD); + return true; +} + +bool REGION::XXorRegion(Region sra, Region srb, Region dr) +{ + Region tra = XCreateRegion(); + + wxCHECK_MSG( tra, false, wxT("region not created") ); + + Region trb = XCreateRegion(); + + wxCHECK_MSG( trb, false, wxT("region not created") ); + + (void) XSubtractRegion(sra,srb,tra); + (void) XSubtractRegion(srb,sra,trb); + (void) XUnionRegion(tra,trb,dr); + XDestroyRegion(tra); + XDestroyRegion(trb); + return 0; +} + +/* + * Check to see if the region is empty. Assumes a region is passed + * as a parameter + */ +bool REGION::XEmptyRegion(Region r) +{ + if( r->numRects == 0 ) return true; + else return false; +} + +/* + * Check to see if two regions are equal + */ +bool REGION::XEqualRegion(Region r1, Region r2) +{ + int i; + + if( r1->numRects != r2->numRects ) return false; + else if( r1->numRects == 0 ) return true; + else if ( r1->extents.x1 != r2->extents.x1 ) return false; + else if ( r1->extents.x2 != r2->extents.x2 ) return false; + else if ( r1->extents.y1 != r2->extents.y1 ) return false; + else if ( r1->extents.y2 != r2->extents.y2 ) return false; + else for( i=0; i < r1->numRects; i++ ) { + if ( r1->rects[i].x1 != r2->rects[i].x1 ) return false; + else if ( r1->rects[i].x2 != r2->rects[i].x2 ) return false; + else if ( r1->rects[i].y1 != r2->rects[i].y1 ) return false; + else if ( r1->rects[i].y2 != r2->rects[i].y2 ) return false; + } + return true; +} + +bool REGION::XPointInRegion(Region pRegion, int x, int y) +{ + int i; + + if (pRegion->numRects == 0) + return false; + if (!INBOX(pRegion->extents, x, y)) + return false; + for (i=0; inumRects; i++) + { + if (INBOX (pRegion->rects[i], x, y)) + return true; + } + return false; +} + +wxRegionContain REGION::XRectInRegion(register Region region, + int rx, int ry, + unsigned int rwidth, + unsigned int rheight) +{ + BoxPtr pbox; + BoxPtr pboxEnd; + Box rect; + BoxPtr prect = ▭ + int partIn, partOut; + + prect->x1 = rx; + prect->y1 = ry; + prect->x2 = rwidth + rx; + prect->y2 = rheight + ry; + + /* this is (just) a useful optimization */ + if ((region->numRects == 0) || !EXTENTCHECK(®ion->extents, prect)) + return(wxOutRegion); + + partOut = false; + partIn = false; + + /* can stop when both partOut and partIn are true, or we reach prect->y2 */ + for (pbox = region->rects, pboxEnd = pbox + region->numRects; + pbox < pboxEnd; + pbox++) + { + + if (pbox->y2 <= ry) + continue; /* getting up to speed or skipping remainder of band */ + + if (pbox->y1 > ry) + { + partOut = true; /* missed part of rectangle above */ + if (partIn || (pbox->y1 >= prect->y2)) + break; + ry = pbox->y1; /* x guaranteed to be == prect->x1 */ + } + + if (pbox->x2 <= rx) + continue; /* not far enough over yet */ + + if (pbox->x1 > rx) + { + partOut = true; /* missed part of rectangle to left */ + if (partIn) + break; + } + + if (pbox->x1 < prect->x2) + { + partIn = true; /* definitely overlap */ + if (partOut) + break; + } + + if (pbox->x2 >= prect->x2) + { + ry = pbox->y2; /* finished with this band */ + if (ry >= prect->y2) + break; + rx = prect->x1; /* reset x out to left again */ + } else + { + /* + * Because boxes in a band are maximal width, if the first box + * to overlap the rectangle doesn't completely cover it in that + * band, the rectangle must be partially out, since some of it + * will be uncovered in that band. partIn will have been set true + * by now... + */ + break; + } + + } + + return(partIn ? ((ry < prect->y2) ? wxPartRegion : wxInRegion) : + wxOutRegion); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/renderg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/renderg.cpp new file mode 100644 index 0000000000..93354ab404 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/renderg.cpp @@ -0,0 +1,809 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/renderg.cpp +// Purpose: generic implementation of wxRendererNative (for any platform) +// Author: Vadim Zeitlin +// Modified by: +// Created: 20.07.2003 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/renderer.h" + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/dc.h" + #include "wx/settings.h" + #include "wx/gdicmn.h" + #include "wx/module.h" + #include "wx/control.h" +#endif //WX_PRECOMP + +#include "wx/splitter.h" +#include "wx/dcmirror.h" + +#ifdef __WXMAC__ + #include "wx/osx/private.h" +#endif + +// ---------------------------------------------------------------------------- +// wxRendererGeneric: our wxRendererNative implementation +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxRendererGeneric : public wxRendererNative +{ +public: + wxRendererGeneric(); + + virtual int DrawHeaderButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0, + wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, + wxHeaderButtonParams* params = NULL); + + virtual int DrawHeaderButtonContents(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0, + wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, + wxHeaderButtonParams* params = NULL); + + virtual int GetHeaderButtonHeight(wxWindow *win); + + virtual int GetHeaderButtonMargin(wxWindow *win); + + virtual void DrawTreeItemButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0); + + virtual void DrawSplitterBorder(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0); + + virtual void DrawSplitterSash(wxWindow *win, + wxDC& dc, + const wxSize& size, + wxCoord position, + wxOrientation orient, + int flags = 0); + + virtual void DrawComboBoxDropButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0); + + virtual void DrawDropArrow(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0); + + virtual void DrawCheckBox(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0); + + virtual wxSize GetCheckBoxSize(wxWindow *win); + + virtual void DrawPushButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0); + + virtual void DrawItemSelectionRect(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0); + + virtual void DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0); + + virtual void DrawChoice(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0); + + virtual void DrawComboBox(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0); + + virtual void DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0); + + virtual void DrawRadioBitmap(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0); + +#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP + virtual void DrawTitleBarBitmap(wxWindow *win, + wxDC& dc, + const wxRect& rect, + wxTitleBarButton button, + int flags = 0); +#endif // wxHAS_DRAW_TITLE_BAR_BITMAP + + virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win); + + virtual wxRendererVersion GetVersion() const + { + return wxRendererVersion(wxRendererVersion::Current_Version, + wxRendererVersion::Current_Age); + } + + + // Cleanup by deleting standard renderer + static void Cleanup(); + + // Get the generic object + static wxRendererGeneric* DoGetGeneric(); + +protected: + // draw the rectange using the first pen for the left and top sides and + // the second one for the bottom and right ones + void DrawShadedRect(wxDC& dc, wxRect *rect, + const wxPen& pen1, const wxPen& pen2); + + // the standard pens + wxPen m_penBlack, + m_penDarkGrey, + m_penLightGrey, + m_penHighlight; + + static wxRendererGeneric* sm_rendererGeneric; +}; + +// ============================================================================ +// wxRendererGeneric implementation +// ============================================================================ + +// Get the generic object +wxRendererGeneric* wxRendererGeneric::DoGetGeneric() +{ + if (!sm_rendererGeneric) + sm_rendererGeneric = new wxRendererGeneric; + return sm_rendererGeneric; +} + +// ---------------------------------------------------------------------------- +// wxRendererGeneric creation +// ---------------------------------------------------------------------------- + +/* static */ +wxRendererNative& wxRendererNative::GetGeneric() +{ + return * wxRendererGeneric::DoGetGeneric(); +} + +void wxRendererGeneric::Cleanup() +{ + wxDELETE(sm_rendererGeneric); +} + +wxRendererGeneric* wxRendererGeneric::sm_rendererGeneric = NULL; + +wxRendererGeneric::wxRendererGeneric() + : m_penBlack(wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW)), + m_penDarkGrey(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)), + m_penLightGrey(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)), + m_penHighlight(wxSystemSettings::GetColour(wxSYS_COLOUR_3DHIGHLIGHT)) +{ +} + +// ---------------------------------------------------------------------------- +// wxRendererGeneric helpers +// ---------------------------------------------------------------------------- + +void +wxRendererGeneric::DrawShadedRect(wxDC& dc, + wxRect *rect, + const wxPen& pen1, + const wxPen& pen2) +{ + // draw the rectangle + dc.SetPen(pen1); + dc.DrawLine(rect->GetLeft(), rect->GetTop(), + rect->GetLeft(), rect->GetBottom()); + dc.DrawLine(rect->GetLeft() + 1, rect->GetTop(), + rect->GetRight(), rect->GetTop()); + dc.SetPen(pen2); + dc.DrawLine(rect->GetRight(), rect->GetTop(), + rect->GetRight(), rect->GetBottom()); + dc.DrawLine(rect->GetLeft(), rect->GetBottom(), + rect->GetRight() + 1, rect->GetBottom()); + + // adjust the rect + rect->Inflate(-1); +} + +// ---------------------------------------------------------------------------- +// tree/list ctrl drawing +// ---------------------------------------------------------------------------- + +int +wxRendererGeneric::DrawHeaderButton(wxWindow* win, + wxDC& dc, + const wxRect& rect, + int flags, + wxHeaderSortIconType sortArrow, + wxHeaderButtonParams* params) +{ + const wxCoord x = rect.x, + y = rect.y, + w = rect.width, + h = rect.height; + + dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE))); + dc.SetPen(*wxTRANSPARENT_PEN); + dc.DrawRectangle(rect); + + dc.SetBrush(*wxTRANSPARENT_BRUSH); + + dc.SetPen(m_penBlack); + dc.DrawLine( x+w-1, y, x+w-1, y+h ); // right (outer) + dc.DrawLine( x, y+h-1, x+w, y+h-1 ); // bottom (outer) + + dc.SetPen(m_penDarkGrey); + dc.DrawLine( x+w-2, y+1, x+w-2, y+h-1 ); // right (inner) + dc.DrawLine( x+1, y+h-2, x+w-1, y+h-2 ); // bottom (inner) + + dc.SetPen(m_penHighlight); + dc.DrawLine( x, y, x, y+h-1 ); // left (outer) + dc.DrawLine( x, y, x+w-1, y ); // top (outer) + + return DrawHeaderButtonContents(win, dc, rect, flags, sortArrow, params); +} + + +int +wxRendererGeneric::DrawHeaderButtonContents(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags, + wxHeaderSortIconType sortArrow, + wxHeaderButtonParams* params) +{ + int labelWidth = 0; + + // Mark this item as selected. For the generic version we'll just draw an + // underline + if ( flags & wxCONTROL_SELECTED ) + { + // draw a line at the bottom of the header button, overlaying the + // native hot-tracking line (on XP) + const int penwidth = 3; + int y = rect.y + rect.height + 1 - penwidth; + wxColour c = (params && params->m_selectionColour.IsOk()) ? + params->m_selectionColour : wxColour(0x66, 0x66, 0x66); + wxPen pen(c, penwidth); + pen.SetCap(wxCAP_BUTT); + dc.SetPen(pen); + dc.DrawLine(rect.x, y, rect.x + rect.width, y); + } + + // Draw an up or down arrow + int arrowSpace = 0; + if (sortArrow != wxHDR_SORT_ICON_NONE ) + { + wxRect ar = rect; + + // make a rect for the arrow + ar.height = 4; + ar.width = 8; + ar.y += (rect.height - ar.height)/2; + ar.x = ar.x + rect.width - 3*ar.width/2; + arrowSpace = 3*ar.width/2; // space to preserve when drawing the label + + wxPoint triPt[3]; + if ( sortArrow & wxHDR_SORT_ICON_UP ) + { + triPt[0].x = ar.width / 2; + triPt[0].y = 0; + triPt[1].x = ar.width; + triPt[1].y = ar.height; + triPt[2].x = 0; + triPt[2].y = ar.height; + } + else + { + triPt[0].x = 0; + triPt[0].y = 0; + triPt[1].x = ar.width; + triPt[1].y = 0; + triPt[2].x = ar.width / 2; + triPt[2].y = ar.height; + } + + wxColour c = (params && params->m_arrowColour.IsOk()) ? + params->m_arrowColour : wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW); + + wxDCPenChanger setPen(dc, c); + wxDCBrushChanger setBrush(dc, c); + + wxDCClipper clip(dc, rect); + dc.DrawPolygon( 3, triPt, ar.x, ar.y); + } + labelWidth += arrowSpace; + + int bmpWidth = 0; + + // draw the bitmap if there is one + if ( params && params->m_labelBitmap.IsOk() ) + { + int w = params->m_labelBitmap.GetWidth(); + int h = params->m_labelBitmap.GetHeight(); + + const int margin = 1; // an extra pixel on either side of the bitmap + + bmpWidth = w + 2*margin; + labelWidth += bmpWidth; + + int x = rect.x + margin; + const int y = rect.y + wxMax(1, (rect.height - h) / 2); + + const int extraSpace = rect.width - labelWidth; + if ( params->m_labelText.empty() && extraSpace > 0 ) + { + // use the alignment flags + switch (params->m_labelAlignment) + { + default: + case wxALIGN_LEFT: + break; + + case wxALIGN_CENTER: + x += extraSpace/2; + break; + + case wxALIGN_RIGHT: + x += extraSpace; + break; + } + } + + wxDCClipper clip(dc, rect); + dc.DrawBitmap(params->m_labelBitmap, x, y, true); + } + + // Draw a label if one is given + if ( params && !params->m_labelText.empty() ) + { + const int margin = 5; // number of pixels to reserve on either side of the label + labelWidth += 2*margin; + + wxFont font = params->m_labelFont.IsOk() ? + params->m_labelFont : win->GetFont(); + wxColour clr = params->m_labelColour.IsOk() ? + params->m_labelColour : win->GetForegroundColour(); + + wxString label( params->m_labelText ); + + dc.SetFont(font); + dc.SetTextForeground(clr); + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); + + int tw, th, td; + dc.GetTextExtent( label, &tw, &th, &td); + + int x = rect.x + bmpWidth + margin; + const int y = rect.y + wxMax(0, (rect.height - (th+td)) / 2); + + // truncate and add an ellipsis (...) if the text is too wide. + const int availWidth = rect.width - labelWidth; +#if wxUSE_CONTROLS + if ( tw > availWidth ) + { + label = wxControl::Ellipsize(label, + dc, + wxELLIPSIZE_END, + availWidth, + wxELLIPSIZE_FLAGS_NONE); + tw = dc.GetTextExtent(label).x; + } + else // enough space, we can respect alignment +#endif // wxUSE_CONTROLS + { + switch (params->m_labelAlignment) + { + default: + case wxALIGN_LEFT: + break; + + case wxALIGN_CENTER: + x += (availWidth - tw)/2; + break; + + case wxALIGN_RIGHT: + x += availWidth - tw; + break; + } + } + + dc.DrawText(label, x, y); + + labelWidth += tw; + } + + return labelWidth; +} + + +int wxRendererGeneric::GetHeaderButtonHeight(wxWindow *win) +{ + // Copied and adapted from src/generic/listctrl.cpp + const int HEADER_OFFSET_Y = 1; + const int EXTRA_HEIGHT = 4; + + int w=0, h=14, d=0; + if (win) + win->GetTextExtent(wxT("Hg"), &w, &h, &d); + + return h + d + 2 * HEADER_OFFSET_Y + EXTRA_HEIGHT; +} + +int wxRendererGeneric::GetHeaderButtonMargin(wxWindow *WXUNUSED(win)) +{ + return 5; +} + + +// draw the plus or minus sign +void +wxRendererGeneric::DrawTreeItemButton(wxWindow * WXUNUSED(win), + wxDC& dc, + const wxRect& rect, + int flags) +{ + // store settings + wxDCPenChanger penChanger(dc, *wxGREY_PEN); + wxDCBrushChanger brushChanger(dc, *wxWHITE_BRUSH); + + dc.DrawRectangle(rect); + + // black lines + const wxCoord xMiddle = rect.x + rect.width/2; + const wxCoord yMiddle = rect.y + rect.height/2; + + // half of the length of the horz lines in "-" and "+" + const wxCoord halfWidth = rect.width/2 - 2; + dc.SetPen(*wxBLACK_PEN); + dc.DrawLine(xMiddle - halfWidth, yMiddle, + xMiddle + halfWidth + 1, yMiddle); + + if ( !(flags & wxCONTROL_EXPANDED) ) + { + // turn "-" into "+" + const wxCoord halfHeight = rect.height/2 - 2; + dc.DrawLine(xMiddle, yMiddle - halfHeight, + xMiddle, yMiddle + halfHeight + 1); + } +} + +// ---------------------------------------------------------------------------- +// sash drawing +// ---------------------------------------------------------------------------- + +wxSplitterRenderParams +wxRendererGeneric::GetSplitterParams(const wxWindow *win) +{ + // see below + wxCoord sashWidth, + border; + + if ( win->HasFlag(wxSP_3DSASH) ) + sashWidth = 7; + else if ( win->HasFlag(wxSP_NOSASH) ) + sashWidth = 0; + else // no 3D effect + sashWidth = 3; + + if ( win->HasFlag(wxSP_3DBORDER) ) + border = 2; + else // no 3D effect + border = 0; + + return wxSplitterRenderParams(sashWidth, border, false); +} + +void +wxRendererGeneric::DrawSplitterBorder(wxWindow *win, + wxDC& dc, + const wxRect& rectOrig, + int WXUNUSED(falgs)) +{ + if ( win->HasFlag(wxSP_3DBORDER) ) + { + wxRect rect = rectOrig; + DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); + DrawShadedRect(dc, &rect, m_penBlack, m_penLightGrey); + } +} + +void +wxRendererGeneric::DrawSplitterSash(wxWindow *win, + wxDC& dcReal, + const wxSize& sizeReal, + wxCoord position, + wxOrientation orient, + int WXUNUSED(flags)) +{ + // to avoid duplicating the same code for horizontal and vertical sashes, + // simply mirror the DC instead if needed (i.e. if horz splitter) + wxMirrorDC dc(dcReal, orient != wxVERTICAL); + wxSize size = dc.Reflect(sizeReal); + + + // we draw a Win32-like grey sash with possible 3D border here: + // + // ---- this is position + // / + // v + // dWGGGDd + // GWGGGDB + // GWGGGDB where G is light grey (face) + // GWGGGDB W white (light) + // GWGGGDB D dark grey (shadow) + // GWGGGDB B black (dark shadow) + // GWGGGDB + // GWGGGDB and lower letters are our border (already drawn) + // GWGGGDB + // wWGGGDd + // + // only the middle 3 columns are drawn unless wxSP_3D is specified + + const wxCoord h = size.y; + wxCoord offset = 0; + + // If we're drawing the border, draw the sash 3d lines shorter + if ( win->HasFlag(wxSP_3DBORDER) ) + { + offset = 1; + } + + dc.SetPen(*wxTRANSPARENT_PEN); + dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE))); + + if ( win->HasFlag(wxSP_3DSASH) ) + { + // Draw the 3D sash + dc.DrawRectangle(position + 2, 0, 3, h); + + dc.SetPen(m_penLightGrey); + dc.DrawLine(position, offset, position, h - offset); + + dc.SetPen(m_penHighlight); + dc.DrawLine(position + 1, 0, position + 1, h); + + dc.SetPen(m_penDarkGrey); + dc.DrawLine(position + 5, 0, position + 5, h); + + dc.SetPen(m_penBlack); + dc.DrawLine(position + 6, offset, position + 6, h - offset); + } + else + { + // Draw a flat sash + dc.DrawRectangle(position, 0, 3, h); + } +} + +// ---------------------------------------------------------------------------- +// button drawing +// ---------------------------------------------------------------------------- + +void +wxRendererGeneric::DrawComboBoxDropButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags) +{ + DrawPushButton(win,dc,rect,flags); + DrawDropArrow(win,dc,rect,flags); +} + +void +wxRendererGeneric::DrawDropArrow(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int WXUNUSED(flags)) +{ + // This generic implementation should be good + // enough for Windows platforms (including XP). + + int arrowHalf = rect.width/5; + int rectMid = rect.width / 2; + int arrowTopY = (rect.height/2) - (arrowHalf/2); + + // This should always result in arrow with odd width. + wxPoint pt[] = + { + wxPoint(rectMid - arrowHalf, arrowTopY), + wxPoint(rectMid + arrowHalf, arrowTopY), + wxPoint(rectMid, arrowTopY + arrowHalf) + }; + dc.SetBrush(wxBrush(win->GetForegroundColour())); + dc.SetPen(wxPen(win->GetForegroundColour())); + dc.DrawPolygon(WXSIZEOF(pt), pt, rect.x, rect.y); +} + +void +wxRendererGeneric::DrawCheckBox(wxWindow *WXUNUSED(win), + wxDC& dc, + const wxRect& rect, + int flags) +{ + dc.SetPen(*(flags & wxCONTROL_DISABLED ? wxGREY_PEN : wxBLACK_PEN)); + dc.SetBrush( *wxTRANSPARENT_BRUSH ); + dc.DrawRectangle(rect); + + if ( flags & wxCONTROL_CHECKED ) + { + dc.DrawCheckMark(rect.Deflate(2, 2)); + } +} + +wxSize wxRendererGeneric::GetCheckBoxSize(wxWindow *WXUNUSED(win)) +{ + return wxSize(16, 16); +} + +void +wxRendererGeneric::DrawPushButton(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags) +{ + // Don't try anything too fancy. It'll just turn out looking + // out-of-place on most platforms. + wxColour bgCol = flags & wxCONTROL_DISABLED ? + wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE) : + win->GetBackgroundColour(); + dc.SetBrush(wxBrush(bgCol)); + dc.SetPen(wxPen(bgCol)); + dc.DrawRectangle(rect); +} + +void +wxRendererGeneric::DrawItemSelectionRect(wxWindow * win, + wxDC& dc, + const wxRect& rect, + int flags) +{ + wxBrush brush; + if ( flags & wxCONTROL_SELECTED ) + { + if ( flags & wxCONTROL_FOCUSED ) + { + brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT)); + } + else // !focused + { + brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW)); + } + } + else // !selected + { + brush = *wxTRANSPARENT_BRUSH; + } + + dc.SetBrush(brush); + if ((flags & wxCONTROL_CURRENT) && (flags & wxCONTROL_FOCUSED) +#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON + && IsControlActive( (ControlRef)win->GetHandle() ) +#endif + ) + dc.SetPen( *wxBLACK_PEN ); + else + dc.SetPen( *wxTRANSPARENT_PEN ); + + dc.DrawRectangle( rect ); + + // it's unused everywhere except in wxOSX/Carbon + wxUnusedVar(win); +} + +void +wxRendererGeneric::DrawFocusRect(wxWindow* WXUNUSED(win), wxDC& dc, const wxRect& rect, int WXUNUSED(flags)) +{ + // draw the pixels manually because the "dots" in wxPen with wxDOT style + // may be short traits and not really dots + // + // note that to behave in the same manner as DrawRect(), we must exclude + // the bottom and right borders from the rectangle + wxCoord x1 = rect.GetLeft(), + y1 = rect.GetTop(), + x2 = rect.GetRight(), + y2 = rect.GetBottom(); + + dc.SetPen(m_penBlack); + +#ifdef __WXMAC__ + dc.SetLogicalFunction(wxCOPY); +#else + // this seems to be closer than what Windows does than wxINVERT although + // I'm still not sure if it's correct + dc.SetLogicalFunction(wxAND_REVERSE); +#endif + + wxCoord z; + for ( z = x1 + 1; z < x2; z += 2 ) + dc.DrawPoint(z, rect.GetTop()); + + wxCoord shift = z == x2 ? 0 : 1; + for ( z = y1 + shift; z < y2; z += 2 ) + dc.DrawPoint(x2, z); + + shift = z == y2 ? 0 : 1; + for ( z = x2 - shift; z > x1; z -= 2 ) + dc.DrawPoint(z, y2); + + shift = z == x1 ? 0 : 1; + for ( z = y2 - shift; z > y1; z -= 2 ) + dc.DrawPoint(x1, z); + + dc.SetLogicalFunction(wxCOPY); +} + +void wxRendererGeneric::DrawChoice(wxWindow* WXUNUSED(win), wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), int WXUNUSED(flags)) +{ + wxFAIL_MSG("UNIMPLEMENTED: wxRendererGeneric::DrawChoice"); +} + +void wxRendererGeneric::DrawComboBox(wxWindow* WXUNUSED(win), wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), int WXUNUSED(flags)) +{ + wxFAIL_MSG("UNIMPLEMENTED: wxRendererGeneric::DrawComboBox"); +} + +void wxRendererGeneric::DrawRadioBitmap(wxWindow* WXUNUSED(win), wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), int WXUNUSED(flags)) +{ + wxFAIL_MSG("UNIMPLEMENTED: wxRendererGeneric::DrawRadioBitmap"); +} + +void wxRendererGeneric::DrawTextCtrl(wxWindow* WXUNUSED(win), wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), int WXUNUSED(flags)) +{ + wxFAIL_MSG("UNIMPLEMENTED: wxRendererGeneric::DrawTextCtrl"); +} + +#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP + +void wxRendererGeneric::DrawTitleBarBitmap(wxWindow * WXUNUSED(win), + wxDC& WXUNUSED(dc), + const wxRect& WXUNUSED(rect), + wxTitleBarButton WXUNUSED(button), + int WXUNUSED(flags)) +{ + // no need to fail here, if wxHAS_DRAW_TITLE_BAR_BITMAP is defined this + // will be implemented in the native renderer and this version is never + // going to be used -- but we still need to define it to allow + // instantiation of this class (which would have been pure virtual + // otherwise) +} + +#endif // wxHAS_DRAW_TITLE_BAR_BITMAP + + +// ---------------------------------------------------------------------------- +// A module to allow cleanup of generic renderer. +// ---------------------------------------------------------------------------- + +class wxGenericRendererModule: public wxModule +{ +DECLARE_DYNAMIC_CLASS(wxGenericRendererModule) +public: + wxGenericRendererModule() {} + bool OnInit() { return true; } + void OnExit() { wxRendererGeneric::Cleanup(); } +}; + +IMPLEMENT_DYNAMIC_CLASS(wxGenericRendererModule, wxModule) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/richmsgdlgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/richmsgdlgg.cpp new file mode 100644 index 0000000000..397cfd051a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/richmsgdlgg.cpp @@ -0,0 +1,89 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/richmsgdlgg.cpp +// Purpose: wxGenericRichMessageDialog +// Author: Rickard Westerlund +// Created: 2010-07-04 +// Copyright: (c) 2010 wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#if wxUSE_RICHMSGDLG + +#ifndef WX_PRECOMP + #include "wx/checkbox.h" + #include "wx/stattext.h" + #include "wx/sizer.h" +#endif + +#include "wx/collpane.h" +#include "wx/richmsgdlg.h" + +wxIMPLEMENT_CLASS(wxRichMessageDialog, wxDialog) + +// ---------------------------------------------------------------------------- +// Events and handlers +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxGenericRichMessageDialog, wxRichMessageDialogBase) + EVT_COLLAPSIBLEPANE_CHANGED(wxID_ANY, + wxGenericRichMessageDialog::OnPaneChanged) +END_EVENT_TABLE() + +void wxGenericRichMessageDialog::OnPaneChanged(wxCollapsiblePaneEvent& event) +{ + if ( event.GetCollapsed() ) + m_detailsPane->SetLabel( m_detailsExpanderCollapsedLabel ); + else + m_detailsPane->SetLabel( m_detailsExpanderExpandedLabel ); +} + +// ---------------------------------------------------------------------------- +// wxGenericRichMessageDialog +// ---------------------------------------------------------------------------- + +void wxGenericRichMessageDialog::AddMessageDialogCheckBox(wxSizer *sizer) +{ + if ( !m_checkBoxText.empty() ) + { + m_checkBox = new wxCheckBox(this, wxID_ANY, m_checkBoxText); + m_checkBox->SetValue(m_checkBoxValue); + + sizer->Add(m_checkBox, wxSizerFlags().Left().Border(wxLEFT|wxTOP, 10)); + } +} + +void wxGenericRichMessageDialog::AddMessageDialogDetails(wxSizer *sizer) +{ + if ( !m_detailedText.empty() ) + { + wxSizer *sizerDetails = new wxBoxSizer( wxHORIZONTAL ); + + m_detailsPane = + new wxCollapsiblePane( this, -1, m_detailsExpanderCollapsedLabel ); + + // add the detailed text + wxWindow *windowPane = m_detailsPane->GetPane(); + wxSizer *sizerPane = new wxBoxSizer( wxHORIZONTAL ); + sizerPane->Add( new wxStaticText( windowPane, -1, m_detailedText ) ); + windowPane->SetSizer( sizerPane ); + + sizerDetails->Add( m_detailsPane, wxSizerFlags().Right().Expand() ); + sizer->Add( sizerDetails, 0, wxTOP|wxLEFT|wxRIGHT | wxALIGN_LEFT, 10 ); + } +} + +bool wxGenericRichMessageDialog::IsCheckBoxChecked() const +{ + // This function can be called before the dialog is shown and hence before + // the check box is created. + return m_checkBox ? m_checkBox->IsChecked() : m_checkBoxValue; +} + +#endif // wxUSE_RICHMSGDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/richtooltipg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/richtooltipg.cpp new file mode 100644 index 0000000000..2986f9be31 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/richtooltipg.cpp @@ -0,0 +1,711 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/richtooltipg.cpp +// Purpose: Implementation of wxRichToolTip. +// Author: Vadim Zeitlin +// Created: 2011-10-07 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_RICHTOOLTIP + +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" + #include "wx/icon.h" + #include "wx/region.h" + #include "wx/settings.h" + #include "wx/sizer.h" + #include "wx/statbmp.h" + #include "wx/stattext.h" + #include "wx/timer.h" + #include "wx/utils.h" +#endif // WX_PRECOMP + +#include "wx/private/richtooltip.h" +#include "wx/generic/private/richtooltip.h" + +#include "wx/artprov.h" +#include "wx/custombgwin.h" +#include "wx/display.h" +#include "wx/graphics.h" +#include "wx/popupwin.h" +#include "wx/textwrapper.h" + +#ifdef __WXMSW__ + #include "wx/msw/uxtheme.h" + + static const int TTP_BALLOONTITLE = 4; + + static const int TMT_TEXTCOLOR = 3803; + static const int TMT_GRADIENTCOLOR1 = 3810; + static const int TMT_GRADIENTCOLOR2 = 3811; +#endif + +// ---------------------------------------------------------------------------- +// wxRichToolTipPopup: the popup window used by wxRichToolTip. +// ---------------------------------------------------------------------------- + +class wxRichToolTipPopup : + public wxCustomBackgroundWindow +{ +public: + wxRichToolTipPopup(wxWindow* parent, + const wxString& title, + const wxString& message, + const wxIcon& icon, + wxTipKind tipKind, + const wxFont& titleFont_) : + m_timer(this) + { + Create(parent, wxFRAME_SHAPED); + + + wxBoxSizer* const sizerTitle = new wxBoxSizer(wxHORIZONTAL); + if ( icon.IsOk() ) + { + sizerTitle->Add(new wxStaticBitmap(this, wxID_ANY, icon), + wxSizerFlags().Centre().Border(wxRIGHT)); + } + //else: Simply don't show any icon. + + wxStaticText* const labelTitle = new wxStaticText(this, wxID_ANY, ""); + labelTitle->SetLabelText(title); + + wxFont titleFont(titleFont_); + if ( !titleFont.IsOk() ) + { + // Determine the appropriate title font for the current platform. + titleFont = labelTitle->GetFont(); + +#ifdef __WXMSW__ + // When using themes MSW tooltips use larger bluish version of the + // normal font. + wxUxThemeEngine* const theme = GetTooltipTheme(); + if ( theme ) + { + titleFont.MakeLarger(); + + COLORREF c; + if ( FAILED(theme->GetThemeColor + ( + wxUxThemeHandle(parent, L"TOOLTIP"), + TTP_BALLOONTITLE, + 0, + TMT_TEXTCOLOR, + &c + )) ) + { + // Use the standard value of this colour as fallback. + c = 0x993300; + } + + labelTitle->SetForegroundColour(wxRGBToColour(c)); + } + else +#endif // __WXMSW__ + { + // Everything else, including "classic" MSW look uses just the + // bold version of the base font. + titleFont.MakeBold(); + } + } + + labelTitle->SetFont(titleFont); + sizerTitle->Add(labelTitle, wxSizerFlags().Centre()); + + wxBoxSizer* const sizerTop = new wxBoxSizer(wxVERTICAL); + sizerTop->Add(sizerTitle, + wxSizerFlags().DoubleBorder(wxLEFT|wxRIGHT|wxTOP)); + + // Use a spacer as we don't want to have a double border between the + // elements, just a simple one will do. + sizerTop->AddSpacer(wxSizerFlags::GetDefaultBorder()); + + wxTextSizerWrapper wrapper(this); + wxSizer* sizerText = wrapper.CreateSizer(message, -1 /* No wrapping */); + +#ifdef __WXMSW__ + if ( icon.IsOk() && GetTooltipTheme() ) + { + // Themed tooltips under MSW align the text with the title, not + // with the icon, so use a helper horizontal sizer in this case. + wxBoxSizer* const sizerTextIndent = new wxBoxSizer(wxHORIZONTAL); + sizerTextIndent->AddSpacer(icon.GetWidth()); + sizerTextIndent->Add(sizerText, + wxSizerFlags().Border(wxLEFT).Centre()); + + sizerText = sizerTextIndent; + } +#endif // !__WXMSW__ + sizerTop->Add(sizerText, + wxSizerFlags().DoubleBorder(wxLEFT|wxRIGHT|wxBOTTOM) + .Centre()); + + SetSizer(sizerTop); + + const int offsetY = SetTipShapeAndSize(tipKind, GetBestSize()); + if ( offsetY > 0 ) + { + // Offset our contents by the tip height to make it appear in the + // main rectangle. + sizerTop->PrependSpacer(offsetY); + } + + Layout(); + } + + void SetBackgroundColours(wxColour colStart, wxColour colEnd) + { + if ( !colStart.IsOk() ) + { + // Determine the best colour(s) to use on our own. +#ifdef __WXMSW__ + wxUxThemeEngine* const theme = GetTooltipTheme(); + if ( theme ) + { + wxUxThemeHandle hTheme(GetParent(), L"TOOLTIP"); + + COLORREF c1, c2; + if ( FAILED(theme->GetThemeColor + ( + hTheme, + TTP_BALLOONTITLE, + 0, + TMT_GRADIENTCOLOR1, + &c1 + )) || + FAILED(theme->GetThemeColor + ( + hTheme, + TTP_BALLOONTITLE, + 0, + TMT_GRADIENTCOLOR2, + &c2 + )) ) + { + c1 = 0xffffff; + c2 = 0xf0e5e4; + } + + colStart = wxRGBToColour(c1); + colEnd = wxRGBToColour(c2); + } + else +#endif // __WXMSW__ + { + colStart = wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK); + } + } + + if ( colEnd.IsOk() ) + { + // Use gradient-filled background bitmap. + const wxSize size = GetClientSize(); + wxBitmap bmp(size); + { + wxMemoryDC dc(bmp); + dc.Clear(); + dc.GradientFillLinear(size, colStart, colEnd, wxDOWN); + } + + SetBackgroundBitmap(bmp); + } + else // Use solid colour. + { + SetBackgroundColour(colStart); + } + } + + void SetPosition(const wxRect* rect) + { + wxPoint pos; + + if ( !rect || rect->IsEmpty() ) + pos = GetTipPoint(); + else + pos = GetParent()->ClientToScreen( wxPoint( rect->x + rect->width / 2, rect->y + rect->height / 2 ) ); + + // We want our anchor point to coincide with this position so offset + // the position of the top left corner passed to Move() accordingly. + pos -= m_anchorPos; + + Move(pos, wxSIZE_NO_ADJUSTMENTS); + } + + void DoShow() + { + Popup(); + } + + void SetTimeoutAndShow(unsigned timeout, unsigned delay) + { + if ( !timeout && !delay ) + { + DoShow(); + return; + } + + Connect(wxEVT_TIMER, wxTimerEventHandler(wxRichToolTipPopup::OnTimer)); + + m_timeout = timeout; // set for use in OnTimer if we have a delay + m_delayShow = delay != 0; + + if ( !m_delayShow ) + DoShow(); + + m_timer.Start((delay ? delay : timeout), true /* one shot */); + } + +protected: + virtual void OnDismiss() + { + Destroy(); + } + +private: +#ifdef __WXMSW__ + // Returns non-NULL theme only if we're using Win7-style tooltips. + static wxUxThemeEngine* GetTooltipTheme() + { + // Even themed applications under XP still use "classic" tooltips. + if ( wxGetWinVersion() <= wxWinVersion_XP ) + return NULL; + + return wxUxThemeEngine::GetIfActive(); + } +#endif // __WXMSW__ + + // For now we just hard code the tip height, would be nice to do something + // smarter in the future. + static int GetTipHeight() + { +#ifdef __WXMSW__ + if ( GetTooltipTheme() ) + return 20; +#endif // __WXMSW__ + + return 15; + } + + // Get the point to which our tip should point. + wxPoint GetTipPoint() const + { + // Currently we always use the middle of the window. It seems that MSW + // native tooltips use a different point but it's not really clear how + // do they determine it nor whether it's worth the trouble to emulate + // their behaviour. + const wxRect r = GetParent()->GetScreenRect(); + return wxPoint(r.x + r.width/2, r.y + r.height/2); + } + + // Choose the correct orientation depending on the window position. + // + // Also use the tip kind appropriate for the current environment. For MSW + // the right triangles are used and for Mac the equilateral ones as this is + // the prevailing kind under these systems. For everything else we go with + // right triangles as well but without any real rationale so this could be + // tweaked in the future. + wxTipKind GetBestTipKind() const + { + const wxPoint pos = GetTipPoint(); + + // Use GetFromWindow() and not GetFromPoint() here to try to get the + // correct display even if the tip point itself is not visible. + int dpy = wxDisplay::GetFromWindow(GetParent()); + if ( dpy == wxNOT_FOUND ) + dpy = 0; // What else can we do? + + const wxRect rectDpy = wxDisplay(dpy).GetClientArea(); + +#ifdef __WXMAC__ + return pos.y > rectDpy.height/2 ? wxTipKind_Bottom : wxTipKind_Top; +#else // !__WXMAC__ + return pos.y > rectDpy.height/2 + ? pos.x > rectDpy.width/2 + ? wxTipKind_BottomRight + : wxTipKind_BottomLeft + : pos.x > rectDpy.width/2 + ? wxTipKind_TopRight + : wxTipKind_TopLeft; +#endif // __WXMAC__/!__WXMAC__ + } + + // Set the size and shape of the tip window and returns the offset of its + // content area from the top (horizontal offset is always 0 currently). + int SetTipShapeAndSize(wxTipKind tipKind, const wxSize& contentSize) + { +#if wxUSE_GRAPHICS_CONTEXT + wxSize size = contentSize; + + // The size is the vertical size and the offset is the distance from + // edge for asymmetric tips, currently hard-coded to be the same as the + // size. + const int tipSize = GetTipHeight(); + const int tipOffset = tipSize; + + // The horizontal position of the tip. + int x = -1; + + // The vertical coordinates of the tip base and apex. + int yBase = -1, + yApex = -1; + + // The offset of the content part of the window. + int dy = -1; + + // Define symbolic names for the rectangle corners and mid-way points + // that we use below in an attempt to make the code more clear. Notice + // that these values must be consecutive as we iterate over them. + enum RectPoint + { + RectPoint_TopLeft, + RectPoint_Top, + RectPoint_TopRight, + RectPoint_Right, + RectPoint_BotRight, + RectPoint_Bot, + RectPoint_BotLeft, + RectPoint_Left, + RectPoint_Max + }; + + // The starting point for AddArcToPoint() calls below, we iterate over + // all RectPoints from it. + RectPoint pointStart = RectPoint_Max; + + + // Hard-coded radius of the round main rectangle corners. + const double RADIUS = 5; + + // Create a path defining the shape of the tooltip window. + wxGraphicsPath + path = wxGraphicsRenderer::GetDefaultRenderer()->CreatePath(); + + if ( tipKind == wxTipKind_Auto ) + tipKind = GetBestTipKind(); + + // Points defining the tip shape (in clockwise order as we must end at + // tipPoints[0] after drawing the rectangle outline in this order). + wxPoint2DDouble tipPoints[3]; + + switch ( tipKind ) + { + case wxTipKind_Auto: + wxFAIL_MSG( "Impossible kind value" ); + break; + + case wxTipKind_TopLeft: + x = tipOffset; + yApex = 0; + yBase = tipSize; + dy = tipSize; + + tipPoints[0] = wxPoint2DDouble(x, yBase); + tipPoints[1] = wxPoint2DDouble(x, yApex); + tipPoints[2] = wxPoint2DDouble(x + tipSize, yBase); + + pointStart = RectPoint_TopRight; + break; + + case wxTipKind_TopRight: + x = size.x - tipOffset; + yApex = 0; + yBase = tipSize; + dy = tipSize; + + tipPoints[0] = wxPoint2DDouble(x - tipSize, yBase); + tipPoints[1] = wxPoint2DDouble(x, yApex); + tipPoints[2] = wxPoint2DDouble(x, yBase); + + pointStart = RectPoint_TopRight; + break; + + case wxTipKind_BottomLeft: + x = tipOffset; + yApex = size.y + tipSize; + yBase = size.y; + dy = 0; + + tipPoints[0] = wxPoint2DDouble(x + tipSize, yBase); + tipPoints[1] = wxPoint2DDouble(x, yApex); + tipPoints[2] = wxPoint2DDouble(x, yBase); + + pointStart = RectPoint_BotLeft; + break; + + case wxTipKind_BottomRight: + x = size.x - tipOffset; + yApex = size.y + tipSize; + yBase = size.y; + dy = 0; + + tipPoints[0] = wxPoint2DDouble(x, yBase); + tipPoints[1] = wxPoint2DDouble(x, yApex); + tipPoints[2] = wxPoint2DDouble(x - tipSize, yBase); + + pointStart = RectPoint_BotLeft; + break; + + case wxTipKind_Top: + x = size.x/2; + yApex = 0; + yBase = tipSize; + dy = tipSize; + + { + // A half-side of an equilateral triangle is its altitude + // divided by sqrt(3) ~= 1.73. + const double halfside = tipSize/1.73; + + tipPoints[0] = wxPoint2DDouble(x - halfside, yBase); + tipPoints[1] = wxPoint2DDouble(x, yApex); + tipPoints[2] = wxPoint2DDouble(x + halfside, yBase); + } + + pointStart = RectPoint_TopRight; + break; + + case wxTipKind_Bottom: + x = size.x/2; + yApex = size.y + tipSize; + yBase = size.y; + dy = 0; + + { + const double halfside = tipSize/1.73; + + tipPoints[0] = wxPoint2DDouble(x + halfside, yBase); + tipPoints[1] = wxPoint2DDouble(x, yApex); + tipPoints[2] = wxPoint2DDouble(x - halfside, yBase); + } + + pointStart = RectPoint_BotLeft; + break; + + case wxTipKind_None: + x = size.x/2; + dy = 0; + + path.AddRoundedRectangle(0, 0, size.x, size.y, RADIUS); + break; + } + + wxASSERT_MSG( dy != -1, wxS("Unknown tip kind?") ); + + size.y += tipSize; + SetSize(size); + + if ( tipKind != wxTipKind_None ) + { + path.MoveToPoint(tipPoints[0]); + path.AddLineToPoint(tipPoints[1]); + path.AddLineToPoint(tipPoints[2]); + + const double xLeft = 0.; + const double xMid = size.x/2.; + const double xRight = size.x; + + const double yTop = dy; + const double yMid = (dy + size.y)/2.; + const double yBot = dy + contentSize.y; + + wxPoint2DDouble rectPoints[RectPoint_Max]; + rectPoints[RectPoint_TopLeft] = wxPoint2DDouble(xLeft, yTop); + rectPoints[RectPoint_Top] = wxPoint2DDouble(xMid, yTop); + rectPoints[RectPoint_TopRight] = wxPoint2DDouble(xRight, yTop); + rectPoints[RectPoint_Right] = wxPoint2DDouble(xRight, yMid); + rectPoints[RectPoint_BotRight] = wxPoint2DDouble(xRight, yBot); + rectPoints[RectPoint_Bot] = wxPoint2DDouble(xMid, yBot); + rectPoints[RectPoint_BotLeft] = wxPoint2DDouble(xLeft, yBot); + rectPoints[RectPoint_Left] = wxPoint2DDouble(xLeft, yMid); + + // Iterate over all rectangle rectPoints for the first 3 corners. + unsigned n = pointStart; + for ( unsigned corner = 0; corner < 3; corner++ ) + { + const wxPoint2DDouble& pt1 = rectPoints[n]; + + n = (n + 1) % RectPoint_Max; + + const wxPoint2DDouble& pt2 = rectPoints[n]; + + path.AddArcToPoint(pt1.m_x, pt1.m_y, pt2.m_x, pt2.m_y, RADIUS); + + n = (n + 1) % RectPoint_Max; + } + + // Last one wraps to the first point of the tip. + const wxPoint2DDouble& pt1 = rectPoints[n]; + const wxPoint2DDouble& pt2 = tipPoints[0]; + + path.AddArcToPoint(pt1.m_x, pt1.m_y, pt2.m_x, pt2.m_y, RADIUS); + + path.CloseSubpath(); + } + + SetShape(path); +#else // !wxUSE_GRAPHICS_CONTEXT + wxUnusedVar(tipKind); + + int x = contentSize.x/2, + yApex = 0, + dy = 0; + + SetSize(contentSize); +#endif // wxUSE_GRAPHICS_CONTEXT/!wxUSE_GRAPHICS_CONTEXT + + m_anchorPos.x = x; + m_anchorPos.y = yApex; + + return dy; + } + + // Timer event handler hides the tooltip when the timeout expires. + void OnTimer(wxTimerEvent& WXUNUSED(event)) + { + if ( !m_delayShow ) + { + // Doing "Notify" here ensures that our OnDismiss() is called and so we + // also Destroy() ourselves. We could use Dismiss() and call Destroy() + // explicitly from here as well. + DismissAndNotify(); + + return; + } + + m_delayShow = false; + + if ( m_timeout ) + m_timer.Start(m_timeout, true); + + DoShow(); + } + + + // The anchor point offset if we show a tip or the middle of the top side + // otherwise. + wxPoint m_anchorPos; + + // The timer counting down the time until we're hidden. + wxTimer m_timer; + + // We will need to accesss the timeout period when delaying showing tooltip. + int m_timeout; + + // If true, delay showing the tooltip. + bool m_delayShow; + + wxDECLARE_NO_COPY_CLASS(wxRichToolTipPopup); +}; + +// ---------------------------------------------------------------------------- +// wxRichToolTipGenericImpl: generic implementation of wxRichToolTip. +// ---------------------------------------------------------------------------- + +void +wxRichToolTipGenericImpl::SetBackgroundColour(const wxColour& col, + const wxColour& colEnd) +{ + m_colStart = col; + m_colEnd = colEnd; +} + +void wxRichToolTipGenericImpl::SetCustomIcon(const wxIcon& icon) +{ + m_icon = icon; +} + +void wxRichToolTipGenericImpl::SetStandardIcon(int icon) +{ + switch ( icon & wxICON_MASK ) + { + case wxICON_WARNING: + case wxICON_ERROR: + case wxICON_INFORMATION: + // Although we don't use this icon in a list, we need a smallish + // icon here and not an icon of a typical message box size so use + // wxART_LIST to get it. + m_icon = wxArtProvider::GetIcon + ( + wxArtProvider::GetMessageBoxIconId(icon), + wxART_LIST + ); + break; + + case wxICON_QUESTION: + wxFAIL_MSG("Question icon doesn't make sense for a tooltip"); + break; + + case wxICON_NONE: + m_icon = wxNullIcon; + break; + } +} + +void wxRichToolTipGenericImpl::SetTimeout(unsigned millisecondsTimeout, + unsigned millisecondsDelay) +{ + m_delay = millisecondsDelay; + m_timeout = millisecondsTimeout; +} + +void wxRichToolTipGenericImpl::SetTipKind(wxTipKind tipKind) +{ + m_tipKind = tipKind; +} + +void wxRichToolTipGenericImpl::SetTitleFont(const wxFont& font) +{ + m_titleFont = font; +} + +void wxRichToolTipGenericImpl::ShowFor(wxWindow* win, const wxRect* rect) +{ + // Set the focus to the window the tooltip refers to to make it look active. + win->SetFocus(); + + wxRichToolTipPopup* const popup = new wxRichToolTipPopup + ( + win, + m_title, + m_message, + m_icon, + m_tipKind, + m_titleFont + ); + + popup->SetBackgroundColours(m_colStart, m_colEnd); + + popup->SetPosition(rect); + // show or start the timer to delay showing the popup + popup->SetTimeoutAndShow( m_timeout, m_delay ); +} + +// Currently only wxMSW provides a native implementation. +#ifndef __WXMSW__ + +/* static */ +wxRichToolTipImpl* +wxRichToolTipImpl::Create(const wxString& title, const wxString& message) +{ + return new wxRichToolTipGenericImpl(title, message); +} + +#endif // !__WXMSW__ + +#endif // wxUSE_RICHTOOLTIP diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/sashwin.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/sashwin.cpp new file mode 100644 index 0000000000..a26595a652 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/sashwin.cpp @@ -0,0 +1,707 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/sashwin.cpp +// Purpose: wxSashWindow implementation. A sash window has an optional +// sash on each edge, allowing it to be dragged. An event +// is generated when the sash is released. +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SASH + +#include "wx/sashwin.h" + +#ifndef WX_PRECOMP + #include "wx/dialog.h" + #include "wx/frame.h" + #include "wx/settings.h" + #include "wx/dcclient.h" + #include "wx/dcscreen.h" + #include "wx/math.h" +#endif + +#include + +#include "wx/laywin.h" + +wxDEFINE_EVENT( wxEVT_SASH_DRAGGED, wxSashEvent ); + +IMPLEMENT_DYNAMIC_CLASS(wxSashWindow, wxWindow) +IMPLEMENT_DYNAMIC_CLASS(wxSashEvent, wxCommandEvent) + +BEGIN_EVENT_TABLE(wxSashWindow, wxWindow) + EVT_PAINT(wxSashWindow::OnPaint) + EVT_SIZE(wxSashWindow::OnSize) + EVT_MOUSE_EVENTS(wxSashWindow::OnMouseEvent) +#if defined( __WXMSW__ ) || defined( __WXMAC__) + EVT_SET_CURSOR(wxSashWindow::OnSetCursor) +#endif // __WXMSW__ || __WXMAC__ + +END_EVENT_TABLE() + +bool wxSashWindow::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, + const wxSize& size, long style, const wxString& name) +{ + return wxWindow::Create(parent, id, pos, size, style, name); +} + +wxSashWindow::~wxSashWindow() +{ + delete m_sashCursorWE; + delete m_sashCursorNS; +} + +void wxSashWindow::Init() +{ + m_draggingEdge = wxSASH_NONE; + m_dragMode = wxSASH_DRAG_NONE; + m_oldX = 0; + m_oldY = 0; + m_firstX = 0; + m_firstY = 0; + m_borderSize = 3; + m_extraBorderSize = 0; + m_minimumPaneSizeX = 0; + m_minimumPaneSizeY = 0; + m_maximumPaneSizeX = 10000; + m_maximumPaneSizeY = 10000; + m_sashCursorWE = new wxCursor(wxCURSOR_SIZEWE); + m_sashCursorNS = new wxCursor(wxCURSOR_SIZENS); + m_mouseCaptured = false; + m_currentCursor = NULL; + + // Eventually, we'll respond to colour change messages + InitColours(); +} + +void wxSashWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + + DrawBorders(dc); + DrawSashes(dc); +} + +void wxSashWindow::OnMouseEvent(wxMouseEvent& event) +{ + wxCoord x = 0, y = 0; + event.GetPosition(&x, &y); + + wxSashEdgePosition sashHit = SashHitTest(x, y); + + if (event.LeftDown()) + { + CaptureMouse(); + m_mouseCaptured = true; + + if ( sashHit != wxSASH_NONE ) + { + // Required for X to specify that + // that we wish to draw on top of all windows + // - and we optimise by specifying the area + // for creating the overlap window. + // Find the first frame or dialog and use this to specify + // the area to draw on. + wxWindow* parent = this; + + while (parent && !wxDynamicCast(parent, wxDialog) && + !wxDynamicCast(parent, wxFrame)) + parent = parent->GetParent(); + + wxScreenDC::StartDrawingOnTop(parent); + + // We don't say we're dragging yet; we leave that + // decision for the Dragging() branch, to ensure + // the user has dragged a little bit. + m_dragMode = wxSASH_DRAG_LEFT_DOWN; + m_draggingEdge = sashHit; + m_firstX = x; + m_firstY = y; + + if ( (sashHit == wxSASH_LEFT) || (sashHit == wxSASH_RIGHT) ) + { + if (m_currentCursor != m_sashCursorWE) + { + SetCursor(*m_sashCursorWE); + } + m_currentCursor = m_sashCursorWE; + } + else + { + if (m_currentCursor != m_sashCursorNS) + { + SetCursor(*m_sashCursorNS); + } + m_currentCursor = m_sashCursorNS; + } + } + } + else if ( event.LeftUp() && m_dragMode == wxSASH_DRAG_LEFT_DOWN ) + { + // Wasn't a proper drag + if (m_mouseCaptured) + ReleaseMouse(); + m_mouseCaptured = false; + + wxScreenDC::EndDrawingOnTop(); + m_dragMode = wxSASH_DRAG_NONE; + m_draggingEdge = wxSASH_NONE; + } + else if (event.LeftUp() && m_dragMode == wxSASH_DRAG_DRAGGING) + { + // We can stop dragging now and see what we've got. + m_dragMode = wxSASH_DRAG_NONE; + if (m_mouseCaptured) + ReleaseMouse(); + m_mouseCaptured = false; + + // Erase old tracker + DrawSashTracker(m_draggingEdge, m_oldX, m_oldY); + + // End drawing on top (frees the window used for drawing + // over the screen) + wxScreenDC::EndDrawingOnTop(); + + int w, h; + GetSize(&w, &h); + int xp, yp; + GetPosition(&xp, &yp); + + wxSashEdgePosition edge = m_draggingEdge; + m_draggingEdge = wxSASH_NONE; + + wxRect dragRect; + wxSashDragStatus status = wxSASH_STATUS_OK; + + // the new height and width of the window - if -1, it didn't change + int newHeight = wxDefaultCoord, + newWidth = wxDefaultCoord; + + // NB: x and y may be negative and they're relative to the sash window + // upper left corner, while xp and yp are expressed in the parent + // window system of coordinates, so adjust them! After this + // adjustment, all coordinates are relative to the parent window. + y += yp; + x += xp; + + switch (edge) + { + case wxSASH_TOP: + if ( y > yp + h ) + { + // top sash shouldn't get below the bottom one + status = wxSASH_STATUS_OUT_OF_RANGE; + } + else + { + newHeight = h - (y - yp); + } + break; + + case wxSASH_BOTTOM: + if ( y < yp ) + { + // bottom sash shouldn't get above the top one + status = wxSASH_STATUS_OUT_OF_RANGE; + } + else + { + newHeight = y - yp; + } + break; + + case wxSASH_LEFT: + if ( x > xp + w ) + { + // left sash shouldn't get beyond the right one + status = wxSASH_STATUS_OUT_OF_RANGE; + } + else + { + newWidth = w - (x - xp); + } + break; + + case wxSASH_RIGHT: + if ( x < xp ) + { + // and the right sash, finally, shouldn't be beyond the + // left one + status = wxSASH_STATUS_OUT_OF_RANGE; + } + else + { + newWidth = x - xp; + } + break; + + case wxSASH_NONE: + // can this happen at all? + break; + } + + if ( newHeight == wxDefaultCoord ) + { + // didn't change + newHeight = h; + } + else + { + // make sure it's in m_minimumPaneSizeY..m_maximumPaneSizeY range + newHeight = wxMax(newHeight, m_minimumPaneSizeY); + newHeight = wxMin(newHeight, m_maximumPaneSizeY); + } + + if ( newWidth == wxDefaultCoord ) + { + // didn't change + newWidth = w; + } + else + { + // make sure it's in m_minimumPaneSizeY..m_maximumPaneSizeY range + newWidth = wxMax(newWidth, m_minimumPaneSizeX); + newWidth = wxMin(newWidth, m_maximumPaneSizeX); + } + + dragRect = wxRect(x, y, newWidth, newHeight); + + wxSashEvent eventSash(GetId(), edge); + eventSash.SetEventObject(this); + eventSash.SetDragStatus(status); + eventSash.SetDragRect(dragRect); + GetEventHandler()->ProcessEvent(eventSash); + } + else if ( event.LeftUp() ) + { + if (m_mouseCaptured) + ReleaseMouse(); + m_mouseCaptured = false; + } + else if ((event.Moving() || event.Leaving()) && !event.Dragging()) + { + // Just change the cursor if required + if ( sashHit != wxSASH_NONE ) + { + if ( (sashHit == wxSASH_LEFT) || (sashHit == wxSASH_RIGHT) ) + { + if (m_currentCursor != m_sashCursorWE) + { + SetCursor(*m_sashCursorWE); + } + m_currentCursor = m_sashCursorWE; + } + else + { + if (m_currentCursor != m_sashCursorNS) + { + SetCursor(*m_sashCursorNS); + } + m_currentCursor = m_sashCursorNS; + } + } + else + { + SetCursor(wxNullCursor); + m_currentCursor = NULL; + } + } + else if ( event.Dragging() && + ((m_dragMode == wxSASH_DRAG_DRAGGING) || + (m_dragMode == wxSASH_DRAG_LEFT_DOWN)) ) + { + if ( (m_draggingEdge == wxSASH_LEFT) || (m_draggingEdge == wxSASH_RIGHT) ) + { + if (m_currentCursor != m_sashCursorWE) + { + SetCursor(*m_sashCursorWE); + } + m_currentCursor = m_sashCursorWE; + } + else + { + if (m_currentCursor != m_sashCursorNS) + { + SetCursor(*m_sashCursorNS); + } + m_currentCursor = m_sashCursorNS; + } + + if (m_dragMode == wxSASH_DRAG_LEFT_DOWN) + { + m_dragMode = wxSASH_DRAG_DRAGGING; + DrawSashTracker(m_draggingEdge, x, y); + } + else + { + if ( m_dragMode == wxSASH_DRAG_DRAGGING ) + { + // Erase old tracker + DrawSashTracker(m_draggingEdge, m_oldX, m_oldY); + + // Draw new one + DrawSashTracker(m_draggingEdge, x, y); + } + } + m_oldX = x; + m_oldY = y; + } + else if ( event.LeftDClick() ) + { + // Nothing + } + else + { + } +} + +void wxSashWindow::OnSize(wxSizeEvent& WXUNUSED(event)) +{ + SizeWindows(); +} + +wxSashEdgePosition wxSashWindow::SashHitTest(int x, int y, int WXUNUSED(tolerance)) +{ + int cx, cy; + GetClientSize(& cx, & cy); + + int i; + for (i = 0; i < 4; i++) + { + wxSashEdge& edge = m_sashes[i]; + wxSashEdgePosition position = (wxSashEdgePosition) i ; + + if (edge.m_show) + { + switch (position) + { + case wxSASH_TOP: + { + if (y >= 0 && y <= GetEdgeMargin(position)) + return wxSASH_TOP; + break; + } + case wxSASH_RIGHT: + { + if ((x >= cx - GetEdgeMargin(position)) && (x <= cx)) + return wxSASH_RIGHT; + break; + } + case wxSASH_BOTTOM: + { + if ((y >= cy - GetEdgeMargin(position)) && (y <= cy)) + return wxSASH_BOTTOM; + break; + } + case wxSASH_LEFT: + { + if ((x <= GetEdgeMargin(position)) && (x >= 0)) + return wxSASH_LEFT; + break; + } + case wxSASH_NONE: + { + break; + } + } + } + } + return wxSASH_NONE; +} + +// Draw 3D effect borders +void wxSashWindow::DrawBorders(wxDC& dc) +{ + int w, h; + GetClientSize(&w, &h); + + wxPen mediumShadowPen(m_mediumShadowColour, 1, wxPENSTYLE_SOLID); + wxPen darkShadowPen(m_darkShadowColour, 1, wxPENSTYLE_SOLID); + wxPen lightShadowPen(m_lightShadowColour, 1, wxPENSTYLE_SOLID); + wxPen hilightPen(m_hilightColour, 1, wxPENSTYLE_SOLID); + + if ( GetWindowStyleFlag() & wxSW_3DBORDER ) + { + dc.SetPen(mediumShadowPen); + dc.DrawLine(0, 0, w-1, 0); + dc.DrawLine(0, 0, 0, h - 1); + + dc.SetPen(darkShadowPen); + dc.DrawLine(1, 1, w-2, 1); + dc.DrawLine(1, 1, 1, h-2); + + dc.SetPen(hilightPen); + dc.DrawLine(0, h-1, w-1, h-1); + dc.DrawLine(w-1, 0, w-1, h); // Surely the maximum y pos. should be h - 1. + /// Anyway, h is required for MSW. + + dc.SetPen(lightShadowPen); + dc.DrawLine(w-2, 1, w-2, h-2); // Right hand side + dc.DrawLine(1, h-2, w-1, h-2); // Bottom + } + else if ( GetWindowStyleFlag() & wxSW_BORDER ) + { + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.SetPen(*wxBLACK_PEN); + dc.DrawRectangle(0, 0, w-1, h-1); + } + + dc.SetPen(wxNullPen); + dc.SetBrush(wxNullBrush); +} + +void wxSashWindow::DrawSashes(wxDC& dc) +{ + int i; + for (i = 0; i < 4; i++) + if (m_sashes[i].m_show) + DrawSash((wxSashEdgePosition) i, dc); +} + +// Draw the sash +void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc) +{ + int w, h; + GetClientSize(&w, &h); + + wxPen facePen(m_faceColour, 1, wxPENSTYLE_SOLID); + wxBrush faceBrush(m_faceColour, wxBRUSHSTYLE_SOLID); + wxPen mediumShadowPen(m_mediumShadowColour, 1, wxPENSTYLE_SOLID); + wxPen darkShadowPen(m_darkShadowColour, 1, wxPENSTYLE_SOLID); + wxPen lightShadowPen(m_lightShadowColour, 1, wxPENSTYLE_SOLID); + wxPen hilightPen(m_hilightColour, 1, wxPENSTYLE_SOLID); + wxColour blackClr(0, 0, 0); + wxColour whiteClr(255, 255, 255); + wxPen blackPen(blackClr, 1, wxPENSTYLE_SOLID); + wxPen whitePen(whiteClr, 1, wxPENSTYLE_SOLID); + + if ( edge == wxSASH_LEFT || edge == wxSASH_RIGHT ) + { + int sashPosition = (edge == wxSASH_LEFT) ? 0 : ( w - GetEdgeMargin(edge) ); + + dc.SetPen(facePen); + dc.SetBrush(faceBrush); + dc.DrawRectangle(sashPosition, 0, GetEdgeMargin(edge), h); + + if (GetWindowStyleFlag() & wxSW_3DSASH) + { + if (edge == wxSASH_LEFT) + { + // Draw a dark grey line on the left to indicate that the + // sash is raised + dc.SetPen(mediumShadowPen); + dc.DrawLine(GetEdgeMargin(edge), 0, GetEdgeMargin(edge), h); + } + else + { + // Draw a highlight line on the right to indicate that the + // sash is raised + dc.SetPen(hilightPen); + dc.DrawLine(w - GetEdgeMargin(edge), 0, w - GetEdgeMargin(edge), h); + } + } + } + else // top or bottom + { + int sashPosition = (edge == wxSASH_TOP) ? 0 : ( h - GetEdgeMargin(edge) ); + + dc.SetPen(facePen); + dc.SetBrush(faceBrush); + dc.DrawRectangle(0, sashPosition, w, GetEdgeMargin(edge)); + + if (GetWindowStyleFlag() & wxSW_3DSASH) + { + if (edge == wxSASH_BOTTOM) + { + // Draw a highlight line on the bottom to indicate that the + // sash is raised + dc.SetPen(hilightPen); + dc.DrawLine(0, h - GetEdgeMargin(edge), w, h - GetEdgeMargin(edge)); + } + else + { + // Draw a drak grey line on the top to indicate that the + // sash is raised + dc.SetPen(mediumShadowPen); + dc.DrawLine(1, GetEdgeMargin(edge), w-1, GetEdgeMargin(edge)); + } + } + } + + dc.SetPen(wxNullPen); + dc.SetBrush(wxNullBrush); +} + +// Draw the sash tracker (for whilst moving the sash) +void wxSashWindow::DrawSashTracker(wxSashEdgePosition edge, int x, int y) +{ + int w, h; + GetClientSize(&w, &h); + + wxScreenDC screenDC; + int x1, y1; + int x2, y2; + + if ( edge == wxSASH_LEFT || edge == wxSASH_RIGHT ) + { + x1 = x; y1 = 2; + x2 = x; y2 = h-2; + + if ( (edge == wxSASH_LEFT) && (x1 > w) ) + { + x1 = w; x2 = w; + } + else if ( (edge == wxSASH_RIGHT) && (x1 < 0) ) + { + x1 = 0; x2 = 0; + } + } + else + { + x1 = 2; y1 = y; + x2 = w-2; y2 = y; + + if ( (edge == wxSASH_TOP) && (y1 > h) ) + { + y1 = h; + y2 = h; + } + else if ( (edge == wxSASH_BOTTOM) && (y1 < 0) ) + { + y1 = 0; + y2 = 0; + } + } + + ClientToScreen(&x1, &y1); + ClientToScreen(&x2, &y2); + + wxPen sashTrackerPen(*wxBLACK, 2, wxPENSTYLE_SOLID); + + screenDC.SetLogicalFunction(wxINVERT); + screenDC.SetPen(sashTrackerPen); + screenDC.SetBrush(*wxTRANSPARENT_BRUSH); + + screenDC.DrawLine(x1, y1, x2, y2); + + screenDC.SetLogicalFunction(wxCOPY); + + screenDC.SetPen(wxNullPen); + screenDC.SetBrush(wxNullBrush); +} + +// Position and size subwindows. +// Note that the border size applies to each subwindow, not +// including the edges next to the sash. +void wxSashWindow::SizeWindows() +{ + int cw, ch; + GetClientSize(&cw, &ch); + + if (GetChildren().GetCount() == 1) + { + wxWindow* child = GetChildren().GetFirst()->GetData(); + + int x = 0; + int y = 0; + int width = cw; + int height = ch; + + // Top + if (m_sashes[0].m_show) + { + y = m_borderSize; + height -= m_borderSize; + } + y += m_extraBorderSize; + + // Left + if (m_sashes[3].m_show) + { + x = m_borderSize; + width -= m_borderSize; + } + x += m_extraBorderSize; + + // Right + if (m_sashes[1].m_show) + { + width -= m_borderSize; + } + width -= 2*m_extraBorderSize; + + // Bottom + if (m_sashes[2].m_show) + { + height -= m_borderSize; + } + height -= 2*m_extraBorderSize; + + child->SetSize(x, y, width, height); + } + else if (GetChildren().GetCount() > 1) + { + // Perhaps multiple children are themselves sash windows. + // TODO: this doesn't really work because the subwindows sizes/positions + // must be set to leave a gap for the parent's sash (hit-test and decorations). + // Perhaps we can allow for this within LayoutWindow, testing whether the parent + // is a sash window, and if so, allowing some space for the edges. + wxLayoutAlgorithm layout; + layout.LayoutWindow(this); + } + + wxClientDC dc(this); + DrawBorders(dc); + DrawSashes(dc); +} + +// Initialize colours +void wxSashWindow::InitColours() +{ + // Shadow colours + m_faceColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); + m_mediumShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW); + m_darkShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW); + m_lightShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT); + m_hilightColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT); +} + +void wxSashWindow::SetSashVisible(wxSashEdgePosition edge, bool sash) +{ + m_sashes[edge].m_show = sash; + if (sash) + m_sashes[edge].m_margin = m_borderSize; + else + m_sashes[edge].m_margin = 0; +} + +#if defined( __WXMSW__ ) || defined( __WXMAC__) + +// this is currently called (and needed) under MSW only... +void wxSashWindow::OnSetCursor(wxSetCursorEvent& event) +{ + // if we don't do it, the resizing cursor might be set for child window: + // and like this we explicitly say that our cursor should not be used for + // children windows which overlap us + + if ( SashHitTest(event.GetX(), event.GetY()) != wxSASH_NONE) + { + // default processing is ok + event.Skip(); + } + //else: do nothing, in particular, don't call Skip() +} + +#endif // __WXMSW__ || __WXMAC__ + +#endif // wxUSE_SASH diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/scrlwing.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/scrlwing.cpp new file mode 100644 index 0000000000..6291815209 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/scrlwing.cpp @@ -0,0 +1,1568 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/scrlwing.cpp +// Purpose: wxScrolledWindow implementation +// Author: Julian Smart +// Modified by: Vadim Zeitlin on 31.08.00: wxScrollHelper allows to implement. +// Ron Lee on 10.4.02: virtual size / auto scrollbars et al. +// Created: 01/02/97 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/scrolwin.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/panel.h" + #include "wx/dcclient.h" + #include "wx/timer.h" + #include "wx/sizer.h" + #include "wx/settings.h" +#endif + +#ifdef __WXMAC__ +#include "wx/scrolbar.h" +#endif + +#include "wx/recguard.h" + +#ifdef __WXMSW__ + #include // for DLGC_WANTARROWS + #include "wx/msw/winundef.h" +#endif + +#ifdef __WXMOTIF__ +// For wxRETAINED implementation +#ifdef __VMS__ //VMS's Xm.h is not (yet) compatible with C++ + //This code switches off the compiler warnings +# pragma message disable nosimpint +#endif +#include +#ifdef __VMS__ +# pragma message enable nosimpint +#endif +#endif + +/* + TODO PROPERTIES + style wxHSCROLL | wxVSCROLL +*/ + +// ---------------------------------------------------------------------------- +// wxScrollHelperEvtHandler: intercept the events from the window and forward +// them to wxScrollHelper +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxScrollHelperEvtHandler : public wxEvtHandler +{ +public: + wxScrollHelperEvtHandler(wxScrollHelperBase *scrollHelper) + { + m_scrollHelper = scrollHelper; + } + + virtual bool ProcessEvent(wxEvent& event); + +private: + wxScrollHelperBase *m_scrollHelper; + + wxDECLARE_NO_COPY_CLASS(wxScrollHelperEvtHandler); +}; + +#if wxUSE_TIMER +// ---------------------------------------------------------------------------- +// wxAutoScrollTimer: the timer used to generate a stream of scroll events when +// a captured mouse is held outside the window +// ---------------------------------------------------------------------------- + +class wxAutoScrollTimer : public wxTimer +{ +public: + wxAutoScrollTimer(wxWindow *winToScroll, + wxScrollHelperBase *scroll, + wxEventType eventTypeToSend, + int pos, int orient); + + virtual void Notify(); + +private: + wxWindow *m_win; + wxScrollHelperBase *m_scrollHelper; + wxEventType m_eventType; + int m_pos, + m_orient; + + wxDECLARE_NO_COPY_CLASS(wxAutoScrollTimer); +}; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxAutoScrollTimer +// ---------------------------------------------------------------------------- + +wxAutoScrollTimer::wxAutoScrollTimer(wxWindow *winToScroll, + wxScrollHelperBase *scroll, + wxEventType eventTypeToSend, + int pos, int orient) +{ + m_win = winToScroll; + m_scrollHelper = scroll; + m_eventType = eventTypeToSend; + m_pos = pos; + m_orient = orient; +} + +void wxAutoScrollTimer::Notify() +{ + // only do all this as long as the window is capturing the mouse + if ( wxWindow::GetCapture() != m_win ) + { + Stop(); + } + else // we still capture the mouse, continue generating events + { + // first scroll the window if we are allowed to do it + wxScrollWinEvent event1(m_eventType, m_pos, m_orient); + event1.SetEventObject(m_win); + event1.SetId(m_win->GetId()); + if ( m_scrollHelper->SendAutoScrollEvents(event1) && + m_win->GetEventHandler()->ProcessEvent(event1) ) + { + // and then send a pseudo mouse-move event to refresh the selection + wxMouseEvent event2(wxEVT_MOTION); + event2.SetPosition(wxGetMousePosition()); + + // the mouse event coordinates should be client, not screen as + // returned by wxGetMousePosition + wxWindow *parentTop = m_win; + while ( parentTop->GetParent() ) + parentTop = parentTop->GetParent(); + wxPoint ptOrig = parentTop->GetPosition(); + event2.m_x -= ptOrig.x; + event2.m_y -= ptOrig.y; + + event2.SetEventObject(m_win); + + wxMouseState mouseState = wxGetMouseState(); + + event2.m_leftDown = mouseState.LeftIsDown(); + event2.m_middleDown = mouseState.MiddleIsDown(); + event2.m_rightDown = mouseState.RightIsDown(); + + event2.m_shiftDown = mouseState.ShiftDown(); + event2.m_controlDown = mouseState.ControlDown(); + event2.m_altDown = mouseState.AltDown(); + event2.m_metaDown = mouseState.MetaDown(); + + m_win->GetEventHandler()->ProcessEvent(event2); + } + else // can't scroll further, stop + { + Stop(); + } + } +} +#endif + +// ---------------------------------------------------------------------------- +// wxScrollHelperEvtHandler +// ---------------------------------------------------------------------------- + +// Notice that this method is currently duplicated in the method with the same +// name in wxVarScrollHelperEvtHandler class, until this is fixed, the other +// copy of the method needs to be modified every time this version is. +bool wxScrollHelperEvtHandler::ProcessEvent(wxEvent& event) +{ + wxEventType evType = event.GetEventType(); + + // Pass it on to the real handler: notice that we must not call + // ProcessEvent() on this object itself as it wouldn't pass it to the next + // handler (i.e. the real window) if we're called from a previous handler + // (as indicated by "process here only" flag being set) and we do want to + // execute the handler defined in the window we're associated with right + // now, without waiting until TryAfter() is called from wxEvtHandler. + bool processed = m_nextHandler->ProcessEvent(event); + + // always process the size events ourselves, even if the user code handles + // them as well, as we need to AdjustScrollbars() + // + // NB: it is important to do it after processing the event in the normal + // way as HandleOnSize() may generate a wxEVT_SIZE itself if the + // scrollbar[s] (dis)appear and it should be seen by the user code + // after this one + if ( evType == wxEVT_SIZE ) + { + m_scrollHelper->HandleOnSize((wxSizeEvent &)event); + return true; + } + + if ( processed && event.IsCommandEvent()) + return true; + + // For wxEVT_PAINT the user code can either handle this event as usual or + // override virtual OnDraw(), so if the event hasn't been handled we need + // to call this virtual function ourselves. + if ( +#ifndef __WXUNIVERSAL__ + // in wxUniversal "processed" will always be true, because + // all windows use the paint event to draw themselves. + // In this case we can't use this flag to determine if a custom + // paint event handler already drew our window and we just + // call OnDraw() anyway. + !processed && +#endif // !__WXUNIVERSAL__ + evType == wxEVT_PAINT ) + { + m_scrollHelper->HandleOnPaint((wxPaintEvent &)event); + return true; + } + + if ( evType == wxEVT_CHILD_FOCUS ) + { + m_scrollHelper->HandleOnChildFocus((wxChildFocusEvent &)event); + return true; + } + + // reset the skipped flag (which might have been set to true in + // ProcessEvent() above) to be able to test it below + bool wasSkipped = event.GetSkipped(); + if ( wasSkipped ) + event.Skip(false); + + if ( evType == wxEVT_SCROLLWIN_TOP || + evType == wxEVT_SCROLLWIN_BOTTOM || + evType == wxEVT_SCROLLWIN_LINEUP || + evType == wxEVT_SCROLLWIN_LINEDOWN || + evType == wxEVT_SCROLLWIN_PAGEUP || + evType == wxEVT_SCROLLWIN_PAGEDOWN || + evType == wxEVT_SCROLLWIN_THUMBTRACK || + evType == wxEVT_SCROLLWIN_THUMBRELEASE ) + { + m_scrollHelper->HandleOnScroll((wxScrollWinEvent &)event); + if ( !event.GetSkipped() ) + { + // it makes sense to indicate that we processed the message as we + // did scroll the window (and also notice that wxAutoScrollTimer + // relies on our return value to stop scrolling when we are at top + // or bottom already) + processed = true; + wasSkipped = false; + } + } + + if ( evType == wxEVT_ENTER_WINDOW ) + { + m_scrollHelper->HandleOnMouseEnter((wxMouseEvent &)event); + } + else if ( evType == wxEVT_LEAVE_WINDOW ) + { + m_scrollHelper->HandleOnMouseLeave((wxMouseEvent &)event); + } +#if wxUSE_MOUSEWHEEL + // Use GTK's own scroll wheel handling in GtkScrolledWindow +#ifndef __WXGTK20__ + else if ( evType == wxEVT_MOUSEWHEEL ) + { + m_scrollHelper->HandleOnMouseWheel((wxMouseEvent &)event); + return true; + } +#endif +#endif // wxUSE_MOUSEWHEEL + else if ( evType == wxEVT_CHAR ) + { + m_scrollHelper->HandleOnChar((wxKeyEvent &)event); + if ( !event.GetSkipped() ) + { + processed = true; + wasSkipped = false; + } + } + + event.Skip(wasSkipped); + + // We called ProcessEvent() on the next handler, meaning that we explicitly + // worked around the request to process the event in this handler only. As + // explained above, this is unfortunately really necessary but the trouble + // is that the event will continue to be post-processed by the previous + // handler resulting in duplicate calls to event handlers. Call the special + // function below to prevent this from happening, base class DoTryChain() + // will check for it and behave accordingly. + // + // And if we're not called from DoTryChain(), this won't do anything anyhow. + event.DidntHonourProcessOnlyIn(); + + return processed; +} + +// ============================================================================ +// wxAnyScrollHelperBase and wxScrollHelperBase implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxAnyScrollHelperBase +// ---------------------------------------------------------------------------- + +wxAnyScrollHelperBase::wxAnyScrollHelperBase(wxWindow* win) +{ + wxASSERT_MSG( win, wxT("associated window can't be NULL in wxScrollHelper") ); + + m_win = win; + m_targetWindow = NULL; + + m_kbdScrollingEnabled = true; +} + +// ---------------------------------------------------------------------------- +// wxScrollHelperBase construction +// ---------------------------------------------------------------------------- + +wxScrollHelperBase::wxScrollHelperBase(wxWindow *win) + : wxAnyScrollHelperBase(win) +{ + m_xScrollPixelsPerLine = + m_yScrollPixelsPerLine = + m_xScrollPosition = + m_yScrollPosition = + m_xScrollLines = + m_yScrollLines = + m_xScrollLinesPerPage = + m_yScrollLinesPerPage = 0; + + m_xScrollingEnabled = + m_yScrollingEnabled = true; + + m_scaleX = + m_scaleY = 1.0; +#if wxUSE_MOUSEWHEEL + m_wheelRotation = 0; +#endif + + m_timerAutoScroll = NULL; + + m_handler = NULL; + + m_win->SetScrollHelper(static_cast(this)); + + // by default, the associated window is also the target window + DoSetTargetWindow(win); +} + +wxScrollHelperBase::~wxScrollHelperBase() +{ + StopAutoScrolling(); + + DeleteEvtHandler(); +} + +// ---------------------------------------------------------------------------- +// setting scrolling parameters +// ---------------------------------------------------------------------------- + +void wxScrollHelperBase::SetScrollbars(int pixelsPerUnitX, + int pixelsPerUnitY, + int noUnitsX, + int noUnitsY, + int xPos, + int yPos, + bool noRefresh) +{ + // Convert positions expressed in scroll units to positions in pixels. + int xPosInPixels = (xPos + m_xScrollPosition)*m_xScrollPixelsPerLine, + yPosInPixels = (yPos + m_yScrollPosition)*m_yScrollPixelsPerLine; + + bool do_refresh = + ( + (noUnitsX != 0 && m_xScrollLines == 0) || + (noUnitsX < m_xScrollLines && xPosInPixels > pixelsPerUnitX * noUnitsX) || + + (noUnitsY != 0 && m_yScrollLines == 0) || + (noUnitsY < m_yScrollLines && yPosInPixels > pixelsPerUnitY * noUnitsY) || + (xPos != m_xScrollPosition) || + (yPos != m_yScrollPosition) + ); + + m_xScrollPixelsPerLine = pixelsPerUnitX; + m_yScrollPixelsPerLine = pixelsPerUnitY; + m_xScrollPosition = xPos; + m_yScrollPosition = yPos; + + int w = noUnitsX * pixelsPerUnitX; + int h = noUnitsY * pixelsPerUnitY; + + // For better backward compatibility we set persisting limits + // here not just the size. It makes SetScrollbars 'sticky' + // emulating the old non-autoscroll behaviour. + // m_targetWindow->SetVirtualSizeHints( w, h ); + + // The above should arguably be deprecated, this however we still need. + + // take care not to set 0 virtual size, 0 means that we don't have any + // scrollbars and hence we should use the real size instead of the virtual + // one which is indicated by using wxDefaultCoord + m_targetWindow->SetVirtualSize( w ? w : wxDefaultCoord, + h ? h : wxDefaultCoord); + + if (do_refresh && !noRefresh) + m_targetWindow->Refresh(true, GetScrollRect()); + +#ifndef __WXUNIVERSAL__ + // If the target is not the same as the window with the scrollbars, + // then we need to update the scrollbars here, since they won't have + // been updated by SetVirtualSize(). + if ( m_targetWindow != m_win ) +#endif // !__WXUNIVERSAL__ + { + AdjustScrollbars(); + } +#ifndef __WXUNIVERSAL__ + else + { + // otherwise this has been done by AdjustScrollbars, above + } +#endif // !__WXUNIVERSAL__ +} + +// ---------------------------------------------------------------------------- +// [target] window handling +// ---------------------------------------------------------------------------- + +void wxScrollHelperBase::DeleteEvtHandler() +{ + // search for m_handler in the handler list + if ( m_win && m_handler ) + { + if ( m_win->RemoveEventHandler(m_handler) ) + { + delete m_handler; + } + //else: something is very wrong, so better [maybe] leak memory than + // risk a crash because of double deletion + + m_handler = NULL; + } +} + +void wxScrollHelperBase::DoSetTargetWindow(wxWindow *target) +{ + m_targetWindow = target; +#ifdef __WXMAC__ + target->MacSetClipChildren( true ) ; +#endif + + // install the event handler which will intercept the events we're + // interested in (but only do it for our real window, not the target window + // which we scroll - we don't need to hijack its events) + if ( m_targetWindow == m_win ) + { + // if we already have a handler, delete it first + DeleteEvtHandler(); + + m_handler = new wxScrollHelperEvtHandler(this); + m_targetWindow->PushEventHandler(m_handler); + } +} + +void wxScrollHelperBase::SetTargetWindow(wxWindow *target) +{ + wxCHECK_RET( target, wxT("target window must not be NULL") ); + + if ( target == m_targetWindow ) + return; + + DoSetTargetWindow(target); +} + +// ---------------------------------------------------------------------------- +// scrolling implementation itself +// ---------------------------------------------------------------------------- + +void wxScrollHelperBase::HandleOnScroll(wxScrollWinEvent& event) +{ + int nScrollInc = CalcScrollInc(event); + if ( nScrollInc == 0 ) + { + // can't scroll further + event.Skip(); + + return; + } + + bool needsRefresh = false; + int dx = 0, + dy = 0; + int orient = event.GetOrientation(); + if (orient == wxHORIZONTAL) + { + if ( m_xScrollingEnabled ) + { + dx = -m_xScrollPixelsPerLine * nScrollInc; + } + else + { + needsRefresh = true; + } + } + else + { + if ( m_yScrollingEnabled ) + { + dy = -m_yScrollPixelsPerLine * nScrollInc; + } + else + { + needsRefresh = true; + } + } + + if ( !needsRefresh ) + { + // flush all pending repaints before we change m_{x,y}ScrollPosition, as + // otherwise invalidated area could be updated incorrectly later when + // ScrollWindow() makes sure they're repainted before scrolling them +#ifdef __WXMAC__ + // wxWindowMac is taking care of making sure the update area is correctly + // set up, while not forcing an immediate redraw +#else + m_targetWindow->Update(); +#endif + } + + if (orient == wxHORIZONTAL) + { + m_xScrollPosition += nScrollInc; + m_win->SetScrollPos(wxHORIZONTAL, m_xScrollPosition); + } + else + { + m_yScrollPosition += nScrollInc; + m_win->SetScrollPos(wxVERTICAL, m_yScrollPosition); + } + + if ( needsRefresh ) + { + m_targetWindow->Refresh(true, GetScrollRect()); + } + else + { + m_targetWindow->ScrollWindow(dx, dy, GetScrollRect()); + } +} + +int wxScrollHelperBase::CalcScrollInc(wxScrollWinEvent& event) +{ + int pos = event.GetPosition(); + int orient = event.GetOrientation(); + + int nScrollInc = 0; + if (event.GetEventType() == wxEVT_SCROLLWIN_TOP) + { + if (orient == wxHORIZONTAL) + nScrollInc = - m_xScrollPosition; + else + nScrollInc = - m_yScrollPosition; + } else + if (event.GetEventType() == wxEVT_SCROLLWIN_BOTTOM) + { + if (orient == wxHORIZONTAL) + nScrollInc = m_xScrollLines - m_xScrollPosition; + else + nScrollInc = m_yScrollLines - m_yScrollPosition; + } else + if (event.GetEventType() == wxEVT_SCROLLWIN_LINEUP) + { + nScrollInc = -1; + } else + if (event.GetEventType() == wxEVT_SCROLLWIN_LINEDOWN) + { + nScrollInc = 1; + } else + if (event.GetEventType() == wxEVT_SCROLLWIN_PAGEUP) + { + if (orient == wxHORIZONTAL) + nScrollInc = -GetScrollPageSize(wxHORIZONTAL); + else + nScrollInc = -GetScrollPageSize(wxVERTICAL); + } else + if (event.GetEventType() == wxEVT_SCROLLWIN_PAGEDOWN) + { + if (orient == wxHORIZONTAL) + nScrollInc = GetScrollPageSize(wxHORIZONTAL); + else + nScrollInc = GetScrollPageSize(wxVERTICAL); + } else + if ((event.GetEventType() == wxEVT_SCROLLWIN_THUMBTRACK) || + (event.GetEventType() == wxEVT_SCROLLWIN_THUMBRELEASE)) + { + if (orient == wxHORIZONTAL) + nScrollInc = pos - m_xScrollPosition; + else + nScrollInc = pos - m_yScrollPosition; + } + + if (orient == wxHORIZONTAL) + { + if ( m_xScrollPosition + nScrollInc < 0 ) + { + // As -ve as we can go + nScrollInc = -m_xScrollPosition; + } + else // check for the other bound + { + const int posMax = m_xScrollLines - m_xScrollLinesPerPage; + if ( m_xScrollPosition + nScrollInc > posMax ) + { + // As +ve as we can go + nScrollInc = posMax - m_xScrollPosition; + } + } + } + else // wxVERTICAL + { + if ( m_yScrollPosition + nScrollInc < 0 ) + { + // As -ve as we can go + nScrollInc = -m_yScrollPosition; + } + else // check for the other bound + { + const int posMax = m_yScrollLines - m_yScrollLinesPerPage; + if ( m_yScrollPosition + nScrollInc > posMax ) + { + // As +ve as we can go + nScrollInc = posMax - m_yScrollPosition; + } + } + } + + return nScrollInc; +} + +void wxScrollHelperBase::DoPrepareDC(wxDC& dc) +{ + wxPoint pt = dc.GetDeviceOrigin(); +#ifdef __WXGTK__ + // It may actually be correct to always query + // the m_sign from the DC here, but I leave the + // #ifdef GTK for now. + if (m_win->GetLayoutDirection() == wxLayout_RightToLeft) + dc.SetDeviceOrigin( pt.x + m_xScrollPosition * m_xScrollPixelsPerLine, + pt.y - m_yScrollPosition * m_yScrollPixelsPerLine ); + else +#endif + dc.SetDeviceOrigin( pt.x - m_xScrollPosition * m_xScrollPixelsPerLine, + pt.y - m_yScrollPosition * m_yScrollPixelsPerLine ); + dc.SetUserScale( m_scaleX, m_scaleY ); +} + +void wxScrollHelperBase::SetScrollRate( int xstep, int ystep ) +{ + int old_x = m_xScrollPixelsPerLine * m_xScrollPosition; + int old_y = m_yScrollPixelsPerLine * m_yScrollPosition; + + m_xScrollPixelsPerLine = xstep; + m_yScrollPixelsPerLine = ystep; + + int new_x = m_xScrollPixelsPerLine * m_xScrollPosition; + int new_y = m_yScrollPixelsPerLine * m_yScrollPosition; + + m_win->SetScrollPos( wxHORIZONTAL, m_xScrollPosition ); + m_win->SetScrollPos( wxVERTICAL, m_yScrollPosition ); + m_targetWindow->ScrollWindow( old_x - new_x, old_y - new_y ); + + AdjustScrollbars(); +} + +void wxScrollHelperBase::GetScrollPixelsPerUnit (int *x_unit, int *y_unit) const +{ + if ( x_unit ) + *x_unit = m_xScrollPixelsPerLine; + if ( y_unit ) + *y_unit = m_yScrollPixelsPerLine; +} + + +int wxScrollHelperBase::GetScrollLines( int orient ) const +{ + if ( orient == wxHORIZONTAL ) + return m_xScrollLines; + else + return m_yScrollLines; +} + +int wxScrollHelperBase::GetScrollPageSize(int orient) const +{ + if ( orient == wxHORIZONTAL ) + return m_xScrollLinesPerPage; + else + return m_yScrollLinesPerPage; +} + +void wxScrollHelperBase::SetScrollPageSize(int orient, int pageSize) +{ + if ( orient == wxHORIZONTAL ) + m_xScrollLinesPerPage = pageSize; + else + m_yScrollLinesPerPage = pageSize; +} + +void wxScrollHelperBase::EnableScrolling (bool x_scroll, bool y_scroll) +{ + m_xScrollingEnabled = x_scroll; + m_yScrollingEnabled = y_scroll; +} + +// Where the current view starts from +void wxScrollHelperBase::DoGetViewStart (int *x, int *y) const +{ + if ( x ) + *x = m_xScrollPosition; + if ( y ) + *y = m_yScrollPosition; +} + +void wxScrollHelperBase::DoCalcScrolledPosition(int x, int y, + int *xx, int *yy) const +{ + if ( xx ) + *xx = x - m_xScrollPosition * m_xScrollPixelsPerLine; + if ( yy ) + *yy = y - m_yScrollPosition * m_yScrollPixelsPerLine; +} + +void wxScrollHelperBase::DoCalcUnscrolledPosition(int x, int y, + int *xx, int *yy) const +{ + if ( xx ) + *xx = x + m_xScrollPosition * m_xScrollPixelsPerLine; + if ( yy ) + *yy = y + m_yScrollPosition * m_yScrollPixelsPerLine; +} + +// ---------------------------------------------------------------------------- +// geometry +// ---------------------------------------------------------------------------- + +bool wxScrollHelperBase::ScrollLayout() +{ + if ( m_win->GetSizer() && m_targetWindow == m_win ) + { + // If we're the scroll target, take into account the + // virtual size and scrolled position of the window. + + int x = 0, y = 0, w = 0, h = 0; + CalcScrolledPosition(0,0, &x,&y); + m_win->GetVirtualSize(&w, &h); + m_win->GetSizer()->SetDimension(x, y, w, h); + return true; + } + + // fall back to default for LayoutConstraints + return m_win->wxWindow::Layout(); +} + +void wxScrollHelperBase::ScrollDoSetVirtualSize(int x, int y) +{ + m_win->wxWindow::DoSetVirtualSize( x, y ); + AdjustScrollbars(); + + if (m_win->GetAutoLayout()) + m_win->Layout(); +} + +// wxWindow's GetBestVirtualSize returns the actual window size, +// whereas we want to return the virtual size +wxSize wxScrollHelperBase::ScrollGetBestVirtualSize() const +{ + wxSize clientSize(m_win->GetClientSize()); + if ( m_win->GetSizer() ) + clientSize.IncTo(m_win->GetSizer()->CalcMin()); + + return clientSize; +} + +// ---------------------------------------------------------------------------- +// event handlers +// ---------------------------------------------------------------------------- + +// Default OnSize resets scrollbars, if any +void wxScrollHelperBase::HandleOnSize(wxSizeEvent& WXUNUSED(event)) +{ + if ( m_targetWindow->GetAutoLayout() ) + { + wxSize size = m_targetWindow->GetBestVirtualSize(); + + // This will call ::Layout() and ::AdjustScrollbars() + m_win->SetVirtualSize( size ); + } + else + { + AdjustScrollbars(); + } +} + +// This calls OnDraw, having adjusted the origin according to the current +// scroll position +void wxAnyScrollHelperBase::HandleOnPaint(wxPaintEvent& WXUNUSED(event)) +{ + // don't use m_targetWindow here, this is always called for ourselves + wxPaintDC dc(m_win); + DoPrepareDC(dc); + + OnDraw(dc); +} + +// kbd handling: notice that we use OnChar() and not OnKeyDown() for +// compatibility here - if we used OnKeyDown(), the programs which process +// arrows themselves in their OnChar() would never get the message and like +// this they always have the priority +void wxAnyScrollHelperBase::HandleOnChar(wxKeyEvent& event) +{ + if ( !m_kbdScrollingEnabled ) + { + event.Skip(); + return; + } + + // prepare the event this key press maps to + wxScrollWinEvent newEvent; + + newEvent.SetPosition(0); + newEvent.SetEventObject(m_win); + newEvent.SetId(m_win->GetId()); + + // this is the default, it's changed to wxHORIZONTAL below if needed + newEvent.SetOrientation(wxVERTICAL); + + // some key events result in scrolling in both horizontal and vertical + // direction, e.g. Ctrl-{Home,End}, if this flag is true we should generate + // a second event in horizontal direction in addition to the primary one + bool sendHorizontalToo = false; + + switch ( event.GetKeyCode() ) + { + case WXK_PAGEUP: + newEvent.SetEventType(wxEVT_SCROLLWIN_PAGEUP); + break; + + case WXK_PAGEDOWN: + newEvent.SetEventType(wxEVT_SCROLLWIN_PAGEDOWN); + break; + + case WXK_HOME: + newEvent.SetEventType(wxEVT_SCROLLWIN_TOP); + + sendHorizontalToo = event.ControlDown(); + break; + + case WXK_END: + newEvent.SetEventType(wxEVT_SCROLLWIN_BOTTOM); + + sendHorizontalToo = event.ControlDown(); + break; + + case WXK_LEFT: + newEvent.SetOrientation(wxHORIZONTAL); + // fall through + + case WXK_UP: + newEvent.SetEventType(wxEVT_SCROLLWIN_LINEUP); + break; + + case WXK_RIGHT: + newEvent.SetOrientation(wxHORIZONTAL); + // fall through + + case WXK_DOWN: + newEvent.SetEventType(wxEVT_SCROLLWIN_LINEDOWN); + break; + + default: + // not a scrolling key + event.Skip(); + return; + } + + m_win->ProcessWindowEvent(newEvent); + + if ( sendHorizontalToo ) + { + newEvent.SetOrientation(wxHORIZONTAL); + m_win->ProcessWindowEvent(newEvent); + } +} + +// ---------------------------------------------------------------------------- +// autoscroll stuff: these functions deal with sending fake scroll events when +// a captured mouse is being held outside the window +// ---------------------------------------------------------------------------- + +bool wxScrollHelperBase::SendAutoScrollEvents(wxScrollWinEvent& event) const +{ + // only send the event if the window is scrollable in this direction + wxWindow *win = (wxWindow *)event.GetEventObject(); + return win->HasScrollbar(event.GetOrientation()); +} + +void wxScrollHelperBase::StopAutoScrolling() +{ +#if wxUSE_TIMER + wxDELETE(m_timerAutoScroll); +#endif +} + +void wxScrollHelperBase::HandleOnMouseEnter(wxMouseEvent& event) +{ + StopAutoScrolling(); + + event.Skip(); +} + +void wxScrollHelperBase::HandleOnMouseLeave(wxMouseEvent& event) +{ + // don't prevent the usual processing of the event from taking place + event.Skip(); + + // when a captured mouse leave a scrolled window we start generate + // scrolling events to allow, for example, extending selection beyond the + // visible area in some controls + if ( wxWindow::GetCapture() == m_targetWindow ) + { + // where is the mouse leaving? + int pos, orient; + wxPoint pt = event.GetPosition(); + if ( pt.x < 0 ) + { + orient = wxHORIZONTAL; + pos = 0; + } + else if ( pt.y < 0 ) + { + orient = wxVERTICAL; + pos = 0; + } + else // we're lower or to the right of the window + { + wxSize size = m_targetWindow->GetClientSize(); + if ( pt.x > size.x ) + { + orient = wxHORIZONTAL; + pos = m_xScrollLines; + } + else if ( pt.y > size.y ) + { + orient = wxVERTICAL; + pos = m_yScrollLines; + } + else // this should be impossible + { + // but seems to happen sometimes under wxMSW - maybe it's a bug + // there but for now just ignore it + + //wxFAIL_MSG( wxT("can't understand where has mouse gone") ); + + return; + } + } + + // only start the auto scroll timer if the window can be scrolled in + // this direction + if ( !m_targetWindow->HasScrollbar(orient) ) + return; + +#if wxUSE_TIMER + delete m_timerAutoScroll; + m_timerAutoScroll = new wxAutoScrollTimer + ( + m_targetWindow, this, + pos == 0 ? wxEVT_SCROLLWIN_LINEUP + : wxEVT_SCROLLWIN_LINEDOWN, + pos, + orient + ); + m_timerAutoScroll->Start(50); // FIXME: make configurable +#else + wxUnusedVar(pos); +#endif + } +} + +#if wxUSE_MOUSEWHEEL + +void wxScrollHelperBase::HandleOnMouseWheel(wxMouseEvent& event) +{ + m_wheelRotation += event.GetWheelRotation(); + int lines = m_wheelRotation / event.GetWheelDelta(); + m_wheelRotation -= lines * event.GetWheelDelta(); + + if (lines != 0) + { + + wxScrollWinEvent newEvent; + + newEvent.SetPosition(0); + newEvent.SetOrientation( event.GetWheelAxis() == 0 ? wxVERTICAL : wxHORIZONTAL); + newEvent.SetEventObject(m_win); + + if ( event.GetWheelAxis() == wxMOUSE_WHEEL_HORIZONTAL ) + lines = -lines; + + if (event.IsPageScroll()) + { + if (lines > 0) + newEvent.SetEventType(wxEVT_SCROLLWIN_PAGEUP); + else + newEvent.SetEventType(wxEVT_SCROLLWIN_PAGEDOWN); + + m_win->GetEventHandler()->ProcessEvent(newEvent); + } + else + { + lines *= event.GetLinesPerAction(); + if (lines > 0) + newEvent.SetEventType(wxEVT_SCROLLWIN_LINEUP); + else + newEvent.SetEventType(wxEVT_SCROLLWIN_LINEDOWN); + + int times = abs(lines); + for (; times > 0; times--) + m_win->GetEventHandler()->ProcessEvent(newEvent); + } + } +} + +#endif // wxUSE_MOUSEWHEEL + +void wxScrollHelperBase::HandleOnChildFocus(wxChildFocusEvent& event) +{ + // this event should be processed by all windows in parenthood chain, + // e.g. so that nested wxScrolledWindows work correctly + event.Skip(); + + // find the immediate child under which the window receiving focus is: + wxWindow *win = event.GetWindow(); + + if ( win == m_targetWindow ) + return; // nothing to do + +#if defined( __WXOSX__ ) && wxUSE_SCROLLBAR + if (wxDynamicCast(win, wxScrollBar)) + return; +#endif + + // Fixing ticket: http://trac.wxwidgets.org/ticket/9563 + // When a child inside a wxControlContainer receives a focus, the + // wxControlContainer generates an artificial wxChildFocusEvent for + // itself, telling its parent that 'it' received the focus. The effect is + // that this->HandleOnChildFocus is called twice, first with the + // artificial wxChildFocusEvent and then with the original event. We need + // to ignore the artificial event here or otherwise HandleOnChildFocus + // would first scroll the target window to make the entire + // wxControlContainer visible and immediately afterwards scroll the target + // window again to make the child widget visible. This leads to ugly + // flickering when using nested wxPanels/wxScrolledWindows. + // + // Ignore this event if 'win' is derived from wxControlContainer AND its + // parent is the m_targetWindow AND 'win' is not actually reciving the + // focus (win != FindFocus). TODO: This affects all wxControlContainer + // objects, but wxControlContainer is not part of the wxWidgets RTTI and + // so wxDynamicCast(win, wxControlContainer) does not compile. Find a way + // to determine if 'win' derives from wxControlContainer. Until then, + // testing if 'win' derives from wxPanel will probably get >90% of all + // cases. + + wxWindow *actual_focus=wxWindow::FindFocus(); + if (win != actual_focus && + wxDynamicCast(win, wxPanel) != 0 && + win->GetParent() == m_targetWindow) + // if win is a wxPanel and receives the focus, it should not be + // scrolled into view + return; + + const wxRect viewRect(m_targetWindow->GetClientRect()); + + // For composite controls such as wxComboCtrl we should try to fit the + // entire control inside the visible area of the target window, not just + // the focused child of the control. Otherwise we'd make only the textctrl + // part of a wxComboCtrl visible and the button would still be outside the + // scrolled area. But do so only if the parent fits *entirely* inside the + // scrolled window. In other situations, such as nested wxPanel or + // wxScrolledWindows, the parent might be way too big to fit inside the + // scrolled window. If that is the case, then make only the focused window + // visible + if ( win->GetParent() != m_targetWindow) + { + wxWindow *parent=win->GetParent(); + wxSize parent_size=parent->GetSize(); + if (parent_size.GetWidth() <= viewRect.GetWidth() && + parent_size.GetHeight() <= viewRect.GetHeight()) + // make the immediate parent visible instead of the focused control + win=parent; + } + + // make win position relative to the m_targetWindow viewing area instead of + // its parent + const wxRect + winRect(m_targetWindow->ScreenToClient(win->GetScreenPosition()), + win->GetSize()); + + // check if it's fully visible + if ( viewRect.Contains(winRect) ) + { + // it is, nothing to do + return; + } + + // check if we can make it fully visible: this is only possible if it's not + // larger than our view area + if ( winRect.GetWidth() > viewRect.GetWidth() || + winRect.GetHeight() > viewRect.GetHeight() ) + { + // we can't make it fit so avoid scrolling it at all, this is only + // going to be confusing and not helpful + return; + } + + + // do make the window fit inside the view area by scrolling to it + int stepx, stepy; + GetScrollPixelsPerUnit(&stepx, &stepy); + + int startx, starty; + GetViewStart(&startx, &starty); + + // first in vertical direction: + if ( stepy > 0 ) + { + int diff = 0; + + if ( winRect.GetTop() < 0 ) + { + diff = winRect.GetTop(); + } + else if ( winRect.GetBottom() > viewRect.GetHeight() ) + { + diff = winRect.GetBottom() - viewRect.GetHeight() + 1; + // round up to next scroll step if we can't get exact position, + // so that the window is fully visible: + diff += stepy - 1; + } + + starty = (starty * stepy + diff) / stepy; + } + + // then horizontal: + if ( stepx > 0 ) + { + int diff = 0; + + if ( winRect.GetLeft() < 0 ) + { + diff = winRect.GetLeft(); + } + else if ( winRect.GetRight() > viewRect.GetWidth() ) + { + diff = winRect.GetRight() - viewRect.GetWidth() + 1; + // round up to next scroll step if we can't get exact position, + // so that the window is fully visible: + diff += stepx - 1; + } + + startx = (startx * stepx + diff) / stepx; + } + + Scroll(startx, starty); +} + + +#ifdef wxHAS_GENERIC_SCROLLWIN + +// ---------------------------------------------------------------------------- +// wxScrollHelper implementation +// ---------------------------------------------------------------------------- + +wxScrollHelper::wxScrollHelper(wxWindow *winToScroll) + : wxScrollHelperBase(winToScroll) +{ + m_xVisibility = + m_yVisibility = wxSHOW_SB_DEFAULT; +} + +bool wxScrollHelper::IsScrollbarShown(int orient) const +{ + wxScrollbarVisibility visibility = orient == wxHORIZONTAL ? m_xVisibility + : m_yVisibility; + + return visibility != wxSHOW_SB_NEVER; +} + +void wxScrollHelper::DoShowScrollbars(wxScrollbarVisibility horz, + wxScrollbarVisibility vert) +{ + if ( horz != m_xVisibility || vert != m_yVisibility ) + { + m_xVisibility = horz; + m_yVisibility = vert; + + AdjustScrollbars(); + } +} + +void +wxScrollHelper::DoAdjustScrollbar(int orient, + int clientSize, + int virtSize, + int pixelsPerUnit, + int& scrollUnits, + int& scrollPosition, + int& scrollLinesPerPage, + wxScrollbarVisibility visibility) +{ + // scroll lines per page: if 0, no scrolling is needed + // check if we need scrollbar in this direction at all + if ( pixelsPerUnit == 0 || clientSize >= virtSize ) + { + // scrolling is disabled or unnecessary + scrollUnits = + scrollPosition = 0; + scrollLinesPerPage = 0; + } + else // might need scrolling + { + // Round up integer division to catch any "leftover" client space. + scrollUnits = (virtSize + pixelsPerUnit - 1) / pixelsPerUnit; + + // Calculate the number of fully scroll units + scrollLinesPerPage = clientSize / pixelsPerUnit; + + if ( scrollLinesPerPage >= scrollUnits ) + { + // we're big enough to not need scrolling + scrollUnits = + scrollPosition = 0; + scrollLinesPerPage = 0; + } + else // we do need a scrollbar + { + if ( scrollLinesPerPage < 1 ) + scrollLinesPerPage = 1; + + // Correct position if greater than extent of canvas minus + // the visible portion of it or if below zero + const int posMax = scrollUnits - scrollLinesPerPage; + if ( scrollPosition > posMax ) + scrollPosition = posMax; + else if ( scrollPosition < 0 ) + scrollPosition = 0; + } + } + + // in wxSHOW_SB_NEVER case don't show the scrollbar even if it's needed, in + // wxSHOW_SB_ALWAYS case show the scrollbar even if it's not needed by + // passing a special range value to SetScrollbar() + int range; + switch ( visibility ) + { + case wxSHOW_SB_NEVER: + range = 0; + break; + + case wxSHOW_SB_ALWAYS: + range = scrollUnits ? scrollUnits : -1; + break; + + default: + wxFAIL_MSG( wxS("unknown scrollbar visibility") ); + // fall through + + case wxSHOW_SB_DEFAULT: + range = scrollUnits; + break; + + } + + m_win->SetScrollbar(orient, scrollPosition, scrollLinesPerPage, range); +} + +void wxScrollHelper::AdjustScrollbars() +{ + static wxRecursionGuardFlag s_flagReentrancy; + wxRecursionGuard guard(s_flagReentrancy); + if ( guard.IsInside() ) + { + // don't reenter AdjustScrollbars() while another call to + // AdjustScrollbars() is in progress because this may lead to calling + // ScrollWindow() twice and this can really happen under MSW if + // SetScrollbar() call below adds or removes the scrollbar which + // changes the window size and hence results in another + // AdjustScrollbars() call + return; + } + + int oldXScroll = m_xScrollPosition; + int oldYScroll = m_yScrollPosition; + + // we may need to readjust the scrollbars several times as enabling one of + // them reduces the area available for the window contents and so can make + // the other scrollbar necessary now although it wasn't necessary before + // + // VZ: normally this loop should be over in at most 2 iterations, I don't + // know why do we need 5 of them + for ( int iterationCount = 0; iterationCount < 5; iterationCount++ ) + { + wxSize clientSize = GetTargetSize(); + const wxSize virtSize = m_targetWindow->GetVirtualSize(); + + // this block of code tries to work around the following problem: the + // window could have been just resized to have enough space to show its + // full contents without the scrollbars, but its client size could be + // not big enough because it does have the scrollbars right now and so + // the scrollbars would remain even though we don't need them any more + // + // to prevent this from happening, check if we have enough space for + // everything without the scrollbars and explicitly disable them then + const wxSize availSize = GetSizeAvailableForScrollTarget( + m_win->GetSize() - m_win->GetWindowBorderSize()); + if ( availSize != clientSize ) + { + if ( availSize.x >= virtSize.x && availSize.y >= virtSize.y ) + { + // this will be enough to make the scrollbars disappear below + // and then the client size will indeed become equal to the + // full available size + clientSize = availSize; + } + } + + + DoAdjustScrollbar(wxHORIZONTAL, + clientSize.x, + virtSize.x, + m_xScrollPixelsPerLine, + m_xScrollLines, + m_xScrollPosition, + m_xScrollLinesPerPage, + m_xVisibility); + + DoAdjustScrollbar(wxVERTICAL, + clientSize.y, + virtSize.y, + m_yScrollPixelsPerLine, + m_yScrollLines, + m_yScrollPosition, + m_yScrollLinesPerPage, + m_yVisibility); + + + // If a scrollbar (dis)appeared as a result of this, we need to adjust + // them again but if the client size didn't change, then we're done + if ( GetTargetSize() == clientSize ) + break; + } + +#ifdef __WXMOTIF__ + // Sorry, some Motif-specific code to implement a backing pixmap + // for the wxRETAINED style. Implementing a backing store can't + // be entirely generic because it relies on the wxWindowDC implementation + // to duplicate X drawing calls for the backing pixmap. + + if ( m_targetWindow->GetWindowStyle() & wxRETAINED ) + { + Display* dpy = XtDisplay((Widget)m_targetWindow->GetMainWidget()); + + int totalPixelWidth = m_xScrollLines * m_xScrollPixelsPerLine; + int totalPixelHeight = m_yScrollLines * m_yScrollPixelsPerLine; + if (m_targetWindow->GetBackingPixmap() && + !((m_targetWindow->GetPixmapWidth() == totalPixelWidth) && + (m_targetWindow->GetPixmapHeight() == totalPixelHeight))) + { + XFreePixmap (dpy, (Pixmap) m_targetWindow->GetBackingPixmap()); + m_targetWindow->SetBackingPixmap((WXPixmap) 0); + } + + if (!m_targetWindow->GetBackingPixmap() && + (m_xScrollLines != 0) && (m_yScrollLines != 0)) + { + int depth = wxDisplayDepth(); + m_targetWindow->SetPixmapWidth(totalPixelWidth); + m_targetWindow->SetPixmapHeight(totalPixelHeight); + m_targetWindow->SetBackingPixmap((WXPixmap) XCreatePixmap (dpy, RootWindow (dpy, DefaultScreen (dpy)), + m_targetWindow->GetPixmapWidth(), m_targetWindow->GetPixmapHeight(), depth)); + } + + } +#endif // Motif + + if (oldXScroll != m_xScrollPosition) + { + if (m_xScrollingEnabled) + m_targetWindow->ScrollWindow( m_xScrollPixelsPerLine * (oldXScroll - m_xScrollPosition), 0, + GetScrollRect() ); + else + m_targetWindow->Refresh(true, GetScrollRect()); + } + + if (oldYScroll != m_yScrollPosition) + { + if (m_yScrollingEnabled) + m_targetWindow->ScrollWindow( 0, m_yScrollPixelsPerLine * (oldYScroll-m_yScrollPosition), + GetScrollRect() ); + else + m_targetWindow->Refresh(true, GetScrollRect()); + } +} + +void wxScrollHelper::DoScroll( int x_pos, int y_pos ) +{ + if (!m_targetWindow) + return; + + if (((x_pos == -1) || (x_pos == m_xScrollPosition)) && + ((y_pos == -1) || (y_pos == m_yScrollPosition))) return; + + int w = 0, h = 0; + GetTargetSize(&w, &h); + + // compute new position: + int new_x = m_xScrollPosition; + int new_y = m_yScrollPosition; + + if ((x_pos != -1) && (m_xScrollPixelsPerLine)) + { + new_x = x_pos; + + // Calculate page size i.e. number of scroll units you get on the + // current client window + int noPagePositions = w/m_xScrollPixelsPerLine; + if (noPagePositions < 1) noPagePositions = 1; + + // Correct position if greater than extent of canvas minus + // the visible portion of it or if below zero + new_x = wxMin( m_xScrollLines-noPagePositions, new_x ); + new_x = wxMax( 0, new_x ); + } + if ((y_pos != -1) && (m_yScrollPixelsPerLine)) + { + new_y = y_pos; + + // Calculate page size i.e. number of scroll units you get on the + // current client window + int noPagePositions = h/m_yScrollPixelsPerLine; + if (noPagePositions < 1) noPagePositions = 1; + + // Correct position if greater than extent of canvas minus + // the visible portion of it or if below zero + new_y = wxMin( m_yScrollLines-noPagePositions, new_y ); + new_y = wxMax( 0, new_y ); + } + + if ( new_x == m_xScrollPosition && new_y == m_yScrollPosition ) + return; // nothing to do, the position didn't change + + // flush all pending repaints before we change m_{x,y}ScrollPosition, as + // otherwise invalidated area could be updated incorrectly later when + // ScrollWindow() makes sure they're repainted before scrolling them + m_targetWindow->Update(); + + // update the position and scroll the window now: + if (m_xScrollPosition != new_x) + { + int old_x = m_xScrollPosition; + m_xScrollPosition = new_x; + m_win->SetScrollPos( wxHORIZONTAL, new_x ); + m_targetWindow->ScrollWindow( (old_x-new_x)*m_xScrollPixelsPerLine, 0, + GetScrollRect() ); + } + + if (m_yScrollPosition != new_y) + { + int old_y = m_yScrollPosition; + m_yScrollPosition = new_y; + m_win->SetScrollPos( wxVERTICAL, new_y ); + m_targetWindow->ScrollWindow( 0, (old_y-new_y)*m_yScrollPixelsPerLine, + GetScrollRect() ); + } +} + +#endif // wxHAS_GENERIC_SCROLLWIN + +// ---------------------------------------------------------------------------- +// wxScrolled and wxScrolledWindow implementation +// ---------------------------------------------------------------------------- + +wxSize wxScrolledT_Helper::FilterBestSize(const wxWindow *win, + const wxScrollHelper *helper, + const wxSize& origBest) +{ + // NB: We don't do this in WX_FORWARD_TO_SCROLL_HELPER, because not + // all scrollable windows should behave like this, only those that + // contain children controls within scrollable area + // (i.e., wxScrolledWindow) and other some scrollable windows may + // have different DoGetBestSize() implementation (e.g. wxTreeCtrl). + + wxSize best = origBest; + + if ( win->GetAutoLayout() ) + { + // Only use the content to set the window size in the direction + // where there's no scrolling; otherwise we're going to get a huge + // window in the direction in which scrolling is enabled + int ppuX, ppuY; + helper->GetScrollPixelsPerUnit(&ppuX, &ppuY); + + // NB: This code used to use *current* size if min size wasn't + // specified, presumably to get some reasonable (i.e., larger than + // minimal) size. But that's a wrong thing to do in GetBestSize(), + // so we use minimal size as specified. If the app needs some + // minimal size for its scrolled window, it should set it and put + // the window into sizer as expandable so that it can use all space + // available to it. + // + // See also http://svn.wxwidgets.org/viewvc/wx?view=rev&revision=45864 + + wxSize minSize = win->GetMinSize(); + + if ( ppuX > 0 ) + best.x = minSize.x + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); + + if ( ppuY > 0 ) + best.y = minSize.y + wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y); + } + + return best; +} + +#ifdef __WXMSW__ +WXLRESULT wxScrolledT_Helper::FilterMSWWindowProc(WXUINT nMsg, WXLRESULT rc) +{ +#ifndef __WXWINCE__ + // we need to process arrows ourselves for scrolling + if ( nMsg == WM_GETDLGCODE ) + { + rc |= DLGC_WANTARROWS; + } +#endif + return rc; +} +#endif // __WXMSW__ + +// NB: skipping wxScrolled in wxRTTI information because being a templte, +// it doesn't and can't implement wxRTTI support +IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxPanel) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/selstore.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/selstore.cpp new file mode 100644 index 0000000000..6f606c335a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/selstore.cpp @@ -0,0 +1,231 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/selstore.cpp +// Purpose: wxSelectionStore implementation +// Author: Vadim Zeitlin +// Modified by: +// Created: 08.06.03 (extracted from src/generic/listctrl.cpp) +// Copyright: (c) 2000-2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/selstore.h" + +// ============================================================================ +// wxSelectionStore +// ============================================================================ + +// ---------------------------------------------------------------------------- +// tests +// ---------------------------------------------------------------------------- + +bool wxSelectionStore::IsSelected(unsigned item) const +{ + bool isSel = m_itemsSel.Index(item) != wxNOT_FOUND; + + // if the default state is to be selected, being in m_itemsSel means that + // the item is not selected, so we have to inverse the logic + return m_defaultState ? !isSel : isSel; +} + +// ---------------------------------------------------------------------------- +// Select*() +// ---------------------------------------------------------------------------- + +bool wxSelectionStore::SelectItem(unsigned item, bool select) +{ + // search for the item ourselves as like this we get the index where to + // insert it later if needed, so we do only one search in the array instead + // of two (adding item to a sorted array requires a search) + size_t index = m_itemsSel.IndexForInsert(item); + bool isSel = index < m_itemsSel.GetCount() && m_itemsSel[index] == item; + + if ( select != m_defaultState ) + { + if ( !isSel ) + { + m_itemsSel.AddAt(item, index); + + return true; + } + } + else // reset to default state + { + if ( isSel ) + { + m_itemsSel.RemoveAt(index); + return true; + } + } + + return false; +} + +bool wxSelectionStore::SelectRange(unsigned itemFrom, unsigned itemTo, + bool select, + wxArrayInt *itemsChanged) +{ + // 100 is hardcoded but it shouldn't matter much: the important thing is + // that we don't refresh everything when really few (e.g. 1 or 2) items + // change state + static const unsigned MANY_ITEMS = 100; + + wxASSERT_MSG( itemFrom <= itemTo, wxT("should be in order") ); + + // are we going to have more [un]selected items than the other ones? + if ( itemTo - itemFrom > m_count/2 ) + { + if ( select != m_defaultState ) + { + // the default state now becomes the same as 'select' + m_defaultState = select; + + // so all the old selections (which had state select) shouldn't be + // selected any more, but all the other ones should + wxSelectedIndices selOld = m_itemsSel; + m_itemsSel.Empty(); + + // TODO: it should be possible to optimize the searches a bit + // knowing the possible range + + unsigned item; + for ( item = 0; item < itemFrom; item++ ) + { + if ( selOld.Index(item) == wxNOT_FOUND ) + m_itemsSel.Add(item); + } + + for ( item = itemTo + 1; item < m_count; item++ ) + { + if ( selOld.Index(item) == wxNOT_FOUND ) + m_itemsSel.Add(item); + } + + // many items (> half) changed state + itemsChanged = NULL; + } + else // select == m_defaultState + { + // get the inclusive range of items between itemFrom and itemTo + size_t count = m_itemsSel.GetCount(), + start = m_itemsSel.IndexForInsert(itemFrom), + end = m_itemsSel.IndexForInsert(itemTo); + + if ( start == count || m_itemsSel[start] < itemFrom ) + { + start++; + } + + if ( end == count || m_itemsSel[end] > itemTo ) + { + end--; + } + + if ( start <= end ) + { + // delete all of them (from end to avoid changing indices) + for ( int i = end; i >= (int)start; i-- ) + { + if ( itemsChanged ) + { + if ( itemsChanged->GetCount() > MANY_ITEMS ) + { + // stop counting (see comment below) + itemsChanged = NULL; + } + else + { + itemsChanged->Add(m_itemsSel[i]); + } + } + + m_itemsSel.RemoveAt(i); + } + } + } + } + else // "few" items change state + { + if ( itemsChanged ) + { + itemsChanged->Empty(); + } + + // just add the items to the selection + for ( unsigned item = itemFrom; item <= itemTo; item++ ) + { + if ( SelectItem(item, select) && itemsChanged ) + { + itemsChanged->Add(item); + + if ( itemsChanged->GetCount() > MANY_ITEMS ) + { + // stop counting them, we'll just eat gobs of memory + // for nothing at all - faster to refresh everything in + // this case + itemsChanged = NULL; + } + } + } + } + + // we set it to NULL if there are many items changing state + return itemsChanged != NULL; +} + +// ---------------------------------------------------------------------------- +// callbacks +// ---------------------------------------------------------------------------- + +void wxSelectionStore::OnItemDelete(unsigned item) +{ + size_t count = m_itemsSel.GetCount(), + i = m_itemsSel.IndexForInsert(item); + + if ( i < count && m_itemsSel[i] == item ) + { + // this item itself was in m_itemsSel, remove it from there + m_itemsSel.RemoveAt(i); + + count--; + } + + // and adjust the index of all which follow it + while ( i < count ) + { + // all following elements must be greater than the one we deleted + wxASSERT_MSG( m_itemsSel[i] > item, wxT("logic error") ); + + m_itemsSel[i++]--; + } +} + +void wxSelectionStore::SetItemCount(unsigned count) +{ + // forget about all items whose indices are now invalid if the size + // decreased + if ( count < m_count ) + { + for ( size_t i = m_itemsSel.GetCount(); i > 0; i-- ) + { + if ( m_itemsSel[i - 1] >= count ) + m_itemsSel.RemoveAt(i - 1); + } + } + + // remember the new number of items + m_count = count; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/spinctlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/spinctlg.cpp new file mode 100644 index 0000000000..3da88c9404 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/spinctlg.cpp @@ -0,0 +1,731 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/spinctlg.cpp +// Purpose: implements wxSpinCtrl as a composite control +// Author: Vadim Zeitlin +// Modified by: +// Created: 29.01.01 +// Copyright: (c) 2001 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/textctrl.h" +#endif //WX_PRECOMP + +#include "wx/spinctrl.h" +#include "wx/tooltip.h" + +#if wxUSE_SPINCTRL + +IMPLEMENT_DYNAMIC_CLASS(wxSpinDoubleEvent, wxNotifyEvent) + +// There are port-specific versions for the wxSpinCtrl, so exclude the +// contents of this file in those cases +#if !defined(wxHAS_NATIVE_SPINCTRL) || !defined(wxHAS_NATIVE_SPINCTRLDOUBLE) + +#include "wx/spinbutt.h" + +#if wxUSE_SPINBTN + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// The margin between the text control and the spin: the value here is the same +// as the margin between the spin button and its "buddy" text control in wxMSW +// so the generic control looks similarly to the native one there, we might +// need to use different value for the other platforms (and maybe even +// determine it dynamically?). +static const wxCoord MARGIN = 1; + +#define SPINCTRLBUT_MAX 32000 // large to avoid wrap around trouble + +// ---------------------------------------------------------------------------- +// wxSpinCtrlTextGeneric: text control used by spin control +// ---------------------------------------------------------------------------- + +class wxSpinCtrlTextGeneric : public wxTextCtrl +{ +public: + wxSpinCtrlTextGeneric(wxSpinCtrlGenericBase *spin, const wxString& value, long style=0) + : wxTextCtrl(spin, wxID_ANY, value, wxDefaultPosition, wxDefaultSize, + // This is tricky: we want to honour any alignment flags + // but not wxALIGN_CENTER_VERTICAL because it's the same + // as wxTE_PASSWORD and we definitely don't want to show + // asterisks in spin control. + style & (wxALIGN_MASK | wxTE_PROCESS_ENTER) & ~wxTE_PASSWORD) + { + m_spin = spin; + + // remove the default minsize, the spinctrl will have one instead + SetSizeHints(wxDefaultCoord, wxDefaultCoord); + } + + virtual ~wxSpinCtrlTextGeneric() + { + // MSW sends extra kill focus event on destroy + if (m_spin) + m_spin->m_textCtrl = NULL; + + m_spin = NULL; + } + + void OnChar( wxKeyEvent &event ) + { + if ( !m_spin->ProcessWindowEvent(event) ) + event.Skip(); + } + + void OnTextEvent(wxCommandEvent& event) + { + wxCommandEvent eventCopy(event); + eventCopy.SetEventObject(m_spin); + eventCopy.SetId(m_spin->GetId()); + m_spin->ProcessWindowEvent(eventCopy); + } + + void OnKillFocus(wxFocusEvent& event) + { + if (m_spin) + m_spin->ProcessWindowEvent(event); + + event.Skip(); + } + + wxSpinCtrlGenericBase *m_spin; + +private: + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxSpinCtrlTextGeneric, wxTextCtrl) + EVT_CHAR(wxSpinCtrlTextGeneric::OnChar) + + // Forward the text events to wxSpinCtrl itself adjusting them slightly in + // the process. + EVT_TEXT(wxID_ANY, wxSpinCtrlTextGeneric::OnTextEvent) + + // And we need to forward this one too as wxSpinCtrl is supposed to + // generate it if wxTE_PROCESS_ENTER is used with it (and if it isn't, + // we're never going to get EVT_TEXT_ENTER in the first place). + EVT_TEXT_ENTER(wxID_ANY, wxSpinCtrlTextGeneric::OnTextEvent) + + EVT_KILL_FOCUS(wxSpinCtrlTextGeneric::OnKillFocus) +END_EVENT_TABLE() + +// ---------------------------------------------------------------------------- +// wxSpinCtrlButtonGeneric: spin button used by spin control +// ---------------------------------------------------------------------------- + +class wxSpinCtrlButtonGeneric : public wxSpinButton +{ +public: + wxSpinCtrlButtonGeneric(wxSpinCtrlGenericBase *spin, int style) + : wxSpinButton(spin, wxID_ANY, wxDefaultPosition, + wxDefaultSize, style | wxSP_VERTICAL) + { + m_spin = spin; + + SetRange(-SPINCTRLBUT_MAX, SPINCTRLBUT_MAX); + + // remove the default minsize, the spinctrl will have one instead + SetSizeHints(wxDefaultCoord, wxDefaultCoord); + } + + void OnSpinButton(wxSpinEvent& event) + { + if (m_spin) + m_spin->OnSpinButton(event); + } + + wxSpinCtrlGenericBase *m_spin; + +private: + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxSpinCtrlButtonGeneric, wxSpinButton) + EVT_SPIN_UP( wxID_ANY, wxSpinCtrlButtonGeneric::OnSpinButton) + EVT_SPIN_DOWN(wxID_ANY, wxSpinCtrlButtonGeneric::OnSpinButton) +END_EVENT_TABLE() + +// ============================================================================ +// wxSpinCtrlGenericBase +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxSpinCtrlGenericBase creation +// ---------------------------------------------------------------------------- + +void wxSpinCtrlGenericBase::Init() +{ + m_value = 0; + m_min = 0; + m_max = 100; + m_increment = 1; + m_snap_to_ticks = false; + + m_spin_value = 0; + + m_textCtrl = NULL; + m_spinButton = NULL; +} + +bool wxSpinCtrlGenericBase::Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, const wxSize& size, + long style, + double min, double max, double initial, + double increment, + const wxString& name) +{ + // don't use borders for this control itself, it wouldn't look good with + // the text control borders (but we might want to use style border bits to + // select the text control style) + if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, + (style & ~wxBORDER_MASK) | wxBORDER_NONE, + wxDefaultValidator, name) ) + { + return false; + } + + m_value = initial; + m_min = min; + m_max = max; + m_increment = increment; + + m_textCtrl = new wxSpinCtrlTextGeneric(this, value, style); + m_spinButton = new wxSpinCtrlButtonGeneric(this, style); + +#if wxUSE_TOOLTIPS + m_textCtrl->SetToolTip(GetToolTipText()); + m_spinButton->SetToolTip(GetToolTipText()); +#endif // wxUSE_TOOLTIPS + + m_spin_value = m_spinButton->GetValue(); + + // the string value overrides the numeric one (for backwards compatibility + // reasons and also because it is simpler to satisfy the string value which + // comes much sooner in the list of arguments and leave the initial + // parameter unspecified) + if ( !value.empty() ) + { + double d; + if ( DoTextToValue(value, &d) ) + { + m_value = d; + m_textCtrl->ChangeValue(DoValueToText(m_value)); + } + } + + SetInitialSize(size); + Move(pos); + + return true; +} + +wxSpinCtrlGenericBase::~wxSpinCtrlGenericBase() +{ + // delete the controls now, don't leave them alive even though they would + // still be eventually deleted by our parent - but it will be too late, the + // user code expects them to be gone now + + if (m_textCtrl) + { + // null this since MSW sends KILL_FOCUS on deletion, see ~wxSpinCtrlTextGeneric + wxDynamicCast(m_textCtrl, wxSpinCtrlTextGeneric)->m_spin = NULL; + + wxSpinCtrlTextGeneric *text = (wxSpinCtrlTextGeneric*)m_textCtrl; + m_textCtrl = NULL; + delete text; + } + + wxDELETE(m_spinButton); +} + +wxWindowList wxSpinCtrlGenericBase::GetCompositeWindowParts() const +{ + wxWindowList parts; + parts.push_back(m_textCtrl); + parts.push_back(m_spinButton); + return parts; +} + +// ---------------------------------------------------------------------------- +// geometry +// ---------------------------------------------------------------------------- + +wxSize wxSpinCtrlGenericBase::DoGetBestSize() const +{ + return DoGetSizeFromTextSize(m_textCtrl->GetBestSize().x, -1); +} + +wxSize wxSpinCtrlGenericBase::DoGetSizeFromTextSize(int xlen, int ylen) const +{ + wxSize sizeBtn = m_spinButton->GetBestSize(); + wxSize totalS( m_textCtrl->GetBestSize() ); + + wxSize tsize(xlen + sizeBtn.x + MARGIN, totalS.y); +#if defined(__WXMSW__) + tsize.IncBy(4*totalS.y/10 + 4, 0); +#elif defined(__WXGTK__) + tsize.IncBy(totalS.y + 10, 0); +#endif // MSW GTK + + // Check if the user requested a non-standard height. + if ( ylen > 0 ) + tsize.IncBy(0, ylen - GetCharHeight()); + + return tsize; +} + +void wxSpinCtrlGenericBase::DoMoveWindow(int x, int y, int width, int height) +{ + wxControl::DoMoveWindow(x, y, width, height); + + // position the subcontrols inside the client area + wxSize sizeBtn = m_spinButton->GetSize(); + + wxCoord wText = width - sizeBtn.x - MARGIN; + m_textCtrl->SetSize(0, 0, wText, height); + m_spinButton->SetSize(0 + wText + MARGIN, 0, wxDefaultCoord, height); +} + +// ---------------------------------------------------------------------------- +// operations forwarded to the subcontrols +// ---------------------------------------------------------------------------- + +void wxSpinCtrlGenericBase::SetFocus() +{ + if ( m_textCtrl ) + m_textCtrl->SetFocus(); +} + +#ifdef __WXMSW__ + +void wxSpinCtrlGenericBase::DoEnable(bool enable) +{ + wxSpinCtrlBase::DoEnable(enable); +} + +#endif // __WXMSW__ + +bool wxSpinCtrlGenericBase::Enable(bool enable) +{ + if ( !wxSpinCtrlBase::Enable(enable) ) + return false; + + m_spinButton->Enable(enable); + m_textCtrl->Enable(enable); + + return true; +} + +bool wxSpinCtrlGenericBase::Show(bool show) +{ + if ( !wxControl::Show(show) ) + return false; + + // under GTK Show() is called the first time before we are fully + // constructed + if ( m_spinButton ) + { + m_spinButton->Show(show); + m_textCtrl->Show(show); + } + + return true; +} + +#if wxUSE_TOOLTIPS +void wxSpinCtrlGenericBase::DoSetToolTip(wxToolTip *tip) +{ + // Notice that we must check for the subcontrols not being NULL (as they + // could be if we were created with the default ctor and this is called + // before Create() for some reason) and that we can't call SetToolTip(tip) + // because this would take ownership of the wxToolTip object (twice). + if ( m_textCtrl ) + { + if ( tip ) + m_textCtrl->SetToolTip(tip->GetTip()); + else + m_textCtrl->SetToolTip(NULL); + } + + if ( m_spinButton ) + { + if( tip ) + m_spinButton->SetToolTip(tip->GetTip()); + else + m_spinButton->SetToolTip(NULL); + } + + wxWindowBase::DoSetToolTip(tip); +} +#endif // wxUSE_TOOLTIPS + +bool wxSpinCtrlGenericBase::SetBackgroundColour(const wxColour& colour) +{ + // We need to provide this otherwise the entire composite window + // background and therefore the between component spaces + // will be changed. + if ( m_textCtrl ) + return m_textCtrl->SetBackgroundColour(colour); + + return true; +} + +// ---------------------------------------------------------------------------- +// Handle sub controls events +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxSpinCtrlGenericBase, wxSpinCtrlBase) + EVT_CHAR(wxSpinCtrlGenericBase::OnTextChar) + EVT_KILL_FOCUS(wxSpinCtrlGenericBase::OnTextLostFocus) +END_EVENT_TABLE() + +void wxSpinCtrlGenericBase::OnSpinButton(wxSpinEvent& event) +{ + event.Skip(); + + // Sync the textctrl since the user expects that the button will modify + // what they see in the textctrl. + SyncSpinToText(SendEvent_None); + + int spin_value = event.GetPosition(); + double step = (event.GetEventType() == wxEVT_SCROLL_LINEUP) ? 1 : -1; + + // Use the spinbutton's acceleration, if any, but not if wrapping around + if (((spin_value >= 0) && (m_spin_value >= 0)) || ((spin_value <= 0) && (m_spin_value <= 0))) + step *= abs(spin_value - m_spin_value); + + double value = AdjustToFitInRange(m_value + step*m_increment); + + // Ignore the edges when it wraps since the up/down event may be opposite + // They are in GTK and Mac + if (abs(spin_value - m_spin_value) > SPINCTRLBUT_MAX) + { + m_spin_value = spin_value; + return; + } + + m_spin_value = spin_value; + + // Notify about the change in wxTextCtrl too. + if ( DoSetValue(value, SendEvent_Text) ) + DoSendEvent(); +} + +void wxSpinCtrlGenericBase::OnTextLostFocus(wxFocusEvent& event) +{ + SyncSpinToText(SendEvent_Text); + DoSendEvent(); + + event.Skip(); +} + +void wxSpinCtrlGenericBase::OnTextChar(wxKeyEvent& event) +{ + if ( !HasFlag(wxSP_ARROW_KEYS) ) + { + event.Skip(); + return; + } + + double value = m_value; + switch ( event.GetKeyCode() ) + { + case WXK_UP : + value += m_increment; + break; + + case WXK_DOWN : + value -= m_increment; + break; + + case WXK_PAGEUP : + value += m_increment * 10.0; + break; + + case WXK_PAGEDOWN : + value -= m_increment * 10.0; + break; + + default: + event.Skip(); + return; + } + + value = AdjustToFitInRange(value); + + SyncSpinToText(SendEvent_None); + + // No need to send event, it was already generated by wxTextCtrl itself. + if ( DoSetValue(value, SendEvent_None) ) + DoSendEvent(); +} + +// ---------------------------------------------------------------------------- +// Textctrl functions +// ---------------------------------------------------------------------------- + +bool wxSpinCtrlGenericBase::SyncSpinToText(SendEvent sendEvent) +{ + if ( !m_textCtrl || !m_textCtrl->IsModified() ) + return false; + + double textValue; + if ( DoTextToValue(m_textCtrl->GetValue(), &textValue) ) + { + if (textValue > m_max) + textValue = m_max; + else if (textValue < m_min) + textValue = m_min; + } + else // text contents is not a valid number at all + { + // replace its contents with the last valid value + textValue = m_value; + } + + // we must always set the value here, even if it's equal to m_value, as + // otherwise we could be left with an out of range value when leaving the + // text control and the current value is already m_max for example + return DoSetValue(textValue, sendEvent); +} + +// ---------------------------------------------------------------------------- +// changing value and range +// ---------------------------------------------------------------------------- + +void wxSpinCtrlGenericBase::SetValue(const wxString& text) +{ + wxCHECK_RET( m_textCtrl, wxT("invalid call to wxSpinCtrl::SetValue") ); + + double val; + if ( DoTextToValue(text, &val) && InRange(val) ) + { + DoSetValue(val, SendEvent_None); + } + else // not a number at all or out of range + { + m_textCtrl->ChangeValue(text); + m_textCtrl->SelectAll(); + } +} + +bool wxSpinCtrlGenericBase::DoSetValue(double val, SendEvent sendEvent) +{ + wxCHECK_MSG( m_textCtrl, false, wxT("invalid call to wxSpinCtrl::SetValue") ); + + if ( val < m_min ) + val = m_min; + if ( val > m_max ) + val = m_max; + + if ( m_snap_to_ticks && (m_increment != 0) ) + { + double snap_value = val / m_increment; + + if (wxFinite(snap_value)) // FIXME what to do about a failure? + { + if ((snap_value - floor(snap_value)) < (ceil(snap_value) - snap_value)) + val = floor(snap_value) * m_increment; + else + val = ceil(snap_value) * m_increment; + } + } + + wxString str(DoValueToText(val)); + + if ((val != m_value) || (str != m_textCtrl->GetValue())) + { + if ( !DoTextToValue(str, &m_value ) ) // wysiwyg for textctrl + m_value = val; + + switch ( sendEvent ) + { + case SendEvent_None: + m_textCtrl->ChangeValue(str); + break; + + case SendEvent_Text: + m_textCtrl->SetValue(str); + break; + } + + m_textCtrl->SelectAll(); + m_textCtrl->DiscardEdits(); + return true; + } + + return false; +} + +double wxSpinCtrlGenericBase::AdjustToFitInRange(double value) const +{ + if (value < m_min) + value = HasFlag(wxSP_WRAP) ? m_max : m_min; + if (value > m_max) + value = HasFlag(wxSP_WRAP) ? m_min : m_max; + + return value; +} + +void wxSpinCtrlGenericBase::DoSetRange(double min, double max) +{ + m_min = min; + if ( m_value < m_min ) + DoSetValue(m_min, SendEvent_None); + m_max = max; + if ( m_value > m_max ) + DoSetValue(m_max, SendEvent_None); +} + +void wxSpinCtrlGenericBase::DoSetIncrement(double inc) +{ + m_increment = inc; +} + +void wxSpinCtrlGenericBase::SetSnapToTicks(bool snap_to_ticks) +{ + m_snap_to_ticks = snap_to_ticks; + DoSetValue(m_value, SendEvent_None); +} + +void wxSpinCtrlGenericBase::SetSelection(long from, long to) +{ + wxCHECK_RET( m_textCtrl, wxT("invalid call to wxSpinCtrl::SetSelection") ); + + m_textCtrl->SetSelection(from, to); +} + +#ifndef wxHAS_NATIVE_SPINCTRL + +//----------------------------------------------------------------------------- +// wxSpinCtrl +//----------------------------------------------------------------------------- + +bool wxSpinCtrl::SetBase(int base) +{ + // Currently we only support base 10 and 16. We could add support for base + // 8 quite easily but wxMSW doesn't support it natively so don't bother. + if ( base != 10 && base != 16 ) + return false; + + if ( base == m_base ) + return true; + + // Update the current control contents to show in the new base: be careful + // to call DoTextToValue() before changing the base... + double val; + const bool hasValidVal = DoTextToValue(m_textCtrl->GetValue(), &val); + + m_base = base; + + // ... but DoValueToText() after doing it. + if ( hasValidVal ) + m_textCtrl->ChangeValue(DoValueToText(val)); + + return true; +} + +void wxSpinCtrl::DoSendEvent() +{ + wxSpinEvent event( wxEVT_SPINCTRL, GetId()); + event.SetEventObject( this ); + event.SetPosition((int)(m_value + 0.5)); // FIXME should be SetValue + event.SetString(m_textCtrl->GetValue()); + GetEventHandler()->ProcessEvent( event ); +} + +bool wxSpinCtrl::DoTextToValue(const wxString& text, double *val) +{ + long lval; + if ( !text.ToLong(&lval, GetBase()) ) + return false; + + *val = static_cast(lval); + + return true; +} + +wxString wxSpinCtrl::DoValueToText(double val) +{ + switch ( GetBase() ) + { + case 16: + return wxPrivate::wxSpinCtrlFormatAsHex(static_cast(val), + GetMax()); + + default: + wxFAIL_MSG( wxS("Unsupported spin control base") ); + // Fall through + + case 10: + return wxString::Format("%ld", static_cast(val)); + } +} + +#endif // !wxHAS_NATIVE_SPINCTRL + +//----------------------------------------------------------------------------- +// wxSpinCtrlDouble +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrlDouble, wxSpinCtrlGenericBase) + +void wxSpinCtrlDouble::DoSendEvent() +{ + wxSpinDoubleEvent event( wxEVT_SPINCTRLDOUBLE, GetId()); + event.SetEventObject( this ); + event.SetValue(m_value); + event.SetString(m_textCtrl->GetValue()); + GetEventHandler()->ProcessEvent( event ); +} + +bool wxSpinCtrlDouble::DoTextToValue(const wxString& text, double *val) +{ + return text.ToDouble(val); +} + +wxString wxSpinCtrlDouble::DoValueToText(double val) +{ + return wxString::Format(m_format, val); +} + +void wxSpinCtrlDouble::SetDigits(unsigned digits) +{ + wxCHECK_RET( digits <= 20, "too many digits for wxSpinCtrlDouble" ); + + if ( digits == m_digits ) + return; + + m_digits = digits; + + m_format.Printf(wxT("%%0.%ulf"), digits); + + DoSetValue(m_value, SendEvent_None); +} + +#endif // wxUSE_SPINBTN + +#endif // !wxPort-with-native-spinctrl + +#endif // wxUSE_SPINCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/splash.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/splash.cpp new file mode 100644 index 0000000000..10f8b10449 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/splash.cpp @@ -0,0 +1,212 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/splash.cpp +// Purpose: wxSplashScreen class +// Author: Julian Smart +// Modified by: +// Created: 28/6/2000 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SPLASH + +#ifdef __WXGTK20__ + #include +#endif + +#include "wx/splash.h" + +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" + #include "wx/dcclient.h" +#endif + + +// ---------------------------------------------------------------------------- +// wxSplashScreen +// ---------------------------------------------------------------------------- + +#define wxSPLASH_TIMER_ID 9999 + +IMPLEMENT_DYNAMIC_CLASS(wxSplashScreen, wxFrame) +BEGIN_EVENT_TABLE(wxSplashScreen, wxFrame) + EVT_TIMER(wxSPLASH_TIMER_ID, wxSplashScreen::OnNotify) + EVT_CLOSE(wxSplashScreen::OnCloseWindow) +END_EVENT_TABLE() + +void wxSplashScreen::Init() +{ + m_window = NULL; + + wxEvtHandler::AddFilter(this); +} + +/* Note that unless we pass a non-default size to the frame, SetClientSize + * won't work properly under Windows, and the splash screen frame is sized + * slightly too small. + */ + +wxSplashScreen::wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds, + wxWindow* parent, wxWindowID id, const wxPoint& pos, + const wxSize& size, long style) + : wxFrame(parent, id, wxEmptyString, wxPoint(0,0), wxSize(100, 100), + style | wxFRAME_TOOL_WINDOW | wxFRAME_NO_TASKBAR) +{ + Init(); + + // splash screen must not be used as parent by the other windows because it + // is going to disappear soon, indicate it by giving it this special style + SetExtraStyle(GetExtraStyle() | wxWS_EX_TRANSIENT); + +#if defined(__WXGTK20__) + gtk_window_set_type_hint(GTK_WINDOW(m_widget), + GDK_WINDOW_TYPE_HINT_SPLASHSCREEN); +#endif + + m_splashStyle = splashStyle; + m_milliseconds = milliseconds; + + m_window = new wxSplashScreenWindow(bitmap, this, wxID_ANY, pos, size, wxNO_BORDER); + + SetClientSize(bitmap.GetWidth(), bitmap.GetHeight()); + + if (m_splashStyle & wxSPLASH_CENTRE_ON_PARENT) + CentreOnParent(); + else if (m_splashStyle & wxSPLASH_CENTRE_ON_SCREEN) + CentreOnScreen(); + + if (m_splashStyle & wxSPLASH_TIMEOUT) + { + m_timer.SetOwner(this, wxSPLASH_TIMER_ID); + m_timer.Start(milliseconds, true); + } + + Show(true); + m_window->SetFocus(); +#if defined( __WXMSW__ ) || defined(__WXMAC__) + Update(); // Without this, you see a blank screen for an instant +#elif defined(__WXGTK20__) + // we don't need to do anything at least on wxGTK with GTK+ 2.12.9 +#else + wxYieldIfNeeded(); // Should eliminate this +#endif +} + +wxSplashScreen::~wxSplashScreen() +{ + m_timer.Stop(); + + wxEvtHandler::RemoveFilter(this); +} + +int wxSplashScreen::FilterEvent(wxEvent& event) +{ + const wxEventType t = event.GetEventType(); + if ( t == wxEVT_KEY_DOWN || + t == wxEVT_LEFT_DOWN || + t == wxEVT_RIGHT_DOWN || + t == wxEVT_MIDDLE_DOWN ) + Close(true); + + return -1; +} + +void wxSplashScreen::OnNotify(wxTimerEvent& WXUNUSED(event)) +{ + Close(true); +} + +void wxSplashScreen::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) +{ + m_timer.Stop(); + this->Destroy(); +} + +// ---------------------------------------------------------------------------- +// wxSplashScreenWindow +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxSplashScreenWindow, wxWindow) +#ifdef __WXGTK__ + EVT_PAINT(wxSplashScreenWindow::OnPaint) +#endif + EVT_ERASE_BACKGROUND(wxSplashScreenWindow::OnEraseBackground) +END_EVENT_TABLE() + +wxSplashScreenWindow::wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, + wxWindowID id, const wxPoint& pos, + const wxSize& size, long style) + : wxWindow(parent, id, pos, size, style) +{ + m_bitmap = bitmap; + +#if !defined(__WXGTK__) && wxUSE_PALETTE + bool hiColour = (wxDisplayDepth() >= 16) ; + + if (bitmap.GetPalette() && !hiColour) + { + SetPalette(* bitmap.GetPalette()); + } +#endif +} + +// VZ: why don't we do it under wxGTK? +#if !defined(__WXGTK__) && wxUSE_PALETTE + #define USE_PALETTE_IN_SPLASH +#endif + +static void wxDrawSplashBitmap(wxDC& dc, const wxBitmap& bitmap, int WXUNUSED(x), int WXUNUSED(y)) +{ + wxMemoryDC dcMem; + +#ifdef USE_PALETTE_IN_SPLASH + bool hiColour = (wxDisplayDepth() >= 16) ; + + if (bitmap.GetPalette() && !hiColour) + { + dcMem.SetPalette(* bitmap.GetPalette()); + } +#endif // USE_PALETTE_IN_SPLASH + + dcMem.SelectObjectAsSource(bitmap); + dc.Blit(0, 0, bitmap.GetWidth(), bitmap.GetHeight(), &dcMem, 0, 0, wxCOPY, + true /* use mask */); + dcMem.SelectObject(wxNullBitmap); + +#ifdef USE_PALETTE_IN_SPLASH + if (bitmap.GetPalette() && !hiColour) + { + dcMem.SetPalette(wxNullPalette); + } +#endif // USE_PALETTE_IN_SPLASH +} + +void wxSplashScreenWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + if (m_bitmap.IsOk()) + wxDrawSplashBitmap(dc, m_bitmap, 0, 0); +} + +void wxSplashScreenWindow::OnEraseBackground(wxEraseEvent& event) +{ + if (event.GetDC() && m_bitmap.IsOk()) + { + wxDrawSplashBitmap(* event.GetDC(), m_bitmap, 0, 0); + } + else + { + wxClientDC dc(this); + if (m_bitmap.IsOk()) + wxDrawSplashBitmap(dc, m_bitmap, 0, 0); + } +} + +#endif // wxUSE_SPLASH diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/splitter.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/splitter.cpp new file mode 100644 index 0000000000..826b92a7d8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/splitter.cpp @@ -0,0 +1,1059 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/splitter.cpp +// Purpose: wxSplitterWindow implementation +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SPLITTER + +#include "wx/splitter.h" + +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/utils.h" + #include "wx/log.h" + + #include "wx/dcclient.h" + #include "wx/dcscreen.h" + + #include "wx/window.h" + #include "wx/dialog.h" + #include "wx/frame.h" + + #include "wx/settings.h" +#endif + +#include "wx/renderer.h" + +#include + +wxDEFINE_EVENT( wxEVT_SPLITTER_SASH_POS_CHANGED, wxSplitterEvent ); +wxDEFINE_EVENT( wxEVT_SPLITTER_SASH_POS_CHANGING, wxSplitterEvent ); +wxDEFINE_EVENT( wxEVT_SPLITTER_DOUBLECLICKED, wxSplitterEvent ); +wxDEFINE_EVENT( wxEVT_SPLITTER_UNSPLIT, wxSplitterEvent ); + +IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindow, wxWindow) + +/* + TODO PROPERTIES + style wxSP_3D + sashpos (long , 0 ) + minsize (long -1 ) + object, object_ref + orientation +*/ + +IMPLEMENT_DYNAMIC_CLASS(wxSplitterEvent, wxNotifyEvent) + +BEGIN_EVENT_TABLE(wxSplitterWindow, wxWindow) + EVT_PAINT(wxSplitterWindow::OnPaint) + EVT_SIZE(wxSplitterWindow::OnSize) + EVT_MOUSE_EVENTS(wxSplitterWindow::OnMouseEvent) + EVT_MOUSE_CAPTURE_LOST(wxSplitterWindow::OnMouseCaptureLost) + +#if defined( __WXMSW__ ) || defined( __WXMAC__) + EVT_SET_CURSOR(wxSplitterWindow::OnSetCursor) +#endif // wxMSW +END_EVENT_TABLE() + +static bool IsLive(wxSplitterWindow* wnd) +{ + // with wxSP_LIVE_UPDATE style the splitter windows are always resized + // following the mouse movement while it drags the sash, without it we only + // draw the sash at the new position but only resize the windows when the + // dragging is finished +#if defined( __WXMAC__ ) && defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX == 1 + return true; // Mac can't paint outside paint event - always need live mode +#else + return wnd->HasFlag(wxSP_LIVE_UPDATE); +#endif +} + +bool wxSplitterWindow::Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + // allow TABbing from one window to the other + style |= wxTAB_TRAVERSAL; + + if ( !wxWindow::Create(parent, id, pos, size, style, name) ) + return false; + + m_lastSize = GetClientSize(); + + m_permitUnsplitAlways = (style & wxSP_PERMIT_UNSPLIT) != 0; + + // FIXME: with this line the background is not erased at all under GTK1, + // so temporary avoid it there +#if !defined(__WXGTK__) || defined(__WXGTK20__) + // don't erase the splitter background, it's pointless as we overwrite it + // anyhow + SetBackgroundStyle(wxBG_STYLE_CUSTOM); +#endif + + return true; +} + +void wxSplitterWindow::Init() +{ + m_splitMode = wxSPLIT_VERTICAL; + m_permitUnsplitAlways = true; + m_windowOne = NULL; + m_windowTwo = NULL; + m_dragMode = wxSPLIT_DRAG_NONE; + m_oldX = 0; + m_oldY = 0; + m_sashStart = 0; + m_sashPosition = 0; + m_requestedSashPosition = INT_MAX; + m_sashGravity = 0.0; + m_lastSize = wxSize(0,0); + m_minimumPaneSize = 0; + m_sashCursorWE = wxCursor(wxCURSOR_SIZEWE); + m_sashCursorNS = wxCursor(wxCURSOR_SIZENS); + m_sashTrackerPen = new wxPen(*wxBLACK, 2, wxPENSTYLE_SOLID); + + m_needUpdating = false; + m_isHot = false; +} + +wxSplitterWindow::~wxSplitterWindow() +{ + delete m_sashTrackerPen; +} + +// ---------------------------------------------------------------------------- +// entering/leaving sash +// ---------------------------------------------------------------------------- + +void wxSplitterWindow::RedrawIfHotSensitive(bool isHot) +{ + if ( wxRendererNative::Get().GetSplitterParams(this).isHotSensitive ) + { + m_isHot = isHot; + + wxClientDC dc(this); + DrawSash(dc); + } + //else: we don't change our appearance, don't redraw to avoid flicker +} + +void wxSplitterWindow::OnEnterSash() +{ + SetResizeCursor(); + + RedrawIfHotSensitive(true); +} + +void wxSplitterWindow::OnLeaveSash() +{ + SetCursor(*wxSTANDARD_CURSOR); + + RedrawIfHotSensitive(false); +} + +void wxSplitterWindow::SetResizeCursor() +{ + SetCursor(m_splitMode == wxSPLIT_VERTICAL ? m_sashCursorWE + : m_sashCursorNS); +} + +// ---------------------------------------------------------------------------- +// other event handlers +// ---------------------------------------------------------------------------- + +void wxSplitterWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); +#ifdef __WXOSX__ + // as subpanels might have a transparent background we must erase the background + // at least on OSX, otherwise traces of the sash will remain + // test with: splitter sample->replace right window + dc.Clear(); +#endif + + DrawSash(dc); +} + +void wxSplitterWindow::OnInternalIdle() +{ + wxWindow::OnInternalIdle(); + + // We may need to update the children sizes in two cases: either because + // we're in the middle of a live update as indicated by m_needUpdating or + // because we have a requested but not yet set sash position as indicated + // by m_requestedSashPosition having a valid value. + if ( m_needUpdating ) + { + m_needUpdating = false; + } + else if ( m_requestedSashPosition == INT_MAX ) + { + // We don't need to resize the children. + return; + } + + SizeWindows(); +} + +void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) +{ + int x = (int)event.GetX(), + y = (int)event.GetY(); + + if ( GetWindowStyle() & wxSP_NOSASH ) + { + event.Skip(); + return; + } + + bool isLive = IsLive(this); + + if (event.LeftDown()) + { + if ( SashHitTest(x, y) ) + { + // Start the drag now + m_dragMode = wxSPLIT_DRAG_DRAGGING; + + // Capture mouse and set the cursor + CaptureMouse(); + SetResizeCursor(); + + if ( !isLive ) + { + // remember the initial sash position and draw the initial + // shadow sash + m_sashPositionCurrent = m_sashPosition; + + m_oldX = (m_splitMode == wxSPLIT_VERTICAL ? m_sashPositionCurrent : x); + m_oldY = (m_splitMode != wxSPLIT_VERTICAL ? m_sashPositionCurrent : y); + DrawSashTracker(m_oldX, m_oldY); + } + + m_ptStart = wxPoint(x,y); + m_sashStart = m_sashPosition; + return; + } + } + else if (event.LeftUp() && m_dragMode == wxSPLIT_DRAG_DRAGGING) + { + // We can stop dragging now and see what we've got. + m_dragMode = wxSPLIT_DRAG_NONE; + + // Release mouse and unset the cursor + ReleaseMouse(); + SetCursor(* wxSTANDARD_CURSOR); + + // exit if unsplit after doubleclick + if ( !IsSplit() ) + { + return; + } + + // Erase old tracker + if ( !isLive ) + { + DrawSashTracker(m_oldX, m_oldY); + } + + // the position of the click doesn't exactly correspond to + // m_sashPosition, rather it changes it by the distance by which the + // mouse has moved + int diff = m_splitMode == wxSPLIT_VERTICAL ? x - m_ptStart.x : y - m_ptStart.y; + + int posSashNew = OnSashPositionChanging(m_sashStart + diff); + if ( posSashNew == -1 ) + { + // change not allowed + return; + } + + if ( m_permitUnsplitAlways || m_minimumPaneSize == 0 ) + { + // Deal with possible unsplit scenarios + if ( posSashNew == 0 ) + { + // We remove the first window from the view + wxWindow *removedWindow = m_windowOne; + m_windowOne = m_windowTwo; + m_windowTwo = NULL; + OnUnsplit(removedWindow); + wxSplitterEvent eventUnsplit(wxEVT_SPLITTER_UNSPLIT, this); + eventUnsplit.m_data.win = removedWindow; + (void)DoSendEvent(eventUnsplit); + SetSashPositionAndNotify(0); + } + else if ( posSashNew == GetWindowSize() ) + { + // We remove the second window from the view + wxWindow *removedWindow = m_windowTwo; + m_windowTwo = NULL; + OnUnsplit(removedWindow); + wxSplitterEvent eventUnsplit(wxEVT_SPLITTER_UNSPLIT, this); + eventUnsplit.m_data.win = removedWindow; + (void)DoSendEvent(eventUnsplit); + SetSashPositionAndNotify(0); + } + else + { + SetSashPositionAndNotify(posSashNew); + } + } + else + { + SetSashPositionAndNotify(posSashNew); + } + + SizeWindows(); + } // left up && dragging + else if ((event.Moving() || event.Leaving() || event.Entering()) && (m_dragMode == wxSPLIT_DRAG_NONE)) + { + if ( event.Leaving() || !SashHitTest(x, y) ) + OnLeaveSash(); + else + OnEnterSash(); + } + else if (event.Dragging() && (m_dragMode == wxSPLIT_DRAG_DRAGGING)) + { + int diff = m_splitMode == wxSPLIT_VERTICAL ? x - m_ptStart.x : y - m_ptStart.y; + + int posSashNew = OnSashPositionChanging(m_sashStart + diff); + if ( posSashNew == -1 ) + { + // change not allowed + return; + } + + if ( !isLive ) + { + if ( posSashNew == m_sashPositionCurrent ) + return; + + m_sashPositionCurrent = posSashNew; + + // Erase old tracker + DrawSashTracker(m_oldX, m_oldY); + + m_oldX = (m_splitMode == wxSPLIT_VERTICAL ? m_sashPositionCurrent : x); + m_oldY = (m_splitMode != wxSPLIT_VERTICAL ? m_sashPositionCurrent : y); + +#ifdef __WXMSW__ + // As we captured the mouse, we may get the mouse events from outside + // our window - for example, negative values in x, y. This has a weird + // consequence under MSW where we use unsigned values sometimes and + // signed ones other times: the coordinates turn as big positive + // numbers and so the sash is drawn on the *right* side of the window + // instead of the left (or bottom instead of top). Correct this. + if ( (short)m_oldX < 0 ) + m_oldX = 0; + if ( (short)m_oldY < 0 ) + m_oldY = 0; +#endif // __WXMSW__ + + // Draw new one + DrawSashTracker(m_oldX, m_oldY); + } + else + { + if ( posSashNew == m_sashPosition ) + return; + + DoSetSashPosition(posSashNew); + + // in live mode, the new position is the actual sash position, clear requested position! + m_requestedSashPosition = INT_MAX; + m_needUpdating = true; + } + } + else if ( event.LeftDClick() && m_windowTwo ) + { + OnDoubleClickSash(x, y); + } + else + { + event.Skip(); + } +} + +void wxSplitterWindow::OnMouseCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event)) +{ + if (m_dragMode != wxSPLIT_DRAG_DRAGGING) + return; + + m_dragMode = wxSPLIT_DRAG_NONE; + + SetCursor(* wxSTANDARD_CURSOR); + + // Erase old tracker + if ( !IsLive(this) ) + { + DrawSashTracker(m_oldX, m_oldY); + } +} + +void wxSplitterWindow::OnSize(wxSizeEvent& event) +{ + // only process this message if we're not iconized - otherwise iconizing + // and restoring a window containing the splitter has a funny side effect + // of changing the splitter position! + wxWindow *parent = wxGetTopLevelParent(this); + bool iconized; + + wxTopLevelWindow *winTop = wxDynamicCast(parent, wxTopLevelWindow); + if ( winTop ) + { + iconized = winTop->IsIconized(); + } + else + { + wxFAIL_MSG(wxT("should have a top level parent!")); + + iconized = false; + } + + if ( iconized ) + { + m_lastSize = wxSize(0,0); + + event.Skip(); + + return; + } + + const wxSize curSize = event.GetSize(); + + // Update the sash position if needed. + // + // Notice that we shouldn't do this if the sash position requested by user + // couldn't be set yet as it would never be taken into account at all if we + // modified it before this happens. + if ( m_windowTwo && m_requestedSashPosition == INT_MAX ) + { + int size = m_splitMode == wxSPLIT_VERTICAL ? curSize.x : curSize.y; + + int old_size = m_splitMode == wxSPLIT_VERTICAL ? m_lastSize.x : m_lastSize.y; + + // Don't do anything if the size didn't really change. + if ( size != old_size ) + { + int newPosition = -1; + + // Apply gravity if we use it. + int delta = (int) ( (size - old_size)*m_sashGravity ); + if ( delta != 0 ) + { + newPosition = m_sashPosition + delta; + if( newPosition < m_minimumPaneSize ) + newPosition = m_minimumPaneSize; + } + + // Also check if the second window became too small. + newPosition = AdjustSashPosition(newPosition == -1 + ? m_sashPosition + : newPosition); + if ( newPosition != m_sashPosition ) + SetSashPositionAndNotify(newPosition); + } + } + + m_lastSize = curSize; + + SizeWindows(); +} + +void wxSplitterWindow::SetSashGravity(double gravity) +{ + wxCHECK_RET( gravity >= 0. && gravity <= 1., + wxT("invalid gravity value") ); + + m_sashGravity = gravity; +} + +bool wxSplitterWindow::SashHitTest(int x, int y) +{ + if ( m_windowTwo == NULL || m_sashPosition == 0) + return false; // No sash + + int z = m_splitMode == wxSPLIT_VERTICAL ? x : y; + int hitMax = m_sashPosition + GetSashSize() - 1; + + return z >= m_sashPosition && z <= hitMax; +} + +void wxSplitterWindow::SetSashInvisible(bool invisible) +{ + if ( IsSashInvisible() != invisible ) + ToggleWindowStyle(wxSP_NOSASH); +} + +int wxSplitterWindow::GetSashSize() const +{ + return IsSashInvisible() ? 0 : GetDefaultSashSize(); +} + +int wxSplitterWindow::GetDefaultSashSize() const +{ + return wxRendererNative::Get().GetSplitterParams(this).widthSash; +} + +int wxSplitterWindow::GetBorderSize() const +{ + return wxRendererNative::Get().GetSplitterParams(this).border; +} + +// Draw the sash +void wxSplitterWindow::DrawSash(wxDC& dc) +{ + if (HasFlag(wxSP_3DBORDER)) + wxRendererNative::Get().DrawSplitterBorder + ( + this, + dc, + GetClientRect() + ); + + // don't draw sash if we're not split + if ( m_sashPosition == 0 || !m_windowTwo ) + return; + + // nor if we're configured to not show it + if ( IsSashInvisible() ) + return; + + wxRendererNative::Get().DrawSplitterSash + ( + this, + dc, + GetClientSize(), + m_sashPosition, + m_splitMode == wxSPLIT_VERTICAL ? wxVERTICAL + : wxHORIZONTAL, + m_isHot ? (int)wxCONTROL_CURRENT : 0 + ); +} + +// Draw the sash tracker (for whilst moving the sash) +void wxSplitterWindow::DrawSashTracker(int x, int y) +{ + int w, h; + GetClientSize(&w, &h); + + wxScreenDC screenDC; + int x1, y1; + int x2, y2; + + if ( m_splitMode == wxSPLIT_VERTICAL ) + { + x1 = x2 = wxClip(x, 0, w) + m_sashTrackerPen->GetWidth()/2; + y1 = 2; + y2 = h-2; + } + else + { + y1 = y2 = wxClip(y, 0, h) + m_sashTrackerPen->GetWidth()/2; + x1 = 2; + x2 = w-2; + } + + ClientToScreen(&x1, &y1); + ClientToScreen(&x2, &y2); + + screenDC.SetLogicalFunction(wxINVERT); + screenDC.SetPen(*m_sashTrackerPen); + screenDC.SetBrush(*wxTRANSPARENT_BRUSH); + + screenDC.DrawLine(x1, y1, x2, y2); + + screenDC.SetLogicalFunction(wxCOPY); +} + +int wxSplitterWindow::GetWindowSize() const +{ + wxSize size = GetClientSize(); + + return m_splitMode == wxSPLIT_VERTICAL ? size.x : size.y; +} + +int wxSplitterWindow::AdjustSashPosition(int sashPos) const +{ + wxWindow *win; + + win = GetWindow1(); + if ( win ) + { + // the window shouldn't be smaller than its own minimal size nor + // smaller than the minimual pane size specified for this splitter + int minSize = m_splitMode == wxSPLIT_VERTICAL ? win->GetMinWidth() + : win->GetMinHeight(); + + if ( minSize == -1 || m_minimumPaneSize > minSize ) + minSize = m_minimumPaneSize; + + minSize += GetBorderSize(); + + if ( sashPos < minSize ) + sashPos = minSize; + } + + win = GetWindow2(); + if ( win ) + { + int minSize = m_splitMode == wxSPLIT_VERTICAL ? win->GetMinWidth() + : win->GetMinHeight(); + + if ( minSize == -1 || m_minimumPaneSize > minSize ) + minSize = m_minimumPaneSize; + + int maxSize = GetWindowSize() - minSize - GetBorderSize() - GetSashSize(); + if ( maxSize > 0 && sashPos > maxSize && maxSize >= m_minimumPaneSize) + sashPos = maxSize; + } + + return sashPos; +} + +bool wxSplitterWindow::DoSetSashPosition(int sashPos) +{ + int newSashPosition = AdjustSashPosition(sashPos); + + if ( newSashPosition == m_sashPosition ) + return false; + + m_sashPosition = newSashPosition; + + return true; +} + +void wxSplitterWindow::SetSashPositionAndNotify(int sashPos) +{ + // we must reset the request here, otherwise the sash would be stuck at + // old position if the user attempted to move the sash after invalid + // (e.g. smaller than minsize) sash position was requested using + // SetSashPosition(): + m_requestedSashPosition = INT_MAX; + + // note that we must send the event in any case, i.e. even if the sash + // position hasn't changed and DoSetSashPosition() returns false because we + // must generate a CHANGED event at the end of resizing + DoSetSashPosition(sashPos); + + wxSplitterEvent event(wxEVT_SPLITTER_SASH_POS_CHANGED, this); + event.m_data.pos = m_sashPosition; + + (void)DoSendEvent(event); +} + +// Position and size subwindows. +// Note that the border size applies to each subwindow, not +// including the edges next to the sash. +void wxSplitterWindow::SizeWindows() +{ + // check if we have delayed setting the real sash position + if ( m_requestedSashPosition != INT_MAX ) + { + int newSashPosition = ConvertSashPosition(m_requestedSashPosition); + if ( newSashPosition != m_sashPosition ) + { + DoSetSashPosition(newSashPosition); + } + + if ( newSashPosition <= m_sashPosition + && newSashPosition >= m_sashPosition - GetBorderSize() ) + { + // don't update it any more + m_requestedSashPosition = INT_MAX; + } + } + + int w, h; + GetClientSize(&w, &h); + + if ( GetWindow1() && !GetWindow2() ) + { + GetWindow1()->SetSize(GetBorderSize(), GetBorderSize(), + w - 2*GetBorderSize(), h - 2*GetBorderSize()); + } + else if ( GetWindow1() && GetWindow2() ) + { + const int border = GetBorderSize(), + sash = GetSashSize(); + + int size1 = GetSashPosition() - border, + size2 = GetSashPosition() + sash; + + int x2, y2, w1, h1, w2, h2; + if ( GetSplitMode() == wxSPLIT_VERTICAL ) + { + w1 = size1; + w2 = w - 2*border - sash - w1; + if (w2 < 0) + w2 = 0; + h2 = h - 2*border; + if (h2 < 0) + h2 = 0; + h1 = h2; + x2 = size2; + y2 = border; + } + else // horz splitter + { + w2 = w - 2*border; + if (w2 < 0) + w2 = 0; + w1 = w2; + h1 = size1; + h2 = h - 2*border - sash - h1; + if (h2 < 0) + h2 = 0; + x2 = border; + y2 = size2; + } + + GetWindow2()->SetSize(x2, y2, w2, h2); + GetWindow1()->SetSize(border, border, w1, h1); + } + + wxClientDC dc(this); + DrawSash(dc); +} + +// Set pane for unsplit window +void wxSplitterWindow::Initialize(wxWindow *window) +{ + wxASSERT_MSG( (!window || window->GetParent() == this), + wxT("windows in the splitter should have it as parent!") ); + + if (window && !window->IsShown()) + window->Show(); + + m_windowOne = window; + m_windowTwo = NULL; + DoSetSashPosition(0); +} + +// Associates the given window with window 2, drawing the appropriate sash +// and changing the split mode. +// Does nothing and returns false if the window is already split. +bool wxSplitterWindow::DoSplit(wxSplitMode mode, + wxWindow *window1, wxWindow *window2, + int sashPosition) +{ + if ( IsSplit() ) + return false; + + wxCHECK_MSG( window1 && window2, false, + wxT("cannot split with NULL window(s)") ); + + wxCHECK_MSG( window1->GetParent() == this && window2->GetParent() == this, false, + wxT("windows in the splitter should have it as parent!") ); + + if (! window1->IsShown()) + window1->Show(); + if (! window2->IsShown()) + window2->Show(); + + m_splitMode = mode; + m_windowOne = window1; + m_windowTwo = window2; + + + SetSashPosition(sashPosition, true); + return true; +} + +int wxSplitterWindow::ConvertSashPosition(int sashPosition) const +{ + if ( sashPosition > 0 ) + { + return sashPosition; + } + else if ( sashPosition < 0 ) + { + // It's negative so adding is subtracting + return GetWindowSize() + sashPosition; + } + else // sashPosition == 0 + { + // default, put it in the centre + return GetWindowSize() / 2; + } +} + +// Remove the specified (or second) window from the view +// Doesn't actually delete the window. +bool wxSplitterWindow::Unsplit(wxWindow *toRemove) +{ + if ( ! IsSplit() ) + return false; + + wxWindow *win; + if ( toRemove == NULL || toRemove == m_windowTwo) + { + win = m_windowTwo ; + m_windowTwo = NULL; + } + else if ( toRemove == m_windowOne ) + { + win = m_windowOne ; + m_windowOne = m_windowTwo; + m_windowTwo = NULL; + } + else + { + wxFAIL_MSG(wxT("splitter: attempt to remove a non-existent window")); + + return false; + } + + OnUnsplit(win); + DoSetSashPosition(0); + SizeWindows(); + + return true; +} + +// Replace a window with another one +bool wxSplitterWindow::ReplaceWindow(wxWindow *winOld, wxWindow *winNew) +{ + wxCHECK_MSG( winOld, false, wxT("use one of Split() functions instead") ); + wxCHECK_MSG( winNew, false, wxT("use Unsplit() functions instead") ); + + if ( winOld == m_windowTwo ) + { + m_windowTwo = winNew; + } + else if ( winOld == m_windowOne ) + { + m_windowOne = winNew; + } + else + { + wxFAIL_MSG(wxT("splitter: attempt to replace a non-existent window")); + + return false; + } + + SizeWindows(); + + return true; +} + +void wxSplitterWindow::SetMinimumPaneSize(int min) +{ + m_minimumPaneSize = min; + int pos = m_requestedSashPosition != INT_MAX ? m_requestedSashPosition : m_sashPosition; + SetSashPosition(pos); // re-check limits +} + +void wxSplitterWindow::SetSashPosition(int position, bool redraw) +{ + // remember the sash position we want to set for later if we can't set it + // right now (e.g. because the window is too small) + m_requestedSashPosition = position; + + DoSetSashPosition(ConvertSashPosition(position)); + + if ( redraw ) + { + SizeWindows(); + } +} + +// Make sure the child window sizes are updated. This is useful +// for reducing flicker by updating the sizes before a +// window is shown, if you know the overall size is correct. +void wxSplitterWindow::UpdateSize() +{ + SizeWindows(); +} + +bool wxSplitterWindow::DoSendEvent(wxSplitterEvent& event) +{ + return !GetEventHandler()->ProcessEvent(event) || event.IsAllowed(); +} + +wxSize wxSplitterWindow::DoGetBestSize() const +{ + // get best sizes of subwindows + wxSize size1, size2; + if ( m_windowOne ) + size1 = m_windowOne->GetEffectiveMinSize(); + if ( m_windowTwo ) + size2 = m_windowTwo->GetEffectiveMinSize(); + + // sum them + // + // pSash points to the size component to which sash size must be added + int *pSash; + wxSize sizeBest; + if ( m_splitMode == wxSPLIT_VERTICAL ) + { + sizeBest.y = wxMax(size1.y, size2.y); + sizeBest.x = wxMax(size1.x, m_minimumPaneSize) + + wxMax(size2.x, m_minimumPaneSize); + + pSash = &sizeBest.x; + } + else // wxSPLIT_HORIZONTAL + { + sizeBest.x = wxMax(size1.x, size2.x); + sizeBest.y = wxMax(size1.y, m_minimumPaneSize) + + wxMax(size2.y, m_minimumPaneSize); + + pSash = &sizeBest.y; + } + + // account for the sash if the window is actually split + if ( m_windowOne && m_windowTwo ) + *pSash += GetSashSize(); + + // account for the border too + int border = 2*GetBorderSize(); + sizeBest.x += border; + sizeBest.y += border; + + return sizeBest; +} + +// --------------------------------------------------------------------------- +// wxSplitterWindow virtual functions: they now just generate the events +// --------------------------------------------------------------------------- + +bool wxSplitterWindow::OnSashPositionChange(int WXUNUSED(newSashPosition)) +{ + // always allow by default + return true; +} + +int wxSplitterWindow::OnSashPositionChanging(int newSashPosition) +{ + // If within UNSPLIT_THRESHOLD from edge, set to edge to cause closure. + const int UNSPLIT_THRESHOLD = 4; + + // first of all, check if OnSashPositionChange() doesn't forbid this change + if ( !OnSashPositionChange(newSashPosition) ) + { + // it does + return -1; + } + + // Obtain relevant window dimension for bottom / right threshold check + int window_size = GetWindowSize(); + + bool unsplit_scenario = false; + if ( m_permitUnsplitAlways || m_minimumPaneSize == 0 ) + { + // Do edge detection if unsplit premitted + if ( newSashPosition <= UNSPLIT_THRESHOLD ) + { + // threshold top / left check + newSashPosition = 0; + unsplit_scenario = true; + } + if ( newSashPosition >= window_size - UNSPLIT_THRESHOLD ) + { + // threshold bottom/right check + newSashPosition = window_size; + unsplit_scenario = true; + } + } + + if ( !unsplit_scenario ) + { + // If resultant pane would be too small, enlarge it + newSashPosition = AdjustSashPosition(newSashPosition); + + // If the result is out of bounds it means minimum size is too big, + // so split window in half as best compromise. + if ( newSashPosition < 0 || newSashPosition > window_size ) + newSashPosition = window_size / 2; + } + + // now let the event handler have it + // + // FIXME: shouldn't we do it before the adjustments above so as to ensure + // that the sash position is always reasonable? + wxSplitterEvent event(wxEVT_SPLITTER_SASH_POS_CHANGING, this); + event.m_data.pos = newSashPosition; + + if ( !DoSendEvent(event) ) + { + // the event handler vetoed the change + newSashPosition = -1; + } + else + { + // it could have been changed by it + newSashPosition = event.GetSashPosition(); + } + + return newSashPosition; +} + +// Called when the sash is double-clicked. The default behaviour is to remove +// the sash if the minimum pane size is zero. +void wxSplitterWindow::OnDoubleClickSash(int x, int y) +{ + wxCHECK_RET(m_windowTwo, wxT("splitter: no window to remove")); + + // new code should handle events instead of using the virtual functions + wxSplitterEvent event(wxEVT_SPLITTER_DOUBLECLICKED, this); + event.m_data.pt.x = x; + event.m_data.pt.y = y; + if ( DoSendEvent(event) ) + { + if ( GetMinimumPaneSize() == 0 || m_permitUnsplitAlways ) + { + wxWindow* win = m_windowTwo; + if ( Unsplit(win) ) + { + wxSplitterEvent unsplitEvent(wxEVT_SPLITTER_UNSPLIT, this); + unsplitEvent.m_data.win = win; + (void)DoSendEvent(unsplitEvent); + } + } + } + //else: blocked by user +} + +void wxSplitterWindow::OnUnsplit(wxWindow *winRemoved) +{ + // call this before calling the event handler which may delete the window + winRemoved->Show(false); +} + +#if defined( __WXMSW__ ) || defined( __WXMAC__) + +// this is currently called (and needed) under MSW only... +void wxSplitterWindow::OnSetCursor(wxSetCursorEvent& event) +{ + // if we don't do it, the resizing cursor might be set for child window: + // and like this we explicitly say that our cursor should not be used for + // children windows which overlap us + + if ( SashHitTest(event.GetX(), event.GetY()) ) + { + // default processing is ok + event.Skip(); + } + //else: do nothing, in particular, don't call Skip() +} + +#endif // wxMSW || wxMac + +#endif // wxUSE_SPLITTER + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/srchctlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/srchctlg.cpp new file mode 100644 index 0000000000..ccf7ccbcfc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/srchctlg.cpp @@ -0,0 +1,1223 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/srchctlg.cpp +// Purpose: implements wxSearchCtrl as a composite control +// Author: Vince Harron +// Created: 2006-02-19 +// Copyright: Vince Harron +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SEARCHCTRL + +#include "wx/srchctrl.h" + +#ifndef WX_PRECOMP + #include "wx/button.h" + #include "wx/dcclient.h" + #include "wx/menu.h" + #include "wx/dcmemory.h" +#endif //WX_PRECOMP + +#if !wxUSE_NATIVE_SEARCH_CONTROL + +#include "wx/image.h" + +#define WXMAX(a,b) ((a)>(b)?(a):(b)) + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// the margin between the text control and the search/cancel buttons +static const wxCoord MARGIN = 2; + +// border around all controls to compensate for wxSIMPLE_BORDER +#if defined(__WXMSW__) +static const wxCoord BORDER = 0; +static const wxCoord ICON_MARGIN = 2; +static const wxCoord ICON_OFFSET = 2; +#else +static const wxCoord BORDER = 2; +static const wxCoord ICON_MARGIN = 0; +static const wxCoord ICON_OFFSET = 0; +#endif + +#define LIGHT_STEP 160 + +// ---------------------------------------------------------------------------- +// wxSearchTextCtrl: text control used by search control +// ---------------------------------------------------------------------------- + +class wxSearchTextCtrl : public wxTextCtrl +{ +public: + wxSearchTextCtrl(wxSearchCtrl *search, const wxString& value, int style) + : wxTextCtrl(search, wxID_ANY, value, wxDefaultPosition, wxDefaultSize, + (style & ~wxBORDER_MASK) | wxNO_BORDER) + { + m_search = search; + + SetHint(_("Search")); + + // Ensure that our best size is recomputed using our overridden + // DoGetBestSize(). + InvalidateBestSize(); + } + + virtual wxWindow* GetMainWindowOfCompositeControl() + { + return m_search; + } + + // provide access to the base class protected methods to wxSearchCtrl which + // needs to forward to them + void DoSetValue(const wxString& value, int flags) + { + wxTextCtrl::DoSetValue(value, flags); + } + + bool DoLoadFile(const wxString& file, int fileType) + { + return wxTextCtrl::DoLoadFile(file, fileType); + } + + bool DoSaveFile(const wxString& file, int fileType) + { + return wxTextCtrl::DoSaveFile(file, fileType); + } + +protected: + void OnText(wxCommandEvent& eventText) + { + wxCommandEvent event(eventText); + event.SetEventObject(m_search); + event.SetId(m_search->GetId()); + + m_search->GetEventHandler()->ProcessEvent(event); + } + + void OnTextUrl(wxTextUrlEvent& eventText) + { + // copy constructor is disabled for some reason? + //wxTextUrlEvent event(eventText); + wxTextUrlEvent event( + m_search->GetId(), + eventText.GetMouseEvent(), + eventText.GetURLStart(), + eventText.GetURLEnd() + ); + event.SetEventObject(m_search); + + m_search->GetEventHandler()->ProcessEvent(event); + } + +#ifdef __WXMSW__ + // We increase the text control height to be the same as for the controls + // with border as this is what we actually need here because even though + // this control itself is borderless, it's inside wxSearchCtrl which does + // have the border and so should have the same height as the normal text + // entries with border. + // + // This is a bit ugly and it would arguably be better to use whatever size + // the base class version returns and just centre the text vertically in + // the search control but I failed to modify the code in LayoutControls() + // to do this easily and as there is much in that code I don't understand + // (notably what is the logic for buttons sizing?) I prefer to not touch it + // at all. + virtual wxSize DoGetBestSize() const + { + const long flags = GetWindowStyleFlag(); + wxSearchTextCtrl* const self = const_cast(this); + + self->SetWindowStyleFlag((flags & ~wxBORDER_MASK) | wxBORDER_DEFAULT); + const wxSize size = wxTextCtrl::DoGetBestSize(); + self->SetWindowStyleFlag(flags); + + return size; + } +#endif // __WXMSW__ + +private: + wxSearchCtrl* m_search; + + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxSearchTextCtrl, wxTextCtrl) + EVT_TEXT(wxID_ANY, wxSearchTextCtrl::OnText) + EVT_TEXT_ENTER(wxID_ANY, wxSearchTextCtrl::OnText) + EVT_TEXT_URL(wxID_ANY, wxSearchTextCtrl::OnTextUrl) + EVT_TEXT_MAXLEN(wxID_ANY, wxSearchTextCtrl::OnText) +END_EVENT_TABLE() + +// ---------------------------------------------------------------------------- +// wxSearchButton: search button used by search control +// ---------------------------------------------------------------------------- + +class wxSearchButton : public wxControl +{ +public: + wxSearchButton(wxSearchCtrl *search, int eventType, const wxBitmap& bmp) + : wxControl(search, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER), + m_search(search), + m_eventType(eventType), + m_bmp(bmp) + { } + + void SetBitmapLabel(const wxBitmap& label) + { + m_bmp = label; + InvalidateBestSize(); + } + + // The buttons in wxSearchCtrl shouldn't accept focus from keyboard because + // this would interfere with the usual TAB processing: the user expects + // that pressing TAB in the search control should switch focus to the next + // control and not give it to the button inside the same control. Besides, + // the search button can be already activated by pressing "Enter" so there + // is really no reason for it to be able to get focus from keyboard. + virtual bool AcceptsFocusFromKeyboard() const { return false; } + + virtual wxWindow* GetMainWindowOfCompositeControl() + { + return m_search; + } + +protected: + wxSize DoGetBestSize() const + { + return wxSize(m_bmp.GetWidth(), m_bmp.GetHeight()); + } + + void OnLeftUp(wxMouseEvent&) + { + wxCommandEvent event(m_eventType, m_search->GetId()); + event.SetEventObject(m_search); + + if ( m_eventType == wxEVT_SEARCHCTRL_SEARCH_BTN ) + { + // it's convenient to have the string to search for directly in the + // event instead of having to retrieve it from the control in the + // event handler code later, so provide it here + event.SetString(m_search->GetValue()); + } + + GetEventHandler()->ProcessEvent(event); + + m_search->SetFocus(); + +#if wxUSE_MENUS + if ( m_eventType == wxEVT_SEARCHCTRL_SEARCH_BTN ) + { + // this happens automatically, just like on Mac OS X + m_search->PopupSearchMenu(); + } +#endif // wxUSE_MENUS + } + + void OnPaint(wxPaintEvent&) + { + wxPaintDC dc(this); + dc.DrawBitmap(m_bmp, 0,0, true); + } + + +private: + wxSearchCtrl *m_search; + wxEventType m_eventType; + wxBitmap m_bmp; + + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxSearchButton, wxControl) + EVT_LEFT_UP(wxSearchButton::OnLeftUp) + EVT_PAINT(wxSearchButton::OnPaint) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(wxSearchCtrl, wxSearchCtrlBase) + EVT_SEARCHCTRL_CANCEL_BTN(wxID_ANY, wxSearchCtrl::OnCancelButton) + EVT_SET_FOCUS(wxSearchCtrl::OnSetFocus) + EVT_SIZE(wxSearchCtrl::OnSize) +END_EVENT_TABLE() + +IMPLEMENT_DYNAMIC_CLASS(wxSearchCtrl, wxSearchCtrlBase) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxSearchCtrl creation +// ---------------------------------------------------------------------------- + +// creation +// -------- + +wxSearchCtrl::wxSearchCtrl() +{ + Init(); +} + +wxSearchCtrl::wxSearchCtrl(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + Init(); + + Create(parent, id, value, pos, size, style, validator, name); +} + +void wxSearchCtrl::Init() +{ + m_text = NULL; + m_searchButton = NULL; + m_cancelButton = NULL; +#if wxUSE_MENUS + m_menu = NULL; +#endif // wxUSE_MENUS + + m_searchButtonVisible = true; + m_cancelButtonVisible = false; + + m_searchBitmapUser = false; + m_cancelBitmapUser = false; +#if wxUSE_MENUS + m_searchMenuBitmapUser = false; +#endif // wxUSE_MENUS +} + +bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + // force border style for more native appearance + style &= ~wxBORDER_MASK; +#ifdef __WXGTK__ + style |= wxBORDER_SUNKEN; +#elif defined(__WXMSW__) + // Don't set the style explicitly, let GetDefaultBorder() work it out, unless + // we will get a sunken border (e.g. on Windows 200) in which case we must + // override with a simple border. + if (GetDefaultBorder() == wxBORDER_SUNKEN) + style |= wxBORDER_SIMPLE; +#else + style |= wxBORDER_SIMPLE; +#endif + if ( !wxSearchCtrlBaseBaseClass::Create(parent, id, pos, size, + style, validator, name) ) + { + return false; + } + + m_text = new wxSearchTextCtrl(this, value, style); + + m_searchButton = new wxSearchButton(this, + wxEVT_SEARCHCTRL_SEARCH_BTN, + m_searchBitmap); + m_cancelButton = new wxSearchButton(this, + wxEVT_SEARCHCTRL_CANCEL_BTN, + m_cancelBitmap); + + SetBackgroundColour( m_text->GetBackgroundColour() ); + + RecalcBitmaps(); + + SetInitialSize(size); + Move(pos); + return true; +} + +wxSearchCtrl::~wxSearchCtrl() +{ + delete m_text; + delete m_searchButton; + delete m_cancelButton; +#if wxUSE_MENUS + delete m_menu; +#endif // wxUSE_MENUS +} + + +// search control specific interfaces +#if wxUSE_MENUS + +void wxSearchCtrl::SetMenu( wxMenu* menu ) +{ + if ( menu == m_menu ) + { + // no change + return; + } + bool hadMenu = (m_menu != NULL); + delete m_menu; + m_menu = menu; + + if ( m_menu && !hadMenu ) + { + m_searchButton->SetBitmapLabel(m_searchMenuBitmap); + m_searchButton->Refresh(); + } + else if ( !m_menu && hadMenu ) + { + m_searchButton->SetBitmapLabel(m_searchBitmap); + if ( m_searchButtonVisible ) + { + m_searchButton->Refresh(); + } + } + wxRect rect = GetRect(); + LayoutControls(0, 0, rect.GetWidth(), rect.GetHeight()); +} + +wxMenu* wxSearchCtrl::GetMenu() +{ + return m_menu; +} + +#endif // wxUSE_MENUS + +void wxSearchCtrl::ShowSearchButton( bool show ) +{ + if ( m_searchButtonVisible == show ) + { + // no change + return; + } + m_searchButtonVisible = show; + if ( m_searchButtonVisible ) + { + RecalcBitmaps(); + } + + wxRect rect = GetRect(); + LayoutControls(0, 0, rect.GetWidth(), rect.GetHeight()); +} + +bool wxSearchCtrl::IsSearchButtonVisible() const +{ + return m_searchButtonVisible; +} + + +void wxSearchCtrl::ShowCancelButton( bool show ) +{ + if ( m_cancelButtonVisible == show ) + { + // no change + return; + } + m_cancelButtonVisible = show; + + wxRect rect = GetRect(); + LayoutControls(0, 0, rect.GetWidth(), rect.GetHeight()); +} + +bool wxSearchCtrl::IsCancelButtonVisible() const +{ + return m_cancelButtonVisible; +} + +void wxSearchCtrl::SetDescriptiveText(const wxString& text) +{ + m_text->SetHint(text); +} + +wxString wxSearchCtrl::GetDescriptiveText() const +{ + return m_text->GetHint(); +} + +// ---------------------------------------------------------------------------- +// geometry +// ---------------------------------------------------------------------------- + +wxSize wxSearchCtrl::DoGetBestSize() const +{ + wxSize sizeText = m_text->GetBestSize(); + wxSize sizeSearch(0,0); + wxSize sizeCancel(0,0); + int searchMargin = 0; + int cancelMargin = 0; + if ( m_searchButtonVisible || HasMenu() ) + { + sizeSearch = m_searchButton->GetBestSize(); + searchMargin = MARGIN; + } + if ( m_cancelButtonVisible ) + { + sizeCancel = m_cancelButton->GetBestSize(); + cancelMargin = MARGIN; + } + + int horizontalBorder = 1 + ( sizeText.y - sizeText.y * 14 / 21 ) / 2; + + // buttons are square and equal to the height of the text control + int height = sizeText.y; + return wxSize(sizeSearch.x + searchMargin + sizeText.x + cancelMargin + sizeCancel.x + 2*horizontalBorder, + height + 2*BORDER); +} + +void wxSearchCtrl::DoMoveWindow(int x, int y, int width, int height) +{ + wxSearchCtrlBase::DoMoveWindow(x, y, width, height); + + LayoutControls(0, 0, width, height); +} + +void wxSearchCtrl::LayoutControls(int x, int y, int width, int height) +{ + if ( !m_text ) + return; + + wxSize sizeText = m_text->GetBestSize(); + // make room for the search menu & clear button + int horizontalBorder = ( sizeText.y - sizeText.y * 14 / 21 ) / 2; + x += horizontalBorder; + y += BORDER; + width -= horizontalBorder*2; + height -= BORDER*2; + if (width < 0) width = 0; + if (height < 0) height = 0; + + wxSize sizeSearch(0,0); + wxSize sizeCancel(0,0); + int searchMargin = 0; + int cancelMargin = 0; + if ( m_searchButtonVisible || HasMenu() ) + { + sizeSearch = m_searchButton->GetBestSize(); + searchMargin = MARGIN; + } + if ( m_cancelButtonVisible ) + { + sizeCancel = m_cancelButton->GetBestSize(); + cancelMargin = MARGIN; + } + m_searchButton->Show( m_searchButtonVisible || HasMenu() ); + m_cancelButton->Show( m_cancelButtonVisible ); + + if ( sizeSearch.x + sizeCancel.x > width ) + { + sizeSearch.x = width/2; + sizeCancel.x = width/2; + searchMargin = 0; + cancelMargin = 0; + } + wxCoord textWidth = width - sizeSearch.x - sizeCancel.x - searchMargin - cancelMargin - 1; + if (textWidth < 0) textWidth = 0; + + // position the subcontrols inside the client area + + m_searchButton->SetSize(x, y + ICON_OFFSET - 1, sizeSearch.x, height); + m_text->SetSize( x + sizeSearch.x + searchMargin, + y + ICON_OFFSET - BORDER, + textWidth, + height); + m_cancelButton->SetSize(x + sizeSearch.x + searchMargin + textWidth + cancelMargin, + y + ICON_OFFSET - 1, sizeCancel.x, height); +} + +wxWindowList wxSearchCtrl::GetCompositeWindowParts() const +{ + wxWindowList parts; + parts.push_back(m_text); + parts.push_back(m_searchButton); + parts.push_back(m_cancelButton); + return parts; +} + +// accessors +// --------- + +wxString wxSearchCtrl::DoGetValue() const +{ + return m_text->GetValue(); +} +wxString wxSearchCtrl::GetRange(long from, long to) const +{ + return m_text->GetRange(from, to); +} + +int wxSearchCtrl::GetLineLength(long lineNo) const +{ + return m_text->GetLineLength(lineNo); +} +wxString wxSearchCtrl::GetLineText(long lineNo) const +{ + return m_text->GetLineText(lineNo); +} +int wxSearchCtrl::GetNumberOfLines() const +{ + return m_text->GetNumberOfLines(); +} + +bool wxSearchCtrl::IsModified() const +{ + return m_text->IsModified(); +} +bool wxSearchCtrl::IsEditable() const +{ + return m_text->IsEditable(); +} + +// more readable flag testing methods +bool wxSearchCtrl::IsSingleLine() const +{ + return m_text->IsSingleLine(); +} +bool wxSearchCtrl::IsMultiLine() const +{ + return m_text->IsMultiLine(); +} + +// If the return values from and to are the same, there is no selection. +void wxSearchCtrl::GetSelection(long* from, long* to) const +{ + m_text->GetSelection(from, to); +} + +wxString wxSearchCtrl::GetStringSelection() const +{ + return m_text->GetStringSelection(); +} + +// operations +// ---------- + +// editing +void wxSearchCtrl::Clear() +{ + m_text->Clear(); +} +void wxSearchCtrl::Replace(long from, long to, const wxString& value) +{ + m_text->Replace(from, to, value); +} +void wxSearchCtrl::Remove(long from, long to) +{ + m_text->Remove(from, to); +} + +// load/save the controls contents from/to the file +bool wxSearchCtrl::LoadFile(const wxString& file) +{ + return m_text->LoadFile(file); +} +bool wxSearchCtrl::SaveFile(const wxString& file) +{ + return m_text->SaveFile(file); +} + +// sets/clears the dirty flag +void wxSearchCtrl::MarkDirty() +{ + m_text->MarkDirty(); +} +void wxSearchCtrl::DiscardEdits() +{ + m_text->DiscardEdits(); +} + +// set the max number of characters which may be entered in a single line +// text control +void wxSearchCtrl::SetMaxLength(unsigned long len) +{ + m_text->SetMaxLength(len); +} + +// writing text inserts it at the current position, appending always +// inserts it at the end +void wxSearchCtrl::WriteText(const wxString& text) +{ + m_text->WriteText(text); +} +void wxSearchCtrl::AppendText(const wxString& text) +{ + m_text->AppendText(text); +} + +// insert the character which would have resulted from this key event, +// return true if anything has been inserted +bool wxSearchCtrl::EmulateKeyPress(const wxKeyEvent& event) +{ + return m_text->EmulateKeyPress(event); +} + +// text control under some platforms supports the text styles: these +// methods allow to apply the given text style to the given selection or to +// set/get the style which will be used for all appended text +bool wxSearchCtrl::SetStyle(long start, long end, const wxTextAttr& style) +{ + return m_text->SetStyle(start, end, style); +} +bool wxSearchCtrl::GetStyle(long position, wxTextAttr& style) +{ + return m_text->GetStyle(position, style); +} +bool wxSearchCtrl::SetDefaultStyle(const wxTextAttr& style) +{ + return m_text->SetDefaultStyle(style); +} +const wxTextAttr& wxSearchCtrl::GetDefaultStyle() const +{ + return m_text->GetDefaultStyle(); +} + +// translate between the position (which is just an index in the text ctrl +// considering all its contents as a single strings) and (x, y) coordinates +// which represent column and line. +long wxSearchCtrl::XYToPosition(long x, long y) const +{ + return m_text->XYToPosition(x, y); +} +bool wxSearchCtrl::PositionToXY(long pos, long *x, long *y) const +{ + return m_text->PositionToXY(pos, x, y); +} + +void wxSearchCtrl::ShowPosition(long pos) +{ + m_text->ShowPosition(pos); +} + +// find the character at position given in pixels +// +// NB: pt is in device coords (not adjusted for the client area origin nor +// scrolling) +wxTextCtrlHitTestResult wxSearchCtrl::HitTest(const wxPoint& pt, long *pos) const +{ + return m_text->HitTest(pt, pos); +} +wxTextCtrlHitTestResult wxSearchCtrl::HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const +{ + return m_text->HitTest(pt, col, row); +} + +// Clipboard operations +void wxSearchCtrl::Copy() +{ + m_text->Copy(); +} +void wxSearchCtrl::Cut() +{ + m_text->Cut(); +} +void wxSearchCtrl::Paste() +{ + m_text->Paste(); +} + +bool wxSearchCtrl::CanCopy() const +{ + return m_text->CanCopy(); +} +bool wxSearchCtrl::CanCut() const +{ + return m_text->CanCut(); +} +bool wxSearchCtrl::CanPaste() const +{ + return m_text->CanPaste(); +} + +// Undo/redo +void wxSearchCtrl::Undo() +{ + m_text->Undo(); +} +void wxSearchCtrl::Redo() +{ + m_text->Redo(); +} + +bool wxSearchCtrl::CanUndo() const +{ + return m_text->CanUndo(); +} +bool wxSearchCtrl::CanRedo() const +{ + return m_text->CanRedo(); +} + +// Insertion point +void wxSearchCtrl::SetInsertionPoint(long pos) +{ + m_text->SetInsertionPoint(pos); +} +void wxSearchCtrl::SetInsertionPointEnd() +{ + m_text->SetInsertionPointEnd(); +} +long wxSearchCtrl::GetInsertionPoint() const +{ + return m_text->GetInsertionPoint(); +} +long wxSearchCtrl::GetLastPosition() const +{ + return m_text->GetLastPosition(); +} + +void wxSearchCtrl::SetSelection(long from, long to) +{ + m_text->SetSelection(from, to); +} +void wxSearchCtrl::SelectAll() +{ + m_text->SelectAll(); +} + +void wxSearchCtrl::SetEditable(bool editable) +{ + m_text->SetEditable(editable); +} + +bool wxSearchCtrl::SetFont(const wxFont& font) +{ + if ( !wxSearchCtrlBase::SetFont(font) ) + return false; + + // Recreate the bitmaps as their size may have changed. + RecalcBitmaps(); + + return true; +} + +bool wxSearchCtrl::SetBackgroundColour(const wxColour& colour) +{ + if ( !wxSearchCtrlBase::SetBackgroundColour(colour) ) + return false; + + // When the background changes, re-render the bitmaps so that the correct + // colour shows in their "transparent" area. + RecalcBitmaps(); + + return true; +} + +// search control generic only +void wxSearchCtrl::SetSearchBitmap( const wxBitmap& bitmap ) +{ + m_searchBitmap = bitmap; + m_searchBitmapUser = bitmap.IsOk(); + if ( m_searchBitmapUser ) + { + if ( m_searchButton && !HasMenu() ) + { + m_searchButton->SetBitmapLabel( m_searchBitmap ); + } + } + else + { + // the user bitmap was just cleared, generate one + RecalcBitmaps(); + } +} + +#if wxUSE_MENUS + +void wxSearchCtrl::SetSearchMenuBitmap( const wxBitmap& bitmap ) +{ + m_searchMenuBitmap = bitmap; + m_searchMenuBitmapUser = bitmap.IsOk(); + if ( m_searchMenuBitmapUser ) + { + if ( m_searchButton && m_menu ) + { + m_searchButton->SetBitmapLabel( m_searchMenuBitmap ); + } + } + else + { + // the user bitmap was just cleared, generate one + RecalcBitmaps(); + } +} + +#endif // wxUSE_MENUS + +void wxSearchCtrl::SetCancelBitmap( const wxBitmap& bitmap ) +{ + m_cancelBitmap = bitmap; + m_cancelBitmapUser = bitmap.IsOk(); + if ( m_cancelBitmapUser ) + { + if ( m_cancelButton ) + { + m_cancelButton->SetBitmapLabel( m_cancelBitmap ); + } + } + else + { + // the user bitmap was just cleared, generate one + RecalcBitmaps(); + } +} + +#if 0 + +// override streambuf method +#if wxHAS_TEXT_WINDOW_STREAM +int overflow(int i); +#endif // wxHAS_TEXT_WINDOW_STREAM + +// stream-like insertion operators: these are always available, whether we +// were, or not, compiled with streambuf support +wxTextCtrl& operator<<(const wxString& s); +wxTextCtrl& operator<<(int i); +wxTextCtrl& operator<<(long i); +wxTextCtrl& operator<<(float f); +wxTextCtrl& operator<<(double d); +wxTextCtrl& operator<<(const wxChar c); +#endif + +void wxSearchCtrl::DoSetValue(const wxString& value, int flags) +{ + m_text->DoSetValue(value, flags); +} + +bool wxSearchCtrl::DoLoadFile(const wxString& file, int fileType) +{ + return m_text->DoLoadFile(file, fileType); +} + +bool wxSearchCtrl::DoSaveFile(const wxString& file, int fileType) +{ + return m_text->DoSaveFile(file, fileType); +} + +// do the window-specific processing after processing the update event +void wxSearchCtrl::DoUpdateWindowUI(wxUpdateUIEvent& event) +{ + wxSearchCtrlBase::DoUpdateWindowUI(event); +} + +bool wxSearchCtrl::ShouldInheritColours() const +{ + return true; +} + +// icons are rendered at 3-8 times larger than necessary and downscaled for +// antialiasing +static int GetMultiplier() +{ +#ifdef __WXWINCE__ + // speed up bitmap generation by using a small bitmap + return 3; +#else + int depth = ::wxDisplayDepth(); + + if ( depth >= 24 ) + { + return 8; + } + return 6; +#endif +} + +wxBitmap wxSearchCtrl::RenderSearchBitmap( int x, int y, bool renderDrop ) +{ + wxColour bg = GetBackgroundColour(); + wxColour fg = GetForegroundColour().ChangeLightness(LIGHT_STEP-20); + + //=============================================================================== + // begin drawing code + //=============================================================================== + // image stats + + // force width:height ratio + if ( 14*x > y*20 ) + { + // x is too big + x = y*20/14; + } + else + { + // y is too big + y = x*14/20; + } + + // glass 11x11, top left corner + // handle (9,9)-(13,13) + // drop (13,16)-(19,6)-(16,9) + + int multiplier = GetMultiplier(); + int penWidth = multiplier * 2; + + penWidth = penWidth * x / 20; + + wxBitmap bitmap( multiplier*x, multiplier*y ); + wxMemoryDC mem; + mem.SelectObject(bitmap); + + // clear background + mem.SetBrush( wxBrush(bg) ); + mem.SetPen( wxPen(bg) ); + mem.DrawRectangle(0,0,bitmap.GetWidth(),bitmap.GetHeight()); + + // draw drop glass + mem.SetBrush( wxBrush(fg) ); + mem.SetPen( wxPen(fg) ); + int glassBase = 5 * x / 20; + int glassFactor = 2*glassBase + 1; + int radius = multiplier*glassFactor/2; + mem.DrawCircle(radius,radius,radius); + mem.SetBrush( wxBrush(bg) ); + mem.SetPen( wxPen(bg) ); + mem.DrawCircle(radius,radius,radius-penWidth); + + // draw handle + int lineStart = radius + (radius-penWidth/2) * 707 / 1000; // 707 / 1000 = 0.707 = 1/sqrt(2); + + mem.SetPen( wxPen(fg) ); + mem.SetBrush( wxBrush(fg) ); + int handleCornerShift = penWidth * 707 / 1000 / 2; // 707 / 1000 = 0.707 = 1/sqrt(2); + handleCornerShift = WXMAX( handleCornerShift, 1 ); + int handleBase = 4 * x / 20; + int handleLength = 2*handleBase+1; + wxPoint handlePolygon[] = + { + wxPoint(-handleCornerShift,+handleCornerShift), + wxPoint(+handleCornerShift,-handleCornerShift), + wxPoint(multiplier*handleLength/2+handleCornerShift,multiplier*handleLength/2-handleCornerShift), + wxPoint(multiplier*handleLength/2-handleCornerShift,multiplier*handleLength/2+handleCornerShift), + }; + mem.DrawPolygon(WXSIZEOF(handlePolygon),handlePolygon,lineStart,lineStart); + + // draw drop triangle + int triangleX = 13 * x / 20; + int triangleY = 5 * x / 20; + int triangleBase = 3 * x / 20; + int triangleFactor = triangleBase*2+1; + if ( renderDrop ) + { + wxPoint dropPolygon[] = + { + wxPoint(multiplier*0,multiplier*0), // triangle left + wxPoint(multiplier*triangleFactor-1,multiplier*0), // triangle right + wxPoint(multiplier*triangleFactor/2,multiplier*triangleFactor/2), // triangle bottom + }; + mem.DrawPolygon(WXSIZEOF(dropPolygon),dropPolygon,multiplier*triangleX,multiplier*triangleY); + } + mem.SelectObject(wxNullBitmap); + + //=============================================================================== + // end drawing code + //=============================================================================== + + if ( multiplier != 1 ) + { + wxImage image = bitmap.ConvertToImage(); + image.Rescale(x,y); + bitmap = wxBitmap( image ); + } + if ( !renderDrop ) + { + // Trim the edge where the arrow would have gone + bitmap = bitmap.GetSubBitmap(wxRect(0,0, y,y)); + } + + return bitmap; +} + +wxBitmap wxSearchCtrl::RenderCancelBitmap( int x, int y ) +{ + wxColour bg = GetBackgroundColour(); + wxColour fg = GetForegroundColour().ChangeLightness(LIGHT_STEP); + + //=============================================================================== + // begin drawing code + //=============================================================================== + // image stats + + // total size 14x14 + // force 1:1 ratio + if ( x > y ) + { + // x is too big + x = y; + } + else + { + // y is too big + y = x; + } + + // 14x14 circle + // cross line starts (4,4)-(10,10) + // drop (13,16)-(19,6)-(16,9) + + int multiplier = GetMultiplier(); + + int penWidth = multiplier * x / 14; + + wxBitmap bitmap( multiplier*x, multiplier*y ); + wxMemoryDC mem; + mem.SelectObject(bitmap); + + // clear background + mem.SetBrush( wxBrush(bg) ); + mem.SetPen( wxPen(bg) ); + mem.DrawRectangle(0,0,bitmap.GetWidth(),bitmap.GetHeight()); + + // draw drop glass + mem.SetBrush( wxBrush(fg) ); + mem.SetPen( wxPen(fg) ); + int radius = multiplier*x/2; + mem.DrawCircle(radius,radius,radius); + + // draw cross + int lineStartBase = 4 * x / 14; + int lineLength = x - 2*lineStartBase; + + mem.SetPen( wxPen(bg) ); + mem.SetBrush( wxBrush(bg) ); + int handleCornerShift = penWidth/2; + handleCornerShift = WXMAX( handleCornerShift, 1 ); + wxPoint handlePolygon[] = + { + wxPoint(-handleCornerShift,+handleCornerShift), + wxPoint(+handleCornerShift,-handleCornerShift), + wxPoint(multiplier*lineLength+handleCornerShift,multiplier*lineLength-handleCornerShift), + wxPoint(multiplier*lineLength-handleCornerShift,multiplier*lineLength+handleCornerShift), + }; + mem.DrawPolygon(WXSIZEOF(handlePolygon),handlePolygon,multiplier*lineStartBase,multiplier*lineStartBase); + wxPoint handlePolygon2[] = + { + wxPoint(+handleCornerShift,+handleCornerShift), + wxPoint(-handleCornerShift,-handleCornerShift), + wxPoint(multiplier*lineLength-handleCornerShift,-multiplier*lineLength-handleCornerShift), + wxPoint(multiplier*lineLength+handleCornerShift,-multiplier*lineLength+handleCornerShift), + }; + mem.DrawPolygon(WXSIZEOF(handlePolygon2),handlePolygon2,multiplier*lineStartBase,multiplier*(x-lineStartBase)); + + //=============================================================================== + // end drawing code + //=============================================================================== + + if ( multiplier != 1 ) + { + wxImage image = bitmap.ConvertToImage(); + image.Rescale(x,y); + bitmap = wxBitmap( image ); + } + + return bitmap; +} + +void wxSearchCtrl::RecalcBitmaps() +{ + if ( !m_text ) + { + return; + } + wxSize sizeText = m_text->GetBestSize(); + + int bitmapHeight = sizeText.y - 2 * ICON_MARGIN; + int bitmapWidth = sizeText.y * 20 / 14; + + if ( !m_searchBitmapUser ) + { + if ( + !m_searchBitmap.IsOk() || + m_searchBitmap.GetHeight() != bitmapHeight || + m_searchBitmap.GetWidth() != bitmapWidth + ) + { + m_searchBitmap = RenderSearchBitmap(bitmapWidth,bitmapHeight,false); + if ( !HasMenu() ) + { + m_searchButton->SetBitmapLabel(m_searchBitmap); + } + } + // else this bitmap was set by user, don't alter + } + +#if wxUSE_MENUS + if ( !m_searchMenuBitmapUser ) + { + if ( + !m_searchMenuBitmap.IsOk() || + m_searchMenuBitmap.GetHeight() != bitmapHeight || + m_searchMenuBitmap.GetWidth() != bitmapWidth + ) + { + m_searchMenuBitmap = RenderSearchBitmap(bitmapWidth,bitmapHeight,true); + if ( m_menu ) + { + m_searchButton->SetBitmapLabel(m_searchMenuBitmap); + } + } + // else this bitmap was set by user, don't alter + } +#endif // wxUSE_MENUS + + if ( !m_cancelBitmapUser ) + { + if ( + !m_cancelBitmap.IsOk() || + m_cancelBitmap.GetHeight() != bitmapHeight || + m_cancelBitmap.GetWidth() != bitmapHeight + ) + { + m_cancelBitmap = RenderCancelBitmap(bitmapHeight-BORDER-1,bitmapHeight-BORDER-1); // square + m_cancelButton->SetBitmapLabel(m_cancelBitmap); + } + // else this bitmap was set by user, don't alter + } +} + +void wxSearchCtrl::OnCancelButton( wxCommandEvent& event ) +{ + m_text->Clear(); + event.Skip(); +} + +void wxSearchCtrl::OnSetFocus( wxFocusEvent& /*event*/ ) +{ + if ( m_text ) + { + m_text->SetFocus(); + } +} + +void wxSearchCtrl::OnSize( wxSizeEvent& WXUNUSED(event) ) +{ + int width, height; + GetSize(&width, &height); + LayoutControls(0, 0, width, height); +} + +#if wxUSE_MENUS + +void wxSearchCtrl::PopupSearchMenu() +{ + if ( m_menu ) + { + wxSize size = GetSize(); + PopupMenu( m_menu, 0, size.y ); + } +} + +#endif // wxUSE_MENUS + +#endif // !wxUSE_NATIVE_SEARCH_CONTROL + +#endif // wxUSE_SEARCHCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/statbmpg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/statbmpg.cpp new file mode 100644 index 0000000000..a21ef57e0b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/statbmpg.cpp @@ -0,0 +1,48 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/statbmpg.cpp +// Purpose: wxGenericStaticBitmap +// Author: Marcin Wojdyr, Stefan Csomor +// Created: 2008-06-16 +// Copyright: wxWidgets developers +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#if wxUSE_STATBMP + +#ifndef WX_PRECOMP + #include "wx/dcclient.h" +#endif + +#include "wx/generic/statbmpg.h" + +bool wxGenericStaticBitmap::Create(wxWindow *parent, wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos, const wxSize& size, + long style, const wxString& name) +{ + if (! wxControl::Create(parent, id, pos, size, style, + wxDefaultValidator, name)) + return false; + SetBitmap(bitmap); + Connect(wxEVT_PAINT, wxPaintEventHandler(wxGenericStaticBitmap::OnPaint)); + return true; +} + +void wxGenericStaticBitmap::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + if (m_bitmap.IsOk()) + dc.DrawBitmap(m_bitmap, 0, 0, true); +} + +// under OSX_cocoa is a define, avoid duplicate info +#ifndef wxGenericStaticBitmap + +IMPLEMENT_DYNAMIC_CLASS(wxGenericStaticBitmap, wxStaticBitmapBase) + +#endif + +#endif // wxUSE_STATBMP + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/statline.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/statline.cpp new file mode 100644 index 0000000000..a36445889b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/statline.cpp @@ -0,0 +1,85 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/statline.cpp +// Purpose: a generic wxStaticLine class +// Author: Vadim Zeitlin +// Created: 28.06.99 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +// For compilers that support precompilation, includes "wx.h". + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STATLINE + +#include "wx/statline.h" + +#ifndef WX_PRECOMP + #include "wx/statbox.h" +#endif + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxStaticLine +// ---------------------------------------------------------------------------- + +bool wxStaticLine::Create( wxWindow *parent, + wxWindowID id, + const wxPoint &pos, + const wxSize &size, + long style, + const wxString &name) +{ + m_statbox = NULL; + + if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) ) + return false; + + // ok, this is ugly but it's better than nothing: use a thin static box to + // emulate static line + + wxSize sizeReal = AdjustSize(size); + + m_statbox = new wxStaticBox(parent, id, wxEmptyString, pos, sizeReal, style, name); + + return true; +} + +wxStaticLine::~wxStaticLine() +{ + delete m_statbox; +} + +WXWidget wxStaticLine::GetMainWidget() const +{ + return m_statbox->GetMainWidget(); +} + +void wxStaticLine::DoSetSize(int x, int y, int width, int height, int sizeFlags) +{ + m_statbox->SetSize(x, y, width, height, sizeFlags); +} + +void wxStaticLine::DoMoveWindow(int x, int y, int width, int height) +{ + m_statbox->SetSize(x, y, width, height); +} + +#endif + // wxUSE_STATLINE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/stattextg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/stattextg.cpp new file mode 100644 index 0000000000..74843fa21e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/stattextg.cpp @@ -0,0 +1,168 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/stattextg.cpp +// Purpose: wxGenericStaticText +// Author: Marcin Wojdyr +// Created: 2008-06-26 +// Copyright: Marcin Wojdyr +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STATTEXT + +#ifndef WX_PRECOMP + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/validate.h" +#endif + +#include "wx/generic/stattextg.h" + +#if wxUSE_MARKUP + #include "wx/generic/private/markuptext.h" +#endif // wxUSE_MARKUP + +IMPLEMENT_DYNAMIC_CLASS(wxGenericStaticText, wxStaticTextBase) + + +bool wxGenericStaticText::Create(wxWindow *parent, + wxWindowID id, + const wxString &label, + const wxPoint &pos, + const wxSize &size, + long style, + const wxString &name) +{ + if ( !wxControl::Create(parent, id, pos, size, style, + wxDefaultValidator, name) ) + return false; + + SetLabel(label); + SetInitialSize(size); + Connect(wxEVT_PAINT, wxPaintEventHandler(wxGenericStaticText::OnPaint)); + return true; +} + +wxGenericStaticText::~wxGenericStaticText() +{ +#if wxUSE_MARKUP + delete m_markupText; +#endif // wxUSE_MARKUP +} + +void wxGenericStaticText::DoDrawLabel(wxDC& dc, const wxRect& rect) +{ +#if wxUSE_MARKUP + if ( m_markupText ) + m_markupText->Render(dc, rect, wxMarkupText::Render_ShowAccels); + else +#endif // wxUSE_MARKUP + dc.DrawLabel(m_label, rect, GetAlignment(), m_mnemonic); +} + +void wxGenericStaticText::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + + wxRect rect = GetClientRect(); + if ( IsEnabled() ) + { + dc.SetTextForeground( + wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); + } + else // paint disabled text + { + // draw shadow of the text + dc.SetTextForeground( + wxSystemSettings::GetColour(wxSYS_COLOUR_BTNHIGHLIGHT)); + wxRect rectShadow = rect; + rectShadow.Offset(1, 1); + DoDrawLabel(dc, rectShadow); + dc.SetTextForeground( + wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW)); + } + DoDrawLabel(dc, rect); +} + + +wxSize wxGenericStaticText::DoGetBestClientSize() const +{ + wxClientDC dc(wxConstCast(this, wxGenericStaticText)); + +#if wxUSE_MARKUP + if ( m_markupText ) + return m_markupText->Measure(dc); +#endif // wxUSE_MARKUP + + return dc.GetMultiLineTextExtent(GetLabel()); +} + +void wxGenericStaticText::SetLabel(const wxString& label) +{ + wxControl::SetLabel(label); + DoSetLabel(GetEllipsizedLabel()); + if ( !HasFlag(wxST_NO_AUTORESIZE) && !IsEllipsized() ) + InvalidateBestSize(); + +#if wxUSE_MARKUP + if ( m_markupText ) + { + delete m_markupText; + m_markupText = NULL; + } +#endif // wxUSE_MARKUP + + Refresh(); +} + +void wxGenericStaticText::DoSetLabel(const wxString& label) +{ + m_mnemonic = FindAccelIndex(label, &m_label); +} + +#if wxUSE_MARKUP + +bool wxGenericStaticText::DoSetLabelMarkup(const wxString& markup) +{ + if ( !wxStaticTextBase::DoSetLabelMarkup(markup) ) + return false; + + if ( !m_markupText ) + m_markupText = new wxMarkupText(markup); + else + m_markupText->SetMarkup(markup); + + if ( !HasFlag(wxST_NO_AUTORESIZE) ) + InvalidateBestSize(); + + Refresh(); + + return true; +} + +#endif // wxUSE_MARKUP + +bool wxGenericStaticText::SetFont(const wxFont &font) +{ + if ( !wxControl::SetFont(font) ) + return false; + if ( !HasFlag(wxST_NO_AUTORESIZE) ) + InvalidateBestSize(); + Refresh(); + return true; +} + +void wxGenericStaticText::DoSetSize(int x, int y, int width, int height, + int sizeFlags) +{ + wxStaticTextBase::DoSetSize(x, y, width, height, sizeFlags); + UpdateLabel(); +} + + +#endif // wxUSE_STATTEXT diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/statusbr.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/statusbr.cpp new file mode 100644 index 0000000000..6de10c46aa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/statusbr.cpp @@ -0,0 +1,581 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/statusbr.cpp +// Purpose: wxStatusBarGeneric class implementation +// Author: Julian Smart +// Modified by: Francesco Montorsi +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STATUSBAR + +#include "wx/statusbr.h" + +#ifndef WX_PRECOMP + #include "wx/settings.h" + #include "wx/dcclient.h" + #include "wx/toplevel.h" + #include "wx/control.h" +#endif + +#ifdef __WXGTK20__ + #include + #include "wx/gtk/private.h" + #include "wx/gtk/private/gtk2-compat.h" +#endif + +// we only have to do it here when we use wxStatusBarGeneric in addition to the +// standard wxStatusBar class, if wxStatusBarGeneric is the same as +// wxStatusBar, then the corresponding IMPLEMENT_DYNAMIC_CLASS is already in +// common/statbar.cpp +#if defined(__WXMAC__) || \ + (defined(wxUSE_NATIVE_STATUSBAR) && wxUSE_NATIVE_STATUSBAR) + #include "wx/generic/statusbr.h" + + IMPLEMENT_DYNAMIC_CLASS(wxStatusBarGeneric, wxWindow) +#endif // wxUSE_NATIVE_STATUSBAR + +// Default status border dimensions +#define wxTHICK_LINE_BORDER 2 + +// Margin between the field text and the field rect +#define wxFIELD_TEXT_MARGIN 2 + +// ---------------------------------------------------------------------------- +// GTK+ signal handler +// ---------------------------------------------------------------------------- + +#if defined( __WXGTK20__ ) +#if GTK_CHECK_VERSION(2,12,0) +extern "C" { +static +gboolean statusbar_query_tooltip(GtkWidget* WXUNUSED(widget), + gint x, + gint y, + gboolean WXUNUSED(keyboard_mode), + GtkTooltip *tooltip, + wxStatusBar* statbar) +{ + int n = statbar->GetFieldFromPoint(wxPoint(x,y)); + if (n == wxNOT_FOUND) + return FALSE; + + // should we show the tooltip for the n-th pane of the statusbar? + if (!statbar->GetField(n).IsEllipsized()) + return FALSE; // no, it's not useful + + const wxString& str = statbar->GetStatusText(n); + if (str.empty()) + return FALSE; + + gtk_tooltip_set_text(tooltip, wxGTK_CONV_SYS(str)); + return TRUE; +} +} +#endif +#endif + +// ---------------------------------------------------------------------------- +// wxStatusBarGeneric +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxStatusBarGeneric, wxWindow) + EVT_PAINT(wxStatusBarGeneric::OnPaint) + EVT_SIZE(wxStatusBarGeneric::OnSize) +#ifdef __WXGTK20__ + EVT_LEFT_DOWN(wxStatusBarGeneric::OnLeftDown) + EVT_RIGHT_DOWN(wxStatusBarGeneric::OnRightDown) +#endif + EVT_SYS_COLOUR_CHANGED(wxStatusBarGeneric::OnSysColourChanged) +END_EVENT_TABLE() + +void wxStatusBarGeneric::Init() +{ + m_borderX = wxTHICK_LINE_BORDER; + m_borderY = wxTHICK_LINE_BORDER; +} + +wxStatusBarGeneric::~wxStatusBarGeneric() +{ +} + +bool wxStatusBarGeneric::Create(wxWindow *parent, + wxWindowID id, + long style, + const wxString& name) +{ + style |= wxTAB_TRAVERSAL | wxFULL_REPAINT_ON_RESIZE; + if ( !wxWindow::Create(parent, id, + wxDefaultPosition, wxDefaultSize, + style, name) ) + return false; + + // The status bar should have a themed background + SetThemeEnabled( true ); + + InitColours(); + +#ifdef __WXPM__ + SetFont(*wxSMALL_FONT); +#endif + + int height = (int)((11*GetCharHeight())/10 + 2*GetBorderY()); + SetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, height); + + SetFieldsCount(1); + +#if defined( __WXGTK20__ ) +#if GTK_CHECK_VERSION(2,12,0) + if (HasFlag(wxSTB_SHOW_TIPS) +#ifndef __WXGTK3__ + && gtk_check_version(2,12,0) == NULL +#endif + ) + { + g_object_set(m_widget, "has-tooltip", TRUE, NULL); + g_signal_connect(m_widget, "query-tooltip", + G_CALLBACK(statusbar_query_tooltip), this); + } +#endif +#endif + + return true; +} + +wxSize wxStatusBarGeneric::DoGetBestSize() const +{ + int width, height; + + // best width is the width of the parent + if (GetParent()) + GetParent()->GetClientSize(&width, NULL); + else + width = 80; // a dummy value + + // best height is as calculated above in Create() + height = (int)((11*GetCharHeight())/10 + 2*GetBorderY()); + + return wxSize(width, height); +} + +void wxStatusBarGeneric::DoUpdateStatusText(int number) +{ + wxRect rect; + GetFieldRect(number, rect); + + Refresh(true, &rect); + + // it's common to show some text in the status bar before starting a + // relatively lengthy operation, ensure that the text is shown to the + // user immediately and not after the lengthy operation end + Update(); +} + +void wxStatusBarGeneric::SetStatusWidths(int n, const int widths_field[]) +{ + // only set status widths when n == number of statuswindows + wxCHECK_RET( (size_t)n == m_panes.GetCount(), wxT("status bar field count mismatch") ); + + wxStatusBarBase::SetStatusWidths(n, widths_field); + + // update cache + DoUpdateFieldWidths(); +} + +void wxStatusBarGeneric::DoUpdateFieldWidths() +{ + m_lastClientSize = GetClientSize(); + + // recompute the cache of the field widths if the status bar width has changed + m_widthsAbs = CalculateAbsWidths(m_lastClientSize.x); +} + +bool wxStatusBarGeneric::ShowsSizeGrip() const +{ + if ( !HasFlag(wxSTB_SIZEGRIP) ) + return false; + + wxTopLevelWindow * const + tlw = wxDynamicCast(wxGetTopLevelParent(GetParent()), wxTopLevelWindow); + return tlw && !tlw->IsMaximized() && tlw->HasFlag(wxRESIZE_BORDER); +} + +void wxStatusBarGeneric::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int textHeight) +{ + wxString text(GetStatusText(i)); + if (text.empty()) + return; // optimization + + int xpos = rect.x + wxFIELD_TEXT_MARGIN, + maxWidth = rect.width - 2*wxFIELD_TEXT_MARGIN, + ypos = (int) (((rect.height - textHeight) / 2) + rect.y + 0.5); + + if (ShowsSizeGrip()) + { + // don't write text over the size grip: + // NOTE: overloading DoGetClientSize() and GetClientAreaOrigin() wouldn't + // work because the adjustment needs to be done only when drawing + // the field text and not also when drawing the background, the + // size grip itself, etc + if ((GetLayoutDirection() == wxLayout_RightToLeft && i == 0) || + (GetLayoutDirection() != wxLayout_RightToLeft && + i == (int)m_panes.GetCount()-1)) + { + const wxRect& gripRc = GetSizeGripRect(); + + // NOTE: we don't need any special treatment wrt to the layout direction + // since DrawText() will automatically adjust the origin of the + // text accordingly to the layout in use + + maxWidth -= gripRc.width; + } + } + + // eventually ellipsize the text so that it fits the field width + + wxEllipsizeMode ellmode = (wxEllipsizeMode)-1; + if (HasFlag(wxSTB_ELLIPSIZE_START)) ellmode = wxELLIPSIZE_START; + else if (HasFlag(wxSTB_ELLIPSIZE_MIDDLE)) ellmode = wxELLIPSIZE_MIDDLE; + else if (HasFlag(wxSTB_ELLIPSIZE_END)) ellmode = wxELLIPSIZE_END; + + if (ellmode == (wxEllipsizeMode)-1) + { + // if we have the wxSTB_SHOW_TIPS we must set the ellipsized flag even if + // we don't ellipsize the text but just truncate it + if (HasFlag(wxSTB_SHOW_TIPS)) + SetEllipsizedFlag(i, dc.GetTextExtent(text).GetWidth() > maxWidth); + + dc.SetClippingRegion(rect); + } + else + { + text = wxControl::Ellipsize(text, dc, + ellmode, + maxWidth, + wxELLIPSIZE_FLAGS_EXPAND_TABS); + // Ellipsize() will do something only if necessary + + // update the ellipsization status for this pane; this is used later to + // decide whether a tooltip should be shown or not for this pane + // (if we have wxSTB_SHOW_TIPS) + SetEllipsizedFlag(i, text != GetStatusText(i)); + } + +#if defined( __WXGTK__ ) || defined(__WXMAC__) + xpos++; + ypos++; +#endif + + // draw the text + dc.DrawText(text, xpos, ypos); + + if (ellmode == (wxEllipsizeMode)-1) + dc.DestroyClippingRegion(); +} + +void wxStatusBarGeneric::DrawField(wxDC& dc, int i, int textHeight) +{ + wxRect rect; + GetFieldRect(i, rect); + + if (rect.GetWidth() <= 0) + return; // happens when the status bar is shrunk in a very small area! + + int style = m_panes[i].GetStyle(); + if (style == wxSB_RAISED || style == wxSB_SUNKEN) + { + // Draw border + // For wxSB_SUNKEN: paint a grey background, plus 3-d border (one black rectangle) + // Inside this, left and top sides (dark grey). Bottom and right (white). + // Reverse it for wxSB_RAISED + + dc.SetPen((style == wxSB_RAISED) ? m_mediumShadowPen : m_hilightPen); + +#ifndef __WXPM__ + + // Right and bottom lines + dc.DrawLine(rect.x + rect.width, rect.y, + rect.x + rect.width, rect.y + rect.height); + dc.DrawLine(rect.x + rect.width, rect.y + rect.height, + rect.x, rect.y + rect.height); + + dc.SetPen((style == wxSB_RAISED) ? m_hilightPen : m_mediumShadowPen); + + // Left and top lines + dc.DrawLine(rect.x, rect.y + rect.height, + rect.x, rect.y); + dc.DrawLine(rect.x, rect.y, + rect.x + rect.width, rect.y); +#else + + dc.DrawLine(rect.x + rect.width, rect.height + 2, + rect.x, rect.height + 2); + dc.DrawLine(rect.x + rect.width, rect.y, + rect.x + rect.width, rect.y + rect.height); + + dc.SetPen((style == wxSB_RAISED) ? m_hilightPen : m_mediumShadowPen); + dc.DrawLine(rect.x, rect.y, + rect.x + rect.width, rect.y); + dc.DrawLine(rect.x, rect.y + rect.height, + rect.x, rect.y); +#endif + } + + DrawFieldText(dc, rect, i, textHeight); +} + +bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const +{ + wxCHECK_MSG( (n >= 0) && ((size_t)n < m_panes.GetCount()), false, + wxT("invalid status bar field index") ); + + // We can be called from the user-defined EVT_SIZE handler in which case + // the widths haven't been updated yet and we need to do it now. This is + // not very efficient as we keep testing the size but there is no other way + // to make the code needing the up-to-date fields sizes in its EVT_SIZE to + // work. + if ( GetClientSize().x != m_lastClientSize.x ) + { + const_cast(this)->DoUpdateFieldWidths(); + } + + if (m_widthsAbs.IsEmpty()) + return false; + + rect.x = 0; + for ( int i = 0; i < n; i++ ) + rect.x += m_widthsAbs[i]; + rect.x += m_borderX; + + rect.y = m_borderY; + rect.width = m_widthsAbs[n] - 2*m_borderX; + rect.height = m_lastClientSize.y - 2*m_borderY; + + return true; +} + +int wxStatusBarGeneric::GetFieldFromPoint(const wxPoint& pt) const +{ + if (m_widthsAbs.IsEmpty()) + return wxNOT_FOUND; + + // NOTE: we explicitly don't take in count the borders since they are only + // useful when rendering the status text, not for hit-test computations + + if (pt.y <= 0 || pt.y >= m_lastClientSize.y) + return wxNOT_FOUND; + + int x = 0; + for ( size_t i = 0; i < m_panes.GetCount(); i++ ) + { + if (pt.x > x && pt.x < x+m_widthsAbs[i]) + return i; + + x += m_widthsAbs[i]; + } + + return wxNOT_FOUND; +} + +void wxStatusBarGeneric::InitColours() +{ +#if defined(__WXPM__) + m_mediumShadowPen = wxPen(wxColour(127, 127, 127)); + m_hilightPen = *wxWHITE_PEN; + + SetBackgroundColour(*wxLIGHT_GREY); + SetForegroundColour(*wxBLACK); +#else // !__WXPM__ + m_mediumShadowPen = wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)); + m_hilightPen = wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT)); +#endif // __WXPM__/!__WXPM__ +} + +void wxStatusBarGeneric::SetMinHeight(int height) +{ + // check that this min height is not less than minimal height for the + // current font (min height is as calculated above in Create() except for border) + int minHeight = (int)((11*GetCharHeight())/10); + + if ( height > minHeight ) + SetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, height + 2*m_borderY); +} + +wxRect wxStatusBarGeneric::GetSizeGripRect() const +{ + int width, height; + wxWindow::DoGetClientSize(&width, &height); + + if (GetLayoutDirection() == wxLayout_RightToLeft) + return wxRect(2, 2, height-2, height-4); + else + return wxRect(width-height-2, 2, height-2, height-4); +} + +// ---------------------------------------------------------------------------- +// wxStatusBarGeneric - event handlers +// ---------------------------------------------------------------------------- + +void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) ) +{ + wxPaintDC dc(this); + +#ifdef __WXGTK20__ + // Draw grip first + if ( ShowsSizeGrip() ) + { + const wxRect& rc = GetSizeGripRect(); +#ifdef __WXGTK3__ + GtkWidget* toplevel = gtk_widget_get_toplevel(m_widget); + GdkRectangle rect; + if (toplevel && (!gtk_window_get_resize_grip_area(GTK_WINDOW(toplevel), &rect) || + rect.width == 0 || rect.height == 0)) + { + GtkStyleContext* sc = gtk_widget_get_style_context(toplevel); + gtk_style_context_save(sc); + gtk_style_context_add_class(sc, GTK_STYLE_CLASS_GRIP); + GtkJunctionSides sides = GTK_JUNCTION_CORNER_BOTTOMRIGHT; + if (GetLayoutDirection() == wxLayout_RightToLeft) + sides = GTK_JUNCTION_CORNER_BOTTOMLEFT; + gtk_style_context_set_junction_sides(sc, sides); + gtk_render_handle(sc, + static_cast(dc.GetImpl()->GetCairoContext()), + rc.x, rc.y, rc.width, rc.height); + gtk_style_context_restore(sc); + } +#else + GdkWindowEdge edge = + GetLayoutDirection() == wxLayout_RightToLeft ? GDK_WINDOW_EDGE_SOUTH_WEST : + GDK_WINDOW_EDGE_SOUTH_EAST; + gtk_paint_resize_grip(gtk_widget_get_style(m_widget), + GTKGetDrawingWindow(), + gtk_widget_get_state(m_widget), + NULL, + m_widget, + "statusbar", + edge, + rc.x, rc.y, rc.width, rc.height ); +#endif + } +#endif // __WXGTK20__ + + if (GetFont().IsOk()) + dc.SetFont(GetFont()); + + // compute char height only once for all panes: + int textHeight = dc.GetCharHeight(); + + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); + for (size_t i = 0; i < m_panes.GetCount(); i ++) + DrawField(dc, i, textHeight); +} + +void wxStatusBarGeneric::OnSysColourChanged(wxSysColourChangedEvent& event) +{ + InitColours(); + + // Propagate the event to the non-top-level children + wxWindow::OnSysColourChanged(event); +} + +#ifdef __WXGTK20__ +void wxStatusBarGeneric::OnLeftDown(wxMouseEvent& event) +{ + int width, height; + GetClientSize(&width, &height); + + GtkWidget* ancestor = gtk_widget_get_toplevel(m_widget); +#ifdef __WXGTK3__ + GdkRectangle rect; + if (ancestor && gtk_window_get_resize_grip_area(GTK_WINDOW(ancestor), &rect) && + rect.width && rect.height) + { + ancestor = NULL; + } +#endif + + if (ancestor && ShowsSizeGrip() && event.GetX() > width - height) + { + GdkWindow *source = GTKGetDrawingWindow(); + + int org_x = 0; + int org_y = 0; + gdk_window_get_origin( source, &org_x, &org_y ); + + if (GetLayoutDirection() == wxLayout_RightToLeft) + { + gtk_window_begin_resize_drag (GTK_WINDOW (ancestor), + GDK_WINDOW_EDGE_SOUTH_WEST, + 1, + org_x - event.GetX() + GetSize().x , + org_y + event.GetY(), + 0); + } + else + { + gtk_window_begin_resize_drag (GTK_WINDOW (ancestor), + GDK_WINDOW_EDGE_SOUTH_EAST, + 1, + org_x + event.GetX(), + org_y + event.GetY(), + 0); + } + } + else + { + event.Skip( true ); + } +} + +void wxStatusBarGeneric::OnRightDown(wxMouseEvent& event) +{ + int width, height; + GetClientSize(&width, &height); + + GtkWidget* ancestor = gtk_widget_get_toplevel(m_widget); +#ifdef __WXGTK3__ + GdkRectangle rect; + if (ancestor && gtk_window_get_resize_grip_area(GTK_WINDOW(ancestor), &rect) && + rect.width && rect.height) + { + ancestor = NULL; + } +#endif + + if (ancestor && ShowsSizeGrip() && event.GetX() > width - height) + { + GdkWindow *source = GTKGetDrawingWindow(); + + int org_x = 0; + int org_y = 0; + gdk_window_get_origin( source, &org_x, &org_y ); + + gtk_window_begin_move_drag (GTK_WINDOW (ancestor), + 2, + org_x + event.GetX(), + org_y + event.GetY(), + 0); + } + else + { + event.Skip( true ); + } +} +#endif // __WXGTK20__ + +void wxStatusBarGeneric::OnSize(wxSizeEvent& event) +{ + DoUpdateFieldWidths(); + + event.Skip(); +} + +#endif // wxUSE_STATUSBAR diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/tabg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/tabg.cpp new file mode 100644 index 0000000000..7d4dbdf09b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/tabg.cpp @@ -0,0 +1,1288 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/tabg.cpp +// Purpose: Generic tabbed dialogs; used by wxMotif's wxNotebook +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/settings.h" + #include "wx/intl.h" + #include "wx/dcclient.h" + #include "wx/math.h" +#endif + +#include +#include +#include + +#include "wx/generic/tabg.h" +#include "wx/listimpl.cpp" + +WX_DEFINE_LIST(wxTabLayerList) + +// not defined: use old, square tab implementation (fills in tabs) +// defined: use new, rounded tab implementation (doesn't colour in tabs) +// #define wxUSE_NEW_METHOD + +IMPLEMENT_DYNAMIC_CLASS(wxTabControl, wxObject) + +// IMPLEMENT_DYNAMIC_CLASS(wxTabLayer, wxList) + +wxTabControl::wxTabControl(wxTabView *v) +{ + m_view = v; + m_isSelected = false; + m_offsetX = 0; + m_offsetY = 0; + m_width = 0; + m_height = 0; + m_id = 0; + m_rowPosition = 0; + m_colPosition = 0; +} + +wxTabControl::~wxTabControl(void) +{ +} + +void wxTabControl::OnDraw(wxDC& dc, bool lastInRow) +{ + // Old, but in some ways better (drawing opaque tabs) +#ifndef wxUSE_NEW_METHOD + if (!m_view) + return; + + // Top-left of tab view area + int viewX = m_view->GetViewRect().x; + int viewY = m_view->GetViewRect().y; + + // Top-left of tab control + int tabX = GetX() + viewX; + int tabY = GetY() + viewY; + int tabHeightInc = 0; + if (m_isSelected) + { + tabHeightInc = (m_view->GetTabSelectionHeight() - m_view->GetTabHeight()); + tabY -= tabHeightInc; + } + + dc.SetPen(*wxTRANSPARENT_PEN); + + // Draw grey background + if (m_view->GetTabStyle() & wxTAB_STYLE_COLOUR_INTERIOR) + { + if(m_view->GetBackgroundBrush()) + dc.SetBrush(*m_view->GetBackgroundBrush()); + + // Add 1 because the pen is transparent. Under Motif, may be different. +#ifdef __WXMOTIF__ + dc.DrawRectangle(tabX, tabY, (GetWidth()+1), (GetHeight() + tabHeightInc)); +#else + dc.DrawRectangle(tabX, tabY, (GetWidth()+1), (GetHeight() + 1 + tabHeightInc)); +#endif + } + + // Draw highlight and shadow + dc.SetPen(*m_view->GetHighlightPen()); + + // Calculate the top of the tab beneath. It's the height of the tab, MINUS + // a bit if the tab below happens to be selected. Check. + wxTabControl *tabBeneath = NULL; + int subtractThis = 0; + if (GetColPosition() > 0) + tabBeneath = m_view->FindTabControlForPosition(GetColPosition() - 1, GetRowPosition()); + if (tabBeneath && tabBeneath->IsSelected()) + subtractThis = (m_view->GetTabSelectionHeight() - m_view->GetTabHeight()); + + // Vertical highlight: if first tab, draw to bottom of view + if (tabX == m_view->GetViewRect().x && (m_view->GetTabStyle() & wxTAB_STYLE_DRAW_BOX)) + dc.DrawLine(tabX, tabY, tabX, (m_view->GetViewRect().y + m_view->GetViewRect().height)); + else if (tabX == m_view->GetViewRect().x) + // Not box drawing, just to top of view. + dc.DrawLine(tabX, tabY, tabX, (m_view->GetViewRect().y)); + else + dc.DrawLine(tabX, tabY, tabX, (tabY + GetHeight() + tabHeightInc - subtractThis)); + + dc.DrawLine(tabX, tabY, (tabX + GetWidth()), tabY); + dc.SetPen(*m_view->GetShadowPen()); + + // Test if we're outside the right-hand edge of the view area + if (((tabX + GetWidth()) >= m_view->GetViewRect().x + m_view->GetViewRect().width) && (m_view->GetTabStyle() & wxTAB_STYLE_DRAW_BOX)) + { + int bottomY = m_view->GetViewRect().y + m_view->GetViewRect().height + GetY() + m_view->GetTabHeight() + m_view->GetTopMargin(); + // Add a tab height since we wish to draw to the bottom of the view. + dc.DrawLine((tabX + GetWidth()), tabY, + (tabX + GetWidth()), bottomY); + + // Calculate the far-right of the view, since we don't wish to + // draw inside that + int rightOfView = m_view->GetViewRect().x + m_view->GetViewRect().width + 1; + + // Draw the horizontal bit to connect to the view rectangle + dc.DrawLine((wxMax((tabX + GetWidth() - m_view->GetHorizontalTabOffset()), rightOfView)), (bottomY-1), + (tabX + GetWidth()), (bottomY-1)); + + // Draw black line to emphasize shadow + dc.SetPen(*wxBLACK_PEN); + dc.DrawLine((tabX + GetWidth() + 1), (tabY+1), + (tabX + GetWidth() + 1), bottomY); + + // Draw the horizontal bit to connect to the view rectangle + dc.DrawLine((wxMax((tabX + GetWidth() - m_view->GetHorizontalTabOffset()), rightOfView)), (bottomY), + (tabX + GetWidth() + 1), (bottomY)); + } + else + { + if (lastInRow) + { + // 25/5/97 UNLESS it's less than the max number of positions in this row + + int topY = m_view->GetViewRect().y - m_view->GetTopMargin(); + + int maxPositions = ((wxTabLayer *)m_view->GetLayers().Item(0)->GetData())->GetCount(); + + // Only down to the bottom of the tab, not to the top of the view + if ( GetRowPosition() < (maxPositions - 1) ) + topY = tabY + GetHeight() + tabHeightInc; + +#ifdef __WXMOTIF__ + topY -= 1; +#endif + + // Shadow + dc.DrawLine((tabX + GetWidth()), tabY, (tabX + GetWidth()), topY); + // Draw black line to emphasize shadow + dc.SetPen(*wxBLACK_PEN); + dc.DrawLine((tabX + GetWidth() + 1), (tabY+1), (tabX + GetWidth() + 1), + topY); + } + else + { + // Calculate the top of the tab beneath. It's the height of the tab, MINUS + // a bit if the tab below (and next col along) happens to be selected. Check. + wxTabControl *tabBeneath = NULL; + int subtractThis = 0; + if (GetColPosition() > 0) + tabBeneath = m_view->FindTabControlForPosition(GetColPosition() - 1, GetRowPosition() + 1); + if (tabBeneath && tabBeneath->IsSelected()) + subtractThis = (m_view->GetTabSelectionHeight() - m_view->GetTabHeight()); + +#ifdef __WXMOTIF__ + subtractThis += 1; +#endif + + // Draw only to next tab down. + dc.DrawLine((tabX + GetWidth()), tabY, + (tabX + GetWidth()), (tabY + GetHeight() + tabHeightInc - subtractThis)); + + // Draw black line to emphasize shadow + dc.SetPen(*wxBLACK_PEN); + dc.DrawLine((tabX + GetWidth() + 1), (tabY+1), (tabX + GetWidth() + 1), + (tabY + GetHeight() + tabHeightInc - subtractThis)); + } + } + + // Draw centered text + int textY = tabY + m_view->GetVerticalTabTextSpacing() + tabHeightInc; + + if (m_isSelected) + dc.SetFont(* m_view->GetSelectedTabFont()); + else + dc.SetFont(* GetFont()); + + wxColour col(m_view->GetTextColour()); + dc.SetTextForeground(col); + dc.SetBackgroundMode(wxTRANSPARENT); + wxCoord textWidth, textHeight; + dc.GetTextExtent(GetLabel(), &textWidth, &textHeight); + + int textX = (int)(tabX + (GetWidth() - textWidth)/2.0); + if (textX < (tabX + 2)) + textX = (tabX + 2); + + dc.SetClippingRegion(tabX, tabY, GetWidth(), GetHeight()); + dc.DrawText(GetLabel(), textX, textY); + dc.DestroyClippingRegion(); + + if (m_isSelected) + { + dc.SetPen(*m_view->GetHighlightPen()); + + // Draw white highlight from the tab's left side to the left hand edge of the view + dc.DrawLine(m_view->GetViewRect().x, (tabY + GetHeight() + tabHeightInc), + tabX, (tabY + GetHeight() + tabHeightInc)); + + // Draw white highlight from the tab's right side to the right hand edge of the view + dc.DrawLine((tabX + GetWidth()), (tabY + GetHeight() + tabHeightInc), + m_view->GetViewRect().x + m_view->GetViewRect().width, (tabY + GetHeight() + tabHeightInc)); + } +#else + // New HEL version with rounder tabs + + if (!m_view) return; + + int tabInc = 0; + if (m_isSelected) + { + tabInc = m_view->GetTabSelectionHeight() - m_view->GetTabHeight(); + } + int tabLeft = GetX() + m_view->GetViewRect().x; + int tabTop = GetY() + m_view->GetViewRect().y - tabInc; + int tabRight = tabLeft + m_view->GetTabWidth(); + int left = m_view->GetViewRect().x; + int top = tabTop + m_view->GetTabHeight() + tabInc; + int right = left + m_view->GetViewRect().width; + int bottom = top + m_view->GetViewRect().height; + + if (m_isSelected) + { + // TAB is selected - draw TAB and the View's full outline + + dc.SetPen(*(m_view->GetHighlightPen())); + wxPoint pnts[10]; + int n = 0; + pnts[n].x = left; pnts[n++].y = bottom; + pnts[n].x = left; pnts[n++].y = top; + pnts[n].x = tabLeft; pnts[n++].y = top; + pnts[n].x = tabLeft; pnts[n++].y = tabTop + 2; + pnts[n].x = tabLeft + 2; pnts[n++].y = tabTop; + pnts[n].x = tabRight - 1; pnts[n++].y = tabTop; + dc.DrawLines(n, pnts); + if (!lastInRow) + { + dc.DrawLine( + (tabRight + 2), + top, + right, + top + ); + } + + dc.SetPen(*(m_view->GetShadowPen())); + dc.DrawLine( + tabRight, + tabTop + 2, + tabRight, + top + ); + dc.DrawLine( + right, + top, + right, + bottom + ); + dc.DrawLine( + right, + bottom, + left, + bottom + ); + + dc.SetPen(*wxBLACK_PEN); + dc.DrawPoint( + tabRight, + tabTop + 1 + ); + dc.DrawPoint( + tabRight + 1, + tabTop + 2 + ); + if (lastInRow) + { + dc.DrawLine( + tabRight + 1, + bottom, + tabRight + 1, + tabTop + 1 + ); + } + else + { + dc.DrawLine( + tabRight + 1, + tabTop + 2, + tabRight + 1, + top + ); + dc.DrawLine( + right + 1, + top, + right + 1, + bottom + 1 + ); + } + dc.DrawLine( + right + 1, + bottom + 1, + left + 1, + bottom + 1 + ); + } + else + { + // TAB is not selected - just draw TAB outline and RH edge + // if the TAB is the last in the row + + int maxPositions = ((wxTabLayer*)m_view->GetLayers().Item(0)->GetData())->GetCount(); + wxTabControl* tabBelow = 0; + wxTabControl* tabBelowRight = 0; + if (GetColPosition() > 0) + { + tabBelow = m_view->FindTabControlForPosition( + GetColPosition() - 1, + GetRowPosition() + ); + } + if (!lastInRow && GetColPosition() > 0) + { + tabBelowRight = m_view->FindTabControlForPosition( + GetColPosition() - 1, + GetRowPosition() + 1 + ); + } + + float raisedTop = top - m_view->GetTabSelectionHeight() + + m_view->GetTabHeight(); + + dc.SetPen(*(m_view->GetHighlightPen())); + wxPoint pnts[10]; + int n = 0; + + pnts[n].x = tabLeft; + + if (tabBelow && tabBelow->IsSelected()) + { + pnts[n++].y = (long)raisedTop; + } + else + { + pnts[n++].y = top; + } + pnts[n].x = tabLeft; pnts[n++].y = tabTop + 2; + pnts[n].x = tabLeft + 2; pnts[n++].y = tabTop; + pnts[n].x = tabRight - 1; pnts[n++].y = tabTop; + dc.DrawLines(n, pnts); + + dc.SetPen(*(m_view->GetShadowPen())); + if (GetRowPosition() >= maxPositions - 1) + { + dc.DrawLine( + tabRight, + (tabTop + 2), + tabRight, + bottom + ); + dc.DrawLine( + tabRight, + bottom, + (tabRight - m_view->GetHorizontalTabOffset()), + bottom + ); + } + else + { + if (tabBelowRight && tabBelowRight->IsSelected()) + { + dc.DrawLine( + tabRight, + (long)raisedTop, + tabRight, + tabTop + 1 + ); + } + else + { + dc.DrawLine( + tabRight, + top - 1, + tabRight, + tabTop + 1 + ); + } + } + + dc.SetPen(*wxBLACK_PEN); + dc.DrawPoint( + tabRight, + tabTop + 1 + ); + dc.DrawPoint( + tabRight + 1, + tabTop + 2 + ); + if (GetRowPosition() >= maxPositions - 1) + { + // draw right hand edge to bottom of view + dc.DrawLine( + tabRight + 1, + bottom + 1, + tabRight + 1, + tabTop + 2 + ); + dc.DrawLine( + tabRight + 1, + bottom + 1, + (tabRight - m_view->GetHorizontalTabOffset()), + bottom + 1 + ); + } + else + { + // draw right hand edge of TAB + if (tabBelowRight && tabBelowRight->IsSelected()) + { + dc.DrawLine( + tabRight + 1, + (long)(raisedTop - 1), + tabRight + 1, + tabTop + 2 + ); + } + else + { + dc.DrawLine( + tabRight + 1, + top - 1, + tabRight + 1, + tabTop + 2 + ); + } + } + } + + // Draw centered text + dc.SetPen(*wxBLACK_PEN); + if (m_isSelected) + { + dc.SetFont(*(m_view->GetSelectedTabFont())); + } + else + { + dc.SetFont(*(GetFont())); + } + + wxColour col(m_view->GetTextColour()); + dc.SetTextForeground(col); + dc.SetBackgroundMode(wxTRANSPARENT); + long textWidth, textHeight; + dc.GetTextExtent(GetLabel(), &textWidth, &textHeight); + + float textX = (tabLeft + tabRight - textWidth) / 2; + float textY = (tabInc + tabTop + m_view->GetVerticalTabTextSpacing()); + + dc.DrawText(GetLabel(), (long)textX, (long)textY); +#endif +} + +bool wxTabControl::HitTest(int x, int y) const +{ + // Top-left of tab control + int tabX1 = GetX() + m_view->GetViewRect().x; + int tabY1 = GetY() + m_view->GetViewRect().y; + + // Bottom-right + int tabX2 = tabX1 + GetWidth(); + int tabY2 = tabY1 + GetHeight(); + + if (x >= tabX1 && y >= tabY1 && x <= tabX2 && y <= tabY2) + return true; + else + return false; +} + +IMPLEMENT_DYNAMIC_CLASS(wxTabView, wxObject) + +wxTabView::wxTabView(long style) +{ + m_noTabs = 0; + m_tabStyle = style; + m_tabSelection = -1; + m_tabHeight = 20; + m_tabSelectionHeight = m_tabHeight + 2; + m_tabWidth = 80; + m_tabHorizontalOffset = 10; + m_tabHorizontalSpacing = 2; + m_tabVerticalTextSpacing = 3; + m_topMargin = 5; + m_tabViewRect.x = 20; + m_tabViewRect.y = 20; + m_tabViewRect.width = 300; + m_tabViewRect.x = 300; + m_highlightColour = *wxWHITE; + m_shadowColour = wxColour(128, 128, 128); + // m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); + m_textColour = *wxBLACK; + m_highlightPen = wxWHITE_PEN; + m_shadowPen = wxGREY_PEN; + // SetBackgroundColour(m_backgroundColour); + m_tabFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + m_tabSelectedFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + m_window = NULL; +} + +wxTabView::~wxTabView() +{ + ClearTabs(true); +} + +// Automatically positions tabs +// TODO: this should just add the tab to a list, and then +// a layout function (e.g. Realize) should be called when all tabs have been added. +// The view rect could easily change as the view window is resized. +wxTabControl *wxTabView::AddTab(int id, const wxString& label, wxTabControl *existingTab) +{ + // First, find which layer we should be adding to. + wxTabLayerList::compatibility_iterator node = m_layers.GetLast(); + if (!node) + { + wxTabLayer *newLayer = new wxTabLayer; + node = m_layers.Append(newLayer); + } + // Check if adding another tab control would go off the + // right-hand edge of the layer. + wxTabLayer *tabLayer = (wxTabLayer *)node->GetData(); + wxList::compatibility_iterator lastTabNode = tabLayer->GetLast(); + if (lastTabNode) + { + wxTabControl *lastTab = (wxTabControl *)lastTabNode->GetData(); + // Start another layer (row). + // Tricky choice: can't just check if will be overlapping the edge, because + // this happens anyway for 2nd and subsequent rows. + // Should check this for 1st row, and then subsequent rows should not exceed 1st + // in length. + if (((tabLayer == m_layers.GetFirst()->GetData()) && ((lastTab->GetX() + 2*lastTab->GetWidth() + GetHorizontalTabSpacing()) + > GetViewRect().width)) || + ((tabLayer != m_layers.GetFirst()->GetData()) && (tabLayer->GetCount() == ((wxTabLayer *)m_layers.GetFirst()->GetData())->GetCount()))) + { + tabLayer = new wxTabLayer; + m_layers.Append(tabLayer); + lastTabNode = wxList::compatibility_iterator(); + } + } + int layer = m_layers.GetCount() - 1; + + wxTabControl *tabControl = existingTab; + if (!existingTab) + tabControl = OnCreateTabControl(); + tabControl->SetRowPosition(tabLayer->GetCount()); + tabControl->SetColPosition(layer); + + wxTabControl *lastTab = NULL; + if (lastTabNode) + lastTab = (wxTabControl *)lastTabNode->GetData(); + + // Top of new tab + int verticalOffset = (- GetTopMargin()) - ((layer+1)*GetTabHeight()); + // Offset from view top-left + int horizontalOffset = 0; + if (!lastTab) + horizontalOffset = layer*GetHorizontalTabOffset(); + else + horizontalOffset = lastTab->GetX() + GetTabWidth() + GetHorizontalTabSpacing(); + + tabControl->SetPosition(horizontalOffset, verticalOffset); + tabControl->SetSize(GetTabWidth(), GetTabHeight()); + tabControl->SetId(id); + tabControl->SetLabel(label); + tabControl->SetFont(* GetTabFont()); + + tabLayer->Append(tabControl); + m_noTabs ++; + + return tabControl; +} + +// Remove the tab without deleting the window +bool wxTabView::RemoveTab(int id) +{ + wxTabLayerList::compatibility_iterator layerNode = m_layers.GetFirst(); + while (layerNode) + { + wxTabLayer *layer = (wxTabLayer *)layerNode->GetData(); + wxList::compatibility_iterator tabNode = layer->GetFirst(); + while (tabNode) + { + wxTabControl *tab = (wxTabControl *)tabNode->GetData(); + if (tab->GetId() == id) + { + if (id == m_tabSelection) + m_tabSelection = -1; + delete tab; + layer->Erase(tabNode); + m_noTabs --; + + // The layout has changed + LayoutTabs(); + return true; + } + tabNode = tabNode->GetNext(); + } + layerNode = layerNode->GetNext(); + } + return false; +} + +bool wxTabView::SetTabText(int id, const wxString& label) +{ + wxTabControl* control = FindTabControlForId(id); + if (!control) + return false; + control->SetLabel(label); + return true; +} + +wxString wxTabView::GetTabText(int id) const +{ + wxTabControl* control = FindTabControlForId(id); + if (!control) + return wxEmptyString; + else + return control->GetLabel(); +} + +// Returns the total height of the tabs component -- this may be several +// times the height of a tab, if there are several tab layers (rows). +int wxTabView::GetTotalTabHeight() +{ + int minY = 0; + + wxTabLayerList::compatibility_iterator layerNode = m_layers.GetFirst(); + while (layerNode) + { + wxTabLayer *layer = (wxTabLayer *)layerNode->GetData(); + wxList::compatibility_iterator tabNode = layer->GetFirst(); + while (tabNode) + { + wxTabControl *tab = (wxTabControl *)tabNode->GetData(); + + if (tab->GetY() < minY) + minY = tab->GetY(); + + tabNode = tabNode->GetNext(); + } + layerNode = layerNode->GetNext(); + } + + return - minY; +} + +void wxTabView::ClearTabs(bool deleteTabs) +{ + wxTabLayerList::compatibility_iterator layerNode = m_layers.GetFirst(); + while (layerNode) + { + wxTabLayer *layer = (wxTabLayer *)layerNode->GetData(); + wxList::compatibility_iterator tabNode = layer->GetFirst(); + while (tabNode) + { + wxTabControl *tab = (wxTabControl *)tabNode->GetData(); + if (deleteTabs) + delete tab; + wxList::compatibility_iterator next = tabNode->GetNext(); + layer->Erase(tabNode); + tabNode = next; + } + wxTabLayerList::compatibility_iterator nextLayerNode = layerNode->GetNext(); + delete layer; + m_layers.Erase(layerNode); + layerNode = nextLayerNode; + } + m_noTabs = 0; + m_tabSelection = -1; +} + + +// Layout tabs (optional, e.g. if resizing window) +void wxTabView::LayoutTabs(void) +{ + // Make a list of the tab controls, deleting the wxTabLayers. + wxList controls; + + wxTabLayerList::compatibility_iterator layerNode = m_layers.GetFirst(); + while (layerNode) + { + wxTabLayer *layer = (wxTabLayer *)layerNode->GetData(); + wxList::compatibility_iterator tabNode = layer->GetFirst(); + while (tabNode) + { + wxTabControl *tab = (wxTabControl *)tabNode->GetData(); + controls.Append(tab); + wxList::compatibility_iterator next = tabNode->GetNext(); + layer->Erase(tabNode); + tabNode = next; + } + wxTabLayerList::compatibility_iterator nextLayerNode = layerNode->GetNext(); + delete layer; + m_layers.Erase(layerNode); + layerNode = nextLayerNode; + } + + wxTabControl *lastTab = NULL; + + wxTabLayer *currentLayer = new wxTabLayer; + m_layers.Append(currentLayer); + + wxList::compatibility_iterator node = controls.GetFirst(); + while (node) + { + wxTabControl *tabControl = (wxTabControl *)node->GetData(); + if (lastTab) + { + // Start another layer (row). + // Tricky choice: can't just check if will be overlapping the edge, because + // this happens anyway for 2nd and subsequent rows. + // Should check this for 1st row, and then subsequent rows should not exceed 1st + // in length. + if (((currentLayer == m_layers.GetFirst()->GetData()) && ((lastTab->GetX() + 2*lastTab->GetWidth() + GetHorizontalTabSpacing()) + > GetViewRect().width)) || + ((currentLayer != m_layers.GetFirst()->GetData()) && (currentLayer->GetCount() == ((wxTabLayer *)m_layers.GetFirst()->GetData())->GetCount()))) + { + currentLayer = new wxTabLayer; + m_layers.Append(currentLayer); + lastTab = NULL; + } + } + + int layer = m_layers.GetCount() - 1; + + tabControl->SetRowPosition(currentLayer->GetCount()); + tabControl->SetColPosition(layer); + + // Top of new tab + int verticalOffset = (- GetTopMargin()) - ((layer+1)*GetTabHeight()); + // Offset from view top-left + int horizontalOffset = 0; + if (!lastTab) + horizontalOffset = layer*GetHorizontalTabOffset(); + else + horizontalOffset = lastTab->GetX() + GetTabWidth() + GetHorizontalTabSpacing(); + + tabControl->SetPosition(horizontalOffset, verticalOffset); + tabControl->SetSize(GetTabWidth(), GetTabHeight()); + + currentLayer->Append(tabControl); + lastTab = tabControl; + + node = node->GetNext(); + } + + // Move the selected tab to the bottom + wxTabControl *control = FindTabControlForId(m_tabSelection); + if (control) + MoveSelectionTab(control); + +} + +// Draw all tabs +void wxTabView::Draw(wxDC& dc) +{ + // Don't draw anything if there are no tabs. + if (GetNumberOfTabs() == 0) + return; + + // Draw top margin area (beneath tabs and above view area) + if (GetTabStyle() & wxTAB_STYLE_COLOUR_INTERIOR) + { + dc.SetPen(*wxTRANSPARENT_PEN); + if(GetBackgroundBrush()) + dc.SetBrush(*GetBackgroundBrush()); + + // Add 1 because the pen is transparent. Under Motif, may be different. + dc.DrawRectangle( + m_tabViewRect.x, + (m_tabViewRect.y - m_topMargin), + (m_tabViewRect.width + 1), + (m_topMargin + 1) + ); + } + + // Draw layers in reverse order + wxTabLayerList::compatibility_iterator node = m_layers.GetLast(); + while (node) + { + wxTabLayer *layer = (wxTabLayer *)node->GetData(); + wxList::compatibility_iterator node2 = layer->GetFirst(); + while (node2) + { + wxTabControl *control = (wxTabControl *)node2->GetData(); + control->OnDraw(dc, (!node2->GetNext())); + node2 = node2->GetNext(); + } + + node = node->GetPrevious(); + } + + +#ifndef wxUSE_NEW_METHOD + if (GetTabStyle() & wxTAB_STYLE_DRAW_BOX) + { + dc.SetPen(* GetShadowPen()); + + // Draw bottom line + dc.DrawLine( + (GetViewRect().x + 1), + (GetViewRect().y + GetViewRect().height), + (GetViewRect().x + GetViewRect().width + 1), + (GetViewRect().y + GetViewRect().height) + ); + + // Draw right line + dc.DrawLine( + (GetViewRect().x + GetViewRect().width), + (GetViewRect().y - GetTopMargin() + 1), + (GetViewRect().x + GetViewRect().width), + (GetViewRect().y + GetViewRect().height) + ); + + dc.SetPen(* wxBLACK_PEN); + + // Draw bottom line + dc.DrawLine( + (GetViewRect().x), + (GetViewRect().y + GetViewRect().height + 1), +#if defined(__WXMOTIF__) + (GetViewRect().x + GetViewRect().width + 1), +#else + (GetViewRect().x + GetViewRect().width + 2), +#endif + + (GetViewRect().y + GetViewRect().height + 1) + ); + + // Draw right line + dc.DrawLine( + (GetViewRect().x + GetViewRect().width + 1), + (GetViewRect().y - GetTopMargin()), + (GetViewRect().x + GetViewRect().width + 1), + (GetViewRect().y + GetViewRect().height + 1) + ); + } +#endif +} + +// Process mouse event, return false if we didn't process it +bool wxTabView::OnEvent(wxMouseEvent& event) +{ + if (!event.LeftDown()) + return false; + + wxCoord x, y; + event.GetPosition(&x, &y); + + wxTabControl *hitControl = NULL; + + wxTabLayerList::compatibility_iterator node = m_layers.GetFirst(); + while (node) + { + wxTabLayer *layer = (wxTabLayer *)node->GetData(); + wxList::compatibility_iterator node2 = layer->GetFirst(); + while (node2) + { + wxTabControl *control = (wxTabControl *)node2->GetData(); + if (control->HitTest((int)x, (int)y)) + { + hitControl = control; + node = wxTabLayerList::compatibility_iterator(); + node2 = wxList::compatibility_iterator(); + } + else + node2 = node2->GetNext(); + } + + if (node) + node = node->GetNext(); + } + + if (!hitControl) + return false; + + wxTabControl *currentTab = FindTabControlForId(m_tabSelection); + + if (hitControl == currentTab) + return false; + + ChangeTab(hitControl); + + return true; +} + +bool wxTabView::ChangeTab(wxTabControl *control) +{ + wxTabControl *currentTab = FindTabControlForId(m_tabSelection); + int oldTab = -1; + if (currentTab) + oldTab = currentTab->GetId(); + + if (control == currentTab) + return true; + + if (m_layers.GetCount() == 0) + return false; + + if (!OnTabPreActivate(control->GetId(), oldTab)) + return false; + + // Move the tab to the bottom + MoveSelectionTab(control); + + if (currentTab) + currentTab->SetSelected(false); + + control->SetSelected(true); + m_tabSelection = control->GetId(); + + OnTabActivate(control->GetId(), oldTab); + + // Leave window refresh for the implementing window + + return true; +} + +// Move the selected tab to the bottom layer, if necessary, +// without calling app activation code +bool wxTabView::MoveSelectionTab(wxTabControl *control) +{ + if (m_layers.GetCount() == 0) + return false; + + wxTabLayer *firstLayer = (wxTabLayer *)m_layers.GetFirst()->GetData(); + + // Find what column this tab is at, so we can swap with the one at the bottom. + // If we're on the bottom layer, then no need to swap. + if (!firstLayer->Member(control)) + { + // Do a swap + int col = 0; + wxList::compatibility_iterator thisNode = FindTabNodeAndColumn(control, &col); + if (!thisNode) + return false; + wxList::compatibility_iterator otherNode = firstLayer->Item(col); + if (!otherNode) + return false; + + // If this is already in the bottom layer, return now + if (otherNode == thisNode) + return true; + + wxTabControl *otherTab = (wxTabControl *)otherNode->GetData(); + + // We now have pointers to the tab to be changed to, + // and the tab on the first layer. Swap tab structures and + // position details. + + int thisX = control->GetX(); + int thisY = control->GetY(); + int thisColPos = control->GetColPosition(); + int otherX = otherTab->GetX(); + int otherY = otherTab->GetY(); + int otherColPos = otherTab->GetColPosition(); + + control->SetPosition(otherX, otherY); + control->SetColPosition(otherColPos); + otherTab->SetPosition(thisX, thisY); + otherTab->SetColPosition(thisColPos); + + // Swap the data for the nodes + thisNode->SetData(otherTab); + otherNode->SetData(control); + } + return true; +} + +// Called when a tab is activated +void wxTabView::OnTabActivate(int /*activateId*/, int /*deactivateId*/) +{ +} + +void wxTabView::SetHighlightColour(const wxColour& col) +{ + m_highlightColour = col; + m_highlightPen = wxThePenList->FindOrCreatePen(col); +} + +void wxTabView::SetShadowColour(const wxColour& col) +{ + m_shadowColour = col; + m_shadowPen = wxThePenList->FindOrCreatePen(col); +} + +void wxTabView::SetBackgroundColour(const wxColour& col) +{ + m_backgroundColour = col; + m_backgroundPen = wxThePenList->FindOrCreatePen(col); + m_backgroundBrush = wxTheBrushList->FindOrCreateBrush(col); +} + +// this may be called with sel = zero (which doesn't match any page) +// when wxMotif deletes a page +// so return the first tab... + +void wxTabView::SetTabSelection(int sel, bool activateTool) +{ + if ( sel==m_tabSelection ) + return; + + int oldSel = m_tabSelection; + wxTabControl *control = FindTabControlForId(sel); + if (sel == 0) sel=control->GetId(); + wxTabControl *oldControl = FindTabControlForId(m_tabSelection); + + if (!OnTabPreActivate(sel, oldSel)) + return; + + if (control) + control->SetSelected((sel != -1)); // TODO ?? + else if (sel != -1) + { + wxFAIL_MSG(_("Could not find tab for id")); + return; + } + + if (oldControl) + oldControl->SetSelected(false); + + m_tabSelection = sel; + + if (control) + MoveSelectionTab(control); + + if (activateTool) + OnTabActivate(sel, oldSel); +} + +// Find tab control for id +// this may be called with zero (which doesn't match any page) +// so return the first control... +wxTabControl *wxTabView::FindTabControlForId(int id) const +{ + wxTabLayerList::compatibility_iterator node1 = m_layers.GetFirst(); + while (node1) + { + wxTabLayer *layer = (wxTabLayer *)node1->GetData(); + wxList::compatibility_iterator node2 = layer->GetFirst(); + while (node2) + { + wxTabControl *control = (wxTabControl *)node2->GetData(); + if (control->GetId() == id || id == 0) + return control; + node2 = node2->GetNext(); + } + node1 = node1->GetNext(); + } + return NULL; +} + +// Find tab control for layer, position (starting from zero) +wxTabControl *wxTabView::FindTabControlForPosition(int layer, int position) const +{ + wxTabLayerList::compatibility_iterator node1 = m_layers.Item(layer); + if (!node1) + return NULL; + wxTabLayer *tabLayer = (wxTabLayer *)node1->GetData(); + wxList::compatibility_iterator node2 = tabLayer->Item(position); + if (!node2) + return NULL; + return (wxTabControl *)node2->GetData(); +} + +// Find the node and the column at which this control is positioned. +wxList::compatibility_iterator wxTabView::FindTabNodeAndColumn(wxTabControl *control, int *col) const +{ + wxTabLayerList::compatibility_iterator node1 = m_layers.GetFirst(); + while (node1) + { + wxTabLayer *layer = (wxTabLayer *)node1->GetData(); + int c = 0; + wxList::compatibility_iterator node2 = layer->GetFirst(); + while (node2) + { + wxTabControl *cnt = (wxTabControl *)node2->GetData(); + if (cnt == control) + { + *col = c; + return node2; + } + node2 = node2->GetNext(); + c ++; + } + node1 = node1->GetNext(); + } + return wxList::compatibility_iterator(); +} + +int wxTabView::CalculateTabWidth(int noTabs, bool adjustView) +{ + m_tabWidth = (int)((m_tabViewRect.width - ((noTabs - 1)*GetHorizontalTabSpacing()))/noTabs); + if (adjustView) + { + m_tabViewRect.width = noTabs*m_tabWidth + ((noTabs-1)*GetHorizontalTabSpacing()); + } + return m_tabWidth; +} + +/* + * wxTabbedDialog + */ + +IMPLEMENT_CLASS(wxTabbedDialog, wxDialog) + +BEGIN_EVENT_TABLE(wxTabbedDialog, wxDialog) + EVT_CLOSE(wxTabbedDialog::OnCloseWindow) + EVT_MOUSE_EVENTS(wxTabbedDialog::OnMouseEvent) + EVT_PAINT(wxTabbedDialog::OnPaint) +END_EVENT_TABLE() + +wxTabbedDialog::wxTabbedDialog(wxWindow *parent, wxWindowID id, + const wxString& title, + const wxPoint& pos, const wxSize& size, + long windowStyle, const wxString& name): + wxDialog(parent, id, title, pos, size, windowStyle, name) +{ + m_tabView = NULL; +} + +wxTabbedDialog::~wxTabbedDialog(void) +{ + if (m_tabView) + delete m_tabView; +} + +void wxTabbedDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event) ) +{ + Destroy(); +} + +void wxTabbedDialog::OnMouseEvent(wxMouseEvent& event ) +{ + if (m_tabView) + m_tabView->OnEvent(event); +} + +void wxTabbedDialog::OnPaint(wxPaintEvent& WXUNUSED(event) ) +{ + wxPaintDC dc(this); + if (m_tabView) + m_tabView->Draw(dc); +} + +/* + * wxTabbedPanel + */ + +IMPLEMENT_CLASS(wxTabbedPanel, wxPanel) + +BEGIN_EVENT_TABLE(wxTabbedPanel, wxPanel) + EVT_MOUSE_EVENTS(wxTabbedPanel::OnMouseEvent) + EVT_PAINT(wxTabbedPanel::OnPaint) +END_EVENT_TABLE() + +wxTabbedPanel::wxTabbedPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos, + const wxSize& size, long windowStyle, const wxString& name): + wxPanel(parent, id, pos, size, windowStyle, name) +{ + m_tabView = NULL; +} + +wxTabbedPanel::~wxTabbedPanel(void) +{ + delete m_tabView; +} + +void wxTabbedPanel::OnMouseEvent(wxMouseEvent& event) +{ + if (m_tabView) + m_tabView->OnEvent(event); +} + +void wxTabbedPanel::OnPaint(wxPaintEvent& WXUNUSED(event) ) +{ + wxPaintDC dc(this); + if (m_tabView) + m_tabView->Draw(dc); +} + +/* + * wxPanelTabView + */ + +IMPLEMENT_CLASS(wxPanelTabView, wxTabView) + +wxPanelTabView::wxPanelTabView(wxPanel *pan, long style) + : wxTabView(style) +{ + m_panel = pan; + m_currentWindow = NULL; + + if (m_panel->IsKindOf(wxCLASSINFO(wxTabbedDialog))) + ((wxTabbedDialog *)m_panel)->SetTabView(this); + else if (m_panel->IsKindOf(wxCLASSINFO(wxTabbedPanel))) + ((wxTabbedPanel *)m_panel)->SetTabView(this); + + SetWindow(m_panel); +} + +wxPanelTabView::~wxPanelTabView(void) +{ + ClearWindows(true); +} + +// Called when a tab is activated +void wxPanelTabView::OnTabActivate(int activateId, int deactivateId) +{ + if (!m_panel) + return; + + wxWindow *oldWindow = ((deactivateId == -1) ? 0 : GetTabWindow(deactivateId)); + wxWindow *newWindow = GetTabWindow(activateId); + + if (oldWindow) + oldWindow->Show(false); + if (newWindow) + newWindow->Show(true); + + m_panel->Refresh(); +} + + +void wxPanelTabView::AddTabWindow(int id, wxWindow *window) +{ + wxASSERT(m_tabWindows.find(id) == m_tabWindows.end()); + m_tabWindows[id] = window; + window->Show(false); +} + +wxWindow *wxPanelTabView::GetTabWindow(int id) const +{ + wxIntToWindowHashMap::const_iterator it = m_tabWindows.find(id); + return it == m_tabWindows.end() ? NULL : it->second; +} + +void wxPanelTabView::ClearWindows(bool deleteWindows) +{ + if (deleteWindows) + WX_CLEAR_HASH_MAP(wxIntToWindowHashMap, m_tabWindows); + m_tabWindows.clear(); +} + +void wxPanelTabView::ShowWindowForTab(int id) +{ + wxWindow *newWindow = GetTabWindow(id); + if (newWindow == m_currentWindow) + return; + if (m_currentWindow) + m_currentWindow->Show(false); + newWindow->Show(true); + newWindow->Refresh(); +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/textdlgg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/textdlgg.cpp new file mode 100644 index 0000000000..f3d697fafc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/textdlgg.cpp @@ -0,0 +1,204 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/textdlgg.cpp +// Purpose: wxTextEntryDialog +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TEXTDLG + +#include "wx/generic/textdlgg.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/dialog.h" + #include "wx/button.h" + #include "wx/stattext.h" + #include "wx/textctrl.h" + #include "wx/intl.h" + #include "wx/sizer.h" +#endif + +#if wxUSE_STATLINE + #include "wx/statline.h" +#endif + +const char wxGetTextFromUserPromptStr[] = "Input Text"; +const char wxGetPasswordFromUserPromptStr[] = "Enter Password"; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +static const int wxID_TEXT = 3000; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxTextEntryDialog +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog) + EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK) +END_EVENT_TABLE() + +IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog) + +bool wxTextEntryDialog::Create(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxString& value, + long style, + const wxPoint& pos) +{ + if ( !wxDialog::Create(GetParentForModalDialog(parent, style), + wxID_ANY, caption, + pos, wxDefaultSize, + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) ) + { + return false; + } + + m_dialogStyle = style; + m_value = value; + + wxBeginBusyCursor(); + + wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); + + wxSizerFlags flagsBorder2; + flagsBorder2.DoubleBorder(); + +#if wxUSE_STATTEXT + // 1) text message + topsizer->Add(CreateTextSizer(message), flagsBorder2); +#endif + + // 2) text ctrl + m_textctrl = new wxTextCtrl(this, wxID_TEXT, value, + wxDefaultPosition, wxSize(300, wxDefaultCoord), + style & ~wxTextEntryDialogStyle); + + topsizer->Add(m_textctrl, + wxSizerFlags(style & wxTE_MULTILINE ? 1 : 0). + Expand(). + TripleBorder(wxLEFT | wxRIGHT)); + + // 3) buttons if any + wxSizer *buttonSizer = CreateSeparatedButtonSizer(style & (wxOK | wxCANCEL)); + if ( buttonSizer ) + { + topsizer->Add(buttonSizer, wxSizerFlags(flagsBorder2).Expand()); + } + + SetAutoLayout( true ); + SetSizer( topsizer ); + + topsizer->SetSizeHints( this ); + topsizer->Fit( this ); + + if ( style & wxCENTRE ) + Centre( wxBOTH ); + + m_textctrl->SelectAll(); + m_textctrl->SetFocus(); + + wxEndBusyCursor(); + + return true; +} + +bool wxTextEntryDialog::TransferDataToWindow() +{ + m_textctrl->SetValue(m_value); + + return wxDialog::TransferDataToWindow(); +} + +bool wxTextEntryDialog::TransferDataFromWindow() +{ + m_value = m_textctrl->GetValue(); + + return wxDialog::TransferDataFromWindow(); +} + +void wxTextEntryDialog::OnOK(wxCommandEvent& WXUNUSED(event) ) +{ + if ( Validate() && TransferDataFromWindow() ) + { + EndModal( wxID_OK ); + } +} + +void wxTextEntryDialog::SetMaxLength(unsigned long len) +{ + m_textctrl->SetMaxLength(len); +} + +void wxTextEntryDialog::SetValue(const wxString& val) +{ + m_value = val; + + m_textctrl->SetValue(val); +} + +#if wxUSE_VALIDATORS + +#if WXWIN_COMPATIBILITY_2_8 +void wxTextEntryDialog::SetTextValidator( long style ) +{ + SetTextValidator((wxTextValidatorStyle)style); +} +#endif + +void wxTextEntryDialog::SetTextValidator( wxTextValidatorStyle style ) +{ + SetTextValidator(wxTextValidator(style)); +} + +void wxTextEntryDialog::SetTextValidator( const wxTextValidator& validator ) +{ + m_textctrl->SetValidator( validator ); +} + +#endif // wxUSE_VALIDATORS + +// ---------------------------------------------------------------------------- +// wxPasswordEntryDialog +// ---------------------------------------------------------------------------- + +IMPLEMENT_CLASS(wxPasswordEntryDialog, wxTextEntryDialog) + +wxPasswordEntryDialog::wxPasswordEntryDialog(wxWindow *parent, + const wxString& message, + const wxString& caption, + const wxString& value, + long style, + const wxPoint& pos) + : wxTextEntryDialog(parent, message, caption, value, + style | wxTE_PASSWORD, pos) +{ + // Only change from wxTextEntryDialog is the password style +} + +#endif // wxUSE_TEXTDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/textmeasure.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/textmeasure.cpp new file mode 100644 index 0000000000..55bb735d9c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/textmeasure.cpp @@ -0,0 +1,68 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/textmeasure.cpp +// Purpose: +// Author: Vadim Zeitlin +// Created: 2012-10-17 +// Copyright: (c) 2012 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/dc.h" +#endif //WX_PRECOMP + +#include "wx/private/textmeasure.h" + +#if wxUSE_GENERIC_TEXTMEASURE + +// ============================================================================ +// wxTextMeasure generic implementation +// ============================================================================ + +// We assume that the ports not providing platform-specific wxTextMeasure +// implementation implement the corresponding functions in their wxDC and +// wxWindow classes, so forward back to them instead of using wxTextMeasure +// from there, as usual. +void wxTextMeasure::DoGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent, + wxCoord *externalLeading) +{ + if ( m_dc ) + { + m_dc->GetTextExtent(string, width, height, + descent, externalLeading, m_font); + } + else if ( m_win ) + { + m_win->GetTextExtent(string, width, height, + descent, externalLeading, m_font); + } + //else: we already asserted in the ctor, don't do it any more +} + +bool wxTextMeasure::DoGetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX) +{ + return wxTextMeasureBase::DoGetPartialTextExtents(text, widths, scaleX); +} + +#endif // wxUSE_GENERIC_TEXTMEASURE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/timectrlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/timectrlg.cpp new file mode 100644 index 0000000000..71867c2f35 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/timectrlg.cpp @@ -0,0 +1,679 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/timectrl.cpp +// Purpose: Generic implementation of wxTimePickerCtrl. +// Author: Paul Breen, Vadim Zeitlin +// Created: 2011-09-22 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TIMEPICKCTRL + +#ifndef WX_PRECOMP + #include "wx/textctrl.h" +#endif // WX_PRECOMP + +#include "wx/timectrl.h" + +// This class is only compiled if there is no native version or if we +// explicitly want to use both the native and generic one (this is useful for +// testing but not much otherwise and so by default we don't use the generic +// implementation if a native one is available). +#if !defined(wxHAS_NATIVE_TIMEPICKERCTRL) || wxUSE_TIMEPICKCTRL_GENERIC + +#include "wx/generic/timectrl.h" + +#include "wx/dateevt.h" +#include "wx/spinbutt.h" + +#ifndef wxHAS_NATIVE_TIMEPICKERCTRL + IMPLEMENT_DYNAMIC_CLASS(wxTimePickerCtrl, wxControl) +#endif + +// ---------------------------------------------------------------------------- +// Constants +// ---------------------------------------------------------------------------- + +enum +{ + // Horizontal margin between the text and spin control. + HMARGIN_TEXT_SPIN = 2 +}; + +// ---------------------------------------------------------------------------- +// wxTimePickerGenericImpl: used to implement wxTimePickerCtrlGeneric +// ---------------------------------------------------------------------------- + +class wxTimePickerGenericImpl : public wxEvtHandler +{ +public: + wxTimePickerGenericImpl(wxTimePickerCtrlGeneric* ctrl) + { + m_text = new wxTextCtrl(ctrl, wxID_ANY, wxString()); + + // As this text can't be edited, don't use the standard cursor for it + // to avoid misleading the user. Ideally we'd also hide the caret but + // this is not currently supported by wxTextCtrl. + m_text->SetCursor(wxCURSOR_ARROW); + + m_btn = new wxSpinButton(ctrl, wxID_ANY, + wxDefaultPosition, wxDefaultSize, + wxSP_VERTICAL | wxSP_WRAP); + + m_currentField = Field_Hour; + m_isFirstDigit = true; + + // We don't support arbitrary formats currently as this requires + // significantly more work both here and also in wxLocale::GetInfo(). + // + // For now just use either "%H:%M:%S" or "%I:%M:%S %p". It would be + // nice to add support to "%k" and "%l" (hours with leading blanks + // instead of zeros) too as this is the most common unsupported case in + // practice. + m_useAMPM = wxLocale::GetInfo(wxLOCALE_TIME_FMT).Contains("%p"); + + m_text->Connect + ( + wxEVT_SET_FOCUS, + wxFocusEventHandler(wxTimePickerGenericImpl::OnTextSetFocus), + NULL, + this + ); + m_text->Connect + ( + wxEVT_KEY_DOWN, + wxKeyEventHandler(wxTimePickerGenericImpl::OnTextKeyDown), + NULL, + this + ); + m_text->Connect + ( + wxEVT_LEFT_DOWN, + wxMouseEventHandler(wxTimePickerGenericImpl::OnTextClick), + NULL, + this + ); + + m_btn->Connect + ( + wxEVT_SPIN_UP, + wxSpinEventHandler(wxTimePickerGenericImpl::OnArrowUp), + NULL, + this + ); + m_btn->Connect + ( + wxEVT_SPIN_DOWN, + wxSpinEventHandler(wxTimePickerGenericImpl::OnArrowDown), + NULL, + this + ); + } + + // Set the new value. + void SetValue(const wxDateTime& time) + { + m_time = time.IsValid() ? time : wxDateTime::Now(); + + // Ensure that the date part doesn't correspond to a DST change date as + // time is discontinuous then resulting in many problems, e.g. it's + // impossible to even enter 2:00:00 at the beginning of summer time + // date as this time doesn't exist. By using Jan 1, on which nobody + // changes DST, we avoid all such problems. + wxDateTime::Tm tm = m_time.GetTm(); + tm.mday = + tm.yday = 1; + tm.mon = wxDateTime::Jan; + m_time.Set(tm); + + UpdateTextWithoutEvent(); + } + + + // The text part of the control. + wxTextCtrl* m_text; + + // The spin button used to change the text fields. + wxSpinButton* m_btn; + + // The current time (date part is ignored). + wxDateTime m_time; + +private: + // The logical fields of the text control (AM/PM one may not be present). + enum Field + { + Field_Hour, + Field_Min, + Field_Sec, + Field_AMPM, + Field_Max + }; + + // Direction of change of time fields. + enum Direction + { + // Notice that the enum elements values matter. + Dir_Down = -1, + Dir_Up = +1 + }; + + // A range of character positions ("from" is inclusive, "to" -- exclusive). + struct CharRange + { + int from, + to; + }; + + // Event handlers for various events in our controls. + void OnTextSetFocus(wxFocusEvent& event) + { + HighlightCurrentField(); + + event.Skip(); + } + + // Keyboard interface here is modelled over MSW native control and may need + // adjustments for other platforms. + void OnTextKeyDown(wxKeyEvent& event) + { + const int key = event.GetKeyCode(); + + switch ( key ) + { + case WXK_DOWN: + ChangeCurrentFieldBy1(Dir_Down); + break; + + case WXK_UP: + ChangeCurrentFieldBy1(Dir_Up); + break; + + case WXK_LEFT: + CycleCurrentField(Dir_Down); + break; + + case WXK_RIGHT: + CycleCurrentField(Dir_Up); + break; + + case WXK_HOME: + ResetCurrentField(Dir_Down); + break; + + case WXK_END: + ResetCurrentField(Dir_Up); + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + // The digits work in all keys except AM/PM. + if ( m_currentField != Field_AMPM ) + { + AppendDigitToCurrentField(key - '0'); + } + break; + + case 'A': + case 'P': + // These keys only work to toggle AM/PM field. + if ( m_currentField == Field_AMPM ) + { + unsigned hour = m_time.GetHour(); + if ( key == 'A' ) + { + if ( hour >= 12 ) + hour -= 12; + } + else // PM + { + if ( hour < 12 ) + hour += 12; + } + + if ( hour != m_time.GetHour() ) + { + m_time.SetHour(hour); + UpdateText(); + } + } + break; + + // Do not skip the other events, just consume them to prevent the + // user from editing the text directly. + } + } + + void OnTextClick(wxMouseEvent& event) + { + Field field = Field_Max; // Initialize just to suppress warnings. + long pos; + switch ( m_text->HitTest(event.GetPosition(), &pos) ) + { + case wxTE_HT_UNKNOWN: + // Don't do anything, it's better than doing something wrong. + return; + + case wxTE_HT_BEFORE: + // Select the first field. + field = Field_Hour; + break; + + case wxTE_HT_ON_TEXT: + // Find the field containing this position. + for ( field = Field_Hour; field <= GetLastField(); ) + { + const CharRange range = GetFieldRange(field); + + // Normally the "to" end is exclusive but we want to give + // focus to some field when the user clicks between them so + // count it as part of the preceding field here. + if ( range.from <= pos && pos <= range.to ) + break; + + field = static_cast(field + 1); + } + break; + + case wxTE_HT_BELOW: + // This shouldn't happen for single line control. + wxFAIL_MSG( "Unreachable" ); + // fall through + + case wxTE_HT_BEYOND: + // Select the last field. + field = GetLastField(); + break; + } + + ChangeCurrentField(field); + } + + void OnArrowUp(wxSpinEvent& WXUNUSED(event)) + { + ChangeCurrentFieldBy1(Dir_Up); + } + + void OnArrowDown(wxSpinEvent& WXUNUSED(event)) + { + ChangeCurrentFieldBy1(Dir_Down); + } + + + // Get the range of the given field in character positions ("from" is + // inclusive, "to" exclusive). + static CharRange GetFieldRange(Field field) + { + // Currently we can just hard code the ranges as they are the same for + // both supported formats, if we want to support arbitrary formats in + // the future, we'd need to determine them dynamically by examining the + // format here. + static const CharRange ranges[] = + { + { 0, 2 }, + { 3, 5 }, + { 6, 8 }, + { 9, 11}, + }; + + wxCOMPILE_TIME_ASSERT( WXSIZEOF(ranges) == Field_Max, + FieldRangesMismatch ); + + return ranges[field]; + } + + // Get the last field used depending on m_useAMPM. + Field GetLastField() const + { + return m_useAMPM ? Field_AMPM : Field_Sec; + } + + // Change the current field. For convenience, accept int field here as this + // allows us to use arithmetic operations in the caller. + void ChangeCurrentField(int field) + { + if ( field == m_currentField ) + return; + + wxCHECK_RET( field <= GetLastField(), "Invalid field" ); + + m_currentField = static_cast(field); + m_isFirstDigit = true; + + HighlightCurrentField(); + } + + // Go to the next (Dir_Up) or previous (Dir_Down) field, wrapping if + // necessary. + void CycleCurrentField(Direction dir) + { + const unsigned numFields = GetLastField() + 1; + + ChangeCurrentField((m_currentField + numFields + dir) % numFields); + } + + // Select the currently actively field. + void HighlightCurrentField() + { + m_text->SetFocus(); + + const CharRange range = GetFieldRange(m_currentField); + + m_text->SetSelection(range.from, range.to); + } + + // Decrement or increment the value of the current field (wrapping if + // necessary). + void ChangeCurrentFieldBy1(Direction dir) + { + switch ( m_currentField ) + { + case Field_Hour: + m_time.SetHour((m_time.GetHour() + 24 + dir) % 24); + break; + + case Field_Min: + m_time.SetMinute((m_time.GetMinute() + 60 + dir) % 60); + break; + + case Field_Sec: + m_time.SetSecond((m_time.GetSecond() + 60 + dir) % 60); + break; + + case Field_AMPM: + m_time.SetHour((m_time.GetHour() + 12) % 24); + break; + + case Field_Max: + wxFAIL_MSG( "Invalid field" ); + } + + UpdateText(); + } + + // Set the current field to its minimal or maximal value. + void ResetCurrentField(Direction dir) + { + switch ( m_currentField ) + { + case Field_Hour: + case Field_AMPM: + // In 12-hour mode setting the hour to the minimal value + // also changes the suffix to AM and, correspondingly, + // setting it to the maximal one changes the suffix to PM. + // And, for consistency with the native MSW behaviour, we + // also do the same thing when changing AM/PM field itself, + // so change hours in any case. + m_time.SetHour(dir == Dir_Down ? 0 : 23); + break; + + case Field_Min: + m_time.SetMinute(dir == Dir_Down ? 0 : 59); + break; + + case Field_Sec: + m_time.SetSecond(dir == Dir_Down ? 0 : 59); + break; + + case Field_Max: + wxFAIL_MSG( "Invalid field" ); + } + + UpdateText(); + } + + // Append the given digit (from 0 to 9) to the current value of the current + // field. + void AppendDigitToCurrentField(int n) + { + bool moveToNextField = false; + + if ( !m_isFirstDigit ) + { + // The first digit simply replaces the existing field contents, + // but the second one should be combined with the previous one, + // otherwise entering 2-digit numbers would be impossible. + int currentValue = 0, + maxValue = 0; + + switch ( m_currentField ) + { + case Field_Hour: + currentValue = m_time.GetHour(); + maxValue = 23; + break; + + case Field_Min: + currentValue = m_time.GetMinute(); + maxValue = 59; + break; + + case Field_Sec: + currentValue = m_time.GetSecond(); + maxValue = 59; + break; + + case Field_AMPM: + case Field_Max: + wxFAIL_MSG( "Invalid field" ); + return; + } + + // Check if the new value is acceptable. If not, we just handle + // this digit as if it were the first one. + int newValue = currentValue*10 + n; + if ( newValue < maxValue ) + { + n = newValue; + + // If we're not on the seconds field, advance to the next one. + // This makes it more convenient to enter times as you can just + // press all digits one after one without touching the cursor + // arrow keys at all. + // + // Notice that MSW native control doesn't do this but it seems + // so useful that we intentionally diverge from it here. + moveToNextField = true; + + // We entered both digits so the next one will be "first" again. + m_isFirstDigit = true; + } + } + else // First digit entered. + { + // The next one won't be first any more. + m_isFirstDigit = false; + } + + switch ( m_currentField ) + { + case Field_Hour: + m_time.SetHour(n); + break; + + case Field_Min: + m_time.SetMinute(n); + break; + + case Field_Sec: + m_time.SetSecond(n); + break; + + case Field_AMPM: + case Field_Max: + wxFAIL_MSG( "Invalid field" ); + } + + if ( moveToNextField && m_currentField < Field_Sec ) + CycleCurrentField(Dir_Up); + + UpdateText(); + } + + // Update the text value to correspond to the current time. By default also + // generate an event but this can be avoided by calling the "WithoutEvent" + // variant. + void UpdateText() + { + UpdateTextWithoutEvent(); + + wxWindow* const ctrl = m_text->GetParent(); + + wxDateEvent event(ctrl, m_time, wxEVT_TIME_CHANGED); + ctrl->HandleWindowEvent(event); + } + + void UpdateTextWithoutEvent() + { + m_text->SetValue(m_time.Format(m_useAMPM ? "%I:%M:%S %p" : "%H:%M:%S")); + + HighlightCurrentField(); + } + + + // The current field of the text control: this is the one affected by + // pressing arrow keys or spin button. + Field m_currentField; + + // Flag indicating whether we use AM/PM indicator or not. + bool m_useAMPM; + + // Flag indicating whether the next digit pressed by user will be the first + // digit of the current field or the second one. This is necessary because + // the first digit replaces the current field contents while the second one + // is appended to it (if possible, e.g. pressing '7' in a field already + // containing '8' will still replace it as "78" would be invalid). + bool m_isFirstDigit; + + wxDECLARE_NO_COPY_CLASS(wxTimePickerGenericImpl); +}; + +// ============================================================================ +// wxTimePickerCtrlGeneric implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxTimePickerCtrlGeneric creation +// ---------------------------------------------------------------------------- + +void wxTimePickerCtrlGeneric::Init() +{ + m_impl = NULL; +} + +bool +wxTimePickerCtrlGeneric::Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& date, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + // The text control we use already has a border, so we don't need one + // ourselves. + style &= ~wxBORDER_MASK; + style |= wxBORDER_NONE; + + if ( !Base::Create(parent, id, pos, size, style, validator, name) ) + return false; + + m_impl = new wxTimePickerGenericImpl(this); + m_impl->SetValue(date); + + InvalidateBestSize(); + SetInitialSize(size); + + return true; +} + +wxTimePickerCtrlGeneric::~wxTimePickerCtrlGeneric() +{ + delete m_impl; +} + +wxWindowList wxTimePickerCtrlGeneric::GetCompositeWindowParts() const +{ + wxWindowList parts; + if ( m_impl ) + { + parts.push_back(m_impl->m_text); + parts.push_back(m_impl->m_btn); + } + return parts; +} + +// ---------------------------------------------------------------------------- +// wxTimePickerCtrlGeneric value +// ---------------------------------------------------------------------------- + +void wxTimePickerCtrlGeneric::SetValue(const wxDateTime& date) +{ + wxCHECK_RET( m_impl, "Must create first" ); + + m_impl->SetValue(date); +} + +wxDateTime wxTimePickerCtrlGeneric::GetValue() const +{ + wxCHECK_MSG( m_impl, wxDateTime(), "Must create first" ); + + return m_impl->m_time; +} + +// ---------------------------------------------------------------------------- +// wxTimePickerCtrlGeneric geometry +// ---------------------------------------------------------------------------- + +void wxTimePickerCtrlGeneric::DoMoveWindow(int x, int y, int width, int height) +{ + Base::DoMoveWindow(x, y, width, height); + + if ( !m_impl ) + return; + + const int widthBtn = m_impl->m_btn->GetSize().x; + const int widthText = width - widthBtn - HMARGIN_TEXT_SPIN; + + m_impl->m_text->SetSize(0, 0, widthText, height); + m_impl->m_btn->SetSize(widthText + HMARGIN_TEXT_SPIN, 0, widthBtn, height); +} + +wxSize wxTimePickerCtrlGeneric::DoGetBestSize() const +{ + if ( !m_impl ) + return Base::DoGetBestSize(); + + wxSize size = m_impl->m_text->GetBestSize(); + size.x += m_impl->m_btn->GetBestSize().x + HMARGIN_TEXT_SPIN; + + return size; +} + +#endif // !wxHAS_NATIVE_TIMEPICKERCTRL || wxUSE_TIMEPICKCTRL_GENERIC + +#endif // wxUSE_TIMEPICKCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/timer.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/timer.cpp new file mode 100644 index 0000000000..0f0ccd1601 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/timer.cpp @@ -0,0 +1,254 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/timer.cpp +// Purpose: wxTimer implementation +// Author: Vaclav Slavik +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// ---------------------------------------------------------------------------- +// NB: when using generic wxTimer implementation in your port, you *must* call +// wxTimer::NotifyTimers() often enough. The ideal place for this +// is in wxEventLoop::Dispatch(). +// ---------------------------------------------------------------------------- + +#if wxUSE_TIMER + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/module.h" +#endif + +#include "wx/apptrait.h" +#include "wx/generic/private/timer.h" + +// ---------------------------------------------------------------------------- +// Time input function +// ---------------------------------------------------------------------------- + +#define GetMillisecondsTime wxGetLocalTimeMillis + +typedef wxLongLong wxTimerTick_t; + +#if wxUSE_LONGLONG_WX + #define wxTimerTickFmtSpec wxLongLongFmtSpec "d" + #define wxTimerTickPrintfArg(tt) (tt.GetValue()) +#else // using native wxLongLong + #define wxTimerTickFmtSpec wxT("s") + #define wxTimerTickPrintfArg(tt) (tt.ToString().c_str()) +#endif // wx/native long long + +inline bool wxTickGreaterEqual(wxTimerTick_t x, wxTimerTick_t y) +{ + return x >= y; +} + +// ---------------------------------------------------------------------------- +// helper structures and wxTimerScheduler +// ---------------------------------------------------------------------------- + +class wxTimerDesc +{ +public: + wxTimerDesc(wxGenericTimerImpl *t) : + timer(t), running(false), next(NULL), prev(NULL), + shotTime(0), deleteFlag(NULL) {} + + wxGenericTimerImpl *timer; + bool running; + wxTimerDesc *next, *prev; + wxTimerTick_t shotTime; + volatile bool *deleteFlag; // see comment in ~wxTimer +}; + +class wxTimerScheduler +{ +public: + wxTimerScheduler() : m_timers(NULL) {} + + void QueueTimer(wxTimerDesc *desc, wxTimerTick_t when = 0); + void RemoveTimer(wxTimerDesc *desc); + void NotifyTimers(); + +private: + wxTimerDesc *m_timers; +}; + +void wxTimerScheduler::QueueTimer(wxTimerDesc *desc, wxTimerTick_t when) +{ + if ( desc->running ) + return; // already scheduled + + if ( when == 0 ) + when = GetMillisecondsTime() + desc->timer->GetInterval(); + desc->shotTime = when; + desc->running = true; + + wxLogTrace( wxT("timer"), + wxT("queued timer %p at tick %") wxTimerTickFmtSpec, + desc->timer, wxTimerTickPrintfArg(when)); + + if ( m_timers ) + { + wxTimerDesc *d = m_timers; + while ( d->next && d->next->shotTime < when ) d = d->next; + desc->next = d->next; + desc->prev = d; + if ( d->next ) + d->next->prev = desc; + d->next = desc; + } + else + { + m_timers = desc; + desc->prev = desc->next = NULL; + } +} + +void wxTimerScheduler::RemoveTimer(wxTimerDesc *desc) +{ + desc->running = false; + if ( desc == m_timers ) + m_timers = desc->next; + if ( desc->prev ) + desc->prev->next = desc->next; + if ( desc->next ) + desc->next->prev = desc->prev; + desc->prev = desc->next = NULL; +} + +void wxTimerScheduler::NotifyTimers() +{ + if ( m_timers ) + { + bool oneShot; + volatile bool timerDeleted; + wxTimerTick_t now = GetMillisecondsTime(); + + for ( wxTimerDesc *desc = m_timers; desc; desc = desc->next ) + { + if ( desc->running && wxTickGreaterEqual(now, desc->shotTime) ) + { + oneShot = desc->timer->IsOneShot(); + RemoveTimer(desc); + + timerDeleted = false; + desc->deleteFlag = &timerDeleted; + desc->timer->Notify(); + + if ( !timerDeleted ) + { + wxLogTrace( wxT("timer"), + wxT("notified timer %p sheduled for %") + wxTimerTickFmtSpec, + desc->timer, + wxTimerTickPrintfArg(desc->shotTime) ); + + desc->deleteFlag = NULL; + if ( !oneShot ) + QueueTimer(desc, now + desc->timer->GetInterval()); + } + else + { + desc = m_timers; + if (!desc) + break; + } + } + } + } +} + + +// ---------------------------------------------------------------------------- +// wxTimer +// ---------------------------------------------------------------------------- + +wxTimerScheduler *gs_scheduler = NULL; + +void wxGenericTimerImpl::Init() +{ + if ( !gs_scheduler ) + gs_scheduler = new wxTimerScheduler; + m_desc = new wxTimerDesc(this); +} + +wxGenericTimerImpl::~wxGenericTimerImpl() +{ + wxLogTrace( wxT("timer"), wxT("destroying timer %p..."), this); + if ( IsRunning() ) + Stop(); + + // NB: this is a hack: wxTimerScheduler must have some way of knowing + // that wxTimer object was deleted under its hands -- this may + // happen if somebody is really nasty and deletes the timer + // from wxTimer::Notify() + if ( m_desc->deleteFlag != NULL ) + *m_desc->deleteFlag = true; + + delete m_desc; + wxLogTrace( wxT("timer"), wxT(" ...done destroying timer %p..."), this); +} + +bool wxGenericTimerImpl::IsRunning() const +{ + return m_desc->running; +} + +bool wxGenericTimerImpl::Start(int millisecs, bool oneShot) +{ + wxLogTrace( wxT("timer"), wxT("started timer %p: %i ms, oneshot=%i"), + this, millisecs, oneShot); + + if ( !wxTimerImpl::Start(millisecs, oneShot) ) + return false; + + gs_scheduler->QueueTimer(m_desc); + return true; +} + +void wxGenericTimerImpl::Stop() +{ + if ( !m_desc->running ) return; + + gs_scheduler->RemoveTimer(m_desc); +} + +/*static*/ void wxGenericTimerImpl::NotifyTimers() +{ + if ( gs_scheduler ) + gs_scheduler->NotifyTimers(); +} + + + +// A module to deallocate memory properly: +class wxTimerModule: public wxModule +{ +DECLARE_DYNAMIC_CLASS(wxTimerModule) +public: + wxTimerModule() {} + bool OnInit() { return true; } + void OnExit() { wxDELETE(gs_scheduler); } +}; + +IMPLEMENT_DYNAMIC_CLASS(wxTimerModule, wxModule) + +// ---------------------------------------------------------------------------- +// wxGUIAppTraits +// ---------------------------------------------------------------------------- + +wxTimerImpl *wxGUIAppTraits::CreateTimerImpl(wxTimer *timer) +{ + return new wxGenericTimerImpl(timer); +} + + +#endif //wxUSE_TIMER diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/tipdlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/tipdlg.cpp new file mode 100644 index 0000000000..47d180962e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/tipdlg.cpp @@ -0,0 +1,351 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/tipdlg.cpp +// Purpose: implementation of wxTipDialog +// Author: Vadim Zeitlin +// Modified by: +// Created: 28.06.99 +// Copyright: (c) Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_STARTUP_TIPS + +#ifndef WX_PRECOMP + #include "wx/button.h" + #include "wx/checkbox.h" + #include "wx/statbox.h" + #include "wx/dialog.h" + #include "wx/icon.h" + #include "wx/intl.h" + #include "wx/textctrl.h" + #include "wx/statbmp.h" + #include "wx/stattext.h" + #include "wx/sizer.h" + #include "wx/settings.h" +#endif // WX_PRECOMP + +#include "wx/statline.h" +#include "wx/artprov.h" + +#include "wx/tipdlg.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +static const int wxID_NEXT_TIP = 32000; // whatever + +// --------------------------------------------------------------------------- +// macros +// --------------------------------------------------------------------------- + +/* Macro for avoiding #ifdefs when value have to be different depending on size of + device we display on - take it from something like wxDesktopPolicy in the future + */ + +#if defined(__SMARTPHONE__) + #define wxLARGESMALL(large,small) small +#else + #define wxLARGESMALL(large,small) large +#endif + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// an implementation which takes the tips from the text file - each line +// represents a tip +#if wxUSE_TEXTFILE +class WXDLLIMPEXP_ADV wxFileTipProvider : public wxTipProvider +{ +public: + wxFileTipProvider(const wxString& filename, size_t currentTip); + + virtual wxString GetTip(); + +private: + wxTextFile m_textfile; + + wxDECLARE_NO_COPY_CLASS(wxFileTipProvider); +}; +#endif // wxUSE_TEXTFILE + +#ifdef __WIN32__ +// TODO an implementation which takes the tips from the given registry key +class WXDLLIMPEXP_ADV wxRegTipProvider : public wxTipProvider +{ +public: + wxRegTipProvider(const wxString& keyname); + + virtual wxString GetTip(); +}; + +// Empty implementation for now to keep the linker happy +wxString wxRegTipProvider::GetTip() +{ + return wxEmptyString; +} + +#endif // __WIN32__ + +// the dialog we show in wxShowTip() +class WXDLLIMPEXP_ADV wxTipDialog : public wxDialog +{ +public: + wxTipDialog(wxWindow *parent, + wxTipProvider *tipProvider, + bool showAtStartup); + + // the tip dialog has "Show tips on startup" checkbox - return true if it + // was checked (or wasn't unchecked) + bool ShowTipsOnStartup() const { return m_checkbox->GetValue(); } + + // sets the (next) tip text + void SetTipText() { m_text->SetValue(m_tipProvider->GetTip()); } + + // "Next" button handler + void OnNextTip(wxCommandEvent& WXUNUSED(event)) { SetTipText(); } + +private: + wxTipProvider *m_tipProvider; + + wxTextCtrl *m_text; + wxCheckBox *m_checkbox; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxTipDialog); +}; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxFileTipProvider +// ---------------------------------------------------------------------------- +#if wxUSE_TEXTFILE +wxFileTipProvider::wxFileTipProvider(const wxString& filename, + size_t currentTip) + : wxTipProvider(currentTip), m_textfile(filename) +{ + m_textfile.Open(); +} + +wxString wxFileTipProvider::GetTip() +{ + size_t count = m_textfile.GetLineCount(); + if ( !count ) + { + return _("Tips not available, sorry!"); + } + + wxString tip; + + // Comments start with a # symbol. + // Loop reading lines until get the first one that isn't a comment. + // The max number of loop executions is the number of lines in the + // textfile so that can't go into an eternal loop in the [oddball] + // case of a comment-only tips file, or the developer has vetoed + // them all via PreprecessTip(). + for ( size_t i=0; i < count; i++ ) + { + // The current tip may be at the last line of the textfile, (or + // past it, if the number of lines in the textfile changed, such + // as changing to a different textfile, with less tips). So check + // to see at last line of text file, (or past it)... + if ( m_currentTip >= count ) + { + // .. and if so, wrap back to line 0. + m_currentTip = 0; + } + + // Read the tip, and increment the current tip counter. + tip = m_textfile.GetLine(m_currentTip++); + + // Allow a derived class's overrided virtual to modify the tip + // now if so desired. + tip = PreprocessTip(tip); + + // Break if tip isn't a comment, and isn't an empty string + // (or only stray space characters). + if ( !tip.StartsWith(wxT("#")) && (tip.Trim() != wxEmptyString) ) + { + break; + } + } + + // If tip starts with '_(', then it is a gettext string of format + // _("My \"global\" tip text") so first strip off the leading '_("'... + if ( tip.StartsWith(wxT("_(\"" ), &tip)) + { + //...and strip off the trailing '")'... + tip = tip.BeforeLast(wxT('\"')); + // ...and replace escaped quotes + tip.Replace(wxT("\\\""), wxT("\"")); + + // and translate it as requested + tip = wxGetTranslation(tip); + } + + return tip; +} +#endif // wxUSE_TEXTFILE + +// ---------------------------------------------------------------------------- +// wxTipDialog +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxTipDialog, wxDialog) + EVT_BUTTON(wxID_NEXT_TIP, wxTipDialog::OnNextTip) +END_EVENT_TABLE() + +wxTipDialog::wxTipDialog(wxWindow *parent, + wxTipProvider *tipProvider, + bool showAtStartup) + : wxDialog(GetParentForModalDialog(parent, 0), wxID_ANY, _("Tip of the Day"), + wxDefaultPosition, wxDefaultSize, + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER + ) +{ + m_tipProvider = tipProvider; + bool isPda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); + + // 1) create all controls in tab order + + wxStaticText *text = new wxStaticText(this, wxID_ANY, _("Did you know...")); + + if (!isPda) + { + wxFont font = text->GetFont(); + font.SetPointSize(int(1.6 * font.GetPointSize())); + font.SetWeight(wxFONTWEIGHT_BOLD); + text->SetFont(font); + } + + m_text = new wxTextCtrl(this, wxID_ANY, wxEmptyString, + wxDefaultPosition, wxSize(200, 160), + wxTE_MULTILINE | + wxTE_READONLY | + wxTE_NO_VSCROLL | + wxTE_RICH2 | // a hack to get rid of vert scrollbar + wxDEFAULT_CONTROL_BORDER + ); +#if defined(__WXMSW__) + m_text->SetFont(wxFont(12, wxSWISS, wxNORMAL, wxNORMAL)); +#endif + +//#if defined(__WXPM__) + // + // The only way to get icons into an OS/2 static bitmap control + // +// wxBitmap vBitmap; + +// vBitmap.SetId(wxICON_TIP); // OS/2 specific bitmap method--OS/2 wxBitmaps all have an ID. +// // and for StatBmp's under OS/2 it MUST be a valid resource ID. +// +// wxStaticBitmap* bmp = new wxStaticBitmap(this, wxID_ANY, vBitmap); +// +//#else + + wxIcon icon = wxArtProvider::GetIcon(wxART_TIP, wxART_CMN_DIALOG); + wxStaticBitmap *bmp = new wxStaticBitmap(this, wxID_ANY, icon); + +//#endif + + m_checkbox = new wxCheckBox(this, wxID_ANY, _("&Show tips at startup")); + m_checkbox->SetValue(showAtStartup); + m_checkbox->SetFocus(); + + // smart phones does not support or do not waste space for wxButtons +#ifndef __SMARTPHONE__ + wxButton *btnNext = new wxButton(this, wxID_NEXT_TIP, _("&Next Tip")); +#endif + + // smart phones does not support or do not waste space for wxButtons +#ifndef __SMARTPHONE__ + wxButton *btnClose = new wxButton(this, wxID_CLOSE); + SetAffirmativeId(wxID_CLOSE); +#endif + + + // 2) put them in boxes + + wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer *icon_text = new wxBoxSizer( wxHORIZONTAL ); + icon_text->Add( bmp, 0, wxCENTER ); + icon_text->Add( text, 1, wxCENTER | wxLEFT, wxLARGESMALL(20,0) ); + topsizer->Add( icon_text, 0, wxEXPAND | wxALL, wxLARGESMALL(10,0) ); + + topsizer->Add( m_text, 1, wxEXPAND | wxLEFT|wxRIGHT, wxLARGESMALL(10,0) ); + + wxBoxSizer *bottom = new wxBoxSizer( wxHORIZONTAL ); + if (isPda) + topsizer->Add( m_checkbox, 0, wxCENTER|wxTOP ); + else + bottom->Add( m_checkbox, 0, wxCENTER ); + + // smart phones does not support or do not waste space for wxButtons +#ifdef __SMARTPHONE__ + SetRightMenu(wxID_NEXT_TIP, _("Next")); + SetLeftMenu(wxID_CLOSE); +#else + if (!isPda) + bottom->Add( 10,10,1 ); + bottom->Add( btnNext, 0, wxCENTER | wxLEFT, wxLARGESMALL(10,0) ); + bottom->Add( btnClose, 0, wxCENTER | wxLEFT, wxLARGESMALL(10,0) ); +#endif + + if (isPda) + topsizer->Add( bottom, 0, wxCENTER | wxALL, 5 ); + else + topsizer->Add( bottom, 0, wxEXPAND | wxALL, wxLARGESMALL(10,0) ); + + SetTipText(); + + SetSizer( topsizer ); + + topsizer->SetSizeHints( this ); + topsizer->Fit( this ); + + Centre(wxBOTH | wxCENTER_FRAME); +} + +// ---------------------------------------------------------------------------- +// our public interface +// ---------------------------------------------------------------------------- + +#if wxUSE_TEXTFILE +wxTipProvider *wxCreateFileTipProvider(const wxString& filename, + size_t currentTip) +{ + return new wxFileTipProvider(filename, currentTip); +} +#endif // wxUSE_TEXTFILE + +bool wxShowTip(wxWindow *parent, + wxTipProvider *tipProvider, + bool showAtStartup) +{ + wxTipDialog dlg(parent, tipProvider, showAtStartup); + dlg.ShowModal(); + + return dlg.ShowTipsOnStartup(); +} + +#endif // wxUSE_STARTUP_TIPS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/tipwin.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/tipwin.cpp new file mode 100644 index 0000000000..7ab7e77ee0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/tipwin.cpp @@ -0,0 +1,383 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/tipwin.cpp +// Purpose: implementation of wxTipWindow +// Author: Vadim Zeitlin +// Modified by: +// Created: 10.09.00 +// Copyright: (c) 2000 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TIPWINDOW + +#include "wx/tipwin.h" + +#ifndef WX_PRECOMP + #include "wx/dcclient.h" + #include "wx/timer.h" + #include "wx/settings.h" +#endif // WX_PRECOMP + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +static const wxCoord TEXT_MARGIN_X = 3; +static const wxCoord TEXT_MARGIN_Y = 3; + +// ---------------------------------------------------------------------------- +// wxTipWindowView +// ---------------------------------------------------------------------------- + +// Viewer window to put in the frame +class WXDLLEXPORT wxTipWindowView : public wxWindow +{ +public: + wxTipWindowView(wxWindow *parent); + + // event handlers + void OnPaint(wxPaintEvent& event); + void OnMouseClick(wxMouseEvent& event); + void OnMouseMove(wxMouseEvent& event); + +#if !wxUSE_POPUPWIN + void OnKillFocus(wxFocusEvent& event); +#endif // wxUSE_POPUPWIN + + // calculate the client rect we need to display the text + void Adjust(const wxString& text, wxCoord maxLength); + +private: + wxTipWindow* m_parent; + +#if !wxUSE_POPUPWIN + long m_creationTime; +#endif // !wxUSE_POPUPWIN + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxTipWindowView); +}; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// event tables +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxTipWindow, wxTipWindowBase) + EVT_LEFT_DOWN(wxTipWindow::OnMouseClick) + EVT_RIGHT_DOWN(wxTipWindow::OnMouseClick) + EVT_MIDDLE_DOWN(wxTipWindow::OnMouseClick) + +#if !wxUSE_POPUPWIN + EVT_KILL_FOCUS(wxTipWindow::OnKillFocus) + EVT_ACTIVATE(wxTipWindow::OnActivate) +#endif // !wxUSE_POPUPWIN +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(wxTipWindowView, wxWindow) + EVT_PAINT(wxTipWindowView::OnPaint) + + EVT_LEFT_DOWN(wxTipWindowView::OnMouseClick) + EVT_RIGHT_DOWN(wxTipWindowView::OnMouseClick) + EVT_MIDDLE_DOWN(wxTipWindowView::OnMouseClick) + + EVT_MOTION(wxTipWindowView::OnMouseMove) + +#if !wxUSE_POPUPWIN + EVT_KILL_FOCUS(wxTipWindowView::OnKillFocus) +#endif // !wxUSE_POPUPWIN +END_EVENT_TABLE() + +// ---------------------------------------------------------------------------- +// wxTipWindow +// ---------------------------------------------------------------------------- + +wxTipWindow::wxTipWindow(wxWindow *parent, + const wxString& text, + wxCoord maxLength, + wxTipWindow** windowPtr, + wxRect *rectBounds) +#if wxUSE_POPUPWIN + : wxPopupTransientWindow(parent) +#else + : wxFrame(parent, wxID_ANY, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + wxNO_BORDER | wxFRAME_NO_TASKBAR ) +#endif +{ + SetTipWindowPtr(windowPtr); + if ( rectBounds ) + { + SetBoundingRect(*rectBounds); + } + + // set colours + SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); + + // set size, position and show it + m_view = new wxTipWindowView(this); + m_view->Adjust(text, maxLength); + m_view->SetFocus(); + + int x, y; + wxGetMousePosition(&x, &y); + + // we want to show the tip below the mouse, not over it + // + // NB: the reason we use "/ 2" here is that we don't know where the current + // cursors hot spot is... it would be nice if we could find this out + // though + y += wxSystemSettings::GetMetric(wxSYS_CURSOR_Y) / 2; + +#if wxUSE_POPUPWIN + Position(wxPoint(x, y), wxSize(0,0)); + Popup(m_view); + #ifdef __WXGTK__ + m_view->CaptureMouse(); + #endif +#else + Move(x, y); + Show(true); +#endif +} + +wxTipWindow::~wxTipWindow() +{ + if ( m_windowPtr ) + { + *m_windowPtr = NULL; + } + #if wxUSE_POPUPWIN + #ifdef __WXGTK__ + if ( m_view->HasCapture() ) + m_view->ReleaseMouse(); + #endif + #endif +} + +void wxTipWindow::OnMouseClick(wxMouseEvent& WXUNUSED(event)) +{ + Close(); +} + +#if wxUSE_POPUPWIN + +void wxTipWindow::OnDismiss() +{ + Close(); +} + +#else // !wxUSE_POPUPWIN + +void wxTipWindow::OnActivate(wxActivateEvent& event) +{ + if (!event.GetActive()) + Close(); +} + +void wxTipWindow::OnKillFocus(wxFocusEvent& WXUNUSED(event)) +{ + // Under Windows at least, we will get this immediately + // because when the view window is focussed, the + // tip window goes out of focus. +#ifdef __WXGTK__ + Close(); +#endif +} + +#endif // wxUSE_POPUPWIN // !wxUSE_POPUPWIN + +void wxTipWindow::SetBoundingRect(const wxRect& rectBound) +{ + m_rectBound = rectBound; +} + +void wxTipWindow::Close() +{ + if ( m_windowPtr ) + { + *m_windowPtr = NULL; + m_windowPtr = NULL; + } + +#if wxUSE_POPUPWIN + Show(false); + #ifdef __WXGTK__ + if ( m_view->HasCapture() ) + m_view->ReleaseMouse(); + #endif + // Under OS X we get destroyed because of wxEVT_KILL_FOCUS generated by + // Show(false). + #ifndef __WXOSX__ + Destroy(); + #endif +#else + wxFrame::Close(); +#endif +} + +// ---------------------------------------------------------------------------- +// wxTipWindowView +// ---------------------------------------------------------------------------- + +wxTipWindowView::wxTipWindowView(wxWindow *parent) + : wxWindow(parent, wxID_ANY, + wxDefaultPosition, wxDefaultSize, + wxNO_BORDER) +{ + // set colours + SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); + +#if !wxUSE_POPUPWIN + m_creationTime = wxGetLocalTime(); +#endif // !wxUSE_POPUPWIN + + m_parent = (wxTipWindow*)parent; +} + +void wxTipWindowView::Adjust(const wxString& text, wxCoord maxLength) +{ + wxClientDC dc(this); + dc.SetFont(GetFont()); + + // calculate the length: we want each line be no longer than maxLength + // pixels and we only break lines at words boundary + wxString current; + wxCoord height, width, + widthMax = 0; + m_parent->m_heightLine = 0; + + bool breakLine = false; + for ( const wxChar *p = text.c_str(); ; p++ ) + { + if ( *p == wxT('\n') || *p == wxT('\0') ) + { + dc.GetTextExtent(current, &width, &height); + if ( width > widthMax ) + widthMax = width; + + if ( height > m_parent->m_heightLine ) + m_parent->m_heightLine = height; + + m_parent->m_textLines.Add(current); + + if ( !*p ) + { + // end of text + break; + } + + current.clear(); + breakLine = false; + } + else if ( breakLine && (*p == wxT(' ') || *p == wxT('\t')) ) + { + // word boundary - break the line here + m_parent->m_textLines.Add(current); + current.clear(); + breakLine = false; + } + else // line goes on + { + current += *p; + dc.GetTextExtent(current, &width, &height); + if ( width > maxLength ) + breakLine = true; + + if ( width > widthMax ) + widthMax = width; + + if ( height > m_parent->m_heightLine ) + m_parent->m_heightLine = height; + } + } + + // take into account the border size and the margins + width = 2*(TEXT_MARGIN_X + 1) + widthMax; + height = 2*(TEXT_MARGIN_Y + 1) + wx_truncate_cast(wxCoord, m_parent->m_textLines.GetCount())*m_parent->m_heightLine; + m_parent->SetClientSize(width, height); + SetSize(0, 0, width, height); +} + +void wxTipWindowView::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + + wxRect rect; + wxSize size = GetClientSize(); + rect.width = size.x; + rect.height = size.y; + + // first filll the background + dc.SetBrush(wxBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID)); + dc.SetPen(wxPen(GetForegroundColour(), 1, wxPENSTYLE_SOLID)); + dc.DrawRectangle(rect); + + // and then draw the text line by line + dc.SetTextBackground(GetBackgroundColour()); + dc.SetTextForeground(GetForegroundColour()); + dc.SetFont(GetFont()); + + wxPoint pt; + pt.x = TEXT_MARGIN_X; + pt.y = TEXT_MARGIN_Y; + size_t count = m_parent->m_textLines.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + dc.DrawText(m_parent->m_textLines[n], pt); + + pt.y += m_parent->m_heightLine; + } +} + +void wxTipWindowView::OnMouseClick(wxMouseEvent& WXUNUSED(event)) +{ + m_parent->Close(); +} + +void wxTipWindowView::OnMouseMove(wxMouseEvent& event) +{ + const wxRect& rectBound = m_parent->m_rectBound; + + if ( rectBound.width && + !rectBound.Contains(ClientToScreen(event.GetPosition())) ) + { + // mouse left the bounding rect, disappear + m_parent->Close(); + } + else + { + event.Skip(); + } +} + +#if !wxUSE_POPUPWIN +void wxTipWindowView::OnKillFocus(wxFocusEvent& WXUNUSED(event)) +{ + // Workaround the kill focus event happening just after creation in wxGTK + if (wxGetLocalTime() > m_creationTime + 1) + m_parent->Close(); +} +#endif // !wxUSE_POPUPWIN + +#endif // wxUSE_TIPWINDOW diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/toolbkg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/toolbkg.cpp new file mode 100644 index 0000000000..ef724cbac3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/toolbkg.cpp @@ -0,0 +1,379 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/toolbkg.cpp +// Purpose: generic implementation of wxToolbook +// Author: Julian Smart +// Modified by: +// Created: 2006-01-29 +// Copyright: (c) 2006 Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TOOLBOOK + +#ifndef WX_PRECOMP + #include "wx/icon.h" + #include "wx/settings.h" + #include "wx/toolbar.h" +#endif + +#include "wx/imaglist.h" +#include "wx/sysopt.h" +#include "wx/toolbook.h" + +#if defined(__WXMAC__) && wxUSE_TOOLBAR && wxUSE_BMPBUTTON +#include "wx/generic/buttonbar.h" +#endif + +// ---------------------------------------------------------------------------- +// various wxWidgets macros +// ---------------------------------------------------------------------------- + +// check that the page index is valid +#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount()) + +// ---------------------------------------------------------------------------- +// event table +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxToolbook, wxBookCtrlBase) + +wxDEFINE_EVENT( wxEVT_TOOLBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_TOOLBOOK_PAGE_CHANGED, wxBookCtrlEvent ); + +BEGIN_EVENT_TABLE(wxToolbook, wxBookCtrlBase) + EVT_SIZE(wxToolbook::OnSize) + EVT_TOOL_RANGE(1, 50, wxToolbook::OnToolSelected) + EVT_IDLE(wxToolbook::OnIdle) +END_EVENT_TABLE() + +// ============================================================================ +// wxToolbook implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxToolbook creation +// ---------------------------------------------------------------------------- + +void wxToolbook::Init() +{ + m_needsRealizing = false; +} + +bool wxToolbook::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT ) + style |= wxBK_TOP; + + // no border for this control + style &= ~wxBORDER_MASK; + style |= wxBORDER_NONE; + + if ( !wxControl::Create(parent, id, pos, size, style, + wxDefaultValidator, name) ) + return false; + + int tbFlags = wxTB_TEXT | wxTB_FLAT | wxBORDER_NONE; + if ( (style & (wxBK_LEFT | wxBK_RIGHT)) != 0 ) + tbFlags |= wxTB_VERTICAL; + else + tbFlags |= wxTB_HORIZONTAL; + + if ( style & wxTBK_HORZ_LAYOUT ) + tbFlags |= wxTB_HORZ_LAYOUT; + + // TODO: make more configurable + +#if defined(__WXMAC__) && wxUSE_TOOLBAR && wxUSE_BMPBUTTON + if (style & wxTBK_BUTTONBAR) + { + m_bookctrl = new wxButtonToolBar + ( + this, + wxID_ANY, + wxDefaultPosition, + wxDefaultSize, + tbFlags + ); + } + else +#endif + { + m_bookctrl = new wxToolBar + ( + this, + wxID_ANY, + wxDefaultPosition, + wxDefaultSize, + tbFlags | wxTB_NODIVIDER + ); + } + + return true; +} + +// ---------------------------------------------------------------------------- +// wxToolbook geometry management +// ---------------------------------------------------------------------------- + +void wxToolbook::OnSize(wxSizeEvent& event) +{ + if (m_needsRealizing) + Realize(); + + wxBookCtrlBase::OnSize(event); +} + +// ---------------------------------------------------------------------------- +// accessing the pages +// ---------------------------------------------------------------------------- + +bool wxToolbook::SetPageText(size_t n, const wxString& strText) +{ + // Assume tool ids start from 1 + wxToolBarToolBase* tool = GetToolBar()->FindById(n + 1); + if (tool) + { + tool->SetLabel(strText); + return true; + } + else + return false; +} + +wxString wxToolbook::GetPageText(size_t n) const +{ + wxToolBarToolBase* tool = GetToolBar()->FindById(n + 1); + if (tool) + return tool->GetLabel(); + else + return wxEmptyString; +} + +int wxToolbook::GetPageImage(size_t WXUNUSED(n)) const +{ + wxFAIL_MSG( wxT("wxToolbook::GetPageImage() not implemented") ); + + return wxNOT_FOUND; +} + +bool wxToolbook::SetPageImage(size_t n, int imageId) +{ + wxASSERT( GetImageList() != NULL ); + if (!GetImageList()) + return false; + + wxToolBarToolBase* tool = GetToolBar()->FindById(n + 1); + if (tool) + { + // Find the image list index for this tool + wxBitmap bitmap = GetImageList()->GetBitmap(imageId); + tool->SetNormalBitmap(bitmap); + return true; + } + else + return false; +} + +// ---------------------------------------------------------------------------- +// image list stuff +// ---------------------------------------------------------------------------- + +void wxToolbook::SetImageList(wxImageList *imageList) +{ + wxBookCtrlBase::SetImageList(imageList); +} + +// ---------------------------------------------------------------------------- +// selection +// ---------------------------------------------------------------------------- + +wxBookCtrlEvent* wxToolbook::CreatePageChangingEvent() const +{ + return new wxBookCtrlEvent(wxEVT_TOOLBOOK_PAGE_CHANGING, m_windowId); +} + +void wxToolbook::MakeChangedEvent(wxBookCtrlEvent &event) +{ + event.SetEventType(wxEVT_TOOLBOOK_PAGE_CHANGED); +} + +void wxToolbook::UpdateSelectedPage(size_t newsel) +{ + m_selection = newsel; + GetToolBar()->ToggleTool(newsel + 1, true); +} + +// Not part of the wxBookctrl API, but must be called in OnIdle or +// by application to realize the toolbar and select the initial page. +void wxToolbook::Realize() +{ + if (m_needsRealizing) + { + m_needsRealizing = false; + + GetToolBar()->SetToolBitmapSize(m_maxBitmapSize); + + GetToolBar()->Realize(); + } + + if (m_selection == wxNOT_FOUND) + m_selection = 0; + + if (GetPageCount() > 0) + { + int sel = m_selection; + m_selection = wxNOT_FOUND; + SetSelection(sel); + } + + DoSize(); +} + +int wxToolbook::HitTest(const wxPoint& pt, long *flags) const +{ + int pagePos = wxNOT_FOUND; + + if ( flags ) + *flags = wxBK_HITTEST_NOWHERE; + + // convert from wxToolbook coordinates to wxToolBar ones + const wxToolBarBase * const tbar = GetToolBar(); + const wxPoint tbarPt = tbar->ScreenToClient(ClientToScreen(pt)); + + // is the point over the toolbar? + if ( wxRect(tbar->GetSize()).Contains(tbarPt) ) + { + const wxToolBarToolBase * const + tool = tbar->FindToolForPosition(tbarPt.x, tbarPt.y); + + if ( tool ) + { + pagePos = tbar->GetToolPos(tool->GetId()); + if ( flags ) + *flags = wxBK_HITTEST_ONICON | wxBK_HITTEST_ONLABEL; + } + } + else // not over the toolbar + { + if ( flags && GetPageRect().Contains(pt) ) + *flags |= wxBK_HITTEST_ONPAGE; + } + + return pagePos; +} + +void wxToolbook::OnIdle(wxIdleEvent& event) +{ + if (m_needsRealizing) + Realize(); + event.Skip(); +} + +// ---------------------------------------------------------------------------- +// adding/removing the pages +// ---------------------------------------------------------------------------- + +bool wxToolbook::InsertPage(size_t n, + wxWindow *page, + const wxString& text, + bool bSelect, + int imageId) +{ + if ( !wxBookCtrlBase::InsertPage(n, page, text, bSelect, imageId) ) + return false; + + m_needsRealizing = true; + + wxASSERT(GetImageList() != NULL); + + if (!GetImageList()) + return false; + + // TODO: make sure all platforms can convert between icon and bitmap, + // and/or test whether the image is a bitmap or an icon. +#ifdef __WXMAC__ + wxBitmap bitmap = GetImageList()->GetBitmap(imageId); +#else + // On Windows, we can lose information by using GetBitmap, so extract icon instead + wxIcon icon = GetImageList()->GetIcon(imageId); + wxBitmap bitmap; + bitmap.CopyFromIcon(icon); +#endif + + m_maxBitmapSize.x = wxMax(bitmap.GetWidth(), m_maxBitmapSize.x); + m_maxBitmapSize.y = wxMax(bitmap.GetHeight(), m_maxBitmapSize.y); + + GetToolBar()->SetToolBitmapSize(m_maxBitmapSize); + GetToolBar()->AddRadioTool(n + 1, text, bitmap, wxNullBitmap, text); + + if (bSelect) + { + GetToolBar()->ToggleTool(n, true); + m_selection = n; + } + else + page->Hide(); + + InvalidateBestSize(); + return true; +} + +wxWindow *wxToolbook::DoRemovePage(size_t page) +{ + wxWindow *win = wxBookCtrlBase::DoRemovePage(page); + + if ( win ) + { + GetToolBar()->DeleteTool(page + 1); + + DoSetSelectionAfterRemoval(page); + } + + return win; +} + + +bool wxToolbook::DeleteAllPages() +{ + GetToolBar()->ClearTools(); + return wxBookCtrlBase::DeleteAllPages(); +} + +// ---------------------------------------------------------------------------- +// wxToolbook events +// ---------------------------------------------------------------------------- + +void wxToolbook::OnToolSelected(wxCommandEvent& event) +{ + const int selNew = event.GetId() - 1; + + if ( selNew == m_selection ) + { + // this event can only come from our own Select(m_selection) below + // which we call when the page change is vetoed, so we should simply + // ignore it + return; + } + + SetSelection(selNew); + + // change wasn't allowed, return to previous state + if (m_selection != selNew) + { + GetToolBar()->ToggleTool(m_selection, false); + } +} + +#endif // wxUSE_TOOLBOOK diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/treebkg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/treebkg.cpp new file mode 100644 index 0000000000..4e1917d1ca --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/treebkg.cpp @@ -0,0 +1,764 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/treebkg.cpp +// Purpose: generic implementation of wxTreebook +// Author: Evgeniy Tarassov, Vadim Zeitlin +// Modified by: +// Created: 2005-09-15 +// Copyright: (c) 2005 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TREEBOOK + +#include "wx/treebook.h" + +#ifndef WX_PRECOMP + #include "wx/settings.h" +#endif + +#include "wx/imaglist.h" + +// ---------------------------------------------------------------------------- +// various wxWidgets macros +// ---------------------------------------------------------------------------- + +// check that the page index is valid +#define IS_VALID_PAGE(nPage) ((nPage) < DoInternalGetPageCount()) + +// ---------------------------------------------------------------------------- +// event table +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxTreebook, wxBookCtrlBase) + +wxDEFINE_EVENT( wxEVT_TREEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_TREEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_TREEBOOK_NODE_COLLAPSED, wxBookCtrlEvent ); +wxDEFINE_EVENT( wxEVT_TREEBOOK_NODE_EXPANDED, wxBookCtrlEvent ); + +BEGIN_EVENT_TABLE(wxTreebook, wxBookCtrlBase) + EVT_TREE_SEL_CHANGED (wxID_ANY, wxTreebook::OnTreeSelectionChange) + EVT_TREE_ITEM_EXPANDED (wxID_ANY, wxTreebook::OnTreeNodeExpandedCollapsed) + EVT_TREE_ITEM_COLLAPSED(wxID_ANY, wxTreebook::OnTreeNodeExpandedCollapsed) +END_EVENT_TABLE() + +// ============================================================================ +// wxTreebook implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxTreebook creation +// ---------------------------------------------------------------------------- + +void wxTreebook::Init() +{ + m_selection = + m_actualSelection = wxNOT_FOUND; +} + +bool +wxTreebook::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + // Check the style flag to have either wxTBK_RIGHT or wxTBK_LEFT + if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT ) + { + style |= wxBK_LEFT; + } + style |= wxTAB_TRAVERSAL; + + // no border for this control, it doesn't look nice together with the tree + style &= ~wxBORDER_MASK; + style |= wxBORDER_NONE; + + if ( !wxControl::Create(parent, id, pos, size, + style, wxDefaultValidator, name) ) + return false; + + m_bookctrl = new wxTreeCtrl + ( + this, + wxID_ANY, + wxDefaultPosition, + wxDefaultSize, + wxBORDER_THEME | + wxTR_DEFAULT_STYLE | + wxTR_HIDE_ROOT | + wxTR_SINGLE + ); + GetTreeCtrl()->SetQuickBestSize(false); // do full size calculation + GetTreeCtrl()->AddRoot(wxEmptyString); // label doesn't matter, it's hidden + +#ifdef __WXMSW__ + // We need to add dummy size event to force possible scrollbar hiding + wxSizeEvent evt; + GetEventHandler()->AddPendingEvent(evt); +#endif + + return true; +} + + +// insert a new page just before the pagePos +bool wxTreebook::InsertPage(size_t pagePos, + wxWindow *page, + const wxString& text, + bool bSelect, + int imageId) +{ + return DoInsertPage(pagePos, page, text, bSelect, imageId); +} + +bool wxTreebook::InsertSubPage(size_t pagePos, + wxWindow *page, + const wxString& text, + bool bSelect, + int imageId) +{ + return DoInsertSubPage(pagePos, page, text, bSelect, imageId); +} + +bool wxTreebook::AddPage(wxWindow *page, const wxString& text, bool bSelect, + int imageId) +{ + return DoInsertPage(m_treeIds.GetCount(), page, text, bSelect, imageId); +} + +// insertion time is linear to the number of top-pages +bool wxTreebook::AddSubPage(wxWindow *page, const wxString& text, bool bSelect, int imageId) +{ + return DoAddSubPage(page, text, bSelect, imageId); +} + + +bool wxTreebook::DoInsertPage(size_t pagePos, + wxWindow *page, + const wxString& text, + bool bSelect, + int imageId) +{ + wxCHECK_MSG( pagePos <= DoInternalGetPageCount(), false, + wxT("Invalid treebook page position") ); + + if ( !wxBookCtrlBase::InsertPage(pagePos, page, text, bSelect, imageId) ) + return false; + + wxTreeCtrl *tree = GetTreeCtrl(); + wxTreeItemId newId; + if ( pagePos == DoInternalGetPageCount() ) + { + // append the page to the end + wxTreeItemId rootId = tree->GetRootItem(); + + newId = tree->AppendItem(rootId, text, imageId); + } + else // insert the new page before the given one + { + wxTreeItemId nodeId = m_treeIds[pagePos]; + + wxTreeItemId previousId = tree->GetPrevSibling(nodeId); + wxTreeItemId parentId = tree->GetItemParent(nodeId); + + if ( previousId.IsOk() ) + { + // insert before the sibling - previousId + newId = tree->InsertItem(parentId, previousId, text, imageId); + } + else // no prev siblings -- insert as a first child + { + wxASSERT_MSG( parentId.IsOk(), wxT( "Tree has no root node?" ) ); + + newId = tree->PrependItem(parentId, text, imageId); + } + } + + if ( !newId.IsOk() ) + { + //something wrong -> cleaning and returning with false + (void)wxBookCtrlBase::DoRemovePage(pagePos); + + wxFAIL_MSG( wxT("Failed to insert treebook page") ); + return false; + } + + DoInternalAddPage(pagePos, page, newId); + + DoUpdateSelection(bSelect, pagePos); + + return true; +} + +bool wxTreebook::DoAddSubPage(wxWindow *page, const wxString& text, bool bSelect, int imageId) +{ + wxTreeCtrl *tree = GetTreeCtrl(); + + wxTreeItemId rootId = tree->GetRootItem(); + + wxTreeItemId lastNodeId = tree->GetLastChild(rootId); + + wxCHECK_MSG( lastNodeId.IsOk(), false, + wxT("Can't insert sub page when there are no pages") ); + + // now calculate its position (should we save/update it too?) + size_t newPos = tree->GetCount() - + (tree->GetChildrenCount(lastNodeId, true) + 1); + + return DoInsertSubPage(newPos, page, text, bSelect, imageId); +} + +bool wxTreebook::DoInsertSubPage(size_t pagePos, + wxTreebookPage *page, + const wxString& text, + bool bSelect, + int imageId) +{ + wxTreeItemId parentId = DoInternalGetPage(pagePos); + wxCHECK_MSG( parentId.IsOk(), false, wxT("invalid tree item") ); + + wxTreeCtrl *tree = GetTreeCtrl(); + + size_t newPos = pagePos + tree->GetChildrenCount(parentId, true) + 1; + wxASSERT_MSG( newPos <= DoInternalGetPageCount(), + wxT("Internal error in tree insert point calculation") ); + + if ( !wxBookCtrlBase::InsertPage(newPos, page, text, bSelect, imageId) ) + return false; + + wxTreeItemId newId = tree->AppendItem(parentId, text, imageId); + + if ( !newId.IsOk() ) + { + (void)wxBookCtrlBase::DoRemovePage(newPos); + + wxFAIL_MSG( wxT("Failed to insert treebook page") ); + return false; + } + + DoInternalAddPage(newPos, page, newId); + + DoUpdateSelection(bSelect, newPos); + + return true; +} + +bool wxTreebook::DeletePage(size_t pagePos) +{ + wxCHECK_MSG( IS_VALID_PAGE(pagePos), false, wxT("Invalid tree index") ); + + wxTreebookPage *oldPage = DoRemovePage(pagePos); + if ( !oldPage ) + return false; + + delete oldPage; + + return true; +} + +wxTreebookPage *wxTreebook::DoRemovePage(size_t pagePos) +{ + wxTreeItemId pageId = DoInternalGetPage(pagePos); + wxCHECK_MSG( pageId.IsOk(), NULL, wxT("Invalid tree index") ); + + wxTreebookPage * oldPage = GetPage(pagePos); + wxTreeCtrl *tree = GetTreeCtrl(); + + size_t subCount = tree->GetChildrenCount(pageId, true); + wxASSERT_MSG ( IS_VALID_PAGE(pagePos + subCount), + wxT("Internal error in wxTreebook::DoRemovePage") ); + + // here we are going to delete ALL the pages in the range + // [pagePos, pagePos + subCount] -- the page and its children + + // deleting all the pages from the base class + for ( size_t i = 0; i <= subCount; ++i ) + { + wxTreebookPage *page = wxBookCtrlBase::DoRemovePage(pagePos); + + // don't delete the page itself though -- it will be deleted in + // DeletePage() when we return + if ( i ) + { + delete page; + } + } + + DoInternalRemovePageRange(pagePos, subCount); + + tree->DeleteChildren( pageId ); + tree->Delete( pageId ); + + return oldPage; +} + +bool wxTreebook::DeleteAllPages() +{ + wxBookCtrlBase::DeleteAllPages(); + m_treeIds.Clear(); + m_selection = + m_actualSelection = wxNOT_FOUND; + + wxTreeCtrl *tree = GetTreeCtrl(); + tree->DeleteChildren(tree->GetRootItem()); + + return true; +} + +void wxTreebook::DoInternalAddPage(size_t newPos, + wxTreebookPage *page, + wxTreeItemId pageId) +{ + wxASSERT_MSG( newPos <= m_treeIds.GetCount(), wxT("Ivalid index passed to wxTreebook::DoInternalAddPage") ); + + // hide newly inserted page initially (it will be shown when selected) + if ( page ) + page->Hide(); + + if ( newPos == m_treeIds.GetCount() ) + { + // append + m_treeIds.Add(pageId); + } + else // insert + { + m_treeIds.Insert(pageId, newPos); + + if ( m_selection != wxNOT_FOUND && newPos <= (size_t)m_selection ) + { + // selection has been moved one unit toward the end + ++m_selection; + if ( m_actualSelection != wxNOT_FOUND ) + ++m_actualSelection; + } + else if ( m_actualSelection != wxNOT_FOUND && + newPos <= (size_t)m_actualSelection ) + { + DoSetSelection(m_selection); + } + } +} + +void wxTreebook::DoInternalRemovePageRange(size_t pagePos, size_t subCount) +{ + // Attention: this function is only for a situation when we delete a node + // with all its children so pagePos is the node's index and subCount is the + // node children count + wxASSERT_MSG( pagePos + subCount < m_treeIds.GetCount(), + wxT("Ivalid page index") ); + + wxTreeItemId pageId = m_treeIds[pagePos]; + + m_treeIds.RemoveAt(pagePos, subCount + 1); + + if ( m_selection != wxNOT_FOUND ) + { + if ( (size_t)m_selection > pagePos + subCount) + { + // selection is far after the deleted page, so just update the index and move on + m_selection -= 1 + subCount; + if ( m_actualSelection != wxNOT_FOUND) + { + m_actualSelection -= subCount + 1; + } + } + else if ( (size_t)m_selection >= pagePos ) + { + wxTreeCtrl *tree = GetTreeCtrl(); + + // as selected page is going to be deleted, try to select the next + // sibling if exists, if not then the parent + wxTreeItemId nodeId = tree->GetNextSibling(pageId); + + m_selection = wxNOT_FOUND; + m_actualSelection = wxNOT_FOUND; + + if ( nodeId.IsOk() ) + { + // selecting next siblings + tree->SelectItem(nodeId); + } + else // no next sibling, select the parent + { + wxTreeItemId parentId = tree->GetItemParent(pageId); + + if ( parentId.IsOk() && parentId != tree->GetRootItem() ) + { + tree->SelectItem(parentId); + } + else // parent is root + { + // we can't select it as it's hidden + DoUpdateSelection(false, wxNOT_FOUND); + } + } + } + else if ( m_actualSelection != wxNOT_FOUND && + (size_t)m_actualSelection >= pagePos ) + { + // nothing to do -- selection is before the deleted node, but + // actually shown page (the first (sub)child with page != NULL) is + // already deleted + m_actualSelection = m_selection; + + // send event as documented + DoSetSelection(m_selection, SetSelection_SendEvent); + } + //else: nothing to do -- selection is before the deleted node + } + else + { + DoUpdateSelection(false, wxNOT_FOUND); + } +} + + +void wxTreebook::DoUpdateSelection(bool bSelect, int newPos) +{ + int newSelPos; + if ( bSelect ) + { + newSelPos = newPos; + } + else if ( m_selection == wxNOT_FOUND && DoInternalGetPageCount() > 0 ) + { + newSelPos = 0; + } + else + { + newSelPos = wxNOT_FOUND; + } + + if ( newSelPos != wxNOT_FOUND ) + { + SetSelection((size_t)newSelPos); + } +} + +wxTreeItemId wxTreebook::DoInternalGetPage(size_t pagePos) const +{ + if ( pagePos >= m_treeIds.GetCount() ) + { + // invalid position but ok here, in this internal function, don't assert + // (the caller will do it) + return wxTreeItemId(); + } + + return m_treeIds[pagePos]; +} + +int wxTreebook::DoInternalFindPageById(wxTreeItemId pageId) const +{ + const size_t count = m_treeIds.GetCount(); + for ( size_t i = 0; i < count; ++i ) + { + if ( m_treeIds[i] == pageId ) + return i; + } + + return wxNOT_FOUND; +} + +bool wxTreebook::IsNodeExpanded(size_t pagePos) const +{ + wxTreeItemId pageId = DoInternalGetPage(pagePos); + + wxCHECK_MSG( pageId.IsOk(), false, wxT("invalid tree item") ); + + return GetTreeCtrl()->IsExpanded(pageId); +} + +bool wxTreebook::ExpandNode(size_t pagePos, bool expand) +{ + wxTreeItemId pageId = DoInternalGetPage(pagePos); + + wxCHECK_MSG( pageId.IsOk(), false, wxT("invalid tree item") ); + + if ( expand ) + { + GetTreeCtrl()->Expand( pageId ); + } + else // collapse + { + GetTreeCtrl()->Collapse( pageId ); + + // rely on the events generated by wxTreeCtrl to update selection + } + + return true; +} + +int wxTreebook::GetPageParent(size_t pagePos) const +{ + wxTreeItemId nodeId = DoInternalGetPage( pagePos ); + wxCHECK_MSG( nodeId.IsOk(), wxNOT_FOUND, wxT("Invalid page index spacified!") ); + + const wxTreeItemId parent = GetTreeCtrl()->GetItemParent( nodeId ); + + return parent.IsOk() ? DoInternalFindPageById(parent) : wxNOT_FOUND; +} + +bool wxTreebook::SetPageText(size_t n, const wxString& strText) +{ + wxTreeItemId pageId = DoInternalGetPage(n); + + wxCHECK_MSG( pageId.IsOk(), false, wxT("invalid tree item") ); + + GetTreeCtrl()->SetItemText(pageId, strText); + + return true; +} + +wxString wxTreebook::GetPageText(size_t n) const +{ + wxTreeItemId pageId = DoInternalGetPage(n); + + wxCHECK_MSG( pageId.IsOk(), wxString(), wxT("invalid tree item") ); + + return GetTreeCtrl()->GetItemText(pageId); +} + +int wxTreebook::GetPageImage(size_t n) const +{ + wxTreeItemId pageId = DoInternalGetPage(n); + + wxCHECK_MSG( pageId.IsOk(), wxNOT_FOUND, wxT("invalid tree item") ); + + return GetTreeCtrl()->GetItemImage(pageId); +} + +bool wxTreebook::SetPageImage(size_t n, int imageId) +{ + wxTreeItemId pageId = DoInternalGetPage(n); + + wxCHECK_MSG( pageId.IsOk(), false, wxT("invalid tree item") ); + + GetTreeCtrl()->SetItemImage(pageId, imageId); + + return true; +} + +int wxTreebook::DoSetSelection(size_t pagePos, int flags) +{ + wxCHECK_MSG( IS_VALID_PAGE(pagePos), wxNOT_FOUND, + wxT("invalid page index in wxListbook::DoSetSelection()") ); + wxASSERT_MSG( GetPageCount() == DoInternalGetPageCount(), + wxT("wxTreebook logic error: m_treeIds and m_pages not in sync!")); + + wxBookCtrlEvent event(wxEVT_TREEBOOK_PAGE_CHANGING, m_windowId); + const int oldSel = m_selection; + wxTreeCtrl *tree = GetTreeCtrl(); + bool allowed = false; + + if (flags & SetSelection_SendEvent) + { + event.SetEventObject(this); + event.SetSelection(pagePos); + event.SetOldSelection(m_selection); + + // don't send the event if the old and new pages are the same; do send it + // otherwise and be prepared for it to be vetoed + allowed = (int)pagePos == m_selection || + !GetEventHandler()->ProcessEvent(event) || + event.IsAllowed(); + } + + if ( !(flags & SetSelection_SendEvent) || allowed ) + { + // hide the previously shown page + wxTreebookPage * const oldPage = DoGetCurrentPage(); + if ( oldPage ) + oldPage->Hide(); + + // then show the new one + m_selection = pagePos; + wxTreebookPage *page = wxBookCtrlBase::GetPage(m_selection); + if ( !page ) + { + // find the next page suitable to be shown: the first (grand)child + // of this one with a non-NULL associated page + wxTreeItemId childId = m_treeIds[pagePos]; + int actualPagePos = pagePos; + while ( !page && childId.IsOk() ) + { + wxTreeItemIdValue cookie; + childId = tree->GetFirstChild( childId, cookie ); + if ( childId.IsOk() ) + { + page = wxBookCtrlBase::GetPage(++actualPagePos); + } + } + + m_actualSelection = page ? actualPagePos : m_selection; + } + + if ( page ) + page->Show(); + + tree->SelectItem(DoInternalGetPage(pagePos)); + + if (flags & SetSelection_SendEvent) + { + // notify about the (now completed) page change + event.SetEventType(wxEVT_TREEBOOK_PAGE_CHANGED); + (void)GetEventHandler()->ProcessEvent(event); + } + } + else if ( (flags & SetSelection_SendEvent) && !allowed) // page change vetoed + { + // tree selection might have already had changed + if ( oldSel != wxNOT_FOUND ) + tree->SelectItem(DoInternalGetPage(oldSel)); + } + + return oldSel; +} + +wxTreebookPage *wxTreebook::DoGetCurrentPage() const +{ + if ( m_selection == wxNOT_FOUND ) + return NULL; + + wxTreebookPage *page = wxBookCtrlBase::GetPage(m_selection); + if ( !page && m_actualSelection != wxNOT_FOUND ) + { + page = wxBookCtrlBase::GetPage(m_actualSelection); + } + + return page; +} + +void wxTreebook::SetImageList(wxImageList *imageList) +{ + wxBookCtrlBase::SetImageList(imageList); + GetTreeCtrl()->SetImageList(imageList); +} + +void wxTreebook::AssignImageList(wxImageList *imageList) +{ + wxBookCtrlBase::AssignImageList(imageList); + GetTreeCtrl()->SetImageList(imageList); +} + +// ---------------------------------------------------------------------------- +// event handlers +// ---------------------------------------------------------------------------- + +void wxTreebook::OnTreeSelectionChange(wxTreeEvent& event) +{ + if ( event.GetEventObject() != m_bookctrl ) + { + event.Skip(); + return; + } + + wxTreeItemId newId = event.GetItem(); + + if ( (m_selection == wxNOT_FOUND && + (!newId.IsOk() || newId == GetTreeCtrl()->GetRootItem())) || + (m_selection != wxNOT_FOUND && newId == m_treeIds[m_selection]) ) + { + // this event can only come when we modify the tree selection ourselves + // so we should simply ignore it + return; + } + + int newPos = DoInternalFindPageById(newId); + + if ( newPos != wxNOT_FOUND ) + SetSelection( newPos ); +} + +void wxTreebook::OnTreeNodeExpandedCollapsed(wxTreeEvent & event) +{ + if ( event.GetEventObject() != m_bookctrl ) + { + event.Skip(); + return; + } + + wxTreeItemId nodeId = event.GetItem(); + if ( !nodeId.IsOk() || nodeId == GetTreeCtrl()->GetRootItem() ) + return; + int pagePos = DoInternalFindPageById(nodeId); + wxCHECK_RET( pagePos != wxNOT_FOUND, wxT("Internal problem in wxTreebook!..") ); + + wxBookCtrlEvent ev(GetTreeCtrl()->IsExpanded(nodeId) + ? wxEVT_TREEBOOK_NODE_EXPANDED + : wxEVT_TREEBOOK_NODE_COLLAPSED, + m_windowId); + + ev.SetSelection(pagePos); + ev.SetOldSelection(pagePos); + ev.SetEventObject(this); + + GetEventHandler()->ProcessEvent(ev); +} + +// ---------------------------------------------------------------------------- +// wxTreebook geometry management +// ---------------------------------------------------------------------------- + +int wxTreebook::HitTest(wxPoint const & pt, long * flags) const +{ + int pagePos = wxNOT_FOUND; + + if ( flags ) + *flags = wxBK_HITTEST_NOWHERE; + + // convert from wxTreebook coorindates to wxTreeCtrl ones + const wxTreeCtrl * const tree = GetTreeCtrl(); + const wxPoint treePt = tree->ScreenToClient(ClientToScreen(pt)); + + // is it over the tree? + if ( wxRect(tree->GetSize()).Contains(treePt) ) + { + int flagsTree; + wxTreeItemId id = tree->HitTest(treePt, flagsTree); + + if ( id.IsOk() && (flagsTree & wxTREE_HITTEST_ONITEM) ) + { + pagePos = DoInternalFindPageById(id); + } + + if ( flags ) + { + if ( pagePos != wxNOT_FOUND ) + *flags = 0; + + if ( flagsTree & (wxTREE_HITTEST_ONITEMBUTTON | + wxTREE_HITTEST_ONITEMICON | + wxTREE_HITTEST_ONITEMSTATEICON) ) + *flags |= wxBK_HITTEST_ONICON; + + if ( flagsTree & wxTREE_HITTEST_ONITEMLABEL ) + *flags |= wxBK_HITTEST_ONLABEL; + } + } + else // not over the tree + { + if ( flags && GetPageRect().Contains( pt ) ) + *flags |= wxBK_HITTEST_ONPAGE; + } + + return pagePos; +} + +#endif // wxUSE_TREEBOOK diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/treectlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/treectlg.cpp new file mode 100644 index 0000000000..4637767193 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/treectlg.cpp @@ -0,0 +1,4175 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/treectlg.cpp +// Purpose: generic tree control implementation +// Author: Robert Roebling +// Created: 01/02/97 +// Modified: 22/10/98 - almost total rewrite, simpler interface (VZ) +// Copyright: (c) 1998 Robert Roebling and Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================= +// declarations +// ============================================================================= + +// ----------------------------------------------------------------------------- +// headers +// ----------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TREECTRL + +#include "wx/treectrl.h" + +#ifndef WX_PRECOMP + #include "wx/dcclient.h" + #include "wx/timer.h" + #include "wx/settings.h" + #include "wx/listbox.h" + #include "wx/textctrl.h" +#endif + +#include "wx/generic/treectlg.h" +#include "wx/imaglist.h" + +#include "wx/renderer.h" + +#ifdef __WXMAC__ + #include "wx/osx/private.h" +#endif + +// ----------------------------------------------------------------------------- +// array types +// ----------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxGenericTreeItem; + +WX_DEFINE_ARRAY_PTR(wxGenericTreeItem *, wxArrayGenericTreeItems); + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +static const int NO_IMAGE = -1; + +static const int PIXELS_PER_UNIT = 10; + +// the margin between the item state image and the item normal image +static const int MARGIN_BETWEEN_STATE_AND_IMAGE = 2; + +// the margin between the item image and the item text +static const int MARGIN_BETWEEN_IMAGE_AND_TEXT = 4; + +// ----------------------------------------------------------------------------- +// private classes +// ----------------------------------------------------------------------------- + +// timer used for enabling in-place edit +class WXDLLEXPORT wxTreeRenameTimer: public wxTimer +{ +public: + // start editing the current item after half a second (if the mouse hasn't + // been clicked/moved) + enum { DELAY = 500 }; + + wxTreeRenameTimer( wxGenericTreeCtrl *owner ); + + virtual void Notify(); + +private: + wxGenericTreeCtrl *m_owner; + + wxDECLARE_NO_COPY_CLASS(wxTreeRenameTimer); +}; + +// control used for in-place edit +class WXDLLEXPORT wxTreeTextCtrl: public wxTextCtrl +{ +public: + wxTreeTextCtrl(wxGenericTreeCtrl *owner, wxGenericTreeItem *item); + + void EndEdit( bool discardChanges ); + + const wxGenericTreeItem* item() const { return m_itemEdited; } + +protected: + void OnChar( wxKeyEvent &event ); + void OnKeyUp( wxKeyEvent &event ); + void OnKillFocus( wxFocusEvent &event ); + + bool AcceptChanges(); + void Finish( bool setfocus ); + +private: + wxGenericTreeCtrl *m_owner; + wxGenericTreeItem *m_itemEdited; + wxString m_startValue; + bool m_aboutToFinish; + + DECLARE_EVENT_TABLE() + wxDECLARE_NO_COPY_CLASS(wxTreeTextCtrl); +}; + +// timer used to clear wxGenericTreeCtrl::m_findPrefix if no key was pressed +// for a sufficiently long time +class WXDLLEXPORT wxTreeFindTimer : public wxTimer +{ +public: + // reset the current prefix after half a second of inactivity + enum { DELAY = 500 }; + + wxTreeFindTimer( wxGenericTreeCtrl *owner ) { m_owner = owner; } + + virtual void Notify() { m_owner->ResetFindState(); } + +private: + wxGenericTreeCtrl *m_owner; + + wxDECLARE_NO_COPY_CLASS(wxTreeFindTimer); +}; + +// a tree item +class WXDLLEXPORT wxGenericTreeItem +{ +public: + // ctors & dtor + wxGenericTreeItem() + { + m_data = NULL; + m_widthText = + m_heightText = -1; + } + + wxGenericTreeItem( wxGenericTreeItem *parent, + const wxString& text, + int image, + int selImage, + wxTreeItemData *data ); + + ~wxGenericTreeItem(); + + // trivial accessors + wxArrayGenericTreeItems& GetChildren() { return m_children; } + + const wxString& GetText() const { return m_text; } + int GetImage(wxTreeItemIcon which = wxTreeItemIcon_Normal) const + { return m_images[which]; } + wxTreeItemData *GetData() const { return m_data; } + int GetState() const { return m_state; } + + // returns the current image for the item (depending on its + // selected/expanded/whatever state) + int GetCurrentImage() const; + + void SetText(const wxString& text) + { + m_text = text; + + ResetTextSize(); + } + + void SetImage(int image, wxTreeItemIcon which) + { + m_images[which] = image; + m_width = 0; + } + + void SetData(wxTreeItemData *data) { m_data = data; } + void SetState(int state) { m_state = state; m_width = 0; } + + void SetHasPlus(bool has = true) { m_hasPlus = has; } + + void SetBold(bool bold) + { + m_isBold = bold; + + ResetTextSize(); + } + + int GetX() const { return m_x; } + int GetY() const { return m_y; } + + void SetX(int x) { m_x = x; } + void SetY(int y) { m_y = y; } + + int GetHeight() const { return m_height; } + int GetWidth() const { return m_width; } + + int GetTextHeight() const + { + wxASSERT_MSG( m_heightText != -1, "must call CalculateSize() first" ); + + return m_heightText; + } + + int GetTextWidth() const + { + wxASSERT_MSG( m_widthText != -1, "must call CalculateSize() first" ); + + return m_widthText; + } + + wxGenericTreeItem *GetParent() const { return m_parent; } + + // sets the items font for the specified DC if it uses any special font or + // simply returns false otherwise + bool SetFont(wxGenericTreeCtrl *control, wxDC& dc) const + { + wxFont font; + + wxTreeItemAttr * const attr = GetAttributes(); + if ( attr && attr->HasFont() ) + font = attr->GetFont(); + else if ( IsBold() ) + font = control->m_boldFont; + else + return false; + + dc.SetFont(font); + return true; + } + + // operations + + // deletes all children notifying the treectrl about it + void DeleteChildren(wxGenericTreeCtrl *tree); + + // get count of all children (and grand children if 'recursively') + size_t GetChildrenCount(bool recursively = true) const; + + void Insert(wxGenericTreeItem *child, size_t index) + { m_children.Insert(child, index); } + + // calculate and cache the item size using either the provided DC (which is + // supposed to have wxGenericTreeCtrl::m_normalFont selected into it!) or a + // wxClientDC on the control window + void CalculateSize(wxGenericTreeCtrl *control, wxDC& dc) + { DoCalculateSize(control, dc, true /* dc uses normal font */); } + void CalculateSize(wxGenericTreeCtrl *control); + + void GetSize( int &x, int &y, const wxGenericTreeCtrl* ); + + void ResetSize() { m_width = 0; } + void ResetTextSize() { m_width = 0; m_widthText = -1; } + void RecursiveResetSize(); + void RecursiveResetTextSize(); + + // return the item at given position (or NULL if no item), onButton is + // true if the point belongs to the item's button, otherwise it lies + // on the item's label + wxGenericTreeItem *HitTest( const wxPoint& point, + const wxGenericTreeCtrl *, + int &flags, + int level ); + + void Expand() { m_isCollapsed = false; } + void Collapse() { m_isCollapsed = true; } + + void SetHilight( bool set = true ) { m_hasHilight = set; } + + // status inquiries + bool HasChildren() const { return !m_children.IsEmpty(); } + bool IsSelected() const { return m_hasHilight != 0; } + bool IsExpanded() const { return !m_isCollapsed; } + bool HasPlus() const { return m_hasPlus || HasChildren(); } + bool IsBold() const { return m_isBold != 0; } + + // attributes + // get them - may be NULL + wxTreeItemAttr *GetAttributes() const { return m_attr; } + // get them ensuring that the pointer is not NULL + wxTreeItemAttr& Attr() + { + if ( !m_attr ) + { + m_attr = new wxTreeItemAttr; + m_ownsAttr = true; + } + return *m_attr; + } + // set them + void SetAttributes(wxTreeItemAttr *attr) + { + if ( m_ownsAttr ) delete m_attr; + m_attr = attr; + m_ownsAttr = false; + m_width = 0; + m_widthText = -1; + } + // set them and delete when done + void AssignAttributes(wxTreeItemAttr *attr) + { + SetAttributes(attr); + m_ownsAttr = true; + m_width = 0; + m_widthText = -1; + } + +private: + // calculate the size of this item, i.e. set m_width, m_height and + // m_widthText and m_heightText properly + // + // if dcUsesNormalFont is true, the current dc font must be the normal tree + // control font + void DoCalculateSize(wxGenericTreeCtrl *control, + wxDC& dc, + bool dcUsesNormalFont); + + // since there can be very many of these, we save size by chosing + // the smallest representation for the elements and by ordering + // the members to avoid padding. + wxString m_text; // label to be rendered for item + int m_widthText; + int m_heightText; + + wxTreeItemData *m_data; // user-provided data + + int m_state; // item state + + wxArrayGenericTreeItems m_children; // list of children + wxGenericTreeItem *m_parent; // parent of this item + + wxTreeItemAttr *m_attr; // attributes??? + + // tree ctrl images for the normal, selected, expanded and + // expanded+selected states + int m_images[wxTreeItemIcon_Max]; + + wxCoord m_x; // (virtual) offset from top + wxCoord m_y; // (virtual) offset from left + int m_width; // width of this item + int m_height; // height of this item + + // use bitfields to save size + unsigned int m_isCollapsed :1; + unsigned int m_hasHilight :1; // same as focused + unsigned int m_hasPlus :1; // used for item which doesn't have + // children but has a [+] button + unsigned int m_isBold :1; // render the label in bold font + unsigned int m_ownsAttr :1; // delete attribute when done + + wxDECLARE_NO_COPY_CLASS(wxGenericTreeItem); +}; + +// ============================================================================= +// implementation +// ============================================================================= + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +// translate the key or mouse event flags to the type of selection we're +// dealing with +static void EventFlagsToSelType(long style, + bool shiftDown, + bool ctrlDown, + bool &is_multiple, + bool &extended_select, + bool &unselect_others) +{ + is_multiple = (style & wxTR_MULTIPLE) != 0; + extended_select = shiftDown && is_multiple; + unselect_others = !(extended_select || (ctrlDown && is_multiple)); +} + +// check if the given item is under another one +static bool +IsDescendantOf(const wxGenericTreeItem *parent, const wxGenericTreeItem *item) +{ + while ( item ) + { + if ( item == parent ) + { + // item is a descendant of parent + return true; + } + + item = item->GetParent(); + } + + return false; +} + +// ----------------------------------------------------------------------------- +// wxTreeRenameTimer (internal) +// ----------------------------------------------------------------------------- + +wxTreeRenameTimer::wxTreeRenameTimer( wxGenericTreeCtrl *owner ) +{ + m_owner = owner; +} + +void wxTreeRenameTimer::Notify() +{ + m_owner->OnRenameTimer(); +} + +//----------------------------------------------------------------------------- +// wxTreeTextCtrl (internal) +//----------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxTreeTextCtrl,wxTextCtrl) + EVT_CHAR (wxTreeTextCtrl::OnChar) + EVT_KEY_UP (wxTreeTextCtrl::OnKeyUp) + EVT_KILL_FOCUS (wxTreeTextCtrl::OnKillFocus) +END_EVENT_TABLE() + +wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner, + wxGenericTreeItem *itm) + : m_itemEdited(itm), m_startValue(itm->GetText()) +{ + m_owner = owner; + m_aboutToFinish = false; + + wxRect rect; + m_owner->GetBoundingRect(m_itemEdited, rect, true); + + // corrects position and size for better appearance +#ifdef __WXMSW__ + rect.x -= 5; + rect.width += 10; +#elif defined(__WXGTK__) + rect.x -= 5; + rect.y -= 2; + rect.width += 8; + rect.height += 4; +#elif defined(wxOSX_USE_CARBON) && wxOSX_USE_CARBON + int bestHeight = GetBestSize().y - 8; + if ( rect.height > bestHeight ) + { + int diff = rect.height - bestHeight; + rect.height -= diff; + rect.y += diff / 2; + } +#endif // platforms + + (void)Create(m_owner, wxID_ANY, m_startValue, + rect.GetPosition(), rect.GetSize()); + + SelectAll(); +} + +void wxTreeTextCtrl::EndEdit(bool discardChanges) +{ + m_aboutToFinish = true; + + if ( discardChanges ) + { + m_owner->OnRenameCancelled(m_itemEdited); + + Finish( true ); + } + else + { + // Notify the owner about the changes + AcceptChanges(); + + // Even if vetoed, close the control (consistent with MSW) + Finish( true ); + } +} + +bool wxTreeTextCtrl::AcceptChanges() +{ + const wxString value = GetValue(); + + if ( value == m_startValue ) + { + // nothing changed, always accept + // when an item remains unchanged, the owner + // needs to be notified that the user decided + // not to change the tree item label, and that + // the edit has been cancelled + + m_owner->OnRenameCancelled(m_itemEdited); + return true; + } + + if ( !m_owner->OnRenameAccept(m_itemEdited, value) ) + { + // vetoed by the user + return false; + } + + // accepted, do rename the item + m_owner->SetItemText(m_itemEdited, value); + + return true; +} + +void wxTreeTextCtrl::Finish( bool setfocus ) +{ + m_owner->ResetTextControl(); + + wxPendingDelete.Append(this); + + if (setfocus) + m_owner->SetFocus(); +} + +void wxTreeTextCtrl::OnChar( wxKeyEvent &event ) +{ + switch ( event.m_keyCode ) + { + case WXK_RETURN: + EndEdit( false ); + break; + + case WXK_ESCAPE: + EndEdit( true ); + break; + + default: + event.Skip(); + } +} + +void wxTreeTextCtrl::OnKeyUp( wxKeyEvent &event ) +{ + if ( !m_aboutToFinish ) + { + // auto-grow the textctrl: + wxSize parentSize = m_owner->GetSize(); + wxPoint myPos = GetPosition(); + wxSize mySize = GetSize(); + int sx, sy; + GetTextExtent(GetValue() + wxT("M"), &sx, &sy); + if (myPos.x + sx > parentSize.x) + sx = parentSize.x - myPos.x; + if (mySize.x > sx) + sx = mySize.x; + SetSize(sx, wxDefaultCoord); + } + + event.Skip(); +} + +void wxTreeTextCtrl::OnKillFocus( wxFocusEvent &event ) +{ + if ( !m_aboutToFinish ) + { + if ( !AcceptChanges() ) + m_owner->OnRenameCancelled( m_itemEdited ); + + Finish( false ); + } + + // We should let the native text control handle focus, too. + event.Skip(); +} + +// ----------------------------------------------------------------------------- +// wxGenericTreeItem +// ----------------------------------------------------------------------------- + +wxGenericTreeItem::wxGenericTreeItem(wxGenericTreeItem *parent, + const wxString& text, + int image, int selImage, + wxTreeItemData *data) + : m_text(text) +{ + m_images[wxTreeItemIcon_Normal] = image; + m_images[wxTreeItemIcon_Selected] = selImage; + m_images[wxTreeItemIcon_Expanded] = NO_IMAGE; + m_images[wxTreeItemIcon_SelectedExpanded] = NO_IMAGE; + + m_data = data; + m_state = wxTREE_ITEMSTATE_NONE; + m_x = m_y = 0; + + m_isCollapsed = true; + m_hasHilight = false; + m_hasPlus = false; + m_isBold = false; + + m_parent = parent; + + m_attr = NULL; + m_ownsAttr = false; + + // We don't know the height here yet. + m_width = 0; + m_height = 0; + + m_widthText = -1; + m_heightText = -1; +} + +wxGenericTreeItem::~wxGenericTreeItem() +{ + delete m_data; + + if (m_ownsAttr) delete m_attr; + + wxASSERT_MSG( m_children.IsEmpty(), + "must call DeleteChildren() before deleting the item" ); +} + +void wxGenericTreeItem::DeleteChildren(wxGenericTreeCtrl *tree) +{ + size_t count = m_children.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + wxGenericTreeItem *child = m_children[n]; + tree->SendDeleteEvent(child); + + child->DeleteChildren(tree); + if ( child == tree->m_select_me ) + tree->m_select_me = NULL; + delete child; + } + + m_children.Empty(); +} + +size_t wxGenericTreeItem::GetChildrenCount(bool recursively) const +{ + size_t count = m_children.GetCount(); + if ( !recursively ) + return count; + + size_t total = count; + for (size_t n = 0; n < count; ++n) + { + total += m_children[n]->GetChildrenCount(); + } + + return total; +} + +void wxGenericTreeItem::GetSize( int &x, int &y, + const wxGenericTreeCtrl *theButton ) +{ + int bottomY=m_y+theButton->GetLineHeight(this); + if ( y < bottomY ) y = bottomY; + int width = m_x + m_width; + if ( x < width ) x = width; + + if (IsExpanded()) + { + size_t count = m_children.GetCount(); + for ( size_t n = 0; n < count; ++n ) + { + m_children[n]->GetSize( x, y, theButton ); + } + } +} + +wxGenericTreeItem *wxGenericTreeItem::HitTest(const wxPoint& point, + const wxGenericTreeCtrl *theCtrl, + int &flags, + int level) +{ + // for a hidden root node, don't evaluate it, but do evaluate children + if ( !(level == 0 && theCtrl->HasFlag(wxTR_HIDE_ROOT)) ) + { + // evaluate the item + int h = theCtrl->GetLineHeight(this); + if ((point.y > m_y) && (point.y < m_y + h)) + { + int y_mid = m_y + h/2; + if (point.y < y_mid ) + flags |= wxTREE_HITTEST_ONITEMUPPERPART; + else + flags |= wxTREE_HITTEST_ONITEMLOWERPART; + + int xCross = m_x - theCtrl->GetSpacing(); +#ifdef __WXMAC__ + // according to the drawing code the triangels are drawn + // at -4 , -4 from the position up to +10/+10 max + if ((point.x > xCross-4) && (point.x < xCross+10) && + (point.y > y_mid-4) && (point.y < y_mid+10) && + HasPlus() && theCtrl->HasButtons() ) +#else + // 5 is the size of the plus sign + if ((point.x > xCross-6) && (point.x < xCross+6) && + (point.y > y_mid-6) && (point.y < y_mid+6) && + HasPlus() && theCtrl->HasButtons() ) +#endif + { + flags |= wxTREE_HITTEST_ONITEMBUTTON; + return this; + } + + if ((point.x >= m_x) && (point.x <= m_x+m_width)) + { + int image_w = -1; + int image_h; + + // assuming every image (normal and selected) has the same size! + if ( (GetImage() != NO_IMAGE) && theCtrl->m_imageListNormal ) + { + theCtrl->m_imageListNormal->GetSize(GetImage(), + image_w, image_h); + } + + int state_w = -1; + int state_h; + + if ( (GetState() != wxTREE_ITEMSTATE_NONE) && + theCtrl->m_imageListState ) + { + theCtrl->m_imageListState->GetSize(GetState(), + state_w, state_h); + } + + if ((state_w != -1) && (point.x <= m_x + state_w + 1)) + flags |= wxTREE_HITTEST_ONITEMSTATEICON; + else if ((image_w != -1) && + (point.x <= m_x + + (state_w != -1 ? state_w + + MARGIN_BETWEEN_STATE_AND_IMAGE + : 0) + + image_w + 1)) + flags |= wxTREE_HITTEST_ONITEMICON; + else + flags |= wxTREE_HITTEST_ONITEMLABEL; + + return this; + } + + if (point.x < m_x) + flags |= wxTREE_HITTEST_ONITEMINDENT; + if (point.x > m_x+m_width) + flags |= wxTREE_HITTEST_ONITEMRIGHT; + + return this; + } + + // if children are expanded, fall through to evaluate them + if (m_isCollapsed) return NULL; + } + + // evaluate children + size_t count = m_children.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + wxGenericTreeItem *res = m_children[n]->HitTest( point, + theCtrl, + flags, + level + 1 ); + if ( res != NULL ) + return res; + } + + return NULL; +} + +int wxGenericTreeItem::GetCurrentImage() const +{ + int image = NO_IMAGE; + if ( IsExpanded() ) + { + if ( IsSelected() ) + { + image = GetImage(wxTreeItemIcon_SelectedExpanded); + } + + if ( image == NO_IMAGE ) + { + // we usually fall back to the normal item, but try just the + // expanded one (and not selected) first in this case + image = GetImage(wxTreeItemIcon_Expanded); + } + } + else // not expanded + { + if ( IsSelected() ) + image = GetImage(wxTreeItemIcon_Selected); + } + + // maybe it doesn't have the specific image we want, + // try the default one instead + if ( image == NO_IMAGE ) image = GetImage(); + + return image; +} + +void wxGenericTreeItem::CalculateSize(wxGenericTreeCtrl* control) +{ + // check if we need to do anything before creating the DC + if ( m_width != 0 ) + return; + + wxClientDC dc(control); + DoCalculateSize(control, dc, false /* normal font not used */); +} + +void +wxGenericTreeItem::DoCalculateSize(wxGenericTreeCtrl* control, + wxDC& dc, + bool dcUsesNormalFont) +{ + if ( m_width != 0 ) // Size known, nothing to do + return; + + if ( m_widthText == -1 ) + { + bool fontChanged; + if ( SetFont(control, dc) ) + { + fontChanged = true; + } + else // we have no special font + { + if ( !dcUsesNormalFont ) + { + // but we do need to ensure that the normal font is used: notice + // that this doesn't count as changing the font as we don't need + // to restore it + dc.SetFont(control->m_normalFont); + } + + fontChanged = false; + } + + dc.GetTextExtent( GetText(), &m_widthText, &m_heightText ); + + // restore normal font if the DC used it previously and we changed it + if ( fontChanged ) + dc.SetFont(control->m_normalFont); + } + + int text_h = m_heightText + 2; + + int image_h = 0, image_w = 0; + int image = GetCurrentImage(); + if ( image != NO_IMAGE && control->m_imageListNormal ) + { + control->m_imageListNormal->GetSize(image, image_w, image_h); + image_w += MARGIN_BETWEEN_IMAGE_AND_TEXT; + } + + int state_h = 0, state_w = 0; + int state = GetState(); + if ( state != wxTREE_ITEMSTATE_NONE && control->m_imageListState ) + { + control->m_imageListState->GetSize(state, state_w, state_h); + if ( image_w != 0 ) + state_w += MARGIN_BETWEEN_STATE_AND_IMAGE; + else + state_w += MARGIN_BETWEEN_IMAGE_AND_TEXT; + } + + int img_h = wxMax(state_h, image_h); + m_height = wxMax(img_h, text_h); + + if (m_height < 30) + m_height += 2; // at least 2 pixels + else + m_height += m_height / 10; // otherwise 10% extra spacing + + if (m_height > control->m_lineHeight) + control->m_lineHeight = m_height; + + m_width = state_w + image_w + m_widthText + 2; +} + +void wxGenericTreeItem::RecursiveResetSize() +{ + m_width = 0; + + const size_t count = m_children.Count(); + for (size_t i = 0; i < count; i++ ) + m_children[i]->RecursiveResetSize(); +} + +void wxGenericTreeItem::RecursiveResetTextSize() +{ + m_width = 0; + m_widthText = -1; + + const size_t count = m_children.Count(); + for (size_t i = 0; i < count; i++ ) + m_children[i]->RecursiveResetTextSize(); +} + +// ----------------------------------------------------------------------------- +// wxGenericTreeCtrl implementation +// ----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxGenericTreeCtrl, wxControl) + +BEGIN_EVENT_TABLE(wxGenericTreeCtrl, wxTreeCtrlBase) + EVT_PAINT (wxGenericTreeCtrl::OnPaint) + EVT_SIZE (wxGenericTreeCtrl::OnSize) + EVT_MOUSE_EVENTS (wxGenericTreeCtrl::OnMouse) + EVT_KEY_DOWN (wxGenericTreeCtrl::OnKeyDown) + EVT_CHAR (wxGenericTreeCtrl::OnChar) + EVT_SET_FOCUS (wxGenericTreeCtrl::OnSetFocus) + EVT_KILL_FOCUS (wxGenericTreeCtrl::OnKillFocus) + EVT_TREE_ITEM_GETTOOLTIP(wxID_ANY, wxGenericTreeCtrl::OnGetToolTip) +END_EVENT_TABLE() + +// ----------------------------------------------------------------------------- +// construction/destruction +// ----------------------------------------------------------------------------- + +void wxGenericTreeCtrl::Init() +{ + m_current = + m_key_current = + m_anchor = + m_select_me = NULL; + m_hasFocus = false; + m_dirty = false; + + m_lineHeight = 10; + m_indent = 15; + m_spacing = 18; + + m_hilightBrush = new wxBrush + ( + wxSystemSettings::GetColour + ( + wxSYS_COLOUR_HIGHLIGHT + ), + wxBRUSHSTYLE_SOLID + ); + + m_hilightUnfocusedBrush = new wxBrush + ( + wxSystemSettings::GetColour + ( + wxSYS_COLOUR_BTNSHADOW + ), + wxBRUSHSTYLE_SOLID + ); + + m_imageListButtons = NULL; + m_ownsImageListButtons = false; + + m_dragCount = 0; + m_isDragging = false; + m_dropTarget = m_oldSelection = NULL; + m_underMouse = NULL; + m_textCtrl = NULL; + + m_renameTimer = NULL; + + m_findTimer = NULL; + m_findBell = 0; // default is to not ring bell at all + + m_dropEffectAboveItem = false; + + m_dndEffect = NoEffect; + m_dndEffectItem = NULL; + + m_lastOnSame = false; + +#if defined( __WXMAC__ ) + m_normalFont = wxFont(wxOSX_SYSTEM_FONT_VIEWS); +#else + m_normalFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); +#endif + m_boldFont = m_normalFont.Bold(); +} + +bool wxGenericTreeCtrl::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name ) +{ +#ifdef __WXMAC__ + int major, minor; + wxGetOsVersion(&major, &minor); + + if (major < 10) + style |= wxTR_ROW_LINES; + + if (style & wxTR_HAS_BUTTONS) + style |= wxTR_NO_LINES; +#endif // __WXMAC__ + +#ifdef __WXGTK20__ + if (style & wxTR_HAS_BUTTONS) + style |= wxTR_NO_LINES; +#endif + + if ( !wxControl::Create( parent, id, pos, size, + style|wxHSCROLL|wxVSCROLL|wxWANTS_CHARS, + validator, + name ) ) + return false; + + // If the tree display has no buttons, but does have + // connecting lines, we can use a narrower layout. + // It may not be a good idea to force this... + if (!HasButtons() && !HasFlag(wxTR_NO_LINES)) + { + m_indent= 10; + m_spacing = 10; + } + + wxVisualAttributes attr = GetDefaultAttributes(); + SetOwnForegroundColour( attr.colFg ); + SetOwnBackgroundColour( attr.colBg ); + if (!m_hasFont) + SetOwnFont(attr.font); + + // this is a misnomer: it's called "dotted pen" but uses (default) wxSOLID + // style because we apparently get performance problems when using dotted + // pen for drawing in some ports -- but under MSW it seems to work fine +#ifdef __WXMSW__ + m_dottedPen = wxPen(*wxLIGHT_GREY, 0, wxPENSTYLE_DOT); +#else + m_dottedPen = *wxGREY_PEN; +#endif + + SetInitialSize(size); + + return true; +} + +wxGenericTreeCtrl::~wxGenericTreeCtrl() +{ + delete m_hilightBrush; + delete m_hilightUnfocusedBrush; + + DeleteAllItems(); + + delete m_renameTimer; + delete m_findTimer; + + if (m_ownsImageListButtons) + delete m_imageListButtons; +} + +void wxGenericTreeCtrl::EnableBellOnNoMatch( bool on ) +{ + m_findBell = on; +} + +// ----------------------------------------------------------------------------- +// accessors +// ----------------------------------------------------------------------------- + +unsigned int wxGenericTreeCtrl::GetCount() const +{ + if ( !m_anchor ) + { + // the tree is empty + return 0; + } + + unsigned int count = m_anchor->GetChildrenCount(); + if ( !HasFlag(wxTR_HIDE_ROOT) ) + { + // take the root itself into account + count++; + } + + return count; +} + +void wxGenericTreeCtrl::SetIndent(unsigned int indent) +{ + m_indent = (unsigned short) indent; + m_dirty = true; +} + +size_t +wxGenericTreeCtrl::GetChildrenCount(const wxTreeItemId& item, + bool recursively) const +{ + wxCHECK_MSG( item.IsOk(), 0u, wxT("invalid tree item") ); + + return ((wxGenericTreeItem*) item.m_pItem)->GetChildrenCount(recursively); +} + +void wxGenericTreeCtrl::SetWindowStyle(const long styles) +{ + // Do not try to expand the root node if it hasn't been created yet + if (m_anchor && !HasFlag(wxTR_HIDE_ROOT) && (styles & wxTR_HIDE_ROOT)) + { + // if we will hide the root, make sure children are visible + m_anchor->SetHasPlus(); + m_anchor->Expand(); + CalculatePositions(); + } + + // right now, just sets the styles. Eventually, we may + // want to update the inherited styles, but right now + // none of the parents has updatable styles + m_windowStyle = styles; + m_dirty = true; +} + +// ----------------------------------------------------------------------------- +// functions to work with tree items +// ----------------------------------------------------------------------------- + +wxString wxGenericTreeCtrl::GetItemText(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxEmptyString, wxT("invalid tree item") ); + + return ((wxGenericTreeItem*) item.m_pItem)->GetText(); +} + +int wxGenericTreeCtrl::GetItemImage(const wxTreeItemId& item, + wxTreeItemIcon which) const +{ + wxCHECK_MSG( item.IsOk(), -1, wxT("invalid tree item") ); + + return ((wxGenericTreeItem*) item.m_pItem)->GetImage(which); +} + +wxTreeItemData *wxGenericTreeCtrl::GetItemData(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), NULL, wxT("invalid tree item") ); + + return ((wxGenericTreeItem*) item.m_pItem)->GetData(); +} + +int wxGenericTreeCtrl::DoGetItemState(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxTREE_ITEMSTATE_NONE, wxT("invalid tree item") ); + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + return pItem->GetState(); +} + +wxColour wxGenericTreeCtrl::GetItemTextColour(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxNullColour, wxT("invalid tree item") ); + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + return pItem->Attr().GetTextColour(); +} + +wxColour +wxGenericTreeCtrl::GetItemBackgroundColour(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxNullColour, wxT("invalid tree item") ); + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + return pItem->Attr().GetBackgroundColour(); +} + +wxFont wxGenericTreeCtrl::GetItemFont(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxNullFont, wxT("invalid tree item") ); + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + return pItem->Attr().GetFont(); +} + +void +wxGenericTreeCtrl::SetItemText(const wxTreeItemId& item, const wxString& text) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + pItem->SetText(text); + pItem->CalculateSize(this); + RefreshLine(pItem); +} + +void wxGenericTreeCtrl::SetItemImage(const wxTreeItemId& item, + int image, + wxTreeItemIcon which) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + pItem->SetImage(image, which); + pItem->CalculateSize(this); + RefreshLine(pItem); +} + +void +wxGenericTreeCtrl::SetItemData(const wxTreeItemId& item, wxTreeItemData *data) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + if (data) + data->SetId( item ); + + ((wxGenericTreeItem*) item.m_pItem)->SetData(data); +} + +void wxGenericTreeCtrl::DoSetItemState(const wxTreeItemId& item, int state) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + pItem->SetState(state); + pItem->CalculateSize(this); + RefreshLine(pItem); +} + +void wxGenericTreeCtrl::SetItemHasChildren(const wxTreeItemId& item, bool has) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + pItem->SetHasPlus(has); + RefreshLine(pItem); +} + +void wxGenericTreeCtrl::SetItemBold(const wxTreeItemId& item, bool bold) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + // avoid redrawing the tree if no real change + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + if ( pItem->IsBold() != bold ) + { + pItem->SetBold(bold); + + // recalculate the item size as bold and non bold fonts have different + // widths + pItem->CalculateSize(this); + RefreshLine(pItem); + } +} + +void wxGenericTreeCtrl::SetItemDropHighlight(const wxTreeItemId& item, + bool highlight) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + wxColour fg, bg; + + if (highlight) + { + bg = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); + fg = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + } + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + pItem->Attr().SetTextColour(fg); + pItem->Attr().SetBackgroundColour(bg); + RefreshLine(pItem); +} + +void wxGenericTreeCtrl::SetItemTextColour(const wxTreeItemId& item, + const wxColour& col) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + pItem->Attr().SetTextColour(col); + RefreshLine(pItem); +} + +void wxGenericTreeCtrl::SetItemBackgroundColour(const wxTreeItemId& item, + const wxColour& col) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + pItem->Attr().SetBackgroundColour(col); + RefreshLine(pItem); +} + +void +wxGenericTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + pItem->Attr().SetFont(font); + pItem->ResetTextSize(); + pItem->CalculateSize(this); + RefreshLine(pItem); +} + +bool wxGenericTreeCtrl::SetFont( const wxFont &font ) +{ + wxTreeCtrlBase::SetFont(font); + + m_normalFont = font; + m_boldFont = m_normalFont.Bold(); + + if (m_anchor) + m_anchor->RecursiveResetTextSize(); + + return true; +} + + +// ----------------------------------------------------------------------------- +// item status inquiries +// ----------------------------------------------------------------------------- + +bool wxGenericTreeCtrl::IsVisible(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") ); + + // An item is only visible if it's not a descendant of a collapsed item + wxGenericTreeItem *pItem = (wxGenericTreeItem*) item.m_pItem; + wxGenericTreeItem* parent = pItem->GetParent(); + while (parent) + { + if (!parent->IsExpanded()) + return false; + parent = parent->GetParent(); + } + + int startX, startY; + GetViewStart(& startX, & startY); + + wxSize clientSize = GetClientSize(); + + wxRect rect; + if (!GetBoundingRect(item, rect)) + return false; + if (rect.GetWidth() == 0 || rect.GetHeight() == 0) + return false; + if (rect.GetBottom() < 0 || rect.GetTop() > clientSize.y) + return false; + if (rect.GetRight() < 0 || rect.GetLeft() > clientSize.x) + return false; + + return true; +} + +bool wxGenericTreeCtrl::ItemHasChildren(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") ); + + // consider that the item does have children if it has the "+" button: it + // might not have them (if it had never been expanded yet) but then it + // could have them as well and it's better to err on this side rather than + // disabling some operations which are restricted to the items with + // children for an item which does have them + return ((wxGenericTreeItem*) item.m_pItem)->HasPlus(); +} + +bool wxGenericTreeCtrl::IsExpanded(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") ); + + return ((wxGenericTreeItem*) item.m_pItem)->IsExpanded(); +} + +bool wxGenericTreeCtrl::IsSelected(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") ); + + return ((wxGenericTreeItem*) item.m_pItem)->IsSelected(); +} + +bool wxGenericTreeCtrl::IsBold(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") ); + + return ((wxGenericTreeItem*) item.m_pItem)->IsBold(); +} + +// ----------------------------------------------------------------------------- +// navigation +// ----------------------------------------------------------------------------- + +wxTreeItemId wxGenericTreeCtrl::GetItemParent(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); + + return ((wxGenericTreeItem*) item.m_pItem)->GetParent(); +} + +wxTreeItemId wxGenericTreeCtrl::GetFirstChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); + + cookie = 0; + return GetNextChild(item, cookie); +} + +wxTreeItemId wxGenericTreeCtrl::GetNextChild(const wxTreeItemId& item, + wxTreeItemIdValue& cookie) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); + + wxArrayGenericTreeItems& + children = ((wxGenericTreeItem*) item.m_pItem)->GetChildren(); + + // it's ok to cast cookie to size_t, we never have indices big enough to + // overflow "void *" + size_t *pIndex = (size_t *)&cookie; + if ( *pIndex < children.GetCount() ) + { + return children.Item((*pIndex)++); + } + else + { + // there are no more of them + return wxTreeItemId(); + } +} + +wxTreeItemId wxGenericTreeCtrl::GetLastChild(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); + + wxArrayGenericTreeItems& + children = ((wxGenericTreeItem*) item.m_pItem)->GetChildren(); + return children.IsEmpty() ? wxTreeItemId() : wxTreeItemId(children.Last()); +} + +wxTreeItemId wxGenericTreeCtrl::GetNextSibling(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); + + wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem; + wxGenericTreeItem *parent = i->GetParent(); + if ( parent == NULL ) + { + // root item doesn't have any siblings + return wxTreeItemId(); + } + + wxArrayGenericTreeItems& siblings = parent->GetChildren(); + int index = siblings.Index(i); + wxASSERT( index != wxNOT_FOUND ); // I'm not a child of my parent? + + size_t n = (size_t)(index + 1); + return n == siblings.GetCount() ? wxTreeItemId() + : wxTreeItemId(siblings[n]); +} + +wxTreeItemId wxGenericTreeCtrl::GetPrevSibling(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); + + wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem; + wxGenericTreeItem *parent = i->GetParent(); + if ( parent == NULL ) + { + // root item doesn't have any siblings + return wxTreeItemId(); + } + + wxArrayGenericTreeItems& siblings = parent->GetChildren(); + int index = siblings.Index(i); + wxASSERT( index != wxNOT_FOUND ); // I'm not a child of my parent? + + return index == 0 ? wxTreeItemId() + : wxTreeItemId(siblings[(size_t)(index - 1)]); +} + +// Only for internal use right now, but should probably be public +wxTreeItemId wxGenericTreeCtrl::GetNext(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); + + wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem; + + // First see if there are any children. + wxArrayGenericTreeItems& children = i->GetChildren(); + if (children.GetCount() > 0) + { + return children.Item(0); + } + else + { + // Try a sibling of this or ancestor instead + wxTreeItemId p = item; + wxTreeItemId toFind; + do + { + toFind = GetNextSibling(p); + p = GetItemParent(p); + } while (p.IsOk() && !toFind.IsOk()); + return toFind; + } +} + +wxTreeItemId wxGenericTreeCtrl::GetFirstVisibleItem() const +{ + wxTreeItemId itemid = GetRootItem(); + if (!itemid.IsOk()) + return itemid; + + do + { + if (IsVisible(itemid)) + return itemid; + itemid = GetNext(itemid); + } while (itemid.IsOk()); + + return wxTreeItemId(); +} + +wxTreeItemId wxGenericTreeCtrl::GetNextVisible(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); + wxASSERT_MSG( IsVisible(item), wxT("this item itself should be visible") ); + + wxTreeItemId id = item; + if (id.IsOk()) + { + while (id = GetNext(id), id.IsOk()) + { + if (IsVisible(id)) + return id; + } + } + return wxTreeItemId(); +} + +wxTreeItemId wxGenericTreeCtrl::GetPrevVisible(const wxTreeItemId& item) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); + wxASSERT_MSG( IsVisible(item), wxT("this item itself should be visible") ); + + // find out the starting point + wxTreeItemId prevItem = GetPrevSibling(item); + if ( !prevItem.IsOk() ) + { + prevItem = GetItemParent(item); + } + + // find the first visible item after it + while ( prevItem.IsOk() && !IsVisible(prevItem) ) + { + prevItem = GetNext(prevItem); + if ( !prevItem.IsOk() || prevItem == item ) + { + // there are no visible items before item + return wxTreeItemId(); + } + } + + // from there we must be able to navigate until this item + while ( prevItem.IsOk() ) + { + const wxTreeItemId nextItem = GetNextVisible(prevItem); + if ( !nextItem.IsOk() || nextItem == item ) + break; + + prevItem = nextItem; + } + + return prevItem; +} + +// called by wxTextTreeCtrl when it marks itself for deletion +void wxGenericTreeCtrl::ResetTextControl() +{ + m_textCtrl = NULL; +} + +void wxGenericTreeCtrl::ResetFindState() +{ + m_findPrefix.clear(); + if ( m_findBell ) + m_findBell = 1; +} + +// find the first item starting with the given prefix after the given item +wxTreeItemId wxGenericTreeCtrl::FindItem(const wxTreeItemId& idParent, + const wxString& prefixOrig) const +{ + // match is case insensitive as this is more convenient to the user: having + // to press Shift-letter to go to the item starting with a capital letter + // would be too bothersome + wxString prefix = prefixOrig.Lower(); + + // determine the starting point: we shouldn't take the current item (this + // allows to switch between two items starting with the same letter just by + // pressing it) but we shouldn't jump to the next one if the user is + // continuing to type as otherwise he might easily skip the item he wanted + wxTreeItemId itemid = idParent; + if ( prefix.length() == 1 ) + { + itemid = GetNext(itemid); + } + + // look for the item starting with the given prefix after it + while ( itemid.IsOk() && !GetItemText(itemid).Lower().StartsWith(prefix) ) + { + itemid = GetNext(itemid); + } + + // if we haven't found anything... + if ( !itemid.IsOk() ) + { + // ... wrap to the beginning + itemid = GetRootItem(); + if ( HasFlag(wxTR_HIDE_ROOT) ) + { + // can't select virtual root + itemid = GetNext(itemid); + } + + // and try all the items (stop when we get to the one we started from) + while ( itemid.IsOk() && itemid != idParent && + !GetItemText(itemid).Lower().StartsWith(prefix) ) + { + itemid = GetNext(itemid); + } + // If we haven't found the item but wrapped back to the one we started + // from, id.IsOk() must be false + if ( itemid == idParent ) + { + itemid = wxTreeItemId(); + } + } + + return itemid; +} + +// ----------------------------------------------------------------------------- +// operations +// ----------------------------------------------------------------------------- + +wxTreeItemId wxGenericTreeCtrl::DoInsertItem(const wxTreeItemId& parentId, + size_t previous, + const wxString& text, + int image, + int selImage, + wxTreeItemData *data) +{ + wxGenericTreeItem *parent = (wxGenericTreeItem*) parentId.m_pItem; + if ( !parent ) + { + // should we give a warning here? + return AddRoot(text, image, selImage, data); + } + + m_dirty = true; // do this first so stuff below doesn't cause flicker + + wxGenericTreeItem *item = + new wxGenericTreeItem( parent, text, image, selImage, data ); + + if ( data != NULL ) + { + data->m_pItem = item; + } + + parent->Insert( item, previous == (size_t)-1 ? parent->GetChildren().size() + : previous ); + + InvalidateBestSize(); + return item; +} + +wxTreeItemId wxGenericTreeCtrl::AddRoot(const wxString& text, + int image, + int selImage, + wxTreeItemData *data) +{ + wxCHECK_MSG( !m_anchor, wxTreeItemId(), "tree can have only one root" ); + + m_dirty = true; // do this first so stuff below doesn't cause flicker + + m_anchor = new wxGenericTreeItem(NULL, text, + image, selImage, data); + if ( data != NULL ) + { + data->m_pItem = m_anchor; + } + + if (HasFlag(wxTR_HIDE_ROOT)) + { + // if root is hidden, make sure we can navigate + // into children + m_anchor->SetHasPlus(); + m_anchor->Expand(); + CalculatePositions(); + } + + if (!HasFlag(wxTR_MULTIPLE)) + { + m_current = m_key_current = m_anchor; + m_current->SetHilight( true ); + } + + InvalidateBestSize(); + return m_anchor; +} + +wxTreeItemId wxGenericTreeCtrl::DoInsertAfter(const wxTreeItemId& parentId, + const wxTreeItemId& idPrevious, + const wxString& text, + int image, int selImage, + wxTreeItemData *data) +{ + wxGenericTreeItem *parent = (wxGenericTreeItem*) parentId.m_pItem; + if ( !parent ) + { + // should we give a warning here? + return AddRoot(text, image, selImage, data); + } + + int index = -1; + if (idPrevious.IsOk()) + { + index = parent->GetChildren().Index( + (wxGenericTreeItem*) idPrevious.m_pItem); + wxASSERT_MSG( index != wxNOT_FOUND, + "previous item in wxGenericTreeCtrl::InsertItem() " + "is not a sibling" ); + } + + return DoInsertItem(parentId, (size_t)++index, text, image, selImage, data); +} + + +void wxGenericTreeCtrl::SendDeleteEvent(wxGenericTreeItem *item) +{ + wxTreeEvent event(wxEVT_TREE_DELETE_ITEM, this, item); + GetEventHandler()->ProcessEvent( event ); +} + +// Don't leave edit or selection on a child which is about to disappear +void wxGenericTreeCtrl::ChildrenClosing(wxGenericTreeItem* item) +{ + if ( m_textCtrl && item != m_textCtrl->item() && + IsDescendantOf(item, m_textCtrl->item()) ) + { + m_textCtrl->EndEdit( true ); + } + + if ( item != m_key_current && IsDescendantOf(item, m_key_current) ) + { + m_key_current = NULL; + } + + if ( IsDescendantOf(item, m_select_me) ) + { + m_select_me = item; + } + + if ( item != m_current && IsDescendantOf(item, m_current) ) + { + m_current->SetHilight( false ); + m_current = NULL; + m_select_me = item; + } +} + +void wxGenericTreeCtrl::DeleteChildren(const wxTreeItemId& itemId) +{ + m_dirty = true; // do this first so stuff below doesn't cause flicker + + wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem; + ChildrenClosing(item); + item->DeleteChildren(this); + InvalidateBestSize(); +} + +void wxGenericTreeCtrl::Delete(const wxTreeItemId& itemId) +{ + m_dirty = true; // do this first so stuff below doesn't cause flicker + + wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem; + + if (m_textCtrl != NULL && IsDescendantOf(item, m_textCtrl->item())) + { + // can't delete the item being edited, cancel editing it first + m_textCtrl->EndEdit( true ); + } + + wxGenericTreeItem *parent = item->GetParent(); + + // if the selected item will be deleted, select the parent ... + wxGenericTreeItem *to_be_selected = parent; + if (parent) + { + // .. unless there is a next sibling like wxMSW does it + int pos = parent->GetChildren().Index( item ); + if ((int)(parent->GetChildren().GetCount()) > pos+1) + to_be_selected = parent->GetChildren().Item( pos+1 ); + } + + // don't keep stale pointers around! + if ( IsDescendantOf(item, m_key_current) ) + { + // Don't silently change the selection: + // do it properly in idle time, so event + // handlers get called. + + // m_key_current = parent; + m_key_current = NULL; + } + + // m_select_me records whether we need to select + // a different item, in idle time. + if ( m_select_me && IsDescendantOf(item, m_select_me) ) + { + m_select_me = to_be_selected; + } + + if ( IsDescendantOf(item, m_current) ) + { + // Don't silently change the selection: + // do it properly in idle time, so event + // handlers get called. + + // m_current = parent; + m_current = NULL; + m_select_me = to_be_selected; + } + + // remove the item from the tree + if ( parent ) + { + parent->GetChildren().Remove( item ); // remove by value + } + else // deleting the root + { + // nothing will be left in the tree + m_anchor = NULL; + } + + // and delete all of its children and the item itself now + item->DeleteChildren(this); + SendDeleteEvent(item); + + if (item == m_select_me) + m_select_me = NULL; + + delete item; + + InvalidateBestSize(); +} + +void wxGenericTreeCtrl::DeleteAllItems() +{ + if ( m_anchor ) + { + Delete(m_anchor); + } +} + +void wxGenericTreeCtrl::Expand(const wxTreeItemId& itemId) +{ + wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem; + + wxCHECK_RET( item, wxT("invalid item in wxGenericTreeCtrl::Expand") ); + wxCHECK_RET( !HasFlag(wxTR_HIDE_ROOT) || itemId != GetRootItem(), + wxT("can't expand hidden root") ); + + if ( !item->HasPlus() ) + return; + + if ( item->IsExpanded() ) + return; + + wxTreeEvent event(wxEVT_TREE_ITEM_EXPANDING, this, item); + + if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) + { + // cancelled by program + return; + } + + item->Expand(); + if ( !IsFrozen() ) + { + CalculatePositions(); + + RefreshSubtree(item); + } + else // frozen + { + m_dirty = true; + } + + event.SetEventType(wxEVT_TREE_ITEM_EXPANDED); + GetEventHandler()->ProcessEvent( event ); +} + +void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId) +{ + wxCHECK_RET( !HasFlag(wxTR_HIDE_ROOT) || itemId != GetRootItem(), + wxT("can't collapse hidden root") ); + + wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem; + + if ( !item->IsExpanded() ) + return; + + wxTreeEvent event(wxEVT_TREE_ITEM_COLLAPSING, this, item); + if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) + { + // cancelled by program + return; + } + + ChildrenClosing(item); + item->Collapse(); + +#if 0 // TODO why should items be collapsed recursively? + wxArrayGenericTreeItems& children = item->GetChildren(); + size_t count = children.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + Collapse(children[n]); + } +#endif + + CalculatePositions(); + + RefreshSubtree(item); + + event.SetEventType(wxEVT_TREE_ITEM_COLLAPSED); + GetEventHandler()->ProcessEvent( event ); +} + +void wxGenericTreeCtrl::CollapseAndReset(const wxTreeItemId& item) +{ + Collapse(item); + DeleteChildren(item); +} + +void wxGenericTreeCtrl::Toggle(const wxTreeItemId& itemId) +{ + wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem; + + if (item->IsExpanded()) + Collapse(itemId); + else + Expand(itemId); +} + +void wxGenericTreeCtrl::Unselect() +{ + if (m_current) + { + m_current->SetHilight( false ); + RefreshLine( m_current ); + + m_current = NULL; + m_select_me = NULL; + } +} + +void wxGenericTreeCtrl::ClearFocusedItem() +{ + wxTreeItemId item = GetFocusedItem(); + if ( item.IsOk() ) + SelectItem(item, false); +} + +void wxGenericTreeCtrl::SetFocusedItem(const wxTreeItemId& item) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + SelectItem(item, true); +} + +void wxGenericTreeCtrl::UnselectAllChildren(wxGenericTreeItem *item) +{ + if (item->IsSelected()) + { + item->SetHilight(false); + RefreshLine(item); + } + + if (item->HasChildren()) + { + wxArrayGenericTreeItems& children = item->GetChildren(); + size_t count = children.GetCount(); + for ( size_t n = 0; n < count; ++n ) + { + UnselectAllChildren(children[n]); + } + } +} + +void wxGenericTreeCtrl::UnselectAll() +{ + wxTreeItemId rootItem = GetRootItem(); + + // the tree might not have the root item at all + if ( rootItem ) + { + UnselectAllChildren((wxGenericTreeItem*) rootItem.m_pItem); + } +} + +void wxGenericTreeCtrl::SelectChildren(const wxTreeItemId& parent) +{ + wxCHECK_RET( HasFlag(wxTR_MULTIPLE), + "this only works with multiple selection controls" ); + + UnselectAll(); + + if ( !HasChildren(parent) ) + return; + + + wxArrayGenericTreeItems& + children = ((wxGenericTreeItem*) parent.m_pItem)->GetChildren(); + size_t count = children.GetCount(); + + wxGenericTreeItem * + item = (wxGenericTreeItem*) ((wxTreeItemId)children[0]).m_pItem; + wxTreeEvent event(wxEVT_TREE_SEL_CHANGING, this, item); + event.m_itemOld = m_current; + + if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) + return; + + for ( size_t n = 0; n < count; ++n ) + { + m_current = m_key_current = children[n]; + m_current->SetHilight(true); + RefreshSelected(); + } + + + event.SetEventType(wxEVT_TREE_SEL_CHANGED); + GetEventHandler()->ProcessEvent( event ); +} + + +// Recursive function ! +// To stop we must have crt_itemGetParent(); + + if (parent == NULL) // This is root item + return TagAllChildrenUntilLast(crt_item, last_item, select); + + wxArrayGenericTreeItems& children = parent->GetChildren(); + int index = children.Index(crt_item); + wxASSERT( index != wxNOT_FOUND ); // I'm not a child of my parent? + + size_t count = children.GetCount(); + for (size_t n=(size_t)(index+1); nSetHilight(select); + RefreshLine(crt_item); + + if (crt_item==last_item) + return true; + + // We should leave the not shown children of collapsed items alone. + if (crt_item->HasChildren() && crt_item->IsExpanded()) + { + wxArrayGenericTreeItems& children = crt_item->GetChildren(); + size_t count = children.GetCount(); + for ( size_t n = 0; n < count; ++n ) + { + if (TagAllChildrenUntilLast(children[n], last_item, select)) + return true; + } + } + + return false; +} + +void +wxGenericTreeCtrl::SelectItemRange(wxGenericTreeItem *item1, + wxGenericTreeItem *item2) +{ + m_select_me = NULL; + + // item2 is not necessary after item1 + // choice first' and 'last' between item1 and item2 + wxGenericTreeItem *first= (item1->GetY()GetY()) ? item1 : item2; + wxGenericTreeItem *last = (item1->GetY()GetY()) ? item2 : item1; + + bool select = m_current->IsSelected(); + + if ( TagAllChildrenUntilLast(first,last,select) ) + return; + + TagNextChildren(first,last,select); +} + +void wxGenericTreeCtrl::DoSelectItem(const wxTreeItemId& itemId, + bool unselect_others, + bool extended_select) +{ + wxCHECK_RET( itemId.IsOk(), wxT("invalid tree item") ); + + m_select_me = NULL; + + bool is_single=!(GetWindowStyleFlag() & wxTR_MULTIPLE); + wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem; + + //wxCHECK_RET( ( (!unselect_others) && is_single), + // wxT("this is a single selection tree") ); + + // to keep going anyhow !!! + if (is_single) + { + if (item->IsSelected()) + return; // nothing to do + unselect_others = true; + extended_select = false; + } + else if ( unselect_others && item->IsSelected() ) + { + // selection change if there is more than one item currently selected + wxArrayTreeItemIds selected_items; + if ( GetSelections(selected_items) == 1 ) + return; + } + + wxTreeEvent event(wxEVT_TREE_SEL_CHANGING, this, item); + event.m_itemOld = m_current; + // TODO : Here we don't send any selection mode yet ! + + if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) + return; + + wxTreeItemId parent = GetItemParent( itemId ); + while (parent.IsOk()) + { + if (!IsExpanded(parent)) + Expand( parent ); + + parent = GetItemParent( parent ); + } + + // ctrl press + if (unselect_others) + { + if (is_single) Unselect(); // to speed up thing + else UnselectAll(); + } + + // shift press + if (extended_select) + { + if ( !m_current ) + { + m_current = + m_key_current = (wxGenericTreeItem*) GetRootItem().m_pItem; + } + + // don't change the mark (m_current) + SelectItemRange(m_current, item); + } + else + { + bool select = true; // the default + + // Check if we need to toggle hilight (ctrl mode) + if (!unselect_others) + select=!item->IsSelected(); + + m_current = m_key_current = item; + m_current->SetHilight(select); + RefreshLine( m_current ); + } + + // This can cause idle processing to select the root + // if no item is selected, so it must be after the + // selection is set + EnsureVisible( itemId ); + + event.SetEventType(wxEVT_TREE_SEL_CHANGED); + GetEventHandler()->ProcessEvent( event ); +} + +void wxGenericTreeCtrl::SelectItem(const wxTreeItemId& itemId, bool select) +{ + wxGenericTreeItem * const item = (wxGenericTreeItem*) itemId.m_pItem; + wxCHECK_RET( item, wxT("SelectItem(): invalid tree item") ); + + if ( select ) + { + if ( !item->IsSelected() ) + DoSelectItem(itemId, !HasFlag(wxTR_MULTIPLE)); + } + else // deselect + { + wxTreeEvent event(wxEVT_TREE_SEL_CHANGING, this, item); + if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) + return; + + item->SetHilight(false); + RefreshLine(item); + + event.SetEventType(wxEVT_TREE_SEL_CHANGED); + GetEventHandler()->ProcessEvent( event ); + } +} + +void wxGenericTreeCtrl::FillArray(wxGenericTreeItem *item, + wxArrayTreeItemIds &array) const +{ + if ( item->IsSelected() ) + array.Add(wxTreeItemId(item)); + + if ( item->HasChildren() ) + { + wxArrayGenericTreeItems& children = item->GetChildren(); + size_t count = children.GetCount(); + for ( size_t n = 0; n < count; ++n ) + FillArray(children[n], array); + } +} + +size_t wxGenericTreeCtrl::GetSelections(wxArrayTreeItemIds &array) const +{ + array.Empty(); + wxTreeItemId idRoot = GetRootItem(); + if ( idRoot.IsOk() ) + { + FillArray((wxGenericTreeItem*) idRoot.m_pItem, array); + } + //else: the tree is empty, so no selections + + return array.GetCount(); +} + +void wxGenericTreeCtrl::EnsureVisible(const wxTreeItemId& item) +{ + wxCHECK_RET( item.IsOk(), wxT("invalid tree item") ); + + if (!item.IsOk()) return; + + wxGenericTreeItem *gitem = (wxGenericTreeItem*) item.m_pItem; + + // first expand all parent branches + wxGenericTreeItem *parent = gitem->GetParent(); + + if ( HasFlag(wxTR_HIDE_ROOT) ) + { + while ( parent && parent != m_anchor ) + { + Expand(parent); + parent = parent->GetParent(); + } + } + else + { + while ( parent ) + { + Expand(parent); + parent = parent->GetParent(); + } + } + + //if (parent) CalculatePositions(); + + ScrollTo(item); +} + +void wxGenericTreeCtrl::ScrollTo(const wxTreeItemId &item) +{ + if (!item.IsOk()) + return; + + // update the control before scrolling it + if (m_dirty) + { +#if defined( __WXMSW__ ) + Update(); +#elif defined(__WXMAC__) + Update(); + DoDirtyProcessing(); +#else + DoDirtyProcessing(); +#endif + } + + wxGenericTreeItem *gitem = (wxGenericTreeItem*) item.m_pItem; + + int itemY = gitem->GetY(); + + int start_x = 0; + int start_y = 0; + GetViewStart( &start_x, &start_y ); + + const int clientHeight = GetClientSize().y; + + const int itemHeight = GetLineHeight(gitem) + 2; + + if ( itemY + itemHeight > start_y*PIXELS_PER_UNIT + clientHeight ) + { + // need to scroll down by enough to show this item fully + itemY += itemHeight - clientHeight; + + // because itemY below will be divided by PIXELS_PER_UNIT it may + // be rounded down, with the result of the item still only being + // partially visible, so make sure we are rounding up + itemY += PIXELS_PER_UNIT - 1; + } + else if ( itemY > start_y*PIXELS_PER_UNIT ) + { + // item is already fully visible, don't do anything + return; + } + //else: scroll up to make this item the top one displayed + + Scroll(-1, itemY/PIXELS_PER_UNIT); +} + +// FIXME: tree sorting functions are not reentrant and not MT-safe! +static wxGenericTreeCtrl *s_treeBeingSorted = NULL; + +static int LINKAGEMODE tree_ctrl_compare_func(wxGenericTreeItem **item1, + wxGenericTreeItem **item2) +{ + wxCHECK_MSG( s_treeBeingSorted, 0, + "bug in wxGenericTreeCtrl::SortChildren()" ); + + return s_treeBeingSorted->OnCompareItems(*item1, *item2); +} + +void wxGenericTreeCtrl::SortChildren(const wxTreeItemId& itemId) +{ + wxCHECK_RET( itemId.IsOk(), wxT("invalid tree item") ); + + wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem; + + wxCHECK_RET( !s_treeBeingSorted, + wxT("wxGenericTreeCtrl::SortChildren is not reentrant") ); + + wxArrayGenericTreeItems& children = item->GetChildren(); + if ( children.GetCount() > 1 ) + { + m_dirty = true; + + s_treeBeingSorted = this; + children.Sort(tree_ctrl_compare_func); + s_treeBeingSorted = NULL; + } + //else: don't make the tree dirty as nothing changed +} + +void wxGenericTreeCtrl::CalculateLineHeight() +{ + wxClientDC dc(this); + m_lineHeight = (int)(dc.GetCharHeight() + 4); + + if ( m_imageListNormal ) + { + // Calculate a m_lineHeight value from the normal Image sizes. + // May be toggle off. Then wxGenericTreeCtrl will spread when + // necessary (which might look ugly). + int n = m_imageListNormal->GetImageCount(); + for (int i = 0; i < n ; i++) + { + int width = 0, height = 0; + m_imageListNormal->GetSize(i, width, height); + if (height > m_lineHeight) m_lineHeight = height; + } + } + + if ( m_imageListState ) + { + // Calculate a m_lineHeight value from the state Image sizes. + // May be toggle off. Then wxGenericTreeCtrl will spread when + // necessary (which might look ugly). + int n = m_imageListState->GetImageCount(); + for (int i = 0; i < n ; i++) + { + int width = 0, height = 0; + m_imageListState->GetSize(i, width, height); + if (height > m_lineHeight) m_lineHeight = height; + } + } + + if (m_imageListButtons) + { + // Calculate a m_lineHeight value from the Button image sizes. + // May be toggle off. Then wxGenericTreeCtrl will spread when + // necessary (which might look ugly). + int n = m_imageListButtons->GetImageCount(); + for (int i = 0; i < n ; i++) + { + int width = 0, height = 0; + m_imageListButtons->GetSize(i, width, height); + if (height > m_lineHeight) m_lineHeight = height; + } + } + + if (m_lineHeight < 30) + m_lineHeight += 2; // at least 2 pixels + else + m_lineHeight += m_lineHeight/10; // otherwise 10% extra spacing +} + +void wxGenericTreeCtrl::SetImageList(wxImageList *imageList) +{ + if (m_ownsImageListNormal) delete m_imageListNormal; + m_imageListNormal = imageList; + m_ownsImageListNormal = false; + m_dirty = true; + + if (m_anchor) + m_anchor->RecursiveResetSize(); + + // Don't do any drawing if we're setting the list to NULL, + // since we may be in the process of deleting the tree control. + if (imageList) + CalculateLineHeight(); +} + +void wxGenericTreeCtrl::SetStateImageList(wxImageList *imageList) +{ + if (m_ownsImageListState) delete m_imageListState; + m_imageListState = imageList; + m_ownsImageListState = false; + m_dirty = true; + + if (m_anchor) + m_anchor->RecursiveResetSize(); + + // Don't do any drawing if we're setting the list to NULL, + // since we may be in the process of deleting the tree control. + if (imageList) + CalculateLineHeight(); +} + +void wxGenericTreeCtrl::SetButtonsImageList(wxImageList *imageList) +{ + if (m_ownsImageListButtons) delete m_imageListButtons; + m_imageListButtons = imageList; + m_ownsImageListButtons = false; + m_dirty = true; + + if (m_anchor) + m_anchor->RecursiveResetSize(); + + CalculateLineHeight(); +} + +void wxGenericTreeCtrl::AssignButtonsImageList(wxImageList *imageList) +{ + SetButtonsImageList(imageList); + m_ownsImageListButtons = true; +} + +// ----------------------------------------------------------------------------- +// helpers +// ----------------------------------------------------------------------------- + +void wxGenericTreeCtrl::AdjustMyScrollbars() +{ + if (m_anchor) + { + int x = 0, y = 0; + m_anchor->GetSize( x, y, this ); + y += PIXELS_PER_UNIT+2; // one more scrollbar unit + 2 pixels + x += PIXELS_PER_UNIT+2; // one more scrollbar unit + 2 pixels + int x_pos = GetScrollPos( wxHORIZONTAL ); + int y_pos = GetScrollPos( wxVERTICAL ); + SetScrollbars( PIXELS_PER_UNIT, PIXELS_PER_UNIT, + x/PIXELS_PER_UNIT, y/PIXELS_PER_UNIT, + x_pos, y_pos ); + } + else + { + SetScrollbars( 0, 0, 0, 0 ); + } +} + +int wxGenericTreeCtrl::GetLineHeight(wxGenericTreeItem *item) const +{ + if (GetWindowStyleFlag() & wxTR_HAS_VARIABLE_ROW_HEIGHT) + return item->GetHeight(); + else + return m_lineHeight; +} + +void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc) +{ + item->SetFont(this, dc); + item->CalculateSize(this, dc); + + wxCoord text_h = item->GetTextHeight(); + + int image_h = 0, image_w = 0; + int image = item->GetCurrentImage(); + if ( image != NO_IMAGE ) + { + if ( m_imageListNormal ) + { + m_imageListNormal->GetSize(image, image_w, image_h); + image_w += MARGIN_BETWEEN_IMAGE_AND_TEXT; + } + else + { + image = NO_IMAGE; + } + } + + int state_h = 0, state_w = 0; + int state = item->GetState(); + if ( state != wxTREE_ITEMSTATE_NONE ) + { + if ( m_imageListState ) + { + m_imageListState->GetSize(state, state_w, state_h); + if ( image_w != 0 ) + state_w += MARGIN_BETWEEN_STATE_AND_IMAGE; + else + state_w += MARGIN_BETWEEN_IMAGE_AND_TEXT; + } + else + { + state = wxTREE_ITEMSTATE_NONE; + } + } + + int total_h = GetLineHeight(item); + bool drawItemBackground = false, + hasBgColour = false; + + if ( item->IsSelected() ) + { + dc.SetBrush(*(m_hasFocus ? m_hilightBrush : m_hilightUnfocusedBrush)); + drawItemBackground = true; + } + else + { + wxColour colBg; + wxTreeItemAttr * const attr = item->GetAttributes(); + if ( attr && attr->HasBackgroundColour() ) + { + drawItemBackground = + hasBgColour = true; + colBg = attr->GetBackgroundColour(); + } + else + { + colBg = GetBackgroundColour(); + } + dc.SetBrush(wxBrush(colBg, wxBRUSHSTYLE_SOLID)); + } + + int offset = HasFlag(wxTR_ROW_LINES) ? 1 : 0; + + if ( HasFlag(wxTR_FULL_ROW_HIGHLIGHT) ) + { + int x, w, h; + x=0; + GetVirtualSize(&w, &h); + wxRect rect( x, item->GetY()+offset, w, total_h-offset); + if (!item->IsSelected()) + { + dc.DrawRectangle(rect); + } + else + { + int flags = wxCONTROL_SELECTED; + if (m_hasFocus +#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON // TODO CS + && IsControlActive( (ControlRef)GetHandle() ) +#endif + ) + flags |= wxCONTROL_FOCUSED; + if ((item == m_current) && (m_hasFocus)) + flags |= wxCONTROL_CURRENT; + + wxRendererNative::Get(). + DrawItemSelectionRect(this, dc, rect, flags); + } + } + else // no full row highlight + { + if ( item->IsSelected() && + (state != wxTREE_ITEMSTATE_NONE || image != NO_IMAGE) ) + { + // If it's selected, and there's an state image or normal image, + // then we should take care to leave the area under the image + // painted in the background colour. + wxRect rect( item->GetX() + state_w + image_w - 2, + item->GetY() + offset, + item->GetWidth() - state_w - image_w + 2, + total_h - offset ); +#if !defined(__WXGTK20__) && !defined(__WXMAC__) + dc.DrawRectangle( rect ); +#else + rect.x -= 1; + rect.width += 2; + + int flags = wxCONTROL_SELECTED; + if (m_hasFocus) + flags |= wxCONTROL_FOCUSED; + if ((item == m_current) && (m_hasFocus)) + flags |= wxCONTROL_CURRENT; + wxRendererNative::Get(). + DrawItemSelectionRect(this, dc, rect, flags); +#endif + } + // On GTK+ 2, drawing a 'normal' background is wrong for themes that + // don't allow backgrounds to be customized. Not drawing the background, + // except for custom item backgrounds, works for both kinds of theme. + else if (drawItemBackground) + { + wxRect rect( item->GetX() + state_w + image_w - 2, + item->GetY() + offset, + item->GetWidth() - state_w - image_w + 2, + total_h - offset ); + if ( hasBgColour ) + { + dc.DrawRectangle( rect ); + } + else // no specific background colour + { + rect.x -= 1; + rect.width += 2; + + int flags = wxCONTROL_SELECTED; + if (m_hasFocus) + flags |= wxCONTROL_FOCUSED; + if ((item == m_current) && (m_hasFocus)) + flags |= wxCONTROL_CURRENT; + wxRendererNative::Get(). + DrawItemSelectionRect(this, dc, rect, flags); + } + } + } + + if ( state != wxTREE_ITEMSTATE_NONE ) + { + dc.SetClippingRegion( item->GetX(), item->GetY(), state_w, total_h ); + m_imageListState->Draw( state, dc, + item->GetX(), + item->GetY() + + (total_h > state_h ? (total_h-state_h)/2 + : 0), + wxIMAGELIST_DRAW_TRANSPARENT ); + dc.DestroyClippingRegion(); + } + + if ( image != NO_IMAGE ) + { + dc.SetClippingRegion(item->GetX() + state_w, item->GetY(), + image_w, total_h); + m_imageListNormal->Draw( image, dc, + item->GetX() + state_w, + item->GetY() + + (total_h > image_h ? (total_h-image_h)/2 + : 0), + wxIMAGELIST_DRAW_TRANSPARENT ); + dc.DestroyClippingRegion(); + } + + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); + int extraH = (total_h > text_h) ? (total_h - text_h)/2 : 0; + dc.DrawText( item->GetText(), + (wxCoord)(state_w + image_w + item->GetX()), + (wxCoord)(item->GetY() + extraH)); + + // restore normal font + dc.SetFont( m_normalFont ); + + if (item == m_dndEffectItem) + { + dc.SetPen( *wxBLACK_PEN ); + // DnD visual effects + switch (m_dndEffect) + { + case BorderEffect: + { + dc.SetBrush(*wxTRANSPARENT_BRUSH); + int w = item->GetWidth() + 2; + int h = total_h + 2; + dc.DrawRectangle( item->GetX() - 1, item->GetY() - 1, w, h); + break; + } + case AboveEffect: + { + int x = item->GetX(), + y = item->GetY(); + dc.DrawLine( x, y, x + item->GetWidth(), y); + break; + } + case BelowEffect: + { + int x = item->GetX(), + y = item->GetY(); + y += total_h - 1; + dc.DrawLine( x, y, x + item->GetWidth(), y); + break; + } + case NoEffect: + break; + } + } +} + +void +wxGenericTreeCtrl::PaintLevel(wxGenericTreeItem *item, + wxDC &dc, + int level, + int &y) +{ + int x = level*m_indent; + if (!HasFlag(wxTR_HIDE_ROOT)) + { + x += m_indent; + } + else if (level == 0) + { + // always expand hidden root + int origY = y; + wxArrayGenericTreeItems& children = item->GetChildren(); + int count = children.GetCount(); + if (count > 0) + { + int n = 0, oldY; + do { + oldY = y; + PaintLevel(children[n], dc, 1, y); + } while (++n < count); + + if ( !HasFlag(wxTR_NO_LINES) && HasFlag(wxTR_LINES_AT_ROOT) + && count > 0 ) + { + // draw line down to last child + origY += GetLineHeight(children[0])>>1; + oldY += GetLineHeight(children[n-1])>>1; + dc.DrawLine(3, origY, 3, oldY); + } + } + return; + } + + item->SetX(x+m_spacing); + item->SetY(y); + + int h = GetLineHeight(item); + int y_top = y; + int y_mid = y_top + (h>>1); + y += h; + + int exposed_x = dc.LogicalToDeviceX(0); + int exposed_y = dc.LogicalToDeviceY(y_top); + + if (IsExposed(exposed_x, exposed_y, 10000, h)) // 10000 = very much + { + const wxPen *pen = +#ifndef __WXMAC__ + // don't draw rect outline if we already have the + // background color under Mac + (item->IsSelected() && m_hasFocus) ? wxBLACK_PEN : +#endif // !__WXMAC__ + wxTRANSPARENT_PEN; + + wxColour colText; + if ( item->IsSelected() +#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON // TODO CS + // On wxMac, if the tree doesn't have the focus we draw an empty + // rectangle, so we want to make sure that the text is visible + // against the normal background, not the highlightbackground, so + // don't use the highlight text colour unless we have the focus. + && m_hasFocus && IsControlActive( (ControlRef)GetHandle() ) +#endif + ) + { +#ifdef __WXMAC__ + colText = *wxWHITE; +#else + if (m_hasFocus) + colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + else + colText = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT); +#endif + } + else + { + wxTreeItemAttr *attr = item->GetAttributes(); + if (attr && attr->HasTextColour()) + colText = attr->GetTextColour(); + else + colText = GetForegroundColour(); + } + + // prepare to draw + dc.SetTextForeground(colText); + dc.SetPen(*pen); + + // draw + PaintItem(item, dc); + + if (HasFlag(wxTR_ROW_LINES)) + { + // if the background colour is white, choose a + // contrasting color for the lines + dc.SetPen(*((GetBackgroundColour() == *wxWHITE) + ? wxMEDIUM_GREY_PEN : wxWHITE_PEN)); + dc.DrawLine(0, y_top, 10000, y_top); + dc.DrawLine(0, y, 10000, y); + } + + // restore DC objects + dc.SetBrush(*wxWHITE_BRUSH); + dc.SetPen(m_dottedPen); + dc.SetTextForeground(*wxBLACK); + + if ( !HasFlag(wxTR_NO_LINES) ) + { + // draw the horizontal line here + int x_start = x; + if (x > (signed)m_indent) + x_start -= m_indent; + else if (HasFlag(wxTR_LINES_AT_ROOT)) + x_start = 3; + dc.DrawLine(x_start, y_mid, x + m_spacing, y_mid); + } + + // should the item show a button? + if ( item->HasPlus() && HasButtons() ) + { + if ( m_imageListButtons ) + { + // draw the image button here + int image_h = 0, + image_w = 0; + int image = item->IsExpanded() ? wxTreeItemIcon_Expanded + : wxTreeItemIcon_Normal; + if ( item->IsSelected() ) + image += wxTreeItemIcon_Selected - wxTreeItemIcon_Normal; + + m_imageListButtons->GetSize(image, image_w, image_h); + int xx = x - image_w/2; + int yy = y_mid - image_h/2; + + wxDCClipper clip(dc, xx, yy, image_w, image_h); + m_imageListButtons->Draw(image, dc, xx, yy, + wxIMAGELIST_DRAW_TRANSPARENT); + } + else // no custom buttons + { + static const int wImage = 9; + static const int hImage = 9; + + int flag = 0; + if (item->IsExpanded()) + flag |= wxCONTROL_EXPANDED; + if (item == m_underMouse) + flag |= wxCONTROL_CURRENT; + + wxRendererNative::Get().DrawTreeItemButton + ( + this, + dc, + wxRect(x - wImage/2, + y_mid - hImage/2, + wImage, hImage), + flag + ); + } + } + } + + if (item->IsExpanded()) + { + wxArrayGenericTreeItems& children = item->GetChildren(); + int count = children.GetCount(); + if (count > 0) + { + int n = 0, oldY; + ++level; + do { + oldY = y; + PaintLevel(children[n], dc, level, y); + } while (++n < count); + + if (!HasFlag(wxTR_NO_LINES) && count > 0) + { + // draw line down to last child + oldY += GetLineHeight(children[n-1])>>1; + if (HasButtons()) y_mid += 5; + + // Only draw the portion of the line that is visible, in case + // it is huge + wxCoord xOrigin=0, yOrigin=0, width, height; + dc.GetDeviceOrigin(&xOrigin, &yOrigin); + yOrigin = abs(yOrigin); + GetClientSize(&width, &height); + + // Move end points to the beginning/end of the view? + if (y_mid < yOrigin) + y_mid = yOrigin; + if (oldY > yOrigin + height) + oldY = yOrigin + height; + + // after the adjustments if y_mid is larger than oldY then the + // line isn't visible at all so don't draw anything + if (y_mid < oldY) + dc.DrawLine(x, y_mid, x, oldY); + } + } + } +} + +void wxGenericTreeCtrl::DrawDropEffect(wxGenericTreeItem *item) +{ + if ( item ) + { + if ( item->HasPlus() ) + { + // it's a folder, indicate it by a border + DrawBorder(item); + } + else + { + // draw a line under the drop target because the item will be + // dropped there + DrawLine(item, !m_dropEffectAboveItem ); + } + + SetCursor(*wxSTANDARD_CURSOR); + } + else + { + // can't drop here + SetCursor(wxCURSOR_NO_ENTRY); + } +} + +void wxGenericTreeCtrl::DrawBorder(const wxTreeItemId &item) +{ + wxCHECK_RET( item.IsOk(), "invalid item in wxGenericTreeCtrl::DrawLine" ); + + wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem; + + if (m_dndEffect == NoEffect) + { + m_dndEffect = BorderEffect; + m_dndEffectItem = i; + } + else + { + m_dndEffect = NoEffect; + m_dndEffectItem = NULL; + } + + wxRect rect( i->GetX()-1, i->GetY()-1, i->GetWidth()+2, GetLineHeight(i)+2 ); + CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + RefreshRect( rect ); +} + +void wxGenericTreeCtrl::DrawLine(const wxTreeItemId &item, bool below) +{ + wxCHECK_RET( item.IsOk(), "invalid item in wxGenericTreeCtrl::DrawLine" ); + + wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem; + + if (m_dndEffect == NoEffect) + { + if (below) + m_dndEffect = BelowEffect; + else + m_dndEffect = AboveEffect; + m_dndEffectItem = i; + } + else + { + m_dndEffect = NoEffect; + m_dndEffectItem = NULL; + } + + wxRect rect( i->GetX()-1, i->GetY()-1, i->GetWidth()+2, GetLineHeight(i)+2 ); + CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y ); + RefreshRect( rect ); +} + +// ----------------------------------------------------------------------------- +// wxWidgets callbacks +// ----------------------------------------------------------------------------- + +void wxGenericTreeCtrl::OnSize( wxSizeEvent &event ) +{ +#ifdef __WXGTK__ + if (HasFlag( wxTR_FULL_ROW_HIGHLIGHT) && m_current) + RefreshLine( m_current ); +#endif + + event.Skip(true); +} + +void wxGenericTreeCtrl::OnPaint( wxPaintEvent &WXUNUSED(event) ) +{ + wxPaintDC dc(this); + PrepareDC( dc ); + + if ( !m_anchor) + return; + + dc.SetFont( m_normalFont ); + dc.SetPen( m_dottedPen ); + + // this is now done dynamically + //if(GetImageList() == NULL) + // m_lineHeight = (int)(dc.GetCharHeight() + 4); + + int y = 2; + PaintLevel( m_anchor, dc, 0, y ); +} + +void wxGenericTreeCtrl::OnSetFocus( wxFocusEvent &event ) +{ + m_hasFocus = true; + + RefreshSelected(); + + event.Skip(); +} + +void wxGenericTreeCtrl::OnKillFocus( wxFocusEvent &event ) +{ + m_hasFocus = false; + + RefreshSelected(); + + event.Skip(); +} + +void wxGenericTreeCtrl::OnKeyDown( wxKeyEvent &event ) +{ + // send a tree event + wxTreeEvent te( wxEVT_TREE_KEY_DOWN, this); + te.m_evtKey = event; + if ( GetEventHandler()->ProcessEvent( te ) ) + return; + + event.Skip(); +} + +void wxGenericTreeCtrl::OnChar( wxKeyEvent &event ) +{ + if ( (m_current == 0) || (m_key_current == 0) ) + { + event.Skip(); + return; + } + + // how should the selection work for this event? + bool is_multiple, extended_select, unselect_others; + EventFlagsToSelType(GetWindowStyleFlag(), + event.ShiftDown(), + event.CmdDown(), + is_multiple, extended_select, unselect_others); + + if (GetLayoutDirection() == wxLayout_RightToLeft) + { + if (event.GetKeyCode() == WXK_RIGHT) + event.m_keyCode = WXK_LEFT; + else if (event.GetKeyCode() == WXK_LEFT) + event.m_keyCode = WXK_RIGHT; + } + + // + : Expand + // - : Collaspe + // * : Expand all/Collapse all + // ' ' | return : activate + // up : go up (not last children!) + // down : go down + // left : go to parent + // right : open if parent and go next + // home : go to root + // end : go to last item without opening parents + // alnum : start or continue searching for the item with this prefix + int keyCode = event.GetKeyCode(); + +#ifdef __WXOSX__ + // Make the keys work as they do in the native control: + // right => expand + // left => collapse if current item is expanded + if (keyCode == WXK_RIGHT) + { + keyCode = '+'; + } + else if (keyCode == WXK_LEFT && IsExpanded(m_current)) + { + keyCode = '-'; + } +#endif // __WXOSX__ + + switch ( keyCode ) + { + case '+': + case WXK_ADD: + if (m_current->HasPlus() && !IsExpanded(m_current)) + { + Expand(m_current); + } + break; + + case '*': + case WXK_MULTIPLY: + if ( !IsExpanded(m_current) ) + { + // expand all + ExpandAllChildren(m_current); + break; + } + //else: fall through to Collapse() it + + case '-': + case WXK_SUBTRACT: + if (IsExpanded(m_current)) + { + Collapse(m_current); + } + break; + + case WXK_MENU: + { + // Use the item's bounding rectangle to determine position for + // the event + wxRect ItemRect; + GetBoundingRect(m_current, ItemRect, true); + + wxTreeEvent + eventMenu(wxEVT_TREE_ITEM_MENU, this, m_current); + // Use the left edge, vertical middle + eventMenu.m_pointDrag = wxPoint(ItemRect.GetX(), + ItemRect.GetY() + + ItemRect.GetHeight() / 2); + GetEventHandler()->ProcessEvent( eventMenu ); + } + break; + + case ' ': + case WXK_RETURN: + if ( !event.HasModifiers() ) + { + wxTreeEvent + eventAct(wxEVT_TREE_ITEM_ACTIVATED, this, m_current); + GetEventHandler()->ProcessEvent( eventAct ); + } + + // in any case, also generate the normal key event for this key, + // even if we generated the ACTIVATED event above: this is what + // wxMSW does and it makes sense because you might not want to + // process ACTIVATED event at all and handle Space and Return + // directly (and differently) which would be impossible otherwise + event.Skip(); + break; + + // up goes to the previous sibling or to the last + // of its children if it's expanded + case WXK_UP: + { + wxTreeItemId prev = GetPrevSibling( m_key_current ); + if (!prev) + { + prev = GetItemParent( m_key_current ); + if ((prev == GetRootItem()) && HasFlag(wxTR_HIDE_ROOT)) + { + break; // don't go to root if it is hidden + } + if (prev) + { + wxTreeItemIdValue cookie; + wxTreeItemId current = m_key_current; + // TODO: Huh? If we get here, we'd better be the first + // child of our parent. How else could it be? + if (current == GetFirstChild( prev, cookie )) + { + // otherwise we return to where we came from + DoSelectItem(prev, + unselect_others, + extended_select); + m_key_current = (wxGenericTreeItem*) prev.m_pItem; + break; + } + } + } + if (prev) + { + while ( IsExpanded(prev) && HasChildren(prev) ) + { + wxTreeItemId child = GetLastChild(prev); + if ( child ) + { + prev = child; + } + } + + DoSelectItem( prev, unselect_others, extended_select ); + m_key_current=(wxGenericTreeItem*) prev.m_pItem; + } + } + break; + + // left arrow goes to the parent + case WXK_LEFT: + { + wxTreeItemId prev = GetItemParent( m_current ); + if ((prev == GetRootItem()) && HasFlag(wxTR_HIDE_ROOT)) + { + // don't go to root if it is hidden + prev = GetPrevSibling( m_current ); + } + if (prev) + { + DoSelectItem( prev, unselect_others, extended_select ); + } + } + break; + + case WXK_RIGHT: + // this works the same as the down arrow except that we + // also expand the item if it wasn't expanded yet + if (m_current != GetRootItem().m_pItem || !HasFlag(wxTR_HIDE_ROOT)) + Expand(m_current); + //else: don't try to expand hidden root item (which can be the + // current one when the tree is empty) + + // fall through + + case WXK_DOWN: + { + if (IsExpanded(m_key_current) && HasChildren(m_key_current)) + { + wxTreeItemIdValue cookie; + wxTreeItemId child = GetFirstChild( m_key_current, cookie ); + if ( !child ) + break; + + DoSelectItem( child, unselect_others, extended_select ); + m_key_current=(wxGenericTreeItem*) child.m_pItem; + } + else + { + wxTreeItemId next = GetNextSibling( m_key_current ); + if (!next) + { + wxTreeItemId current = m_key_current; + while (current.IsOk() && !next) + { + current = GetItemParent( current ); + if (current) next = GetNextSibling( current ); + } + } + if (next) + { + DoSelectItem( next, unselect_others, extended_select ); + m_key_current=(wxGenericTreeItem*) next.m_pItem; + } + } + } + break; + + // selects the last visible tree item + case WXK_END: + { + wxTreeItemId last = GetRootItem(); + + while ( last.IsOk() && IsExpanded(last) ) + { + wxTreeItemId lastChild = GetLastChild(last); + + // it may happen if the item was expanded but then all of + // its children have been deleted - so IsExpanded() returned + // true, but GetLastChild() returned invalid item + if ( !lastChild ) + break; + + last = lastChild; + } + + if ( last.IsOk() ) + { + DoSelectItem( last, unselect_others, extended_select ); + } + } + break; + + // selects the root item + case WXK_HOME: + { + wxTreeItemId prev = GetRootItem(); + if (!prev) + break; + + if ( HasFlag(wxTR_HIDE_ROOT) ) + { + wxTreeItemIdValue cookie; + prev = GetFirstChild(prev, cookie); + if (!prev) + break; + } + + DoSelectItem( prev, unselect_others, extended_select ); + } + break; + + default: + // do not use wxIsalnum() here + if ( !event.HasModifiers() && + ((keyCode >= '0' && keyCode <= '9') || + (keyCode >= 'a' && keyCode <= 'z') || + (keyCode >= 'A' && keyCode <= 'Z') || + (keyCode == '_'))) + { + // find the next item starting with the given prefix + wxChar ch = (wxChar)keyCode; + wxTreeItemId id; + + // if the same character is typed multiple times then go to the + // next entry starting with that character instead of searching + // for an item starting with multiple copies of this character, + // this is more useful and is how it works under Windows. + if ( m_findPrefix.length() == 1 && m_findPrefix[0] == ch ) + { + id = FindItem(m_current, ch); + } + else + { + const wxString newPrefix(m_findPrefix + ch); + id = FindItem(m_current, newPrefix); + if ( id.IsOk() ) + m_findPrefix = newPrefix; + } + + // also start the timer to reset the current prefix if the user + // doesn't press any more alnum keys soon -- we wouldn't want + // to use this prefix for a new item search + if ( !m_findTimer ) + { + m_findTimer = new wxTreeFindTimer(this); + } + + // Notice that we should start the timer even if we didn't find + // anything to make sure we reset the search state later. + m_findTimer->Start(wxTreeFindTimer::DELAY, wxTIMER_ONE_SHOT); + + if ( id.IsOk() ) + { + SelectItem(id); + + // Reset the bell flag if it had been temporarily disabled + // before. + if ( m_findBell ) + m_findBell = 1; + } + else // No such item + { + // Signal it with a bell if enabled. + if ( m_findBell == 1 ) + { + ::wxBell(); + + // Disable it for the next unsuccessful match, we only + // beep once, this is usually enough and continuing to + // do it would be annoying. + m_findBell = -1; + } + } + } + else + { + event.Skip(); + } + } +} + +wxTreeItemId +wxGenericTreeCtrl::DoTreeHitTest(const wxPoint& point, int& flags) const +{ + int w, h; + GetSize(&w, &h); + flags=0; + if (point.x<0) flags |= wxTREE_HITTEST_TOLEFT; + if (point.x>w) flags |= wxTREE_HITTEST_TORIGHT; + if (point.y<0) flags |= wxTREE_HITTEST_ABOVE; + if (point.y>h) flags |= wxTREE_HITTEST_BELOW; + if (flags) return wxTreeItemId(); + + if (m_anchor == NULL) + { + flags = wxTREE_HITTEST_NOWHERE; + return wxTreeItemId(); + } + + wxGenericTreeItem *hit = m_anchor->HitTest(CalcUnscrolledPosition(point), + this, flags, 0); + if (hit == NULL) + { + flags = wxTREE_HITTEST_NOWHERE; + return wxTreeItemId(); + } + return hit; +} + +// get the bounding rectangle of the item (or of its label only) +bool wxGenericTreeCtrl::GetBoundingRect(const wxTreeItemId& item, + wxRect& rect, + bool textOnly) const +{ + wxCHECK_MSG( item.IsOk(), false, + "invalid item in wxGenericTreeCtrl::GetBoundingRect" ); + + wxGenericTreeItem *i = (wxGenericTreeItem*) item.m_pItem; + + if ( textOnly ) + { + int image_h = 0, image_w = 0; + int image = ((wxGenericTreeItem*) item.m_pItem)->GetCurrentImage(); + if ( image != NO_IMAGE && m_imageListNormal ) + { + m_imageListNormal->GetSize( image, image_w, image_h ); + image_w += MARGIN_BETWEEN_IMAGE_AND_TEXT; + } + + int state_h = 0, state_w = 0; + int state = ((wxGenericTreeItem*) item.m_pItem)->GetState(); + if ( state != wxTREE_ITEMSTATE_NONE && m_imageListState ) + { + m_imageListState->GetSize( state, state_w, state_h ); + if ( image_w != 0 ) + state_w += MARGIN_BETWEEN_STATE_AND_IMAGE; + else + state_w += MARGIN_BETWEEN_IMAGE_AND_TEXT; + } + + rect.x = i->GetX() + state_w + image_w; + rect.width = i->GetWidth() - state_w - image_w; + + } + else // the entire line + { + rect.x = 0; + rect.width = GetClientSize().x; + } + + rect.y = i->GetY(); + rect.height = GetLineHeight(i); + + // we have to return the logical coordinates, not physical ones + rect.SetTopLeft(CalcScrolledPosition(rect.GetTopLeft())); + + return true; +} + +wxTextCtrl *wxGenericTreeCtrl::EditLabel(const wxTreeItemId& item, + wxClassInfo * WXUNUSED(textCtrlClass)) +{ + wxCHECK_MSG( item.IsOk(), NULL, wxT("can't edit an invalid item") ); + + wxGenericTreeItem *itemEdit = (wxGenericTreeItem *)item.m_pItem; + + wxTreeEvent te(wxEVT_TREE_BEGIN_LABEL_EDIT, this, itemEdit); + if ( GetEventHandler()->ProcessEvent( te ) && !te.IsAllowed() ) + { + // vetoed by user + return NULL; + } + + // We have to call this here because the label in + // question might just have been added and no screen + // update taken place. + if ( m_dirty ) + DoDirtyProcessing(); + + // TODO: use textCtrlClass here to create the control of correct class + m_textCtrl = new wxTreeTextCtrl(this, itemEdit); + + m_textCtrl->SetFocus(); + + return m_textCtrl; +} + +// returns a pointer to the text edit control if the item is being +// edited, NULL otherwise (it's assumed that no more than one item may +// be edited simultaneously) +wxTextCtrl* wxGenericTreeCtrl::GetEditControl() const +{ + return m_textCtrl; +} + +void wxGenericTreeCtrl::EndEditLabel(const wxTreeItemId& WXUNUSED(item), + bool discardChanges) +{ + wxCHECK_RET( m_textCtrl, wxT("not editing label") ); + + m_textCtrl->EndEdit(discardChanges); +} + +bool wxGenericTreeCtrl::OnRenameAccept(wxGenericTreeItem *item, + const wxString& value) +{ + wxTreeEvent le(wxEVT_TREE_END_LABEL_EDIT, this, item); + le.m_label = value; + le.m_editCancelled = false; + + return !GetEventHandler()->ProcessEvent( le ) || le.IsAllowed(); +} + +void wxGenericTreeCtrl::OnRenameCancelled(wxGenericTreeItem *item) +{ + // let owner know that the edit was cancelled + wxTreeEvent le(wxEVT_TREE_END_LABEL_EDIT, this, item); + le.m_label = wxEmptyString; + le.m_editCancelled = true; + + GetEventHandler()->ProcessEvent( le ); +} + +void wxGenericTreeCtrl::OnRenameTimer() +{ + EditLabel( m_current ); +} + +void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) +{ + if ( !m_anchor )return; + + wxPoint pt = CalcUnscrolledPosition(event.GetPosition()); + + // Is the mouse over a tree item button? + int flags = 0; + wxGenericTreeItem *thisItem = m_anchor->HitTest(pt, this, flags, 0); + wxGenericTreeItem *underMouse = thisItem; +#if wxUSE_TOOLTIPS + bool underMouseChanged = (underMouse != m_underMouse) ; +#endif // wxUSE_TOOLTIPS + + if ((underMouse) && + (flags & wxTREE_HITTEST_ONITEMBUTTON) && + (!event.LeftIsDown()) && + (!m_isDragging) && + (!m_renameTimer || !m_renameTimer->IsRunning())) + { + } + else + { + underMouse = NULL; + } + + if (underMouse != m_underMouse) + { + if (m_underMouse) + { + // unhighlight old item + wxGenericTreeItem *tmp = m_underMouse; + m_underMouse = NULL; + RefreshLine( tmp ); + } + + m_underMouse = underMouse; + if (m_underMouse) + RefreshLine( m_underMouse ); + } + +#if wxUSE_TOOLTIPS + // Determines what item we are hovering over and need a tooltip for + wxTreeItemId hoverItem = thisItem; + + // We do not want a tooltip if we are dragging, or if the rename timer is + // running + if ( underMouseChanged && + hoverItem.IsOk() && + !m_isDragging && + (!m_renameTimer || !m_renameTimer->IsRunning()) ) + { + // Ask the tree control what tooltip (if any) should be shown + wxTreeEvent + hevent(wxEVT_TREE_ITEM_GETTOOLTIP, this, hoverItem); + + // setting a tooltip upon leaving a view is getting the tooltip displayed + // on the neighbouring view ... +#ifdef __WXOSX__ + if ( event.Leaving() ) + SetToolTip(NULL); + else +#endif + if ( GetEventHandler()->ProcessEvent(hevent) ) + { + // If the user permitted the tooltip change, update it, otherwise + // remove any old tooltip we might have. + if ( hevent.IsAllowed() ) + SetToolTip(hevent.m_label); + else + SetToolTip(NULL); + } + } +#endif + + // we process left mouse up event (enables in-place edit), middle/right down + // (pass to the user code), left dbl click (activate item) and + // dragging/moving events for items drag-and-drop + if ( !(event.LeftDown() || + event.LeftUp() || + event.MiddleDown() || + event.RightDown() || + event.LeftDClick() || + event.Dragging() || + ((event.Moving() || event.RightUp()) && m_isDragging)) ) + { + event.Skip(); + + return; + } + + + flags = 0; + wxGenericTreeItem *item = m_anchor->HitTest(pt, this, flags, 0); + + if ( event.Dragging() && !m_isDragging ) + { + if (m_dragCount == 0) + m_dragStart = pt; + + m_dragCount++; + + if (m_dragCount != 3) + { + // wait until user drags a bit further... + return; + } + + wxEventType command = event.RightIsDown() + ? wxEVT_TREE_BEGIN_RDRAG + : wxEVT_TREE_BEGIN_DRAG; + + wxTreeEvent nevent(command, this, m_current); + nevent.SetPoint(CalcScrolledPosition(pt)); + + // by default the dragging is not supported, the user code must + // explicitly allow the event for it to take place + nevent.Veto(); + + if ( GetEventHandler()->ProcessEvent(nevent) && nevent.IsAllowed() ) + { + // we're going to drag this item + m_isDragging = true; + + // remember the old cursor because we will change it while + // dragging + m_oldCursor = m_cursor; + + // in a single selection control, hide the selection temporarily + if ( !(GetWindowStyleFlag() & wxTR_MULTIPLE) ) + { + m_oldSelection = (wxGenericTreeItem*) GetSelection().m_pItem; + + if ( m_oldSelection ) + { + m_oldSelection->SetHilight(false); + RefreshLine(m_oldSelection); + } + } + + CaptureMouse(); + } + } + else if ( event.Dragging() ) + { + if ( item != m_dropTarget ) + { + // unhighlight the previous drop target + DrawDropEffect(m_dropTarget); + + m_dropTarget = item; + + // highlight the current drop target if any + DrawDropEffect(m_dropTarget); + +#if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXGTK20__) + Update(); +#else + // TODO: remove this call or use wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI) + // instead (needs to be tested!) + wxYieldIfNeeded(); +#endif + } + } + else if ( event.LeftUp() || event.RightUp() ) + { + if ( m_isDragging ) + { + ReleaseMouse(); + + // erase the highlighting + DrawDropEffect(m_dropTarget); + + if ( m_oldSelection ) + { + m_oldSelection->SetHilight(true); + RefreshLine(m_oldSelection); + m_oldSelection = NULL; + } + + // generate the drag end event + wxTreeEvent eventEndDrag(wxEVT_TREE_END_DRAG, this, item); + + eventEndDrag.m_pointDrag = CalcScrolledPosition(pt); + + (void)GetEventHandler()->ProcessEvent(eventEndDrag); + + m_isDragging = false; + m_dropTarget = NULL; + + SetCursor(m_oldCursor); + +#if defined( __WXMSW__ ) || defined(__WXMAC__) || defined(__WXGTK20__) + Update(); +#else + // TODO: remove this call or use wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI) + // instead (needs to be tested!) + wxYieldIfNeeded(); +#endif + } + else + { + event.Skip(); + } + } + else + { + // If we got to this point, we are not dragging or moving the mouse. + // Because the code in carbon/toplevel.cpp will only set focus to the + // tree if we skip for EVT_LEFT_DOWN, we MUST skip this event here for + // focus to work. + // We skip even if we didn't hit an item because we still should + // restore focus to the tree control even if we didn't exactly hit an + // item. + if ( event.LeftDown() ) + { + event.Skip(); + } + + // here we process only the messages which happen on tree items + + m_dragCount = 0; + + if (item == NULL) return; /* we hit the blank area */ + + if ( event.RightDown() ) + { + // If the item is already selected, do not update the selection. + // Multi-selections should not be cleared if a selected item is + // clicked. + if (!IsSelected(item)) + { + DoSelectItem(item, true, false); + } + + wxTreeEvent + nevent(wxEVT_TREE_ITEM_RIGHT_CLICK, this, item); + nevent.m_pointDrag = CalcScrolledPosition(pt); + event.Skip(!GetEventHandler()->ProcessEvent(nevent)); + + // Consistent with MSW (for now), send the ITEM_MENU *after* + // the RIGHT_CLICK event. TODO: This behaviour may change. + wxTreeEvent nevent2(wxEVT_TREE_ITEM_MENU, this, item); + nevent2.m_pointDrag = CalcScrolledPosition(pt); + GetEventHandler()->ProcessEvent(nevent2); + } + else if ( event.MiddleDown() ) + { + wxTreeEvent + nevent(wxEVT_TREE_ITEM_MIDDLE_CLICK, this, item); + nevent.m_pointDrag = CalcScrolledPosition(pt); + event.Skip(!GetEventHandler()->ProcessEvent(nevent)); + } + else if ( event.LeftUp() ) + { + if (flags & wxTREE_HITTEST_ONITEMSTATEICON) + { + wxTreeEvent + nevent(wxEVT_TREE_STATE_IMAGE_CLICK, this, item); + GetEventHandler()->ProcessEvent(nevent); + } + + // this facilitates multiple-item drag-and-drop + + if ( /* item && */ HasFlag(wxTR_MULTIPLE)) + { + wxArrayTreeItemIds selections; + size_t count = GetSelections(selections); + + if (count > 1 && + !event.CmdDown() && + !event.ShiftDown()) + { + DoSelectItem(item, true, false); + } + } + + if ( m_lastOnSame ) + { + if ( (item == m_current) && + (flags & wxTREE_HITTEST_ONITEMLABEL) && + HasFlag(wxTR_EDIT_LABELS) ) + { + if ( m_renameTimer ) + { + if ( m_renameTimer->IsRunning() ) + m_renameTimer->Stop(); + } + else + { + m_renameTimer = new wxTreeRenameTimer( this ); + } + + m_renameTimer->Start( wxTreeRenameTimer::DELAY, true ); + } + + m_lastOnSame = false; + } + } + else // !RightDown() && !MiddleDown() && !LeftUp() + { + // ==> LeftDown() || LeftDClick() + if ( event.LeftDown() ) + { + // If we click on an already selected item but do it to return + // the focus to the control, it shouldn't start editing the + // item label because it's too easy to start editing + // accidentally (and also because nobody else does it like + // this). So only set this flag, used to decide whether we + // should start editing the label later, if we already have + // focus. + m_lastOnSame = item == m_current && HasFocus(); + } + + if ( flags & wxTREE_HITTEST_ONITEMBUTTON ) + { + // only toggle the item for a single click, double click on + // the button doesn't do anything (it toggles the item twice) + if ( event.LeftDown() ) + { + Toggle( item ); + } + + // don't select the item if the button was clicked + return; + } + + + // clear the previously selected items, if the + // user clicked outside of the present selection. + // otherwise, perform the deselection on mouse-up. + // this allows multiple drag and drop to work. + // but if Cmd is down, toggle selection of the clicked item + if (!IsSelected(item) || event.CmdDown()) + { + // how should the selection work for this event? + bool is_multiple, extended_select, unselect_others; + EventFlagsToSelType(GetWindowStyleFlag(), + event.ShiftDown(), + event.CmdDown(), + is_multiple, + extended_select, + unselect_others); + + DoSelectItem(item, unselect_others, extended_select); + } + + + // For some reason, Windows isn't recognizing a left double-click, + // so we need to simulate it here. Allow 200 milliseconds for now. + if ( event.LeftDClick() ) + { + // double clicking should not start editing the item label + if ( m_renameTimer ) + m_renameTimer->Stop(); + + m_lastOnSame = false; + + // send activate event first + wxTreeEvent + nevent(wxEVT_TREE_ITEM_ACTIVATED, this, item); + nevent.m_pointDrag = CalcScrolledPosition(pt); + if ( !GetEventHandler()->ProcessEvent( nevent ) ) + { + // if the user code didn't process the activate event, + // handle it ourselves by toggling the item when it is + // double clicked + if ( item->HasPlus() ) + { + Toggle(item); + } + } + } + } + } +} + +void wxGenericTreeCtrl::OnInternalIdle() +{ + wxWindow::OnInternalIdle(); + + // Check if we need to select the root item + // because nothing else has been selected. + // Delaying it means that we can invoke event handlers + // as required, when a first item is selected. + if (!HasFlag(wxTR_MULTIPLE) && !GetSelection().IsOk()) + { + if (m_select_me) + SelectItem(m_select_me); + else if (GetRootItem().IsOk()) + SelectItem(GetRootItem()); + } + + // after all changes have been done to the tree control, + // actually redraw the tree when everything is over + if (m_dirty) + DoDirtyProcessing(); +} + +void +wxGenericTreeCtrl::CalculateLevel(wxGenericTreeItem *item, + wxDC &dc, + int level, + int &y ) +{ + int x = level*m_indent; + if (!HasFlag(wxTR_HIDE_ROOT)) + { + x += m_indent; + } + else if (level == 0) + { + // a hidden root is not evaluated, but its + // children are always calculated + goto Recurse; + } + + item->CalculateSize(this, dc); + + // set its position + item->SetX( x+m_spacing ); + item->SetY( y ); + y += GetLineHeight(item); + + if ( !item->IsExpanded() ) + { + // we don't need to calculate collapsed branches + return; + } + + Recurse: + wxArrayGenericTreeItems& children = item->GetChildren(); + size_t n, count = children.GetCount(); + ++level; + for (n = 0; n < count; ++n ) + CalculateLevel( children[n], dc, level, y ); // recurse +} + +void wxGenericTreeCtrl::CalculatePositions() +{ + if ( !m_anchor ) return; + + wxClientDC dc(this); + PrepareDC( dc ); + + dc.SetFont( m_normalFont ); + + dc.SetPen( m_dottedPen ); + //if(GetImageList() == NULL) + // m_lineHeight = (int)(dc.GetCharHeight() + 4); + + int y = 2; + CalculateLevel( m_anchor, dc, 0, y ); // start recursion +} + +void wxGenericTreeCtrl::Refresh(bool eraseBackground, const wxRect *rect) +{ + if ( !IsFrozen() ) + wxTreeCtrlBase::Refresh(eraseBackground, rect); +} + +void wxGenericTreeCtrl::RefreshSubtree(wxGenericTreeItem *item) +{ + if (m_dirty || IsFrozen() ) + return; + + wxSize client = GetClientSize(); + + wxRect rect; + CalcScrolledPosition(0, item->GetY(), NULL, &rect.y); + rect.width = client.x; + rect.height = client.y; + + Refresh(true, &rect); + + AdjustMyScrollbars(); +} + +void wxGenericTreeCtrl::RefreshLine( wxGenericTreeItem *item ) +{ + if (m_dirty || IsFrozen() ) + return; + + wxRect rect; + CalcScrolledPosition(0, item->GetY(), NULL, &rect.y); + rect.width = GetClientSize().x; + rect.height = GetLineHeight(item); //dc.GetCharHeight() + 6; + + Refresh(true, &rect); +} + +void wxGenericTreeCtrl::RefreshSelected() +{ + if (IsFrozen()) + return; + + // TODO: this is awfully inefficient, we should keep the list of all + // selected items internally, should be much faster + if ( m_anchor ) + RefreshSelectedUnder(m_anchor); +} + +void wxGenericTreeCtrl::RefreshSelectedUnder(wxGenericTreeItem *item) +{ + if (IsFrozen()) + return; + + if ( item->IsSelected() ) + RefreshLine(item); + + const wxArrayGenericTreeItems& children = item->GetChildren(); + size_t count = children.GetCount(); + for ( size_t n = 0; n < count; n++ ) + { + RefreshSelectedUnder(children[n]); + } +} + +void wxGenericTreeCtrl::DoThaw() +{ + wxTreeCtrlBase::DoThaw(); + + if ( m_dirty ) + DoDirtyProcessing(); + else + Refresh(); +} + +// ---------------------------------------------------------------------------- +// changing colours: we need to refresh the tree control +// ---------------------------------------------------------------------------- + +bool wxGenericTreeCtrl::SetBackgroundColour(const wxColour& colour) +{ + if ( !wxWindow::SetBackgroundColour(colour) ) + return false; + + Refresh(); + + return true; +} + +bool wxGenericTreeCtrl::SetForegroundColour(const wxColour& colour) +{ + if ( !wxWindow::SetForegroundColour(colour) ) + return false; + + Refresh(); + + return true; +} + +void wxGenericTreeCtrl::OnGetToolTip( wxTreeEvent &event ) +{ +#if wxUSE_TOOLTIPS + wxTreeItemId itemId = event.GetItem(); + const wxGenericTreeItem* const pItem = (wxGenericTreeItem*)itemId.m_pItem; + + // Check if the item fits into the client area: + if ( pItem->GetX() + pItem->GetWidth() > GetClientSize().x ) + { + // If it doesn't, show its full text in the tooltip. + event.SetLabel(pItem->GetText()); + } + else +#endif // wxUSE_TOOLTIPS + { + // veto processing the event, nixing any tooltip + event.Veto(); + } +} + + +// NOTE: If using the wxListBox visual attributes works everywhere then this can +// be removed, as well as the #else case below. +#define _USE_VISATTR 0 + +//static +wxVisualAttributes +#if _USE_VISATTR +wxGenericTreeCtrl::GetClassDefaultAttributes(wxWindowVariant variant) +#else +wxGenericTreeCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +#endif +{ +#if _USE_VISATTR + // Use the same color scheme as wxListBox + return wxListBox::GetClassDefaultAttributes(variant); +#else + wxVisualAttributes attr; + attr.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT); + attr.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX); + attr.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + return attr; +#endif +} + +void wxGenericTreeCtrl::DoDirtyProcessing() +{ + if (IsFrozen()) + return; + + m_dirty = false; + + CalculatePositions(); + Refresh(); + AdjustMyScrollbars(); +} + +wxSize wxGenericTreeCtrl::DoGetBestSize() const +{ + // make sure all positions are calculated as normally this only done during + // idle time but we need them for base class DoGetBestSize() to return the + // correct result + wxConstCast(this, wxGenericTreeCtrl)->CalculatePositions(); + + wxSize size = wxTreeCtrlBase::DoGetBestSize(); + + // there seems to be an implicit extra border around the items, although + // I'm not really sure where does it come from -- but without this, the + // scrollbars appear in a tree with default/best size + size.IncBy(4, 4); + + // and the border has to be rounded up to a multiple of PIXELS_PER_UNIT or + // scrollbars still appear + const wxSize& borderSize = GetWindowBorderSize(); + + int dx = (size.x - borderSize.x) % PIXELS_PER_UNIT; + if ( dx ) + size.x += PIXELS_PER_UNIT - dx; + int dy = (size.y - borderSize.y) % PIXELS_PER_UNIT; + if ( dy ) + size.y += PIXELS_PER_UNIT - dy; + + // we need to update the cache too as the base class cached its own value + CacheBestSize(size); + + return size; +} + +#endif // wxUSE_TREECTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/treelist.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/treelist.cpp new file mode 100644 index 0000000000..73fbe6c466 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/treelist.cpp @@ -0,0 +1,1680 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/treelist.cpp +// Purpose: Generic wxTreeListCtrl implementation. +// Author: Vadim Zeitlin +// Created: 2011-08-19 +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// Declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// Headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_TREELISTCTRL + +#ifndef WX_PRECOMP + #include "wx/dc.h" +#endif // WX_PRECOMP + +#include "wx/treelist.h" + +#include "wx/dataview.h" +#include "wx/renderer.h" +#include "wx/scopedarray.h" +#include "wx/scopedptr.h" + +// ---------------------------------------------------------------------------- +// Constants +// ---------------------------------------------------------------------------- + +const char wxTreeListCtrlNameStr[] = "wxTreeListCtrl"; + +const wxTreeListItem wxTLI_FIRST(reinterpret_cast(-1)); +const wxTreeListItem wxTLI_LAST(reinterpret_cast(-2)); + +// ---------------------------------------------------------------------------- +// wxTreeListModelNode: a node in the internal tree representation. +// ---------------------------------------------------------------------------- + +class wxTreeListModelNode +{ +public: + wxTreeListModelNode(wxTreeListModelNode* parent, + const wxString& text = wxString(), + int imageClosed = wxWithImages::NO_IMAGE, + int imageOpened = wxWithImages::NO_IMAGE, + wxClientData* data = NULL) + : m_text(text), + m_parent(parent) + { + m_child = + m_next = NULL; + + m_imageClosed = imageClosed; + m_imageOpened = imageOpened; + + m_checkedState = wxCHK_UNCHECKED; + + m_data = data; + + m_columnsTexts = NULL; + } + + // Destroying the node also (recursively) destroys its children. + ~wxTreeListModelNode() + { + for ( wxTreeListModelNode* node = m_child; node; ) + { + wxTreeListModelNode* child = node; + node = node->m_next; + delete child; + } + + delete m_data; + + delete [] m_columnsTexts; + } + + + // Public fields for the first column text and other simple attributes: + // there is no need to have accessors/mutators for those as there is no + // encapsulation anyhow, all of those are exposed in our public API. + wxString m_text; + + int m_imageClosed, + m_imageOpened; + + wxCheckBoxState m_checkedState; + + + // Accessors for the fields that are not directly exposed. + + // Client data is owned by us so delete the old value when setting the new + // one. + wxClientData* GetClientData() const { return m_data; } + void SetClientData(wxClientData* data) { delete m_data; m_data = data; } + + // Setting or getting the non-first column text. Getting is simple but you + // need to call HasColumnsTexts() first as the column data is only + // allocated on demand. And when setting the text we require to be given + // the total number of columns as we allocate the entire array at once, + // this is more efficient than using dynamically-expandable wxVector that + // we know won't be needed as the number of columns is usually fixed. But + // if it does change, our OnInsertColumn() must be called. + // + // Notice the presence of -1 everywhere in these methods: this is because + // the text for the first column is always stored in m_text and so we don't + // store it in m_columnsTexts. + + bool HasColumnsTexts() const { return m_columnsTexts != NULL; } + const wxString& GetColumnText(unsigned col) const + { + return m_columnsTexts[col - 1]; + } + + void SetColumnText(const wxString& text, unsigned col, unsigned numColumns) + { + if ( !m_columnsTexts ) + m_columnsTexts = new wxString[numColumns - 1]; + + m_columnsTexts[col - 1] = text; + } + + void OnInsertColumn(unsigned col, unsigned numColumns) + { + wxASSERT_MSG( col, "Shouldn't be called for the first column" ); + + // Nothing to do if we don't have any text. + if ( !m_columnsTexts ) + return; + + wxScopedArray oldTexts(m_columnsTexts); + m_columnsTexts = new wxString[numColumns - 1]; + + // In the loop below n is the index in the new column texts array and m + // is the index in the old one. + for ( unsigned n = 1, m = 1; n < numColumns - 1; n++, m++ ) + { + if ( n == col ) + { + // Leave the new array text initially empty and just adjust the + // index (to compensate for "m++" done by the loop anyhow). + m--; + } + else // Not the newly inserted column. + { + // Copy the old text value. + m_columnsTexts[n - 1] = oldTexts[m - 1]; + } + } + } + + void OnDeleteColumn(unsigned col, unsigned numColumns) + { + wxASSERT_MSG( col, "Shouldn't be called for the first column" ); + + if ( !m_columnsTexts ) + return; + + wxScopedArray oldTexts(m_columnsTexts); + m_columnsTexts = new wxString[numColumns - 2]; + for ( unsigned n = 1, m = 1; n < numColumns - 1; n++, m++ ) + { + if ( n == col ) + { + n--; + } + else // Not the deleted column. + { + m_columnsTexts[n - 1] = oldTexts[m - 1]; + } + } + } + + void OnClearColumns() + { + if ( m_columnsTexts ) + { + delete [] m_columnsTexts; + m_columnsTexts = NULL; + } + } + + + // Functions for modifying the tree. + + // Insert the given item as the first child of this one. The parent pointer + // must have been already set correctly at creation and we take ownership + // of the pointer and will delete it later. + void InsertChild(wxTreeListModelNode* child) + { + wxASSERT( child->m_parent == this ); + + // Our previous first child becomes the next sibling of the new child. + child->m_next = m_child; + m_child = child; + } + + // Insert the given item as our next sibling. As above, the item must have + // the correct parent pointer and we take ownership of it. + void InsertNext(wxTreeListModelNode* next) + { + wxASSERT( next->m_parent == m_parent ); + + next->m_next = m_next; + m_next = next; + } + + // Remove the first child of this item from the tree and delete it. + void DeleteChild() + { + wxTreeListModelNode* const oldChild = m_child; + m_child = m_child->m_next; + delete oldChild; + } + + // Remove the next sibling of this item from the tree and deletes it. + void DeleteNext() + { + wxTreeListModelNode* const oldNext = m_next; + m_next = m_next->m_next; + delete oldNext; + } + + + // Functions for tree traversal. All of them can return NULL. + + // Only returns NULL when called on the root item. + wxTreeListModelNode* GetParent() const { return m_parent; } + + // Returns the first child of this item. + wxTreeListModelNode* GetChild() const { return m_child; } + + // Returns the next sibling of this item. + wxTreeListModelNode* GetNext() const { return m_next; } + + // Unlike the previous two functions, this one is not a simple accessor + // (hence it's not called "GetSomething") but computes the next node after + // this one in tree order. + wxTreeListModelNode* NextInTree() const + { + if ( m_child ) + return m_child; + + if ( m_next ) + return m_next; + + // Recurse upwards until we find the next sibling. + for ( wxTreeListModelNode* node = m_parent; node; node = node->m_parent ) + { + if ( node->m_next ) + return node->m_next; + } + + return NULL; + } + + +private: + // The (never changing after creation) parent of this node and the possibly + // NULL pointers to its first child and next sibling. + wxTreeListModelNode* const m_parent; + wxTreeListModelNode* m_child; + wxTreeListModelNode* m_next; + + // Client data pointer owned by the control. May be NULL. + wxClientData* m_data; + + // Array of column values for all the columns except the first one. May be + // NULL if no values had been set for them. + wxString* m_columnsTexts; +}; + +// ---------------------------------------------------------------------------- +// wxTreeListModel: wxDataViewModel implementation used by wxTreeListCtrl. +// ---------------------------------------------------------------------------- + +class wxTreeListModel : public wxDataViewModel +{ +public: + typedef wxTreeListModelNode Node; + + // Unlike a general wxDataViewModel, this model can only be used with a + // single control at once. The main reason for this is that we need to + // support different icons for opened and closed items and the item state + // is associated with the control, not the model, so our GetValue() is also + // bound to it (otherwise, what would it return for an item expanded in one + // associated control and collapsed in another one?). + wxTreeListModel(wxTreeListCtrl* treelist); + virtual ~wxTreeListModel(); + + + // Helpers for converting between wxDataViewItem and wxTreeListItem. These + // methods simply cast the pointer to/from wxDataViewItem except for the + // root node that we handle specially unless explicitly disabled. + // + // The advantage of using them is that they're greppable and stand out + // better, hopefully making the code more clear. + Node* FromNonRootDVI(wxDataViewItem dvi) const + { + return static_cast(dvi.GetID()); + } + + Node* FromDVI(wxDataViewItem dvi) const + { + if ( !dvi.IsOk() ) + return m_root; + + return FromNonRootDVI(dvi); + } + + wxDataViewItem ToNonRootDVI(Node* node) const + { + return wxDataViewItem(node); + } + + wxDataViewItem ToDVI(Node* node) const + { + // Our root item must be represented as NULL at wxDVC level to map to + // its own invisible root. + if ( !node->GetParent() ) + return wxDataViewItem(); + + return ToNonRootDVI(node); + } + + + // Methods called by wxTreeListCtrl. + void InsertColumn(unsigned col); + void DeleteColumn(unsigned col); + void ClearColumns(); + + Node* InsertItem(Node* parent, + Node* previous, + const wxString& text, + int imageClosed, + int imageOpened, + wxClientData* data); + void DeleteItem(Node* item); + void DeleteAllItems(); + + Node* GetRootItem() const { return m_root; } + + const wxString& GetItemText(Node* item, unsigned col) const; + void SetItemText(Node* item, unsigned col, const wxString& text); + void SetItemImage(Node* item, int closed, int opened); + wxClientData* GetItemData(Node* item) const; + void SetItemData(Node* item, wxClientData* data); + + void CheckItem(Node* item, wxCheckBoxState checkedState); + void ToggleItem(wxDataViewItem item); + + + // Implement the base class pure virtual methods. + virtual unsigned GetColumnCount() const; + virtual wxString GetColumnType(unsigned col) const; + virtual void GetValue(wxVariant& variant, + const wxDataViewItem& item, + unsigned col) const; + virtual bool SetValue(const wxVariant& variant, + const wxDataViewItem& item, + unsigned col); + virtual wxDataViewItem GetParent(const wxDataViewItem& item) const; + virtual bool IsContainer(const wxDataViewItem& item) const; + virtual bool HasContainerColumns(const wxDataViewItem& item) const; + virtual unsigned GetChildren(const wxDataViewItem& item, + wxDataViewItemArray& children) const; + virtual bool IsListModel() const { return m_isFlat; } + virtual int Compare(const wxDataViewItem& item1, + const wxDataViewItem& item2, + unsigned col, + bool ascending) const; + +private: + // The control we're associated with. + wxTreeListCtrl* const m_treelist; + + // The unique invisible root element. + Node* const m_root; + + // Number of columns we maintain. + unsigned m_numColumns; + + // Set to false as soon as we have more than one level, i.e. as soon as any + // items with non-root item as parent are added (and currently never reset + // after this). + bool m_isFlat; +}; + +// ============================================================================ +// wxDataViewCheckIconText[Renderer]: special renderer for our first column. +// ============================================================================ + +// Currently this class is private but it could be extracted and made part of +// public API later as could be used directly with wxDataViewCtrl as well. +namespace +{ + +const char* CHECK_ICON_TEXT_TYPE = "wxDataViewCheckIconText"; + +// The value used by wxDataViewCheckIconTextRenderer +class wxDataViewCheckIconText : public wxDataViewIconText +{ +public: + wxDataViewCheckIconText(const wxString& text = wxString(), + const wxIcon& icon = wxNullIcon, + wxCheckBoxState checkedState = wxCHK_UNDETERMINED) + : wxDataViewIconText(text, icon), + m_checkedState(checkedState) + { + } + + wxDataViewCheckIconText(const wxDataViewCheckIconText& other) + : wxDataViewIconText(other), + m_checkedState(other.m_checkedState) + { + } + + bool IsSameAs(const wxDataViewCheckIconText& other) const + { + return wxDataViewIconText::IsSameAs(other) && + m_checkedState == other.m_checkedState; + } + + // There is no encapsulation anyhow, so just expose this field directly. + wxCheckBoxState m_checkedState; + + +private: + wxDECLARE_DYNAMIC_CLASS(wxDataViewCheckIconText); +}; + +wxIMPLEMENT_DYNAMIC_CLASS(wxDataViewCheckIconText, wxDataViewIconText); + +DECLARE_VARIANT_OBJECT(wxDataViewCheckIconText) +IMPLEMENT_VARIANT_OBJECT(wxDataViewCheckIconText) + + +class wxDataViewCheckIconTextRenderer : public wxDataViewCustomRenderer +{ +public: + wxDataViewCheckIconTextRenderer() + : wxDataViewCustomRenderer(CHECK_ICON_TEXT_TYPE, + wxDATAVIEW_CELL_ACTIVATABLE) + { + } + + virtual bool SetValue(const wxVariant& value) + { + m_value << value; + return true; + } + + virtual bool GetValue(wxVariant& WXUNUSED(value)) const + { + return false; + } + + wxSize GetSize() const + { + wxSize size = GetCheckSize(); + size.x += MARGIN_CHECK_ICON; + + if ( m_value.GetIcon().IsOk() ) + { + const wxSize sizeIcon = m_value.GetIcon().GetSize(); + if ( sizeIcon.y > size.y ) + size.y = sizeIcon.y; + + size.x += sizeIcon.x + MARGIN_ICON_TEXT; + } + + wxString text = m_value.GetText(); + if ( text.empty() ) + text = "Dummy"; + + const wxSize sizeText = GetTextExtent(text); + if ( sizeText.y > size.y ) + size.y = sizeText.y; + + size.x += sizeText.x; + + return size; + } + + virtual bool Render(wxRect cell, wxDC* dc, int state) + { + // Draw the checkbox first. + int renderFlags = 0; + switch ( m_value.m_checkedState ) + { + case wxCHK_UNCHECKED: + break; + + case wxCHK_CHECKED: + renderFlags |= wxCONTROL_CHECKED; + break; + + case wxCHK_UNDETERMINED: + renderFlags |= wxCONTROL_UNDETERMINED; + break; + } + + if ( state & wxDATAVIEW_CELL_PRELIT ) + renderFlags |= wxCONTROL_CURRENT; + + const wxSize sizeCheck = GetCheckSize(); + + wxRect rectCheck(cell.GetPosition(), sizeCheck); + rectCheck = rectCheck.CentreIn(cell, wxVERTICAL); + + wxRendererNative::Get().DrawCheckBox + ( + GetView(), *dc, rectCheck, renderFlags + ); + + // Then the icon, if any. + int xoffset = sizeCheck.x + MARGIN_CHECK_ICON; + + const wxIcon& icon = m_value.GetIcon(); + if ( icon.IsOk() ) + { + const wxSize sizeIcon = icon.GetSize(); + wxRect rectIcon(cell.GetPosition(), sizeIcon); + rectIcon.x += xoffset; + rectIcon = rectIcon.CentreIn(cell, wxVERTICAL); + + dc->DrawIcon(icon, rectIcon.GetPosition()); + + xoffset += sizeIcon.x + MARGIN_ICON_TEXT; + } + + // Finally the text. + RenderText(m_value.GetText(), xoffset, cell, dc, state); + + return true; + } + + // Event handlers toggling the items checkbox if it was clicked. + virtual bool ActivateCell(const wxRect& WXUNUSED(cell), + wxDataViewModel *model, + const wxDataViewItem & item, + unsigned int WXUNUSED(col), + const wxMouseEvent *mouseEvent) + { + if ( mouseEvent ) + { + if ( !wxRect(GetCheckSize()).Contains(mouseEvent->GetPosition()) ) + return false; + } + + static_cast(model)->ToggleItem(item); + return true; + } + +protected: + wxSize GetCheckSize() const + { + return wxRendererNative::Get().GetCheckBoxSize(GetView()); + } + +private: + // Just some arbitrary constants defining margins, in pixels. + enum + { + MARGIN_CHECK_ICON = 3, + MARGIN_ICON_TEXT = 4 + }; + + wxDataViewCheckIconText m_value; +}; + +} // anonymous namespace + +// ============================================================================ +// wxTreeListModel implementation +// ============================================================================ + +wxTreeListModel::wxTreeListModel(wxTreeListCtrl* treelist) + : m_treelist(treelist), + m_root(new Node(NULL)) +{ + m_numColumns = 0; + m_isFlat = true; +} + +wxTreeListModel::~wxTreeListModel() +{ + delete m_root; +} + +void wxTreeListModel::InsertColumn(unsigned col) +{ + m_numColumns++; + + // There is no need to update anything when inserting the first column. + if ( m_numColumns == 1 ) + return; + + // Update all the items as they may have texts for the old columns. + for ( Node* node = m_root->GetChild(); node; node = node->NextInTree() ) + { + node->OnInsertColumn(col, m_numColumns); + } +} + +void wxTreeListModel::DeleteColumn(unsigned col) +{ + wxCHECK_RET( col < m_numColumns, "Invalid column index" ); + + // Update all the items to remove the text for the non first columns. + if ( col > 0 ) + { + for ( Node* node = m_root->GetChild(); node; node = node->NextInTree() ) + { + node->OnDeleteColumn(col, m_numColumns); + } + } + + m_numColumns--; +} + +void wxTreeListModel::ClearColumns() +{ + m_numColumns = 0; + + for ( Node* node = m_root->GetChild(); node; node = node->NextInTree() ) + { + node->OnClearColumns(); + } +} + +wxTreeListModelNode* +wxTreeListModel::InsertItem(Node* parent, + Node* previous, + const wxString& text, + int imageClosed, + int imageOpened, + wxClientData* data) +{ + wxCHECK_MSG( parent, NULL, + "Must have a valid parent (maybe GetRootItem()?)" ); + + wxCHECK_MSG( previous, NULL, + "Must have a valid previous item (maybe wxTLI_FIRST/LAST?)" ); + + if ( m_isFlat && parent != m_root ) + { + // Not flat any more, this is a second level child. + m_isFlat = false; + } + + wxScopedPtr + newItem(new Node(parent, text, imageClosed, imageOpened, data)); + + // FIXME-VC6: This compiler refuses to compare "Node* previous" with + // wxTLI_XXX without some help. + const wxTreeListItem previousItem(previous); + + // If we have no children at all, then inserting as last child is the same + // as inserting as the first one so check for it here too. + if ( previousItem == wxTLI_FIRST || + (previousItem == wxTLI_LAST && !parent->GetChild()) ) + { + parent->InsertChild(newItem.get()); + } + else // Not the first item, find the previous one. + { + if ( previousItem == wxTLI_LAST ) + { + previous = parent->GetChild(); + + // Find the last child. + for ( ;; ) + { + Node* const next = previous->GetNext(); + if ( !next ) + break; + + previous = next; + } + } + else // We already have the previous item. + { + // Just check it's under the correct parent. + wxCHECK_MSG( previous->GetParent() == parent, NULL, + "Previous item is not under the right parent" ); + } + + previous->InsertNext(newItem.get()); + } + + ItemAdded(ToDVI(parent), ToDVI(newItem.get())); + + // The item was successfully inserted in the tree and so will be deleted by + // it, we can detach it now. + return newItem.release(); +} + +void wxTreeListModel::DeleteItem(Node* item) +{ + wxCHECK_RET( item, "Invalid item" ); + + wxCHECK_RET( item != m_root, "Can't delete the root item" ); + + Node* const parent = item->GetParent(); + + Node* previous = parent->GetChild(); + if ( previous == item ) + { + parent->DeleteChild(); + } + else // Not the first child of its parent. + { + // Find the sibling just before it. + for ( ;; ) + { + Node* const next = previous->GetNext(); + if ( next == item ) + break; + + wxCHECK_RET( next, "Item not a child of its parent?" ); + + previous = next; + } + + previous->DeleteNext(); + } + + ItemDeleted(ToDVI(parent), ToDVI(item)); +} + +void wxTreeListModel::DeleteAllItems() +{ + while ( m_root->GetChild() ) + { + m_root->DeleteChild(); + } + + Cleared(); +} + +const wxString& wxTreeListModel::GetItemText(Node* item, unsigned col) const +{ + // Returning root item text here is bogus, it just happens to be an always + // empty string we can return reference to. + wxCHECK_MSG( item, m_root->m_text, "Invalid item" ); + + // Notice that asking for the text of a column of an item that doesn't have + // any column texts is not an error so we simply return an empty string in + // this case. + return col == 0 ? item->m_text + : item->HasColumnsTexts() ? item->GetColumnText(col) + : m_root->m_text; +} + +void wxTreeListModel::SetItemText(Node* item, unsigned col, const wxString& text) +{ + wxCHECK_RET( item, "Invalid item" ); + + if ( col == 0 ) + item->m_text = text; + else + item->SetColumnText(text, col, m_numColumns); + + ValueChanged(ToDVI(item), col); +} + +void wxTreeListModel::SetItemImage(Node* item, int closed, int opened) +{ + wxCHECK_RET( item, "Invalid item" ); + + item->m_imageClosed = closed; + item->m_imageOpened = opened; + + ValueChanged(ToDVI(item), 0); +} + +wxClientData* wxTreeListModel::GetItemData(Node* item) const +{ + wxCHECK_MSG( item, NULL, "Invalid item" ); + + return item->GetClientData(); +} + +void wxTreeListModel::SetItemData(Node* item, wxClientData* data) +{ + wxCHECK_RET( item, "Invalid item" ); + + item->SetClientData(data); +} + +void wxTreeListModel::CheckItem(Node* item, wxCheckBoxState checkedState) +{ + wxCHECK_RET( item, "Invalid item" ); + + item->m_checkedState = checkedState; + + ItemChanged(ToDVI(item)); +} + +void wxTreeListModel::ToggleItem(wxDataViewItem dvi) +{ + Node* const item = FromDVI(dvi); + + wxCHECK_RET( item, "Invalid item" ); + + const wxCheckBoxState stateOld = item->m_checkedState; + + // If the 3rd state is user-settable then the cycle is + // unchecked->checked->undetermined. + switch ( stateOld ) + { + case wxCHK_CHECKED: + item->m_checkedState = m_treelist->HasFlag(wxTL_USER_3STATE) + ? wxCHK_UNDETERMINED + : wxCHK_UNCHECKED; + break; + + case wxCHK_UNDETERMINED: + // Whether 3rd state is user-settable or not, the next state is + // unchecked. + item->m_checkedState = wxCHK_UNCHECKED; + break; + + case wxCHK_UNCHECKED: + item->m_checkedState = wxCHK_CHECKED; + break; + } + + ItemChanged(ToDVI(item)); + + m_treelist->OnItemToggled(item, stateOld); +} + +unsigned wxTreeListModel::GetColumnCount() const +{ + return m_numColumns; +} + +wxString wxTreeListModel::GetColumnType(unsigned col) const +{ + if ( col == 0 ) + { + return m_treelist->HasFlag(wxTL_CHECKBOX) + ? wxS("wxDataViewCheckIconText") + : wxS("wxDataViewIconText"); + } + else // All the other columns contain just text. + { + return wxS("string"); + } +} + +void +wxTreeListModel::GetValue(wxVariant& variant, + const wxDataViewItem& item, + unsigned col) const +{ + Node* const node = FromDVI(item); + + if ( col == 0 ) + { + // Determine the correct image to use depending on the item state. + int image = wxWithImages::NO_IMAGE; + if ( m_treelist->IsExpanded(node) ) + image = node->m_imageOpened; + + if ( image == wxWithImages::NO_IMAGE ) + image = node->m_imageClosed; + + wxIcon icon = m_treelist->GetImage(image); + + if ( m_treelist->HasFlag(wxTL_CHECKBOX) ) + variant << wxDataViewCheckIconText(node->m_text, icon, + node->m_checkedState); + else + variant << wxDataViewIconText(node->m_text, icon); + } + else + { + // Notice that we must still assign wxString to wxVariant to ensure + // that it at least has the correct type. + wxString text; + if ( node->HasColumnsTexts() ) + text = node->GetColumnText(col); + + variant = text; + } +} + +bool +wxTreeListModel::SetValue(const wxVariant& WXUNUSED(variant), + const wxDataViewItem& WXUNUSED(item), + unsigned WXUNUSED(col)) +{ + // We are not editable currently. + return false; +} + +wxDataViewItem wxTreeListModel::GetParent(const wxDataViewItem& item) const +{ + Node* const node = FromDVI(item); + + return ToDVI(node->GetParent()); +} + +bool wxTreeListModel::IsContainer(const wxDataViewItem& item) const +{ + // FIXME: In the generic (and native OS X) versions we implement this + // method normally, i.e. only items with children are containers. + // But for the native GTK version we must pretend that all items are + // containers because otherwise adding children to them later would + // fail because wxGTK code calls IsContainer() too early (when + // adding the item itself) and we can't know whether we're container + // or not by then. Luckily, always returning true doesn't have any + // serious drawbacks for us. +#ifdef __WXGTK__ + wxUnusedVar(item); + + return true; +#else + Node* const node = FromDVI(item); + + return node->GetChild() != NULL; +#endif +} + +bool +wxTreeListModel::HasContainerColumns(const wxDataViewItem& WXUNUSED(item)) const +{ + return true; +} + +unsigned +wxTreeListModel::GetChildren(const wxDataViewItem& item, + wxDataViewItemArray& children) const +{ + Node* const node = FromDVI(item); + + unsigned numChildren = 0; + for ( Node* child = node->GetChild(); child; child = child->GetNext() ) + { + children.push_back(ToDVI(child)); + numChildren++; + } + + return numChildren; +} + +int +wxTreeListModel::Compare(const wxDataViewItem& item1, + const wxDataViewItem& item2, + unsigned col, + bool ascending) const +{ + // Compare using default alphabetical order if no custom comparator. + wxTreeListItemComparator* const comp = m_treelist->m_comparator; + if ( !comp ) + return wxDataViewModel::Compare(item1, item2, col, ascending); + + // Forward comparison to the comparator: + int result = comp->Compare(m_treelist, col, FromDVI(item1), FromDVI(item2)); + + // And adjust by the sort order if necessary. + if ( !ascending ) + result = -result; + + return result; +} + +// ============================================================================ +// wxTreeListCtrl implementation +// ============================================================================ + +BEGIN_EVENT_TABLE(wxTreeListCtrl, wxWindow) + EVT_DATAVIEW_SELECTION_CHANGED(wxID_ANY, wxTreeListCtrl::OnSelectionChanged) + EVT_DATAVIEW_ITEM_EXPANDING(wxID_ANY, wxTreeListCtrl::OnItemExpanding) + EVT_DATAVIEW_ITEM_EXPANDED(wxID_ANY, wxTreeListCtrl::OnItemExpanded) + EVT_DATAVIEW_ITEM_ACTIVATED(wxID_ANY, wxTreeListCtrl::OnItemActivated) + EVT_DATAVIEW_ITEM_CONTEXT_MENU(wxID_ANY, wxTreeListCtrl::OnItemContextMenu) + EVT_DATAVIEW_COLUMN_SORTED(wxID_ANY, wxTreeListCtrl::OnColumnSorted) + + EVT_SIZE(wxTreeListCtrl::OnSize) +END_EVENT_TABLE() + +// ---------------------------------------------------------------------------- +// Creation +// ---------------------------------------------------------------------------- + +void wxTreeListCtrl::Init() +{ + m_view = NULL; + m_model = NULL; + m_comparator = NULL; +} + +bool wxTreeListCtrl::Create(wxWindow* parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if ( style & wxTL_USER_3STATE ) + style |= wxTL_3STATE; + + if ( style & wxTL_3STATE ) + style |= wxTL_CHECKBOX; + + // Create the window itself and wxDataViewCtrl used by it. + if ( !wxWindow::Create(parent, id, + pos, size, + style, name) ) + { + return false; + } + + m_view = new wxDataViewCtrl; + long styleDataView = HasFlag(wxTL_MULTIPLE) ? wxDV_MULTIPLE + : wxDV_SINGLE; + if ( HasFlag(wxTL_NO_HEADER) ) + styleDataView |= wxDV_NO_HEADER; + + if ( !m_view->Create(this, wxID_ANY, + wxPoint(0, 0), GetClientSize(), + styleDataView) ) + { + delete m_view; + m_view = NULL; + + return false; + } + + + // Set up the model for wxDataViewCtrl. + m_model = new wxTreeListModel(this); + m_view->AssociateModel(m_model); + + return true; +} + +wxTreeListCtrl::~wxTreeListCtrl() +{ + if ( m_model ) + m_model->DecRef(); +} + +wxWindowList wxTreeListCtrl::GetCompositeWindowParts() const +{ + wxWindowList parts; + parts.push_back(m_view); + return parts; +} + +// ---------------------------------------------------------------------------- +// Columns +// ---------------------------------------------------------------------------- + +int +wxTreeListCtrl::DoInsertColumn(const wxString& title, + int pos, + int width, + wxAlignment align, + int flags) +{ + wxCHECK_MSG( m_view, wxNOT_FOUND, "Must Create() first" ); + + const unsigned oldNumColumns = m_view->GetColumnCount(); + + if ( pos == wxNOT_FOUND ) + pos = oldNumColumns; + + wxDataViewRenderer* renderer; + if ( pos == 0 ) + { + // Inserting the first column which is special as it uses a different + // renderer. + + // Also, currently it can be done only once. + wxCHECK_MSG( !oldNumColumns, wxNOT_FOUND, + "Inserting column at position 0 currently not supported" ); + + if ( HasFlag(wxTL_CHECKBOX) ) + { + // Use our custom renderer to show the checkbox. + renderer = new wxDataViewCheckIconTextRenderer; + } + else // We still need a special renderer to show the icons. + { + renderer = new wxDataViewIconTextRenderer; + } + } + else // Not the first column. + { + // All the other ones use a simple text renderer. + renderer = new wxDataViewTextRenderer; + } + + wxDataViewColumn* + column = new wxDataViewColumn(title, renderer, pos, width, align, flags); + + m_model->InsertColumn(pos); + + m_view->InsertColumn(pos, column); + + return pos; +} + +unsigned wxTreeListCtrl::GetColumnCount() const +{ + return m_view ? m_view->GetColumnCount() : 0u; +} + +bool wxTreeListCtrl::DeleteColumn(unsigned col) +{ + wxCHECK_MSG( col < GetColumnCount(), false, "Invalid column index" ); + + if ( !m_view->DeleteColumn(m_view->GetColumn(col)) ) + return false; + + m_model->DeleteColumn(col); + + return true; +} + +void wxTreeListCtrl::ClearColumns() +{ + // Don't assert here, clearing columns of the control before it's created + // can be considered valid (just useless). + if ( !m_model ) + return; + + m_view->ClearColumns(); + + m_model->ClearColumns(); +} + +void wxTreeListCtrl::SetColumnWidth(unsigned col, int width) +{ + wxCHECK_RET( col < GetColumnCount(), "Invalid column index" ); + + wxDataViewColumn* const column = m_view->GetColumn(col); + wxCHECK_RET( column, "No such column?" ); + + column->SetWidth(width); +} + +int wxTreeListCtrl::GetColumnWidth(unsigned col) const +{ + wxCHECK_MSG( col < GetColumnCount(), -1, "Invalid column index" ); + + wxDataViewColumn* column = m_view->GetColumn(col); + wxCHECK_MSG( column, -1, "No such column?" ); + + return column->GetWidth(); +} + +int wxTreeListCtrl::WidthFor(const wxString& text) const +{ + return GetTextExtent(text).x; +} + +// ---------------------------------------------------------------------------- +// Items +// ---------------------------------------------------------------------------- + +wxTreeListItem +wxTreeListCtrl::DoInsertItem(wxTreeListItem parent, + wxTreeListItem previous, + const wxString& text, + int imageClosed, + int imageOpened, + wxClientData* data) +{ + wxCHECK_MSG( m_model, wxTreeListItem(), "Must create first" ); + + return wxTreeListItem(m_model->InsertItem(parent, previous, text, + imageClosed, imageOpened, data)); +} + +void wxTreeListCtrl::DeleteItem(wxTreeListItem item) +{ + wxCHECK_RET( m_model, "Must create first" ); + + m_model->DeleteItem(item); +} + +void wxTreeListCtrl::DeleteAllItems() +{ + if ( m_model ) + m_model->DeleteAllItems(); +} + +// ---------------------------------------------------------------------------- +// Tree navigation +// ---------------------------------------------------------------------------- + +// The simple accessors in this section are implemented directly using +// wxTreeListModelNode methods, without passing by the model. This is just a +// shortcut and avoids us the trouble of defining more trivial methods in +// wxTreeListModel. + +wxTreeListItem wxTreeListCtrl::GetRootItem() const +{ + wxCHECK_MSG( m_model, wxTreeListItem(), "Must create first" ); + + return m_model->GetRootItem(); +} + +wxTreeListItem wxTreeListCtrl::GetItemParent(wxTreeListItem item) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeListItem(), "Invalid item" ); + + return item->GetParent(); +} + +wxTreeListItem wxTreeListCtrl::GetFirstChild(wxTreeListItem item) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeListItem(), "Invalid item" ); + + return item->GetChild(); +} + +wxTreeListItem +wxTreeListCtrl::GetNextSibling(wxTreeListItem item) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeListItem(), "Invalid item" ); + + return item->GetNext(); +} + +wxTreeListItem wxTreeListCtrl::GetNextItem(wxTreeListItem item) const +{ + wxCHECK_MSG( item.IsOk(), wxTreeListItem(), "Invalid item" ); + + return item->NextInTree(); +} + +// ---------------------------------------------------------------------------- +// Item attributes +// ---------------------------------------------------------------------------- + +const wxString& +wxTreeListCtrl::GetItemText(wxTreeListItem item, unsigned col) const +{ + // We can't use wxCHECK_MSG() here because we don't have any empty string + // reference to return so we use a static variable that exists just for the + // purpose of this check -- and so we put it in its own scope so that it's + // never even created during normal program execution. + if ( !m_model || col >= m_model->GetColumnCount() ) + { + static wxString s_empty; + + if ( !m_model ) + { + wxFAIL_MSG( "Must create first" ); + } + else if ( col >= m_model->GetColumnCount() ) + { + wxFAIL_MSG( "Invalid column index" ); + } + + return s_empty; + } + + return m_model->GetItemText(item, col); +} + +void +wxTreeListCtrl::SetItemText(wxTreeListItem item, + unsigned col, + const wxString& text) +{ + wxCHECK_RET( m_model, "Must create first" ); + wxCHECK_RET( col < m_model->GetColumnCount(), "Invalid column index" ); + + m_model->SetItemText(item, col, text); +} + +void wxTreeListCtrl::SetItemImage(wxTreeListItem item, int closed, int opened) +{ + wxCHECK_RET( m_model, "Must create first" ); + + if ( closed != NO_IMAGE || opened != NO_IMAGE ) + { + wxImageList* const imageList = GetImageList(); + wxCHECK_RET( imageList, "Can't set images without image list" ); + + const int imageCount = imageList->GetImageCount(); + + wxCHECK_RET( closed < imageCount, "Invalid image index" ); + wxCHECK_RET( opened < imageCount, "Invalid opened image index" ); + } + + m_model->SetItemImage(item, closed, opened); +} + +wxClientData* wxTreeListCtrl::GetItemData(wxTreeListItem item) const +{ + wxCHECK_MSG( m_model, NULL, "Must create first" ); + + return m_model->GetItemData(item); +} + +void wxTreeListCtrl::SetItemData(wxTreeListItem item, wxClientData* data) +{ + wxCHECK_RET( m_model, "Must create first" ); + + m_model->SetItemData(item, data); +} + +// ---------------------------------------------------------------------------- +// Expanding and collapsing +// ---------------------------------------------------------------------------- + +void wxTreeListCtrl::Expand(wxTreeListItem item) +{ + wxCHECK_RET( m_view, "Must create first" ); + + m_view->Expand(m_model->ToDVI(item)); +} + +void wxTreeListCtrl::Collapse(wxTreeListItem item) +{ + wxCHECK_RET( m_view, "Must create first" ); + + m_view->Collapse(m_model->ToDVI(item)); +} + +bool wxTreeListCtrl::IsExpanded(wxTreeListItem item) const +{ + wxCHECK_MSG( m_view, false, "Must create first" ); + + return m_view->IsExpanded(m_model->ToDVI(item)); +} + +// ---------------------------------------------------------------------------- +// Selection +// ---------------------------------------------------------------------------- + +wxTreeListItem wxTreeListCtrl::GetSelection() const +{ + wxCHECK_MSG( m_view, wxTreeListItem(), "Must create first" ); + + wxCHECK_MSG( !HasFlag(wxTL_MULTIPLE), wxTreeListItem(), + "Must use GetSelections() with multi-selection controls!" ); + + const wxDataViewItem dvi = m_view->GetSelection(); + + return m_model->FromNonRootDVI(dvi); +} + +unsigned wxTreeListCtrl::GetSelections(wxTreeListItems& selections) const +{ + wxCHECK_MSG( m_view, 0, "Must create first" ); + + wxDataViewItemArray selectionsDV; + const unsigned numSelected = m_view->GetSelections(selectionsDV); + selections.resize(numSelected); + for ( unsigned n = 0; n < numSelected; n++ ) + selections[n] = m_model->FromNonRootDVI(selectionsDV[n]); + + return numSelected; +} + +void wxTreeListCtrl::Select(wxTreeListItem item) +{ + wxCHECK_RET( m_view, "Must create first" ); + + m_view->Select(m_model->ToNonRootDVI(item)); +} + +void wxTreeListCtrl::Unselect(wxTreeListItem item) +{ + wxCHECK_RET( m_view, "Must create first" ); + + m_view->Unselect(m_model->ToNonRootDVI(item)); +} + +bool wxTreeListCtrl::IsSelected(wxTreeListItem item) const +{ + wxCHECK_MSG( m_view, false, "Must create first" ); + + return m_view->IsSelected(m_model->ToNonRootDVI(item)); +} + +void wxTreeListCtrl::SelectAll() +{ + wxCHECK_RET( m_view, "Must create first" ); + + m_view->SelectAll(); +} + +void wxTreeListCtrl::UnselectAll() +{ + wxCHECK_RET( m_view, "Must create first" ); + + m_view->UnselectAll(); +} + +// ---------------------------------------------------------------------------- +// Checkbox handling +// ---------------------------------------------------------------------------- + +void wxTreeListCtrl::CheckItem(wxTreeListItem item, wxCheckBoxState state) +{ + wxCHECK_RET( m_model, "Must create first" ); + + m_model->CheckItem(item, state); +} + +void +wxTreeListCtrl::CheckItemRecursively(wxTreeListItem item, wxCheckBoxState state) +{ + wxCHECK_RET( m_model, "Must create first" ); + + m_model->CheckItem(item, state); + + for ( wxTreeListItem child = GetFirstChild(item); + child.IsOk(); + child = GetNextSibling(child) ) + { + CheckItemRecursively(child, state); + } +} + +void wxTreeListCtrl::UpdateItemParentStateRecursively(wxTreeListItem item) +{ + wxCHECK_RET( item.IsOk(), "Invalid item" ); + + wxASSERT_MSG( HasFlag(wxTL_3STATE), "Can only be used with wxTL_3STATE" ); + + for ( ;; ) + { + wxTreeListItem parent = GetItemParent(item); + if ( parent == GetRootItem() ) + { + // There is no checked state associated with the root item. + return; + } + + // Set parent state to the state of this item if all the other children + // have the same state too. Otherwise make it indeterminate. + const wxCheckBoxState stateItem = GetCheckedState(item); + CheckItem(parent, AreAllChildrenInState(parent, stateItem) + ? stateItem + : wxCHK_UNDETERMINED); + + // And do the same thing with the parent's parent too. + item = parent; + } +} + +wxCheckBoxState wxTreeListCtrl::GetCheckedState(wxTreeListItem item) const +{ + wxCHECK_MSG( item.IsOk(), wxCHK_UNDETERMINED, "Invalid item" ); + + return item->m_checkedState; +} + +bool +wxTreeListCtrl::AreAllChildrenInState(wxTreeListItem item, + wxCheckBoxState state) const +{ + wxCHECK_MSG( item.IsOk(), false, "Invalid item" ); + + for ( wxTreeListItem child = GetFirstChild(item); + child.IsOk(); + child = GetNextSibling(child) ) + { + if ( GetCheckedState(child) != state ) + return false; + } + + return true; +} + +// ---------------------------------------------------------------------------- +// Sorting +// ---------------------------------------------------------------------------- + +void wxTreeListCtrl::SetSortColumn(unsigned col, bool ascendingOrder) +{ + wxCHECK_RET( col < m_view->GetColumnCount(), "Invalid column index" ); + + m_view->GetColumn(col)->SetSortOrder(ascendingOrder); +} + +bool wxTreeListCtrl::GetSortColumn(unsigned* col, bool* ascendingOrder) +{ + const unsigned numColumns = m_view->GetColumnCount(); + for ( unsigned n = 0; n < numColumns; n++ ) + { + wxDataViewColumn* const column = m_view->GetColumn(n); + if ( column->IsSortKey() ) + { + if ( col ) + *col = n; + + if ( ascendingOrder ) + *ascendingOrder = column->IsSortOrderAscending(); + + return true; + } + } + + return false; +} + +void wxTreeListCtrl::SetItemComparator(wxTreeListItemComparator* comparator) +{ + m_comparator = comparator; +} + +// ---------------------------------------------------------------------------- +// Events +// ---------------------------------------------------------------------------- + +void wxTreeListCtrl::SendItemEvent(wxEventType evt, wxDataViewEvent& eventDV) +{ + wxTreeListEvent eventTL(evt, this, m_model->FromDVI(eventDV.GetItem())); + + if ( !ProcessWindowEvent(eventTL) ) + { + eventDV.Skip(); + return; + } + + if ( !eventTL.IsAllowed() ) + { + eventDV.Veto(); + } +} + +void wxTreeListCtrl::SendColumnEvent(wxEventType evt, wxDataViewEvent& eventDV) +{ + wxTreeListEvent eventTL(evt, this, wxTreeListItem()); + eventTL.SetColumn(eventDV.GetColumn()); + + if ( !ProcessWindowEvent(eventTL) ) + { + eventDV.Skip(); + return; + } + + if ( !eventTL.IsAllowed() ) + { + eventDV.Veto(); + } +} + +void +wxTreeListCtrl::OnItemToggled(wxTreeListItem item, wxCheckBoxState stateOld) +{ + wxTreeListEvent event(wxEVT_TREELIST_ITEM_CHECKED, this, item); + event.SetOldCheckedState(stateOld); + + ProcessWindowEvent(event); +} + +void wxTreeListCtrl::OnSelectionChanged(wxDataViewEvent& event) +{ + SendItemEvent(wxEVT_TREELIST_SELECTION_CHANGED, event); +} + +void wxTreeListCtrl::OnItemExpanding(wxDataViewEvent& event) +{ + SendItemEvent(wxEVT_TREELIST_ITEM_EXPANDING, event); +} + +void wxTreeListCtrl::OnItemExpanded(wxDataViewEvent& event) +{ + SendItemEvent(wxEVT_TREELIST_ITEM_EXPANDED, event); +} + +void wxTreeListCtrl::OnItemActivated(wxDataViewEvent& event) +{ + SendItemEvent(wxEVT_TREELIST_ITEM_ACTIVATED, event); +} + +void wxTreeListCtrl::OnItemContextMenu(wxDataViewEvent& event) +{ + SendItemEvent(wxEVT_TREELIST_ITEM_CONTEXT_MENU, event); +} + +void wxTreeListCtrl::OnColumnSorted(wxDataViewEvent& event) +{ + SendColumnEvent(wxEVT_TREELIST_COLUMN_SORTED, event); +} + +// ---------------------------------------------------------------------------- +// Geometry +// ---------------------------------------------------------------------------- + +void wxTreeListCtrl::OnSize(wxSizeEvent& event) +{ + event.Skip(); + + if ( m_view ) + { + // Resize the real control to cover our entire client area. + const wxRect rect = GetClientRect(); + m_view->SetSize(rect); + +#ifdef wxHAS_GENERIC_DATAVIEWCTRL + // The generic implementation doesn't refresh itself immediately which + // is annoying during "live resizing", so do it forcefully here to + // ensure that the items are re-laid out and the focus rectangle is + // redrawn correctly (instead of leaving traces) while our size is + // being changed. + wxWindow* const view = GetView(); + view->Refresh(); + view->Update(); +#endif // wxHAS_GENERIC_DATAVIEWCTRL + + // Resize the first column to take the remaining available space. + const unsigned numColumns = GetColumnCount(); + if ( !numColumns ) + return; + + // There is a bug in generic wxDataViewCtrl: if the column width sums + // up to the total size, horizontal scrollbar (unnecessarily) appears, + // so subtract a bit to ensure this doesn't happen. + int remainingWidth = rect.width - 5; + for ( unsigned n = 1; n < GetColumnCount(); n++ ) + { + remainingWidth -= GetColumnWidth(n); + if ( remainingWidth <= 0 ) + { + // There is not enough space, as we're not going to give the + // first column negative width anyhow, just don't do anything. + return; + } + } + + SetColumnWidth(0, remainingWidth); + } +} + +wxWindow* wxTreeListCtrl::GetView() const +{ +#ifdef wxHAS_GENERIC_DATAVIEWCTRL + return m_view->GetMainWindow(); +#else + return m_view; +#endif +} + +// ============================================================================ +// wxTreeListEvent implementation +// ============================================================================ + +wxIMPLEMENT_DYNAMIC_CLASS(wxTreeListEvent, wxNotifyEvent) + +#define wxDEFINE_TREELIST_EVENT(name) \ + wxDEFINE_EVENT(wxEVT_TREELIST_##name, wxTreeListEvent) + +wxDEFINE_TREELIST_EVENT(SELECTION_CHANGED); +wxDEFINE_TREELIST_EVENT(ITEM_EXPANDING); +wxDEFINE_TREELIST_EVENT(ITEM_EXPANDED); +wxDEFINE_TREELIST_EVENT(ITEM_CHECKED); +wxDEFINE_TREELIST_EVENT(ITEM_ACTIVATED); +wxDEFINE_TREELIST_EVENT(ITEM_CONTEXT_MENU); +wxDEFINE_TREELIST_EVENT(COLUMN_SORTED); + +#undef wxDEFINE_TREELIST_EVENT + +#endif // wxUSE_TREELISTCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/vlbox.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/vlbox.cpp new file mode 100644 index 0000000000..e277070b3d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/vlbox.cpp @@ -0,0 +1,746 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/vlbox.cpp +// Purpose: implementation of wxVListBox +// Author: Vadim Zeitlin +// Modified by: +// Created: 31.05.03 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_LISTBOX + +#include "wx/vlbox.h" + +#ifndef WX_PRECOMP + #include "wx/settings.h" + #include "wx/dcclient.h" + #include "wx/listbox.h" +#endif //WX_PRECOMP + +#include "wx/dcbuffer.h" +#include "wx/selstore.h" +#include "wx/renderer.h" + +// ---------------------------------------------------------------------------- +// event tables +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxVListBox, wxVScrolledWindow) + EVT_PAINT(wxVListBox::OnPaint) + + EVT_KEY_DOWN(wxVListBox::OnKeyDown) + EVT_LEFT_DOWN(wxVListBox::OnLeftDown) + EVT_LEFT_DCLICK(wxVListBox::OnLeftDClick) + + EVT_SET_FOCUS(wxVListBox::OnSetOrKillFocus) + EVT_KILL_FOCUS(wxVListBox::OnSetOrKillFocus) + + EVT_SIZE(wxVListBox::OnSize) +END_EVENT_TABLE() + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_ABSTRACT_CLASS(wxVListBox, wxVScrolledWindow) +const char wxVListBoxNameStr[] = "wxVListBox"; + +// ---------------------------------------------------------------------------- +// wxVListBox creation +// ---------------------------------------------------------------------------- + +void wxVListBox::Init() +{ + m_current = + m_anchor = wxNOT_FOUND; + m_selStore = NULL; +} + +bool wxVListBox::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ +#ifdef __WXMSW__ + if ( (style & wxBORDER_MASK) == wxDEFAULT ) + style |= wxBORDER_THEME; +#endif + + style |= wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE; + if ( !wxVScrolledWindow::Create(parent, id, pos, size, style, name) ) + return false; + + if ( style & wxLB_MULTIPLE ) + m_selStore = new wxSelectionStore; + + // make sure the native widget has the right colour since we do + // transparent drawing by default + SetBackgroundColour(GetBackgroundColour()); + + // leave m_colBgSel in an invalid state: it means for OnDrawBackground() + // to use wxRendererNative instead of painting selection bg ourselves + m_colBgSel = wxNullColour; + + // flicker-free drawing requires this + SetBackgroundStyle(wxBG_STYLE_CUSTOM); + + return true; +} + +wxVListBox::~wxVListBox() +{ + delete m_selStore; +} + +void wxVListBox::SetItemCount(size_t count) +{ + // don't leave the current index invalid + if ( m_current != wxNOT_FOUND && (size_t)m_current >= count ) + m_current = count - 1; // also ok when count == 0 as wxNOT_FOUND == -1 + + if ( m_selStore ) + { + // tell the selection store that our number of items has changed + m_selStore->SetItemCount(count); + } + + SetRowCount(count); +} + +// ---------------------------------------------------------------------------- +// selection handling +// ---------------------------------------------------------------------------- + +bool wxVListBox::IsSelected(size_t line) const +{ + return m_selStore ? m_selStore->IsSelected(line) : (int)line == m_current; +} + +bool wxVListBox::Select(size_t item, bool select) +{ + wxCHECK_MSG( m_selStore, false, + wxT("Select() may only be used with multiselection listbox") ); + + wxCHECK_MSG( item < GetItemCount(), false, + wxT("Select(): invalid item index") ); + + bool changed = m_selStore->SelectItem(item, select); + if ( changed ) + { + // selection really changed + RefreshRow(item); + } + + DoSetCurrent(item); + + return changed; +} + +bool wxVListBox::SelectRange(size_t from, size_t to) +{ + wxCHECK_MSG( m_selStore, false, + wxT("SelectRange() may only be used with multiselection listbox") ); + + // make sure items are in correct order + if ( from > to ) + { + size_t tmp = from; + from = to; + to = tmp; + } + + wxCHECK_MSG( to < GetItemCount(), false, + wxT("SelectRange(): invalid item index") ); + + wxArrayInt changed; + if ( !m_selStore->SelectRange(from, to, true, &changed) ) + { + // too many items have changed, we didn't record them in changed array + // so we have no choice but to refresh everything between from and to + RefreshRows(from, to); + } + else // we've got the indices of the changed items + { + const size_t count = changed.GetCount(); + if ( !count ) + { + // nothing changed + return false; + } + + // refresh just the lines which have really changed + for ( size_t n = 0; n < count; n++ ) + { + RefreshRow(changed[n]); + } + } + + // something changed + return true; +} + +bool wxVListBox::DoSelectAll(bool select) +{ + wxCHECK_MSG( m_selStore, false, + wxT("SelectAll may only be used with multiselection listbox") ); + + size_t count = GetItemCount(); + if ( count ) + { + wxArrayInt changed; + if ( !m_selStore->SelectRange(0, count - 1, select) || + !changed.IsEmpty() ) + { + Refresh(); + + // something changed + return true; + } + } + + return false; +} + +bool wxVListBox::DoSetCurrent(int current) +{ + wxASSERT_MSG( current == wxNOT_FOUND || + (current >= 0 && (size_t)current < GetItemCount()), + wxT("wxVListBox::DoSetCurrent(): invalid item index") ); + + if ( current == m_current ) + { + // nothing to do + return false; + } + + if ( m_current != wxNOT_FOUND ) + RefreshRow(m_current); + + m_current = current; + + if ( m_current != wxNOT_FOUND ) + { + // if the line is not visible at all, we scroll it into view but we + // don't need to refresh it -- it will be redrawn anyhow + if ( !IsVisible(m_current) ) + { + ScrollToRow(m_current); + } + else // line is at least partly visible + { + // it is, indeed, only partly visible, so scroll it into view to + // make it entirely visible + // BUT scrolling down when m_current is first visible makes it + // completely hidden, so that is even worse + while ( (size_t)m_current + 1 == GetVisibleRowsEnd() && + (size_t)m_current != GetVisibleRowsBegin() && + ScrollToRow(GetVisibleBegin() + 1) ) ; + + // but in any case refresh it as even if it was only partly visible + // before we need to redraw it entirely as its background changed + RefreshRow(m_current); + } + } + + return true; +} + +void wxVListBox::InitEvent(wxCommandEvent& event, int n) +{ + event.SetEventObject(this); + event.SetInt(n); +} + +void wxVListBox::SendSelectedEvent() +{ + wxASSERT_MSG( m_current != wxNOT_FOUND, + wxT("SendSelectedEvent() shouldn't be called") ); + + wxCommandEvent event(wxEVT_LISTBOX, GetId()); + InitEvent(event, m_current); + (void)GetEventHandler()->ProcessEvent(event); +} + +void wxVListBox::SetSelection(int selection) +{ + wxCHECK_RET( selection == wxNOT_FOUND || + (selection >= 0 && (size_t)selection < GetItemCount()), + wxT("wxVListBox::SetSelection(): invalid item index") ); + + if ( HasMultipleSelection() ) + { + if (selection != wxNOT_FOUND) + Select(selection); + else + DeselectAll(); + m_anchor = selection; + } + + DoSetCurrent(selection); +} + +size_t wxVListBox::GetSelectedCount() const +{ + return m_selStore ? m_selStore->GetSelectedCount() + : m_current == wxNOT_FOUND ? 0 : 1; +} + +int wxVListBox::GetFirstSelected(unsigned long& cookie) const +{ + cookie = 0; + + return GetNextSelected(cookie); +} + +int wxVListBox::GetNextSelected(unsigned long& cookie) const +{ + wxCHECK_MSG( m_selStore, wxNOT_FOUND, + wxT("GetFirst/NextSelected() may only be used with multiselection listboxes") ); + + while ( cookie < GetItemCount() ) + { + if ( IsSelected(cookie++) ) + return cookie - 1; + } + + return wxNOT_FOUND; +} + +void wxVListBox::RefreshSelected() +{ + // only refresh those items which are currently visible and selected: + for ( size_t n = GetVisibleBegin(), end = GetVisibleEnd(); n < end; n++ ) + { + if ( IsSelected(n) ) + RefreshRow(n); + } +} + +wxRect wxVListBox::GetItemRect(size_t n) const +{ + wxRect itemrect; + + // check that this item is visible + const size_t lineMax = GetVisibleEnd(); + if ( n >= lineMax ) + return itemrect; + size_t line = GetVisibleBegin(); + if ( n < line ) + return itemrect; + + while ( line <= n ) + { + itemrect.y += itemrect.height; + itemrect.height = OnGetRowHeight(line); + + line++; + } + + itemrect.width = GetClientSize().x; + + return itemrect; +} + +// ---------------------------------------------------------------------------- +// wxVListBox appearance parameters +// ---------------------------------------------------------------------------- + +void wxVListBox::SetMargins(const wxPoint& pt) +{ + if ( pt != m_ptMargins ) + { + m_ptMargins = pt; + + Refresh(); + } +} + +void wxVListBox::SetSelectionBackground(const wxColour& col) +{ + m_colBgSel = col; +} + +// ---------------------------------------------------------------------------- +// wxVListBox painting +// ---------------------------------------------------------------------------- + +wxCoord wxVListBox::OnGetRowHeight(size_t line) const +{ + return OnMeasureItem(line) + 2*m_ptMargins.y; +} + +void wxVListBox::OnDrawSeparator(wxDC& WXUNUSED(dc), + wxRect& WXUNUSED(rect), + size_t WXUNUSED(n)) const +{ +} + +bool +wxVListBox::DoDrawSolidBackground(const wxColour& col, + wxDC& dc, + const wxRect& rect, + size_t n) const +{ + if ( !col.IsOk() ) + return false; + + // we need to render selected and current items differently + const bool isSelected = IsSelected(n), + isCurrent = IsCurrent(n); + if ( isSelected || isCurrent ) + { + if ( isSelected ) + { + dc.SetBrush(wxBrush(col, wxBRUSHSTYLE_SOLID)); + } + else // !selected + { + dc.SetBrush(*wxTRANSPARENT_BRUSH); + } + dc.SetPen(*(isCurrent ? wxBLACK_PEN : wxTRANSPARENT_PEN)); + dc.DrawRectangle(rect); + } + //else: do nothing for the normal items + + return true; +} + +void wxVListBox::OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const +{ + // use wxRendererNative for more native look unless we use custom bg colour + if ( !DoDrawSolidBackground(m_colBgSel, dc, rect, n) ) + { + int flags = 0; + if ( IsSelected(n) ) + flags |= wxCONTROL_SELECTED; + if ( IsCurrent(n) ) + flags |= wxCONTROL_CURRENT; + if ( wxWindow::FindFocus() == const_cast(this) ) + flags |= wxCONTROL_FOCUSED; + + wxRendererNative::Get().DrawItemSelectionRect( + const_cast(this), dc, rect, flags); + } +} + +void wxVListBox::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxSize clientSize = GetClientSize(); + + wxAutoBufferedPaintDC dc(this); + + // the update rectangle + wxRect rectUpdate = GetUpdateClientRect(); + + // fill it with background colour + dc.SetBackground(GetBackgroundColour()); + dc.Clear(); + + // the bounding rectangle of the current line + wxRect rectRow; + rectRow.width = clientSize.x; + + // iterate over all visible lines + const size_t lineMax = GetVisibleEnd(); + for ( size_t line = GetVisibleBegin(); line < lineMax; line++ ) + { + const wxCoord hRow = OnGetRowHeight(line); + + rectRow.height = hRow; + + // and draw the ones which intersect the update rect + if ( rectRow.Intersects(rectUpdate) ) + { + // don't allow drawing outside of the lines rectangle + wxDCClipper clip(dc, rectRow); + + wxRect rect = rectRow; + OnDrawBackground(dc, rect, line); + + OnDrawSeparator(dc, rect, line); + + rect.Deflate(m_ptMargins.x, m_ptMargins.y); + OnDrawItem(dc, rect, line); + } + else // no intersection + { + if ( rectRow.GetTop() > rectUpdate.GetBottom() ) + { + // we are already below the update rect, no need to continue + // further + break; + } + //else: the next line may intersect the update rect + } + + rectRow.y += hRow; + } +} + +void wxVListBox::OnSetOrKillFocus(wxFocusEvent& WXUNUSED(event)) +{ + // we need to repaint the selection when we get the focus since + // wxRendererNative in general draws the focused selection differently + // from the unfocused selection (see OnDrawItem): + RefreshSelected(); +} + +void wxVListBox::OnSize(wxSizeEvent& event) +{ + UpdateScrollbar(); + event.Skip(); +} + +// ============================================================================ +// wxVListBox keyboard/mouse handling +// ============================================================================ + +void wxVListBox::DoHandleItemClick(int item, int flags) +{ + // has anything worth telling the client code about happened? + bool notify = false; + + if ( HasMultipleSelection() ) + { + // select the iteem clicked? + bool select = true; + + // NB: the keyboard interface we implement here corresponds to + // wxLB_EXTENDED rather than wxLB_MULTIPLE but this one makes more + // sense IMHO + if ( flags & ItemClick_Shift ) + { + if ( m_current != wxNOT_FOUND ) + { + if ( m_anchor == wxNOT_FOUND ) + m_anchor = m_current; + + select = false; + + // only the range from the selection anchor to new m_current + // must be selected + if ( DeselectAll() ) + notify = true; + + if ( SelectRange(m_anchor, item) ) + notify = true; + } + //else: treat it as ordinary click/keypress + } + else // Shift not pressed + { + m_anchor = item; + + if ( flags & ItemClick_Ctrl ) + { + select = false; + + if ( !(flags & ItemClick_Kbd) ) + { + Toggle(item); + + // the status of the item has definitely changed + notify = true; + } + //else: Ctrl-arrow pressed, don't change selection + } + //else: behave as in single selection case + } + + if ( select ) + { + // make the clicked item the only selection + if ( DeselectAll() ) + notify = true; + + if ( Select(item) ) + notify = true; + } + } + + // in any case the item should become the current one + if ( DoSetCurrent(item) ) + { + if ( !HasMultipleSelection() ) + { + // this has also changed the selection for single selection case + notify = true; + } + } + + if ( notify ) + { + // notify the user about the selection change + SendSelectedEvent(); + } + //else: nothing changed at all +} + +// ---------------------------------------------------------------------------- +// keyboard handling +// ---------------------------------------------------------------------------- + +void wxVListBox::OnKeyDown(wxKeyEvent& event) +{ + // flags for DoHandleItemClick() + int flags = ItemClick_Kbd; + + int current; + switch ( event.GetKeyCode() ) + { + case WXK_HOME: + case WXK_NUMPAD_HOME: + current = 0; + break; + + case WXK_END: + case WXK_NUMPAD_END: + current = GetRowCount() - 1; + break; + + case WXK_DOWN: + case WXK_NUMPAD_DOWN: + if ( m_current == (int)GetRowCount() - 1 ) + return; + + current = m_current + 1; + break; + + case WXK_UP: + case WXK_NUMPAD_UP: + if ( m_current == wxNOT_FOUND ) + current = GetRowCount() - 1; + else if ( m_current != 0 ) + current = m_current - 1; + else // m_current == 0 + return; + break; + + case WXK_PAGEDOWN: + case WXK_NUMPAD_PAGEDOWN: + PageDown(); + current = GetVisibleBegin(); + break; + + case WXK_PAGEUP: + case WXK_NUMPAD_PAGEUP: + if ( m_current == (int)GetVisibleBegin() ) + { + PageUp(); + } + + current = GetVisibleBegin(); + break; + + case WXK_SPACE: + // hack: pressing space should work like a mouse click rather than + // like a keyboard arrow press, so trick DoHandleItemClick() in + // thinking we were clicked + flags &= ~ItemClick_Kbd; + current = m_current; + break; + +#ifdef __WXMSW__ + case WXK_TAB: + // Since we are using wxWANTS_CHARS we need to send navigation + // events for the tabs on MSW + HandleAsNavigationKey(event); + // fall through to default +#endif + default: + event.Skip(); + current = 0; // just to silent the stupid compiler warnings + wxUnusedVar(current); + return; + } + + if ( event.ShiftDown() ) + flags |= ItemClick_Shift; + if ( event.ControlDown() ) + flags |= ItemClick_Ctrl; + + DoHandleItemClick(current, flags); +} + +// ---------------------------------------------------------------------------- +// wxVListBox mouse handling +// ---------------------------------------------------------------------------- + +void wxVListBox::OnLeftDown(wxMouseEvent& event) +{ + SetFocus(); + + int item = VirtualHitTest(event.GetPosition().y); + + if ( item != wxNOT_FOUND ) + { + int flags = 0; + if ( event.ShiftDown() ) + flags |= ItemClick_Shift; + + // under Mac Apple-click is used in the same way as Ctrl-click + // elsewhere +#ifdef __WXMAC__ + if ( event.MetaDown() ) +#else + if ( event.ControlDown() ) +#endif + flags |= ItemClick_Ctrl; + + DoHandleItemClick(item, flags); + } +} + +void wxVListBox::OnLeftDClick(wxMouseEvent& eventMouse) +{ + int item = VirtualHitTest(eventMouse.GetPosition().y); + if ( item != wxNOT_FOUND ) + { + + // if item double-clicked was not yet selected, then treat + // this event as a left-click instead + if ( item == m_current ) + { + wxCommandEvent event(wxEVT_LISTBOX_DCLICK, GetId()); + InitEvent(event, item); + (void)GetEventHandler()->ProcessEvent(event); + } + else + { + OnLeftDown(eventMouse); + } + + } +} + + +// ---------------------------------------------------------------------------- +// use the same default attributes as wxListBox +// ---------------------------------------------------------------------------- + +//static +wxVisualAttributes +wxVListBox::GetClassDefaultAttributes(wxWindowVariant variant) +{ + return wxListBox::GetClassDefaultAttributes(variant); +} + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/vscroll.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/vscroll.cpp new file mode 100644 index 0000000000..10afddad01 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/vscroll.cpp @@ -0,0 +1,1057 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/vscroll.cpp +// Purpose: wxVScrolledWindow implementation +// Author: Vadim Zeitlin +// Modified by: Brad Anderson, David Warkentin +// Created: 30.05.03 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/dc.h" + #include "wx/sizer.h" +#endif + +#include "wx/vscroll.h" + +#include "wx/utils.h" // For wxMin/wxMax(). + +// ============================================================================ +// wxVarScrollHelperEvtHandler declaration +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxScrollHelperEvtHandler: intercept the events from the window and forward +// them to wxVarScrollHelperBase +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxVarScrollHelperEvtHandler : public wxEvtHandler +{ +public: + wxVarScrollHelperEvtHandler(wxVarScrollHelperBase *scrollHelper) + { + m_scrollHelper = scrollHelper; + } + + virtual bool ProcessEvent(wxEvent& event); + +private: + wxVarScrollHelperBase *m_scrollHelper; + + wxDECLARE_NO_COPY_CLASS(wxVarScrollHelperEvtHandler); +}; + +// ============================================================================ +// wxVarScrollHelperEvtHandler implementation +// ============================================================================ + +// FIXME: This method totally duplicates a method with the same name in +// wxScrollHelperEvtHandler, we really should merge them by reusing the +// common parts in wxAnyScrollHelperBase. +bool wxVarScrollHelperEvtHandler::ProcessEvent(wxEvent& event) +{ + wxEventType evType = event.GetEventType(); + + // Pass it on to the real handler: notice that we must not call + // ProcessEvent() on this object itself as it wouldn't pass it to the next + // handler (i.e. the real window) if we're called from a previous handler + // (as indicated by "process here only" flag being set) and we do want to + // execute the handler defined in the window we're associated with right + // now, without waiting until TryAfter() is called from wxEvtHandler. + bool processed = m_nextHandler->ProcessEvent(event); + + // always process the size events ourselves, even if the user code handles + // them as well, as we need to AdjustScrollbars() + // + // NB: it is important to do it after processing the event in the normal + // way as HandleOnSize() may generate a wxEVT_SIZE itself if the + // scrollbar[s] (dis)appear and it should be seen by the user code + // after this one + if ( evType == wxEVT_SIZE ) + { + m_scrollHelper->HandleOnSize((wxSizeEvent &)event); + return true; + } + + if ( processed && event.IsCommandEvent()) + return true; + + // For wxEVT_PAINT the user code can either handle this event as usual or + // override virtual OnDraw(), so if the event hasn't been handled we need + // to call this virtual function ourselves. + if ( +#ifndef __WXUNIVERSAL__ + // in wxUniversal "processed" will always be true, because + // all windows use the paint event to draw themselves. + // In this case we can't use this flag to determine if a custom + // paint event handler already drew our window and we just + // call OnDraw() anyway. + !processed && +#endif // !__WXUNIVERSAL__ + evType == wxEVT_PAINT ) + { + m_scrollHelper->HandleOnPaint((wxPaintEvent &)event); + return true; + } + + // reset the skipped flag (which might have been set to true in + // ProcessEvent() above) to be able to test it below + bool wasSkipped = event.GetSkipped(); + if ( wasSkipped ) + event.Skip(false); + + if ( evType == wxEVT_SCROLLWIN_TOP || + evType == wxEVT_SCROLLWIN_BOTTOM || + evType == wxEVT_SCROLLWIN_LINEUP || + evType == wxEVT_SCROLLWIN_LINEDOWN || + evType == wxEVT_SCROLLWIN_PAGEUP || + evType == wxEVT_SCROLLWIN_PAGEDOWN || + evType == wxEVT_SCROLLWIN_THUMBTRACK || + evType == wxEVT_SCROLLWIN_THUMBRELEASE ) + { + m_scrollHelper->HandleOnScroll((wxScrollWinEvent &)event); + if ( !event.GetSkipped() ) + { + // it makes sense to indicate that we processed the message as we + // did scroll the window (and also notice that wxAutoScrollTimer + // relies on our return value to stop scrolling when we are at top + // or bottom already) + processed = true; + wasSkipped = false; + } + } +#if wxUSE_MOUSEWHEEL + // Use GTK's own scroll wheel handling in GtkScrolledWindow +#ifndef __WXGTK20__ + else if ( evType == wxEVT_MOUSEWHEEL ) + { + m_scrollHelper->HandleOnMouseWheel((wxMouseEvent &)event); + return true; + } +#endif +#endif // wxUSE_MOUSEWHEEL + else if ( evType == wxEVT_CHAR && + (m_scrollHelper->GetOrientation() == wxVERTICAL) ) + { + m_scrollHelper->HandleOnChar((wxKeyEvent &)event); + if ( !event.GetSkipped() ) + { + processed = true; + wasSkipped = false; + } + } + + event.Skip(wasSkipped); + + // We called ProcessEvent() on the next handler, meaning that we explicitly + // worked around the request to process the event in this handler only. As + // explained above, this is unfortunately really necessary but the trouble + // is that the event will continue to be post-processed by the previous + // handler resulting in duplicate calls to event handlers. Call the special + // function below to prevent this from happening, base class DoTryChain() + // will check for it and behave accordingly. + // + // And if we're not called from DoTryChain(), this won't do anything anyhow. + event.DidntHonourProcessOnlyIn(); + + return processed; +} + + +// ============================================================================ +// wxVarScrollHelperBase implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxVarScrollHelperBase initialization +// ---------------------------------------------------------------------------- + +wxVarScrollHelperBase::wxVarScrollHelperBase(wxWindow *win) + : wxAnyScrollHelperBase(win) +{ +#if wxUSE_MOUSEWHEEL + m_sumWheelRotation = 0; +#endif + + m_unitMax = 0; + m_sizeTotal = 0; + m_unitFirst = 0; + + m_physicalScrolling = true; + m_handler = NULL; + + // by default, the associated window is also the target window + DoSetTargetWindow(win); +} + +wxVarScrollHelperBase::~wxVarScrollHelperBase() +{ + DeleteEvtHandler(); +} + +// ---------------------------------------------------------------------------- +// wxVarScrollHelperBase various helpers +// ---------------------------------------------------------------------------- + +void +wxVarScrollHelperBase::AssignOrient(wxCoord& x, + wxCoord& y, + wxCoord first, + wxCoord second) +{ + if ( GetOrientation() == wxVERTICAL ) + { + x = first; + y = second; + } + else // horizontal + { + x = second; + y = first; + } +} + +void +wxVarScrollHelperBase::IncOrient(wxCoord& x, wxCoord& y, wxCoord inc) +{ + if ( GetOrientation() == wxVERTICAL ) + y += inc; + else + x += inc; +} + +wxCoord wxVarScrollHelperBase::DoEstimateTotalSize() const +{ + // estimate the total height: it is impossible to call + // OnGetUnitSize() for every unit because there may be too many of + // them, so we just make a guess using some units in the beginning, + // some in the end and some in the middle + static const size_t NUM_UNITS_TO_SAMPLE = 10; + + wxCoord sizeTotal; + if ( m_unitMax < 3*NUM_UNITS_TO_SAMPLE ) + { + // in this case, full calculations are faster and more correct than + // guessing + sizeTotal = GetUnitsSize(0, m_unitMax); + } + else // too many units to calculate exactly + { + // look at some units in the beginning/middle/end + sizeTotal = + GetUnitsSize(0, NUM_UNITS_TO_SAMPLE) + + GetUnitsSize(m_unitMax - NUM_UNITS_TO_SAMPLE, + m_unitMax) + + GetUnitsSize(m_unitMax/2 - NUM_UNITS_TO_SAMPLE/2, + m_unitMax/2 + NUM_UNITS_TO_SAMPLE/2); + + // use the height of the units we looked as the average + sizeTotal = (wxCoord) + (((float)sizeTotal / (3*NUM_UNITS_TO_SAMPLE)) * m_unitMax); + } + + return sizeTotal; +} + +wxCoord wxVarScrollHelperBase::GetUnitsSize(size_t unitMin, size_t unitMax) const +{ + if ( unitMin == unitMax ) + return 0; + else if ( unitMin > unitMax ) + return -GetUnitsSize(unitMax, unitMin); + //else: unitMin < unitMax + + // let the user code know that we're going to need all these units + OnGetUnitsSizeHint(unitMin, unitMax); + + // sum up their sizes + wxCoord size = 0; + for ( size_t unit = unitMin; unit < unitMax; ++unit ) + { + size += OnGetUnitSize(unit); + } + + return size; +} + +size_t wxVarScrollHelperBase::FindFirstVisibleFromLast(size_t unitLast, bool full) const +{ + const wxCoord sWindow = GetOrientationTargetSize(); + + // go upwards until we arrive at a unit such that unitLast is not visible + // any more when it is shown + size_t unitFirst = unitLast; + wxCoord s = 0; + for ( ;; ) + { + s += OnGetUnitSize(unitFirst); + + if ( s > sWindow ) + { + // for this unit to be fully visible we need to go one unit + // down, but if it is enough for it to be only partly visible then + // this unit will do as well + if ( full ) + { + ++unitFirst; + } + + break; + } + + if ( !unitFirst ) + break; + + --unitFirst; + } + + return unitFirst; +} + +size_t wxVarScrollHelperBase::GetNewScrollPosition(wxScrollWinEvent& event) const +{ + wxEventType evtType = event.GetEventType(); + + if ( evtType == wxEVT_SCROLLWIN_TOP ) + { + return 0; + } + else if ( evtType == wxEVT_SCROLLWIN_BOTTOM ) + { + return m_unitMax; + } + else if ( evtType == wxEVT_SCROLLWIN_LINEUP ) + { + return m_unitFirst ? m_unitFirst - 1 : 0; + } + else if ( evtType == wxEVT_SCROLLWIN_LINEDOWN ) + { + return m_unitFirst + 1; + } + else if ( evtType == wxEVT_SCROLLWIN_PAGEUP ) + { + // Page up should do at least as much as line up. + return wxMin(FindFirstVisibleFromLast(m_unitFirst), + m_unitFirst ? m_unitFirst - 1 : 0); + } + else if ( evtType == wxEVT_SCROLLWIN_PAGEDOWN ) + { + // And page down should do at least as much as line down. + if ( GetVisibleEnd() ) + return wxMax(GetVisibleEnd() - 1, m_unitFirst + 1); + else + return wxMax(GetVisibleEnd(), m_unitFirst + 1); + } + else if ( evtType == wxEVT_SCROLLWIN_THUMBRELEASE ) + { + return event.GetPosition(); + } + else if ( evtType == wxEVT_SCROLLWIN_THUMBTRACK ) + { + return event.GetPosition(); + } + + // unknown scroll event? + wxFAIL_MSG( wxT("unknown scroll event type?") ); + return 0; +} + +void wxVarScrollHelperBase::UpdateScrollbar() +{ + // if there is nothing to scroll, remove the scrollbar + if ( !m_unitMax ) + { + RemoveScrollbar(); + return; + } + + // see how many units can we fit on screen + const wxCoord sWindow = GetOrientationTargetSize(); + + // do vertical calculations + wxCoord s = 0; + size_t unit; + for ( unit = m_unitFirst; unit < m_unitMax; ++unit ) + { + if ( s > sWindow ) + break; + + s += OnGetUnitSize(unit); + } + + m_nUnitsVisible = unit - m_unitFirst; + + int unitsPageSize = m_nUnitsVisible; + if ( s > sWindow ) + { + // last unit is only partially visible, we still need the scrollbar and + // so we have to "fix" pageSize because if it is equal to m_unitMax + // the scrollbar is not shown at all under MSW + --unitsPageSize; + } + + // set the scrollbar parameters to reflect this + m_win->SetScrollbar(GetOrientation(), m_unitFirst, unitsPageSize, m_unitMax); +} + +void wxVarScrollHelperBase::RemoveScrollbar() +{ + m_unitFirst = 0; + m_nUnitsVisible = m_unitMax; + m_win->SetScrollbar(GetOrientation(), 0, 0, 0); +} + +void wxVarScrollHelperBase::DeleteEvtHandler() +{ + // search for m_handler in the handler list + if ( m_win && m_handler ) + { + if ( m_win->RemoveEventHandler(m_handler) ) + { + delete m_handler; + } + //else: something is very wrong, so better [maybe] leak memory than + // risk a crash because of double deletion + + m_handler = NULL; + } +} + +void wxVarScrollHelperBase::DoSetTargetWindow(wxWindow *target) +{ + m_targetWindow = target; +#ifdef __WXMAC__ + target->MacSetClipChildren( true ) ; +#endif + + // install the event handler which will intercept the events we're + // interested in (but only do it for our real window, not the target window + // which we scroll - we don't need to hijack its events) + if ( m_targetWindow == m_win ) + { + // if we already have a handler, delete it first + DeleteEvtHandler(); + + m_handler = new wxVarScrollHelperEvtHandler(this); + m_targetWindow->PushEventHandler(m_handler); + } +} + +// ---------------------------------------------------------------------------- +// wxVarScrollHelperBase operations +// ---------------------------------------------------------------------------- + +void wxVarScrollHelperBase::SetTargetWindow(wxWindow *target) +{ + wxCHECK_RET( target, wxT("target window must not be NULL") ); + + if ( target == m_targetWindow ) + return; + + DoSetTargetWindow(target); +} + +void wxVarScrollHelperBase::SetUnitCount(size_t count) +{ + // save the number of units + m_unitMax = count; + + // and our estimate for their total height + m_sizeTotal = EstimateTotalSize(); + + // ScrollToUnit() will update the scrollbar itself if it changes the unit + // we pass to it because it's out of [new] range + size_t oldScrollPos = m_unitFirst; + DoScrollToUnit(m_unitFirst); + if ( oldScrollPos == m_unitFirst ) + { + // but if it didn't do it, we still need to update the scrollbar to + // reflect the changed number of units ourselves + UpdateScrollbar(); + } +} + +void wxVarScrollHelperBase::RefreshUnit(size_t unit) +{ + // is this unit visible? + if ( !IsVisible(unit) ) + { + // no, it is useless to do anything + return; + } + + // calculate the rect occupied by this unit on screen + wxRect rect; + AssignOrient(rect.width, rect.height, + GetNonOrientationTargetSize(), OnGetUnitSize(unit)); + + for ( size_t n = GetVisibleBegin(); n < unit; ++n ) + { + IncOrient(rect.x, rect.y, OnGetUnitSize(n)); + } + + // do refresh it + m_targetWindow->RefreshRect(rect); +} + +void wxVarScrollHelperBase::RefreshUnits(size_t from, size_t to) +{ + wxASSERT_MSG( from <= to, wxT("RefreshUnits(): empty range") ); + + // clump the range to just the visible units -- it is useless to refresh + // the other ones + if ( from < GetVisibleBegin() ) + from = GetVisibleBegin(); + + if ( to > GetVisibleEnd() ) + to = GetVisibleEnd(); + + // calculate the rect occupied by these units on screen + int orient_size = 0, + orient_pos = 0; + + int nonorient_size = GetNonOrientationTargetSize(); + + for ( size_t nBefore = GetVisibleBegin(); + nBefore < from; + nBefore++ ) + { + orient_pos += OnGetUnitSize(nBefore); + } + + for ( size_t nBetween = from; nBetween <= to; nBetween++ ) + { + orient_size += OnGetUnitSize(nBetween); + } + + wxRect rect; + AssignOrient(rect.x, rect.y, 0, orient_pos); + AssignOrient(rect.width, rect.height, nonorient_size, orient_size); + + // do refresh it + m_targetWindow->RefreshRect(rect); +} + +void wxVarScrollHelperBase::RefreshAll() +{ + UpdateScrollbar(); + + m_targetWindow->Refresh(); +} + +bool wxVarScrollHelperBase::ScrollLayout() +{ + if ( m_targetWindow->GetSizer() && m_physicalScrolling ) + { + // adjust the sizer dimensions/position taking into account the + // virtual size and scrolled position of the window. + + int x, y; + AssignOrient(x, y, 0, -GetScrollOffset()); + + int w, h; + m_targetWindow->GetVirtualSize(&w, &h); + + m_targetWindow->GetSizer()->SetDimension(x, y, w, h); + return true; + } + + // fall back to default for LayoutConstraints + return m_targetWindow->wxWindow::Layout(); +} + +int wxVarScrollHelperBase::VirtualHitTest(wxCoord coord) const +{ + const size_t unitMax = GetVisibleEnd(); + for ( size_t unit = GetVisibleBegin(); unit < unitMax; ++unit ) + { + coord -= OnGetUnitSize(unit); + if ( coord < 0 ) + return unit; + } + + return wxNOT_FOUND; +} + +// ---------------------------------------------------------------------------- +// wxVarScrollHelperBase scrolling +// ---------------------------------------------------------------------------- + +bool wxVarScrollHelperBase::DoScrollToUnit(size_t unit) +{ + if ( !m_unitMax ) + { + // we're empty, code below doesn't make sense in this case + return false; + } + + // determine the real first unit to scroll to: we shouldn't scroll beyond + // the end + size_t unitFirstLast = FindFirstVisibleFromLast(m_unitMax - 1, true); + if ( unit > unitFirstLast ) + unit = unitFirstLast; + + // anything to do? + if ( unit == m_unitFirst ) + { + // no + return false; + } + + + // remember the currently shown units for the refresh code below + size_t unitFirstOld = GetVisibleBegin(), + unitLastOld = GetVisibleEnd(); + + m_unitFirst = unit; + + + // the size of scrollbar thumb could have changed + UpdateScrollbar(); + + // finally refresh the display -- but only redraw as few units as possible + // to avoid flicker. We can't do this if we have children because they + // won't be scrolled + if ( m_targetWindow->GetChildren().empty() && + (GetVisibleBegin() >= unitLastOld || GetVisibleEnd() <= unitFirstOld) ) + { + // the simplest case: we don't have any old units left, just redraw + // everything + m_targetWindow->Refresh(); + } + else // scroll the window + { + // Avoid scrolling visible parts of the screen on Mac +#ifdef __WXMAC__ + if (m_physicalScrolling && m_targetWindow->IsShownOnScreen()) +#else + if ( m_physicalScrolling ) +#endif + { + wxCoord dx = 0, + dy = GetUnitsSize(GetVisibleBegin(), unitFirstOld); + + if ( GetOrientation() == wxHORIZONTAL ) + { + wxCoord tmp = dx; + dx = dy; + dy = tmp; + } + + m_targetWindow->ScrollWindow(dx, dy); + } + else // !m_physicalScrolling + { + // we still need to invalidate but we can't use ScrollWindow + // because physical scrolling is disabled (the user either didn't + // want children scrolled and/or doesn't want pixels to be + // physically scrolled). + m_targetWindow->Refresh(); + } + } + + return true; +} + +bool wxVarScrollHelperBase::DoScrollUnits(int units) +{ + units += m_unitFirst; + if ( units < 0 ) + units = 0; + + return DoScrollToUnit(units); +} + +bool wxVarScrollHelperBase::DoScrollPages(int pages) +{ + bool didSomething = false; + + while ( pages ) + { + int unit; + if ( pages > 0 ) + { + unit = GetVisibleEnd(); + if ( unit ) + --unit; + --pages; + } + else // pages < 0 + { + unit = FindFirstVisibleFromLast(GetVisibleEnd()); + ++pages; + } + + didSomething = DoScrollToUnit(unit); + } + + return didSomething; +} + +// ---------------------------------------------------------------------------- +// event handling +// ---------------------------------------------------------------------------- + +void wxVarScrollHelperBase::HandleOnSize(wxSizeEvent& event) +{ + if ( m_unitMax ) + { + // sometimes change in varscrollable window's size can result in + // unused empty space after the last item. Fix it by decrementing + // first visible item position according to the available space. + + // determine free space + const wxCoord sWindow = GetOrientationTargetSize(); + wxCoord s = 0; + size_t unit; + for ( unit = m_unitFirst; unit < m_unitMax; ++unit ) + { + if ( s > sWindow ) + break; + + s += OnGetUnitSize(unit); + } + wxCoord freeSpace = sWindow - s; + + // decrement first visible item index as long as there is free space + size_t idealUnitFirst; + for ( idealUnitFirst = m_unitFirst; + idealUnitFirst > 0; + idealUnitFirst-- ) + { + wxCoord us = OnGetUnitSize(idealUnitFirst-1); + if ( freeSpace < us ) + break; + freeSpace -= us; + } + m_unitFirst = idealUnitFirst; + } + + UpdateScrollbar(); + + event.Skip(); +} + +void wxVarScrollHelperBase::HandleOnScroll(wxScrollWinEvent& event) +{ + if (GetOrientation() != event.GetOrientation()) + { + event.Skip(); + return; + } + + DoScrollToUnit(GetNewScrollPosition(event)); + +#ifdef __WXMAC__ + UpdateMacScrollWindow(); +#endif // __WXMAC__ +} + +void wxVarScrollHelperBase::DoPrepareDC(wxDC& dc) +{ + if ( m_physicalScrolling ) + { + wxPoint pt = dc.GetDeviceOrigin(); + + IncOrient(pt.x, pt.y, -GetScrollOffset()); + + dc.SetDeviceOrigin(pt.x, pt.y); + } +} + +int wxVarScrollHelperBase::DoCalcScrolledPosition(int coord) const +{ + return coord - GetScrollOffset(); +} + +int wxVarScrollHelperBase::DoCalcUnscrolledPosition(int coord) const +{ + return coord + GetScrollOffset(); +} + +#if wxUSE_MOUSEWHEEL + +void wxVarScrollHelperBase::HandleOnMouseWheel(wxMouseEvent& event) +{ + // we only want to process wheel events for vertical implementations. + // There is no way to determine wheel orientation (and on MSW horizontal + // wheel rotation just fakes scroll events, rather than sending a MOUSEWHEEL + // event). + if ( GetOrientation() != wxVERTICAL ) + return; + + m_sumWheelRotation += event.GetWheelRotation(); + int delta = event.GetWheelDelta(); + + // how much to scroll this time + int units_to_scroll = -(m_sumWheelRotation/delta); + if ( !units_to_scroll ) + return; + + m_sumWheelRotation += units_to_scroll*delta; + + if ( !event.IsPageScroll() ) + DoScrollUnits( units_to_scroll*event.GetLinesPerAction() ); + else // scroll pages instead of units + DoScrollPages( units_to_scroll ); +} + +#endif // wxUSE_MOUSEWHEEL + + +// ============================================================================ +// wxVarHVScrollHelper implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxVarHVScrollHelper operations +// ---------------------------------------------------------------------------- + +void wxVarHVScrollHelper::SetRowColumnCount(size_t rowCount, size_t columnCount) +{ + SetRowCount(rowCount); + SetColumnCount(columnCount); +} + +bool wxVarHVScrollHelper::ScrollToRowColumn(size_t row, size_t column) +{ + bool result = false; + result |= ScrollToRow(row); + result |= ScrollToColumn(column); + return result; +} + +void wxVarHVScrollHelper::RefreshRowColumn(size_t row, size_t column) +{ + // is this unit visible? + if ( !IsRowVisible(row) || !IsColumnVisible(column) ) + { + // no, it is useless to do anything + return; + } + + // calculate the rect occupied by this cell on screen + wxRect v_rect, h_rect; + v_rect.height = OnGetRowHeight(row); + h_rect.width = OnGetColumnWidth(column); + + size_t n; + + for ( n = GetVisibleRowsBegin(); n < row; n++ ) + { + v_rect.y += OnGetRowHeight(n); + } + + for ( n = GetVisibleColumnsBegin(); n < column; n++ ) + { + h_rect.x += OnGetColumnWidth(n); + } + + // refresh but specialize the behaviour if we have a single target window + if ( wxVarVScrollHelper::GetTargetWindow() == wxVarHScrollHelper::GetTargetWindow() ) + { + v_rect.x = h_rect.x; + v_rect.width = h_rect.width; + wxVarVScrollHelper::GetTargetWindow()->RefreshRect(v_rect); + } + else + { + v_rect.x = 0; + v_rect.width = wxVarVScrollHelper::GetNonOrientationTargetSize(); + h_rect.y = 0; + h_rect.width = wxVarHScrollHelper::GetNonOrientationTargetSize(); + + wxVarVScrollHelper::GetTargetWindow()->RefreshRect(v_rect); + wxVarHScrollHelper::GetTargetWindow()->RefreshRect(h_rect); + } +} + +void wxVarHVScrollHelper::RefreshRowsColumns(size_t fromRow, size_t toRow, + size_t fromColumn, size_t toColumn) +{ + wxASSERT_MSG( fromRow <= toRow || fromColumn <= toColumn, + wxT("RefreshRowsColumns(): empty range") ); + + // clump the range to just the visible units -- it is useless to refresh + // the other ones + if ( fromRow < GetVisibleRowsBegin() ) + fromRow = GetVisibleRowsBegin(); + + if ( toRow > GetVisibleRowsEnd() ) + toRow = GetVisibleRowsEnd(); + + if ( fromColumn < GetVisibleColumnsBegin() ) + fromColumn = GetVisibleColumnsBegin(); + + if ( toColumn > GetVisibleColumnsEnd() ) + toColumn = GetVisibleColumnsEnd(); + + // calculate the rect occupied by these units on screen + wxRect v_rect, h_rect; + size_t nBefore, nBetween; + + for ( nBefore = GetVisibleRowsBegin(); + nBefore < fromRow; + nBefore++ ) + { + v_rect.y += OnGetRowHeight(nBefore); + } + + for ( nBetween = fromRow; nBetween <= toRow; nBetween++ ) + { + v_rect.height += OnGetRowHeight(nBetween); + } + + for ( nBefore = GetVisibleColumnsBegin(); + nBefore < fromColumn; + nBefore++ ) + { + h_rect.x += OnGetColumnWidth(nBefore); + } + + for ( nBetween = fromColumn; nBetween <= toColumn; nBetween++ ) + { + h_rect.width += OnGetColumnWidth(nBetween); + } + + // refresh but specialize the behaviour if we have a single target window + if ( wxVarVScrollHelper::GetTargetWindow() == wxVarHScrollHelper::GetTargetWindow() ) + { + v_rect.x = h_rect.x; + v_rect.width = h_rect.width; + wxVarVScrollHelper::GetTargetWindow()->RefreshRect(v_rect); + } + else + { + v_rect.x = 0; + v_rect.width = wxVarVScrollHelper::GetNonOrientationTargetSize(); + h_rect.y = 0; + h_rect.width = wxVarHScrollHelper::GetNonOrientationTargetSize(); + + wxVarVScrollHelper::GetTargetWindow()->RefreshRect(v_rect); + wxVarHScrollHelper::GetTargetWindow()->RefreshRect(h_rect); + } +} + +wxPosition wxVarHVScrollHelper::VirtualHitTest(wxCoord x, wxCoord y) const +{ + return wxPosition(wxVarVScrollHelper::VirtualHitTest(y), + wxVarHScrollHelper::VirtualHitTest(x)); +} + +void wxVarHVScrollHelper::DoPrepareDC(wxDC& dc) +{ + wxVarVScrollHelper::DoPrepareDC(dc); + wxVarHScrollHelper::DoPrepareDC(dc); +} + +bool wxVarHVScrollHelper::ScrollLayout() +{ + bool layout_result = false; + layout_result |= wxVarVScrollHelper::ScrollLayout(); + layout_result |= wxVarHScrollHelper::ScrollLayout(); + return layout_result; +} + +wxSize wxVarHVScrollHelper::GetRowColumnCount() const +{ + return wxSize(GetColumnCount(), GetRowCount()); +} + +wxPosition wxVarHVScrollHelper::GetVisibleBegin() const +{ + return wxPosition(GetVisibleRowsBegin(), GetVisibleColumnsBegin()); +} + +wxPosition wxVarHVScrollHelper::GetVisibleEnd() const +{ + return wxPosition(GetVisibleRowsEnd(), GetVisibleColumnsEnd()); +} + +bool wxVarHVScrollHelper::IsVisible(size_t row, size_t column) const +{ + return IsRowVisible(row) && IsColumnVisible(column); +} + + +// ============================================================================ +// wx[V/H/HV]ScrolledWindow implementations +// ============================================================================ + +IMPLEMENT_ABSTRACT_CLASS(wxVScrolledWindow, wxPanel) +IMPLEMENT_ABSTRACT_CLASS(wxHScrolledWindow, wxPanel) +IMPLEMENT_ABSTRACT_CLASS(wxHVScrolledWindow, wxPanel) + + +#if WXWIN_COMPATIBILITY_2_8 + +// =========================================================================== +// wxVarVScrollLegacyAdaptor +// =========================================================================== + +size_t wxVarVScrollLegacyAdaptor::GetFirstVisibleLine() const +{ return GetVisibleRowsBegin(); } + +size_t wxVarVScrollLegacyAdaptor::GetLastVisibleLine() const +{ return GetVisibleRowsEnd() - 1; } + +size_t wxVarVScrollLegacyAdaptor::GetLineCount() const +{ return GetRowCount(); } + +void wxVarVScrollLegacyAdaptor::SetLineCount(size_t count) +{ SetRowCount(count); } + +void wxVarVScrollLegacyAdaptor::RefreshLine(size_t line) +{ RefreshRow(line); } + +void wxVarVScrollLegacyAdaptor::RefreshLines(size_t from, size_t to) +{ RefreshRows(from, to); } + +bool wxVarVScrollLegacyAdaptor::ScrollToLine(size_t line) +{ return ScrollToRow(line); } + +bool wxVarVScrollLegacyAdaptor::ScrollLines(int lines) +{ return ScrollRows(lines); } + +bool wxVarVScrollLegacyAdaptor::ScrollPages(int pages) +{ return ScrollRowPages(pages); } + +wxCoord wxVarVScrollLegacyAdaptor::OnGetLineHeight(size_t WXUNUSED(n)) const +{ + wxFAIL_MSG( wxT("OnGetLineHeight() must be overridden if OnGetRowHeight() isn't!") ); + return -1; +} + +void wxVarVScrollLegacyAdaptor::OnGetLinesHint(size_t WXUNUSED(lineMin), + size_t WXUNUSED(lineMax)) const +{ +} + +wxCoord wxVarVScrollLegacyAdaptor::OnGetRowHeight(size_t n) const +{ + return OnGetLineHeight(n); +} + +void wxVarVScrollLegacyAdaptor::OnGetRowsHeightHint(size_t rowMin, + size_t rowMax) const +{ + OnGetLinesHint(rowMin, rowMax); +} + +#endif // WXWIN_COMPATIBILITY_2_8 diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/generic/wizard.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/generic/wizard.cpp new file mode 100644 index 0000000000..25d1a669d0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/generic/wizard.cpp @@ -0,0 +1,1009 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/wizard.cpp +// Purpose: generic implementation of wxWizard class +// Author: Vadim Zeitlin +// Modified by: Robert Cavanaugh +// 1) Added capability for wxWizardPage to accept resources +// 2) Added "Help" button handler stub +// 3) Fixed ShowPage() bug on displaying bitmaps +// Robert Vazan (sizers) +// Created: 15.08.99 +// Copyright: (c) 1999 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_WIZARDDLG + +#ifndef WX_PRECOMP + #include "wx/dynarray.h" + #include "wx/intl.h" + #include "wx/statbmp.h" + #include "wx/button.h" + #include "wx/settings.h" + #include "wx/sizer.h" +#endif //WX_PRECOMP + +#include "wx/statline.h" + +#include "wx/scrolwin.h" +#include "wx/wizard.h" +#include "wx/dcmemory.h" + +// ---------------------------------------------------------------------------- +// wxWizardSizer +// ---------------------------------------------------------------------------- + +class wxWizardSizer : public wxSizer +{ +public: + wxWizardSizer(wxWizard *owner); + + virtual wxSizerItem *Insert(size_t index, wxSizerItem *item); + + virtual void RecalcSizes(); + virtual wxSize CalcMin(); + + // get the max size of all wizard pages + wxSize GetMaxChildSize(); + + // return the border which can be either set using wxWizard::SetBorder() or + // have default value + int GetBorder() const; + + // hide the pages which we temporarily "show" when they're added to this + // sizer (see Insert()) + void HidePages(); + +private: + wxSize SiblingSize(wxSizerItem *child); + + wxWizard *m_owner; + wxSize m_childSize; +}; + +// ---------------------------------------------------------------------------- +// event tables and such +// ---------------------------------------------------------------------------- + +wxDEFINE_EVENT( wxEVT_WIZARD_PAGE_CHANGED, wxWizardEvent ); +wxDEFINE_EVENT( wxEVT_WIZARD_PAGE_CHANGING, wxWizardEvent ); +wxDEFINE_EVENT( wxEVT_WIZARD_BEFORE_PAGE_CHANGED, wxWizardEvent ); +wxDEFINE_EVENT( wxEVT_WIZARD_CANCEL, wxWizardEvent ); +wxDEFINE_EVENT( wxEVT_WIZARD_FINISHED, wxWizardEvent ); +wxDEFINE_EVENT( wxEVT_WIZARD_HELP, wxWizardEvent ); +wxDEFINE_EVENT( wxEVT_WIZARD_PAGE_SHOWN, wxWizardEvent ); + +BEGIN_EVENT_TABLE(wxWizard, wxDialog) + EVT_BUTTON(wxID_CANCEL, wxWizard::OnCancel) + EVT_BUTTON(wxID_BACKWARD, wxWizard::OnBackOrNext) + EVT_BUTTON(wxID_FORWARD, wxWizard::OnBackOrNext) + EVT_BUTTON(wxID_HELP, wxWizard::OnHelp) + + EVT_WIZARD_PAGE_CHANGED(wxID_ANY, wxWizard::OnWizEvent) + EVT_WIZARD_PAGE_CHANGING(wxID_ANY, wxWizard::OnWizEvent) + EVT_WIZARD_CANCEL(wxID_ANY, wxWizard::OnWizEvent) + EVT_WIZARD_FINISHED(wxID_ANY, wxWizard::OnWizEvent) + EVT_WIZARD_HELP(wxID_ANY, wxWizard::OnWizEvent) +END_EVENT_TABLE() + +IMPLEMENT_DYNAMIC_CLASS(wxWizard, wxDialog) + +/* + TODO PROPERTIES : + wxWizard + extstyle + title +*/ + +IMPLEMENT_ABSTRACT_CLASS(wxWizardPage, wxPanel) +IMPLEMENT_DYNAMIC_CLASS(wxWizardPageSimple, wxWizardPage) +IMPLEMENT_DYNAMIC_CLASS(wxWizardEvent, wxNotifyEvent) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxWizardPage +// ---------------------------------------------------------------------------- + +void wxWizardPage::Init() +{ + m_bitmap = wxNullBitmap; +} + +wxWizardPage::wxWizardPage(wxWizard *parent, + const wxBitmap& bitmap) +{ + Create(parent, bitmap); +} + +bool wxWizardPage::Create(wxWizard *parent, + const wxBitmap& bitmap) +{ + if ( !wxPanel::Create(parent, wxID_ANY) ) + return false; + + m_bitmap = bitmap; + + // initially the page is hidden, it's shown only when it becomes current + Hide(); + + return true; +} + +// ---------------------------------------------------------------------------- +// wxWizardPageSimple +// ---------------------------------------------------------------------------- + +wxWizardPage *wxWizardPageSimple::GetPrev() const +{ + return m_prev; +} + +wxWizardPage *wxWizardPageSimple::GetNext() const +{ + return m_next; +} + +// ---------------------------------------------------------------------------- +// wxWizardSizer +// ---------------------------------------------------------------------------- + +wxWizardSizer::wxWizardSizer(wxWizard *owner) + : m_owner(owner), + m_childSize(wxDefaultSize) +{ +} + +wxSizerItem *wxWizardSizer::Insert(size_t index, wxSizerItem *item) +{ + m_owner->m_usingSizer = true; + + if ( item->IsWindow() ) + { + // we must pretend that the window is shown as otherwise it wouldn't be + // taken into account for the layout -- but avoid really showing it, so + // just set the internal flag instead of calling wxWindow::Show() + item->GetWindow()->wxWindowBase::Show(); + } + + return wxSizer::Insert(index, item); +} + +void wxWizardSizer::HidePages() +{ + for ( wxSizerItemList::compatibility_iterator node = GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + wxSizerItem * const item = node->GetData(); + if ( item->IsWindow() ) + item->GetWindow()->wxWindowBase::Show(false); + } +} + +void wxWizardSizer::RecalcSizes() +{ + // Effect of this function depends on m_owner->m_page and + // it should be called whenever it changes (wxWizard::ShowPage) + if ( m_owner->m_page ) + { + m_owner->m_page->SetSize(wxRect(m_position, m_size)); + } +} + +wxSize wxWizardSizer::CalcMin() +{ + return m_owner->GetPageSize(); +} + +wxSize wxWizardSizer::GetMaxChildSize() +{ + wxSize maxOfMin; + + for ( wxSizerItemList::compatibility_iterator childNode = m_children.GetFirst(); + childNode; + childNode = childNode->GetNext() ) + { + wxSizerItem *child = childNode->GetData(); + maxOfMin.IncTo(child->CalcMin()); + maxOfMin.IncTo(SiblingSize(child)); + } + + if ( m_owner->m_started ) + { + m_childSize = maxOfMin; + } + + return maxOfMin; +} + +int wxWizardSizer::GetBorder() const +{ + return m_owner->m_border; +} + +wxSize wxWizardSizer::SiblingSize(wxSizerItem *child) +{ + wxSize maxSibling; + + if ( child->IsWindow() ) + { + wxWizardPage *page = wxDynamicCast(child->GetWindow(), wxWizardPage); + if ( page ) + { + for ( wxWizardPage *sibling = page->GetNext(); + sibling; + sibling = sibling->GetNext() ) + { + if ( sibling->GetSizer() ) + { + maxSibling.IncTo(sibling->GetSizer()->CalcMin()); + } + } + } + } + + return maxSibling; +} + +// ---------------------------------------------------------------------------- +// generic wxWizard implementation +// ---------------------------------------------------------------------------- + +void wxWizard::Init() +{ + m_posWizard = wxDefaultPosition; + m_page = NULL; + m_btnPrev = m_btnNext = NULL; + m_statbmp = NULL; + m_sizerBmpAndPage = NULL; + m_sizerPage = NULL; + m_border = 5; + m_started = false; + m_wasModal = false; + m_usingSizer = false; + m_bitmapBackgroundColour = *wxWHITE; + m_bitmapPlacement = 0; + m_bitmapMinimumWidth = 115; +} + +bool wxWizard::Create(wxWindow *parent, + int id, + const wxString& title, + const wxBitmap& bitmap, + const wxPoint& pos, + long style) +{ + bool result = wxDialog::Create(parent,id,title,pos,wxDefaultSize,style); + + m_posWizard = pos; + m_bitmap = bitmap ; + + DoCreateControls(); + + return result; +} + +wxWizard::~wxWizard() +{ + // normally we don't have to delete this sizer as it's deleted by the + // associated window but if we never used it or didn't set it as the window + // sizer yet, do delete it manually + if ( !m_usingSizer || !m_started ) + delete m_sizerPage; +} + +void wxWizard::AddBitmapRow(wxBoxSizer *mainColumn) +{ + m_sizerBmpAndPage = new wxBoxSizer(wxHORIZONTAL); + mainColumn->Add( + m_sizerBmpAndPage, + 1, // Vertically stretchable + wxEXPAND // Horizontal stretching, no border + ); + mainColumn->Add(0,5, + 0, // No vertical stretching + wxEXPAND // No border, (mostly useless) horizontal stretching + ); + +#if wxUSE_STATBMP + if ( m_bitmap.IsOk() ) + { + wxSize bitmapSize(wxDefaultSize); + if (GetBitmapPlacement()) + bitmapSize.x = GetMinimumBitmapWidth(); + + m_statbmp = new wxStaticBitmap(this, wxID_ANY, m_bitmap, wxDefaultPosition, bitmapSize); + m_sizerBmpAndPage->Add( + m_statbmp, + 0, // No horizontal stretching + wxALL, // Border all around, top alignment + 5 // Border width + ); + m_sizerBmpAndPage->Add( + 5,0, + 0, // No horizontal stretching + wxEXPAND // No border, (mostly useless) vertical stretching + ); + } +#endif + + // Added to m_sizerBmpAndPage later + m_sizerPage = new wxWizardSizer(this); +} + +void wxWizard::AddStaticLine(wxBoxSizer *mainColumn) +{ +#if wxUSE_STATLINE + mainColumn->Add( + new wxStaticLine(this, wxID_ANY), + 0, // Vertically unstretchable + wxEXPAND | wxALL, // Border all around, horizontally stretchable + 5 // Border width + ); + mainColumn->Add(0,5, + 0, // No vertical stretching + wxEXPAND // No border, (mostly useless) horizontal stretching + ); +#else + (void)mainColumn; +#endif // wxUSE_STATLINE +} + +void wxWizard::AddBackNextPair(wxBoxSizer *buttonRow) +{ + wxASSERT_MSG( m_btnNext && m_btnPrev, + wxT("You must create the buttons before calling ") + wxT("wxWizard::AddBackNextPair") ); + + wxBoxSizer *backNextPair = new wxBoxSizer(wxHORIZONTAL); + buttonRow->Add( + backNextPair, + 0, // No horizontal stretching + wxALL, // Border all around + 5 // Border width + ); + + backNextPair->Add(m_btnPrev); + backNextPair->Add(10, 0, + 0, // No horizontal stretching + wxEXPAND // No border, (mostly useless) vertical stretching + ); + backNextPair->Add(m_btnNext); +} + +void wxWizard::AddButtonRow(wxBoxSizer *mainColumn) +{ + // the order in which the buttons are created determines the TAB order - at least under MSWindows... + // although the 'back' button appears before the 'next' button, a more userfriendly tab order is + // to activate the 'next' button first (create the next button before the back button). + // The reason is: The user will repeatedly enter information in the wizard pages and then wants to + // press 'next'. If a user uses mostly the keyboard, he would have to skip the 'back' button + // every time. This is annoying. There is a second reason: RETURN acts as TAB. If the 'next' + // button comes first in the TAB order, the user can enter information very fast using the RETURN + // key to TAB to the next entry field and page. This would not be possible, if the 'back' button + // was created before the 'next' button. + + bool isPda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); + int buttonStyle = isPda ? wxBU_EXACTFIT : 0; + + wxBoxSizer *buttonRow = new wxBoxSizer(wxHORIZONTAL); +#ifdef __WXMAC__ + if (GetExtraStyle() & wxWIZARD_EX_HELPBUTTON) + mainColumn->Add( + buttonRow, + 0, // Vertically unstretchable + wxGROW|wxALIGN_CENTRE + ); + else +#endif + mainColumn->Add( + buttonRow, + 0, // Vertically unstretchable + wxALIGN_RIGHT // Right aligned, no border + ); + + // Desired TAB order is 'next', 'cancel', 'help', 'back'. This makes the 'back' button the last control on the page. + // Create the buttons in the right order... + wxButton *btnHelp=0; +#ifdef __WXMAC__ + if (GetExtraStyle() & wxWIZARD_EX_HELPBUTTON) + btnHelp=new wxButton(this, wxID_HELP, wxEmptyString, wxDefaultPosition, wxDefaultSize, buttonStyle); +#endif + + m_btnNext = new wxButton(this, wxID_FORWARD, _("&Next >")); + wxButton *btnCancel=new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, buttonStyle); +#ifndef __WXMAC__ + if (GetExtraStyle() & wxWIZARD_EX_HELPBUTTON) + btnHelp=new wxButton(this, wxID_HELP, _("&Help"), wxDefaultPosition, wxDefaultSize, buttonStyle); +#endif + m_btnPrev = new wxButton(this, wxID_BACKWARD, _("< &Back"), wxDefaultPosition, wxDefaultSize, buttonStyle); + + if (btnHelp) + { + buttonRow->Add( + btnHelp, + 0, // Horizontally unstretchable + wxALL, // Border all around, top aligned + 5 // Border width + ); +#ifdef __WXMAC__ + // Put stretchable space between help button and others + buttonRow->Add(0, 0, 1, wxALIGN_CENTRE, 0); +#endif + } + + AddBackNextPair(buttonRow); + + buttonRow->Add( + btnCancel, + 0, // Horizontally unstretchable + wxALL, // Border all around, top aligned + 5 // Border width + ); +} + +void wxWizard::DoCreateControls() +{ + // do nothing if the controls were already created + if ( WasCreated() ) + return; + + bool isPda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); + + // Horizontal stretching, and if not PDA, border all around + int mainColumnSizerFlags = isPda ? wxEXPAND : wxALL|wxEXPAND ; + + // wxWindow::SetSizer will be called at end + wxBoxSizer *windowSizer = new wxBoxSizer(wxVERTICAL); + + wxBoxSizer *mainColumn = new wxBoxSizer(wxVERTICAL); + windowSizer->Add( + mainColumn, + 1, // Vertical stretching + mainColumnSizerFlags, + 5 // Border width + ); + + AddBitmapRow(mainColumn); + + if (!isPda) + AddStaticLine(mainColumn); + + AddButtonRow(mainColumn); + + SetSizer(windowSizer); +} + +void wxWizard::SetPageSize(const wxSize& size) +{ + wxCHECK_RET(!m_started, wxT("wxWizard::SetPageSize after RunWizard")); + m_sizePage = size; +} + +void wxWizard::FitToPage(const wxWizardPage *page) +{ + wxCHECK_RET(!m_started, wxT("wxWizard::FitToPage after RunWizard")); + + while ( page ) + { + wxSize size = page->GetBestSize(); + + m_sizePage.IncTo(size); + + page = page->GetNext(); + } +} + +bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) +{ + wxASSERT_MSG( page != m_page, wxT("this is useless") ); + + wxSizerFlags flags(1); + flags.Border(wxALL, m_border).Expand(); + + if ( !m_started ) + { + if ( m_usingSizer ) + { + m_sizerBmpAndPage->Add(m_sizerPage, flags); + + // now that our layout is computed correctly, hide the pages + // artificially shown in wxWizardSizer::Insert() back again + m_sizerPage->HidePages(); + } + } + + + // remember the old bitmap (if any) to compare with the new one later + wxBitmap bmpPrev; + + // check for previous page + if ( m_page ) + { + // send the event to the old page + wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGING, GetId(), + goingForward, m_page); + if ( m_page->GetEventHandler()->ProcessEvent(event) && + !event.IsAllowed() ) + { + // vetoed by the page + return false; + } + + m_page->Hide(); + + bmpPrev = m_page->GetBitmap(); + + if ( !m_usingSizer ) + m_sizerBmpAndPage->Detach(m_page); + } + + // is this the end? + if ( !page ) + { + // terminate successfully + if ( IsModal() ) + { + EndModal(wxID_OK); + } + else + { + SetReturnCode(wxID_OK); + Hide(); + } + + // and notify the user code (this is especially useful for modeless + // wizards) + wxWizardEvent event(wxEVT_WIZARD_FINISHED, GetId(), false, m_page); + (void)GetEventHandler()->ProcessEvent(event); + + m_page = NULL; + + return true; + } + + // notice that we change m_page only here so that wxEVT_WIZARD_FINISHED + // event above could still use the correct (i.e. old) value of m_page + m_page = page; + + // position and show the new page + (void)m_page->TransferDataToWindow(); + + if ( m_usingSizer ) + { + // wxWizardSizer::RecalcSizes wants to be called when m_page changes + m_sizerPage->RecalcSizes(); + } + else // pages are not managed by the sizer + { + m_sizerBmpAndPage->Add(m_page, flags); + m_sizerBmpAndPage->SetItemMinSize(m_page, GetPageSize()); + } + +#if wxUSE_STATBMP + // update the bitmap if:it changed + wxBitmap bmp; + if ( m_statbmp ) + { + bmp = m_page->GetBitmap(); + if ( !bmp.IsOk() ) + bmp = m_bitmap; + + if ( !bmpPrev.IsOk() ) + bmpPrev = m_bitmap; + + if (!GetBitmapPlacement()) + { + if ( !bmp.IsSameAs(bmpPrev) ) + m_statbmp->SetBitmap(bmp); + } + } +#endif // wxUSE_STATBMP + + + // and update the buttons state + m_btnPrev->Enable(HasPrevPage(m_page)); + + const bool hasNext = HasNextPage(m_page); + const wxString label = hasNext ? _("&Next >") : _("&Finish"); + if ( label != m_btnNext->GetLabel() ) + m_btnNext->SetLabel(label); + + m_btnNext->SetDefault(); + + + // send the change event to the new page now + wxWizardEvent event(wxEVT_WIZARD_PAGE_CHANGED, GetId(), goingForward, m_page); + (void)m_page->GetEventHandler()->ProcessEvent(event); + + // and finally show it + m_page->Show(); + m_page->SetFocus(); + + if ( !m_usingSizer ) + m_sizerBmpAndPage->Layout(); + + if ( !m_started ) + { + m_started = true; + + DoWizardLayout(); + } + + if (GetBitmapPlacement() && m_statbmp) + { + ResizeBitmap(bmp); + + if ( !bmp.IsSameAs(bmpPrev) ) + m_statbmp->SetBitmap(bmp); + + if (m_usingSizer) + m_sizerPage->RecalcSizes(); + } + + wxWizardEvent pageShownEvent(wxEVT_WIZARD_PAGE_SHOWN, GetId(), + goingForward, m_page); + m_page->GetEventHandler()->ProcessEvent(pageShownEvent); + + return true; +} + +/// Do fit, and adjust to screen size if necessary +void wxWizard::DoWizardLayout() +{ + if ( wxSystemSettings::GetScreenType() > wxSYS_SCREEN_PDA ) + { + if (CanDoLayoutAdaptation()) + DoLayoutAdaptation(); + else + GetSizer()->SetSizeHints(this); + + if ( m_posWizard == wxDefaultPosition ) + CentreOnScreen(); + } + + SetLayoutAdaptationDone(true); +} + +bool wxWizard::RunWizard(wxWizardPage *firstPage) +{ + wxCHECK_MSG( firstPage, false, wxT("can't run empty wizard") ); + + // can't return false here because there is no old page + (void)ShowPage(firstPage, true /* forward */); + + m_wasModal = true; + + return ShowModal() == wxID_OK; +} + +wxWizardPage *wxWizard::GetCurrentPage() const +{ + return m_page; +} + +wxSize wxWizard::GetPageSize() const +{ + // default width and height of the page + int DEFAULT_PAGE_WIDTH, + DEFAULT_PAGE_HEIGHT; + if ( wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA ) + { + // Make the default page size small enough to fit on screen + DEFAULT_PAGE_WIDTH = wxSystemSettings::GetMetric(wxSYS_SCREEN_X) / 2; + DEFAULT_PAGE_HEIGHT = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y) / 2; + } + else // !PDA + { + DEFAULT_PAGE_WIDTH = + DEFAULT_PAGE_HEIGHT = 270; + } + + // start with default minimal size + wxSize pageSize(DEFAULT_PAGE_WIDTH, DEFAULT_PAGE_HEIGHT); + + // make the page at least as big as specified by user + pageSize.IncTo(m_sizePage); + + if ( m_statbmp ) + { + // make the page at least as tall as the bitmap + pageSize.IncTo(wxSize(0, m_bitmap.GetHeight())); + } + + if ( m_usingSizer ) + { + // make it big enough to contain all pages added to the sizer + pageSize.IncTo(m_sizerPage->GetMaxChildSize()); + } + + return pageSize; +} + +wxSizer *wxWizard::GetPageAreaSizer() const +{ + return m_sizerPage; +} + +void wxWizard::SetBorder(int border) +{ + wxCHECK_RET(!m_started, wxT("wxWizard::SetBorder after RunWizard")); + + m_border = border; +} + +void wxWizard::OnCancel(wxCommandEvent& WXUNUSED(eventUnused)) +{ + // this function probably can never be called when we don't have an active + // page, but a small extra check won't hurt + wxWindow *win = m_page ? (wxWindow *)m_page : (wxWindow *)this; + + wxWizardEvent event(wxEVT_WIZARD_CANCEL, GetId(), false, m_page); + if ( !win->GetEventHandler()->ProcessEvent(event) || event.IsAllowed() ) + { + // no objections - close the dialog + if(IsModal()) + { + EndModal(wxID_CANCEL); + } + else + { + SetReturnCode(wxID_CANCEL); + Hide(); + } + } + //else: request to Cancel ignored +} + +void wxWizard::OnBackOrNext(wxCommandEvent& event) +{ + wxASSERT_MSG( (event.GetEventObject() == m_btnNext) || + (event.GetEventObject() == m_btnPrev), + wxT("unknown button") ); + + wxCHECK_RET( m_page, wxT("should have a valid current page") ); + + // ask the current page first: notice that we do it before calling + // GetNext/Prev() because the data transferred from the controls of the page + // may change the value returned by these methods + if ( !m_page->Validate() || !m_page->TransferDataFromWindow() ) + { + // the page data is incorrect, don't do anything + return; + } + + bool forward = event.GetEventObject() == m_btnNext; + + // Give the application a chance to set state which may influence GetNext()/GetPrev() + wxWizardEvent eventPreChanged(wxEVT_WIZARD_BEFORE_PAGE_CHANGED, GetId(), forward, m_page); + (void)m_page->GetEventHandler()->ProcessEvent(eventPreChanged); + + if (!eventPreChanged.IsAllowed()) + return; + + wxWizardPage *page; + if ( forward ) + { + page = m_page->GetNext(); + } + else // back + { + page = m_page->GetPrev(); + + wxASSERT_MSG( page, wxT("\"GetEventHandler()->ProcessEvent(eventHelp); + } +} + +void wxWizard::OnWizEvent(wxWizardEvent& event) +{ + // the dialogs have wxWS_EX_BLOCK_EVENTS style on by default but we want to + // propagate wxEVT_WIZARD_XXX to the parent (if any), so do it manually + if ( !(GetExtraStyle() & wxWS_EX_BLOCK_EVENTS) ) + { + // the event will be propagated anyhow + event.Skip(); + } + else + { + wxWindow *parent = GetParent(); + + if ( !parent || !parent->GetEventHandler()->ProcessEvent(event) ) + { + event.Skip(); + } + } + + if ( ( !m_wasModal ) && + event.IsAllowed() && + ( event.GetEventType() == wxEVT_WIZARD_FINISHED || + event.GetEventType() == wxEVT_WIZARD_CANCEL + ) + ) + { + Destroy(); + } +} + +void wxWizard::SetBitmap(const wxBitmap& bitmap) +{ + m_bitmap = bitmap; + if (m_statbmp) + m_statbmp->SetBitmap(m_bitmap); +} + +// ---------------------------------------------------------------------------- +// wxWizardEvent +// ---------------------------------------------------------------------------- + +wxWizardEvent::wxWizardEvent(wxEventType type, int id, bool direction, wxWizardPage* page) + : wxNotifyEvent(type, id) +{ + // Modified 10-20-2001 Robert Cavanaugh + // add the active page to the event data + m_direction = direction; + m_page = page; +} + +/// Do the adaptation +bool wxWizard::DoLayoutAdaptation() +{ + wxWindowList windows; + wxWindowList pages; + + // Make all the pages (that use sizers) scrollable + for ( wxSizerItemList::compatibility_iterator node = m_sizerPage->GetChildren().GetFirst(); node; node = node->GetNext() ) + { + wxSizerItem * const item = node->GetData(); + if ( item->IsWindow() ) + { + wxWizardPage* page = wxDynamicCast(item->GetWindow(), wxWizardPage); + if (page) + { + while (page) + { + if (!pages.Find(page) && page->GetSizer()) + { + // Create a scrolled window and reparent + wxScrolledWindow* scrolledWindow = new wxScrolledWindow(page, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxVSCROLL|wxHSCROLL|wxBORDER_NONE); + wxSizer* oldSizer = page->GetSizer(); + + wxSizer* newSizer = new wxBoxSizer(wxVERTICAL); + newSizer->Add(scrolledWindow,1, wxEXPAND, 0); + + page->SetSizer(newSizer, false /* don't delete the old sizer */); + + scrolledWindow->SetSizer(oldSizer); + + wxStandardDialogLayoutAdapter::DoReparentControls(page, scrolledWindow); + + pages.Append(page); + windows.Append(scrolledWindow); + } + page = page->GetNext(); + } + } + } + } + + wxStandardDialogLayoutAdapter::DoFitWithScrolling(this, windows); + + // Size event doesn't get sent soon enough on wxGTK + DoLayout(); + + SetLayoutAdaptationDone(true); + + return true; +} + +bool wxWizard::ResizeBitmap(wxBitmap& bmp) +{ + if (!GetBitmapPlacement()) + return false; + + if (bmp.IsOk()) + { + wxSize pageSize = m_sizerPage->GetSize(); + if (pageSize == wxSize(0,0)) + pageSize = GetPageSize(); + int bitmapWidth = wxMax(bmp.GetWidth(), GetMinimumBitmapWidth()); + int bitmapHeight = pageSize.y; + + if (!m_statbmp->GetBitmap().IsOk() || m_statbmp->GetBitmap().GetHeight() != bitmapHeight) + { + wxBitmap bitmap(bitmapWidth, bitmapHeight); + { + wxMemoryDC dc; + dc.SelectObject(bitmap); + dc.SetBackground(wxBrush(m_bitmapBackgroundColour)); + dc.Clear(); + + if (GetBitmapPlacement() & wxWIZARD_TILE) + { + TileBitmap(wxRect(0, 0, bitmapWidth, bitmapHeight), dc, bmp); + } + else + { + int x, y; + + if (GetBitmapPlacement() & wxWIZARD_HALIGN_LEFT) + x = 0; + else if (GetBitmapPlacement() & wxWIZARD_HALIGN_RIGHT) + x = bitmapWidth - bmp.GetWidth(); + else + x = (bitmapWidth - bmp.GetWidth())/2; + + if (GetBitmapPlacement() & wxWIZARD_VALIGN_TOP) + y = 0; + else if (GetBitmapPlacement() & wxWIZARD_VALIGN_BOTTOM) + y = bitmapHeight - bmp.GetHeight(); + else + y = (bitmapHeight - bmp.GetHeight())/2; + + dc.DrawBitmap(bmp, x, y, true); + dc.SelectObject(wxNullBitmap); + } + } + + bmp = bitmap; + } + } + + return true; +} + +bool wxWizard::TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap) +{ + int w = bitmap.GetWidth(); + int h = bitmap.GetHeight(); + + wxMemoryDC dcMem; + + dcMem.SelectObjectAsSource(bitmap); + + int i, j; + for (i = rect.x; i < rect.x + rect.width; i += w) + { + for (j = rect.y; j < rect.y + rect.height; j+= h) + dc.Blit(i, j, bitmap.GetWidth(), bitmap.GetHeight(), & dcMem, 0, 0); + } + dcMem.SelectObject(wxNullBitmap); + + return true; +} + +#endif // wxUSE_WIZARDDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/MAKEFILE.VA b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/MAKEFILE.VA new file mode 100644 index 0000000000..ddaef8bd49 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/MAKEFILE.VA @@ -0,0 +1,335 @@ +# +# File: makefile.vc +# Author: David Webster +# Created: 1999 +# Updated: +# Copyright: +# Licence: wxWindows Licence +# "%W% %G%" +# +# Makefile : Builds os2jpeg.lib library for OS/2 3.0/4.0 + +# Suffixes +OBJSUFF=obj +SRCSUFF=cpp + +OS2FLAGS=/c /W2 /DOS232 /D__VISAGECPP__ /D__WXPM__ /DJPEGLOCAL /Ss /Q /N100 /Tdc +OS2LINKFLAGS=/BASE:0x00010000 /PMTYPE:PM /NOE /NOD /ALIGN:16 +OS2LIBFLAGS=/NOL /NOE +OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB + +!if "$(WXMAKINGDLL)" != "0" +EXTRADLLFLAGS=/DWXMAKINGDLL=1 /Ge- /D__OS2DLL__ +EXTRALNKFLAGS=/DLL +!endif + +# Change WXDIR or WXWIN to wherever wxWindows is found +WXDIR = $(WXWIN) + +OS2JPEGDIR=$(WXDIR)\src\jpeg +OS2JPEGINC=$(WINJPEGDIR) +!if "$(WXMAKINGDLL)" != "1" +OS2JPEGLIB=$(WXDIR)\lib\os2jpeg.lib +!else +OS2JPEGLIB=$(WXDIR)\lib\os2jpeg.dll +!endif + +TEMP1TGT=$(WXDIR)\lib\os2jpeg1.lib +TEMP2TGT=$(WXDIR)\lib\os2jpeg2.lib + +INC=-I$(WXDIR)\src\jpeg -I$(WXDIR)\Include +!ifndef FINAL +FINAL=0 +!endif + +!if "$(NOPCH)" == "1" +PCH= +PRECOMP= +MAKEPRECOMP= +!else +PCH=$(WXLIBNAME).pch +PRECOMP=/Si$(PCH) +MAKEPRECOMP=/Fi$(PCH) +!endif + +!if "$(FINAL)" == "0" +!if "$(WXMAKINGDLL)" == "1" +D=DebugOS2DLL +!else +D=DebugOS2 +!endif + +OPT = +DEBUG_FLAGS= /Ti /D__WXDEBUG__ #/Fb +LINK_DEBUG_FLAGS=/DEBUG +CRTFLAG=/Gm /Gd +!else +# /O1 - smallest code +# /O2 - fastest code +!if "$(WXMAKINGDLL)" == "1" +D=RelseOS2DLL +!else +D=RelseOS2 +!endif +OPT = /O+ /Oc /G5 +DEBUG_FLAGS= +LINK_DEBUG_FLAGS=/RELEASE +CRTFLAG=/Gm /Gd +!endif + +!if [md $(OS2JPEGDIR)\$D] +!endif + +CPPFLAGS=$(OS2FLAGS) $(EXTRADLLFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG) +LINKFKAGS=$(OS2LINKFLAGS) $(EXTRALNKFLAGS) + +{..\jpeg}.c{..\jpeg\$D}.obj: + @echo $< + icc @<< +$(CPPFLAGS) /Fo$@ /Tp $< +<< + +SYSDEPMEM= ..\jpeg\$D\jmemnobs.obj + +# library object files common to compression and decompression +COMOBJECTS= \ + ..\jpeg\$D\jcomapi.obj \ + ..\jpeg\$D\jutils.obj \ + ..\jpeg\$D\jerror.obj \ + ..\jpeg\$D\jmemmgr.obj \ + $(SYSDEPMEM) + +COMLIBOBJS= \ + jcomapi.obj \ + jutils.obj \ + jerror.obj \ + jmemmgr.obj \ + jmemnobs + +# compression library object files +CLIBOBJECTS= \ + ..\jpeg\$D\jcapimin.obj \ + ..\jpeg\$D\jcapistd.obj \ + ..\jpeg\$D\jctrans.obj \ + ..\jpeg\$D\jcparam.obj \ + ..\jpeg\$D\jdatadst.obj \ + ..\jpeg\$D\jcinit.obj \ + ..\jpeg\$D\jcmaster.obj \ + ..\jpeg\$D\jcmarker.obj \ + ..\jpeg\$D\jcmainct.obj \ + ..\jpeg\$D\jcprepct.obj \ + ..\jpeg\$D\jccoefct.obj \ + ..\jpeg\$D\jccolor.obj \ + ..\jpeg\$D\jcsample.obj \ + ..\jpeg\$D\jchuff.obj \ + ..\jpeg\$D\jcphuff.obj \ + ..\jpeg\$D\jcdctmgr.obj \ + ..\jpeg\$D\jfdctfst.obj \ + ..\jpeg\$D\jfdctflt.obj \ + ..\jpeg\$D\jfdctint.obj + +CLIBLIBOBJS= \ + jcapimin.obj \ + jcapistd.obj \ + jctrans.obj \ + jcparam.obj \ + jdatadst.obj \ + jcinit.obj \ + jcmaster.obj \ + jcmarker.obj \ + jcmainct.obj \ + jcprepct.obj \ + jccoefct.obj \ + jccolor.obj \ + jcsample.obj \ + jchuff.obj \ + jcphuff.obj \ + jcdctmgr.obj \ + jfdctfst.obj \ + jfdctflt.obj \ + jfdctint.obj + +# decompression library object files +DLIBOBJECTS= \ + ..\jpeg\$D\jdapimin.obj \ + ..\jpeg\$D\jdapistd.obj \ + ..\jpeg\$D\jdtrans.obj \ + ..\jpeg\$D\jdatasrc.obj \ + ..\jpeg\$D\jdmaster.obj \ + ..\jpeg\$D\jdinput.obj \ + ..\jpeg\$D\jdmarker.obj \ + ..\jpeg\$D\jdhuff.obj \ + ..\jpeg\$D\jdphuff.obj \ + ..\jpeg\$D\jdmainct.obj \ + ..\jpeg\$D\jdcoefct.obj \ + ..\jpeg\$D\jdpostct.obj \ + ..\jpeg\$D\jddctmgr.obj \ + ..\jpeg\$D\jidctfst.obj \ + ..\jpeg\$D\jidctflt.obj \ + ..\jpeg\$D\jidctint.obj \ + ..\jpeg\$D\jidctred.obj \ + ..\jpeg\$D\jdsample.obj \ + ..\jpeg\$D\jdcolor.obj \ + ..\jpeg\$D\jquant1.obj \ + ..\jpeg\$D\jquant2.obj \ + ..\jpeg\$D\jdmerge.obj + +DLIBLIBOBJS= \ + jdapimin.obj \ + jdapistd.obj \ + jdtrans.obj \ + jdatasrc.obj \ + jdmaster.obj \ + jdinput.obj \ + jdmarker.obj \ + jdhuff.obj \ + jdphuff.obj \ + jdmainct.obj \ + jdcoefct.obj \ + jdpostct.obj \ + jddctmgr.obj \ + jidctfst.obj \ + jidctflt.obj \ + jidctint.obj \ + jidctred.obj \ + jdsample.obj \ + jdcolor.obj \ + jquant1.obj \ + jquant2.obj \ + jdmerge.obj + +# These objectfiles are included in libjpeg.lib +OBJECTS= $(COMOBJECTS) $(CLIBOBJECTS) $(DLIBOBJECTS) + +# object files for sample applications (excluding library files) +COBJECTS= \ + ..\jpeg\$D\cjpeg.obj \ + ..\jpeg\$D\rdppm.obj \ + ..\jpeg\$D\rdgif.obj \ + ..\jpeg\$D\rdtarga.obj \ + ..\jpeg\$D\rdrle.obj \ + ..\jpeg\$D\rdbmp.obj \ + ..\jpeg\$D\rdswitch.obj \ + ..\jpeg\$D\cdjpeg.obj + +DOBJECTS= \ + ..\jpeg\$D\djpeg.obj \ + ..\jpeg\$D\wrppm.obj \ + ..\jpeg\$D\wrgif.obj \ + ..\jpeg\$D\wrtarga.obj \ + ..\jpeg\$D\wrrle.obj \ + ..\jpeg\$D\wrbmp.obj \ + ..\jpeg\$D\rdcolmap.obj \ + ..\jpeg\$D\cdjpeg.obj + +TROBJECTS= \ + ..\jpeg\$D\jpegtran.obj \ + ..\jpeg\$D\rdswitch.obj \ + ..\jpeg\$D\cdjpeg.obj \ + ..\jpeg\$D\transupp.obj + +all: $(OBJECTS) $(OS2JPEGLIB) + +$(COMLIBOBJS): + copy ..\jpeg\$D\jcomapi.obj + copy ..\jpeg\$D\jutils.obj + copy ..\jpeg\$D\jerror.obj + copy ..\jpeg\$D\jmemmgr.obj + copy ..\jpeg\$D\jmemnobs.obj + +$(CLIBLIBOBJS): + copy ..\jpeg\$D\jcapimin.obj + copy ..\jpeg\$D\jcapistd.obj + copy ..\jpeg\$D\jctrans.obj + copy ..\jpeg\$D\jcparam.obj + copy ..\jpeg\$D\jdatadst.obj + copy ..\jpeg\$D\jcinit.obj + copy ..\jpeg\$D\jcmaster.obj + copy ..\jpeg\$D\jcmarker.obj + copy ..\jpeg\$D\jcmainct.obj + copy ..\jpeg\$D\jcprepct.obj + copy ..\jpeg\$D\jccoefct.obj + copy ..\jpeg\$D\jccolor.obj + copy ..\jpeg\$D\jcsample.obj + copy ..\jpeg\$D\jchuff.obj + copy ..\jpeg\$D\jcphuff.obj + copy ..\jpeg\$D\jcdctmgr.obj + copy ..\jpeg\$D\jfdctfst.obj + copy ..\jpeg\$D\jfdctflt.obj + copy ..\jpeg\$D\jfdctint.obj + +$(DLIBLIBOBJS): + copy ..\jpeg\$D\jdapimin.obj + copy ..\jpeg\$D\jdapistd.obj + copy ..\jpeg\$D\jdtrans.obj + copy ..\jpeg\$D\jdatasrc.obj + copy ..\jpeg\$D\jdmaster.obj + copy ..\jpeg\$D\jdinput.obj + copy ..\jpeg\$D\jdmarker.obj + copy ..\jpeg\$D\jdhuff.obj + copy ..\jpeg\$D\jdphuff.obj + copy ..\jpeg\$D\jdmainct.obj + copy ..\jpeg\$D\jdcoefct.obj + copy ..\jpeg\$D\jdpostct.obj + copy ..\jpeg\$D\jddctmgr.obj + copy ..\jpeg\$D\jidctfst.obj + copy ..\jpeg\$D\jidctflt.obj + copy ..\jpeg\$D\jidctint.obj + copy ..\jpeg\$D\jidctred.obj + copy ..\jpeg\$D\jdsample.obj + copy ..\jpeg\$D\jdcolor.obj + copy ..\jpeg\$D\jquant1.obj + copy ..\jpeg\$D\jquant2.obj + copy ..\jpeg\$D\jdmerge.obj + +!if "$(WXMAKINGDLL)" != "1" + +$(WXDIR)\lib\os2jpeg1.lib: \ + $(COMLIBOBJS) \ + $(CLIBLIBOBJS) + -touch $(WXDIR)\lib\os2jpeg1.lib + -del $(WXDIR)\lib\os2jpeg1.lib + ilib $(OS2LIBFLAGS) $@ @<< + $**; +<< + +$(WXDIR)\lib\os2jpeg2.lib: $(DLIBLIBOBJS) + -touch $(WXDIR)\lib\os2jpeg2.lib + -del $(WXDIR)\lib\os2jpeg2.lib + ilib $(OS2LIBFLAGS) $@ @<< + $**; +<< + +$(WXDIR)\lib\os2jpeg.lib: \ + $(TEMP1TGT) \ + $(TEMP2TGT) + -touch $(WXDIR)\lib\os2jpeg.lib + -del $(WXDIR)\lib\os2jpeg.lib + ilib $(OS2LIBFLAGS) $@ @<< + $**; +<< + del *.obj + del $(TEMP1TGT) + del $(TEMP2TGT) + +!else + +# Update the dynamic link library +$(WXDIR)\lib\os2jpeg.dll: $(OBJECTS) + icc @<< + /B" $(LINKFLAGS)" /Fe$@ + $(LIBS) + $(OBJECTS) + $(WXDIR)\src\os2\os2jpeg.def +<< + implib $(WXDIR)\lib\os2jpegd.lib $(WXDIR)\src\os2\os2jpeg.def + +!endif + +clean: + del $(OS2JPEGLIB) + erase /N $(OS2JPEGDIR)\$D + rd $(OS2JPEGDIR)\$D + +cleanall: clean + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/README b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/README new file mode 100644 index 0000000000..86cc20669d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/README @@ -0,0 +1,385 @@ +The Independent JPEG Group's JPEG software +========================================== + +README for release 6b of 27-Mar-1998 +==================================== + +This distribution contains the sixth public release of the Independent JPEG +Group's free JPEG software. You are welcome to redistribute this software and +to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. + +Serious users of this software (particularly those incorporating it into +larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to +our electronic mailing list. Mailing list members are notified of updates +and have a chance to participate in technical discussions, etc. + +This software is the work of Tom Lane, Philip Gladstone, Jim Boucher, +Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, +Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG +Group. + +IJG is not affiliated with the official ISO JPEG standards committee. + + +DOCUMENTATION ROADMAP +===================== + +This file contains the following sections: + +OVERVIEW General description of JPEG and the IJG software. +LEGAL ISSUES Copyright, lack of warranty, terms of distribution. +REFERENCES Where to learn more about JPEG. +ARCHIVE LOCATIONS Where to find newer versions of this software. +RELATED SOFTWARE Other stuff you should get. +FILE FORMAT WARS Software *not* to get. +TO DO Plans for future IJG releases. + +Other documentation files in the distribution are: + +User documentation: + install.doc How to configure and install the IJG software. + usage.doc Usage instructions for cjpeg, djpeg, jpegtran, + rdjpgcom, and wrjpgcom. + *.1 Unix-style man pages for programs (same info as usage.doc). + wizard.doc Advanced usage instructions for JPEG wizards only. + change.log Version-to-version change highlights. +Programmer and internal documentation: + libjpeg.doc How to use the JPEG library in your own programs. + example.c Sample code for calling the JPEG library. + structure.doc Overview of the JPEG library's internal structure. + filelist.doc Road map of IJG files. + coderules.doc Coding style rules --- please read if you contribute code. + +Please read at least the files install.doc and usage.doc. Useful information +can also be found in the JPEG FAQ (Frequently Asked Questions) article. See +ARCHIVE LOCATIONS below to find out where to obtain the FAQ article. + +If you want to understand how the JPEG code works, we suggest reading one or +more of the REFERENCES, then looking at the documentation files (in roughly +the order listed) before diving into the code. + + +OVERVIEW +======== + +This package contains C software to implement JPEG image compression and +decompression. JPEG (pronounced "jay-peg") is a standardized compression +method for full-color and gray-scale images. JPEG is intended for compressing +"real-world" scenes; line drawings, cartoons and other non-realistic images +are not its strong suit. JPEG is lossy, meaning that the output image is not +exactly identical to the input image. Hence you must not use JPEG if you +have to have identical output bits. However, on typical photographic images, +very good compression levels can be obtained with no visible change, and +remarkably high compression levels are possible if you can tolerate a +low-quality image. For more details, see the references, or just experiment +with various compression settings. + +This software implements JPEG baseline, extended-sequential, and progressive +compression processes. Provision is made for supporting all variants of these +processes, although some uncommon parameter settings aren't implemented yet. +For legal reasons, we are not distributing code for the arithmetic-coding +variants of JPEG; see LEGAL ISSUES. We have made no provision for supporting +the hierarchical or lossless processes defined in the standard. + +We provide a set of library routines for reading and writing JPEG image files, +plus two sample applications "cjpeg" and "djpeg", which use the library to +perform conversion between JPEG and some other popular image file formats. +The library is intended to be reused in other applications. + +In order to support file conversion and viewing software, we have included +considerable functionality beyond the bare JPEG coding/decoding capability; +for example, the color quantization modules are not strictly part of JPEG +decoding, but they are essential for output to colormapped file formats or +colormapped displays. These extra functions can be compiled out of the +library if not required for a particular application. We have also included +"jpegtran", a utility for lossless transcoding between different JPEG +processes, and "rdjpgcom" and "wrjpgcom", two simple applications for +inserting and extracting textual comments in JFIF files. + +The emphasis in designing this software has been on achieving portability and +flexibility, while also making it fast enough to be useful. In particular, +the software is not intended to be read as a tutorial on JPEG. (See the +REFERENCES section for introductory material.) Rather, it is intended to +be reliable, portable, industrial-strength code. We do not claim to have +achieved that goal in every aspect of the software, but we strive for it. + +We welcome the use of this software as a component of commercial products. +No royalty is required, but we do ask for an acknowledgement in product +documentation, as described under LEGAL ISSUES. + + +LEGAL ISSUES +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1998, Thomas G. Lane. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, +sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. +ansi2knr.c is NOT covered by the above copyright and conditions, but instead +by the usual distribution terms of the Free Software Foundation; principally, +that you must include source code if you redistribute it. (See the file +ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part +of any program generated from the IJG code, this does not limit you more than +the foregoing paragraphs do. + +The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltconfig, ltmain.sh). Another support script, install-sh, is copyright +by M.I.T. but is also freely distributable. + +It appears that the arithmetic coding option of the JPEG spec is covered by +patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot +legally be used without obtaining one or more licenses. For this reason, +support for arithmetic coding has been removed from the free JPEG software. +(Since arithmetic coding provides only a marginal gain over the unpatented +Huffman mode, it is unlikely that very many implementations will support it.) +So far as we are aware, there are no patent restrictions on the remaining +code. + +The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent, GIF reading support has +been removed altogether, and the GIF writer has been simplified to produce +"uncompressed GIFs". This technique does not use the LZW algorithm; the +resulting GIF files are larger than usual, but are readable by all standard +GIF decoders. + +We are required to state that + "The Graphics Interchange Format(c) is the Copyright property of + CompuServe Incorporated. GIF(sm) is a Service Mark property of + CompuServe Incorporated." + + +REFERENCES +========== + +We highly recommend reading one or more of these references before trying to +understand the innards of the JPEG software. + +The best short technical introduction to the JPEG compression algorithm is + Wallace, Gregory K. "The JPEG Still Picture Compression Standard", + Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44. +(Adjacent articles in that issue discuss MPEG motion picture compression, +applications of JPEG, and related topics.) If you don't have the CACM issue +handy, a PostScript file containing a revised version of Wallace's article is +available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz. The file (actually +a preprint for an article that appeared in IEEE Trans. Consumer Electronics) +omits the sample images that appeared in CACM, but it includes corrections +and some added material. Note: the Wallace article is copyright ACM and IEEE, +and it may not be used for commercial purposes. + +A somewhat less technical, more leisurely introduction to JPEG can be found in +"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by +M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides +good explanations and example C code for a multitude of compression methods +including JPEG. It is an excellent source if you are comfortable reading C +code but don't know much about data compression in general. The book's JPEG +sample code is far from industrial-strength, but when you are ready to look +at a full implementation, you've got one here... + +The best full description of JPEG is the textbook "JPEG Still Image Data +Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published +by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp. +The book includes the complete text of the ISO JPEG standards (DIS 10918-1 +and draft DIS 10918-2). This is by far the most complete exposition of JPEG +in existence, and we highly recommend it. + +The JPEG standard itself is not available electronically; you must order a +paper copy through ISO or ITU. (Unless you feel a need to own a certified +official copy, we recommend buying the Pennebaker and Mitchell book instead; +it's much cheaper and includes a great deal of useful explanatory material.) +In the USA, copies of the standard may be ordered from ANSI Sales at (212) +642-4900, or from Global Engineering Documents at (800) 854-7179. (ANSI +doesn't take credit card orders, but Global does.) It's not cheap: as of +1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7% +shipping/handling. The standard is divided into two parts, Part 1 being the +actual specification, while Part 2 covers compliance testing methods. Part 1 +is titled "Digital Compression and Coding of Continuous-tone Still Images, +Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS +10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of +Continuous-tone Still Images, Part 2: Compliance testing" and has document +numbers ISO/IEC IS 10918-2, ITU-T T.83. + +Some extensions to the original JPEG standard are defined in JPEG Part 3, +a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84. IJG +currently does not support any Part 3 extensions. + +The JPEG standard does not specify all details of an interchangeable file +format. For the omitted details we follow the "JFIF" conventions, revision +1.02. A copy of the JFIF spec is available from: + Literature Department + C-Cube Microsystems, Inc. + 1778 McCarthy Blvd. + Milpitas, CA 95035 + phone (408) 944-6300, fax (408) 944-6314 +A PostScript version of this document is available by FTP at +ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz. There is also a plain text +version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing +the figures. + +The TIFF 6.0 file format specification can be obtained by FTP from +ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme +found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems. +IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6). +Instead, we recommend the JPEG design proposed by TIFF Technical Note #2 +(Compression tag 7). Copies of this Note can be obtained from ftp.sgi.com or +from ftp://ftp.uu.net/graphics/jpeg/. It is expected that the next revision +of the TIFF spec will replace the 6.0 JPEG design with the Note's design. +Although IJG's own code does not support TIFF/JPEG, the free libtiff library +uses our library to implement TIFF/JPEG per the Note. libtiff is available +from ftp://ftp.sgi.com/graphics/tiff/. + + +ARCHIVE LOCATIONS +================= + +The "official" archive site for this software is ftp.uu.net (Internet +address 192.48.96.9). The most recent released version can always be found +there in directory graphics/jpeg. This particular version will be archived +as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz. If you don't have +direct Internet access, UUNET's archives are also available via UUCP; contact +help@uunet.uu.net for information on retrieving files that way. + +Numerous Internet sites maintain copies of the UUNET files. However, only +ftp.uu.net is guaranteed to have the latest official version. + +You can also obtain this software in DOS-compatible "zip" archive format from +the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or +on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12 +"JPEG Tools". Again, these versions may sometimes lag behind the ftp.uu.net +release. + +The JPEG FAQ (Frequently Asked Questions) article is a useful source of +general information about JPEG. It is updated constantly and therefore is +not included in this distribution. The FAQ is posted every two weeks to +Usenet newsgroups comp.graphics.misc, news.answers, and other groups. +It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/ +and other news.answers archive sites, including the official news.answers +archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/. +If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu +with body + send usenet/news.answers/jpeg-faq/part1 + send usenet/news.answers/jpeg-faq/part2 + + +RELATED SOFTWARE +================ + +Numerous viewing and image manipulation programs now support JPEG. (Quite a +few of them use this library to do so.) The JPEG FAQ described above lists +some of the more popular free and shareware viewers, and tells where to +obtain them on Internet. + +If you are on a Unix machine, we highly recommend Jef Poskanzer's free +PBMPLUS software, which provides many useful operations on PPM-format image +files. In particular, it can convert PPM images to and from a wide range of +other formats, thus making cjpeg/djpeg considerably more useful. The latest +version is distributed by the NetPBM group, and is available from numerous +sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/. +Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is; +you are likely to have difficulty making it work on any non-Unix machine. + +A different free JPEG implementation, written by the PVRG group at Stanford, +is available from ftp://havefun.stanford.edu/pub/jpeg/. This program +is designed for research and experimentation rather than production use; +it is slower, harder to use, and less portable than the IJG code, but it +is easier to read and modify. Also, the PVRG code supports lossless JPEG, +which we do not. (On the other hand, it doesn't do progressive JPEG.) + + +FILE FORMAT WARS +================ + +Some JPEG programs produce files that are not compatible with our library. +The root of the problem is that the ISO JPEG committee failed to specify a +concrete file format. Some vendors "filled in the blanks" on their own, +creating proprietary formats that no one else could read. (For example, none +of the early commercial JPEG implementations for the Macintosh were able to +exchange compressed files.) + +The file format we have adopted is called JFIF (see REFERENCES). This format +has been agreed to by a number of major commercial JPEG vendors, and it has +become the de facto standard. JFIF is a minimal or "low end" representation. +We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF +Technical Note #2) for "high end" applications that need to record a lot of +additional data about an image. TIFF/JPEG is fairly new and not yet widely +supported, unfortunately. + +The upcoming JPEG Part 3 standard defines a file format called SPIFF. +SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should +be able to read the most common variant of SPIFF. SPIFF has some technical +advantages over JFIF, but its major claim to fame is simply that it is an +official standard rather than an informal one. At this point it is unclear +whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto +standard. IJG intends to support SPIFF once the standard is frozen, but we +have not decided whether it should become our default output format or not. +(In any case, our decoder will remain capable of reading JFIF indefinitely.) + +Various proprietary file formats incorporating JPEG compression also exist. +We have little or no sympathy for the existence of these formats. Indeed, +one of the original reasons for developing this free software was to help +force convergence on common, open format standards for JPEG files. Don't +use a proprietary file format! + + +TO DO +===== + +The major thrust for v7 will probably be improvement of visual quality. +The current method for scaling the quantization tables is known not to be +very good at low Q values. We also intend to investigate block boundary +smoothing, "poor man's variable quantization", and other means of improving +quality-vs-file-size performance without sacrificing compatibility. + +In future versions, we are considering supporting some of the upcoming JPEG +Part 3 extensions --- principally, variable quantization and the SPIFF file +format. + +As always, speeding things up is of great interest. + +Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net. diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/ansi2knr.1 b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/ansi2knr.1 new file mode 100644 index 0000000000..f9ee5a631c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/ansi2knr.1 @@ -0,0 +1,36 @@ +.TH ANSI2KNR 1 "19 Jan 1996" +.SH NAME +ansi2knr \- convert ANSI C to Kernighan & Ritchie C +.SH SYNOPSIS +.I ansi2knr +[--varargs] input_file [output_file] +.SH DESCRIPTION +If no output_file is supplied, output goes to stdout. +.br +There are no error messages. +.sp +.I ansi2knr +recognizes function definitions by seeing a non-keyword identifier at the left +margin, followed by a left parenthesis, with a right parenthesis as the last +character on the line, and with a left brace as the first token on the +following line (ignoring possible intervening comments). It will recognize a +multi-line header provided that no intervening line ends with a left or right +brace or a semicolon. These algorithms ignore whitespace and comments, except +that the function name must be the first thing on the line. +.sp +The following constructs will confuse it: +.br + - Any other construct that starts at the left margin and follows the +above syntax (such as a macro or function call). +.br + - Some macros that tinker with the syntax of the function header. +.sp +The --varargs switch is obsolete, and is recognized only for +backwards compatibility. The present version of +.I ansi2knr +will always attempt to convert a ... argument to va_alist and va_dcl. +.SH AUTHOR +L. Peter Deutsch wrote the original ansi2knr and +continues to maintain the current version; most of the code in the current +version is his work. ansi2knr also includes contributions by Francois +Pinard and Jim Avera . diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/ansi2knr.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/ansi2knr.c new file mode 100644 index 0000000000..4e05fc2d32 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/ansi2knr.c @@ -0,0 +1,693 @@ +/* ansi2knr.c */ +/* Convert ANSI C function definitions to K&R ("traditional C") syntax */ + +/* +ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY. No author or distributor accepts responsibility to anyone for the +consequences of using it or for whether it serves any particular purpose or +works at all, unless he says so in writing. Refer to the GNU General Public +License (the "GPL") for full details. + +Everyone is granted permission to copy, modify and redistribute ansi2knr, +but only under the conditions described in the GPL. A copy of this license +is supposed to have been given to you along with ansi2knr so you can know +your rights and responsibilities. It should be in a file named COPYLEFT. +[In the IJG distribution, the GPL appears below, not in a separate file.] +Among other things, the copyright notice and this notice must be preserved +on all copies. + +We explicitly state here what we believe is already implied by the GPL: if +the ansi2knr program is distributed as a separate set of sources and a +separate executable file which are aggregated on a storage medium together +with another program, this in itself does not bring the other program under +the GPL, nor does the mere fact that such a program or the procedures for +constructing it invoke the ansi2knr executable bring any other part of the +program under the GPL. +*/ + +/* +---------- Here is the GNU GPL file COPYLEFT, referred to above ---------- +----- These terms do NOT apply to the JPEG software itself; see README ------ + + GHOSTSCRIPT GENERAL PUBLIC LICENSE + (Clarified 11 Feb 1988) + + Copyright (C) 1988 Richard M. Stallman + Everyone is permitted to copy and distribute verbatim copies of this + license, but changing it is not allowed. You can also use this wording + to make the terms for other programs. + + The license agreements of most software companies keep you at the +mercy of those companies. By contrast, our general public license is +intended to give everyone the right to share Ghostscript. To make sure +that you get the rights we want you to have, we need to make +restrictions that forbid anyone to deny you these rights or to ask you +to surrender the rights. Hence this license agreement. + + Specifically, we want to make sure that you have the right to give +away copies of Ghostscript, that you receive source code or else can get +it if you want it, that you can change Ghostscript or use pieces of it +in new free programs, and that you know you can do these things. + + To make sure that everyone has such rights, we have to forbid you to +deprive anyone else of these rights. For example, if you distribute +copies of Ghostscript, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + Also, for our own protection, we must make certain that everyone finds +out that there is no warranty for Ghostscript. If Ghostscript is +modified by someone else and passed on, we want its recipients to know +that what they have is not what we distributed, so that any problems +introduced by others will not reflect on our reputation. + + Therefore we (Richard M. Stallman and the Free Software Foundation, +Inc.) make the following terms which say what you must do to be allowed +to distribute or change Ghostscript. + + + COPYING POLICIES + + 1. You may copy and distribute verbatim copies of Ghostscript source +code as you receive it, in any medium, provided that you conspicuously +and appropriately publish on each copy a valid copyright and license +notice "Copyright (C) 1989 Aladdin Enterprises. All rights reserved. +Distributed by Free Software Foundation, Inc." (or with whatever year is +appropriate); keep intact the notices on all files that refer to this +License Agreement and to the absence of any warranty; and give any other +recipients of the Ghostscript program a copy of this License Agreement +along with the program. You may charge a distribution fee for the +physical act of transferring a copy. + + 2. You may modify your copy or copies of Ghostscript or any portion of +it, and copy and distribute such modifications under the terms of +Paragraph 1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating + that you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, + that in whole or in part contains or is a derivative of Ghostscript + or any part thereof, to be licensed at no charge to all third + parties on terms identical to those contained in this License + Agreement (except that you may choose to grant more extensive + warranty protection to some or all third parties, at your option). + + c) You may charge a distribution fee for the physical act of + transferring a copy, and you may at your option offer warranty + protection in exchange for a fee. + +Mere aggregation of another unrelated program with this program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other program under the scope of these terms. + + 3. You may copy and distribute Ghostscript (or a portion or derivative +of it, under Paragraph 2) in object code or executable form under the +terms of Paragraphs 1 and 2 above provided that you also do one of the +following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal + shipping charge) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +For an executable file, complete source code means all the source code for +all modules it contains; but, as a special exception, it need not include +source code for modules which are standard libraries that accompany the +operating system on which the executable file runs. + + 4. You may not copy, sublicense, distribute or transfer Ghostscript +except as expressly provided under this License Agreement. Any attempt +otherwise to copy, sublicense, distribute or transfer Ghostscript is +void and your rights to use the program under this License agreement +shall be automatically terminated. However, parties who have received +computer software programs from you with this License Agreement will not +have their licenses terminated so long as such parties remain in full +compliance. + + 5. If you wish to incorporate parts of Ghostscript into other free +programs whose distribution conditions are different, write to the Free +Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not +yet worked out a simple rule that can be stated here, but we will often +permit this. We will be guided by the two goals of preserving the free +status of all derivatives of our free software and of promoting the +sharing and reuse of software. + +Your comments and suggestions about our licensing policies and our +software are welcome! Please contact the Free Software Foundation, +Inc., 675 Mass Ave, Cambridge, MA 02139, or call (617) 876-3296. + + NO WARRANTY + + BECAUSE GHOSTSCRIPT IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY +NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT +WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, RICHARD +M. STALLMAN, ALADDIN ENTERPRISES, L. PETER DEUTSCH, AND/OR OTHER PARTIES +PROVIDE GHOSTSCRIPT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE +ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF GHOSTSCRIPT IS WITH +YOU. SHOULD GHOSTSCRIPT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL +NECESSARY SERVICING, REPAIR OR CORRECTION. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M. +STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., L. PETER DEUTSCH, ALADDIN +ENTERPRISES, AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE +GHOSTSCRIPT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING +ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE +(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED +INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE +PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) GHOSTSCRIPT, EVEN IF YOU +HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM +BY ANY OTHER PARTY. + +-------------------- End of file COPYLEFT ------------------------------ +*/ + +/* + * Usage: + ansi2knr input_file [output_file] + * If no output_file is supplied, output goes to stdout. + * There are no error messages. + * + * ansi2knr recognizes function definitions by seeing a non-keyword + * identifier at the left margin, followed by a left parenthesis, + * with a right parenthesis as the last character on the line, + * and with a left brace as the first token on the following line + * (ignoring possible intervening comments). + * It will recognize a multi-line header provided that no intervening + * line ends with a left or right brace or a semicolon. + * These algorithms ignore whitespace and comments, except that + * the function name must be the first thing on the line. + * The following constructs will confuse it: + * - Any other construct that starts at the left margin and + * follows the above syntax (such as a macro or function call). + * - Some macros that tinker with the syntax of the function header. + */ + +/* + * The original and principal author of ansi2knr is L. Peter Deutsch + * . Other authors are noted in the change history + * that follows (in reverse chronological order): + lpd 96-01-21 added code to cope with not HAVE_CONFIG_H and with + compilers that don't understand void, as suggested by + Tom Lane + lpd 96-01-15 changed to require that the first non-comment token + on the line following a function header be a left brace, + to reduce sensitivity to macros, as suggested by Tom Lane + + lpd 95-06-22 removed #ifndefs whose sole purpose was to define + undefined preprocessor symbols as 0; changed all #ifdefs + for configuration symbols to #ifs + lpd 95-04-05 changed copyright notice to make it clear that + including ansi2knr in a program does not bring the entire + program under the GPL + lpd 94-12-18 added conditionals for systems where ctype macros + don't handle 8-bit characters properly, suggested by + Francois Pinard ; + removed --varargs switch (this is now the default) + lpd 94-10-10 removed CONFIG_BROKETS conditional + lpd 94-07-16 added some conditionals to help GNU `configure', + suggested by Francois Pinard ; + properly erase prototype args in function parameters, + contributed by Jim Avera ; + correct error in writeblanks (it shouldn't erase EOLs) + lpd 89-xx-xx original version + */ + +/* Most of the conditionals here are to make ansi2knr work with */ +/* or without the GNU configure machinery. */ + +#if HAVE_CONFIG_H +# include +#endif + +#include +#include + +#if HAVE_CONFIG_H + +/* + For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h). + This will define HAVE_CONFIG_H and so, activate the following lines. + */ + +# if STDC_HEADERS || HAVE_STRING_H +# include +# else +# include +# endif + +#else /* not HAVE_CONFIG_H */ + +/* Otherwise do it the hard way */ + +# ifdef BSD +# include +# else +# ifdef VMS + extern int strlen(), strncmp(); +# else +# include +# endif +# endif + +#endif /* not HAVE_CONFIG_H */ + +#if STDC_HEADERS +# include +#else +/* + malloc and free should be declared in stdlib.h, + but if you've got a K&R compiler, they probably aren't. + */ +# ifdef MSDOS +# include +# else +# ifdef VMS + extern char *malloc(); + extern void free(); +# else + extern char *malloc(); + extern int free(); +# endif +# endif + +#endif + +/* + * The ctype macros don't always handle 8-bit characters correctly. + * Compensate for this here. + */ +#ifdef isascii +# undef HAVE_ISASCII /* just in case */ +# define HAVE_ISASCII 1 +#else +#endif +#if STDC_HEADERS || !HAVE_ISASCII +# define is_ascii(c) 1 +#else +# define is_ascii(c) isascii(c) +#endif + +#define is_space(c) (is_ascii(c) && isspace(c)) +#define is_alpha(c) (is_ascii(c) && isalpha(c)) +#define is_alnum(c) (is_ascii(c) && isalnum(c)) + +/* Scanning macros */ +#define isidchar(ch) (is_alnum(ch) || (ch) == '_') +#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_') + +/* Forward references */ +char *skipspace(); +int writeblanks(); +int test1(); +int convert1(); + +/* The main program */ +int +main(argc, argv) + int argc; + char *argv[]; +{ FILE *in, *out; +#define bufsize 5000 /* arbitrary size */ + char *buf; + char *line; + char *more; + /* + * In previous versions, ansi2knr recognized a --varargs switch. + * If this switch was supplied, ansi2knr would attempt to convert + * a ... argument to va_alist and va_dcl; if this switch was not + * supplied, ansi2knr would simply drop any such arguments. + * Now, ansi2knr always does this conversion, and we only + * check for this switch for backward compatibility. + */ + int convert_varargs = 1; + + if ( argc > 1 && argv[1][0] == '-' ) + { if ( !strcmp(argv[1], "--varargs") ) + { convert_varargs = 1; + argc--; + argv++; + } + else + { fprintf(stderr, "Unrecognized switch: %s\n", argv[1]); + exit(1); + } + } + switch ( argc ) + { + default: + printf("Usage: ansi2knr input_file [output_file]\n"); + exit(0); + case 2: + out = stdout; + break; + case 3: + out = fopen(argv[2], "w"); + if ( out == NULL ) + { fprintf(stderr, "Cannot open output file %s\n", argv[2]); + exit(1); + } + } + in = fopen(argv[1], "r"); + if ( in == NULL ) + { fprintf(stderr, "Cannot open input file %s\n", argv[1]); + exit(1); + } + fprintf(out, "#line 1 \"%s\"\n", argv[1]); + buf = malloc(bufsize); + line = buf; + while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL ) + { +test: line += strlen(line); + switch ( test1(buf) ) + { + case 2: /* a function header */ + convert1(buf, out, 1, convert_varargs); + break; + case 1: /* a function */ + /* Check for a { at the start of the next line. */ + more = ++line; +f: if ( line >= buf + (bufsize - 1) ) /* overflow check */ + goto wl; + if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL ) + goto wl; + switch ( *skipspace(more, 1) ) + { + case '{': + /* Definitely a function header. */ + convert1(buf, out, 0, convert_varargs); + fputs(more, out); + break; + case 0: + /* The next line was blank or a comment: */ + /* keep scanning for a non-comment. */ + line += strlen(line); + goto f; + default: + /* buf isn't a function header, but */ + /* more might be. */ + fputs(buf, out); + strcpy(buf, more); + line = buf; + goto test; + } + break; + case -1: /* maybe the start of a function */ + if ( line != buf + (bufsize - 1) ) /* overflow check */ + continue; + /* falls through */ + default: /* not a function */ +wl: fputs(buf, out); + break; + } + line = buf; + } + if ( line != buf ) + fputs(buf, out); + free(buf); + fclose(out); + fclose(in); + return 0; +} + +/* Skip over space and comments, in either direction. */ +char * +skipspace(p, dir) + register char *p; + register int dir; /* 1 for forward, -1 for backward */ +{ for ( ; ; ) + { while ( is_space(*p) ) + p += dir; + if ( !(*p == '/' && p[dir] == '*') ) + break; + p += dir; p += dir; + while ( !(*p == '*' && p[dir] == '/') ) + { if ( *p == 0 ) + return p; /* multi-line comment?? */ + p += dir; + } + p += dir; p += dir; + } + return p; +} + +/* + * Write blanks over part of a string. + * Don't overwrite end-of-line characters. + */ +int +writeblanks(start, end) + char *start; + char *end; +{ char *p; + for ( p = start; p < end; p++ ) + if ( *p != '\r' && *p != '\n' ) + *p = ' '; + return 0; +} + +/* + * Test whether the string in buf is a function definition. + * The string may contain and/or end with a newline. + * Return as follows: + * 0 - definitely not a function definition; + * 1 - definitely a function definition; + * 2 - definitely a function prototype (NOT USED); + * -1 - may be the beginning of a function definition, + * append another line and look again. + * The reason we don't attempt to convert function prototypes is that + * Ghostscript's declaration-generating macros look too much like + * prototypes, and confuse the algorithms. + */ +int +test1(buf) + char *buf; +{ register char *p = buf; + char *bend; + char *endfn; + int contin; + + if ( !isidfirstchar(*p) ) + return 0; /* no name at left margin */ + bend = skipspace(buf + strlen(buf) - 1, -1); + switch ( *bend ) + { + case ';': contin = 0 /*2*/; break; + case ')': contin = 1; break; + case '{': return 0; /* not a function */ + case '}': return 0; /* not a function */ + default: contin = -1; + } + while ( isidchar(*p) ) + p++; + endfn = p; + p = skipspace(p, 1); + if ( *p++ != '(' ) + return 0; /* not a function */ + p = skipspace(p, 1); + if ( *p == ')' ) + return 0; /* no parameters */ + /* Check that the apparent function name isn't a keyword. */ + /* We only need to check for keywords that could be followed */ + /* by a left parenthesis (which, unfortunately, is most of them). */ + { static char *words[] = + { "asm", "auto", "case", "char", "const", "double", + "extern", "float", "for", "if", "int", "long", + "register", "return", "short", "signed", "sizeof", + "static", "switch", "typedef", "unsigned", + "void", "volatile", "while", 0 + }; + char **key = words; + char *kp; + int len = endfn - buf; + + while ( (kp = *key) != 0 ) + { if ( strlen(kp) == len && !strncmp(kp, buf, len) ) + return 0; /* name is a keyword */ + key++; + } + } + return contin; +} + +/* Convert a recognized function definition or header to K&R syntax. */ +int +convert1(buf, out, header, convert_varargs) + char *buf; + FILE *out; + int header; /* Boolean */ + int convert_varargs; /* Boolean */ +{ char *endfn; + register char *p; + char **breaks; + unsigned num_breaks = 2; /* for testing */ + char **btop; + char **bp; + char **ap; + char *vararg = 0; + + /* Pre-ANSI implementations don't agree on whether strchr */ + /* is called strchr or index, so we open-code it here. */ + for ( endfn = buf; *(endfn++) != '('; ) + ; +top: p = endfn; + breaks = (char **)malloc(sizeof(char *) * num_breaks * 2); + if ( breaks == 0 ) + { /* Couldn't allocate break table, give up */ + fprintf(stderr, "Unable to allocate break table!\n"); + fputs(buf, out); + return -1; + } + btop = breaks + num_breaks * 2 - 2; + bp = breaks; + /* Parse the argument list */ + do + { int level = 0; + char *lp = NULL; + char *rp; + char *end = NULL; + + if ( bp >= btop ) + { /* Filled up break table. */ + /* Allocate a bigger one and start over. */ + free((char *)breaks); + num_breaks <<= 1; + goto top; + } + *bp++ = p; + /* Find the end of the argument */ + for ( ; end == NULL; p++ ) + { switch(*p) + { + case ',': + if ( !level ) end = p; + break; + case '(': + if ( !level ) lp = p; + level++; + break; + case ')': + if ( --level < 0 ) end = p; + else rp = p; + break; + case '/': + p = skipspace(p, 1) - 1; + break; + default: + ; + } + } + /* Erase any embedded prototype parameters. */ + if ( lp ) + writeblanks(lp + 1, rp); + p--; /* back up over terminator */ + /* Find the name being declared. */ + /* This is complicated because of procedure and */ + /* array modifiers. */ + for ( ; ; ) + { p = skipspace(p - 1, -1); + switch ( *p ) + { + case ']': /* skip array dimension(s) */ + case ')': /* skip procedure args OR name */ + { int level = 1; + while ( level ) + switch ( *--p ) + { + case ']': case ')': level++; break; + case '[': case '(': level--; break; + case '/': p = skipspace(p, -1) + 1; break; + default: ; + } + } + if ( *p == '(' && *skipspace(p + 1, 1) == '*' ) + { /* We found the name being declared */ + while ( !isidfirstchar(*p) ) + p = skipspace(p, 1) + 1; + goto found; + } + break; + default: + goto found; + } + } +found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' ) + { if ( convert_varargs ) + { *bp++ = "va_alist"; + vararg = p-2; + } + else + { p++; + if ( bp == breaks + 1 ) /* sole argument */ + writeblanks(breaks[0], p); + else + writeblanks(bp[-1] - 1, p); + bp--; + } + } + else + { while ( isidchar(*p) ) p--; + *bp++ = p+1; + } + p = end; + } + while ( *p++ == ',' ); + *bp = p; + /* Make a special check for 'void' arglist */ + if ( bp == breaks+2 ) + { p = skipspace(breaks[0], 1); + if ( !strncmp(p, "void", 4) ) + { p = skipspace(p+4, 1); + if ( p == breaks[2] - 1 ) + { bp = breaks; /* yup, pretend arglist is empty */ + writeblanks(breaks[0], p + 1); + } + } + } + /* Put out the function name and left parenthesis. */ + p = buf; + while ( p != endfn ) putc(*p, out), p++; + /* Put out the declaration. */ + if ( header ) + { fputs(");", out); + for ( p = breaks[0]; *p; p++ ) + if ( *p == '\r' || *p == '\n' ) + putc(*p, out); + } + else + { for ( ap = breaks+1; ap < bp; ap += 2 ) + { p = *ap; + while ( isidchar(*p) ) + putc(*p, out), p++; + if ( ap < bp - 1 ) + fputs(", ", out); + } + fputs(") ", out); + /* Put out the argument declarations */ + for ( ap = breaks+2; ap <= bp; ap += 2 ) + (*ap)[-1] = ';'; + if ( vararg != 0 ) + { *vararg = 0; + fputs(breaks[0], out); /* any prior args */ + fputs("va_dcl", out); /* the final arg */ + fputs(bp[0], out); + } + else + fputs(breaks[0], out); + } + free((char *)breaks); + return 0; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcapimin.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcapimin.c new file mode 100644 index 0000000000..270a353685 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcapimin.c @@ -0,0 +1,280 @@ +/* + * jcapimin.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the compression half + * of the JPEG library. These are the "minimum" API routines that may be + * needed in either the normal full-compression case or the transcoding-only + * case. + * + * Most of the routines intended to be called directly by an application + * are in this file or in jcapistd.c. But also see jcparam.c for + * parameter-setup helper routines, jcomapi.c for routines shared by + * compression and decompression, and jctrans.c for the transcoding case. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Initialization of a JPEG compression object. + * The error manager must already be set up (in case memory manager fails). + */ + +GLOBAL(void) +jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) +{ + int i; + + /* Guard against version mismatches between library and caller. */ + cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ + if (version != JPEG_LIB_VERSION) + ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); + if (structsize != SIZEOF(struct jpeg_compress_struct)) + ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, + (int) SIZEOF(struct jpeg_compress_struct), (int) structsize); + + /* For debugging purposes, we zero the whole master structure. + * But the application has already set the err pointer, and may have set + * client_data, so we have to save and restore those fields. + * Note: if application hasn't set client_data, tools like Purify may + * complain here. + */ + { + struct jpeg_error_mgr * err = cinfo->err; + void * client_data = cinfo->client_data; /* ignore Purify complaint here */ + MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct)); + cinfo->err = err; + cinfo->client_data = client_data; + } + cinfo->is_decompressor = FALSE; + + /* Initialize a memory manager instance for this object */ + jinit_memory_mgr((j_common_ptr) cinfo); + + /* Zero out pointers to permanent structures. */ + cinfo->progress = NULL; + cinfo->dest = NULL; + + cinfo->comp_info = NULL; + + for (i = 0; i < NUM_QUANT_TBLS; i++) + cinfo->quant_tbl_ptrs[i] = NULL; + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + cinfo->dc_huff_tbl_ptrs[i] = NULL; + cinfo->ac_huff_tbl_ptrs[i] = NULL; + } + + cinfo->script_space = NULL; + + cinfo->input_gamma = 1.0; /* in case application forgets */ + + /* OK, I'm ready */ + cinfo->global_state = CSTATE_START; +} + + +/* + * Destruction of a JPEG compression object + */ + +GLOBAL(void) +jpeg_destroy_compress (j_compress_ptr cinfo) +{ + jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Abort processing of a JPEG compression operation, + * but don't destroy the object itself. + */ + +GLOBAL(void) +jpeg_abort_compress (j_compress_ptr cinfo) +{ + jpeg_abort((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Forcibly suppress or un-suppress all quantization and Huffman tables. + * Marks all currently defined tables as already written (if suppress) + * or not written (if !suppress). This will control whether they get emitted + * by a subsequent jpeg_start_compress call. + * + * This routine is exported for use by applications that want to produce + * abbreviated JPEG datastreams. It logically belongs in jcparam.c, but + * since it is called by jpeg_start_compress, we put it here --- otherwise + * jcparam.o would be linked whether the application used it or not. + */ + +GLOBAL(void) +jpeg_suppress_tables (j_compress_ptr cinfo, wxjpeg_boolean suppress) +{ + int i; + JQUANT_TBL * qtbl; + JHUFF_TBL * htbl; + + for (i = 0; i < NUM_QUANT_TBLS; i++) { + if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL) + qtbl->sent_table = suppress; + } + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL) + htbl->sent_table = suppress; + if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL) + htbl->sent_table = suppress; + } +} + + +/* + * Finish JPEG compression. + * + * If a multipass operating mode was selected, this may do a great deal of + * work including most of the actual output. + */ + +GLOBAL(void) +jpeg_finish_compress (j_compress_ptr cinfo) +{ + JDIMENSION iMCU_row; + + if (cinfo->global_state == CSTATE_SCANNING || + cinfo->global_state == CSTATE_RAW_OK) { + /* Terminate first pass */ + if (cinfo->next_scanline < cinfo->image_height) + ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); + (*cinfo->master->finish_pass) (cinfo); + } else if (cinfo->global_state != CSTATE_WRCOEFS) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Perform any remaining passes */ + while (! cinfo->master->is_last_pass) { + (*cinfo->master->prepare_for_pass) (cinfo); + for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) { + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) iMCU_row; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + /* We bypass the main controller and invoke coef controller directly; + * all work is being done from the coefficient buffer. + */ + if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + } + (*cinfo->master->finish_pass) (cinfo); + } + /* Write EOI, do final cleanup */ + (*cinfo->marker->write_file_trailer) (cinfo); + (*cinfo->dest->term_destination) (cinfo); + /* We can use jpeg_abort to release memory and reset global_state */ + jpeg_abort((j_common_ptr) cinfo); +} + + +/* + * Write a special marker. + * This is only recommended for writing COM or APPn markers. + * Must be called after jpeg_start_compress() and before + * first call to jpeg_write_scanlines() or jpeg_write_raw_data(). + */ + +GLOBAL(void) +jpeg_write_marker (j_compress_ptr cinfo, int marker, + const JOCTET *dataptr, unsigned int datalen) +{ + JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val)); + + if (cinfo->next_scanline != 0 || + (cinfo->global_state != CSTATE_SCANNING && + cinfo->global_state != CSTATE_RAW_OK && + cinfo->global_state != CSTATE_WRCOEFS)) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); + write_marker_byte = cinfo->marker->write_marker_byte; /* copy for speed */ + while (datalen--) { + (*write_marker_byte) (cinfo, *dataptr); + dataptr++; + } +} + +/* Same, but piecemeal. */ + +GLOBAL(void) +jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen) +{ + if (cinfo->next_scanline != 0 || + (cinfo->global_state != CSTATE_SCANNING && + cinfo->global_state != CSTATE_RAW_OK && + cinfo->global_state != CSTATE_WRCOEFS)) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); +} + +GLOBAL(void) +jpeg_write_m_byte (j_compress_ptr cinfo, int val) +{ + (*cinfo->marker->write_marker_byte) (cinfo, val); +} + + +/* + * Alternate compression function: just write an abbreviated table file. + * Before calling this, all parameters and a data destination must be set up. + * + * To produce a pair of files containing abbreviated tables and abbreviated + * image data, one would proceed as follows: + * + * initialize JPEG object + * set JPEG parameters + * set destination to table file + * jpeg_write_tables(cinfo); + * set destination to image file + * jpeg_start_compress(cinfo, FALSE); + * write data... + * jpeg_finish_compress(cinfo); + * + * jpeg_write_tables has the side effect of marking all tables written + * (same as jpeg_suppress_tables(..., TRUE)). Thus a subsequent start_compress + * will not re-emit the tables unless it is passed write_all_tables=TRUE. + */ + +GLOBAL(void) +jpeg_write_tables (j_compress_ptr cinfo) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Initialize the marker writer ... bit of a crock to do it here. */ + jinit_marker_writer(cinfo); + /* Write them tables! */ + (*cinfo->marker->write_tables_only) (cinfo); + /* And clean up. */ + (*cinfo->dest->term_destination) (cinfo); + /* + * In library releases up through v6a, we called jpeg_abort() here to free + * any working memory allocated by the destination manager and marker + * writer. Some applications had a problem with that: they allocated space + * of their own from the library memory manager, and didn't want it to go + * away during write_tables. So now we do nothing. This will cause a + * memory leak if an app calls write_tables repeatedly without doing a full + * compression cycle or otherwise resetting the JPEG object. However, that + * seems less bad than unexpectedly freeing memory in the normal case. + * An app that prefers the old behavior can call jpeg_abort for itself after + * each call to jpeg_write_tables(). + */ +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcapistd.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcapistd.c new file mode 100644 index 0000000000..c138b7c12d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcapistd.c @@ -0,0 +1,161 @@ +/* + * jcapistd.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the compression half + * of the JPEG library. These are the "standard" API routines that are + * used in the normal full-compression case. They are not used by a + * transcoding-only application. Note that if an application links in + * jpeg_start_compress, it will end up linking in the entire compressor. + * We thus must separate this file from jcapimin.c to avoid linking the + * whole compression library into a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Compression initialization. + * Before calling this, all parameters and a data destination must be set up. + * + * We require a write_all_tables parameter as a failsafe check when writing + * multiple datastreams from the same compression object. Since prior runs + * will have left all the tables marked sent_table=TRUE, a subsequent run + * would emit an abbreviated stream (no tables) by default. This may be what + * is wanted, but for safety's sake it should not be the default behavior: + * programmers should have to make a deliberate choice to emit abbreviated + * images. Therefore the documentation and examples should encourage people + * to pass write_all_tables=TRUE; then it will take active thought to do the + * wrong thing. + */ + +GLOBAL(void) +jpeg_start_compress (j_compress_ptr cinfo, wxjpeg_boolean write_all_tables) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (write_all_tables) + jpeg_suppress_tables(cinfo, FALSE); /* mark all tables to be written */ + + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Perform master selection of active modules */ + jinit_compress_master(cinfo); + /* Set up for the first pass */ + (*cinfo->master->prepare_for_pass) (cinfo); + /* Ready for application to drive first pass through jpeg_write_scanlines + * or jpeg_write_raw_data. + */ + cinfo->next_scanline = 0; + cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING); +} + + +/* + * Write some scanlines of data to the JPEG compressor. + * + * The return value will be the number of lines actually written. + * This should be less than the supplied num_lines only in case that + * the data destination module has requested suspension of the compressor, + * or if more than image_height scanlines are passed in. + * + * Note: we warn about excess calls to jpeg_write_scanlines() since + * this likely signals an application programmer error. However, + * excess scanlines passed in the last valid call are *silently* ignored, + * so that the application need not adjust num_lines for end-of-image + * when using a multiple-scanline buffer. + */ + +GLOBAL(JDIMENSION) +jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines, + JDIMENSION num_lines) +{ + JDIMENSION row_ctr, rows_left; + + if (cinfo->global_state != CSTATE_SCANNING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->next_scanline >= cinfo->image_height) + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->next_scanline; + cinfo->progress->pass_limit = (long) cinfo->image_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Give master control module another chance if this is first call to + * jpeg_write_scanlines. This lets output of the frame/scan headers be + * delayed so that application can write COM, etc, markers between + * jpeg_start_compress and jpeg_write_scanlines. + */ + if (cinfo->master->call_pass_startup) + (*cinfo->master->pass_startup) (cinfo); + + /* Ignore any extra scanlines at bottom of image. */ + rows_left = cinfo->image_height - cinfo->next_scanline; + if (num_lines > rows_left) + num_lines = rows_left; + + row_ctr = 0; + (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, num_lines); + cinfo->next_scanline += row_ctr; + return row_ctr; +} + + +/* + * Alternate entry point to write raw data. + * Processes exactly one iMCU row per call, unless suspended. + */ + +GLOBAL(JDIMENSION) +jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION num_lines) +{ + JDIMENSION lines_per_iMCU_row; + + if (cinfo->global_state != CSTATE_RAW_OK) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->next_scanline >= cinfo->image_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->next_scanline; + cinfo->progress->pass_limit = (long) cinfo->image_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Give master control module another chance if this is first call to + * jpeg_write_raw_data. This lets output of the frame/scan headers be + * delayed so that application can write COM, etc, markers between + * jpeg_start_compress and jpeg_write_raw_data. + */ + if (cinfo->master->call_pass_startup) + (*cinfo->master->pass_startup) (cinfo); + + /* Verify that at least one iMCU row has been passed. */ + lines_per_iMCU_row = cinfo->max_v_samp_factor * DCTSIZE; + if (num_lines < lines_per_iMCU_row) + ERREXIT(cinfo, JERR_BUFFER_SIZE); + + /* Directly compress the row. */ + if (! (*cinfo->coef->compress_data) (cinfo, data)) { + /* If compressor did not consume the whole row, suspend processing. */ + return 0; + } + + /* OK, we processed one iMCU row. */ + cinfo->next_scanline += lines_per_iMCU_row; + return lines_per_iMCU_row; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jccoefct.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jccoefct.c new file mode 100644 index 0000000000..3315f21b32 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jccoefct.c @@ -0,0 +1,449 @@ +/* + * jccoefct.c + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the coefficient buffer controller for compression. + * This controller is the top level of the JPEG compressor proper. + * The coefficient buffer lies between forward-DCT and entropy encoding steps. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* We use a full-image coefficient buffer when doing Huffman optimization, + * and also for writing multiple-scan JPEG files. In all cases, the DCT + * step is run during the first pass, and subsequent passes need only read + * the buffered coefficients. + */ +#ifdef ENTROPY_OPT_SUPPORTED +#define FULL_COEF_BUFFER_SUPPORTED +#else +#ifdef C_MULTISCAN_FILES_SUPPORTED +#define FULL_COEF_BUFFER_SUPPORTED +#endif +#endif + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_coef_controller pub; /* public fields */ + + JDIMENSION iMCU_row_num; /* iMCU row # within image */ + JDIMENSION mcu_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* For single-pass compression, it's sufficient to buffer just one MCU + * (although this may prove a bit slow in practice). We allocate a + * workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each + * MCU constructed and sent. (On 80x86, the workspace is FAR even though + * it's not really very big; this is to keep the module interfaces unchanged + * when a large coefficient buffer is necessary.) + * In multi-pass modes, this array points to the current MCU's blocks + * within the virtual arrays. + */ + JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; + + /* In multi-pass modes, we need a virtual block array for each component. */ + jvirt_barray_ptr whole_image[MAX_COMPONENTS]; +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + + +/* Forward declarations */ +METHODDEF(wxjpeg_boolean) compress_data + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +#ifdef FULL_COEF_BUFFER_SUPPORTED +METHODDEF(wxjpeg_boolean) compress_first_pass + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +METHODDEF(wxjpeg_boolean) compress_output + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +#endif + + +LOCAL(void) +start_iMCU_row (j_compress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->mcu_ctr = 0; + coef->MCU_vert_offset = 0; +} + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + coef->iMCU_row_num = 0; + start_iMCU_row(cinfo); + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (coef->whole_image[0] != NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_data; + break; +#ifdef FULL_COEF_BUFFER_SUPPORTED + case JBUF_SAVE_AND_PASS: + if (coef->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_first_pass; + break; + case JBUF_CRANK_DEST: + if (coef->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_output; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } +} + + +/* + * Process some data in the single-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the image. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf contains a plane for each component in image, + * which we index according to the component's SOF position. + */ + +METHODDEF(wxjpeg_boolean) +compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int blkn, bi, ci, yindex, yoffset, blockcnt; + JDIMENSION ypos, xpos; + jpeg_component_info *compptr; + + /* Loop to write as much as one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->mcu_ctr; MCU_col_num <= last_MCU_col; + MCU_col_num++) { + /* Determine where data comes from in input_buf and do the DCT thing. + * Each call on forward_DCT processes a horizontal row of DCT blocks + * as wide as an MCU; we rely on having allocated the MCU_buffer[] blocks + * sequentially. Dummy blocks at the right or bottom edge are filled in + * specially. The data in them does not matter for image reconstruction, + * so we fill them with values that will encode to the smallest amount of + * data, viz: all zeroes in the AC entries, DC entries equal to previous + * block's DC value. (Thanks to Thomas Kinsman for this idea.) + */ + blkn = 0; + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + xpos = MCU_col_num * compptr->MCU_sample_width; + ypos = yoffset * DCTSIZE; /* ypos == (yoffset+yindex) * DCTSIZE */ + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (coef->iMCU_row_num < last_iMCU_row || + yoffset+yindex < compptr->last_row_height) { + (*cinfo->fdct->forward_DCT) (cinfo, compptr, + input_buf[compptr->component_index], + coef->MCU_buffer[blkn], + ypos, xpos, (JDIMENSION) blockcnt); + if (blockcnt < compptr->MCU_width) { + /* Create some dummy blocks at the right edge of the image. */ + jzero_far((void FAR *) coef->MCU_buffer[blkn + blockcnt], + (compptr->MCU_width - blockcnt) * SIZEOF(JBLOCK)); + for (bi = blockcnt; bi < compptr->MCU_width; bi++) { + coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0]; + } + } + } else { + /* Create a row of dummy blocks at the bottom of the image. */ + jzero_far((void FAR *) coef->MCU_buffer[blkn], + compptr->MCU_width * SIZEOF(JBLOCK)); + for (bi = 0; bi < compptr->MCU_width; bi++) { + coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0]; + } + } + blkn += compptr->MCU_width; + ypos += DCTSIZE; + } + } + /* Try to write the MCU. In event of a suspension failure, we will + * re-DCT the MCU on restart (a bit inefficient, could be fixed...) + */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->mcu_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->mcu_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + + +#ifdef FULL_COEF_BUFFER_SUPPORTED + +/* + * Process some data in the first pass of a multi-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the image. + * This amount of data is read from the source buffer, DCT'd and quantized, + * and saved into the virtual arrays. We also generate suitable dummy blocks + * as needed at the right and lower edges. (The dummy blocks are constructed + * in the virtual arrays, which have been padded appropriately.) This makes + * it possible for subsequent passes not to worry about real vs. dummy blocks. + * + * We must also emit the data to the entropy encoder. This is conveniently + * done by calling compress_output() after we've loaded the current strip + * of the virtual arrays. + * + * NB: input_buf contains a plane for each component in image. All + * components are DCT'd and loaded into the virtual arrays in this pass. + * However, it may be that only a subset of the components are emitted to + * the entropy encoder during this first pass; be careful about looking + * at the scan-dependent variables (MCU dimensions, etc). + */ + +METHODDEF(wxjpeg_boolean) +compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION blocks_across, MCUs_across, MCUindex; + int bi, ci, h_samp_factor, block_row, block_rows, ndummy; + JCOEF lastDC; + jpeg_component_info *compptr; + JBLOCKARRAY buffer; + JBLOCKROW thisblockrow, lastblockrow; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Align the virtual buffer for this component. */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, TRUE); + /* Count non-dummy DCT block rows in this iMCU row. */ + if (coef->iMCU_row_num < last_iMCU_row) + block_rows = compptr->v_samp_factor; + else { + /* NB: can't use last_row_height here, since may not be set! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + } + blocks_across = compptr->width_in_blocks; + h_samp_factor = compptr->h_samp_factor; + /* Count number of dummy blocks to be added at the right margin. */ + ndummy = (int) (blocks_across % h_samp_factor); + if (ndummy > 0) + ndummy = h_samp_factor - ndummy; + /* Perform DCT for all non-dummy blocks in this iMCU row. Each call + * on forward_DCT processes a complete horizontal row of DCT blocks. + */ + for (block_row = 0; block_row < block_rows; block_row++) { + thisblockrow = buffer[block_row]; + (*cinfo->fdct->forward_DCT) (cinfo, compptr, + input_buf[ci], thisblockrow, + (JDIMENSION) (block_row * DCTSIZE), + (JDIMENSION) 0, blocks_across); + if (ndummy > 0) { + /* Create dummy blocks at the right edge of the image. */ + thisblockrow += blocks_across; /* => first dummy block */ + jzero_far((void FAR *) thisblockrow, ndummy * SIZEOF(JBLOCK)); + lastDC = thisblockrow[-1][0]; + for (bi = 0; bi < ndummy; bi++) { + thisblockrow[bi][0] = lastDC; + } + } + } + /* If at end of image, create dummy block rows as needed. + * The tricky part here is that within each MCU, we want the DC values + * of the dummy blocks to match the last real block's DC value. + * This squeezes a few more bytes out of the resulting file... + */ + if (coef->iMCU_row_num == last_iMCU_row) { + blocks_across += ndummy; /* include lower right corner */ + MCUs_across = blocks_across / h_samp_factor; + for (block_row = block_rows; block_row < compptr->v_samp_factor; + block_row++) { + thisblockrow = buffer[block_row]; + lastblockrow = buffer[block_row-1]; + jzero_far((void FAR *) thisblockrow, + (size_t) (blocks_across * SIZEOF(JBLOCK))); + for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) { + lastDC = lastblockrow[h_samp_factor-1][0]; + for (bi = 0; bi < h_samp_factor; bi++) { + thisblockrow[bi][0] = lastDC; + } + thisblockrow += h_samp_factor; /* advance to next MCU in row */ + lastblockrow += h_samp_factor; + } + } + } + } + /* NB: compress_output will increment iMCU_row_num if successful. + * A suspension return will result in redoing all the work above next time. + */ + + /* Emit data to the entropy encoder, sharing code with subsequent passes */ + return compress_output(cinfo, input_buf); +} + + +/* + * Process some data in subsequent passes of a multi-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the scan. + * The data is obtained from the virtual arrays and fed to the entropy coder. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf is ignored; it is likely to be a NULL pointer. + */ + +METHODDEF(wxjpeg_boolean) +compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + int blkn, ci, xindex, yindex, yoffset; + JDIMENSION start_col; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. + * NB: during first pass, this is safe only because the buffers will + * already be aligned properly, so jmemmgr.c won't need to do any I/O. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + start_col = MCU_col_num * compptr->MCU_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + buffer_ptr = buffer[ci][yindex+yoffset] + start_col; + for (xindex = 0; xindex < compptr->MCU_width; xindex++) { + coef->MCU_buffer[blkn++] = buffer_ptr++; + } + } + } + /* Try to write the MCU. */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->mcu_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->mcu_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + +#endif /* FULL_COEF_BUFFER_SUPPORTED */ + + +/* + * Initialize coefficient buffer controller. + */ + +GLOBAL(void) +jinit_c_coef_controller (j_compress_ptr cinfo, wxjpeg_boolean need_full_buffer) +{ + my_coef_ptr coef; + + coef = (my_coef_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_coef_controller)); + cinfo->coef = (struct jpeg_c_coef_controller *) coef; + coef->pub.start_pass = start_pass_coef; + + /* Create the coefficient buffer. */ + if (need_full_buffer) { +#ifdef FULL_COEF_BUFFER_SUPPORTED + /* Allocate a full-image virtual array for each component, */ + /* padded to a multiple of samp_factor DCT blocks in each direction. */ + int ci; + jpeg_component_info *compptr; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) jround_up((long) compptr->width_in_blocks, + (long) compptr->h_samp_factor), + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor), + (JDIMENSION) compptr->v_samp_factor); + } +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + } else { + /* We only need a single-MCU buffer. */ + JBLOCKROW buffer; + int i; + + buffer = (JBLOCKROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) { + coef->MCU_buffer[i] = buffer + i; + } + coef->whole_image[0] = NULL; /* flag for no virtual arrays */ + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jccolor.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jccolor.c new file mode 100644 index 0000000000..2f74cc2a39 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jccolor.c @@ -0,0 +1,459 @@ +/* + * jccolor.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains input colorspace conversion routines. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private subobject */ + +typedef struct { + struct jpeg_color_converter pub; /* public fields */ + + /* Private state for RGB->YCC conversion */ + JPEG_INT32 * rgb_ycc_tab; /* => table for RGB to YCbCr conversion */ +} my_color_converter; + +typedef my_color_converter * my_cconvert_ptr; + + +/**************** RGB -> YCbCr conversion: most common case **************/ + +/* + * YCbCr is defined per CCIR 601-1, except that Cb and Cr are + * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. + * The conversion equations to be implemented are therefore + * Y = 0.29900 * R + 0.58700 * G + 0.11400 * B + * Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE + * Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE + * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.) + * Note: older versions of the IJG code used a zero offset of MAXJSAMPLE/2, + * rather than CENTERJSAMPLE, for Cb and Cr. This gave equal positive and + * negative swings for Cb/Cr, but meant that grayscale values (Cb=Cr=0) + * were not represented exactly. Now we sacrifice exact representation of + * maximum red and maximum blue in order to get exact grayscales. + * + * To avoid floating-point arithmetic, we represent the fractional constants + * as integers scaled up by 2^16 (about 4 digits precision); we have to divide + * the products by 2^16, with appropriate rounding, to get the correct answer. + * + * For even more speed, we avoid doing any multiplications in the inner loop + * by precalculating the constants times R,G,B for all possible values. + * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); + * for 12-bit samples it is still acceptable. It's not very reasonable for + * 16-bit samples, but if you want lossless storage you shouldn't be changing + * colorspace anyway. + * The CENTERJSAMPLE offsets and the rounding fudge-factor of 0.5 are included + * in the tables to save adding them separately in the inner loop. + */ + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define CBCR_OFFSET ((JPEG_INT32) CENTERJSAMPLE << SCALEBITS) +#define ONE_HALF ((JPEG_INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((JPEG_INT32) ((x) * (1L< Y section */ +#define G_Y_OFF (1*(MAXJSAMPLE+1)) /* offset to G => Y section */ +#define B_Y_OFF (2*(MAXJSAMPLE+1)) /* etc. */ +#define R_CB_OFF (3*(MAXJSAMPLE+1)) +#define G_CB_OFF (4*(MAXJSAMPLE+1)) +#define B_CB_OFF (5*(MAXJSAMPLE+1)) +#define R_CR_OFF B_CB_OFF /* B=>Cb, R=>Cr are the same */ +#define G_CR_OFF (6*(MAXJSAMPLE+1)) +#define B_CR_OFF (7*(MAXJSAMPLE+1)) +#define TABLE_SIZE (8*(MAXJSAMPLE+1)) + + +/* + * Initialize for RGB->YCC colorspace conversion. + */ + +METHODDEF(void) +rgb_ycc_start (j_compress_ptr cinfo) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + JPEG_INT32 * rgb_ycc_tab; + JPEG_INT32 i; + + /* Allocate and fill in the conversion tables. */ + cconvert->rgb_ycc_tab = rgb_ycc_tab = (JPEG_INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (TABLE_SIZE * SIZEOF(JPEG_INT32))); + + for (i = 0; i <= MAXJSAMPLE; i++) { + rgb_ycc_tab[i+R_Y_OFF] = FIX(0.29900) * i; + rgb_ycc_tab[i+G_Y_OFF] = FIX(0.58700) * i; + rgb_ycc_tab[i+B_Y_OFF] = FIX(0.11400) * i + ONE_HALF; + rgb_ycc_tab[i+R_CB_OFF] = (-FIX(0.16874)) * i; + rgb_ycc_tab[i+G_CB_OFF] = (-FIX(0.33126)) * i; + /* We use a rounding fudge-factor of 0.5-epsilon for Cb and Cr. + * This ensures that the maximum output will round to MAXJSAMPLE + * not MAXJSAMPLE+1, and thus that we don't have to range-limit. + */ + rgb_ycc_tab[i+B_CB_OFF] = FIX(0.50000) * i + CBCR_OFFSET + ONE_HALF-1; +/* B=>Cb and R=>Cr tables are the same + rgb_ycc_tab[i+R_CR_OFF] = FIX(0.50000) * i + CBCR_OFFSET + ONE_HALF-1; +*/ + rgb_ycc_tab[i+G_CR_OFF] = (-FIX(0.41869)) * i; + rgb_ycc_tab[i+B_CR_OFF] = (-FIX(0.08131)) * i; + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * + * Note that we change from the application's interleaved-pixel format + * to our internal noninterleaved, one-plane-per-component format. + * The input buffer is therefore three times as wide as the output buffer. + * + * A starting row offset is provided only for the output buffer. The caller + * can easily adjust the passed input_buf value to accommodate any row + * offset required on that side. + */ + +METHODDEF(void) +rgb_ycc_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register JPEG_INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr0, outptr1, outptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr0 = output_buf[0][output_row]; + outptr1 = output_buf[1][output_row]; + outptr2 = output_buf[2][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = GETJSAMPLE(inptr[RGB_RED]); + g = GETJSAMPLE(inptr[RGB_GREEN]); + b = GETJSAMPLE(inptr[RGB_BLUE]); + inptr += RGB_PIXELSIZE; + /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations + * must be too; we do not need an explicit range-limiting operation. + * Hence the value being shifted is never negative, and we don't + * need the general RIGHT_SHIFT macro. + */ + /* Y */ + outptr0[col] = (JSAMPLE) + ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) + >> SCALEBITS); + /* Cb */ + outptr1[col] = (JSAMPLE) + ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) + >> SCALEBITS); + /* Cr */ + outptr2[col] = (JSAMPLE) + ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) + >> SCALEBITS); + } + } +} + + +/**************** Cases other than RGB -> YCbCr **************/ + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles RGB->grayscale conversion, which is the same + * as the RGB->Y portion of RGB->YCbCr. + * We assume rgb_ycc_start has been called (we only use the Y tables). + */ + +METHODDEF(void) +rgb_gray_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register JPEG_INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr = output_buf[0][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = GETJSAMPLE(inptr[RGB_RED]); + g = GETJSAMPLE(inptr[RGB_GREEN]); + b = GETJSAMPLE(inptr[RGB_BLUE]); + inptr += RGB_PIXELSIZE; + /* Y */ + outptr[col] = (JSAMPLE) + ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) + >> SCALEBITS); + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles Adobe-style CMYK->YCCK conversion, + * where we convert R=1-C, G=1-M, and B=1-Y to YCbCr using the same + * conversion as above, while passing K (black) unchanged. + * We assume rgb_ycc_start has been called. + */ + +METHODDEF(void) +cmyk_ycck_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register JPEG_INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr0, outptr1, outptr2, outptr3; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr0 = output_buf[0][output_row]; + outptr1 = output_buf[1][output_row]; + outptr2 = output_buf[2][output_row]; + outptr3 = output_buf[3][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = MAXJSAMPLE - GETJSAMPLE(inptr[0]); + g = MAXJSAMPLE - GETJSAMPLE(inptr[1]); + b = MAXJSAMPLE - GETJSAMPLE(inptr[2]); + /* K passes through as-is */ + outptr3[col] = inptr[3]; /* don't need GETJSAMPLE here */ + inptr += 4; + /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations + * must be too; we do not need an explicit range-limiting operation. + * Hence the value being shifted is never negative, and we don't + * need the general RIGHT_SHIFT macro. + */ + /* Y */ + outptr0[col] = (JSAMPLE) + ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) + >> SCALEBITS); + /* Cb */ + outptr1[col] = (JSAMPLE) + ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) + >> SCALEBITS); + /* Cr */ + outptr2[col] = (JSAMPLE) + ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) + >> SCALEBITS); + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles grayscale output with no conversion. + * The source can be either plain grayscale or YCbCr (since Y == gray). + */ + +METHODDEF(void) +grayscale_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + int instride = cinfo->input_components; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr = output_buf[0][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + outptr[col] = inptr[0]; /* don't need GETJSAMPLE() here */ + inptr += instride; + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles multi-component colorspaces without conversion. + * We assume input_components == num_components. + */ + +METHODDEF(void) +null_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION col; + register int ci; + int nc = cinfo->num_components; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + /* It seems fastest to make a separate pass for each component. */ + for (ci = 0; ci < nc; ci++) { + inptr = *input_buf; + outptr = output_buf[ci][output_row]; + for (col = 0; col < num_cols; col++) { + outptr[col] = inptr[ci]; /* don't need GETJSAMPLE() here */ + inptr += nc; + } + } + input_buf++; + output_row++; + } +} + + +/* + * Empty method for start_pass. + */ + +METHODDEF(void) +null_method (j_compress_ptr cinfo) +{ + /* no work needed */ +} + + +/* + * Module initialization routine for input colorspace conversion. + */ + +GLOBAL(void) +jinit_color_converter (j_compress_ptr cinfo) +{ + my_cconvert_ptr cconvert; + + cconvert = (my_cconvert_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_color_converter)); + cinfo->cconvert = (struct jpeg_color_converter *) cconvert; + /* set start_pass to null method until we find out differently */ + cconvert->pub.start_pass = null_method; + + /* Make sure input_components agrees with in_color_space */ + switch (cinfo->in_color_space) { + case JCS_GRAYSCALE: + if (cinfo->input_components != 1) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + case JCS_RGB: +#if RGB_PIXELSIZE != 3 + if (cinfo->input_components != RGB_PIXELSIZE) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; +#endif /* else share code with YCbCr */ + + case JCS_YCbCr: + if (cinfo->input_components != 3) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + case JCS_CMYK: + case JCS_YCCK: + if (cinfo->input_components != 4) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + default: /* JCS_UNKNOWN can be anything */ + if (cinfo->input_components < 1) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + } + + /* Check num_components, set conversion method based on requested space */ + switch (cinfo->jpeg_color_space) { + case JCS_GRAYSCALE: + if (cinfo->num_components != 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_GRAYSCALE) + cconvert->pub.color_convert = grayscale_convert; + else if (cinfo->in_color_space == JCS_RGB) { + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = rgb_gray_convert; + } else if (cinfo->in_color_space == JCS_YCbCr) + cconvert->pub.color_convert = grayscale_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_RGB: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_RGB && RGB_PIXELSIZE == 3) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_YCbCr: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_RGB) { + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = rgb_ycc_convert; + } else if (cinfo->in_color_space == JCS_YCbCr) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_CMYK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_CMYK) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_YCCK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_CMYK) { + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = cmyk_ycck_convert; + } else if (cinfo->in_color_space == JCS_YCCK) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + default: /* allow null conversion of JCS_UNKNOWN */ + if (cinfo->jpeg_color_space != cinfo->in_color_space || + cinfo->num_components != cinfo->input_components) + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + cconvert->pub.color_convert = null_convert; + break; + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcdctmgr.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcdctmgr.c new file mode 100644 index 0000000000..03ffc8ae41 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcdctmgr.c @@ -0,0 +1,387 @@ +/* + * jcdctmgr.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the forward-DCT management logic. + * This code selects a particular DCT implementation to be used, + * and it performs related housekeeping chores including coefficient + * quantization. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + + +/* Private subobject for this module */ + +typedef struct { + struct jpeg_forward_dct pub; /* public fields */ + + /* Pointer to the DCT routine actually in use */ + forward_DCT_method_ptr do_dct; + + /* The actual post-DCT divisors --- not identical to the quant table + * entries, because of scaling (especially for an unnormalized DCT). + * Each table is given in normal array order. + */ + DCTELEM * divisors[NUM_QUANT_TBLS]; + +#ifdef DCT_FLOAT_SUPPORTED + /* Same as above for the floating-point case. */ + float_DCT_method_ptr do_float_dct; + FAST_FLOAT * float_divisors[NUM_QUANT_TBLS]; +#endif +} my_fdct_controller; + +typedef my_fdct_controller * my_fdct_ptr; + + +/* + * Initialize for a processing pass. + * Verify that all referenced Q-tables are present, and set up + * the divisor table for each one. + * In the current implementation, DCT of all components is done during + * the first pass, even if only some components will be output in the + * first scan. Hence all components should be examined here. + */ + +METHODDEF(void) +start_pass_fdctmgr (j_compress_ptr cinfo) +{ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + int ci, qtblno, i; + jpeg_component_info *compptr; + JQUANT_TBL * qtbl; + DCTELEM * dtbl; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + qtblno = compptr->quant_tbl_no; + /* Make sure specified quantization table is present */ + if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || + cinfo->quant_tbl_ptrs[qtblno] == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); + qtbl = cinfo->quant_tbl_ptrs[qtblno]; + /* Compute divisors for this quant table */ + /* We may do this more than once for same table, but it's not a big deal */ + switch (cinfo->dct_method) { +#ifdef DCT_ISLOW_SUPPORTED + case JDCT_ISLOW: + /* For LL&M IDCT method, divisors are equal to raw quantization + * coefficients multiplied by 8 (to counteract scaling). + */ + if (fdct->divisors[qtblno] == NULL) { + fdct->divisors[qtblno] = (DCTELEM *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + DCTSIZE2 * SIZEOF(DCTELEM)); + } + dtbl = fdct->divisors[qtblno]; + for (i = 0; i < DCTSIZE2; i++) { + dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3; + } + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + { + /* For AA&N IDCT method, divisors are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * We apply a further scale factor of 8. + */ +#define CONST_BITS 14 + static const INT16 aanscales[DCTSIZE2] = { + /* precomputed values scaled up by 14 bits */ + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, + 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, + 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, + 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, + 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 + }; + SHIFT_TEMPS + + if (fdct->divisors[qtblno] == NULL) { + fdct->divisors[qtblno] = (DCTELEM *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + DCTSIZE2 * SIZEOF(DCTELEM)); + } + dtbl = fdct->divisors[qtblno]; + for (i = 0; i < DCTSIZE2; i++) { + dtbl[i] = (DCTELEM) + DESCALE(MULTIPLY16V16((JPEG_INT32) qtbl->quantval[i], + (JPEG_INT32) aanscales[i]), + CONST_BITS-3); + } + } + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + { + /* For float AA&N IDCT method, divisors are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * We apply a further scale factor of 8. + * What's actually stored is 1/divisor so that the inner loop can + * use a multiplication rather than a division. + */ + FAST_FLOAT * fdtbl; + int row, col; + static const double aanscalefactor[DCTSIZE] = { + 1.0, 1.387039845, 1.306562965, 1.175875602, + 1.0, 0.785694958, 0.541196100, 0.275899379 + }; + + if (fdct->float_divisors[qtblno] == NULL) { + fdct->float_divisors[qtblno] = (FAST_FLOAT *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + DCTSIZE2 * SIZEOF(FAST_FLOAT)); + } + fdtbl = fdct->float_divisors[qtblno]; + i = 0; + for (row = 0; row < DCTSIZE; row++) { + for (col = 0; col < DCTSIZE; col++) { + fdtbl[i] = (FAST_FLOAT) + (1.0 / (((double) qtbl->quantval[i] * + aanscalefactor[row] * aanscalefactor[col] * 8.0))); + i++; + } + } + } + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + } +} + + +/* + * Perform forward DCT on one or more blocks of a component. + * + * The input samples are taken from the sample_data[] array starting at + * position start_row/start_col, and moving to the right for any additional + * blocks. The quantized coefficients are returned in coef_blocks[]. + */ + +METHODDEF(void) +forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks) +/* This version is used for integer DCT implementations. */ +{ + /* This routine is heavily used, so it's worth coding it tightly. */ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + forward_DCT_method_ptr do_dct = fdct->do_dct; + DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no]; + DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */ + JDIMENSION bi; + + sample_data += start_row; /* fold in the vertical offset once */ + + for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) { + /* Load data into workspace, applying unsigned->signed conversion */ + { register DCTELEM *workspaceptr; + register JSAMPROW elemptr; + register int elemr; + + workspaceptr = workspace; + for (elemr = 0; elemr < DCTSIZE; elemr++) { + elemptr = sample_data[elemr] + start_col; +#if DCTSIZE == 8 /* unroll the inner loop */ + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; +#else + { register int elemc; + for (elemc = DCTSIZE; elemc > 0; elemc--) { + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + } + } +#endif + } + } + + /* Perform the DCT */ + (*do_dct) (workspace); + + /* Quantize/descale the coefficients, and store into coef_blocks[] */ + { register DCTELEM temp, qval; + register int i; + register JCOEFPTR output_ptr = coef_blocks[bi]; + + for (i = 0; i < DCTSIZE2; i++) { + qval = divisors[i]; + temp = workspace[i]; + /* Divide the coefficient value by qval, ensuring proper rounding. + * Since C does not specify the direction of rounding for negative + * quotients, we have to force the dividend positive for portability. + * + * In most files, at least half of the output values will be zero + * (at default quantization settings, more like three-quarters...) + * so we should ensure that this case is fast. On many machines, + * a comparison is enough cheaper than a divide to make a special test + * a win. Since both inputs will be nonnegative, we need only test + * for a < b to discover whether a/b is 0. + * If your machine's division is fast enough, define FAST_DIVIDE. + */ +#ifdef FAST_DIVIDE +#define DIVIDE_BY(a,b) a /= b +#else +#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0 +#endif + if (temp < 0) { + temp = -temp; + temp += qval>>1; /* for rounding */ + DIVIDE_BY(temp, qval); + temp = -temp; + } else { + temp += qval>>1; /* for rounding */ + DIVIDE_BY(temp, qval); + } + output_ptr[i] = (JCOEF) temp; + } + } + } +} + + +#ifdef DCT_FLOAT_SUPPORTED + +METHODDEF(void) +forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks) +/* This version is used for floating-point DCT implementations. */ +{ + /* This routine is heavily used, so it's worth coding it tightly. */ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + float_DCT_method_ptr do_dct = fdct->do_float_dct; + FAST_FLOAT * divisors = fdct->float_divisors[compptr->quant_tbl_no]; + FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */ + JDIMENSION bi; + + sample_data += start_row; /* fold in the vertical offset once */ + + for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) { + /* Load data into workspace, applying unsigned->signed conversion */ + { register FAST_FLOAT *workspaceptr; + register JSAMPROW elemptr; + register int elemr; + + workspaceptr = workspace; + for (elemr = 0; elemr < DCTSIZE; elemr++) { + elemptr = sample_data[elemr] + start_col; +#if DCTSIZE == 8 /* unroll the inner loop */ + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); +#else + { register int elemc; + for (elemc = DCTSIZE; elemc > 0; elemc--) { + *workspaceptr++ = (FAST_FLOAT) + (GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + } + } +#endif + } + } + + /* Perform the DCT */ + (*do_dct) (workspace); + + /* Quantize/descale the coefficients, and store into coef_blocks[] */ + { register FAST_FLOAT temp; + register int i; + register JCOEFPTR output_ptr = coef_blocks[bi]; + + for (i = 0; i < DCTSIZE2; i++) { + /* Apply the quantization and scaling factor */ + temp = workspace[i] * divisors[i]; + /* Round to nearest integer. + * Since C does not specify the direction of rounding for negative + * quotients, we have to force the dividend positive for portability. + * The maximum coefficient size is +-16K (for 12-bit data), so this + * code should work for either 16-bit or 32-bit ints. + */ + output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384); + } + } + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ + + +/* + * Initialize FDCT manager. + */ + +GLOBAL(void) +jinit_forward_dct (j_compress_ptr cinfo) +{ + my_fdct_ptr fdct; + int i; + + fdct = (my_fdct_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_fdct_controller)); + cinfo->fdct = (struct jpeg_forward_dct *) fdct; + fdct->pub.start_pass = start_pass_fdctmgr; + + switch (cinfo->dct_method) { +#ifdef DCT_ISLOW_SUPPORTED + case JDCT_ISLOW: + fdct->pub.forward_DCT = forward_DCT; + fdct->do_dct = jpeg_fdct_islow; + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + fdct->pub.forward_DCT = forward_DCT; + fdct->do_dct = jpeg_fdct_ifast; + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + fdct->pub.forward_DCT = forward_DCT_float; + fdct->do_float_dct = jpeg_fdct_float; + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + + /* Mark divisor tables unallocated */ + for (i = 0; i < NUM_QUANT_TBLS; i++) { + fdct->divisors[i] = NULL; +#ifdef DCT_FLOAT_SUPPORTED + fdct->float_divisors[i] = NULL; +#endif + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jchuff.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jchuff.c new file mode 100644 index 0000000000..45b3d2b6fb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jchuff.c @@ -0,0 +1,909 @@ +/* + * jchuff.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy encoding routines. + * + * Much of the complexity here has to do with supporting output suspension. + * If the data destination module demands suspension, we want to be able to + * back up to the start of the current MCU. To do this, we copy state + * variables into local working storage, and update them back to the + * permanent JPEG objects only upon successful completion of an MCU. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jchuff.h" /* Declarations shared with jcphuff.c */ + + +/* Expanded entropy encoder object for Huffman encoding. + * + * The savable_state subrecord contains fields that change within an MCU, + * but must not be updated permanently until we complete the MCU. + */ + +typedef struct { + JPEG_INT32 put_buffer; /* current bit-accumulation buffer */ + int put_bits; /* # of bits now in it */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ +} savable_state; + +/* This macro is to work around compilers with missing or broken + * structure assignment. You'll need to fix this code if you have + * such a compiler and you change MAX_COMPS_IN_SCAN. + */ + +#ifndef NO_STRUCT_ASSIGN +#define ASSIGN_STATE(dest,src) ((dest) = (src)) +#else +#if MAX_COMPS_IN_SCAN == 4 +#define ASSIGN_STATE(dest,src) \ + ((dest).put_buffer = (src).put_buffer, \ + (dest).put_bits = (src).put_bits, \ + (dest).last_dc_val[0] = (src).last_dc_val[0], \ + (dest).last_dc_val[1] = (src).last_dc_val[1], \ + (dest).last_dc_val[2] = (src).last_dc_val[2], \ + (dest).last_dc_val[3] = (src).last_dc_val[3]) +#endif +#endif + + +typedef struct { + struct jpeg_entropy_encoder pub; /* public fields */ + + savable_state saved; /* Bit buffer & DC state at start of MCU */ + + /* These fields are NOT loaded into local working state. */ + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + int next_restart_num; /* next restart number to write (0-7) */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; + c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; + +#ifdef ENTROPY_OPT_SUPPORTED /* Statistics tables for optimization */ + long * dc_count_ptrs[NUM_HUFF_TBLS]; + long * ac_count_ptrs[NUM_HUFF_TBLS]; +#endif +} huff_entropy_encoder; + +typedef huff_entropy_encoder * huff_entropy_ptr; + +/* Working state while writing an MCU. + * This struct contains all the fields that are needed by subroutines. + */ + +typedef struct { + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + savable_state cur; /* Current bit buffer & DC state */ + j_compress_ptr cinfo; /* dump_buffer needs access to this */ +} working_state; + + +/* Forward declarations */ +METHODDEF(wxjpeg_boolean) encode_mcu_huff JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo)); +#ifdef ENTROPY_OPT_SUPPORTED +METHODDEF(wxjpeg_boolean) encode_mcu_gather JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo)); +#endif + + +/* + * Initialize for a Huffman-compressed scan. + * If gather_statistics is TRUE, we do not output anything during the scan, + * just count the Huffman symbols used and generate Huffman code tables. + */ + +METHODDEF(void) +start_pass_huff (j_compress_ptr cinfo, wxjpeg_boolean gather_statistics) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, dctbl, actbl; + jpeg_component_info * compptr; + + if (gather_statistics) { +#ifdef ENTROPY_OPT_SUPPORTED + entropy->pub.encode_mcu = encode_mcu_gather; + entropy->pub.finish_pass = finish_pass_gather; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + entropy->pub.encode_mcu = encode_mcu_huff; + entropy->pub.finish_pass = finish_pass_huff; + } + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + dctbl = compptr->dc_tbl_no; + actbl = compptr->ac_tbl_no; + if (gather_statistics) { +#ifdef ENTROPY_OPT_SUPPORTED + /* Check for invalid table indexes */ + /* (make_c_derived_tbl does this in the other path) */ + if (dctbl < 0 || dctbl >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, dctbl); + if (actbl < 0 || actbl >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, actbl); + /* Allocate and zero the statistics tables */ + /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ + if (entropy->dc_count_ptrs[dctbl] == NULL) + entropy->dc_count_ptrs[dctbl] = (long *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 257 * SIZEOF(long)); + MEMZERO(entropy->dc_count_ptrs[dctbl], 257 * SIZEOF(long)); + if (entropy->ac_count_ptrs[actbl] == NULL) + entropy->ac_count_ptrs[actbl] = (long *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 257 * SIZEOF(long)); + MEMZERO(entropy->ac_count_ptrs[actbl], 257 * SIZEOF(long)); +#endif + } else { + /* Compute derived values for Huffman tables */ + /* We may do this more than once for a table, but it's not expensive */ + jpeg_make_c_derived_tbl(cinfo, TRUE, dctbl, + & entropy->dc_derived_tbls[dctbl]); + jpeg_make_c_derived_tbl(cinfo, FALSE, actbl, + & entropy->ac_derived_tbls[actbl]); + } + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + + /* Initialize bit buffer to empty */ + entropy->saved.put_buffer = 0; + entropy->saved.put_bits = 0; + + /* Initialize restart stuff */ + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num = 0; +} + + +/* + * Compute the derived values for a Huffman table. + * This routine also performs some validation checks on the table. + * + * Note this is also used by jcphuff.c. + */ + +GLOBAL(void) +jpeg_make_c_derived_tbl (j_compress_ptr cinfo, wxjpeg_boolean isDC, int tblno, + c_derived_tbl ** pdtbl) +{ + JHUFF_TBL *htbl; + c_derived_tbl *dtbl; + int p, i, l, lastp, si, maxsymbol; + char huffsize[257]; + unsigned int huffcode[257]; + unsigned int code; + + /* Note that huffsize[] and huffcode[] are filled in code-length order, + * paralleling the order of the symbols themselves in htbl->huffval[]. + */ + + /* Find the input Huffman table */ + if (tblno < 0 || tblno >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); + htbl = + isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno]; + if (htbl == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); + + /* Allocate a workspace if we haven't already done so. */ + if (*pdtbl == NULL) + *pdtbl = (c_derived_tbl *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(c_derived_tbl)); + dtbl = *pdtbl; + + /* Figure C.1: make table of Huffman code length for each symbol */ + + p = 0; + for (l = 1; l <= 16; l++) { + i = (int) htbl->bits[l]; + if (i < 0 || p + i > 256) /* protect against table overrun */ + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + while (i--) + huffsize[p++] = (char) l; + } + huffsize[p] = 0; + lastp = p; + + /* Figure C.2: generate the codes themselves */ + /* We also validate that the counts represent a legal Huffman code tree. */ + + code = 0; + si = huffsize[0]; + p = 0; + while (huffsize[p]) { + while (((int) huffsize[p]) == si) { + huffcode[p++] = code; + code++; + } + /* code is now 1 more than the last code used for codelength si; but + * it must still fit in si bits, since no code is allowed to be all ones. + */ + if (((JPEG_INT32) code) >= (((JPEG_INT32) 1) << si)) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + code <<= 1; + si++; + } + + /* Figure C.3: generate encoding tables */ + /* These are code and size indexed by symbol value */ + + /* Set all codeless symbols to have code length 0; + * this lets us detect duplicate VAL entries here, and later + * allows emit_bits to detect any attempt to emit such symbols. + */ + MEMZERO(dtbl->ehufsi, SIZEOF(dtbl->ehufsi)); + + /* This is also a convenient place to check for out-of-range + * and duplicated VAL entries. We allow 0..255 for AC symbols + * but only 0..15 for DC. (We could constrain them further + * based on data depth and mode, but this seems enough.) + */ + maxsymbol = isDC ? 15 : 255; + + for (p = 0; p < lastp; p++) { + i = htbl->huffval[p]; + if (i < 0 || i > maxsymbol || dtbl->ehufsi[i]) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + dtbl->ehufco[i] = huffcode[p]; + dtbl->ehufsi[i] = huffsize[p]; + } +} + + +/* Outputting bytes to the file */ + +/* Emit a byte, taking 'action' if must suspend. */ +#define emit_byte(state,val,action) \ + { *(state)->next_output_byte++ = (JOCTET) (val); \ + if (--(state)->free_in_buffer == 0) \ + if (! dump_buffer(state)) \ + { action; } } + + +LOCAL(wxjpeg_boolean) +dump_buffer (working_state * state) +/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */ +{ + struct jpeg_destination_mgr * dest = state->cinfo->dest; + + if (! (*dest->empty_output_buffer) (state->cinfo)) + return FALSE; + /* After a successful buffer dump, must reset buffer pointers */ + state->next_output_byte = dest->next_output_byte; + state->free_in_buffer = dest->free_in_buffer; + return TRUE; +} + + +/* Outputting bits to the file */ + +/* Only the right 24 bits of put_buffer are used; the valid bits are + * left-justified in this part. At most 16 bits can be passed to emit_bits + * in one call, and we never retain more than 7 bits in put_buffer + * between calls, so 24 bits are sufficient. + */ + +INLINE +LOCAL(wxjpeg_boolean) +emit_bits (working_state * state, unsigned int code, int size) +/* Emit some bits; return TRUE if successful, FALSE if must suspend */ +{ + /* This routine is heavily used, so it's worth coding tightly. */ + register JPEG_INT32 put_buffer = (JPEG_INT32) code; + register int put_bits = state->cur.put_bits; + + /* if size is 0, caller used an invalid Huffman table entry */ + if (size == 0) + ERREXIT(state->cinfo, JERR_HUFF_MISSING_CODE); + + put_buffer &= (((JPEG_INT32) 1)<cur.put_buffer; /* and merge with old buffer contents */ + + while (put_bits >= 8) { + int c = (int) ((put_buffer >> 16) & 0xFF); + + emit_byte(state, c, return FALSE); + if (c == 0xFF) { /* need to stuff a zero byte? */ + emit_byte(state, 0, return FALSE); + } + put_buffer <<= 8; + put_bits -= 8; + } + + state->cur.put_buffer = put_buffer; /* update state variables */ + state->cur.put_bits = put_bits; + + return TRUE; +} + + +LOCAL(wxjpeg_boolean) +flush_bits (working_state * state) +{ + if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */ + return FALSE; + state->cur.put_buffer = 0; /* and reset bit-buffer to empty */ + state->cur.put_bits = 0; + return TRUE; +} + + +/* Encode a single block's worth of coefficients */ + +LOCAL(wxjpeg_boolean) +encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val, + c_derived_tbl *dctbl, c_derived_tbl *actbl) +{ + register int temp, temp2; + register int nbits; + register int k, r, i; + + /* Encode the DC coefficient difference per section F.1.2.1 */ + + temp = temp2 = block[0] - last_dc_val; + + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + /* For a negative input, want temp2 = bitwise complement of abs(input) */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + while (temp) { + nbits++; + temp >>= 1; + } + /* Check for out-of-range coefficient values. + * Since we're encoding a difference, the range limit is twice as much. + */ + if (nbits > MAX_COEF_BITS+1) + ERREXIT(state->cinfo, JERR_BAD_DCT_COEF); + + /* Emit the Huffman-coded symbol for the number of bits */ + if (! emit_bits(state, dctbl->ehufco[nbits], dctbl->ehufsi[nbits])) + return FALSE; + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + if (nbits) /* emit_bits rejects calls with size 0 */ + if (! emit_bits(state, (unsigned int) temp2, nbits)) + return FALSE; + + /* Encode the AC coefficients per section F.1.2.2 */ + + r = 0; /* r = run length of zeros */ + + for (k = 1; k < DCTSIZE2; k++) { + if ((temp = block[jpeg_natural_order[k]]) == 0) { + r++; + } else { + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + if (! emit_bits(state, actbl->ehufco[0xF0], actbl->ehufsi[0xF0])) + return FALSE; + r -= 16; + } + + temp2 = temp; + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 1; /* there must be at least one 1 bit */ + while ((temp >>= 1)) + nbits++; + /* Check for out-of-range coefficient values */ + if (nbits > MAX_COEF_BITS) + ERREXIT(state->cinfo, JERR_BAD_DCT_COEF); + + /* Emit Huffman symbol for run length / number of bits */ + i = (r << 4) + nbits; + if (! emit_bits(state, actbl->ehufco[i], actbl->ehufsi[i])) + return FALSE; + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + if (! emit_bits(state, (unsigned int) temp2, nbits)) + return FALSE; + + r = 0; + } + } + + /* If the last coef(s) were zero, emit an end-of-block code */ + if (r > 0) + if (! emit_bits(state, actbl->ehufco[0], actbl->ehufsi[0])) + return FALSE; + + return TRUE; +} + + +/* + * Emit a restart marker & resynchronize predictions. + */ + +LOCAL(wxjpeg_boolean) +emit_restart (working_state * state, int restart_num) +{ + int ci; + + if (! flush_bits(state)) + return FALSE; + + emit_byte(state, 0xFF, return FALSE); + emit_byte(state, JPEG_RST0 + restart_num, return FALSE); + + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < state->cinfo->comps_in_scan; ci++) + state->cur.last_dc_val[ci] = 0; + + /* The restart counter is not updated until we successfully write the MCU. */ + + return TRUE; +} + + +/* + * Encode and output one MCU's worth of Huffman-compressed coefficients. + */ + +METHODDEF(wxjpeg_boolean) +encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + working_state state; + int blkn, ci; + jpeg_component_info * compptr; + + /* Load up working state */ + state.next_output_byte = cinfo->dest->next_output_byte; + state.free_in_buffer = cinfo->dest->free_in_buffer; + ASSIGN_STATE(state.cur, entropy->saved); + state.cinfo = cinfo; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! emit_restart(&state, entropy->next_restart_num)) + return FALSE; + } + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + if (! encode_one_block(&state, + MCU_data[blkn][0], state.cur.last_dc_val[ci], + entropy->dc_derived_tbls[compptr->dc_tbl_no], + entropy->ac_derived_tbls[compptr->ac_tbl_no])) + return FALSE; + /* Update last_dc_val */ + state.cur.last_dc_val[ci] = MCU_data[blkn][0][0]; + } + + /* Completed MCU, so update state */ + cinfo->dest->next_output_byte = state.next_output_byte; + cinfo->dest->free_in_buffer = state.free_in_buffer; + ASSIGN_STATE(entropy->saved, state.cur); + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * Finish up at the end of a Huffman-compressed scan. + */ + +METHODDEF(void) +finish_pass_huff (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + working_state state; + + /* Load up working state ... flush_bits needs it */ + state.next_output_byte = cinfo->dest->next_output_byte; + state.free_in_buffer = cinfo->dest->free_in_buffer; + ASSIGN_STATE(state.cur, entropy->saved); + state.cinfo = cinfo; + + /* Flush out the last data */ + if (! flush_bits(&state)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + + /* Update state */ + cinfo->dest->next_output_byte = state.next_output_byte; + cinfo->dest->free_in_buffer = state.free_in_buffer; + ASSIGN_STATE(entropy->saved, state.cur); +} + + +/* + * Huffman coding optimization. + * + * We first scan the supplied data and count the number of uses of each symbol + * that is to be Huffman-coded. (This process MUST agree with the code above.) + * Then we build a Huffman coding tree for the observed counts. + * Symbols which are not needed at all for the particular image are not + * assigned any code, which saves space in the DHT marker as well as in + * the compressed data. + */ + +#ifdef ENTROPY_OPT_SUPPORTED + + +/* Process a single block's worth of coefficients */ + +LOCAL(void) +htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val, + long dc_counts[], long ac_counts[]) +{ + register int temp; + register int nbits; + register int k, r; + + /* Encode the DC coefficient difference per section F.1.2.1 */ + + temp = block[0] - last_dc_val; + if (temp < 0) + temp = -temp; + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + while (temp) { + nbits++; + temp >>= 1; + } + /* Check for out-of-range coefficient values. + * Since we're encoding a difference, the range limit is twice as much. + */ + if (nbits > MAX_COEF_BITS+1) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count the Huffman symbol for the number of bits */ + dc_counts[nbits]++; + + /* Encode the AC coefficients per section F.1.2.2 */ + + r = 0; /* r = run length of zeros */ + + for (k = 1; k < DCTSIZE2; k++) { + if ((temp = block[jpeg_natural_order[k]]) == 0) { + r++; + } else { + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + ac_counts[0xF0]++; + r -= 16; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + if (temp < 0) + temp = -temp; + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 1; /* there must be at least one 1 bit */ + while ((temp >>= 1)) + nbits++; + /* Check for out-of-range coefficient values */ + if (nbits > MAX_COEF_BITS) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count Huffman symbol for run length / number of bits */ + ac_counts[(r << 4) + nbits]++; + + r = 0; + } + } + + /* If the last coef(s) were zero, emit an end-of-block code */ + if (r > 0) + ac_counts[0]++; +} + + +/* + * Trial-encode one MCU's worth of Huffman-compressed coefficients. + * No data is actually output, so no suspension return is possible. + */ + +METHODDEF(wxjpeg_boolean) +encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int blkn, ci; + jpeg_component_info * compptr; + + /* Take care of restart intervals if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + /* Update restart state */ + entropy->restarts_to_go = cinfo->restart_interval; + } + entropy->restarts_to_go--; + } + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + htest_one_block(cinfo, MCU_data[blkn][0], entropy->saved.last_dc_val[ci], + entropy->dc_count_ptrs[compptr->dc_tbl_no], + entropy->ac_count_ptrs[compptr->ac_tbl_no]); + entropy->saved.last_dc_val[ci] = MCU_data[blkn][0][0]; + } + + return TRUE; +} + + +/* + * Generate the best Huffman code table for the given counts, fill htbl. + * Note this is also used by jcphuff.c. + * + * The JPEG standard requires that no symbol be assigned a codeword of all + * one bits (so that padding bits added at the end of a compressed segment + * can't look like a valid code). Because of the canonical ordering of + * codewords, this just means that there must be an unused slot in the + * longest codeword length category. Section K.2 of the JPEG spec suggests + * reserving such a slot by pretending that symbol 256 is a valid symbol + * with count 1. In theory that's not optimal; giving it count zero but + * including it in the symbol set anyway should give a better Huffman code. + * But the theoretically better code actually seems to come out worse in + * practice, because it produces more all-ones bytes (which incur stuffed + * zero bytes in the final file). In any case the difference is tiny. + * + * The JPEG standard requires Huffman codes to be no more than 16 bits long. + * If some symbols have a very small but nonzero probability, the Huffman tree + * must be adjusted to meet the code length restriction. We currently use + * the adjustment method suggested in JPEG section K.2. This method is *not* + * optimal; it may not choose the best possible limited-length code. But + * typically only very-low-frequency symbols will be given less-than-optimal + * lengths, so the code is almost optimal. Experimental comparisons against + * an optimal limited-length-code algorithm indicate that the difference is + * microscopic --- usually less than a hundredth of a percent of total size. + * So the extra complexity of an optimal algorithm doesn't seem worthwhile. + */ + +GLOBAL(void) +jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]) +{ +#define MAX_CLEN 32 /* assumed maximum initial code length */ + UINT8 bits[MAX_CLEN+1]; /* bits[k] = # of symbols with code length k */ + int codesize[257]; /* codesize[k] = code length of symbol k */ + int others[257]; /* next symbol in current branch of tree */ + int c1, c2; + int p, i, j; + long v; + + /* This algorithm is explained in section K.2 of the JPEG standard */ + + MEMZERO(bits, SIZEOF(bits)); + MEMZERO(codesize, SIZEOF(codesize)); + for (i = 0; i < 257; i++) + others[i] = -1; /* init links to empty */ + + freq[256] = 1; /* make sure 256 has a nonzero count */ + /* Including the pseudo-symbol 256 in the Huffman procedure guarantees + * that no real symbol is given code-value of all ones, because 256 + * will be placed last in the largest codeword category. + */ + + /* Huffman's basic algorithm to assign optimal code lengths to symbols */ + + for (;;) { + /* Find the smallest nonzero frequency, set c1 = its symbol */ + /* In case of ties, take the larger symbol number */ + c1 = -1; + v = 1000000000L; + for (i = 0; i <= 256; i++) { + if (freq[i] && freq[i] <= v) { + v = freq[i]; + c1 = i; + } + } + + /* Find the next smallest nonzero frequency, set c2 = its symbol */ + /* In case of ties, take the larger symbol number */ + c2 = -1; + v = 1000000000L; + for (i = 0; i <= 256; i++) { + if (freq[i] && freq[i] <= v && i != c1) { + v = freq[i]; + c2 = i; + } + } + + /* Done if we've merged everything into one frequency */ + if (c2 < 0) + break; + + /* Else merge the two counts/trees */ + freq[c1] += freq[c2]; + freq[c2] = 0; + + /* Increment the codesize of everything in c1's tree branch */ + codesize[c1]++; + while (others[c1] >= 0) { + c1 = others[c1]; + codesize[c1]++; + } + + others[c1] = c2; /* chain c2 onto c1's tree branch */ + + /* Increment the codesize of everything in c2's tree branch */ + codesize[c2]++; + while (others[c2] >= 0) { + c2 = others[c2]; + codesize[c2]++; + } + } + + /* Now count the number of symbols of each code length */ + for (i = 0; i <= 256; i++) { + if (codesize[i]) { + /* The JPEG standard seems to think that this can't happen, */ + /* but I'm paranoid... */ + if (codesize[i] > MAX_CLEN) + ERREXIT(cinfo, JERR_HUFF_CLEN_OVERFLOW); + + bits[codesize[i]]++; + } + } + + /* JPEG doesn't allow symbols with code lengths over 16 bits, so if the pure + * Huffman procedure assigned any such lengths, we must adjust the coding. + * Here is what the JPEG spec says about how this next bit works: + * Since symbols are paired for the longest Huffman code, the symbols are + * removed from this length category two at a time. The prefix for the pair + * (which is one bit shorter) is allocated to one of the pair; then, + * skipping the BITS entry for that prefix length, a code word from the next + * shortest nonzero BITS entry is converted into a prefix for two code words + * one bit longer. + */ + + for (i = MAX_CLEN; i > 16; i--) { + while (bits[i] > 0) { + j = i - 2; /* find length of new prefix to be used */ + while (bits[j] == 0) + j--; + + bits[i] -= 2; /* remove two symbols */ + bits[i-1]++; /* one goes in this length */ + bits[j+1] += 2; /* two new symbols in this length */ + bits[j]--; /* symbol of this length is now a prefix */ + } + } + + /* Remove the count for the pseudo-symbol 256 from the largest codelength */ + while (bits[i] == 0) /* find largest codelength still in use */ + i--; + bits[i]--; + + /* Return final symbol counts (only for lengths 0..16) */ + MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits)); + + /* Return a list of the symbols sorted by code length */ + /* It's not real clear to me why we don't need to consider the codelength + * changes made above, but the JPEG spec seems to think this works. + */ + p = 0; + for (i = 1; i <= MAX_CLEN; i++) { + for (j = 0; j <= 255; j++) { + if (codesize[j] == i) { + htbl->huffval[p] = (UINT8) j; + p++; + } + } + } + + /* Set sent_table FALSE so updated table will be written to JPEG file. */ + htbl->sent_table = FALSE; +} + + +/* + * Finish up a statistics-gathering pass and create the new Huffman tables. + */ + +METHODDEF(void) +finish_pass_gather (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, dctbl, actbl; + jpeg_component_info * compptr; + JHUFF_TBL **htblptr; + wxjpeg_boolean did_dc[NUM_HUFF_TBLS]; + wxjpeg_boolean did_ac[NUM_HUFF_TBLS]; + + /* It's important not to apply jpeg_gen_optimal_table more than once + * per table, because it clobbers the input frequency counts! + */ + MEMZERO(did_dc, SIZEOF(did_dc)); + MEMZERO(did_ac, SIZEOF(did_ac)); + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + dctbl = compptr->dc_tbl_no; + actbl = compptr->ac_tbl_no; + if (! did_dc[dctbl]) { + htblptr = & cinfo->dc_huff_tbl_ptrs[dctbl]; + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[dctbl]); + did_dc[dctbl] = TRUE; + } + if (! did_ac[actbl]) { + htblptr = & cinfo->ac_huff_tbl_ptrs[actbl]; + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[actbl]); + did_ac[actbl] = TRUE; + } + } +} + + +#endif /* ENTROPY_OPT_SUPPORTED */ + + +/* + * Module initialization routine for Huffman entropy encoding. + */ + +GLOBAL(void) +jinit_huff_encoder (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy; + int i; + + entropy = (huff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(huff_entropy_encoder)); + cinfo->entropy = (struct jpeg_entropy_encoder *) entropy; + entropy->pub.start_pass = start_pass_huff; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; +#ifdef ENTROPY_OPT_SUPPORTED + entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL; +#endif + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jchuff.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jchuff.h new file mode 100644 index 0000000000..881962ad52 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jchuff.h @@ -0,0 +1,47 @@ +/* + * jchuff.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for Huffman entropy encoding routines + * that are shared between the sequential encoder (jchuff.c) and the + * progressive encoder (jcphuff.c). No other modules need to see these. + */ + +/* The legal range of a DCT coefficient is + * -1024 .. +1023 for 8-bit data; + * -16384 .. +16383 for 12-bit data. + * Hence the magnitude should always fit in 10 or 14 bits respectively. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MAX_COEF_BITS 10 +#else +#define MAX_COEF_BITS 14 +#endif + +/* Derived data constructed for each Huffman table */ + +typedef struct { + unsigned int ehufco[256]; /* code for each symbol */ + char ehufsi[256]; /* length of code for each symbol */ + /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ +} c_derived_tbl; + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_make_c_derived_tbl jMkCDerived +#define jpeg_gen_optimal_table jGenOptTbl +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Expand a Huffman table definition into the derived format */ +EXTERN(void) jpeg_make_c_derived_tbl + JPP((j_compress_ptr cinfo, wxjpeg_boolean isDC, int tblno, + c_derived_tbl ** pdtbl)); + +/* Generate an optimal table definition given the specified counts */ +EXTERN(void) jpeg_gen_optimal_table + JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])); diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcinit.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcinit.c new file mode 100644 index 0000000000..b9e68a9adc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcinit.c @@ -0,0 +1,72 @@ +/* + * jcinit.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains initialization logic for the JPEG compressor. + * This routine is in charge of selecting the modules to be executed and + * making an initialization call to each one. + * + * Logically, this code belongs in jcmaster.c. It's split out because + * linking this routine implies linking the entire compression library. + * For a transcoding-only application, we want to be able to use jcmaster.c + * without linking in the whole library. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Master selection of compression modules. + * This is done once at the start of processing an image. We determine + * which modules will be used and give them appropriate initialization calls. + */ + +GLOBAL(void) +jinit_compress_master (j_compress_ptr cinfo) +{ + /* Initialize master control (includes parameter checking/processing) */ + jinit_c_master_control(cinfo, FALSE /* full compression */); + + /* Preprocessing */ + if (! cinfo->raw_data_in) { + jinit_color_converter(cinfo); + jinit_downsampler(cinfo); + jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */); + } + /* Forward DCT */ + jinit_forward_dct(cinfo); + /* Entropy encoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + jinit_phuff_encoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_encoder(cinfo); + } + + /* Need a full-image coefficient buffer in any multi-pass mode. */ + jinit_c_coef_controller(cinfo, + (wxjpeg_boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); + jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); + + jinit_marker_writer(cinfo); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Write the datastream header (SOI) immediately. + * Frame and scan headers are postponed till later. + * This lets application insert special markers after the SOI. + */ + (*cinfo->marker->write_file_header) (cinfo); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcmainct.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcmainct.c new file mode 100644 index 0000000000..42846cb517 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcmainct.c @@ -0,0 +1,293 @@ +/* + * jcmainct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the main buffer controller for compression. + * The main buffer lies between the pre-processor and the JPEG + * compressor proper; it holds downsampled data in the JPEG colorspace. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Note: currently, there is no operating mode in which a full-image buffer + * is needed at this step. If there were, that mode could not be used with + * "raw data" input, since this module is bypassed in that case. However, + * we've left the code here for possible use in special applications. + */ +#undef FULL_MAIN_BUFFER_SUPPORTED + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_main_controller pub; /* public fields */ + + JDIMENSION cur_iMCU_row; /* number of current iMCU row */ + JDIMENSION rowgroup_ctr; /* counts row groups received in iMCU row */ + wxjpeg_boolean suspended; /* remember if we suspended output */ + J_BUF_MODE pass_mode; /* current operating mode */ + + /* If using just a strip buffer, this points to the entire set of buffers + * (we allocate one for each component). In the full-image case, this + * points to the currently accessible strips of the virtual arrays. + */ + JSAMPARRAY buffer[MAX_COMPONENTS]; + +#ifdef FULL_MAIN_BUFFER_SUPPORTED + /* If using full-image storage, this array holds pointers to virtual-array + * control blocks for each component. Unused if not full-image storage. + */ + jvirt_sarray_ptr whole_image[MAX_COMPONENTS]; +#endif +} my_main_controller; + +typedef my_main_controller * my_main_ptr; + + +/* Forward declarations */ +METHODDEF(void) process_data_simple_main + JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); +#ifdef FULL_MAIN_BUFFER_SUPPORTED +METHODDEF(void) process_data_buffer_main + JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); +#endif + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_main_ptr mymain = (my_main_ptr) cinfo->main; + + /* Do nothing in raw-data mode. */ + if (cinfo->raw_data_in) + return; + + mymain->cur_iMCU_row = 0; /* initialize counters */ + mymain->rowgroup_ctr = 0; + mymain->suspended = FALSE; + mymain->pass_mode = pass_mode; /* save mode for use by process_data */ + + switch (pass_mode) { + case JBUF_PASS_THRU: +#ifdef FULL_MAIN_BUFFER_SUPPORTED + if (mymain->whole_image[0] != NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + mymain->pub.process_data = process_data_simple_main; + break; +#ifdef FULL_MAIN_BUFFER_SUPPORTED + case JBUF_SAVE_SOURCE: + case JBUF_CRANK_DEST: + case JBUF_SAVE_AND_PASS: + if (mymain->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + mymain->pub.process_data = process_data_buffer_main; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } +} + + +/* + * Process some data. + * This routine handles the simple pass-through mode, + * where we have only a strip buffer. + */ + +METHODDEF(void) +process_data_simple_main (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail) +{ + my_main_ptr mymain = (my_main_ptr) cinfo->main; + + while (mymain->cur_iMCU_row < cinfo->total_iMCU_rows) { + /* Read input data if we haven't filled the main buffer yet */ + if (mymain->rowgroup_ctr < DCTSIZE) + (*cinfo->prep->pre_process_data) (cinfo, + input_buf, in_row_ctr, in_rows_avail, + mymain->buffer, &mymain->rowgroup_ctr, + (JDIMENSION) DCTSIZE); + + /* If we don't have a full iMCU row buffered, return to application for + * more data. Note that preprocessor will always pad to fill the iMCU row + * at the bottom of the image. + */ + if (mymain->rowgroup_ctr != DCTSIZE) + return; + + /* Send the completed row to the compressor */ + if (! (*cinfo->coef->compress_data) (cinfo, mymain->buffer)) { + /* If compressor did not consume the whole row, then we must need to + * suspend processing and return to the application. In this situation + * we pretend we didn't yet consume the last input row; otherwise, if + * it happened to be the last row of the image, the application would + * think we were done. + */ + if (! mymain->suspended) { + (*in_row_ctr)--; + mymain->suspended = TRUE; + } + return; + } + /* We did finish the row. Undo our little suspension hack if a previous + * call suspended; then mark the main buffer empty. + */ + if (mymain->suspended) { + (*in_row_ctr)++; + mymain->suspended = FALSE; + } + mymain->rowgroup_ctr = 0; + mymain->cur_iMCU_row++; + } +} + + +#ifdef FULL_MAIN_BUFFER_SUPPORTED + +/* + * Process some data. + * This routine handles all of the modes that use a full-size buffer. + */ + +METHODDEF(void) +process_data_buffer_main (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail) +{ + my_main_ptr mymain = (my_main_ptr) cinfo->main; + int ci; + jpeg_component_info *compptr; + wxjpeg_boolean writing = (mymain->pass_mode != JBUF_CRANK_DEST); + + while (mymain->cur_iMCU_row < cinfo->total_iMCU_rows) { + /* Realign the virtual buffers if at the start of an iMCU row. */ + if (mymain->rowgroup_ctr == 0) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + mymain->buffer[ci] = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, mymain->whole_image[ci], + mymain->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE), + (JDIMENSION) (compptr->v_samp_factor * DCTSIZE), writing); + } + /* In a read pass, pretend we just read some source data. */ + if (! writing) { + *in_row_ctr += cinfo->max_v_samp_factor * DCTSIZE; + mymain->rowgroup_ctr = DCTSIZE; + } + } + + /* If a write pass, read input data until the current iMCU row is full. */ + /* Note: preprocessor will pad if necessary to fill the last iMCU row. */ + if (writing) { + (*cinfo->prep->pre_process_data) (cinfo, + input_buf, in_row_ctr, in_rows_avail, + mymain->buffer, &mymain->rowgroup_ctr, + (JDIMENSION) DCTSIZE); + /* Return to application if we need more data to fill the iMCU row. */ + if (mymain->rowgroup_ctr < DCTSIZE) + return; + } + + /* Emit data, unless this is a sink-only pass. */ + if (mymain->pass_mode != JBUF_SAVE_SOURCE) { + if (! (*cinfo->coef->compress_data) (cinfo, mymain->buffer)) { + /* If compressor did not consume the whole row, then we must need to + * suspend processing and return to the application. In this situation + * we pretend we didn't yet consume the last input row; otherwise, if + * it happened to be the last row of the image, the application would + * think we were done. + */ + if (! mymain->suspended) { + (*in_row_ctr)--; + mymain->suspended = TRUE; + } + return; + } + /* We did finish the row. Undo our little suspension hack if a previous + * call suspended; then mark the main buffer empty. + */ + if (mymain->suspended) { + (*in_row_ctr)++; + mymain->suspended = FALSE; + } + } + + /* If get here, we are done with this iMCU row. Mark buffer empty. */ + mymain->rowgroup_ctr = 0; + mymain->cur_iMCU_row++; + } +} + +#endif /* FULL_MAIN_BUFFER_SUPPORTED */ + + +/* + * Initialize main buffer controller. + */ + +GLOBAL(void) +jinit_c_main_controller (j_compress_ptr cinfo, wxjpeg_boolean need_full_buffer) +{ + my_main_ptr mymain; + int ci; + jpeg_component_info *compptr; + + mymain = (my_main_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_main_controller)); + cinfo->main = (struct jpeg_c_main_controller *) mymain; + mymain->pub.start_pass = start_pass_main; + + /* We don't need to create a buffer in raw-data mode. */ + if (cinfo->raw_data_in) + return; + + /* Create the buffer. It holds downsampled data, so each component + * may be of a different size. + */ + if (need_full_buffer) { +#ifdef FULL_MAIN_BUFFER_SUPPORTED + /* Allocate a full-image virtual array for each component */ + /* Note we pad the bottom to a multiple of the iMCU height */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + mymain->whole_image[ci] = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + compptr->width_in_blocks * DCTSIZE, + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor) * DCTSIZE, + (JDIMENSION) (compptr->v_samp_factor * DCTSIZE)); + } +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + } else { +#ifdef FULL_MAIN_BUFFER_SUPPORTED + mymain->whole_image[0] = NULL; /* flag for no virtual arrays */ +#endif + /* Allocate a strip buffer for each component */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + mymain->buffer[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + compptr->width_in_blocks * DCTSIZE, + (JDIMENSION) (compptr->v_samp_factor * DCTSIZE)); + } + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcmarker.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcmarker.c new file mode 100644 index 0000000000..b6d987af88 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcmarker.c @@ -0,0 +1,664 @@ +/* + * jcmarker.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write JPEG datastream markers. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +typedef enum { /* JPEG marker codes */ + M_SOF0 = 0xc0, + M_SOF1 = 0xc1, + M_SOF2 = 0xc2, + M_SOF3 = 0xc3, + + M_SOF5 = 0xc5, + M_SOF6 = 0xc6, + M_SOF7 = 0xc7, + + M_JPG = 0xc8, + M_SOF9 = 0xc9, + M_SOF10 = 0xca, + M_SOF11 = 0xcb, + + M_SOF13 = 0xcd, + M_SOF14 = 0xce, + M_SOF15 = 0xcf, + + M_DHT = 0xc4, + + M_DAC = 0xcc, + + M_RST0 = 0xd0, + M_RST1 = 0xd1, + M_RST2 = 0xd2, + M_RST3 = 0xd3, + M_RST4 = 0xd4, + M_RST5 = 0xd5, + M_RST6 = 0xd6, + M_RST7 = 0xd7, + + M_SOI = 0xd8, + M_EOI = 0xd9, + M_SOS = 0xda, + M_DQT = 0xdb, + M_DNL = 0xdc, + M_DRI = 0xdd, + M_DHP = 0xde, + M_EXP = 0xdf, + + M_APP0 = 0xe0, + M_APP1 = 0xe1, + M_APP2 = 0xe2, + M_APP3 = 0xe3, + M_APP4 = 0xe4, + M_APP5 = 0xe5, + M_APP6 = 0xe6, + M_APP7 = 0xe7, + M_APP8 = 0xe8, + M_APP9 = 0xe9, + M_APP10 = 0xea, + M_APP11 = 0xeb, + M_APP12 = 0xec, + M_APP13 = 0xed, + M_APP14 = 0xee, + M_APP15 = 0xef, + + M_JPG0 = 0xf0, + M_JPG13 = 0xfd, + M_COM = 0xfe, + + M_TEM = 0x01, + + M_ERROR = 0x100 +} JPEG_MARKER; + + +/* Private state */ + +typedef struct { + struct jpeg_marker_writer pub; /* public fields */ + + unsigned int last_restart_interval; /* last DRI value emitted; 0 after SOI */ +} my_marker_writer; + +typedef my_marker_writer * my_marker_ptr; + + +/* + * Basic output routines. + * + * Note that we do not support suspension while writing a marker. + * Therefore, an application using suspension must ensure that there is + * enough buffer space for the initial markers (typ. 600-700 bytes) before + * calling jpeg_start_compress, and enough space to write the trailing EOI + * (a few bytes) before calling jpeg_finish_compress. Multipass compression + * modes are not supported at all with suspension, so those two are the only + * points where markers will be written. + */ + +LOCAL(void) +emit_byte (j_compress_ptr cinfo, int val) +/* Emit a byte */ +{ + struct jpeg_destination_mgr * dest = cinfo->dest; + + *(dest->next_output_byte)++ = (JOCTET) val; + if (--dest->free_in_buffer == 0) { + if (! (*dest->empty_output_buffer) (cinfo)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + } +} + + +LOCAL(void) +emit_marker (j_compress_ptr cinfo, JPEG_MARKER mark) +/* Emit a marker code */ +{ + emit_byte(cinfo, 0xFF); + emit_byte(cinfo, (int) mark); +} + + +LOCAL(void) +emit_2bytes (j_compress_ptr cinfo, int value) +/* Emit a 2-byte integer; these are always MSB first in JPEG files */ +{ + emit_byte(cinfo, (value >> 8) & 0xFF); + emit_byte(cinfo, value & 0xFF); +} + + +/* + * Routines to write specific marker types. + */ + +LOCAL(int) +emit_dqt (j_compress_ptr cinfo, int index) +/* Emit a DQT marker */ +/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */ +{ + JQUANT_TBL * qtbl = cinfo->quant_tbl_ptrs[index]; + int prec; + int i; + + if (qtbl == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index); + + prec = 0; + for (i = 0; i < DCTSIZE2; i++) { + if (qtbl->quantval[i] > 255) + prec = 1; + } + + if (! qtbl->sent_table) { + emit_marker(cinfo, M_DQT); + + emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2); + + emit_byte(cinfo, index + (prec<<4)); + + for (i = 0; i < DCTSIZE2; i++) { + /* The table entries must be emitted in zigzag order. */ + unsigned int qval = qtbl->quantval[jpeg_natural_order[i]]; + if (prec) + emit_byte(cinfo, (int) (qval >> 8)); + emit_byte(cinfo, (int) (qval & 0xFF)); + } + + qtbl->sent_table = TRUE; + } + + return prec; +} + + +LOCAL(void) +emit_dht (j_compress_ptr cinfo, int index, wxjpeg_boolean is_ac) +/* Emit a DHT marker */ +{ + JHUFF_TBL * htbl; + int length, i; + + if (is_ac) { + htbl = cinfo->ac_huff_tbl_ptrs[index]; + index += 0x10; /* output index has AC bit set */ + } else { + htbl = cinfo->dc_huff_tbl_ptrs[index]; + } + + if (htbl == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index); + + if (! htbl->sent_table) { + emit_marker(cinfo, M_DHT); + + length = 0; + for (i = 1; i <= 16; i++) + length += htbl->bits[i]; + + emit_2bytes(cinfo, length + 2 + 1 + 16); + emit_byte(cinfo, index); + + for (i = 1; i <= 16; i++) + emit_byte(cinfo, htbl->bits[i]); + + for (i = 0; i < length; i++) + emit_byte(cinfo, htbl->huffval[i]); + + htbl->sent_table = TRUE; + } +} + + +LOCAL(void) +emit_dac (j_compress_ptr cinfo) +/* Emit a DAC marker */ +/* Since the useful info is so small, we want to emit all the tables in */ +/* one DAC marker. Therefore this routine does its own scan of the table. */ +{ +#ifdef C_ARITH_CODING_SUPPORTED + char dc_in_use[NUM_ARITH_TBLS]; + char ac_in_use[NUM_ARITH_TBLS]; + int length, i; + jpeg_component_info *compptr; + + for (i = 0; i < NUM_ARITH_TBLS; i++) + dc_in_use[i] = ac_in_use[i] = 0; + + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + dc_in_use[compptr->dc_tbl_no] = 1; + ac_in_use[compptr->ac_tbl_no] = 1; + } + + length = 0; + for (i = 0; i < NUM_ARITH_TBLS; i++) + length += dc_in_use[i] + ac_in_use[i]; + + emit_marker(cinfo, M_DAC); + + emit_2bytes(cinfo, length*2 + 2); + + for (i = 0; i < NUM_ARITH_TBLS; i++) { + if (dc_in_use[i]) { + emit_byte(cinfo, i); + emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4)); + } + if (ac_in_use[i]) { + emit_byte(cinfo, i + 0x10); + emit_byte(cinfo, cinfo->arith_ac_K[i]); + } + } +#endif /* C_ARITH_CODING_SUPPORTED */ +} + + +LOCAL(void) +emit_dri (j_compress_ptr cinfo) +/* Emit a DRI marker */ +{ + emit_marker(cinfo, M_DRI); + + emit_2bytes(cinfo, 4); /* fixed length */ + + emit_2bytes(cinfo, (int) cinfo->restart_interval); +} + + +LOCAL(void) +emit_sof (j_compress_ptr cinfo, JPEG_MARKER code) +/* Emit a SOF marker */ +{ + int ci; + jpeg_component_info *compptr; + + emit_marker(cinfo, code); + + emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */ + + /* Make sure image isn't bigger than SOF field can handle */ + if ((long) cinfo->image_height > 65535L || + (long) cinfo->image_width > 65535L) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535); + + emit_byte(cinfo, cinfo->data_precision); + emit_2bytes(cinfo, (int) cinfo->image_height); + emit_2bytes(cinfo, (int) cinfo->image_width); + + emit_byte(cinfo, cinfo->num_components); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + emit_byte(cinfo, compptr->component_id); + emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor); + emit_byte(cinfo, compptr->quant_tbl_no); + } +} + + +LOCAL(void) +emit_sos (j_compress_ptr cinfo) +/* Emit a SOS marker */ +{ + int i, td, ta; + jpeg_component_info *compptr; + + emit_marker(cinfo, M_SOS); + + emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */ + + emit_byte(cinfo, cinfo->comps_in_scan); + + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + emit_byte(cinfo, compptr->component_id); + td = compptr->dc_tbl_no; + ta = compptr->ac_tbl_no; + if (cinfo->progressive_mode) { + /* Progressive mode: only DC or only AC tables are used in one scan; + * furthermore, Huffman coding of DC refinement uses no table at all. + * We emit 0 for unused field(s); this is recommended by the P&M text + * but does not seem to be specified in the standard. + */ + if (cinfo->Ss == 0) { + ta = 0; /* DC scan */ + if (cinfo->Ah != 0 && !cinfo->arith_code) + td = 0; /* no DC table either */ + } else { + td = 0; /* AC scan */ + } + } + emit_byte(cinfo, (td << 4) + ta); + } + + emit_byte(cinfo, cinfo->Ss); + emit_byte(cinfo, cinfo->Se); + emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al); +} + + +LOCAL(void) +emit_jfif_app0 (j_compress_ptr cinfo) +/* Emit a JFIF-compliant APP0 marker */ +{ + /* + * Length of APP0 block (2 bytes) + * Block ID (4 bytes - ASCII "JFIF") + * Zero byte (1 byte to terminate the ID string) + * Version Major, Minor (2 bytes - major first) + * Units (1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm) + * Xdpu (2 bytes - dots per unit horizontal) + * Ydpu (2 bytes - dots per unit vertical) + * Thumbnail X size (1 byte) + * Thumbnail Y size (1 byte) + */ + + emit_marker(cinfo, M_APP0); + + emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */ + + emit_byte(cinfo, 0x4A); /* Identifier: ASCII "JFIF" */ + emit_byte(cinfo, 0x46); + emit_byte(cinfo, 0x49); + emit_byte(cinfo, 0x46); + emit_byte(cinfo, 0); + emit_byte(cinfo, cinfo->JFIF_major_version); /* Version fields */ + emit_byte(cinfo, cinfo->JFIF_minor_version); + emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */ + emit_2bytes(cinfo, (int) cinfo->X_density); + emit_2bytes(cinfo, (int) cinfo->Y_density); + emit_byte(cinfo, 0); /* No thumbnail image */ + emit_byte(cinfo, 0); +} + + +LOCAL(void) +emit_adobe_app14 (j_compress_ptr cinfo) +/* Emit an Adobe APP14 marker */ +{ + /* + * Length of APP14 block (2 bytes) + * Block ID (5 bytes - ASCII "Adobe") + * Version Number (2 bytes - currently 100) + * Flags0 (2 bytes - currently 0) + * Flags1 (2 bytes - currently 0) + * Color transform (1 byte) + * + * Although Adobe TN 5116 mentions Version = 101, all the Adobe files + * now in circulation seem to use Version = 100, so that's what we write. + * + * We write the color transform byte as 1 if the JPEG color space is + * YCbCr, 2 if it's YCCK, 0 otherwise. Adobe's definition has to do with + * whether the encoder performed a transformation, which is pretty useless. + */ + + emit_marker(cinfo, M_APP14); + + emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */ + + emit_byte(cinfo, 0x41); /* Identifier: ASCII "Adobe" */ + emit_byte(cinfo, 0x64); + emit_byte(cinfo, 0x6F); + emit_byte(cinfo, 0x62); + emit_byte(cinfo, 0x65); + emit_2bytes(cinfo, 100); /* Version */ + emit_2bytes(cinfo, 0); /* Flags0 */ + emit_2bytes(cinfo, 0); /* Flags1 */ + switch (cinfo->jpeg_color_space) { + case JCS_YCbCr: + emit_byte(cinfo, 1); /* Color transform = 1 */ + break; + case JCS_YCCK: + emit_byte(cinfo, 2); /* Color transform = 2 */ + break; + default: + emit_byte(cinfo, 0); /* Color transform = 0 */ + break; + } +} + + +/* + * These routines allow writing an arbitrary marker with parameters. + * The only intended use is to emit COM or APPn markers after calling + * write_file_header and before calling write_frame_header. + * Other uses are not guaranteed to produce desirable results. + * Counting the parameter bytes properly is the caller's responsibility. + */ + +METHODDEF(void) +write_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen) +/* Emit an arbitrary marker header */ +{ + if (datalen > (unsigned int) 65533) /* safety check */ + ERREXIT(cinfo, JERR_BAD_LENGTH); + + emit_marker(cinfo, (JPEG_MARKER) marker); + + emit_2bytes(cinfo, (int) (datalen + 2)); /* total length */ +} + +METHODDEF(void) +write_marker_byte (j_compress_ptr cinfo, int val) +/* Emit one byte of marker parameters following write_marker_header */ +{ + emit_byte(cinfo, val); +} + + +/* + * Write datastream header. + * This consists of an SOI and optional APPn markers. + * We recommend use of the JFIF marker, but not the Adobe marker, + * when using YCbCr or grayscale data. The JFIF marker should NOT + * be used for any other JPEG colorspace. The Adobe marker is helpful + * to distinguish RGB, CMYK, and YCCK colorspaces. + * Note that an application can write additional header markers after + * jpeg_start_compress returns. + */ + +METHODDEF(void) +write_file_header (j_compress_ptr cinfo) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + + emit_marker(cinfo, M_SOI); /* first the SOI */ + + /* SOI is defined to reset restart interval to 0 */ + marker->last_restart_interval = 0; + + if (cinfo->write_JFIF_header) /* next an optional JFIF APP0 */ + emit_jfif_app0(cinfo); + if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */ + emit_adobe_app14(cinfo); +} + + +/* + * Write frame header. + * This consists of DQT and SOFn markers. + * Note that we do not emit the SOF until we have emitted the DQT(s). + * This avoids compatibility problems with incorrect implementations that + * try to error-check the quant table numbers as soon as they see the SOF. + */ + +METHODDEF(void) +write_frame_header (j_compress_ptr cinfo) +{ + int ci, prec; + wxjpeg_boolean is_baseline; + jpeg_component_info *compptr; + + /* Emit DQT for each quantization table. + * Note that emit_dqt() suppresses any duplicate tables. + */ + prec = 0; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + prec += emit_dqt(cinfo, compptr->quant_tbl_no); + } + /* now prec is nonzero iff there are any 16-bit quant tables. */ + + /* Check for a non-baseline specification. + * Note we assume that Huffman table numbers won't be changed later. + */ + if (cinfo->arith_code || cinfo->progressive_mode || + cinfo->data_precision != 8) { + is_baseline = FALSE; + } else { + is_baseline = TRUE; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1) + is_baseline = FALSE; + } + if (prec && is_baseline) { + is_baseline = FALSE; + /* If it's baseline except for quantizer size, warn the user */ + TRACEMS(cinfo, 0, JTRC_16BIT_TABLES); + } + } + + /* Emit the proper SOF marker */ + if (cinfo->arith_code) { + emit_sof(cinfo, M_SOF9); /* SOF code for arithmetic coding */ + } else { + if (cinfo->progressive_mode) + emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */ + else if (is_baseline) + emit_sof(cinfo, M_SOF0); /* SOF code for baseline implementation */ + else + emit_sof(cinfo, M_SOF1); /* SOF code for non-baseline Huffman file */ + } +} + + +/* + * Write scan header. + * This consists of DHT or DAC markers, optional DRI, and SOS. + * Compressed data will be written following the SOS. + */ + +METHODDEF(void) +write_scan_header (j_compress_ptr cinfo) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + int i; + jpeg_component_info *compptr; + + if (cinfo->arith_code) { + /* Emit arith conditioning info. We may have some duplication + * if the file has multiple scans, but it's so small it's hardly + * worth worrying about. + */ + emit_dac(cinfo); + } else { + /* Emit Huffman tables. + * Note that emit_dht() suppresses any duplicate tables. + */ + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + if (cinfo->progressive_mode) { + /* Progressive mode: only DC or only AC tables are used in one scan */ + if (cinfo->Ss == 0) { + if (cinfo->Ah == 0) /* DC needs no table for refinement scan */ + emit_dht(cinfo, compptr->dc_tbl_no, FALSE); + } else { + emit_dht(cinfo, compptr->ac_tbl_no, TRUE); + } + } else { + /* Sequential mode: need both DC and AC tables */ + emit_dht(cinfo, compptr->dc_tbl_no, FALSE); + emit_dht(cinfo, compptr->ac_tbl_no, TRUE); + } + } + } + + /* Emit DRI if required --- note that DRI value could change for each scan. + * We avoid wasting space with unnecessary DRIs, however. + */ + if (cinfo->restart_interval != marker->last_restart_interval) { + emit_dri(cinfo); + marker->last_restart_interval = cinfo->restart_interval; + } + + emit_sos(cinfo); +} + + +/* + * Write datastream trailer. + */ + +METHODDEF(void) +write_file_trailer (j_compress_ptr cinfo) +{ + emit_marker(cinfo, M_EOI); +} + + +/* + * Write an abbreviated table-specification datastream. + * This consists of SOI, DQT and DHT tables, and EOI. + * Any table that is defined and not marked sent_table = TRUE will be + * emitted. Note that all tables will be marked sent_table = TRUE at exit. + */ + +METHODDEF(void) +write_tables_only (j_compress_ptr cinfo) +{ + int i; + + emit_marker(cinfo, M_SOI); + + for (i = 0; i < NUM_QUANT_TBLS; i++) { + if (cinfo->quant_tbl_ptrs[i] != NULL) + (void) emit_dqt(cinfo, i); + } + + if (! cinfo->arith_code) { + for (i = 0; i < NUM_HUFF_TBLS; i++) { + if (cinfo->dc_huff_tbl_ptrs[i] != NULL) + emit_dht(cinfo, i, FALSE); + if (cinfo->ac_huff_tbl_ptrs[i] != NULL) + emit_dht(cinfo, i, TRUE); + } + } + + emit_marker(cinfo, M_EOI); +} + + +/* + * Initialize the marker writer module. + */ + +GLOBAL(void) +jinit_marker_writer (j_compress_ptr cinfo) +{ + my_marker_ptr marker; + + /* Create the subobject */ + marker = (my_marker_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_marker_writer)); + cinfo->marker = (struct jpeg_marker_writer *) marker; + /* Initialize method pointers */ + marker->pub.write_file_header = write_file_header; + marker->pub.write_frame_header = write_frame_header; + marker->pub.write_scan_header = write_scan_header; + marker->pub.write_file_trailer = write_file_trailer; + marker->pub.write_tables_only = write_tables_only; + marker->pub.write_marker_header = write_marker_header; + marker->pub.write_marker_byte = write_marker_byte; + /* Initialize private state */ + marker->last_restart_interval = 0; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcmaster.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcmaster.c new file mode 100644 index 0000000000..af887794ca --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcmaster.c @@ -0,0 +1,590 @@ +/* + * jcmaster.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains master control logic for the JPEG compressor. + * These routines are concerned with parameter validation, initial setup, + * and inter-pass control (determining the number of passes and the work + * to be done in each pass). + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private state */ + +typedef enum { + main_pass, /* input data, also do first output step */ + huff_opt_pass, /* Huffman code optimization pass */ + output_pass /* data output pass */ +} c_pass_type; + +typedef struct { + struct jpeg_comp_master pub; /* public fields */ + + c_pass_type pass_type; /* the type of the current pass */ + + int pass_number; /* # of passes completed */ + int total_passes; /* total # of passes needed */ + + int scan_number; /* current index in scan_info[] */ +} my_comp_master; + +typedef my_comp_master * my_master_ptr; + + +/* + * Support routines that do various essential calculations. + */ + +LOCAL(void) +initial_setup (j_compress_ptr cinfo) +/* Do computations that are needed before master selection phase */ +{ + int ci; + jpeg_component_info *compptr; + long samplesperrow; + JDIMENSION jd_samplesperrow; + + /* Sanity check on image dimensions */ + if (cinfo->image_height <= 0 || cinfo->image_width <= 0 + || cinfo->num_components <= 0 || cinfo->input_components <= 0) + ERREXIT(cinfo, JERR_EMPTY_IMAGE); + + /* Make sure image isn't bigger than I can handle */ + if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION || + (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); + + /* Width of an input scanline must be representable as JDIMENSION. */ + samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components; + jd_samplesperrow = (JDIMENSION) samplesperrow; + if ((long) jd_samplesperrow != samplesperrow) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + + /* For now, precision must match compiled-in value... */ + if (cinfo->data_precision != BITS_IN_JSAMPLE) + ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); + + /* Check that number of components won't exceed internal array sizes */ + if (cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + + /* Compute maximum sampling factors; check factor validity */ + cinfo->max_h_samp_factor = 1; + cinfo->max_v_samp_factor = 1; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || + compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) + ERREXIT(cinfo, JERR_BAD_SAMPLING); + cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, + compptr->h_samp_factor); + cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, + compptr->v_samp_factor); + } + + /* Compute dimensions of components */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Fill in the correct component_index value; don't rely on application */ + compptr->component_index = ci; + /* For compression, we never do DCT scaling. */ + compptr->DCT_scaled_size = DCTSIZE; + /* Size in DCT blocks */ + compptr->width_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) (cinfo->max_h_samp_factor * DCTSIZE)); + compptr->height_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) (cinfo->max_v_samp_factor * DCTSIZE)); + /* Size in samples */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) cinfo->max_h_samp_factor); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) cinfo->max_v_samp_factor); + /* Mark component needed (this flag isn't actually used for compression) */ + compptr->component_needed = TRUE; + } + + /* Compute number of fully interleaved MCU rows (number of times that + * main controller will call coefficient controller). + */ + cinfo->total_iMCU_rows = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); +} + + +#ifdef C_MULTISCAN_FILES_SUPPORTED + +LOCAL(void) +validate_script (j_compress_ptr cinfo) +/* Verify that the scan script in cinfo->scan_info[] is valid; also + * determine whether it uses progressive JPEG, and set cinfo->progressive_mode. + */ +{ + const jpeg_scan_info * scanptr; + int scanno, ncomps, ci, coefi, thisi; + int Ss, Se, Ah, Al; + wxjpeg_boolean component_sent[MAX_COMPONENTS]; +#ifdef C_PROGRESSIVE_SUPPORTED + int * last_bitpos_ptr; + int last_bitpos[MAX_COMPONENTS][DCTSIZE2]; + /* -1 until that coefficient has been seen; then last Al for it */ +#endif + + if (cinfo->num_scans <= 0) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0); + + /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1; + * for progressive JPEG, no scan can have this. + */ + scanptr = cinfo->scan_info; + if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) { +#ifdef C_PROGRESSIVE_SUPPORTED + cinfo->progressive_mode = TRUE; + last_bitpos_ptr = & last_bitpos[0][0]; + for (ci = 0; ci < cinfo->num_components; ci++) + for (coefi = 0; coefi < DCTSIZE2; coefi++) + *last_bitpos_ptr++ = -1; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + cinfo->progressive_mode = FALSE; + for (ci = 0; ci < cinfo->num_components; ci++) + component_sent[ci] = FALSE; + } + + for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) { + /* Validate component indexes */ + ncomps = scanptr->comps_in_scan; + if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN); + for (ci = 0; ci < ncomps; ci++) { + thisi = scanptr->component_index[ci]; + if (thisi < 0 || thisi >= cinfo->num_components) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + /* Components must appear in SOF order within each scan */ + if (ci > 0 && thisi <= scanptr->component_index[ci-1]) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + } + /* Validate progression parameters */ + Ss = scanptr->Ss; + Se = scanptr->Se; + Ah = scanptr->Ah; + Al = scanptr->Al; + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that + * seems wrong: the upper bound ought to depend on data precision. + * Perhaps they really meant 0..N+1 for N-bit precision. + * Here we allow 0..10 for 8-bit data; Al larger than 10 results in + * out-of-range reconstructed DC values during the first DC scan, + * which might cause problems for some decoders. + */ +#if BITS_IN_JSAMPLE == 8 +#define MAX_AH_AL 10 +#else +#define MAX_AH_AL 13 +#endif + if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 || + Ah < 0 || Ah > MAX_AH_AL || Al < 0 || Al > MAX_AH_AL) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + if (Ss == 0) { + if (Se != 0) /* DC and AC together not OK */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } else { + if (ncomps != 1) /* AC scans must be for only one component */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } + for (ci = 0; ci < ncomps; ci++) { + last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0]; + if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + for (coefi = Ss; coefi <= Se; coefi++) { + if (last_bitpos_ptr[coefi] < 0) { + /* first scan of this coefficient */ + if (Ah != 0) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } else { + /* not first scan */ + if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } + last_bitpos_ptr[coefi] = Al; + } + } +#endif + } else { + /* For sequential JPEG, all progression parameters must be these: */ + if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + /* Make sure components are not sent twice */ + for (ci = 0; ci < ncomps; ci++) { + thisi = scanptr->component_index[ci]; + if (component_sent[thisi]) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + component_sent[thisi] = TRUE; + } + } + } + + /* Now verify that everything got sent. */ + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + /* For progressive mode, we only check that at least some DC data + * got sent for each component; the spec does not require that all bits + * of all coefficients be transmitted. Would it be wiser to enforce + * transmission of all coefficient bits?? + */ + for (ci = 0; ci < cinfo->num_components; ci++) { + if (last_bitpos[ci][0] < 0) + ERREXIT(cinfo, JERR_MISSING_DATA); + } +#endif + } else { + for (ci = 0; ci < cinfo->num_components; ci++) { + if (! component_sent[ci]) + ERREXIT(cinfo, JERR_MISSING_DATA); + } + } +} + +#endif /* C_MULTISCAN_FILES_SUPPORTED */ + + +LOCAL(void) +select_scan_parameters (j_compress_ptr cinfo) +/* Set up the scan parameters for the current scan */ +{ + int ci; + +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (cinfo->scan_info != NULL) { + /* Prepare for current scan --- the script is already validated */ + my_master_ptr master = (my_master_ptr) cinfo->master; + const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number; + + cinfo->comps_in_scan = scanptr->comps_in_scan; + for (ci = 0; ci < scanptr->comps_in_scan; ci++) { + cinfo->cur_comp_info[ci] = + &cinfo->comp_info[scanptr->component_index[ci]]; + } + cinfo->Ss = scanptr->Ss; + cinfo->Se = scanptr->Se; + cinfo->Ah = scanptr->Ah; + cinfo->Al = scanptr->Al; + } + else +#endif + { + /* Prepare for single sequential-JPEG scan containing all components */ + if (cinfo->num_components > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPS_IN_SCAN); + cinfo->comps_in_scan = cinfo->num_components; + for (ci = 0; ci < cinfo->num_components; ci++) { + cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci]; + } + cinfo->Ss = 0; + cinfo->Se = DCTSIZE2-1; + cinfo->Ah = 0; + cinfo->Al = 0; + } +} + + +LOCAL(void) +per_scan_setup (j_compress_ptr cinfo) +/* Do computations that are needed before processing a JPEG scan */ +/* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */ +{ + int ci, mcublks, tmp; + jpeg_component_info *compptr; + + if (cinfo->comps_in_scan == 1) { + + /* Noninterleaved (single-component) scan */ + compptr = cinfo->cur_comp_info[0]; + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = compptr->width_in_blocks; + cinfo->MCU_rows_in_scan = compptr->height_in_blocks; + + /* For noninterleaved scan, always one block per MCU */ + compptr->MCU_width = 1; + compptr->MCU_height = 1; + compptr->MCU_blocks = 1; + compptr->MCU_sample_width = DCTSIZE; + compptr->last_col_width = 1; + /* For noninterleaved scans, it is convenient to define last_row_height + * as the number of block rows present in the last iMCU row. + */ + tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (tmp == 0) tmp = compptr->v_samp_factor; + compptr->last_row_height = tmp; + + /* Prepare array describing MCU composition */ + cinfo->blocks_in_MCU = 1; + cinfo->MCU_membership[0] = 0; + + } else { + + /* Interleaved (multi-component) scan */ + if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, + MAX_COMPS_IN_SCAN); + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, + (long) (cinfo->max_h_samp_factor*DCTSIZE)); + cinfo->MCU_rows_in_scan = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); + + cinfo->blocks_in_MCU = 0; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Sampling factors give # of blocks of component in each MCU */ + compptr->MCU_width = compptr->h_samp_factor; + compptr->MCU_height = compptr->v_samp_factor; + compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; + compptr->MCU_sample_width = compptr->MCU_width * DCTSIZE; + /* Figure number of non-dummy blocks in last MCU column & row */ + tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); + if (tmp == 0) tmp = compptr->MCU_width; + compptr->last_col_width = tmp; + tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); + if (tmp == 0) tmp = compptr->MCU_height; + compptr->last_row_height = tmp; + /* Prepare array describing MCU composition */ + mcublks = compptr->MCU_blocks; + if (cinfo->blocks_in_MCU + mcublks > C_MAX_BLOCKS_IN_MCU) + ERREXIT(cinfo, JERR_BAD_MCU_SIZE); + while (mcublks-- > 0) { + cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; + } + } + + } + + /* Convert restart specified in rows to actual MCU count. */ + /* Note that count must fit in 16 bits, so we provide limiting. */ + if (cinfo->restart_in_rows > 0) { + long nominal = (long) cinfo->restart_in_rows * (long) cinfo->MCUs_per_row; + cinfo->restart_interval = (unsigned int) MIN(nominal, 65535L); + } +} + + +/* + * Per-pass setup. + * This is called at the beginning of each pass. We determine which modules + * will be active during this pass and give them appropriate start_pass calls. + * We also set is_last_pass to indicate whether any more passes will be + * required. + */ + +METHODDEF(void) +prepare_for_pass (j_compress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + switch (master->pass_type) { + case main_pass: + /* Initial pass: will collect input data, and do either Huffman + * optimization or data output for the first scan. + */ + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + if (! cinfo->raw_data_in) { + (*cinfo->cconvert->start_pass) (cinfo); + (*cinfo->downsample->start_pass) (cinfo); + (*cinfo->prep->start_pass) (cinfo, JBUF_PASS_THRU); + } + (*cinfo->fdct->start_pass) (cinfo); + (*cinfo->entropy->start_pass) (cinfo, cinfo->optimize_coding); + (*cinfo->coef->start_pass) (cinfo, + (master->total_passes > 1 ? + JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); + (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); + if (cinfo->optimize_coding) { + /* No immediate data output; postpone writing frame/scan headers */ + master->pub.call_pass_startup = FALSE; + } else { + /* Will write frame/scan headers at first jpeg_write_scanlines call */ + master->pub.call_pass_startup = TRUE; + } + break; +#ifdef ENTROPY_OPT_SUPPORTED + case huff_opt_pass: + /* Do Huffman optimization for a scan after the first one. */ + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + if (cinfo->Ss != 0 || cinfo->Ah == 0 || cinfo->arith_code) { + (*cinfo->entropy->start_pass) (cinfo, TRUE); + (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); + master->pub.call_pass_startup = FALSE; + break; + } + /* Special case: Huffman DC refinement scans need no Huffman table + * and therefore we can skip the optimization pass for them. + */ + master->pass_type = output_pass; + master->pass_number++; + /*FALLTHROUGH*/ +#endif + case output_pass: + /* Do a data-output pass. */ + /* We need not repeat per-scan setup if prior optimization pass did it. */ + if (! cinfo->optimize_coding) { + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + } + (*cinfo->entropy->start_pass) (cinfo, FALSE); + (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); + /* We emit frame/scan headers now */ + if (master->scan_number == 0) + (*cinfo->marker->write_frame_header) (cinfo); + (*cinfo->marker->write_scan_header) (cinfo); + master->pub.call_pass_startup = FALSE; + break; + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + } + + master->pub.is_last_pass = (master->pass_number == master->total_passes-1); + + /* Set up progress monitor's pass info if present */ + if (cinfo->progress != NULL) { + cinfo->progress->completed_passes = master->pass_number; + cinfo->progress->total_passes = master->total_passes; + } +} + + +/* + * Special start-of-pass hook. + * This is called by jpeg_write_scanlines if call_pass_startup is TRUE. + * In single-pass processing, we need this hook because we don't want to + * write frame/scan headers during jpeg_start_compress; we want to let the + * application write COM markers etc. between jpeg_start_compress and the + * jpeg_write_scanlines loop. + * In multi-pass processing, this routine is not used. + */ + +METHODDEF(void) +pass_startup (j_compress_ptr cinfo) +{ + cinfo->master->call_pass_startup = FALSE; /* reset flag so call only once */ + + (*cinfo->marker->write_frame_header) (cinfo); + (*cinfo->marker->write_scan_header) (cinfo); +} + + +/* + * Finish up at end of pass. + */ + +METHODDEF(void) +finish_pass_master (j_compress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + /* The entropy coder always needs an end-of-pass call, + * either to analyze statistics or to flush its output buffer. + */ + (*cinfo->entropy->finish_pass) (cinfo); + + /* Update state for next pass */ + switch (master->pass_type) { + case main_pass: + /* next pass is either output of scan 0 (after optimization) + * or output of scan 1 (if no optimization). + */ + master->pass_type = output_pass; + if (! cinfo->optimize_coding) + master->scan_number++; + break; + case huff_opt_pass: + /* next pass is always output of current scan */ + master->pass_type = output_pass; + break; + case output_pass: + /* next pass is either optimization or output of next scan */ + if (cinfo->optimize_coding) + master->pass_type = huff_opt_pass; + master->scan_number++; + break; + } + + master->pass_number++; +} + + +/* + * Initialize master compression control. + */ + +GLOBAL(void) +jinit_c_master_control (j_compress_ptr cinfo, wxjpeg_boolean transcode_only) +{ + my_master_ptr master; + + master = (my_master_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_comp_master)); + cinfo->master = (struct jpeg_comp_master *) master; + master->pub.prepare_for_pass = prepare_for_pass; + master->pub.pass_startup = pass_startup; + master->pub.finish_pass = finish_pass_master; + master->pub.is_last_pass = FALSE; + + /* Validate parameters, determine derived values */ + initial_setup(cinfo); + + if (cinfo->scan_info != NULL) { +#ifdef C_MULTISCAN_FILES_SUPPORTED + validate_script(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + cinfo->progressive_mode = FALSE; + cinfo->num_scans = 1; + } + + if (cinfo->progressive_mode) /* TEMPORARY HACK ??? */ + cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */ + + /* Initialize my private state */ + if (transcode_only) { + /* no main pass in transcoding */ + if (cinfo->optimize_coding) + master->pass_type = huff_opt_pass; + else + master->pass_type = output_pass; + } else { + /* for normal compression, first pass is always this type: */ + master->pass_type = main_pass; + } + master->scan_number = 0; + master->pass_number = 0; + if (cinfo->optimize_coding) + master->total_passes = cinfo->num_scans * 2; + else + master->total_passes = cinfo->num_scans; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcomapi.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcomapi.c new file mode 100644 index 0000000000..9b1fa7568a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcomapi.c @@ -0,0 +1,106 @@ +/* + * jcomapi.c + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface routines that are used for both + * compression and decompression. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Abort processing of a JPEG compression or decompression operation, + * but don't destroy the object itself. + * + * For this, we merely clean up all the nonpermanent memory pools. + * Note that temp files (virtual arrays) are not allowed to belong to + * the permanent pool, so we will be able to close all temp files here. + * Closing a data source or destination, if necessary, is the application's + * responsibility. + */ + +GLOBAL(void) +jpeg_abort (j_common_ptr cinfo) +{ + int pool; + + /* Do nothing if called on a not-initialized or destroyed JPEG object. */ + if (cinfo->mem == NULL) + return; + + /* Releasing pools in reverse order might help avoid fragmentation + * with some (brain-damaged) malloc libraries. + */ + for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) { + (*cinfo->mem->free_pool) (cinfo, pool); + } + + /* Reset overall state for possible reuse of object */ + if (cinfo->is_decompressor) { + cinfo->global_state = DSTATE_START; + /* Try to keep application from accessing now-deleted marker list. + * A bit kludgy to do it here, but this is the most central place. + */ + ((j_decompress_ptr) cinfo)->marker_list = NULL; + } else { + cinfo->global_state = CSTATE_START; + } +} + + +/* + * Destruction of a JPEG object. + * + * Everything gets deallocated except the master jpeg_compress_struct itself + * and the error manager struct. Both of these are supplied by the application + * and must be freed, if necessary, by the application. (Often they are on + * the stack and so don't need to be freed anyway.) + * Closing a data source or destination, if necessary, is the application's + * responsibility. + */ + +GLOBAL(void) +jpeg_destroy (j_common_ptr cinfo) +{ + /* We need only tell the memory manager to release everything. */ + /* NB: mem pointer is NULL if memory mgr failed to initialize. */ + if (cinfo->mem != NULL) + (*cinfo->mem->self_destruct) (cinfo); + cinfo->mem = NULL; /* be safe if jpeg_destroy is called twice */ + cinfo->global_state = 0; /* mark it destroyed */ +} + + +/* + * Convenience routines for allocating quantization and Huffman tables. + * (Would jutils.c be a more reasonable place to put these?) + */ + +GLOBAL(JQUANT_TBL *) +jpeg_alloc_quant_table (j_common_ptr cinfo) +{ + JQUANT_TBL *tbl; + + tbl = (JQUANT_TBL *) + (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL)); + tbl->sent_table = FALSE; /* make sure this is false in any new table */ + return tbl; +} + + +GLOBAL(JHUFF_TBL *) +jpeg_alloc_huff_table (j_common_ptr cinfo) +{ + JHUFF_TBL *tbl; + + tbl = (JHUFF_TBL *) + (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL)); + tbl->sent_table = FALSE; /* make sure this is false in any new table */ + return tbl; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jconfig.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jconfig.h new file mode 100644 index 0000000000..c8afdeb56e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jconfig.h @@ -0,0 +1,81 @@ +#if defined(_WIN32) || defined(__OS2__) +#include "jconfig.vc" +#else + +/* jconfig.h. Generated automatically by configure. */ +/* jconfig.cfg --- source file edited by configure script */ +/* see jconfig.doc for explanations */ + +/* use wxWidgets' configure */ +#include "wx/setup.h" + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +#undef void +#undef const + +/* use wxWidgets' configure */ +/* #undef CHAR_IS_UNSIGNED */ +#ifdef __CHAR_UNSIGNED__ + #ifndef CHAR_IS_UNSIGNED + #define CHAR_IS_UNSIGNED + #endif +#else + #undef CHAR_IS_UNSIGNED +#endif + +#ifndef HAVE_STDDEF_H +#define HAVE_STDDEF_H +#endif + +#ifndef HAVE_STDLIB_H +#define HAVE_STDLIB_H +#endif + +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +/* Define this if you get warnings about undefined structures. */ +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +/* use wxWidgets' configure */ +/* #define INLINE __inline__ */ +#if defined(__VISAGECPP__) && (__IBMCPP__ >= 400 || __IBMC__ >= 400) +#define INLINE +#elif defined(__WATCOMC__) +#define INLINE +#else +#define INLINE inline +#endif + +/* These are for configuring the JPEG memory manager. */ +#undef DEFAULT_MAX_MEM +#undef NO_MKTEMP + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#undef TWO_FILE_COMMANDLINE +#undef NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE + +/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ +#undef PROGRESS_REPORT + +#endif /* JPEG_CJPEG_DJPEG */ +#endif + /* _MSC_VER */ + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jconfig.vc b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jconfig.vc new file mode 100644 index 0000000000..2f4da14c54 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jconfig.vc @@ -0,0 +1,45 @@ +/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +/* Define "boolean" as unsigned char, not int, per Windows custom */ +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ + + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE /* optional */ +#define USE_SETMODE /* Microsoft has setmode() */ +#undef NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcparam.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcparam.c new file mode 100644 index 0000000000..046bd87e06 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcparam.c @@ -0,0 +1,610 @@ +/* + * jcparam.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains optional default-setting code for the JPEG compressor. + * Applications do not have to use this file, but those that don't use it + * must know a lot more about the innards of the JPEG code. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Quantization table setup routines + */ + +GLOBAL(void) +jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, wxjpeg_boolean force_baseline) +/* Define a quantization table equal to the basic_table times + * a scale factor (given as a percentage). + * If force_baseline is TRUE, the computed quantization table entries + * are limited to 1..255 for JPEG baseline compatibility. + */ +{ + JQUANT_TBL ** qtblptr; + int i; + long temp; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (which_tbl < 0 || which_tbl >= NUM_QUANT_TBLS) + ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl); + + qtblptr = & cinfo->quant_tbl_ptrs[which_tbl]; + + if (*qtblptr == NULL) + *qtblptr = jpeg_alloc_quant_table((j_common_ptr) cinfo); + + for (i = 0; i < DCTSIZE2; i++) { + temp = ((long) basic_table[i] * scale_factor + 50L) / 100L; + /* limit the values to the valid range */ + if (temp <= 0L) temp = 1L; + if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */ + if (force_baseline && temp > 255L) + temp = 255L; /* limit to baseline range if requested */ + (*qtblptr)->quantval[i] = (UINT16) temp; + } + + /* Initialize sent_table FALSE so table will be written to JPEG file. */ + (*qtblptr)->sent_table = FALSE; +} + + +GLOBAL(void) +jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, + wxjpeg_boolean force_baseline) +/* Set or change the 'quality' (quantization) setting, using default tables + * and a straight percentage-scaling quality scale. In most cases it's better + * to use jpeg_set_quality (below); this entry point is provided for + * applications that insist on a linear percentage scaling. + */ +{ + /* These are the sample quantization tables given in JPEG spec section K.1. + * The spec says that the values given produce "good" quality, and + * when divided by 2, "very good" quality. + */ + static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = { + 16, 11, 10, 16, 24, 40, 51, 61, + 12, 12, 14, 19, 26, 58, 60, 55, + 14, 13, 16, 24, 40, 57, 69, 56, + 14, 17, 22, 29, 51, 87, 80, 62, + 18, 22, 37, 56, 68, 109, 103, 77, + 24, 35, 55, 64, 81, 104, 113, 92, + 49, 64, 78, 87, 103, 121, 120, 101, + 72, 92, 95, 98, 112, 100, 103, 99 + }; + static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = { + 17, 18, 24, 47, 99, 99, 99, 99, + 18, 21, 26, 66, 99, 99, 99, 99, + 24, 26, 56, 99, 99, 99, 99, 99, + 47, 66, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99 + }; + + /* Set up two quantization tables using the specified scaling */ + jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl, + scale_factor, force_baseline); + jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl, + scale_factor, force_baseline); +} + + +GLOBAL(int) +jpeg_quality_scaling (int quality) +/* Convert a user-specified quality rating to a percentage scaling factor + * for an underlying quantization table, using our recommended scaling curve. + * The input 'quality' factor should be 0 (terrible) to 100 (very good). + */ +{ + /* Safety limit on quality factor. Convert 0 to 1 to avoid zero divide. */ + if (quality <= 0) quality = 1; + if (quality > 100) quality = 100; + + /* The basic table is used as-is (scaling 100) for a quality of 50. + * Qualities 50..100 are converted to scaling percentage 200 - 2*Q; + * note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table + * to make all the table entries 1 (hence, minimum quantization loss). + * Qualities 1..50 are converted to scaling percentage 5000/Q. + */ + if (quality < 50) + quality = 5000 / quality; + else + quality = 200 - quality*2; + + return quality; +} + + +GLOBAL(void) +jpeg_set_quality (j_compress_ptr cinfo, int quality, wxjpeg_boolean force_baseline) +/* Set or change the 'quality' (quantization) setting, using default tables. + * This is the standard quality-adjusting entry point for typical user + * interfaces; only those who want detailed control over quantization tables + * would use the preceding three routines directly. + */ +{ + /* Convert user 0-100 rating to percentage scaling */ + quality = jpeg_quality_scaling(quality); + + /* Set up standard quality tables */ + jpeg_set_linear_quality(cinfo, quality, force_baseline); +} + + +/* + * Huffman table setup routines + */ + +LOCAL(void) +add_huff_table (j_compress_ptr cinfo, + JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val) +/* Define a Huffman table */ +{ + int nsymbols, len; + + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + + /* Copy the number-of-symbols-of-each-code-length counts */ + MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits)); + + /* Validate the counts. We do this here mainly so we can copy the right + * number of symbols from the val[] array, without risking marching off + * the end of memory. jchuff.c will do a more thorough test later. + */ + nsymbols = 0; + for (len = 1; len <= 16; len++) + nsymbols += bits[len]; + if (nsymbols < 1 || nsymbols > 256) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + + MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8)); + + /* Initialize sent_table FALSE so table will be written to JPEG file. */ + (*htblptr)->sent_table = FALSE; +} + + +LOCAL(void) +std_huff_tables (j_compress_ptr cinfo) +/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */ +/* IMPORTANT: these are only valid for 8-bit data precision! */ +{ + static const UINT8 bits_dc_luminance[17] = + { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; + static const UINT8 val_dc_luminance[] = + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + + static const UINT8 bits_dc_chrominance[17] = + { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; + static const UINT8 val_dc_chrominance[] = + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + + static const UINT8 bits_ac_luminance[17] = + { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d }; + static const UINT8 val_ac_luminance[] = + { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, + 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, + 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, + 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, + 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, + 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, + 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, + 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, + 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, + 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, + 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, + 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, + 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, + 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, + 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, + 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, + 0xf9, 0xfa }; + + static const UINT8 bits_ac_chrominance[17] = + { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 }; + static const UINT8 val_ac_chrominance[] = + { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, + 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, + 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, + 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, + 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, + 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, + 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, + 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, + 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, + 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, + 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, + 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, + 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, + 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, + 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, + 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, + 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, + 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, + 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, + 0xf9, 0xfa }; + + add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[0], + bits_dc_luminance, val_dc_luminance); + add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[0], + bits_ac_luminance, val_ac_luminance); + add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[1], + bits_dc_chrominance, val_dc_chrominance); + add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[1], + bits_ac_chrominance, val_ac_chrominance); +} + + +/* + * Default parameter setup for compression. + * + * Applications that don't choose to use this routine must do their + * own setup of all these parameters. Alternately, you can call this + * to establish defaults and then alter parameters selectively. This + * is the recommended approach since, if we add any new parameters, + * your code will still work (they'll be set to reasonable defaults). + */ + +GLOBAL(void) +jpeg_set_defaults (j_compress_ptr cinfo) +{ + int i; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* Allocate comp_info array large enough for maximum component count. + * Array is made permanent in case application wants to compress + * multiple images at same param settings. + */ + if (cinfo->comp_info == NULL) + cinfo->comp_info = (jpeg_component_info *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + MAX_COMPONENTS * SIZEOF(jpeg_component_info)); + + /* Initialize everything not dependent on the color space */ + + cinfo->data_precision = BITS_IN_JSAMPLE; + /* Set up two quantization tables using default quality of 75 */ + jpeg_set_quality(cinfo, 75, TRUE); + /* Set up two Huffman tables */ + std_huff_tables(cinfo); + + /* Initialize default arithmetic coding conditioning */ + for (i = 0; i < NUM_ARITH_TBLS; i++) { + cinfo->arith_dc_L[i] = 0; + cinfo->arith_dc_U[i] = 1; + cinfo->arith_ac_K[i] = 5; + } + + /* Default is no multiple-scan output */ + cinfo->scan_info = NULL; + cinfo->num_scans = 0; + + /* Expect normal source image, not raw downsampled data */ + cinfo->raw_data_in = FALSE; + + /* Use Huffman coding, not arithmetic coding, by default */ + cinfo->arith_code = FALSE; + + /* By default, don't do extra passes to optimize entropy coding */ + cinfo->optimize_coding = FALSE; + /* The standard Huffman tables are only valid for 8-bit data precision. + * If the precision is higher, force optimization on so that usable + * tables will be computed. This test can be removed if default tables + * are supplied that are valid for the desired precision. + */ + if (cinfo->data_precision > 8) + cinfo->optimize_coding = TRUE; + + /* By default, use the simpler non-cosited sampling alignment */ + cinfo->CCIR601_sampling = FALSE; + + /* No input smoothing */ + cinfo->smoothing_factor = 0; + + /* DCT algorithm preference */ + cinfo->dct_method = JDCT_DEFAULT; + + /* No restart markers */ + cinfo->restart_interval = 0; + cinfo->restart_in_rows = 0; + + /* Fill in default JFIF marker parameters. Note that whether the marker + * will actually be written is determined by jpeg_set_colorspace. + * + * By default, the library emits JFIF version code 1.01. + * An application that wants to emit JFIF 1.02 extension markers should set + * JFIF_minor_version to 2. We could probably get away with just defaulting + * to 1.02, but there may still be some decoders in use that will complain + * about that; saying 1.01 should minimize compatibility problems. + */ + cinfo->JFIF_major_version = 1; /* Default JFIF version = 1.01 */ + cinfo->JFIF_minor_version = 1; + cinfo->density_unit = 0; /* Pixel size is unknown by default */ + cinfo->X_density = 1; /* Pixel aspect ratio is square by default */ + cinfo->Y_density = 1; + + /* Choose JPEG colorspace based on input space, set defaults accordingly */ + + jpeg_default_colorspace(cinfo); +} + + +/* + * Select an appropriate JPEG colorspace for in_color_space. + */ + +GLOBAL(void) +jpeg_default_colorspace (j_compress_ptr cinfo) +{ + switch (cinfo->in_color_space) { + case JCS_GRAYSCALE: + jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); + break; + case JCS_RGB: + jpeg_set_colorspace(cinfo, JCS_YCbCr); + break; + case JCS_YCbCr: + jpeg_set_colorspace(cinfo, JCS_YCbCr); + break; + case JCS_CMYK: + jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */ + break; + case JCS_YCCK: + jpeg_set_colorspace(cinfo, JCS_YCCK); + break; + case JCS_UNKNOWN: + jpeg_set_colorspace(cinfo, JCS_UNKNOWN); + break; + default: + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + } +} + + +/* + * Set the JPEG colorspace, and choose colorspace-dependent default values. + */ + +GLOBAL(void) +jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) +{ + jpeg_component_info * compptr; + int ci; + +#define SET_COMP(index,id,hsamp,vsamp,quant,dctbl,actbl) \ + (compptr = &cinfo->comp_info[index], \ + compptr->component_id = (id), \ + compptr->h_samp_factor = (hsamp), \ + compptr->v_samp_factor = (vsamp), \ + compptr->quant_tbl_no = (quant), \ + compptr->dc_tbl_no = (dctbl), \ + compptr->ac_tbl_no = (actbl) ) + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* For all colorspaces, we use Q and Huff tables 0 for luminance components, + * tables 1 for chrominance components. + */ + + cinfo->jpeg_color_space = colorspace; + + cinfo->write_JFIF_header = FALSE; /* No marker for non-JFIF colorspaces */ + cinfo->write_Adobe_marker = FALSE; /* write no Adobe marker by default */ + + switch (colorspace) { + case JCS_GRAYSCALE: + cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ + cinfo->num_components = 1; + /* JFIF specifies component ID 1 */ + SET_COMP(0, 1, 1,1, 0, 0,0); + break; + case JCS_RGB: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */ + cinfo->num_components = 3; + SET_COMP(0, 0x52 /* 'R' */, 1,1, 0, 0,0); + SET_COMP(1, 0x47 /* 'G' */, 1,1, 0, 0,0); + SET_COMP(2, 0x42 /* 'B' */, 1,1, 0, 0,0); + break; + case JCS_YCbCr: + cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ + cinfo->num_components = 3; + /* JFIF specifies component IDs 1,2,3 */ + /* We default to 2x2 subsamples of chrominance */ + SET_COMP(0, 1, 2,2, 0, 0,0); + SET_COMP(1, 2, 1,1, 1, 1,1); + SET_COMP(2, 3, 1,1, 1, 1,1); + break; + case JCS_CMYK: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag CMYK */ + cinfo->num_components = 4; + SET_COMP(0, 0x43 /* 'C' */, 1,1, 0, 0,0); + SET_COMP(1, 0x4D /* 'M' */, 1,1, 0, 0,0); + SET_COMP(2, 0x59 /* 'Y' */, 1,1, 0, 0,0); + SET_COMP(3, 0x4B /* 'K' */, 1,1, 0, 0,0); + break; + case JCS_YCCK: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag YCCK */ + cinfo->num_components = 4; + SET_COMP(0, 1, 2,2, 0, 0,0); + SET_COMP(1, 2, 1,1, 1, 1,1); + SET_COMP(2, 3, 1,1, 1, 1,1); + SET_COMP(3, 4, 2,2, 0, 0,0); + break; + case JCS_UNKNOWN: + cinfo->num_components = cinfo->input_components; + if (cinfo->num_components < 1 || cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + for (ci = 0; ci < cinfo->num_components; ci++) { + SET_COMP(ci, ci, 1,1, 0, 0,0); + } + break; + default: + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + } +} + + +#ifdef C_PROGRESSIVE_SUPPORTED + +LOCAL(jpeg_scan_info *) +fill_a_scan (jpeg_scan_info * scanptr, int ci, + int Ss, int Se, int Ah, int Al) +/* Support routine: generate one scan for specified component */ +{ + scanptr->comps_in_scan = 1; + scanptr->component_index[0] = ci; + scanptr->Ss = Ss; + scanptr->Se = Se; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + return scanptr; +} + +LOCAL(jpeg_scan_info *) +fill_scans (jpeg_scan_info * scanptr, int ncomps, + int Ss, int Se, int Ah, int Al) +/* Support routine: generate one scan for each component */ +{ + int ci; + + for (ci = 0; ci < ncomps; ci++) { + scanptr->comps_in_scan = 1; + scanptr->component_index[0] = ci; + scanptr->Ss = Ss; + scanptr->Se = Se; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + } + return scanptr; +} + +LOCAL(jpeg_scan_info *) +fill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al) +/* Support routine: generate interleaved DC scan if possible, else N scans */ +{ + int ci; + + if (ncomps <= MAX_COMPS_IN_SCAN) { + /* Single interleaved DC scan */ + scanptr->comps_in_scan = ncomps; + for (ci = 0; ci < ncomps; ci++) + scanptr->component_index[ci] = ci; + scanptr->Ss = scanptr->Se = 0; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + } else { + /* Noninterleaved DC scan for each component */ + scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al); + } + return scanptr; +} + + +/* + * Create a recommended progressive-JPEG script. + * cinfo->num_components and cinfo->jpeg_color_space must be correct. + */ + +GLOBAL(void) +jpeg_simple_progression (j_compress_ptr cinfo) +{ + int ncomps = cinfo->num_components; + int nscans; + jpeg_scan_info * scanptr; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* Figure space needed for script. Calculation must match code below! */ + if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) { + /* Custom script for YCbCr color images. */ + nscans = 10; + } else { + /* All-purpose script for other color spaces. */ + if (ncomps > MAX_COMPS_IN_SCAN) + nscans = 6 * ncomps; /* 2 DC + 4 AC scans per component */ + else + nscans = 2 + 4 * ncomps; /* 2 DC scans; 4 AC scans per component */ + } + + /* Allocate space for script. + * We need to put it in the permanent pool in case the application performs + * multiple compressions without changing the settings. To avoid a memory + * leak if jpeg_simple_progression is called repeatedly for the same JPEG + * object, we try to re-use previously allocated space, and we allocate + * enough space to handle YCbCr even if initially asked for grayscale. + */ + if (cinfo->script_space == NULL || cinfo->script_space_size < nscans) { + cinfo->script_space_size = MAX(nscans, 10); + cinfo->script_space = (jpeg_scan_info *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + cinfo->script_space_size * SIZEOF(jpeg_scan_info)); + } + scanptr = cinfo->script_space; + cinfo->scan_info = scanptr; + cinfo->num_scans = nscans; + + if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) { + /* Custom script for YCbCr color images. */ + /* Initial DC scan */ + scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); + /* Initial AC scan: get some luma data out in a hurry */ + scanptr = fill_a_scan(scanptr, 0, 1, 5, 0, 2); + /* Chroma data is too small to be worth expending many scans on */ + scanptr = fill_a_scan(scanptr, 2, 1, 63, 0, 1); + scanptr = fill_a_scan(scanptr, 1, 1, 63, 0, 1); + /* Complete spectral selection for luma AC */ + scanptr = fill_a_scan(scanptr, 0, 6, 63, 0, 2); + /* Refine next bit of luma AC */ + scanptr = fill_a_scan(scanptr, 0, 1, 63, 2, 1); + /* Finish DC successive approximation */ + scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); + /* Finish AC successive approximation */ + scanptr = fill_a_scan(scanptr, 2, 1, 63, 1, 0); + scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0); + /* Luma bottom bit comes last since it's usually largest scan */ + scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0); + } else { + /* All-purpose script for other color spaces. */ + /* Successive approximation first pass */ + scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); + scanptr = fill_scans(scanptr, ncomps, 1, 5, 0, 2); + scanptr = fill_scans(scanptr, ncomps, 6, 63, 0, 2); + /* Successive approximation second pass */ + scanptr = fill_scans(scanptr, ncomps, 1, 63, 2, 1); + /* Successive approximation final pass */ + scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); + scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0); + } +} + +#endif /* C_PROGRESSIVE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcphuff.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcphuff.c new file mode 100644 index 0000000000..84e53f4032 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcphuff.c @@ -0,0 +1,833 @@ +/* + * jcphuff.c + * + * Copyright (C) 1995-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy encoding routines for progressive JPEG. + * + * We do not support output suspension in this module, since the library + * currently does not allow multiple-scan files to be written with output + * suspension. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jchuff.h" /* Declarations shared with jchuff.c */ + +#ifdef C_PROGRESSIVE_SUPPORTED + +/* Expanded entropy encoder object for progressive Huffman encoding. */ + +typedef struct { + struct jpeg_entropy_encoder pub; /* public fields */ + + /* Mode flag: TRUE for optimization, FALSE for actual data output */ + wxjpeg_boolean gather_statistics; + + /* Bit-level coding status. + * next_output_byte/free_in_buffer are local copies of cinfo->dest fields. + */ + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + JPEG_INT32 put_buffer; /* current bit-accumulation buffer */ + int put_bits; /* # of bits now in it */ + j_compress_ptr cinfo; /* link to cinfo (needed for dump_buffer) */ + + /* Coding status for DC components */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ + + /* Coding status for AC components */ + int ac_tbl_no; /* the table number of the single component */ + unsigned int EOBRUN; /* run length of EOBs */ + unsigned int BE; /* # of buffered correction bits before MCU */ + char * bit_buffer; /* buffer for correction bits (1 per char) */ + /* packing correction bits tightly would save some space but cost time... */ + + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + int next_restart_num; /* next restart number to write (0-7) */ + + /* Pointers to derived tables (these workspaces have image lifespan). + * Since any one scan codes only DC or only AC, we only need one set + * of tables, not one for DC and one for AC. + */ + c_derived_tbl * derived_tbls[NUM_HUFF_TBLS]; + + /* Statistics tables for optimization; again, one set is enough */ + long * count_ptrs[NUM_HUFF_TBLS]; +} phuff_entropy_encoder; + +typedef phuff_entropy_encoder * phuff_entropy_ptr; + +/* MAX_CORR_BITS is the number of bits the AC refinement correction-bit + * buffer can hold. Larger sizes may slightly improve compression, but + * 1000 is already well into the realm of overkill. + * The minimum safe size is 64 bits. + */ + +#define MAX_CORR_BITS 1000 /* Max # of correction bits I can buffer */ + +/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32. + * We assume that int right shift is unsigned if INT32 right shift is, + * which should be safe. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define ISHIFT_TEMPS int ishift_temp; +#define IRIGHT_SHIFT(x,shft) \ + ((ishift_temp = (x)) < 0 ? \ + (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \ + (ishift_temp >> (shft))) +#else +#define ISHIFT_TEMPS +#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + +/* Forward declarations */ +METHODDEF(wxjpeg_boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(wxjpeg_boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(wxjpeg_boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(wxjpeg_boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo)); +METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo)); + + +/* + * Initialize for a Huffman-compressed scan using progressive JPEG. + */ + +METHODDEF(void) +start_pass_phuff (j_compress_ptr cinfo, wxjpeg_boolean gather_statistics) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + wxjpeg_boolean is_DC_band; + int ci, tbl; + jpeg_component_info * compptr; + + entropy->cinfo = cinfo; + entropy->gather_statistics = gather_statistics; + + is_DC_band = (cinfo->Ss == 0); + + /* We assume jcmaster.c already validated the scan parameters. */ + + /* Select execution routines */ + if (cinfo->Ah == 0) { + if (is_DC_band) + entropy->pub.encode_mcu = encode_mcu_DC_first; + else + entropy->pub.encode_mcu = encode_mcu_AC_first; + } else { + if (is_DC_band) + entropy->pub.encode_mcu = encode_mcu_DC_refine; + else { + entropy->pub.encode_mcu = encode_mcu_AC_refine; + /* AC refinement needs a correction bit buffer */ + if (entropy->bit_buffer == NULL) + entropy->bit_buffer = (char *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + MAX_CORR_BITS * SIZEOF(char)); + } + } + if (gather_statistics) + entropy->pub.finish_pass = finish_pass_gather_phuff; + else + entropy->pub.finish_pass = finish_pass_phuff; + + /* Only DC coefficients may be interleaved, so cinfo->comps_in_scan = 1 + * for AC coefficients. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Initialize DC predictions to 0 */ + entropy->last_dc_val[ci] = 0; + /* Get table index */ + if (is_DC_band) { + if (cinfo->Ah != 0) /* DC refinement needs no table */ + continue; + tbl = compptr->dc_tbl_no; + } else { + entropy->ac_tbl_no = tbl = compptr->ac_tbl_no; + } + if (gather_statistics) { + /* Check for invalid table index */ + /* (make_c_derived_tbl does this in the other path) */ + if (tbl < 0 || tbl >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); + /* Allocate and zero the statistics tables */ + /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ + if (entropy->count_ptrs[tbl] == NULL) + entropy->count_ptrs[tbl] = (long *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 257 * SIZEOF(long)); + MEMZERO(entropy->count_ptrs[tbl], 257 * SIZEOF(long)); + } else { + /* Compute derived values for Huffman table */ + /* We may do this more than once for a table, but it's not expensive */ + jpeg_make_c_derived_tbl(cinfo, is_DC_band, tbl, + & entropy->derived_tbls[tbl]); + } + } + + /* Initialize AC stuff */ + entropy->EOBRUN = 0; + entropy->BE = 0; + + /* Initialize bit buffer to empty */ + entropy->put_buffer = 0; + entropy->put_bits = 0; + + /* Initialize restart stuff */ + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num = 0; +} + + +/* Outputting bytes to the file. + * NB: these must be called only when actually outputting, + * that is, entropy->gather_statistics == FALSE. + */ + +/* Emit a byte */ +#define emit_byte(entropy,val) \ + { *(entropy)->next_output_byte++ = (JOCTET) (val); \ + if (--(entropy)->free_in_buffer == 0) \ + dump_buffer(entropy); } + + +LOCAL(void) +dump_buffer (phuff_entropy_ptr entropy) +/* Empty the output buffer; we do not support suspension in this module. */ +{ + struct jpeg_destination_mgr * dest = entropy->cinfo->dest; + + if (! (*dest->empty_output_buffer) (entropy->cinfo)) + ERREXIT(entropy->cinfo, JERR_CANT_SUSPEND); + /* After a successful buffer dump, must reset buffer pointers */ + entropy->next_output_byte = dest->next_output_byte; + entropy->free_in_buffer = dest->free_in_buffer; +} + + +/* Outputting bits to the file */ + +/* Only the right 24 bits of put_buffer are used; the valid bits are + * left-justified in this part. At most 16 bits can be passed to emit_bits + * in one call, and we never retain more than 7 bits in put_buffer + * between calls, so 24 bits are sufficient. + */ + +INLINE +LOCAL(void) +emit_bits (phuff_entropy_ptr entropy, unsigned int code, int size) +/* Emit some bits, unless we are in gather mode */ +{ + /* This routine is heavily used, so it's worth coding tightly. */ + register JPEG_INT32 put_buffer = (JPEG_INT32) code; + register int put_bits = entropy->put_bits; + + /* if size is 0, caller used an invalid Huffman table entry */ + if (size == 0) + ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); + + if (entropy->gather_statistics) + return; /* do nothing if we're only getting stats */ + + put_buffer &= (((JPEG_INT32) 1)<put_buffer; /* and merge with old buffer contents */ + + while (put_bits >= 8) { + int c = (int) ((put_buffer >> 16) & 0xFF); + + emit_byte(entropy, c); + if (c == 0xFF) { /* need to stuff a zero byte? */ + emit_byte(entropy, 0); + } + put_buffer <<= 8; + put_bits -= 8; + } + + entropy->put_buffer = put_buffer; /* update variables */ + entropy->put_bits = put_bits; +} + + +LOCAL(void) +flush_bits (phuff_entropy_ptr entropy) +{ + emit_bits(entropy, 0x7F, 7); /* fill any partial byte with ones */ + entropy->put_buffer = 0; /* and reset bit-buffer to empty */ + entropy->put_bits = 0; +} + + +/* + * Emit (or just count) a Huffman symbol. + */ + +INLINE +LOCAL(void) +emit_symbol (phuff_entropy_ptr entropy, int tbl_no, int symbol) +{ + if (entropy->gather_statistics) + entropy->count_ptrs[tbl_no][symbol]++; + else { + c_derived_tbl * tbl = entropy->derived_tbls[tbl_no]; + emit_bits(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]); + } +} + + +/* + * Emit bits from a correction bit buffer. + */ + +LOCAL(void) +emit_buffered_bits (phuff_entropy_ptr entropy, char * bufstart, + unsigned int nbits) +{ + if (entropy->gather_statistics) + return; /* no real work */ + + while (nbits > 0) { + emit_bits(entropy, (unsigned int) (*bufstart), 1); + bufstart++; + nbits--; + } +} + + +/* + * Emit any pending EOBRUN symbol. + */ + +LOCAL(void) +emit_eobrun (phuff_entropy_ptr entropy) +{ + register int temp, nbits; + + if (entropy->EOBRUN > 0) { /* if there is any pending EOBRUN */ + temp = entropy->EOBRUN; + nbits = 0; + while ((temp >>= 1)) + nbits++; + /* safety check: shouldn't happen given limited correction-bit buffer */ + if (nbits > 14) + ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); + + emit_symbol(entropy, entropy->ac_tbl_no, nbits << 4); + if (nbits) + emit_bits(entropy, entropy->EOBRUN, nbits); + + entropy->EOBRUN = 0; + + /* Emit any buffered correction bits */ + emit_buffered_bits(entropy, entropy->bit_buffer, entropy->BE); + entropy->BE = 0; + } +} + + +/* + * Emit a restart marker & resynchronize predictions. + */ + +LOCAL(void) +emit_restart (phuff_entropy_ptr entropy, int restart_num) +{ + int ci; + + emit_eobrun(entropy); + + if (! entropy->gather_statistics) { + flush_bits(entropy); + emit_byte(entropy, 0xFF); + emit_byte(entropy, JPEG_RST0 + restart_num); + } + + if (entropy->cinfo->Ss == 0) { + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < entropy->cinfo->comps_in_scan; ci++) + entropy->last_dc_val[ci] = 0; + } else { + /* Re-initialize all AC-related fields to 0 */ + entropy->EOBRUN = 0; + entropy->BE = 0; + } +} + + +/* + * MCU encoding for DC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(wxjpeg_boolean) +encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp, temp2; + register int nbits; + int blkn, ci; + int Al = cinfo->Al; + JBLOCKROW block; + jpeg_component_info * compptr; + ISHIFT_TEMPS + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + + /* Compute the DC value after the required point transform by Al. + * This is simply an arithmetic right shift. + */ + temp2 = IRIGHT_SHIFT((int) ((*block)[0]), Al); + + /* DC differences are figured on the point-transformed values. */ + temp = temp2 - entropy->last_dc_val[ci]; + entropy->last_dc_val[ci] = temp2; + + /* Encode the DC coefficient difference per section G.1.2.1 */ + temp2 = temp; + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + /* For a negative input, want temp2 = bitwise complement of abs(input) */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + while (temp) { + nbits++; + temp >>= 1; + } + /* Check for out-of-range coefficient values. + * Since we're encoding a difference, the range limit is twice as much. + */ + if (nbits > MAX_COEF_BITS+1) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count/emit the Huffman-coded symbol for the number of bits */ + emit_symbol(entropy, compptr->dc_tbl_no, nbits); + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + if (nbits) /* emit_bits rejects calls with size 0 */ + emit_bits(entropy, (unsigned int) temp2, nbits); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for AC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(wxjpeg_boolean) +encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp, temp2; + register int nbits; + register int r, k; + int Se = cinfo->Se; + int Al = cinfo->Al; + JBLOCKROW block; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data block */ + block = MCU_data[0]; + + /* Encode the AC coefficients per section G.1.2.2, fig. G.3 */ + + r = 0; /* r = run length of zeros */ + + for (k = cinfo->Ss; k <= Se; k++) { + if ((temp = (*block)[jpeg_natural_order[k]]) == 0) { + r++; + continue; + } + /* We must apply the point transform by Al. For AC coefficients this + * is an integer division with rounding towards 0. To do this portably + * in C, we shift after obtaining the absolute value; so the code is + * interwoven with finding the abs value (temp) and output bits (temp2). + */ + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + temp >>= Al; /* apply the point transform */ + /* For a negative coef, want temp2 = bitwise complement of abs(coef) */ + temp2 = ~temp; + } else { + temp >>= Al; /* apply the point transform */ + temp2 = temp; + } + /* Watch out for case that nonzero coef is zero after point transform */ + if (temp == 0) { + r++; + continue; + } + + /* Emit any pending EOBRUN */ + if (entropy->EOBRUN > 0) + emit_eobrun(entropy); + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); + r -= 16; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 1; /* there must be at least one 1 bit */ + while ((temp >>= 1)) + nbits++; + /* Check for out-of-range coefficient values */ + if (nbits > MAX_COEF_BITS) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count/emit Huffman symbol for run length / number of bits */ + emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits); + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + emit_bits(entropy, (unsigned int) temp2, nbits); + + r = 0; /* reset zero run length */ + } + + if (r > 0) { /* If there are trailing zeroes, */ + entropy->EOBRUN++; /* count an EOB */ + if (entropy->EOBRUN == 0x7FFF) + emit_eobrun(entropy); /* force it out to avoid overflow */ + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for DC successive approximation refinement scan. + * Note: we assume such scans can be multi-component, although the spec + * is not very clear on the point. + */ + +METHODDEF(wxjpeg_boolean) +encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp; + int blkn; + int Al = cinfo->Al; + JBLOCKROW block; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + + /* We simply emit the Al'th bit of the DC coefficient value. */ + temp = (*block)[0]; + emit_bits(entropy, (unsigned int) (temp >> Al), 1); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for AC successive approximation refinement scan. + */ + +METHODDEF(wxjpeg_boolean) +encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp; + register int r, k; + int EOB; + char *BR_buffer; + unsigned int BR; + int Se = cinfo->Se; + int Al = cinfo->Al; + JBLOCKROW block; + int absvalues[DCTSIZE2]; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data block */ + block = MCU_data[0]; + + /* It is convenient to make a pre-pass to determine the transformed + * coefficients' absolute values and the EOB position. + */ + EOB = 0; + for (k = cinfo->Ss; k <= Se; k++) { + temp = (*block)[jpeg_natural_order[k]]; + /* We must apply the point transform by Al. For AC coefficients this + * is an integer division with rounding towards 0. To do this portably + * in C, we shift after obtaining the absolute value. + */ + if (temp < 0) + temp = -temp; /* temp is abs value of input */ + temp >>= Al; /* apply the point transform */ + absvalues[k] = temp; /* save abs value for main pass */ + if (temp == 1) + EOB = k; /* EOB = index of last newly-nonzero coef */ + } + + /* Encode the AC coefficients per section G.1.2.3, fig. G.7 */ + + r = 0; /* r = run length of zeros */ + BR = 0; /* BR = count of buffered bits added now */ + BR_buffer = entropy->bit_buffer + entropy->BE; /* Append bits to buffer */ + + for (k = cinfo->Ss; k <= Se; k++) { + if ((temp = absvalues[k]) == 0) { + r++; + continue; + } + + /* Emit any required ZRLs, but not if they can be folded into EOB */ + while (r > 15 && k <= EOB) { + /* emit any pending EOBRUN and the BE correction bits */ + emit_eobrun(entropy); + /* Emit ZRL */ + emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); + r -= 16; + /* Emit buffered correction bits that must be associated with ZRL */ + emit_buffered_bits(entropy, BR_buffer, BR); + BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ + BR = 0; + } + + /* If the coef was previously nonzero, it only needs a correction bit. + * NOTE: a straight translation of the spec's figure G.7 would suggest + * that we also need to test r > 15. But if r > 15, we can only get here + * if k > EOB, which implies that this coefficient is not 1. + */ + if (temp > 1) { + /* The correction bit is the next bit of the absolute value. */ + BR_buffer[BR++] = (char) (temp & 1); + continue; + } + + /* Emit any pending EOBRUN and the BE correction bits */ + emit_eobrun(entropy); + + /* Count/emit Huffman symbol for run length / number of bits */ + emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1); + + /* Emit output bit for newly-nonzero coef */ + temp = ((*block)[jpeg_natural_order[k]] < 0) ? 0 : 1; + emit_bits(entropy, (unsigned int) temp, 1); + + /* Emit buffered correction bits that must be associated with this code */ + emit_buffered_bits(entropy, BR_buffer, BR); + BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ + BR = 0; + r = 0; /* reset zero run length */ + } + + if (r > 0 || BR > 0) { /* If there are trailing zeroes, */ + entropy->EOBRUN++; /* count an EOB */ + entropy->BE += BR; /* concat my correction bits to older ones */ + /* We force out the EOB if we risk either: + * 1. overflow of the EOB counter; + * 2. overflow of the correction bit buffer during the next MCU. + */ + if (entropy->EOBRUN == 0x7FFF || entropy->BE > (MAX_CORR_BITS-DCTSIZE2+1)) + emit_eobrun(entropy); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * Finish up at the end of a Huffman-compressed progressive scan. + */ + +METHODDEF(void) +finish_pass_phuff (j_compress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Flush out any buffered data */ + emit_eobrun(entropy); + flush_bits(entropy); + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; +} + + +/* + * Finish up a statistics-gathering pass and create the new Huffman tables. + */ + +METHODDEF(void) +finish_pass_gather_phuff (j_compress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + wxjpeg_boolean is_DC_band; + int ci, tbl; + jpeg_component_info * compptr; + JHUFF_TBL **htblptr; + wxjpeg_boolean did[NUM_HUFF_TBLS]; + + /* Flush out buffered data (all we care about is counting the EOB symbol) */ + emit_eobrun(entropy); + + is_DC_band = (cinfo->Ss == 0); + + /* It's important not to apply jpeg_gen_optimal_table more than once + * per table, because it clobbers the input frequency counts! + */ + MEMZERO(did, SIZEOF(did)); + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + if (is_DC_band) { + if (cinfo->Ah != 0) /* DC refinement needs no table */ + continue; + tbl = compptr->dc_tbl_no; + } else { + tbl = compptr->ac_tbl_no; + } + if (! did[tbl]) { + if (is_DC_band) + htblptr = & cinfo->dc_huff_tbl_ptrs[tbl]; + else + htblptr = & cinfo->ac_huff_tbl_ptrs[tbl]; + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->count_ptrs[tbl]); + did[tbl] = TRUE; + } + } +} + + +/* + * Module initialization routine for progressive Huffman entropy encoding. + */ + +GLOBAL(void) +jinit_phuff_encoder (j_compress_ptr cinfo) +{ + phuff_entropy_ptr entropy; + int i; + + entropy = (phuff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(phuff_entropy_encoder)); + cinfo->entropy = (struct jpeg_entropy_encoder *) entropy; + entropy->pub.start_pass = start_pass_phuff; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->derived_tbls[i] = NULL; + entropy->count_ptrs[i] = NULL; + } + entropy->bit_buffer = NULL; /* needed only in AC refinement scan */ +} + +#endif /* C_PROGRESSIVE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcprepct.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcprepct.c new file mode 100644 index 0000000000..d106242057 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcprepct.c @@ -0,0 +1,354 @@ +/* + * jcprepct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the compression preprocessing controller. + * This controller manages the color conversion, downsampling, + * and edge expansion steps. + * + * Most of the complexity here is associated with buffering input rows + * as required by the downsampler. See the comments at the head of + * jcsample.c for the downsampler's needs. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* At present, jcsample.c can request context rows only for smoothing. + * In the future, we might also need context rows for CCIR601 sampling + * or other more-complex downsampling procedures. The code to support + * context rows should be compiled only if needed. + */ +#ifdef INPUT_SMOOTHING_SUPPORTED +#define CONTEXT_ROWS_SUPPORTED +#endif + + +/* + * For the simple (no-context-row) case, we just need to buffer one + * row group's worth of pixels for the downsampling step. At the bottom of + * the image, we pad to a full row group by replicating the last pixel row. + * The downsampler's last output row is then replicated if needed to pad + * out to a full iMCU row. + * + * When providing context rows, we must buffer three row groups' worth of + * pixels. Three row groups are physically allocated, but the row pointer + * arrays are made five row groups high, with the extra pointers above and + * below "wrapping around" to point to the last and first real row groups. + * This allows the downsampler to access the proper context rows. + * At the top and bottom of the image, we create dummy context rows by + * copying the first or last real pixel row. This copying could be avoided + * by pointer hacking as is done in jdmainct.c, but it doesn't seem worth the + * trouble on the compression side. + */ + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_prep_controller pub; /* public fields */ + + /* Downsampling input buffer. This buffer holds color-converted data + * until we have enough to do a downsample step. + */ + JSAMPARRAY color_buf[MAX_COMPONENTS]; + + JDIMENSION rows_to_go; /* counts rows remaining in source image */ + int next_buf_row; /* index of next row to store in color_buf */ + +#ifdef CONTEXT_ROWS_SUPPORTED /* only needed for context case */ + int this_row_group; /* starting row index of group to process */ + int next_buf_stop; /* downsample when we reach this index */ +#endif +} my_prep_controller; + +typedef my_prep_controller * my_prep_ptr; + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_prep (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + + if (pass_mode != JBUF_PASS_THRU) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + /* Initialize total-height counter for detecting bottom of image */ + prep->rows_to_go = cinfo->image_height; + /* Mark the conversion buffer empty */ + prep->next_buf_row = 0; +#ifdef CONTEXT_ROWS_SUPPORTED + /* Preset additional state variables for context mode. + * These aren't used in non-context mode, so we needn't test which mode. + */ + prep->this_row_group = 0; + /* Set next_buf_stop to stop after two row groups have been read in. */ + prep->next_buf_stop = 2 * cinfo->max_v_samp_factor; +#endif +} + + +/* + * Expand an image vertically from height input_rows to height output_rows, + * by duplicating the bottom row. + */ + +LOCAL(void) +expand_bottom_edge (JSAMPARRAY image_data, JDIMENSION num_cols, + int input_rows, int output_rows) +{ + register int row; + + for (row = input_rows; row < output_rows; row++) { + jcopy_sample_rows(image_data, input_rows-1, image_data, row, + 1, num_cols); + } +} + + +/* + * Process some data in the simple no-context case. + * + * Preprocessor output data is counted in "row groups". A row group + * is defined to be v_samp_factor sample rows of each component. + * Downsampling will produce this much data from each max_v_samp_factor + * input rows. + */ + +METHODDEF(void) +pre_process_data (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int numrows, ci; + JDIMENSION inrows; + jpeg_component_info * compptr; + + while (*in_row_ctr < in_rows_avail && + *out_row_group_ctr < out_row_groups_avail) { + /* Do color conversion to fill the conversion buffer. */ + inrows = in_rows_avail - *in_row_ctr; + numrows = cinfo->max_v_samp_factor - prep->next_buf_row; + numrows = (int) MIN((JDIMENSION) numrows, inrows); + (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, + prep->color_buf, + (JDIMENSION) prep->next_buf_row, + numrows); + *in_row_ctr += numrows; + prep->next_buf_row += numrows; + prep->rows_to_go -= numrows; + /* If at bottom of image, pad to fill the conversion buffer. */ + if (prep->rows_to_go == 0 && + prep->next_buf_row < cinfo->max_v_samp_factor) { + for (ci = 0; ci < cinfo->num_components; ci++) { + expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, + prep->next_buf_row, cinfo->max_v_samp_factor); + } + prep->next_buf_row = cinfo->max_v_samp_factor; + } + /* If we've filled the conversion buffer, empty it. */ + if (prep->next_buf_row == cinfo->max_v_samp_factor) { + (*cinfo->downsample->downsample) (cinfo, + prep->color_buf, (JDIMENSION) 0, + output_buf, *out_row_group_ctr); + prep->next_buf_row = 0; + (*out_row_group_ctr)++; + } + /* If at bottom of image, pad the output to a full iMCU height. + * Note we assume the caller is providing a one-iMCU-height output buffer! + */ + if (prep->rows_to_go == 0 && + *out_row_group_ctr < out_row_groups_avail) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + expand_bottom_edge(output_buf[ci], + compptr->width_in_blocks * DCTSIZE, + (int) (*out_row_group_ctr * compptr->v_samp_factor), + (int) (out_row_groups_avail * compptr->v_samp_factor)); + } + *out_row_group_ctr = out_row_groups_avail; + break; /* can exit outer loop without test */ + } + } +} + + +#ifdef CONTEXT_ROWS_SUPPORTED + +/* + * Process some data in the context case. + */ + +METHODDEF(void) +pre_process_context (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int numrows, ci; + int buf_height = cinfo->max_v_samp_factor * 3; + JDIMENSION inrows; + + while (*out_row_group_ctr < out_row_groups_avail) { + if (*in_row_ctr < in_rows_avail) { + /* Do color conversion to fill the conversion buffer. */ + inrows = in_rows_avail - *in_row_ctr; + numrows = prep->next_buf_stop - prep->next_buf_row; + numrows = (int) MIN((JDIMENSION) numrows, inrows); + (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, + prep->color_buf, + (JDIMENSION) prep->next_buf_row, + numrows); + /* Pad at top of image, if first time through */ + if (prep->rows_to_go == cinfo->image_height) { + for (ci = 0; ci < cinfo->num_components; ci++) { + int row; + for (row = 1; row <= cinfo->max_v_samp_factor; row++) { + jcopy_sample_rows(prep->color_buf[ci], 0, + prep->color_buf[ci], -row, + 1, cinfo->image_width); + } + } + } + *in_row_ctr += numrows; + prep->next_buf_row += numrows; + prep->rows_to_go -= numrows; + } else { + /* Return for more data, unless we are at the bottom of the image. */ + if (prep->rows_to_go != 0) + break; + /* When at bottom of image, pad to fill the conversion buffer. */ + if (prep->next_buf_row < prep->next_buf_stop) { + for (ci = 0; ci < cinfo->num_components; ci++) { + expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, + prep->next_buf_row, prep->next_buf_stop); + } + prep->next_buf_row = prep->next_buf_stop; + } + } + /* If we've gotten enough data, downsample a row group. */ + if (prep->next_buf_row == prep->next_buf_stop) { + (*cinfo->downsample->downsample) (cinfo, + prep->color_buf, + (JDIMENSION) prep->this_row_group, + output_buf, *out_row_group_ctr); + (*out_row_group_ctr)++; + /* Advance pointers with wraparound as necessary. */ + prep->this_row_group += cinfo->max_v_samp_factor; + if (prep->this_row_group >= buf_height) + prep->this_row_group = 0; + if (prep->next_buf_row >= buf_height) + prep->next_buf_row = 0; + prep->next_buf_stop = prep->next_buf_row + cinfo->max_v_samp_factor; + } + } +} + + +/* + * Create the wrapped-around downsampling input buffer needed for context mode. + */ + +LOCAL(void) +create_context_buffer (j_compress_ptr cinfo) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int rgroup_height = cinfo->max_v_samp_factor; + int ci, i; + jpeg_component_info * compptr; + JSAMPARRAY true_buffer, fake_buffer; + + /* Grab enough space for fake row pointers for all the components; + * we need five row groups' worth of pointers for each component. + */ + fake_buffer = (JSAMPARRAY) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (cinfo->num_components * 5 * rgroup_height) * + SIZEOF(JSAMPROW)); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Allocate the actual buffer space (3 row groups) for this component. + * We make the buffer wide enough to allow the downsampler to edge-expand + * horizontally within the buffer, if it so chooses. + */ + true_buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE * + cinfo->max_h_samp_factor) / compptr->h_samp_factor), + (JDIMENSION) (3 * rgroup_height)); + /* Copy true buffer row pointers into the middle of the fake row array */ + MEMCOPY(fake_buffer + rgroup_height, true_buffer, + 3 * rgroup_height * SIZEOF(JSAMPROW)); + /* Fill in the above and below wraparound pointers */ + for (i = 0; i < rgroup_height; i++) { + fake_buffer[i] = true_buffer[2 * rgroup_height + i]; + fake_buffer[4 * rgroup_height + i] = true_buffer[i]; + } + prep->color_buf[ci] = fake_buffer + rgroup_height; + fake_buffer += 5 * rgroup_height; /* point to space for next component */ + } +} + +#endif /* CONTEXT_ROWS_SUPPORTED */ + + +/* + * Initialize preprocessing controller. + */ + +GLOBAL(void) +jinit_c_prep_controller (j_compress_ptr cinfo, wxjpeg_boolean need_full_buffer) +{ + my_prep_ptr prep; + int ci; + jpeg_component_info * compptr; + + if (need_full_buffer) /* safety check */ + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + prep = (my_prep_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_prep_controller)); + cinfo->prep = (struct jpeg_c_prep_controller *) prep; + prep->pub.start_pass = start_pass_prep; + + /* Allocate the color conversion buffer. + * We make the buffer wide enough to allow the downsampler to edge-expand + * horizontally within the buffer, if it so chooses. + */ + if (cinfo->downsample->need_context_rows) { + /* Set up to provide context rows */ +#ifdef CONTEXT_ROWS_SUPPORTED + prep->pub.pre_process_data = pre_process_context; + create_context_buffer(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + /* No context, just make it tall enough for one row group */ + prep->pub.pre_process_data = pre_process_data; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + prep->color_buf[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE * + cinfo->max_h_samp_factor) / compptr->h_samp_factor), + (JDIMENSION) cinfo->max_v_samp_factor); + } + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcsample.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcsample.c new file mode 100644 index 0000000000..5cc2999c17 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jcsample.c @@ -0,0 +1,519 @@ +/* + * jcsample.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains downsampling routines. + * + * Downsampling input data is counted in "row groups". A row group + * is defined to be max_v_samp_factor pixel rows of each component, + * from which the downsampler produces v_samp_factor sample rows. + * A single row group is processed in each call to the downsampler module. + * + * The downsampler is responsible for edge-expansion of its output data + * to fill an integral number of DCT blocks horizontally. The source buffer + * may be modified if it is helpful for this purpose (the source buffer is + * allocated wide enough to correspond to the desired output width). + * The caller (the prep controller) is responsible for vertical padding. + * + * The downsampler may request "context rows" by setting need_context_rows + * during startup. In this case, the input arrays will contain at least + * one row group's worth of pixels above and below the passed-in data; + * the caller will create dummy rows at image top and bottom by replicating + * the first or last real pixel row. + * + * An excellent reference for image resampling is + * Digital Image Warping, George Wolberg, 1990. + * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. + * + * The downsampling algorithm used here is a simple average of the source + * pixels covered by the output pixel. The hi-falutin sampling literature + * refers to this as a "box filter". In general the characteristics of a box + * filter are not very good, but for the specific cases we normally use (1:1 + * and 2:1 ratios) the box is equivalent to a "triangle filter" which is not + * nearly so bad. If you intend to use other sampling ratios, you'd be well + * advised to improve this code. + * + * A simple input-smoothing capability is provided. This is mainly intended + * for cleaning up color-dithered GIF input files (if you find it inadequate, + * we suggest using an external filtering program such as pnmconvol). When + * enabled, each input pixel P is replaced by a weighted sum of itself and its + * eight neighbors. P's weight is 1-8*SF and each neighbor's weight is SF, + * where SF = (smoothing_factor / 1024). + * Currently, smoothing is only supported for 2h2v sampling factors. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Pointer to routine to downsample a single component */ +typedef JMETHOD(void, downsample1_ptr, + (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data)); + +/* Private subobject */ + +typedef struct { + struct jpeg_downsampler pub; /* public fields */ + + /* Downsampling method pointers, one per component */ + downsample1_ptr methods[MAX_COMPONENTS]; +} my_downsampler; + +typedef my_downsampler * my_downsample_ptr; + + +/* + * Initialize for a downsampling pass. + */ + +METHODDEF(void) +start_pass_downsample (j_compress_ptr cinfo) +{ + /* no work for now */ +} + + +/* + * Expand a component horizontally from width input_cols to width output_cols, + * by duplicating the rightmost samples. + */ + +LOCAL(void) +expand_right_edge (JSAMPARRAY image_data, int num_rows, + JDIMENSION input_cols, JDIMENSION output_cols) +{ + register JSAMPROW ptr; + register JSAMPLE pixval; + register int count; + int row; + int numcols = (int) (output_cols - input_cols); + + if (numcols > 0) { + for (row = 0; row < num_rows; row++) { + ptr = image_data[row] + input_cols; + pixval = ptr[-1]; /* don't need GETJSAMPLE() here */ + for (count = numcols; count > 0; count--) + *ptr++ = pixval; + } + } +} + + +/* + * Do downsampling for a whole row group (all components). + * + * In this version we simply downsample each component independently. + */ + +METHODDEF(void) +sep_downsample (j_compress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_index, + JSAMPIMAGE output_buf, JDIMENSION out_row_group_index) +{ + my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample; + int ci; + jpeg_component_info * compptr; + JSAMPARRAY in_ptr, out_ptr; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + in_ptr = input_buf[ci] + in_row_index; + out_ptr = output_buf[ci] + (out_row_group_index * compptr->v_samp_factor); + (*downsample->methods[ci]) (cinfo, compptr, in_ptr, out_ptr); + } +} + + +/* + * Downsample pixel values of a single component. + * One row group is processed per call. + * This version handles arbitrary integral sampling ratios, without smoothing. + * Note that this version is not actually used for customary sampling ratios. + */ + +METHODDEF(void) +int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v; + JDIMENSION outcol, outcol_h; /* outcol_h == outcol*h_expand */ + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + JSAMPROW inptr, outptr; + JPEG_INT32 outvalue; + + h_expand = cinfo->max_h_samp_factor / compptr->h_samp_factor; + v_expand = cinfo->max_v_samp_factor / compptr->v_samp_factor; + numpix = h_expand * v_expand; + numpix2 = numpix/2; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * h_expand); + + inrow = 0; + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + for (outcol = 0, outcol_h = 0; outcol < output_cols; + outcol++, outcol_h += h_expand) { + outvalue = 0; + for (v = 0; v < v_expand; v++) { + inptr = input_data[inrow+v] + outcol_h; + for (h = 0; h < h_expand; h++) { + outvalue += (JPEG_INT32) GETJSAMPLE(*inptr++); + } + } + *outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix); + } + inrow += v_expand; + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the special case of a full-size component, + * without smoothing. + */ + +METHODDEF(void) +fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + /* Copy the data */ + jcopy_sample_rows(input_data, 0, output_data, 0, + cinfo->max_v_samp_factor, cinfo->image_width); + /* Edge-expand */ + expand_right_edge(output_data, cinfo->max_v_samp_factor, + cinfo->image_width, compptr->width_in_blocks * DCTSIZE); +} + + +/* + * Downsample pixel values of a single component. + * This version handles the common case of 2:1 horizontal and 1:1 vertical, + * without smoothing. + * + * A note about the "bias" calculations: when rounding fractional values to + * integer, we do not want to always round 0.5 up to the next integer. + * If we did that, we'd introduce a noticeable bias towards larger values. + * Instead, this code is arranged so that 0.5 will be rounded up or down at + * alternate pixel locations (a simple ordered dither pattern). + */ + +METHODDEF(void) +h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int outrow; + JDIMENSION outcol; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr, outptr; + register int bias; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * 2); + + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr = input_data[outrow]; + bias = 0; /* bias = 0,1,0,1,... for successive samples */ + for (outcol = 0; outcol < output_cols; outcol++) { + *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr) + GETJSAMPLE(inptr[1]) + + bias) >> 1); + bias ^= 1; /* 0=>1, 1=>0 */ + inptr += 2; + } + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the standard case of 2:1 horizontal and 2:1 vertical, + * without smoothing. + */ + +METHODDEF(void) +h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow, outrow; + JDIMENSION outcol; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr0, inptr1, outptr; + register int bias; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * 2); + + inrow = 0; + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr0 = input_data[inrow]; + inptr1 = input_data[inrow+1]; + bias = 1; /* bias = 1,2,1,2,... for successive samples */ + for (outcol = 0; outcol < output_cols; outcol++) { + *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]) + + bias) >> 2); + bias ^= 3; /* 1=>2, 2=>1 */ + inptr0 += 2; inptr1 += 2; + } + inrow += 2; + } +} + + +#ifdef INPUT_SMOOTHING_SUPPORTED + +/* + * Downsample pixel values of a single component. + * This version handles the standard case of 2:1 horizontal and 2:1 vertical, + * with smoothing. One row of context is required. + */ + +METHODDEF(void) +h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow, outrow; + JDIMENSION colctr; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr0, inptr1, above_ptr, below_ptr, outptr; + JPEG_INT32 membersum, neighsum, memberscale, neighscale; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, + cinfo->image_width, output_cols * 2); + + /* We don't bother to form the individual "smoothed" input pixel values; + * we can directly compute the output which is the average of the four + * smoothed values. Each of the four member pixels contributes a fraction + * (1-8*SF) to its own smoothed image and a fraction SF to each of the three + * other smoothed pixels, therefore a total fraction (1-5*SF)/4 to the final + * output. The four corner-adjacent neighbor pixels contribute a fraction + * SF to just one smoothed pixel, or SF/4 to the final output; while the + * eight edge-adjacent neighbors contribute SF to each of two smoothed + * pixels, or SF/2 overall. In order to use integer arithmetic, these + * factors are scaled by 2^16 = 65536. + * Also recall that SF = smoothing_factor / 1024. + */ + + memberscale = 16384 - cinfo->smoothing_factor * 80; /* scaled (1-5*SF)/4 */ + neighscale = cinfo->smoothing_factor * 16; /* scaled SF/4 */ + + inrow = 0; + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr0 = input_data[inrow]; + inptr1 = input_data[inrow+1]; + above_ptr = input_data[inrow-1]; + below_ptr = input_data[inrow+2]; + + /* Special case for first column: pretend column -1 is same as column 0 */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[2]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[2]); + neighsum += neighsum; + neighsum += GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[2]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[2]); + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; + + for (colctr = output_cols - 2; colctr > 0; colctr--) { + /* sum of pixels directly mapped to this output element */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + /* sum of edge-neighbor pixels */ + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[2]) + + GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[2]); + /* The edge-neighbors count twice as much as corner-neighbors */ + neighsum += neighsum; + /* Add in the corner-neighbors */ + neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[2]) + + GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[2]); + /* form final output scaled up by 2^16 */ + membersum = membersum * memberscale + neighsum * neighscale; + /* round, descale and output it */ + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; + } + + /* Special case for last column */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[1]); + neighsum += neighsum; + neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[1]); + membersum = membersum * memberscale + neighsum * neighscale; + *outptr = (JSAMPLE) ((membersum + 32768) >> 16); + + inrow += 2; + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the special case of a full-size component, + * with smoothing. One row of context is required. + */ + +METHODDEF(void) +fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int outrow; + JDIMENSION colctr; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr, above_ptr, below_ptr, outptr; + JPEG_INT32 membersum, neighsum, memberscale, neighscale; + int colsum, lastcolsum, nextcolsum; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, + cinfo->image_width, output_cols); + + /* Each of the eight neighbor pixels contributes a fraction SF to the + * smoothed pixel, while the main pixel contributes (1-8*SF). In order + * to use integer arithmetic, these factors are multiplied by 2^16 = 65536. + * Also recall that SF = smoothing_factor / 1024. + */ + + memberscale = 65536L - cinfo->smoothing_factor * 512L; /* scaled 1-8*SF */ + neighscale = cinfo->smoothing_factor * 64; /* scaled SF */ + + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr = input_data[outrow]; + above_ptr = input_data[outrow-1]; + below_ptr = input_data[outrow+1]; + + /* Special case for first column */ + colsum = GETJSAMPLE(*above_ptr++) + GETJSAMPLE(*below_ptr++) + + GETJSAMPLE(*inptr); + membersum = GETJSAMPLE(*inptr++); + nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + + GETJSAMPLE(*inptr); + neighsum = colsum + (colsum - membersum) + nextcolsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + lastcolsum = colsum; colsum = nextcolsum; + + for (colctr = output_cols - 2; colctr > 0; colctr--) { + membersum = GETJSAMPLE(*inptr++); + above_ptr++; below_ptr++; + nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + + GETJSAMPLE(*inptr); + neighsum = lastcolsum + (colsum - membersum) + nextcolsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + lastcolsum = colsum; colsum = nextcolsum; + } + + /* Special case for last column */ + membersum = GETJSAMPLE(*inptr); + neighsum = lastcolsum + (colsum - membersum) + colsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr = (JSAMPLE) ((membersum + 32768) >> 16); + + } +} + +#endif /* INPUT_SMOOTHING_SUPPORTED */ + + +/* + * Module initialization routine for downsampling. + * Note that we must select a routine for each component. + */ + +GLOBAL(void) +jinit_downsampler (j_compress_ptr cinfo) +{ + my_downsample_ptr downsample; + int ci; + jpeg_component_info * compptr; + wxjpeg_boolean smoothok = TRUE; + + downsample = (my_downsample_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_downsampler)); + cinfo->downsample = (struct jpeg_downsampler *) downsample; + downsample->pub.start_pass = start_pass_downsample; + downsample->pub.downsample = sep_downsample; + downsample->pub.need_context_rows = FALSE; + + if (cinfo->CCIR601_sampling) + ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); + + /* Verify we can handle the sampling factors, and set up method pointers */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->h_samp_factor == cinfo->max_h_samp_factor && + compptr->v_samp_factor == cinfo->max_v_samp_factor) { +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor) { + downsample->methods[ci] = fullsize_smooth_downsample; + downsample->pub.need_context_rows = TRUE; + } else +#endif + downsample->methods[ci] = fullsize_downsample; + } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor && + compptr->v_samp_factor == cinfo->max_v_samp_factor) { + smoothok = FALSE; + downsample->methods[ci] = h2v1_downsample; + } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor && + compptr->v_samp_factor * 2 == cinfo->max_v_samp_factor) { +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor) { + downsample->methods[ci] = h2v2_smooth_downsample; + downsample->pub.need_context_rows = TRUE; + } else +#endif + downsample->methods[ci] = h2v2_downsample; + } else if ((cinfo->max_h_samp_factor % compptr->h_samp_factor) == 0 && + (cinfo->max_v_samp_factor % compptr->v_samp_factor) == 0) { + smoothok = FALSE; + downsample->methods[ci] = int_downsample; + } else + ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); + } + +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor && !smoothok) + TRACEMS(cinfo, 0, JTRC_SMOOTH_NOTIMPL); +#endif +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jctrans.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jctrans.c new file mode 100644 index 0000000000..c5bb27f321 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jctrans.c @@ -0,0 +1,402 @@ +/* + * jctrans.c + * + * Copyright (C) 1995-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains library routines for transcoding compression, + * that is, writing raw DCT coefficient arrays to an output JPEG file. + * The routines in jcapimin.c will also be needed by a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(void) transencode_master_selection + JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); +LOCAL(void) transencode_coef_controller + JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); + +#if defined(__VISAGECPP__) +/* Visual Age fixups for multiple declarations */ +# define start_pass_coef start_pass_coef2 /* already in jccoeft.c */ +# define compress_output compress_output2 /* already in jccoeft.c */ +#endif + + +/* + * Compression initialization for writing raw-coefficient data. + * Before calling this, all parameters and a data destination must be set up. + * Call jpeg_finish_compress() to actually write the data. + * + * The number of passed virtual arrays must match cinfo->num_components. + * Note that the virtual arrays need not be filled or even realized at + * the time write_coefficients is called; indeed, if the virtual arrays + * were requested from this compression object's memory manager, they + * typically will be realized during this routine and filled afterwards. + */ + +GLOBAL(void) +jpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Mark all tables to be written */ + jpeg_suppress_tables(cinfo, FALSE); + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Perform master selection of active modules */ + transencode_master_selection(cinfo, coef_arrays); + /* Wait for jpeg_finish_compress() call */ + cinfo->next_scanline = 0; /* so jpeg_write_marker works */ + cinfo->global_state = CSTATE_WRCOEFS; +} + + +/* + * Initialize the compression object with default parameters, + * then copy from the source object all parameters needed for lossless + * transcoding. Parameters that can be varied without loss (such as + * scan script and Huffman optimization) are left in their default states. + */ + +GLOBAL(void) +jpeg_copy_critical_parameters (j_decompress_ptr srcinfo, + j_compress_ptr dstinfo) +{ + JQUANT_TBL ** qtblptr; + jpeg_component_info *incomp, *outcomp; + JQUANT_TBL *c_quant, *slot_quant; + int tblno, ci, coefi; + + /* Safety check to ensure start_compress not called yet. */ + if (dstinfo->global_state != CSTATE_START) + ERREXIT1(dstinfo, JERR_BAD_STATE, dstinfo->global_state); + /* Copy fundamental image dimensions */ + dstinfo->image_width = srcinfo->image_width; + dstinfo->image_height = srcinfo->image_height; + dstinfo->input_components = srcinfo->num_components; + dstinfo->in_color_space = srcinfo->jpeg_color_space; + /* Initialize all parameters to default values */ + jpeg_set_defaults(dstinfo); + /* jpeg_set_defaults may choose wrong colorspace, eg YCbCr if input is RGB. + * Fix it to get the right header markers for the image colorspace. + */ + jpeg_set_colorspace(dstinfo, srcinfo->jpeg_color_space); + dstinfo->data_precision = srcinfo->data_precision; + dstinfo->CCIR601_sampling = srcinfo->CCIR601_sampling; + /* Copy the source's quantization tables. */ + for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { + if (srcinfo->quant_tbl_ptrs[tblno] != NULL) { + qtblptr = & dstinfo->quant_tbl_ptrs[tblno]; + if (*qtblptr == NULL) + *qtblptr = jpeg_alloc_quant_table((j_common_ptr) dstinfo); + MEMCOPY((*qtblptr)->quantval, + srcinfo->quant_tbl_ptrs[tblno]->quantval, + SIZEOF((*qtblptr)->quantval)); + (*qtblptr)->sent_table = FALSE; + } + } + /* Copy the source's per-component info. + * Note we assume jpeg_set_defaults has allocated the dest comp_info array. + */ + dstinfo->num_components = srcinfo->num_components; + if (dstinfo->num_components < 1 || dstinfo->num_components > MAX_COMPONENTS) + ERREXIT2(dstinfo, JERR_COMPONENT_COUNT, dstinfo->num_components, + MAX_COMPONENTS); + for (ci = 0, incomp = srcinfo->comp_info, outcomp = dstinfo->comp_info; + ci < dstinfo->num_components; ci++, incomp++, outcomp++) { + outcomp->component_id = incomp->component_id; + outcomp->h_samp_factor = incomp->h_samp_factor; + outcomp->v_samp_factor = incomp->v_samp_factor; + outcomp->quant_tbl_no = incomp->quant_tbl_no; + /* Make sure saved quantization table for component matches the qtable + * slot. If not, the input file re-used this qtable slot. + * IJG encoder currently cannot duplicate this. + */ + tblno = outcomp->quant_tbl_no; + if (tblno < 0 || tblno >= NUM_QUANT_TBLS || + srcinfo->quant_tbl_ptrs[tblno] == NULL) + ERREXIT1(dstinfo, JERR_NO_QUANT_TABLE, tblno); + slot_quant = srcinfo->quant_tbl_ptrs[tblno]; + c_quant = incomp->quant_table; + if (c_quant != NULL) { + for (coefi = 0; coefi < DCTSIZE2; coefi++) { + if (c_quant->quantval[coefi] != slot_quant->quantval[coefi]) + ERREXIT1(dstinfo, JERR_MISMATCHED_QUANT_TABLE, tblno); + } + } + /* Note: we do not copy the source's Huffman table assignments; + * instead we rely on jpeg_set_colorspace to have made a suitable choice. + */ + } + /* Also copy JFIF version and resolution information, if available. + * Strictly speaking this isn't "critical" info, but it's nearly + * always appropriate to copy it if available. In particular, + * if the application chooses to copy JFIF 1.02 extension markers from + * the source file, we need to copy the version to make sure we don't + * emit a file that has 1.02 extensions but a claimed version of 1.01. + * We will *not*, however, copy version info from mislabeled "2.01" files. + */ + if (srcinfo->saw_JFIF_marker) { + if (srcinfo->JFIF_major_version == 1) { + dstinfo->JFIF_major_version = srcinfo->JFIF_major_version; + dstinfo->JFIF_minor_version = srcinfo->JFIF_minor_version; + } + dstinfo->density_unit = srcinfo->density_unit; + dstinfo->X_density = srcinfo->X_density; + dstinfo->Y_density = srcinfo->Y_density; + } +} + + +/* + * Master selection of compression modules for transcoding. + * This substitutes for jcinit.c's initialization of the full compressor. + */ + +LOCAL(void) +transencode_master_selection (j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays) +{ + /* Although we don't actually use input_components for transcoding, + * jcmaster.c's initial_setup will complain if input_components is 0. + */ + cinfo->input_components = 1; + /* Initialize master control (includes parameter checking/processing) */ + jinit_c_master_control(cinfo, TRUE /* transcode only */); + + /* Entropy encoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + jinit_phuff_encoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_encoder(cinfo); + } + + /* We need a special coefficient buffer controller. */ + transencode_coef_controller(cinfo, coef_arrays); + + jinit_marker_writer(cinfo); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Write the datastream header (SOI, JFIF) immediately. + * Frame and scan headers are postponed till later. + * This lets application insert special markers after the SOI. + */ + (*cinfo->marker->write_file_header) (cinfo); +} + + +/* + * The rest of this file is a special implementation of the coefficient + * buffer controller. This is similar to jccoefct.c, but it handles only + * output from presupplied virtual arrays. Furthermore, we generate any + * dummy padding blocks on-the-fly rather than expecting them to be present + * in the arrays. + */ + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_coef_controller pub; /* public fields */ + + JDIMENSION iMCU_row_num; /* iMCU row # within image */ + JDIMENSION mcu_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* Virtual block array for each component. */ + jvirt_barray_ptr * whole_image; + + /* Workspace for constructing dummy blocks at right/bottom edges. */ + JBLOCKROW dummy_buffer[C_MAX_BLOCKS_IN_MCU]; +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + + +LOCAL(void) +start_iMCU_row (j_compress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->mcu_ctr = 0; + coef->MCU_vert_offset = 0; +} + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + if (pass_mode != JBUF_CRANK_DEST) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + coef->iMCU_row_num = 0; + start_iMCU_row(cinfo); +} + + +/* + * Process some data. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the scan. + * The data is obtained from the virtual arrays and fed to the entropy coder. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf is ignored; it is likely to be a NULL pointer. + */ + +METHODDEF(wxjpeg_boolean) +compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int blkn, ci, xindex, yindex, yoffset, blockcnt; + JDIMENSION start_col; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + start_col = MCU_col_num * compptr->MCU_width; + blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (coef->iMCU_row_num < last_iMCU_row || + yindex+yoffset < compptr->last_row_height) { + /* Fill in pointers to real blocks in this row */ + buffer_ptr = buffer[ci][yindex+yoffset] + start_col; + for (xindex = 0; xindex < blockcnt; xindex++) + MCU_buffer[blkn++] = buffer_ptr++; + } else { + /* At bottom of image, need a whole row of dummy blocks */ + xindex = 0; + } + /* Fill in any dummy blocks needed in this row. + * Dummy blocks are filled in the same way as in jccoefct.c: + * all zeroes in the AC entries, DC entries equal to previous + * block's DC value. The init routine has already zeroed the + * AC entries, so we need only set the DC entries correctly. + */ + for (; xindex < compptr->MCU_width; xindex++) { + MCU_buffer[blkn] = coef->dummy_buffer[blkn]; + MCU_buffer[blkn][0][0] = MCU_buffer[blkn-1][0][0]; + blkn++; + } + } + } + /* Try to write the MCU. */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->mcu_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->mcu_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + + +/* + * Initialize coefficient buffer controller. + * + * Each passed coefficient array must be the right size for that + * coefficient: width_in_blocks wide and height_in_blocks high, + * with unitheight at least v_samp_factor. + */ + +LOCAL(void) +transencode_coef_controller (j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays) +{ + my_coef_ptr coef; + JBLOCKROW buffer; + int i; + + coef = (my_coef_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_coef_controller)); + cinfo->coef = (struct jpeg_c_coef_controller *) coef; + coef->pub.start_pass = start_pass_coef; + coef->pub.compress_data = compress_output; + + /* Save pointer to virtual arrays */ + coef->whole_image = coef_arrays; + + /* Allocate and pre-zero space for dummy DCT blocks. */ + buffer = (JBLOCKROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + jzero_far((void FAR *) buffer, C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) { + coef->dummy_buffer[i] = buffer + i; + } +} + +#if defined(__VISAGECPP__) +# ifdef start_pass_coef2 +# undef start_pass_coef2 +# endif +# ifdef compress_output2 +# undef compress_output2 +# endif +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdapimin.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdapimin.c new file mode 100644 index 0000000000..5c8474f018 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdapimin.c @@ -0,0 +1,395 @@ +/* + * jdapimin.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the decompression half + * of the JPEG library. These are the "minimum" API routines that may be + * needed in either the normal full-decompression case or the + * transcoding-only case. + * + * Most of the routines intended to be called directly by an application + * are in this file or in jdapistd.c. But also see jcomapi.c for routines + * shared by compression and decompression, and jdtrans.c for the transcoding + * case. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Initialization of a JPEG decompression object. + * The error manager must already be set up (in case memory manager fails). + */ + +GLOBAL(void) +jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize) +{ + int i; + + /* Guard against version mismatches between library and caller. */ + cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ + if (version != JPEG_LIB_VERSION) + ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); + if (structsize != SIZEOF(struct jpeg_decompress_struct)) + ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, + (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize); + + /* For debugging purposes, we zero the whole master structure. + * But the application has already set the err pointer, and may have set + * client_data, so we have to save and restore those fields. + * Note: if application hasn't set client_data, tools like Purify may + * complain here. + */ + { + struct jpeg_error_mgr * err = cinfo->err; + void * client_data = cinfo->client_data; /* ignore Purify complaint here */ + MEMZERO(cinfo, SIZEOF(struct jpeg_decompress_struct)); + cinfo->err = err; + cinfo->client_data = client_data; + } + cinfo->is_decompressor = TRUE; + + /* Initialize a memory manager instance for this object */ + jinit_memory_mgr((j_common_ptr) cinfo); + + /* Zero out pointers to permanent structures. */ + cinfo->progress = NULL; + cinfo->src = NULL; + + for (i = 0; i < NUM_QUANT_TBLS; i++) + cinfo->quant_tbl_ptrs[i] = NULL; + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + cinfo->dc_huff_tbl_ptrs[i] = NULL; + cinfo->ac_huff_tbl_ptrs[i] = NULL; + } + + /* Initialize marker processor so application can override methods + * for COM, APPn markers before calling jpeg_read_header. + */ + cinfo->marker_list = NULL; + jinit_marker_reader(cinfo); + + /* And initialize the overall input controller. */ + jinit_input_controller(cinfo); + + /* OK, I'm ready */ + cinfo->global_state = DSTATE_START; +} + + +/* + * Destruction of a JPEG decompression object + */ + +GLOBAL(void) +jpeg_destroy_decompress (j_decompress_ptr cinfo) +{ + jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Abort processing of a JPEG decompression operation, + * but don't destroy the object itself. + */ + +GLOBAL(void) +jpeg_abort_decompress (j_decompress_ptr cinfo) +{ + jpeg_abort((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Set default decompression parameters. + */ + +LOCAL(void) +default_decompress_parms (j_decompress_ptr cinfo) +{ + /* Guess the input colorspace, and set output colorspace accordingly. */ + /* (Wish JPEG committee had provided a real way to specify this...) */ + /* Note application may override our guesses. */ + switch (cinfo->num_components) { + case 1: + cinfo->jpeg_color_space = JCS_GRAYSCALE; + cinfo->out_color_space = JCS_GRAYSCALE; + break; + + case 3: + if (cinfo->saw_JFIF_marker) { + cinfo->jpeg_color_space = JCS_YCbCr; /* JFIF implies YCbCr */ + } else if (cinfo->saw_Adobe_marker) { + switch (cinfo->Adobe_transform) { + case 0: + cinfo->jpeg_color_space = JCS_RGB; + break; + case 1: + cinfo->jpeg_color_space = JCS_YCbCr; + break; + default: + WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); + cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ + break; + } + } else { + /* Saw no special markers, try to guess from the component IDs */ + int cid0 = cinfo->comp_info[0].component_id; + int cid1 = cinfo->comp_info[1].component_id; + int cid2 = cinfo->comp_info[2].component_id; + + if (cid0 == 1 && cid1 == 2 && cid2 == 3) + cinfo->jpeg_color_space = JCS_YCbCr; /* assume JFIF w/out marker */ + else if (cid0 == 82 && cid1 == 71 && cid2 == 66) + cinfo->jpeg_color_space = JCS_RGB; /* ASCII 'R', 'G', 'B' */ + else { + TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2); + cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ + } + } + /* Always guess RGB is proper output colorspace. */ + cinfo->out_color_space = JCS_RGB; + break; + + case 4: + if (cinfo->saw_Adobe_marker) { + switch (cinfo->Adobe_transform) { + case 0: + cinfo->jpeg_color_space = JCS_CMYK; + break; + case 2: + cinfo->jpeg_color_space = JCS_YCCK; + break; + default: + WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); + cinfo->jpeg_color_space = JCS_YCCK; /* assume it's YCCK */ + break; + } + } else { + /* No special markers, assume straight CMYK. */ + cinfo->jpeg_color_space = JCS_CMYK; + } + cinfo->out_color_space = JCS_CMYK; + break; + + default: + cinfo->jpeg_color_space = JCS_UNKNOWN; + cinfo->out_color_space = JCS_UNKNOWN; + break; + } + + /* Set defaults for other decompression parameters. */ + cinfo->scale_num = 1; /* 1:1 scaling */ + cinfo->scale_denom = 1; + cinfo->output_gamma = 1.0; + cinfo->buffered_image = FALSE; + cinfo->raw_data_out = FALSE; + cinfo->dct_method = JDCT_DEFAULT; + cinfo->do_fancy_upsampling = TRUE; + cinfo->do_block_smoothing = TRUE; + cinfo->quantize_colors = FALSE; + /* We set these in case application only sets quantize_colors. */ + cinfo->dither_mode = JDITHER_FS; +#ifdef QUANT_2PASS_SUPPORTED + cinfo->two_pass_quantize = TRUE; +#else + cinfo->two_pass_quantize = FALSE; +#endif + cinfo->desired_number_of_colors = 256; + cinfo->colormap = NULL; + /* Initialize for no mode change in buffered-image mode. */ + cinfo->enable_1pass_quant = FALSE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; +} + + +/* + * Decompression startup: read start of JPEG datastream to see what's there. + * Need only initialize JPEG object and supply a data source before calling. + * + * This routine will read as far as the first SOS marker (ie, actual start of + * compressed data), and will save all tables and parameters in the JPEG + * object. It will also initialize the decompression parameters to default + * values, and finally return JPEG_HEADER_OK. On return, the application may + * adjust the decompression parameters and then call jpeg_start_decompress. + * (Or, if the application only wanted to determine the image parameters, + * the data need not be decompressed. In that case, call jpeg_abort or + * jpeg_destroy to release any temporary space.) + * If an abbreviated (tables only) datastream is presented, the routine will + * return JPEG_HEADER_TABLES_ONLY upon reaching EOI. The application may then + * re-use the JPEG object to read the abbreviated image datastream(s). + * It is unnecessary (but OK) to call jpeg_abort in this case. + * The JPEG_SUSPENDED return code only occurs if the data source module + * requests suspension of the decompressor. In this case the application + * should load more source data and then re-call jpeg_read_header to resume + * processing. + * If a non-suspending data source is used and require_image is TRUE, then the + * return code need not be inspected since only JPEG_HEADER_OK is possible. + * + * This routine is now just a front end to jpeg_consume_input, with some + * extra error checking. + */ + +GLOBAL(int) +jpeg_read_header (j_decompress_ptr cinfo, wxjpeg_boolean require_image) +{ + int retcode; + + if (cinfo->global_state != DSTATE_START && + cinfo->global_state != DSTATE_INHEADER) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + retcode = jpeg_consume_input(cinfo); + + switch (retcode) { + case JPEG_REACHED_SOS: + retcode = JPEG_HEADER_OK; + break; + case JPEG_REACHED_EOI: + if (require_image) /* Complain if application wanted an image */ + ERREXIT(cinfo, JERR_NO_IMAGE); + /* Reset to start state; it would be safer to require the application to + * call jpeg_abort, but we can't change it now for compatibility reasons. + * A side effect is to free any temporary memory (there shouldn't be any). + */ + jpeg_abort((j_common_ptr) cinfo); /* sets state = DSTATE_START */ + retcode = JPEG_HEADER_TABLES_ONLY; + break; + case JPEG_SUSPENDED: + /* no work */ + break; + } + + return retcode; +} + + +/* + * Consume data in advance of what the decompressor requires. + * This can be called at any time once the decompressor object has + * been created and a data source has been set up. + * + * This routine is essentially a state machine that handles a couple + * of critical state-transition actions, namely initial setup and + * transition from header scanning to ready-for-start_decompress. + * All the actual input is done via the input controller's consume_input + * method. + */ + +GLOBAL(int) +jpeg_consume_input (j_decompress_ptr cinfo) +{ + int retcode = JPEG_SUSPENDED; + + /* NB: every possible DSTATE value should be listed in this switch */ + switch (cinfo->global_state) { + case DSTATE_START: + /* Start-of-datastream actions: reset appropriate modules */ + (*cinfo->inputctl->reset_input_controller) (cinfo); + /* Initialize application's data source module */ + (*cinfo->src->init_source) (cinfo); + cinfo->global_state = DSTATE_INHEADER; + /*FALLTHROUGH*/ + case DSTATE_INHEADER: + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_REACHED_SOS) { /* Found SOS, prepare to decompress */ + /* Set up default parameters based on header data */ + default_decompress_parms(cinfo); + /* Set global state: ready for start_decompress */ + cinfo->global_state = DSTATE_READY; + } + break; + case DSTATE_READY: + /* Can't advance past first SOS until start_decompress is called */ + retcode = JPEG_REACHED_SOS; + break; + case DSTATE_PRELOAD: + case DSTATE_PRESCAN: + case DSTATE_SCANNING: + case DSTATE_RAW_OK: + case DSTATE_BUFIMAGE: + case DSTATE_BUFPOST: + case DSTATE_STOPPING: + retcode = (*cinfo->inputctl->consume_input) (cinfo); + break; + default: + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + return retcode; +} + + +/* + * Have we finished reading the input file? + */ + +GLOBAL(wxjpeg_boolean) +jpeg_input_complete (j_decompress_ptr cinfo) +{ + /* Check for valid jpeg object */ + if (cinfo->global_state < DSTATE_START || + cinfo->global_state > DSTATE_STOPPING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + return cinfo->inputctl->eoi_reached; +} + + +/* + * Is there more than one scan? + */ + +GLOBAL(wxjpeg_boolean) +jpeg_has_multiple_scans (j_decompress_ptr cinfo) +{ + /* Only valid after jpeg_read_header completes */ + if (cinfo->global_state < DSTATE_READY || + cinfo->global_state > DSTATE_STOPPING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + return cinfo->inputctl->has_multiple_scans; +} + + +/* + * Finish JPEG decompression. + * + * This will normally just verify the file trailer and release temp storage. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(wxjpeg_boolean) +jpeg_finish_decompress (j_decompress_ptr cinfo) +{ + if ((cinfo->global_state == DSTATE_SCANNING || + cinfo->global_state == DSTATE_RAW_OK) && ! cinfo->buffered_image) { + /* Terminate final pass of non-buffered mode */ + if (cinfo->output_scanline < cinfo->output_height) + ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); + (*cinfo->master->finish_output_pass) (cinfo); + cinfo->global_state = DSTATE_STOPPING; + } else if (cinfo->global_state == DSTATE_BUFIMAGE) { + /* Finishing after a buffered-image operation */ + cinfo->global_state = DSTATE_STOPPING; + } else if (cinfo->global_state != DSTATE_STOPPING) { + /* STOPPING = repeat call after a suspension, anything else is error */ + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + /* Read until EOI */ + while (! cinfo->inputctl->eoi_reached) { + if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) + return FALSE; /* Suspend, come back later */ + } + /* Do final cleanup */ + (*cinfo->src->term_source) (cinfo); + /* We can use jpeg_abort to release memory and reset global_state */ + jpeg_abort((j_common_ptr) cinfo); + return TRUE; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdapistd.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdapistd.c new file mode 100644 index 0000000000..9c995b4d87 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdapistd.c @@ -0,0 +1,275 @@ +/* + * jdapistd.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the decompression half + * of the JPEG library. These are the "standard" API routines that are + * used in the normal full-decompression case. They are not used by a + * transcoding-only application. Note that if an application links in + * jpeg_start_decompress, it will end up linking in the entire decompressor. + * We thus must separate this file from jdapimin.c to avoid linking the + * whole decompression library into a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(wxjpeg_boolean) output_pass_setup JPP((j_decompress_ptr cinfo)); + + +/* + * Decompression initialization. + * jpeg_read_header must be completed before calling this. + * + * If a multipass operating mode was selected, this will do all but the + * last pass, and thus may take a great deal of time. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(wxjpeg_boolean) +jpeg_start_decompress (j_decompress_ptr cinfo) +{ + if (cinfo->global_state == DSTATE_READY) { + /* First call: initialize master control, select active modules */ + jinit_master_decompress(cinfo); + if (cinfo->buffered_image) { + /* No more work here; expecting jpeg_start_output next */ + cinfo->global_state = DSTATE_BUFIMAGE; + return TRUE; + } + cinfo->global_state = DSTATE_PRELOAD; + } + if (cinfo->global_state == DSTATE_PRELOAD) { + /* If file has multiple scans, absorb them all into the coef buffer */ + if (cinfo->inputctl->has_multiple_scans) { +#ifdef D_MULTISCAN_FILES_SUPPORTED + for (;;) { + int retcode; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + /* Absorb some more input */ + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_SUSPENDED) + return FALSE; + if (retcode == JPEG_REACHED_EOI) + break; + /* Advance progress counter if appropriate */ + if (cinfo->progress != NULL && + (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { + if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { + /* jdmaster underestimated number of scans; ratchet up one scan */ + cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; + } + } + } +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + } + cinfo->output_scan_number = cinfo->input_scan_number; + } else if (cinfo->global_state != DSTATE_PRESCAN) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Perform any dummy output passes, and set up for the final pass */ + return output_pass_setup(cinfo); +} + + +/* + * Set up for an output pass, and perform any dummy pass(es) needed. + * Common subroutine for jpeg_start_decompress and jpeg_start_output. + * Entry: global_state = DSTATE_PRESCAN only if previously suspended. + * Exit: If done, returns TRUE and sets global_state for proper output mode. + * If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN. + */ + +LOCAL(wxjpeg_boolean) +output_pass_setup (j_decompress_ptr cinfo) +{ + if (cinfo->global_state != DSTATE_PRESCAN) { + /* First call: do pass setup */ + (*cinfo->master->prepare_for_output_pass) (cinfo); + cinfo->output_scanline = 0; + cinfo->global_state = DSTATE_PRESCAN; + } + /* Loop over any required dummy passes */ + while (cinfo->master->is_dummy_pass) { +#ifdef QUANT_2PASS_SUPPORTED + /* Crank through the dummy pass */ + while (cinfo->output_scanline < cinfo->output_height) { + JDIMENSION last_scanline; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + /* Process some data */ + last_scanline = cinfo->output_scanline; + (*cinfo->main->process_data) (cinfo, (JSAMPARRAY) NULL, + &cinfo->output_scanline, (JDIMENSION) 0); + if (cinfo->output_scanline == last_scanline) + return FALSE; /* No progress made, must suspend */ + } + /* Finish up dummy pass, and set up for another one */ + (*cinfo->master->finish_output_pass) (cinfo); + (*cinfo->master->prepare_for_output_pass) (cinfo); + cinfo->output_scanline = 0; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* QUANT_2PASS_SUPPORTED */ + } + /* Ready for application to drive output pass through + * jpeg_read_scanlines or jpeg_read_raw_data. + */ + cinfo->global_state = cinfo->raw_data_out ? DSTATE_RAW_OK : DSTATE_SCANNING; + return TRUE; +} + + +/* + * Read some scanlines of data from the JPEG decompressor. + * + * The return value will be the number of lines actually read. + * This may be less than the number requested in several cases, + * including bottom of image, data source suspension, and operating + * modes that emit multiple scanlines at a time. + * + * Note: we warn about excess calls to jpeg_read_scanlines() since + * this likely signals an application programmer error. However, + * an oversize buffer (max_lines > scanlines remaining) is not an error. + */ + +GLOBAL(JDIMENSION) +jpeg_read_scanlines (j_decompress_ptr cinfo, JSAMPARRAY scanlines, + JDIMENSION max_lines) +{ + JDIMENSION row_ctr; + + if (cinfo->global_state != DSTATE_SCANNING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->output_scanline >= cinfo->output_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Process some data */ + row_ctr = 0; + (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, max_lines); + cinfo->output_scanline += row_ctr; + return row_ctr; +} + + +/* + * Alternate entry point to read raw data. + * Processes exactly one iMCU row per call, unless suspended. + */ + +GLOBAL(JDIMENSION) +jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION max_lines) +{ + JDIMENSION lines_per_iMCU_row; + + if (cinfo->global_state != DSTATE_RAW_OK) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->output_scanline >= cinfo->output_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Verify that at least one iMCU row can be returned. */ + lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size; + if (max_lines < lines_per_iMCU_row) + ERREXIT(cinfo, JERR_BUFFER_SIZE); + + /* Decompress directly into user's buffer. */ + if (! (*cinfo->coef->decompress_data) (cinfo, data)) + return 0; /* suspension forced, can do nothing more */ + + /* OK, we processed one iMCU row. */ + cinfo->output_scanline += lines_per_iMCU_row; + return lines_per_iMCU_row; +} + + +/* Additional entry points for buffered-image mode. */ + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Initialize for an output pass in buffered-image mode. + */ + +GLOBAL(wxjpeg_boolean) +jpeg_start_output (j_decompress_ptr cinfo, int scan_number) +{ + if (cinfo->global_state != DSTATE_BUFIMAGE && + cinfo->global_state != DSTATE_PRESCAN) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Limit scan number to valid range */ + if (scan_number <= 0) + scan_number = 1; + if (cinfo->inputctl->eoi_reached && + scan_number > cinfo->input_scan_number) + scan_number = cinfo->input_scan_number; + cinfo->output_scan_number = scan_number; + /* Perform any dummy output passes, and set up for the real pass */ + return output_pass_setup(cinfo); +} + + +/* + * Finish up after an output pass in buffered-image mode. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(wxjpeg_boolean) +jpeg_finish_output (j_decompress_ptr cinfo) +{ + if ((cinfo->global_state == DSTATE_SCANNING || + cinfo->global_state == DSTATE_RAW_OK) && cinfo->buffered_image) { + /* Terminate this pass. */ + /* We do not require the whole pass to have been completed. */ + (*cinfo->master->finish_output_pass) (cinfo); + cinfo->global_state = DSTATE_BUFPOST; + } else if (cinfo->global_state != DSTATE_BUFPOST) { + /* BUFPOST = repeat call after a suspension, anything else is error */ + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + /* Read markers looking for SOS or EOI */ + while (cinfo->input_scan_number <= cinfo->output_scan_number && + ! cinfo->inputctl->eoi_reached) { + if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) + return FALSE; /* Suspend, come back later */ + } + cinfo->global_state = DSTATE_BUFIMAGE; + return TRUE; +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdatadst.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdatadst.c new file mode 100644 index 0000000000..053431fa66 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdatadst.c @@ -0,0 +1,151 @@ +/* + * jdatadst.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains compression data destination routines for the case of + * emitting JPEG data to a file (or any stdio stream). While these routines + * are sufficient for most applications, some will want to use a different + * destination manager. + * IMPORTANT: we assume that fwrite() will correctly transcribe an array of + * JOCTETs into 8-bit-wide elements on external storage. If char is wider + * than 8 bits on your machine, you may need to do some tweaking. + */ + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" + + +/* Expanded data destination object for stdio output */ + +typedef struct { + struct jpeg_destination_mgr pub; /* public fields */ + + FILE * outfile; /* target stream */ + JOCTET * buffer; /* start of buffer */ +} my_destination_mgr; + +typedef my_destination_mgr * my_dest_ptr; + +#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */ + + +/* + * Initialize destination --- called by jpeg_start_compress + * before any data is actually written. + */ + +METHODDEF(void) +init_destination (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + + /* Allocate the output buffer --- it will be released when done with image */ + dest->buffer = (JOCTET *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + OUTPUT_BUF_SIZE * SIZEOF(JOCTET)); + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; +} + + +/* + * Empty the output buffer --- called whenever buffer fills up. + * + * In typical applications, this should write the entire output buffer + * (ignoring the current state of next_output_byte & free_in_buffer), + * reset the pointer & count to the start of the buffer, and return TRUE + * indicating that the buffer has been dumped. + * + * In applications that need to be able to suspend compression due to output + * overrun, a FALSE return indicates that the buffer cannot be emptied now. + * In this situation, the compressor will return to its caller (possibly with + * an indication that it has not accepted all the supplied scanlines). The + * application should resume compression after it has made more room in the + * output buffer. Note that there are substantial restrictions on the use of + * suspension --- see the documentation. + * + * When suspending, the compressor will back up to a convenient restart point + * (typically the start of the current MCU). next_output_byte & free_in_buffer + * indicate where the restart point will be if the current call returns FALSE. + * Data beyond this point will be regenerated after resumption, so do not + * write it out when emptying the buffer externally. + */ + +METHODDEF(wxjpeg_boolean) +empty_output_buffer (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + + if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) != + (size_t) OUTPUT_BUF_SIZE) + ERREXIT(cinfo, JERR_FILE_WRITE); + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; + + return TRUE; +} + + +/* + * Terminate destination --- called by jpeg_finish_compress + * after all data has been written. Usually needs to flush buffer. + * + * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding + * application must deal with any cleanup that should happen even + * for error exit. + */ + +METHODDEF(void) +term_destination (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer; + + /* Write any data remaining in the buffer */ + if (datacount > 0) { + if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount) + ERREXIT(cinfo, JERR_FILE_WRITE); + } + fflush(dest->outfile); + /* Make sure we wrote the output file OK */ + if (ferror(dest->outfile)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * Prepare for output to a stdio stream. + * The caller must have already opened the stream, and is responsible + * for closing it after finishing compression. + */ + +GLOBAL(void) +jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile) +{ + my_dest_ptr dest; + + /* The destination object is made permanent so that multiple JPEG images + * can be written to the same file without re-executing jpeg_stdio_dest. + * This makes it dangerous to use this manager and a different destination + * manager serially with the same JPEG object, because their private object + * sizes may be different. Caveat programmer. + */ + if (cinfo->dest == NULL) { /* first time for this JPEG object? */ + cinfo->dest = (struct jpeg_destination_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_destination_mgr)); + } + + dest = (my_dest_ptr) cinfo->dest; + dest->pub.init_destination = init_destination; + dest->pub.empty_output_buffer = empty_output_buffer; + dest->pub.term_destination = term_destination; + dest->outfile = outfile; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdatasrc.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdatasrc.c new file mode 100644 index 0000000000..09a43300aa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdatasrc.c @@ -0,0 +1,212 @@ +/* + * jdatasrc.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains decompression data source routines for the case of + * reading JPEG data from a file (or any stdio stream). While these routines + * are sufficient for most applications, some will want to use a different + * source manager. + * IMPORTANT: we assume that fread() will correctly transcribe an array of + * JOCTETs from 8-bit-wide elements on external storage. If char is wider + * than 8 bits on your machine, you may need to do some tweaking. + */ + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" + + +/* Expanded data source object for stdio input */ + +typedef struct { + struct jpeg_source_mgr pub; /* public fields */ + + FILE * infile; /* source stream */ + JOCTET * buffer; /* start of buffer */ + wxjpeg_boolean start_of_file; /* have we gotten any data yet? */ +} my_source_mgr; + +typedef my_source_mgr * my_src_ptr; + +#define INPUT_BUF_SIZE 4096 /* choose an efficiently fread'able size */ + + +/* + * Initialize source --- called by jpeg_read_header + * before any data is actually read. + */ + +METHODDEF(void) +init_source (j_decompress_ptr cinfo) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + + /* We reset the empty-input-file flag for each image, + * but we don't clear the input buffer. + * This is correct behavior for reading a series of images from one source. + */ + src->start_of_file = TRUE; +} + + +/* + * Fill the input buffer --- called whenever buffer is emptied. + * + * In typical applications, this should read fresh data into the buffer + * (ignoring the current state of next_input_byte & bytes_in_buffer), + * reset the pointer & count to the start of the buffer, and return TRUE + * indicating that the buffer has been reloaded. It is not necessary to + * fill the buffer entirely, only to obtain at least one more byte. + * + * There is no such thing as an EOF return. If the end of the file has been + * reached, the routine has a choice of ERREXIT() or inserting fake data into + * the buffer. In most cases, generating a warning message and inserting a + * fake EOI marker is the best course of action --- this will allow the + * decompressor to output however much of the image is there. However, + * the resulting error message is misleading if the real problem is an empty + * input file, so we handle that case specially. + * + * In applications that need to be able to suspend compression due to input + * not being available yet, a FALSE return indicates that no more data can be + * obtained right now, but more may be forthcoming later. In this situation, + * the decompressor will return to its caller (with an indication of the + * number of scanlines it has read, if any). The application should resume + * decompression after it has loaded more data into the input buffer. Note + * that there are substantial restrictions on the use of suspension --- see + * the documentation. + * + * When suspending, the decompressor will back up to a convenient restart point + * (typically the start of the current MCU). next_input_byte & bytes_in_buffer + * indicate where the restart point will be if the current call returns FALSE. + * Data beyond this point must be rescanned after resumption, so move it to + * the front of the buffer rather than discarding it. + */ + +METHODDEF(wxjpeg_boolean) +fill_input_buffer (j_decompress_ptr cinfo) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + size_t nbytes; + + nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE); + + if (nbytes <= 0) { + if (src->start_of_file) /* Treat empty input file as fatal error */ + ERREXIT(cinfo, JERR_INPUT_EMPTY); + WARNMS(cinfo, JWRN_JPEG_EOF); + /* Insert a fake EOI marker */ + src->buffer[0] = (JOCTET) 0xFF; + src->buffer[1] = (JOCTET) JPEG_EOI; + nbytes = 2; + } + + src->pub.next_input_byte = src->buffer; + src->pub.bytes_in_buffer = nbytes; + src->start_of_file = FALSE; + + return TRUE; +} + + +/* + * Skip data --- used to skip over a potentially large amount of + * uninteresting data (such as an APPn marker). + * + * Writers of suspendable-input applications must note that skip_input_data + * is not granted the right to give a suspension return. If the skip extends + * beyond the data currently in the buffer, the buffer can be marked empty so + * that the next read will cause a fill_input_buffer call that can suspend. + * Arranging for additional bytes to be discarded before reloading the input + * buffer is the application writer's problem. + */ + +METHODDEF(void) +skip_input_data (j_decompress_ptr cinfo, long num_bytes) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + + /* Just a dumb implementation for now. Could use fseek() except + * it doesn't work on pipes. Not clear that being smart is worth + * any trouble anyway --- large skips are infrequent. + */ + if (num_bytes > 0) { + while (num_bytes > (long) src->pub.bytes_in_buffer) { + num_bytes -= (long) src->pub.bytes_in_buffer; + (void) fill_input_buffer(cinfo); + /* note we assume that fill_input_buffer will never return FALSE, + * so suspension need not be handled. + */ + } + src->pub.next_input_byte += (size_t) num_bytes; + src->pub.bytes_in_buffer -= (size_t) num_bytes; + } +} + + +/* + * An additional method that can be provided by data source modules is the + * resync_to_restart method for error recovery in the presence of RST markers. + * For the moment, this source module just uses the default resync method + * provided by the JPEG library. That method assumes that no backtracking + * is possible. + */ + + +/* + * Terminate source --- called by jpeg_finish_decompress + * after all data has been read. Often a no-op. + * + * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding + * application must deal with any cleanup that should happen even + * for error exit. + */ + +METHODDEF(void) +term_source (j_decompress_ptr cinfo) +{ + /* no work necessary here */ +} + + +/* + * Prepare for input from a stdio stream. + * The caller must have already opened the stream, and is responsible + * for closing it after finishing decompression. + */ + +GLOBAL(void) +jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) +{ + my_src_ptr src; + + /* The source object and input buffer are made permanent so that a series + * of JPEG images can be read from the same file by calling jpeg_stdio_src + * only before the first one. (If we discarded the buffer at the end of + * one image, we'd likely lose the start of the next one.) + * This makes it unsafe to use this manager and a different source + * manager serially with the same JPEG object. Caveat programmer. + */ + if (cinfo->src == NULL) { /* first time for this JPEG object? */ + cinfo->src = (struct jpeg_source_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_source_mgr)); + src = (my_src_ptr) cinfo->src; + src->buffer = (JOCTET *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + INPUT_BUF_SIZE * SIZEOF(JOCTET)); + } + + src = (my_src_ptr) cinfo->src; + src->pub.init_source = init_source; + src->pub.fill_input_buffer = fill_input_buffer; + src->pub.skip_input_data = skip_input_data; + src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ + src->pub.term_source = term_source; + src->infile = infile; + src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ + src->pub.next_input_byte = NULL; /* until buffer loaded */ +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdcoefct.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdcoefct.c new file mode 100644 index 0000000000..e5c3636e46 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdcoefct.c @@ -0,0 +1,745 @@ +/* + * jdcoefct.c + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the coefficient buffer controller for decompression. + * This controller is the top level of the JPEG decompressor proper. + * The coefficient buffer lies between entropy decoding and inverse-DCT steps. + * + * In buffered-image mode, this controller is the interface between + * input-oriented processing and output-oriented processing. + * Also, the input side (only) is used when reading a file for transcoding. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +/* Block smoothing is only applicable for progressive JPEG, so: */ +#ifndef D_PROGRESSIVE_SUPPORTED +#undef BLOCK_SMOOTHING_SUPPORTED +#endif + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_coef_controller pub; /* public fields */ + + /* These variables keep track of the current location of the input side. */ + /* cinfo->input_iMCU_row is also used for this. */ + JDIMENSION MCU_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* The output side's location is represented by cinfo->output_iMCU_row. */ + + /* In single-pass modes, it's sufficient to buffer just one MCU. + * We allocate a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks, + * and let the entropy decoder write into that workspace each time. + * (On 80x86, the workspace is FAR even though it's not really very big; + * this is to keep the module interfaces unchanged when a large coefficient + * buffer is necessary.) + * In multi-pass modes, this array points to the current MCU's blocks + * within the virtual arrays; it is used only by the input side. + */ + JBLOCKROW MCU_buffer[D_MAX_BLOCKS_IN_MCU]; + +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* In multi-pass modes, we need a virtual block array for each component. */ + jvirt_barray_ptr whole_image[MAX_COMPONENTS]; +#endif + +#ifdef BLOCK_SMOOTHING_SUPPORTED + /* When doing block smoothing, we latch coefficient Al values here */ + int * coef_bits_latch; +#define SAVED_COEFS 6 /* we save coef_bits[0..5] */ +#endif +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + +/* Forward declarations */ +METHODDEF(int) decompress_onepass + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#ifdef D_MULTISCAN_FILES_SUPPORTED +METHODDEF(int) decompress_data + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#endif +#ifdef BLOCK_SMOOTHING_SUPPORTED +LOCAL(wxjpeg_boolean) smoothing_ok JPP((j_decompress_ptr cinfo)); +METHODDEF(int) decompress_smooth_data + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#endif + + +LOCAL(void) +start_iMCU_row (j_decompress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row (input side) */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (cinfo->input_iMCU_row < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->MCU_ctr = 0; + coef->MCU_vert_offset = 0; +} + + +/* + * Initialize for an input processing pass. + */ + +METHODDEF(void) +#if defined(__VISAGECPP__) +start_input_pass2 (j_decompress_ptr cinfo) +#else +start_input_pass (j_decompress_ptr cinfo) +#endif +{ + cinfo->input_iMCU_row = 0; + start_iMCU_row(cinfo); +} + +/* + * Initialize for an output processing pass. + */ + +METHODDEF(void) +start_output_pass (j_decompress_ptr cinfo) +{ +#ifdef BLOCK_SMOOTHING_SUPPORTED + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* If multipass, check to see whether to use block smoothing on this pass */ + if (coef->pub.coef_arrays != NULL) { + if (cinfo->do_block_smoothing && smoothing_ok(cinfo)) + coef->pub.decompress_data = decompress_smooth_data; + else + coef->pub.decompress_data = decompress_data; + } +#endif + cinfo->output_iMCU_row = 0; +} + + +/* + * Decompress and return some data in the single-pass case. + * Always attempts to emit one fully interleaved MCU row ("iMCU" row). + * Input and output must run in lockstep since we have only a one-MCU buffer. + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + * + * NB: output_buf contains a plane for each component in image, + * which we index according to the component's SOF position. + */ + +METHODDEF(int) +decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int blkn, ci, xindex, yindex, yoffset, useful_width; + JSAMPARRAY output_ptr; + JDIMENSION start_col, output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + + /* Loop to process as much as one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col; + MCU_col_num++) { + /* Try to fetch an MCU. Entropy decoder expects buffer to be zeroed. */ + jzero_far((void FAR *) coef->MCU_buffer[0], + (size_t) (cinfo->blocks_in_MCU * SIZEOF(JBLOCK))); + if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->MCU_ctr = MCU_col_num; + return JPEG_SUSPENDED; + } + /* Determine where data should go in output_buf and do the IDCT thing. + * We skip dummy blocks at the right and bottom edges (but blkn gets + * incremented past them!). Note the inner loop relies on having + * allocated the MCU_buffer[] blocks sequentially. + */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) { + blkn += compptr->MCU_blocks; + continue; + } + inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index]; + useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + output_ptr = output_buf[compptr->component_index] + + yoffset * compptr->DCT_scaled_size; + start_col = MCU_col_num * compptr->MCU_sample_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (cinfo->input_iMCU_row < last_iMCU_row || + yoffset+yindex < compptr->last_row_height) { + output_col = start_col; + for (xindex = 0; xindex < useful_width; xindex++) { + (*inverse_DCT) (cinfo, compptr, + (JCOEFPTR) coef->MCU_buffer[blkn+xindex], + output_ptr, output_col); + output_col += compptr->DCT_scaled_size; + } + } + blkn += compptr->MCU_width; + output_ptr += compptr->DCT_scaled_size; + } + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->MCU_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + cinfo->output_iMCU_row++; + if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) { + start_iMCU_row(cinfo); + return JPEG_ROW_COMPLETED; + } + /* Completed the scan */ + (*cinfo->inputctl->finish_input_pass) (cinfo); + return JPEG_SCAN_COMPLETED; +} + + +/* + * Dummy consume-input routine for single-pass operation. + */ + +METHODDEF(int) +dummy_consume_data (j_decompress_ptr cinfo) +{ + return JPEG_SUSPENDED; /* Always indicate nothing was done */ +} + + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Consume input data and store it in the full-image coefficient buffer. + * We read as much as one fully interleaved MCU row ("iMCU" row) per call, + * ie, v_samp_factor block rows for each component in the scan. + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + */ + +METHODDEF(int) +consume_data (j_decompress_ptr cinfo) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + int blkn, ci, xindex, yindex, yoffset; + JDIMENSION start_col; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + cinfo->input_iMCU_row * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, TRUE); + /* Note: entropy decoder expects buffer to be zeroed, + * but this is handled automatically by the memory manager + * because we requested a pre-zeroed array. + */ + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + start_col = MCU_col_num * compptr->MCU_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + buffer_ptr = buffer[ci][yindex+yoffset] + start_col; + for (xindex = 0; xindex < compptr->MCU_width; xindex++) { + coef->MCU_buffer[blkn++] = buffer_ptr++; + } + } + } + /* Try to fetch the MCU. */ + if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->MCU_ctr = MCU_col_num; + return JPEG_SUSPENDED; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->MCU_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) { + start_iMCU_row(cinfo); + return JPEG_ROW_COMPLETED; + } + /* Completed the scan */ + (*cinfo->inputctl->finish_input_pass) (cinfo); + return JPEG_SCAN_COMPLETED; +} + + +/* + * Decompress and return some data in the multi-pass case. + * Always attempts to emit one fully interleaved MCU row ("iMCU" row). + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + * + * NB: output_buf contains a plane for each component in image. + */ + +METHODDEF(int) +decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION block_num; + int ci, block_row, block_rows; + JBLOCKARRAY buffer; + JBLOCKROW buffer_ptr; + JSAMPARRAY output_ptr; + JDIMENSION output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + + /* Force some input to be done if we are getting ahead of the input. */ + while (cinfo->input_scan_number < cinfo->output_scan_number || + (cinfo->input_scan_number == cinfo->output_scan_number && + cinfo->input_iMCU_row <= cinfo->output_iMCU_row)) { + if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) + return JPEG_SUSPENDED; + } + + /* OK, output from the virtual arrays. */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) + continue; + /* Align the virtual buffer for this component. */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + cinfo->output_iMCU_row * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + /* Count non-dummy DCT block rows in this iMCU row. */ + if (cinfo->output_iMCU_row < last_iMCU_row) + block_rows = compptr->v_samp_factor; + else { + /* NB: can't use last_row_height here; it is input-side-dependent! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + } + inverse_DCT = cinfo->idct->inverse_DCT[ci]; + output_ptr = output_buf[ci]; + /* Loop over all DCT blocks to be processed. */ + for (block_row = 0; block_row < block_rows; block_row++) { + buffer_ptr = buffer[block_row]; + output_col = 0; + for (block_num = 0; block_num < compptr->width_in_blocks; block_num++) { + (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr, + output_ptr, output_col); + buffer_ptr++; + output_col += compptr->DCT_scaled_size; + } + output_ptr += compptr->DCT_scaled_size; + } + } + + if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) + return JPEG_ROW_COMPLETED; + return JPEG_SCAN_COMPLETED; +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + + +#ifdef BLOCK_SMOOTHING_SUPPORTED + +/* + * This code applies interblock smoothing as described by section K.8 + * of the JPEG standard: the first 5 AC coefficients are estimated from + * the DC values of a DCT block and its 8 neighboring blocks. + * We apply smoothing only for progressive JPEG decoding, and only if + * the coefficients it can estimate are not yet known to full precision. + */ + +/* Natural-order array positions of the first 5 zigzag-order coefficients */ +#define Q01_POS 1 +#define Q10_POS 8 +#define Q20_POS 16 +#define Q11_POS 9 +#define Q02_POS 2 + +/* + * Determine whether block smoothing is applicable and safe. + * We also latch the current states of the coef_bits[] entries for the + * AC coefficients; otherwise, if the input side of the decompressor + * advances into a new scan, we might think the coefficients are known + * more accurately than they really are. + */ + +LOCAL(wxjpeg_boolean) +smoothing_ok (j_decompress_ptr cinfo) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + wxjpeg_boolean smoothing_useful = FALSE; + int ci, coefi; + jpeg_component_info *compptr; + JQUANT_TBL * qtable; + int * coef_bits; + int * coef_bits_latch; + + if (! cinfo->progressive_mode || cinfo->coef_bits == NULL) + return FALSE; + + /* Allocate latch area if not already done */ + if (coef->coef_bits_latch == NULL) + coef->coef_bits_latch = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * + (SAVED_COEFS * SIZEOF(int))); + coef_bits_latch = coef->coef_bits_latch; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* All components' quantization values must already be latched. */ + if ((qtable = compptr->quant_table) == NULL) + return FALSE; + /* Verify DC & first 5 AC quantizers are nonzero to avoid zero-divide. */ + if (qtable->quantval[0] == 0 || + qtable->quantval[Q01_POS] == 0 || + qtable->quantval[Q10_POS] == 0 || + qtable->quantval[Q20_POS] == 0 || + qtable->quantval[Q11_POS] == 0 || + qtable->quantval[Q02_POS] == 0) + return FALSE; + /* DC values must be at least partly known for all components. */ + coef_bits = cinfo->coef_bits[ci]; + if (coef_bits[0] < 0) + return FALSE; + /* Block smoothing is helpful if some AC coefficients remain inaccurate. */ + for (coefi = 1; coefi <= 5; coefi++) { + coef_bits_latch[coefi] = coef_bits[coefi]; + if (coef_bits[coefi] != 0) + smoothing_useful = TRUE; + } + coef_bits_latch += SAVED_COEFS; + } + + return smoothing_useful; +} + + +/* + * Variant of decompress_data for use when doing block smoothing. + */ + +METHODDEF(int) +decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION block_num, last_block_column; + int ci, block_row, block_rows, access_rows; + JBLOCKARRAY buffer; + JBLOCKROW buffer_ptr, prev_block_row, next_block_row; + JSAMPARRAY output_ptr; + JDIMENSION output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + wxjpeg_boolean first_row, last_row; + JBLOCK workspace; + int *coef_bits; + JQUANT_TBL *quanttbl; + JPEG_INT32 Q00,Q01,Q02,Q10,Q11,Q20, num; + int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9; + int Al, pred; + + /* Force some input to be done if we are getting ahead of the input. */ + while (cinfo->input_scan_number <= cinfo->output_scan_number && + ! cinfo->inputctl->eoi_reached) { + if (cinfo->input_scan_number == cinfo->output_scan_number) { + /* If input is working on current scan, we ordinarily want it to + * have completed the current row. But if input scan is DC, + * we want it to keep one row ahead so that next block row's DC + * values are up to date. + */ + JDIMENSION delta = (cinfo->Ss == 0) ? 1 : 0; + if (cinfo->input_iMCU_row > cinfo->output_iMCU_row+delta) + break; + } + if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) + return JPEG_SUSPENDED; + } + + /* OK, output from the virtual arrays. */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) + continue; + /* Count non-dummy DCT block rows in this iMCU row. */ + if (cinfo->output_iMCU_row < last_iMCU_row) { + block_rows = compptr->v_samp_factor; + access_rows = block_rows * 2; /* this and next iMCU row */ + last_row = FALSE; + } else { + /* NB: can't use last_row_height here; it is input-side-dependent! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + access_rows = block_rows; /* this iMCU row only */ + last_row = TRUE; + } + /* Align the virtual buffer for this component. */ + if (cinfo->output_iMCU_row > 0) { + access_rows += compptr->v_samp_factor; /* prior iMCU row too */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + (cinfo->output_iMCU_row - 1) * compptr->v_samp_factor, + (JDIMENSION) access_rows, FALSE); + buffer += compptr->v_samp_factor; /* point to current iMCU row */ + first_row = FALSE; + } else { + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + (JDIMENSION) 0, (JDIMENSION) access_rows, FALSE); + first_row = TRUE; + } + /* Fetch component-dependent info */ + coef_bits = coef->coef_bits_latch + (ci * SAVED_COEFS); + quanttbl = compptr->quant_table; + Q00 = quanttbl->quantval[0]; + Q01 = quanttbl->quantval[Q01_POS]; + Q10 = quanttbl->quantval[Q10_POS]; + Q20 = quanttbl->quantval[Q20_POS]; + Q11 = quanttbl->quantval[Q11_POS]; + Q02 = quanttbl->quantval[Q02_POS]; + inverse_DCT = cinfo->idct->inverse_DCT[ci]; + output_ptr = output_buf[ci]; + /* Loop over all DCT blocks to be processed. */ + for (block_row = 0; block_row < block_rows; block_row++) { + buffer_ptr = buffer[block_row]; + if (first_row && block_row == 0) + prev_block_row = buffer_ptr; + else + prev_block_row = buffer[block_row-1]; + if (last_row && block_row == block_rows-1) + next_block_row = buffer_ptr; + else + next_block_row = buffer[block_row+1]; + /* We fetch the surrounding DC values using a sliding-register approach. + * Initialize all nine here so as to do the right thing on narrow pics. + */ + DC1 = DC2 = DC3 = (int) prev_block_row[0][0]; + DC4 = DC5 = DC6 = (int) buffer_ptr[0][0]; + DC7 = DC8 = DC9 = (int) next_block_row[0][0]; + output_col = 0; + last_block_column = compptr->width_in_blocks - 1; + for (block_num = 0; block_num <= last_block_column; block_num++) { + /* Fetch current DCT block into workspace so we can modify it. */ + jcopy_block_row(buffer_ptr, (JBLOCKROW) workspace, (JDIMENSION) 1); + /* Update DC values */ + if (block_num < last_block_column) { + DC3 = (int) prev_block_row[1][0]; + DC6 = (int) buffer_ptr[1][0]; + DC9 = (int) next_block_row[1][0]; + } + /* Compute coefficient estimates per K.8. + * An estimate is applied only if coefficient is still zero, + * and is not known to be fully accurate. + */ + /* AC01 */ + if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) { + num = 36 * Q00 * (DC4 - DC6); + if (num >= 0) { + pred = (int) (((Q01<<7) + num) / (Q01<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q10<<7) + num) / (Q10<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q20<<7) + num) / (Q20<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q11<<7) + num) / (Q11<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q02<<7) + num) / (Q02<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<DCT_scaled_size; + } + output_ptr += compptr->DCT_scaled_size; + } + } + + if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) + return JPEG_ROW_COMPLETED; + return JPEG_SCAN_COMPLETED; +} + +#endif /* BLOCK_SMOOTHING_SUPPORTED */ + + +/* + * Initialize coefficient buffer controller. + */ + +GLOBAL(void) +jinit_d_coef_controller (j_decompress_ptr cinfo, wxjpeg_boolean need_full_buffer) +{ + my_coef_ptr coef; + + coef = (my_coef_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_coef_controller)); + cinfo->coef = (struct jpeg_d_coef_controller *) coef; +#if defined(__VISAGECPP__) + coef->pub.start_input_pass2 = start_input_pass2; +#else + coef->pub.start_input_pass = start_input_pass; +#endif + + coef->pub.start_output_pass = start_output_pass; +#ifdef BLOCK_SMOOTHING_SUPPORTED + coef->coef_bits_latch = NULL; +#endif + + /* Create the coefficient buffer. */ + if (need_full_buffer) { +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* Allocate a full-image virtual array for each component, */ + /* padded to a multiple of samp_factor DCT blocks in each direction. */ + /* Note we ask for a pre-zeroed array. */ + int ci, access_rows; + jpeg_component_info *compptr; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + access_rows = compptr->v_samp_factor; +#ifdef BLOCK_SMOOTHING_SUPPORTED + /* If block smoothing could be used, need a bigger window */ + if (cinfo->progressive_mode) + access_rows *= 3; +#endif + coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, TRUE, + (JDIMENSION) jround_up((long) compptr->width_in_blocks, + (long) compptr->h_samp_factor), + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor), + (JDIMENSION) access_rows); + } + coef->pub.consume_data = consume_data; + coef->pub.decompress_data = decompress_data; + coef->pub.coef_arrays = coef->whole_image; /* link to virtual arrays */ +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + /* We only need a single-MCU buffer. */ + JBLOCKROW buffer; + int i; + + buffer = (JBLOCKROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + D_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + for (i = 0; i < D_MAX_BLOCKS_IN_MCU; i++) { + coef->MCU_buffer[i] = buffer + i; + } + coef->pub.consume_data = dummy_consume_data; + coef->pub.decompress_data = decompress_onepass; + coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */ + } +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdcolor.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdcolor.c new file mode 100644 index 0000000000..cca2842297 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdcolor.c @@ -0,0 +1,410 @@ +/* + * jdcolor.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains output colorspace conversion routines. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#if defined(__VISAGECPP__) +/* Visual Age fixups for multiple declarations */ +# define null_convert null_convert2 /* already in jcmaint.c */ +# define grayscale_convert grayscale_convert2 /* already in jcmaint.c */ +#endif + +/* Private subobject */ + +typedef struct { + struct jpeg_color_deconverter pub; /* public fields */ + + /* Private state for YCC->RGB conversion */ + int * Cr_r_tab; /* => table for Cr to R conversion */ + int * Cb_b_tab; /* => table for Cb to B conversion */ + JPEG_INT32 * Cr_g_tab; /* => table for Cr to G conversion */ + JPEG_INT32 * Cb_g_tab; /* => table for Cb to G conversion */ +} my_color_deconverter; + +typedef my_color_deconverter * my_cconvert_ptr; + + +/**************** YCbCr -> RGB conversion: most common case **************/ + +/* + * YCbCr is defined per CCIR 601-1, except that Cb and Cr are + * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. + * The conversion equations to be implemented are therefore + * R = Y + 1.40200 * Cr + * G = Y - 0.34414 * Cb - 0.71414 * Cr + * B = Y + 1.77200 * Cb + * where Cb and Cr represent the incoming values less CENTERJSAMPLE. + * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.) + * + * To avoid floating-point arithmetic, we represent the fractional constants + * as integers scaled up by 2^16 (about 4 digits precision); we have to divide + * the products by 2^16, with appropriate rounding, to get the correct answer. + * Notice that Y, being an integral input, does not contribute any fraction + * so it need not participate in the rounding. + * + * For even more speed, we avoid doing any multiplications in the inner loop + * by precalculating the constants times Cb and Cr for all possible values. + * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); + * for 12-bit samples it is still acceptable. It's not very reasonable for + * 16-bit samples, but if you want lossless storage you shouldn't be changing + * colorspace anyway. + * The Cr=>R and Cb=>B values can be rounded to integers in advance; the + * values for the G calculation are left scaled up, since we must add them + * together before rounding. + */ + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define ONE_HALF ((JPEG_INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((JPEG_INT32) ((x) * (1L<RGB colorspace conversion. + */ + +LOCAL(void) +build_ycc_rgb_table (j_decompress_ptr cinfo) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + int i; + JPEG_INT32 x; + SHIFT_TEMPS + + cconvert->Cr_r_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + cconvert->Cb_b_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + cconvert->Cr_g_tab = (JPEG_INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(JPEG_INT32)); + cconvert->Cb_g_tab = (JPEG_INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(JPEG_INT32)); + + for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { + /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ + /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ + /* Cr=>R value is nearest int to 1.40200 * x */ + cconvert->Cr_r_tab[i] = (int) + RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS); + /* Cb=>B value is nearest int to 1.77200 * x */ + cconvert->Cb_b_tab[i] = (int) + RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS); + /* Cr=>G value is scaled-up -0.71414 * x */ + cconvert->Cr_g_tab[i] = (- FIX(0.71414)) * x; + /* Cb=>G value is scaled-up -0.34414 * x */ + /* We also add in ONE_HALF so that need not do it in inner loop */ + cconvert->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF; + } +} + + +/* + * Convert some rows of samples to the output colorspace. + * + * Note that we change from noninterleaved, one-plane-per-component format + * to interleaved-pixel format. The output buffer is therefore three times + * as wide as the input buffer. + * A starting row offset is provided only for the input buffer. The caller + * can easily adjust the passed output_buf value to accommodate any row + * offset required on that side. + */ + +METHODDEF(void) +ycc_rgb_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int y, cb, cr; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + register int * Crrtab = cconvert->Cr_r_tab; + register int * Cbbtab = cconvert->Cb_b_tab; + register JPEG_INT32 * Crgtab = cconvert->Cr_g_tab; + register JPEG_INT32 * Cbgtab = cconvert->Cb_g_tab; + SHIFT_TEMPS + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + y = GETJSAMPLE(inptr0[col]); + cb = GETJSAMPLE(inptr1[col]); + cr = GETJSAMPLE(inptr2[col]); + /* Range-limiting is essential due to noise introduced by DCT losses. */ + outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; + outptr[RGB_GREEN] = range_limit[y + + ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], + SCALEBITS))]; + outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]]; + outptr += RGB_PIXELSIZE; + } + } +} + + +/**************** Cases other than YCbCr -> RGB **************/ + + +/* + * Color conversion for no colorspace change: just copy the data, + * converting from separate-planes to interleaved representation. + */ + +METHODDEF(void) +null_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + register JSAMPROW inptr, outptr; + register JDIMENSION count; + register int num_components = cinfo->num_components; + JDIMENSION num_cols = cinfo->output_width; + int ci; + + while (--num_rows >= 0) { + for (ci = 0; ci < num_components; ci++) { + inptr = input_buf[ci][input_row]; + outptr = output_buf[0] + ci; + for (count = num_cols; count > 0; count--) { + *outptr = *inptr++; /* needn't bother with GETJSAMPLE() here */ + outptr += num_components; + } + } + input_row++; + output_buf++; + } +} + + +/* + * Color conversion for grayscale: just copy the data. + * This also works for YCbCr -> grayscale conversion, in which + * we just copy the Y (luminance) component and ignore chrominance. + */ + +METHODDEF(void) +grayscale_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + jcopy_sample_rows(input_buf[0], (int) input_row, output_buf, 0, + num_rows, cinfo->output_width); +} + + +/* + * Convert grayscale to RGB: just duplicate the graylevel three times. + * This is provided to support applications that don't want to cope + * with grayscale as a separate case. + */ + +METHODDEF(void) +gray_rgb_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + register JSAMPROW inptr, outptr; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + + while (--num_rows >= 0) { + inptr = input_buf[0][input_row++]; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + /* We can dispense with GETJSAMPLE() here */ + outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; + outptr += RGB_PIXELSIZE; + } + } +} + + +/* + * Adobe-style YCCK->CMYK conversion. + * We convert YCbCr to R=1-C, G=1-M, and B=1-Y using the same + * conversion as above, while passing K (black) unchanged. + * We assume build_ycc_rgb_table has been called. + */ + +METHODDEF(void) +ycck_cmyk_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int y, cb, cr; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2, inptr3; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + register int * Crrtab = cconvert->Cr_r_tab; + register int * Cbbtab = cconvert->Cb_b_tab; + register JPEG_INT32 * Crgtab = cconvert->Cr_g_tab; + register JPEG_INT32 * Cbgtab = cconvert->Cb_g_tab; + SHIFT_TEMPS + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + inptr3 = input_buf[3][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + y = GETJSAMPLE(inptr0[col]); + cb = GETJSAMPLE(inptr1[col]); + cr = GETJSAMPLE(inptr2[col]); + /* Range-limiting is essential due to noise introduced by DCT losses. */ + outptr[0] = range_limit[MAXJSAMPLE - (y + Crrtab[cr])]; /* red */ + outptr[1] = range_limit[MAXJSAMPLE - (y + /* green */ + ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], + SCALEBITS)))]; + outptr[2] = range_limit[MAXJSAMPLE - (y + Cbbtab[cb])]; /* blue */ + /* K passes through unchanged */ + outptr[3] = inptr3[col]; /* don't need GETJSAMPLE here */ + outptr += 4; + } + } +} + + +/* + * Empty method for start_pass. + */ + +METHODDEF(void) +start_pass_dcolor (j_decompress_ptr cinfo) +{ + /* no work needed */ +} + + +/* + * Module initialization routine for output colorspace conversion. + */ + +GLOBAL(void) +jinit_color_deconverter (j_decompress_ptr cinfo) +{ + my_cconvert_ptr cconvert; + int ci; + + cconvert = (my_cconvert_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_color_deconverter)); + cinfo->cconvert = (struct jpeg_color_deconverter *) cconvert; + cconvert->pub.start_pass = start_pass_dcolor; + + /* Make sure num_components agrees with jpeg_color_space */ + switch (cinfo->jpeg_color_space) { + case JCS_GRAYSCALE: + if (cinfo->num_components != 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + case JCS_RGB: + case JCS_YCbCr: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + case JCS_CMYK: + case JCS_YCCK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + default: /* JCS_UNKNOWN can be anything */ + if (cinfo->num_components < 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + } + + /* Set out_color_components and conversion method based on requested space. + * Also clear the component_needed flags for any unused components, + * so that earlier pipeline stages can avoid useless computation. + */ + + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + cinfo->out_color_components = 1; + if (cinfo->jpeg_color_space == JCS_GRAYSCALE || + cinfo->jpeg_color_space == JCS_YCbCr) { + cconvert->pub.color_convert = grayscale_convert; + /* For color->grayscale conversion, only the Y (0) component is needed */ + for (ci = 1; ci < cinfo->num_components; ci++) + cinfo->comp_info[ci].component_needed = FALSE; + } else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_RGB: + cinfo->out_color_components = RGB_PIXELSIZE; + if (cinfo->jpeg_color_space == JCS_YCbCr) { + cconvert->pub.color_convert = ycc_rgb_convert; + build_ycc_rgb_table(cinfo); + } else if (cinfo->jpeg_color_space == JCS_GRAYSCALE) { + cconvert->pub.color_convert = gray_rgb_convert; + } else if (cinfo->jpeg_color_space == JCS_RGB && RGB_PIXELSIZE == 3) { + cconvert->pub.color_convert = null_convert; + } else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_CMYK: + cinfo->out_color_components = 4; + if (cinfo->jpeg_color_space == JCS_YCCK) { + cconvert->pub.color_convert = ycck_cmyk_convert; + build_ycc_rgb_table(cinfo); + } else if (cinfo->jpeg_color_space == JCS_CMYK) { + cconvert->pub.color_convert = null_convert; + } else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + default: + /* Permit null conversion to same output space */ + if (cinfo->out_color_space == cinfo->jpeg_color_space) { + cinfo->out_color_components = cinfo->num_components; + cconvert->pub.color_convert = null_convert; + } else /* unsupported non-null conversion */ + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + } + + if (cinfo->quantize_colors) + cinfo->output_components = 1; /* single colormapped output component */ + else + cinfo->output_components = cinfo->out_color_components; +} + +#if defined(__VISAGECPP__) +# ifdef null_convert2 +# undef null_convert2 +# endif +# ifdef grayscale_convert2 +# undef grayscale_convert2 +# endif +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdct.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdct.h new file mode 100644 index 0000000000..42180f390e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdct.h @@ -0,0 +1,176 @@ +/* + * jdct.h + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file contains common declarations for the forward and + * inverse DCT modules. These declarations are private to the DCT managers + * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. + * The individual DCT algorithms are kept in separate files to ease + * machine-dependent tuning (e.g., assembly coding). + */ + + +/* + * A forward DCT routine is given a pointer to a work area of type DCTELEM[]; + * the DCT is to be performed in-place in that buffer. Type DCTELEM is int + * for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT + * implementations use an array of type FAST_FLOAT, instead.) + * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE). + * The DCT outputs are returned scaled up by a factor of 8; they therefore + * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This + * convention improves accuracy in integer implementations and saves some + * work in floating-point ones. + * Quantization of the output coefficients is done by jcdctmgr.c. + */ + +#if BITS_IN_JSAMPLE == 8 +typedef int DCTELEM; /* 16 or 32 bits is fine */ +#else +typedef JPEG_INT32 DCTELEM; /* must have 32 bits */ +#endif + +typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data)); +typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data)); + + +/* + * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer + * to an output sample array. The routine must dequantize the input data as + * well as perform the IDCT; for dequantization, it uses the multiplier table + * pointed to by compptr->dct_table. The output data is to be placed into the + * sample array starting at a specified column. (Any row offset needed will + * be applied to the array pointer before it is passed to the IDCT code.) + * Note that the number of samples emitted by the IDCT routine is + * DCT_scaled_size * DCT_scaled_size. + */ + +/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ + +/* + * Each IDCT routine has its own ideas about the best dct_table element type. + */ + +typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ +#if BITS_IN_JSAMPLE == 8 +typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ +#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ +#else +typedef JPEG_INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ +#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ +#endif +typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ + + +/* + * Each IDCT routine is responsible for range-limiting its results and + * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could + * be quite far out of range if the input data is corrupt, so a bulletproof + * range-limiting step is required. We use a mask-and-table-lookup method + * to do the combined operations quickly. See the comments with + * prepare_range_limit_table (in jdmaster.c) for more info. + */ + +#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE) + +#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_fdct_islow jFDislow +#define jpeg_fdct_ifast jFDifast +#define jpeg_fdct_float jFDfloat +#define jpeg_idct_islow jRDislow +#define jpeg_idct_ifast jRDifast +#define jpeg_idct_float jRDfloat +#define jpeg_idct_4x4 jRD4x4 +#define jpeg_idct_2x2 jRD2x2 +#define jpeg_idct_1x1 jRD1x1 +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Extern declarations for the forward and inverse DCT routines. */ + +EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data)); +EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data)); +EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data)); + +EXTERN(void) jpeg_idct_islow + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_ifast + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_float + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_4x4 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_2x2 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_1x1 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); + + +/* + * Macros for handling fixed-point arithmetic; these are used by many + * but not all of the DCT/IDCT modules. + * + * All values are expected to be of type INT32. + * Fractional constants are scaled left by CONST_BITS bits. + * CONST_BITS is defined within each module using these macros, + * and may differ from one module to the next. + */ + +#define ONE ((JPEG_INT32) 1) +#define CONST_SCALE (ONE << CONST_BITS) + +/* Convert a positive real constant to an integer scaled by CONST_SCALE. + * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, + * thus causing a lot of useless floating-point operations at run time. + */ + +#define FIX(x) ((JPEG_INT32) ((x) * CONST_SCALE + 0.5)) + +/* Descale and correctly round an INT32 value that's scaled by N bits. + * We assume RIGHT_SHIFT rounds towards minus infinity, so adding + * the fudge factor is correct for either sign of X. + */ + +#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * This macro is used only when the two inputs will actually be no more than + * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a + * full 32x32 multiply. This provides a useful speedup on many machines. + * Unfortunately there is no way to specify a 16x16->32 multiply portably + * in C, but some C compilers will do the right thing if you provide the + * correct combination of casts. + */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) +#endif +#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ +#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((JPEG_INT32) (const))) +#endif + +#ifndef MULTIPLY16C16 /* default definition */ +#define MULTIPLY16C16(var,const) ((var) * (const)) +#endif + +/* Same except both inputs are variables. */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) +#endif + +#ifndef MULTIPLY16V16 /* default definition */ +#define MULTIPLY16V16(var1,var2) ((var1) * (var2)) +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jddctmgr.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jddctmgr.c new file mode 100644 index 0000000000..e27cc3d511 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jddctmgr.c @@ -0,0 +1,269 @@ +/* + * jddctmgr.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the inverse-DCT management logic. + * This code selects a particular IDCT implementation to be used, + * and it performs related housekeeping chores. No code in this file + * is executed per IDCT step, only during output pass setup. + * + * Note that the IDCT routines are responsible for performing coefficient + * dequantization as well as the IDCT proper. This module sets up the + * dequantization multiplier table needed by the IDCT routine. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + + +/* + * The decompressor input side (jdinput.c) saves away the appropriate + * quantization table for each component at the start of the first scan + * involving that component. (This is necessary in order to correctly + * decode files that reuse Q-table slots.) + * When we are ready to make an output pass, the saved Q-table is converted + * to a multiplier table that will actually be used by the IDCT routine. + * The multiplier table contents are IDCT-method-dependent. To support + * application changes in IDCT method between scans, we can remake the + * multiplier tables if necessary. + * In buffered-image mode, the first output pass may occur before any data + * has been seen for some components, and thus before their Q-tables have + * been saved away. To handle this case, multiplier tables are preset + * to zeroes; the result of the IDCT will be a neutral gray level. + */ + + +/* Private subobject for this module */ + +typedef struct { + struct jpeg_inverse_dct pub; /* public fields */ + + /* This array contains the IDCT method code that each multiplier table + * is currently set up for, or -1 if it's not yet set up. + * The actual multiplier tables are pointed to by dct_table in the + * per-component comp_info structures. + */ + int cur_method[MAX_COMPONENTS]; +} my_idct_controller; + +typedef my_idct_controller * my_idct_ptr; + + +/* Allocated multiplier tables: big enough for any supported variant */ + +typedef union { + ISLOW_MULT_TYPE islow_array[DCTSIZE2]; +#ifdef DCT_IFAST_SUPPORTED + IFAST_MULT_TYPE ifast_array[DCTSIZE2]; +#endif +#ifdef DCT_FLOAT_SUPPORTED + FLOAT_MULT_TYPE float_array[DCTSIZE2]; +#endif +} multiplier_table; + + +/* The current scaled-IDCT routines require ISLOW-style multiplier tables, + * so be sure to compile that code if either ISLOW or SCALING is requested. + */ +#ifdef DCT_ISLOW_SUPPORTED +#define PROVIDE_ISLOW_TABLES +#else +#ifdef IDCT_SCALING_SUPPORTED +#define PROVIDE_ISLOW_TABLES +#endif +#endif + + +/* + * Prepare for an output pass. + * Here we select the proper IDCT routine for each component and build + * a matching multiplier table. + */ + +METHODDEF(void) +start_pass (j_decompress_ptr cinfo) +{ + my_idct_ptr idct = (my_idct_ptr) cinfo->idct; + int ci, i; + jpeg_component_info *compptr; + int method = 0; + inverse_DCT_method_ptr method_ptr = NULL; + JQUANT_TBL * qtbl; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Select the proper IDCT routine for this component's scaling */ + switch (compptr->DCT_scaled_size) { +#ifdef IDCT_SCALING_SUPPORTED + case 1: + method_ptr = jpeg_idct_1x1; + method = JDCT_ISLOW; /* jidctred uses islow-style table */ + break; + case 2: + method_ptr = jpeg_idct_2x2; + method = JDCT_ISLOW; /* jidctred uses islow-style table */ + break; + case 4: + method_ptr = jpeg_idct_4x4; + method = JDCT_ISLOW; /* jidctred uses islow-style table */ + break; +#endif + case DCTSIZE: + switch (cinfo->dct_method) { +#ifdef DCT_ISLOW_SUPPORTED + case JDCT_ISLOW: + method_ptr = jpeg_idct_islow; + method = JDCT_ISLOW; + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + method_ptr = jpeg_idct_ifast; + method = JDCT_IFAST; + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + method_ptr = jpeg_idct_float; + method = JDCT_FLOAT; + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + break; + default: + ERREXIT1(cinfo, JERR_BAD_DCTSIZE, compptr->DCT_scaled_size); + break; + } + idct->pub.inverse_DCT[ci] = method_ptr; + /* Create multiplier table from quant table. + * However, we can skip this if the component is uninteresting + * or if we already built the table. Also, if no quant table + * has yet been saved for the component, we leave the + * multiplier table all-zero; we'll be reading zeroes from the + * coefficient controller's buffer anyway. + */ + if (! compptr->component_needed || idct->cur_method[ci] == method) + continue; + qtbl = compptr->quant_table; + if (qtbl == NULL) /* happens if no data yet for component */ + continue; + idct->cur_method[ci] = method; + switch (method) { +#ifdef PROVIDE_ISLOW_TABLES + case JDCT_ISLOW: + { + /* For LL&M IDCT method, multipliers are equal to raw quantization + * coefficients, but are stored as ints to ensure access efficiency. + */ + ISLOW_MULT_TYPE * ismtbl = (ISLOW_MULT_TYPE *) compptr->dct_table; + for (i = 0; i < DCTSIZE2; i++) { + ismtbl[i] = (ISLOW_MULT_TYPE) qtbl->quantval[i]; + } + } + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + { + /* For AA&N IDCT method, multipliers are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * For integer operation, the multiplier table is to be scaled by + * IFAST_SCALE_BITS. + */ + IFAST_MULT_TYPE * ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table; +#define CONST_BITS 14 + static const INT16 aanscales[DCTSIZE2] = { + /* precomputed values scaled up by 14 bits */ + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, + 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, + 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, + 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, + 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 + }; + SHIFT_TEMPS + + for (i = 0; i < DCTSIZE2; i++) { + ifmtbl[i] = (IFAST_MULT_TYPE) + DESCALE(MULTIPLY16V16((JPEG_INT32) qtbl->quantval[i], + (JPEG_INT32) aanscales[i]), + CONST_BITS-IFAST_SCALE_BITS); + } + } + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + { + /* For float AA&N IDCT method, multipliers are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + */ + FLOAT_MULT_TYPE * fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table; + int row, col; + static const double aanscalefactor[DCTSIZE] = { + 1.0, 1.387039845, 1.306562965, 1.175875602, + 1.0, 0.785694958, 0.541196100, 0.275899379 + }; + + i = 0; + for (row = 0; row < DCTSIZE; row++) { + for (col = 0; col < DCTSIZE; col++) { + fmtbl[i] = (FLOAT_MULT_TYPE) + ((double) qtbl->quantval[i] * + aanscalefactor[row] * aanscalefactor[col]); + i++; + } + } + } + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + } +} + + +/* + * Initialize IDCT manager. + */ + +GLOBAL(void) +jinit_inverse_dct (j_decompress_ptr cinfo) +{ + my_idct_ptr idct; + int ci; + jpeg_component_info *compptr; + + idct = (my_idct_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_idct_controller)); + cinfo->idct = (struct jpeg_inverse_dct *) idct; + idct->pub.start_pass = start_pass; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Allocate and pre-zero a multiplier table for each component */ + compptr->dct_table = + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(multiplier_table)); + MEMZERO(compptr->dct_table, SIZEOF(multiplier_table)); + /* Mark multiplier table not yet set up for any method */ + idct->cur_method[ci] = -1; + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdhuff.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdhuff.c new file mode 100644 index 0000000000..dccbc52b42 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdhuff.c @@ -0,0 +1,651 @@ +/* + * jdhuff.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy decoding routines. + * + * Much of the complexity here has to do with supporting input suspension. + * If the data source module demands suspension, we want to be able to back + * up to the start of the current MCU. To do this, we copy state variables + * into local working storage, and update them back to the permanent + * storage only upon successful completion of an MCU. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdhuff.h" /* Declarations shared with jdphuff.c */ + + +/* + * Expanded entropy decoder object for Huffman decoding. + * + * The savable_state subrecord contains fields that change within an MCU, + * but must not be updated permanently until we complete the MCU. + */ + +typedef struct { + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ +} savable_state; + +/* This macro is to work around compilers with missing or broken + * structure assignment. You'll need to fix this code if you have + * such a compiler and you change MAX_COMPS_IN_SCAN. + */ + +#ifndef NO_STRUCT_ASSIGN +#define ASSIGN_STATE(dest,src) ((dest) = (src)) +#else +#if MAX_COMPS_IN_SCAN == 4 +#define ASSIGN_STATE(dest,src) \ + ((dest).last_dc_val[0] = (src).last_dc_val[0], \ + (dest).last_dc_val[1] = (src).last_dc_val[1], \ + (dest).last_dc_val[2] = (src).last_dc_val[2], \ + (dest).last_dc_val[3] = (src).last_dc_val[3]) +#endif +#endif + + +typedef struct { + struct jpeg_entropy_decoder pub; /* public fields */ + + /* These fields are loaded into local variables at start of each MCU. + * In case of suspension, we exit WITHOUT updating them. + */ + bitread_perm_state bitstate; /* Bit buffer at start of MCU */ + savable_state saved; /* Other state at start of MCU */ + + /* These fields are NOT loaded into local working state. */ + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + d_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; + d_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; + + /* Precalculated info set up by start_pass for use in decode_mcu: */ + + /* Pointers to derived tables to be used for each block within an MCU */ + d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU]; + d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU]; + /* Whether we care about the DC and AC coefficient values for each block */ + wxjpeg_boolean dc_needed[D_MAX_BLOCKS_IN_MCU]; + wxjpeg_boolean ac_needed[D_MAX_BLOCKS_IN_MCU]; +} huff_entropy_decoder; + +typedef huff_entropy_decoder * huff_entropy_ptr; + + +/* + * Initialize for a Huffman-compressed scan. + */ + +METHODDEF(void) +start_pass_huff_decoder (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, blkn, dctbl, actbl; + jpeg_component_info * compptr; + + /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG. + * This ought to be an error condition, but we make it a warning because + * there are some baseline files out there with all zeroes in these bytes. + */ + if (cinfo->Ss != 0 || cinfo->Se != DCTSIZE2-1 || + cinfo->Ah != 0 || cinfo->Al != 0) + WARNMS(cinfo, JWRN_NOT_SEQUENTIAL); + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + dctbl = compptr->dc_tbl_no; + actbl = compptr->ac_tbl_no; + /* Compute derived values for Huffman tables */ + /* We may do this more than once for a table, but it's not expensive */ + jpeg_make_d_derived_tbl(cinfo, TRUE, dctbl, + & entropy->dc_derived_tbls[dctbl]); + jpeg_make_d_derived_tbl(cinfo, FALSE, actbl, + & entropy->ac_derived_tbls[actbl]); + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + + /* Precalculate decoding info for each block in an MCU of this scan */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + /* Precalculate which table to use for each block */ + entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no]; + entropy->ac_cur_tbls[blkn] = entropy->ac_derived_tbls[compptr->ac_tbl_no]; + /* Decide whether we really care about the coefficient values */ + if (compptr->component_needed) { + entropy->dc_needed[blkn] = TRUE; + /* we don't need the ACs if producing a 1/8th-size image */ + entropy->ac_needed[blkn] = (compptr->DCT_scaled_size > 1); + } else { + entropy->dc_needed[blkn] = entropy->ac_needed[blkn] = FALSE; + } + } + + /* Initialize bitread state variables */ + entropy->bitstate.bits_left = 0; + entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */ + entropy->pub.insufficient_data = FALSE; + + /* Initialize restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; +} + + +/* + * Compute the derived values for a Huffman table. + * This routine also performs some validation checks on the table. + * + * Note this is also used by jdphuff.c. + */ + +GLOBAL(void) +jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, wxjpeg_boolean isDC, int tblno, + d_derived_tbl ** pdtbl) +{ + JHUFF_TBL *htbl; + d_derived_tbl *dtbl; + int p, i, l, si, numsymbols; + int lookbits, ctr; + char huffsize[257]; + unsigned int huffcode[257]; + unsigned int code; + + /* Note that huffsize[] and huffcode[] are filled in code-length order, + * paralleling the order of the symbols themselves in htbl->huffval[]. + */ + + /* Find the input Huffman table */ + if (tblno < 0 || tblno >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); + htbl = + isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno]; + if (htbl == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); + + /* Allocate a workspace if we haven't already done so. */ + if (*pdtbl == NULL) + *pdtbl = (d_derived_tbl *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(d_derived_tbl)); + dtbl = *pdtbl; + dtbl->pub = htbl; /* fill in back link */ + + /* Figure C.1: make table of Huffman code length for each symbol */ + + p = 0; + for (l = 1; l <= 16; l++) { + i = (int) htbl->bits[l]; + if (i < 0 || p + i > 256) /* protect against table overrun */ + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + while (i--) + huffsize[p++] = (char) l; + } + huffsize[p] = 0; + numsymbols = p; + + /* Figure C.2: generate the codes themselves */ + /* We also validate that the counts represent a legal Huffman code tree. */ + + code = 0; + si = huffsize[0]; + p = 0; + while (huffsize[p]) { + while (((int) huffsize[p]) == si) { + huffcode[p++] = code; + code++; + } + /* code is now 1 more than the last code used for codelength si; but + * it must still fit in si bits, since no code is allowed to be all ones. + */ + if (((JPEG_INT32) code) >= (((JPEG_INT32) 1) << si)) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + code <<= 1; + si++; + } + + /* Figure F.15: generate decoding tables for bit-sequential decoding */ + + p = 0; + for (l = 1; l <= 16; l++) { + if (htbl->bits[l]) { + /* valoffset[l] = huffval[] index of 1st symbol of code length l, + * minus the minimum code of length l + */ + dtbl->valoffset[l] = (JPEG_INT32) p - (JPEG_INT32) huffcode[p]; + p += htbl->bits[l]; + dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */ + } else { + dtbl->maxcode[l] = -1; /* -1 if no codes of this length */ + } + } + dtbl->maxcode[17] = 0xFFFFFL; /* ensures jpeg_huff_decode terminates */ + + /* Compute lookahead tables to speed up decoding. + * First we set all the table entries to 0, indicating "too long"; + * then we iterate through the Huffman codes that are short enough and + * fill in all the entries that correspond to bit sequences starting + * with that code. + */ + + MEMZERO(dtbl->look_nbits, SIZEOF(dtbl->look_nbits)); + + p = 0; + for (l = 1; l <= HUFF_LOOKAHEAD; l++) { + for (i = 1; i <= (int) htbl->bits[l]; i++, p++) { + /* l = current code's length, p = its index in huffcode[] & huffval[]. */ + /* Generate left-justified code followed by all possible bit sequences */ + lookbits = huffcode[p] << (HUFF_LOOKAHEAD-l); + for (ctr = 1 << (HUFF_LOOKAHEAD-l); ctr > 0; ctr--) { + dtbl->look_nbits[lookbits] = l; + dtbl->look_sym[lookbits] = htbl->huffval[p]; + lookbits++; + } + } + } + + /* Validate symbols as being reasonable. + * For AC tables, we make no check, but accept all byte values 0..255. + * For DC tables, we require the symbols to be in range 0..15. + * (Tighter bounds could be applied depending on the data depth and mode, + * but this is sufficient to ensure safe decoding.) + */ + if (isDC) { + for (i = 0; i < numsymbols; i++) { + int sym = htbl->huffval[i]; + if (sym < 0 || sym > 15) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + } + } +} + + +/* + * Out-of-line code for bit fetching (shared with jdphuff.c). + * See jdhuff.h for info about usage. + * Note: current values of get_buffer and bits_left are passed as parameters, + * but are returned in the corresponding fields of the state struct. + * + * On most machines MIN_GET_BITS should be 25 to allow the full 32-bit width + * of get_buffer to be used. (On machines with wider words, an even larger + * buffer could be used.) However, on some machines 32-bit shifts are + * quite slow and take time proportional to the number of places shifted. + * (This is true with most PC compilers, for instance.) In this case it may + * be a win to set MIN_GET_BITS to the minimum value of 15. This reduces the + * average shift distance at the cost of more calls to jpeg_fill_bit_buffer. + */ + +#ifdef SLOW_SHIFT_32 +#define MIN_GET_BITS 15 /* minimum allowable value */ +#else +#define MIN_GET_BITS (BIT_BUF_SIZE-7) +#endif + + +GLOBAL(wxjpeg_boolean) +jpeg_fill_bit_buffer (bitread_working_state * state, + register bit_buf_type get_buffer, register int bits_left, + int nbits) +/* Load up the bit buffer to a depth of at least nbits */ +{ + /* Copy heavily used state fields into locals (hopefully registers) */ + register const JOCTET * next_input_byte = state->next_input_byte; + register size_t bytes_in_buffer = state->bytes_in_buffer; + j_decompress_ptr cinfo = state->cinfo; + + /* Attempt to load at least MIN_GET_BITS bits into get_buffer. */ + /* (It is assumed that no request will be for more than that many bits.) */ + /* We fail to do so only if we hit a marker or are forced to suspend. */ + + if (cinfo->unread_marker == 0) { /* cannot advance past a marker */ + while (bits_left < MIN_GET_BITS) { + register int c; + + /* Attempt to read a byte */ + if (bytes_in_buffer == 0) { + if (! (*cinfo->src->fill_input_buffer) (cinfo)) + return FALSE; + next_input_byte = cinfo->src->next_input_byte; + bytes_in_buffer = cinfo->src->bytes_in_buffer; + } + bytes_in_buffer--; + c = GETJOCTET(*next_input_byte++); + + /* If it's 0xFF, check and discard stuffed zero byte */ + if (c == 0xFF) { + /* Loop here to discard any padding FF's on terminating marker, + * so that we can save a valid unread_marker value. NOTE: we will + * accept multiple FF's followed by a 0 as meaning a single FF data + * byte. This data pattern is not valid according to the standard. + */ + do { + if (bytes_in_buffer == 0) { + if (! (*cinfo->src->fill_input_buffer) (cinfo)) + return FALSE; + next_input_byte = cinfo->src->next_input_byte; + bytes_in_buffer = cinfo->src->bytes_in_buffer; + } + bytes_in_buffer--; + c = GETJOCTET(*next_input_byte++); + } while (c == 0xFF); + + if (c == 0) { + /* Found FF/00, which represents an FF data byte */ + c = 0xFF; + } else { + /* Oops, it's actually a marker indicating end of compressed data. + * Save the marker code for later use. + * Fine point: it might appear that we should save the marker into + * bitread working state, not straight into permanent state. But + * once we have hit a marker, we cannot need to suspend within the + * current MCU, because we will read no more bytes from the data + * source. So it is OK to update permanent state right away. + */ + cinfo->unread_marker = c; + /* See if we need to insert some fake zero bits. */ + goto no_more_bytes; + } + } + + /* OK, load c into get_buffer */ + get_buffer = (get_buffer << 8) | c; + bits_left += 8; + } /* end while */ + } else { + no_more_bytes: + /* We get here if we've read the marker that terminates the compressed + * data segment. There should be enough bits in the buffer register + * to satisfy the request; if so, no problem. + */ + if (nbits > bits_left) { + /* Uh-oh. Report corrupted data to user and stuff zeroes into + * the data stream, so that we can produce some kind of image. + * We use a nonvolatile flag to ensure that only one warning message + * appears per data segment. + */ + if (! cinfo->entropy->insufficient_data) { + WARNMS(cinfo, JWRN_HIT_MARKER); + cinfo->entropy->insufficient_data = TRUE; + } + /* Fill the buffer with zero bits */ + get_buffer <<= MIN_GET_BITS - bits_left; + bits_left = MIN_GET_BITS; + } + } + + /* Unload the local registers */ + state->next_input_byte = next_input_byte; + state->bytes_in_buffer = bytes_in_buffer; + state->get_buffer = get_buffer; + state->bits_left = bits_left; + + return TRUE; +} + + +/* + * Out-of-line code for Huffman code decoding. + * See jdhuff.h for info about usage. + */ + +GLOBAL(int) +jpeg_huff_decode (bitread_working_state * state, + register bit_buf_type get_buffer, register int bits_left, + d_derived_tbl * htbl, int min_bits) +{ + register int l = min_bits; + register JPEG_INT32 code; + + /* HUFF_DECODE has determined that the code is at least min_bits */ + /* bits long, so fetch that many bits in one swoop. */ + + CHECK_BIT_BUFFER(*state, l, return -1); + code = GET_BITS(l); + + /* Collect the rest of the Huffman code one bit at a time. */ + /* This is per Figure F.16 in the JPEG spec. */ + + while (code > htbl->maxcode[l]) { + code <<= 1; + CHECK_BIT_BUFFER(*state, 1, return -1); + code |= GET_BITS(1); + l++; + } + + /* Unload the local registers */ + state->get_buffer = get_buffer; + state->bits_left = bits_left; + + /* With garbage input we may reach the sentinel value l = 17. */ + + if (l > 16) { + WARNMS(state->cinfo, JWRN_HUFF_BAD_CODE); + return 0; /* fake a zero as the safest result */ + } + + return htbl->pub->huffval[ (int) (code + htbl->valoffset[l]) ]; +} + + +/* + * Figure F.12: extend sign bit. + * On some machines, a shift and add will be faster than a table lookup. + */ + +#ifdef AVOID_TABLES + +#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x)) + +#else + +#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x)) + +static const int extend_test[16] = /* entry n is 2**(n-1) */ + { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, + 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; + +static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ + { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, + ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, + ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, + ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 }; + +#endif /* AVOID_TABLES */ + + +/* + * Check for a restart marker & resynchronize decoder. + * Returns FALSE if must suspend. + */ + +LOCAL(wxjpeg_boolean) +process_restart (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci; + + /* Throw away any unused bits remaining in bit buffer; */ + /* include any full bytes in next_marker's count of discarded bytes */ + cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8; + entropy->bitstate.bits_left = 0; + + /* Advance past the RSTn marker */ + if (! (*cinfo->marker->read_restart_marker) (cinfo)) + return FALSE; + + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + + /* Reset restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; + + /* Reset out-of-data flag, unless read_restart_marker left us smack up + * against a marker. In that case we will end up treating the next data + * segment as empty, and we can avoid producing bogus output pixels by + * leaving the flag set. + */ + if (cinfo->unread_marker == 0) + entropy->pub.insufficient_data = FALSE; + + return TRUE; +} + + +/* + * Decode and return one MCU's worth of Huffman-compressed coefficients. + * The coefficients are reordered from zigzag order into natural array order, + * but are not dequantized. + * + * The i'th block of the MCU is stored into the block pointed to by + * MCU_data[i]. WE ASSUME THIS AREA HAS BEEN ZEROED BY THE CALLER. + * (Wholesale zeroing is usually a little faster than retail...) + * + * Returns FALSE if data source requested suspension. In that case no + * changes have been made to permanent state. (Exception: some output + * coefficients may already have been assigned. This is harmless for + * this module, since we'll just re-assign them on the next call.) + */ + +METHODDEF(wxjpeg_boolean) +decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int blkn; + BITREAD_STATE_VARS; + savable_state state; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, just leave the MCU set to zeroes. + * This way, we return uniform gray for the remainder of the segment. + */ + if (! entropy->pub.insufficient_data) { + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(state, entropy->saved); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + JBLOCKROW block = MCU_data[blkn]; + d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn]; + d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn]; + register int s, k, r; + + /* Decode a single block's worth of coefficients */ + + /* Section F.2.2.1: decode the DC coefficient difference */ + HUFF_DECODE(s, br_state, dctbl, return FALSE, label1); + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + } + + if (entropy->dc_needed[blkn]) { + /* Convert DC difference to actual value, update last_dc_val */ + int ci = cinfo->MCU_membership[blkn]; + s += state.last_dc_val[ci]; + state.last_dc_val[ci] = s; + /* Output the DC coefficient (assumes jpeg_natural_order[0] = 0) */ + (*block)[0] = (JCOEF) s; + } + + if (entropy->ac_needed[blkn]) { + + /* Section F.2.2.2: decode the AC coefficients */ + /* Since zeroes are skipped, output area must be cleared beforehand */ + for (k = 1; k < DCTSIZE2; k++) { + HUFF_DECODE(s, br_state, actbl, return FALSE, label2); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + /* Output coefficient in natural (dezigzagged) order. + * Note: the extra entries in jpeg_natural_order[] will save us + * if k >= DCTSIZE2, which could happen if the data is corrupted. + */ + (*block)[jpeg_natural_order[k]] = (JCOEF) s; + } else { + if (r != 15) + break; + k += 15; + } + } + + } else { + + /* Section F.2.2.2: decode the AC coefficients */ + /* In this path we just discard the values */ + for (k = 1; k < DCTSIZE2; k++) { + HUFF_DECODE(s, br_state, actbl, return FALSE, label3); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + DROP_BITS(s); + } else { + if (r != 15) + break; + k += 15; + } + } + + } + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(entropy->saved, state); + } + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * Module initialization routine for Huffman entropy decoding. + */ + +GLOBAL(void) +jinit_huff_decoder (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy; + int i; + + entropy = (huff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(huff_entropy_decoder)); + cinfo->entropy = (struct jpeg_entropy_decoder *) entropy; + entropy->pub.start_pass = start_pass_huff_decoder; + entropy->pub.decode_mcu = decode_mcu; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdhuff.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdhuff.h new file mode 100644 index 0000000000..9e9e87daec --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdhuff.h @@ -0,0 +1,201 @@ +/* + * jdhuff.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for Huffman entropy decoding routines + * that are shared between the sequential decoder (jdhuff.c) and the + * progressive decoder (jdphuff.c). No other modules need to see these. + */ + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_make_d_derived_tbl jMkDDerived +#define jpeg_fill_bit_buffer jFilBitBuf +#define jpeg_huff_decode jHufDecode +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Derived data constructed for each Huffman table */ + +#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */ + +typedef struct { + /* Basic tables: (element [0] of each array is unused) */ + JPEG_INT32 maxcode[18]; /* largest code of length k (-1 if none) */ + /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */ + JPEG_INT32 valoffset[17]; /* huffval[] offset for codes of length k */ + /* valoffset[k] = huffval[] index of 1st symbol of code length k, less + * the smallest code of length k; so given a code of length k, the + * corresponding symbol is huffval[code + valoffset[k]] + */ + + /* Link to public Huffman table (needed only in jpeg_huff_decode) */ + JHUFF_TBL *pub; + + /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of + * the input data stream. If the next Huffman code is no more + * than HUFF_LOOKAHEAD bits long, we can obtain its length and + * the corresponding symbol directly from these tables. + */ + int look_nbits[1< 32 bits on your machine, and shifting/masking longs is + * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE + * appropriately should be a win. Unfortunately we can't define the size + * with something like #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8) + * because not all machines measure sizeof in 8-bit bytes. + */ + +typedef struct { /* Bitreading state saved across MCUs */ + bit_buf_type get_buffer; /* current bit-extraction buffer */ + int bits_left; /* # of unused bits in it */ +} bitread_perm_state; + +typedef struct { /* Bitreading working state within an MCU */ + /* Current data source location */ + /* We need a copy, rather than munging the original, in case of suspension */ + const JOCTET * next_input_byte; /* => next byte to read from source */ + size_t bytes_in_buffer; /* # of bytes remaining in source buffer */ + /* Bit input buffer --- note these values are kept in register variables, + * not in this struct, inside the inner loops. + */ + bit_buf_type get_buffer; /* current bit-extraction buffer */ + int bits_left; /* # of unused bits in it */ + /* Pointer needed by jpeg_fill_bit_buffer. */ + j_decompress_ptr cinfo; /* back link to decompress master record */ +} bitread_working_state; + +/* Macros to declare and load/save bitread local variables. */ +#define BITREAD_STATE_VARS \ + register bit_buf_type get_buffer; \ + register int bits_left; \ + bitread_working_state br_state + +#define BITREAD_LOAD_STATE(cinfop,permstate) \ + br_state.cinfo = cinfop; \ + br_state.next_input_byte = cinfop->src->next_input_byte; \ + br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \ + get_buffer = permstate.get_buffer; \ + bits_left = permstate.bits_left; + +#define BITREAD_SAVE_STATE(cinfop,permstate) \ + cinfop->src->next_input_byte = br_state.next_input_byte; \ + cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \ + permstate.get_buffer = get_buffer; \ + permstate.bits_left = bits_left + +/* + * These macros provide the in-line portion of bit fetching. + * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer + * before using GET_BITS, PEEK_BITS, or DROP_BITS. + * The variables get_buffer and bits_left are assumed to be locals, + * but the state struct might not be (jpeg_huff_decode needs this). + * CHECK_BIT_BUFFER(state,n,action); + * Ensure there are N bits in get_buffer; if suspend, take action. + * val = GET_BITS(n); + * Fetch next N bits. + * val = PEEK_BITS(n); + * Fetch next N bits without removing them from the buffer. + * DROP_BITS(n); + * Discard next N bits. + * The value N should be a simple variable, not an expression, because it + * is evaluated multiple times. + */ + +#define CHECK_BIT_BUFFER(state,nbits,action) \ + { if (bits_left < (nbits)) { \ + if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \ + { action; } \ + get_buffer = (state).get_buffer; bits_left = (state).bits_left; } } + +#define GET_BITS(nbits) \ + (((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1)) + +#define PEEK_BITS(nbits) \ + (((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1)) + +#define DROP_BITS(nbits) \ + (bits_left -= (nbits)) + +/* Load up the bit buffer to a depth of at least nbits */ +EXTERN(wxjpeg_boolean) jpeg_fill_bit_buffer + JPP((bitread_working_state * state, register bit_buf_type get_buffer, + register int bits_left, int nbits)); + + +/* + * Code for extracting next Huffman-coded symbol from input bit stream. + * Again, this is time-critical and we make the main paths be macros. + * + * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits + * without looping. Usually, more than 95% of the Huffman codes will be 8 + * or fewer bits long. The few overlength codes are handled with a loop, + * which need not be inline code. + * + * Notes about the HUFF_DECODE macro: + * 1. Near the end of the data segment, we may fail to get enough bits + * for a lookahead. In that case, we do it the hard way. + * 2. If the lookahead table contains no entry, the next code must be + * more than HUFF_LOOKAHEAD bits long. + * 3. jpeg_huff_decode returns -1 if forced to suspend. + */ + +#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \ +{ register int nb, look; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + nb = 1; goto slowlabel; \ + } \ + } \ + look = PEEK_BITS(HUFF_LOOKAHEAD); \ + if ((nb = htbl->look_nbits[look]) != 0) { \ + DROP_BITS(nb); \ + result = htbl->look_sym[look]; \ + } else { \ + nb = HUFF_LOOKAHEAD+1; \ +slowlabel: \ + if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \ + { failaction; } \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + } \ +} + +/* Out-of-line case for Huffman code fetching */ +EXTERN(int) jpeg_huff_decode + JPP((bitread_working_state * state, register bit_buf_type get_buffer, + register int bits_left, d_derived_tbl * htbl, int min_bits)); diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdinput.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdinput.c new file mode 100644 index 0000000000..c89b75de58 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdinput.c @@ -0,0 +1,385 @@ +/* + * jdinput.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains input control logic for the JPEG decompressor. + * These routines are concerned with controlling the decompressor's input + * processing (marker reading and coefficient decoding). The actual input + * reading is done in jdmarker.c, jdhuff.c, and jdphuff.c. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +/* Private state */ + +typedef struct { + struct jpeg_input_controller pub; /* public fields */ + + wxjpeg_boolean inheaders; /* TRUE until first SOS is reached */ +} my_input_controller; + +typedef my_input_controller * my_inputctl_ptr; + + +/* Forward declarations */ +METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo)); + + +/* + * Routines to calculate various quantities related to the size of the image. + */ + +LOCAL(void) +initial_setup (j_decompress_ptr cinfo) +/* Called once, when first SOS marker is reached */ +{ + int ci; + jpeg_component_info *compptr; + + /* Make sure image isn't bigger than I can handle */ + if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION || + (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); + + /* For now, precision must match compiled-in value... */ + if (cinfo->data_precision != BITS_IN_JSAMPLE) + ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); + + /* Check that number of components won't exceed internal array sizes */ + if (cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + + /* Compute maximum sampling factors; check factor validity */ + cinfo->max_h_samp_factor = 1; + cinfo->max_v_samp_factor = 1; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || + compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) + ERREXIT(cinfo, JERR_BAD_SAMPLING); + cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, + compptr->h_samp_factor); + cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, + compptr->v_samp_factor); + } + + /* We initialize DCT_scaled_size and min_DCT_scaled_size to DCTSIZE. + * In the full decompressor, this will be overridden by jdmaster.c; + * but in the transcoder, jdmaster.c is not used, so we must do it here. + */ + cinfo->min_DCT_scaled_size = DCTSIZE; + + /* Compute dimensions of components */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + compptr->DCT_scaled_size = DCTSIZE; + /* Size in DCT blocks */ + compptr->width_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) (cinfo->max_h_samp_factor * DCTSIZE)); + compptr->height_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) (cinfo->max_v_samp_factor * DCTSIZE)); + /* downsampled_width and downsampled_height will also be overridden by + * jdmaster.c if we are doing full decompression. The transcoder library + * doesn't use these values, but the calling application might. + */ + /* Size in samples */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) cinfo->max_h_samp_factor); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) cinfo->max_v_samp_factor); + /* Mark component needed, until color conversion says otherwise */ + compptr->component_needed = TRUE; + /* Mark no quantization table yet saved for component */ + compptr->quant_table = NULL; + } + + /* Compute number of fully interleaved MCU rows. */ + cinfo->total_iMCU_rows = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); + + /* Decide whether file contains multiple scans */ + if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode) + cinfo->inputctl->has_multiple_scans = TRUE; + else + cinfo->inputctl->has_multiple_scans = FALSE; +} + + +LOCAL(void) +per_scan_setup (j_decompress_ptr cinfo) +/* Do computations that are needed before processing a JPEG scan */ +/* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */ +{ + int ci, mcublks, tmp; + jpeg_component_info *compptr; + + if (cinfo->comps_in_scan == 1) { + + /* Noninterleaved (single-component) scan */ + compptr = cinfo->cur_comp_info[0]; + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = compptr->width_in_blocks; + cinfo->MCU_rows_in_scan = compptr->height_in_blocks; + + /* For noninterleaved scan, always one block per MCU */ + compptr->MCU_width = 1; + compptr->MCU_height = 1; + compptr->MCU_blocks = 1; + compptr->MCU_sample_width = compptr->DCT_scaled_size; + compptr->last_col_width = 1; + /* For noninterleaved scans, it is convenient to define last_row_height + * as the number of block rows present in the last iMCU row. + */ + tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (tmp == 0) tmp = compptr->v_samp_factor; + compptr->last_row_height = tmp; + + /* Prepare array describing MCU composition */ + cinfo->blocks_in_MCU = 1; + cinfo->MCU_membership[0] = 0; + + } else { + + /* Interleaved (multi-component) scan */ + if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, + MAX_COMPS_IN_SCAN); + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, + (long) (cinfo->max_h_samp_factor*DCTSIZE)); + cinfo->MCU_rows_in_scan = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); + + cinfo->blocks_in_MCU = 0; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Sampling factors give # of blocks of component in each MCU */ + compptr->MCU_width = compptr->h_samp_factor; + compptr->MCU_height = compptr->v_samp_factor; + compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; + compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_scaled_size; + /* Figure number of non-dummy blocks in last MCU column & row */ + tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); + if (tmp == 0) tmp = compptr->MCU_width; + compptr->last_col_width = tmp; + tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); + if (tmp == 0) tmp = compptr->MCU_height; + compptr->last_row_height = tmp; + /* Prepare array describing MCU composition */ + mcublks = compptr->MCU_blocks; + if (cinfo->blocks_in_MCU + mcublks > D_MAX_BLOCKS_IN_MCU) + ERREXIT(cinfo, JERR_BAD_MCU_SIZE); + while (mcublks-- > 0) { + cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; + } + } + + } +} + + +/* + * Save away a copy of the Q-table referenced by each component present + * in the current scan, unless already saved during a prior scan. + * + * In a multiple-scan JPEG file, the encoder could assign different components + * the same Q-table slot number, but change table definitions between scans + * so that each component uses a different Q-table. (The IJG encoder is not + * currently capable of doing this, but other encoders might.) Since we want + * to be able to dequantize all the components at the end of the file, this + * means that we have to save away the table actually used for each component. + * We do this by copying the table at the start of the first scan containing + * the component. + * The JPEG spec prohibits the encoder from changing the contents of a Q-table + * slot between scans of a component using that slot. If the encoder does so + * anyway, this decoder will simply use the Q-table values that were current + * at the start of the first scan for the component. + * + * The decompressor output side looks only at the saved quant tables, + * not at the current Q-table slots. + */ + +LOCAL(void) +latch_quant_tables (j_decompress_ptr cinfo) +{ + int ci, qtblno; + jpeg_component_info *compptr; + JQUANT_TBL * qtbl; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* No work if we already saved Q-table for this component */ + if (compptr->quant_table != NULL) + continue; + /* Make sure specified quantization table is present */ + qtblno = compptr->quant_tbl_no; + if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || + cinfo->quant_tbl_ptrs[qtblno] == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); + /* OK, save away the quantization table */ + qtbl = (JQUANT_TBL *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(JQUANT_TBL)); + MEMCOPY(qtbl, cinfo->quant_tbl_ptrs[qtblno], SIZEOF(JQUANT_TBL)); + compptr->quant_table = qtbl; + } +} + + +/* + * Initialize the input modules to read a scan of compressed data. + * The first call to this is done by jdmaster.c after initializing + * the entire decompressor (during jpeg_start_decompress). + * Subsequent calls come from consume_markers, below. + */ + +METHODDEF(void) +start_input_pass (j_decompress_ptr cinfo) +{ + per_scan_setup(cinfo); + latch_quant_tables(cinfo); + (*cinfo->entropy->start_pass) (cinfo); +#if defined(__VISAGECPP__) + (*cinfo->coef->start_input_pass2) (cinfo); +#else + (*cinfo->coef->start_input_pass) (cinfo); +#endif + cinfo->inputctl->consume_input = cinfo->coef->consume_data; +} + + +/* + * Finish up after inputting a compressed-data scan. + * This is called by the coefficient controller after it's read all + * the expected data of the scan. + */ + +METHODDEF(void) +finish_input_pass (j_decompress_ptr cinfo) +{ + cinfo->inputctl->consume_input = consume_markers; +} + + +/* + * Read JPEG markers before, between, or after compressed-data scans. + * Change state as necessary when a new scan is reached. + * Return value is JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + * + * The consume_input method pointer points either here or to the + * coefficient controller's consume_data routine, depending on whether + * we are reading a compressed data segment or inter-segment markers. + */ + +METHODDEF(int) +consume_markers (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; + int val; + + if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */ + return JPEG_REACHED_EOI; + + val = (*cinfo->marker->read_markers) (cinfo); + + switch (val) { + case JPEG_REACHED_SOS: /* Found SOS */ + if (inputctl->inheaders) { /* 1st SOS */ + initial_setup(cinfo); + inputctl->inheaders = FALSE; + /* Note: start_input_pass must be called by jdmaster.c + * before any more input can be consumed. jdapimin.c is + * responsible for enforcing this sequencing. + */ + } else { /* 2nd or later SOS marker */ + if (! inputctl->pub.has_multiple_scans) + ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */ + start_input_pass(cinfo); + } + break; + case JPEG_REACHED_EOI: /* Found EOI */ + inputctl->pub.eoi_reached = TRUE; + if (inputctl->inheaders) { /* Tables-only datastream, apparently */ + if (cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOF_NO_SOS); + } else { + /* Prevent infinite loop in coef ctlr's decompress_data routine + * if user set output_scan_number larger than number of scans. + */ + if (cinfo->output_scan_number > cinfo->input_scan_number) + cinfo->output_scan_number = cinfo->input_scan_number; + } + break; + case JPEG_SUSPENDED: + break; + } + + return val; +} + + +/* + * Reset state to begin a fresh datastream. + */ + +METHODDEF(void) +reset_input_controller (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; + + inputctl->pub.consume_input = consume_markers; + inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ + inputctl->pub.eoi_reached = FALSE; + inputctl->inheaders = TRUE; + /* Reset other modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->marker->reset_marker_reader) (cinfo); + /* Reset progression state -- would be cleaner if entropy decoder did this */ + cinfo->coef_bits = NULL; +} + + +/* + * Initialize the input controller module. + * This is called only once, when the decompression object is created. + */ + +GLOBAL(void) +jinit_input_controller (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl; + + /* Create subobject in permanent pool */ + inputctl = (my_inputctl_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_input_controller)); + cinfo->inputctl = (struct jpeg_input_controller *) inputctl; + /* Initialize method pointers */ + inputctl->pub.consume_input = consume_markers; + inputctl->pub.reset_input_controller = reset_input_controller; + inputctl->pub.start_input_pass = start_input_pass; + inputctl->pub.finish_input_pass = finish_input_pass; + /* Initialize state: can't use reset_input_controller since we don't + * want to try to reset other modules yet. + */ + inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ + inputctl->pub.eoi_reached = FALSE; + inputctl->inheaders = TRUE; +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmainct.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmainct.c new file mode 100644 index 0000000000..cd55e8ce1c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmainct.c @@ -0,0 +1,529 @@ +/* + * jdmainct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the main buffer controller for decompression. + * The main buffer lies between the JPEG decompressor proper and the + * post-processor; it holds downsampled data in the JPEG colorspace. + * + * Note that this code is bypassed in raw-data mode, since the application + * supplies the equivalent of the main buffer in that case. + */ + +/* suppress the warnings about using main for the variable names */ +#define main jpegMain + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +/* + * In the current system design, the main buffer need never be a full-image + * buffer; any full-height buffers will be found inside the coefficient or + * postprocessing controllers. Nonetheless, the main controller is not + * trivial. Its responsibility is to provide context rows for upsampling/ + * rescaling, and doing this in an efficient fashion is a bit tricky. + * + * Postprocessor input data is counted in "row groups". A row group + * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size) + * sample rows of each component. (We require DCT_scaled_size values to be + * chosen such that these numbers are integers. In practice DCT_scaled_size + * values will likely be powers of two, so we actually have the stronger + * condition that DCT_scaled_size / min_DCT_scaled_size is an integer.) + * Upsampling will typically produce max_v_samp_factor pixel rows from each + * row group (times any additional scale factor that the upsampler is + * applying). + * + * The coefficient controller will deliver data to us one iMCU row at a time; + * each iMCU row contains v_samp_factor * DCT_scaled_size sample rows, or + * exactly min_DCT_scaled_size row groups. (This amount of data corresponds + * to one row of MCUs when the image is fully interleaved.) Note that the + * number of sample rows varies across components, but the number of row + * groups does not. Some garbage sample rows may be included in the last iMCU + * row at the bottom of the image. + * + * Depending on the vertical scaling algorithm used, the upsampler may need + * access to the sample row(s) above and below its current input row group. + * The upsampler is required to set need_context_rows TRUE at global selection + * time if so. When need_context_rows is FALSE, this controller can simply + * obtain one iMCU row at a time from the coefficient controller and dole it + * out as row groups to the postprocessor. + * + * When need_context_rows is TRUE, this controller guarantees that the buffer + * passed to postprocessing contains at least one row group's worth of samples + * above and below the row group(s) being processed. Note that the context + * rows "above" the first passed row group appear at negative row offsets in + * the passed buffer. At the top and bottom of the image, the required + * context rows are manufactured by duplicating the first or last real sample + * row; this avoids having special cases in the upsampling inner loops. + * + * The amount of context is fixed at one row group just because that's a + * convenient number for this controller to work with. The existing + * upsamplers really only need one sample row of context. An upsampler + * supporting arbitrary output rescaling might wish for more than one row + * group of context when shrinking the image; tough, we don't handle that. + * (This is justified by the assumption that downsizing will be handled mostly + * by adjusting the DCT_scaled_size values, so that the actual scale factor at + * the upsample step needn't be much less than one.) + * + * To provide the desired context, we have to retain the last two row groups + * of one iMCU row while reading in the next iMCU row. (The last row group + * can't be processed until we have another row group for its below-context, + * and so we have to save the next-to-last group too for its above-context.) + * We could do this most simply by copying data around in our buffer, but + * that'd be very slow. We can avoid copying any data by creating a rather + * strange pointer structure. Here's how it works. We allocate a workspace + * consisting of M+2 row groups (where M = min_DCT_scaled_size is the number + * of row groups per iMCU row). We create two sets of redundant pointers to + * the workspace. Labeling the physical row groups 0 to M+1, the synthesized + * pointer lists look like this: + * M+1 M-1 + * master pointer --> 0 master pointer --> 0 + * 1 1 + * ... ... + * M-3 M-3 + * M-2 M + * M-1 M+1 + * M M-2 + * M+1 M-1 + * 0 0 + * We read alternate iMCU rows using each master pointer; thus the last two + * row groups of the previous iMCU row remain un-overwritten in the workspace. + * The pointer lists are set up so that the required context rows appear to + * be adjacent to the proper places when we pass the pointer lists to the + * upsampler. + * + * The above pictures describe the normal state of the pointer lists. + * At top and bottom of the image, we diddle the pointer lists to duplicate + * the first or last sample row as necessary (this is cheaper than copying + * sample rows around). + * + * This scheme breaks down if M < 2, ie, min_DCT_scaled_size is 1. In that + * situation each iMCU row provides only one row group so the buffering logic + * must be different (eg, we must read two iMCU rows before we can emit the + * first row group). For now, we simply do not support providing context + * rows when min_DCT_scaled_size is 1. That combination seems unlikely to + * be worth providing --- if someone wants a 1/8th-size preview, they probably + * want it quick and dirty, so a context-free upsampler is sufficient. + */ + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_main_controller pub; /* public fields */ + + /* Pointer to allocated workspace (M or M+2 row groups). */ + JSAMPARRAY buffer[MAX_COMPONENTS]; + + wxjpeg_boolean buffer_full; /* Have we gotten an iMCU row from decoder? */ + JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */ + + /* Remaining fields are only used in the context case. */ + + /* These are the master pointers to the funny-order pointer lists. */ + JSAMPIMAGE xbuffer[2]; /* pointers to weird pointer lists */ + + int whichptr; /* indicates which pointer set is now in use */ + int context_state; /* process_data state machine status */ + JDIMENSION rowgroups_avail; /* row groups available to postprocessor */ + JDIMENSION iMCU_row_ctr; /* counts iMCU rows to detect image top/bot */ +} my_main_controller; + +typedef my_main_controller * my_main_ptr; + +/* context_state values: */ +#define CTX_PREPARE_FOR_IMCU 0 /* need to prepare for MCU row */ +#define CTX_PROCESS_IMCU 1 /* feeding iMCU to postprocessor */ +#define CTX_POSTPONED_ROW 2 /* feeding postponed row group */ + + +#if defined(__VISAGECPP__) +/* Visual Age fixups for multiple declarations */ +# define start_pass_main start_pass_main2 /* already in jcmaint.c */ +# define process_data_simple_main process_data_simple_main2 /* already in jcmaint.c */ +#endif + +/* Forward declarations */ +METHODDEF(void) process_data_simple_main + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +METHODDEF(void) process_data_context_main + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +#ifdef QUANT_2PASS_SUPPORTED +METHODDEF(void) process_data_crank_post + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +#endif + + +LOCAL(void) +alloc_funny_pointers (j_decompress_ptr cinfo) +/* Allocate space for the funny pointer lists. + * This is done only once, not once per pass. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, rgroup; + int M = cinfo->min_DCT_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY xbuf; + + /* Get top-level space for component array pointers. + * We alloc both arrays with one call to save a few cycles. + */ + main->xbuffer[0] = (JSAMPIMAGE) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * 2 * SIZEOF(JSAMPARRAY)); + main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + /* Get space for pointer lists --- M+4 row groups in each list. + * We alloc both pointer lists with one call to save a few cycles. + */ + xbuf = (JSAMPARRAY) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW)); + xbuf += rgroup; /* want one row group at negative offsets */ + main->xbuffer[0][ci] = xbuf; + xbuf += rgroup * (M + 4); + main->xbuffer[1][ci] = xbuf; + } +} + + +LOCAL(void) +make_funny_pointers (j_decompress_ptr cinfo) +/* Create the funny pointer lists discussed in the comments above. + * The actual workspace is already allocated (in main->buffer), + * and the space for the pointer lists is allocated too. + * This routine just fills in the curiously ordered lists. + * This will be repeated at the beginning of each pass. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, i, rgroup; + int M = cinfo->min_DCT_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY buf, xbuf0, xbuf1; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + xbuf0 = main->xbuffer[0][ci]; + xbuf1 = main->xbuffer[1][ci]; + /* First copy the workspace pointers as-is */ + buf = main->buffer[ci]; + for (i = 0; i < rgroup * (M + 2); i++) { + xbuf0[i] = xbuf1[i] = buf[i]; + } + /* In the second list, put the last four row groups in swapped order */ + for (i = 0; i < rgroup * 2; i++) { + xbuf1[rgroup*(M-2) + i] = buf[rgroup*M + i]; + xbuf1[rgroup*M + i] = buf[rgroup*(M-2) + i]; + } + /* The wraparound pointers at top and bottom will be filled later + * (see set_wraparound_pointers, below). Initially we want the "above" + * pointers to duplicate the first actual data line. This only needs + * to happen in xbuffer[0]. + */ + for (i = 0; i < rgroup; i++) { + xbuf0[i - rgroup] = xbuf0[0]; + } + } +} + + +LOCAL(void) +set_wraparound_pointers (j_decompress_ptr cinfo) +/* Set up the "wraparound" pointers at top and bottom of the pointer lists. + * This changes the pointer list state from top-of-image to the normal state. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, i, rgroup; + int M = cinfo->min_DCT_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY xbuf0, xbuf1; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + xbuf0 = main->xbuffer[0][ci]; + xbuf1 = main->xbuffer[1][ci]; + for (i = 0; i < rgroup; i++) { + xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i]; + xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i]; + xbuf0[rgroup*(M+2) + i] = xbuf0[i]; + xbuf1[rgroup*(M+2) + i] = xbuf1[i]; + } + } +} + + +LOCAL(void) +set_bottom_pointers (j_decompress_ptr cinfo) +/* Change the pointer lists to duplicate the last sample row at the bottom + * of the image. whichptr indicates which xbuffer holds the final iMCU row. + * Also sets rowgroups_avail to indicate number of nondummy row groups in row. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, i, rgroup, iMCUheight, rows_left; + jpeg_component_info *compptr; + JSAMPARRAY xbuf; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Count sample rows in one iMCU row and in one row group */ + iMCUheight = compptr->v_samp_factor * compptr->DCT_scaled_size; + rgroup = iMCUheight / cinfo->min_DCT_scaled_size; + /* Count nondummy sample rows remaining for this component */ + rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight); + if (rows_left == 0) rows_left = iMCUheight; + /* Count nondummy row groups. Should get same answer for each component, + * so we need only do it once. + */ + if (ci == 0) { + main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1); + } + /* Duplicate the last real sample row rgroup*2 times; this pads out the + * last partial rowgroup and ensures at least one full rowgroup of context. + */ + xbuf = main->xbuffer[main->whichptr][ci]; + for (i = 0; i < rgroup * 2; i++) { + xbuf[rows_left + i] = xbuf[rows_left-1]; + } + } +} + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (cinfo->upsample->need_context_rows) { + main->pub.process_data = process_data_context_main; + make_funny_pointers(cinfo); /* Create the xbuffer[] lists */ + main->whichptr = 0; /* Read first iMCU row into xbuffer[0] */ + main->context_state = CTX_PREPARE_FOR_IMCU; + main->iMCU_row_ctr = 0; + } else { + /* Simple case with no context needed */ + main->pub.process_data = process_data_simple_main; + } + main->buffer_full = FALSE; /* Mark buffer empty */ + main->rowgroup_ctr = 0; + break; +#ifdef QUANT_2PASS_SUPPORTED + case JBUF_CRANK_DEST: + /* For last pass of 2-pass quantization, just crank the postprocessor */ + main->pub.process_data = process_data_crank_post; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } +} + + +/* + * Process some data. + * This handles the simple case where no context is required. + */ + +METHODDEF(void) +process_data_simple_main (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + JDIMENSION rowgroups_avail; + + /* Read input data if we haven't filled the main buffer yet */ + if (! main->buffer_full) { + if (! (*cinfo->coef->decompress_data) (cinfo, main->buffer)) + return; /* suspension forced, can do nothing more */ + main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ + } + + /* There are always min_DCT_scaled_size row groups in an iMCU row. */ + rowgroups_avail = (JDIMENSION) cinfo->min_DCT_scaled_size; + /* Note: at the bottom of the image, we may pass extra garbage row groups + * to the postprocessor. The postprocessor has to check for bottom + * of image anyway (at row resolution), so no point in us doing it too. + */ + + /* Feed the postprocessor */ + (*cinfo->post->post_process_data) (cinfo, main->buffer, + &main->rowgroup_ctr, rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); + + /* Has postprocessor consumed all the data yet? If so, mark buffer empty */ + if (main->rowgroup_ctr >= rowgroups_avail) { + main->buffer_full = FALSE; + main->rowgroup_ctr = 0; + } +} + + +/* + * Process some data. + * This handles the case where context rows must be provided. + */ + +METHODDEF(void) +process_data_context_main (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + + /* Read input data if we haven't filled the main buffer yet */ + if (! main->buffer_full) { + if (! (*cinfo->coef->decompress_data) (cinfo, + main->xbuffer[main->whichptr])) + return; /* suspension forced, can do nothing more */ + main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ + main->iMCU_row_ctr++; /* count rows received */ + } + + /* Postprocessor typically will not swallow all the input data it is handed + * in one call (due to filling the output buffer first). Must be prepared + * to exit and restart. This switch lets us keep track of how far we got. + * Note that each case falls through to the next on successful completion. + */ + switch (main->context_state) { + case CTX_POSTPONED_ROW: + /* Call postprocessor using previously set pointers for postponed row */ + (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], + &main->rowgroup_ctr, main->rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); + if (main->rowgroup_ctr < main->rowgroups_avail) + return; /* Need to suspend */ + main->context_state = CTX_PREPARE_FOR_IMCU; + if (*out_row_ctr >= out_rows_avail) + return; /* Postprocessor exactly filled output buf */ + /*FALLTHROUGH*/ + case CTX_PREPARE_FOR_IMCU: + /* Prepare to process first M-1 row groups of this iMCU row */ + main->rowgroup_ctr = 0; + main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size - 1); + /* Check for bottom of image: if so, tweak pointers to "duplicate" + * the last sample row, and adjust rowgroups_avail to ignore padding rows. + */ + if (main->iMCU_row_ctr == cinfo->total_iMCU_rows) + set_bottom_pointers(cinfo); + main->context_state = CTX_PROCESS_IMCU; + /*FALLTHROUGH*/ + case CTX_PROCESS_IMCU: + /* Call postprocessor using previously set pointers */ + (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], + &main->rowgroup_ctr, main->rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); + if (main->rowgroup_ctr < main->rowgroups_avail) + return; /* Need to suspend */ + /* After the first iMCU, change wraparound pointers to normal state */ + if (main->iMCU_row_ctr == 1) + set_wraparound_pointers(cinfo); + /* Prepare to load new iMCU row using other xbuffer list */ + main->whichptr ^= 1; /* 0=>1 or 1=>0 */ + main->buffer_full = FALSE; + /* Still need to process last row group of this iMCU row, */ + /* which is saved at index M+1 of the other xbuffer */ + main->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_scaled_size + 1); + main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size + 2); + main->context_state = CTX_POSTPONED_ROW; + } +} + + +/* + * Process some data. + * Final pass of two-pass quantization: just call the postprocessor. + * Source data will be the postprocessor controller's internal buffer. + */ + +#ifdef QUANT_2PASS_SUPPORTED + +METHODDEF(void) +process_data_crank_post (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + (*cinfo->post->post_process_data) (cinfo, (JSAMPIMAGE) NULL, + (JDIMENSION *) NULL, (JDIMENSION) 0, + output_buf, out_row_ctr, out_rows_avail); +} + +#endif /* QUANT_2PASS_SUPPORTED */ + + +/* + * Initialize main buffer controller. + */ + +GLOBAL(void) +jinit_d_main_controller (j_decompress_ptr cinfo, wxjpeg_boolean need_full_buffer) +{ + my_main_ptr main; + int ci, rgroup, ngroups; + jpeg_component_info *compptr; + + main = (my_main_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_main_controller)); + cinfo->main = (struct jpeg_d_main_controller *) main; + main->pub.start_pass = start_pass_main; + + if (need_full_buffer) /* shouldn't happen */ + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + /* Allocate the workspace. + * ngroups is the number of row groups we need. + */ + if (cinfo->upsample->need_context_rows) { + if (cinfo->min_DCT_scaled_size < 2) /* unsupported, see comments above */ + ERREXIT(cinfo, JERR_NOTIMPL); + alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */ + ngroups = cinfo->min_DCT_scaled_size + 2; + } else { + ngroups = cinfo->min_DCT_scaled_size; + } + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + main->buffer[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + compptr->width_in_blocks * compptr->DCT_scaled_size, + (JDIMENSION) (rgroup * ngroups)); + } +} + +#if defined(__VISAGECPP__) +# ifdef start_pass_main2 +# undef start_pass_main2 +# endif +# ifdef process_data_simple_main2 +# undef process_data_simple_main2 +# endif +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmarker.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmarker.c new file mode 100644 index 0000000000..39bed54224 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmarker.c @@ -0,0 +1,1360 @@ +/* + * jdmarker.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to decode JPEG datastream markers. + * Most of the complexity arises from our desire to support input + * suspension: if not all of the data for a marker is available, + * we must exit back to the application. On resumption, we reprocess + * the marker. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +typedef enum { /* JPEG marker codes */ + M_SOF0 = 0xc0, + M_SOF1 = 0xc1, + M_SOF2 = 0xc2, + M_SOF3 = 0xc3, + + M_SOF5 = 0xc5, + M_SOF6 = 0xc6, + M_SOF7 = 0xc7, + + M_JPG = 0xc8, + M_SOF9 = 0xc9, + M_SOF10 = 0xca, + M_SOF11 = 0xcb, + + M_SOF13 = 0xcd, + M_SOF14 = 0xce, + M_SOF15 = 0xcf, + + M_DHT = 0xc4, + + M_DAC = 0xcc, + + M_RST0 = 0xd0, + M_RST1 = 0xd1, + M_RST2 = 0xd2, + M_RST3 = 0xd3, + M_RST4 = 0xd4, + M_RST5 = 0xd5, + M_RST6 = 0xd6, + M_RST7 = 0xd7, + + M_SOI = 0xd8, + M_EOI = 0xd9, + M_SOS = 0xda, + M_DQT = 0xdb, + M_DNL = 0xdc, + M_DRI = 0xdd, + M_DHP = 0xde, + M_EXP = 0xdf, + + M_APP0 = 0xe0, + M_APP1 = 0xe1, + M_APP2 = 0xe2, + M_APP3 = 0xe3, + M_APP4 = 0xe4, + M_APP5 = 0xe5, + M_APP6 = 0xe6, + M_APP7 = 0xe7, + M_APP8 = 0xe8, + M_APP9 = 0xe9, + M_APP10 = 0xea, + M_APP11 = 0xeb, + M_APP12 = 0xec, + M_APP13 = 0xed, + M_APP14 = 0xee, + M_APP15 = 0xef, + + M_JPG0 = 0xf0, + M_JPG13 = 0xfd, + M_COM = 0xfe, + + M_TEM = 0x01, + + M_ERROR = 0x100 +} JPEG_MARKER; + + +/* Private state */ + +typedef struct { + struct jpeg_marker_reader pub; /* public fields */ + + /* Application-overridable marker processing methods */ + jpeg_marker_parser_method process_COM; + jpeg_marker_parser_method process_APPn[16]; + + /* Limit on marker data length to save for each marker type */ + unsigned int length_limit_COM; + unsigned int length_limit_APPn[16]; + + /* Status of COM/APPn marker saving */ + jpeg_saved_marker_ptr cur_marker; /* NULL if not processing a marker */ + unsigned int bytes_read; /* data bytes read so far in marker */ + /* Note: cur_marker is not linked into marker_list until it's all read. */ +} my_marker_reader; + +typedef my_marker_reader * my_marker_ptr; + + +/* + * Macros for fetching data from the data source module. + * + * At all times, cinfo->src->next_input_byte and ->bytes_in_buffer reflect + * the current restart point; we update them only when we have reached a + * suitable place to restart if a suspension occurs. + */ + +/* Declare and initialize local copies of input pointer/count */ +#define INPUT_VARS(cinfo) \ + struct jpeg_source_mgr * datasrc = (cinfo)->src; \ + const JOCTET * next_input_byte = datasrc->next_input_byte; \ + size_t bytes_in_buffer = datasrc->bytes_in_buffer + +/* Unload the local copies --- do this only at a restart boundary */ +#define INPUT_SYNC(cinfo) \ + ( datasrc->next_input_byte = next_input_byte, \ + datasrc->bytes_in_buffer = bytes_in_buffer ) + +/* Reload the local copies --- used only in MAKE_BYTE_AVAIL */ +#define INPUT_RELOAD(cinfo) \ + ( next_input_byte = datasrc->next_input_byte, \ + bytes_in_buffer = datasrc->bytes_in_buffer ) + +/* Internal macro for INPUT_BYTE and INPUT_2BYTES: make a byte available. + * Note we do *not* do INPUT_SYNC before calling fill_input_buffer, + * but we must reload the local copies after a successful fill. + */ +#define MAKE_BYTE_AVAIL(cinfo,action) \ + if (bytes_in_buffer == 0) { \ + if (! (*datasrc->fill_input_buffer) (cinfo)) \ + { action; } \ + INPUT_RELOAD(cinfo); \ + } + +/* Read a byte into variable V. + * If must suspend, take the specified action (typically "return FALSE"). + */ +#define INPUT_BYTE(cinfo,V,action) \ + MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ + bytes_in_buffer--; \ + V = GETJOCTET(*next_input_byte++); ) + +/* As above, but read two bytes interpreted as an unsigned 16-bit integer. + * V should be declared unsigned int or perhaps INT32. + */ +#define INPUT_2BYTES(cinfo,V,action) \ + MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ + bytes_in_buffer--; \ + V = ((unsigned int) GETJOCTET(*next_input_byte++)) << 8; \ + MAKE_BYTE_AVAIL(cinfo,action); \ + bytes_in_buffer--; \ + V += GETJOCTET(*next_input_byte++); ) + + +/* + * Routines to process JPEG markers. + * + * Entry condition: JPEG marker itself has been read and its code saved + * in cinfo->unread_marker; input restart point is just after the marker. + * + * Exit: if return TRUE, have read and processed any parameters, and have + * updated the restart point to point after the parameters. + * If return FALSE, was forced to suspend before reaching end of + * marker parameters; restart point has not been moved. Same routine + * will be called again after application supplies more input data. + * + * This approach to suspension assumes that all of a marker's parameters + * can fit into a single input bufferload. This should hold for "normal" + * markers. Some COM/APPn markers might have large parameter segments + * that might not fit. If we are simply dropping such a marker, we use + * skip_input_data to get past it, and thereby put the problem on the + * source manager's shoulders. If we are saving the marker's contents + * into memory, we use a slightly different convention: when forced to + * suspend, the marker processor updates the restart point to the end of + * what it's consumed (ie, the end of the buffer) before returning FALSE. + * On resumption, cinfo->unread_marker still contains the marker code, + * but the data source will point to the next chunk of marker data. + * The marker processor must retain internal state to deal with this. + * + * Note that we don't bother to avoid duplicate trace messages if a + * suspension occurs within marker parameters. Other side effects + * require more care. + */ + + +LOCAL(wxjpeg_boolean) +get_soi (j_decompress_ptr cinfo) +/* Process an SOI marker */ +{ + int i; + + TRACEMS(cinfo, 1, JTRC_SOI); + + if (cinfo->marker->saw_SOI) + ERREXIT(cinfo, JERR_SOI_DUPLICATE); + + /* Reset all parameters that are defined to be reset by SOI */ + + for (i = 0; i < NUM_ARITH_TBLS; i++) { + cinfo->arith_dc_L[i] = 0; + cinfo->arith_dc_U[i] = 1; + cinfo->arith_ac_K[i] = 5; + } + cinfo->restart_interval = 0; + + /* Set initial assumptions for colorspace etc */ + + cinfo->jpeg_color_space = JCS_UNKNOWN; + cinfo->CCIR601_sampling = FALSE; /* Assume non-CCIR sampling??? */ + + cinfo->saw_JFIF_marker = FALSE; + cinfo->JFIF_major_version = 1; /* set default JFIF APP0 values */ + cinfo->JFIF_minor_version = 1; + cinfo->density_unit = 0; + cinfo->X_density = 1; + cinfo->Y_density = 1; + cinfo->saw_Adobe_marker = FALSE; + cinfo->Adobe_transform = 0; + + cinfo->marker->saw_SOI = TRUE; + + return TRUE; +} + + +LOCAL(wxjpeg_boolean) +get_sof (j_decompress_ptr cinfo, wxjpeg_boolean is_prog, wxjpeg_boolean is_arith) +/* Process a SOFn marker */ +{ + JPEG_INT32 length; + int c, ci; + jpeg_component_info * compptr; + INPUT_VARS(cinfo); + + cinfo->progressive_mode = is_prog; + cinfo->arith_code = is_arith; + + INPUT_2BYTES(cinfo, length, return FALSE); + + INPUT_BYTE(cinfo, cinfo->data_precision, return FALSE); + INPUT_2BYTES(cinfo, cinfo->image_height, return FALSE); + INPUT_2BYTES(cinfo, cinfo->image_width, return FALSE); + INPUT_BYTE(cinfo, cinfo->num_components, return FALSE); + + length -= 8; + + TRACEMS4(cinfo, 1, JTRC_SOF, cinfo->unread_marker, + (int) cinfo->image_width, (int) cinfo->image_height, + cinfo->num_components); + + if (cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOF_DUPLICATE); + + /* We don't support files in which the image height is initially specified */ + /* as 0 and is later redefined by DNL. As long as we have to check that, */ + /* might as well have a general sanity check. */ + if (cinfo->image_height <= 0 || cinfo->image_width <= 0 + || cinfo->num_components <= 0) + ERREXIT(cinfo, JERR_EMPTY_IMAGE); + + if (length != (cinfo->num_components * 3)) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + if (cinfo->comp_info == NULL) /* do only once, even if suspend */ + cinfo->comp_info = (jpeg_component_info *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * SIZEOF(jpeg_component_info)); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + compptr->component_index = ci; + INPUT_BYTE(cinfo, compptr->component_id, return FALSE); + INPUT_BYTE(cinfo, c, return FALSE); + compptr->h_samp_factor = (c >> 4) & 15; + compptr->v_samp_factor = (c ) & 15; + INPUT_BYTE(cinfo, compptr->quant_tbl_no, return FALSE); + + TRACEMS4(cinfo, 1, JTRC_SOF_COMPONENT, + compptr->component_id, compptr->h_samp_factor, + compptr->v_samp_factor, compptr->quant_tbl_no); + } + + cinfo->marker->saw_SOF = TRUE; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(wxjpeg_boolean) +get_sos (j_decompress_ptr cinfo) +/* Process a SOS marker */ +{ + JPEG_INT32 length; + int i, ci, n, c, cc; + jpeg_component_info * compptr; + INPUT_VARS(cinfo); + + if (! cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOS_NO_SOF); + + INPUT_2BYTES(cinfo, length, return FALSE); + + INPUT_BYTE(cinfo, n, return FALSE); /* Number of components */ + + TRACEMS1(cinfo, 1, JTRC_SOS, n); + + if (length != (n * 2 + 6) || n < 1 || n > MAX_COMPS_IN_SCAN) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + cinfo->comps_in_scan = n; + + /* Collect the component-spec parameters */ + + for (i = 0; i < n; i++) { + INPUT_BYTE(cinfo, cc, return FALSE); + INPUT_BYTE(cinfo, c, return FALSE); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (cc == compptr->component_id) + goto id_found; + } + + ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc); + + id_found: + + cinfo->cur_comp_info[i] = compptr; + compptr->dc_tbl_no = (c >> 4) & 15; + compptr->ac_tbl_no = (c ) & 15; + + TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc, + compptr->dc_tbl_no, compptr->ac_tbl_no); + } + + /* Collect the additional scan parameters Ss, Se, Ah/Al. */ + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Ss = c; + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Se = c; + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Ah = (c >> 4) & 15; + cinfo->Al = (c ) & 15; + + TRACEMS4(cinfo, 1, JTRC_SOS_PARAMS, cinfo->Ss, cinfo->Se, + cinfo->Ah, cinfo->Al); + + /* Prepare to scan data & restart markers */ + cinfo->marker->next_restart_num = 0; + + /* Count another SOS marker */ + cinfo->input_scan_number++; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +#ifdef D_ARITH_CODING_SUPPORTED + +LOCAL(wxjpeg_boolean) +get_dac (j_decompress_ptr cinfo) +/* Process a DAC marker */ +{ + JPEG_INT32 length; + int index, val; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 0) { + INPUT_BYTE(cinfo, index, return FALSE); + INPUT_BYTE(cinfo, val, return FALSE); + + length -= 2; + + TRACEMS2(cinfo, 1, JTRC_DAC, index, val); + + if (index < 0 || index >= (2*NUM_ARITH_TBLS)) + ERREXIT1(cinfo, JERR_DAC_INDEX, index); + + if (index >= NUM_ARITH_TBLS) { /* define AC table */ + cinfo->arith_ac_K[index-NUM_ARITH_TBLS] = (UINT8) val; + } else { /* define DC table */ + cinfo->arith_dc_L[index] = (UINT8) (val & 0x0F); + cinfo->arith_dc_U[index] = (UINT8) (val >> 4); + if (cinfo->arith_dc_L[index] > cinfo->arith_dc_U[index]) + ERREXIT1(cinfo, JERR_DAC_VALUE, val); + } + } + + if (length != 0) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_SYNC(cinfo); + return TRUE; +} + +#else /* ! D_ARITH_CODING_SUPPORTED */ + +#define get_dac(cinfo) skip_variable(cinfo) + +#endif /* D_ARITH_CODING_SUPPORTED */ + + +LOCAL(wxjpeg_boolean) +get_dht (j_decompress_ptr cinfo) +/* Process a DHT marker */ +{ + JPEG_INT32 length; + UINT8 bits[17]; + UINT8 huffval[256]; + int i, index, count; + JHUFF_TBL **htblptr; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 16) { + INPUT_BYTE(cinfo, index, return FALSE); + + TRACEMS1(cinfo, 1, JTRC_DHT, index); + + bits[0] = 0; + count = 0; + for (i = 1; i <= 16; i++) { + INPUT_BYTE(cinfo, bits[i], return FALSE); + count += bits[i]; + } + + length -= 1 + 16; + + TRACEMS8(cinfo, 2, JTRC_HUFFBITS, + bits[1], bits[2], bits[3], bits[4], + bits[5], bits[6], bits[7], bits[8]); + TRACEMS8(cinfo, 2, JTRC_HUFFBITS, + bits[9], bits[10], bits[11], bits[12], + bits[13], bits[14], bits[15], bits[16]); + + /* Here we just do minimal validation of the counts to avoid walking + * off the end of our table space. jdhuff.c will check more carefully. + */ + if (count > 256 || ((JPEG_INT32) count) > length) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + + for (i = 0; i < count; i++) + INPUT_BYTE(cinfo, huffval[i], return FALSE); + + length -= count; + + if (index & 0x10) { /* AC table definition */ + index -= 0x10; + htblptr = &cinfo->ac_huff_tbl_ptrs[index]; + } else { /* DC table definition */ + htblptr = &cinfo->dc_huff_tbl_ptrs[index]; + } + + if (index < 0 || index >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_DHT_INDEX, index); + + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + + MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits)); + MEMCOPY((*htblptr)->huffval, huffval, SIZEOF((*htblptr)->huffval)); + } + + if (length != 0) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(wxjpeg_boolean) +get_dqt (j_decompress_ptr cinfo) +/* Process a DQT marker */ +{ + JPEG_INT32 length; + int n, i, prec; + unsigned int tmp; + JQUANT_TBL *quant_ptr; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 0) { + INPUT_BYTE(cinfo, n, return FALSE); + prec = n >> 4; + n &= 0x0F; + + TRACEMS2(cinfo, 1, JTRC_DQT, n, prec); + + if (n >= NUM_QUANT_TBLS) + ERREXIT1(cinfo, JERR_DQT_INDEX, n); + + if (cinfo->quant_tbl_ptrs[n] == NULL) + cinfo->quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) cinfo); + quant_ptr = cinfo->quant_tbl_ptrs[n]; + + for (i = 0; i < DCTSIZE2; i++) { + if (prec) + INPUT_2BYTES(cinfo, tmp, return FALSE); + else + INPUT_BYTE(cinfo, tmp, return FALSE); + /* We convert the zigzag-order table to natural array order. */ + quant_ptr->quantval[jpeg_natural_order[i]] = (UINT16) tmp; + } + + if (cinfo->err->trace_level >= 2) { + for (i = 0; i < DCTSIZE2; i += 8) { + TRACEMS8(cinfo, 2, JTRC_QUANTVALS, + quant_ptr->quantval[i], quant_ptr->quantval[i+1], + quant_ptr->quantval[i+2], quant_ptr->quantval[i+3], + quant_ptr->quantval[i+4], quant_ptr->quantval[i+5], + quant_ptr->quantval[i+6], quant_ptr->quantval[i+7]); + } + } + + length -= DCTSIZE2+1; + if (prec) length -= DCTSIZE2; + } + + if (length != 0) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(wxjpeg_boolean) +get_dri (j_decompress_ptr cinfo) +/* Process a DRI marker */ +{ + JPEG_INT32 length; + unsigned int tmp; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + + if (length != 4) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_2BYTES(cinfo, tmp, return FALSE); + + TRACEMS1(cinfo, 1, JTRC_DRI, tmp); + + cinfo->restart_interval = tmp; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +/* + * Routines for processing APPn and COM markers. + * These are either saved in memory or discarded, per application request. + * APP0 and APP14 are specially checked to see if they are + * JFIF and Adobe markers, respectively. + */ + +#define APP0_DATA_LEN 14 /* Length of interesting data in APP0 */ +#define APP14_DATA_LEN 12 /* Length of interesting data in APP14 */ +#define APPN_DATA_LEN 14 /* Must be the largest of the above!! */ + + +LOCAL(void) +examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data, + unsigned int datalen, JPEG_INT32 remaining) +/* Examine first few bytes from an APP0. + * Take appropriate action if it is a JFIF marker. + * datalen is # of bytes at data[], remaining is length of rest of marker data. + */ +{ + JPEG_INT32 totallen = (JPEG_INT32) datalen + remaining; + + if (datalen >= APP0_DATA_LEN && + GETJOCTET(data[0]) == 0x4A && + GETJOCTET(data[1]) == 0x46 && + GETJOCTET(data[2]) == 0x49 && + GETJOCTET(data[3]) == 0x46 && + GETJOCTET(data[4]) == 0) { + /* Found JFIF APP0 marker: save info */ + cinfo->saw_JFIF_marker = TRUE; + cinfo->JFIF_major_version = GETJOCTET(data[5]); + cinfo->JFIF_minor_version = GETJOCTET(data[6]); + cinfo->density_unit = GETJOCTET(data[7]); + cinfo->X_density = (GETJOCTET(data[8]) << 8) + GETJOCTET(data[9]); + cinfo->Y_density = (GETJOCTET(data[10]) << 8) + GETJOCTET(data[11]); + /* Check version. + * Major version must be 1, anything else signals an incompatible change. + * (We used to treat this as an error, but now it's a nonfatal warning, + * because some bozo at Hijaak couldn't read the spec.) + * Minor version should be 0..2, but process anyway if newer. + */ + if (cinfo->JFIF_major_version != 1) + WARNMS2(cinfo, JWRN_JFIF_MAJOR, + cinfo->JFIF_major_version, cinfo->JFIF_minor_version); + /* Generate trace messages */ + TRACEMS5(cinfo, 1, JTRC_JFIF, + cinfo->JFIF_major_version, cinfo->JFIF_minor_version, + cinfo->X_density, cinfo->Y_density, cinfo->density_unit); + /* Validate thumbnail dimensions and issue appropriate messages */ + if (GETJOCTET(data[12]) | GETJOCTET(data[13])) + TRACEMS2(cinfo, 1, JTRC_JFIF_THUMBNAIL, + GETJOCTET(data[12]), GETJOCTET(data[13])); + totallen -= APP0_DATA_LEN; + if (totallen != + ((JPEG_INT32)GETJOCTET(data[12]) * (JPEG_INT32)GETJOCTET(data[13]) * (JPEG_INT32) 3)) + TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, (int) totallen); + } else if (datalen >= 6 && + GETJOCTET(data[0]) == 0x4A && + GETJOCTET(data[1]) == 0x46 && + GETJOCTET(data[2]) == 0x58 && + GETJOCTET(data[3]) == 0x58 && + GETJOCTET(data[4]) == 0) { + /* Found JFIF "JFXX" extension APP0 marker */ + /* The library doesn't actually do anything with these, + * but we try to produce a helpful trace message. + */ + switch (GETJOCTET(data[5])) { + case 0x10: + TRACEMS1(cinfo, 1, JTRC_THUMB_JPEG, (int) totallen); + break; + case 0x11: + TRACEMS1(cinfo, 1, JTRC_THUMB_PALETTE, (int) totallen); + break; + case 0x13: + TRACEMS1(cinfo, 1, JTRC_THUMB_RGB, (int) totallen); + break; + default: + TRACEMS2(cinfo, 1, JTRC_JFIF_EXTENSION, + GETJOCTET(data[5]), (int) totallen); + break; + } + } else { + /* Start of APP0 does not match "JFIF" or "JFXX", or too short */ + TRACEMS1(cinfo, 1, JTRC_APP0, (int) totallen); + } +} + + +LOCAL(void) +examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data, + unsigned int datalen, JPEG_INT32 remaining) +/* Examine first few bytes from an APP14. + * Take appropriate action if it is an Adobe marker. + * datalen is # of bytes at data[], remaining is length of rest of marker data. + */ +{ + unsigned int version, flags0, flags1, transform; + + if (datalen >= APP14_DATA_LEN && + GETJOCTET(data[0]) == 0x41 && + GETJOCTET(data[1]) == 0x64 && + GETJOCTET(data[2]) == 0x6F && + GETJOCTET(data[3]) == 0x62 && + GETJOCTET(data[4]) == 0x65) { + /* Found Adobe APP14 marker */ + version = (GETJOCTET(data[5]) << 8) + GETJOCTET(data[6]); + flags0 = (GETJOCTET(data[7]) << 8) + GETJOCTET(data[8]); + flags1 = (GETJOCTET(data[9]) << 8) + GETJOCTET(data[10]); + transform = GETJOCTET(data[11]); + TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform); + cinfo->saw_Adobe_marker = TRUE; + cinfo->Adobe_transform = (UINT8) transform; + } else { + /* Start of APP14 does not match "Adobe", or too short */ + TRACEMS1(cinfo, 1, JTRC_APP14, (int) (datalen + remaining)); + } +} + + +METHODDEF(wxjpeg_boolean) +get_interesting_appn (j_decompress_ptr cinfo) +/* Process an APP0 or APP14 marker without saving it */ +{ + JPEG_INT32 length; + JOCTET b[APPN_DATA_LEN]; + unsigned int i, numtoread; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + /* get the interesting part of the marker data */ + if (length >= APPN_DATA_LEN) + numtoread = APPN_DATA_LEN; + else if (length > 0) + numtoread = (unsigned int) length; + else + numtoread = 0; + for (i = 0; i < numtoread; i++) + INPUT_BYTE(cinfo, b[i], return FALSE); + length -= numtoread; + + /* process it */ + switch (cinfo->unread_marker) { + case M_APP0: + examine_app0(cinfo, (JOCTET FAR *) b, numtoread, length); + break; + case M_APP14: + examine_app14(cinfo, (JOCTET FAR *) b, numtoread, length); + break; + default: + /* can't get here unless jpeg_save_markers chooses wrong processor */ + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); + break; + } + + /* skip any remaining data -- could be lots */ + INPUT_SYNC(cinfo); + if (length > 0) + (*cinfo->src->skip_input_data) (cinfo, (long) length); + + return TRUE; +} + + +#ifdef SAVE_MARKERS_SUPPORTED + +METHODDEF(wxjpeg_boolean) +save_marker (j_decompress_ptr cinfo) +/* Save an APPn or COM marker into the marker list */ +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + jpeg_saved_marker_ptr cur_marker = marker->cur_marker; + unsigned int bytes_read, data_length; + JOCTET FAR * data; + JPEG_INT32 length = 0; + INPUT_VARS(cinfo); + + if (cur_marker == NULL) { + /* begin reading a marker */ + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + if (length >= 0) { /* watch out for bogus length word */ + /* figure out how much we want to save */ + unsigned int limit; + if (cinfo->unread_marker == (int) M_COM) + limit = marker->length_limit_COM; + else + limit = marker->length_limit_APPn[cinfo->unread_marker - (int) M_APP0]; + if ((unsigned int) length < limit) + limit = (unsigned int) length; + /* allocate and initialize the marker item */ + cur_marker = (jpeg_saved_marker_ptr) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(struct jpeg_marker_struct) + limit); + cur_marker->next = NULL; + cur_marker->marker = (UINT8) cinfo->unread_marker; + cur_marker->original_length = (unsigned int) length; + cur_marker->data_length = limit; + /* data area is just beyond the jpeg_marker_struct */ + data = cur_marker->data = (JOCTET FAR *) (cur_marker + 1); + marker->cur_marker = cur_marker; + marker->bytes_read = 0; + bytes_read = 0; + data_length = limit; + } else { + /* deal with bogus length word */ + bytes_read = data_length = 0; + data = NULL; + } + } else { + /* resume reading a marker */ + bytes_read = marker->bytes_read; + data_length = cur_marker->data_length; + data = cur_marker->data + bytes_read; + } + + while (bytes_read < data_length) { + INPUT_SYNC(cinfo); /* move the restart point to here */ + marker->bytes_read = bytes_read; + /* If there's not at least one byte in buffer, suspend */ + MAKE_BYTE_AVAIL(cinfo, return FALSE); + /* Copy bytes with reasonable rapidity */ + while (bytes_read < data_length && bytes_in_buffer > 0) { + *data++ = *next_input_byte++; + bytes_in_buffer--; + bytes_read++; + } + } + + /* Done reading what we want to read */ + if (cur_marker != NULL) { /* will be NULL if bogus length word */ + /* Add new marker to end of list */ + if (cinfo->marker_list == NULL) { + cinfo->marker_list = cur_marker; + } else { + jpeg_saved_marker_ptr prev = cinfo->marker_list; + while (prev->next != NULL) + prev = prev->next; + prev->next = cur_marker; + } + /* Reset pointer & calc remaining data length */ + data = cur_marker->data; + length = cur_marker->original_length - data_length; + } + /* Reset to initial state for next marker */ + marker->cur_marker = NULL; + + /* Process the marker if interesting; else just make a generic trace msg */ + switch (cinfo->unread_marker) { + case M_APP0: + examine_app0(cinfo, data, data_length, length); + break; + case M_APP14: + examine_app14(cinfo, data, data_length, length); + break; + default: + TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, + (int) (data_length + length)); + break; + } + + /* skip any remaining data -- could be lots */ + INPUT_SYNC(cinfo); /* do before skip_input_data */ + if (length > 0) + (*cinfo->src->skip_input_data) (cinfo, (long) length); + + return TRUE; +} + +#endif /* SAVE_MARKERS_SUPPORTED */ + + +METHODDEF(wxjpeg_boolean) +skip_variable (j_decompress_ptr cinfo) +/* Skip over an unknown or uninteresting variable-length marker */ +{ + JPEG_INT32 length; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, (int) length); + + INPUT_SYNC(cinfo); /* do before skip_input_data */ + if (length > 0) + (*cinfo->src->skip_input_data) (cinfo, (long) length); + + return TRUE; +} + + +/* + * Find the next JPEG marker, save it in cinfo->unread_marker. + * Returns FALSE if had to suspend before reaching a marker; + * in that case cinfo->unread_marker is unchanged. + * + * Note that the result might not be a valid marker code, + * but it will never be 0 or FF. + */ + +LOCAL(wxjpeg_boolean) +next_marker (j_decompress_ptr cinfo) +{ + int c; + INPUT_VARS(cinfo); + + for (;;) { + INPUT_BYTE(cinfo, c, return FALSE); + /* Skip any non-FF bytes. + * This may look a bit inefficient, but it will not occur in a valid file. + * We sync after each discarded byte so that a suspending data source + * can discard the byte from its buffer. + */ + while (c != 0xFF) { + cinfo->marker->discarded_bytes++; + INPUT_SYNC(cinfo); + INPUT_BYTE(cinfo, c, return FALSE); + } + /* This loop swallows any duplicate FF bytes. Extra FFs are legal as + * pad bytes, so don't count them in discarded_bytes. We assume there + * will not be so many consecutive FF bytes as to overflow a suspending + * data source's input buffer. + */ + do { + INPUT_BYTE(cinfo, c, return FALSE); + } while (c == 0xFF); + if (c != 0) + break; /* found a valid marker, exit loop */ + /* Reach here if we found a stuffed-zero data sequence (FF/00). + * Discard it and loop back to try again. + */ + cinfo->marker->discarded_bytes += 2; + INPUT_SYNC(cinfo); + } + + if (cinfo->marker->discarded_bytes != 0) { + WARNMS2(cinfo, JWRN_EXTRANEOUS_DATA, cinfo->marker->discarded_bytes, c); + cinfo->marker->discarded_bytes = 0; + } + + cinfo->unread_marker = c; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(wxjpeg_boolean) +first_marker (j_decompress_ptr cinfo) +/* Like next_marker, but used to obtain the initial SOI marker. */ +/* For this marker, we do not allow preceding garbage or fill; otherwise, + * we might well scan an entire input file before realizing it ain't JPEG. + * If an application wants to process non-JFIF files, it must seek to the + * SOI before calling the JPEG library. + */ +{ + int c, c2; + INPUT_VARS(cinfo); + + INPUT_BYTE(cinfo, c, return FALSE); + INPUT_BYTE(cinfo, c2, return FALSE); + if (c != 0xFF || c2 != (int) M_SOI) + ERREXIT2(cinfo, JERR_NO_SOI, c, c2); + + cinfo->unread_marker = c2; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +/* + * Read markers until SOS or EOI. + * + * Returns same codes as are defined for jpeg_consume_input: + * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + */ + +METHODDEF(int) +read_markers (j_decompress_ptr cinfo) +{ + /* Outer loop repeats once for each marker. */ + for (;;) { + /* Collect the marker proper, unless we already did. */ + /* NB: first_marker() enforces the requirement that SOI appear first. */ + if (cinfo->unread_marker == 0) { + if (! cinfo->marker->saw_SOI) { + if (! first_marker(cinfo)) + return JPEG_SUSPENDED; + } else { + if (! next_marker(cinfo)) + return JPEG_SUSPENDED; + } + } + /* At this point cinfo->unread_marker contains the marker code and the + * input point is just past the marker proper, but before any parameters. + * A suspension will cause us to return with this state still true. + */ + switch (cinfo->unread_marker) { + case M_SOI: + if (! get_soi(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_SOF0: /* Baseline */ + case M_SOF1: /* Extended sequential, Huffman */ + if (! get_sof(cinfo, FALSE, FALSE)) + return JPEG_SUSPENDED; + break; + + case M_SOF2: /* Progressive, Huffman */ + if (! get_sof(cinfo, TRUE, FALSE)) + return JPEG_SUSPENDED; + break; + + case M_SOF9: /* Extended sequential, arithmetic */ + if (! get_sof(cinfo, FALSE, TRUE)) + return JPEG_SUSPENDED; + break; + + case M_SOF10: /* Progressive, arithmetic */ + if (! get_sof(cinfo, TRUE, TRUE)) + return JPEG_SUSPENDED; + break; + + /* Currently unsupported SOFn types */ + case M_SOF3: /* Lossless, Huffman */ + case M_SOF5: /* Differential sequential, Huffman */ + case M_SOF6: /* Differential progressive, Huffman */ + case M_SOF7: /* Differential lossless, Huffman */ + case M_JPG: /* Reserved for JPEG extensions */ + case M_SOF11: /* Lossless, arithmetic */ + case M_SOF13: /* Differential sequential, arithmetic */ + case M_SOF14: /* Differential progressive, arithmetic */ + case M_SOF15: /* Differential lossless, arithmetic */ + ERREXIT1(cinfo, JERR_SOF_UNSUPPORTED, cinfo->unread_marker); + break; + + case M_SOS: + if (! get_sos(cinfo)) + return JPEG_SUSPENDED; + cinfo->unread_marker = 0; /* processed the marker */ + return JPEG_REACHED_SOS; + + case M_EOI: + TRACEMS(cinfo, 1, JTRC_EOI); + cinfo->unread_marker = 0; /* processed the marker */ + return JPEG_REACHED_EOI; + + case M_DAC: + if (! get_dac(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DHT: + if (! get_dht(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DQT: + if (! get_dqt(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DRI: + if (! get_dri(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_APP0: + case M_APP1: + case M_APP2: + case M_APP3: + case M_APP4: + case M_APP5: + case M_APP6: + case M_APP7: + case M_APP8: + case M_APP9: + case M_APP10: + case M_APP11: + case M_APP12: + case M_APP13: + case M_APP14: + case M_APP15: + if (! (*((my_marker_ptr) cinfo->marker)->process_APPn[ + cinfo->unread_marker - (int) M_APP0]) (cinfo)) + return JPEG_SUSPENDED; + break; + + case M_COM: + if (! (*((my_marker_ptr) cinfo->marker)->process_COM) (cinfo)) + return JPEG_SUSPENDED; + break; + + case M_RST0: /* these are all parameterless */ + case M_RST1: + case M_RST2: + case M_RST3: + case M_RST4: + case M_RST5: + case M_RST6: + case M_RST7: + case M_TEM: + TRACEMS1(cinfo, 1, JTRC_PARMLESS_MARKER, cinfo->unread_marker); + break; + + case M_DNL: /* Ignore DNL ... perhaps the wrong thing */ + if (! skip_variable(cinfo)) + return JPEG_SUSPENDED; + break; + + default: /* must be DHP, EXP, JPGn, or RESn */ + /* For now, we treat the reserved markers as fatal errors since they are + * likely to be used to signal incompatible JPEG Part 3 extensions. + * Once the JPEG 3 version-number marker is well defined, this code + * ought to change! + */ + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); + break; + } + /* Successfully processed marker, so reset state variable */ + cinfo->unread_marker = 0; + } /* end loop */ +} + + +/* + * Read a restart marker, which is expected to appear next in the datastream; + * if the marker is not there, take appropriate recovery action. + * Returns FALSE if suspension is required. + * + * This is called by the entropy decoder after it has read an appropriate + * number of MCUs. cinfo->unread_marker may be nonzero if the entropy decoder + * has already read a marker from the data source. Under normal conditions + * cinfo->unread_marker will be reset to 0 before returning; if not reset, + * it holds a marker which the decoder will be unable to read past. + */ + +METHODDEF(wxjpeg_boolean) +read_restart_marker (j_decompress_ptr cinfo) +{ + /* Obtain a marker unless we already did. */ + /* Note that next_marker will complain if it skips any data. */ + if (cinfo->unread_marker == 0) { + if (! next_marker(cinfo)) + return FALSE; + } + + if (cinfo->unread_marker == + ((int) M_RST0 + cinfo->marker->next_restart_num)) { + /* Normal case --- swallow the marker and let entropy decoder continue */ + TRACEMS1(cinfo, 3, JTRC_RST, cinfo->marker->next_restart_num); + cinfo->unread_marker = 0; + } else { + /* Uh-oh, the restart markers have been messed up. */ + /* Let the data source manager determine how to resync. */ + if (! (*cinfo->src->resync_to_restart) (cinfo, + cinfo->marker->next_restart_num)) + return FALSE; + } + + /* Update next-restart state */ + cinfo->marker->next_restart_num = (cinfo->marker->next_restart_num + 1) & 7; + + return TRUE; +} + + +/* + * This is the default resync_to_restart method for data source managers + * to use if they don't have any better approach. Some data source managers + * may be able to back up, or may have additional knowledge about the data + * which permits a more intelligent recovery strategy; such managers would + * presumably supply their own resync method. + * + * read_restart_marker calls resync_to_restart if it finds a marker other than + * the restart marker it was expecting. (This code is *not* used unless + * a nonzero restart interval has been declared.) cinfo->unread_marker is + * the marker code actually found (might be anything, except 0 or FF). + * The desired restart marker number (0..7) is passed as a parameter. + * This routine is supposed to apply whatever error recovery strategy seems + * appropriate in order to position the input stream to the next data segment. + * Note that cinfo->unread_marker is treated as a marker appearing before + * the current data-source input point; usually it should be reset to zero + * before returning. + * Returns FALSE if suspension is required. + * + * This implementation is substantially constrained by wanting to treat the + * input as a data stream; this means we can't back up. Therefore, we have + * only the following actions to work with: + * 1. Simply discard the marker and let the entropy decoder resume at next + * byte of file. + * 2. Read forward until we find another marker, discarding intervening + * data. (In theory we could look ahead within the current bufferload, + * without having to discard data if we don't find the desired marker. + * This idea is not implemented here, in part because it makes behavior + * dependent on buffer size and chance buffer-boundary positions.) + * 3. Leave the marker unread (by failing to zero cinfo->unread_marker). + * This will cause the entropy decoder to process an empty data segment, + * inserting dummy zeroes, and then we will reprocess the marker. + * + * #2 is appropriate if we think the desired marker lies ahead, while #3 is + * appropriate if the found marker is a future restart marker (indicating + * that we have missed the desired restart marker, probably because it got + * corrupted). + * We apply #2 or #3 if the found marker is a restart marker no more than + * two counts behind or ahead of the expected one. We also apply #2 if the + * found marker is not a legal JPEG marker code (it's certainly bogus data). + * If the found marker is a restart marker more than 2 counts away, we do #1 + * (too much risk that the marker is erroneous; with luck we will be able to + * resync at some future point). + * For any valid non-restart JPEG marker, we apply #3. This keeps us from + * overrunning the end of a scan. An implementation limited to single-scan + * files might find it better to apply #2 for markers other than EOI, since + * any other marker would have to be bogus data in that case. + */ + +GLOBAL(wxjpeg_boolean) +jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired) +{ + int marker = cinfo->unread_marker; + int action = 1; + + /* Always put up a warning. */ + WARNMS2(cinfo, JWRN_MUST_RESYNC, marker, desired); + + /* Outer loop handles repeated decision after scanning forward. */ + for (;;) { + if (marker < (int) M_SOF0) + action = 2; /* invalid marker */ + else if (marker < (int) M_RST0 || marker > (int) M_RST7) + action = 3; /* valid non-restart marker */ + else { + if (marker == ((int) M_RST0 + ((desired+1) & 7)) || + marker == ((int) M_RST0 + ((desired+2) & 7))) + action = 3; /* one of the next two expected restarts */ + else if (marker == ((int) M_RST0 + ((desired-1) & 7)) || + marker == ((int) M_RST0 + ((desired-2) & 7))) + action = 2; /* a prior restart, so advance */ + else + action = 1; /* desired restart or too far away */ + } + TRACEMS2(cinfo, 4, JTRC_RECOVERY_ACTION, marker, action); + switch (action) { + case 1: + /* Discard marker and let entropy decoder resume processing. */ + cinfo->unread_marker = 0; + return TRUE; + case 2: + /* Scan to the next marker, and repeat the decision loop. */ + if (! next_marker(cinfo)) + return FALSE; + marker = cinfo->unread_marker; + break; + case 3: + /* Return without advancing past this marker. */ + /* Entropy decoder will be forced to process an empty segment. */ + return TRUE; + } + } /* end loop */ +} + + +/* + * Reset marker processing state to begin a fresh datastream. + */ + +METHODDEF(void) +reset_marker_reader (j_decompress_ptr cinfo) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + + cinfo->comp_info = NULL; /* until allocated by get_sof */ + cinfo->input_scan_number = 0; /* no SOS seen yet */ + cinfo->unread_marker = 0; /* no pending marker */ + marker->pub.saw_SOI = FALSE; /* set internal state too */ + marker->pub.saw_SOF = FALSE; + marker->pub.discarded_bytes = 0; + marker->cur_marker = NULL; +} + + +/* + * Initialize the marker reader module. + * This is called only once, when the decompression object is created. + */ + +GLOBAL(void) +jinit_marker_reader (j_decompress_ptr cinfo) +{ + my_marker_ptr marker; + int i; + + /* Create subobject in permanent pool */ + marker = (my_marker_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_marker_reader)); + cinfo->marker = (struct jpeg_marker_reader *) marker; + /* Initialize public method pointers */ + marker->pub.reset_marker_reader = reset_marker_reader; + marker->pub.read_markers = read_markers; + marker->pub.read_restart_marker = read_restart_marker; + /* Initialize COM/APPn processing. + * By default, we examine and then discard APP0 and APP14, + * but simply discard COM and all other APPn. + */ + marker->process_COM = skip_variable; + marker->length_limit_COM = 0; + for (i = 0; i < 16; i++) { + marker->process_APPn[i] = skip_variable; + marker->length_limit_APPn[i] = 0; + } + marker->process_APPn[0] = get_interesting_appn; + marker->process_APPn[14] = get_interesting_appn; + /* Reset marker processing state */ + reset_marker_reader(cinfo); +} + + +/* + * Control saving of COM and APPn markers into marker_list. + */ + +#ifdef SAVE_MARKERS_SUPPORTED + +GLOBAL(void) +jpeg_save_markers (j_decompress_ptr cinfo, int marker_code, + unsigned int length_limit) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + long maxlength; + jpeg_marker_parser_method processor; + + /* Length limit mustn't be larger than what we can allocate + * (should only be a concern in a 16-bit environment). + */ + maxlength = cinfo->mem->max_alloc_chunk - SIZEOF(struct jpeg_marker_struct); + if (((long) length_limit) > maxlength) + length_limit = (unsigned int) maxlength; + + /* Choose processor routine to use. + * APP0/APP14 have special requirements. + */ + if (length_limit) { + processor = save_marker; + /* If saving APP0/APP14, save at least enough for our internal use. */ + if (marker_code == (int) M_APP0 && length_limit < APP0_DATA_LEN) + length_limit = APP0_DATA_LEN; + else if (marker_code == (int) M_APP14 && length_limit < APP14_DATA_LEN) + length_limit = APP14_DATA_LEN; + } else { + processor = skip_variable; + /* If discarding APP0/APP14, use our regular on-the-fly processor. */ + if (marker_code == (int) M_APP0 || marker_code == (int) M_APP14) + processor = get_interesting_appn; + } + + if (marker_code == (int) M_COM) { + marker->process_COM = processor; + marker->length_limit_COM = length_limit; + } else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) { + marker->process_APPn[marker_code - (int) M_APP0] = processor; + marker->length_limit_APPn[marker_code - (int) M_APP0] = length_limit; + } else + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); +} + +#endif /* SAVE_MARKERS_SUPPORTED */ + + +/* + * Install a special processing method for COM or APPn markers. + */ + +GLOBAL(void) +jpeg_set_marker_processor (j_decompress_ptr cinfo, int marker_code, + jpeg_marker_parser_method routine) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + + if (marker_code == (int) M_COM) + marker->process_COM = routine; + else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) + marker->process_APPn[marker_code - (int) M_APP0] = routine; + else + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmaster.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmaster.c new file mode 100644 index 0000000000..d68747631a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmaster.c @@ -0,0 +1,557 @@ +/* + * jdmaster.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains master control logic for the JPEG decompressor. + * These routines are concerned with selecting the modules to be executed + * and with determining the number of passes and the work to be done in each + * pass. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +/* Private state */ + +typedef struct { + struct jpeg_decomp_master pub; /* public fields */ + + int pass_number; /* # of passes completed */ + + wxjpeg_boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */ + + /* Saved references to initialized quantizer modules, + * in case we need to switch modes. + */ + struct jpeg_color_quantizer * quantizer_1pass; + struct jpeg_color_quantizer * quantizer_2pass; +} my_decomp_master; + +typedef my_decomp_master * my_master_ptr; + + +/* + * Determine whether merged upsample/color conversion should be used. + * CRUCIAL: this must match the actual capabilities of jdmerge.c! + */ + +LOCAL(wxjpeg_boolean) +use_merged_upsample (j_decompress_ptr cinfo) +{ +#ifdef UPSAMPLE_MERGING_SUPPORTED + /* Merging is the equivalent of plain box-filter upsampling */ + if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling) + return FALSE; + /* jdmerge.c only supports YCC=>RGB color conversion */ + if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 || + cinfo->out_color_space != JCS_RGB || + cinfo->out_color_components != RGB_PIXELSIZE) + return FALSE; + /* and it only handles 2h1v or 2h2v sampling ratios */ + if (cinfo->comp_info[0].h_samp_factor != 2 || + cinfo->comp_info[1].h_samp_factor != 1 || + cinfo->comp_info[2].h_samp_factor != 1 || + cinfo->comp_info[0].v_samp_factor > 2 || + cinfo->comp_info[1].v_samp_factor != 1 || + cinfo->comp_info[2].v_samp_factor != 1) + return FALSE; + /* furthermore, it doesn't work if we've scaled the IDCTs differently */ + if (cinfo->comp_info[0].DCT_scaled_size != cinfo->min_DCT_scaled_size || + cinfo->comp_info[1].DCT_scaled_size != cinfo->min_DCT_scaled_size || + cinfo->comp_info[2].DCT_scaled_size != cinfo->min_DCT_scaled_size) + return FALSE; + /* ??? also need to test for upsample-time rescaling, when & if supported */ + return TRUE; /* by golly, it'll work... */ +#else + return FALSE; +#endif +} + + +/* + * Compute output image dimensions and related values. + * NOTE: this is exported for possible use by application. + * Hence it mustn't do anything that can't be done twice. + * Also note that it may be called before the master module is initialized! + */ + +GLOBAL(void) +jpeg_calc_output_dimensions (j_decompress_ptr cinfo) +/* Do computations that are needed before master selection phase */ +{ +#ifdef IDCT_SCALING_SUPPORTED + int ci; + jpeg_component_info *compptr; +#endif + + /* Prevent application from calling me at wrong times */ + if (cinfo->global_state != DSTATE_READY) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + +#ifdef IDCT_SCALING_SUPPORTED + + /* Compute actual output image dimensions and DCT scaling choices. */ + if (cinfo->scale_num * 8 <= cinfo->scale_denom) { + /* Provide 1/8 scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, 8L); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, 8L); + cinfo->min_DCT_scaled_size = 1; + } else if (cinfo->scale_num * 4 <= cinfo->scale_denom) { + /* Provide 1/4 scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, 4L); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, 4L); + cinfo->min_DCT_scaled_size = 2; + } else if (cinfo->scale_num * 2 <= cinfo->scale_denom) { + /* Provide 1/2 scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, 2L); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, 2L); + cinfo->min_DCT_scaled_size = 4; + } else { + /* Provide 1/1 scaling */ + cinfo->output_width = cinfo->image_width; + cinfo->output_height = cinfo->image_height; + cinfo->min_DCT_scaled_size = DCTSIZE; + } + /* In selecting the actual DCT scaling for each component, we try to + * scale up the chroma components via IDCT scaling rather than upsampling. + * This saves time if the upsampler gets to use 1:1 scaling. + * Note this code assumes that the supported DCT scalings are powers of 2. + */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + int ssize = cinfo->min_DCT_scaled_size; + while (ssize < DCTSIZE && + (compptr->h_samp_factor * ssize * 2 <= + cinfo->max_h_samp_factor * cinfo->min_DCT_scaled_size) && + (compptr->v_samp_factor * ssize * 2 <= + cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size)) { + ssize = ssize * 2; + } + compptr->DCT_scaled_size = ssize; + } + + /* Recompute downsampled dimensions of components; + * application needs to know these if using raw downsampled data. + */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Size in samples, after IDCT scaling */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * + (long) (compptr->h_samp_factor * compptr->DCT_scaled_size), + (long) (cinfo->max_h_samp_factor * DCTSIZE)); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * + (long) (compptr->v_samp_factor * compptr->DCT_scaled_size), + (long) (cinfo->max_v_samp_factor * DCTSIZE)); + } + +#else /* !IDCT_SCALING_SUPPORTED */ + + /* Hardwire it to "no scaling" */ + cinfo->output_width = cinfo->image_width; + cinfo->output_height = cinfo->image_height; + /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE, + * and has computed unscaled downsampled_width and downsampled_height. + */ + +#endif /* IDCT_SCALING_SUPPORTED */ + + /* Report number of components in selected colorspace. */ + /* Probably this should be in the color conversion module... */ + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + cinfo->out_color_components = 1; + break; + case JCS_RGB: +#if RGB_PIXELSIZE != 3 + cinfo->out_color_components = RGB_PIXELSIZE; + break; +#endif /* else share code with YCbCr */ + case JCS_YCbCr: + cinfo->out_color_components = 3; + break; + case JCS_CMYK: + case JCS_YCCK: + cinfo->out_color_components = 4; + break; + default: /* else must be same colorspace as in file */ + cinfo->out_color_components = cinfo->num_components; + break; + } + cinfo->output_components = (cinfo->quantize_colors ? 1 : + cinfo->out_color_components); + + /* See if upsampler will want to emit more than one row at a time */ + if (use_merged_upsample(cinfo)) + cinfo->rec_outbuf_height = cinfo->max_v_samp_factor; + else + cinfo->rec_outbuf_height = 1; +} + + +/* + * Several decompression processes need to range-limit values to the range + * 0..MAXJSAMPLE; the input value may fall somewhat outside this range + * due to noise introduced by quantization, roundoff error, etc. These + * processes are inner loops and need to be as fast as possible. On most + * machines, particularly CPUs with pipelines or instruction prefetch, + * a (subscript-check-less) C table lookup + * x = sample_range_limit[x]; + * is faster than explicit tests + * if (x < 0) x = 0; + * else if (x > MAXJSAMPLE) x = MAXJSAMPLE; + * These processes all use a common table prepared by the routine below. + * + * For most steps we can mathematically guarantee that the initial value + * of x is within MAXJSAMPLE+1 of the legal range, so a table running from + * -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient. But for the initial + * limiting step (just after the IDCT), a wildly out-of-range value is + * possible if the input data is corrupt. To avoid any chance of indexing + * off the end of memory and getting a bad-pointer trap, we perform the + * post-IDCT limiting thus: + * x = range_limit[x & MASK]; + * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit + * samples. Under normal circumstances this is more than enough range and + * a correct output will be generated; with bogus input data the mask will + * cause wraparound, and we will safely generate a bogus-but-in-range output. + * For the post-IDCT step, we want to convert the data from signed to unsigned + * representation by adding CENTERJSAMPLE at the same time that we limit it. + * So the post-IDCT limiting table ends up looking like this: + * CENTERJSAMPLE,CENTERJSAMPLE+1,...,MAXJSAMPLE, + * MAXJSAMPLE (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), + * 0 (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), + * 0,1,...,CENTERJSAMPLE-1 + * Negative inputs select values from the upper half of the table after + * masking. + * + * We can save some space by overlapping the start of the post-IDCT table + * with the simpler range limiting table. The post-IDCT table begins at + * sample_range_limit + CENTERJSAMPLE. + * + * Note that the table is allocated in near data space on PCs; it's small + * enough and used often enough to justify this. + */ + +LOCAL(void) +prepare_range_limit_table (j_decompress_ptr cinfo) +/* Allocate and fill in the sample_range_limit table */ +{ + JSAMPLE * table; + int i; + + table = (JSAMPLE *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (5 * (MAXJSAMPLE+1) + CENTERJSAMPLE) * SIZEOF(JSAMPLE)); + table += (MAXJSAMPLE+1); /* allow negative subscripts of simple table */ + cinfo->sample_range_limit = table; + /* First segment of "simple" table: limit[x] = 0 for x < 0 */ + MEMZERO(table - (MAXJSAMPLE+1), (MAXJSAMPLE+1) * SIZEOF(JSAMPLE)); + /* Main part of "simple" table: limit[x] = x */ + for (i = 0; i <= MAXJSAMPLE; i++) + table[i] = (JSAMPLE) i; + table += CENTERJSAMPLE; /* Point to where post-IDCT table starts */ + /* End of simple table, rest of first half of post-IDCT table */ + for (i = CENTERJSAMPLE; i < 2*(MAXJSAMPLE+1); i++) + table[i] = MAXJSAMPLE; + /* Second half of post-IDCT table */ + MEMZERO(table + (2 * (MAXJSAMPLE+1)), + (2 * (MAXJSAMPLE+1) - CENTERJSAMPLE) * SIZEOF(JSAMPLE)); + MEMCOPY(table + (4 * (MAXJSAMPLE+1) - CENTERJSAMPLE), + cinfo->sample_range_limit, CENTERJSAMPLE * SIZEOF(JSAMPLE)); +} + + +/* + * Master selection of decompression modules. + * This is done once at jpeg_start_decompress time. We determine + * which modules will be used and give them appropriate initialization calls. + * We also initialize the decompressor input side to begin consuming data. + * + * Since jpeg_read_header has finished, we know what is in the SOF + * and (first) SOS markers. We also have all the application parameter + * settings. + */ + +LOCAL(void) +master_selection (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + wxjpeg_boolean use_c_buffer; + long samplesperrow; + JDIMENSION jd_samplesperrow; + + /* Initialize dimensions and other stuff */ + jpeg_calc_output_dimensions(cinfo); + prepare_range_limit_table(cinfo); + + /* Width of an output scanline must be representable as JDIMENSION. */ + samplesperrow = (long) cinfo->output_width * (long) cinfo->out_color_components; + jd_samplesperrow = (JDIMENSION) samplesperrow; + if ((long) jd_samplesperrow != samplesperrow) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + + /* Initialize my private state */ + master->pass_number = 0; + master->using_merged_upsample = use_merged_upsample(cinfo); + + /* Color quantizer selection */ + master->quantizer_1pass = NULL; + master->quantizer_2pass = NULL; + /* No mode changes if not using buffered-image mode. */ + if (! cinfo->quantize_colors || ! cinfo->buffered_image) { + cinfo->enable_1pass_quant = FALSE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; + } + if (cinfo->quantize_colors) { + if (cinfo->raw_data_out) + ERREXIT(cinfo, JERR_NOTIMPL); + /* 2-pass quantizer only works in 3-component color space. */ + if (cinfo->out_color_components != 3) { + cinfo->enable_1pass_quant = TRUE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; + cinfo->colormap = NULL; + } else if (cinfo->colormap != NULL) { + cinfo->enable_external_quant = TRUE; + } else if (cinfo->two_pass_quantize) { + cinfo->enable_2pass_quant = TRUE; + } else { + cinfo->enable_1pass_quant = TRUE; + } + + if (cinfo->enable_1pass_quant) { +#ifdef QUANT_1PASS_SUPPORTED + jinit_1pass_quantizer(cinfo); + master->quantizer_1pass = cinfo->cquantize; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } + + /* We use the 2-pass code to map to external colormaps. */ + if (cinfo->enable_2pass_quant || cinfo->enable_external_quant) { +#ifdef QUANT_2PASS_SUPPORTED + jinit_2pass_quantizer(cinfo); + master->quantizer_2pass = cinfo->cquantize; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } + /* If both quantizers are initialized, the 2-pass one is left active; + * this is necessary for starting with quantization to an external map. + */ + } + + /* Post-processing: in particular, color conversion first */ + if (! cinfo->raw_data_out) { + if (master->using_merged_upsample) { +#ifdef UPSAMPLE_MERGING_SUPPORTED + jinit_merged_upsampler(cinfo); /* does color conversion too */ +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + jinit_color_deconverter(cinfo); + jinit_upsampler(cinfo); + } + jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant); + } + /* Inverse DCT */ + jinit_inverse_dct(cinfo); + /* Entropy decoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef D_PROGRESSIVE_SUPPORTED + jinit_phuff_decoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_decoder(cinfo); + } + + /* Initialize principal buffer controllers. */ + use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image; + jinit_d_coef_controller(cinfo, use_c_buffer); + + if (! cinfo->raw_data_out) + jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Initialize input side of decompressor to consume first scan. */ + (*cinfo->inputctl->start_input_pass) (cinfo); + +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* If jpeg_start_decompress will read the whole file, initialize + * progress monitoring appropriately. The input step is counted + * as one pass. + */ + if (cinfo->progress != NULL && ! cinfo->buffered_image && + cinfo->inputctl->has_multiple_scans) { + int nscans; + /* Estimate number of scans to set pass_limit. */ + if (cinfo->progressive_mode) { + /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ + nscans = 2 + 3 * cinfo->num_components; + } else { + /* For a nonprogressive multiscan file, estimate 1 scan per component. */ + nscans = cinfo->num_components; + } + cinfo->progress->pass_counter = 0L; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; + cinfo->progress->completed_passes = 0; + cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2); + /* Count the input pass as done */ + master->pass_number++; + } +#endif /* D_MULTISCAN_FILES_SUPPORTED */ +} + + +/* + * Per-pass setup. + * This is called at the beginning of each output pass. We determine which + * modules will be active during this pass and give them appropriate + * start_pass calls. We also set is_dummy_pass to indicate whether this + * is a "real" output pass or a dummy pass for color quantization. + * (In the latter case, jdapistd.c will crank the pass to completion.) + */ + +METHODDEF(void) +prepare_for_output_pass (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + if (master->pub.is_dummy_pass) { +#ifdef QUANT_2PASS_SUPPORTED + /* Final pass of 2-pass quantization */ + master->pub.is_dummy_pass = FALSE; + (*cinfo->cquantize->start_pass) (cinfo, FALSE); + (*cinfo->post->start_pass) (cinfo, JBUF_CRANK_DEST); + (*cinfo->main->start_pass) (cinfo, JBUF_CRANK_DEST); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* QUANT_2PASS_SUPPORTED */ + } else { + if (cinfo->quantize_colors && cinfo->colormap == NULL) { + /* Select new quantization method */ + if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant) { + cinfo->cquantize = master->quantizer_2pass; + master->pub.is_dummy_pass = TRUE; + } else if (cinfo->enable_1pass_quant) { + cinfo->cquantize = master->quantizer_1pass; + } else { + ERREXIT(cinfo, JERR_MODE_CHANGE); + } + } + (*cinfo->idct->start_pass) (cinfo); + (*cinfo->coef->start_output_pass) (cinfo); + if (! cinfo->raw_data_out) { + if (! master->using_merged_upsample) + (*cinfo->cconvert->start_pass) (cinfo); + (*cinfo->upsample->start_pass) (cinfo); + if (cinfo->quantize_colors) + (*cinfo->cquantize->start_pass) (cinfo, master->pub.is_dummy_pass); + (*cinfo->post->start_pass) (cinfo, + (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); + (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); + } + } + + /* Set up progress monitor's pass info if present */ + if (cinfo->progress != NULL) { + cinfo->progress->completed_passes = master->pass_number; + cinfo->progress->total_passes = master->pass_number + + (master->pub.is_dummy_pass ? 2 : 1); + /* In buffered-image mode, we assume one more output pass if EOI not + * yet reached, but no more passes if EOI has been reached. + */ + if (cinfo->buffered_image && ! cinfo->inputctl->eoi_reached) { + cinfo->progress->total_passes += (cinfo->enable_2pass_quant ? 2 : 1); + } + } +} + + +/* + * Finish up at end of an output pass. + */ + +METHODDEF(void) +finish_output_pass (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + if (cinfo->quantize_colors) + (*cinfo->cquantize->finish_pass) (cinfo); + master->pass_number++; +} + + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Switch to a new external colormap between output passes. + */ + +GLOBAL(void) +jpeg_new_colormap (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + /* Prevent application from calling me at wrong times */ + if (cinfo->global_state != DSTATE_BUFIMAGE) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (cinfo->quantize_colors && cinfo->enable_external_quant && + cinfo->colormap != NULL) { + /* Select 2-pass quantizer for external colormap use */ + cinfo->cquantize = master->quantizer_2pass; + /* Notify quantizer of colormap change */ + (*cinfo->cquantize->new_color_map) (cinfo); + master->pub.is_dummy_pass = FALSE; /* just in case */ + } else + ERREXIT(cinfo, JERR_MODE_CHANGE); +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + + +/* + * Initialize master decompression control and select active modules. + * This is performed at the start of jpeg_start_decompress. + */ + +GLOBAL(void) +jinit_master_decompress (j_decompress_ptr cinfo) +{ + my_master_ptr master; + + master = (my_master_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_decomp_master)); + cinfo->master = (struct jpeg_decomp_master *) master; + master->pub.prepare_for_output_pass = prepare_for_output_pass; + master->pub.finish_output_pass = finish_output_pass; + + master->pub.is_dummy_pass = FALSE; + + master_selection(cinfo); +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmerge.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmerge.c new file mode 100644 index 0000000000..55eab36217 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdmerge.c @@ -0,0 +1,399 @@ +/* + * jdmerge.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains code for merged upsampling/color conversion. + * + * This file combines functions from jdsample.c and jdcolor.c; + * read those files first to understand what's going on. + * + * When the chroma components are to be upsampled by simple replication + * (ie, box filtering), we can save some work in color conversion by + * calculating all the output pixels corresponding to a pair of chroma + * samples at one time. In the conversion equations + * R = Y + K1 * Cr + * G = Y + K2 * Cb + K3 * Cr + * B = Y + K4 * Cb + * only the Y term varies among the group of pixels corresponding to a pair + * of chroma samples, so the rest of the terms can be calculated just once. + * At typical sampling ratios, this eliminates half or three-quarters of the + * multiplications needed for color conversion. + * + * This file currently provides implementations for the following cases: + * YCbCr => RGB color conversion only. + * Sampling ratios of 2h1v or 2h2v. + * No scaling needed at upsample time. + * Corner-aligned (non-CCIR601) sampling alignment. + * Other special cases could be added, but in most applications these are + * the only common cases. (For uncommon cases we fall back on the more + * general code in jdsample.c and jdcolor.c.) + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef UPSAMPLE_MERGING_SUPPORTED + + +/* Private subobject */ + +typedef struct { + struct jpeg_upsampler pub; /* public fields */ + + /* Pointer to routine to do actual upsampling/conversion of one row group */ + JMETHOD(void, upmethod, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf)); + + /* Private state for YCC->RGB conversion */ + int * Cr_r_tab; /* => table for Cr to R conversion */ + int * Cb_b_tab; /* => table for Cb to B conversion */ + JPEG_INT32 * Cr_g_tab; /* => table for Cr to G conversion */ + JPEG_INT32 * Cb_g_tab; /* => table for Cb to G conversion */ + + /* For 2:1 vertical sampling, we produce two output rows at a time. + * We need a "spare" row buffer to hold the second output row if the + * application provides just a one-row buffer; we also use the spare + * to discard the dummy last row if the image height is odd. + */ + JSAMPROW spare_row; + wxjpeg_boolean spare_full; /* T if spare buffer is occupied */ + + JDIMENSION out_row_width; /* samples per output row */ + JDIMENSION rows_to_go; /* counts rows remaining in image */ +} my_upsampler; + +typedef my_upsampler * my_upsample_ptr; + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define ONE_HALF ((JPEG_INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((JPEG_INT32) ((x) * (1L<RGB colorspace conversion. + * This is taken directly from jdcolor.c; see that file for more info. + */ + +LOCAL(void) +build_ycc_rgb_table (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int i; + JPEG_INT32 x; + SHIFT_TEMPS + + upsample->Cr_r_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + upsample->Cb_b_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + upsample->Cr_g_tab = (JPEG_INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(JPEG_INT32)); + upsample->Cb_g_tab = (JPEG_INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(JPEG_INT32)); + + for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { + /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ + /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ + /* Cr=>R value is nearest int to 1.40200 * x */ + upsample->Cr_r_tab[i] = (int) + RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS); + /* Cb=>B value is nearest int to 1.77200 * x */ + upsample->Cb_b_tab[i] = (int) + RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS); + /* Cr=>G value is scaled-up -0.71414 * x */ + upsample->Cr_g_tab[i] = (- FIX(0.71414)) * x; + /* Cb=>G value is scaled-up -0.34414 * x */ + /* We also add in ONE_HALF so that need not do it in inner loop */ + upsample->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF; + } +} + + +/* + * Initialize for an upsampling pass. + */ + +METHODDEF(void) +start_pass_merged_upsample (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Mark the spare buffer empty */ + upsample->spare_full = FALSE; + /* Initialize total-height counter for detecting bottom of image */ + upsample->rows_to_go = cinfo->output_height; +} + + +/* + * Control routine to do upsampling (and color conversion). + * + * The control routine just handles the row buffering considerations. + */ + +METHODDEF(void) +merged_2v_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +/* 2:1 vertical sampling case: may need a spare row. */ +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + JSAMPROW work_ptrs[2]; + JDIMENSION num_rows; /* number of rows returned to caller */ + + if (upsample->spare_full) { + /* If we have a spare row saved from a previous cycle, just return it. */ + jcopy_sample_rows(& upsample->spare_row, 0, output_buf + *out_row_ctr, 0, + 1, upsample->out_row_width); + num_rows = 1; + upsample->spare_full = FALSE; + } else { + /* Figure number of rows to return to caller. */ + num_rows = 2; + /* Not more than the distance to the end of the image. */ + if (num_rows > upsample->rows_to_go) + num_rows = upsample->rows_to_go; + /* And not more than what the client can accept: */ + out_rows_avail -= *out_row_ctr; + if (num_rows > out_rows_avail) + num_rows = out_rows_avail; + /* Create output pointer array for upsampler. */ + work_ptrs[0] = output_buf[*out_row_ctr]; + if (num_rows > 1) { + work_ptrs[1] = output_buf[*out_row_ctr + 1]; + } else { + work_ptrs[1] = upsample->spare_row; + upsample->spare_full = TRUE; + } + /* Now do the upsampling. */ + (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, work_ptrs); + } + + /* Adjust counts */ + *out_row_ctr += num_rows; + upsample->rows_to_go -= num_rows; + /* When the buffer is emptied, declare this input row group consumed */ + if (! upsample->spare_full) + (*in_row_group_ctr)++; +} + + +METHODDEF(void) +merged_1v_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +/* 1:1 vertical sampling case: much easier, never need a spare row. */ +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Just do the upsampling. */ + (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, + output_buf + *out_row_ctr); + /* Adjust counts */ + (*out_row_ctr)++; + (*in_row_group_ctr)++; +} + + +/* + * These are the routines invoked by the control routines to do + * the actual upsampling/conversion. One row group is processed per call. + * + * Note: since we may be writing directly into application-supplied buffers, + * we have to be honest about the output width; we can't assume the buffer + * has been rounded up to an even width. + */ + + +/* + * Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. + */ + +METHODDEF(void) +h2v1_merged_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + register int y, cred, cgreen, cblue; + int cb, cr; + register JSAMPROW outptr; + JSAMPROW inptr0, inptr1, inptr2; + JDIMENSION col; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + int * Crrtab = upsample->Cr_r_tab; + int * Cbbtab = upsample->Cb_b_tab; + JPEG_INT32 * Crgtab = upsample->Cr_g_tab; + JPEG_INT32 * Cbgtab = upsample->Cb_g_tab; + SHIFT_TEMPS + + inptr0 = input_buf[0][in_row_group_ctr]; + inptr1 = input_buf[1][in_row_group_ctr]; + inptr2 = input_buf[2][in_row_group_ctr]; + outptr = output_buf[0]; + /* Loop for each pair of output pixels */ + for (col = cinfo->output_width >> 1; col > 0; col--) { + /* Do the chroma part of the calculation */ + cb = GETJSAMPLE(*inptr1++); + cr = GETJSAMPLE(*inptr2++); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + /* Fetch 2 Y values and emit 2 pixels */ + y = GETJSAMPLE(*inptr0++); + outptr[RGB_RED] = range_limit[y + cred]; + outptr[RGB_GREEN] = range_limit[y + cgreen]; + outptr[RGB_BLUE] = range_limit[y + cblue]; + outptr += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr0++); + outptr[RGB_RED] = range_limit[y + cred]; + outptr[RGB_GREEN] = range_limit[y + cgreen]; + outptr[RGB_BLUE] = range_limit[y + cblue]; + outptr += RGB_PIXELSIZE; + } + /* If image width is odd, do the last output column separately */ + if (cinfo->output_width & 1) { + cb = GETJSAMPLE(*inptr1); + cr = GETJSAMPLE(*inptr2); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + y = GETJSAMPLE(*inptr0); + outptr[RGB_RED] = range_limit[y + cred]; + outptr[RGB_GREEN] = range_limit[y + cgreen]; + outptr[RGB_BLUE] = range_limit[y + cblue]; + } +} + +/* + * Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical. + */ + +METHODDEF(void) +h2v2_merged_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + register int y, cred, cgreen, cblue; + int cb, cr; + register JSAMPROW outptr0, outptr1; + JSAMPROW inptr00, inptr01, inptr1, inptr2; + JDIMENSION col; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + int * Crrtab = upsample->Cr_r_tab; + int * Cbbtab = upsample->Cb_b_tab; + JPEG_INT32 * Crgtab = upsample->Cr_g_tab; + JPEG_INT32 * Cbgtab = upsample->Cb_g_tab; + SHIFT_TEMPS + + inptr00 = input_buf[0][in_row_group_ctr*2]; + inptr01 = input_buf[0][in_row_group_ctr*2 + 1]; + inptr1 = input_buf[1][in_row_group_ctr]; + inptr2 = input_buf[2][in_row_group_ctr]; + outptr0 = output_buf[0]; + outptr1 = output_buf[1]; + /* Loop for each group of output pixels */ + for (col = cinfo->output_width >> 1; col > 0; col--) { + /* Do the chroma part of the calculation */ + cb = GETJSAMPLE(*inptr1++); + cr = GETJSAMPLE(*inptr2++); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + /* Fetch 4 Y values and emit 4 pixels */ + y = GETJSAMPLE(*inptr00++); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + outptr0 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr00++); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + outptr0 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr01++); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + outptr1 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr01++); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + outptr1 += RGB_PIXELSIZE; + } + /* If image width is odd, do the last output column separately */ + if (cinfo->output_width & 1) { + cb = GETJSAMPLE(*inptr1); + cr = GETJSAMPLE(*inptr2); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + y = GETJSAMPLE(*inptr00); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + y = GETJSAMPLE(*inptr01); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + } +} + + +/* + * Module initialization routine for merged upsampling/color conversion. + * + * NB: this is called under the conditions determined by use_merged_upsample() + * in jdmaster.c. That routine MUST correspond to the actual capabilities + * of this module; no safety checks are made here. + */ + +GLOBAL(void) +jinit_merged_upsampler (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample; + + upsample = (my_upsample_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_upsampler)); + cinfo->upsample = (struct jpeg_upsampler *) upsample; + upsample->pub.start_pass = start_pass_merged_upsample; + upsample->pub.need_context_rows = FALSE; + + upsample->out_row_width = cinfo->output_width * cinfo->out_color_components; + + if (cinfo->max_v_samp_factor == 2) { + upsample->pub.upsample = merged_2v_upsample; + upsample->upmethod = h2v2_merged_upsample; + /* Allocate a spare row buffer */ + upsample->spare_row = (JSAMPROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (size_t) (upsample->out_row_width * SIZEOF(JSAMPLE))); + } else { + upsample->pub.upsample = merged_1v_upsample; + upsample->upmethod = h2v1_merged_upsample; + /* No spare row needed */ + upsample->spare_row = NULL; + } + + build_ycc_rgb_table(cinfo); +} + +#endif /* UPSAMPLE_MERGING_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdphuff.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdphuff.c new file mode 100644 index 0000000000..96b4364e45 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdphuff.c @@ -0,0 +1,668 @@ +/* + * jdphuff.c + * + * Copyright (C) 1995-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy decoding routines for progressive JPEG. + * + * Much of the complexity here has to do with supporting input suspension. + * If the data source module demands suspension, we want to be able to back + * up to the start of the current MCU. To do this, we copy state variables + * into local working storage, and update them back to the permanent + * storage only upon successful completion of an MCU. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdhuff.h" /* Declarations shared with jdhuff.c */ + + +#ifdef D_PROGRESSIVE_SUPPORTED + +/* + * Expanded entropy decoder object for progressive Huffman decoding. + * + * The savable_state subrecord contains fields that change within an MCU, + * but must not be updated permanently until we complete the MCU. + */ + +typedef struct { + unsigned int EOBRUN; /* remaining EOBs in EOBRUN */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ +} savable_state; + +/* This macro is to work around compilers with missing or broken + * structure assignment. You'll need to fix this code if you have + * such a compiler and you change MAX_COMPS_IN_SCAN. + */ + +#ifndef NO_STRUCT_ASSIGN +#define ASSIGN_STATE(dest,src) ((dest) = (src)) +#else +#if MAX_COMPS_IN_SCAN == 4 +#define ASSIGN_STATE(dest,src) \ + ((dest).EOBRUN = (src).EOBRUN, \ + (dest).last_dc_val[0] = (src).last_dc_val[0], \ + (dest).last_dc_val[1] = (src).last_dc_val[1], \ + (dest).last_dc_val[2] = (src).last_dc_val[2], \ + (dest).last_dc_val[3] = (src).last_dc_val[3]) +#endif +#endif + + +typedef struct { + struct jpeg_entropy_decoder pub; /* public fields */ + + /* These fields are loaded into local variables at start of each MCU. + * In case of suspension, we exit WITHOUT updating them. + */ + bitread_perm_state bitstate; /* Bit buffer at start of MCU */ + savable_state saved; /* Other state at start of MCU */ + + /* These fields are NOT loaded into local working state. */ + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + d_derived_tbl * derived_tbls[NUM_HUFF_TBLS]; + + d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */ +} phuff_entropy_decoder; + +typedef phuff_entropy_decoder * phuff_entropy_ptr; + +/* Forward declarations */ +METHODDEF(wxjpeg_boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(wxjpeg_boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(wxjpeg_boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(wxjpeg_boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); + + +/* + * Initialize for a Huffman-compressed scan. + */ + +METHODDEF(void) +start_pass_phuff_decoder (j_decompress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + wxjpeg_boolean is_DC_band, bad; + int ci, coefi, tbl; + int *coef_bit_ptr; + jpeg_component_info * compptr; + + is_DC_band = (cinfo->Ss == 0); + + /* Validate scan parameters */ + bad = FALSE; + if (is_DC_band) { + if (cinfo->Se != 0) + bad = TRUE; + } else { + /* need not check Ss/Se < 0 since they came from unsigned bytes */ + if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2) + bad = TRUE; + /* AC scans may have only one component */ + if (cinfo->comps_in_scan != 1) + bad = TRUE; + } + if (cinfo->Ah != 0) { + /* Successive approximation refinement scan: must have Al = Ah-1. */ + if (cinfo->Al != cinfo->Ah-1) + bad = TRUE; + } + if (cinfo->Al > 13) /* need not check for < 0 */ + bad = TRUE; + /* Arguably the maximum Al value should be less than 13 for 8-bit precision, + * but the spec doesn't say so, and we try to be liberal about what we + * accept. Note: large Al values could result in out-of-range DC + * coefficients during early scans, leading to bizarre displays due to + * overflows in the IDCT math. But we won't crash. + */ + if (bad) + ERREXIT4(cinfo, JERR_BAD_PROGRESSION, + cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); + /* Update progression status, and verify that scan order is legal. + * Note that inter-scan inconsistencies are treated as warnings + * not fatal errors ... not clear if this is right way to behave. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + int cindex = cinfo->cur_comp_info[ci]->component_index; + coef_bit_ptr = & cinfo->coef_bits[cindex][0]; + if (!is_DC_band && coef_bit_ptr[0] < 0) /* AC without prior DC scan */ + WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0); + for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) { + int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi]; + if (cinfo->Ah != expected) + WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi); + coef_bit_ptr[coefi] = cinfo->Al; + } + } + + /* Select MCU decoding routine */ + if (cinfo->Ah == 0) { + if (is_DC_band) + entropy->pub.decode_mcu = decode_mcu_DC_first; + else + entropy->pub.decode_mcu = decode_mcu_AC_first; + } else { + if (is_DC_band) + entropy->pub.decode_mcu = decode_mcu_DC_refine; + else + entropy->pub.decode_mcu = decode_mcu_AC_refine; + } + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Make sure requested tables are present, and compute derived tables. + * We may build same derived table more than once, but it's not expensive. + */ + if (is_DC_band) { + if (cinfo->Ah == 0) { /* DC refinement needs no table */ + tbl = compptr->dc_tbl_no; + jpeg_make_d_derived_tbl(cinfo, TRUE, tbl, + & entropy->derived_tbls[tbl]); + } + } else { + tbl = compptr->ac_tbl_no; + jpeg_make_d_derived_tbl(cinfo, FALSE, tbl, + & entropy->derived_tbls[tbl]); + /* remember the single active table */ + entropy->ac_derived_tbl = entropy->derived_tbls[tbl]; + } + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + + /* Initialize bitread state variables */ + entropy->bitstate.bits_left = 0; + entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */ + entropy->pub.insufficient_data = FALSE; + + /* Initialize private state variables */ + entropy->saved.EOBRUN = 0; + + /* Initialize restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; +} + + +/* + * Figure F.12: extend sign bit. + * On some machines, a shift and add will be faster than a table lookup. + */ + +#ifdef AVOID_TABLES + +#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x)) + +#else + +#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x)) + +static const int extend_test[16] = /* entry n is 2**(n-1) */ + { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, + 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; + +static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ + { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, + ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, + ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, + ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 }; + +#endif /* AVOID_TABLES */ + + +/* + * Check for a restart marker & resynchronize decoder. + * Returns FALSE if must suspend. + */ + +LOCAL(wxjpeg_boolean) +process_restart (j_decompress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int ci; + + /* Throw away any unused bits remaining in bit buffer; */ + /* include any full bytes in next_marker's count of discarded bytes */ + cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8; + entropy->bitstate.bits_left = 0; + + /* Advance past the RSTn marker */ + if (! (*cinfo->marker->read_restart_marker) (cinfo)) + return FALSE; + + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + /* Re-init EOB run count, too */ + entropy->saved.EOBRUN = 0; + + /* Reset restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; + + /* Reset out-of-data flag, unless read_restart_marker left us smack up + * against a marker. In that case we will end up treating the next data + * segment as empty, and we can avoid producing bogus output pixels by + * leaving the flag set. + */ + if (cinfo->unread_marker == 0) + entropy->pub.insufficient_data = FALSE; + + return TRUE; +} + + +/* + * Huffman MCU decoding. + * Each of these routines decodes and returns one MCU's worth of + * Huffman-compressed coefficients. + * The coefficients are reordered from zigzag order into natural array order, + * but are not dequantized. + * + * The i'th block of the MCU is stored into the block pointed to by + * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER. + * + * We return FALSE if data source requested suspension. In that case no + * changes have been made to permanent state. (Exception: some output + * coefficients may already have been assigned. This is harmless for + * spectral selection, since we'll just re-assign them on the next call. + * Successive approximation AC refinement has to be more careful, however.) + */ + +/* + * MCU decoding for DC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(wxjpeg_boolean) +decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int Al = cinfo->Al; + register int s, r; + int blkn, ci; + JBLOCKROW block; + BITREAD_STATE_VARS; + savable_state state; + d_derived_tbl * tbl; + jpeg_component_info * compptr; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, just leave the MCU set to zeroes. + * This way, we return uniform gray for the remainder of the segment. + */ + if (! entropy->pub.insufficient_data) { + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(state, entropy->saved); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + tbl = entropy->derived_tbls[compptr->dc_tbl_no]; + + /* Decode a single block's worth of coefficients */ + + /* Section F.2.2.1: decode the DC coefficient difference */ + HUFF_DECODE(s, br_state, tbl, return FALSE, label1); + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + } + + /* Convert DC difference to actual value, update last_dc_val */ + s += state.last_dc_val[ci]; + state.last_dc_val[ci] = s; + /* Scale and output the coefficient (assumes jpeg_natural_order[0]=0) */ + (*block)[0] = (JCOEF) (s << Al); + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(entropy->saved, state); + } + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for AC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(wxjpeg_boolean) +decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int Se = cinfo->Se; + int Al = cinfo->Al; + register int s, k, r; + unsigned int EOBRUN; + JBLOCKROW block; + BITREAD_STATE_VARS; + d_derived_tbl * tbl; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, just leave the MCU set to zeroes. + * This way, we return uniform gray for the remainder of the segment. + */ + if (! entropy->pub.insufficient_data) { + + /* Load up working state. + * We can avoid loading/saving bitread state if in an EOB run. + */ + EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */ + + /* There is always only one block per MCU */ + + if (EOBRUN > 0) /* if it's a band of zeroes... */ + EOBRUN--; /* ...process it now (we do nothing) */ + else { + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + block = MCU_data[0]; + tbl = entropy->ac_derived_tbl; + + for (k = cinfo->Ss; k <= Se; k++) { + HUFF_DECODE(s, br_state, tbl, return FALSE, label2); + r = s >> 4; + s &= 15; + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + /* Scale and output coefficient in natural (dezigzagged) order */ + (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al); + } else { + if (r == 15) { /* ZRL */ + k += 15; /* skip 15 zeroes in band */ + } else { /* EOBr, run length is 2^r + appended bits */ + EOBRUN = 1 << r; + if (r) { /* EOBr, r > 0 */ + CHECK_BIT_BUFFER(br_state, r, return FALSE); + r = GET_BITS(r); + EOBRUN += r; + } + EOBRUN--; /* this band is processed at this moment */ + break; /* force end-of-band */ + } + } + } + + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + } + + /* Completed MCU, so update state */ + entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */ + } + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for DC successive approximation refinement scan. + * Note: we assume such scans can be multi-component, although the spec + * is not very clear on the point. + */ + +METHODDEF(wxjpeg_boolean) +decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + int blkn; + JBLOCKROW block; + BITREAD_STATE_VARS; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* Not worth the cycles to check insufficient_data here, + * since we will not change the data anyway if we read zeroes. + */ + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + + /* Encoded data is simply the next bit of the two's-complement DC value */ + CHECK_BIT_BUFFER(br_state, 1, return FALSE); + if (GET_BITS(1)) + (*block)[0] |= p1; + /* Note: since we use |=, repeating the assignment later is safe */ + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for AC successive approximation refinement scan. + */ + +METHODDEF(wxjpeg_boolean) +decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int Se = cinfo->Se; + int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */ + register int s, k, r; + unsigned int EOBRUN; + JBLOCKROW block; + JCOEFPTR thiscoef; + BITREAD_STATE_VARS; + d_derived_tbl * tbl; + int num_newnz; + int newnz_pos[DCTSIZE2]; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, don't modify the MCU. + */ + if (! entropy->pub.insufficient_data) { + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */ + + /* There is always only one block per MCU */ + block = MCU_data[0]; + tbl = entropy->ac_derived_tbl; + + /* If we are forced to suspend, we must undo the assignments to any newly + * nonzero coefficients in the block, because otherwise we'd get confused + * next time about which coefficients were already nonzero. + * But we need not undo addition of bits to already-nonzero coefficients; + * instead, we can test the current bit to see if we already did it. + */ + num_newnz = 0; + + /* initialize coefficient loop counter to start of band */ + k = cinfo->Ss; + + if (EOBRUN == 0) { + for (; k <= Se; k++) { + HUFF_DECODE(s, br_state, tbl, goto undoit, label3); + r = s >> 4; + s &= 15; + if (s) { + if (s != 1) /* size of new coef should always be 1 */ + WARNMS(cinfo, JWRN_HUFF_BAD_CODE); + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) + s = p1; /* newly nonzero coef is positive */ + else + s = m1; /* newly nonzero coef is negative */ + } else { + if (r != 15) { + EOBRUN = 1 << r; /* EOBr, run length is 2^r + appended bits */ + if (r) { + CHECK_BIT_BUFFER(br_state, r, goto undoit); + r = GET_BITS(r); + EOBRUN += r; + } + break; /* rest of block is handled by EOB logic */ + } + /* note s = 0 for processing ZRL */ + } + /* Advance over already-nonzero coefs and r still-zero coefs, + * appending correction bits to the nonzeroes. A correction bit is 1 + * if the absolute value of the coefficient must be increased. + */ + do { + thiscoef = *block + jpeg_natural_order[k]; + if (*thiscoef != 0) { + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) { + if ((*thiscoef & p1) == 0) { /* do nothing if already set it */ + if (*thiscoef >= 0) + *thiscoef += p1; + else + *thiscoef += m1; + } + } + } else { + if (--r < 0) + break; /* reached target zero coefficient */ + } + k++; + } while (k <= Se); + if (s) { + int pos = jpeg_natural_order[k]; + /* Output newly nonzero coefficient */ + (*block)[pos] = (JCOEF) s; + /* Remember its position in case we have to suspend */ + newnz_pos[num_newnz++] = pos; + } + } + } + + if (EOBRUN > 0) { + /* Scan any remaining coefficient positions after the end-of-band + * (the last newly nonzero coefficient, if any). Append a correction + * bit to each already-nonzero coefficient. A correction bit is 1 + * if the absolute value of the coefficient must be increased. + */ + for (; k <= Se; k++) { + thiscoef = *block + jpeg_natural_order[k]; + if (*thiscoef != 0) { + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) { + if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */ + if (*thiscoef >= 0) + *thiscoef += p1; + else + *thiscoef += m1; + } + } + } + } + /* Count one block completed in EOB run */ + EOBRUN--; + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */ + } + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; + +undoit: + /* Re-zero any output coefficients that we made newly nonzero */ + while (num_newnz > 0) + (*block)[newnz_pos[--num_newnz]] = 0; + + return FALSE; +} + + +/* + * Module initialization routine for progressive Huffman entropy decoding. + */ + +GLOBAL(void) +jinit_phuff_decoder (j_decompress_ptr cinfo) +{ + phuff_entropy_ptr entropy; + int *coef_bit_ptr; + int ci, i; + + entropy = (phuff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(phuff_entropy_decoder)); + cinfo->entropy = (struct jpeg_entropy_decoder *) entropy; + entropy->pub.start_pass = start_pass_phuff_decoder; + + /* Mark derived tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->derived_tbls[i] = NULL; + } + + /* Create progression status table */ + cinfo->coef_bits = (int (*)[DCTSIZE2]) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components*DCTSIZE2*SIZEOF(int)); + coef_bit_ptr = & cinfo->coef_bits[0][0]; + for (ci = 0; ci < cinfo->num_components; ci++) + for (i = 0; i < DCTSIZE2; i++) + *coef_bit_ptr++ = -1; +} + +#endif /* D_PROGRESSIVE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdpostct.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdpostct.c new file mode 100644 index 0000000000..e6bcd4a9c3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdpostct.c @@ -0,0 +1,290 @@ +/* + * jdpostct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the decompression postprocessing controller. + * This controller manages the upsampling, color conversion, and color + * quantization/reduction steps; specifically, it controls the buffering + * between upsample/color conversion and color quantization/reduction. + * + * If no color quantization/reduction is required, then this module has no + * work to do, and it just hands off to the upsample/color conversion code. + * An integrated upsample/convert/quantize process would replace this module + * entirely. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_post_controller pub; /* public fields */ + + /* Color quantization source buffer: this holds output data from + * the upsample/color conversion step to be passed to the quantizer. + * For two-pass color quantization, we need a full-image buffer; + * for one-pass operation, a strip buffer is sufficient. + */ + jvirt_sarray_ptr whole_image; /* virtual array, or NULL if one-pass */ + JSAMPARRAY buffer; /* strip buffer, or current strip of virtual */ + JDIMENSION strip_height; /* buffer size in rows */ + /* for two-pass mode only: */ + JDIMENSION starting_row; /* row # of first row in current strip */ + JDIMENSION next_row; /* index of next row to fill/empty in strip */ +} my_post_controller; + +typedef my_post_controller * my_post_ptr; + + +/* Forward declarations */ +METHODDEF(void) post_process_1pass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +#ifdef QUANT_2PASS_SUPPORTED +METHODDEF(void) post_process_prepass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +METHODDEF(void) post_process_2pass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +#endif + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (cinfo->quantize_colors) { + /* Single-pass processing with color quantization. */ + post->pub.post_process_data = post_process_1pass; + /* We could be doing buffered-image output before starting a 2-pass + * color quantization; in that case, jinit_d_post_controller did not + * allocate a strip buffer. Use the virtual-array buffer as workspace. + */ + if (post->buffer == NULL) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + (JDIMENSION) 0, post->strip_height, TRUE); + } + } else { + /* For single-pass processing without color quantization, + * I have no work to do; just call the upsampler directly. + */ + post->pub.post_process_data = cinfo->upsample->upsample; + } + break; +#ifdef QUANT_2PASS_SUPPORTED + case JBUF_SAVE_AND_PASS: + /* First pass of 2-pass quantization */ + if (post->whole_image == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + post->pub.post_process_data = post_process_prepass; + break; + case JBUF_CRANK_DEST: + /* Second pass of 2-pass quantization */ + if (post->whole_image == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + post->pub.post_process_data = post_process_2pass; + break; +#endif /* QUANT_2PASS_SUPPORTED */ + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } + post->starting_row = post->next_row = 0; +} + + +/* + * Process some data in the one-pass (strip buffer) case. + * This is used for color precision reduction as well as one-pass quantization. + */ + +METHODDEF(void) +post_process_1pass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION num_rows, max_rows; + + /* Fill the buffer, but not more than what we can dump out in one go. */ + /* Note we rely on the upsampler to detect bottom of image. */ + max_rows = out_rows_avail - *out_row_ctr; + if (max_rows > post->strip_height) + max_rows = post->strip_height; + num_rows = 0; + (*cinfo->upsample->upsample) (cinfo, + input_buf, in_row_group_ctr, in_row_groups_avail, + post->buffer, &num_rows, max_rows); + /* Quantize and emit data. */ + (*cinfo->cquantize->color_quantize) (cinfo, + post->buffer, output_buf + *out_row_ctr, (int) num_rows); + *out_row_ctr += num_rows; +} + + +#ifdef QUANT_2PASS_SUPPORTED + +/* + * Process some data in the first pass of 2-pass quantization. + */ + +METHODDEF(void) +post_process_prepass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION old_next_row, num_rows; + + /* Reposition virtual buffer if at start of strip. */ + if (post->next_row == 0) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + post->starting_row, post->strip_height, TRUE); + } + + /* Upsample some data (up to a strip height's worth). */ + old_next_row = post->next_row; + (*cinfo->upsample->upsample) (cinfo, + input_buf, in_row_group_ctr, in_row_groups_avail, + post->buffer, &post->next_row, post->strip_height); + + /* Allow quantizer to scan new data. No data is emitted, */ + /* but we advance out_row_ctr so outer loop can tell when we're done. */ + if (post->next_row > old_next_row) { + num_rows = post->next_row - old_next_row; + (*cinfo->cquantize->color_quantize) (cinfo, post->buffer + old_next_row, + (JSAMPARRAY) NULL, (int) num_rows); + *out_row_ctr += num_rows; + } + + /* Advance if we filled the strip. */ + if (post->next_row >= post->strip_height) { + post->starting_row += post->strip_height; + post->next_row = 0; + } +} + + +/* + * Process some data in the second pass of 2-pass quantization. + */ + +METHODDEF(void) +post_process_2pass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION num_rows, max_rows; + + /* Reposition virtual buffer if at start of strip. */ + if (post->next_row == 0) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + post->starting_row, post->strip_height, FALSE); + } + + /* Determine number of rows to emit. */ + num_rows = post->strip_height - post->next_row; /* available in strip */ + max_rows = out_rows_avail - *out_row_ctr; /* available in output area */ + if (num_rows > max_rows) + num_rows = max_rows; + /* We have to check bottom of image here, can't depend on upsampler. */ + max_rows = cinfo->output_height - post->starting_row; + if (num_rows > max_rows) + num_rows = max_rows; + + /* Quantize and emit data. */ + (*cinfo->cquantize->color_quantize) (cinfo, + post->buffer + post->next_row, output_buf + *out_row_ctr, + (int) num_rows); + *out_row_ctr += num_rows; + + /* Advance if we filled the strip. */ + post->next_row += num_rows; + if (post->next_row >= post->strip_height) { + post->starting_row += post->strip_height; + post->next_row = 0; + } +} + +#endif /* QUANT_2PASS_SUPPORTED */ + + +/* + * Initialize postprocessing controller. + */ + +GLOBAL(void) +jinit_d_post_controller (j_decompress_ptr cinfo, wxjpeg_boolean need_full_buffer) +{ + my_post_ptr post; + + post = (my_post_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_post_controller)); + cinfo->post = (struct jpeg_d_post_controller *) post; + post->pub.start_pass = start_pass_dpost; + post->whole_image = NULL; /* flag for no virtual arrays */ + post->buffer = NULL; /* flag for no strip buffer */ + + /* Create the quantization buffer, if needed */ + if (cinfo->quantize_colors) { + /* The buffer strip height is max_v_samp_factor, which is typically + * an efficient number of rows for upsampling to return. + * (In the presence of output rescaling, we might want to be smarter?) + */ + post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor; + if (need_full_buffer) { + /* Two-pass color quantization: need full-image storage. */ + /* We round up the number of rows to a multiple of the strip height. */ +#ifdef QUANT_2PASS_SUPPORTED + post->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + cinfo->output_width * cinfo->out_color_components, + (JDIMENSION) jround_up((long) cinfo->output_height, + (long) post->strip_height), + post->strip_height); +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif /* QUANT_2PASS_SUPPORTED */ + } else { + /* One-pass color quantization: just make a strip buffer. */ + post->buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->output_width * cinfo->out_color_components, + post->strip_height); + } + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdsample.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdsample.c new file mode 100644 index 0000000000..8c8fc1713c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdsample.c @@ -0,0 +1,478 @@ +/* + * jdsample.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains upsampling routines. + * + * Upsampling input data is counted in "row groups". A row group + * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size) + * sample rows of each component. Upsampling will normally produce + * max_v_samp_factor pixel rows from each row group (but this could vary + * if the upsampler is applying a scale factor of its own). + * + * An excellent reference for image resampling is + * Digital Image Warping, George Wolberg, 1990. + * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Pointer to routine to upsample a single component */ +typedef JMETHOD(void, upsample1_ptr, + (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); + +/* Private subobject */ + +typedef struct { + struct jpeg_upsampler pub; /* public fields */ + + /* Color conversion buffer. When using separate upsampling and color + * conversion steps, this buffer holds one upsampled row group until it + * has been color converted and output. + * Note: we do not allocate any storage for component(s) which are full-size, + * ie do not need rescaling. The corresponding entry of color_buf[] is + * simply set to point to the input data array, thereby avoiding copying. + */ + JSAMPARRAY color_buf[MAX_COMPONENTS]; + + /* Per-component upsampling method pointers */ + upsample1_ptr methods[MAX_COMPONENTS]; + + int next_row_out; /* counts rows emitted from color_buf */ + JDIMENSION rows_to_go; /* counts rows remaining in image */ + + /* Height of an input row group for each component. */ + int rowgroup_height[MAX_COMPONENTS]; + + /* These arrays save pixel expansion factors so that int_expand need not + * recompute them each time. They are unused for other upsampling methods. + */ + UINT8 h_expand[MAX_COMPONENTS]; + UINT8 v_expand[MAX_COMPONENTS]; +} my_upsampler; + +typedef my_upsampler * my_upsample_ptr; + + +/* + * Initialize for an upsampling pass. + */ + +METHODDEF(void) +start_pass_upsample (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Mark the conversion buffer empty */ + upsample->next_row_out = cinfo->max_v_samp_factor; + /* Initialize total-height counter for detecting bottom of image */ + upsample->rows_to_go = cinfo->output_height; +} + + +/* + * Control routine to do upsampling (and color conversion). + * + * In this version we upsample each component independently. + * We upsample one row group into the conversion buffer, then apply + * color conversion a row at a time. + */ + +METHODDEF(void) +sep_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int ci; + jpeg_component_info * compptr; + JDIMENSION num_rows; + + /* Fill the conversion buffer, if it's empty */ + if (upsample->next_row_out >= cinfo->max_v_samp_factor) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Invoke per-component upsample method. Notice we pass a POINTER + * to color_buf[ci], so that fullsize_upsample can change it. + */ + (*upsample->methods[ci]) (cinfo, compptr, + input_buf[ci] + (*in_row_group_ctr * upsample->rowgroup_height[ci]), + upsample->color_buf + ci); + } + upsample->next_row_out = 0; + } + + /* Color-convert and emit rows */ + + /* How many we have in the buffer: */ + num_rows = (JDIMENSION) (cinfo->max_v_samp_factor - upsample->next_row_out); + /* Not more than the distance to the end of the image. Need this test + * in case the image height is not a multiple of max_v_samp_factor: + */ + if (num_rows > upsample->rows_to_go) + num_rows = upsample->rows_to_go; + /* And not more than what the client can accept: */ + out_rows_avail -= *out_row_ctr; + if (num_rows > out_rows_avail) + num_rows = out_rows_avail; + + (*cinfo->cconvert->color_convert) (cinfo, upsample->color_buf, + (JDIMENSION) upsample->next_row_out, + output_buf + *out_row_ctr, + (int) num_rows); + + /* Adjust counts */ + *out_row_ctr += num_rows; + upsample->rows_to_go -= num_rows; + upsample->next_row_out += num_rows; + /* When the buffer is emptied, declare this input row group consumed */ + if (upsample->next_row_out >= cinfo->max_v_samp_factor) + (*in_row_group_ctr)++; +} + + +/* + * These are the routines invoked by sep_upsample to upsample pixel values + * of a single component. One row group is processed per call. + */ + + +/* + * For full-size components, we just make color_buf[ci] point at the + * input buffer, and thus avoid copying any data. Note that this is + * safe only because sep_upsample doesn't declare the input row group + * "consumed" until we are done color converting and emitting it. + */ + +METHODDEF(void) +fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + *output_data_ptr = input_data; +} + + +/* + * This is a no-op version used for "uninteresting" components. + * These components will not be referenced by color conversion. + */ + +METHODDEF(void) +noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + *output_data_ptr = NULL; /* safety check */ +} + + +/* + * This version handles any integral sampling ratios. + * This is not used for typical JPEG files, so it need not be fast. + * Nor, for that matter, is it particularly accurate: the algorithm is + * simple replication of the input pixel onto the corresponding output + * pixels. The hi-falutin sampling literature refers to this as a + * "box filter". A box filter tends to introduce visible artifacts, + * so if you are actually going to use 3:1 or 4:1 sampling ratios + * you would be well advised to improve this code. + */ + +METHODDEF(void) +int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + register int h; + JSAMPROW outend; + int h_expand, v_expand; + int inrow, outrow; + + h_expand = upsample->h_expand[compptr->component_index]; + v_expand = upsample->v_expand[compptr->component_index]; + + inrow = outrow = 0; + while (outrow < cinfo->max_v_samp_factor) { + /* Generate one output row with proper horizontal expansion */ + inptr = input_data[inrow]; + outptr = output_data[outrow]; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + for (h = h_expand; h > 0; h--) { + *outptr++ = invalue; + } + } + /* Generate any additional output rows by duplicating the first one */ + if (v_expand > 1) { + jcopy_sample_rows(output_data, outrow, output_data, outrow+1, + v_expand-1, cinfo->output_width); + } + inrow++; + outrow += v_expand; + } +} + + +/* + * Fast processing for the common case of 2:1 horizontal and 1:1 vertical. + * It's still a box filter. + */ + +METHODDEF(void) +h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + JSAMPROW outend; + int inrow; + + for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { + inptr = input_data[inrow]; + outptr = output_data[inrow]; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + *outptr++ = invalue; + *outptr++ = invalue; + } + } +} + + +/* + * Fast processing for the common case of 2:1 horizontal and 2:1 vertical. + * It's still a box filter. + */ + +METHODDEF(void) +h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + JSAMPROW outend; + int inrow, outrow; + + inrow = outrow = 0; + while (outrow < cinfo->max_v_samp_factor) { + inptr = input_data[inrow]; + outptr = output_data[outrow]; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + *outptr++ = invalue; + *outptr++ = invalue; + } + jcopy_sample_rows(output_data, outrow, output_data, outrow+1, + 1, cinfo->output_width); + inrow++; + outrow += 2; + } +} + + +/* + * Fancy processing for the common case of 2:1 horizontal and 1:1 vertical. + * + * The upsampling algorithm is linear interpolation between pixel centers, + * also known as a "triangle filter". This is a good compromise between + * speed and visual quality. The centers of the output pixels are 1/4 and 3/4 + * of the way between input pixel centers. + * + * A note about the "bias" calculations: when rounding fractional values to + * integer, we do not want to always round 0.5 up to the next integer. + * If we did that, we'd introduce a noticeable bias towards larger values. + * Instead, this code is arranged so that 0.5 will be rounded up or down at + * alternate pixel locations (a simple ordered dither pattern). + */ + +METHODDEF(void) +h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register int invalue; + register JDIMENSION colctr; + int inrow; + + for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { + inptr = input_data[inrow]; + outptr = output_data[inrow]; + /* Special case for first column */ + invalue = GETJSAMPLE(*inptr++); + *outptr++ = (JSAMPLE) invalue; + *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(*inptr) + 2) >> 2); + + for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) { + /* General case: 3/4 * nearer pixel + 1/4 * further pixel */ + invalue = GETJSAMPLE(*inptr++) * 3; + *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(inptr[-2]) + 1) >> 2); + *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(*inptr) + 2) >> 2); + } + + /* Special case for last column */ + invalue = GETJSAMPLE(*inptr); + *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(inptr[-1]) + 1) >> 2); + *outptr++ = (JSAMPLE) invalue; + } +} + + +/* + * Fancy processing for the common case of 2:1 horizontal and 2:1 vertical. + * Again a triangle filter; see comments for h2v1 case, above. + * + * It is OK for us to reference the adjacent input rows because we demanded + * context from the main buffer controller (see initialization code). + */ + +METHODDEF(void) +h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr0, inptr1, outptr; +#if BITS_IN_JSAMPLE == 8 + register int thiscolsum, lastcolsum, nextcolsum; +#else + register JPEG_INT32 thiscolsum, lastcolsum, nextcolsum; +#endif + register JDIMENSION colctr; + int inrow, outrow, v; + + inrow = outrow = 0; + while (outrow < cinfo->max_v_samp_factor) { + for (v = 0; v < 2; v++) { + /* inptr0 points to nearest input row, inptr1 points to next nearest */ + inptr0 = input_data[inrow]; + if (v == 0) /* next nearest is row above */ + inptr1 = input_data[inrow-1]; + else /* next nearest is row below */ + inptr1 = input_data[inrow+1]; + outptr = output_data[outrow++]; + + /* Special case for first column */ + thiscolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); + nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); + *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 8) >> 4); + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4); + lastcolsum = thiscolsum; thiscolsum = nextcolsum; + + for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) { + /* General case: 3/4 * nearer pixel + 1/4 * further pixel in each */ + /* dimension, thus 9/16, 3/16, 3/16, 1/16 overall */ + nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4); + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4); + lastcolsum = thiscolsum; thiscolsum = nextcolsum; + } + + /* Special case for last column */ + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4); + *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 7) >> 4); + } + inrow++; + } +} + + +/* + * Module initialization routine for upsampling. + */ + +GLOBAL(void) +jinit_upsampler (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample; + int ci; + jpeg_component_info * compptr; + wxjpeg_boolean need_buffer, do_fancy; + int h_in_group, v_in_group, h_out_group, v_out_group; + + upsample = (my_upsample_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_upsampler)); + cinfo->upsample = (struct jpeg_upsampler *) upsample; + upsample->pub.start_pass = start_pass_upsample; + upsample->pub.upsample = sep_upsample; + upsample->pub.need_context_rows = FALSE; /* until we find out differently */ + + if (cinfo->CCIR601_sampling) /* this isn't supported */ + ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); + + /* jdmainct.c doesn't support context rows when min_DCT_scaled_size = 1, + * so don't ask for it. + */ + do_fancy = cinfo->do_fancy_upsampling && cinfo->min_DCT_scaled_size > 1; + + /* Verify we can handle the sampling factors, select per-component methods, + * and create storage as needed. + */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Compute size of an "input group" after IDCT scaling. This many samples + * are to be converted to max_h_samp_factor * max_v_samp_factor pixels. + */ + h_in_group = (compptr->h_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; + v_in_group = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; + h_out_group = cinfo->max_h_samp_factor; + v_out_group = cinfo->max_v_samp_factor; + upsample->rowgroup_height[ci] = v_in_group; /* save for use later */ + need_buffer = TRUE; + if (! compptr->component_needed) { + /* Don't bother to upsample an uninteresting component. */ + upsample->methods[ci] = noop_upsample; + need_buffer = FALSE; + } else if (h_in_group == h_out_group && v_in_group == v_out_group) { + /* Fullsize components can be processed without any work. */ + upsample->methods[ci] = fullsize_upsample; + need_buffer = FALSE; + } else if (h_in_group * 2 == h_out_group && + v_in_group == v_out_group) { + /* Special cases for 2h1v upsampling */ + if (do_fancy && compptr->downsampled_width > 2) + upsample->methods[ci] = h2v1_fancy_upsample; + else + upsample->methods[ci] = h2v1_upsample; + } else if (h_in_group * 2 == h_out_group && + v_in_group * 2 == v_out_group) { + /* Special cases for 2h2v upsampling */ + if (do_fancy && compptr->downsampled_width > 2) { + upsample->methods[ci] = h2v2_fancy_upsample; + upsample->pub.need_context_rows = TRUE; + } else + upsample->methods[ci] = h2v2_upsample; + } else if ((h_out_group % h_in_group) == 0 && + (v_out_group % v_in_group) == 0) { + /* Generic integral-factors upsampling method */ + upsample->methods[ci] = int_upsample; + upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group); + upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group); + } else + ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); + if (need_buffer) { + upsample->color_buf[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) jround_up((long) cinfo->output_width, + (long) cinfo->max_h_samp_factor), + (JDIMENSION) cinfo->max_v_samp_factor); + } + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdtrans.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdtrans.c new file mode 100644 index 0000000000..d22388684f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jdtrans.c @@ -0,0 +1,143 @@ +/* + * jdtrans.c + * + * Copyright (C) 1995-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains library routines for transcoding decompression, + * that is, reading raw DCT coefficient arrays from an input JPEG file. + * The routines in jdapimin.c will also be needed by a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo)); + + +/* + * Read the coefficient arrays from a JPEG file. + * jpeg_read_header must be completed before calling this. + * + * The entire image is read into a set of virtual coefficient-block arrays, + * one per component. The return value is a pointer to the array of + * virtual-array descriptors. These can be manipulated directly via the + * JPEG memory manager, or handed off to jpeg_write_coefficients(). + * To release the memory occupied by the virtual arrays, call + * jpeg_finish_decompress() when done with the data. + * + * An alternative usage is to simply obtain access to the coefficient arrays + * during a buffered-image-mode decompression operation. This is allowed + * after any jpeg_finish_output() call. The arrays can be accessed until + * jpeg_finish_decompress() is called. (Note that any call to the library + * may reposition the arrays, so don't rely on access_virt_barray() results + * to stay valid across library calls.) + * + * Returns NULL if suspended. This case need be checked only if + * a suspending data source is used. + */ + +GLOBAL(jvirt_barray_ptr *) +jpeg_read_coefficients (j_decompress_ptr cinfo) +{ + if (cinfo->global_state == DSTATE_READY) { + /* First call: initialize active modules */ + transdecode_master_selection(cinfo); + cinfo->global_state = DSTATE_RDCOEFS; + } + if (cinfo->global_state == DSTATE_RDCOEFS) { + /* Absorb whole file into the coef buffer */ + for (;;) { + int retcode; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + /* Absorb some more input */ + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_SUSPENDED) + return NULL; + if (retcode == JPEG_REACHED_EOI) + break; + /* Advance progress counter if appropriate */ + if (cinfo->progress != NULL && + (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { + if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { + /* startup underestimated number of scans; ratchet up one scan */ + cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; + } + } + } + /* Set state so that jpeg_finish_decompress does the right thing */ + cinfo->global_state = DSTATE_STOPPING; + } + /* At this point we should be in state DSTATE_STOPPING if being used + * standalone, or in state DSTATE_BUFIMAGE if being invoked to get access + * to the coefficients during a full buffered-image-mode decompression. + */ + if ((cinfo->global_state == DSTATE_STOPPING || + cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) { + return cinfo->coef->coef_arrays; + } + /* Oops, improper usage */ + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + return NULL; /* keep compiler happy */ +} + + +/* + * Master selection of decompression modules for transcoding. + * This substitutes for jdmaster.c's initialization of the full decompressor. + */ + +LOCAL(void) +transdecode_master_selection (j_decompress_ptr cinfo) +{ + /* This is effectively a buffered-image operation. */ + cinfo->buffered_image = TRUE; + + /* Entropy decoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef D_PROGRESSIVE_SUPPORTED + jinit_phuff_decoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_decoder(cinfo); + } + + /* Always get a full-image coefficient buffer. */ + jinit_d_coef_controller(cinfo, TRUE); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Initialize input side of decompressor to consume first scan. */ + (*cinfo->inputctl->start_input_pass) (cinfo); + /* Initialize progress monitoring. */ + if (cinfo->progress != NULL) { + int nscans; + /* Estimate number of scans to set pass_limit. */ + if (cinfo->progressive_mode) { + /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ + nscans = 2 + 3 * cinfo->num_components; + } else if (cinfo->inputctl->has_multiple_scans) { + /* For a nonprogressive multiscan file, estimate 1 scan per component. */ + nscans = cinfo->num_components; + } else { + nscans = 1; + } + cinfo->progress->pass_counter = 0L; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; + cinfo->progress->completed_passes = 0; + cinfo->progress->total_passes = 1; + } +} + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jerror.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jerror.c new file mode 100644 index 0000000000..660c4a6dd8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jerror.c @@ -0,0 +1,252 @@ +/* + * jerror.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains simple error-reporting and trace-message routines. + * These are suitable for Unix-like systems and others where writing to + * stderr is the right thing to do. Many applications will want to replace + * some or all of these routines. + * + * If you define USE_WINDOWS_MESSAGEBOX in jconfig.h or in the makefile, + * you get a Windows-specific hack to display error messages in a dialog box. + * It ain't much, but it beats dropping error messages into the bit bucket, + * which is what happens to output to stderr under most Windows C compilers. + * + * These routines are used by both the compression and decompression code. + */ + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jversion.h" +#include "jerror.h" + +#ifdef USE_WINDOWS_MESSAGEBOX +#include +#endif + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif + + +/* + * Create the message string table. + * We do this from the master message list in jerror.h by re-reading + * jerror.h with a suitable definition for macro JMESSAGE. + * The message table is made an external symbol just in case any applications + * want to refer to it directly. + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_message_table jMsgTable +#endif + +#define JMESSAGE(code,string) string , + +const char * const jpeg_std_message_table[] = { +#include "jerror.h" + NULL +}; + + +/* + * Error exit handler: must not return to caller. + * + * Applications may override this if they want to get control back after + * an error. Typically one would longjmp somewhere instead of exiting. + * The setjmp buffer can be made a private field within an expanded error + * handler object. Note that the info needed to generate an error message + * is stored in the error object, so you can generate the message now or + * later, at your convenience. + * You should make sure that the JPEG object is cleaned up (with jpeg_abort + * or jpeg_destroy) at some point. + */ + +METHODDEF(void) +error_exit (j_common_ptr cinfo) +{ + /* Always display the message */ + (*cinfo->err->output_message) (cinfo); + + /* Let the memory manager delete any temp files before we die */ + jpeg_destroy(cinfo); + + exit(EXIT_FAILURE); +} + + +/* + * Actual output of an error or trace message. + * Applications may override this method to send JPEG messages somewhere + * other than stderr. + * + * On Windows, printing to stderr is generally completely useless, + * so we provide optional code to produce an error-dialog popup. + * Most Windows applications will still prefer to override this routine, + * but if they don't, it'll do something at least marginally useful. + * + * NOTE: to use the library in an environment that doesn't support the + * C stdio library, you may have to delete the call to fprintf() entirely, + * not just not use this routine. + */ + +METHODDEF(void) +output_message (j_common_ptr cinfo) +{ + char buffer[JMSG_LENGTH_MAX]; + + /* Create the message */ + (*cinfo->err->format_message) (cinfo, buffer); + +#ifdef USE_WINDOWS_MESSAGEBOX + /* Display it in a message dialog box */ + MessageBox(GetActiveWindow(), buffer, "JPEG Library Error", + MB_OK | MB_ICONERROR); +#else + /* Send it to stderr, adding a newline */ + fprintf(stderr, "%s\n", buffer); +#endif +} + + +/* + * Decide whether to emit a trace or warning message. + * msg_level is one of: + * -1: recoverable corrupt-data warning, may want to abort. + * 0: important advisory messages (always display to user). + * 1: first level of tracing detail. + * 2,3,...: successively more detailed tracing messages. + * An application might override this method if it wanted to abort on warnings + * or change the policy about which messages to display. + */ + +METHODDEF(void) +emit_message (j_common_ptr cinfo, int msg_level) +{ + struct jpeg_error_mgr * err = cinfo->err; + + if (msg_level < 0) { + /* It's a warning message. Since corrupt files may generate many warnings, + * the policy implemented here is to show only the first warning, + * unless trace_level >= 3. + */ + if (err->num_warnings == 0 || err->trace_level >= 3) + (*err->output_message) (cinfo); + /* Always count warnings in num_warnings. */ + err->num_warnings++; + } else { + /* It's a trace message. Show it if trace_level >= msg_level. */ + if (err->trace_level >= msg_level) + (*err->output_message) (cinfo); + } +} + + +/* + * Format a message string for the most recent JPEG error or message. + * The message is stored into buffer, which should be at least JMSG_LENGTH_MAX + * characters. Note that no '\n' character is added to the string. + * Few applications should need to override this method. + */ + +METHODDEF(void) +format_message (j_common_ptr cinfo, char * buffer) +{ + struct jpeg_error_mgr * err = cinfo->err; + int msg_code = err->msg_code; + const char * msgtext = NULL; + const char * msgptr; + char ch; + wxjpeg_boolean isstring; + + /* Look up message string in proper table */ + if (msg_code > 0 && msg_code <= err->last_jpeg_message) { + msgtext = err->jpeg_message_table[msg_code]; + } else if (err->addon_message_table != NULL && + msg_code >= err->first_addon_message && + msg_code <= err->last_addon_message) { + msgtext = err->addon_message_table[msg_code - err->first_addon_message]; + } + + /* Defend against bogus message number */ + if (msgtext == NULL) { + err->msg_parm.i[0] = msg_code; + msgtext = err->jpeg_message_table[0]; + } + + /* Check for string parameter, as indicated by %s in the message text */ + isstring = FALSE; + msgptr = msgtext; + while ((ch = *msgptr++) != '\0') { + if (ch == '%') { + if (*msgptr == 's') isstring = TRUE; + break; + } + } + + /* Format the message into the passed buffer */ + if (isstring) + sprintf(buffer, msgtext, err->msg_parm.s); + else + sprintf(buffer, msgtext, + err->msg_parm.i[0], err->msg_parm.i[1], + err->msg_parm.i[2], err->msg_parm.i[3], + err->msg_parm.i[4], err->msg_parm.i[5], + err->msg_parm.i[6], err->msg_parm.i[7]); +} + + +/* + * Reset error state variables at start of a new image. + * This is called during compression startup to reset trace/error + * processing to default state, without losing any application-specific + * method pointers. An application might possibly want to override + * this method if it has additional error processing state. + */ + +METHODDEF(void) +reset_error_mgr (j_common_ptr cinfo) +{ + cinfo->err->num_warnings = 0; + /* trace_level is not reset since it is an application-supplied parameter */ + cinfo->err->msg_code = 0; /* may be useful as a flag for "no error" */ +} + + +/* + * Fill in the standard error-handling methods in a jpeg_error_mgr object. + * Typical call is: + * struct jpeg_compress_struct cinfo; + * struct jpeg_error_mgr err; + * + * cinfo.err = jpeg_std_error(&err); + * after which the application may override some of the methods. + */ + +GLOBAL(struct jpeg_error_mgr *) +jpeg_std_error (struct jpeg_error_mgr * err) +{ + err->error_exit = error_exit; + err->emit_message = emit_message; + err->output_message = output_message; + err->format_message = format_message; + err->reset_error_mgr = reset_error_mgr; + + err->trace_level = 0; /* default = no tracing */ + err->num_warnings = 0; /* no warnings emitted yet */ + err->msg_code = 0; /* may be useful as a flag for "no error" */ + + /* Initialize message table pointers */ + err->jpeg_message_table = jpeg_std_message_table; + err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; + + err->addon_message_table = NULL; + err->first_addon_message = 0; /* for safety */ + err->last_addon_message = 0; + + return err; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jerror.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jerror.h new file mode 100644 index 0000000000..fc2fffeac2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jerror.h @@ -0,0 +1,291 @@ +/* + * jerror.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the JPEG library. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + * A set of error-reporting macros are defined too. Some applications using + * the JPEG library may wish to include this file to get the error codes + * and/or the macros. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef JERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code,string) +#endif /* JERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code,string) code , + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ + +/* For maintenance convenience, list is alphabetical by message code name */ +JMESSAGE(JERR_ARITH_NOTIMPL, + "Sorry, there are legal restrictions on arithmetic coding") +JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") +JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") +JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") +JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") +JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") +JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") +JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") +JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") +JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") +JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") +JMESSAGE(JERR_BAD_LIB_VERSION, + "Wrong JPEG library version: library is %d, caller expects %d") +JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") +JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") +JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") +JMESSAGE(JERR_BAD_PROGRESSION, + "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") +JMESSAGE(JERR_BAD_PROG_SCRIPT, + "Invalid progressive parameters at scan script entry %d") +JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") +JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") +JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") +JMESSAGE(JERR_BAD_STRUCT_SIZE, + "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") +JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") +JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") +JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") +JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") +JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") +JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") +JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") +JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") +JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") +JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") +JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") +JMESSAGE(JERR_EMS_READ, "Read from EMS failed") +JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") +JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") +JMESSAGE(JERR_FILE_READ, "Input file read error") +JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") +JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") +JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") +JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") +JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") +JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") +JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") +JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, + "Cannot transcode due to multiple use of quantization table %d") +JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") +JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") +JMESSAGE(JERR_NOTIMPL, "Not implemented yet") +JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") +JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") +JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") +JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") +JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") +JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") +JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") +JMESSAGE(JERR_QUANT_COMPONENTS, + "Cannot quantize more than %d color components") +JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") +JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") +JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") +JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") +JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") +JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") +JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") +JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") +JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") +JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") +JMESSAGE(JERR_TFILE_WRITE, + "Write failed on temporary file --- out of disk space?") +JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") +JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") +JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") +JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") +JMESSAGE(JERR_XMS_READ, "Read from XMS failed") +JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") +JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) +JMESSAGE(JMSG_VERSION, JVERSION) +JMESSAGE(JTRC_16BIT_TABLES, + "Caution: quantization tables are too coarse for baseline JPEG") +JMESSAGE(JTRC_ADOBE, + "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") +JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") +JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") +JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") +JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") +JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") +JMESSAGE(JTRC_DRI, "Define Restart Interval %u") +JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") +JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") +JMESSAGE(JTRC_EOI, "End Of Image") +JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") +JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") +JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, + "Warning: thumbnail image size does not match data length %u") +JMESSAGE(JTRC_JFIF_EXTENSION, + "JFIF extension marker: type 0x%02x, length %u") +JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") +JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") +JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") +JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") +JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") +JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") +JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") +JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") +JMESSAGE(JTRC_RST, "RST%d") +JMESSAGE(JTRC_SMOOTH_NOTIMPL, + "Smoothing not supported with nonstandard sampling ratios") +JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") +JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") +JMESSAGE(JTRC_SOI, "Start of Image") +JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") +JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") +JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") +JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") +JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") +JMESSAGE(JTRC_THUMB_JPEG, + "JFIF extension marker: JPEG-compressed thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_PALETTE, + "JFIF extension marker: palette thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_RGB, + "JFIF extension marker: RGB thumbnail image, length %u") +JMESSAGE(JTRC_UNKNOWN_IDS, + "Unrecognized component IDs %d %d %d, assuming YCbCr") +JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") +JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") +JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") +JMESSAGE(JWRN_BOGUS_PROGRESSION, + "Inconsistent progression sequence for component %d coefficient %d") +JMESSAGE(JWRN_EXTRANEOUS_DATA, + "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") +JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") +JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") +JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") +JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") +JMESSAGE(JWRN_MUST_RESYNC, + "Corrupt JPEG data: found marker 0x%02x instead of RST%d") +JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") +JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTMSGCODE +} J_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE + + +#ifndef JERROR_H +#define JERROR_H + +/* Macros to simplify using the error and trace message stuff */ +/* The first parameter is either type of cinfo pointer */ + +/* Fatal errors (print message and exit) */ +#define ERREXIT(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT3(cinfo,code,p1,p2,p3) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXITS(cinfo,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) + +#define MAKESTMT(stuff) do { stuff } while (0) + +/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ +#define WARNMS(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) + +/* Informational/debugging messages */ +#define TRACEMS(cinfo,lvl,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS1(cinfo,lvl,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS2(cinfo,lvl,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMSS(cinfo,lvl,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) + +#endif /* JERROR_H */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jfdctflt.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jfdctflt.c new file mode 100644 index 0000000000..79d7a00787 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jfdctflt.c @@ -0,0 +1,168 @@ +/* + * jfdctflt.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a floating-point implementation of the + * forward DCT (Discrete Cosine Transform). + * + * This implementation should be more accurate than either of the integer + * DCT implementations. However, it may not give the same results on all + * machines because of differences in roundoff behavior. Speed will depend + * on the hardware's floating point capacity. + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with a fixed-point + * implementation, accuracy is lost due to imprecise representation of the + * scaled quantization values. However, that problem does not arise if + * we use floating point arithmetic. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_FLOAT_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* + * Perform the forward DCT on one block of samples. + */ + +GLOBAL(void) +jpeg_fdct_float (FAST_FLOAT * data) +{ + FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + FAST_FLOAT tmp10, tmp11, tmp12, tmp13; + FAST_FLOAT z1, z2, z3, z4, z5, z11, z13; + FAST_FLOAT *dataptr; + int ctr; + + /* Pass 1: process rows. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[0] + dataptr[7]; + tmp7 = dataptr[0] - dataptr[7]; + tmp1 = dataptr[1] + dataptr[6]; + tmp6 = dataptr[1] - dataptr[6]; + tmp2 = dataptr[2] + dataptr[5]; + tmp5 = dataptr[2] - dataptr[5]; + tmp3 = dataptr[3] + dataptr[4]; + tmp4 = dataptr[3] - dataptr[4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[0] = tmp10 + tmp11; /* phase 3 */ + dataptr[4] = tmp10 - tmp11; + + z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ + dataptr[2] = tmp13 + z1; /* phase 5 */ + dataptr[6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ + z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ + z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ + z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[5] = z13 + z2; /* phase 6 */ + dataptr[3] = z13 - z2; + dataptr[1] = z11 + z4; + dataptr[7] = z11 - z4; + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ + dataptr[DCTSIZE*4] = tmp10 - tmp11; + + z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ + dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ + dataptr[DCTSIZE*6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ + z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ + z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ + z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ + dataptr[DCTSIZE*3] = z13 - z2; + dataptr[DCTSIZE*1] = z11 + z4; + dataptr[DCTSIZE*7] = z11 - z4; + + dataptr++; /* advance pointer to next column */ + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jfdctfst.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jfdctfst.c new file mode 100644 index 0000000000..37900ec90f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jfdctfst.c @@ -0,0 +1,224 @@ +/* + * jfdctfst.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a fast, not so accurate integer implementation of the + * forward DCT (Discrete Cosine Transform). + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with fixed-point math, + * accuracy is lost due to imprecise representation of the scaled + * quantization values. The smaller the quantization table entry, the less + * precise the scaled value, so this implementation does worse with high- + * quality-setting files than with low-quality ones. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_IFAST_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Scaling decisions are generally the same as in the LL&M algorithm; + * see jfdctint.c for more details. However, we choose to descale + * (right shift) multiplication products as soon as they are formed, + * rather than carrying additional fractional bits into subsequent additions. + * This compromises accuracy slightly, but it lets us save a few shifts. + * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) + * everywhere except in the multiplications proper; this saves a good deal + * of work on 16-bit-int machines. + * + * Again to save a few shifts, the intermediate results between pass 1 and + * pass 2 are not upscaled, but are represented only to integral precision. + * + * A final compromise is to represent the multiplicative constants to only + * 8 fractional bits, rather than 13. This saves some shifting work on some + * machines, and may also reduce the cost of multiplication (since there + * are fewer one-bits in the constants). + */ + +#define CONST_BITS 8 + + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 8 +#define FIX_0_382683433 ((JPEG_INT32) 98) /* FIX(0.382683433) */ +#define FIX_0_541196100 ((JPEG_INT32) 139) /* FIX(0.541196100) */ +#define FIX_0_707106781 ((JPEG_INT32) 181) /* FIX(0.707106781) */ +#define FIX_1_306562965 ((JPEG_INT32) 334) /* FIX(1.306562965) */ +#else +#define FIX_0_382683433 FIX(0.382683433) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_707106781 FIX(0.707106781) +#define FIX_1_306562965 FIX(1.306562965) +#endif + + +/* We can gain a little more speed, with a further compromise in accuracy, + * by omitting the addition in a descaling shift. This yields an incorrectly + * rounded result half the time... + */ + +#ifndef USE_ACCURATE_ROUNDING +#undef DESCALE +#define DESCALE(x,n) RIGHT_SHIFT(x, n) +#endif + + +/* Multiply a DCTELEM variable by an INT32 constant, and immediately + * descale to yield a DCTELEM result. + */ + +#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) + + +/* + * Perform the forward DCT on one block of samples. + */ + +GLOBAL(void) +jpeg_fdct_ifast (DCTELEM * data) +{ + DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + DCTELEM tmp10, tmp11, tmp12, tmp13; + DCTELEM z1, z2, z3, z4, z5, z11, z13; + DCTELEM *dataptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[0] + dataptr[7]; + tmp7 = dataptr[0] - dataptr[7]; + tmp1 = dataptr[1] + dataptr[6]; + tmp6 = dataptr[1] - dataptr[6]; + tmp2 = dataptr[2] + dataptr[5]; + tmp5 = dataptr[2] - dataptr[5]; + tmp3 = dataptr[3] + dataptr[4]; + tmp4 = dataptr[3] - dataptr[4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[0] = tmp10 + tmp11; /* phase 3 */ + dataptr[4] = tmp10 - tmp11; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ + dataptr[2] = tmp13 + z1; /* phase 5 */ + dataptr[6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ + z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ + z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ + z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[5] = z13 + z2; /* phase 6 */ + dataptr[3] = z13 - z2; + dataptr[1] = z11 + z4; + dataptr[7] = z11 - z4; + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ + dataptr[DCTSIZE*4] = tmp10 - tmp11; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ + dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ + dataptr[DCTSIZE*6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ + z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ + z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ + z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ + dataptr[DCTSIZE*3] = z13 - z2; + dataptr[DCTSIZE*1] = z11 + z4; + dataptr[DCTSIZE*7] = z11 - z4; + + dataptr++; /* advance pointer to next column */ + } +} + +#endif /* DCT_IFAST_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jfdctint.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jfdctint.c new file mode 100644 index 0000000000..4543b2e861 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jfdctint.c @@ -0,0 +1,283 @@ +/* + * jfdctint.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a slow-but-accurate integer implementation of the + * forward DCT (Discrete Cosine Transform). + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on an algorithm described in + * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT + * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, + * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. + * The primary algorithm described there uses 11 multiplies and 29 adds. + * We use their alternate method with 12 multiplies and 32 adds. + * The advantage of this method is that no data path contains more than one + * multiplication; this allows a very simple and accurate implementation in + * scaled fixed-point arithmetic, with a minimal number of shifts. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_ISLOW_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* + * The poop on this scaling stuff is as follows: + * + * Each 1-D DCT step produces outputs which are a factor of sqrt(N) + * larger than the true DCT outputs. The final outputs are therefore + * a factor of N larger than desired; since N=8 this can be cured by + * a simple right shift at the end of the algorithm. The advantage of + * this arrangement is that we save two multiplications per 1-D DCT, + * because the y0 and y4 outputs need not be divided by sqrt(N). + * In the IJG code, this factor of 8 is removed by the quantization step + * (in jcdctmgr.c), NOT in this module. + * + * We have to do addition and subtraction of the integer inputs, which + * is no problem, and multiplication by fractional constants, which is + * a problem to do in integer arithmetic. We multiply all the constants + * by CONST_SCALE and convert them to integer constants (thus retaining + * CONST_BITS bits of precision in the constants). After doing a + * multiplication we have to divide the product by CONST_SCALE, with proper + * rounding, to produce the correct output. This division can be done + * cheaply as a right shift of CONST_BITS bits. We postpone shifting + * as long as possible so that partial sums can be added together with + * full fractional precision. + * + * The outputs of the first pass are scaled up by PASS1_BITS bits so that + * they are represented to better-than-integral precision. These outputs + * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word + * with the recommended scaling. (For 12-bit sample data, the intermediate + * array is INT32 anyway.) + * + * To avoid overflow of the 32-bit intermediate results in pass 2, we must + * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis + * shows that the values given below are the most effective. + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 2 +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_298631336 ((JPEG_INT32) 2446) /* FIX(0.298631336) */ +#define FIX_0_390180644 ((JPEG_INT32) 3196) /* FIX(0.390180644) */ +#define FIX_0_541196100 ((JPEG_INT32) 4433) /* FIX(0.541196100) */ +#define FIX_0_765366865 ((JPEG_INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_899976223 ((JPEG_INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_175875602 ((JPEG_INT32) 9633) /* FIX(1.175875602) */ +#define FIX_1_501321110 ((JPEG_INT32) 12299) /* FIX(1.501321110) */ +#define FIX_1_847759065 ((JPEG_INT32) 15137) /* FIX(1.847759065) */ +#define FIX_1_961570560 ((JPEG_INT32) 16069) /* FIX(1.961570560) */ +#define FIX_2_053119869 ((JPEG_INT32) 16819) /* FIX(2.053119869) */ +#define FIX_2_562915447 ((JPEG_INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_072711026 ((JPEG_INT32) 25172) /* FIX(3.072711026) */ +#else +#define FIX_0_298631336 FIX(0.298631336) +#define FIX_0_390180644 FIX(0.390180644) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_175875602 FIX(1.175875602) +#define FIX_1_501321110 FIX(1.501321110) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_1_961570560 FIX(1.961570560) +#define FIX_2_053119869 FIX(2.053119869) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_072711026 FIX(3.072711026) +#endif + + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +/* + * Perform the forward DCT on one block of samples. + */ + +GLOBAL(void) +jpeg_fdct_islow (DCTELEM * data) +{ + JPEG_INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + JPEG_INT32 tmp10, tmp11, tmp12, tmp13; + JPEG_INT32 z1, z2, z3, z4, z5; + DCTELEM *dataptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. */ + /* Note results are scaled up by sqrt(8) compared to a true DCT; */ + /* furthermore, we scale the results by 2**PASS1_BITS. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[0] + dataptr[7]; + tmp7 = dataptr[0] - dataptr[7]; + tmp1 = dataptr[1] + dataptr[6]; + tmp6 = dataptr[1] - dataptr[6]; + tmp2 = dataptr[2] + dataptr[5]; + tmp5 = dataptr[2] - dataptr[5]; + tmp3 = dataptr[3] + dataptr[4]; + tmp4 = dataptr[3] - dataptr[4]; + + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". + */ + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[0] = (DCTELEM) ((tmp10 + tmp11) << PASS1_BITS); + dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); + dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), + CONST_BITS-PASS1_BITS); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * cK represents cos(K*pi/16). + * i0..i3 in the paper are tmp4..tmp7 here. + */ + + z1 = tmp4 + tmp7; + z2 = tmp5 + tmp6; + z3 = tmp4 + tmp6; + z4 = tmp5 + tmp7; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + dataptr[7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, CONST_BITS-PASS1_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, CONST_BITS-PASS1_BITS); + dataptr[1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, CONST_BITS-PASS1_BITS); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". + */ + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS); + dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); + dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), + CONST_BITS+PASS1_BITS); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * cK represents cos(K*pi/16). + * i0..i3 in the paper are tmp4..tmp7 here. + */ + + z1 = tmp4 + tmp7; + z2 = tmp5 + tmp6; + z3 = tmp4 + tmp6; + z4 = tmp5 + tmp7; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + +#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctflt.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctflt.c new file mode 100644 index 0000000000..a0f22c295c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctflt.c @@ -0,0 +1,242 @@ +/* + * jidctflt.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a floating-point implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * This implementation should be more accurate than either of the integer + * IDCT implementations. However, it may not give the same results on all + * machines because of differences in roundoff behavior. Speed will depend + * on the hardware's floating point capacity. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with a fixed-point + * implementation, accuracy is lost due to imprecise representation of the + * scaled quantization values. However, that problem does not arise if + * we use floating point arithmetic. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_FLOAT_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce a float result. + */ + +#define DEQUANTIZE(coef,quantval) (((FAST_FLOAT) (coef)) * (quantval)) + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + */ + +GLOBAL(void) +jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + FAST_FLOAT tmp10, tmp11, tmp12, tmp13; + FAST_FLOAT z5, z10, z11, z12, z13; + JCOEFPTR inptr; + FLOAT_MULT_TYPE * quantptr; + FAST_FLOAT * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + FAST_FLOAT workspace[DCTSIZE2]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (FLOAT_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && + inptr[DCTSIZE*7] == 0) { + /* AC terms all zero */ + FAST_FLOAT dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp10 = tmp0 + tmp2; /* phase 3 */ + tmp11 = tmp0 - tmp2; + + tmp13 = tmp1 + tmp3; /* phases 5-3 */ + tmp12 = (tmp1 - tmp3) * ((FAST_FLOAT) 1.414213562) - tmp13; /* 2*c4 */ + + tmp0 = tmp10 + tmp13; /* phase 2 */ + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + z13 = tmp6 + tmp5; /* phase 6 */ + z10 = tmp6 - tmp5; + z11 = tmp4 + tmp7; + z12 = tmp4 - tmp7; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */ + + z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ + tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */ + tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + wsptr[DCTSIZE*0] = tmp0 + tmp7; + wsptr[DCTSIZE*7] = tmp0 - tmp7; + wsptr[DCTSIZE*1] = tmp1 + tmp6; + wsptr[DCTSIZE*6] = tmp1 - tmp6; + wsptr[DCTSIZE*2] = tmp2 + tmp5; + wsptr[DCTSIZE*5] = tmp2 - tmp5; + wsptr[DCTSIZE*4] = tmp3 + tmp4; + wsptr[DCTSIZE*3] = tmp3 - tmp4; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. */ + /* Note that we must descale the results by a factor of 8 == 2**3. */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * And testing floats for zero is relatively expensive, so we don't bother. + */ + + /* Even part */ + + tmp10 = wsptr[0] + wsptr[4]; + tmp11 = wsptr[0] - wsptr[4]; + + tmp13 = wsptr[2] + wsptr[6]; + tmp12 = (wsptr[2] - wsptr[6]) * ((FAST_FLOAT) 1.414213562) - tmp13; + + tmp0 = tmp10 + tmp13; + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + z13 = wsptr[5] + wsptr[3]; + z10 = wsptr[5] - wsptr[3]; + z11 = wsptr[1] + wsptr[7]; + z12 = wsptr[1] - wsptr[7]; + + tmp7 = z11 + z13; + tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); + + z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ + tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */ + tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + /* Final output stage: scale down by a factor of 8 and range-limit */ + + outptr[0] = range_limit[(int) DESCALE((JPEG_INT32) (tmp0 + tmp7), 3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) DESCALE((JPEG_INT32) (tmp0 - tmp7), 3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE((JPEG_INT32) (tmp1 + tmp6), 3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) DESCALE((JPEG_INT32) (tmp1 - tmp6), 3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) DESCALE((JPEG_INT32) (tmp2 + tmp5), 3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) DESCALE((JPEG_INT32) (tmp2 - tmp5), 3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) DESCALE((JPEG_INT32) (tmp3 + tmp4), 3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) DESCALE((JPEG_INT32) (tmp3 - tmp4), 3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctfst.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctfst.c new file mode 100644 index 0000000000..d388b61783 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctfst.c @@ -0,0 +1,368 @@ +/* + * jidctfst.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a fast, not so accurate integer implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with fixed-point math, + * accuracy is lost due to imprecise representation of the scaled + * quantization values. The smaller the quantization table entry, the less + * precise the scaled value, so this implementation does worse with high- + * quality-setting files than with low-quality ones. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_IFAST_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Scaling decisions are generally the same as in the LL&M algorithm; + * see jidctint.c for more details. However, we choose to descale + * (right shift) multiplication products as soon as they are formed, + * rather than carrying additional fractional bits into subsequent additions. + * This compromises accuracy slightly, but it lets us save a few shifts. + * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) + * everywhere except in the multiplications proper; this saves a good deal + * of work on 16-bit-int machines. + * + * The dequantized coefficients are not integers because the AA&N scaling + * factors have been incorporated. We represent them scaled up by PASS1_BITS, + * so that the first and second IDCT rounds have the same input scaling. + * For 8-bit JSAMPLEs, we choose IFAST_SCALE_BITS = PASS1_BITS so as to + * avoid a descaling shift; this compromises accuracy rather drastically + * for small quantization table entries, but it saves a lot of shifts. + * For 12-bit JSAMPLEs, there's no hope of using 16x16 multiplies anyway, + * so we use a much larger scaling factor to preserve accuracy. + * + * A final compromise is to represent the multiplicative constants to only + * 8 fractional bits, rather than 13. This saves some shifting work on some + * machines, and may also reduce the cost of multiplication (since there + * are fewer one-bits in the constants). + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 8 +#define PASS1_BITS 2 +#else +#define CONST_BITS 8 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 8 +#define FIX_1_082392200 ((JPEG_INT32) 277) /* FIX(1.082392200) */ +#define FIX_1_414213562 ((JPEG_INT32) 362) /* FIX(1.414213562) */ +#define FIX_1_847759065 ((JPEG_INT32) 473) /* FIX(1.847759065) */ +#define FIX_2_613125930 ((JPEG_INT32) 669) /* FIX(2.613125930) */ +#else +#define FIX_1_082392200 FIX(1.082392200) +#define FIX_1_414213562 FIX(1.414213562) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_2_613125930 FIX(2.613125930) +#endif + + +/* We can gain a little more speed, with a further compromise in accuracy, + * by omitting the addition in a descaling shift. This yields an incorrectly + * rounded result half the time... + */ + +#ifndef USE_ACCURATE_ROUNDING +#undef DESCALE +#define DESCALE(x,n) RIGHT_SHIFT(x, n) +#endif + + +/* Multiply a DCTELEM variable by an INT32 constant, and immediately + * descale to yield a DCTELEM result. + */ + +#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce a DCTELEM result. For 8-bit data a 16x16->16 + * multiplication will do. For 12-bit data, the multiplier table is + * declared INT32, so a 32-bit multiply will be used. + */ + +#if BITS_IN_JSAMPLE == 8 +#define DEQUANTIZE(coef,quantval) (((IFAST_MULT_TYPE) (coef)) * (quantval)) +#else +#define DEQUANTIZE(coef,quantval) \ + DESCALE((coef)*(quantval), IFAST_SCALE_BITS-PASS1_BITS) +#endif + + +/* Like DESCALE, but applies to a DCTELEM and produces an int. + * We assume that int right shift is unsigned if INT32 right shift is. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define ISHIFT_TEMPS DCTELEM ishift_temp; +#if BITS_IN_JSAMPLE == 8 +#define DCTELEMBITS 16 /* DCTELEM may be 16 or 32 bits */ +#else +#define DCTELEMBITS 32 /* DCTELEM must be 32 bits */ +#endif +#define IRIGHT_SHIFT(x,shft) \ + ((ishift_temp = (x)) < 0 ? \ + (ishift_temp >> (shft)) | ((~((DCTELEM) 0)) << (DCTELEMBITS-(shft))) : \ + (ishift_temp >> (shft))) +#else +#define ISHIFT_TEMPS +#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + +#ifdef USE_ACCURATE_ROUNDING +#define IDESCALE(x,n) ((int) IRIGHT_SHIFT((x) + (1 << ((n)-1)), n)) +#else +#define IDESCALE(x,n) ((int) IRIGHT_SHIFT(x, n)) +#endif + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + */ + +GLOBAL(void) +jpeg_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + DCTELEM tmp10, tmp11, tmp12, tmp13; + DCTELEM z5, z10, z11, z12, z13; + JCOEFPTR inptr; + IFAST_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE2]; /* buffers data between passes */ + SHIFT_TEMPS /* for DESCALE */ + ISHIFT_TEMPS /* for IDESCALE */ + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (IFAST_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && + inptr[DCTSIZE*7] == 0) { + /* AC terms all zero */ + int dcval = (int) DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp10 = tmp0 + tmp2; /* phase 3 */ + tmp11 = tmp0 - tmp2; + + tmp13 = tmp1 + tmp3; /* phases 5-3 */ + tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; /* 2*c4 */ + + tmp0 = tmp10 + tmp13; /* phase 2 */ + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + z13 = tmp6 + tmp5; /* phase 6 */ + z10 = tmp6 - tmp5; + z11 = tmp4 + tmp7; + z12 = tmp4 - tmp7; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ + + z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ + tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */ + tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + wsptr[DCTSIZE*0] = (int) (tmp0 + tmp7); + wsptr[DCTSIZE*7] = (int) (tmp0 - tmp7); + wsptr[DCTSIZE*1] = (int) (tmp1 + tmp6); + wsptr[DCTSIZE*6] = (int) (tmp1 - tmp6); + wsptr[DCTSIZE*2] = (int) (tmp2 + tmp5); + wsptr[DCTSIZE*5] = (int) (tmp2 - tmp5); + wsptr[DCTSIZE*4] = (int) (tmp3 + tmp4); + wsptr[DCTSIZE*3] = (int) (tmp3 - tmp4); + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. */ + /* Note that we must descale the results by a factor of 8 == 2**3, */ + /* and also undo the PASS1_BITS scaling. */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * On machines with very fast multiplication, it's possible that the + * test takes more time than it's worth. In that case this section + * may be commented out. + */ + +#ifndef NO_ZERO_ROW_TEST + if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 && + wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[IDESCALE(wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + outptr[2] = dcval; + outptr[3] = dcval; + outptr[4] = dcval; + outptr[5] = dcval; + outptr[6] = dcval; + outptr[7] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part */ + + tmp10 = ((DCTELEM) wsptr[0] + (DCTELEM) wsptr[4]); + tmp11 = ((DCTELEM) wsptr[0] - (DCTELEM) wsptr[4]); + + tmp13 = ((DCTELEM) wsptr[2] + (DCTELEM) wsptr[6]); + tmp12 = MULTIPLY((DCTELEM) wsptr[2] - (DCTELEM) wsptr[6], FIX_1_414213562) + - tmp13; + + tmp0 = tmp10 + tmp13; + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + z13 = (DCTELEM) wsptr[5] + (DCTELEM) wsptr[3]; + z10 = (DCTELEM) wsptr[5] - (DCTELEM) wsptr[3]; + z11 = (DCTELEM) wsptr[1] + (DCTELEM) wsptr[7]; + z12 = (DCTELEM) wsptr[1] - (DCTELEM) wsptr[7]; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ + + z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ + tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */ + tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + /* Final output stage: scale down by a factor of 8 and range-limit */ + + outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#endif /* DCT_IFAST_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctint.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctint.c new file mode 100644 index 0000000000..2783c23027 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctint.c @@ -0,0 +1,389 @@ +/* + * jidctint.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a slow-but-accurate integer implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on an algorithm described in + * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT + * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, + * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. + * The primary algorithm described there uses 11 multiplies and 29 adds. + * We use their alternate method with 12 multiplies and 32 adds. + * The advantage of this method is that no data path contains more than one + * multiplication; this allows a very simple and accurate implementation in + * scaled fixed-point arithmetic, with a minimal number of shifts. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_ISLOW_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* + * The poop on this scaling stuff is as follows: + * + * Each 1-D IDCT step produces outputs which are a factor of sqrt(N) + * larger than the true IDCT outputs. The final outputs are therefore + * a factor of N larger than desired; since N=8 this can be cured by + * a simple right shift at the end of the algorithm. The advantage of + * this arrangement is that we save two multiplications per 1-D IDCT, + * because the y0 and y4 inputs need not be divided by sqrt(N). + * + * We have to do addition and subtraction of the integer inputs, which + * is no problem, and multiplication by fractional constants, which is + * a problem to do in integer arithmetic. We multiply all the constants + * by CONST_SCALE and convert them to integer constants (thus retaining + * CONST_BITS bits of precision in the constants). After doing a + * multiplication we have to divide the product by CONST_SCALE, with proper + * rounding, to produce the correct output. This division can be done + * cheaply as a right shift of CONST_BITS bits. We postpone shifting + * as long as possible so that partial sums can be added together with + * full fractional precision. + * + * The outputs of the first pass are scaled up by PASS1_BITS bits so that + * they are represented to better-than-integral precision. These outputs + * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word + * with the recommended scaling. (To scale up 12-bit sample data further, an + * intermediate INT32 array would be needed.) + * + * To avoid overflow of the 32-bit intermediate results in pass 2, we must + * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis + * shows that the values given below are the most effective. + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 2 +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_298631336 ((JPEG_INT32) 2446) /* FIX(0.298631336) */ +#define FIX_0_390180644 ((JPEG_INT32) 3196) /* FIX(0.390180644) */ +#define FIX_0_541196100 ((JPEG_INT32) 4433) /* FIX(0.541196100) */ +#define FIX_0_765366865 ((JPEG_INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_899976223 ((JPEG_INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_175875602 ((JPEG_INT32) 9633) /* FIX(1.175875602) */ +#define FIX_1_501321110 ((JPEG_INT32) 12299) /* FIX(1.501321110) */ +#define FIX_1_847759065 ((JPEG_INT32) 15137) /* FIX(1.847759065) */ +#define FIX_1_961570560 ((JPEG_INT32) 16069) /* FIX(1.961570560) */ +#define FIX_2_053119869 ((JPEG_INT32) 16819) /* FIX(2.053119869) */ +#define FIX_2_562915447 ((JPEG_INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_072711026 ((JPEG_INT32) 25172) /* FIX(3.072711026) */ +#else +#define FIX_0_298631336 FIX(0.298631336) +#define FIX_0_390180644 FIX(0.390180644) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_175875602 FIX(1.175875602) +#define FIX_1_501321110 FIX(1.501321110) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_1_961570560 FIX(1.961570560) +#define FIX_2_053119869 FIX(2.053119869) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_072711026 FIX(3.072711026) +#endif + + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce an int result. In this module, both inputs and result + * are 16 bits or less, so either int or short multiply will work. + */ + +#define DEQUANTIZE(coef,quantval) (((ISLOW_MULT_TYPE) (coef)) * (quantval)) + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + */ + +GLOBAL(void) +jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + JPEG_INT32 tmp0, tmp1, tmp2, tmp3; + JPEG_INT32 tmp10, tmp11, tmp12, tmp13; + JPEG_INT32 z1, z2, z3, z4, z5; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE2]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + /* Note results are scaled up by sqrt(8) compared to a true IDCT; */ + /* furthermore, we scale the results by 2**PASS1_BITS. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && + inptr[DCTSIZE*7] == 0) { + /* AC terms all zero */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part: reverse the even part of the forward DCT. */ + /* The rotator is sqrt(2)*c(-6). */ + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); + tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065); + tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865); + + z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + + tmp0 = (z2 + z3) << CONST_BITS; + tmp1 = (z2 - z3) << CONST_BITS; + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + + z1 = tmp0 + tmp3; + z2 = tmp1 + tmp2; + z3 = tmp0 + tmp2; + z4 = tmp1 + tmp3; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + tmp0 += z1 + z3; + tmp1 += z2 + z4; + tmp2 += z2 + z3; + tmp3 += z1 + z4; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*7] = (int) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*1] = (int) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*6] = (int) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*5] = (int) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*3] = (int) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*4] = (int) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS); + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. */ + /* Note that we must descale the results by a factor of 8 == 2**3, */ + /* and also undo the PASS1_BITS scaling. */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * On machines with very fast multiplication, it's possible that the + * test takes more time than it's worth. In that case this section + * may be commented out. + */ + +#ifndef NO_ZERO_ROW_TEST + if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 && + wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[(int) DESCALE((JPEG_INT32) wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + outptr[2] = dcval; + outptr[3] = dcval; + outptr[4] = dcval; + outptr[5] = dcval; + outptr[6] = dcval; + outptr[7] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part: reverse the even part of the forward DCT. */ + /* The rotator is sqrt(2)*c(-6). */ + + z2 = (JPEG_INT32) wsptr[2]; + z3 = (JPEG_INT32) wsptr[6]; + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); + tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065); + tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865); + + tmp0 = ((JPEG_INT32) wsptr[0] + (JPEG_INT32) wsptr[4]) << CONST_BITS; + tmp1 = ((JPEG_INT32) wsptr[0] - (JPEG_INT32) wsptr[4]) << CONST_BITS; + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = (JPEG_INT32) wsptr[7]; + tmp1 = (JPEG_INT32) wsptr[5]; + tmp2 = (JPEG_INT32) wsptr[3]; + tmp3 = (JPEG_INT32) wsptr[1]; + + z1 = tmp0 + tmp3; + z2 = tmp1 + tmp2; + z3 = tmp0 + tmp2; + z4 = tmp1 + tmp3; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + tmp0 += z1 + z3; + tmp1 += z2 + z4; + tmp2 += z2 + z3; + tmp3 += z1 + z4; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) DESCALE(tmp10 - tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE(tmp11 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) DESCALE(tmp11 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) DESCALE(tmp12 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) DESCALE(tmp12 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) DESCALE(tmp13 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) DESCALE(tmp13 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctred.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctred.c new file mode 100644 index 0000000000..efda35aeb5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jidctred.c @@ -0,0 +1,398 @@ +/* + * jidctred.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains inverse-DCT routines that produce reduced-size output: + * either 4x4, 2x2, or 1x1 pixels from an 8x8 DCT block. + * + * The implementation is based on the Loeffler, Ligtenberg and Moschytz (LL&M) + * algorithm used in jidctint.c. We simply replace each 8-to-8 1-D IDCT step + * with an 8-to-4 step that produces the four averages of two adjacent outputs + * (or an 8-to-2 step producing two averages of four outputs, for 2x2 output). + * These steps were derived by computing the corresponding values at the end + * of the normal LL&M code, then simplifying as much as possible. + * + * 1x1 is trivial: just take the DC coefficient divided by 8. + * + * See jidctint.c for additional comments. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef IDCT_SCALING_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Scaling is the same as in jidctint.c. */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 2 +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_211164243 ((JPEG_INT32) 1730) /* FIX(0.211164243) */ +#define FIX_0_509795579 ((JPEG_INT32) 4176) /* FIX(0.509795579) */ +#define FIX_0_601344887 ((JPEG_INT32) 4926) /* FIX(0.601344887) */ +#define FIX_0_720959822 ((JPEG_INT32) 5906) /* FIX(0.720959822) */ +#define FIX_0_765366865 ((JPEG_INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_850430095 ((JPEG_INT32) 6967) /* FIX(0.850430095) */ +#define FIX_0_899976223 ((JPEG_INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_061594337 ((JPEG_INT32) 8697) /* FIX(1.061594337) */ +#define FIX_1_272758580 ((JPEG_INT32) 10426) /* FIX(1.272758580) */ +#define FIX_1_451774981 ((JPEG_INT32) 11893) /* FIX(1.451774981) */ +#define FIX_1_847759065 ((JPEG_INT32) 15137) /* FIX(1.847759065) */ +#define FIX_2_172734803 ((JPEG_INT32) 17799) /* FIX(2.172734803) */ +#define FIX_2_562915447 ((JPEG_INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_624509785 ((JPEG_INT32) 29692) /* FIX(3.624509785) */ +#else +#define FIX_0_211164243 FIX(0.211164243) +#define FIX_0_509795579 FIX(0.509795579) +#define FIX_0_601344887 FIX(0.601344887) +#define FIX_0_720959822 FIX(0.720959822) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_850430095 FIX(0.850430095) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_061594337 FIX(1.061594337) +#define FIX_1_272758580 FIX(1.272758580) +#define FIX_1_451774981 FIX(1.451774981) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_2_172734803 FIX(2.172734803) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_624509785 FIX(3.624509785) +#endif + + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce an int result. In this module, both inputs and result + * are 16 bits or less, so either int or short multiply will work. + */ + +#define DEQUANTIZE(coef,quantval) (((ISLOW_MULT_TYPE) (coef)) * (quantval)) + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 4x4 output block. + */ + +GLOBAL(void) +jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + JPEG_INT32 tmp0, tmp2, tmp10, tmp12; + JPEG_INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE*4]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) { + /* Don't bother to process column 4, because second pass won't use it */ + if (ctr == DCTSIZE-4) + continue; + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*5] == 0 && + inptr[DCTSIZE*6] == 0 && inptr[DCTSIZE*7] == 0) { + /* AC terms all zero; we need not examine term 4 for 4x4 output */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + + continue; + } + + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp0 <<= (CONST_BITS+1); + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp2 = MULTIPLY(z2, FIX_1_847759065) + MULTIPLY(z3, - FIX_0_765366865); + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + z2 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + + tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */ + + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */ + + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */ + + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */ + + tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */ + + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */ + + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */ + + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */ + + /* Final output stage */ + + wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp2, CONST_BITS-PASS1_BITS+1); + wsptr[DCTSIZE*3] = (int) DESCALE(tmp10 - tmp2, CONST_BITS-PASS1_BITS+1); + wsptr[DCTSIZE*1] = (int) DESCALE(tmp12 + tmp0, CONST_BITS-PASS1_BITS+1); + wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 - tmp0, CONST_BITS-PASS1_BITS+1); + } + + /* Pass 2: process 4 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 4; ctr++) { + outptr = output_buf[ctr] + output_col; + /* It's not clear whether a zero row test is worthwhile here ... */ + +#ifndef NO_ZERO_ROW_TEST + if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && + wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[(int) DESCALE((JPEG_INT32) wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + outptr[2] = dcval; + outptr[3] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part */ + + tmp0 = ((JPEG_INT32) wsptr[0]) << (CONST_BITS+1); + + tmp2 = MULTIPLY((JPEG_INT32) wsptr[2], FIX_1_847759065) + + MULTIPLY((JPEG_INT32) wsptr[6], - FIX_0_765366865); + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + /* Odd part */ + + z1 = (JPEG_INT32) wsptr[7]; + z2 = (JPEG_INT32) wsptr[5]; + z3 = (JPEG_INT32) wsptr[3]; + z4 = (JPEG_INT32) wsptr[1]; + + tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */ + + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */ + + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */ + + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */ + + tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */ + + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */ + + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */ + + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp2, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + outptr[3] = range_limit[(int) DESCALE(tmp10 - tmp2, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE(tmp12 + tmp0, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + outptr[2] = range_limit[(int) DESCALE(tmp12 - tmp0, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 2x2 output block. + */ + +GLOBAL(void) +jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + JPEG_INT32 tmp0, tmp10, z1; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE*2]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) { + /* Don't bother to process columns 2,4,6 */ + if (ctr == DCTSIZE-2 || ctr == DCTSIZE-4 || ctr == DCTSIZE-6) + continue; + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*3] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*7] == 0) { + /* AC terms all zero; we need not examine terms 2,4,6 for 2x2 output */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + + continue; + } + + /* Even part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp10 = z1 << (CONST_BITS+2); + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + tmp0 = MULTIPLY(z1, - FIX_0_720959822); /* sqrt(2) * (c7-c5+c3-c1) */ + z1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp0 += MULTIPLY(z1, FIX_0_850430095); /* sqrt(2) * (-c1+c3+c5+c7) */ + z1 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp0 += MULTIPLY(z1, - FIX_1_272758580); /* sqrt(2) * (-c1+c3-c5-c7) */ + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp0 += MULTIPLY(z1, FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */ + + /* Final output stage */ + + wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp0, CONST_BITS-PASS1_BITS+2); + wsptr[DCTSIZE*1] = (int) DESCALE(tmp10 - tmp0, CONST_BITS-PASS1_BITS+2); + } + + /* Pass 2: process 2 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 2; ctr++) { + outptr = output_buf[ctr] + output_col; + /* It's not clear whether a zero row test is worthwhile here ... */ + +#ifndef NO_ZERO_ROW_TEST + if (wsptr[1] == 0 && wsptr[3] == 0 && wsptr[5] == 0 && wsptr[7] == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[(int) DESCALE((JPEG_INT32) wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part */ + + tmp10 = ((JPEG_INT32) wsptr[0]) << (CONST_BITS+2); + + /* Odd part */ + + tmp0 = MULTIPLY((JPEG_INT32) wsptr[7], - FIX_0_720959822) /* sqrt(2) * (c7-c5+c3-c1) */ + + MULTIPLY((JPEG_INT32) wsptr[5], FIX_0_850430095) /* sqrt(2) * (-c1+c3+c5+c7) */ + + MULTIPLY((JPEG_INT32) wsptr[3], - FIX_1_272758580) /* sqrt(2) * (-c1+c3-c5-c7) */ + + MULTIPLY((JPEG_INT32) wsptr[1], FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3+2) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3+2) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 1x1 output block. + */ + +GLOBAL(void) +jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + int dcval; + ISLOW_MULT_TYPE * quantptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + SHIFT_TEMPS + + /* We hardly need an inverse DCT routine for this: just take the + * average pixel value, which is one-eighth of the DC coefficient. + */ + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + dcval = DEQUANTIZE(coef_block[0], quantptr[0]); + dcval = (int) DESCALE((JPEG_INT32) dcval, 3); + + output_buf[0][output_col] = range_limit[dcval & RANGE_MASK]; +} + +#endif /* IDCT_SCALING_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jinclude.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jinclude.h new file mode 100644 index 0000000000..0a4f15146a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jinclude.h @@ -0,0 +1,91 @@ +/* + * jinclude.h + * + * Copyright (C) 1991-1994, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file exists to provide a single place to fix any problems with + * including the wrong system include files. (Common problems are taken + * care of by the standard jconfig symbols, but on really weird systems + * you may have to edit this file.) + * + * NOTE: this file is NOT intended to be included by applications using the + * JPEG library. Most applications need only include jpeglib.h. + */ + + +/* Include auto-config file to find out which system include files we need. */ + +#include "jconfig.h" /* auto configuration options */ +#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ + +/* + * We need the NULL macro and size_t typedef. + * On an ANSI-conforming system it is sufficient to include . + * Otherwise, we get them from or ; we may have to + * pull in as well. + * Note that the core JPEG library does not require ; + * only the default error handler and data source/destination modules do. + * But we must pull it in because of the references to FILE in jpeglib.h. + * You can remove those references if you want to compile without . + */ + +#ifdef HAVE_STDDEF_H +#include +#endif + +#ifdef HAVE_STDLIB_H +#include +#endif + +#ifdef NEED_SYS_TYPES_H +#include +#endif + +#include + +/* + * We need memory copying and zeroing functions, plus strncpy(). + * ANSI and System V implementations declare these in . + * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). + * Some systems may declare memset and memcpy in . + * + * NOTE: we assume the size parameters to these functions are of type size_t. + * Change the casts in these macros if not! + */ + +#ifdef NEED_BSD_STRINGS + +#include +#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) +#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) + +#else /* not BSD, assume ANSI/SysV string lib */ + +#include +#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) +#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) + +#endif + +/* + * In ANSI C, and indeed any rational implementation, size_t is also the + * type returned by sizeof(). However, it seems there are some irrational + * implementations out there, in which sizeof() returns an int even though + * size_t is defined as long or unsigned long. To ensure consistent results + * we always use this SIZEOF() macro in place of using sizeof() directly. + */ + +#define SIZEOF(object) ((size_t) sizeof(object)) + +/* + * The modules that use fread() and fwrite() always invoke them through + * these macros. On some systems you may need to twiddle the argument casts. + * CAUTION: argument order is different from underlying functions! + */ + +#define JFREAD(file,buf,sizeofbuf) \ + ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) +#define JFWRITE(file,buf,sizeofbuf) \ + ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemansi.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemansi.c new file mode 100644 index 0000000000..2d93e49625 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemansi.c @@ -0,0 +1,167 @@ +/* + * jmemansi.c + * + * Copyright (C) 1992-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides a simple generic implementation of the system- + * dependent portion of the JPEG memory manager. This implementation + * assumes that you have the ANSI-standard library routine tmpfile(). + * Also, the problem of determining the amount of memory available + * is shoved onto the user. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + +#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ +#define SEEK_SET 0 /* if not, assume 0 is correct */ +#endif + + +/* + * Memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: although we include FAR keywords in the routine declarations, + * this file won't actually work in 80x86 small/medium model; at least, + * you probably won't be able to process useful-size images in only 64KB. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * It's impossible to do this in a portable way; our current solution is + * to make the user tell us (with a default value set at compile time). + * If you can actually get the available space, it's a good idea to subtract + * a slop factor of 5% or so. + */ + +#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ +#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ +#endif + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return cinfo->mem->max_memory_to_use - already_allocated; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + + +METHODDEF(void) +read_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFREAD(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFWRITE(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_backing_store (j_common_ptr cinfo, backing_store_ptr info) +{ + fclose(info->temp_file); + /* Since this implementation uses tmpfile() to create the file, + * no explicit file deletion is needed. + */ +} + + +/* + * Initial opening of a backing-store object. + * + * This version uses tmpfile(), which constructs a suitable file name + * behind the scenes. We don't have to use info->temp_name[] at all; + * indeed, we can't even find out the actual name of the temp file. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + if ((info->temp_file = tmpfile()) == NULL) + ERREXITS(cinfo, JERR_TFILE_CREATE, ""); + info->read_backing_store = read_backing_store; + info->write_backing_store = write_backing_store; + info->close_backing_store = close_backing_store; +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemdos.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemdos.c new file mode 100644 index 0000000000..d64835d57c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemdos.c @@ -0,0 +1,638 @@ +/* + * jmemdos.c + * + * Copyright (C) 1992-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides an MS-DOS-compatible implementation of the system- + * dependent portion of the JPEG memory manager. Temporary data can be + * stored in extended or expanded memory as well as in regular DOS files. + * + * If you use this file, you must be sure that NEED_FAR_POINTERS is defined + * if you compile in a small-data memory model; it should NOT be defined if + * you use a large-data memory model. This file is not recommended if you + * are using a flat-memory-space 386 environment such as DJGCC or Watcom C. + * Also, this code will NOT work if struct fields are aligned on greater than + * 2-byte boundaries. + * + * Based on code contributed by Ge' Weijers. + */ + +/* + * If you have both extended and expanded memory, you may want to change the + * order in which they are tried in jopen_backing_store. On a 286 machine + * expanded memory is usually faster, since extended memory access involves + * an expensive protected-mode-and-back switch. On 386 and better, extended + * memory is usually faster. As distributed, the code tries extended memory + * first (what? not everyone has a 386? :-). + * + * You can disable use of extended/expanded memory entirely by altering these + * definitions or overriding them from the Makefile (eg, -DEMS_SUPPORTED=0). + */ + +#ifndef XMS_SUPPORTED +#define XMS_SUPPORTED 1 +#endif +#ifndef EMS_SUPPORTED +#define EMS_SUPPORTED 1 +#endif + + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare these */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +extern char * getenv JPP((const char * name)); +#endif + +#ifdef NEED_FAR_POINTERS + +#ifdef __TURBOC__ +/* These definitions work for Borland C (Turbo C) */ +#include /* need farmalloc(), farfree() */ +#define far_malloc(x) farmalloc(x) +#define far_free(x) farfree(x) +#else +/* These definitions work for Microsoft C and compatible compilers */ +#include /* need _fmalloc(), _ffree() */ +#define far_malloc(x) _fmalloc(x) +#define far_free(x) _ffree(x) +#endif + +#else /* not NEED_FAR_POINTERS */ + +#define far_malloc(x) malloc(x) +#define far_free(x) free(x) + +#endif /* NEED_FAR_POINTERS */ + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#else +#define READ_BINARY "rb" +#endif + +#ifndef USE_MSDOS_MEMMGR /* make sure user got configuration right */ + You forgot to define USE_MSDOS_MEMMGR in jconfig.h. /* deliberate syntax error */ +#endif + +#if MAX_ALLOC_CHUNK >= 65535L /* make sure jconfig.h got this right */ + MAX_ALLOC_CHUNK should be less than 64K. /* deliberate syntax error */ +#endif + + +/* + * Declarations for assembly-language support routines (see jmemdosa.asm). + * + * The functions are declared "far" as are all their pointer arguments; + * this ensures the assembly source code will work regardless of the + * compiler memory model. We assume "short" is 16 bits, "long" is 32. + */ + +typedef void far * XMSDRIVER; /* actually a pointer to code */ +typedef struct { /* registers for calling XMS driver */ + unsigned short ax, dx, bx; + void far * ds_si; + } XMScontext; +typedef struct { /* registers for calling EMS driver */ + unsigned short ax, dx, bx; + void far * ds_si; + } EMScontext; + +extern short far jdos_open JPP((short far * handle, char far * filename)); +extern short far jdos_close JPP((short handle)); +extern short far jdos_seek JPP((short handle, long offset)); +extern short far jdos_read JPP((short handle, void far * buffer, + unsigned short count)); +extern short far jdos_write JPP((short handle, void far * buffer, + unsigned short count)); +extern void far jxms_getdriver JPP((XMSDRIVER far *)); +extern void far jxms_calldriver JPP((XMSDRIVER, XMScontext far *)); +extern short far jems_available JPP((void)); +extern void far jems_calldriver JPP((EMScontext far *)); + + +/* + * Selection of a file name for a temporary file. + * This is highly system-dependent, and you may want to customize it. + */ + +static int next_file_num; /* to distinguish among several temp files */ + +LOCAL(void) +select_file_name (char * fname) +{ + const char * env; + char * ptr; + FILE * tfile; + + /* Keep generating file names till we find one that's not in use */ + for (;;) { + /* Get temp directory name from environment TMP or TEMP variable; + * if none, use "." + */ + if ((env = (const char *) getenv("TMP")) == NULL) + if ((env = (const char *) getenv("TEMP")) == NULL) + env = "."; + if (*env == '\0') /* null string means "." */ + env = "."; + ptr = fname; /* copy name to fname */ + while (*env != '\0') + *ptr++ = *env++; + if (ptr[-1] != '\\' && ptr[-1] != '/') + *ptr++ = '\\'; /* append backslash if not in env variable */ + /* Append a suitable file name */ + next_file_num++; /* advance counter */ + sprintf(ptr, "JPG%03d.TMP", next_file_num); + /* Probe to see if file name is already in use */ + if ((tfile = fopen(fname, READ_BINARY)) == NULL) + break; + fclose(tfile); /* oops, it's there; close tfile & try again */ + } +} + + +/* + * Near-memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are allocated in far memory, if possible + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) far_malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + far_free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * It's impossible to do this in a portable way; our current solution is + * to make the user tell us (with a default value set at compile time). + * If you can actually get the available space, it's a good idea to subtract + * a slop factor of 5% or so. + */ + +#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ +#define DEFAULT_MAX_MEM 300000L /* for total usage about 450K */ +#endif + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return cinfo->mem->max_memory_to_use - already_allocated; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + +/* + * For MS-DOS we support three types of backing storage: + * 1. Conventional DOS files. We access these by direct DOS calls rather + * than via the stdio package. This provides a bit better performance, + * but the real reason is that the buffers to be read or written are FAR. + * The stdio library for small-data memory models can't cope with that. + * 2. Extended memory, accessed per the XMS V2.0 specification. + * 3. Expanded memory, accessed per the LIM/EMS 4.0 specification. + * You'll need copies of those specs to make sense of the related code. + * The specs are available by Internet FTP from the SIMTEL archives + * (oak.oakland.edu and its various mirror sites). See files + * pub/msdos/microsoft/xms20.arc and pub/msdos/info/limems41.zip. + */ + + +/* + * Access methods for a DOS file. + */ + + +METHODDEF(void) +read_file_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (jdos_seek(info->handle.file_handle, file_offset)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ + if (byte_count > 65535L) /* safety check */ + ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); + if (jdos_read(info->handle.file_handle, buffer_address, + (unsigned short) byte_count)) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_file_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (jdos_seek(info->handle.file_handle, file_offset)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ + if (byte_count > 65535L) /* safety check */ + ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); + if (jdos_write(info->handle.file_handle, buffer_address, + (unsigned short) byte_count)) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_file_store (j_common_ptr cinfo, backing_store_ptr info) +{ + jdos_close(info->handle.file_handle); /* close the file */ + remove(info->temp_name); /* delete the file */ +/* If your system doesn't have remove(), try unlink() instead. + * remove() is the ANSI-standard name for this function, but + * unlink() was more common in pre-ANSI systems. + */ + TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); +} + + +LOCAL(wxjpeg_boolean) +open_file_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + short handle; + + select_file_name(info->temp_name); + if (jdos_open((short far *) & handle, (char far *) info->temp_name)) { + /* might as well exit since jpeg_open_backing_store will fail anyway */ + ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); + return FALSE; + } + info->handle.file_handle = handle; + info->read_backing_store = read_file_store; + info->write_backing_store = write_file_store; + info->close_backing_store = close_file_store; + TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); + return TRUE; /* succeeded */ +} + + +/* + * Access methods for extended memory. + */ + +#if XMS_SUPPORTED + +static XMSDRIVER xms_driver; /* saved address of XMS driver */ + +typedef union { /* either long offset or real-mode pointer */ + long offset; + void far * ptr; + } XMSPTR; + +typedef struct { /* XMS move specification structure */ + long length; + XMSH src_handle; + XMSPTR src; + XMSH dst_handle; + XMSPTR dst; + } XMSspec; + +#define ODD(X) (((X) & 1L) != 0) + + +METHODDEF(void) +read_xms_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + XMScontext ctx; + XMSspec spec; + char endbuffer[2]; + + /* The XMS driver can't cope with an odd length, so handle the last byte + * specially if byte_count is odd. We don't expect this to be common. + */ + + spec.length = byte_count & (~ 1L); + spec.src_handle = info->handle.xms_handle; + spec.src.offset = file_offset; + spec.dst_handle = 0; + spec.dst.ptr = buffer_address; + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x0b00; /* EMB move */ + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax != 1) + ERREXIT(cinfo, JERR_XMS_READ); + + if (ODD(byte_count)) { + read_xms_store(cinfo, info, (void FAR *) endbuffer, + file_offset + byte_count - 1L, 2L); + ((char FAR *) buffer_address)[byte_count - 1L] = endbuffer[0]; + } +} + + +METHODDEF(void) +write_xms_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + XMScontext ctx; + XMSspec spec; + char endbuffer[2]; + + /* The XMS driver can't cope with an odd length, so handle the last byte + * specially if byte_count is odd. We don't expect this to be common. + */ + + spec.length = byte_count & (~ 1L); + spec.src_handle = 0; + spec.src.ptr = buffer_address; + spec.dst_handle = info->handle.xms_handle; + spec.dst.offset = file_offset; + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x0b00; /* EMB move */ + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax != 1) + ERREXIT(cinfo, JERR_XMS_WRITE); + + if (ODD(byte_count)) { + read_xms_store(cinfo, info, (void FAR *) endbuffer, + file_offset + byte_count - 1L, 2L); + endbuffer[0] = ((char FAR *) buffer_address)[byte_count - 1L]; + write_xms_store(cinfo, info, (void FAR *) endbuffer, + file_offset + byte_count - 1L, 2L); + } +} + + +METHODDEF(void) +close_xms_store (j_common_ptr cinfo, backing_store_ptr info) +{ + XMScontext ctx; + + ctx.dx = info->handle.xms_handle; + ctx.ax = 0x0a00; + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + TRACEMS1(cinfo, 1, JTRC_XMS_CLOSE, info->handle.xms_handle); + /* we ignore any error return from the driver */ +} + + +LOCAL(wxjpeg_boolean) +open_xms_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + XMScontext ctx; + + /* Get address of XMS driver */ + jxms_getdriver((XMSDRIVER far *) & xms_driver); + if (xms_driver == NULL) + return FALSE; /* no driver to be had */ + + /* Get version number, must be >= 2.00 */ + ctx.ax = 0x0000; + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax < (unsigned short) 0x0200) + return FALSE; + + /* Try to get space (expressed in kilobytes) */ + ctx.dx = (unsigned short) ((total_bytes_needed + 1023L) >> 10); + ctx.ax = 0x0900; + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax != 1) + return FALSE; + + /* Succeeded, save the handle and away we go */ + info->handle.xms_handle = ctx.dx; + info->read_backing_store = read_xms_store; + info->write_backing_store = write_xms_store; + info->close_backing_store = close_xms_store; + TRACEMS1(cinfo, 1, JTRC_XMS_OPEN, ctx.dx); + return TRUE; /* succeeded */ +} + +#endif /* XMS_SUPPORTED */ + + +/* + * Access methods for expanded memory. + */ + +#if EMS_SUPPORTED + +/* The EMS move specification structure requires word and long fields aligned + * at odd byte boundaries. Some compilers will align struct fields at even + * byte boundaries. While it's usually possible to force byte alignment, + * that causes an overall performance penalty and may pose problems in merging + * JPEG into a larger application. Instead we accept some rather dirty code + * here. Note this code would fail if the hardware did not allow odd-byte + * word & long accesses, but all 80x86 CPUs do. + */ + +typedef void far * EMSPTR; + +typedef union { /* EMS move specification structure */ + long length; /* It's easy to access first 4 bytes */ + char bytes[18]; /* Misaligned fields in here! */ + } EMSspec; + +/* Macros for accessing misaligned fields */ +#define FIELD_AT(spec,offset,type) (*((type *) &(spec.bytes[offset]))) +#define SRC_TYPE(spec) FIELD_AT(spec,4,char) +#define SRC_HANDLE(spec) FIELD_AT(spec,5,EMSH) +#define SRC_OFFSET(spec) FIELD_AT(spec,7,unsigned short) +#define SRC_PAGE(spec) FIELD_AT(spec,9,unsigned short) +#define SRC_PTR(spec) FIELD_AT(spec,7,EMSPTR) +#define DST_TYPE(spec) FIELD_AT(spec,11,char) +#define DST_HANDLE(spec) FIELD_AT(spec,12,EMSH) +#define DST_OFFSET(spec) FIELD_AT(spec,14,unsigned short) +#define DST_PAGE(spec) FIELD_AT(spec,16,unsigned short) +#define DST_PTR(spec) FIELD_AT(spec,14,EMSPTR) + +#define EMSPAGESIZE 16384L /* gospel, see the EMS specs */ + +#define HIBYTE(W) (((W) >> 8) & 0xFF) +#define LOBYTE(W) ((W) & 0xFF) + + +METHODDEF(void) +read_ems_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + EMScontext ctx; + EMSspec spec; + + spec.length = byte_count; + SRC_TYPE(spec) = 1; + SRC_HANDLE(spec) = info->handle.ems_handle; + SRC_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); + SRC_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); + DST_TYPE(spec) = 0; + DST_HANDLE(spec) = 0; + DST_PTR(spec) = buffer_address; + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x5700; /* move memory region */ + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + ERREXIT(cinfo, JERR_EMS_READ); +} + + +METHODDEF(void) +write_ems_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + EMScontext ctx; + EMSspec spec; + + spec.length = byte_count; + SRC_TYPE(spec) = 0; + SRC_HANDLE(spec) = 0; + SRC_PTR(spec) = buffer_address; + DST_TYPE(spec) = 1; + DST_HANDLE(spec) = info->handle.ems_handle; + DST_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); + DST_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x5700; /* move memory region */ + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + ERREXIT(cinfo, JERR_EMS_WRITE); +} + + +METHODDEF(void) +close_ems_store (j_common_ptr cinfo, backing_store_ptr info) +{ + EMScontext ctx; + + ctx.ax = 0x4500; + ctx.dx = info->handle.ems_handle; + jems_calldriver((EMScontext far *) & ctx); + TRACEMS1(cinfo, 1, JTRC_EMS_CLOSE, info->handle.ems_handle); + /* we ignore any error return from the driver */ +} + + +LOCAL(wxjpeg_boolean) +open_ems_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + EMScontext ctx; + + /* Is EMS driver there? */ + if (! jems_available()) + return FALSE; + + /* Get status, make sure EMS is OK */ + ctx.ax = 0x4000; + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + return FALSE; + + /* Get version, must be >= 4.0 */ + ctx.ax = 0x4600; + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0 || LOBYTE(ctx.ax) < 0x40) + return FALSE; + + /* Try to allocate requested space */ + ctx.ax = 0x4300; + ctx.bx = (unsigned short) ((total_bytes_needed + EMSPAGESIZE-1L) / EMSPAGESIZE); + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + return FALSE; + + /* Succeeded, save the handle and away we go */ + info->handle.ems_handle = ctx.dx; + info->read_backing_store = read_ems_store; + info->write_backing_store = write_ems_store; + info->close_backing_store = close_ems_store; + TRACEMS1(cinfo, 1, JTRC_EMS_OPEN, ctx.dx); + return TRUE; /* succeeded */ +} + +#endif /* EMS_SUPPORTED */ + + +/* + * Initial opening of a backing-store object. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + /* Try extended memory, then expanded memory, then regular file. */ +#if XMS_SUPPORTED + if (open_xms_store(cinfo, info, total_bytes_needed)) + return; +#endif +#if EMS_SUPPORTED + if (open_ems_store(cinfo, info, total_bytes_needed)) + return; +#endif + if (open_file_store(cinfo, info, total_bytes_needed)) + return; + ERREXITS(cinfo, JERR_TFILE_CREATE, ""); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + next_file_num = 0; /* initialize temp file name generator */ + return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* Microsoft C, at least in v6.00A, will not successfully reclaim freed + * blocks of size > 32Kbytes unless we give it a kick in the rear, like so: + */ +#ifdef NEED_FHEAPMIN + _fheapmin(); +#endif +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemdosa.asm b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemdosa.asm new file mode 100644 index 0000000000..ecd43729fe --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemdosa.asm @@ -0,0 +1,379 @@ +; +; jmemdosa.asm +; +; Copyright (C) 1992, Thomas G. Lane. +; This file is part of the Independent JPEG Group's software. +; For conditions of distribution and use, see the accompanying README file. +; +; This file contains low-level interface routines to support the MS-DOS +; backing store manager (jmemdos.c). Routines are provided to access disk +; files through direct DOS calls, and to access XMS and EMS drivers. +; +; This file should assemble with Microsoft's MASM or any compatible +; assembler (including Borland's Turbo Assembler). If you haven't got +; a compatible assembler, better fall back to jmemansi.c or jmemname.c. +; +; To minimize dependence on the C compiler's register usage conventions, +; we save and restore all 8086 registers, even though most compilers only +; require SI,DI,DS to be preserved. Also, we use only 16-bit-wide return +; values, which everybody returns in AX. +; +; Based on code contributed by Ge' Weijers. +; + +JMEMDOSA_TXT segment byte public 'CODE' + + assume cs:JMEMDOSA_TXT + + public _jdos_open + public _jdos_close + public _jdos_seek + public _jdos_read + public _jdos_write + public _jxms_getdriver + public _jxms_calldriver + public _jems_available + public _jems_calldriver + +; +; short far jdos_open (short far * handle, char far * filename) +; +; Create and open a temporary file +; +_jdos_open proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov cx,0 ; normal file attributes + lds dx,dword ptr [bp+10] ; get filename pointer + mov ah,3ch ; create file + int 21h + jc open_err ; if failed, return error code + lds bx,dword ptr [bp+6] ; get handle pointer + mov word ptr [bx],ax ; save the handle + xor ax,ax ; return zero for OK +open_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_open endp + + +; +; short far jdos_close (short handle) +; +; Close the file handle +; +_jdos_close proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + mov ah,3eh ; close file + int 21h + jc close_err ; if failed, return error code + xor ax,ax ; return zero for OK +close_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_close endp + + +; +; short far jdos_seek (short handle, long offset) +; +; Set file position +; +_jdos_seek proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + mov dx,word ptr [bp+8] ; LS offset + mov cx,word ptr [bp+10] ; MS offset + mov ax,4200h ; absolute seek + int 21h + jc seek_err ; if failed, return error code + xor ax,ax ; return zero for OK +seek_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_seek endp + + +; +; short far jdos_read (short handle, void far * buffer, unsigned short count) +; +; Read from file +; +_jdos_read proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + lds dx,dword ptr [bp+8] ; buffer address + mov cx,word ptr [bp+12] ; number of bytes + mov ah,3fh ; read file + int 21h + jc read_err ; if failed, return error code + cmp ax,word ptr [bp+12] ; make sure all bytes were read + je read_ok + mov ax,1 ; else return 1 for not OK + jmp short read_err +read_ok: xor ax,ax ; return zero for OK +read_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_read endp + + +; +; short far jdos_write (short handle, void far * buffer, unsigned short count) +; +; Write to file +; +_jdos_write proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + lds dx,dword ptr [bp+8] ; buffer address + mov cx,word ptr [bp+12] ; number of bytes + mov ah,40h ; write file + int 21h + jc write_err ; if failed, return error code + cmp ax,word ptr [bp+12] ; make sure all bytes written + je write_ok + mov ax,1 ; else return 1 for not OK + jmp short write_err +write_ok: xor ax,ax ; return zero for OK +write_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_write endp + + +; +; void far jxms_getdriver (XMSDRIVER far *) +; +; Get the address of the XMS driver, or NULL if not available +; +_jxms_getdriver proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov ax,4300h ; call multiplex interrupt with + int 2fh ; a magic cookie, hex 4300 + cmp al,80h ; AL should contain hex 80 + je xmsavail + xor dx,dx ; no XMS driver available + xor ax,ax ; return a nil pointer + jmp short xmsavail_done +xmsavail: mov ax,4310h ; fetch driver address with + int 2fh ; another magic cookie + mov dx,es ; copy address to dx:ax + mov ax,bx +xmsavail_done: les bx,dword ptr [bp+6] ; get pointer to return value + mov word ptr es:[bx],ax + mov word ptr es:[bx+2],dx + pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jxms_getdriver endp + + +; +; void far jxms_calldriver (XMSDRIVER, XMScontext far *) +; +; The XMScontext structure contains values for the AX,DX,BX,SI,DS registers. +; These are loaded, the XMS call is performed, and the new values of the +; AX,DX,BX registers are written back to the context structure. +; +_jxms_calldriver proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + les bx,dword ptr [bp+10] ; get XMScontext pointer + mov ax,word ptr es:[bx] ; load registers + mov dx,word ptr es:[bx+2] + mov si,word ptr es:[bx+6] + mov ds,word ptr es:[bx+8] + mov bx,word ptr es:[bx+4] + call dword ptr [bp+6] ; call the driver + mov cx,bx ; save returned BX for a sec + les bx,dword ptr [bp+10] ; get XMScontext pointer + mov word ptr es:[bx],ax ; put back ax,dx,bx + mov word ptr es:[bx+2],dx + mov word ptr es:[bx+4],cx + pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jxms_calldriver endp + + +; +; short far jems_available (void) +; +; Have we got an EMS driver? (this comes straight from the EMS 4.0 specs) +; +_jems_available proc far + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov ax,3567h ; get interrupt vector 67h + int 21h + push cs + pop ds + mov di,000ah ; check offs 10 in returned seg + lea si,ASCII_device_name ; against literal string + mov cx,8 + cld + repe cmpsb + jne no_ems + mov ax,1 ; match, it's there + jmp short avail_done +no_ems: xor ax,ax ; it's not there +avail_done: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + ret + +ASCII_device_name db "EMMXXXX0" + +_jems_available endp + + +; +; void far jems_calldriver (EMScontext far *) +; +; The EMScontext structure contains values for the AX,DX,BX,SI,DS registers. +; These are loaded, the EMS trap is performed, and the new values of the +; AX,DX,BX registers are written back to the context structure. +; +_jems_calldriver proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + les bx,dword ptr [bp+6] ; get EMScontext pointer + mov ax,word ptr es:[bx] ; load registers + mov dx,word ptr es:[bx+2] + mov si,word ptr es:[bx+6] + mov ds,word ptr es:[bx+8] + mov bx,word ptr es:[bx+4] + int 67h ; call the EMS driver + mov cx,bx ; save returned BX for a sec + les bx,dword ptr [bp+6] ; get EMScontext pointer + mov word ptr es:[bx],ax ; put back ax,dx,bx + mov word ptr es:[bx+2],dx + mov word ptr es:[bx+4],cx + pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jems_calldriver endp + +JMEMDOSA_TXT ends + + end diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemmac.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemmac.c new file mode 100644 index 0000000000..106f9bea05 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemmac.c @@ -0,0 +1,289 @@ +/* + * jmemmac.c + * + * Copyright (C) 1992-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * jmemmac.c provides an Apple Macintosh implementation of the system- + * dependent portion of the JPEG memory manager. + * + * If you use jmemmac.c, then you must define USE_MAC_MEMMGR in the + * JPEG_INTERNALS part of jconfig.h. + * + * jmemmac.c uses the Macintosh toolbox routines NewPtr and DisposePtr + * instead of malloc and free. It accurately determines the amount of + * memory available by using CompactMem. Notice that if left to its + * own devices, this code can chew up all available space in the + * application's zone, with the exception of the rather small "slop" + * factor computed in jpeg_mem_available(). The application can ensure + * that more space is left over by reducing max_memory_to_use. + * + * Large images are swapped to disk using temporary files and System 7.0+'s + * temporary folder functionality. + * + * Note that jmemmac.c depends on two features of MacOS that were first + * introduced in System 7: FindFolder and the FSSpec-based calls. + * If your application uses jmemmac.c and is run under System 6 or earlier, + * and the jpeg library decides it needs a temporary file, it will abort, + * printing error messages about requiring System 7. (If no temporary files + * are created, it will run fine.) + * + * If you want to use jmemmac.c in an application that might be used with + * System 6 or earlier, then you should remove dependencies on FindFolder + * and the FSSpec calls. You will need to replace FindFolder with some + * other mechanism for finding a place to put temporary files, and you + * should replace the FSSpec calls with their HFS equivalents: + * + * FSpDelete -> HDelete + * FSpGetFInfo -> HGetFInfo + * FSpCreate -> HCreate + * FSpOpenDF -> HOpen *** Note: not HOpenDF *** + * FSMakeFSSpec -> (fill in spec by hand.) + * + * (Use HOpen instead of HOpenDF. HOpen is just a glue-interface to PBHOpen, + * which is on all HFS macs. HOpenDF is a System 7 addition which avoids the + * ages-old problem of names starting with a period.) + * + * Contributed by Sam Bushell (jsam@iagu.on.net) and + * Dan Gildor (gyld@in-touch.com). + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef USE_MAC_MEMMGR /* make sure user got configuration right */ + You forgot to define USE_MAC_MEMMGR in jconfig.h. /* deliberate syntax error */ +#endif + +#include /* we use the MacOS memory manager */ +#include /* we use the MacOS File stuff */ +#include /* we use the MacOS HFS stuff */ +#include /* for smSystemScript */ +#include /* we use Gestalt to test for specific functionality */ + +#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ +#define TEMP_FILE_NAME "JPG%03d.TMP" +#endif + +static int next_file_num; /* to distinguish among several temp files */ + + +/* + * Memory allocation and freeing are controlled by the MacOS library + * routines NewPtr() and DisposePtr(), which allocate fixed-address + * storage. Unfortunately, the IJG library isn't smart enough to cope + * with relocatable storage. + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) NewPtr(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + DisposePtr((Ptr) object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: we include FAR keywords in the routine declarations simply for + * consistency with the rest of the IJG code; FAR should expand to empty + * on rational architectures like the Mac. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) NewPtr(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + DisposePtr((Ptr) object); +} + + +/* + * This routine computes the total memory space available for allocation. + */ + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + long limit = cinfo->mem->max_memory_to_use - already_allocated; + long slop, mem; + + /* Don't ask for more than what application has told us we may use */ + if (max_bytes_needed > limit && limit > 0) + max_bytes_needed = limit; + /* Find whether there's a big enough free block in the heap. + * CompactMem tries to create a contiguous block of the requested size, + * and then returns the size of the largest free block (which could be + * much more or much less than we asked for). + * We add some slop to ensure we don't use up all available memory. + */ + slop = max_bytes_needed / 16 + 32768L; + mem = CompactMem(max_bytes_needed + slop) - slop; + if (mem < 0) + mem = 0; /* sigh, couldn't even get the slop */ + /* Don't take more than the application says we can have */ + if (mem > limit && limit > 0) + mem = limit; + return mem; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + + +METHODDEF(void) +read_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + long bytes = byte_count; + long retVal; + + if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr ) + ERREXIT(cinfo, JERR_TFILE_SEEK); + + retVal = FSRead ( info->temp_file, &bytes, + (unsigned char *) buffer_address ); + if ( retVal != noErr || bytes != byte_count ) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + long bytes = byte_count; + long retVal; + + if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr ) + ERREXIT(cinfo, JERR_TFILE_SEEK); + + retVal = FSWrite ( info->temp_file, &bytes, + (unsigned char *) buffer_address ); + if ( retVal != noErr || bytes != byte_count ) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_backing_store (j_common_ptr cinfo, backing_store_ptr info) +{ + FSClose ( info->temp_file ); + FSpDelete ( &(info->tempSpec) ); +} + + +/* + * Initial opening of a backing-store object. + * + * This version uses FindFolder to find the Temporary Items folder, + * and puts the temporary file in there. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + short tmpRef, vRefNum; + long dirID; + FInfo finderInfo; + FSSpec theSpec; + Str255 fName; + OSErr osErr; + long gestaltResponse = 0; + + /* Check that FSSpec calls are available. */ + osErr = Gestalt( gestaltFSAttr, &gestaltResponse ); + if ( ( osErr != noErr ) + || !( gestaltResponse & (1<temp_name, TEMP_FILE_NAME, next_file_num); + strcpy ( (Ptr)fName+1, info->temp_name ); + *fName = strlen (info->temp_name); + osErr = FSMakeFSSpec ( vRefNum, dirID, fName, &theSpec ); + + if ( (osErr = FSpGetFInfo ( &theSpec, &finderInfo ) ) != noErr ) + break; + } + + osErr = FSpCreate ( &theSpec, '????', '????', smSystemScript ); + if ( osErr != noErr ) + ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); + + osErr = FSpOpenDF ( &theSpec, fsRdWrPerm, &(info->temp_file) ); + if ( osErr != noErr ) + ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); + + info->tempSpec = theSpec; + + info->read_backing_store = read_backing_store; + info->write_backing_store = write_backing_store; + info->close_backing_store = close_backing_store; + TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + next_file_num = 0; + + /* max_memory_to_use will be initialized to FreeMem()'s result; + * the calling application might later reduce it, for example + * to leave room to invoke multiple JPEG objects. + * Note that FreeMem returns the total number of free bytes; + * it may not be possible to allocate a single block of this size. + */ + return FreeMem(); +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemmgr.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemmgr.c new file mode 100644 index 0000000000..173d9ded61 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemmgr.c @@ -0,0 +1,1118 @@ +/* + * jmemmgr.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the JPEG system-independent memory management + * routines. This code is usable across a wide variety of machines; most + * of the system dependencies have been isolated in a separate file. + * The major functions provided here are: + * * pool-based allocation and freeing of memory; + * * policy decisions about how to divide available memory among the + * virtual arrays; + * * control logic for swapping virtual arrays between main memory and + * backing storage. + * The separate system-dependent file provides the actual backing-storage + * access code, and it contains the policy decision about how much total + * main memory to use. + * This file is system-dependent in the sense that some of its functions + * are unnecessary in some systems. For example, if there is enough virtual + * memory so that backing storage will never be used, much of the virtual + * array control logic could be removed. (Of course, if you have that much + * memory then you shouldn't care about a little bit of unused code...) + */ + +#define JPEG_INTERNALS +#define AM_MEMORY_MANAGER /* we define jvirt_Xarray_control structs */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef NO_GETENV +#ifndef HAVE_STDLIB_H /* should declare getenv() */ +extern char * getenv JPP((const char * name)); +#endif +#endif + + +/* + * Some important notes: + * The allocation routines provided here must never return NULL. + * They should exit to error_exit if unsuccessful. + * + * It's not a good idea to try to merge the sarray and barray routines, + * even though they are textually almost the same, because samples are + * usually stored as bytes while coefficients are shorts or ints. Thus, + * in machines where byte pointers have a different representation from + * word pointers, the resulting machine code could not be the same. + */ + + +/* + * Many machines require storage alignment: longs must start on 4-byte + * boundaries, doubles on 8-byte boundaries, etc. On such machines, malloc() + * always returns pointers that are multiples of the worst-case alignment + * requirement, and we had better do so too. + * There isn't any really portable way to determine the worst-case alignment + * requirement. This module assumes that the alignment requirement is + * multiples of sizeof(ALIGN_TYPE). + * By default, we define ALIGN_TYPE as double. This is necessary on some + * workstations (where doubles really do need 8-byte alignment) and will work + * fine on nearly everything. If your machine has lesser alignment needs, + * you can save a few bytes by making ALIGN_TYPE smaller. + * The only place I know of where this will NOT work is certain Macintosh + * 680x0 compilers that define double as a 10-byte IEEE extended float. + * Doing 10-byte alignment is counterproductive because longwords won't be + * aligned well. Put "#define ALIGN_TYPE long" in jconfig.h if you have + * such a compiler. + */ + +#ifndef ALIGN_TYPE /* so can override from jconfig.h */ +#define ALIGN_TYPE double +#endif + + +/* + * We allocate objects from "pools", where each pool is gotten with a single + * request to jpeg_get_small() or jpeg_get_large(). There is no per-object + * overhead within a pool, except for alignment padding. Each pool has a + * header with a link to the next pool of the same class. + * Small and large pool headers are identical except that the latter's + * link pointer must be FAR on 80x86 machines. + * Notice that the "real" header fields are union'ed with a dummy ALIGN_TYPE + * field. This forces the compiler to make SIZEOF(small_pool_hdr) a multiple + * of the alignment requirement of ALIGN_TYPE. + */ + +typedef union small_pool_struct * small_pool_ptr; + +typedef union small_pool_struct { + struct { + small_pool_ptr next; /* next in list of pools */ + size_t bytes_used; /* how many bytes already used within pool */ + size_t bytes_left; /* bytes still available in this pool */ + } hdr; + ALIGN_TYPE dummy; /* included in union to ensure alignment */ +} small_pool_hdr; + +typedef union large_pool_struct FAR * large_pool_ptr; + +typedef union large_pool_struct { + struct { + large_pool_ptr next; /* next in list of pools */ + size_t bytes_used; /* how many bytes already used within pool */ + size_t bytes_left; /* bytes still available in this pool */ + } hdr; + ALIGN_TYPE dummy; /* included in union to ensure alignment */ +} large_pool_hdr; + + +/* + * Here is the full definition of a memory manager object. + */ + +typedef struct { + struct jpeg_memory_mgr pub; /* public fields */ + + /* Each pool identifier (lifetime class) names a linked list of pools. */ + small_pool_ptr small_list[JPOOL_NUMPOOLS]; + large_pool_ptr large_list[JPOOL_NUMPOOLS]; + + /* Since we only have one lifetime class of virtual arrays, only one + * linked list is necessary (for each datatype). Note that the virtual + * array control blocks being linked together are actually stored somewhere + * in the small-pool list. + */ + jvirt_sarray_ptr virt_sarray_list; + jvirt_barray_ptr virt_barray_list; + + /* This counts total space obtained from jpeg_get_small/large */ + long total_space_allocated; + + /* alloc_sarray and alloc_barray set this value for use by virtual + * array routines. + */ + JDIMENSION last_rowsperchunk; /* from most recent alloc_sarray/barray */ +} my_memory_mgr; + +typedef my_memory_mgr * my_mem_ptr; + + +/* + * The control blocks for virtual arrays. + * Note that these blocks are allocated in the "small" pool area. + * System-dependent info for the associated backing store (if any) is hidden + * inside the backing_store_info struct. + */ + +struct jvirt_sarray_control { + JSAMPARRAY mem_buffer; /* => the in-memory buffer */ + JDIMENSION rows_in_array; /* total virtual array height */ + JDIMENSION samplesperrow; /* width of array (and of memory buffer) */ + JDIMENSION maxaccess; /* max rows accessed by access_virt_sarray */ + JDIMENSION rows_in_mem; /* height of memory buffer */ + JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ + JDIMENSION cur_start_row; /* first logical row # in the buffer */ + JDIMENSION first_undef_row; /* row # of first uninitialized row */ + wxjpeg_boolean pre_zero; /* pre-zero mode requested? */ + wxjpeg_boolean dirty; /* do current buffer contents need written? */ + wxjpeg_boolean b_s_open; /* is backing-store data valid? */ + jvirt_sarray_ptr next; /* link to next virtual sarray control block */ + backing_store_info b_s_info; /* System-dependent control info */ +}; + +struct jvirt_barray_control { + JBLOCKARRAY mem_buffer; /* => the in-memory buffer */ + JDIMENSION rows_in_array; /* total virtual array height */ + JDIMENSION blocksperrow; /* width of array (and of memory buffer) */ + JDIMENSION maxaccess; /* max rows accessed by access_virt_barray */ + JDIMENSION rows_in_mem; /* height of memory buffer */ + JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ + JDIMENSION cur_start_row; /* first logical row # in the buffer */ + JDIMENSION first_undef_row; /* row # of first uninitialized row */ + wxjpeg_boolean pre_zero; /* pre-zero mode requested? */ + wxjpeg_boolean dirty; /* do current buffer contents need written? */ + wxjpeg_boolean b_s_open; /* is backing-store data valid? */ + jvirt_barray_ptr next; /* link to next virtual barray control block */ + backing_store_info b_s_info; /* System-dependent control info */ +}; + + +#ifdef MEM_STATS /* optional extra stuff for statistics */ + +LOCAL(void) +print_mem_stats (j_common_ptr cinfo, int pool_id) +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr shdr_ptr; + large_pool_ptr lhdr_ptr; + + /* Since this is only a debugging stub, we can cheat a little by using + * fprintf directly rather than going through the trace message code. + * This is helpful because message parm array can't handle longs. + */ + fprintf(stderr, "Freeing pool %d, total space = %ld\n", + pool_id, mem->total_space_allocated); + + for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL; + lhdr_ptr = lhdr_ptr->hdr.next) { + fprintf(stderr, " Large chunk used %ld\n", + (long) lhdr_ptr->hdr.bytes_used); + } + + for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL; + shdr_ptr = shdr_ptr->hdr.next) { + fprintf(stderr, " Small chunk used %ld free %ld\n", + (long) shdr_ptr->hdr.bytes_used, + (long) shdr_ptr->hdr.bytes_left); + } +} + +#endif /* MEM_STATS */ + + +LOCAL(void) +out_of_memory (j_common_ptr cinfo, int which) +/* Report an out-of-memory error and stop execution */ +/* If we compiled MEM_STATS support, report alloc requests before dying */ +{ +#ifdef MEM_STATS + cinfo->err->trace_level = 2; /* force self_destruct to report stats */ +#endif + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, which); +} + + +/* + * Allocation of "small" objects. + * + * For these, we use pooled storage. When a new pool must be created, + * we try to get enough space for the current request plus a "slop" factor, + * where the slop will be the amount of leftover space in the new pool. + * The speed vs. space tradeoff is largely determined by the slop values. + * A different slop value is provided for each pool class (lifetime), + * and we also distinguish the first pool of a class from later ones. + * NOTE: the values given work fairly well on both 16- and 32-bit-int + * machines, but may be too small if longs are 64 bits or more. + */ + +static const size_t first_pool_slop[JPOOL_NUMPOOLS] = +{ + 1600, /* first PERMANENT pool */ + 16000 /* first IMAGE pool */ +}; + +static const size_t extra_pool_slop[JPOOL_NUMPOOLS] = +{ + 0, /* additional PERMANENT pools */ + 5000 /* additional IMAGE pools */ +}; + +#define MIN_SLOP 50 /* greater than 0 to avoid futile looping */ + + +METHODDEF(void *) +alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject) +/* Allocate a "small" object */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr hdr_ptr, prev_hdr_ptr; + char * data_ptr; + size_t odd_bytes, min_request, slop; + + /* Check for unsatisfiable request (do now to ensure no overflow below) */ + if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(small_pool_hdr))) + out_of_memory(cinfo, 1); /* request exceeds malloc's ability */ + + /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ + odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); + if (odd_bytes > 0) + sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; + + /* See if space is available in any existing pool */ + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + prev_hdr_ptr = NULL; + hdr_ptr = mem->small_list[pool_id]; + while (hdr_ptr != NULL) { + if (hdr_ptr->hdr.bytes_left >= sizeofobject) + break; /* found pool with enough space */ + prev_hdr_ptr = hdr_ptr; + hdr_ptr = hdr_ptr->hdr.next; + } + + /* Time to make a new pool? */ + if (hdr_ptr == NULL) { + /* min_request is what we need now, slop is what will be leftover */ + min_request = sizeofobject + SIZEOF(small_pool_hdr); + if (prev_hdr_ptr == NULL) /* first pool in class? */ + slop = first_pool_slop[pool_id]; + else + slop = extra_pool_slop[pool_id]; + /* Don't ask for more than MAX_ALLOC_CHUNK */ + if (slop > (size_t) (MAX_ALLOC_CHUNK-min_request)) + slop = (size_t) (MAX_ALLOC_CHUNK-min_request); + /* Try to get space, if fail reduce slop and try again */ + for (;;) { + hdr_ptr = (small_pool_ptr) jpeg_get_small(cinfo, min_request + slop); + if (hdr_ptr != NULL) + break; + slop /= 2; + if (slop < MIN_SLOP) /* give up when it gets real small */ + out_of_memory(cinfo, 2); /* jpeg_get_small failed */ + } + mem->total_space_allocated += min_request + slop; + /* Success, initialize the new pool header and add to end of list */ + hdr_ptr->hdr.next = NULL; + hdr_ptr->hdr.bytes_used = 0; + hdr_ptr->hdr.bytes_left = sizeofobject + slop; + if (prev_hdr_ptr == NULL) /* first pool in class? */ + mem->small_list[pool_id] = hdr_ptr; + else + prev_hdr_ptr->hdr.next = hdr_ptr; + } + + /* OK, allocate the object from the current pool */ + data_ptr = (char *) (hdr_ptr + 1); /* point to first data byte in pool */ + data_ptr += hdr_ptr->hdr.bytes_used; /* point to place for object */ + hdr_ptr->hdr.bytes_used += sizeofobject; + hdr_ptr->hdr.bytes_left -= sizeofobject; + + return (void *) data_ptr; +} + + +/* + * Allocation of "large" objects. + * + * The external semantics of these are the same as "small" objects, + * except that FAR pointers are used on 80x86. However the pool + * management heuristics are quite different. We assume that each + * request is large enough that it may as well be passed directly to + * jpeg_get_large; the pool management just links everything together + * so that we can free it all on demand. + * Note: the major use of "large" objects is in JSAMPARRAY and JBLOCKARRAY + * structures. The routines that create these structures (see below) + * deliberately bunch rows together to ensure a large request size. + */ + +METHODDEF(void FAR *) +alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject) +/* Allocate a "large" object */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + large_pool_ptr hdr_ptr; + size_t odd_bytes; + + /* Check for unsatisfiable request (do now to ensure no overflow below) */ + if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr))) + out_of_memory(cinfo, 3); /* request exceeds malloc's ability */ + + /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ + odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); + if (odd_bytes > 0) + sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; + + /* Always make a new pool */ + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + hdr_ptr = (large_pool_ptr) jpeg_get_large(cinfo, sizeofobject + + SIZEOF(large_pool_hdr)); + if (hdr_ptr == NULL) + out_of_memory(cinfo, 4); /* jpeg_get_large failed */ + mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr); + + /* Success, initialize the new pool header and add to list */ + hdr_ptr->hdr.next = mem->large_list[pool_id]; + /* We maintain space counts in each pool header for statistical purposes, + * even though they are not needed for allocation. + */ + hdr_ptr->hdr.bytes_used = sizeofobject; + hdr_ptr->hdr.bytes_left = 0; + mem->large_list[pool_id] = hdr_ptr; + + return (void FAR *) (hdr_ptr + 1); /* point to first data byte in pool */ +} + + +/* + * Creation of 2-D sample arrays. + * The pointers are in near heap, the samples themselves in FAR heap. + * + * To minimize allocation overhead and to allow I/O of large contiguous + * blocks, we allocate the sample rows in groups of as many rows as possible + * without exceeding MAX_ALLOC_CHUNK total bytes per allocation request. + * NB: the virtual array control routines, later in this file, know about + * this chunking of rows. The rowsperchunk value is left in the mem manager + * object so that it can be saved away if this sarray is the workspace for + * a virtual array. + */ + +METHODDEF(JSAMPARRAY) +alloc_sarray (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, JDIMENSION numrows) +/* Allocate a 2-D sample array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + JSAMPARRAY result; + JSAMPROW workspace; + JDIMENSION rowsperchunk, currow, i; + long ltemp; + + /* Calculate max # of rows allowed in one allocation chunk */ + ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) / + ((long) samplesperrow * SIZEOF(JSAMPLE)); + if (ltemp <= 0) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + if (ltemp < (long) numrows) + rowsperchunk = (JDIMENSION) ltemp; + else + rowsperchunk = numrows; + mem->last_rowsperchunk = rowsperchunk; + + /* Get space for row pointers (small object) */ + result = (JSAMPARRAY) alloc_small(cinfo, pool_id, + (size_t) (numrows * SIZEOF(JSAMPROW))); + + /* Get the rows themselves (large objects) */ + currow = 0; + while (currow < numrows) { + rowsperchunk = MIN(rowsperchunk, numrows - currow); + workspace = (JSAMPROW) alloc_large(cinfo, pool_id, + (size_t) ((size_t) rowsperchunk * (size_t) samplesperrow + * SIZEOF(JSAMPLE))); + for (i = rowsperchunk; i > 0; i--) { + result[currow++] = workspace; + workspace += samplesperrow; + } + } + + return result; +} + + +/* + * Creation of 2-D coefficient-block arrays. + * This is essentially the same as the code for sample arrays, above. + */ + +METHODDEF(JBLOCKARRAY) +alloc_barray (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, JDIMENSION numrows) +/* Allocate a 2-D coefficient-block array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + JBLOCKARRAY result; + JBLOCKROW workspace; + JDIMENSION rowsperchunk, currow, i; + long ltemp; + + /* Calculate max # of rows allowed in one allocation chunk */ + ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) / + ((long) blocksperrow * SIZEOF(JBLOCK)); + if (ltemp <= 0) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + if (ltemp < (long) numrows) + rowsperchunk = (JDIMENSION) ltemp; + else + rowsperchunk = numrows; + mem->last_rowsperchunk = rowsperchunk; + + /* Get space for row pointers (small object) */ + result = (JBLOCKARRAY) alloc_small(cinfo, pool_id, + (size_t) (numrows * SIZEOF(JBLOCKROW))); + + /* Get the rows themselves (large objects) */ + currow = 0; + while (currow < numrows) { + rowsperchunk = MIN(rowsperchunk, numrows - currow); + workspace = (JBLOCKROW) alloc_large(cinfo, pool_id, + (size_t) ((size_t) rowsperchunk * (size_t) blocksperrow + * SIZEOF(JBLOCK))); + for (i = rowsperchunk; i > 0; i--) { + result[currow++] = workspace; + workspace += blocksperrow; + } + } + + return result; +} + + +/* + * About virtual array management: + * + * The above "normal" array routines are only used to allocate strip buffers + * (as wide as the image, but just a few rows high). Full-image-sized buffers + * are handled as "virtual" arrays. The array is still accessed a strip at a + * time, but the memory manager must save the whole array for repeated + * accesses. The intended implementation is that there is a strip buffer in + * memory (as high as is possible given the desired memory limit), plus a + * backing file that holds the rest of the array. + * + * The request_virt_array routines are told the total size of the image and + * the maximum number of rows that will be accessed at once. The in-memory + * buffer must be at least as large as the maxaccess value. + * + * The request routines create control blocks but not the in-memory buffers. + * That is postponed until realize_virt_arrays is called. At that time the + * total amount of space needed is known (approximately, anyway), so free + * memory can be divided up fairly. + * + * The access_virt_array routines are responsible for making a specific strip + * area accessible (after reading or writing the backing file, if necessary). + * Note that the access routines are told whether the caller intends to modify + * the accessed strip; during a read-only pass this saves having to rewrite + * data to disk. The access routines are also responsible for pre-zeroing + * any newly accessed rows, if pre-zeroing was requested. + * + * In current usage, the access requests are usually for nonoverlapping + * strips; that is, successive access start_row numbers differ by exactly + * num_rows = maxaccess. This means we can get good performance with simple + * buffer dump/reload logic, by making the in-memory buffer be a multiple + * of the access height; then there will never be accesses across bufferload + * boundaries. The code will still work with overlapping access requests, + * but it doesn't handle bufferload overlaps very efficiently. + */ + + +METHODDEF(jvirt_sarray_ptr) +request_virt_sarray (j_common_ptr cinfo, int pool_id, wxjpeg_boolean pre_zero, + JDIMENSION samplesperrow, JDIMENSION numrows, + JDIMENSION maxaccess) +/* Request a virtual 2-D sample array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + jvirt_sarray_ptr result; + + /* Only IMAGE-lifetime virtual arrays are currently supported */ + if (pool_id != JPOOL_IMAGE) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + /* get control block */ + result = (jvirt_sarray_ptr) alloc_small(cinfo, pool_id, + SIZEOF(struct jvirt_sarray_control)); + + result->mem_buffer = NULL; /* marks array not yet realized */ + result->rows_in_array = numrows; + result->samplesperrow = samplesperrow; + result->maxaccess = maxaccess; + result->pre_zero = pre_zero; + result->b_s_open = FALSE; /* no associated backing-store object */ + result->next = mem->virt_sarray_list; /* add to list of virtual arrays */ + mem->virt_sarray_list = result; + + return result; +} + + +METHODDEF(jvirt_barray_ptr) +request_virt_barray (j_common_ptr cinfo, int pool_id, wxjpeg_boolean pre_zero, + JDIMENSION blocksperrow, JDIMENSION numrows, + JDIMENSION maxaccess) +/* Request a virtual 2-D coefficient-block array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + jvirt_barray_ptr result; + + /* Only IMAGE-lifetime virtual arrays are currently supported */ + if (pool_id != JPOOL_IMAGE) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + /* get control block */ + result = (jvirt_barray_ptr) alloc_small(cinfo, pool_id, + SIZEOF(struct jvirt_barray_control)); + + result->mem_buffer = NULL; /* marks array not yet realized */ + result->rows_in_array = numrows; + result->blocksperrow = blocksperrow; + result->maxaccess = maxaccess; + result->pre_zero = pre_zero; + result->b_s_open = FALSE; /* no associated backing-store object */ + result->next = mem->virt_barray_list; /* add to list of virtual arrays */ + mem->virt_barray_list = result; + + return result; +} + + +METHODDEF(void) +realize_virt_arrays (j_common_ptr cinfo) +/* Allocate the in-memory buffers for any unrealized virtual arrays */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + long space_per_minheight, maximum_space, avail_mem; + long minheights, max_minheights; + jvirt_sarray_ptr sptr; + jvirt_barray_ptr bptr; + + /* Compute the minimum space needed (maxaccess rows in each buffer) + * and the maximum space needed (full image height in each buffer). + * These may be of use to the system-dependent jpeg_mem_available routine. + */ + space_per_minheight = 0; + maximum_space = 0; + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->mem_buffer == NULL) { /* if not realized yet */ + space_per_minheight += (long) sptr->maxaccess * + (long) sptr->samplesperrow * SIZEOF(JSAMPLE); + maximum_space += (long) sptr->rows_in_array * + (long) sptr->samplesperrow * SIZEOF(JSAMPLE); + } + } + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->mem_buffer == NULL) { /* if not realized yet */ + space_per_minheight += (long) bptr->maxaccess * + (long) bptr->blocksperrow * SIZEOF(JBLOCK); + maximum_space += (long) bptr->rows_in_array * + (long) bptr->blocksperrow * SIZEOF(JBLOCK); + } + } + + if (space_per_minheight <= 0) + return; /* no unrealized arrays, no work */ + + /* Determine amount of memory to actually use; this is system-dependent. */ + avail_mem = jpeg_mem_available(cinfo, space_per_minheight, maximum_space, + mem->total_space_allocated); + + /* If the maximum space needed is available, make all the buffers full + * height; otherwise parcel it out with the same number of minheights + * in each buffer. + */ + if (avail_mem >= maximum_space) + max_minheights = 1000000000L; + else { + max_minheights = avail_mem / space_per_minheight; + /* If there doesn't seem to be enough space, try to get the minimum + * anyway. This allows a "stub" implementation of jpeg_mem_available(). + */ + if (max_minheights <= 0) + max_minheights = 1; + } + + /* Allocate the in-memory buffers and initialize backing store as needed. */ + + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->mem_buffer == NULL) { /* if not realized yet */ + minheights = ((long) sptr->rows_in_array - 1L) / sptr->maxaccess + 1L; + if (minheights <= max_minheights) { + /* This buffer fits in memory */ + sptr->rows_in_mem = sptr->rows_in_array; + } else { + /* It doesn't fit in memory, create backing store. */ + sptr->rows_in_mem = (JDIMENSION) (max_minheights * sptr->maxaccess); + jpeg_open_backing_store(cinfo, & sptr->b_s_info, + (long) sptr->rows_in_array * + (long) sptr->samplesperrow * + (long) SIZEOF(JSAMPLE)); + sptr->b_s_open = TRUE; + } + sptr->mem_buffer = alloc_sarray(cinfo, JPOOL_IMAGE, + sptr->samplesperrow, sptr->rows_in_mem); + sptr->rowsperchunk = mem->last_rowsperchunk; + sptr->cur_start_row = 0; + sptr->first_undef_row = 0; + sptr->dirty = FALSE; + } + } + + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->mem_buffer == NULL) { /* if not realized yet */ + minheights = ((long) bptr->rows_in_array - 1L) / bptr->maxaccess + 1L; + if (minheights <= max_minheights) { + /* This buffer fits in memory */ + bptr->rows_in_mem = bptr->rows_in_array; + } else { + /* It doesn't fit in memory, create backing store. */ + bptr->rows_in_mem = (JDIMENSION) (max_minheights * bptr->maxaccess); + jpeg_open_backing_store(cinfo, & bptr->b_s_info, + (long) bptr->rows_in_array * + (long) bptr->blocksperrow * + (long) SIZEOF(JBLOCK)); + bptr->b_s_open = TRUE; + } + bptr->mem_buffer = alloc_barray(cinfo, JPOOL_IMAGE, + bptr->blocksperrow, bptr->rows_in_mem); + bptr->rowsperchunk = mem->last_rowsperchunk; + bptr->cur_start_row = 0; + bptr->first_undef_row = 0; + bptr->dirty = FALSE; + } + } +} + + +LOCAL(void) +do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, wxjpeg_boolean writing) +/* Do backing store read or write of a virtual sample array */ +{ + long bytesperrow, file_offset, byte_count, rows, thisrow, i; + + bytesperrow = (long) ptr->samplesperrow * SIZEOF(JSAMPLE); + file_offset = ptr->cur_start_row * bytesperrow; + /* Loop to read or write each allocation chunk in mem_buffer */ + for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { + /* One chunk, but check for short chunk at end of buffer */ + rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); + /* Transfer no more than is currently defined */ + thisrow = (long) ptr->cur_start_row + i; + rows = MIN(rows, (long) ptr->first_undef_row - thisrow); + /* Transfer no more than fits in file */ + rows = MIN(rows, (long) ptr->rows_in_array - thisrow); + if (rows <= 0) /* this chunk might be past end of file! */ + break; + byte_count = rows * bytesperrow; + if (writing) + (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + else + (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + file_offset += byte_count; + } +} + + +LOCAL(void) +do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, wxjpeg_boolean writing) +/* Do backing store read or write of a virtual coefficient-block array */ +{ + long bytesperrow, file_offset, byte_count, rows, thisrow, i; + + bytesperrow = (long) ptr->blocksperrow * SIZEOF(JBLOCK); + file_offset = ptr->cur_start_row * bytesperrow; + /* Loop to read or write each allocation chunk in mem_buffer */ + for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { + /* One chunk, but check for short chunk at end of buffer */ + rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); + /* Transfer no more than is currently defined */ + thisrow = (long) ptr->cur_start_row + i; + rows = MIN(rows, (long) ptr->first_undef_row - thisrow); + /* Transfer no more than fits in file */ + rows = MIN(rows, (long) ptr->rows_in_array - thisrow); + if (rows <= 0) /* this chunk might be past end of file! */ + break; + byte_count = rows * bytesperrow; + if (writing) + (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + else + (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + file_offset += byte_count; + } +} + + +METHODDEF(JSAMPARRAY) +access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + wxjpeg_boolean writable) +/* Access the part of a virtual sample array starting at start_row */ +/* and extending for num_rows rows. writable is true if */ +/* caller intends to modify the accessed area. */ +{ + JDIMENSION end_row = start_row + num_rows; + JDIMENSION undef_row; + + /* debugging check */ + if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || + ptr->mem_buffer == NULL) + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + + /* Make the desired part of the virtual array accessible */ + if (start_row < ptr->cur_start_row || + end_row > ptr->cur_start_row+ptr->rows_in_mem) { + if (! ptr->b_s_open) + ERREXIT(cinfo, JERR_VIRTUAL_BUG); + /* Flush old buffer contents if necessary */ + if (ptr->dirty) { + do_sarray_io(cinfo, ptr, TRUE); + ptr->dirty = FALSE; + } + /* Decide what part of virtual array to access. + * Algorithm: if target address > current window, assume forward scan, + * load starting at target address. If target address < current window, + * assume backward scan, load so that target area is top of window. + * Note that when switching from forward write to forward read, will have + * start_row = 0, so the limiting case applies and we load from 0 anyway. + */ + if (start_row > ptr->cur_start_row) { + ptr->cur_start_row = start_row; + } else { + /* use long arithmetic here to avoid overflow & unsigned problems */ + long ltemp; + + ltemp = (long) end_row - (long) ptr->rows_in_mem; + if (ltemp < 0) + ltemp = 0; /* don't fall off front end of file */ + ptr->cur_start_row = (JDIMENSION) ltemp; + } + /* Read in the selected part of the array. + * During the initial write pass, we will do no actual read + * because the selected part is all undefined. + */ + do_sarray_io(cinfo, ptr, FALSE); + } + /* Ensure the accessed part of the array is defined; prezero if needed. + * To improve locality of access, we only prezero the part of the array + * that the caller is about to access, not the entire in-memory array. + */ + if (ptr->first_undef_row < end_row) { + if (ptr->first_undef_row < start_row) { + if (writable) /* writer skipped over a section of array */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + undef_row = start_row; /* but reader is allowed to read ahead */ + } else { + undef_row = ptr->first_undef_row; + } + if (writable) + ptr->first_undef_row = end_row; + if (ptr->pre_zero) { + size_t bytesperrow = (size_t) ptr->samplesperrow * SIZEOF(JSAMPLE); + undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ + end_row -= ptr->cur_start_row; + while (undef_row < end_row) { + jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); + undef_row++; + } + } else { + if (! writable) /* reader looking at undefined data */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + } + } + /* Flag the buffer dirty if caller will write in it */ + if (writable) + ptr->dirty = TRUE; + /* Return address of proper part of the buffer */ + return ptr->mem_buffer + (start_row - ptr->cur_start_row); +} + + +METHODDEF(JBLOCKARRAY) +access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + wxjpeg_boolean writable) +/* Access the part of a virtual block array starting at start_row */ +/* and extending for num_rows rows. writable is true if */ +/* caller intends to modify the accessed area. */ +{ + JDIMENSION end_row = start_row + num_rows; + JDIMENSION undef_row; + + /* debugging check */ + if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || + ptr->mem_buffer == NULL) + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + + /* Make the desired part of the virtual array accessible */ + if (start_row < ptr->cur_start_row || + end_row > ptr->cur_start_row+ptr->rows_in_mem) { + if (! ptr->b_s_open) + ERREXIT(cinfo, JERR_VIRTUAL_BUG); + /* Flush old buffer contents if necessary */ + if (ptr->dirty) { + do_barray_io(cinfo, ptr, TRUE); + ptr->dirty = FALSE; + } + /* Decide what part of virtual array to access. + * Algorithm: if target address > current window, assume forward scan, + * load starting at target address. If target address < current window, + * assume backward scan, load so that target area is top of window. + * Note that when switching from forward write to forward read, will have + * start_row = 0, so the limiting case applies and we load from 0 anyway. + */ + if (start_row > ptr->cur_start_row) { + ptr->cur_start_row = start_row; + } else { + /* use long arithmetic here to avoid overflow & unsigned problems */ + long ltemp; + + ltemp = (long) end_row - (long) ptr->rows_in_mem; + if (ltemp < 0) + ltemp = 0; /* don't fall off front end of file */ + ptr->cur_start_row = (JDIMENSION) ltemp; + } + /* Read in the selected part of the array. + * During the initial write pass, we will do no actual read + * because the selected part is all undefined. + */ + do_barray_io(cinfo, ptr, FALSE); + } + /* Ensure the accessed part of the array is defined; prezero if needed. + * To improve locality of access, we only prezero the part of the array + * that the caller is about to access, not the entire in-memory array. + */ + if (ptr->first_undef_row < end_row) { + if (ptr->first_undef_row < start_row) { + if (writable) /* writer skipped over a section of array */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + undef_row = start_row; /* but reader is allowed to read ahead */ + } else { + undef_row = ptr->first_undef_row; + } + if (writable) + ptr->first_undef_row = end_row; + if (ptr->pre_zero) { + size_t bytesperrow = (size_t) ptr->blocksperrow * SIZEOF(JBLOCK); + undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ + end_row -= ptr->cur_start_row; + while (undef_row < end_row) { + jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); + undef_row++; + } + } else { + if (! writable) /* reader looking at undefined data */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + } + } + /* Flag the buffer dirty if caller will write in it */ + if (writable) + ptr->dirty = TRUE; + /* Return address of proper part of the buffer */ + return ptr->mem_buffer + (start_row - ptr->cur_start_row); +} + + +/* + * Release all objects belonging to a specified pool. + */ + +METHODDEF(void) +free_pool (j_common_ptr cinfo, int pool_id) +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr shdr_ptr; + large_pool_ptr lhdr_ptr; + size_t space_freed; + + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + +#ifdef MEM_STATS + if (cinfo->err->trace_level > 1) + print_mem_stats(cinfo, pool_id); /* print pool's memory usage statistics */ +#endif + + /* If freeing IMAGE pool, close any virtual arrays first */ + if (pool_id == JPOOL_IMAGE) { + jvirt_sarray_ptr sptr; + jvirt_barray_ptr bptr; + + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->b_s_open) { /* there may be no backing store */ + sptr->b_s_open = FALSE; /* prevent recursive close if error */ + (*sptr->b_s_info.close_backing_store) (cinfo, & sptr->b_s_info); + } + } + mem->virt_sarray_list = NULL; + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->b_s_open) { /* there may be no backing store */ + bptr->b_s_open = FALSE; /* prevent recursive close if error */ + (*bptr->b_s_info.close_backing_store) (cinfo, & bptr->b_s_info); + } + } + mem->virt_barray_list = NULL; + } + + /* Release large objects */ + lhdr_ptr = mem->large_list[pool_id]; + mem->large_list[pool_id] = NULL; + + while (lhdr_ptr != NULL) { + large_pool_ptr next_lhdr_ptr = lhdr_ptr->hdr.next; + space_freed = lhdr_ptr->hdr.bytes_used + + lhdr_ptr->hdr.bytes_left + + SIZEOF(large_pool_hdr); + jpeg_free_large(cinfo, (void FAR *) lhdr_ptr, space_freed); + mem->total_space_allocated -= space_freed; + lhdr_ptr = next_lhdr_ptr; + } + + /* Release small objects */ + shdr_ptr = mem->small_list[pool_id]; + mem->small_list[pool_id] = NULL; + + while (shdr_ptr != NULL) { + small_pool_ptr next_shdr_ptr = shdr_ptr->hdr.next; + space_freed = shdr_ptr->hdr.bytes_used + + shdr_ptr->hdr.bytes_left + + SIZEOF(small_pool_hdr); + jpeg_free_small(cinfo, (void *) shdr_ptr, space_freed); + mem->total_space_allocated -= space_freed; + shdr_ptr = next_shdr_ptr; + } +} + + +/* + * Close up shop entirely. + * Note that this cannot be called unless cinfo->mem is non-NULL. + */ + +METHODDEF(void) +self_destruct (j_common_ptr cinfo) +{ + int pool; + + /* Close all backing store, release all memory. + * Releasing pools in reverse order might help avoid fragmentation + * with some (brain-damaged) malloc libraries. + */ + for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { + free_pool(cinfo, pool); + } + + /* Release the memory manager control block too. */ + jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr)); + cinfo->mem = NULL; /* ensures I will be called only once */ + + jpeg_mem_term(cinfo); /* system-dependent cleanup */ +} + + +/* + * Memory manager initialization. + * When this is called, only the error manager pointer is valid in cinfo! + */ + +GLOBAL(void) +jinit_memory_mgr (j_common_ptr cinfo) +{ + my_mem_ptr mem; + long max_to_use; + int pool; + size_t test_mac; + + cinfo->mem = NULL; /* for safety if init fails */ + + /* Check for configuration errors. + * SIZEOF(ALIGN_TYPE) should be a power of 2; otherwise, it probably + * doesn't reflect any real hardware alignment requirement. + * The test is a little tricky: for X>0, X and X-1 have no one-bits + * in common if and only if X is a power of 2, ie has only one one-bit. + * Some compilers may give an "unreachable code" warning here; ignore it. + */ + if ((SIZEOF(ALIGN_TYPE) & (SIZEOF(ALIGN_TYPE)-1)) != 0) + ERREXIT(cinfo, JERR_BAD_ALIGN_TYPE); + /* MAX_ALLOC_CHUNK must be representable as type size_t, and must be + * a multiple of SIZEOF(ALIGN_TYPE). + * Again, an "unreachable code" warning may be ignored here. + * But a "constant too large" warning means you need to fix MAX_ALLOC_CHUNK. + */ + test_mac = (size_t) MAX_ALLOC_CHUNK; + if ((long) test_mac != MAX_ALLOC_CHUNK || + (MAX_ALLOC_CHUNK % SIZEOF(ALIGN_TYPE)) != 0) + ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); + + max_to_use = jpeg_mem_init(cinfo); /* system-dependent initialization */ + + /* Attempt to allocate memory manager's control block */ + mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr)); + + if (mem == NULL) { + jpeg_mem_term(cinfo); /* system-dependent cleanup */ + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0); + } + + /* OK, fill in the method pointers */ + mem->pub.alloc_small = alloc_small; + mem->pub.alloc_large = alloc_large; + mem->pub.alloc_sarray = alloc_sarray; + mem->pub.alloc_barray = alloc_barray; + mem->pub.request_virt_sarray = request_virt_sarray; + mem->pub.request_virt_barray = request_virt_barray; + mem->pub.realize_virt_arrays = realize_virt_arrays; + mem->pub.access_virt_sarray = access_virt_sarray; + mem->pub.access_virt_barray = access_virt_barray; + mem->pub.free_pool = free_pool; + mem->pub.self_destruct = self_destruct; + + /* Make MAX_ALLOC_CHUNK accessible to other modules */ + mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK; + + /* Initialize working state */ + mem->pub.max_memory_to_use = max_to_use; + + for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { + mem->small_list[pool] = NULL; + mem->large_list[pool] = NULL; + } + mem->virt_sarray_list = NULL; + mem->virt_barray_list = NULL; + + mem->total_space_allocated = SIZEOF(my_memory_mgr); + + /* Declare ourselves open for business */ + cinfo->mem = & mem->pub; + + /* Check for an environment variable JPEGMEM; if found, override the + * default max_memory setting from jpeg_mem_init. Note that the + * surrounding application may again override this value. + * If your system doesn't support getenv(), define NO_GETENV to disable + * this feature. + */ +#ifndef NO_GETENV + { char * memenv; + + if ((memenv = getenv("JPEGMEM")) != NULL) { + char ch = 'x'; + + if (sscanf(memenv, "%ld%c", &max_to_use, &ch) > 0) { + if (ch == 'm' || ch == 'M') + max_to_use *= 1000L; + mem->pub.max_memory_to_use = max_to_use * 1000L; + } + } + } +#endif + +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemname.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemname.c new file mode 100644 index 0000000000..ed96dee1bc --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemname.c @@ -0,0 +1,276 @@ +/* + * jmemname.c + * + * Copyright (C) 1992-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides a generic implementation of the system-dependent + * portion of the JPEG memory manager. This implementation assumes that + * you must explicitly construct a name for each temp file. + * Also, the problem of determining the amount of memory available + * is shoved onto the user. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + +#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ +#define SEEK_SET 0 /* if not, assume 0 is correct */ +#endif + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#define RW_BINARY "w+" +#else +#ifdef VMS /* VMS is very nonstandard */ +#define READ_BINARY "rb", "ctx=stm" +#define RW_BINARY "w+b", "ctx=stm" +#else /* standard ANSI-compliant case */ +#define READ_BINARY "rb" +#define RW_BINARY "w+b" +#endif +#endif + + +/* + * Selection of a file name for a temporary file. + * This is system-dependent! + * + * The code as given is suitable for most Unix systems, and it is easily + * modified for most non-Unix systems. Some notes: + * 1. The temp file is created in the directory named by TEMP_DIRECTORY. + * The default value is /usr/tmp, which is the conventional place for + * creating large temp files on Unix. On other systems you'll probably + * want to change the file location. You can do this by editing the + * #define, or (preferred) by defining TEMP_DIRECTORY in jconfig.h. + * + * 2. If you need to change the file name as well as its location, + * you can override the TEMP_FILE_NAME macro. (Note that this is + * actually a printf format string; it must contain %s and %d.) + * Few people should need to do this. + * + * 3. mktemp() is used to ensure that multiple processes running + * simultaneously won't select the same file names. If your system + * doesn't have mktemp(), define NO_MKTEMP to do it the hard way. + * (If you don't have , also define NO_ERRNO_H.) + * + * 4. You probably want to define NEED_SIGNAL_CATCHER so that cjpeg.c/djpeg.c + * will cause the temp files to be removed if you stop the program early. + */ + +#ifndef TEMP_DIRECTORY /* can override from jconfig.h or Makefile */ +#define TEMP_DIRECTORY "/usr/tmp/" /* recommended setting for Unix */ +#endif + +static int next_file_num; /* to distinguish among several temp files */ + +#ifdef NO_MKTEMP + +#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ +#define TEMP_FILE_NAME "%sJPG%03d.TMP" +#endif + +#ifndef NO_ERRNO_H +#include /* to define ENOENT */ +#endif + +/* ANSI C specifies that errno is a macro, but on older systems it's more + * likely to be a plain int variable. And not all versions of errno.h + * bother to declare it, so we have to in order to be most portable. Thus: + */ +#ifndef errno +extern int errno; +#endif + + +LOCAL(void) +select_file_name (char * fname) +{ + FILE * tfile; + + /* Keep generating file names till we find one that's not in use */ + for (;;) { + next_file_num++; /* advance counter */ + sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); + if ((tfile = fopen(fname, READ_BINARY)) == NULL) { + /* fopen could have failed for a reason other than the file not + * being there; for example, file there but unreadable. + * If isn't available, then we cannot test the cause. + */ +#ifdef ENOENT + if (errno != ENOENT) + continue; +#endif + break; + } + fclose(tfile); /* oops, it's there; close tfile & try again */ + } +} + +#else /* ! NO_MKTEMP */ + +/* Note that mktemp() requires the initial filename to end in six X's */ +#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ +#define TEMP_FILE_NAME "%sJPG%dXXXXXX" +#endif + +LOCAL(void) +select_file_name (char * fname) +{ + next_file_num++; /* advance counter */ + sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); + mktemp(fname); /* make sure file name is unique */ + /* mktemp replaces the trailing XXXXXX with a unique string of characters */ +} + +#endif /* NO_MKTEMP */ + + +/* + * Memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: although we include FAR keywords in the routine declarations, + * this file won't actually work in 80x86 small/medium model; at least, + * you probably won't be able to process useful-size images in only 64KB. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * It's impossible to do this in a portable way; our current solution is + * to make the user tell us (with a default value set at compile time). + * If you can actually get the available space, it's a good idea to subtract + * a slop factor of 5% or so. + */ + +#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ +#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ +#endif + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return cinfo->mem->max_memory_to_use - already_allocated; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + + +METHODDEF(void) +read_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFREAD(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFWRITE(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_backing_store (j_common_ptr cinfo, backing_store_ptr info) +{ + fclose(info->temp_file); /* close the file */ + unlink(info->temp_name); /* delete the file */ +/* If your system doesn't have unlink(), use remove() instead. + * remove() is the ANSI-standard name for this function, but if + * your system was ANSI you'd be using jmemansi.c, right? + */ + TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); +} + + +/* + * Initial opening of a backing-store object. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + select_file_name(info->temp_name); + if ((info->temp_file = fopen(info->temp_name, RW_BINARY)) == NULL) + ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); + info->read_backing_store = read_backing_store; + info->write_backing_store = write_backing_store; + info->close_backing_store = close_backing_store; + TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + next_file_num = 0; /* initialize temp file name generator */ + return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemnobs.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemnobs.c new file mode 100644 index 0000000000..eb8c337725 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemnobs.c @@ -0,0 +1,109 @@ +/* + * jmemnobs.c + * + * Copyright (C) 1992-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides a really simple implementation of the system- + * dependent portion of the JPEG memory manager. This implementation + * assumes that no backing-store files are needed: all required space + * can be obtained from malloc(). + * This is very portable in the sense that it'll compile on almost anything, + * but you'd better have lots of main memory (or virtual memory) if you want + * to process big images. + * Note that the max_memory_to_use option is ignored by this implementation. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + + +/* + * Memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: although we include FAR keywords in the routine declarations, + * this file won't actually work in 80x86 small/medium model; at least, + * you probably won't be able to process useful-size images in only 64KB. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * Here we always say, "we got all you want bud!" + */ + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return max_bytes_needed; +} + + +/* + * Backing store (temporary file) management. + * Since jpeg_mem_available always promised the moon, + * this should never be called and we can just error out. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + ERREXIT(cinfo, JERR_NO_BACKING_STORE); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. Here, there isn't any. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + return 0; /* just set max_memory_to_use to 0 */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemsys.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemsys.h new file mode 100644 index 0000000000..6c3c6d348f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmemsys.h @@ -0,0 +1,198 @@ +/* + * jmemsys.h + * + * Copyright (C) 1992-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file defines the interface between the system-independent + * and system-dependent portions of the JPEG memory manager. No other + * modules need include it. (The system-independent portion is jmemmgr.c; + * there are several different versions of the system-dependent portion.) + * + * This file works as-is for the system-dependent memory managers supplied + * in the IJG distribution. You may need to modify it if you write a + * custom memory manager. If system-dependent changes are needed in + * this file, the best method is to #ifdef them based on a configuration + * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR + * and USE_MAC_MEMMGR. + */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_get_small jGetSmall +#define jpeg_free_small jFreeSmall +#define jpeg_get_large jGetLarge +#define jpeg_free_large jFreeLarge +#define jpeg_mem_available jMemAvail +#define jpeg_open_backing_store jOpenBackStore +#define jpeg_mem_init jMemInit +#define jpeg_mem_term jMemTerm +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* + * These two functions are used to allocate and release small chunks of + * memory. (Typically the total amount requested through jpeg_get_small is + * no more than 20K or so; this will be requested in chunks of a few K each.) + * Behavior should be the same as for the standard library functions malloc + * and free; in particular, jpeg_get_small must return NULL on failure. + * On most systems, these ARE malloc and free. jpeg_free_small is passed the + * size of the object being freed, just in case it's needed. + * On an 80x86 machine using small-data memory model, these manage near heap. + */ + +EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject)); +EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object, + size_t sizeofobject)); + +/* + * These two functions are used to allocate and release large chunks of + * memory (up to the total free space designated by jpeg_mem_available). + * The interface is the same as above, except that on an 80x86 machine, + * far pointers are used. On most other machines these are identical to + * the jpeg_get/free_small routines; but we keep them separate anyway, + * in case a different allocation strategy is desirable for large chunks. + */ + +EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo, + size_t sizeofobject)); +EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object, + size_t sizeofobject)); + +/* + * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may + * be requested in a single call to jpeg_get_large (and jpeg_get_small for that + * matter, but that case should never come into play). This macro is needed + * to model the 64Kb-segment-size limit of far addressing on 80x86 machines. + * On those machines, we expect that jconfig.h will provide a proper value. + * On machines with 32-bit flat address spaces, any large constant may be used. + * + * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type + * size_t and will be a multiple of sizeof(align_type). + */ + +#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */ +#define MAX_ALLOC_CHUNK 1000000000L +#endif + +/* + * This routine computes the total space still available for allocation by + * jpeg_get_large. If more space than this is needed, backing store will be + * used. NOTE: any memory already allocated must not be counted. + * + * There is a minimum space requirement, corresponding to the minimum + * feasible buffer sizes; jmemmgr.c will request that much space even if + * jpeg_mem_available returns zero. The maximum space needed, enough to hold + * all working storage in memory, is also passed in case it is useful. + * Finally, the total space already allocated is passed. If no better + * method is available, cinfo->mem->max_memory_to_use - already_allocated + * is often a suitable calculation. + * + * It is OK for jpeg_mem_available to underestimate the space available + * (that'll just lead to more backing-store access than is really necessary). + * However, an overestimate will lead to failure. Hence it's wise to subtract + * a slop factor from the true available space. 5% should be enough. + * + * On machines with lots of virtual memory, any large constant may be returned. + * Conversely, zero may be returned to always use the minimum amount of memory. + */ + +EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo, + long min_bytes_needed, + long max_bytes_needed, + long already_allocated)); + + +/* + * This structure holds whatever state is needed to access a single + * backing-store object. The read/write/close method pointers are called + * by jmemmgr.c to manipulate the backing-store object; all other fields + * are private to the system-dependent backing store routines. + */ + +#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */ + + +#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */ + +typedef unsigned short XMSH; /* type of extended-memory handles */ +typedef unsigned short EMSH; /* type of expanded-memory handles */ + +typedef union { + short file_handle; /* DOS file handle if it's a temp file */ + XMSH xms_handle; /* handle if it's a chunk of XMS */ + EMSH ems_handle; /* handle if it's a chunk of EMS */ +} handle_union; + +#endif /* USE_MSDOS_MEMMGR */ + +#ifdef USE_MAC_MEMMGR /* Mac-specific junk */ +#include +#endif /* USE_MAC_MEMMGR */ + + +typedef struct backing_store_struct * backing_store_ptr; + +typedef struct backing_store_struct { + /* Methods for reading/writing/closing this backing-store object */ + JMETHOD(void, read_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, write_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, close_backing_store, (j_common_ptr cinfo, + backing_store_ptr info)); + + /* Private fields for system-dependent backing-store management */ +#ifdef USE_MSDOS_MEMMGR + /* For the MS-DOS manager (jmemdos.c), we need: */ + handle_union handle; /* reference to backing-store storage object */ + char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ +#else +#ifdef USE_MAC_MEMMGR + /* For the Mac manager (jmemmac.c), we need: */ + short temp_file; /* file reference number to temp file */ + FSSpec tempSpec; /* the FSSpec for the temp file */ + char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ +#else + /* For a typical implementation with temp files, we need: */ + FILE * temp_file; /* stdio reference to temp file */ + char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */ +#endif +#endif +} backing_store_info; + + +/* + * Initial opening of a backing-store object. This must fill in the + * read/write/close pointers in the object. The read/write routines + * may take an error exit if the specified maximum file size is exceeded. + * (If jpeg_mem_available always returns a large value, this routine can + * just take an error exit.) + */ + +EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo, + backing_store_ptr info, + long total_bytes_needed)); + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. jpeg_mem_init will be called before anything is + * allocated (and, therefore, nothing in cinfo is of use except the error + * manager pointer). It should return a suitable default value for + * max_memory_to_use; this may subsequently be overridden by the surrounding + * application. (Note that max_memory_to_use is only important if + * jpeg_mem_available chooses to consult it ... no one else will.) + * jpeg_mem_term may assume that all requested memory has been freed and that + * all opened backing-store objects have been closed. + */ + +EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo)); diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmorecfg.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmorecfg.h new file mode 100644 index 0000000000..c4a5d33b08 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jmorecfg.h @@ -0,0 +1,420 @@ +/* + * jmorecfg.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains additional configuration options that customize the + * JPEG software for special applications or support machine-dependent + * optimizations. Most users will not need to touch this file. + */ + + +/* + * Define BITS_IN_JSAMPLE as either + * 8 for 8-bit sample values (the usual setting) + * 12 for 12-bit sample values + * Only 8 and 12 are legal data precisions for lossy JPEG according to the + * JPEG standard, and the IJG code does not support anything else! + * We do not support run-time selection of data precision, sorry. + */ + +#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ + + +/* + * Maximum number of components (color channels) allowed in JPEG image. + * To meet the letter of the JPEG spec, set this to 255. However, darn + * few applications need more than 4 channels (maybe 5 for CMYK + alpha + * mask). We recommend 10 as a reasonable compromise; use 4 if you are + * really short on memory. (Each allowed component costs a hundred or so + * bytes of storage, whether actually used in an image or not.) + */ + +#define MAX_COMPONENTS 10 /* maximum number of image components */ + + +/* + * Basic data types. + * You may need to change these if you have a machine with unusual data + * type sizes; for example, "char" not 8 bits, "short" not 16 bits, + * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, + * but it had better be at least 16. + */ + +/* Representation of a single sample (pixel element value). + * We frequently allocate large arrays of these, so it's important to keep + * them small. But if you have memory to burn and access to char or short + * arrays is very slow on your hardware, you might want to change these. + */ + +#if BITS_IN_JSAMPLE == 8 +/* JSAMPLE should be the smallest type that will hold the values 0..255. + * You can use a signed char by having GETJSAMPLE mask it with 0xFF. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JSAMPLE; +#ifdef CHAR_IS_UNSIGNED +#define GETJSAMPLE(value) ((int) (value)) +#else +#define GETJSAMPLE(value) ((int) (value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 + +#endif /* BITS_IN_JSAMPLE == 8 */ + + +#if BITS_IN_JSAMPLE == 12 +/* JSAMPLE should be the smallest type that will hold the values 0..4095. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 4095 +#define CENTERJSAMPLE 2048 + +#endif /* BITS_IN_JSAMPLE == 12 */ + + +/* Representation of a DCT frequency coefficient. + * This should be a signed value of at least 16 bits; "short" is usually OK. + * Again, we allocate large arrays of these, but you can change to int + * if you have memory to burn and "short" is really slow. + */ + +typedef short JCOEF; + + +/* Compressed datastreams are represented as arrays of JOCTET. + * These must be EXACTLY 8 bits wide, at least once they are written to + * external storage. Note that when using the stdio data source/destination + * managers, this is also the data type passed to fread/fwrite. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JOCTET; +#define GETJOCTET(value) (value) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JOCTET; +#ifdef CHAR_IS_UNSIGNED +#define GETJOCTET(value) (value) +#else +#define GETJOCTET(value) ((value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + + +/* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special + * extraction code like we did for JSAMPLE. (In other words, these + * typedefs live at a different point on the speed/space tradeoff curve.) + */ + +/* UINT8 must hold at least the values 0..255. */ +#ifndef __WINE_BASETSD_H + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char UINT8; +#else /* not HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char UINT8; +#else /* not CHAR_IS_UNSIGNED */ +typedef short UINT8; +#endif /* CHAR_IS_UNSIGNED */ +#endif /* HAVE_UNSIGNED_CHAR */ + +/* UINT16 must hold at least the values 0..65535. */ + +#ifdef HAVE_UNSIGNED_SHORT +typedef unsigned short UINT16; +#else /* not HAVE_UNSIGNED_SHORT */ +typedef unsigned int UINT16; +#endif /* HAVE_UNSIGNED_SHORT */ + +/* INT16 must hold at least the values -32768..32767. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ +typedef short INT16; +#endif + +#endif /* __WINE_BASETSD_H */ + +/* INT32 must hold at least signed 32-bit values. */ + +/* + VZ: due to the horrible mess resulting in INT32 being defined in windows.h + for some compilers but not for the other ones, I have globally replace + INT32 with JPEG_INT32 in libjpeg code to avoid the eight level ifdef + which used to be here. The problem is that, of course, now we'll have + conflicts when upgrading to the next libjpeg release -- however + considering their frequency (1 in the last 5 years) it seems that + it is not too high a price to pay for the clean compilation with all + versions of mingw32 and cygwin + */ +typedef long JPEG_INT32; + +/* Datatype used for image dimensions. The JPEG standard only supports + * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore + * "unsigned int" is sufficient on all machines. However, if you need to + * handle larger images and you don't mind deviating from the spec, you + * can change this datatype. + */ + +typedef unsigned int JDIMENSION; + +#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ + + +/* These macros are used in all function definitions and extern declarations. + * You could modify them if you need to change function linkage conventions; + * in particular, you'll need to do that to make the library a Windows DLL. + * Another application is to make all functions global for use with debuggers + * or code profilers that require it. + */ + +#if defined(__VISAGECPP__) +#define JPEG_CALLING_CONV _Optlink +#else /* !Visual Age C++ */ +#define JPEG_CALLING_CONV +#endif + +/* We can't declare a static function as extern "C" as we need to do in C++ + * programs, so suppress static in METHODDEF when using C++. + */ +#if defined(__cplusplus) +#define JPEG_METHOD_LINKAGE +#else /* !__cplusplus */ +#define JPEG_METHOD_LINKAGE static +#endif + +/* a function called through method pointers: */ +#define METHODDEF(type) JPEG_METHOD_LINKAGE type JPEG_CALLING_CONV +/* a function used only in its module: */ +#define LOCAL(type) static type JPEG_CALLING_CONV +/* a function referenced thru EXTERNs: */ +#define GLOBAL(type) type +/* a reference to a GLOBAL function: */ +#define EXTERN(type) extern type JPEG_CALLING_CONV + +/* This macro is used to declare a "method", that is, a function pointer. + * We want to supply prototype parameters if the compiler can cope. + * Note that the arglist parameter must be parenthesized! + * Again, you can customize this if you need special linkage keywords. + */ + +#if defined(__VISAGECPP__) /* need this for /common/imagjpeg.obj but not loclly */ +#ifdef HAVE_PROTOTYPES +#define JMETHOD(type,methodname,arglist) type (_Optlink *methodname) arglist +#else +#define JMETHOD(type,methodname,arglist) type (_Optlink *methodname) () +#endif + +#else + +#ifdef HAVE_PROTOTYPES +#define JMETHOD(type,methodname,arglist) type (*methodname) arglist +#else +#define JMETHOD(type,methodname,arglist) type (*methodname) () +#endif + +#endif + +/* Here is the pseudo-keyword for declaring pointers that must be "far" + * on 80x86 machines. Most of the specialized coding for 80x86 is handled + * by just saying "FAR *" where such a pointer is needed. In a few places + * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. + */ + +#ifdef NEED_FAR_POINTERS +#define FAR far +#else +#ifndef FAR +#define FAR +#endif +#endif + + +/* + * On a few systems, type boolean and/or its values FALSE, TRUE may appear + * in standard header files. Or you may have conflicts with application- + * specific header files that you want to include together with these files. + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +#if 0 +#ifndef HAVE_BOOLEAN +typedef int boolean; +#endif +#endif + +/* + * Notes about boolean above: + * + * The main conflict we see is with the Windows headers of some compilers that + * have a different definition of boolean. Therefore boolean has been replaced + * with wxjpeg_boolean throughout the jpeg sources. The alternative would have + * been to make the definition here the same as the Windows definition. It's + * not enough to just define HAVE_BOOLEAN when using the jpeg library, the + * definition of boolean must match when the jpeg library is compiled too. + * + * System jepg libs won't have this type, of course, so to use test + * HAVE_WXJPEG_BOOLEAN and fall back to boolean when not defined. + */ + +typedef int wxjpeg_boolean; +#define HAVE_WXJPEG_BOOLEAN + +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif + + +/* + * The remaining options affect code selection within the JPEG library, + * but they don't need to be visible to most applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. + */ + +#ifdef JPEG_INTERNALS +#define JPEG_INTERNAL_OPTIONS +#endif + +#ifdef JPEG_INTERNAL_OPTIONS + + +/* + * These defines indicate whether to include various optional functions. + * Undefining some of these symbols will produce a smaller but less capable + * library. Note that you can leave certain source files out of the + * compilation/linking process if you've #undef'd the corresponding symbols. + * (You may HAVE to do that if your compiler doesn't like null source files.) + */ + +/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */ + +/* Capability options common to encoder and decoder: */ + +#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ +#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ +#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ + +/* Encoder capability options: */ + +#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ +/* Note: if you selected 12-bit data precision, it is dangerous to turn off + * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit + * precision, so jchuff.c normally uses entropy optimization to compute + * usable tables for higher precision. If you don't want to do optimization, + * you'll have to supply different default Huffman tables. + * The exact same statements apply for progressive JPEG: the default tables + * don't work for progressive mode. (This may get fixed, however.) + */ +#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ + +/* Decoder capability options: */ + +#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ +#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ +#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ +#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ +#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ +#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ +#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ + +/* more capability options later, no doubt */ + + +/* + * Ordering of RGB data in scanlines passed to or from the application. + * If your application wants to deal with data in the order B,G,R, just + * change these macros. You can also deal with formats such as R,G,B,X + * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing + * the offsets will also change the order in which colormap data is organized. + * RESTRICTIONS: + * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. + * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not + * useful if you are using JPEG color spaces other than YCbCr or grayscale. + * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE + * is not 3 (they don't understand about dummy color components!). So you + * can't use color quantization if you change that value. + */ + +#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ +#define RGB_GREEN 1 /* Offset of Green */ +#define RGB_BLUE 2 /* Offset of Blue */ +#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ + + +/* Definitions for speed-related optimizations. */ + + +/* If your compiler supports inline functions, define INLINE + * as the inline keyword; otherwise define it as empty. + */ + +#ifndef INLINE +#ifdef __GNUC__ /* for instance, GNU C knows about inline */ +#define INLINE __inline__ +#endif +#ifndef INLINE +#define INLINE /* default is to define it as empty */ +#endif +#endif + + +/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying + * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER + * as short on such a machine. MULTIPLIER must be at least 16 bits wide. + */ + +#ifndef MULTIPLIER +#define MULTIPLIER int /* type for fastest integer multiply */ +#endif + + +/* FAST_FLOAT should be either float or double, whichever is done faster + * by your compiler. (Note that this type is only used in the floating point + * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) + * Typically, float is faster in ANSI C compilers, while double is faster in + * pre-ANSI compilers (because they insist on converting to double anyway). + * The code below therefore chooses float if we have ANSI-style prototypes. + */ + +#ifndef FAST_FLOAT +#ifdef HAVE_PROTOTYPES +#define FAST_FLOAT float +#else +#define FAST_FLOAT double +#endif +#endif + +#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpeg_CW_Prefix.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpeg_CW_Prefix.h new file mode 100644 index 0000000000..92afda8c10 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpeg_CW_Prefix.h @@ -0,0 +1,6 @@ +// Special configuration file for building jpeg under CodeWarrior + + +//#define HAVE_BOOLEAN + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpegint.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpegint.h new file mode 100644 index 0000000000..7928ae3c50 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpegint.h @@ -0,0 +1,400 @@ +/* + * jpegint.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides common declarations for the various JPEG modules. + * These declarations are considered internal to the JPEG library; most + * applications using the library shouldn't need to include this file. + */ + + +/* Declarations for both compression & decompression */ + +typedef enum { /* Operating modes for buffer controllers */ + JBUF_PASS_THRU, /* Plain stripwise operation */ + /* Remaining modes require a full-image buffer to have been created */ + JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ + JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ + JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ +} J_BUF_MODE; + +/* Values of global_state field (jdapi.c has some dependencies on ordering!) */ +#define CSTATE_START 100 /* after create_compress */ +#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ +#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ +#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ +#define DSTATE_START 200 /* after create_decompress */ +#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ +#define DSTATE_READY 202 /* found SOS, ready for start_decompress */ +#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ +#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ +#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ +#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ +#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ +#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ +#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ +#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ + + +/* Declarations for compression modules */ + +/* Master control module */ +struct jpeg_comp_master { + JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); + JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); + + /* State variables made visible to other modules */ + wxjpeg_boolean call_pass_startup; /* True if pass_startup must be called */ + wxjpeg_boolean is_last_pass; /* True during last pass */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_c_main_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail)); +}; + +/* Compression preprocessing (downsampling input buffer control) */ +struct jpeg_c_prep_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, + JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_c_coef_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(wxjpeg_boolean, compress_data, (j_compress_ptr cinfo, + JSAMPIMAGE input_buf)); +}; + +/* Colorspace conversion */ +struct jpeg_color_converter { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, color_convert, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows)); +}; + +/* Downsampling */ +struct jpeg_downsampler { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, downsample, (j_compress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_index, + JSAMPIMAGE output_buf, + JDIMENSION out_row_group_index)); + + wxjpeg_boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Forward DCT (also controls coefficient quantization) */ +struct jpeg_forward_dct { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + /* perhaps this should be an array??? */ + JMETHOD(void, forward_DCT, (j_compress_ptr cinfo, + jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks)); +}; + +/* Entropy encoding */ +struct jpeg_entropy_encoder { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, wxjpeg_boolean gather_statistics)); + JMETHOD(wxjpeg_boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); +}; + +/* Marker writing */ +struct jpeg_marker_writer { + JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); + JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); + /* These routines are exported to allow insertion of extra markers */ + /* Probably only COM and APPn markers should be written this way */ + JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, + unsigned int datalen)); + JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); +}; + + +/* Declarations for decompression modules */ + +/* Master control module */ +struct jpeg_decomp_master { + JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + wxjpeg_boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ +}; + +/* Input control module */ +struct jpeg_input_controller { + JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); + JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + wxjpeg_boolean has_multiple_scans; /* True if file has multiple scans */ + wxjpeg_boolean eoi_reached; /* True when EOI has been consumed */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_d_main_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_d_coef_controller { +#if defined(__VISAGECPP__) + /* the start input pass in jdcoeft must have a different name than the + // one in jdtrans under VisualAge or else we get a dup symbol error + */ + JMETHOD(void, start_input_pass2, (j_decompress_ptr cinfo)); +#else + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); +#endif + + JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); + JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, + JSAMPIMAGE output_buf)); + /* Pointer to array of coefficient virtual arrays, or NULL if none */ + jvirt_barray_ptr *coef_arrays; +}; + +/* Decompression postprocessing (color quantization buffer control) */ +struct jpeg_d_post_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +}; + +/* Marker reading & parsing */ +struct jpeg_marker_reader { + JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); + /* Read markers until SOS or EOI. + * Returns same codes as are defined for jpeg_consume_input: + * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + */ + JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); + /* Read a restart marker --- exported for use by entropy decoder only */ + jpeg_marker_parser_method read_restart_marker; + + /* State of marker reader --- nominally internal, but applications + * supplying COM or APPn handlers might like to know the state. + */ + wxjpeg_boolean saw_SOI; /* found SOI? */ + wxjpeg_boolean saw_SOF; /* found SOF? */ + int next_restart_num; /* next restart number expected (0-7) */ + unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ +}; + +/* Entropy decoding */ +struct jpeg_entropy_decoder { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(wxjpeg_boolean, decode_mcu, (j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); + + /* This is here to share code between baseline and progressive decoders; */ + /* other modules probably should not use it */ + wxjpeg_boolean insufficient_data; /* set TRUE after emitting warning */ +}; + +/* Inverse DCT (also performs dequantization) */ +typedef JMETHOD(void, inverse_DCT_method_ptr, + (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col)); + +struct jpeg_inverse_dct { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + /* It is useful to allow each component to have a separate IDCT method. */ + inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; +}; + +/* Upsampling (note that upsampler must also call color converter) */ +struct jpeg_upsampler { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, upsample, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); + + wxjpeg_boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Colorspace conversion */ +struct jpeg_color_deconverter { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, color_convert, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows)); +}; + +/* Color quantization or color precision reduction */ +struct jpeg_color_quantizer { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, wxjpeg_boolean is_pre_scan)); + JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, + int num_rows)); + JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); +}; + + +/* Miscellaneous useful macros */ + +#undef MAX +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#undef MIN +#define MIN(a,b) ((a) < (b) ? (a) : (b)) + + +/* We assume that right shift corresponds to signed division by 2 with + * rounding towards minus infinity. This is correct for typical "arithmetic + * shift" instructions that shift in copies of the sign bit. But some + * C compilers implement >> with an unsigned shift. For these machines you + * must define RIGHT_SHIFT_IS_UNSIGNED. + * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. + * It is only applied with constant shift counts. SHIFT_TEMPS must be + * included in the variables of any routine using RIGHT_SHIFT. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define SHIFT_TEMPS JPEG_INT32 shift_temp; +#define RIGHT_SHIFT(x,shft) \ + ((shift_temp = (x)) < 0 ? \ + (shift_temp >> (shft)) | ((~((JPEG_INT32) 0)) << (32-(shft))) : \ + (shift_temp >> (shft))) +#else +#define SHIFT_TEMPS +#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jinit_compress_master jICompress +#define jinit_c_master_control jICMaster +#define jinit_c_main_controller jICMainC +#define jinit_c_prep_controller jICPrepC +#define jinit_c_coef_controller jICCoefC +#define jinit_color_converter jICColor +#define jinit_downsampler jIDownsampler +#define jinit_forward_dct jIFDCT +#define jinit_huff_encoder jIHEncoder +#define jinit_phuff_encoder jIPHEncoder +#define jinit_marker_writer jIMWriter +#define jinit_master_decompress jIDMaster +#define jinit_d_main_controller jIDMainC +#define jinit_d_coef_controller jIDCoefC +#define jinit_d_post_controller jIDPostC +#define jinit_input_controller jIInCtlr +#define jinit_marker_reader jIMReader +#define jinit_huff_decoder jIHDecoder +#define jinit_phuff_decoder jIPHDecoder +#define jinit_inverse_dct jIIDCT +#define jinit_upsampler jIUpsampler +#define jinit_color_deconverter jIDColor +#define jinit_1pass_quantizer jI1Quant +#define jinit_2pass_quantizer jI2Quant +#define jinit_merged_upsampler jIMUpsampler +#define jinit_memory_mgr jIMemMgr +#define jdiv_round_up jDivRound +#define jround_up jRound +#define jcopy_sample_rows jCopySamples +#define jcopy_block_row jCopyBlocks +#define jzero_far jZeroFar +#define jpeg_zigzag_order jZIGTable +#define jpeg_natural_order jZAGTable +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Compression module initialization routines */ +EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo, + wxjpeg_boolean transcode_only)); +EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo, + wxjpeg_boolean need_full_buffer)); +EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo, + wxjpeg_boolean need_full_buffer)); +EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo, + wxjpeg_boolean need_full_buffer)); +EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo)); +/* Decompression module initialization routines */ +EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo, + wxjpeg_boolean need_full_buffer)); +EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo, + wxjpeg_boolean need_full_buffer)); +EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo, + wxjpeg_boolean need_full_buffer)); +EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo)); +/* Memory manager initialization */ +EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo)); + +/* Utility routines in jutils.c */ +EXTERN(long) jdiv_round_up JPP((long a, long b)); +EXTERN(long) jround_up JPP((long a, long b)); +EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row, + JSAMPARRAY output_array, int dest_row, + int num_rows, JDIMENSION num_cols)); +EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row, + JDIMENSION num_blocks)); +EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); +/* Constant tables in jutils.c */ +#if 0 /* This table is not actually needed in v6a */ +extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ +#endif +extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ + +/* Suppress undefined-structure complaints if necessary. */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +#endif +#endif /* INCOMPLETE_TYPES_BROKEN */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpeglib.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpeglib.h new file mode 100644 index 0000000000..4677c7e053 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpeglib.h @@ -0,0 +1,1096 @@ +/* + * jpeglib.h + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the application interface for the JPEG library. + * Most applications using the library need only include this file, + * and perhaps jerror.h if they want to know the exact error codes. + */ + +#ifndef JPEGLIB_H +#define JPEGLIB_H + +/* + * First we include the configuration files that record how this + * installation of the JPEG library is set up. jconfig.h can be + * generated automatically for many systems. jmorecfg.h contains + * manual configuration options that most people need not worry about. + */ + +#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ +#include "jconfig.h" /* widely used configuration options */ +#endif +#include "jmorecfg.h" /* seldom changed options */ + + +/* Version ID for the JPEG library. + * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". + */ + +#define JPEG_LIB_VERSION 62 /* Version 6b */ + + +/* Various constants determining the sizes of things. + * All of these are specified by the JPEG standard, so don't change them + * if you want to be compatible. + */ + +#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ +#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ +#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ +#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ +#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ +#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ +#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ +/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; + * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. + * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU + * to handle it. We even let you do this from the jconfig.h file. However, + * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe + * sometimes emits noncompliant files doesn't mean you should too. + */ +#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ +#ifndef D_MAX_BLOCKS_IN_MCU +#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ +#endif + + +/* Data structures for images (arrays of samples and of DCT coefficients). + * On 80x86 machines, the image arrays are too big for near pointers, + * but the pointer arrays can fit in near memory. + */ + +typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */ +typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ +typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ + +typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ +typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */ +typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ +typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ + +typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */ + + +/* Types for JPEG compression parameters and working tables. */ + + +/* DCT coefficient quantization tables. */ + +typedef struct { + /* This array gives the coefficient quantizers in natural array order + * (not the zigzag order in which they are stored in a JPEG DQT marker). + * CAUTION: IJG versions prior to v6a kept this array in zigzag order. + */ + UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + wxjpeg_boolean sent_table; /* TRUE when table has been output */ +} JQUANT_TBL; + + +/* Huffman coding tables. */ + +typedef struct { + /* These two fields directly represent the contents of a JPEG DHT marker */ + UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ + /* length k bits; bits[0] is unused */ + UINT8 huffval[256]; /* The symbols, in order of incr code length */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + wxjpeg_boolean sent_table; /* TRUE when table has been output */ +} JHUFF_TBL; + + +/* Basic info about one component (color channel). */ + +typedef struct { + /* These values are fixed over the whole image. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOF marker. */ + int component_id; /* identifier for this component (0..255) */ + int component_index; /* its index in SOF or cinfo->comp_info[] */ + int h_samp_factor; /* horizontal sampling factor (1..4) */ + int v_samp_factor; /* vertical sampling factor (1..4) */ + int quant_tbl_no; /* quantization table selector (0..3) */ + /* These values may vary between scans. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOS marker. */ + /* The decompressor output side may not use these variables. */ + int dc_tbl_no; /* DC entropy table selector (0..3) */ + int ac_tbl_no; /* AC entropy table selector (0..3) */ + + /* Remaining fields should be treated as private by applications. */ + + /* These values are computed during compression or decompression startup: */ + /* Component's size in DCT blocks. + * Any dummy blocks added to complete an MCU are not counted; therefore + * these values do not depend on whether a scan is interleaved or not. + */ + JDIMENSION width_in_blocks; + JDIMENSION height_in_blocks; + /* Size of a DCT block in samples. Always DCTSIZE for compression. + * For decompression this is the size of the output from one DCT block, + * reflecting any scaling we choose to apply during the IDCT step. + * Values of 1,2,4,8 are likely to be supported. Note that different + * components may receive different IDCT scalings. + */ + int DCT_scaled_size; + /* The downsampled dimensions are the component's actual, unpadded number + * of samples at the main buffer (preprocessing/compression interface), thus + * downsampled_width = ceil(image_width * Hi/Hmax) + * and similarly for height. For decompression, IDCT scaling is included, so + * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE) + */ + JDIMENSION downsampled_width; /* actual width in samples */ + JDIMENSION downsampled_height; /* actual height in samples */ + /* This flag is used only for decompression. In cases where some of the + * components will be ignored (eg grayscale output from YCbCr image), + * we can skip most computations for the unused components. + */ + wxjpeg_boolean component_needed; /* do we need the value of this component? */ + + /* These values are computed before starting a scan of the component. */ + /* The decompressor output side may not use these variables. */ + int MCU_width; /* number of blocks per MCU, horizontally */ + int MCU_height; /* number of blocks per MCU, vertically */ + int MCU_blocks; /* MCU_width * MCU_height */ + int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */ + int last_col_width; /* # of non-dummy blocks across in last MCU */ + int last_row_height; /* # of non-dummy blocks down in last MCU */ + + /* Saved quantization table for component; NULL if none yet saved. + * See jdinput.c comments about the need for this information. + * This field is currently used only for decompression. + */ + JQUANT_TBL * quant_table; + + /* Private per-component storage for DCT or IDCT subsystem. */ + void * dct_table; +} jpeg_component_info; + + +/* The script for encoding a multiple-scan file is an array of these: */ + +typedef struct { + int comps_in_scan; /* number of components encoded in this scan */ + int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ + int Ss, Se; /* progressive JPEG spectral selection parms */ + int Ah, Al; /* progressive JPEG successive approx. parms */ +} jpeg_scan_info; + +/* The decompressor can save APPn and COM markers in a list of these: */ + +typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr; + +struct jpeg_marker_struct { + jpeg_saved_marker_ptr next; /* next in list, or NULL */ + UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ + unsigned int original_length; /* # bytes of data in the file */ + unsigned int data_length; /* # bytes of data saved at data[] */ + JOCTET FAR * data; /* the data contained in the marker */ + /* the marker length word is not counted in data_length or original_length */ +}; + +/* Known color spaces. */ + +typedef enum { + JCS_UNKNOWN, /* error/unspecified */ + JCS_GRAYSCALE, /* monochrome */ + JCS_RGB, /* red/green/blue */ + JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ + JCS_CMYK, /* C/M/Y/K */ + JCS_YCCK /* Y/Cb/Cr/K */ +} J_COLOR_SPACE; + +/* DCT/IDCT algorithm options. */ + +typedef enum { + JDCT_ISLOW, /* slow but accurate integer algorithm */ + JDCT_IFAST, /* faster, less accurate integer method */ + JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ +} J_DCT_METHOD; + +#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ +#define JDCT_DEFAULT JDCT_ISLOW +#endif +#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ +#define JDCT_FASTEST JDCT_IFAST +#endif + +/* Dithering options for decompression. */ + +typedef enum { + JDITHER_NONE, /* no dithering */ + JDITHER_ORDERED, /* simple ordered dither */ + JDITHER_FS /* Floyd-Steinberg error diffusion dither */ +} J_DITHER_MODE; + + +/* Common fields between JPEG compression and decompression master structs. */ + +#define jpeg_common_fields \ + struct jpeg_error_mgr * err; /* Error handler module */\ + struct jpeg_memory_mgr * mem; /* Memory manager module */\ + struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\ + void * client_data; /* Available for use by application */\ + wxjpeg_boolean is_decompressor; /* So common code can tell which is which */\ + int global_state /* For checking call sequence validity */ + +/* Routines that are to be used by both halves of the library are declared + * to receive a pointer to this structure. There are no actual instances of + * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. + */ +struct jpeg_common_struct { + jpeg_common_fields; /* Fields common to both master struct types */ + /* Additional fields follow in an actual jpeg_compress_struct or + * jpeg_decompress_struct. All three structs must agree on these + * initial fields! (This would be a lot cleaner in C++.) + */ +}; + +typedef struct jpeg_common_struct * j_common_ptr; +typedef struct jpeg_compress_struct * j_compress_ptr; +typedef struct jpeg_decompress_struct * j_decompress_ptr; + + +/* Master record for a compression instance */ + +struct jpeg_compress_struct { + jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ + + /* Destination for compressed data */ + struct jpeg_destination_mgr * dest; + + /* Description of source image --- these fields must be filled in by + * outer application before starting compression. in_color_space must + * be correct before you can even call jpeg_set_defaults(). + */ + + JDIMENSION image_width; /* input image width */ + JDIMENSION image_height; /* input image height */ + int input_components; /* # of color components in input image */ + J_COLOR_SPACE in_color_space; /* colorspace of input image */ + + double input_gamma; /* image gamma of input image */ + + /* Compression parameters --- these fields must be set before calling + * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to + * initialize everything to reasonable defaults, then changing anything + * the application specifically wants to change. That way you won't get + * burnt when new parameters are added. Also note that there are several + * helper routines to simplify changing parameters. + */ + + int data_precision; /* bits of precision in image data */ + + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + int num_scans; /* # of entries in scan_info array */ + const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */ + /* The default value of scan_info is NULL, which causes a single-scan + * sequential JPEG file to be emitted. To create a multi-scan file, + * set num_scans and scan_info to point to an array of scan definitions. + */ + + wxjpeg_boolean raw_data_in; /* TRUE=caller supplies downsampled data */ + wxjpeg_boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + wxjpeg_boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ + wxjpeg_boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + int smoothing_factor; /* 1..100, or 0 for no input smoothing */ + J_DCT_METHOD dct_method; /* DCT algorithm selector */ + + /* The restart interval can be specified in absolute MCUs by setting + * restart_interval, or in MCU rows by setting restart_in_rows + * (in which case the correct restart_interval will be figured + * for each scan). + */ + unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ + int restart_in_rows; /* if > 0, MCU rows per restart interval */ + + /* Parameters controlling emission of special markers. */ + + wxjpeg_boolean write_JFIF_header; /* should a JFIF marker be written? */ + UINT8 JFIF_major_version; /* What to write for the JFIF version number */ + UINT8 JFIF_minor_version; + /* These three values are not used by the JPEG code, merely copied */ + /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ + /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ + /* ratio is defined by X_density/Y_density even when density_unit=0. */ + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + wxjpeg_boolean write_Adobe_marker; /* should an Adobe marker be written? */ + + /* State variable: index of next scanline to be written to + * jpeg_write_scanlines(). Application may use this to control its + * processing loop, e.g., "while (next_scanline < image_height)". + */ + + JDIMENSION next_scanline; /* 0 .. image_height-1 */ + + /* Remaining fields are known throughout compressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during compression startup + */ + wxjpeg_boolean progressive_mode; /* TRUE if scan script uses progressive mode */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ + /* The coefficient controller receives data in units of MCU rows as defined + * for fully interleaved scans (whether the JPEG file is interleaved or not). + * There are v_samp_factor * DCTSIZE sample rows of each component in an + * "iMCU" (interleaved MCU) row. + */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[C_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* + * Links to compression subobjects (methods and private variables of modules) + */ + struct jpeg_comp_master * master; + struct jpeg_c_main_controller * main; + struct jpeg_c_prep_controller * prep; + struct jpeg_c_coef_controller * coef; + struct jpeg_marker_writer * marker; + struct jpeg_color_converter * cconvert; + struct jpeg_downsampler * downsample; + struct jpeg_forward_dct * fdct; + struct jpeg_entropy_encoder * entropy; + jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */ + int script_space_size; +}; + + +/* Master record for a decompression instance */ + +struct jpeg_decompress_struct { + jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ + + /* Source of compressed data */ + struct jpeg_source_mgr * src; + + /* Basic description of image --- filled in by jpeg_read_header(). */ + /* Application may inspect these values to decide how to process image. */ + + JDIMENSION image_width; /* nominal image width (from SOF marker) */ + JDIMENSION image_height; /* nominal image height */ + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + /* Decompression processing parameters --- these fields must be set before + * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes + * them to default values. + */ + + J_COLOR_SPACE out_color_space; /* colorspace for output */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + double output_gamma; /* image gamma wanted in output */ + + wxjpeg_boolean buffered_image; /* TRUE=multiple output passes */ + wxjpeg_boolean raw_data_out; /* TRUE=downsampled data wanted */ + + J_DCT_METHOD dct_method; /* IDCT algorithm selector */ + wxjpeg_boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ + wxjpeg_boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ + + wxjpeg_boolean quantize_colors; /* TRUE=colormapped output wanted */ + /* the following are ignored if not quantize_colors: */ + J_DITHER_MODE dither_mode; /* type of color dithering to use */ + wxjpeg_boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ + int desired_number_of_colors; /* max # colors to use in created colormap */ + /* these are significant only in buffered-image mode: */ + wxjpeg_boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ + wxjpeg_boolean enable_external_quant;/* enable future use of external colormap */ + wxjpeg_boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ + + /* Description of actual output image that will be returned to application. + * These fields are computed by jpeg_start_decompress(). + * You can also use jpeg_calc_output_dimensions() to determine these values + * in advance of calling jpeg_start_decompress(). + */ + + JDIMENSION output_width; /* scaled image width */ + JDIMENSION output_height; /* scaled image height */ + int out_color_components; /* # of color components in out_color_space */ + int output_components; /* # of color components returned */ + /* output_components is 1 (a colormap index) when quantizing colors; + * otherwise it equals out_color_components. + */ + int rec_outbuf_height; /* min recommended height of scanline buffer */ + /* If the buffer passed to jpeg_read_scanlines() is less than this many rows + * high, space and time will be wasted due to unnecessary data copying. + * Usually rec_outbuf_height will be 1 or 2, at most 4. + */ + + /* When quantizing colors, the output colormap is described by these fields. + * The application can supply a colormap by setting colormap non-NULL before + * calling jpeg_start_decompress; otherwise a colormap is created during + * jpeg_start_decompress or jpeg_start_output. + * The map has out_color_components rows and actual_number_of_colors columns. + */ + int actual_number_of_colors; /* number of entries in use */ + JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ + + /* State variables: these variables indicate the progress of decompression. + * The application may examine these but must not modify them. + */ + + /* Row index of next scanline to be read from jpeg_read_scanlines(). + * Application may use this to control its processing loop, e.g., + * "while (output_scanline < output_height)". + */ + JDIMENSION output_scanline; /* 0 .. output_height-1 */ + + /* Current input scan number and number of iMCU rows completed in scan. + * These indicate the progress of the decompressor input side. + */ + int input_scan_number; /* Number of SOS markers seen so far */ + JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ + + /* The "output scan number" is the notional scan being displayed by the + * output side. The decompressor will not allow output scan/row number + * to get ahead of input scan/row, but it can fall arbitrarily far behind. + */ + int output_scan_number; /* Nominal scan number being displayed */ + JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ + + /* Current progression status. coef_bits[c][i] indicates the precision + * with which component c's DCT coefficient i (in zigzag order) is known. + * It is -1 when no data has yet been received, otherwise it is the point + * transform (shift) value for the most recent scan of the coefficient + * (thus, 0 at completion of the progression). + * This pointer is NULL when reading a non-progressive file. + */ + int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ + + /* Internal JPEG parameters --- the application usually need not look at + * these fields. Note that the decompressor output side may not use + * any parameters that can change between scans. + */ + + /* Quantization and Huffman tables are carried forward across input + * datastreams when processing abbreviated JPEG datastreams. + */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + /* These parameters are never carried across datastreams, since they + * are given in SOF/SOS markers or defined to be reset by SOI. + */ + + int data_precision; /* bits of precision in image data */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + wxjpeg_boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ + wxjpeg_boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ + + /* These fields record data obtained from optional markers recognized by + * the JPEG library. + */ + wxjpeg_boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ + /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ + UINT8 JFIF_major_version; /* JFIF version number */ + UINT8 JFIF_minor_version; + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + wxjpeg_boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ + UINT8 Adobe_transform; /* Color transform code from Adobe marker */ + + wxjpeg_boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + + /* Aside from the specific data retained from APPn markers known to the + * library, the uninterpreted contents of any or all APPn and COM markers + * can be saved in a list for examination by the application. + */ + jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ + + /* Remaining fields are known throughout decompressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during decompression startup + */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ + /* The coefficient controller's input and output progress is measured in + * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows + * in fully interleaved JPEG scans, but are used whether the scan is + * interleaved or not. We define an iMCU row as v_samp_factor DCT block + * rows of each component. Therefore, the IDCT output contains + * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row. + */ + + JSAMPLE * sample_range_limit; /* table for fast range-limiting */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + * Note that the decompressor output side must not use these fields. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[D_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* This field is shared between entropy decoder and marker parser. + * It is either zero or the code of a JPEG marker that has been + * read from the data source, but has not yet been processed. + */ + int unread_marker; + + /* + * Links to decompression subobjects (methods, private variables of modules) + */ + struct jpeg_decomp_master * master; + struct jpeg_d_main_controller * main; + struct jpeg_d_coef_controller * coef; + struct jpeg_d_post_controller * post; + struct jpeg_input_controller * inputctl; + struct jpeg_marker_reader * marker; + struct jpeg_entropy_decoder * entropy; + struct jpeg_inverse_dct * idct; + struct jpeg_upsampler * upsample; + struct jpeg_color_deconverter * cconvert; + struct jpeg_color_quantizer * cquantize; +}; + + +/* "Object" declarations for JPEG modules that may be supplied or called + * directly by the surrounding application. + * As with all objects in the JPEG library, these structs only define the + * publicly visible methods and state variables of a module. Additional + * private fields may exist after the public ones. + */ + + +/* Error handler object */ + +struct jpeg_error_mgr { + /* Error exit handler: does not return to caller */ + JMETHOD(void, error_exit, (j_common_ptr cinfo)); + /* Conditionally emit a trace or warning message */ + JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); + /* Routine that actually outputs a trace or error message */ + JMETHOD(void, output_message, (j_common_ptr cinfo)); + /* Format a message string for the most recent JPEG error or message */ + JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer)); +#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ + /* Reset error state variables at start of a new image */ + JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); + + /* The message ID code and any parameters are saved here. + * A message can have one string parameter or up to 8 int parameters. + */ + int msg_code; +#define JMSG_STR_PARM_MAX 80 + union { + int i[8]; + char s[JMSG_STR_PARM_MAX]; + } msg_parm; + + /* Standard state variables for error facility */ + + int trace_level; /* max msg_level that will be displayed */ + + /* For recoverable corrupt-data errors, we emit a warning message, + * but keep going unless emit_message chooses to abort. emit_message + * should count warnings in num_warnings. The surrounding application + * can check for bad data by seeing if num_warnings is nonzero at the + * end of processing. + */ + long num_warnings; /* number of corrupt-data warnings */ + + /* These fields point to the table(s) of error message strings. + * An application can change the table pointer to switch to a different + * message list (typically, to change the language in which errors are + * reported). Some applications may wish to add additional error codes + * that will be handled by the JPEG library error mechanism; the second + * table pointer is used for this purpose. + * + * First table includes all errors generated by JPEG library itself. + * Error code 0 is reserved for a "no such error string" message. + */ + const char * const * jpeg_message_table; /* Library errors */ + int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ + /* Second table can be added by application (see cjpeg/djpeg for example). + * It contains strings numbered first_addon_message..last_addon_message. + */ + const char * const * addon_message_table; /* Non-library errors */ + int first_addon_message; /* code for first string in addon table */ + int last_addon_message; /* code for last string in addon table */ +}; + + +/* Progress monitor object */ + +struct jpeg_progress_mgr { + JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); + + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +}; + + +/* Data destination object for compression */ + +struct jpeg_destination_mgr { + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + + JMETHOD(void, init_destination, (j_compress_ptr cinfo)); + JMETHOD(wxjpeg_boolean, empty_output_buffer, (j_compress_ptr cinfo)); + JMETHOD(void, term_destination, (j_compress_ptr cinfo)); +}; + + +/* Data source object for decompression */ + +struct jpeg_source_mgr { + const JOCTET * next_input_byte; /* => next byte to read from buffer */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + + JMETHOD(void, init_source, (j_decompress_ptr cinfo)); + JMETHOD(wxjpeg_boolean, fill_input_buffer, (j_decompress_ptr cinfo)); + JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); + JMETHOD(wxjpeg_boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); + JMETHOD(void, term_source, (j_decompress_ptr cinfo)); +}; + + +/* Memory manager object. + * Allocates "small" objects (a few K total), "large" objects (tens of K), + * and "really big" objects (virtual arrays with backing store if needed). + * The memory manager does not allow individual objects to be freed; rather, + * each created object is assigned to a pool, and whole pools can be freed + * at once. This is faster and more convenient than remembering exactly what + * to free, especially where malloc()/free() are not too speedy. + * NB: alloc routines never return NULL. They exit to error_exit if not + * successful. + */ + +#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ +#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ +#define JPOOL_NUMPOOLS 2 + +typedef struct jvirt_sarray_control * jvirt_sarray_ptr; +typedef struct jvirt_barray_control * jvirt_barray_ptr; + + +struct jpeg_memory_mgr { + /* Method pointers */ + JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, + JDIMENSION numrows)); + JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, + JDIMENSION numrows)); + JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, + int pool_id, + wxjpeg_boolean pre_zero, + JDIMENSION samplesperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, + int pool_id, + wxjpeg_boolean pre_zero, + JDIMENSION blocksperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); + JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, + jvirt_sarray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + wxjpeg_boolean writable)); + JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, + jvirt_barray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + wxjpeg_boolean writable)); + JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); + JMETHOD(void, self_destruct, (j_common_ptr cinfo)); + + /* Limit on memory allocation for this JPEG object. (Note that this is + * merely advisory, not a guaranteed maximum; it only affects the space + * used for virtual-array buffers.) May be changed by outer application + * after creating the JPEG object. + */ + long max_memory_to_use; + + /* Maximum allocation request accepted by alloc_large. */ + long max_alloc_chunk; +}; + + +/* Routine signature for application-supplied marker processing methods. + * Need not pass marker code since it is stored in cinfo->unread_marker. + */ +typedef JMETHOD(wxjpeg_boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); + + +/* Declarations for routines called by application. + * The JPP macro hides prototype parameters from compilers that can't cope. + * Note JPP requires double parentheses. + */ + +#ifdef HAVE_PROTOTYPES +#define JPP(arglist) arglist +#else +#define JPP(arglist) () +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. + * We shorten external names to be unique in the first six letters, which + * is good enough for all known systems. + * (If your compiler itself needs names to be unique in less than 15 + * characters, you are out of luck. Get a better compiler.) + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_error jStdError +#define jpeg_CreateCompress jCreaCompress +#define jpeg_CreateDecompress jCreaDecompress +#define jpeg_destroy_compress jDestCompress +#define jpeg_destroy_decompress jDestDecompress +#define jpeg_stdio_dest jStdDest +#define jpeg_stdio_src jStdSrc +#define jpeg_set_defaults jSetDefaults +#define jpeg_set_colorspace jSetColorspace +#define jpeg_default_colorspace jDefColorspace +#define jpeg_set_quality jSetQuality +#define jpeg_set_linear_quality jSetLQuality +#define jpeg_add_quant_table jAddQuantTable +#define jpeg_quality_scaling jQualityScaling +#define jpeg_simple_progression jSimProgress +#define jpeg_suppress_tables jSuppressTables +#define jpeg_alloc_quant_table jAlcQTable +#define jpeg_alloc_huff_table jAlcHTable +#define jpeg_start_compress jStrtCompress +#define jpeg_write_scanlines jWrtScanlines +#define jpeg_finish_compress jFinCompress +#define jpeg_write_raw_data jWrtRawData +#define jpeg_write_marker jWrtMarker +#define jpeg_write_m_header jWrtMHeader +#define jpeg_write_m_byte jWrtMByte +#define jpeg_write_tables jWrtTables +#define jpeg_read_header jReadHeader +#define jpeg_start_decompress jStrtDecompress +#define jpeg_read_scanlines jReadScanlines +#define jpeg_finish_decompress jFinDecompress +#define jpeg_read_raw_data jReadRawData +#define jpeg_has_multiple_scans jHasMultScn +#define jpeg_start_output jStrtOutput +#define jpeg_finish_output jFinOutput +#define jpeg_input_complete jInComplete +#define jpeg_new_colormap jNewCMap +#define jpeg_consume_input jConsumeInput +#define jpeg_calc_output_dimensions jCalcDimensions +#define jpeg_save_markers jSaveMarkers +#define jpeg_set_marker_processor jSetMarker +#define jpeg_read_coefficients jReadCoefs +#define jpeg_write_coefficients jWrtCoefs +#define jpeg_copy_critical_parameters jCopyCrit +#define jpeg_abort_compress jAbrtCompress +#define jpeg_abort_decompress jAbrtDecompress +#define jpeg_abort jAbort +#define jpeg_destroy jDestroy +#define jpeg_resync_to_restart jResyncRestart +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Default error-management setup */ +EXTERN(struct jpeg_error_mgr *) jpeg_std_error + JPP((struct jpeg_error_mgr * err)); + +/* Initialization of JPEG compression objects. + * jpeg_create_compress() and jpeg_create_decompress() are the exported + * names that applications should call. These expand to calls on + * jpeg_CreateCompress and jpeg_CreateDecompress with additional information + * passed for version mismatch checking. + * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. + */ +#define jpeg_create_compress(cinfo) \ + jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_compress_struct)) +#define jpeg_create_decompress(cinfo) \ + jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_decompress_struct)) +EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, + int version, size_t structsize)); +EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, + int version, size_t structsize)); +/* Destruction of JPEG compression objects */ +EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); + +/* Standard data source and destination managers: stdio streams. */ +/* Caller is responsible for opening the file before and closing after. */ +EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); +EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* Default parameter setup for compression */ +EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); +/* Compression parameter setup aids */ +EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, + J_COLOR_SPACE colorspace)); +EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, + wxjpeg_boolean force_baseline)); +EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, + int scale_factor, + wxjpeg_boolean force_baseline)); +EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, + wxjpeg_boolean force_baseline)); +EXTERN(int) jpeg_quality_scaling JPP((int quality)); +EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, + wxjpeg_boolean suppress)); +EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); +EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo)); + +/* Main entry points for compression */ +EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, + wxjpeg_boolean write_all_tables)); +EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION num_lines)); +EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); + +/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION num_lines)); + +/* Write a special marker. See libjpeg.doc concerning safe usage. */ +EXTERN(void) jpeg_write_marker + JPP((j_compress_ptr cinfo, int marker, + const JOCTET * dataptr, unsigned int datalen)); +/* Same, but piecemeal. */ +EXTERN(void) jpeg_write_m_header + JPP((j_compress_ptr cinfo, int marker, unsigned int datalen)); +EXTERN(void) jpeg_write_m_byte + JPP((j_compress_ptr cinfo, int val)); + +/* Alternate compression function: just write an abbreviated table file */ +EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo)); + +/* Decompression startup: read start of JPEG datastream to see what's there */ +EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, + wxjpeg_boolean require_image)); +/* Return value is one of: */ +#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ +#define JPEG_HEADER_OK 1 /* Found valid image datastream */ +#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ +/* If you pass require_image = TRUE (normal case), you need not check for + * a TABLES_ONLY return code; an abbreviated file will cause an error exit. + * JPEG_SUSPENDED is only possible if you use a data source module that can + * give a suspension return (the stdio source module doesn't). + */ + +/* Main entry points for decompression */ +EXTERN(wxjpeg_boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION max_lines)); +EXTERN(wxjpeg_boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo)); + +/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION max_lines)); + +/* Additional entry points for buffered-image mode. */ +EXTERN(wxjpeg_boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); +EXTERN(wxjpeg_boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, + int scan_number)); +EXTERN(wxjpeg_boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo)); +EXTERN(wxjpeg_boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo)); +EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); +/* Return value is one of: */ +/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ +#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ +#define JPEG_REACHED_EOI 2 /* Reached end of image */ +#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ +#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ + +/* Precalculate output dimensions for current decompression parameters. */ +EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); + +/* Control saving of COM and APPn markers into marker_list. */ +EXTERN(void) jpeg_save_markers + JPP((j_decompress_ptr cinfo, int marker_code, + unsigned int length_limit)); + +/* Install a special processing method for COM or APPn markers. */ +EXTERN(void) jpeg_set_marker_processor + JPP((j_decompress_ptr cinfo, int marker_code, + jpeg_marker_parser_method routine)); + +/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ +EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays)); +EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, + j_compress_ptr dstinfo)); + +/* If you choose to abort compression or decompression before completing + * jpeg_finish_(de)compress, then you need to clean up to release memory, + * temporary files, etc. You can just call jpeg_destroy_(de)compress + * if you're done with the JPEG object, but if you want to clean it up and + * reuse it, call this: + */ +EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); + +/* Generic versions of jpeg_abort and jpeg_destroy that work on either + * flavor of JPEG object. These may be more convenient in some places. + */ +EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo)); + +/* Default restart-marker-resync procedure for use by data source modules */ +EXTERN(wxjpeg_boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, + int desired)); + + +/* These marker codes are exported since applications and data source modules + * are likely to want to use them. + */ + +#define JPEG_RST0 0xD0 /* RST0 marker code */ +#define JPEG_EOI 0xD9 /* EOI marker code */ +#define JPEG_APP0 0xE0 /* APP0 marker code */ +#define JPEG_COM 0xFE /* COM marker code */ + + +/* If we have a brain-damaged compiler that emits warnings (or worse, errors) + * for structure definitions that are never filled in, keep it quiet by + * supplying dummy definitions for the various substructures. + */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +struct jpeg_comp_master { long dummy; }; +struct jpeg_c_main_controller { long dummy; }; +struct jpeg_c_prep_controller { long dummy; }; +struct jpeg_c_coef_controller { long dummy; }; +struct jpeg_marker_writer { long dummy; }; +struct jpeg_color_converter { long dummy; }; +struct jpeg_downsampler { long dummy; }; +struct jpeg_forward_dct { long dummy; }; +struct jpeg_entropy_encoder { long dummy; }; +struct jpeg_decomp_master { long dummy; }; +struct jpeg_d_main_controller { long dummy; }; +struct jpeg_d_coef_controller { long dummy; }; +struct jpeg_d_post_controller { long dummy; }; +struct jpeg_input_controller { long dummy; }; +struct jpeg_marker_reader { long dummy; }; +struct jpeg_entropy_decoder { long dummy; }; +struct jpeg_inverse_dct { long dummy; }; +struct jpeg_upsampler { long dummy; }; +struct jpeg_color_deconverter { long dummy; }; +struct jpeg_color_quantizer { long dummy; }; +#endif /* JPEG_INTERNALS */ +#endif /* INCOMPLETE_TYPES_BROKEN */ + + +/* + * The JPEG library modules define JPEG_INTERNALS before including this file. + * The internal structure declarations are read only when that is true. + * Applications using the library should not include jpegint.h, but may wish + * to include jerror.h. + */ + +#ifdef JPEG_INTERNALS +#include "jpegint.h" /* fetch private declarations */ +#include "jerror.h" /* fetch error codes too */ +#endif + +#endif /* JPEGLIB_H */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpegtran.1 b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpegtran.1 new file mode 100644 index 0000000000..6de18e2af9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpegtran.1 @@ -0,0 +1,238 @@ +.TH JPEGTRAN 1 "3 August 1997" +.SH NAME +jpegtran \- lossless transformation of JPEG files +.SH SYNOPSIS +.B jpegtran +[ +.I options +] +[ +.I filename +] +.LP +.SH DESCRIPTION +.LP +.B jpegtran +performs various useful transformations of JPEG files. +It can translate the coded representation from one variant of JPEG to another, +for example from baseline JPEG to progressive JPEG or vice versa. It can also +perform some rearrangements of the image data, for example turning an image +from landscape to portrait format by rotation. +.PP +.B jpegtran +works by rearranging the compressed data (DCT coefficients), without +ever fully decoding the image. Therefore, its transformations are lossless: +there is no image degradation at all, which would not be true if you used +.B djpeg +followed by +.B cjpeg +to accomplish the same conversion. But by the same token, +.B jpegtran +cannot perform lossy operations such as changing the image quality. +.PP +.B jpegtran +reads the named JPEG/JFIF file, or the standard input if no file is +named, and produces a JPEG/JFIF file on the standard output. +.SH OPTIONS +All switch names may be abbreviated; for example, +.B \-optimize +may be written +.B \-opt +or +.BR \-o . +Upper and lower case are equivalent. +British spellings are also accepted (e.g., +.BR \-optimise ), +though for brevity these are not mentioned below. +.PP +To specify the coded JPEG representation used in the output file, +.B jpegtran +accepts a subset of the switches recognized by +.BR cjpeg : +.TP +.B \-optimize +Perform optimization of entropy encoding parameters. +.TP +.B \-progressive +Create progressive JPEG file. +.TP +.BI \-restart " N" +Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is +attached to the number. +.TP +.BI \-scans " file" +Use the scan script given in the specified text file. +.PP +See +.BR cjpeg (1) +for more details about these switches. +If you specify none of these switches, you get a plain baseline-JPEG output +file. The quality setting and so forth are determined by the input file. +.PP +The image can be losslessly transformed by giving one of these switches: +.TP +.B \-flip horizontal +Mirror image horizontally (left-right). +.TP +.B \-flip vertical +Mirror image vertically (top-bottom). +.TP +.B \-rotate 90 +Rotate image 90 degrees clockwise. +.TP +.B \-rotate 180 +Rotate image 180 degrees. +.TP +.B \-rotate 270 +Rotate image 270 degrees clockwise (or 90 ccw). +.TP +.B \-transpose +Transpose image (across UL-to-LR axis). +.TP +.B \-transverse +Transverse transpose (across UR-to-LL axis). +.PP +The transpose transformation has no restrictions regarding image dimensions. +The other transformations operate rather oddly if the image dimensions are not +a multiple of the iMCU size (usually 8 or 16 pixels), because they can only +transform complete blocks of DCT coefficient data in the desired way. +.PP +.BR jpegtran 's +default behavior when transforming an odd-size image is designed +to preserve exact reversibility and mathematical consistency of the +transformation set. As stated, transpose is able to flip the entire image +area. Horizontal mirroring leaves any partial iMCU column at the right edge +untouched, but is able to flip all rows of the image. Similarly, vertical +mirroring leaves any partial iMCU row at the bottom edge untouched, but is +able to flip all columns. The other transforms can be built up as sequences +of transpose and flip operations; for consistency, their actions on edge +pixels are defined to be the same as the end result of the corresponding +transpose-and-flip sequence. +.PP +For practical use, you may prefer to discard any untransformable edge pixels +rather than having a strange-looking strip along the right and/or bottom edges +of a transformed image. To do this, add the +.B \-trim +switch: +.TP +.B \-trim +Drop non-transformable edge blocks. +.PP +Obviously, a transformation with +.B \-trim +is not reversible, so strictly speaking +.B jpegtran +with this switch is not lossless. Also, the expected mathematical +equivalences between the transformations no longer hold. For example, +.B \-rot 270 -trim +trims only the bottom edge, but +.B \-rot 90 -trim +followed by +.B \-rot 180 -trim +trims both edges. +.PP +Another not-strictly-lossless transformation switch is: +.TP +.B \-grayscale +Force grayscale output. +.PP +This option discards the chrominance channels if the input image is YCbCr +(ie, a standard color JPEG), resulting in a grayscale JPEG file. The +luminance channel is preserved exactly, so this is a better method of reducing +to grayscale than decompression, conversion, and recompression. This switch +is particularly handy for fixing a monochrome picture that was mistakenly +encoded as a color JPEG. (In such a case, the space savings from getting rid +of the near-empty chroma channels won't be large; but the decoding time for +a grayscale JPEG is substantially less than that for a color JPEG.) +.PP +.B jpegtran +also recognizes these switches that control what to do with "extra" markers, +such as comment blocks: +.TP +.B \-copy none +Copy no extra markers from source file. This setting suppresses all +comments and other excess baggage present in the source file. +.TP +.B \-copy comments +Copy only comment markers. This setting copies comments from the source file, +but discards any other inessential data. +.TP +.B \-copy all +Copy all extra markers. This setting preserves miscellaneous markers +found in the source file, such as JFIF thumbnails and Photoshop settings. +In some files these extra markers can be sizable. +.PP +The default behavior is +.BR "\-copy comments" . +(Note: in IJG releases v6 and v6a, +.B jpegtran +always did the equivalent of +.BR "\-copy none" .) +.PP +Additional switches recognized by jpegtran are: +.TP +.BI \-maxmemory " N" +Set limit for amount of memory to use in processing large images. Value is +in thousands of bytes, or millions of bytes if "M" is attached to the +number. For example, +.B \-max 4m +selects 4000000 bytes. If more space is needed, temporary files will be used. +.TP +.BI \-outfile " name" +Send output image to the named file, not to standard output. +.TP +.B \-verbose +Enable debug printout. More +.BR \-v 's +give more output. Also, version information is printed at startup. +.TP +.B \-debug +Same as +.BR \-verbose . +.SH EXAMPLES +.LP +This example converts a baseline JPEG file to progressive form: +.IP +.B jpegtran \-progressive +.I foo.jpg +.B > +.I fooprog.jpg +.PP +This example rotates an image 90 degrees clockwise, discarding any +unrotatable edge pixels: +.IP +.B jpegtran \-rot 90 -trim +.I foo.jpg +.B > +.I foo90.jpg +.SH ENVIRONMENT +.TP +.B JPEGMEM +If this environment variable is set, its value is the default memory limit. +The value is specified as described for the +.B \-maxmemory +switch. +.B JPEGMEM +overrides the default value specified when the program was compiled, and +itself is overridden by an explicit +.BR \-maxmemory . +.SH SEE ALSO +.BR cjpeg (1), +.BR djpeg (1), +.BR rdjpgcom (1), +.BR wrjpgcom (1) +.br +Wallace, Gregory K. "The JPEG Still Picture Compression Standard", +Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. +.SH AUTHOR +Independent JPEG Group +.SH BUGS +Arithmetic coding is not supported for legal reasons. +.PP +The transform options can't transform odd-size images perfectly. Use +.B \-trim +if you don't like the results without it. +.PP +The entire image is read into memory and then written out again, even in +cases where this isn't really necessary. Expect swapping on large images, +especially when using the more complex transform options. diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpegtran.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpegtran.c new file mode 100644 index 0000000000..c81a626561 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jpegtran.c @@ -0,0 +1,504 @@ +/* + * jpegtran.c + * + * Copyright (C) 1995-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a command-line user interface for JPEG transcoding. + * It is very similar to cjpeg.c, but provides lossless transcoding between + * different JPEG file formats. It also provides some lossless and sort-of- + * lossless transformations of JPEG data. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include "transupp.h" /* Support routines for jpegtran */ +#include "jversion.h" /* for version message */ + +#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ +#ifdef __MWERKS__ +#include /* Metrowerks needs this */ +#include /* ... and this */ +#endif +#ifdef THINK_C +#include /* Think declares it here */ +#endif +#endif + + +/* + * Argument-parsing code. + * The switch parser is designed to be useful with DOS-style command line + * syntax, ie, intermixed switches and file names, where only the switches + * to the left of a given file name affect processing of that file. + * The main program in this file doesn't actually use this capability... + */ + + +static const char * progname; /* program name for error messages */ +static char * outfilename; /* for -outfile switch */ +static JCOPY_OPTION copyoption; /* -copy switch */ +static jpeg_transform_info transformoption; /* image transformation options */ + + +LOCAL(void) +usage (void) +/* complain about bad command line */ +{ + fprintf(stderr, "usage: %s [switches] ", progname); +#ifdef TWO_FILE_COMMANDLINE + fprintf(stderr, "inputfile outputfile\n"); +#else + fprintf(stderr, "[inputfile]\n"); +#endif + + fprintf(stderr, "Switches (names may be abbreviated):\n"); + fprintf(stderr, " -copy none Copy no extra markers from source file\n"); + fprintf(stderr, " -copy comments Copy only comment markers (default)\n"); + fprintf(stderr, " -copy all Copy all extra markers\n"); +#ifdef ENTROPY_OPT_SUPPORTED + fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); +#endif +#ifdef C_PROGRESSIVE_SUPPORTED + fprintf(stderr, " -progressive Create progressive JPEG file\n"); +#endif +#if TRANSFORMS_SUPPORTED + fprintf(stderr, "Switches for modifying the image:\n"); + fprintf(stderr, " -grayscale Reduce to grayscale (omit color data)\n"); + fprintf(stderr, " -flip [horizontal|vertical] Mirror image (left-right or top-bottom)\n"); + fprintf(stderr, " -rotate [90|180|270] Rotate image (degrees clockwise)\n"); + fprintf(stderr, " -transpose Transpose image\n"); + fprintf(stderr, " -transverse Transverse transpose image\n"); + fprintf(stderr, " -trim Drop non-transformable edge blocks\n"); +#endif /* TRANSFORMS_SUPPORTED */ + fprintf(stderr, "Switches for advanced users:\n"); + fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); + fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); + fprintf(stderr, " -outfile name Specify name for output file\n"); + fprintf(stderr, " -verbose or -debug Emit debug output\n"); + fprintf(stderr, "Switches for wizards:\n"); +#ifdef C_ARITH_CODING_SUPPORTED + fprintf(stderr, " -arithmetic Use arithmetic coding\n"); +#endif +#ifdef C_MULTISCAN_FILES_SUPPORTED + fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); +#endif + exit(EXIT_FAILURE); +} + + +LOCAL(void) +select_transform (JXFORM_CODE transform) +/* Silly little routine to detect multiple transform options, + * which we can't handle. + */ +{ +#if TRANSFORMS_SUPPORTED + if (transformoption.transform == JXFORM_NONE || + transformoption.transform == transform) { + transformoption.transform = transform; + } else { + fprintf(stderr, "%s: can only do one image transformation at a time\n", + progname); + usage(); + } +#else + fprintf(stderr, "%s: sorry, image transformation was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif +} + + +LOCAL(int) +parse_switches (j_compress_ptr cinfo, int argc, char **argv, + int last_file_arg_seen, wxjpeg_boolean for_real) +/* Parse optional switches. + * Returns argv[] index of first file-name argument (== argc if none). + * Any file names with indexes <= last_file_arg_seen are ignored; + * they have presumably been processed in a previous iteration. + * (Pass 0 for last_file_arg_seen on the first or only iteration.) + * for_real is FALSE on the first (dummy) pass; we may skip any expensive + * processing. + */ +{ + int argn; + char * arg; + wxjpeg_boolean simple_progressive; + char * scansarg = NULL; /* saves -scans parm if any */ + + /* Set up default JPEG parameters. */ + simple_progressive = FALSE; + outfilename = NULL; + copyoption = JCOPYOPT_DEFAULT; + transformoption.transform = JXFORM_NONE; + transformoption.trim = FALSE; + transformoption.force_grayscale = FALSE; + cinfo->err->trace_level = 0; + + /* Scan command line options, adjust parameters */ + + for (argn = 1; argn < argc; argn++) { + arg = argv[argn]; + if (*arg != '-') { + /* Not a switch, must be a file name argument */ + if (argn <= last_file_arg_seen) { + outfilename = NULL; /* -outfile applies to just one input file */ + continue; /* ignore this name if previously processed */ + } + break; /* else done parsing switches */ + } + arg++; /* advance past switch marker character */ + + if (keymatch(arg, "arithmetic", 1)) { + /* Use arithmetic coding. */ +#ifdef C_ARITH_CODING_SUPPORTED + cinfo->arith_code = TRUE; +#else + fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "copy", 1)) { + /* Select which extra markers to copy. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "none", 1)) { + copyoption = JCOPYOPT_NONE; + } else if (keymatch(argv[argn], "comments", 1)) { + copyoption = JCOPYOPT_COMMENTS; + } else if (keymatch(argv[argn], "all", 1)) { + copyoption = JCOPYOPT_ALL; + } else + usage(); + + } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { + /* Enable debug printouts. */ + /* On first -d, print version identification */ + static wxjpeg_boolean printed_version = FALSE; + + if (! printed_version) { + fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n", + JVERSION, JCOPYRIGHT); + printed_version = TRUE; + } + cinfo->err->trace_level++; + + } else if (keymatch(arg, "flip", 1)) { + /* Mirror left-right or top-bottom. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "horizontal", 1)) + select_transform(JXFORM_FLIP_H); + else if (keymatch(argv[argn], "vertical", 1)) + select_transform(JXFORM_FLIP_V); + else + usage(); + + } else if (keymatch(arg, "grayscale", 1) || keymatch(arg, "greyscale",1)) { + /* Force to grayscale. */ +#if TRANSFORMS_SUPPORTED + transformoption.force_grayscale = TRUE; +#else + select_transform(JXFORM_NONE); /* force an error */ +#endif + + } else if (keymatch(arg, "maxmemory", 3)) { + /* Maximum memory in Kb (or Mb with 'm'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (ch == 'm' || ch == 'M') + lval *= 1000L; + cinfo->mem->max_memory_to_use = lval * 1000L; + + } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { + /* Enable entropy parm optimization. */ +#ifdef ENTROPY_OPT_SUPPORTED + cinfo->optimize_coding = TRUE; +#else + fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "outfile", 4)) { + /* Set output file name. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + outfilename = argv[argn]; /* save it away for later use */ + + } else if (keymatch(arg, "progressive", 1)) { + /* Select simple progressive mode. */ +#ifdef C_PROGRESSIVE_SUPPORTED + simple_progressive = TRUE; + /* We must postpone execution until num_components is known. */ +#else + fprintf(stderr, "%s: sorry, progressive output was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "restart", 1)) { + /* Restart interval in MCU rows (or in MCUs with 'b'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (lval < 0 || lval > 65535L) + usage(); + if (ch == 'b' || ch == 'B') { + cinfo->restart_interval = (unsigned int) lval; + cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ + } else { + cinfo->restart_in_rows = (int) lval; + /* restart_interval will be computed during startup */ + } + + } else if (keymatch(arg, "rotate", 2)) { + /* Rotate 90, 180, or 270 degrees (measured clockwise). */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "90", 2)) + select_transform(JXFORM_ROT_90); + else if (keymatch(argv[argn], "180", 3)) + select_transform(JXFORM_ROT_180); + else if (keymatch(argv[argn], "270", 3)) + select_transform(JXFORM_ROT_270); + else + usage(); + + } else if (keymatch(arg, "scans", 1)) { + /* Set scan script. */ +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (++argn >= argc) /* advance to next argument */ + usage(); + scansarg = argv[argn]; + /* We must postpone reading the file in case -progressive appears. */ +#else + fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "transpose", 1)) { + /* Transpose (across UL-to-LR axis). */ + select_transform(JXFORM_TRANSPOSE); + + } else if (keymatch(arg, "transverse", 6)) { + /* Transverse transpose (across UR-to-LL axis). */ + select_transform(JXFORM_TRANSVERSE); + + } else if (keymatch(arg, "trim", 3)) { + /* Trim off any partial edge MCUs that the transform can't handle. */ + transformoption.trim = TRUE; + + } else { + usage(); /* bogus switch */ + } + } + + /* Post-switch-scanning cleanup */ + + if (for_real) { + +#ifdef C_PROGRESSIVE_SUPPORTED + if (simple_progressive) /* process -progressive; -scans can override */ + jpeg_simple_progression(cinfo); +#endif + +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (scansarg != NULL) /* process -scans if it was present */ + if (! read_scan_script(cinfo, scansarg)) + usage(); +#endif + } + + return argn; /* return index of next arg (file name) */ +} + + +/* + * The main program. + */ + +int +main (int argc, char **argv) +{ + struct jpeg_decompress_struct srcinfo; + struct jpeg_compress_struct dstinfo; + struct jpeg_error_mgr jsrcerr, jdsterr; +#ifdef PROGRESS_REPORT + struct cdjpeg_progress_mgr progress; +#endif + jvirt_barray_ptr * src_coef_arrays; + jvirt_barray_ptr * dst_coef_arrays; + int file_index; + FILE * input_file; + FILE * output_file; + + /* On Mac, fetch a command line. */ +#ifdef USE_CCOMMAND + argc = ccommand(&argv); +#endif + + progname = argv[0]; + if (progname == NULL || progname[0] == 0) + progname = "jpegtran"; /* in case C library doesn't provide it */ + + /* Initialize the JPEG decompression object with default error handling. */ + srcinfo.err = jpeg_std_error(&jsrcerr); + jpeg_create_decompress(&srcinfo); + /* Initialize the JPEG compression object with default error handling. */ + dstinfo.err = jpeg_std_error(&jdsterr); + jpeg_create_compress(&dstinfo); + + /* Now safe to enable signal catcher. + * Note: we assume only the decompression object will have virtual arrays. + */ +#ifdef NEED_SIGNAL_CATCHER + enable_signal_catcher((j_common_ptr) &srcinfo); +#endif + + /* Scan command line to find file names. + * It is convenient to use just one switch-parsing routine, but the switch + * values read here are mostly ignored; we will rescan the switches after + * opening the input file. Also note that most of the switches affect the + * destination JPEG object, so we parse into that and then copy over what + * needs to affects the source too. + */ + + file_index = parse_switches(&dstinfo, argc, argv, 0, FALSE); + jsrcerr.trace_level = jdsterr.trace_level; + srcinfo.mem->max_memory_to_use = dstinfo.mem->max_memory_to_use; + +#ifdef TWO_FILE_COMMANDLINE + /* Must have either -outfile switch or explicit output file name */ + if (outfilename == NULL) { + if (file_index != argc-2) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + outfilename = argv[file_index+1]; + } else { + if (file_index != argc-1) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + } +#else + /* Unix style: expect zero or one file name */ + if (file_index < argc-1) { + fprintf(stderr, "%s: only one input file\n", progname); + usage(); + } +#endif /* TWO_FILE_COMMANDLINE */ + + /* Open the input file. */ + if (file_index < argc) { + if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); + exit(EXIT_FAILURE); + } + } else { + /* default input file is stdin */ + input_file = read_stdin(); + } + + /* Open the output file. */ + if (outfilename != NULL) { + if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, outfilename); + exit(EXIT_FAILURE); + } + } else { + /* default output file is stdout */ + output_file = write_stdout(); + } + +#ifdef PROGRESS_REPORT + start_progress_monitor((j_common_ptr) &dstinfo, &progress); +#endif + + /* Specify data source for decompression */ + jpeg_stdio_src(&srcinfo, input_file); + + /* Enable saving of extra markers that we want to copy */ + jcopy_markers_setup(&srcinfo, copyoption); + + /* Read file header */ + (void) jpeg_read_header(&srcinfo, TRUE); + + /* Any space needed by a transform option must be requested before + * jpeg_read_coefficients so that memory allocation will be done right. + */ +#if TRANSFORMS_SUPPORTED + jtransform_request_workspace(&srcinfo, &transformoption); +#endif + + /* Read source file as DCT coefficients */ + src_coef_arrays = jpeg_read_coefficients(&srcinfo); + + /* Initialize destination compression parameters from source values */ + jpeg_copy_critical_parameters(&srcinfo, &dstinfo); + + /* Adjust destination parameters if required by transform options; + * also find out which set of coefficient arrays will hold the output. + */ +#if TRANSFORMS_SUPPORTED + dst_coef_arrays = jtransform_adjust_parameters(&srcinfo, &dstinfo, + src_coef_arrays, + &transformoption); +#else + dst_coef_arrays = src_coef_arrays; +#endif + + /* Adjust default compression parameters by re-parsing the options */ + file_index = parse_switches(&dstinfo, argc, argv, 0, TRUE); + + /* Specify data destination for compression */ + jpeg_stdio_dest(&dstinfo, output_file); + + /* Start compressor (note no image data is actually written here) */ + jpeg_write_coefficients(&dstinfo, dst_coef_arrays); + + /* Copy to the output file any extra markers that we want to preserve */ + jcopy_markers_execute(&srcinfo, &dstinfo, copyoption); + + /* Execute image transformation, if any */ +#if TRANSFORMS_SUPPORTED + jtransform_execute_transformation(&srcinfo, &dstinfo, + src_coef_arrays, + &transformoption); +#endif + + /* Finish compression and release memory */ + jpeg_finish_compress(&dstinfo); + jpeg_destroy_compress(&dstinfo); + (void) jpeg_finish_decompress(&srcinfo); + jpeg_destroy_decompress(&srcinfo); + + /* Close files, if we opened them */ + if (input_file != stdin) + fclose(input_file); + if (output_file != stdout) + fclose(output_file); + +#ifdef PROGRESS_REPORT + end_progress_monitor((j_common_ptr) &dstinfo); +#endif + + /* All done. */ + exit(jsrcerr.num_warnings + jdsterr.num_warnings ?EXIT_WARNING:EXIT_SUCCESS); + return 0; /* suppress no-return-value warnings */ +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jquant1.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jquant1.c new file mode 100644 index 0000000000..f6d221f5f9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jquant1.c @@ -0,0 +1,856 @@ +/* + * jquant1.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains 1-pass color quantization (color mapping) routines. + * These routines provide mapping to a fixed color map using equally spaced + * color values. Optional Floyd-Steinberg or ordered dithering is available. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef QUANT_1PASS_SUPPORTED + + +/* + * The main purpose of 1-pass quantization is to provide a fast, if not very + * high quality, colormapped output capability. A 2-pass quantizer usually + * gives better visual quality; however, for quantized grayscale output this + * quantizer is perfectly adequate. Dithering is highly recommended with this + * quantizer, though you can turn it off if you really want to. + * + * In 1-pass quantization the colormap must be chosen in advance of seeing the + * image. We use a map consisting of all combinations of Ncolors[i] color + * values for the i'th component. The Ncolors[] values are chosen so that + * their product, the total number of colors, is no more than that requested. + * (In most cases, the product will be somewhat less.) + * + * Since the colormap is orthogonal, the representative value for each color + * component can be determined without considering the other components; + * then these indexes can be combined into a colormap index by a standard + * N-dimensional-array-subscript calculation. Most of the arithmetic involved + * can be precalculated and stored in the lookup table colorindex[]. + * colorindex[i][j] maps pixel value j in component i to the nearest + * representative value (grid plane) for that component; this index is + * multiplied by the array stride for component i, so that the + * index of the colormap entry closest to a given pixel value is just + * sum( colorindex[component-number][pixel-component-value] ) + * Aside from being fast, this scheme allows for variable spacing between + * representative values with no additional lookup cost. + * + * If gamma correction has been applied in color conversion, it might be wise + * to adjust the color grid spacing so that the representative colors are + * equidistant in linear space. At this writing, gamma correction is not + * implemented by jdcolor, so nothing is done here. + */ + + +/* Declarations for ordered dithering. + * + * We use a standard 16x16 ordered dither array. The basic concept of ordered + * dithering is described in many references, for instance Dale Schumacher's + * chapter II.2 of Graphics Gems II (James Arvo, ed. Academic Press, 1991). + * In place of Schumacher's comparisons against a "threshold" value, we add a + * "dither" value to the input pixel and then round the result to the nearest + * output value. The dither value is equivalent to (0.5 - threshold) times + * the distance between output values. For ordered dithering, we assume that + * the output colors are equally spaced; if not, results will probably be + * worse, since the dither may be too much or too little at a given point. + * + * The normal calculation would be to form pixel value + dither, range-limit + * this to 0..MAXJSAMPLE, and then index into the colorindex table as usual. + * We can skip the separate range-limiting step by extending the colorindex + * table in both directions. + */ + +#define ODITHER_SIZE 16 /* dimension of dither matrix */ +/* NB: if ODITHER_SIZE is not a power of 2, ODITHER_MASK uses will break */ +#define ODITHER_CELLS (ODITHER_SIZE*ODITHER_SIZE) /* # cells in matrix */ +#define ODITHER_MASK (ODITHER_SIZE-1) /* mask for wrapping around counters */ + +typedef int ODITHER_MATRIX[ODITHER_SIZE][ODITHER_SIZE]; +typedef int (*ODITHER_MATRIX_PTR)[ODITHER_SIZE]; + +static const UINT8 base_dither_matrix[ODITHER_SIZE][ODITHER_SIZE] = { + /* Bayer's order-4 dither array. Generated by the code given in + * Stephen Hawley's article "Ordered Dithering" in Graphics Gems I. + * The values in this array must range from 0 to ODITHER_CELLS-1. + */ + { 0,192, 48,240, 12,204, 60,252, 3,195, 51,243, 15,207, 63,255 }, + { 128, 64,176,112,140, 76,188,124,131, 67,179,115,143, 79,191,127 }, + { 32,224, 16,208, 44,236, 28,220, 35,227, 19,211, 47,239, 31,223 }, + { 160, 96,144, 80,172,108,156, 92,163, 99,147, 83,175,111,159, 95 }, + { 8,200, 56,248, 4,196, 52,244, 11,203, 59,251, 7,199, 55,247 }, + { 136, 72,184,120,132, 68,180,116,139, 75,187,123,135, 71,183,119 }, + { 40,232, 24,216, 36,228, 20,212, 43,235, 27,219, 39,231, 23,215 }, + { 168,104,152, 88,164,100,148, 84,171,107,155, 91,167,103,151, 87 }, + { 2,194, 50,242, 14,206, 62,254, 1,193, 49,241, 13,205, 61,253 }, + { 130, 66,178,114,142, 78,190,126,129, 65,177,113,141, 77,189,125 }, + { 34,226, 18,210, 46,238, 30,222, 33,225, 17,209, 45,237, 29,221 }, + { 162, 98,146, 82,174,110,158, 94,161, 97,145, 81,173,109,157, 93 }, + { 10,202, 58,250, 6,198, 54,246, 9,201, 57,249, 5,197, 53,245 }, + { 138, 74,186,122,134, 70,182,118,137, 73,185,121,133, 69,181,117 }, + { 42,234, 26,218, 38,230, 22,214, 41,233, 25,217, 37,229, 21,213 }, + { 170,106,154, 90,166,102,150, 86,169,105,153, 89,165,101,149, 85 } +}; + + +/* Declarations for Floyd-Steinberg dithering. + * + * Errors are accumulated into the array fserrors[], at a resolution of + * 1/16th of a pixel count. The error at a given pixel is propagated + * to its not-yet-processed neighbors using the standard F-S fractions, + * ... (here) 7/16 + * 3/16 5/16 1/16 + * We work left-to-right on even rows, right-to-left on odd rows. + * + * We can get away with a single array (holding one row's worth of errors) + * by using it to store the current row's errors at pixel columns not yet + * processed, but the next row's errors at columns already processed. We + * need only a few extra variables to hold the errors immediately around the + * current column. (If we are lucky, those variables are in registers, but + * even if not, they're probably cheaper to access than array elements are.) + * + * The fserrors[] array is indexed [component#][position]. + * We provide (#columns + 2) entries per component; the extra entry at each + * end saves us from special-casing the first and last pixels. + * + * Note: on a wide image, we might not have enough room in a PC's near data + * segment to hold the error array; so it is allocated with alloc_large. + */ + +#if BITS_IN_JSAMPLE == 8 +typedef INT16 FSERROR; /* 16 bits should be enough */ +typedef int LOCFSERROR; /* use 'int' for calculation temps */ +#else +typedef JPEG_INT32 FSERROR; /* may need more than 16 bits */ +typedef JPEG_INT32 LOCFSERROR; /* be sure calculation temps are big enough */ +#endif + +typedef FSERROR FAR *FSERRPTR; /* pointer to error array (in FAR storage!) */ + + +/* Private subobject */ + +#define MAX_Q_COMPS 4 /* max components I can handle */ + +typedef struct { + struct jpeg_color_quantizer pub; /* public fields */ + + /* Initially allocated colormap is saved here */ + JSAMPARRAY sv_colormap; /* The color map as a 2-D pixel array */ + int sv_actual; /* number of entries in use */ + + JSAMPARRAY colorindex; /* Precomputed mapping for speed */ + /* colorindex[i][j] = index of color closest to pixel value j in component i, + * premultiplied as described above. Since colormap indexes must fit into + * JSAMPLEs, the entries of this array will too. + */ + wxjpeg_boolean is_padded; /* is the colorindex padded for odither? */ + + int Ncolors[MAX_Q_COMPS]; /* # of values alloced to each component */ + + /* Variables for ordered dithering */ + int row_index; /* cur row's vertical index in dither matrix */ + ODITHER_MATRIX_PTR odither[MAX_Q_COMPS]; /* one dither array per component */ + + /* Variables for Floyd-Steinberg dithering */ + FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */ + wxjpeg_boolean on_odd_row; /* flag to remember which row we are on */ +} my_cquantizer; + +typedef my_cquantizer * my_cquantize_ptr; + + +/* + * Policy-making subroutines for create_colormap and create_colorindex. + * These routines determine the colormap to be used. The rest of the module + * only assumes that the colormap is orthogonal. + * + * * select_ncolors decides how to divvy up the available colors + * among the components. + * * output_value defines the set of representative values for a component. + * * largest_input_value defines the mapping from input values to + * representative values for a component. + * Note that the latter two routines may impose different policies for + * different components, though this is not currently done. + */ + + +LOCAL(int) +select_ncolors (j_decompress_ptr cinfo, int Ncolors[]) +/* Determine allocation of desired colors to components, */ +/* and fill in Ncolors[] array to indicate choice. */ +/* Return value is total number of colors (product of Ncolors[] values). */ +{ + int nc = cinfo->out_color_components; /* number of color components */ + int max_colors = cinfo->desired_number_of_colors; + int total_colors, iroot, i, j; + wxjpeg_boolean changed; + long temp; + static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE }; + + /* We can allocate at least the nc'th root of max_colors per component. */ + /* Compute floor(nc'th root of max_colors). */ + iroot = 1; + do { + iroot++; + temp = iroot; /* set temp = iroot ** nc */ + for (i = 1; i < nc; i++) + temp *= iroot; + } while (temp <= (long) max_colors); /* repeat till iroot exceeds root */ + iroot--; /* now iroot = floor(root) */ + + /* Must have at least 2 color values per component */ + if (iroot < 2) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, (int) temp); + + /* Initialize to iroot color values for each component */ + total_colors = 1; + for (i = 0; i < nc; i++) { + Ncolors[i] = iroot; + total_colors *= iroot; + } + /* We may be able to increment the count for one or more components without + * exceeding max_colors, though we know not all can be incremented. + * Sometimes, the first component can be incremented more than once! + * (Example: for 16 colors, we start at 2*2*2, go to 3*2*2, then 4*2*2.) + * In RGB colorspace, try to increment G first, then R, then B. + */ + do { + changed = FALSE; + for (i = 0; i < nc; i++) { + j = (cinfo->out_color_space == JCS_RGB ? RGB_order[i] : i); + /* calculate new total_colors if Ncolors[j] is incremented */ + temp = total_colors / Ncolors[j]; + temp *= Ncolors[j]+1; /* done in long arith to avoid oflo */ + if (temp > (long) max_colors) + break; /* won't fit, done with this pass */ + Ncolors[j]++; /* OK, apply the increment */ + total_colors = (int) temp; + changed = TRUE; + } + } while (changed); + + return total_colors; +} + + +LOCAL(int) +output_value (j_decompress_ptr cinfo, int ci, int j, int maxj) +/* Return j'th output value, where j will range from 0 to maxj */ +/* The output values must fall in 0..MAXJSAMPLE in increasing order */ +{ + /* We always provide values 0 and MAXJSAMPLE for each component; + * any additional values are equally spaced between these limits. + * (Forcing the upper and lower values to the limits ensures that + * dithering can't produce a color outside the selected gamut.) + */ + return (int) (((JPEG_INT32) j * MAXJSAMPLE + maxj/2) / maxj); +} + + +LOCAL(int) +largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj) +/* Return largest input value that should map to j'th output value */ +/* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ +{ + /* Breakpoints are halfway between values returned by output_value */ + return (int) (((JPEG_INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); +} + + +/* + * Create the colormap. + */ + +LOCAL(void) +create_colormap (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPARRAY colormap; /* Created colormap */ + int total_colors; /* Number of distinct output colors */ + int i,j,k, nci, blksize, blkdist, ptr, val; + + /* Select number of colors for each component */ + total_colors = select_ncolors(cinfo, cquantize->Ncolors); + + /* Report selected color counts */ + if (cinfo->out_color_components == 3) + TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS, + total_colors, cquantize->Ncolors[0], + cquantize->Ncolors[1], cquantize->Ncolors[2]); + else + TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors); + + /* Allocate and fill in the colormap. */ + /* The colors are ordered in the map in standard row-major order, */ + /* i.e. rightmost (highest-indexed) color changes most rapidly. */ + + colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components); + + /* blksize is number of adjacent repeated entries for a component */ + /* blkdist is distance between groups of identical entries for a component */ + blkdist = total_colors; + + for (i = 0; i < cinfo->out_color_components; i++) { + /* fill in colormap entries for i'th color component */ + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + blksize = blkdist / nci; + for (j = 0; j < nci; j++) { + /* Compute j'th output value (out of nci) for component */ + val = output_value(cinfo, i, j, nci-1); + /* Fill in all colormap entries that have this value of this component */ + for (ptr = j * blksize; ptr < total_colors; ptr += blkdist) { + /* fill in blksize entries beginning at ptr */ + for (k = 0; k < blksize; k++) + colormap[i][ptr+k] = (JSAMPLE) val; + } + } + blkdist = blksize; /* blksize of this color is blkdist of next */ + } + + /* Save the colormap in private storage, + * where it will survive color quantization mode changes. + */ + cquantize->sv_colormap = colormap; + cquantize->sv_actual = total_colors; +} + + +/* + * Create the color index table. + */ + +LOCAL(void) +create_colorindex (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPROW indexptr; + int i,j,k, nci, blksize, val, pad; + + /* For ordered dither, we pad the color index tables by MAXJSAMPLE in + * each direction (input index values can be -MAXJSAMPLE .. 2*MAXJSAMPLE). + * This is not necessary in the other dithering modes. However, we + * flag whether it was done in case user changes dithering mode. + */ + if (cinfo->dither_mode == JDITHER_ORDERED) { + pad = MAXJSAMPLE*2; + cquantize->is_padded = TRUE; + } else { + pad = 0; + cquantize->is_padded = FALSE; + } + + cquantize->colorindex = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (MAXJSAMPLE+1 + pad), + (JDIMENSION) cinfo->out_color_components); + + /* blksize is number of adjacent repeated entries for a component */ + blksize = cquantize->sv_actual; + + for (i = 0; i < cinfo->out_color_components; i++) { + /* fill in colorindex entries for i'th color component */ + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + blksize = blksize / nci; + + /* adjust colorindex pointers to provide padding at negative indexes. */ + if (pad) + cquantize->colorindex[i] += MAXJSAMPLE; + + /* in loop, val = index of current output value, */ + /* and k = largest j that maps to current val */ + indexptr = cquantize->colorindex[i]; + val = 0; + k = largest_input_value(cinfo, i, 0, nci-1); + for (j = 0; j <= MAXJSAMPLE; j++) { + while (j > k) /* advance val if past boundary */ + k = largest_input_value(cinfo, i, ++val, nci-1); + /* premultiply so that no multiplication needed in main processing */ + indexptr[j] = (JSAMPLE) (val * blksize); + } + /* Pad at both ends if necessary */ + if (pad) + for (j = 1; j <= MAXJSAMPLE; j++) { + indexptr[-j] = indexptr[0]; + indexptr[MAXJSAMPLE+j] = indexptr[MAXJSAMPLE]; + } + } +} + + +/* + * Create an ordered-dither array for a component having ncolors + * distinct output values. + */ + +LOCAL(ODITHER_MATRIX_PTR) +make_odither_array (j_decompress_ptr cinfo, int ncolors) +{ + ODITHER_MATRIX_PTR odither; + int j,k; + JPEG_INT32 num,den; + + odither = (ODITHER_MATRIX_PTR) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(ODITHER_MATRIX)); + /* The inter-value distance for this color is MAXJSAMPLE/(ncolors-1). + * Hence the dither value for the matrix cell with fill order f + * (f=0..N-1) should be (N-1-2*f)/(2*N) * MAXJSAMPLE/(ncolors-1). + * On 16-bit-int machine, be careful to avoid overflow. + */ + den = 2 * ODITHER_CELLS * ((JPEG_INT32) (ncolors - 1)); + for (j = 0; j < ODITHER_SIZE; j++) { + for (k = 0; k < ODITHER_SIZE; k++) { + num = ((JPEG_INT32) (ODITHER_CELLS-1 - 2*((int)base_dither_matrix[j][k]))) + * MAXJSAMPLE; + /* Ensure round towards zero despite C's lack of consistency + * about rounding negative values in integer division... + */ + odither[j][k] = (int) (num<0 ? -((-num)/den) : num/den); + } + } + return odither; +} + + +/* + * Create the ordered-dither tables. + * Components having the same number of representative colors may + * share a dither table. + */ + +LOCAL(void) +create_odither_tables (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + ODITHER_MATRIX_PTR odither; + int i, j, nci; + + for (i = 0; i < cinfo->out_color_components; i++) { + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + odither = NULL; /* search for matching prior component */ + for (j = 0; j < i; j++) { + if (nci == cquantize->Ncolors[j]) { + odither = cquantize->odither[j]; + break; + } + } + if (odither == NULL) /* need a new table? */ + odither = make_odither_array(cinfo, nci); + cquantize->odither[i] = odither; + } +} + + +/* + * Map some rows of pixels to the output colormapped representation. + */ + +METHODDEF(void) +color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPARRAY colorindex = cquantize->colorindex; + register int pixcode, ci; + register JSAMPROW ptrin, ptrout; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + register int nc = cinfo->out_color_components; + + for (row = 0; row < num_rows; row++) { + ptrin = input_buf[row]; + ptrout = output_buf[row]; + for (col = width; col > 0; col--) { + pixcode = 0; + for (ci = 0; ci < nc; ci++) { + pixcode += GETJSAMPLE(colorindex[ci][GETJSAMPLE(*ptrin++)]); + } + *ptrout++ = (JSAMPLE) pixcode; + } + } +} + + +METHODDEF(void) +color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* Fast path for out_color_components==3, no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register int pixcode; + register JSAMPROW ptrin, ptrout; + JSAMPROW colorindex0 = cquantize->colorindex[0]; + JSAMPROW colorindex1 = cquantize->colorindex[1]; + JSAMPROW colorindex2 = cquantize->colorindex[2]; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + ptrin = input_buf[row]; + ptrout = output_buf[row]; + for (col = width; col > 0; col--) { + pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*ptrin++)]); + pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*ptrin++)]); + pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*ptrin++)]); + *ptrout++ = (JSAMPLE) pixcode; + } + } +} + + +METHODDEF(void) +quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, with ordered dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex_ci; + int * dither; /* points to active row of dither matrix */ + int row_index, col_index; /* current indexes into dither matrix */ + int nc = cinfo->out_color_components; + int ci; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + /* Initialize output values to 0 so can process components separately */ + jzero_far((void FAR *) output_buf[row], + (size_t) (width * SIZEOF(JSAMPLE))); + row_index = cquantize->row_index; + for (ci = 0; ci < nc; ci++) { + input_ptr = input_buf[row] + ci; + output_ptr = output_buf[row]; + colorindex_ci = cquantize->colorindex[ci]; + dither = cquantize->odither[ci][row_index]; + col_index = 0; + + for (col = width; col > 0; col--) { + /* Form pixel value + dither, range-limit to 0..MAXJSAMPLE, + * select output value, accumulate into output code for this pixel. + * Range-limiting need not be done explicitly, as we have extended + * the colorindex table to produce the right answers for out-of-range + * inputs. The maximum dither is +- MAXJSAMPLE; this sets the + * required amount of padding. + */ + *output_ptr += colorindex_ci[GETJSAMPLE(*input_ptr)+dither[col_index]]; + input_ptr += nc; + output_ptr++; + col_index = (col_index + 1) & ODITHER_MASK; + } + } + /* Advance row index for next row */ + row_index = (row_index + 1) & ODITHER_MASK; + cquantize->row_index = row_index; + } +} + + +METHODDEF(void) +quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* Fast path for out_color_components==3, with ordered dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register int pixcode; + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex0 = cquantize->colorindex[0]; + JSAMPROW colorindex1 = cquantize->colorindex[1]; + JSAMPROW colorindex2 = cquantize->colorindex[2]; + int * dither0; /* points to active row of dither matrix */ + int * dither1; + int * dither2; + int row_index, col_index; /* current indexes into dither matrix */ + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + row_index = cquantize->row_index; + input_ptr = input_buf[row]; + output_ptr = output_buf[row]; + dither0 = cquantize->odither[0][row_index]; + dither1 = cquantize->odither[1][row_index]; + dither2 = cquantize->odither[2][row_index]; + col_index = 0; + + for (col = width; col > 0; col--) { + pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*input_ptr++) + + dither0[col_index]]); + pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*input_ptr++) + + dither1[col_index]]); + pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*input_ptr++) + + dither2[col_index]]); + *output_ptr++ = (JSAMPLE) pixcode; + col_index = (col_index + 1) & ODITHER_MASK; + } + row_index = (row_index + 1) & ODITHER_MASK; + cquantize->row_index = row_index; + } +} + + +METHODDEF(void) +quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, with Floyd-Steinberg dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register LOCFSERROR cur; /* current error or pixel value */ + LOCFSERROR belowerr; /* error for pixel below cur */ + LOCFSERROR bpreverr; /* error for below/prev col */ + LOCFSERROR bnexterr; /* error for below/next col */ + LOCFSERROR delta; + register FSERRPTR errorptr; /* => fserrors[] at column before current */ + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex_ci; + JSAMPROW colormap_ci; + int pixcode; + int nc = cinfo->out_color_components; + int dir; /* 1 for left-to-right, -1 for right-to-left */ + int dirnc; /* dir * nc */ + int ci; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + JSAMPLE *range_limit = cinfo->sample_range_limit; + SHIFT_TEMPS + + for (row = 0; row < num_rows; row++) { + /* Initialize output values to 0 so can process components separately */ + jzero_far((void FAR *) output_buf[row], + (size_t) (width * SIZEOF(JSAMPLE))); + for (ci = 0; ci < nc; ci++) { + input_ptr = input_buf[row] + ci; + output_ptr = output_buf[row]; + if (cquantize->on_odd_row) { + /* work right to left in this row */ + input_ptr += (width-1) * nc; /* so point to rightmost pixel */ + output_ptr += width-1; + dir = -1; + dirnc = -nc; + errorptr = cquantize->fserrors[ci] + (width+1); /* => entry after last column */ + } else { + /* work left to right in this row */ + dir = 1; + dirnc = nc; + errorptr = cquantize->fserrors[ci]; /* => entry before first column */ + } + colorindex_ci = cquantize->colorindex[ci]; + colormap_ci = cquantize->sv_colormap[ci]; + /* Preset error values: no error propagated to first pixel from left */ + cur = 0; + /* and no error propagated to row below yet */ + belowerr = bpreverr = 0; + + for (col = width; col > 0; col--) { + /* cur holds the error propagated from the previous pixel on the + * current line. Add the error propagated from the previous line + * to form the complete error correction term for this pixel, and + * round the error term (which is expressed * 16) to an integer. + * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct + * for either sign of the error value. + * Note: errorptr points to *previous* column's array entry. + */ + cur = RIGHT_SHIFT(cur + errorptr[dir] + 8, 4); + /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. + * The maximum error is +- MAXJSAMPLE; this sets the required size + * of the range_limit array. + */ + cur += GETJSAMPLE(*input_ptr); + cur = GETJSAMPLE(range_limit[cur]); + /* Select output value, accumulate into output code for this pixel */ + pixcode = GETJSAMPLE(colorindex_ci[cur]); + *output_ptr += (JSAMPLE) pixcode; + /* Compute actual representation error at this pixel */ + /* Note: we can do this even though we don't have the final */ + /* pixel code, because the colormap is orthogonal. */ + cur -= GETJSAMPLE(colormap_ci[pixcode]); + /* Compute error fractions to be propagated to adjacent pixels. + * Add these into the running sums, and simultaneously shift the + * next-line error sums left by 1 column. + */ + bnexterr = cur; + delta = cur * 2; + cur += delta; /* form error * 3 */ + errorptr[0] = (FSERROR) (bpreverr + cur); + cur += delta; /* form error * 5 */ + bpreverr = belowerr + cur; + belowerr = bnexterr; + cur += delta; /* form error * 7 */ + /* At this point cur contains the 7/16 error value to be propagated + * to the next pixel on the current line, and all the errors for the + * next line have been shifted over. We are therefore ready to move on. + */ + input_ptr += dirnc; /* advance input ptr to next column */ + output_ptr += dir; /* advance output ptr to next column */ + errorptr += dir; /* advance errorptr to current column */ + } + /* Post-loop cleanup: we must unload the final error value into the + * final fserrors[] entry. Note we need not unload belowerr because + * it is for the dummy column before or after the actual array. + */ + errorptr[0] = (FSERROR) bpreverr; /* unload prev err into array */ + } + cquantize->on_odd_row = (cquantize->on_odd_row ? FALSE : TRUE); + } +} + + +/* + * Allocate workspace for Floyd-Steinberg errors. + */ + +LOCAL(void) +alloc_fs_workspace (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + size_t arraysize; + int i; + + arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR)); + for (i = 0; i < cinfo->out_color_components; i++) { + cquantize->fserrors[i] = (FSERRPTR) + (*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); + } +} + + +/* + * Initialize for one-pass color quantization. + */ + +METHODDEF(void) +start_pass_1_quant (j_decompress_ptr cinfo, wxjpeg_boolean is_pre_scan) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + size_t arraysize; + int i; + + /* Install my colormap. */ + cinfo->colormap = cquantize->sv_colormap; + cinfo->actual_number_of_colors = cquantize->sv_actual; + + /* Initialize for desired dithering mode. */ + switch (cinfo->dither_mode) { + case JDITHER_NONE: + if (cinfo->out_color_components == 3) + cquantize->pub.color_quantize = color_quantize3; + else + cquantize->pub.color_quantize = color_quantize; + break; + case JDITHER_ORDERED: + if (cinfo->out_color_components == 3) + cquantize->pub.color_quantize = quantize3_ord_dither; + else + cquantize->pub.color_quantize = quantize_ord_dither; + cquantize->row_index = 0; /* initialize state for ordered dither */ + /* If user changed to ordered dither from another mode, + * we must recreate the color index table with padding. + * This will cost extra space, but probably isn't very likely. + */ + if (! cquantize->is_padded) + create_colorindex(cinfo); + /* Create ordered-dither tables if we didn't already. */ + if (cquantize->odither[0] == NULL) + create_odither_tables(cinfo); + break; + case JDITHER_FS: + cquantize->pub.color_quantize = quantize_fs_dither; + cquantize->on_odd_row = FALSE; /* initialize state for F-S dither */ + /* Allocate Floyd-Steinberg workspace if didn't already. */ + if (cquantize->fserrors[0] == NULL) + alloc_fs_workspace(cinfo); + /* Initialize the propagated errors to zero. */ + arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR)); + for (i = 0; i < cinfo->out_color_components; i++) + jzero_far((void FAR *) cquantize->fserrors[i], arraysize); + break; + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } +} + + +/* + * Finish up at the end of the pass. + */ + +METHODDEF(void) +finish_pass_1_quant (j_decompress_ptr cinfo) +{ + /* no work in 1-pass case */ +} + + +/* + * Switch to a new external colormap between output passes. + * Shouldn't get to this module! + */ + +METHODDEF(void) +new_color_map_1_quant (j_decompress_ptr cinfo) +{ + ERREXIT(cinfo, JERR_MODE_CHANGE); +} + + +/* + * Module initialization routine for 1-pass color quantization. + */ + +GLOBAL(void) +jinit_1pass_quantizer (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize; + + cquantize = (my_cquantize_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_cquantizer)); + cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize; + cquantize->pub.start_pass = start_pass_1_quant; + cquantize->pub.finish_pass = finish_pass_1_quant; + cquantize->pub.new_color_map = new_color_map_1_quant; + cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */ + cquantize->odither[0] = NULL; /* Also flag odither arrays not allocated */ + + /* Make sure my internal arrays won't overflow */ + if (cinfo->out_color_components > MAX_Q_COMPS) + ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS); + /* Make sure colormap indexes can be represented by JSAMPLEs */ + if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1)) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1); + + /* Create the colormap and color index table. */ + create_colormap(cinfo); + create_colorindex(cinfo); + + /* Allocate Floyd-Steinberg workspace now if requested. + * We do this now since it is FAR storage and may affect the memory + * manager's space calculations. If the user changes to FS dither + * mode in a later pass, we will allocate the space then, and will + * possibly overrun the max_memory_to_use setting. + */ + if (cinfo->dither_mode == JDITHER_FS) + alloc_fs_workspace(cinfo); +} + +#endif /* QUANT_1PASS_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jquant2.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jquant2.c new file mode 100644 index 0000000000..b9c66a325c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jquant2.c @@ -0,0 +1,1310 @@ +/* + * jquant2.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains 2-pass color quantization (color mapping) routines. + * These routines provide selection of a custom color map for an image, + * followed by mapping of the image to that color map, with optional + * Floyd-Steinberg dithering. + * It is also possible to use just the second pass to map to an arbitrary + * externally-given color map. + * + * Note: ordered dithering is not supported, since there isn't any fast + * way to compute intercolor distances; it's unclear that ordered dither's + * fundamental assumptions even hold with an irregularly spaced color map. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef QUANT_2PASS_SUPPORTED + + +/* + * This module implements the well-known Heckbert paradigm for color + * quantization. Most of the ideas used here can be traced back to + * Heckbert's seminal paper + * Heckbert, Paul. "Color Image Quantization for Frame Buffer Display", + * Proc. SIGGRAPH '82, Computer Graphics v.16 #3 (July 1982), pp 297-304. + * + * In the first pass over the image, we accumulate a histogram showing the + * usage count of each possible color. To keep the histogram to a reasonable + * size, we reduce the precision of the input; typical practice is to retain + * 5 or 6 bits per color, so that 8 or 4 different input values are counted + * in the same histogram cell. + * + * Next, the color-selection step begins with a box representing the whole + * color space, and repeatedly splits the "largest" remaining box until we + * have as many boxes as desired colors. Then the mean color in each + * remaining box becomes one of the possible output colors. + * + * The second pass over the image maps each input pixel to the closest output + * color (optionally after applying a Floyd-Steinberg dithering correction). + * This mapping is logically trivial, but making it go fast enough requires + * considerable care. + * + * Heckbert-style quantizers vary a good deal in their policies for choosing + * the "largest" box and deciding where to cut it. The particular policies + * used here have proved out well in experimental comparisons, but better ones + * may yet be found. + * + * In earlier versions of the IJG code, this module quantized in YCbCr color + * space, processing the raw upsampled data without a color conversion step. + * This allowed the color conversion math to be done only once per colormap + * entry, not once per pixel. However, that optimization precluded other + * useful optimizations (such as merging color conversion with upsampling) + * and it also interfered with desired capabilities such as quantizing to an + * externally-supplied colormap. We have therefore abandoned that approach. + * The present code works in the post-conversion color space, typically RGB. + * + * To improve the visual quality of the results, we actually work in scaled + * RGB space, giving G distances more weight than R, and R in turn more than + * B. To do everything in integer math, we must use integer scale factors. + * The 2/3/1 scale factors used here correspond loosely to the relative + * weights of the colors in the NTSC grayscale equation. + * If you want to use this code to quantize a non-RGB color space, you'll + * probably need to change these scale factors. + */ + +#define R_SCALE 2 /* scale R distances by this much */ +#define G_SCALE 3 /* scale G distances by this much */ +#define B_SCALE 1 /* and B by this much */ + +/* Relabel R/G/B as components 0/1/2, respecting the RGB ordering defined + * in jmorecfg.h. As the code stands, it will do the right thing for R,G,B + * and B,G,R orders. If you define some other weird order in jmorecfg.h, + * you'll get compile errors until you extend this logic. In that case + * you'll probably want to tweak the histogram sizes too. + */ + +#if RGB_RED == 0 +#define C0_SCALE R_SCALE +#endif +#if RGB_BLUE == 0 +#define C0_SCALE B_SCALE +#endif +#if RGB_GREEN == 1 +#define C1_SCALE G_SCALE +#endif +#if RGB_RED == 2 +#define C2_SCALE R_SCALE +#endif +#if RGB_BLUE == 2 +#define C2_SCALE B_SCALE +#endif + + +/* + * First we have the histogram data structure and routines for creating it. + * + * The number of bits of precision can be adjusted by changing these symbols. + * We recommend keeping 6 bits for G and 5 each for R and B. + * If you have plenty of memory and cycles, 6 bits all around gives marginally + * better results; if you are short of memory, 5 bits all around will save + * some space but degrade the results. + * To maintain a fully accurate histogram, we'd need to allocate a "long" + * (preferably unsigned long) for each cell. In practice this is overkill; + * we can get by with 16 bits per cell. Few of the cell counts will overflow, + * and clamping those that do overflow to the maximum value will give close- + * enough results. This reduces the recommended histogram size from 256Kb + * to 128Kb, which is a useful savings on PC-class machines. + * (In the second pass the histogram space is re-used for pixel mapping data; + * in that capacity, each cell must be able to store zero to the number of + * desired colors. 16 bits/cell is plenty for that too.) + * Since the JPEG code is intended to run in small memory model on 80x86 + * machines, we can't just allocate the histogram in one chunk. Instead + * of a true 3-D array, we use a row of pointers to 2-D arrays. Each + * pointer corresponds to a C0 value (typically 2^5 = 32 pointers) and + * each 2-D array has 2^6*2^5 = 2048 or 2^6*2^6 = 4096 entries. Note that + * on 80x86 machines, the pointer row is in near memory but the actual + * arrays are in far memory (same arrangement as we use for image arrays). + */ + +#define MAXNUMCOLORS (MAXJSAMPLE+1) /* maximum size of colormap */ + +/* These will do the right thing for either R,G,B or B,G,R color order, + * but you may not like the results for other color orders. + */ +#define HIST_C0_BITS 5 /* bits of precision in R/B histogram */ +#define HIST_C1_BITS 6 /* bits of precision in G histogram */ +#define HIST_C2_BITS 5 /* bits of precision in B/R histogram */ + +/* Number of elements along histogram axes. */ +#define HIST_C0_ELEMS (1<cquantize; + register JSAMPROW ptr; + register histptr histp; + register hist3d histogram = cquantize->histogram; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + ptr = input_buf[row]; + for (col = width; col > 0; col--) { + /* get pixel value and index into the histogram */ + histp = & histogram[GETJSAMPLE(ptr[0]) >> C0_SHIFT] + [GETJSAMPLE(ptr[1]) >> C1_SHIFT] + [GETJSAMPLE(ptr[2]) >> C2_SHIFT]; + /* increment, check for overflow and undo increment if so. */ + if (++(*histp) <= 0) + (*histp)--; + ptr += 3; + } + } +} + + +/* + * Next we have the really interesting routines: selection of a colormap + * given the completed histogram. + * These routines work with a list of "boxes", each representing a rectangular + * subset of the input color space (to histogram precision). + */ + +typedef struct { + /* The bounds of the box (inclusive); expressed as histogram indexes */ + int c0min, c0max; + int c1min, c1max; + int c2min, c2max; + /* The volume (actually 2-norm) of the box */ + JPEG_INT32 volume; + /* The number of nonzero histogram cells within this box */ + long colorcount; +} box; + +typedef box * boxptr; + + +LOCAL(boxptr) +find_biggest_color_pop (boxptr boxlist, int numboxes) +/* Find the splittable box with the largest color population */ +/* Returns NULL if no splittable boxes remain */ +{ + register boxptr boxp; + register int i; + register long maxc = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->colorcount > maxc && boxp->volume > 0) { + which = boxp; + maxc = boxp->colorcount; + } + } + return which; +} + + +LOCAL(boxptr) +find_biggest_volume (boxptr boxlist, int numboxes) +/* Find the splittable box with the largest (scaled) volume */ +/* Returns NULL if no splittable boxes remain */ +{ + register boxptr boxp; + register int i; + register JPEG_INT32 maxv = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->volume > maxv) { + which = boxp; + maxv = boxp->volume; + } + } + return which; +} + + +LOCAL(void) +update_box (j_decompress_ptr cinfo, boxptr boxp) +/* Shrink the min/max bounds of a box to enclose only nonzero elements, */ +/* and recompute its volume and population */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + JPEG_INT32 dist0,dist1,dist2; + long ccount; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + if (c0max > c0min) + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0min = c0min = c0; + goto have_c0min; + } + } + have_c0min: + if (c0max > c0min) + for (c0 = c0max; c0 >= c0min; c0--) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0max = c0max = c0; + goto have_c0max; + } + } + have_c0max: + if (c1max > c1min) + for (c1 = c1min; c1 <= c1max; c1++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1min = c1min = c1; + goto have_c1min; + } + } + have_c1min: + if (c1max > c1min) + for (c1 = c1max; c1 >= c1min; c1--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1max = c1max = c1; + goto have_c1max; + } + } + have_c1max: + if (c2max > c2min) + for (c2 = c2min; c2 <= c2max; c2++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2min = c2min = c2; + goto have_c2min; + } + } + have_c2min: + if (c2max > c2min) + for (c2 = c2max; c2 >= c2min; c2--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2max = c2max = c2; + goto have_c2max; + } + } + have_c2max: + + /* Update box volume. + * We use 2-norm rather than real volume here; this biases the method + * against making long narrow boxes, and it has the side benefit that + * a box is splittable iff norm > 0. + * Since the differences are expressed in histogram-cell units, + * we have to shift back to JSAMPLE units to get consistent distances; + * after which, we scale according to the selected distance scale factors. + */ + dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE; + dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE; + dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE; + boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2; + + /* Now scan remaining volume of box and compute population */ + ccount = 0; + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++, histp++) + if (*histp != 0) { + ccount++; + } + } + boxp->colorcount = ccount; +} + + +LOCAL(int) +median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes, + int desired_colors) +/* Repeatedly select and split the largest box until we have enough boxes */ +{ + int n,lb; + int c0,c1,c2,cmax; + register boxptr b1,b2; + + while (numboxes < desired_colors) { + /* Select box to split. + * Current algorithm: by population for first half, then by volume. + */ + if (numboxes*2 <= desired_colors) { + b1 = find_biggest_color_pop(boxlist, numboxes); + } else { + b1 = find_biggest_volume(boxlist, numboxes); + } + if (b1 == NULL) /* no splittable boxes left! */ + break; + b2 = &boxlist[numboxes]; /* where new box will go */ + /* Copy the color bounds to the new box. */ + b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max; + b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min; + /* Choose which axis to split the box on. + * Current algorithm: longest scaled axis. + * See notes in update_box about scaling distances. + */ + c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE; + c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE; + c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE; + /* We want to break any ties in favor of green, then red, blue last. + * This code does the right thing for R,G,B or B,G,R color orders only. + */ +#if RGB_RED == 0 + cmax = c1; n = 1; + if (c0 > cmax) { cmax = c0; n = 0; } + if (c2 > cmax) { n = 2; } +#else + cmax = c1; n = 1; + if (c2 > cmax) { cmax = c2; n = 2; } + if (c0 > cmax) { n = 0; } +#endif + /* Choose split point along selected axis, and update box bounds. + * Current algorithm: split at halfway point. + * (Since the box has been shrunk to minimum volume, + * any split will produce two nonempty subboxes.) + * Note that lb value is max for lower box, so must be < old max. + */ + switch (n) { + case 0: + lb = (b1->c0max + b1->c0min) / 2; + b1->c0max = lb; + b2->c0min = lb+1; + break; + case 1: + lb = (b1->c1max + b1->c1min) / 2; + b1->c1max = lb; + b2->c1min = lb+1; + break; + case 2: + lb = (b1->c2max + b1->c2min) / 2; + b1->c2max = lb; + b2->c2min = lb+1; + break; + } + /* Update stats for boxes */ + update_box(cinfo, b1); + update_box(cinfo, b2); + numboxes++; + } + return numboxes; +} + + +LOCAL(void) +compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor) +/* Compute representative color for a box, put it in colormap[icolor] */ +{ + /* Current algorithm: mean weighted by pixels (not colors) */ + /* Note it is important to get the rounding correct! */ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + long count; + long total = 0; + long c0total = 0; + long c1total = 0; + long c2total = 0; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) { + if ((count = *histp++) != 0) { + total += count; + c0total += ((c0 << C0_SHIFT) + ((1<>1)) * count; + c1total += ((c1 << C1_SHIFT) + ((1<>1)) * count; + c2total += ((c2 << C2_SHIFT) + ((1<>1)) * count; + } + } + } + + cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total); + cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total); + cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total); +} + + +LOCAL(void) +select_colors (j_decompress_ptr cinfo, int desired_colors) +/* Master routine for color selection */ +{ + boxptr boxlist; + int numboxes; + int i; + + /* Allocate workspace for box list */ + boxlist = (boxptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(box)); + /* Initialize one box containing whole space */ + numboxes = 1; + boxlist[0].c0min = 0; + boxlist[0].c0max = MAXJSAMPLE >> C0_SHIFT; + boxlist[0].c1min = 0; + boxlist[0].c1max = MAXJSAMPLE >> C1_SHIFT; + boxlist[0].c2min = 0; + boxlist[0].c2max = MAXJSAMPLE >> C2_SHIFT; + /* Shrink it to actually-used volume and set its statistics */ + update_box(cinfo, & boxlist[0]); + /* Perform median-cut to produce final box list */ + numboxes = median_cut(cinfo, boxlist, numboxes, desired_colors); + /* Compute the representative color for each box, fill colormap */ + for (i = 0; i < numboxes; i++) + compute_color(cinfo, & boxlist[i], i); + cinfo->actual_number_of_colors = numboxes; + TRACEMS1(cinfo, 1, JTRC_QUANT_SELECTED, numboxes); +} + + +/* + * These routines are concerned with the time-critical task of mapping input + * colors to the nearest color in the selected colormap. + * + * We re-use the histogram space as an "inverse color map", essentially a + * cache for the results of nearest-color searches. All colors within a + * histogram cell will be mapped to the same colormap entry, namely the one + * closest to the cell's center. This may not be quite the closest entry to + * the actual input color, but it's almost as good. A zero in the cache + * indicates we haven't found the nearest color for that cell yet; the array + * is cleared to zeroes before starting the mapping pass. When we find the + * nearest color for a cell, its colormap index plus one is recorded in the + * cache for future use. The pass2 scanning routines call fill_inverse_cmap + * when they need to use an unfilled entry in the cache. + * + * Our method of efficiently finding nearest colors is based on the "locally + * sorted search" idea described by Heckbert and on the incremental distance + * calculation described by Spencer W. Thomas in chapter III.1 of Graphics + * Gems II (James Arvo, ed. Academic Press, 1991). Thomas points out that + * the distances from a given colormap entry to each cell of the histogram can + * be computed quickly using an incremental method: the differences between + * distances to adjacent cells themselves differ by a constant. This allows a + * fairly fast implementation of the "brute force" approach of computing the + * distance from every colormap entry to every histogram cell. Unfortunately, + * it needs a work array to hold the best-distance-so-far for each histogram + * cell (because the inner loop has to be over cells, not colormap entries). + * The work array elements have to be INT32s, so the work array would need + * 256Kb at our recommended precision. This is not feasible in DOS machines. + * + * To get around these problems, we apply Thomas' method to compute the + * nearest colors for only the cells within a small subbox of the histogram. + * The work array need be only as big as the subbox, so the memory usage + * problem is solved. Furthermore, we need not fill subboxes that are never + * referenced in pass2; many images use only part of the color gamut, so a + * fair amount of work is saved. An additional advantage of this + * approach is that we can apply Heckbert's locality criterion to quickly + * eliminate colormap entries that are far away from the subbox; typically + * three-fourths of the colormap entries are rejected by Heckbert's criterion, + * and we need not compute their distances to individual cells in the subbox. + * The speed of this approach is heavily influenced by the subbox size: too + * small means too much overhead, too big loses because Heckbert's criterion + * can't eliminate as many colormap entries. Empirically the best subbox + * size seems to be about 1/512th of the histogram (1/8th in each direction). + * + * Thomas' article also describes a refined method which is asymptotically + * faster than the brute-force method, but it is also far more complex and + * cannot efficiently be applied to small subboxes. It is therefore not + * useful for programs intended to be portable to DOS machines. On machines + * with plenty of memory, filling the whole histogram in one shot with Thomas' + * refined method might be faster than the present code --- but then again, + * it might not be any faster, and it's certainly more complicated. + */ + + +/* log2(histogram cells in update box) for each axis; this can be adjusted */ +#define BOX_C0_LOG (HIST_C0_BITS-3) +#define BOX_C1_LOG (HIST_C1_BITS-3) +#define BOX_C2_LOG (HIST_C2_BITS-3) + +#define BOX_C0_ELEMS (1<actual_number_of_colors; + int maxc0, maxc1, maxc2; + int centerc0, centerc1, centerc2; + int i, x, ncolors; + JPEG_INT32 minmaxdist, min_dist, max_dist, tdist; + JPEG_INT32 mindist[MAXNUMCOLORS]; /* min distance to colormap entry i */ + + /* Compute true coordinates of update box's upper corner and center. + * Actually we compute the coordinates of the center of the upper-corner + * histogram cell, which are the upper bounds of the volume we care about. + * Note that since ">>" rounds down, the "center" values may be closer to + * min than to max; hence comparisons to them must be "<=", not "<". + */ + maxc0 = minc0 + ((1 << BOX_C0_SHIFT) - (1 << C0_SHIFT)); + centerc0 = (minc0 + maxc0) >> 1; + maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT)); + centerc1 = (minc1 + maxc1) >> 1; + maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT)); + centerc2 = (minc2 + maxc2) >> 1; + + /* For each color in colormap, find: + * 1. its minimum squared-distance to any point in the update box + * (zero if color is within update box); + * 2. its maximum squared-distance to any point in the update box. + * Both of these can be found by considering only the corners of the box. + * We save the minimum distance for each color in mindist[]; + * only the smallest maximum distance is of interest. + */ + minmaxdist = 0x7FFFFFFFL; + + for (i = 0; i < numcolors; i++) { + /* We compute the squared-c0-distance term, then add in the other two. */ + x = GETJSAMPLE(cinfo->colormap[0][i]); + if (x < minc0) { + tdist = (x - minc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else if (x > maxc0) { + tdist = (x - maxc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + min_dist = 0; + if (x <= centerc0) { + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } + } + + x = GETJSAMPLE(cinfo->colormap[1][i]); + if (x < minc1) { + tdist = (x - minc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc1) { + tdist = (x - maxc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc1) { + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } + } + + x = GETJSAMPLE(cinfo->colormap[2][i]); + if (x < minc2) { + tdist = (x - minc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc2) { + tdist = (x - maxc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc2) { + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } + } + + mindist[i] = min_dist; /* save away the results */ + if (max_dist < minmaxdist) + minmaxdist = max_dist; + } + + /* Now we know that no cell in the update box is more than minmaxdist + * away from some colormap entry. Therefore, only colors that are + * within minmaxdist of some part of the box need be considered. + */ + ncolors = 0; + for (i = 0; i < numcolors; i++) { + if (mindist[i] <= minmaxdist) + colorlist[ncolors++] = (JSAMPLE) i; + } + return ncolors; +} + + +LOCAL(void) +find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, + int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[]) +/* Find the closest colormap entry for each cell in the update box, + * given the list of candidate colors prepared by find_nearby_colors. + * Return the indexes of the closest entries in the bestcolor[] array. + * This routine uses Thomas' incremental distance calculation method to + * find the distance from a colormap entry to successive cells in the box. + */ +{ + int ic0, ic1, ic2; + int i, icolor; + register JPEG_INT32 * bptr; /* pointer into bestdist[] array */ + JSAMPLE * cptr; /* pointer into bestcolor[] array */ + JPEG_INT32 dist0, dist1; /* initial distance values */ + register JPEG_INT32 dist2; /* current distance in inner loop */ + JPEG_INT32 xx0, xx1; /* distance increments */ + register JPEG_INT32 xx2; + JPEG_INT32 inc0, inc1, inc2; /* initial values for increments */ + /* This array holds the distance to the nearest-so-far color for each cell */ + JPEG_INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Initialize best-distance for each cell of the update box */ + bptr = bestdist; + for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--) + *bptr++ = 0x7FFFFFFFL; + + /* For each color selected by find_nearby_colors, + * compute its distance to the center of each cell in the box. + * If that's less than best-so-far, update best distance and color number. + */ + + /* Nominal steps between cell centers ("x" in Thomas article) */ +#define STEP_C0 ((1 << C0_SHIFT) * C0_SCALE) +#define STEP_C1 ((1 << C1_SHIFT) * C1_SCALE) +#define STEP_C2 ((1 << C2_SHIFT) * C2_SCALE) + + for (i = 0; i < numcolors; i++) { + icolor = GETJSAMPLE(colorlist[i]); + /* Compute (square of) distance from minc0/c1/c2 to this color */ + inc0 = (minc0 - GETJSAMPLE(cinfo->colormap[0][icolor])) * C0_SCALE; + dist0 = inc0*inc0; + inc1 = (minc1 - GETJSAMPLE(cinfo->colormap[1][icolor])) * C1_SCALE; + dist0 += inc1*inc1; + inc2 = (minc2 - GETJSAMPLE(cinfo->colormap[2][icolor])) * C2_SCALE; + dist0 += inc2*inc2; + /* Form the initial difference increments */ + inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0; + inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1; + inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2; + /* Now loop over all cells in box, updating distance per Thomas method */ + bptr = bestdist; + cptr = bestcolor; + xx0 = inc0; + for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) { + dist1 = dist0; + xx1 = inc1; + for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) { + dist2 = dist1; + xx2 = inc2; + for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) { + if (dist2 < *bptr) { + *bptr = dist2; + *cptr = (JSAMPLE) icolor; + } + dist2 += xx2; + xx2 += 2 * STEP_C2 * STEP_C2; + bptr++; + cptr++; + } + dist1 += xx1; + xx1 += 2 * STEP_C1 * STEP_C1; + } + dist0 += xx0; + xx0 += 2 * STEP_C0 * STEP_C0; + } + } +} + + +LOCAL(void) +fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2) +/* Fill the inverse-colormap entries in the update box that contains */ +/* histogram cell c0/c1/c2. (Only that one cell MUST be filled, but */ +/* we can fill as many others as we wish.) */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + int minc0, minc1, minc2; /* lower left corner of update box */ + int ic0, ic1, ic2; + register JSAMPLE * cptr; /* pointer into bestcolor[] array */ + register histptr cachep; /* pointer into main cache array */ + /* This array lists the candidate colormap indexes. */ + JSAMPLE colorlist[MAXNUMCOLORS]; + int numcolors; /* number of candidate colors */ + /* This array holds the actually closest colormap index for each cell. */ + JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Convert cell coordinates to update box ID */ + c0 >>= BOX_C0_LOG; + c1 >>= BOX_C1_LOG; + c2 >>= BOX_C2_LOG; + + /* Compute true coordinates of update box's origin corner. + * Actually we compute the coordinates of the center of the corner + * histogram cell, which are the lower bounds of the volume we care about. + */ + minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1); + minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1); + minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1); + + /* Determine which colormap entries are close enough to be candidates + * for the nearest entry to some cell in the update box. + */ + numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist); + + /* Determine the actually nearest colors. */ + find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist, + bestcolor); + + /* Save the best color numbers (plus 1) in the main cache array */ + c0 <<= BOX_C0_LOG; /* convert ID back to base cell indexes */ + c1 <<= BOX_C1_LOG; + c2 <<= BOX_C2_LOG; + cptr = bestcolor; + for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) { + for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) { + cachep = & histogram[c0+ic0][c1+ic1][c2]; + for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) { + *cachep++ = (histcell) (GETJSAMPLE(*cptr++) + 1); + } + } + } +} + + +/* + * Map some rows of pixels to the output colormapped representation. + */ + +METHODDEF(void) +pass2_no_dither (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) +/* This version performs no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + register JSAMPROW inptr, outptr; + register histptr cachep; + register int c0, c1, c2; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + inptr = input_buf[row]; + outptr = output_buf[row]; + for (col = width; col > 0; col--) { + /* get pixel value and index into the cache */ + c0 = GETJSAMPLE(*inptr++) >> C0_SHIFT; + c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT; + c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT; + cachep = & histogram[c0][c1][c2]; + /* If we have not seen this color before, find nearest colormap entry */ + /* and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cinfo, c0,c1,c2); + /* Now emit the colormap index for this cell */ + *outptr++ = (JSAMPLE) (*cachep - 1); + } + } +} + + +METHODDEF(void) +pass2_fs_dither (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) +/* This version performs Floyd-Steinberg dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + register LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */ + LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */ + LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */ + register FSERRPTR errorptr; /* => fserrors[] at column before current */ + JSAMPROW inptr; /* => current input pixel */ + JSAMPROW outptr; /* => current output pixel */ + histptr cachep; + int dir; /* +1 or -1 depending on direction */ + int dir3; /* 3*dir, for advancing inptr & errorptr */ + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + JSAMPLE *range_limit = cinfo->sample_range_limit; + int *error_limit = cquantize->error_limiter; + JSAMPROW colormap0 = cinfo->colormap[0]; + JSAMPROW colormap1 = cinfo->colormap[1]; + JSAMPROW colormap2 = cinfo->colormap[2]; + SHIFT_TEMPS + + for (row = 0; row < num_rows; row++) { + inptr = input_buf[row]; + outptr = output_buf[row]; + if (cquantize->on_odd_row) { + /* work right to left in this row */ + inptr += (width-1) * 3; /* so point to rightmost pixel */ + outptr += width-1; + dir = -1; + dir3 = -3; + errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */ + cquantize->on_odd_row = FALSE; /* flip for next time */ + } else { + /* work left to right in this row */ + dir = 1; + dir3 = 3; + errorptr = cquantize->fserrors; /* => entry before first real column */ + cquantize->on_odd_row = TRUE; /* flip for next time */ + } + /* Preset error values: no error propagated to first pixel from left */ + cur0 = cur1 = cur2 = 0; + /* and no error propagated to row below yet */ + belowerr0 = belowerr1 = belowerr2 = 0; + bpreverr0 = bpreverr1 = bpreverr2 = 0; + + for (col = width; col > 0; col--) { + /* curN holds the error propagated from the previous pixel on the + * current line. Add the error propagated from the previous line + * to form the complete error correction term for this pixel, and + * round the error term (which is expressed * 16) to an integer. + * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct + * for either sign of the error value. + * Note: errorptr points to *previous* column's array entry. + */ + cur0 = RIGHT_SHIFT(cur0 + errorptr[dir3+0] + 8, 4); + cur1 = RIGHT_SHIFT(cur1 + errorptr[dir3+1] + 8, 4); + cur2 = RIGHT_SHIFT(cur2 + errorptr[dir3+2] + 8, 4); + /* Limit the error using transfer function set by init_error_limit. + * See comments with init_error_limit for rationale. + */ + cur0 = error_limit[cur0]; + cur1 = error_limit[cur1]; + cur2 = error_limit[cur2]; + /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. + * The maximum error is +- MAXJSAMPLE (or less with error limiting); + * this sets the required size of the range_limit array. + */ + cur0 += GETJSAMPLE(inptr[0]); + cur1 += GETJSAMPLE(inptr[1]); + cur2 += GETJSAMPLE(inptr[2]); + cur0 = GETJSAMPLE(range_limit[cur0]); + cur1 = GETJSAMPLE(range_limit[cur1]); + cur2 = GETJSAMPLE(range_limit[cur2]); + /* Index into the cache with adjusted pixel value */ + cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT]; + /* If we have not seen this color before, find nearest colormap */ + /* entry and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT); + /* Now emit the colormap index for this cell */ + { register int pixcode = *cachep - 1; + *outptr = (JSAMPLE) pixcode; + /* Compute representation error for this pixel */ + cur0 -= GETJSAMPLE(colormap0[pixcode]); + cur1 -= GETJSAMPLE(colormap1[pixcode]); + cur2 -= GETJSAMPLE(colormap2[pixcode]); + } + /* Compute error fractions to be propagated to adjacent pixels. + * Add these into the running sums, and simultaneously shift the + * next-line error sums left by 1 column. + */ + { register LOCFSERROR bnexterr, delta; + + bnexterr = cur0; /* Process component 0 */ + delta = cur0 * 2; + cur0 += delta; /* form error * 3 */ + errorptr[0] = (FSERROR) (bpreverr0 + cur0); + cur0 += delta; /* form error * 5 */ + bpreverr0 = belowerr0 + cur0; + belowerr0 = bnexterr; + cur0 += delta; /* form error * 7 */ + bnexterr = cur1; /* Process component 1 */ + delta = cur1 * 2; + cur1 += delta; /* form error * 3 */ + errorptr[1] = (FSERROR) (bpreverr1 + cur1); + cur1 += delta; /* form error * 5 */ + bpreverr1 = belowerr1 + cur1; + belowerr1 = bnexterr; + cur1 += delta; /* form error * 7 */ + bnexterr = cur2; /* Process component 2 */ + delta = cur2 * 2; + cur2 += delta; /* form error * 3 */ + errorptr[2] = (FSERROR) (bpreverr2 + cur2); + cur2 += delta; /* form error * 5 */ + bpreverr2 = belowerr2 + cur2; + belowerr2 = bnexterr; + cur2 += delta; /* form error * 7 */ + } + /* At this point curN contains the 7/16 error value to be propagated + * to the next pixel on the current line, and all the errors for the + * next line have been shifted over. We are therefore ready to move on. + */ + inptr += dir3; /* Advance pixel pointers to next column */ + outptr += dir; + errorptr += dir3; /* advance errorptr to current column */ + } + /* Post-loop cleanup: we must unload the final error values into the + * final fserrors[] entry. Note we need not unload belowerrN because + * it is for the dummy column before or after the actual array. + */ + errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */ + errorptr[1] = (FSERROR) bpreverr1; + errorptr[2] = (FSERROR) bpreverr2; + } +} + + +/* + * Initialize the error-limiting transfer function (lookup table). + * The raw F-S error computation can potentially compute error values of up to + * +- MAXJSAMPLE. But we want the maximum correction applied to a pixel to be + * much less, otherwise obviously wrong pixels will be created. (Typical + * effects include weird fringes at color-area boundaries, isolated bright + * pixels in a dark area, etc.) The standard advice for avoiding this problem + * is to ensure that the "corners" of the color cube are allocated as output + * colors; then repeated errors in the same direction cannot cause cascading + * error buildup. However, that only prevents the error from getting + * completely out of hand; Aaron Giles reports that error limiting improves + * the results even with corner colors allocated. + * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty + * well, but the smoother transfer function used below is even better. Thanks + * to Aaron Giles for this idea. + */ + +LOCAL(void) +init_error_limit (j_decompress_ptr cinfo) +/* Allocate and fill in the error_limiter table */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + int * table; + int in, out; + + table = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE*2+1) * SIZEOF(int)); + table += MAXJSAMPLE; /* so can index -MAXJSAMPLE .. +MAXJSAMPLE */ + cquantize->error_limiter = table; + +#define STEPSIZE ((MAXJSAMPLE+1)/16) + /* Map errors 1:1 up to +- MAXJSAMPLE/16 */ + out = 0; + for (in = 0; in < STEPSIZE; in++, out++) { + table[in] = out; table[-in] = -out; + } + /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */ + for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) { + table[in] = out; table[-in] = -out; + } + /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */ + for (; in <= MAXJSAMPLE; in++) { + table[in] = out; table[-in] = -out; + } +#undef STEPSIZE +} + + +/* + * Finish up at the end of each pass. + */ + +METHODDEF(void) +finish_pass1 (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + + /* Select the representative colors and fill in cinfo->colormap */ + cinfo->colormap = cquantize->sv_colormap; + select_colors(cinfo, cquantize->desired); + /* Force next pass to zero the color index table */ + cquantize->needs_zeroed = TRUE; +} + + +METHODDEF(void) +finish_pass2 (j_decompress_ptr cinfo) +{ + /* no work */ +} + + +/* + * Initialize for each processing pass. + */ + +METHODDEF(void) +start_pass_2_quant (j_decompress_ptr cinfo, wxjpeg_boolean is_pre_scan) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + int i; + + /* Only F-S dithering or no dithering is supported. */ + /* If user asks for ordered dither, give him F-S. */ + if (cinfo->dither_mode != JDITHER_NONE) + cinfo->dither_mode = JDITHER_FS; + + if (is_pre_scan) { + /* Set up method pointers */ + cquantize->pub.color_quantize = prescan_quantize; + cquantize->pub.finish_pass = finish_pass1; + cquantize->needs_zeroed = TRUE; /* Always zero histogram */ + } else { + /* Set up method pointers */ + if (cinfo->dither_mode == JDITHER_FS) + cquantize->pub.color_quantize = pass2_fs_dither; + else + cquantize->pub.color_quantize = pass2_no_dither; + cquantize->pub.finish_pass = finish_pass2; + + /* Make sure color count is acceptable */ + i = cinfo->actual_number_of_colors; + if (i < 1) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 1); + if (i > MAXNUMCOLORS) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); + + if (cinfo->dither_mode == JDITHER_FS) { + size_t arraysize = (size_t) ((cinfo->output_width + 2) * + (3 * SIZEOF(FSERROR))); + /* Allocate Floyd-Steinberg workspace if we didn't already. */ + if (cquantize->fserrors == NULL) + cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); + /* Initialize the propagated errors to zero. */ + jzero_far((void FAR *) cquantize->fserrors, arraysize); + /* Make the error-limit table if we didn't already. */ + if (cquantize->error_limiter == NULL) + init_error_limit(cinfo); + cquantize->on_odd_row = FALSE; + } + + } + /* Zero the histogram or inverse color map, if necessary */ + if (cquantize->needs_zeroed) { + for (i = 0; i < HIST_C0_ELEMS; i++) { + jzero_far((void FAR *) histogram[i], + HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); + } + cquantize->needs_zeroed = FALSE; + } +} + + +/* + * Switch to a new external colormap between output passes. + */ + +METHODDEF(void) +new_color_map_2_quant (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + + /* Reset the inverse color map */ + cquantize->needs_zeroed = TRUE; +} + + +/* + * Module initialization routine for 2-pass color quantization. + */ + +GLOBAL(void) +jinit_2pass_quantizer (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize; + int i; + + cquantize = (my_cquantize_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_cquantizer)); + cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize; + cquantize->pub.start_pass = start_pass_2_quant; + cquantize->pub.new_color_map = new_color_map_2_quant; + cquantize->fserrors = NULL; /* flag optional arrays not allocated */ + cquantize->error_limiter = NULL; + + /* Make sure jdmaster didn't give me a case I can't handle */ + if (cinfo->out_color_components != 3) + ERREXIT(cinfo, JERR_NOTIMPL); + + /* Allocate the histogram/inverse colormap storage */ + cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, HIST_C0_ELEMS * SIZEOF(hist2d)); + for (i = 0; i < HIST_C0_ELEMS; i++) { + cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); + } + cquantize->needs_zeroed = TRUE; /* histogram is garbage now */ + + /* Allocate storage for the completed colormap, if required. + * We do this now since it is FAR storage and may affect + * the memory manager's space calculations. + */ + if (cinfo->enable_2pass_quant) { + /* Make sure color count is acceptable */ + int desired = cinfo->desired_number_of_colors; + /* Lower bound on # of colors ... somewhat arbitrary as long as > 0 */ + if (desired < 8) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 8); + /* Make sure colormap indexes can be represented by JSAMPLEs */ + if (desired > MAXNUMCOLORS) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); + cquantize->sv_colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo,JPOOL_IMAGE, (JDIMENSION) desired, (JDIMENSION) 3); + cquantize->desired = desired; + } else + cquantize->sv_colormap = NULL; + + /* Only F-S dithering or no dithering is supported. */ + /* If user asks for ordered dither, give him F-S. */ + if (cinfo->dither_mode != JDITHER_NONE) + cinfo->dither_mode = JDITHER_FS; + + /* Allocate Floyd-Steinberg workspace if necessary. + * This isn't really needed until pass 2, but again it is FAR storage. + * Although we will cope with a later change in dither_mode, + * we do not promise to honor max_memory_to_use if dither_mode changes. + */ + if (cinfo->dither_mode == JDITHER_FS) { + cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (size_t) ((cinfo->output_width + 2) * (3 * SIZEOF(FSERROR)))); + /* Might as well create the error-limiting table too. */ + init_error_limit(cinfo); + } +} + +#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jutils.c b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jutils.c new file mode 100644 index 0000000000..d18a955562 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jutils.c @@ -0,0 +1,179 @@ +/* + * jutils.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains tables and miscellaneous utility routines needed + * for both compression and decompression. + * Note we prefix all global names with "j" to minimize conflicts with + * a surrounding application. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * jpeg_zigzag_order[i] is the zigzag-order position of the i'th element + * of a DCT block read in natural order (left to right, top to bottom). + */ + +#if 0 /* This table is not actually needed in v6a */ + +const int jpeg_zigzag_order[DCTSIZE2] = { + 0, 1, 5, 6, 14, 15, 27, 28, + 2, 4, 7, 13, 16, 26, 29, 42, + 3, 8, 12, 17, 25, 30, 41, 43, + 9, 11, 18, 24, 31, 40, 44, 53, + 10, 19, 23, 32, 39, 45, 52, 54, + 20, 22, 33, 38, 46, 51, 55, 60, + 21, 34, 37, 47, 50, 56, 59, 61, + 35, 36, 48, 49, 57, 58, 62, 63 +}; + +#endif + +/* + * jpeg_natural_order[i] is the natural-order position of the i'th element + * of zigzag order. + * + * When reading corrupted data, the Huffman decoders could attempt + * to reference an entry beyond the end of this array (if the decoded + * zero run length reaches past the end of the block). To prevent + * wild stores without adding an inner-loop test, we put some extra + * "63"s after the real entries. This will cause the extra coefficient + * to be stored in location 63 of the block, not somewhere random. + * The worst case would be a run-length of 15, which means we need 16 + * fake entries. + */ + +const int jpeg_natural_order[DCTSIZE2+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 48, 41, 34, + 27, 20, 13, 6, 7, 14, 21, 28, + 35, 42, 49, 56, 57, 50, 43, 36, + 29, 22, 15, 23, 30, 37, 44, 51, + 58, 59, 52, 45, 38, 31, 39, 46, + 53, 60, 61, 54, 47, 55, 62, 63, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + + +/* + * Arithmetic utilities + */ + +GLOBAL(long) +jdiv_round_up (long a, long b) +/* Compute a/b rounded up to next integer, ie, ceil(a/b) */ +/* Assumes a >= 0, b > 0 */ +{ + return (a + b - 1L) / b; +} + + +GLOBAL(long) +jround_up (long a, long b) +/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */ +/* Assumes a >= 0, b > 0 */ +{ + a += b - 1L; + return a - (a % b); +} + + +/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays + * and coefficient-block arrays. This won't work on 80x86 because the arrays + * are FAR and we're assuming a small-pointer memory model. However, some + * DOS compilers provide far-pointer versions of memcpy() and memset() even + * in the small-model libraries. These will be used if USE_FMEM is defined. + * Otherwise, the routines below do it the hard way. (The performance cost + * is not all that great, because these routines aren't very heavily used.) + */ + +#ifndef NEED_FAR_POINTERS /* normal case, same as regular macros */ +#define FMEMCOPY(dest,src,size) MEMCOPY(dest,src,size) +#define FMEMZERO(target,size) MEMZERO(target,size) +#else /* 80x86 case, define if we can */ +#ifdef USE_FMEM +#define FMEMCOPY(dest,src,size) _fmemcpy((void FAR *)(dest), (const void FAR *)(src), (size_t)(size)) +#define FMEMZERO(target,size) _fmemset((void FAR *)(target), 0, (size_t)(size)) +#endif +#endif + + +GLOBAL(void) +jcopy_sample_rows (JSAMPARRAY input_array, int source_row, + JSAMPARRAY output_array, int dest_row, + int num_rows, JDIMENSION num_cols) +/* Copy some rows of samples from one place to another. + * num_rows rows are copied from input_array[source_row++] + * to output_array[dest_row++]; these areas may overlap for duplication. + * The source and destination arrays must be at least as wide as num_cols. + */ +{ + register JSAMPROW inptr, outptr; +#ifdef FMEMCOPY + register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE)); +#else + register JDIMENSION count; +#endif + register int row; + + input_array += source_row; + output_array += dest_row; + + for (row = num_rows; row > 0; row--) { + inptr = *input_array++; + outptr = *output_array++; +#ifdef FMEMCOPY + FMEMCOPY(outptr, inptr, count); +#else + for (count = num_cols; count > 0; count--) + *outptr++ = *inptr++; /* needn't bother with GETJSAMPLE() here */ +#endif + } +} + + +GLOBAL(void) +jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row, + JDIMENSION num_blocks) +/* Copy a row of coefficient blocks from one place to another. */ +{ +#ifdef FMEMCOPY + FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF))); +#else + register JCOEFPTR inptr, outptr; + register long count; + + inptr = (JCOEFPTR) input_row; + outptr = (JCOEFPTR) output_row; + for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) { + *outptr++ = *inptr++; + } +#endif +} + + +GLOBAL(void) +jzero_far (void FAR * target, size_t bytestozero) +/* Zero out a chunk of FAR memory. */ +/* This might be sample-array data, block-array data, or alloc_large data. */ +{ +#ifdef FMEMZERO + FMEMZERO(target, bytestozero); +#else + register char FAR * ptr = (char FAR *) target; + register size_t count; + + for (count = bytestozero; count > 0; count--) { + *ptr++ = 0; + } +#endif +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jversion.h b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jversion.h new file mode 100644 index 0000000000..6472c58d35 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/jversion.h @@ -0,0 +1,14 @@ +/* + * jversion.h + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains software version identification. + */ + + +#define JVERSION "6b 27-Mar-1998" + +#define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/makefile.unx b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/makefile.unx new file mode 100644 index 0000000000..bcf905ee69 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/makefile.unx @@ -0,0 +1,36 @@ +# +# File: makefile.unx +# Author: Julian Smart +# Created: 1999 +# Updated: +# Copyright: (c) 1999 +# +# +# Makefile for OGL library, Unix + +include ../make.env + +JPEGLIB=$(WXDIR)/lib/libjpeg$(GUISUFFIX).a + +all: $(JPEGLIB) + +# Define library objects +OBJECTS=\ + jcomapi.o jutils.o jerror.o jmemmgr.o jmemnobs.o \ + jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o \ + jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \ + jccoefct.o jccolor.o jcsample.o jchuff.o jcphuff.o \ + jcdctmgr.o jfdctfst.o jfdctflt.o jfdctint.o \ + jdapimin.o jdapistd.o jdtrans.o jdatasrc.o \ + jdmaster.o jdinput.o jdmarker.o jdhuff.o jdphuff.o \ + jdmainct.o jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o \ + jidctflt.o jidctint.o jidctred.o jdsample.o jdcolor.o \ + jquant1.o jquant2.o jdmerge.o + +$(JPEGLIB) : $(OBJECTS) + ar $(AROPTIONS) $@ $(OBJECTS) + $(RANLIB) $@ + +clean: + rm -f $(OBJECTS) $(JPEGLIB) + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/makefile.vc b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/makefile.vc new file mode 100644 index 0000000000..6bc16cbd1a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/jpeg/makefile.vc @@ -0,0 +1,201 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is for Microsoft Visual C++ on Windows NT (and 95?). +# It builds the IJG library as a statically linkable library (.LIB), +# and builds the sample applications as console-mode apps. +# Thanks to Xingong Chang, Raymond Everly and others. + +# Read installation instructions before saying "nmake" !! +# To build an optimized library without debug info, say "nmake nodebug=1". + +# Put here the object file name for the correct system-dependent memory +# manager file. For NT we suggest jmemnobs.obj, which expects the OS to +# provide adequate virtual memory. +SYSDEPMEM= $D\jmemnobs.obj + +# miscellaneous OS-dependent stuff +# file deletion command +!if "$(RM)" == "" +RM= erase +!endif + +# End of configurable options. + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c \ + jcapistd.c \ + jccoefct.c \ + jccolor.c \ + jcdctmgr.c \ + jchuff.c \ + jcinit.c \ + jcmainct.c \ + jcmarker.c \ + jcmaster.c \ + jcomapi.c \ + jcparam.c \ + jcphuff.c \ + jcprepct.c \ + jcsample.c \ + jctrans.c \ + jdapimin.c \ + jdapistd.c \ + jdatadst.c \ + jdatasrc.c \ + jdcoefct.c \ + jdcolor.c \ + jddctmgr.c \ + jdhuff.c \ + jdinput.c \ + jdmainct.c \ + jdmarker.c \ + jdmaster.c \ + jdmerge.c \ + jdphuff.c \ + jdpostct.c \ + jdsample.c \ + jdtrans.c \ + jerror.c \ + jfdctflt.c \ + jfdctfst.c \ + jfdctint.c \ + jidctflt.c \ + jidctfst.c \ + jidctint.c \ + jidctred.c \ + jquant1.c \ + jquant2.c \ + jutils.c \ + jmemmgr.c + +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c + +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ + rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ + rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c + +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) + +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h + +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log + +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ + makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ + maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ + makvms.opt + +CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ + jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ + jconfig.vms + +CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) + +# library object files common to compression and decompression +COMOBJECTS= $D\jcomapi.obj $D\jutils.obj $D\jerror.obj $D\jmemmgr.obj $(SYSDEPMEM) + +# compression library object files +CLIBOBJECTS= $D\jcapimin.obj \ + $D\jcapistd.obj \ + $D\jctrans.obj \ + $D\jcparam.obj \ + $D\jdatadst.obj \ + $D\jcinit.obj \ + $D\jcmaster.obj \ + $D\jcmarker.obj \ + $D\jcmainct.obj \ + $D\jcprepct.obj \ + $D\jccoefct.obj \ + $D\jccolor.obj \ + $D\jcsample.obj \ + $D\jchuff.obj \ + $D\jcphuff.obj \ + $D\jcdctmgr.obj \ + $D\jfdctfst.obj \ + $D\jfdctflt.obj \ + $D\jfdctint.obj + +# decompression library object files +DLIBOBJECTS= $D\jdapimin.obj \ + $D\jdapistd.obj \ + $D\jdtrans.obj \ + $D\jdatasrc.obj \ + $D\jdmaster.obj \ + $D\jdinput.obj \ + $D\jdmarker.obj \ + $D\jdhuff.obj \ + $D\jdphuff.obj \ + $D\jdmainct.obj \ + $D\jdcoefct.obj \ + $D\jdpostct.obj \ + $D\jddctmgr.obj \ + $D\jidctfst.obj \ + $D\jidctflt.obj \ + $D\jidctint.obj \ + $D\jidctred.obj \ + $D\jdsample.obj \ + $D\jdcolor.obj \ + $D\jquant1.obj \ + $D\jquant2.obj \ + $D\jdmerge.obj +# These objectfiles are included in libjpeg.lib +OBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) + +# object files for sample applications (excluding library files) +COBJECTS= $D\cjpeg.obj \ + $D\rdppm.obj \ + $D\rdgif.obj \ + $D\rdtarga.obj \ + $D\rdrle.obj \ + $D\rdbmp.obj \ + $D\rdswitch.obj \ + $D\cdjpeg.obj + +DOBJECTS= $D\djpeg.obj \ + $D\wrppm.obj \ + $D\wrgif.obj \ + $D\wrtarga.obj \ + $D\wrrle.obj \ + $D\wrbmp.obj \ + $D\rdcolmap.obj \ + $D\cdjpeg.obj + +TROBJECTS= $D\jpegtran.obj \ + $D\rdswitch.obj \ + $D\cdjpeg.obj \ + $D\transupp.obj + +!if "$(FINAL)" == "1" +LIBTARGET=..\..\lib\jpeg.lib +!else if "$(FINAL)" == "hybrid" +LIBTARGET=..\..\lib\jpegh.lib +!else +LIBTARGET=..\..\lib\jpegd.lib +!endif + +# Note: we have to put this first, to override the default definition +# which doesn't work because there are too many files on the command line. +# This means that we must explicitly use the 'all' target when making +# jpeg.lib, because of the ordering of targets. + +defaulttarget: + echo Please use the 'all' target for this makefile. + + +# Pull in standard variable definitions + +!include ..\makelib.vc + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/aboutdlg.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/aboutdlg.cpp new file mode 100644 index 0000000000..5b100b81ae --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/aboutdlg.cpp @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/msw/aboutdlg.cpp +// Purpose: implementation of wxAboutBox() for wxMSW +// Author: Vadim Zeitlin +// Created: 2006-10-07 +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ABOUTDLG + +#ifndef WX_PRECOMP + #include "wx/msgdlg.h" +#endif //WX_PRECOMP + +#include "wx/aboutdlg.h" +#include "wx/generic/aboutdlgg.h" + +// ============================================================================ +// implementation +// ============================================================================ + +// our public entry point +void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent) +{ + // we prefer to show a simple message box if we don't have any fields which + // can't be shown in it because as much as there is a standard about box + // under MSW at all, this is it + if ( info.IsSimple() ) + { + // build the text to show in the box + const wxString name = info.GetName(); + wxString msg; + msg << name; + if ( info.HasVersion() ) + { + msg << wxT('\n'); + msg << info.GetLongVersion(); + } + + msg << wxT("\n\n"); + + if ( info.HasCopyright() ) + msg << info.GetCopyrightToDisplay() << wxT('\n'); + + // add everything remaining + msg << info.GetDescriptionAndCredits(); + + wxMessageBox(msg, wxString::Format(_("About %s"), name), wxOK | wxCENTRE, parent); + } + else // simple "native" version is not enough + { + // we need to use the full-blown generic version + wxGenericAboutBox(info, parent); + } +} + +#endif // wxUSE_ABOUTDLG diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/accel.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/accel.cpp new file mode 100644 index 0000000000..fbe5d7494f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/accel.cpp @@ -0,0 +1,154 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/accel.cpp +// Purpose: wxAcceleratorTable +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_ACCEL + +#ifndef WX_PRECOMP + #include "wx/window.h" +#endif + +#include "wx/accel.h" + +#include "wx/msw/private.h" +#include "wx/msw/private/keyboard.h" + +IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) + +// ---------------------------------------------------------------------------- +// data defining wxAcceleratorTable +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData +{ + friend class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable; +public: + wxAcceleratorRefData(); + virtual ~wxAcceleratorRefData(); + + inline HACCEL GetHACCEL() const { return m_hAccel; } +protected: + HACCEL m_hAccel; + bool m_ok; + + wxDECLARE_NO_COPY_CLASS(wxAcceleratorRefData); +}; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxAcceleratorRefData +// ---------------------------------------------------------------------------- + +#define M_ACCELDATA ((wxAcceleratorRefData *)m_refData) + +wxAcceleratorRefData::wxAcceleratorRefData() +{ + m_ok = false; + m_hAccel = 0; +} + +wxAcceleratorRefData::~wxAcceleratorRefData() +{ + if (m_hAccel) + { + DestroyAcceleratorTable((HACCEL) m_hAccel); + } +} + +// ---------------------------------------------------------------------------- +// wxAcceleratorTable +// ---------------------------------------------------------------------------- + +// Load from .rc resource +wxAcceleratorTable::wxAcceleratorTable(const wxString& resource) +{ + m_refData = new wxAcceleratorRefData; + + HACCEL hAccel = ::LoadAccelerators(wxGetInstance(), resource.t_str()); + M_ACCELDATA->m_hAccel = hAccel; + M_ACCELDATA->m_ok = hAccel != 0; +} + +// Create from an array +wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]) +{ + m_refData = new wxAcceleratorRefData; + + ACCEL* arr = new ACCEL[n]; + for ( int i = 0; i < n; i++ ) + { + int flags = entries[i].GetFlags(); + + BYTE fVirt = FVIRTKEY; + if ( flags & wxACCEL_ALT ) + fVirt |= FALT; + if ( flags & wxACCEL_SHIFT ) + fVirt |= FSHIFT; + if ( flags & wxACCEL_CTRL ) + fVirt |= FCONTROL; + + WORD key = wxMSWKeyboard::WXToVK(entries[i].GetKeyCode()); + + arr[i].fVirt = fVirt; + arr[i].key = key; + arr[i].cmd = (WORD)entries[i].GetCommand(); + } + + M_ACCELDATA->m_hAccel = ::CreateAcceleratorTable(arr, n); + delete[] arr; + + M_ACCELDATA->m_ok = (M_ACCELDATA->m_hAccel != 0); +} + +bool wxAcceleratorTable::IsOk() const +{ + return (M_ACCELDATA && (M_ACCELDATA->m_ok)); +} + +void wxAcceleratorTable::SetHACCEL(WXHACCEL hAccel) +{ + if (!M_ACCELDATA) + m_refData = new wxAcceleratorRefData; + + M_ACCELDATA->m_hAccel = (HACCEL) hAccel; +} + +WXHACCEL wxAcceleratorTable::GetHACCEL() const +{ + if (!M_ACCELDATA) + return 0; + return (WXHACCEL) M_ACCELDATA->m_hAccel; +} + +bool wxAcceleratorTable::Translate(wxWindow *window, WXMSG *wxmsg) const +{ + MSG *msg = (MSG *)wxmsg; + return IsOk() && ::TranslateAccelerator(GetHwndOf(window), GetHaccel(), msg); +} + +#endif // wxUSE_ACCEL + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/anybutton.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/anybutton.cpp new file mode 100644 index 0000000000..870ad0526c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/anybutton.cpp @@ -0,0 +1,1372 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/anybutton.cpp +// Purpose: wxAnyButton +// Author: Julian Smart +// Created: 1998-01-04 (extracted from button.cpp) +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifdef wxHAS_ANY_BUTTON + +#include "wx/anybutton.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/brush.h" + #include "wx/panel.h" + #include "wx/bmpbuttn.h" + #include "wx/settings.h" + #include "wx/dcscreen.h" + #include "wx/dcclient.h" + #include "wx/toplevel.h" + #include "wx/msw/wrapcctl.h" + #include "wx/msw/private.h" + #include "wx/msw/missing.h" +#endif + +#include "wx/imaglist.h" +#include "wx/stockitem.h" +#include "wx/msw/private/button.h" +#include "wx/msw/private/dc.h" +#include "wx/private/window.h" + +#if wxUSE_MARKUP + #include "wx/generic/private/markuptext.h" +#endif // wxUSE_MARKUP + +using namespace wxMSWImpl; + +#if wxUSE_UXTHEME + #include "wx/msw/uxtheme.h" + + // no need to include tmschema.h + #ifndef BP_PUSHBUTTON + #define BP_PUSHBUTTON 1 + + #define PBS_NORMAL 1 + #define PBS_HOT 2 + #define PBS_PRESSED 3 + #define PBS_DISABLED 4 + #define PBS_DEFAULTED 5 + + #define TMT_CONTENTMARGINS 3602 + #endif + + // provide the necessary declarations ourselves if they're missing from + // headers + #ifndef BCM_SETIMAGELIST + #define BCM_SETIMAGELIST 0x1602 + #define BCM_SETTEXTMARGIN 0x1604 + + enum + { + BUTTON_IMAGELIST_ALIGN_LEFT, + BUTTON_IMAGELIST_ALIGN_RIGHT, + BUTTON_IMAGELIST_ALIGN_TOP, + BUTTON_IMAGELIST_ALIGN_BOTTOM + }; + + struct BUTTON_IMAGELIST + { + HIMAGELIST himl; + RECT margin; + UINT uAlign; + }; + #endif +#endif // wxUSE_UXTHEME + +#ifndef WM_THEMECHANGED + #define WM_THEMECHANGED 0x031A +#endif + +#ifndef ODS_NOACCEL + #define ODS_NOACCEL 0x0100 +#endif + +#ifndef ODS_NOFOCUSRECT + #define ODS_NOFOCUSRECT 0x0200 +#endif + +#if wxUSE_UXTHEME +extern wxWindowMSW *wxWindowBeingErased; // From src/msw/window.cpp +#endif // wxUSE_UXTHEME + +// ---------------------------------------------------------------------------- +// button image data +// ---------------------------------------------------------------------------- + +// we use different data classes for owner drawn buttons and for themed XP ones + +class wxButtonImageData +{ +public: + wxButtonImageData() { } + virtual ~wxButtonImageData() { } + + virtual wxBitmap GetBitmap(wxAnyButton::State which) const = 0; + virtual void SetBitmap(const wxBitmap& bitmap, wxAnyButton::State which) = 0; + + virtual wxSize GetBitmapMargins() const = 0; + virtual void SetBitmapMargins(wxCoord x, wxCoord y) = 0; + + virtual wxDirection GetBitmapPosition() const = 0; + virtual void SetBitmapPosition(wxDirection dir) = 0; + +private: + wxDECLARE_NO_COPY_CLASS(wxButtonImageData); +}; + +namespace +{ + +// the gap between button edge and the interior area used by Windows for the +// standard buttons +const int OD_BUTTON_MARGIN = 4; + +class wxODButtonImageData : public wxButtonImageData +{ +public: + wxODButtonImageData(wxAnyButton *btn, const wxBitmap& bitmap) + { + SetBitmap(bitmap, wxAnyButton::State_Normal); +#if wxUSE_IMAGE + SetBitmap(bitmap.ConvertToDisabled(), wxAnyButton::State_Disabled); +#endif + m_dir = wxLEFT; + + // we use margins when we have both bitmap and text, but when we have + // only the bitmap it should take up the entire button area + if ( btn->ShowsLabel() ) + { + m_margin.x = btn->GetCharWidth(); + m_margin.y = btn->GetCharHeight() / 2; + } + } + + virtual wxBitmap GetBitmap(wxAnyButton::State which) const + { + return m_bitmaps[which]; + } + + virtual void SetBitmap(const wxBitmap& bitmap, wxAnyButton::State which) + { + m_bitmaps[which] = bitmap; + } + + virtual wxSize GetBitmapMargins() const + { + return m_margin; + } + + virtual void SetBitmapMargins(wxCoord x, wxCoord y) + { + m_margin = wxSize(x, y); + } + + virtual wxDirection GetBitmapPosition() const + { + return m_dir; + } + + virtual void SetBitmapPosition(wxDirection dir) + { + m_dir = dir; + } + +private: + // just store the values passed to us to be able to retrieve them later + // from the drawing code + wxBitmap m_bitmaps[wxAnyButton::State_Max]; + wxSize m_margin; + wxDirection m_dir; + + wxDECLARE_NO_COPY_CLASS(wxODButtonImageData); +}; + +#if wxUSE_UXTHEME + +// somehow the margin is one pixel greater than the value returned by +// GetThemeMargins() call +const int XP_BUTTON_EXTRA_MARGIN = 1; + +class wxXPButtonImageData : public wxButtonImageData +{ +public: + // we must be constructed with the size of our images as we need to create + // the image list + wxXPButtonImageData(wxAnyButton *btn, const wxBitmap& bitmap) + : m_iml(bitmap.GetWidth(), bitmap.GetHeight(), true /* use mask */, + wxAnyButton::State_Max + 1 /* see "pulse" comment below */), + m_hwndBtn(GetHwndOf(btn)) + { + // initialize all bitmaps except for the disabled one to normal state + for ( int n = 0; n < wxAnyButton::State_Max; n++ ) + { +#if wxUSE_IMAGE + m_iml.Add(n == wxAnyButton::State_Disabled ? bitmap.ConvertToDisabled() + : bitmap); +#else + m_iml.Add(bitmap); +#endif + } + + // In addition to the states supported by wxWidgets such as normal, + // hot, pressed, disabled and focused, we need to add bitmap for + // another state when running under Windows 7 -- the so called "stylus + // hot" state corresponding to PBS_STYLUSHOT constant. While it's + // documented in MSDN as being only used with tablets, it is a lie as + // a focused button actually alternates between the image list elements + // with PBS_DEFAULTED and PBS_STYLUSHOT indices and, in particular, + // just disappears during half of the time if the latter is not set so + // we absolutely must set it. + // + // This also explains why we need to allocate an extra slot in the + // image list ctor above, the slot State_Max is used for this one. + m_iml.Add(bitmap); + + m_data.himl = GetHimagelistOf(&m_iml); + + // no margins by default + m_data.margin.left = + m_data.margin.right = + m_data.margin.top = + m_data.margin.bottom = 0; + + // use default alignment + m_data.uAlign = BUTTON_IMAGELIST_ALIGN_LEFT; + + UpdateImageInfo(); + } + + virtual wxBitmap GetBitmap(wxAnyButton::State which) const + { + return m_iml.GetBitmap(which); + } + + virtual void SetBitmap(const wxBitmap& bitmap, wxAnyButton::State which) + { + m_iml.Replace(which, bitmap); + + // As we want the focused button to always show its bitmap, we need to + // update the "stylus hot" one to match it to avoid any pulsing. + if ( which == wxAnyButton::State_Focused ) + m_iml.Replace(wxAnyButton::State_Max, bitmap); + + UpdateImageInfo(); + } + + virtual wxSize GetBitmapMargins() const + { + return wxSize(m_data.margin.left, m_data.margin.top); + } + + virtual void SetBitmapMargins(wxCoord x, wxCoord y) + { + RECT& margin = m_data.margin; + margin.left = + margin.right = x; + margin.top = + margin.bottom = y; + + if ( !::SendMessage(m_hwndBtn, BCM_SETTEXTMARGIN, 0, (LPARAM)&margin) ) + { + wxLogDebug("SendMessage(BCM_SETTEXTMARGIN) failed"); + } + } + + virtual wxDirection GetBitmapPosition() const + { + switch ( m_data.uAlign ) + { + default: + wxFAIL_MSG( "invalid image alignment" ); + // fall through + + case BUTTON_IMAGELIST_ALIGN_LEFT: + return wxLEFT; + + case BUTTON_IMAGELIST_ALIGN_RIGHT: + return wxRIGHT; + + case BUTTON_IMAGELIST_ALIGN_TOP: + return wxTOP; + + case BUTTON_IMAGELIST_ALIGN_BOTTOM: + return wxBOTTOM; + } + } + + virtual void SetBitmapPosition(wxDirection dir) + { + UINT alignNew; + switch ( dir ) + { + default: + wxFAIL_MSG( "invalid direction" ); + // fall through + + case wxLEFT: + alignNew = BUTTON_IMAGELIST_ALIGN_LEFT; + break; + + case wxRIGHT: + alignNew = BUTTON_IMAGELIST_ALIGN_RIGHT; + break; + + case wxTOP: + alignNew = BUTTON_IMAGELIST_ALIGN_TOP; + break; + + case wxBOTTOM: + alignNew = BUTTON_IMAGELIST_ALIGN_BOTTOM; + break; + } + + if ( alignNew != m_data.uAlign ) + { + m_data.uAlign = alignNew; + UpdateImageInfo(); + } + } + +private: + void UpdateImageInfo() + { + if ( !::SendMessage(m_hwndBtn, BCM_SETIMAGELIST, 0, (LPARAM)&m_data) ) + { + wxLogDebug("SendMessage(BCM_SETIMAGELIST) failed"); + } + } + + // we store image list separately to be able to use convenient wxImageList + // methods instead of working with raw HIMAGELIST + wxImageList m_iml; + + // store the rest of the data in BCM_SETIMAGELIST-friendly form + BUTTON_IMAGELIST m_data; + + // the button we're associated with + const HWND m_hwndBtn; + + + wxDECLARE_NO_COPY_CLASS(wxXPButtonImageData); +}; + +#endif // wxUSE_UXTHEME + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// helper functions from wx/msw/private/button.h +// ---------------------------------------------------------------------------- + +void wxMSWButton::UpdateMultilineStyle(HWND hwnd, const wxString& label) +{ + // update BS_MULTILINE style depending on the new label (resetting it + // doesn't seem to do anything very useful but it shouldn't hurt and we do + // have to set it whenever the label becomes multi line as otherwise it + // wouldn't be shown correctly as we don't use BS_MULTILINE when creating + // the control unless it already has new lines in its label) + long styleOld = ::GetWindowLong(hwnd, GWL_STYLE), + styleNew; + if ( label.find(wxT('\n')) != wxString::npos ) + styleNew = styleOld | BS_MULTILINE; + else + styleNew = styleOld & ~BS_MULTILINE; + + if ( styleNew != styleOld ) + ::SetWindowLong(hwnd, GWL_STYLE, styleNew); +} + +wxSize wxMSWButton::GetFittingSize(wxWindow *win, + const wxSize& sizeLabel, + int flags) +{ + wxSize sizeBtn = sizeLabel; + + // FIXME: The numbers here are pure guesswork, no idea how should the + // button margins be really calculated. + if ( flags & Size_ExactFit ) + { + // We still need some margin or the text would be overwritten, just + // make it as small as possible. + sizeBtn.x += (3*win->GetCharWidth()); + } + else + { + sizeBtn.x += 3*win->GetCharWidth(); + sizeBtn.y += win->GetCharHeight()/2; + } + + // account for the shield UAC icon if we have it + if ( flags & Size_AuthNeeded ) + sizeBtn.x += wxSystemSettings::GetMetric(wxSYS_SMALLICON_X); + + return sizeBtn; +} + +wxSize wxMSWButton::ComputeBestFittingSize(wxControl *btn, int flags) +{ + wxClientDC dc(btn); + + wxSize sizeBtn; + dc.GetMultiLineTextExtent(btn->GetLabelText(), &sizeBtn.x, &sizeBtn.y); + + return GetFittingSize(btn, sizeBtn, flags); +} + +wxSize wxMSWButton::IncreaseToStdSizeAndCache(wxControl *btn, const wxSize& size) +{ + wxSize sizeBtn(size); + + // The 50x14 button size is documented in the "Recommended sizing and + // spacing" section of MSDN layout article. + // + // Note that we intentionally don't use GetDefaultSize() here, because + // it's inexact -- dialog units depend on this dialog's font. + const wxSize sizeDef = btn->ConvertDialogToPixels(wxSize(50, 14)); + + // All buttons should have at least the standard size, unless the user + // explicitly wants them to be as small as possible and used wxBU_EXACTFIT + // style to indicate this. + const bool incToStdSize = !btn->HasFlag(wxBU_EXACTFIT); + if ( incToStdSize ) + { + if ( sizeBtn.x < sizeDef.x ) + sizeBtn.x = sizeDef.x; + } + + // Notice that we really want to make all buttons with text label equally + // high, otherwise they look ugly and the existing code using wxBU_EXACTFIT + // only uses it to control width and not height. + if ( incToStdSize || !btn->GetLabel().empty() ) + { + if ( sizeBtn.y < sizeDef.y ) + sizeBtn.y = sizeDef.y; + } + + btn->CacheBestSize(sizeBtn); + + return sizeBtn; +} + +// ---------------------------------------------------------------------------- +// creation/destruction +// ---------------------------------------------------------------------------- + +wxAnyButton::~wxAnyButton() +{ + delete m_imageData; +#if wxUSE_MARKUP + delete m_markupText; +#endif // wxUSE_MARKUP +} + +void wxAnyButton::SetLabel(const wxString& label) +{ + wxMSWButton::UpdateMultilineStyle(GetHwnd(), label); + + wxAnyButtonBase::SetLabel(label); + +#if wxUSE_MARKUP + // If we have a plain text label, we shouldn't be using markup any longer. + if ( m_markupText ) + { + delete m_markupText; + m_markupText = NULL; + + // Unfortunately we don't really know whether we can reset the button + // to be non-owner-drawn or not: if we had made it owner-drawn just + // because of a call to SetLabelMarkup(), we could, but not if there + // were [also] calls to Set{Fore,Back}groundColour(). If it's really a + // problem to have button remain owner-drawn forever just because it + // had markup label once, we should record the reason for our current + // owner-drawnness and check it here. + } +#endif // wxUSE_MARKUP +} + +// ---------------------------------------------------------------------------- +// size management including autosizing +// ---------------------------------------------------------------------------- + +void wxAnyButton::AdjustForBitmapSize(wxSize &size) const +{ + wxCHECK_RET( m_imageData, wxT("shouldn't be called if no image") ); + + // account for the bitmap size + const wxSize sizeBmp = m_imageData->GetBitmap(State_Normal).GetSize(); + const wxDirection dirBmp = m_imageData->GetBitmapPosition(); + if ( dirBmp == wxLEFT || dirBmp == wxRIGHT ) + { + size.x += sizeBmp.x; + if ( sizeBmp.y > size.y ) + size.y = sizeBmp.y; + } + else // bitmap on top/below the text + { + size.y += sizeBmp.y; + if ( sizeBmp.x > size.x ) + size.x = sizeBmp.x; + } + + // account for the user-specified margins + size += 2*m_imageData->GetBitmapMargins(); + + // and also for the margins we always add internally (unless we have no + // border at all in which case the button has exactly the same size as + // bitmap and so no margins should be used) + if ( !HasFlag(wxBORDER_NONE) ) + { + int marginH = 0, + marginV = 0; +#if wxUSE_UXTHEME + if ( wxUxThemeEngine::GetIfActive() ) + { + wxUxThemeHandle theme(const_cast(this), L"BUTTON"); + + MARGINS margins; + wxUxThemeEngine::Get()->GetThemeMargins(theme, NULL, + BP_PUSHBUTTON, + PBS_NORMAL, + TMT_CONTENTMARGINS, + NULL, + &margins); + + // XP doesn't draw themed buttons correctly when the client + // area is smaller than 8x8 - enforce this minimum size for + // small bitmaps + size.IncTo(wxSize(8, 8)); + + marginH = margins.cxLeftWidth + margins.cxRightWidth + + 2*XP_BUTTON_EXTRA_MARGIN; + marginV = margins.cyTopHeight + margins.cyBottomHeight + + 2*XP_BUTTON_EXTRA_MARGIN; + } + else +#endif // wxUSE_UXTHEME + { + marginH = + marginV = OD_BUTTON_MARGIN; + } + + size.IncBy(marginH, marginV); + } +} + +wxSize wxAnyButton::DoGetBestSize() const +{ + wxAnyButton * const self = const_cast(this); + + wxSize size; + + // Account for the text part if we have it. + if ( ShowsLabel() ) + { + int flags = 0; + if ( HasFlag(wxBU_EXACTFIT) ) + flags |= wxMSWButton::Size_ExactFit; + if ( DoGetAuthNeeded() ) + flags |= wxMSWButton::Size_AuthNeeded; + +#if wxUSE_MARKUP + if ( m_markupText ) + { + wxClientDC dc(self); + size = wxMSWButton::GetFittingSize(self, + m_markupText->Measure(dc), + flags); + } + else // Normal plain text (but possibly multiline) label. +#endif // wxUSE_MARKUP + { + size = wxMSWButton::ComputeBestFittingSize(self, flags); + } + } + + if ( m_imageData ) + AdjustForBitmapSize(size); + + return wxMSWButton::IncreaseToStdSizeAndCache(self, size); +} + +// ---------------------------------------------------------------------------- +// event/message handlers +// ---------------------------------------------------------------------------- + +WXLRESULT wxAnyButton::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) +{ + if ( nMsg == WM_LBUTTONDBLCLK ) + { + // emulate a click event to force an owner-drawn button to change its + // appearance - without this, it won't do it + (void)wxControl::MSWWindowProc(WM_LBUTTONDOWN, wParam, lParam); + + // and continue with processing the message normally as well + } +#if wxUSE_UXTHEME + else if ( nMsg == WM_THEMECHANGED ) + { + // need to recalculate the best size here + // as the theme size might have changed + InvalidateBestSize(); + } +#endif // wxUSE_UXTHEME + // must use m_mouseInWindow here instead of IsMouseInWindow() + // since we need to know the first time the mouse enters the window + // and IsMouseInWindow() would return true in this case + else if ( (nMsg == WM_MOUSEMOVE && !m_mouseInWindow) || + nMsg == WM_MOUSELEAVE ) + { + if ( + IsEnabled() && + ( +#if wxUSE_UXTHEME + wxUxThemeEngine::GetIfActive() || +#endif // wxUSE_UXTHEME + (m_imageData && m_imageData->GetBitmap(State_Current).IsOk()) + ) + ) + { + Refresh(); + } + } + + // let the base class do all real processing + return wxControl::MSWWindowProc(nMsg, wParam, lParam); +} + +// ---------------------------------------------------------------------------- +// button images +// ---------------------------------------------------------------------------- + +wxBitmap wxAnyButton::DoGetBitmap(State which) const +{ + return m_imageData ? m_imageData->GetBitmap(which) : wxBitmap(); +} + +void wxAnyButton::DoSetBitmap(const wxBitmap& bitmap, State which) +{ + if ( !bitmap.IsOk() ) + { + if ( m_imageData ) + { + // Normal image is special: setting it enables images for the + // button and resetting it to nothing disables all of them. + if ( which == State_Normal ) + { + delete m_imageData; + m_imageData = NULL; + } + else + { + // Replace the removed bitmap with the normal one. + wxBitmap bmpNormal = m_imageData->GetBitmap(State_Normal); + m_imageData->SetBitmap(which == State_Disabled + ? bmpNormal.ConvertToDisabled() + : bmpNormal, + which); + } + } + + return; + } + +#if wxUSE_UXTHEME + wxXPButtonImageData *oldData = NULL; +#endif // wxUSE_UXTHEME + + // Check if we already had bitmaps of different size. + if ( m_imageData && + bitmap.GetSize() != m_imageData->GetBitmap(State_Normal).GetSize() ) + { + wxASSERT_MSG( (which == State_Normal) || bitmap.IsNull(), + "Must set normal bitmap with the new size first" ); + +#if wxUSE_UXTHEME + if ( ShowsLabel() && wxUxThemeEngine::GetIfActive() ) + { + // We can't change the size of the images stored in wxImageList + // in wxXPButtonImageData::m_iml so force recreating it below but + // keep the current data to copy its values into the new one. + oldData = static_cast(m_imageData); + m_imageData = NULL; + } +#endif // wxUSE_UXTHEME + //else: wxODButtonImageData doesn't require anything special + } + + // allocate the image data when the first bitmap is set + if ( !m_imageData ) + { +#if wxUSE_UXTHEME + // using image list doesn't work correctly if we don't have any label + // (even if we use BUTTON_IMAGELIST_ALIGN_CENTER alignment and + // BS_BITMAP style), at least under Windows 2003 so use owner drawn + // strategy for bitmap-only buttons + if ( ShowsLabel() && wxUxThemeEngine::GetIfActive() ) + { + m_imageData = new wxXPButtonImageData(this, bitmap); + + if ( oldData ) + { + // Preserve the old values in case the user changed them. + m_imageData->SetBitmapPosition(oldData->GetBitmapPosition()); + + const wxSize oldMargins = oldData->GetBitmapMargins(); + m_imageData->SetBitmapMargins(oldMargins.x, oldMargins.y); + + // No need to preserve the bitmaps though as they were of wrong + // size anyhow. + + delete oldData; + } + } + else +#endif // wxUSE_UXTHEME + { + m_imageData = new wxODButtonImageData(this, bitmap); + MakeOwnerDrawn(); + } + } + else + { + m_imageData->SetBitmap(bitmap, which); + } + + // it should be enough to only invalidate the best size when the normal + // bitmap changes as all bitmaps assigned to the button should be of the + // same size anyhow + if ( which == State_Normal ) + InvalidateBestSize(); + + Refresh(); +} + +wxSize wxAnyButton::DoGetBitmapMargins() const +{ + return m_imageData ? m_imageData->GetBitmapMargins() : wxSize(0, 0); +} + +void wxAnyButton::DoSetBitmapMargins(wxCoord x, wxCoord y) +{ + wxCHECK_RET( m_imageData, "SetBitmap() must be called first" ); + + m_imageData->SetBitmapMargins(x, y); + InvalidateBestSize(); +} + +void wxAnyButton::DoSetBitmapPosition(wxDirection dir) +{ + if ( m_imageData ) + m_imageData->SetBitmapPosition(dir); + InvalidateBestSize(); +} + +// ---------------------------------------------------------------------------- +// markup support +// ---------------------------------------------------------------------------- + +#if wxUSE_MARKUP + +bool wxAnyButton::DoSetLabelMarkup(const wxString& markup) +{ + if ( !wxAnyButtonBase::DoSetLabelMarkup(markup) ) + return false; + + if ( !m_markupText ) + { + m_markupText = new wxMarkupText(markup); + MakeOwnerDrawn(); + } + else + { + // We are already owner-drawn so just update the text. + m_markupText->SetMarkup(markup); + } + + Refresh(); + + return true; +} + +#endif // wxUSE_MARKUP + +// ---------------------------------------------------------------------------- +// owner-drawn buttons support +// ---------------------------------------------------------------------------- + +// drawing helpers +namespace +{ + +// return the button state using both the ODS_XXX flags specified in state +// parameter and the current button state +wxAnyButton::State GetButtonState(wxAnyButton *btn, UINT state) +{ + if ( state & ODS_DISABLED ) + return wxAnyButton::State_Disabled; + + if ( state & ODS_SELECTED ) + return wxAnyButton::State_Pressed; + + if ( btn->HasCapture() || btn->IsMouseInWindow() ) + return wxAnyButton::State_Current; + + if ( state & ODS_FOCUS ) + return wxAnyButton::State_Focused; + + return btn->GetNormalState(); +} + +void DrawButtonText(HDC hdc, + RECT *pRect, + wxAnyButton *btn, + int flags) +{ + const wxString text = btn->GetLabel(); + + // To get a native look for owner-drawn button in disabled state (without + // theming) we must use DrawState() to draw the text label. + if ( !wxUxThemeEngine::GetIfActive() && !btn->IsEnabled() ) + { + // However using DrawState() has some drawbacks: + // 1. It generally doesn't support alignment flags (except right + // alignment), so we need to align the text on our own. + // 2. It doesn't support multliline texts and there is necessary to + // draw/align multiline text line by line. + + // Compute bounding rect for the whole text. + RECT rc; + ::SetRectEmpty(&rc); + ::DrawText(hdc, text.t_str(), text.length(), &rc, DT_CALCRECT); + + const LONG h = rc.bottom - rc.top; + + // Based on wxButton flags determine bottom edge of the drawing rect + // inside the entire button area. + int y0; + if ( btn->HasFlag(wxBU_BOTTOM) ) + { + y0 = pRect->bottom - h; + } + else if ( !btn->HasFlag(wxBU_TOP) ) + { + // DT_VCENTER + y0 = pRect->top + (pRect->bottom - pRect->top)/2 - h/2; + } + else // DT_TOP is the default + { + y0 = pRect->top; + } + + UINT dsFlags = DSS_DISABLED; + if( flags & DT_HIDEPREFIX ) + dsFlags |= (DSS_HIDEPREFIX | DST_PREFIXTEXT); + else + dsFlags |= DST_TEXT; + + const wxArrayString lines = wxSplit(text, '\n', '\0'); + const int hLine = h / lines.size(); + for ( size_t lineNum = 0; lineNum < lines.size(); lineNum++ ) + { + // Each line must be aligned in horizontal direction individually. + ::SetRectEmpty(&rc); + ::DrawText(hdc, lines[lineNum].t_str(), lines[lineNum].length(), + &rc, DT_CALCRECT); + const LONG w = rc.right - rc.left; + + // Based on wxButton flags set horizontal position of the rect + // inside the entire button area. Text is always centered for + // multiline label. + if ( (!btn->HasFlag(wxBU_LEFT) && !btn->HasFlag(wxBU_RIGHT)) || + lines.size() > 1 ) + { + // DT_CENTER + rc.left = pRect->left + (pRect->right - pRect->left)/2 - w/2; + rc.right = rc.left + w; + } + else if ( btn->HasFlag(wxBU_RIGHT) ) + { + rc.right = pRect->right; + rc.left = rc.right - w; + } + else // DT_LEFT is the default + { + rc.left = pRect->left; + rc.right = rc.left + w; + } + + ::OffsetRect(&rc, 0, y0 + lineNum * hLine); + + ::DrawState(hdc, NULL, NULL, wxMSW_CONV_LPARAM(lines[lineNum]), + lines[lineNum].length(), + rc.left, rc.top, rc.right, rc.bottom, dsFlags); + } + } + else // Button is enabled or using themes. + { + if ( text.find(wxT('\n')) != wxString::npos ) + { + // draw multiline label + + // center text horizontally in any case + flags |= DT_CENTER; + + // first we need to compute its bounding rect + RECT rc; + ::CopyRect(&rc, pRect); + ::DrawText(hdc, text.t_str(), text.length(), &rc, + DT_CENTER | DT_CALCRECT); + + // now center this rect inside the entire button area + const LONG w = rc.right - rc.left; + const LONG h = rc.bottom - rc.top; + rc.left = pRect->left + (pRect->right - pRect->left)/2 - w/2; + rc.right = rc.left+w; + rc.top = pRect->top + (pRect->bottom - pRect->top)/2 - h/2; + rc.bottom = rc.top+h; + + ::DrawText(hdc, text.t_str(), text.length(), &rc, flags); + } + else // single line label + { + // translate wx button flags to alignment flags for DrawText() + if ( btn->HasFlag(wxBU_RIGHT) ) + { + flags |= DT_RIGHT; + } + else if ( !btn->HasFlag(wxBU_LEFT) ) + { + flags |= DT_CENTER; + } + //else: DT_LEFT is the default anyhow (and its value is 0 too) + + if ( btn->HasFlag(wxBU_BOTTOM) ) + { + flags |= DT_BOTTOM; + } + else if ( !btn->HasFlag(wxBU_TOP) ) + { + flags |= DT_VCENTER; + } + //else: as above, DT_TOP is the default + + // notice that we must have DT_SINGLELINE for vertical alignment + // flags to work + ::DrawText(hdc, text.t_str(), text.length(), pRect, + flags | DT_SINGLELINE ); + } + } +} + +void DrawRect(HDC hdc, const RECT& r) +{ + wxDrawLine(hdc, r.left, r.top, r.right, r.top); + wxDrawLine(hdc, r.right, r.top, r.right, r.bottom); + wxDrawLine(hdc, r.right, r.bottom, r.left, r.bottom); + wxDrawLine(hdc, r.left, r.bottom, r.left, r.top); +} + +/* + The button frame looks like this normally: + + WWWWWWWWWWWWWWWWWWB + WHHHHHHHHHHHHHHHHGB W = white (HILIGHT) + WH GB H = light grey (LIGHT) + WH GB G = dark grey (SHADOW) + WH GB B = black (DKSHADOW) + WH GB + WGGGGGGGGGGGGGGGGGB + BBBBBBBBBBBBBBBBBBB + + When the button is selected, the button becomes like this (the total button + size doesn't change): + + BBBBBBBBBBBBBBBBBBB + BWWWWWWWWWWWWWWWWBB + BWHHHHHHHHHHHHHHGBB + BWH GBB + BWH GBB + BWGGGGGGGGGGGGGGGBB + BBBBBBBBBBBBBBBBBBB + BBBBBBBBBBBBBBBBBBB + + When the button is pushed (while selected) it is like: + + BBBBBBBBBBBBBBBBBBB + BGGGGGGGGGGGGGGGGGB + BG GB + BG GB + BG GB + BG GB + BGGGGGGGGGGGGGGGGGB + BBBBBBBBBBBBBBBBBBB +*/ +void DrawButtonFrame(HDC hdc, RECT& rectBtn, + bool selected, bool pushed) +{ + RECT r; + CopyRect(&r, &rectBtn); + + AutoHPEN hpenBlack(GetSysColor(COLOR_3DDKSHADOW)), + hpenGrey(GetSysColor(COLOR_3DSHADOW)), + hpenLightGr(GetSysColor(COLOR_3DLIGHT)), + hpenWhite(GetSysColor(COLOR_3DHILIGHT)); + + SelectInHDC selectPen(hdc, hpenBlack); + + r.right--; + r.bottom--; + + if ( pushed ) + { + DrawRect(hdc, r); + + (void)SelectObject(hdc, hpenGrey); + ::InflateRect(&r, -1, -1); + + DrawRect(hdc, r); + } + else // !pushed + { + if ( selected ) + { + DrawRect(hdc, r); + + ::InflateRect(&r, -1, -1); + } + + wxDrawLine(hdc, r.left, r.bottom, r.right, r.bottom); + wxDrawLine(hdc, r.right, r.bottom, r.right, r.top - 1); + + (void)SelectObject(hdc, hpenWhite); + wxDrawLine(hdc, r.left, r.bottom - 1, r.left, r.top); + wxDrawLine(hdc, r.left, r.top, r.right, r.top); + + (void)SelectObject(hdc, hpenLightGr); + wxDrawLine(hdc, r.left + 1, r.bottom - 2, r.left + 1, r.top + 1); + wxDrawLine(hdc, r.left + 1, r.top + 1, r.right - 1, r.top + 1); + + (void)SelectObject(hdc, hpenGrey); + wxDrawLine(hdc, r.left + 1, r.bottom - 1, r.right - 1, r.bottom - 1); + wxDrawLine(hdc, r.right - 1, r.bottom - 1, r.right - 1, r.top); + } + + InflateRect(&rectBtn, -OD_BUTTON_MARGIN, -OD_BUTTON_MARGIN); +} + +#if wxUSE_UXTHEME +void DrawXPBackground(wxAnyButton *button, HDC hdc, RECT& rectBtn, UINT state) +{ + wxUxThemeHandle theme(button, L"BUTTON"); + + // this array is indexed by wxAnyButton::State values and so must be kept in + // sync with it + static const int uxStates[] = + { + PBS_NORMAL, PBS_HOT, PBS_PRESSED, PBS_DISABLED, PBS_DEFAULTED + }; + + int iState = uxStates[GetButtonState(button, state)]; + + wxUxThemeEngine * const engine = wxUxThemeEngine::Get(); + + // draw parent background if needed + if ( engine->IsThemeBackgroundPartiallyTransparent + ( + theme, + BP_PUSHBUTTON, + iState + ) ) + { + // Set this button as the one whose background is being erased: this + // allows our WM_ERASEBKGND handler used by DrawThemeParentBackground() + // to correctly align the background brush with this window instead of + // the parent window to which WM_ERASEBKGND is sent. Notice that this + // doesn't work with custom user-defined EVT_ERASE_BACKGROUND handlers + // as they won't be aligned but unfortunately all the attempts to fix + // it by shifting DC origin before calling DrawThemeParentBackground() + // failed to work so we at least do this, even though this is far from + // being the perfect solution. + wxWindowBeingErased = button; + + engine->DrawThemeParentBackground(GetHwndOf(button), hdc, &rectBtn); + + wxWindowBeingErased = NULL; + } + + // draw background + engine->DrawThemeBackground(theme, hdc, BP_PUSHBUTTON, iState, + &rectBtn, NULL); + + // calculate content area margins + MARGINS margins; + engine->GetThemeMargins(theme, hdc, BP_PUSHBUTTON, iState, + TMT_CONTENTMARGINS, &rectBtn, &margins); + ::InflateRect(&rectBtn, -margins.cxLeftWidth, -margins.cyTopHeight); + ::InflateRect(&rectBtn, -XP_BUTTON_EXTRA_MARGIN, -XP_BUTTON_EXTRA_MARGIN); + + if ( button->UseBgCol() ) + { + COLORREF colBg = wxColourToRGB(button->GetBackgroundColour()); + AutoHBRUSH hbrushBackground(colBg); + + // don't overwrite the focus rect + RECT rectClient; + ::CopyRect(&rectClient, &rectBtn); + ::InflateRect(&rectClient, -1, -1); + FillRect(hdc, &rectClient, hbrushBackground); + } +} +#endif // wxUSE_UXTHEME + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// owner drawn buttons support +// ---------------------------------------------------------------------------- + +void wxAnyButton::MakeOwnerDrawn() +{ + if ( !IsOwnerDrawn() ) + { + // make it so + // note that BS_OWNERDRAW is not independent from other style bits + long style = GetWindowLong(GetHwnd(), GWL_STYLE); + style &= ~(BS_3STATE | BS_AUTO3STATE | BS_AUTOCHECKBOX | BS_AUTORADIOBUTTON | BS_CHECKBOX | BS_DEFPUSHBUTTON | BS_GROUPBOX | BS_PUSHBUTTON | BS_RADIOBUTTON | BS_PUSHLIKE); + style |= BS_OWNERDRAW; + SetWindowLong(GetHwnd(), GWL_STYLE, style); + } +} + +bool wxAnyButton::IsOwnerDrawn() const +{ + long style = GetWindowLong(GetHwnd(), GWL_STYLE); + return ( (style & BS_OWNERDRAW) == BS_OWNERDRAW ); +} + +bool wxAnyButton::SetBackgroundColour(const wxColour &colour) +{ + if ( !wxControl::SetBackgroundColour(colour) ) + { + // nothing to do + return false; + } + + MakeOwnerDrawn(); + + Refresh(); + + return true; +} + +bool wxAnyButton::SetForegroundColour(const wxColour &colour) +{ + if ( !wxControl::SetForegroundColour(colour) ) + { + // nothing to do + return false; + } + + MakeOwnerDrawn(); + + Refresh(); + + return true; +} + +bool wxAnyButton::MSWOnDraw(WXDRAWITEMSTRUCT *wxdis) +{ + LPDRAWITEMSTRUCT lpDIS = (LPDRAWITEMSTRUCT)wxdis; + HDC hdc = lpDIS->hDC; + + UINT state = lpDIS->itemState; + switch ( GetButtonState(this, state) ) + { + case State_Disabled: + state |= ODS_DISABLED; + break; + case State_Pressed: + state |= ODS_SELECTED; + break; + case State_Focused: + state |= ODS_FOCUS; + break; + default: + break; + } + + bool pushed = (SendMessage(GetHwnd(), BM_GETSTATE, 0, 0) & BST_PUSHED) != 0; + + RECT rectBtn; + CopyRect(&rectBtn, &lpDIS->rcItem); + + // draw the button background + if ( !HasFlag(wxBORDER_NONE) ) + { +#if wxUSE_UXTHEME + if ( wxUxThemeEngine::GetIfActive() ) + { + DrawXPBackground(this, hdc, rectBtn, state); + } + else +#endif // wxUSE_UXTHEME + { + COLORREF colBg = wxColourToRGB(GetBackgroundColour()); + + // first, draw the background + AutoHBRUSH hbrushBackground(colBg); + FillRect(hdc, &rectBtn, hbrushBackground); + + // draw the border for the current state + bool selected = (state & ODS_SELECTED) != 0; + if ( !selected ) + { + wxTopLevelWindow * + tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow); + if ( tlw ) + { + selected = tlw->GetDefaultItem() == this; + } + } + + DrawButtonFrame(hdc, rectBtn, selected, pushed); + } + + // draw the focus rectangle if we need it + if ( (state & ODS_FOCUS) && !(state & ODS_NOFOCUSRECT) ) + { + DrawFocusRect(hdc, &rectBtn); + +#if wxUSE_UXTHEME + if ( !wxUxThemeEngine::GetIfActive() ) +#endif // wxUSE_UXTHEME + { + if ( pushed ) + { + // the label is shifted by 1 pixel to create "pushed" effect + OffsetRect(&rectBtn, 1, 1); + } + } + } + } + + + // draw the image, if any + if ( m_imageData ) + { + wxBitmap bmp = m_imageData->GetBitmap(GetButtonState(this, state)); + if ( !bmp.IsOk() ) + bmp = m_imageData->GetBitmap(State_Normal); + + const wxSize sizeBmp = bmp.GetSize(); + const wxSize margin = m_imageData->GetBitmapMargins(); + const wxSize sizeBmpWithMargins(sizeBmp + 2*margin); + wxRect rectButton(wxRectFromRECT(rectBtn)); + + // for simplicity, we start with centred rectangle and then move it to + // the appropriate edge + wxRect rectBitmap = wxRect(sizeBmp).CentreIn(rectButton); + + // move bitmap only if we have a label, otherwise keep it centered + if ( ShowsLabel() ) + { + switch ( m_imageData->GetBitmapPosition() ) + { + default: + wxFAIL_MSG( "invalid direction" ); + // fall through + + case wxLEFT: + rectBitmap.x = rectButton.x + margin.x; + rectButton.x += sizeBmpWithMargins.x; + rectButton.width -= sizeBmpWithMargins.x; + break; + + case wxRIGHT: + rectBitmap.x = rectButton.GetRight() - sizeBmp.x - margin.x; + rectButton.width -= sizeBmpWithMargins.x; + break; + + case wxTOP: + rectBitmap.y = rectButton.y + margin.y; + rectButton.y += sizeBmpWithMargins.y; + rectButton.height -= sizeBmpWithMargins.y; + break; + + case wxBOTTOM: + rectBitmap.y = rectButton.GetBottom() - sizeBmp.y - margin.y; + rectButton.height -= sizeBmpWithMargins.y; + break; + } + } + + wxDCTemp dst((WXHDC)hdc); + dst.DrawBitmap(bmp, rectBitmap.GetPosition(), true); + + wxCopyRectToRECT(rectButton, rectBtn); + } + + + // finally draw the label + if ( ShowsLabel() ) + { + COLORREF colFg = state & ODS_DISABLED + ? ::GetSysColor(COLOR_GRAYTEXT) + : wxColourToRGB(GetForegroundColour()); + + wxTextColoursChanger changeFg(hdc, colFg, CLR_INVALID); + wxBkModeChanger changeBkMode(hdc, wxBRUSHSTYLE_TRANSPARENT); + +#if wxUSE_MARKUP + if ( m_markupText ) + { + wxDCTemp dc((WXHDC)hdc); + dc.SetTextForeground(wxColour(colFg)); + dc.SetFont(GetFont()); + + m_markupText->Render(dc, wxRectFromRECT(rectBtn), + state & ODS_NOACCEL + ? wxMarkupText::Render_Default + : wxMarkupText::Render_ShowAccels); + } + else // Plain text label +#endif // wxUSE_MARKUP + { + // notice that DT_HIDEPREFIX doesn't work on old (pre-Windows 2000) + // systems but by happy coincidence ODS_NOACCEL is not used under + // them neither so DT_HIDEPREFIX should never be used there + DrawButtonText(hdc, &rectBtn, this, + state & ODS_NOACCEL ? DT_HIDEPREFIX : 0); + } + } + + return true; +} + +#endif // wxHAS_ANY_BUTTON diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/app.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/app.cpp new file mode 100644 index 0000000000..aaaefc038f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/app.cpp @@ -0,0 +1,1062 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/app.cpp +// Purpose: wxApp +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// declarations +// =========================================================================== + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/msw/wrapcctl.h" + #include "wx/dynarray.h" + #include "wx/frame.h" + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/gdicmn.h" + #include "wx/pen.h" + #include "wx/brush.h" + #include "wx/cursor.h" + #include "wx/icon.h" + #include "wx/palette.h" + #include "wx/dc.h" + #include "wx/dialog.h" + #include "wx/msgdlg.h" + #include "wx/intl.h" + #include "wx/crt.h" + #include "wx/log.h" + #include "wx/module.h" +#endif + +#include "wx/apptrait.h" +#include "wx/filename.h" +#include "wx/dynlib.h" +#include "wx/evtloop.h" +#include "wx/thread.h" +#include "wx/scopeguard.h" +#include "wx/vector.h" + +#include "wx/msw/private.h" +#include "wx/msw/dc.h" +#include "wx/msw/ole/oleutils.h" +#include "wx/msw/private/timer.h" + +#if wxUSE_TOOLTIPS + #include "wx/tooltip.h" +#endif // wxUSE_TOOLTIPS + +// OLE is used for drag-and-drop, clipboard, OLE Automation..., but some +// compilers don't support it (missing headers, libs, ...) +#if defined(__GNUWIN32_OLD__) || defined(__SYMANTEC__) + #undef wxUSE_OLE + + #define wxUSE_OLE 0 +#endif // broken compilers + +#if defined(__POCKETPC__) || defined(__SMARTPHONE__) + #include + #include +#endif + +#if wxUSE_OLE + #include +#endif + +#include +#include + +#include "wx/msw/missing.h" + +// instead of including which is not part of the core SDK and not +// shipped at all with other compilers, we always define the parts of it we +// need here ourselves +// +// NB: DLLVER_PLATFORM_WINDOWS will be defined if shlwapi.h had been somehow +// included already +#ifndef DLLVER_PLATFORM_WINDOWS + // hopefully we don't need to change packing as DWORDs should be already + // correctly aligned + struct DLLVERSIONINFO + { + DWORD cbSize; + DWORD dwMajorVersion; // Major version + DWORD dwMinorVersion; // Minor version + DWORD dwBuildNumber; // Build number + DWORD dwPlatformID; // DLLVER_PLATFORM_* + }; + + typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *); +#endif // defined(DLLVERSIONINFO) + +#ifndef ATTACH_PARENT_PROCESS + #define ATTACH_PARENT_PROCESS ((DWORD)-1) +#endif + +// --------------------------------------------------------------------------- +// global variables +// --------------------------------------------------------------------------- + +#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) +extern void wxSetKeyboardHook(bool doIt); +#endif + +// because of mingw32 4.3 bug this struct can't be inside the namespace below: +// see http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/110282 +struct ClassRegInfo +{ + ClassRegInfo(const wxChar *name) + : regname(name), + regnameNR(regname + wxApp::GetNoRedrawClassSuffix()) + { + } + + // the name of the registered class with and without CS_[HV]REDRAW styles + wxString regname; + wxString regnameNR; +}; + +namespace +{ + +wxVector gs_regClassesInfo; + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +LRESULT WXDLLEXPORT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM); + +// =========================================================================== +// wxGUIAppTraits implementation +// =========================================================================== + +// private class which we use to pass parameters from BeforeChildWaitLoop() to +// AfterChildWaitLoop() +struct ChildWaitLoopData +{ + ChildWaitLoopData(wxWindowDisabler *wd_, wxWindow *winActive_) + { + wd = wd_; + winActive = winActive_; + } + + wxWindowDisabler *wd; + wxWindow *winActive; +}; + +void *wxGUIAppTraits::BeforeChildWaitLoop() +{ + /* + We use a dirty hack here to disable all application windows (which we + must do because otherwise the calls to wxYield() could lead to some very + unexpected reentrancies in the users code) but to avoid losing + focus/activation entirely when the child process terminates which would + happen if we simply disabled everything using wxWindowDisabler. Indeed, + remember that Windows will never activate a disabled window and when the + last child's window is closed and Windows looks for a window to activate + all our windows are still disabled. There is no way to enable them in + time because we don't know when the child's windows are going to be + closed, so the solution we use here is to keep one special tiny dialog + enabled all the time. Then when the child terminates it will get + activated and when we close it below -- after re-enabling all the other + windows! -- the previously active window becomes activated again and + everything is ok. + */ + wxBeginBusyCursor(); + + // first disable all existing windows + wxWindowDisabler *wd = new wxWindowDisabler; + + // then create an "invisible" dialog: it has minimal size, is positioned + // (hopefully) outside the screen and doesn't appear in the Alt-TAB list + // (unlike the frames, which is why we use a dialog here) + wxWindow *winActive = new wxDialog + ( + wxTheApp->GetTopWindow(), + wxID_ANY, + wxEmptyString, + wxPoint(32600, 32600), + wxSize(1, 1) + ); + winActive->Show(); + + return new ChildWaitLoopData(wd, winActive); +} + +void wxGUIAppTraits::AfterChildWaitLoop(void *dataOrig) +{ + wxEndBusyCursor(); + + ChildWaitLoopData * const data = (ChildWaitLoopData *)dataOrig; + + delete data->wd; + + // finally delete the dummy dialog and, as wd has been already destroyed + // and the other windows reenabled, the activation is going to return to + // the window which had had it before + data->winActive->Destroy(); + + // also delete the temporary data object itself + delete data; +} + +#if wxUSE_THREADS +bool wxGUIAppTraits::DoMessageFromThreadWait() +{ + // we should return false only if the app should exit, i.e. only if + // Dispatch() determines that the main event loop should terminate + wxEventLoopBase * const evtLoop = wxEventLoop::GetActive(); + if ( !evtLoop || !evtLoop->Pending() ) + { + // no events means no quit event + return true; + } + + return evtLoop->Dispatch(); +} + +WXDWORD wxGUIAppTraits::WaitForThread(WXHANDLE hThread, int flags) +{ + // We only ever dispatch messages from the main thread and, additionally, + // even from the main thread we shouldn't wait for the message if we don't + // have a running event loop as we would never remove them from the message + // queue then and so we would enter an infinite loop as + // MsgWaitForMultipleObjects() keeps returning WAIT_OBJECT_0 + 1. + if ( flags == wxTHREAD_WAIT_BLOCK || + !wxIsMainThread() || + !wxEventLoop::GetActive() ) + { + // Simple blocking wait. + return DoSimpleWaitForThread(hThread); + } + + return ::MsgWaitForMultipleObjects + ( + 1, // number of objects to wait for + (HANDLE *)&hThread, // the objects + false, // wait for any objects, not all + INFINITE, // no timeout + QS_ALLINPUT | // return as soon as there are any events + QS_ALLPOSTMESSAGE + ); +} +#endif // wxUSE_THREADS + +wxPortId wxGUIAppTraits::GetToolkitVersion(int *majVer, int *minVer) const +{ + OSVERSIONINFO info; + wxZeroMemory(info); + + // on Windows, the toolkit version is the same of the OS version + // as Windows integrates the OS kernel with the GUI toolkit. + info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + if ( ::GetVersionEx(&info) ) + { + if ( majVer ) + *majVer = info.dwMajorVersion; + if ( minVer ) + *minVer = info.dwMinorVersion; + } + +#if defined(__WXHANDHELD__) || defined(__WXWINCE__) + return wxPORT_WINCE; +#else + return wxPORT_MSW; +#endif +} + +#if wxUSE_TIMER + +wxTimerImpl *wxGUIAppTraits::CreateTimerImpl(wxTimer *timer) +{ + return new wxMSWTimerImpl(timer); +} + +#endif // wxUSE_TIMER + +wxEventLoopBase* wxGUIAppTraits::CreateEventLoop() +{ + return new wxEventLoop; +} + +// --------------------------------------------------------------------------- +// Stuff for using console from the GUI applications +// --------------------------------------------------------------------------- + +#ifndef __WXWINCE__ + +#if wxUSE_DYNLIB_CLASS + +#include + +namespace +{ + +/* + Helper class to manipulate console from a GUI app. + + Notice that console output is available in the GUI app only if: + - AttachConsole() returns TRUE (which means it never works under pre-XP) + - we have a valid STD_ERROR_HANDLE + - command history hasn't been changed since our startup + + To check if all these conditions are verified, you need to simple call + IsOkToUse(). It will check the first two conditions above the first time it + is called (and if this fails, the subsequent calls will return immediately) + and also recheck the last one every time it is called. + */ +class wxConsoleStderr +{ +public: + // default ctor does nothing, call Init() before using this class + wxConsoleStderr() + { + m_hStderr = INVALID_HANDLE_VALUE; + m_historyLen = + m_dataLen = + m_dataLine = 0; + + m_ok = -1; + } + + ~wxConsoleStderr() + { + if ( m_hStderr != INVALID_HANDLE_VALUE ) + { + if ( !::FreeConsole() ) + { + wxLogLastError(wxT("FreeConsole")); + } + } + } + + // return true if we were successfully initialized and there had been no + // console activity which would interfere with our output since then + bool IsOkToUse() const + { + if ( m_ok == -1 ) + { + wxConsoleStderr * const self = const_cast(this); + self->m_ok = self->DoInit(); + + // no need to call IsHistoryUnchanged() as we just initialized + // m_history anyhow + return m_ok == 1; + } + + return m_ok && IsHistoryUnchanged(); + } + + + // output the provided text on the console, return true if ok + bool Write(const wxString& text); + +private: + // called by Init() once only to do the real initialization + bool DoInit(); + + // retrieve the command line history into the provided buffer and return + // its length + int GetCommandHistory(wxWxCharBuffer& buf) const; + + // check if the console history has changed + bool IsHistoryUnchanged() const; + + int m_ok; // initially -1, set to true or false by Init() + + wxDynamicLibrary m_dllKernel32; + + HANDLE m_hStderr; // console handle, if it's valid we must call + // FreeConsole() (even if m_ok != 1) + + wxWxCharBuffer m_history; // command history on startup + int m_historyLen; // length command history buffer + + wxCharBuffer m_data; // data between empty line and cursor position + int m_dataLen; // length data buffer + int m_dataLine; // line offset + + typedef DWORD (WINAPI *GetConsoleCommandHistory_t)(LPTSTR sCommands, + DWORD nBufferLength, + LPCTSTR sExeName); + typedef DWORD (WINAPI *GetConsoleCommandHistoryLength_t)(LPCTSTR sExeName); + + GetConsoleCommandHistory_t m_pfnGetConsoleCommandHistory; + GetConsoleCommandHistoryLength_t m_pfnGetConsoleCommandHistoryLength; + + wxDECLARE_NO_COPY_CLASS(wxConsoleStderr); +}; + +bool wxConsoleStderr::DoInit() +{ + HANDLE hStderr = ::GetStdHandle(STD_ERROR_HANDLE); + + if ( hStderr == INVALID_HANDLE_VALUE || !hStderr ) + return false; + + if ( !m_dllKernel32.Load(wxT("kernel32.dll")) ) + return false; + + typedef BOOL (WINAPI *AttachConsole_t)(DWORD dwProcessId); + AttachConsole_t wxDL_INIT_FUNC(pfn, AttachConsole, m_dllKernel32); + + if ( !pfnAttachConsole || !pfnAttachConsole(ATTACH_PARENT_PROCESS) ) + return false; + + // console attached, set m_hStderr now to ensure that we free it in the + // dtor + m_hStderr = hStderr; + + wxDL_INIT_FUNC_AW(m_pfn, GetConsoleCommandHistory, m_dllKernel32); + if ( !m_pfnGetConsoleCommandHistory ) + return false; + + wxDL_INIT_FUNC_AW(m_pfn, GetConsoleCommandHistoryLength, m_dllKernel32); + if ( !m_pfnGetConsoleCommandHistoryLength ) + return false; + + // remember the current command history to be able to compare with it later + // in IsHistoryUnchanged() + m_historyLen = GetCommandHistory(m_history); + if ( !m_history ) + return false; + + + // now find the first blank line above the current position + CONSOLE_SCREEN_BUFFER_INFO csbi; + + if ( !::GetConsoleScreenBufferInfo(m_hStderr, &csbi) ) + { + wxLogLastError(wxT("GetConsoleScreenBufferInfo")); + return false; + } + + COORD pos; + pos.X = 0; + pos.Y = csbi.dwCursorPosition.Y + 1; + + // we decide that a line is empty if first 4 characters are spaces + DWORD ret; + char buf[4]; + do + { + pos.Y--; + if ( !::ReadConsoleOutputCharacterA(m_hStderr, buf, WXSIZEOF(buf), + pos, &ret) ) + { + wxLogLastError(wxT("ReadConsoleOutputCharacterA")); + return false; + } + } while ( wxStrncmp(" ", buf, WXSIZEOF(buf)) != 0 ); + + // calculate line offset and length of data + m_dataLine = csbi.dwCursorPosition.Y - pos.Y; + m_dataLen = m_dataLine*csbi.dwMaximumWindowSize.X + csbi.dwCursorPosition.X; + + if ( m_dataLen > 0 ) + { + m_data.extend(m_dataLen); + if ( !::ReadConsoleOutputCharacterA(m_hStderr, m_data.data(), m_dataLen, + pos, &ret) ) + { + wxLogLastError(wxT("ReadConsoleOutputCharacterA")); + return false; + } + } + + return true; +} + +int wxConsoleStderr::GetCommandHistory(wxWxCharBuffer& buf) const +{ + // these functions are internal and may only be called by cmd.exe + static const wxChar *CMD_EXE = wxT("cmd.exe"); + + const int len = m_pfnGetConsoleCommandHistoryLength(CMD_EXE); + if ( len ) + { + buf.extend(len); + + int len2 = m_pfnGetConsoleCommandHistory(buf.data(), len, CMD_EXE); + +#if !wxUSE_UNICODE + // there seems to be a bug in the GetConsoleCommandHistoryA(), it + // returns the length of Unicode string and not ANSI one + len2 /= 2; +#endif // !wxUSE_UNICODE + + if ( len2 != len ) + { + wxFAIL_MSG( wxT("failed getting history?") ); + } + } + + return len; +} + +bool wxConsoleStderr::IsHistoryUnchanged() const +{ + wxASSERT_MSG( m_ok == 1, wxT("shouldn't be called if not initialized") ); + + // get (possibly changed) command history + wxWxCharBuffer history; + const int historyLen = GetCommandHistory(history); + + // and compare it with the original one + return historyLen == m_historyLen && history && + memcmp(m_history, history, historyLen) == 0; +} + +bool wxConsoleStderr::Write(const wxString& text) +{ + wxASSERT_MSG( m_hStderr != INVALID_HANDLE_VALUE, + wxT("should only be called if Init() returned true") ); + + // get current position + CONSOLE_SCREEN_BUFFER_INFO csbi; + if ( !::GetConsoleScreenBufferInfo(m_hStderr, &csbi) ) + { + wxLogLastError(wxT("GetConsoleScreenBufferInfo")); + return false; + } + + // and calculate new position (where is empty line) + csbi.dwCursorPosition.X = 0; + csbi.dwCursorPosition.Y -= m_dataLine; + + if ( !::SetConsoleCursorPosition(m_hStderr, csbi.dwCursorPosition) ) + { + wxLogLastError(wxT("SetConsoleCursorPosition")); + return false; + } + + DWORD ret; + if ( !::FillConsoleOutputCharacter(m_hStderr, wxT(' '), m_dataLen, + csbi.dwCursorPosition, &ret) ) + { + wxLogLastError(wxT("FillConsoleOutputCharacter")); + return false; + } + + if ( !::WriteConsole(m_hStderr, text.t_str(), text.length(), &ret, NULL) ) + { + wxLogLastError(wxT("WriteConsole")); + return false; + } + + WriteConsoleA(m_hStderr, m_data, m_dataLen, &ret, 0); + + return true; +} + +wxConsoleStderr s_consoleStderr; + +} // anonymous namespace + +bool wxGUIAppTraits::CanUseStderr() +{ + return s_consoleStderr.IsOkToUse(); +} + +bool wxGUIAppTraits::WriteToStderr(const wxString& text) +{ + return s_consoleStderr.IsOkToUse() && s_consoleStderr.Write(text); +} + +#else // !wxUSE_DYNLIB_CLASS + +bool wxGUIAppTraits::CanUseStderr() +{ + return false; +} + +bool wxGUIAppTraits::WriteToStderr(const wxString& WXUNUSED(text)) +{ + return false; +} + +#endif // wxUSE_DYNLIB_CLASS/!wxUSE_DYNLIB_CLASS + +#endif // !__WXWINCE__ + +// =========================================================================== +// wxApp implementation +// =========================================================================== + +int wxApp::m_nCmdShow = SW_SHOWNORMAL; + +// --------------------------------------------------------------------------- +// wxWin macros +// --------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) + +BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) + EVT_IDLE(wxApp::OnIdle) + EVT_END_SESSION(wxApp::OnEndSession) + EVT_QUERY_END_SESSION(wxApp::OnQueryEndSession) +END_EVENT_TABLE() + +// class to ensure that wxAppBase::CleanUp() is called if our Initialize() +// fails +class wxCallBaseCleanup +{ +public: + wxCallBaseCleanup(wxApp *app) : m_app(app) { } + ~wxCallBaseCleanup() { if ( m_app ) m_app->wxAppBase::CleanUp(); } + + void Dismiss() { m_app = NULL; } + +private: + wxApp *m_app; +}; + +//// Initialize +bool wxApp::Initialize(int& argc, wxChar **argv) +{ + if ( !wxAppBase::Initialize(argc, argv) ) + return false; + + // ensure that base cleanup is done if we return too early + wxCallBaseCleanup callBaseCleanup(this); + +#if !defined(__WXMICROWIN__) + InitCommonControls(); +#endif // !defined(__WXMICROWIN__) + +#if defined(__SMARTPHONE__) || defined(__POCKETPC__) + SHInitExtraControls(); +#endif + + wxOleInitialize(); + +#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) + wxSetKeyboardHook(true); +#endif + + callBaseCleanup.Dismiss(); + + return true; +} + +// --------------------------------------------------------------------------- +// Win32 window class registration +// --------------------------------------------------------------------------- + +/* static */ +const wxChar *wxApp::GetRegisteredClassName(const wxChar *name, + int bgBrushCol, + int extraStyles) +{ + const size_t count = gs_regClassesInfo.size(); + for ( size_t n = 0; n < count; n++ ) + { + if ( gs_regClassesInfo[n].regname == name ) + return gs_regClassesInfo[n].regname.c_str(); + } + + // we need to register this class + WNDCLASS wndclass; + wxZeroMemory(wndclass); + + wndclass.lpfnWndProc = (WNDPROC)wxWndProc; + wndclass.hInstance = wxGetInstance(); + wndclass.hCursor = ::LoadCursor(NULL, IDC_ARROW); + wndclass.hbrBackground = (HBRUSH)wxUIntToPtr(bgBrushCol + 1); + wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | extraStyles; + + + ClassRegInfo regClass(name); + wndclass.lpszClassName = regClass.regname.t_str(); + if ( !::RegisterClass(&wndclass) ) + { + wxLogLastError(wxString::Format(wxT("RegisterClass(%s)"), + regClass.regname)); + return NULL; + } + + wndclass.style &= ~(CS_HREDRAW | CS_VREDRAW); + wndclass.lpszClassName = regClass.regnameNR.t_str(); + if ( !::RegisterClass(&wndclass) ) + { + wxLogLastError(wxString::Format(wxT("RegisterClass(%s)"), + regClass.regname)); + ::UnregisterClass(regClass.regname.c_str(), wxGetInstance()); + return NULL; + } + + gs_regClassesInfo.push_back(regClass); + + // take care to return the pointer which will remain valid after the + // function returns (it could be invalidated later if new elements are + // added to the vector and it's reallocated but this shouldn't matter as + // this pointer should be used right now, not stored) + return gs_regClassesInfo.back().regname.t_str(); +} + +bool wxApp::IsRegisteredClassName(const wxString& name) +{ + const size_t count = gs_regClassesInfo.size(); + for ( size_t n = 0; n < count; n++ ) + { + if ( gs_regClassesInfo[n].regname == name || + gs_regClassesInfo[n].regnameNR == name ) + return true; + } + + return false; +} + +void wxApp::UnregisterWindowClasses() +{ + const size_t count = gs_regClassesInfo.size(); + for ( size_t n = 0; n < count; n++ ) + { + const ClassRegInfo& regClass = gs_regClassesInfo[n]; + if ( !::UnregisterClass(regClass.regname.c_str(), wxGetInstance()) ) + { + wxLogLastError(wxString::Format(wxT("UnregisterClass(%s)"), + regClass.regname)); + } + + if ( !::UnregisterClass(regClass.regnameNR.c_str(), wxGetInstance()) ) + { + wxLogLastError(wxString::Format(wxT("UnregisterClass(%s)"), + regClass.regnameNR)); + } + } + + gs_regClassesInfo.clear(); +} + +void wxApp::CleanUp() +{ + // all objects pending for deletion must be deleted first, otherwise + // UnregisterWindowClasses() call wouldn't succeed (because windows + // using the classes being unregistered still exist), so call the base + // class method first and only then do our clean up + wxAppBase::CleanUp(); + +#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) + wxSetKeyboardHook(false); +#endif + + wxOleUninitialize(); + + // for an EXE the classes are unregistered when it terminates but DLL may + // be loaded several times (load/unload/load) into the same process in + // which case the registration will fail after the first time if we don't + // unregister the classes now + UnregisterWindowClasses(); +} + +// ---------------------------------------------------------------------------- +// wxApp ctor/dtor +// ---------------------------------------------------------------------------- + +wxApp::wxApp() +{ + m_printMode = wxPRINT_WINDOWS; +} + +wxApp::~wxApp() +{ +} + +// ---------------------------------------------------------------------------- +// wxApp idle handling +// ---------------------------------------------------------------------------- + +void wxApp::OnIdle(wxIdleEvent& WXUNUSED(event)) +{ +#if wxUSE_DC_CACHEING + // automated DC cache management: clear the cached DCs and bitmap + // if it's likely that the app has finished with them, that is, we + // get an idle event and we're not dragging anything. + if (!::GetKeyState(MK_LBUTTON) && !::GetKeyState(MK_MBUTTON) && !::GetKeyState(MK_RBUTTON)) + wxMSWDCImpl::ClearCache(); +#endif // wxUSE_DC_CACHEING +} + +void wxApp::WakeUpIdle() +{ + // Send the top window a dummy message so idle handler processing will + // start up again. Doing it this way ensures that the idle handler + // wakes up in the right thread (see also wxWakeUpMainThread() which does + // the same for the main app thread only) + wxWindow * const topWindow = wxTheApp->GetTopWindow(); + if ( topWindow ) + { + HWND hwndTop = GetHwndOf(topWindow); + + // Do not post WM_NULL if there's already a pending WM_NULL to avoid + // overflowing the message queue. + // + // Notice that due to a limitation of PeekMessage() API (which handles + // 0,0 range specially), we have to check the range from 0-1 instead. + // This still makes it possible to overflow the queue with WM_NULLs by + // interspersing the calles to WakeUpIdle() with windows creation but + // it should be rather hard to do it accidentally. + MSG msg; + if ( !::PeekMessage(&msg, hwndTop, 0, 1, PM_NOREMOVE) || + ::PeekMessage(&msg, hwndTop, 1, 1, PM_NOREMOVE) ) + { + // If this fails too, there is really not much we can do, but then + // neither do we need to, as it normally indicates that the window + // queue is full to the brim with the messages and so the main loop + // is running and doesn't need to be woken up. + // + // Notice that we especially should not try use wxLogLastError() + // here as this would lead to another call to wxWakeUpIdle() from + // inside wxLog and stack overflow due to the resulting recursion. + ::PostMessage(hwndTop, WM_NULL, 0, 0); + } + } +#if wxUSE_THREADS + else + wxWakeUpMainThread(); +#endif // wxUSE_THREADS +} + +// ---------------------------------------------------------------------------- +// other wxApp event hanlders +// ---------------------------------------------------------------------------- + +void wxApp::OnEndSession(wxCloseEvent& WXUNUSED(event)) +{ + // Windows will terminate the process soon after we return from + // WM_ENDSESSION handler or when we delete our last window, so make sure we + // at least execute our cleanup code before + + // prevent the window from being destroyed when the corresponding wxTLW is + // destroyed: this will result in a leak of a HWND, of course, but who + // cares when the process is being killed anyhow + if ( !wxTopLevelWindows.empty() ) + wxTopLevelWindows[0]->SetHWND(0); + + const int rc = OnExit(); + + wxEntryCleanup(); + + // calling exit() instead of ExitProcess() or not doing anything at all and + // being killed by Windows has the advantage of executing the dtors of + // global objects + exit(rc); +} + +// Default behaviour: close the application with prompts. The +// user can veto the close, and therefore the end session. +void wxApp::OnQueryEndSession(wxCloseEvent& event) +{ + if (GetTopWindow()) + { + if (!GetTopWindow()->Close(!event.CanVeto())) + event.Veto(true); + } +} + +// ---------------------------------------------------------------------------- +// system DLL versions +// ---------------------------------------------------------------------------- + +// these functions have trivial inline implementations for CE +#ifndef __WXWINCE__ + +#if wxUSE_DYNLIB_CLASS + +namespace +{ + +// helper function: retrieve the DLL version by using DllGetVersion(), returns +// 0 if the DLL doesn't export such function +int CallDllGetVersion(wxDynamicLibrary& dll) +{ + // now check if the function is available during run-time + wxDYNLIB_FUNCTION( DLLGETVERSIONPROC, DllGetVersion, dll ); + if ( !pfnDllGetVersion ) + return 0; + + DLLVERSIONINFO dvi; + dvi.cbSize = sizeof(dvi); + + HRESULT hr = (*pfnDllGetVersion)(&dvi); + if ( FAILED(hr) ) + { + wxLogApiError(wxT("DllGetVersion"), hr); + + return 0; + } + + return 100*dvi.dwMajorVersion + dvi.dwMinorVersion; +} + +} // anonymous namespace + +/* static */ +int wxApp::GetComCtl32Version() +{ + // cache the result + // + // NB: this is MT-ok as in the worst case we'd compute s_verComCtl32 twice, + // but as its value should be the same both times it doesn't matter + static int s_verComCtl32 = -1; + + if ( s_verComCtl32 == -1 ) + { + // we're prepared to handle the errors + wxLogNull noLog; + + // we don't want to load comctl32.dll, it should be already loaded but, + // depending on the OS version and the presence of the manifest, it can + // be either v5 or v6 and instead of trying to guess it just get the + // handle of the already loaded version + wxLoadedDLL dllComCtl32(wxT("comctl32.dll")); + if ( !dllComCtl32.IsLoaded() ) + { + s_verComCtl32 = 0; + return 0; + } + + // try DllGetVersion() for recent DLLs + s_verComCtl32 = CallDllGetVersion(dllComCtl32); + + // if DllGetVersion() is unavailable either during compile or + // run-time, try to guess the version otherwise + if ( !s_verComCtl32 ) + { + // InitCommonControlsEx is unique to 4.70 and later + void *pfn = dllComCtl32.GetSymbol(wxT("InitCommonControlsEx")); + if ( !pfn ) + { + // not found, must be 4.00 + s_verComCtl32 = 400; + } + else // 4.70+ + { + // many symbols appeared in comctl32 4.71, could use any of + // them except may be DllInstall() + pfn = dllComCtl32.GetSymbol(wxT("InitializeFlatSB")); + if ( !pfn ) + { + // not found, must be 4.70 + s_verComCtl32 = 470; + } + else + { + // found, must be 4.71 or later + s_verComCtl32 = 471; + } + } + } + } + + return s_verComCtl32; +} + +/* static */ +int wxApp::GetShell32Version() +{ + static int s_verShell32 = -1; + if ( s_verShell32 == -1 ) + { + // we're prepared to handle the errors + wxLogNull noLog; + + wxDynamicLibrary dllShell32(wxT("shell32.dll"), wxDL_VERBATIM); + if ( dllShell32.IsLoaded() ) + { + s_verShell32 = CallDllGetVersion(dllShell32); + + if ( !s_verShell32 ) + { + // there doesn't seem to be any way to distinguish between 4.00 + // and 4.70 (starting from 4.71 we have DllGetVersion()) so + // just assume it is 4.0 + s_verShell32 = 400; + } + } + else // failed load the DLL? + { + s_verShell32 = 0; + } + } + + return s_verShell32; +} + +#else // !wxUSE_DYNLIB_CLASS + +/* static */ +int wxApp::GetComCtl32Version() +{ + return 0; +} + +/* static */ +int wxApp::GetShell32Version() +{ + return 0; +} + +#endif // wxUSE_DYNLIB_CLASS/!wxUSE_DYNLIB_CLASS + +#endif // !__WXWINCE__ + +#if wxUSE_EXCEPTIONS + +// ---------------------------------------------------------------------------- +// exception handling +// ---------------------------------------------------------------------------- + +bool wxApp::OnExceptionInMainLoop() +{ + // ask the user about what to do: use the Win32 API function here as it + // could be dangerous to use any wxWidgets code in this state + switch ( + ::MessageBox + ( + NULL, + wxT("An unhandled exception occurred. Press \"Abort\" to \ +terminate the program,\r\n\ +\"Retry\" to exit the program normally and \"Ignore\" to try to continue."), + wxT("Unhandled exception"), + MB_ABORTRETRYIGNORE | + MB_ICONERROR| + MB_TASKMODAL + ) + ) + { + case IDABORT: + throw; + + default: + wxFAIL_MSG( wxT("unexpected MessageBox() return code") ); + // fall through + + case IDRETRY: + return false; + + case IDIGNORE: + return true; + } +} + +#endif // wxUSE_EXCEPTIONS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/artmsw.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/artmsw.cpp new file mode 100644 index 0000000000..04885e3d6b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/artmsw.cpp @@ -0,0 +1,301 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/artmsw.cpp +// Purpose: stock wxArtProvider instance with native MSW stock icons +// Author: Vaclav Slavik +// Modified by: +// Created: 2008-10-15 +// Copyright: (c) Vaclav Slavik, 2008 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#if defined(__BORLANDC__) + #pragma hdrstop +#endif + +#include "wx/artprov.h" +#include "wx/image.h" +#include "wx/dynlib.h" +#include "wx/volume.h" +#include "wx/msw/private.h" +#include "wx/msw/wrapwin.h" + +#ifdef SHGSI_ICON + #define wxHAS_SHGetStockIconInfo +#endif + +namespace +{ + +#ifdef wxHAS_SHGetStockIconInfo + +SHSTOCKICONID MSWGetStockIconIdForArtProviderId(const wxArtID& art_id) +{ + // try to find an equivalent MSW stock icon id for wxArtID + if ( art_id == wxART_ERROR) return SIID_ERROR; + else if ( art_id == wxART_QUESTION ) return SIID_HELP; + else if ( art_id == wxART_WARNING ) return SIID_WARNING; + else if ( art_id == wxART_INFORMATION ) return SIID_INFO; + else if ( art_id == wxART_HELP ) return SIID_HELP; + else if ( art_id == wxART_FOLDER ) return SIID_FOLDER; + else if ( art_id == wxART_FOLDER_OPEN ) return SIID_FOLDEROPEN; + else if ( art_id == wxART_DELETE ) return SIID_DELETE; + else if ( art_id == wxART_FIND ) return SIID_FIND; + else if ( art_id == wxART_HARDDISK ) return SIID_DRIVEFIXED; + else if ( art_id == wxART_FLOPPY ) return SIID_DRIVE35; + else if ( art_id == wxART_CDROM ) return SIID_DRIVECD; + else if ( art_id == wxART_REMOVABLE ) return SIID_DRIVEREMOVE; + + return SIID_INVALID; +}; + + +// try to load SHGetStockIconInfo dynamically, so this code runs +// even on pre-Vista Windows versions +HRESULT +MSW_SHGetStockIconInfo(SHSTOCKICONID siid, + UINT uFlags, + SHSTOCKICONINFO *psii) +{ + typedef HRESULT (WINAPI *PSHGETSTOCKICONINFO)(SHSTOCKICONID, UINT, SHSTOCKICONINFO *); + static PSHGETSTOCKICONINFO pSHGetStockIconInfo = (PSHGETSTOCKICONINFO)-1; + + if ( pSHGetStockIconInfo == (PSHGETSTOCKICONINFO)-1 ) + { + wxDynamicLibrary shell32(wxT("shell32.dll")); + + pSHGetStockIconInfo = (PSHGETSTOCKICONINFO)shell32.RawGetSymbol( wxT("SHGetStockIconInfo") ); + } + + if ( !pSHGetStockIconInfo ) + return E_FAIL; + + return pSHGetStockIconInfo(siid, uFlags, psii); +} + +#endif // #ifdef wxHAS_SHGetStockIconInfo + +wxBitmap +MSWGetBitmapForPath(const wxString& path, const wxSize& size, DWORD uFlags = 0) +{ + SHFILEINFO fi; + wxZeroMemory(fi); + + uFlags |= SHGFI_USEFILEATTRIBUTES | SHGFI_ICON; + if ( size != wxDefaultSize ) + { + if ( size.x <= 16 ) + uFlags |= SHGFI_SMALLICON; + else if ( size.x >= 64 ) + uFlags |= SHGFI_LARGEICON; + } + + if ( !SHGetFileInfo(path.t_str(), FILE_ATTRIBUTE_DIRECTORY, + &fi, sizeof(SHFILEINFO), uFlags) ) + return wxNullBitmap; + + wxIcon icon; + icon.CreateFromHICON((WXHICON)fi.hIcon); + + wxBitmap bitmap(icon); + ::DestroyIcon(fi.hIcon); + + return bitmap; +} + +#if wxUSE_FSVOLUME + +wxBitmap +GetDriveBitmapForVolumeType(const wxFSVolumeKind& volKind, const wxSize& size) +{ + // get all volumes and try to find one with a matching type + wxArrayString volumes = wxFSVolume::GetVolumes(); + for ( size_t i = 0; i < volumes.Count(); i++ ) + { + wxFSVolume vol( volumes[i] ); + if ( vol.GetKind() == volKind ) + { + return MSWGetBitmapForPath(volumes[i], size); + } + } + + return wxNullBitmap; +} + +#endif // wxUSE_FSVOLUME + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// wxWindowsArtProvider +// ---------------------------------------------------------------------------- + +class wxWindowsArtProvider : public wxArtProvider +{ +protected: + virtual wxBitmap CreateBitmap(const wxArtID& id, const wxArtClient& client, + const wxSize& size); +}; + +static wxBitmap CreateFromStdIcon(const char *iconName, + const wxArtClient& client) +{ + wxIcon icon(iconName); + wxBitmap bmp; + bmp.CopyFromIcon(icon); + +#if wxUSE_IMAGE + // The standard native message box icons are in message box size (32x32). + // If they are requested in any size other than the default or message + // box size, they must be rescaled first. + if ( client != wxART_MESSAGE_BOX && client != wxART_OTHER ) + { + const wxSize size = wxArtProvider::GetNativeSizeHint(client); + if ( size != wxDefaultSize ) + { + wxImage img = bmp.ConvertToImage(); + img.Rescale(size.x, size.y); + bmp = wxBitmap(img); + } + } +#endif // wxUSE_IMAGE + + return bmp; +} + +wxBitmap wxWindowsArtProvider::CreateBitmap(const wxArtID& id, + const wxArtClient& client, + const wxSize& size) +{ + wxBitmap bitmap; + +#ifdef wxHAS_SHGetStockIconInfo + // first try to use SHGetStockIconInfo, available only on Vista and higher + SHSTOCKICONID stockIconId = MSWGetStockIconIdForArtProviderId( id ); + if ( stockIconId != SIID_INVALID ) + { + WinStruct sii; + + UINT uFlags = SHGSI_ICON; + if ( size != wxDefaultSize ) + { + if ( size.x <= 16 ) + uFlags |= SHGSI_SMALLICON; + else if ( size.x >= 64 ) + uFlags |= SHGSI_LARGEICON; + } + + HRESULT res = MSW_SHGetStockIconInfo(stockIconId, uFlags, &sii); + if ( res == S_OK ) + { + wxIcon icon; + icon.CreateFromHICON( (WXHICON)sii.hIcon ); + + wxBitmap bitmap( icon ); + ::DestroyIcon(sii.hIcon); + + if ( bitmap.IsOk() ) + return bitmap; + } + } +#endif // wxHAS_SHGetStockIconInfo + + +#if wxUSE_FSVOLUME + // now try SHGetFileInfo + wxFSVolumeKind volKind = wxFS_VOL_OTHER; + if ( id == wxART_HARDDISK ) + volKind = wxFS_VOL_DISK; + else if ( id == wxART_FLOPPY ) + volKind = wxFS_VOL_FLOPPY; + else if ( id == wxART_CDROM ) + volKind = wxFS_VOL_CDROM; + + if ( volKind != wxFS_VOL_OTHER ) + { + bitmap = GetDriveBitmapForVolumeType(volKind, size); + if ( bitmap.IsOk() ) + return bitmap; + } +#endif // wxUSE_FSVOLUME + + // notice that the directory used here doesn't need to exist + if ( id == wxART_FOLDER ) + bitmap = MSWGetBitmapForPath("C:\\wxdummydir\\", size ); + else if ( id == wxART_FOLDER_OPEN ) + bitmap = MSWGetBitmapForPath("C:\\wxdummydir\\", size, SHGFI_OPENICON ); + + if ( !bitmap.IsOk() ) + { + // handle message box icons specially (wxIcon ctor treat these names + // as special cases via wxICOResourceHandler::LoadIcon): + const char *name = NULL; + if ( id == wxART_ERROR ) + name = "wxICON_ERROR"; + else if ( id == wxART_INFORMATION ) + name = "wxICON_INFORMATION"; + else if ( id == wxART_WARNING ) + name = "wxICON_WARNING"; + else if ( id == wxART_QUESTION ) + name = "wxICON_QUESTION"; + + if ( name ) + return CreateFromStdIcon(name, client); + } + + // for anything else, fall back to generic provider: + return bitmap; +} + +// ---------------------------------------------------------------------------- +// wxArtProvider::InitNativeProvider() +// ---------------------------------------------------------------------------- + +/*static*/ void wxArtProvider::InitNativeProvider() +{ + PushBack(new wxWindowsArtProvider); +} + +// ---------------------------------------------------------------------------- +// wxArtProvider::GetNativeSizeHint() +// ---------------------------------------------------------------------------- + +/*static*/ +wxSize wxArtProvider::GetNativeSizeHint(const wxArtClient& client) +{ + if ( client == wxART_TOOLBAR ) + { + return wxSize(24, 24); + } + else if ( client == wxART_MENU ) + { + return wxSize(16, 16); + } + else if ( client == wxART_FRAME_ICON ) + { + return wxSize(::GetSystemMetrics(SM_CXSMICON), + ::GetSystemMetrics(SM_CYSMICON)); + } + else if ( client == wxART_CMN_DIALOG || + client == wxART_MESSAGE_BOX ) + { + return wxSize(::GetSystemMetrics(SM_CXICON), + ::GetSystemMetrics(SM_CYICON)); + } + else if (client == wxART_BUTTON) + { + return wxSize(16, 16); + } + else if (client == wxART_LIST) + { + return wxSize(16, 16); + } + + return wxDefaultSize; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/basemsw.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/basemsw.cpp new file mode 100644 index 0000000000..3204e02154 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/basemsw.cpp @@ -0,0 +1,102 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/msw/basemsw.cpp +// Purpose: misc stuff only used in console applications under MSW +// Author: Vadim Zeitlin +// Modified by: +// Created: 22.06.2003 +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/event.h" +#endif //WX_PRECOMP + +#include "wx/apptrait.h" +#include "wx/evtloop.h" +#include "wx/msw/private/timer.h" +// MBN: this is a workaround for MSVC 5: if it is not #included in +// some wxBase file, wxRecursionGuard methods won't be exported from +// wxBase.dll, and MSVC 5 will give linker errors +#include "wx/recguard.h" + +#include "wx/crt.h" +#include "wx/msw/private.h" + +// ============================================================================ +// wxAppTraits implementation +// ============================================================================ + +#if wxUSE_THREADS +WXDWORD wxAppTraits::DoSimpleWaitForThread(WXHANDLE hThread) +{ + return ::WaitForSingleObject((HANDLE)hThread, INFINITE); +} +#endif // wxUSE_THREADS + +// ============================================================================ +// wxConsoleAppTraits implementation +// ============================================================================ + +void *wxConsoleAppTraits::BeforeChildWaitLoop() +{ + // nothing to do here + return NULL; +} + +void wxConsoleAppTraits::AfterChildWaitLoop(void * WXUNUSED(data)) +{ + // nothing to do here +} + +#if wxUSE_THREADS +bool wxConsoleAppTraits::DoMessageFromThreadWait() +{ + // nothing to process here + return true; +} + +WXDWORD wxConsoleAppTraits::WaitForThread(WXHANDLE hThread, int WXUNUSED(flags)) +{ + return DoSimpleWaitForThread(hThread); +} +#endif // wxUSE_THREADS + +#if wxUSE_TIMER + +wxTimerImpl *wxConsoleAppTraits::CreateTimerImpl(wxTimer *timer) +{ + return new wxMSWTimerImpl(timer); +} + +#endif // wxUSE_TIMER + +wxEventLoopBase *wxConsoleAppTraits::CreateEventLoop() +{ +#if wxUSE_CONSOLE_EVENTLOOP + return new wxEventLoop(); +#else // !wxUSE_CONSOLE_EVENTLOOP + return NULL; +#endif // wxUSE_CONSOLE_EVENTLOOP/!wxUSE_CONSOLE_EVENTLOOP +} + + +bool wxConsoleAppTraits::WriteToStderr(const wxString& text) +{ + return wxFprintf(stderr, "%s", text) != -1; +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/bitmap.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/bitmap.cpp new file mode 100644 index 0000000000..a58283f8c1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/bitmap.cpp @@ -0,0 +1,1843 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: src/msw/bitmap.cpp +// Purpose: wxBitmap +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/bitmap.h" + +#ifndef WX_PRECOMP + #include + + #include "wx/list.h" + #include "wx/utils.h" + #include "wx/app.h" + #include "wx/palette.h" + #include "wx/dcmemory.h" + #include "wx/icon.h" + #include "wx/log.h" + #include "wx/image.h" +#endif + +#include "wx/scopedptr.h" +#include "wx/msw/private.h" +#include "wx/msw/dc.h" + +#if wxUSE_WXDIB + #include "wx/msw/dib.h" +#endif + +#ifdef wxHAS_RAW_BITMAP + #include "wx/rawbmp.h" +#endif + +// missing from mingw32 header +#ifndef CLR_INVALID + #define CLR_INVALID ((COLORREF)-1) +#endif // no CLR_INVALID + +// ---------------------------------------------------------------------------- +// wxBitmapRefData +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxBitmapRefData : public wxGDIImageRefData +{ +public: + wxBitmapRefData() { Init(); } + wxBitmapRefData(const wxBitmapRefData& data); + virtual ~wxBitmapRefData() { Free(); } + + virtual void Free(); + + // Creates a new bitmap (DDB or DIB) from the contents of the given DIB. + void CopyFromDIB(const wxDIB& dib); + +#if wxUSE_WXDIB + // Takes ownership of the given DIB. + bool AssignDIB(wxDIB& dib); +#endif // wxUSE_WXDIB + + + // set the mask object to use as the mask, we take ownership of it + void SetMask(wxMask *mask) + { + delete m_bitmapMask; + m_bitmapMask = mask; + } + + // set the HBITMAP to use as the mask + void SetMask(HBITMAP hbmpMask) + { + SetMask(new wxMask((WXHBITMAP)hbmpMask)); + } + + // return the mask + wxMask *GetMask() const { return m_bitmapMask; } + +public: +#if wxUSE_PALETTE + wxPalette m_bitmapPalette; +#endif // wxUSE_PALETTE + + // MSW-specific + // ------------ + +#if wxDEBUG_LEVEL + // this field is solely for error checking: we detect selecting a bitmap + // into more than one DC at once or deleting a bitmap still selected into a + // DC (both are serious programming errors under Windows) + wxDC *m_selectedInto; +#endif // wxDEBUG_LEVEL + +#if wxUSE_WXDIB + // when GetRawData() is called for a DDB we need to convert it to a DIB + // first to be able to provide direct access to it and we cache that DIB + // here and convert it back to DDB when UngetRawData() is called + wxDIB *m_dib; +#endif + + // true if we have alpha transparency info and can be drawn using + // AlphaBlend() + bool m_hasAlpha; + + // true if our HBITMAP is a DIB section, false if it is a DDB + bool m_isDIB; + +private: + void Init(); + + // Initialize using the given DIB but use (and take ownership of) the + // bitmap handle if it is valid, assuming it's a DDB. If it's not valid, + // use the DIB handle itself taking ownership of it (i.e. wxDIB will become + // invalid when this function returns even though we take it as const + // reference because this is how it's passed to us). + void InitFromDIB(const wxDIB& dib, HBITMAP hbitmap = NULL); + + + // optional mask for transparent drawing + wxMask *m_bitmapMask; + + + // not implemented + wxBitmapRefData& operator=(const wxBitmapRefData&); +}; + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject) +IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) + +IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// helper functions +// ---------------------------------------------------------------------------- + +// decide whether we should create a DIB or a DDB for the given parameters +// +// NB: we always use DIBs under Windows CE as this is much simpler (even if +// also less efficient...) and we obviously can't use them if there is no +// DIB support compiled in at all +#ifdef __WXWINCE__ + static inline bool wxShouldCreateDIB(int, int, int, WXHDC) { return true; } + + #define ALWAYS_USE_DIB +#elif !wxUSE_WXDIB + // no sense in defining wxShouldCreateDIB() as we can't compile code + // executed if it is true, so we have to use #if's anyhow + #define NEVER_USE_DIB +#else // wxUSE_WXDIB && !__WXWINCE__ + static inline bool wxShouldCreateDIB(int w, int h, int d, WXHDC hdc) + { + // here is the logic: + // + // (a) if hdc is specified, the caller explicitly wants DDB + // (b) otherwise, create a DIB if depth >= 24 (we don't support 16bpp + // or less DIBs anyhow) + // (c) finally, create DIBs under Win9x even if the depth hasn't been + // explicitly specified but the current display depth is 24 or + // more and the image is "big", i.e. > 16Mb which is the + // theoretical limit for DDBs under Win9x + // + // consequences (all of which seem to make sense): + // + // (i) by default, DDBs are created (depth == -1 usually) + // (ii) DIBs can be created by explicitly specifying the depth + // (iii) using a DC always forces creating a DDB + return !hdc && + (d >= 24 || + (d == -1 && + wxDIB::GetLineSize(w, wxDisplayDepth())*h > 16*1024*1024)); + } + + #define SOMETIMES_USE_DIB +#endif // different DIB usage scenarious + +// ---------------------------------------------------------------------------- +// wxBitmapRefData +// ---------------------------------------------------------------------------- + +void wxBitmapRefData::Init() +{ +#if wxDEBUG_LEVEL + m_selectedInto = NULL; +#endif + m_bitmapMask = NULL; + + m_hBitmap = (WXHBITMAP) NULL; +#if wxUSE_WXDIB + m_dib = NULL; +#endif + + m_isDIB = + m_hasAlpha = false; +} + +wxBitmapRefData::wxBitmapRefData(const wxBitmapRefData& data) + : wxGDIImageRefData(data) +{ + Init(); + + // (deep) copy the mask if present + if (data.m_bitmapMask) + m_bitmapMask = new wxMask(*data.m_bitmapMask); + + wxASSERT_MSG( !data.m_dib, + wxT("can't copy bitmap locked for raw access!") ); + + m_hasAlpha = data.m_hasAlpha; + +#if wxUSE_WXDIB + // copy the other bitmap + if ( data.m_hBitmap ) + { + wxDIB dib((HBITMAP)(data.m_hBitmap)); + CopyFromDIB(dib); + } +#endif // wxUSE_WXDIB +} + +void wxBitmapRefData::Free() +{ + wxASSERT_MSG( !m_selectedInto, + wxT("deleting bitmap still selected into wxMemoryDC") ); + +#if wxUSE_WXDIB + wxASSERT_MSG( !m_dib, wxT("forgot to call wxBitmap::UngetRawData()!") ); +#endif + + if ( m_hBitmap) + { + if ( !::DeleteObject((HBITMAP)m_hBitmap) ) + { + wxLogLastError(wxT("DeleteObject(hbitmap)")); + } + } + + wxDELETE(m_bitmapMask); +} + +void wxBitmapRefData::InitFromDIB(const wxDIB& dib, HBITMAP hbitmap) +{ + m_width = dib.GetWidth(); + m_height = dib.GetHeight(); + m_depth = dib.GetDepth(); + +#if wxUSE_PALETTE + wxPalette *palette = dib.CreatePalette(); + if ( palette ) + m_bitmapPalette = *palette; + delete palette; +#endif // wxUSE_PALETTE + + if ( hbitmap ) + { + // We assume it's a DDB, otherwise there would be no point in passing + // it to us in addition to the DIB. + m_isDIB = false; + } + else // No valid DDB provided + { + // Just use DIB itself. + m_isDIB = true; + + // Notice that we must not try to use the DIB after calling Detach() on + // it, e.g. this must be done after calling CreatePalette() above. + hbitmap = const_cast(dib).Detach(); + } + + // In any case, take ownership of this bitmap. + m_hBitmap = (WXHBITMAP)hbitmap; +} + +void wxBitmapRefData::CopyFromDIB(const wxDIB& dib) +{ + wxCHECK_RET( !IsOk(), "bitmap already initialized" ); + wxCHECK_RET( dib.IsOk(), wxT("invalid DIB in CopyFromDIB") ); + + HBITMAP hbitmap; +#ifdef SOMETIMES_USE_DIB + hbitmap = dib.CreateDDB(); +#else // ALWAYS_USE_DIB + hbitmap = NULL; +#endif // SOMETIMES_USE_DIB/ALWAYS_USE_DIB + + InitFromDIB(dib, hbitmap); +} + +#if wxUSE_WXDIB + +bool wxBitmapRefData::AssignDIB(wxDIB& dib) +{ + if ( !dib.IsOk() ) + return false; + + Free(); + InitFromDIB(dib); + + return true; +} + +#endif // wxUSE_WXDIB + +// ---------------------------------------------------------------------------- +// wxBitmap creation +// ---------------------------------------------------------------------------- + +wxGDIImageRefData *wxBitmap::CreateData() const +{ + return new wxBitmapRefData; +} + +wxGDIRefData *wxBitmap::CloneGDIRefData(const wxGDIRefData *data) const +{ + return new wxBitmapRefData(*static_cast(data)); +} + +bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon, + wxBitmapTransparency transp) +{ +#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) + // it may be either HICON or HCURSOR + HICON hicon = (HICON)icon.GetHandle(); + + ICONINFO iconInfo; + if ( !::GetIconInfo(hicon, &iconInfo) ) + { + wxLogLastError(wxT("GetIconInfo")); + + return false; + } + + wxBitmapRefData *refData = new wxBitmapRefData; + m_refData = refData; + + int w = icon.GetWidth(), + h = icon.GetHeight(); + + refData->m_width = w; + refData->m_height = h; + refData->m_depth = wxDisplayDepth(); + + refData->m_hBitmap = (WXHBITMAP)iconInfo.hbmColor; + + switch ( transp ) + { + default: + wxFAIL_MSG( wxT("unknown wxBitmapTransparency value") ); + + case wxBitmapTransparency_None: + // nothing to do, refData->m_hasAlpha is false by default + break; + + case wxBitmapTransparency_Auto: +#if wxUSE_WXDIB + // If the icon is 32 bits per pixel then it may have alpha channel + // data, although there are some icons that are 32 bpp but have no + // alpha... So convert to a DIB and manually check the 4th byte for + // each pixel. + { + BITMAP bm; + if ( ::GetObject(iconInfo.hbmColor, sizeof(bm), &bm) && + (bm.bmBitsPixel == 32) ) + { + wxDIB dib(iconInfo.hbmColor); + if (dib.IsOk()) + { + unsigned char* const pixels = dib.GetData(); + int idx; + for ( idx = 0; idx < w*h*4; idx += 4 ) + { + if (pixels[idx+3] != 0) + { + // If there is an alpha byte that is non-zero + // then set the alpha flag and stop checking + refData->m_hasAlpha = true; + break; + } + } + + if ( refData->m_hasAlpha ) + { + // If we do have alpha, ensure we use premultiplied + // data for our pixels as this is what the bitmaps + // created in other ways do and this is necessary + // for e.g. AlphaBlend() to work with this bitmap. + for ( idx = 0; idx < w*h*4; idx += 4 ) + { + const unsigned char a = pixels[idx+3]; + + pixels[idx] = ((pixels[idx] *a) + 127)/255; + pixels[idx+1] = ((pixels[idx+1]*a) + 127)/255; + pixels[idx+2] = ((pixels[idx+2]*a) + 127)/255; + } + + ::DeleteObject(refData->m_hBitmap); + refData->m_hBitmap = dib.Detach(); + } + } + } + } + break; +#endif // wxUSE_WXDIB + + case wxBitmapTransparency_Always: + refData->m_hasAlpha = true; + break; + } + + if ( !refData->m_hasAlpha ) + { + // the mask returned by GetIconInfo() is inverted compared to the usual + // wxWin convention + refData->SetMask(wxInvertMask(iconInfo.hbmMask, w, h)); + } + + // delete the old one now as we don't need it any more + ::DeleteObject(iconInfo.hbmMask); + + return true; +#else // __WXMICROWIN__ || __WXWINCE__ + wxUnusedVar(icon); + wxUnusedVar(transp); + + return false; +#endif // !__WXWINCE__/__WXWINCE__ +} + +bool wxBitmap::CopyFromCursor(const wxCursor& cursor, wxBitmapTransparency transp) +{ + UnRef(); + + if ( !cursor.IsOk() ) + return false; + + return CopyFromIconOrCursor(cursor, transp); +} + +bool wxBitmap::CopyFromIcon(const wxIcon& icon, wxBitmapTransparency transp) +{ + UnRef(); + + if ( !icon.IsOk() ) + return false; + + return CopyFromIconOrCursor(icon, transp); +} + +#if wxUSE_WXDIB + +bool wxBitmap::CopyFromDIB(const wxDIB& dib) +{ + wxScopedPtr newData(new wxBitmapRefData); + newData->CopyFromDIB(dib); + if ( !newData->IsOk() ) + return false; + + UnRef(); + m_refData = newData.release(); + return true; +} + +bool wxBitmap::IsDIB() const +{ + return GetBitmapData() && GetBitmapData()->m_isDIB; +} + +bool wxBitmap::ConvertToDIB() +{ + if ( IsDIB() ) + return true; + + wxDIB dib(*this); + if ( !dib.IsOk() ) + return false; + + // It is important to reuse the current GetBitmapData() instead of creating + // a new one, as our object identity shouldn't change just because our + // internal representation did, but IsSameAs() compares data pointers. + return GetBitmapData()->AssignDIB(dib); +} + +#endif // wxUSE_WXDIB + +wxBitmap::~wxBitmap() +{ +} + +wxBitmap::wxBitmap(const char bits[], int width, int height, int depth) +{ +#ifndef __WXMICROWIN__ + wxBitmapRefData *refData = new wxBitmapRefData; + m_refData = refData; + + refData->m_width = width; + refData->m_height = height; + refData->m_depth = depth; + + char *data; + if ( depth == 1 ) + { + // we assume that it is in XBM format which is not quite the same as + // the format CreateBitmap() wants because the order of bytes in the + // line is reversed! + const size_t bytesPerLine = (width + 7) / 8; + const size_t padding = bytesPerLine % 2; + const size_t len = height * ( padding + bytesPerLine ); + data = (char *)malloc(len); + const char *src = bits; + char *dst = data; + + for ( int rows = 0; rows < height; rows++ ) + { + for ( size_t cols = 0; cols < bytesPerLine; cols++ ) + { + unsigned char val = *src++; + unsigned char reversed = 0; + + for ( int bits = 0; bits < 8; bits++) + { + reversed <<= 1; + reversed |= (unsigned char)(val & 0x01); + val >>= 1; + } + *dst++ = ~reversed; + } + + if ( padding ) + *dst++ = 0; + } + } + else + { + // bits should already be in Windows standard format + data = const_cast(bits); + } + + HBITMAP hbmp = ::CreateBitmap(width, height, 1, depth, data); + if ( !hbmp ) + { + wxLogLastError(wxT("CreateBitmap")); + } + + if ( data != bits ) + { + free(data); + } + + SetHBITMAP((WXHBITMAP)hbmp); +#endif +} + +wxBitmap::wxBitmap(int w, int h, const wxDC& dc) +{ + (void)Create(w, h, dc); +} + +wxBitmap::wxBitmap(const void* data, wxBitmapType type, int width, int height, int depth) +{ + (void)Create(data, type, width, height, depth); +} + +wxBitmap::wxBitmap(const wxString& filename, wxBitmapType type) +{ + LoadFile(filename, type); +} + +bool wxBitmap::Create(int width, int height, int depth) +{ + return DoCreate(width, height, depth, 0); +} + +bool wxBitmap::Create(int width, int height, const wxDC& dc) +{ + wxCHECK_MSG( dc.IsOk(), false, wxT("invalid HDC in wxBitmap::Create()") ); + + const wxMSWDCImpl *impl = wxDynamicCast( dc.GetImpl(), wxMSWDCImpl ); + + if (impl) + return DoCreate(width, height, -1, impl->GetHDC()); + else + return false; +} + +bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc) +{ + UnRef(); + + m_refData = new wxBitmapRefData; + + GetBitmapData()->m_width = w; + GetBitmapData()->m_height = h; + + HBITMAP hbmp wxDUMMY_INITIALIZE(0); + +#ifndef NEVER_USE_DIB + if ( wxShouldCreateDIB(w, h, d, hdc) ) + { + if ( d == -1 ) + { + // create DIBs without alpha channel by default + d = 24; + } + + wxDIB dib(w, h, d); + if ( !dib.IsOk() ) + return false; + + // don't delete the DIB section in dib object dtor + hbmp = dib.Detach(); + + GetBitmapData()->m_isDIB = true; + GetBitmapData()->m_depth = d; + } + else // create a DDB +#endif // NEVER_USE_DIB + { +#ifndef ALWAYS_USE_DIB +#ifndef __WXMICROWIN__ + if ( d > 0 ) + { + hbmp = ::CreateBitmap(w, h, 1, d, NULL); + if ( !hbmp ) + { + wxLogLastError(wxT("CreateBitmap")); + } + + GetBitmapData()->m_depth = d; + } + else // d == 0, create bitmap compatible with the screen +#endif // !__WXMICROWIN__ + { + ScreenHDC dc; + hbmp = ::CreateCompatibleBitmap(dc, w, h); + if ( !hbmp ) + { + wxLogLastError(wxT("CreateCompatibleBitmap")); + } + + GetBitmapData()->m_depth = wxDisplayDepth(); + } +#endif // !ALWAYS_USE_DIB + } + + SetHBITMAP((WXHBITMAP)hbmp); + + return IsOk(); +} + +#if wxUSE_IMAGE + +// ---------------------------------------------------------------------------- +// wxImage to/from conversions for Microwin +// ---------------------------------------------------------------------------- + +// Microwin versions are so different from normal ones that it really doesn't +// make sense to use #ifdefs inside the function bodies +#ifdef __WXMICROWIN__ + +bool wxBitmap::CreateFromImage(const wxImage& image, int depth, const wxDC& dc) +{ + // Set this to 1 to experiment with mask code, + // which currently doesn't work + #define USE_MASKS 0 + + m_refData = new wxBitmapRefData(); + + // Initial attempt at a simple-minded implementation. + // The bitmap will always be created at the screen depth, + // so the 'depth' argument is ignored. + + HDC hScreenDC = ::GetDC(NULL); + int screenDepth = ::GetDeviceCaps(hScreenDC, BITSPIXEL); + + HBITMAP hBitmap = ::CreateCompatibleBitmap(hScreenDC, image.GetWidth(), image.GetHeight()); + HBITMAP hMaskBitmap = NULL; + HBITMAP hOldMaskBitmap = NULL; + HDC hMaskDC = NULL; + unsigned char maskR = 0; + unsigned char maskG = 0; + unsigned char maskB = 0; + + // printf("Created bitmap %d\n", (int) hBitmap); + if (hBitmap == NULL) + { + ::ReleaseDC(NULL, hScreenDC); + return false; + } + HDC hMemDC = ::CreateCompatibleDC(hScreenDC); + + HBITMAP hOldBitmap = ::SelectObject(hMemDC, hBitmap); + ::ReleaseDC(NULL, hScreenDC); + + // created an mono-bitmap for the possible mask + bool hasMask = image.HasMask(); + + if ( hasMask ) + { +#if USE_MASKS + // FIXME: we should be able to pass bpp = 1, but + // GdBlit can't handle a different depth +#if 0 + hMaskBitmap = ::CreateBitmap( (WORD)image.GetWidth(), (WORD)image.GetHeight(), 1, 1, NULL ); +#else + hMaskBitmap = ::CreateCompatibleBitmap( hMemDC, (WORD)image.GetWidth(), (WORD)image.GetHeight()); +#endif + maskR = image.GetMaskRed(); + maskG = image.GetMaskGreen(); + maskB = image.GetMaskBlue(); + + if (!hMaskBitmap) + { + hasMask = false; + } + else + { + hScreenDC = ::GetDC(NULL); + hMaskDC = ::CreateCompatibleDC(hScreenDC); + ::ReleaseDC(NULL, hScreenDC); + + hOldMaskBitmap = ::SelectObject( hMaskDC, hMaskBitmap); + } +#else + hasMask = false; +#endif + } + + int i, j; + for (i = 0; i < image.GetWidth(); i++) + { + for (j = 0; j < image.GetHeight(); j++) + { + unsigned char red = image.GetRed(i, j); + unsigned char green = image.GetGreen(i, j); + unsigned char blue = image.GetBlue(i, j); + + ::SetPixel(hMemDC, i, j, PALETTERGB(red, green, blue)); + + if (hasMask) + { + // scan the bitmap for the transparent colour and set the corresponding + // pixels in the mask to BLACK and the rest to WHITE + if (maskR == red && maskG == green && maskB == blue) + ::SetPixel(hMaskDC, i, j, PALETTERGB(0, 0, 0)); + else + ::SetPixel(hMaskDC, i, j, PALETTERGB(255, 255, 255)); + } + } + } + + ::SelectObject(hMemDC, hOldBitmap); + ::DeleteDC(hMemDC); + if (hasMask) + { + ::SelectObject(hMaskDC, hOldMaskBitmap); + ::DeleteDC(hMaskDC); + + ((wxBitmapRefData*)m_refData)->SetMask(hMaskBitmap); + } + + SetWidth(image.GetWidth()); + SetHeight(image.GetHeight()); + SetDepth(screenDepth); + SetHBITMAP( (WXHBITMAP) hBitmap ); + +#if wxUSE_PALETTE + // Copy the palette from the source image + SetPalette(image.GetPalette()); +#endif // wxUSE_PALETTE + + return true; +} + +wxImage wxBitmap::ConvertToImage() const +{ + // Initial attempt at a simple-minded implementation. + // The bitmap will always be created at the screen depth, + // so the 'depth' argument is ignored. + // TODO: transparency (create a mask image) + + if (!IsOk()) + { + wxFAIL_MSG( wxT("bitmap is invalid") ); + return wxNullImage; + } + + wxImage image; + + wxCHECK_MSG( IsOk(), wxNullImage, wxT("invalid bitmap") ); + + // create an wxImage object + int width = GetWidth(); + int height = GetHeight(); + image.Create( width, height ); + unsigned char *data = image.GetData(); + if( !data ) + { + wxFAIL_MSG( wxT("could not allocate data for image") ); + return wxNullImage; + } + + HDC hScreenDC = ::GetDC(NULL); + + HDC hMemDC = ::CreateCompatibleDC(hScreenDC); + ::ReleaseDC(NULL, hScreenDC); + + HBITMAP hBitmap = (HBITMAP) GetHBITMAP(); + + HBITMAP hOldBitmap = ::SelectObject(hMemDC, hBitmap); + + int i, j; + for (i = 0; i < GetWidth(); i++) + { + for (j = 0; j < GetHeight(); j++) + { + COLORREF color = ::GetPixel(hMemDC, i, j); + unsigned char red = GetRValue(color); + unsigned char green = GetGValue(color); + unsigned char blue = GetBValue(color); + + image.SetRGB(i, j, red, green, blue); + } + } + + ::SelectObject(hMemDC, hOldBitmap); + ::DeleteDC(hMemDC); + +#if wxUSE_PALETTE + // Copy the palette from the source image + if (GetPalette()) + image.SetPalette(* GetPalette()); +#endif // wxUSE_PALETTE + + return image; +} + +#endif // __WXMICROWIN__ + +// ---------------------------------------------------------------------------- +// wxImage to/from conversions +// ---------------------------------------------------------------------------- + +bool wxBitmap::CreateFromImage(const wxImage& image, int depth) +{ + return CreateFromImage(image, depth, 0); +} + +bool wxBitmap::CreateFromImage(const wxImage& image, const wxDC& dc) +{ + wxCHECK_MSG( dc.IsOk(), false, + wxT("invalid HDC in wxBitmap::CreateFromImage()") ); + + const wxMSWDCImpl *impl = wxDynamicCast( dc.GetImpl(), wxMSWDCImpl ); + + if (impl) + return CreateFromImage(image, -1, impl->GetHDC()); + else + return false; +} + +#if wxUSE_WXDIB + +bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc) +{ + wxCHECK_MSG( image.IsOk(), false, wxT("invalid image") ); + + UnRef(); + + // first convert the image to DIB + const int h = image.GetHeight(); + const int w = image.GetWidth(); + + wxDIB dib(image); + if ( !dib.IsOk() ) + return false; + + const bool hasAlpha = image.HasAlpha(); + + if (depth == -1) + depth = dib.GetDepth(); + + // store the bitmap parameters + wxBitmapRefData * const refData = new wxBitmapRefData; + refData->m_width = w; + refData->m_height = h; + refData->m_hasAlpha = hasAlpha; + refData->m_depth = depth; + + m_refData = refData; + + + // next either store DIB as is or create a DDB from it + HBITMAP hbitmap wxDUMMY_INITIALIZE(0); + + // are we going to use DIB? + // + // NB: DDBs don't support alpha so if we have alpha channel we must use DIB + if ( hasAlpha || wxShouldCreateDIB(w, h, depth, hdc) ) + { + // don't delete the DIB section in dib object dtor + hbitmap = dib.Detach(); + + refData->m_isDIB = true; + } +#ifndef ALWAYS_USE_DIB + else // we need to convert DIB to DDB + { + hbitmap = dib.CreateDDB((HDC)hdc); + } +#endif // !ALWAYS_USE_DIB + + // validate this object + SetHBITMAP((WXHBITMAP)hbitmap); + + // finally also set the mask if we have one + if ( image.HasMask() ) + { + const size_t len = 2*((w+15)/16); + BYTE *src = image.GetData(); + BYTE *data = new BYTE[h*len]; + memset(data, 0, h*len); + BYTE r = image.GetMaskRed(), + g = image.GetMaskGreen(), + b = image.GetMaskBlue(); + BYTE *dst = data; + for ( int y = 0; y < h; y++, dst += len ) + { + BYTE *dstLine = dst; + BYTE mask = 0x80; + for ( int x = 0; x < w; x++, src += 3 ) + { + if (src[0] != r || src[1] != g || src[2] != b) + *dstLine |= mask; + + if ( (mask >>= 1) == 0 ) + { + dstLine++; + mask = 0x80; + } + } + } + + hbitmap = ::CreateBitmap(w, h, 1, 1, data); + if ( !hbitmap ) + { + wxLogLastError(wxT("CreateBitmap(mask)")); + } + else + { + SetMask(new wxMask((WXHBITMAP)hbitmap)); + } + + delete[] data; + } + + return true; +} + +wxImage wxBitmap::ConvertToImage() const +{ + // convert DDB to DIB + wxDIB dib(*this); + + if ( !dib.IsOk() ) + { + return wxNullImage; + } + + // and then DIB to our wxImage + wxImage image = dib.ConvertToImage(); + if ( !image.IsOk() ) + { + return wxNullImage; + } + + // now do the same for the mask, if we have any + HBITMAP hbmpMask = GetMask() ? (HBITMAP) GetMask()->GetMaskBitmap() : NULL; + if ( hbmpMask ) + { + wxDIB dibMask(hbmpMask); + if ( dibMask.IsOk() ) + { + // TODO: use wxRawBitmap to iterate over DIB + + // we hard code the mask colour for now but we could also make an + // effort (and waste time) to choose a colour not present in the + // image already to avoid having to fudge the pixels below -- + // whether it's worth to do it is unclear however + static const int MASK_RED = 1; + static const int MASK_GREEN = 2; + static const int MASK_BLUE = 3; + static const int MASK_BLUE_REPLACEMENT = 2; + + const int h = dibMask.GetHeight(); + const int w = dibMask.GetWidth(); + const int bpp = dibMask.GetDepth(); + const int maskBytesPerPixel = bpp >> 3; + const int maskBytesPerLine = wxDIB::GetLineSize(w, bpp); + unsigned char *data = image.GetData(); + + // remember that DIBs are stored in bottom to top order + unsigned char * + maskLineStart = dibMask.GetData() + ((h - 1) * maskBytesPerLine); + + for ( int y = 0; y < h; y++, maskLineStart -= maskBytesPerLine ) + { + // traverse one mask DIB line + unsigned char *mask = maskLineStart; + for ( int x = 0; x < w; x++, mask += maskBytesPerPixel ) + { + // should this pixel be transparent? + if ( *mask ) + { + // no, check that it isn't transparent by accident + if ( (data[0] == MASK_RED) && + (data[1] == MASK_GREEN) && + (data[2] == MASK_BLUE) ) + { + // we have to fudge the colour a bit to prevent + // this pixel from appearing transparent + data[2] = MASK_BLUE_REPLACEMENT; + } + + data += 3; + } + else // yes, transparent pixel + { + *data++ = MASK_RED; + *data++ = MASK_GREEN; + *data++ = MASK_BLUE; + } + } + } + + image.SetMaskColour(MASK_RED, MASK_GREEN, MASK_BLUE); + } + } + + return image; +} + +#else // !wxUSE_WXDIB + +bool +wxBitmap::CreateFromImage(const wxImage& WXUNUSED(image), + int WXUNUSED(depth), + WXHDC WXUNUSED(hdc)) +{ + return false; +} + +wxImage wxBitmap::ConvertToImage() const +{ + return wxImage(); +} + +#endif // wxUSE_WXDIB/!wxUSE_WXDIB + +#endif // wxUSE_IMAGE + +// ---------------------------------------------------------------------------- +// loading and saving bitmaps +// ---------------------------------------------------------------------------- + +bool wxBitmap::LoadFile(const wxString& filename, wxBitmapType type) +{ + UnRef(); + + wxBitmapHandler *handler = wxDynamicCast(FindHandler(type), wxBitmapHandler); + + if ( handler ) + { + m_refData = new wxBitmapRefData; + + return handler->LoadFile(this, filename, type, -1, -1); + } +#if wxUSE_IMAGE && wxUSE_WXDIB + else // no bitmap handler found + { + wxImage image; + if ( image.LoadFile( filename, type ) && image.IsOk() ) + { + *this = wxBitmap(image); + + return true; + } + } +#endif // wxUSE_IMAGE + + return false; +} + +bool wxBitmap::Create(const void* data, wxBitmapType type, int width, int height, int depth) +{ + UnRef(); + + wxBitmapHandler *handler = wxDynamicCast(FindHandler(type), wxBitmapHandler); + + if ( !handler ) + { + wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %ld defined."), type); + + return false; + } + + m_refData = new wxBitmapRefData; + + return handler->Create(this, data, type, width, height, depth); +} + +bool wxBitmap::SaveFile(const wxString& filename, + wxBitmapType type, + const wxPalette *palette) const +{ + wxBitmapHandler *handler = wxDynamicCast(FindHandler(type), wxBitmapHandler); + + if ( handler ) + { + return handler->SaveFile(this, filename, type, palette); + } +#if wxUSE_IMAGE && wxUSE_WXDIB + else // no bitmap handler found + { + // FIXME what about palette? shouldn't we use it? + wxImage image = ConvertToImage(); + if ( image.IsOk() ) + { + return image.SaveFile(filename, type); + } + } +#endif // wxUSE_IMAGE + + return false; +} + +// ---------------------------------------------------------------------------- +// sub bitmap extraction +// ---------------------------------------------------------------------------- +wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect ) const +{ + MemoryHDC dcSrc; + SelectInHDC selectSrc(dcSrc, GetHbitmap()); + return GetSubBitmapOfHDC( rect, (WXHDC)dcSrc ); +} + +wxBitmap wxBitmap::GetSubBitmapOfHDC( const wxRect& rect, WXHDC hdc ) const +{ + wxCHECK_MSG( IsOk() && + (rect.x >= 0) && (rect.y >= 0) && + (rect.x+rect.width <= GetWidth()) && + (rect.y+rect.height <= GetHeight()), + wxNullBitmap, wxT("Invalid bitmap or bitmap region") ); + + wxBitmap ret( rect.width, rect.height, GetDepth() ); + wxASSERT_MSG( ret.IsOk(), wxT("GetSubBitmap error") ); + +#ifndef __WXMICROWIN__ + // handle alpha channel, if any + if (HasAlpha()) + ret.UseAlpha(); + + // copy bitmap data + MemoryHDC dcSrc, + dcDst; + + { + SelectInHDC selectDst(dcDst, GetHbitmapOf(ret)); + + if ( !selectDst ) + { + wxLogLastError(wxT("SelectObject(destBitmap)")); + } + + if ( !::BitBlt(dcDst, 0, 0, rect.width, rect.height, + (HDC)hdc, rect.x, rect.y, SRCCOPY) ) + { + wxLogLastError(wxT("BitBlt")); + } + } + + // copy mask if there is one + if ( GetMask() ) + { + HBITMAP hbmpMask = ::CreateBitmap(rect.width, rect.height, 1, 1, 0); + + SelectInHDC selectSrc(dcSrc, (HBITMAP) GetMask()->GetMaskBitmap()), + selectDst(dcDst, hbmpMask); + + if ( !::BitBlt(dcDst, 0, 0, rect.width, rect.height, + dcSrc, rect.x, rect.y, SRCCOPY) ) + { + wxLogLastError(wxT("BitBlt")); + } + + wxMask *mask = new wxMask((WXHBITMAP) hbmpMask); + ret.SetMask(mask); + } +#endif // !__WXMICROWIN__ + + return ret; +} + +// ---------------------------------------------------------------------------- +// wxBitmap accessors +// ---------------------------------------------------------------------------- + +#if wxUSE_PALETTE +wxPalette* wxBitmap::GetPalette() const +{ + return GetBitmapData() ? &GetBitmapData()->m_bitmapPalette + : NULL; +} +#endif + +wxMask *wxBitmap::GetMask() const +{ + return GetBitmapData() ? GetBitmapData()->GetMask() : NULL; +} + +wxDC *wxBitmap::GetSelectedInto() const +{ +#if wxDEBUG_LEVEL + return GetBitmapData() ? GetBitmapData()->m_selectedInto : NULL; +#else + return NULL; +#endif +} + +void wxBitmap::UseAlpha() +{ + if ( GetBitmapData() ) + GetBitmapData()->m_hasAlpha = true; +} + +void wxBitmap::ResetAlpha() +{ + if ( GetBitmapData() ) + GetBitmapData()->m_hasAlpha = false; +} + +bool wxBitmap::HasAlpha() const +{ + return GetBitmapData() && GetBitmapData()->m_hasAlpha; +} + +// ---------------------------------------------------------------------------- +// wxBitmap setters +// ---------------------------------------------------------------------------- + +void wxBitmap::SetSelectedInto(wxDC *dc) +{ +#if wxDEBUG_LEVEL + if ( GetBitmapData() ) + GetBitmapData()->m_selectedInto = dc; +#else + wxUnusedVar(dc); +#endif +} + +#if wxUSE_PALETTE + +void wxBitmap::SetPalette(const wxPalette& palette) +{ + AllocExclusive(); + + GetBitmapData()->m_bitmapPalette = palette; +} + +#endif // wxUSE_PALETTE + +void wxBitmap::SetMask(wxMask *mask) +{ + AllocExclusive(); + + GetBitmapData()->SetMask(mask); +} + +// ---------------------------------------------------------------------------- +// raw bitmap access support +// ---------------------------------------------------------------------------- + +#ifdef wxHAS_RAW_BITMAP + +void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp) +{ +#if wxUSE_WXDIB + if ( !IsOk() ) + { + // no bitmap, no data (raw or otherwise) + return NULL; + } + + // if we're already a DIB we can access our data directly, but if not we + // need to convert this DDB to a DIB section and use it for raw access and + // then convert it back + HBITMAP hDIB; + if ( !GetBitmapData()->m_isDIB ) + { + wxCHECK_MSG( !GetBitmapData()->m_dib, NULL, + wxT("GetRawData() may be called only once") ); + + wxDIB *dib = new wxDIB(*this); + if ( !dib->IsOk() ) + { + delete dib; + + return NULL; + } + + // we'll free it in UngetRawData() + GetBitmapData()->m_dib = dib; + + hDIB = dib->GetHandle(); + } + else // we're a DIB + { + hDIB = GetHbitmap(); + } + + DIBSECTION ds; + if ( ::GetObject(hDIB, sizeof(ds), &ds) != sizeof(DIBSECTION) ) + { + wxFAIL_MSG( wxT("failed to get DIBSECTION from a DIB?") ); + + return NULL; + } + + // check that the bitmap is in correct format + if ( ds.dsBm.bmBitsPixel != bpp ) + { + wxFAIL_MSG( wxT("incorrect bitmap type in wxBitmap::GetRawData()") ); + + return NULL; + } + + // ok, store the relevant info in wxPixelDataBase + const LONG h = ds.dsBm.bmHeight; + + data.m_width = ds.dsBm.bmWidth; + data.m_height = h; + + // remember that DIBs are stored in top to bottom order! + // (We can't just use ds.dsBm.bmWidthBytes here, because it isn't always a + // multiple of 2, as required by the documentation. So we use the official + // formula, which we already use elsewhere.) + const LONG bytesPerRow = + wxDIB::GetLineSize(ds.dsBm.bmWidth, ds.dsBm.bmBitsPixel); + data.m_stride = -bytesPerRow; + + char *bits = (char *)ds.dsBm.bmBits; + if ( h > 1 ) + { + bits += (h - 1)*bytesPerRow; + } + + return bits; +#else + return NULL; +#endif +} + +void wxBitmap::UngetRawData(wxPixelDataBase& dataBase) +{ +#if wxUSE_WXDIB + if ( !IsOk() ) + return; + + if ( !&dataBase ) + { + // invalid data, don't crash -- but don't assert neither as we're + // called automatically from wxPixelDataBase dtor and so there is no + // way to prevent this from happening + return; + } + + // if we're a DDB we need to convert DIB back to DDB now to make the + // changes made via raw bitmap access effective + if ( !GetBitmapData()->m_isDIB ) + { + wxDIB *dib = GetBitmapData()->m_dib; + GetBitmapData()->m_dib = NULL; + + // TODO: convert + + delete dib; + } +#endif // wxUSE_WXDIB +} +#endif // wxHAS_RAW_BITMAP + +// ---------------------------------------------------------------------------- +// wxMask +// ---------------------------------------------------------------------------- + +wxMask::wxMask() +{ + m_maskBitmap = 0; +} + +// Copy constructor +wxMask::wxMask(const wxMask &mask) + : wxObject() +{ + BITMAP bmp; + + HDC srcDC = CreateCompatibleDC(0); + HDC destDC = CreateCompatibleDC(0); + + // GetBitmapDimensionEx won't work if SetBitmapDimensionEx wasn't used + // so we'll use GetObject() API here: + if (::GetObject((HGDIOBJ)mask.m_maskBitmap, sizeof(bmp), &bmp) == 0) + { + wxFAIL_MSG(wxT("Cannot retrieve the dimensions of the wxMask to copy")); + return; + } + + // create our HBITMAP + int w = bmp.bmWidth, h = bmp.bmHeight; + m_maskBitmap = (WXHBITMAP)CreateCompatibleBitmap(srcDC, w, h); + + // copy the mask's HBITMAP into our HBITMAP + SelectObject(srcDC, (HBITMAP) mask.m_maskBitmap); + SelectObject(destDC, (HBITMAP) m_maskBitmap); + + BitBlt(destDC, 0, 0, w, h, srcDC, 0, 0, SRCCOPY); + + SelectObject(srcDC, 0); + DeleteDC(srcDC); + SelectObject(destDC, 0); + DeleteDC(destDC); +} + +// Construct a mask from a bitmap and a colour indicating +// the transparent area +wxMask::wxMask(const wxBitmap& bitmap, const wxColour& colour) +{ + m_maskBitmap = 0; + Create(bitmap, colour); +} + +// Construct a mask from a bitmap and a palette index indicating +// the transparent area +wxMask::wxMask(const wxBitmap& bitmap, int paletteIndex) +{ + m_maskBitmap = 0; + Create(bitmap, paletteIndex); +} + +// Construct a mask from a mono bitmap (copies the bitmap). +wxMask::wxMask(const wxBitmap& bitmap) +{ + m_maskBitmap = 0; + Create(bitmap); +} + +wxMask::~wxMask() +{ + if ( m_maskBitmap ) + ::DeleteObject((HBITMAP) m_maskBitmap); +} + +// Create a mask from a mono bitmap (copies the bitmap). +bool wxMask::Create(const wxBitmap& bitmap) +{ +#ifndef __WXMICROWIN__ + wxCHECK_MSG( bitmap.IsOk() && bitmap.GetDepth() == 1, false, + wxT("can't create mask from invalid or not monochrome bitmap") ); + + if ( m_maskBitmap ) + { + ::DeleteObject((HBITMAP) m_maskBitmap); + m_maskBitmap = 0; + } + + m_maskBitmap = (WXHBITMAP) CreateBitmap( + bitmap.GetWidth(), + bitmap.GetHeight(), + 1, 1, 0 + ); + HDC srcDC = CreateCompatibleDC(0); + SelectObject(srcDC, (HBITMAP) bitmap.GetHBITMAP()); + HDC destDC = CreateCompatibleDC(0); + SelectObject(destDC, (HBITMAP) m_maskBitmap); + BitBlt(destDC, 0, 0, bitmap.GetWidth(), bitmap.GetHeight(), srcDC, 0, 0, SRCCOPY); + SelectObject(srcDC, 0); + DeleteDC(srcDC); + SelectObject(destDC, 0); + DeleteDC(destDC); + return true; +#else + wxUnusedVar(bitmap); + return false; +#endif +} + +// Create a mask from a bitmap and a palette index indicating +// the transparent area +bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex) +{ + if ( m_maskBitmap ) + { + ::DeleteObject((HBITMAP) m_maskBitmap); + m_maskBitmap = 0; + } + +#if wxUSE_PALETTE + if (bitmap.IsOk() && bitmap.GetPalette()->IsOk()) + { + unsigned char red, green, blue; + if (bitmap.GetPalette()->GetRGB(paletteIndex, &red, &green, &blue)) + { + wxColour transparentColour(red, green, blue); + return Create(bitmap, transparentColour); + } + } +#endif // wxUSE_PALETTE + + return false; +} + +// Create a mask from a bitmap and a colour indicating +// the transparent area +bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) +{ +#ifndef __WXMICROWIN__ + wxCHECK_MSG( bitmap.IsOk(), false, wxT("invalid bitmap in wxMask::Create") ); + + if ( m_maskBitmap ) + { + ::DeleteObject((HBITMAP) m_maskBitmap); + m_maskBitmap = 0; + } + + int width = bitmap.GetWidth(), + height = bitmap.GetHeight(); + + // scan the bitmap for the transparent colour and set the corresponding + // pixels in the mask to BLACK and the rest to WHITE + COLORREF maskColour = wxColourToPalRGB(colour); + m_maskBitmap = (WXHBITMAP)::CreateBitmap(width, height, 1, 1, 0); + + HDC srcDC = ::CreateCompatibleDC(NULL); + HDC destDC = ::CreateCompatibleDC(NULL); + if ( !srcDC || !destDC ) + { + wxLogLastError(wxT("CreateCompatibleDC")); + } + + bool ok = true; + + // SelectObject() will fail + wxASSERT_MSG( !bitmap.GetSelectedInto(), + wxT("bitmap can't be selected in another DC") ); + + HGDIOBJ hbmpSrcOld = ::SelectObject(srcDC, GetHbitmapOf(bitmap)); + if ( !hbmpSrcOld ) + { + wxLogLastError(wxT("SelectObject")); + + ok = false; + } + + HGDIOBJ hbmpDstOld = ::SelectObject(destDC, (HBITMAP)m_maskBitmap); + if ( !hbmpDstOld ) + { + wxLogLastError(wxT("SelectObject")); + + ok = false; + } + + if ( ok ) + { + // this will create a monochrome bitmap with 0 points for the pixels + // which have the same value as the background colour and 1 for the + // others + ::SetBkColor(srcDC, maskColour); + ::BitBlt(destDC, 0, 0, width, height, srcDC, 0, 0, NOTSRCCOPY); + } + + ::SelectObject(srcDC, hbmpSrcOld); + ::DeleteDC(srcDC); + ::SelectObject(destDC, hbmpDstOld); + ::DeleteDC(destDC); + + return ok; +#else // __WXMICROWIN__ + wxUnusedVar(bitmap); + wxUnusedVar(colour); + return false; +#endif // __WXMICROWIN__/!__WXMICROWIN__ +} + +wxBitmap wxMask::GetBitmap() const +{ + wxBitmap bmp; + bmp.SetHBITMAP(m_maskBitmap); + return bmp; +} + +// ---------------------------------------------------------------------------- +// wxBitmapHandler +// ---------------------------------------------------------------------------- + +bool wxBitmapHandler::Create(wxGDIImage *image, + const void* data, + wxBitmapType type, + int width, int height, int depth) +{ + wxBitmap *bitmap = wxDynamicCast(image, wxBitmap); + + return bitmap && Create(bitmap, data, type, width, height, depth); +} + +bool wxBitmapHandler::Load(wxGDIImage *image, + const wxString& name, + wxBitmapType type, + int width, int height) +{ + wxBitmap *bitmap = wxDynamicCast(image, wxBitmap); + + return bitmap && LoadFile(bitmap, name, type, width, height); +} + +bool wxBitmapHandler::Save(const wxGDIImage *image, + const wxString& name, + wxBitmapType type) const +{ + wxBitmap *bitmap = wxDynamicCast(image, wxBitmap); + + return bitmap && SaveFile(bitmap, name, type); +} + +bool wxBitmapHandler::Create(wxBitmap *WXUNUSED(bitmap), + const void* WXUNUSED(data), + wxBitmapType WXUNUSED(type), + int WXUNUSED(width), + int WXUNUSED(height), + int WXUNUSED(depth)) +{ + return false; +} + +bool wxBitmapHandler::LoadFile(wxBitmap *WXUNUSED(bitmap), + const wxString& WXUNUSED(name), + wxBitmapType WXUNUSED(type), + int WXUNUSED(desiredWidth), + int WXUNUSED(desiredHeight)) +{ + return false; +} + +bool wxBitmapHandler::SaveFile(const wxBitmap *WXUNUSED(bitmap), + const wxString& WXUNUSED(name), + wxBitmapType WXUNUSED(type), + const wxPalette *WXUNUSED(palette)) const +{ + return false; +} + +// ---------------------------------------------------------------------------- +// global helper functions implemented here +// ---------------------------------------------------------------------------- + +// helper of wxBitmapToHICON/HCURSOR +static +HICON wxBitmapToIconOrCursor(const wxBitmap& bmp, + bool iconWanted, + int hotSpotX, + int hotSpotY) +{ + if ( !bmp.IsOk() ) + { + // we can't create an icon/cursor form nothing + return 0; + } + + if ( bmp.HasAlpha() ) + { + HBITMAP hbmp; + +#if wxUSE_WXDIB && wxUSE_IMAGE + // CreateIconIndirect() requires non-pre-multiplied pixel data on input + // as it does pre-multiplication internally itself so we need to create + // a special DIB in such format to pass to it. This is inefficient but + // better than creating an icon with wrong colours. + AutoHBITMAP hbmpRelease; + hbmp = wxDIB(bmp.ConvertToImage(), + wxDIB::PixelFormat_NotPreMultiplied).Detach(); + hbmpRelease.Init(hbmp); +#else // !(wxUSE_WXDIB && wxUSE_IMAGE) + hbmp = GetHbitmapOf(bmp); +#endif // wxUSE_WXDIB && wxUSE_IMAGE + + // Create an empty mask bitmap. + // it doesn't seem to work if we mess with the mask at all. + AutoHBITMAP + hMonoBitmap(CreateBitmap(bmp.GetWidth(),bmp.GetHeight(),1,1,NULL)); + + ICONINFO iconInfo; + wxZeroMemory(iconInfo); + iconInfo.fIcon = iconWanted; // do we want an icon or a cursor? + if ( !iconWanted ) + { + iconInfo.xHotspot = hotSpotX; + iconInfo.yHotspot = hotSpotY; + } + + iconInfo.hbmMask = hMonoBitmap; + iconInfo.hbmColor = hbmp; + + return ::CreateIconIndirect(&iconInfo); + } + + wxMask* mask = bmp.GetMask(); + + if ( !mask ) + { + // we must have a mask for an icon, so even if it's probably incorrect, + // do create it (grey is the "standard" transparent colour) + mask = new wxMask(bmp, *wxLIGHT_GREY); + } + + ICONINFO iconInfo; + wxZeroMemory(iconInfo); + iconInfo.fIcon = iconWanted; // do we want an icon or a cursor? + if ( !iconWanted ) + { + iconInfo.xHotspot = hotSpotX; + iconInfo.yHotspot = hotSpotY; + } + + AutoHBITMAP hbmpMask(wxInvertMask((HBITMAP)mask->GetMaskBitmap())); + iconInfo.hbmMask = hbmpMask; + iconInfo.hbmColor = GetHbitmapOf(bmp); + + // black out the transparent area to preserve background colour, because + // Windows blits the original bitmap using SRCINVERT (XOR) after applying + // the mask to the dest rect. + { + MemoryHDC dcSrc, dcDst; + SelectInHDC selectMask(dcSrc, (HBITMAP)mask->GetMaskBitmap()), + selectBitmap(dcDst, iconInfo.hbmColor); + + if ( !::BitBlt(dcDst, 0, 0, bmp.GetWidth(), bmp.GetHeight(), + dcSrc, 0, 0, SRCAND) ) + { + wxLogLastError(wxT("BitBlt")); + } + } + + HICON hicon = ::CreateIconIndirect(&iconInfo); + + if ( !bmp.GetMask() && !bmp.HasAlpha() ) + { + // we created the mask, now delete it + delete mask; + } + + return hicon; +} + +HICON wxBitmapToHICON(const wxBitmap& bmp) +{ + return wxBitmapToIconOrCursor(bmp, true, 0, 0); +} + +HCURSOR wxBitmapToHCURSOR(const wxBitmap& bmp, int hotSpotX, int hotSpotY) +{ + return (HCURSOR)wxBitmapToIconOrCursor(bmp, false, hotSpotX, hotSpotY); +} + +HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h) +{ +#ifndef __WXMICROWIN__ + wxCHECK_MSG( hbmpMask, 0, wxT("invalid bitmap in wxInvertMask") ); + + // get width/height from the bitmap if not given + if ( !w || !h ) + { + BITMAP bm; + ::GetObject(hbmpMask, sizeof(BITMAP), (LPVOID)&bm); + w = bm.bmWidth; + h = bm.bmHeight; + } + + HDC hdcSrc = ::CreateCompatibleDC(NULL); + HDC hdcDst = ::CreateCompatibleDC(NULL); + if ( !hdcSrc || !hdcDst ) + { + wxLogLastError(wxT("CreateCompatibleDC")); + } + + HBITMAP hbmpInvMask = ::CreateBitmap(w, h, 1, 1, 0); + if ( !hbmpInvMask ) + { + wxLogLastError(wxT("CreateBitmap")); + } + + HGDIOBJ srcTmp = ::SelectObject(hdcSrc, hbmpMask); + HGDIOBJ dstTmp = ::SelectObject(hdcDst, hbmpInvMask); + if ( !::BitBlt(hdcDst, 0, 0, w, h, + hdcSrc, 0, 0, + NOTSRCCOPY) ) + { + wxLogLastError(wxT("BitBlt")); + } + + // Deselect objects + SelectObject(hdcSrc,srcTmp); + SelectObject(hdcDst,dstTmp); + + ::DeleteDC(hdcSrc); + ::DeleteDC(hdcDst); + + return hbmpInvMask; +#else + return 0; +#endif +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/bmpbuttn.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/bmpbuttn.cpp new file mode 100644 index 0000000000..42eddf7fd4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/bmpbuttn.cpp @@ -0,0 +1,95 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/bmpbuttn.cpp +// Purpose: wxBitmapButton +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_BMPBUTTON + +#include "wx/bmpbuttn.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/dcmemory.h" + #include "wx/image.h" +#endif + +#include "wx/msw/private.h" +#include "wx/msw/dc.h" // for wxDCTemp + +#include "wx/msw/uxtheme.h" + +#if wxUSE_UXTHEME + // no need to include tmschema.h + #ifndef BP_PUSHBUTTON + #define BP_PUSHBUTTON 1 + + #define PBS_NORMAL 1 + #define PBS_HOT 2 + #define PBS_PRESSED 3 + #define PBS_DISABLED 4 + #define PBS_DEFAULTED 5 + + #define TMT_CONTENTMARGINS 3602 + #endif +#endif // wxUSE_UXTHEME + +#ifndef ODS_NOFOCUSRECT + #define ODS_NOFOCUSRECT 0x0200 +#endif + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxBitmapButton, wxBitmapButtonBase) + EVT_SYS_COLOUR_CHANGED(wxBitmapButton::OnSysColourChanged) +END_EVENT_TABLE() + +/* +TODO PROPERTIES : + +long "style" , wxBU_AUTODRAW +bool "default" , 0 +bitmap "selected" , +bitmap "focus" , +bitmap "disabled" , +*/ + +bool wxBitmapButton::Create(wxWindow *parent, + wxWindowID id, + const wxBitmap& bitmap, + const wxPoint& pos, + const wxSize& size, long style, + const wxValidator& validator, + const wxString& name) +{ + if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style, + validator, name) ) + return false; + + if ( bitmap.IsOk() ) + SetBitmapLabel(bitmap); + + if ( !size.IsFullySpecified() ) + { + // As our bitmap has just changed, our best size has changed as well so + // reset the initial size using the new value. + SetInitialSize(size); + } + + return true; +} + +#endif // wxUSE_BMPBUTTON diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/bmpcbox.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/bmpcbox.cpp new file mode 100644 index 0000000000..f6d5950a02 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/bmpcbox.cpp @@ -0,0 +1,457 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/bmpcbox.cpp +// Purpose: wxBitmapComboBox +// Author: Jaakko Salli +// Created: 2008-04-06 +// Copyright: (c) 2008 Jaakko Salli +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_BITMAPCOMBOBOX + +#include "wx/bmpcbox.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif + +#include "wx/settings.h" +#include "wx/vector.h" + +#include "wx/msw/dcclient.h" +#include "wx/msw/private.h" + +// For wxODCB_XXX flags +#include "wx/odcombo.h" + + +#define IMAGE_SPACING_CTRL_VERTICAL 7 // Spacing used in control size calculation + + +// ============================================================================ +// implementation +// ============================================================================ + + +BEGIN_EVENT_TABLE(wxBitmapComboBox, wxComboBox) + EVT_SIZE(wxBitmapComboBox::OnSize) +END_EVENT_TABLE() + + +IMPLEMENT_DYNAMIC_CLASS(wxBitmapComboBox, wxComboBox) + + +// ---------------------------------------------------------------------------- +// wxBitmapComboBox creation +// ---------------------------------------------------------------------------- + +void wxBitmapComboBox::Init() +{ + m_inResize = false; +} + +wxBitmapComboBox::wxBitmapComboBox(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator, + const wxString& name) + : wxComboBox(), + wxBitmapComboBoxBase() +{ + Init(); + + Create(parent,id,value,pos,size,choices,style,validator,name); +} + +bool wxBitmapComboBox::Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator, + const wxString& name) +{ + wxCArrayString chs(choices); + return Create(parent, id, value, pos, size, chs.GetCount(), + chs.GetStrings(), style, validator, name); +} + +bool wxBitmapComboBox::Create(wxWindow *parent, + wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + int n, + const wxString choices[], + long style, + const wxValidator& validator, + const wxString& name) +{ + if ( !wxComboBox::Create(parent, id, value, pos, size, + n, choices, style, validator, name) ) + return false; + + UpdateInternals(); + + return true; +} + +WXDWORD wxBitmapComboBox::MSWGetStyle(long style, WXDWORD *exstyle) const +{ + return wxComboBox::MSWGetStyle(style, exstyle) | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS; +} + +void wxBitmapComboBox::RecreateControl() +{ + // + // Recreate control so that WM_MEASUREITEM gets called again. + // Can't use CBS_OWNERDRAWVARIABLE because it has odd + // mouse-wheel behaviour. + // + wxString value = GetValue(); + wxPoint pos = GetPosition(); + wxSize size = GetSize(); + size.y = GetBestSize().y; + const wxArrayString strings = GetStrings(); + const unsigned numItems = strings.size(); + unsigned i; + + // Save the client data pointers before clearing the control, if any. + const wxClientDataType clientDataType = GetClientDataType(); + wxVector objectClientData; + wxVector voidClientData; + switch ( clientDataType ) + { + case wxClientData_None: + break; + + case wxClientData_Object: + objectClientData.reserve(numItems); + for ( i = 0; i < numItems; ++i ) + objectClientData.push_back(GetClientObject(i)); + break; + + case wxClientData_Void: + voidClientData.reserve(numItems); + for ( i = 0; i < numItems; ++i ) + voidClientData.push_back(GetClientData(i)); + break; + } + + wxComboBox::DoClear(); + + HWND hwnd = GetHwnd(); + DissociateHandle(); + ::DestroyWindow(hwnd); + + if ( !MSWCreateControl(wxT("COMBOBOX"), wxEmptyString, pos, size) ) + return; + + // initialize the controls contents + for ( i = 0; i < numItems; i++ ) + { + wxComboBox::Append(strings[i]); + + if ( !objectClientData.empty() ) + SetClientObject(i, objectClientData[i]); + else if ( !voidClientData.empty() ) + SetClientData(i, voidClientData[i]); + } + + // and make sure it has the same attributes as before + if ( m_hasFont ) + { + // calling SetFont(m_font) would do nothing as the code would + // notice that the font didn't change, so force it to believe + // that it did + wxFont font = m_font; + m_font = wxNullFont; + SetFont(font); + } + + if ( m_hasFgCol ) + { + wxColour colFg = m_foregroundColour; + m_foregroundColour = wxNullColour; + SetForegroundColour(colFg); + } + + if ( m_hasBgCol ) + { + wxColour colBg = m_backgroundColour; + m_backgroundColour = wxNullColour; + SetBackgroundColour(colBg); + } + else + { + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + } + + ::SendMessage(GetHwnd(), CB_SETITEMHEIGHT, 0, MeasureItem(0)); + + // Revert the old string value + if ( !HasFlag(wxCB_READONLY) ) + ChangeValue(value); +} + +wxBitmapComboBox::~wxBitmapComboBox() +{ + Clear(); +} + +wxSize wxBitmapComboBox::DoGetBestSize() const +{ + wxSize best = wxComboBox::DoGetBestSize(); + wxSize bitmapSize = GetBitmapSize(); + + wxCoord useHeightBitmap = EDIT_HEIGHT_FROM_CHAR_HEIGHT(bitmapSize.y); + if ( best.y < useHeightBitmap ) + { + best.y = useHeightBitmap; + CacheBestSize(best); + } + return best; +} + +// ---------------------------------------------------------------------------- +// Item manipulation +// ---------------------------------------------------------------------------- + +void wxBitmapComboBox::SetItemBitmap(unsigned int n, const wxBitmap& bitmap) +{ + OnAddBitmap(bitmap); + DoSetItemBitmap(n, bitmap); + + if ( (int)n == GetSelection() ) + Refresh(); +} + +int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap) +{ + OnAddBitmap(bitmap); + const int n = wxComboBox::Append(item); + if ( n != wxNOT_FOUND ) + DoSetItemBitmap(n, bitmap); + return n; +} + +int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap, + void *clientData) +{ + OnAddBitmap(bitmap); + const int n = wxComboBox::Append(item, clientData); + if ( n != wxNOT_FOUND ) + DoSetItemBitmap(n, bitmap); + return n; +} + +int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap, + wxClientData *clientData) +{ + OnAddBitmap(bitmap); + const int n = wxComboBox::Append(item, clientData); + if ( n != wxNOT_FOUND ) + DoSetItemBitmap(n, bitmap); + return n; +} + +int wxBitmapComboBox::Insert(const wxString& item, + const wxBitmap& bitmap, + unsigned int pos) +{ + OnAddBitmap(bitmap); + const int n = wxComboBox::Insert(item, pos); + if ( n != wxNOT_FOUND ) + DoSetItemBitmap(n, bitmap); + return n; +} + +int wxBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, + unsigned int pos, void *clientData) +{ + OnAddBitmap(bitmap); + const int n = wxComboBox::Insert(item, pos, clientData); + if ( n != wxNOT_FOUND ) + DoSetItemBitmap(n, bitmap); + return n; +} + +int wxBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, + unsigned int pos, wxClientData *clientData) +{ + OnAddBitmap(bitmap); + const int n = wxComboBox::Insert(item, pos, clientData); + if ( n != wxNOT_FOUND ) + DoSetItemBitmap(n, bitmap); + return n; +} + +int wxBitmapComboBox::DoInsertItems(const wxArrayStringsAdapter & items, + unsigned int pos, + void **clientData, wxClientDataType type) +{ + const unsigned int numItems = items.GetCount(); + const unsigned int countNew = GetCount() + numItems; + + wxASSERT( numItems == 1 || !HasFlag(wxCB_SORT) ); // Sanity check + + m_bitmaps.Alloc(countNew); + + for ( unsigned int i = 0; i < numItems; i++ ) + { + m_bitmaps.Insert(new wxBitmap(wxNullBitmap), pos + i); + } + + const int index = wxComboBox::DoInsertItems(items, pos, + clientData, type); + + if ( index == wxNOT_FOUND ) + { + for ( int i = numItems-1; i >= 0; i-- ) + BCBDoDeleteOneItem(pos + i); + } + else if ( ((unsigned int)index) != pos ) + { + // Move pre-inserted empty bitmap into correct position + // (usually happens when combo box has wxCB_SORT style) + wxBitmap* bmp = static_cast(m_bitmaps[pos]); + m_bitmaps.RemoveAt(pos); + m_bitmaps.Insert(bmp, index); + } + + return index; +} + +bool wxBitmapComboBox::OnAddBitmap(const wxBitmap& bitmap) +{ + if ( wxBitmapComboBoxBase::OnAddBitmap(bitmap) ) + { + // Need to recreate control for a new measureitem call? + int prevItemHeight = ::SendMessage(GetHwnd(), CB_GETITEMHEIGHT, 0, 0); + + if ( prevItemHeight != MeasureItem(0) ) + RecreateControl(); + + return true; + } + + return false; +} + +void wxBitmapComboBox::DoClear() +{ + wxComboBox::DoClear(); + wxBitmapComboBoxBase::BCBDoClear(); +} + +void wxBitmapComboBox::DoDeleteOneItem(unsigned int n) +{ + wxComboBox::DoDeleteOneItem(n); + wxBitmapComboBoxBase::BCBDoDeleteOneItem(n); +} + +// ---------------------------------------------------------------------------- +// wxBitmapComboBox event handlers and such +// ---------------------------------------------------------------------------- + +void wxBitmapComboBox::OnSize(wxSizeEvent& event) +{ + // Prevent infinite looping + if ( !m_inResize ) + { + m_inResize = true; + DetermineIndent(); + m_inResize = false; + } + + event.Skip(); +} + +// ---------------------------------------------------------------------------- +// wxBitmapComboBox miscellaneous +// ---------------------------------------------------------------------------- + +bool wxBitmapComboBox::SetFont(const wxFont& font) +{ + bool res = wxComboBox::SetFont(font); + UpdateInternals(); + return res; +} + +// ---------------------------------------------------------------------------- +// wxBitmapComboBox item drawing and measuring +// ---------------------------------------------------------------------------- + +bool wxBitmapComboBox::MSWOnDraw(WXDRAWITEMSTRUCT *item) +{ + LPDRAWITEMSTRUCT lpDrawItem = (LPDRAWITEMSTRUCT) item; + int pos = lpDrawItem->itemID; + + // Draw default for item -1, which means 'focus rect only' + if ( pos == -1 ) + return FALSE; + + int flags = 0; + if ( lpDrawItem->itemState & ODS_COMBOBOXEDIT ) + flags |= wxODCB_PAINTING_CONTROL; + if ( lpDrawItem->itemState & ODS_SELECTED ) + flags |= wxODCB_PAINTING_SELECTED; + + wxString text; + + if ( flags & wxODCB_PAINTING_CONTROL ) + { + text = GetValue(); + if ( !HasFlag(wxCB_READONLY) ) + text.clear(); + } + else + { + text = GetString(pos); + } + + wxPaintDCEx dc(this, lpDrawItem->hDC); + wxRect rect = wxRectFromRECT(lpDrawItem->rcItem); + wxBitmapComboBoxBase::DrawBackground(dc, rect, pos, flags); + wxBitmapComboBoxBase::DrawItem(dc, rect, pos, text, flags); + + // If the item has the focus, draw focus rectangle. + // Commented out since regular combo box doesn't + // seem to do it either. + //if ( lpDrawItem->itemState & ODS_FOCUS ) + // DrawFocusRect(lpDrawItem->hDC, &lpDrawItem->rcItem); + + return TRUE; +} + +bool wxBitmapComboBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item) +{ + LPMEASUREITEMSTRUCT lpMeasureItem = (LPMEASUREITEMSTRUCT) item; + int pos = lpMeasureItem->itemID; + + lpMeasureItem->itemHeight = wxBitmapComboBoxBase::MeasureItem(pos); + + return TRUE; +} + +#endif // wxUSE_BITMAPCOMBOBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/brush.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/brush.cpp new file mode 100644 index 0000000000..f2c63c32b8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/brush.cpp @@ -0,0 +1,335 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/brush.cpp +// Purpose: wxBrush +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/brush.h" + +#ifndef WX_PRECOMP + #include "wx/list.h" + #include "wx/utils.h" + #include "wx/app.h" + #include "wx/bitmap.h" +#endif // WX_PRECOMP + +#include "wx/msw/private.h" + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxBrushRefData: public wxGDIRefData +{ +public: + wxBrushRefData(const wxColour& colour = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID); + wxBrushRefData(const wxBitmap& stipple); + wxBrushRefData(const wxBrushRefData& data); + virtual ~wxBrushRefData(); + + bool operator==(const wxBrushRefData& data) const; + + HBRUSH GetHBRUSH(); + void Free(); + + const wxColour& GetColour() const { return m_colour; } + wxBrushStyle GetStyle() const { return m_style; } + wxBitmap *GetStipple() { return &m_stipple; } + + void SetColour(const wxColour& colour) { Free(); m_colour = colour; } + void SetStyle(wxBrushStyle style) { Free(); m_style = style; } + void SetStipple(const wxBitmap& stipple) { Free(); DoSetStipple(stipple); } + +private: + void DoSetStipple(const wxBitmap& stipple); + + wxBrushStyle m_style; + wxBitmap m_stipple; + wxColour m_colour; + HBRUSH m_hBrush; + + // no assignment operator, the objects of this class are shared and never + // assigned after being created once + wxBrushRefData& operator=(const wxBrushRefData&); +}; + +#define M_BRUSHDATA ((wxBrushRefData *)m_refData) + +// ============================================================================ +// wxBrushRefData implementation +// ============================================================================ + +IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject) + +// ---------------------------------------------------------------------------- +// wxBrushRefData ctors/dtor +// ---------------------------------------------------------------------------- + +wxBrushRefData::wxBrushRefData(const wxColour& colour, wxBrushStyle style) + : m_colour(colour) +{ + m_style = style; + + m_hBrush = NULL; +} + +wxBrushRefData::wxBrushRefData(const wxBitmap& stipple) +{ + DoSetStipple(stipple); + + m_hBrush = NULL; +} + +wxBrushRefData::wxBrushRefData(const wxBrushRefData& data) + : wxGDIRefData(), + m_stipple(data.m_stipple), + m_colour(data.m_colour) +{ + m_style = data.m_style; + + // we can't share HBRUSH, we'd need to create another one ourselves + m_hBrush = NULL; +} + +wxBrushRefData::~wxBrushRefData() +{ + Free(); +} + +// ---------------------------------------------------------------------------- +// wxBrushRefData accesors +// ---------------------------------------------------------------------------- + +bool wxBrushRefData::operator==(const wxBrushRefData& data) const +{ + // don't compare HBRUSHes + return m_style == data.m_style && + m_colour == data.m_colour && + m_stipple.IsSameAs(data.m_stipple); +} + +void wxBrushRefData::DoSetStipple(const wxBitmap& stipple) +{ + m_stipple = stipple; + m_style = stipple.GetMask() ? wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE + : wxBRUSHSTYLE_STIPPLE; +} + +// ---------------------------------------------------------------------------- +// wxBrushRefData resource handling +// ---------------------------------------------------------------------------- + +void wxBrushRefData::Free() +{ + if ( m_hBrush ) + { + ::DeleteObject(m_hBrush); + + m_hBrush = NULL; + } +} + +#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) + +static int TranslateHatchStyle(int style) +{ + switch ( style ) + { + case wxBRUSHSTYLE_BDIAGONAL_HATCH: return HS_BDIAGONAL; + case wxBRUSHSTYLE_CROSSDIAG_HATCH: return HS_DIAGCROSS; + case wxBRUSHSTYLE_FDIAGONAL_HATCH: return HS_FDIAGONAL; + case wxBRUSHSTYLE_CROSS_HATCH: return HS_CROSS; + case wxBRUSHSTYLE_HORIZONTAL_HATCH:return HS_HORIZONTAL; + case wxBRUSHSTYLE_VERTICAL_HATCH: return HS_VERTICAL; + default: return -1; + } +} + +#endif // !__WXMICROWIN__ && !__WXWINCE__ + +HBRUSH wxBrushRefData::GetHBRUSH() +{ + if ( !m_hBrush ) + { +#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) + int hatchStyle = TranslateHatchStyle(m_style); + if ( hatchStyle == -1 ) +#endif // !__WXMICROWIN__ && !__WXWINCE__ + { + switch ( m_style ) + { + case wxBRUSHSTYLE_TRANSPARENT: + m_hBrush = (HBRUSH)::GetStockObject(NULL_BRUSH); + break; + + case wxBRUSHSTYLE_STIPPLE: + m_hBrush = ::CreatePatternBrush(GetHbitmapOf(m_stipple)); + break; + + case wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE: + m_hBrush = ::CreatePatternBrush((HBITMAP)m_stipple.GetMask() + ->GetMaskBitmap()); + break; + + default: + wxFAIL_MSG( wxT("unknown brush style") ); + // fall through + + case wxBRUSHSTYLE_SOLID: + m_hBrush = ::CreateSolidBrush(m_colour.GetPixel()); + break; + } + } +#ifndef __WXWINCE__ + else // create a hatched brush + { + m_hBrush = ::CreateHatchBrush(hatchStyle, m_colour.GetPixel()); + } +#endif + + if ( !m_hBrush ) + { + wxLogLastError(wxT("CreateXXXBrush()")); + } + } + + return m_hBrush; +} + +// ============================================================================ +// wxBrush implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxBrush ctors/dtor +// ---------------------------------------------------------------------------- + +wxBrush::wxBrush() +{ +} + +wxBrush::wxBrush(const wxColour& col, wxBrushStyle style) +{ + m_refData = new wxBrushRefData(col, style); +} + +#if FUTURE_WXWIN_COMPATIBILITY_3_0 +wxBrush::wxBrush(const wxColour& col, int style) +{ + m_refData = new wxBrushRefData(col, (wxBrushStyle)style); +} +#endif + +wxBrush::wxBrush(const wxBitmap& stipple) +{ + m_refData = new wxBrushRefData(stipple); +} + +wxBrush::~wxBrush() +{ +} + +// ---------------------------------------------------------------------------- +// wxBrush house keeping stuff +// ---------------------------------------------------------------------------- + +bool wxBrush::operator==(const wxBrush& brush) const +{ + const wxBrushRefData *brushData = (wxBrushRefData *)brush.m_refData; + + // an invalid brush is considered to be only equal to another invalid brush + return m_refData ? (brushData && *M_BRUSHDATA == *brushData) : !brushData; +} + +wxGDIRefData *wxBrush::CreateGDIRefData() const +{ + return new wxBrushRefData; +} + +wxGDIRefData *wxBrush::CloneGDIRefData(const wxGDIRefData *data) const +{ + return new wxBrushRefData(*(const wxBrushRefData *)data); +} + +// ---------------------------------------------------------------------------- +// wxBrush accessors +// ---------------------------------------------------------------------------- + +wxColour wxBrush::GetColour() const +{ + wxCHECK_MSG( IsOk(), wxNullColour, wxT("invalid brush") ); + + return M_BRUSHDATA->GetColour(); +} + +wxBrushStyle wxBrush::GetStyle() const +{ + wxCHECK_MSG( IsOk(), wxBRUSHSTYLE_INVALID, wxT("invalid brush") ); + + return M_BRUSHDATA->GetStyle(); +} + +wxBitmap *wxBrush::GetStipple() const +{ + wxCHECK_MSG( IsOk(), NULL, wxT("invalid brush") ); + + return M_BRUSHDATA->GetStipple(); +} + +WXHANDLE wxBrush::GetResourceHandle() const +{ + wxCHECK_MSG( IsOk(), FALSE, wxT("invalid brush") ); + + return (WXHANDLE)M_BRUSHDATA->GetHBRUSH(); +} + +// ---------------------------------------------------------------------------- +// wxBrush setters +// ---------------------------------------------------------------------------- + +void wxBrush::SetColour(const wxColour& col) +{ + AllocExclusive(); + + M_BRUSHDATA->SetColour(col); +} + +void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b) +{ + AllocExclusive(); + + M_BRUSHDATA->SetColour(wxColour(r, g, b)); +} + +void wxBrush::SetStyle(wxBrushStyle style) +{ + AllocExclusive(); + + M_BRUSHDATA->SetStyle(style); +} + +void wxBrush::SetStipple(const wxBitmap& stipple) +{ + AllocExclusive(); + + M_BRUSHDATA->SetStipple(stipple); +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/button.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/button.cpp new file mode 100644 index 0000000000..c7c463261d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/button.cpp @@ -0,0 +1,465 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/button.cpp +// Purpose: wxButton +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_BUTTON + +#include "wx/button.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/brush.h" + #include "wx/panel.h" + #include "wx/bmpbuttn.h" + #include "wx/settings.h" + #include "wx/dcscreen.h" + #include "wx/dcclient.h" + #include "wx/toplevel.h" + #include "wx/msw/wrapcctl.h" + #include "wx/msw/private.h" + #include "wx/msw/missing.h" +#endif + +#include "wx/imaglist.h" +#include "wx/stockitem.h" +#include "wx/msw/private/button.h" +#include "wx/msw/private/dc.h" +#include "wx/private/window.h" + +#if wxUSE_MARKUP + #include "wx/generic/private/markuptext.h" +#endif // wxUSE_MARKUP + +// set the value for BCM_SETSHIELD (for the UAC shield) if it's not defined in +// the header +#ifndef BCM_SETSHIELD + #define BCM_SETSHIELD 0x160c +#endif + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE(wxButton, wxButtonBase) + EVT_CHAR_HOOK(wxButton::OnCharHook) +END_EVENT_TABLE() + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// creation/destruction +// ---------------------------------------------------------------------------- + +bool wxButton::Create(wxWindow *parent, + wxWindowID id, + const wxString& lbl, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + wxString label(lbl); + if (label.empty() && wxIsStockID(id)) + { + // On Windows, some buttons aren't supposed to have mnemonics + label = wxGetStockLabel + ( + id, + id == wxID_OK || id == wxID_CANCEL || id == wxID_CLOSE + ? wxSTOCK_NOFLAGS + : wxSTOCK_WITH_MNEMONIC + ); + } + + if ( !CreateControl(parent, id, pos, size, style, validator, name) ) + return false; + + WXDWORD exstyle; + WXDWORD msStyle = MSWGetStyle(style, &exstyle); + + // if the label contains several lines we must explicitly tell the button + // about it or it wouldn't draw it correctly ("\n"s would just appear as + // black boxes) + // + // NB: we do it here and not in MSWGetStyle() because we need the label + // value and the label is not set yet when MSWGetStyle() is called + msStyle |= wxMSWButton::GetMultilineStyle(label); + + return MSWCreateControl(wxT("BUTTON"), msStyle, pos, size, label, exstyle); +} + +wxButton::~wxButton() +{ + wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow); + if ( tlw && tlw->GetTmpDefaultItem() == this ) + { + UnsetTmpDefault(); + } +} + +// ---------------------------------------------------------------------------- +// flags +// ---------------------------------------------------------------------------- + +WXDWORD wxButton::MSWGetStyle(long style, WXDWORD *exstyle) const +{ + // buttons never have an external border, they draw their own one + WXDWORD msStyle = wxControl::MSWGetStyle + ( + (style & ~wxBORDER_MASK) | wxBORDER_NONE, exstyle + ); + + // we must use WS_CLIPSIBLINGS with the buttons or they would draw over + // each other in any resizable dialog which has more than one button in + // the bottom + msStyle |= WS_CLIPSIBLINGS; + + // don't use "else if" here: weird as it is, but you may combine wxBU_LEFT + // and wxBU_RIGHT to get BS_CENTER! + if ( style & wxBU_LEFT ) + msStyle |= BS_LEFT; + if ( style & wxBU_RIGHT ) + msStyle |= BS_RIGHT; + if ( style & wxBU_TOP ) + msStyle |= BS_TOP; + if ( style & wxBU_BOTTOM ) + msStyle |= BS_BOTTOM; +#ifndef __WXWINCE__ + // flat 2d buttons + if ( style & wxNO_BORDER ) + msStyle |= BS_FLAT; +#endif // __WXWINCE__ + + return msStyle; +} + +/* static */ +wxSize wxButtonBase::GetDefaultSize() +{ + static wxSize s_sizeBtn; + + if ( s_sizeBtn.x == 0 ) + { + wxScreenDC dc; + dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); + + // The size of a standard button in the dialog units is 50x14, + // translate this to pixels. + // + // Windows' computes dialog units using average character width over + // upper- and lower-case ASCII alphabet and not using the average + // character width metadata stored in the font; see + // http://support.microsoft.com/default.aspx/kb/145994 for detailed + // discussion. + // + // NB: wxMulDivInt32() is used, because it correctly rounds the result + + const wxSize base = wxPrivate::GetAverageASCIILetterSize(dc); + s_sizeBtn.x = wxMulDivInt32(50, base.x, 4); + s_sizeBtn.y = wxMulDivInt32(14, base.y, 8); + } + + return s_sizeBtn; +} + +// ---------------------------------------------------------------------------- +// default button handling +// ---------------------------------------------------------------------------- + +/* + In normal Windows programs there is no need to handle default button + manually because this is taken care by the system provided you use + WM_NEXTDLGCTL and not just SetFocus() to switch focus betweeh the controls + (see http://blogs.msdn.com/oldnewthing/archive/2004/08/02/205624.aspx for + the full explanation why just calling SetFocus() is not enough). + + However this only works if the window is a dialog, i.e. uses DefDlgProc(), + but not with plain windows using DefWindowProc() and we do want to have + default buttons inside frames as well, so we're forced to reimplement all + this logic ourselves. It would be great to avoid having to do this but using + DefDlgProc() for all the windows would almost certainly result in more + problems, we'd need to carefully filter messages and pass some of them to + DefWindowProc() and some of them to DefDlgProc() which looks dangerous (what + if the handling of some message changes in some Windows version?), so doing + this ourselves is probably a lesser evil. + + Read the rest to learn everything you ever wanted to know about the default + buttons but were afraid to ask. + + + In MSW the default button should be activated when the user presses Enter + and the current control doesn't process Enter itself somehow. This is + handled by ::DefWindowProc() (or maybe ::DefDialogProc()) using DM_SETDEFID + Another aspect of "defaultness" is that the default button has different + appearance: this is due to BS_DEFPUSHBUTTON style which is completely + separate from DM_SETDEFID stuff (!). Also note that BS_DEFPUSHBUTTON should + be unset if our parent window is not active so it should be unset whenever + we lose activation and set back when we regain it. + + Final complication is that when a button is active, it should be the default + one, i.e. pressing Enter on a button always activates it and not another + one. + + We handle this by maintaining a permanent and a temporary default items in + wxControlContainer (both may be NULL). When a button becomes the current + control (i.e. gets focus) it sets itself as the temporary default which + ensures that it has the right appearance and that Enter will be redirected + to it. When the button loses focus, it unsets the temporary default and so + the default item will be the permanent default -- that is the default button + if any had been set or none otherwise, which is just what we want. + */ + +// set this button as the (permanently) default one in its panel +wxWindow *wxButton::SetDefault() +{ + // set this one as the default button both for wxWidgets ... + wxWindow *winOldDefault = wxButtonBase::SetDefault(); + + // ... and Windows + SetDefaultStyle(wxDynamicCast(winOldDefault, wxButton), false); + SetDefaultStyle(this, true); + + return winOldDefault; +} + +// return the top level parent window if it's not being deleted yet, otherwise +// return NULL +static wxTopLevelWindow *GetTLWParentIfNotBeingDeleted(wxWindow *win) +{ + for ( ;; ) + { + // IsTopLevel() will return false for a wxTLW being deleted, so we also + // need the parent test for this case + wxWindow * const parent = win->GetParent(); + if ( !parent || win->IsTopLevel() ) + { + if ( win->IsBeingDeleted() ) + return NULL; + + break; + } + + win = parent; + } + + wxASSERT_MSG( win, wxT("button without top level parent?") ); + + wxTopLevelWindow * const tlw = wxDynamicCast(win, wxTopLevelWindow); + wxASSERT_MSG( tlw, wxT("logic error in GetTLWParentIfNotBeingDeleted()") ); + + return tlw; +} + +// set this button as being currently default +void wxButton::SetTmpDefault() +{ + wxTopLevelWindow * const tlw = GetTLWParentIfNotBeingDeleted(this); + if ( !tlw ) + return; + + wxWindow *winOldDefault = tlw->GetDefaultItem(); + tlw->SetTmpDefaultItem(this); + + // Notice that the order of these statements is important, the old button + // is not reset if we do it the other way round, probably because of + // something done by the default DM_SETDEFID handler. + SetDefaultStyle(this, true); + SetDefaultStyle(wxDynamicCast(winOldDefault, wxButton), false); +} + +// unset this button as currently default, it may still stay permanent default +void wxButton::UnsetTmpDefault() +{ + wxTopLevelWindow * const tlw = GetTLWParentIfNotBeingDeleted(this); + if ( !tlw ) + return; + + tlw->SetTmpDefaultItem(NULL); + + wxWindow *winOldDefault = tlw->GetDefaultItem(); + + // Just as in SetTmpDefault() above, the order is important here. + SetDefaultStyle(wxDynamicCast(winOldDefault, wxButton), true); + SetDefaultStyle(this, false); +} + +/* static */ +void +wxButton::SetDefaultStyle(wxButton *btn, bool on) +{ + // we may be called with NULL pointer -- simpler to do the check here than + // in the caller which does wxDynamicCast() + if ( !btn ) + return; + + // first, let DefDlgProc() know about the new default button + if ( on ) + { + // we shouldn't set BS_DEFPUSHBUTTON for any button if we don't have + // focus at all any more + if ( !wxTheApp->IsActive() ) + return; + + wxWindow * const tlw = wxGetTopLevelParent(btn); + wxCHECK_RET( tlw, wxT("button without top level window?") ); + + ::SendMessage(GetHwndOf(tlw), DM_SETDEFID, btn->GetId(), 0L); + + // sending DM_SETDEFID also changes the button style to + // BS_DEFPUSHBUTTON so there is nothing more to do + } + + // then also change the style as needed + long style = ::GetWindowLong(GetHwndOf(btn), GWL_STYLE); + if ( !(style & BS_DEFPUSHBUTTON) == on ) + { + // don't do it with the owner drawn buttons because it will + // reset BS_OWNERDRAW style bit too (as BS_OWNERDRAW & + // BS_DEFPUSHBUTTON != 0)! + if ( (style & BS_OWNERDRAW) != BS_OWNERDRAW ) + { + ::SendMessage(GetHwndOf(btn), BM_SETSTYLE, + on ? style | BS_DEFPUSHBUTTON + : style & ~BS_DEFPUSHBUTTON, + 1L /* redraw */); + } + else // owner drawn + { + // redraw the button - it will notice itself that it's + // [not] the default one [any longer] + btn->Refresh(); + } + } + //else: already has correct style +} + +// ---------------------------------------------------------------------------- +// helpers +// ---------------------------------------------------------------------------- + +bool wxButton::SendClickEvent() +{ + wxCommandEvent event(wxEVT_BUTTON, GetId()); + event.SetEventObject(this); + + return ProcessCommand(event); +} + +void wxButton::Command(wxCommandEvent & event) +{ + ProcessCommand(event); +} + +// ---------------------------------------------------------------------------- +// event/message handlers +// ---------------------------------------------------------------------------- + +void wxButton::OnCharHook(wxKeyEvent& event) +{ + // We want to ensure that the button always processes Enter key events + // itself, even if it's inside some control that normally takes over them + // (this happens when the button is part of an in-place editor control for + // example). + if ( event.GetKeyCode() == WXK_RETURN ) + { + // We should ensure that subsequent key events are still generated even + // if we did handle EVT_CHAR_HOOK (normally this would suppress their + // generation). + event.DoAllowNextEvent(); + } + else + { + event.Skip(); + } +} + +bool wxButton::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) +{ + bool processed = false; + switch ( param ) + { + // NOTE: Apparently older versions (NT 4?) of the common controls send + // BN_DOUBLECLICKED but not a second BN_CLICKED for owner-drawn + // buttons, so in order to send two EVT_BUTTON events we should + // catch both types. Currently (Feb 2003) up-to-date versions of + // win98, win2k and winXP all send two BN_CLICKED messages for + // all button types, so we don't catch BN_DOUBLECLICKED anymore + // in order to not get 3 EVT_BUTTON events. If this is a problem + // then we need to figure out which version of the comctl32 changed + // this behaviour and test for it. + + case 1: // message came from an accelerator + case BN_CLICKED: // normal buttons send this + processed = SendClickEvent(); + break; + } + + return processed; +} + +WXLRESULT wxButton::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) +{ + // when we receive focus, we want to temporarily become the default button in + // our parent panel so that pressing "Enter" would activate us -- and when + // losing it we should restore the previous default button as well + if ( nMsg == WM_SETFOCUS ) + { + SetTmpDefault(); + + // let the default processing take place too + } + else if ( nMsg == WM_KILLFOCUS ) + { + UnsetTmpDefault(); + } + + // let the base class do all real processing + return wxAnyButton::MSWWindowProc(nMsg, wParam, lParam); +} + +// ---------------------------------------------------------------------------- +// authentication needed handling +// ---------------------------------------------------------------------------- + +bool wxButton::DoGetAuthNeeded() const +{ + return m_authNeeded; +} + +void wxButton::DoSetAuthNeeded(bool show) +{ + // show/hide UAC symbol on Windows Vista and later + if ( wxGetWinVersion() >= wxWinVersion_6 ) + { + m_authNeeded = show; + ::SendMessage(GetHwnd(), BCM_SETSHIELD, 0, show); + InvalidateBestSize(); + } +} + +#endif // wxUSE_BUTTON + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/calctrl.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/calctrl.cpp new file mode 100644 index 0000000000..ac0d8bbd76 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/calctrl.cpp @@ -0,0 +1,524 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/calctrl.cpp +// Purpose: wxCalendarCtrl implementation +// Author: Vadim Zeitlin +// Created: 2008-04-04 +// Copyright: (C) 2008 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CALENDARCTRL + +#ifndef WX_PRECOMP + #include "wx/msw/wrapwin.h" + #include "wx/msw/wrapcctl.h" // include "properly" + #include "wx/msw/private.h" +#endif + +#include "wx/calctrl.h" + +#include "wx/msw/private/datecontrols.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +namespace +{ + +// values of week days used by the native control +enum +{ + MonthCal_Monday, + MonthCal_Tuesday, + MonthCal_Wednesday, + MonthCal_Thursday, + MonthCal_Friday, + MonthCal_Saturday, + MonthCal_Sunday +}; + +} // anonymous namespace + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxCalendarCtrl creation +// ---------------------------------------------------------------------------- + +void wxCalendarCtrl::Init() +{ + m_marks = + m_holidays = 0; +} + +bool +wxCalendarCtrl::Create(wxWindow *parent, + wxWindowID id, + const wxDateTime& dt, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if ( !wxMSWDateControls::CheckInitialization() ) + return false; + + // we need the arrows for the navigation + style |= wxWANTS_CHARS; + + // initialize the base class + if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) ) + return false; + + // create the native control: this is a bit tricky as we want to receive + // double click events but the MONTHCAL_CLASS doesn't use CS_DBLCLKS style + // and so we create our own copy of it which does + static ClassRegistrar s_clsMonthCal; + if ( !s_clsMonthCal.IsInitialized() ) + { + // get a copy of standard class and modify it + WNDCLASS wc; + if ( ::GetClassInfo(NULL, MONTHCAL_CLASS, &wc) ) + { + wc.lpszClassName = wxT("_wx_SysMonthCtl32"); + wc.style |= CS_DBLCLKS; + s_clsMonthCal.Register(wc); + } + else + { + wxLogLastError(wxT("GetClassInfoEx(SysMonthCal32)")); + } + } + + const wxChar * const clsname = s_clsMonthCal.IsRegistered() + ? s_clsMonthCal.GetName().t_str() + : MONTHCAL_CLASS; + + if ( !MSWCreateControl(clsname, wxEmptyString, pos, size) ) + return false; + + // initialize the control + UpdateFirstDayOfWeek(); + + SetDate(dt.IsValid() ? dt : wxDateTime::Today()); + + SetHolidayAttrs(); + UpdateMarks(); + + Connect(wxEVT_LEFT_DOWN, + wxMouseEventHandler(wxCalendarCtrl::MSWOnClick)); + Connect(wxEVT_LEFT_DCLICK, + wxMouseEventHandler(wxCalendarCtrl::MSWOnDoubleClick)); + + return true; +} + +WXDWORD wxCalendarCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const +{ + WXDWORD styleMSW = wxCalendarCtrlBase::MSWGetStyle(style, exstyle); + + // right now we don't support all native styles but we should add wx styles + // corresponding to MCS_NOTODAY and MCS_NOTODAYCIRCLE probably (TODO) + + // for compatibility with the other versions, just turn off today display + // unconditionally for now + styleMSW |= MCS_NOTODAY; + + // we also need this style for Mark() to work + styleMSW |= MCS_DAYSTATE; + + if ( style & wxCAL_SHOW_WEEK_NUMBERS ) + styleMSW |= MCS_WEEKNUMBERS; + + return styleMSW; +} + +void wxCalendarCtrl::SetWindowStyleFlag(long style) +{ + const bool hadMondayFirst = HasFlag(wxCAL_MONDAY_FIRST); + + wxCalendarCtrlBase::SetWindowStyleFlag(style); + + if ( HasFlag(wxCAL_MONDAY_FIRST) != hadMondayFirst ) + UpdateFirstDayOfWeek(); +} + +// ---------------------------------------------------------------------------- +// wxCalendarCtrl geometry +// ---------------------------------------------------------------------------- + +// TODO: handle WM_WININICHANGE +wxSize wxCalendarCtrl::DoGetBestSize() const +{ + RECT rc; + if ( !GetHwnd() || !MonthCal_GetMinReqRect(GetHwnd(), &rc) ) + { + return wxCalendarCtrlBase::DoGetBestSize(); + } + + const wxSize best = wxRectFromRECT(rc).GetSize() + GetWindowBorderSize(); + CacheBestSize(best); + return best; +} + +wxCalendarHitTestResult +wxCalendarCtrl::HitTest(const wxPoint& pos, + wxDateTime *date, + wxDateTime::WeekDay *wd) +{ + WinStruct hti; + + // Vista and later SDKs add a few extra fields to MCHITTESTINFO which are + // not supported by the previous versions, as we don't use them anyhow we + // should pretend that we always use the old struct format to make the call + // below work on pre-Vista systems (see #11057) +#ifdef MCHITTESTINFO_V1_SIZE + hti.cbSize = MCHITTESTINFO_V1_SIZE; +#endif + + hti.pt.x = pos.x; + hti.pt.y = pos.y; + switch ( MonthCal_HitTest(GetHwnd(), &hti) ) + { + default: + case MCHT_CALENDARWEEKNUM: + wxFAIL_MSG( "unexpected" ); + // fall through + + case MCHT_NOWHERE: + case MCHT_CALENDARBK: + case MCHT_TITLEBK: + case MCHT_TITLEMONTH: + case MCHT_TITLEYEAR: + return wxCAL_HITTEST_NOWHERE; + + case MCHT_CALENDARDATE: + if ( date ) + date->SetFromMSWSysDate(hti.st); + return wxCAL_HITTEST_DAY; + + case MCHT_CALENDARDAY: + if ( wd ) + { + int day = hti.st.wDayOfWeek; + + // the native control returns incorrect day of the week when + // the first day isn't Monday, i.e. the first column is always + // "Monday" even if its label is "Sunday", compensate for it + const int first = LOWORD(MonthCal_GetFirstDayOfWeek(GetHwnd())); + if ( first == MonthCal_Monday ) + { + // as MonthCal_Monday is 0 while wxDateTime::Mon is 1, + // normally we need to do this to transform from MSW + // convention to wx one + day++; + day %= 7; + } + //else: but when the first day is MonthCal_Sunday, the native + // control still returns 0 (i.e. MonthCal_Monday) for the + // first column which looks like a bug in it but to work + // around it it's enough to not apply the correction above + + *wd = static_cast(day); + } + return wxCAL_HITTEST_HEADER; + + case MCHT_TITLEBTNNEXT: + return wxCAL_HITTEST_INCMONTH; + + case MCHT_TITLEBTNPREV: + return wxCAL_HITTEST_DECMONTH; + + case MCHT_CALENDARDATENEXT: + case MCHT_CALENDARDATEPREV: + return wxCAL_HITTEST_SURROUNDING_WEEK; + } +} + +// ---------------------------------------------------------------------------- +// wxCalendarCtrl operations +// ---------------------------------------------------------------------------- + +bool wxCalendarCtrl::SetDate(const wxDateTime& dt) +{ + wxCHECK_MSG( dt.IsValid(), false, "invalid date" ); + + SYSTEMTIME st; + dt.GetAsMSWSysDate(&st); + if ( !MonthCal_SetCurSel(GetHwnd(), &st) ) + { + wxLogDebug(wxT("DateTime_SetSystemtime() failed")); + + return false; + } + + m_date = dt.GetDateOnly(); + + return true; +} + +wxDateTime wxCalendarCtrl::GetDate() const +{ +#if wxDEBUG_LEVEL + SYSTEMTIME st; + + if ( !MonthCal_GetCurSel(GetHwnd(), &st) ) + { + wxASSERT_MSG( !m_date.IsValid(), "mismatch between data and control" ); + + return wxDefaultDateTime; + } + + wxDateTime dt; + dt.SetFromMSWSysDate(st); + + // Windows XP and earlier didn't include the time component into the + // returned date but Windows 7 does, so we can't compare the full objects + // in the same way under all the Windows versions, just compare their date + // parts + wxASSERT_MSG( dt.IsSameDate(m_date), "mismatch between data and control" ); +#endif // wxDEBUG_LEVEL + + return m_date; +} + +bool wxCalendarCtrl::SetDateRange(const wxDateTime& dt1, const wxDateTime& dt2) +{ + SYSTEMTIME st[2]; + + DWORD flags = 0; + if ( dt1.IsValid() ) + { + dt1.GetAsMSWSysTime(st + 0); + flags |= GDTR_MIN; + } + + if ( dt2.IsValid() ) + { + dt2.GetAsMSWSysTime(st + 1); + flags |= GDTR_MAX; + } + + if ( !MonthCal_SetRange(GetHwnd(), flags, st) ) + { + wxLogDebug(wxT("MonthCal_SetRange() failed")); + } + + return flags != 0; +} + +bool wxCalendarCtrl::GetDateRange(wxDateTime *dt1, wxDateTime *dt2) const +{ + SYSTEMTIME st[2]; + + DWORD flags = MonthCal_GetRange(GetHwnd(), st); + if ( dt1 ) + { + if ( flags & GDTR_MIN ) + dt1->SetFromMSWSysDate(st[0]); + else + *dt1 = wxDefaultDateTime; + } + + if ( dt2 ) + { + if ( flags & GDTR_MAX ) + dt2->SetFromMSWSysDate(st[1]); + else + *dt2 = wxDefaultDateTime; + } + + return flags != 0; +} + +// ---------------------------------------------------------------------------- +// other wxCalendarCtrl operations +// ---------------------------------------------------------------------------- + +bool wxCalendarCtrl::EnableMonthChange(bool enable) +{ + if ( !wxCalendarCtrlBase::EnableMonthChange(enable) ) + return false; + + wxDateTime dtStart, dtEnd; + if ( !enable ) + { + dtStart = GetDate(); + dtStart.SetDay(1); + + dtEnd = dtStart.GetLastMonthDay(); + } + //else: leave them invalid to remove the restriction + + SetDateRange(dtStart, dtEnd); + + return true; +} + +void wxCalendarCtrl::Mark(size_t day, bool mark) +{ + wxCHECK_RET( day > 0 && day < 32, "invalid day" ); + + int mask = 1 << (day - 1); + if ( mark ) + m_marks |= mask; + else + m_marks &= ~mask; + + // calling Refresh() here is not enough to change the day appearance + UpdateMarks(); +} + +void wxCalendarCtrl::SetHoliday(size_t day) +{ + wxCHECK_RET( day > 0 && day < 32, "invalid day" ); + + m_holidays |= 1 << (day - 1); +} + +void wxCalendarCtrl::UpdateMarks() +{ + // Currently the native control may show more than one month if its size is + // big enough. Ideal would be to prevent this from happening but there + // doesn't seem to be any obvious way to do it, so for now just handle the + // possibility that we can display several of them: one before the current + // one and up to 12 after it. + MONTHDAYSTATE states[14] = { 0 }; + const DWORD nMonths = MonthCal_GetMonthRange(GetHwnd(), GMR_DAYSTATE, NULL); + + // although in principle the calendar might not show any days from the + // preceding months, it seems like it always does, consider e.g. Feb 2010 + // which starts on Monday and ends on Sunday and so could fit on 4 lines + // without showing any subsequent months -- the standard control still + // shows it on 6 lines and the number of visible months is still 3 + // + // OTOH Windows 7 control can show all 12 months or even years or decades + // in its window if you "zoom out" of it by double clicking on free areas + // so the return value can be (much, in case of decades view) greater than + // 3 but in this case marks are not visible anyhow so simply ignore it + if ( nMonths >= 2 && nMonths <= WXSIZEOF(states) ) + { + // The current, fully visible month is always the second one. + states[1] = m_marks | m_holidays; + + if ( !MonthCal_SetDayState(GetHwnd(), nMonths, states) ) + { + wxLogLastError(wxT("MonthCal_SetDayState")); + } + } + //else: not a month view at all +} + +void wxCalendarCtrl::UpdateFirstDayOfWeek() +{ + MonthCal_SetFirstDayOfWeek(GetHwnd(), + HasFlag(wxCAL_MONDAY_FIRST) ? MonthCal_Monday + : MonthCal_Sunday); +} + +// ---------------------------------------------------------------------------- +// wxCalendarCtrl events +// ---------------------------------------------------------------------------- + +bool wxCalendarCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) +{ + NMHDR* hdr = (NMHDR *)lParam; + switch ( hdr->code ) + { + case MCN_SELCHANGE: + { + // we need to update m_date first, before calling the user code + // which expects GetDate() to return the new date + const wxDateTime dateOld = m_date; + const NMSELCHANGE * const sch = (NMSELCHANGE *)lParam; + m_date.SetFromMSWSysDate(sch->stSelStart); + + // changing the year or the month results in a second dummy + // MCN_SELCHANGE event on this system which doesn't really + // change anything -- filter it out + if ( m_date != dateOld ) + { + if ( GenerateAllChangeEvents(dateOld) ) + { + // month changed, need to update the holidays if we use + // them + SetHolidayAttrs(); + UpdateMarks(); + } + } + } + break; + + case MCN_GETDAYSTATE: + { + const NMDAYSTATE * const ds = (NMDAYSTATE *)lParam; + + wxDateTime startDate; + startDate.SetFromMSWSysDate(ds->stStart); + + // Ensure we have a valid date to work with. + wxDateTime currentDate = m_date.IsValid() ? m_date : startDate; + + // Set to the start of month for comparison with startDate to + // work correctly. + currentDate.SetDay(1); + + for ( int i = 0; i < ds->cDayState; i++ ) + { + // set holiday/marks only for the "current" month + if ( startDate == currentDate ) + ds->prgDayState[i] = m_marks | m_holidays; + else + ds->prgDayState[i] = 0; + + startDate += wxDateSpan::Month(); + } + } + break; + + default: + return wxCalendarCtrlBase::MSWOnNotify(idCtrl, lParam, result); + } + + *result = 0; + return true; +} + +void wxCalendarCtrl::MSWOnDoubleClick(wxMouseEvent& event) +{ + if ( HitTest(event.GetPosition()) == wxCAL_HITTEST_DAY ) + { + if ( GenerateEvent(wxEVT_CALENDAR_DOUBLECLICKED) ) + return; // skip event.Skip() below + } + + event.Skip(); +} + +void wxCalendarCtrl::MSWOnClick(wxMouseEvent& event) +{ + // for some reason, the control doesn't get focus on its own when the user + // clicks in it + SetFocus(); + + event.Skip(); +} + +#endif // wxUSE_CALENDARCTRL diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/caret.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/caret.cpp new file mode 100644 index 0000000000..677cf5c339 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/caret.cpp @@ -0,0 +1,189 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/msw/caret.cpp +// Purpose: MSW implementation of wxCaret +// Author: Vadim Zeitlin +// Modified by: +// Created: 23.05.99 +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// declarations +// =========================================================================== + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/log.h" +#endif // WX_PRECOMP + +#include "wx/caret.h" + +#if wxUSE_CARET + +#include "wx/msw/private.h" + +// --------------------------------------------------------------------------- +// macros +// --------------------------------------------------------------------------- + +#define CALL_CARET_API(api, args) \ + if ( !api args ) \ + { \ + wxLogLastError(wxT(#api)); \ + } + +// =========================================================================== +// implementation +// =========================================================================== + +// --------------------------------------------------------------------------- +// blink time +// --------------------------------------------------------------------------- + +//static +int wxCaretBase::GetBlinkTime() +{ + int blinkTime = ::GetCaretBlinkTime(); + if ( !blinkTime ) + { + wxLogLastError(wxT("GetCaretBlinkTime")); + } + + return blinkTime; +} + +//static +void wxCaretBase::SetBlinkTime(int milliseconds) +{ + CALL_CARET_API(SetCaretBlinkTime, (milliseconds)); +} + +// --------------------------------------------------------------------------- +// creating/destroying the caret +// --------------------------------------------------------------------------- + +bool wxCaret::MSWCreateCaret() +{ + wxASSERT_MSG( GetWindow(), wxT("caret without window cannot be created") ); + wxASSERT_MSG( IsOk(), wxT("caret of zero size cannot be created") ); + + if ( !m_hasCaret ) + { + CALL_CARET_API(CreateCaret, (GetWinHwnd(GetWindow()), 0, + m_width, m_height)); + + m_hasCaret = true; + } + + return m_hasCaret; +} + +void wxCaret::OnSetFocus() +{ + if ( m_countVisible > 0 ) + { + if ( MSWCreateCaret() ) + { + // the caret was recreated but it doesn't remember its position and + // it's not shown + + DoMove(); + DoShow(); + } + } + //else: caret is invisible, don't waste time creating it +} + +void wxCaret::OnKillFocus() +{ + if ( m_hasCaret ) + { + m_hasCaret = false; + + CALL_CARET_API(DestroyCaret, ()); + } +} + +// --------------------------------------------------------------------------- +// showing/hiding the caret +// --------------------------------------------------------------------------- + +void wxCaret::DoShow() +{ + wxASSERT_MSG( GetWindow(), wxT("caret without window cannot be shown") ); + wxASSERT_MSG( IsOk(), wxT("caret of zero size cannot be shown") ); + + // we might not have created the caret yet if we had got the focus first + // and the caret was shown later - so do it now if we have the focus but + // not the caret + if ( !m_hasCaret && (wxWindow::FindFocus() == GetWindow()) ) + { + if ( MSWCreateCaret() ) + { + DoMove(); + } + } + + if ( m_hasCaret ) + { + CALL_CARET_API(ShowCaret, (GetWinHwnd(GetWindow()))); + } + //else: will be shown when we get the focus +} + +void wxCaret::DoHide() +{ + if ( m_hasCaret ) + { + CALL_CARET_API(HideCaret, (GetWinHwnd(GetWindow()))); + } +} + +// --------------------------------------------------------------------------- +// moving the caret +// --------------------------------------------------------------------------- + +void wxCaret::DoMove() +{ + if ( m_hasCaret ) + { + wxASSERT_MSG( wxWindow::FindFocus() == GetWindow(), + wxT("how did we lose focus?") ); + + // for compatibility with the generic version, the coordinates are + // client ones + wxPoint pt = GetWindow()->GetClientAreaOrigin(); + CALL_CARET_API(SetCaretPos, (m_x + pt.x, m_y + pt.y)); + } + //else: we don't have caret right now, nothing to do (this does happen) +} + + +// --------------------------------------------------------------------------- +// resizing the caret +// --------------------------------------------------------------------------- + +void wxCaret::DoSize() +{ + if ( m_hasCaret ) + { + m_hasCaret = false; + CALL_CARET_API(DestroyCaret, ()); + MSWCreateCaret(); + OnSetFocus(); + } +} + +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/checkbox.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/checkbox.cpp new file mode 100644 index 0000000000..b5601e72d8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/checkbox.cpp @@ -0,0 +1,502 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/checkbox.cpp +// Purpose: wxCheckBox +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CHECKBOX + +#include "wx/checkbox.h" + +#ifndef WX_PRECOMP + #include "wx/brush.h" + #include "wx/dcclient.h" + #include "wx/dcscreen.h" + #include "wx/settings.h" +#endif + +#include "wx/msw/dc.h" // for wxDCTemp +#include "wx/renderer.h" +#include "wx/msw/uxtheme.h" +#include "wx/msw/private/button.h" +#include "wx/msw/missing.h" + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +#ifndef BP_CHECKBOX + #define BP_CHECKBOX 3 +#endif + +// these values are defined in tmschema.h (except the first one) +enum +{ + CBS_INVALID, + CBS_UNCHECKEDNORMAL, + CBS_UNCHECKEDHOT, + CBS_UNCHECKEDPRESSED, + CBS_UNCHECKEDDISABLED, + CBS_CHECKEDNORMAL, + CBS_CHECKEDHOT, + CBS_CHECKEDPRESSED, + CBS_CHECKEDDISABLED, + CBS_MIXEDNORMAL, + CBS_MIXEDHOT, + CBS_MIXEDPRESSED, + CBS_MIXEDDISABLED +}; + +// these are our own +enum +{ + CBS_HOT_OFFSET = 1, + CBS_PRESSED_OFFSET = 2, + CBS_DISABLED_OFFSET = 3 +}; + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxCheckBox creation +// ---------------------------------------------------------------------------- + +void wxCheckBox::Init() +{ + m_state = wxCHK_UNCHECKED; + m_isPressed = + m_isHot = false; +} + +bool wxCheckBox::Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos, + const wxSize& size, long style, + const wxValidator& validator, + const wxString& name) +{ + Init(); + + WXValidateStyle(&style); + if ( !CreateControl(parent, id, pos, size, style, validator, name) ) + return false; + + WXDWORD exstyle; + WXDWORD msStyle = MSWGetStyle(style, &exstyle); + + msStyle |= wxMSWButton::GetMultilineStyle(label); + + return MSWCreateControl(wxT("BUTTON"), msStyle, pos, size, label, exstyle); +} + +WXDWORD wxCheckBox::MSWGetStyle(long style, WXDWORD *exstyle) const +{ + // buttons never have an external border, they draw their own one + WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle); + + if ( style & wxCHK_3STATE ) + msStyle |= BS_3STATE; + else + msStyle |= BS_CHECKBOX; + + if ( style & wxALIGN_RIGHT ) + { + msStyle |= BS_LEFTTEXT | BS_RIGHT; + } + + return msStyle; +} + +// ---------------------------------------------------------------------------- +// wxCheckBox geometry +// ---------------------------------------------------------------------------- + +wxSize wxCheckBox::DoGetBestClientSize() const +{ + static int s_checkSize = 0; + + if ( !s_checkSize ) + { + wxScreenDC dc; + dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); + + s_checkSize = dc.GetCharHeight(); + } + + wxString str = wxGetWindowText(GetHWND()); + + int wCheckbox, hCheckbox; + if ( !str.empty() ) + { + wxClientDC dc(const_cast(this)); + dc.SetFont(GetFont()); + dc.GetMultiLineTextExtent(GetLabelText(str), &wCheckbox, &hCheckbox); + wCheckbox += s_checkSize + GetCharWidth(); + + if ( ::GetWindowLong(GetHwnd(), GWL_STYLE) & BS_MULTILINE ) + { + // We need to make the checkbox even wider in this case because + // otherwise it wraps lines automatically and not only on "\n"s as + // we need and this makes the size computed here wrong resulting in + // checkbox contents being truncated when it's actually displayed. + // Without this hack simple checkbox with "Some thing\n and more" + // label appears on 3 lines, not 2, under Windows 2003 using + // classic look and feel (although it works fine under Windows 7, + // with or without themes). + wCheckbox += s_checkSize; + } + + if ( hCheckbox < s_checkSize ) + hCheckbox = s_checkSize; + } + else + { + wCheckbox = s_checkSize; + hCheckbox = s_checkSize; + } +#ifdef __WXWINCE__ + hCheckbox += 1; +#endif + + wxSize best(wCheckbox, hCheckbox); + CacheBestSize(best); + return best; +} + +// ---------------------------------------------------------------------------- +// wxCheckBox operations +// ---------------------------------------------------------------------------- + +void wxCheckBox::SetLabel(const wxString& label) +{ + wxMSWButton::UpdateMultilineStyle(GetHwnd(), label); + + wxCheckBoxBase::SetLabel(label); +} + +void wxCheckBox::SetValue(bool val) +{ + Set3StateValue(val ? wxCHK_CHECKED : wxCHK_UNCHECKED); +} + +bool wxCheckBox::GetValue() const +{ + return Get3StateValue() != wxCHK_UNCHECKED; +} + +void wxCheckBox::Command(wxCommandEvent& event) +{ + int state = event.GetInt(); + wxCHECK_RET( (state == wxCHK_UNCHECKED) || (state == wxCHK_CHECKED) + || (state == wxCHK_UNDETERMINED), + wxT("event.GetInt() returned an invalid checkbox state") ); + + Set3StateValue((wxCheckBoxState) state); + ProcessCommand(event); +} + +wxCOMPILE_TIME_ASSERT(wxCHK_UNCHECKED == BST_UNCHECKED + && wxCHK_CHECKED == BST_CHECKED + && wxCHK_UNDETERMINED == BST_INDETERMINATE, EnumValuesIncorrect); + +void wxCheckBox::DoSet3StateValue(wxCheckBoxState state) +{ + m_state = state; + if ( !IsOwnerDrawn() ) + ::SendMessage(GetHwnd(), BM_SETCHECK, (WPARAM) state, 0); + else // owner drawn buttons don't react to this message + Refresh(); +} + +wxCheckBoxState wxCheckBox::DoGet3StateValue() const +{ + return m_state; +} + +bool wxCheckBox::MSWCommand(WXUINT cmd, WXWORD WXUNUSED(id)) +{ + if ( cmd != BN_CLICKED && cmd != BN_DBLCLK ) + return false; + + // first update the value so that user event handler gets the new checkbox + // value + + // ownerdrawn buttons don't manage their state themselves unlike usual + // auto checkboxes so do it ourselves in any case + wxCheckBoxState state; + if ( Is3rdStateAllowedForUser() ) + { + state = (wxCheckBoxState)((m_state + 1) % 3); + } + else // 2 state checkbox (at least from users point of view) + { + // note that wxCHK_UNDETERMINED also becomes unchecked when clicked + state = m_state == wxCHK_UNCHECKED ? wxCHK_CHECKED : wxCHK_UNCHECKED; + } + + DoSet3StateValue(state); + + + // generate the event + wxCommandEvent event(wxEVT_CHECKBOX, m_windowId); + + event.SetInt(state); + event.SetEventObject(this); + ProcessCommand(event); + + return true; +} + +// ---------------------------------------------------------------------------- +// owner drawn checkboxes stuff +// ---------------------------------------------------------------------------- + +bool wxCheckBox::SetForegroundColour(const wxColour& colour) +{ + if ( !wxCheckBoxBase::SetForegroundColour(colour) ) + return false; + + // the only way to change the checkbox foreground colour under Windows XP + // is to owner draw it + if ( wxUxThemeEngine::GetIfActive() ) + MSWMakeOwnerDrawn(colour.IsOk()); + + return true; +} + +bool wxCheckBox::IsOwnerDrawn() const +{ + return + (::GetWindowLong(GetHwnd(), GWL_STYLE) & BS_OWNERDRAW) == BS_OWNERDRAW; +} + +void wxCheckBox::MSWMakeOwnerDrawn(bool ownerDrawn) +{ + long style = ::GetWindowLong(GetHwnd(), GWL_STYLE); + + // note that BS_CHECKBOX & BS_OWNERDRAW != 0 so we can't operate on + // them as on independent style bits + if ( ownerDrawn ) + { + style &= ~(BS_CHECKBOX | BS_3STATE); + style |= BS_OWNERDRAW; + + Connect(wxEVT_ENTER_WINDOW, + wxMouseEventHandler(wxCheckBox::OnMouseEnterOrLeave)); + Connect(wxEVT_LEAVE_WINDOW, + wxMouseEventHandler(wxCheckBox::OnMouseEnterOrLeave)); + Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(wxCheckBox::OnMouseLeft)); + Connect(wxEVT_LEFT_UP, wxMouseEventHandler(wxCheckBox::OnMouseLeft)); + Connect(wxEVT_SET_FOCUS, wxFocusEventHandler(wxCheckBox::OnFocus)); + Connect(wxEVT_KILL_FOCUS, wxFocusEventHandler(wxCheckBox::OnFocus)); + } + else // reset to default colour + { + style &= ~BS_OWNERDRAW; + style |= HasFlag(wxCHK_3STATE) ? BS_3STATE : BS_CHECKBOX; + + Disconnect(wxEVT_ENTER_WINDOW, + wxMouseEventHandler(wxCheckBox::OnMouseEnterOrLeave)); + Disconnect(wxEVT_LEAVE_WINDOW, + wxMouseEventHandler(wxCheckBox::OnMouseEnterOrLeave)); + Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(wxCheckBox::OnMouseLeft)); + Disconnect(wxEVT_LEFT_UP, wxMouseEventHandler(wxCheckBox::OnMouseLeft)); + Disconnect(wxEVT_SET_FOCUS, wxFocusEventHandler(wxCheckBox::OnFocus)); + Disconnect(wxEVT_KILL_FOCUS, wxFocusEventHandler(wxCheckBox::OnFocus)); + } + + ::SetWindowLong(GetHwnd(), GWL_STYLE, style); + + if ( !ownerDrawn ) + { + // ensure that controls state is consistent with internal state + DoSet3StateValue(m_state); + } +} + +void wxCheckBox::OnMouseEnterOrLeave(wxMouseEvent& event) +{ + m_isHot = event.GetEventType() == wxEVT_ENTER_WINDOW; + if ( !m_isHot ) + m_isPressed = false; + + Refresh(); + + event.Skip(); +} + +void wxCheckBox::OnMouseLeft(wxMouseEvent& event) +{ + // TODO: we should capture the mouse here to be notified about left up + // event but this interferes with BN_CLICKED generation so if we + // want to do this we'd need to generate them ourselves + m_isPressed = event.GetEventType() == wxEVT_LEFT_DOWN; + Refresh(); + + event.Skip(); +} + +void wxCheckBox::OnFocus(wxFocusEvent& event) +{ + Refresh(); + + event.Skip(); +} + +bool wxCheckBox::MSWOnDraw(WXDRAWITEMSTRUCT *item) +{ + DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)item; + + if ( !IsOwnerDrawn() || dis->CtlType != ODT_BUTTON ) + return wxCheckBoxBase::MSWOnDraw(item); + + // calculate the rectangles for the check mark itself and the label + HDC hdc = dis->hDC; + RECT& rect = dis->rcItem; + RECT rectCheck, + rectLabel; + rectLabel.top = rect.top + (rect.bottom - rect.top - GetBestSize().y) / 2; + rectLabel.bottom = rectLabel.top + GetBestSize().y; + const int MARGIN = 3; + const int CXMENUCHECK = ::GetSystemMetrics(SM_CXMENUCHECK); + // the space between the checkbox and the label is included in the + // check-mark bitmap + const int checkSize = wxMin(CXMENUCHECK - MARGIN, GetSize().y); + rectCheck.top = rect.top + (rect.bottom - rect.top - checkSize) / 2; + rectCheck.bottom = rectCheck.top + checkSize; + + const bool isRightAligned = HasFlag(wxALIGN_RIGHT); + if ( isRightAligned ) + { + rectLabel.right = rect.right - CXMENUCHECK; + rectLabel.left = rect.left; + + rectCheck.left = rectLabel.right + ( CXMENUCHECK + MARGIN - checkSize ) / 2; + rectCheck.right = rectCheck.left + checkSize; + } + else // normal, left-aligned checkbox + { + rectCheck.left = rect.left + ( CXMENUCHECK - MARGIN - checkSize ) / 2; + rectCheck.right = rectCheck.left + checkSize; + + rectLabel.left = rect.left + CXMENUCHECK; + rectLabel.right = rect.right; + } + + // shall we draw a focus rect? + const bool isFocused = m_isPressed || FindFocus() == this; + + + // draw the checkbox itself + wxDCTemp dc(hdc); + + int flags = 0; + if ( !IsEnabled() ) + flags |= wxCONTROL_DISABLED; + switch ( Get3StateValue() ) + { + case wxCHK_CHECKED: + flags |= wxCONTROL_CHECKED; + break; + + case wxCHK_UNDETERMINED: + flags |= wxCONTROL_PRESSED; + break; + + default: + wxFAIL_MSG( wxT("unexpected Get3StateValue() return value") ); + // fall through + + case wxCHK_UNCHECKED: + // no extra styles needed + break; + } + + if ( wxFindWindowAtPoint(wxGetMousePosition()) == this ) + flags |= wxCONTROL_CURRENT; + + wxRendererNative::Get(). + DrawCheckBox(this, dc, wxRectFromRECT(rectCheck), flags); + + // draw the text + const wxString& label = GetLabel(); + + // first we need to measure it + UINT fmt = DT_NOCLIP; + + // drawing underlying doesn't look well with focus rect (and the native + // control doesn't do it) + if ( isFocused ) + fmt |= DT_HIDEPREFIX; + if ( isRightAligned ) + fmt |= DT_RIGHT; + // TODO: also use DT_HIDEPREFIX if the system is configured so + + // we need to get the label real size first if we have to draw a focus rect + // around it + if ( isFocused ) + { + RECT oldLabelRect = rectLabel; // needed if right aligned + + if ( !::DrawText(hdc, label.t_str(), label.length(), &rectLabel, + fmt | DT_CALCRECT) ) + { + wxLogLastError(wxT("DrawText(DT_CALCRECT)")); + } + + if ( isRightAligned ) + { + // move the label rect to the right + const int labelWidth = rectLabel.right - rectLabel.left; + rectLabel.right = oldLabelRect.right; + rectLabel.left = rectLabel.right - labelWidth; + } + } + + if ( !IsEnabled() ) + { + ::SetTextColor(hdc, ::GetSysColor(COLOR_GRAYTEXT)); + } + + if ( !::DrawText(hdc, label.t_str(), label.length(), &rectLabel, fmt) ) + { + wxLogLastError(wxT("DrawText()")); + } + + // finally draw the focus + if ( isFocused ) + { + rectLabel.left--; + rectLabel.right++; + if ( !::DrawFocusRect(hdc, &rectLabel) ) + { + wxLogLastError(wxT("DrawFocusRect()")); + } + } + + return true; +} + +#endif // wxUSE_CHECKBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/checklst.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/checklst.cpp new file mode 100644 index 0000000000..36484a73a9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/checklst.cpp @@ -0,0 +1,434 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/msw/checklst.cpp +// Purpose: implementation of wxCheckListBox class +// Author: Vadim Zeitlin +// Modified by: +// Created: 16.11.97 +// Copyright: (c) 1998 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CHECKLISTBOX && wxUSE_OWNER_DRAWN + +#include "wx/checklst.h" + +#ifndef WX_PRECOMP + #include "wx/msw/wrapcctl.h" + #include "wx/object.h" + #include "wx/colour.h" + #include "wx/font.h" + #include "wx/bitmap.h" + #include "wx/window.h" + #include "wx/listbox.h" + #include "wx/dcmemory.h" + #include "wx/settings.h" + #include "wx/log.h" +#endif + +#include "wx/ownerdrw.h" + +#include + +#include "wx/renderer.h" +#include "wx/msw/private.h" +#include "wx/msw/dc.h" + +// ---------------------------------------------------------------------------- +// private functions +// ---------------------------------------------------------------------------- + +// get item (converted to right type) +#define GetItem(n) ((wxCheckListBoxItem *)(GetItem(n))) + +namespace +{ + // space around check mark bitmap in pixels + static const int CHECKMARK_EXTRA_SPACE = 1; + + // space between check bitmap and text label + static const int CHECKMARK_LABEL_SPACE = 2; + +} // anonymous namespace + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// declaration and implementation of wxCheckListBoxItem class +// ---------------------------------------------------------------------------- + +class wxCheckListBoxItem : public wxOwnerDrawn +{ +public: + // ctor + wxCheckListBoxItem(wxCheckListBox *parent); + + // drawing functions + virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat); + + // simple accessors and operations + wxCheckListBox *GetParent() const + { return m_parent; } + + int GetIndex() const + { return m_parent->GetItemIndex(const_cast(this)); } + + wxString GetName() const + { return m_parent->GetString(GetIndex()); } + + + bool IsChecked() const + { return m_checked; } + + void Check(bool bCheck) + { m_checked = bCheck; } + + void Toggle() + { Check(!IsChecked()); } + +private: + wxCheckListBox *m_parent; + bool m_checked; + + wxDECLARE_NO_COPY_CLASS(wxCheckListBoxItem); +}; + +wxCheckListBoxItem::wxCheckListBoxItem(wxCheckListBox *parent) +{ + m_parent = parent; + m_checked = false; + + wxSize size = wxRendererNative::Get().GetCheckBoxSize(parent); + size.x += 2 * CHECKMARK_EXTRA_SPACE + CHECKMARK_LABEL_SPACE; + + SetMarginWidth(size.GetWidth()); + SetBackgroundColour(parent->GetBackgroundColour()); +} + +bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc, + wxODAction act, wxODStatus stat) +{ + // first draw the label + if ( !wxOwnerDrawn::OnDrawItem(dc, rc, act, stat) ) + return false; + + // now draw the check mark part + wxMSWDCImpl *impl = (wxMSWDCImpl*) dc.GetImpl(); + HDC hdc = GetHdcOf(*impl); + + wxSize size = wxRendererNative::Get().GetCheckBoxSize(GetParent()); + + // first create bitmap in a memory DC + MemoryHDC hdcMem(hdc); + CompatibleBitmap hBmpCheck(hdc, size.GetWidth(), size.GetHeight()); + + // then draw a check mark into it + { + SelectInHDC selBmp(hdcMem, hBmpCheck); + + int flags = wxCONTROL_FLAT; + if ( IsChecked() ) + flags |= wxCONTROL_CHECKED; + + wxDCTemp dcMem(hdcMem); + wxRendererNative::Get().DrawCheckBox(GetParent(), dcMem, wxRect(size), flags); + } // select hBmpCheck out of hdcMem + + // finally draw bitmap to screen + + // position of check mark bitmap + int x = rc.GetX() + CHECKMARK_EXTRA_SPACE; + int y = rc.GetY() + (rc.GetHeight() - size.GetHeight()) / 2; + + UINT uState = stat & wxOwnerDrawn::wxODSelected ? wxDSB_SELECTED : wxDSB_NORMAL; + wxDrawStateBitmap(hdc, hBmpCheck, x, y, uState); + + return true; +} + +// ---------------------------------------------------------------------------- +// implementation of wxCheckListBox class +// ---------------------------------------------------------------------------- + +// define event table +// ------------------ +BEGIN_EVENT_TABLE(wxCheckListBox, wxListBox) + EVT_KEY_DOWN(wxCheckListBox::OnKeyDown) + EVT_LEFT_DOWN(wxCheckListBox::OnLeftClick) +END_EVENT_TABLE() + +// control creation +// ---------------- + +// def ctor: use Create() to really create the control +wxCheckListBox::wxCheckListBox() +{ +} + +// ctor which creates the associated control +wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, + int nStrings, const wxString choices[], + long style, const wxValidator& val, + const wxString& name) +{ + Create(parent, id, pos, size, nStrings, choices, style, val, name); +} + +wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, + const wxArrayString& choices, + long style, const wxValidator& val, + const wxString& name) +{ + Create(parent, id, pos, size, choices, style, val, name); +} + +bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, + int n, const wxString choices[], + long style, + const wxValidator& validator, const wxString& name) +{ + return wxListBox::Create(parent, id, pos, size, n, choices, + style | wxLB_OWNERDRAW, validator, name); +} + +bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator, const wxString& name) +{ + return wxListBox::Create(parent, id, pos, size, choices, + style | wxLB_OWNERDRAW, validator, name); +} + +// create/retrieve item +// -------------------- + +// create a check list box item +wxOwnerDrawn *wxCheckListBox::CreateLboxItem(size_t WXUNUSED(n)) +{ + wxCheckListBoxItem *pItem = new wxCheckListBoxItem(this); + return pItem; +} + +// return item size +// ---------------- +bool wxCheckListBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item) +{ + if ( wxListBox::MSWOnMeasure(item) ) + { + MEASUREITEMSTRUCT *pStruct = (MEASUREITEMSTRUCT *)item; + + wxSize size = wxRendererNative::Get().GetCheckBoxSize(this); + size.x += 2 * CHECKMARK_EXTRA_SPACE; + size.y += 2 * CHECKMARK_EXTRA_SPACE; + + // add place for the check mark + pStruct->itemWidth += size.GetWidth(); + + if ( pStruct->itemHeight < static_cast(size.GetHeight()) ) + pStruct->itemHeight = size.GetHeight(); + + return true; + } + + return false; + } + +// check items +// ----------- + +bool wxCheckListBox::IsChecked(unsigned int uiIndex) const +{ + wxCHECK_MSG( IsValid(uiIndex), false, wxT("bad wxCheckListBox index") ); + + return GetItem(uiIndex)->IsChecked(); +} + +void wxCheckListBox::Check(unsigned int uiIndex, bool bCheck) +{ + wxCHECK_RET( IsValid(uiIndex), wxT("bad wxCheckListBox index") ); + + GetItem(uiIndex)->Check(bCheck); + RefreshItem(uiIndex); +} + +void wxCheckListBox::Toggle(unsigned int uiIndex) +{ + wxCHECK_RET( IsValid(uiIndex), wxT("bad wxCheckListBox index") ); + + GetItem(uiIndex)->Toggle(); + RefreshItem(uiIndex); +} + +// process events +// -------------- + +void wxCheckListBox::OnKeyDown(wxKeyEvent& event) +{ + // what do we do? + enum + { + NONE, + TOGGLE, + SET, + CLEAR + } oper; + + switch ( event.GetKeyCode() ) + { + case WXK_SPACE: + oper = TOGGLE; + break; + + case WXK_NUMPAD_ADD: + case '+': + oper = SET; + break; + + case WXK_NUMPAD_SUBTRACT: + case '-': + oper = CLEAR; + break; + + default: + oper = NONE; + } + + if ( oper != NONE ) + { + wxArrayInt selections; + int count = 0; + if ( HasMultipleSelection() ) + { + count = GetSelections(selections); + } + else + { + int sel = GetSelection(); + if (sel != -1) + { + count = 1; + selections.Add(sel); + } + } + + for ( int i = 0; i < count; i++ ) + { + int nItem = selections[i]; + + switch ( oper ) + { + case TOGGLE: + Toggle(nItem); + break; + + case SET: + case CLEAR: + Check(nItem, oper == SET); + break; + + default: + wxFAIL_MSG( wxT("what should this key do?") ); + } + + // we should send an event as this has been done by the user and + // not by the program + SendEvent(nItem); + } + } + else // nothing to do + { + event.Skip(); + } +} + +void wxCheckListBox::OnLeftClick(wxMouseEvent& event) +{ + // clicking on the item selects it, clicking on the checkmark toggles + + int nItem = HitTest(event.GetX(), event.GetY()); + + if ( nItem != wxNOT_FOUND ) + { + wxRect rect; + GetItemRect(nItem, rect); + + // convert item rect to check mark rect + wxSize size = wxRendererNative::Get().GetCheckBoxSize(this); + rect.x += CHECKMARK_EXTRA_SPACE; + rect.y += (rect.GetHeight() - size.GetHeight()) / 2; + rect.SetSize(size); + + if ( rect.Contains(event.GetX(), event.GetY()) ) + { + // people expect to get "kill focus" event for the currently + // focused control before getting events from the other controls + // and, equally importantly, they may prevent the focus change from + // taking place at all (e.g. because the old control contents is + // invalid and needs to be corrected) in which case we shouldn't + // generate this event at all + SetFocus(); + if ( FindFocus() == this ) + { + Toggle(nItem); + SendEvent(nItem); + + // scroll one item down if the item is the last one + // and isn't visible at all + int h; + GetClientSize(NULL, &h); + if ( rect.GetBottom() > h ) + ScrollLines(1); + } + } + else + { + // implement default behaviour: clicking on the item selects it + event.Skip(); + } + } + else + { + // implement default behaviour on click outside of client zone + event.Skip(); + } +} + +wxSize wxCheckListBox::DoGetBestClientSize() const +{ + wxSize best = wxListBox::DoGetBestClientSize(); + + // add room for the checkbox + wxSize size = wxRendererNative::Get().GetCheckBoxSize(const_cast(this)); + size.x += 2 * CHECKMARK_EXTRA_SPACE; + size.y += 2 * CHECKMARK_EXTRA_SPACE; + + best.x += size.GetWidth(); + if ( best.y < size.GetHeight() ) + best.y = size.GetHeight(); + + CacheBestSize(best); + return best; +} + +#endif // wxUSE_CHECKLISTBOX diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/choice.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/choice.cpp new file mode 100644 index 0000000000..6699e1e95b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/choice.cpp @@ -0,0 +1,841 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/choice.cpp +// Purpose: wxChoice +// Author: Julian Smart +// Modified by: Vadim Zeitlin to derive from wxChoiceBase +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CHOICE && !(defined(__SMARTPHONE__) && defined(__WXWINCE__)) + +#include "wx/choice.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/app.h" + #include "wx/log.h" + #include "wx/brush.h" + #include "wx/settings.h" +#endif + +#include "wx/dynlib.h" + +#include "wx/msw/private.h" + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// creation +// ---------------------------------------------------------------------------- + +bool wxChoice::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + int n, const wxString choices[], + long style, + const wxValidator& validator, + const wxString& name) +{ + // Experience shows that wxChoice vs. wxComboBox distinction confuses + // quite a few people - try to help them + wxASSERT_MSG( !(style & wxCB_DROPDOWN) && + !(style & wxCB_READONLY) && + !(style & wxCB_SIMPLE), + wxT("this style flag is ignored by wxChoice, you ") + wxT("probably want to use a wxComboBox") ); + + return CreateAndInit(parent, id, pos, size, n, choices, style, + validator, name); +} + +bool wxChoice::CreateAndInit(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + int n, const wxString choices[], + long style, + const wxValidator& validator, + const wxString& name) +{ + // initialize wxControl + if ( !CreateControl(parent, id, pos, size, style, validator, name) ) + return false; + + // now create the real HWND + if ( !MSWCreateControl(wxT("COMBOBOX"), wxEmptyString, pos, size) ) + return false; + + + // initialize the controls contents + Append(n, choices); + + // and now we may finally size the control properly (if needed) + SetInitialSize(size); + + return true; +} + +void wxChoice::SetLabel(const wxString& label) +{ + if ( FindString(label) == wxNOT_FOUND ) + { + // unless we explicitly do this here, CB_GETCURSEL will continue to + // return the index of the previously selected item which will result + // in wrongly replacing the value being set now with the previously + // value if the user simply opens and closes (without selecting + // anything) the combobox popup + SetSelection(-1); + } + + wxChoiceBase::SetLabel(label); +} + +bool wxChoice::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + const wxArrayString& choices, + long style, + const wxValidator& validator, + const wxString& name) +{ + wxCArrayString chs(choices); + return Create(parent, id, pos, size, chs.GetCount(), chs.GetStrings(), + style, validator, name); +} + +bool wxChoice::MSWShouldPreProcessMessage(WXMSG *pMsg) +{ + MSG *msg = (MSG *) pMsg; + + // if the dropdown list is visible, don't preprocess certain keys + if ( msg->message == WM_KEYDOWN + && (msg->wParam == VK_ESCAPE || msg->wParam == VK_RETURN) ) + { + if (::SendMessage(GetHwndOf(this), CB_GETDROPPEDSTATE, 0, 0)) + { + return false; + } + } + + return wxControl::MSWShouldPreProcessMessage(pMsg); +} + +WXDWORD wxChoice::MSWGetStyle(long style, WXDWORD *exstyle) const +{ + // we never have an external border + WXDWORD msStyle = wxControl::MSWGetStyle + ( + (style & ~wxBORDER_MASK) | wxBORDER_NONE, exstyle + ); + + // WS_CLIPSIBLINGS is useful with wxChoice and doesn't seem to result in + // any problems + msStyle |= WS_CLIPSIBLINGS; + + // wxChoice-specific styles + msStyle |= CBS_DROPDOWNLIST | WS_HSCROLL | WS_VSCROLL; + if ( style & wxCB_SORT ) + msStyle |= CBS_SORT; + + return msStyle; +} + +#ifndef EP_EDITTEXT + #define EP_EDITTEXT 1 + #define ETS_NORMAL 1 +#endif + +wxVisualAttributes +wxChoice::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +{ + // it is important to return valid values for all attributes from here, + // GetXXX() below rely on this + wxVisualAttributes attrs; + + // FIXME: Use better dummy window? + wxWindow* wnd = wxTheApp->GetTopWindow(); + if (!wnd) + return attrs; + + attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + + // there doesn't seem to be any way to get the text colour using themes + // API: TMT_TEXTCOLOR doesn't work neither for EDIT nor COMBOBOX + attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); + + // NB: use EDIT, not COMBOBOX (the latter works in XP but not Vista) + attrs.colBg = wnd->MSWGetThemeColour(L"EDIT", + EP_EDITTEXT, + ETS_NORMAL, + ThemeColourBackground, + wxSYS_COLOUR_WINDOW); + + return attrs; +} + +wxChoice::~wxChoice() +{ + Clear(); +} + +bool wxChoice::MSWGetComboBoxInfo(tagCOMBOBOXINFO* info) const +{ + // TODO-Win9x: Get rid of this once we officially drop support for Win9x + // and just call the function directly. +#if wxUSE_DYNLIB_CLASS + typedef BOOL (WINAPI *GetComboBoxInfo_t)(HWND, tagCOMBOBOXINFO*); + static GetComboBoxInfo_t s_pfnGetComboBoxInfo = NULL; + static bool s_triedToLoad = false; + if ( !s_triedToLoad ) + { + s_triedToLoad = true; + wxLoadedDLL dllUser32("user32.dll"); + wxDL_INIT_FUNC(s_pfn, GetComboBoxInfo, dllUser32); + } + + if ( s_pfnGetComboBoxInfo ) + return (*s_pfnGetComboBoxInfo)(GetHwnd(), info) != 0; +#endif // wxUSE_DYNLIB_CLASS + + return false; +} + +// ---------------------------------------------------------------------------- +// adding/deleting items to/from the list +// ---------------------------------------------------------------------------- + +int wxChoice::DoInsertItems(const wxArrayStringsAdapter& items, + unsigned int pos, + void **clientData, wxClientDataType type) +{ + MSWAllocStorage(items, CB_INITSTORAGE); + + const bool append = pos == GetCount(); + + // use CB_ADDSTRING when appending at the end to make sure the control is + // resorted if it has wxCB_SORT style + const unsigned msg = append ? CB_ADDSTRING : CB_INSERTSTRING; + + if ( append ) + pos = 0; + + int n = wxNOT_FOUND; + const unsigned numItems = items.GetCount(); + for ( unsigned i = 0; i < numItems; ++i ) + { + n = MSWInsertOrAppendItem(pos, items[i], msg); + if ( n == wxNOT_FOUND ) + return n; + + if ( !append ) + pos++; + + AssignNewItemClientData(n, clientData, i, type); + } + + // we need to refresh our size in order to have enough space for the + // newly added items + if ( !IsFrozen() ) + MSWUpdateDropDownHeight(); + + InvalidateBestSize(); + + return n; +} + +void wxChoice::DoDeleteOneItem(unsigned int n) +{ + wxCHECK_RET( IsValid(n), wxT("invalid item index in wxChoice::Delete") ); + + SendMessage(GetHwnd(), CB_DELETESTRING, n, 0); + + if ( !IsFrozen() ) + MSWUpdateDropDownHeight(); + + InvalidateBestSize(); +} + +void wxChoice::DoClear() +{ + SendMessage(GetHwnd(), CB_RESETCONTENT, 0, 0); + + if ( !IsFrozen() ) + MSWUpdateDropDownHeight(); + + InvalidateBestSize(); +} + +// ---------------------------------------------------------------------------- +// selection +// ---------------------------------------------------------------------------- + +int wxChoice::GetSelection() const +{ + // if m_lastAcceptedSelection is set, it means that the dropdown is + // currently shown and that we want to use the last "permanent" selection + // instead of whatever is under the mouse pointer currently + // + // otherwise, get the selection from the control + return m_lastAcceptedSelection == wxID_NONE ? GetCurrentSelection() + : m_lastAcceptedSelection; +} + +int wxChoice::GetCurrentSelection() const +{ + return (int)SendMessage(GetHwnd(), CB_GETCURSEL, 0, 0); +} + +void wxChoice::SetSelection(int n) +{ + SendMessage(GetHwnd(), CB_SETCURSEL, n, 0); +} + +// ---------------------------------------------------------------------------- +// string list functions +// ---------------------------------------------------------------------------- + +unsigned int wxChoice::GetCount() const +{ + return (unsigned int)SendMessage(GetHwnd(), CB_GETCOUNT, 0, 0); +} + +int wxChoice::FindString(const wxString& s, bool bCase) const +{ +#if defined(__WATCOMC__) && defined(__WIN386__) + // For some reason, Watcom in WIN386 mode crashes in the CB_FINDSTRINGEXACT message. + // wxChoice::Do it the long way instead. + unsigned int count = GetCount(); + for ( unsigned int i = 0; i < count; i++ ) + { + // as CB_FINDSTRINGEXACT is case insensitive, be case insensitive too + if (GetString(i).IsSameAs(s, bCase)) + return i; + } + + return wxNOT_FOUND; +#else // !Watcom + //TODO: Evidently some MSW versions (all?) don't like empty strings + //passed to SendMessage, so we have to do it ourselves in that case + if ( s.empty() ) + { + unsigned int count = GetCount(); + for ( unsigned int i = 0; i < count; i++ ) + { + if (GetString(i).empty()) + return i; + } + + return wxNOT_FOUND; + } + else if (bCase) + { + // back to base class search for not native search type + return wxItemContainerImmutable::FindString( s, bCase ); + } + else + { + int pos = (int)SendMessage(GetHwnd(), CB_FINDSTRINGEXACT, + (WPARAM)-1, wxMSW_CONV_LPARAM(s)); + + return pos == LB_ERR ? wxNOT_FOUND : pos; + } +#endif // Watcom/!Watcom +} + +void wxChoice::SetString(unsigned int n, const wxString& s) +{ + wxCHECK_RET( IsValid(n), wxT("invalid item index in wxChoice::SetString") ); + + // we have to delete and add back the string as there is no way to change a + // string in place + + // we need to preserve the client data manually + void *oldData = NULL; + wxClientData *oldObjData = NULL; + if ( HasClientUntypedData() ) + oldData = GetClientData(n); + else if ( HasClientObjectData() ) + oldObjData = GetClientObject(n); + + // and also the selection if we're going to delete the item that was + // selected + const bool wasSelected = static_cast(n) == GetSelection(); + + ::SendMessage(GetHwnd(), CB_DELETESTRING, n, 0); + ::SendMessage(GetHwnd(), CB_INSERTSTRING, n, wxMSW_CONV_LPARAM(s) ); + + // restore the client data + if ( oldData ) + SetClientData(n, oldData); + else if ( oldObjData ) + SetClientObject(n, oldObjData); + + // and the selection + if ( wasSelected ) + SetSelection(n); + + // the width could have changed so the best size needs to be recomputed + InvalidateBestSize(); +} + +wxString wxChoice::GetString(unsigned int n) const +{ + int len = (int)::SendMessage(GetHwnd(), CB_GETLBTEXTLEN, n, 0); + + wxString str; + if ( len != CB_ERR && len > 0 ) + { + if ( ::SendMessage + ( + GetHwnd(), + CB_GETLBTEXT, + n, + (LPARAM)(wxChar *)wxStringBuffer(str, len) + ) == CB_ERR ) + { + wxLogLastError(wxT("SendMessage(CB_GETLBTEXT)")); + } + } + + return str; +} + +// ---------------------------------------------------------------------------- +// client data +// ---------------------------------------------------------------------------- + +void wxChoice::DoSetItemClientData(unsigned int n, void* clientData) +{ + if ( ::SendMessage(GetHwnd(), CB_SETITEMDATA, + n, (LPARAM)clientData) == CB_ERR ) + { + wxLogLastError(wxT("CB_SETITEMDATA")); + } +} + +void* wxChoice::DoGetItemClientData(unsigned int n) const +{ + // Before using GetLastError() below, ensure that we don't have a stale + // error code from a previous API call as CB_GETITEMDATA doesn't reset it + // in case of success, it only sets it if an error occurs. + SetLastError(ERROR_SUCCESS); + + LPARAM rc = SendMessage(GetHwnd(), CB_GETITEMDATA, n, 0); + + // Notice that we must call GetLastError() to distinguish between a real + // error and successfully retrieving a previously stored client data value + // of CB_ERR (-1). + if ( rc == CB_ERR && GetLastError() != ERROR_SUCCESS ) + { + wxLogLastError(wxT("CB_GETITEMDATA")); + + // unfortunately, there is no way to return an error code to the user + rc = (LPARAM) NULL; + } + + return (void *)rc; +} + +// ---------------------------------------------------------------------------- +// wxMSW-specific geometry management +// ---------------------------------------------------------------------------- + +namespace +{ + +// there is a difference between the height passed to CB_SETITEMHEIGHT and the +// real height of the combobox; it is probably not constant for all Windows +// versions/settings but right now I don't know how to find what it is so it is +// temporarily hardcoded to its value under XP systems with normal fonts sizes +const int COMBO_HEIGHT_ADJ = 6; + +} // anonymous namespace + +void wxChoice::MSWUpdateVisibleHeight() +{ + if ( m_heightOwn != wxDefaultCoord ) + { + ::SendMessage(GetHwnd(), CB_SETITEMHEIGHT, + (WPARAM)-1, m_heightOwn - COMBO_HEIGHT_ADJ); + } +} + +#if wxUSE_DEFERRED_SIZING +void wxChoice::MSWEndDeferWindowPos() +{ + // we can only set the height of the choice itself now as it is reset to + // default every time the control is resized + MSWUpdateVisibleHeight(); + + wxChoiceBase::MSWEndDeferWindowPos(); +} +#endif // wxUSE_DEFERRED_SIZING + +void wxChoice::MSWUpdateDropDownHeight() +{ + // be careful to not change the width here + DoSetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, GetSize().y, + wxSIZE_USE_EXISTING); +} + +void wxChoice::DoMoveWindow(int x, int y, int width, int height) +{ + // here is why this is necessary: if the width is negative, the combobox + // window proc makes the window of the size width*height instead of + // interpreting height in the usual manner (meaning the height of the drop + // down list - usually the height specified in the call to MoveWindow() + // will not change the height of combo box per se) + // + // this behaviour is not documented anywhere, but this is just how it is + // here (NT 4.4) and, anyhow, the check shouldn't hurt - however without + // the check, constraints/sizers using combos may break the height + // constraint will have not at all the same value as expected + if ( width < 0 ) + return; + + wxControl::DoMoveWindow(x, y, width, height); +} + +void wxChoice::DoGetSize(int *w, int *h) const +{ + wxControl::DoGetSize(w, h); + + // this is weird: sometimes, the height returned by Windows is clearly the + // total height of the control including the drop down list -- but only + // sometimes, and sometimes it isn't so work around this here by using our + // own stored value if we have it + if ( h && m_heightOwn != wxDefaultCoord ) + *h = m_heightOwn; +} + +void wxChoice::DoSetSize(int x, int y, + int width, int height, + int sizeFlags) +{ + const int heightBest = GetBestSize().y; + + // we need the real height below so get the current one if it's not given + if ( height == wxDefaultCoord ) + { + // height not specified, use the same as before + DoGetSize(NULL, &height); + } + else if ( height == heightBest ) + { + // we don't need to manually manage our height, let the system use the + // default one + m_heightOwn = wxDefaultCoord; + } + else // non-default height specified + { + // set our new own height but be careful not to make it too big: the + // native control apparently stores it as a single byte and so setting + // own height to 256 pixels results in default height being used (255 + // is still ok) + m_heightOwn = height; + + if ( m_heightOwn > UCHAR_MAX ) + m_heightOwn = UCHAR_MAX; + // nor too small: see MSWUpdateVisibleHeight() + else if ( m_heightOwn < COMBO_HEIGHT_ADJ ) + m_heightOwn = COMBO_HEIGHT_ADJ; + } + + + // the height which we must pass to Windows should be the total height of + // the control including the drop down list while the height given to us + // is, of course, just the height of the permanently visible part of it so + // add the drop down height to it + + // don't make the drop down list too tall, arbitrarily limit it to 30 + // items max and also don't make it too small if it's currently empty + size_t nItems = GetCount(); + if (!HasFlag(wxCB_SIMPLE)) + { + if ( !nItems ) + nItems = 9; + else if ( nItems > 30 ) + nItems = 30; + } + + const int hItem = SendMessage(GetHwnd(), CB_GETITEMHEIGHT, 0, 0); + int heightWithItems = 0; + if (!HasFlag(wxCB_SIMPLE)) + // The extra item (" + 1") is required to prevent a vertical + // scrollbar from appearing with comctl32.dll versions earlier + // than 6.0 (such as found in Win2k). + heightWithItems = height + hItem*(nItems + 1); + else + heightWithItems = SetHeightSimpleComboBox(nItems); + + + // do resize the native control + wxControl::DoSetSize(x, y, width, heightWithItems, sizeFlags); + + + // make the control itself of the requested height: notice that this + // must be done after changing its size or it has no effect (apparently + // the height is reset to default during the control layout) and that it's + // useless to do it when using the deferred sizing -- in this case it + // will be done from MSWEndDeferWindowPos() +#if wxUSE_DEFERRED_SIZING + if ( m_pendingSize == wxDefaultSize ) + { + // not using deferred sizing, update it immediately + MSWUpdateVisibleHeight(); + } + else // in the middle of deferred sizing + { + // we need to report the size of the visible part of the control back + // in GetSize() and not height stored by DoSetSize() in m_pendingSize + m_pendingSize = wxSize(width, height); + } +#else // !wxUSE_DEFERRED_SIZING + // always update the visible height immediately + MSWUpdateVisibleHeight(); +#endif // wxUSE_DEFERRED_SIZING +} + +wxSize wxChoice::DoGetBestSize() const +{ + // The base version returns the size of the largest string + return GetSizeFromTextSize(wxChoiceBase::DoGetBestSize().x); +} + +int wxChoice::SetHeightSimpleComboBox(int nItems) const +{ + int cx, cy; + wxGetCharSize( GetHWND(), &cx, &cy, GetFont() ); + int hItem = SendMessage(GetHwnd(), CB_GETITEMHEIGHT, (WPARAM)-1, 0); + return EDIT_HEIGHT_FROM_CHAR_HEIGHT( cy ) * wxMin( wxMax( nItems, 3 ), 6 ) + hItem - 1; +} + +wxSize wxChoice::DoGetSizeFromTextSize(int xlen, int ylen) const +{ + int cHeight = GetCharHeight(); + + // We are interested in the difference of sizes between the whole control + // and its child part. I.e. arrow, separators, etc. + wxSize tsize(xlen, 0); + + // FIXME-VC6: Only VC6 needs this guard, see WINVER definition in + // include/wx/msw/wrapwin.h +#if defined(WINVER) && WINVER >= 0x0500 + WinStruct info; + if ( MSWGetComboBoxInfo(&info) ) + { + tsize.x += info.rcItem.left + info.rcButton.right - info.rcItem.right + + info.rcItem.left + 3; // right and extra margins + } + else // Just use some rough approximation. +#endif // WINVER >= 0x0500 + { + tsize.x += 4*cHeight; + } + + // set height on our own + if( HasFlag( wxCB_SIMPLE ) ) + tsize.y = SetHeightSimpleComboBox(GetCount()); + else + tsize.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cHeight); + + // Perhaps the user wants something different from CharHeight + if ( ylen > 0 ) + tsize.IncBy(0, ylen - cHeight); + + return tsize; +} + +// ---------------------------------------------------------------------------- +// Popup operations +// ---------------------------------------------------------------------------- + +void wxChoice::MSWDoPopupOrDismiss(bool show) +{ + wxASSERT_MSG( !HasFlag(wxCB_SIMPLE), + wxT("can't popup/dismiss the list for simple combo box") ); + + // we *must* set focus to the combobox before showing or hiding the drop + // down as without this we get WM_LBUTTONDOWN messages with invalid HWND + // when hiding it (whether programmatically or manually) resulting in a + // crash when we pass them to IsDialogMessage() + // + // this can be seen in the combo page of the widgets sample under Windows 7 + SetFocus(); + + ::SendMessage(GetHwnd(), CB_SHOWDROPDOWN, show, 0); +} + +bool wxChoice::Show(bool show) +{ + if ( !wxChoiceBase::Show(show) ) + return false; + + // When hiding the combobox, we also need to hide its popup part as it + // doesn't happen automatically. + if ( !show && ::SendMessage(GetHwnd(), CB_GETDROPPEDSTATE, 0, 0) ) + MSWDoPopupOrDismiss(false); + + return true; +} + +// ---------------------------------------------------------------------------- +// MSW message handlers +// ---------------------------------------------------------------------------- + +WXLRESULT wxChoice::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) +{ + switch ( nMsg ) + { + case WM_LBUTTONUP: + { + int x = (int)LOWORD(lParam); + int y = (int)HIWORD(lParam); + + // Ok, this is truly weird, but if a panel with a wxChoice + // loses the focus, then you get a *fake* WM_LBUTTONUP message + // with x = 65535 and y = 65535. Filter out this nonsense. + // + // VZ: I'd like to know how to reproduce this please... + if ( x == 65535 && y == 65535 ) + return 0; + } + break; + + // we have to handle both: one for the normal case and the other + // for readonly + case WM_CTLCOLOREDIT: + case WM_CTLCOLORLISTBOX: + case WM_CTLCOLORSTATIC: + { + WXHDC hdc; + WXHWND hwnd; + UnpackCtlColor(wParam, lParam, &hdc, &hwnd); + + WXHBRUSH hbr = MSWControlColor((WXHDC)hdc, hwnd); + if ( hbr ) + return (WXLRESULT)hbr; + //else: fall through to default window proc + } + } + + return wxWindow::MSWWindowProc(nMsg, wParam, lParam); +} + +bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) +{ + /* + The native control provides a great variety in the events it sends in + the different selection scenarios (undoubtedly for greater amusement of + the programmers using it). Here are the different cases: + + A. Selecting with just the arrows without opening the dropdown: + 1. CBN_SELENDOK + 2. CBN_SELCHANGE + + B. Opening dropdown with F4 and selecting with arrows: + 1. CBN_DROPDOWN + 2. many CBN_SELCHANGE while changing selection in the list + 3. CBN_SELENDOK + 4. CBN_CLOSEUP + + C. Selecting with the mouse: + 1. CBN_DROPDOWN + -- no intermediate CBN_SELCHANGEs -- + 2. CBN_SELENDOK + 3. CBN_CLOSEUP + 4. CBN_SELCHANGE + + Admire the different order of messages in all of those cases, it must + surely have taken a lot of effort to Microsoft developers to achieve + such originality. + + Additionally, notice that CBN_SELENDCANCEL doesn't seem to actually + cancel anything, if we get CBN_SELCHANGE before it, as it happens in + the case (B), the selection is still accepted. This doesn't make much + sense and directly contradicts MSDN documentation but is how the native + comboboxes behave and so we do the same thing. + */ + switch ( param ) + { + case CBN_DROPDOWN: + // we use this value both because we don't want to track selection + // using CB_GETCURSEL while the dropdown is opened and because we + // need to reset the selection back to it if it's eventually + // cancelled by user + m_lastAcceptedSelection = GetCurrentSelection(); + break; + + case CBN_CLOSEUP: + if ( m_pendingSelection != wxID_NONE ) + { + // This can only happen in the case (B), so set the item + // selected in the drop down as our real selection. + SendSelectionChangedEvent(wxEVT_CHOICE); + m_pendingSelection = wxID_NONE; + } + break; + + case CBN_SELENDOK: + // Reset the variables to prevent CBN_CLOSEUP from doing anything, + // it's not needed if we do get CBN_SELENDOK. + m_lastAcceptedSelection = + m_pendingSelection = wxID_NONE; + + SendSelectionChangedEvent(wxEVT_CHOICE); + break; + + case CBN_SELCHANGE: + // If we get this event after CBN_SELENDOK, i.e. cases (A) or (C) + // above, we don't have anything to do. But in the case (B) we need + // to remember that the selection should really change once the + // drop down is closed. + if ( m_lastAcceptedSelection != wxID_NONE ) + m_pendingSelection = GetCurrentSelection(); + break; + + case CBN_SELENDCANCEL: + // Do not reset m_pendingSelection here -- it would make sense but, + // as described above, native controls keep the selection even when + // closing the drop down by pressing Escape or TAB, so conform to + // their behaviour. + m_lastAcceptedSelection = wxID_NONE; + break; + + default: + return false; + } + + return true; +} + +WXHBRUSH wxChoice::MSWControlColor(WXHDC hDC, WXHWND hWnd) +{ + if ( !IsThisEnabled() ) + return MSWControlColorDisabled(hDC); + + return wxChoiceBase::MSWControlColor(hDC, hWnd); +} + +#endif // wxUSE_CHOICE && !(__SMARTPHONE__ && __WXWINCE__) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/msw/clipbrd.cpp b/3rdparty/wxwidgets3.0-3.0.1/src/msw/clipbrd.cpp new file mode 100644 index 0000000000..81bfd9281f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/msw/clipbrd.cpp @@ -0,0 +1,947 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/msw/clipbrd.cpp +// Purpose: Clipboard functionality +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// =========================================================================== +// declarations +// =========================================================================== + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_CLIPBOARD + +#include "wx/clipbrd.h" + +#ifndef WX_PRECOMP + #include "wx/object.h" + #include "wx/event.h" + #include "wx/app.h" + #include "wx/frame.h" + #include "wx/bitmap.h" + #include "wx/utils.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/dataobj.h" +#endif + +#if wxUSE_METAFILE + #include "wx/metafile.h" +#endif + + +#include + +#include "wx/msw/private.h" +#include "wx/msw/ole/oleutils.h" + +#if wxUSE_WXDIB + #include "wx/msw/dib.h" +#endif + +// wxDataObject is tied to OLE/drag and drop implementation, therefore so are +// the functions using wxDataObject in wxClipboard +//#define wxUSE_DATAOBJ wxUSE_DRAG_AND_DROP + +#if wxUSE_OLE && !defined(__WXWINCE__) + // use OLE clipboard + #define wxUSE_OLE_CLIPBOARD 1 +#else // !wxUSE_DATAOBJ + // use Win clipboard API + #define wxUSE_OLE_CLIPBOARD 0 +#endif + +#if wxUSE_OLE_CLIPBOARD + #include +#endif // wxUSE_OLE_CLIPBOARD + +// =========================================================================== +// implementation +// =========================================================================== + +// --------------------------------------------------------------------------- +// old-style clipboard functions using Windows API +// --------------------------------------------------------------------------- + +static bool gs_wxClipboardIsOpen = false; +static int gs_htmlcfid = 0; + +bool wxOpenClipboard() +{ + wxCHECK_MSG( !gs_wxClipboardIsOpen, true, wxT("clipboard already opened.") ); + + wxWindow *win = wxTheApp->GetTopWindow(); + if ( win ) + { + gs_wxClipboardIsOpen = ::OpenClipboard((HWND)win->GetHWND()) != 0; + + if ( !gs_wxClipboardIsOpen ) + { + wxLogSysError(_("Failed to open the clipboard.")); + } + + return gs_wxClipboardIsOpen; + } + else + { + wxLogDebug(wxT("Cannot open clipboard without a main window.")); + + return false; + } +} + +bool wxCloseClipboard() +{ + wxCHECK_MSG( gs_wxClipboardIsOpen, false, wxT("clipboard is not opened") ); + + gs_wxClipboardIsOpen = false; + + if ( ::CloseClipboard() == 0 ) + { + wxLogSysError(_("Failed to close the clipboard.")); + + return false; + } + + return true; +} + +bool wxEmptyClipboard() +{ + if ( ::EmptyClipboard() == 0 ) + { + wxLogSysError(_("Failed to empty the clipboard.")); + + return false; + } + + return true; +} + +bool wxIsClipboardOpened() +{ + return gs_wxClipboardIsOpen; +} + +bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat) +{ + wxDataFormat::NativeFormat cf = dataFormat.GetFormatId(); + if (cf == wxDF_HTML) + cf = gs_htmlcfid; + + if ( ::IsClipboardFormatAvailable(cf) ) + { + // ok from the first try + return true; + } + + // for several standard formats, we can convert from some other ones too + switch ( cf ) + { + // for bitmaps, DIBs will also do + case CF_BITMAP: + return ::IsClipboardFormatAvailable(CF_DIB) != 0; + +#if wxUSE_ENH_METAFILE && !defined(__WXWINCE__) + case CF_METAFILEPICT: + return ::IsClipboardFormatAvailable(CF_ENHMETAFILE) != 0; +#endif // wxUSE_ENH_METAFILE + + default: + return false; + } +} + + +bool wxSetClipboardData(wxDataFormat dataFormat, + const void *data, + int width, int height) +{ + HANDLE handle = 0; // return value of SetClipboardData + + switch (dataFormat) + { + case wxDF_BITMAP: + { + wxBitmap *bitmap = (wxBitmap *)data; + + HDC hdcMem = CreateCompatibleDC((HDC) NULL); + HDC hdcSrc = CreateCompatibleDC((HDC) NULL); + HBITMAP old = (HBITMAP) + ::SelectObject(hdcSrc, (HBITMAP)bitmap->GetHBITMAP()); + HBITMAP hBitmap = CreateCompatibleBitmap(hdcSrc, + bitmap->GetWidth(), + bitmap->GetHeight()); + if (!hBitmap) + { + SelectObject(hdcSrc, old); + DeleteDC(hdcMem); + DeleteDC(hdcSrc); + return false; + } + + HBITMAP old1 = (HBITMAP) SelectObject(hdcMem, hBitmap); + BitBlt(hdcMem, 0, 0, bitmap->GetWidth(), bitmap->GetHeight(), + hdcSrc, 0, 0, SRCCOPY); + + // Select new bitmap out of memory DC + SelectObject(hdcMem, old1); + + // Set the data + handle = ::SetClipboardData(CF_BITMAP, hBitmap); + + // Clean up + SelectObject(hdcSrc, old); + DeleteDC(hdcSrc); + DeleteDC(hdcMem); + break; + } + +#if wxUSE_WXDIB + case wxDF_DIB: + { + wxBitmap *bitmap = (wxBitmap *)data; + + if ( bitmap && bitmap->IsOk() ) + { + wxDIB dib(*bitmap); + if ( dib.IsOk() ) + { + handle = ::SetClipboardData(CF_DIB, dib.Detach()); + } + } + break; + } +#endif + + // VZ: I'm told that this code works, but it doesn't seem to work for me + // and, anyhow, I'd be highly surprised if it did. So I leave it here + // but IMNSHO it is completely broken. +#if wxUSE_METAFILE && !defined(wxMETAFILE_IS_ENH) && !defined(__WXWINCE__) + case wxDF_METAFILE: + { + wxMetafile *wxMF = (wxMetafile *)data; + HANDLE data = GlobalAlloc(GHND, sizeof(METAFILEPICT) + 1); + METAFILEPICT *mf = (METAFILEPICT *)GlobalLock(data); + + mf->mm = wxMF->GetWindowsMappingMode(); + mf->xExt = width; + mf->yExt = height; + mf->hMF = (HMETAFILE) wxMF->GetHMETAFILE(); + GlobalUnlock(data); + wxMF->SetHMETAFILE((WXHANDLE) NULL); + + handle = SetClipboardData(CF_METAFILEPICT, data); + break; + } +#endif // wxUSE_METAFILE + +#if wxUSE_ENH_METAFILE && !defined(__WXWINCE__) + case wxDF_ENHMETAFILE: + { + wxEnhMetaFile *emf = (wxEnhMetaFile *)data; + wxEnhMetaFile emfCopy = *emf; + + handle = SetClipboardData(CF_ENHMETAFILE, + (void *)emfCopy.GetHENHMETAFILE()); + } + break; +#endif // wxUSE_ENH_METAFILE + + case CF_SYLK: + case CF_DIF: + case CF_TIFF: + case CF_PALETTE: + default: + { + wxLogError(_("Unsupported clipboard format.")); + return false; + } + + case wxDF_OEMTEXT: + dataFormat = wxDF_TEXT; + // fall through + + case wxDF_TEXT: + { + char *s = (char *)data; + + width = strlen(s) + 1; + height = 1; + DWORD l = (width * height); + HANDLE hGlobalMemory = GlobalAlloc(GHND, l); + if ( hGlobalMemory ) + { + LPSTR lpGlobalMemory = (LPSTR)GlobalLock(hGlobalMemory); + + memcpy(lpGlobalMemory, s, l); + + GlobalUnlock(hGlobalMemory); + } + + handle = SetClipboardData(dataFormat, hGlobalMemory); + break; + } + + case wxDF_HTML: + { + char* html = (char *)data; + + // Create temporary buffer for HTML header... + char *buf = new char [400 + strlen(html)]; + if(!buf) return false; + + // Create a template string for the HTML header... + strcpy(buf, + "Version:0.9\r\n" + "StartHTML:00000000\r\n" + "EndHTML:00000000\r\n" + "StartFragment:00000000\r\n" + "EndFragment:00000000\r\n" + "\r\n" + "\r\n"); + + // Append the HTML... + strcat(buf, html); + strcat(buf, "\r\n"); + // Finish up the HTML format... + strcat(buf, + "\r\n" + "\r\n" + ""); + + // Now go back, calculate all the lengths, and write out the + // necessary header information. Note, wsprintf() truncates the + // string when you overwrite it so you follow up with code to replace + // the 0 appended at the end with a '\r'... + char *ptr = strstr(buf, "StartHTML"); + sprintf(ptr+10, "%08u", (unsigned)(strstr(buf, "") - buf)); + *(ptr+10+8) = '\r'; + + ptr = strstr(buf, "EndHTML"); + sprintf(ptr+8, "%08u", (unsigned)strlen(buf)); + *(ptr+8+8) = '\r'; + + ptr = strstr(buf, "StartFragment"); + sprintf(ptr+14, "%08u", (unsigned)(strstr(buf, " png_bytep) in libpng.3 and libpng.txt (Cosmin). + Clarified that png_zalloc() does not clear the allocated memory, + and png_zalloc() and png_zfree() cannot be PNGAPI (Cosmin). + Renamed png_mem_size_t to png_alloc_size_t, fixed its definition in + pngconf.h, and used it in all memory allocation functions (Cosmin). + Renamed pngintrn.h to pngpriv.h, added a comment at the top of the file + mentioning that the symbols declared in that file are private, and + updated the scripts and the Visual C++ projects accordingly (Cosmin). + Removed circular references between pngconf.h and pngconf.h.in in + scripts/makefile.vc*win32 (Cosmin). + Removing trailing '.' from the warning and error messages (Cosmin). + Added pngdefs.h that is built by makefile or configure, instead of + pngconf.h.in (Glenn). + Detect and fix attempt to write wrong iCCP profile length. + +Version 1.4.0beta12 [October 19, 2006] + Changed "logical" to "bitwise" in the documentation. + Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h + Add a typecast to stifle compiler warning in pngrutil.c + +Version 1.4.0beta13 [November 10, 2006] + Fix potential buffer overflow in sPLT chunk handler. + Fix Makefile.am to not try to link to noexistent files. + +Version 1.4.0beta14 [November 15, 2006] + Check all exported functions for NULL png_ptr. + +Version 1.4.0beta15 [November 17, 2006] + Relocated two misplaced tests for NULL png_ptr. + Built Makefile.in with automake-1.9.6 instead of 1.9.2. + Build configure with autoconf-2.60 instead of 2.59 + Add "install: all" in Makefile.am so "configure; make install" will work. + +Version 1.4.0beta16 [November 17, 2006] + Added a typecast in png_zalloc(). + +Version 1.4.0beta17 [December 4, 2006] + Changed "new_key[79] = '\0';" to "(*new_key)[79] = '\0';" in pngwutil.c + Add "png_bytep" typecast to profile while calculating length in pngwutil.c + +Version 1.4.0beta18 [December 7, 2006] + Added scripts/CMakeLists.txt + +Version 1.4.0beta19 [May 16, 2007] + Revised scripts/CMakeLists.txt + Rebuilt configure and Makefile.in with newer tools. + Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers. + Added scripts/makefile.nommx + +Version 1.4.0beta20 [July 9, 2008] + Moved several PNG_HAVE_* macros from pngpriv.h to png.h because applications + calling set_unknown_chunk_location() need them. + Moved several macro definitions from pngpriv.h to pngconf.h + Merge with changes to the 1.2.X branch, as of 1.2.30beta04. + Deleted all use of the MMX assembler code and Intel-licensed optimizations. + Revised makefile.mingw + +Version 1.4.0beta21 [July 21, 2008] + Moved local array "chunkdata" from pngrutil.c to the png_struct, so + it will be freed by png_read_destroy() in case of a read error (Kurt + Christensen). + +Version 1.4.0beta22 [July 21, 2008] + Change "purpose" and "buffer" to png_ptr->chunkdata to avoid memory leaking. + +Version 1.4.0beta23 [July 22, 2008] + Change "chunkdata = NULL" to "png_ptr->chunkdata = NULL" several places in + png_decompress_chunk(). + +Version 1.4.0beta24 [July 25, 2008] + Change all remaining "chunkdata" to "png_ptr->chunkdata" in + png_decompress_chunk(), and remove "chunkdata" from parameter list. + Put a call to png_check_chunk_name() in png_read_chunk_header(). + Revised png_check_chunk_name() to reject a name with a lowercase 3rd byte. + Removed two calls to png_check_chunk_name() occuring later in the process. + Define PNG_NO_ERROR_NUMBERS by default in pngconf.h + +Version 1.4.0beta25 [July 30, 2008] + Added a call to png_check_chunk_name() in pngpread.c + Reverted png_check_chunk_name() to accept a name with a lowercase 3rd byte. + Added png_push_have_buffer() function to pngpread.c + Eliminated PNG_BIG_ENDIAN_SUPPORTED and associated png_get_* macros. + Made inline expansion of png_get_*() optional with PNG_USE_READ_MACROS. + Eliminated all PNG_USELESS_TESTS and PNG_CORRECT_PALETTE_SUPPORTED code. + Synced contrib directory and configure files with libpng-1.2.30beta06. + Eliminated no-longer-used pngdefs.h (but it's still built in the makefiles) + Relocated a misplaced "#endif /* PNG_NO_WRITE_FILTER */" in pngwutil.c + +Version 1.4.0beta26 [August 4, 2008] + Removed png_push_have_buffer() function in pngpread.c. It increased the + compiled library size slightly. + Changed "-Wall" to "-W -Wall" in the CFLAGS in all makefiles (Cosmin Truta) + Declared png_ptr "volatile" in pngread.c and pngwrite.c to avoid warnings. + Updated contrib/visupng/cexcept.h to version 2.0.1 + Added PNG_LITERAL_CHARACTER macros for #, [, and ]. + +Version 1.4.0beta27 [August 5, 2008] + Revised usage of PNG_LITERAL_SHARP in pngerror.c. + Moved newline character from individual png_debug messages into the + png_debug macros. + Allow user to #define their own png_debug, png_debug1, and png_debug2. + +Version 1.4.0beta28 [August 5, 2008] + Revised usage of PNG_LITERAL_SHARP in pngerror.c. + Added PNG_STRING_NEWLINE macro + +Version 1.4.0beta29 [August 9, 2008] + Revised usage of PNG_STRING_NEWLINE to work on non-ISO compilers. + Added PNG_STRING_COPYRIGHT macro. + Added non-ISO versions of png_debug macros. + +Version 1.4.0beta30 [August 14, 2008] + Added premultiplied alpha feature (Volker Wiendl). + +Version 1.4.0beta31 [August 18, 2008] + Moved png_set_premultiply_alpha from pngtrans.c to pngrtran.c + Removed extra crc check at the end of png_handle_cHRM(). Bug introduced + in libpng-1.4.0beta20. + +Version 1.4.0beta32 [August 19, 2008] + Added PNG_WRITE_FLUSH_SUPPORTED block around new png_flush() call. + Revised PNG_NO_STDIO version of png_write_flush() + +Version 1.4.0beta33 [August 20, 2008] + Added png_get|set_chunk_cache_max() to limit the total number of sPLT, + text, and unknown chunks that can be stored. + +Version 1.4.0beta34 [September 6, 2008] + Shortened tIME_string to 29 bytes in pngtest.c + Fixed off-by-one error introduced in png_push_read_zTXt() function in + libpng-1.2.30beta04/pngpread.c (Harald van Dijk) + +Version 1.4.0beta35 [October 6, 2008] + Changed "trans_values" to "trans_color". + Changed so-number from 0 to 14. Some OS do not like 0. + Revised makefile.darwin to fix shared library numbering. + Change png_set_gray_1_2_4_to_8() to png_set_expand_gray_1_2_4_to_8() + in example.c (debian bug report) + +Version 1.4.0beta36 [October 25, 2008] + Sync with tEXt vulnerability fix in libpng-1.2.33rc02. + +Version 1.4.0beta37 [November 13, 2008] + Added png_check_cHRM in png.c and moved checking from pngget.c, pngrutil.c, + and pngwrite.c + +Version 1.4.0beta38 [November 22, 2008] + Added check for zero-area RGB cHRM triangle in png_check_cHRM() and + png_check_cHRM_fixed(). + +Version 1.4.0beta39 [November 23, 2008] + Revised png_warning() to write its message on standard output by default + when warning_fn is NULL. + +Version 1.4.0beta40 [November 24, 2008] + Eliminated png_check_cHRM(). Instead, always use png_check_cHRM_fixed(). + In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant + check for all-zero coordinates that is detected by the triangle check. + +Version 1.4.0beta41 [November 26, 2008] + Fixed string vs pointer-to-string error in png_check_keyword(). + Rearranged test expressions in png_check_cHRM_fixed() to avoid internal + overflows. + Added PNG_NO_CHECK_cHRM conditional. + +Version 1.4.0beta42, 43 [December 1, 2008] + Merge png_debug with version 1.2.34beta04. + +Version 1.4.0beta44 [December 6, 2008] + Removed redundant check for key==NULL before calling png_check_keyword() + to ensure that new_key gets initialized and removed extra warning + (Merge with version 1.2.34beta05 -- Arvan Pritchard). + +Version 1.4.0beta45 [December 9, 2008] + In png_write_png(), respect the placement of the filler bytes in an earlier + call to png_set_filler() (Jim Barry). + +Version 1.4.0beta46 [December 10, 2008] + Undid previous change and added PNG_TRANSFORM_STRIP_FILLER_BEFORE and + PNG_TRANSFORM_STRIP_FILLER_AFTER conditionals and deprecated + PNG_TRANSFORM_STRIP_FILLER (Jim Barry). + +Version 1.4.0beta47 [December 15, 2008] + Support for dithering was disabled by default, because it has never + been well tested and doesn't work very well. The code has not + been removed, however, and can be enabled by building libpng with + PNG_READ_DITHER_SUPPORTED defined. + +Version 1.4.0beta48 [February 14, 2009] + Added new exported function png_calloc(). + Combined several instances of png_malloc(); png_memset() into png_calloc(). + Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24 + but was never defined. + +Version 1.4.0beta49 [February 28, 2009] + Added png_fileno() macro to pngconf.h, used in pngwio.c + Corrected order of #ifdef's in png_debug definition in png.h + Fixed bug introduced in libpng-1.4.0beta48 with the memset arguments + for pcal_params. + Fixed order of #ifdef directives in the png_debug defines in png.h + (bug introduced in libpng-1.2.34/1.4.0beta29). + Revised comments in png_set_read_fn() and png_set_write_fn(). + +Version 1.4.0beta50 [March 18, 2009] + Use png_calloc() instead of png_malloc() to allocate big_row_buf when + reading an interlaced file, to avoid a possible UMR. + Undid revision of PNG_NO_STDIO version of png_write_flush(). Users + having trouble with fflush() can build with PNG_NO_WRITE_FLUSH defined + or supply their own flush_fn() replacement. + Revised libpng*.txt and png.h documentation about use of png_write_flush() + and png_set_write_fn(). + Removed fflush() from pngtest.c. + Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h + +Version 1.4.0beta51 [March 21, 2009] + Removed new png_fileno() macro from pngconf.h . + +Version 1.4.0beta52 [March 27, 2009] + Relocated png_do_chop() ahead of building gamma tables in pngrtran.c + This avoids building 16-bit gamma tables unnecessarily. + Removed fflush() from pngtest.c. + Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h + Added a section on differences between 1.0.x and 1.2.x to libpng.3/libpng.txt + +Version 1.4.0beta53 [April 1, 2009] + Removed some remaining MMX macros from pngpriv.h + Fixed potential memory leak of "new_name" in png_write_iCCP() (Ralph Giles) + +Version 1.4.0beta54 [April 13, 2009] + Added "ifndef PNG_SKIP_SETJMP_CHECK" block in pngconf.h to allow + application code writers to bypass the check for multiple inclusion + of setjmp.h when they know that it is safe to ignore the situation. + Eliminated internal use of setjmp() in pngread.c and pngwrite.c + Reordered ancillary chunks in pngtest.png to be the same as what + pngtest now produces, and made some cosmetic changes to pngtest output. + Eliminated deprecated png_read_init_3() and png_write_init_3() functions. + +Version 1.4.0beta55 [April 15, 2009] + Simplified error handling in pngread.c and pngwrite.c by putting + the new png_read_cleanup() and png_write_cleanup() functions inline. + +Version 1.4.0beta56 [April 25, 2009] + Renamed "user_chunk_data" to "my_user_chunk_data" in pngtest.c to suppress + "shadowed declaration" warning from gcc-4.3.3. + Renamed "gamma" to "png_gamma" in pngset.c to avoid "shadowed declaration" + warning about a global "gamma" variable in math.h on some platforms. + +Version 1.4.0beta57 [May 2, 2009] + Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24 + but was never defined (again). + Rebuilt configure scripts with autoconf-2.63 instead of 2.62 + Removed pngprefs.h and MMX from makefiles + +Version 1.4.0beta58 [May 14, 2009] + Changed pngw32.def to pngwin.def in makefile.mingw (typo was introduced + in beta57). + Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri) + +Version 1.4.0beta59 [May 15, 2009] + Reformated sources in libpng style (3-space intentation, comment format) + Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG) + Added sections about the git repository and our coding style to the + documentation + Relocated misplaced #endif in pngwrite.c, sCAL chunk handler. + +Version 1.4.0beta60 [May 19, 2009] + Conditionally compile png_read_finish_row() which is not used by + progressive readers. + Added contrib/pngminim/preader to demonstrate building minimal progressive + decoder, based on contrib/gregbook with embedded libpng and zlib. + +Version 1.4.0beta61 [May 20, 2009] + In contrib/pngminim/*, renamed "makefile.std" to "makefile", since there + is only one makefile in those directories, and revised the README files + accordingly. + More reformatting of comments, mostly to capitalize sentences. + +Version 1.4.0beta62 [June 2, 2009] + Added "#define PNG_NO_WRITE_SWAP" to contrib/pngminim/encoder/pngusr.h + and "define PNG_NO_READ_SWAP" to decoder/pngusr.h and preader/pngusr.h + Reformatted several remaining "else statement" into two lines. + Added a section to the libpng documentation about using png_get_io_ptr() + in configure scripts to detect the presence of libpng. + +Version 1.4.0beta63 [June 15, 2009] + Revised libpng*.txt and libpng.3 to mention calling png_set_IHDR() + multiple times and to specify the sample order in the tRNS chunk, + because the ISO PNG specification has a typo in the tRNS table. + Changed several PNG_UNKNOWN_CHUNK_SUPPORTED to + PNG_HANDLE_AS_UNKNOWN_SUPPORTED, to make the png_set_keep mechanism + available for ignoring known chunks even when not saving unknown chunks. + Adopted preference for consistent use of "#ifdef" and "#ifndef" versus + "#if defined()" and "if !defined()" where possible. + +Version 1.4.0beta64 [June 24, 2009] + Eliminated PNG_LEGACY_SUPPORTED code. + Moved the various unknown chunk macro definitions outside of the + PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks. + +Version 1.4.0beta65 [June 26, 2009] + Added a reference to the libpng license in each file. + +Version 1.4.0beta66 [June 27, 2009] + Refer to the libpng license instead of the libpng license in each file. + +Version 1.4.0beta67 [July 6, 2009] + Relocated INVERT_ALPHA within png_read_png() and png_write_png(). + Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB. + Added an "xcode" project to the projects directory (Alam Arias). + +Version 1.4.0beta68 [July 19, 2009] + Avoid some tests in filter selection in pngwutil.c + +Version 1.4.0beta69 [July 25, 2009] + Simplified the new filter-selection test. This runs faster in the + common "PNG_ALL_FILTERS" and PNG_FILTER_NONE cases. + Removed extraneous declaration from the new call to png_read_gray_to_rgb() + (bug introduced in libpng-1.4.0beta67). + Fixed up xcode project (Alam Arias) + Added a prototype for png_64bit_product() in png.c + +Version 1.4.0beta70 [July 27, 2009] + Avoid a possible NULL dereference in debug build, in png_set_text_2(). + (bug introduced in libpng-0.95, discovered by Evan Rouault) + +Version 1.4.0beta71 [July 29, 2009] + Rebuilt configure scripts with autoconf-2.64. + +Version 1.4.0beta72 [August 1, 2009] + Replaced *.tar.lzma with *.tar.xz in distribution. Get the xz codec + from . + +Version 1.4.0beta73 [August 1, 2009] + Reject attempt to write iCCP chunk with negative embedded profile length + (JD Chen) (CVE-2009-5063). + +Version 1.4.0beta74 [August 8, 2009] + Changed png_ptr and info_ptr member "trans" to "trans_alpha". + +Version 1.4.0beta75 [August 21, 2009] + Removed an extra png_debug() recently added to png_write_find_filter(). + Fixed incorrect #ifdef in pngset.c regarding unknown chunk support. + +Version 1.4.0beta76 [August 22, 2009] + Moved an incorrectly located test in png_read_row() in pngread.c + +Version 1.4.0beta77 [August 27, 2009] + Removed lpXYZ.tar.bz2 (with CRLF), KNOWNBUG, libpng-x.y.z-KNOWNBUG.txt, + and the "noconfig" files from the distribution. + Moved CMakeLists.txt from scripts into the main libpng directory. + Various bugfixes and improvements to CMakeLists.txt (Philip Lowman) + +Version 1.4.0beta78 [August 31, 2009] + Converted all PNG_NO_* tests to PNG_*_SUPPORTED everywhere except pngconf.h + Eliminated PNG_NO_FREE_ME and PNG_FREE_ME_SUPPORTED macros. + Use png_malloc plus a loop instead of png_calloc() to initialize + row_pointers in png_read_png(). + +Version 1.4.0beta79 [September 1, 2009] + Eliminated PNG_GLOBAL_ARRAYS and PNG_LOCAL_ARRAYS; always use local arrays. + Eliminated PNG_CALLOC_SUPPORTED macro and always provide png_calloc(). + +Version 1.4.0beta80 [September 17, 2009] + Removed scripts/libpng.icc + Changed typecast of filler from png_byte to png_uint_16 in png_set_filler(). + (Dennis Gustafsson) + Fixed typo introduced in beta78 in pngtest.c ("#if def " should be "#ifdef ") + +Version 1.4.0beta81 [September 23, 2009] + Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h + Expanded TAB characters in pngrtran.c + Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid + compiler complaints about doubly declaring things "const". + Changed all "#if [!]defined(X)" to "if[n]def X" where possible. + Eliminated unused png_ptr->row_buf_size + +Version 1.4.0beta82 [September 25, 2009] + Moved redundant IHDR checking into new png_check_IHDR() in png.c + and report all errors found in the IHDR data. + Eliminated useless call to png_check_cHRM() from pngset.c + +Version 1.4.0beta83 [September 25, 2009] + Revised png_check_IHDR() to eliminate bogus complaint about filter_type. + +Version 1.4.0beta84 [September 30, 2009] + Fixed some inconsistent indentation in pngconf.h + Revised png_check_IHDR() to add a test for width variable less than 32-bit. + +Version 1.4.0beta85 [October 1, 2009] + Revised png_check_IHDR() again, to check info_ptr members instead of + the contents of the returned parameters. + +Version 1.4.0beta86 [October 9, 2009] + Updated the "xcode" project (Alam Arias). + Eliminated a shadowed declaration of "pp" in png_handle_sPLT(). + +Version 1.4.0rc01 [October 19, 2009] + Trivial cosmetic changes. + +Version 1.4.0beta87 [October 30, 2009] + Moved version 1.4.0 back into beta. + +Version 1.4.0beta88 [October 30, 2009] + Revised libpng*.txt section about differences between 1.2.x and 1.4.0 + because most of the new features have now been ported back to 1.2.41 + +Version 1.4.0beta89 [November 1, 2009] + More bugfixes and improvements to CMakeLists.txt (Philip Lowman) + Removed a harmless extra png_set_invert_alpha() from pngwrite.c + Apply png_user_chunk_cache_max within png_decompress_chunk(). + Merged libpng-1.2.41.txt with libpng-1.4.0.txt where appropriate. + +Version 1.4.0beta90 [November 2, 2009] + Removed all remaining WIN32_WCE #ifdefs except those involving the + time.h "tm" structure + +Version 1.4.0beta91 [November 3, 2009] + Updated scripts/pngw32.def and projects/wince/png32ce.def + Copied projects/wince/png32ce.def to the scripts directory. + Added scripts/makefile.wce + Patched ltmain.sh for wince support. + Added PNG_CONVERT_tIME_SUPPORTED macro. + +Version 1.4.0beta92 [November 4, 2009] + Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED + Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED + Revised libpng*.txt to describe differences from 1.2.40 to 1.4.0 (instead + of differences from 1.2.41 to 1.4.0) + +Version 1.4.0beta93 [November 7, 2009] + Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and + PNG_ALLOCATED macros to detect deprecated direct access to the + png_struct or info_struct members and other deprecated usage in + applications (John Bowler). + Updated scripts/makefile* to add "-DPNG_CONFIGURE_LIBPNG" to CFLAGS, + to prevent warnings about direct access to png structs by libpng + functions while building libpng. They need to be tested, especially + those using compilers other than gcc. + Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG". + They should work but still need to be updated to remove + references to pnggccrd.c or pngvcrd.c and ASM building. + Added README.txt to the beos, cbuilder5, netware, and xcode projects warning + that they need to be updated, to remove references to pnggccrd.c and + pngvcrd.c and to depend on pngpriv.h + Removed three direct references to read_info_ptr members in pngtest.c + that were detected by the new PNG_DEPSTRUCT macro. + Moved the png_debug macro definitions and the png_read_destroy(), + png_write_destroy() and png_far_to_near() prototypes from png.h + to pngpriv.h (John Bowler) + Moved the synopsis lines for png_read_destroy(), png_write_destroy() + png_debug(), png_debug1(), and png_debug2() from libpng.3 to libpngpf.3. + +Version 1.4.0beta94 [November 9, 2009] + Removed the obsolete, unused pnggccrd.c and pngvcrd.c files. + Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions. + Removed dependency of pngtest.o on pngpriv.h in the makefiles. + Only #define PNG_DEPSTRUCT, etc. in pngconf.h if not already defined. + +Version 1.4.0beta95 [November 10, 2009] + Changed png_check_sig() to !png_sig_cmp() in contrib programs. + Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile + Changed png_check_sig() to !png_sig_cmp() in contrib programs. + Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c + Changed pngminim/*/gather.sh to stop trying to remove pnggccrd.c and pngvcrd.c + Added dependency on pngpriv.h in contrib/pngminim/*/makefile + +Version 1.4.0beta96 [November 12, 2009] + Renamed scripts/makefile.wce to scripts/makefile.cegcc + Revised Makefile.am to use libpng.sys while building libpng.so + so that only PNG_EXPORT functions are exported. + Removed the deprecated png_check_sig() function/macro. + Removed recently removed function names from scripts/*.def + Revised pngtest.png to put chunks in the same order written by pngtest + (evidently the same change made in libpng-1.0beta54 was lost). + Added PNG_PRIVATE macro definition in pngconf.h for possible future use. + +Version 1.4.0beta97 [November 13, 2009] + Restored pngtest.png to the libpng-1.4.0beta7 version. + Removed projects/beos and netware.txt; no one seems to be supporting them. + Revised Makefile.in + +Version 1.4.0beta98 [November 13, 2009] + Added the "xcode" project to zip distributions, + Fixed a typo in scripts/pngwin.def introduced in beta97. + +Version 1.4.0beta99 [November 14, 2009] + Moved libpng-config.in and libpng.pc-configure.in out of the scripts + directory, to libpng-config.in and libpng-pc.in, respectively, and + modified Makefile.am and configure.ac accordingly. Now "configure" + needs nothing from the "scripts" directory. + Avoid redefining PNG_CONST in pngconf.h + +Version 1.4.0beta100 [November 14, 2009] + Removed ASM builds from projects/visualc6 and projects/visualc71 + Removed scripts/makefile.nommx and makefile.vcawin32 + Revised CMakeLists.txt to account for new location of libpng-config.in + and libpng-pc.in + Updated INSTALL to reflect removal and relocation of files. + +Version 1.4.0beta101 [November 14, 2009] + Restored the binary files (*.jpg, *.png, some project files) that were + accidentally deleted from the zip and 7z distributions when the xcode + project was added. + +Version 1.4.0beta102 [November 18, 2009] + Added libpng-config.in and libpng-pc.in to the zip and 7z distributions. + Fixed a typo in projects/visualc6/pngtest.dsp, introduced in beta100. + Moved descriptions of makefiles and other scripts out of INSTALL into + scripts/README.txt + Updated the copyright year in scripts/pngwin.rc from 2006 to 2009. + +Version 1.4.0beta103 [November 21, 2009] + Removed obsolete comments about ASM from projects/visualc71/README_zlib.txt + Align row_buf on 16-byte boundary in memory. + Restored the PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED guard around the call + to png_flush() after png_write_IEND(). See 1.4.0beta32, 1.4.0beta50 + changes above and 1.2.30, 1.2.30rc01 and rc03 in 1.2.41 CHANGES. Someone + needs this feature. + Make the 'png_jmpbuf' macro expand to a call that records the correct + longjmp function as well as returning a pointer to the setjmp + jmp_buf buffer, and marked direct access to jmpbuf 'deprecated'. + (John Bowler) + +Version 1.4.0beta104 [November 22, 2009] + Removed png_longjmp_ptr from scripts/*.def and libpng.3 + Rebuilt configure scripts with autoconf-2.65 + +Version 1.4.0beta105 [November 25, 2009] + Use fast integer PNG_DIVIDE_BY_255() or PNG_DIVIDE_BY_65535() + to accomplish alpha premultiplication when + PNG_READ_COMPOSITE_NODIV_SUPPORTED is defined. + Changed "/255" to "/255.0" in background calculations to make it clear + that the 255 is used as a double. + +Version 1.4.0beta106 [November 27, 2009] + Removed premultiplied alpha feature. + +Version 1.4.0beta107 [December 4, 2009] + Updated README + Added "#define PNG_NO_PEDANTIC_WARNINGS" in the libpng source files. + Removed "-DPNG_CONFIGURE_LIBPNG" from the makefiles and projects. + Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco + to put png.h and pngconf.h in $prefix/include, like the other scripts, + instead of in $prefix/include/libpng. Also revised makefile.sco + to put them in $prefix/include/libpng15 instead of in + $prefix/include/libpng/libpng15. + +Version 1.4.0beta108 [December 11, 2009] + Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile + Relocated png_do_chop() to its original position in pngrtran.c; the + change in version 1.2.41beta08 caused transparency to be handled wrong + in some 16-bit datastreams (Yusaku Sugai). + +Version 1.4.0beta109 [December 13, 2009] + Added "bit_depth" parameter to the private png_build_gamma_table() function. + Pass bit_depth=8 to png_build_gamma_table() when bit_depth is 16 but the + PNG_16_TO_8 transform has been set, to avoid unnecessary build of 16-bit + tables. + +Version 1.4.0rc02 [December 20, 2009] + Declared png_cleanup_needed "volatile" in pngread.c and pngwrite.c + +Version 1.4.0rc03 [December 22, 2009] + Renamed libpng-pc.in back to libpng.pc.in and revised CMakeLists.txt + (revising the change in 1.4.0beta99) + +Version 1.4.0rc04 [December 25, 2009] + Swapped PNG_UNKNOWN_CHUNKS_SUPPORTED and PNG_HANDLE_AS_UNKNOWN_SUPPORTED + in pngset.c to be consistent with other changes in version 1.2.38. + +Version 1.4.0rc05 [December 25, 2009] + Changed "libpng-pc.in" to "libpng.pc.in" in configure.ac, configure, and + Makefile.in to be consistent with changes in libpng-1.4.0rc03 + +Version 1.4.0rc06 [December 29, 2009] + Reverted the gamma_table changes from libpng-1.4.0beta109. + Fixed some indentation errors. + +Version 1.4.0rc07 [January 1, 2010] + Revised libpng*.txt and libpng.3 about 1.2.x->1.4.x differences. + Use png_calloc() instead of png_malloc(); png_memset() in pngrutil.c + Update copyright year to 2010. + +Version 1.4.0rc08 [January 2, 2010] + Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr + in pngtest.c + +Version 1.4.0 [January 3, 2010] + No changes. + +Version 1.4.1beta01 [January 8, 2010] + Updated CMakeLists.txt for consistent indentation and to avoid an + unclosed if-statement warning (Philip Lowman). + Revised Makefile.am and Makefile.in to remove references to Y2KINFO, + KNOWNBUG, and libpng.la (Robert Schwebel). + Revised the makefiles to install the same files and symbolic + links as configure, except for libpng.la and libpng14.la. + Make png_set|get_compression_buffer_size() available even when + PNG_WRITE_SUPPORTED is not enabled. + Revised Makefile.am and Makefile.in to simplify their maintenance. + Revised scripts/makefile.linux to install a link to libpng14.so.14.1 + +Version 1.4.1beta02 [January 9, 2010] + Revised the rest of the makefiles to install a link to libpng14.so.14.1 + +Version 1.4.1beta03 [January 10, 2010] + Removed png_set_premultiply_alpha() from scripts/*.def + +Version 1.4.1rc01 [January 16, 2010] + No changes. + +Version 1.4.1beta04 [January 23, 2010] + Revised png_decompress_chunk() to improve speed and memory usage when + decoding large chunks. + Added png_set|get_chunk_malloc_max() functions. + +Version 1.4.1beta05 [January 26, 2010] + Relocated "int k" declaration in pngtest.c to minimize its scope. + +Version 1.4.1beta06 [January 28, 2010] + Revised png_decompress_chunk() to use a two-pass method suggested by + John Bowler. + +Version 1.4.1beta07 [February 6, 2010] + Folded some long lines in the source files. + Added defineable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX, + and a PNG_USER_LIMITS_SUPPORTED flag. + Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as + png_ptr->png_user_chunk_malloc_max. + Revised png_push_save_buffer() to do fewer but larger png_malloc() calls. + +Version 1.4.1beta08 [February 6, 2010] + Minor cleanup and updating of dates and copyright year. + +Version 1.5.0beta01 [February 7, 2010] + Moved declaration of png_struct into private pngstruct.h and png_info + into pnginfo.h + +Version 1.4.1beta09 and 1.5.0beta02 [February 7, 2010] + Reverted to original png_push_save_buffer() code. + +Version 1.4.1beta10 and 1.5.0beta03 [February 8, 2010] + Return allocated "old_buffer" in png_push_save_buffer() before + calling png_error(), to avoid a potential memory leak. + Updated configure script to use SO number 15. + +Version 1.5.0beta04 [February 9, 2010] + Removed malformed "incomplete struct declaration" of png_info from png.h + +Version 1.5.0beta05 [February 12, 2010] + Removed PNG_DEPSTRUCT markup in pngstruct.h and pnginfo.h, and undid the + linewrapping that it entailed. + Revised comments in pngstruct.h and pnginfo.h and added pointers to + the libpng license. + Changed PNG_INTERNAL to PNG_EXPOSE_INTERNAL_STRUCTURES + Removed the cbuilder5 project, which has not been updated to 1.4.0. + +Version 1.4.1beta12 and 1.5.0beta06 [February 14, 2010] + Fixed type declaration of png_get_chunk_malloc_max() in pngget.c (Daisuke + Nishikawa) + +Version 1.5.0beta07 [omitted] + +Version 1.5.0beta08 [February 19, 2010] + Changed #ifdef PNG_NO_STDIO_SUPPORTED to #ifdef PNG_NO_CONSOLE_IO_SUPPORTED + wherever png_snprintf() is used to construct error and warning messages. + Noted in scripts/makefile.mingw that it expects to be run under MSYS. + Removed obsolete unused MMX-querying support from contrib/gregbook + Added exported png_longjmp() function. + Removed the AIX redefinition of jmpbuf in png.h + Added -D_ALLSOURCE in configure.ac, makefile.aix, and CMakeLists.txt + when building on AIX. + +Version 1.5.0beta09 [February 19, 2010] + Removed -D_ALLSOURCE from configure.ac, makefile.aix, and CMakeLists.txt. + Changed the name of png_ptr->jmpbuf to png_ptr->png_jmpbuf in pngstruct.h + +Version 1.5.0beta10 [February 25, 2010] + Removed unused gzio.c from contrib/pngminim gather and makefile scripts + Removed replacement error handlers from contrib/gregbook. Because of + the new png_longjmp() function they are no longer needed. + +Version 1.5.0beta11 [March 6, 2010] + Removed checking for already-included setjmp.h from pngconf.h + Fixed inconsistent indentations and made numerous cosmetic changes. + Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5 + +Version 1.5.0beta12 [March 9, 2010] + Moved "#include png.h" inside pngpriv.h and removed "#include png.h" from + the source files, along with "#define PNG_EXPOSE_INTERNAL_STRUCTURES" + and "#define PNG_NO_PEDANTIC_WARNINGS" (John Bowler). + Created new pngdebug.h and moved debug definitions there. + +Version 1.5.0beta13 [March 10, 2010] + Protect pngstruct.h, pnginfo.h, and pngdebug.h from being included twice. + Revise the "#ifdef" blocks in png_inflate() so it will compile when neither + PNG_USER_CHUNK_MALLOC_MAX nor PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED + is defined. + Removed unused png_measure_compressed_chunk() from pngpriv.h and libpngpf.3 + Moved the 'config.h' support from pngconf.h to pngpriv.h + Removed PNGAPI from the png_longjmp_ptr typedef. + Eliminated dependence of pngtest.c on the private pngdebug.h file. + Make all png_debug macros into *unterminated* statements or + expressions (i.e. a trailing ';' must always be added) and correct + the format statements in various png_debug messages. + +Version 1.5.0beta14 [March 14, 2010] + Removed direct access to png_ptr->io_ptr from the Windows code in pngtest.c + Revised Makefile.am to account for recent additions and replacements. + Corrected CE and OS/2 DEF files (scripts/png*def) for symbols removed and + added ordinal numbers to the Windows DEF file and corrected the duplicated + ordinal numbers on CE symbols that are commented out. + Added back in export symbols that can be present in the Windows build but + are disabled by default. + PNG_EXPORT changed to include an 'ordinal' field for DEF file generation. + PNG_CALLBACK added to make callback definitions uniform. PNGAPI split + into PNGCAPI (base C form), PNGAPI (exports) and PNGCBAPI (callbacks), + and appropriate changes made to all files. Cygwin builds re-hinged to + allow procedure call standard changes and to remove the need for the DEF + file (fixes build on Cygwin). + Enabled 'attribute' warnings that are relevant to library APIs and callbacks. + Changed rules for generation of the various symbol files and added a new + rule for a DEF file (which is also added to the distribution). + Updated the symbol file generation to stop it adding spurious spaces + to EOL (coming from preprocessor macro expansion). Added a facility + to join tokens in the output and rewrite *.dfn to use this. + Eliminated scripts/*.def in favor of libpng.def; updated projects/visualc71 + and removed scripts/makefile.cygwin. + Made PNG_BUILD_DLL safe: it can be set whenever a DLL is being built. + Removed the include of sys/types.h - apparently unnecessary now on the + platforms on which it happened (all but Mac OS and RISC OS). + Moved the Mac OS test into pngpriv.h (the only place it is used.) + +Version 1.5.0beta15 [March 17, 2010] + Added symbols.chk target to Makefile.am to validate the symbols in png.h + against the new DEF file scripts/symbols.def. + Changed the default DEF file back to pngwin.def. + Removed makefile.mingw. + Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN + +Version 1.5.0beta16 [April 1, 2010] + Make png_text_struct independent of PNG_iTXt_SUPPORTED, so that + fields are initialized in all configurations. The READ/WRITE + macros (PNG_(READ|WRITE)_iTXt_SUPPORTED) still function as + before to disable code to actually read or write iTXt chunks + and iTXt_SUPPORTED can be used to detect presence of either + read or write support (but it is probably better to check for + the one actually required - read or write.) + Combined multiple png_warning() calls for a single error. + Restored the macro definition of png_check_sig(). + +Version 1.5.0beta17 [April 17, 2010] + Added some "(long)" typecasts to printf calls in png_handle_cHRM(). + Documented the fact that png_set_dither() was disabled since libpng-1.4.0. + Reenabled png_set_dither() but renamed it to png_set_quantize() to reflect + more accurately what it actually does. At the same time, renamed + the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros to + PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS. + Added some "(long)" typecasts to printf calls in png_handle_cHRM(). + Freeze build-time only configuration in the build. + In all prior versions of libpng most configuration options + controlled by compiler #defines had to be repeated by the + application code that used libpng. This patch changes this + so that compilation options that can only be changed at build + time are frozen in the build. Options that are compiler + dependent (and those that are system dependent) are evaluated + each time - pngconf.h holds these. Options that can be changed + per-file in the application are in png.h. Frozen options are + in the new installed header file pnglibconf.h (John Bowler) + Removed the xcode project because it has not been updated to work + with libpng-1.5.0. + Removed the ability to include optional pngusr.h + +Version 1.5.0beta18 [April 17, 2010] + Restored the ability to include optional pngusr.h + Moved replacements for png_error() and png_warning() from the + contrib/pngminim project to pngerror.c, for use when warnings or + errors are disabled via PNG_NO_WARN or PNG_NO_ERROR_TEXT, to avoid + storing unneeded error/warning text. + Updated contrib/pngminim project to work with the new pnglibconf.h + Added some PNG_NO_* defines to contrib/pngminim/*/pngusr.h to save space. + +Version 1.5.0beta19 [April 24, 2010] + Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the functions + to read and write ints to be disabled independently of PNG_USE_READ_MACROS, + which allows libpng to be built with the functions even though the default + is to use the macros - this allows applications to choose at app build + time whether or not to use macros (previously impossible because the + functions weren't in the default build.) + Changed Windows calling convention back to __cdecl for API functions. + For Windows/x86 platforms only: + __stdcall is no longer needed for Visual Basic, so libpng-1.5.0 uses + __cdecl throughout (both API functions and callbacks) on Windows/x86 + platforms. + Replaced visualc6 and visualc71 projects with new vstudio project + Relaxed the overly-restrictive permissions of some files. + +Version 1.5.0beta20 [April 24, 2010] + Relaxed more overly-restrictive permissions of some files. + +Version 1.5.0beta21 [April 27, 2010] + Removed some unwanted binary bytes and changed CRLF to NEWLINE in the new + vstudio project files, and some trivial editing of some files in the + scripts directory. + Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in + contrib/pngminim/decoder/pngusr.h to make a smaller decoder application. + +Version 1.5.0beta22 [April 28, 2010] + Fixed dependencies of GET_INT_32 - it does not require READ_INT_FUNCTIONS + because it has a macro equivalent. + Improved the options.awk script; added an "everything off" option. + Revised contrib/pngminim to use the "everything off" option in pngusr.dfa. + +Version 1.5.0beta23 [April 29, 2010] + Corrected PNG_REMOVED macro to take five arguments. + The macro was documented with two arguments (name,ordinal), however + the symbol checking .dfn files assumed five arguments. The five + argument form seems more useful so it is changed to that. + Corrected PNG_UNKNOWN_CHUNKS_SUPPORTED to PNG_HANDLE_AS_UNKNOWN_SUPPORTED + in gregbook/readpng2.c + Corrected protection of png_get_user_transform_ptr. The API declaration in + png.h is removed if both READ and WRITE USER_TRANSFORM are turned off + but was left defined in pngtrans.c + Added logunsupported=1 to cause pnglibconf.h to document disabled options. + This makes the installed pnglibconf.h more readable but causes no + other change. The intention is that users of libpng will find it + easier to understand if an API they need is missing. + Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined. + Removed dummy_inflate.c from contrib/pngminim/encoder + Removed contrib/pngminim/*/gather.sh; gathering is now done in the makefile. + +Version 1.5.0beta24 [May 7, 2010] + Use bitwise "&" instead of arithmetic mod in pngrutil.c calculation of the + offset of the png_ptr->rowbuf pointer into png_ptr->big_row_buf. + Added more blank lines for readability. + +Version 1.5.0beta25 [June 18, 2010] + In pngpread.c: png_push_have_row() add check for new_row > height + Removed the now-redundant check for out-of-bounds new_row from example.c + +Version 1.5.0beta26 [June 18, 2010] + In pngpread.c: png_push_process_row() add check for too many rows. + +Version 1.5.0beta27 [June 18, 2010] + Removed the check added in beta25 as it is now redundant. + +Version 1.5.0beta28 [June 20, 2010] + Rewrote png_process_IDAT_data to consistently treat extra data as warnings + and handle end conditions more cleanly. + Removed the new (beta26) check in png_push_process_row(). + +Version 1.5.0beta29 [June 21, 2010] + Revised scripts/options.awk to work on Sunos (but still doesn't work) + Added comment to options.awk and contrib/pngminim/*/makefile to try nawk. + +Version 1.5.0beta30 [June 22, 2010] + Stop memory leak when reading a malformed sCAL chunk. + +Version 1.5.0beta31 [June 26, 2010] + Revised pngpread.c patch of beta28 to avoid an endless loop. + Removed some trailing blanks. + +Version 1.5.0beta32 [June 26, 2010] + Removed leftover scripts/options.patch and scripts/options.rej + +Version 1.5.0beta33 [July 6, 3010] + Made FIXED and FLOATING options consistent in the APIs they enable and + disable. Corrected scripts/options.awk to handle both command line + options and options specified in the .dfa files. + Changed char *msg to PNG_CONST char *msg in pngrutil.c + Make png_set_sRGB_gAMA_and_cHRM set values using either the fixed or + floating point APIs, but not both. + Reversed patch to remove error handler when the jmp_buf is stored in the + main program structure, not the png_struct. + The error handler is needed because the default handler in libpng will + always use the jmp_buf in the library control structure; this is never + set. The gregbook code is a useful example because, even though it + uses setjmp/longjmp, it shows how error handling can be implemented + using control mechanisms not directly supported by libpng. The + technique will work correctly with mechanisms such as Microsoft + Structure Exceptions or C++ exceptions (compiler willing - note that gcc + does not by default support interworking of C and C++ error handling.) + Reverted changes to call png_longjmp in contrib/gregbook where it is not + appropriate. If mainprog->jmpbuf is used by setjmp, then png_longjmp + cannot be used. + Changed "extern PNG_EXPORT" to "PNG_EXPORT" in png.h (Jan Nijtmans) + Changed "extern" to "PNG_EXTERN" in pngpriv.h (except for the 'extern "C" {') + +Version 1.5.0beta34 [July 12, 2010] + Put #ifndef PNG_EXTERN, #endif around the define PNG_EXTERN in pngpriv.h + +Version 1.5.0beta35 [July 24, 2010] + Removed some newly-added TAB characters. + Added -DNO_PNG_SNPRINTF to CFLAGS in scripts/makefile.dj2 + Moved the definition of png_snprintf() outside of the enclosing + #ifdef blocks in pngconf.h + +Version 1.5.0beta36 [July 29, 2010] + Patches by John Bowler: + Fixed point APIs are now supported throughout (no missing APIs). + Internal fixed point arithmetic support exists for all internal floating + point operations. + sCAL validates the floating point strings it is passed. + Safe, albeit rudimentary, Watcom support is provided by PNG_API_RULE==2 + Two new APIs exist to get the number of passes without turning on the + PNG_INTERLACE transform and to get the number of rows in the current + pass. + A new test program, pngvalid.c, validates the gamma code. + Errors in the 16-bit gamma correction (overflows) have been corrected. + cHRM chunk testing is done consistently (previously the floating point + API bypassed it, because the test really didn't work on FP, now the test + is performed on the actual values to be stored in the PNG file so it + works in the FP case too.) + Most floating point APIs now simply call the fixed point APIs after + converting the values to the fixed point form used in the PNG file. + The standard headers no longer include zlib.h, which is currently only + required for pngstruct.h and can therefore be internal. + Revised png_get_int_32 to undo the PNG two's complement representation of + negative numbers. + +Version 1.5.0beta37 [July 30, 2010] + Added a typecast in png_get_int_32() in png.h and pngrutil.h to avoid + a compiler warning. + Replaced oFFs 0,0 with oFFs -10,20 in pngtest.png + +Version 1.5.0beta38 [July 31, 2010] + Implemented remaining "_fixed" functions. + Corrected a number of recently introduced warnings mostly resulting from + safe but uncast assignments to shorter integers. Also added a zlib + VStudio release library project because the latest zlib Official Windows + build does not include such a thing. + Revised png_get_int_16() to be similar to png_get_int_32(). + Restored projects/visualc71. + +Version 1.5.0beta39 [August 2, 2010] + VisualC/GCC warning fixes, VisualC build fixes + The changes include support for function attributes in VC in addition to + those already present in GCC - necessary because without these some + warnings are unavoidable. Fixes include signed/unsigned fixes in + pngvalid and checks with gcc -Wall -Wextra -Wunused. + VC requires function attributes on function definitions as well as + declarations, PNG_FUNCTION has been added to enable this and the + relevant function definitions changed. + +Version 1.5.0beta40 [August 6, 2010] + Correct use of _WINDOWS_ in pngconf.h + Removed png_mem_ #defines; they are no longer used. + Added the sRGB chunk to pngtest.png + +Version 1.5.0beta41 [August 11, 2010] + Added the cHRM chunk to pngtest.png + Don't try to use version-script with cygwin/mingw. + Revised contrib/gregbook to work under cygwin/mingw. + +Version 1.5.0beta42 [August 18, 2010] + Add .dll.a to the list of extensions to be symlinked by Makefile.am (Yaakov) + Made all API functions that have const arguments and constant string + literal pointers declare them (John Bowler). + +Version 1.5.0beta43 [August 20, 2010] + Removed spurious tabs, shorten long lines (no source change) + Also added scripts/chkfmt to validate the format of all the files that can + reasonably be validated (it is suggested to run "make distclean" before + checking, because some machine generated files have long lines.) + Reformatted the CHANGES file to be more consistent throughout. + Made changes to address various issues identified by GCC, mostly + signed/unsigned and shortening problems on assignment but also a few + difficult to optimize (for GCC) loops. + Fixed non-GCC fixed point builds. In png.c a declaration was misplaced + in an earlier update. Fixed to declare the auto variables at the head. + Use cexcept.h in pngvalid.c. + +Version 1.5.0beta44 [August 24, 2010] + Updated CMakeLists.txt to use CMAKE_INSTALL_LIBDIR variable; useful for + installing libpng in /usr/lib64 (Funda Wang). + Revised CMakeLists.txt to put the man pages in share/man/man* not man/man* + Revised CMakeLists.txt to make symlinks instead of copies when installing. + Changed PNG_LIB_NAME from pngNN to libpngNN in CMakeLists.txt (Philip Lowman) + Implemented memory checks within pngvalid + Reformatted/rearranged pngvalid.c to assist use of progressive reader. + Check interlaced images in pngvalid + Clarified pngusr.h comments in pnglibconf.dfa + Simplified the pngvalid error-handling code now that cexcept.h is in place. + Implemented progressive reader in pngvalid.c for standard tests + Implemented progressive read in pngvalid.c gamma tests + Turn on progressive reader in pngvalid.c by default and tidy code. + +Version 1.5.0beta45 [August 26, 2010] + Added an explicit make step to projects/vstudio for pnglibconf.h + Also corrected zlib.vcxproj into which Visual Studio had introduced + what it calls an "authoring error". The change to make pnglibconf.h + simply copies the file; in the future it may actually generate the + file from scripts/pnglibconf.dfa as the other build systems do. + Changed pngvalid to work when floating point APIs are disabled + Renamed the prebuilt scripts/pnglibconf.h to scripts/pnglibconf.h.prebuilt + Supply default values for PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX + in pngpriv.h in case the user neglected to define them in their pngusr.h + +Version 1.5.0beta46 [August 28, 2010] + Added new private header files to libpng_sources in CMakeLists.txt + Added PNG_READ_16BIT, PNG_WRITE_16BIT, and PNG_16BIT options. + Added reference to scripts/pnglibconf.h.prebuilt in the visualc71 project. + +Version 1.5.0beta47 [September 11, 2010] + Fixed a number of problems with 64-bit compilation reported by Visual + Studio 2010 (John Bowler). + +Version 1.5.0beta48 [October 4, 2010] + Updated CMakeLists.txt (Philip Lowman). + Revised autogen.sh to recognize and use $AUTOCONF, $AUTOMAKE, $AUTOHEADER, + $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE + Fixed problem with symbols creation in Makefile.am which was assuming that + all versions of ccp write to standard output by default (Martin Banky). The + bug was introduced in libpng-1.2.9beta5. + Removed unused mkinstalldirs. + +Version 1.5.0beta49 [October 8, 2010] + Undid Makefile.am revision of 1.5.0beta48. + +Version 1.5.0beta50 [October 14, 2010] + Revised Makefile.in to account for mkinstalldirs being removed. + Added some "(unsigned long)" typecasts in printf statements in pngvalid.c. + Suppressed a compiler warning in png_handle_sPLT(). + Check for out-of-range text compression mode in png_set_text(). + +Version 1.5.0beta51 [October 15, 2010] + Changed embedded dates to "(PENDING RELEASE) in beta releases (and future + rc releases) to minimize the difference between releases. + +Version 1.5.0beta52 [October 16, 2010] + Restored some of the embedded dates (in png.h, png.c, documentation, etc.) + +Version 1.5.0beta53 [October 18, 2010] + Updated INSTALL to mention using "make maintainer-clean" and to remove + obsolete statement about a custom ltmain.sh + Disabled "color-tests" by default in Makefile.am so it will work with + automake versions earlier than 1.11.1 + Use document name "libpng-manual.txt" instead of "libpng-.txt" + to simplify version differences. + Removed obsolete remarks about setjmp handling from INSTALL. + Revised and renamed the typedef in png.h and png.c that was designed + to catch library and header mismatch. + +Version 1.5.0beta54 [November 10, 2010] + Require 48 bytes, not 64 bytes, for big_row_buf in overflow checks. + Used a consistent structure for the pngget.c functions. + +Version 1.5.0beta55 [November 21, 2010] + Revised png_get_uint_32, png_get_int_32, png_get_uint_16 (Cosmin) + Moved reading of file signature into png_read_sig (Cosmin) + Fixed atomicity of chunk header serialization (Cosmin) + Added test for io_state in pngtest.c (Cosmin) + Added "#!/bin/sh" at the top of contrib/pngminim/*/gather.sh scripts. + Changes to remove gcc warnings (John Bowler) + Certain optional gcc warning flags resulted in warnings in libpng code. + With these changes only -Wconversion and -Wcast-qual cannot be turned on. + Changes are trivial rearrangements of code. -Wconversion is not possible + for pngrutil.c (because of the widespread use of += et al on variables + smaller than (int) or (unsigned int)) and -Wcast-qual is not possible + with pngwio.c and pngwutil.c because the 'write' callback and zlib + compression both fail to declare their input buffers with 'const'. + +Version 1.5.0beta56 [December 7, 2010] + Added the private PNG_UNUSED() macro definition in pngpriv.h. + Added some commentary about PNG_EXPORT in png.h and pngconf.h + Revised PNG_EXPORT() macro and added PNG_EXPORTA() macro, with the + objective of simplifying and improving the cosmetic appearance of png.h. + Fixed some incorrect "=" macro names in pnglibconf.dfa + Included documentation of changes in 1.5.0 from 1.4.x in libpng-manual.txt + +Version 1.5.0beta57 [December 9, 2010] + Documented the pngvalid gamma error summary with additional comments and + print statements. + Improved missing symbol handling in checksym.awk; symbols missing in both + the old and new files can now be optionally ignored, treated as errors + or warnings. + Removed references to pngvcrd.c and pnggccrd.c from the vstudio project. + Updated "libpng14" to "libpng15" in the visualc71 project. + Enabled the strip16 tests in pngvalid.` + Don't display test results (except PASS/FAIL) when running "make test". + Instead put them in pngtest-log.txt + Added "--with-zprefix=" to configure.ac + Updated the prebuilt configuration files to autoconf version 2.68 + +Version 1.5.0beta58 [December 19, 2010] + Fixed interlace image handling and add test cases (John Bowler) + Fixed the clean rule in Makefile.am to remove pngtest-log.txt + Made minor changes to work around warnings in gcc 3.4 + +Version 1.5.0rc01 [December 27, 2010] + No changes. + +Version 1.5.0rc02 [December 27, 2010] + Eliminated references to the scripts/*.def files in project/visualc71. + +Version 1.5.0rc03 [December 28, 2010] + Eliminated scripts/*.def and revised Makefile.am accordingly + +Version 1.5.0rc04 [December 29, 2010] + Fixed bug in background transformation handling in pngrtran.c (it was + looking for the flag in png_ptr->transformations instead of in + png_ptr->flags) (David Raymond). + +Version 1.5.0rc05 [December 31, 2010] + Fixed typo in a comment in CMakeLists.txt (libpng14 => libpng15) (Cosmin) + +Version 1.5.0rc06 [January 4, 2011] + Changed the new configure option "zprefix=string" to "zlib-prefix=string" + +Version 1.5.0rc07 [January 4, 2011] + Updated copyright year. + +Version 1.5.0 [January 6, 2011] + No changes. + +version 1.5.1beta01 [January 8, 2011] + Added description of png_set_crc_action() to the manual. + Added a note in the manual that the type of the iCCP profile was changed + from png_charpp to png_bytepp in png_get_iCCP(). This change happened + in version 1.5.0beta36 but is not noted in the CHANGES. Similarly, + it was changed from png_charpp to png_const_bytepp in png_set_iCCP(). + Ensure that png_rgb_to_gray ignores palette mapped images, if libpng + internally happens to call it with one, and fixed a failure to handle + palette mapped images correctly. This fixes CVE-2690. + +Version 1.5.1beta02 [January 14, 2011] + Fixed a bug in handling of interlaced images (bero at arklinux.org). + Updated CMakeLists.txt (Clifford Yapp) + +Version 1.5.1beta03 [January 14, 2011] + Fixed typecasting of some png_debug() statements (Cosmin) + +Version 1.5.1beta04 [January 16, 2011] + Updated documentation of png_set|get_tRNS() (Thomas Klausner). + Mentioned in the documentation that applications must #include "zlib.h" + if they need access to anything in zlib.h, and that a number of + macros such as png_memset() are no longer accessible by applications. + Corrected pngvalid gamma test "sample" function to access all of the color + samples of each pixel, instead of sampling the red channel three times. + Prefixed variable names index, div, exp, gamma with "png_" to avoid "shadow" + warnings, and (mistakenly) changed png_exp() to exp(). + +Version 1.5.1beta05 [January 16, 2011] + Changed variable names png_index, png_div, png_exp, and png_gamma to + char_index, divisor, exp_b10, and gamma_val, respectively, and + changed exp() back to png_exp(). + +Version 1.5.1beta06 [January 20, 2011] + Prevent png_push_crc_skip() from hanging while reading an unknown chunk + or an over-large compressed zTXt chunk with the progressive reader. + Eliminated more GCC "shadow" warnings. + Revised png_fixed() in png.c to avoid compiler warning about reaching the + end without returning anything. + +Version 1.5.1beta07 [January 22, 2011] + In the manual, describe the png_get_IHDR() arguments in the correct order. + Added const_png_structp and const_png_infop types, and used them in + prototypes for most png_get_*() functions. + +Version 1.5.1beta08 [January 23, 2011] + Added png_get_io_chunk_type() and deprecated png_get_io_chunk_name() + Added synopses for the IO_STATE functions and other missing synopses + to the manual. Removed the synopses from libpngpf.3 because they + were out of date and no longer useful. Better information can be + obtained by reading the prototypes and comments in pngpriv.h + Attempted to fix cpp on Solaris with S. Studio 12 cc, fix build + Added a make macro DFNCPP that is a CPP that will accept the tokens in + a .dfn file and adds configure stuff to test for such a CPP. ./configure + should fail if one is not available. + Corrected const_png_ in png.h to png_const_ to avoid polluting the namespace. + Added png_get_current_row_number and png_get_current_pass_number for the + benefit of the user transform callback. + Added png_process_data_pause and png_process_data_skip for the benefit of + progressive readers that need to stop data processing or want to optimize + skipping of unread data (e.g., if the reader marks a chunk to be skipped.) + +Version 1.5.1beta09 [January 24, 2011] + Enhanced pngvalid, corrected an error in gray_to_rgb, corrected doc error. + pngvalid contains tests of transforms, which tests are currently disabled + because they are incompletely tested. gray_to_rgb was failing to expand + the bit depth for smaller bit depth images; this seems to be a long + standing error and resulted, apparently, in invalid output + (CVE-2011-0408, CERT VU#643140). The documentation did not accurately + describe what libpng really does when converting RGB to gray. + +Version 1.5.1beta10 [January 27, 2010] + Fixed incorrect examples of callback prototypes in the manual, that were + introduced in libpng-1.0.0. + In addition the order of the png_get_uint macros with respect to the + relevant function definitions has been reversed. This helps the + preprocessing of the symbol files be more robust. Furthermore, the + symbol file preprocessing now uses -DPNG_NO_USE_READ_MACROS even when + the library may actually be built with PNG_USE_READ_MACROS; this stops + the read macros interfering with the symbol file format. + Made the manual, synopses, and function prototypes use the function + argument names file_gamma, int_file_gamma, and srgb_intent consistently. + +Version 1.5.1beta11 [January 28, 2011] + Changed PNG_UNUSED from "param=param;" to "{if(param){}}". + Corrected local variable type in new API png_process_data_skip() + The type was self-evidently incorrect but only causes problems on 64-bit + architectures. + Added transform tests to pngvalid and simplified the arguments. + +Version 1.5.1rc01 [January 29, 2011] + No changes. + +Version 1.5.1rc02 [January 31, 2011] + Added a request in the manual that applications do not use "png_" or + "PNG_" to begin any of their own symbols. + Changed PNG_UNUSED to "(void)param;" and updated the commentary in pngpriv.h + +Version 1.5.1 [February 3, 2011] + No changes. + +Version 1.5.2beta01 [February 13, 2011] + More -Wshadow fixes for older gcc compilers. Older gcc versions apparently + check formal parameters names in function declarations (as well as + definitions) to see if they match a name in the global namespace. + Revised PNG_EXPORTA macro to not use an empty parameter, to accommodate the + old VisualC++ preprocessor. + Turned on interlace handling in png_read_png(). + Fixed gcc pendantic warnings. + Handle longjmp in Cygwin. + Fixed png_get_current_row_number() in the interlaced case. + Cleaned up ALPHA flags and transformations. + Implemented expansion to 16 bits. + +Version 1.5.2beta02 [February 19, 2011] + Fixed mistake in the descriptions of user read_transform and write_transform + function prototypes in the manual. The row_info struct is png_row_infop. + Reverted png_get_current_row_number() to previous (1.5.2beta01) behavior. + Corrected png_get_current_row_number documentation + Fixed the read/write row callback documentation. + This documents the current behavior, where the callback is called after + every row with information pertaining to the next row. + +Version 1.5.2beta03 [March 3, 2011] + Fixed scripts/makefile.vcwin32 + Updated contrib/pngsuite/README to add the word "modify". + Define PNG_ALLOCATED to blank when _MSC_VER<1300. + +Version 1.5.2rc01 [March 19, 2011] + Define remaining attributes to blank when MSC_VER<1300. + ifdef out mask arrays in pngread.c when interlacing is not supported. + +Version 1.5.2rc02 [March 22, 2011] + Added a hint to try CPP=/bin/cpp if "cpp -E" fails in scripts/pnglibconf.mak + and in contrib/pngminim/*/makefile, eg., on SunOS 5.10, and removed "strip" + from the makefiles. + Fixed a bug (present since libpng-1.0.7) that makes png_handle_sPLT() fail + to compile when PNG_NO_POINTER_INDEXING is defined (Chubanov Kirill) + +Version 1.5.2rc03 [March 24, 2011] + Don't include standard header files in png.h while building the symbol table, + to avoid cpp failure on SunOS (introduced PNG_BUILDING_SYMBOL_TABLE macro). + +Version 1.5.2 [March 31, 2011] + No changes. + +Version 1.5.3beta01 [April 1, 2011] + Re-initialize the zlib compressor before compressing non-IDAT chunks. + Added API functions (png_set_text_compression_level() and four others) to + set parameters for zlib compression of non-IDAT chunks. + +Version 1.5.3beta02 [April 3, 2011] + Updated scripts/symbols.def with new API functions. + Only compile the new zlib re-initializing code when text or iCCP is + supported, using PNG_WRITE_COMPRESSED_TEXT_SUPPORTED macro. + Improved the optimization of the zlib CMF byte (see libpng-1.2.6beta03). + Optimize the zlib CMF byte in non-IDAT compressed chunks + +Version 1.5.3beta03 [April 16, 2011] + Fixed gcc -ansi -pedantic compile. A strict ANSI system does not have + snprintf, and the "__STRICT_ANSI__" detects that condition more reliably + than __STDC__ (John Bowler). + Removed the PNG_PTR_NORETURN attribute because it too dangerous. It tells + the compiler that a user supplied callback (the error handler) does not + return, yet there is no guarantee in practice that the application code + will correctly implement the error handler because the compiler only + issues a warning if there is a mistake (John Bowler). + Removed the no-longer-used PNG_DEPSTRUCT macro. + Updated the zlib version to 1.2.5 in the VStudio project. + Fixed 64-bit builds where png_uint_32 is smaller than png_size_t in + pngwutil.c (John Bowler). + Fixed bug with stripping the filler or alpha channel when writing, that + was introduced in libpng-1.5.2beta01 (bug report by Andrew Church). + +Version 1.5.3beta04 [April 27, 2011] + Updated pngtest.png with the new zlib CMF optimization. + Cleaned up conditional compilation code and of background/gamma handling + Internal changes only except a new option to avoid compiling the + png_build_grayscale_palette API (which is not used at all internally.) + The main change is to move the transform tests (READ_TRANSFORMS, + WRITE_TRANSFORMS) up one level to the caller of the APIs. This avoids + calls to spurious functions if all transforms are disabled and slightly + simplifies those functions. Pngvalid modified to handle this. + A minor change is to stop the strip_16 and expand_16 interfaces from + disabling each other; this allows the future alpha premultiplication + code to use 16-bit intermediate values while still producing 8-bit output. + png_do_background and png_do_gamma have been simplified to take a single + pointer to the png_struct rather than pointers to every item required + from the png_struct. This makes no practical difference to the internal + code. + A serious bug in the pngvalid internal routine 'standard_display_init' has + been fixed - this failed to initialize the red channel and accidentally + initialized the alpha channel twice. + Changed png_struct jmp_buf member name from png_jmpbuf to tmp_jmpbuf to + avoid a possible clash with the png_jmpbuf macro on some platforms. + +Version 1.5.3beta05 [May 6, 2011] + Added the "_POSIX_SOURCE" feature test macro to ensure libpng sees the + correct API. _POSIX_SOURCE is defined in pngpriv.h, pngtest.c and + pngvalid.c to ensure that POSIX conformant systems disable non-POSIX APIs. + Removed png_snprintf and added formatted warning messages. This change adds + internal APIs to allow png_warning messages to have parameters without + requiring the host OS to implement snprintf. As a side effect the + dependency of the tIME-supporting RFC1132 code on stdio is removed and + PNG_NO_WARNINGS does actually work now. + Pass "" instead of '\0' to png_default_error() in png_err(). This mistake + was introduced in libpng-1.2.20beta01. This fixes CVE-2011-2691. + Added PNG_WRITE_OPTIMIZE_CMF_SUPPORTED macro to make the zlib "CMF" byte + optimization configureable. + IDAT compression failed if preceded by a compressed text chunk (bug + introduced in libpng-1.5.3beta01-02). This was because the attempt to + reset the zlib stream in png_write_IDAT happened after the first IDAT + chunk had been deflated - much too late. In this change internal + functions were added to claim/release the z_stream and, hopefully, make + the code more robust. Also deflateEnd checking is added - previously + libpng would ignore an error at the end of the stream. + +Version 1.5.3beta06 [May 8, 2011] + Removed the -D_ALL_SOURCE from definitions for AIX in CMakeLists.txt + Implemented premultiplied alpha support: png_set_alpha_mode API + +Version 1.5.3beta07 [May 11, 2011] + Added expand_16 support to the high level interface. + Added named value and 'flag' gamma support to png_set_gamma. Made a minor + change from the previous (unreleased) ABI/API to hide the exact value used + for Macs - it's not a good idea to embed this in the ABI! + Moved macro definitions for PNG_HAVE_IHDR, PNG_HAVE_PLTE, and PNG_AFTER_IDAT + from pngpriv.h to png.h because they must be visible to applications + that call png_set_unknown_chunks(). + Check for up->location !PNG_AFTER_IDAT when writing unknown chunks + before IDAT. + +Version 1.5.3beta08 [May 16, 2011] + Improved "pngvalid --speed" to exclude more of pngvalid from the time. + Documented png_set_alpha_mode(), other changes in libpng.3/libpng-manual.txt + The cHRM chunk now sets the defaults for png_set_rgb_to_gray() (when negative + parameters are supplied by the caller), while in the absence of cHRM + sRGB/Rec 709 values are still used. This introduced a divide-by-zero + bug in png_handle_cHRM(). + The bKGD chunk no longer overwrites the background value set by + png_set_background(), allowing the latter to be used before the file + header is read. It never performed any useful function to override + the default anyway. + Added memory overwrite and palette image checks to pngvalid.c + Previously palette image code was poorly checked. Since the transformation + code has a special palette path in most cases this was a severe weakness. + Minor cleanup and some extra checking in pngrutil.c and pngrtran.c. When + expanding an indexed image, always expand to RGBA if transparency is + present. + +Version 1.5.3beta09 [May 17, 2011] + Reversed earlier 1.5.3 change of transformation order; move png_expand_16 + back where it was. The change doesn't work because it requires 16-bit + gamma tables when the code only generates 8-bit ones. This fails + silently; the libpng code just doesn't do any gamma correction. Moving + the tests back leaves the old, inaccurate, 8-bit gamma calculations, but + these are clearly better than none! + +Version 1.5.3beta10 [May 20, 2011] + + png_set_background() and png_expand_16() did not work together correctly. + This problem is present in 1.5.2; if png_set_background is called with + need_expand false and the matching 16 bit color libpng erroneously just + treats it as an 8-bit color because of where png_do_expand_16 is in the + transform list. This simple fix reduces the supplied colour to 8-bits, + so it gets smashed, but this is better than the current behavior. + Added tests for expand16, more fixes for palette image tests to pngvalid. + Corrects the code for palette image tests and disables attempts to + validate palette colors. + +Version 1.5.3rc01 [June 3, 2011] + No changes. + +Version 1.5.3rc02 [June 8, 2011] + Fixed uninitialized memory read in png_format_buffer() (Bug report by + Frank Busse, CVE-2011-2501, related to CVE-2004-0421). + +Version 1.5.3beta11 [June 11, 2011] + Fixed png_handle_sCAL which is broken in 1.5. This fixes CVE 2011-2692. + Added sCAL to pngtest.png + Revised documentation about png_set_user_limits() to say that it also affects + png writing. + Revised handling of png_set_user_limits() so that it can increase the + limit beyond the PNG_USER_WIDTH|HEIGHT_MAX; previously it could only + reduce it. + Make the 16-to-8 scaling accurate. Dividing by 256 with no rounding is + wrong (high by one) 25% of the time. Dividing by 257 with rounding is + wrong in 128 out of 65536 cases. Getting the right answer all the time + without division is easy. + Added "_SUPPORTED" to the PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION macro. + Added projects/owatcom, an IDE project for OpenWatcom to replace + scripts/makefile.watcom. This project works with OpenWatcom 1.9. The + IDE autogenerates appropriate makefiles (libpng.mk) for batch processing. + The project is configurable, unlike the Visual Studio project, so long + as the developer has an awk. + Changed png_set_gAMA to limit the gamma value range so that the inverse + of the stored value cannot overflow the fixed point representation, + and changed other things OpenWatcom warns about. + Revised pngvalid.c to test PNG_ALPHA_MODE_SUPPORTED correctly. This allows + pngvalid to build when ALPHA_MODE is not supported, which is required if + it is to build on libpng 1.4. + Removed string/memory macros that are no longer used and are not + necessarily fully supportable, particularly png_strncpy and png_snprintf. + Added log option to pngvalid.c and attempted to improve gamma messages. + +Version 1.5.3 [omitted] + People found the presence of a beta release following an rc release + to be confusing; therefore we bump the version to libpng-1.5.4beta01 + and there will be no libpng-1.5.3 release. + +Version 1.5.4beta01 [June 14, 2011] + Made it possible to undefine PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED + to get the same (inaccurate) output as libpng-1.5.2 and earlier. + Moved definitions of PNG_HAVE_IHDR, PNG_AFTER_IDAT, and PNG_HAVE_PLTE + outside of an unknown-chunk block in png.h because they are also + needed for other uses. + +Version 1.5.4beta02 [June 14, 2011] + Fixed and clarified LEGACY 16-to-8 scaling code. + Added png_set_chop_16() API, to match inaccurate results from previous + libpng versions. + Removed the ACCURATE and LEGACY options (they are no longer useable) + Use the old scaling method for background if png_set_chop_16() was + called. + Made png_set_chop_16() API removeable by disabling PNG_CHOP_16_TO_8_SUPPORTED + +Version 1.5.4beta03 [June 15, 2011] + Fixed a problem in png_do_expand_palette() exposed by optimization in + 1.5.3beta06 + Also removed a spurious and confusing "trans" member ("trans") from png_info. + The palette expand optimization prevented expansion to an intermediate RGBA + form if tRNS was present but alpha was marked to be stripped; this exposed + a check for tRNS in png_do_expand_palette() which is inconsistent with the + code elsewhere in libpng. + Correction to the expand_16 code; removed extra instance of + png_set_scale_16_to_8 from pngpriv.h + +Version 1.5.4beta04 [June 16, 2011] + Added a missing "#ifdef PNG_READ_BACKGROUND_SUPPORTED/#endif" in pngrtran.c + Added PNG_TRANSFORM_CHOP_16 to the high-level read transforms. + Made PNG_READ_16_TO_8_ACCURATE_SCALE configurable again. If this is + not enabled, png_set_strip_16() and png_do_scale_16_to_8() aren't built. + Revised contrib/visupng, gregbook, and pngminim to demonstrate chop_16_to_8 + +Version 1.5.4beta05 [June 16, 2011] + Renamed png_set_strip_16() to png_set_scale_16() and renamed + png_set_chop_16() to png_set_strip(16) in an attempt to minimize the + behavior changes between libpng14 and libpng15. + +Version 1.5.4beta06 [June 18, 2011] + Fixed new bug that was causing both strip_16 and scale_16 to be applied. + +Version 1.5.4beta07 [June 19, 2011] + Fixed pngvalid, simplified macros, added checking for 0 in sCAL. + The ACCURATE scale macro is no longer defined in 1.5 - call the + png_scale_16_to_8 API. Made sure that PNG_READ_16_TO_8 is still defined + if the png_strip_16_to_8 API is present. png_check_fp_number now + maintains some state so that positive, negative and zero values are + identified. sCAL uses these to be strictly spec conformant. + +Version 1.5.4beta08 [June 23, 2011] + Fixed pngvalid if ACCURATE_SCALE is defined. + Updated scripts/pnglibconf.h.prebuilt. + +Version 1.5.4rc01 [June 30, 2011] + Define PNG_ALLOCATED to "restrict" only if MSC_VER >= 1400. + +Version 1.5.4 [July 7, 2011] + No changes. + +Version 1.5.5beta01 [July 13, 2011] + Fixed some typos and made other minor changes in the manual. + Updated contrib/pngminus/makefile.std (Samuli Souminen) + +Version 1.5.5beta02 [July 14, 2011] + Revised Makefile.am and Makefile.in to look in the right directory for + pnglibconf.h.prebuilt + +Version 1.5.5beta03 [July 27, 2011] + Enabled compilation with g++ compiler. This compiler does not recognize + the file extension, so it always compiles with C++ rules. Made minor + changes to pngrutil.c to cast results where C++ expects it but C does not. + Minor editing of libpng.3 and libpng-manual.txt. + +Version 1.5.5beta04 [July 29, 2011] + Revised CMakeLists.txt (Clifford Yapp) + Updated commentary about the png_rgb_to_gray() default coefficients + in the manual and in pngrtran.c + +Version 1.5.5beta05 [August 17, 2011] + Prevent unexpected API exports from non-libpng DLLs on Windows. The "_DLL" + is removed from the test of whether a DLL is being built (this erroneously + caused the libpng APIs to be marked as DLL exports in static builds under + Microsoft Visual Studio). Almost all of the libpng building configuration + is moved from pngconf.h to pngpriv.h, but PNG_DLL_EXPORT remains in + pngconf.h, though, so that it is colocated with the import definition (it + is no longer used anywhere in the installed headers). The VStudio project + definitions have been cleaned up: "_USRDLL" has been removed from the + static library builds (this was incorrect), and PNG_USE_DLL has been added + to pngvalid to test the functionality (pngtest does not supply it, + deliberately). The spurious "_EXPORTS" has been removed from the + libpng build (all these errors were a result of copy/paste between project + configurations.) + Added new types and internal functions for CIE RGB end point handling to + pngpriv.h (functions yet to be implemented). + +Version 1.5.5beta06 [August 26, 2011] + Ensure the CMAKE_LIBRARY_OUTPUT_DIRECTORY is set in CMakeLists.txt + (Clifford Yap) + Fixes to rgb_to_gray and cHRM XYZ APIs (John Bowler): + The rgb_to_gray code had errors when combined with gamma correction. + Some pixels were treated as true grey when they weren't and such pixels + and true grey ones were not gamma corrected (the original value of the + red component was used instead). APIs to get and set cHRM using color + space end points have been added and the rgb_to_gray code that defaults + based on cHRM, and the divide-by-zero bug in png_handle_cHRM (CERT + VU#477046, CVE-2011-3328, introduced in 1.5.4) have been corrected. + A considerable number of tests has been added to pngvalid for the + rgb_to_gray transform. + Arithmetic errors in rgb_to_gray whereby the calculated gray value was + truncated to the bit depth rather than rounded have been fixed except in + the 8-bit non-gamma-corrected case (where consistency seems more important + than correctness.) The code still has considerable inaccuracies in the + 8-bit case because 8-bit linear arithmetic is used. + +Version 1.5.5beta07 [September 7, 2011] + Added "$(ARCH)" option to makefile.darwin + Added SunOS support to configure.ac and Makefile.am + Changed png_chunk_benign_error() to png_warning() in png.c, in + png_XYZ_from_xy_checked(). + +Version 1.5.5beta08 [September 10, 2011] + Fixed 64-bit compilation errors (gcc). The errors fixed relate + to conditions where types that are 32 bits in the GCC 32-bit + world (uLong and png_size_t) become 64 bits in the 64-bit + world. This produces potential truncation errors which the + compiler correctly flags. + Relocated new HAVE_SOLARIS_LD definition in configure.ac + Constant changes for 64-bit compatibility (removal of L suffixes). The + 16-bit cases still use "L" as we don't have a 16-bit test system. + +Version 1.5.5rc01 [September 15, 2011] + Removed "L" suffixes in pngpriv.h + +Version 1.5.5 [September 22, 2011] + No changes. + +Version 1.5.6beta01 [September 22, 2011] + Fixed some 64-bit type conversion warnings in pngrtran.c + Moved row_info from png_struct to a local variable. + The various interlace mask arrays have been made into arrays of + bytes and made PNG_CONST and static (previously some arrays were + marked PNG_CONST and some weren't). + Additional checks have been added to the transform code to validate the + pixel depths after the transforms on both read and write. + Removed some redundant code from pngwrite.c, in png_destroy_write_struct(). + Changed chunk reading/writing code to use png_uint_32 instead of png_byte[4]. + This removes the need to allocate temporary strings for chunk names on + the stack in the read/write code. Unknown chunk handling still uses the + string form because this is exposed in the API. + +Version 1.5.6beta02 [September 26, 2011] + Added a note in the manual the png_read_update_info() must be called only + once with a particular info_ptr. + Fixed a typo in the definition of the new PNG_STRING_FROM_CHUNK(s,c) macro. + +Version 1.5.6beta03 [September 28, 2011] + Revised test-pngtest.sh to report FAIL when pngtest fails. + Added "--strict" option to pngtest, to report FAIL when the failure is + only because the resulting valid files are different. + Revised CMakeLists.txt to work with mingw and removed some material from + CMakeLists.txt that is no longer useful in libpng-1.5. + +Version 1.5.6beta04 [October 5, 2011] + Fixed typo in Makefile.in and Makefile.am ("-M Wl" should be "-M -Wl")." + +Version 1.5.6beta05 [October 12, 2011] + Speed up png_combine_row() for interlaced images. This reduces the generality + of the code, allowing it to be optimized for Adam7 interlace. The masks + passed to png_combine_row() are now generated internally, avoiding + some code duplication and localizing the interlace handling somewhat. + Align png_struct::row_buf - previously it was always unaligned, caused by + a bug in the code that attempted to align it; the code needs to subtract + one from the pointer to take account of the filter byte prepended to + each row. + Optimized png_combine_row() when rows are aligned. This gains a small + percentage for 16-bit and 32-bit pixels in the typical case where the + output row buffers are appropriately aligned. The optimization was not + previously possible because the png_struct buffer was always misaligned. + Fixed bug in png_write_chunk_header() debug print, introduced in 1.5.6beta01. + +Version 1.5.6beta06 [October 17, 2011] + Removed two redundant tests for unitialized row. + Fixed a relatively harmless memory overwrite in compressed text writing + with a 1 byte zlib buffer. + Add ability to call png_read_update_info multiple times to pngvalid.c. + Fixes for multiple calls to png_read_update_info. These fixes attend to + most of the errors revealed in pngvalid, however doing the gamma work + twice results in inaccuracies that can't be easily fixed. There is now + a warning in the code if this is going to happen. + Turned on multiple png_read_update_info in pngvalid transform tests. + Prevent libpng from overwriting unused bits at the end of the image when + it is not byte aligned, while reading. Prior to libpng-1.5.6 libpng would + overwrite the partial byte at the end of each row if the row width was not + an exact multiple of 8 bits and the image is not interlaced. + +Version 1.5.6beta07 [October 21, 2011] + Made png_ptr->prev_row an aligned pointer into png_ptr->big_prev_row + (Mans Rullgard). + +Version 1.5.6rc01 [October 26, 2011] + Changed misleading "Missing PLTE before cHRM" warning to "Out of place cHRM" + +Version 1.5.6rc02 [October 27, 2011] + Added LSR() macro to defend against buggy compilers that evaluate non-taken + code branches and complain about out-of-range shifts. + +Version 1.5.6rc03 [October 28, 2011] + Renamed the LSR() macro to PNG_LSR() and added PNG_LSL() macro. + Fixed compiler warnings with Intel and MSYS compilers. The logical shift + fix for Microsoft Visual C is required by other compilers, so this + enables that fix for all compilers when using compile-time constants. + Under MSYS 'byte' is a name declared in a system header file, so we + changed the name of a local variable to avoid the warnings that result. + Added #define PNG_ALIGN_TYPE PNG_ALIGN_NONE to contrib/pngminim/*/pngusr.h + +Version 1.5.6 [November 3, 2011] + No changes. + +Version 1.5.7beta01 [November 4, 2011] + Added support for ARM processor, when decoding all PNG up-filtered rows + and any other-filtered rows with 3 or 4 bytes per pixel (Mans Rullgard). + Fixed bug in pngvalid on early allocation failure; fixed type cast in + pngmem.c; pngvalid would attempt to call png_error() if the allocation + of a png_struct or png_info failed. This would probably have led to a + crash. The pngmem.c implementation of png_malloc() included a cast + to png_size_t which would fail on large allocations on 16-bit systems. + Fix for the preprocessor of the Intel C compiler. The preprocessor + splits adjacent @ signs with a space; this changes the concatentation + token from @-@-@ to PNG_JOIN; that should work with all compiler + preprocessors. + Paeth filter speed improvements from work by Siarhei Siamashka. This + changes the 'Paeth' reconstruction function to improve the GCC code + generation on x86. The changes are only part of the suggested ones; + just the changes that definitely improve speed and remain simple. + The changes also slightly increase the clarity of the code. + +Version 1.5.7beta02 [November 11, 2011] + Check compression_type parameter in png_get_iCCP and remove spurious + casts. The compression_type parameter is always assigned to, so must + be non-NULL. The cast of the profile length potentially truncated the + value unnecessarily on a 16-bit int system, so the cast of the (byte) + compression type to (int) is specified by ANSI-C anyway. + Fixed FP division by zero in pngvalid.c; the 'test_pixel' code left + the sBIT fields in the test pixel as 0, which resulted in a floating + point division by zero which was irrelevant but causes systems where + FP exceptions cause a crash. Added code to pngvalid to turn on FP + exceptions if the appropriate glibc support is there to ensure this is + tested in the future. + Updated scripts/pnglibconf.mak and scripts/makefile.std to handle the + new PNG_JOIN macro. + Added versioning to pnglibconf.h comments. + Simplified read/write API initial version; basic read/write tested on + a variety of images, limited documentation (in the header file.) + Installed more accurate linear to sRGB conversion tables. The slightly + modified tables reduce the number of 16-bit values that + convert to an off-by-one 8-bit value. The "makesRGB.c" code that was used + to generate the tables is now in a contrib/sRGBtables sub-directory. + +Version 1.5.7beta03 [November 17, 2011] + Removed PNG_CONST from the sRGB table declarations in pngpriv.h and png.c + Added run-time detection of NEON support. + Added contrib/libtests; includes simplified API test and timing test and + a color conversion utility for rapid checking of failed 'pngstest' results. + Multiple transform bug fixes plus a work-round for double gamma correction. + libpng does not support more than one transform that requires linear data + at once - if this is tried typically the results is double gamma + correction. Since the simplified APIs can need rgb to gray combined with + a compose operation it is necessary to do one of these outside the main + libpng transform code. This check-in also contains fixes to various bugs + in the simplified APIs themselves and to some bugs in compose and rgb to + gray (on palette) itself. + Fixes for C++ compilation using g++ When libpng source is compiled + using g++. The compiler imposes C++ rules on the C source; thus it + is desireable to make the source work with either C or C++ rules + without throwing away useful error information. This change adds + png_voidcast to allow C semantic (void*) cases or the corresponding + C++ static_cast operation, as appropriate. + Added --noexecstack to assembler file compilation. GCC does not set + this on assembler compilation, even though it does on C compilation. + This creates security issues if assembler code is enabled; the + work-around is to set it by default in the flags for $(CCAS) + Work around compilers that don't support declaration of const data. Some + compilers fault 'extern const' data declarations (because the data is + not initialized); this turns on const-ness only for compilers where + this is known to work. + +Version 1.5.7beta04 [November 17, 2011] + Since the gcc driver does not recognize the --noexecstack flag, we must + use the -Wa prefix to have it passed through to the assembler. + Also removed a duplicate setting of this flag. + Added files that were omitted from the libpng-1.5.7beta03 zip distribution. + +Version 1.5.7beta05 [November 25, 2011] + Removed "zTXt" from warning in generic chunk decompression function. + Validate time settings passed to pngset() and png_convert_to_rfc1123() + (Frank Busse). + Added MINGW support to CMakeLists.txt + Reject invalid compression flag or method when reading the iTXt chunk. + Backed out 'simplified' API changes. The API seems too complex and there + is a lack of consensus or enthusiasm for the proposals. The API also + reveals significant bugs inside libpng (double gamma correction and the + known bug of being unable to retrieve a corrected palette). It seems + better to wait until the bugs, at least, are corrected. + Moved pngvalid.c into contrib/libtests + Rebuilt Makefile.in, configure, etc., with autoconf-2.68 + +Version 1.5.7rc01 [December 1, 2011] + Replaced an "#if" with "#ifdef" in pngrtran.c + Revised #if PNG_DO_BC block in png.c (use #ifdef and add #else) + +Version 1.5.7rc02 [December 5, 2011] + Revised project files and contrib/pngvalid/pngvalid.c to account for + the relocation of pngvalid into contrib/libtests. + Revised pngconf.h to use " __declspec(restrict)" only when MSC_VER >= 1400, + as in libpng-1.5.4. + Put CRLF line endings in the owatcom project files. + +Version 1.5.7rc03 [December 7, 2011] + Updated CMakeLists.txt to account for the relocation of pngvalid.c + +Version 1.5.7 [December 15, 2011] + Minor fixes to pngvalid.c for gcc 4.6.2 compatibility to remove warnings + reported by earlier versions. + Fixed minor memset/sizeof errors in pngvalid.c. + +Version 1.6.0beta01 [December 15, 2011] + Removed machine-generated configure files from the GIT repository (they will + continue to appear in the tarball distributions and in the libpng15 and + earlier GIT branches). + Restored the new 'simplified' API, which was started in libpng-1.5.7beta02 + but later deleted from libpng-1.5.7beta05. + Added example programs for the new 'simplified' API. + Added ANSI-C (C90) headers and require them, and take advantage of the + change. Also fixed some of the projects/* and contrib/* files that needed + updates for libpng16 and the move of pngvalid.c. + With this change the required ANSI-C header files are assumed to exist: the + implementation must provide float.h, limits.h, stdarg.h and stddef.h and + libpng relies on limits.h and stddef.h existing and behaving as defined + (the other two required headers aren't used). Non-ANSI systems that don't + have stddef.h or limits.h will have to provide an appropriate fake + containing the relevant types and #defines. + The use of FAR/far has been eliminated and the definition of png_alloc_size_t + is now controlled by a flag so that 'small size_t' systems can select it + if necessary. Libpng 1.6 may not currently work on such systems -- it + seems likely that it will ask 'malloc' for more than 65535 bytes with any + image that has a sufficiently large row size (rather than simply failing + to read such images). + New tools directory containing tools used to generate libpng code. + Fixed race conditions in parallel make builds. With higher degrees of + parallelism during 'make' the use of the same temporary file names such + as 'dfn*' can result in a race where a temporary file from one arm of the + build is deleted or overwritten in another arm. This changes the + temporary files for suffix rules to always use $* and ensures that the + non-suffix rules use unique file names. + +Version 1.6.0beta02 [December 21, 2011] + Correct configure builds where build and source directories are separate. + The include path of 'config.h' was erroneously made relative in pngvalid.c + in libpng 1.5.7. + +Version 1.6.0beta03 [December 22, 2011] + Start-up code size improvements, error handler flexibility. These changes + alter how the tricky allocation of the initial png_struct and png_info + structures are handled. png_info is now handled in pretty much the same + way as everything else, except that the allocations handle NULL return + silently. png_struct is changed in a similar way on allocation and on + deallocation a 'safety' error handler is put in place (which should never + be required). The error handler itself is changed to permit mismatches + in the application and libpng error buffer size; however, this means a + silent change to the API to return the jmp_buf if the size doesn't match + the size from the libpng compilation; libpng now allocates the memory and + this may fail. Overall these changes result in slight code size + reductions; however, this is a reduction in code that is always executed + so is particularly valuable. Overall on a 64-bit system the libpng DLL + decreases in code size by 1733 bytes. pngerror.o increases in size by + about 465 bytes because of the new functionality. + Added png_convert_to_rfc1123_buffer() and deprecated png_convert_to_rfc1123() + to avoid including a spurious buffer in the png_struct. + +Version 1.6.0beta04 [December 30, 2011] + Regenerated configure scripts with automake-1.11.2 + Eliminated png_info_destroy(). It is now used only in png.c and only calls + one other internal function and memset(). + Enabled png_get_sCAL_fixed() if floating point APIs are enabled. Previously + it was disabled whenever internal fixed point arithmetic was selected, + which meant it didn't exist even on systems where FP was available but not + preferred. + Added pngvalid.c compile time checks for const APIs. + Implemented 'restrict' for png_info and png_struct. Because of the way + libpng works both png_info and png_struct are always accessed via a + single pointer. This means adding C99 'restrict' to the pointer gives + the compiler some opportunity to optimize the code. This change allows + that. + Moved AC_MSG_CHECKING([if libraries can be versioned]) later to the proper + location in configure.ac (Gilles Espinasse). + Changed png_memcpy to C assignment where appropriate. Changed all those + uses of png_memcpy that were doing a simple assignment to assignments + (all those cases where the thing being copied is a non-array C L-value). + Added some error checking to png_set_*() routines. + Removed the reference to the non-exported function png_memcpy() from + example.c. + Fixed the Visual C 64-bit build - it requires jmp_buf to be aligned, but + it had become misaligned. + Revised contrib/pngminus/pnm2png.c to avoid warnings when png_uint_32 + and unsigned long are of different sizes. + +Version 1.6.0beta05 [January 15, 2012] + Updated manual with description of the simplified API (copied from png.h) + Fix bug in pngerror.c: some long warnings were being improperly truncated + (CVE-2011-3464, bug introduced in libpng-1.5.3beta05). + +Version 1.6.0beta06 [January 24, 2012] + Added palette support to the simplified APIs. This commit + changes some of the macro definitions in png.h, app code + may need corresponding changes. + Increased the formatted warning buffer to 192 bytes. + Added color-map support to simplified API. This is an initial version for + review; the documentation has not yet been updated. + Fixed Min/GW uninstall to remove libpng.dll.a + +Version 1.6.0beta07 [January 28, 2012] + Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived) + compiler issues slightly different warnings from those issued by the + current vesions of GCC. This eliminates those warnings by + adding/removing casts and small code rewrites. + Updated configure.ac from autoupdate: added --enable-werror option. + Also some layout regularization and removal of introduced tab characters + (replaced with 3-character indentation). Obsolete macros identified by + autoupdate have been removed; the replacements are all in 2.59 so + the pre-req hasn't been changed. --enable-werror checks for support + for -Werror (or the given argument) in the compiler. This mimics the + gcc configure option by allowing -Werror to be turned on safely; without + the option the tests written in configure itself fail compilation because + they cause compiler warnings. + Rewrote autogen.sh to run autoreconf instead of running tools one-by-one. + Conditionalize the install rules for MINGW and CYGWIN in CMakeLists.txt and + set CMAKE_LIBRARY_OUTPUT_DIRECTORY to "lib" on all platforms (C. Yapp). + Freeze libtool files in the 'scripts' directory. This version of autogen.sh + attempts to dissuade people from running it when it is not, or should not, + be necessary. In fact, autogen.sh does not work when run in a libpng + directory extracted from a tar distribution anymore. You must run it in + a GIT clone instead. + Added two images to contrib/pngsuite (1-bit and 2-bit transparent grayscale), + and renamed three whose names were inconsistent with those in + pngsuite/README.txt. + +Version 1.6.0beta08 [February 1, 2012] + Fixed Image::colormap misalignment in pngstest.c + Check libtool/libtoolize version number (2.4.2) in configure.ac + Divide test-pngstest.sh into separate pngstest runs for basic and + transparent images. + Moved automake options to AM_INIT_AUTOMAKE in configure.ac + Added color-tests, silent-rules (Not yet implemented in Makefile.am) and + version checking to configure.ac + Improved pngstest speed by not doing redundant tests and add const to + the background parameter of png_image_finish_read. The --background + option is now done automagically only when required, so that commandline + option no longer exists. + Cleaned up pngpriv.h to consistently declare all functions and data. + Also eliminated PNG_CONST_DATA, which is apparently not needed but we + can't be sure until it is gone. + Added symbol prefixing that allows all the libpng external symbols + to be prefixed (suggested by Reuben Hawkins). + Updated "ftbb*.png" list in the owatcom and vstudio projects. + Fixed 'prefix' builds on clean systems. The generation of pngprefix.h + should not require itself. + Updated INSTALL to explain that autogen.sh must be run in a GIT clone, + not in a libpng directory extracted from a tar distribution. + +Version 1.6.0beta09 [February 1, 2012] + Reverted the prebuilt configure files to libpng-1.6.0beta05 condition. + +Version 1.6.0beta10 [February 3, 2012] + Added Z_SOLO for zlib-1.2.6+ and correct pngstest tests + Updated list of test images in CMakeLists.txt + Updated the prebuilt configure files to current condition. + Revised INSTALL information about autogen.sh; it works in tar distributions. + +Version 1.6.0beta11 [February 16, 2012] + Fix character count in pngstest command in projects/owatcom/pngstest.tgt + Revised test-pngstest.sh to report PASS/FAIL for each image. + Updated documentation about the simplified API. + Corrected estimate of error in libpng png_set_rgb_to_gray API. The API is + extremely inaccurate for sRGB conversions because it uses an 8-bit + intermediate linear value and it does not use the sRGB transform, so it + suffers from the known instability in gamma transforms for values close + to 0 (see Poynton). The net result is that the calculation has a maximum + error of 14.99/255; 0.5/255^(1/2.2). pngstest now uses 15 for the + permitted 8-bit error. This may still not be enough because of arithmetic + error. + Removed some unused arrays (with #ifdef) from png_read_push_finish_row(). + Fixed a memory overwrite bug in simplified read of RGB PNG with + non-linear gamma Also bugs in the error checking in pngread.c and changed + quite a lot of the checks in pngstest.c to be correct; either correctly + written or not over-optimistic. The pngstest changes are insufficient to + allow all possible RGB transforms to be passed; pngstest cmppixel needs + to be rewritten to make it clearer which errors it allows and then changed + to permit known inaccuracies. + Removed tests for no-longer-used *_EMPTY_PLTE_SUPPORTED from pngstruct.h + Fixed fixed/float API export conditionals. 1) If FIXED_POINT or + FLOATING_POINT options were switched off, png.h ended up with lone ';' + characters. This is not valid ANSI-C outside a function. The ';' + characters have been moved inside the definition of PNG_FP_EXPORT and + PNG_FIXED_EXPORT. 2) If either option was switched off, the declaration + of the corresponding functions were completely omitted, even though some + of them are still used internally. The result is still valid, but + produces warnings from gcc with some warning options (including -Wall). The + fix is to cause png.h to declare the functions with PNG_INTERNAL_FUNCTION + when png.h is included from pngpriv.h. + Check for invalid palette index while reading paletted PNG. When one is + found, issue a warning and increase png_ptr->num_palette accordingly. + Apps are responsible for checking to see if that happened. + +Version 1.6.0beta12 [February 18, 2012] + Do not increase num_palette on invalid_index. + Relocated check for invalid palette index to pngrtran.c, after unpacking + the sub-8-bit pixels. + Fixed CVE-2011-3026 buffer overrun bug. This bug was introduced when + iCCP chunk support was added at libpng-1.0.6. Deal more correctly with the + test on iCCP chunk length. Also removed spurious casts that may hide + problems on 16-bit systems. + +Version 1.6.0beta13 [February 24, 2012] + Eliminated redundant png_push_read_tEXt|zTXt|iTXt|unknown code from + pngpread.c and use the sequential png_handle_tEXt, etc., in pngrutil.c; + now that png_ptr->buffer is inaccessible to applications, the special + handling is no longer useful. + Added PNG_SAFE_LIMITS feature to pnglibconf.dfa, pngpriv.h, and new + pngusr.dfa to reset the user limits to safe ones if PNG_SAFE_LIMITS is + defined. To enable, use "CPPFLAGS=-DPNG_SAFE_LIMITS_SUPPORTED=1" on the + configure command or put #define PNG_SAFE_LIMITS_SUPPORTED in + pnglibconf.h.prebuilt and pnglibconf.h. + +Version 1.6.0beta14 [February 27, 2012] + Added information about the new limits in the manual. + Updated Makefile.in + +Version 1.6.0beta15 [March 2, 2012] + Removed unused "current_text" members of png_struct and the png_free() + of png_ptr->current_text from pngread.c + Rewrote pngstest.c for substantial speed improvement. + Fixed transparent pixel and 16-bit rgb tests in pngstest and removed a + spurious check in pngwrite.c + Added PNG_IMAGE_FLAG_FAST for the benefit of applications that store + intermediate files, or intermediate in-memory data, while processing + image data with the simplified API. The option makes the files larger + but faster to write and read. pngstest now uses this by default; this + can be disabled with the --slow option. + Improved pngstest fine tuning of error numbers, new test file generator. + The generator generates images that test the full range of sample values, + allow the error numbers in pngstest to be tuned and checked. makepng + also allows generation of images with extra chunks, although this is + still work-in-progress. + Added check for invalid palette index while reading. + Fixed some bugs in ICC profile writing. The code should now accept + all potentially valid ICC profiles and reject obviously invalid ones. + It now uses png_error() to do so rather than casually writing a PNG + without the necessary color data. + Removed whitespace from the end of lines in all source files and scripts. + +Version 1.6.0beta16 [March 6, 2012] + Relocated palette-index checking function from pngrutil.c to pngtrans.c + Added palette-index checking while writing. + Changed png_inflate() and calling routines to avoid overflow problems. + This is an intermediate check-in that solves the immediate problems and + introduces one performance improvement (avoiding a copy via png_ptr->zbuf.) + Further changes will be made to make ICC profile handling more secure. + Fixed build warnings (MSVC, GCC, GCC v3). Cygwin GCC with default options + declares 'index' as a global, causing a warning if it is used as a local + variable. GCC 64-bit warns about assigning a (size_t) (unsigned 64-bit) + to an (int) (signed 32-bit). MSVC, however, warns about using the + unary '-' operator on an unsigned value (even though it is well defined + by ANSI-C to be ~x+1). The padding calculation was changed to use a + different method. Removed the tests on png_ptr->pass. + Added contrib/libtests/tarith.c to test internal arithmetic functions from + png.c. This is a libpng maintainer program used to validate changes to the + internal arithmetic functions. + Made read 'inflate' handling like write 'deflate' handling. The read + code now claims and releases png_ptr->zstream, like the write code. + The bug whereby the progressive reader failed to release the zstream + is now fixed, all initialization is delayed, and the code checks for + changed parameters on deflate rather than always calling + deflatedEnd/deflateInit. + Validate the zTXt strings in pngvalid. + Added code to validate the windowBits value passed to deflateInit2(). + If the call to deflateInit2() is wrong a png_warning will be issued + (in fact this is harmless, but the PNG data produced may be sub-optimal). + +Version 1.6.0beta17 [March 10, 2012] + Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition. + Reject all iCCP chunks after the first, even if the first one is invalid. + Deflate/inflate was reworked to move common zlib calls into single + functions [rw]util.c. A new shared keyword check routine was also added + and the 'zbuf' is no longer allocated on progressive read. It is now + possible to call png_inflate() incrementally. + If benign errors are disabled use maximum window on ancilliary inflate. + This works round a bug introduced in 1.5.4 where compressed ancillary + chunks could end up with a too-small windowBits value in the deflate + header. + +Version 1.6.0beta18 [March 16, 2012] + Issue a png_benign_error() instead of png_warning() about bad palette index. + In pngtest, treat benign errors as errors if "-strict" is present. + Fixed an off-by-one error in the palette index checking function. + Fixed a compiler warning under Cygwin (Windows-7, 32-bit system) + Revised example.c to put text strings in a temporary character array + instead of directly assigning string constants to png_textp members. + This avoids compiler warnings when -Wwrite-strings is enabled. + Added output flushing to aid debugging under Visual Studio. Unfortunately + this is necessary because the VS2010 output window otherwise simply loses + the error messages on error (they weren't flushed to the window before + the process exited, apparently!) + Added configuration support for benign errors and changed the read + default. Also changed some warnings in the iCCP and sRGB handling + from to benign errors. Configuration now makes read benign + errors warnings and write benign errors to errors by default (thus + changing the behavior on read). The simplified API always forces + read benign errors to warnings (regardless of the system default, unless + this is disabled in which case the simplified API can't be built.) + +Version 1.6.0beta19 [March 18, 2012] + Work around for duplicate row start calls; added warning messages. + This turns on PNG_FLAG_DETECT_UNINITIALIZED to detect app code that + fails to call one of the 'start' routines (not enabled in libpng-1.5 + because it is technically an API change, since it did normally work + before.) It also makes duplicate calls to png_read_start_row (an + internal function called at the start of the image read) benign, as + they were before changes to use png_inflate_claim. Somehow webkit is + causing this to happen; this is probably a mis-feature in the zlib + changes so this commit is only a work-round. + Removed erroneous setting of DETECT_UNINITIALIZED and added more + checks. The code now does a png_error if an attempt is made to do the + row initialization twice; this is an application error and it has + serious consequences because the transform data in png_struct is + changed by each call. + Added application error reporting and added chunk names to read + benign errors; also added --strict to pngstest - not enabled + yet because a warning is produced. + Avoid the double gamma correction warning in the simplified API. + This allows the --strict option to pass in the pngstest checks + +Version 1.6.0beta20 [March 29, 2012] + Changed chunk handler warnings into benign errors, incrementally load iCCP + Added checksum-icc.c to contrib/tools + Prevent PNG_EXPAND+PNG_SHIFT doing the shift twice. + Recognize known sRGB ICC profiles while reading; prefer writing the + iCCP profile over writing the sRGB chunk, controlled by the + PNG_sRGB_PROFILE_CHECKS option. + Revised png_set_text_2() to avoid potential memory corruption (fixes + CVE-2011-3048, also known as CVE-2012-3425). + +Version 1.6.0beta21 [April 27, 2012] + Revised scripts/makefile.darwin: use system zlib; remove quotes around + architecture list; add missing ppc architecture; add architecture options + to shared library link; don't try to create a shared lib based on missing + RELEASE variable. + Enable png_set_check_for_invalid_index() for both read and write. + Removed #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED in pngpriv.h around + declaration of png_handle_unknown(). + Added -lssp_nonshared in a comment in scripts/makefile.freebsd + and changed deprecated NOOBJ and NOPROFILE to NO_OBJ and NO_PROFILE. + +Version 1.6.0beta22 [May 23, 2012] + Removed need for -Wno-cast-align with clang. clang correctly warns on + alignment increasing pointer casts when -Wcast-align is passed. This + fixes the cases that clang warns about either by eliminating the + casts from png_bytep to png_uint_16p (pngread.c), or, for pngrutil.c + where the cast is previously verified or pngstest.c where it is OK, by + introducing new png_aligncast macros to do the cast in a way that clang + accepts. + +Version 1.6.0beta23 [June 6, 2012] + Revised CMakeLists.txt to not attempt to make a symlink under mingw. + Made fixes for new optimization warnings from gcc 4.7.0. The compiler + performs an optimization which is safe; however it then warns about it. + Changing the type of 'palette_number' in pngvalid.c removes the warning. + Do not depend upon a GCC feature macro being available for use in generating + the linker mapfile symbol prefix. + Improved performance of new do_check_palette_indexes() function (only + update the value when it actually increases, move test for whether + the check is wanted out of the function. + +Version 1.6.0beta24 [June 7, 2012] + Don't check palette indexes if num_palette is 0 (as it can be in MNG files). + +Version 1.6.0beta25 [June 16, 2012] + Revised png_set_keep_unknown_chunks() so num_chunks < 0 means ignore all + unknown chunks and all known chunks except for IHDR, PLTE, tRNS, IDAT, + and IEND. Previously it only meant ignore all unknown chunks, the + same as num_chunks == 0. Revised png_image_skip_unused_chunks() to + provide a list of chunks to be processed instead of a list of chunks to + ignore. Revised contrib/gregbook/readpng2.c accordingly. + +Version 1.6.0beta26 [July 10, 2012] + Removed scripts/makefile.cegcc from the *.zip and *.7z distributions; it + depends on configure, which is not included in those archives. + Moved scripts/chkfmt to contrib/tools. + Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386. + +Version 1.6.0beta27 [August 11, 2012] + Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE when __GNUC__ < 3. + Do not use __restrict when GNUC is <= 3.1 + Removed references to png_zalloc() and png_zfree() from the manual. + Fixed configurations where floating point is completely disabled. Because + of the changes to support symbol prefixing PNG_INTERNAL_FUNCTION declares + floating point APIs during libpng builds even if they are completely + disabled. This requires the png floating point types (png_double*) to be + declared even though the functions are never actually defined. This + change provides a dummy definition so that the declarations work, yet any + implementation will fail to compile because of an incomplete type. + Re-eliminated the use of strcpy() in pngtest.c. An unncessary use of + strcpy() was accidentally re-introduced in libpng16; this change replaces + it with strncpy(). + Eliminated use of png_sizeof(); use sizeof() instead. + Use a consistent style for (sizeof type) and (sizeof (array)) + Cleanup of png_set_filler(). This function does very different things on + read and write. In libpng 1.6 the two cases can be distinguished and + considerable code cleanup, and extra error checking, is possible. This + makes calls on the write side that have no effect be ignored with a + png_app_error(), which can be disabled in the app using + png_set_benign_errors(), and removes the spurious use of usr_channels + on the read side. + Insist on autotools 1.12.1 for git builds because there are security issues + with 1.12 and insisting on anything less would allow 1.12 to be used. + Removed info_ptr->signature[8] from WRITE-only builds. + Add some conditions for compiling png_fixed(). This is a small function + but it requires "-lm" on some platforms. + Cause pngtest --strict to fail on any warning from libpng (not just errors) + and cause it not to fail at the comparison step if libpng lacks support + for writing chunks that it reads from the input (currently only implemented + for compressed text chunks). + Make all three "make check" test programs work without READ or WRITE support. + Now "make check" will succeed even if libpng is compiled with -DPNG_NO_READ + or -DPNG_NO_WRITE. The tests performed are reduced, but the basic reading + and writing of a PNG file is always tested by one or more of the tests. + Consistently use strlen(), memset(), memcpy(), and memcmp() instead of the + png_strlen(), png_memset(), png_memcpy(), and png_memcmp() macros. + Removed the png_sizeof(), png_strlen(), png_memset(), png_memcpy(), and + png_memcmp() macros. + Work around gcc 3.x and Microsoft Visual Studio 2010 complaints. Both object + to the split initialization of num_chunks. + +Version 1.6.0beta28 [August 29, 2012] + Unknown handling fixes and clean up. This adds more correct option + control of the unknown handling, corrects the pre-existing bug where + the per-chunk 'keep' setting is ignored and makes it possible to skip + IDAT chunks in the sequential reader (broken in earlier 1.6 versions). + There is a new test program, test-unknown.c, which is a work in progress + (not currently part of the test suite). Comments in the header files now + explain how the unknown handling works. + Allow fine grain control of unknown chunk APIs. This change allows + png_set_keep_unknown_chunks() to be turned off if not required and causes + both read and write to behave appropriately (on read this is only possible + if the user callback is used to handle unknown chunks). The change + also removes the support for storing unknown chunks in the info_struct + if the only unknown handling enabled is via the callback, allowing libpng + to be configured with callback reading and none of the unnecessary code. + Corrected fix for unknown handling in pngtest. This reinstates the + libpng handling of unknown chunks other than vpAg and sTER (including + unsafe-to-copy chunks which were dropped before) and eliminates the + repositioning of vpAg and sTER in pngtest.png by changing pngtest.png + (so the chunks are where libpng would put them). + Added "tunknown" test and corrected a logic error in png_handle_unknown() + when SAVE support is absent. Moved the shell test scripts for + contrib/libtests from the libpng top directory to contrib/libtests. + png_handle_unknown() must always read or skip the chunk, if + SAVE_UNKNOWN_CHUNKS is turned off *and* the application does not set + a user callback an unknown chunk will not be read, leading to a read + error, which was revealed by the "tunknown" test. + Cleaned up and corrected ICC profile handling. + contrib/libtests/makepng: corrected 'rgb' and 'gray' cases. profile_error + messages could be truncated; made a correct buffer size calculation and + adjusted pngerror.c appropriately. png_icc_check_* checking improved; + changed the functions to receive the correct color type of the PNG on read + or write and check that it matches the color space of the profile (despite + what the comments said before, there is danger in assuming the app will + cope correctly with an RGB profile on a grayscale image and, since it + violates the PNG spec, allowing it is certain to produce inconsistent + app behavior and might even cause app crashes.) Check that profiles + contain the tags needed to process the PNG (tags all required by the ICC + spec). Removed unused PNG_STATIC from pngpriv.h. + +Version 1.6.0beta29 [September 4, 2012] + Fixed the simplified API example programs to add the *colormap parameter + to several of he API and improved the error message if the version field + is not set. + Added contrib/examples/* to the *.zip and *.7z distributions. + Updated simplified API synopses and description of the png_image structure + in the manual. + Made makepng and pngtest produce identical PNGs, add "--relaxed" option + to pngtest. The "--relaxed" option turns off the benign errors that are + enabled by default in pre-RC builds. makepng can now write ICC profiles + where the length has not been extended to a multiple of 4, and pngtest + now intercepts all libpng errors, allowing the previously-introduced + "--strict test" on no warnings to actually work. + Improved ICC profile handling including cHRM chunk generation and fixed + Cygwin+MSVC build errors. The ICC profile handling now includes more + checking. Several errors that caused rejection of the profile are now + handled with a warning in such a way that the invalid profiles will be + read by default in release (but not pre-RC) builds but will not be + written by default. The easy part of handling the cHRM chunk is written, + where the ICC profile contains the required data. The more difficult + part plus guessing a gAMA value requires code to pass selected RGB values + through the profile. + +Version 1.6.0beta30 [October 24, 2012] + Changed ICC profile matrix/vector types to not depend on array type rules. + By the ANSI-C standard the new types should be identical to the previous + versions, and all known versions of gcc tested with the previous versions + except for GCC-4.2.1 work with this version. The change makes the ANSI-C + rule that const applied to an array of elements applies instead to the + elements in the array moot by explicitly applying const to the base + elements of the png_icc_matrix and png_icc_vector types. The accidental + (harmless) 'const' previously applied to the parameters of two of the + functions have also been removed. + Added a work around for GCC 4.2 optimization bug. + Marked the broken (bad white point) original HP sRGB profiles correctly and + correct comments. + Added -DZ_SOLO to contrib/pngminim/*/makefile to work with zlib-1.2.7 + Use /MDd for vstudio debug builds. Also added pngunkown to the vstudio + builds, fixed build errors and corrected a minor exit code error in + pngvalid if the 'touch' file name is invalid. + Add updated WARNING file to projects/vstudio from libpng 1.5/vstudio + Fixed build when using #define PNG_NO_READ_GAMMA in png_do_compose() in + pngrtran.c (Domani Hannes). + +Version 1.6.0beta31 [November 1, 2012] + Undid the erroneous change to vstudio/pngvalid build in libpng-1.6.0beta30. + Made pngvalid so that it will build outside the libpng source tree. + Made builds -DPNG_NO_READ_GAMMA compile (the unit tests still fail). + Made PNG_NO_READ_GAMMA switch off interfaces that depend on READ_GAMMA. + Prior to 1.6.0 switching off READ_GAMMA did unpredictable things to the + interfaces that use it (specifically, png_do_background in 1.4 would + simply display composite for grayscale images but do composition + with the incorrect arithmetic for color ones). In 1.6 the semantic + of -DPNG_NO_READ_GAMMA is changed to simply disable any interface that + depends on it; this obliges people who set it to consider whether they + really want it off if they happen to use any of the interfaces in + question (typically most users who disable it won't). + Fixed GUIDs in projects/vstudio. Some were duplicated or missing, + resulting in VS2010 having to update the files. + Removed non-working ICC profile support code that was mostly added to + libpng-1.6.0beta29 and beta30. There was too much code for too little + gain; implementing full ICC color correction may be desireable but is left + up to applications. + +Version 1.6.0beta32 [November 25, 2012] + Fixed an intermittent SEGV in pngstest due to an uninitialized array element. + Added the ability for contrib/libtests/makepng.c to make a PNG with just one + color. This is useful for debugging pngstest color inaccuracy reports. + Fixed error checking in the simplified write API (Olaf van der Spek) + Made png_user_version_check() ok to use with libpng version 1.10.x and later. + +Version 1.6.0beta33 [December 15, 2012] + Fixed typo in png.c (PNG_SET_CHUNK_MALLOC_MAX should be PNG_CHUNK_MALLOC_MAX) + that causes the MALLOC_MAX limit not to work (John Bowler) + Change png_warning() to png_app_error() in pngwrite.c and comment the + fall-through condition. + Change png_warning() to png_app_warning() in png_write_tRNS(). + Rearranged the ARM-NEON optimizations: Isolated the machine specific code + to the hardware subdirectory and added comments to pngrutil.c so that + implementors of other optimizations know what to do. + Fixed cases of unquoted DESTDIR in Makefile.am + Rebuilt Makefile.in, etc., with autoconf-2.69 and automake-1.12.5. + +Version 1.6.0beta34 [December 19, 2012] + Cleaned up whitespace in the synopsis portion of the manpage "libpng.3" + Disassembled the version number in scripts/options.awk (necessary for + building on SunOs). + +Version 1.6.0beta35 [December 23, 2012] + Made default Zlib compression settings be configurable. This adds #defines to + pnglibconf.h to control the defaults. + Fixed Windows build issues, enabled ARM compilation. Various warnings issued + by earlier versions of GCC fixed for Cygwin and Min/GW (which both use old + GCCs.) ARM support is enabled by default in zlib.props (unsupported by + Microsoft) and ARM compilation is made possible by deleting the check for + x86. The test programs cannot be run because they are not signed. + +Version 1.6.0beta36 [January 2, 2013] + Discontinued distributing libpng-1.x.x.tar.bz2. + Discontinued distributing libpng-1.7.0-1.6.0-diff.txt and similar. + Rebuilt configure with autoconf-2.69 (inadvertently not done in beta33) + Fixed 'make distcheck' on SUN OS - libpng.so was not being removed + +Version 1.6.0beta37 [January 10, 2013] + Fixed conceivable but difficult to repro overflow. Also added two test + programs to generate and test a PNG which should have the problem. + +Version 1.6.0beta39 [January 19, 2013] + Again corrected attempt at overflow detection in png_set_unknown_chunks(). + Added overflow detection in png_set_sPLT() and png_set_text_2(). + +Version 1.6.0beta40 [January 20, 2013] + Use consistent handling of overflows in text, sPLT and unknown png_set_* APIs + +Version 1.6.0rc01 [January 26, 2013] + No changes. + +Version 1.6.0rc02 [February 4, 2013] + Added png_get_palette_max() function. + +Version 1.6.0rc03 [February 5, 2013] + Fixed the png_get_palette_max API. + +Version 1.6.0rc04 [February 7, 2013] + Turn serial tests back on (recently turned off by autotools upgrade). + +Version 1.6.0rc05 [February 8, 2013] + Update manual about png_get_palette_max(). + +Version 1.6.0rc06 [February 9, 2013] + Fixed missing dependency in --prefix builds The intermediate + internal 'prefix.h' file can only be generated correctly after + pnglibconf.h, however the dependency was not in Makefile.am. The + symptoms are unpredictable depending on the order make chooses to + build pngprefix.h and pnglibconf.h, often the error goes unnoticed + because there is a system pnglibconf.h to use instead. + +Version 1.6.0rc07 [February 10, 2013] + Enclosed the new png_get_palette_max in #ifdef PNG_GET_PALETTE_MAX_SUPPORTED + block, and revised pnglibconf.h and pnglibconf.h.prebuilt accordingly. + +Version 1.6.0rc08 [February 10, 2013] + Fix typo in png.h #ifdef + +Version 1.6.0 [February 14, 2013] + No changes. + +Version 1.6.1beta01 [February 16, 2013] + Made symbol prefixing work with the ARM neon optimizations. Also allow + pngpriv.h to be included for preprocessor definitions only, so it can + be used in non-C/C++ files. Back ported from libpng 1.7. + Made sRGB check numbers consistent. + Ported libpng 1.5 options.awk/dfn file handling to 1.6, fixed one bug. + Removed cc -E workround, corrected png_get_palette_max API Tested on + SUN OS cc 5.9, which demonstrates the tokenization problem previously + avoided by using /lib/cpp. Since all .dfn output is now protected in + double quotes unless it is to be macro substituted the fix should + work everywhere. + Enabled parallel tests - back ported from libpng-1.7. + scripts/pnglibconf.dfa formatting improvements back ported from libpng17. + Fixed a race condition in the creation of the build 'scripts' directory + while building with a parallel make. + Use approved/supported Android method to check for NEON, use Linux/POSIX + 1003.1 API to check /proc/self/auxv avoiding buffer allocation and other + library calls (ported from libpng15). + +Version 1.6.1beta02 [February 19, 2013] + Use parentheses more consistently in "#if defined(MACRO)" tests. + Folded long lines. + Reenabled code to allow zero length PLTE chunks for MNG. + +Version 1.6.1beta03 [February 22, 2013] + Fixed ALIGNED_MEMORY support. + Allow run-time ARM NEON checking to be disabled. A new configure option: + --enable-arm-neon=always will stop the run-time checks. New checks + within arm/arm_init.c will cause the code not to be compiled unless + __ARM_NEON__ is set. This should make it fail safe (if someone asks + for it on then the build will fail if it can't be done.) + Updated the INSTALL document. + +Version 1.6.1beta04 [February 27, 2013] + Revised INSTALL to recommend using CPPFLAGS instead of INCLUDES. + Revised scripts/makefile.freebsd to respect ZLIBLIB and ZLIBINC. + Revised scripts/dfn.awk to work with the buggy MSYS awk that has trouble + with CRLF line endings. + +Version 1.6.1beta05 [March 1, 2013] + Avoid a possible memory leak in contrib/gregbook/readpng.c + +Version 1.6.1beta06 [March 4, 2013] + Better documentation of unknown handling API interactions. + Corrected Android builds and corrected libpng.vers with symbol + prefixing This adds an API to set optimization options externally, + providing an alternative and general solution for the non-portable + run-time tests used by the ARM Neon code. It also makes those tests + compile and link on Android. + The order of settings vs options in pnglibconf.h is reversed to allow + settings to depend on options and options can now set (or override) the + defaults for settings. + +Version 1.6.1beta07 [March 7, 2013] + Corrected simplified API default gamma for color-mapped output, added + a flag to change default. In 1.6.0 when the simplified API was used + to produce color-mapped output from an input image with no gamma + information the gamma assumed for the input could be different from + that assumed for non-color-mapped output. In particular 16-bit depth + input files were assumed to be sRGB encoded, whereas in the 'direct' + case they were assumed to have linear data. This was an error. The + fix makes the simplified API treat all input files the same way and + adds a new flag to the png_image::flags member to allow the + application/user to specify that 16-bit files contain sRGB data + rather than the default linear. + Fixed bugs in the pngpixel and makepng test programs. + +Version 1.6.1beta08 [March 7, 2013] + Fixed CMakelists.txt to allow building a single variant of the library + (Claudio Bley): + Introduced a PNG_LIB_TARGETS variable that lists all activated library + targets. It is an error if this variable ends up empty, ie. you have + to build at least one library variant. + Made the *_COPY targets only depend on library targets actually being build. + Use PNG_LIB_TARGETS to unify a code path. + Changed the CREATE_SYMLINK macro to expect the full path to a file as the + first argument. When symlinking the filename component of that path is + determined and used as the link target. + Use copy_if_different in the CREATE_SYMLINK macro. + +Version 1.6.1beta09 [March 13, 2013] + Eliminated two warnings from the Intel C compiler. The warnings are + technically valid, although a reasonable treatment of division would + show it to be incorrect. + +Version 1.6.1rc01 [March 21, 2013] + No changes. + +Version 1.6.1 [March 28, 2013] + No changes. + +Version 1.6.2beta01 [April 14, 2013] + Updated documentation of 1.5.x to 1.6.x changes in iCCP chunk handling. + Fixed incorrect warning of excess deflate data. End condition - the + warning would be produced if the end of the deflate stream wasn't read + in the last row. The warning is harmless. + Corrected the test on user transform changes on read. It was in the + png_set of the transform function, but that doesn't matter unless the + transform function changes the rowbuf size, and that is only valid if + transform_info is called. + Corrected a misplaced closing bracket in contrib/libtests/pngvalid.c + (Flavio Medeiros). + Corrected length written to uncompressed iTXt chunks (Samuli Suominen). + +Version 1.6.2rc01 [April 18, 2013] + Added contrib/tools/fixitxt.c, to repair the erroneous iTXt chunk length + written by libpng-1.6.0 and 1.6.1. + Disallow storing sRGB information when the sRGB is not supported. + +Version 1.6.2rc02 [April 18, 2013] + Merge pngtest.c with libpng-1.7.0 + +Version 1.6.2rc03 [April 22, 2013] + Trivial spelling cleanup. + +Version 1.6.2rc04 and 1.6.2rc05 [omitted] + +Version 1.6.2rc06 [April 24, 2013] + Reverted to version 1.6.2rc03. Recent changes to arm/neon support + have been ported to libpng-1.7.0beta09 and will reappear in version + 1.6.3beta01. + +Version 1.6.2 [April 25, 2013] + +Send comments/corrections/commendations to png-mng-implement at lists.sf.net +(subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe) +or to glennrp at users.sourceforge.net + +Glenn R-P +#endif diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/CMakeLists.txt b/3rdparty/wxwidgets3.0-3.0.1/src/png/CMakeLists.txt new file mode 100644 index 0000000000..4104359123 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/CMakeLists.txt @@ -0,0 +1,383 @@ +# CMakeLists.txt + +# Copyright (C) 2007-2011 Glenn Randers-Pehrson + +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +cmake_minimum_required(VERSION 2.4.4) +set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) + +if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE) + if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) + # workaround CMake 2.4.x bug + set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING + "Choose the type of build, options are: + None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) + Debug + Release + RelWithDebInfo + MinSizeRel.") + else() + set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING + "Choose the type of build, options are: + None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) + Debug + Release + RelWithDebInfo + MinSizeRel.") + endif() +endif() + +project(libpng C) +enable_testing() + +set(PNGLIB_MAJOR 1) +set(PNGLIB_MINOR 6) +set(PNGLIB_RELEASE 2) +set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) +set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) + +# needed packages +find_package(ZLIB REQUIRED) +include_directories(${ZLIB_INCLUDE_DIR}) + +if(NOT WIN32) + find_library(M_LIBRARY + NAMES m + PATHS /usr/lib /usr/local/lib + ) + if(NOT M_LIBRARY) + message(STATUS + "math library 'libm' not found - floating point support disabled") + endif() +else() + # not needed on windows + set(M_LIBRARY "") +endif() + +# COMMAND LINE OPTIONS +if(DEFINED PNG_SHARED) + option(PNG_SHARED "Build shared lib" ${PNG_SHARED}) +else() + option(PNG_SHARED "Build shared lib" ON) +endif() +if(DEFINED PNG_STATIC) + option(PNG_STATIC "Build static lib" ${PNG_STATIC}) +else() + option(PNG_STATIC "Build static lib" ON) +endif() + +option(PNG_TESTS "Build libpng tests" YES) + +# Many more configuration options could be added here +option(PNG_DEBUG "Build with debug output" NO) +option(PNGARG "Disable ANSI-C prototypes" NO) + +# SET LIBNAME +set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR}) + +# to distinguish between debug and release lib +set(CMAKE_DEBUG_POSTFIX "d") + +# Use the prebuilt pnglibconf.h file from the scripts folder +# TODO: fix this by building with awk; without this no cmake build can be +# configured directly (to do so indirectly use your local awk to build a +# pnglibconf.h in the build directory.) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt + ${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +# OUR SOURCES +set(libpng_public_hdrs + png.h + pngconf.h + ${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h +) +set(libpng_sources + ${libpng_public_hdrs} + pngdebug.h + pnginfo.h + pngpriv.h + pngstruct.h + png.c + pngerror.c + pngget.c + pngmem.c + pngpread.c + pngread.c + pngrio.c + pngrtran.c + pngrutil.c + pngset.c + pngtrans.c + pngwio.c + pngwrite.c + pngwtran.c + pngwutil.c +) +set(pngtest_sources + pngtest.c +) +set(pngvalid_sources + contrib/libtests/pngvalid.c +) +set(pngstest_sources + contrib/libtests/pngstest.c +) +# SOME NEEDED DEFINITIONS + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) +endif(MSVC) + +if(PNG_DEBUG) + add_definitions(-DPNG_DEBUG) +endif() + +# NOW BUILD OUR TARGET +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR}) + +unset(PNG_LIB_TARGETS) + +if(PNG_SHARED) + add_library(${PNG_LIB_NAME} SHARED ${libpng_sources}) + set(PNG_LIB_TARGETS ${PNG_LIB_NAME}) + if(MSVC) + # msvc does not append 'lib' - do it here to have consistent name + set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib") + set_target_properties(${PNG_LIB_NAME} PROPERTIES IMPORT_PREFIX "lib") + endif() + target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY}) +endif() + +if(PNG_STATIC) +# does not work without changing name + set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static) + add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources}) + list(APPEND PNG_LIB_TARGETS ${PNG_LIB_NAME_STATIC}) + if(MSVC) + # msvc does not append 'lib' - do it here to have consistent name + set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib") + endif() + target_link_libraries(${PNG_LIB_NAME_STATIC} ${ZLIB_LIBRARY} ${M_LIBRARY}) +endif() + +if(NOT PNG_LIB_TARGETS) + message(SEND_ERROR + "No library variant selected to build. " + "Please enable at least one of the following options: PNG_STATIC, PNG_SHARED") +endif() + +if(PNG_SHARED AND WIN32) + set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL) +endif() + +if(PNG_TESTS AND PNG_SHARED) + # does not work with msvc due to png_lib_ver issue + add_executable(pngtest ${pngtest_sources}) + target_link_libraries(pngtest ${PNG_LIB_NAME}) + add_test(pngtest ./pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png) + # + add_executable(pngvalid ${pngvalid_sources}) + target_link_libraries(pngvalid ${PNG_LIB_NAME}) + add_test(pngvalid ./pngvalid) + add_executable(pngstest ${pngstest_sources}) + target_link_libraries(pngstest ${PNG_LIB_NAME}) + add_test(pngstest ./pngstest + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g01.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g02.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g04.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g16.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn2c08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn2c16.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p01.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p02.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p04.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn4a08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn4a16.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn6a08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn6a16.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn0g01.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn0g02.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn0g04.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn2c16.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn3p08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbgn2c16.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbgn3p08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbrn2c08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbwn0g16.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbwn3p08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbyn3p08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp0n0g08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp0n2c08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp0n3p08.png + ${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp1n3p08.png + ) +endif() + +# Ensure the CMAKE_LIBRARY_OUTPUT_DIRECTORY is set +IF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) + SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib") +ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) + +# Set a variable with CMake code which: +# Creates a symlink from src to dest (if possible) or alternatively +# copies if different. +macro(CREATE_SYMLINK SRC_FILE DEST_FILE) + FILE(REMOVE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}) + if(WIN32 AND NOT CYGWIN AND NOT MSYS) + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE} + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SRC_FILE}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SRC_FILE}" ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE} + DEPENDS ${PNG_LIB_TARGETS} + ) + ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}) + else(WIN32 AND NOT CYGWIN AND NOT MSYS) + get_filename_component(LINK_TARGET "${SRC_FILE}" NAME) + execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + endif(WIN32 AND NOT CYGWIN AND NOT MSYS) +endmacro() + +# libpng is a library so default to 'lib' +if(NOT DEFINED CMAKE_INSTALL_LIBDIR) + set(CMAKE_INSTALL_LIBDIR lib) +endif(NOT DEFINED CMAKE_INSTALL_LIBDIR) + +# CREATE PKGCONFIG FILES +# we use the same files like ./configure, so we have to set its vars +# Only do this on Windows for Cygwin - the files don't make much sense outside +# a UNIX look alike +if(NOT WIN32 OR CYGWIN OR MINGW) + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix ${CMAKE_INSTALL_PREFIX}) + set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(includedir ${CMAKE_INSTALL_PREFIX}/include) + set(LIBS "-lz -lm") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY) + CREATE_SYMLINK(${PNGLIB_NAME}.pc libpng.pc) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in + ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) + CREATE_SYMLINK(${PNGLIB_NAME}-config libpng-config) +endif(NOT WIN32 OR CYGWIN OR MINGW) + +# SET UP LINKS +if(PNG_SHARED) + set_target_properties(${PNG_LIB_NAME} PROPERTIES +# VERSION 16.${PNGLIB_RELEASE}.1.6.2 + VERSION 16.${PNGLIB_RELEASE}.0 + SOVERSION 16 + CLEAN_DIRECT_OUTPUT 1) +endif() +if(PNG_STATIC) + # MSVC doesn't use a different file extension for shared vs. static + # libs. We are able to change OUTPUT_NAME to remove the _static + # for all other platforms. + if(NOT MSVC) + set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES + OUTPUT_NAME ${PNG_LIB_NAME} + CLEAN_DIRECT_OUTPUT 1) + endif() +endif() + +# If CMake > 2.4.x, we set a variable used below to export +# targets to an export file. +# TODO: Use VERSION_GREATER after our cmake_minimum_required >= 2.6.2 +if(CMAKE_MAJOR_VERSION GREATER 1 AND CMAKE_MINOR_VERSION GREATER 4) + set(PNG_EXPORT_RULE EXPORT libpng) +elseif(CMAKE_MAJOR_VERSION GREATER 2) # future proof + set(PNG_EXPORT_RULE EXPORT libpng) +endif() + +# INSTALL +if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) + install(TARGETS ${PNG_LIB_TARGETS} + ${PNG_EXPORT_RULE} + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + if(PNG_SHARED) + # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin + if(CYGWIN OR MINGW) + get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE}) + CREATE_SYMLINK(${BUILD_TARGET_LOCATION} libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} + DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif(CYGWIN OR MINGW) + + if(NOT WIN32) + get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE}) + CREATE_SYMLINK(${BUILD_TARGET_LOCATION} libpng${CMAKE_SHARED_LIBRARY_SUFFIX}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX} + DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif(NOT WIN32) + endif(PNG_SHARED) + + if(PNG_STATIC) + if(NOT WIN32 OR CYGWIN OR MINGW) + get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME_STATIC} LOCATION_${CMAKE_BUILD_TYPE}) + CREATE_SYMLINK(${BUILD_TARGET_LOCATION} libpng${CMAKE_STATIC_LIBRARY_SUFFIX}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} + DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif(NOT WIN32 OR CYGWIN OR MINGW) + endif() +endif() + +if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL ) + install(FILES ${libpng_public_hdrs} DESTINATION include) + install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME}) +endif() +if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL ) + if(NOT WIN32 OR CYGWIN OR MINGW) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config + DESTINATION bin) + endif(NOT WIN32 OR CYGWIN OR MINGW) +endif() + +if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL ) + # Install man pages + if(NOT PNG_MAN_DIR) + set(PNG_MAN_DIR "share/man") + endif() + install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3) + install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5) + # Install pkg-config files + if(NOT WIN32 OR CYGWIN OR MINGW) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config + DESTINATION bin) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config + DESTINATION bin) + endif(NOT WIN32 OR CYGWIN OR MINGW) +endif() + +# On versions of CMake that support it, create an export file CMake +# users can include() to import our targets +if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL ) + install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake) +endif() + +# what's with libpng-$VER%.txt and all the extra files? + +# UNINSTALL +# do we need this? + +# DIST +# do we need this? + +# to create msvc import lib for mingw compiled shared lib +# pexports libpng.dll > libpng.def +# lib /def:libpng.def /machine:x86 + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/INSTALL b/3rdparty/wxwidgets3.0-3.0.1/src/png/INSTALL new file mode 100644 index 0000000000..f987378009 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/INSTALL @@ -0,0 +1,170 @@ + +Installing libpng + +On Unix/Linux and similar systems, you can simply type + + ./configure [--prefix=/path] + make check + make install + +and ignore the rest of this document. + +If configure does not work on your system, or if you have a need to +change configure.ac or Makefile.am, and you have a reasonably +up-to-date set of tools, running ./autogen.sh in a git clone before +running ./configure may fix the problem. To be really sure that you +aren't using any of the included pre-built scripts, you can do this: + + ./configure --enable-maintainer-mode + make maintainer-clean + ./autogen.sh --maintainer --clean + ./autogen.sh --maintainer + ./configure [--prefix=/path] [other options] + make + make install + make check + +Instead, you can use one of the custom-built makefiles in the +"scripts" directory + + cp scripts/makefile.system makefile + make test + make install + +The files that are presently available in the scripts directory +are listed and described in scripts/README.txt. + +Or you can use one of the "projects" in the "projects" directory. + +Before installing libpng, you must first install zlib, if it +is not already on your system. zlib can usually be found +wherever you got libpng. zlib can be placed in another directory, +at the same level as libpng. + +If your system already has a preinstalled zlib you will still need +to have access to the zlib.h and zconf.h include files that +correspond to the version of zlib that's installed. + +If you wish to test with a particular zlib that is not first in the +standard library search path, put ZLIBLIB, ZLIBINC, CPPFLAGS, LDFLAGS, +and LD_LIBRARY_PATH in your environment before running "make test" +or "make distcheck": + +ZLIBLIB=/path/to/lib export ZLIBLIB +ZLIBINC=/path/to/include export ZLIBINC +CPPFLAGS="-I$ZLIBINC" export CPPFLAGS +LDFLAGS="-L$ZLIBLIB" export LDFLAGS +LD_LIBRARY_PATH="$ZLIBLIB:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH + +If you are using one of the makefile scripts, put ZLIBLIB and ZLIBINC +in your environment and type "make ZLIBLIB=$ZLIBLIB ZLIBINC=$ZLIBINC test". + +If you want to use "cmake" (see www.cmake.org), type + + cmake . -DCMAKE_INSTALL_PREFIX=/path + make + make install + +You can rename the directories that you downloaded (they +might be called "libpng-x.y.z" or "libpngNN" and "zlib-1.2.7" +or "zlib127") so that you have directories called "zlib" and "libpng". + +Your directory structure should look like this: + + .. (the parent directory) + libpng (this directory) + INSTALL (this file) + README + *.h + *.c + CMakeLists.txt => "cmake" script + configuration files: + configure.ac, configure, Makefile.am, Makefile.in, + autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in, + libpng-config.in, aclocal.m4, config.h.in, config.sub, + depcomp, install-sh, mkinstalldirs, test-pngtest.sh + contrib + gregbook + libtests + pngminim + pngminus + pngsuite + visupng + projects + visualc71 + vstudio + scripts + makefile.* + *.def (module definition files) + etc. + pngtest.png + etc. + zlib + README + *.h + *.c + contrib + etc. + +If the line endings in the files look funny, you may wish to get the other +distribution of libpng. It is available in both tar.gz (UNIX style line +endings) and zip (DOS style line endings) formats. + +If you are building libpng with MSVC, you can enter the +libpng projects\visualc6 or visualc71 directory and follow the instructions +in README.txt. + +Otherwise enter the zlib directory and follow the instructions in zlib/README, +then come back here and run "configure" or choose the appropriate +makefile.sys in the scripts directory. + +Copy the file (or files) that you need from the +scripts directory into this directory, for example + + MSDOS example: copy scripts\makefile.msc makefile + UNIX example: cp scripts/makefile.std makefile + +Read the makefile to see if you need to change any source or +target directories to match your preferences. + +Then read pnglibconf.dfa to see if you want to make any configuration +changes. + +Then just run "make" which will create the libpng library in +this directory and "make test" which will run a quick test that reads +the "pngtest.png" file and writes a "pngout.png" file that should be +identical to it. Look for "9782 zero samples" in the output of the +test. For more confidence, you can run another test by typing +"pngtest pngnow.png" and looking for "289 zero samples" in the output. +Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare +your output with the result shown in contrib/pngsuite/README. + +Most of the makefiles will allow you to run "make install" to +put the library in its final resting place (if you want to +do that, run "make install" in the zlib directory first if necessary). +Some also allow you to run "make test-installed" after you have +run "make install". + +Further information can be found in the README and libpng-manual.txt +files, in the individual makefiles, in png.h, and the manual pages +libpng.3 and png.5. + +Using the ./configure script -- 16 December 2002. +================================================= + +The ./configure script should work compatibly with what scripts/makefile.* +did, however there are some options you might need to add to configure +explicitly, which previously was done semi-automatically (if you didn't edit +scripts/makefile.* yourself, that is) + +CFLAGS="-Wall -O -funroll-loops \ +-malign-loops=2 -malign-functions=2" ./configure --prefix=/usr/include \ +--with-pkgconfigdir=/usr/lib/pkgconfig --includedir=/usr/include + +You can alternatively specify --includedir=/usr/include, /usr/local/include, +/usr/include/libpng%NN%, or whatever. + +If you find that the configure script is out-of-date or is not supporting +your platform properly, try running autogen.sh to regenerate "configure", +"Makefile.in", and the other configuration files. Then try configure again. + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/LICENSE b/3rdparty/wxwidgets3.0-3.0.1/src/png/LICENSE new file mode 100644 index 0000000000..acb4e1781b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/LICENSE @@ -0,0 +1,111 @@ + +This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +This code is released under the libpng license. + +libpng versions 1.2.6, August 15, 2004, through 1.6.2, April 25, 2013, are +Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors + + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + + +A "png_get_copyright" function is available, for convenient use in "about" +boxes and the like: + + printf("%s",png_get_copyright(NULL)); + +Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a +certification mark of the Open Source Initiative. + +Glenn Randers-Pehrson +glennrp at users.sourceforge.net +April 25, 2013 diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/Makefile.am b/3rdparty/wxwidgets3.0-3.0.1/src/png/Makefile.am new file mode 100644 index 0000000000..a2cd2c10bb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/Makefile.am @@ -0,0 +1,295 @@ +# Makefile.am: +# Source file for Makefile.in (and hence Makefile) +# + +PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ + +ACLOCAL_AMFLAGS = -I scripts + +# test programs - run on make check, make distcheck +check_PROGRAMS= pngtest pngunknown pngstest pngvalid + +pngtest_SOURCES = pngtest.c +pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la + +pngvalid_SOURCES = contrib/libtests/pngvalid.c +pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la + +pngstest_SOURCES = contrib/libtests/pngstest.c +pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la + +pngunknown_SOURCES = contrib/libtests/pngunknown.c +pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la + +# Generally these are single line shell scripts to run a test with a particular +# set of parameters: +TESTS =\ + tests/pngtest\ + tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\ + tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\ + tests/pngvalid-gamma-expand16-background\ + tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\ + tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\ + tests/pngvalid-progressive-interlace-size\ + tests/pngvalid-progressive-interlace-standard\ + tests/pngvalid-progressive-interlace-transform\ + tests/pngvalid-progressive-standard tests/pngvalid-standard\ + tests/pngstest-0g01 tests/pngstest-0g02 tests/pngstest-0g04\ + tests/pngstest-0g08 tests/pngstest-0g16 tests/pngstest-2c08\ + tests/pngstest-2c16 tests/pngstest-3p01 tests/pngstest-3p02\ + tests/pngstest-3p04 tests/pngstest-3p08 tests/pngstest-4a08\ + tests/pngstest-4a16 tests/pngstest-6a08 tests/pngstest-6a16\ + tests/pngstest-error tests/pngunknown-IDAT\ + tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\ + tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg + +# These tests are expected, and required, to fail: +XFAIL_TESTS = tests/pngstest-error + +# man pages +dist_man_MANS= libpng.3 libpngpf.3 png.5 + +# generate the -config scripts if required +binconfigs= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config +EXTRA_SCRIPTS= libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config +bin_SCRIPTS= @binconfigs@ + +# rules to build libpng, only build the old library on request +lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +# EXTRA_LTLIBRARIES= libpng.la +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\ + pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c\ + pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\ + png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h pngusr.dfa + +if PNG_ARM_NEON +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\ + arm/filter_neon.S +endif + +nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h + +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \ + -version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 + +if HAVE_LD_VERSION_SCRIPT +# Versioned symbols and restricted exports +if HAVE_SOLARIS_LD + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,-M -Wl,libpng.vers +else + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,--version-script=libpng.vers +endif + + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers +else +# Only restricted exports when possible + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -export-symbols libpng.sym + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym +endif + +#distribute headers in /usr/include/libpng/* +pkgincludedir= $(includedir)/$(PNGLIB_BASENAME) +pkginclude_HEADERS= png.h pngconf.h +nodist_pkginclude_HEADERS= pnglibconf.h + +# pkg-config stuff, note that libpng.pc is always required in order +# to get the correct library +pkgconfigdir = @pkgconfigdir@ +pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc + +# Extra source distribution files, '${srcdir}' is used below to stop build files +# from those directories being included. This only works if the configure is +# not done in the source directory! +EXTRA_DIST= \ + ANNOUNCE CHANGES INSTALL LICENSE README TODO \ + pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ + ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ + $(TESTS) $(XFAIL_TESTS) tests/pngstest \ + CMakeLists.txt example.c libpng-manual.txt + +SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk scripts/pnglibconf.dfn + +CLEANFILES= *.tf? pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \ + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \ + check.new pnglibconf.* pngprefix.h symbols.new pngtest-log.txt \ + $(SCRIPT_CLEANFILES) + +MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ +config.sub configure depcomp install-sh ltmain.sh missing + +# PNG_COPTS give extra options for the C compiler to be used on all compilation +# steps (unless targe_CFLAGS is specified; that will take precedence over +# AM_CFLAGS) +PNG_COPTS = @PNG_COPTS@ +AM_CFLAGS = ${PNG_COPTS} + +# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe +# other operating systems (NeXT?) the C preprocessor selected by configure +# checks input tokens for validity - effectively it performs part of the ANSI-C +# parsing - and therefore fails with the .df files. configure.ac has special +# checks for this and sets DFNCPP appropriately. +DFNCPP = @DFNCPP@ + +SUFFIXES = .chk .dfn .out + +$(PNGLIB_BASENAME).pc: libpng.pc + cp libpng.pc $@ + +$(PNGLIB_BASENAME)-config: libpng-config + cp libpng-config $@ + +scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h +scripts/prefix.out: png.h pngconf.h pnglibconf.out +scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt +scripts/intprefix.out: pnglibconf.h + +libpng.sym: scripts/sym.out + rm -f $@ + cp $? $@ +libpng.vers: scripts/vers.out + rm -f $@ + cp $? $@ + +if DO_PNG_PREFIX +# Rename functions in scripts/prefix.out with a PNG_PREFIX prefix. +# Rename macros in scripts/macro.lst from PNG_PREFIXpng_ to PNG_ (the actual +# implementation of the macro). +pnglibconf.h: pnglibconf.out scripts/prefix.out scripts/macro.lst + rm -f $@ + $(AWK) 's==0 && NR>1{print prev}\ + s==0{prev=$$0}\ + s==1{print "#define", $$1, "@PNG_PREFIX@" $$1}\ + s==2{print "#define @PNG_PREFIX@png_" $$1, "PNG_" $$1}\ + END{print prev}' s=0 pnglibconf.out s=1 scripts/prefix.out\ + s=2 ${srcdir}/scripts/macro.lst >pnglibconf.tf8 + mv pnglibconf.tf8 $@ + +pngprefix.h: scripts/intprefix.out + rm -f pngprefix.tf1 + $(AWK) '{print "#define", $$1, "@PNG_PREFIX@" $$1}' $? >pngprefix.tf1 + mv pngprefix.tf1 $@ +else +pnglibconf.h: pnglibconf.out + rm -f $@ + cp $? $@ + +pngprefix.h: # is empty + :>$@ +endif + +$(srcdir)/scripts/pnglibconf.h.prebuilt: + @echo "Attempting to build $@" >&2 + @echo "This is a machine generated file, but if you want to make" >&2 + @echo "a new one simply make 'scripts/pnglibconf.out' and copy that" >&2 + @exit 1 + +# The following is necessary to ensure that the local pnglibconf.h is used, not +# an installed one (this can happen immediately after on a clean system if +# 'make test' is the first thing the user does.) +contrib/libtests/pngstest.o contrib/libtests/pngvalid.o pngtest.o: pnglibconf.h +contrib/libtests/pngunknown.o: pnglibconf.h + +# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually +# be built with PNG_USE_READ_MACROS; this prevents the read macros from +# interfering with the symbol file format. +SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\ + -DPNGLIB_VERSION='@PNGLIB_VERSION@'\ + -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'\ + -DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE + +if DO_PNG_PREFIX +SYMBOL_CFLAGS += -DPNG_PREFIX='@PNG_PREFIX@' +endif + +.dfn.out: + rm -f $@ $*.c $*.tf[12] + test -d scripts || mkdir scripts || test -d scripts + echo '#include "$<"' >$*.c + $(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\ + $(CPPFLAGS) $(SYMBOL_CFLAGS) $*.c > $*.tf1 + $(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2 + rm -f $*.c $*.tf1 + mv $*.tf2 $@ + +# The .dfn file for pnglibconf.h is machine generated +pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA) + rm -f $@ $*.tf[45] + $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\ + ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ + ${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2 + $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf5 $*.tf4 1>&2 + rm $*.tf4 + mv $*.tf5 $@ + +# Symbol checks (.def and .out files should match) +scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out + +.out.chk: + rm -f $@ $*.new + $(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\ + of="$*.new" $< >&2 + mv $*.new $@ + +# used on demand to regenerate the standard header, CPPFLAGS should +# be empty - no non-standard defines +scripts/pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h + rm -f $@ pnglibconf.tf[67] + test -z "$(CPPFLAGS)" + echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\ + $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf6\ + logunsupported=1 version=search ${srcdir}/pngconf.h -\ + ${srcdir}/scripts/pnglibconf.dfa 1>&2 + $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf7\ + pnglibconf.tf6 1>&2 + rm pnglibconf.tf6 + mv pnglibconf.tf7 $@ + +$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \ + pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngprefix.h + +test: check-am + +# Extra checks +check: scripts/symbols.chk + +# Don't distribute the generated script files +dist-hook: + cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES) + +# install the .../include headers as links to the new ones +install-data-hook: + cd '$(DESTDIR)$(includedir)'; rm -f png.h pngconf.h pnglibconf.h + cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/png.h png.h + cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/pngconf.h \ + pngconf.h + cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/pnglibconf.h \ + pnglibconf.h + cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc + cd '$(DESTDIR)$(pkgconfigdir)'; $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc + +# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used +install-exec-hook: + cd '$(DESTDIR)$(bindir)'; rm -f libpng-config + cd '$(DESTDIR)$(bindir)';\ + $(LN_S) $(PNGLIB_BASENAME)-config libpng-config + @set -x;\ + cd '$(DESTDIR)$(libdir)';\ + for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@\ + sl dylib dll.a; do\ + rm -f libpng.$$ext;\ + if test -f $(PNGLIB_BASENAME).$$ext; then\ + $(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\ + fi;\ + done + +uninstall-hook: + cd '$(DESTDIR)$(includedir)'; rm -f png.h pngconf.h pnglibconf.h + rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc' + rm -f '$(DESTDIR)$(bindir)/libpng-config' + rm -f '$(DESTDIR)$(libdir)/libpng.a' + rm -f '$(DESTDIR)$(libdir)/libpng.la' + rm -f '$(DESTDIR)$(libdir)/libpng.so' + rm -f '$(DESTDIR)$(libdir)/libpng.so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@' + rm -f '$(DESTDIR)$(libdir)/libpng.sl' + rm -f '$(DESTDIR)$(libdir)/libpng.dylib' + rm -f '$(DESTDIR)$(libdir)/libpng.dll.a' diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/Makefile.in b/3rdparty/wxwidgets3.0-3.0.1/src/png/Makefile.in new file mode 100644 index 0000000000..80ac70a842 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/Makefile.in @@ -0,0 +1,2091 @@ +# Makefile.in generated by automake 1.13.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile.am: +# Source file for Makefile.in (and hence Makefile) +# + + + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = pngtest$(EXEEXT) pngunknown$(EXEEXT) \ + pngstest$(EXEEXT) pngvalid$(EXEEXT) +@PNG_ARM_NEON_TRUE@am__append_1 = arm/arm_init.c\ +@PNG_ARM_NEON_TRUE@ arm/filter_neon.S + + +# Versioned symbols and restricted exports +@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_TRUE@am__append_2 = -Wl,-M -Wl,libpng.vers +@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_FALSE@am__append_3 = -Wl,--version-script=libpng.vers +# Only restricted exports when possible +@HAVE_LD_VERSION_SCRIPT_FALSE@am__append_4 = -export-symbols libpng.sym +@DO_PNG_PREFIX_TRUE@am__append_5 = -DPNG_PREFIX='@PNG_PREFIX@' +subdir = . +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/libpng.pc.in \ + $(srcdir)/libpng-config.in depcomp $(dist_man_MANS) \ + $(pkginclude_HEADERS) test-driver INSTALL README TODO \ + config.guess config.sub install-sh missing ltmain.sh +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/scripts/libtool.m4 \ + $(top_srcdir)/scripts/ltoptions.m4 \ + $(top_srcdir)/scripts/ltsugar.m4 \ + $(top_srcdir)/scripts/ltversion.m4 \ + $(top_srcdir)/scripts/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = libpng.pc libpng-config +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" \ + "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" \ + "$(DESTDIR)$(pkgincludedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = +am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST = png.c \ + pngerror.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c \ + pngrtran.c pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c \ + pngwtran.c pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h \ + pngpriv.h pngstruct.h pngusr.dfa arm/arm_init.c \ + arm/filter_neon.S +@PNG_ARM_NEON_TRUE@am__objects_1 = arm_init.lo filter_neon.lo +am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = png.lo pngerror.lo \ + pngget.lo pngmem.lo pngpread.lo pngread.lo pngrio.lo \ + pngrtran.lo pngrutil.lo pngset.lo pngtrans.lo pngwio.lo \ + pngwrite.lo pngwtran.lo pngwutil.lo $(am__objects_1) +nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \ + $(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) \ + $(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +am_pngstest_OBJECTS = pngstest.$(OBJEXT) +pngstest_OBJECTS = $(am_pngstest_OBJECTS) +pngstest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +am_pngtest_OBJECTS = pngtest.$(OBJEXT) +pngtest_OBJECTS = $(am_pngtest_OBJECTS) +pngtest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +am_pngunknown_OBJECTS = pngunknown.$(OBJEXT) +pngunknown_OBJECTS = $(am_pngunknown_OBJECTS) +pngunknown_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +am_pngvalid_OBJECTS = pngvalid.$(OBJEXT) +pngvalid_OBJECTS = $(am_pngvalid_OBJECTS) +pngvalid_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +SCRIPTS = $(bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) +LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CCASFLAGS) $(CCASFLAGS) +AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) +am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) +am__v_CPPAS_0 = @echo " CPPAS " $@; +am__v_CPPAS_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \ + $(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \ + $(pngstest_SOURCES) $(pngtest_SOURCES) $(pngunknown_SOURCES) \ + $(pngvalid_SOURCES) +DIST_SOURCES = \ + $(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST) \ + $(pngstest_SOURCES) $(pngtest_SOURCES) $(pngunknown_SOURCES) \ + $(pngvalid_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +man3dir = $(mandir)/man3 +man5dir = $(mandir)/man5 +NROFF = nroff +MANS = $(dist_man_MANS) +DATA = $(pkgconfig_DATA) +HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope check recheck +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz +GZIP_ENV = --best +DIST_TARGETS = dist-xz dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print + +#distribute headers in /usr/include/libpng/* +pkgincludedir = $(includedir)/$(PNGLIB_BASENAME) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ + +# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe +# other operating systems (NeXT?) the C preprocessor selected by configure +# checks input tokens for validity - effectively it performs part of the ANSI-C +# parsing - and therefore fails with the .df files. configure.ac has special +# checks for this and sets DFNCPP appropriately. +DFNCPP = @DFNCPP@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PNGLIB_MAJOR = @PNGLIB_MAJOR@ +PNGLIB_MINOR = @PNGLIB_MINOR@ +PNGLIB_RELEASE = @PNGLIB_RELEASE@ +PNGLIB_VERSION = @PNGLIB_VERSION@ + +# PNG_COPTS give extra options for the C compiler to be used on all compilation +# steps (unless targe_CFLAGS is specified; that will take precedence over +# AM_CFLAGS) +PNG_COPTS = @PNG_COPTS@ +PNG_PREFIX = @PNG_PREFIX@ +POW_LIB = @POW_LIB@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYMBOL_PREFIX = @SYMBOL_PREFIX@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ + +# generate the -config scripts if required +binconfigs = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ + +# pkg-config stuff, note that libpng.pc is always required in order +# to get the correct library +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +PNGLIB_BASENAME = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ +ACLOCAL_AMFLAGS = -I scripts +pngtest_SOURCES = pngtest.c +pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +pngvalid_SOURCES = contrib/libtests/pngvalid.c +pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +pngstest_SOURCES = contrib/libtests/pngstest.c +pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +pngunknown_SOURCES = contrib/libtests/pngunknown.c +pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la + +# Generally these are single line shell scripts to run a test with a particular +# set of parameters: +TESTS = \ + tests/pngtest\ + tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\ + tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\ + tests/pngvalid-gamma-expand16-background\ + tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\ + tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\ + tests/pngvalid-progressive-interlace-size\ + tests/pngvalid-progressive-interlace-standard\ + tests/pngvalid-progressive-interlace-transform\ + tests/pngvalid-progressive-standard tests/pngvalid-standard\ + tests/pngstest-0g01 tests/pngstest-0g02 tests/pngstest-0g04\ + tests/pngstest-0g08 tests/pngstest-0g16 tests/pngstest-2c08\ + tests/pngstest-2c16 tests/pngstest-3p01 tests/pngstest-3p02\ + tests/pngstest-3p04 tests/pngstest-3p08 tests/pngstest-4a08\ + tests/pngstest-4a16 tests/pngstest-6a08 tests/pngstest-6a16\ + tests/pngstest-error tests/pngunknown-IDAT\ + tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\ + tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg + + +# These tests are expected, and required, to fail: +XFAIL_TESTS = tests/pngstest-error + +# man pages +dist_man_MANS = libpng.3 libpngpf.3 png.5 +EXTRA_SCRIPTS = libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config +bin_SCRIPTS = @binconfigs@ + +# rules to build libpng, only build the old library on request +lib_LTLIBRARIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +# EXTRA_LTLIBRARIES= libpng.la +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c \ + pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c \ + pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c \ + pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h \ + pngstruct.h pngusr.dfa $(am__append_1) +nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined \ + -export-dynamic -version-number \ + @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 \ + $(am__append_2) $(am__append_3) $(am__append_4) +@HAVE_LD_VERSION_SCRIPT_FALSE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym +@HAVE_LD_VERSION_SCRIPT_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers +pkginclude_HEADERS = png.h pngconf.h +nodist_pkginclude_HEADERS = pnglibconf.h +pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc + +# Extra source distribution files, '${srcdir}' is used below to stop build files +# from those directories being included. This only works if the configure is +# not done in the source directory! +EXTRA_DIST = \ + ANNOUNCE CHANGES INSTALL LICENSE README TODO \ + pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ + ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \ + $(TESTS) $(XFAIL_TESTS) tests/pngstest \ + CMakeLists.txt example.c libpng-manual.txt + +SCRIPT_CLEANFILES = scripts/*.out scripts/*.chk scripts/pnglibconf.dfn +CLEANFILES = *.tf? pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \ + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \ + check.new pnglibconf.* pngprefix.h symbols.new pngtest-log.txt \ + $(SCRIPT_CLEANFILES) + +MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ +config.sub configure depcomp install-sh ltmain.sh missing + +AM_CFLAGS = ${PNG_COPTS} +SUFFIXES = .chk .dfn .out + +# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually +# be built with PNG_USE_READ_MACROS; this prevents the read macros from +# interfering with the symbol file format. +SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0' \ + -DPNGLIB_VERSION='@PNGLIB_VERSION@' \ + -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)' -DPNG_NO_USE_READ_MACROS \ + -DPNG_BUILDING_SYMBOL_TABLE $(am__append_5) +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .chk .dfn .out .S .c .lo .log .o .obj .test .test$(EXEEXT) .trs +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +libpng.pc: $(top_builddir)/config.status $(srcdir)/libpng.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libpng-config: $(top_builddir)/config.status $(srcdir)/libpng-config.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES) $(EXTRA_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES) + $(AM_V_CCLD)$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK) -rpath $(libdir) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +pngstest$(EXEEXT): $(pngstest_OBJECTS) $(pngstest_DEPENDENCIES) $(EXTRA_pngstest_DEPENDENCIES) + @rm -f pngstest$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pngstest_OBJECTS) $(pngstest_LDADD) $(LIBS) + +pngtest$(EXEEXT): $(pngtest_OBJECTS) $(pngtest_DEPENDENCIES) $(EXTRA_pngtest_DEPENDENCIES) + @rm -f pngtest$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pngtest_OBJECTS) $(pngtest_LDADD) $(LIBS) + +pngunknown$(EXEEXT): $(pngunknown_OBJECTS) $(pngunknown_DEPENDENCIES) $(EXTRA_pngunknown_DEPENDENCIES) + @rm -f pngunknown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pngunknown_OBJECTS) $(pngunknown_LDADD) $(LIBS) + +pngvalid$(EXEEXT): $(pngvalid_OBJECTS) $(pngvalid_DEPENDENCIES) $(EXTRA_pngvalid_DEPENDENCIES) + @rm -f pngvalid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pngvalid_OBJECTS) $(pngvalid_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arm_init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter_neon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/png.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngget.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngmem.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngpread.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngread.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngrio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngrtran.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngrutil.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngset.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngstest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtrans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngunknown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngvalid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwrite.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwtran.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwutil.Plo@am__quote@ + +.S.o: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< + +.S.obj: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.S.lo: +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< + +filter_neon.lo: arm/filter_neon.S +@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT filter_neon.lo -MD -MP -MF $(DEPDIR)/filter_neon.Tpo -c -o filter_neon.lo `test -f 'arm/filter_neon.S' || echo '$(srcdir)/'`arm/filter_neon.S +@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/filter_neon.Tpo $(DEPDIR)/filter_neon.Plo +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='arm/filter_neon.S' object='filter_neon.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o filter_neon.lo `test -f 'arm/filter_neon.S' || echo '$(srcdir)/'`arm/filter_neon.S + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +arm_init.lo: arm/arm_init.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT arm_init.lo -MD -MP -MF $(DEPDIR)/arm_init.Tpo -c -o arm_init.lo `test -f 'arm/arm_init.c' || echo '$(srcdir)/'`arm/arm_init.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/arm_init.Tpo $(DEPDIR)/arm_init.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arm/arm_init.c' object='arm_init.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o arm_init.lo `test -f 'arm/arm_init.c' || echo '$(srcdir)/'`arm/arm_init.c + +pngstest.o: contrib/libtests/pngstest.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngstest.o -MD -MP -MF $(DEPDIR)/pngstest.Tpo -c -o pngstest.o `test -f 'contrib/libtests/pngstest.c' || echo '$(srcdir)/'`contrib/libtests/pngstest.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pngstest.Tpo $(DEPDIR)/pngstest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='contrib/libtests/pngstest.c' object='pngstest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngstest.o `test -f 'contrib/libtests/pngstest.c' || echo '$(srcdir)/'`contrib/libtests/pngstest.c + +pngstest.obj: contrib/libtests/pngstest.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngstest.obj -MD -MP -MF $(DEPDIR)/pngstest.Tpo -c -o pngstest.obj `if test -f 'contrib/libtests/pngstest.c'; then $(CYGPATH_W) 'contrib/libtests/pngstest.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngstest.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pngstest.Tpo $(DEPDIR)/pngstest.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='contrib/libtests/pngstest.c' object='pngstest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngstest.obj `if test -f 'contrib/libtests/pngstest.c'; then $(CYGPATH_W) 'contrib/libtests/pngstest.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngstest.c'; fi` + +pngunknown.o: contrib/libtests/pngunknown.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngunknown.o -MD -MP -MF $(DEPDIR)/pngunknown.Tpo -c -o pngunknown.o `test -f 'contrib/libtests/pngunknown.c' || echo '$(srcdir)/'`contrib/libtests/pngunknown.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pngunknown.Tpo $(DEPDIR)/pngunknown.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='contrib/libtests/pngunknown.c' object='pngunknown.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngunknown.o `test -f 'contrib/libtests/pngunknown.c' || echo '$(srcdir)/'`contrib/libtests/pngunknown.c + +pngunknown.obj: contrib/libtests/pngunknown.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngunknown.obj -MD -MP -MF $(DEPDIR)/pngunknown.Tpo -c -o pngunknown.obj `if test -f 'contrib/libtests/pngunknown.c'; then $(CYGPATH_W) 'contrib/libtests/pngunknown.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngunknown.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pngunknown.Tpo $(DEPDIR)/pngunknown.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='contrib/libtests/pngunknown.c' object='pngunknown.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngunknown.obj `if test -f 'contrib/libtests/pngunknown.c'; then $(CYGPATH_W) 'contrib/libtests/pngunknown.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngunknown.c'; fi` + +pngvalid.o: contrib/libtests/pngvalid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngvalid.o -MD -MP -MF $(DEPDIR)/pngvalid.Tpo -c -o pngvalid.o `test -f 'contrib/libtests/pngvalid.c' || echo '$(srcdir)/'`contrib/libtests/pngvalid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pngvalid.Tpo $(DEPDIR)/pngvalid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='contrib/libtests/pngvalid.c' object='pngvalid.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngvalid.o `test -f 'contrib/libtests/pngvalid.c' || echo '$(srcdir)/'`contrib/libtests/pngvalid.c + +pngvalid.obj: contrib/libtests/pngvalid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngvalid.obj -MD -MP -MF $(DEPDIR)/pngvalid.Tpo -c -o pngvalid.obj `if test -f 'contrib/libtests/pngvalid.c'; then $(CYGPATH_W) 'contrib/libtests/pngvalid.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngvalid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pngvalid.Tpo $(DEPDIR)/pngvalid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='contrib/libtests/pngvalid.c' object='pngvalid.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngvalid.obj `if test -f 'contrib/libtests/pngvalid.c'; then $(CYGPATH_W) 'contrib/libtests/pngvalid.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngvalid.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-man3: $(dist_man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(dist_man_MANS)'; \ + test -n "$(man3dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.3[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ + done; } + +uninstall-man3: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man3dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.3[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) +install-man5: $(dist_man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(dist_man_MANS)'; \ + test -n "$(man5dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.5[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ + done; } + +uninstall-man5: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man5dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.5[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) +install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-nodist_pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +tests/pngtest.log: tests/pngtest + @p='tests/pngtest'; \ + b='tests/pngtest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-gamma-16-to-8.log: tests/pngvalid-gamma-16-to-8 + @p='tests/pngvalid-gamma-16-to-8'; \ + b='tests/pngvalid-gamma-16-to-8'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-gamma-alpha-mode.log: tests/pngvalid-gamma-alpha-mode + @p='tests/pngvalid-gamma-alpha-mode'; \ + b='tests/pngvalid-gamma-alpha-mode'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-gamma-background.log: tests/pngvalid-gamma-background + @p='tests/pngvalid-gamma-background'; \ + b='tests/pngvalid-gamma-background'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-gamma-expand16-alpha-mode.log: tests/pngvalid-gamma-expand16-alpha-mode + @p='tests/pngvalid-gamma-expand16-alpha-mode'; \ + b='tests/pngvalid-gamma-expand16-alpha-mode'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-gamma-expand16-background.log: tests/pngvalid-gamma-expand16-background + @p='tests/pngvalid-gamma-expand16-background'; \ + b='tests/pngvalid-gamma-expand16-background'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-gamma-expand16-transform.log: tests/pngvalid-gamma-expand16-transform + @p='tests/pngvalid-gamma-expand16-transform'; \ + b='tests/pngvalid-gamma-expand16-transform'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-gamma-sbit.log: tests/pngvalid-gamma-sbit + @p='tests/pngvalid-gamma-sbit'; \ + b='tests/pngvalid-gamma-sbit'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-gamma-threshold.log: tests/pngvalid-gamma-threshold + @p='tests/pngvalid-gamma-threshold'; \ + b='tests/pngvalid-gamma-threshold'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-gamma-transform.log: tests/pngvalid-gamma-transform + @p='tests/pngvalid-gamma-transform'; \ + b='tests/pngvalid-gamma-transform'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-progressive-interlace-size.log: tests/pngvalid-progressive-interlace-size + @p='tests/pngvalid-progressive-interlace-size'; \ + b='tests/pngvalid-progressive-interlace-size'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-progressive-interlace-standard.log: tests/pngvalid-progressive-interlace-standard + @p='tests/pngvalid-progressive-interlace-standard'; \ + b='tests/pngvalid-progressive-interlace-standard'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-progressive-interlace-transform.log: tests/pngvalid-progressive-interlace-transform + @p='tests/pngvalid-progressive-interlace-transform'; \ + b='tests/pngvalid-progressive-interlace-transform'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-progressive-standard.log: tests/pngvalid-progressive-standard + @p='tests/pngvalid-progressive-standard'; \ + b='tests/pngvalid-progressive-standard'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngvalid-standard.log: tests/pngvalid-standard + @p='tests/pngvalid-standard'; \ + b='tests/pngvalid-standard'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-0g01.log: tests/pngstest-0g01 + @p='tests/pngstest-0g01'; \ + b='tests/pngstest-0g01'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-0g02.log: tests/pngstest-0g02 + @p='tests/pngstest-0g02'; \ + b='tests/pngstest-0g02'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-0g04.log: tests/pngstest-0g04 + @p='tests/pngstest-0g04'; \ + b='tests/pngstest-0g04'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-0g08.log: tests/pngstest-0g08 + @p='tests/pngstest-0g08'; \ + b='tests/pngstest-0g08'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-0g16.log: tests/pngstest-0g16 + @p='tests/pngstest-0g16'; \ + b='tests/pngstest-0g16'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-2c08.log: tests/pngstest-2c08 + @p='tests/pngstest-2c08'; \ + b='tests/pngstest-2c08'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-2c16.log: tests/pngstest-2c16 + @p='tests/pngstest-2c16'; \ + b='tests/pngstest-2c16'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-3p01.log: tests/pngstest-3p01 + @p='tests/pngstest-3p01'; \ + b='tests/pngstest-3p01'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-3p02.log: tests/pngstest-3p02 + @p='tests/pngstest-3p02'; \ + b='tests/pngstest-3p02'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-3p04.log: tests/pngstest-3p04 + @p='tests/pngstest-3p04'; \ + b='tests/pngstest-3p04'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-3p08.log: tests/pngstest-3p08 + @p='tests/pngstest-3p08'; \ + b='tests/pngstest-3p08'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-4a08.log: tests/pngstest-4a08 + @p='tests/pngstest-4a08'; \ + b='tests/pngstest-4a08'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-4a16.log: tests/pngstest-4a16 + @p='tests/pngstest-4a16'; \ + b='tests/pngstest-4a16'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-6a08.log: tests/pngstest-6a08 + @p='tests/pngstest-6a08'; \ + b='tests/pngstest-6a08'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-6a16.log: tests/pngstest-6a16 + @p='tests/pngstest-6a16'; \ + b='tests/pngstest-6a16'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngstest-error.log: tests/pngstest-error + @p='tests/pngstest-error'; \ + b='tests/pngstest-error'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngunknown-IDAT.log: tests/pngunknown-IDAT + @p='tests/pngunknown-IDAT'; \ + b='tests/pngunknown-IDAT'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngunknown-discard.log: tests/pngunknown-discard + @p='tests/pngunknown-discard'; \ + b='tests/pngunknown-discard'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngunknown-if-safe.log: tests/pngunknown-if-safe + @p='tests/pngunknown-if-safe'; \ + b='tests/pngunknown-if-safe'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngunknown-sAPI.log: tests/pngunknown-sAPI + @p='tests/pngunknown-sAPI'; \ + b='tests/pngunknown-sAPI'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngunknown-sTER.log: tests/pngunknown-sTER + @p='tests/pngunknown-sTER'; \ + b='tests/pngunknown-sTER'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngunknown-save.log: tests/pngunknown-save + @p='tests/pngunknown-save'; \ + b='tests/pngunknown-save'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/pngunknown-vpAg.log: tests/pngunknown-vpAg + @p='tests/pngunknown-vpAg'; \ + b='tests/pngunknown-vpAg'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) $(HEADERS) \ + config.h +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man install-nodist_pkgincludeHEADERS \ + install-pkgconfigDATA install-pkgincludeHEADERS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binSCRIPTS install-libLTLIBRARIES + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man3 install-man5 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binSCRIPTS uninstall-libLTLIBRARIES \ + uninstall-man uninstall-nodist_pkgincludeHEADERS \ + uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook +uninstall-man: uninstall-man3 uninstall-man5 + +.MAKE: all check-am install-am install-data-am install-exec-am \ + install-strip uninstall-am + +.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-cscope clean-generic \ + clean-libLTLIBRARIES clean-libtool cscope cscopelist-am ctags \ + ctags-am dist dist-all dist-bzip2 dist-gzip dist-hook \ + dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \ + distclean distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binSCRIPTS install-data \ + install-data-am install-data-hook install-dvi install-dvi-am \ + install-exec install-exec-am install-exec-hook install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-man3 install-man5 \ + install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \ + install-pkgconfigDATA install-pkgincludeHEADERS install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am uninstall-binSCRIPTS uninstall-hook \ + uninstall-libLTLIBRARIES uninstall-man uninstall-man3 \ + uninstall-man5 uninstall-nodist_pkgincludeHEADERS \ + uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS + + +$(PNGLIB_BASENAME).pc: libpng.pc + cp libpng.pc $@ + +$(PNGLIB_BASENAME)-config: libpng-config + cp libpng-config $@ + +scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h +scripts/prefix.out: png.h pngconf.h pnglibconf.out +scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt +scripts/intprefix.out: pnglibconf.h + +libpng.sym: scripts/sym.out + rm -f $@ + cp $? $@ +libpng.vers: scripts/vers.out + rm -f $@ + cp $? $@ + +# Rename functions in scripts/prefix.out with a PNG_PREFIX prefix. +# Rename macros in scripts/macro.lst from PNG_PREFIXpng_ to PNG_ (the actual +# implementation of the macro). +@DO_PNG_PREFIX_TRUE@pnglibconf.h: pnglibconf.out scripts/prefix.out scripts/macro.lst +@DO_PNG_PREFIX_TRUE@ rm -f $@ +@DO_PNG_PREFIX_TRUE@ $(AWK) 's==0 && NR>1{print prev}\ +@DO_PNG_PREFIX_TRUE@ s==0{prev=$$0}\ +@DO_PNG_PREFIX_TRUE@ s==1{print "#define", $$1, "@PNG_PREFIX@" $$1}\ +@DO_PNG_PREFIX_TRUE@ s==2{print "#define @PNG_PREFIX@png_" $$1, "PNG_" $$1}\ +@DO_PNG_PREFIX_TRUE@ END{print prev}' s=0 pnglibconf.out s=1 scripts/prefix.out\ +@DO_PNG_PREFIX_TRUE@ s=2 ${srcdir}/scripts/macro.lst >pnglibconf.tf8 +@DO_PNG_PREFIX_TRUE@ mv pnglibconf.tf8 $@ + +@DO_PNG_PREFIX_TRUE@pngprefix.h: scripts/intprefix.out +@DO_PNG_PREFIX_TRUE@ rm -f pngprefix.tf1 +@DO_PNG_PREFIX_TRUE@ $(AWK) '{print "#define", $$1, "@PNG_PREFIX@" $$1}' $? >pngprefix.tf1 +@DO_PNG_PREFIX_TRUE@ mv pngprefix.tf1 $@ +@DO_PNG_PREFIX_FALSE@pnglibconf.h: pnglibconf.out +@DO_PNG_PREFIX_FALSE@ rm -f $@ +@DO_PNG_PREFIX_FALSE@ cp $? $@ + +@DO_PNG_PREFIX_FALSE@pngprefix.h: # is empty +@DO_PNG_PREFIX_FALSE@ :>$@ + +$(srcdir)/scripts/pnglibconf.h.prebuilt: + @echo "Attempting to build $@" >&2 + @echo "This is a machine generated file, but if you want to make" >&2 + @echo "a new one simply make 'scripts/pnglibconf.out' and copy that" >&2 + @exit 1 + +# The following is necessary to ensure that the local pnglibconf.h is used, not +# an installed one (this can happen immediately after on a clean system if +# 'make test' is the first thing the user does.) +contrib/libtests/pngstest.o contrib/libtests/pngvalid.o pngtest.o: pnglibconf.h +contrib/libtests/pngunknown.o: pnglibconf.h + +.dfn.out: + rm -f $@ $*.c $*.tf[12] + test -d scripts || mkdir scripts || test -d scripts + echo '#include "$<"' >$*.c + $(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\ + $(CPPFLAGS) $(SYMBOL_CFLAGS) $*.c > $*.tf1 + $(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2 + rm -f $*.c $*.tf1 + mv $*.tf2 $@ + +# The .dfn file for pnglibconf.h is machine generated +pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA) + rm -f $@ $*.tf[45] + $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\ + ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ + ${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2 + $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf5 $*.tf4 1>&2 + rm $*.tf4 + mv $*.tf5 $@ + +# Symbol checks (.def and .out files should match) +scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out + +.out.chk: + rm -f $@ $*.new + $(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\ + of="$*.new" $< >&2 + mv $*.new $@ + +# used on demand to regenerate the standard header, CPPFLAGS should +# be empty - no non-standard defines +scripts/pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h + rm -f $@ pnglibconf.tf[67] + test -z "$(CPPFLAGS)" + echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\ + $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf6\ + logunsupported=1 version=search ${srcdir}/pngconf.h -\ + ${srcdir}/scripts/pnglibconf.dfa 1>&2 + $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf7\ + pnglibconf.tf6 1>&2 + rm pnglibconf.tf6 + mv pnglibconf.tf7 $@ + +$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \ + pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngprefix.h + +test: check-am + +# Extra checks +check: scripts/symbols.chk + +# Don't distribute the generated script files +dist-hook: + cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES) + +# install the .../include headers as links to the new ones +install-data-hook: + cd '$(DESTDIR)$(includedir)'; rm -f png.h pngconf.h pnglibconf.h + cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/png.h png.h + cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/pngconf.h \ + pngconf.h + cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/pnglibconf.h \ + pnglibconf.h + cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc + cd '$(DESTDIR)$(pkgconfigdir)'; $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc + +# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used +install-exec-hook: + cd '$(DESTDIR)$(bindir)'; rm -f libpng-config + cd '$(DESTDIR)$(bindir)';\ + $(LN_S) $(PNGLIB_BASENAME)-config libpng-config + @set -x;\ + cd '$(DESTDIR)$(libdir)';\ + for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@\ + sl dylib dll.a; do\ + rm -f libpng.$$ext;\ + if test -f $(PNGLIB_BASENAME).$$ext; then\ + $(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\ + fi;\ + done + +uninstall-hook: + cd '$(DESTDIR)$(includedir)'; rm -f png.h pngconf.h pnglibconf.h + rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc' + rm -f '$(DESTDIR)$(bindir)/libpng-config' + rm -f '$(DESTDIR)$(libdir)/libpng.a' + rm -f '$(DESTDIR)$(libdir)/libpng.la' + rm -f '$(DESTDIR)$(libdir)/libpng.so' + rm -f '$(DESTDIR)$(libdir)/libpng.so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@' + rm -f '$(DESTDIR)$(libdir)/libpng.sl' + rm -f '$(DESTDIR)$(libdir)/libpng.dylib' + rm -f '$(DESTDIR)$(libdir)/libpng.dll.a' + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/README b/3rdparty/wxwidgets3.0-3.0.1/src/png/README new file mode 100644 index 0000000000..26301a5aa8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/README @@ -0,0 +1,202 @@ +README for libpng version 1.6.2 - April 25, 2013 (shared library 16.0) +See the note about version numbers near the top of png.h + +See INSTALL for instructions on how to install libpng. + +Libpng comes in several distribution formats. Get libpng-*.tar.gz, +libpng-*.tar.xz or libpng-*.tar.bz2 if you want UNIX-style line endings +in the text files, or lpng*.zip if you want DOS-style line endings. + +Version 0.89 was the first official release of libpng. Don't let the +fact that it's the first release fool you. The libpng library has been in +extensive use and testing since mid-1995. By late 1997 it had +finally gotten to the stage where there hadn't been significant +changes to the API in some time, and people have a bad feeling about +libraries with versions < 1.0. Version 1.0.0 was released in +March 1998. + +**** +Note that some of the changes to the png_info structure render this +version of the library binary incompatible with libpng-0.89 or +earlier versions if you are using a shared library. The type of the +"filler" parameter for png_set_filler() has changed from png_byte to +png_uint_32, which will affect shared-library applications that use +this function. + +To avoid problems with changes to the internals of png_info_struct, +new APIs have been made available in 0.95 to avoid direct application +access to info_ptr. These functions are the png_set_ and +png_get_ functions. These functions should be used when +accessing/storing the info_struct data, rather than manipulating it +directly, to avoid such problems in the future. + +It is important to note that the APIs do not make current programs +that access the info struct directly incompatible with the new +library. However, it is strongly suggested that new programs use +the new APIs (as shown in example.c and pngtest.c), and older programs +be converted to the new format, to facilitate upgrades in the future. +**** + +Additions since 0.90 include the ability to compile libpng as a +Windows DLL, and new APIs for accessing data in the info struct. +Experimental functions include the ability to set weighting and cost +factors for row filter selection, direct reads of integers from buffers +on big-endian processors that support misaligned data access, faster +methods of doing alpha composition, and more accurate 16->8 bit color +conversion. + +The additions since 0.89 include the ability to read from a PNG stream +which has had some (or all) of the signature bytes read by the calling +application. This also allows the reading of embedded PNG streams that +do not have the PNG file signature. As well, it is now possible to set +the library action on the detection of chunk CRC errors. It is possible +to set different actions based on whether the CRC error occurred in a +critical or an ancillary chunk. + +The changes made to the library, and bugs fixed are based on discussions +on the PNG-implement mailing list and not on material submitted +privately to Guy, Andreas, or Glenn. They will forward any good +suggestions to the list. + +For a detailed description on using libpng, read libpng-manual.txt. For +examples of libpng in a program, see example.c and pngtest.c. For usage +information and restrictions (what little they are) on libpng, see +png.h. For a description on using zlib (the compression library used by +libpng) and zlib's restrictions, see zlib.h + +I have included a general makefile, as well as several machine and +compiler specific ones, but you may have to modify one for your own needs. + +You should use zlib 1.0.4 or later to run this, but it MAY work with +versions as old as zlib 0.95. Even so, there are bugs in older zlib +versions which can cause the output of invalid compression streams for +some images. You will definitely need zlib 1.0.4 or later if you are +taking advantage of the MS-DOS "far" structure allocation for the small +and medium memory models. You should also note that zlib is a +compression library that is useful for more things than just PNG files. +You can use zlib as a drop-in replacement for fread() and fwrite() if +you are so inclined. + +zlib should be available at the same place that libpng is, or at. +ftp://ftp.info-zip.org/pub/infozip/zlib + +You may also want a copy of the PNG specification. It is available +as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find +these at http://www.libpng.org/pub/png/documents/ + +This code is currently being archived at libpng.sf.net in the +[DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT) +at GO GRAPHSUP. If you can't find it in any of those places, +e-mail me, and I'll help you find it. + +If you have any code changes, requests, problems, etc., please e-mail +them to me. Also, I'd appreciate any make files or project files, +and any modifications you needed to make to get libpng to compile, +along with a #define variable to tell what compiler/system you are on. +If you needed to add transformations to libpng, or wish libpng would +provide the image in a different way, drop me a note (and code, if +possible), so I can consider supporting the transformation. +Finally, if you get any warning messages when compiling libpng +(note: not zlib), and they are easy to fix, I'd appreciate the +fix. Please mention "libpng" somewhere in the subject line. Thanks. + +This release was created and will be supported by myself (of course +based in a large way on Guy's and Andreas' earlier work), and the PNG +development group. + +Send comments/corrections/commendations to png-mng-implement at +lists.sourceforge.net (subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe) or to glennrp at users.sourceforge.net + +You can't reach Guy, the original libpng author, at the addresses +given in previous versions of this document. He and Andreas will +read mail addressed to the png-implement list, however. + +Please do not send general questions about PNG. Send them to +png-mng-misc at lists.sf.net (subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-misc to +subscribe). If you have a question about something +in the PNG specification that is related to using libpng, send it +to me. Send me any questions that start with "I was using libpng, +and ...". If in doubt, send questions to me. I'll bounce them +to others, if necessary. + +Please do not send suggestions on how to change PNG. We have +been discussing PNG for sixteen years now, and it is official and +finished. If you have suggestions for libpng, however, I'll +gladly listen. Even if your suggestion is not used immediately, +it may be used later. + +Files in this distribution: + + ANNOUNCE => Announcement of this version, with recent changes + CHANGES => Description of changes between libpng versions + KNOWNBUG => List of known bugs and deficiencies + LICENSE => License to use and redistribute libpng + README => This file + TODO => Things not implemented in the current library + Y2KINFO => Statement of Y2K compliance + example.c => Example code for using libpng functions + libpng.3 => manual page for libpng (includes libpng-manual.txt) + libpng-manual.txt => Description of libpng and its functions + libpngpf.3 => manual page for libpng's private functions + png.5 => manual page for the PNG format + png.c => Basic interface functions common to library + png.h => Library function and interface declarations (public) + pngpriv.h => Library function and interface declarations (private) + pngconf.h => System specific library configuration (public) + pngstruct.h => png_struct declaration (private) + pnginfo.h => png_info struct declaration (private) + pngdebug.h => debugging macros (private) + pngerror.c => Error/warning message I/O functions + pngget.c => Functions for retrieving info from struct + pngmem.c => Memory handling functions + pngbar.png => PNG logo, 88x31 + pngnow.png => PNG logo, 98x31 + pngpread.c => Progressive reading functions + pngread.c => Read data/helper high-level functions + pngrio.c => Lowest-level data read I/O functions + pngrtran.c => Read data transformation functions + pngrutil.c => Read data utility functions + pngset.c => Functions for storing data into the info_struct + pngtest.c => Library test program + pngtest.png => Library test sample image + pngtrans.c => Common data transformation functions + pngwio.c => Lowest-level write I/O functions + pngwrite.c => High-level write functions + pngwtran.c => Write data transformations + pngwutil.c => Write utility functions + contrib => Contributions + gregbook => source code for PNG reading and writing, from + Greg Roelofs' "PNG: The Definitive Guide", + O'Reilly, 1999 + msvctest => Builds and runs pngtest using a MSVC workspace + pngminus => Simple pnm2png and png2pnm programs + pngsuite => Test images + visupng => Contains a MSVC workspace for VisualPng + projects => Contains project files and workspaces for + building a DLL + cbuilder5 => Contains a Borland workspace for building + libpng and zlib + visualc6 => Contains a Microsoft Visual C++ (MSVC) + workspace for building libpng and zlib + visualc71 => Contains a Microsoft Visual C++ (MSVC) + workspace for building libpng and zlib + xcode => Contains an Apple xcode + workspace for building libpng and zlib + scripts => Directory containing scripts for building libpng: + (see scripts/README.txt for the list of scripts) + +Good luck, and happy coding. + +-Glenn Randers-Pehrson (current maintainer, since 1998) + Internet: glennrp at users.sourceforge.net + +-Andreas Eric Dilger (former maintainer, 1996-1997) + Internet: adilger at enel.ucalgary.ca + Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/ + +-Guy Eric Schalnat (original author and former maintainer, 1995-1996) + (formerly of Group 42, Inc) + Internet: gschal at infinet.com diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/TODO b/3rdparty/wxwidgets3.0-3.0.1/src/png/TODO new file mode 100644 index 0000000000..6e1f028bd7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/TODO @@ -0,0 +1,27 @@ +/* +TODO - list of things to do for libpng: + +Final bug fixes. +Better C++ wrapper/full C++ implementation? +Fix problem with C++ and EXTERN "C". +cHRM transformation. +Remove setjmp/longjmp usage in favor of returning error codes. +Add "grayscale->palette" transformation and "palette->grayscale" detection. +Improved dithering. +Multi-lingual error and warning message support. +Complete sRGB transformation (presently it simply uses gamma=0.45455). +Man pages for function calls. +Better documentation. +Better filter selection + (counting huffman bits/precompression? filter inertia? filter costs?). +Histogram creation. +Text conversion between different code pages (Latin-1 -> Mac and DOS). +Avoid building gamma tables whenever possible. +Use greater precision when changing to linear gamma for compositing against + background and doing rgb-to-gray transformation. +Investigate pre-incremented loop counters and other loop constructions. +Add interpolated method of handling interlacing. +Switch to the simpler zlib (zlib/libpng) license if legally possible. +Extend pngvalid.c to validate more of the libpng transformations. + +*/ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/aclocal.m4 b/3rdparty/wxwidgets3.0-3.0.1/src/png/aclocal.m4 new file mode 100644 index 0000000000..eaa1ce9396 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/aclocal.m4 @@ -0,0 +1,1100 @@ +# generated automatically by aclocal 1.13.3 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.13' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.13.3], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.13.3])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_AS +# ---------- +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([scripts/libtool.m4]) +m4_include([scripts/ltoptions.m4]) +m4_include([scripts/ltsugar.m4]) +m4_include([scripts/ltversion.m4]) +m4_include([scripts/lt~obsolete.m4]) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/arm/arm_init.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/arm/arm_init.c new file mode 100644 index 0000000000..795dd49388 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/arm/arm_init.c @@ -0,0 +1,219 @@ + +/* arm_init.c - NEON optimised filter functions + * + * Copyright (c) 2013 Glenn Randers-Pehrson + * Written by Mans Rullgard, 2011. + * Last changed in libpng 1.5.15 [March 28, 2013] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ +/* Below, after checking __linux__, various non-C90 POSIX 1003.1 functions are + * called. + */ +#define _POSIX_SOURCE 1 + +#include "../pngpriv.h" + +#ifdef PNG_ARM_NEON_SUPPORTED +#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */ +#include /* for sig_atomic_t */ + +#ifdef __ANDROID__ +/* Linux provides access to information about CPU capabilites via + * /proc/self/auxv, however Android blocks this while still claiming to be + * Linux. The Andoid NDK, however, provides appropriate support. + * + * Documentation: http://www.kandroid.org/ndk/docs/CPU-ARM-NEON.html + */ +#include + +static int +png_have_neon(png_structp png_ptr) +{ + /* This is a whole lot easier than the mess below, however it is probably + * implemented as below, therefore it is better to cache the result (these + * function calls may be slow!) + */ + PNG_UNUSED(png_ptr) + return android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM && + (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; +} +#elif defined(__linux__) +/* The generic __linux__ implementation requires reading /proc/self/auxv and + * looking at each element for one that records NEON capabilities. + */ +#include /* for POSIX 1003.1 */ +#include /* for EINTR */ + +#include +#include +#include +#include +#include + +/* A read call may be interrupted, in which case it returns -1 and sets errno to + * EINTR if nothing was done, otherwise (if something was done) a partial read + * may result. + */ +static size_t +safe_read(png_structp png_ptr, int fd, void *buffer_in, size_t nbytes) +{ + size_t ntotal = 0; + char *buffer = png_voidcast(char*, buffer_in); + + while (nbytes > 0) + { + unsigned int nread; + int iread; + + /* Passing nread > INT_MAX to read is implementation defined in POSIX + * 1003.1, therefore despite the unsigned argument portable code must + * limit the value to INT_MAX! + */ + if (nbytes > INT_MAX) + nread = INT_MAX; + + else + nread = (unsigned int)/*SAFE*/nbytes; + + iread = read(fd, buffer, nread); + + if (iread == -1) + { + /* This is the devil in the details, a read can terminate early with 0 + * bytes read because of EINTR, yet it still returns -1 otherwise end + * of file cannot be distinguished. + */ + if (errno != EINTR) + { + png_warning(png_ptr, "/proc read failed"); + return 0; /* I.e. a permanent failure */ + } + } + + else if (iread < 0) + { + /* Not a valid 'read' result: */ + png_warning(png_ptr, "OS /proc read bug"); + return 0; + } + + else if (iread > 0) + { + /* Continue reading until a permanent failure, or EOF */ + buffer += iread; + nbytes -= (unsigned int)/*SAFE*/iread; + ntotal += (unsigned int)/*SAFE*/iread; + } + + else + return ntotal; + } + + return ntotal; /* nbytes == 0 */ +} + +static int +png_have_neon(png_structp png_ptr) +{ + int fd = open("/proc/self/auxv", O_RDONLY); + Elf32_auxv_t aux; + + /* Failsafe: failure to open means no NEON */ + if (fd == -1) + { + png_warning(png_ptr, "/proc/self/auxv open failed"); + return 0; + } + + while (safe_read(png_ptr, fd, &aux, sizeof aux) == sizeof aux) + { + if (aux.a_type == AT_HWCAP && (aux.a_un.a_val & HWCAP_NEON) != 0) + { + close(fd); + return 1; + } + } + + close(fd); + return 0; +} +#else + /* We don't know how to do a run-time check on this system */ +# error "no support for run-time ARM NEON checks" +#endif /* OS checks */ +#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */ + +#ifndef PNG_ALIGNED_MEMORY_SUPPORTED +# error "ALIGNED_MEMORY is required; set: -DPNG_ALIGNED_MEMORY_SUPPORTED" +#endif + +void +png_init_filter_functions_neon(png_structp pp, unsigned int bpp) +{ +#ifdef PNG_ARM_NEON_API_SUPPORTED + switch ((pp->options >> PNG_ARM_NEON) & 3) + { + case PNG_OPTION_UNSET: + /* Allow the run-time check to execute if it has been enabled - + * thus both API and CHECK can be turned on. If it isn't supported + * this case will fall through to the 'default' below, which just + * returns. + */ +#endif /* PNG_ARM_NEON_API_SUPPORTED */ +#ifdef PNG_ARM_NEON_CHECK_SUPPORTED + { + static volatile sig_atomic_t no_neon = -1; /* not checked */ + + if (no_neon < 0) + no_neon = !png_have_neon(pp); + + if (no_neon) + return; + } +#ifdef PNG_ARM_NEON_API_SUPPORTED + break; +#endif +#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */ +#ifdef PNG_ARM_NEON_API_SUPPORTED + case PNG_OPTION_ON: + /* Option turned on */ + break; + + default: /* OFF or INVALID */ + return; + } +#endif + + /* IMPORTANT: any new external functions used here must be declared using + * PNG_INTERNAL_FUNCTION in ../pngpriv.h. This is required so that the + * 'prefix' option to configure works: + * + * ./configure --with-libpng-prefix=foobar_ + * + * Verify you have got this right by running the above command, doing a build + * and examining pngprefix.h; it must contain a #define for every external + * function you add. (Notice that this happens automatically for the + * initialization function.) + */ + pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up_neon; + + if (bpp == 3) + { + pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_neon; + pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_neon; + pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = + png_read_filter_row_paeth3_neon; + } + + else if (bpp == 4) + { + pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_neon; + pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_neon; + pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = + png_read_filter_row_paeth4_neon; + } +} +#endif /* FILTER_OPTIMIZATIONS && __arm__ && __ARM_NEON__ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/arm/filter_neon.S b/3rdparty/wxwidgets3.0-3.0.1/src/png/arm/filter_neon.S new file mode 100644 index 0000000000..72420a9e34 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/arm/filter_neon.S @@ -0,0 +1,235 @@ + +/* filter_neon.S - NEON optimised filter functions + * + * Copyright (c) 2011 Glenn Randers-Pehrson + * Written by Mans Rullgard, 2011. + * Last changed in libpng 1.5.7 [December 15, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* This is required to get the symbol renames, which are #defines, and also + * includes the value of PNG_FILTER_OPTIMIZATIONS. + */ +#define PNG_VERSION_INFO_ONLY +#include "../pngpriv.h" + +#if defined(PNG_FILTER_OPTIMIZATIONS) && defined(__arm__) && \ + defined(__ARM_NEON__) +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */ +#endif + +#ifdef __ELF__ +# define ELF +#else +# define ELF @ +#endif + + .arch armv7-a + .fpu neon + +.macro func name, export=0 + .macro endfunc +ELF .size \name, . - \name + .endfunc + .purgem endfunc + .endm + .text + .if \export + .global \name + .endif +ELF .type \name, STT_FUNC + .func \name +\name: +.endm + +func png_read_filter_row_sub4_neon, export=1 + ldr r3, [r0, #4] @ rowbytes + vmov.i8 d3, #0 +1: + vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] + vadd.u8 d0, d3, d4 + vadd.u8 d1, d0, d5 + vadd.u8 d2, d1, d6 + vadd.u8 d3, d2, d7 + vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! + subs r3, r3, #16 + bgt 1b + + bx lr +endfunc + +func png_read_filter_row_sub3_neon, export=1 + ldr r3, [r0, #4] @ rowbytes + vmov.i8 d3, #0 + mov r0, r1 + mov r2, #3 + mov r12, #12 + vld1.8 {q11}, [r0], r12 +1: + vext.8 d5, d22, d23, #3 + vadd.u8 d0, d3, d22 + vext.8 d6, d22, d23, #6 + vadd.u8 d1, d0, d5 + vext.8 d7, d23, d23, #1 + vld1.8 {q11}, [r0], r12 + vst1.32 {d0[0]}, [r1,:32], r2 + vadd.u8 d2, d1, d6 + vst1.32 {d1[0]}, [r1], r2 + vadd.u8 d3, d2, d7 + vst1.32 {d2[0]}, [r1], r2 + vst1.32 {d3[0]}, [r1], r2 + subs r3, r3, #12 + bgt 1b + + bx lr +endfunc + +func png_read_filter_row_up_neon, export=1 + ldr r3, [r0, #4] @ rowbytes +1: + vld1.8 {q0}, [r1,:128] + vld1.8 {q1}, [r2,:128]! + vadd.u8 q0, q0, q1 + vst1.8 {q0}, [r1,:128]! + subs r3, r3, #16 + bgt 1b + + bx lr +endfunc + +func png_read_filter_row_avg4_neon, export=1 + ldr r12, [r0, #4] @ rowbytes + vmov.i8 d3, #0 +1: + vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] + vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]! + vhadd.u8 d0, d3, d16 + vadd.u8 d0, d0, d4 + vhadd.u8 d1, d0, d17 + vadd.u8 d1, d1, d5 + vhadd.u8 d2, d1, d18 + vadd.u8 d2, d2, d6 + vhadd.u8 d3, d2, d19 + vadd.u8 d3, d3, d7 + vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! + subs r12, r12, #16 + bgt 1b + + bx lr +endfunc + +func png_read_filter_row_avg3_neon, export=1 + push {r4,lr} + ldr r12, [r0, #4] @ rowbytes + vmov.i8 d3, #0 + mov r0, r1 + mov r4, #3 + mov lr, #12 + vld1.8 {q11}, [r0], lr +1: + vld1.8 {q10}, [r2], lr + vext.8 d5, d22, d23, #3 + vhadd.u8 d0, d3, d20 + vext.8 d17, d20, d21, #3 + vadd.u8 d0, d0, d22 + vext.8 d6, d22, d23, #6 + vhadd.u8 d1, d0, d17 + vext.8 d18, d20, d21, #6 + vadd.u8 d1, d1, d5 + vext.8 d7, d23, d23, #1 + vld1.8 {q11}, [r0], lr + vst1.32 {d0[0]}, [r1,:32], r4 + vhadd.u8 d2, d1, d18 + vst1.32 {d1[0]}, [r1], r4 + vext.8 d19, d21, d21, #1 + vadd.u8 d2, d2, d6 + vhadd.u8 d3, d2, d19 + vst1.32 {d2[0]}, [r1], r4 + vadd.u8 d3, d3, d7 + vst1.32 {d3[0]}, [r1], r4 + subs r12, r12, #12 + bgt 1b + + pop {r4,pc} +endfunc + +.macro paeth rx, ra, rb, rc + vaddl.u8 q12, \ra, \rb @ a + b + vaddl.u8 q15, \rc, \rc @ 2*c + vabdl.u8 q13, \rb, \rc @ pa + vabdl.u8 q14, \ra, \rc @ pb + vabd.u16 q15, q12, q15 @ pc + vcle.u16 q12, q13, q14 @ pa <= pb + vcle.u16 q13, q13, q15 @ pa <= pc + vcle.u16 q14, q14, q15 @ pb <= pc + vand q12, q12, q13 @ pa <= pb && pa <= pc + vmovn.u16 d28, q14 + vmovn.u16 \rx, q12 + vbsl d28, \rb, \rc + vbsl \rx, \ra, d28 +.endm + +func png_read_filter_row_paeth4_neon, export=1 + ldr r12, [r0, #4] @ rowbytes + vmov.i8 d3, #0 + vmov.i8 d20, #0 +1: + vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] + vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]! + paeth d0, d3, d16, d20 + vadd.u8 d0, d0, d4 + paeth d1, d0, d17, d16 + vadd.u8 d1, d1, d5 + paeth d2, d1, d18, d17 + vadd.u8 d2, d2, d6 + paeth d3, d2, d19, d18 + vmov d20, d19 + vadd.u8 d3, d3, d7 + vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! + subs r12, r12, #16 + bgt 1b + + bx lr +endfunc + +func png_read_filter_row_paeth3_neon, export=1 + push {r4,lr} + ldr r12, [r0, #4] @ rowbytes + vmov.i8 d3, #0 + vmov.i8 d4, #0 + mov r0, r1 + mov r4, #3 + mov lr, #12 + vld1.8 {q11}, [r0], lr +1: + vld1.8 {q10}, [r2], lr + paeth d0, d3, d20, d4 + vext.8 d5, d22, d23, #3 + vadd.u8 d0, d0, d22 + vext.8 d17, d20, d21, #3 + paeth d1, d0, d17, d20 + vst1.32 {d0[0]}, [r1,:32], r4 + vext.8 d6, d22, d23, #6 + vadd.u8 d1, d1, d5 + vext.8 d18, d20, d21, #6 + paeth d2, d1, d18, d17 + vext.8 d7, d23, d23, #1 + vld1.8 {q11}, [r0], lr + vst1.32 {d1[0]}, [r1], r4 + vadd.u8 d2, d2, d6 + vext.8 d19, d21, d21, #1 + paeth d3, d2, d19, d18 + vst1.32 {d2[0]}, [r1], r4 + vmov d4, d19 + vadd.u8 d3, d3, d7 + vst1.32 {d3[0]}, [r1], r4 + subs r12, r12, #12 + bgt 1b + + pop {r4,pc} +endfunc +#endif /* FILTER_OPTIMIZATIONS && __arm__ && __ARM_NEON__ */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/autogen.sh b/3rdparty/wxwidgets3.0-3.0.1/src/png/autogen.sh new file mode 100755 index 0000000000..decf0f56f8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/autogen.sh @@ -0,0 +1,219 @@ +#! /bin/sh +# +# Run 'autoreconf' to build 'configure', 'Makefile.in' and other configure +# control files. +# +# The first time this is run on a GIT checkout the only files that exist are +# configure.ac and Makefile.am; all of the autotools support scripts are +# missing. They are instantiated with autoreconf --force --install. +# +# For regular ("tarball") distributions all the files should exist. We do not +# want them to be updated *under any circumstances*. It should never be +# necessary to rune autogen.sh because ./configure --enable-maintainer-mode says +# what to do if Makeile.am or configure.ac are changed. +# +# It is *probably* OK to update the files on a GIT checkout, because they have +# come from the local tools, but leave that to the user who is assumed to know +# whether it is ok or required. +# +# This script is intended to work without arguments, there are, however, hidden +# arguments for (a) use while testing the script and (b) to fix up systems that +# have been broken. If (b) is required the script prompts for the correct +# options. For this reason the options are *NOT* documented in the help; this +# is deliberate; UTSL. +# +clean= +maintainer= +while test $# -gt 0 +do + case "$1" in + --maintainer) + maintainer=1;; + + --clean) + clean=1;; + + *) + exec >&2 + echo "$0: usage: ./autogen.sh" + if test -d .git + then + echo " ./autogen.sh generates the configure script and" + echo " Makefile.in, or refreshes them after changes to Makefile.am" + echo " or configure.ac. You may prefer to just run autoreconf." + elif test -z "$maintainer" + then + echo " DO NOT RUN THIS SCRIPT." + echo " If you need to change Makefile.am or configure.ac then you" + echo " also need to run ./configure --enable-maintainer-mode and" + echo " use the appropriate autotools, *NOT* this script, to update" + echo " everything, please check the documentation of autoreconf." + echo " WARNING: libpng is intentionally generated with a known," + echo " fixed, set of autotools. It is known *NOT* to work with" + echo " the collection of autotools distributed on highly reputable" + echo " operating systems." + echo " Remember: autotools is GNU software, you are expected to" + echo " pay for support." + else + echo " You have run autogen.sh with --maintainer enabled and you" + echo " are not using a GIT distribution, then you have given an" + echo " unrecognized argument. This is not good. --maintainer" + echo " switches off any assumptions that you might not know what" + echo " you are doing." + fi + exit 1;; + esac + + shift +done +# +# First check for a set of the autotools files; if absent then this is assumed +# to be a GIT version and the local autotools must be used. If present this +# is a tarball distribution and the script should not be used. If partially +# present bad things are happening. +# +# The autotools generated files: +libpng_autotools_files="Makefile.in aclocal.m4 config.guess config.h.in\ + config.sub configure depcomp install-sh ltmain.sh missing test-driver" +# +# These are separate because 'maintainer-clean' does not remove them. +libpng_libtool_files="scripts/libtool.m4 scripts/ltoptions.m4\ + scripts/ltsugar.m4 scripts/ltversion.m4 scripts/lt~obsolete.m4" + +libpng_autotools_dirs="autom4te.cache" # not required +# +# The configure generated files: +libpng_configure_files="Makefile config.h config.log config.status\ + libpng-config libpng.pc libtool stamp-h1" + +libpng_configure_dirs=".deps" +# +# We must remove the configure generated files as well as the autotools +# generated files if autotools are regenerated because otherwise if configure +# has been run without "--enable-maintainer-mode" make can do a partial update +# of Makefile. These functions do the two bits of cleaning. +clean_autotools(){ + rm -rf $libpng_autotools_files $libpng_libtool_files $libpng_autotools_dirs +} + +clean_configure(){ + rm -rf $libpng_configure_files $libpng_configure_dirs +} +# +# Clean: remove everything (this is to help with testing) +if test -n "$clean" +then + clean_configure + if test -n "$maintainer" + then + clean_autotools + fi + + exit 0 +fi +# +# Validate the distribution. +libpng_autotools_file_found= +libpng_autotools_file_missing= +for file in $libpng_autotools_files +do + if test -f "$file" + then + libpng_autotools_file_found=1 + else + libpng_autotools_file_missing=1 + fi +done +# +# Presence of one of these does not *invalidate* missing, but absence +# invalidates found. +for file in $libpng_libtool_files +do + if test ! -f "$file" + then + libpng_autotools_file_missing=1 + fi +done +# +# The cache directory doesn't matter - it will be regenerated and does not exist +# anyway in a tarball. +# +# Either everything is missing or everything is there, the --maintainer option +# just changes this so that the mode is set to generate all the files. +mode= +if test -z "$libpng_autotools_file_found" -o -n "$maintainer" +then + mode="autoreconf" +else + if test -n "$libpng_autotools_file_missing" + then + mode="broken" + else + mode="configure" + fi +fi +# +# So: +case "$mode" in + autoreconf) + # Clean in case configure files exist + clean_configure + clean_autotools + # Everything must be initialized, so use --force + if autoreconf --warnings=all --force --install + then + missing= + for file in $libpng_autotools_files + do + test -f "$file" || missing=1 + done + # ignore the cache directory + test -z "$missing" || { + exec >&2 + echo "autoreconf was run, but did not produce all the expected" + echo "files. It is likely that your autotools installation is" + echo "not compatible with that expected by libpng." + exit 1 + } + else + exec >&2 + echo "autoreconf failed: your version of autotools is incompatible" + echo "with this libpng version. Please use a distributed archive" + echo "(which includes the autotools generated files) and run configure" + echo "instead." + exit 1 + fi;; + + configure) + if test -d .git + then + exec >&2 + echo "ERROR: running autoreconf on an initialized sytem" + echo " This is not necessary; it is only necessary to remake the" + echo " autotools generated files if Makefile.am or configure.ac" + echo " change and make does the right thing with:" + echo + echo " ./configure --enable-maintainer-mode." + echo + echo " You can run autoreconf yourself if you don't like maintainer" + echo " mode and you can also just run autoreconf -f -i to initialize" + echo " everything in the first place; this script is only for" + echo " compatiblity with prior releases." + exit 1 + else + exec >&2 + echo "autogen.sh is intended only to generate 'configure' on systems" + echo "that do not have it. You have a complete 'configure', if you" + echo "need to change Makefile.am or configure.ac you also need to" + echo "run configure with the --enable-maintainer-mode option." + exit 1 + fi;; + + broken) + exec >&2 + echo "Your system has a partial set of autotools generated files." + echo "autogen.sh is unable to proceed. The full set of files is" + echo "contained in the libpng 'tar' distribution archive and you do" + echo "not need to run autogen.sh if you use it." + exit 1;; +esac diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/config.guess b/3rdparty/wxwidgets3.0-3.0.1/src/png/config.guess new file mode 100755 index 0000000000..120cc0d239 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/config.guess @@ -0,0 +1,1552 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-05-16' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/config.h.in b/3rdparty/wxwidgets3.0-3.0.1/src/png/config.h.in new file mode 100644 index 0000000000..713869b39b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/config.h.in @@ -0,0 +1,112 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the `feenableexcept' function. */ +#undef HAVE_FEENABLEEXCEPT + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `m' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the `z' library (-lz). */ +#undef HAVE_LIBZ + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the `pow' function. */ +#undef HAVE_POW + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Turn on ARM Neon optimizations at run-time */ +#undef PNG_ARM_NEON_API_SUPPORTED + +/* Check for ARM Neon support at run-time */ +#undef PNG_ARM_NEON_CHECK_SUPPORTED + +/* Enable ARM Neon optimizations */ +#undef PNG_ARM_NEON_SUPPORTED + +/* Disable ARM Neon optimizations */ +#undef PNG_NO_ARM_NEON + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Version number of package */ +#undef VERSION + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#undef restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif + +/* Define to `unsigned int' if does not define. */ +#undef size_t diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/config.sub b/3rdparty/wxwidgets3.0-3.0.1/src/png/config.sub new file mode 100755 index 0000000000..8b612ab89d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/config.sub @@ -0,0 +1,1788 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-04-24' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 \ + | or1k | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i386-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or1k-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/configure b/3rdparty/wxwidgets3.0-3.0.1/src/png/configure new file mode 100755 index 0000000000..67cc967eae --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/configure @@ -0,0 +1,15188 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for libpng 1.6.2. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: png-mng-implement@lists.sourceforge.net about your +$0: system, including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='libpng' +PACKAGE_TARNAME='libpng' +PACKAGE_VERSION='1.6.2' +PACKAGE_STRING='libpng 1.6.2' +PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net' +PACKAGE_URL='' + +ac_unique_file="pngget.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +PNG_ARM_NEON_FALSE +PNG_ARM_NEON_TRUE +DO_PNG_PREFIX_FALSE +DO_PNG_PREFIX_TRUE +PNG_PREFIX +binconfigs +pkgconfigdir +PNGLIB_RELEASE +PNGLIB_MINOR +PNGLIB_MAJOR +PNGLIB_VERSION +SYMBOL_PREFIX +HAVE_LD_VERSION_SCRIPT_FALSE +HAVE_LD_VERSION_SCRIPT_TRUE +HAVE_SOLARIS_LD_FALSE +HAVE_SOLARIS_LD_TRUE +LIBOBJS +POW_LIB +PNG_COPTS +DFNCPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +NM +ac_ct_DUMPBIN +DUMPBIN +LIBTOOL +OBJDUMP +DLLTOOL +AS +LN_S +CPP +LD +FGREP +EGREP +GREP +SED +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +am__fastdepCCAS_FALSE +am__fastdepCCAS_TRUE +CCASDEPMODE +CCASFLAGS +CCAS +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_maintainer_mode +enable_dependency_tracking +with_gnu_ld +enable_shared +enable_static +with_pic +enable_fast_install +with_sysroot +enable_libtool_lock +enable_werror +with_zlib_prefix +with_pkgconfigdir +with_binconfigs +with_libpng_prefix +enable_arm_neon +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CCAS +CCASFLAGS +CPP +PNG_COPTS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures libpng 1.6.2 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/libpng] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of libpng 1.6.2:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-werror[=OPT] Pass -Werror or the given argument to the compiler + if it is supported + --enable-arm-neon Enable ARM NEON optimizations: =off, check, api, on: + off: disable the optimizations; check: use internal + checking code (deprecated and poorly supported); + api: disable by default, enable by a call to + png_set_option; on: turn on unconditionally. The + default is 'on' if __ARM_NEON__ is defined, + otherwise 'off'. + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). + --with-zlib-prefix prefix that may have been used in installed zlib + --with-pkgconfigdir Use the specified pkgconfig dir (default is + libdir/pkgconfig) + --with-binconfigs Generate shell libpng-config scripts as well as + pkg-config data [default=yes] + --with-libpng-prefix prefix libpng exported function (API) names with the + given value + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + CPP C preprocessor + PNG_COPTS additional flags for the C compiler, use this for options that + would cause configure itself to fail + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +libpng configure 1.6.2 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by libpng $as_me 1.6.2, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +# libpng does not follow GNU file name conventions (hence 'foreign') +# color-tests requires automake 1.11 or later +# silent-rules requires automake 1.11 or later +# dist-xz requires automake 1.11 or later +# 1.12.2 fixes a security issue in 1.11.2 and 1.12.1 +# 1.13 is required for parallel tests +am__api_version='1.13' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='libpng' + VERSION='1.6.2' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# The following line causes --disable-maintainer-mode to be the default to +# configure, this is necessary because libpng distributions cannot rely on the +# time stamps of the autotools generated files being correct + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + + +PNGLIB_VERSION=1.6.2 +PNGLIB_MAJOR=1 +PNGLIB_MINOR=6 +PNGLIB_RELEASE=2 + + + +ac_config_headers="$ac_config_headers config.h" + + +# Checks for programs. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + +depcc="$CCAS" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CCAS_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } +CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then + am__fastdepCCAS_TRUE= + am__fastdepCCAS_FALSE='#' +else + am__fastdepCCAS_TRUE='#' + am__fastdepCCAS_FALSE= +fi + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.2' +macro_revision='1.3337' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + + +# Set options +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; +esac + +test -z "$AS" && AS=as + + + + + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + enable_dlopen=no + + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + link_all_deplibs=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + + +# Some awks crash when confronted with pnglibconf.dfa, do a test run now +# to make sure this doesn't happen +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that AWK works" >&5 +$as_echo_n "checking that AWK works... " >&6; } +if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\ + ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ + ${srcdir}/pngusr.dfa 1>&2 +then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 1 "failed +See \`config.log' for more details" "$LINENO" 5; } +fi + +# This is a remnant of the old cc -E validation, where it may have been +# necessary to use a different preprocessor for .dfn files +DFNCPP="$CPP" + + +# -Werror cannot be passed to GCC in CFLAGS because configure will fail (it +# checks the compiler with a program that generates a warning), add the +# following option to deal with this + +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; test "$enable_werror" = "yes" && enable_werror="-Werror" + if test "$enable_werror" != "no"; then + sav_CFLAGS="$CFLAGS" + CFLAGS="$enable_werror $CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler allows $enable_werror" >&5 +$as_echo_n "checking if the compiler allows $enable_werror... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int main(int argc, char **argv){ + return argv[argc-1][0]; + } +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + PNG_COPTS="$PNG_COPTS $enable_werror" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$sav_CFLAGS" + fi +fi + + +# Checks for header files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + + +# Checks for typedefs, structures, and compiler characteristics. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if ${ac_cv_struct_tm+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +int +main () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_struct_tm=time.h +else + ac_cv_struct_tm=sys/time.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +$as_echo_n "checking for C/C++ restrict keyword... " >&6; } +if ${ac_cv_c_restrict+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + } +int +main () +{ +int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_restrict=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +$as_echo "$ac_cv_c_restrict" >&6; } + + case $ac_cv_c_restrict in + restrict) ;; + no) $as_echo "#define restrict /**/" >>confdefs.h + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + + +# Checks for library functions. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 +$as_echo_n "checking for working strtod... " >&6; } +if ${ac_cv_func_strtod+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_strtod=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +$ac_includes_default +#ifndef strtod +double strtod (); +#endif +int +main() +{ + { + /* Some versions of Linux strtod mis-parse strings with leading '+'. */ + char *string = " +69"; + char *term; + double value; + value = strtod (string, &term); + if (value != 69 || term != (string + 4)) + return 1; + } + + { + /* Under Solaris 2.4, strtod returns the wrong value for the + terminating character under some conditions. */ + char *string = "NaN"; + char *term; + strtod (string, &term); + if (term != string && *(term - 1) == 0) + return 1; + } + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_strtod=yes +else + ac_cv_func_strtod=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 +$as_echo "$ac_cv_func_strtod" >&6; } +if test $ac_cv_func_strtod = no; then + case " $LIBOBJS " in + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; +esac + +ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" +if test "x$ac_cv_func_pow" = xyes; then : + +fi + +if test $ac_cv_func_pow = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 +$as_echo_n "checking for pow in -lm... " >&6; } +if ${ac_cv_lib_m_pow+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pow (); +int +main () +{ +return pow (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_pow=yes +else + ac_cv_lib_m_pow=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 +$as_echo "$ac_cv_lib_m_pow" >&6; } +if test "x$ac_cv_lib_m_pow" = xyes; then : + POW_LIB=-lm +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 +$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} +fi + +fi + +fi + +for ac_func in memset +do : + ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" +if test "x$ac_cv_func_memset" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MEMSET 1 +_ACEOF + +else + as_fn_error $? "memset not found in libc" "$LINENO" 5 +fi +done + +for ac_func in pow +do : + ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" +if test "x$ac_cv_func_pow" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POW 1 +_ACEOF + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 +$as_echo_n "checking for pow in -lm... " >&6; } +if ${ac_cv_lib_m_pow+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pow (); +int +main () +{ +return pow (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_pow=yes +else + ac_cv_lib_m_pow=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 +$as_echo "$ac_cv_lib_m_pow" >&6; } +if test "x$ac_cv_lib_m_pow" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +else + as_fn_error $? "cannot find pow" "$LINENO" 5 +fi + +fi +done + + +# Check whether --with-zlib-prefix was given. +if test "${with_zlib_prefix+set}" = set; then : + withval=$with_zlib_prefix; ZPREFIX=${withval} +else + ZPREFIX='z_' +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5 +$as_echo_n "checking for zlibVersion in -lz... " >&6; } +if ${ac_cv_lib_z_zlibVersion+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char zlibVersion (); +int +main () +{ +return zlibVersion (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_z_zlibVersion=yes +else + ac_cv_lib_z_zlibVersion=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5 +$as_echo "$ac_cv_lib_z_zlibVersion" >&6; } +if test "x$ac_cv_lib_z_zlibVersion" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +else + as_ac_Lib=`$as_echo "ac_cv_lib_z_${ZPREFIX}zlibVersion" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ZPREFIX}zlibVersion in -lz" >&5 +$as_echo_n "checking for ${ZPREFIX}zlibVersion in -lz... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ${ZPREFIX}zlibVersion (); +int +main () +{ +return ${ZPREFIX}zlibVersion (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_ac_Lib=yes" +else + eval "$as_ac_Lib=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +else + as_fn_error $? "zlib not installed" "$LINENO" 5 +fi + +fi + + +# The following is for pngvalid, to ensure it catches FP errors even on +# platforms that don't enable FP exceptions, the function appears in the math +# library (typically), it's not an error if it is not found. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for feenableexcept in -lm" >&5 +$as_echo_n "checking for feenableexcept in -lm... " >&6; } +if ${ac_cv_lib_m_feenableexcept+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char feenableexcept (); +int +main () +{ +return feenableexcept (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_feenableexcept=yes +else + ac_cv_lib_m_feenableexcept=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_feenableexcept" >&5 +$as_echo "$ac_cv_lib_m_feenableexcept" >&6; } +if test "x$ac_cv_lib_m_feenableexcept" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + +for ac_func in feenableexcept +do : + ac_fn_c_check_func "$LINENO" "feenableexcept" "ac_cv_func_feenableexcept" +if test "x$ac_cv_func_feenableexcept" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FEENABLEEXCEPT 1 +_ACEOF + +fi +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if using Solaris linker" >&5 +$as_echo_n "checking if using Solaris linker... " >&6; } +SLD=`$LD --version 2>&1 | grep Solaris` +if test "$SLD"; then + have_solaris_ld=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + have_solaris_ld=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "$have_solaris_ld" = "yes"; then + HAVE_SOLARIS_LD_TRUE= + HAVE_SOLARIS_LD_FALSE='#' +else + HAVE_SOLARIS_LD_TRUE='#' + HAVE_SOLARIS_LD_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5 +$as_echo_n "checking if libraries can be versioned... " >&6; } +# Special case for PE/COFF platforms: ld reports +# support for version-script, but doesn't actually +# DO anything with it. +case $host in +*cygwin* | *mingw32* | *interix* ) + have_ld_version_script=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +;; +* ) + +if test "$have_solaris_ld" = "yes"; then + GLD=`$LD --help < /dev/null 2>&1 | grep 'M mapfile'` +else + GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script` +fi + +if test "$GLD"; then + have_ld_version_script=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + have_ld_version_script=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** You have not enabled versioned symbols." >&5 +$as_echo "$as_me: WARNING: *** You have not enabled versioned symbols." >&2;} +fi +;; +esac + + if test "$have_ld_version_script" = "yes"; then + HAVE_LD_VERSION_SCRIPT_TRUE= + HAVE_LD_VERSION_SCRIPT_FALSE='#' +else + HAVE_LD_VERSION_SCRIPT_TRUE='#' + HAVE_LD_VERSION_SCRIPT_FALSE= +fi + + +if test "$have_ld_version_script" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5 +$as_echo_n "checking for symbol prefix... " >&6; } + SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ + | ${CPP-${CC-gcc} -E} - 2>&1 \ + | ${EGREP-grep} "^PREFIX=" \ + | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5 +$as_echo "$SYMBOL_PREFIX" >&6; } +fi + +# Substitutions for .in files + + + + + +# Additional arguments (and substitutions) +# Allow the pkg-config directory to be set + +# Check whether --with-pkgconfigdir was given. +if test "${with_pkgconfigdir+set}" = set; then : + withval=$with_pkgconfigdir; pkgconfigdir=${withval} +else + pkgconfigdir='${libdir}/pkgconfig' +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: pkgconfig directory is ${pkgconfigdir}" >&5 +$as_echo "$as_me: pkgconfig directory is ${pkgconfigdir}" >&6;} + +# Make the *-config binary config scripts optional + +# Check whether --with-binconfigs was given. +if test "${with_binconfigs+set}" = set; then : + withval=$with_binconfigs; if test "${withval}" = no; then + binconfigs= + { $as_echo "$as_me:${as_lineno-$LINENO}: libpng-config scripts will not be built" >&5 +$as_echo "$as_me: libpng-config scripts will not be built" >&6;} + else + binconfigs='${binconfigs}' + fi +else + binconfigs='${binconfigs}' +fi + + + +# Support for prefixes to the API function names; this will generate defines +# at the start of the build to rename exported library functions + +# Check whether --with-libpng-prefix was given. +if test "${with_libpng_prefix+set}" = set; then : + withval=$with_libpng_prefix; if test "${withval:-no}" != "no"; then + PNG_PREFIX=${withval} + + fi +fi + + if test "${with_libpng_prefix:-no}" != "no"; then + DO_PNG_PREFIX_TRUE= + DO_PNG_PREFIX_FALSE='#' +else + DO_PNG_PREFIX_TRUE='#' + DO_PNG_PREFIX_FALSE= +fi + + +# Because GCC by default assembles code with an executable stack, even though it +# compiles C code with a non-executable stack, it is necessary to do a fixup +# here (this may by GCC specific) +# AC_SUBST([AM_CCASFLAGS], [-Wa,--noexecstack]) + +# Check whether --enable-arm-neon was given. +if test "${enable_arm_neon+set}" = set; then : + enableval=$enable_arm_neon; case "$enableval" in + off) + +$as_echo "#define PNG_NO_ARM_NEON /**/" >>confdefs.h +;; + check) + +$as_echo "#define PNG_ARM_NEON_CHECK_SUPPORTED /**/" >>confdefs.h +;; + api) + +$as_echo "#define PNG_ARM_NEON_API_SUPPORTED /**/" >>confdefs.h +;; + on) + +$as_echo "#define PNG_ARM_NEON_SUPPORTED /**/" >>confdefs.h +;; + *) + as_fn_error $? "arm-neon: option value required (off/check/api/on)" "$LINENO" 5;; + esac +fi + + if test "${enable_arm_neon:-no}" != "no"; then + PNG_ARM_NEON_TRUE= + PNG_ARM_NEON_FALSE='#' +else + PNG_ARM_NEON_TRUE='#' + PNG_ARM_NEON_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: Extra options for compiler: $PNG_COPTS" >&5 +$as_echo "$as_me: Extra options for compiler: $PNG_COPTS" >&6;} + +# Config files, substituting as above +ac_config_files="$ac_config_files Makefile libpng.pc:libpng.pc.in" + +ac_config_files="$ac_config_files libpng-config:libpng-config.in" + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_SOLARIS_LD_TRUE}" && test -z "${HAVE_SOLARIS_LD_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SOLARIS_LD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DO_PNG_PREFIX_TRUE}" && test -z "${DO_PNG_PREFIX_FALSE}"; then + as_fn_error $? "conditional \"DO_PNG_PREFIX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${PNG_ARM_NEON_TRUE}" && test -z "${PNG_ARM_NEON_FALSE}"; then + as_fn_error $? "conditional \"PNG_ARM_NEON\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by libpng $as_me 1.6.2, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +libpng config.status 1.6.2 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +SHELL \ +ECHO \ +LD \ +AS \ +DLLTOOL \ +OBJDUMP \ +PATH_SEPARATOR \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "libpng.pc") CONFIG_FILES="$CONFIG_FILES libpng.pc:libpng.pc.in" ;; + "libpng-config") CONFIG_FILES="$CONFIG_FILES libpng-config:libpng-config.in" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Assembler program. +AS=$lt_AS + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Object dumper program. +OBJDUMP=$lt_OBJDUMP + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + "libpng-config":F) chmod +x libpng-config ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/configure.ac b/3rdparty/wxwidgets3.0-3.0.1/src/png/configure.ac new file mode 100644 index 0000000000..f9bc4f6344 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/configure.ac @@ -0,0 +1,266 @@ +# configure.ac + +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Minor upgrades (compatible ABI): increment the package version +dnl (third field in two places below) and set the PNGLIB_RELEASE +dnl variable. +dnl +dnl Major upgrades (incompatible ABI): increment the package major +dnl version (second field, or first if desired), set the minor +dnl to 0, set PNGLIB_MAJOR below *and* follow the instructions in +dnl Makefile.am to upgrade the package name. + +dnl This is here to prevent earlier autoconf from being used, it +dnl should not be necessary to regenerate configure if the time +dnl stamps are correct +AC_PREREQ([2.68]) + +dnl Version number stuff here: + +AC_INIT([libpng],[1.6.2],[png-mng-implement@lists.sourceforge.net]) +AC_CONFIG_MACRO_DIR([scripts]) + +# libpng does not follow GNU file name conventions (hence 'foreign') +# color-tests requires automake 1.11 or later +# silent-rules requires automake 1.11 or later +# dist-xz requires automake 1.11 or later +# 1.12.2 fixes a security issue in 1.11.2 and 1.12.1 +# 1.13 is required for parallel tests +AM_INIT_AUTOMAKE([1.13 foreign dist-xz color-tests silent-rules]) +# The following line causes --disable-maintainer-mode to be the default to +# configure, this is necessary because libpng distributions cannot rely on the +# time stamps of the autotools generated files being correct +AM_MAINTAINER_MODE + +dnl configure.ac and Makefile.am expect automake 1.11.2 or a compatible later +dnl version; aclocal.m4 will generate a failure if you use a prior version of +dnl automake, so the following is not necessary (and is not defined anyway): +dnl AM_PREREQ([1.11.2]) +dnl stop configure from automagically running automake + +PNGLIB_VERSION=1.6.2 +PNGLIB_MAJOR=1 +PNGLIB_MINOR=6 +PNGLIB_RELEASE=2 + +dnl End of version number stuff + +AC_CONFIG_SRCDIR([pngget.c]) +AC_CONFIG_HEADERS([config.h]) + +# Checks for programs. +AC_LANG([C]) +AC_PROG_CC +AM_PROG_AS +LT_PATH_LD +AC_PROG_CPP +AC_PROG_AWK +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET + +dnl libtool/libtoolize; version 2.4.2 is the tested version, this or any +dnl compatible later version may be used +LT_INIT([win32-dll]) +LT_PREREQ([2.4.2]) + +# Some awks crash when confronted with pnglibconf.dfa, do a test run now +# to make sure this doesn't happen +AC_MSG_CHECKING([that AWK works]) +if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\ + ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ + ${srcdir}/pngusr.dfa 1>&2 +then + AC_MSG_RESULT([ok]) +else + AC_MSG_FAILURE([failed], 1) +fi + +# This is a remnant of the old cc -E validation, where it may have been +# necessary to use a different preprocessor for .dfn files +DFNCPP="$CPP" +AC_SUBST(DFNCPP) + +# -Werror cannot be passed to GCC in CFLAGS because configure will fail (it +# checks the compiler with a program that generates a warning), add the +# following option to deal with this +AC_ARG_VAR(PNG_COPTS, + [additional flags for the C compiler, use this for options that would] + [cause configure itself to fail]) +AC_ARG_ENABLE(werror, + AS_HELP_STRING([[[--enable-werror[=OPT]]]], + [Pass -Werror or the given argument to the compiler if it is supported]), + [test "$enable_werror" = "yes" && enable_werror="-Werror" + if test "$enable_werror" != "no"; then + sav_CFLAGS="$CFLAGS" + CFLAGS="$enable_werror $CFLAGS" + AC_MSG_CHECKING([if the compiler allows $enable_werror]) + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([ + [int main(int argc, char **argv){] + [return argv[argc-1][0];] + [}]])], + AC_MSG_RESULT(yes) + PNG_COPTS="$PNG_COPTS $enable_werror", + AC_MSG_RESULT(no)) + CFLAGS="$sav_CFLAGS" + fi],) + +# Checks for header files. +AC_HEADER_STDC + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIZE_T +AC_STRUCT_TM +AC_C_RESTRICT + +# Checks for library functions. +AC_FUNC_STRTOD +AC_CHECK_FUNCS([memset], , AC_MSG_ERROR(memset not found in libc)) +AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_MSG_ERROR(cannot find pow)) ) +AC_ARG_WITH(zlib-prefix, + AS_HELP_STRING([[[--with-zlib-prefix]]], + [prefix that may have been used in installed zlib]), + [ZPREFIX=${withval}], + [ZPREFIX='z_']) +AC_CHECK_LIB(z, zlibVersion, , + AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, , AC_MSG_ERROR(zlib not installed))) + +# The following is for pngvalid, to ensure it catches FP errors even on +# platforms that don't enable FP exceptions, the function appears in the math +# library (typically), it's not an error if it is not found. +AC_CHECK_LIB([m], [feenableexcept]) +AC_CHECK_FUNCS([feenableexcept]) + +AC_MSG_CHECKING([if using Solaris linker]) +SLD=`$LD --version 2>&1 | grep Solaris` +if test "$SLD"; then + have_solaris_ld=yes + AC_MSG_RESULT(yes) +else + have_solaris_ld=no + AC_MSG_RESULT(no) +fi +AM_CONDITIONAL(HAVE_SOLARIS_LD, test "$have_solaris_ld" = "yes") + +AC_MSG_CHECKING([if libraries can be versioned]) +# Special case for PE/COFF platforms: ld reports +# support for version-script, but doesn't actually +# DO anything with it. +case $host in +*cygwin* | *mingw32* | *interix* ) + have_ld_version_script=no + AC_MSG_RESULT(no) +;; +* ) + +if test "$have_solaris_ld" = "yes"; then + GLD=`$LD --help < /dev/null 2>&1 | grep 'M mapfile'` +else + GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script` +fi + +if test "$GLD"; then + have_ld_version_script=yes + AC_MSG_RESULT(yes) +else + have_ld_version_script=no + AC_MSG_RESULT(no) + AC_MSG_WARN(*** You have not enabled versioned symbols.) +fi +;; +esac + +AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") + +if test "$have_ld_version_script" = "yes"; then + AC_MSG_CHECKING([for symbol prefix]) + SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ + | ${CPP-${CC-gcc} -E} - 2>&1 \ + | ${EGREP-grep} "^PREFIX=" \ + | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` + AC_SUBST(SYMBOL_PREFIX) + AC_MSG_RESULT($SYMBOL_PREFIX) +fi + +# Substitutions for .in files +AC_SUBST(PNGLIB_VERSION) +AC_SUBST(PNGLIB_MAJOR) +AC_SUBST(PNGLIB_MINOR) +AC_SUBST(PNGLIB_RELEASE) + +# Additional arguments (and substitutions) +# Allow the pkg-config directory to be set +AC_ARG_WITH(pkgconfigdir, + AS_HELP_STRING([[[--with-pkgconfigdir]]], + [Use the specified pkgconfig dir (default is libdir/pkgconfig)]), + [pkgconfigdir=${withval}], + [pkgconfigdir='${libdir}/pkgconfig']) + +AC_SUBST([pkgconfigdir]) +AC_MSG_NOTICE([[pkgconfig directory is ${pkgconfigdir}]]) + +# Make the *-config binary config scripts optional +AC_ARG_WITH(binconfigs, + AS_HELP_STRING([[[--with-binconfigs]]], + [Generate shell libpng-config scripts as well as pkg-config data] + [@<:@default=yes@:>@]), + [if test "${withval}" = no; then + binconfigs= + AC_MSG_NOTICE([[libpng-config scripts will not be built]]) + else + binconfigs='${binconfigs}' + fi], + [binconfigs='${binconfigs}']) +AC_SUBST([binconfigs]) + +# Support for prefixes to the API function names; this will generate defines +# at the start of the build to rename exported library functions +AC_ARG_WITH(libpng-prefix, + AS_HELP_STRING([[[--with-libpng-prefix]]], + [prefix libpng exported function (API) names with the given value]), + [if test "${withval:-no}" != "no"; then + AC_SUBST([PNG_PREFIX], [${withval}]) + fi]) +AM_CONDITIONAL([DO_PNG_PREFIX], [test "${with_libpng_prefix:-no}" != "no"]) + +# Because GCC by default assembles code with an executable stack, even though it +# compiles C code with a non-executable stack, it is necessary to do a fixup +# here (this may by GCC specific) +# AC_SUBST([AM_CCASFLAGS], [-Wa,--noexecstack]) + +AC_ARG_ENABLE([arm-neon], + AS_HELP_STRING([[[--enable-arm-neon]]], + [Enable ARM NEON optimizations: =off, check, api, on:] + [off: disable the optimizations; check: use internal checking code] + [(deprecated and poorly supported); api: disable by default, enable by] + [a call to png_set_option; on: turn on unconditionally. The] + [default is 'on' if __ARM_NEON__ is defined, otherwise 'off'.]), + [case "$enableval" in + off) + AC_DEFINE([PNG_NO_ARM_NEON], [], + [Disable ARM Neon optimizations]);; + check) + AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [], + [Check for ARM Neon support at run-time]);; + api) + AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [], + [Turn on ARM Neon optimizations at run-time]);; + on) + AC_DEFINE([PNG_ARM_NEON_SUPPORTED], [], + [Enable ARM Neon optimizations]);; + *) + AC_MSG_ERROR([arm-neon: option value required (off/check/api/on)]);; + esac]) +AM_CONDITIONAL([PNG_ARM_NEON], [test "${enable_arm_neon:-no}" != "no"]) + +AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]]) + +# Config files, substituting as above +AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in]) +AC_CONFIG_FILES([libpng-config:libpng-config.in], + [chmod +x libpng-config]) + +AC_OUTPUT diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/depcomp b/3rdparty/wxwidgets3.0-3.0.1/src/png/depcomp new file mode 100755 index 0000000000..4ebd5b3a2f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2013-05-30.07; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/example.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/example.c new file mode 100644 index 0000000000..ee4e227bcf --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/example.c @@ -0,0 +1,1061 @@ + +#if 0 /* in case someone actually tries to compile this */ + +/* example.c - an example of using libpng + * Last changed in libpng 1.6.0 [February 14, 2013] + * Maintained 1998-2013 Glenn Randers-Pehrson + * Maintained 1996, 1997 Andreas Dilger) + * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * To the extent possible under law, the authors have waived + * all copyright and related or neighboring rights to this file. + * This work is published from: United States. + */ + +/* This is an example of how to use libpng to read and write PNG files. + * The file libpng-manual.txt is much more verbose then this. If you have not + * read it, do so first. This was designed to be a starting point of an + * implementation. This is not officially part of libpng, is hereby placed + * in the public domain, and therefore does not require a copyright notice. + * + * This file does not currently compile, because it is missing certain + * parts, like allocating memory to hold an image. You will have to + * supply these parts to get it to compile. For an example of a minimal + * working PNG reader/writer, see pngtest.c, included in this distribution; + * see also the programs in the contrib directory. + */ + +/* The simple, but restricted, approach to reading a PNG file or data stream + * just requires two function calls, as in the following complete program. + * Writing a file just needs one function call, so long as the data has an + * appropriate layout. + * + * The following code reads PNG image data from a file and writes it, in a + * potentially new format, to a new file. While this code will compile there is + * minimal (insufficient) error checking; for a more realistic version look at + * contrib/examples/pngtopng.c + */ +#include +#include +#include +#include +#include +#include + +int main(int argc, const char **argv) +{ + if (argc == 3) + { + png_image image; /* The control structure used by libpng */ + + /* Initialize the 'png_image' structure. */ + memset(&image, 0, (sizeof image)); + image.version = PNG_IMAGE_VERSION; + + /* The first argument is the file to read: */ + if (png_image_begin_read_from_file(&image, argv[1])) + { + png_bytep buffer; + + /* Set the format in which to read the PNG file; this code chooses a + * simple sRGB format with a non-associated alpha channel, adequate to + * store most images. + */ + image.format = PNG_FORMAT_RGBA; + + /* Now allocate enough memory to hold the image in this format; the + * PNG_IMAGE_SIZE macro uses the information about the image (width, + * height and format) stored in 'image'. + */ + buffer = malloc(PNG_IMAGE_SIZE(image)); + + /* If enough memory was available read the image in the desired format + * then write the result out to the new file. 'background' is not + * necessary when reading the image because the alpha channel is + * preserved; if it were to be removed, for example if we requested + * PNG_FORMAT_RGB, then either a solid background color would have to + * be supplied or the output buffer would have to be initialized to the + * actual background of the image. + * + * The fourth argument to png_image_finish_read is the 'row_stride' - + * this is the number of components allocated for the image in each + * row. It has to be at least as big as the value returned by + * PNG_IMAGE_ROW_STRIDE, but if you just allocate space for the + * default, minimum, size using PNG_IMAGE_SIZE as above you can pass + * zero. + * + * The final argument is a pointer to a buffer for the colormap; + * colormaps have exactly the same format as a row of image pixels (so + * you choose what format to make the colormap by setting + * image.format). A colormap is only returned if + * PNG_FORMAT_FLAG_COLORMAP is also set in image.format, so in this + * case NULL is passed as the final argument. If you do want to force + * all images into an index/color-mapped format then you can use: + * + * PNG_IMAGE_COLORMAP_SIZE(image) + * + * to find the maximum size of the colormap in bytes. + */ + if (buffer != NULL && + png_image_finish_read(&image, NULL/*background*/, buffer, + 0/*row_stride*/, NULL/*colormap*/)) + { + /* Now write the image out to the second argument. In the write + * call 'convert_to_8bit' allows 16-bit data to be squashed down to + * 8 bits; this isn't necessary here because the original read was + * to the 8-bit format. + */ + if (png_image_write_to_file(&image, argv[2], 0/*convert_to_8bit*/, + buffer, 0/*row_stride*/, NULL/*colormap*/)) + { + /* The image has been written successfully. */ + exit(0); + } + } + + else + { + /* Calling png_free_image is optional unless the simplified API was + * not run to completion. In this case if there wasn't enough + * memory for 'buffer' we didn't complete the read, so we must free + * the image: + */ + if (buffer == NULL) + png_free_image(&image); + + else + free(buffer); + } + + /* Something went wrong reading or writing the image. libpng stores a + * textual message in the 'png_image' structure: + */ + fprintf(stderr, "pngtopng: error: %s\n", image.message); + exit (1); + } + + fprintf(stderr, "pngtopng: usage: pngtopng input-file output-file\n"); + exit(1); +} + +/* That's it ;-) Of course you probably want to do more with PNG files than + * just converting them all to 32-bit RGBA PNG files; you can do that between + * the call to png_image_finish_read and png_image_write_to_file. You can also + * ask for the image data to be presented in a number of different formats. You + * do this by simply changing the 'format' parameter set before allocating the + * buffer. + * + * The format parameter consists of five flags that define various aspects of + * the image, you can simply add these together to get the format or you can use + * one of the predefined macros from png.h (as above): + * + * PNG_FORMAT_FLAG_COLOR: if set the image will have three color components per + * pixel (red, green and blue), if not set the image will just have one + * luminance (grayscale) component. + * + * PNG_FORMAT_FLAG_ALPHA: if set each pixel in the image will have an additional + * alpha value; a linear value that describes the degree the image pixel + * covers (overwrites) the contents of the existing pixel on the display. + * + * PNG_FORMAT_FLAG_LINEAR: if set the components of each pixel will be returned + * as a series of 16-bit linear values, if not set the components will be + * returned as a series of 8-bit values encoded according to the 'sRGB' + * standard. The 8-bit format is the normal format for images intended for + * direct display, because almost all display devices do the inverse of the + * sRGB transformation to the data they receive. The 16-bit format is more + * common for scientific data and image data that must be further processed; + * because it is linear simple math can be done on the component values. + * Regardless of the setting of this flag the alpha channel is always linear, + * although it will be 8 bits or 16 bits wide as specified by the flag. + * + * PNG_FORMAT_FLAG_BGR: if set the components of a color pixel will be returned + * in the order blue, then green, then red. If not set the pixel components + * are in the order red, then green, then blue. + * + * PNG_FORMAT_FLAG_AFIRST: if set the alpha channel (if present) precedes the + * color or grayscale components. If not set the alpha channel follows the + * components. + * + * You do not have to read directly from a file. You can read from memory or, + * on systems that support it, from a FILE*. This is controlled by + * the particular png_image_read_from_ function you call at the start. Likewise + * on write you can write to a FILE* if your system supports it. Check the + * macro PNG_STDIO_SUPPORTED to see if stdio support has been included in your + * libpng build. + * + * If you read 16-bit (PNG_FORMAT_FLAG_LINEAR) data you may need to write it in + * the 8-bit format for display. You do this by setting the convert_to_8bit + * flag to 'true'. + * + * Don't repeatedly convert between the 8-bit and 16-bit forms. There is + * significant data loss when 16-bit data is converted to the 8-bit encoding and + * the current libpng implementation of convertion to 16-bit is also + * significantly lossy. The latter will be fixed in the future, but the former + * is unavoidable - the 8-bit format just doesn't have enough resolution. + */ + +/* If your program needs more information from the PNG data it reads, or if you + * need to do more complex transformations, or minimise transformations, on the + * data you read, then you must use one of the several lower level libpng + * interfaces. + * + * All these interfaces require that you do your own error handling - your + * program must be able to arrange for control to return to your own code any + * time libpng encounters a problem. There are several ways to do this, but the + * standard way is to use the ANSI-C (C90) interface to establish a + * return point within your own code. You must do this if you do not use the + * simplified interface (above). + * + * The first step is to include the header files you need, including the libpng + * header file. Include any standard headers and feature test macros your + * program requires before including png.h: + */ +#include + + /* The png_jmpbuf() macro, used in error handling, became available in + * libpng version 1.0.6. If you want to be able to run your code with older + * versions of libpng, you must define the macro yourself (but only if it + * is not already defined by libpng!). + */ + +#ifndef png_jmpbuf +# define png_jmpbuf(png_ptr) ((png_ptr)->png_jmpbuf) +#endif + +/* Check to see if a file is a PNG file using png_sig_cmp(). png_sig_cmp() + * returns zero if the image is a PNG and nonzero if it isn't a PNG. + * + * The function check_if_png() shown here, but not used, returns nonzero (true) + * if the file can be opened and is a PNG, 0 (false) otherwise. + * + * If this call is successful, and you are going to keep the file open, + * you should call png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); once + * you have created the png_ptr, so that libpng knows your application + * has read that many bytes from the start of the file. Make sure you + * don't call png_set_sig_bytes() with more than 8 bytes read or give it + * an incorrect number of bytes read, or you will either have read too + * many bytes (your fault), or you are telling libpng to read the wrong + * number of magic bytes (also your fault). + * + * Many applications already read the first 2 or 4 bytes from the start + * of the image to determine the file type, so it would be easiest just + * to pass the bytes to png_sig_cmp() or even skip that if you know + * you have a PNG file, and call png_set_sig_bytes(). + */ +#define PNG_BYTES_TO_CHECK 4 +int check_if_png(char *file_name, FILE **fp) +{ + char buf[PNG_BYTES_TO_CHECK]; + + /* Open the prospective PNG file. */ + if ((*fp = fopen(file_name, "rb")) == NULL) + return 0; + + /* Read in some of the signature bytes */ + if (fread(buf, 1, PNG_BYTES_TO_CHECK, *fp) != PNG_BYTES_TO_CHECK) + return 0; + + /* Compare the first PNG_BYTES_TO_CHECK bytes of the signature. + Return nonzero (true) if they match */ + + return(!png_sig_cmp(buf, (png_size_t)0, PNG_BYTES_TO_CHECK)); +} + +/* Read a PNG file. You may want to return an error code if the read + * fails (depending upon the failure). There are two "prototypes" given + * here - one where we are given the filename, and we need to open the + * file, and the other where we are given an open file (possibly with + * some or all of the magic bytes read - see comments above). + */ +#ifdef open_file /* prototype 1 */ +void read_png(char *file_name) /* We need to open the file */ +{ + png_structp png_ptr; + png_infop info_ptr; + unsigned int sig_read = 0; + png_uint_32 width, height; + int bit_depth, color_type, interlace_type; + FILE *fp; + + if ((fp = fopen(file_name, "rb")) == NULL) + return (ERROR); + +#else no_open_file /* prototype 2 */ +void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ +{ + png_structp png_ptr; + png_infop info_ptr; + png_uint_32 width, height; + int bit_depth, color_type, interlace_type; +#endif no_open_file /* Only use one prototype! */ + + /* Create and initialize the png_struct with the desired error handler + * functions. If you want to use the default stderr and longjump method, + * you can supply NULL for the last three parameters. We also supply the + * the compiler header file version, so that we know if the application + * was compiled with a compatible version of the library. REQUIRED + */ + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, + png_voidp user_error_ptr, user_error_fn, user_warning_fn); + + if (png_ptr == NULL) + { + fclose(fp); + return (ERROR); + } + + /* Allocate/initialize the memory for image information. REQUIRED. */ + info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) + { + fclose(fp); + png_destroy_read_struct(&png_ptr, NULL, NULL); + return (ERROR); + } + + /* Set error handling if you are using the setjmp/longjmp method (this is + * the normal method of doing things with libpng). REQUIRED unless you + * set up your own error handlers in the png_create_read_struct() earlier. + */ + + if (setjmp(png_jmpbuf(png_ptr))) + { + /* Free all of the memory associated with the png_ptr and info_ptr */ + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + fclose(fp); + /* If we get here, we had a problem reading the file */ + return (ERROR); + } + + /* One of the following I/O initialization methods is REQUIRED */ +#ifdef streams /* PNG file I/O method 1 */ + /* Set up the input control if you are using standard C streams */ + png_init_io(png_ptr, fp); + +#else no_streams /* PNG file I/O method 2 */ + /* If you are using replacement read functions, instead of calling + * png_init_io() here you would call: + */ + png_set_read_fn(png_ptr, (void *)user_io_ptr, user_read_fn); + /* where user_io_ptr is a structure you want available to the callbacks */ +#endif no_streams /* Use only one I/O method! */ + + /* If we have already read some of the signature */ + png_set_sig_bytes(png_ptr, sig_read); + +#ifdef hilevel + /* + * If you have enough memory to read in the entire image at once, + * and you need to specify only transforms that can be controlled + * with one of the PNG_TRANSFORM_* bits (this presently excludes + * quantizing, filling, setting background, and doing gamma + * adjustment), then you can read the entire image (including + * pixels) into the info structure with this call: + */ + png_read_png(png_ptr, info_ptr, png_transforms, NULL); + +#else + /* OK, you're doing it the hard way, with the lower-level functions */ + + /* The call to png_read_info() gives us all of the information from the + * PNG file before the first IDAT (image data chunk). REQUIRED + */ + png_read_info(png_ptr, info_ptr); + + png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, + &interlace_type, NULL, NULL); + + /* Set up the data transformations you want. Note that these are all + * optional. Only call them if you want/need them. Many of the + * transformations only work on specific types of images, and many + * are mutually exclusive. + */ + + /* Tell libpng to strip 16 bit/color files down to 8 bits/color. + * Use accurate scaling if it's available, otherwise just chop off the + * low byte. + */ +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + png_set_scale_16(png_ptr); +#else + png_set_strip_16(png_ptr); +#endif + + /* Strip alpha bytes from the input data without combining with the + * background (not recommended). + */ + png_set_strip_alpha(png_ptr); + + /* Extract multiple pixels with bit depths of 1, 2, and 4 from a single + * byte into separate bytes (useful for paletted and grayscale images). + */ + png_set_packing(png_ptr); + + /* Change the order of packed pixels to least significant bit first + * (not useful if you are using png_set_packing). */ + png_set_packswap(png_ptr); + + /* Expand paletted colors into true RGB triplets */ + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_palette_to_rgb(png_ptr); + + /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */ + if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) + png_set_expand_gray_1_2_4_to_8(png_ptr); + + /* Expand paletted or RGB images with transparency to full alpha channels + * so the data will be available as RGBA quartets. + */ + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_tRNS_to_alpha(png_ptr); + + /* Set the background color to draw transparent and alpha images over. + * It is possible to set the red, green, and blue components directly + * for paletted images instead of supplying a palette index. Note that + * even if the PNG file supplies a background, you are not required to + * use it - you should use the (solid) application background if it has one. + */ + + png_color_16 my_background, *image_background; + + if (png_get_bKGD(png_ptr, info_ptr, &image_background)) + png_set_background(png_ptr, image_background, + PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + else + png_set_background(png_ptr, &my_background, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + + /* Some suggestions as to how to get a screen gamma value + * + * Note that screen gamma is the display_exponent, which includes + * the CRT_exponent and any correction for viewing conditions + */ + if (/* We have a user-defined screen gamma value */) + { + screen_gamma = user-defined screen_gamma; + } + /* This is one way that applications share the same screen gamma value */ + else if ((gamma_str = getenv("SCREEN_GAMMA")) != NULL) + { + screen_gamma = atof(gamma_str); + } + /* If we don't have another value */ + else + { + screen_gamma = 2.2; /* A good guess for a PC monitor in a dimly + lit room */ + screen_gamma = 1.7 or 1.0; /* A good guess for Mac systems */ + } + + /* Tell libpng to handle the gamma conversion for you. The final call + * is a good guess for PC generated images, but it should be configurable + * by the user at run time by the user. It is strongly suggested that + * your application support gamma correction. + */ + + int intent; + + if (png_get_sRGB(png_ptr, info_ptr, &intent)) + png_set_gamma(png_ptr, screen_gamma, 0.45455); + else + { + double image_gamma; + if (png_get_gAMA(png_ptr, info_ptr, &image_gamma)) + png_set_gamma(png_ptr, screen_gamma, image_gamma); + else + png_set_gamma(png_ptr, screen_gamma, 0.45455); + } + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + /* Quantize RGB files down to 8 bit palette or reduce palettes + * to the number of colors available on your screen. + */ + if (color_type & PNG_COLOR_MASK_COLOR) + { + int num_palette; + png_colorp palette; + + /* This reduces the image to the application supplied palette */ + if (/* We have our own palette */) + { + /* An array of colors to which the image should be quantized */ + png_color std_color_cube[MAX_SCREEN_COLORS]; + + png_set_quantize(png_ptr, std_color_cube, MAX_SCREEN_COLORS, + MAX_SCREEN_COLORS, NULL, 0); + } + /* This reduces the image to the palette supplied in the file */ + else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) + { + png_uint_16p histogram = NULL; + + png_get_hIST(png_ptr, info_ptr, &histogram); + + png_set_quantize(png_ptr, palette, num_palette, + max_screen_colors, histogram, 0); + } + } +#endif /* PNG_READ_QUANTIZE_SUPPORTED */ + + /* Invert monochrome files to have 0 as white and 1 as black */ + png_set_invert_mono(png_ptr); + + /* If you want to shift the pixel values from the range [0,255] or + * [0,65535] to the original [0,7] or [0,31], or whatever range the + * colors were originally in: + */ + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT)) + { + png_color_8p sig_bit_p; + + png_get_sBIT(png_ptr, info_ptr, &sig_bit_p); + png_set_shift(png_ptr, sig_bit_p); + } + + /* Flip the RGB pixels to BGR (or RGBA to BGRA) */ + if (color_type & PNG_COLOR_MASK_COLOR) + png_set_bgr(png_ptr); + + /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ + png_set_swap_alpha(png_ptr); + + /* Swap bytes of 16 bit files to least significant byte first */ + png_set_swap(png_ptr); + + /* Add filler (or alpha) byte (before/after each RGB triplet) */ + png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); + +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* Turn on interlace handling. REQUIRED if you are not using + * png_read_image(). To see how to handle interlacing passes, + * see the png_read_row() method below: + */ + number_passes = png_set_interlace_handling(png_ptr); +#else + number_passes = 1; +#endif /* PNG_READ_INTERLACING_SUPPORTED */ + + + /* Optional call to gamma correct and add the background to the palette + * and update info structure. REQUIRED if you are expecting libpng to + * update the palette for you (ie you selected such a transform above). + */ + png_read_update_info(png_ptr, info_ptr); + + /* Allocate the memory to hold the image using the fields of info_ptr. */ + + /* The easiest way to read the image: */ + png_bytep row_pointers[height]; + + /* Clear the pointer array */ + for (row = 0; row < height; row++) + row_pointers[row] = NULL; + + for (row = 0; row < height; row++) + row_pointers[row] = png_malloc(png_ptr, png_get_rowbytes(png_ptr, + info_ptr)); + + /* Now it's time to read the image. One of these methods is REQUIRED */ +#ifdef entire /* Read the entire image in one go */ + png_read_image(png_ptr, row_pointers); + +#else no_entire /* Read the image one or more scanlines at a time */ + /* The other way to read images - deal with interlacing: */ + + for (pass = 0; pass < number_passes; pass++) + { +#ifdef single /* Read the image a single row at a time */ + for (y = 0; y < height; y++) + { + png_read_rows(png_ptr, &row_pointers[y], NULL, 1); + } + +#else no_single /* Read the image several rows at a time */ + for (y = 0; y < height; y += number_of_rows) + { +#ifdef sparkle /* Read the image using the "sparkle" effect. */ + png_read_rows(png_ptr, &row_pointers[y], NULL, + number_of_rows); +#else no_sparkle /* Read the image using the "rectangle" effect */ + png_read_rows(png_ptr, NULL, &row_pointers[y], + number_of_rows); +#endif no_sparkle /* Use only one of these two methods */ + } + + /* If you want to display the image after every pass, do so here */ +#endif no_single /* Use only one of these two methods */ + } +#endif no_entire /* Use only one of these two methods */ + + /* Read rest of file, and get additional chunks in info_ptr - REQUIRED */ + png_read_end(png_ptr, info_ptr); +#endif hilevel + + /* At this point you have read the entire image */ + + /* Clean up after the read, and free any memory allocated - REQUIRED */ + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + + /* Close the file */ + fclose(fp); + + /* That's it */ + return (OK); +} + +/* Progressively read a file */ + +int +initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr) +{ + /* Create and initialize the png_struct with the desired error handler + * functions. If you want to use the default stderr and longjump method, + * you can supply NULL for the last three parameters. We also check that + * the library version is compatible in case we are using dynamically + * linked libraries. + */ + *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, + png_voidp user_error_ptr, user_error_fn, user_warning_fn); + + if (*png_ptr == NULL) + { + *info_ptr = NULL; + return (ERROR); + } + + *info_ptr = png_create_info_struct(png_ptr); + + if (*info_ptr == NULL) + { + png_destroy_read_struct(png_ptr, info_ptr, NULL); + return (ERROR); + } + + if (setjmp(png_jmpbuf((*png_ptr)))) + { + png_destroy_read_struct(png_ptr, info_ptr, NULL); + return (ERROR); + } + + /* This one's new. You will need to provide all three + * function callbacks, even if you aren't using them all. + * If you aren't using all functions, you can specify NULL + * parameters. Even when all three functions are NULL, + * you need to call png_set_progressive_read_fn(). + * These functions shouldn't be dependent on global or + * static variables if you are decoding several images + * simultaneously. You should store stream specific data + * in a separate struct, given as the second parameter, + * and retrieve the pointer from inside the callbacks using + * the function png_get_progressive_ptr(png_ptr). + */ + png_set_progressive_read_fn(*png_ptr, (void *)stream_data, + info_callback, row_callback, end_callback); + + return (OK); +} + +int +process_data(png_structp *png_ptr, png_infop *info_ptr, + png_bytep buffer, png_uint_32 length) +{ + if (setjmp(png_jmpbuf((*png_ptr)))) + { + /* Free the png_ptr and info_ptr memory on error */ + png_destroy_read_struct(png_ptr, info_ptr, NULL); + return (ERROR); + } + + /* This one's new also. Simply give it chunks of data as + * they arrive from the data stream (in order, of course). + * On segmented machines, don't give it any more than 64K. + * The library seems to run fine with sizes of 4K, although + * you can give it much less if necessary (I assume you can + * give it chunks of 1 byte, but I haven't tried with less + * than 256 bytes yet). When this function returns, you may + * want to display any rows that were generated in the row + * callback, if you aren't already displaying them there. + */ + png_process_data(*png_ptr, *info_ptr, buffer, length); + return (OK); +} + +info_callback(png_structp png_ptr, png_infop info) +{ + /* Do any setup here, including setting any of the transformations + * mentioned in the Reading PNG files section. For now, you _must_ + * call either png_start_read_image() or png_read_update_info() + * after all the transformations are set (even if you don't set + * any). You may start getting rows before png_process_data() + * returns, so this is your last chance to prepare for that. + */ +} + +row_callback(png_structp png_ptr, png_bytep new_row, + png_uint_32 row_num, int pass) +{ + /* + * This function is called for every row in the image. If the + * image is interlaced, and you turned on the interlace handler, + * this function will be called for every row in every pass. + * + * In this function you will receive a pointer to new row data from + * libpng called new_row that is to replace a corresponding row (of + * the same data format) in a buffer allocated by your application. + * + * The new row data pointer "new_row" may be NULL, indicating there is + * no new data to be replaced (in cases of interlace loading). + * + * If new_row is not NULL then you need to call + * png_progressive_combine_row() to replace the corresponding row as + * shown below: + */ + + /* Get pointer to corresponding row in our + * PNG read buffer. + */ + png_bytep old_row = ((png_bytep *)our_data)[row_num]; + +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* If both rows are allocated then copy the new row + * data to the corresponding row data. + */ + if ((old_row != NULL) && (new_row != NULL)) + png_progressive_combine_row(png_ptr, old_row, new_row); + + /* + * The rows and passes are called in order, so you don't really + * need the row_num and pass, but I'm supplying them because it + * may make your life easier. + * + * For the non-NULL rows of interlaced images, you must call + * png_progressive_combine_row() passing in the new row and the + * old row, as demonstrated above. You can call this function for + * NULL rows (it will just return) and for non-interlaced images + * (it just does the memcpy for you) if it will make the code + * easier. Thus, you can just do this for all cases: + */ + + png_progressive_combine_row(png_ptr, old_row, new_row); + + /* where old_row is what was displayed for previous rows. Note + * that the first pass (pass == 0 really) will completely cover + * the old row, so the rows do not have to be initialized. After + * the first pass (and only for interlaced images), you will have + * to pass the current row as new_row, and the function will combine + * the old row and the new row. + */ +#endif /* PNG_READ_INTERLACING_SUPPORTED */ +} + +end_callback(png_structp png_ptr, png_infop info) +{ + /* This function is called when the whole image has been read, + * including any chunks after the image (up to and including + * the IEND). You will usually have the same info chunk as you + * had in the header, although some data may have been added + * to the comments and time fields. + * + * Most people won't do much here, perhaps setting a flag that + * marks the image as finished. + */ +} + +/* Write a png file */ +void write_png(char *file_name /* , ... other image information ... */) +{ + FILE *fp; + png_structp png_ptr; + png_infop info_ptr; + png_colorp palette; + + /* Open the file */ + fp = fopen(file_name, "wb"); + if (fp == NULL) + return (ERROR); + + /* Create and initialize the png_struct with the desired error handler + * functions. If you want to use the default stderr and longjump method, + * you can supply NULL for the last three parameters. We also check that + * the library version is compatible with the one used at compile time, + * in case we are using dynamically linked libraries. REQUIRED. + */ + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, + png_voidp user_error_ptr, user_error_fn, user_warning_fn); + + if (png_ptr == NULL) + { + fclose(fp); + return (ERROR); + } + + /* Allocate/initialize the image information data. REQUIRED */ + info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) + { + fclose(fp); + png_destroy_write_struct(&png_ptr, NULL); + return (ERROR); + } + + /* Set error handling. REQUIRED if you aren't supplying your own + * error handling functions in the png_create_write_struct() call. + */ + if (setjmp(png_jmpbuf(png_ptr))) + { + /* If we get here, we had a problem writing the file */ + fclose(fp); + png_destroy_write_struct(&png_ptr, &info_ptr); + return (ERROR); + } + + /* One of the following I/O initialization functions is REQUIRED */ + +#ifdef streams /* I/O initialization method 1 */ + /* Set up the output control if you are using standard C streams */ + png_init_io(png_ptr, fp); + +#else no_streams /* I/O initialization method 2 */ + /* If you are using replacement write functions, instead of calling + * png_init_io() here you would call + */ + png_set_write_fn(png_ptr, (void *)user_io_ptr, user_write_fn, + user_IO_flush_function); + /* where user_io_ptr is a structure you want available to the callbacks */ +#endif no_streams /* Only use one initialization method */ + +#ifdef hilevel + /* This is the easy way. Use it if you already have all the + * image info living in the structure. You could "|" many + * PNG_TRANSFORM flags into the png_transforms integer here. + */ + png_write_png(png_ptr, info_ptr, png_transforms, NULL); + +#else + /* This is the hard way */ + + /* Set the image information here. Width and height are up to 2^31, + * bit_depth is one of 1, 2, 4, 8, or 16, but valid values also depend on + * the color_type selected. color_type is one of PNG_COLOR_TYPE_GRAY, + * PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB, + * or PNG_COLOR_TYPE_RGB_ALPHA. interlace is either PNG_INTERLACE_NONE or + * PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST + * currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED + */ + png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, PNG_COLOR_TYPE_???, + PNG_INTERLACE_????, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + + /* Set the palette if there is one. REQUIRED for indexed-color images */ + palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH + * (sizeof (png_color))); + /* ... Set palette colors ... */ + png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH); + /* You must not free palette here, because png_set_PLTE only makes a link to + * the palette that you malloced. Wait until you are about to destroy + * the png structure. + */ + + /* Optional significant bit (sBIT) chunk */ + png_color_8 sig_bit; + + /* If we are dealing with a grayscale image then */ + sig_bit.gray = true_bit_depth; + + /* Otherwise, if we are dealing with a color image then */ + sig_bit.red = true_red_bit_depth; + sig_bit.green = true_green_bit_depth; + sig_bit.blue = true_blue_bit_depth; + + /* If the image has an alpha channel then */ + sig_bit.alpha = true_alpha_bit_depth; + + png_set_sBIT(png_ptr, info_ptr, &sig_bit); + + + /* Optional gamma chunk is strongly suggested if you have any guess + * as to the correct gamma of the image. + */ + png_set_gAMA(png_ptr, info_ptr, gamma); + + /* Optionally write comments into the image */ + { + png_text text_ptr[3]; + + char key0[]="Title"; + char text0[]="Mona Lisa"; + text_ptr[0].key = key0; + text_ptr[0].text = text0; + text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; + text_ptr[0].itxt_length = 0; + text_ptr[0].lang = NULL; + text_ptr[0].lang_key = NULL; + + char key1[]="Author"; + char text1[]="Leonardo DaVinci"; + text_ptr[1].key = key1; + text_ptr[1].text = text1; + text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE; + text_ptr[1].itxt_length = 0; + text_ptr[1].lang = NULL; + text_ptr[1].lang_key = NULL; + + char key2[]="Description"; + char text2[]=""; + text_ptr[2].key = key2; + text_ptr[2].text = text2; + text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt; + text_ptr[2].itxt_length = 0; + text_ptr[2].lang = NULL; + text_ptr[2].lang_key = NULL; + + png_set_text(write_ptr, write_info_ptr, text_ptr, 3); + } + + /* Other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs */ + + /* Note that if sRGB is present the gAMA and cHRM chunks must be ignored + * on read and, if your application chooses to write them, they must + * be written in accordance with the sRGB profile + */ + + /* Write the file header information. REQUIRED */ + png_write_info(png_ptr, info_ptr); + + /* If you want, you can write the info in two steps, in case you need to + * write your private chunk ahead of PLTE: + * + * png_write_info_before_PLTE(write_ptr, write_info_ptr); + * write_my_chunk(); + * png_write_info(png_ptr, info_ptr); + * + * However, given the level of known- and unknown-chunk support in 1.2.0 + * and up, this should no longer be necessary. + */ + + /* Once we write out the header, the compression type on the text + * chunks gets changed to PNG_TEXT_COMPRESSION_NONE_WR or + * PNG_TEXT_COMPRESSION_zTXt_WR, so it doesn't get written out again + * at the end. + */ + + /* Set up the transformations you want. Note that these are + * all optional. Only call them if you want them. + */ + + /* Invert monochrome pixels */ + png_set_invert_mono(png_ptr); + + /* Shift the pixels up to a legal bit depth and fill in + * as appropriate to correctly scale the image. + */ + png_set_shift(png_ptr, &sig_bit); + + /* Pack pixels into bytes */ + png_set_packing(png_ptr); + + /* Swap location of alpha bytes from ARGB to RGBA */ + png_set_swap_alpha(png_ptr); + + /* Get rid of filler (OR ALPHA) bytes, pack XRGB/RGBX/ARGB/RGBA into + * RGB (4 channels -> 3 channels). The second parameter is not used. + */ + png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); + + /* Flip BGR pixels to RGB */ + png_set_bgr(png_ptr); + + /* Swap bytes of 16-bit files to most significant byte first */ + png_set_swap(png_ptr); + + /* Swap bits of 1, 2, 4 bit packed pixel formats */ + png_set_packswap(png_ptr); + + /* Turn on interlace handling if you are not using png_write_image() */ + if (interlacing) + number_passes = png_set_interlace_handling(png_ptr); + + else + number_passes = 1; + + /* The easiest way to write the image (you may have a different memory + * layout, however, so choose what fits your needs best). You need to + * use the first method if you aren't handling interlacing yourself. + */ + png_uint_32 k, height, width; + + /* In this example, "image" is a one-dimensional array of bytes */ + png_byte image[height*width*bytes_per_pixel]; + + png_bytep row_pointers[height]; + + if (height > PNG_UINT_32_MAX/(sizeof (png_bytep))) + png_error (png_ptr, "Image is too tall to process in memory"); + + /* Set up pointers into your "image" byte array */ + for (k = 0; k < height; k++) + row_pointers[k] = image + k*width*bytes_per_pixel; + + /* One of the following output methods is REQUIRED */ + +#ifdef entire /* Write out the entire image data in one call */ + png_write_image(png_ptr, row_pointers); + + /* The other way to write the image - deal with interlacing */ + +#else no_entire /* Write out the image data by one or more scanlines */ + + /* The number of passes is either 1 for non-interlaced images, + * or 7 for interlaced images. + */ + for (pass = 0; pass < number_passes; pass++) + { + /* Write a few rows at a time. */ + png_write_rows(png_ptr, &row_pointers[first_row], number_of_rows); + + /* If you are only writing one row at a time, this works */ + for (y = 0; y < height; y++) + png_write_rows(png_ptr, &row_pointers[y], 1); + } +#endif no_entire /* Use only one output method */ + + /* You can write optional chunks like tEXt, zTXt, and tIME at the end + * as well. Shouldn't be necessary in 1.2.0 and up as all the public + * chunks are supported and you can use png_set_unknown_chunks() to + * register unknown chunks into the info structure to be written out. + */ + + /* It is REQUIRED to call this to finish writing the rest of the file */ + png_write_end(png_ptr, info_ptr); +#endif hilevel + + /* If you png_malloced a palette, free it here (don't free info_ptr->palette, + * as recommended in versions 1.0.5m and earlier of this example; if + * libpng mallocs info_ptr->palette, libpng will free it). If you + * allocated it with malloc() instead of png_malloc(), use free() instead + * of png_free(). + */ + png_free(png_ptr, palette); + palette = NULL; + + /* Similarly, if you png_malloced any data that you passed in with + * png_set_something(), such as a hist or trans array, free it here, + * when you can be sure that libpng is through with it. + */ + png_free(png_ptr, trans); + trans = NULL; + /* Whenever you use png_free() it is a good idea to set the pointer to + * NULL in case your application inadvertently tries to png_free() it + * again. When png_free() sees a NULL it returns without action, thus + * avoiding the double-free security problem. + */ + + /* Clean up after the write, and free any memory allocated */ + png_destroy_write_struct(&png_ptr, &info_ptr); + + /* Close the file */ + fclose(fp); + + /* That's it */ + return (OK); +} + +#endif /* if 0 */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/install-sh b/3rdparty/wxwidgets3.0-3.0.1/src/png/install-sh new file mode 100755 index 0000000000..377bb8687f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/install-sh @@ -0,0 +1,527 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2011-11-20.07; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/libpng-config.in b/3rdparty/wxwidgets3.0-3.0.1/src/png/libpng-config.in new file mode 100755 index 0000000000..69bf8e33f0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/libpng-config.in @@ -0,0 +1,127 @@ +#! /bin/sh + +# libpng-config +# provides configuration info for libpng. + +# Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson + +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Modeled after libxml-config. + +version="@PNGLIB_VERSION@" +prefix="@prefix@" +exec_prefix="@exec_prefix@" +libdir="@libdir@" +includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@" +libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@" +all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@" +I_opts="-I${includedir}" +L_opts="-L${libdir}" +R_opts="" +cppflags="" +ccopts="" +ldopts="" + +usage() +{ + cat < + Copyright (c) 1998-2013 Glenn Randers-Pehrson + + This document is released under the libpng license. + For conditions of distribution and use, see the disclaimer + and license in png.h + + Based on: + + libpng versions 0.97, January 1998, through 1.6.2 - April 25, 2013 + Updated and distributed by Glenn Randers-Pehrson + Copyright (c) 1998-2013 Glenn Randers-Pehrson + + libpng 1.0 beta 6 version 0.96 May 28, 1997 + Updated and distributed by Andreas Dilger + Copyright (c) 1996, 1997 Andreas Dilger + + libpng 1.0 beta 2 - version 0.88 January 26, 1996 + For conditions of distribution and use, see copyright + notice in png.h. Copyright (c) 1995, 1996 Guy Eric + Schalnat, Group 42, Inc. + + Updated/rewritten per request in the libpng FAQ + Copyright (c) 1995, 1996 Frank J. T. Wojcik + December 18, 1995 & January 20, 1996 + + TABLE OF CONTENTS + + I. Introduction + II. Structures + III. Reading + IV. Writing + V. Simplified API + VI. Modifying/Customizing libpng + VII. MNG support + VIII. Changes to Libpng from version 0.88 + IX. Changes to Libpng from version 1.0.x to 1.2.x + X. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x + XI. Changes to Libpng from version 1.4.x to 1.5.x + XII. Changes to Libpng from version 1.5.x to 1.6.x + XIII. Detecting libpng + XIV. Source code repository + XV. Coding style + XVI. Y2K Compliance in libpng + +I. Introduction + +This file describes how to use and modify the PNG reference library +(known as libpng) for your own use. There are five sections to this +file: introduction, structures, reading, writing, and modification and +configuration notes for various special platforms. In addition to this +file, example.c is a good starting point for using the library, as +it is heavily commented and should include everything most people +will need. We assume that libpng is already installed; see the +INSTALL file for instructions on how to install libpng. + +For examples of libpng usage, see the files "example.c", "pngtest.c", +and the files in the "contrib" directory, all of which are included in +the libpng distribution. + +Libpng was written as a companion to the PNG specification, as a way +of reducing the amount of time and effort it takes to support the PNG +file format in application programs. + +The PNG specification (second edition), November 2003, is available as +a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at +. It is technically equivalent +to the PNG specification (second edition) but has some additional material. + +The PNG-1.0 specification is available +as RFC 2083 and as a +W3C Recommendation . + +Some additional chunks are described in the special-purpose public chunks +documents at . + +Other information +about PNG, and the latest version of libpng, can be found at the PNG home +page, . + +Most users will not have to modify the library significantly; advanced +users may want to modify it more. All attempts were made to make it as +complete as possible, while keeping the code easy to understand. +Currently, this library only supports C. Support for other languages +is being considered. + +Libpng has been designed to handle multiple sessions at one time, +to be easily modifiable, to be portable to the vast majority of +machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy +to use. The ultimate goal of libpng is to promote the acceptance of +the PNG file format in whatever way possible. While there is still +work to be done (see the TODO file), libpng should cover the +majority of the needs of its users. + +Libpng uses zlib for its compression and decompression of PNG files. +Further information about zlib, and the latest version of zlib, can +be found at the zlib home page, . +The zlib compression utility is a general purpose utility that is +useful for more than PNG files, and can be used without libpng. +See the documentation delivered with zlib for more details. +You can usually find the source files for the zlib utility wherever you +find the libpng source files. + +Libpng is thread safe, provided the threads are using different +instances of the structures. Each thread should have its own +png_struct and png_info instances, and thus its own image. +Libpng does not protect itself against two threads using the +same instance of a structure. + +II. Structures + +There are two main structures that are important to libpng, png_struct +and png_info. Both are internal structures that are no longer exposed +in the libpng interface (as of libpng 1.5.0). + +The png_info structure is designed to provide information about the +PNG file. At one time, the fields of png_info were intended to be +directly accessible to the user. However, this tended to cause problems +with applications using dynamically loaded libraries, and as a result +a set of interface functions for png_info (the png_get_*() and png_set_*() +functions) was developed, and direct access to the png_info fields was +deprecated.. + +The png_struct structure is the object used by the library to decode a +single image. As of 1.5.0 this structure is also not exposed. + +Almost all libpng APIs require a pointer to a png_struct as the first argument. +Many (in particular the png_set and png_get APIs) also require a pointer +to png_info as the second argument. Some application visible macros +defined in png.h designed for basic data access (reading and writing +integers in the PNG format) don't take a png_info pointer, but it's almost +always safe to assume that a (png_struct*) has to be passed to call an API +function. + +You can have more than one png_info structure associated with an image, +as illustrated in pngtest.c, one for information valid prior to the +IDAT chunks and another (called "end_info" below) for things after them. + +The png.h header file is an invaluable reference for programming with libpng. +And while I'm on the topic, make sure you include the libpng header file: + +#include + +and also (as of libpng-1.5.0) the zlib header file, if you need it: + +#include + +Types + +The png.h header file defines a number of integral types used by the +APIs. Most of these are fairly obvious; for example types corresponding +to integers of particular sizes and types for passing color values. + +One exception is how non-integral numbers are handled. For application +convenience most APIs that take such numbers have C (double) arguments; +however, internally PNG, and libpng, use 32 bit signed integers and encode +the value by multiplying by 100,000. As of libpng 1.5.0 a convenience +macro PNG_FP_1 is defined in png.h along with a type (png_fixed_point) +which is simply (png_int_32). + +All APIs that take (double) arguments also have a matching API that +takes the corresponding fixed point integer arguments. The fixed point +API has the same name as the floating point one with "_fixed" appended. +The actual range of values permitted in the APIs is frequently less than +the full range of (png_fixed_point) (-21474 to +21474). When APIs require +a non-negative argument the type is recorded as png_uint_32 above. Consult +the header file and the text below for more information. + +Special care must be take with sCAL chunk handling because the chunk itself +uses non-integral values encoded as strings containing decimal floating point +numbers. See the comments in the header file. + +Configuration + +The main header file function declarations are frequently protected by C +preprocessing directives of the form: + + #ifdef PNG_feature_SUPPORTED + declare-function + #endif + ... + #ifdef PNG_feature_SUPPORTED + use-function + #endif + +The library can be built without support for these APIs, although a +standard build will have all implemented APIs. Application programs +should check the feature macros before using an API for maximum +portability. From libpng 1.5.0 the feature macros set during the build +of libpng are recorded in the header file "pnglibconf.h" and this file +is always included by png.h. + +If you don't need to change the library configuration from the default, skip to +the next section ("Reading"). + +Notice that some of the makefiles in the 'scripts' directory and (in 1.5.0) all +of the build project files in the 'projects' directory simply copy +scripts/pnglibconf.h.prebuilt to pnglibconf.h. This means that these build +systems do not permit easy auto-configuration of the library - they only +support the default configuration. + +The easiest way to make minor changes to the libpng configuration when +auto-configuration is supported is to add definitions to the command line +using (typically) CPPFLAGS. For example: + +CPPFLAGS=-DPNG_NO_FLOATING_ARITHMETIC + +will change the internal libpng math implementation for gamma correction and +other arithmetic calculations to fixed point, avoiding the need for fast +floating point support. The result can be seen in the generated pnglibconf.h - +make sure it contains the changed feature macro setting. + +If you need to make more extensive configuration changes - more than one or two +feature macro settings - you can either add -DPNG_USER_CONFIG to the build +command line and put a list of feature macro settings in pngusr.h or you can set +DFA_XTRA (a makefile variable) to a file containing the same information in the +form of 'option' settings. + +A. Changing pnglibconf.h + +A variety of methods exist to build libpng. Not all of these support +reconfiguration of pnglibconf.h. To reconfigure pnglibconf.h it must either be +rebuilt from scripts/pnglibconf.dfa using awk or it must be edited by hand. + +Hand editing is achieved by copying scripts/pnglibconf.h.prebuilt to +pnglibconf.h and changing the lines defining the supported features, paying +very close attention to the 'option' information in scripts/pnglibconf.dfa +that describes those features and their requirements. This is easy to get +wrong. + +B. Configuration using DFA_XTRA + +Rebuilding from pnglibconf.dfa is easy if a functioning 'awk', or a later +variant such as 'nawk' or 'gawk', is available. The configure build will +automatically find an appropriate awk and build pnglibconf.h. +The scripts/pnglibconf.mak file contains a set of make rules for doing the +same thing if configure is not used, and many of the makefiles in the scripts +directory use this approach. + +When rebuilding simply write a new file containing changed options and set +DFA_XTRA to the name of this file. This causes the build to append the new file +to the end of scripts/pnglibconf.dfa. The pngusr.dfa file should contain lines +of the following forms: + +everything = off + +This turns all optional features off. Include it at the start of pngusr.dfa to +make it easier to build a minimal configuration. You will need to turn at least +some features on afterward to enable either reading or writing code, or both. + +option feature on +option feature off + +Enable or disable a single feature. This will automatically enable other +features required by a feature that is turned on or disable other features that +require a feature which is turned off. Conflicting settings will cause an error +message to be emitted by awk. + +setting feature default value + +Changes the default value of setting 'feature' to 'value'. There are a small +number of settings listed at the top of pnglibconf.h, they are documented in the +source code. Most of these values have performance implications for the library +but most of them have no visible effect on the API. Some can also be overridden +from the API. + +This method of building a customized pnglibconf.h is illustrated in +contrib/pngminim/*. See the "$(PNGCONF):" target in the makefile and +pngusr.dfa in these directories. + +C. Configuration using PNG_USR_CONFIG + +If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file +pngusr.h will automatically be included before the options in +scripts/pnglibconf.dfa are processed. Your pngusr.h file should contain only +macro definitions turning features on or off or setting settings. + +Apart from the global setting "everything = off" all the options listed above +can be set using macros in pngusr.h: + +#define PNG_feature_SUPPORTED + +is equivalent to: + +option feature on + +#define PNG_NO_feature + +is equivalent to: + +option feature off + +#define PNG_feature value + +is equivalent to: + +setting feature default value + +Notice that in both cases, pngusr.dfa and pngusr.h, the contents of the +pngusr file you supply override the contents of scripts/pnglibconf.dfa + +If confusing or incomprehensible behavior results it is possible to +examine the intermediate file pnglibconf.dfn to find the full set of +dependency information for each setting and option. Simply locate the +feature in the file and read the C comments that precede it. + +This method is also illustrated in the contrib/pngminim/* makefiles and +pngusr.h. + +III. Reading + +We'll now walk you through the possible functions to call when reading +in a PNG file sequentially, briefly explaining the syntax and purpose +of each one. See example.c and png.h for more detail. While +progressive reading is covered in the next section, you will still +need some of the functions discussed in this section to read a PNG +file. + +Setup + +You will want to do the I/O initialization(*) before you get into libpng, +so if it doesn't work, you don't have much to undo. Of course, you +will also want to insure that you are, in fact, dealing with a PNG +file. Libpng provides a simple check to see if a file is a PNG file. +To use it, pass in the first 1 to 8 bytes of the file to the function +png_sig_cmp(), and it will return 0 (false) if the bytes match the +corresponding bytes of the PNG signature, or nonzero (true) otherwise. +Of course, the more bytes you pass in, the greater the accuracy of the +prediction. + +If you are intending to keep the file pointer open for use in libpng, +you must ensure you don't read more than 8 bytes from the beginning +of the file, and you also have to make a call to png_set_sig_bytes_read() +with the number of bytes you read from the beginning. Libpng will +then only check the bytes (if any) that your program didn't read. + +(*): If you are not using the standard I/O functions, you will need +to replace them with custom functions. See the discussion under +Customizing libpng. + + + FILE *fp = fopen(file_name, "rb"); + if (!fp) + { + return (ERROR); + } + + fread(header, 1, number, fp); + is_png = !png_sig_cmp(header, 0, number); + + if (!is_png) + { + return (NOT_PNG); + } + + +Next, png_struct and png_info need to be allocated and initialized. In +order to ensure that the size of these structures is correct even with a +dynamically linked libpng, there are functions to initialize and +allocate the structures. We also pass the library version, optional +pointers to error handling functions, and a pointer to a data struct for +use by the error functions, if necessary (the pointer and functions can +be NULL if the default error handlers are to be used). See the section +on Changes to Libpng below regarding the old initialization functions. +The structure allocation functions quietly return NULL if they fail to +create the structure, so your application should check for that. + + png_structp png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + + if (!png_ptr) + return (ERROR); + + png_infop info_ptr = png_create_info_struct(png_ptr); + + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); + return (ERROR); + } + +If you want to use your own memory allocation routines, +use a libpng that was built with PNG_USER_MEM_SUPPORTED defined, and use +png_create_read_struct_2() instead of png_create_read_struct(): + + png_structp png_ptr = png_create_read_struct_2 + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn, (png_voidp) + user_mem_ptr, user_malloc_fn, user_free_fn); + +The error handling routines passed to png_create_read_struct() +and the memory alloc/free routines passed to png_create_struct_2() +are only necessary if you are not using the libpng supplied error +handling and memory alloc/free functions. + +When libpng encounters an error, it expects to longjmp back +to your routine. Therefore, you will need to call setjmp and pass +your png_jmpbuf(png_ptr). If you read the file from different +routines, you will need to update the longjmp buffer every time you enter +a new routine that will call a png_*() function. + +See your documentation of setjmp/longjmp for your compiler for more +information on setjmp/longjmp. See the discussion on libpng error +handling in the Customizing Libpng section below for more information +on the libpng error handling. If an error occurs, and libpng longjmp's +back to your setjmp, you will want to call png_destroy_read_struct() to +free any memory. + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); + fclose(fp); + return (ERROR); + } + +Pass (png_infopp)NULL instead of &end_info if you didn't create +an end_info structure. + +If you would rather avoid the complexity of setjmp/longjmp issues, +you can compile libpng with PNG_NO_SETJMP, in which case +errors will result in a call to PNG_ABORT() which defaults to abort(). + +You can #define PNG_ABORT() to a function that does something +more useful than abort(), as long as your function does not +return. + +Now you need to set up the input code. The default for libpng is to +use the C function fread(). If you use this, you will need to pass a +valid FILE * in the function png_init_io(). Be sure that the file is +opened in binary mode. If you wish to handle reading data in another +way, you need not call the png_init_io() function, but you must then +implement the libpng I/O methods discussed in the Customizing Libpng +section below. + + png_init_io(png_ptr, fp); + +If you had previously opened the file and read any of the signature from +the beginning in order to see if this was a PNG file, you need to let +libpng know that there are some bytes missing from the start of the file. + + png_set_sig_bytes(png_ptr, number); + +You can change the zlib compression buffer size to be used while +reading compressed data with + + png_set_compression_buffer_size(png_ptr, buffer_size); + +where the default size is 8192 bytes. Note that the buffer size +is changed immediately and the buffer is reallocated immediately, +instead of setting a flag to be acted upon later. + +If you want CRC errors to be handled in a different manner than +the default, use + + png_set_crc_action(png_ptr, crit_action, ancil_action); + +The values for png_set_crc_action() say how libpng is to handle CRC errors in +ancillary and critical chunks, and whether to use the data contained +therein. Note that it is impossible to "discard" data in a critical +chunk. + +Choices for (int) crit_action are + PNG_CRC_DEFAULT 0 error/quit + PNG_CRC_ERROR_QUIT 1 error/quit + PNG_CRC_WARN_USE 3 warn/use data + PNG_CRC_QUIET_USE 4 quiet/use data + PNG_CRC_NO_CHANGE 5 use the current value + +Choices for (int) ancil_action are + PNG_CRC_DEFAULT 0 error/quit + PNG_CRC_ERROR_QUIT 1 error/quit + PNG_CRC_WARN_DISCARD 2 warn/discard data + PNG_CRC_WARN_USE 3 warn/use data + PNG_CRC_QUIET_USE 4 quiet/use data + PNG_CRC_NO_CHANGE 5 use the current value + +Setting up callback code + +You can set up a callback function to handle any unknown chunks in the +input stream. You must supply the function + + read_chunk_callback(png_structp png_ptr, + png_unknown_chunkp chunk); + { + /* The unknown chunk structure contains your + chunk data, along with similar data for any other + unknown chunks: */ + + png_byte name[5]; + png_byte *data; + png_size_t size; + + /* Note that libpng has already taken care of + the CRC handling */ + + /* put your code here. Search for your chunk in the + unknown chunk structure, process it, and return one + of the following: */ + + return (-n); /* chunk had an error */ + return (0); /* did not recognize */ + return (n); /* success */ + } + +(You can give your function another name that you like instead of +"read_chunk_callback") + +To inform libpng about your function, use + + png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr, + read_chunk_callback); + +This names not only the callback function, but also a user pointer that +you can retrieve with + + png_get_user_chunk_ptr(png_ptr); + +If you call the png_set_read_user_chunk_fn() function, then all unknown +chunks which the callback does not handle will be saved when read. You can +cause them to be discarded by returning '1' ("handled") instead of '0'. This +behavior will change in libpng 1.7 and the default handling set by the +png_set_keep_unknown_chunks() function, described below, will be used when the +callback returns 0. If you want the existing behavior you should set the global +default to PNG_HANDLE_CHUNK_IF_SAFE now; this is compatible with all current +versions of libpng and with 1.7. Libpng 1.6 issues a warning if you keep the +default, or PNG_HANDLE_CHUNK_NEVER, and the callback returns 0. + +At this point, you can set up a callback function that will be +called after each row has been read, which you can use to control +a progress meter or the like. It's demonstrated in pngtest.c. +You must supply a function + + void read_row_callback(png_structp png_ptr, + png_uint_32 row, int pass); + { + /* put your code here */ + } + +(You can give it another name that you like instead of "read_row_callback") + +To inform libpng about your function, use + + png_set_read_status_fn(png_ptr, read_row_callback); + +When this function is called the row has already been completely processed and +the 'row' and 'pass' refer to the next row to be handled. For the +non-interlaced case the row that was just handled is simply one less than the +passed in row number, and pass will always be 0. For the interlaced case the +same applies unless the row value is 0, in which case the row just handled was +the last one from one of the preceding passes. Because interlacing may skip a +pass you cannot be sure that the preceding pass is just 'pass-1', if you really +need to know what the last pass is record (row,pass) from the callback and use +the last recorded value each time. + +As with the user transform you can find the output row using the +PNG_ROW_FROM_PASS_ROW macro. + +Unknown-chunk handling + +Now you get to set the way the library processes unknown chunks in the +input PNG stream. Both known and unknown chunks will be read. Normal +behavior is that known chunks will be parsed into information in +various info_ptr members while unknown chunks will be discarded. This +behavior can be wasteful if your application will never use some known +chunk types. To change this, you can call: + + png_set_keep_unknown_chunks(png_ptr, keep, + chunk_list, num_chunks); + + keep - 0: default unknown chunk handling + 1: ignore; do not keep + 2: keep only if safe-to-copy + 3: keep even if unsafe-to-copy + + You can use these definitions: + PNG_HANDLE_CHUNK_AS_DEFAULT 0 + PNG_HANDLE_CHUNK_NEVER 1 + PNG_HANDLE_CHUNK_IF_SAFE 2 + PNG_HANDLE_CHUNK_ALWAYS 3 + + chunk_list - list of chunks affected (a byte string, + five bytes per chunk, NULL or '\0' if + num_chunks is positive; ignored if + numchunks <= 0). + + num_chunks - number of chunks affected; if 0, all + unknown chunks are affected. If positive, + only the chunks in the list are affected, + and if negative all unknown chunks and + all known chunks except for the IHDR, + PLTE, tRNS, IDAT, and IEND chunks are + affected. + +Unknown chunks declared in this way will be saved as raw data onto a +list of png_unknown_chunk structures. If a chunk that is normally +known to libpng is named in the list, it will be handled as unknown, +according to the "keep" directive. If a chunk is named in successive +instances of png_set_keep_unknown_chunks(), the final instance will +take precedence. The IHDR and IEND chunks should not be named in +chunk_list; if they are, libpng will process them normally anyway. +If you know that your application will never make use of some particular +chunks, use PNG_HANDLE_CHUNK_NEVER (or 1) as demonstrated below. + +Here is an example of the usage of png_set_keep_unknown_chunks(), +where the private "vpAg" chunk will later be processed by a user chunk +callback function: + + png_byte vpAg[5]={118, 112, 65, 103, (png_byte) '\0'}; + + #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) + png_byte unused_chunks[]= + { + 104, 73, 83, 84, (png_byte) '\0', /* hIST */ + 105, 84, 88, 116, (png_byte) '\0', /* iTXt */ + 112, 67, 65, 76, (png_byte) '\0', /* pCAL */ + 115, 67, 65, 76, (png_byte) '\0', /* sCAL */ + 115, 80, 76, 84, (png_byte) '\0', /* sPLT */ + 116, 73, 77, 69, (png_byte) '\0', /* tIME */ + }; + #endif + + ... + + #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) + /* ignore all unknown chunks + * (use global setting "2" for libpng16 and earlier): + */ + png_set_keep_unknown_chunks(read_ptr, 2, NULL, 0); + + /* except for vpAg: */ + png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1); + + /* also ignore unused known chunks: */ + png_set_keep_unknown_chunks(read_ptr, 1, unused_chunks, + (int)(sizeof unused_chunks)/5); + #endif + +User limits + +The PNG specification allows the width and height of an image to be as +large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns. +Since very few applications really need to process such large images, +we have imposed an arbitrary 1-million limit on rows and columns. +Larger images will be rejected immediately with a png_error() call. If +you wish to change this limit, you can use + + png_set_user_limits(png_ptr, width_max, height_max); + +to set your own limits, or use width_max = height_max = 0x7fffffffL +to allow all valid dimensions (libpng may reject some very large images +anyway because of potential buffer overflow conditions). + +You should put this statement after you create the PNG structure and +before calling png_read_info(), png_read_png(), or png_process_data(). + +When writing a PNG datastream, put this statement before calling +png_write_info() or png_write_png(). + +If you need to retrieve the limits that are being applied, use + + width_max = png_get_user_width_max(png_ptr); + height_max = png_get_user_height_max(png_ptr); + +The PNG specification sets no limit on the number of ancillary chunks +allowed in a PNG datastream. You can impose a limit on the total number +of sPLT, tEXt, iTXt, zTXt, and unknown chunks that will be stored, with + + png_set_chunk_cache_max(png_ptr, user_chunk_cache_max); + +where 0x7fffffffL means unlimited. You can retrieve this limit with + + chunk_cache_max = png_get_chunk_cache_max(png_ptr); + +You can also set a limit on the amount of memory that a compressed chunk +other than IDAT can occupy, with + + png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max); + +and you can retrieve the limit with + + chunk_malloc_max = png_get_chunk_malloc_max(png_ptr); + +Any chunks that would cause either of these limits to be exceeded will +be ignored. + +Information about your system + +If you intend to display the PNG or to incorporate it in other image data you +need to tell libpng information about your display or drawing surface so that +libpng can convert the values in the image to match the display. + +From libpng-1.5.4 this information can be set before reading the PNG file +header. In earlier versions png_set_gamma() existed but behaved incorrectly if +called before the PNG file header had been read and png_set_alpha_mode() did not +exist. + +If you need to support versions prior to libpng-1.5.4 test the version number +as illustrated below using "PNG_LIBPNG_VER >= 10504" and follow the procedures +described in the appropriate manual page. + +You give libpng the encoding expected by your system expressed as a 'gamma' +value. You can also specify a default encoding for the PNG file in +case the required information is missing from the file. By default libpng +assumes that the PNG data matches your system, to keep this default call: + + png_set_gamma(png_ptr, screen_gamma, 1/screen_gamma/*file gamma*/); + +or you can use the fixed point equivalent: + + png_set_gamma_fixed(png_ptr, PNG_FP_1*screen_gamma, + PNG_FP_1/screen_gamma); + +If you don't know the gamma for your system it is probably 2.2 - a good +approximation to the IEC standard for display systems (sRGB). If images are +too contrasty or washed out you got the value wrong - check your system +documentation! + +Many systems permit the system gamma to be changed via a lookup table in the +display driver, a few systems, including older Macs, change the response by +default. As of 1.5.4 three special values are available to handle common +situations: + + PNG_DEFAULT_sRGB: Indicates that the system conforms to the + IEC 61966-2-1 standard. This matches almost + all systems. + PNG_GAMMA_MAC_18: Indicates that the system is an older + (pre Mac OS 10.6) Apple Macintosh system with + the default settings. + PNG_GAMMA_LINEAR: Just the fixed point value for 1.0 - indicates + that the system expects data with no gamma + encoding. + +You would use the linear (unencoded) value if you need to process the pixel +values further because this avoids the need to decode and reencode each +component value whenever arithmetic is performed. A lot of graphics software +uses linear values for this reason, often with higher precision component values +to preserve overall accuracy. + +The second thing you may need to tell libpng about is how your system handles +alpha channel information. Some, but not all, PNG files contain an alpha +channel. To display these files correctly you need to compose the data onto a +suitable background, as described in the PNG specification. + +Libpng only supports composing onto a single color (using png_set_background; +see below). Otherwise you must do the composition yourself and, in this case, +you may need to call png_set_alpha_mode: + + #if PNG_LIBPNG_VER >= 10504 + png_set_alpha_mode(png_ptr, mode, screen_gamma); + #else + png_set_gamma(png_ptr, screen_gamma, 1.0/screen_gamma); + #endif + +The screen_gamma value is the same as the argument to png_set_gamma; however, +how it affects the output depends on the mode. png_set_alpha_mode() sets the +file gamma default to 1/screen_gamma, so normally you don't need to call +png_set_gamma. If you need different defaults call png_set_gamma() before +png_set_alpha_mode() - if you call it after it will override the settings made +by png_set_alpha_mode(). + +The mode is as follows: + + PNG_ALPHA_PNG: The data is encoded according to the PNG specification. Red, +green and blue, or gray, components are gamma encoded color +values and are not premultiplied by the alpha value. The +alpha value is a linear measure of the contribution of the +pixel to the corresponding final output pixel. + +You should normally use this format if you intend to perform +color correction on the color values; most, maybe all, color +correction software has no handling for the alpha channel and, +anyway, the math to handle pre-multiplied component values is +unnecessarily complex. + +Before you do any arithmetic on the component values you need +to remove the gamma encoding and multiply out the alpha +channel. See the PNG specification for more detail. It is +important to note that when an image with an alpha channel is +scaled, linear encoded, pre-multiplied component values must +be used! + +The remaining modes assume you don't need to do any further color correction or +that if you do, your color correction software knows all about alpha (it +probably doesn't!) + + PNG_ALPHA_STANDARD: The data libpng produces +is encoded in the standard way +assumed by most correctly written graphics software. +The gamma encoding will be removed by libpng and the +linear component values will be pre-multiplied by the +alpha channel. + +With this format the final image must be re-encoded to +match the display gamma before the image is displayed. +If your system doesn't do that, yet still seems to +perform arithmetic on the pixels without decoding them, +it is broken - check out the modes below. + +With PNG_ALPHA_STANDARD libpng always produces linear +component values, whatever screen_gamma you supply. The +screen_gamma value is, however, used as a default for +the file gamma if the PNG file has no gamma information. + +If you call png_set_gamma() after png_set_alpha_mode() you +will override the linear encoding. Instead the +pre-multiplied pixel values will be gamma encoded but +the alpha channel will still be linear. This may +actually match the requirements of some broken software, +but it is unlikely. + +While linear 8-bit data is often used it has +insufficient precision for any image with a reasonable +dynamic range. To avoid problems, and if your software +supports it, use png_set_expand_16() to force all +components to 16 bits. + + PNG_ALPHA_OPTIMIZED: This mode is the same +as PNG_ALPHA_STANDARD except that +completely opaque pixels are gamma encoded according to +the screen_gamma value. Pixels with alpha less than 1.0 +will still have linear components. + +Use this format if you have control over your +compositing software and so don't do other arithmetic +(such as scaling) on the data you get from libpng. Your +compositing software can simply copy opaque pixels to +the output but still has linear values for the +non-opaque pixels. + +In normal compositing, where the alpha channel encodes +partial pixel coverage (as opposed to broad area +translucency), the inaccuracies of the 8-bit +representation of non-opaque pixels are irrelevant. + +You can also try this format if your software is broken; +it might look better. + + PNG_ALPHA_BROKEN: This is PNG_ALPHA_STANDARD; +however, all component values, +including the alpha channel are gamma encoded. This is +an appropriate format to try if your software, or more +likely hardware, is totally broken, i.e., if it performs +linear arithmetic directly on gamma encoded values. + +In most cases of broken software or hardware the bug in the final display +manifests as a subtle halo around composited parts of the image. You may not +even perceive this as a halo; the composited part of the image may simply appear +separate from the background, as though it had been cut out of paper and pasted +on afterward. + +If you don't have to deal with bugs in software or hardware, or if you can fix +them, there are three recommended ways of using png_set_alpha_mode(): + + png_set_alpha_mode(png_ptr, PNG_ALPHA_PNG, + screen_gamma); + +You can do color correction on the result (libpng does not currently +support color correction internally). When you handle the alpha channel +you need to undo the gamma encoding and multiply out the alpha. + + png_set_alpha_mode(png_ptr, PNG_ALPHA_STANDARD, + screen_gamma); + png_set_expand_16(png_ptr); + +If you are using the high level interface, don't call png_set_expand_16(); +instead pass PNG_TRANSFORM_EXPAND_16 to the interface. + +With this mode you can't do color correction, but you can do arithmetic, +including composition and scaling, on the data without further processing. + + png_set_alpha_mode(png_ptr, PNG_ALPHA_OPTIMIZED, + screen_gamma); + +You can avoid the expansion to 16-bit components with this mode, but you +lose the ability to scale the image or perform other linear arithmetic. +All you can do is compose the result onto a matching output. Since this +mode is libpng-specific you also need to write your own composition +software. + +If you don't need, or can't handle, the alpha channel you can call +png_set_background() to remove it by compositing against a fixed color. Don't +call png_set_strip_alpha() to do this - it will leave spurious pixel values in +transparent parts of this image. + + png_set_background(png_ptr, &background_color, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1); + +The background_color is an RGB or grayscale value according to the data format +libpng will produce for you. Because you don't yet know the format of the PNG +file, if you call png_set_background at this point you must arrange for the +format produced by libpng to always have 8-bit or 16-bit components and then +store the color as an 8-bit or 16-bit color as appropriate. The color contains +separate gray and RGB component values, so you can let libpng produce gray or +RGB output according to the input format, but low bit depth grayscale images +must always be converted to at least 8-bit format. (Even though low bit depth +grayscale images can't have an alpha channel they can have a transparent +color!) + +You set the transforms you need later, either as flags to the high level +interface or libpng API calls for the low level interface. For reference the +settings and API calls required are: + +8-bit values: + PNG_TRANSFORM_SCALE_16 | PNG_EXPAND + png_set_expand(png_ptr); png_set_scale_16(png_ptr); + + If you must get exactly the same inaccurate results + produced by default in versions prior to libpng-1.5.4, + use PNG_TRANSFORM_STRIP_16 and png_set_strip_16(png_ptr) + instead. + +16-bit values: + PNG_TRANSFORM_EXPAND_16 + png_set_expand_16(png_ptr); + +In either case palette image data will be expanded to RGB. If you just want +color data you can add PNG_TRANSFORM_GRAY_TO_RGB or png_set_gray_to_rgb(png_ptr) +to the list. + +Calling png_set_background before the PNG file header is read will not work +prior to libpng-1.5.4. Because the failure may result in unexpected warnings or +errors it is therefore much safer to call png_set_background after the head has +been read. Unfortunately this means that prior to libpng-1.5.4 it cannot be +used with the high level interface. + +The high-level read interface + +At this point there are two ways to proceed; through the high-level +read interface, or through a sequence of low-level read operations. +You can use the high-level interface if (a) you are willing to read +the entire image into memory, and (b) the input transformations +you want to do are limited to the following set: + + PNG_TRANSFORM_IDENTITY No transformation + PNG_TRANSFORM_SCALE_16 Strip 16-bit samples to + 8-bit accurately + PNG_TRANSFORM_STRIP_16 Chop 16-bit samples to + 8-bit less accurately + PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel + PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit + samples to bytes + PNG_TRANSFORM_PACKSWAP Change order of packed + pixels to LSB first + PNG_TRANSFORM_EXPAND Perform set_expand() + PNG_TRANSFORM_INVERT_MONO Invert monochrome images + PNG_TRANSFORM_SHIFT Normalize pixels to the + sBIT depth + PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA + to BGRA + PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA + to AG + PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity + to transparency + PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples + to RGB (or GA to RGBA) + PNG_TRANSFORM_EXPAND_16 Expand samples to 16 bits + +(This excludes setting a background color, doing gamma transformation, +quantizing, and setting filler.) If this is the case, simply do this: + + png_read_png(png_ptr, info_ptr, png_transforms, NULL) + +where png_transforms is an integer containing the bitwise OR of some +set of transformation flags. This call is equivalent to png_read_info(), +followed the set of transformations indicated by the transform mask, +then png_read_image(), and finally png_read_end(). + +(The final parameter of this call is not yet used. Someday it might point +to transformation parameters required by some future input transform.) + +You must use png_transforms and not call any png_set_transform() functions +when you use png_read_png(). + +After you have called png_read_png(), you can retrieve the image data +with + + row_pointers = png_get_rows(png_ptr, info_ptr); + +where row_pointers is an array of pointers to the pixel data for each row: + + png_bytep row_pointers[height]; + +If you know your image size and pixel size ahead of time, you can allocate +row_pointers prior to calling png_read_png() with + + if (height > PNG_UINT_32_MAX/(sizeof (png_byte))) + png_error (png_ptr, + "Image is too tall to process in memory"); + + if (width > PNG_UINT_32_MAX/pixel_size) + png_error (png_ptr, + "Image is too wide to process in memory"); + + row_pointers = png_malloc(png_ptr, + height*(sizeof (png_bytep))); + + for (int i=0; i) and +png_get_(png_ptr, info_ptr, ...) functions return non-zero if the +data has been read, or zero if it is missing. The parameters to the +png_get_ are set directly if they are simple data types, or a +pointer into the info_ptr is returned for any complex types. + +The colorspace data from gAMA, cHRM, sRGB, iCCP, and sBIT chunks +is simply returned to give the application information about how the +image was encoded. Libpng itself only does transformations using the file +gamma when combining semitransparent pixels with the background color, and, +since libpng-1.6.0, when converting between 8-bit sRGB and 16-bit linear pixels +within the simplified API. Libpng also uses the file gamma when converting +RGB to gray, beginning with libpng-1.0.5, if the application calls +png_set_rgb_to_gray()). + + png_get_PLTE(png_ptr, info_ptr, &palette, + &num_palette); + + palette - the palette for the file + (array of png_color) + + num_palette - number of entries in the palette + + png_get_gAMA(png_ptr, info_ptr, &file_gamma); + png_get_gAMA_fixed(png_ptr, info_ptr, &int_file_gamma); + + file_gamma - the gamma at which the file is + written (PNG_INFO_gAMA) + + int_file_gamma - 100,000 times the gamma at which the + file is written + + png_get_cHRM(png_ptr, info_ptr, &white_x, &white_y, &red_x, + &red_y, &green_x, &green_y, &blue_x, &blue_y) + png_get_cHRM_XYZ(png_ptr, info_ptr, &red_X, &red_Y, &red_Z, + &green_X, &green_Y, &green_Z, &blue_X, &blue_Y, + &blue_Z) + png_get_cHRM_fixed(png_ptr, info_ptr, &int_white_x, + &int_white_y, &int_red_x, &int_red_y, + &int_green_x, &int_green_y, &int_blue_x, + &int_blue_y) + png_get_cHRM_XYZ_fixed(png_ptr, info_ptr, &int_red_X, &int_red_Y, + &int_red_Z, &int_green_X, &int_green_Y, + &int_green_Z, &int_blue_X, &int_blue_Y, + &int_blue_Z) + + {white,red,green,blue}_{x,y} + A color space encoding specified using the + chromaticities of the end points and the + white point. (PNG_INFO_cHRM) + + {red,green,blue}_{X,Y,Z} + A color space encoding specified using the + encoding end points - the CIE tristimulus + specification of the intended color of the red, + green and blue channels in the PNG RGB data. + The white point is simply the sum of the three + end points. (PNG_INFO_cHRM) + + png_get_sRGB(png_ptr, info_ptr, &srgb_intent); + + file_srgb_intent - the rendering intent (PNG_INFO_sRGB) + The presence of the sRGB chunk + means that the pixel data is in the + sRGB color space. This chunk also + implies specific values of gAMA and + cHRM. + + png_get_iCCP(png_ptr, info_ptr, &name, + &compression_type, &profile, &proflen); + + name - The profile name. + + compression_type - The compression type; always + PNG_COMPRESSION_TYPE_BASE for PNG 1.0. + You may give NULL to this argument to + ignore it. + + profile - International Color Consortium color + profile data. May contain NULs. + + proflen - length of profile data in bytes. + + png_get_sBIT(png_ptr, info_ptr, &sig_bit); + + sig_bit - the number of significant bits for + (PNG_INFO_sBIT) each of the gray, + red, green, and blue channels, + whichever are appropriate for the + given color type (png_color_16) + + png_get_tRNS(png_ptr, info_ptr, &trans_alpha, + &num_trans, &trans_color); + + trans_alpha - array of alpha (transparency) + entries for palette (PNG_INFO_tRNS) + + num_trans - number of transparent entries + (PNG_INFO_tRNS) + + trans_color - graylevel or color sample values of + the single transparent color for + non-paletted images (PNG_INFO_tRNS) + + png_get_hIST(png_ptr, info_ptr, &hist); + (PNG_INFO_hIST) + + hist - histogram of palette (array of + png_uint_16) + + png_get_tIME(png_ptr, info_ptr, &mod_time); + + mod_time - time image was last modified + (PNG_VALID_tIME) + + png_get_bKGD(png_ptr, info_ptr, &background); + + background - background color (of type + png_color_16p) (PNG_VALID_bKGD) + valid 16-bit red, green and blue + values, regardless of color_type + + num_comments = png_get_text(png_ptr, info_ptr, + &text_ptr, &num_text); + + num_comments - number of comments + + text_ptr - array of png_text holding image + comments + + text_ptr[i].compression - type of compression used + on "text" PNG_TEXT_COMPRESSION_NONE + PNG_TEXT_COMPRESSION_zTXt + PNG_ITXT_COMPRESSION_NONE + PNG_ITXT_COMPRESSION_zTXt + + text_ptr[i].key - keyword for comment. Must contain + 1-79 characters. + + text_ptr[i].text - text comments for current + keyword. Can be empty. + + text_ptr[i].text_length - length of text string, + after decompression, 0 for iTXt + + text_ptr[i].itxt_length - length of itxt string, + after decompression, 0 for tEXt/zTXt + + text_ptr[i].lang - language of comment (empty + string for unknown). + + text_ptr[i].lang_key - keyword in UTF-8 + (empty string for unknown). + + Note that the itxt_length, lang, and lang_key + members of the text_ptr structure only exist when the + library is built with iTXt chunk support. Prior to + libpng-1.4.0 the library was built by default without + iTXt support. Also note that when iTXt is supported, + they contain NULL pointers when the "compression" + field contains PNG_TEXT_COMPRESSION_NONE or + PNG_TEXT_COMPRESSION_zTXt. + + num_text - number of comments (same as + num_comments; you can put NULL here + to avoid the duplication) + + Note while png_set_text() will accept text, language, + and translated keywords that can be NULL pointers, the + structure returned by png_get_text will always contain + regular zero-terminated C strings. They might be + empty strings but they will never be NULL pointers. + + num_spalettes = png_get_sPLT(png_ptr, info_ptr, + &palette_ptr); + + num_spalettes - number of sPLT chunks read. + + palette_ptr - array of palette structures holding + contents of one or more sPLT chunks + read. + + png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, + &unit_type); + + offset_x - positive offset from the left edge + of the screen (can be negative) + + offset_y - positive offset from the top edge + of the screen (can be negative) + + unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER + + png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, + &unit_type); + + res_x - pixels/unit physical resolution in + x direction + + res_y - pixels/unit physical resolution in + x direction + + unit_type - PNG_RESOLUTION_UNKNOWN, + PNG_RESOLUTION_METER + + png_get_sCAL(png_ptr, info_ptr, &unit, &width, + &height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + + height - height of a pixel in physical scale units + (width and height are doubles) + + png_get_sCAL_s(png_ptr, info_ptr, &unit, &width, + &height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + (expressed as a string) + + height - height of a pixel in physical scale units + (width and height are strings like "2.54") + + num_unknown_chunks = png_get_unknown_chunks(png_ptr, + info_ptr, &unknowns) + + unknowns - array of png_unknown_chunk + structures holding unknown chunks + + unknowns[i].name - name of unknown chunk + + unknowns[i].data - data of unknown chunk + + unknowns[i].size - size of unknown chunk's data + + unknowns[i].location - position of chunk in file + + The value of "i" corresponds to the order in which the + chunks were read from the PNG file or inserted with the + png_set_unknown_chunks() function. + + The value of "location" is a bitwise "or" of + + PNG_HAVE_IHDR (0x01) + PNG_HAVE_PLTE (0x02) + PNG_AFTER_IDAT (0x08) + +The data from the pHYs chunk can be retrieved in several convenient +forms: + + res_x = png_get_x_pixels_per_meter(png_ptr, + info_ptr) + + res_y = png_get_y_pixels_per_meter(png_ptr, + info_ptr) + + res_x_and_y = png_get_pixels_per_meter(png_ptr, + info_ptr) + + res_x = png_get_x_pixels_per_inch(png_ptr, + info_ptr) + + res_y = png_get_y_pixels_per_inch(png_ptr, + info_ptr) + + res_x_and_y = png_get_pixels_per_inch(png_ptr, + info_ptr) + + aspect_ratio = png_get_pixel_aspect_ratio(png_ptr, + info_ptr) + + Each of these returns 0 [signifying "unknown"] if + the data is not present or if res_x is 0; + res_x_and_y is 0 if res_x != res_y + + Note that because of the way the resolutions are + stored internally, the inch conversions won't + come out to exactly even number. For example, + 72 dpi is stored as 0.28346 pixels/meter, and + when this is retrieved it is 71.9988 dpi, so + be sure to round the returned value appropriately + if you want to display a reasonable-looking result. + +The data from the oFFs chunk can be retrieved in several convenient +forms: + + x_offset = png_get_x_offset_microns(png_ptr, info_ptr); + + y_offset = png_get_y_offset_microns(png_ptr, info_ptr); + + x_offset = png_get_x_offset_inches(png_ptr, info_ptr); + + y_offset = png_get_y_offset_inches(png_ptr, info_ptr); + + Each of these returns 0 [signifying "unknown" if both + x and y are 0] if the data is not present or if the + chunk is present but the unit is the pixel. The + remark about inexact inch conversions applies here + as well, because a value in inches can't always be + converted to microns and back without some loss + of precision. + +For more information, see the +PNG specification for chunk contents. Be careful with trusting +rowbytes, as some of the transformations could increase the space +needed to hold a row (expand, filler, gray_to_rgb, etc.). +See png_read_update_info(), below. + +A quick word about text_ptr and num_text. PNG stores comments in +keyword/text pairs, one pair per chunk, with no limit on the number +of text chunks, and a 2^31 byte limit on their size. While there are +suggested keywords, there is no requirement to restrict the use to these +strings. It is strongly suggested that keywords and text be sensible +to humans (that's the point), so don't use abbreviations. Non-printing +symbols are not allowed. See the PNG specification for more details. +There is also no requirement to have text after the keyword. + +Keywords should be limited to 79 Latin-1 characters without leading or +trailing spaces, but non-consecutive spaces are allowed within the +keyword. It is possible to have the same keyword any number of times. +The text_ptr is an array of png_text structures, each holding a +pointer to a language string, a pointer to a keyword and a pointer to +a text string. The text string, language code, and translated +keyword may be empty or NULL pointers. The keyword/text +pairs are put into the array in the order that they are received. +However, some or all of the text chunks may be after the image, so, to +make sure you have read all the text chunks, don't mess with these +until after you read the stuff after the image. This will be +mentioned again below in the discussion that goes with png_read_end(). + +Input transformations + +After you've read the header information, you can set up the library +to handle any special transformations of the image data. The various +ways to transform the data will be described in the order that they +should occur. This is important, as some of these change the color +type and/or bit depth of the data, and some others only work on +certain color types and bit depths. + +Transformations you request are ignored if they don't have any meaning for a +particular input data format. However some transformations can have an effect +as a result of a previous transformation. If you specify a contradictory set of +transformations, for example both adding and removing the alpha channel, you +cannot predict the final result. + +The color used for the transparency values should be supplied in the same +format/depth as the current image data. It is stored in the same format/depth +as the image data in a tRNS chunk, so this is what libpng expects for this data. + +The color used for the background value depends on the need_expand argument as +described below. + +Data will be decoded into the supplied row buffers packed into bytes +unless the library has been told to transform it into another format. +For example, 4 bit/pixel paletted or grayscale data will be returned +2 pixels/byte with the leftmost pixel in the high-order bits of the +byte, unless png_set_packing() is called. 8-bit RGB data will be stored +in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha() +is called to insert filler bytes, either before or after each RGB triplet. +16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant +byte of the color value first, unless png_set_scale_16() is called to +transform it to regular RGB RGB triplets, or png_set_filler() or +png_set_add alpha() is called to insert filler bytes, either before or +after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can +be modified with png_set_filler(), png_set_add_alpha(), png_set_strip_16(), +or png_set_scale_16(). + +The following code transforms grayscale images of less than 8 to 8 bits, +changes paletted images to RGB, and adds a full alpha channel if there is +transparency information in a tRNS chunk. This is most useful on +grayscale images with bit depths of 2 or 4 or if there is a multiple-image +viewing application that wishes to treat all images in the same way. + + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_palette_to_rgb(png_ptr); + + if (png_get_valid(png_ptr, info_ptr, + PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); + + if (color_type == PNG_COLOR_TYPE_GRAY && + bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr); + +The first two functions are actually aliases for png_set_expand(), added +in libpng version 1.0.4, with the function names expanded to improve code +readability. In some future version they may actually do different +things. + +As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was +added. It expands the sample depth without changing tRNS to alpha. + +As of libpng version 1.5.2, png_set_expand_16() was added. It behaves as +png_set_expand(); however, the resultant channels have 16 bits rather than 8. +Use this when the output color or gray channels are made linear to avoid fairly +severe accuracy loss. + + if (bit_depth < 16) + png_set_expand_16(png_ptr); + +PNG can have files with 16 bits per channel. If you only can handle +8 bits per channel, this will strip the pixels down to 8-bit. + + if (bit_depth == 16) +#if PNG_LIBPNG_VER >= 10504 + png_set_scale_16(png_ptr); +#else + png_set_strip_16(png_ptr); +#endif + +(The more accurate "png_set_scale_16()" API became available in libpng version +1.5.4). + +If you need to process the alpha channel on the image separately from the image +data (for example if you convert it to a bitmap mask) it is possible to have +libpng strip the channel leaving just RGB or gray data: + + if (color_type & PNG_COLOR_MASK_ALPHA) + png_set_strip_alpha(png_ptr); + +If you strip the alpha channel you need to find some other way of dealing with +the information. If, instead, you want to convert the image to an opaque +version with no alpha channel use png_set_background; see below. + +As of libpng version 1.5.2, almost all useful expansions are supported, the +major ommissions are conversion of grayscale to indexed images (which can be +done trivially in the application) and conversion of indexed to grayscale (which +can be done by a trivial manipulation of the palette.) + +In the following table, the 01 means grayscale with depth<8, 31 means +indexed with depth<8, other numerals represent the color type, "T" means +the tRNS chunk is present, A means an alpha channel is present, and O +means tRNS or alpha is present but all pixels in the image are opaque. + + FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O + TO + 01 - [G] - - - - - - - - - - - - - + 31 [Q] Q [Q] [Q] [Q] Q Q Q Q Q Q [Q] [Q] Q Q + 0 1 G + . . G G G G G G B B GB GB + 0T lt Gt t + . Gt G G Gt G G Bt Bt GBt GBt + 0O lt Gt t . + Gt Gt G Gt Gt G Bt Bt GBt GBt + 2 C P C C C + . . C - - CB CB B B + 2T Ct - Ct C C t + t - - - CBt CBt Bt Bt + 2O Ct - Ct C C t t + - - - CBt CBt Bt Bt + 3 [Q] p [Q] [Q] [Q] Q Q Q + . . [Q] [Q] Q Q + 3T [Qt] p [Qt][Q] [Q] Qt Qt Qt t + t [Qt][Qt] Qt Qt + 3O [Qt] p [Qt][Q] [Q] Qt Qt Qt t t + [Qt][Qt] Qt Qt + 4A lA G A T T GA GT GT GA GT GT + BA G GBA + 4O lA GBA A T T GA GT GT GA GT GT BA + GBA G + 6A CA PA CA C C A T tT PA P P C CBA + BA + 6O CA PBA CA C C A tT T PA P P CBA C BA + + +Within the matrix, + "+" identifies entries where 'from' and 'to' are the same. + "-" means the transformation is not supported. + "." means nothing is necessary (a tRNS chunk can just be ignored). + "t" means the transformation is obtained by png_set_tRNS. + "A" means the transformation is obtained by png_set_add_alpha(). + "X" means the transformation is obtained by png_set_expand(). + "1" means the transformation is obtained by + png_set_expand_gray_1_2_4_to_8() (and by png_set_expand() + if there is no transparency in the original or the final + format). + "C" means the transformation is obtained by png_set_gray_to_rgb(). + "G" means the transformation is obtained by png_set_rgb_to_gray(). + "P" means the transformation is obtained by + png_set_expand_palette_to_rgb(). + "p" means the transformation is obtained by png_set_packing(). + "Q" means the transformation is obtained by png_set_quantize(). + "T" means the transformation is obtained by + png_set_tRNS_to_alpha(). + "B" means the transformation is obtained by + png_set_background(), or png_strip_alpha(). + +When an entry has multiple transforms listed all are required to cause the +right overall transformation. When two transforms are separated by a comma +either will do the job. When transforms are enclosed in [] the transform should +do the job but this is currently unimplemented - a different format will result +if the suggested transformations are used. + +In PNG files, the alpha channel in an image +is the level of opacity. If you need the alpha channel in an image to +be the level of transparency instead of opacity, you can invert the +alpha channel (or the tRNS chunk data) after it's read, so that 0 is +fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit +images) is fully transparent, with + + png_set_invert_alpha(png_ptr); + +PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as +they can, resulting in, for example, 8 pixels per byte for 1 bit +files. This code expands to 1 pixel per byte without changing the +values of the pixels: + + if (bit_depth < 8) + png_set_packing(png_ptr); + +PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels +stored in a PNG image have been "scaled" or "shifted" up to the next +higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] +to 8 bits/sample in the range [0, 255]). However, it is also possible +to convert the PNG pixel data back to the original bit depth of the +image. This call reduces the pixels back down to the original bit depth: + + png_color_8p sig_bit; + + if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) + png_set_shift(png_ptr, sig_bit); + +PNG files store 3-color pixels in red, green, blue order. This code +changes the storage of the pixels to blue, green, red: + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_bgr(png_ptr); + +PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them +into 4 or 8 bytes for windowing systems that need them in this format: + + if (color_type == PNG_COLOR_TYPE_RGB) + png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE); + +where "filler" is the 8 or 16-bit number to fill with, and the location is +either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether +you want the filler before the RGB or after. This transformation +does not affect images that already have full alpha channels. To add an +opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which +will generate RGBA pixels. + +Note that png_set_filler() does not change the color type. If you want +to do that, you can add a true alpha channel with + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_GRAY) + png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER); + +where "filler" contains the alpha value to assign to each pixel. +This function was added in libpng-1.2.7. + +If you are reading an image with an alpha channel, and you need the +data as ARGB instead of the normal PNG format RGBA: + + if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_swap_alpha(png_ptr); + +For some uses, you may want a grayscale image to be represented as +RGB. This code will do that conversion: + + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(png_ptr); + +Conversely, you can convert an RGB or RGBA image to grayscale or grayscale +with alpha. + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_rgb_to_gray(png_ptr, error_action, + double red_weight, double green_weight); + + error_action = 1: silently do the conversion + + error_action = 2: issue a warning if the original + image has any pixel where + red != green or red != blue + + error_action = 3: issue an error and abort the + conversion if the original + image has any pixel where + red != green or red != blue + + red_weight: weight of red component + + green_weight: weight of green component + If either weight is negative, default + weights are used. + +In the corresponding fixed point API the red_weight and green_weight values are +simply scaled by 100,000: + + png_set_rgb_to_gray(png_ptr, error_action, + png_fixed_point red_weight, + png_fixed_point green_weight); + +If you have set error_action = 1 or 2, you can +later check whether the image really was gray, after processing +the image rows, with the png_get_rgb_to_gray_status(png_ptr) function. +It will return a png_byte that is zero if the image was gray or +1 if there were any non-gray pixels. Background and sBIT data +will be silently converted to grayscale, using the green channel +data for sBIT, regardless of the error_action setting. + +The default values come from the PNG file cHRM chunk if present; otherwise, the +defaults correspond to the ITU-R recommendation 709, and also the sRGB color +space, as recommended in the Charles Poynton's Colour FAQ, +, in section 9: + + + + Y = 0.2126 * R + 0.7152 * G + 0.0722 * B + +Previous versions of this document, 1998 through 2002, recommended a slightly +different formula: + + Y = 0.212671 * R + 0.715160 * G + 0.072169 * B + +Libpng uses an integer approximation: + + Y = (6968 * R + 23434 * G + 2366 * B)/32768 + +The calculation is done in a linear colorspace, if the image gamma +can be determined. + +The png_set_background() function has been described already; it tells libpng to +composite images with alpha or simple transparency against the supplied +background color. For compatibility with versions of libpng earlier than +libpng-1.5.4 it is recommended that you call the function after reading the file +header, even if you don't want to use the color in a bKGD chunk, if one exists. + +If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), +you may use this color, or supply another color more suitable for +the current display (e.g., the background color from a web page). You +need to tell libpng how the color is represented, both the format of the +component values in the color (the number of bits) and the gamma encoding of the +color. The function takes two arguments, background_gamma_mode and need_expand +to convey this information; however, only two combinations are likely to be +useful: + + png_color_16 my_background; + png_color_16p image_background; + + if (png_get_bKGD(png_ptr, info_ptr, &image_background)) + png_set_background(png_ptr, image_background, + PNG_BACKGROUND_GAMMA_FILE, 1/*needs to be expanded*/, 1); + else + png_set_background(png_ptr, &my_background, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*do not expand*/, 1); + +The second call was described above - my_background is in the format of the +final, display, output produced by libpng. Because you now know the format of +the PNG it is possible to avoid the need to choose either 8-bit or 16-bit +output and to retain palette images (the palette colors will be modified +appropriately and the tRNS chunk removed.) However, if you are doing this, +take great care not to ask for transformations without checking first that +they apply! + +In the first call the background color has the original bit depth and color type +of the PNG file. So, for palette images the color is supplied as a palette +index and for low bit greyscale images the color is a reduced bit value in +image_background->gray. + +If you didn't call png_set_gamma() before reading the file header, for example +if you need your code to remain compatible with older versions of libpng prior +to libpng-1.5.4, this is the place to call it. + +Do not call it if you called png_set_alpha_mode(); doing so will damage the +settings put in place by png_set_alpha_mode(). (If png_set_alpha_mode() is +supported then you can certainly do png_set_gamma() before reading the PNG +header.) + +This API unconditionally sets the screen and file gamma values, so it will +override the value in the PNG file unless it is called before the PNG file +reading starts. For this reason you must always call it with the PNG file +value when you call it in this position: + + if (png_get_gAMA(png_ptr, info_ptr, &file_gamma)) + png_set_gamma(png_ptr, screen_gamma, file_gamma); + + else + png_set_gamma(png_ptr, screen_gamma, 0.45455); + +If you need to reduce an RGB file to a paletted file, or if a paletted +file has more entries then will fit on your screen, png_set_quantize() +will do that. Note that this is a simple match quantization that merely +finds the closest color available. This should work fairly well with +optimized palettes, but fairly badly with linear color cubes. If you +pass a palette that is larger than maximum_colors, the file will +reduce the number of colors in the palette so it will fit into +maximum_colors. If there is a histogram, libpng will use it to make +more intelligent choices when reducing the palette. If there is no +histogram, it may not do as good a job. + + if (color_type & PNG_COLOR_MASK_COLOR) + { + if (png_get_valid(png_ptr, info_ptr, + PNG_INFO_PLTE)) + { + png_uint_16p histogram = NULL; + + png_get_hIST(png_ptr, info_ptr, + &histogram); + png_set_quantize(png_ptr, palette, num_palette, + max_screen_colors, histogram, 1); + } + + else + { + png_color std_color_cube[MAX_SCREEN_COLORS] = + { ... colors ... }; + + png_set_quantize(png_ptr, std_color_cube, + MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, + NULL,0); + } + } + +PNG files describe monochrome as black being zero and white being one. +The following code will reverse this (make black be one and white be +zero): + + if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY) + png_set_invert_mono(png_ptr); + +This function can also be used to invert grayscale and gray-alpha images: + + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_invert_mono(png_ptr); + +PNG files store 16-bit pixels in network byte order (big-endian, +ie. most significant bits first). This code changes the storage to the +other way (little-endian, i.e. least significant bits first, the +way PCs store them): + + if (bit_depth == 16) + png_set_swap(png_ptr); + +If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you +need to change the order the pixels are packed into bytes, you can use: + + if (bit_depth < 8) + png_set_packswap(png_ptr); + +Finally, you can write your own transformation function if none of +the existing ones meets your needs. This is done by setting a callback +with + + png_set_read_user_transform_fn(png_ptr, + read_transform_fn); + +You must supply the function + + void read_transform_fn(png_structp png_ptr, png_row_infop + row_info, png_bytep data) + +See pngtest.c for a working example. Your function will be called +after all of the other transformations have been processed. Take care with +interlaced images if you do the interlace yourself - the width of the row is the +width in 'row_info', not the overall image width. + +If supported, libpng provides two information routines that you can use to find +where you are in processing the image: + + png_get_current_pass_number(png_structp png_ptr); + png_get_current_row_number(png_structp png_ptr); + +Don't try using these outside a transform callback - firstly they are only +supported if user transforms are supported, secondly they may well return +unexpected results unless the row is actually being processed at the moment they +are called. + +With interlaced +images the value returned is the row in the input sub-image image. Use +PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to +find the output pixel (x,y) given an interlaced sub-image pixel (row,col,pass). + +The discussion of interlace handling above contains more information on how to +use these values. + +You can also set up a pointer to a user structure for use by your +callback function, and you can inform libpng that your transform +function will change the number of channels or bit depth with the +function + + png_set_user_transform_info(png_ptr, user_ptr, + user_depth, user_channels); + +The user's application, not libpng, is responsible for allocating and +freeing any memory required for the user structure. + +You can retrieve the pointer via the function +png_get_user_transform_ptr(). For example: + + voidp read_user_transform_ptr = + png_get_user_transform_ptr(png_ptr); + +The last thing to handle is interlacing; this is covered in detail below, +but you must call the function here if you want libpng to handle expansion +of the interlaced image. + + number_of_passes = png_set_interlace_handling(png_ptr); + +After setting the transformations, libpng can update your png_info +structure to reflect any transformations you've requested with this +call. + + png_read_update_info(png_ptr, info_ptr); + +This is most useful to update the info structure's rowbytes +field so you can use it to allocate your image memory. This function +will also update your palette with the correct screen_gamma and +background if these have been given with the calls above. You may +only call png_read_update_info() once with a particular info_ptr. + +After you call png_read_update_info(), you can allocate any +memory you need to hold the image. The row data is simply +raw byte data for all forms of images. As the actual allocation +varies among applications, no example will be given. If you +are allocating one large chunk, you will need to build an +array of pointers to each row, as it will be needed for some +of the functions below. + +Remember: Before you call png_read_update_info(), the png_get_*() +functions return the values corresponding to the original PNG image. +After you call png_read_update_info the values refer to the image +that libpng will output. Consequently you must call all the png_set_ +functions before you call png_read_update_info(). This is particularly +important for png_set_interlace_handling() - if you are going to call +png_read_update_info() you must call png_set_interlace_handling() before +it unless you want to receive interlaced output. + +Reading image data + +After you've allocated memory, you can read the image data. +The simplest way to do this is in one function call. If you are +allocating enough memory to hold the whole image, you can just +call png_read_image() and libpng will read in all the image data +and put it in the memory area supplied. You will need to pass in +an array of pointers to each row. + +This function automatically handles interlacing, so you don't +need to call png_set_interlace_handling() (unless you call +png_read_update_info()) or call this function multiple times, or any +of that other stuff necessary with png_read_rows(). + + png_read_image(png_ptr, row_pointers); + +where row_pointers is: + + png_bytep row_pointers[height]; + +You can point to void or char or whatever you use for pixels. + +If you don't want to read in the whole image at once, you can +use png_read_rows() instead. If there is no interlacing (check +interlace_type == PNG_INTERLACE_NONE), this is simple: + + png_read_rows(png_ptr, row_pointers, NULL, + number_of_rows); + +where row_pointers is the same as in the png_read_image() call. + +If you are doing this just one row at a time, you can do this with +a single row_pointer instead of an array of row_pointers: + + png_bytep row_pointer = row; + png_read_row(png_ptr, row_pointer, NULL); + +If the file is interlaced (interlace_type != 0 in the IHDR chunk), things +get somewhat harder. The only current (PNG Specification version 1.2) +interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7); +a somewhat complicated 2D interlace scheme, known as Adam7, that +breaks down an image into seven smaller images of varying size, based +on an 8x8 grid. This number is defined (from libpng 1.5) as +PNG_INTERLACE_ADAM7_PASSES in png.h + +libpng can fill out those images or it can give them to you "as is". +It is almost always better to have libpng handle the interlacing for you. +If you want the images filled out, there are two ways to do that. The one +mentioned in the PNG specification is to expand each pixel to cover +those pixels that have not been read yet (the "rectangle" method). +This results in a blocky image for the first pass, which gradually +smooths out as more pixels are read. The other method is the "sparkle" +method, where pixels are drawn only in their final locations, with the +rest of the image remaining whatever colors they were initialized to +before the start of the read. The first method usually looks better, +but tends to be slower, as there are more pixels to put in the rows. + +If, as is likely, you want libpng to expand the images, call this before +calling png_start_read_image() or png_read_update_info(): + + if (interlace_type == PNG_INTERLACE_ADAM7) + number_of_passes + = png_set_interlace_handling(png_ptr); + +This will return the number of passes needed. Currently, this is seven, +but may change if another interlace type is added. This function can be +called even if the file is not interlaced, where it will return one pass. +You then need to read the whole image 'number_of_passes' times. Each time +will distribute the pixels from the current pass to the correct place in +the output image, so you need to supply the same rows to png_read_rows in +each pass. + +If you are not going to display the image after each pass, but are +going to wait until the entire image is read in, use the sparkle +effect. This effect is faster and the end result of either method +is exactly the same. If you are planning on displaying the image +after each pass, the "rectangle" effect is generally considered the +better looking one. + +If you only want the "sparkle" effect, just call png_read_rows() as +normal, with the third parameter NULL. Make sure you make pass over +the image number_of_passes times, and you don't change the data in the +rows between calls. You can change the locations of the data, just +not the data. Each pass only writes the pixels appropriate for that +pass, and assumes the data from previous passes is still valid. + + png_read_rows(png_ptr, row_pointers, NULL, + number_of_rows); + +If you only want the first effect (the rectangles), do the same as +before except pass the row buffer in the third parameter, and leave +the second parameter NULL. + + png_read_rows(png_ptr, NULL, row_pointers, + number_of_rows); + +If you don't want libpng to handle the interlacing details, just call +png_read_rows() PNG_INTERLACE_ADAM7_PASSES times to read in all the images. +Each of the images is a valid image by itself; however, you will almost +certainly need to distribute the pixels from each sub-image to the +correct place. This is where everything gets very tricky. + +If you want to retrieve the separate images you must pass the correct +number of rows to each successive call of png_read_rows(). The calculation +gets pretty complicated for small images, where some sub-images may +not even exist because either their width or height ends up zero. +libpng provides two macros to help you in 1.5 and later versions: + + png_uint_32 width = PNG_PASS_COLS(image_width, pass_number); + png_uint_32 height = PNG_PASS_ROWS(image_height, pass_number); + +Respectively these tell you the width and height of the sub-image +corresponding to the numbered pass. 'pass' is in in the range 0 to 6 - +this can be confusing because the specification refers to the same passes +as 1 to 7! Be careful, you must check both the width and height before +calling png_read_rows() and not call it for that pass if either is zero. + +You can, of course, read each sub-image row by row. If you want to +produce optimal code to make a pixel-by-pixel transformation of an +interlaced image this is the best approach; read each row of each pass, +transform it, and write it out to a new interlaced image. + +If you want to de-interlace the image yourself libpng provides further +macros to help that tell you where to place the pixels in the output image. +Because the interlacing scheme is rectangular - sub-image pixels are always +arranged on a rectangular grid - all you need to know for each pass is the +starting column and row in the output image of the first pixel plus the +spacing between each pixel. As of libpng 1.5 there are four macros to +retrieve this information: + + png_uint_32 x = PNG_PASS_START_COL(pass); + png_uint_32 y = PNG_PASS_START_ROW(pass); + png_uint_32 xStep = 1U << PNG_PASS_COL_SHIFT(pass); + png_uint_32 yStep = 1U << PNG_PASS_ROW_SHIFT(pass); + +These allow you to write the obvious loop: + + png_uint_32 input_y = 0; + png_uint_32 output_y = PNG_PASS_START_ROW(pass); + + while (output_y < output_image_height) + { + png_uint_32 input_x = 0; + png_uint_32 output_x = PNG_PASS_START_COL(pass); + + while (output_x < output_image_width) + { + image[output_y][output_x] = + subimage[pass][input_y][input_x++]; + + output_x += xStep; + } + + ++input_y; + output_y += yStep; + } + +Notice that the steps between successive output rows and columns are +returned as shifts. This is possible because the pixels in the subimages +are always a power of 2 apart - 1, 2, 4 or 8 pixels - in the original +image. In practice you may need to directly calculate the output coordinate +given an input coordinate. libpng provides two further macros for this +purpose: + + png_uint_32 output_x = PNG_COL_FROM_PASS_COL(input_x, pass); + png_uint_32 output_y = PNG_ROW_FROM_PASS_ROW(input_y, pass); + +Finally a pair of macros are provided to tell you if a particular image +row or column appears in a given pass: + + int col_in_pass = PNG_COL_IN_INTERLACE_PASS(output_x, pass); + int row_in_pass = PNG_ROW_IN_INTERLACE_PASS(output_y, pass); + +Bear in mind that you will probably also need to check the width and height +of the pass in addition to the above to be sure the pass even exists! + +With any luck you are convinced by now that you don't want to do your own +interlace handling. In reality normally the only good reason for doing this +is if you are processing PNG files on a pixel-by-pixel basis and don't want +to load the whole file into memory when it is interlaced. + +libpng includes a test program, pngvalid, that illustrates reading and +writing of interlaced images. If you can't get interlacing to work in your +code and don't want to leave it to libpng (the recommended approach), see +how pngvalid.c does it. + +Finishing a sequential read + +After you are finished reading the image through the +low-level interface, you can finish reading the file. If you are +interested in comments or time, which may be stored either before or +after the image data, you should pass the separate png_info struct if +you want to keep the comments from before and after the image +separate. + + png_infop end_info = png_create_info_struct(png_ptr); + + if (!end_info) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + png_read_end(png_ptr, end_info); + +If you are not interested, you should still call png_read_end() +but you can pass NULL, avoiding the need to create an end_info structure. + + png_read_end(png_ptr, (png_infop)NULL); + +If you don't call png_read_end(), then your file pointer will be +left pointing to the first chunk after the last IDAT, which is probably +not what you want if you expect to read something beyond the end of +the PNG datastream. + +When you are done, you can free all memory allocated by libpng like this: + + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); + +or, if you didn't create an end_info structure, + + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + +It is also possible to individually free the info_ptr members that +point to libpng-allocated storage with the following function: + + png_free_data(png_ptr, info_ptr, mask, seq) + + mask - identifies data to be freed, a mask + containing the bitwise OR of one or + more of + PNG_FREE_PLTE, PNG_FREE_TRNS, + PNG_FREE_HIST, PNG_FREE_ICCP, + PNG_FREE_PCAL, PNG_FREE_ROWS, + PNG_FREE_SCAL, PNG_FREE_SPLT, + PNG_FREE_TEXT, PNG_FREE_UNKN, + or simply PNG_FREE_ALL + + seq - sequence number of item to be freed + (-1 for all items) + +This function may be safely called when the relevant storage has +already been freed, or has not yet been allocated, or was allocated +by the user and not by libpng, and will in those cases do nothing. +The "seq" parameter is ignored if only one item of the selected data +type, such as PLTE, is allowed. If "seq" is not -1, and multiple items +are allowed for the data type identified in the mask, such as text or +sPLT, only the n'th item in the structure is freed, where n is "seq". + +The default behavior is only to free data that was allocated internally +by libpng. This can be changed, so that libpng will not free the data, +or so that it will free data that was allocated by the user with png_malloc() +or png_calloc() and passed in via a png_set_*() function, with + + png_data_freer(png_ptr, info_ptr, freer, mask) + + freer - one of + PNG_DESTROY_WILL_FREE_DATA + PNG_SET_WILL_FREE_DATA + PNG_USER_WILL_FREE_DATA + + mask - which data elements are affected + same choices as in png_free_data() + +This function only affects data that has already been allocated. +You can call this function after reading the PNG data but before calling +any png_set_*() functions, to control whether the user or the png_set_*() +function is responsible for freeing any existing data that might be present, +and again after the png_set_*() functions to control whether the user +or png_destroy_*() is supposed to free the data. When the user assumes +responsibility for libpng-allocated data, the application must use +png_free() to free it, and when the user transfers responsibility to libpng +for data that the user has allocated, the user must have used png_malloc() +or png_calloc() to allocate it. + +If you allocated your row_pointers in a single block, as suggested above in +the description of the high level read interface, you must not transfer +responsibility for freeing it to the png_set_rows or png_read_destroy function, +because they would also try to free the individual row_pointers[i]. + +If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword +separately, do not transfer responsibility for freeing text_ptr to libpng, +because when libpng fills a png_text structure it combines these members with +the key member, and png_free_data() will free only text_ptr.key. Similarly, +if you transfer responsibility for free'ing text_ptr from libpng to your +application, your application must not separately free those members. + +The png_free_data() function will turn off the "valid" flag for anything +it frees. If you need to turn the flag off for a chunk that was freed by +your application instead of by libpng, you can use + + png_set_invalid(png_ptr, info_ptr, mask); + + mask - identifies the chunks to be made invalid, + containing the bitwise OR of one or + more of + PNG_INFO_gAMA, PNG_INFO_sBIT, + PNG_INFO_cHRM, PNG_INFO_PLTE, + PNG_INFO_tRNS, PNG_INFO_bKGD, + PNG_INFO_hIST, PNG_INFO_pHYs, + PNG_INFO_oFFs, PNG_INFO_tIME, + PNG_INFO_pCAL, PNG_INFO_sRGB, + PNG_INFO_iCCP, PNG_INFO_sPLT, + PNG_INFO_sCAL, PNG_INFO_IDAT + +For a more compact example of reading a PNG image, see the file example.c. + +Reading PNG files progressively + +The progressive reader is slightly different then the non-progressive +reader. Instead of calling png_read_info(), png_read_rows(), and +png_read_end(), you make one call to png_process_data(), which calls +callbacks when it has the info, a row, or the end of the image. You +set up these callbacks with png_set_progressive_read_fn(). You don't +have to worry about the input/output functions of libpng, as you are +giving the library the data directly in png_process_data(). I will +assume that you have read the section on reading PNG files above, +so I will only highlight the differences (although I will show +all of the code). + +png_structp png_ptr; +png_infop info_ptr; + + /* An example code fragment of how you would + initialize the progressive reader in your + application. */ + int + initialize_png_reader() + { + png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + + if (!png_ptr) + return (ERROR); + + info_ptr = png_create_info_struct(png_ptr); + + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); + return (ERROR); + } + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + /* This one's new. You can provide functions + to be called when the header info is valid, + when each row is completed, and when the image + is finished. If you aren't using all functions, + you can specify NULL parameters. Even when all + three functions are NULL, you need to call + png_set_progressive_read_fn(). You can use + any struct as the user_ptr (cast to a void pointer + for the function call), and retrieve the pointer + from inside the callbacks using the function + + png_get_progressive_ptr(png_ptr); + + which will return a void pointer, which you have + to cast appropriately. + */ + png_set_progressive_read_fn(png_ptr, (void *)user_ptr, + info_callback, row_callback, end_callback); + + return 0; + } + + /* A code fragment that you call as you receive blocks + of data */ + int + process_data(png_bytep buffer, png_uint_32 length) + { + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + /* This one's new also. Simply give it a chunk + of data from the file stream (in order, of + course). On machines with segmented memory + models machines, don't give it any more than + 64K. The library seems to run fine with sizes + of 4K. Although you can give it much less if + necessary (I assume you can give it chunks of + 1 byte, I haven't tried less then 256 bytes + yet). When this function returns, you may + want to display any rows that were generated + in the row callback if you don't already do + so there. + */ + png_process_data(png_ptr, info_ptr, buffer, length); + + /* At this point you can call png_process_data_skip if + you want to handle data the library will skip yourself; + it simply returns the number of bytes to skip (and stops + libpng skipping that number of bytes on the next + png_process_data call). + return 0; + } + + /* This function is called (as set by + png_set_progressive_read_fn() above) when enough data + has been supplied so all of the header has been + read. + */ + void + info_callback(png_structp png_ptr, png_infop info) + { + /* Do any setup here, including setting any of + the transformations mentioned in the Reading + PNG files section. For now, you _must_ call + either png_start_read_image() or + png_read_update_info() after all the + transformations are set (even if you don't set + any). You may start getting rows before + png_process_data() returns, so this is your + last chance to prepare for that. + + This is where you turn on interlace handling, + assuming you don't want to do it yourself. + + If you need to you can stop the processing of + your original input data at this point by calling + png_process_data_pause. This returns the number + of unprocessed bytes from the last png_process_data + call - it is up to you to ensure that the next call + sees these bytes again. If you don't want to bother + with this you can get libpng to cache the unread + bytes by setting the 'save' parameter (see png.h) but + then libpng will have to copy the data internally. + */ + } + + /* This function is called when each row of image + data is complete */ + void + row_callback(png_structp png_ptr, png_bytep new_row, + png_uint_32 row_num, int pass) + { + /* If the image is interlaced, and you turned + on the interlace handler, this function will + be called for every row in every pass. Some + of these rows will not be changed from the + previous pass. When the row is not changed, + the new_row variable will be NULL. The rows + and passes are called in order, so you don't + really need the row_num and pass, but I'm + supplying them because it may make your life + easier. + + If you did not turn on interlace handling then + the callback is called for each row of each + sub-image when the image is interlaced. In this + case 'row_num' is the row in the sub-image, not + the row in the output image as it is in all other + cases. + + For the non-NULL rows of interlaced images when + you have switched on libpng interlace handling, + you must call png_progressive_combine_row() + passing in the row and the old row. You can + call this function for NULL rows (it will just + return) and for non-interlaced images (it just + does the memcpy for you) if it will make the + code easier. Thus, you can just do this for + all cases if you switch on interlace handling; + */ + + png_progressive_combine_row(png_ptr, old_row, + new_row); + + /* where old_row is what was displayed for + previously for the row. Note that the first + pass (pass == 0, really) will completely cover + the old row, so the rows do not have to be + initialized. After the first pass (and only + for interlaced images), you will have to pass + the current row, and the function will combine + the old row and the new row. + + You can also call png_process_data_pause in this + callback - see above. + */ + } + + void + end_callback(png_structp png_ptr, png_infop info) + { + /* This function is called after the whole image + has been read, including any chunks after the + image (up to and including the IEND). You + will usually have the same info chunk as you + had in the header, although some data may have + been added to the comments and time fields. + + Most people won't do much here, perhaps setting + a flag that marks the image as finished. + */ + } + + + +IV. Writing + +Much of this is very similar to reading. However, everything of +importance is repeated here, so you won't have to constantly look +back up in the reading section to understand writing. + +Setup + +You will want to do the I/O initialization before you get into libpng, +so if it doesn't work, you don't have anything to undo. If you are not +using the standard I/O functions, you will need to replace them with +custom writing functions. See the discussion under Customizing libpng. + + FILE *fp = fopen(file_name, "wb"); + + if (!fp) + return (ERROR); + +Next, png_struct and png_info need to be allocated and initialized. +As these can be both relatively large, you may not want to store these +on the stack, unless you have stack space to spare. Of course, you +will want to check if they return NULL. If you are also reading, +you won't want to name your read structure and your write structure +both "png_ptr"; you can call them anything you like, such as +"read_ptr" and "write_ptr". Look at pngtest.c, for example. + + png_structp png_ptr = png_create_write_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + + if (!png_ptr) + return (ERROR); + + png_infop info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_write_struct(&png_ptr, + (png_infopp)NULL); + return (ERROR); + } + +If you want to use your own memory allocation routines, +define PNG_USER_MEM_SUPPORTED and use +png_create_write_struct_2() instead of png_create_write_struct(): + + png_structp png_ptr = png_create_write_struct_2 + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn, (png_voidp) + user_mem_ptr, user_malloc_fn, user_free_fn); + +After you have these structures, you will need to set up the +error handling. When libpng encounters an error, it expects to +longjmp() back to your routine. Therefore, you will need to call +setjmp() and pass the png_jmpbuf(png_ptr). If you +write the file from different routines, you will need to update +the png_jmpbuf(png_ptr) every time you enter a new routine that will +call a png_*() function. See your documentation of setjmp/longjmp +for your compiler for more information on setjmp/longjmp. See +the discussion on libpng error handling in the Customizing Libpng +section below for more information on the libpng error handling. + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_write_struct(&png_ptr, &info_ptr); + fclose(fp); + return (ERROR); + } + ... + return; + +If you would rather avoid the complexity of setjmp/longjmp issues, +you can compile libpng with PNG_NO_SETJMP, in which case +errors will result in a call to PNG_ABORT() which defaults to abort(). + +You can #define PNG_ABORT() to a function that does something +more useful than abort(), as long as your function does not +return. + +Checking for invalid palette index on write was added at libpng +1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues +a benign error. This is enabled by default because this condition is an +error according to the PNG specification, Clause 11.3.2, but the error can +be ignored in each png_ptr with + + png_set_check_for_invalid_index(png_ptr, 0); + +If the error is ignored, or if png_benign_error() treats it as a warning, +any invalid pixels are written as-is by the encoder, resulting in an +invalid PNG datastream as output. In this case the application is +responsible for ensuring that the pixel indexes are in range when it writes +a PLTE chunk with fewer entries than the bit depth would allow. + +Now you need to set up the output code. The default for libpng is to +use the C function fwrite(). If you use this, you will need to pass a +valid FILE * in the function png_init_io(). Be sure that the file is +opened in binary mode. Again, if you wish to handle writing data in +another way, see the discussion on libpng I/O handling in the Customizing +Libpng section below. + + png_init_io(png_ptr, fp); + +If you are embedding your PNG into a datastream such as MNG, and don't +want libpng to write the 8-byte signature, or if you have already +written the signature in your application, use + + png_set_sig_bytes(png_ptr, 8); + +to inform libpng that it should not write a signature. + +Write callbacks + +At this point, you can set up a callback function that will be +called after each row has been written, which you can use to control +a progress meter or the like. It's demonstrated in pngtest.c. +You must supply a function + + void write_row_callback(png_structp png_ptr, png_uint_32 row, + int pass); + { + /* put your code here */ + } + +(You can give it another name that you like instead of "write_row_callback") + +To inform libpng about your function, use + + png_set_write_status_fn(png_ptr, write_row_callback); + +When this function is called the row has already been completely processed and +it has also been written out. The 'row' and 'pass' refer to the next row to be +handled. For the +non-interlaced case the row that was just handled is simply one less than the +passed in row number, and pass will always be 0. For the interlaced case the +same applies unless the row value is 0, in which case the row just handled was +the last one from one of the preceding passes. Because interlacing may skip a +pass you cannot be sure that the preceding pass is just 'pass-1', if you really +need to know what the last pass is record (row,pass) from the callback and use +the last recorded value each time. + +As with the user transform you can find the output row using the +PNG_ROW_FROM_PASS_ROW macro. + +You now have the option of modifying how the compression library will +run. The following functions are mainly for testing, but may be useful +in some cases, like if you need to write PNG files extremely fast and +are willing to give up some compression, or if you want to get the +maximum possible compression at the expense of slower writing. If you +have no special needs in this area, let the library do what it wants by +not calling this function at all, as it has been tuned to deliver a good +speed/compression ratio. The second parameter to png_set_filter() is +the filter method, for which the only valid values are 0 (as of the +July 1999 PNG specification, version 1.2) or 64 (if you are writing +a PNG datastream that is to be embedded in a MNG datastream). The third +parameter is a flag that indicates which filter type(s) are to be tested +for each scanline. See the PNG specification for details on the specific +filter types. + + + /* turn on or off filtering, and/or choose + specific filters. You can use either a single + PNG_FILTER_VALUE_NAME or the bitwise OR of one + or more PNG_FILTER_NAME masks. + */ + png_set_filter(png_ptr, 0, + PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | + PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | + PNG_FILTER_UP | PNG_FILTER_VALUE_UP | + PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | + PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| + PNG_ALL_FILTERS); + +If an application wants to start and stop using particular filters during +compression, it should start out with all of the filters (to ensure that +the previous row of pixels will be stored in case it's needed later), +and then add and remove them after the start of compression. + +If you are writing a PNG datastream that is to be embedded in a MNG +datastream, the second parameter can be either 0 or 64. + +The png_set_compression_*() functions interface to the zlib compression +library, and should mostly be ignored unless you really know what you are +doing. The only generally useful call is png_set_compression_level() +which changes how much time zlib spends on trying to compress the image +data. See the Compression Library (zlib.h and algorithm.txt, distributed +with zlib) for details on the compression levels. + + #include zlib.h + + /* Set the zlib compression level */ + png_set_compression_level(png_ptr, + Z_BEST_COMPRESSION); + + /* Set other zlib parameters for compressing IDAT */ + png_set_compression_mem_level(png_ptr, 8); + png_set_compression_strategy(png_ptr, + Z_DEFAULT_STRATEGY); + png_set_compression_window_bits(png_ptr, 15); + png_set_compression_method(png_ptr, 8); + png_set_compression_buffer_size(png_ptr, 8192) + + /* Set zlib parameters for text compression + * If you don't call these, the parameters + * fall back on those defined for IDAT chunks + */ + png_set_text_compression_mem_level(png_ptr, 8); + png_set_text_compression_strategy(png_ptr, + Z_DEFAULT_STRATEGY); + png_set_text_compression_window_bits(png_ptr, 15); + png_set_text_compression_method(png_ptr, 8); + +Setting the contents of info for output + +You now need to fill in the png_info structure with all the data you +wish to write before the actual image. Note that the only thing you +are allowed to write after the image is the text chunks and the time +chunk (as of PNG Specification 1.2, anyway). See png_write_end() and +the latest PNG specification for more information on that. If you +wish to write them before the image, fill them in now, and flag that +data as being valid. If you want to wait until after the data, don't +fill them until png_write_end(). For all the fields in png_info and +their data types, see png.h. For explanations of what the fields +contain, see the PNG specification. + +Some of the more important parts of the png_info are: + + png_set_IHDR(png_ptr, info_ptr, width, height, + bit_depth, color_type, interlace_type, + compression_type, filter_method) + + width - holds the width of the image + in pixels (up to 2^31). + + height - holds the height of the image + in pixels (up to 2^31). + + bit_depth - holds the bit depth of one of the + image channels. + (valid values are 1, 2, 4, 8, 16 + and depend also on the + color_type. See also significant + bits (sBIT) below). + + color_type - describes which color/alpha + channels are present. + PNG_COLOR_TYPE_GRAY + (bit depths 1, 2, 4, 8, 16) + PNG_COLOR_TYPE_GRAY_ALPHA + (bit depths 8, 16) + PNG_COLOR_TYPE_PALETTE + (bit depths 1, 2, 4, 8) + PNG_COLOR_TYPE_RGB + (bit_depths 8, 16) + PNG_COLOR_TYPE_RGB_ALPHA + (bit_depths 8, 16) + + PNG_COLOR_MASK_PALETTE + PNG_COLOR_MASK_COLOR + PNG_COLOR_MASK_ALPHA + + interlace_type - PNG_INTERLACE_NONE or + PNG_INTERLACE_ADAM7 + + compression_type - (must be + PNG_COMPRESSION_TYPE_DEFAULT) + + filter_method - (must be PNG_FILTER_TYPE_DEFAULT + or, if you are writing a PNG to + be embedded in a MNG datastream, + can also be + PNG_INTRAPIXEL_DIFFERENCING) + +If you call png_set_IHDR(), the call must appear before any of the +other png_set_*() functions, because they might require access to some of +the IHDR settings. The remaining png_set_*() functions can be called +in any order. + +If you wish, you can reset the compression_type, interlace_type, or +filter_method later by calling png_set_IHDR() again; if you do this, the +width, height, bit_depth, and color_type must be the same in each call. + + png_set_PLTE(png_ptr, info_ptr, palette, + num_palette); + + palette - the palette for the file + (array of png_color) + num_palette - number of entries in the palette + + png_set_gAMA(png_ptr, info_ptr, file_gamma); + png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma); + + file_gamma - the gamma at which the image was + created (PNG_INFO_gAMA) + + int_file_gamma - 100,000 times the gamma at which + the image was created + + png_set_cHRM(png_ptr, info_ptr, white_x, white_y, red_x, red_y, + green_x, green_y, blue_x, blue_y) + png_set_cHRM_XYZ(png_ptr, info_ptr, red_X, red_Y, red_Z, green_X, + green_Y, green_Z, blue_X, blue_Y, blue_Z) + png_set_cHRM_fixed(png_ptr, info_ptr, int_white_x, int_white_y, + int_red_x, int_red_y, int_green_x, int_green_y, + int_blue_x, int_blue_y) + png_set_cHRM_XYZ_fixed(png_ptr, info_ptr, int_red_X, int_red_Y, + int_red_Z, int_green_X, int_green_Y, int_green_Z, + int_blue_X, int_blue_Y, int_blue_Z) + + {white,red,green,blue}_{x,y} + A color space encoding specified using the chromaticities + of the end points and the white point. + + {red,green,blue}_{X,Y,Z} + A color space encoding specified using the encoding end + points - the CIE tristimulus specification of the intended + color of the red, green and blue channels in the PNG RGB + data. The white point is simply the sum of the three end + points. + + png_set_sRGB(png_ptr, info_ptr, srgb_intent); + + srgb_intent - the rendering intent + (PNG_INFO_sRGB) The presence of + the sRGB chunk means that the pixel + data is in the sRGB color space. + This chunk also implies specific + values of gAMA and cHRM. Rendering + intent is the CSS-1 property that + has been defined by the International + Color Consortium + (http://www.color.org). + It can be one of + PNG_sRGB_INTENT_SATURATION, + PNG_sRGB_INTENT_PERCEPTUAL, + PNG_sRGB_INTENT_ABSOLUTE, or + PNG_sRGB_INTENT_RELATIVE. + + + png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, + srgb_intent); + + srgb_intent - the rendering intent + (PNG_INFO_sRGB) The presence of the + sRGB chunk means that the pixel + data is in the sRGB color space. + This function also causes gAMA and + cHRM chunks with the specific values + that are consistent with sRGB to be + written. + + png_set_iCCP(png_ptr, info_ptr, name, compression_type, + profile, proflen); + + name - The profile name. + + compression_type - The compression type; always + PNG_COMPRESSION_TYPE_BASE for PNG 1.0. + You may give NULL to this argument to + ignore it. + + profile - International Color Consortium color + profile data. May contain NULs. + + proflen - length of profile data in bytes. + + png_set_sBIT(png_ptr, info_ptr, sig_bit); + + sig_bit - the number of significant bits for + (PNG_INFO_sBIT) each of the gray, red, + green, and blue channels, whichever are + appropriate for the given color type + (png_color_16) + + png_set_tRNS(png_ptr, info_ptr, trans_alpha, + num_trans, trans_color); + + trans_alpha - array of alpha (transparency) + entries for palette (PNG_INFO_tRNS) + + num_trans - number of transparent entries + (PNG_INFO_tRNS) + + trans_color - graylevel or color sample values + (in order red, green, blue) of the + single transparent color for + non-paletted images (PNG_INFO_tRNS) + + png_set_hIST(png_ptr, info_ptr, hist); + + hist - histogram of palette (array of + png_uint_16) (PNG_INFO_hIST) + + png_set_tIME(png_ptr, info_ptr, mod_time); + + mod_time - time image was last modified + (PNG_VALID_tIME) + + png_set_bKGD(png_ptr, info_ptr, background); + + background - background color (of type + png_color_16p) (PNG_VALID_bKGD) + + png_set_text(png_ptr, info_ptr, text_ptr, num_text); + + text_ptr - array of png_text holding image + comments + + text_ptr[i].compression - type of compression used + on "text" PNG_TEXT_COMPRESSION_NONE + PNG_TEXT_COMPRESSION_zTXt + PNG_ITXT_COMPRESSION_NONE + PNG_ITXT_COMPRESSION_zTXt + text_ptr[i].key - keyword for comment. Must contain + 1-79 characters. + text_ptr[i].text - text comments for current + keyword. Can be NULL or empty. + text_ptr[i].text_length - length of text string, + after decompression, 0 for iTXt + text_ptr[i].itxt_length - length of itxt string, + after decompression, 0 for tEXt/zTXt + text_ptr[i].lang - language of comment (NULL or + empty for unknown). + text_ptr[i].translated_keyword - keyword in UTF-8 (NULL + or empty for unknown). + + Note that the itxt_length, lang, and lang_key + members of the text_ptr structure only exist when the + library is built with iTXt chunk support. Prior to + libpng-1.4.0 the library was built by default without + iTXt support. Also note that when iTXt is supported, + they contain NULL pointers when the "compression" + field contains PNG_TEXT_COMPRESSION_NONE or + PNG_TEXT_COMPRESSION_zTXt. + + num_text - number of comments + + png_set_sPLT(png_ptr, info_ptr, &palette_ptr, + num_spalettes); + + palette_ptr - array of png_sPLT_struct structures + to be added to the list of palettes + in the info structure. + num_spalettes - number of palette structures to be + added. + + png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, + unit_type); + + offset_x - positive offset from the left + edge of the screen + + offset_y - positive offset from the top + edge of the screen + + unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER + + png_set_pHYs(png_ptr, info_ptr, res_x, res_y, + unit_type); + + res_x - pixels/unit physical resolution + in x direction + + res_y - pixels/unit physical resolution + in y direction + + unit_type - PNG_RESOLUTION_UNKNOWN, + PNG_RESOLUTION_METER + + png_set_sCAL(png_ptr, info_ptr, unit, width, height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + + height - height of a pixel in physical scale units + (width and height are doubles) + + png_set_sCAL_s(png_ptr, info_ptr, unit, width, height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + expressed as a string + + height - height of a pixel in physical scale units + (width and height are strings like "2.54") + + png_set_unknown_chunks(png_ptr, info_ptr, &unknowns, + num_unknowns) + + unknowns - array of png_unknown_chunk + structures holding unknown chunks + unknowns[i].name - name of unknown chunk + unknowns[i].data - data of unknown chunk + unknowns[i].size - size of unknown chunk's data + unknowns[i].location - position to write chunk in file + 0: do not write chunk + PNG_HAVE_IHDR: before PLTE + PNG_HAVE_PLTE: before IDAT + PNG_AFTER_IDAT: after IDAT + +The "location" member is set automatically according to +what part of the output file has already been written. +You can change its value after calling png_set_unknown_chunks() +as demonstrated in pngtest.c. Within each of the "locations", +the chunks are sequenced according to their position in the +structure (that is, the value of "i", which is the order in which +the chunk was either read from the input file or defined with +png_set_unknown_chunks). + +A quick word about text and num_text. text is an array of png_text +structures. num_text is the number of valid structures in the array. +Each png_text structure holds a language code, a keyword, a text value, +and a compression type. + +The compression types have the same valid numbers as the compression +types of the image data. Currently, the only valid number is zero. +However, you can store text either compressed or uncompressed, unlike +images, which always have to be compressed. So if you don't want the +text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE. +Because tEXt and zTXt chunks don't have a language field, if you +specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt +any language code or translated keyword will not be written out. + +Until text gets around a few hundred bytes, it is not worth compressing it. +After the text has been written out to the file, the compression type +is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR, +so that it isn't written out again at the end (in case you are calling +png_write_end() with the same struct). + +The keywords that are given in the PNG Specification are: + + Title Short (one line) title or + caption for image + + Author Name of image's creator + + Description Description of image (possibly long) + + Copyright Copyright notice + + Creation Time Time of original image creation + (usually RFC 1123 format, see below) + + Software Software used to create the image + + Disclaimer Legal disclaimer + + Warning Warning of nature of content + + Source Device used to create the image + + Comment Miscellaneous comment; conversion + from other image format + +The keyword-text pairs work like this. Keywords should be short +simple descriptions of what the comment is about. Some typical +keywords are found in the PNG specification, as is some recommendations +on keywords. You can repeat keywords in a file. You can even write +some text before the image and some after. For example, you may want +to put a description of the image before the image, but leave the +disclaimer until after, so viewers working over modem connections +don't have to wait for the disclaimer to go over the modem before +they start seeing the image. Finally, keywords should be full +words, not abbreviations. Keywords and text are in the ISO 8859-1 +(Latin-1) character set (a superset of regular ASCII) and can not +contain NUL characters, and should not contain control or other +unprintable characters. To make the comments widely readable, stick +with basic ASCII, and avoid machine specific character set extensions +like the IBM-PC character set. The keyword must be present, but +you can leave off the text string on non-compressed pairs. +Compressed pairs must have a text string, as only the text string +is compressed anyway, so the compression would be meaningless. + +PNG supports modification time via the png_time structure. Two +conversion routines are provided, png_convert_from_time_t() for +time_t and png_convert_from_struct_tm() for struct tm. The +time_t routine uses gmtime(). You don't have to use either of +these, but if you wish to fill in the png_time structure directly, +you should provide the time in universal time (GMT) if possible +instead of your local time. Note that the year number is the full +year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and +that months start with 1. + +If you want to store the time of the original image creation, you should +use a plain tEXt chunk with the "Creation Time" keyword. This is +necessary because the "creation time" of a PNG image is somewhat vague, +depending on whether you mean the PNG file, the time the image was +created in a non-PNG format, a still photo from which the image was +scanned, or possibly the subject matter itself. In order to facilitate +machine-readable dates, it is recommended that the "Creation Time" +tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"), +although this isn't a requirement. Unlike the tIME chunk, the +"Creation Time" tEXt chunk is not expected to be automatically changed +by the software. To facilitate the use of RFC 1123 dates, a function +png_convert_to_rfc1123_buffer(png_ptr, buffer, png_timep) is provided to +convert from PNG time to an RFC 1123 format string. The caller must provide +a writeable buffer of at least 29 bytes. + +Writing unknown chunks + +You can use the png_set_unknown_chunks function to queue up chunks +for writing. You give it a chunk name, raw data, and a size; that's +all there is to it. The chunks will be written by the next following +png_write_info_before_PLTE, png_write_info, or png_write_end function. +Any chunks previously read into the info structure's unknown-chunk +list will also be written out in a sequence that satisfies the PNG +specification's ordering rules. + +The high-level write interface + +At this point there are two ways to proceed; through the high-level +write interface, or through a sequence of low-level write operations. +You can use the high-level interface if your image data is present +in the info structure. All defined output +transformations are permitted, enabled by the following masks. + + PNG_TRANSFORM_IDENTITY No transformation + PNG_TRANSFORM_PACKING Pack 1, 2 and 4-bit samples + PNG_TRANSFORM_PACKSWAP Change order of packed + pixels to LSB first + PNG_TRANSFORM_INVERT_MONO Invert monochrome images + PNG_TRANSFORM_SHIFT Normalize pixels to the + sBIT depth + PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA + to BGRA + PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA + to AG + PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity + to transparency + PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + PNG_TRANSFORM_STRIP_FILLER Strip out filler + bytes (deprecated). + PNG_TRANSFORM_STRIP_FILLER_BEFORE Strip out leading + filler bytes + PNG_TRANSFORM_STRIP_FILLER_AFTER Strip out trailing + filler bytes + +If you have valid image data in the info structure (you can use +png_set_rows() to put image data in the info structure), simply do this: + + png_write_png(png_ptr, info_ptr, png_transforms, NULL) + +where png_transforms is an integer containing the bitwise OR of some set of +transformation flags. This call is equivalent to png_write_info(), +followed the set of transformations indicated by the transform mask, +then png_write_image(), and finally png_write_end(). + +(The final parameter of this call is not yet used. Someday it might point +to transformation parameters required by some future output transform.) + +You must use png_transforms and not call any png_set_transform() functions +when you use png_write_png(). + +The low-level write interface + +If you are going the low-level route instead, you are now ready to +write all the file information up to the actual image data. You do +this with a call to png_write_info(). + + png_write_info(png_ptr, info_ptr); + +Note that there is one transformation you may need to do before +png_write_info(). In PNG files, the alpha channel in an image is the +level of opacity. If your data is supplied as a level of transparency, +you can invert the alpha channel before you write it, so that 0 is +fully transparent and 255 (in 8-bit or paletted images) or 65535 +(in 16-bit images) is fully opaque, with + + png_set_invert_alpha(png_ptr); + +This must appear before png_write_info() instead of later with the +other transformations because in the case of paletted images the tRNS +chunk data has to be inverted before the tRNS chunk is written. If +your image is not a paletted image, the tRNS data (which in such cases +represents a single color to be rendered as transparent) won't need to +be changed, and you can safely do this transformation after your +png_write_info() call. + +If you need to write a private chunk that you want to appear before +the PLTE chunk when PLTE is present, you can write the PNG info in +two steps, and insert code to write your own chunk between them: + + png_write_info_before_PLTE(png_ptr, info_ptr); + png_set_unknown_chunks(png_ptr, info_ptr, ...); + png_write_info(png_ptr, info_ptr); + +After you've written the file information, you can set up the library +to handle any special transformations of the image data. The various +ways to transform the data will be described in the order that they +should occur. This is important, as some of these change the color +type and/or bit depth of the data, and some others only work on +certain color types and bit depths. Even though each transformation +checks to see if it has data that it can do something with, you should +make sure to only enable a transformation if it will be valid for the +data. For example, don't swap red and blue on grayscale data. + +PNG files store RGB pixels packed into 3 or 6 bytes. This code tells +the library to strip input data that has 4 or 8 bytes per pixel down +to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2 +bytes per pixel). + + png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); + +where the 0 is unused, and the location is either PNG_FILLER_BEFORE or +PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel +is stored XRGB or RGBX. + +PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as +they can, resulting in, for example, 8 pixels per byte for 1 bit files. +If the data is supplied at 1 pixel per byte, use this code, which will +correctly pack the pixels into a single byte: + + png_set_packing(png_ptr); + +PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your +data is of another bit depth, you can write an sBIT chunk into the +file so that decoders can recover the original data if desired. + + /* Set the true bit depth of the image data */ + if (color_type & PNG_COLOR_MASK_COLOR) + { + sig_bit.red = true_bit_depth; + sig_bit.green = true_bit_depth; + sig_bit.blue = true_bit_depth; + } + + else + { + sig_bit.gray = true_bit_depth; + } + + if (color_type & PNG_COLOR_MASK_ALPHA) + { + sig_bit.alpha = true_bit_depth; + } + + png_set_sBIT(png_ptr, info_ptr, &sig_bit); + +If the data is stored in the row buffer in a bit depth other than +one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG), +this will scale the values to appear to be the correct bit depth as +is required by PNG. + + png_set_shift(png_ptr, &sig_bit); + +PNG files store 16-bit pixels in network byte order (big-endian, +ie. most significant bits first). This code would be used if they are +supplied the other way (little-endian, i.e. least significant bits +first, the way PCs store them): + + if (bit_depth > 8) + png_set_swap(png_ptr); + +If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you +need to change the order the pixels are packed into bytes, you can use: + + if (bit_depth < 8) + png_set_packswap(png_ptr); + +PNG files store 3 color pixels in red, green, blue order. This code +would be used if they are supplied as blue, green, red: + + png_set_bgr(png_ptr); + +PNG files describe monochrome as black being zero and white being +one. This code would be used if the pixels are supplied with this reversed +(black being one and white being zero): + + png_set_invert_mono(png_ptr); + +Finally, you can write your own transformation function if none of +the existing ones meets your needs. This is done by setting a callback +with + + png_set_write_user_transform_fn(png_ptr, + write_transform_fn); + +You must supply the function + + void write_transform_fn(png_structp png_ptr, png_row_infop + row_info, png_bytep data) + +See pngtest.c for a working example. Your function will be called +before any of the other transformations are processed. If supported +libpng also supplies an information routine that may be called from +your callback: + + png_get_current_row_number(png_ptr); + png_get_current_pass_number(png_ptr); + +This returns the current row passed to the transform. With interlaced +images the value returned is the row in the input sub-image image. Use +PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to +find the output pixel (x,y) given an interlaced sub-image pixel (row,col,pass). + +The discussion of interlace handling above contains more information on how to +use these values. + +You can also set up a pointer to a user structure for use by your +callback function. + + png_set_user_transform_info(png_ptr, user_ptr, 0, 0); + +The user_channels and user_depth parameters of this function are ignored +when writing; you can set them to zero as shown. + +You can retrieve the pointer via the function png_get_user_transform_ptr(). +For example: + + voidp write_user_transform_ptr = + png_get_user_transform_ptr(png_ptr); + +It is possible to have libpng flush any pending output, either manually, +or automatically after a certain number of lines have been written. To +flush the output stream a single time call: + + png_write_flush(png_ptr); + +and to have libpng flush the output stream periodically after a certain +number of scanlines have been written, call: + + png_set_flush(png_ptr, nrows); + +Note that the distance between rows is from the last time png_write_flush() +was called, or the first row of the image if it has never been called. +So if you write 50 lines, and then png_set_flush 25, it will flush the +output on the next scanline, and every 25 lines thereafter, unless +png_write_flush() is called before 25 more lines have been written. +If nrows is too small (less than about 10 lines for a 640 pixel wide +RGB image) the image compression may decrease noticeably (although this +may be acceptable for real-time applications). Infrequent flushing will +only degrade the compression performance by a few percent over images +that do not use flushing. + +Writing the image data + +That's it for the transformations. Now you can write the image data. +The simplest way to do this is in one function call. If you have the +whole image in memory, you can just call png_write_image() and libpng +will write the image. You will need to pass in an array of pointers to +each row. This function automatically handles interlacing, so you don't +need to call png_set_interlace_handling() or call this function multiple +times, or any of that other stuff necessary with png_write_rows(). + + png_write_image(png_ptr, row_pointers); + +where row_pointers is: + + png_byte *row_pointers[height]; + +You can point to void or char or whatever you use for pixels. + +If you don't want to write the whole image at once, you can +use png_write_rows() instead. If the file is not interlaced, +this is simple: + + png_write_rows(png_ptr, row_pointers, + number_of_rows); + +row_pointers is the same as in the png_write_image() call. + +If you are just writing one row at a time, you can do this with +a single row_pointer instead of an array of row_pointers: + + png_bytep row_pointer = row; + + png_write_row(png_ptr, row_pointer); + +When the file is interlaced, things can get a good deal more complicated. +The only currently (as of the PNG Specification version 1.2, dated July +1999) defined interlacing scheme for PNG files is the "Adam7" interlace +scheme, that breaks down an image into seven smaller images of varying +size. libpng will build these images for you, or you can do them +yourself. If you want to build them yourself, see the PNG specification +for details of which pixels to write when. + +If you don't want libpng to handle the interlacing details, just +use png_set_interlace_handling() and call png_write_rows() the +correct number of times to write all the sub-images +(png_set_interlace_handling() returns the number of sub-images.) + +If you want libpng to build the sub-images, call this before you start +writing any rows: + + number_of_passes = png_set_interlace_handling(png_ptr); + +This will return the number of passes needed. Currently, this is seven, +but may change if another interlace type is added. + +Then write the complete image number_of_passes times. + + png_write_rows(png_ptr, row_pointers, number_of_rows); + +Think carefully before you write an interlaced image. Typically code that +reads such images reads all the image data into memory, uncompressed, before +doing any processing. Only code that can display an image on the fly can +take advantage of the interlacing and even then the image has to be exactly +the correct size for the output device, because scaling an image requires +adjacent pixels and these are not available until all the passes have been +read. + +If you do write an interlaced image you will hardly ever need to handle +the interlacing yourself. Call png_set_interlace_handling() and use the +approach described above. + +The only time it is conceivable that you will really need to write an +interlaced image pass-by-pass is when you have read one pass by pass and +made some pixel-by-pixel transformation to it, as described in the read +code above. In this case use the PNG_PASS_ROWS and PNG_PASS_COLS macros +to determine the size of each sub-image in turn and simply write the rows +you obtained from the read code. + +Finishing a sequential write + +After you are finished writing the image, you should finish writing +the file. If you are interested in writing comments or time, you should +pass an appropriately filled png_info pointer. If you are not interested, +you can pass NULL. + + png_write_end(png_ptr, info_ptr); + +When you are done, you can free all memory used by libpng like this: + + png_destroy_write_struct(&png_ptr, &info_ptr); + +It is also possible to individually free the info_ptr members that +point to libpng-allocated storage with the following function: + + png_free_data(png_ptr, info_ptr, mask, seq) + + mask - identifies data to be freed, a mask + containing the bitwise OR of one or + more of + PNG_FREE_PLTE, PNG_FREE_TRNS, + PNG_FREE_HIST, PNG_FREE_ICCP, + PNG_FREE_PCAL, PNG_FREE_ROWS, + PNG_FREE_SCAL, PNG_FREE_SPLT, + PNG_FREE_TEXT, PNG_FREE_UNKN, + or simply PNG_FREE_ALL + + seq - sequence number of item to be freed + (-1 for all items) + +This function may be safely called when the relevant storage has +already been freed, or has not yet been allocated, or was allocated +by the user and not by libpng, and will in those cases do nothing. +The "seq" parameter is ignored if only one item of the selected data +type, such as PLTE, is allowed. If "seq" is not -1, and multiple items +are allowed for the data type identified in the mask, such as text or +sPLT, only the n'th item in the structure is freed, where n is "seq". + +If you allocated data such as a palette that you passed in to libpng +with png_set_*, you must not free it until just before the call to +png_destroy_write_struct(). + +The default behavior is only to free data that was allocated internally +by libpng. This can be changed, so that libpng will not free the data, +or so that it will free data that was allocated by the user with png_malloc() +or png_calloc() and passed in via a png_set_*() function, with + + png_data_freer(png_ptr, info_ptr, freer, mask) + + freer - one of + PNG_DESTROY_WILL_FREE_DATA + PNG_SET_WILL_FREE_DATA + PNG_USER_WILL_FREE_DATA + + mask - which data elements are affected + same choices as in png_free_data() + +For example, to transfer responsibility for some data from a read structure +to a write structure, you could use + + png_data_freer(read_ptr, read_info_ptr, + PNG_USER_WILL_FREE_DATA, + PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) + + png_data_freer(write_ptr, write_info_ptr, + PNG_DESTROY_WILL_FREE_DATA, + PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) + +thereby briefly reassigning responsibility for freeing to the user but +immediately afterwards reassigning it once more to the write_destroy +function. Having done this, it would then be safe to destroy the read +structure and continue to use the PLTE, tRNS, and hIST data in the write +structure. + +This function only affects data that has already been allocated. +You can call this function before calling after the png_set_*() functions +to control whether the user or png_destroy_*() is supposed to free the data. +When the user assumes responsibility for libpng-allocated data, the +application must use +png_free() to free it, and when the user transfers responsibility to libpng +for data that the user has allocated, the user must have used png_malloc() +or png_calloc() to allocate it. + +If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword +separately, do not transfer responsibility for freeing text_ptr to libpng, +because when libpng fills a png_text structure it combines these members with +the key member, and png_free_data() will free only text_ptr.key. Similarly, +if you transfer responsibility for free'ing text_ptr from libpng to your +application, your application must not separately free those members. +For a more compact example of writing a PNG image, see the file example.c. + +V. Simplified API + +The simplified API, which became available in libpng-1.6.0, hides the details +of both libpng and the PNG file format itself. +It allows PNG files to be read into a very limited number of +in-memory bitmap formats or to be written from the same formats. If these +formats do not accomodate your needs then you can, and should, use the more +sophisticated APIs above - these support a wide variety of in-memory formats +and a wide variety of sophisticated transformations to those formats as well +as a wide variety of APIs to manipulate ancilliary information. + +To read a PNG file using the simplified API: + + 1) Declare a 'png_image' structure (see below) on the + stack and memset() it to all zero. + + 2) Call the appropriate png_image_begin_read... function. + + 3) Set the png_image 'format' member to the required + format and allocate a buffer for the image. + + 4) Call png_image_finish_read to read the image into + your buffer. + +There are no restrictions on the format of the PNG input itself; all valid +color types, bit depths, and interlace methods are acceptable, and the +input image is transformed as necessary to the requested in-memory format +during the png_image_finish_read() step. + +To write a PNG file using the simplified API: + + 1) Declare a 'png_image' structure on the stack and memset() + it to all zero. + + 2) Initialize the members of the structure that describe the + image, setting the 'format' member to the format of the + image in memory. + + 3) Call the appropriate png_image_write... function with a + pointer to the image to write the PNG data. + +png_image is a structure that describes the in-memory format of an image +when it is being read or define the in-memory format of an image that you +need to write. The "png_image" structure contains the following members: + + png_uint_32 version Set to PNG_IMAGE_VERSION + png_uint_32 width Image width in pixels (columns) + png_uint_32 height Image height in pixels (rows) + png_uint_32 format Image format as defined below + png_uint_32 flags A bit mask containing informational flags + png_controlp opaque Initialize to NULL, free with png_image_free + png_uint_32 colormap_entries; Number of entries in the color-map + png_uint_32 warning_or_error; + char message[64]; + +In the event of an error or warning the following field warning_or_error +field will be set to a non-zero value and the 'message' field will contain +a '\0' terminated string with the libpng error or warning message. If both +warnings and an error were encountered, only the error is recorded. If there +are multiple warnings, only the first one is recorded. + +The upper 30 bits of this value are reserved; the low two bits contain +a two bit code such that a value more than 1 indicates a failure in the API +just called: + + 0 - no warning or error + 1 - warning + 2 - error + 3 - error preceded by warning + +The pixels (samples) of the image have one to four channels whose components +have original values in the range 0 to 1.0: + + 1: A single gray or luminance channel (G). + 2: A gray/luminance channel and an alpha channel (GA). + 3: Three red, green, blue color channels (RGB). + 4: Three color channels and an alpha channel (RGBA). + +The channels are encoded in one of two ways: + + a) As a small integer, value 0..255, contained in a single byte. For the +alpha channel the original value is simply value/255. For the color or +luminance channels the value is encoded according to the sRGB specification +and matches the 8-bit format expected by typical display devices. + +The color/gray channels are not scaled (pre-multiplied) by the alpha +channel and are suitable for passing to color management software. + + b) As a value in the range 0..65535, contained in a 2-byte integer. All +channels can be converted to the original value by dividing by 65535; all +channels are linear. Color channels use the RGB encoding (RGB end-points) of +the sRGB specification. This encoding is identified by the +PNG_FORMAT_FLAG_LINEAR flag below. + +When an alpha channel is present it is expected to denote pixel coverage +of the color or luminance channels and is returned as an associated alpha +channel: the color/gray channels are scaled (pre-multiplied) by the alpha +value. + +When a color-mapped image is used as a result of calling +png_image_read_colormap or png_image_write_colormap the channels are encoded +in the color-map and the descriptions above apply to the color-map entries. +The image data is encoded as small integers, value 0..255, that index the +entries in the color-map. One integer (one byte) is stored for each pixel. + +PNG_FORMAT_* + +The #defines to be used in png_image::format. Each #define identifies a +particular layout of channel data and, if present, alpha values. There are +separate defines for each of the two channel encodings. + +A format is built up using single bit flag values. Not all combinations are +valid: use the bit flag values below for testing a format returned by the +read APIs, but set formats from the derived values. + +When reading or writing color-mapped images the format should be set to the +format of the entries in the color-map then png_image_{read,write}_colormap +called to read or write the color-map and set the format correctly for the +image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! + +NOTE: libpng can be built with particular features disabled, if you see +compiler errors because the definition of one of the following flags has been +compiled out it is because libpng does not have the required support. It is +possible, however, for the libpng configuration to enable the format on just +read or just write; in that case you may see an error at run time. You can +guard against this by checking for the definition of: + + PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED + + PNG_FORMAT_FLAG_ALPHA 0x01 format with an alpha channel + PNG_FORMAT_FLAG_COLOR 0x02 color format: otherwise grayscale + PNG_FORMAT_FLAG_LINEAR 0x04 png_uint_16 channels else png_byte + PNG_FORMAT_FLAG_COLORMAP 0x08 libpng use only + PNG_FORMAT_FLAG_BGR 0x10 BGR colors, else order is RGB + PNG_FORMAT_FLAG_AFIRST 0x20 alpha channel comes first + +Supported formats are as follows. Future versions of libpng may support more +formats; for compatibility with older versions simply check if the format +macro is defined using #ifdef. These defines describe the in-memory layout +of the components of the pixels of the image. + +First the single byte formats: + + PNG_FORMAT_GRAY 0 + PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA + PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST) + PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR + PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR) + PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA) + PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST) + PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA) + PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST) + +Then the linear 2-byte formats. When naming these "Y" is used to +indicate a luminance (gray) channel. The component order within the pixel +is always the same - there is no provision for swapping the order of the +components in the linear format. + + PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR + PNG_FORMAT_LINEAR_Y_ALPHA + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA) + PNG_FORMAT_LINEAR_RGB + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR) + PNG_FORMAT_LINEAR_RGB_ALPHA + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR| + PNG_FORMAT_FLAG_ALPHA) + +Color-mapped formats are obtained by calling png_image_{read,write}_colormap, +as appropriate after setting png_image::format to the format of the color-map +to be read or written. Applications may check the value of +PNG_FORMAT_FLAG_COLORMAP to see if they have called the colormap API. The +format of the color-map may be extracted using the following macro. + + PNG_FORMAT_OF_COLORMAP(fmt) ((fmt) & ~PNG_FORMAT_FLAG_COLORMAP) + +PNG_IMAGE macros + +These are convenience macros to derive information from a png_image +structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the +actual image sample values - either the entries in the color-map or the +pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values +for the pixels and will always return 1 after a call to +png_image_{read,write}_colormap. The remaining macros return information +about the rows in the image and the complete image. + +NOTE: All the macros that take a png_image::format parameter are compile time +constants if the format parameter is, itself, a constant. Therefore these +macros can be used in array declarations and case labels where required. +Similarly the macros are also pre-processor constants (sizeof is not used) so +they can be used in #if tests. + +First the information about the samples. + + PNG_IMAGE_SAMPLE_CHANNELS(fmt) + Returns the total number of channels in a given format: 1..4 + + PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt) + Returns the size in bytes of a single component of a pixel or color-map + entry (as appropriate) in the image. + + PNG_IMAGE_SAMPLE_SIZE(fmt) + This is the size of the sample data for one sample. If the image is + color-mapped it is the size of one color-map entry (and image pixels are + one byte in size), otherwise it is the size of one image pixel. + + PNG_IMAGE_COLORMAP_SIZE(fmt) + The size of the color-map required by the format; this is the size of the + color-map buffer passed to the png_image_{read,write}_colormap APIs, it is + a fixed number determined by the format so can easily be allocated on the + stack if necessary. + +#define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256) + /* The maximum size of the color-map required by the format expressed in a + * count of components. This can be used to compile-time allocate a + * color-map: + * + * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; + * + * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; + * + * Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the + * information from one of the png_image_begin_read_ APIs and dynamically + * allocate the required memory. + */ + + +Corresponding information about the pixels + + PNG_IMAGE_PIXEL_(test,fmt) + + PNG_IMAGE_PIXEL_CHANNELS(fmt) + The number of separate channels (components) in a pixel; 1 for a + color-mapped image. + + PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\ + The size, in bytes, of each component in a pixel; 1 for a color-mapped + image. + + PNG_IMAGE_PIXEL_SIZE(fmt) + The size, in bytes, of a complete pixel; 1 for a color-mapped image. + +Information about the whole row, or whole image + + PNG_IMAGE_ROW_STRIDE(image) + Returns the total number of components in a single row of the image; this + is the minimum 'row stride', the minimum count of components between each + row. For a color-mapped image this is the minimum number of bytes in a + row. + + PNG_IMAGE_BUFFER_SIZE(image, row_stride) + Returns the size, in bytes, of an image buffer given a png_image and a row + stride - the number of components to leave space for in each row. + + PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB == 0x01 + This indicates the the RGB values of the in-memory bitmap do not + correspond to the red, green and blue end-points defined by sRGB. + + PNG_IMAGE_FLAG_COLORMAP == 0x02 + The PNG is color-mapped. If this flag is set png_image_read_colormap + can be used without further loss of image information. If it is not set + png_image_read_colormap will cause significant loss if the image has any + +READ APIs + + The png_image passed to the read APIs must have been initialized by setting + the png_controlp field 'opaque' to NULL (or, better, memset the whole thing.) + + int png_image_begin_read_from_file( png_imagep image, + const char *file_name) + + The named file is opened for read and the image header + is filled in from the PNG header in the file. + + int png_image_begin_read_from_stdio (png_imagep image, + FILE* file) + + The PNG header is read from the stdio FILE object. + + int png_image_begin_read_from_memory(png_imagep image, + png_const_voidp memory, png_size_t size) + + The PNG header is read from the given memory buffer. + + int png_image_finish_read(png_imagep image, + png_colorp background, void *buffer, + png_int_32 row_stride, void *colormap)); + + Finish reading the image into the supplied buffer and + clean up the png_image structure. + + row_stride is the step, in png_byte or png_uint_16 units + as appropriate, between adjacent rows. A positive stride + indicates that the top-most row is first in the buffer - + the normal top-down arrangement. A negative stride + indicates that the bottom-most row is first in the buffer. + + background need only be supplied if an alpha channel must + be removed from a png_byte format and the removal is to be + done by compositing on a solid color; otherwise it may be + NULL and any composition will be done directly onto the + buffer. The value is an sRGB color to use for the + background, for grayscale output the green channel is used. + + For linear output removing the alpha channel is always done + by compositing on black. + + void png_image_free(png_imagep image) + + Free any data allocated by libpng in image->opaque, + setting the pointer to NULL. May be called at any time + after the structure is initialized. + +When the simplified API needs to convert between sRGB and linear colorspaces, +the actual sRGB transfer curve defined in the sRGB specification (see the +article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2 +approximation used elsewhere in libpng. + +WRITE APIS + +For write you must initialize a png_image structure to describe the image to +be written: + + version: must be set to PNG_IMAGE_VERSION + opaque: must be initialized to NULL + width: image width in pixels + height: image height in rows + format: the format of the data you wish to write + flags: set to 0 unless one of the defined flags applies; set + PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB for color format images + where the RGB values do not correspond to the colors in sRGB. + colormap_entries: set to the number of entries in the color-map (0 to 256) + + int png_image_write_to_file, (png_imagep image, + const char *file, int convert_to_8bit, const void *buffer, + png_int_32 row_stride, const void *colormap)); + + Write the image to the named file. + + int png_image_write_to_stdio(png_imagep image, FILE *file, + int convert_to_8_bit, const void *buffer, + png_int_32 row_stride, const void *colormap) + + Write the image to the given (FILE*). + +With all write APIs if image is in one of the linear formats with +(png_uint_16) data then setting convert_to_8_bit will cause the output to be +a (png_byte) PNG gamma encoded according to the sRGB specification, otherwise +a 16-bit linear encoded PNG file is written. + +With all APIs row_stride is handled as in the read APIs - it is the spacing +from one row to the next in component sized units (float) and if negative +indicates a bottom-up row layout in the buffer. + +Note that the write API does not support interlacing, sub-8-bit pixels, +and indexed (paletted) images. + +VI. Modifying/Customizing libpng + +There are two issues here. The first is changing how libpng does +standard things like memory allocation, input/output, and error handling. +The second deals with more complicated things like adding new chunks, +adding new transformations, and generally changing how libpng works. +Both of those are compile-time issues; that is, they are generally +determined at the time the code is written, and there is rarely a need +to provide the user with a means of changing them. + +Memory allocation, input/output, and error handling + +All of the memory allocation, input/output, and error handling in libpng +goes through callbacks that are user-settable. The default routines are +in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change +these functions, call the appropriate png_set_*_fn() function. + +Memory allocation is done through the functions png_malloc(), png_calloc(), +and png_free(). The png_malloc() and png_free() functions currently just +call the standard C functions and png_calloc() calls png_malloc() and then +clears the newly allocated memory to zero; note that png_calloc(png_ptr, size) +is not the same as the calloc(number, size) function provided by stdlib.h. +There is limited support for certain systems with segmented memory +architectures and the types of pointers declared by png.h match this; you +will have to use appropriate pointers in your application. Since it is +unlikely that the method of handling memory allocation on a platform +will change between applications, these functions must be modified in +the library at compile time. If you prefer to use a different method +of allocating and freeing data, you can use png_create_read_struct_2() or +png_create_write_struct_2() to register your own functions as described +above. These functions also provide a void pointer that can be retrieved +via + + mem_ptr=png_get_mem_ptr(png_ptr); + +Your replacement memory functions must have prototypes as follows: + + png_voidp malloc_fn(png_structp png_ptr, + png_alloc_size_t size); + + void free_fn(png_structp png_ptr, png_voidp ptr); + +Your malloc_fn() must return NULL in case of failure. The png_malloc() +function will normally call png_error() if it receives a NULL from the +system memory allocator or from your replacement malloc_fn(). + +Your free_fn() will never be called with a NULL ptr, since libpng's +png_free() checks for NULL before calling free_fn(). + +Input/Output in libpng is done through png_read() and png_write(), +which currently just call fread() and fwrite(). The FILE * is stored in +png_struct and is initialized via png_init_io(). If you wish to change +the method of I/O, the library supplies callbacks that you can set +through the function png_set_read_fn() and png_set_write_fn() at run +time, instead of calling the png_init_io() function. These functions +also provide a void pointer that can be retrieved via the function +png_get_io_ptr(). For example: + + png_set_read_fn(png_structp read_ptr, + voidp read_io_ptr, png_rw_ptr read_data_fn) + + png_set_write_fn(png_structp write_ptr, + voidp write_io_ptr, png_rw_ptr write_data_fn, + png_flush_ptr output_flush_fn); + + voidp read_io_ptr = png_get_io_ptr(read_ptr); + voidp write_io_ptr = png_get_io_ptr(write_ptr); + +The replacement I/O functions must have prototypes as follows: + + void user_read_data(png_structp png_ptr, + png_bytep data, png_size_t length); + + void user_write_data(png_structp png_ptr, + png_bytep data, png_size_t length); + + void user_flush_data(png_structp png_ptr); + +The user_read_data() function is responsible for detecting and +handling end-of-data errors. + +Supplying NULL for the read, write, or flush functions sets them back +to using the default C stream functions, which expect the io_ptr to +point to a standard *FILE structure. It is probably a mistake +to use NULL for one of write_data_fn and output_flush_fn but not both +of them, unless you have built libpng with PNG_NO_WRITE_FLUSH defined. +It is an error to read from a write stream, and vice versa. + +Error handling in libpng is done through png_error() and png_warning(). +Errors handled through png_error() are fatal, meaning that png_error() +should never return to its caller. Currently, this is handled via +setjmp() and longjmp() (unless you have compiled libpng with +PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()), +but you could change this to do things like exit() if you should wish, +as long as your function does not return. + +On non-fatal errors, png_warning() is called +to print a warning message, and then control returns to the calling code. +By default png_error() and png_warning() print a message on stderr via +fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined +(because you don't want the messages) or PNG_NO_STDIO defined (because +fprintf() isn't available). If you wish to change the behavior of the error +functions, you will need to set up your own message callbacks. These +functions are normally supplied at the time that the png_struct is created. +It is also possible to redirect errors and warnings to your own replacement +functions after png_create_*_struct() has been called by calling: + + png_set_error_fn(png_structp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warning_fn); + + png_voidp error_ptr = png_get_error_ptr(png_ptr); + +If NULL is supplied for either error_fn or warning_fn, then the libpng +default function will be used, calling fprintf() and/or longjmp() if a +problem is encountered. The replacement error functions should have +parameters as follows: + + void user_error_fn(png_structp png_ptr, + png_const_charp error_msg); + + void user_warning_fn(png_structp png_ptr, + png_const_charp warning_msg); + +The motivation behind using setjmp() and longjmp() is the C++ throw and +catch exception handling methods. This makes the code much easier to write, +as there is no need to check every return code of every function call. +However, there are some uncertainties about the status of local variables +after a longjmp, so the user may want to be careful about doing anything +after setjmp returns non-zero besides returning itself. Consult your +compiler documentation for more details. For an alternative approach, you +may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net), +which is illustrated in pngvalid.c and in contrib/visupng. + +Beginning in libpng-1.4.0, the png_set_benign_errors() API became available. +You can use this to handle certain errors (normally handled as errors) +as warnings. + + png_set_benign_errors (png_ptr, int allowed); + + allowed: 0: (default) treat png_benign_error() an error. + 1: treat png_benign_error() as a warning. + +Custom chunks + +If you need to read or write custom chunks, you may need to get deeper +into the libpng code. The library now has mechanisms for storing +and writing chunks of unknown type; you can even declare callbacks +for custom chunks. However, this may not be good enough if the +library code itself needs to know about interactions between your +chunk and existing `intrinsic' chunks. + +If you need to write a new intrinsic chunk, first read the PNG +specification. Acquire a first level of understanding of how it works. +Pay particular attention to the sections that describe chunk names, +and look at how other chunks were designed, so you can do things +similarly. Second, check out the sections of libpng that read and +write chunks. Try to find a chunk that is similar to yours and use +it as a template. More details can be found in the comments inside +the code. It is best to handle private or unknown chunks in a generic method, +via callback functions, instead of by modifying libpng functions. This +is illustrated in pngtest.c, which uses a callback function to handle a +private "vpAg" chunk and the new "sTER" chunk, which are both unknown to +libpng. + +If you wish to write your own transformation for the data, look through +the part of the code that does the transformations, and check out some of +the simpler ones to get an idea of how they work. Try to find a similar +transformation to the one you want to add and copy off of it. More details +can be found in the comments inside the code itself. + +Configuring for 16-bit platforms + +You will want to look into zconf.h to tell zlib (and thus libpng) that +it cannot allocate more then 64K at a time. Even if you can, the memory +won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K. + +Configuring for DOS + +For DOS users who only have access to the lower 640K, you will +have to limit zlib's memory usage via a png_set_compression_mem_level() +call. See zlib.h or zconf.h in the zlib library for more information. + +Configuring for Medium Model + +Libpng's support for medium model has been tested on most of the popular +compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets +defined, and FAR gets defined to far in pngconf.h, and you should be +all set. Everything in the library (except for zlib's structure) is +expecting far data. You must use the typedefs with the p or pp on +the end for pointers (or at least look at them and be careful). Make +note that the rows of data are defined as png_bytepp, which is +an "unsigned char far * far *". + +Configuring for gui/windowing platforms: + +You will need to write new error and warning functions that use the GUI +interface, as described previously, and set them to be the error and +warning functions at the time that png_create_*_struct() is called, +in order to have them available during the structure initialization. +They can be changed later via png_set_error_fn(). On some compilers, +you may also have to change the memory allocators (png_malloc, etc.). + +Configuring for compiler xxx: + +All includes for libpng are in pngconf.h. If you need to add, change +or delete an include, this is the place to do it. +The includes that are not needed outside libpng are placed in pngpriv.h, +which is only used by the routines inside libpng itself. +The files in libpng proper only include pngpriv.h and png.h, which +in turn includes pngconf.h and, as of libpng-1.5.0, pnglibconf.h. +As of libpng-1.5.0, pngpriv.h also includes three other private header +files, pngstruct.h, pnginfo.h, and pngdebug.h, which contain material +that previously appeared in the public headers. + +Configuring zlib: + +There are special functions to configure the compression. Perhaps the +most useful one changes the compression level, which currently uses +input compression values in the range 0 - 9. The library normally +uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests +have shown that for a large majority of images, compression values in +the range 3-6 compress nearly as well as higher levels, and do so much +faster. For online applications it may be desirable to have maximum speed +(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also +specify no compression (Z_NO_COMPRESSION = 0), but this would create +files larger than just storing the raw bitmap. You can specify the +compression level by calling: + + #include zlib.h + png_set_compression_level(png_ptr, level); + +Another useful one is to reduce the memory level used by the library. +The memory level defaults to 8, but it can be lowered if you are +short on memory (running DOS, for example, where you only have 640K). +Note that the memory level does have an effect on compression; among +other things, lower levels will result in sections of incompressible +data being emitted in smaller stored blocks, with a correspondingly +larger relative overhead of up to 15% in the worst case. + + #include zlib.h + png_set_compression_mem_level(png_ptr, level); + +The other functions are for configuring zlib. They are not recommended +for normal use and may result in writing an invalid PNG file. See +zlib.h for more information on what these mean. + + #include zlib.h + png_set_compression_strategy(png_ptr, + strategy); + + png_set_compression_window_bits(png_ptr, + window_bits); + + png_set_compression_method(png_ptr, method); + + png_set_compression_buffer_size(png_ptr, size); + +As of libpng version 1.5.4, additional APIs became +available to set these separately for non-IDAT +compressed chunks such as zTXt, iTXt, and iCCP: + + #include zlib.h + #if PNG_LIBPNG_VER >= 10504 + png_set_text_compression_level(png_ptr, level); + + png_set_text_compression_mem_level(png_ptr, level); + + png_set_text_compression_strategy(png_ptr, + strategy); + + png_set_text_compression_window_bits(png_ptr, + window_bits); + + png_set_text_compression_method(png_ptr, method); + #endif + +Controlling row filtering + +If you want to control whether libpng uses filtering or not, which +filters are used, and how it goes about picking row filters, you +can call one of these functions. The selection and configuration +of row filters can have a significant impact on the size and +encoding speed and a somewhat lesser impact on the decoding speed +of an image. Filtering is enabled by default for RGB and grayscale +images (with and without alpha), but not for paletted images nor +for any images with bit depths less than 8 bits/pixel. + +The 'method' parameter sets the main filtering method, which is +currently only '0' in the PNG 1.2 specification. The 'filters' +parameter sets which filter(s), if any, should be used for each +scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS +to turn filtering on and off, respectively. + +Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB, +PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise +ORed together with '|' to specify one or more filters to use. +These filters are described in more detail in the PNG specification. +If you intend to change the filter type during the course of writing +the image, you should start with flags set for all of the filters +you intend to use so that libpng can initialize its internal +structures appropriately for all of the filter types. (Note that this +means the first row must always be adaptively filtered, because libpng +currently does not allocate the filter buffers until png_write_row() +is called for the first time.) + + filters = PNG_FILTER_NONE | PNG_FILTER_SUB + PNG_FILTER_UP | PNG_FILTER_AVG | + PNG_FILTER_PAETH | PNG_ALL_FILTERS; + + png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, + filters); + The second parameter can also be + PNG_INTRAPIXEL_DIFFERENCING if you are + writing a PNG to be embedded in a MNG + datastream. This parameter must be the + same as the value of filter_method used + in png_set_IHDR(). + +It is also possible to influence how libpng chooses from among the +available filters. This is done in one or both of two ways - by +telling it how important it is to keep the same filter for successive +rows, and by telling it the relative computational costs of the filters. + + double weights[3] = {1.5, 1.3, 1.1}, + costs[PNG_FILTER_VALUE_LAST] = + {1.0, 1.3, 1.3, 1.5, 1.7}; + + png_set_filter_heuristics(png_ptr, + PNG_FILTER_HEURISTIC_WEIGHTED, 3, + weights, costs); + +The weights are multiplying factors that indicate to libpng that the +row filter should be the same for successive rows unless another row filter +is that many times better than the previous filter. In the above example, +if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a +"sum of absolute differences" 1.5 x 1.3 times higher than other filters +and still be chosen, while the NONE filter could have a sum 1.1 times +higher than other filters and still be chosen. Unspecified weights are +taken to be 1.0, and the specified weights should probably be declining +like those above in order to emphasize recent filters over older filters. + +The filter costs specify for each filter type a relative decoding cost +to be considered when selecting row filters. This means that filters +with higher costs are less likely to be chosen over filters with lower +costs, unless their "sum of absolute differences" is that much smaller. +The costs do not necessarily reflect the exact computational speeds of +the various filters, since this would unduly influence the final image +size. + +Note that the numbers above were invented purely for this example and +are given only to help explain the function usage. Little testing has +been done to find optimum values for either the costs or the weights. + +Removing unwanted object code + +There are a bunch of #define's in pngconf.h that control what parts of +libpng are compiled. All the defines end in _SUPPORTED. If you are +never going to use a capability, you can change the #define to #undef +before recompiling libpng and save yourself code and data space, or +you can turn off individual capabilities with defines that begin with +PNG_NO_. + +In libpng-1.5.0 and later, the #define's are in pnglibconf.h instead. + +You can also turn all of the transforms and ancillary chunk capabilities +off en masse with compiler directives that define +PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, +or all four, +along with directives to turn on any of the capabilities that you do +want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the extra +transformations but still leave the library fully capable of reading +and writing PNG files with all known public chunks. Use of the +PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library +that is incapable of reading or writing ancillary chunks. If you are +not using the progressive reading capability, you can turn that off +with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING +capability, which you'll still have). + +All the reading and writing specific code are in separate files, so the +linker should only grab the files it needs. However, if you want to +make sure, or if you are building a stand alone library, all the +reading files start with "pngr" and all the writing files start with "pngw". +The files that don't match either (like png.c, pngtrans.c, etc.) +are used for both reading and writing, and always need to be included. +The progressive reader is in pngpread.c + +If you are creating or distributing a dynamically linked library (a .so +or DLL file), you should not remove or disable any parts of the library, +as this will cause applications linked with different versions of the +library to fail if they call functions not available in your library. +The size of the library itself should not be an issue, because only +those sections that are actually used will be loaded into memory. + +Requesting debug printout + +The macro definition PNG_DEBUG can be used to request debugging +printout. Set it to an integer value in the range 0 to 3. Higher +numbers result in increasing amounts of debugging information. The +information is printed to the "stderr" file, unless another file +name is specified in the PNG_DEBUG_FILE macro definition. + +When PNG_DEBUG > 0, the following functions (macros) become available: + + png_debug(level, message) + png_debug1(level, message, p1) + png_debug2(level, message, p1, p2) + +in which "level" is compared to PNG_DEBUG to decide whether to print +the message, "message" is the formatted string to be printed, +and p1 and p2 are parameters that are to be embedded in the string +according to printf-style formatting directives. For example, + + png_debug1(2, "foo=%d\n", foo); + +is expanded to + + if (PNG_DEBUG > 2) + fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo); + +When PNG_DEBUG is defined but is zero, the macros aren't defined, but you +can still use PNG_DEBUG to control your own debugging: + + #ifdef PNG_DEBUG + fprintf(stderr, ... + #endif + +When PNG_DEBUG = 1, the macros are defined, but only png_debug statements +having level = 0 will be printed. There aren't any such statements in +this version of libpng, but if you insert some they will be printed. + +Prepending a prefix to exported symbols + +Starting with libpng-1.6.0, you can configure libpng (when using the +"configure" script) to prefix all exported symbols by means of the +configuration option "--with-libpng-prefix=FOO_", where FOO_ can be any +string beginning with a letter and containing only uppercase +and lowercase letters, digits, and the underscore (i.e., a C language +identifier). This creates a set of macros in pnglibconf.h, so this is +transparent to applications; their function calls get transformed by +the macros to use the modified names. + +VII. MNG support + +The MNG specification (available at http://www.libpng.org/pub/mng) allows +certain extensions to PNG for PNG images that are embedded in MNG datastreams. +Libpng can support some of these extensions. To enable them, use the +png_permit_mng_features() function: + + feature_set = png_permit_mng_features(png_ptr, mask) + + mask is a png_uint_32 containing the bitwise OR of the + features you want to enable. These include + PNG_FLAG_MNG_EMPTY_PLTE + PNG_FLAG_MNG_FILTER_64 + PNG_ALL_MNG_FEATURES + + feature_set is a png_uint_32 that is the bitwise AND of + your mask with the set of MNG features that is + supported by the version of libpng that you are using. + +It is an error to use this function when reading or writing a standalone +PNG file with the PNG 8-byte signature. The PNG datastream must be wrapped +in a MNG datastream. As a minimum, it must have the MNG 8-byte signature +and the MHDR and MEND chunks. Libpng does not provide support for these +or any other MNG chunks; your application must provide its own support for +them. You may wish to consider using libmng (available at +http://www.libmng.com) instead. + +VIII. Changes to Libpng from version 0.88 + +It should be noted that versions of libpng later than 0.96 are not +distributed by the original libpng author, Guy Schalnat, nor by +Andreas Dilger, who had taken over from Guy during 1996 and 1997, and +distributed versions 0.89 through 0.96, but rather by another member +of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are +still alive and well, but they have moved on to other things. + +The old libpng functions png_read_init(), png_write_init(), +png_info_init(), png_read_destroy(), and png_write_destroy() have been +moved to PNG_INTERNAL in version 0.95 to discourage their use. These +functions will be removed from libpng version 1.4.0. + +The preferred method of creating and initializing the libpng structures is +via the png_create_read_struct(), png_create_write_struct(), and +png_create_info_struct() because they isolate the size of the structures +from the application, allow version error checking, and also allow the +use of custom error handling routines during the initialization, which +the old functions do not. The functions png_read_destroy() and +png_write_destroy() do not actually free the memory that libpng +allocated for these structs, but just reset the data structures, so they +can be used instead of png_destroy_read_struct() and +png_destroy_write_struct() if you feel there is too much system overhead +allocating and freeing the png_struct for each image read. + +Setting the error callbacks via png_set_message_fn() before +png_read_init() as was suggested in libpng-0.88 is no longer supported +because this caused applications that do not use custom error functions +to fail if the png_ptr was not initialized to zero. It is still possible +to set the error callbacks AFTER png_read_init(), or to change them with +png_set_error_fn(), which is essentially the same function, but with a new +name to force compilation errors with applications that try to use the old +method. + +Starting with version 1.0.7, you can find out which version of the library +you are using at run-time: + + png_uint_32 libpng_vn = png_access_version_number(); + +The number libpng_vn is constructed from the major version, minor +version with leading zero, and release number with leading zero, +(e.g., libpng_vn for version 1.0.7 is 10007). + +Note that this function does not take a png_ptr, so you can call it +before you've created one. + +You can also check which version of png.h you used when compiling your +application: + + png_uint_32 application_vn = PNG_LIBPNG_VER; + +IX. Changes to Libpng from version 1.0.x to 1.2.x + +Support for user memory management was enabled by default. To +accomplish this, the functions png_create_read_struct_2(), +png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(), +png_malloc_default(), and png_free_default() were added. + +Support for the iTXt chunk has been enabled by default as of +version 1.2.41. + +Support for certain MNG features was enabled. + +Support for numbered error messages was added. However, we never got +around to actually numbering the error messages. The function +png_set_strip_error_numbers() was added (Note: the prototype for this +function was inadvertently removed from png.h in PNG_NO_ASSEMBLER_CODE +builds of libpng-1.2.15. It was restored in libpng-1.2.36). + +The png_malloc_warn() function was added at libpng-1.2.3. This issues +a png_warning and returns NULL instead of aborting when it fails to +acquire the requested memory allocation. + +Support for setting user limits on image width and height was enabled +by default. The functions png_set_user_limits(), png_get_user_width_max(), +and png_get_user_height_max() were added at libpng-1.2.6. + +The png_set_add_alpha() function was added at libpng-1.2.7. + +The function png_set_expand_gray_1_2_4_to_8() was added at libpng-1.2.9. +Unlike png_set_gray_1_2_4_to_8(), the new function does not expand the +tRNS chunk to alpha. The png_set_gray_1_2_4_to_8() function is +deprecated. + +A number of macro definitions in support of runtime selection of +assembler code features (especially Intel MMX code support) were +added at libpng-1.2.0: + + PNG_ASM_FLAG_MMX_SUPPORT_COMPILED + PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU + PNG_ASM_FLAG_MMX_READ_COMBINE_ROW + PNG_ASM_FLAG_MMX_READ_INTERLACE + PNG_ASM_FLAG_MMX_READ_FILTER_SUB + PNG_ASM_FLAG_MMX_READ_FILTER_UP + PNG_ASM_FLAG_MMX_READ_FILTER_AVG + PNG_ASM_FLAG_MMX_READ_FILTER_PAETH + PNG_ASM_FLAGS_INITIALIZED + PNG_MMX_READ_FLAGS + PNG_MMX_FLAGS + PNG_MMX_WRITE_FLAGS + PNG_MMX_FLAGS + +We added the following functions in support of runtime +selection of assembler code features: + + png_get_mmx_flagmask() + png_set_mmx_thresholds() + png_get_asm_flags() + png_get_mmx_bitdepth_threshold() + png_get_mmx_rowbytes_threshold() + png_set_asm_flags() + +We replaced all of these functions with simple stubs in libpng-1.2.20, +when the Intel assembler code was removed due to a licensing issue. + +These macros are deprecated: + + PNG_READ_TRANSFORMS_NOT_SUPPORTED + PNG_PROGRESSIVE_READ_NOT_SUPPORTED + PNG_NO_SEQUENTIAL_READ_SUPPORTED + PNG_WRITE_TRANSFORMS_NOT_SUPPORTED + PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED + PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED + +They have been replaced, respectively, by: + + PNG_NO_READ_TRANSFORMS + PNG_NO_PROGRESSIVE_READ + PNG_NO_SEQUENTIAL_READ + PNG_NO_WRITE_TRANSFORMS + PNG_NO_READ_ANCILLARY_CHUNKS + PNG_NO_WRITE_ANCILLARY_CHUNKS + +PNG_MAX_UINT was replaced with PNG_UINT_31_MAX. It has been +deprecated since libpng-1.0.16 and libpng-1.2.6. + +The function + png_check_sig(sig, num) +was replaced with + !png_sig_cmp(sig, 0, num) +It has been deprecated since libpng-0.90. + +The function + png_set_gray_1_2_4_to_8() +which also expands tRNS to alpha was replaced with + png_set_expand_gray_1_2_4_to_8() +which does not. It has been deprecated since libpng-1.0.18 and 1.2.9. + +X. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x + +Private libpng prototypes and macro definitions were moved from +png.h and pngconf.h into a new pngpriv.h header file. + +Functions png_set_benign_errors(), png_benign_error(), and +png_chunk_benign_error() were added. + +Support for setting the maximum amount of memory that the application +will allocate for reading chunks was added, as a security measure. +The functions png_set_chunk_cache_max() and png_get_chunk_cache_max() +were added to the library. + +We implemented support for I/O states by adding png_ptr member io_state +and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c + +We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level +input transforms. + +Checking for and reporting of errors in the IHDR chunk is more thorough. + +Support for global arrays was removed, to improve thread safety. + +Some obsolete/deprecated macros and functions have been removed. + +Typecasted NULL definitions such as + #define png_voidp_NULL (png_voidp)NULL +were eliminated. If you used these in your application, just use +NULL instead. + +The png_struct and info_struct members "trans" and "trans_values" were +changed to "trans_alpha" and "trans_color", respectively. + +The obsolete, unused pnggccrd.c and pngvcrd.c files and related makefiles +were removed. + +The PNG_1_0_X and PNG_1_2_X macros were eliminated. + +The PNG_LEGACY_SUPPORTED macro was eliminated. + +Many WIN32_WCE #ifdefs were removed. + +The functions png_read_init(info_ptr), png_write_init(info_ptr), +png_info_init(info_ptr), png_read_destroy(), and png_write_destroy() +have been removed. They have been deprecated since libpng-0.95. + +The png_permit_empty_plte() was removed. It has been deprecated +since libpng-1.0.9. Use png_permit_mng_features() instead. + +We removed the obsolete stub functions png_get_mmx_flagmask(), +png_set_mmx_thresholds(), png_get_asm_flags(), +png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(), +png_set_asm_flags(), and png_mmx_supported() + +We removed the obsolete png_check_sig(), png_memcpy_check(), and +png_memset_check() functions. Instead use !png_sig_cmp(), memcpy(), +and memset(), respectively. + +The function png_set_gray_1_2_4_to_8() was removed. It has been +deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with +png_set_expand_gray_1_2_4_to_8() because the former function also +expanded any tRNS chunk to an alpha channel. + +Macros for png_get_uint_16, png_get_uint_32, and png_get_int_32 +were added and are used by default instead of the corresponding +functions. Unfortunately, +from libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +function) incorrectly returned a value of type png_uint_32. + +We changed the prototype for png_malloc() from + png_malloc(png_structp png_ptr, png_uint_32 size) +to + png_malloc(png_structp png_ptr, png_alloc_size_t size) + +This also applies to the prototype for the user replacement malloc_fn(). + +The png_calloc() function was added and is used in place of +of "png_malloc(); memset();" except in the case in png_read_png() +where the array consists of pointers; in this case a "for" loop is used +after the png_malloc() to set the pointers to NULL, to give robust. +behavior in case the application runs out of memory part-way through +the process. + +We changed the prototypes of png_get_compression_buffer_size() and +png_set_compression_buffer_size() to work with png_size_t instead of +png_uint_32. + +Support for numbered error messages was removed by default, since we +never got around to actually numbering the error messages. The function +png_set_strip_error_numbers() was removed from the library by default. + +The png_zalloc() and png_zfree() functions are no longer exported. +The png_zalloc() function no longer zeroes out the memory that it +allocates. Applications that called png_zalloc(png_ptr, number, size) +can call png_calloc(png_ptr, number*size) instead, and can call +png_free() instead of png_zfree(). + +Support for dithering was disabled by default in libpng-1.4.0, because +it has not been well tested and doesn't actually "dither". +The code was not +removed, however, and could be enabled by building libpng with +PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support +was reenabled, but the function was renamed png_set_quantize() to +reflect more accurately what it actually does. At the same time, +the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to +PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED +was renamed to PNG_READ_QUANTIZE_SUPPORTED. + +We removed the trailing '.' from the warning and error messages. + +XI. Changes to Libpng from version 1.4.x to 1.5.x + +From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +function) incorrectly returned a value of type png_uint_32. + +Checking for invalid palette index on read or write was added at libpng +1.5.10. When an invalid index is found, libpng issues a benign error. +This is enabled by default because this condition is an error according +to the PNG specification, Clause 11.3.2, but the error can be ignored in +each png_ptr with + + png_set_check_for_invalid_index(png_ptr, allowed); + + allowed - one of + 0: disable benign error (accept the + invalid data without warning). + 1: enable benign error (treat the + invalid data as an error or a + warning). + +If the error is ignored, or if png_benign_error() treats it as a warning, +any invalid pixels are decoded as opaque black by the decoder and written +as-is by the encoder. + +Retrieving the maximum palette index found was added at libpng-1.5.15. +This statement must appear after png_read_png() or png_read_image() while +reading, and after png_write_png() or png_write_image() while writing. + + int max_palette = png_get_palette_max(png_ptr, info_ptr); + +This will return the maximum palette index found in the image, or "-1" if +the palette was not checked, or "0" if no palette was found. Note that this +does not account for any palette index used by ancillary chunks such as the +bKGD chunk; you must check those separately to determine the maximum +palette index actually used. + +A. Changes that affect users of libpng + +There are no substantial API changes between the non-deprecated parts of +the 1.4.5 API and the 1.5.0 API; however, the ability to directly access +members of the main libpng control structures, png_struct and png_info, +deprecated in earlier versions of libpng, has been completely removed from +libpng 1.5. + +We no longer include zlib.h in png.h. The include statement has been moved +to pngstruct.h, where it is not accessible by applications. Applications that +need access to information in zlib.h will need to add the '#include "zlib.h"' +directive. It does not matter whether this is placed prior to or after +the '"#include png.h"' directive. + +The png_sprintf(), png_strcpy(), and png_strncpy() macros are no longer used +and were removed. + +We moved the png_strlen(), png_memcpy(), png_memset(), and png_memcmp() +macros into a private header file (pngpriv.h) that is not accessible to +applications. + +In png_get_iCCP, the type of "profile" was changed from png_charpp +to png_bytepp, and in png_set_iCCP, from png_charp to png_const_bytep. + +There are changes of form in png.h, including new and changed macros to +declare parts of the API. Some API functions with arguments that are +pointers to data not modified within the function have been corrected to +declare these arguments with PNG_CONST. + +Much of the internal use of C macros to control the library build has also +changed and some of this is visible in the exported header files, in +particular the use of macros to control data and API elements visible +during application compilation may require significant revision to +application code. (It is extremely rare for an application to do this.) + +Any program that compiled against libpng 1.4 and did not use deprecated +features or access internal library structures should compile and work +against libpng 1.5, except for the change in the prototype for +png_get_iCCP() and png_set_iCCP() API functions mentioned above. + +libpng 1.5.0 adds PNG_ PASS macros to help in the reading and writing of +interlaced images. The macros return the number of rows and columns in +each pass and information that can be used to de-interlace and (if +absolutely necessary) interlace an image. + +libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls +the application-provided png_longjmp_ptr on the internal, but application +initialized, longjmp buffer. It is provided as a convenience to avoid +the need to use the png_jmpbuf macro, which had the unnecessary side +effect of resetting the internal png_longjmp_ptr value. + +libpng 1.5.0 includes a complete fixed point API. By default this is +present along with the corresponding floating point API. In general the +fixed point API is faster and smaller than the floating point one because +the PNG file format used fixed point, not floating point. This applies +even if the library uses floating point in internal calculations. A new +macro, PNG_FLOATING_ARITHMETIC_SUPPORTED, reveals whether the library +uses floating point arithmetic (the default) or fixed point arithmetic +internally for performance critical calculations such as gamma correction. +In some cases, the gamma calculations may produce slightly different +results. This has changed the results in png_rgb_to_gray and in alpha +composition (png_set_background for example). This applies even if the +original image was already linear (gamma == 1.0) and, therefore, it is +not necessary to linearize the image. This is because libpng has *not* +been changed to optimize that case correctly, yet. + +Fixed point support for the sCAL chunk comes with an important caveat; +the sCAL specification uses a decimal encoding of floating point values +and the accuracy of PNG fixed point values is insufficient for +representation of these values. Consequently a "string" API +(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading +arbitrary sCAL chunks in the absence of either the floating point API or +internal floating point calculations. + +Applications no longer need to include the optional distribution header +file pngusr.h or define the corresponding macros during application +build in order to see the correct variant of the libpng API. From 1.5.0 +application code can check for the corresponding _SUPPORTED macro: + +#ifdef PNG_INCH_CONVERSIONS_SUPPORTED + /* code that uses the inch conversion APIs. */ +#endif + +This macro will only be defined if the inch conversion functions have been +compiled into libpng. The full set of macros, and whether or not support +has been compiled in, are available in the header file pnglibconf.h. +This header file is specific to the libpng build. Notice that prior to +1.5.0 the _SUPPORTED macros would always have the default definition unless +reset by pngusr.h or by explicit settings on the compiler command line. +These settings may produce compiler warnings or errors in 1.5.0 because +of macro redefinition. + +From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +function) incorrectly returned a value of type png_uint_32. libpng 1.5.0 +is consistent with the implementation in 1.4.5 and 1.2.x (where the macro +did not exist.) + +Applications can now choose whether to use these macros or to call the +corresponding function by defining PNG_USE_READ_MACROS or +PNG_NO_USE_READ_MACROS before including png.h. Notice that this is +only supported from 1.5.0 -defining PNG_NO_USE_READ_MACROS prior to 1.5.0 +will lead to a link failure. + +Prior to libpng-1.5.4, the zlib compressor used the same set of parameters +when compressing the IDAT data and textual data such as zTXt and iCCP. +In libpng-1.5.4 we reinitialized the zlib stream for each type of data. +We added five png_set_text_*() functions for setting the parameters to +use with textual data. + +Prior to libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED +option was off by default, and slightly inaccurate scaling occurred. +This option can no longer be turned off, and the choice of accurate +or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8() +API for accurate scaling or the old png_set_strip_16_to_8() API for simple +chopping. + +Prior to libpng-1.5.4, the png_set_user_limits() function could only be +used to reduce the width and height limits from the value of +PNG_USER_WIDTH_MAX and PNG_USER_HEIGHT_MAX, although this document said +that it could be used to override them. Now this function will reduce or +increase the limits. + +Starting in libpng-1.5.10, the user limits can be set en masse with the +configuration option PNG_SAFE_LIMITS_SUPPORTED. If this option is enabled, +a set of "safe" limits is applied in pngpriv.h. These can be overridden by +application calls to png_set_user_limits(), png_set_user_chunk_cache_max(), +and/or png_set_user_malloc_max() that increase or decrease the limits. Also, +in libpng-1.5.10 the default width and height limits were increased +from 1,000,000 to 0x7ffffff (i.e., made unlimited). Therefore, the +limits are now + default safe + png_user_width_max 0x7fffffff 1,000,000 + png_user_height_max 0x7fffffff 1,000,000 + png_user_chunk_cache_max 0 (unlimited) 128 + png_user_chunk_malloc_max 0 (unlimited) 8,000,000 + +B. Changes to the build and configuration of libpng + +Details of internal changes to the library code can be found in the CHANGES +file and in the GIT repository logs. These will be of no concern to the vast +majority of library users or builders; however, the few who configure libpng +to a non-default feature set may need to change how this is done. + +There should be no need for library builders to alter build scripts if +these use the distributed build support - configure or the makefiles - +however, users of the makefiles may care to update their build scripts +to build pnglibconf.h where the corresponding makefile does not do so. + +Building libpng with a non-default configuration has changed completely. +The old method using pngusr.h should still work correctly even though the +way pngusr.h is used in the build has been changed; however, library +builders will probably want to examine the changes to take advantage of +new capabilities and to simplify their build system. + +B.1 Specific changes to library configuration capabilities + +The library now supports a complete fixed point implementation and can +thus be used on systems that have no floating point support or very +limited or slow support. Previously gamma correction, an essential part +of complete PNG support, required reasonably fast floating point. + +As part of this the choice of internal implementation has been made +independent of the choice of fixed versus floating point APIs and all the +missing fixed point APIs have been implemented. + +The exact mechanism used to control attributes of API functions has +changed. A single set of operating system independent macro definitions +is used and operating system specific directives are defined in +pnglibconf.h + +As part of this the mechanism used to choose procedure call standards on +those systems that allow a choice has been changed. At present this only +affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems +running on Intel processors. As before, PNGAPI is defined where required +to control the exported API functions; however, two new macros, PNGCBAPI +and PNGCAPI, are used instead for callback functions (PNGCBAPI) and +(PNGCAPI) for functions that must match a C library prototype (currently +only png_longjmp_ptr, which must match the C longjmp function.) The new +approach is documented in pngconf.h + +Despite these changes, libpng 1.5.0 only supports the native C function +calling standard on those platforms tested so far (__cdecl on Microsoft +Windows). This is because the support requirements for alternative +calling conventions seem to no longer exist. Developers who find it +necessary to set PNG_API_RULE to 1 should advise the mailing list +(png-mng-implement) of this and library builders who use Openwatcom and +therefore set PNG_API_RULE to 2 should also contact the mailing list. + +A new test program, pngvalid, is provided in addition to pngtest. +pngvalid validates the arithmetic accuracy of the gamma correction +calculations and includes a number of validations of the file format. +A subset of the full range of tests is run when "make check" is done +(in the 'configure' build.) pngvalid also allows total allocated memory +usage to be evaluated and performs additional memory overwrite validation. + +Many changes to individual feature macros have been made. The following +are the changes most likely to be noticed by library builders who +configure libpng: + +1) All feature macros now have consistent naming: + +#define PNG_NO_feature turns the feature off +#define PNG_feature_SUPPORTED turns the feature on + +pnglibconf.h contains one line for each feature macro which is either: + +#define PNG_feature_SUPPORTED + +if the feature is supported or: + +/*#undef PNG_feature_SUPPORTED*/ + +if it is not. Library code consistently checks for the 'SUPPORTED' macro. +It does not, and libpng applications should not, check for the 'NO' macro +which will not normally be defined even if the feature is not supported. +The 'NO' macros are only used internally for setting or not setting the +corresponding 'SUPPORTED' macros. + +Compatibility with the old names is provided as follows: + +PNG_INCH_CONVERSIONS turns on PNG_INCH_CONVERSIONS_SUPPORTED + +And the following definitions disable the corresponding feature: + +PNG_SETJMP_NOT_SUPPORTED disables SETJMP +PNG_READ_TRANSFORMS_NOT_SUPPORTED disables READ_TRANSFORMS +PNG_NO_READ_COMPOSITED_NODIV disables READ_COMPOSITE_NODIV +PNG_WRITE_TRANSFORMS_NOT_SUPPORTED disables WRITE_TRANSFORMS +PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED disables READ_ANCILLARY_CHUNKS +PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED disables WRITE_ANCILLARY_CHUNKS + +Library builders should remove use of the above, inconsistent, names. + +2) Warning and error message formatting was previously conditional on +the STDIO feature. The library has been changed to use the +CONSOLE_IO feature instead. This means that if CONSOLE_IO is disabled +the library no longer uses the printf(3) functions, even though the +default read/write implementations use (FILE) style stdio.h functions. + +3) Three feature macros now control the fixed/floating point decisions: + +PNG_FLOATING_POINT_SUPPORTED enables the floating point APIs + +PNG_FIXED_POINT_SUPPORTED enables the fixed point APIs; however, in +practice these are normally required internally anyway (because the PNG +file format is fixed point), therefore in most cases PNG_NO_FIXED_POINT +merely stops the function from being exported. + +PNG_FLOATING_ARITHMETIC_SUPPORTED chooses between the internal floating +point implementation or the fixed point one. Typically the fixed point +implementation is larger and slower than the floating point implementation +on a system that supports floating point; however, it may be faster on a +system which lacks floating point hardware and therefore uses a software +emulation. + +4) Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the +functions to read and write ints to be disabled independently of +PNG_USE_READ_MACROS, which allows libpng to be built with the functions +even though the default is to use the macros - this allows applications +to choose at app buildtime whether or not to use macros (previously +impossible because the functions weren't in the default build.) + +B.2 Changes to the configuration mechanism + +Prior to libpng-1.5.0 library builders who needed to configure libpng +had either to modify the exported pngconf.h header file to add system +specific configuration or had to write feature selection macros into +pngusr.h and cause this to be included into pngconf.h by defining +PNG_USER_CONFIG. The latter mechanism had the disadvantage that an +application built without PNG_USER_CONFIG defined would see the +unmodified, default, libpng API and thus would probably fail to link. + +These mechanisms still work in the configure build and in any makefile +build that builds pnglibconf.h, although the feature selection macros +have changed somewhat as described above. In 1.5.0, however, pngusr.h is +processed only once, when the exported header file pnglibconf.h is built. +pngconf.h no longer includes pngusr.h, therefore pngusr.h is ignored after the +build of pnglibconf.h and it is never included in an application build. + +The rarely used alternative of adding a list of feature macros to the +CFLAGS setting in the build also still works; however, the macros will be +copied to pnglibconf.h and this may produce macro redefinition warnings +when the individual C files are compiled. + +All configuration now only works if pnglibconf.h is built from +scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan +(the original author of awk) maintains C source code of that awk and this +and all known later implementations (often called by subtly different +names - nawk and gawk for example) are adequate to build pnglibconf.h. +The Sun Microsystems (now Oracle) program 'awk' is an earlier version +and does not work; this may also apply to other systems that have a +functioning awk called 'nawk'. + +Configuration options are now documented in scripts/pnglibconf.dfa. This +file also includes dependency information that ensures a configuration is +consistent; that is, if a feature is switched off dependent features are +also removed. As a recommended alternative to using feature macros in +pngusr.h a system builder may also define equivalent options in pngusr.dfa +(or, indeed, any file) and add that to the configuration by setting +DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate +how to do this, and a case where pngusr.h is still required. + +XII. Changes to Libpng from version 1.5.x to 1.6.x + +A "simplified API" has been added (see documentation in png.h and a simple +example in contrib/examples/pngtopng.c). The new publicly visible API +includes the following: + + macros: + PNG_FORMAT_* + PNG_IMAGE_* + structures: + png_control + png_image + read functions + png_image_begin_read_from_file() + png_image_begin_read_from_stdio() + png_image_begin_read_from_memory() + png_image_finish_read() + png_image_free() + write functions + png_image_write_to_file() + png_image_write_to_stdio() + +Starting with libpng-1.6.0, you can configure libpng to prefix all exported +symbols, using the PNG_PREFIX macro. + +We no longer include string.h in png.h. The include statement has been moved +to pngpriv.h, where it is not accessible by applications. Applications that +need access to information in string.h must add an '#include "string.h"' +directive. It does not matter whether this is placed prior to or after +the '"#include png.h"' directive. + +The following API are now DEPRECATED: + png_info_init_3() + png_convert_to_rfc1123() which has been replaced + with png_convert_to_rfc1123_buffer() + png_data_freer() + png_malloc_default() + png_free_default() + png_reset_zstream() + +The following have been removed: + png_get_io_chunk_name(), which has been replaced + with png_get_io_chunk_type(). The new + function returns a 32-bit integer instead of + a string. + The png_sizeof(), png_strlen(), png_memcpy(), png_memcmp(), and + png_memset() macros are no longer used in the libpng sources and + have been removed. These had already been made invisible to applications + (i.e., defined in the private pngpriv.h header file) since libpng-1.5.0. + +The signatures of many exported functions were changed, such that + png_structp became png_structrp or png_const_structrp + png_infop became png_inforp or png_const_inforp +where "rp" indicates a "restricted pointer". + +Error detection in some chunks has improved; in particular the iCCP chunk +reader now does pretty complete validation of the basic format. Some bad +profiles that were previously accepted are now rejected, in particular the +very old broken Microsoft/HP sRGB profile. The PNG spec requirement that +only grayscale profiles may appear in images with color type 0 or 4 and that +even if the image only contains gray pixels, only RGB profiles may appear +in images with color type 2, 3, or 6, is now enforced. The sRGB chunk +is allowed to appear in images with any color type. + +The library now issues an error if the application attempts to set a +transform after it calls png_read_update_info(). + +The library now issues a warning if both background processing and RGB to +gray are used when gamma correction happens. As with previous versions of +the library the results are numerically very incorrect in this case. + +There are some minor arithmetic changes in some transforms such as +png_set_background(), that might be detected by certain regression tests. + +Unknown chunk handling has been improved internally, without any API change. +This adds more correct option control of the unknown handling, corrects +a pre-existing bug where the per-chunk 'keep' setting is ignored, and makes +it possible to skip IDAT chunks in the sequential reader. + +The machine-generated configure files are no longer included in branches +libpng16 and later of the GIT repository. They continue to be included +in the tarball releases, however. + +XIII. Detecting libpng + +The png_get_io_ptr() function has been present since libpng-0.88, has never +changed, and is unaffected by conditional compilation macros. It is the +best choice for use in configure scripts for detecting the presence of any +libpng version since 0.88. In an autoconf "configure.in" you could use + + AC_CHECK_LIB(png, png_get_io_ptr, ... + +XV. Source code repository + +Since about February 2009, version 1.2.34, libpng has been under "git" source +control. The git repository was built from old libpng-x.y.z.tar.gz files +going back to version 0.70. You can access the git repository (read only) +at + + git://git.code.sf.net/p/libpng/code + +or you can browse it with a web browser by selecting the "code" button at + + https://sourceforge.net/projects/libpng + +Patches can be sent to glennrp at users.sourceforge.net or to +png-mng-implement at lists.sourceforge.net or you can upload them to +the libpng bug tracker at + + http://libpng.sourceforge.net + +We also accept patches built from the tar or zip distributions, and +simple verbal discriptions of bug fixes, reported either to the +SourceForge bug tracker, to the png-mng-implement at lists.sf.net +mailing list, or directly to glennrp. + +XV. Coding style + +Our coding style is similar to the "Allman" style, with curly +braces on separate lines: + + if (condition) + { + action; + } + + else if (another condition) + { + another action; + } + +The braces can be omitted from simple one-line actions: + + if (condition) + return (0); + +We use 3-space indentation, except for continued statements which +are usually indented the same as the first line of the statement +plus four more spaces. + +For macro definitions we use 2-space indentation, always leaving the "#" +in the first column. + + #ifndef PNG_NO_FEATURE + # ifndef PNG_FEATURE_SUPPORTED + # define PNG_FEATURE_SUPPORTED + # endif + #endif + +Comments appear with the leading "/*" at the same indentation as +the statement that follows the comment: + + /* Single-line comment */ + statement; + + /* This is a multiple-line + * comment. + */ + statement; + +Very short comments can be placed after the end of the statement +to which they pertain: + + statement; /* comment */ + +We don't use C++ style ("//") comments. We have, however, +used them in the past in some now-abandoned MMX assembler +code. + +Functions and their curly braces are not indented, and +exported functions are marked with PNGAPI: + + /* This is a public function that is visible to + * application programmers. It does thus-and-so. + */ + void PNGAPI + png_exported_function(png_ptr, png_info, foo) + { + body; + } + +The prototypes for all exported functions appear in png.h, +above the comment that says + + /* Maintainer: Put new public prototypes here ... */ + +We mark all non-exported functions with "/* PRIVATE */"": + + void /* PRIVATE */ + png_non_exported_function(png_ptr, png_info, foo) + { + body; + } + +The prototypes for non-exported functions (except for those in +pngtest) appear in +pngpriv.h +above the comment that says + + /* Maintainer: Put new private prototypes here ^ */ + +We put a space after the "sizeof" operator and we omit the +optional parentheses around its argument when the argument +is an expression, not a type name, and we always enclose the +sizeof operator, with its argument, in parentheses: + + (sizeof (png_uint_32)) + (sizeof array) + +Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as +though it were a function. + +To avoid polluting the global namespace, the names of all exported +functions and variables begin with "png_", and all publicly visible C +preprocessor macros begin with "PNG". We request that applications that +use libpng *not* begin any of their own symbols with either of these strings. + +We put a space after each comma and after each semicolon +in "for" statements, and we put spaces before and after each +C binary operator and after "for" or "while", and before +"?". We don't put a space between a typecast and the expression +being cast, nor do we put one between a function name and the +left parenthesis that follows it: + + for (i = 2; i > 0; --i) + y[i] = a(x) + (int)b; + +We prefer #ifdef and #ifndef to #if defined() and #if !defined() +when there is only one macro being tested. We always use parentheses +with "defined". + +We prefer to express integers that are used as bit masks in hex format, +with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100). + +We prefer to use underscores in variable names rather than camelCase, except +for a few type names that we inherit from zlib.h. + +We do not use the TAB character for indentation in the C sources. + +Lines do not exceed 80 characters. + +Other rules can be inferred by inspecting the libpng source. + +XVI. Y2K Compliance in libpng + +April 25, 2013 + +Since the PNG Development group is an ad-hoc body, we can't make +an official declaration. + +This is your unofficial assurance that libpng from version 0.71 and +upward through 1.6.2 are Y2K compliant. It is my belief that earlier +versions were also Y2K compliant. + +Libpng only has two year fields. One is a 2-byte unsigned integer +that will hold years up to 65535. The other, which is deprecated, +holds the date in text format, and will hold years up to 9999. + +The integer is + "png_uint_16 year" in png_time_struct. + +The string is + "char time_buffer[29]" in png_struct. This is no longer used +in libpng-1.6.x and will be removed from libpng-1.7.0. + +There are seven time-related functions: + + png_convert_to_rfc_1123() in png.c + (formerly png_convert_to_rfc_1152() in error) + png_convert_from_struct_tm() in pngwrite.c, called + in pngwrite.c + png_convert_from_time_t() in pngwrite.c + png_get_tIME() in pngget.c + png_handle_tIME() in pngrutil.c, called in pngread.c + png_set_tIME() in pngset.c + png_write_tIME() in pngwutil.c, called in pngwrite.c + +All appear to handle dates properly in a Y2K environment. The +png_convert_from_time_t() function calls gmtime() to convert from system +clock time, which returns (year - 1900), which we properly convert to +the full 4-digit year. There is a possibility that applications using +libpng are not passing 4-digit years into the png_convert_to_rfc_1123() +function, or that they are incorrectly passing only a 2-digit year +instead of "year - 1900" into the png_convert_from_struct_tm() function, +but this is not under our control. The libpng documentation has always +stated that it works with 4-digit years, and the APIs have been +documented as such. + +The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned +integer to hold the year, and can hold years as large as 65535. + +zlib, upon which libpng depends, is also Y2K compliant. It contains +no date-related code. + + + Glenn Randers-Pehrson + libpng maintainer + PNG Development Group diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/libpng.3 b/3rdparty/wxwidgets3.0-3.0.1/src/png/libpng.3 new file mode 100644 index 0000000000..bbf2eaaa81 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/libpng.3 @@ -0,0 +1,6074 @@ +.TH LIBPNG 3 "April 25, 2013" +.SH NAME +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.2 +.SH SYNOPSIS +\fB +#include \fP + +\fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP + +\fBvoid png_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP + +\fBvoid png_build_grayscale_palette (int \fP\fIbit_depth\fP\fB, png_colorp \fIpalette\fP\fB);\fP + +\fBpng_voidp png_calloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP + +\fBvoid png_chunk_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP + +\fBvoid png_chunk_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP + +\fBvoid png_chunk_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP + +\fBvoid png_convert_from_struct_tm (png_timep \fP\fIptime\fP\fB, struct tm FAR * \fIttime\fP\fB);\fP + +\fBvoid png_convert_from_time_t (png_timep \fP\fIptime\fP\fB, time_t \fIttime\fP\fB);\fP + +\fBpng_charp png_convert_to_rfc1123 (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fIptime\fP\fB);\fP + +\fBpng_infop png_create_info_struct (png_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_structp png_create_read_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP + +\fBpng_structp png_create_read_struct_2 (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP + +\fBpng_structp png_create_write_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP + +\fBpng_structp png_create_write_struct_2 (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP + +\fBvoid png_data_freer (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIfreer\fP\fB, png_uint_32 \fImask)\fP\fB);\fP + +\fBvoid png_destroy_info_struct (png_structp \fP\fIpng_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP + +\fBvoid png_destroy_read_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fP\fIinfo_ptr_ptr\fP\fB, png_infopp \fIend_info_ptr_ptr\fP\fB);\fP + +\fBvoid png_destroy_write_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP + +\fBvoid png_err (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP + +\fBvoid png_free (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP + +\fBvoid png_free_chunk_list (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_free_default (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP + +\fBvoid png_free_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fInum\fP\fB);\fP + +\fBpng_byte png_get_bit_depth (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_bKGD (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fI*background\fP\fB);\fP + +\fBpng_byte png_get_channels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_cHRM (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*white_x\fP\fB, double \fP\fI*white_y\fP\fB, double \fP\fI*red_x\fP\fB, double \fP\fI*red_y\fP\fB, double \fP\fI*green_x\fP\fB, double \fP\fI*green_y\fP\fB, double \fP\fI*blue_x\fP\fB, double \fI*blue_y\fP\fB);\fP + +\fBpng_uint_32 png_get_cHRM_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*white_x\fP\fB, png_uint_32 \fP\fI*white_y\fP\fB, png_uint_32 \fP\fI*red_x\fP\fB, png_uint_32 \fP\fI*red_y\fP\fB, png_uint_32 \fP\fI*green_x\fP\fB, png_uint_32 \fP\fI*green_y\fP\fB, png_uint_32 \fP\fI*blue_x\fP\fB, png_uint_32 \fI*blue_y\fP\fB);\fP + +\fBpng_uint_32 png_get_cHRM_XYZ (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*red_X\fP\fB, double \fP\fI*red_Y\fP\fB, double \fP\fI*red_Z\fP\fB, double \fP\fI*green_X\fP\fB, double \fP\fI*green_Y\fP\fB, double \fP\fI*green_Z\fP\fB, double \fP\fI*blue_X\fP\fB, double \fP\fI*blue_Y\fP\fB, double \fI*blue_Z\fP\fB);\fP + +\fBpng_uint_32 png_get_cHRM_XYZ_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_fixed_point \fP\fI*int_red_X\fP\fB, png_fixed_point \fP\fI*int_red_Y\fP\fB, png_fixed_point \fP\fI*int_red_Z\fP\fB, png_fixed_point \fP\fI*int_green_X\fP\fB, png_fixed_point \fP\fI*int_green_Y\fP\fB, png_fixed_point \fP\fI*int_green_Z\fP\fB, png_fixed_point \fP\fI*int_blue_X\fP\fB, png_fixed_point \fP\fI*int_blue_Y\fP\fB, png_fixed_point \fI*int_blue_Z\fP\fB);\fP + +\fBpng_uint_32 png_get_chunk_cache_max (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_alloc_size_t png_get_chunk_malloc_max (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_byte png_get_color_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_compression_buffer_size (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_byte png_get_compression_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_byte png_get_copyright (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_current_row_number \fI(png_const_structp\fP\fB);\fP + +\fBpng_byte png_get_current_pass_number \fI(png_const_structp\fP\fB);\fP + +\fBpng_voidp png_get_error_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_byte png_get_filter_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_gAMA (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, double \fI*file_gamma\fP\fB);\fP + +\fBpng_uint_32 png_get_gAMA_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fI*int_file_gamma\fP\fB);\fP + +\fBpng_byte png_get_header_ver (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_byte png_get_header_version (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_hIST (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP + +\fBpng_uint_32 png_get_iCCP (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_bytepp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP + +\fBpng_uint_32 png_get_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*width\fP\fB, png_uint_32 \fP\fI*height\fP\fB, int \fP\fI*bit_depth\fP\fB, int \fP\fI*color_type\fP\fB, int \fP\fI*interlace_type\fP\fB, int \fP\fI*compression_type\fP\fB, int \fI*filter_type\fP\fB);\fP + +\fBpng_uint_32 png_get_image_height (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_image_width (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_int_32 png_get_int_32 (png_bytep \fIbuf\fP\fB);\fP + +\fBpng_byte png_get_interlace_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_io_chunk_type (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_voidp png_get_io_ptr (png_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_io_state (png_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_byte png_get_libpng_ver (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_voidp png_get_mem_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_oFFs (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*offset_x\fP\fB, png_uint_32 \fP\fI*offset_y\fP\fB, int \fI*unit_type\fP\fB);\fP + +\fBpng_uint_32 png_get_pCAL (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fI*purpose\fP\fB, png_int_32 \fP\fI*X0\fP\fB, png_int_32 \fP\fI*X1\fP\fB, int \fP\fI*type\fP\fB, int \fP\fI*nparams\fP\fB, png_charp \fP\fI*units\fP\fB, png_charpp \fI*params\fP\fB);\fP + +\fBpng_uint_32 png_get_pHYs (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP + +\fBfloat png_get_pixel_aspect_ratio (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_pHYs_dpi (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP + +\fBpng_fixed_point png_get_pixel_aspect_ratio_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_voidp png_get_progressive_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_PLTE (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fI*palette\fP\fB, int \fI*num_palette\fP\fB);\fP + +\fBpng_byte png_get_rgb_to_gray_status (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_rowbytes (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_bytepp png_get_rows (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_sBIT (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fI*sig_bit\fP\fB);\fP + +\fBvoid png_get_sCAL (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, double* \fP\fIwidth\fP\fB, double* \fIheight\fP\fB);\fP + +\fBvoid png_get_sCAL_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, png_fixed_pointp \fP\fIwidth\fP\fB, png_fixed_pointp \fIheight\fP\fB);\fP + +\fBvoid png_get_sCAL_s (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, png_charpp \fP\fIwidth\fP\fB, png_charpp \fIheight\fP\fB);\fP + +\fBpng_bytep png_get_signature (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_sPLT (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fI*splt_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_sRGB (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int \fI*file_srgb_intent\fP\fB);\fP + +\fBpng_uint_32 png_get_text (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fI*text_ptr\fP\fB, int \fI*num_text\fP\fB);\fP + +\fBpng_uint_32 png_get_tIME (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fI*mod_time\fP\fB);\fP + +\fBpng_uint_32 png_get_tRNS (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans_alpha\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_color\fP\fB);\fP + +\fB/* This function is really an inline macro. \fI*/ + +\fBpng_uint_16 png_get_uint_16 (png_bytep \fIbuf\fP\fB);\fP + +\fBpng_uint_32 png_get_uint_31 (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIbuf\fP\fB);\fP + +\fB/* This function is really an inline macro. \fI*/ + +\fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP + +\fBpng_uint_32 png_get_unknown_chunks (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP + +\fBpng_voidp png_get_user_chunk_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_user_height_max (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_voidp png_get_user_transform_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_user_width_max (png_const_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_valid (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIflag\fP\fB);\fP + +\fBfloat png_get_x_offset_inches (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_fixed_point png_get_x_offset_inches_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_int_32 png_get_x_offset_microns (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_int_32 png_get_x_offset_pixels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_x_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_x_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBfloat png_get_y_offset_inches (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_fixed_point png_get_y_offset_inches_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_int_32 png_get_y_offset_microns (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_int_32 png_get_y_offset_pixels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_y_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBpng_uint_32 png_get_y_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP + +\fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP + +\fBint png_image_begin_read_from_file (png_imagep \fP\fIimage\fP\fB, const char \fI*file_name\fP\fB);\fP + +\fBint png_image_begin_read_from_stdio (png_imagep \fP\fIimage\fP\fB, FILE* \fIfile\fP\fB);\fP + +\fBint, png_image_begin_read_from_memory (png_imagep \fP\fIimage\fP\fB, png_const_voidp \fP\fImemory\fP\fB, png_size_t \fIsize\fP\fB);\fP + +\fBint png_image_finish_read (png_imagep \fP\fIimage\fP\fB, png_colorp \fP\fIbackground\fP\fB, void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, void \fI*colormap\fP\fB);\fP + +\fBvoid png_image_free (png_imagep \fIimage\fP\fB);\fP + +\fBint png_image_write_to_file (png_imagep \fP\fIimage\fP\fB, const char \fP\fI*file\fP\fB, int \fP\fIconvert_to_8bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, void \fI*colormap\fP\fB);\fP + +\fBint png_image_write_to_stdio (png_imagep \fP\fIimage\fP\fB, FILE \fP\fI*file\fP\fB, int \fP\fIconvert_to_8_bit\fP\fB, const void \fP\fI*buffer\fP\fB, png_int_32 \fP\fIrow_stride\fP\fB, void \fI*colormap)\fP\fB);\fP + +\fBvoid png_info_init_3 (png_infopp \fP\fIinfo_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP + +\fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP + +\fBvoid png_longjmp (png_structp \fP\fIpng_ptr\fP\fB, int \fIval\fP\fB);\fP + +\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP + +\fBpng_voidp png_malloc_default (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP + +\fBpng_voidp png_malloc_warn (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP + +\fBpng_uint_32 png_permit_mng_features (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fImng_features_permitted\fP\fB);\fP + +\fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_size\fP\fB);\fP + +\fBpng_size_t png_process_data_pause \fP\fI(png_structp\fP\fB, int \fIsave\fP\fB);\fP + +\fBpng_uint_32 png_process_data_skip \fI(png_structp\fP\fB);\fP + +\fBvoid png_progressive_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIold_row\fP\fB, png_bytep \fInew_row\fP\fB);\fP + +\fBvoid png_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fBvoid png_read_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP + +\fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fBvoid png_read_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP + +\fBvoid png_read_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fIdisplay_row\fP\fB);\fP + +\fBvoid png_read_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_bytepp \fP\fIdisplay_row\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP + +\fBvoid png_read_update_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fBint png_reset_zstream (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP + +\fBvoid png_save_uint_16 (png_bytep \fP\fIbuf\fP\fB, unsigned int \fIi\fP\fB);\fP + +\fBvoid png_save_uint_32 (png_bytep \fP\fIbuf\fP\fB, png_uint_32 \fIi\fP\fB);\fP + +\fBvoid png_set_add_alpha (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP + +\fBvoid png_set_alpha_mode (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImode\fP\fB, double \fIoutput_gamma\fP\fB);\fP + +\fBvoid png_set_alpha_mode_fixed (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImode\fP\fB, png_fixed_point \fIoutput_gamma\fP\fB);\fP + +\fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP + +\fBvoid png_set_background_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, png_uint_32 \fIbackground_gamma\fP\fB);\fP + +\fBvoid png_set_benign_errors (png_structp \fP\fIpng_ptr\fP\fB, int \fIallowed\fP\fB);\fP + +\fBvoid png_set_bgr (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fIbackground\fP\fB);\fP + +\fBvoid png_set_check_for_invalid_index(png_structrp \fP\fIpng_ptr\fP\fB, int \fIallowed\fP\fB);\fP + +\fBvoid png_set_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP + +\fBvoid png_set_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP + +\fBvoid png_set_cHRM_XYZ (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fIred_X\fP\fB, double \fP\fIred_Y\fP\fB, double \fP\fIred_Z\fP\fB, double \fP\fIgreen_X\fP\fB, double \fP\fIgreen_Y\fP\fB, double \fP\fIgreen_Z\fP\fB, double \fP\fIblue_X\fP\fB, double \fP\fIblue_Y\fP\fB, double \fIblue_Z\fP\fB);\fP + +\fBvoid png_set_cHRM_XYZ_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_fixed_point \fP\fIint_red_X\fP\fB, png_fixed_point \fP\fIint_red_Y\fP\fB, png_fixed_point \fP\fIint_red_Z\fP\fB, png_fixed_point \fP\fIint_green_X\fP\fB, png_fixed_point \fP\fIint_green_Y\fP\fB, png_fixed_point \fP\fIint_green_Z\fP\fB, png_fixed_point \fP\fIint_blue_X\fP\fB, png_fixed_point \fP\fIint_blue_Y\fP\fB, png_fixed_point \fIint_blue_Z\fP\fB);\fP + +\fBvoid png_set_chunk_cache_max (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIuser_chunk_cache_max\fP\fB);\fP + +\fBvoid png_set_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP + +\fBvoid png_set_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP + +\fBvoid png_set_compression_method (png_structp \fP\fIpng_ptr\fP\fB, int \fImethod\fP\fB);\fP + +\fBvoid png_set_compression_strategy (png_structp \fP\fIpng_ptr\fP\fB, int \fIstrategy\fP\fB);\fP + +\fBvoid png_set_compression_window_bits (png_structp \fP\fIpng_ptr\fP\fB, int \fIwindow_bits\fP\fB);\fP + +\fBvoid png_set_crc_action (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcrit_action\fP\fB, int \fIancil_action\fP\fB);\fP + +\fBvoid png_set_error_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarning_fn\fP\fB);\fP + +\fBvoid png_set_expand (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_expand_16 (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_expand_gray_1_2_4_to_8 (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_filler (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP + +\fBvoid png_set_filter (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImethod\fP\fB, int \fIfilters\fP\fB);\fP + +\fBvoid png_set_filter_heuristics (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIheuristic_method\fP\fB, int \fP\fInum_weights\fP\fB, png_doublep \fP\fIfilter_weights\fP\fB, png_doublep \fIfilter_costs\fP\fB);\fP + +\fBvoid png_set_filter_heuristics_fixed (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIheuristic_method\fP\fB, int \fP\fInum_weights\fP\fB, png_fixed_point_p \fP\fIfilter_weights\fP\fB, png_fixed_point_p \fIfilter_costs\fP\fB);\fP + +\fBvoid png_set_flush (png_structp \fP\fIpng_ptr\fP\fB, int \fInrows\fP\fB);\fP + +\fBvoid png_set_gamma (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIscreen_gamma\fP\fB, double \fIdefault_file_gamma\fP\fB);\fP + +\fBvoid png_set_gamma_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIscreen_gamma\fP\fB, png_uint_32 \fIdefault_file_gamma\fP\fB);\fP + +\fBvoid png_set_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP + +\fBvoid png_set_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIfile_gamma\fP\fB);\fP + +\fBvoid png_set_gray_1_2_4_to_8 (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_gray_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fIhist\fP\fB);\fP + +\fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_const_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_const_bytep \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP + +\fBint png_set_interlace_handling (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_invalid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fImask\fP\fB);\fP + +\fBvoid png_set_invert_alpha (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_invert_mono (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIinterlace_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fIfilter_type\fP\fB);\fP + +\fBvoid png_set_keep_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIkeep\fP\fB, png_bytep \fP\fIchunk_list\fP\fB, int \fInum_chunks\fP\fB);\fP + +\fBjmp_buf* png_set_longjmp_fn (png_structp \fP\fIpng_ptr\fP\fB, png_longjmp_ptr \fP\fIlongjmp_fn\fP\fB, size_t \fIjmp_buf_size\fP\fB);\fP + +\fBvoid png_set_chunk_malloc_max (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIuser_chunk_cache_max\fP\fB);\fP + +\fBvoid png_set_compression_buffer_size (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP + +\fBvoid png_set_mem_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP + +\fBvoid png_set_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIoffset_x\fP\fB, png_uint_32 \fP\fIoffset_y\fP\fB, int \fIunit_type\fP\fB);\fP + +\fBvoid png_set_packing (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_packswap (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_palette_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIpurpose\fP\fB, png_int_32 \fP\fIX0\fP\fB, png_int_32 \fP\fIX1\fP\fB, int \fP\fItype\fP\fB, int \fP\fInparams\fP\fB, png_charp \fP\fIunits\fP\fB, png_charpp \fIparams\fP\fB);\fP + +\fBvoid png_set_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIres_x\fP\fB, png_uint_32 \fP\fIres_y\fP\fB, int \fIunit_type\fP\fB);\fP + +\fBvoid png_set_progressive_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIprogressive_ptr\fP\fB, png_progressive_info_ptr \fP\fIinfo_fn\fP\fB, png_progressive_row_ptr \fP\fIrow_fn\fP\fB, png_progressive_end_ptr \fIend_fn\fP\fB);\fP + +\fBvoid png_set_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fInum_palette\fP\fB);\fP + +\fBvoid png_set_quantize (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fP\fInum_palette\fP\fB, int \fP\fImaximum_colors\fP\fB, png_uint_16p \fP\fIhistogram\fP\fB, int \fIfull_quantize\fP\fB);\fP + +\fBvoid png_set_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fIread_data_fn\fP\fB);\fP + +\fBvoid png_set_read_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_read_status_ptr \fIread_row_fn\fP\fB);\fP + +\fBvoid png_set_read_user_chunk_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_chunk_ptr\fP\fB, png_user_chunk_ptr \fIread_user_chunk_fn\fP\fB);\fP + +\fBvoid png_set_read_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIread_user_transform_fn\fP\fB);\fP + +\fBvoid png_set_rgb_to_gray (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIerror_action\fP\fB, double \fP\fIred\fP\fB, double \fIgreen\fP\fB);\fP + +\fBvoid png_set_rgb_to_gray_fixed (png_structp \fP\fIpng_ptr\fP\fB, int error_action png_uint_32 \fP\fIred\fP\fB, png_uint_32 \fIgreen\fP\fB);\fP + +\fBvoid png_set_rows (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytepp \fIrow_pointers\fP\fB);\fP + +\fBvoid png_set_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fIsig_bit\fP\fB);\fP + +\fBvoid png_set_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP + +\fBvoid png_set_sCAL_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, png_fixed_point \fP\fIwidth\fP\fB, png_fixed_point \fIheight\fP\fB);\fP + +\fBvoid png_set_sCAL_s (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, png_charp \fP\fIwidth\fP\fB, png_charp \fIheight\fP\fB);\fP + +\fBvoid png_set_scale_16 (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_shift (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fItrue_bits\fP\fB);\fP + +\fBvoid png_set_sig_bytes (png_structp \fP\fIpng_ptr\fP\fB, int \fInum_bytes\fP\fB);\fP + +\fBvoid png_set_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fP\fIsplt_ptr\fP\fB, int \fInum_spalettes\fP\fB);\fP + +\fBvoid png_set_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIsrgb_intent\fP\fB);\fP + +\fBvoid png_set_sRGB_gAMA_and_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIsrgb_intent\fP\fB);\fP + +\fBvoid png_set_strip_16 (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_strip_alpha (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_strip_error_numbers (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIstrip_mode\fP\fB);\fP + +\fBvoid png_set_swap (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_swap_alpha (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_set_text (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text\fP\fB);\fP + +\fBvoid png_set_text_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP + +\fBvoid png_set_text_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP + +\fBvoid png_set_text_compression_strategy (png_structp \fP\fIpng_ptr\fP\fB, int \fIstrategy\fP\fB);\fP + +\fBvoid png_set_text_compression_window_bits (png_structp \fP\fIpng_ptr\fP\fB, int \fIwindow_bits\fP\fB);\fP + +\fBvoid \fP\fIpng_set_text_compression_method\fP\fB, (png_structp \fP\fIpng_ptr\fP\fB, int \fImethod)\fP\fB);\fP + +\fBvoid png_set_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP + +\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans_alpha\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_color\fP\fB);\fP + +\fBvoid png_set_tRNS_to_alpha (png_structp \fIpng_ptr\fP\fB);\fP + +\fBpng_uint_32 png_set_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkp \fP\fIunknowns\fP\fB, int \fP\fInum\fP\fB, int \fIlocation\fP\fB);\fP + +\fBvoid png_set_unknown_chunk_location (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIchunk\fP\fB, int \fIlocation\fP\fB);\fP + +\fBvoid png_set_user_limits (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIuser_width_max\fP\fB, png_uint_32 \fIuser_height_max\fP\fB);\fP + +\fBvoid png_set_user_transform_info (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_transform_ptr\fP\fB, int \fP\fIuser_transform_depth\fP\fB, int \fIuser_transform_channels\fP\fB);\fP + +\fBvoid png_set_write_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fP\fIwrite_data_fn\fP\fB, png_flush_ptr \fIoutput_flush_fn\fP\fB);\fP + +\fBvoid png_set_write_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_write_status_ptr \fIwrite_row_fn\fP\fB);\fP + +\fBvoid png_set_write_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIwrite_user_transform_fn\fP\fB);\fP + +\fBint png_sig_cmp (png_bytep \fP\fIsig\fP\fB, png_size_t \fP\fIstart\fP\fB, png_size_t \fInum_to_check\fP\fB);\fP + +\fBvoid png_start_read_image (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP + +\fBvoid png_write_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP + +\fBvoid png_write_chunk_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP + +\fBvoid png_write_chunk_end (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_write_chunk_start (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fBvoid png_write_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fBvoid png_write_flush (png_structp \fIpng_ptr\fP\fB);\fP + +\fBvoid png_write_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP + +\fBvoid png_write_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fBvoid png_write_info_before_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fBvoid png_write_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP + +\fBvoid png_write_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fBvoid png_write_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP + +\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP + +.SH DESCRIPTION +The +.I libpng +library supports encoding, decoding, and various manipulations of +the Portable Network Graphics (PNG) format image files. It uses the +.IR zlib(3) +compression library. +Following is a copy of the libpng-manual.txt file that accompanies libpng. +.SH LIBPNG.TXT +libpng-manual.txt - A description on how to use and modify libpng + + libpng version 1.6.2 - April 25, 2013 + Updated and distributed by Glenn Randers-Pehrson + + Copyright (c) 1998-2013 Glenn Randers-Pehrson + + This document is released under the libpng license. + For conditions of distribution and use, see the disclaimer + and license in png.h + + Based on: + + libpng versions 0.97, January 1998, through 1.6.2 - April 25, 2013 + Updated and distributed by Glenn Randers-Pehrson + Copyright (c) 1998-2013 Glenn Randers-Pehrson + + libpng 1.0 beta 6 version 0.96 May 28, 1997 + Updated and distributed by Andreas Dilger + Copyright (c) 1996, 1997 Andreas Dilger + + libpng 1.0 beta 2 - version 0.88 January 26, 1996 + For conditions of distribution and use, see copyright + notice in png.h. Copyright (c) 1995, 1996 Guy Eric + Schalnat, Group 42, Inc. + + Updated/rewritten per request in the libpng FAQ + Copyright (c) 1995, 1996 Frank J. T. Wojcik + December 18, 1995 & January 20, 1996 + + TABLE OF CONTENTS + + I. Introduction + II. Structures + III. Reading + IV. Writing + V. Simplified API + VI. Modifying/Customizing libpng + VII. MNG support + VIII. Changes to Libpng from version 0.88 + IX. Changes to Libpng from version 1.0.x to 1.2.x + X. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x + XI. Changes to Libpng from version 1.4.x to 1.5.x + XII. Changes to Libpng from version 1.5.x to 1.6.x + XIII. Detecting libpng + XIV. Source code repository + XV. Coding style + XVI. Y2K Compliance in libpng + +.SH I. Introduction + +This file describes how to use and modify the PNG reference library +(known as libpng) for your own use. There are five sections to this +file: introduction, structures, reading, writing, and modification and +configuration notes for various special platforms. In addition to this +file, example.c is a good starting point for using the library, as +it is heavily commented and should include everything most people +will need. We assume that libpng is already installed; see the +INSTALL file for instructions on how to install libpng. + +For examples of libpng usage, see the files "example.c", "pngtest.c", +and the files in the "contrib" directory, all of which are included in +the libpng distribution. + +Libpng was written as a companion to the PNG specification, as a way +of reducing the amount of time and effort it takes to support the PNG +file format in application programs. + +The PNG specification (second edition), November 2003, is available as +a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at +. It is technically equivalent +to the PNG specification (second edition) but has some additional material. + +The PNG-1.0 specification is available +as RFC 2083 and as a +W3C Recommendation . + +Some additional chunks are described in the special-purpose public chunks +documents at . + +Other information +about PNG, and the latest version of libpng, can be found at the PNG home +page, . + +Most users will not have to modify the library significantly; advanced +users may want to modify it more. All attempts were made to make it as +complete as possible, while keeping the code easy to understand. +Currently, this library only supports C. Support for other languages +is being considered. + +Libpng has been designed to handle multiple sessions at one time, +to be easily modifiable, to be portable to the vast majority of +machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy +to use. The ultimate goal of libpng is to promote the acceptance of +the PNG file format in whatever way possible. While there is still +work to be done (see the TODO file), libpng should cover the +majority of the needs of its users. + +Libpng uses zlib for its compression and decompression of PNG files. +Further information about zlib, and the latest version of zlib, can +be found at the zlib home page, . +The zlib compression utility is a general purpose utility that is +useful for more than PNG files, and can be used without libpng. +See the documentation delivered with zlib for more details. +You can usually find the source files for the zlib utility wherever you +find the libpng source files. + +Libpng is thread safe, provided the threads are using different +instances of the structures. Each thread should have its own +png_struct and png_info instances, and thus its own image. +Libpng does not protect itself against two threads using the +same instance of a structure. + +.SH II. Structures + +There are two main structures that are important to libpng, png_struct +and png_info. Both are internal structures that are no longer exposed +in the libpng interface (as of libpng 1.5.0). + +The png_info structure is designed to provide information about the +PNG file. At one time, the fields of png_info were intended to be +directly accessible to the user. However, this tended to cause problems +with applications using dynamically loaded libraries, and as a result +a set of interface functions for png_info (the png_get_*() and png_set_*() +functions) was developed, and direct access to the png_info fields was +deprecated.. + +The png_struct structure is the object used by the library to decode a +single image. As of 1.5.0 this structure is also not exposed. + +Almost all libpng APIs require a pointer to a png_struct as the first argument. +Many (in particular the png_set and png_get APIs) also require a pointer +to png_info as the second argument. Some application visible macros +defined in png.h designed for basic data access (reading and writing +integers in the PNG format) don't take a png_info pointer, but it's almost +always safe to assume that a (png_struct*) has to be passed to call an API +function. + +You can have more than one png_info structure associated with an image, +as illustrated in pngtest.c, one for information valid prior to the +IDAT chunks and another (called "end_info" below) for things after them. + +The png.h header file is an invaluable reference for programming with libpng. +And while I'm on the topic, make sure you include the libpng header file: + +#include + +and also (as of libpng-1.5.0) the zlib header file, if you need it: + +#include + +.SS Types + +The png.h header file defines a number of integral types used by the +APIs. Most of these are fairly obvious; for example types corresponding +to integers of particular sizes and types for passing color values. + +One exception is how non-integral numbers are handled. For application +convenience most APIs that take such numbers have C (double) arguments; +however, internally PNG, and libpng, use 32 bit signed integers and encode +the value by multiplying by 100,000. As of libpng 1.5.0 a convenience +macro PNG_FP_1 is defined in png.h along with a type (png_fixed_point) +which is simply (png_int_32). + +All APIs that take (double) arguments also have a matching API that +takes the corresponding fixed point integer arguments. The fixed point +API has the same name as the floating point one with "_fixed" appended. +The actual range of values permitted in the APIs is frequently less than +the full range of (png_fixed_point) (-21474 to +21474). When APIs require +a non-negative argument the type is recorded as png_uint_32 above. Consult +the header file and the text below for more information. + +Special care must be take with sCAL chunk handling because the chunk itself +uses non-integral values encoded as strings containing decimal floating point +numbers. See the comments in the header file. + +.SS Configuration + +The main header file function declarations are frequently protected by C +preprocessing directives of the form: + + #ifdef PNG_feature_SUPPORTED + declare-function + #endif + ... + #ifdef PNG_feature_SUPPORTED + use-function + #endif + +The library can be built without support for these APIs, although a +standard build will have all implemented APIs. Application programs +should check the feature macros before using an API for maximum +portability. From libpng 1.5.0 the feature macros set during the build +of libpng are recorded in the header file "pnglibconf.h" and this file +is always included by png.h. + +If you don't need to change the library configuration from the default, skip to +the next section ("Reading"). + +Notice that some of the makefiles in the 'scripts' directory and (in 1.5.0) all +of the build project files in the 'projects' directory simply copy +scripts/pnglibconf.h.prebuilt to pnglibconf.h. This means that these build +systems do not permit easy auto-configuration of the library - they only +support the default configuration. + +The easiest way to make minor changes to the libpng configuration when +auto-configuration is supported is to add definitions to the command line +using (typically) CPPFLAGS. For example: + +CPPFLAGS=-DPNG_NO_FLOATING_ARITHMETIC + +will change the internal libpng math implementation for gamma correction and +other arithmetic calculations to fixed point, avoiding the need for fast +floating point support. The result can be seen in the generated pnglibconf.h - +make sure it contains the changed feature macro setting. + +If you need to make more extensive configuration changes - more than one or two +feature macro settings - you can either add -DPNG_USER_CONFIG to the build +command line and put a list of feature macro settings in pngusr.h or you can set +DFA_XTRA (a makefile variable) to a file containing the same information in the +form of 'option' settings. + +A. Changing pnglibconf.h + +A variety of methods exist to build libpng. Not all of these support +reconfiguration of pnglibconf.h. To reconfigure pnglibconf.h it must either be +rebuilt from scripts/pnglibconf.dfa using awk or it must be edited by hand. + +Hand editing is achieved by copying scripts/pnglibconf.h.prebuilt to +pnglibconf.h and changing the lines defining the supported features, paying +very close attention to the 'option' information in scripts/pnglibconf.dfa +that describes those features and their requirements. This is easy to get +wrong. + +B. Configuration using DFA_XTRA + +Rebuilding from pnglibconf.dfa is easy if a functioning 'awk', or a later +variant such as 'nawk' or 'gawk', is available. The configure build will +automatically find an appropriate awk and build pnglibconf.h. +The scripts/pnglibconf.mak file contains a set of make rules for doing the +same thing if configure is not used, and many of the makefiles in the scripts +directory use this approach. + +When rebuilding simply write a new file containing changed options and set +DFA_XTRA to the name of this file. This causes the build to append the new file +to the end of scripts/pnglibconf.dfa. The pngusr.dfa file should contain lines +of the following forms: + +everything = off + +This turns all optional features off. Include it at the start of pngusr.dfa to +make it easier to build a minimal configuration. You will need to turn at least +some features on afterward to enable either reading or writing code, or both. + +option feature on +option feature off + +Enable or disable a single feature. This will automatically enable other +features required by a feature that is turned on or disable other features that +require a feature which is turned off. Conflicting settings will cause an error +message to be emitted by awk. + +setting feature default value + +Changes the default value of setting 'feature' to 'value'. There are a small +number of settings listed at the top of pnglibconf.h, they are documented in the +source code. Most of these values have performance implications for the library +but most of them have no visible effect on the API. Some can also be overridden +from the API. + +This method of building a customized pnglibconf.h is illustrated in +contrib/pngminim/*. See the "$(PNGCONF):" target in the makefile and +pngusr.dfa in these directories. + +C. Configuration using PNG_USR_CONFIG + +If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file +pngusr.h will automatically be included before the options in +scripts/pnglibconf.dfa are processed. Your pngusr.h file should contain only +macro definitions turning features on or off or setting settings. + +Apart from the global setting "everything = off" all the options listed above +can be set using macros in pngusr.h: + +#define PNG_feature_SUPPORTED + +is equivalent to: + +option feature on + +#define PNG_NO_feature + +is equivalent to: + +option feature off + +#define PNG_feature value + +is equivalent to: + +setting feature default value + +Notice that in both cases, pngusr.dfa and pngusr.h, the contents of the +pngusr file you supply override the contents of scripts/pnglibconf.dfa + +If confusing or incomprehensible behavior results it is possible to +examine the intermediate file pnglibconf.dfn to find the full set of +dependency information for each setting and option. Simply locate the +feature in the file and read the C comments that precede it. + +This method is also illustrated in the contrib/pngminim/* makefiles and +pngusr.h. + +.SH III. Reading + +We'll now walk you through the possible functions to call when reading +in a PNG file sequentially, briefly explaining the syntax and purpose +of each one. See example.c and png.h for more detail. While +progressive reading is covered in the next section, you will still +need some of the functions discussed in this section to read a PNG +file. + +.SS Setup + +You will want to do the I/O initialization(*) before you get into libpng, +so if it doesn't work, you don't have much to undo. Of course, you +will also want to insure that you are, in fact, dealing with a PNG +file. Libpng provides a simple check to see if a file is a PNG file. +To use it, pass in the first 1 to 8 bytes of the file to the function +png_sig_cmp(), and it will return 0 (false) if the bytes match the +corresponding bytes of the PNG signature, or nonzero (true) otherwise. +Of course, the more bytes you pass in, the greater the accuracy of the +prediction. + +If you are intending to keep the file pointer open for use in libpng, +you must ensure you don't read more than 8 bytes from the beginning +of the file, and you also have to make a call to png_set_sig_bytes_read() +with the number of bytes you read from the beginning. Libpng will +then only check the bytes (if any) that your program didn't read. + +(*): If you are not using the standard I/O functions, you will need +to replace them with custom functions. See the discussion under +Customizing libpng. + + + FILE *fp = fopen(file_name, "rb"); + if (!fp) + { + return (ERROR); + } + + fread(header, 1, number, fp); + is_png = !png_sig_cmp(header, 0, number); + + if (!is_png) + { + return (NOT_PNG); + } + + +Next, png_struct and png_info need to be allocated and initialized. In +order to ensure that the size of these structures is correct even with a +dynamically linked libpng, there are functions to initialize and +allocate the structures. We also pass the library version, optional +pointers to error handling functions, and a pointer to a data struct for +use by the error functions, if necessary (the pointer and functions can +be NULL if the default error handlers are to be used). See the section +on Changes to Libpng below regarding the old initialization functions. +The structure allocation functions quietly return NULL if they fail to +create the structure, so your application should check for that. + + png_structp png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + + if (!png_ptr) + return (ERROR); + + png_infop info_ptr = png_create_info_struct(png_ptr); + + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); + return (ERROR); + } + +If you want to use your own memory allocation routines, +use a libpng that was built with PNG_USER_MEM_SUPPORTED defined, and use +png_create_read_struct_2() instead of png_create_read_struct(): + + png_structp png_ptr = png_create_read_struct_2 + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn, (png_voidp) + user_mem_ptr, user_malloc_fn, user_free_fn); + +The error handling routines passed to png_create_read_struct() +and the memory alloc/free routines passed to png_create_struct_2() +are only necessary if you are not using the libpng supplied error +handling and memory alloc/free functions. + +When libpng encounters an error, it expects to longjmp back +to your routine. Therefore, you will need to call setjmp and pass +your png_jmpbuf(png_ptr). If you read the file from different +routines, you will need to update the longjmp buffer every time you enter +a new routine that will call a png_*() function. + +See your documentation of setjmp/longjmp for your compiler for more +information on setjmp/longjmp. See the discussion on libpng error +handling in the Customizing Libpng section below for more information +on the libpng error handling. If an error occurs, and libpng longjmp's +back to your setjmp, you will want to call png_destroy_read_struct() to +free any memory. + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); + fclose(fp); + return (ERROR); + } + +Pass (png_infopp)NULL instead of &end_info if you didn't create +an end_info structure. + +If you would rather avoid the complexity of setjmp/longjmp issues, +you can compile libpng with PNG_NO_SETJMP, in which case +errors will result in a call to PNG_ABORT() which defaults to abort(). + +You can #define PNG_ABORT() to a function that does something +more useful than abort(), as long as your function does not +return. + +Now you need to set up the input code. The default for libpng is to +use the C function fread(). If you use this, you will need to pass a +valid FILE * in the function png_init_io(). Be sure that the file is +opened in binary mode. If you wish to handle reading data in another +way, you need not call the png_init_io() function, but you must then +implement the libpng I/O methods discussed in the Customizing Libpng +section below. + + png_init_io(png_ptr, fp); + +If you had previously opened the file and read any of the signature from +the beginning in order to see if this was a PNG file, you need to let +libpng know that there are some bytes missing from the start of the file. + + png_set_sig_bytes(png_ptr, number); + +You can change the zlib compression buffer size to be used while +reading compressed data with + + png_set_compression_buffer_size(png_ptr, buffer_size); + +where the default size is 8192 bytes. Note that the buffer size +is changed immediately and the buffer is reallocated immediately, +instead of setting a flag to be acted upon later. + +If you want CRC errors to be handled in a different manner than +the default, use + + png_set_crc_action(png_ptr, crit_action, ancil_action); + +The values for png_set_crc_action() say how libpng is to handle CRC errors in +ancillary and critical chunks, and whether to use the data contained +therein. Note that it is impossible to "discard" data in a critical +chunk. + +Choices for (int) crit_action are + PNG_CRC_DEFAULT 0 error/quit + PNG_CRC_ERROR_QUIT 1 error/quit + PNG_CRC_WARN_USE 3 warn/use data + PNG_CRC_QUIET_USE 4 quiet/use data + PNG_CRC_NO_CHANGE 5 use the current value + +Choices for (int) ancil_action are + PNG_CRC_DEFAULT 0 error/quit + PNG_CRC_ERROR_QUIT 1 error/quit + PNG_CRC_WARN_DISCARD 2 warn/discard data + PNG_CRC_WARN_USE 3 warn/use data + PNG_CRC_QUIET_USE 4 quiet/use data + PNG_CRC_NO_CHANGE 5 use the current value + +.SS Setting up callback code + +You can set up a callback function to handle any unknown chunks in the +input stream. You must supply the function + + read_chunk_callback(png_structp png_ptr, + png_unknown_chunkp chunk); + { + /* The unknown chunk structure contains your + chunk data, along with similar data for any other + unknown chunks: */ + + png_byte name[5]; + png_byte *data; + png_size_t size; + + /* Note that libpng has already taken care of + the CRC handling */ + + /* put your code here. Search for your chunk in the + unknown chunk structure, process it, and return one + of the following: */ + + return (-n); /* chunk had an error */ + return (0); /* did not recognize */ + return (n); /* success */ + } + +(You can give your function another name that you like instead of +"read_chunk_callback") + +To inform libpng about your function, use + + png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr, + read_chunk_callback); + +This names not only the callback function, but also a user pointer that +you can retrieve with + + png_get_user_chunk_ptr(png_ptr); + +If you call the png_set_read_user_chunk_fn() function, then all unknown +chunks which the callback does not handle will be saved when read. You can +cause them to be discarded by returning '1' ("handled") instead of '0'. This +behavior will change in libpng 1.7 and the default handling set by the +png_set_keep_unknown_chunks() function, described below, will be used when the +callback returns 0. If you want the existing behavior you should set the global +default to PNG_HANDLE_CHUNK_IF_SAFE now; this is compatible with all current +versions of libpng and with 1.7. Libpng 1.6 issues a warning if you keep the +default, or PNG_HANDLE_CHUNK_NEVER, and the callback returns 0. + +At this point, you can set up a callback function that will be +called after each row has been read, which you can use to control +a progress meter or the like. It's demonstrated in pngtest.c. +You must supply a function + + void read_row_callback(png_structp png_ptr, + png_uint_32 row, int pass); + { + /* put your code here */ + } + +(You can give it another name that you like instead of "read_row_callback") + +To inform libpng about your function, use + + png_set_read_status_fn(png_ptr, read_row_callback); + +When this function is called the row has already been completely processed and +the 'row' and 'pass' refer to the next row to be handled. For the +non-interlaced case the row that was just handled is simply one less than the +passed in row number, and pass will always be 0. For the interlaced case the +same applies unless the row value is 0, in which case the row just handled was +the last one from one of the preceding passes. Because interlacing may skip a +pass you cannot be sure that the preceding pass is just 'pass-1', if you really +need to know what the last pass is record (row,pass) from the callback and use +the last recorded value each time. + +As with the user transform you can find the output row using the +PNG_ROW_FROM_PASS_ROW macro. + +.SS Unknown-chunk handling + +Now you get to set the way the library processes unknown chunks in the +input PNG stream. Both known and unknown chunks will be read. Normal +behavior is that known chunks will be parsed into information in +various info_ptr members while unknown chunks will be discarded. This +behavior can be wasteful if your application will never use some known +chunk types. To change this, you can call: + + png_set_keep_unknown_chunks(png_ptr, keep, + chunk_list, num_chunks); + + keep - 0: default unknown chunk handling + 1: ignore; do not keep + 2: keep only if safe-to-copy + 3: keep even if unsafe-to-copy + + You can use these definitions: + PNG_HANDLE_CHUNK_AS_DEFAULT 0 + PNG_HANDLE_CHUNK_NEVER 1 + PNG_HANDLE_CHUNK_IF_SAFE 2 + PNG_HANDLE_CHUNK_ALWAYS 3 + + chunk_list - list of chunks affected (a byte string, + five bytes per chunk, NULL or '\0' if + num_chunks is positive; ignored if + numchunks <= 0). + + num_chunks - number of chunks affected; if 0, all + unknown chunks are affected. If positive, + only the chunks in the list are affected, + and if negative all unknown chunks and + all known chunks except for the IHDR, + PLTE, tRNS, IDAT, and IEND chunks are + affected. + +Unknown chunks declared in this way will be saved as raw data onto a +list of png_unknown_chunk structures. If a chunk that is normally +known to libpng is named in the list, it will be handled as unknown, +according to the "keep" directive. If a chunk is named in successive +instances of png_set_keep_unknown_chunks(), the final instance will +take precedence. The IHDR and IEND chunks should not be named in +chunk_list; if they are, libpng will process them normally anyway. +If you know that your application will never make use of some particular +chunks, use PNG_HANDLE_CHUNK_NEVER (or 1) as demonstrated below. + +Here is an example of the usage of png_set_keep_unknown_chunks(), +where the private "vpAg" chunk will later be processed by a user chunk +callback function: + + png_byte vpAg[5]={118, 112, 65, 103, (png_byte) '\0'}; + + #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) + png_byte unused_chunks[]= + { + 104, 73, 83, 84, (png_byte) '\0', /* hIST */ + 105, 84, 88, 116, (png_byte) '\0', /* iTXt */ + 112, 67, 65, 76, (png_byte) '\0', /* pCAL */ + 115, 67, 65, 76, (png_byte) '\0', /* sCAL */ + 115, 80, 76, 84, (png_byte) '\0', /* sPLT */ + 116, 73, 77, 69, (png_byte) '\0', /* tIME */ + }; + #endif + + ... + + #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) + /* ignore all unknown chunks + * (use global setting "2" for libpng16 and earlier): + */ + png_set_keep_unknown_chunks(read_ptr, 2, NULL, 0); + + /* except for vpAg: */ + png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1); + + /* also ignore unused known chunks: */ + png_set_keep_unknown_chunks(read_ptr, 1, unused_chunks, + (int)(sizeof unused_chunks)/5); + #endif + +.SS User limits + +The PNG specification allows the width and height of an image to be as +large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns. +Since very few applications really need to process such large images, +we have imposed an arbitrary 1-million limit on rows and columns. +Larger images will be rejected immediately with a png_error() call. If +you wish to change this limit, you can use + + png_set_user_limits(png_ptr, width_max, height_max); + +to set your own limits, or use width_max = height_max = 0x7fffffffL +to allow all valid dimensions (libpng may reject some very large images +anyway because of potential buffer overflow conditions). + +You should put this statement after you create the PNG structure and +before calling png_read_info(), png_read_png(), or png_process_data(). + +When writing a PNG datastream, put this statement before calling +png_write_info() or png_write_png(). + +If you need to retrieve the limits that are being applied, use + + width_max = png_get_user_width_max(png_ptr); + height_max = png_get_user_height_max(png_ptr); + +The PNG specification sets no limit on the number of ancillary chunks +allowed in a PNG datastream. You can impose a limit on the total number +of sPLT, tEXt, iTXt, zTXt, and unknown chunks that will be stored, with + + png_set_chunk_cache_max(png_ptr, user_chunk_cache_max); + +where 0x7fffffffL means unlimited. You can retrieve this limit with + + chunk_cache_max = png_get_chunk_cache_max(png_ptr); + +You can also set a limit on the amount of memory that a compressed chunk +other than IDAT can occupy, with + + png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max); + +and you can retrieve the limit with + + chunk_malloc_max = png_get_chunk_malloc_max(png_ptr); + +Any chunks that would cause either of these limits to be exceeded will +be ignored. + +.SS Information about your system + +If you intend to display the PNG or to incorporate it in other image data you +need to tell libpng information about your display or drawing surface so that +libpng can convert the values in the image to match the display. + +From libpng-1.5.4 this information can be set before reading the PNG file +header. In earlier versions png_set_gamma() existed but behaved incorrectly if +called before the PNG file header had been read and png_set_alpha_mode() did not +exist. + +If you need to support versions prior to libpng-1.5.4 test the version number +as illustrated below using "PNG_LIBPNG_VER >= 10504" and follow the procedures +described in the appropriate manual page. + +You give libpng the encoding expected by your system expressed as a 'gamma' +value. You can also specify a default encoding for the PNG file in +case the required information is missing from the file. By default libpng +assumes that the PNG data matches your system, to keep this default call: + + png_set_gamma(png_ptr, screen_gamma, 1/screen_gamma/*file gamma*/); + +or you can use the fixed point equivalent: + + png_set_gamma_fixed(png_ptr, PNG_FP_1*screen_gamma, + PNG_FP_1/screen_gamma); + +If you don't know the gamma for your system it is probably 2.2 - a good +approximation to the IEC standard for display systems (sRGB). If images are +too contrasty or washed out you got the value wrong - check your system +documentation! + +Many systems permit the system gamma to be changed via a lookup table in the +display driver, a few systems, including older Macs, change the response by +default. As of 1.5.4 three special values are available to handle common +situations: + + PNG_DEFAULT_sRGB: Indicates that the system conforms to the + IEC 61966-2-1 standard. This matches almost + all systems. + PNG_GAMMA_MAC_18: Indicates that the system is an older + (pre Mac OS 10.6) Apple Macintosh system with + the default settings. + PNG_GAMMA_LINEAR: Just the fixed point value for 1.0 - indicates + that the system expects data with no gamma + encoding. + +You would use the linear (unencoded) value if you need to process the pixel +values further because this avoids the need to decode and reencode each +component value whenever arithmetic is performed. A lot of graphics software +uses linear values for this reason, often with higher precision component values +to preserve overall accuracy. + +The second thing you may need to tell libpng about is how your system handles +alpha channel information. Some, but not all, PNG files contain an alpha +channel. To display these files correctly you need to compose the data onto a +suitable background, as described in the PNG specification. + +Libpng only supports composing onto a single color (using png_set_background; +see below). Otherwise you must do the composition yourself and, in this case, +you may need to call png_set_alpha_mode: + + #if PNG_LIBPNG_VER >= 10504 + png_set_alpha_mode(png_ptr, mode, screen_gamma); + #else + png_set_gamma(png_ptr, screen_gamma, 1.0/screen_gamma); + #endif + +The screen_gamma value is the same as the argument to png_set_gamma; however, +how it affects the output depends on the mode. png_set_alpha_mode() sets the +file gamma default to 1/screen_gamma, so normally you don't need to call +png_set_gamma. If you need different defaults call png_set_gamma() before +png_set_alpha_mode() - if you call it after it will override the settings made +by png_set_alpha_mode(). + +The mode is as follows: + + PNG_ALPHA_PNG: The data is encoded according to the PNG specification. Red, +green and blue, or gray, components are gamma encoded color +values and are not premultiplied by the alpha value. The +alpha value is a linear measure of the contribution of the +pixel to the corresponding final output pixel. + +You should normally use this format if you intend to perform +color correction on the color values; most, maybe all, color +correction software has no handling for the alpha channel and, +anyway, the math to handle pre-multiplied component values is +unnecessarily complex. + +Before you do any arithmetic on the component values you need +to remove the gamma encoding and multiply out the alpha +channel. See the PNG specification for more detail. It is +important to note that when an image with an alpha channel is +scaled, linear encoded, pre-multiplied component values must +be used! + +The remaining modes assume you don't need to do any further color correction or +that if you do, your color correction software knows all about alpha (it +probably doesn't!) + + PNG_ALPHA_STANDARD: The data libpng produces +is encoded in the standard way +assumed by most correctly written graphics software. +The gamma encoding will be removed by libpng and the +linear component values will be pre-multiplied by the +alpha channel. + +With this format the final image must be re-encoded to +match the display gamma before the image is displayed. +If your system doesn't do that, yet still seems to +perform arithmetic on the pixels without decoding them, +it is broken - check out the modes below. + +With PNG_ALPHA_STANDARD libpng always produces linear +component values, whatever screen_gamma you supply. The +screen_gamma value is, however, used as a default for +the file gamma if the PNG file has no gamma information. + +If you call png_set_gamma() after png_set_alpha_mode() you +will override the linear encoding. Instead the +pre-multiplied pixel values will be gamma encoded but +the alpha channel will still be linear. This may +actually match the requirements of some broken software, +but it is unlikely. + +While linear 8-bit data is often used it has +insufficient precision for any image with a reasonable +dynamic range. To avoid problems, and if your software +supports it, use png_set_expand_16() to force all +components to 16 bits. + + PNG_ALPHA_OPTIMIZED: This mode is the same +as PNG_ALPHA_STANDARD except that +completely opaque pixels are gamma encoded according to +the screen_gamma value. Pixels with alpha less than 1.0 +will still have linear components. + +Use this format if you have control over your +compositing software and so don't do other arithmetic +(such as scaling) on the data you get from libpng. Your +compositing software can simply copy opaque pixels to +the output but still has linear values for the +non-opaque pixels. + +In normal compositing, where the alpha channel encodes +partial pixel coverage (as opposed to broad area +translucency), the inaccuracies of the 8-bit +representation of non-opaque pixels are irrelevant. + +You can also try this format if your software is broken; +it might look better. + + PNG_ALPHA_BROKEN: This is PNG_ALPHA_STANDARD; +however, all component values, +including the alpha channel are gamma encoded. This is +an appropriate format to try if your software, or more +likely hardware, is totally broken, i.e., if it performs +linear arithmetic directly on gamma encoded values. + +In most cases of broken software or hardware the bug in the final display +manifests as a subtle halo around composited parts of the image. You may not +even perceive this as a halo; the composited part of the image may simply appear +separate from the background, as though it had been cut out of paper and pasted +on afterward. + +If you don't have to deal with bugs in software or hardware, or if you can fix +them, there are three recommended ways of using png_set_alpha_mode(): + + png_set_alpha_mode(png_ptr, PNG_ALPHA_PNG, + screen_gamma); + +You can do color correction on the result (libpng does not currently +support color correction internally). When you handle the alpha channel +you need to undo the gamma encoding and multiply out the alpha. + + png_set_alpha_mode(png_ptr, PNG_ALPHA_STANDARD, + screen_gamma); + png_set_expand_16(png_ptr); + +If you are using the high level interface, don't call png_set_expand_16(); +instead pass PNG_TRANSFORM_EXPAND_16 to the interface. + +With this mode you can't do color correction, but you can do arithmetic, +including composition and scaling, on the data without further processing. + + png_set_alpha_mode(png_ptr, PNG_ALPHA_OPTIMIZED, + screen_gamma); + +You can avoid the expansion to 16-bit components with this mode, but you +lose the ability to scale the image or perform other linear arithmetic. +All you can do is compose the result onto a matching output. Since this +mode is libpng-specific you also need to write your own composition +software. + +If you don't need, or can't handle, the alpha channel you can call +png_set_background() to remove it by compositing against a fixed color. Don't +call png_set_strip_alpha() to do this - it will leave spurious pixel values in +transparent parts of this image. + + png_set_background(png_ptr, &background_color, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1); + +The background_color is an RGB or grayscale value according to the data format +libpng will produce for you. Because you don't yet know the format of the PNG +file, if you call png_set_background at this point you must arrange for the +format produced by libpng to always have 8-bit or 16-bit components and then +store the color as an 8-bit or 16-bit color as appropriate. The color contains +separate gray and RGB component values, so you can let libpng produce gray or +RGB output according to the input format, but low bit depth grayscale images +must always be converted to at least 8-bit format. (Even though low bit depth +grayscale images can't have an alpha channel they can have a transparent +color!) + +You set the transforms you need later, either as flags to the high level +interface or libpng API calls for the low level interface. For reference the +settings and API calls required are: + +8-bit values: + PNG_TRANSFORM_SCALE_16 | PNG_EXPAND + png_set_expand(png_ptr); png_set_scale_16(png_ptr); + + If you must get exactly the same inaccurate results + produced by default in versions prior to libpng-1.5.4, + use PNG_TRANSFORM_STRIP_16 and png_set_strip_16(png_ptr) + instead. + +16-bit values: + PNG_TRANSFORM_EXPAND_16 + png_set_expand_16(png_ptr); + +In either case palette image data will be expanded to RGB. If you just want +color data you can add PNG_TRANSFORM_GRAY_TO_RGB or png_set_gray_to_rgb(png_ptr) +to the list. + +Calling png_set_background before the PNG file header is read will not work +prior to libpng-1.5.4. Because the failure may result in unexpected warnings or +errors it is therefore much safer to call png_set_background after the head has +been read. Unfortunately this means that prior to libpng-1.5.4 it cannot be +used with the high level interface. + +.SS The high-level read interface + +At this point there are two ways to proceed; through the high-level +read interface, or through a sequence of low-level read operations. +You can use the high-level interface if (a) you are willing to read +the entire image into memory, and (b) the input transformations +you want to do are limited to the following set: + + PNG_TRANSFORM_IDENTITY No transformation + PNG_TRANSFORM_SCALE_16 Strip 16-bit samples to + 8-bit accurately + PNG_TRANSFORM_STRIP_16 Chop 16-bit samples to + 8-bit less accurately + PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel + PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit + samples to bytes + PNG_TRANSFORM_PACKSWAP Change order of packed + pixels to LSB first + PNG_TRANSFORM_EXPAND Perform set_expand() + PNG_TRANSFORM_INVERT_MONO Invert monochrome images + PNG_TRANSFORM_SHIFT Normalize pixels to the + sBIT depth + PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA + to BGRA + PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA + to AG + PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity + to transparency + PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples + to RGB (or GA to RGBA) + PNG_TRANSFORM_EXPAND_16 Expand samples to 16 bits + +(This excludes setting a background color, doing gamma transformation, +quantizing, and setting filler.) If this is the case, simply do this: + + png_read_png(png_ptr, info_ptr, png_transforms, NULL) + +where png_transforms is an integer containing the bitwise OR of some +set of transformation flags. This call is equivalent to png_read_info(), +followed the set of transformations indicated by the transform mask, +then png_read_image(), and finally png_read_end(). + +(The final parameter of this call is not yet used. Someday it might point +to transformation parameters required by some future input transform.) + +You must use png_transforms and not call any png_set_transform() functions +when you use png_read_png(). + +After you have called png_read_png(), you can retrieve the image data +with + + row_pointers = png_get_rows(png_ptr, info_ptr); + +where row_pointers is an array of pointers to the pixel data for each row: + + png_bytep row_pointers[height]; + +If you know your image size and pixel size ahead of time, you can allocate +row_pointers prior to calling png_read_png() with + + if (height > PNG_UINT_32_MAX/(sizeof (png_byte))) + png_error (png_ptr, + "Image is too tall to process in memory"); + + if (width > PNG_UINT_32_MAX/pixel_size) + png_error (png_ptr, + "Image is too wide to process in memory"); + + row_pointers = png_malloc(png_ptr, + height*(sizeof (png_bytep))); + + for (int i=0; i) and +png_get_(png_ptr, info_ptr, ...) functions return non-zero if the +data has been read, or zero if it is missing. The parameters to the +png_get_ are set directly if they are simple data types, or a +pointer into the info_ptr is returned for any complex types. + +The colorspace data from gAMA, cHRM, sRGB, iCCP, and sBIT chunks +is simply returned to give the application information about how the +image was encoded. Libpng itself only does transformations using the file +gamma when combining semitransparent pixels with the background color, and, +since libpng-1.6.0, when converting between 8-bit sRGB and 16-bit linear pixels +within the simplified API. Libpng also uses the file gamma when converting +RGB to gray, beginning with libpng-1.0.5, if the application calls +png_set_rgb_to_gray()). + + png_get_PLTE(png_ptr, info_ptr, &palette, + &num_palette); + + palette - the palette for the file + (array of png_color) + + num_palette - number of entries in the palette + + png_get_gAMA(png_ptr, info_ptr, &file_gamma); + png_get_gAMA_fixed(png_ptr, info_ptr, &int_file_gamma); + + file_gamma - the gamma at which the file is + written (PNG_INFO_gAMA) + + int_file_gamma - 100,000 times the gamma at which the + file is written + + png_get_cHRM(png_ptr, info_ptr, &white_x, &white_y, &red_x, + &red_y, &green_x, &green_y, &blue_x, &blue_y) + png_get_cHRM_XYZ(png_ptr, info_ptr, &red_X, &red_Y, &red_Z, + &green_X, &green_Y, &green_Z, &blue_X, &blue_Y, + &blue_Z) + png_get_cHRM_fixed(png_ptr, info_ptr, &int_white_x, + &int_white_y, &int_red_x, &int_red_y, + &int_green_x, &int_green_y, &int_blue_x, + &int_blue_y) + png_get_cHRM_XYZ_fixed(png_ptr, info_ptr, &int_red_X, &int_red_Y, + &int_red_Z, &int_green_X, &int_green_Y, + &int_green_Z, &int_blue_X, &int_blue_Y, + &int_blue_Z) + + {white,red,green,blue}_{x,y} + A color space encoding specified using the + chromaticities of the end points and the + white point. (PNG_INFO_cHRM) + + {red,green,blue}_{X,Y,Z} + A color space encoding specified using the + encoding end points - the CIE tristimulus + specification of the intended color of the red, + green and blue channels in the PNG RGB data. + The white point is simply the sum of the three + end points. (PNG_INFO_cHRM) + + png_get_sRGB(png_ptr, info_ptr, &srgb_intent); + + file_srgb_intent - the rendering intent (PNG_INFO_sRGB) + The presence of the sRGB chunk + means that the pixel data is in the + sRGB color space. This chunk also + implies specific values of gAMA and + cHRM. + + png_get_iCCP(png_ptr, info_ptr, &name, + &compression_type, &profile, &proflen); + + name - The profile name. + + compression_type - The compression type; always + PNG_COMPRESSION_TYPE_BASE for PNG 1.0. + You may give NULL to this argument to + ignore it. + + profile - International Color Consortium color + profile data. May contain NULs. + + proflen - length of profile data in bytes. + + png_get_sBIT(png_ptr, info_ptr, &sig_bit); + + sig_bit - the number of significant bits for + (PNG_INFO_sBIT) each of the gray, + red, green, and blue channels, + whichever are appropriate for the + given color type (png_color_16) + + png_get_tRNS(png_ptr, info_ptr, &trans_alpha, + &num_trans, &trans_color); + + trans_alpha - array of alpha (transparency) + entries for palette (PNG_INFO_tRNS) + + num_trans - number of transparent entries + (PNG_INFO_tRNS) + + trans_color - graylevel or color sample values of + the single transparent color for + non-paletted images (PNG_INFO_tRNS) + + png_get_hIST(png_ptr, info_ptr, &hist); + (PNG_INFO_hIST) + + hist - histogram of palette (array of + png_uint_16) + + png_get_tIME(png_ptr, info_ptr, &mod_time); + + mod_time - time image was last modified + (PNG_VALID_tIME) + + png_get_bKGD(png_ptr, info_ptr, &background); + + background - background color (of type + png_color_16p) (PNG_VALID_bKGD) + valid 16-bit red, green and blue + values, regardless of color_type + + num_comments = png_get_text(png_ptr, info_ptr, + &text_ptr, &num_text); + + num_comments - number of comments + + text_ptr - array of png_text holding image + comments + + text_ptr[i].compression - type of compression used + on "text" PNG_TEXT_COMPRESSION_NONE + PNG_TEXT_COMPRESSION_zTXt + PNG_ITXT_COMPRESSION_NONE + PNG_ITXT_COMPRESSION_zTXt + + text_ptr[i].key - keyword for comment. Must contain + 1-79 characters. + + text_ptr[i].text - text comments for current + keyword. Can be empty. + + text_ptr[i].text_length - length of text string, + after decompression, 0 for iTXt + + text_ptr[i].itxt_length - length of itxt string, + after decompression, 0 for tEXt/zTXt + + text_ptr[i].lang - language of comment (empty + string for unknown). + + text_ptr[i].lang_key - keyword in UTF-8 + (empty string for unknown). + + Note that the itxt_length, lang, and lang_key + members of the text_ptr structure only exist when the + library is built with iTXt chunk support. Prior to + libpng-1.4.0 the library was built by default without + iTXt support. Also note that when iTXt is supported, + they contain NULL pointers when the "compression" + field contains PNG_TEXT_COMPRESSION_NONE or + PNG_TEXT_COMPRESSION_zTXt. + + num_text - number of comments (same as + num_comments; you can put NULL here + to avoid the duplication) + + Note while png_set_text() will accept text, language, + and translated keywords that can be NULL pointers, the + structure returned by png_get_text will always contain + regular zero-terminated C strings. They might be + empty strings but they will never be NULL pointers. + + num_spalettes = png_get_sPLT(png_ptr, info_ptr, + &palette_ptr); + + num_spalettes - number of sPLT chunks read. + + palette_ptr - array of palette structures holding + contents of one or more sPLT chunks + read. + + png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, + &unit_type); + + offset_x - positive offset from the left edge + of the screen (can be negative) + + offset_y - positive offset from the top edge + of the screen (can be negative) + + unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER + + png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, + &unit_type); + + res_x - pixels/unit physical resolution in + x direction + + res_y - pixels/unit physical resolution in + x direction + + unit_type - PNG_RESOLUTION_UNKNOWN, + PNG_RESOLUTION_METER + + png_get_sCAL(png_ptr, info_ptr, &unit, &width, + &height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + + height - height of a pixel in physical scale units + (width and height are doubles) + + png_get_sCAL_s(png_ptr, info_ptr, &unit, &width, + &height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + (expressed as a string) + + height - height of a pixel in physical scale units + (width and height are strings like "2.54") + + num_unknown_chunks = png_get_unknown_chunks(png_ptr, + info_ptr, &unknowns) + + unknowns - array of png_unknown_chunk + structures holding unknown chunks + + unknowns[i].name - name of unknown chunk + + unknowns[i].data - data of unknown chunk + + unknowns[i].size - size of unknown chunk's data + + unknowns[i].location - position of chunk in file + + The value of "i" corresponds to the order in which the + chunks were read from the PNG file or inserted with the + png_set_unknown_chunks() function. + + The value of "location" is a bitwise "or" of + + PNG_HAVE_IHDR (0x01) + PNG_HAVE_PLTE (0x02) + PNG_AFTER_IDAT (0x08) + +The data from the pHYs chunk can be retrieved in several convenient +forms: + + res_x = png_get_x_pixels_per_meter(png_ptr, + info_ptr) + + res_y = png_get_y_pixels_per_meter(png_ptr, + info_ptr) + + res_x_and_y = png_get_pixels_per_meter(png_ptr, + info_ptr) + + res_x = png_get_x_pixels_per_inch(png_ptr, + info_ptr) + + res_y = png_get_y_pixels_per_inch(png_ptr, + info_ptr) + + res_x_and_y = png_get_pixels_per_inch(png_ptr, + info_ptr) + + aspect_ratio = png_get_pixel_aspect_ratio(png_ptr, + info_ptr) + + Each of these returns 0 [signifying "unknown"] if + the data is not present or if res_x is 0; + res_x_and_y is 0 if res_x != res_y + + Note that because of the way the resolutions are + stored internally, the inch conversions won't + come out to exactly even number. For example, + 72 dpi is stored as 0.28346 pixels/meter, and + when this is retrieved it is 71.9988 dpi, so + be sure to round the returned value appropriately + if you want to display a reasonable-looking result. + +The data from the oFFs chunk can be retrieved in several convenient +forms: + + x_offset = png_get_x_offset_microns(png_ptr, info_ptr); + + y_offset = png_get_y_offset_microns(png_ptr, info_ptr); + + x_offset = png_get_x_offset_inches(png_ptr, info_ptr); + + y_offset = png_get_y_offset_inches(png_ptr, info_ptr); + + Each of these returns 0 [signifying "unknown" if both + x and y are 0] if the data is not present or if the + chunk is present but the unit is the pixel. The + remark about inexact inch conversions applies here + as well, because a value in inches can't always be + converted to microns and back without some loss + of precision. + +For more information, see the +PNG specification for chunk contents. Be careful with trusting +rowbytes, as some of the transformations could increase the space +needed to hold a row (expand, filler, gray_to_rgb, etc.). +See png_read_update_info(), below. + +A quick word about text_ptr and num_text. PNG stores comments in +keyword/text pairs, one pair per chunk, with no limit on the number +of text chunks, and a 2^31 byte limit on their size. While there are +suggested keywords, there is no requirement to restrict the use to these +strings. It is strongly suggested that keywords and text be sensible +to humans (that's the point), so don't use abbreviations. Non-printing +symbols are not allowed. See the PNG specification for more details. +There is also no requirement to have text after the keyword. + +Keywords should be limited to 79 Latin-1 characters without leading or +trailing spaces, but non-consecutive spaces are allowed within the +keyword. It is possible to have the same keyword any number of times. +The text_ptr is an array of png_text structures, each holding a +pointer to a language string, a pointer to a keyword and a pointer to +a text string. The text string, language code, and translated +keyword may be empty or NULL pointers. The keyword/text +pairs are put into the array in the order that they are received. +However, some or all of the text chunks may be after the image, so, to +make sure you have read all the text chunks, don't mess with these +until after you read the stuff after the image. This will be +mentioned again below in the discussion that goes with png_read_end(). + +.SS Input transformations + +After you've read the header information, you can set up the library +to handle any special transformations of the image data. The various +ways to transform the data will be described in the order that they +should occur. This is important, as some of these change the color +type and/or bit depth of the data, and some others only work on +certain color types and bit depths. + +Transformations you request are ignored if they don't have any meaning for a +particular input data format. However some transformations can have an effect +as a result of a previous transformation. If you specify a contradictory set of +transformations, for example both adding and removing the alpha channel, you +cannot predict the final result. + +The color used for the transparency values should be supplied in the same +format/depth as the current image data. It is stored in the same format/depth +as the image data in a tRNS chunk, so this is what libpng expects for this data. + +The color used for the background value depends on the need_expand argument as +described below. + +Data will be decoded into the supplied row buffers packed into bytes +unless the library has been told to transform it into another format. +For example, 4 bit/pixel paletted or grayscale data will be returned +2 pixels/byte with the leftmost pixel in the high-order bits of the +byte, unless png_set_packing() is called. 8-bit RGB data will be stored +in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha() +is called to insert filler bytes, either before or after each RGB triplet. +16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant +byte of the color value first, unless png_set_scale_16() is called to +transform it to regular RGB RGB triplets, or png_set_filler() or +png_set_add alpha() is called to insert filler bytes, either before or +after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can +be modified with png_set_filler(), png_set_add_alpha(), png_set_strip_16(), +or png_set_scale_16(). + +The following code transforms grayscale images of less than 8 to 8 bits, +changes paletted images to RGB, and adds a full alpha channel if there is +transparency information in a tRNS chunk. This is most useful on +grayscale images with bit depths of 2 or 4 or if there is a multiple-image +viewing application that wishes to treat all images in the same way. + + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_palette_to_rgb(png_ptr); + + if (png_get_valid(png_ptr, info_ptr, + PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); + + if (color_type == PNG_COLOR_TYPE_GRAY && + bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr); + +The first two functions are actually aliases for png_set_expand(), added +in libpng version 1.0.4, with the function names expanded to improve code +readability. In some future version they may actually do different +things. + +As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was +added. It expands the sample depth without changing tRNS to alpha. + +As of libpng version 1.5.2, png_set_expand_16() was added. It behaves as +png_set_expand(); however, the resultant channels have 16 bits rather than 8. +Use this when the output color or gray channels are made linear to avoid fairly +severe accuracy loss. + + if (bit_depth < 16) + png_set_expand_16(png_ptr); + +PNG can have files with 16 bits per channel. If you only can handle +8 bits per channel, this will strip the pixels down to 8-bit. + + if (bit_depth == 16) +#if PNG_LIBPNG_VER >= 10504 + png_set_scale_16(png_ptr); +#else + png_set_strip_16(png_ptr); +#endif + +(The more accurate "png_set_scale_16()" API became available in libpng version +1.5.4). + +If you need to process the alpha channel on the image separately from the image +data (for example if you convert it to a bitmap mask) it is possible to have +libpng strip the channel leaving just RGB or gray data: + + if (color_type & PNG_COLOR_MASK_ALPHA) + png_set_strip_alpha(png_ptr); + +If you strip the alpha channel you need to find some other way of dealing with +the information. If, instead, you want to convert the image to an opaque +version with no alpha channel use png_set_background; see below. + +As of libpng version 1.5.2, almost all useful expansions are supported, the +major ommissions are conversion of grayscale to indexed images (which can be +done trivially in the application) and conversion of indexed to grayscale (which +can be done by a trivial manipulation of the palette.) + +In the following table, the 01 means grayscale with depth<8, 31 means +indexed with depth<8, other numerals represent the color type, "T" means +the tRNS chunk is present, A means an alpha channel is present, and O +means tRNS or alpha is present but all pixels in the image are opaque. + + FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O + TO + 01 - [G] - - - - - - - - - - - - - + 31 [Q] Q [Q] [Q] [Q] Q Q Q Q Q Q [Q] [Q] Q Q + 0 1 G + . . G G G G G G B B GB GB + 0T lt Gt t + . Gt G G Gt G G Bt Bt GBt GBt + 0O lt Gt t . + Gt Gt G Gt Gt G Bt Bt GBt GBt + 2 C P C C C + . . C - - CB CB B B + 2T Ct - Ct C C t + t - - - CBt CBt Bt Bt + 2O Ct - Ct C C t t + - - - CBt CBt Bt Bt + 3 [Q] p [Q] [Q] [Q] Q Q Q + . . [Q] [Q] Q Q + 3T [Qt] p [Qt][Q] [Q] Qt Qt Qt t + t [Qt][Qt] Qt Qt + 3O [Qt] p [Qt][Q] [Q] Qt Qt Qt t t + [Qt][Qt] Qt Qt + 4A lA G A T T GA GT GT GA GT GT + BA G GBA + 4O lA GBA A T T GA GT GT GA GT GT BA + GBA G + 6A CA PA CA C C A T tT PA P P C CBA + BA + 6O CA PBA CA C C A tT T PA P P CBA C BA + + +Within the matrix, + "+" identifies entries where 'from' and 'to' are the same. + "-" means the transformation is not supported. + "." means nothing is necessary (a tRNS chunk can just be ignored). + "t" means the transformation is obtained by png_set_tRNS. + "A" means the transformation is obtained by png_set_add_alpha(). + "X" means the transformation is obtained by png_set_expand(). + "1" means the transformation is obtained by + png_set_expand_gray_1_2_4_to_8() (and by png_set_expand() + if there is no transparency in the original or the final + format). + "C" means the transformation is obtained by png_set_gray_to_rgb(). + "G" means the transformation is obtained by png_set_rgb_to_gray(). + "P" means the transformation is obtained by + png_set_expand_palette_to_rgb(). + "p" means the transformation is obtained by png_set_packing(). + "Q" means the transformation is obtained by png_set_quantize(). + "T" means the transformation is obtained by + png_set_tRNS_to_alpha(). + "B" means the transformation is obtained by + png_set_background(), or png_strip_alpha(). + +When an entry has multiple transforms listed all are required to cause the +right overall transformation. When two transforms are separated by a comma +either will do the job. When transforms are enclosed in [] the transform should +do the job but this is currently unimplemented - a different format will result +if the suggested transformations are used. + +In PNG files, the alpha channel in an image +is the level of opacity. If you need the alpha channel in an image to +be the level of transparency instead of opacity, you can invert the +alpha channel (or the tRNS chunk data) after it's read, so that 0 is +fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit +images) is fully transparent, with + + png_set_invert_alpha(png_ptr); + +PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as +they can, resulting in, for example, 8 pixels per byte for 1 bit +files. This code expands to 1 pixel per byte without changing the +values of the pixels: + + if (bit_depth < 8) + png_set_packing(png_ptr); + +PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels +stored in a PNG image have been "scaled" or "shifted" up to the next +higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] +to 8 bits/sample in the range [0, 255]). However, it is also possible +to convert the PNG pixel data back to the original bit depth of the +image. This call reduces the pixels back down to the original bit depth: + + png_color_8p sig_bit; + + if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) + png_set_shift(png_ptr, sig_bit); + +PNG files store 3-color pixels in red, green, blue order. This code +changes the storage of the pixels to blue, green, red: + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_bgr(png_ptr); + +PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them +into 4 or 8 bytes for windowing systems that need them in this format: + + if (color_type == PNG_COLOR_TYPE_RGB) + png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE); + +where "filler" is the 8 or 16-bit number to fill with, and the location is +either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether +you want the filler before the RGB or after. This transformation +does not affect images that already have full alpha channels. To add an +opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which +will generate RGBA pixels. + +Note that png_set_filler() does not change the color type. If you want +to do that, you can add a true alpha channel with + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_GRAY) + png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER); + +where "filler" contains the alpha value to assign to each pixel. +This function was added in libpng-1.2.7. + +If you are reading an image with an alpha channel, and you need the +data as ARGB instead of the normal PNG format RGBA: + + if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_swap_alpha(png_ptr); + +For some uses, you may want a grayscale image to be represented as +RGB. This code will do that conversion: + + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(png_ptr); + +Conversely, you can convert an RGB or RGBA image to grayscale or grayscale +with alpha. + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_rgb_to_gray(png_ptr, error_action, + double red_weight, double green_weight); + + error_action = 1: silently do the conversion + + error_action = 2: issue a warning if the original + image has any pixel where + red != green or red != blue + + error_action = 3: issue an error and abort the + conversion if the original + image has any pixel where + red != green or red != blue + + red_weight: weight of red component + + green_weight: weight of green component + If either weight is negative, default + weights are used. + +In the corresponding fixed point API the red_weight and green_weight values are +simply scaled by 100,000: + + png_set_rgb_to_gray(png_ptr, error_action, + png_fixed_point red_weight, + png_fixed_point green_weight); + +If you have set error_action = 1 or 2, you can +later check whether the image really was gray, after processing +the image rows, with the png_get_rgb_to_gray_status(png_ptr) function. +It will return a png_byte that is zero if the image was gray or +1 if there were any non-gray pixels. Background and sBIT data +will be silently converted to grayscale, using the green channel +data for sBIT, regardless of the error_action setting. + +The default values come from the PNG file cHRM chunk if present; otherwise, the +defaults correspond to the ITU-R recommendation 709, and also the sRGB color +space, as recommended in the Charles Poynton's Colour FAQ, +, in section 9: + + + + Y = 0.2126 * R + 0.7152 * G + 0.0722 * B + +Previous versions of this document, 1998 through 2002, recommended a slightly +different formula: + + Y = 0.212671 * R + 0.715160 * G + 0.072169 * B + +Libpng uses an integer approximation: + + Y = (6968 * R + 23434 * G + 2366 * B)/32768 + +The calculation is done in a linear colorspace, if the image gamma +can be determined. + +The png_set_background() function has been described already; it tells libpng to +composite images with alpha or simple transparency against the supplied +background color. For compatibility with versions of libpng earlier than +libpng-1.5.4 it is recommended that you call the function after reading the file +header, even if you don't want to use the color in a bKGD chunk, if one exists. + +If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), +you may use this color, or supply another color more suitable for +the current display (e.g., the background color from a web page). You +need to tell libpng how the color is represented, both the format of the +component values in the color (the number of bits) and the gamma encoding of the +color. The function takes two arguments, background_gamma_mode and need_expand +to convey this information; however, only two combinations are likely to be +useful: + + png_color_16 my_background; + png_color_16p image_background; + + if (png_get_bKGD(png_ptr, info_ptr, &image_background)) + png_set_background(png_ptr, image_background, + PNG_BACKGROUND_GAMMA_FILE, 1/*needs to be expanded*/, 1); + else + png_set_background(png_ptr, &my_background, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*do not expand*/, 1); + +The second call was described above - my_background is in the format of the +final, display, output produced by libpng. Because you now know the format of +the PNG it is possible to avoid the need to choose either 8-bit or 16-bit +output and to retain palette images (the palette colors will be modified +appropriately and the tRNS chunk removed.) However, if you are doing this, +take great care not to ask for transformations without checking first that +they apply! + +In the first call the background color has the original bit depth and color type +of the PNG file. So, for palette images the color is supplied as a palette +index and for low bit greyscale images the color is a reduced bit value in +image_background->gray. + +If you didn't call png_set_gamma() before reading the file header, for example +if you need your code to remain compatible with older versions of libpng prior +to libpng-1.5.4, this is the place to call it. + +Do not call it if you called png_set_alpha_mode(); doing so will damage the +settings put in place by png_set_alpha_mode(). (If png_set_alpha_mode() is +supported then you can certainly do png_set_gamma() before reading the PNG +header.) + +This API unconditionally sets the screen and file gamma values, so it will +override the value in the PNG file unless it is called before the PNG file +reading starts. For this reason you must always call it with the PNG file +value when you call it in this position: + + if (png_get_gAMA(png_ptr, info_ptr, &file_gamma)) + png_set_gamma(png_ptr, screen_gamma, file_gamma); + + else + png_set_gamma(png_ptr, screen_gamma, 0.45455); + +If you need to reduce an RGB file to a paletted file, or if a paletted +file has more entries then will fit on your screen, png_set_quantize() +will do that. Note that this is a simple match quantization that merely +finds the closest color available. This should work fairly well with +optimized palettes, but fairly badly with linear color cubes. If you +pass a palette that is larger than maximum_colors, the file will +reduce the number of colors in the palette so it will fit into +maximum_colors. If there is a histogram, libpng will use it to make +more intelligent choices when reducing the palette. If there is no +histogram, it may not do as good a job. + + if (color_type & PNG_COLOR_MASK_COLOR) + { + if (png_get_valid(png_ptr, info_ptr, + PNG_INFO_PLTE)) + { + png_uint_16p histogram = NULL; + + png_get_hIST(png_ptr, info_ptr, + &histogram); + png_set_quantize(png_ptr, palette, num_palette, + max_screen_colors, histogram, 1); + } + + else + { + png_color std_color_cube[MAX_SCREEN_COLORS] = + { ... colors ... }; + + png_set_quantize(png_ptr, std_color_cube, + MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, + NULL,0); + } + } + +PNG files describe monochrome as black being zero and white being one. +The following code will reverse this (make black be one and white be +zero): + + if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY) + png_set_invert_mono(png_ptr); + +This function can also be used to invert grayscale and gray-alpha images: + + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_invert_mono(png_ptr); + +PNG files store 16-bit pixels in network byte order (big-endian, +ie. most significant bits first). This code changes the storage to the +other way (little-endian, i.e. least significant bits first, the +way PCs store them): + + if (bit_depth == 16) + png_set_swap(png_ptr); + +If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you +need to change the order the pixels are packed into bytes, you can use: + + if (bit_depth < 8) + png_set_packswap(png_ptr); + +Finally, you can write your own transformation function if none of +the existing ones meets your needs. This is done by setting a callback +with + + png_set_read_user_transform_fn(png_ptr, + read_transform_fn); + +You must supply the function + + void read_transform_fn(png_structp png_ptr, png_row_infop + row_info, png_bytep data) + +See pngtest.c for a working example. Your function will be called +after all of the other transformations have been processed. Take care with +interlaced images if you do the interlace yourself - the width of the row is the +width in 'row_info', not the overall image width. + +If supported, libpng provides two information routines that you can use to find +where you are in processing the image: + + png_get_current_pass_number(png_structp png_ptr); + png_get_current_row_number(png_structp png_ptr); + +Don't try using these outside a transform callback - firstly they are only +supported if user transforms are supported, secondly they may well return +unexpected results unless the row is actually being processed at the moment they +are called. + +With interlaced +images the value returned is the row in the input sub-image image. Use +PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to +find the output pixel (x,y) given an interlaced sub-image pixel (row,col,pass). + +The discussion of interlace handling above contains more information on how to +use these values. + +You can also set up a pointer to a user structure for use by your +callback function, and you can inform libpng that your transform +function will change the number of channels or bit depth with the +function + + png_set_user_transform_info(png_ptr, user_ptr, + user_depth, user_channels); + +The user's application, not libpng, is responsible for allocating and +freeing any memory required for the user structure. + +You can retrieve the pointer via the function +png_get_user_transform_ptr(). For example: + + voidp read_user_transform_ptr = + png_get_user_transform_ptr(png_ptr); + +The last thing to handle is interlacing; this is covered in detail below, +but you must call the function here if you want libpng to handle expansion +of the interlaced image. + + number_of_passes = png_set_interlace_handling(png_ptr); + +After setting the transformations, libpng can update your png_info +structure to reflect any transformations you've requested with this +call. + + png_read_update_info(png_ptr, info_ptr); + +This is most useful to update the info structure's rowbytes +field so you can use it to allocate your image memory. This function +will also update your palette with the correct screen_gamma and +background if these have been given with the calls above. You may +only call png_read_update_info() once with a particular info_ptr. + +After you call png_read_update_info(), you can allocate any +memory you need to hold the image. The row data is simply +raw byte data for all forms of images. As the actual allocation +varies among applications, no example will be given. If you +are allocating one large chunk, you will need to build an +array of pointers to each row, as it will be needed for some +of the functions below. + +Remember: Before you call png_read_update_info(), the png_get_*() +functions return the values corresponding to the original PNG image. +After you call png_read_update_info the values refer to the image +that libpng will output. Consequently you must call all the png_set_ +functions before you call png_read_update_info(). This is particularly +important for png_set_interlace_handling() - if you are going to call +png_read_update_info() you must call png_set_interlace_handling() before +it unless you want to receive interlaced output. + +.SS Reading image data + +After you've allocated memory, you can read the image data. +The simplest way to do this is in one function call. If you are +allocating enough memory to hold the whole image, you can just +call png_read_image() and libpng will read in all the image data +and put it in the memory area supplied. You will need to pass in +an array of pointers to each row. + +This function automatically handles interlacing, so you don't +need to call png_set_interlace_handling() (unless you call +png_read_update_info()) or call this function multiple times, or any +of that other stuff necessary with png_read_rows(). + + png_read_image(png_ptr, row_pointers); + +where row_pointers is: + + png_bytep row_pointers[height]; + +You can point to void or char or whatever you use for pixels. + +If you don't want to read in the whole image at once, you can +use png_read_rows() instead. If there is no interlacing (check +interlace_type == PNG_INTERLACE_NONE), this is simple: + + png_read_rows(png_ptr, row_pointers, NULL, + number_of_rows); + +where row_pointers is the same as in the png_read_image() call. + +If you are doing this just one row at a time, you can do this with +a single row_pointer instead of an array of row_pointers: + + png_bytep row_pointer = row; + png_read_row(png_ptr, row_pointer, NULL); + +If the file is interlaced (interlace_type != 0 in the IHDR chunk), things +get somewhat harder. The only current (PNG Specification version 1.2) +interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7); +a somewhat complicated 2D interlace scheme, known as Adam7, that +breaks down an image into seven smaller images of varying size, based +on an 8x8 grid. This number is defined (from libpng 1.5) as +PNG_INTERLACE_ADAM7_PASSES in png.h + +libpng can fill out those images or it can give them to you "as is". +It is almost always better to have libpng handle the interlacing for you. +If you want the images filled out, there are two ways to do that. The one +mentioned in the PNG specification is to expand each pixel to cover +those pixels that have not been read yet (the "rectangle" method). +This results in a blocky image for the first pass, which gradually +smooths out as more pixels are read. The other method is the "sparkle" +method, where pixels are drawn only in their final locations, with the +rest of the image remaining whatever colors they were initialized to +before the start of the read. The first method usually looks better, +but tends to be slower, as there are more pixels to put in the rows. + +If, as is likely, you want libpng to expand the images, call this before +calling png_start_read_image() or png_read_update_info(): + + if (interlace_type == PNG_INTERLACE_ADAM7) + number_of_passes + = png_set_interlace_handling(png_ptr); + +This will return the number of passes needed. Currently, this is seven, +but may change if another interlace type is added. This function can be +called even if the file is not interlaced, where it will return one pass. +You then need to read the whole image 'number_of_passes' times. Each time +will distribute the pixels from the current pass to the correct place in +the output image, so you need to supply the same rows to png_read_rows in +each pass. + +If you are not going to display the image after each pass, but are +going to wait until the entire image is read in, use the sparkle +effect. This effect is faster and the end result of either method +is exactly the same. If you are planning on displaying the image +after each pass, the "rectangle" effect is generally considered the +better looking one. + +If you only want the "sparkle" effect, just call png_read_rows() as +normal, with the third parameter NULL. Make sure you make pass over +the image number_of_passes times, and you don't change the data in the +rows between calls. You can change the locations of the data, just +not the data. Each pass only writes the pixels appropriate for that +pass, and assumes the data from previous passes is still valid. + + png_read_rows(png_ptr, row_pointers, NULL, + number_of_rows); + +If you only want the first effect (the rectangles), do the same as +before except pass the row buffer in the third parameter, and leave +the second parameter NULL. + + png_read_rows(png_ptr, NULL, row_pointers, + number_of_rows); + +If you don't want libpng to handle the interlacing details, just call +png_read_rows() PNG_INTERLACE_ADAM7_PASSES times to read in all the images. +Each of the images is a valid image by itself; however, you will almost +certainly need to distribute the pixels from each sub-image to the +correct place. This is where everything gets very tricky. + +If you want to retrieve the separate images you must pass the correct +number of rows to each successive call of png_read_rows(). The calculation +gets pretty complicated for small images, where some sub-images may +not even exist because either their width or height ends up zero. +libpng provides two macros to help you in 1.5 and later versions: + + png_uint_32 width = PNG_PASS_COLS(image_width, pass_number); + png_uint_32 height = PNG_PASS_ROWS(image_height, pass_number); + +Respectively these tell you the width and height of the sub-image +corresponding to the numbered pass. 'pass' is in in the range 0 to 6 - +this can be confusing because the specification refers to the same passes +as 1 to 7! Be careful, you must check both the width and height before +calling png_read_rows() and not call it for that pass if either is zero. + +You can, of course, read each sub-image row by row. If you want to +produce optimal code to make a pixel-by-pixel transformation of an +interlaced image this is the best approach; read each row of each pass, +transform it, and write it out to a new interlaced image. + +If you want to de-interlace the image yourself libpng provides further +macros to help that tell you where to place the pixels in the output image. +Because the interlacing scheme is rectangular - sub-image pixels are always +arranged on a rectangular grid - all you need to know for each pass is the +starting column and row in the output image of the first pixel plus the +spacing between each pixel. As of libpng 1.5 there are four macros to +retrieve this information: + + png_uint_32 x = PNG_PASS_START_COL(pass); + png_uint_32 y = PNG_PASS_START_ROW(pass); + png_uint_32 xStep = 1U << PNG_PASS_COL_SHIFT(pass); + png_uint_32 yStep = 1U << PNG_PASS_ROW_SHIFT(pass); + +These allow you to write the obvious loop: + + png_uint_32 input_y = 0; + png_uint_32 output_y = PNG_PASS_START_ROW(pass); + + while (output_y < output_image_height) + { + png_uint_32 input_x = 0; + png_uint_32 output_x = PNG_PASS_START_COL(pass); + + while (output_x < output_image_width) + { + image[output_y][output_x] = + subimage[pass][input_y][input_x++]; + + output_x += xStep; + } + + ++input_y; + output_y += yStep; + } + +Notice that the steps between successive output rows and columns are +returned as shifts. This is possible because the pixels in the subimages +are always a power of 2 apart - 1, 2, 4 or 8 pixels - in the original +image. In practice you may need to directly calculate the output coordinate +given an input coordinate. libpng provides two further macros for this +purpose: + + png_uint_32 output_x = PNG_COL_FROM_PASS_COL(input_x, pass); + png_uint_32 output_y = PNG_ROW_FROM_PASS_ROW(input_y, pass); + +Finally a pair of macros are provided to tell you if a particular image +row or column appears in a given pass: + + int col_in_pass = PNG_COL_IN_INTERLACE_PASS(output_x, pass); + int row_in_pass = PNG_ROW_IN_INTERLACE_PASS(output_y, pass); + +Bear in mind that you will probably also need to check the width and height +of the pass in addition to the above to be sure the pass even exists! + +With any luck you are convinced by now that you don't want to do your own +interlace handling. In reality normally the only good reason for doing this +is if you are processing PNG files on a pixel-by-pixel basis and don't want +to load the whole file into memory when it is interlaced. + +libpng includes a test program, pngvalid, that illustrates reading and +writing of interlaced images. If you can't get interlacing to work in your +code and don't want to leave it to libpng (the recommended approach), see +how pngvalid.c does it. + +.SS Finishing a sequential read + +After you are finished reading the image through the +low-level interface, you can finish reading the file. If you are +interested in comments or time, which may be stored either before or +after the image data, you should pass the separate png_info struct if +you want to keep the comments from before and after the image +separate. + + png_infop end_info = png_create_info_struct(png_ptr); + + if (!end_info) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + png_read_end(png_ptr, end_info); + +If you are not interested, you should still call png_read_end() +but you can pass NULL, avoiding the need to create an end_info structure. + + png_read_end(png_ptr, (png_infop)NULL); + +If you don't call png_read_end(), then your file pointer will be +left pointing to the first chunk after the last IDAT, which is probably +not what you want if you expect to read something beyond the end of +the PNG datastream. + +When you are done, you can free all memory allocated by libpng like this: + + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); + +or, if you didn't create an end_info structure, + + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + +It is also possible to individually free the info_ptr members that +point to libpng-allocated storage with the following function: + + png_free_data(png_ptr, info_ptr, mask, seq) + + mask - identifies data to be freed, a mask + containing the bitwise OR of one or + more of + PNG_FREE_PLTE, PNG_FREE_TRNS, + PNG_FREE_HIST, PNG_FREE_ICCP, + PNG_FREE_PCAL, PNG_FREE_ROWS, + PNG_FREE_SCAL, PNG_FREE_SPLT, + PNG_FREE_TEXT, PNG_FREE_UNKN, + or simply PNG_FREE_ALL + + seq - sequence number of item to be freed + (-1 for all items) + +This function may be safely called when the relevant storage has +already been freed, or has not yet been allocated, or was allocated +by the user and not by libpng, and will in those cases do nothing. +The "seq" parameter is ignored if only one item of the selected data +type, such as PLTE, is allowed. If "seq" is not -1, and multiple items +are allowed for the data type identified in the mask, such as text or +sPLT, only the n'th item in the structure is freed, where n is "seq". + +The default behavior is only to free data that was allocated internally +by libpng. This can be changed, so that libpng will not free the data, +or so that it will free data that was allocated by the user with png_malloc() +or png_calloc() and passed in via a png_set_*() function, with + + png_data_freer(png_ptr, info_ptr, freer, mask) + + freer - one of + PNG_DESTROY_WILL_FREE_DATA + PNG_SET_WILL_FREE_DATA + PNG_USER_WILL_FREE_DATA + + mask - which data elements are affected + same choices as in png_free_data() + +This function only affects data that has already been allocated. +You can call this function after reading the PNG data but before calling +any png_set_*() functions, to control whether the user or the png_set_*() +function is responsible for freeing any existing data that might be present, +and again after the png_set_*() functions to control whether the user +or png_destroy_*() is supposed to free the data. When the user assumes +responsibility for libpng-allocated data, the application must use +png_free() to free it, and when the user transfers responsibility to libpng +for data that the user has allocated, the user must have used png_malloc() +or png_calloc() to allocate it. + +If you allocated your row_pointers in a single block, as suggested above in +the description of the high level read interface, you must not transfer +responsibility for freeing it to the png_set_rows or png_read_destroy function, +because they would also try to free the individual row_pointers[i]. + +If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword +separately, do not transfer responsibility for freeing text_ptr to libpng, +because when libpng fills a png_text structure it combines these members with +the key member, and png_free_data() will free only text_ptr.key. Similarly, +if you transfer responsibility for free'ing text_ptr from libpng to your +application, your application must not separately free those members. + +The png_free_data() function will turn off the "valid" flag for anything +it frees. If you need to turn the flag off for a chunk that was freed by +your application instead of by libpng, you can use + + png_set_invalid(png_ptr, info_ptr, mask); + + mask - identifies the chunks to be made invalid, + containing the bitwise OR of one or + more of + PNG_INFO_gAMA, PNG_INFO_sBIT, + PNG_INFO_cHRM, PNG_INFO_PLTE, + PNG_INFO_tRNS, PNG_INFO_bKGD, + PNG_INFO_hIST, PNG_INFO_pHYs, + PNG_INFO_oFFs, PNG_INFO_tIME, + PNG_INFO_pCAL, PNG_INFO_sRGB, + PNG_INFO_iCCP, PNG_INFO_sPLT, + PNG_INFO_sCAL, PNG_INFO_IDAT + +For a more compact example of reading a PNG image, see the file example.c. + +.SS Reading PNG files progressively + +The progressive reader is slightly different then the non-progressive +reader. Instead of calling png_read_info(), png_read_rows(), and +png_read_end(), you make one call to png_process_data(), which calls +callbacks when it has the info, a row, or the end of the image. You +set up these callbacks with png_set_progressive_read_fn(). You don't +have to worry about the input/output functions of libpng, as you are +giving the library the data directly in png_process_data(). I will +assume that you have read the section on reading PNG files above, +so I will only highlight the differences (although I will show +all of the code). + +png_structp png_ptr; +png_infop info_ptr; + + /* An example code fragment of how you would + initialize the progressive reader in your + application. */ + int + initialize_png_reader() + { + png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + + if (!png_ptr) + return (ERROR); + + info_ptr = png_create_info_struct(png_ptr); + + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); + return (ERROR); + } + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + /* This one's new. You can provide functions + to be called when the header info is valid, + when each row is completed, and when the image + is finished. If you aren't using all functions, + you can specify NULL parameters. Even when all + three functions are NULL, you need to call + png_set_progressive_read_fn(). You can use + any struct as the user_ptr (cast to a void pointer + for the function call), and retrieve the pointer + from inside the callbacks using the function + + png_get_progressive_ptr(png_ptr); + + which will return a void pointer, which you have + to cast appropriately. + */ + png_set_progressive_read_fn(png_ptr, (void *)user_ptr, + info_callback, row_callback, end_callback); + + return 0; + } + + /* A code fragment that you call as you receive blocks + of data */ + int + process_data(png_bytep buffer, png_uint_32 length) + { + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + /* This one's new also. Simply give it a chunk + of data from the file stream (in order, of + course). On machines with segmented memory + models machines, don't give it any more than + 64K. The library seems to run fine with sizes + of 4K. Although you can give it much less if + necessary (I assume you can give it chunks of + 1 byte, I haven't tried less then 256 bytes + yet). When this function returns, you may + want to display any rows that were generated + in the row callback if you don't already do + so there. + */ + png_process_data(png_ptr, info_ptr, buffer, length); + + /* At this point you can call png_process_data_skip if + you want to handle data the library will skip yourself; + it simply returns the number of bytes to skip (and stops + libpng skipping that number of bytes on the next + png_process_data call). + return 0; + } + + /* This function is called (as set by + png_set_progressive_read_fn() above) when enough data + has been supplied so all of the header has been + read. + */ + void + info_callback(png_structp png_ptr, png_infop info) + { + /* Do any setup here, including setting any of + the transformations mentioned in the Reading + PNG files section. For now, you _must_ call + either png_start_read_image() or + png_read_update_info() after all the + transformations are set (even if you don't set + any). You may start getting rows before + png_process_data() returns, so this is your + last chance to prepare for that. + + This is where you turn on interlace handling, + assuming you don't want to do it yourself. + + If you need to you can stop the processing of + your original input data at this point by calling + png_process_data_pause. This returns the number + of unprocessed bytes from the last png_process_data + call - it is up to you to ensure that the next call + sees these bytes again. If you don't want to bother + with this you can get libpng to cache the unread + bytes by setting the 'save' parameter (see png.h) but + then libpng will have to copy the data internally. + */ + } + + /* This function is called when each row of image + data is complete */ + void + row_callback(png_structp png_ptr, png_bytep new_row, + png_uint_32 row_num, int pass) + { + /* If the image is interlaced, and you turned + on the interlace handler, this function will + be called for every row in every pass. Some + of these rows will not be changed from the + previous pass. When the row is not changed, + the new_row variable will be NULL. The rows + and passes are called in order, so you don't + really need the row_num and pass, but I'm + supplying them because it may make your life + easier. + + If you did not turn on interlace handling then + the callback is called for each row of each + sub-image when the image is interlaced. In this + case 'row_num' is the row in the sub-image, not + the row in the output image as it is in all other + cases. + + For the non-NULL rows of interlaced images when + you have switched on libpng interlace handling, + you must call png_progressive_combine_row() + passing in the row and the old row. You can + call this function for NULL rows (it will just + return) and for non-interlaced images (it just + does the memcpy for you) if it will make the + code easier. Thus, you can just do this for + all cases if you switch on interlace handling; + */ + + png_progressive_combine_row(png_ptr, old_row, + new_row); + + /* where old_row is what was displayed for + previously for the row. Note that the first + pass (pass == 0, really) will completely cover + the old row, so the rows do not have to be + initialized. After the first pass (and only + for interlaced images), you will have to pass + the current row, and the function will combine + the old row and the new row. + + You can also call png_process_data_pause in this + callback - see above. + */ + } + + void + end_callback(png_structp png_ptr, png_infop info) + { + /* This function is called after the whole image + has been read, including any chunks after the + image (up to and including the IEND). You + will usually have the same info chunk as you + had in the header, although some data may have + been added to the comments and time fields. + + Most people won't do much here, perhaps setting + a flag that marks the image as finished. + */ + } + + + +.SH IV. Writing + +Much of this is very similar to reading. However, everything of +importance is repeated here, so you won't have to constantly look +back up in the reading section to understand writing. + +.SS Setup + +You will want to do the I/O initialization before you get into libpng, +so if it doesn't work, you don't have anything to undo. If you are not +using the standard I/O functions, you will need to replace them with +custom writing functions. See the discussion under Customizing libpng. + + FILE *fp = fopen(file_name, "wb"); + + if (!fp) + return (ERROR); + +Next, png_struct and png_info need to be allocated and initialized. +As these can be both relatively large, you may not want to store these +on the stack, unless you have stack space to spare. Of course, you +will want to check if they return NULL. If you are also reading, +you won't want to name your read structure and your write structure +both "png_ptr"; you can call them anything you like, such as +"read_ptr" and "write_ptr". Look at pngtest.c, for example. + + png_structp png_ptr = png_create_write_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + + if (!png_ptr) + return (ERROR); + + png_infop info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_write_struct(&png_ptr, + (png_infopp)NULL); + return (ERROR); + } + +If you want to use your own memory allocation routines, +define PNG_USER_MEM_SUPPORTED and use +png_create_write_struct_2() instead of png_create_write_struct(): + + png_structp png_ptr = png_create_write_struct_2 + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn, (png_voidp) + user_mem_ptr, user_malloc_fn, user_free_fn); + +After you have these structures, you will need to set up the +error handling. When libpng encounters an error, it expects to +longjmp() back to your routine. Therefore, you will need to call +setjmp() and pass the png_jmpbuf(png_ptr). If you +write the file from different routines, you will need to update +the png_jmpbuf(png_ptr) every time you enter a new routine that will +call a png_*() function. See your documentation of setjmp/longjmp +for your compiler for more information on setjmp/longjmp. See +the discussion on libpng error handling in the Customizing Libpng +section below for more information on the libpng error handling. + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_write_struct(&png_ptr, &info_ptr); + fclose(fp); + return (ERROR); + } + ... + return; + +If you would rather avoid the complexity of setjmp/longjmp issues, +you can compile libpng with PNG_NO_SETJMP, in which case +errors will result in a call to PNG_ABORT() which defaults to abort(). + +You can #define PNG_ABORT() to a function that does something +more useful than abort(), as long as your function does not +return. + +Checking for invalid palette index on write was added at libpng +1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues +a benign error. This is enabled by default because this condition is an +error according to the PNG specification, Clause 11.3.2, but the error can +be ignored in each png_ptr with + + png_set_check_for_invalid_index(png_ptr, 0); + +If the error is ignored, or if png_benign_error() treats it as a warning, +any invalid pixels are written as-is by the encoder, resulting in an +invalid PNG datastream as output. In this case the application is +responsible for ensuring that the pixel indexes are in range when it writes +a PLTE chunk with fewer entries than the bit depth would allow. + +Now you need to set up the output code. The default for libpng is to +use the C function fwrite(). If you use this, you will need to pass a +valid FILE * in the function png_init_io(). Be sure that the file is +opened in binary mode. Again, if you wish to handle writing data in +another way, see the discussion on libpng I/O handling in the Customizing +Libpng section below. + + png_init_io(png_ptr, fp); + +If you are embedding your PNG into a datastream such as MNG, and don't +want libpng to write the 8-byte signature, or if you have already +written the signature in your application, use + + png_set_sig_bytes(png_ptr, 8); + +to inform libpng that it should not write a signature. + +.SS Write callbacks + +At this point, you can set up a callback function that will be +called after each row has been written, which you can use to control +a progress meter or the like. It's demonstrated in pngtest.c. +You must supply a function + + void write_row_callback(png_structp png_ptr, png_uint_32 row, + int pass); + { + /* put your code here */ + } + +(You can give it another name that you like instead of "write_row_callback") + +To inform libpng about your function, use + + png_set_write_status_fn(png_ptr, write_row_callback); + +When this function is called the row has already been completely processed and +it has also been written out. The 'row' and 'pass' refer to the next row to be +handled. For the +non-interlaced case the row that was just handled is simply one less than the +passed in row number, and pass will always be 0. For the interlaced case the +same applies unless the row value is 0, in which case the row just handled was +the last one from one of the preceding passes. Because interlacing may skip a +pass you cannot be sure that the preceding pass is just 'pass-1', if you really +need to know what the last pass is record (row,pass) from the callback and use +the last recorded value each time. + +As with the user transform you can find the output row using the +PNG_ROW_FROM_PASS_ROW macro. + +You now have the option of modifying how the compression library will +run. The following functions are mainly for testing, but may be useful +in some cases, like if you need to write PNG files extremely fast and +are willing to give up some compression, or if you want to get the +maximum possible compression at the expense of slower writing. If you +have no special needs in this area, let the library do what it wants by +not calling this function at all, as it has been tuned to deliver a good +speed/compression ratio. The second parameter to png_set_filter() is +the filter method, for which the only valid values are 0 (as of the +July 1999 PNG specification, version 1.2) or 64 (if you are writing +a PNG datastream that is to be embedded in a MNG datastream). The third +parameter is a flag that indicates which filter type(s) are to be tested +for each scanline. See the PNG specification for details on the specific +filter types. + + + /* turn on or off filtering, and/or choose + specific filters. You can use either a single + PNG_FILTER_VALUE_NAME or the bitwise OR of one + or more PNG_FILTER_NAME masks. + */ + png_set_filter(png_ptr, 0, + PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | + PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | + PNG_FILTER_UP | PNG_FILTER_VALUE_UP | + PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG | + PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| + PNG_ALL_FILTERS); + +If an application wants to start and stop using particular filters during +compression, it should start out with all of the filters (to ensure that +the previous row of pixels will be stored in case it's needed later), +and then add and remove them after the start of compression. + +If you are writing a PNG datastream that is to be embedded in a MNG +datastream, the second parameter can be either 0 or 64. + +The png_set_compression_*() functions interface to the zlib compression +library, and should mostly be ignored unless you really know what you are +doing. The only generally useful call is png_set_compression_level() +which changes how much time zlib spends on trying to compress the image +data. See the Compression Library (zlib.h and algorithm.txt, distributed +with zlib) for details on the compression levels. + + #include zlib.h + + /* Set the zlib compression level */ + png_set_compression_level(png_ptr, + Z_BEST_COMPRESSION); + + /* Set other zlib parameters for compressing IDAT */ + png_set_compression_mem_level(png_ptr, 8); + png_set_compression_strategy(png_ptr, + Z_DEFAULT_STRATEGY); + png_set_compression_window_bits(png_ptr, 15); + png_set_compression_method(png_ptr, 8); + png_set_compression_buffer_size(png_ptr, 8192) + + /* Set zlib parameters for text compression + * If you don't call these, the parameters + * fall back on those defined for IDAT chunks + */ + png_set_text_compression_mem_level(png_ptr, 8); + png_set_text_compression_strategy(png_ptr, + Z_DEFAULT_STRATEGY); + png_set_text_compression_window_bits(png_ptr, 15); + png_set_text_compression_method(png_ptr, 8); + +.SS Setting the contents of info for output + +You now need to fill in the png_info structure with all the data you +wish to write before the actual image. Note that the only thing you +are allowed to write after the image is the text chunks and the time +chunk (as of PNG Specification 1.2, anyway). See png_write_end() and +the latest PNG specification for more information on that. If you +wish to write them before the image, fill them in now, and flag that +data as being valid. If you want to wait until after the data, don't +fill them until png_write_end(). For all the fields in png_info and +their data types, see png.h. For explanations of what the fields +contain, see the PNG specification. + +Some of the more important parts of the png_info are: + + png_set_IHDR(png_ptr, info_ptr, width, height, + bit_depth, color_type, interlace_type, + compression_type, filter_method) + + width - holds the width of the image + in pixels (up to 2^31). + + height - holds the height of the image + in pixels (up to 2^31). + + bit_depth - holds the bit depth of one of the + image channels. + (valid values are 1, 2, 4, 8, 16 + and depend also on the + color_type. See also significant + bits (sBIT) below). + + color_type - describes which color/alpha + channels are present. + PNG_COLOR_TYPE_GRAY + (bit depths 1, 2, 4, 8, 16) + PNG_COLOR_TYPE_GRAY_ALPHA + (bit depths 8, 16) + PNG_COLOR_TYPE_PALETTE + (bit depths 1, 2, 4, 8) + PNG_COLOR_TYPE_RGB + (bit_depths 8, 16) + PNG_COLOR_TYPE_RGB_ALPHA + (bit_depths 8, 16) + + PNG_COLOR_MASK_PALETTE + PNG_COLOR_MASK_COLOR + PNG_COLOR_MASK_ALPHA + + interlace_type - PNG_INTERLACE_NONE or + PNG_INTERLACE_ADAM7 + + compression_type - (must be + PNG_COMPRESSION_TYPE_DEFAULT) + + filter_method - (must be PNG_FILTER_TYPE_DEFAULT + or, if you are writing a PNG to + be embedded in a MNG datastream, + can also be + PNG_INTRAPIXEL_DIFFERENCING) + +If you call png_set_IHDR(), the call must appear before any of the +other png_set_*() functions, because they might require access to some of +the IHDR settings. The remaining png_set_*() functions can be called +in any order. + +If you wish, you can reset the compression_type, interlace_type, or +filter_method later by calling png_set_IHDR() again; if you do this, the +width, height, bit_depth, and color_type must be the same in each call. + + png_set_PLTE(png_ptr, info_ptr, palette, + num_palette); + + palette - the palette for the file + (array of png_color) + num_palette - number of entries in the palette + + png_set_gAMA(png_ptr, info_ptr, file_gamma); + png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma); + + file_gamma - the gamma at which the image was + created (PNG_INFO_gAMA) + + int_file_gamma - 100,000 times the gamma at which + the image was created + + png_set_cHRM(png_ptr, info_ptr, white_x, white_y, red_x, red_y, + green_x, green_y, blue_x, blue_y) + png_set_cHRM_XYZ(png_ptr, info_ptr, red_X, red_Y, red_Z, green_X, + green_Y, green_Z, blue_X, blue_Y, blue_Z) + png_set_cHRM_fixed(png_ptr, info_ptr, int_white_x, int_white_y, + int_red_x, int_red_y, int_green_x, int_green_y, + int_blue_x, int_blue_y) + png_set_cHRM_XYZ_fixed(png_ptr, info_ptr, int_red_X, int_red_Y, + int_red_Z, int_green_X, int_green_Y, int_green_Z, + int_blue_X, int_blue_Y, int_blue_Z) + + {white,red,green,blue}_{x,y} + A color space encoding specified using the chromaticities + of the end points and the white point. + + {red,green,blue}_{X,Y,Z} + A color space encoding specified using the encoding end + points - the CIE tristimulus specification of the intended + color of the red, green and blue channels in the PNG RGB + data. The white point is simply the sum of the three end + points. + + png_set_sRGB(png_ptr, info_ptr, srgb_intent); + + srgb_intent - the rendering intent + (PNG_INFO_sRGB) The presence of + the sRGB chunk means that the pixel + data is in the sRGB color space. + This chunk also implies specific + values of gAMA and cHRM. Rendering + intent is the CSS-1 property that + has been defined by the International + Color Consortium + (http://www.color.org). + It can be one of + PNG_sRGB_INTENT_SATURATION, + PNG_sRGB_INTENT_PERCEPTUAL, + PNG_sRGB_INTENT_ABSOLUTE, or + PNG_sRGB_INTENT_RELATIVE. + + + png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, + srgb_intent); + + srgb_intent - the rendering intent + (PNG_INFO_sRGB) The presence of the + sRGB chunk means that the pixel + data is in the sRGB color space. + This function also causes gAMA and + cHRM chunks with the specific values + that are consistent with sRGB to be + written. + + png_set_iCCP(png_ptr, info_ptr, name, compression_type, + profile, proflen); + + name - The profile name. + + compression_type - The compression type; always + PNG_COMPRESSION_TYPE_BASE for PNG 1.0. + You may give NULL to this argument to + ignore it. + + profile - International Color Consortium color + profile data. May contain NULs. + + proflen - length of profile data in bytes. + + png_set_sBIT(png_ptr, info_ptr, sig_bit); + + sig_bit - the number of significant bits for + (PNG_INFO_sBIT) each of the gray, red, + green, and blue channels, whichever are + appropriate for the given color type + (png_color_16) + + png_set_tRNS(png_ptr, info_ptr, trans_alpha, + num_trans, trans_color); + + trans_alpha - array of alpha (transparency) + entries for palette (PNG_INFO_tRNS) + + num_trans - number of transparent entries + (PNG_INFO_tRNS) + + trans_color - graylevel or color sample values + (in order red, green, blue) of the + single transparent color for + non-paletted images (PNG_INFO_tRNS) + + png_set_hIST(png_ptr, info_ptr, hist); + + hist - histogram of palette (array of + png_uint_16) (PNG_INFO_hIST) + + png_set_tIME(png_ptr, info_ptr, mod_time); + + mod_time - time image was last modified + (PNG_VALID_tIME) + + png_set_bKGD(png_ptr, info_ptr, background); + + background - background color (of type + png_color_16p) (PNG_VALID_bKGD) + + png_set_text(png_ptr, info_ptr, text_ptr, num_text); + + text_ptr - array of png_text holding image + comments + + text_ptr[i].compression - type of compression used + on "text" PNG_TEXT_COMPRESSION_NONE + PNG_TEXT_COMPRESSION_zTXt + PNG_ITXT_COMPRESSION_NONE + PNG_ITXT_COMPRESSION_zTXt + text_ptr[i].key - keyword for comment. Must contain + 1-79 characters. + text_ptr[i].text - text comments for current + keyword. Can be NULL or empty. + text_ptr[i].text_length - length of text string, + after decompression, 0 for iTXt + text_ptr[i].itxt_length - length of itxt string, + after decompression, 0 for tEXt/zTXt + text_ptr[i].lang - language of comment (NULL or + empty for unknown). + text_ptr[i].translated_keyword - keyword in UTF-8 (NULL + or empty for unknown). + + Note that the itxt_length, lang, and lang_key + members of the text_ptr structure only exist when the + library is built with iTXt chunk support. Prior to + libpng-1.4.0 the library was built by default without + iTXt support. Also note that when iTXt is supported, + they contain NULL pointers when the "compression" + field contains PNG_TEXT_COMPRESSION_NONE or + PNG_TEXT_COMPRESSION_zTXt. + + num_text - number of comments + + png_set_sPLT(png_ptr, info_ptr, &palette_ptr, + num_spalettes); + + palette_ptr - array of png_sPLT_struct structures + to be added to the list of palettes + in the info structure. + num_spalettes - number of palette structures to be + added. + + png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, + unit_type); + + offset_x - positive offset from the left + edge of the screen + + offset_y - positive offset from the top + edge of the screen + + unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER + + png_set_pHYs(png_ptr, info_ptr, res_x, res_y, + unit_type); + + res_x - pixels/unit physical resolution + in x direction + + res_y - pixels/unit physical resolution + in y direction + + unit_type - PNG_RESOLUTION_UNKNOWN, + PNG_RESOLUTION_METER + + png_set_sCAL(png_ptr, info_ptr, unit, width, height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + + height - height of a pixel in physical scale units + (width and height are doubles) + + png_set_sCAL_s(png_ptr, info_ptr, unit, width, height) + + unit - physical scale units (an integer) + + width - width of a pixel in physical scale units + expressed as a string + + height - height of a pixel in physical scale units + (width and height are strings like "2.54") + + png_set_unknown_chunks(png_ptr, info_ptr, &unknowns, + num_unknowns) + + unknowns - array of png_unknown_chunk + structures holding unknown chunks + unknowns[i].name - name of unknown chunk + unknowns[i].data - data of unknown chunk + unknowns[i].size - size of unknown chunk's data + unknowns[i].location - position to write chunk in file + 0: do not write chunk + PNG_HAVE_IHDR: before PLTE + PNG_HAVE_PLTE: before IDAT + PNG_AFTER_IDAT: after IDAT + +The "location" member is set automatically according to +what part of the output file has already been written. +You can change its value after calling png_set_unknown_chunks() +as demonstrated in pngtest.c. Within each of the "locations", +the chunks are sequenced according to their position in the +structure (that is, the value of "i", which is the order in which +the chunk was either read from the input file or defined with +png_set_unknown_chunks). + +A quick word about text and num_text. text is an array of png_text +structures. num_text is the number of valid structures in the array. +Each png_text structure holds a language code, a keyword, a text value, +and a compression type. + +The compression types have the same valid numbers as the compression +types of the image data. Currently, the only valid number is zero. +However, you can store text either compressed or uncompressed, unlike +images, which always have to be compressed. So if you don't want the +text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE. +Because tEXt and zTXt chunks don't have a language field, if you +specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt +any language code or translated keyword will not be written out. + +Until text gets around a few hundred bytes, it is not worth compressing it. +After the text has been written out to the file, the compression type +is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR, +so that it isn't written out again at the end (in case you are calling +png_write_end() with the same struct). + +The keywords that are given in the PNG Specification are: + + Title Short (one line) title or + caption for image + + Author Name of image's creator + + Description Description of image (possibly long) + + Copyright Copyright notice + + Creation Time Time of original image creation + (usually RFC 1123 format, see below) + + Software Software used to create the image + + Disclaimer Legal disclaimer + + Warning Warning of nature of content + + Source Device used to create the image + + Comment Miscellaneous comment; conversion + from other image format + +The keyword-text pairs work like this. Keywords should be short +simple descriptions of what the comment is about. Some typical +keywords are found in the PNG specification, as is some recommendations +on keywords. You can repeat keywords in a file. You can even write +some text before the image and some after. For example, you may want +to put a description of the image before the image, but leave the +disclaimer until after, so viewers working over modem connections +don't have to wait for the disclaimer to go over the modem before +they start seeing the image. Finally, keywords should be full +words, not abbreviations. Keywords and text are in the ISO 8859-1 +(Latin-1) character set (a superset of regular ASCII) and can not +contain NUL characters, and should not contain control or other +unprintable characters. To make the comments widely readable, stick +with basic ASCII, and avoid machine specific character set extensions +like the IBM-PC character set. The keyword must be present, but +you can leave off the text string on non-compressed pairs. +Compressed pairs must have a text string, as only the text string +is compressed anyway, so the compression would be meaningless. + +PNG supports modification time via the png_time structure. Two +conversion routines are provided, png_convert_from_time_t() for +time_t and png_convert_from_struct_tm() for struct tm. The +time_t routine uses gmtime(). You don't have to use either of +these, but if you wish to fill in the png_time structure directly, +you should provide the time in universal time (GMT) if possible +instead of your local time. Note that the year number is the full +year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and +that months start with 1. + +If you want to store the time of the original image creation, you should +use a plain tEXt chunk with the "Creation Time" keyword. This is +necessary because the "creation time" of a PNG image is somewhat vague, +depending on whether you mean the PNG file, the time the image was +created in a non-PNG format, a still photo from which the image was +scanned, or possibly the subject matter itself. In order to facilitate +machine-readable dates, it is recommended that the "Creation Time" +tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"), +although this isn't a requirement. Unlike the tIME chunk, the +"Creation Time" tEXt chunk is not expected to be automatically changed +by the software. To facilitate the use of RFC 1123 dates, a function +png_convert_to_rfc1123_buffer(png_ptr, buffer, png_timep) is provided to +convert from PNG time to an RFC 1123 format string. The caller must provide +a writeable buffer of at least 29 bytes. + +.SS Writing unknown chunks + +You can use the png_set_unknown_chunks function to queue up chunks +for writing. You give it a chunk name, raw data, and a size; that's +all there is to it. The chunks will be written by the next following +png_write_info_before_PLTE, png_write_info, or png_write_end function. +Any chunks previously read into the info structure's unknown-chunk +list will also be written out in a sequence that satisfies the PNG +specification's ordering rules. + +.SS The high-level write interface + +At this point there are two ways to proceed; through the high-level +write interface, or through a sequence of low-level write operations. +You can use the high-level interface if your image data is present +in the info structure. All defined output +transformations are permitted, enabled by the following masks. + + PNG_TRANSFORM_IDENTITY No transformation + PNG_TRANSFORM_PACKING Pack 1, 2 and 4-bit samples + PNG_TRANSFORM_PACKSWAP Change order of packed + pixels to LSB first + PNG_TRANSFORM_INVERT_MONO Invert monochrome images + PNG_TRANSFORM_SHIFT Normalize pixels to the + sBIT depth + PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA + to BGRA + PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA + to AG + PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity + to transparency + PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + PNG_TRANSFORM_STRIP_FILLER Strip out filler + bytes (deprecated). + PNG_TRANSFORM_STRIP_FILLER_BEFORE Strip out leading + filler bytes + PNG_TRANSFORM_STRIP_FILLER_AFTER Strip out trailing + filler bytes + +If you have valid image data in the info structure (you can use +png_set_rows() to put image data in the info structure), simply do this: + + png_write_png(png_ptr, info_ptr, png_transforms, NULL) + +where png_transforms is an integer containing the bitwise OR of some set of +transformation flags. This call is equivalent to png_write_info(), +followed the set of transformations indicated by the transform mask, +then png_write_image(), and finally png_write_end(). + +(The final parameter of this call is not yet used. Someday it might point +to transformation parameters required by some future output transform.) + +You must use png_transforms and not call any png_set_transform() functions +when you use png_write_png(). + +.SS The low-level write interface + +If you are going the low-level route instead, you are now ready to +write all the file information up to the actual image data. You do +this with a call to png_write_info(). + + png_write_info(png_ptr, info_ptr); + +Note that there is one transformation you may need to do before +png_write_info(). In PNG files, the alpha channel in an image is the +level of opacity. If your data is supplied as a level of transparency, +you can invert the alpha channel before you write it, so that 0 is +fully transparent and 255 (in 8-bit or paletted images) or 65535 +(in 16-bit images) is fully opaque, with + + png_set_invert_alpha(png_ptr); + +This must appear before png_write_info() instead of later with the +other transformations because in the case of paletted images the tRNS +chunk data has to be inverted before the tRNS chunk is written. If +your image is not a paletted image, the tRNS data (which in such cases +represents a single color to be rendered as transparent) won't need to +be changed, and you can safely do this transformation after your +png_write_info() call. + +If you need to write a private chunk that you want to appear before +the PLTE chunk when PLTE is present, you can write the PNG info in +two steps, and insert code to write your own chunk between them: + + png_write_info_before_PLTE(png_ptr, info_ptr); + png_set_unknown_chunks(png_ptr, info_ptr, ...); + png_write_info(png_ptr, info_ptr); + +After you've written the file information, you can set up the library +to handle any special transformations of the image data. The various +ways to transform the data will be described in the order that they +should occur. This is important, as some of these change the color +type and/or bit depth of the data, and some others only work on +certain color types and bit depths. Even though each transformation +checks to see if it has data that it can do something with, you should +make sure to only enable a transformation if it will be valid for the +data. For example, don't swap red and blue on grayscale data. + +PNG files store RGB pixels packed into 3 or 6 bytes. This code tells +the library to strip input data that has 4 or 8 bytes per pixel down +to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2 +bytes per pixel). + + png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); + +where the 0 is unused, and the location is either PNG_FILLER_BEFORE or +PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel +is stored XRGB or RGBX. + +PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as +they can, resulting in, for example, 8 pixels per byte for 1 bit files. +If the data is supplied at 1 pixel per byte, use this code, which will +correctly pack the pixels into a single byte: + + png_set_packing(png_ptr); + +PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your +data is of another bit depth, you can write an sBIT chunk into the +file so that decoders can recover the original data if desired. + + /* Set the true bit depth of the image data */ + if (color_type & PNG_COLOR_MASK_COLOR) + { + sig_bit.red = true_bit_depth; + sig_bit.green = true_bit_depth; + sig_bit.blue = true_bit_depth; + } + + else + { + sig_bit.gray = true_bit_depth; + } + + if (color_type & PNG_COLOR_MASK_ALPHA) + { + sig_bit.alpha = true_bit_depth; + } + + png_set_sBIT(png_ptr, info_ptr, &sig_bit); + +If the data is stored in the row buffer in a bit depth other than +one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG), +this will scale the values to appear to be the correct bit depth as +is required by PNG. + + png_set_shift(png_ptr, &sig_bit); + +PNG files store 16-bit pixels in network byte order (big-endian, +ie. most significant bits first). This code would be used if they are +supplied the other way (little-endian, i.e. least significant bits +first, the way PCs store them): + + if (bit_depth > 8) + png_set_swap(png_ptr); + +If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you +need to change the order the pixels are packed into bytes, you can use: + + if (bit_depth < 8) + png_set_packswap(png_ptr); + +PNG files store 3 color pixels in red, green, blue order. This code +would be used if they are supplied as blue, green, red: + + png_set_bgr(png_ptr); + +PNG files describe monochrome as black being zero and white being +one. This code would be used if the pixels are supplied with this reversed +(black being one and white being zero): + + png_set_invert_mono(png_ptr); + +Finally, you can write your own transformation function if none of +the existing ones meets your needs. This is done by setting a callback +with + + png_set_write_user_transform_fn(png_ptr, + write_transform_fn); + +You must supply the function + + void write_transform_fn(png_structp png_ptr, png_row_infop + row_info, png_bytep data) + +See pngtest.c for a working example. Your function will be called +before any of the other transformations are processed. If supported +libpng also supplies an information routine that may be called from +your callback: + + png_get_current_row_number(png_ptr); + png_get_current_pass_number(png_ptr); + +This returns the current row passed to the transform. With interlaced +images the value returned is the row in the input sub-image image. Use +PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to +find the output pixel (x,y) given an interlaced sub-image pixel (row,col,pass). + +The discussion of interlace handling above contains more information on how to +use these values. + +You can also set up a pointer to a user structure for use by your +callback function. + + png_set_user_transform_info(png_ptr, user_ptr, 0, 0); + +The user_channels and user_depth parameters of this function are ignored +when writing; you can set them to zero as shown. + +You can retrieve the pointer via the function png_get_user_transform_ptr(). +For example: + + voidp write_user_transform_ptr = + png_get_user_transform_ptr(png_ptr); + +It is possible to have libpng flush any pending output, either manually, +or automatically after a certain number of lines have been written. To +flush the output stream a single time call: + + png_write_flush(png_ptr); + +and to have libpng flush the output stream periodically after a certain +number of scanlines have been written, call: + + png_set_flush(png_ptr, nrows); + +Note that the distance between rows is from the last time png_write_flush() +was called, or the first row of the image if it has never been called. +So if you write 50 lines, and then png_set_flush 25, it will flush the +output on the next scanline, and every 25 lines thereafter, unless +png_write_flush() is called before 25 more lines have been written. +If nrows is too small (less than about 10 lines for a 640 pixel wide +RGB image) the image compression may decrease noticeably (although this +may be acceptable for real-time applications). Infrequent flushing will +only degrade the compression performance by a few percent over images +that do not use flushing. + +.SS Writing the image data + +That's it for the transformations. Now you can write the image data. +The simplest way to do this is in one function call. If you have the +whole image in memory, you can just call png_write_image() and libpng +will write the image. You will need to pass in an array of pointers to +each row. This function automatically handles interlacing, so you don't +need to call png_set_interlace_handling() or call this function multiple +times, or any of that other stuff necessary with png_write_rows(). + + png_write_image(png_ptr, row_pointers); + +where row_pointers is: + + png_byte *row_pointers[height]; + +You can point to void or char or whatever you use for pixels. + +If you don't want to write the whole image at once, you can +use png_write_rows() instead. If the file is not interlaced, +this is simple: + + png_write_rows(png_ptr, row_pointers, + number_of_rows); + +row_pointers is the same as in the png_write_image() call. + +If you are just writing one row at a time, you can do this with +a single row_pointer instead of an array of row_pointers: + + png_bytep row_pointer = row; + + png_write_row(png_ptr, row_pointer); + +When the file is interlaced, things can get a good deal more complicated. +The only currently (as of the PNG Specification version 1.2, dated July +1999) defined interlacing scheme for PNG files is the "Adam7" interlace +scheme, that breaks down an image into seven smaller images of varying +size. libpng will build these images for you, or you can do them +yourself. If you want to build them yourself, see the PNG specification +for details of which pixels to write when. + +If you don't want libpng to handle the interlacing details, just +use png_set_interlace_handling() and call png_write_rows() the +correct number of times to write all the sub-images +(png_set_interlace_handling() returns the number of sub-images.) + +If you want libpng to build the sub-images, call this before you start +writing any rows: + + number_of_passes = png_set_interlace_handling(png_ptr); + +This will return the number of passes needed. Currently, this is seven, +but may change if another interlace type is added. + +Then write the complete image number_of_passes times. + + png_write_rows(png_ptr, row_pointers, number_of_rows); + +Think carefully before you write an interlaced image. Typically code that +reads such images reads all the image data into memory, uncompressed, before +doing any processing. Only code that can display an image on the fly can +take advantage of the interlacing and even then the image has to be exactly +the correct size for the output device, because scaling an image requires +adjacent pixels and these are not available until all the passes have been +read. + +If you do write an interlaced image you will hardly ever need to handle +the interlacing yourself. Call png_set_interlace_handling() and use the +approach described above. + +The only time it is conceivable that you will really need to write an +interlaced image pass-by-pass is when you have read one pass by pass and +made some pixel-by-pixel transformation to it, as described in the read +code above. In this case use the PNG_PASS_ROWS and PNG_PASS_COLS macros +to determine the size of each sub-image in turn and simply write the rows +you obtained from the read code. + +.SS Finishing a sequential write + +After you are finished writing the image, you should finish writing +the file. If you are interested in writing comments or time, you should +pass an appropriately filled png_info pointer. If you are not interested, +you can pass NULL. + + png_write_end(png_ptr, info_ptr); + +When you are done, you can free all memory used by libpng like this: + + png_destroy_write_struct(&png_ptr, &info_ptr); + +It is also possible to individually free the info_ptr members that +point to libpng-allocated storage with the following function: + + png_free_data(png_ptr, info_ptr, mask, seq) + + mask - identifies data to be freed, a mask + containing the bitwise OR of one or + more of + PNG_FREE_PLTE, PNG_FREE_TRNS, + PNG_FREE_HIST, PNG_FREE_ICCP, + PNG_FREE_PCAL, PNG_FREE_ROWS, + PNG_FREE_SCAL, PNG_FREE_SPLT, + PNG_FREE_TEXT, PNG_FREE_UNKN, + or simply PNG_FREE_ALL + + seq - sequence number of item to be freed + (-1 for all items) + +This function may be safely called when the relevant storage has +already been freed, or has not yet been allocated, or was allocated +by the user and not by libpng, and will in those cases do nothing. +The "seq" parameter is ignored if only one item of the selected data +type, such as PLTE, is allowed. If "seq" is not -1, and multiple items +are allowed for the data type identified in the mask, such as text or +sPLT, only the n'th item in the structure is freed, where n is "seq". + +If you allocated data such as a palette that you passed in to libpng +with png_set_*, you must not free it until just before the call to +png_destroy_write_struct(). + +The default behavior is only to free data that was allocated internally +by libpng. This can be changed, so that libpng will not free the data, +or so that it will free data that was allocated by the user with png_malloc() +or png_calloc() and passed in via a png_set_*() function, with + + png_data_freer(png_ptr, info_ptr, freer, mask) + + freer - one of + PNG_DESTROY_WILL_FREE_DATA + PNG_SET_WILL_FREE_DATA + PNG_USER_WILL_FREE_DATA + + mask - which data elements are affected + same choices as in png_free_data() + +For example, to transfer responsibility for some data from a read structure +to a write structure, you could use + + png_data_freer(read_ptr, read_info_ptr, + PNG_USER_WILL_FREE_DATA, + PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) + + png_data_freer(write_ptr, write_info_ptr, + PNG_DESTROY_WILL_FREE_DATA, + PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) + +thereby briefly reassigning responsibility for freeing to the user but +immediately afterwards reassigning it once more to the write_destroy +function. Having done this, it would then be safe to destroy the read +structure and continue to use the PLTE, tRNS, and hIST data in the write +structure. + +This function only affects data that has already been allocated. +You can call this function before calling after the png_set_*() functions +to control whether the user or png_destroy_*() is supposed to free the data. +When the user assumes responsibility for libpng-allocated data, the +application must use +png_free() to free it, and when the user transfers responsibility to libpng +for data that the user has allocated, the user must have used png_malloc() +or png_calloc() to allocate it. + +If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword +separately, do not transfer responsibility for freeing text_ptr to libpng, +because when libpng fills a png_text structure it combines these members with +the key member, and png_free_data() will free only text_ptr.key. Similarly, +if you transfer responsibility for free'ing text_ptr from libpng to your +application, your application must not separately free those members. +For a more compact example of writing a PNG image, see the file example.c. + +.SH V. Simplified API + +The simplified API, which became available in libpng-1.6.0, hides the details +of both libpng and the PNG file format itself. +It allows PNG files to be read into a very limited number of +in-memory bitmap formats or to be written from the same formats. If these +formats do not accomodate your needs then you can, and should, use the more +sophisticated APIs above - these support a wide variety of in-memory formats +and a wide variety of sophisticated transformations to those formats as well +as a wide variety of APIs to manipulate ancilliary information. + +To read a PNG file using the simplified API: + + 1) Declare a 'png_image' structure (see below) on the + stack and memset() it to all zero. + + 2) Call the appropriate png_image_begin_read... function. + + 3) Set the png_image 'format' member to the required + format and allocate a buffer for the image. + + 4) Call png_image_finish_read to read the image into + your buffer. + +There are no restrictions on the format of the PNG input itself; all valid +color types, bit depths, and interlace methods are acceptable, and the +input image is transformed as necessary to the requested in-memory format +during the png_image_finish_read() step. + +To write a PNG file using the simplified API: + + 1) Declare a 'png_image' structure on the stack and memset() + it to all zero. + + 2) Initialize the members of the structure that describe the + image, setting the 'format' member to the format of the + image in memory. + + 3) Call the appropriate png_image_write... function with a + pointer to the image to write the PNG data. + +png_image is a structure that describes the in-memory format of an image +when it is being read or define the in-memory format of an image that you +need to write. The "png_image" structure contains the following members: + + png_uint_32 version Set to PNG_IMAGE_VERSION + png_uint_32 width Image width in pixels (columns) + png_uint_32 height Image height in pixels (rows) + png_uint_32 format Image format as defined below + png_uint_32 flags A bit mask containing informational flags + png_controlp opaque Initialize to NULL, free with png_image_free + png_uint_32 colormap_entries; Number of entries in the color-map + png_uint_32 warning_or_error; + char message[64]; + +In the event of an error or warning the following field warning_or_error +field will be set to a non-zero value and the 'message' field will contain +a '\0' terminated string with the libpng error or warning message. If both +warnings and an error were encountered, only the error is recorded. If there +are multiple warnings, only the first one is recorded. + +The upper 30 bits of this value are reserved; the low two bits contain +a two bit code such that a value more than 1 indicates a failure in the API +just called: + + 0 - no warning or error + 1 - warning + 2 - error + 3 - error preceded by warning + +The pixels (samples) of the image have one to four channels whose components +have original values in the range 0 to 1.0: + + 1: A single gray or luminance channel (G). + 2: A gray/luminance channel and an alpha channel (GA). + 3: Three red, green, blue color channels (RGB). + 4: Three color channels and an alpha channel (RGBA). + +The channels are encoded in one of two ways: + + a) As a small integer, value 0..255, contained in a single byte. For the +alpha channel the original value is simply value/255. For the color or +luminance channels the value is encoded according to the sRGB specification +and matches the 8-bit format expected by typical display devices. + +The color/gray channels are not scaled (pre-multiplied) by the alpha +channel and are suitable for passing to color management software. + + b) As a value in the range 0..65535, contained in a 2-byte integer. All +channels can be converted to the original value by dividing by 65535; all +channels are linear. Color channels use the RGB encoding (RGB end-points) of +the sRGB specification. This encoding is identified by the +PNG_FORMAT_FLAG_LINEAR flag below. + +When an alpha channel is present it is expected to denote pixel coverage +of the color or luminance channels and is returned as an associated alpha +channel: the color/gray channels are scaled (pre-multiplied) by the alpha +value. + +When a color-mapped image is used as a result of calling +png_image_read_colormap or png_image_write_colormap the channels are encoded +in the color-map and the descriptions above apply to the color-map entries. +The image data is encoded as small integers, value 0..255, that index the +entries in the color-map. One integer (one byte) is stored for each pixel. + +PNG_FORMAT_* + +The #defines to be used in png_image::format. Each #define identifies a +particular layout of channel data and, if present, alpha values. There are +separate defines for each of the two channel encodings. + +A format is built up using single bit flag values. Not all combinations are +valid: use the bit flag values below for testing a format returned by the +read APIs, but set formats from the derived values. + +When reading or writing color-mapped images the format should be set to the +format of the entries in the color-map then png_image_{read,write}_colormap +called to read or write the color-map and set the format correctly for the +image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! + +NOTE: libpng can be built with particular features disabled, if you see +compiler errors because the definition of one of the following flags has been +compiled out it is because libpng does not have the required support. It is +possible, however, for the libpng configuration to enable the format on just +read or just write; in that case you may see an error at run time. You can +guard against this by checking for the definition of: + + PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED + + PNG_FORMAT_FLAG_ALPHA 0x01 format with an alpha channel + PNG_FORMAT_FLAG_COLOR 0x02 color format: otherwise grayscale + PNG_FORMAT_FLAG_LINEAR 0x04 png_uint_16 channels else png_byte + PNG_FORMAT_FLAG_COLORMAP 0x08 libpng use only + PNG_FORMAT_FLAG_BGR 0x10 BGR colors, else order is RGB + PNG_FORMAT_FLAG_AFIRST 0x20 alpha channel comes first + +Supported formats are as follows. Future versions of libpng may support more +formats; for compatibility with older versions simply check if the format +macro is defined using #ifdef. These defines describe the in-memory layout +of the components of the pixels of the image. + +First the single byte formats: + + PNG_FORMAT_GRAY 0 + PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA + PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST) + PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR + PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR) + PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA) + PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST) + PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA) + PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST) + +Then the linear 2-byte formats. When naming these "Y" is used to +indicate a luminance (gray) channel. The component order within the pixel +is always the same - there is no provision for swapping the order of the +components in the linear format. + + PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR + PNG_FORMAT_LINEAR_Y_ALPHA + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA) + PNG_FORMAT_LINEAR_RGB + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR) + PNG_FORMAT_LINEAR_RGB_ALPHA + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR| + PNG_FORMAT_FLAG_ALPHA) + +Color-mapped formats are obtained by calling png_image_{read,write}_colormap, +as appropriate after setting png_image::format to the format of the color-map +to be read or written. Applications may check the value of +PNG_FORMAT_FLAG_COLORMAP to see if they have called the colormap API. The +format of the color-map may be extracted using the following macro. + + PNG_FORMAT_OF_COLORMAP(fmt) ((fmt) & ~PNG_FORMAT_FLAG_COLORMAP) + +PNG_IMAGE macros + +These are convenience macros to derive information from a png_image +structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the +actual image sample values - either the entries in the color-map or the +pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values +for the pixels and will always return 1 after a call to +png_image_{read,write}_colormap. The remaining macros return information +about the rows in the image and the complete image. + +NOTE: All the macros that take a png_image::format parameter are compile time +constants if the format parameter is, itself, a constant. Therefore these +macros can be used in array declarations and case labels where required. +Similarly the macros are also pre-processor constants (sizeof is not used) so +they can be used in #if tests. + +First the information about the samples. + + PNG_IMAGE_SAMPLE_CHANNELS(fmt) + Returns the total number of channels in a given format: 1..4 + + PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt) + Returns the size in bytes of a single component of a pixel or color-map + entry (as appropriate) in the image. + + PNG_IMAGE_SAMPLE_SIZE(fmt) + This is the size of the sample data for one sample. If the image is + color-mapped it is the size of one color-map entry (and image pixels are + one byte in size), otherwise it is the size of one image pixel. + + PNG_IMAGE_COLORMAP_SIZE(fmt) + The size of the color-map required by the format; this is the size of the + color-map buffer passed to the png_image_{read,write}_colormap APIs, it is + a fixed number determined by the format so can easily be allocated on the + stack if necessary. + +#define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256) + /* The maximum size of the color-map required by the format expressed in a + * count of components. This can be used to compile-time allocate a + * color-map: + * + * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; + * + * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; + * + * Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the + * information from one of the png_image_begin_read_ APIs and dynamically + * allocate the required memory. + */ + + +Corresponding information about the pixels + + PNG_IMAGE_PIXEL_(test,fmt) + + PNG_IMAGE_PIXEL_CHANNELS(fmt) + The number of separate channels (components) in a pixel; 1 for a + color-mapped image. + + PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\ + The size, in bytes, of each component in a pixel; 1 for a color-mapped + image. + + PNG_IMAGE_PIXEL_SIZE(fmt) + The size, in bytes, of a complete pixel; 1 for a color-mapped image. + +Information about the whole row, or whole image + + PNG_IMAGE_ROW_STRIDE(image) + Returns the total number of components in a single row of the image; this + is the minimum 'row stride', the minimum count of components between each + row. For a color-mapped image this is the minimum number of bytes in a + row. + + PNG_IMAGE_BUFFER_SIZE(image, row_stride) + Returns the size, in bytes, of an image buffer given a png_image and a row + stride - the number of components to leave space for in each row. + + PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB == 0x01 + This indicates the the RGB values of the in-memory bitmap do not + correspond to the red, green and blue end-points defined by sRGB. + + PNG_IMAGE_FLAG_COLORMAP == 0x02 + The PNG is color-mapped. If this flag is set png_image_read_colormap + can be used without further loss of image information. If it is not set + png_image_read_colormap will cause significant loss if the image has any + +READ APIs + + The png_image passed to the read APIs must have been initialized by setting + the png_controlp field 'opaque' to NULL (or, better, memset the whole thing.) + + int png_image_begin_read_from_file( png_imagep image, + const char *file_name) + + The named file is opened for read and the image header + is filled in from the PNG header in the file. + + int png_image_begin_read_from_stdio (png_imagep image, + FILE* file) + + The PNG header is read from the stdio FILE object. + + int png_image_begin_read_from_memory(png_imagep image, + png_const_voidp memory, png_size_t size) + + The PNG header is read from the given memory buffer. + + int png_image_finish_read(png_imagep image, + png_colorp background, void *buffer, + png_int_32 row_stride, void *colormap)); + + Finish reading the image into the supplied buffer and + clean up the png_image structure. + + row_stride is the step, in png_byte or png_uint_16 units + as appropriate, between adjacent rows. A positive stride + indicates that the top-most row is first in the buffer - + the normal top-down arrangement. A negative stride + indicates that the bottom-most row is first in the buffer. + + background need only be supplied if an alpha channel must + be removed from a png_byte format and the removal is to be + done by compositing on a solid color; otherwise it may be + NULL and any composition will be done directly onto the + buffer. The value is an sRGB color to use for the + background, for grayscale output the green channel is used. + + For linear output removing the alpha channel is always done + by compositing on black. + + void png_image_free(png_imagep image) + + Free any data allocated by libpng in image->opaque, + setting the pointer to NULL. May be called at any time + after the structure is initialized. + +When the simplified API needs to convert between sRGB and linear colorspaces, +the actual sRGB transfer curve defined in the sRGB specification (see the +article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2 +approximation used elsewhere in libpng. + +WRITE APIS + +For write you must initialize a png_image structure to describe the image to +be written: + + version: must be set to PNG_IMAGE_VERSION + opaque: must be initialized to NULL + width: image width in pixels + height: image height in rows + format: the format of the data you wish to write + flags: set to 0 unless one of the defined flags applies; set + PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB for color format images + where the RGB values do not correspond to the colors in sRGB. + colormap_entries: set to the number of entries in the color-map (0 to 256) + + int png_image_write_to_file, (png_imagep image, + const char *file, int convert_to_8bit, const void *buffer, + png_int_32 row_stride, const void *colormap)); + + Write the image to the named file. + + int png_image_write_to_stdio(png_imagep image, FILE *file, + int convert_to_8_bit, const void *buffer, + png_int_32 row_stride, const void *colormap) + + Write the image to the given (FILE*). + +With all write APIs if image is in one of the linear formats with +(png_uint_16) data then setting convert_to_8_bit will cause the output to be +a (png_byte) PNG gamma encoded according to the sRGB specification, otherwise +a 16-bit linear encoded PNG file is written. + +With all APIs row_stride is handled as in the read APIs - it is the spacing +from one row to the next in component sized units (float) and if negative +indicates a bottom-up row layout in the buffer. + +Note that the write API does not support interlacing, sub-8-bit pixels, +and indexed (paletted) images. + +.SH VI. Modifying/Customizing libpng + +There are two issues here. The first is changing how libpng does +standard things like memory allocation, input/output, and error handling. +The second deals with more complicated things like adding new chunks, +adding new transformations, and generally changing how libpng works. +Both of those are compile-time issues; that is, they are generally +determined at the time the code is written, and there is rarely a need +to provide the user with a means of changing them. + +Memory allocation, input/output, and error handling + +All of the memory allocation, input/output, and error handling in libpng +goes through callbacks that are user-settable. The default routines are +in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change +these functions, call the appropriate png_set_*_fn() function. + +Memory allocation is done through the functions png_malloc(), png_calloc(), +and png_free(). The png_malloc() and png_free() functions currently just +call the standard C functions and png_calloc() calls png_malloc() and then +clears the newly allocated memory to zero; note that png_calloc(png_ptr, size) +is not the same as the calloc(number, size) function provided by stdlib.h. +There is limited support for certain systems with segmented memory +architectures and the types of pointers declared by png.h match this; you +will have to use appropriate pointers in your application. Since it is +unlikely that the method of handling memory allocation on a platform +will change between applications, these functions must be modified in +the library at compile time. If you prefer to use a different method +of allocating and freeing data, you can use png_create_read_struct_2() or +png_create_write_struct_2() to register your own functions as described +above. These functions also provide a void pointer that can be retrieved +via + + mem_ptr=png_get_mem_ptr(png_ptr); + +Your replacement memory functions must have prototypes as follows: + + png_voidp malloc_fn(png_structp png_ptr, + png_alloc_size_t size); + + void free_fn(png_structp png_ptr, png_voidp ptr); + +Your malloc_fn() must return NULL in case of failure. The png_malloc() +function will normally call png_error() if it receives a NULL from the +system memory allocator or from your replacement malloc_fn(). + +Your free_fn() will never be called with a NULL ptr, since libpng's +png_free() checks for NULL before calling free_fn(). + +Input/Output in libpng is done through png_read() and png_write(), +which currently just call fread() and fwrite(). The FILE * is stored in +png_struct and is initialized via png_init_io(). If you wish to change +the method of I/O, the library supplies callbacks that you can set +through the function png_set_read_fn() and png_set_write_fn() at run +time, instead of calling the png_init_io() function. These functions +also provide a void pointer that can be retrieved via the function +png_get_io_ptr(). For example: + + png_set_read_fn(png_structp read_ptr, + voidp read_io_ptr, png_rw_ptr read_data_fn) + + png_set_write_fn(png_structp write_ptr, + voidp write_io_ptr, png_rw_ptr write_data_fn, + png_flush_ptr output_flush_fn); + + voidp read_io_ptr = png_get_io_ptr(read_ptr); + voidp write_io_ptr = png_get_io_ptr(write_ptr); + +The replacement I/O functions must have prototypes as follows: + + void user_read_data(png_structp png_ptr, + png_bytep data, png_size_t length); + + void user_write_data(png_structp png_ptr, + png_bytep data, png_size_t length); + + void user_flush_data(png_structp png_ptr); + +The user_read_data() function is responsible for detecting and +handling end-of-data errors. + +Supplying NULL for the read, write, or flush functions sets them back +to using the default C stream functions, which expect the io_ptr to +point to a standard *FILE structure. It is probably a mistake +to use NULL for one of write_data_fn and output_flush_fn but not both +of them, unless you have built libpng with PNG_NO_WRITE_FLUSH defined. +It is an error to read from a write stream, and vice versa. + +Error handling in libpng is done through png_error() and png_warning(). +Errors handled through png_error() are fatal, meaning that png_error() +should never return to its caller. Currently, this is handled via +setjmp() and longjmp() (unless you have compiled libpng with +PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()), +but you could change this to do things like exit() if you should wish, +as long as your function does not return. + +On non-fatal errors, png_warning() is called +to print a warning message, and then control returns to the calling code. +By default png_error() and png_warning() print a message on stderr via +fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined +(because you don't want the messages) or PNG_NO_STDIO defined (because +fprintf() isn't available). If you wish to change the behavior of the error +functions, you will need to set up your own message callbacks. These +functions are normally supplied at the time that the png_struct is created. +It is also possible to redirect errors and warnings to your own replacement +functions after png_create_*_struct() has been called by calling: + + png_set_error_fn(png_structp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warning_fn); + + png_voidp error_ptr = png_get_error_ptr(png_ptr); + +If NULL is supplied for either error_fn or warning_fn, then the libpng +default function will be used, calling fprintf() and/or longjmp() if a +problem is encountered. The replacement error functions should have +parameters as follows: + + void user_error_fn(png_structp png_ptr, + png_const_charp error_msg); + + void user_warning_fn(png_structp png_ptr, + png_const_charp warning_msg); + +The motivation behind using setjmp() and longjmp() is the C++ throw and +catch exception handling methods. This makes the code much easier to write, +as there is no need to check every return code of every function call. +However, there are some uncertainties about the status of local variables +after a longjmp, so the user may want to be careful about doing anything +after setjmp returns non-zero besides returning itself. Consult your +compiler documentation for more details. For an alternative approach, you +may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net), +which is illustrated in pngvalid.c and in contrib/visupng. + +Beginning in libpng-1.4.0, the png_set_benign_errors() API became available. +You can use this to handle certain errors (normally handled as errors) +as warnings. + + png_set_benign_errors (png_ptr, int allowed); + + allowed: 0: (default) treat png_benign_error() an error. + 1: treat png_benign_error() as a warning. + +.SS Custom chunks + +If you need to read or write custom chunks, you may need to get deeper +into the libpng code. The library now has mechanisms for storing +and writing chunks of unknown type; you can even declare callbacks +for custom chunks. However, this may not be good enough if the +library code itself needs to know about interactions between your +chunk and existing `intrinsic' chunks. + +If you need to write a new intrinsic chunk, first read the PNG +specification. Acquire a first level of understanding of how it works. +Pay particular attention to the sections that describe chunk names, +and look at how other chunks were designed, so you can do things +similarly. Second, check out the sections of libpng that read and +write chunks. Try to find a chunk that is similar to yours and use +it as a template. More details can be found in the comments inside +the code. It is best to handle private or unknown chunks in a generic method, +via callback functions, instead of by modifying libpng functions. This +is illustrated in pngtest.c, which uses a callback function to handle a +private "vpAg" chunk and the new "sTER" chunk, which are both unknown to +libpng. + +If you wish to write your own transformation for the data, look through +the part of the code that does the transformations, and check out some of +the simpler ones to get an idea of how they work. Try to find a similar +transformation to the one you want to add and copy off of it. More details +can be found in the comments inside the code itself. + +.SS Configuring for 16-bit platforms + +You will want to look into zconf.h to tell zlib (and thus libpng) that +it cannot allocate more then 64K at a time. Even if you can, the memory +won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K. + +.SS Configuring for DOS + +For DOS users who only have access to the lower 640K, you will +have to limit zlib's memory usage via a png_set_compression_mem_level() +call. See zlib.h or zconf.h in the zlib library for more information. + +.SS Configuring for Medium Model + +Libpng's support for medium model has been tested on most of the popular +compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets +defined, and FAR gets defined to far in pngconf.h, and you should be +all set. Everything in the library (except for zlib's structure) is +expecting far data. You must use the typedefs with the p or pp on +the end for pointers (or at least look at them and be careful). Make +note that the rows of data are defined as png_bytepp, which is +an "unsigned char far * far *". + +.SS Configuring for gui/windowing platforms: + +You will need to write new error and warning functions that use the GUI +interface, as described previously, and set them to be the error and +warning functions at the time that png_create_*_struct() is called, +in order to have them available during the structure initialization. +They can be changed later via png_set_error_fn(). On some compilers, +you may also have to change the memory allocators (png_malloc, etc.). + +.SS Configuring for compiler xxx: + +All includes for libpng are in pngconf.h. If you need to add, change +or delete an include, this is the place to do it. +The includes that are not needed outside libpng are placed in pngpriv.h, +which is only used by the routines inside libpng itself. +The files in libpng proper only include pngpriv.h and png.h, which +%14%in turn includes pngconf.h. +in turn includes pngconf.h and, as of libpng-1.5.0, pnglibconf.h. +As of libpng-1.5.0, pngpriv.h also includes three other private header +files, pngstruct.h, pnginfo.h, and pngdebug.h, which contain material +that previously appeared in the public headers. + +.SS Configuring zlib: + +There are special functions to configure the compression. Perhaps the +most useful one changes the compression level, which currently uses +input compression values in the range 0 - 9. The library normally +uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests +have shown that for a large majority of images, compression values in +the range 3-6 compress nearly as well as higher levels, and do so much +faster. For online applications it may be desirable to have maximum speed +(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also +specify no compression (Z_NO_COMPRESSION = 0), but this would create +files larger than just storing the raw bitmap. You can specify the +compression level by calling: + + #include zlib.h + png_set_compression_level(png_ptr, level); + +Another useful one is to reduce the memory level used by the library. +The memory level defaults to 8, but it can be lowered if you are +short on memory (running DOS, for example, where you only have 640K). +Note that the memory level does have an effect on compression; among +other things, lower levels will result in sections of incompressible +data being emitted in smaller stored blocks, with a correspondingly +larger relative overhead of up to 15% in the worst case. + + #include zlib.h + png_set_compression_mem_level(png_ptr, level); + +The other functions are for configuring zlib. They are not recommended +for normal use and may result in writing an invalid PNG file. See +zlib.h for more information on what these mean. + + #include zlib.h + png_set_compression_strategy(png_ptr, + strategy); + + png_set_compression_window_bits(png_ptr, + window_bits); + + png_set_compression_method(png_ptr, method); + + png_set_compression_buffer_size(png_ptr, size); + +As of libpng version 1.5.4, additional APIs became +available to set these separately for non-IDAT +compressed chunks such as zTXt, iTXt, and iCCP: + + #include zlib.h + #if PNG_LIBPNG_VER >= 10504 + png_set_text_compression_level(png_ptr, level); + + png_set_text_compression_mem_level(png_ptr, level); + + png_set_text_compression_strategy(png_ptr, + strategy); + + png_set_text_compression_window_bits(png_ptr, + window_bits); + + png_set_text_compression_method(png_ptr, method); + #endif + +.SS Controlling row filtering + +If you want to control whether libpng uses filtering or not, which +filters are used, and how it goes about picking row filters, you +can call one of these functions. The selection and configuration +of row filters can have a significant impact on the size and +encoding speed and a somewhat lesser impact on the decoding speed +of an image. Filtering is enabled by default for RGB and grayscale +images (with and without alpha), but not for paletted images nor +for any images with bit depths less than 8 bits/pixel. + +The 'method' parameter sets the main filtering method, which is +currently only '0' in the PNG 1.2 specification. The 'filters' +parameter sets which filter(s), if any, should be used for each +scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS +to turn filtering on and off, respectively. + +Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB, +PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise +ORed together with '|' to specify one or more filters to use. +These filters are described in more detail in the PNG specification. +If you intend to change the filter type during the course of writing +the image, you should start with flags set for all of the filters +you intend to use so that libpng can initialize its internal +structures appropriately for all of the filter types. (Note that this +means the first row must always be adaptively filtered, because libpng +currently does not allocate the filter buffers until png_write_row() +is called for the first time.) + + filters = PNG_FILTER_NONE | PNG_FILTER_SUB + PNG_FILTER_UP | PNG_FILTER_AVG | + PNG_FILTER_PAETH | PNG_ALL_FILTERS; + + png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, + filters); + The second parameter can also be + PNG_INTRAPIXEL_DIFFERENCING if you are + writing a PNG to be embedded in a MNG + datastream. This parameter must be the + same as the value of filter_method used + in png_set_IHDR(). + +It is also possible to influence how libpng chooses from among the +available filters. This is done in one or both of two ways - by +telling it how important it is to keep the same filter for successive +rows, and by telling it the relative computational costs of the filters. + + double weights[3] = {1.5, 1.3, 1.1}, + costs[PNG_FILTER_VALUE_LAST] = + {1.0, 1.3, 1.3, 1.5, 1.7}; + + png_set_filter_heuristics(png_ptr, + PNG_FILTER_HEURISTIC_WEIGHTED, 3, + weights, costs); + +The weights are multiplying factors that indicate to libpng that the +row filter should be the same for successive rows unless another row filter +is that many times better than the previous filter. In the above example, +if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a +"sum of absolute differences" 1.5 x 1.3 times higher than other filters +and still be chosen, while the NONE filter could have a sum 1.1 times +higher than other filters and still be chosen. Unspecified weights are +taken to be 1.0, and the specified weights should probably be declining +like those above in order to emphasize recent filters over older filters. + +The filter costs specify for each filter type a relative decoding cost +to be considered when selecting row filters. This means that filters +with higher costs are less likely to be chosen over filters with lower +costs, unless their "sum of absolute differences" is that much smaller. +The costs do not necessarily reflect the exact computational speeds of +the various filters, since this would unduly influence the final image +size. + +Note that the numbers above were invented purely for this example and +are given only to help explain the function usage. Little testing has +been done to find optimum values for either the costs or the weights. + +.SS Removing unwanted object code + +There are a bunch of #define's in pngconf.h that control what parts of +libpng are compiled. All the defines end in _SUPPORTED. If you are +never going to use a capability, you can change the #define to #undef +before recompiling libpng and save yourself code and data space, or +you can turn off individual capabilities with defines that begin with +PNG_NO_. + +In libpng-1.5.0 and later, the #define's are in pnglibconf.h instead. + +You can also turn all of the transforms and ancillary chunk capabilities +off en masse with compiler directives that define +PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, +or all four, +along with directives to turn on any of the capabilities that you do +want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the extra +transformations but still leave the library fully capable of reading +and writing PNG files with all known public chunks. Use of the +PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library +that is incapable of reading or writing ancillary chunks. If you are +not using the progressive reading capability, you can turn that off +with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING +capability, which you'll still have). + +All the reading and writing specific code are in separate files, so the +linker should only grab the files it needs. However, if you want to +make sure, or if you are building a stand alone library, all the +reading files start with "pngr" and all the writing files start with "pngw". +The files that don't match either (like png.c, pngtrans.c, etc.) +are used for both reading and writing, and always need to be included. +The progressive reader is in pngpread.c + +If you are creating or distributing a dynamically linked library (a .so +or DLL file), you should not remove or disable any parts of the library, +as this will cause applications linked with different versions of the +library to fail if they call functions not available in your library. +The size of the library itself should not be an issue, because only +those sections that are actually used will be loaded into memory. + +.SS Requesting debug printout + +The macro definition PNG_DEBUG can be used to request debugging +printout. Set it to an integer value in the range 0 to 3. Higher +numbers result in increasing amounts of debugging information. The +information is printed to the "stderr" file, unless another file +name is specified in the PNG_DEBUG_FILE macro definition. + +When PNG_DEBUG > 0, the following functions (macros) become available: + + png_debug(level, message) + png_debug1(level, message, p1) + png_debug2(level, message, p1, p2) + +in which "level" is compared to PNG_DEBUG to decide whether to print +the message, "message" is the formatted string to be printed, +and p1 and p2 are parameters that are to be embedded in the string +according to printf-style formatting directives. For example, + + png_debug1(2, "foo=%d\n", foo); + +is expanded to + + if (PNG_DEBUG > 2) + fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo); + +When PNG_DEBUG is defined but is zero, the macros aren't defined, but you +can still use PNG_DEBUG to control your own debugging: + + #ifdef PNG_DEBUG + fprintf(stderr, ... + #endif + +When PNG_DEBUG = 1, the macros are defined, but only png_debug statements +having level = 0 will be printed. There aren't any such statements in +this version of libpng, but if you insert some they will be printed. + +.SS Prepending a prefix to exported symbols + +Starting with libpng-1.6.0, you can configure libpng (when using the +"configure" script) to prefix all exported symbols by means of the +configuration option "--with-libpng-prefix=FOO_", where FOO_ can be any +string beginning with a letter and containing only uppercase +and lowercase letters, digits, and the underscore (i.e., a C language +identifier). This creates a set of macros in pnglibconf.h, so this is +transparent to applications; their function calls get transformed by +the macros to use the modified names. + +.SH VII. MNG support + +The MNG specification (available at http://www.libpng.org/pub/mng) allows +certain extensions to PNG for PNG images that are embedded in MNG datastreams. +Libpng can support some of these extensions. To enable them, use the +png_permit_mng_features() function: + + feature_set = png_permit_mng_features(png_ptr, mask) + + mask is a png_uint_32 containing the bitwise OR of the + features you want to enable. These include + PNG_FLAG_MNG_EMPTY_PLTE + PNG_FLAG_MNG_FILTER_64 + PNG_ALL_MNG_FEATURES + + feature_set is a png_uint_32 that is the bitwise AND of + your mask with the set of MNG features that is + supported by the version of libpng that you are using. + +It is an error to use this function when reading or writing a standalone +PNG file with the PNG 8-byte signature. The PNG datastream must be wrapped +in a MNG datastream. As a minimum, it must have the MNG 8-byte signature +and the MHDR and MEND chunks. Libpng does not provide support for these +or any other MNG chunks; your application must provide its own support for +them. You may wish to consider using libmng (available at +http://www.libmng.com) instead. + +.SH VIII. Changes to Libpng from version 0.88 + +It should be noted that versions of libpng later than 0.96 are not +distributed by the original libpng author, Guy Schalnat, nor by +Andreas Dilger, who had taken over from Guy during 1996 and 1997, and +distributed versions 0.89 through 0.96, but rather by another member +of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are +still alive and well, but they have moved on to other things. + +The old libpng functions png_read_init(), png_write_init(), +png_info_init(), png_read_destroy(), and png_write_destroy() have been +moved to PNG_INTERNAL in version 0.95 to discourage their use. These +functions will be removed from libpng version 1.4.0. + +The preferred method of creating and initializing the libpng structures is +via the png_create_read_struct(), png_create_write_struct(), and +png_create_info_struct() because they isolate the size of the structures +from the application, allow version error checking, and also allow the +use of custom error handling routines during the initialization, which +the old functions do not. The functions png_read_destroy() and +png_write_destroy() do not actually free the memory that libpng +allocated for these structs, but just reset the data structures, so they +can be used instead of png_destroy_read_struct() and +png_destroy_write_struct() if you feel there is too much system overhead +allocating and freeing the png_struct for each image read. + +Setting the error callbacks via png_set_message_fn() before +png_read_init() as was suggested in libpng-0.88 is no longer supported +because this caused applications that do not use custom error functions +to fail if the png_ptr was not initialized to zero. It is still possible +to set the error callbacks AFTER png_read_init(), or to change them with +png_set_error_fn(), which is essentially the same function, but with a new +name to force compilation errors with applications that try to use the old +method. + +Starting with version 1.0.7, you can find out which version of the library +you are using at run-time: + + png_uint_32 libpng_vn = png_access_version_number(); + +The number libpng_vn is constructed from the major version, minor +version with leading zero, and release number with leading zero, +(e.g., libpng_vn for version 1.0.7 is 10007). + +Note that this function does not take a png_ptr, so you can call it +before you've created one. + +You can also check which version of png.h you used when compiling your +application: + + png_uint_32 application_vn = PNG_LIBPNG_VER; + +.SH IX. Changes to Libpng from version 1.0.x to 1.2.x + +Support for user memory management was enabled by default. To +accomplish this, the functions png_create_read_struct_2(), +png_create_write_struct_2(), png_set_mem_fn(), png_get_mem_ptr(), +png_malloc_default(), and png_free_default() were added. + +Support for the iTXt chunk has been enabled by default as of +version 1.2.41. + +Support for certain MNG features was enabled. + +Support for numbered error messages was added. However, we never got +around to actually numbering the error messages. The function +png_set_strip_error_numbers() was added (Note: the prototype for this +function was inadvertently removed from png.h in PNG_NO_ASSEMBLER_CODE +builds of libpng-1.2.15. It was restored in libpng-1.2.36). + +The png_malloc_warn() function was added at libpng-1.2.3. This issues +a png_warning and returns NULL instead of aborting when it fails to +acquire the requested memory allocation. + +Support for setting user limits on image width and height was enabled +by default. The functions png_set_user_limits(), png_get_user_width_max(), +and png_get_user_height_max() were added at libpng-1.2.6. + +The png_set_add_alpha() function was added at libpng-1.2.7. + +The function png_set_expand_gray_1_2_4_to_8() was added at libpng-1.2.9. +Unlike png_set_gray_1_2_4_to_8(), the new function does not expand the +tRNS chunk to alpha. The png_set_gray_1_2_4_to_8() function is +deprecated. + +A number of macro definitions in support of runtime selection of +assembler code features (especially Intel MMX code support) were +added at libpng-1.2.0: + + PNG_ASM_FLAG_MMX_SUPPORT_COMPILED + PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU + PNG_ASM_FLAG_MMX_READ_COMBINE_ROW + PNG_ASM_FLAG_MMX_READ_INTERLACE + PNG_ASM_FLAG_MMX_READ_FILTER_SUB + PNG_ASM_FLAG_MMX_READ_FILTER_UP + PNG_ASM_FLAG_MMX_READ_FILTER_AVG + PNG_ASM_FLAG_MMX_READ_FILTER_PAETH + PNG_ASM_FLAGS_INITIALIZED + PNG_MMX_READ_FLAGS + PNG_MMX_FLAGS + PNG_MMX_WRITE_FLAGS + PNG_MMX_FLAGS + +We added the following functions in support of runtime +selection of assembler code features: + + png_get_mmx_flagmask() + png_set_mmx_thresholds() + png_get_asm_flags() + png_get_mmx_bitdepth_threshold() + png_get_mmx_rowbytes_threshold() + png_set_asm_flags() + +We replaced all of these functions with simple stubs in libpng-1.2.20, +when the Intel assembler code was removed due to a licensing issue. + +These macros are deprecated: + + PNG_READ_TRANSFORMS_NOT_SUPPORTED + PNG_PROGRESSIVE_READ_NOT_SUPPORTED + PNG_NO_SEQUENTIAL_READ_SUPPORTED + PNG_WRITE_TRANSFORMS_NOT_SUPPORTED + PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED + PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED + +They have been replaced, respectively, by: + + PNG_NO_READ_TRANSFORMS + PNG_NO_PROGRESSIVE_READ + PNG_NO_SEQUENTIAL_READ + PNG_NO_WRITE_TRANSFORMS + PNG_NO_READ_ANCILLARY_CHUNKS + PNG_NO_WRITE_ANCILLARY_CHUNKS + +PNG_MAX_UINT was replaced with PNG_UINT_31_MAX. It has been +deprecated since libpng-1.0.16 and libpng-1.2.6. + +The function + png_check_sig(sig, num) +was replaced with + !png_sig_cmp(sig, 0, num) +It has been deprecated since libpng-0.90. + +The function + png_set_gray_1_2_4_to_8() +which also expands tRNS to alpha was replaced with + png_set_expand_gray_1_2_4_to_8() +which does not. It has been deprecated since libpng-1.0.18 and 1.2.9. + +.SH X. Changes to Libpng from version 1.0.x/1.2.x to 1.4.x + +Private libpng prototypes and macro definitions were moved from +png.h and pngconf.h into a new pngpriv.h header file. + +Functions png_set_benign_errors(), png_benign_error(), and +png_chunk_benign_error() were added. + +Support for setting the maximum amount of memory that the application +will allocate for reading chunks was added, as a security measure. +The functions png_set_chunk_cache_max() and png_get_chunk_cache_max() +were added to the library. + +We implemented support for I/O states by adding png_ptr member io_state +and functions png_get_io_chunk_name() and png_get_io_state() in pngget.c + +We added PNG_TRANSFORM_GRAY_TO_RGB to the available high-level +input transforms. + +Checking for and reporting of errors in the IHDR chunk is more thorough. + +Support for global arrays was removed, to improve thread safety. + +Some obsolete/deprecated macros and functions have been removed. + +Typecasted NULL definitions such as + #define png_voidp_NULL (png_voidp)NULL +were eliminated. If you used these in your application, just use +NULL instead. + +The png_struct and info_struct members "trans" and "trans_values" were +changed to "trans_alpha" and "trans_color", respectively. + +The obsolete, unused pnggccrd.c and pngvcrd.c files and related makefiles +were removed. + +The PNG_1_0_X and PNG_1_2_X macros were eliminated. + +The PNG_LEGACY_SUPPORTED macro was eliminated. + +Many WIN32_WCE #ifdefs were removed. + +The functions png_read_init(info_ptr), png_write_init(info_ptr), +png_info_init(info_ptr), png_read_destroy(), and png_write_destroy() +have been removed. They have been deprecated since libpng-0.95. + +The png_permit_empty_plte() was removed. It has been deprecated +since libpng-1.0.9. Use png_permit_mng_features() instead. + +We removed the obsolete stub functions png_get_mmx_flagmask(), +png_set_mmx_thresholds(), png_get_asm_flags(), +png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(), +png_set_asm_flags(), and png_mmx_supported() + +We removed the obsolete png_check_sig(), png_memcpy_check(), and +png_memset_check() functions. Instead use !png_sig_cmp(), memcpy(), +and memset(), respectively. + +The function png_set_gray_1_2_4_to_8() was removed. It has been +deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with +png_set_expand_gray_1_2_4_to_8() because the former function also +expanded any tRNS chunk to an alpha channel. + +Macros for png_get_uint_16, png_get_uint_32, and png_get_int_32 +were added and are used by default instead of the corresponding +functions. Unfortunately, +from libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +function) incorrectly returned a value of type png_uint_32. + +We changed the prototype for png_malloc() from + png_malloc(png_structp png_ptr, png_uint_32 size) +to + png_malloc(png_structp png_ptr, png_alloc_size_t size) + +This also applies to the prototype for the user replacement malloc_fn(). + +The png_calloc() function was added and is used in place of +of "png_malloc(); memset();" except in the case in png_read_png() +where the array consists of pointers; in this case a "for" loop is used +after the png_malloc() to set the pointers to NULL, to give robust. +behavior in case the application runs out of memory part-way through +the process. + +We changed the prototypes of png_get_compression_buffer_size() and +png_set_compression_buffer_size() to work with png_size_t instead of +png_uint_32. + +Support for numbered error messages was removed by default, since we +never got around to actually numbering the error messages. The function +png_set_strip_error_numbers() was removed from the library by default. + +The png_zalloc() and png_zfree() functions are no longer exported. +The png_zalloc() function no longer zeroes out the memory that it +allocates. Applications that called png_zalloc(png_ptr, number, size) +can call png_calloc(png_ptr, number*size) instead, and can call +png_free() instead of png_zfree(). + +Support for dithering was disabled by default in libpng-1.4.0, because +it has not been well tested and doesn't actually "dither". +The code was not +removed, however, and could be enabled by building libpng with +PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support +was reenabled, but the function was renamed png_set_quantize() to +reflect more accurately what it actually does. At the same time, +the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to +PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED +was renamed to PNG_READ_QUANTIZE_SUPPORTED. + +We removed the trailing '.' from the warning and error messages. + +.SH XI. Changes to Libpng from version 1.4.x to 1.5.x + +From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +function) incorrectly returned a value of type png_uint_32. + +Checking for invalid palette index on read or write was added at libpng +1.5.10. When an invalid index is found, libpng issues a benign error. +This is enabled by default because this condition is an error according +to the PNG specification, Clause 11.3.2, but the error can be ignored in +each png_ptr with + + png_set_check_for_invalid_index(png_ptr, allowed); + + allowed - one of + 0: disable benign error (accept the + invalid data without warning). + 1: enable benign error (treat the + invalid data as an error or a + warning). + +If the error is ignored, or if png_benign_error() treats it as a warning, +any invalid pixels are decoded as opaque black by the decoder and written +as-is by the encoder. + +Retrieving the maximum palette index found was added at libpng-1.5.15. +This statement must appear after png_read_png() or png_read_image() while +reading, and after png_write_png() or png_write_image() while writing. + + int max_palette = png_get_palette_max(png_ptr, info_ptr); + +This will return the maximum palette index found in the image, or "-1" if +the palette was not checked, or "0" if no palette was found. Note that this +does not account for any palette index used by ancillary chunks such as the +bKGD chunk; you must check those separately to determine the maximum +palette index actually used. + +A. Changes that affect users of libpng + +There are no substantial API changes between the non-deprecated parts of +the 1.4.5 API and the 1.5.0 API; however, the ability to directly access +members of the main libpng control structures, png_struct and png_info, +deprecated in earlier versions of libpng, has been completely removed from +libpng 1.5. + +We no longer include zlib.h in png.h. The include statement has been moved +to pngstruct.h, where it is not accessible by applications. Applications that +need access to information in zlib.h will need to add the '#include "zlib.h"' +directive. It does not matter whether this is placed prior to or after +the '"#include png.h"' directive. + +The png_sprintf(), png_strcpy(), and png_strncpy() macros are no longer used +and were removed. + +We moved the png_strlen(), png_memcpy(), png_memset(), and png_memcmp() +macros into a private header file (pngpriv.h) that is not accessible to +applications. + +In png_get_iCCP, the type of "profile" was changed from png_charpp +to png_bytepp, and in png_set_iCCP, from png_charp to png_const_bytep. + +There are changes of form in png.h, including new and changed macros to +declare parts of the API. Some API functions with arguments that are +pointers to data not modified within the function have been corrected to +declare these arguments with PNG_CONST. + +Much of the internal use of C macros to control the library build has also +changed and some of this is visible in the exported header files, in +particular the use of macros to control data and API elements visible +during application compilation may require significant revision to +application code. (It is extremely rare for an application to do this.) + +Any program that compiled against libpng 1.4 and did not use deprecated +features or access internal library structures should compile and work +against libpng 1.5, except for the change in the prototype for +png_get_iCCP() and png_set_iCCP() API functions mentioned above. + +libpng 1.5.0 adds PNG_ PASS macros to help in the reading and writing of +interlaced images. The macros return the number of rows and columns in +each pass and information that can be used to de-interlace and (if +absolutely necessary) interlace an image. + +libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls +the application-provided png_longjmp_ptr on the internal, but application +initialized, longjmp buffer. It is provided as a convenience to avoid +the need to use the png_jmpbuf macro, which had the unnecessary side +effect of resetting the internal png_longjmp_ptr value. + +libpng 1.5.0 includes a complete fixed point API. By default this is +present along with the corresponding floating point API. In general the +fixed point API is faster and smaller than the floating point one because +the PNG file format used fixed point, not floating point. This applies +even if the library uses floating point in internal calculations. A new +macro, PNG_FLOATING_ARITHMETIC_SUPPORTED, reveals whether the library +uses floating point arithmetic (the default) or fixed point arithmetic +internally for performance critical calculations such as gamma correction. +In some cases, the gamma calculations may produce slightly different +results. This has changed the results in png_rgb_to_gray and in alpha +composition (png_set_background for example). This applies even if the +original image was already linear (gamma == 1.0) and, therefore, it is +not necessary to linearize the image. This is because libpng has *not* +been changed to optimize that case correctly, yet. + +Fixed point support for the sCAL chunk comes with an important caveat; +the sCAL specification uses a decimal encoding of floating point values +and the accuracy of PNG fixed point values is insufficient for +representation of these values. Consequently a "string" API +(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading +arbitrary sCAL chunks in the absence of either the floating point API or +internal floating point calculations. + +Applications no longer need to include the optional distribution header +file pngusr.h or define the corresponding macros during application +build in order to see the correct variant of the libpng API. From 1.5.0 +application code can check for the corresponding _SUPPORTED macro: + +#ifdef PNG_INCH_CONVERSIONS_SUPPORTED + /* code that uses the inch conversion APIs. */ +#endif + +This macro will only be defined if the inch conversion functions have been +compiled into libpng. The full set of macros, and whether or not support +has been compiled in, are available in the header file pnglibconf.h. +This header file is specific to the libpng build. Notice that prior to +1.5.0 the _SUPPORTED macros would always have the default definition unless +reset by pngusr.h or by explicit settings on the compiler command line. +These settings may produce compiler warnings or errors in 1.5.0 because +of macro redefinition. + +From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +function) incorrectly returned a value of type png_uint_32. libpng 1.5.0 +is consistent with the implementation in 1.4.5 and 1.2.x (where the macro +did not exist.) + +Applications can now choose whether to use these macros or to call the +corresponding function by defining PNG_USE_READ_MACROS or +PNG_NO_USE_READ_MACROS before including png.h. Notice that this is +only supported from 1.5.0 -defining PNG_NO_USE_READ_MACROS prior to 1.5.0 +will lead to a link failure. + +Prior to libpng-1.5.4, the zlib compressor used the same set of parameters +when compressing the IDAT data and textual data such as zTXt and iCCP. +In libpng-1.5.4 we reinitialized the zlib stream for each type of data. +We added five png_set_text_*() functions for setting the parameters to +use with textual data. + +Prior to libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED +option was off by default, and slightly inaccurate scaling occurred. +This option can no longer be turned off, and the choice of accurate +or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8() +API for accurate scaling or the old png_set_strip_16_to_8() API for simple +chopping. + +Prior to libpng-1.5.4, the png_set_user_limits() function could only be +used to reduce the width and height limits from the value of +PNG_USER_WIDTH_MAX and PNG_USER_HEIGHT_MAX, although this document said +that it could be used to override them. Now this function will reduce or +increase the limits. + +Starting in libpng-1.5.10, the user limits can be set en masse with the +configuration option PNG_SAFE_LIMITS_SUPPORTED. If this option is enabled, +a set of "safe" limits is applied in pngpriv.h. These can be overridden by +application calls to png_set_user_limits(), png_set_user_chunk_cache_max(), +and/or png_set_user_malloc_max() that increase or decrease the limits. Also, +in libpng-1.5.10 the default width and height limits were increased +from 1,000,000 to 0x7ffffff (i.e., made unlimited). Therefore, the +limits are now + default safe + png_user_width_max 0x7fffffff 1,000,000 + png_user_height_max 0x7fffffff 1,000,000 + png_user_chunk_cache_max 0 (unlimited) 128 + png_user_chunk_malloc_max 0 (unlimited) 8,000,000 + +B. Changes to the build and configuration of libpng + +Details of internal changes to the library code can be found in the CHANGES +file and in the GIT repository logs. These will be of no concern to the vast +majority of library users or builders; however, the few who configure libpng +to a non-default feature set may need to change how this is done. + +There should be no need for library builders to alter build scripts if +these use the distributed build support - configure or the makefiles - +however, users of the makefiles may care to update their build scripts +to build pnglibconf.h where the corresponding makefile does not do so. + +Building libpng with a non-default configuration has changed completely. +The old method using pngusr.h should still work correctly even though the +way pngusr.h is used in the build has been changed; however, library +builders will probably want to examine the changes to take advantage of +new capabilities and to simplify their build system. + +B.1 Specific changes to library configuration capabilities + +The library now supports a complete fixed point implementation and can +thus be used on systems that have no floating point support or very +limited or slow support. Previously gamma correction, an essential part +of complete PNG support, required reasonably fast floating point. + +As part of this the choice of internal implementation has been made +independent of the choice of fixed versus floating point APIs and all the +missing fixed point APIs have been implemented. + +The exact mechanism used to control attributes of API functions has +changed. A single set of operating system independent macro definitions +is used and operating system specific directives are defined in +pnglibconf.h + +As part of this the mechanism used to choose procedure call standards on +those systems that allow a choice has been changed. At present this only +affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems +running on Intel processors. As before, PNGAPI is defined where required +to control the exported API functions; however, two new macros, PNGCBAPI +and PNGCAPI, are used instead for callback functions (PNGCBAPI) and +(PNGCAPI) for functions that must match a C library prototype (currently +only png_longjmp_ptr, which must match the C longjmp function.) The new +approach is documented in pngconf.h + +Despite these changes, libpng 1.5.0 only supports the native C function +calling standard on those platforms tested so far (__cdecl on Microsoft +Windows). This is because the support requirements for alternative +calling conventions seem to no longer exist. Developers who find it +necessary to set PNG_API_RULE to 1 should advise the mailing list +(png-mng-implement) of this and library builders who use Openwatcom and +therefore set PNG_API_RULE to 2 should also contact the mailing list. + +A new test program, pngvalid, is provided in addition to pngtest. +pngvalid validates the arithmetic accuracy of the gamma correction +calculations and includes a number of validations of the file format. +A subset of the full range of tests is run when "make check" is done +(in the 'configure' build.) pngvalid also allows total allocated memory +usage to be evaluated and performs additional memory overwrite validation. + +Many changes to individual feature macros have been made. The following +are the changes most likely to be noticed by library builders who +configure libpng: + +1) All feature macros now have consistent naming: + +#define PNG_NO_feature turns the feature off +#define PNG_feature_SUPPORTED turns the feature on + +pnglibconf.h contains one line for each feature macro which is either: + +#define PNG_feature_SUPPORTED + +if the feature is supported or: + +/*#undef PNG_feature_SUPPORTED*/ + +if it is not. Library code consistently checks for the 'SUPPORTED' macro. +It does not, and libpng applications should not, check for the 'NO' macro +which will not normally be defined even if the feature is not supported. +The 'NO' macros are only used internally for setting or not setting the +corresponding 'SUPPORTED' macros. + +Compatibility with the old names is provided as follows: + +PNG_INCH_CONVERSIONS turns on PNG_INCH_CONVERSIONS_SUPPORTED + +And the following definitions disable the corresponding feature: + +PNG_SETJMP_NOT_SUPPORTED disables SETJMP +PNG_READ_TRANSFORMS_NOT_SUPPORTED disables READ_TRANSFORMS +PNG_NO_READ_COMPOSITED_NODIV disables READ_COMPOSITE_NODIV +PNG_WRITE_TRANSFORMS_NOT_SUPPORTED disables WRITE_TRANSFORMS +PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED disables READ_ANCILLARY_CHUNKS +PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED disables WRITE_ANCILLARY_CHUNKS + +Library builders should remove use of the above, inconsistent, names. + +2) Warning and error message formatting was previously conditional on +the STDIO feature. The library has been changed to use the +CONSOLE_IO feature instead. This means that if CONSOLE_IO is disabled +the library no longer uses the printf(3) functions, even though the +default read/write implementations use (FILE) style stdio.h functions. + +3) Three feature macros now control the fixed/floating point decisions: + +PNG_FLOATING_POINT_SUPPORTED enables the floating point APIs + +PNG_FIXED_POINT_SUPPORTED enables the fixed point APIs; however, in +practice these are normally required internally anyway (because the PNG +file format is fixed point), therefore in most cases PNG_NO_FIXED_POINT +merely stops the function from being exported. + +PNG_FLOATING_ARITHMETIC_SUPPORTED chooses between the internal floating +point implementation or the fixed point one. Typically the fixed point +implementation is larger and slower than the floating point implementation +on a system that supports floating point; however, it may be faster on a +system which lacks floating point hardware and therefore uses a software +emulation. + +4) Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the +functions to read and write ints to be disabled independently of +PNG_USE_READ_MACROS, which allows libpng to be built with the functions +even though the default is to use the macros - this allows applications +to choose at app buildtime whether or not to use macros (previously +impossible because the functions weren't in the default build.) + +B.2 Changes to the configuration mechanism + +Prior to libpng-1.5.0 library builders who needed to configure libpng +had either to modify the exported pngconf.h header file to add system +specific configuration or had to write feature selection macros into +pngusr.h and cause this to be included into pngconf.h by defining +PNG_USER_CONFIG. The latter mechanism had the disadvantage that an +application built without PNG_USER_CONFIG defined would see the +unmodified, default, libpng API and thus would probably fail to link. + +These mechanisms still work in the configure build and in any makefile +build that builds pnglibconf.h, although the feature selection macros +have changed somewhat as described above. In 1.5.0, however, pngusr.h is +processed only once, when the exported header file pnglibconf.h is built. +pngconf.h no longer includes pngusr.h, therefore pngusr.h is ignored after the +build of pnglibconf.h and it is never included in an application build. + +The rarely used alternative of adding a list of feature macros to the +CFLAGS setting in the build also still works; however, the macros will be +copied to pnglibconf.h and this may produce macro redefinition warnings +when the individual C files are compiled. + +All configuration now only works if pnglibconf.h is built from +scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan +(the original author of awk) maintains C source code of that awk and this +and all known later implementations (often called by subtly different +names - nawk and gawk for example) are adequate to build pnglibconf.h. +The Sun Microsystems (now Oracle) program 'awk' is an earlier version +and does not work; this may also apply to other systems that have a +functioning awk called 'nawk'. + +Configuration options are now documented in scripts/pnglibconf.dfa. This +file also includes dependency information that ensures a configuration is +consistent; that is, if a feature is switched off dependent features are +also removed. As a recommended alternative to using feature macros in +pngusr.h a system builder may also define equivalent options in pngusr.dfa +(or, indeed, any file) and add that to the configuration by setting +DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate +how to do this, and a case where pngusr.h is still required. + +.SH XII. Changes to Libpng from version 1.5.x to 1.6.x + +A "simplified API" has been added (see documentation in png.h and a simple +example in contrib/examples/pngtopng.c). The new publicly visible API +includes the following: + + macros: + PNG_FORMAT_* + PNG_IMAGE_* + structures: + png_control + png_image + read functions + png_image_begin_read_from_file() + png_image_begin_read_from_stdio() + png_image_begin_read_from_memory() + png_image_finish_read() + png_image_free() + write functions + png_image_write_to_file() + png_image_write_to_stdio() + +Starting with libpng-1.6.0, you can configure libpng to prefix all exported +symbols, using the PNG_PREFIX macro. + +We no longer include string.h in png.h. The include statement has been moved +to pngpriv.h, where it is not accessible by applications. Applications that +need access to information in string.h must add an '#include "string.h"' +directive. It does not matter whether this is placed prior to or after +the '"#include png.h"' directive. + +The following API are now DEPRECATED: + png_info_init_3() + png_convert_to_rfc1123() which has been replaced + with png_convert_to_rfc1123_buffer() + png_data_freer() + png_malloc_default() + png_free_default() + png_reset_zstream() + +The following have been removed: + png_get_io_chunk_name(), which has been replaced + with png_get_io_chunk_type(). The new + function returns a 32-bit integer instead of + a string. + The png_sizeof(), png_strlen(), png_memcpy(), png_memcmp(), and + png_memset() macros are no longer used in the libpng sources and + have been removed. These had already been made invisible to applications + (i.e., defined in the private pngpriv.h header file) since libpng-1.5.0. + +The signatures of many exported functions were changed, such that + png_structp became png_structrp or png_const_structrp + png_infop became png_inforp or png_const_inforp +where "rp" indicates a "restricted pointer". + +Error detection in some chunks has improved; in particular the iCCP chunk +reader now does pretty complete validation of the basic format. Some bad +profiles that were previously accepted are now rejected, in particular the +very old broken Microsoft/HP sRGB profile. The PNG spec requirement that +only grayscale profiles may appear in images with color type 0 or 4 and that +even if the image only contains gray pixels, only RGB profiles may appear +in images with color type 2, 3, or 6, is now enforced. The sRGB chunk +is allowed to appear in images with any color type. + +The library now issues an error if the application attempts to set a +transform after it calls png_read_update_info(). + +The library now issues a warning if both background processing and RGB to +gray are used when gamma correction happens. As with previous versions of +the library the results are numerically very incorrect in this case. + +There are some minor arithmetic changes in some transforms such as +png_set_background(), that might be detected by certain regression tests. + +Unknown chunk handling has been improved internally, without any API change. +This adds more correct option control of the unknown handling, corrects +a pre-existing bug where the per-chunk 'keep' setting is ignored, and makes +it possible to skip IDAT chunks in the sequential reader. + +The machine-generated configure files are no longer included in branches +libpng16 and later of the GIT repository. They continue to be included +in the tarball releases, however. + +.SH XIII. Detecting libpng + +The png_get_io_ptr() function has been present since libpng-0.88, has never +changed, and is unaffected by conditional compilation macros. It is the +best choice for use in configure scripts for detecting the presence of any +libpng version since 0.88. In an autoconf "configure.in" you could use + + AC_CHECK_LIB(png, png_get_io_ptr, ... + +.SH XV. Source code repository + +Since about February 2009, version 1.2.34, libpng has been under "git" source +control. The git repository was built from old libpng-x.y.z.tar.gz files +going back to version 0.70. You can access the git repository (read only) +at + + git://git.code.sf.net/p/libpng/code + +or you can browse it with a web browser by selecting the "code" button at + + https://sourceforge.net/projects/libpng + +Patches can be sent to glennrp at users.sourceforge.net or to +png-mng-implement at lists.sourceforge.net or you can upload them to +the libpng bug tracker at + + http://libpng.sourceforge.net + +We also accept patches built from the tar or zip distributions, and +simple verbal discriptions of bug fixes, reported either to the +SourceForge bug tracker, to the png-mng-implement at lists.sf.net +mailing list, or directly to glennrp. + +.SH XV. Coding style + +Our coding style is similar to the "Allman" style, with curly +braces on separate lines: + + if (condition) + { + action; + } + + else if (another condition) + { + another action; + } + +The braces can be omitted from simple one-line actions: + + if (condition) + return (0); + +We use 3-space indentation, except for continued statements which +are usually indented the same as the first line of the statement +plus four more spaces. + +For macro definitions we use 2-space indentation, always leaving the "#" +in the first column. + + #ifndef PNG_NO_FEATURE + # ifndef PNG_FEATURE_SUPPORTED + # define PNG_FEATURE_SUPPORTED + # endif + #endif + +Comments appear with the leading "/*" at the same indentation as +the statement that follows the comment: + + /* Single-line comment */ + statement; + + /* This is a multiple-line + * comment. + */ + statement; + +Very short comments can be placed after the end of the statement +to which they pertain: + + statement; /* comment */ + +We don't use C++ style ("//") comments. We have, however, +used them in the past in some now-abandoned MMX assembler +code. + +Functions and their curly braces are not indented, and +exported functions are marked with PNGAPI: + + /* This is a public function that is visible to + * application programmers. It does thus-and-so. + */ + void PNGAPI + png_exported_function(png_ptr, png_info, foo) + { + body; + } + +The prototypes for all exported functions appear in png.h, +above the comment that says + + /* Maintainer: Put new public prototypes here ... */ + +We mark all non-exported functions with "/* PRIVATE */"": + + void /* PRIVATE */ + png_non_exported_function(png_ptr, png_info, foo) + { + body; + } + +The prototypes for non-exported functions (except for those in +pngtest) appear in +pngpriv.h +above the comment that says + + /* Maintainer: Put new private prototypes here ^ */ + +We put a space after the "sizeof" operator and we omit the +optional parentheses around its argument when the argument +is an expression, not a type name, and we always enclose the +sizeof operator, with its argument, in parentheses: + + (sizeof (png_uint_32)) + (sizeof array) + +Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as +though it were a function. + +To avoid polluting the global namespace, the names of all exported +functions and variables begin with "png_", and all publicly visible C +preprocessor macros begin with "PNG". We request that applications that +use libpng *not* begin any of their own symbols with either of these strings. + +We put a space after each comma and after each semicolon +in "for" statements, and we put spaces before and after each +C binary operator and after "for" or "while", and before +"?". We don't put a space between a typecast and the expression +being cast, nor do we put one between a function name and the +left parenthesis that follows it: + + for (i = 2; i > 0; --i) + y[i] = a(x) + (int)b; + +We prefer #ifdef and #ifndef to #if defined() and #if !defined() +when there is only one macro being tested. We always use parentheses +with "defined". + +We prefer to express integers that are used as bit masks in hex format, +with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100). + +We prefer to use underscores in variable names rather than camelCase, except +for a few type names that we inherit from zlib.h. + +We do not use the TAB character for indentation in the C sources. + +Lines do not exceed 80 characters. + +Other rules can be inferred by inspecting the libpng source. + +.SH XVI. Y2K Compliance in libpng + +April 25, 2013 + +Since the PNG Development group is an ad-hoc body, we can't make +an official declaration. + +This is your unofficial assurance that libpng from version 0.71 and +upward through 1.6.2 are Y2K compliant. It is my belief that earlier +versions were also Y2K compliant. + +Libpng only has two year fields. One is a 2-byte unsigned integer +that will hold years up to 65535. The other, which is deprecated, +holds the date in text format, and will hold years up to 9999. + +The integer is + "png_uint_16 year" in png_time_struct. + +The string is + "char time_buffer[29]" in png_struct. This is no longer used +in libpng-1.6.x and will be removed from libpng-1.7.0. + +There are seven time-related functions: + + png_convert_to_rfc_1123() in png.c + (formerly png_convert_to_rfc_1152() in error) + png_convert_from_struct_tm() in pngwrite.c, called + in pngwrite.c + png_convert_from_time_t() in pngwrite.c + png_get_tIME() in pngget.c + png_handle_tIME() in pngrutil.c, called in pngread.c + png_set_tIME() in pngset.c + png_write_tIME() in pngwutil.c, called in pngwrite.c + +All appear to handle dates properly in a Y2K environment. The +png_convert_from_time_t() function calls gmtime() to convert from system +clock time, which returns (year - 1900), which we properly convert to +the full 4-digit year. There is a possibility that applications using +libpng are not passing 4-digit years into the png_convert_to_rfc_1123() +function, or that they are incorrectly passing only a 2-digit year +instead of "year - 1900" into the png_convert_from_struct_tm() function, +but this is not under our control. The libpng documentation has always +stated that it works with 4-digit years, and the APIs have been +documented as such. + +The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned +integer to hold the year, and can hold years as large as 65535. + +zlib, upon which libpng depends, is also Y2K compliant. It contains +no date-related code. + + + Glenn Randers-Pehrson + libpng maintainer + PNG Development Group + +.SH NOTE + +Note about libpng version numbers: + +Due to various miscommunications, unforeseen code incompatibilities +and occasional factors outside the authors' control, version numbering +on the library has not always been consistent and straightforward. +The following table summarizes matters since version 0.89c, which was +the first widely used release: + + source png.h png.h shared-lib + version string int version + ------- ------ ----- ---------- + 0.89c ("beta 3") 0.89 89 1.0.89 + 0.90 ("beta 4") 0.90 90 0.90 + 0.95 ("beta 5") 0.95 95 0.95 + 0.96 ("beta 6") 0.96 96 0.96 + 0.97b ("beta 7") 1.00.97 97 1.0.1 + 0.97c 0.97 97 2.0.97 + 0.98 0.98 98 2.0.98 + 0.99 0.99 98 2.0.99 + 0.99a-m 0.99 99 2.0.99 + 1.00 1.00 100 2.1.0 + 1.0.0 1.0.0 100 2.1.0 + 1.0.0 (from here on, the 100 2.1.0 + 1.0.1 png.h string is 10001 2.1.0 + 1.0.1a-e identical to the 10002 from here on, the + 1.0.2 source version) 10002 shared library is 2.V + 1.0.2a-b 10003 where V is the source + 1.0.1 10001 code version except as + 1.0.1a-e 10002 2.1.0.1a-e noted. + 1.0.2 10002 2.1.0.2 + 1.0.2a-b 10003 2.1.0.2a-b + 1.0.3 10003 2.1.0.3 + 1.0.3a-d 10004 2.1.0.3a-d + 1.0.4 10004 2.1.0.4 + 1.0.4a-f 10005 2.1.0.4a-f + 1.0.5 (+ 2 patches) 10005 2.1.0.5 + 1.0.5a-d 10006 2.1.0.5a-d + 1.0.5e-r 10100 2.1.0.5e-r + 1.0.5s-v 10006 2.1.0.5s-v + 1.0.6 (+ 3 patches) 10006 2.1.0.6 + 1.0.6d-g 10007 2.1.0.6d-g + 1.0.6h 10007 10.6h + 1.0.6i 10007 10.6i + 1.0.6j 10007 2.1.0.6j + 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 + 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 + 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 + 1.0.7 1 10007 2.1.0.7 + 1.0.8beta1-4 1 10008 2.1.0.8beta1-4 + 1.0.8rc1 1 10008 2.1.0.8rc1 + 1.0.8 1 10008 2.1.0.8 + 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 + 1.0.9rc1 1 10009 2.1.0.9rc1 + 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 + 1.0.9rc2 1 10009 2.1.0.9rc2 + 1.0.9 1 10009 2.1.0.9 + 1.0.10beta1 1 10010 2.1.0.10beta1 + 1.0.10rc1 1 10010 2.1.0.10rc1 + 1.0.10 1 10010 2.1.0.10 + 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 + 1.0.11rc1 1 10011 2.1.0.11rc1 + 1.0.11 1 10011 2.1.0.11 + 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 + 1.0.12rc1 2 10012 2.1.0.12rc1 + 1.0.12 2 10012 2.1.0.12 + 1.1.0a-f - 10100 2.1.1.0a-f abandoned + 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 + 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 + 1.2.0rc1 3 10200 3.1.2.0rc1 + 1.2.0 3 10200 3.1.2.0 + 1.2.1beta-4 3 10201 3.1.2.1beta1-4 + 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 + 1.2.1 3 10201 3.1.2.1 + 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 + 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 + 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 + 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 + 1.0.13 10 10013 10.so.0.1.0.13 + 1.2.2 12 10202 12.so.0.1.2.2 + 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 + 1.2.3 12 10203 12.so.0.1.2.3 + 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 + 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 + 1.0.14 10 10014 10.so.0.1.0.14 + 1.2.4 13 10204 12.so.0.1.2.4 + 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2 + 1.0.15rc1 10 10015 10.so.0.1.0.15rc1 + 1.0.15 10 10015 10.so.0.1.0.15 + 1.2.5 13 10205 12.so.0.1.2.5 + 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4 + 1.2.6rc1-5 13 10206 12.so.0.1.2.6rc1-5 + 1.0.16 10 10016 10.so.0.1.0.16 + 1.2.6 13 10206 12.so.0.1.2.6 + 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 + 1.0.17rc1 10 10017 12.so.0.1.0.17rc1 + 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 + 1.0.17 10 10017 12.so.0.1.0.17 + 1.2.7 13 10207 12.so.0.1.2.7 + 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 + 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5 + 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 + 1.0.18 10 10018 12.so.0.1.0.18 + 1.2.8 13 10208 12.so.0.1.2.8 + 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 + 1.2.9beta4-11 13 10209 12.so.0.9[.0] + 1.2.9rc1 13 10209 12.so.0.9[.0] + 1.2.9 13 10209 12.so.0.9[.0] + 1.2.10beta1-7 13 10210 12.so.0.10[.0] + 1.2.10rc1-2 13 10210 12.so.0.10[.0] + 1.2.10 13 10210 12.so.0.10[.0] + 1.4.0beta1-6 14 10400 14.so.0.0[.0] + 1.2.11beta1-4 13 10210 12.so.0.11[.0] + 1.4.0beta7-8 14 10400 14.so.0.0[.0] + 1.2.11 13 10211 12.so.0.11[.0] + 1.2.12 13 10212 12.so.0.12[.0] + 1.4.0beta9-14 14 10400 14.so.0.0[.0] + 1.2.13 13 10213 12.so.0.13[.0] + 1.4.0beta15-36 14 10400 14.so.0.0[.0] + 1.4.0beta37-87 14 10400 14.so.14.0[.0] + 1.4.0rc01 14 10400 14.so.14.0[.0] + 1.4.0beta88-109 14 10400 14.so.14.0[.0] + 1.4.0rc02-08 14 10400 14.so.14.0[.0] + 1.4.0 14 10400 14.so.14.0[.0] + 1.4.1beta01-03 14 10401 14.so.14.1[.0] + 1.4.1rc01 14 10401 14.so.14.1[.0] + 1.4.1beta04-12 14 10401 14.so.14.1[.0] + 1.4.1 14 10401 14.so.14.1[.0] + 1.4.2 14 10402 14.so.14.2[.0] + 1.4.3 14 10403 14.so.14.3[.0] + 1.4.4 14 10404 14.so.14.4[.0] + 1.5.0beta01-58 15 10500 15.so.15.0[.0] + 1.5.0rc01-07 15 10500 15.so.15.0[.0] + 1.5.0 15 10500 15.so.15.0[.0] + 1.5.1beta01-11 15 10501 15.so.15.1[.0] + 1.5.1rc01-02 15 10501 15.so.15.1[.0] + 1.5.1 15 10501 15.so.15.1[.0] + 1.5.2beta01-03 15 10502 15.so.15.2[.0] + 1.5.2rc01-03 15 10502 15.so.15.2[.0] + 1.5.2 15 10502 15.so.15.2[.0] + 1.5.3beta01-10 15 10503 15.so.15.3[.0] + 1.5.3rc01-02 15 10503 15.so.15.3[.0] + 1.5.3beta11 15 10503 15.so.15.3[.0] + 1.5.3 [omitted] + 1.5.4beta01-08 15 10504 15.so.15.4[.0] + 1.5.4rc01 15 10504 15.so.15.4[.0] + 1.5.4 15 10504 15.so.15.4[.0] + 1.5.5beta01-08 15 10505 15.so.15.5[.0] + 1.5.5rc01 15 10505 15.so.15.5[.0] + 1.5.5 15 10505 15.so.15.5[.0] + 1.5.6beta01-07 15 10506 15.so.15.6[.0] + 1.5.6rc01-03 15 10506 15.so.15.6[.0] + 1.5.6 15 10506 15.so.15.6[.0] + 1.5.7beta01-05 15 10507 15.so.15.7[.0] + 1.5.7rc01-03 15 10507 15.so.15.7[.0] + 1.5.7 15 10507 15.so.15.7[.0] + 1.6.0beta01-40 16 10600 16.so.16.0[.0] + 1.6.0rc01-08 16 10600 16.so.16.0[.0] + 1.6.0 16 10600 16.so.16.0[.0] + 1.6.1beta01-09 16 10601 16.so.16.1[.0] + 1.6.1rc01 16 10601 16.so.16.1[.0] + 1.6.1 16 10601 16.so.16.1[.0] + 1.6.2beta01 16 10602 16.so.16.2[.0] + 1.6.2rc01-06 16 10602 16.so.16.2[.0] + 1.6.2 16 10602 16.so.16.2[.0] + +Henceforth the source version will match the shared-library minor +and patch numbers; the shared-library major version number will be +used for changes in backward compatibility, as it is intended. The +PNG_PNGLIB_VER macro, which is not used within libpng but is available +for applications, is an unsigned integer of the form xyyzz corresponding +to the source version x.y.z (leading zeros in y and z). Beta versions +were given the previous public release number plus a letter, until +version 1.0.6j; from then on they were given the upcoming public +release number plus "betaNN" or "rcN". + +.SH "SEE ALSO" +.BR "png"(5), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) + +.LP +.IR libpng : +.IP +http://libpng.sourceforge.net (follow the [DOWNLOAD] link) +http://www.libpng.org/pub/png + +.LP +.IR zlib : +.IP +(generally) at the same location as +.I libpng +or at +.br +ftp://ftp.info-zip.org/pub/infozip/zlib + +.LP +.IR PNG specification: RFC 2083 +.IP +(generally) at the same location as +.I libpng +or at +.br +ftp://ds.internic.net/rfc/rfc2083.txt +.br +or (as a W3C Recommendation) at +.br +http://www.w3.org/TR/REC-png.html + +.LP +In the case of any inconsistency between the PNG specification +and this library, the specification takes precedence. + +.SH AUTHORS +This man page: Glenn Randers-Pehrson + + +The contributing authors would like to thank all those who helped +with testing, bug fixes, and patience. This wouldn't have been +possible without all of you. + +Thanks to Frank J. T. Wojcik for helping with the documentation. + +Libpng version 1.6.2 - April 25, 2013: +Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. +Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). + +Supported by the PNG development group +.br +png-mng-implement at lists.sf.net +(subscription required; visit +png-mng-implement at lists.sourceforge.net (subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe). + +.SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +(This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail.) + +If you modify libpng you may insert additional notices immediately following +this sentence. + +This code is released under the libpng license. + +libpng versions 1.2.6, August 15, 2004, through 1.6.2, April 25, 2013, are +Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors + + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your + enjoyment of the library or against infringement. + There is no warranty that our efforts or the library + will fulfill any of your particular purposes or needs. + This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and + effort is with the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson +Distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and + must not be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from + any source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + + +A "png_get_copyright" function is available, for convenient use in "about" +boxes and the like: + + printf("%s",png_get_copyright(NULL)); + +Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a +certification mark of the Open Source Initiative. + +Glenn Randers-Pehrson +glennrp at users.sourceforge.net +April 25, 2013 + +.\" end of man page + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/libpng.pc.in b/3rdparty/wxwidgets3.0-3.0.1/src/png/libpng.pc.in new file mode 100644 index 0000000000..3e7e2c58a7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/libpng.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ + +Name: libpng +Description: Loads and saves PNG files +Version: @PNGLIB_VERSION@ +Libs: -L${libdir} -lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ +Libs.private: @LIBS@ +Cflags: -I${includedir} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/libpngpf.3 b/3rdparty/wxwidgets3.0-3.0.1/src/png/libpngpf.3 new file mode 100644 index 0000000000..7baaa22d24 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/libpngpf.3 @@ -0,0 +1,18 @@ +.TH LIBPNGPF 3 "April 25, 2013" +.SH NAME +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.2 +(private functions) +.SH SYNOPSIS +\fB#include \fI"pngpriv.h" + +\fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer \fP\fImaintained\fP\fB, now that the private function prototypes are hidden in pngpriv.h and not accessible to applications. Look in pngpriv.h for the prototypes and a short description of each \fIfunction. + +.SH DESCRIPTION +The functions previously listed here are used privately by libpng and are not +available for use by applications. They are not "exported" to applications +using shared libraries. + +.SH SEE ALSO +.BR "png"(5), " libpng"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) +.SH AUTHOR +Glenn Randers-Pehrson diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/ltmain.sh b/3rdparty/wxwidgets3.0-3.0.1/src/png/ltmain.sh new file mode 100755 index 0000000000..499e473fb9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/ltmain.sh @@ -0,0 +1,9661 @@ + +# libtool (GNU libtool) 2.4.2 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --no-warn don't display warning messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.2 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . + +PROGRAM=libtool +PACKAGE=libtool +VERSION="2.4.2 Debian-2.4.2-1.2" +TIMESTAMP="" +package_revision=1.3337 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# NLS nuisances: We save the old values to restore during execute mode. +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL + +$lt_unset CDPATH + + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + + + +: ${CP="cp -f"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} + +# The name of this program: +func_dirname_and_basename "$progpath" +progname=$func_basename_result + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + done + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "$my_tmpdir" +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "$1" | $SED \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + echo + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. +func_help () +{ + $opt_debug + + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ + p + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $opt_debug + + func_error "missing argument for $1." + exit_cmd=exit +} + + +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation + +exit_cmd=: + + + + + +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" + +# Global variables. +nonopt= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "${1}=\$${1}\${2}" +} # func_append may be replaced by extended shell implementation + +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () +{ + func_quote_for_eval "${2}" + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" +} # func_append_quoted may be replaced by extended shell implementation + + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "${@}"` +} # func_arith may be replaced by extended shell implementation + + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} + + +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + +# func_features +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac + + + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_warning=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do + opt="$1" + shift + case $opt in + --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" + $opt_debug + ;; + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" + shift + ;; + --preserve-dup-deps) + opt_preserve_dup_deps=: + ;; + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) + opt_silent=false +func_append preserve_args " $opt" + ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" + ;; + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" + shift + ;; + + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + + # Separate optargs to long options: + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done + + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } + + + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} + + + + +## ----------- ## +## Main. ## +## ----------- ## + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_mode_compile arg... +func_mode_compile () +{ + $opt_debug + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with \`-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from \`$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + + echo + $ECHO "Try \`$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps ; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + else + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + echo + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$absdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system can not link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|qnx|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + func_append verstring ":${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + func_append libobjs " $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd1 in $cmds; do + IFS="$save_ifs" + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + func_append oldobjs " $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + odir="$objdir" + else + odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$opt_mode" = uninstall && odir="$dir" + + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case "$opt_mode" in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + func_append rmfiles " $odir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$opt_mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/missing b/3rdparty/wxwidgets3.0-3.0.1/src/png/missing new file mode 100755 index 0000000000..cdea514931 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2012-06-26.16; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'automa4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/png.5 b/3rdparty/wxwidgets3.0-3.0.1/src/png/png.5 new file mode 100644 index 0000000000..e14e7da414 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/png.5 @@ -0,0 +1,74 @@ +.TH PNG 5 "April 25, 2013" +.SH NAME +png \- Portable Network Graphics (PNG) format +.SH DESCRIPTION +PNG (Portable Network Graphics) is an extensible file format for the +lossless, portable, well-compressed storage of raster images. PNG provides +a patent-free replacement for GIF and can also replace many +common uses of TIFF. Indexed-color, grayscale, and truecolor images are +supported, plus an optional alpha channel. Sample depths range from +1 to 16 bits. +.br + +PNG is designed to work well in online viewing applications, such as the +World Wide Web, so it is fully streamable with a progressive display +option. PNG is robust, providing both full file integrity checking and +fast, simple detection of common transmission errors. Also, PNG can store +gamma and chromaticity data for improved color matching on heterogeneous +platforms. + +.SH "SEE ALSO" +.BR "libpng"(3), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) +.LP +PNG specification (second edition), November 2003: +.IP +.br + 8) + png_error(png_ptr, "Too many bytes for PNG signature"); + + png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes); +} + +/* Checks whether the supplied bytes match the PNG signature. We allow + * checking less than the full 8-byte signature so that those apps that + * already read the first few bytes of a file to determine the file type + * can simply check the remaining bytes for extra assurance. Returns + * an integer less than, equal to, or greater than zero if sig is found, + * respectively, to be less than, to match, or be greater than the correct + * PNG signature (this is the same behavior as strcmp, memcmp, etc). + */ +int PNGAPI +png_sig_cmp(png_const_bytep sig, png_size_t start, png_size_t num_to_check) +{ + png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10}; + + if (num_to_check > 8) + num_to_check = 8; + + else if (num_to_check < 1) + return (-1); + + if (start > 7) + return (-1); + + if (start + num_to_check > 8) + num_to_check = 8 - start; + + return ((int)(memcmp(&sig[start], &png_signature[start], num_to_check))); +} + +#endif /* PNG_READ_SUPPORTED */ + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +/* Function to allocate memory for zlib */ +PNG_FUNCTION(voidpf /* PRIVATE */, +png_zalloc,(voidpf png_ptr, uInt items, uInt size),PNG_ALLOCATED) +{ + png_alloc_size_t num_bytes = size; + + if (png_ptr == NULL) + return NULL; + + if (items >= (~(png_alloc_size_t)0)/size) + { + png_warning (png_voidcast(png_structrp, png_ptr), + "Potential overflow in png_zalloc()"); + return NULL; + } + + num_bytes *= items; + return png_malloc_warn(png_voidcast(png_structrp, png_ptr), num_bytes); +} + +/* Function to free memory for zlib */ +void /* PRIVATE */ +png_zfree(voidpf png_ptr, voidpf ptr) +{ + png_free(png_voidcast(png_const_structrp,png_ptr), ptr); +} + +/* Reset the CRC variable to 32 bits of 1's. Care must be taken + * in case CRC is > 32 bits to leave the top bits 0. + */ +void /* PRIVATE */ +png_reset_crc(png_structrp png_ptr) +{ + /* The cast is safe because the crc is a 32 bit value. */ + png_ptr->crc = (png_uint_32)crc32(0, Z_NULL, 0); +} + +/* Calculate the CRC over a section of data. We can only pass as + * much data to this routine as the largest single buffer size. We + * also check that this data will actually be used before going to the + * trouble of calculating it. + */ +void /* PRIVATE */ +png_calculate_crc(png_structrp png_ptr, png_const_bytep ptr, png_size_t length) +{ + int need_crc = 1; + + if (PNG_CHUNK_ANCILLARY(png_ptr->chunk_name)) + { + if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) == + (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) + need_crc = 0; + } + + else /* critical */ + { + if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) + need_crc = 0; + } + + /* 'uLong' is defined in zlib.h as unsigned long; this means that on some + * systems it is a 64 bit value. crc32, however, returns 32 bits so the + * following cast is safe. 'uInt' may be no more than 16 bits, so it is + * necessary to perform a loop here. + */ + if (need_crc && length > 0) + { + uLong crc = png_ptr->crc; /* Should never issue a warning */ + + do + { + uInt safe_length = (uInt)length; + if (safe_length == 0) + safe_length = (uInt)-1; /* evil, but safe */ + + crc = crc32(crc, ptr, safe_length); + + /* The following should never issue compiler warnings; if they do the + * target system has characteristics that will probably violate other + * assumptions within the libpng code. + */ + ptr += safe_length; + length -= safe_length; + } + while (length > 0); + + /* And the following is always safe because the crc is only 32 bits. */ + png_ptr->crc = (png_uint_32)crc; + } +} + +/* Check a user supplied version number, called from both read and write + * functions that create a png_struct. + */ +int +png_user_version_check(png_structrp png_ptr, png_const_charp user_png_ver) +{ + if (user_png_ver) + { + int i = 0; + + do + { + if (user_png_ver[i] != png_libpng_ver[i]) + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + } while (png_libpng_ver[i++]); + } + + else + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + + if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) + { + /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so + * we must recompile any applications that use any older library version. + * For versions after libpng 1.0, we will be compatible, so we need + * only check the first and third digits (note that when we reach version + * 1.10 we will need to check the fourth symbol, namely user_png_ver[3]). + */ + if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || + (user_png_ver[0] == '1' && (user_png_ver[2] != png_libpng_ver[2] || + user_png_ver[3] != png_libpng_ver[3])) || + (user_png_ver[0] == '0' && user_png_ver[2] < '9')) + { +#ifdef PNG_WARNINGS_SUPPORTED + size_t pos = 0; + char m[128]; + + pos = png_safecat(m, (sizeof m), pos, + "Application built with libpng-"); + pos = png_safecat(m, (sizeof m), pos, user_png_ver); + pos = png_safecat(m, (sizeof m), pos, " but running with "); + pos = png_safecat(m, (sizeof m), pos, png_libpng_ver); + + png_warning(png_ptr, m); +#endif + +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + png_ptr->flags = 0; +#endif + + return 0; + } + } + + /* Success return. */ + return 1; +} + +/* Generic function to create a png_struct for either read or write - this + * contains the common initialization. + */ +PNG_FUNCTION(png_structp /* PRIVATE */, +png_create_png_struct,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED) +{ + png_struct create_struct; +# ifdef PNG_SETJMP_SUPPORTED + jmp_buf create_jmp_buf; +# endif + + /* This temporary stack-allocated structure is used to provide a place to + * build enough context to allow the user provided memory allocator (if any) + * to be called. + */ + memset(&create_struct, 0, (sizeof create_struct)); + + /* Added at libpng-1.2.6 */ +# ifdef PNG_USER_LIMITS_SUPPORTED + create_struct.user_width_max = PNG_USER_WIDTH_MAX; + create_struct.user_height_max = PNG_USER_HEIGHT_MAX; + +# ifdef PNG_USER_CHUNK_CACHE_MAX + /* Added at libpng-1.2.43 and 1.4.0 */ + create_struct.user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX; +# endif + +# ifdef PNG_USER_CHUNK_MALLOC_MAX + /* Added at libpng-1.2.43 and 1.4.1, required only for read but exists + * in png_struct regardless. + */ + create_struct.user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX; +# endif +# endif + + /* The following two API calls simply set fields in png_struct, so it is safe + * to do them now even though error handling is not yet set up. + */ +# ifdef PNG_USER_MEM_SUPPORTED + png_set_mem_fn(&create_struct, mem_ptr, malloc_fn, free_fn); +# endif + + /* (*error_fn) can return control to the caller after the error_ptr is set, + * this will result in a memory leak unless the error_fn does something + * extremely sophisticated. The design lacks merit but is implicit in the + * API. + */ + png_set_error_fn(&create_struct, error_ptr, error_fn, warn_fn); + +# ifdef PNG_SETJMP_SUPPORTED + if (!setjmp(create_jmp_buf)) + { + /* Temporarily fake out the longjmp information until we have + * successfully completed this function. This only works if we have + * setjmp() support compiled in, but it is safe - this stuff should + * never happen. + */ + create_struct.jmp_buf_ptr = &create_jmp_buf; + create_struct.jmp_buf_size = 0; /*stack allocation*/ + create_struct.longjmp_fn = longjmp; +# else + { +# endif + /* Call the general version checker (shared with read and write code): + */ + if (png_user_version_check(&create_struct, user_png_ver)) + { + png_structrp png_ptr = png_voidcast(png_structrp, + png_malloc_warn(&create_struct, (sizeof *png_ptr))); + + if (png_ptr != NULL) + { + /* png_ptr->zstream holds a back-pointer to the png_struct, so + * this can only be done now: + */ + create_struct.zstream.zalloc = png_zalloc; + create_struct.zstream.zfree = png_zfree; + create_struct.zstream.opaque = png_ptr; + +# ifdef PNG_SETJMP_SUPPORTED + /* Eliminate the local error handling: */ + create_struct.jmp_buf_ptr = NULL; + create_struct.jmp_buf_size = 0; + create_struct.longjmp_fn = 0; +# endif + + *png_ptr = create_struct; + + /* This is the successful return point */ + return png_ptr; + } + } + } + + /* A longjmp because of a bug in the application storage allocator or a + * simple failure to allocate the png_struct. + */ + return NULL; +} + +/* Allocate the memory for an info_struct for the application. */ +PNG_FUNCTION(png_infop,PNGAPI +png_create_info_struct,(png_const_structrp png_ptr),PNG_ALLOCATED) +{ + png_inforp info_ptr; + + png_debug(1, "in png_create_info_struct"); + + if (png_ptr == NULL) + return NULL; + + /* Use the internal API that does not (or at least should not) error out, so + * that this call always returns ok. The application typically sets up the + * error handling *after* creating the info_struct because this is the way it + * has always been done in 'example.c'. + */ + info_ptr = png_voidcast(png_inforp, png_malloc_base(png_ptr, + (sizeof *info_ptr))); + + if (info_ptr != NULL) + memset(info_ptr, 0, (sizeof *info_ptr)); + + return info_ptr; +} + +/* This function frees the memory associated with a single info struct. + * Normally, one would use either png_destroy_read_struct() or + * png_destroy_write_struct() to free an info struct, but this may be + * useful for some applications. From libpng 1.6.0 this function is also used + * internally to implement the png_info release part of the 'struct' destroy + * APIs. This ensures that all possible approaches free the same data (all of + * it). + */ +void PNGAPI +png_destroy_info_struct(png_const_structrp png_ptr, png_infopp info_ptr_ptr) +{ + png_inforp info_ptr = NULL; + + png_debug(1, "in png_destroy_info_struct"); + + if (png_ptr == NULL) + return; + + if (info_ptr_ptr != NULL) + info_ptr = *info_ptr_ptr; + + if (info_ptr != NULL) + { + /* Do this first in case of an error below; if the app implements its own + * memory management this can lead to png_free calling png_error, which + * will abort this routine and return control to the app error handler. + * An infinite loop may result if it then tries to free the same info + * ptr. + */ + *info_ptr_ptr = NULL; + + png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); + memset(info_ptr, 0, (sizeof *info_ptr)); + png_free(png_ptr, info_ptr); + } +} + +/* Initialize the info structure. This is now an internal function (0.89) + * and applications using it are urged to use png_create_info_struct() + * instead. Use deprecated in 1.6.0, internal use removed (used internally it + * is just a memset). + * + * NOTE: it is almost inconceivable that this API is used because it bypasses + * the user-memory mechanism and the user error handling/warning mechanisms in + * those cases where it does anything other than a memset. + */ +PNG_FUNCTION(void,PNGAPI +png_info_init_3,(png_infopp ptr_ptr, png_size_t png_info_struct_size), + PNG_DEPRECATED) +{ + png_inforp info_ptr = *ptr_ptr; + + png_debug(1, "in png_info_init_3"); + + if (info_ptr == NULL) + return; + + if ((sizeof (png_info)) > png_info_struct_size) + { + *ptr_ptr = NULL; + /* The following line is why this API should not be used: */ + free(info_ptr); + info_ptr = png_voidcast(png_inforp, png_malloc_base(NULL, + (sizeof *info_ptr))); + *ptr_ptr = info_ptr; + } + + /* Set everything to 0 */ + memset(info_ptr, 0, (sizeof *info_ptr)); +} + +/* The following API is not called internally */ +void PNGAPI +png_data_freer(png_const_structrp png_ptr, png_inforp info_ptr, + int freer, png_uint_32 mask) +{ + png_debug(1, "in png_data_freer"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (freer == PNG_DESTROY_WILL_FREE_DATA) + info_ptr->free_me |= mask; + + else if (freer == PNG_USER_WILL_FREE_DATA) + info_ptr->free_me &= ~mask; + + else + png_error(png_ptr, "Unknown freer parameter in png_data_freer"); +} + +void PNGAPI +png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask, + int num) +{ + png_debug(1, "in png_free_data"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + +#ifdef PNG_TEXT_SUPPORTED + /* Free text item num or (if num == -1) all text items */ + if ((mask & PNG_FREE_TEXT) & info_ptr->free_me) + { + if (num != -1) + { + if (info_ptr->text && info_ptr->text[num].key) + { + png_free(png_ptr, info_ptr->text[num].key); + info_ptr->text[num].key = NULL; + } + } + + else + { + int i; + for (i = 0; i < info_ptr->num_text; i++) + png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, i); + png_free(png_ptr, info_ptr->text); + info_ptr->text = NULL; + info_ptr->num_text=0; + } + } +#endif + +#ifdef PNG_tRNS_SUPPORTED + /* Free any tRNS entry */ + if ((mask & PNG_FREE_TRNS) & info_ptr->free_me) + { + png_free(png_ptr, info_ptr->trans_alpha); + info_ptr->trans_alpha = NULL; + info_ptr->valid &= ~PNG_INFO_tRNS; + } +#endif + +#ifdef PNG_sCAL_SUPPORTED + /* Free any sCAL entry */ + if ((mask & PNG_FREE_SCAL) & info_ptr->free_me) + { + png_free(png_ptr, info_ptr->scal_s_width); + png_free(png_ptr, info_ptr->scal_s_height); + info_ptr->scal_s_width = NULL; + info_ptr->scal_s_height = NULL; + info_ptr->valid &= ~PNG_INFO_sCAL; + } +#endif + +#ifdef PNG_pCAL_SUPPORTED + /* Free any pCAL entry */ + if ((mask & PNG_FREE_PCAL) & info_ptr->free_me) + { + png_free(png_ptr, info_ptr->pcal_purpose); + png_free(png_ptr, info_ptr->pcal_units); + info_ptr->pcal_purpose = NULL; + info_ptr->pcal_units = NULL; + if (info_ptr->pcal_params != NULL) + { + unsigned int i; + for (i = 0; i < info_ptr->pcal_nparams; i++) + { + png_free(png_ptr, info_ptr->pcal_params[i]); + info_ptr->pcal_params[i] = NULL; + } + png_free(png_ptr, info_ptr->pcal_params); + info_ptr->pcal_params = NULL; + } + info_ptr->valid &= ~PNG_INFO_pCAL; + } +#endif + +#ifdef PNG_iCCP_SUPPORTED + /* Free any profile entry */ + if ((mask & PNG_FREE_ICCP) & info_ptr->free_me) + { + png_free(png_ptr, info_ptr->iccp_name); + png_free(png_ptr, info_ptr->iccp_profile); + info_ptr->iccp_name = NULL; + info_ptr->iccp_profile = NULL; + info_ptr->valid &= ~PNG_INFO_iCCP; + } +#endif + +#ifdef PNG_sPLT_SUPPORTED + /* Free a given sPLT entry, or (if num == -1) all sPLT entries */ + if ((mask & PNG_FREE_SPLT) & info_ptr->free_me) + { + if (num != -1) + { + if (info_ptr->splt_palettes) + { + png_free(png_ptr, info_ptr->splt_palettes[num].name); + png_free(png_ptr, info_ptr->splt_palettes[num].entries); + info_ptr->splt_palettes[num].name = NULL; + info_ptr->splt_palettes[num].entries = NULL; + } + } + + else + { + if (info_ptr->splt_palettes_num) + { + int i; + for (i = 0; i < info_ptr->splt_palettes_num; i++) + png_free_data(png_ptr, info_ptr, PNG_FREE_SPLT, (int)i); + + png_free(png_ptr, info_ptr->splt_palettes); + info_ptr->splt_palettes = NULL; + info_ptr->splt_palettes_num = 0; + } + info_ptr->valid &= ~PNG_INFO_sPLT; + } + } +#endif + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED + if ((mask & PNG_FREE_UNKN) & info_ptr->free_me) + { + if (num != -1) + { + if (info_ptr->unknown_chunks) + { + png_free(png_ptr, info_ptr->unknown_chunks[num].data); + info_ptr->unknown_chunks[num].data = NULL; + } + } + + else + { + int i; + + if (info_ptr->unknown_chunks_num) + { + for (i = 0; i < info_ptr->unknown_chunks_num; i++) + png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, (int)i); + + png_free(png_ptr, info_ptr->unknown_chunks); + info_ptr->unknown_chunks = NULL; + info_ptr->unknown_chunks_num = 0; + } + } + } +#endif + +#ifdef PNG_hIST_SUPPORTED + /* Free any hIST entry */ + if ((mask & PNG_FREE_HIST) & info_ptr->free_me) + { + png_free(png_ptr, info_ptr->hist); + info_ptr->hist = NULL; + info_ptr->valid &= ~PNG_INFO_hIST; + } +#endif + + /* Free any PLTE entry that was internally allocated */ + if ((mask & PNG_FREE_PLTE) & info_ptr->free_me) + { + png_free(png_ptr, info_ptr->palette); + info_ptr->palette = NULL; + info_ptr->valid &= ~PNG_INFO_PLTE; + info_ptr->num_palette = 0; + } + +#ifdef PNG_INFO_IMAGE_SUPPORTED + /* Free any image bits attached to the info structure */ + if ((mask & PNG_FREE_ROWS) & info_ptr->free_me) + { + if (info_ptr->row_pointers) + { + png_uint_32 row; + for (row = 0; row < info_ptr->height; row++) + { + png_free(png_ptr, info_ptr->row_pointers[row]); + info_ptr->row_pointers[row] = NULL; + } + png_free(png_ptr, info_ptr->row_pointers); + info_ptr->row_pointers = NULL; + } + info_ptr->valid &= ~PNG_INFO_IDAT; + } +#endif + + if (num != -1) + mask &= ~PNG_FREE_MUL; + + info_ptr->free_me &= ~mask; +} +#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ + +/* This function returns a pointer to the io_ptr associated with the user + * functions. The application should free any memory associated with this + * pointer before png_write_destroy() or png_read_destroy() are called. + */ +png_voidp PNGAPI +png_get_io_ptr(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return (NULL); + + return (png_ptr->io_ptr); +} + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +# ifdef PNG_STDIO_SUPPORTED +/* Initialize the default input/output functions for the PNG file. If you + * use your own read or write routines, you can call either png_set_read_fn() + * or png_set_write_fn() instead of png_init_io(). If you have defined + * PNG_NO_STDIO or otherwise disabled PNG_STDIO_SUPPORTED, you must use a + * function of your own because "FILE *" isn't necessarily available. + */ +void PNGAPI +png_init_io(png_structrp png_ptr, png_FILE_p fp) +{ + png_debug(1, "in png_init_io"); + + if (png_ptr == NULL) + return; + + png_ptr->io_ptr = (png_voidp)fp; +} +# endif + +#ifdef PNG_SAVE_INT_32_SUPPORTED +/* The png_save_int_32 function assumes integers are stored in two's + * complement format. If this isn't the case, then this routine needs to + * be modified to write data in two's complement format. Note that, + * the following works correctly even if png_int_32 has more than 32 bits + * (compare the more complex code required on read for sign extension.) + */ +void PNGAPI +png_save_int_32(png_bytep buf, png_int_32 i) +{ + buf[0] = (png_byte)((i >> 24) & 0xff); + buf[1] = (png_byte)((i >> 16) & 0xff); + buf[2] = (png_byte)((i >> 8) & 0xff); + buf[3] = (png_byte)(i & 0xff); +} +#endif + +# ifdef PNG_TIME_RFC1123_SUPPORTED +/* Convert the supplied time into an RFC 1123 string suitable for use in + * a "Creation Time" or other text-based time string. + */ +int PNGAPI +png_convert_to_rfc1123_buffer(char out[29], png_const_timep ptime) +{ + static PNG_CONST char short_months[12][4] = + {"Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; + + if (out == NULL) + return 0; + + if (ptime->year > 9999 /* RFC1123 limitation */ || + ptime->month == 0 || ptime->month > 12 || + ptime->day == 0 || ptime->day > 31 || + ptime->hour > 23 || ptime->minute > 59 || + ptime->second > 60) + return 0; + + { + size_t pos = 0; + char number_buf[5]; /* enough for a four-digit year */ + +# define APPEND_STRING(string) pos = png_safecat(out, 29, pos, (string)) +# define APPEND_NUMBER(format, value)\ + APPEND_STRING(PNG_FORMAT_NUMBER(number_buf, format, (value))) +# define APPEND(ch) if (pos < 28) out[pos++] = (ch) + + APPEND_NUMBER(PNG_NUMBER_FORMAT_u, (unsigned)ptime->day); + APPEND(' '); + APPEND_STRING(short_months[(ptime->month - 1)]); + APPEND(' '); + APPEND_NUMBER(PNG_NUMBER_FORMAT_u, ptime->year); + APPEND(' '); + APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->hour); + APPEND(':'); + APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->minute); + APPEND(':'); + APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->second); + APPEND_STRING(" +0000"); /* This reliably terminates the buffer */ + +# undef APPEND +# undef APPEND_NUMBER +# undef APPEND_STRING + } + + return 1; +} + +# if PNG_LIBPNG_VER < 10700 +/* To do: remove the following from libpng-1.7 */ +/* Original API that uses a private buffer in png_struct. + * Deprecated because it causes png_struct to carry a spurious temporary + * buffer (png_struct::time_buffer), better to have the caller pass this in. + */ +png_const_charp PNGAPI +png_convert_to_rfc1123(png_structrp png_ptr, png_const_timep ptime) +{ + if (png_ptr != NULL) + { + /* The only failure above if png_ptr != NULL is from an invalid ptime */ + if (!png_convert_to_rfc1123_buffer(png_ptr->time_buffer, ptime)) + png_warning(png_ptr, "Ignoring invalid time value"); + + else + return png_ptr->time_buffer; + } + + return NULL; +} +# endif +# endif /* PNG_TIME_RFC1123_SUPPORTED */ + +#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ + +png_const_charp PNGAPI +png_get_copyright(png_const_structrp png_ptr) +{ + PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */ +#ifdef PNG_STRING_COPYRIGHT + return PNG_STRING_COPYRIGHT +#else +# ifdef __STDC__ + return PNG_STRING_NEWLINE \ + "libpng version 1.6.2 - April 25, 2013" PNG_STRING_NEWLINE \ + "Copyright (c) 1998-2013 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ + "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ + "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ + PNG_STRING_NEWLINE; +# else + return "libpng version 1.6.2 - April 25, 2013\ + Copyright (c) 1998-2013 Glenn Randers-Pehrson\ + Copyright (c) 1996-1997 Andreas Dilger\ + Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; +# endif +#endif +} + +/* The following return the library version as a short string in the + * format 1.0.0 through 99.99.99zz. To get the version of *.h files + * used with your application, print out PNG_LIBPNG_VER_STRING, which + * is defined in png.h. + * Note: now there is no difference between png_get_libpng_ver() and + * png_get_header_ver(). Due to the version_nn_nn_nn typedef guard, + * it is guaranteed that png.c uses the correct version of png.h. + */ +png_const_charp PNGAPI +png_get_libpng_ver(png_const_structrp png_ptr) +{ + /* Version of *.c files used when building libpng */ + return png_get_header_ver(png_ptr); +} + +png_const_charp PNGAPI +png_get_header_ver(png_const_structrp png_ptr) +{ + /* Version of *.h files used when building libpng */ + PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */ + return PNG_LIBPNG_VER_STRING; +} + +png_const_charp PNGAPI +png_get_header_version(png_const_structrp png_ptr) +{ + /* Returns longer string containing both version and date */ + PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */ +#ifdef __STDC__ + return PNG_HEADER_VERSION_STRING +# ifndef PNG_READ_SUPPORTED + " (NO READ SUPPORT)" +# endif + PNG_STRING_NEWLINE; +#else + return PNG_HEADER_VERSION_STRING; +#endif +} + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +int PNGAPI +png_handle_as_unknown(png_const_structrp png_ptr, png_const_bytep chunk_name) +{ + /* Check chunk_name and return "keep" value if it's on the list, else 0 */ + png_const_bytep p, p_end; + + if (png_ptr == NULL || chunk_name == NULL || png_ptr->num_chunk_list == 0) + return PNG_HANDLE_CHUNK_AS_DEFAULT; + + p_end = png_ptr->chunk_list; + p = p_end + png_ptr->num_chunk_list*5; /* beyond end */ + + /* The code is the fifth byte after each four byte string. Historically this + * code was always searched from the end of the list, this is no longer + * necessary because the 'set' routine handles duplicate entries correcty. + */ + do /* num_chunk_list > 0, so at least one */ + { + p -= 5; + + if (!memcmp(chunk_name, p, 4)) + return p[4]; + } + while (p > p_end); + + /* This means that known chunks should be processed and unknown chunks should + * be handled according to the value of png_ptr->unknown_default; this can be + * confusing because, as a result, there are two levels of defaulting for + * unknown chunks. + */ + return PNG_HANDLE_CHUNK_AS_DEFAULT; +} + +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +int /* PRIVATE */ +png_chunk_unknown_handling(png_const_structrp png_ptr, png_uint_32 chunk_name) +{ + png_byte chunk_string[5]; + + PNG_CSTRING_FROM_CHUNK(chunk_string, chunk_name); + return png_handle_as_unknown(png_ptr, chunk_string); +} +#endif /* READ_UNKNOWN_CHUNKS */ +#endif /* SET_UNKNOWN_CHUNKS */ + +#ifdef PNG_READ_SUPPORTED +/* This function, added to libpng-1.0.6g, is untested. */ +int PNGAPI +png_reset_zstream(png_structrp png_ptr) +{ + if (png_ptr == NULL) + return Z_STREAM_ERROR; + + /* WARNING: this resets the window bits to the maximum! */ + return (inflateReset(&png_ptr->zstream)); +} +#endif /* PNG_READ_SUPPORTED */ + +/* This function was added to libpng-1.0.7 */ +png_uint_32 PNGAPI +png_access_version_number(void) +{ + /* Version of *.c files used when building libpng */ + return((png_uint_32)PNG_LIBPNG_VER); +} + + + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +/* Ensure that png_ptr->zstream.msg holds some appropriate error message string. + * If it doesn't 'ret' is used to set it to something appropriate, even in cases + * like Z_OK or Z_STREAM_END where the error code is apparently a success code. + */ +void /* PRIVATE */ +png_zstream_error(png_structrp png_ptr, int ret) +{ + /* Translate 'ret' into an appropriate error string, priority is given to the + * one in zstream if set. This always returns a string, even in cases like + * Z_OK or Z_STREAM_END where the error code is a success code. + */ + if (png_ptr->zstream.msg == NULL) switch (ret) + { + default: + case Z_OK: + png_ptr->zstream.msg = PNGZ_MSG_CAST("unexpected zlib return code"); + break; + + case Z_STREAM_END: + /* Normal exit */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("unexpected end of LZ stream"); + break; + + case Z_NEED_DICT: + /* This means the deflate stream did not have a dictionary; this + * indicates a bogus PNG. + */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("missing LZ dictionary"); + break; + + case Z_ERRNO: + /* gz APIs only: should not happen */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("zlib IO error"); + break; + + case Z_STREAM_ERROR: + /* internal libpng error */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("bad parameters to zlib"); + break; + + case Z_DATA_ERROR: + png_ptr->zstream.msg = PNGZ_MSG_CAST("damaged LZ stream"); + break; + + case Z_MEM_ERROR: + png_ptr->zstream.msg = PNGZ_MSG_CAST("insufficient memory"); + break; + + case Z_BUF_ERROR: + /* End of input or output; not a problem if the caller is doing + * incremental read or write. + */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("truncated"); + break; + + case Z_VERSION_ERROR: + png_ptr->zstream.msg = PNGZ_MSG_CAST("unsupported zlib version"); + break; + + case PNG_UNEXPECTED_ZLIB_RETURN: + /* Compile errors here mean that zlib now uses the value co-opted in + * pngpriv.h for PNG_UNEXPECTED_ZLIB_RETURN; update the switch above + * and change pngpriv.h. Note that this message is "... return", + * whereas the default/Z_OK one is "... return code". + */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("unexpected zlib return"); + break; + } +} + +/* png_convert_size: a PNGAPI but no longer in png.h, so deleted + * at libpng 1.5.5! + */ + +/* Added at libpng version 1.2.34 and 1.4.0 (moved from pngset.c) */ +#ifdef PNG_GAMMA_SUPPORTED /* always set if COLORSPACE */ +static int +png_colorspace_check_gamma(png_const_structrp png_ptr, + png_colorspacerp colorspace, png_fixed_point gAMA, int from) + /* This is called to check a new gamma value against an existing one. The + * routine returns false if the new gamma value should not be written. + * + * 'from' says where the new gamma value comes from: + * + * 0: the new gamma value is the libpng estimate for an ICC profile + * 1: the new gamma value comes from a gAMA chunk + * 2: the new gamma value comes from an sRGB chunk + */ +{ + png_fixed_point gtest; + + if ((colorspace->flags & PNG_COLORSPACE_HAVE_GAMMA) != 0 && + (!png_muldiv(>est, colorspace->gamma, PNG_FP_1, gAMA) || + png_gamma_significant(gtest))) + { + /* Either this is an sRGB image, in which case the calculated gamma + * approximation should match, or this is an image with a profile and the + * value libpng calculates for the gamma of the profile does not match the + * value recorded in the file. The former, sRGB, case is an error, the + * latter is just a warning. + */ + if ((colorspace->flags & PNG_COLORSPACE_FROM_sRGB) != 0 || from == 2) + { + png_chunk_report(png_ptr, "gamma value does not match sRGB", + PNG_CHUNK_ERROR); + /* Do not overwrite an sRGB value */ + return from == 2; + } + + else /* sRGB tag not involved */ + { + png_chunk_report(png_ptr, "gamma value does not match libpng estimate", + PNG_CHUNK_WARNING); + return from == 1; + } + } + + return 1; +} + +void /* PRIVATE */ +png_colorspace_set_gamma(png_const_structrp png_ptr, + png_colorspacerp colorspace, png_fixed_point gAMA) +{ + /* Changed in libpng-1.5.4 to limit the values to ensure overflow can't + * occur. Since the fixed point representation is assymetrical it is + * possible for 1/gamma to overflow the limit of 21474 and this means the + * gamma value must be at least 5/100000 and hence at most 20000.0. For + * safety the limits here are a little narrower. The values are 0.00016 to + * 6250.0, which are truly ridiculous gamma values (and will produce + * displays that are all black or all white.) + * + * In 1.6.0 this test replaces the ones in pngrutil.c, in the gAMA chunk + * handling code, which only required the value to be >0. + */ + png_const_charp errmsg; + + if (gAMA < 16 || gAMA > 625000000) + errmsg = "gamma value out of range"; + +# ifdef PNG_READ_gAMA_SUPPORTED + /* Allow the application to set the gamma value more than once */ + else if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 && + (colorspace->flags & PNG_COLORSPACE_FROM_gAMA) != 0) + errmsg = "duplicate"; +# endif + + /* Do nothing if the colorspace is already invalid */ + else if (colorspace->flags & PNG_COLORSPACE_INVALID) + return; + + else + { + if (png_colorspace_check_gamma(png_ptr, colorspace, gAMA, 1/*from gAMA*/)) + { + /* Store this gamma value. */ + colorspace->gamma = gAMA; + colorspace->flags |= + (PNG_COLORSPACE_HAVE_GAMMA | PNG_COLORSPACE_FROM_gAMA); + } + + /* At present if the check_gamma test fails the gamma of the colorspace is + * not updated however the colorspace is not invalidated. This + * corresponds to the case where the existing gamma comes from an sRGB + * chunk or profile. An error message has already been output. + */ + return; + } + + /* Error exit - errmsg has been set. */ + colorspace->flags |= PNG_COLORSPACE_INVALID; + png_chunk_report(png_ptr, errmsg, PNG_CHUNK_WRITE_ERROR); +} + +void /* PRIVATE */ +png_colorspace_sync_info(png_const_structrp png_ptr, png_inforp info_ptr) +{ + if (info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) + { + /* Everything is invalid */ + info_ptr->valid &= ~(PNG_INFO_gAMA|PNG_INFO_cHRM|PNG_INFO_sRGB| + PNG_INFO_iCCP); + +# ifdef PNG_COLORSPACE_SUPPORTED + /* Clean up the iCCP profile now if it won't be used. */ + png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, -1/*not used*/); +# else + PNG_UNUSED(png_ptr) +# endif + } + + else + { +# ifdef PNG_COLORSPACE_SUPPORTED + /* Leave the INFO_iCCP flag set if the pngset.c code has already set + * it; this allows a PNG to contain a profile which matches sRGB and + * yet still have that profile retrievable by the application. + */ + if (info_ptr->colorspace.flags & PNG_COLORSPACE_MATCHES_sRGB) + info_ptr->valid |= PNG_INFO_sRGB; + + else + info_ptr->valid &= ~PNG_INFO_sRGB; + + if (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) + info_ptr->valid |= PNG_INFO_cHRM; + + else + info_ptr->valid &= ~PNG_INFO_cHRM; +# endif + + if (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) + info_ptr->valid |= PNG_INFO_gAMA; + + else + info_ptr->valid &= ~PNG_INFO_gAMA; + } +} + +#ifdef PNG_READ_SUPPORTED +void /* PRIVATE */ +png_colorspace_sync(png_const_structrp png_ptr, png_inforp info_ptr) +{ + if (info_ptr == NULL) /* reduce code size; check here not in the caller */ + return; + + info_ptr->colorspace = png_ptr->colorspace; + png_colorspace_sync_info(png_ptr, info_ptr); +} +#endif +#endif + +#ifdef PNG_COLORSPACE_SUPPORTED +/* Added at libpng-1.5.5 to support read and write of true CIEXYZ values for + * cHRM, as opposed to using chromaticities. These internal APIs return + * non-zero on a parameter error. The X, Y and Z values are required to be + * positive and less than 1.0. + */ +static int +png_xy_from_XYZ(png_xy *xy, const png_XYZ *XYZ) +{ + png_int_32 d, dwhite, whiteX, whiteY; + + d = XYZ->red_X + XYZ->red_Y + XYZ->red_Z; + if (!png_muldiv(&xy->redx, XYZ->red_X, PNG_FP_1, d)) return 1; + if (!png_muldiv(&xy->redy, XYZ->red_Y, PNG_FP_1, d)) return 1; + dwhite = d; + whiteX = XYZ->red_X; + whiteY = XYZ->red_Y; + + d = XYZ->green_X + XYZ->green_Y + XYZ->green_Z; + if (!png_muldiv(&xy->greenx, XYZ->green_X, PNG_FP_1, d)) return 1; + if (!png_muldiv(&xy->greeny, XYZ->green_Y, PNG_FP_1, d)) return 1; + dwhite += d; + whiteX += XYZ->green_X; + whiteY += XYZ->green_Y; + + d = XYZ->blue_X + XYZ->blue_Y + XYZ->blue_Z; + if (!png_muldiv(&xy->bluex, XYZ->blue_X, PNG_FP_1, d)) return 1; + if (!png_muldiv(&xy->bluey, XYZ->blue_Y, PNG_FP_1, d)) return 1; + dwhite += d; + whiteX += XYZ->blue_X; + whiteY += XYZ->blue_Y; + + /* The reference white is simply the sum of the end-point (X,Y,Z) vectors, + * thus: + */ + if (!png_muldiv(&xy->whitex, whiteX, PNG_FP_1, dwhite)) return 1; + if (!png_muldiv(&xy->whitey, whiteY, PNG_FP_1, dwhite)) return 1; + + return 0; +} + +static int +png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy) +{ + png_fixed_point red_inverse, green_inverse, blue_scale; + png_fixed_point left, right, denominator; + + /* Check xy and, implicitly, z. Note that wide gamut color spaces typically + * have end points with 0 tristimulus values (these are impossible end + * points, but they are used to cover the possible colors.) + */ + if (xy->redx < 0 || xy->redx > PNG_FP_1) return 1; + if (xy->redy < 0 || xy->redy > PNG_FP_1-xy->redx) return 1; + if (xy->greenx < 0 || xy->greenx > PNG_FP_1) return 1; + if (xy->greeny < 0 || xy->greeny > PNG_FP_1-xy->greenx) return 1; + if (xy->bluex < 0 || xy->bluex > PNG_FP_1) return 1; + if (xy->bluey < 0 || xy->bluey > PNG_FP_1-xy->bluex) return 1; + if (xy->whitex < 0 || xy->whitex > PNG_FP_1) return 1; + if (xy->whitey < 0 || xy->whitey > PNG_FP_1-xy->whitex) return 1; + + /* The reverse calculation is more difficult because the original tristimulus + * value had 9 independent values (red,green,blue)x(X,Y,Z) however only 8 + * derived values were recorded in the cHRM chunk; + * (red,green,blue,white)x(x,y). This loses one degree of freedom and + * therefore an arbitrary ninth value has to be introduced to undo the + * original transformations. + * + * Think of the original end-points as points in (X,Y,Z) space. The + * chromaticity values (c) have the property: + * + * C + * c = --------- + * X + Y + Z + * + * For each c (x,y,z) from the corresponding original C (X,Y,Z). Thus the + * three chromaticity values (x,y,z) for each end-point obey the + * relationship: + * + * x + y + z = 1 + * + * This describes the plane in (X,Y,Z) space that intersects each axis at the + * value 1.0; call this the chromaticity plane. Thus the chromaticity + * calculation has scaled each end-point so that it is on the x+y+z=1 plane + * and chromaticity is the intersection of the vector from the origin to the + * (X,Y,Z) value with the chromaticity plane. + * + * To fully invert the chromaticity calculation we would need the three + * end-point scale factors, (red-scale, green-scale, blue-scale), but these + * were not recorded. Instead we calculated the reference white (X,Y,Z) and + * recorded the chromaticity of this. The reference white (X,Y,Z) would have + * given all three of the scale factors since: + * + * color-C = color-c * color-scale + * white-C = red-C + green-C + blue-C + * = red-c*red-scale + green-c*green-scale + blue-c*blue-scale + * + * But cHRM records only white-x and white-y, so we have lost the white scale + * factor: + * + * white-C = white-c*white-scale + * + * To handle this the inverse transformation makes an arbitrary assumption + * about white-scale: + * + * Assume: white-Y = 1.0 + * Hence: white-scale = 1/white-y + * Or: red-Y + green-Y + blue-Y = 1.0 + * + * Notice the last statement of the assumption gives an equation in three of + * the nine values we want to calculate. 8 more equations come from the + * above routine as summarised at the top above (the chromaticity + * calculation): + * + * Given: color-x = color-X / (color-X + color-Y + color-Z) + * Hence: (color-x - 1)*color-X + color.x*color-Y + color.x*color-Z = 0 + * + * This is 9 simultaneous equations in the 9 variables "color-C" and can be + * solved by Cramer's rule. Cramer's rule requires calculating 10 9x9 matrix + * determinants, however this is not as bad as it seems because only 28 of + * the total of 90 terms in the various matrices are non-zero. Nevertheless + * Cramer's rule is notoriously numerically unstable because the determinant + * calculation involves the difference of large, but similar, numbers. It is + * difficult to be sure that the calculation is stable for real world values + * and it is certain that it becomes unstable where the end points are close + * together. + * + * So this code uses the perhaps slightly less optimal but more + * understandable and totally obvious approach of calculating color-scale. + * + * This algorithm depends on the precision in white-scale and that is + * (1/white-y), so we can immediately see that as white-y approaches 0 the + * accuracy inherent in the cHRM chunk drops off substantially. + * + * libpng arithmetic: a simple invertion of the above equations + * ------------------------------------------------------------ + * + * white_scale = 1/white-y + * white-X = white-x * white-scale + * white-Y = 1.0 + * white-Z = (1 - white-x - white-y) * white_scale + * + * white-C = red-C + green-C + blue-C + * = red-c*red-scale + green-c*green-scale + blue-c*blue-scale + * + * This gives us three equations in (red-scale,green-scale,blue-scale) where + * all the coefficients are now known: + * + * red-x*red-scale + green-x*green-scale + blue-x*blue-scale + * = white-x/white-y + * red-y*red-scale + green-y*green-scale + blue-y*blue-scale = 1 + * red-z*red-scale + green-z*green-scale + blue-z*blue-scale + * = (1 - white-x - white-y)/white-y + * + * In the last equation color-z is (1 - color-x - color-y) so we can add all + * three equations together to get an alternative third: + * + * red-scale + green-scale + blue-scale = 1/white-y = white-scale + * + * So now we have a Cramer's rule solution where the determinants are just + * 3x3 - far more tractible. Unfortunately 3x3 determinants still involve + * multiplication of three coefficients so we can't guarantee to avoid + * overflow in the libpng fixed point representation. Using Cramer's rule in + * floating point is probably a good choice here, but it's not an option for + * fixed point. Instead proceed to simplify the first two equations by + * eliminating what is likely to be the largest value, blue-scale: + * + * blue-scale = white-scale - red-scale - green-scale + * + * Hence: + * + * (red-x - blue-x)*red-scale + (green-x - blue-x)*green-scale = + * (white-x - blue-x)*white-scale + * + * (red-y - blue-y)*red-scale + (green-y - blue-y)*green-scale = + * 1 - blue-y*white-scale + * + * And now we can trivially solve for (red-scale,green-scale): + * + * green-scale = + * (white-x - blue-x)*white-scale - (red-x - blue-x)*red-scale + * ----------------------------------------------------------- + * green-x - blue-x + * + * red-scale = + * 1 - blue-y*white-scale - (green-y - blue-y) * green-scale + * --------------------------------------------------------- + * red-y - blue-y + * + * Hence: + * + * red-scale = + * ( (green-x - blue-x) * (white-y - blue-y) - + * (green-y - blue-y) * (white-x - blue-x) ) / white-y + * ------------------------------------------------------------------------- + * (green-x - blue-x)*(red-y - blue-y)-(green-y - blue-y)*(red-x - blue-x) + * + * green-scale = + * ( (red-y - blue-y) * (white-x - blue-x) - + * (red-x - blue-x) * (white-y - blue-y) ) / white-y + * ------------------------------------------------------------------------- + * (green-x - blue-x)*(red-y - blue-y)-(green-y - blue-y)*(red-x - blue-x) + * + * Accuracy: + * The input values have 5 decimal digits of accuracy. The values are all in + * the range 0 < value < 1, so simple products are in the same range but may + * need up to 10 decimal digits to preserve the original precision and avoid + * underflow. Because we are using a 32-bit signed representation we cannot + * match this; the best is a little over 9 decimal digits, less than 10. + * + * The approach used here is to preserve the maximum precision within the + * signed representation. Because the red-scale calculation above uses the + * difference between two products of values that must be in the range -1..+1 + * it is sufficient to divide the product by 7; ceil(100,000/32767*2). The + * factor is irrelevant in the calculation because it is applied to both + * numerator and denominator. + * + * Note that the values of the differences of the products of the + * chromaticities in the above equations tend to be small, for example for + * the sRGB chromaticities they are: + * + * red numerator: -0.04751 + * green numerator: -0.08788 + * denominator: -0.2241 (without white-y multiplication) + * + * The resultant Y coefficients from the chromaticities of some widely used + * color space definitions are (to 15 decimal places): + * + * sRGB + * 0.212639005871510 0.715168678767756 0.072192315360734 + * Kodak ProPhoto + * 0.288071128229293 0.711843217810102 0.000085653960605 + * Adobe RGB + * 0.297344975250536 0.627363566255466 0.075291458493998 + * Adobe Wide Gamut RGB + * 0.258728243040113 0.724682314948566 0.016589442011321 + */ + /* By the argument, above overflow should be impossible here. The return + * value of 2 indicates an internal error to the caller. + */ + if (!png_muldiv(&left, xy->greenx-xy->bluex, xy->redy - xy->bluey, 7)) + return 2; + if (!png_muldiv(&right, xy->greeny-xy->bluey, xy->redx - xy->bluex, 7)) + return 2; + denominator = left - right; + + /* Now find the red numerator. */ + if (!png_muldiv(&left, xy->greenx-xy->bluex, xy->whitey-xy->bluey, 7)) + return 2; + if (!png_muldiv(&right, xy->greeny-xy->bluey, xy->whitex-xy->bluex, 7)) + return 2; + + /* Overflow is possible here and it indicates an extreme set of PNG cHRM + * chunk values. This calculation actually returns the reciprocal of the + * scale value because this allows us to delay the multiplication of white-y + * into the denominator, which tends to produce a small number. + */ + if (!png_muldiv(&red_inverse, xy->whitey, denominator, left-right) || + red_inverse <= xy->whitey /* r+g+b scales = white scale */) + return 1; + + /* Similarly for green_inverse: */ + if (!png_muldiv(&left, xy->redy-xy->bluey, xy->whitex-xy->bluex, 7)) + return 2; + if (!png_muldiv(&right, xy->redx-xy->bluex, xy->whitey-xy->bluey, 7)) + return 2; + if (!png_muldiv(&green_inverse, xy->whitey, denominator, left-right) || + green_inverse <= xy->whitey) + return 1; + + /* And the blue scale, the checks above guarantee this can't overflow but it + * can still produce 0 for extreme cHRM values. + */ + blue_scale = png_reciprocal(xy->whitey) - png_reciprocal(red_inverse) - + png_reciprocal(green_inverse); + if (blue_scale <= 0) return 1; + + + /* And fill in the png_XYZ: */ + if (!png_muldiv(&XYZ->red_X, xy->redx, PNG_FP_1, red_inverse)) return 1; + if (!png_muldiv(&XYZ->red_Y, xy->redy, PNG_FP_1, red_inverse)) return 1; + if (!png_muldiv(&XYZ->red_Z, PNG_FP_1 - xy->redx - xy->redy, PNG_FP_1, + red_inverse)) + return 1; + + if (!png_muldiv(&XYZ->green_X, xy->greenx, PNG_FP_1, green_inverse)) + return 1; + if (!png_muldiv(&XYZ->green_Y, xy->greeny, PNG_FP_1, green_inverse)) + return 1; + if (!png_muldiv(&XYZ->green_Z, PNG_FP_1 - xy->greenx - xy->greeny, PNG_FP_1, + green_inverse)) + return 1; + + if (!png_muldiv(&XYZ->blue_X, xy->bluex, blue_scale, PNG_FP_1)) return 1; + if (!png_muldiv(&XYZ->blue_Y, xy->bluey, blue_scale, PNG_FP_1)) return 1; + if (!png_muldiv(&XYZ->blue_Z, PNG_FP_1 - xy->bluex - xy->bluey, blue_scale, + PNG_FP_1)) + return 1; + + return 0; /*success*/ +} + +static int +png_XYZ_normalize(png_XYZ *XYZ) +{ + png_int_32 Y; + + if (XYZ->red_Y < 0 || XYZ->green_Y < 0 || XYZ->blue_Y < 0 || + XYZ->red_X < 0 || XYZ->green_X < 0 || XYZ->blue_X < 0 || + XYZ->red_Z < 0 || XYZ->green_Z < 0 || XYZ->blue_Z < 0) + return 1; + + /* Normalize by scaling so the sum of the end-point Y values is PNG_FP_1. + * IMPLEMENTATION NOTE: ANSI requires signed overflow not to occur, therefore + * relying on addition of two positive values producing a negative one is not + * safe. + */ + Y = XYZ->red_Y; + if (0x7fffffff - Y < XYZ->green_X) return 1; + Y += XYZ->green_Y; + if (0x7fffffff - Y < XYZ->blue_X) return 1; + Y += XYZ->blue_Y; + + if (Y != PNG_FP_1) + { + if (!png_muldiv(&XYZ->red_X, XYZ->red_X, PNG_FP_1, Y)) return 1; + if (!png_muldiv(&XYZ->red_Y, XYZ->red_Y, PNG_FP_1, Y)) return 1; + if (!png_muldiv(&XYZ->red_Z, XYZ->red_Z, PNG_FP_1, Y)) return 1; + + if (!png_muldiv(&XYZ->green_X, XYZ->green_X, PNG_FP_1, Y)) return 1; + if (!png_muldiv(&XYZ->green_Y, XYZ->green_Y, PNG_FP_1, Y)) return 1; + if (!png_muldiv(&XYZ->green_Z, XYZ->green_Z, PNG_FP_1, Y)) return 1; + + if (!png_muldiv(&XYZ->blue_X, XYZ->blue_X, PNG_FP_1, Y)) return 1; + if (!png_muldiv(&XYZ->blue_Y, XYZ->blue_Y, PNG_FP_1, Y)) return 1; + if (!png_muldiv(&XYZ->blue_Z, XYZ->blue_Z, PNG_FP_1, Y)) return 1; + } + + return 0; +} + +static int +png_colorspace_endpoints_match(const png_xy *xy1, const png_xy *xy2, int delta) +{ + /* Allow an error of +/-0.01 (absolute value) on each chromaticity */ + return !(PNG_OUT_OF_RANGE(xy1->whitex, xy2->whitex,delta) || + PNG_OUT_OF_RANGE(xy1->whitey, xy2->whitey,delta) || + PNG_OUT_OF_RANGE(xy1->redx, xy2->redx, delta) || + PNG_OUT_OF_RANGE(xy1->redy, xy2->redy, delta) || + PNG_OUT_OF_RANGE(xy1->greenx, xy2->greenx,delta) || + PNG_OUT_OF_RANGE(xy1->greeny, xy2->greeny,delta) || + PNG_OUT_OF_RANGE(xy1->bluex, xy2->bluex, delta) || + PNG_OUT_OF_RANGE(xy1->bluey, xy2->bluey, delta)); +} + +/* Added in libpng-1.6.0, a different check for the validity of a set of cHRM + * chunk chromaticities. Earlier checks used to simply look for the overflow + * condition (where the determinant of the matrix to solve for XYZ ends up zero + * because the chromaticity values are not all distinct.) Despite this it is + * theoretically possible to produce chromaticities that are apparently valid + * but that rapidly degrade to invalid, potentially crashing, sets because of + * arithmetic inaccuracies when calculations are performed on them. The new + * check is to round-trip xy -> XYZ -> xy and then check that the result is + * within a small percentage of the original. + */ +static int +png_colorspace_check_xy(png_XYZ *XYZ, const png_xy *xy) +{ + int result; + png_xy xy_test; + + /* As a side-effect this routine also returns the XYZ endpoints. */ + result = png_XYZ_from_xy(XYZ, xy); + if (result) return result; + + result = png_xy_from_XYZ(&xy_test, XYZ); + if (result) return result; + + if (png_colorspace_endpoints_match(xy, &xy_test, + 5/*actually, the math is pretty accurate*/)) + return 0; + + /* Too much slip */ + return 1; +} + +/* This is the check going the other way. The XYZ is modified to normalize it + * (another side-effect) and the xy chromaticities are returned. + */ +static int +png_colorspace_check_XYZ(png_xy *xy, png_XYZ *XYZ) +{ + int result; + png_XYZ XYZtemp; + + result = png_XYZ_normalize(XYZ); + if (result) return result; + + result = png_xy_from_XYZ(xy, XYZ); + if (result) return result; + + XYZtemp = *XYZ; + return png_colorspace_check_xy(&XYZtemp, xy); +} + +/* Used to check for an endpoint match against sRGB */ +static const png_xy sRGB_xy = /* From ITU-R BT.709-3 */ +{ + /* color x y */ + /* red */ 64000, 33000, + /* green */ 30000, 60000, + /* blue */ 15000, 6000, + /* white */ 31270, 32900 +}; + +static int +png_colorspace_set_xy_and_XYZ(png_const_structrp png_ptr, + png_colorspacerp colorspace, const png_xy *xy, const png_XYZ *XYZ, + int preferred) +{ + if (colorspace->flags & PNG_COLORSPACE_INVALID) + return 0; + + /* The consistency check is performed on the chromaticities; this factors out + * variations because of the normalization (or not) of the end point Y + * values. + */ + if (preferred < 2 && (colorspace->flags & PNG_COLORSPACE_HAVE_ENDPOINTS)) + { + /* The end points must be reasonably close to any we already have. The + * following allows an error of up to +/-.001 + */ + if (!png_colorspace_endpoints_match(xy, &colorspace->end_points_xy, 100)) + { + colorspace->flags |= PNG_COLORSPACE_INVALID; + png_benign_error(png_ptr, "inconsistent chromaticities"); + return 0; /* failed */ + } + + /* Only overwrite with preferred values */ + if (!preferred) + return 1; /* ok, but no change */ + } + + colorspace->end_points_xy = *xy; + colorspace->end_points_XYZ = *XYZ; + colorspace->flags |= PNG_COLORSPACE_HAVE_ENDPOINTS; + + /* The end points are normally quoted to two decimal digits, so allow +/-0.01 + * on this test. + */ + if (png_colorspace_endpoints_match(xy, &sRGB_xy, 1000)) + colorspace->flags |= PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB; + + else + colorspace->flags &= PNG_COLORSPACE_CANCEL( + PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB); + + return 2; /* ok and changed */ +} + +int /* PRIVATE */ +png_colorspace_set_chromaticities(png_const_structrp png_ptr, + png_colorspacerp colorspace, const png_xy *xy, int preferred) +{ + /* We must check the end points to ensure they are reasonable - in the past + * color management systems have crashed as a result of getting bogus + * colorant values, while this isn't the fault of libpng it is the + * responsibility of libpng because PNG carries the bomb and libpng is in a + * position to protect against it. + */ + png_XYZ XYZ; + + switch (png_colorspace_check_xy(&XYZ, xy)) + { + case 0: /* success */ + return png_colorspace_set_xy_and_XYZ(png_ptr, colorspace, xy, &XYZ, + preferred); + + case 1: + /* We can't invert the chromaticities so we can't produce value XYZ + * values. Likely as not a color management system will fail too. + */ + colorspace->flags |= PNG_COLORSPACE_INVALID; + png_benign_error(png_ptr, "invalid chromaticities"); + break; + + default: + /* libpng is broken; this should be a warning but if it happens we + * want error reports so for the moment it is an error. + */ + colorspace->flags |= PNG_COLORSPACE_INVALID; + png_error(png_ptr, "internal error checking chromaticities"); + break; + } + + return 0; /* failed */ +} + +int /* PRIVATE */ +png_colorspace_set_endpoints(png_const_structrp png_ptr, + png_colorspacerp colorspace, const png_XYZ *XYZ_in, int preferred) +{ + png_XYZ XYZ = *XYZ_in; + png_xy xy; + + switch (png_colorspace_check_XYZ(&xy, &XYZ)) + { + case 0: + return png_colorspace_set_xy_and_XYZ(png_ptr, colorspace, &xy, &XYZ, + preferred); + + case 1: + /* End points are invalid. */ + colorspace->flags |= PNG_COLORSPACE_INVALID; + png_benign_error(png_ptr, "invalid end points"); + break; + + default: + colorspace->flags |= PNG_COLORSPACE_INVALID; + png_error(png_ptr, "internal error checking chromaticities"); + break; + } + + return 0; /* failed */ +} + +#if defined(PNG_sRGB_SUPPORTED) || defined(PNG_iCCP_SUPPORTED) +/* Error message generation */ +static char +png_icc_tag_char(png_uint_32 byte) +{ + byte &= 0xff; + if (byte >= 32 && byte <= 126) + return (char)byte; + else + return '?'; +} + +static void +png_icc_tag_name(char *name, png_uint_32 tag) +{ + name[0] = '\''; + name[1] = png_icc_tag_char(tag >> 24); + name[2] = png_icc_tag_char(tag >> 16); + name[3] = png_icc_tag_char(tag >> 8); + name[4] = png_icc_tag_char(tag ); + name[5] = '\''; +} + +static int +is_ICC_signature_char(png_alloc_size_t it) +{ + return it == 32 || (it >= 48 && it <= 57) || (it >= 65 && it <= 90) || + (it >= 97 && it <= 122); +} + +static int is_ICC_signature(png_alloc_size_t it) +{ + return is_ICC_signature_char(it >> 24) /* checks all the top bits */ && + is_ICC_signature_char((it >> 16) & 0xff) && + is_ICC_signature_char((it >> 8) & 0xff) && + is_ICC_signature_char(it & 0xff); +} + +static int +png_icc_profile_error(png_const_structrp png_ptr, png_colorspacerp colorspace, + png_const_charp name, png_alloc_size_t value, png_const_charp reason) +{ + size_t pos; + char message[196]; /* see below for calculation */ + + if (colorspace != NULL) + colorspace->flags |= PNG_COLORSPACE_INVALID; + + pos = png_safecat(message, (sizeof message), 0, "profile '"); /* 9 chars */ + pos = png_safecat(message, pos+79, pos, name); /* Truncate to 79 chars */ + pos = png_safecat(message, (sizeof message), pos, "': "); /* +2 = 90 */ + if (is_ICC_signature(value)) + { + /* So 'value' is at most 4 bytes and the following cast is safe */ + png_icc_tag_name(message+pos, (png_uint_32)value); + pos += 6; /* total +8; less than the else clause */ + message[pos++] = ':'; + message[pos++] = ' '; + } +# ifdef PNG_WARNINGS_SUPPORTED + else + { + char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114*/ + + pos = png_safecat(message, (sizeof message), pos, + png_format_number(number, number+(sizeof number), + PNG_NUMBER_FORMAT_x, value)); + pos = png_safecat(message, (sizeof message), pos, "h: "); /*+2 = 116*/ + } +# endif + /* The 'reason' is an arbitrary message, allow +79 maximum 195 */ + pos = png_safecat(message, (sizeof message), pos, reason); + + /* This is recoverable, but make it unconditionally an app_error on write to + * avoid writing invalid ICC profiles into PNG files. (I.e. we handle them + * on read, with a warning, but on write unless the app turns off + * application errors the PNG won't be written.) + */ + png_chunk_report(png_ptr, message, + (colorspace != NULL) ? PNG_CHUNK_ERROR : PNG_CHUNK_WRITE_ERROR); + + return 0; +} +#endif /* sRGB || iCCP */ + +#ifdef PNG_sRGB_SUPPORTED +int /* PRIVATE */ +png_colorspace_set_sRGB(png_const_structrp png_ptr, png_colorspacerp colorspace, + int intent) +{ + /* sRGB sets known gamma, end points and (from the chunk) intent. */ + /* IMPORTANT: these are not necessarily the values found in an ICC profile + * because ICC profiles store values adapted to a D50 environment; it is + * expected that the ICC profile mediaWhitePointTag will be D50, see the + * checks and code elsewhere to understand this better. + * + * These XYZ values, which are accurate to 5dp, produce rgb to gray + * coefficients of (6968,23435,2366), which are reduced (because they add up + * to 32769 not 32768) to (6968,23434,2366). These are the values that + * libpng has traditionally used (and are the best values given the 15bit + * algorithm used by the rgb to gray code.) + */ + static const png_XYZ sRGB_XYZ = /* D65 XYZ (*not* the D50 adapted values!) */ + { + /* color X Y Z */ + /* red */ 41239, 21264, 1933, + /* green */ 35758, 71517, 11919, + /* blue */ 18048, 7219, 95053 + }; + + /* Do nothing if the colorspace is already invalidated. */ + if (colorspace->flags & PNG_COLORSPACE_INVALID) + return 0; + + /* Check the intent, then check for existing settings. It is valid for the + * PNG file to have cHRM or gAMA chunks along with sRGB, but the values must + * be consistent with the correct values. If, however, this function is + * called below because an iCCP chunk matches sRGB then it is quite + * conceivable that an older app recorded incorrect gAMA and cHRM because of + * an incorrect calculation based on the values in the profile - this does + * *not* invalidate the profile (though it still produces an error, which can + * be ignored.) + */ + if (intent < 0 || intent >= PNG_sRGB_INTENT_LAST) + return png_icc_profile_error(png_ptr, colorspace, "sRGB", + (unsigned)intent, "invalid sRGB rendering intent"); + + if ((colorspace->flags & PNG_COLORSPACE_HAVE_INTENT) != 0 && + colorspace->rendering_intent != intent) + return png_icc_profile_error(png_ptr, colorspace, "sRGB", + (unsigned)intent, "inconsistent rendering intents"); + + if ((colorspace->flags & PNG_COLORSPACE_FROM_sRGB) != 0) + { + png_benign_error(png_ptr, "duplicate sRGB information ignored"); + return 0; + } + + /* If the standard sRGB cHRM chunk does not match the one from the PNG file + * warn but overwrite the value with the correct one. + */ + if ((colorspace->flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0 && + !png_colorspace_endpoints_match(&sRGB_xy, &colorspace->end_points_xy, + 100)) + png_chunk_report(png_ptr, "cHRM chunk does not match sRGB", + PNG_CHUNK_ERROR); + + /* This check is just done for the error reporting - the routine always + * returns true when the 'from' argument corresponds to sRGB (2). + */ + (void)png_colorspace_check_gamma(png_ptr, colorspace, PNG_GAMMA_sRGB_INVERSE, + 2/*from sRGB*/); + + /* intent: bugs in GCC force 'int' to be used as the parameter type. */ + colorspace->rendering_intent = (png_uint_16)intent; + colorspace->flags |= PNG_COLORSPACE_HAVE_INTENT; + + /* endpoints */ + colorspace->end_points_xy = sRGB_xy; + colorspace->end_points_XYZ = sRGB_XYZ; + colorspace->flags |= + (PNG_COLORSPACE_HAVE_ENDPOINTS|PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB); + + /* gamma */ + colorspace->gamma = PNG_GAMMA_sRGB_INVERSE; + colorspace->flags |= PNG_COLORSPACE_HAVE_GAMMA; + + /* Finally record that we have an sRGB profile */ + colorspace->flags |= + (PNG_COLORSPACE_MATCHES_sRGB|PNG_COLORSPACE_FROM_sRGB); + + return 1; /* set */ +} +#endif /* sRGB */ + +#ifdef PNG_iCCP_SUPPORTED +/* Encoded value of D50 as an ICC XYZNumber. From the ICC 2010 spec the value + * is XYZ(0.9642,1.0,0.8249), which scales to: + * + * (63189.8112, 65536, 54060.6464) + */ +static const png_byte D50_nCIEXYZ[12] = + { 0x00, 0x00, 0xf6, 0xd6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d }; + +int /* PRIVATE */ +png_icc_check_length(png_const_structrp png_ptr, png_colorspacerp colorspace, + png_const_charp name, png_uint_32 profile_length) +{ + if (profile_length < 132) + return png_icc_profile_error(png_ptr, colorspace, name, profile_length, + "too short"); + + if (profile_length & 3) + return png_icc_profile_error(png_ptr, colorspace, name, profile_length, + "invalid length"); + + return 1; +} + +int /* PRIVATE */ +png_icc_check_header(png_const_structrp png_ptr, png_colorspacerp colorspace, + png_const_charp name, png_uint_32 profile_length, + png_const_bytep profile/* first 132 bytes only */, int color_type) +{ + png_uint_32 temp; + + /* Length check; this cannot be ignored in this code because profile_length + * is used later to check the tag table, so even if the profile seems over + * long profile_length from the caller must be correct. The caller can fix + * this up on read or write by just passing in the profile header length. + */ + temp = png_get_uint_32(profile); + if (temp != profile_length) + return png_icc_profile_error(png_ptr, colorspace, name, temp, + "length does not match profile"); + + temp = png_get_uint_32(profile+128); /* tag count: 12 bytes/tag */ + if (temp > 357913930 || /* (2^32-4-132)/12: maximum possible tag count */ + profile_length < 132+12*temp) /* truncated tag table */ + return png_icc_profile_error(png_ptr, colorspace, name, temp, + "tag count too large"); + + /* The 'intent' must be valid or we can't store it, ICC limits the intent to + * 16 bits. + */ + temp = png_get_uint_32(profile+64); + if (temp >= 0xffff) /* The ICC limit */ + return png_icc_profile_error(png_ptr, colorspace, name, temp, + "invalid rendering intent"); + + /* This is just a warning because the profile may be valid in future + * versions. + */ + if (temp >= PNG_sRGB_INTENT_LAST) + (void)png_icc_profile_error(png_ptr, NULL, name, temp, + "intent outside defined range"); + + /* At this point the tag table can't be checked because it hasn't necessarily + * been loaded; however, various header fields can be checked. These checks + * are for values permitted by the PNG spec in an ICC profile; the PNG spec + * restricts the profiles that can be passed in an iCCP chunk (they must be + * appropriate to processing PNG data!) + */ + + /* Data checks (could be skipped). These checks must be independent of the + * version number; however, the version number doesn't accomodate changes in + * the header fields (just the known tags and the interpretation of the + * data.) + */ + temp = png_get_uint_32(profile+36); /* signature 'ascp' */ + if (temp != 0x61637370) + return png_icc_profile_error(png_ptr, colorspace, name, temp, + "invalid signature"); + + /* Currently the PCS illuminant/adopted white point (the computational + * white point) are required to be D50, + * however the profile contains a record of the illuminant so perhaps ICC + * expects to be able to change this in the future (despite the rationale in + * the introduction for using a fixed PCS adopted white.) Consequently the + * following is just a warning. + */ + if (memcmp(profile+68, D50_nCIEXYZ, 12) != 0) + (void)png_icc_profile_error(png_ptr, NULL, name, 0/*no tag value*/, + "PCS illuminant is not D50"); + + /* The PNG spec requires this: + * "If the iCCP chunk is present, the image samples conform to the colour + * space represented by the embedded ICC profile as defined by the + * International Color Consortium [ICC]. The colour space of the ICC profile + * shall be an RGB colour space for colour images (PNG colour types 2, 3, and + * 6), or a greyscale colour space for greyscale images (PNG colour types 0 + * and 4)." + * + * This checking code ensures the embedded profile (on either read or write) + * conforms to the specification requirements. Notice that an ICC 'gray' + * color-space profile contains the information to transform the monochrome + * data to XYZ or L*a*b (according to which PCS the profile uses) and this + * should be used in preference to the standard libpng K channel replication + * into R, G and B channels. + * + * Previously it was suggested that an RGB profile on grayscale data could be + * handled. However it it is clear that using an RGB profile in this context + * must be an error - there is no specification of what it means. Thus it is + * almost certainly more correct to ignore the profile. + */ + temp = png_get_uint_32(profile+16); /* data colour space field */ + switch (temp) + { + case 0x52474220: /* 'RGB ' */ + if (!(color_type & PNG_COLOR_MASK_COLOR)) + return png_icc_profile_error(png_ptr, colorspace, name, temp, + "RGB color space not permitted on grayscale PNG"); + break; + + case 0x47524159: /* 'GRAY' */ + if (color_type & PNG_COLOR_MASK_COLOR) + return png_icc_profile_error(png_ptr, colorspace, name, temp, + "Gray color space not permitted on RGB PNG"); + break; + + default: + return png_icc_profile_error(png_ptr, colorspace, name, temp, + "invalid ICC profile color space"); + } + + /* It is up to the application to check that the profile class matches the + * application requirements; the spec provides no guidance, but it's pretty + * weird if the profile is not scanner ('scnr'), monitor ('mntr'), printer + * ('prtr') or 'spac' (for generic color spaces). Issue a warning in these + * cases. Issue an error for device link or abstract profiles - these don't + * contain the records necessary to transform the color-space to anything + * other than the target device (and not even that for an abstract profile). + * Profiles of these classes may not be embedded in images. + */ + temp = png_get_uint_32(profile+12); /* profile/device class */ + switch (temp) + { + case 0x73636E72: /* 'scnr' */ + case 0x6D6E7472: /* 'mntr' */ + case 0x70727472: /* 'prtr' */ + case 0x73706163: /* 'spac' */ + /* All supported */ + break; + + case 0x61627374: /* 'abst' */ + /* May not be embedded in an image */ + return png_icc_profile_error(png_ptr, colorspace, name, temp, + "invalid embedded Abstract ICC profile"); + + case 0x6C696E6B: /* 'link' */ + /* DeviceLink profiles cannnot be interpreted in a non-device specific + * fashion, if an app uses the AToB0Tag in the profile the results are + * undefined unless the result is sent to the intended device, + * therefore a DeviceLink profile should not be found embedded in a + * PNG. + */ + return png_icc_profile_error(png_ptr, colorspace, name, temp, + "unexpected DeviceLink ICC profile class"); + + case 0x6E6D636C: /* 'nmcl' */ + /* A NamedColor profile is also device specific, however it doesn't + * contain an AToB0 tag that is open to misintrepretation. Almost + * certainly it will fail the tests below. + */ + (void)png_icc_profile_error(png_ptr, NULL, name, temp, + "unexpected NamedColor ICC profile class"); + break; + + default: + /* To allow for future enhancements to the profile accept unrecognized + * profile classes with a warning, these then hit the test below on the + * tag content to ensure they are backward compatible with one of the + * understood profiles. + */ + (void)png_icc_profile_error(png_ptr, NULL, name, temp, + "unrecognized ICC profile class"); + break; + } + + /* For any profile other than a device link one the PCS must be encoded + * either in XYZ or Lab. + */ + temp = png_get_uint_32(profile+20); + switch (temp) + { + case 0x58595A20: /* 'XYZ ' */ + case 0x4C616220: /* 'Lab ' */ + break; + + default: + return png_icc_profile_error(png_ptr, colorspace, name, temp, + "unexpected ICC PCS encoding"); + } + + return 1; +} + +int /* PRIVATE */ +png_icc_check_tag_table(png_const_structrp png_ptr, png_colorspacerp colorspace, + png_const_charp name, png_uint_32 profile_length, + png_const_bytep profile /* header plus whole tag table */) +{ + png_uint_32 tag_count = png_get_uint_32(profile+128); + png_uint_32 itag; + png_const_bytep tag = profile+132; /* The first tag */ + + /* First scan all the tags in the table and add bits to the icc_info value + * (temporarily in 'tags'). + */ + for (itag=0; itag < tag_count; ++itag, tag += 12) + { + png_uint_32 tag_id = png_get_uint_32(tag+0); + png_uint_32 tag_start = png_get_uint_32(tag+4); /* must be aligned */ + png_uint_32 tag_length = png_get_uint_32(tag+8);/* not padded */ + + /* The ICC specification does not exclude zero length tags, therefore the + * start might actually be anywhere if there is no data, but this would be + * a clear abuse of the intent of the standard so the start is checked for + * being in range. All defined tag types have an 8 byte header - a 4 byte + * type signature then 0. + */ + if ((tag_start & 3) != 0) + { + /* CNHP730S.icc shipped with Microsoft Windows 64 violates this, it is + * only a warning here because libpng does not care about the + * alignment. + */ + (void)png_icc_profile_error(png_ptr, NULL, name, tag_id, + "ICC profile tag start not a multiple of 4"); + } + + /* This is a hard error; potentially it can cause read outside the + * profile. + */ + if (tag_start > profile_length || tag_length > profile_length - tag_start) + return png_icc_profile_error(png_ptr, colorspace, name, tag_id, + "ICC profile tag outside profile"); + } + + return 1; /* success, maybe with warnings */ +} + +#ifdef PNG_sRGB_SUPPORTED +/* Information about the known ICC sRGB profiles */ +static const struct +{ + png_uint_32 adler, crc, length; + png_uint_32 md5[4]; + png_byte have_md5; + png_byte is_broken; + png_uint_16 intent; + +# define PNG_MD5(a,b,c,d) { a, b, c, d }, (a!=0)||(b!=0)||(c!=0)||(d!=0) +# define PNG_ICC_CHECKSUM(adler, crc, md5, intent, broke, date, length, fname)\ + { adler, crc, length, md5, broke, intent }, + +} png_sRGB_checks[] = +{ + /* This data comes from contrib/tools/checksum-icc run on downloads of + * all four ICC sRGB profiles from www.color.org. + */ + /* adler32, crc32, MD5[4], intent, date, length, file-name */ + PNG_ICC_CHECKSUM(0x0a3fd9f6, 0x3b8772b9, + PNG_MD5(0x29f83dde, 0xaff255ae, 0x7842fae4, 0xca83390d), 0, 0, + "2009/03/27 21:36:31", 3048, "sRGB_IEC61966-2-1_black_scaled.icc") + + /* ICC sRGB v2 perceptual no black-compensation: */ + PNG_ICC_CHECKSUM(0x4909e5e1, 0x427ebb21, + PNG_MD5(0xc95bd637, 0xe95d8a3b, 0x0df38f99, 0xc1320389), 1, 0, + "2009/03/27 21:37:45", 3052, "sRGB_IEC61966-2-1_no_black_scaling.icc") + + PNG_ICC_CHECKSUM(0xfd2144a1, 0x306fd8ae, + PNG_MD5(0xfc663378, 0x37e2886b, 0xfd72e983, 0x8228f1b8), 0, 0, + "2009/08/10 17:28:01", 60988, "sRGB_v4_ICC_preference_displayclass.icc") + + /* ICC sRGB v4 perceptual */ + PNG_ICC_CHECKSUM(0x209c35d2, 0xbbef7812, + PNG_MD5(0x34562abf, 0x994ccd06, 0x6d2c5721, 0xd0d68c5d), 0, 0, + "2007/07/25 00:05:37", 60960, "sRGB_v4_ICC_preference.icc") + + /* The following profiles have no known MD5 checksum. If there is a match + * on the (empty) MD5 the other fields are used to attempt a match and + * a warning is produced. The first two of these profiles have a 'cprt' tag + * which suggests that they were also made by Hewlett Packard. + */ + PNG_ICC_CHECKSUM(0xa054d762, 0x5d5129ce, + PNG_MD5(0x00000000, 0x00000000, 0x00000000, 0x00000000), 1, 0, + "2004/07/21 18:57:42", 3024, "sRGB_IEC61966-2-1_noBPC.icc") + + /* This is a 'mntr' (display) profile with a mediaWhitePointTag that does not + * match the D50 PCS illuminant in the header (it is in fact the D65 values, + * so the white point is recorded as the un-adapted value.) The profiles + * below only differ in one byte - the intent - and are basically the same as + * the previous profile except for the mediaWhitePointTag error and a missing + * chromaticAdaptationTag. + */ + PNG_ICC_CHECKSUM(0xf784f3fb, 0x182ea552, + PNG_MD5(0x00000000, 0x00000000, 0x00000000, 0x00000000), 0, 1/*broken*/, + "1998/02/09 06:49:00", 3144, "HP-Microsoft sRGB v2 perceptual") + + PNG_ICC_CHECKSUM(0x0398f3fc, 0xf29e526d, + PNG_MD5(0x00000000, 0x00000000, 0x00000000, 0x00000000), 1, 1/*broken*/, + "1998/02/09 06:49:00", 3144, "HP-Microsoft sRGB v2 media-relative") +}; + +static int +png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr, + png_const_bytep profile, uLong adler) +{ + /* The quick check is to verify just the MD5 signature and trust the + * rest of the data. Because the profile has already been verified for + * correctness this is safe. png_colorspace_set_sRGB will check the 'intent' + * field too, so if the profile has been edited with an intent not defined + * by sRGB (but maybe defined by a later ICC specification) the read of + * the profile will fail at that point. + */ + png_uint_32 length = 0; + png_uint_32 intent = 0x10000; /* invalid */ +#if PNG_sRGB_PROFILE_CHECKS > 1 + uLong crc = 0; /* the value for 0 length data */ +#endif + unsigned int i; + + for (i=0; i < (sizeof png_sRGB_checks) / (sizeof png_sRGB_checks[0]); ++i) + { + if (png_get_uint_32(profile+84) == png_sRGB_checks[i].md5[0] && + png_get_uint_32(profile+88) == png_sRGB_checks[i].md5[1] && + png_get_uint_32(profile+92) == png_sRGB_checks[i].md5[2] && + png_get_uint_32(profile+96) == png_sRGB_checks[i].md5[3]) + { + /* This may be one of the old HP profiles without an MD5, in that + * case we can only use the length and Adler32 (note that these + * are not used by default if there is an MD5!) + */ +# if PNG_sRGB_PROFILE_CHECKS == 0 + if (png_sRGB_checks[i].have_md5) + return 1+png_sRGB_checks[i].is_broken; +# endif + + /* Profile is unsigned or more checks have been configured in. */ + if (length == 0) + { + length = png_get_uint_32(profile); + intent = png_get_uint_32(profile+64); + } + + /* Length *and* intent must match */ + if (length == png_sRGB_checks[i].length && + intent == png_sRGB_checks[i].intent) + { + /* Now calculate the adler32 if not done already. */ + if (adler == 0) + { + adler = adler32(0, NULL, 0); + adler = adler32(adler, profile, length); + } + + if (adler == png_sRGB_checks[i].adler) + { + /* These basic checks suggest that the data has not been + * modified, but if the check level is more than 1 perform + * our own crc32 checksum on the data. + */ +# if PNG_sRGB_PROFILE_CHECKS > 1 + if (crc == 0) + { + crc = crc32(0, NULL, 0); + crc = crc32(crc, profile, length); + } + + /* So this check must pass for the 'return' below to happen. + */ + if (crc == png_sRGB_checks[i].crc) +# endif + { + if (png_sRGB_checks[i].is_broken) + { + /* These profiles are known to have bad data that may cause + * problems if they are used, therefore attempt to + * discourage their use, skip the 'have_md5' warning below, + * which is made irrelevant by this error. + */ + png_chunk_report(png_ptr, "known incorrect sRGB profile", + PNG_CHUNK_ERROR); + } + + /* Warn that this being done; this isn't even an error since + * the profile is perfectly valid, but it would be nice if + * people used the up-to-date ones. + */ + else if (!png_sRGB_checks[i].have_md5) + { + png_chunk_report(png_ptr, + "out-of-date sRGB profile with no signature", + PNG_CHUNK_WARNING); + } + + return 1+png_sRGB_checks[i].is_broken; + } + } + } + +# if PNG_sRGB_PROFILE_CHECKS > 0 + /* The signature matched, but the profile had been changed in some + * way. This is an apparent violation of the ICC terms of use and, + * anyway, probably indicates a data error or uninformed hacking. + */ + if (png_sRGB_checks[i].have_md5) + png_benign_error(png_ptr, + "copyright violation: edited ICC profile ignored"); +# endif + } + } + + return 0; /* no match */ +} +#endif + +#ifdef PNG_sRGB_SUPPORTED +void /* PRIVATE */ +png_icc_set_sRGB(png_const_structrp png_ptr, + png_colorspacerp colorspace, png_const_bytep profile, uLong adler) +{ + /* Is this profile one of the known ICC sRGB profiles? If it is, just set + * the sRGB information. + */ + if (png_compare_ICC_profile_with_sRGB(png_ptr, profile, adler)) + (void)png_colorspace_set_sRGB(png_ptr, colorspace, + (int)/*already checked*/png_get_uint_32(profile+64)); +} +#endif /* PNG_READ_sRGB_SUPPORTED */ + +int /* PRIVATE */ +png_colorspace_set_ICC(png_const_structrp png_ptr, png_colorspacerp colorspace, + png_const_charp name, png_uint_32 profile_length, png_const_bytep profile, + int color_type) +{ + if (colorspace->flags & PNG_COLORSPACE_INVALID) + return 0; + + if (png_icc_check_length(png_ptr, colorspace, name, profile_length) && + png_icc_check_header(png_ptr, colorspace, name, profile_length, profile, + color_type) && + png_icc_check_tag_table(png_ptr, colorspace, name, profile_length, + profile)) + { +# ifdef PNG_sRGB_SUPPORTED + /* If no sRGB support, don't try storing sRGB information */ + png_icc_set_sRGB(png_ptr, colorspace, profile, 0); +# endif + return 1; + } + + /* Failure case */ + return 0; +} +#endif /* iCCP */ + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +void /* PRIVATE */ +png_colorspace_set_rgb_coefficients(png_structrp png_ptr) +{ + /* Set the rgb_to_gray coefficients from the colorspace. */ + if (!png_ptr->rgb_to_gray_coefficients_set && + (png_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS) != 0) + { + /* png_set_background has not been called, get the coefficients from the Y + * values of the colorspace colorants. + */ + png_fixed_point r = png_ptr->colorspace.end_points_XYZ.red_Y; + png_fixed_point g = png_ptr->colorspace.end_points_XYZ.green_Y; + png_fixed_point b = png_ptr->colorspace.end_points_XYZ.blue_Y; + png_fixed_point total = r+g+b; + + if (total > 0 && + r >= 0 && png_muldiv(&r, r, 32768, total) && r >= 0 && r <= 32768 && + g >= 0 && png_muldiv(&g, g, 32768, total) && g >= 0 && g <= 32768 && + b >= 0 && png_muldiv(&b, b, 32768, total) && b >= 0 && b <= 32768 && + r+g+b <= 32769) + { + /* We allow 0 coefficients here. r+g+b may be 32769 if two or + * all of the coefficients were rounded up. Handle this by + * reducing the *largest* coefficient by 1; this matches the + * approach used for the default coefficients in pngrtran.c + */ + int add = 0; + + if (r+g+b > 32768) + add = -1; + else if (r+g+b < 32768) + add = 1; + + if (add != 0) + { + if (g >= r && g >= b) + g += add; + else if (r >= g && r >= b) + r += add; + else + b += add; + } + + /* Check for an internal error. */ + if (r+g+b != 32768) + png_error(png_ptr, + "internal error handling cHRM coefficients"); + + else + { + png_ptr->rgb_to_gray_red_coeff = (png_uint_16)r; + png_ptr->rgb_to_gray_green_coeff = (png_uint_16)g; + } + } + + /* This is a png_error at present even though it could be ignored - + * it should never happen, but it is important that if it does, the + * bug is fixed. + */ + else + png_error(png_ptr, "internal error handling cHRM->XYZ"); + } +} +#endif + +#endif /* COLORSPACE */ + +void /* PRIVATE */ +png_check_IHDR(png_const_structrp png_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type) +{ + int error = 0; + + /* Check for width and height valid values */ + if (width == 0) + { + png_warning(png_ptr, "Image width is zero in IHDR"); + error = 1; + } + + if (height == 0) + { + png_warning(png_ptr, "Image height is zero in IHDR"); + error = 1; + } + +# ifdef PNG_SET_USER_LIMITS_SUPPORTED + if (width > png_ptr->user_width_max) + +# else + if (width > PNG_USER_WIDTH_MAX) +# endif + { + png_warning(png_ptr, "Image width exceeds user limit in IHDR"); + error = 1; + } + +# ifdef PNG_SET_USER_LIMITS_SUPPORTED + if (height > png_ptr->user_height_max) +# else + if (height > PNG_USER_HEIGHT_MAX) +# endif + { + png_warning(png_ptr, "Image height exceeds user limit in IHDR"); + error = 1; + } + + if (width > PNG_UINT_31_MAX) + { + png_warning(png_ptr, "Invalid image width in IHDR"); + error = 1; + } + + if (height > PNG_UINT_31_MAX) + { + png_warning(png_ptr, "Invalid image height in IHDR"); + error = 1; + } + + if (width > (PNG_UINT_32_MAX + >> 3) /* 8-byte RGBA pixels */ + - 48 /* bigrowbuf hack */ + - 1 /* filter byte */ + - 7*8 /* rounding of width to multiple of 8 pixels */ + - 8) /* extra max_pixel_depth pad */ + png_warning(png_ptr, "Width is too large for libpng to process pixels"); + + /* Check other values */ + if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 && + bit_depth != 8 && bit_depth != 16) + { + png_warning(png_ptr, "Invalid bit depth in IHDR"); + error = 1; + } + + if (color_type < 0 || color_type == 1 || + color_type == 5 || color_type > 6) + { + png_warning(png_ptr, "Invalid color type in IHDR"); + error = 1; + } + + if (((color_type == PNG_COLOR_TYPE_PALETTE) && bit_depth > 8) || + ((color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) && bit_depth < 8)) + { + png_warning(png_ptr, "Invalid color type/bit depth combination in IHDR"); + error = 1; + } + + if (interlace_type >= PNG_INTERLACE_LAST) + { + png_warning(png_ptr, "Unknown interlace method in IHDR"); + error = 1; + } + + if (compression_type != PNG_COMPRESSION_TYPE_BASE) + { + png_warning(png_ptr, "Unknown compression method in IHDR"); + error = 1; + } + +# ifdef PNG_MNG_FEATURES_SUPPORTED + /* Accept filter_method 64 (intrapixel differencing) only if + * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and + * 2. Libpng did not read a PNG signature (this filter_method is only + * used in PNG datastreams that are embedded in MNG datastreams) and + * 3. The application called png_permit_mng_features with a mask that + * included PNG_FLAG_MNG_FILTER_64 and + * 4. The filter_method is 64 and + * 5. The color_type is RGB or RGBA + */ + if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) && + png_ptr->mng_features_permitted) + png_warning(png_ptr, "MNG features are not allowed in a PNG datastream"); + + if (filter_type != PNG_FILTER_TYPE_BASE) + { + if (!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + (filter_type == PNG_INTRAPIXEL_DIFFERENCING) && + ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0) && + (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA))) + { + png_warning(png_ptr, "Unknown filter method in IHDR"); + error = 1; + } + + if (png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) + { + png_warning(png_ptr, "Invalid filter method in IHDR"); + error = 1; + } + } + +# else + if (filter_type != PNG_FILTER_TYPE_BASE) + { + png_warning(png_ptr, "Unknown filter method in IHDR"); + error = 1; + } +# endif + + if (error == 1) + png_error(png_ptr, "Invalid IHDR data"); +} + +#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED) +/* ASCII to fp functions */ +/* Check an ASCII formated floating point value, see the more detailed + * comments in pngpriv.h + */ +/* The following is used internally to preserve the sticky flags */ +#define png_fp_add(state, flags) ((state) |= (flags)) +#define png_fp_set(state, value) ((state) = (value) | ((state) & PNG_FP_STICKY)) + +int /* PRIVATE */ +png_check_fp_number(png_const_charp string, png_size_t size, int *statep, + png_size_tp whereami) +{ + int state = *statep; + png_size_t i = *whereami; + + while (i < size) + { + int type; + /* First find the type of the next character */ + switch (string[i]) + { + case 43: type = PNG_FP_SAW_SIGN; break; + case 45: type = PNG_FP_SAW_SIGN + PNG_FP_NEGATIVE; break; + case 46: type = PNG_FP_SAW_DOT; break; + case 48: type = PNG_FP_SAW_DIGIT; break; + case 49: case 50: case 51: case 52: + case 53: case 54: case 55: case 56: + case 57: type = PNG_FP_SAW_DIGIT + PNG_FP_NONZERO; break; + case 69: + case 101: type = PNG_FP_SAW_E; break; + default: goto PNG_FP_End; + } + + /* Now deal with this type according to the current + * state, the type is arranged to not overlap the + * bits of the PNG_FP_STATE. + */ + switch ((state & PNG_FP_STATE) + (type & PNG_FP_SAW_ANY)) + { + case PNG_FP_INTEGER + PNG_FP_SAW_SIGN: + if (state & PNG_FP_SAW_ANY) + goto PNG_FP_End; /* not a part of the number */ + + png_fp_add(state, type); + break; + + case PNG_FP_INTEGER + PNG_FP_SAW_DOT: + /* Ok as trailer, ok as lead of fraction. */ + if (state & PNG_FP_SAW_DOT) /* two dots */ + goto PNG_FP_End; + + else if (state & PNG_FP_SAW_DIGIT) /* trailing dot? */ + png_fp_add(state, type); + + else + png_fp_set(state, PNG_FP_FRACTION | type); + + break; + + case PNG_FP_INTEGER + PNG_FP_SAW_DIGIT: + if (state & PNG_FP_SAW_DOT) /* delayed fraction */ + png_fp_set(state, PNG_FP_FRACTION | PNG_FP_SAW_DOT); + + png_fp_add(state, type | PNG_FP_WAS_VALID); + + break; + + case PNG_FP_INTEGER + PNG_FP_SAW_E: + if ((state & PNG_FP_SAW_DIGIT) == 0) + goto PNG_FP_End; + + png_fp_set(state, PNG_FP_EXPONENT); + + break; + + /* case PNG_FP_FRACTION + PNG_FP_SAW_SIGN: + goto PNG_FP_End; ** no sign in fraction */ + + /* case PNG_FP_FRACTION + PNG_FP_SAW_DOT: + goto PNG_FP_End; ** Because SAW_DOT is always set */ + + case PNG_FP_FRACTION + PNG_FP_SAW_DIGIT: + png_fp_add(state, type | PNG_FP_WAS_VALID); + break; + + case PNG_FP_FRACTION + PNG_FP_SAW_E: + /* This is correct because the trailing '.' on an + * integer is handled above - so we can only get here + * with the sequence ".E" (with no preceding digits). + */ + if ((state & PNG_FP_SAW_DIGIT) == 0) + goto PNG_FP_End; + + png_fp_set(state, PNG_FP_EXPONENT); + + break; + + case PNG_FP_EXPONENT + PNG_FP_SAW_SIGN: + if (state & PNG_FP_SAW_ANY) + goto PNG_FP_End; /* not a part of the number */ + + png_fp_add(state, PNG_FP_SAW_SIGN); + + break; + + /* case PNG_FP_EXPONENT + PNG_FP_SAW_DOT: + goto PNG_FP_End; */ + + case PNG_FP_EXPONENT + PNG_FP_SAW_DIGIT: + png_fp_add(state, PNG_FP_SAW_DIGIT | PNG_FP_WAS_VALID); + + break; + + /* case PNG_FP_EXPONEXT + PNG_FP_SAW_E: + goto PNG_FP_End; */ + + default: goto PNG_FP_End; /* I.e. break 2 */ + } + + /* The character seems ok, continue. */ + ++i; + } + +PNG_FP_End: + /* Here at the end, update the state and return the correct + * return code. + */ + *statep = state; + *whereami = i; + + return (state & PNG_FP_SAW_DIGIT) != 0; +} + + +/* The same but for a complete string. */ +int +png_check_fp_string(png_const_charp string, png_size_t size) +{ + int state=0; + png_size_t char_index=0; + + if (png_check_fp_number(string, size, &state, &char_index) && + (char_index == size || string[char_index] == 0)) + return state /* must be non-zero - see above */; + + return 0; /* i.e. fail */ +} +#endif /* pCAL or sCAL */ + +#ifdef PNG_sCAL_SUPPORTED +# ifdef PNG_FLOATING_POINT_SUPPORTED +/* Utility used below - a simple accurate power of ten from an integral + * exponent. + */ +static double +png_pow10(int power) +{ + int recip = 0; + double d = 1; + + /* Handle negative exponent with a reciprocal at the end because + * 10 is exact whereas .1 is inexact in base 2 + */ + if (power < 0) + { + if (power < DBL_MIN_10_EXP) return 0; + recip = 1, power = -power; + } + + if (power > 0) + { + /* Decompose power bitwise. */ + double mult = 10; + do + { + if (power & 1) d *= mult; + mult *= mult; + power >>= 1; + } + while (power > 0); + + if (recip) d = 1/d; + } + /* else power is 0 and d is 1 */ + + return d; +} + +/* Function to format a floating point value in ASCII with a given + * precision. + */ +void /* PRIVATE */ +png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size, + double fp, unsigned int precision) +{ + /* We use standard functions from math.h, but not printf because + * that would require stdio. The caller must supply a buffer of + * sufficient size or we will png_error. The tests on size and + * the space in ascii[] consumed are indicated below. + */ + if (precision < 1) + precision = DBL_DIG; + + /* Enforce the limit of the implementation precision too. */ + if (precision > DBL_DIG+1) + precision = DBL_DIG+1; + + /* Basic sanity checks */ + if (size >= precision+5) /* See the requirements below. */ + { + if (fp < 0) + { + fp = -fp; + *ascii++ = 45; /* '-' PLUS 1 TOTAL 1 */ + --size; + } + + if (fp >= DBL_MIN && fp <= DBL_MAX) + { + int exp_b10; /* A base 10 exponent */ + double base; /* 10^exp_b10 */ + + /* First extract a base 10 exponent of the number, + * the calculation below rounds down when converting + * from base 2 to base 10 (multiply by log10(2) - + * 0.3010, but 77/256 is 0.3008, so exp_b10 needs to + * be increased. Note that the arithmetic shift + * performs a floor() unlike C arithmetic - using a + * C multiply would break the following for negative + * exponents. + */ + (void)frexp(fp, &exp_b10); /* exponent to base 2 */ + + exp_b10 = (exp_b10 * 77) >> 8; /* <= exponent to base 10 */ + + /* Avoid underflow here. */ + base = png_pow10(exp_b10); /* May underflow */ + + while (base < DBL_MIN || base < fp) + { + /* And this may overflow. */ + double test = png_pow10(exp_b10+1); + + if (test <= DBL_MAX) + ++exp_b10, base = test; + + else + break; + } + + /* Normalize fp and correct exp_b10, after this fp is in the + * range [.1,1) and exp_b10 is both the exponent and the digit + * *before* which the decimal point should be inserted + * (starting with 0 for the first digit). Note that this + * works even if 10^exp_b10 is out of range because of the + * test on DBL_MAX above. + */ + fp /= base; + while (fp >= 1) fp /= 10, ++exp_b10; + + /* Because of the code above fp may, at this point, be + * less than .1, this is ok because the code below can + * handle the leading zeros this generates, so no attempt + * is made to correct that here. + */ + + { + int czero, clead, cdigits; + char exponent[10]; + + /* Allow up to two leading zeros - this will not lengthen + * the number compared to using E-n. + */ + if (exp_b10 < 0 && exp_b10 > -3) /* PLUS 3 TOTAL 4 */ + { + czero = -exp_b10; /* PLUS 2 digits: TOTAL 3 */ + exp_b10 = 0; /* Dot added below before first output. */ + } + else + czero = 0; /* No zeros to add */ + + /* Generate the digit list, stripping trailing zeros and + * inserting a '.' before a digit if the exponent is 0. + */ + clead = czero; /* Count of leading zeros */ + cdigits = 0; /* Count of digits in list. */ + + do + { + double d; + + fp *= 10; + /* Use modf here, not floor and subtract, so that + * the separation is done in one step. At the end + * of the loop don't break the number into parts so + * that the final digit is rounded. + */ + if (cdigits+czero-clead+1 < (int)precision) + fp = modf(fp, &d); + + else + { + d = floor(fp + .5); + + if (d > 9) + { + /* Rounding up to 10, handle that here. */ + if (czero > 0) + { + --czero, d = 1; + if (cdigits == 0) --clead; + } + else + { + while (cdigits > 0 && d > 9) + { + int ch = *--ascii; + + if (exp_b10 != (-1)) + ++exp_b10; + + else if (ch == 46) + { + ch = *--ascii, ++size; + /* Advance exp_b10 to '1', so that the + * decimal point happens after the + * previous digit. + */ + exp_b10 = 1; + } + + --cdigits; + d = ch - 47; /* I.e. 1+(ch-48) */ + } + + /* Did we reach the beginning? If so adjust the + * exponent but take into account the leading + * decimal point. + */ + if (d > 9) /* cdigits == 0 */ + { + if (exp_b10 == (-1)) + { + /* Leading decimal point (plus zeros?), if + * we lose the decimal point here it must + * be reentered below. + */ + int ch = *--ascii; + + if (ch == 46) + ++size, exp_b10 = 1; + + /* Else lost a leading zero, so 'exp_b10' is + * still ok at (-1) + */ + } + else + ++exp_b10; + + /* In all cases we output a '1' */ + d = 1; + } + } + } + fp = 0; /* Guarantees termination below. */ + } + + if (d == 0) + { + ++czero; + if (cdigits == 0) ++clead; + } + else + { + /* Included embedded zeros in the digit count. */ + cdigits += czero - clead; + clead = 0; + + while (czero > 0) + { + /* exp_b10 == (-1) means we just output the decimal + * place - after the DP don't adjust 'exp_b10' any + * more! + */ + if (exp_b10 != (-1)) + { + if (exp_b10 == 0) *ascii++ = 46, --size; + /* PLUS 1: TOTAL 4 */ + --exp_b10; + } + *ascii++ = 48, --czero; + } + + if (exp_b10 != (-1)) + { + if (exp_b10 == 0) *ascii++ = 46, --size; /* counted + above */ + --exp_b10; + } + *ascii++ = (char)(48 + (int)d), ++cdigits; + } + } + while (cdigits+czero-clead < (int)precision && fp > DBL_MIN); + + /* The total output count (max) is now 4+precision */ + + /* Check for an exponent, if we don't need one we are + * done and just need to terminate the string. At + * this point exp_b10==(-1) is effectively if flag - it got + * to '-1' because of the decrement after outputing + * the decimal point above (the exponent required is + * *not* -1!) + */ + if (exp_b10 >= (-1) && exp_b10 <= 2) + { + /* The following only happens if we didn't output the + * leading zeros above for negative exponent, so this + * doest add to the digit requirement. Note that the + * two zeros here can only be output if the two leading + * zeros were *not* output, so this doesn't increase + * the output count. + */ + while (--exp_b10 >= 0) *ascii++ = 48; + + *ascii = 0; + + /* Total buffer requirement (including the '\0') is + * 5+precision - see check at the start. + */ + return; + } + + /* Here if an exponent is required, adjust size for + * the digits we output but did not count. The total + * digit output here so far is at most 1+precision - no + * decimal point and no leading or trailing zeros have + * been output. + */ + size -= cdigits; + + *ascii++ = 69, --size; /* 'E': PLUS 1 TOTAL 2+precision */ + + /* The following use of an unsigned temporary avoids ambiguities in + * the signed arithmetic on exp_b10 and permits GCC at least to do + * better optimization. + */ + { + unsigned int uexp_b10; + + if (exp_b10 < 0) + { + *ascii++ = 45, --size; /* '-': PLUS 1 TOTAL 3+precision */ + uexp_b10 = -exp_b10; + } + + else + uexp_b10 = exp_b10; + + cdigits = 0; + + while (uexp_b10 > 0) + { + exponent[cdigits++] = (char)(48 + uexp_b10 % 10); + uexp_b10 /= 10; + } + } + + /* Need another size check here for the exponent digits, so + * this need not be considered above. + */ + if ((int)size > cdigits) + { + while (cdigits > 0) *ascii++ = exponent[--cdigits]; + + *ascii = 0; + + return; + } + } + } + else if (!(fp >= DBL_MIN)) + { + *ascii++ = 48; /* '0' */ + *ascii = 0; + return; + } + else + { + *ascii++ = 105; /* 'i' */ + *ascii++ = 110; /* 'n' */ + *ascii++ = 102; /* 'f' */ + *ascii = 0; + return; + } + } + + /* Here on buffer too small. */ + png_error(png_ptr, "ASCII conversion buffer too small"); +} + +# endif /* FLOATING_POINT */ + +# ifdef PNG_FIXED_POINT_SUPPORTED +/* Function to format a fixed point value in ASCII. + */ +void /* PRIVATE */ +png_ascii_from_fixed(png_const_structrp png_ptr, png_charp ascii, + png_size_t size, png_fixed_point fp) +{ + /* Require space for 10 decimal digits, a decimal point, a minus sign and a + * trailing \0, 13 characters: + */ + if (size > 12) + { + png_uint_32 num; + + /* Avoid overflow here on the minimum integer. */ + if (fp < 0) + *ascii++ = 45, --size, num = -fp; + else + num = fp; + + if (num <= 0x80000000) /* else overflowed */ + { + unsigned int ndigits = 0, first = 16 /* flag value */; + char digits[10]; + + while (num) + { + /* Split the low digit off num: */ + unsigned int tmp = num/10; + num -= tmp*10; + digits[ndigits++] = (char)(48 + num); + /* Record the first non-zero digit, note that this is a number + * starting at 1, it's not actually the array index. + */ + if (first == 16 && num > 0) + first = ndigits; + num = tmp; + } + + if (ndigits > 0) + { + while (ndigits > 5) *ascii++ = digits[--ndigits]; + /* The remaining digits are fractional digits, ndigits is '5' or + * smaller at this point. It is certainly not zero. Check for a + * non-zero fractional digit: + */ + if (first <= 5) + { + unsigned int i; + *ascii++ = 46; /* decimal point */ + /* ndigits may be <5 for small numbers, output leading zeros + * then ndigits digits to first: + */ + i = 5; + while (ndigits < i) *ascii++ = 48, --i; + while (ndigits >= first) *ascii++ = digits[--ndigits]; + /* Don't output the trailing zeros! */ + } + } + else + *ascii++ = 48; + + /* And null terminate the string: */ + *ascii = 0; + return; + } + } + + /* Here on buffer too small. */ + png_error(png_ptr, "ASCII conversion buffer too small"); +} +# endif /* FIXED_POINT */ +#endif /* READ_SCAL */ + +#if defined(PNG_FLOATING_POINT_SUPPORTED) && \ + !defined(PNG_FIXED_POINT_MACRO_SUPPORTED) && \ + (defined(PNG_gAMA_SUPPORTED) || defined(PNG_cHRM_SUPPORTED) || \ + defined(PNG_sCAL_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)) || \ + (defined(PNG_sCAL_SUPPORTED) && \ + defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)) +png_fixed_point +png_fixed(png_const_structrp png_ptr, double fp, png_const_charp text) +{ + double r = floor(100000 * fp + .5); + + if (r > 2147483647. || r < -2147483648.) + png_fixed_error(png_ptr, text); + + return (png_fixed_point)r; +} +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || \ + defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG_READ_pHYs_SUPPORTED) +/* muldiv functions */ +/* This API takes signed arguments and rounds the result to the nearest + * integer (or, for a fixed point number - the standard argument - to + * the nearest .00001). Overflow and divide by zero are signalled in + * the result, a boolean - true on success, false on overflow. + */ +int +png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times, + png_int_32 divisor) +{ + /* Return a * times / divisor, rounded. */ + if (divisor != 0) + { + if (a == 0 || times == 0) + { + *res = 0; + return 1; + } + else + { +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = a; + r *= times; + r /= divisor; + r = floor(r+.5); + + /* A png_fixed_point is a 32-bit integer. */ + if (r <= 2147483647. && r >= -2147483648.) + { + *res = (png_fixed_point)r; + return 1; + } +#else + int negative = 0; + png_uint_32 A, T, D; + png_uint_32 s16, s32, s00; + + if (a < 0) + negative = 1, A = -a; + else + A = a; + + if (times < 0) + negative = !negative, T = -times; + else + T = times; + + if (divisor < 0) + negative = !negative, D = -divisor; + else + D = divisor; + + /* Following can't overflow because the arguments only + * have 31 bits each, however the result may be 32 bits. + */ + s16 = (A >> 16) * (T & 0xffff) + + (A & 0xffff) * (T >> 16); + /* Can't overflow because the a*times bit is only 30 + * bits at most. + */ + s32 = (A >> 16) * (T >> 16) + (s16 >> 16); + s00 = (A & 0xffff) * (T & 0xffff); + + s16 = (s16 & 0xffff) << 16; + s00 += s16; + + if (s00 < s16) + ++s32; /* carry */ + + if (s32 < D) /* else overflow */ + { + /* s32.s00 is now the 64-bit product, do a standard + * division, we know that s32 < D, so the maximum + * required shift is 31. + */ + int bitshift = 32; + png_fixed_point result = 0; /* NOTE: signed */ + + while (--bitshift >= 0) + { + png_uint_32 d32, d00; + + if (bitshift > 0) + d32 = D >> (32-bitshift), d00 = D << bitshift; + + else + d32 = 0, d00 = D; + + if (s32 > d32) + { + if (s00 < d00) --s32; /* carry */ + s32 -= d32, s00 -= d00, result += 1<= d00) + s32 = 0, s00 -= d00, result += 1<= (D >> 1)) + ++result; + + if (negative) + result = -result; + + /* Check for overflow. */ + if ((negative && result <= 0) || (!negative && result >= 0)) + { + *res = result; + return 1; + } + } +#endif + } + } + + return 0; +} +#endif /* READ_GAMMA || INCH_CONVERSIONS */ + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED) +/* The following is for when the caller doesn't much care about the + * result. + */ +png_fixed_point +png_muldiv_warn(png_const_structrp png_ptr, png_fixed_point a, png_int_32 times, + png_int_32 divisor) +{ + png_fixed_point result; + + if (png_muldiv(&result, a, times, divisor)) + return result; + + png_warning(png_ptr, "fixed point overflow ignored"); + return 0; +} +#endif + +#ifdef PNG_GAMMA_SUPPORTED /* more fixed point functions for gamma */ +/* Calculate a reciprocal, return 0 on div-by-zero or overflow. */ +png_fixed_point +png_reciprocal(png_fixed_point a) +{ +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = floor(1E10/a+.5); + + if (r <= 2147483647. && r >= -2147483648.) + return (png_fixed_point)r; +#else + png_fixed_point res; + + if (png_muldiv(&res, 100000, 100000, a)) + return res; +#endif + + return 0; /* error/overflow */ +} + +/* This is the shared test on whether a gamma value is 'significant' - whether + * it is worth doing gamma correction. + */ +int /* PRIVATE */ +png_gamma_significant(png_fixed_point gamma_val) +{ + return gamma_val < PNG_FP_1 - PNG_GAMMA_THRESHOLD_FIXED || + gamma_val > PNG_FP_1 + PNG_GAMMA_THRESHOLD_FIXED; +} +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* A local convenience routine. */ +static png_fixed_point +png_product2(png_fixed_point a, png_fixed_point b) +{ + /* The required result is 1/a * 1/b; the following preserves accuracy. */ +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = a * 1E-5; + r *= b; + r = floor(r+.5); + + if (r <= 2147483647. && r >= -2147483648.) + return (png_fixed_point)r; +#else + png_fixed_point res; + + if (png_muldiv(&res, a, b, 100000)) + return res; +#endif + + return 0; /* overflow */ +} + +/* The inverse of the above. */ +png_fixed_point +png_reciprocal2(png_fixed_point a, png_fixed_point b) +{ + /* The required result is 1/a * 1/b; the following preserves accuracy. */ +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = 1E15/a; + r /= b; + r = floor(r+.5); + + if (r <= 2147483647. && r >= -2147483648.) + return (png_fixed_point)r; +#else + /* This may overflow because the range of png_fixed_point isn't symmetric, + * but this API is only used for the product of file and screen gamma so it + * doesn't matter that the smallest number it can produce is 1/21474, not + * 1/100000 + */ + png_fixed_point res = png_product2(a, b); + + if (res != 0) + return png_reciprocal(res); +#endif + + return 0; /* overflow */ +} +#endif /* READ_GAMMA */ + +#ifdef PNG_READ_GAMMA_SUPPORTED /* gamma table code */ +#ifndef PNG_FLOATING_ARITHMETIC_SUPPORTED +/* Fixed point gamma. + * + * The code to calculate the tables used below can be found in the shell script + * contrib/tools/intgamma.sh + * + * To calculate gamma this code implements fast log() and exp() calls using only + * fixed point arithmetic. This code has sufficient precision for either 8-bit + * or 16-bit sample values. + * + * The tables used here were calculated using simple 'bc' programs, but C double + * precision floating point arithmetic would work fine. + * + * 8-bit log table + * This is a table of -log(value/255)/log(2) for 'value' in the range 128 to + * 255, so it's the base 2 logarithm of a normalized 8-bit floating point + * mantissa. The numbers are 32-bit fractions. + */ +static const png_uint_32 +png_8bit_l2[128] = +{ + 4270715492U, 4222494797U, 4174646467U, 4127164793U, 4080044201U, 4033279239U, + 3986864580U, 3940795015U, 3895065449U, 3849670902U, 3804606499U, 3759867474U, + 3715449162U, 3671346997U, 3627556511U, 3584073329U, 3540893168U, 3498011834U, + 3455425220U, 3413129301U, 3371120137U, 3329393864U, 3287946700U, 3246774933U, + 3205874930U, 3165243125U, 3124876025U, 3084770202U, 3044922296U, 3005329011U, + 2965987113U, 2926893432U, 2888044853U, 2849438323U, 2811070844U, 2772939474U, + 2735041326U, 2697373562U, 2659933400U, 2622718104U, 2585724991U, 2548951424U, + 2512394810U, 2476052606U, 2439922311U, 2404001468U, 2368287663U, 2332778523U, + 2297471715U, 2262364947U, 2227455964U, 2192742551U, 2158222529U, 2123893754U, + 2089754119U, 2055801552U, 2022034013U, 1988449497U, 1955046031U, 1921821672U, + 1888774511U, 1855902668U, 1823204291U, 1790677560U, 1758320682U, 1726131893U, + 1694109454U, 1662251657U, 1630556815U, 1599023271U, 1567649391U, 1536433567U, + 1505374214U, 1474469770U, 1443718700U, 1413119487U, 1382670639U, 1352370686U, + 1322218179U, 1292211689U, 1262349810U, 1232631153U, 1203054352U, 1173618059U, + 1144320946U, 1115161701U, 1086139034U, 1057251672U, 1028498358U, 999877854U, + 971388940U, 943030410U, 914801076U, 886699767U, 858725327U, 830876614U, + 803152505U, 775551890U, 748073672U, 720716771U, 693480120U, 666362667U, + 639363374U, 612481215U, 585715177U, 559064263U, 532527486U, 506103872U, + 479792461U, 453592303U, 427502463U, 401522014U, 375650043U, 349885648U, + 324227938U, 298676034U, 273229066U, 247886176U, 222646516U, 197509248U, + 172473545U, 147538590U, 122703574U, 97967701U, 73330182U, 48790236U, + 24347096U, 0U + +#if 0 + /* The following are the values for 16-bit tables - these work fine for the + * 8-bit conversions but produce very slightly larger errors in the 16-bit + * log (about 1.2 as opposed to 0.7 absolute error in the final value). To + * use these all the shifts below must be adjusted appropriately. + */ + 65166, 64430, 63700, 62976, 62257, 61543, 60835, 60132, 59434, 58741, 58054, + 57371, 56693, 56020, 55352, 54689, 54030, 53375, 52726, 52080, 51439, 50803, + 50170, 49542, 48918, 48298, 47682, 47070, 46462, 45858, 45257, 44661, 44068, + 43479, 42894, 42312, 41733, 41159, 40587, 40020, 39455, 38894, 38336, 37782, + 37230, 36682, 36137, 35595, 35057, 34521, 33988, 33459, 32932, 32408, 31887, + 31369, 30854, 30341, 29832, 29325, 28820, 28319, 27820, 27324, 26830, 26339, + 25850, 25364, 24880, 24399, 23920, 23444, 22970, 22499, 22029, 21562, 21098, + 20636, 20175, 19718, 19262, 18808, 18357, 17908, 17461, 17016, 16573, 16132, + 15694, 15257, 14822, 14390, 13959, 13530, 13103, 12678, 12255, 11834, 11415, + 10997, 10582, 10168, 9756, 9346, 8937, 8531, 8126, 7723, 7321, 6921, 6523, + 6127, 5732, 5339, 4947, 4557, 4169, 3782, 3397, 3014, 2632, 2251, 1872, 1495, + 1119, 744, 372 +#endif +}; + +static png_int_32 +png_log8bit(unsigned int x) +{ + unsigned int lg2 = 0; + /* Each time 'x' is multiplied by 2, 1 must be subtracted off the final log, + * because the log is actually negate that means adding 1. The final + * returned value thus has the range 0 (for 255 input) to 7.994 (for 1 + * input), return -1 for the overflow (log 0) case, - so the result is + * always at most 19 bits. + */ + if ((x &= 0xff) == 0) + return -1; + + if ((x & 0xf0) == 0) + lg2 = 4, x <<= 4; + + if ((x & 0xc0) == 0) + lg2 += 2, x <<= 2; + + if ((x & 0x80) == 0) + lg2 += 1, x <<= 1; + + /* result is at most 19 bits, so this cast is safe: */ + return (png_int_32)((lg2 << 16) + ((png_8bit_l2[x-128]+32768)>>16)); +} + +/* The above gives exact (to 16 binary places) log2 values for 8-bit images, + * for 16-bit images we use the most significant 8 bits of the 16-bit value to + * get an approximation then multiply the approximation by a correction factor + * determined by the remaining up to 8 bits. This requires an additional step + * in the 16-bit case. + * + * We want log2(value/65535), we have log2(v'/255), where: + * + * value = v' * 256 + v'' + * = v' * f + * + * So f is value/v', which is equal to (256+v''/v') since v' is in the range 128 + * to 255 and v'' is in the range 0 to 255 f will be in the range 256 to less + * than 258. The final factor also needs to correct for the fact that our 8-bit + * value is scaled by 255, whereas the 16-bit values must be scaled by 65535. + * + * This gives a final formula using a calculated value 'x' which is value/v' and + * scaling by 65536 to match the above table: + * + * log2(x/257) * 65536 + * + * Since these numbers are so close to '1' we can use simple linear + * interpolation between the two end values 256/257 (result -368.61) and 258/257 + * (result 367.179). The values used below are scaled by a further 64 to give + * 16-bit precision in the interpolation: + * + * Start (256): -23591 + * Zero (257): 0 + * End (258): 23499 + */ +static png_int_32 +png_log16bit(png_uint_32 x) +{ + unsigned int lg2 = 0; + + /* As above, but now the input has 16 bits. */ + if ((x &= 0xffff) == 0) + return -1; + + if ((x & 0xff00) == 0) + lg2 = 8, x <<= 8; + + if ((x & 0xf000) == 0) + lg2 += 4, x <<= 4; + + if ((x & 0xc000) == 0) + lg2 += 2, x <<= 2; + + if ((x & 0x8000) == 0) + lg2 += 1, x <<= 1; + + /* Calculate the base logarithm from the top 8 bits as a 28-bit fractional + * value. + */ + lg2 <<= 28; + lg2 += (png_8bit_l2[(x>>8)-128]+8) >> 4; + + /* Now we need to interpolate the factor, this requires a division by the top + * 8 bits. Do this with maximum precision. + */ + x = ((x << 16) + (x >> 9)) / (x >> 8); + + /* Since we divided by the top 8 bits of 'x' there will be a '1' at 1<<24, + * the value at 1<<16 (ignoring this) will be 0 or 1; this gives us exactly + * 16 bits to interpolate to get the low bits of the result. Round the + * answer. Note that the end point values are scaled by 64 to retain overall + * precision and that 'lg2' is current scaled by an extra 12 bits, so adjust + * the overall scaling by 6-12. Round at every step. + */ + x -= 1U << 24; + + if (x <= 65536U) /* <= '257' */ + lg2 += ((23591U * (65536U-x)) + (1U << (16+6-12-1))) >> (16+6-12); + + else + lg2 -= ((23499U * (x-65536U)) + (1U << (16+6-12-1))) >> (16+6-12); + + /* Safe, because the result can't have more than 20 bits: */ + return (png_int_32)((lg2 + 2048) >> 12); +} + +/* The 'exp()' case must invert the above, taking a 20-bit fixed point + * logarithmic value and returning a 16 or 8-bit number as appropriate. In + * each case only the low 16 bits are relevant - the fraction - since the + * integer bits (the top 4) simply determine a shift. + * + * The worst case is the 16-bit distinction between 65535 and 65534, this + * requires perhaps spurious accuracty in the decoding of the logarithm to + * distinguish log2(65535/65534.5) - 10^-5 or 17 bits. There is little chance + * of getting this accuracy in practice. + * + * To deal with this the following exp() function works out the exponent of the + * frational part of the logarithm by using an accurate 32-bit value from the + * top four fractional bits then multiplying in the remaining bits. + */ +static const png_uint_32 +png_32bit_exp[16] = +{ + /* NOTE: the first entry is deliberately set to the maximum 32-bit value. */ + 4294967295U, 4112874773U, 3938502376U, 3771522796U, 3611622603U, 3458501653U, + 3311872529U, 3171459999U, 3037000500U, 2908241642U, 2784941738U, 2666869345U, + 2553802834U, 2445529972U, 2341847524U, 2242560872U +}; + +/* Adjustment table; provided to explain the numbers in the code below. */ +#if 0 +for (i=11;i>=0;--i){ print i, " ", (1 - e(-(2^i)/65536*l(2))) * 2^(32-i), "\n"} + 11 44937.64284865548751208448 + 10 45180.98734845585101160448 + 9 45303.31936980687359311872 + 8 45364.65110595323018870784 + 7 45395.35850361789624614912 + 6 45410.72259715102037508096 + 5 45418.40724413220722311168 + 4 45422.25021786898173001728 + 3 45424.17186732298419044352 + 2 45425.13273269940811464704 + 1 45425.61317555035558641664 + 0 45425.85339951654943850496 +#endif + +static png_uint_32 +png_exp(png_fixed_point x) +{ + if (x > 0 && x <= 0xfffff) /* Else overflow or zero (underflow) */ + { + /* Obtain a 4-bit approximation */ + png_uint_32 e = png_32bit_exp[(x >> 12) & 0xf]; + + /* Incorporate the low 12 bits - these decrease the returned value by + * multiplying by a number less than 1 if the bit is set. The multiplier + * is determined by the above table and the shift. Notice that the values + * converge on 45426 and this is used to allow linear interpolation of the + * low bits. + */ + if (x & 0x800) + e -= (((e >> 16) * 44938U) + 16U) >> 5; + + if (x & 0x400) + e -= (((e >> 16) * 45181U) + 32U) >> 6; + + if (x & 0x200) + e -= (((e >> 16) * 45303U) + 64U) >> 7; + + if (x & 0x100) + e -= (((e >> 16) * 45365U) + 128U) >> 8; + + if (x & 0x080) + e -= (((e >> 16) * 45395U) + 256U) >> 9; + + if (x & 0x040) + e -= (((e >> 16) * 45410U) + 512U) >> 10; + + /* And handle the low 6 bits in a single block. */ + e -= (((e >> 16) * 355U * (x & 0x3fU)) + 256U) >> 9; + + /* Handle the upper bits of x. */ + e >>= x >> 16; + return e; + } + + /* Check for overflow */ + if (x <= 0) + return png_32bit_exp[0]; + + /* Else underflow */ + return 0; +} + +static png_byte +png_exp8bit(png_fixed_point lg2) +{ + /* Get a 32-bit value: */ + png_uint_32 x = png_exp(lg2); + + /* Convert the 32-bit value to 0..255 by multiplying by 256-1, note that the + * second, rounding, step can't overflow because of the first, subtraction, + * step. + */ + x -= x >> 8; + return (png_byte)((x + 0x7fffffU) >> 24); +} + +static png_uint_16 +png_exp16bit(png_fixed_point lg2) +{ + /* Get a 32-bit value: */ + png_uint_32 x = png_exp(lg2); + + /* Convert the 32-bit value to 0..65535 by multiplying by 65536-1: */ + x -= x >> 16; + return (png_uint_16)((x + 32767U) >> 16); +} +#endif /* FLOATING_ARITHMETIC */ + +png_byte +png_gamma_8bit_correct(unsigned int value, png_fixed_point gamma_val) +{ + if (value > 0 && value < 255) + { +# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = floor(255*pow(value/255.,gamma_val*.00001)+.5); + return (png_byte)r; +# else + png_int_32 lg2 = png_log8bit(value); + png_fixed_point res; + + if (png_muldiv(&res, gamma_val, lg2, PNG_FP_1)) + return png_exp8bit(res); + + /* Overflow. */ + value = 0; +# endif + } + + return (png_byte)value; +} + +png_uint_16 +png_gamma_16bit_correct(unsigned int value, png_fixed_point gamma_val) +{ + if (value > 0 && value < 65535) + { +# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = floor(65535*pow(value/65535.,gamma_val*.00001)+.5); + return (png_uint_16)r; +# else + png_int_32 lg2 = png_log16bit(value); + png_fixed_point res; + + if (png_muldiv(&res, gamma_val, lg2, PNG_FP_1)) + return png_exp16bit(res); + + /* Overflow. */ + value = 0; +# endif + } + + return (png_uint_16)value; +} + +/* This does the right thing based on the bit_depth field of the + * png_struct, interpreting values as 8-bit or 16-bit. While the result + * is nominally a 16-bit value if bit depth is 8 then the result is + * 8-bit (as are the arguments.) + */ +png_uint_16 /* PRIVATE */ +png_gamma_correct(png_structrp png_ptr, unsigned int value, + png_fixed_point gamma_val) +{ + if (png_ptr->bit_depth == 8) + return png_gamma_8bit_correct(value, gamma_val); + + else + return png_gamma_16bit_correct(value, gamma_val); +} + +/* Internal function to build a single 16-bit table - the table consists of + * 'num' 256 entry subtables, where 'num' is determined by 'shift' - the amount + * to shift the input values right (or 16-number_of_signifiant_bits). + * + * The caller is responsible for ensuring that the table gets cleaned up on + * png_error (i.e. if one of the mallocs below fails) - i.e. the *table argument + * should be somewhere that will be cleaned. + */ +static void +png_build_16bit_table(png_structrp png_ptr, png_uint_16pp *ptable, + PNG_CONST unsigned int shift, PNG_CONST png_fixed_point gamma_val) +{ + /* Various values derived from 'shift': */ + PNG_CONST unsigned int num = 1U << (8U - shift); + PNG_CONST unsigned int max = (1U << (16U - shift))-1U; + PNG_CONST unsigned int max_by_2 = 1U << (15U-shift); + unsigned int i; + + png_uint_16pp table = *ptable = + (png_uint_16pp)png_calloc(png_ptr, num * (sizeof (png_uint_16p))); + + for (i = 0; i < num; i++) + { + png_uint_16p sub_table = table[i] = + (png_uint_16p)png_malloc(png_ptr, 256 * (sizeof (png_uint_16))); + + /* The 'threshold' test is repeated here because it can arise for one of + * the 16-bit tables even if the others don't hit it. + */ + if (png_gamma_significant(gamma_val)) + { + /* The old code would overflow at the end and this would cause the + * 'pow' function to return a result >1, resulting in an + * arithmetic error. This code follows the spec exactly; ig is + * the recovered input sample, it always has 8-16 bits. + * + * We want input * 65535/max, rounded, the arithmetic fits in 32 + * bits (unsigned) so long as max <= 32767. + */ + unsigned int j; + for (j = 0; j < 256; j++) + { + png_uint_32 ig = (j << (8-shift)) + i; +# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + /* Inline the 'max' scaling operation: */ + double d = floor(65535*pow(ig/(double)max, gamma_val*.00001)+.5); + sub_table[j] = (png_uint_16)d; +# else + if (shift) + ig = (ig * 65535U + max_by_2)/max; + + sub_table[j] = png_gamma_16bit_correct(ig, gamma_val); +# endif + } + } + else + { + /* We must still build a table, but do it the fast way. */ + unsigned int j; + + for (j = 0; j < 256; j++) + { + png_uint_32 ig = (j << (8-shift)) + i; + + if (shift) + ig = (ig * 65535U + max_by_2)/max; + + sub_table[j] = (png_uint_16)ig; + } + } + } +} + +/* NOTE: this function expects the *inverse* of the overall gamma transformation + * required. + */ +static void +png_build_16to8_table(png_structrp png_ptr, png_uint_16pp *ptable, + PNG_CONST unsigned int shift, PNG_CONST png_fixed_point gamma_val) +{ + PNG_CONST unsigned int num = 1U << (8U - shift); + PNG_CONST unsigned int max = (1U << (16U - shift))-1U; + unsigned int i; + png_uint_32 last; + + png_uint_16pp table = *ptable = + (png_uint_16pp)png_calloc(png_ptr, num * (sizeof (png_uint_16p))); + + /* 'num' is the number of tables and also the number of low bits of low + * bits of the input 16-bit value used to select a table. Each table is + * itself index by the high 8 bits of the value. + */ + for (i = 0; i < num; i++) + table[i] = (png_uint_16p)png_malloc(png_ptr, + 256 * (sizeof (png_uint_16))); + + /* 'gamma_val' is set to the reciprocal of the value calculated above, so + * pow(out,g) is an *input* value. 'last' is the last input value set. + * + * In the loop 'i' is used to find output values. Since the output is + * 8-bit there are only 256 possible values. The tables are set up to + * select the closest possible output value for each input by finding + * the input value at the boundary between each pair of output values + * and filling the table up to that boundary with the lower output + * value. + * + * The boundary values are 0.5,1.5..253.5,254.5. Since these are 9-bit + * values the code below uses a 16-bit value in i; the values start at + * 128.5 (for 0.5) and step by 257, for a total of 254 values (the last + * entries are filled with 255). Start i at 128 and fill all 'last' + * table entries <= 'max' + */ + last = 0; + for (i = 0; i < 255; ++i) /* 8-bit output value */ + { + /* Find the corresponding maximum input value */ + png_uint_16 out = (png_uint_16)(i * 257U); /* 16-bit output value */ + + /* Find the boundary value in 16 bits: */ + png_uint_32 bound = png_gamma_16bit_correct(out+128U, gamma_val); + + /* Adjust (round) to (16-shift) bits: */ + bound = (bound * max + 32768U)/65535U + 1U; + + while (last < bound) + { + table[last & (0xffU >> shift)][last >> (8U - shift)] = out; + last++; + } + } + + /* And fill in the final entries. */ + while (last < (num << 8)) + { + table[last & (0xff >> shift)][last >> (8U - shift)] = 65535U; + last++; + } +} + +/* Build a single 8-bit table: same as the 16-bit case but much simpler (and + * typically much faster). Note that libpng currently does no sBIT processing + * (apparently contrary to the spec) so a 256 entry table is always generated. + */ +static void +png_build_8bit_table(png_structrp png_ptr, png_bytepp ptable, + PNG_CONST png_fixed_point gamma_val) +{ + unsigned int i; + png_bytep table = *ptable = (png_bytep)png_malloc(png_ptr, 256); + + if (png_gamma_significant(gamma_val)) for (i=0; i<256; i++) + table[i] = png_gamma_8bit_correct(i, gamma_val); + + else for (i=0; i<256; ++i) + table[i] = (png_byte)i; +} + +/* Used from png_read_destroy and below to release the memory used by the gamma + * tables. + */ +void /* PRIVATE */ +png_destroy_gamma_table(png_structrp png_ptr) +{ + png_free(png_ptr, png_ptr->gamma_table); + png_ptr->gamma_table = NULL; + + if (png_ptr->gamma_16_table != NULL) + { + int i; + int istop = (1 << (8 - png_ptr->gamma_shift)); + for (i = 0; i < istop; i++) + { + png_free(png_ptr, png_ptr->gamma_16_table[i]); + } + png_free(png_ptr, png_ptr->gamma_16_table); + png_ptr->gamma_16_table = NULL; + } + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + png_free(png_ptr, png_ptr->gamma_from_1); + png_ptr->gamma_from_1 = NULL; + png_free(png_ptr, png_ptr->gamma_to_1); + png_ptr->gamma_to_1 = NULL; + + if (png_ptr->gamma_16_from_1 != NULL) + { + int i; + int istop = (1 << (8 - png_ptr->gamma_shift)); + for (i = 0; i < istop; i++) + { + png_free(png_ptr, png_ptr->gamma_16_from_1[i]); + } + png_free(png_ptr, png_ptr->gamma_16_from_1); + png_ptr->gamma_16_from_1 = NULL; + } + if (png_ptr->gamma_16_to_1 != NULL) + { + int i; + int istop = (1 << (8 - png_ptr->gamma_shift)); + for (i = 0; i < istop; i++) + { + png_free(png_ptr, png_ptr->gamma_16_to_1[i]); + } + png_free(png_ptr, png_ptr->gamma_16_to_1); + png_ptr->gamma_16_to_1 = NULL; + } +#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ +} + +/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit + * tables, we don't make a full table if we are reducing to 8-bit in + * the future. Note also how the gamma_16 tables are segmented so that + * we don't need to allocate > 64K chunks for a full 16-bit table. + */ +void /* PRIVATE */ +png_build_gamma_table(png_structrp png_ptr, int bit_depth) +{ + png_debug(1, "in png_build_gamma_table"); + + /* Remove any existing table; this copes with multiple calls to + * png_read_update_info. The warning is because building the gamma tables + * multiple times is a performance hit - it's harmless but the ability to call + * png_read_update_info() multiple times is new in 1.5.6 so it seems sensible + * to warn if the app introduces such a hit. + */ + if (png_ptr->gamma_table != NULL || png_ptr->gamma_16_table != NULL) + { + png_warning(png_ptr, "gamma table being rebuilt"); + png_destroy_gamma_table(png_ptr); + } + + if (bit_depth <= 8) + { + png_build_8bit_table(png_ptr, &png_ptr->gamma_table, + png_ptr->screen_gamma > 0 ? png_reciprocal2(png_ptr->colorspace.gamma, + png_ptr->screen_gamma) : PNG_FP_1); + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + if (png_ptr->transformations & (PNG_COMPOSE | PNG_RGB_TO_GRAY)) + { + png_build_8bit_table(png_ptr, &png_ptr->gamma_to_1, + png_reciprocal(png_ptr->colorspace.gamma)); + + png_build_8bit_table(png_ptr, &png_ptr->gamma_from_1, + png_ptr->screen_gamma > 0 ? png_reciprocal(png_ptr->screen_gamma) : + png_ptr->colorspace.gamma/* Probably doing rgb_to_gray */); + } +#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ + } + else + { + png_byte shift, sig_bit; + + if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) + { + sig_bit = png_ptr->sig_bit.red; + + if (png_ptr->sig_bit.green > sig_bit) + sig_bit = png_ptr->sig_bit.green; + + if (png_ptr->sig_bit.blue > sig_bit) + sig_bit = png_ptr->sig_bit.blue; + } + else + sig_bit = png_ptr->sig_bit.gray; + + /* 16-bit gamma code uses this equation: + * + * ov = table[(iv & 0xff) >> gamma_shift][iv >> 8] + * + * Where 'iv' is the input color value and 'ov' is the output value - + * pow(iv, gamma). + * + * Thus the gamma table consists of up to 256 256 entry tables. The table + * is selected by the (8-gamma_shift) most significant of the low 8 bits of + * the color value then indexed by the upper 8 bits: + * + * table[low bits][high 8 bits] + * + * So the table 'n' corresponds to all those 'iv' of: + * + * ..<(n+1 << gamma_shift)-1> + * + */ + if (sig_bit > 0 && sig_bit < 16U) + shift = (png_byte)(16U - sig_bit); /* shift == insignificant bits */ + + else + shift = 0; /* keep all 16 bits */ + + if (png_ptr->transformations & (PNG_16_TO_8 | PNG_SCALE_16_TO_8)) + { + /* PNG_MAX_GAMMA_8 is the number of bits to keep - effectively + * the significant bits in the *input* when the output will + * eventually be 8 bits. By default it is 11. + */ + if (shift < (16U - PNG_MAX_GAMMA_8)) + shift = (16U - PNG_MAX_GAMMA_8); + } + + if (shift > 8U) + shift = 8U; /* Guarantees at least one table! */ + + png_ptr->gamma_shift = shift; + +#ifdef PNG_16BIT_SUPPORTED + /* NOTE: prior to 1.5.4 this test used to include PNG_BACKGROUND (now + * PNG_COMPOSE). This effectively smashed the background calculation for + * 16-bit output because the 8-bit table assumes the result will be reduced + * to 8 bits. + */ + if (png_ptr->transformations & (PNG_16_TO_8 | PNG_SCALE_16_TO_8)) +#endif + png_build_16to8_table(png_ptr, &png_ptr->gamma_16_table, shift, + png_ptr->screen_gamma > 0 ? png_product2(png_ptr->colorspace.gamma, + png_ptr->screen_gamma) : PNG_FP_1); + +#ifdef PNG_16BIT_SUPPORTED + else + png_build_16bit_table(png_ptr, &png_ptr->gamma_16_table, shift, + png_ptr->screen_gamma > 0 ? png_reciprocal2(png_ptr->colorspace.gamma, + png_ptr->screen_gamma) : PNG_FP_1); +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + if (png_ptr->transformations & (PNG_COMPOSE | PNG_RGB_TO_GRAY)) + { + png_build_16bit_table(png_ptr, &png_ptr->gamma_16_to_1, shift, + png_reciprocal(png_ptr->colorspace.gamma)); + + /* Notice that the '16 from 1' table should be full precision, however + * the lookup on this table still uses gamma_shift, so it can't be. + * TODO: fix this. + */ + png_build_16bit_table(png_ptr, &png_ptr->gamma_16_from_1, shift, + png_ptr->screen_gamma > 0 ? png_reciprocal(png_ptr->screen_gamma) : + png_ptr->colorspace.gamma/* Probably doing rgb_to_gray */); + } +#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ + } +} +#endif /* READ_GAMMA */ + +/* HARDWARE OPTION SUPPORT */ +#ifdef PNG_SET_OPTION_SUPPORTED +int PNGAPI +png_set_option(png_structrp png_ptr, int option, int onoff) +{ + if (png_ptr != NULL && option >= 0 && option < PNG_OPTION_NEXT && + (option & 1) == 0) + { + int mask = 3 << option; + int setting = (2 + (onoff != 0)) << option; + int current = png_ptr->options; + + png_ptr->options = (png_byte)((current & ~mask) | setting); + + return (current & mask) >> option; + } + + return PNG_OPTION_INVALID; +} +#endif + +/* sRGB support */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) +/* sRGB conversion tables; these are machine generated with the code in + * contrib/tools/makesRGB.c. The actual sRGB transfer curve defined in the + * specification (see the article at http://en.wikipedia.org/wiki/SRGB) + * is used, not the gamma=1/2.2 approximation use elsewhere in libpng. + * The sRGB to linear table is exact (to the nearest 16 bit linear fraction). + * The inverse (linear to sRGB) table has accuracies as follows: + * + * For all possible (255*65535+1) input values: + * + * error: -0.515566 - 0.625971, 79441 (0.475369%) of readings inexact + * + * For the input values corresponding to the 65536 16-bit values: + * + * error: -0.513727 - 0.607759, 308 (0.469978%) of readings inexact + * + * In all cases the inexact readings are off by one. + */ + +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +/* The convert-to-sRGB table is only currently required for read. */ +const png_uint_16 png_sRGB_table[256] = +{ + 0,20,40,60,80,99,119,139, + 159,179,199,219,241,264,288,313, + 340,367,396,427,458,491,526,562, + 599,637,677,718,761,805,851,898, + 947,997,1048,1101,1156,1212,1270,1330, + 1391,1453,1517,1583,1651,1720,1790,1863, + 1937,2013,2090,2170,2250,2333,2418,2504, + 2592,2681,2773,2866,2961,3058,3157,3258, + 3360,3464,3570,3678,3788,3900,4014,4129, + 4247,4366,4488,4611,4736,4864,4993,5124, + 5257,5392,5530,5669,5810,5953,6099,6246, + 6395,6547,6700,6856,7014,7174,7335,7500, + 7666,7834,8004,8177,8352,8528,8708,8889, + 9072,9258,9445,9635,9828,10022,10219,10417, + 10619,10822,11028,11235,11446,11658,11873,12090, + 12309,12530,12754,12980,13209,13440,13673,13909, + 14146,14387,14629,14874,15122,15371,15623,15878, + 16135,16394,16656,16920,17187,17456,17727,18001, + 18277,18556,18837,19121,19407,19696,19987,20281, + 20577,20876,21177,21481,21787,22096,22407,22721, + 23038,23357,23678,24002,24329,24658,24990,25325, + 25662,26001,26344,26688,27036,27386,27739,28094, + 28452,28813,29176,29542,29911,30282,30656,31033, + 31412,31794,32179,32567,32957,33350,33745,34143, + 34544,34948,35355,35764,36176,36591,37008,37429, + 37852,38278,38706,39138,39572,40009,40449,40891, + 41337,41785,42236,42690,43147,43606,44069,44534, + 45002,45473,45947,46423,46903,47385,47871,48359, + 48850,49344,49841,50341,50844,51349,51858,52369, + 52884,53401,53921,54445,54971,55500,56032,56567, + 57105,57646,58190,58737,59287,59840,60396,60955, + 61517,62082,62650,63221,63795,64372,64952,65535 +}; + +#endif /* simplified read only */ + +/* The base/delta tables are required for both read and write (but currently + * only the simplified versions.) + */ +const png_uint_16 png_sRGB_base[512] = +{ + 128,1782,3383,4644,5675,6564,7357,8074, + 8732,9346,9921,10463,10977,11466,11935,12384, + 12816,13233,13634,14024,14402,14769,15125,15473, + 15812,16142,16466,16781,17090,17393,17690,17981, + 18266,18546,18822,19093,19359,19621,19879,20133, + 20383,20630,20873,21113,21349,21583,21813,22041, + 22265,22487,22707,22923,23138,23350,23559,23767, + 23972,24175,24376,24575,24772,24967,25160,25352, + 25542,25730,25916,26101,26284,26465,26645,26823, + 27000,27176,27350,27523,27695,27865,28034,28201, + 28368,28533,28697,28860,29021,29182,29341,29500, + 29657,29813,29969,30123,30276,30429,30580,30730, + 30880,31028,31176,31323,31469,31614,31758,31902, + 32045,32186,32327,32468,32607,32746,32884,33021, + 33158,33294,33429,33564,33697,33831,33963,34095, + 34226,34357,34486,34616,34744,34873,35000,35127, + 35253,35379,35504,35629,35753,35876,35999,36122, + 36244,36365,36486,36606,36726,36845,36964,37083, + 37201,37318,37435,37551,37668,37783,37898,38013, + 38127,38241,38354,38467,38580,38692,38803,38915, + 39026,39136,39246,39356,39465,39574,39682,39790, + 39898,40005,40112,40219,40325,40431,40537,40642, + 40747,40851,40955,41059,41163,41266,41369,41471, + 41573,41675,41777,41878,41979,42079,42179,42279, + 42379,42478,42577,42676,42775,42873,42971,43068, + 43165,43262,43359,43456,43552,43648,43743,43839, + 43934,44028,44123,44217,44311,44405,44499,44592, + 44685,44778,44870,44962,45054,45146,45238,45329, + 45420,45511,45601,45692,45782,45872,45961,46051, + 46140,46229,46318,46406,46494,46583,46670,46758, + 46846,46933,47020,47107,47193,47280,47366,47452, + 47538,47623,47709,47794,47879,47964,48048,48133, + 48217,48301,48385,48468,48552,48635,48718,48801, + 48884,48966,49048,49131,49213,49294,49376,49458, + 49539,49620,49701,49782,49862,49943,50023,50103, + 50183,50263,50342,50422,50501,50580,50659,50738, + 50816,50895,50973,51051,51129,51207,51285,51362, + 51439,51517,51594,51671,51747,51824,51900,51977, + 52053,52129,52205,52280,52356,52432,52507,52582, + 52657,52732,52807,52881,52956,53030,53104,53178, + 53252,53326,53400,53473,53546,53620,53693,53766, + 53839,53911,53984,54056,54129,54201,54273,54345, + 54417,54489,54560,54632,54703,54774,54845,54916, + 54987,55058,55129,55199,55269,55340,55410,55480, + 55550,55620,55689,55759,55828,55898,55967,56036, + 56105,56174,56243,56311,56380,56448,56517,56585, + 56653,56721,56789,56857,56924,56992,57059,57127, + 57194,57261,57328,57395,57462,57529,57595,57662, + 57728,57795,57861,57927,57993,58059,58125,58191, + 58256,58322,58387,58453,58518,58583,58648,58713, + 58778,58843,58908,58972,59037,59101,59165,59230, + 59294,59358,59422,59486,59549,59613,59677,59740, + 59804,59867,59930,59993,60056,60119,60182,60245, + 60308,60370,60433,60495,60558,60620,60682,60744, + 60806,60868,60930,60992,61054,61115,61177,61238, + 61300,61361,61422,61483,61544,61605,61666,61727, + 61788,61848,61909,61969,62030,62090,62150,62211, + 62271,62331,62391,62450,62510,62570,62630,62689, + 62749,62808,62867,62927,62986,63045,63104,63163, + 63222,63281,63340,63398,63457,63515,63574,63632, + 63691,63749,63807,63865,63923,63981,64039,64097, + 64155,64212,64270,64328,64385,64443,64500,64557, + 64614,64672,64729,64786,64843,64900,64956,65013, + 65070,65126,65183,65239,65296,65352,65409,65465 +}; + +const png_byte png_sRGB_delta[512] = +{ + 207,201,158,129,113,100,90,82,77,72,68,64,61,59,56,54, + 52,50,49,47,46,45,43,42,41,40,39,39,38,37,36,36, + 35,34,34,33,33,32,32,31,31,30,30,30,29,29,28,28, + 28,27,27,27,27,26,26,26,25,25,25,25,24,24,24,24, + 23,23,23,23,23,22,22,22,22,22,22,21,21,21,21,21, + 21,20,20,20,20,20,20,20,20,19,19,19,19,19,19,19, + 19,18,18,18,18,18,18,18,18,18,18,17,17,17,17,17, + 17,17,17,17,17,17,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 +}; +#endif /* SIMPLIFIED READ/WRITE sRGB support */ + +/* SIMPLIFIED READ/WRITE SUPPORT */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) +static int +png_image_free_function(png_voidp argument) +{ + png_imagep image = png_voidcast(png_imagep, argument); + png_controlp cp = image->opaque; + png_control c; + + /* Double check that we have a png_ptr - it should be impossible to get here + * without one. + */ + if (cp->png_ptr == NULL) + return 0; + + /* First free any data held in the control structure. */ +# ifdef PNG_STDIO_SUPPORTED + if (cp->owned_file) + { + FILE *fp = png_voidcast(FILE*, cp->png_ptr->io_ptr); + cp->owned_file = 0; + + /* Ignore errors here. */ + if (fp != NULL) + { + cp->png_ptr->io_ptr = NULL; + (void)fclose(fp); + } + } +# endif + + /* Copy the control structure so that the original, allocated, version can be + * safely freed. Notice that a png_error here stops the remainder of the + * cleanup, but this is probably fine because that would indicate bad memory + * problems anyway. + */ + c = *cp; + image->opaque = &c; + png_free(c.png_ptr, cp); + + /* Then the structures, calling the correct API. */ + if (c.for_write) + { +# ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED + png_destroy_write_struct(&c.png_ptr, &c.info_ptr); +# else + png_error(c.png_ptr, "simplified write not supported"); +# endif + } + else + { +# ifdef PNG_SIMPLIFIED_READ_SUPPORTED + png_destroy_read_struct(&c.png_ptr, &c.info_ptr, NULL); +# else + png_error(c.png_ptr, "simplified read not supported"); +# endif + } + + /* Success. */ + return 1; +} + +void PNGAPI +png_image_free(png_imagep image) +{ + /* Safely call the real function, but only if doing so is safe at this point + * (if not inside an error handling context). Otherwise assume + * png_safe_execute will call this API after the return. + */ + if (image != NULL && image->opaque != NULL && + image->opaque->error_buf == NULL) + { + /* Ignore errors here: */ + (void)png_safe_execute(image, png_image_free_function, image); + image->opaque = NULL; + } +} + +int /* PRIVATE */ +png_image_error(png_imagep image, png_const_charp error_message) +{ + /* Utility to log an error. */ + png_safecat(image->message, (sizeof image->message), 0, error_message); + image->warning_or_error |= PNG_IMAGE_ERROR; + png_image_free(image); + return 0; +} + +#endif /* SIMPLIFIED READ/WRITE */ +#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/png.h b/3rdparty/wxwidgets3.0-3.0.1/src/png/png.h new file mode 100644 index 0000000000..0b5053fcff --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/png.h @@ -0,0 +1,3304 @@ + +/* png.h - header file for PNG reference library + * + * libpng version 1.6.2 - April 25, 2013 + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license (See LICENSE, below) + * + * Authors and maintainers: + * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat + * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger + * libpng versions 0.97, January 1998, through 1.6.2 - April 25, 2013: Glenn + * See also "Contributing Authors", below. + * + * Note about libpng version numbers: + * + * Due to various miscommunications, unforeseen code incompatibilities + * and occasional factors outside the authors' control, version numbering + * on the library has not always been consistent and straightforward. + * The following table summarizes matters since version 0.89c, which was + * the first widely used release: + * + * source png.h png.h shared-lib + * version string int version + * ------- ------ ----- ---------- + * 0.89c "1.0 beta 3" 0.89 89 1.0.89 + * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] + * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] + * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] + * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] + * 0.97c 0.97 97 2.0.97 + * 0.98 0.98 98 2.0.98 + * 0.99 0.99 98 2.0.99 + * 0.99a-m 0.99 99 2.0.99 + * 1.00 1.00 100 2.1.0 [100 should be 10000] + * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] + * 1.0.1 png.h string is 10001 2.1.0 + * 1.0.1a-e identical to the 10002 from here on, the shared library + * 1.0.2 source version) 10002 is 2.V where V is the source code + * 1.0.2a-b 10003 version, except as noted. + * 1.0.3 10003 + * 1.0.3a-d 10004 + * 1.0.4 10004 + * 1.0.4a-f 10005 + * 1.0.5 (+ 2 patches) 10005 + * 1.0.5a-d 10006 + * 1.0.5e-r 10100 (not source compatible) + * 1.0.5s-v 10006 (not binary compatible) + * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) + * 1.0.6d-f 10007 (still binary incompatible) + * 1.0.6g 10007 + * 1.0.6h 10007 10.6h (testing xy.z so-numbering) + * 1.0.6i 10007 10.6i + * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) + * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) + * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) + * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) + * 1.0.7 1 10007 (still compatible) + * 1.0.8beta1-4 1 10008 2.1.0.8beta1-4 + * 1.0.8rc1 1 10008 2.1.0.8rc1 + * 1.0.8 1 10008 2.1.0.8 + * 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 + * 1.0.9rc1 1 10009 2.1.0.9rc1 + * 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 + * 1.0.9rc2 1 10009 2.1.0.9rc2 + * 1.0.9 1 10009 2.1.0.9 + * 1.0.10beta1 1 10010 2.1.0.10beta1 + * 1.0.10rc1 1 10010 2.1.0.10rc1 + * 1.0.10 1 10010 2.1.0.10 + * 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 + * 1.0.11rc1 1 10011 2.1.0.11rc1 + * 1.0.11 1 10011 2.1.0.11 + * 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 + * 1.0.12rc1 2 10012 2.1.0.12rc1 + * 1.0.12 2 10012 2.1.0.12 + * 1.1.0a-f - 10100 2.1.1.0a-f (branch abandoned) + * 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 + * 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 + * 1.2.0rc1 3 10200 3.1.2.0rc1 + * 1.2.0 3 10200 3.1.2.0 + * 1.2.1beta1-4 3 10201 3.1.2.1beta1-4 + * 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 + * 1.2.1 3 10201 3.1.2.1 + * 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 + * 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 + * 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 + * 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 + * 1.0.13 10 10013 10.so.0.1.0.13 + * 1.2.2 12 10202 12.so.0.1.2.2 + * 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 + * 1.2.3 12 10203 12.so.0.1.2.3 + * 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 + * 1.0.14rc1 13 10014 10.so.0.1.0.14rc1 + * 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 + * 1.0.14 10 10014 10.so.0.1.0.14 + * 1.2.4 13 10204 12.so.0.1.2.4 + * 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2 + * 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3 + * 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3 + * 1.0.15 10 10015 10.so.0.1.0.15 + * 1.2.5 13 10205 12.so.0.1.2.5 + * 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4 + * 1.0.16 10 10016 10.so.0.1.0.16 + * 1.2.6 13 10206 12.so.0.1.2.6 + * 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 + * 1.0.17rc1 10 10017 12.so.0.1.0.17rc1 + * 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 + * 1.0.17 10 10017 12.so.0.1.0.17 + * 1.2.7 13 10207 12.so.0.1.2.7 + * 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 + * 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5 + * 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 + * 1.0.18 10 10018 12.so.0.1.0.18 + * 1.2.8 13 10208 12.so.0.1.2.8 + * 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 + * 1.2.9beta4-11 13 10209 12.so.0.9[.0] + * 1.2.9rc1 13 10209 12.so.0.9[.0] + * 1.2.9 13 10209 12.so.0.9[.0] + * 1.2.10beta1-7 13 10210 12.so.0.10[.0] + * 1.2.10rc1-2 13 10210 12.so.0.10[.0] + * 1.2.10 13 10210 12.so.0.10[.0] + * 1.4.0beta1-5 14 10400 14.so.0.0[.0] + * 1.2.11beta1-4 13 10211 12.so.0.11[.0] + * 1.4.0beta7-8 14 10400 14.so.0.0[.0] + * 1.2.11 13 10211 12.so.0.11[.0] + * 1.2.12 13 10212 12.so.0.12[.0] + * 1.4.0beta9-14 14 10400 14.so.0.0[.0] + * 1.2.13 13 10213 12.so.0.13[.0] + * 1.4.0beta15-36 14 10400 14.so.0.0[.0] + * 1.4.0beta37-87 14 10400 14.so.14.0[.0] + * 1.4.0rc01 14 10400 14.so.14.0[.0] + * 1.4.0beta88-109 14 10400 14.so.14.0[.0] + * 1.4.0rc02-08 14 10400 14.so.14.0[.0] + * 1.4.0 14 10400 14.so.14.0[.0] + * 1.4.1beta01-03 14 10401 14.so.14.1[.0] + * 1.4.1rc01 14 10401 14.so.14.1[.0] + * 1.4.1beta04-12 14 10401 14.so.14.1[.0] + * 1.4.1 14 10401 14.so.14.1[.0] + * 1.4.2 14 10402 14.so.14.2[.0] + * 1.4.3 14 10403 14.so.14.3[.0] + * 1.4.4 14 10404 14.so.14.4[.0] + * 1.5.0beta01-58 15 10500 15.so.15.0[.0] + * 1.5.0rc01-07 15 10500 15.so.15.0[.0] + * 1.5.0 15 10500 15.so.15.0[.0] + * 1.5.1beta01-11 15 10501 15.so.15.1[.0] + * 1.5.1rc01-02 15 10501 15.so.15.1[.0] + * 1.5.1 15 10501 15.so.15.1[.0] + * 1.5.2beta01-03 15 10502 15.so.15.2[.0] + * 1.5.2rc01-03 15 10502 15.so.15.2[.0] + * 1.5.2 15 10502 15.so.15.2[.0] + * 1.5.3beta01-10 15 10503 15.so.15.3[.0] + * 1.5.3rc01-02 15 10503 15.so.15.3[.0] + * 1.5.3beta11 15 10503 15.so.15.3[.0] + * 1.5.3 [omitted] + * 1.5.4beta01-08 15 10504 15.so.15.4[.0] + * 1.5.4rc01 15 10504 15.so.15.4[.0] + * 1.5.4 15 10504 15.so.15.4[.0] + * 1.5.5beta01-08 15 10505 15.so.15.5[.0] + * 1.5.5rc01 15 10505 15.so.15.5[.0] + * 1.5.5 15 10505 15.so.15.5[.0] + * 1.5.6beta01-07 15 10506 15.so.15.6[.0] + * 1.5.6rc01-03 15 10506 15.so.15.6[.0] + * 1.5.6 15 10506 15.so.15.6[.0] + * 1.5.7beta01-05 15 10507 15.so.15.7[.0] + * 1.5.7rc01-03 15 10507 15.so.15.7[.0] + * 1.5.7 15 10507 15.so.15.7[.0] + * 1.6.0beta01-40 16 10600 16.so.16.0[.0] + * 1.6.0rc01-08 16 10600 16.so.16.0[.0] + * 1.6.0 16 10600 16.so.16.0[.0] + * 1.6.1beta01-09 16 10601 16.so.16.1[.0] + * 1.6.1rc01 16 10601 16.so.16.1[.0] + * 1.6.1 16 10601 16.so.16.1[.0] + * 1.6.2beta01 16 10602 16.so.16.2[.0] + * 1.6.2rc01-06 16 10602 16.so.16.2[.0] + * 1.6.2 16 10602 16.so.16.2[.0] + * + * Henceforth the source version will match the shared-library major + * and minor numbers; the shared-library major version number will be + * used for changes in backward compatibility, as it is intended. The + * PNG_LIBPNG_VER macro, which is not used within libpng but is available + * for applications, is an unsigned integer of the form xyyzz corresponding + * to the source version x.y.z (leading zeros in y and z). Beta versions + * were given the previous public release number plus a letter, until + * version 1.0.6j; from then on they were given the upcoming public + * release number plus "betaNN" or "rcNN". + * + * Binary incompatibility exists only when applications make direct access + * to the info_ptr or png_ptr members through png.h, and the compiled + * application is loaded with a different version of the library. + * + * DLLNUM will change each time there are forward or backward changes + * in binary compatibility (e.g., when a new feature is added). + * + * See libpng-manual.txt or libpng.3 for more information. The PNG + * specification is available as a W3C Recommendation and as an ISO + * Specification, defines should NOT be changed. + */ +#define PNG_INFO_gAMA 0x0001 +#define PNG_INFO_sBIT 0x0002 +#define PNG_INFO_cHRM 0x0004 +#define PNG_INFO_PLTE 0x0008 +#define PNG_INFO_tRNS 0x0010 +#define PNG_INFO_bKGD 0x0020 +#define PNG_INFO_hIST 0x0040 +#define PNG_INFO_pHYs 0x0080 +#define PNG_INFO_oFFs 0x0100 +#define PNG_INFO_tIME 0x0200 +#define PNG_INFO_pCAL 0x0400 +#define PNG_INFO_sRGB 0x0800 /* GR-P, 0.96a */ +#define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */ +#define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */ +#define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */ +#define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */ + +/* This is used for the transformation routines, as some of them + * change these values for the row. It also should enable using + * the routines for other purposes. + */ +typedef struct png_row_info_struct +{ + png_uint_32 width; /* width of row */ + png_size_t rowbytes; /* number of bytes in row */ + png_byte color_type; /* color type of row */ + png_byte bit_depth; /* bit depth of row */ + png_byte channels; /* number of channels (1, 2, 3, or 4) */ + png_byte pixel_depth; /* bits per pixel (depth * channels) */ +} png_row_info; + +typedef png_row_info * png_row_infop; +typedef png_row_info * * png_row_infopp; + +/* These are the function types for the I/O functions and for the functions + * that allow the user to override the default I/O functions with his or her + * own. The png_error_ptr type should match that of user-supplied warning + * and error functions, while the png_rw_ptr type should match that of the + * user read/write data functions. Note that the 'write' function must not + * modify the buffer it is passed. The 'read' function, on the other hand, is + * expected to return the read data in the buffer. + */ +typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp)); +typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t)); +typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp)); +typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32, + int)); +typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32, + int)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop)); +typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop)); + +/* The following callback receives png_uint_32 row_number, int pass for the + * png_bytep data of the row. When transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep, + png_uint_32, int)); +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop, + png_bytep)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp, + png_unknown_chunkp)); +#endif +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +/* not used anywhere */ +/* typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp)); */ +#endif + +#ifdef PNG_SETJMP_SUPPORTED +/* This must match the function definition in , and the application + * must include this before png.h to obtain the definition of jmp_buf. The + * function is required to be PNG_NORETURN, but this is not checked. If the + * function does return the application will crash via an abort() or similar + * system level call. + * + * If you get a warning here while building the library you may need to make + * changes to ensure that pnglibconf.h records the calling convention used by + * your compiler. This may be very difficult - try using a different compiler + * to build the library! + */ +PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef); +#endif + +/* Transform masks for the high-level interface */ +#define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ +#define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */ +#define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */ +#define PNG_TRANSFORM_PACKING 0x0004 /* read and write */ +#define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */ +#define PNG_TRANSFORM_EXPAND 0x0010 /* read only */ +#define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */ +#define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */ +#define PNG_TRANSFORM_BGR 0x0080 /* read and write */ +#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ +#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ +#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ +#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only */ +/* Added to libpng-1.2.34 */ +#define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER +#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ +/* Added to libpng-1.4.0 */ +#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ +/* Added to libpng-1.5.4 */ +#define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */ +#define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */ + +/* Flags for MNG supported features */ +#define PNG_FLAG_MNG_EMPTY_PLTE 0x01 +#define PNG_FLAG_MNG_FILTER_64 0x04 +#define PNG_ALL_MNG_FEATURES 0x05 + +/* NOTE: prior to 1.5 these functions had no 'API' style declaration, + * this allowed the zlib default functions to be used on Windows + * platforms. In 1.5 the zlib default malloc (which just calls malloc and + * ignores the first argument) should be completely compatible with the + * following. + */ +typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, + png_alloc_size_t)); +typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp)); + +/* Section 3: exported functions + * Here are the function definitions most commonly used. This is not + * the place to find out how to use libpng. See libpng-manual.txt for the + * full explanation, see example.c for the summary. This just provides + * a simple one line description of the use of each function. + * + * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in + * pngconf.h and in the *.dfn files in the scripts directory. + * + * PNG_EXPORT(ordinal, type, name, (args)); + * + * ordinal: ordinal that is used while building + * *.def files. The ordinal value is only + * relevant when preprocessing png.h with + * the *.dfn files for building symbol table + * entries, and are removed by pngconf.h. + * type: return type of the function + * name: function name + * args: function arguments, with types + * + * When we wish to append attributes to a function prototype we use + * the PNG_EXPORTA() macro instead. + * + * PNG_EXPORTA(ordinal, type, name, (args), attributes); + * + * ordinal, type, name, and args: same as in PNG_EXPORT(). + * attributes: function attributes + */ + +/* Returns the version number of the library */ +PNG_EXPORT(1, png_uint_32, png_access_version_number, (void)); + +/* Tell lib we have already handled the first magic bytes. + * Handling more than 8 bytes from the beginning of the file is an error. + */ +PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes)); + +/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a + * PNG file. Returns zero if the supplied bytes match the 8-byte PNG + * signature, and non-zero otherwise. Having num_to_check == 0 or + * start > 7 will always fail (ie return non-zero). + */ +PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start, + png_size_t num_to_check)); + +/* Simple signature checking function. This is the same as calling + * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). + */ +#define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n)) + +/* Allocate and initialize png_ptr struct for reading, and any other memory. */ +PNG_EXPORTA(4, png_structp, png_create_read_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn), + PNG_ALLOCATED); + +/* Allocate and initialize png_ptr struct for writing, and any other memory */ +PNG_EXPORTA(5, png_structp, png_create_write_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn), + PNG_ALLOCATED); + +PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size, + (png_const_structrp png_ptr)); + +PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr, + png_size_t size)); + +/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp + * match up. + */ +#ifdef PNG_SETJMP_SUPPORTED +/* This function returns the jmp_buf built in to *png_ptr. It must be + * supplied with an appropriate 'longjmp' function to use on that jmp_buf + * unless the default error function is overridden in which case NULL is + * acceptable. The size of the jmp_buf is checked against the actual size + * allocated by the library - the call will return NULL on a mismatch + * indicating an ABI mismatch. + */ +PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr, + png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); +# define png_jmpbuf(png_ptr) \ + (*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf)))) +#else +# define png_jmpbuf(png_ptr) \ + (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) +#endif +/* This function should be used by libpng applications in place of + * longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it + * will use it; otherwise it will call PNG_ABORT(). This function was + * added in libpng-1.5.0. + */ +PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val), + PNG_NORETURN); + +#ifdef PNG_READ_SUPPORTED +/* Reset the compression stream */ +PNG_EXPORTA(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED); +#endif + +/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(11, png_structp, png_create_read_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +PNG_EXPORTA(12, png_structp, png_create_write_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +#endif + +/* Write the PNG file signature. */ +PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr)); + +/* Write a PNG chunk - size, type, (optional) data, CRC. */ +PNG_EXPORT(14, void, png_write_chunk, (png_structrp png_ptr, png_const_bytep + chunk_name, png_const_bytep data, png_size_t length)); + +/* Write the start of a PNG chunk - length and chunk name. */ +PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr, + png_const_bytep chunk_name, png_uint_32 length)); + +/* Write the data of a PNG chunk started with png_write_chunk_start(). */ +PNG_EXPORT(16, void, png_write_chunk_data, (png_structrp png_ptr, + png_const_bytep data, png_size_t length)); + +/* Finish a chunk started with png_write_chunk_start() (includes CRC). */ +PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr)); + +/* Allocate and initialize the info structure */ +PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr), + PNG_ALLOCATED); + +/* DEPRECATED: this function allowed init structures to be created using the + * default allocation method (typically malloc). Use is deprecated in 1.6.0 and + * the API will be removed in the future. + */ +PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr, + png_size_t png_info_struct_size), PNG_DEPRECATED); + +/* Writes all the PNG information before the image. */ +PNG_EXPORT(20, void, png_write_info_before_PLTE, + (png_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(21, void, png_write_info, + (png_structrp png_ptr, png_const_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the information before the actual image data. */ +PNG_EXPORT(22, void, png_read_info, + (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED + /* Convert to a US string format: there is no localization support in this + * routine. The original implementation used a 29 character buffer in + * png_struct, this will be removed in future versions. + */ +#if PNG_LIBPNG_VER < 10700 +/* To do: remove this from libpng17 (and from libpng17/png.c and pngstruct.h) */ +PNG_EXPORTA(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr, + png_const_timep ptime),PNG_DEPRECATED); +#endif +PNG_EXPORT(241, int, png_convert_to_rfc1123_buffer, (char out[29], + png_const_timep ptime)); +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED +/* Convert from a struct tm to png_time */ +PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime, + const struct tm * ttime)); + +/* Convert from time_t to png_time. Uses gmtime() */ +PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime)); +#endif /* PNG_CONVERT_tIME_SUPPORTED */ + +#ifdef PNG_READ_EXPAND_SUPPORTED +/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ +PNG_EXPORT(26, void, png_set_expand, (png_structrp png_ptr)); +PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structrp png_ptr)); +PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structrp png_ptr)); +PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16-bit channels, forces conversion of palette to RGB and expansion + * of a tRNS chunk if present. + */ +PNG_EXPORT(221, void, png_set_expand_16, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Use blue, green, red order for pixels. */ +PNG_EXPORT(30, void, png_set_bgr, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +/* Expand the grayscale to 24-bit RGB if necessary. */ +PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +/* Reduce RGB to grayscale. */ +#define PNG_ERROR_ACTION_NONE 1 +#define PNG_ERROR_ACTION_WARN 2 +#define PNG_ERROR_ACTION_ERROR 3 +#define PNG_RGB_TO_GRAY_DEFAULT (-1)/*for red/green coefficients*/ + +PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structrp png_ptr, + int error_action, double red, double green)) +PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structrp png_ptr, + int error_action, png_fixed_point red, png_fixed_point green)) + +PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structrp + png_ptr)); +#endif + +#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, + png_colorp palette)); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +/* How the alpha channel is interpreted - this affects how the color channels of + * a PNG file are returned when an alpha channel, or tRNS chunk in a palette + * file, is present. + * + * This has no effect on the way pixels are written into a PNG output + * datastream. The color samples in a PNG datastream are never premultiplied + * with the alpha samples. + * + * The default is to return data according to the PNG specification: the alpha + * channel is a linear measure of the contribution of the pixel to the + * corresponding composited pixel. The gamma encoded color channels must be + * scaled according to the contribution and to do this it is necessary to undo + * the encoding, scale the color values, perform the composition and reencode + * the values. This is the 'PNG' mode. + * + * The alternative is to 'associate' the alpha with the color information by + * storing color channel values that have been scaled by the alpha. The + * advantage is that the color channels can be resampled (the image can be + * scaled) in this form. The disadvantage is that normal practice is to store + * linear, not (gamma) encoded, values and this requires 16-bit channels for + * still images rather than the 8-bit channels that are just about sufficient if + * gamma encoding is used. In addition all non-transparent pixel values, + * including completely opaque ones, must be gamma encoded to produce the final + * image. This is the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' mode (the + * latter being the two common names for associated alpha color channels.) + * + * Since it is not necessary to perform arithmetic on opaque color values so + * long as they are not to be resampled and are in the final color space it is + * possible to optimize the handling of alpha by storing the opaque pixels in + * the PNG format (adjusted for the output color space) while storing partially + * opaque pixels in the standard, linear, format. The accuracy required for + * standard alpha composition is relatively low, because the pixels are + * isolated, therefore typically the accuracy loss in storing 8-bit linear + * values is acceptable. (This is not true if the alpha channel is used to + * simulate transparency over large areas - use 16 bits or the PNG mode in + * this case!) This is the 'OPTIMIZED' mode. For this mode a pixel is + * treated as opaque only if the alpha value is equal to the maximum value. + * + * The final choice is to gamma encode the alpha channel as well. This is + * broken because, in practice, no implementation that uses this choice + * correctly undoes the encoding before handling alpha composition. Use this + * choice only if other serious errors in the software or hardware you use + * mandate it; the typical serious error is for dark halos to appear around + * opaque areas of the composited PNG image because of arithmetic overflow. + * + * The API function png_set_alpha_mode specifies which of these choices to use + * with an enumerated 'mode' value and the gamma of the required output: + */ +#define PNG_ALPHA_PNG 0 /* according to the PNG standard */ +#define PNG_ALPHA_STANDARD 1 /* according to Porter/Duff */ +#define PNG_ALPHA_ASSOCIATED 1 /* as above; this is the normal practice */ +#define PNG_ALPHA_PREMULTIPLIED 1 /* as above */ +#define PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */ +#define PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */ + +PNG_FP_EXPORT(227, void, png_set_alpha_mode, (png_structrp png_ptr, int mode, + double output_gamma)) +PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr, + int mode, png_fixed_point output_gamma)) +#endif + +#if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED) +/* The output_gamma value is a screen gamma in libpng terminology: it expresses + * how to decode the output values, not how they are encoded. The values used + * correspond to the normal numbers used to describe the overall gamma of a + * computer display system; for example 2.2 for an sRGB conformant system. The + * values are scaled by 100000 in the _fixed version of the API (so 220000 for + * sRGB.) + * + * The inverse of the value is always used to provide a default for the PNG file + * encoding if it has no gAMA chunk and if png_set_gamma() has not been called + * to override the PNG gamma information. + * + * When the ALPHA_OPTIMIZED mode is selected the output gamma is used to encode + * opaque pixels however pixels with lower alpha values are not encoded, + * regardless of the output gamma setting. + * + * When the standard Porter Duff handling is requested with mode 1 the output + * encoding is set to be linear and the output_gamma value is only relevant + * as a default for input data that has no gamma information. The linear output + * encoding will be overridden if png_set_gamma() is called - the results may be + * highly unexpected! + * + * The following numbers are derived from the sRGB standard and the research + * behind it. sRGB is defined to be approximated by a PNG gAMA chunk value of + * 0.45455 (1/2.2) for PNG. The value implicitly includes any viewing + * correction required to take account of any differences in the color + * environment of the original scene and the intended display environment; the + * value expresses how to *decode* the image for display, not how the original + * data was *encoded*. + * + * sRGB provides a peg for the PNG standard by defining a viewing environment. + * sRGB itself, and earlier TV standards, actually use a more complex transform + * (a linear portion then a gamma 2.4 power law) than PNG can express. (PNG is + * limited to simple power laws.) By saying that an image for direct display on + * an sRGB conformant system should be stored with a gAMA chunk value of 45455 + * (11.3.3.2 and 11.3.3.5 of the ISO PNG specification) the PNG specification + * makes it possible to derive values for other display systems and + * environments. + * + * The Mac value is deduced from the sRGB based on an assumption that the actual + * extra viewing correction used in early Mac display systems was implemented as + * a power 1.45 lookup table. + * + * Any system where a programmable lookup table is used or where the behavior of + * the final display device characteristics can be changed requires system + * specific code to obtain the current characteristic. However this can be + * difficult and most PNG gamma correction only requires an approximate value. + * + * By default, if png_set_alpha_mode() is not called, libpng assumes that all + * values are unencoded, linear, values and that the output device also has a + * linear characteristic. This is only very rarely correct - it is invariably + * better to call png_set_alpha_mode() with PNG_DEFAULT_sRGB than rely on the + * default if you don't know what the right answer is! + * + * The special value PNG_GAMMA_MAC_18 indicates an older Mac system (pre Mac OS + * 10.6) which used a correction table to implement a somewhat lower gamma on an + * otherwise sRGB system. + * + * Both these values are reserved (not simple gamma values) in order to allow + * more precise correction internally in the future. + * + * NOTE: the following values can be passed to either the fixed or floating + * point APIs, but the floating point API will also accept floating point + * values. + */ +#define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */ +#define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */ +#define PNG_GAMMA_sRGB 220000 /* Television standards--matches sRGB gamma */ +#define PNG_GAMMA_LINEAR PNG_FP_1 /* Linear */ +#endif + +/* The following are examples of calls to png_set_alpha_mode to achieve the + * required overall gamma correction and, where necessary, alpha + * premultiplication. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * This is the default libpng handling of the alpha channel - it is not + * pre-multiplied into the color components. In addition the call states + * that the output is for a sRGB system and causes all PNG files without gAMA + * chunks to be assumed to be encoded using sRGB. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * In this case the output is assumed to be something like an sRGB conformant + * display preceeded by a power-law lookup table of power 1.45. This is how + * early Mac systems behaved. + * + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR); + * This is the classic Jim Blinn approach and will work in academic + * environments where everything is done by the book. It has the shortcoming + * of assuming that input PNG data with no gamma information is linear - this + * is unlikely to be correct unless the PNG files where generated locally. + * Most of the time the output precision will be so low as to show + * significant banding in dark areas of the image. + * + * png_set_expand_16(pp); + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_DEFAULT_sRGB); + * This is a somewhat more realistic Jim Blinn inspired approach. PNG files + * are assumed to have the sRGB encoding if not marked with a gamma value and + * the output is always 16 bits per component. This permits accurate scaling + * and processing of the data. If you know that your input PNG files were + * generated locally you might need to replace PNG_DEFAULT_sRGB with the + * correct value for your system. + * + * png_set_alpha_mode(pp, PNG_ALPHA_OPTIMIZED, PNG_DEFAULT_sRGB); + * If you just need to composite the PNG image onto an existing background + * and if you control the code that does this you can use the optimization + * setting. In this case you just copy completely opaque pixels to the + * output. For pixels that are not completely transparent (you just skip + * those) you do the composition math using png_composite or png_composite_16 + * below then encode the resultant 8-bit or 16-bit values to match the output + * encoding. + * + * Other cases + * If neither the PNG nor the standard linear encoding work for you because + * of the software or hardware you use then you have a big problem. The PNG + * case will probably result in halos around the image. The linear encoding + * will probably result in a washed out, too bright, image (it's actually too + * contrasty.) Try the ALPHA_OPTIMIZED mode above - this will probably + * substantially reduce the halos. Alternatively try: + * + * png_set_alpha_mode(pp, PNG_ALPHA_BROKEN, PNG_DEFAULT_sRGB); + * This option will also reduce the halos, but there will be slight dark + * halos round the opaque parts of the image where the background is light. + * In the OPTIMIZED mode the halos will be light halos where the background + * is dark. Take your pick - the halos are unavoidable unless you can get + * your hardware/software fixed! (The OPTIMIZED approach is slightly + * faster.) + * + * When the default gamma of PNG files doesn't match the output gamma. + * If you have PNG files with no gamma information png_set_alpha_mode allows + * you to provide a default gamma, but it also sets the ouput gamma to the + * matching value. If you know your PNG files have a gamma that doesn't + * match the output you can take advantage of the fact that + * png_set_alpha_mode always sets the output gamma but only sets the PNG + * default if it is not already set: + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * The first call sets both the default and the output gamma values, the + * second call overrides the output gamma without changing the default. This + * is easier than achieving the same effect with png_set_gamma. You must use + * PNG_ALPHA_PNG for the first call - internal checking in png_set_alpha will + * fire if more than one call to png_set_alpha_mode and png_set_background is + * made in the same read operation, however multiple calls with PNG_ALPHA_PNG + * are ignored. + */ + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED +PNG_EXPORT(36, void, png_set_strip_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +PNG_EXPORT(37, void, png_set_swap_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +PNG_EXPORT(38, void, png_set_invert_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */ +PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler, + int flags)); +/* The values of the PNG_FILLER_ defines should NOT be changed */ +# define PNG_FILLER_BEFORE 0 +# define PNG_FILLER_AFTER 1 +/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */ +PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr, + png_uint_32 filler, int flags)); +#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Swap bytes in 16-bit depth files. */ +PNG_EXPORT(41, void, png_set_swap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) +/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ +PNG_EXPORT(42, void, png_set_packing, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) +/* Swap packing order of pixels in bytes. */ +PNG_EXPORT(43, void, png_set_packswap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) +/* Converts files to legal bit depths. */ +PNG_EXPORT(44, void, png_set_shift, (png_structrp png_ptr, png_const_color_8p + true_bits)); +#endif + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) +/* Have the code handle the interlacing. Returns the number of passes. + * MUST be called before png_read_update_info or png_start_read_image, + * otherwise it will not have the desired effect. Note that it is still + * necessary to call png_read_row or png_read_rows png_get_image_height + * times for each pass. +*/ +PNG_EXPORT(45, int, png_set_interlace_handling, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +/* Invert monochrome files */ +PNG_EXPORT(46, void, png_set_invert_mono, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED +/* Handle alpha and tRNS by replacing with a background color. Prior to + * libpng-1.5.4 this API must not be called before the PNG file header has been + * read. Doing so will result in unexpected behavior and possible warnings or + * errors if the PNG file contains a bKGD chunk. + */ +PNG_FP_EXPORT(47, void, png_set_background, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma)) +PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, png_fixed_point background_gamma)) +#endif +#ifdef PNG_READ_BACKGROUND_SUPPORTED +# define PNG_BACKGROUND_GAMMA_UNKNOWN 0 +# define PNG_BACKGROUND_GAMMA_SCREEN 1 +# define PNG_BACKGROUND_GAMMA_FILE 2 +# define PNG_BACKGROUND_GAMMA_UNIQUE 3 +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +/* Scale a 16-bit depth file down to 8-bit, accurately. */ +PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_16_TO_8 SUPPORTED /* Name prior to 1.5.4 */ +/* Strip the second byte of information from a 16-bit depth file. */ +PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* Turn on quantizing, and reduce the palette to the number of colors + * available. + */ +PNG_EXPORT(49, void, png_set_quantize, (png_structrp png_ptr, + png_colorp palette, int num_palette, int maximum_colors, + png_const_uint_16p histogram, int full_quantize)); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* The threshold on gamma processing is configurable but hard-wired into the + * library. The following is the floating point variant. + */ +#define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001) + +/* Handle gamma correction. Screen_gamma=(display_exponent). + * NOTE: this API simply sets the screen and file gamma values. It will + * therefore override the value for gamma in a PNG file if it is called after + * the file header has been read - use with care - call before reading the PNG + * file for best results! + * + * These routines accept the same gamma values as png_set_alpha_mode (described + * above). The PNG_GAMMA_ defines and PNG_DEFAULT_sRGB can be passed to either + * API (floating point or fixed.) Notice, however, that the 'file_gamma' value + * is the inverse of a 'screen gamma' value. + */ +PNG_FP_EXPORT(50, void, png_set_gamma, (png_structrp png_ptr, + double screen_gamma, double override_file_gamma)) +PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structrp png_ptr, + png_fixed_point screen_gamma, png_fixed_point override_file_gamma)) +#endif + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +/* Set how many lines between output flushes - 0 for no flushing */ +PNG_EXPORT(51, void, png_set_flush, (png_structrp png_ptr, int nrows)); +/* Flush the current PNG output buffer */ +PNG_EXPORT(52, void, png_write_flush, (png_structrp png_ptr)); +#endif + +/* Optional update palette with requested transformations */ +PNG_EXPORT(53, void, png_start_read_image, (png_structrp png_ptr)); + +/* Optional call to update the users info structure */ +PNG_EXPORT(54, void, png_read_update_info, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read one or more rows of image data. */ +PNG_EXPORT(55, void, png_read_rows, (png_structrp png_ptr, png_bytepp row, + png_bytepp display_row, png_uint_32 num_rows)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read a row of data. */ +PNG_EXPORT(56, void, png_read_row, (png_structrp png_ptr, png_bytep row, + png_bytep display_row)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the whole image into memory at once. */ +PNG_EXPORT(57, void, png_read_image, (png_structrp png_ptr, png_bytepp image)); +#endif + +/* Write a row of image data */ +PNG_EXPORT(58, void, png_write_row, (png_structrp png_ptr, + png_const_bytep row)); + +/* Write a few rows of image data: (*row) is not written; however, the type + * is declared as writeable to maintain compatibility with previous versions + * of libpng and to allow the 'display_row' array from read_rows to be passed + * unchanged to write_rows. + */ +PNG_EXPORT(59, void, png_write_rows, (png_structrp png_ptr, png_bytepp row, + png_uint_32 num_rows)); + +/* Write the image data */ +PNG_EXPORT(60, void, png_write_image, (png_structrp png_ptr, png_bytepp image)); + +/* Write the end of the PNG file. */ +PNG_EXPORT(61, void, png_write_end, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the end of the PNG file. */ +PNG_EXPORT(62, void, png_read_end, (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +/* Free any memory associated with the png_info_struct */ +PNG_EXPORT(63, void, png_destroy_info_struct, (png_const_structrp png_ptr, + png_infopp info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr)); + +/* Set the libpng method of handling chunk CRC errors */ +PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action, + int ancil_action)); + +/* Values for png_set_crc_action() say how to handle CRC errors in + * ancillary and critical chunks, and whether to use the data contained + * therein. Note that it is impossible to "discard" data in a critical + * chunk. For versions prior to 0.90, the action was always error/quit, + * whereas in version 0.90 and later, the action for CRC errors in ancillary + * chunks is warn/discard. These values should NOT be changed. + * + * value action:critical action:ancillary + */ +#define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ +#define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ +#define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ +#define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ +#define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ +#define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ + +/* These functions give the user control over the scan-line filtering in + * libpng and the compression methods used by zlib. These functions are + * mainly useful for testing, as the defaults should work with most users. + * Those users who are tight on memory or want faster performance at the + * expense of compression can modify them. See the compression library + * header file (zlib.h) for an explination of the compression functions. + */ + +/* Set the filtering method(s) used by libpng. Currently, the only valid + * value for "method" is 0. + */ +PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method, + int filters)); + +/* Flags for png_set_filter() to say which filters to use. The flags + * are chosen so that they don't conflict with real filter types + * below, in case they are supplied instead of the #defined constants. + * These values should NOT be changed. + */ +#define PNG_NO_FILTERS 0x00 +#define PNG_FILTER_NONE 0x08 +#define PNG_FILTER_SUB 0x10 +#define PNG_FILTER_UP 0x20 +#define PNG_FILTER_AVG 0x40 +#define PNG_FILTER_PAETH 0x80 +#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \ + PNG_FILTER_AVG | PNG_FILTER_PAETH) + +/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. + * These defines should NOT be changed. + */ +#define PNG_FILTER_VALUE_NONE 0 +#define PNG_FILTER_VALUE_SUB 1 +#define PNG_FILTER_VALUE_UP 2 +#define PNG_FILTER_VALUE_AVG 3 +#define PNG_FILTER_VALUE_PAETH 4 +#define PNG_FILTER_VALUE_LAST 5 + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* EXPERIMENTAL */ +/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_ + * defines, either the default (minimum-sum-of-absolute-differences), or + * the experimental method (weighted-minimum-sum-of-absolute-differences). + * + * Weights are factors >= 1.0, indicating how important it is to keep the + * filter type consistent between rows. Larger numbers mean the current + * filter is that many times as likely to be the same as the "num_weights" + * previous filters. This is cumulative for each previous row with a weight. + * There needs to be "num_weights" values in "filter_weights", or it can be + * NULL if the weights aren't being specified. Weights have no influence on + * the selection of the first row filter. Well chosen weights can (in theory) + * improve the compression for a given image. + * + * Costs are factors >= 1.0 indicating the relative decoding costs of a + * filter type. Higher costs indicate more decoding expense, and are + * therefore less likely to be selected over a filter with lower computational + * costs. There needs to be a value in "filter_costs" for each valid filter + * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't + * setting the costs. Costs try to improve the speed of decompression without + * unduly increasing the compressed image size. + * + * A negative weight or cost indicates the default value is to be used, and + * values in the range [0.0, 1.0) indicate the value is to remain unchanged. + * The default values for both weights and costs are currently 1.0, but may + * change if good general weighting/cost heuristics can be found. If both + * the weights and costs are set to 1.0, this degenerates the WEIGHTED method + * to the UNWEIGHTED method, but with added encoding time/computation. + */ +PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structrp png_ptr, + int heuristic_method, int num_weights, png_const_doublep filter_weights, + png_const_doublep filter_costs)) +PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, + (png_structrp png_ptr, int heuristic_method, int num_weights, + png_const_fixed_point_p filter_weights, + png_const_fixed_point_p filter_costs)) +#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ + +/* Heuristic used for row filter selection. These defines should NOT be + * changed. + */ +#define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ +#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ +#define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ +#define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ + +#ifdef PNG_WRITE_SUPPORTED +/* Set the library compression level. Currently, valid values range from + * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 + * (0 - no compression, 9 - "maximal" compression). Note that tests have + * shown that zlib compression levels 3-6 usually perform as well as level 9 + * for PNG images, and do considerably fewer caclulations. In the future, + * these values may not correspond directly to the zlib compression levels. + */ +PNG_EXPORT(69, void, png_set_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(71, void, png_set_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structrp png_ptr, + int window_bits)); + +PNG_EXPORT(73, void, png_set_compression_method, (png_structrp png_ptr, + int method)); +#endif + +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +/* Also set zlib parameters for compressing non-IDAT chunks */ +PNG_EXPORT(222, void, png_set_text_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(225, void, png_set_text_compression_window_bits, + (png_structrp png_ptr, int window_bits)); + +PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr, + int method)); +#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */ + +/* These next functions are called for input/output, memory, and error + * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, + * and call standard C I/O routines such as fread(), fwrite(), and + * fprintf(). These functions can be made to use other I/O routines + * at run time for those applications that need to handle I/O in a + * different manner by calling png_set_???_fn(). See libpng-manual.txt for + * more information. + */ + +#ifdef PNG_STDIO_SUPPORTED +/* Initialize the input/output for the PNG file to the default functions. */ +PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, png_FILE_p fp)); +#endif + +/* Replace the (error and abort), and warning functions with user + * supplied functions. If no messages are to be printed you must still + * write and use replacement functions. The replacement error_fn should + * still do a longjmp to the last setjmp location if you are using this + * method of error handling. If error_fn or warning_fn is NULL, the + * default function will be used. + */ + +PNG_EXPORT(75, void, png_set_error_fn, (png_structrp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); + +/* Return the user pointer associated with the error functions */ +PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structrp png_ptr)); + +/* Replace the default data output functions with a user supplied one(s). + * If buffered output is not used, then output_flush_fn can be set to NULL. + * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time + * output_flush_fn will be ignored (and thus can be NULL). + * It is probably a mistake to use NULL for output_flush_fn if + * write_data_fn is not also NULL unless you have built libpng with + * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's + * default flush function, which uses the standard *FILE structure, will + * be used. + */ +PNG_EXPORT(77, void, png_set_write_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); + +/* Replace the default data input function with a user supplied one. */ +PNG_EXPORT(78, void, png_set_read_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr read_data_fn)); + +/* Return the user pointer associated with the I/O functions */ +PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_const_structrp png_ptr)); + +PNG_EXPORT(80, void, png_set_read_status_fn, (png_structrp png_ptr, + png_read_status_ptr read_row_fn)); + +PNG_EXPORT(81, void, png_set_write_status_fn, (png_structrp png_ptr, + png_write_status_ptr write_row_fn)); + +#ifdef PNG_USER_MEM_SUPPORTED +/* Replace the default memory allocation functions with user supplied one(s). */ +PNG_EXPORT(82, void, png_set_mem_fn, (png_structrp png_ptr, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +/* Return the user pointer associated with the memory functions */ +PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr read_user_transform_fn)); +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr write_user_transform_fn)); +#endif + +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +PNG_EXPORT(86, void, png_set_user_transform_info, (png_structrp png_ptr, + png_voidp user_transform_ptr, int user_transform_depth, + int user_transform_channels)); +/* Return the user pointer associated with the user transform functions */ +PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr, + (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED +/* Return information about the row currently being processed. Note that these + * APIs do not fail but will return unexpected results if called outside a user + * transform callback. Also note that when transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structrp)); +PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp)); +#endif + +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED +/* This callback is called only for *unknown* chunks. If + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED is set then it is possible to set known + * chunks to be treated as unknown, however in this case the callback must do + * any processing required by the chunk (e.g. by calling the appropriate + * png_set_ APIs.) + * + * There is no write support - on write, by default, all the chunks in the + * 'unknown' list are written in the specified position. + * + * The integer return from the callback function is interpreted thus: + * + * negative: An error occured, png_chunk_error will be called. + * zero: The chunk was not handled, the chunk will be saved. A critical + * chunk will cause an error at this point unless it is to be saved. + * positive: The chunk was handled, libpng will ignore/discard it. + * + * See "INTERACTION WTIH USER CHUNK CALLBACKS" below for important notes about + * how this behavior will change in libpng 1.7 + */ +PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structrp png_ptr, + png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +/* Sets the function callbacks for the push reader, and a pointer to a + * user-defined structure available to the callback functions. + */ +PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structrp png_ptr, + png_voidp progressive_ptr, png_progressive_info_ptr info_fn, + png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); + +/* Returns the user pointer associated with the push read functions */ +PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, + (png_const_structrp png_ptr)); + +/* Function to be called when data becomes available */ +PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr, + png_inforp info_ptr, png_bytep buffer, png_size_t buffer_size)); + +/* A function which may be called *only* within png_process_data to stop the + * processing of any more data. The function returns the number of bytes + * remaining, excluding any that libpng has cached internally. A subsequent + * call to png_process_data must supply these bytes again. If the argument + * 'save' is set to true the routine will first save all the pending data and + * will always return 0. + */ +PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structrp, int save)); + +/* A function which may be called *only* outside (after) a call to + * png_process_data. It returns the number of bytes of data to skip in the + * input. Normally it will return 0, but if it returns a non-zero value the + * application must skip than number of bytes of input data and pass the + * following data to the next call to png_process_data. + */ +PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp)); + +#ifdef PNG_READ_INTERLACING_SUPPORTED +/* Function that combines rows. 'new_row' is a flag that should come from + * the callback and be non-NULL if anything needs to be done; the library + * stores its own version of the new data internally and ignores the passed + * in value. + */ +PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr, + png_bytep old_row, png_const_bytep new_row)); +#endif /* PNG_READ_INTERLACING_SUPPORTED */ +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); +/* Added at libpng version 1.4.0 */ +PNG_EXPORTA(95, png_voidp, png_calloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Added at libpng version 1.2.4 */ +PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Frees a pointer allocated by png_malloc() */ +PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr)); + +/* Free data that was allocated internally */ +PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 free_me, int num)); + +/* Reassign responsibility for freeing existing data, whether allocated + * by libpng or by the application; this works on the png_info structure passed + * in, it does not change the state for other png_info structures. + * + * It is unlikely that this function works correctly as of 1.6.0 and using it + * may result either in memory leaks or double free of allocated data. + */ +PNG_EXPORTA(99, void, png_data_freer, (png_const_structrp png_ptr, + png_inforp info_ptr, int freer, png_uint_32 mask), PNG_DEPRECATED); + +/* Assignments for png_data_freer */ +#define PNG_DESTROY_WILL_FREE_DATA 1 +#define PNG_SET_WILL_FREE_DATA 1 +#define PNG_USER_WILL_FREE_DATA 2 +/* Flags for png_ptr->free_me and info_ptr->free_me */ +#define PNG_FREE_HIST 0x0008 +#define PNG_FREE_ICCP 0x0010 +#define PNG_FREE_SPLT 0x0020 +#define PNG_FREE_ROWS 0x0040 +#define PNG_FREE_PCAL 0x0080 +#define PNG_FREE_SCAL 0x0100 +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +# define PNG_FREE_UNKN 0x0200 +#endif +/* PNG_FREE_LIST 0x0400 removed in 1.6.0 because it is ignored */ +#define PNG_FREE_PLTE 0x1000 +#define PNG_FREE_TRNS 0x2000 +#define PNG_FREE_TEXT 0x4000 +#define PNG_FREE_ALL 0x7fff +#define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ + +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED PNG_DEPRECATED); +PNG_EXPORTA(101, void, png_free_default, (png_const_structrp png_ptr, + png_voidp ptr), PNG_DEPRECATED); +#endif + +#ifdef PNG_ERROR_TEXT_SUPPORTED +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(102, void, png_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +/* The same, but the chunk name is prepended to the error string. */ +PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +#else +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN); +#endif + +#ifdef PNG_WARNINGS_SUPPORTED +/* Non-fatal error in libpng. Can continue, but may have a problem. */ +PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +/* Non-fatal error in libpng, chunk name is prepended to message. */ +PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#endif + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +/* Benign error in libpng. Can continue, but may have a problem. + * User can choose whether to handle as a fatal error or as a warning. */ +PNG_EXPORT(107, void, png_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +#ifdef PNG_READ_SUPPORTED +/* Same, chunk name is prepended to message (only during read) */ +PNG_EXPORT(108, void, png_chunk_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#endif + +PNG_EXPORT(109, void, png_set_benign_errors, + (png_structrp png_ptr, int allowed)); +#else +# ifdef PNG_ALLOW_BENIGN_ERRORS +# define png_benign_error png_warning +# define png_chunk_benign_error png_chunk_warning +# else +# define png_benign_error png_error +# define png_chunk_benign_error png_chunk_error +# endif +#endif + +/* The png_set_ functions are for storing values in the png_info_struct. + * Similarly, the png_get_ calls are used to read values from the + * png_info_struct, either storing the parameters in the passed variables, or + * setting pointers into the png_info_struct where the data is stored. The + * png_get_ functions return a non-zero value if the data was available + * in info_ptr, or return zero and do not change any of the parameters if the + * data was not available. + * + * These functions should be used instead of directly accessing png_info + * to avoid problems with future changes in the size and internal layout of + * png_info_struct. + */ +/* Returns "flag" if chunk data is valid in info_ptr. */ +PNG_EXPORT(110, png_uint_32, png_get_valid, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 flag)); + +/* Returns number of bytes needed to hold a transformed row. */ +PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* Returns row_pointers, which is an array of pointers to scanlines that was + * returned from png_read_png(). + */ +PNG_EXPORT(112, png_bytepp, png_get_rows, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Set row_pointers, which is an array of pointers to scanlines for use + * by png_write_png(). + */ +PNG_EXPORT(113, void, png_set_rows, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytepp row_pointers)); +#endif + +/* Returns number of color channels in image. */ +PNG_EXPORT(114, png_byte, png_get_channels, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_EASY_ACCESS_SUPPORTED +/* Returns image width in pixels. */ +PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image height in pixels. */ +PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image bit_depth. */ +PNG_EXPORT(117, png_byte, png_get_bit_depth, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image color_type. */ +PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image filter_type. */ +PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image interlace_type. */ +PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image compression_type. */ +PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image resolution in pixels per meter, from pHYs chunk data. */ +PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +/* Returns pixel aspect ratio, computed from pHYs chunk data. */ +PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) + +/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ +PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(128, png_int_32, png_get_x_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(129, png_int_32, png_get_y_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +#endif /* PNG_EASY_ACCESS_SUPPORTED */ + +#ifdef PNG_READ_SUPPORTED +/* Returns pointer to signature string read from PNG header */ +PNG_EXPORT(130, png_const_bytep, png_get_signature, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(131, png_uint_32, png_get_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_16p *background)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(132, void, png_set_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_16p background)); +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *white_x, double *white_y, double *red_x, + double *red_y, double *green_x, double *green_y, double *blue_x, + double *blue_y)) +PNG_FP_EXPORT(230, png_uint_32, png_get_cHRM_XYZ, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *red_X, double *red_Y, double *red_Z, + double *green_X, double *green_Y, double *green_Z, double *blue_X, + double *blue_Y, double *blue_Z)) +PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_white_x, png_fixed_point *int_white_y, + png_fixed_point *int_red_x, png_fixed_point *int_red_y, + png_fixed_point *int_green_x, png_fixed_point *int_green_y, + png_fixed_point *int_blue_x, png_fixed_point *int_blue_y)) +PNG_FIXED_EXPORT(231, png_uint_32, png_get_cHRM_XYZ_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_red_X, png_fixed_point *int_red_Y, + png_fixed_point *int_red_Z, png_fixed_point *int_green_X, + png_fixed_point *int_green_Y, png_fixed_point *int_green_Z, + png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y, + png_fixed_point *int_blue_Z)) +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(135, void, png_set_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, + double white_x, double white_y, double red_x, double red_y, double green_x, + double green_y, double blue_x, double blue_y)) +PNG_FP_EXPORT(232, void, png_set_cHRM_XYZ, (png_const_structrp png_ptr, + png_inforp info_ptr, double red_X, double red_Y, double red_Z, + double green_X, double green_Y, double green_Z, double blue_X, + double blue_Y, double blue_Z)) +PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_white_x, + png_fixed_point int_white_y, png_fixed_point int_red_x, + png_fixed_point int_red_y, png_fixed_point int_green_x, + png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)) +PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_red_X, png_fixed_point int_red_Y, + png_fixed_point int_red_Z, png_fixed_point int_green_X, + png_fixed_point int_green_Y, png_fixed_point int_green_Z, + png_fixed_point int_blue_X, png_fixed_point int_blue_Y, + png_fixed_point int_blue_Z)) +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *file_gamma)) +PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_file_gamma)) +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(139, void, png_set_gAMA, (png_const_structrp png_ptr, + png_inforp info_ptr, double file_gamma)) +PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_file_gamma)) +#endif + +#ifdef PNG_hIST_SUPPORTED +PNG_EXPORT(141, png_uint_32, png_get_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_16p *hist)); +#endif + +#ifdef PNG_hIST_SUPPORTED +PNG_EXPORT(142, void, png_set_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_uint_16p hist)); +#endif + +PNG_EXPORT(143, png_uint_32, png_get_IHDR, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *width, png_uint_32 *height, + int *bit_depth, int *color_type, int *interlace_method, + int *compression_method, int *filter_method)); + +PNG_EXPORT(144, void, png_set_IHDR, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_method, int compression_method, + int filter_method)); + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(145, png_uint_32, png_get_oFFs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, + int *unit_type)); +#endif + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(146, void, png_set_oFFs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_int_32 offset_x, png_int_32 offset_y, + int unit_type)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(147, png_uint_32, png_get_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charp *purpose, png_int_32 *X0, + png_int_32 *X1, int *type, int *nparams, png_charp *units, + png_charpp *params)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(148, void, png_set_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp purpose, png_int_32 X0, png_int_32 X1, + int type, int nparams, png_const_charp units, png_charpp params)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(149, png_uint_32, png_get_pHYs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(150, void, png_set_pHYs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); +#endif + +PNG_EXPORT(151, png_uint_32, png_get_PLTE, (png_const_structrp png_ptr, + png_inforp info_ptr, png_colorp *palette, int *num_palette)); + +PNG_EXPORT(152, void, png_set_PLTE, (png_structrp png_ptr, + png_inforp info_ptr, png_const_colorp palette, int num_palette)); + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(153, png_uint_32, png_get_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_8p *sig_bit)); +#endif + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(154, void, png_set_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_8p sig_bit)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *file_srgb_intent)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(156, void, png_set_sRGB, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(158, png_uint_32, png_get_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charpp name, int *compression_type, + png_bytepp profile, png_uint_32 *proflen)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(159, void, png_set_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp name, int compression_type, + png_const_bytep profile, png_uint_32 proflen)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(160, int, png_get_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_sPLT_tpp entries)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(161, void, png_set_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_sPLT_tp entries, int nentries)); +#endif + +#ifdef PNG_TEXT_SUPPORTED +/* png_get_text also returns the number of text chunks in *num_text */ +PNG_EXPORT(162, int, png_get_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_textp *text_ptr, int *num_text)); +#endif + +/* Note while png_set_text() will accept a structure whose text, + * language, and translated keywords are NULL pointers, the structure + * returned by png_get_text will always contain regular + * zero-terminated C strings. They might be empty strings but + * they will never be NULL pointers. + */ + +#ifdef PNG_TEXT_SUPPORTED +PNG_EXPORT(163, void, png_set_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_textp text_ptr, int num_text)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(164, png_uint_32, png_get_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_timep *mod_time)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(165, void, png_set_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_timep mod_time)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(166, png_uint_32, png_get_tRNS, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep *trans_alpha, int *num_trans, + png_color_16p *trans_color)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(167, void, png_set_tRNS, (png_structrp png_ptr, + png_inforp info_ptr, png_const_bytep trans_alpha, int num_trans, + png_const_color_16p trans_color)); +#endif + +#ifdef PNG_sCAL_SUPPORTED +PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *unit, double *width, double *height)) +#if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \ + defined(PNG_FLOATING_POINT_SUPPORTED) +/* NOTE: this API is currently implemented using floating point arithmetic, + * consequently it can only be used on systems with floating point support. + * In any case the range of values supported by png_fixed_point is small and it + * is highly recommended that png_get_sCAL_s be used instead. + */ +PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_fixed_point *width, png_fixed_point *height)) +#endif +PNG_EXPORT(169, png_uint_32, png_get_sCAL_s, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_charpp swidth, png_charpp sheight)); + +PNG_FP_EXPORT(170, void, png_set_sCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, double width, double height)) +PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, png_fixed_point width, + png_fixed_point height)) +PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, + png_const_charp swidth, png_const_charp sheight)); +#endif /* PNG_sCAL_SUPPORTED */ + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +/* Provide the default handling for all unknown chunks or, optionally, for + * specific unknown chunks. + * + * NOTE: prior to 1.6.0 the handling specified for particular chunks on read was + * ignored and the default was used, the per-chunk setting only had an effect on + * write. If you wish to have chunk-specific handling on read in code that must + * work on earlier versions you must use a user chunk callback to specify the + * desired handling (keep or discard.) + * + * The 'keep' parameter is a PNG_HANDLE_CHUNK_ value as listed below. The + * parameter is interpreted as follows: + * + * READ: + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Known chunks: do normal libpng processing, do not keep the chunk (but + * see the comments below about PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + * Unknown chunks: for a specific chunk use the global default, when used + * as the default discard the chunk data. + * PNG_HANDLE_CHUNK_NEVER: + * Discard the chunk data. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Keep the chunk data if the chunk is not critical else raise a chunk + * error. + * PNG_HANDLE_CHUNK_ALWAYS: + * Keep the chunk data. + * + * If the chunk data is saved it can be retrieved using png_get_unknown_chunks, + * below. Notice that specifying "AS_DEFAULT" as a global default is equivalent + * to specifying "NEVER", however when "AS_DEFAULT" is used for specific chunks + * it simply resets the behavior to the libpng default. + * + * INTERACTION WTIH USER CHUNK CALLBACKS: + * The per-chunk handling is always used when there is a png_user_chunk_ptr + * callback and the callback returns 0; the chunk is then always stored *unless* + * it is critical and the per-chunk setting is other than ALWAYS. Notice that + * the global default is *not* used in this case. (In effect the per-chunk + * value is incremented to at least IF_SAFE.) + * + * IMPORTANT NOTE: this behavior will change in libpng 1.7 - the global and + * per-chunk defaults will be honored. If you want to preserve the current + * behavior when your callback returns 0 you must set PNG_HANDLE_CHUNK_IF_SAFE + * as the default - if you don't do this libpng 1.6 will issue a warning. + * + * If you want unhandled unknown chunks to be discarded in libpng 1.6 and + * earlier simply return '1' (handled). + * + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED: + * If this is *not* set known chunks will always be handled by libpng and + * will never be stored in the unknown chunk list. Known chunks listed to + * png_set_keep_unknown_chunks will have no effect. If it is set then known + * chunks listed with a keep other than AS_DEFAULT will *never* be processed + * by libpng, in addition critical chunks must either be processed by the + * callback or saved. + * + * The IHDR and IEND chunks must not be listed. Because this turns off the + * default handling for chunks that would otherwise be recognized the + * behavior of libpng transformations may well become incorrect! + * + * WRITE: + * When writing chunks the options only apply to the chunks specified by + * png_set_unknown_chunks (below), libpng will *always* write known chunks + * required by png_set_ calls and will always write the core critical chunks + * (as required for PLTE). + * + * Each chunk in the png_set_unknown_chunks list is looked up in the + * png_set_keep_unknown_chunks list to find the keep setting, this is then + * interpreted as follows: + * + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Write safe-to-copy chunks and write other chunks if the global + * default is set to _ALWAYS, otherwise don't write this chunk. + * PNG_HANDLE_CHUNK_NEVER: + * Do not write the chunk. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Write the chunk if it is safe-to-copy, otherwise do not write it. + * PNG_HANDLE_CHUNK_ALWAYS: + * Write the chunk. + * + * Note that the default behavior is effectively the opposite of the read case - + * in read unknown chunks are not stored by default, in write they are written + * by default. Also the behavior of PNG_HANDLE_CHUNK_IF_SAFE is very different + * - on write the safe-to-copy bit is checked, on read the critical bit is + * checked and on read if the chunk is critical an error will be raised. + * + * num_chunks: + * =========== + * If num_chunks is positive, then the "keep" parameter specifies the manner + * for handling only those chunks appearing in the chunk_list array, + * otherwise the chunk list array is ignored. + * + * If num_chunks is 0 the "keep" parameter specifies the default behavior for + * unknown chunks, as described above. + * + * If num_chunks is negative, then the "keep" parameter specifies the manner + * for handling all unknown chunks plus all chunks recognized by libpng + * except for the IHDR, PLTE, tRNS, IDAT, and IEND chunks (which continue to + * be processed by libpng. + */ +PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr, + int keep, png_const_bytep chunk_list, int num_chunks)); + +/* The "keep" PNG_HANDLE_CHUNK_ parameter for the specified chunk is returned; + * the result is therefore true (non-zero) if special handling is required, + * false for the default handling. + */ +PNG_EXPORT(173, int, png_handle_as_unknown, (png_const_structrp png_ptr, + png_const_bytep chunk_name)); +#endif + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +PNG_EXPORT(174, void, png_set_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_unknown_chunkp unknowns, + int num_unknowns)); + /* NOTE: prior to 1.6.0 this routine set the 'location' field of the added + * unknowns to the location currently stored in the png_struct. This is + * invariably the wrong value on write. To fix this call the following API + * for each chunk in the list with the correct location. If you know your + * code won't be compiled on earlier versions you can rely on + * png_set_unknown_chunks(write-ptr, png_get_unknown_chunks(read-ptr)) doing + * the correct thing. + */ + +PNG_EXPORT(175, void, png_set_unknown_chunk_location, + (png_const_structrp png_ptr, png_inforp info_ptr, int chunk, int location)); + +PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_unknown_chunkpp entries)); +#endif + +/* Png_free_data() will turn off the "valid" flag for anything it frees. + * If you need to turn it off for a chunk that your application has freed, + * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); + */ +PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr, + png_inforp info_ptr, int mask)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* The "params" pointer is currently not used and is for future expansion. */ +PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +#endif + +PNG_EXPORT(180, png_const_charp, png_get_copyright, + (png_const_structrp png_ptr)); +PNG_EXPORT(181, png_const_charp, png_get_header_ver, + (png_const_structrp png_ptr)); +PNG_EXPORT(182, png_const_charp, png_get_header_version, + (png_const_structrp png_ptr)); +PNG_EXPORT(183, png_const_charp, png_get_libpng_ver, + (png_const_structrp png_ptr)); + +#ifdef PNG_MNG_FEATURES_SUPPORTED +PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structrp png_ptr, + png_uint_32 mng_features_permitted)); +#endif + +/* For use in png_set_keep_unknown, added to version 1.2.6 */ +#define PNG_HANDLE_CHUNK_AS_DEFAULT 0 +#define PNG_HANDLE_CHUNK_NEVER 1 +#define PNG_HANDLE_CHUNK_IF_SAFE 2 +#define PNG_HANDLE_CHUNK_ALWAYS 3 +#define PNG_HANDLE_CHUNK_LAST 4 + +/* Strip the prepended error numbers ("#nnn ") from error and warning + * messages before passing them to the error or warning handler. + */ +#ifdef PNG_ERROR_NUMBERS_SUPPORTED +PNG_EXPORT(185, void, png_set_strip_error_numbers, (png_structrp png_ptr, + png_uint_32 strip_mode)); +#endif + +/* Added in libpng-1.2.6 */ +#ifdef PNG_SET_USER_LIMITS_SUPPORTED +PNG_EXPORT(186, void, png_set_user_limits, (png_structrp png_ptr, + png_uint_32 user_width_max, png_uint_32 user_height_max)); +PNG_EXPORT(187, png_uint_32, png_get_user_width_max, + (png_const_structrp png_ptr)); +PNG_EXPORT(188, png_uint_32, png_get_user_height_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.0 */ +PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structrp png_ptr, + png_uint_32 user_chunk_cache_max)); +PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.1 */ +PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structrp png_ptr, + png_alloc_size_t user_chunk_cache_max)); +PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max, + (png_const_structrp png_ptr)); +#endif + +#if defined(PNG_INCH_CONVERSIONS_SUPPORTED) +PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_FP_EXPORT(196, float, png_get_x_offset_inches, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structrp png_ptr, + png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +# ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +# endif /* PNG_pHYs_SUPPORTED */ +#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */ + +/* Added in libpng-1.4.0 */ +#ifdef PNG_IO_STATE_SUPPORTED +PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_const_structrp png_ptr)); + +/* Removed from libpng 1.6; use png_get_io_chunk_type. */ +PNG_REMOVED(200, png_const_bytep, png_get_io_chunk_name, (png_structrp png_ptr), + PNG_DEPRECATED) + +PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, + (png_const_structrp png_ptr)); + +/* The flags returned by png_get_io_state() are the following: */ +# define PNG_IO_NONE 0x0000 /* no I/O at this moment */ +# define PNG_IO_READING 0x0001 /* currently reading */ +# define PNG_IO_WRITING 0x0002 /* currently writing */ +# define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ +# define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ +# define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ +# define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ +# define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ +# define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ +#endif /* ?PNG_IO_STATE_SUPPORTED */ + +/* Interlace support. The following macros are always defined so that if + * libpng interlace handling is turned off the macros may be used to handle + * interlaced images within the application. + */ +#define PNG_INTERLACE_ADAM7_PASSES 7 + +/* Two macros to return the first row and first column of the original, + * full, image which appears in a given pass. 'pass' is in the range 0 + * to 6 and the result is in the range 0 to 7. + */ +#define PNG_PASS_START_ROW(pass) (((1&~(pass))<<(3-((pass)>>1)))&7) +#define PNG_PASS_START_COL(pass) (((1& (pass))<<(3-(((pass)+1)>>1)))&7) + +/* A macro to return the offset between pixels in the output row for a pair of + * pixels in the input - effectively the inverse of the 'COL_SHIFT' macro that + * follows. Note that ROW_OFFSET is the offset from one row to the next whereas + * COL_OFFSET is from one column to the next, within a row. + */ +#define PNG_PASS_ROW_OFFSET(pass) ((pass)>2?(8>>(((pass)-1)>>1)):8) +#define PNG_PASS_COL_OFFSET(pass) (1<<((7-(pass))>>1)) + +/* Two macros to help evaluate the number of rows or columns in each + * pass. This is expressed as a shift - effectively log2 of the number or + * rows or columns in each 8x8 tile of the original image. + */ +#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) +#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) + +/* Hence two macros to determine the number of rows or columns in a given + * pass of an image given its height or width. In fact these macros may + * return non-zero even though the sub-image is empty, because the other + * dimension may be empty for a small image. + */ +#define PNG_PASS_ROWS(height, pass) (((height)+(((1<>PNG_PASS_ROW_SHIFT(pass)) +#define PNG_PASS_COLS(width, pass) (((width)+(((1<>PNG_PASS_COL_SHIFT(pass)) + +/* For the reader row callbacks (both progressive and sequential) it is + * necessary to find the row in the output image given a row in an interlaced + * image, so two more macros: + */ +#define PNG_ROW_FROM_PASS_ROW(y_in, pass) \ + (((y_in)<>(((7-(off))-(pass))<<2)) & 0xF) | \ + ((0x01145AF0>>(((7-(off))-(pass))<<2)) & 0xF0)) + +#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ + ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) +#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ + ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) + +#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED +/* With these routines we avoid an integer divide, which will be slower on + * most machines. However, it does take more operations than the corresponding + * divide method, so it may be slower on a few RISC systems. There are two + * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. + * + * Note that the rounding factors are NOT supposed to be the same! 128 and + * 32768 are correct for the NODIV code; 127 and 32767 are correct for the + * standard method. + * + * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] + */ + + /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ + +# define png_composite(composite, fg, alpha, bg) \ + { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ + * (png_uint_16)(alpha) \ + + (png_uint_16)(bg)*(png_uint_16)(255 \ + - (png_uint_16)(alpha)) + 128); \ + (composite) = (png_byte)((temp + (temp >> 8)) >> 8); } + +# define png_composite_16(composite, fg, alpha, bg) \ + { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ + * (png_uint_32)(alpha) \ + + (png_uint_32)(bg)*(65535 \ + - (png_uint_32)(alpha)) + 32768); \ + (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); } + +#else /* Standard method using integer division */ + +# define png_composite(composite, fg, alpha, bg) \ + (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \ + (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ + 127) / 255) + +# define png_composite_16(composite, fg, alpha, bg) \ + (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \ + (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \ + 32767) / 65535) +#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */ + +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf)); +PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf)); +PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf)); +#endif + +PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_const_structrp png_ptr, + png_const_bytep buf)); +/* No png_get_int_16 -- may be added if there's a real need for it. */ + +/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i)); +#endif +#ifdef PNG_SAVE_INT_32_SUPPORTED +PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i)); +#endif + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); +/* No png_save_int_16 -- may be added if there's a real need for it. */ +#endif + +#ifdef PNG_USE_READ_MACROS +/* Inline macros to do direct reads of bytes from the input buffer. + * The png_get_int_32() routine assumes we are using two's complement + * format for negative values, which is almost certainly true. + */ +# define PNG_get_uint_32(buf) \ + (((png_uint_32)(*(buf)) << 24) + \ + ((png_uint_32)(*((buf) + 1)) << 16) + \ + ((png_uint_32)(*((buf) + 2)) << 8) + \ + ((png_uint_32)(*((buf) + 3)))) + + /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the + * function) incorrectly returned a value of type png_uint_32. + */ +# define PNG_get_uint_16(buf) \ + ((png_uint_16) \ + (((unsigned int)(*(buf)) << 8) + \ + ((unsigned int)(*((buf) + 1))))) + +# define PNG_get_int_32(buf) \ + ((png_int_32)((*(buf) & 0x80) \ + ? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffffL) + 1)) \ + : (png_int_32)png_get_uint_32(buf))) + + /* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h, + * but defining a macro name prefixed with PNG_PREFIX. + */ +# ifndef PNG_PREFIX +# define png_get_uint_32(buf) PNG_get_uint_32(buf) +# define png_get_uint_16(buf) PNG_get_uint_16(buf) +# define png_get_int_32(buf) PNG_get_int_32(buf) +# endif +#else +# ifdef PNG_PREFIX + /* No macros; revert to the (redefined) function */ +# define PNG_get_uint_32 (png_get_uint_32) +# define PNG_get_uint_16 (png_get_uint_16) +# define PNG_get_int_32 (png_get_int_32) +# endif +#endif + +/******************************************************************************* + * SIMPLIFIED API + ******************************************************************************* + * + * Please read the documentation in libpng-manual.txt (TODO: write said + * documentation) if you don't understand what follows. + * + * The simplified API hides the details of both libpng and the PNG file format + * itself. It allows PNG files to be read into a very limited number of + * in-memory bitmap formats or to be written from the same formats. If these + * formats do not accomodate your needs then you can, and should, use the more + * sophisticated APIs above - these support a wide variety of in-memory formats + * and a wide variety of sophisticated transformations to those formats as well + * as a wide variety of APIs to manipulate ancillary information. + * + * To read a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure (see below) on the stack and set the + * version field to PNG_IMAGE_VERSION. + * 2) Call the appropriate png_image_begin_read... function. + * 3) Set the png_image 'format' member to the required sample format. + * 4) Allocate a buffer for the image and, if required, the color-map. + * 5) Call png_image_finish_read to read the image and, if required, the + * color-map into your buffers. + * + * There are no restrictions on the format of the PNG input itself; all valid + * color types, bit depths, and interlace methods are acceptable, and the + * input image is transformed as necessary to the requested in-memory format + * during the png_image_finish_read() step. The only caveat is that if you + * request a color-mapped image from a PNG that is full-color or makes + * complex use of an alpha channel the transformation is extremely lossy and the + * result may look terrible. + * + * To write a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure on the stack and memset() it to all zero. + * 2) Initialize the members of the structure that describe the image, setting + * the 'format' member to the format of the image samples. + * 3) Call the appropriate png_image_write... function with a pointer to the + * image and, if necessary, the color-map to write the PNG data. + * + * png_image is a structure that describes the in-memory format of an image + * when it is being read or defines the in-memory format of an image that you + * need to write: + */ +#define PNG_IMAGE_VERSION 1 + +typedef struct png_control *png_controlp; +typedef struct +{ + png_controlp opaque; /* Initialize to NULL, free with png_image_free */ + png_uint_32 version; /* Set to PNG_IMAGE_VERSION */ + png_uint_32 width; /* Image width in pixels (columns) */ + png_uint_32 height; /* Image height in pixels (rows) */ + png_uint_32 format; /* Image format as defined below */ + png_uint_32 flags; /* A bit mask containing informational flags */ + png_uint_32 colormap_entries; + /* Number of entries in the color-map */ + + /* In the event of an error or warning the following field will be set to a + * non-zero value and the 'message' field will contain a '\0' terminated + * string with the libpng error or warning message. If both warnings and + * an error were encountered, only the error is recorded. If there + * are multiple warnings, only the first one is recorded. + * + * The upper 30 bits of this value are reserved, the low two bits contain + * a value as follows: + */ +# define PNG_IMAGE_WARNING 1 +# define PNG_IMAGE_ERROR 2 + /* + * The result is a two bit code such that a value more than 1 indicates + * a failure in the API just called: + * + * 0 - no warning or error + * 1 - warning + * 2 - error + * 3 - error preceded by warning + */ +# define PNG_IMAGE_FAILED(png_cntrl) ((((png_cntrl).warning_or_error)&0x03)>1) + + png_uint_32 warning_or_error; + + char message[64]; +} png_image, *png_imagep; + +/* The samples of the image have one to four channels whose components have + * original values in the range 0 to 1.0: + * + * 1: A single gray or luminance channel (G). + * 2: A gray/luminance channel and an alpha channel (GA). + * 3: Three red, green, blue color channels (RGB). + * 4: Three color channels and an alpha channel (RGBA). + * + * The components are encoded in one of two ways: + * + * a) As a small integer, value 0..255, contained in a single byte. For the + * alpha channel the original value is simply value/255. For the color or + * luminance channels the value is encoded according to the sRGB specification + * and matches the 8-bit format expected by typical display devices. + * + * The color/gray channels are not scaled (pre-multiplied) by the alpha + * channel and are suitable for passing to color management software. + * + * b) As a value in the range 0..65535, contained in a 2-byte integer. All + * channels can be converted to the original value by dividing by 65535; all + * channels are linear. Color channels use the RGB encoding (RGB end-points) of + * the sRGB specification. This encoding is identified by the + * PNG_FORMAT_FLAG_LINEAR flag below. + * + * When the simplified API needs to convert between sRGB and linear colorspaces, + * the actual sRGB transfer curve defined in the sRGB specification (see the + * article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2 + * approximation used elsewhere in libpng. + * + * When an alpha channel is present it is expected to denote pixel coverage + * of the color or luminance channels and is returned as an associated alpha + * channel: the color/gray channels are scaled (pre-multiplied) by the alpha + * value. + * + * The samples are either contained directly in the image data, between 1 and 8 + * bytes per pixel according to the encoding, or are held in a color-map indexed + * by bytes in the image data. In the case of a color-map the color-map entries + * are individual samples, encoded as above, and the image data has one byte per + * pixel to select the relevant sample from the color-map. + */ + +/* PNG_FORMAT_* + * + * #defines to be used in png_image::format. Each #define identifies a + * particular layout of sample data and, if present, alpha values. There are + * separate defines for each of the two component encodings. + * + * A format is built up using single bit flag values. All combinations are + * valid. Formats can be built up from the flag values or you can use one of + * the predefined values below. When testing formats always use the FORMAT_FLAG + * macros to test for individual features - future versions of the library may + * add new flags. + * + * When reading or writing color-mapped images the format should be set to the + * format of the entries in the color-map then png_image_{read,write}_colormap + * called to read or write the color-map and set the format correctly for the + * image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! + * + * NOTE: libpng can be built with particular features disabled, if you see + * compiler errors because the definition of one of the following flags has been + * compiled out it is because libpng does not have the required support. It is + * possible, however, for the libpng configuration to enable the format on just + * read or just write; in that case you may see an error at run time. You can + * guard against this by checking for the definition of the appropriate + * "_SUPPORTED" macro, one of: + * + * PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED + */ +#define PNG_FORMAT_FLAG_ALPHA 0x01U /* format with an alpha channel */ +#define PNG_FORMAT_FLAG_COLOR 0x02U /* color format: otherwise grayscale */ +#define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2 byte channels else 1 byte */ +#define PNG_FORMAT_FLAG_COLORMAP 0x08U /* image data is color-mapped */ + +#ifdef PNG_FORMAT_BGR_SUPPORTED +# define PNG_FORMAT_FLAG_BGR 0x10U /* BGR colors, else order is RGB */ +#endif + +#ifdef PNG_FORMAT_AFIRST_SUPPORTED +# define PNG_FORMAT_FLAG_AFIRST 0x20U /* alpha channel comes first */ +#endif + +/* Commonly used formats have predefined macros. + * + * First the single byte (sRGB) formats: + */ +#define PNG_FORMAT_GRAY 0 +#define PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA +#define PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR +#define PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR) +#define PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST) + +/* Then the linear 2-byte formats. When naming these "Y" is used to + * indicate a luminance (gray) channel. + */ +#define PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR +#define PNG_FORMAT_LINEAR_Y_ALPHA (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_LINEAR_RGB (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR) +#define PNG_FORMAT_LINEAR_RGB_ALPHA \ + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA) + +/* With color-mapped formats the image data is one byte for each pixel, the byte + * is an index into the color-map which is formatted as above. To obtain a + * color-mapped format it is sufficient just to add the PNG_FOMAT_FLAG_COLORMAP + * to one of the above definitions, or you can use one of the definitions below. + */ +#define PNG_FORMAT_RGB_COLORMAP (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGR_COLORMAP (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_RGBA_COLORMAP (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ARGB_COLORMAP (PNG_FORMAT_ARGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGRA_COLORMAP (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ABGR_COLORMAP (PNG_FORMAT_ABGR|PNG_FORMAT_FLAG_COLORMAP) + +/* PNG_IMAGE macros + * + * These are convenience macros to derive information from a png_image + * structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the + * actual image sample values - either the entries in the color-map or the + * pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values + * for the pixels and will always return 1 for color-mapped formats. The + * remaining macros return information about the rows in the image and the + * complete image. + * + * NOTE: All the macros that take a png_image::format parameter are compile time + * constants if the format parameter is, itself, a constant. Therefore these + * macros can be used in array declarations and case labels where required. + * Similarly the macros are also pre-processor constants (sizeof is not used) so + * they can be used in #if tests. + * + * First the information about the samples. + */ +#define PNG_IMAGE_SAMPLE_CHANNELS(fmt)\ + (((fmt)&(PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA))+1) + /* Return the total number of channels in a given format: 1..4 */ + +#define PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)\ + ((((fmt) & PNG_FORMAT_FLAG_LINEAR) >> 2)+1) + /* Return the size in bytes of a single component of a pixel or color-map + * entry (as appropriate) in the image: 1 or 2. + */ + +#define PNG_IMAGE_SAMPLE_SIZE(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)) + /* This is the size of the sample data for one sample. If the image is + * color-mapped it is the size of one color-map entry (and image pixels are + * one byte in size), otherwise it is the size of one image pixel. + */ + +#define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256) + /* The maximum size of the color-map required by the format expressed in a + * count of components. This can be used to compile-time allocate a + * color-map: + * + * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; + * + * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; + * + * Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the + * information from one of the png_image_begin_read_ APIs and dynamically + * allocate the required memory. + */ + +/* Corresponding information about the pixels */ +#define PNG_IMAGE_PIXEL_(test,fmt)\ + (((fmt)&PNG_FORMAT_FLAG_COLORMAP)?1:test(fmt)) + +#define PNG_IMAGE_PIXEL_CHANNELS(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_CHANNELS,fmt) + /* The number of separate channels (components) in a pixel; 1 for a + * color-mapped image. + */ + +#define PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_COMPONENT_SIZE,fmt) + /* The size, in bytes, of each component in a pixel; 1 for a color-mapped + * image. + */ + +#define PNG_IMAGE_PIXEL_SIZE(fmt) PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_SIZE,fmt) + /* The size, in bytes, of a complete pixel; 1 for a color-mapped image. */ + +/* Information about the whole row, or whole image */ +#define PNG_IMAGE_ROW_STRIDE(image)\ + (PNG_IMAGE_PIXEL_CHANNELS((image).format) * (image).width) + /* Return the total number of components in a single row of the image; this + * is the minimum 'row stride', the minimum count of components between each + * row. For a color-mapped image this is the minimum number of bytes in a + * row. + */ + +#define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\ + (PNG_IMAGE_PIXEL_COMPONENT_SIZE((image).format)*(image).height*(row_stride)) + /* Return the size, in bytes, of an image buffer given a png_image and a row + * stride - the number of components to leave space for in each row. + */ + +#define PNG_IMAGE_SIZE(image)\ + PNG_IMAGE_BUFFER_SIZE(image, PNG_IMAGE_ROW_STRIDE(image)) + /* Return the size, in bytes, of the image in memory given just a png_image; + * the row stride is the minimum stride required for the image. + */ + +#define PNG_IMAGE_COLORMAP_SIZE(image)\ + (PNG_IMAGE_SAMPLE_SIZE((image).format) * (image).colormap_entries) + /* Return the size, in bytes, of the color-map of this image. If the image + * format is not a color-map format this will return a size sufficient for + * 256 entries in the given format; check PNG_FORMAT_FLAG_COLORMAP if + * you don't want to allocate a color-map in this case. + */ + +/* PNG_IMAGE_FLAG_* + * + * Flags containing additional information about the image are held in the + * 'flags' field of png_image. + */ +#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 0x01 + /* This indicates the the RGB values of the in-memory bitmap do not + * correspond to the red, green and blue end-points defined by sRGB. + */ + +#define PNG_IMAGE_FLAG_FAST 0x02 + /* On write emphasise speed over compression; the resultant PNG file will be + * larger but will be produced significantly faster, particular for large + * images. Do not use this option for images which will be distributed, only + * used it when producing intermediate files that will be read back in + * repeatedly. For a typical 24-bit image the option will double the read + * speed at the cost of increasing the image size by 25%, however for many + * more compressible images the PNG file can be 10 times larger with only a + * slight speed gain. + */ + +#define PNG_IMAGE_FLAG_16BIT_sRGB 0x04 + /* On read if the image is a 16-bit per component image and there is no gAMA + * or sRGB chunk assume that the components are sRGB encoded. Notice that + * images output by the simplified API always have gamma information; setting + * this flag only affects the interpretation of 16-bit images from an + * external source. It is recommended that the application expose this flag + * to the user; the user can normally easily recognize the difference between + * linear and sRGB encoding. This flag has no effect on write - the data + * passed to the write APIs must have the correct encoding (as defined + * above.) + * + * If the flag is not set (the default) input 16-bit per component data is + * assumed to be linear. + * + * NOTE: the flag can only be set after the png_image_begin_read_ call, + * because that call initializes the 'flags' field. + */ + +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +/* READ APIs + * --------- + * + * The png_image passed to the read APIs must have been initialized by setting + * the png_controlp field 'opaque' to NULL (or, safer, memset the whole thing.) + */ +#ifdef PNG_STDIO_SUPPORTED +PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image, + const char *file_name)); + /* The named file is opened for read and the image header is filled in + * from the PNG header in the file. + */ + +PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image, + FILE* file)); + /* The PNG header is read from the stdio FILE object. */ +#endif /* PNG_STDIO_SUPPORTED */ + +PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image, + png_const_voidp memory, png_size_t size)); + /* The PNG header is read from the given memory buffer. */ + +PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image, + png_const_colorp background, void *buffer, png_int_32 row_stride, + void *colormap)); + /* Finish reading the image into the supplied buffer and clean up the + * png_image structure. + * + * row_stride is the step, in byte or 2-byte units as appropriate, + * between adjacent rows. A positive stride indicates that the top-most row + * is first in the buffer - the normal top-down arrangement. A negative + * stride indicates that the bottom-most row is first in the buffer. + * + * background need only be supplied if an alpha channel must be removed from + * a png_byte format and the removal is to be done by compositing on a solid + * color; otherwise it may be NULL and any composition will be done directly + * onto the buffer. The value is an sRGB color to use for the background, + * for grayscale output the green channel is used. + * + * background must be supplied when an alpha channel must be removed from a + * single byte color-mapped output format, in other words if: + * + * 1) The original format from png_image_begin_read_from_* had + * PNG_FORMAT_FLAG_ALPHA set. + * 2) The format set by the application does not. + * 3) The format set by the application has PNG_FORMAT_FLAG_COLORMAP set and + * PNG_FORMAT_FLAG_LINEAR *not* set. + * + * For linear output removing the alpha channel is always done by compositing + * on black and background is ignored. + * + * colormap must be supplied when PNG_FORMAT_FLAG_COLORMAP is set. It must + * be at least the size (in bytes) returned by PNG_IMAGE_COLORMAP_SIZE. + * image->colormap_entries will be updated to the actual number of entries + * written to the colormap; this may be less than the original value. + */ + +PNG_EXPORT(238, void, png_image_free, (png_imagep image)); + /* Free any data allocated by libpng in image->opaque, setting the pointer to + * NULL. May be called at any time after the structure is initialized. + */ +#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */ + +#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED +/* WRITE APIS + * ---------- + * For write you must initialize a png_image structure to describe the image to + * be written. To do this use memset to set the whole structure to 0 then + * initialize fields describing your image. + * + * version: must be set to PNG_IMAGE_VERSION + * opaque: must be initialized to NULL + * width: image width in pixels + * height: image height in rows + * format: the format of the data (image and color-map) you wish to write + * flags: set to 0 unless one of the defined flags applies; set + * PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB for color format images where the RGB + * values do not correspond to the colors in sRGB. + * colormap_entries: set to the number of entries in the color-map (0 to 256) + */ +PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image, + const char *file, int convert_to_8bit, const void *buffer, + png_int_32 row_stride, const void *colormap)); + /* Write the image to the named file. */ + +PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file, + int convert_to_8_bit, const void *buffer, png_int_32 row_stride, + const void *colormap)); + /* Write the image to the given (FILE*). */ + +/* With both write APIs if image is in one of the linear formats with 16-bit + * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG + * gamma encoded according to the sRGB specification, otherwise a 16-bit linear + * encoded PNG file is written. + * + * With color-mapped data formats the colormap parameter point to a color-map + * with at least image->colormap_entries encoded in the specified format. If + * the format is linear the written PNG color-map will be converted to sRGB + * regardless of the convert_to_8_bit flag. + * + * With all APIs row_stride is handled as in the read APIs - it is the spacing + * from one row to the next in component sized units (1 or 2 bytes) and if + * negative indicates a bottom-up row layout in the buffer. + * + * Note that the write API does not support interlacing or sub-8-bit pixels. + */ +#endif /* PNG_SIMPLIFIED_WRITE_SUPPORTED */ +/******************************************************************************* + * END OF SIMPLIFIED API + ******************************************************************************/ + +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +PNG_EXPORT(242, void, png_set_check_for_invalid_index, + (png_structrp png_ptr, int allowed)); +# ifdef PNG_GET_PALETTE_MAX_SUPPORTED +PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr, + png_const_infop info_ptr)); +# endif +#endif /* CHECK_FOR_INVALID_INDEX */ + +/******************************************************************************* + * IMPLEMENTATION OPTIONS + ******************************************************************************* + * + * Support for arbitrary implementation-specific optimizations. The API allows + * particular options to be turned on or off. 'Option' is the number of the + * option and 'onoff' is 0 (off) or non-0 (on). The value returned is given + * by the PNG_OPTION_ defines below. + * + * HARDWARE: normally hardware capabilites, such as the Intel SSE instructions, + * are detected at run time, however sometimes it may be impossible + * to do this in user mode, in which case it is necessary to discover + * the capabilities in an OS specific way. Such capabilities are + * listed here when libpng has support for them and must be turned + * ON by the application if present. + * + * SOFTWARE: sometimes software optimizations actually result in performance + * decrease on some architectures or systems, or with some sets of + * PNG images. 'Software' options allow such optimizations to be + * selected at run time. + */ +#ifdef PNG_SET_OPTION_SUPPORTED +#ifdef PNG_ARM_NEON_API_SUPPORTED +# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */ +#endif +#define PNG_OPTION_NEXT 2 /* Next option - numbers must be even */ + +/* Return values: NOTE: there are four values and 'off' is *not* zero */ +#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */ +#define PNG_OPTION_INVALID 1 /* Option number out of range */ +#define PNG_OPTION_OFF 2 +#define PNG_OPTION_ON 3 + +PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option, + int onoff)); +#endif + +/******************************************************************************* + * END OF HARDWARE OPTIONS + ******************************************************************************/ + +/* Maintainer: Put new public prototypes here ^, in libpng.3, and project + * defs, scripts/pnglibconf.h, and scripts/pnglibconf.h.prebuilt + */ + +/* The last ordinal number (this is the *last* one already used; the next + * one to use is one more than this.) Maintainer, remember to add an entry to + * scripts/symbols.def as well. + */ +#ifdef PNG_EXPORT_LAST_ORDINAL + PNG_EXPORT_LAST_ORDINAL(244); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* PNG_VERSION_INFO_ONLY */ +/* Do not put anything past this line */ +#endif /* PNG_H */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngbar.jpg b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngbar.jpg new file mode 100644 index 0000000000..70ba8d817c Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngbar.jpg differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngbar.png b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngbar.png new file mode 100644 index 0000000000..49798c8ed9 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngbar.png differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngconf.h b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngconf.h new file mode 100644 index 0000000000..31f996757b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngconf.h @@ -0,0 +1,616 @@ + +/* pngconf.h - machine configurable file for libpng + * + * libpng version 1.6.2 - April 25, 2013 + * + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + */ + +/* Any machine specific code is near the front of this file, so if you + * are configuring libpng for a machine, you may want to read the section + * starting here down to where it starts to typedef png_color, png_text, + * and png_info. + */ + +#ifndef PNGCONF_H +#define PNGCONF_H + +/* To do: Do all of this in scripts/pnglibconf.dfa */ +#ifdef PNG_SAFE_LIMITS_SUPPORTED +# ifdef PNG_USER_WIDTH_MAX +# undef PNG_USER_WIDTH_MAX +# define PNG_USER_WIDTH_MAX 1000000L +# endif +# ifdef PNG_USER_HEIGHT_MAX +# undef PNG_USER_HEIGHT_MAX +# define PNG_USER_HEIGHT_MAX 1000000L +# endif +# ifdef PNG_USER_CHUNK_MALLOC_MAX +# undef PNG_USER_CHUNK_MALLOC_MAX +# define PNG_USER_CHUNK_MALLOC_MAX 4000000L +# endif +# ifdef PNG_USER_CHUNK_CACHE_MAX +# undef PNG_USER_CHUNK_CACHE_MAX +# define PNG_USER_CHUNK_CACHE_MAX 128 +# endif +#endif + +#ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */ + +/* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C + * compiler for correct compilation. The following header files are required by + * the standard. If your compiler doesn't provide these header files, or they + * do not match the standard, you will need to provide/improve them. + */ +#include +#include + +/* Library header files. These header files are all defined by ISOC90; libpng + * expects conformant implementations, however, an ISOC90 conformant system need + * not provide these header files if the functionality cannot be implemented. + * In this case it will be necessary to disable the relevant parts of libpng in + * the build of pnglibconf.h. + * + * Prior to 1.6.0 string.h was included here; the API changes in 1.6.0 to not + * include this unnecessary header file. + */ + +#ifdef PNG_STDIO_SUPPORTED + /* Required for the definition of FILE: */ +# include +#endif + +#ifdef PNG_SETJMP_SUPPORTED + /* Required for the definition of jmp_buf and the declaration of longjmp: */ +# include +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED + /* Required for struct tm: */ +# include +#endif + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +/* Prior to 1.6.0 it was possible to turn off 'const' in declarations using + * PNG_NO_CONST; this is no longer supported except for data declarations which + * apparently still cause problems in 2011 on some compilers. + */ +#define PNG_CONST const /* backward compatibility only */ + +/* This controls optimization of the reading of 16 and 32 bit values + * from PNG files. It can be set on a per-app-file basis - it + * just changes whether a macro is used when the function is called. + * The library builder sets the default; if read functions are not + * built into the library the macro implementation is forced on. + */ +#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED +# define PNG_USE_READ_MACROS +#endif +#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) +# if PNG_DEFAULT_READ_MACROS +# define PNG_USE_READ_MACROS +# endif +#endif + +/* COMPILER SPECIFIC OPTIONS. + * + * These options are provided so that a variety of difficult compilers + * can be used. Some are fixed at build time (e.g. PNG_API_RULE + * below) but still have compiler specific implementations, others + * may be changed on a per-file basis when compiling against libpng. + */ + +/* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect + * against legacy (pre ISOC90) compilers that did not understand function + * prototypes. It is not required for modern C compilers. + */ +#ifndef PNGARG +# define PNGARG(arglist) arglist +#endif + +/* Function calling conventions. + * ============================= + * Normally it is not necessary to specify to the compiler how to call + * a function - it just does it - however on x86 systems derived from + * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems + * and some others) there are multiple ways to call a function and the + * default can be changed on the compiler command line. For this reason + * libpng specifies the calling convention of every exported function and + * every function called via a user supplied function pointer. This is + * done in this file by defining the following macros: + * + * PNGAPI Calling convention for exported functions. + * PNGCBAPI Calling convention for user provided (callback) functions. + * PNGCAPI Calling convention used by the ANSI-C library (required + * for longjmp callbacks and sometimes used internally to + * specify the calling convention for zlib). + * + * These macros should never be overridden. If it is necessary to + * change calling convention in a private build this can be done + * by setting PNG_API_RULE (which defaults to 0) to one of the values + * below to select the correct 'API' variants. + * + * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout. + * This is correct in every known environment. + * PNG_API_RULE=1 Use the operating system convention for PNGAPI and + * the 'C' calling convention (from PNGCAPI) for + * callbacks (PNGCBAPI). This is no longer required + * in any known environment - if it has to be used + * please post an explanation of the problem to the + * libpng mailing list. + * + * These cases only differ if the operating system does not use the C + * calling convention, at present this just means the above cases + * (x86 DOS/Windows sytems) and, even then, this does not apply to + * Cygwin running on those systems. + * + * Note that the value must be defined in pnglibconf.h so that what + * the application uses to call the library matches the conventions + * set when building the library. + */ + +/* Symbol export + * ============= + * When building a shared library it is almost always necessary to tell + * the compiler which symbols to export. The png.h macro 'PNG_EXPORT' + * is used to mark the symbols. On some systems these symbols can be + * extracted at link time and need no special processing by the compiler, + * on other systems the symbols are flagged by the compiler and just + * the declaration requires a special tag applied (unfortunately) in a + * compiler dependent way. Some systems can do either. + * + * A small number of older systems also require a symbol from a DLL to + * be flagged to the program that calls it. This is a problem because + * we do not know in the header file included by application code that + * the symbol will come from a shared library, as opposed to a statically + * linked one. For this reason the application must tell us by setting + * the magic flag PNG_USE_DLL to turn on the special processing before + * it includes png.h. + * + * Four additional macros are used to make this happen: + * + * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from + * the build or imported if PNG_USE_DLL is set - compiler + * and system specific. + * + * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to + * 'type', compiler specific. + * + * PNG_DLL_EXPORT Set to the magic to use during a libpng build to + * make a symbol exported from the DLL. Not used in the + * public header files; see pngpriv.h for how it is used + * in the libpng build. + * + * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come + * from a DLL - used to define PNG_IMPEXP when + * PNG_USE_DLL is set. + */ + +/* System specific discovery. + * ========================== + * This code is used at build time to find PNG_IMPEXP, the API settings + * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL + * import processing is possible. On Windows systems it also sets + * compiler-specific macros to the values required to change the calling + * conventions of the various functions. + */ +#if defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\ + defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) + /* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or + * MinGW on any architecture currently supported by Windows. Also includes + * Watcom builds but these need special treatment because they are not + * compatible with GCC or Visual C because of different calling conventions. + */ +# if PNG_API_RULE == 2 + /* If this line results in an error, either because __watcall is not + * understood or because of a redefine just below you cannot use *this* + * build of the library with the compiler you are using. *This* build was + * build using Watcom and applications must also be built using Watcom! + */ +# define PNGCAPI __watcall +# endif + +# if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800)) +# define PNGCAPI __cdecl +# if PNG_API_RULE == 1 + /* If this line results in an error __stdcall is not understood and + * PNG_API_RULE should not have been set to '1'. + */ +# define PNGAPI __stdcall +# endif +# else + /* An older compiler, or one not detected (erroneously) above, + * if necessary override on the command line to get the correct + * variants for the compiler. + */ +# ifndef PNGCAPI +# define PNGCAPI _cdecl +# endif +# if PNG_API_RULE == 1 && !defined(PNGAPI) +# define PNGAPI _stdcall +# endif +# endif /* compiler/api */ + /* NOTE: PNGCBAPI always defaults to PNGCAPI. */ + +# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD) +# error "PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed" +# endif + +# if (defined(_MSC_VER) && _MSC_VER < 800) ||\ + (defined(__BORLANDC__) && __BORLANDC__ < 0x500) + /* older Borland and MSC + * compilers used '__export' and required this to be after + * the type. + */ +# ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP +# endif +# define PNG_DLL_EXPORT __export +# else /* newer compiler */ +# define PNG_DLL_EXPORT __declspec(dllexport) +# ifndef PNG_DLL_IMPORT +# define PNG_DLL_IMPORT __declspec(dllimport) +# endif +# endif /* compiler */ + +#else /* !Windows */ +# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) +# define PNGAPI _System +# else /* !Windows/x86 && !OS/2 */ + /* Use the defaults, or define PNG*API on the command line (but + * this will have to be done for every compile!) + */ +# endif /* other system, !OS/2 */ +#endif /* !Windows/x86 */ + +/* Now do all the defaulting . */ +#ifndef PNGCAPI +# define PNGCAPI +#endif +#ifndef PNGCBAPI +# define PNGCBAPI PNGCAPI +#endif +#ifndef PNGAPI +# define PNGAPI PNGCAPI +#endif + +/* PNG_IMPEXP may be set on the compilation system command line or (if not set) + * then in an internal header file when building the library, otherwise (when + * using the library) it is set here. + */ +#ifndef PNG_IMPEXP +# if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT) + /* This forces use of a DLL, disallowing static linking */ +# define PNG_IMPEXP PNG_DLL_IMPORT +# endif + +# ifndef PNG_IMPEXP +# define PNG_IMPEXP +# endif +#endif + +/* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat + * 'attributes' as a storage class - the attributes go at the start of the + * function definition, and attributes are always appended regardless of the + * compiler. This considerably simplifies these macros but may cause problems + * if any compilers both need function attributes and fail to handle them as + * a storage class (this is unlikely.) + */ +#ifndef PNG_FUNCTION +# define PNG_FUNCTION(type, name, args, attributes) attributes type name args +#endif + +#ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) PNG_IMPEXP type +#endif + + /* The ordinal value is only relevant when preprocessing png.h for symbol + * table entries, so we discard it here. See the .dfn files in the + * scripts directory. + */ +#ifndef PNG_EXPORTA + +# define PNG_EXPORTA(ordinal, type, name, args, attributes)\ + PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args), \ + extern attributes) +#endif + +/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument, + * so make something non-empty to satisfy the requirement: + */ +#define PNG_EMPTY /*empty list*/ + +#define PNG_EXPORT(ordinal, type, name, args)\ + PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY) + +/* Use PNG_REMOVED to comment out a removed interface. */ +#ifndef PNG_REMOVED +# define PNG_REMOVED(ordinal, type, name, args, attributes) +#endif + +#ifndef PNG_CALLBACK +# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args) +#endif + +/* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. + * + * Added at libpng-1.2.41. + */ + +#ifndef PNG_NO_PEDANTIC_WARNINGS +# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED +# define PNG_PEDANTIC_WARNINGS_SUPPORTED +# endif +#endif + +#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED + /* Support for compiler specific function attributes. These are used + * so that where compiler support is available, incorrect use of API + * functions in png.h will generate compiler warnings. Added at libpng + * version 1.2.41. Disabling these removes the warnings but may also produce + * less efficient code. + */ +# if defined(__GNUC__) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# if __GNUC__ >= 3 +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# ifndef PNG_PRIVATE +# if 0 /* Doesn't work so we use deprecated instead*/ +# define PNG_PRIVATE \ + __attribute__((warning("This function is not exported by libpng."))) +# else +# define PNG_PRIVATE \ + __attribute__((__deprecated__)) +# endif +# endif +# if ((__GNUC__ != 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1)) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif /* __GNUC__ == 3.0 */ +# endif /* __GNUC__ >= 3 */ + +# elif defined(_MSC_VER) && (_MSC_VER >= 1300) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* not supported */ +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __declspec(noreturn) +# endif +# ifndef PNG_ALLOCATED +# if (_MSC_VER >= 1400) +# define PNG_ALLOCATED __declspec(restrict) +# endif +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __declspec(deprecated) +# endif +# ifndef PNG_PRIVATE +# define PNG_PRIVATE __declspec(deprecated) +# endif +# ifndef PNG_RESTRICT +# if (_MSC_VER >= 1400) +# define PNG_RESTRICT __restrict +# endif +# endif + +# elif defined(__WATCOMC__) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif /* _MSC_VER */ +#endif /* PNG_PEDANTIC_WARNINGS */ + +#ifndef PNG_DEPRECATED +# define PNG_DEPRECATED /* Use of this function is deprecated */ +#endif +#ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* The result of this function must be checked */ +#endif +#ifndef PNG_NORETURN +# define PNG_NORETURN /* This function does not return */ +#endif +#ifndef PNG_ALLOCATED +# define PNG_ALLOCATED /* The result of the function is new memory */ +#endif +#ifndef PNG_PRIVATE +# define PNG_PRIVATE /* This is a private libpng function */ +#endif +#ifndef PNG_RESTRICT +# define PNG_RESTRICT /* The C99 "restrict" feature */ +#endif +#ifndef PNG_FP_EXPORT /* A floating point API. */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +# define PNG_FP_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No floating point APIs */ +# define PNG_FP_EXPORT(ordinal, type, name, args) +# endif +#endif +#ifndef PNG_FIXED_EXPORT /* A fixed point API. */ +# ifdef PNG_FIXED_POINT_SUPPORTED +# define PNG_FIXED_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No fixed point APIs */ +# define PNG_FIXED_EXPORT(ordinal, type, name, args) +# endif +#endif + +#ifndef PNG_BUILDING_SYMBOL_TABLE +/* Some typedefs to get us started. These should be safe on most of the common + * platforms. + * + * png_uint_32 and png_int_32 may, currently, be larger than required to hold a + * 32-bit value however this is not normally advisable. + * + * png_uint_16 and png_int_16 should always be two bytes in size - this is + * verified at library build time. + * + * png_byte must always be one byte in size. + * + * The checks below use constants from limits.h, as defined by the ISOC90 + * standard. + */ +#if CHAR_BIT == 8 && UCHAR_MAX == 255 + typedef unsigned char png_byte; +#else +# error "libpng requires 8 bit bytes" +#endif + +#if INT_MIN == -32768 && INT_MAX == 32767 + typedef int png_int_16; +#elif SHRT_MIN == -32768 && SHRT_MAX == 32767 + typedef short png_int_16; +#else +# error "libpng requires a signed 16 bit type" +#endif + +#if UINT_MAX == 65535 + typedef unsigned int png_uint_16; +#elif USHRT_MAX == 65535 + typedef unsigned short png_uint_16; +#else +# error "libpng requires an unsigned 16 bit type" +#endif + +#if INT_MIN < -2147483646 && INT_MAX > 2147483646 + typedef int png_int_32; +#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646 + typedef long int png_int_32; +#else +# error "libpng requires a signed 32 bit (or more) type" +#endif + +#if UINT_MAX > 4294967294 + typedef unsigned int png_uint_32; +#elif ULONG_MAX > 4294967294 + typedef unsigned long int png_uint_32; +#else +# error "libpng requires an unsigned 32 bit (or more) type" +#endif + +/* Prior to 1.6.0 it was possible to disable the use of size_t, 1.6.0, however, + * requires an ISOC90 compiler and relies on consistent behavior of sizeof. + */ +typedef size_t png_size_t; +typedef ptrdiff_t png_ptrdiff_t; + +/* libpng needs to know the maximum value of 'size_t' and this controls the + * definition of png_alloc_size_t, below. This maximum value of size_t limits + * but does not control the maximum allocations the library makes - there is + * direct application control of this through png_set_user_limits(). + */ +#ifndef PNG_SMALL_SIZE_T + /* Compiler specific tests for systems where size_t is known to be less than + * 32 bits (some of these systems may no longer work because of the lack of + * 'far' support; see above.) + */ +# if (defined(__TURBOC__) && !defined(__FLAT__)) ||\ + (defined(_MSC_VER) && defined(MAXSEG_64K)) +# define PNG_SMALL_SIZE_T +# endif +#endif + +/* png_alloc_size_t is guaranteed to be no smaller than png_size_t, and no + * smaller than png_uint_32. Casts from png_size_t or png_uint_32 to + * png_alloc_size_t are not necessary; in fact, it is recommended not to use + * them at all so that the compiler can complain when something turns out to be + * problematic. + * + * Casts in the other direction (from png_alloc_size_t to png_size_t or + * png_uint_32) should be explicitly applied; however, we do not expect to + * encounter practical situations that require such conversions. + * + * PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than + * 4294967295 - i.e. less than the maximum value of png_uint_32. + */ +#ifdef PNG_SMALL_SIZE_T + typedef png_uint_32 png_alloc_size_t; +#else + typedef png_size_t png_alloc_size_t; +#endif + +/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler + * implementations of Intel CPU specific support of user-mode segmented address + * spaces, where 16-bit pointers address more than 65536 bytes of memory using + * separate 'segment' registers. The implementation requires two different + * types of pointer (only one of which includes the segment value.) + * + * If required this support is available in version 1.2 of libpng and may be + * available in versions through 1.5, although the correctness of the code has + * not been verified recently. + */ + +/* Typedef for floating-point numbers that are converted to fixed-point with a + * multiple of 100,000, e.g., gamma + */ +typedef png_int_32 png_fixed_point; + +/* Add typedefs for pointers */ +typedef void * png_voidp; +typedef const void * png_const_voidp; +typedef png_byte * png_bytep; +typedef const png_byte * png_const_bytep; +typedef png_uint_32 * png_uint_32p; +typedef const png_uint_32 * png_const_uint_32p; +typedef png_int_32 * png_int_32p; +typedef const png_int_32 * png_const_int_32p; +typedef png_uint_16 * png_uint_16p; +typedef const png_uint_16 * png_const_uint_16p; +typedef png_int_16 * png_int_16p; +typedef const png_int_16 * png_const_int_16p; +typedef char * png_charp; +typedef const char * png_const_charp; +typedef png_fixed_point * png_fixed_point_p; +typedef const png_fixed_point * png_const_fixed_point_p; +typedef png_size_t * png_size_tp; +typedef const png_size_t * png_const_size_tp; + +#ifdef PNG_STDIO_SUPPORTED +typedef FILE * png_FILE_p; +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * png_doublep; +typedef const double * png_const_doublep; +#endif + +/* Pointers to pointers; i.e. arrays */ +typedef png_byte * * png_bytepp; +typedef png_uint_32 * * png_uint_32pp; +typedef png_int_32 * * png_int_32pp; +typedef png_uint_16 * * png_uint_16pp; +typedef png_int_16 * * png_int_16pp; +typedef const char * * png_const_charpp; +typedef char * * png_charpp; +typedef png_fixed_point * * png_fixed_point_pp; +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * * png_doublepp; +#endif + +/* Pointers to pointers to pointers; i.e., pointer to array */ +typedef char * * * png_charppp; + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +#endif /* PNGCONF_H */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngdebug.h b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngdebug.h new file mode 100644 index 0000000000..16f81fdd14 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngdebug.h @@ -0,0 +1,157 @@ + +/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c + * + * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.5.0 [January 6, 2011] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* Define PNG_DEBUG at compile time for debugging information. Higher + * numbers for PNG_DEBUG mean more debugging information. This has + * only been added since version 0.95 so it is not implemented throughout + * libpng yet, but more support will be added as needed. + * + * png_debug[1-2]?(level, message ,arg{0-2}) + * Expands to a statement (either a simple expression or a compound + * do..while(0) statement) that outputs a message with parameter + * substitution if PNG_DEBUG is defined to 2 or more. If PNG_DEBUG + * is undefined, 0 or 1 every png_debug expands to a simple expression + * (actually ((void)0)). + * + * level: level of detail of message, starting at 0. A level 'n' + * message is preceded by 'n' tab characters (not implemented + * on Microsoft compilers unless PNG_DEBUG_FILE is also + * defined, to allow debug DLL compilation with no standard IO). + * message: a printf(3) style text string. A trailing '\n' is added + * to the message. + * arg: 0 to 2 arguments for printf(3) style substitution in message. + */ +#ifndef PNGDEBUG_H +#define PNGDEBUG_H +/* These settings control the formatting of messages in png.c and pngerror.c */ +/* Moved to pngdebug.h at 1.5.0 */ +# ifndef PNG_LITERAL_SHARP +# define PNG_LITERAL_SHARP 0x23 +# endif +# ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET +# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b +# endif +# ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET +# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d +# endif +# ifndef PNG_STRING_NEWLINE +# define PNG_STRING_NEWLINE "\n" +# endif + +#ifdef PNG_DEBUG +# if (PNG_DEBUG > 0) +# if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) +# include +# if (PNG_DEBUG > 1) +# ifndef _DEBUG +# define _DEBUG +# endif +# ifndef png_debug +# define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2) +# endif +# endif +# else /* PNG_DEBUG_FILE || !_MSC_VER */ +# ifndef PNG_STDIO_SUPPORTED +# include /* not included yet */ +# endif +# ifndef PNG_DEBUG_FILE +# define PNG_DEBUG_FILE stderr +# endif /* PNG_DEBUG_FILE */ + +# if (PNG_DEBUG > 1) +/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on + * non-ISO compilers + */ +# ifdef __STDC__ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ + } while (0) +# endif +# else /* __STDC __ */ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1,p2); \ + } while (0) +# endif +# endif /* __STDC __ */ +# endif /* (PNG_DEBUG > 1) */ + +# endif /* _MSC_VER */ +# endif /* (PNG_DEBUG > 0) */ +#endif /* PNG_DEBUG */ +#ifndef png_debug +# define png_debug(l, m) ((void)0) +#endif +#ifndef png_debug1 +# define png_debug1(l, m, p1) ((void)0) +#endif +#ifndef png_debug2 +# define png_debug2(l, m, p1, p2) ((void)0) +#endif +#endif /* PNGDEBUG_H */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngerror.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngerror.c new file mode 100644 index 0000000000..f469206ee4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngerror.c @@ -0,0 +1,932 @@ + +/* pngerror.c - stub functions for i/o and memory allocation + * + * Last changed in libpng 1.6.1 [March 28, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file provides a location for all error handling. Users who + * need special error handling are expected to write replacement functions + * and use png_set_error_fn() to use those functions. See the instructions + * at each function. + */ + +#include "pngpriv.h" + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + +static PNG_FUNCTION(void, png_default_error,PNGARG((png_const_structrp png_ptr, + png_const_charp error_message)),PNG_NORETURN); + +#ifdef PNG_WARNINGS_SUPPORTED +static void /* PRIVATE */ +png_default_warning PNGARG((png_const_structrp png_ptr, + png_const_charp warning_message)); +#endif /* PNG_WARNINGS_SUPPORTED */ + +/* This function is called whenever there is a fatal error. This function + * should not be changed. If there is a need to handle errors differently, + * you should supply a replacement error function and use png_set_error_fn() + * to replace the error function at run-time. + */ +#ifdef PNG_ERROR_TEXT_SUPPORTED +PNG_FUNCTION(void,PNGAPI +png_error,(png_const_structrp png_ptr, png_const_charp error_message), + PNG_NORETURN) +{ +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + char msg[16]; + if (png_ptr != NULL) + { + if (png_ptr->flags& + (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) + { + if (*error_message == PNG_LITERAL_SHARP) + { + /* Strip "#nnnn " from beginning of error message. */ + int offset; + for (offset = 1; offset<15; offset++) + if (error_message[offset] == ' ') + break; + + if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) + { + int i; + for (i = 0; i < offset - 1; i++) + msg[i] = error_message[i + 1]; + msg[i - 1] = '\0'; + error_message = msg; + } + + else + error_message += offset; + } + + else + { + if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) + { + msg[0] = '0'; + msg[1] = '\0'; + error_message = msg; + } + } + } + } +#endif + if (png_ptr != NULL && png_ptr->error_fn != NULL) + (*(png_ptr->error_fn))(png_constcast(png_structrp,png_ptr), + error_message); + + /* If the custom handler doesn't exist, or if it returns, + use the default handler, which will not return. */ + png_default_error(png_ptr, error_message); +} +#else +PNG_FUNCTION(void,PNGAPI +png_err,(png_const_structrp png_ptr),PNG_NORETURN) +{ + /* Prior to 1.5.2 the error_fn received a NULL pointer, expressed + * erroneously as '\0', instead of the empty string "". This was + * apparently an error, introduced in libpng-1.2.20, and png_default_error + * will crash in this case. + */ + if (png_ptr != NULL && png_ptr->error_fn != NULL) + (*(png_ptr->error_fn))(png_constcast(png_structrp,png_ptr), ""); + + /* If the custom handler doesn't exist, or if it returns, + use the default handler, which will not return. */ + png_default_error(png_ptr, ""); +} +#endif /* PNG_ERROR_TEXT_SUPPORTED */ + +/* Utility to safely appends strings to a buffer. This never errors out so + * error checking is not required in the caller. + */ +size_t +png_safecat(png_charp buffer, size_t bufsize, size_t pos, + png_const_charp string) +{ + if (buffer != NULL && pos < bufsize) + { + if (string != NULL) + while (*string != '\0' && pos < bufsize-1) + buffer[pos++] = *string++; + + buffer[pos] = '\0'; + } + + return pos; +} + +#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_TIME_RFC1123_SUPPORTED) +/* Utility to dump an unsigned value into a buffer, given a start pointer and + * and end pointer (which should point just *beyond* the end of the buffer!) + * Returns the pointer to the start of the formatted string. + */ +png_charp +png_format_number(png_const_charp start, png_charp end, int format, + png_alloc_size_t number) +{ + int count = 0; /* number of digits output */ + int mincount = 1; /* minimum number required */ + int output = 0; /* digit output (for the fixed point format) */ + + *--end = '\0'; + + /* This is written so that the loop always runs at least once, even with + * number zero. + */ + while (end > start && (number != 0 || count < mincount)) + { + + static const char digits[] = "0123456789ABCDEF"; + + switch (format) + { + case PNG_NUMBER_FORMAT_fixed: + /* Needs five digits (the fraction) */ + mincount = 5; + if (output || number % 10 != 0) + { + *--end = digits[number % 10]; + output = 1; + } + number /= 10; + break; + + case PNG_NUMBER_FORMAT_02u: + /* Expects at least 2 digits. */ + mincount = 2; + /* FALL THROUGH */ + + case PNG_NUMBER_FORMAT_u: + *--end = digits[number % 10]; + number /= 10; + break; + + case PNG_NUMBER_FORMAT_02x: + /* This format expects at least two digits */ + mincount = 2; + /* FALL THROUGH */ + + case PNG_NUMBER_FORMAT_x: + *--end = digits[number & 0xf]; + number >>= 4; + break; + + default: /* an error */ + number = 0; + break; + } + + /* Keep track of the number of digits added */ + ++count; + + /* Float a fixed number here: */ + if (format == PNG_NUMBER_FORMAT_fixed) if (count == 5) if (end > start) + { + /* End of the fraction, but maybe nothing was output? In that case + * drop the decimal point. If the number is a true zero handle that + * here. + */ + if (output) + *--end = '.'; + else if (number == 0) /* and !output */ + *--end = '0'; + } + } + + return end; +} +#endif + +#ifdef PNG_WARNINGS_SUPPORTED +/* This function is called whenever there is a non-fatal error. This function + * should not be changed. If there is a need to handle warnings differently, + * you should supply a replacement warning function and use + * png_set_error_fn() to replace the warning function at run-time. + */ +void PNGAPI +png_warning(png_const_structrp png_ptr, png_const_charp warning_message) +{ + int offset = 0; + if (png_ptr != NULL) + { +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + if (png_ptr->flags& + (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) +#endif + { + if (*warning_message == PNG_LITERAL_SHARP) + { + for (offset = 1; offset < 15; offset++) + if (warning_message[offset] == ' ') + break; + } + } + } + if (png_ptr != NULL && png_ptr->warning_fn != NULL) + (*(png_ptr->warning_fn))(png_constcast(png_structrp,png_ptr), + warning_message + offset); + else + png_default_warning(png_ptr, warning_message + offset); +} + +/* These functions support 'formatted' warning messages with up to + * PNG_WARNING_PARAMETER_COUNT parameters. In the format string the parameter + * is introduced by @, where 'number' starts at 1. This follows the + * standard established by X/Open for internationalizable error messages. + */ +void +png_warning_parameter(png_warning_parameters p, int number, + png_const_charp string) +{ + if (number > 0 && number <= PNG_WARNING_PARAMETER_COUNT) + (void)png_safecat(p[number-1], (sizeof p[number-1]), 0, string); +} + +void +png_warning_parameter_unsigned(png_warning_parameters p, int number, int format, + png_alloc_size_t value) +{ + char buffer[PNG_NUMBER_BUFFER_SIZE]; + png_warning_parameter(p, number, PNG_FORMAT_NUMBER(buffer, format, value)); +} + +void +png_warning_parameter_signed(png_warning_parameters p, int number, int format, + png_int_32 value) +{ + png_alloc_size_t u; + png_charp str; + char buffer[PNG_NUMBER_BUFFER_SIZE]; + + /* Avoid overflow by doing the negate in a png_alloc_size_t: */ + u = (png_alloc_size_t)value; + if (value < 0) + u = ~u + 1; + + str = PNG_FORMAT_NUMBER(buffer, format, u); + + if (value < 0 && str > buffer) + *--str = '-'; + + png_warning_parameter(p, number, str); +} + +void +png_formatted_warning(png_const_structrp png_ptr, png_warning_parameters p, + png_const_charp message) +{ + /* The internal buffer is just 192 bytes - enough for all our messages, + * overflow doesn't happen because this code checks! If someone figures + * out how to send us a message longer than 192 bytes, all that will + * happen is that the message will be truncated appropriately. + */ + size_t i = 0; /* Index in the msg[] buffer: */ + char msg[192]; + + /* Each iteration through the following loop writes at most one character + * to msg[i++] then returns here to validate that there is still space for + * the trailing '\0'. It may (in the case of a parameter) read more than + * one character from message[]; it must check for '\0' and continue to the + * test if it finds the end of string. + */ + while (i<(sizeof msg)-1 && *message != '\0') + { + /* '@' at end of string is now just printed (previously it was skipped); + * it is an error in the calling code to terminate the string with @. + */ + if (p != NULL && *message == '@' && message[1] != '\0') + { + int parameter_char = *++message; /* Consume the '@' */ + static const char valid_parameters[] = "123456789"; + int parameter = 0; + + /* Search for the parameter digit, the index in the string is the + * parameter to use. + */ + while (valid_parameters[parameter] != parameter_char && + valid_parameters[parameter] != '\0') + ++parameter; + + /* If the parameter digit is out of range it will just get printed. */ + if (parameter < PNG_WARNING_PARAMETER_COUNT) + { + /* Append this parameter */ + png_const_charp parm = p[parameter]; + png_const_charp pend = p[parameter] + (sizeof p[parameter]); + + /* No need to copy the trailing '\0' here, but there is no guarantee + * that parm[] has been initialized, so there is no guarantee of a + * trailing '\0': + */ + while (i<(sizeof msg)-1 && *parm != '\0' && parm < pend) + msg[i++] = *parm++; + + /* Consume the parameter digit too: */ + ++message; + continue; + } + + /* else not a parameter and there is a character after the @ sign; just + * copy that. This is known not to be '\0' because of the test above. + */ + } + + /* At this point *message can't be '\0', even in the bad parameter case + * above where there is a lone '@' at the end of the message string. + */ + msg[i++] = *message++; + } + + /* i is always less than (sizeof msg), so: */ + msg[i] = '\0'; + + /* And this is the formatted message. It may be larger than + * PNG_MAX_ERROR_TEXT, but that is only used for 'chunk' errors and these + * are not (currently) formatted. + */ + png_warning(png_ptr, msg); +} +#endif /* PNG_WARNINGS_SUPPORTED */ + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +void PNGAPI +png_benign_error(png_const_structrp png_ptr, png_const_charp error_message) +{ + if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN) + { +# ifdef PNG_READ_SUPPORTED + if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 && + png_ptr->chunk_name != 0) + png_chunk_warning(png_ptr, error_message); + else +# endif + png_warning(png_ptr, error_message); + } + + else + { +# ifdef PNG_READ_SUPPORTED + if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 && + png_ptr->chunk_name != 0) + png_chunk_error(png_ptr, error_message); + else +# endif + png_error(png_ptr, error_message); + } +} + +void /* PRIVATE */ +png_app_warning(png_const_structrp png_ptr, png_const_charp error_message) +{ + if (png_ptr->flags & PNG_FLAG_APP_WARNINGS_WARN) + png_warning(png_ptr, error_message); + else + png_error(png_ptr, error_message); +} + +void /* PRIVATE */ +png_app_error(png_const_structrp png_ptr, png_const_charp error_message) +{ + if (png_ptr->flags & PNG_FLAG_APP_ERRORS_WARN) + png_warning(png_ptr, error_message); + else + png_error(png_ptr, error_message); +} +#endif /* BENIGN_ERRORS */ + +/* These utilities are used internally to build an error message that relates + * to the current chunk. The chunk name comes from png_ptr->chunk_name, + * this is used to prefix the message. The message is limited in length + * to 63 bytes, the name characters are output as hex digits wrapped in [] + * if the character is invalid. + */ +#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97)) +static PNG_CONST char png_digit[16] = { + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + 'A', 'B', 'C', 'D', 'E', 'F' +}; + +#define PNG_MAX_ERROR_TEXT 196 /* Currently limited be profile_error in png.c */ +#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED) +static void /* PRIVATE */ +png_format_buffer(png_const_structrp png_ptr, png_charp buffer, png_const_charp + error_message) +{ + png_uint_32 chunk_name = png_ptr->chunk_name; + int iout = 0, ishift = 24; + + while (ishift >= 0) + { + int c = (int)(chunk_name >> ishift) & 0xff; + + ishift -= 8; + if (isnonalpha(c)) + { + buffer[iout++] = PNG_LITERAL_LEFT_SQUARE_BRACKET; + buffer[iout++] = png_digit[(c & 0xf0) >> 4]; + buffer[iout++] = png_digit[c & 0x0f]; + buffer[iout++] = PNG_LITERAL_RIGHT_SQUARE_BRACKET; + } + + else + { + buffer[iout++] = (char)c; + } + } + + if (error_message == NULL) + buffer[iout] = '\0'; + + else + { + int iin = 0; + + buffer[iout++] = ':'; + buffer[iout++] = ' '; + + while (iin < PNG_MAX_ERROR_TEXT-1 && error_message[iin] != '\0') + buffer[iout++] = error_message[iin++]; + + /* iin < PNG_MAX_ERROR_TEXT, so the following is safe: */ + buffer[iout] = '\0'; + } +} +#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */ + +#if defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) +PNG_FUNCTION(void,PNGAPI +png_chunk_error,(png_const_structrp png_ptr, png_const_charp error_message), + PNG_NORETURN) +{ + char msg[18+PNG_MAX_ERROR_TEXT]; + if (png_ptr == NULL) + png_error(png_ptr, error_message); + + else + { + png_format_buffer(png_ptr, msg, error_message); + png_error(png_ptr, msg); + } +} +#endif /* PNG_READ_SUPPORTED && PNG_ERROR_TEXT_SUPPORTED */ + +#ifdef PNG_WARNINGS_SUPPORTED +void PNGAPI +png_chunk_warning(png_const_structrp png_ptr, png_const_charp warning_message) +{ + char msg[18+PNG_MAX_ERROR_TEXT]; + if (png_ptr == NULL) + png_warning(png_ptr, warning_message); + + else + { + png_format_buffer(png_ptr, msg, warning_message); + png_warning(png_ptr, msg); + } +} +#endif /* PNG_WARNINGS_SUPPORTED */ + +#ifdef PNG_READ_SUPPORTED +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +void PNGAPI +png_chunk_benign_error(png_const_structrp png_ptr, png_const_charp + error_message) +{ + if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN) + png_chunk_warning(png_ptr, error_message); + + else + png_chunk_error(png_ptr, error_message); +} +#endif +#endif /* PNG_READ_SUPPORTED */ + +void /* PRIVATE */ +png_chunk_report(png_const_structrp png_ptr, png_const_charp message, int error) +{ + /* This is always supported, but for just read or just write it + * unconditionally does the right thing. + */ +# if defined(PNG_READ_SUPPORTED) && defined(PNG_WRITE_SUPPORTED) + if (png_ptr->mode & PNG_IS_READ_STRUCT) +# endif + +# ifdef PNG_READ_SUPPORTED + { + if (error < PNG_CHUNK_ERROR) + png_chunk_warning(png_ptr, message); + + else + png_chunk_benign_error(png_ptr, message); + } +# endif + +# if defined(PNG_READ_SUPPORTED) && defined(PNG_WRITE_SUPPORTED) + else if (!(png_ptr->mode & PNG_IS_READ_STRUCT)) +# endif + +# ifdef PNG_WRITE_SUPPORTED + { + if (error < PNG_CHUNK_WRITE_ERROR) + png_app_warning(png_ptr, message); + + else + png_app_error(png_ptr, message); + } +# endif +} + +#ifdef PNG_ERROR_TEXT_SUPPORTED +#ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_FUNCTION(void, +png_fixed_error,(png_const_structrp png_ptr, png_const_charp name),PNG_NORETURN) +{ +# define fixed_message "fixed point overflow in " +# define fixed_message_ln ((sizeof fixed_message)-1) + int iin; + char msg[fixed_message_ln+PNG_MAX_ERROR_TEXT]; + memcpy(msg, fixed_message, fixed_message_ln); + iin = 0; + if (name != NULL) while (iin < (PNG_MAX_ERROR_TEXT-1) && name[iin] != 0) + { + msg[fixed_message_ln + iin] = name[iin]; + ++iin; + } + msg[fixed_message_ln + iin] = 0; + png_error(png_ptr, msg); +} +#endif +#endif + +#ifdef PNG_SETJMP_SUPPORTED +/* This API only exists if ANSI-C style error handling is used, + * otherwise it is necessary for png_default_error to be overridden. + */ +jmp_buf* PNGAPI +png_set_longjmp_fn(png_structrp png_ptr, png_longjmp_ptr longjmp_fn, + size_t jmp_buf_size) +{ + /* From libpng 1.6.0 the app gets one chance to set a 'jmpbuf_size' value + * and it must not change after that. Libpng doesn't care how big the + * buffer is, just that it doesn't change. + * + * If the buffer size is no *larger* than the size of jmp_buf when libpng is + * compiled a built in jmp_buf is returned; this preserves the pre-1.6.0 + * semantics that this call will not fail. If the size is larger, however, + * the buffer is allocated and this may fail, causing the function to return + * NULL. + */ + if (png_ptr == NULL) + return NULL; + + if (png_ptr->jmp_buf_ptr == NULL) + { + png_ptr->jmp_buf_size = 0; /* not allocated */ + + if (jmp_buf_size <= (sizeof png_ptr->jmp_buf_local)) + png_ptr->jmp_buf_ptr = &png_ptr->jmp_buf_local; + + else + { + png_ptr->jmp_buf_ptr = png_voidcast(jmp_buf *, + png_malloc_warn(png_ptr, jmp_buf_size)); + + if (png_ptr->jmp_buf_ptr == NULL) + return NULL; /* new NULL return on OOM */ + + png_ptr->jmp_buf_size = jmp_buf_size; + } + } + + else /* Already allocated: check the size */ + { + size_t size = png_ptr->jmp_buf_size; + + if (size == 0) + { + size = (sizeof png_ptr->jmp_buf_local); + if (png_ptr->jmp_buf_ptr != &png_ptr->jmp_buf_local) + { + /* This is an internal error in libpng: somehow we have been left + * with a stack allocated jmp_buf when the application regained + * control. It's always possible to fix this up, but for the moment + * this is a png_error because that makes it easy to detect. + */ + png_error(png_ptr, "Libpng jmp_buf still allocated"); + /* png_ptr->jmp_buf_ptr = &png_ptr->jmp_buf_local; */ + } + } + + if (size != jmp_buf_size) + { + png_warning(png_ptr, "Application jmp_buf size changed"); + return NULL; /* caller will probably crash: no choice here */ + } + } + + /* Finally fill in the function, now we have a satisfactory buffer. It is + * valid to change the function on every call. + */ + png_ptr->longjmp_fn = longjmp_fn; + return png_ptr->jmp_buf_ptr; +} + +void /* PRIVATE */ +png_free_jmpbuf(png_structrp png_ptr) +{ + if (png_ptr != NULL) + { + jmp_buf *jb = png_ptr->jmp_buf_ptr; + + /* A size of 0 is used to indicate a local, stack, allocation of the + * pointer; used here and in png.c + */ + if (jb != NULL && png_ptr->jmp_buf_size > 0) + { + + /* This stuff is so that a failure to free the error control structure + * does not leave libpng in a state with no valid error handling: the + * free always succeeds, if there is an error it gets ignored. + */ + if (jb != &png_ptr->jmp_buf_local) + { + /* Make an internal, libpng, jmp_buf to return here */ + jmp_buf free_jmp_buf; + + if (!setjmp(free_jmp_buf)) + { + png_ptr->jmp_buf_ptr = &free_jmp_buf; /* come back here */ + png_ptr->jmp_buf_size = 0; /* stack allocation */ + png_ptr->longjmp_fn = longjmp; + png_free(png_ptr, jb); /* Return to setjmp on error */ + } + } + } + + /* *Always* cancel everything out: */ + png_ptr->jmp_buf_size = 0; + png_ptr->jmp_buf_ptr = NULL; + png_ptr->longjmp_fn = 0; + } +} +#endif + +/* This is the default error handling function. Note that replacements for + * this function MUST NOT RETURN, or the program will likely crash. This + * function is used by default, or if the program supplies NULL for the + * error function pointer in png_set_error_fn(). + */ +static PNG_FUNCTION(void /* PRIVATE */, +png_default_error,(png_const_structrp png_ptr, png_const_charp error_message), + PNG_NORETURN) +{ +#ifdef PNG_CONSOLE_IO_SUPPORTED +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + /* Check on NULL only added in 1.5.4 */ + if (error_message != NULL && *error_message == PNG_LITERAL_SHARP) + { + /* Strip "#nnnn " from beginning of error message. */ + int offset; + char error_number[16]; + for (offset = 0; offset<15; offset++) + { + error_number[offset] = error_message[offset + 1]; + if (error_message[offset] == ' ') + break; + } + + if ((offset > 1) && (offset < 15)) + { + error_number[offset - 1] = '\0'; + fprintf(stderr, "libpng error no. %s: %s", + error_number, error_message + offset + 1); + fprintf(stderr, PNG_STRING_NEWLINE); + } + + else + { + fprintf(stderr, "libpng error: %s, offset=%d", + error_message, offset); + fprintf(stderr, PNG_STRING_NEWLINE); + } + } + else +#endif + { + fprintf(stderr, "libpng error: %s", error_message ? error_message : + "undefined"); + fprintf(stderr, PNG_STRING_NEWLINE); + } +#else + PNG_UNUSED(error_message) /* Make compiler happy */ +#endif + png_longjmp(png_ptr, 1); +} + +PNG_FUNCTION(void,PNGAPI +png_longjmp,(png_const_structrp png_ptr, int val),PNG_NORETURN) +{ +#ifdef PNG_SETJMP_SUPPORTED + if (png_ptr && png_ptr->longjmp_fn && png_ptr->jmp_buf_ptr) + png_ptr->longjmp_fn(*png_ptr->jmp_buf_ptr, val); +#endif + + /* Here if not setjmp support or if png_ptr is null. */ + PNG_ABORT(); +} + +#ifdef PNG_WARNINGS_SUPPORTED +/* This function is called when there is a warning, but the library thinks + * it can continue anyway. Replacement functions don't have to do anything + * here if you don't want them to. In the default configuration, png_ptr is + * not used, but it is passed in case it may be useful. + */ +static void /* PRIVATE */ +png_default_warning(png_const_structrp png_ptr, png_const_charp warning_message) +{ +#ifdef PNG_CONSOLE_IO_SUPPORTED +# ifdef PNG_ERROR_NUMBERS_SUPPORTED + if (*warning_message == PNG_LITERAL_SHARP) + { + int offset; + char warning_number[16]; + for (offset = 0; offset < 15; offset++) + { + warning_number[offset] = warning_message[offset + 1]; + if (warning_message[offset] == ' ') + break; + } + + if ((offset > 1) && (offset < 15)) + { + warning_number[offset + 1] = '\0'; + fprintf(stderr, "libpng warning no. %s: %s", + warning_number, warning_message + offset); + fprintf(stderr, PNG_STRING_NEWLINE); + } + + else + { + fprintf(stderr, "libpng warning: %s", + warning_message); + fprintf(stderr, PNG_STRING_NEWLINE); + } + } + else +# endif + + { + fprintf(stderr, "libpng warning: %s", warning_message); + fprintf(stderr, PNG_STRING_NEWLINE); + } +#else + PNG_UNUSED(warning_message) /* Make compiler happy */ +#endif + PNG_UNUSED(png_ptr) /* Make compiler happy */ +} +#endif /* PNG_WARNINGS_SUPPORTED */ + +/* This function is called when the application wants to use another method + * of handling errors and warnings. Note that the error function MUST NOT + * return to the calling routine or serious problems will occur. The return + * method used in the default routine calls longjmp(png_ptr->jmp_buf_ptr, 1) + */ +void PNGAPI +png_set_error_fn(png_structrp png_ptr, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warning_fn) +{ + if (png_ptr == NULL) + return; + + png_ptr->error_ptr = error_ptr; + png_ptr->error_fn = error_fn; +#ifdef PNG_WARNINGS_SUPPORTED + png_ptr->warning_fn = warning_fn; +#else + PNG_UNUSED(warning_fn) +#endif +} + + +/* This function returns a pointer to the error_ptr associated with the user + * functions. The application should free any memory associated with this + * pointer before png_write_destroy and png_read_destroy are called. + */ +png_voidp PNGAPI +png_get_error_ptr(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return NULL; + + return ((png_voidp)png_ptr->error_ptr); +} + + +#ifdef PNG_ERROR_NUMBERS_SUPPORTED +void PNGAPI +png_set_strip_error_numbers(png_structrp png_ptr, png_uint_32 strip_mode) +{ + if (png_ptr != NULL) + { + png_ptr->flags &= + ((~(PNG_FLAG_STRIP_ERROR_NUMBERS | + PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode); + } +} +#endif + +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) + /* Currently the above both depend on SETJMP_SUPPORTED, however it would be + * possible to implement without setjmp support just so long as there is some + * way to handle the error return here: + */ +PNG_FUNCTION(void /* PRIVATE */, +png_safe_error,(png_structp png_nonconst_ptr, png_const_charp error_message), + PNG_NORETURN) +{ + const png_const_structrp png_ptr = png_nonconst_ptr; + png_imagep image = png_voidcast(png_imagep, png_ptr->error_ptr); + + /* An error is always logged here, overwriting anything (typically a warning) + * that is already there: + */ + if (image != NULL) + { + png_safecat(image->message, (sizeof image->message), 0, error_message); + image->warning_or_error |= PNG_IMAGE_ERROR; + + /* Retrieve the jmp_buf from within the png_control, making this work for + * C++ compilation too is pretty tricky: C++ wants a pointer to the first + * element of a jmp_buf, but C doesn't tell us the type of that. + */ + if (image->opaque != NULL && image->opaque->error_buf != NULL) + longjmp(png_control_jmp_buf(image->opaque), 1); + + /* Missing longjmp buffer, the following is to help debugging: */ + { + size_t pos = png_safecat(image->message, (sizeof image->message), 0, + "bad longjmp: "); + png_safecat(image->message, (sizeof image->message), pos, + error_message); + } + } + + /* Here on an internal programming error. */ + abort(); +} + +#ifdef PNG_WARNINGS_SUPPORTED +void /* PRIVATE */ +png_safe_warning(png_structp png_nonconst_ptr, png_const_charp warning_message) +{ + const png_const_structrp png_ptr = png_nonconst_ptr; + png_imagep image = png_voidcast(png_imagep, png_ptr->error_ptr); + + /* A warning is only logged if there is no prior warning or error. */ + if (image->warning_or_error == 0) + { + png_safecat(image->message, (sizeof image->message), 0, warning_message); + image->warning_or_error |= PNG_IMAGE_WARNING; + } +} +#endif + +int /* PRIVATE */ +png_safe_execute(png_imagep image_in, int (*function)(png_voidp), png_voidp arg) +{ + volatile png_imagep image = image_in; + volatile int result; + volatile png_voidp saved_error_buf; + jmp_buf safe_jmpbuf; + + /* Safely execute function(arg) with png_error returning to this function. */ + saved_error_buf = image->opaque->error_buf; + result = setjmp(safe_jmpbuf) == 0; + + if (result) + { + + image->opaque->error_buf = safe_jmpbuf; + result = function(arg); + } + + image->opaque->error_buf = saved_error_buf; + + /* And do the cleanup prior to any failure return. */ + if (!result) + png_image_free(image); + + return result; +} +#endif /* SIMPLIFIED READ/WRITE */ +#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngget.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngget.c new file mode 100644 index 0000000000..aca63a9589 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngget.c @@ -0,0 +1,1177 @@ + +/* pngget.c - retrieval of values from info struct + * + * Last changed in libpng 1.6.1 [March 28, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + */ + +#include "pngpriv.h" + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + +png_uint_32 PNGAPI +png_get_valid(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_uint_32 flag) +{ + if (png_ptr != NULL && info_ptr != NULL) + return(info_ptr->valid & flag); + + return(0); +} + +png_size_t PNGAPI +png_get_rowbytes(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return(info_ptr->rowbytes); + + return(0); +} + +#ifdef PNG_INFO_IMAGE_SUPPORTED +png_bytepp PNGAPI +png_get_rows(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return(info_ptr->row_pointers); + + return(0); +} +#endif + +#ifdef PNG_EASY_ACCESS_SUPPORTED +/* Easy access to info, added in libpng-0.99 */ +png_uint_32 PNGAPI +png_get_image_width(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->width; + + return (0); +} + +png_uint_32 PNGAPI +png_get_image_height(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->height; + + return (0); +} + +png_byte PNGAPI +png_get_bit_depth(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->bit_depth; + + return (0); +} + +png_byte PNGAPI +png_get_color_type(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->color_type; + + return (0); +} + +png_byte PNGAPI +png_get_filter_type(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->filter_type; + + return (0); +} + +png_byte PNGAPI +png_get_interlace_type(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->interlace_type; + + return (0); +} + +png_byte PNGAPI +png_get_compression_type(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->compression_type; + + return (0); +} + +png_uint_32 PNGAPI +png_get_x_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp + info_ptr) +{ +#ifdef PNG_pHYs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) + { + png_debug1(1, "in %s retrieval function", + "png_get_x_pixels_per_meter"); + + if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER) + return (info_ptr->x_pixels_per_unit); + } +#endif + + return (0); +} + +png_uint_32 PNGAPI +png_get_y_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp + info_ptr) +{ +#ifdef PNG_pHYs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) + { + png_debug1(1, "in %s retrieval function", + "png_get_y_pixels_per_meter"); + + if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER) + return (info_ptr->y_pixels_per_unit); + } +#endif + + return (0); +} + +png_uint_32 PNGAPI +png_get_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ +#ifdef PNG_pHYs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) + { + png_debug1(1, "in %s retrieval function", "png_get_pixels_per_meter"); + + if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER && + info_ptr->x_pixels_per_unit == info_ptr->y_pixels_per_unit) + return (info_ptr->x_pixels_per_unit); + } +#endif + + return (0); +} + +#ifdef PNG_FLOATING_POINT_SUPPORTED +float PNGAPI +png_get_pixel_aspect_ratio(png_const_structrp png_ptr, png_const_inforp + info_ptr) +{ +#ifdef PNG_READ_pHYs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) + { + png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio"); + + if (info_ptr->x_pixels_per_unit != 0) + return ((float)((float)info_ptr->y_pixels_per_unit + /(float)info_ptr->x_pixels_per_unit)); + } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) +#endif + + return ((float)0.0); +} +#endif + +#ifdef PNG_FIXED_POINT_SUPPORTED +png_fixed_point PNGAPI +png_get_pixel_aspect_ratio_fixed(png_const_structrp png_ptr, + png_const_inforp info_ptr) +{ +#ifdef PNG_READ_pHYs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs) + && info_ptr->x_pixels_per_unit > 0 && info_ptr->y_pixels_per_unit > 0 + && info_ptr->x_pixels_per_unit <= PNG_UINT_31_MAX + && info_ptr->y_pixels_per_unit <= PNG_UINT_31_MAX) + { + png_fixed_point res; + + png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio_fixed"); + + /* The following casts work because a PNG 4 byte integer only has a valid + * range of 0..2^31-1; otherwise the cast might overflow. + */ + if (png_muldiv(&res, (png_int_32)info_ptr->y_pixels_per_unit, PNG_FP_1, + (png_int_32)info_ptr->x_pixels_per_unit)) + return res; + } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) +#endif + + return 0; +} +#endif + +png_int_32 PNGAPI +png_get_x_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ +#ifdef PNG_oFFs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) + { + png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns"); + + if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER) + return (info_ptr->x_offset); + } +#endif + + return (0); +} + +png_int_32 PNGAPI +png_get_y_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ +#ifdef PNG_oFFs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) + { + png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns"); + + if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER) + return (info_ptr->y_offset); + } +#endif + + return (0); +} + +png_int_32 PNGAPI +png_get_x_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ +#ifdef PNG_oFFs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) + { + png_debug1(1, "in %s retrieval function", "png_get_x_offset_pixels"); + + if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL) + return (info_ptr->x_offset); + } +#endif + + return (0); +} + +png_int_32 PNGAPI +png_get_y_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ +#ifdef PNG_oFFs_SUPPORTED + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) + { + png_debug1(1, "in %s retrieval function", "png_get_y_offset_pixels"); + + if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL) + return (info_ptr->y_offset); + } +#endif + + return (0); +} + +#ifdef PNG_INCH_CONVERSIONS_SUPPORTED +static png_uint_32 +ppi_from_ppm(png_uint_32 ppm) +{ +#if 0 + /* The conversion is *(2.54/100), in binary (32 digits): + * .00000110100000001001110101001001 + */ + png_uint_32 t1001, t1101; + ppm >>= 1; /* .1 */ + t1001 = ppm + (ppm >> 3); /* .1001 */ + t1101 = t1001 + (ppm >> 1); /* .1101 */ + ppm >>= 20; /* .000000000000000000001 */ + t1101 += t1101 >> 15; /* .1101000000000001101 */ + t1001 >>= 11; /* .000000000001001 */ + t1001 += t1001 >> 12; /* .000000000001001000000001001 */ + ppm += t1001; /* .000000000001001000001001001 */ + ppm += t1101; /* .110100000001001110101001001 */ + return (ppm + 16) >> 5;/* .00000110100000001001110101001001 */ +#else + /* The argument is a PNG unsigned integer, so it is not permitted + * to be bigger than 2^31. + */ + png_fixed_point result; + if (ppm <= PNG_UINT_31_MAX && png_muldiv(&result, (png_int_32)ppm, 127, + 5000)) + return result; + + /* Overflow. */ + return 0; +#endif +} + +png_uint_32 PNGAPI +png_get_pixels_per_inch(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + return ppi_from_ppm(png_get_pixels_per_meter(png_ptr, info_ptr)); +} + +png_uint_32 PNGAPI +png_get_x_pixels_per_inch(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + return ppi_from_ppm(png_get_x_pixels_per_meter(png_ptr, info_ptr)); +} + +png_uint_32 PNGAPI +png_get_y_pixels_per_inch(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + return ppi_from_ppm(png_get_y_pixels_per_meter(png_ptr, info_ptr)); +} + +#ifdef PNG_FIXED_POINT_SUPPORTED +static png_fixed_point +png_fixed_inches_from_microns(png_const_structrp png_ptr, png_int_32 microns) +{ + /* Convert from metres * 1,000,000 to inches * 100,000, meters to + * inches is simply *(100/2.54), so we want *(10/2.54) == 500/127. + * Notice that this can overflow - a warning is output and 0 is + * returned. + */ + return png_muldiv_warn(png_ptr, microns, 500, 127); +} + +png_fixed_point PNGAPI +png_get_x_offset_inches_fixed(png_const_structrp png_ptr, + png_const_inforp info_ptr) +{ + return png_fixed_inches_from_microns(png_ptr, + png_get_x_offset_microns(png_ptr, info_ptr)); +} +#endif + +#ifdef PNG_FIXED_POINT_SUPPORTED +png_fixed_point PNGAPI +png_get_y_offset_inches_fixed(png_const_structrp png_ptr, + png_const_inforp info_ptr) +{ + return png_fixed_inches_from_microns(png_ptr, + png_get_y_offset_microns(png_ptr, info_ptr)); +} +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +float PNGAPI +png_get_x_offset_inches(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + /* To avoid the overflow do the conversion directly in floating + * point. + */ + return (float)(png_get_x_offset_microns(png_ptr, info_ptr) * .00003937); +} +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +float PNGAPI +png_get_y_offset_inches(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + /* To avoid the overflow do the conversion directly in floating + * point. + */ + return (float)(png_get_y_offset_microns(png_ptr, info_ptr) * .00003937); +} +#endif + +#ifdef PNG_pHYs_SUPPORTED +png_uint_32 PNGAPI +png_get_pHYs_dpi(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) +{ + png_uint_32 retval = 0; + + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) + { + png_debug1(1, "in %s retrieval function", "pHYs"); + + if (res_x != NULL) + { + *res_x = info_ptr->x_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + + if (res_y != NULL) + { + *res_y = info_ptr->y_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + + if (unit_type != NULL) + { + *unit_type = (int)info_ptr->phys_unit_type; + retval |= PNG_INFO_pHYs; + + if (*unit_type == 1) + { + if (res_x != NULL) *res_x = (png_uint_32)(*res_x * .0254 + .50); + if (res_y != NULL) *res_y = (png_uint_32)(*res_y * .0254 + .50); + } + } + } + + return (retval); +} +#endif /* PNG_pHYs_SUPPORTED */ +#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */ + +/* png_get_channels really belongs in here, too, but it's been around longer */ + +#endif /* PNG_EASY_ACCESS_SUPPORTED */ + + +png_byte PNGAPI +png_get_channels(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return(info_ptr->channels); + + return (0); +} + +#ifdef PNG_READ_SUPPORTED +png_const_bytep PNGAPI +png_get_signature(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return(info_ptr->signature); + + return (NULL); +} +#endif + +#ifdef PNG_bKGD_SUPPORTED +png_uint_32 PNGAPI +png_get_bKGD(png_const_structrp png_ptr, png_inforp info_ptr, + png_color_16p *background) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD) + && background != NULL) + { + png_debug1(1, "in %s retrieval function", "bKGD"); + + *background = &(info_ptr->background); + return (PNG_INFO_bKGD); + } + + return (0); +} +#endif + +#ifdef PNG_cHRM_SUPPORTED +/* The XYZ APIs were added in 1.5.5 to take advantage of the code added at the + * same time to correct the rgb grayscale coefficient defaults obtained from the + * cHRM chunk in 1.5.4 + */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_cHRM(png_const_structrp png_ptr, png_const_inforp info_ptr, + double *white_x, double *white_y, double *red_x, double *red_y, + double *green_x, double *green_y, double *blue_x, double *blue_y) +{ + /* Quiet API change: this code used to only return the end points if a cHRM + * chunk was present, but the end points can also come from iCCP or sRGB + * chunks, so in 1.6.0 the png_get_ APIs return the end points regardless and + * the png_set_ APIs merely check that set end points are mutually + * consistent. + */ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS)) + { + png_debug1(1, "in %s retrieval function", "cHRM"); + + if (white_x != NULL) + *white_x = png_float(png_ptr, + info_ptr->colorspace.end_points_xy.whitex, "cHRM white X"); + if (white_y != NULL) + *white_y = png_float(png_ptr, + info_ptr->colorspace.end_points_xy.whitey, "cHRM white Y"); + if (red_x != NULL) + *red_x = png_float(png_ptr, info_ptr->colorspace.end_points_xy.redx, + "cHRM red X"); + if (red_y != NULL) + *red_y = png_float(png_ptr, info_ptr->colorspace.end_points_xy.redy, + "cHRM red Y"); + if (green_x != NULL) + *green_x = png_float(png_ptr, + info_ptr->colorspace.end_points_xy.greenx, "cHRM green X"); + if (green_y != NULL) + *green_y = png_float(png_ptr, + info_ptr->colorspace.end_points_xy.greeny, "cHRM green Y"); + if (blue_x != NULL) + *blue_x = png_float(png_ptr, info_ptr->colorspace.end_points_xy.bluex, + "cHRM blue X"); + if (blue_y != NULL) + *blue_y = png_float(png_ptr, info_ptr->colorspace.end_points_xy.bluey, + "cHRM blue Y"); + return (PNG_INFO_cHRM); + } + + return (0); +} + +png_uint_32 PNGAPI +png_get_cHRM_XYZ(png_const_structrp png_ptr, png_const_inforp info_ptr, + double *red_X, double *red_Y, double *red_Z, double *green_X, + double *green_Y, double *green_Z, double *blue_X, double *blue_Y, + double *blue_Z) +{ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS)) + { + png_debug1(1, "in %s retrieval function", "cHRM_XYZ(float)"); + + if (red_X != NULL) + *red_X = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_X, + "cHRM red X"); + if (red_Y != NULL) + *red_Y = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_Y, + "cHRM red Y"); + if (red_Z != NULL) + *red_Z = png_float(png_ptr, info_ptr->colorspace.end_points_XYZ.red_Z, + "cHRM red Z"); + if (green_X != NULL) + *green_X = png_float(png_ptr, + info_ptr->colorspace.end_points_XYZ.green_X, "cHRM green X"); + if (green_Y != NULL) + *green_Y = png_float(png_ptr, + info_ptr->colorspace.end_points_XYZ.green_Y, "cHRM green Y"); + if (green_Z != NULL) + *green_Z = png_float(png_ptr, + info_ptr->colorspace.end_points_XYZ.green_Z, "cHRM green Z"); + if (blue_X != NULL) + *blue_X = png_float(png_ptr, + info_ptr->colorspace.end_points_XYZ.blue_X, "cHRM blue X"); + if (blue_Y != NULL) + *blue_Y = png_float(png_ptr, + info_ptr->colorspace.end_points_XYZ.blue_Y, "cHRM blue Y"); + if (blue_Z != NULL) + *blue_Z = png_float(png_ptr, + info_ptr->colorspace.end_points_XYZ.blue_Z, "cHRM blue Z"); + return (PNG_INFO_cHRM); + } + + return (0); +} +# endif + +# ifdef PNG_FIXED_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_red_X, png_fixed_point *int_red_Y, + png_fixed_point *int_red_Z, png_fixed_point *int_green_X, + png_fixed_point *int_green_Y, png_fixed_point *int_green_Z, + png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y, + png_fixed_point *int_blue_Z) +{ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS)) + { + png_debug1(1, "in %s retrieval function", "cHRM_XYZ"); + + if (int_red_X != NULL) + *int_red_X = info_ptr->colorspace.end_points_XYZ.red_X; + if (int_red_Y != NULL) + *int_red_Y = info_ptr->colorspace.end_points_XYZ.red_Y; + if (int_red_Z != NULL) + *int_red_Z = info_ptr->colorspace.end_points_XYZ.red_Z; + if (int_green_X != NULL) + *int_green_X = info_ptr->colorspace.end_points_XYZ.green_X; + if (int_green_Y != NULL) + *int_green_Y = info_ptr->colorspace.end_points_XYZ.green_Y; + if (int_green_Z != NULL) + *int_green_Z = info_ptr->colorspace.end_points_XYZ.green_Z; + if (int_blue_X != NULL) + *int_blue_X = info_ptr->colorspace.end_points_XYZ.blue_X; + if (int_blue_Y != NULL) + *int_blue_Y = info_ptr->colorspace.end_points_XYZ.blue_Y; + if (int_blue_Z != NULL) + *int_blue_Z = info_ptr->colorspace.end_points_XYZ.blue_Z; + return (PNG_INFO_cHRM); + } + + return (0); +} + +png_uint_32 PNGAPI +png_get_cHRM_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x, + png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y, + png_fixed_point *blue_x, png_fixed_point *blue_y) +{ + png_debug1(1, "in %s retrieval function", "cHRM"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_ENDPOINTS)) + { + if (white_x != NULL) + *white_x = info_ptr->colorspace.end_points_xy.whitex; + if (white_y != NULL) + *white_y = info_ptr->colorspace.end_points_xy.whitey; + if (red_x != NULL) + *red_x = info_ptr->colorspace.end_points_xy.redx; + if (red_y != NULL) + *red_y = info_ptr->colorspace.end_points_xy.redy; + if (green_x != NULL) + *green_x = info_ptr->colorspace.end_points_xy.greenx; + if (green_y != NULL) + *green_y = info_ptr->colorspace.end_points_xy.greeny; + if (blue_x != NULL) + *blue_x = info_ptr->colorspace.end_points_xy.bluex; + if (blue_y != NULL) + *blue_y = info_ptr->colorspace.end_points_xy.bluey; + return (PNG_INFO_cHRM); + } + + return (0); +} +# endif +#endif + +#ifdef PNG_gAMA_SUPPORTED +# ifdef PNG_FIXED_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_gAMA_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *file_gamma) +{ + png_debug1(1, "in %s retrieval function", "gAMA"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) && + file_gamma != NULL) + { + *file_gamma = info_ptr->colorspace.gamma; + return (PNG_INFO_gAMA); + } + + return (0); +} +# endif + +# ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_gAMA(png_const_structrp png_ptr, png_const_inforp info_ptr, + double *file_gamma) +{ + png_debug1(1, "in %s retrieval function", "gAMA(float)"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) && + file_gamma != NULL) + { + *file_gamma = png_float(png_ptr, info_ptr->colorspace.gamma, + "png_get_gAMA"); + return (PNG_INFO_gAMA); + } + + return (0); +} +# endif +#endif + +#ifdef PNG_sRGB_SUPPORTED +png_uint_32 PNGAPI +png_get_sRGB(png_const_structrp png_ptr, png_const_inforp info_ptr, + int *file_srgb_intent) +{ + png_debug1(1, "in %s retrieval function", "sRGB"); + + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB) + && file_srgb_intent != NULL) + { + *file_srgb_intent = info_ptr->colorspace.rendering_intent; + return (PNG_INFO_sRGB); + } + + return (0); +} +#endif + +#ifdef PNG_iCCP_SUPPORTED +png_uint_32 PNGAPI +png_get_iCCP(png_const_structrp png_ptr, png_inforp info_ptr, + png_charpp name, int *compression_type, + png_bytepp profile, png_uint_32 *proflen) +{ + png_debug1(1, "in %s retrieval function", "iCCP"); + + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP) + && name != NULL && compression_type != NULL && profile != NULL && + proflen != NULL) + { + *name = info_ptr->iccp_name; + *profile = info_ptr->iccp_profile; + *proflen = png_get_uint_32(info_ptr->iccp_profile); + /* This is somewhat irrelevant since the profile data returned has + * actually been uncompressed. + */ + *compression_type = PNG_COMPRESSION_TYPE_BASE; + return (PNG_INFO_iCCP); + } + + return (0); +} +#endif + +#ifdef PNG_sPLT_SUPPORTED +int PNGAPI +png_get_sPLT(png_const_structrp png_ptr, png_inforp info_ptr, + png_sPLT_tpp spalettes) +{ + if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL) + { + *spalettes = info_ptr->splt_palettes; + return info_ptr->splt_palettes_num; + } + + return (0); +} +#endif + +#ifdef PNG_hIST_SUPPORTED +png_uint_32 PNGAPI +png_get_hIST(png_const_structrp png_ptr, png_inforp info_ptr, + png_uint_16p *hist) +{ + png_debug1(1, "in %s retrieval function", "hIST"); + + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST) + && hist != NULL) + { + *hist = info_ptr->hist; + return (PNG_INFO_hIST); + } + + return (0); +} +#endif + +png_uint_32 PNGAPI +png_get_IHDR(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_uint_32 *width, png_uint_32 *height, int *bit_depth, + int *color_type, int *interlace_type, int *compression_type, + int *filter_type) +{ + png_debug1(1, "in %s retrieval function", "IHDR"); + + if (png_ptr == NULL || info_ptr == NULL || width == NULL || + height == NULL || bit_depth == NULL || color_type == NULL) + return (0); + + *width = info_ptr->width; + *height = info_ptr->height; + *bit_depth = info_ptr->bit_depth; + *color_type = info_ptr->color_type; + + if (compression_type != NULL) + *compression_type = info_ptr->compression_type; + + if (filter_type != NULL) + *filter_type = info_ptr->filter_type; + + if (interlace_type != NULL) + *interlace_type = info_ptr->interlace_type; + + /* This is redundant if we can be sure that the info_ptr values were all + * assigned in png_set_IHDR(). We do the check anyhow in case an + * application has ignored our advice not to mess with the members + * of info_ptr directly. + */ + png_check_IHDR(png_ptr, info_ptr->width, info_ptr->height, + info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type, + info_ptr->compression_type, info_ptr->filter_type); + + return (1); +} + +#ifdef PNG_oFFs_SUPPORTED +png_uint_32 PNGAPI +png_get_oFFs(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type) +{ + png_debug1(1, "in %s retrieval function", "oFFs"); + + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs) + && offset_x != NULL && offset_y != NULL && unit_type != NULL) + { + *offset_x = info_ptr->x_offset; + *offset_y = info_ptr->y_offset; + *unit_type = (int)info_ptr->offset_unit_type; + return (PNG_INFO_oFFs); + } + + return (0); +} +#endif + +#ifdef PNG_pCAL_SUPPORTED +png_uint_32 PNGAPI +png_get_pCAL(png_const_structrp png_ptr, png_inforp info_ptr, + png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, + png_charp *units, png_charpp *params) +{ + png_debug1(1, "in %s retrieval function", "pCAL"); + + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL) + && purpose != NULL && X0 != NULL && X1 != NULL && type != NULL && + nparams != NULL && units != NULL && params != NULL) + { + *purpose = info_ptr->pcal_purpose; + *X0 = info_ptr->pcal_X0; + *X1 = info_ptr->pcal_X1; + *type = (int)info_ptr->pcal_type; + *nparams = (int)info_ptr->pcal_nparams; + *units = info_ptr->pcal_units; + *params = info_ptr->pcal_params; + return (PNG_INFO_pCAL); + } + + return (0); +} +#endif + +#ifdef PNG_sCAL_SUPPORTED +# ifdef PNG_FIXED_POINT_SUPPORTED +# if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \ + defined(PNG_FLOATING_POINT_SUPPORTED) +png_uint_32 PNGAPI +png_get_sCAL_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr, + int *unit, png_fixed_point *width, png_fixed_point *height) +{ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sCAL)) + { + *unit = info_ptr->scal_unit; + /*TODO: make this work without FP support; the API is currently eliminated + * if neither floating point APIs nor internal floating point arithmetic + * are enabled. + */ + *width = png_fixed(png_ptr, atof(info_ptr->scal_s_width), "sCAL width"); + *height = png_fixed(png_ptr, atof(info_ptr->scal_s_height), + "sCAL height"); + return (PNG_INFO_sCAL); + } + + return(0); +} +# endif /* FLOATING_ARITHMETIC */ +# endif /* FIXED_POINT */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_sCAL(png_const_structrp png_ptr, png_const_inforp info_ptr, + int *unit, double *width, double *height) +{ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sCAL)) + { + *unit = info_ptr->scal_unit; + *width = atof(info_ptr->scal_s_width); + *height = atof(info_ptr->scal_s_height); + return (PNG_INFO_sCAL); + } + + return(0); +} +# endif /* FLOATING POINT */ +png_uint_32 PNGAPI +png_get_sCAL_s(png_const_structrp png_ptr, png_const_inforp info_ptr, + int *unit, png_charpp width, png_charpp height) +{ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sCAL)) + { + *unit = info_ptr->scal_unit; + *width = info_ptr->scal_s_width; + *height = info_ptr->scal_s_height; + return (PNG_INFO_sCAL); + } + + return(0); +} +#endif /* sCAL */ + +#ifdef PNG_pHYs_SUPPORTED +png_uint_32 PNGAPI +png_get_pHYs(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) +{ + png_uint_32 retval = 0; + + png_debug1(1, "in %s retrieval function", "pHYs"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_pHYs)) + { + if (res_x != NULL) + { + *res_x = info_ptr->x_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + + if (res_y != NULL) + { + *res_y = info_ptr->y_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + + if (unit_type != NULL) + { + *unit_type = (int)info_ptr->phys_unit_type; + retval |= PNG_INFO_pHYs; + } + } + + return (retval); +} +#endif /* pHYs */ + +png_uint_32 PNGAPI +png_get_PLTE(png_const_structrp png_ptr, png_inforp info_ptr, + png_colorp *palette, int *num_palette) +{ + png_debug1(1, "in %s retrieval function", "PLTE"); + + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE) + && palette != NULL) + { + *palette = info_ptr->palette; + *num_palette = info_ptr->num_palette; + png_debug1(3, "num_palette = %d", *num_palette); + return (PNG_INFO_PLTE); + } + + return (0); +} + +#ifdef PNG_sBIT_SUPPORTED +png_uint_32 PNGAPI +png_get_sBIT(png_const_structrp png_ptr, png_inforp info_ptr, + png_color_8p *sig_bit) +{ + png_debug1(1, "in %s retrieval function", "sBIT"); + + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT) + && sig_bit != NULL) + { + *sig_bit = &(info_ptr->sig_bit); + return (PNG_INFO_sBIT); + } + + return (0); +} +#endif + +#ifdef PNG_TEXT_SUPPORTED +int PNGAPI +png_get_text(png_const_structrp png_ptr, png_inforp info_ptr, + png_textp *text_ptr, int *num_text) +{ + if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0) + { + png_debug1(1, "in 0x%lx retrieval function", + (unsigned long)png_ptr->chunk_name); + + if (text_ptr != NULL) + *text_ptr = info_ptr->text; + + if (num_text != NULL) + *num_text = info_ptr->num_text; + + return info_ptr->num_text; + } + + if (num_text != NULL) + *num_text = 0; + + return(0); +} +#endif + +#ifdef PNG_tIME_SUPPORTED +png_uint_32 PNGAPI +png_get_tIME(png_const_structrp png_ptr, png_inforp info_ptr, + png_timep *mod_time) +{ + png_debug1(1, "in %s retrieval function", "tIME"); + + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME) + && mod_time != NULL) + { + *mod_time = &(info_ptr->mod_time); + return (PNG_INFO_tIME); + } + + return (0); +} +#endif + +#ifdef PNG_tRNS_SUPPORTED +png_uint_32 PNGAPI +png_get_tRNS(png_const_structrp png_ptr, png_inforp info_ptr, + png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color) +{ + png_uint_32 retval = 0; + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) + { + png_debug1(1, "in %s retrieval function", "tRNS"); + + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (trans_alpha != NULL) + { + *trans_alpha = info_ptr->trans_alpha; + retval |= PNG_INFO_tRNS; + } + + if (trans_color != NULL) + *trans_color = &(info_ptr->trans_color); + } + + else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */ + { + if (trans_color != NULL) + { + *trans_color = &(info_ptr->trans_color); + retval |= PNG_INFO_tRNS; + } + + if (trans_alpha != NULL) + *trans_alpha = NULL; + } + + if (num_trans != NULL) + { + *num_trans = info_ptr->num_trans; + retval |= PNG_INFO_tRNS; + } + } + + return (retval); +} +#endif + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +int PNGAPI +png_get_unknown_chunks(png_const_structrp png_ptr, png_inforp info_ptr, + png_unknown_chunkpp unknowns) +{ + if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL) + { + *unknowns = info_ptr->unknown_chunks; + return info_ptr->unknown_chunks_num; + } + + return (0); +} +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +png_byte PNGAPI +png_get_rgb_to_gray_status (png_const_structrp png_ptr) +{ + return (png_byte)(png_ptr ? png_ptr->rgb_to_gray_status : 0); +} +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +png_voidp PNGAPI +png_get_user_chunk_ptr(png_const_structrp png_ptr) +{ + return (png_ptr ? png_ptr->user_chunk_ptr : NULL); +} +#endif + +png_size_t PNGAPI +png_get_compression_buffer_size(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return 0; + +# ifdef PNG_WRITE_SUPPORTED + if (png_ptr->mode & PNG_IS_READ_STRUCT) +# endif + { +# ifdef PNG_SEQUENTIAL_READ_SUPPORTED + return png_ptr->IDAT_read_size; +# else + return PNG_IDAT_READ_SIZE; +# endif + } + +# ifdef PNG_WRITE_SUPPORTED + else + return png_ptr->zbuffer_size; +# endif +} + +#ifdef PNG_SET_USER_LIMITS_SUPPORTED +/* These functions were added to libpng 1.2.6 and were enabled + * by default in libpng-1.4.0 */ +png_uint_32 PNGAPI +png_get_user_width_max (png_const_structrp png_ptr) +{ + return (png_ptr ? png_ptr->user_width_max : 0); +} + +png_uint_32 PNGAPI +png_get_user_height_max (png_const_structrp png_ptr) +{ + return (png_ptr ? png_ptr->user_height_max : 0); +} + +/* This function was added to libpng 1.4.0 */ +png_uint_32 PNGAPI +png_get_chunk_cache_max (png_const_structrp png_ptr) +{ + return (png_ptr ? png_ptr->user_chunk_cache_max : 0); +} + +/* This function was added to libpng 1.4.1 */ +png_alloc_size_t PNGAPI +png_get_chunk_malloc_max (png_const_structrp png_ptr) +{ + return (png_ptr ? png_ptr->user_chunk_malloc_max : 0); +} +#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ + +/* These functions were added to libpng 1.4.0 */ +#ifdef PNG_IO_STATE_SUPPORTED +png_uint_32 PNGAPI +png_get_io_state (png_const_structrp png_ptr) +{ + return png_ptr->io_state; +} + +png_uint_32 PNGAPI +png_get_io_chunk_type (png_const_structrp png_ptr) +{ + return png_ptr->chunk_name; +} +#endif /* ?PNG_IO_STATE_SUPPORTED */ + +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +# ifdef PNG_GET_PALETTE_MAX_SUPPORTED +int PNGAPI +png_get_palette_max(png_const_structp png_ptr, png_const_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return png_ptr->num_palette_max; + + return (-1); +} +# endif +#endif + +#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pnginfo.h b/3rdparty/wxwidgets3.0-3.0.1/src/png/pnginfo.h new file mode 100644 index 0000000000..26bf26502c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pnginfo.h @@ -0,0 +1,260 @@ + +/* pnginfo.h - header file for PNG reference library + * + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.6.1 [March 28, 2013] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + + /* png_info is a structure that holds the information in a PNG file so + * that the application can find out the characteristics of the image. + * If you are reading the file, this structure will tell you what is + * in the PNG file. If you are writing the file, fill in the information + * you want to put into the PNG file, using png_set_*() functions, then + * call png_write_info(). + * + * The names chosen should be very close to the PNG specification, so + * consult that document for information about the meaning of each field. + * + * With libpng < 0.95, it was only possible to directly set and read the + * the values in the png_info_struct, which meant that the contents and + * order of the values had to remain fixed. With libpng 0.95 and later, + * however, there are now functions that abstract the contents of + * png_info_struct from the application, so this makes it easier to use + * libpng with dynamic libraries, and even makes it possible to use + * libraries that don't have all of the libpng ancillary chunk-handing + * functionality. In libpng-1.5.0 this was moved into a separate private + * file that is not visible to applications. + * + * The following members may have allocated storage attached that should be + * cleaned up before the structure is discarded: palette, trans, text, + * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, + * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these + * are automatically freed when the info structure is deallocated, if they were + * allocated internally by libpng. This behavior can be changed by means + * of the png_data_freer() function. + * + * More allocation details: all the chunk-reading functions that + * change these members go through the corresponding png_set_* + * functions. A function to clear these members is available: see + * png_free_data(). The png_set_* functions do not depend on being + * able to point info structure members to any of the storage they are + * passed (they make their own copies), EXCEPT that the png_set_text + * functions use the same storage passed to them in the text_ptr or + * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns + * functions do not make their own copies. + */ +#ifndef PNGINFO_H +#define PNGINFO_H + +struct png_info_def +{ + /* The following are necessary for every PNG file */ + png_uint_32 width; /* width of image in pixels (from IHDR) */ + png_uint_32 height; /* height of image in pixels (from IHDR) */ + png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ + png_size_t rowbytes; /* bytes needed to hold an untransformed row */ + png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ + png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ + png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ + png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ + png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ + /* The following three should have been named *_method not *_type */ + png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ + png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ + png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + + /* The following are set by png_set_IHDR, called from the application on + * write, but the are never actually used by the write code. + */ + png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte spare_byte; /* to align the data, and for future use */ + +#ifdef PNG_READ_SUPPORTED + /* This is never set during write */ + png_byte signature[8]; /* magic bytes read by libpng from start of file */ +#endif + + /* The rest of the data is optional. If you are reading, check the + * valid field to see if the information in these are valid. If you + * are writing, set the valid field to those chunks you want written, + * and initialize the appropriate fields below. + */ + +#if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED) + /* png_colorspace only contains 'flags' if neither GAMMA or COLORSPACE are + * defined. When COLORSPACE is switched on all the colorspace-defining + * chunks should be enabled, when GAMMA is switched on all the gamma-defining + * chunks should be enabled. If this is not done it becomes possible to read + * inconsistent PNG files and assign a probably incorrect interpretation to + * the information. (In other words, by carefully choosing which chunks to + * recognize the system configuration can select an interpretation for PNG + * files containing ambiguous data and this will result in inconsistent + * behavior between different libpng builds!) + */ + png_colorspace colorspace; +#endif + +#ifdef PNG_iCCP_SUPPORTED + /* iCCP chunk data. */ + png_charp iccp_name; /* profile name */ + png_bytep iccp_profile; /* International Color Consortium profile data */ + png_uint_32 iccp_proflen; /* ICC profile data length */ +#endif + +#ifdef PNG_TEXT_SUPPORTED + /* The tEXt, and zTXt chunks contain human-readable textual data in + * uncompressed, compressed, and optionally compressed forms, respectively. + * The data in "text" is an array of pointers to uncompressed, + * null-terminated C strings. Each chunk has a keyword that describes the + * textual data contained in that chunk. Keywords are not required to be + * unique, and the text string may be empty. Any number of text chunks may + * be in an image. + */ + int num_text; /* number of comments read or comments to write */ + int max_text; /* current size of text array */ + png_textp text; /* array of comments read or comments to write */ +#endif /* PNG_TEXT_SUPPORTED */ + +#ifdef PNG_tIME_SUPPORTED + /* The tIME chunk holds the last time the displayed image data was + * modified. See the png_time struct for the contents of this struct. + */ + png_time mod_time; +#endif + +#ifdef PNG_sBIT_SUPPORTED + /* The sBIT chunk specifies the number of significant high-order bits + * in the pixel data. Values are in the range [1, bit_depth], and are + * only specified for the channels in the pixel data. The contents of + * the low-order bits is not specified. Data is valid if + * (valid & PNG_INFO_sBIT) is non-zero. + */ + png_color_8 sig_bit; /* significant bits in color channels */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ +defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The tRNS chunk supplies transparency data for paletted images and + * other image types that don't need a full alpha channel. There are + * "num_trans" transparency values for a paletted image, stored in the + * same order as the palette colors, starting from index 0. Values + * for the data are in the range [0, 255], ranging from fully transparent + * to fully opaque, respectively. For non-paletted images, there is a + * single color specified that should be treated as fully transparent. + * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. + */ + png_bytep trans_alpha; /* alpha values for paletted image */ + png_color_16 trans_color; /* transparent color for non-palette image */ +#endif + +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The bKGD chunk gives the suggested image background color if the + * display program does not have its own background color and the image + * is needs to composited onto a background before display. The colors + * in "background" are normally in the same color space/depth as the + * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. + */ + png_color_16 background; +#endif + +#ifdef PNG_oFFs_SUPPORTED + /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards + * and downwards from the top-left corner of the display, page, or other + * application-specific co-ordinate space. See the PNG_OFFSET_ defines + * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. + */ + png_int_32 x_offset; /* x offset on page */ + png_int_32 y_offset; /* y offset on page */ + png_byte offset_unit_type; /* offset units type */ +#endif + +#ifdef PNG_pHYs_SUPPORTED + /* The pHYs chunk gives the physical pixel density of the image for + * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ + * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. + */ + png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ + png_uint_32 y_pixels_per_unit; /* vertical pixel density */ + png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ +#endif + +#ifdef PNG_hIST_SUPPORTED + /* The hIST chunk contains the relative frequency or importance of the + * various palette entries, so that a viewer can intelligently select a + * reduced-color palette, if required. Data is an array of "num_palette" + * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) + * is non-zero. + */ + png_uint_16p hist; +#endif + +#ifdef PNG_pCAL_SUPPORTED + /* The pCAL chunk describes a transformation between the stored pixel + * values and original physical data values used to create the image. + * The integer range [0, 2^bit_depth - 1] maps to the floating-point + * range given by [pcal_X0, pcal_X1], and are further transformed by a + * (possibly non-linear) transformation function given by "pcal_type" + * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ + * defines below, and the PNG-Group's PNG extensions document for a + * complete description of the transformations and how they should be + * implemented, and for a description of the ASCII parameter strings. + * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. + */ + png_charp pcal_purpose; /* pCAL chunk description string */ + png_int_32 pcal_X0; /* minimum value */ + png_int_32 pcal_X1; /* maximum value */ + png_charp pcal_units; /* Latin-1 string giving physical units */ + png_charpp pcal_params; /* ASCII strings containing parameter values */ + png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ + png_byte pcal_nparams; /* number of parameters given in pcal_params */ +#endif + +/* New members added in libpng-1.0.6 */ + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED + /* Storage for unknown chunks that the library doesn't recognize. */ + png_unknown_chunkp unknown_chunks; + + /* The type of this field is limited by the type of + * png_struct::user_chunk_cache_max, else overflow can occur. + */ + int unknown_chunks_num; +#endif + +#ifdef PNG_sPLT_SUPPORTED + /* Data on sPLT chunks (there may be more than one). */ + png_sPLT_tp splt_palettes; + int splt_palettes_num; /* Match type returned by png_get API */ +#endif + +#ifdef PNG_sCAL_SUPPORTED + /* The sCAL chunk describes the actual physical dimensions of the + * subject matter of the graphic. The chunk contains a unit specification + * a byte value, and two ASCII strings representing floating-point + * values. The values are width and height corresponsing to one pixel + * in the image. Data values are valid if (valid & PNG_INFO_sCAL) is + * non-zero. + */ + png_byte scal_unit; /* unit of physical scale */ + png_charp scal_s_width; /* string containing height */ + png_charp scal_s_height; /* string containing width */ +#endif + +#ifdef PNG_INFO_IMAGE_SUPPORTED + /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) + non-zero */ + /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ + png_bytepp row_pointers; /* the image bits */ +#endif + +}; +#endif /* PNGINFO_H */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pnglibconf.h b/3rdparty/wxwidgets3.0-3.0.1/src/png/pnglibconf.h new file mode 100644 index 0000000000..013533309a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pnglibconf.h @@ -0,0 +1,453 @@ +/* pnglibconf.h - library build configuration */ + +/* libpng version 1.6.2 - April 25, 2013 */ + +/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */ + +/* This code is released under the libpng license. */ +/* For conditions of distribution and use, see the disclaimer */ +/* and license in png.h */ + +/* pnglibconf.h */ +/* Machine generated file: DO NOT EDIT */ +/* Derived from: scripts/pnglibconf.dfa */ +#ifndef PNGLCONF_H +#define PNGLCONF_H +/* options */ +#define PNG_16BIT_SUPPORTED +#define PNG_ALIGNED_MEMORY_SUPPORTED +/*#undef PNG_ARM_NEON_API_SUPPORTED*/ +/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/ +/*#undef PNG_ARM_NEON_SUPPORTED*/ +#define PNG_BENIGN_ERRORS_SUPPORTED +#define PNG_BENIGN_READ_ERRORS_SUPPORTED +/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/ +#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_COLORSPACE_SUPPORTED +#define PNG_CONSOLE_IO_SUPPORTED +#define PNG_CONVERT_tIME_SUPPORTED +#define PNG_EASY_ACCESS_SUPPORTED +/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ +#define PNG_ERROR_TEXT_SUPPORTED +#define PNG_FIXED_POINT_SUPPORTED +#define PNG_FLOATING_ARITHMETIC_SUPPORTED +#define PNG_FLOATING_POINT_SUPPORTED +#define PNG_FORMAT_AFIRST_SUPPORTED +#define PNG_FORMAT_BGR_SUPPORTED +#define PNG_GAMMA_SUPPORTED +#define PNG_GET_PALETTE_MAX_SUPPORTED +#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +#define PNG_INCH_CONVERSIONS_SUPPORTED +#define PNG_INFO_IMAGE_SUPPORTED +#define PNG_IO_STATE_SUPPORTED +#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_POINTER_INDEXING_SUPPORTED +#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED +#define PNG_READ_ALPHA_MODE_SUPPORTED +#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_READ_BACKGROUND_SUPPORTED +#define PNG_READ_BGR_SUPPORTED +#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_READ_COMPOSITE_NODIV_SUPPORTED +#define PNG_READ_COMPRESSED_TEXT_SUPPORTED +#define PNG_READ_EXPAND_16_SUPPORTED +#define PNG_READ_EXPAND_SUPPORTED +#define PNG_READ_FILLER_SUPPORTED +#define PNG_READ_GAMMA_SUPPORTED +#define PNG_READ_GET_PALETTE_MAX_SUPPORTED +#define PNG_READ_GRAY_TO_RGB_SUPPORTED +#define PNG_READ_INTERLACING_SUPPORTED +#define PNG_READ_INT_FUNCTIONS_SUPPORTED +#define PNG_READ_INVERT_ALPHA_SUPPORTED +#define PNG_READ_INVERT_SUPPORTED +#define PNG_READ_OPT_PLTE_SUPPORTED +#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_PACK_SUPPORTED +#define PNG_READ_QUANTIZE_SUPPORTED +#define PNG_READ_RGB_TO_GRAY_SUPPORTED +#define PNG_READ_SCALE_16_TO_8_SUPPORTED +#define PNG_READ_SHIFT_SUPPORTED +#define PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_STRIP_ALPHA_SUPPORTED +#define PNG_READ_SUPPORTED +#define PNG_READ_SWAP_ALPHA_SUPPORTED +#define PNG_READ_SWAP_SUPPORTED +#define PNG_READ_TEXT_SUPPORTED +#define PNG_READ_TRANSFORMS_SUPPORTED +#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_READ_USER_CHUNKS_SUPPORTED +#define PNG_READ_USER_TRANSFORM_SUPPORTED +#define PNG_READ_bKGD_SUPPORTED +#define PNG_READ_cHRM_SUPPORTED +#define PNG_READ_gAMA_SUPPORTED +#define PNG_READ_hIST_SUPPORTED +#define PNG_READ_iCCP_SUPPORTED +#define PNG_READ_iTXt_SUPPORTED +#define PNG_READ_oFFs_SUPPORTED +#define PNG_READ_pCAL_SUPPORTED +#define PNG_READ_pHYs_SUPPORTED +#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_sCAL_SUPPORTED +#define PNG_READ_sPLT_SUPPORTED +#define PNG_READ_sRGB_SUPPORTED +#define PNG_READ_tEXt_SUPPORTED +#define PNG_READ_tIME_SUPPORTED +#define PNG_READ_tRNS_SUPPORTED +#define PNG_READ_zTXt_SUPPORTED +/*#undef PNG_SAFE_LIMITS_SUPPORTED*/ +#define PNG_SAVE_INT_32_SUPPORTED +#define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SEQUENTIAL_READ_SUPPORTED +#define PNG_SETJMP_SUPPORTED +#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED +#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +/*#undef PNG_SET_OPTION_SUPPORTED*/ +#define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_READ_BGR_SUPPORTED +#define PNG_SIMPLIFIED_READ_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_SUPPORTED +#define PNG_STDIO_SUPPORTED +#define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_TEXT_SUPPORTED +#define PNG_TIME_RFC1123_SUPPORTED +#define PNG_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_USER_CHUNKS_SUPPORTED +#define PNG_USER_LIMITS_SUPPORTED +#define PNG_USER_MEM_SUPPORTED +#define PNG_USER_TRANSFORM_INFO_SUPPORTED +#define PNG_USER_TRANSFORM_PTR_SUPPORTED +#define PNG_WARNINGS_SUPPORTED +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_BGR_SUPPORTED +#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +#define PNG_WRITE_FILLER_SUPPORTED +#define PNG_WRITE_FILTER_SUPPORTED +#define PNG_WRITE_FLUSH_SUPPORTED +#define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED +#define PNG_WRITE_INTERLACING_SUPPORTED +#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED +#define PNG_WRITE_INVERT_ALPHA_SUPPORTED +#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED +#define PNG_WRITE_PACKSWAP_SUPPORTED +#define PNG_WRITE_PACK_SUPPORTED +#define PNG_WRITE_SHIFT_SUPPORTED +#define PNG_WRITE_SUPPORTED +#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_WRITE_SWAP_SUPPORTED +#define PNG_WRITE_TEXT_SUPPORTED +#define PNG_WRITE_TRANSFORMS_SUPPORTED +#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_WRITE_USER_TRANSFORM_SUPPORTED +#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +#define PNG_WRITE_bKGD_SUPPORTED +#define PNG_WRITE_cHRM_SUPPORTED +#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_WRITE_hIST_SUPPORTED +#define PNG_WRITE_iCCP_SUPPORTED +#define PNG_WRITE_iTXt_SUPPORTED +#define PNG_WRITE_oFFs_SUPPORTED +#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_WRITE_pHYs_SUPPORTED +#define PNG_WRITE_sBIT_SUPPORTED +#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_WRITE_sRGB_SUPPORTED +#define PNG_WRITE_tEXt_SUPPORTED +#define PNG_WRITE_tIME_SUPPORTED +#define PNG_WRITE_tRNS_SUPPORTED +#define PNG_WRITE_zTXt_SUPPORTED +#define PNG_bKGD_SUPPORTED +#define PNG_cHRM_SUPPORTED +#define PNG_gAMA_SUPPORTED +#define PNG_hIST_SUPPORTED +#define PNG_iCCP_SUPPORTED +#define PNG_iTXt_SUPPORTED +#define PNG_oFFs_SUPPORTED +#define PNG_pCAL_SUPPORTED +#define PNG_pHYs_SUPPORTED +#define PNG_sBIT_SUPPORTED +#define PNG_sCAL_SUPPORTED +#define PNG_sPLT_SUPPORTED +#define PNG_sRGB_SUPPORTED +#define PNG_tEXt_SUPPORTED +#define PNG_tIME_SUPPORTED +#define PNG_tRNS_SUPPORTED +#define PNG_zTXt_SUPPORTED +/* end of options */ +/* settings */ +#define PNG_API_RULE 0 +#define PNG_CALLOC_SUPPORTED +#define PNG_COST_SHIFT 3 +#define PNG_DEFAULT_READ_MACROS 1 +#define PNG_GAMMA_THRESHOLD_FIXED 5000 +#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE +#define PNG_INFLATE_BUF_SIZE 1024 +#define PNG_MAX_GAMMA_8 11 +#define PNG_PREFIX wx_ +#define PNG_QUANTIZE_BLUE_BITS 5 +#define PNG_QUANTIZE_GREEN_BITS 5 +#define PNG_QUANTIZE_RED_BITS 5 +#define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1) +#define PNG_TEXT_Z_DEFAULT_STRATEGY 0 +#define PNG_WEIGHT_SHIFT 8 +#define PNG_ZBUF_SIZE 8192 +#define PNG_Z_DEFAULT_COMPRESSION (-1) +#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0 +#define PNG_Z_DEFAULT_STRATEGY 1 +#define PNG_sCAL_PRECISION 5 +#define PNG_sRGB_PROFILE_CHECKS 2 +/* end of settings */ +#define png_access_version_number wx_png_access_version_number +#define png_benign_error wx_png_benign_error +#define png_build_grayscale_palette wx_png_build_grayscale_palette +#define png_calloc wx_png_calloc +#define png_chunk_benign_error wx_png_chunk_benign_error +#define png_chunk_error wx_png_chunk_error +#define png_chunk_warning wx_png_chunk_warning +#define png_convert_from_struct_tm wx_png_convert_from_struct_tm +#define png_convert_from_time_t wx_png_convert_from_time_t +#define png_convert_to_rfc1123 wx_png_convert_to_rfc1123 +#define png_convert_to_rfc1123_buffer wx_png_convert_to_rfc1123_buffer +#define png_create_info_struct wx_png_create_info_struct +#define png_create_read_struct wx_png_create_read_struct +#define png_create_read_struct_2 wx_png_create_read_struct_2 +#define png_create_write_struct wx_png_create_write_struct +#define png_create_write_struct_2 wx_png_create_write_struct_2 +#define png_data_freer wx_png_data_freer +#define png_destroy_info_struct wx_png_destroy_info_struct +#define png_destroy_read_struct wx_png_destroy_read_struct +#define png_destroy_write_struct wx_png_destroy_write_struct +#define png_error wx_png_error +#define png_free wx_png_free +#define png_free_data wx_png_free_data +#define png_free_default wx_png_free_default +#define png_get_IHDR wx_png_get_IHDR +#define png_get_PLTE wx_png_get_PLTE +#define png_get_bKGD wx_png_get_bKGD +#define png_get_bit_depth wx_png_get_bit_depth +#define png_get_cHRM wx_png_get_cHRM +#define png_get_cHRM_XYZ wx_png_get_cHRM_XYZ +#define png_get_cHRM_XYZ_fixed wx_png_get_cHRM_XYZ_fixed +#define png_get_cHRM_fixed wx_png_get_cHRM_fixed +#define png_get_channels wx_png_get_channels +#define png_get_chunk_cache_max wx_png_get_chunk_cache_max +#define png_get_chunk_malloc_max wx_png_get_chunk_malloc_max +#define png_get_color_type wx_png_get_color_type +#define png_get_compression_buffer_size wx_png_get_compression_buffer_size +#define png_get_compression_type wx_png_get_compression_type +#define png_get_copyright wx_png_get_copyright +#define png_get_current_pass_number wx_png_get_current_pass_number +#define png_get_current_row_number wx_png_get_current_row_number +#define png_get_error_ptr wx_png_get_error_ptr +#define png_get_filter_type wx_png_get_filter_type +#define png_get_gAMA wx_png_get_gAMA +#define png_get_gAMA_fixed wx_png_get_gAMA_fixed +#define png_get_hIST wx_png_get_hIST +#define png_get_header_ver wx_png_get_header_ver +#define png_get_header_version wx_png_get_header_version +#define png_get_iCCP wx_png_get_iCCP +#define png_get_image_height wx_png_get_image_height +#define png_get_image_width wx_png_get_image_width +#define png_get_int_32 wx_png_get_int_32 +#define png_get_interlace_type wx_png_get_interlace_type +#define png_get_io_chunk_type wx_png_get_io_chunk_type +#define png_get_io_ptr wx_png_get_io_ptr +#define png_get_io_state wx_png_get_io_state +#define png_get_libpng_ver wx_png_get_libpng_ver +#define png_get_mem_ptr wx_png_get_mem_ptr +#define png_get_oFFs wx_png_get_oFFs +#define png_get_pCAL wx_png_get_pCAL +#define png_get_pHYs wx_png_get_pHYs +#define png_get_pHYs_dpi wx_png_get_pHYs_dpi +#define png_get_palette_max wx_png_get_palette_max +#define png_get_pixel_aspect_ratio wx_png_get_pixel_aspect_ratio +#define png_get_pixel_aspect_ratio_fixed wx_png_get_pixel_aspect_ratio_fixed +#define png_get_pixels_per_inch wx_png_get_pixels_per_inch +#define png_get_pixels_per_meter wx_png_get_pixels_per_meter +#define png_get_progressive_ptr wx_png_get_progressive_ptr +#define png_get_rgb_to_gray_status wx_png_get_rgb_to_gray_status +#define png_get_rowbytes wx_png_get_rowbytes +#define png_get_rows wx_png_get_rows +#define png_get_sBIT wx_png_get_sBIT +#define png_get_sCAL wx_png_get_sCAL +#define png_get_sCAL_fixed wx_png_get_sCAL_fixed +#define png_get_sCAL_s wx_png_get_sCAL_s +#define png_get_sPLT wx_png_get_sPLT +#define png_get_sRGB wx_png_get_sRGB +#define png_get_signature wx_png_get_signature +#define png_get_tIME wx_png_get_tIME +#define png_get_tRNS wx_png_get_tRNS +#define png_get_text wx_png_get_text +#define png_get_uint_16 wx_png_get_uint_16 +#define png_get_uint_31 wx_png_get_uint_31 +#define png_get_uint_32 wx_png_get_uint_32 +#define png_get_unknown_chunks wx_png_get_unknown_chunks +#define png_get_user_chunk_ptr wx_png_get_user_chunk_ptr +#define png_get_user_height_max wx_png_get_user_height_max +#define png_get_user_transform_ptr wx_png_get_user_transform_ptr +#define png_get_user_width_max wx_png_get_user_width_max +#define png_get_valid wx_png_get_valid +#define png_get_x_offset_inches wx_png_get_x_offset_inches +#define png_get_x_offset_inches_fixed wx_png_get_x_offset_inches_fixed +#define png_get_x_offset_microns wx_png_get_x_offset_microns +#define png_get_x_offset_pixels wx_png_get_x_offset_pixels +#define png_get_x_pixels_per_inch wx_png_get_x_pixels_per_inch +#define png_get_x_pixels_per_meter wx_png_get_x_pixels_per_meter +#define png_get_y_offset_inches wx_png_get_y_offset_inches +#define png_get_y_offset_inches_fixed wx_png_get_y_offset_inches_fixed +#define png_get_y_offset_microns wx_png_get_y_offset_microns +#define png_get_y_offset_pixels wx_png_get_y_offset_pixels +#define png_get_y_pixels_per_inch wx_png_get_y_pixels_per_inch +#define png_get_y_pixels_per_meter wx_png_get_y_pixels_per_meter +#define png_handle_as_unknown wx_png_handle_as_unknown +#define png_image_begin_read_from_file wx_png_image_begin_read_from_file +#define png_image_begin_read_from_memory wx_png_image_begin_read_from_memory +#define png_image_begin_read_from_stdio wx_png_image_begin_read_from_stdio +#define png_image_finish_read wx_png_image_finish_read +#define png_image_free wx_png_image_free +#define png_image_write_to_file wx_png_image_write_to_file +#define png_image_write_to_stdio wx_png_image_write_to_stdio +#define png_info_init_3 wx_png_info_init_3 +#define png_init_io wx_png_init_io +#define png_longjmp wx_png_longjmp +#define png_malloc wx_png_malloc +#define png_malloc_default wx_png_malloc_default +#define png_malloc_warn wx_png_malloc_warn +#define png_permit_mng_features wx_png_permit_mng_features +#define png_process_data wx_png_process_data +#define png_process_data_pause wx_png_process_data_pause +#define png_process_data_skip wx_png_process_data_skip +#define png_progressive_combine_row wx_png_progressive_combine_row +#define png_read_end wx_png_read_end +#define png_read_image wx_png_read_image +#define png_read_info wx_png_read_info +#define png_read_png wx_png_read_png +#define png_read_row wx_png_read_row +#define png_read_rows wx_png_read_rows +#define png_read_update_info wx_png_read_update_info +#define png_reset_zstream wx_png_reset_zstream +#define png_save_int_32 wx_png_save_int_32 +#define png_save_uint_16 wx_png_save_uint_16 +#define png_save_uint_32 wx_png_save_uint_32 +#define png_set_IHDR wx_png_set_IHDR +#define png_set_PLTE wx_png_set_PLTE +#define png_set_add_alpha wx_png_set_add_alpha +#define png_set_alpha_mode wx_png_set_alpha_mode +#define png_set_alpha_mode_fixed wx_png_set_alpha_mode_fixed +#define png_set_bKGD wx_png_set_bKGD +#define png_set_background wx_png_set_background +#define png_set_background_fixed wx_png_set_background_fixed +#define png_set_benign_errors wx_png_set_benign_errors +#define png_set_bgr wx_png_set_bgr +#define png_set_cHRM wx_png_set_cHRM +#define png_set_cHRM_XYZ wx_png_set_cHRM_XYZ +#define png_set_cHRM_XYZ_fixed wx_png_set_cHRM_XYZ_fixed +#define png_set_cHRM_fixed wx_png_set_cHRM_fixed +#define png_set_check_for_invalid_index wx_png_set_check_for_invalid_index +#define png_set_chunk_cache_max wx_png_set_chunk_cache_max +#define png_set_chunk_malloc_max wx_png_set_chunk_malloc_max +#define png_set_compression_buffer_size wx_png_set_compression_buffer_size +#define png_set_compression_level wx_png_set_compression_level +#define png_set_compression_mem_level wx_png_set_compression_mem_level +#define png_set_compression_method wx_png_set_compression_method +#define png_set_compression_strategy wx_png_set_compression_strategy +#define png_set_compression_window_bits wx_png_set_compression_window_bits +#define png_set_crc_action wx_png_set_crc_action +#define png_set_error_fn wx_png_set_error_fn +#define png_set_expand wx_png_set_expand +#define png_set_expand_16 wx_png_set_expand_16 +#define png_set_expand_gray_1_2_4_to_8 wx_png_set_expand_gray_1_2_4_to_8 +#define png_set_filler wx_png_set_filler +#define png_set_filter wx_png_set_filter +#define png_set_filter_heuristics wx_png_set_filter_heuristics +#define png_set_filter_heuristics_fixed wx_png_set_filter_heuristics_fixed +#define png_set_flush wx_png_set_flush +#define png_set_gAMA wx_png_set_gAMA +#define png_set_gAMA_fixed wx_png_set_gAMA_fixed +#define png_set_gamma wx_png_set_gamma +#define png_set_gamma_fixed wx_png_set_gamma_fixed +#define png_set_gray_to_rgb wx_png_set_gray_to_rgb +#define png_set_hIST wx_png_set_hIST +#define png_set_iCCP wx_png_set_iCCP +#define png_set_interlace_handling wx_png_set_interlace_handling +#define png_set_invalid wx_png_set_invalid +#define png_set_invert_alpha wx_png_set_invert_alpha +#define png_set_invert_mono wx_png_set_invert_mono +#define png_set_keep_unknown_chunks wx_png_set_keep_unknown_chunks +#define png_set_longjmp_fn wx_png_set_longjmp_fn +#define png_set_mem_fn wx_png_set_mem_fn +#define png_set_oFFs wx_png_set_oFFs +#define png_set_pCAL wx_png_set_pCAL +#define png_set_pHYs wx_png_set_pHYs +#define png_set_packing wx_png_set_packing +#define png_set_packswap wx_png_set_packswap +#define png_set_palette_to_rgb wx_png_set_palette_to_rgb +#define png_set_progressive_read_fn wx_png_set_progressive_read_fn +#define png_set_quantize wx_png_set_quantize +#define png_set_read_fn wx_png_set_read_fn +#define png_set_read_status_fn wx_png_set_read_status_fn +#define png_set_read_user_chunk_fn wx_png_set_read_user_chunk_fn +#define png_set_read_user_transform_fn wx_png_set_read_user_transform_fn +#define png_set_rgb_to_gray wx_png_set_rgb_to_gray +#define png_set_rgb_to_gray_fixed wx_png_set_rgb_to_gray_fixed +#define png_set_rows wx_png_set_rows +#define png_set_sBIT wx_png_set_sBIT +#define png_set_sCAL wx_png_set_sCAL +#define png_set_sCAL_fixed wx_png_set_sCAL_fixed +#define png_set_sCAL_s wx_png_set_sCAL_s +#define png_set_sPLT wx_png_set_sPLT +#define png_set_sRGB wx_png_set_sRGB +#define png_set_sRGB_gAMA_and_cHRM wx_png_set_sRGB_gAMA_and_cHRM +#define png_set_scale_16 wx_png_set_scale_16 +#define png_set_shift wx_png_set_shift +#define png_set_sig_bytes wx_png_set_sig_bytes +#define png_set_strip_16 wx_png_set_strip_16 +#define png_set_strip_alpha wx_png_set_strip_alpha +#define png_set_swap wx_png_set_swap +#define png_set_swap_alpha wx_png_set_swap_alpha +#define png_set_tIME wx_png_set_tIME +#define png_set_tRNS wx_png_set_tRNS +#define png_set_tRNS_to_alpha wx_png_set_tRNS_to_alpha +#define png_set_text wx_png_set_text +#define png_set_text_compression_level wx_png_set_text_compression_level +#define png_set_text_compression_mem_level wx_png_set_text_compression_mem_level +#define png_set_text_compression_method wx_png_set_text_compression_method +#define png_set_text_compression_strategy wx_png_set_text_compression_strategy +#define png_set_text_compression_window_bits wx_png_set_text_compression_window_bits +#define png_set_unknown_chunk_location wx_png_set_unknown_chunk_location +#define png_set_unknown_chunks wx_png_set_unknown_chunks +#define png_set_user_limits wx_png_set_user_limits +#define png_set_user_transform_info wx_png_set_user_transform_info +#define png_set_write_fn wx_png_set_write_fn +#define png_set_write_status_fn wx_png_set_write_status_fn +#define png_set_write_user_transform_fn wx_png_set_write_user_transform_fn +#define png_sig_cmp wx_png_sig_cmp +#define png_start_read_image wx_png_start_read_image +#define png_warning wx_png_warning +#define png_write_chunk wx_png_write_chunk +#define png_write_chunk_data wx_png_write_chunk_data +#define png_write_chunk_end wx_png_write_chunk_end +#define png_write_chunk_start wx_png_write_chunk_start +#define png_write_end wx_png_write_end +#define png_write_flush wx_png_write_flush +#define png_write_image wx_png_write_image +#define png_write_info wx_png_write_info +#define png_write_info_before_PLTE wx_png_write_info_before_PLTE +#define png_write_png wx_png_write_png +#define png_write_row wx_png_write_row +#define png_write_rows wx_png_write_rows +#define png_write_sig wx_png_write_sig +#define wx_png_get_uint_32(buf) PNG_get_uint_32(buf) +#define wx_png_get_uint_16(buf) PNG_get_uint_16(buf) +#define wx_png_get_int_32(buf) PNG_get_int_32(buf) +#endif /* PNGLCONF_H */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngmem.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngmem.c new file mode 100644 index 0000000000..b9b3efb442 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngmem.c @@ -0,0 +1,277 @@ + +/* pngmem.c - stub functions for memory allocation + * + * Last changed in libpng 1.6.0 [February 14, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file provides a location for all memory allocation. Users who + * need special memory handling are expected to supply replacement + * functions for png_malloc() and png_free(), and to use + * png_create_read_struct_2() and png_create_write_struct_2() to + * identify the replacement functions. + */ + +#include "pngpriv.h" + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +/* Free a png_struct */ +void /* PRIVATE */ +png_destroy_png_struct(png_structrp png_ptr) +{ + if (png_ptr != NULL) + { + /* png_free might call png_error and may certainly call + * png_get_mem_ptr, so fake a temporary png_struct to support this. + */ + png_struct dummy_struct = *png_ptr; + memset(png_ptr, 0, (sizeof *png_ptr)); + png_free(&dummy_struct, png_ptr); + +# ifdef PNG_SETJMP_SUPPORTED + /* We may have a jmp_buf left to deallocate. */ + png_free_jmpbuf(&dummy_struct); +# endif + } +} + +/* Allocate memory. For reasonable files, size should never exceed + * 64K. However, zlib may allocate more then 64K if you don't tell + * it not to. See zconf.h and png.h for more information. zlib does + * need to allocate exactly 64K, so whatever you call here must + * have the ability to do that. + */ +PNG_FUNCTION(png_voidp,PNGAPI +png_calloc,(png_const_structrp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) +{ + png_voidp ret; + + ret = png_malloc(png_ptr, size); + + if (ret != NULL) + memset(ret, 0, size); + + return ret; +} + +/* png_malloc_base, an internal function added at libpng 1.6.0, does the work of + * allocating memory, taking into account limits and PNG_USER_MEM_SUPPORTED. + * Checking and error handling must happen outside this routine; it returns NULL + * if the allocation cannot be done (for any reason.) + */ +PNG_FUNCTION(png_voidp /* PRIVATE */, +png_malloc_base,(png_const_structrp png_ptr, png_alloc_size_t size), + PNG_ALLOCATED) +{ + /* Moved to png_malloc_base from png_malloc_default in 1.6.0; the DOS + * allocators have also been removed in 1.6.0, so any 16-bit system now has + * to implement a user memory handler. This checks to be sure it isn't + * called with big numbers. + */ +#ifdef PNG_USER_MEM_SUPPORTED + PNG_UNUSED(png_ptr) +#endif + if (size > 0 && size <= PNG_SIZE_MAX +# ifdef PNG_MAX_MALLOC_64K + && size <= 65536U +# endif + ) + { +#ifdef PNG_USER_MEM_SUPPORTED + if (png_ptr != NULL && png_ptr->malloc_fn != NULL) + return png_ptr->malloc_fn(png_constcast(png_structrp,png_ptr), size); + + else +#endif + return malloc((size_t)size); /* checked for truncation above */ + } + + else + return NULL; +} + +/* This is really here only to work round a spurious warning in GCC 4.6 and 4.7 + * that arises because of the checks in png_realloc_array that are repeated in + * png_malloc_array. + */ +static png_voidp +png_malloc_array_checked(png_const_structrp png_ptr, int nelements, + size_t element_size) +{ + png_alloc_size_t req = nelements; /* known to be > 0 */ + + if (req <= PNG_SIZE_MAX/element_size) + return png_malloc_base(png_ptr, req * element_size); + + /* The failure case when the request is too large */ + return NULL; +} + +PNG_FUNCTION(png_voidp /* PRIVATE */, +png_malloc_array,(png_const_structrp png_ptr, int nelements, + size_t element_size),PNG_ALLOCATED) +{ + if (nelements <= 0 || element_size == 0) + png_error(png_ptr, "internal error: array alloc"); + + return png_malloc_array_checked(png_ptr, nelements, element_size); +} + +PNG_FUNCTION(png_voidp /* PRIVATE */, +png_realloc_array,(png_const_structrp png_ptr, png_const_voidp old_array, + int old_elements, int add_elements, size_t element_size),PNG_ALLOCATED) +{ + /* These are internal errors: */ + if (add_elements <= 0 || element_size == 0 || old_elements < 0 || + (old_array == NULL && old_elements > 0)) + png_error(png_ptr, "internal error: array realloc"); + + /* Check for overflow on the elements count (so the caller does not have to + * check.) + */ + if (add_elements <= INT_MAX - old_elements) + { + png_voidp new_array = png_malloc_array_checked(png_ptr, + old_elements+add_elements, element_size); + + if (new_array != NULL) + { + /* Because png_malloc_array worked the size calculations below cannot + * overflow. + */ + if (old_elements > 0) + memcpy(new_array, old_array, element_size*(unsigned)old_elements); + + memset((char*)new_array + element_size*(unsigned)old_elements, 0, + element_size*(unsigned)add_elements); + + return new_array; + } + } + + return NULL; /* error */ +} + +/* Various functions that have different error handling are derived from this. + * png_malloc always exists, but if PNG_USER_MEM_SUPPORTED is defined a separate + * function png_malloc_default is also provided. + */ +PNG_FUNCTION(png_voidp,PNGAPI +png_malloc,(png_const_structrp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) +{ + png_voidp ret; + + if (png_ptr == NULL) + return NULL; + + ret = png_malloc_base(png_ptr, size); + + if (ret == NULL) + png_error(png_ptr, "Out of memory"); /* 'm' means png_malloc */ + + return ret; +} + +#ifdef PNG_USER_MEM_SUPPORTED +PNG_FUNCTION(png_voidp,PNGAPI +png_malloc_default,(png_const_structrp png_ptr, png_alloc_size_t size), + PNG_ALLOCATED PNG_DEPRECATED) +{ + png_voidp ret; + + if (png_ptr == NULL) + return NULL; + + /* Passing 'NULL' here bypasses the application provided memory handler. */ + ret = png_malloc_base(NULL/*use malloc*/, size); + + if (ret == NULL) + png_error(png_ptr, "Out of Memory"); /* 'M' means png_malloc_default */ + + return ret; +} +#endif /* PNG_USER_MEM_SUPPORTED */ + +/* This function was added at libpng version 1.2.3. The png_malloc_warn() + * function will issue a png_warning and return NULL instead of issuing a + * png_error, if it fails to allocate the requested memory. + */ +PNG_FUNCTION(png_voidp,PNGAPI +png_malloc_warn,(png_const_structrp png_ptr, png_alloc_size_t size), + PNG_ALLOCATED) +{ + if (png_ptr != NULL) + { + png_voidp ret = png_malloc_base(png_ptr, size); + + if (ret != NULL) + return ret; + + png_warning(png_ptr, "Out of memory"); + } + + return NULL; +} + +/* Free a pointer allocated by png_malloc(). If ptr is NULL, return + * without taking any action. + */ +void PNGAPI +png_free(png_const_structrp png_ptr, png_voidp ptr) +{ + if (png_ptr == NULL || ptr == NULL) + return; + +#ifdef PNG_USER_MEM_SUPPORTED + if (png_ptr->free_fn != NULL) + png_ptr->free_fn(png_constcast(png_structrp,png_ptr), ptr); + + else + png_free_default(png_ptr, ptr); +} + +PNG_FUNCTION(void,PNGAPI +png_free_default,(png_const_structrp png_ptr, png_voidp ptr),PNG_DEPRECATED) +{ + if (png_ptr == NULL || ptr == NULL) + return; +#endif /* PNG_USER_MEM_SUPPORTED */ + + free(ptr); +} + +#ifdef PNG_USER_MEM_SUPPORTED +/* This function is called when the application wants to use another method + * of allocating and freeing memory. + */ +void PNGAPI +png_set_mem_fn(png_structrp png_ptr, png_voidp mem_ptr, png_malloc_ptr + malloc_fn, png_free_ptr free_fn) +{ + if (png_ptr != NULL) + { + png_ptr->mem_ptr = mem_ptr; + png_ptr->malloc_fn = malloc_fn; + png_ptr->free_fn = free_fn; + } +} + +/* This function returns a pointer to the mem_ptr associated with the user + * functions. The application should free any memory associated with this + * pointer before png_write_destroy and png_read_destroy are called. + */ +png_voidp PNGAPI +png_get_mem_ptr(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return NULL; + + return png_ptr->mem_ptr; +} +#endif /* PNG_USER_MEM_SUPPORTED */ +#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngnow.png b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngnow.png new file mode 100644 index 0000000000..82793ebddb Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngnow.png differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngpread.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngpread.c new file mode 100644 index 0000000000..f132ce6004 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngpread.c @@ -0,0 +1,1291 @@ + +/* pngpread.c - read a png file in push mode + * + * Last changed in libpng 1.6.0 [February 14, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#include "pngpriv.h" + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + +/* Push model modes */ +#define PNG_READ_SIG_MODE 0 +#define PNG_READ_CHUNK_MODE 1 +#define PNG_READ_IDAT_MODE 2 +#define PNG_SKIP_MODE 3 +#define PNG_READ_tEXt_MODE 4 +#define PNG_READ_zTXt_MODE 5 +#define PNG_READ_DONE_MODE 6 +#define PNG_READ_iTXt_MODE 7 +#define PNG_ERROR_MODE 8 + +void PNGAPI +png_process_data(png_structrp png_ptr, png_inforp info_ptr, + png_bytep buffer, png_size_t buffer_size) +{ + if (png_ptr == NULL || info_ptr == NULL) + return; + + png_push_restore_buffer(png_ptr, buffer, buffer_size); + + while (png_ptr->buffer_size) + { + png_process_some_data(png_ptr, info_ptr); + } +} + +png_size_t PNGAPI +png_process_data_pause(png_structrp png_ptr, int save) +{ + if (png_ptr != NULL) + { + /* It's easiest for the caller if we do the save, then the caller doesn't + * have to supply the same data again: + */ + if (save) + png_push_save_buffer(png_ptr); + else + { + /* This includes any pending saved bytes: */ + png_size_t remaining = png_ptr->buffer_size; + png_ptr->buffer_size = 0; + + /* So subtract the saved buffer size, unless all the data + * is actually 'saved', in which case we just return 0 + */ + if (png_ptr->save_buffer_size < remaining) + return remaining - png_ptr->save_buffer_size; + } + } + + return 0; +} + +png_uint_32 PNGAPI +png_process_data_skip(png_structrp png_ptr) +{ + png_uint_32 remaining = 0; + + if (png_ptr != NULL && png_ptr->process_mode == PNG_SKIP_MODE && + png_ptr->skip_length > 0) + { + /* At the end of png_process_data the buffer size must be 0 (see the loop + * above) so we can detect a broken call here: + */ + if (png_ptr->buffer_size != 0) + png_error(png_ptr, + "png_process_data_skip called inside png_process_data"); + + /* If is impossible for there to be a saved buffer at this point - + * otherwise we could not be in SKIP mode. This will also happen if + * png_process_skip is called inside png_process_data (but only very + * rarely.) + */ + if (png_ptr->save_buffer_size != 0) + png_error(png_ptr, "png_process_data_skip called with saved data"); + + remaining = png_ptr->skip_length; + png_ptr->skip_length = 0; + png_ptr->process_mode = PNG_READ_CHUNK_MODE; + } + + return remaining; +} + +/* What we do with the incoming data depends on what we were previously + * doing before we ran out of data... + */ +void /* PRIVATE */ +png_process_some_data(png_structrp png_ptr, png_inforp info_ptr) +{ + if (png_ptr == NULL) + return; + + switch (png_ptr->process_mode) + { + case PNG_READ_SIG_MODE: + { + png_push_read_sig(png_ptr, info_ptr); + break; + } + + case PNG_READ_CHUNK_MODE: + { + png_push_read_chunk(png_ptr, info_ptr); + break; + } + + case PNG_READ_IDAT_MODE: + { + png_push_read_IDAT(png_ptr); + break; + } + + case PNG_SKIP_MODE: + { + png_push_crc_finish(png_ptr); + break; + } + + default: + { + png_ptr->buffer_size = 0; + break; + } + } +} + +/* Read any remaining signature bytes from the stream and compare them with + * the correct PNG signature. It is possible that this routine is called + * with bytes already read from the signature, either because they have been + * checked by the calling application, or because of multiple calls to this + * routine. + */ +void /* PRIVATE */ +png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr) +{ + png_size_t num_checked = png_ptr->sig_bytes, + num_to_check = 8 - num_checked; + + if (png_ptr->buffer_size < num_to_check) + { + num_to_check = png_ptr->buffer_size; + } + + png_push_fill_buffer(png_ptr, &(info_ptr->signature[num_checked]), + num_to_check); + png_ptr->sig_bytes = (png_byte)(png_ptr->sig_bytes + num_to_check); + + if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) + { + if (num_checked < 4 && + png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) + png_error(png_ptr, "Not a PNG file"); + + else + png_error(png_ptr, "PNG file corrupted by ASCII conversion"); + } + else + { + if (png_ptr->sig_bytes >= 8) + { + png_ptr->process_mode = PNG_READ_CHUNK_MODE; + } + } +} + +void /* PRIVATE */ +png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr) +{ + png_uint_32 chunk_name; +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + int keep; /* unknown handling method */ +#endif + + /* First we make sure we have enough data for the 4 byte chunk name + * and the 4 byte chunk length before proceeding with decoding the + * chunk data. To fully decode each of these chunks, we also make + * sure we have enough data in the buffer for the 4 byte CRC at the + * end of every chunk (except IDAT, which is handled separately). + */ + if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER)) + { + png_byte chunk_length[4]; + png_byte chunk_tag[4]; + + if (png_ptr->buffer_size < 8) + { + png_push_save_buffer(png_ptr); + return; + } + + png_push_fill_buffer(png_ptr, chunk_length, 4); + png_ptr->push_length = png_get_uint_31(png_ptr, chunk_length); + png_reset_crc(png_ptr); + png_crc_read(png_ptr, chunk_tag, 4); + png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(chunk_tag); + png_check_chunk_name(png_ptr, png_ptr->chunk_name); + png_ptr->mode |= PNG_HAVE_CHUNK_HEADER; + } + + chunk_name = png_ptr->chunk_name; + + if (chunk_name == png_IDAT) + { + if (png_ptr->mode & PNG_AFTER_IDAT) + png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT; + + /* If we reach an IDAT chunk, this means we have read all of the + * header chunks, and we can start reading the image (or if this + * is called after the image has been read - we have an error). + */ + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before IDAT"); + + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + !(png_ptr->mode & PNG_HAVE_PLTE)) + png_error(png_ptr, "Missing PLTE before IDAT"); + + png_ptr->mode |= PNG_HAVE_IDAT; + + if (!(png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT)) + if (png_ptr->push_length == 0) + return; + + if (png_ptr->mode & PNG_AFTER_IDAT) + png_benign_error(png_ptr, "Too many IDATs found"); + } + + if (chunk_name == png_IHDR) + { + if (png_ptr->push_length != 13) + png_error(png_ptr, "Invalid IHDR length"); + + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_IHDR(png_ptr, info_ptr, png_ptr->push_length); + } + + else if (chunk_name == png_IEND) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_IEND(png_ptr, info_ptr, png_ptr->push_length); + + png_ptr->process_mode = PNG_READ_DONE_MODE; + png_push_have_end(png_ptr, info_ptr); + } + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + else if ((keep = png_chunk_unknown_handling(png_ptr, chunk_name)) != 0) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_unknown(png_ptr, info_ptr, png_ptr->push_length, keep); + + if (chunk_name == png_PLTE) + png_ptr->mode |= PNG_HAVE_PLTE; + } + +#endif + else if (chunk_name == png_PLTE) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_PLTE(png_ptr, info_ptr, png_ptr->push_length); + } + + else if (chunk_name == png_IDAT) + { + png_ptr->idat_size = png_ptr->push_length; + png_ptr->process_mode = PNG_READ_IDAT_MODE; + png_push_have_info(png_ptr, info_ptr); + png_ptr->zstream.avail_out = + (uInt) PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1; + png_ptr->zstream.next_out = png_ptr->row_buf; + return; + } + +#ifdef PNG_READ_gAMA_SUPPORTED + else if (png_ptr->chunk_name == png_gAMA) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_gAMA(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_sBIT_SUPPORTED + else if (png_ptr->chunk_name == png_sBIT) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_sBIT(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_cHRM_SUPPORTED + else if (png_ptr->chunk_name == png_cHRM) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_sRGB_SUPPORTED + else if (chunk_name == png_sRGB) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_sRGB(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_iCCP_SUPPORTED + else if (png_ptr->chunk_name == png_iCCP) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_iCCP(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_sPLT_SUPPORTED + else if (chunk_name == png_sPLT) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_sPLT(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_tRNS_SUPPORTED + else if (chunk_name == png_tRNS) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_bKGD_SUPPORTED + else if (chunk_name == png_bKGD) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_hIST_SUPPORTED + else if (chunk_name == png_hIST) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_hIST(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_pHYs_SUPPORTED + else if (chunk_name == png_pHYs) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_pHYs(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_oFFs_SUPPORTED + else if (chunk_name == png_oFFs) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_oFFs(png_ptr, info_ptr, png_ptr->push_length); + } +#endif + +#ifdef PNG_READ_pCAL_SUPPORTED + else if (chunk_name == png_pCAL) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_pCAL(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_sCAL_SUPPORTED + else if (chunk_name == png_sCAL) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_sCAL(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_tIME_SUPPORTED + else if (chunk_name == png_tIME) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_tIME(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_tEXt_SUPPORTED + else if (chunk_name == png_tEXt) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_zTXt_SUPPORTED + else if (chunk_name == png_zTXt) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif +#ifdef PNG_READ_iTXt_SUPPORTED + else if (chunk_name == png_iTXt) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + + png_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif + else + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_unknown(png_ptr, info_ptr, png_ptr->push_length, + PNG_HANDLE_CHUNK_AS_DEFAULT); + } + + png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; +} + +void /* PRIVATE */ +png_push_crc_skip(png_structrp png_ptr, png_uint_32 skip) +{ + png_ptr->process_mode = PNG_SKIP_MODE; + png_ptr->skip_length = skip; +} + +void /* PRIVATE */ +png_push_crc_finish(png_structrp png_ptr) +{ + if (png_ptr->skip_length && png_ptr->save_buffer_size) + { + png_size_t save_size = png_ptr->save_buffer_size; + png_uint_32 skip_length = png_ptr->skip_length; + + /* We want the smaller of 'skip_length' and 'save_buffer_size', but + * they are of different types and we don't know which variable has the + * fewest bits. Carefully select the smaller and cast it to the type of + * the larger - this cannot overflow. Do not cast in the following test + * - it will break on either 16 or 64 bit platforms. + */ + if (skip_length < save_size) + save_size = (png_size_t)skip_length; + + else + skip_length = (png_uint_32)save_size; + + png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); + + png_ptr->skip_length -= skip_length; + png_ptr->buffer_size -= save_size; + png_ptr->save_buffer_size -= save_size; + png_ptr->save_buffer_ptr += save_size; + } + if (png_ptr->skip_length && png_ptr->current_buffer_size) + { + png_size_t save_size = png_ptr->current_buffer_size; + png_uint_32 skip_length = png_ptr->skip_length; + + /* We want the smaller of 'skip_length' and 'current_buffer_size', here, + * the same problem exists as above and the same solution. + */ + if (skip_length < save_size) + save_size = (png_size_t)skip_length; + + else + skip_length = (png_uint_32)save_size; + + png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); + + png_ptr->skip_length -= skip_length; + png_ptr->buffer_size -= save_size; + png_ptr->current_buffer_size -= save_size; + png_ptr->current_buffer_ptr += save_size; + } + if (!png_ptr->skip_length) + { + if (png_ptr->buffer_size < 4) + { + png_push_save_buffer(png_ptr); + return; + } + + png_crc_finish(png_ptr, 0); + png_ptr->process_mode = PNG_READ_CHUNK_MODE; + } +} + +void PNGCBAPI +png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length) +{ + png_bytep ptr; + + if (png_ptr == NULL) + return; + + ptr = buffer; + if (png_ptr->save_buffer_size) + { + png_size_t save_size; + + if (length < png_ptr->save_buffer_size) + save_size = length; + + else + save_size = png_ptr->save_buffer_size; + + memcpy(ptr, png_ptr->save_buffer_ptr, save_size); + length -= save_size; + ptr += save_size; + png_ptr->buffer_size -= save_size; + png_ptr->save_buffer_size -= save_size; + png_ptr->save_buffer_ptr += save_size; + } + if (length && png_ptr->current_buffer_size) + { + png_size_t save_size; + + if (length < png_ptr->current_buffer_size) + save_size = length; + + else + save_size = png_ptr->current_buffer_size; + + memcpy(ptr, png_ptr->current_buffer_ptr, save_size); + png_ptr->buffer_size -= save_size; + png_ptr->current_buffer_size -= save_size; + png_ptr->current_buffer_ptr += save_size; + } +} + +void /* PRIVATE */ +png_push_save_buffer(png_structrp png_ptr) +{ + if (png_ptr->save_buffer_size) + { + if (png_ptr->save_buffer_ptr != png_ptr->save_buffer) + { + png_size_t i, istop; + png_bytep sp; + png_bytep dp; + + istop = png_ptr->save_buffer_size; + for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer; + i < istop; i++, sp++, dp++) + { + *dp = *sp; + } + } + } + if (png_ptr->save_buffer_size + png_ptr->current_buffer_size > + png_ptr->save_buffer_max) + { + png_size_t new_max; + png_bytep old_buffer; + + if (png_ptr->save_buffer_size > PNG_SIZE_MAX - + (png_ptr->current_buffer_size + 256)) + { + png_error(png_ptr, "Potential overflow of save_buffer"); + } + + new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256; + old_buffer = png_ptr->save_buffer; + png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr, + (png_size_t)new_max); + + if (png_ptr->save_buffer == NULL) + { + png_free(png_ptr, old_buffer); + png_error(png_ptr, "Insufficient memory for save_buffer"); + } + + memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size); + png_free(png_ptr, old_buffer); + png_ptr->save_buffer_max = new_max; + } + if (png_ptr->current_buffer_size) + { + memcpy(png_ptr->save_buffer + png_ptr->save_buffer_size, + png_ptr->current_buffer_ptr, png_ptr->current_buffer_size); + png_ptr->save_buffer_size += png_ptr->current_buffer_size; + png_ptr->current_buffer_size = 0; + } + png_ptr->save_buffer_ptr = png_ptr->save_buffer; + png_ptr->buffer_size = 0; +} + +void /* PRIVATE */ +png_push_restore_buffer(png_structrp png_ptr, png_bytep buffer, + png_size_t buffer_length) +{ + png_ptr->current_buffer = buffer; + png_ptr->current_buffer_size = buffer_length; + png_ptr->buffer_size = buffer_length + png_ptr->save_buffer_size; + png_ptr->current_buffer_ptr = png_ptr->current_buffer; +} + +void /* PRIVATE */ +png_push_read_IDAT(png_structrp png_ptr) +{ + if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER)) + { + png_byte chunk_length[4]; + png_byte chunk_tag[4]; + + /* TODO: this code can be commoned up with the same code in push_read */ + if (png_ptr->buffer_size < 8) + { + png_push_save_buffer(png_ptr); + return; + } + + png_push_fill_buffer(png_ptr, chunk_length, 4); + png_ptr->push_length = png_get_uint_31(png_ptr, chunk_length); + png_reset_crc(png_ptr); + png_crc_read(png_ptr, chunk_tag, 4); + png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(chunk_tag); + png_ptr->mode |= PNG_HAVE_CHUNK_HEADER; + + if (png_ptr->chunk_name != png_IDAT) + { + png_ptr->process_mode = PNG_READ_CHUNK_MODE; + + if (!(png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED)) + png_error(png_ptr, "Not enough compressed data"); + + return; + } + + png_ptr->idat_size = png_ptr->push_length; + } + + if (png_ptr->idat_size && png_ptr->save_buffer_size) + { + png_size_t save_size = png_ptr->save_buffer_size; + png_uint_32 idat_size = png_ptr->idat_size; + + /* We want the smaller of 'idat_size' and 'current_buffer_size', but they + * are of different types and we don't know which variable has the fewest + * bits. Carefully select the smaller and cast it to the type of the + * larger - this cannot overflow. Do not cast in the following test - it + * will break on either 16 or 64 bit platforms. + */ + if (idat_size < save_size) + save_size = (png_size_t)idat_size; + + else + idat_size = (png_uint_32)save_size; + + png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); + + png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size); + + png_ptr->idat_size -= idat_size; + png_ptr->buffer_size -= save_size; + png_ptr->save_buffer_size -= save_size; + png_ptr->save_buffer_ptr += save_size; + } + + if (png_ptr->idat_size && png_ptr->current_buffer_size) + { + png_size_t save_size = png_ptr->current_buffer_size; + png_uint_32 idat_size = png_ptr->idat_size; + + /* We want the smaller of 'idat_size' and 'current_buffer_size', but they + * are of different types and we don't know which variable has the fewest + * bits. Carefully select the smaller and cast it to the type of the + * larger - this cannot overflow. + */ + if (idat_size < save_size) + save_size = (png_size_t)idat_size; + + else + idat_size = (png_uint_32)save_size; + + png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); + + png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size); + + png_ptr->idat_size -= idat_size; + png_ptr->buffer_size -= save_size; + png_ptr->current_buffer_size -= save_size; + png_ptr->current_buffer_ptr += save_size; + } + if (!png_ptr->idat_size) + { + if (png_ptr->buffer_size < 4) + { + png_push_save_buffer(png_ptr); + return; + } + + png_crc_finish(png_ptr, 0); + png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->zowner = 0; + } +} + +void /* PRIVATE */ +png_process_IDAT_data(png_structrp png_ptr, png_bytep buffer, + png_size_t buffer_length) +{ + /* The caller checks for a non-zero buffer length. */ + if (!(buffer_length > 0) || buffer == NULL) + png_error(png_ptr, "No IDAT data (internal error)"); + + /* This routine must process all the data it has been given + * before returning, calling the row callback as required to + * handle the uncompressed results. + */ + png_ptr->zstream.next_in = buffer; + /* TODO: WARNING: TRUNCATION ERROR: DANGER WILL ROBINSON: */ + png_ptr->zstream.avail_in = (uInt)buffer_length; + + /* Keep going until the decompressed data is all processed + * or the stream marked as finished. + */ + while (png_ptr->zstream.avail_in > 0 && + !(png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED)) + { + int ret; + + /* We have data for zlib, but we must check that zlib + * has someplace to put the results. It doesn't matter + * if we don't expect any results -- it may be the input + * data is just the LZ end code. + */ + if (!(png_ptr->zstream.avail_out > 0)) + { + /* TODO: WARNING: TRUNCATION ERROR: DANGER WILL ROBINSON: */ + png_ptr->zstream.avail_out = (uInt)(PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1); + + png_ptr->zstream.next_out = png_ptr->row_buf; + } + + /* Using Z_SYNC_FLUSH here means that an unterminated + * LZ stream (a stream with a missing end code) can still + * be handled, otherwise (Z_NO_FLUSH) a future zlib + * implementation might defer output and therefore + * change the current behavior (see comments in inflate.c + * for why this doesn't happen at present with zlib 1.2.5). + */ + ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH); + + /* Check for any failure before proceeding. */ + if (ret != Z_OK && ret != Z_STREAM_END) + { + /* Terminate the decompression. */ + png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; + png_ptr->zowner = 0; + + /* This may be a truncated stream (missing or + * damaged end code). Treat that as a warning. + */ + if (png_ptr->row_number >= png_ptr->num_rows || + png_ptr->pass > 6) + png_warning(png_ptr, "Truncated compressed data in IDAT"); + + else + png_error(png_ptr, "Decompression error in IDAT"); + + /* Skip the check on unprocessed input */ + return; + } + + /* Did inflate output any data? */ + if (png_ptr->zstream.next_out != png_ptr->row_buf) + { + /* Is this unexpected data after the last row? + * If it is, artificially terminate the LZ output + * here. + */ + if (png_ptr->row_number >= png_ptr->num_rows || + png_ptr->pass > 6) + { + /* Extra data. */ + png_warning(png_ptr, "Extra compressed data in IDAT"); + png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; + png_ptr->zowner = 0; + + /* Do no more processing; skip the unprocessed + * input check below. + */ + return; + } + + /* Do we have a complete row? */ + if (png_ptr->zstream.avail_out == 0) + png_push_process_row(png_ptr); + } + + /* And check for the end of the stream. */ + if (ret == Z_STREAM_END) + png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; + } + + /* All the data should have been processed, if anything + * is left at this point we have bytes of IDAT data + * after the zlib end code. + */ + if (png_ptr->zstream.avail_in > 0) + png_warning(png_ptr, "Extra compression data in IDAT"); +} + +void /* PRIVATE */ +png_push_process_row(png_structrp png_ptr) +{ + /* 1.5.6: row_info moved out of png_struct to a local here. */ + png_row_info row_info; + + row_info.width = png_ptr->iwidth; /* NOTE: width of current interlaced row */ + row_info.color_type = png_ptr->color_type; + row_info.bit_depth = png_ptr->bit_depth; + row_info.channels = png_ptr->channels; + row_info.pixel_depth = png_ptr->pixel_depth; + row_info.rowbytes = PNG_ROWBYTES(row_info.pixel_depth, row_info.width); + + if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE) + { + if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST) + png_read_filter_row(png_ptr, &row_info, png_ptr->row_buf + 1, + png_ptr->prev_row + 1, png_ptr->row_buf[0]); + else + png_error(png_ptr, "bad adaptive filter value"); + } + + /* libpng 1.5.6: the following line was copying png_ptr->rowbytes before + * 1.5.6, while the buffer really is this big in current versions of libpng + * it may not be in the future, so this was changed just to copy the + * interlaced row count: + */ + memcpy(png_ptr->prev_row, png_ptr->row_buf, row_info.rowbytes + 1); + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED + if (png_ptr->transformations) + png_do_read_transformations(png_ptr, &row_info); +#endif + + /* The transformed pixel depth should match the depth now in row_info. */ + if (png_ptr->transformed_pixel_depth == 0) + { + png_ptr->transformed_pixel_depth = row_info.pixel_depth; + if (row_info.pixel_depth > png_ptr->maximum_pixel_depth) + png_error(png_ptr, "progressive row overflow"); + } + + else if (png_ptr->transformed_pixel_depth != row_info.pixel_depth) + png_error(png_ptr, "internal progressive row size calculation error"); + + +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* Blow up interlaced rows to full size */ + if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) + { + if (png_ptr->pass < 6) + png_do_read_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass, + png_ptr->transformations); + + switch (png_ptr->pass) + { + case 0: + { + int i; + for (i = 0; i < 8 && png_ptr->pass == 0; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); /* Updates png_ptr->pass */ + } + + if (png_ptr->pass == 2) /* Pass 1 might be empty */ + { + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + if (png_ptr->pass == 4 && png_ptr->height <= 4) + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + if (png_ptr->pass == 6 && png_ptr->height <= 4) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + break; + } + + case 1: + { + int i; + for (i = 0; i < 8 && png_ptr->pass == 1; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 2) /* Skip top 4 generated rows */ + { + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + break; + } + + case 2: + { + int i; + + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 4) /* Pass 3 might be empty */ + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + break; + } + + case 3: + { + int i; + + for (i = 0; i < 4 && png_ptr->pass == 3; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 4) /* Skip top two generated rows */ + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + break; + } + + case 4: + { + int i; + + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 6) /* Pass 5 might be empty */ + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + break; + } + + case 5: + { + int i; + + for (i = 0; i < 2 && png_ptr->pass == 5; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 6) /* Skip top generated row */ + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + break; + } + + default: + case 6: + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + + if (png_ptr->pass != 6) + break; + + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + } + else +#endif + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } +} + +void /* PRIVATE */ +png_read_push_finish_row(png_structrp png_ptr) +{ +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* Start of interlace block */ + static PNG_CONST png_byte png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; + + /* Offset to next interlace block */ + static PNG_CONST png_byte png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; + + /* Start of interlace block in the y direction */ + static PNG_CONST png_byte png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; + + /* Offset to next interlace block in the y direction */ + static PNG_CONST png_byte png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2}; + + /* Height of interlace block. This is not currently used - if you need + * it, uncomment it here and in png.h + static PNG_CONST png_byte png_pass_height[] = {8, 8, 4, 4, 2, 2, 1}; + */ +#endif + + png_ptr->row_number++; + if (png_ptr->row_number < png_ptr->num_rows) + return; + +#ifdef PNG_READ_INTERLACING_SUPPORTED + if (png_ptr->interlaced) + { + png_ptr->row_number = 0; + memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); + + do + { + png_ptr->pass++; + if ((png_ptr->pass == 1 && png_ptr->width < 5) || + (png_ptr->pass == 3 && png_ptr->width < 3) || + (png_ptr->pass == 5 && png_ptr->width < 2)) + png_ptr->pass++; + + if (png_ptr->pass > 7) + png_ptr->pass--; + + if (png_ptr->pass >= 7) + break; + + png_ptr->iwidth = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + + if (png_ptr->transformations & PNG_INTERLACE) + break; + + png_ptr->num_rows = (png_ptr->height + + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; + + } while (png_ptr->iwidth == 0 || png_ptr->num_rows == 0); + } +#endif /* PNG_READ_INTERLACING_SUPPORTED */ +} + +void /* PRIVATE */ +png_push_have_info(png_structrp png_ptr, png_inforp info_ptr) +{ + if (png_ptr->info_fn != NULL) + (*(png_ptr->info_fn))(png_ptr, info_ptr); +} + +void /* PRIVATE */ +png_push_have_end(png_structrp png_ptr, png_inforp info_ptr) +{ + if (png_ptr->end_fn != NULL) + (*(png_ptr->end_fn))(png_ptr, info_ptr); +} + +void /* PRIVATE */ +png_push_have_row(png_structrp png_ptr, png_bytep row) +{ + if (png_ptr->row_fn != NULL) + (*(png_ptr->row_fn))(png_ptr, row, png_ptr->row_number, + (int)png_ptr->pass); +} + +#ifdef PNG_READ_INTERLACING_SUPPORTED +void PNGAPI +png_progressive_combine_row(png_const_structrp png_ptr, png_bytep old_row, + png_const_bytep new_row) +{ + if (png_ptr == NULL) + return; + + /* new_row is a flag here - if it is NULL then the app callback was called + * from an empty row (see the calls to png_struct::row_fn below), otherwise + * it must be png_ptr->row_buf+1 + */ + if (new_row != NULL) + png_combine_row(png_ptr, old_row, 1/*display*/); +} +#endif /* PNG_READ_INTERLACING_SUPPORTED */ + +void PNGAPI +png_set_progressive_read_fn(png_structrp png_ptr, png_voidp progressive_ptr, + png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, + png_progressive_end_ptr end_fn) +{ + if (png_ptr == NULL) + return; + + png_ptr->info_fn = info_fn; + png_ptr->row_fn = row_fn; + png_ptr->end_fn = end_fn; + + png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer); +} + +png_voidp PNGAPI +png_get_progressive_ptr(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return (NULL); + + return png_ptr->io_ptr; +} +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngprefix.h b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngprefix.h new file mode 100644 index 0000000000..89cbb31eef --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngprefix.h @@ -0,0 +1,188 @@ +#define png_sRGB_table wx_png_sRGB_table +#define png_sRGB_base wx_png_sRGB_base +#define png_sRGB_delta wx_png_sRGB_delta +#define png_zstream_error wx_png_zstream_error +#define png_free_buffer_list wx_png_free_buffer_list +#define png_fixed wx_png_fixed +#define png_user_version_check wx_png_user_version_check +#define png_malloc_base wx_png_malloc_base +#define png_malloc_array wx_png_malloc_array +#define png_realloc_array wx_png_realloc_array +#define png_create_png_struct wx_png_create_png_struct +#define png_destroy_png_struct wx_png_destroy_png_struct +#define png_free_jmpbuf wx_png_free_jmpbuf +#define png_zalloc wx_png_zalloc +#define png_zfree wx_png_zfree +#define png_default_read_data wx_png_default_read_data +#define png_push_fill_buffer wx_png_push_fill_buffer +#define png_default_write_data wx_png_default_write_data +#define png_default_flush wx_png_default_flush +#define png_reset_crc wx_png_reset_crc +#define png_write_data wx_png_write_data +#define png_read_sig wx_png_read_sig +#define png_read_chunk_header wx_png_read_chunk_header +#define png_read_data wx_png_read_data +#define png_crc_read wx_png_crc_read +#define png_crc_finish wx_png_crc_finish +#define png_crc_error wx_png_crc_error +#define png_calculate_crc wx_png_calculate_crc +#define png_flush wx_png_flush +#define png_write_IHDR wx_png_write_IHDR +#define png_write_PLTE wx_png_write_PLTE +#define png_compress_IDAT wx_png_compress_IDAT +#define png_write_IEND wx_png_write_IEND +#define png_write_gAMA_fixed wx_png_write_gAMA_fixed +#define png_write_sBIT wx_png_write_sBIT +#define png_write_cHRM_fixed wx_png_write_cHRM_fixed +#define png_write_sRGB wx_png_write_sRGB +#define png_write_iCCP wx_png_write_iCCP +#define png_write_sPLT wx_png_write_sPLT +#define png_write_tRNS wx_png_write_tRNS +#define png_write_bKGD wx_png_write_bKGD +#define png_write_hIST wx_png_write_hIST +#define png_write_tEXt wx_png_write_tEXt +#define png_write_zTXt wx_png_write_zTXt +#define png_write_iTXt wx_png_write_iTXt +#define png_set_text_2 wx_png_set_text_2 +#define png_write_oFFs wx_png_write_oFFs +#define png_write_pCAL wx_png_write_pCAL +#define png_write_pHYs wx_png_write_pHYs +#define png_write_tIME wx_png_write_tIME +#define png_write_sCAL_s wx_png_write_sCAL_s +#define png_write_finish_row wx_png_write_finish_row +#define png_write_start_row wx_png_write_start_row +#define png_combine_row wx_png_combine_row +#define png_do_read_interlace wx_png_do_read_interlace +#define png_do_write_interlace wx_png_do_write_interlace +#define png_read_filter_row wx_png_read_filter_row +#define png_read_filter_row_up_neon wx_png_read_filter_row_up_neon +#define png_read_filter_row_sub3_neon wx_png_read_filter_row_sub3_neon +#define png_read_filter_row_sub4_neon wx_png_read_filter_row_sub4_neon +#define png_read_filter_row_avg3_neon wx_png_read_filter_row_avg3_neon +#define png_read_filter_row_avg4_neon wx_png_read_filter_row_avg4_neon +#define png_read_filter_row_paeth3_neon wx_png_read_filter_row_paeth3_neon +#define png_read_filter_row_paeth4_neon wx_png_read_filter_row_paeth4_neon +#define png_write_find_filter wx_png_write_find_filter +#define png_read_IDAT_data wx_png_read_IDAT_data +#define png_read_finish_IDAT wx_png_read_finish_IDAT +#define png_read_finish_row wx_png_read_finish_row +#define png_read_start_row wx_png_read_start_row +#define png_read_transform_info wx_png_read_transform_info +#define png_do_read_filler wx_png_do_read_filler +#define png_do_read_swap_alpha wx_png_do_read_swap_alpha +#define png_do_write_swap_alpha wx_png_do_write_swap_alpha +#define png_do_read_invert_alpha wx_png_do_read_invert_alpha +#define png_do_write_invert_alpha wx_png_do_write_invert_alpha +#define png_do_strip_channel wx_png_do_strip_channel +#define png_do_swap wx_png_do_swap +#define png_do_packswap wx_png_do_packswap +#define png_do_rgb_to_gray wx_png_do_rgb_to_gray +#define png_do_gray_to_rgb wx_png_do_gray_to_rgb +#define png_do_unpack wx_png_do_unpack +#define png_do_unshift wx_png_do_unshift +#define png_do_invert wx_png_do_invert +#define png_do_scale_16_to_8 wx_png_do_scale_16_to_8 +#define png_do_chop wx_png_do_chop +#define png_do_quantize wx_png_do_quantize +#define png_do_bgr wx_png_do_bgr +#define png_do_pack wx_png_do_pack +#define png_do_shift wx_png_do_shift +#define png_do_compose wx_png_do_compose +#define png_do_gamma wx_png_do_gamma +#define png_do_encode_alpha wx_png_do_encode_alpha +#define png_do_expand_palette wx_png_do_expand_palette +#define png_do_expand wx_png_do_expand +#define png_do_expand_16 wx_png_do_expand_16 +#define png_handle_IHDR wx_png_handle_IHDR +#define png_handle_PLTE wx_png_handle_PLTE +#define png_handle_IEND wx_png_handle_IEND +#define png_handle_bKGD wx_png_handle_bKGD +#define png_handle_cHRM wx_png_handle_cHRM +#define png_handle_gAMA wx_png_handle_gAMA +#define png_handle_hIST wx_png_handle_hIST +#define png_handle_iCCP wx_png_handle_iCCP +#define png_handle_iTXt wx_png_handle_iTXt +#define png_handle_oFFs wx_png_handle_oFFs +#define png_handle_pCAL wx_png_handle_pCAL +#define png_handle_pHYs wx_png_handle_pHYs +#define png_handle_sBIT wx_png_handle_sBIT +#define png_handle_sCAL wx_png_handle_sCAL +#define png_handle_sPLT wx_png_handle_sPLT +#define png_handle_sRGB wx_png_handle_sRGB +#define png_handle_tEXt wx_png_handle_tEXt +#define png_handle_tIME wx_png_handle_tIME +#define png_handle_tRNS wx_png_handle_tRNS +#define png_handle_zTXt wx_png_handle_zTXt +#define png_check_chunk_name wx_png_check_chunk_name +#define png_handle_unknown wx_png_handle_unknown +#define png_chunk_unknown_handling wx_png_chunk_unknown_handling +#define png_do_read_transformations wx_png_do_read_transformations +#define png_do_write_transformations wx_png_do_write_transformations +#define png_init_read_transformations wx_png_init_read_transformations +#define png_push_read_chunk wx_png_push_read_chunk +#define png_push_read_sig wx_png_push_read_sig +#define png_push_check_crc wx_png_push_check_crc +#define png_push_crc_skip wx_png_push_crc_skip +#define png_push_crc_finish wx_png_push_crc_finish +#define png_push_save_buffer wx_png_push_save_buffer +#define png_push_restore_buffer wx_png_push_restore_buffer +#define png_push_read_IDAT wx_png_push_read_IDAT +#define png_process_IDAT_data wx_png_process_IDAT_data +#define png_push_process_row wx_png_push_process_row +#define png_push_handle_unknown wx_png_push_handle_unknown +#define png_push_have_info wx_png_push_have_info +#define png_push_have_end wx_png_push_have_end +#define png_push_have_row wx_png_push_have_row +#define png_push_read_end wx_png_push_read_end +#define png_process_some_data wx_png_process_some_data +#define png_read_push_finish_row wx_png_read_push_finish_row +#define png_push_handle_tEXt wx_png_push_handle_tEXt +#define png_push_read_tEXt wx_png_push_read_tEXt +#define png_push_handle_zTXt wx_png_push_handle_zTXt +#define png_push_read_zTXt wx_png_push_read_zTXt +#define png_push_handle_iTXt wx_png_push_handle_iTXt +#define png_push_read_iTXt wx_png_push_read_iTXt +#define png_do_read_intrapixel wx_png_do_read_intrapixel +#define png_do_write_intrapixel wx_png_do_write_intrapixel +#define png_colorspace_set_gamma wx_png_colorspace_set_gamma +#define png_colorspace_sync_info wx_png_colorspace_sync_info +#define png_colorspace_sync wx_png_colorspace_sync +#define png_colorspace_set_chromaticities wx_png_colorspace_set_chromaticities +#define png_colorspace_set_endpoints wx_png_colorspace_set_endpoints +#define png_colorspace_set_sRGB wx_png_colorspace_set_sRGB +#define png_colorspace_set_ICC wx_png_colorspace_set_ICC +#define png_icc_check_length wx_png_icc_check_length +#define png_icc_check_header wx_png_icc_check_header +#define png_icc_check_tag_table wx_png_icc_check_tag_table +#define png_icc_set_sRGB wx_png_icc_set_sRGB +#define png_colorspace_set_rgb_coefficients wx_png_colorspace_set_rgb_coefficients +#define png_check_IHDR wx_png_check_IHDR +#define png_do_check_palette_indexes wx_png_do_check_palette_indexes +#define png_fixed_error wx_png_fixed_error +#define png_safecat wx_png_safecat +#define png_format_number wx_png_format_number +#define png_warning_parameter wx_png_warning_parameter +#define png_warning_parameter_unsigned wx_png_warning_parameter_unsigned +#define png_warning_parameter_signed wx_png_warning_parameter_signed +#define png_formatted_warning wx_png_formatted_warning +#define png_app_warning wx_png_app_warning +#define png_app_error wx_png_app_error +#define png_chunk_report wx_png_chunk_report +#define png_ascii_from_fp wx_png_ascii_from_fp +#define png_ascii_from_fixed wx_png_ascii_from_fixed +#define png_check_fp_number wx_png_check_fp_number +#define png_check_fp_string wx_png_check_fp_string +#define png_muldiv wx_png_muldiv +#define png_muldiv_warn wx_png_muldiv_warn +#define png_reciprocal wx_png_reciprocal +#define png_reciprocal2 wx_png_reciprocal2 +#define png_gamma_significant wx_png_gamma_significant +#define png_gamma_correct wx_png_gamma_correct +#define png_gamma_16bit_correct wx_png_gamma_16bit_correct +#define png_gamma_8bit_correct wx_png_gamma_8bit_correct +#define png_destroy_gamma_table wx_png_destroy_gamma_table +#define png_build_gamma_table wx_png_build_gamma_table +#define png_safe_error wx_png_safe_error +#define png_safe_warning wx_png_safe_warning +#define png_safe_execute wx_png_safe_execute +#define png_image_error wx_png_image_error diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngpriv.h b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngpriv.h new file mode 100644 index 0000000000..1813e5a152 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngpriv.h @@ -0,0 +1,1912 @@ +/* pngpriv.h - private declarations for use inside libpng + * + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.6.2 [April 25, 2013] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* The symbols declared in this file (including the functions declared + * as extern) are PRIVATE. They are not part of the libpng public + * interface, and are not recommended for use by regular applications. + * Some of them may become public in the future; others may stay private, + * change in an incompatible way, or even disappear. + * Although the libpng users are not forbidden to include this header, + * they should be well aware of the issues that may arise from doing so. + */ + +#ifndef PNGPRIV_H +#define PNGPRIV_H + +/* Feature Test Macros. The following are defined here to ensure that correctly + * implemented libraries reveal the APIs libpng needs to build and hide those + * that are not needed and potentially damaging to the compilation. + * + * Feature Test Macros must be defined before any system header is included (see + * POSIX 1003.1 2.8.2 "POSIX Symbols." + * + * These macros only have an effect if the operating system supports either + * POSIX 1003.1 or C99, or both. On other operating systems (particularly + * Windows/Visual Studio) there is no effect; the OS specific tests below are + * still required (as of 2011-05-02.) + */ +#define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */ + +#ifndef PNG_VERSION_INFO_ONLY +/* Standard library headers not required by png.h: */ +# include +# include +#endif + +#define PNGLIB_BUILD /*libpng is being built, not used*/ + +/* If HAVE_CONFIG_H is defined during the build then the build system must + * provide an appropriate "config.h" file on the include path. The header file + * must provide definitions as required below (search for "HAVE_CONFIG_H"); + * see configure.ac for more details of the requirements. The macro + * "PNG_NO_CONFIG_H" is provided for maintainers to test for dependencies on + * 'configure'; define this macro to prevent the configure build including the + * configure generated config.h. Libpng is expected to compile without *any* + * special build system support on a reasonably ANSI-C compliant system. + */ +#if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H) +# include + + /* Pick up the definition of 'restrict' from config.h if it was read: */ +# define PNG_RESTRICT restrict +#endif + +/* To support symbol prefixing it is necessary to know *before* including png.h + * whether the fixed point (and maybe other) APIs are exported, because if they + * are not internal definitions may be required. This is handled below just + * before png.h is included, but load the configuration now if it is available. + */ +#ifndef PNGLCONF_H +# include "pnglibconf.h" +#endif + +/* Local renames may change non-exported API functions from png.h */ +#if defined(PNG_PREFIX) && !defined(PNGPREFIX_H) +# include "pngprefix.h" +#endif + +#ifdef PNG_USER_CONFIG +# include "pngusr.h" + /* These should have been defined in pngusr.h */ +# ifndef PNG_USER_PRIVATEBUILD +# define PNG_USER_PRIVATEBUILD "Custom libpng build" +# endif +# ifndef PNG_USER_DLLFNAME_POSTFIX +# define PNG_USER_DLLFNAME_POSTFIX "Cb" +# endif +#endif + +/* Is this a build of a DLL where compilation of the object modules requires + * different preprocessor settings to those required for a simple library? If + * so PNG_BUILD_DLL must be set. + * + * If libpng is used inside a DLL but that DLL does not export the libpng APIs + * PNG_BUILD_DLL must not be set. To avoid the code below kicking in build a + * static library of libpng then link the DLL against that. + */ +#ifndef PNG_BUILD_DLL +# ifdef DLL_EXPORT + /* This is set by libtool when files are compiled for a DLL; libtool + * always compiles twice, even on systems where it isn't necessary. Set + * PNG_BUILD_DLL in case it is necessary: + */ +# define PNG_BUILD_DLL +# else +# ifdef _WINDLL + /* This is set by the Microsoft Visual Studio IDE in projects that + * build a DLL. It can't easily be removed from those projects (it + * isn't visible in the Visual Studio UI) so it is a fairly reliable + * indication that PNG_IMPEXP needs to be set to the DLL export + * attributes. + */ +# define PNG_BUILD_DLL +# else +# ifdef __DLL__ + /* This is set by the Borland C system when compiling for a DLL + * (as above.) + */ +# define PNG_BUILD_DLL +# else + /* Add additional compiler cases here. */ +# endif +# endif +# endif +#endif /* Setting PNG_BUILD_DLL if required */ + +/* See pngconf.h for more details: the builder of the library may set this on + * the command line to the right thing for the specific compilation system or it + * may be automagically set above (at present we know of no system where it does + * need to be set on the command line.) + * + * PNG_IMPEXP must be set here when building the library to prevent pngconf.h + * setting it to the "import" setting for a DLL build. + */ +#ifndef PNG_IMPEXP +# ifdef PNG_BUILD_DLL +# define PNG_IMPEXP PNG_DLL_EXPORT +# else + /* Not building a DLL, or the DLL doesn't require specific export + * definitions. + */ +# define PNG_IMPEXP +# endif +#endif + +/* No warnings for private or deprecated functions in the build: */ +#ifndef PNG_DEPRECATED +# define PNG_DEPRECATED +#endif +#ifndef PNG_PRIVATE +# define PNG_PRIVATE +#endif + +/* Symbol preprocessing support. + * + * To enable listing global, but internal, symbols the following macros should + * always be used to declare an extern data or function object in this file. + */ +#ifndef PNG_INTERNAL_DATA +# define PNG_INTERNAL_DATA(type, name, array) extern type name array +#endif + +#ifndef PNG_INTERNAL_FUNCTION +# define PNG_INTERNAL_FUNCTION(type, name, args, attributes)\ + extern PNG_FUNCTION(type, name, args, PNG_EMPTY attributes) +#endif + +/* If floating or fixed point APIs are disabled they may still be compiled + * internally. To handle this make sure they are declared as the appropriate + * internal extern function (otherwise the symbol prefixing stuff won't work and + * the functions will be used without definitions.) + * + * NOTE: although all the API functions are declared here they are not all + * actually built! Because the declarations are still made it is necessary to + * fake out types that they depend on. + */ +#ifndef PNG_FP_EXPORT +# ifndef PNG_FLOATING_POINT_SUPPORTED +# define PNG_FP_EXPORT(ordinal, type, name, args)\ + PNG_INTERNAL_FUNCTION(type, name, args, PNG_EMPTY); +# ifndef PNG_VERSION_INFO_ONLY + typedef struct png_incomplete png_double; + typedef png_double* png_doublep; + typedef const png_double* png_const_doublep; + typedef png_double** png_doublepp; +# endif +# endif +#endif +#ifndef PNG_FIXED_EXPORT +# ifndef PNG_FIXED_POINT_SUPPORTED +# define PNG_FIXED_EXPORT(ordinal, type, name, args)\ + PNG_INTERNAL_FUNCTION(type, name, args, PNG_EMPTY); +# endif +#endif + +#include "png.h" + +/* pngconf.h does not set PNG_DLL_EXPORT unless it is required, so: */ +#ifndef PNG_DLL_EXPORT +# define PNG_DLL_EXPORT +#endif + +/* SECURITY and SAFETY: + * + * By default libpng is built without any internal limits on image size, + * individual heap (png_malloc) allocations or the total amount of memory used. + * If PNG_SAFE_LIMITS_SUPPORTED is defined, however, the limits below are used + * (unless individually overridden). These limits are believed to be fairly + * safe, but builders of secure systems should verify the values against the + * real system capabilities. + */ +#ifdef PNG_SAFE_LIMITS_SUPPORTED + /* 'safe' limits */ +# ifndef PNG_USER_WIDTH_MAX +# define PNG_USER_WIDTH_MAX 1000000 +# endif +# ifndef PNG_USER_HEIGHT_MAX +# define PNG_USER_HEIGHT_MAX 1000000 +# endif +# ifndef PNG_USER_CHUNK_CACHE_MAX +# define PNG_USER_CHUNK_CACHE_MAX 128 +# endif +# ifndef PNG_USER_CHUNK_MALLOC_MAX +# define PNG_USER_CHUNK_MALLOC_MAX 8000000 +# endif +#else + /* values for no limits */ +# ifndef PNG_USER_WIDTH_MAX +# define PNG_USER_WIDTH_MAX 0x7fffffff +# endif +# ifndef PNG_USER_HEIGHT_MAX +# define PNG_USER_HEIGHT_MAX 0x7fffffff +# endif +# ifndef PNG_USER_CHUNK_CACHE_MAX +# define PNG_USER_CHUNK_CACHE_MAX 0 +# endif +# ifndef PNG_USER_CHUNK_MALLOC_MAX +# define PNG_USER_CHUNK_MALLOC_MAX 0 +# endif +#endif + +/* Moved to pngpriv.h at libpng-1.5.0 */ +/* NOTE: some of these may have been used in external applications as + * these definitions were exposed in pngconf.h prior to 1.5. + */ + +/* If you are running on a machine where you cannot allocate more + * than 64K of memory at once, uncomment this. While libpng will not + * normally need that much memory in a chunk (unless you load up a very + * large file), zlib needs to know how big of a chunk it can use, and + * libpng thus makes sure to check any memory allocation to verify it + * will fit into memory. + * + * zlib provides 'MAXSEG_64K' which, if defined, indicates the + * same limit and pngconf.h (already included) sets the limit + * if certain operating systems are detected. + */ +#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) +# define PNG_MAX_MALLOC_64K +#endif + +#ifndef PNG_UNUSED +/* Unused formal parameter warnings are silenced using the following macro + * which is expected to have no bad effects on performance (optimizing + * compilers will probably remove it entirely). Note that if you replace + * it with something other than whitespace, you must include the terminating + * semicolon. + */ +# define PNG_UNUSED(param) (void)param; +#endif + +/* Just a little check that someone hasn't tried to define something + * contradictory. + */ +#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K) +# undef PNG_ZBUF_SIZE +# define PNG_ZBUF_SIZE 65536L +#endif + +/* If warnings or errors are turned off the code is disabled or redirected here. + * From 1.5.4 functions have been added to allow very limited formatting of + * error and warning messages - this code will also be disabled here. + */ +#ifdef PNG_WARNINGS_SUPPORTED +# define PNG_WARNING_PARAMETERS(p) png_warning_parameters p; +#else +# define png_warning(s1,s2) ((void)(s1)) +# define png_chunk_warning(s1,s2) ((void)(s1)) +# define png_warning_parameter(p,number,string) ((void)0) +# define png_warning_parameter_unsigned(p,number,format,value) ((void)0) +# define png_warning_parameter_signed(p,number,format,value) ((void)0) +# define png_formatted_warning(pp,p,message) ((void)(pp)) +# define PNG_WARNING_PARAMETERS(p) +#endif +#ifndef PNG_ERROR_TEXT_SUPPORTED +# define png_error(s1,s2) png_err(s1) +# define png_chunk_error(s1,s2) png_err(s1) +# define png_fixed_error(s1,s2) png_err(s1) +#endif + +/* C allows up-casts from (void*) to any pointer and (const void*) to any + * pointer to a const object. C++ regards this as a type error and requires an + * explicit, static, cast and provides the static_cast<> rune to ensure that + * const is not cast away. + */ +#ifdef __cplusplus +# define png_voidcast(type, value) static_cast(value) +# define png_constcast(type, value) const_cast(value) +# define png_aligncast(type, value) \ + static_cast(static_cast(value)) +# define png_aligncastconst(type, value) \ + static_cast(static_cast(value)) +#else +# define png_voidcast(type, value) (value) +# define png_constcast(type, value) ((type)(value)) +# define png_aligncast(type, value) ((void*)(value)) +# define png_aligncastconst(type, value) ((const void*)(value)) +#endif /* __cplusplus */ + +/* Some fixed point APIs are still required even if not exported because + * they get used by the corresponding floating point APIs. This magic + * deals with this: + */ +#ifdef PNG_FIXED_POINT_SUPPORTED +# define PNGFAPI PNGAPI +#else +# define PNGFAPI /* PRIVATE */ +#endif + +#ifndef PNG_VERSION_INFO_ONLY +/* Other defines specific to compilers can go here. Try to keep + * them inside an appropriate ifdef/endif pair for portability. + */ +#if defined(PNG_FLOATING_POINT_SUPPORTED) ||\ + defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) + /* png.c requires the following ANSI-C constants if the conversion of + * floating point to ASCII is implemented therein: + * + * DBL_DIG Maximum number of decimal digits (can be set to any constant) + * DBL_MIN Smallest normalized fp number (can be set to an arbitrary value) + * DBL_MAX Maximum floating point number (can be set to an arbitrary value) + */ +# include + +# if ( ( (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ + defined(THINK_C) || defined(TARGET_OS_MAC) ) && !wxOSX_USE_IPHONE ) || defined(__SC__) + /* We need to check that hasn't already been included earlier + * as it seems it doesn't agree with , yet we should really use + * if possible. + */ +# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) +# include +# endif +# else +# include +# endif +# if defined(_AMIGA) && defined(__SASC) && defined(_M68881) + /* Amiga SAS/C: We must include builtin FPU functions when compiling using + * MATH=68881 + */ +# include +# endif +#endif + +/* This provides the non-ANSI (far) memory allocation routines. */ +#if defined(__TURBOC__) && defined(__MSDOS__) +# include +# include +#endif + +#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \ + defined(_WIN32) || defined(__WIN32__) +# include /* defines _WINDOWS_ macro */ +#endif +#endif /* PNG_VERSION_INFO_ONLY */ + +/* Moved here around 1.5.0beta36 from pngconf.h */ +/* Users may want to use these so they are not private. Any library + * functions that are passed far data must be model-independent. + */ + +/* Memory model/platform independent fns */ +#ifndef PNG_ABORT +# ifdef _WINDOWS_ +# define PNG_ABORT() ExitProcess(0) +# else +# define PNG_ABORT() abort() +# endif +#endif + +/* These macros may need to be architecture dependent. */ +#define PNG_ALIGN_NONE 0 /* do not use data alignment */ +#define PNG_ALIGN_ALWAYS 1 /* assume unaligned accesses are OK */ +#ifdef offsetof +# define PNG_ALIGN_OFFSET 2 /* use offsetof to determine alignment */ +#else +# define PNG_ALIGN_OFFSET -1 /* prevent the use of this */ +#endif +#define PNG_ALIGN_SIZE 3 /* use sizeof to determine alignment */ + +#ifndef PNG_ALIGN_TYPE + /* Default to using aligned access optimizations and requiring alignment to a + * multiple of the data type size. Override in a compiler specific fashion + * if necessary by inserting tests here: + */ +# define PNG_ALIGN_TYPE PNG_ALIGN_SIZE +#endif + +#if PNG_ALIGN_TYPE == PNG_ALIGN_SIZE + /* This is used because in some compiler implementations non-aligned + * structure members are supported, so the offsetof approach below fails. + * Set PNG_ALIGN_SIZE=0 for compiler combinations where unaligned access + * is good for performance. Do not do this unless you have tested the result + * and understand it. + */ +# define png_alignof(type) (sizeof (type)) +#else +# if PNG_ALIGN_TYPE == PNG_ALIGN_OFFSET +# define png_alignof(type) offsetof(struct{char c; type t;}, t) +# else +# if PNG_ALIGN_TYPE == PNG_ALIGN_ALWAYS +# define png_alignof(type) (1) +# endif + /* Else leave png_alignof undefined to prevent use thereof */ +# endif +#endif + +/* This implicitly assumes alignment is always to a power of 2. */ +#ifdef png_alignof +# define png_isaligned(ptr, type)\ + ((((const char*)ptr-(const char*)0) & (png_alignof(type)-1)) == 0) +#else +# define png_isaligned(ptr, type) 0 +#endif + +/* End of memory model/platform independent support */ +/* End of 1.5.0beta36 move from pngconf.h */ + +/* CONSTANTS and UTILITY MACROS + * These are used internally by libpng and not exposed in the API + */ + +/* Various modes of operation. Note that after an init, mode is set to + * zero automatically when the structure is created. Three of these + * are defined in png.h because they need to be visible to applications + * that call png_set_unknown_chunk(). + */ +/* #define PNG_HAVE_IHDR 0x01 (defined in png.h) */ +/* #define PNG_HAVE_PLTE 0x02 (defined in png.h) */ +#define PNG_HAVE_IDAT 0x04 +/* #define PNG_AFTER_IDAT 0x08 (defined in png.h) */ +#define PNG_HAVE_IEND 0x10 + /* 0x20 (unused) */ + /* 0x40 (unused) */ + /* 0x80 (unused) */ +#define PNG_HAVE_CHUNK_HEADER 0x100 +#define PNG_WROTE_tIME 0x200 +#define PNG_WROTE_INFO_BEFORE_PLTE 0x400 +#define PNG_BACKGROUND_IS_GRAY 0x800 +#define PNG_HAVE_PNG_SIGNATURE 0x1000 +#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */ + /* 0x4000 (unused) */ +#define PNG_IS_READ_STRUCT 0x8000 /* Else is a write struct */ + +/* Flags for the transformations the PNG library does on the image data */ +#define PNG_BGR 0x0001 +#define PNG_INTERLACE 0x0002 +#define PNG_PACK 0x0004 +#define PNG_SHIFT 0x0008 +#define PNG_SWAP_BYTES 0x0010 +#define PNG_INVERT_MONO 0x0020 +#define PNG_QUANTIZE 0x0040 +#define PNG_COMPOSE 0x0080 /* Was PNG_BACKGROUND */ +#define PNG_BACKGROUND_EXPAND 0x0100 +#define PNG_EXPAND_16 0x0200 /* Added to libpng 1.5.2 */ +#define PNG_16_TO_8 0x0400 /* Becomes 'chop' in 1.5.4 */ +#define PNG_RGBA 0x0800 +#define PNG_EXPAND 0x1000 +#define PNG_GAMMA 0x2000 +#define PNG_GRAY_TO_RGB 0x4000 +#define PNG_FILLER 0x8000 +#define PNG_PACKSWAP 0x10000 +#define PNG_SWAP_ALPHA 0x20000 +#define PNG_STRIP_ALPHA 0x40000 +#define PNG_INVERT_ALPHA 0x80000 +#define PNG_USER_TRANSFORM 0x100000 +#define PNG_RGB_TO_GRAY_ERR 0x200000 +#define PNG_RGB_TO_GRAY_WARN 0x400000 +#define PNG_RGB_TO_GRAY 0x600000 /* two bits, RGB_TO_GRAY_ERR|WARN */ +#define PNG_ENCODE_ALPHA 0x800000 /* Added to libpng-1.5.4 */ +#define PNG_ADD_ALPHA 0x1000000 /* Added to libpng-1.2.7 */ +#define PNG_EXPAND_tRNS 0x2000000 /* Added to libpng-1.2.9 */ +#define PNG_SCALE_16_TO_8 0x4000000 /* Added to libpng-1.5.4 */ + /* 0x8000000 unused */ + /* 0x10000000 unused */ + /* 0x20000000 unused */ + /* 0x40000000 unused */ +/* Flags for png_create_struct */ +#define PNG_STRUCT_PNG 0x0001 +#define PNG_STRUCT_INFO 0x0002 + +/* Scaling factor for filter heuristic weighting calculations */ +#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) +#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) + +/* Flags for the png_ptr->flags rather than declaring a byte for each one */ +#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001 +#define PNG_FLAG_ZSTREAM_INITIALIZED 0x0002 /* Added to libpng-1.6.0 */ + /* 0x0004 unused */ +#define PNG_FLAG_ZSTREAM_ENDED 0x0008 /* Added to libpng-1.6.0 */ + /* 0x0010 unused */ + /* 0x0020 unused */ +#define PNG_FLAG_ROW_INIT 0x0040 +#define PNG_FLAG_FILLER_AFTER 0x0080 +#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100 +#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200 +#define PNG_FLAG_CRC_CRITICAL_USE 0x0400 +#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800 +#define PNG_FLAG_ASSUME_sRGB 0x1000 /* Added to libpng-1.5.4 */ +#define PNG_FLAG_OPTIMIZE_ALPHA 0x2000 /* Added to libpng-1.5.4 */ +#define PNG_FLAG_DETECT_UNINITIALIZED 0x4000 /* Added to libpng-1.5.4 */ +/* #define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000 */ +/* #define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000 */ +#define PNG_FLAG_LIBRARY_MISMATCH 0x20000 +#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000 +#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000 +#define PNG_FLAG_BENIGN_ERRORS_WARN 0x100000 /* Added to libpng-1.4.0 */ +#define PNG_FLAG_APP_WARNINGS_WARN 0x200000 /* Added to libpng-1.6.0 */ +#define PNG_FLAG_APP_ERRORS_WARN 0x400000 /* Added to libpng-1.6.0 */ + /* 0x800000 unused */ + /* 0x1000000 unused */ + /* 0x2000000 unused */ + /* 0x4000000 unused */ + /* 0x8000000 unused */ + /* 0x10000000 unused */ + /* 0x20000000 unused */ + /* 0x40000000 unused */ + +#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ + PNG_FLAG_CRC_ANCILLARY_NOWARN) + +#define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \ + PNG_FLAG_CRC_CRITICAL_IGNORE) + +#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ + PNG_FLAG_CRC_CRITICAL_MASK) + +/* Save typing and make code easier to understand */ + +#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ + abs((int)((c1).green) - (int)((c2).green)) + \ + abs((int)((c1).blue) - (int)((c2).blue))) + +/* Added to libpng-1.6.0: scale a 16-bit value in the range 0..65535 to 0..255 + * by dividing by 257 *with rounding*. This macro is exact for the given range. + * See the discourse in pngrtran.c png_do_scale_16_to_8. The values in the + * macro were established by experiment (modifying the added value). The macro + * has a second variant that takes a value already scaled by 255 and divides by + * 65535 - this has a maximum error of .502. Over the range 0..65535*65535 it + * only gives off-by-one errors and only for 0.5% (1 in 200) of the values. + */ +#define PNG_DIV65535(v24) (((v24) + 32895) >> 16) +#define PNG_DIV257(v16) PNG_DIV65535((png_uint_32)(v16) * 255) + +/* Added to libpng-1.2.6 JB */ +#define PNG_ROWBYTES(pixel_bits, width) \ + ((pixel_bits) >= 8 ? \ + ((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \ + (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) ) + +/* PNG_OUT_OF_RANGE returns true if value is outside the range + * ideal-delta..ideal+delta. Each argument is evaluated twice. + * "ideal" and "delta" should be constants, normally simple + * integers, "value" a variable. Added to libpng-1.2.6 JB + */ +#define PNG_OUT_OF_RANGE(value, ideal, delta) \ + ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) ) + +/* Conversions between fixed and floating point, only defined if + * required (to make sure the code doesn't accidentally use float + * when it is supposedly disabled.) + */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +/* The floating point conversion can't overflow, though it can and + * does lose accuracy relative to the original fixed point value. + * In practice this doesn't matter because png_fixed_point only + * stores numbers with very low precision. The png_ptr and s + * arguments are unused by default but are there in case error + * checking becomes a requirement. + */ +#define png_float(png_ptr, fixed, s) (.00001 * (fixed)) + +/* The fixed point conversion performs range checking and evaluates + * its argument multiple times, so must be used with care. The + * range checking uses the PNG specification values for a signed + * 32 bit fixed point value except that the values are deliberately + * rounded-to-zero to an integral value - 21474 (21474.83 is roughly + * (2^31-1) * 100000). 's' is a string that describes the value being + * converted. + * + * NOTE: this macro will raise a png_error if the range check fails, + * therefore it is normally only appropriate to use this on values + * that come from API calls or other sources where an out of range + * error indicates a programming error, not a data error! + * + * NOTE: by default this is off - the macro is not used - because the + * function call saves a lot of code. + */ +#ifdef PNG_FIXED_POINT_MACRO_SUPPORTED +#define png_fixed(png_ptr, fp, s) ((fp) <= 21474 && (fp) >= -21474 ?\ + ((png_fixed_point)(100000 * (fp))) : (png_fixed_error(png_ptr, s),0)) +#endif +/* else the corresponding function is defined below, inside the scope of the + * cplusplus test. + */ +#endif + +/* Constants for known chunk types. If you need to add a chunk, define the name + * here. For historical reasons these constants have the form png_; i.e. + * the prefix is lower case. Please use decimal values as the parameters to + * match the ISO PNG specification and to avoid relying on the C locale + * interpretation of character values. + * + * Prior to 1.5.6 these constants were strings, as of 1.5.6 png_uint_32 values + * are computed and a new macro (PNG_STRING_FROM_CHUNK) added to allow a string + * to be generated if required. + * + * PNG_32b correctly produces a value shifted by up to 24 bits, even on + * architectures where (int) is only 16 bits. + */ +#define PNG_32b(b,s) ((png_uint_32)(b) << (s)) +#define PNG_CHUNK(b1,b2,b3,b4) \ + (PNG_32b(b1,24) | PNG_32b(b2,16) | PNG_32b(b3,8) | PNG_32b(b4,0)) + +#define png_IHDR PNG_CHUNK( 73, 72, 68, 82) +#define png_IDAT PNG_CHUNK( 73, 68, 65, 84) +#define png_IEND PNG_CHUNK( 73, 69, 78, 68) +#define png_PLTE PNG_CHUNK( 80, 76, 84, 69) +#define png_bKGD PNG_CHUNK( 98, 75, 71, 68) +#define png_cHRM PNG_CHUNK( 99, 72, 82, 77) +#define png_gAMA PNG_CHUNK(103, 65, 77, 65) +#define png_hIST PNG_CHUNK(104, 73, 83, 84) +#define png_iCCP PNG_CHUNK(105, 67, 67, 80) +#define png_iTXt PNG_CHUNK(105, 84, 88, 116) +#define png_oFFs PNG_CHUNK(111, 70, 70, 115) +#define png_pCAL PNG_CHUNK(112, 67, 65, 76) +#define png_sCAL PNG_CHUNK(115, 67, 65, 76) +#define png_pHYs PNG_CHUNK(112, 72, 89, 115) +#define png_sBIT PNG_CHUNK(115, 66, 73, 84) +#define png_sPLT PNG_CHUNK(115, 80, 76, 84) +#define png_sRGB PNG_CHUNK(115, 82, 71, 66) +#define png_sTER PNG_CHUNK(115, 84, 69, 82) +#define png_tEXt PNG_CHUNK(116, 69, 88, 116) +#define png_tIME PNG_CHUNK(116, 73, 77, 69) +#define png_tRNS PNG_CHUNK(116, 82, 78, 83) +#define png_zTXt PNG_CHUNK(122, 84, 88, 116) + +/* The following will work on (signed char*) strings, whereas the get_uint_32 + * macro will fail on top-bit-set values because of the sign extension. + */ +#define PNG_CHUNK_FROM_STRING(s)\ + PNG_CHUNK(0xff&(s)[0], 0xff&(s)[1], 0xff&(s)[2], 0xff&(s)[3]) + +/* This uses (char), not (png_byte) to avoid warnings on systems where (char) is + * signed and the argument is a (char[]) This macro will fail miserably on + * systems where (char) is more than 8 bits. + */ +#define PNG_STRING_FROM_CHUNK(s,c)\ + (void)(((char*)(s))[0]=(char)((c)>>24), ((char*)(s))[1]=(char)((c)>>16),\ + ((char*)(s))[2]=(char)((c)>>8), ((char*)(s))[3]=(char)((c))) + +/* Do the same but terminate with a null character. */ +#define PNG_CSTRING_FROM_CHUNK(s,c)\ + (void)(PNG_STRING_FROM_CHUNK(s,c), ((char*)(s))[4] = 0) + +/* Test on flag values as defined in the spec (section 5.4): */ +#define PNG_CHUNK_ANCILLARY(c) (1 & ((c) >> 29)) +#define PNG_CHUNK_CRITICAL(c) (!PNG_CHUNK_ANCILLARY(c)) +#define PNG_CHUNK_PRIVATE(c) (1 & ((c) >> 21)) +#define PNG_CHUNK_RESERVED(c) (1 & ((c) >> 13)) +#define PNG_CHUNK_SAFE_TO_COPY(c) (1 & ((c) >> 5)) + +/* Gamma values (new at libpng-1.5.4): */ +#define PNG_GAMMA_MAC_OLD 151724 /* Assume '1.8' is really 2.2/1.45! */ +#define PNG_GAMMA_MAC_INVERSE 65909 +#define PNG_GAMMA_sRGB_INVERSE 45455 + +/* Almost everything below is C specific; the #defines above can be used in + * non-C code (so long as it is C-preprocessed) the rest of this stuff cannot. + */ +#ifndef PNG_VERSION_INFO_ONLY + +#include "pngstruct.h" +#include "pnginfo.h" + +/* This is used for 16 bit gamma tables -- only the top level pointers are + * const; this could be changed: + */ +typedef const png_uint_16p * png_const_uint_16pp; + +/* Added to libpng-1.5.7: sRGB conversion tables */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +PNG_INTERNAL_DATA(const png_uint_16, png_sRGB_table, [256]); + /* Convert from an sRGB encoded value 0..255 to a 16-bit linear value, + * 0..65535. This table gives the closest 16-bit answers (no errors). + */ +#endif + +PNG_INTERNAL_DATA(const png_uint_16, png_sRGB_base, [512]); +PNG_INTERNAL_DATA(const png_byte, png_sRGB_delta, [512]); + +#define PNG_sRGB_FROM_LINEAR(linear) ((png_byte)((png_sRGB_base[(linear)>>15] +\ + ((((linear)&0x7fff)*png_sRGB_delta[(linear)>>15])>>12)) >> 8)) + /* Given a value 'linear' in the range 0..255*65535 calculate the 8-bit sRGB + * encoded value with maximum error 0.646365. Note that the input is not a + * 16-bit value; it has been multiplied by 255! */ +#endif /* PNG_SIMPLIFIED_READ/WRITE */ + + +/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Internal functions; these are not exported from a DLL however because they + * are used within several of the C source files they have to be C extern. + * + * All of these functions must be declared with PNG_INTERNAL_FUNCTION. + */ + +/* Zlib support */ +#define PNG_UNEXPECTED_ZLIB_RETURN (-7) +PNG_INTERNAL_FUNCTION(void, png_zstream_error,(png_structrp png_ptr, int ret), + PNG_EMPTY); + /* Used by the zlib handling functions to ensure that z_stream::msg is always + * set before they return. + */ + +#ifdef PNG_WRITE_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_free_buffer_list,(png_structrp png_ptr, + png_compression_bufferp *list),PNG_EMPTY); + /* Free the buffer list used by the compressed write code. */ +#endif + +#if defined(PNG_FLOATING_POINT_SUPPORTED) && \ + !defined(PNG_FIXED_POINT_MACRO_SUPPORTED) && \ + (defined(PNG_gAMA_SUPPORTED) || defined(PNG_cHRM_SUPPORTED) || \ + defined(PNG_sCAL_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)) || \ + (defined(PNG_sCAL_SUPPORTED) && \ + defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)) +PNG_INTERNAL_FUNCTION(png_fixed_point,png_fixed,(png_const_structrp png_ptr, + double fp, png_const_charp text),PNG_EMPTY); +#endif + +/* Check the user version string for compatibility, returns false if the version + * numbers aren't compatible. + */ +PNG_INTERNAL_FUNCTION(int,png_user_version_check,(png_structrp png_ptr, + png_const_charp user_png_ver),PNG_EMPTY); + +/* Internal base allocator - no messages, NULL on failure to allocate. This + * does, however, call the application provided allocator and that could call + * png_error (although that would be a bug in the application implementation.) + */ +PNG_INTERNAL_FUNCTION(png_voidp,png_malloc_base,(png_const_structrp png_ptr, + png_alloc_size_t size),PNG_ALLOCATED); + +#if defined(PNG_TEXT_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) ||\ + defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) +/* Internal array allocator, outputs no error or warning messages on failure, + * just returns NULL. + */ +PNG_INTERNAL_FUNCTION(png_voidp,png_malloc_array,(png_const_structrp png_ptr, + int nelements, size_t element_size),PNG_ALLOCATED); + +/* The same but an existing array is extended by add_elements. This function + * also memsets the new elements to 0 and copies the old elements. The old + * array is not freed or altered. + */ +PNG_INTERNAL_FUNCTION(png_voidp,png_realloc_array,(png_const_structrp png_ptr, + png_const_voidp array, int old_elements, int add_elements, + size_t element_size),PNG_ALLOCATED); +#endif /* text, sPLT or unknown chunks */ + +/* Magic to create a struct when there is no struct to call the user supplied + * memory allocators. Because error handling has not been set up the memory + * handlers can't safely call png_error, but this is an obscure and undocumented + * restriction so libpng has to assume that the 'free' handler, at least, might + * call png_error. + */ +PNG_INTERNAL_FUNCTION(png_structp,png_create_png_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, + png_free_ptr free_fn),PNG_ALLOCATED); + +/* Free memory from internal libpng struct */ +PNG_INTERNAL_FUNCTION(void,png_destroy_png_struct,(png_structrp png_ptr), + PNG_EMPTY); + +/* Free an allocated jmp_buf (always succeeds) */ +PNG_INTERNAL_FUNCTION(void,png_free_jmpbuf,(png_structrp png_ptr),PNG_EMPTY); + +/* Function to allocate memory for zlib. PNGAPI is disallowed. */ +PNG_INTERNAL_FUNCTION(voidpf,png_zalloc,(voidpf png_ptr, uInt items, uInt size), + PNG_ALLOCATED); + +/* Function to free memory for zlib. PNGAPI is disallowed. */ +PNG_INTERNAL_FUNCTION(void,png_zfree,(voidpf png_ptr, voidpf ptr),PNG_EMPTY); + +/* Next four functions are used internally as callbacks. PNGCBAPI is required + * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3, changed to + * PNGCBAPI at 1.5.0 + */ + +PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_read_data,(png_structp png_ptr, + png_bytep data, png_size_t length),PNG_EMPTY); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_push_fill_buffer,(png_structp png_ptr, + png_bytep buffer, png_size_t length),PNG_EMPTY); +#endif + +PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_write_data,(png_structp png_ptr, + png_bytep data, png_size_t length),PNG_EMPTY); + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +# ifdef PNG_STDIO_SUPPORTED +PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_flush,(png_structp png_ptr), + PNG_EMPTY); +# endif +#endif + +/* Reset the CRC variable */ +PNG_INTERNAL_FUNCTION(void,png_reset_crc,(png_structrp png_ptr),PNG_EMPTY); + +/* Write the "data" buffer to whatever output you are using */ +PNG_INTERNAL_FUNCTION(void,png_write_data,(png_structrp png_ptr, + png_const_bytep data, png_size_t length),PNG_EMPTY); + +/* Read and check the PNG file signature */ +PNG_INTERNAL_FUNCTION(void,png_read_sig,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); + +/* Read the chunk header (length + type name) */ +PNG_INTERNAL_FUNCTION(png_uint_32,png_read_chunk_header,(png_structrp png_ptr), + PNG_EMPTY); + +/* Read data from whatever input you are using into the "data" buffer */ +PNG_INTERNAL_FUNCTION(void,png_read_data,(png_structrp png_ptr, png_bytep data, + png_size_t length),PNG_EMPTY); + +/* Read bytes into buf, and update png_ptr->crc */ +PNG_INTERNAL_FUNCTION(void,png_crc_read,(png_structrp png_ptr, png_bytep buf, + png_uint_32 length),PNG_EMPTY); + +/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ +PNG_INTERNAL_FUNCTION(int,png_crc_finish,(png_structrp png_ptr, + png_uint_32 skip),PNG_EMPTY); + +/* Read the CRC from the file and compare it to the libpng calculated CRC */ +PNG_INTERNAL_FUNCTION(int,png_crc_error,(png_structrp png_ptr),PNG_EMPTY); + +/* Calculate the CRC over a section of data. Note that we are only + * passing a maximum of 64K on systems that have this as a memory limit, + * since this is the maximum buffer size we can specify. + */ +PNG_INTERNAL_FUNCTION(void,png_calculate_crc,(png_structrp png_ptr, + png_const_bytep ptr, png_size_t length),PNG_EMPTY); + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_flush,(png_structrp png_ptr),PNG_EMPTY); +#endif + +/* Write various chunks */ + +/* Write the IHDR chunk, and update the png_struct with the necessary + * information. + */ +PNG_INTERNAL_FUNCTION(void,png_write_IHDR,(png_structrp png_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, + int compression_method, int filter_method, int interlace_method),PNG_EMPTY); + +PNG_INTERNAL_FUNCTION(void,png_write_PLTE,(png_structrp png_ptr, + png_const_colorp palette, png_uint_32 num_pal),PNG_EMPTY); + +PNG_INTERNAL_FUNCTION(void,png_compress_IDAT,(png_structrp png_ptr, + png_const_bytep row_data, png_alloc_size_t row_data_length, int flush), + PNG_EMPTY); + +PNG_INTERNAL_FUNCTION(void,png_write_IEND,(png_structrp png_ptr),PNG_EMPTY); + +#ifdef PNG_WRITE_gAMA_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_gAMA_fixed,(png_structrp png_ptr, + png_fixed_point file_gamma),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_sBIT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_sBIT,(png_structrp png_ptr, + png_const_color_8p sbit, int color_type),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_cHRM_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_cHRM_fixed,(png_structrp png_ptr, + const png_xy *xy), PNG_EMPTY); + /* The xy value must have been previously validated */ +#endif + +#ifdef PNG_WRITE_sRGB_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_sRGB,(png_structrp png_ptr, + int intent),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_iCCP_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_iCCP,(png_structrp png_ptr, + png_const_charp name, png_const_bytep profile), PNG_EMPTY); + /* The profile must have been previously validated for correctness, the + * length comes from the first four bytes. Only the base, deflate, + * compression is supported. + */ +#endif + +#ifdef PNG_WRITE_sPLT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_sPLT,(png_structrp png_ptr, + png_const_sPLT_tp palette),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_tRNS_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_tRNS,(png_structrp png_ptr, + png_const_bytep trans, png_const_color_16p values, int number, + int color_type),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_bKGD_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_bKGD,(png_structrp png_ptr, + png_const_color_16p values, int color_type),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_hIST_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_hIST,(png_structrp png_ptr, + png_const_uint_16p hist, int num_hist),PNG_EMPTY); +#endif + +/* Chunks that have keywords */ +#ifdef PNG_WRITE_tEXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_tEXt,(png_structrp png_ptr, + png_const_charp key, png_const_charp text, png_size_t text_len),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_zTXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_zTXt,(png_structrp png_ptr, png_const_charp + key, png_const_charp text, png_size_t text_len, int compression),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_iTXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_iTXt,(png_structrp png_ptr, + int compression, png_const_charp key, png_const_charp lang, + png_const_charp lang_key, png_const_charp text),PNG_EMPTY); +#endif + +#ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */ +PNG_INTERNAL_FUNCTION(int,png_set_text_2,(png_const_structrp png_ptr, + png_inforp info_ptr, png_const_textp text_ptr, int num_text),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_oFFs_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_oFFs,(png_structrp png_ptr, + png_int_32 x_offset, png_int_32 y_offset, int unit_type),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_pCAL_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_pCAL,(png_structrp png_ptr, + png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, + png_const_charp units, png_charpp params),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_pHYs_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_pHYs,(png_structrp png_ptr, + png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, + int unit_type),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_tIME_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_tIME,(png_structrp png_ptr, + png_const_timep mod_time),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_sCAL_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_sCAL_s,(png_structrp png_ptr, + int unit, png_const_charp width, png_const_charp height),PNG_EMPTY); +#endif + +/* Called when finished processing a row of data */ +PNG_INTERNAL_FUNCTION(void,png_write_finish_row,(png_structrp png_ptr), + PNG_EMPTY); + +/* Internal use only. Called before first row of data */ +PNG_INTERNAL_FUNCTION(void,png_write_start_row,(png_structrp png_ptr), + PNG_EMPTY); + +/* Combine a row of data, dealing with alpha, etc. if requested. 'row' is an + * array of png_ptr->width pixels. If the image is not interlaced or this + * is the final pass this just does a memcpy, otherwise the "display" flag + * is used to determine whether to copy pixels that are not in the current pass. + * + * Because 'png_do_read_interlace' (below) replicates pixels this allows this + * function to achieve the documented 'blocky' appearance during interlaced read + * if display is 1 and the 'sparkle' appearance, where existing pixels in 'row' + * are not changed if they are not in the current pass, when display is 0. + * + * 'display' must be 0 or 1, otherwise the memcpy will be done regardless. + * + * The API always reads from the png_struct row buffer and always assumes that + * it is full width (png_do_read_interlace has already been called.) + * + * This function is only ever used to write to row buffers provided by the + * caller of the relevant libpng API and the row must have already been + * transformed by the read transformations. + * + * The PNG_USE_COMPILE_TIME_MASKS option causes generation of pre-computed + * bitmasks for use within the code, otherwise runtime generated masks are used. + * The default is compile time masks. + */ +#ifndef PNG_USE_COMPILE_TIME_MASKS +# define PNG_USE_COMPILE_TIME_MASKS 1 +#endif +PNG_INTERNAL_FUNCTION(void,png_combine_row,(png_const_structrp png_ptr, + png_bytep row, int display),PNG_EMPTY); + +#ifdef PNG_READ_INTERLACING_SUPPORTED +/* Expand an interlaced row: the 'row_info' describes the pass data that has + * been read in and must correspond to the pixels in 'row', the pixels are + * expanded (moved apart) in 'row' to match the final layout, when doing this + * the pixels are *replicated* to the intervening space. This is essential for + * the correct operation of png_combine_row, above. + */ +PNG_INTERNAL_FUNCTION(void,png_do_read_interlace,(png_row_infop row_info, + png_bytep row, int pass, png_uint_32 transformations),PNG_EMPTY); +#endif + +/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */ + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED +/* Grab pixels out of a row for an interlaced pass */ +PNG_INTERNAL_FUNCTION(void,png_do_write_interlace,(png_row_infop row_info, + png_bytep row, int pass),PNG_EMPTY); +#endif + +/* Unfilter a row: check the filter value before calling this, there is no point + * calling it for PNG_FILTER_VALUE_NONE. + */ +PNG_INTERNAL_FUNCTION(void,png_read_filter_row,(png_structrp pp, png_row_infop + row_info, png_bytep row, png_const_bytep prev_row, int filter),PNG_EMPTY); + +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_neon,(png_row_infop row_info, + png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); + +/* Choose the best filter to use and filter the row data */ +PNG_INTERNAL_FUNCTION(void,png_write_find_filter,(png_structrp png_ptr, + png_row_infop row_info),PNG_EMPTY); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_read_IDAT_data,(png_structrp png_ptr, + png_bytep output, png_alloc_size_t avail_out),PNG_EMPTY); + /* Read 'avail_out' bytes of data from the IDAT stream. If the output buffer + * is NULL the function checks, instead, for the end of the stream. In this + * case a benign error will be issued if the stream end is not found or if + * extra data has to be consumed. + */ +PNG_INTERNAL_FUNCTION(void,png_read_finish_IDAT,(png_structrp png_ptr), + PNG_EMPTY); + /* This cleans up when the IDAT LZ stream does not end when the last image + * byte is read; there is still some pending input. + */ + +PNG_INTERNAL_FUNCTION(void,png_read_finish_row,(png_structrp png_ptr), + PNG_EMPTY); + /* Finish a row while reading, dealing with interlacing passes, etc. */ +#endif + +/* Initialize the row buffers, etc. */ +PNG_INTERNAL_FUNCTION(void,png_read_start_row,(png_structrp png_ptr),PNG_EMPTY); + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +/* Optional call to update the users info structure */ +PNG_INTERNAL_FUNCTION(void,png_read_transform_info,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +#endif + +/* These are the functions that do the transformations */ +#ifdef PNG_READ_FILLER_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_read_filler,(png_row_infop row_info, + png_bytep row, png_uint_32 filler, png_uint_32 flags),PNG_EMPTY); +#endif + +#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_read_swap_alpha,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_write_swap_alpha,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_read_invert_alpha,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_write_invert_alpha,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ + defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_strip_channel,(png_row_infop row_info, + png_bytep row, int at_start),PNG_EMPTY); +#endif + +#ifdef PNG_16BIT_SUPPORTED +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_swap,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_packswap,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +PNG_INTERNAL_FUNCTION(int,png_do_rgb_to_gray,(png_structrp png_ptr, + png_row_infop row_info, png_bytep row),PNG_EMPTY); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_gray_to_rgb,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#ifdef PNG_READ_PACK_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_unpack,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#ifdef PNG_READ_SHIFT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_unshift,(png_row_infop row_info, + png_bytep row, png_const_color_8p sig_bits),PNG_EMPTY); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_invert,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_scale_16_to_8,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_chop,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_quantize,(png_row_infop row_info, + png_bytep row, png_const_bytep palette_lookup, + png_const_bytep quantize_lookup),PNG_EMPTY); + +# ifdef PNG_CORRECT_PALETTE_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_correct_palette,(png_structrp png_ptr, + png_colorp palette, int num_palette),PNG_EMPTY); +# endif +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_bgr,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_PACK_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_pack,(png_row_infop row_info, + png_bytep row, png_uint_32 bit_depth),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_SHIFT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_shift,(png_row_infop row_info, + png_bytep row, png_const_color_8p bit_depth),PNG_EMPTY); +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_compose,(png_row_infop row_info, + png_bytep row, png_structrp png_ptr),PNG_EMPTY); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_gamma,(png_row_infop row_info, + png_bytep row, png_structrp png_ptr),PNG_EMPTY); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_encode_alpha,(png_row_infop row_info, + png_bytep row, png_structrp png_ptr),PNG_EMPTY); +#endif + +#ifdef PNG_READ_EXPAND_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_expand_palette,(png_row_infop row_info, + png_bytep row, png_const_colorp palette, png_const_bytep trans, + int num_trans),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_do_expand,(png_row_infop row_info, + png_bytep row, png_const_color_16p trans_color),PNG_EMPTY); +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_expand_16,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +/* The following decodes the appropriate chunks, and does error correction, + * then calls the appropriate callback for the chunk if it is valid. + */ + +/* Decode the IHDR chunk */ +PNG_INTERNAL_FUNCTION(void,png_handle_IHDR,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_handle_PLTE,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_handle_IEND,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); + +#ifdef PNG_READ_bKGD_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_bKGD,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_cHRM_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_cHRM,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_gAMA_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_gAMA,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_hIST_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_hIST,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_iCCP_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_iCCP,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif /* PNG_READ_iCCP_SUPPORTED */ + +#ifdef PNG_READ_iTXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_iTXt,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_oFFs_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_oFFs,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_pCAL_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_pCAL,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_pHYs_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_pHYs,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_sBIT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_sBIT,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_sCAL_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_sCAL,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_sPLT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_sPLT,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif /* PNG_READ_sPLT_SUPPORTED */ + +#ifdef PNG_READ_sRGB_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_sRGB,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_tEXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_tEXt,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_tIME_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_tIME,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_tRNS_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_tRNS,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +#ifdef PNG_READ_zTXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_zTXt,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +#endif + +PNG_INTERNAL_FUNCTION(void,png_check_chunk_name,(png_structrp png_ptr, + png_uint_32 chunk_name),PNG_EMPTY); + +#ifdef PNG_READ_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_handle_unknown,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length, int keep),PNG_EMPTY); + /* This is the function that gets called for unknown chunks. The 'keep' + * argument is either non-zero for a known chunk that has been set to be + * handled as unknown or zero for an unknown chunk. By default the function + * just skips the chunk or errors out if it is critical. + */ + +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +PNG_INTERNAL_FUNCTION(int,png_chunk_unknown_handling, + (png_const_structrp png_ptr, png_uint_32 chunk_name),PNG_EMPTY); + /* Exactly as the API png_handle_as_unknown() except that the argument is a + * 32-bit chunk name, not a string. + */ +#endif +#endif /* PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */ +#endif /* PNG_READ_SUPPORTED */ + +/* Handle the transformations for reading and writing */ +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_read_transformations,(png_structrp png_ptr, + png_row_infop row_info),PNG_EMPTY); +#endif +#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_write_transformations,(png_structrp png_ptr, + png_row_infop row_info),PNG_EMPTY); +#endif + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_init_read_transformations,(png_structrp png_ptr), + PNG_EMPTY); +#endif + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_push_read_chunk,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_read_sig,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_check_crc,(png_structrp png_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_crc_skip,(png_structrp png_ptr, + png_uint_32 length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_crc_finish,(png_structrp png_ptr), + PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_save_buffer,(png_structrp png_ptr), + PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_restore_buffer,(png_structrp png_ptr, + png_bytep buffer, png_size_t buffer_length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_read_IDAT,(png_structrp png_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_process_IDAT_data,(png_structrp png_ptr, + png_bytep buffer, png_size_t buffer_length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_process_row,(png_structrp png_ptr), + PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_handle_unknown,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_have_info,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_have_end,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_have_row,(png_structrp png_ptr, + png_bytep row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_read_end,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_process_some_data,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_push_finish_row,(png_structrp png_ptr), + PNG_EMPTY); +# ifdef PNG_READ_tEXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_push_handle_tEXt,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_read_tEXt,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +# endif +# ifdef PNG_READ_zTXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_push_handle_zTXt,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_read_zTXt,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +# endif +# ifdef PNG_READ_iTXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_push_handle_iTXt,(png_structrp png_ptr, + png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_read_iTXt,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +# endif + +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +#ifdef PNG_MNG_FEATURES_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_read_intrapixel,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_do_write_intrapixel,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +/* Added at libpng version 1.6.0 */ +#ifdef PNG_GAMMA_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_colorspace_set_gamma,(png_const_structrp png_ptr, + png_colorspacerp colorspace, png_fixed_point gAMA), PNG_EMPTY); + /* Set the colorspace gamma with a value provided by the application or by + * the gAMA chunk on read. The value will override anything set by an ICC + * profile. + */ + +PNG_INTERNAL_FUNCTION(void,png_colorspace_sync_info,(png_const_structrp png_ptr, + png_inforp info_ptr), PNG_EMPTY); + /* Synchronize the info 'valid' flags with the colorspace */ + +PNG_INTERNAL_FUNCTION(void,png_colorspace_sync,(png_const_structrp png_ptr, + png_inforp info_ptr), PNG_EMPTY); + /* Copy the png_struct colorspace to the info_struct and call the above to + * synchronize the flags. Checks for NULL info_ptr and does nothing. + */ +#endif + +/* Added at libpng version 1.4.0 */ +#ifdef PNG_COLORSPACE_SUPPORTED +/* These internal functions are for maintaining the colorspace structure within + * a png_info or png_struct (or, indeed, both). + */ +PNG_INTERNAL_FUNCTION(int,png_colorspace_set_chromaticities, + (png_const_structrp png_ptr, png_colorspacerp colorspace, const png_xy *xy, + int preferred), PNG_EMPTY); + +PNG_INTERNAL_FUNCTION(int,png_colorspace_set_endpoints, + (png_const_structrp png_ptr, png_colorspacerp colorspace, const png_XYZ *XYZ, + int preferred), PNG_EMPTY); + +#ifdef PNG_sRGB_SUPPORTED +PNG_INTERNAL_FUNCTION(int,png_colorspace_set_sRGB,(png_const_structrp png_ptr, + png_colorspacerp colorspace, int intent), PNG_EMPTY); + /* This does set the colorspace gAMA and cHRM values too, but doesn't set the + * flags to write them, if it returns false there was a problem and an error + * message has already been output (but the colorspace may still need to be + * synced to record the invalid flag). + */ +#endif /* sRGB */ + +#ifdef PNG_iCCP_SUPPORTED +PNG_INTERNAL_FUNCTION(int,png_colorspace_set_ICC,(png_const_structrp png_ptr, + png_colorspacerp colorspace, png_const_charp name, + png_uint_32 profile_length, png_const_bytep profile, int color_type), + PNG_EMPTY); + /* The 'name' is used for information only */ + +/* Routines for checking parts of an ICC profile. */ +PNG_INTERNAL_FUNCTION(int,png_icc_check_length,(png_const_structrp png_ptr, + png_colorspacerp colorspace, png_const_charp name, + png_uint_32 profile_length), PNG_EMPTY); +PNG_INTERNAL_FUNCTION(int,png_icc_check_header,(png_const_structrp png_ptr, + png_colorspacerp colorspace, png_const_charp name, + png_uint_32 profile_length, + png_const_bytep profile /* first 132 bytes only */, int color_type), + PNG_EMPTY); +PNG_INTERNAL_FUNCTION(int,png_icc_check_tag_table,(png_const_structrp png_ptr, + png_colorspacerp colorspace, png_const_charp name, + png_uint_32 profile_length, + png_const_bytep profile /* header plus whole tag table */), PNG_EMPTY); +#ifdef PNG_sRGB_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_icc_set_sRGB,( + png_const_structrp png_ptr, png_colorspacerp colorspace, + png_const_bytep profile, uLong adler), PNG_EMPTY); + /* 'adler' is the Adler32 checksum of the uncompressed profile data. It may + * be zero to indicate that it is not available. It is used, if provided, + * as a fast check on the profile when checking to see if it is sRGB. + */ +#endif +#endif /* iCCP */ + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_colorspace_set_rgb_coefficients, + (png_structrp png_ptr), PNG_EMPTY); + /* Set the rgb_to_gray coefficients from the colorspace Y values */ +#endif /* READ_RGB_TO_GRAY */ +#endif /* COLORSPACE */ + +/* Added at libpng version 1.4.0 */ +PNG_INTERNAL_FUNCTION(void,png_check_IHDR,(png_const_structrp png_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type),PNG_EMPTY); + +/* Added at libpng version 1.5.10 */ +#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \ + defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_check_palette_indexes, + (png_structrp png_ptr, png_row_infop row_info),PNG_EMPTY); +#endif + +#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_fixed_error,(png_const_structrp png_ptr, + png_const_charp name),PNG_NORETURN); +#endif + +/* Puts 'string' into 'buffer' at buffer[pos], taking care never to overwrite + * the end. Always leaves the buffer nul terminated. Never errors out (and + * there is no error code.) + */ +PNG_INTERNAL_FUNCTION(size_t,png_safecat,(png_charp buffer, size_t bufsize, + size_t pos, png_const_charp string),PNG_EMPTY); + +/* Various internal functions to handle formatted warning messages, currently + * only implemented for warnings. + */ +#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_TIME_RFC1123_SUPPORTED) +/* Utility to dump an unsigned value into a buffer, given a start pointer and + * and end pointer (which should point just *beyond* the end of the buffer!) + * Returns the pointer to the start of the formatted string. This utility only + * does unsigned values. + */ +PNG_INTERNAL_FUNCTION(png_charp,png_format_number,(png_const_charp start, + png_charp end, int format, png_alloc_size_t number),PNG_EMPTY); + +/* Convenience macro that takes an array: */ +#define PNG_FORMAT_NUMBER(buffer,format,number) \ + png_format_number(buffer, buffer + (sizeof buffer), format, number) + +/* Suggested size for a number buffer (enough for 64 bits and a sign!) */ +#define PNG_NUMBER_BUFFER_SIZE 24 + +/* These are the integer formats currently supported, the name is formed from + * the standard printf(3) format string. + */ +#define PNG_NUMBER_FORMAT_u 1 /* chose unsigned API! */ +#define PNG_NUMBER_FORMAT_02u 2 +#define PNG_NUMBER_FORMAT_d 1 /* chose signed API! */ +#define PNG_NUMBER_FORMAT_02d 2 +#define PNG_NUMBER_FORMAT_x 3 +#define PNG_NUMBER_FORMAT_02x 4 +#define PNG_NUMBER_FORMAT_fixed 5 /* choose the signed API */ +#endif + +#ifdef PNG_WARNINGS_SUPPORTED +/* New defines and members adding in libpng-1.5.4 */ +# define PNG_WARNING_PARAMETER_SIZE 32 +# define PNG_WARNING_PARAMETER_COUNT 8 /* Maximum 9; see pngerror.c */ + +/* An l-value of this type has to be passed to the APIs below to cache the + * values of the parameters to a formatted warning message. + */ +typedef char png_warning_parameters[PNG_WARNING_PARAMETER_COUNT][ + PNG_WARNING_PARAMETER_SIZE]; + +PNG_INTERNAL_FUNCTION(void,png_warning_parameter,(png_warning_parameters p, + int number, png_const_charp string),PNG_EMPTY); + /* Parameters are limited in size to PNG_WARNING_PARAMETER_SIZE characters, + * including the trailing '\0'. + */ +PNG_INTERNAL_FUNCTION(void,png_warning_parameter_unsigned, + (png_warning_parameters p, int number, int format, png_alloc_size_t value), + PNG_EMPTY); + /* Use png_alloc_size_t because it is an unsigned type as big as any we + * need to output. Use the following for a signed value. + */ +PNG_INTERNAL_FUNCTION(void,png_warning_parameter_signed, + (png_warning_parameters p, int number, int format, png_int_32 value), + PNG_EMPTY); + +PNG_INTERNAL_FUNCTION(void,png_formatted_warning,(png_const_structrp png_ptr, + png_warning_parameters p, png_const_charp message),PNG_EMPTY); + /* 'message' follows the X/Open approach of using @1, @2 to insert + * parameters previously supplied using the above functions. Errors in + * specifying the parameters will simply result in garbage substitutions. + */ +#endif + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +/* Application errors (new in 1.6); use these functions (declared below) for + * errors in the parameters or order of API function calls on read. The + * 'warning' should be used for an error that can be handled completely; the + * 'error' for one which can be handled safely but which may lose application + * information or settings. + * + * By default these both result in a png_error call prior to release, while in a + * released version the 'warning' is just a warning. However if the application + * explicitly disables benign errors (explicitly permitting the code to lose + * information) they both turn into warnings. + * + * If benign errors aren't supported they end up as the corresponding base call + * (png_warning or png_error.) + */ +PNG_INTERNAL_FUNCTION(void,png_app_warning,(png_const_structrp png_ptr, + png_const_charp message),PNG_EMPTY); + /* The application provided invalid parameters to an API function or called + * an API function at the wrong time, libpng can completely recover. + */ + +PNG_INTERNAL_FUNCTION(void,png_app_error,(png_const_structrp png_ptr, + png_const_charp message),PNG_EMPTY); + /* As above but libpng will ignore the call, or attempt some other partial + * recovery from the error. + */ +#else +# define png_app_warning(pp,s) png_warning(pp,s) +# define png_app_error(pp,s) png_error(pp,s) +#endif + +PNG_INTERNAL_FUNCTION(void,png_chunk_report,(png_const_structrp png_ptr, + png_const_charp message, int error),PNG_EMPTY); + /* Report a recoverable issue in chunk data. On read this is used to report + * a problem found while reading a particular chunk and the + * png_chunk_benign_error or png_chunk_warning function is used as + * appropriate. On write this is used to report an error that comes from + * data set via an application call to a png_set_ API and png_app_error or + * png_app_warning is used as appropriate. + * + * The 'error' parameter must have one of the following values: + */ +#define PNG_CHUNK_WARNING 0 /* never an error */ +#define PNG_CHUNK_WRITE_ERROR 1 /* an error only on write */ +#define PNG_CHUNK_ERROR 2 /* always an error */ + +/* ASCII to FP interfaces, currently only implemented if sCAL + * support is required. + */ +#if defined(PNG_sCAL_SUPPORTED) +/* MAX_DIGITS is actually the maximum number of characters in an sCAL + * width or height, derived from the precision (number of significant + * digits - a build time settable option) and assumptions about the + * maximum ridiculous exponent. + */ +#define PNG_sCAL_MAX_DIGITS (PNG_sCAL_PRECISION+1/*.*/+1/*E*/+10/*exponent*/) + +#ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_ascii_from_fp,(png_const_structrp png_ptr, + png_charp ascii, png_size_t size, double fp, unsigned int precision), + PNG_EMPTY); +#endif /* FLOATING_POINT */ + +#ifdef PNG_FIXED_POINT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_ascii_from_fixed,(png_const_structrp png_ptr, + png_charp ascii, png_size_t size, png_fixed_point fp),PNG_EMPTY); +#endif /* FIXED_POINT */ +#endif /* sCAL */ + +#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED) +/* An internal API to validate the format of a floating point number. + * The result is the index of the next character. If the number is + * not valid it will be the index of a character in the supposed number. + * + * The format of a number is defined in the PNG extensions specification + * and this API is strictly conformant to that spec, not anyone elses! + * + * The format as a regular expression is: + * + * [+-]?[0-9]+.?([Ee][+-]?[0-9]+)? + * + * or: + * + * [+-]?.[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)? + * + * The complexity is that either integer or fraction must be present and the + * fraction is permitted to have no digits only if the integer is present. + * + * NOTE: The dangling E problem. + * There is a PNG valid floating point number in the following: + * + * PNG floating point numbers are not greedy. + * + * Working this out requires *TWO* character lookahead (because of the + * sign), the parser does not do this - it will fail at the 'r' - this + * doesn't matter for PNG sCAL chunk values, but it requires more care + * if the value were ever to be embedded in something more complex. Use + * ANSI-C strtod if you need the lookahead. + */ +/* State table for the parser. */ +#define PNG_FP_INTEGER 0 /* before or in integer */ +#define PNG_FP_FRACTION 1 /* before or in fraction */ +#define PNG_FP_EXPONENT 2 /* before or in exponent */ +#define PNG_FP_STATE 3 /* mask for the above */ +#define PNG_FP_SAW_SIGN 4 /* Saw +/- in current state */ +#define PNG_FP_SAW_DIGIT 8 /* Saw a digit in current state */ +#define PNG_FP_SAW_DOT 16 /* Saw a dot in current state */ +#define PNG_FP_SAW_E 32 /* Saw an E (or e) in current state */ +#define PNG_FP_SAW_ANY 60 /* Saw any of the above 4 */ + +/* These three values don't affect the parser. They are set but not used. + */ +#define PNG_FP_WAS_VALID 64 /* Preceding substring is a valid fp number */ +#define PNG_FP_NEGATIVE 128 /* A negative number, including "-0" */ +#define PNG_FP_NONZERO 256 /* A non-zero value */ +#define PNG_FP_STICKY 448 /* The above three flags */ + +/* This is available for the caller to store in 'state' if required. Do not + * call the parser after setting it (the parser sometimes clears it.) + */ +#define PNG_FP_INVALID 512 /* Available for callers as a distinct value */ + +/* Result codes for the parser (boolean - true meants ok, false means + * not ok yet.) + */ +#define PNG_FP_MAYBE 0 /* The number may be valid in the future */ +#define PNG_FP_OK 1 /* The number is valid */ + +/* Tests on the sticky non-zero and negative flags. To pass these checks + * the state must also indicate that the whole number is valid - this is + * achieved by testing PNG_FP_SAW_DIGIT (see the implementation for why this + * is equivalent to PNG_FP_OK above.) + */ +#define PNG_FP_NZ_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NEGATIVE | PNG_FP_NONZERO) + /* NZ_MASK: the string is valid and a non-zero negative value */ +#define PNG_FP_Z_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NONZERO) + /* Z MASK: the string is valid and a non-zero value. */ + /* PNG_FP_SAW_DIGIT: the string is valid. */ +#define PNG_FP_IS_ZERO(state) (((state) & PNG_FP_Z_MASK) == PNG_FP_SAW_DIGIT) +#define PNG_FP_IS_POSITIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_Z_MASK) +#define PNG_FP_IS_NEGATIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_NZ_MASK) + +/* The actual parser. This can be called repeatedly. It updates + * the index into the string and the state variable (which must + * be initialized to 0). It returns a result code, as above. There + * is no point calling the parser any more if it fails to advance to + * the end of the string - it is stuck on an invalid character (or + * terminated by '\0'). + * + * Note that the pointer will consume an E or even an E+ and then leave + * a 'maybe' state even though a preceding integer.fraction is valid. + * The PNG_FP_WAS_VALID flag indicates that a preceding substring was + * a valid number. It's possible to recover from this by calling + * the parser again (from the start, with state 0) but with a string + * that omits the last character (i.e. set the size to the index of + * the problem character.) This has not been tested within libpng. + */ +PNG_INTERNAL_FUNCTION(int,png_check_fp_number,(png_const_charp string, + png_size_t size, int *statep, png_size_tp whereami),PNG_EMPTY); + +/* This is the same but it checks a complete string and returns true + * only if it just contains a floating point number. As of 1.5.4 this + * function also returns the state at the end of parsing the number if + * it was valid (otherwise it returns 0.) This can be used for testing + * for negative or zero values using the sticky flag. + */ +PNG_INTERNAL_FUNCTION(int,png_check_fp_string,(png_const_charp string, + png_size_t size),PNG_EMPTY); +#endif /* pCAL || sCAL */ + +#if defined(PNG_READ_GAMMA_SUPPORTED) ||\ + defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG_READ_pHYs_SUPPORTED) +/* Added at libpng version 1.5.0 */ +/* This is a utility to provide a*times/div (rounded) and indicate + * if there is an overflow. The result is a boolean - false (0) + * for overflow, true (1) if no overflow, in which case *res + * holds the result. + */ +PNG_INTERNAL_FUNCTION(int,png_muldiv,(png_fixed_point_p res, png_fixed_point a, + png_int_32 multiplied_by, png_int_32 divided_by),PNG_EMPTY); +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED) +/* Same deal, but issue a warning on overflow and return 0. */ +PNG_INTERNAL_FUNCTION(png_fixed_point,png_muldiv_warn, + (png_const_structrp png_ptr, png_fixed_point a, png_int_32 multiplied_by, + png_int_32 divided_by),PNG_EMPTY); +#endif + +#ifdef PNG_GAMMA_SUPPORTED +/* Calculate a reciprocal - used for gamma values. This returns + * 0 if the argument is 0 in order to maintain an undefined value; + * there are no warnings. + */ +PNG_INTERNAL_FUNCTION(png_fixed_point,png_reciprocal,(png_fixed_point a), + PNG_EMPTY); + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* The same but gives a reciprocal of the product of two fixed point + * values. Accuracy is suitable for gamma calculations but this is + * not exact - use png_muldiv for that. Only required at present on read. + */ +PNG_INTERNAL_FUNCTION(png_fixed_point,png_reciprocal2,(png_fixed_point a, + png_fixed_point b),PNG_EMPTY); +#endif + +/* Return true if the gamma value is significantly different from 1.0 */ +PNG_INTERNAL_FUNCTION(int,png_gamma_significant,(png_fixed_point gamma_value), + PNG_EMPTY); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* Internal fixed point gamma correction. These APIs are called as + * required to convert single values - they don't need to be fast, + * they are not used when processing image pixel values. + * + * While the input is an 'unsigned' value it must actually be the + * correct bit value - 0..255 or 0..65535 as required. + */ +PNG_INTERNAL_FUNCTION(png_uint_16,png_gamma_correct,(png_structrp png_ptr, + unsigned int value, png_fixed_point gamma_value),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(png_uint_16,png_gamma_16bit_correct,(unsigned int value, + png_fixed_point gamma_value),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(png_byte,png_gamma_8bit_correct,(unsigned int value, + png_fixed_point gamma_value),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_destroy_gamma_table,(png_structrp png_ptr), + PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_build_gamma_table,(png_structrp png_ptr, + int bit_depth),PNG_EMPTY); +#endif + +/* SIMPLIFIED READ/WRITE SUPPORT */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) +/* The internal structure that png_image::opaque points to. */ +typedef struct png_control +{ + png_structp png_ptr; + png_infop info_ptr; + png_voidp error_buf; /* Always a jmp_buf at present. */ + + png_const_bytep memory; /* Memory buffer. */ + png_size_t size; /* Size of the memory buffer. */ + + unsigned int for_write :1; /* Otherwise it is a read structure */ + unsigned int owned_file :1; /* We own the file in io_ptr */ +} png_control; + +/* Return the pointer to the jmp_buf from a png_control: necessary because C + * does not reveal the type of the elements of jmp_buf. + */ +#ifdef __cplusplus +# define png_control_jmp_buf(pc) (((jmp_buf*)((pc)->error_buf))[0]) +#else +# define png_control_jmp_buf(pc) ((pc)->error_buf) +#endif + +/* Utility to safely execute a piece of libpng code catching and logging any + * errors that might occur. Returns true on success, false on failure (either + * of the function or as a result of a png_error.) + */ +PNG_INTERNAL_FUNCTION(void,png_safe_error,(png_structp png_ptr, + png_const_charp error_message),PNG_NORETURN); + +#ifdef PNG_WARNINGS_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_safe_warning,(png_structp png_ptr, + png_const_charp warning_message),PNG_EMPTY); +#else +# define png_safe_warning 0/*dummy argument*/ +#endif + +PNG_INTERNAL_FUNCTION(int,png_safe_execute,(png_imagep image, + int (*function)(png_voidp), png_voidp arg),PNG_EMPTY); + +/* Utility to log an error; this also cleans up the png_image; the function + * always returns 0 (false). + */ +PNG_INTERNAL_FUNCTION(int,png_image_error,(png_imagep image, + png_const_charp error_message),PNG_EMPTY); + +#ifndef PNG_SIMPLIFIED_READ_SUPPORTED +/* png_image_free is used by the write code but not exported */ +PNG_INTERNAL_FUNCTION(void, png_image_free, (png_imagep image), PNG_EMPTY); +#endif /* !SIMPLIFIED_READ */ + +#endif /* SIMPLIFIED READ/WRITE */ + +#ifdef PNG_FILTER_OPTIMIZATIONS +PNG_INTERNAL_FUNCTION(void, PNG_FILTER_OPTIMIZATIONS, (png_structp png_ptr, + unsigned int bpp), PNG_EMPTY); + /* This is the initialization function for hardware specific optimizations, + * one implementation (for ARM NEON machines) is contained in + * arm/filter_neon.c. It need not be defined - the generic code will be used + * if not. + */ +#endif + +/* Maintainer: Put new private prototypes here ^ */ + +#include "pngdebug.h" + +#ifdef __cplusplus +} +#endif + +#endif /* PNG_VERSION_INFO_ONLY */ +#endif /* PNGPRIV_H */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngread.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngread.c new file mode 100644 index 0000000000..e32f31d541 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngread.c @@ -0,0 +1,4000 @@ + +/* pngread.c - read a PNG file + * + * Last changed in libpng 1.6.1 [March 28, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file contains routines that an application calls directly to + * read a PNG file or stream. + */ + +#include "pngpriv.h" +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) +# include +#endif + +#ifdef PNG_READ_SUPPORTED + +/* Create a PNG structure for reading, and allocate any memory needed. */ +PNG_FUNCTION(png_structp,PNGAPI +png_create_read_struct,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn),PNG_ALLOCATED) +{ +#ifndef PNG_USER_MEM_SUPPORTED + png_structp png_ptr = png_create_png_struct(user_png_ver, error_ptr, + error_fn, warn_fn, NULL, NULL, NULL); +#else + return png_create_read_struct_2(user_png_ver, error_ptr, error_fn, + warn_fn, NULL, NULL, NULL); +} + +/* Alternate create PNG structure for reading, and allocate any memory + * needed. + */ +PNG_FUNCTION(png_structp,PNGAPI +png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED) +{ + png_structp png_ptr = png_create_png_struct(user_png_ver, error_ptr, + error_fn, warn_fn, mem_ptr, malloc_fn, free_fn); +#endif /* PNG_USER_MEM_SUPPORTED */ + + if (png_ptr != NULL) + { + png_ptr->mode = PNG_IS_READ_STRUCT; + + /* Added in libpng-1.6.0; this can be used to detect a read structure if + * required (it will be zero in a write structure.) + */ +# ifdef PNG_SEQUENTIAL_READ_SUPPORTED + png_ptr->IDAT_read_size = PNG_IDAT_READ_SIZE; +# endif + +# ifdef PNG_BENIGN_READ_ERRORS_SUPPORTED + png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; + + /* In stable builds only warn if an application error can be completely + * handled. + */ +# if PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC + png_ptr->flags |= PNG_FLAG_APP_WARNINGS_WARN; +# endif +# endif + + /* TODO: delay this, it can be done in png_init_io (if the app doesn't + * do it itself) avoiding setting the default function if it is not + * required. + */ + png_set_read_fn(png_ptr, NULL, NULL); + } + + return png_ptr; +} + + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the information before the actual image data. This has been + * changed in v0.90 to allow reading a file that already has the magic + * bytes read from the stream. You can tell libpng how many bytes have + * been read from the beginning of the stream (up to the maximum of 8) + * via png_set_sig_bytes(), and we will only check the remaining bytes + * here. The application can then have access to the signature bytes we + * read if it is determined that this isn't a valid PNG file. + */ +void PNGAPI +png_read_info(png_structrp png_ptr, png_inforp info_ptr) +{ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + int keep; +#endif + + png_debug(1, "in png_read_info"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* Read and check the PNG file signature. */ + png_read_sig(png_ptr, info_ptr); + + for (;;) + { + png_uint_32 length = png_read_chunk_header(png_ptr); + png_uint_32 chunk_name = png_ptr->chunk_name; + + /* IDAT logic needs to happen here to simplify getting the two flags + * right. + */ + if (chunk_name == png_IDAT) + { + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "Missing IHDR before IDAT"); + + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + !(png_ptr->mode & PNG_HAVE_PLTE)) + png_chunk_error(png_ptr, "Missing PLTE before IDAT"); + + else if (png_ptr->mode & PNG_AFTER_IDAT) + png_chunk_benign_error(png_ptr, "Too many IDATs found"); + + png_ptr->mode |= PNG_HAVE_IDAT; + } + + else if (png_ptr->mode & PNG_HAVE_IDAT) + png_ptr->mode |= PNG_AFTER_IDAT; + + /* This should be a binary subdivision search or a hash for + * matching the chunk name rather than a linear search. + */ + if (chunk_name == png_IHDR) + png_handle_IHDR(png_ptr, info_ptr, length); + + else if (chunk_name == png_IEND) + png_handle_IEND(png_ptr, info_ptr, length); + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + else if ((keep = png_chunk_unknown_handling(png_ptr, chunk_name)) != 0) + { + png_handle_unknown(png_ptr, info_ptr, length, keep); + + if (chunk_name == png_PLTE) + png_ptr->mode |= PNG_HAVE_PLTE; + + else if (chunk_name == png_IDAT) + { + png_ptr->idat_size = 0; /* It has been consumed */ + break; + } + } +#endif + else if (chunk_name == png_PLTE) + png_handle_PLTE(png_ptr, info_ptr, length); + + else if (chunk_name == png_IDAT) + { + png_ptr->idat_size = length; + break; + } + +#ifdef PNG_READ_bKGD_SUPPORTED + else if (chunk_name == png_bKGD) + png_handle_bKGD(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_cHRM_SUPPORTED + else if (chunk_name == png_cHRM) + png_handle_cHRM(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_gAMA_SUPPORTED + else if (chunk_name == png_gAMA) + png_handle_gAMA(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_hIST_SUPPORTED + else if (chunk_name == png_hIST) + png_handle_hIST(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_oFFs_SUPPORTED + else if (chunk_name == png_oFFs) + png_handle_oFFs(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_pCAL_SUPPORTED + else if (chunk_name == png_pCAL) + png_handle_pCAL(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_sCAL_SUPPORTED + else if (chunk_name == png_sCAL) + png_handle_sCAL(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_pHYs_SUPPORTED + else if (chunk_name == png_pHYs) + png_handle_pHYs(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_sBIT_SUPPORTED + else if (chunk_name == png_sBIT) + png_handle_sBIT(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_sRGB_SUPPORTED + else if (chunk_name == png_sRGB) + png_handle_sRGB(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_iCCP_SUPPORTED + else if (chunk_name == png_iCCP) + png_handle_iCCP(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_sPLT_SUPPORTED + else if (chunk_name == png_sPLT) + png_handle_sPLT(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_tEXt_SUPPORTED + else if (chunk_name == png_tEXt) + png_handle_tEXt(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_tIME_SUPPORTED + else if (chunk_name == png_tIME) + png_handle_tIME(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_tRNS_SUPPORTED + else if (chunk_name == png_tRNS) + png_handle_tRNS(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_zTXt_SUPPORTED + else if (chunk_name == png_zTXt) + png_handle_zTXt(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_iTXt_SUPPORTED + else if (chunk_name == png_iTXt) + png_handle_iTXt(png_ptr, info_ptr, length); +#endif + + else + png_handle_unknown(png_ptr, info_ptr, length, + PNG_HANDLE_CHUNK_AS_DEFAULT); + } +} +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ + +/* Optional call to update the users info_ptr structure */ +void PNGAPI +png_read_update_info(png_structrp png_ptr, png_inforp info_ptr) +{ + png_debug(1, "in png_read_update_info"); + + if (png_ptr != NULL) + { + if ((png_ptr->flags & PNG_FLAG_ROW_INIT) == 0) + { + png_read_start_row(png_ptr); + +# ifdef PNG_READ_TRANSFORMS_SUPPORTED + png_read_transform_info(png_ptr, info_ptr); +# else + PNG_UNUSED(info_ptr) +# endif + } + + /* New in 1.6.0 this avoids the bug of doing the initializations twice */ + else + png_app_error(png_ptr, + "png_read_update_info/png_start_read_image: duplicate call"); + } +} + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Initialize palette, background, etc, after transformations + * are set, but before any reading takes place. This allows + * the user to obtain a gamma-corrected palette, for example. + * If the user doesn't call this, we will do it ourselves. + */ +void PNGAPI +png_start_read_image(png_structrp png_ptr) +{ + png_debug(1, "in png_start_read_image"); + + if (png_ptr != NULL) + { + if ((png_ptr->flags & PNG_FLAG_ROW_INIT) == 0) + png_read_start_row(png_ptr); + + /* New in 1.6.0 this avoids the bug of doing the initializations twice */ + else + png_app_error(png_ptr, + "png_start_read_image/png_read_update_info: duplicate call"); + } +} +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +void PNGAPI +png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row) +{ + png_row_info row_info; + + if (png_ptr == NULL) + return; + + png_debug2(1, "in png_read_row (row %lu, pass %d)", + (unsigned long)png_ptr->row_number, png_ptr->pass); + + /* png_read_start_row sets the information (in particular iwidth) for this + * interlace pass. + */ + if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) + png_read_start_row(png_ptr); + + /* 1.5.6: row_info moved out of png_struct to a local here. */ + row_info.width = png_ptr->iwidth; /* NOTE: width of current interlaced row */ + row_info.color_type = png_ptr->color_type; + row_info.bit_depth = png_ptr->bit_depth; + row_info.channels = png_ptr->channels; + row_info.pixel_depth = png_ptr->pixel_depth; + row_info.rowbytes = PNG_ROWBYTES(row_info.pixel_depth, row_info.width); + + if (png_ptr->row_number == 0 && png_ptr->pass == 0) + { + /* Check for transforms that have been set but were defined out */ +#if defined(PNG_WRITE_INVERT_SUPPORTED) && !defined(PNG_READ_INVERT_SUPPORTED) + if (png_ptr->transformations & PNG_INVERT_MONO) + png_warning(png_ptr, "PNG_READ_INVERT_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED) + if (png_ptr->transformations & PNG_FILLER) + png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \ + !defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED) + if (png_ptr->transformations & PNG_PACK) + png_warning(png_ptr, "PNG_READ_PACK_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_SHIFT_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) + if (png_ptr->transformations & PNG_SHIFT) + png_warning(png_ptr, "PNG_READ_SHIFT_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_BGR_SUPPORTED) && !defined(PNG_READ_BGR_SUPPORTED) + if (png_ptr->transformations & PNG_BGR) + png_warning(png_ptr, "PNG_READ_BGR_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_SWAP_SUPPORTED) && !defined(PNG_READ_SWAP_SUPPORTED) + if (png_ptr->transformations & PNG_SWAP_BYTES) + png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined"); +#endif + } + +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* If interlaced and we do not need a new row, combine row and return. + * Notice that the pixels we have from previous rows have been transformed + * already; we can only combine like with like (transformed or + * untransformed) and, because of the libpng API for interlaced images, this + * means we must transform before de-interlacing. + */ + if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) + { + switch (png_ptr->pass) + { + case 0: + if (png_ptr->row_number & 0x07) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + png_read_finish_row(png_ptr); + return; + } + break; + + case 1: + if ((png_ptr->row_number & 0x07) || png_ptr->width < 5) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + png_read_finish_row(png_ptr); + return; + } + break; + + case 2: + if ((png_ptr->row_number & 0x07) != 4) + { + if (dsp_row != NULL && (png_ptr->row_number & 4)) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + png_read_finish_row(png_ptr); + return; + } + break; + + case 3: + if ((png_ptr->row_number & 3) || png_ptr->width < 3) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + png_read_finish_row(png_ptr); + return; + } + break; + + case 4: + if ((png_ptr->row_number & 3) != 2) + { + if (dsp_row != NULL && (png_ptr->row_number & 2)) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + png_read_finish_row(png_ptr); + return; + } + break; + + case 5: + if ((png_ptr->row_number & 1) || png_ptr->width < 2) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + png_read_finish_row(png_ptr); + return; + } + break; + + default: + case 6: + if (!(png_ptr->row_number & 1)) + { + png_read_finish_row(png_ptr); + return; + } + break; + } + } +#endif + + if (!(png_ptr->mode & PNG_HAVE_IDAT)) + png_error(png_ptr, "Invalid attempt to read row data"); + + /* Fill the row with IDAT data: */ + png_read_IDAT_data(png_ptr, png_ptr->row_buf, row_info.rowbytes + 1); + + if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE) + { + if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST) + png_read_filter_row(png_ptr, &row_info, png_ptr->row_buf + 1, + png_ptr->prev_row + 1, png_ptr->row_buf[0]); + else + png_error(png_ptr, "bad adaptive filter value"); + } + + /* libpng 1.5.6: the following line was copying png_ptr->rowbytes before + * 1.5.6, while the buffer really is this big in current versions of libpng + * it may not be in the future, so this was changed just to copy the + * interlaced count: + */ + memcpy(png_ptr->prev_row, png_ptr->row_buf, row_info.rowbytes + 1); + +#ifdef PNG_MNG_FEATURES_SUPPORTED + if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) + { + /* Intrapixel differencing */ + png_do_read_intrapixel(&row_info, png_ptr->row_buf + 1); + } +#endif + + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED + if (png_ptr->transformations) + png_do_read_transformations(png_ptr, &row_info); +#endif + + /* The transformed pixel depth should match the depth now in row_info. */ + if (png_ptr->transformed_pixel_depth == 0) + { + png_ptr->transformed_pixel_depth = row_info.pixel_depth; + if (row_info.pixel_depth > png_ptr->maximum_pixel_depth) + png_error(png_ptr, "sequential row overflow"); + } + + else if (png_ptr->transformed_pixel_depth != row_info.pixel_depth) + png_error(png_ptr, "internal sequential row size calculation error"); + +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* Blow up interlaced rows to full size */ + if (png_ptr->interlaced && + (png_ptr->transformations & PNG_INTERLACE)) + { + if (png_ptr->pass < 6) + png_do_read_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass, + png_ptr->transformations); + + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + if (row != NULL) + png_combine_row(png_ptr, row, 0/*row*/); + } + + else +#endif + { + if (row != NULL) + png_combine_row(png_ptr, row, -1/*ignored*/); + + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, -1/*ignored*/); + } + png_read_finish_row(png_ptr); + + if (png_ptr->read_row_fn != NULL) + (*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); + +} +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read one or more rows of image data. If the image is interlaced, + * and png_set_interlace_handling() has been called, the rows need to + * contain the contents of the rows from the previous pass. If the + * image has alpha or transparency, and png_handle_alpha()[*] has been + * called, the rows contents must be initialized to the contents of the + * screen. + * + * "row" holds the actual image, and pixels are placed in it + * as they arrive. If the image is displayed after each pass, it will + * appear to "sparkle" in. "display_row" can be used to display a + * "chunky" progressive image, with finer detail added as it becomes + * available. If you do not want this "chunky" display, you may pass + * NULL for display_row. If you do not want the sparkle display, and + * you have not called png_handle_alpha(), you may pass NULL for rows. + * If you have called png_handle_alpha(), and the image has either an + * alpha channel or a transparency chunk, you must provide a buffer for + * rows. In this case, you do not have to provide a display_row buffer + * also, but you may. If the image is not interlaced, or if you have + * not called png_set_interlace_handling(), the display_row buffer will + * be ignored, so pass NULL to it. + * + * [*] png_handle_alpha() does not exist yet, as of this version of libpng + */ + +void PNGAPI +png_read_rows(png_structrp png_ptr, png_bytepp row, + png_bytepp display_row, png_uint_32 num_rows) +{ + png_uint_32 i; + png_bytepp rp; + png_bytepp dp; + + png_debug(1, "in png_read_rows"); + + if (png_ptr == NULL) + return; + + rp = row; + dp = display_row; + if (rp != NULL && dp != NULL) + for (i = 0; i < num_rows; i++) + { + png_bytep rptr = *rp++; + png_bytep dptr = *dp++; + + png_read_row(png_ptr, rptr, dptr); + } + + else if (rp != NULL) + for (i = 0; i < num_rows; i++) + { + png_bytep rptr = *rp; + png_read_row(png_ptr, rptr, NULL); + rp++; + } + + else if (dp != NULL) + for (i = 0; i < num_rows; i++) + { + png_bytep dptr = *dp; + png_read_row(png_ptr, NULL, dptr); + dp++; + } +} +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the entire image. If the image has an alpha channel or a tRNS + * chunk, and you have called png_handle_alpha()[*], you will need to + * initialize the image to the current image that PNG will be overlaying. + * We set the num_rows again here, in case it was incorrectly set in + * png_read_start_row() by a call to png_read_update_info() or + * png_start_read_image() if png_set_interlace_handling() wasn't called + * prior to either of these functions like it should have been. You can + * only call this function once. If you desire to have an image for + * each pass of a interlaced image, use png_read_rows() instead. + * + * [*] png_handle_alpha() does not exist yet, as of this version of libpng + */ +void PNGAPI +png_read_image(png_structrp png_ptr, png_bytepp image) +{ + png_uint_32 i, image_height; + int pass, j; + png_bytepp rp; + + png_debug(1, "in png_read_image"); + + if (png_ptr == NULL) + return; + +#ifdef PNG_READ_INTERLACING_SUPPORTED + if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) + { + pass = png_set_interlace_handling(png_ptr); + /* And make sure transforms are initialized. */ + png_start_read_image(png_ptr); + } + else + { + if (png_ptr->interlaced && !(png_ptr->transformations & PNG_INTERLACE)) + { + /* Caller called png_start_read_image or png_read_update_info without + * first turning on the PNG_INTERLACE transform. We can fix this here, + * but the caller should do it! + */ + png_warning(png_ptr, "Interlace handling should be turned on when " + "using png_read_image"); + /* Make sure this is set correctly */ + png_ptr->num_rows = png_ptr->height; + } + + /* Obtain the pass number, which also turns on the PNG_INTERLACE flag in + * the above error case. + */ + pass = png_set_interlace_handling(png_ptr); + } +#else + if (png_ptr->interlaced) + png_error(png_ptr, + "Cannot read interlaced image -- interlace handler disabled"); + + pass = 1; +#endif + + image_height=png_ptr->height; + + for (j = 0; j < pass; j++) + { + rp = image; + for (i = 0; i < image_height; i++) + { + png_read_row(png_ptr, *rp, NULL); + rp++; + } + } +} +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the end of the PNG file. Will not read past the end of the + * file, will verify the end is accurate, and will read any comments + * or time information at the end of the file, if info is not NULL. + */ +void PNGAPI +png_read_end(png_structrp png_ptr, png_inforp info_ptr) +{ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + int keep; +#endif + + png_debug(1, "in png_read_end"); + + if (png_ptr == NULL) + return; + + /* If png_read_end is called in the middle of reading the rows there may + * still be pending IDAT data and an owned zstream. Deal with this here. + */ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + if (!png_chunk_unknown_handling(png_ptr, png_IDAT)) +#endif + png_read_finish_IDAT(png_ptr); + +#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED + /* Report invalid palette index; added at libng-1.5.10 */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + png_ptr->num_palette_max > png_ptr->num_palette) + png_benign_error(png_ptr, "Read palette index exceeding num_palette"); +#endif + + do + { + png_uint_32 length = png_read_chunk_header(png_ptr); + png_uint_32 chunk_name = png_ptr->chunk_name; + + if (chunk_name == png_IHDR) + png_handle_IHDR(png_ptr, info_ptr, length); + + else if (chunk_name == png_IEND) + png_handle_IEND(png_ptr, info_ptr, length); + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + else if ((keep = png_chunk_unknown_handling(png_ptr, chunk_name)) != 0) + { + if (chunk_name == png_IDAT) + { + if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT)) + png_benign_error(png_ptr, "Too many IDATs found"); + } + png_handle_unknown(png_ptr, info_ptr, length, keep); + if (chunk_name == png_PLTE) + png_ptr->mode |= PNG_HAVE_PLTE; + } +#endif + + else if (chunk_name == png_IDAT) + { + /* Zero length IDATs are legal after the last IDAT has been + * read, but not after other chunks have been read. + */ + if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT)) + png_benign_error(png_ptr, "Too many IDATs found"); + + png_crc_finish(png_ptr, length); + } + else if (chunk_name == png_PLTE) + png_handle_PLTE(png_ptr, info_ptr, length); + +#ifdef PNG_READ_bKGD_SUPPORTED + else if (chunk_name == png_bKGD) + png_handle_bKGD(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_cHRM_SUPPORTED + else if (chunk_name == png_cHRM) + png_handle_cHRM(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_gAMA_SUPPORTED + else if (chunk_name == png_gAMA) + png_handle_gAMA(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_hIST_SUPPORTED + else if (chunk_name == png_hIST) + png_handle_hIST(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_oFFs_SUPPORTED + else if (chunk_name == png_oFFs) + png_handle_oFFs(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_pCAL_SUPPORTED + else if (chunk_name == png_pCAL) + png_handle_pCAL(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_sCAL_SUPPORTED + else if (chunk_name == png_sCAL) + png_handle_sCAL(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_pHYs_SUPPORTED + else if (chunk_name == png_pHYs) + png_handle_pHYs(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_sBIT_SUPPORTED + else if (chunk_name == png_sBIT) + png_handle_sBIT(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_sRGB_SUPPORTED + else if (chunk_name == png_sRGB) + png_handle_sRGB(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_iCCP_SUPPORTED + else if (chunk_name == png_iCCP) + png_handle_iCCP(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_sPLT_SUPPORTED + else if (chunk_name == png_sPLT) + png_handle_sPLT(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_tEXt_SUPPORTED + else if (chunk_name == png_tEXt) + png_handle_tEXt(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_tIME_SUPPORTED + else if (chunk_name == png_tIME) + png_handle_tIME(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_tRNS_SUPPORTED + else if (chunk_name == png_tRNS) + png_handle_tRNS(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_zTXt_SUPPORTED + else if (chunk_name == png_zTXt) + png_handle_zTXt(png_ptr, info_ptr, length); +#endif + +#ifdef PNG_READ_iTXt_SUPPORTED + else if (chunk_name == png_iTXt) + png_handle_iTXt(png_ptr, info_ptr, length); +#endif + + else + png_handle_unknown(png_ptr, info_ptr, length, + PNG_HANDLE_CHUNK_AS_DEFAULT); + } while (!(png_ptr->mode & PNG_HAVE_IEND)); +} +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ + +/* Free all memory used in the read struct */ +static void +png_read_destroy(png_structrp png_ptr) +{ + png_debug(1, "in png_read_destroy"); + +#ifdef PNG_READ_GAMMA_SUPPORTED + png_destroy_gamma_table(png_ptr); +#endif + + png_free(png_ptr, png_ptr->big_row_buf); + png_free(png_ptr, png_ptr->big_prev_row); + png_free(png_ptr, png_ptr->read_buffer); + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + png_free(png_ptr, png_ptr->palette_lookup); + png_free(png_ptr, png_ptr->quantize_index); +#endif + + if (png_ptr->free_me & PNG_FREE_PLTE) + png_zfree(png_ptr, png_ptr->palette); + png_ptr->free_me &= ~PNG_FREE_PLTE; + +#if defined(PNG_tRNS_SUPPORTED) || \ + defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + if (png_ptr->free_me & PNG_FREE_TRNS) + png_free(png_ptr, png_ptr->trans_alpha); + png_ptr->free_me &= ~PNG_FREE_TRNS; +#endif + + inflateEnd(&png_ptr->zstream); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + png_free(png_ptr, png_ptr->save_buffer); +#endif + +#if defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) &&\ + defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) + png_free(png_ptr, png_ptr->unknown_chunk.data); +#endif + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + png_free(png_ptr, png_ptr->chunk_list); +#endif + + /* NOTE: the 'setjmp' buffer may still be allocated and the memory and error + * callbacks are still set at this point. They are required to complete the + * destruction of the png_struct itself. + */ +} + +/* Free all memory used by the read */ +void PNGAPI +png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, + png_infopp end_info_ptr_ptr) +{ + png_structrp png_ptr = NULL; + + png_debug(1, "in png_destroy_read_struct"); + + if (png_ptr_ptr != NULL) + png_ptr = *png_ptr_ptr; + + if (png_ptr == NULL) + return; + + /* libpng 1.6.0: use the API to destroy info structs to ensure consistent + * behavior. Prior to 1.6.0 libpng did extra 'info' destruction in this API. + * The extra was, apparently, unnecessary yet this hides memory leak bugs. + */ + png_destroy_info_struct(png_ptr, end_info_ptr_ptr); + png_destroy_info_struct(png_ptr, info_ptr_ptr); + + *png_ptr_ptr = NULL; + png_read_destroy(png_ptr); + png_destroy_png_struct(png_ptr); +} + +void PNGAPI +png_set_read_status_fn(png_structrp png_ptr, png_read_status_ptr read_row_fn) +{ + if (png_ptr == NULL) + return; + + png_ptr->read_row_fn = read_row_fn; +} + + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_INFO_IMAGE_SUPPORTED +void PNGAPI +png_read_png(png_structrp png_ptr, png_inforp info_ptr, + int transforms, + voidp params) +{ + int row; + + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* png_read_info() gives us all of the information from the + * PNG file before the first IDAT (image data chunk). + */ + png_read_info(png_ptr, info_ptr); + if (info_ptr->height > PNG_UINT_32_MAX/(sizeof (png_bytep))) + png_error(png_ptr, "Image is too high to process with png_read_png()"); + + /* -------------- image transformations start here ------------------- */ + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + /* Tell libpng to strip 16-bit/color files down to 8 bits per color. + */ + if (transforms & PNG_TRANSFORM_SCALE_16) + { + /* Added at libpng-1.5.4. "strip_16" produces the same result that it + * did in earlier versions, while "scale_16" is now more accurate. + */ + png_set_scale_16(png_ptr); + } +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + /* If both SCALE and STRIP are required pngrtran will effectively cancel the + * latter by doing SCALE first. This is ok and allows apps not to check for + * which is supported to get the right answer. + */ + if (transforms & PNG_TRANSFORM_STRIP_16) + png_set_strip_16(png_ptr); +#endif + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + /* Strip alpha bytes from the input data without combining with + * the background (not recommended). + */ + if (transforms & PNG_TRANSFORM_STRIP_ALPHA) + png_set_strip_alpha(png_ptr); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) && !defined(PNG_READ_EXPAND_SUPPORTED) + /* Extract multiple pixels with bit depths of 1, 2, or 4 from a single + * byte into separate bytes (useful for paletted and grayscale images). + */ + if (transforms & PNG_TRANSFORM_PACKING) + png_set_packing(png_ptr); +#endif + +#ifdef PNG_READ_PACKSWAP_SUPPORTED + /* Change the order of packed pixels to least significant bit first + * (not useful if you are using png_set_packing). + */ + if (transforms & PNG_TRANSFORM_PACKSWAP) + png_set_packswap(png_ptr); +#endif + +#ifdef PNG_READ_EXPAND_SUPPORTED + /* Expand paletted colors into true RGB triplets + * Expand grayscale images to full 8 bits from 1, 2, or 4 bits/pixel + * Expand paletted or RGB images with transparency to full alpha + * channels so the data will be available as RGBA quartets. + */ + if (transforms & PNG_TRANSFORM_EXPAND) + if ((png_ptr->bit_depth < 8) || + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) || + (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))) + png_set_expand(png_ptr); +#endif + + /* We don't handle background color or gamma transformation or quantizing. + */ + +#ifdef PNG_READ_INVERT_SUPPORTED + /* Invert monochrome files to have 0 as white and 1 as black + */ + if (transforms & PNG_TRANSFORM_INVERT_MONO) + png_set_invert_mono(png_ptr); +#endif + +#ifdef PNG_READ_SHIFT_SUPPORTED + /* If you want to shift the pixel values from the range [0,255] or + * [0,65535] to the original [0,7] or [0,31], or whatever range the + * colors were originally in: + */ + if ((transforms & PNG_TRANSFORM_SHIFT) + && png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT)) + { + png_color_8p sig_bit; + + png_get_sBIT(png_ptr, info_ptr, &sig_bit); + png_set_shift(png_ptr, sig_bit); + } +#endif + +#ifdef PNG_READ_BGR_SUPPORTED + /* Flip the RGB pixels to BGR (or RGBA to BGRA) */ + if (transforms & PNG_TRANSFORM_BGR) + png_set_bgr(png_ptr); +#endif + +#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED + /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ + if (transforms & PNG_TRANSFORM_SWAP_ALPHA) + png_set_swap_alpha(png_ptr); +#endif + +#ifdef PNG_READ_SWAP_SUPPORTED + /* Swap bytes of 16-bit files to least significant byte first */ + if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) + png_set_swap(png_ptr); +#endif + +/* Added at libpng-1.2.41 */ +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED + /* Invert the alpha channel from opacity to transparency */ + if (transforms & PNG_TRANSFORM_INVERT_ALPHA) + png_set_invert_alpha(png_ptr); +#endif + +/* Added at libpng-1.2.41 */ +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + /* Expand grayscale image to RGB */ + if (transforms & PNG_TRANSFORM_GRAY_TO_RGB) + png_set_gray_to_rgb(png_ptr); +#endif + +/* Added at libpng-1.5.4 */ +#ifdef PNG_READ_EXPAND_16_SUPPORTED + if (transforms & PNG_TRANSFORM_EXPAND_16) + png_set_expand_16(png_ptr); +#endif + + /* We don't handle adding filler bytes */ + + /* We use png_read_image and rely on that for interlace handling, but we also + * call png_read_update_info therefore must turn on interlace handling now: + */ + (void)png_set_interlace_handling(png_ptr); + + /* Optional call to gamma correct and add the background to the palette + * and update info structure. REQUIRED if you are expecting libpng to + * update the palette for you (i.e., you selected such a transform above). + */ + png_read_update_info(png_ptr, info_ptr); + + /* -------------- image transformations end here ------------------- */ + + png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); + if (info_ptr->row_pointers == NULL) + { + png_uint_32 iptr; + + info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr, + info_ptr->height * (sizeof (png_bytep))); + for (iptr=0; iptrheight; iptr++) + info_ptr->row_pointers[iptr] = NULL; + + info_ptr->free_me |= PNG_FREE_ROWS; + + for (row = 0; row < (int)info_ptr->height; row++) + info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr, + png_get_rowbytes(png_ptr, info_ptr)); + } + + png_read_image(png_ptr, info_ptr->row_pointers); + info_ptr->valid |= PNG_INFO_IDAT; + + /* Read rest of file, and get additional chunks in info_ptr - REQUIRED */ + png_read_end(png_ptr, info_ptr); + + PNG_UNUSED(transforms) /* Quiet compiler warnings */ + PNG_UNUSED(params) + +} +#endif /* PNG_INFO_IMAGE_SUPPORTED */ +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ + +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +/* SIMPLIFIED READ + * + * This code currently relies on the sequential reader, though it could easily + * be made to work with the progressive one. + */ +/* Arguments to png_image_finish_read: */ + +/* Encoding of PNG data (used by the color-map code) */ +/* TODO: change these, dang, ANSI-C reserves the 'E' namespace. */ +# define E_NOTSET 0 /* File encoding not yet known */ +# define E_sRGB 1 /* 8-bit encoded to sRGB gamma */ +# define E_LINEAR 2 /* 16-bit linear: not encoded, NOT pre-multiplied! */ +# define E_FILE 3 /* 8-bit encoded to file gamma, not sRGB or linear */ +# define E_LINEAR8 4 /* 8-bit linear: only from a file value */ + +/* Color-map processing: after libpng has run on the PNG image further + * processing may be needed to conver the data to color-map indicies. + */ +#define PNG_CMAP_NONE 0 +#define PNG_CMAP_GA 1 /* Process GA data to a color-map with alpha */ +#define PNG_CMAP_TRANS 2 /* Process GA data to a background index */ +#define PNG_CMAP_RGB 3 /* Process RGB data */ +#define PNG_CMAP_RGB_ALPHA 4 /* Process RGBA data */ + +/* The following document where the background is for each processing case. */ +#define PNG_CMAP_NONE_BACKGROUND 256 +#define PNG_CMAP_GA_BACKGROUND 231 +#define PNG_CMAP_TRANS_BACKGROUND 254 +#define PNG_CMAP_RGB_BACKGROUND 256 +#define PNG_CMAP_RGB_ALPHA_BACKGROUND 216 + +typedef struct +{ + /* Arguments: */ + png_imagep image; + png_voidp buffer; + png_int_32 row_stride; + png_voidp colormap; + png_const_colorp background; + /* Local variables: */ + png_voidp local_row; + png_voidp first_row; + ptrdiff_t row_bytes; /* step between rows */ + int file_encoding; /* E_ values above */ + png_fixed_point gamma_to_linear; /* For E_FILE, reciprocal of gamma */ + int colormap_processing; /* PNG_CMAP_ values above */ +} png_image_read_control; + +/* Do all the *safe* initialization - 'safe' means that png_error won't be + * called, so setting up the jmp_buf is not required. This means that anything + * called from here must *not* call png_malloc - it has to call png_malloc_warn + * instead so that control is returned safely back to this routine. + */ +static int +png_image_read_init(png_imagep image) +{ + if (image->opaque == NULL) + { + png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, image, + png_safe_error, png_safe_warning); + + /* And set the rest of the structure to NULL to ensure that the various + * fields are consistent. + */ + memset(image, 0, (sizeof *image)); + image->version = PNG_IMAGE_VERSION; + + if (png_ptr != NULL) + { + png_infop info_ptr = png_create_info_struct(png_ptr); + + if (info_ptr != NULL) + { + png_controlp control = png_voidcast(png_controlp, + png_malloc_warn(png_ptr, (sizeof *control))); + + if (control != NULL) + { + memset(control, 0, (sizeof *control)); + + control->png_ptr = png_ptr; + control->info_ptr = info_ptr; + control->for_write = 0; + + image->opaque = control; + return 1; + } + + /* Error clean up */ + png_destroy_info_struct(png_ptr, &info_ptr); + } + + png_destroy_read_struct(&png_ptr, NULL, NULL); + } + + return png_image_error(image, "png_image_read: out of memory"); + } + + return png_image_error(image, "png_image_read: opaque pointer not NULL"); +} + +/* Utility to find the base format of a PNG file from a png_struct. */ +static png_uint_32 +png_image_format(png_structrp png_ptr) +{ + png_uint_32 format = 0; + + if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) + format |= PNG_FORMAT_FLAG_COLOR; + + if (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) + format |= PNG_FORMAT_FLAG_ALPHA; + + /* Use png_ptr here, not info_ptr, because by examination png_handle_tRNS + * sets the png_struct fields; that's all we are interested in here. The + * precise interaction with an app call to png_set_tRNS and PNG file reading + * is unclear. + */ + else if (png_ptr->num_trans > 0) + format |= PNG_FORMAT_FLAG_ALPHA; + + if (png_ptr->bit_depth == 16) + format |= PNG_FORMAT_FLAG_LINEAR; + + if (png_ptr->color_type & PNG_COLOR_MASK_PALETTE) + format |= PNG_FORMAT_FLAG_COLORMAP; + + return format; +} + +/* Is the given gamma significantly different from sRGB? The test is the same + * one used in pngrtran.c when deciding whether to do gamma correction. The + * arithmetic optimizes the division by using the fact that the inverse of the + * file sRGB gamma is 2.2 + */ +static int +png_gamma_not_sRGB(png_fixed_point g) +{ + if (g < PNG_FP_1) + { + /* An uninitialized gamma is assumed to be sRGB for the simplified API. */ + if (g == 0) + return 0; + + return png_gamma_significant((g * 11 + 2)/5 /* i.e. *2.2, rounded */); + } + + return 1; +} + +/* Do the main body of a 'png_image_begin_read' function; read the PNG file + * header and fill in all the information. This is executed in a safe context, + * unlike the init routine above. + */ +static int +png_image_read_header(png_voidp argument) +{ + png_imagep image = png_voidcast(png_imagep, argument); + png_structrp png_ptr = image->opaque->png_ptr; + png_inforp info_ptr = image->opaque->info_ptr; + + png_set_benign_errors(png_ptr, 1/*warn*/); + png_read_info(png_ptr, info_ptr); + + /* Do this the fast way; just read directly out of png_struct. */ + image->width = png_ptr->width; + image->height = png_ptr->height; + + { + png_uint_32 format = png_image_format(png_ptr); + + image->format = format; + +#ifdef PNG_COLORSPACE_SUPPORTED + /* Does the colorspace match sRGB? If there is no color endpoint + * (colorant) information assume yes, otherwise require the + * 'ENDPOINTS_MATCHE_sRGB' colorspace flag to have been set. If the + * colorspace has been determined to be invalid ignore it. + */ + if ((format & PNG_FORMAT_FLAG_COLOR) != 0 && ((png_ptr->colorspace.flags + & (PNG_COLORSPACE_HAVE_ENDPOINTS|PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB| + PNG_COLORSPACE_INVALID)) == PNG_COLORSPACE_HAVE_ENDPOINTS)) + image->flags |= PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB; +#endif + } + + /* We need the maximum number of entries regardless of the format the + * application sets here. + */ + { + png_uint_32 cmap_entries; + + switch (png_ptr->color_type) + { + case PNG_COLOR_TYPE_GRAY: + cmap_entries = 1U << png_ptr->bit_depth; + break; + + case PNG_COLOR_TYPE_PALETTE: + cmap_entries = png_ptr->num_palette; + break; + + default: + cmap_entries = 256; + break; + } + + if (cmap_entries > 256) + cmap_entries = 256; + + image->colormap_entries = cmap_entries; + } + + return 1; +} + +#ifdef PNG_STDIO_SUPPORTED +int PNGAPI +png_image_begin_read_from_stdio(png_imagep image, FILE* file) +{ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + if (file != NULL) + { + if (png_image_read_init(image)) + { + /* This is slightly evil, but png_init_io doesn't do anything other + * than this and we haven't changed the standard IO functions so + * this saves a 'safe' function. + */ + image->opaque->png_ptr->io_ptr = file; + return png_safe_execute(image, png_image_read_header, image); + } + } + + else + return png_image_error(image, + "png_image_begin_read_from_stdio: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_begin_read_from_stdio: incorrect PNG_IMAGE_VERSION"); + + return 0; +} + +int PNGAPI +png_image_begin_read_from_file(png_imagep image, const char *file_name) +{ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + if (file_name != NULL) + { + FILE *fp = fopen(file_name, "rb"); + + if (fp != NULL) + { + if (png_image_read_init(image)) + { + image->opaque->png_ptr->io_ptr = fp; + image->opaque->owned_file = 1; + return png_safe_execute(image, png_image_read_header, image); + } + + /* Clean up: just the opened file. */ + (void)fclose(fp); + } + + else + return png_image_error(image, strerror(errno)); + } + + else + return png_image_error(image, + "png_image_begin_read_from_file: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_begin_read_from_file: incorrect PNG_IMAGE_VERSION"); + + return 0; +} +#endif /* PNG_STDIO_SUPPORTED */ + +static void PNGCBAPI +png_image_memory_read(png_structp png_ptr, png_bytep out, png_size_t need) +{ + if (png_ptr != NULL) + { + png_imagep image = png_voidcast(png_imagep, png_ptr->io_ptr); + if (image != NULL) + { + png_controlp cp = image->opaque; + if (cp != NULL) + { + png_const_bytep memory = cp->memory; + png_size_t size = cp->size; + + if (memory != NULL && size >= need) + { + memcpy(out, memory, need); + cp->memory = memory + need; + cp->size = size - need; + return; + } + + png_error(png_ptr, "read beyond end of data"); + } + } + + png_error(png_ptr, "invalid memory read"); + } +} + +int PNGAPI png_image_begin_read_from_memory(png_imagep image, + png_const_voidp memory, png_size_t size) +{ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + if (memory != NULL && size > 0) + { + if (png_image_read_init(image)) + { + /* Now set the IO functions to read from the memory buffer and + * store it into io_ptr. Again do this in-place to avoid calling a + * libpng function that requires error handling. + */ + image->opaque->memory = png_voidcast(png_const_bytep, memory); + image->opaque->size = size; + image->opaque->png_ptr->io_ptr = image; + image->opaque->png_ptr->read_data_fn = png_image_memory_read; + + return png_safe_execute(image, png_image_read_header, image); + } + } + + else + return png_image_error(image, + "png_image_begin_read_from_memory: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_begin_read_from_memory: incorrect PNG_IMAGE_VERSION"); + + return 0; +} + +/* Utility function to skip chunks that are not used by the simplified image + * read functions and an appropriate macro to call it. + */ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +static void +png_image_skip_unused_chunks(png_structrp png_ptr) +{ + /* Prepare the reader to ignore all recognized chunks whose data will not + * be used, i.e., all chunks recognized by libpng except for those + * involved in basic image reading: + * + * IHDR, PLTE, IDAT, IEND + * + * Or image data handling: + * + * tRNS, bKGD, gAMA, cHRM, sRGB, iCCP and sBIT. + * + * This provides a small performance improvement and eliminates any + * potential vulnerability to security problems in the unused chunks. + */ + { + static PNG_CONST png_byte chunks_to_process[] = { + 98, 75, 71, 68, '\0', /* bKGD */ + 99, 72, 82, 77, '\0', /* cHRM */ + 103, 65, 77, 65, '\0', /* gAMA */ + 105, 67, 67, 80, '\0', /* iCCP */ + 115, 66, 73, 84, '\0', /* sBIT */ + 115, 82, 71, 66, '\0', /* sRGB */ + }; + + /* Ignore unknown chunks and all other chunks except for the + * IHDR, PLTE, tRNS, IDAT, and IEND chunks. + */ + png_set_keep_unknown_chunks(png_ptr, PNG_HANDLE_CHUNK_NEVER, + NULL, -1); + + /* But do not ignore image data handling chunks */ + png_set_keep_unknown_chunks(png_ptr, PNG_HANDLE_CHUNK_AS_DEFAULT, + chunks_to_process, (sizeof chunks_to_process)/5); + } +} + +# define PNG_SKIP_CHUNKS(p) png_image_skip_unused_chunks(p) +#else +# define PNG_SKIP_CHUNKS(p) ((void)0) +#endif /* PNG_HANDLE_AS_UNKNOWN_SUPPORTED */ + +/* The following macro gives the exact rounded answer for all values in the + * range 0..255 (it actually divides by 51.2, but the rounding still generates + * the correct numbers 0..5 + */ +#define PNG_DIV51(v8) (((v8) * 5 + 130) >> 8) + +/* Utility functions to make particular color-maps */ +static void +set_file_encoding(png_image_read_control *display) +{ + png_fixed_point g = display->image->opaque->png_ptr->colorspace.gamma; + if (png_gamma_significant(g)) + { + if (png_gamma_not_sRGB(g)) + { + display->file_encoding = E_FILE; + display->gamma_to_linear = png_reciprocal(g); + } + + else + display->file_encoding = E_sRGB; + } + + else + display->file_encoding = E_LINEAR8; +} + +static unsigned int +decode_gamma(png_image_read_control *display, png_uint_32 value, int encoding) +{ + if (encoding == E_FILE) /* double check */ + encoding = display->file_encoding; + + if (encoding == E_NOTSET) /* must be the file encoding */ + { + set_file_encoding(display); + encoding = display->file_encoding; + } + + switch (encoding) + { + case E_FILE: + value = png_gamma_16bit_correct(value*257, display->gamma_to_linear); + break; + + case E_sRGB: + value = png_sRGB_table[value]; + break; + + case E_LINEAR: + break; + + case E_LINEAR8: + value *= 257; + break; + + default: + png_error(display->image->opaque->png_ptr, + "unexpected encoding (internal error)"); + break; + } + + return value; +} + +static png_uint_32 +png_colormap_compose(png_image_read_control *display, + png_uint_32 foreground, int foreground_encoding, png_uint_32 alpha, + png_uint_32 background, int encoding) +{ + /* The file value is composed on the background, the background has the given + * encoding and so does the result, the file is encoded with E_FILE and the + * file and alpha are 8-bit values. The (output) encoding will always be + * E_LINEAR or E_sRGB. + */ + png_uint_32 f = decode_gamma(display, foreground, foreground_encoding); + png_uint_32 b = decode_gamma(display, background, encoding); + + /* The alpha is always an 8-bit value (it comes from the palette), the value + * scaled by 255 is what PNG_sRGB_FROM_LINEAR requires. + */ + f = f * alpha + b * (255-alpha); + + if (encoding == E_LINEAR) + { + /* Scale to 65535; divide by 255, approximately (in fact this is extremely + * accurate, it divides by 255.00000005937181414556, with no overflow.) + */ + f *= 257; /* Now scaled by 65535 */ + f += f >> 16; + f = (f+32768) >> 16; + } + + else /* E_sRGB */ + f = PNG_sRGB_FROM_LINEAR(f); + + return f; +} + +/* NOTE: E_LINEAR values to this routine must be 16-bit, but E_FILE values must + * be 8-bit. + */ +static void +png_create_colormap_entry(png_image_read_control *display, + png_uint_32 ip, png_uint_32 red, png_uint_32 green, png_uint_32 blue, + png_uint_32 alpha, int encoding) +{ + png_imagep image = display->image; + const int output_encoding = (image->format & PNG_FORMAT_FLAG_LINEAR) ? + E_LINEAR : E_sRGB; + const int convert_to_Y = (image->format & PNG_FORMAT_FLAG_COLOR) == 0 && + (red != green || green != blue); + + if (ip > 255) + png_error(image->opaque->png_ptr, "color-map index out of range"); + + /* Update the cache with whether the file gamma is significantly different + * from sRGB. + */ + if (encoding == E_FILE) + { + if (display->file_encoding == E_NOTSET) + set_file_encoding(display); + + /* Note that the cached value may be E_FILE too, but if it is then the + * gamma_to_linear member has been set. + */ + encoding = display->file_encoding; + } + + if (encoding == E_FILE) + { + png_fixed_point g = display->gamma_to_linear; + + red = png_gamma_16bit_correct(red*257, g); + green = png_gamma_16bit_correct(green*257, g); + blue = png_gamma_16bit_correct(blue*257, g); + + if (convert_to_Y || output_encoding == E_LINEAR) + { + alpha *= 257; + encoding = E_LINEAR; + } + + else + { + red = PNG_sRGB_FROM_LINEAR(red * 255); + green = PNG_sRGB_FROM_LINEAR(green * 255); + blue = PNG_sRGB_FROM_LINEAR(blue * 255); + encoding = E_sRGB; + } + } + + else if (encoding == E_LINEAR8) + { + /* This encoding occurs quite frequently in test cases because PngSuite + * includes a gAMA 1.0 chunk with most images. + */ + red *= 257; + green *= 257; + blue *= 257; + alpha *= 257; + encoding = E_LINEAR; + } + + else if (encoding == E_sRGB && (convert_to_Y || output_encoding == E_LINEAR)) + { + /* The values are 8-bit sRGB values, but must be converted to 16-bit + * linear. + */ + red = png_sRGB_table[red]; + green = png_sRGB_table[green]; + blue = png_sRGB_table[blue]; + alpha *= 257; + encoding = E_LINEAR; + } + + /* This is set if the color isn't gray but the output is. */ + if (encoding == E_LINEAR) + { + if (convert_to_Y) + { + /* NOTE: these values are copied from png_do_rgb_to_gray */ + png_uint_32 y = (png_uint_32)6968 * red + (png_uint_32)23434 * green + + (png_uint_32)2366 * blue; + + if (output_encoding == E_LINEAR) + y = (y + 16384) >> 15; + + else + { + /* y is scaled by 32768, we need it scaled by 255: */ + y = (y + 128) >> 8; + y *= 255; + y = PNG_sRGB_FROM_LINEAR((y + 64) >> 7); + encoding = E_sRGB; + } + + blue = red = green = y; + } + + else if (output_encoding == E_sRGB) + { + red = PNG_sRGB_FROM_LINEAR(red * 255); + green = PNG_sRGB_FROM_LINEAR(green * 255); + blue = PNG_sRGB_FROM_LINEAR(blue * 255); + alpha = PNG_DIV257(alpha); + encoding = E_sRGB; + } + } + + if (encoding != output_encoding) + png_error(image->opaque->png_ptr, "bad encoding (internal error)"); + + /* Store the value. */ + { +# ifdef PNG_FORMAT_BGR_SUPPORTED + const int afirst = (image->format & PNG_FORMAT_FLAG_AFIRST) != 0 && + (image->format & PNG_FORMAT_FLAG_ALPHA) != 0; +# else +# define afirst 0 +# endif +# ifdef PNG_FORMAT_BGR_SUPPORTED + const int bgr = (image->format & PNG_FORMAT_FLAG_BGR) ? 2 : 0; +# else +# define bgr 0 +# endif + + if (output_encoding == E_LINEAR) + { + png_uint_16p entry = png_voidcast(png_uint_16p, display->colormap); + + entry += ip * PNG_IMAGE_SAMPLE_CHANNELS(image->format); + + /* The linear 16-bit values must be pre-multiplied by the alpha channel + * value, if less than 65535 (this is, effectively, composite on black + * if the alpha channel is removed.) + */ + switch (PNG_IMAGE_SAMPLE_CHANNELS(image->format)) + { + case 4: + entry[afirst ? 0 : 3] = (png_uint_16)alpha; + /* FALL THROUGH */ + + case 3: + if (alpha < 65535) + { + if (alpha > 0) + { + blue = (blue * alpha + 32767U)/65535U; + green = (green * alpha + 32767U)/65535U; + red = (red * alpha + 32767U)/65535U; + } + + else + red = green = blue = 0; + } + entry[afirst + (2 ^ bgr)] = (png_uint_16)blue; + entry[afirst + 1] = (png_uint_16)green; + entry[afirst + bgr] = (png_uint_16)red; + break; + + case 2: + entry[1 ^ afirst] = (png_uint_16)alpha; + /* FALL THROUGH */ + + case 1: + if (alpha < 65535) + { + if (alpha > 0) + green = (green * alpha + 32767U)/65535U; + + else + green = 0; + } + entry[afirst] = (png_uint_16)green; + break; + + default: + break; + } + } + + else /* output encoding is E_sRGB */ + { + png_bytep entry = png_voidcast(png_bytep, display->colormap); + + entry += ip * PNG_IMAGE_SAMPLE_CHANNELS(image->format); + + switch (PNG_IMAGE_SAMPLE_CHANNELS(image->format)) + { + case 4: + entry[afirst ? 0 : 3] = (png_byte)alpha; + case 3: + entry[afirst + (2 ^ bgr)] = (png_byte)blue; + entry[afirst + 1] = (png_byte)green; + entry[afirst + bgr] = (png_byte)red; + break; + + case 2: + entry[1 ^ afirst] = (png_byte)alpha; + case 1: + entry[afirst] = (png_byte)green; + break; + + default: + break; + } + } + +# ifdef afirst +# undef afirst +# endif +# ifdef bgr +# undef bgr +# endif + } +} + +static int +make_gray_file_colormap(png_image_read_control *display) +{ + unsigned int i; + + for (i=0; i<256; ++i) + png_create_colormap_entry(display, i, i, i, i, 255, E_FILE); + + return i; +} + +static int +make_gray_colormap(png_image_read_control *display) +{ + unsigned int i; + + for (i=0; i<256; ++i) + png_create_colormap_entry(display, i, i, i, i, 255, E_sRGB); + + return i; +} +#define PNG_GRAY_COLORMAP_ENTRIES 256 + +static int +make_ga_colormap(png_image_read_control *display) +{ + unsigned int i, a; + + /* Alpha is retained, the output will be a color-map with entries + * selected by six levels of alpha. One transparent entry, 6 gray + * levels for all the intermediate alpha values, leaving 230 entries + * for the opaque grays. The color-map entries are the six values + * [0..5]*51, the GA processing uses PNG_DIV51(value) to find the + * relevant entry. + * + * if (alpha > 229) // opaque + * { + * // The 231 entries are selected to make the math below work: + * base = 0; + * entry = (231 * gray + 128) >> 8; + * } + * else if (alpha < 26) // transparent + * { + * base = 231; + * entry = 0; + * } + * else // partially opaque + * { + * base = 226 + 6 * PNG_DIV51(alpha); + * entry = PNG_DIV51(gray); + * } + */ + i = 0; + while (i < 231) + { + unsigned int gray = (i * 256 + 115) / 231; + png_create_colormap_entry(display, i++, gray, gray, gray, 255, E_sRGB); + } + + /* 255 is used here for the component values for consistency with the code + * that undoes premultiplication in pngwrite.c. + */ + png_create_colormap_entry(display, i++, 255, 255, 255, 0, E_sRGB); + + for (a=1; a<5; ++a) + { + unsigned int g; + + for (g=0; g<6; ++g) + png_create_colormap_entry(display, i++, g*51, g*51, g*51, a*51, + E_sRGB); + } + + return i; +} + +#define PNG_GA_COLORMAP_ENTRIES 256 + +static int +make_rgb_colormap(png_image_read_control *display) +{ + unsigned int i, r; + + /* Build a 6x6x6 opaque RGB cube */ + for (i=r=0; r<6; ++r) + { + unsigned int g; + + for (g=0; g<6; ++g) + { + unsigned int b; + + for (b=0; b<6; ++b) + png_create_colormap_entry(display, i++, r*51, g*51, b*51, 255, + E_sRGB); + } + } + + return i; +} + +#define PNG_RGB_COLORMAP_ENTRIES 216 + +/* Return a palette index to the above palette given three 8-bit sRGB values. */ +#define PNG_RGB_INDEX(r,g,b) \ + ((png_byte)(6 * (6 * PNG_DIV51(r) + PNG_DIV51(g)) + PNG_DIV51(b))) + +static int +png_image_read_colormap(png_voidp argument) +{ + png_image_read_control *display = + png_voidcast(png_image_read_control*, argument); + const png_imagep image = display->image; + + const png_structrp png_ptr = image->opaque->png_ptr; + const png_uint_32 output_format = image->format; + const int output_encoding = (output_format & PNG_FORMAT_FLAG_LINEAR) ? + E_LINEAR : E_sRGB; + + unsigned int cmap_entries; + unsigned int output_processing; /* Output processing option */ + unsigned int data_encoding = E_NOTSET; /* Encoding libpng must produce */ + + /* Background information; the background color and the index of this color + * in the color-map if it exists (else 256). + */ + unsigned int background_index = 256; + png_uint_32 back_r, back_g, back_b; + + /* Flags to accumulate things that need to be done to the input. */ + int expand_tRNS = 0; + + /* Exclude the NYI feature of compositing onto a color-mapped buffer; it is + * very difficult to do, the results look awful, and it is difficult to see + * what possible use it is because the application can't control the + * color-map. + */ + if (((png_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0 || + png_ptr->num_trans > 0) /* alpha in input */ && + ((output_format & PNG_FORMAT_FLAG_ALPHA) == 0) /* no alpha in output */) + { + if (output_encoding == E_LINEAR) /* compose on black */ + back_b = back_g = back_r = 0; + + else if (display->background == NULL /* no way to remove it */) + png_error(png_ptr, + "a background color must be supplied to remove alpha/transparency"); + + /* Get a copy of the background color (this avoids repeating the checks + * below.) The encoding is 8-bit sRGB or 16-bit linear, depending on the + * output format. + */ + else + { + back_g = display->background->green; + if (output_format & PNG_FORMAT_FLAG_COLOR) + { + back_r = display->background->red; + back_b = display->background->blue; + } + else + back_b = back_r = back_g; + } + } + + else if (output_encoding == E_LINEAR) + back_b = back_r = back_g = 65535; + + else + back_b = back_r = back_g = 255; + + /* Default the input file gamma if required - this is necessary because + * libpng assumes that if no gamma information is present the data is in the + * output format, but the simplified API deduces the gamma from the input + * format. + */ + if ((png_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_GAMMA) == 0) + { + /* Do this directly, not using the png_colorspace functions, to ensure + * that it happens even if the colorspace is invalid (though probably if + * it is the setting will be ignored) Note that the same thing can be + * achieved at the application interface with png_set_gAMA. + */ + if (png_ptr->bit_depth == 16 && + (image->flags & PNG_IMAGE_FLAG_16BIT_sRGB) == 0) + png_ptr->colorspace.gamma = PNG_GAMMA_LINEAR; + + else + png_ptr->colorspace.gamma = PNG_GAMMA_sRGB_INVERSE; + + png_ptr->colorspace.flags |= PNG_COLORSPACE_HAVE_GAMMA; + } + + /* Decide what to do based on the PNG color type of the input data. The + * utility function png_create_colormap_entry deals with most aspects of the + * output transformations; this code works out how to produce bytes of + * color-map entries from the original format. + */ + switch (png_ptr->color_type) + { + case PNG_COLOR_TYPE_GRAY: + if (png_ptr->bit_depth <= 8) + { + /* There at most 256 colors in the output, regardless of + * transparency. + */ + unsigned int step, i, val, trans = 256/*ignore*/, back_alpha = 0; + + cmap_entries = 1U << png_ptr->bit_depth; + if (cmap_entries > image->colormap_entries) + png_error(png_ptr, "gray[8] color-map: too few entries"); + + step = 255 / (cmap_entries - 1); + output_processing = PNG_CMAP_NONE; + + /* If there is a tRNS chunk then this either selects a transparent + * value or, if the output has no alpha, the background color. + */ + if (png_ptr->num_trans > 0) + { + trans = png_ptr->trans_color.gray; + + if ((output_format & PNG_FORMAT_FLAG_ALPHA) == 0) + back_alpha = output_encoding == E_LINEAR ? 65535 : 255; + } + + /* png_create_colormap_entry just takes an RGBA and writes the + * corresponding color-map entry using the format from 'image', + * including the required conversion to sRGB or linear as + * appropriate. The input values are always either sRGB (if the + * gamma correction flag is 0) or 0..255 scaled file encoded values + * (if the function must gamma correct them). + */ + for (i=val=0; ibit_depth < 8) + png_set_packing(png_ptr); + } + + else /* bit depth is 16 */ + { + /* The 16-bit input values can be converted directly to 8-bit gamma + * encoded values; however, if a tRNS chunk is present 257 color-map + * entries are required. This means that the extra entry requires + * special processing; add an alpha channel, sacrifice gray level + * 254 and convert transparent (alpha==0) entries to that. + * + * Use libpng to chop the data to 8 bits. Convert it to sRGB at the + * same time to minimize quality loss. If a tRNS chunk is present + * this means libpng must handle it too; otherwise it is impossible + * to do the exact match on the 16-bit value. + * + * If the output has no alpha channel *and* the background color is + * gray then it is possible to let libpng handle the substitution by + * ensuring that the corresponding gray level matches the background + * color exactly. + */ + data_encoding = E_sRGB; + + if (PNG_GRAY_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "gray[16] color-map: too few entries"); + + cmap_entries = make_gray_colormap(display); + + if (png_ptr->num_trans > 0) + { + unsigned int back_alpha; + + if (output_format & PNG_FORMAT_FLAG_ALPHA) + back_alpha = 0; + + else + { + if (back_r == back_g && back_g == back_b) + { + /* Background is gray; no special processing will be + * required. + */ + png_color_16 c; + png_uint_32 gray = back_g; + + if (output_encoding == E_LINEAR) + { + gray = PNG_sRGB_FROM_LINEAR(gray * 255); + + /* And make sure the corresponding palette entry + * matches. + */ + png_create_colormap_entry(display, gray, back_g, back_g, + back_g, 65535, E_LINEAR); + } + + /* The background passed to libpng, however, must be the + * sRGB value. + */ + c.index = 0; /*unused*/ + c.gray = c.red = c.green = c.blue = (png_uint_16)gray; + + /* NOTE: does this work without expanding tRNS to alpha? + * It should be the color->gray case below apparently + * doesn't. + */ + png_set_background_fixed(png_ptr, &c, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*need_expand*/, + 0/*gamma: not used*/); + + output_processing = PNG_CMAP_NONE; + break; + } + + back_alpha = output_encoding == E_LINEAR ? 65535 : 255; + } + + /* output_processing means that the libpng-processed row will be + * 8-bit GA and it has to be processing to single byte color-map + * values. Entry 254 is replaced by either a completely + * transparent entry or by the background color at full + * precision (and the background color is not a simple gray leve + * in this case.) + */ + expand_tRNS = 1; + output_processing = PNG_CMAP_TRANS; + background_index = 254; + + /* And set (overwrite) color-map entry 254 to the actual + * background color at full precision. + */ + png_create_colormap_entry(display, 254, back_r, back_g, back_b, + back_alpha, output_encoding); + } + + else + output_processing = PNG_CMAP_NONE; + } + break; + + case PNG_COLOR_TYPE_GRAY_ALPHA: + /* 8-bit or 16-bit PNG with two channels - gray and alpha. A minimum + * of 65536 combinations. If, however, the alpha channel is to be + * removed there are only 256 possibilities if the background is gray. + * (Otherwise there is a subset of the 65536 possibilities defined by + * the triangle between black, white and the background color.) + * + * Reduce 16-bit files to 8-bit and sRGB encode the result. No need to + * worry about tRNS matching - tRNS is ignored if there is an alpha + * channel. + */ + data_encoding = E_sRGB; + + if (output_format & PNG_FORMAT_FLAG_ALPHA) + { + if (PNG_GA_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "gray+alpha color-map: too few entries"); + + cmap_entries = make_ga_colormap(display); + + background_index = PNG_CMAP_GA_BACKGROUND; + output_processing = PNG_CMAP_GA; + } + + else /* alpha is removed */ + { + /* Alpha must be removed as the PNG data is processed when the + * background is a color because the G and A channels are + * independent and the vector addition (non-parallel vectors) is a + * 2-D problem. + * + * This can be reduced to the same algorithm as above by making a + * colormap containing gray levels (for the opaque grays), a + * background entry (for a transparent pixel) and a set of four six + * level color values, one set for each intermediate alpha value. + * See the comments in make_ga_colormap for how this works in the + * per-pixel processing. + * + * If the background is gray, however, we only need a 256 entry gray + * level color map. It is sufficient to make the entry generated + * for the background color be exactly the color specified. + */ + if ((output_format & PNG_FORMAT_FLAG_COLOR) == 0 || + (back_r == back_g && back_g == back_b)) + { + /* Background is gray; no special processing will be required. */ + png_color_16 c; + png_uint_32 gray = back_g; + + if (PNG_GRAY_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "gray-alpha color-map: too few entries"); + + cmap_entries = make_gray_colormap(display); + + if (output_encoding == E_LINEAR) + { + gray = PNG_sRGB_FROM_LINEAR(gray * 255); + + /* And make sure the corresponding palette entry matches. */ + png_create_colormap_entry(display, gray, back_g, back_g, + back_g, 65535, E_LINEAR); + } + + /* The background passed to libpng, however, must be the sRGB + * value. + */ + c.index = 0; /*unused*/ + c.gray = c.red = c.green = c.blue = (png_uint_16)gray; + + png_set_background_fixed(png_ptr, &c, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*need_expand*/, + 0/*gamma: not used*/); + + output_processing = PNG_CMAP_NONE; + } + + else + { + png_uint_32 i, a; + + /* This is the same as png_make_ga_colormap, above, except that + * the entries are all opaque. + */ + if (PNG_GA_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "ga-alpha color-map: too few entries"); + + i = 0; + while (i < 231) + { + png_uint_32 gray = (i * 256 + 115) / 231; + png_create_colormap_entry(display, i++, gray, gray, gray, + 255, E_sRGB); + } + + /* NOTE: this preserves the full precision of the application + * background color. + */ + background_index = i; + png_create_colormap_entry(display, i++, back_r, back_g, back_b, + output_encoding == E_LINEAR ? 65535U : 255U, output_encoding); + + /* For non-opaque input composite on the sRGB background - this + * requires inverting the encoding for each component. The input + * is still converted to the sRGB encoding because this is a + * reasonable approximate to the logarithmic curve of human + * visual sensitivity, at least over the narrow range which PNG + * represents. Consequently 'G' is always sRGB encoded, while + * 'A' is linear. We need the linear background colors. + */ + if (output_encoding == E_sRGB) /* else already linear */ + { + /* This may produce a value not exactly matching the + * background, but that's ok because these numbers are only + * used when alpha != 0 + */ + back_r = png_sRGB_table[back_r]; + back_g = png_sRGB_table[back_g]; + back_b = png_sRGB_table[back_b]; + } + + for (a=1; a<5; ++a) + { + unsigned int g; + + /* PNG_sRGB_FROM_LINEAR expects a 16-bit linear value scaled + * by an 8-bit alpha value (0..255). + */ + png_uint_32 alpha = 51 * a; + png_uint_32 back_rx = (255-alpha) * back_r; + png_uint_32 back_gx = (255-alpha) * back_g; + png_uint_32 back_bx = (255-alpha) * back_b; + + for (g=0; g<6; ++g) + { + png_uint_32 gray = png_sRGB_table[g*51] * alpha; + + png_create_colormap_entry(display, i++, + PNG_sRGB_FROM_LINEAR(gray + back_rx), + PNG_sRGB_FROM_LINEAR(gray + back_gx), + PNG_sRGB_FROM_LINEAR(gray + back_bx), 255, E_sRGB); + } + } + + cmap_entries = i; + output_processing = PNG_CMAP_GA; + } + } + break; + + case PNG_COLOR_TYPE_RGB: + case PNG_COLOR_TYPE_RGB_ALPHA: + /* Exclude the case where the output is gray; we can always handle this + * with the cases above. + */ + if ((output_format & PNG_FORMAT_FLAG_COLOR) == 0) + { + /* The color-map will be grayscale, so we may as well convert the + * input RGB values to a simple grayscale and use the grayscale + * code above. + * + * NOTE: calling this apparently damages the recognition of the + * transparent color in background color handling; call + * png_set_tRNS_to_alpha before png_set_background_fixed. + */ + png_set_rgb_to_gray_fixed(png_ptr, PNG_ERROR_ACTION_NONE, -1, + -1); + data_encoding = E_sRGB; + + /* The output will now be one or two 8-bit gray or gray+alpha + * channels. The more complex case arises when the input has alpha. + */ + if ((png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + png_ptr->num_trans > 0) && + (output_format & PNG_FORMAT_FLAG_ALPHA) != 0) + { + /* Both input and output have an alpha channel, so no background + * processing is required; just map the GA bytes to the right + * color-map entry. + */ + expand_tRNS = 1; + + if (PNG_GA_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "rgb[ga] color-map: too few entries"); + + cmap_entries = make_ga_colormap(display); + background_index = PNG_CMAP_GA_BACKGROUND; + output_processing = PNG_CMAP_GA; + } + + else + { + /* Either the input or the output has no alpha channel, so there + * will be no non-opaque pixels in the color-map; it will just be + * grayscale. + */ + if (PNG_GRAY_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "rgb[gray] color-map: too few entries"); + + /* Ideally this code would use libpng to do the gamma correction, + * but if an input alpha channel is to be removed we will hit the + * libpng bug in gamma+compose+rgb-to-gray (the double gamma + * correction bug). Fix this by dropping the gamma correction in + * this case and doing it in the palette; this will result in + * duplicate palette entries, but that's better than the + * alternative of double gamma correction. + */ + if ((png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + png_ptr->num_trans > 0) && + png_gamma_not_sRGB(png_ptr->colorspace.gamma)) + { + cmap_entries = make_gray_file_colormap(display); + data_encoding = E_FILE; + } + + else + cmap_entries = make_gray_colormap(display); + + /* But if the input has alpha or transparency it must be removed + */ + if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + png_ptr->num_trans > 0) + { + png_color_16 c; + png_uint_32 gray = back_g; + + /* We need to ensure that the application background exists in + * the colormap and that completely transparent pixels map to + * it. Achieve this simply by ensuring that the entry + * selected for the background really is the background color. + */ + if (data_encoding == E_FILE) /* from the fixup above */ + { + /* The app supplied a gray which is in output_encoding, we + * need to convert it to a value of the input (E_FILE) + * encoding then set this palette entry to the required + * output encoding. + */ + if (output_encoding == E_sRGB) + gray = png_sRGB_table[gray]; /* now E_LINEAR */ + + gray = PNG_DIV257(png_gamma_16bit_correct(gray, + png_ptr->colorspace.gamma)); /* now E_FILE */ + + /* And make sure the corresponding palette entry contains + * exactly the required sRGB value. + */ + png_create_colormap_entry(display, gray, back_g, back_g, + back_g, 0/*unused*/, output_encoding); + } + + else if (output_encoding == E_LINEAR) + { + gray = PNG_sRGB_FROM_LINEAR(gray * 255); + + /* And make sure the corresponding palette entry matches. + */ + png_create_colormap_entry(display, gray, back_g, back_g, + back_g, 0/*unused*/, E_LINEAR); + } + + /* The background passed to libpng, however, must be the + * output (normally sRGB) value. + */ + c.index = 0; /*unused*/ + c.gray = c.red = c.green = c.blue = (png_uint_16)gray; + + /* NOTE: the following is apparently a bug in libpng. Without + * it the transparent color recognition in + * png_set_background_fixed seems to go wrong. + */ + expand_tRNS = 1; + png_set_background_fixed(png_ptr, &c, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*need_expand*/, + 0/*gamma: not used*/); + } + + output_processing = PNG_CMAP_NONE; + } + } + + else /* output is color */ + { + /* We could use png_quantize here so long as there is no transparent + * color or alpha; png_quantize ignores alpha. Easier overall just + * to do it once and using PNG_DIV51 on the 6x6x6 reduced RGB cube. + * Consequently we always want libpng to produce sRGB data. + */ + data_encoding = E_sRGB; + + /* Is there any transparency or alpha? */ + if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + png_ptr->num_trans > 0) + { + /* Is there alpha in the output too? If so all four channels are + * processed into a special RGB cube with alpha support. + */ + if (output_format & PNG_FORMAT_FLAG_ALPHA) + { + png_uint_32 r; + + if (PNG_RGB_COLORMAP_ENTRIES+1+27 > image->colormap_entries) + png_error(png_ptr, "rgb+alpha color-map: too few entries"); + + cmap_entries = make_rgb_colormap(display); + + /* Add a transparent entry. */ + png_create_colormap_entry(display, cmap_entries, 255, 255, + 255, 0, E_sRGB); + + /* This is stored as the background index for the processing + * algorithm. + */ + background_index = cmap_entries++; + + /* Add 27 r,g,b entries each with alpha 0.5. */ + for (r=0; r<256; r = (r << 1) | 0x7f) + { + png_uint_32 g; + + for (g=0; g<256; g = (g << 1) | 0x7f) + { + png_uint_32 b; + + /* This generates components with the values 0, 127 and + * 255 + */ + for (b=0; b<256; b = (b << 1) | 0x7f) + png_create_colormap_entry(display, cmap_entries++, + r, g, b, 128, E_sRGB); + } + } + + expand_tRNS = 1; + output_processing = PNG_CMAP_RGB_ALPHA; + } + + else + { + /* Alpha/transparency must be removed. The background must + * exist in the color map (achieved by setting adding it after + * the 666 color-map). If the standard processing code will + * pick up this entry automatically that's all that is + * required; libpng can be called to do the background + * processing. + */ + unsigned int sample_size = + PNG_IMAGE_SAMPLE_SIZE(output_format); + png_uint_32 r, g, b; /* sRGB background */ + + if (PNG_RGB_COLORMAP_ENTRIES+1+27 > image->colormap_entries) + png_error(png_ptr, "rgb-alpha color-map: too few entries"); + + cmap_entries = make_rgb_colormap(display); + + png_create_colormap_entry(display, cmap_entries, back_r, + back_g, back_b, 0/*unused*/, output_encoding); + + if (output_encoding == E_LINEAR) + { + r = PNG_sRGB_FROM_LINEAR(back_r * 255); + g = PNG_sRGB_FROM_LINEAR(back_g * 255); + b = PNG_sRGB_FROM_LINEAR(back_b * 255); + } + + else + { + r = back_r; + g = back_g; + b = back_g; + } + + /* Compare the newly-created color-map entry with the one the + * PNG_CMAP_RGB algorithm will use. If the two entries don't + * match, add the new one and set this as the background + * index. + */ + if (memcmp((png_const_bytep)display->colormap + + sample_size * cmap_entries, + (png_const_bytep)display->colormap + + sample_size * PNG_RGB_INDEX(r,g,b), + sample_size) != 0) + { + /* The background color must be added. */ + background_index = cmap_entries++; + + /* Add 27 r,g,b entries each with created by composing with + * the background at alpha 0.5. + */ + for (r=0; r<256; r = (r << 1) | 0x7f) + { + for (g=0; g<256; g = (g << 1) | 0x7f) + { + /* This generates components with the values 0, 127 + * and 255 + */ + for (b=0; b<256; b = (b << 1) | 0x7f) + png_create_colormap_entry(display, cmap_entries++, + png_colormap_compose(display, r, E_sRGB, 128, + back_r, output_encoding), + png_colormap_compose(display, g, E_sRGB, 128, + back_g, output_encoding), + png_colormap_compose(display, b, E_sRGB, 128, + back_b, output_encoding), + 0/*unused*/, output_encoding); + } + } + + expand_tRNS = 1; + output_processing = PNG_CMAP_RGB_ALPHA; + } + + else /* background color is in the standard color-map */ + { + png_color_16 c; + + c.index = 0; /*unused*/ + c.red = (png_uint_16)back_r; + c.gray = c.green = (png_uint_16)back_g; + c.blue = (png_uint_16)back_b; + + png_set_background_fixed(png_ptr, &c, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*need_expand*/, + 0/*gamma: not used*/); + + output_processing = PNG_CMAP_RGB; + } + } + } + + else /* no alpha or transparency in the input */ + { + /* Alpha in the output is irrelevant, simply map the opaque input + * pixels to the 6x6x6 color-map. + */ + if (PNG_RGB_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "rgb color-map: too few entries"); + + cmap_entries = make_rgb_colormap(display); + output_processing = PNG_CMAP_RGB; + } + } + break; + + case PNG_COLOR_TYPE_PALETTE: + /* It's already got a color-map. It may be necessary to eliminate the + * tRNS entries though. + */ + { + unsigned int num_trans = png_ptr->num_trans; + png_const_bytep trans = num_trans > 0 ? png_ptr->trans_alpha : NULL; + png_const_colorp colormap = png_ptr->palette; + const int do_background = trans != NULL && + (output_format & PNG_FORMAT_FLAG_ALPHA) == 0; + unsigned int i; + + /* Just in case: */ + if (trans == NULL) + num_trans = 0; + + output_processing = PNG_CMAP_NONE; + data_encoding = E_FILE; /* Don't change from color-map indicies */ + cmap_entries = png_ptr->num_palette; + if (cmap_entries > 256) + cmap_entries = 256; + + if (cmap_entries > image->colormap_entries) + png_error(png_ptr, "palette color-map: too few entries"); + + for (i=0; i < cmap_entries; ++i) + { + if (do_background && i < num_trans && trans[i] < 255) + { + if (trans[i] == 0) + png_create_colormap_entry(display, i, back_r, back_g, + back_b, 0, output_encoding); + + else + { + /* Must compose the PNG file color in the color-map entry + * on the sRGB color in 'back'. + */ + png_create_colormap_entry(display, i, + png_colormap_compose(display, colormap[i].red, E_FILE, + trans[i], back_r, output_encoding), + png_colormap_compose(display, colormap[i].green, E_FILE, + trans[i], back_g, output_encoding), + png_colormap_compose(display, colormap[i].blue, E_FILE, + trans[i], back_b, output_encoding), + output_encoding == E_LINEAR ? trans[i] * 257U : + trans[i], + output_encoding); + } + } + + else + png_create_colormap_entry(display, i, colormap[i].red, + colormap[i].green, colormap[i].blue, + i < num_trans ? trans[i] : 255U, E_FILE/*8-bit*/); + } + + /* The PNG data may have indicies packed in fewer than 8 bits, it + * must be expanded if so. + */ + if (png_ptr->bit_depth < 8) + png_set_packing(png_ptr); + } + break; + + default: + png_error(png_ptr, "invalid PNG color type"); + /*NOT REACHED*/ + break; + } + + /* Now deal with the output processing */ + if (expand_tRNS && png_ptr->num_trans > 0 && + (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) == 0) + png_set_tRNS_to_alpha(png_ptr); + + switch (data_encoding) + { + default: + png_error(png_ptr, "bad data option (internal error)"); + break; + + case E_sRGB: + /* Change to 8-bit sRGB */ + png_set_alpha_mode_fixed(png_ptr, PNG_ALPHA_PNG, PNG_GAMMA_sRGB); + /* FALL THROUGH */ + + case E_FILE: + if (png_ptr->bit_depth > 8) + png_set_scale_16(png_ptr); + break; + } + + if (cmap_entries > 256 || cmap_entries > image->colormap_entries) + png_error(png_ptr, "color map overflow (BAD internal error)"); + + image->colormap_entries = cmap_entries; + + /* Double check using the recorded background index */ + switch (output_processing) + { + case PNG_CMAP_NONE: + if (background_index != PNG_CMAP_NONE_BACKGROUND) + goto bad_background; + break; + + case PNG_CMAP_GA: + if (background_index != PNG_CMAP_GA_BACKGROUND) + goto bad_background; + break; + + case PNG_CMAP_TRANS: + if (background_index >= cmap_entries || + background_index != PNG_CMAP_TRANS_BACKGROUND) + goto bad_background; + break; + + case PNG_CMAP_RGB: + if (background_index != PNG_CMAP_RGB_BACKGROUND) + goto bad_background; + break; + + case PNG_CMAP_RGB_ALPHA: + if (background_index != PNG_CMAP_RGB_ALPHA_BACKGROUND) + goto bad_background; + break; + + default: + png_error(png_ptr, "bad processing option (internal error)"); + + bad_background: + png_error(png_ptr, "bad background index (internal error)"); + } + + display->colormap_processing = output_processing; + + return 1/*ok*/; +} + +/* The final part of the color-map read called from png_image_finish_read. */ +static int +png_image_read_and_map(png_voidp argument) +{ + png_image_read_control *display = png_voidcast(png_image_read_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + int passes; + + /* Called when the libpng data must be transformed into the color-mapped + * form. There is a local row buffer in display->local and this routine must + * do the interlace handling. + */ + switch (png_ptr->interlaced) + { + case PNG_INTERLACE_NONE: + passes = 1; + break; + + case PNG_INTERLACE_ADAM7: + passes = PNG_INTERLACE_ADAM7_PASSES; + break; + + default: + passes = 0; + png_error(png_ptr, "unknown interlace type"); + } + + { + png_uint_32 height = image->height; + png_uint_32 width = image->width; + int proc = display->colormap_processing; + png_bytep first_row = png_voidcast(png_bytep, display->first_row); + ptrdiff_t step_row = display->row_bytes; + int pass; + + for (pass = 0; pass < passes; ++pass) + { + unsigned int startx, stepx, stepy; + png_uint_32 y; + + if (png_ptr->interlaced == PNG_INTERLACE_ADAM7) + { + /* The row may be empty for a short image: */ + if (PNG_PASS_COLS(width, pass) == 0) + continue; + + startx = PNG_PASS_START_COL(pass); + stepx = PNG_PASS_COL_OFFSET(pass); + y = PNG_PASS_START_ROW(pass); + stepy = PNG_PASS_ROW_OFFSET(pass); + } + + else + { + y = 0; + startx = 0; + stepx = stepy = 1; + } + + for (; ylocal_row); + png_bytep outrow = first_row + y * step_row; + png_const_bytep end_row = outrow + width; + + /* Read read the libpng data into the temporary buffer. */ + png_read_row(png_ptr, inrow, NULL); + + /* Now process the row according to the processing option, note + * that the caller verifies that the format of the libpng output + * data is as required. + */ + outrow += startx; + switch (proc) + { + case PNG_CMAP_GA: + for (; outrow < end_row; outrow += stepx) + { + /* The data is always in the PNG order */ + unsigned int gray = *inrow++; + unsigned int alpha = *inrow++; + unsigned int entry; + + /* NOTE: this code is copied as a comment in + * make_ga_colormap above. Please update the + * comment if you change this code! + */ + if (alpha > 229) /* opaque */ + { + entry = (231 * gray + 128) >> 8; + } + else if (alpha < 26) /* transparent */ + { + entry = 231; + } + else /* partially opaque */ + { + entry = 226 + 6 * PNG_DIV51(alpha) + PNG_DIV51(gray); + } + + *outrow = (png_byte)entry; + } + break; + + case PNG_CMAP_TRANS: + for (; outrow < end_row; outrow += stepx) + { + png_byte gray = *inrow++; + png_byte alpha = *inrow++; + + if (alpha == 0) + *outrow = PNG_CMAP_TRANS_BACKGROUND; + + else if (gray != PNG_CMAP_TRANS_BACKGROUND) + *outrow = gray; + + else + *outrow = (png_byte)(PNG_CMAP_TRANS_BACKGROUND+1); + } + break; + + case PNG_CMAP_RGB: + for (; outrow < end_row; outrow += stepx) + { + *outrow = PNG_RGB_INDEX(inrow[0], inrow[1], inrow[2]); + inrow += 3; + } + break; + + case PNG_CMAP_RGB_ALPHA: + for (; outrow < end_row; outrow += stepx) + { + unsigned int alpha = inrow[3]; + + /* Because the alpha entries only hold alpha==0.5 values + * split the processing at alpha==0.25 (64) and 0.75 + * (196). + */ + + if (alpha >= 196) + *outrow = PNG_RGB_INDEX(inrow[0], inrow[1], + inrow[2]); + + else if (alpha < 64) + *outrow = PNG_CMAP_RGB_ALPHA_BACKGROUND; + + else + { + /* Likewise there are three entries for each of r, g + * and b. We could select the entry by popcount on + * the top two bits on those architectures that + * support it, this is what the code below does, + * crudely. + */ + unsigned int back_i = PNG_CMAP_RGB_ALPHA_BACKGROUND+1; + + /* Here are how the values map: + * + * 0x00 .. 0x3f -> 0 + * 0x40 .. 0xbf -> 1 + * 0xc0 .. 0xff -> 2 + * + * So, as above with the explicit alpha checks, the + * breakpoints are at 64 and 196. + */ + if (inrow[0] & 0x80) back_i += 9; /* red */ + if (inrow[0] & 0x40) back_i += 9; + if (inrow[0] & 0x80) back_i += 3; /* green */ + if (inrow[0] & 0x40) back_i += 3; + if (inrow[0] & 0x80) back_i += 1; /* blue */ + if (inrow[0] & 0x40) back_i += 1; + + *outrow = (png_byte)back_i; + } + + inrow += 4; + } + break; + + default: + break; + } + } + } + } + + return 1; +} + +static int +png_image_read_colormapped(png_voidp argument) +{ + png_image_read_control *display = png_voidcast(png_image_read_control*, + argument); + png_imagep image = display->image; + png_controlp control = image->opaque; + png_structrp png_ptr = control->png_ptr; + png_inforp info_ptr = control->info_ptr; + + int passes = 0; /* As a flag */ + + PNG_SKIP_CHUNKS(png_ptr); + + /* Update the 'info' structure and make sure the result is as required; first + * make sure to turn on the interlace handling if it will be required + * (because it can't be turned on *after* the call to png_read_update_info!) + */ + if (display->colormap_processing == PNG_CMAP_NONE) + passes = png_set_interlace_handling(png_ptr); + + png_read_update_info(png_ptr, info_ptr); + + /* The expected output can be deduced from the colormap_processing option. */ + switch (display->colormap_processing) + { + case PNG_CMAP_NONE: + /* Output must be one channel and one byte per pixel, the output + * encoding can be anything. + */ + if ((info_ptr->color_type == PNG_COLOR_TYPE_PALETTE || + info_ptr->color_type == PNG_COLOR_TYPE_GRAY) && + info_ptr->bit_depth == 8) + break; + + goto bad_output; + + case PNG_CMAP_TRANS: + case PNG_CMAP_GA: + /* Output must be two channels and the 'G' one must be sRGB, the latter + * can be checked with an exact number because it should have been set + * to this number above! + */ + if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && + info_ptr->bit_depth == 8 && + png_ptr->screen_gamma == PNG_GAMMA_sRGB && + image->colormap_entries == 256) + break; + + goto bad_output; + + case PNG_CMAP_RGB: + /* Output must be 8-bit sRGB encoded RGB */ + if (info_ptr->color_type == PNG_COLOR_TYPE_RGB && + info_ptr->bit_depth == 8 && + png_ptr->screen_gamma == PNG_GAMMA_sRGB && + image->colormap_entries == 216) + break; + + goto bad_output; + + case PNG_CMAP_RGB_ALPHA: + /* Output must be 8-bit sRGB encoded RGBA */ + if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA && + info_ptr->bit_depth == 8 && + png_ptr->screen_gamma == PNG_GAMMA_sRGB && + image->colormap_entries == 244 /* 216 + 1 + 27 */) + break; + + /* goto bad_output; */ + /* FALL THROUGH */ + + default: + bad_output: + png_error(png_ptr, "bad color-map processing (internal error)"); + } + + /* Now read the rows. Do this here if it is possible to read directly into + * the output buffer, otherwise allocate a local row buffer of the maximum + * size libpng requires and call the relevant processing routine safely. + */ + { + png_voidp first_row = display->buffer; + ptrdiff_t row_bytes = display->row_stride; + + /* The following expression is designed to work correctly whether it gives + * a signed or an unsigned result. + */ + if (row_bytes < 0) + { + char *ptr = png_voidcast(char*, first_row); + ptr += (image->height-1) * (-row_bytes); + first_row = png_voidcast(png_voidp, ptr); + } + + display->first_row = first_row; + display->row_bytes = row_bytes; + } + + if (passes == 0) + { + int result; + png_voidp row = png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr)); + + display->local_row = row; + result = png_safe_execute(image, png_image_read_and_map, display); + display->local_row = NULL; + png_free(png_ptr, row); + + return result; + } + + else + { + png_alloc_size_t row_bytes = display->row_bytes; + + while (--passes >= 0) + { + png_uint_32 y = image->height; + png_bytep row = png_voidcast(png_bytep, display->first_row); + + while (y-- > 0) + { + png_read_row(png_ptr, row, NULL); + row += row_bytes; + } + } + + return 1; + } +} + +/* Just the row reading part of png_image_read. */ +static int +png_image_read_composite(png_voidp argument) +{ + png_image_read_control *display = png_voidcast(png_image_read_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + int passes; + + switch (png_ptr->interlaced) + { + case PNG_INTERLACE_NONE: + passes = 1; + break; + + case PNG_INTERLACE_ADAM7: + passes = PNG_INTERLACE_ADAM7_PASSES; + break; + + default: + passes = 0; + png_error(png_ptr, "unknown interlace type"); + } + + { + png_uint_32 height = image->height; + png_uint_32 width = image->width; + ptrdiff_t step_row = display->row_bytes; + unsigned int channels = (image->format & PNG_FORMAT_FLAG_COLOR) ? 3 : 1; + int pass; + + for (pass = 0; pass < passes; ++pass) + { + unsigned int startx, stepx, stepy; + png_uint_32 y; + + if (png_ptr->interlaced == PNG_INTERLACE_ADAM7) + { + /* The row may be empty for a short image: */ + if (PNG_PASS_COLS(width, pass) == 0) + continue; + + startx = PNG_PASS_START_COL(pass) * channels; + stepx = PNG_PASS_COL_OFFSET(pass) * channels; + y = PNG_PASS_START_ROW(pass); + stepy = PNG_PASS_ROW_OFFSET(pass); + } + + else + { + y = 0; + startx = 0; + stepx = channels; + stepy = 1; + } + + for (; ylocal_row); + png_bytep outrow; + png_const_bytep end_row; + + /* Read the row, which is packed: */ + png_read_row(png_ptr, inrow, NULL); + + outrow = png_voidcast(png_bytep, display->first_row); + outrow += y * step_row; + end_row = outrow + width * channels; + + /* Now do the composition on each pixel in this row. */ + outrow += startx; + for (; outrow < end_row; outrow += stepx) + { + png_byte alpha = inrow[channels]; + + if (alpha > 0) /* else no change to the output */ + { + unsigned int c; + + for (c=0; cimage; + png_structrp png_ptr = image->opaque->png_ptr; + png_inforp info_ptr = image->opaque->info_ptr; + png_uint_32 height = image->height; + png_uint_32 width = image->width; + int pass, passes; + + /* Double check the convoluted logic below. We expect to get here with + * libpng doing rgb to gray and gamma correction but background processing + * left to the png_image_read_background function. The rows libpng produce + * might be 8 or 16-bit but should always have two channels; gray plus alpha. + */ + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) == 0) + png_error(png_ptr, "lost rgb to gray"); + + if ((png_ptr->transformations & PNG_COMPOSE) != 0) + png_error(png_ptr, "unexpected compose"); + + if (png_get_channels(png_ptr, info_ptr) != 2) + png_error(png_ptr, "lost/gained channels"); + + /* Expect the 8-bit case to always remove the alpha channel */ + if ((image->format & PNG_FORMAT_FLAG_LINEAR) == 0 && + (image->format & PNG_FORMAT_FLAG_ALPHA) != 0) + png_error(png_ptr, "unexpected 8-bit transformation"); + + switch (png_ptr->interlaced) + { + case PNG_INTERLACE_NONE: + passes = 1; + break; + + case PNG_INTERLACE_ADAM7: + passes = PNG_INTERLACE_ADAM7_PASSES; + break; + + default: + passes = 0; + png_error(png_ptr, "unknown interlace type"); + } + + switch (png_get_bit_depth(png_ptr, info_ptr)) + { + default: + png_error(png_ptr, "unexpected bit depth"); + break; + + case 8: + /* 8-bit sRGB gray values with an alpha channel; the alpha channel is + * to be removed by composing on a backgroundi: either the row if + * display->background is NULL or display->background->green if not. + * Unlike the code above ALPHA_OPTIMIZED has *not* been done. + */ + { + png_bytep first_row = png_voidcast(png_bytep, display->first_row); + ptrdiff_t step_row = display->row_bytes; + + for (pass = 0; pass < passes; ++pass) + { + png_bytep row = png_voidcast(png_bytep, + display->first_row); + unsigned int startx, stepx, stepy; + png_uint_32 y; + + if (png_ptr->interlaced == PNG_INTERLACE_ADAM7) + { + /* The row may be empty for a short image: */ + if (PNG_PASS_COLS(width, pass) == 0) + continue; + + startx = PNG_PASS_START_COL(pass); + stepx = PNG_PASS_COL_OFFSET(pass); + y = PNG_PASS_START_ROW(pass); + stepy = PNG_PASS_ROW_OFFSET(pass); + } + + else + { + y = 0; + startx = 0; + stepx = stepy = 1; + } + + if (display->background == NULL) + { + for (; ylocal_row); + png_bytep outrow = first_row + y * step_row; + png_const_bytep end_row = outrow + width; + + /* Read the row, which is packed: */ + png_read_row(png_ptr, inrow, NULL); + + /* Now do the composition on each pixel in this row. */ + outrow += startx; + for (; outrow < end_row; outrow += stepx) + { + png_byte alpha = inrow[1]; + + if (alpha > 0) /* else no change to the output */ + { + png_uint_32 component = inrow[0]; + + if (alpha < 255) /* else just use component */ + { + /* Since PNG_OPTIMIZED_ALPHA was not set it is + * necessary to invert the sRGB transfer + * function and multiply the alpha out. + */ + component = png_sRGB_table[component] * alpha; + component += png_sRGB_table[outrow[0]] * + (255-alpha); + component = PNG_sRGB_FROM_LINEAR(component); + } + + outrow[0] = (png_byte)component; + } + + inrow += 2; /* gray and alpha channel */ + } + } + } + + else /* constant background value */ + { + png_byte background8 = display->background->green; + png_uint_16 background = png_sRGB_table[background8]; + + for (; ylocal_row); + png_bytep outrow = first_row + y * step_row; + png_const_bytep end_row = outrow + width; + + /* Read the row, which is packed: */ + png_read_row(png_ptr, inrow, NULL); + + /* Now do the composition on each pixel in this row. */ + outrow += startx; + for (; outrow < end_row; outrow += stepx) + { + png_byte alpha = inrow[1]; + + if (alpha > 0) /* else use background */ + { + png_uint_32 component = inrow[0]; + + if (alpha < 255) /* else just use component */ + { + component = png_sRGB_table[component] * alpha; + component += background * (255-alpha); + component = PNG_sRGB_FROM_LINEAR(component); + } + + outrow[0] = (png_byte)component; + } + + else + outrow[0] = background8; + + inrow += 2; /* gray and alpha channel */ + } + + row += display->row_bytes; + } + } + } + } + break; + + case 16: + /* 16-bit linear with pre-multiplied alpha; the pre-multiplication must + * still be done and, maybe, the alpha channel removed. This code also + * handles the alpha-first option. + */ + { + png_uint_16p first_row = png_voidcast(png_uint_16p, + display->first_row); + /* The division by two is safe because the caller passed in a + * stride which was multiplied by 2 (below) to get row_bytes. + */ + ptrdiff_t step_row = display->row_bytes / 2; + int preserve_alpha = (image->format & PNG_FORMAT_FLAG_ALPHA) != 0; + unsigned int outchannels = 1+preserve_alpha; + int swap_alpha = 0; + + if (preserve_alpha && (image->format & PNG_FORMAT_FLAG_AFIRST)) + swap_alpha = 1; + + for (pass = 0; pass < passes; ++pass) + { + unsigned int startx, stepx, stepy; + png_uint_32 y; + + /* The 'x' start and step are adjusted to output components here. + */ + if (png_ptr->interlaced == PNG_INTERLACE_ADAM7) + { + /* The row may be empty for a short image: */ + if (PNG_PASS_COLS(width, pass) == 0) + continue; + + startx = PNG_PASS_START_COL(pass) * outchannels; + stepx = PNG_PASS_COL_OFFSET(pass) * outchannels; + y = PNG_PASS_START_ROW(pass); + stepy = PNG_PASS_ROW_OFFSET(pass); + } + + else + { + y = 0; + startx = 0; + stepx = outchannels; + stepy = 1; + } + + for (; ylocal_row), NULL); + inrow = png_voidcast(png_const_uint_16p, display->local_row); + + /* Now do the pre-multiplication on each pixel in this row. + */ + outrow += startx; + for (; outrow < end_row; outrow += stepx) + { + png_uint_32 component = inrow[0]; + png_uint_16 alpha = inrow[1]; + + if (alpha > 0) /* else 0 */ + { + if (alpha < 65535) /* else just use component */ + { + component *= alpha; + component += 32767; + component /= 65535; + } + } + + else + component = 0; + + outrow[swap_alpha] = (png_uint_16)component; + if (preserve_alpha) + outrow[1 ^ swap_alpha] = alpha; + + inrow += 2; /* components and alpha channel */ + } + } + } + } + break; + } + + return 1; +} + +/* The guts of png_image_finish_read as a png_safe_execute callback. */ +static int +png_image_read_direct(png_voidp argument) +{ + png_image_read_control *display = png_voidcast(png_image_read_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + png_inforp info_ptr = image->opaque->info_ptr; + + png_uint_32 format = image->format; + int linear = (format & PNG_FORMAT_FLAG_LINEAR) != 0; + int do_local_compose = 0; + int do_local_background = 0; /* to avoid double gamma correction bug */ + int passes = 0; + + /* Add transforms to ensure the correct output format is produced then check + * that the required implementation support is there. Always expand; always + * need 8 bits minimum, no palette and expanded tRNS. + */ + png_set_expand(png_ptr); + + /* Now check the format to see if it was modified. */ + { + png_uint_32 base_format = png_image_format(png_ptr) & + ~PNG_FORMAT_FLAG_COLORMAP /* removed by png_set_expand */; + png_uint_32 change = format ^ base_format; + png_fixed_point output_gamma; + int mode; /* alpha mode */ + + /* Do this first so that we have a record if rgb to gray is happening. */ + if (change & PNG_FORMAT_FLAG_COLOR) + { + /* gray<->color transformation required. */ + if (format & PNG_FORMAT_FLAG_COLOR) + png_set_gray_to_rgb(png_ptr); + + else + { + /* libpng can't do both rgb to gray and + * background/pre-multiplication if there is also significant gamma + * correction, because both operations require linear colors and + * the code only supports one transform doing the gamma correction. + * Handle this by doing the pre-multiplication or background + * operation in this code, if necessary. + * + * TODO: fix this by rewriting pngrtran.c (!) + * + * For the moment (given that fixing this in pngrtran.c is an + * enormous change) 'do_local_background' is used to indicate that + * the problem exists. + */ + if (base_format & PNG_FORMAT_FLAG_ALPHA) + do_local_background = 1/*maybe*/; + + png_set_rgb_to_gray_fixed(png_ptr, PNG_ERROR_ACTION_NONE, + PNG_RGB_TO_GRAY_DEFAULT, PNG_RGB_TO_GRAY_DEFAULT); + } + + change &= ~PNG_FORMAT_FLAG_COLOR; + } + + /* Set the gamma appropriately, linear for 16-bit input, sRGB otherwise. + */ + { + png_fixed_point input_gamma_default; + + if ((base_format & PNG_FORMAT_FLAG_LINEAR) && + (image->flags & PNG_IMAGE_FLAG_16BIT_sRGB) == 0) + input_gamma_default = PNG_GAMMA_LINEAR; + else + input_gamma_default = PNG_DEFAULT_sRGB; + + /* Call png_set_alpha_mode to set the default for the input gamma; the + * output gamma is set by a second call below. + */ + png_set_alpha_mode_fixed(png_ptr, PNG_ALPHA_PNG, input_gamma_default); + } + + if (linear) + { + /* If there *is* an alpha channel in the input it must be multiplied + * out; use PNG_ALPHA_STANDARD, otherwise just use PNG_ALPHA_PNG. + */ + if (base_format & PNG_FORMAT_FLAG_ALPHA) + mode = PNG_ALPHA_STANDARD; /* associated alpha */ + + else + mode = PNG_ALPHA_PNG; + + output_gamma = PNG_GAMMA_LINEAR; + } + + else + { + mode = PNG_ALPHA_PNG; + output_gamma = PNG_DEFAULT_sRGB; + } + + /* If 'do_local_background' is set check for the presence of gamma + * correction; this is part of the work-round for the libpng bug + * described above. + * + * TODO: fix libpng and remove this. + */ + if (do_local_background) + { + png_fixed_point gtest; + + /* This is 'png_gamma_threshold' from pngrtran.c; the test used for + * gamma correction, the screen gamma hasn't been set on png_struct + * yet; it's set below. png_struct::gamma, however, is set to the + * final value. + */ + if (png_muldiv(>est, output_gamma, png_ptr->colorspace.gamma, + PNG_FP_1) && !png_gamma_significant(gtest)) + do_local_background = 0; + + else if (mode == PNG_ALPHA_STANDARD) + { + do_local_background = 2/*required*/; + mode = PNG_ALPHA_PNG; /* prevent libpng doing it */ + } + + /* else leave as 1 for the checks below */ + } + + /* If the bit-depth changes then handle that here. */ + if (change & PNG_FORMAT_FLAG_LINEAR) + { + if (linear /*16-bit output*/) + png_set_expand_16(png_ptr); + + else /* 8-bit output */ + png_set_scale_16(png_ptr); + + change &= ~PNG_FORMAT_FLAG_LINEAR; + } + + /* Now the background/alpha channel changes. */ + if (change & PNG_FORMAT_FLAG_ALPHA) + { + /* Removing an alpha channel requires composition for the 8-bit + * formats; for the 16-bit it is already done, above, by the + * pre-multiplication and the channel just needs to be stripped. + */ + if (base_format & PNG_FORMAT_FLAG_ALPHA) + { + /* If RGB->gray is happening the alpha channel must be left and the + * operation completed locally. + * + * TODO: fix libpng and remove this. + */ + if (do_local_background) + do_local_background = 2/*required*/; + + /* 16-bit output: just remove the channel */ + else if (linear) /* compose on black (well, pre-multiply) */ + png_set_strip_alpha(png_ptr); + + /* 8-bit output: do an appropriate compose */ + else if (display->background != NULL) + { + png_color_16 c; + + c.index = 0; /*unused*/ + c.red = display->background->red; + c.green = display->background->green; + c.blue = display->background->blue; + c.gray = display->background->green; + + /* This is always an 8-bit sRGB value, using the 'green' channel + * for gray is much better than calculating the luminance here; + * we can get off-by-one errors in that calculation relative to + * the app expectations and that will show up in transparent + * pixels. + */ + png_set_background_fixed(png_ptr, &c, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*need_expand*/, + 0/*gamma: not used*/); + } + + else /* compose on row: implemented below. */ + { + do_local_compose = 1; + /* This leaves the alpha channel in the output, so it has to be + * removed by the code below. Set the encoding to the 'OPTIMIZE' + * one so the code only has to hack on the pixels that require + * composition. + */ + mode = PNG_ALPHA_OPTIMIZED; + } + } + + else /* output needs an alpha channel */ + { + /* This is tricky because it happens before the swap operation has + * been accomplished; however, the swap does *not* swap the added + * alpha channel (weird API), so it must be added in the correct + * place. + */ + png_uint_32 filler; /* opaque filler */ + int where; + + if (linear) + filler = 65535; + + else + filler = 255; + +# ifdef PNG_FORMAT_AFIRST_SUPPORTED + if (format & PNG_FORMAT_FLAG_AFIRST) + { + where = PNG_FILLER_BEFORE; + change &= ~PNG_FORMAT_FLAG_AFIRST; + } + + else +# endif + where = PNG_FILLER_AFTER; + + png_set_add_alpha(png_ptr, filler, where); + } + + /* This stops the (irrelevant) call to swap_alpha below. */ + change &= ~PNG_FORMAT_FLAG_ALPHA; + } + + /* Now set the alpha mode correctly; this is always done, even if there is + * no alpha channel in either the input or the output because it correctly + * sets the output gamma. + */ + png_set_alpha_mode_fixed(png_ptr, mode, output_gamma); + +# ifdef PNG_FORMAT_BGR_SUPPORTED + if (change & PNG_FORMAT_FLAG_BGR) + { + /* Check only the output format; PNG is never BGR; don't do this if + * the output is gray, but fix up the 'format' value in that case. + */ + if (format & PNG_FORMAT_FLAG_COLOR) + png_set_bgr(png_ptr); + + else + format &= ~PNG_FORMAT_FLAG_BGR; + + change &= ~PNG_FORMAT_FLAG_BGR; + } +# endif + +# ifdef PNG_FORMAT_AFIRST_SUPPORTED + if (change & PNG_FORMAT_FLAG_AFIRST) + { + /* Only relevant if there is an alpha channel - it's particularly + * important to handle this correctly because do_local_compose may + * be set above and then libpng will keep the alpha channel for this + * code to remove. + */ + if (format & PNG_FORMAT_FLAG_ALPHA) + { + /* Disable this if doing a local background, + * TODO: remove this when local background is no longer required. + */ + if (do_local_background != 2) + png_set_swap_alpha(png_ptr); + } + + else + format &= ~PNG_FORMAT_FLAG_AFIRST; + + change &= ~PNG_FORMAT_FLAG_AFIRST; + } +# endif + + /* If the *output* is 16-bit then we need to check for a byte-swap on this + * architecture. + */ + if (linear) + { + PNG_CONST png_uint_16 le = 0x0001; + + if (*(png_const_bytep)&le) + png_set_swap(png_ptr); + } + + /* If change is not now 0 some transformation is missing - error out. */ + if (change) + png_error(png_ptr, "png_read_image: unsupported transformation"); + } + + PNG_SKIP_CHUNKS(png_ptr); + + /* Update the 'info' structure and make sure the result is as required; first + * make sure to turn on the interlace handling if it will be required + * (because it can't be turned on *after* the call to png_read_update_info!) + * + * TODO: remove the do_local_background fixup below. + */ + if (!do_local_compose && do_local_background != 2) + passes = png_set_interlace_handling(png_ptr); + + png_read_update_info(png_ptr, info_ptr); + + { + png_uint_32 info_format = 0; + + if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) + info_format |= PNG_FORMAT_FLAG_COLOR; + + if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) + { + /* do_local_compose removes this channel below. */ + if (!do_local_compose) + { + /* do_local_background does the same if required. */ + if (do_local_background != 2 || + (format & PNG_FORMAT_FLAG_ALPHA) != 0) + info_format |= PNG_FORMAT_FLAG_ALPHA; + } + } + + else if (do_local_compose) /* internal error */ + png_error(png_ptr, "png_image_read: alpha channel lost"); + + if (info_ptr->bit_depth == 16) + info_format |= PNG_FORMAT_FLAG_LINEAR; + +# ifdef PNG_FORMAT_BGR_SUPPORTED + if (png_ptr->transformations & PNG_BGR) + info_format |= PNG_FORMAT_FLAG_BGR; +# endif + +# ifdef PNG_FORMAT_AFIRST_SUPPORTED + if (do_local_background == 2) + { + if (format & PNG_FORMAT_FLAG_AFIRST) + info_format |= PNG_FORMAT_FLAG_AFIRST; + } + + if ((png_ptr->transformations & PNG_SWAP_ALPHA) != 0 || + ((png_ptr->transformations & PNG_ADD_ALPHA) != 0 && + (png_ptr->flags & PNG_FLAG_FILLER_AFTER) == 0)) + { + if (do_local_background == 2) + png_error(png_ptr, "unexpected alpha swap transformation"); + + info_format |= PNG_FORMAT_FLAG_AFIRST; + } +# endif + + /* This is actually an internal error. */ + if (info_format != format) + png_error(png_ptr, "png_read_image: invalid transformations"); + } + + /* Now read the rows. If do_local_compose is set then it is necessary to use + * a local row buffer. The output will be GA, RGBA or BGRA and must be + * converted to G, RGB or BGR as appropriate. The 'local_row' member of the + * display acts as a flag. + */ + { + png_voidp first_row = display->buffer; + ptrdiff_t row_bytes = display->row_stride; + + if (linear) + row_bytes *= 2; + + /* The following expression is designed to work correctly whether it gives + * a signed or an unsigned result. + */ + if (row_bytes < 0) + { + char *ptr = png_voidcast(char*, first_row); + ptr += (image->height-1) * (-row_bytes); + first_row = png_voidcast(png_voidp, ptr); + } + + display->first_row = first_row; + display->row_bytes = row_bytes; + } + + if (do_local_compose) + { + int result; + png_voidp row = png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr)); + + display->local_row = row; + result = png_safe_execute(image, png_image_read_composite, display); + display->local_row = NULL; + png_free(png_ptr, row); + + return result; + } + + else if (do_local_background == 2) + { + int result; + png_voidp row = png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr)); + + display->local_row = row; + result = png_safe_execute(image, png_image_read_background, display); + display->local_row = NULL; + png_free(png_ptr, row); + + return result; + } + + else + { + png_alloc_size_t row_bytes = display->row_bytes; + + while (--passes >= 0) + { + png_uint_32 y = image->height; + png_bytep row = png_voidcast(png_bytep, display->first_row); + + while (y-- > 0) + { + png_read_row(png_ptr, row, NULL); + row += row_bytes; + } + } + + return 1; + } +} + +int PNGAPI +png_image_finish_read(png_imagep image, png_const_colorp background, + void *buffer, png_int_32 row_stride, void *colormap) +{ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + png_uint_32 check; + + if (row_stride == 0) + row_stride = PNG_IMAGE_ROW_STRIDE(*image); + + if (row_stride < 0) + check = -row_stride; + + else + check = row_stride; + + if (image->opaque != NULL && buffer != NULL && + check >= PNG_IMAGE_ROW_STRIDE(*image)) + { + if ((image->format & PNG_FORMAT_FLAG_COLORMAP) == 0 || + (image->colormap_entries > 0 && colormap != NULL)) + { + int result; + png_image_read_control display; + + memset(&display, 0, (sizeof display)); + display.image = image; + display.buffer = buffer; + display.row_stride = row_stride; + display.colormap = colormap; + display.background = background; + display.local_row = NULL; + + /* Choose the correct 'end' routine; for the color-map case all the + * setup has already been done. + */ + if (image->format & PNG_FORMAT_FLAG_COLORMAP) + result = + png_safe_execute(image, png_image_read_colormap, &display) && + png_safe_execute(image, png_image_read_colormapped, &display); + + else + result = + png_safe_execute(image, png_image_read_direct, &display); + + png_image_free(image); + return result; + } + + else + return png_image_error(image, + "png_image_finish_read[color-map]: no color-map"); + } + + else + return png_image_error(image, + "png_image_finish_read: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_finish_read: damaged PNG_IMAGE_VERSION"); + + return 0; +} + +#endif /* PNG_SIMPLIFIED_READ_SUPPORTED */ +#endif /* PNG_READ_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngrio.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngrio.c new file mode 100644 index 0000000000..d7864407bd --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngrio.c @@ -0,0 +1,118 @@ + +/* pngrio.c - functions for data input + * + * Last changed in libpng 1.6.0 [February 14, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file provides a location for all input. Users who need + * special handling are expected to write a function that has the same + * arguments as this and performs a similar function, but that possibly + * has a different input method. Note that you shouldn't change this + * function, but rather write a replacement function and then make + * libpng use it at run time with png_set_read_fn(...). + */ + +#include "pngpriv.h" + +#ifdef PNG_READ_SUPPORTED + +/* Read the data from whatever input you are using. The default routine + * reads from a file pointer. Note that this routine sometimes gets called + * with very small lengths, so you should implement some kind of simple + * buffering if you are using unbuffered reads. This should never be asked + * to read more then 64K on a 16 bit machine. + */ +void /* PRIVATE */ +png_read_data(png_structrp png_ptr, png_bytep data, png_size_t length) +{ + png_debug1(4, "reading %d bytes", (int)length); + + if (png_ptr->read_data_fn != NULL) + (*(png_ptr->read_data_fn))(png_ptr, data, length); + + else + png_error(png_ptr, "Call to NULL read function"); +} + +#ifdef PNG_STDIO_SUPPORTED +/* This is the function that does the actual reading of data. If you are + * not reading from a standard C stream, you should create a replacement + * read_data function and use it at run time with png_set_read_fn(), rather + * than changing the library. + */ +void PNGCBAPI +png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_size_t check; + + if (png_ptr == NULL) + return; + + /* fread() returns 0 on error, so it is OK to store this in a png_size_t + * instead of an int, which is what fread() actually returns. + */ + check = fread(data, 1, length, png_voidcast(png_FILE_p, png_ptr->io_ptr)); + + if (check != length) + png_error(png_ptr, "Read Error"); +} +#endif + +/* This function allows the application to supply a new input function + * for libpng if standard C streams aren't being used. + * + * This function takes as its arguments: + * + * png_ptr - pointer to a png input data structure + * + * io_ptr - pointer to user supplied structure containing info about + * the input functions. May be NULL. + * + * read_data_fn - pointer to a new input function that takes as its + * arguments a pointer to a png_struct, a pointer to + * a location where input data can be stored, and a 32-bit + * unsigned int that is the number of bytes to be read. + * To exit and output any fatal error messages the new write + * function should call png_error(png_ptr, "Error msg"). + * May be NULL, in which case libpng's default function will + * be used. + */ +void PNGAPI +png_set_read_fn(png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr read_data_fn) +{ + if (png_ptr == NULL) + return; + + png_ptr->io_ptr = io_ptr; + +#ifdef PNG_STDIO_SUPPORTED + if (read_data_fn != NULL) + png_ptr->read_data_fn = read_data_fn; + + else + png_ptr->read_data_fn = png_default_read_data; +#else + png_ptr->read_data_fn = read_data_fn; +#endif + + /* It is an error to write to a read device */ + if (png_ptr->write_data_fn != NULL) + { + png_ptr->write_data_fn = NULL; + png_warning(png_ptr, + "Can't set both read_data_fn and write_data_fn in the" + " same structure"); + } + +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_ptr->output_flush_fn = NULL; +#endif +} +#endif /* PNG_READ_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngrtran.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngrtran.c new file mode 100644 index 0000000000..e378ceba4e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngrtran.c @@ -0,0 +1,5101 @@ + +/* pngrtran.c - transforms the data in a row for PNG readers + * + * Last changed in libpng 1.6.2 [April 25, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file contains functions optionally called by an application + * in order to tell libpng how to handle data when reading a PNG. + * Transformations that are used in both reading and writing are + * in pngtrans.c. + */ + +#include "pngpriv.h" + +#ifdef PNG_READ_SUPPORTED + +/* Set the action on getting a CRC error for an ancillary or critical chunk. */ +void PNGAPI +png_set_crc_action(png_structrp png_ptr, int crit_action, int ancil_action) +{ + png_debug(1, "in png_set_crc_action"); + + if (png_ptr == NULL) + return; + + /* Tell libpng how we react to CRC errors in critical chunks */ + switch (crit_action) + { + case PNG_CRC_NO_CHANGE: /* Leave setting as is */ + break; + + case PNG_CRC_WARN_USE: /* Warn/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; + png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE; + break; + + case PNG_CRC_QUIET_USE: /* Quiet/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; + png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE | + PNG_FLAG_CRC_CRITICAL_IGNORE; + break; + + case PNG_CRC_WARN_DISCARD: /* Not a valid action for critical data */ + png_warning(png_ptr, + "Can't discard critical data on CRC error"); + case PNG_CRC_ERROR_QUIT: /* Error/quit */ + + case PNG_CRC_DEFAULT: + default: + png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; + break; + } + + /* Tell libpng how we react to CRC errors in ancillary chunks */ + switch (ancil_action) + { + case PNG_CRC_NO_CHANGE: /* Leave setting as is */ + break; + + case PNG_CRC_WARN_USE: /* Warn/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE; + break; + + case PNG_CRC_QUIET_USE: /* Quiet/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE | + PNG_FLAG_CRC_ANCILLARY_NOWARN; + break; + + case PNG_CRC_ERROR_QUIT: /* Error/quit */ + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_NOWARN; + break; + + case PNG_CRC_WARN_DISCARD: /* Warn/discard data */ + + case PNG_CRC_DEFAULT: + default: + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + break; + } +} + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +/* Is it OK to set a transformation now? Only if png_start_read_image or + * png_read_update_info have not been called. It is not necessary for the IHDR + * to have been read in all cases, the parameter allows for this check too. + */ +static int +png_rtran_ok(png_structrp png_ptr, int need_IHDR) +{ + if (png_ptr != NULL) + { + if (png_ptr->flags & PNG_FLAG_ROW_INIT) + png_app_error(png_ptr, + "invalid after png_start_read_image or png_read_update_info"); + + else if (need_IHDR && (png_ptr->mode & PNG_HAVE_IHDR) == 0) + png_app_error(png_ptr, "invalid before the PNG header has been read"); + + else + { + /* Turn on failure to initialize correctly for all transforms. */ + png_ptr->flags |= PNG_FLAG_DETECT_UNINITIALIZED; + + return 1; /* Ok */ + } + } + + return 0; /* no png_error possible! */ +} +#endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED +/* Handle alpha and tRNS via a background color */ +void PNGFAPI +png_set_background_fixed(png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, png_fixed_point background_gamma) +{ + png_debug(1, "in png_set_background_fixed"); + + if (!png_rtran_ok(png_ptr, 0) || background_color == NULL) + return; + + if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN) + { + png_warning(png_ptr, "Application must supply a known background gamma"); + return; + } + + png_ptr->transformations |= PNG_COMPOSE | PNG_STRIP_ALPHA; + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + + png_ptr->background = *background_color; + png_ptr->background_gamma = background_gamma; + png_ptr->background_gamma_type = (png_byte)(background_gamma_code); + if (need_expand) + png_ptr->transformations |= PNG_BACKGROUND_EXPAND; + else + png_ptr->transformations &= ~PNG_BACKGROUND_EXPAND; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_background(png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma) +{ + png_set_background_fixed(png_ptr, background_color, background_gamma_code, + need_expand, png_fixed(png_ptr, background_gamma, "png_set_background")); +} +# endif /* FLOATING_POINT */ +#endif /* READ_BACKGROUND */ + +/* Scale 16-bit depth files to 8-bit depth. If both of these are set then the + * one that pngrtran does first (scale) happens. This is necessary to allow the + * TRANSFORM and API behavior to be somewhat consistent, and it's simpler. + */ +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +void PNGAPI +png_set_scale_16(png_structrp png_ptr) +{ + png_debug(1, "in png_set_scale_16"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + png_ptr->transformations |= PNG_SCALE_16_TO_8; +} +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +/* Chop 16-bit depth files to 8-bit depth */ +void PNGAPI +png_set_strip_16(png_structrp png_ptr) +{ + png_debug(1, "in png_set_strip_16"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + png_ptr->transformations |= PNG_16_TO_8; +} +#endif + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED +void PNGAPI +png_set_strip_alpha(png_structrp png_ptr) +{ + png_debug(1, "in png_set_strip_alpha"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + png_ptr->transformations |= PNG_STRIP_ALPHA; +} +#endif + +#if defined(PNG_READ_ALPHA_MODE_SUPPORTED) || defined(PNG_READ_GAMMA_SUPPORTED) +static png_fixed_point +translate_gamma_flags(png_structrp png_ptr, png_fixed_point output_gamma, + int is_screen) +{ + /* Check for flag values. The main reason for having the old Mac value as a + * flag is that it is pretty near impossible to work out what the correct + * value is from Apple documentation - a working Mac system is needed to + * discover the value! + */ + if (output_gamma == PNG_DEFAULT_sRGB || + output_gamma == PNG_FP_1 / PNG_DEFAULT_sRGB) + { + /* If there is no sRGB support this just sets the gamma to the standard + * sRGB value. (This is a side effect of using this function!) + */ +# ifdef PNG_READ_sRGB_SUPPORTED + png_ptr->flags |= PNG_FLAG_ASSUME_sRGB; +# else + PNG_UNUSED(png_ptr) +# endif + if (is_screen) + output_gamma = PNG_GAMMA_sRGB; + else + output_gamma = PNG_GAMMA_sRGB_INVERSE; + } + + else if (output_gamma == PNG_GAMMA_MAC_18 || + output_gamma == PNG_FP_1 / PNG_GAMMA_MAC_18) + { + if (is_screen) + output_gamma = PNG_GAMMA_MAC_OLD; + else + output_gamma = PNG_GAMMA_MAC_INVERSE; + } + + return output_gamma; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +static png_fixed_point +convert_gamma_value(png_structrp png_ptr, double output_gamma) +{ + /* The following silently ignores cases where fixed point (times 100,000) + * gamma values are passed to the floating point API. This is safe and it + * means the fixed point constants work just fine with the floating point + * API. The alternative would just lead to undetected errors and spurious + * bug reports. Negative values fail inside the _fixed API unless they + * correspond to the flag values. + */ + if (output_gamma > 0 && output_gamma < 128) + output_gamma *= PNG_FP_1; + + /* This preserves -1 and -2 exactly: */ + output_gamma = floor(output_gamma + .5); + + if (output_gamma > PNG_FP_MAX || output_gamma < PNG_FP_MIN) + png_fixed_error(png_ptr, "gamma value"); + + return (png_fixed_point)output_gamma; +} +# endif +#endif /* READ_ALPHA_MODE || READ_GAMMA */ + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +void PNGFAPI +png_set_alpha_mode_fixed(png_structrp png_ptr, int mode, + png_fixed_point output_gamma) +{ + int compose = 0; + png_fixed_point file_gamma; + + png_debug(1, "in png_set_alpha_mode"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + output_gamma = translate_gamma_flags(png_ptr, output_gamma, 1/*screen*/); + + /* Validate the value to ensure it is in a reasonable range. The value + * is expected to be 1 or greater, but this range test allows for some + * viewing correction values. The intent is to weed out users of this API + * who use the inverse of the gamma value accidentally! Since some of these + * values are reasonable this may have to be changed. + */ + if (output_gamma < 70000 || output_gamma > 300000) + png_error(png_ptr, "output gamma out of expected range"); + + /* The default file gamma is the inverse of the output gamma; the output + * gamma may be changed below so get the file value first: + */ + file_gamma = png_reciprocal(output_gamma); + + /* There are really 8 possibilities here, composed of any combination + * of: + * + * premultiply the color channels + * do not encode non-opaque pixels + * encode the alpha as well as the color channels + * + * The differences disappear if the input/output ('screen') gamma is 1.0, + * because then the encoding is a no-op and there is only the choice of + * premultiplying the color channels or not. + * + * png_set_alpha_mode and png_set_background interact because both use + * png_compose to do the work. Calling both is only useful when + * png_set_alpha_mode is used to set the default mode - PNG_ALPHA_PNG - along + * with a default gamma value. Otherwise PNG_COMPOSE must not be set. + */ + switch (mode) + { + case PNG_ALPHA_PNG: /* default: png standard */ + /* No compose, but it may be set by png_set_background! */ + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + break; + + case PNG_ALPHA_ASSOCIATED: /* color channels premultiplied */ + compose = 1; + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + /* The output is linear: */ + output_gamma = PNG_FP_1; + break; + + case PNG_ALPHA_OPTIMIZED: /* associated, non-opaque pixels linear */ + compose = 1; + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags |= PNG_FLAG_OPTIMIZE_ALPHA; + /* output_gamma records the encoding of opaque pixels! */ + break; + + case PNG_ALPHA_BROKEN: /* associated, non-linear, alpha encoded */ + compose = 1; + png_ptr->transformations |= PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + break; + + default: + png_error(png_ptr, "invalid alpha mode"); + } + + /* Only set the default gamma if the file gamma has not been set (this has + * the side effect that the gamma in a second call to png_set_alpha_mode will + * be ignored.) + */ + if (png_ptr->colorspace.gamma == 0) + { + png_ptr->colorspace.gamma = file_gamma; + png_ptr->colorspace.flags |= PNG_COLORSPACE_HAVE_GAMMA; + } + + /* But always set the output gamma: */ + png_ptr->screen_gamma = output_gamma; + + /* Finally, if pre-multiplying, set the background fields to achieve the + * desired result. + */ + if (compose) + { + /* And obtain alpha pre-multiplication by composing on black: */ + memset(&png_ptr->background, 0, (sizeof png_ptr->background)); + png_ptr->background_gamma = png_ptr->colorspace.gamma; /* just in case */ + png_ptr->background_gamma_type = PNG_BACKGROUND_GAMMA_FILE; + png_ptr->transformations &= ~PNG_BACKGROUND_EXPAND; + + if (png_ptr->transformations & PNG_COMPOSE) + png_error(png_ptr, + "conflicting calls to set alpha mode and background"); + + png_ptr->transformations |= PNG_COMPOSE; + } +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_alpha_mode(png_structrp png_ptr, int mode, double output_gamma) +{ + png_set_alpha_mode_fixed(png_ptr, mode, convert_gamma_value(png_ptr, + output_gamma)); +} +# endif +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* Dither file to 8-bit. Supply a palette, the current number + * of elements in the palette, the maximum number of elements + * allowed, and a histogram if possible. If the current number + * of colors is greater then the maximum number, the palette will be + * modified to fit in the maximum number. "full_quantize" indicates + * whether we need a quantizing cube set up for RGB images, or if we + * simply are reducing the number of colors in a paletted image. + */ + +typedef struct png_dsort_struct +{ + struct png_dsort_struct * next; + png_byte left; + png_byte right; +} png_dsort; +typedef png_dsort * png_dsortp; +typedef png_dsort * * png_dsortpp; + +void PNGAPI +png_set_quantize(png_structrp png_ptr, png_colorp palette, + int num_palette, int maximum_colors, png_const_uint_16p histogram, + int full_quantize) +{ + png_debug(1, "in png_set_quantize"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + png_ptr->transformations |= PNG_QUANTIZE; + + if (!full_quantize) + { + int i; + + png_ptr->quantize_index = (png_bytep)png_malloc(png_ptr, + (png_uint_32)(num_palette * (sizeof (png_byte)))); + for (i = 0; i < num_palette; i++) + png_ptr->quantize_index[i] = (png_byte)i; + } + + if (num_palette > maximum_colors) + { + if (histogram != NULL) + { + /* This is easy enough, just throw out the least used colors. + * Perhaps not the best solution, but good enough. + */ + + int i; + + /* Initialize an array to sort colors */ + png_ptr->quantize_sort = (png_bytep)png_malloc(png_ptr, + (png_uint_32)(num_palette * (sizeof (png_byte)))); + + /* Initialize the quantize_sort array */ + for (i = 0; i < num_palette; i++) + png_ptr->quantize_sort[i] = (png_byte)i; + + /* Find the least used palette entries by starting a + * bubble sort, and running it until we have sorted + * out enough colors. Note that we don't care about + * sorting all the colors, just finding which are + * least used. + */ + + for (i = num_palette - 1; i >= maximum_colors; i--) + { + int done; /* To stop early if the list is pre-sorted */ + int j; + + done = 1; + for (j = 0; j < i; j++) + { + if (histogram[png_ptr->quantize_sort[j]] + < histogram[png_ptr->quantize_sort[j + 1]]) + { + png_byte t; + + t = png_ptr->quantize_sort[j]; + png_ptr->quantize_sort[j] = png_ptr->quantize_sort[j + 1]; + png_ptr->quantize_sort[j + 1] = t; + done = 0; + } + } + + if (done) + break; + } + + /* Swap the palette around, and set up a table, if necessary */ + if (full_quantize) + { + int j = num_palette; + + /* Put all the useful colors within the max, but don't + * move the others. + */ + for (i = 0; i < maximum_colors; i++) + { + if ((int)png_ptr->quantize_sort[i] >= maximum_colors) + { + do + j--; + while ((int)png_ptr->quantize_sort[j] >= maximum_colors); + + palette[i] = palette[j]; + } + } + } + else + { + int j = num_palette; + + /* Move all the used colors inside the max limit, and + * develop a translation table. + */ + for (i = 0; i < maximum_colors; i++) + { + /* Only move the colors we need to */ + if ((int)png_ptr->quantize_sort[i] >= maximum_colors) + { + png_color tmp_color; + + do + j--; + while ((int)png_ptr->quantize_sort[j] >= maximum_colors); + + tmp_color = palette[j]; + palette[j] = palette[i]; + palette[i] = tmp_color; + /* Indicate where the color went */ + png_ptr->quantize_index[j] = (png_byte)i; + png_ptr->quantize_index[i] = (png_byte)j; + } + } + + /* Find closest color for those colors we are not using */ + for (i = 0; i < num_palette; i++) + { + if ((int)png_ptr->quantize_index[i] >= maximum_colors) + { + int min_d, k, min_k, d_index; + + /* Find the closest color to one we threw out */ + d_index = png_ptr->quantize_index[i]; + min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); + for (k = 1, min_k = 0; k < maximum_colors; k++) + { + int d; + + d = PNG_COLOR_DIST(palette[d_index], palette[k]); + + if (d < min_d) + { + min_d = d; + min_k = k; + } + } + /* Point to closest color */ + png_ptr->quantize_index[i] = (png_byte)min_k; + } + } + } + png_free(png_ptr, png_ptr->quantize_sort); + png_ptr->quantize_sort = NULL; + } + else + { + /* This is much harder to do simply (and quickly). Perhaps + * we need to go through a median cut routine, but those + * don't always behave themselves with only a few colors + * as input. So we will just find the closest two colors, + * and throw out one of them (chosen somewhat randomly). + * [We don't understand this at all, so if someone wants to + * work on improving it, be our guest - AED, GRP] + */ + int i; + int max_d; + int num_new_palette; + png_dsortp t; + png_dsortpp hash; + + t = NULL; + + /* Initialize palette index arrays */ + png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr, + (png_uint_32)(num_palette * (sizeof (png_byte)))); + png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr, + (png_uint_32)(num_palette * (sizeof (png_byte)))); + + /* Initialize the sort array */ + for (i = 0; i < num_palette; i++) + { + png_ptr->index_to_palette[i] = (png_byte)i; + png_ptr->palette_to_index[i] = (png_byte)i; + } + + hash = (png_dsortpp)png_calloc(png_ptr, (png_uint_32)(769 * + (sizeof (png_dsortp)))); + + num_new_palette = num_palette; + + /* Initial wild guess at how far apart the farthest pixel + * pair we will be eliminating will be. Larger + * numbers mean more areas will be allocated, Smaller + * numbers run the risk of not saving enough data, and + * having to do this all over again. + * + * I have not done extensive checking on this number. + */ + max_d = 96; + + while (num_new_palette > maximum_colors) + { + for (i = 0; i < num_new_palette - 1; i++) + { + int j; + + for (j = i + 1; j < num_new_palette; j++) + { + int d; + + d = PNG_COLOR_DIST(palette[i], palette[j]); + + if (d <= max_d) + { + + t = (png_dsortp)png_malloc_warn(png_ptr, + (png_uint_32)(sizeof (png_dsort))); + + if (t == NULL) + break; + + t->next = hash[d]; + t->left = (png_byte)i; + t->right = (png_byte)j; + hash[d] = t; + } + } + if (t == NULL) + break; + } + + if (t != NULL) + for (i = 0; i <= max_d; i++) + { + if (hash[i] != NULL) + { + png_dsortp p; + + for (p = hash[i]; p; p = p->next) + { + if ((int)png_ptr->index_to_palette[p->left] + < num_new_palette && + (int)png_ptr->index_to_palette[p->right] + < num_new_palette) + { + int j, next_j; + + if (num_new_palette & 0x01) + { + j = p->left; + next_j = p->right; + } + else + { + j = p->right; + next_j = p->left; + } + + num_new_palette--; + palette[png_ptr->index_to_palette[j]] + = palette[num_new_palette]; + if (!full_quantize) + { + int k; + + for (k = 0; k < num_palette; k++) + { + if (png_ptr->quantize_index[k] == + png_ptr->index_to_palette[j]) + png_ptr->quantize_index[k] = + png_ptr->index_to_palette[next_j]; + + if ((int)png_ptr->quantize_index[k] == + num_new_palette) + png_ptr->quantize_index[k] = + png_ptr->index_to_palette[j]; + } + } + + png_ptr->index_to_palette[png_ptr->palette_to_index + [num_new_palette]] = png_ptr->index_to_palette[j]; + + png_ptr->palette_to_index[png_ptr->index_to_palette[j]] + = png_ptr->palette_to_index[num_new_palette]; + + png_ptr->index_to_palette[j] = + (png_byte)num_new_palette; + + png_ptr->palette_to_index[num_new_palette] = + (png_byte)j; + } + if (num_new_palette <= maximum_colors) + break; + } + if (num_new_palette <= maximum_colors) + break; + } + } + + for (i = 0; i < 769; i++) + { + if (hash[i] != NULL) + { + png_dsortp p = hash[i]; + while (p) + { + t = p->next; + png_free(png_ptr, p); + p = t; + } + } + hash[i] = 0; + } + max_d += 96; + } + png_free(png_ptr, hash); + png_free(png_ptr, png_ptr->palette_to_index); + png_free(png_ptr, png_ptr->index_to_palette); + png_ptr->palette_to_index = NULL; + png_ptr->index_to_palette = NULL; + } + num_palette = maximum_colors; + } + if (png_ptr->palette == NULL) + { + png_ptr->palette = palette; + } + png_ptr->num_palette = (png_uint_16)num_palette; + + if (full_quantize) + { + int i; + png_bytep distance; + int total_bits = PNG_QUANTIZE_RED_BITS + PNG_QUANTIZE_GREEN_BITS + + PNG_QUANTIZE_BLUE_BITS; + int num_red = (1 << PNG_QUANTIZE_RED_BITS); + int num_green = (1 << PNG_QUANTIZE_GREEN_BITS); + int num_blue = (1 << PNG_QUANTIZE_BLUE_BITS); + png_size_t num_entries = ((png_size_t)1 << total_bits); + + png_ptr->palette_lookup = (png_bytep)png_calloc(png_ptr, + (png_uint_32)(num_entries * (sizeof (png_byte)))); + + distance = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_entries * + (sizeof (png_byte)))); + + memset(distance, 0xff, num_entries * (sizeof (png_byte))); + + for (i = 0; i < num_palette; i++) + { + int ir, ig, ib; + int r = (palette[i].red >> (8 - PNG_QUANTIZE_RED_BITS)); + int g = (palette[i].green >> (8 - PNG_QUANTIZE_GREEN_BITS)); + int b = (palette[i].blue >> (8 - PNG_QUANTIZE_BLUE_BITS)); + + for (ir = 0; ir < num_red; ir++) + { + /* int dr = abs(ir - r); */ + int dr = ((ir > r) ? ir - r : r - ir); + int index_r = (ir << (PNG_QUANTIZE_BLUE_BITS + + PNG_QUANTIZE_GREEN_BITS)); + + for (ig = 0; ig < num_green; ig++) + { + /* int dg = abs(ig - g); */ + int dg = ((ig > g) ? ig - g : g - ig); + int dt = dr + dg; + int dm = ((dr > dg) ? dr : dg); + int index_g = index_r | (ig << PNG_QUANTIZE_BLUE_BITS); + + for (ib = 0; ib < num_blue; ib++) + { + int d_index = index_g | ib; + /* int db = abs(ib - b); */ + int db = ((ib > b) ? ib - b : b - ib); + int dmax = ((dm > db) ? dm : db); + int d = dmax + dt + db; + + if (d < (int)distance[d_index]) + { + distance[d_index] = (png_byte)d; + png_ptr->palette_lookup[d_index] = (png_byte)i; + } + } + } + } + } + + png_free(png_ptr, distance); + } +} +#endif /* PNG_READ_QUANTIZE_SUPPORTED */ + +#ifdef PNG_READ_GAMMA_SUPPORTED +void PNGFAPI +png_set_gamma_fixed(png_structrp png_ptr, png_fixed_point scrn_gamma, + png_fixed_point file_gamma) +{ + png_debug(1, "in png_set_gamma_fixed"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + /* New in libpng-1.5.4 - reserve particular negative values as flags. */ + scrn_gamma = translate_gamma_flags(png_ptr, scrn_gamma, 1/*screen*/); + file_gamma = translate_gamma_flags(png_ptr, file_gamma, 0/*file*/); + + /* Checking the gamma values for being >0 was added in 1.5.4 along with the + * premultiplied alpha support; this actually hides an undocumented feature + * of the previous implementation which allowed gamma processing to be + * disabled in background handling. There is no evidence (so far) that this + * was being used; however, png_set_background itself accepted and must still + * accept '0' for the gamma value it takes, because it isn't always used. + * + * Since this is an API change (albeit a very minor one that removes an + * undocumented API feature) the following checks were only enabled in + * libpng-1.6.0. + */ + if (file_gamma <= 0) + png_error(png_ptr, "invalid file gamma in png_set_gamma"); + + if (scrn_gamma <= 0) + png_error(png_ptr, "invalid screen gamma in png_set_gamma"); + + /* Set the gamma values unconditionally - this overrides the value in the PNG + * file if a gAMA chunk was present. png_set_alpha_mode provides a + * different, easier, way to default the file gamma. + */ + png_ptr->colorspace.gamma = file_gamma; + png_ptr->colorspace.flags |= PNG_COLORSPACE_HAVE_GAMMA; + png_ptr->screen_gamma = scrn_gamma; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_gamma(png_structrp png_ptr, double scrn_gamma, double file_gamma) +{ + png_set_gamma_fixed(png_ptr, convert_gamma_value(png_ptr, scrn_gamma), + convert_gamma_value(png_ptr, file_gamma)); +} +# endif /* FLOATING_POINT_SUPPORTED */ +#endif /* READ_GAMMA */ + +#ifdef PNG_READ_EXPAND_SUPPORTED +/* Expand paletted images to RGB, expand grayscale images of + * less than 8-bit depth to 8-bit depth, and expand tRNS chunks + * to alpha channels. + */ +void PNGAPI +png_set_expand(png_structrp png_ptr) +{ + png_debug(1, "in png_set_expand"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); +} + +/* GRR 19990627: the following three functions currently are identical + * to png_set_expand(). However, it is entirely reasonable that someone + * might wish to expand an indexed image to RGB but *not* expand a single, + * fully transparent palette entry to a full alpha channel--perhaps instead + * convert tRNS to the grayscale/RGB format (16-bit RGB value), or replace + * the transparent color with a particular RGB value, or drop tRNS entirely. + * IOW, a future version of the library may make the transformations flag + * a bit more fine-grained, with separate bits for each of these three + * functions. + * + * More to the point, these functions make it obvious what libpng will be + * doing, whereas "expand" can (and does) mean any number of things. + * + * GRP 20060307: In libpng-1.2.9, png_set_gray_1_2_4_to_8() was modified + * to expand only the sample depth but not to expand the tRNS to alpha + * and its name was changed to png_set_expand_gray_1_2_4_to_8(). + */ + +/* Expand paletted images to RGB. */ +void PNGAPI +png_set_palette_to_rgb(png_structrp png_ptr) +{ + png_debug(1, "in png_set_palette_to_rgb"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); +} + +/* Expand grayscale images of less than 8-bit depth to 8 bits. */ +void PNGAPI +png_set_expand_gray_1_2_4_to_8(png_structrp png_ptr) +{ + png_debug(1, "in png_set_expand_gray_1_2_4_to_8"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + png_ptr->transformations |= PNG_EXPAND; +} + +/* Expand tRNS chunks to alpha channels. */ +void PNGAPI +png_set_tRNS_to_alpha(png_structrp png_ptr) +{ + png_debug(1, "in png_set_tRNS_to_alpha"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); +} +#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */ + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16-bit channels, expand the tRNS chunk too (because otherwise + * it may not work correctly.) + */ +void PNGAPI +png_set_expand_16(png_structrp png_ptr) +{ + png_debug(1, "in png_set_expand_16"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + png_ptr->transformations |= (PNG_EXPAND_16 | PNG_EXPAND | PNG_EXPAND_tRNS); +} +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +void PNGAPI +png_set_gray_to_rgb(png_structrp png_ptr) +{ + png_debug(1, "in png_set_gray_to_rgb"); + + if (!png_rtran_ok(png_ptr, 0)) + return; + + /* Because rgb must be 8 bits or more: */ + png_set_expand_gray_1_2_4_to_8(png_ptr); + png_ptr->transformations |= PNG_GRAY_TO_RGB; +} +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +void PNGFAPI +png_set_rgb_to_gray_fixed(png_structrp png_ptr, int error_action, + png_fixed_point red, png_fixed_point green) +{ + png_debug(1, "in png_set_rgb_to_gray"); + + /* Need the IHDR here because of the check on color_type below. */ + /* TODO: fix this */ + if (!png_rtran_ok(png_ptr, 1)) + return; + + switch(error_action) + { + case PNG_ERROR_ACTION_NONE: + png_ptr->transformations |= PNG_RGB_TO_GRAY; + break; + + case PNG_ERROR_ACTION_WARN: + png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN; + break; + + case PNG_ERROR_ACTION_ERROR: + png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR; + break; + + default: + png_error(png_ptr, "invalid error action to rgb_to_gray"); + break; + } + + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) +#ifdef PNG_READ_EXPAND_SUPPORTED + png_ptr->transformations |= PNG_EXPAND; +#else + { + /* Make this an error in 1.6 because otherwise the application may assume + * that it just worked and get a memory overwrite. + */ + png_error(png_ptr, + "Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED"); + + /* png_ptr->transformations &= ~PNG_RGB_TO_GRAY; */ + } +#endif + { + if (red >= 0 && green >= 0 && red + green <= PNG_FP_1) + { + png_uint_16 red_int, green_int; + + /* NOTE: this calculation does not round, but this behavior is retained + * for consistency, the inaccuracy is very small. The code here always + * overwrites the coefficients, regardless of whether they have been + * defaulted or set already. + */ + red_int = (png_uint_16)(((png_uint_32)red*32768)/100000); + green_int = (png_uint_16)(((png_uint_32)green*32768)/100000); + + png_ptr->rgb_to_gray_red_coeff = red_int; + png_ptr->rgb_to_gray_green_coeff = green_int; + png_ptr->rgb_to_gray_coefficients_set = 1; + } + + else + { + if (red >= 0 && green >= 0) + png_app_warning(png_ptr, + "ignoring out of range rgb_to_gray coefficients"); + + /* Use the defaults, from the cHRM chunk if set, else the historical + * values which are close to the sRGB/HDTV/ITU-Rec 709 values. See + * png_do_rgb_to_gray for more discussion of the values. In this case + * the coefficients are not marked as 'set' and are not overwritten if + * something has already provided a default. + */ + if (png_ptr->rgb_to_gray_red_coeff == 0 && + png_ptr->rgb_to_gray_green_coeff == 0) + { + png_ptr->rgb_to_gray_red_coeff = 6968; + png_ptr->rgb_to_gray_green_coeff = 23434; + /* png_ptr->rgb_to_gray_blue_coeff = 2366; */ + } + } + } +} + +#ifdef PNG_FLOATING_POINT_SUPPORTED +/* Convert a RGB image to a grayscale of the same width. This allows us, + * for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image. + */ + +void PNGAPI +png_set_rgb_to_gray(png_structrp png_ptr, int error_action, double red, + double green) +{ + png_set_rgb_to_gray_fixed(png_ptr, error_action, + png_fixed(png_ptr, red, "rgb to gray red coefficient"), + png_fixed(png_ptr, green, "rgb to gray green coefficient")); +} +#endif /* FLOATING POINT */ + +#endif /* RGB_TO_GRAY */ + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +void PNGAPI +png_set_read_user_transform_fn(png_structrp png_ptr, png_user_transform_ptr + read_user_transform_fn) +{ + png_debug(1, "in png_set_read_user_transform_fn"); + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + png_ptr->transformations |= PNG_USER_TRANSFORM; + png_ptr->read_user_transform_fn = read_user_transform_fn; +#endif +} +#endif + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +#ifdef PNG_READ_GAMMA_SUPPORTED +/* In the case of gamma transformations only do transformations on images where + * the [file] gamma and screen_gamma are not close reciprocals, otherwise it + * slows things down slightly, and also needlessly introduces small errors. + */ +static int /* PRIVATE */ +png_gamma_threshold(png_fixed_point screen_gamma, png_fixed_point file_gamma) +{ + /* PNG_GAMMA_THRESHOLD is the threshold for performing gamma + * correction as a difference of the overall transform from 1.0 + * + * We want to compare the threshold with s*f - 1, if we get + * overflow here it is because of wacky gamma values so we + * turn on processing anyway. + */ + png_fixed_point gtest; + return !png_muldiv(>est, screen_gamma, file_gamma, PNG_FP_1) || + png_gamma_significant(gtest); +} +#endif + +/* Initialize everything needed for the read. This includes modifying + * the palette. + */ + +/*For the moment 'png_init_palette_transformations' and + * 'png_init_rgb_transformations' only do some flag canceling optimizations. + * The intent is that these two routines should have palette or rgb operations + * extracted from 'png_init_read_transformations'. + */ +static void /* PRIVATE */ +png_init_palette_transformations(png_structrp png_ptr) +{ + /* Called to handle the (input) palette case. In png_do_read_transformations + * the first step is to expand the palette if requested, so this code must + * take care to only make changes that are invariant with respect to the + * palette expansion, or only do them if there is no expansion. + * + * STRIP_ALPHA has already been handled in the caller (by setting num_trans + * to 0.) + */ + int input_has_alpha = 0; + int input_has_transparency = 0; + + if (png_ptr->num_trans > 0) + { + int i; + + /* Ignore if all the entries are opaque (unlikely!) */ + for (i=0; inum_trans; ++i) + if (png_ptr->trans_alpha[i] == 255) + continue; + else if (png_ptr->trans_alpha[i] == 0) + input_has_transparency = 1; + else + input_has_alpha = 1; + } + + /* If no alpha we can optimize. */ + if (!input_has_alpha) + { + /* Any alpha means background and associative alpha processing is + * required, however if the alpha is 0 or 1 throughout OPTIIMIZE_ALPHA + * and ENCODE_ALPHA are irrelevant. + */ + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + + if (!input_has_transparency) + png_ptr->transformations &= ~(PNG_COMPOSE | PNG_BACKGROUND_EXPAND); + } + +#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) + /* png_set_background handling - deals with the complexity of whether the + * background color is in the file format or the screen format in the case + * where an 'expand' will happen. + */ + + /* The following code cannot be entered in the alpha pre-multiplication case + * because PNG_BACKGROUND_EXPAND is cancelled below. + */ + if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) && + (png_ptr->transformations & PNG_EXPAND)) + { + { + png_ptr->background.red = + png_ptr->palette[png_ptr->background.index].red; + png_ptr->background.green = + png_ptr->palette[png_ptr->background.index].green; + png_ptr->background.blue = + png_ptr->palette[png_ptr->background.index].blue; + +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED + if (png_ptr->transformations & PNG_INVERT_ALPHA) + { + if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) + { + /* Invert the alpha channel (in tRNS) unless the pixels are + * going to be expanded, in which case leave it for later + */ + int i, istop = png_ptr->num_trans; + + for (i=0; itrans_alpha[i] = (png_byte)(255 - + png_ptr->trans_alpha[i]); + } + } +#endif /* PNG_READ_INVERT_ALPHA_SUPPORTED */ + } + } /* background expand and (therefore) no alpha association. */ +#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */ +} + +static void /* PRIVATE */ +png_init_rgb_transformations(png_structrp png_ptr) +{ + /* Added to libpng-1.5.4: check the color type to determine whether there + * is any alpha or transparency in the image and simply cancel the + * background and alpha mode stuff if there isn't. + */ + int input_has_alpha = (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0; + int input_has_transparency = png_ptr->num_trans > 0; + + /* If no alpha we can optimize. */ + if (!input_has_alpha) + { + /* Any alpha means background and associative alpha processing is + * required, however if the alpha is 0 or 1 throughout OPTIIMIZE_ALPHA + * and ENCODE_ALPHA are irrelevant. + */ +# ifdef PNG_READ_ALPHA_MODE_SUPPORTED + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; +# endif + + if (!input_has_transparency) + png_ptr->transformations &= ~(PNG_COMPOSE | PNG_BACKGROUND_EXPAND); + } + +#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) + /* png_set_background handling - deals with the complexity of whether the + * background color is in the file format or the screen format in the case + * where an 'expand' will happen. + */ + + /* The following code cannot be entered in the alpha pre-multiplication case + * because PNG_BACKGROUND_EXPAND is cancelled below. + */ + if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) && + (png_ptr->transformations & PNG_EXPAND) && + !(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) + /* i.e., GRAY or GRAY_ALPHA */ + { + { + /* Expand background and tRNS chunks */ + int gray = png_ptr->background.gray; + int trans_gray = png_ptr->trans_color.gray; + + switch (png_ptr->bit_depth) + { + case 1: + gray *= 0xff; + trans_gray *= 0xff; + break; + + case 2: + gray *= 0x55; + trans_gray *= 0x55; + break; + + case 4: + gray *= 0x11; + trans_gray *= 0x11; + break; + + default: + + case 8: + /* FALL THROUGH (Already 8 bits) */ + + case 16: + /* Already a full 16 bits */ + break; + } + + png_ptr->background.red = png_ptr->background.green = + png_ptr->background.blue = (png_uint_16)gray; + + if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) + { + png_ptr->trans_color.red = png_ptr->trans_color.green = + png_ptr->trans_color.blue = (png_uint_16)trans_gray; + } + } + } /* background expand and (therefore) no alpha association. */ +#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */ +} + +void /* PRIVATE */ +png_init_read_transformations(png_structrp png_ptr) +{ + png_debug(1, "in png_init_read_transformations"); + + /* This internal function is called from png_read_start_row in pngrutil.c + * and it is called before the 'rowbytes' calculation is done, so the code + * in here can change or update the transformations flags. + * + * First do updates that do not depend on the details of the PNG image data + * being processed. + */ + +#ifdef PNG_READ_GAMMA_SUPPORTED + /* Prior to 1.5.4 these tests were performed from png_set_gamma, 1.5.4 adds + * png_set_alpha_mode and this is another source for a default file gamma so + * the test needs to be performed later - here. In addition prior to 1.5.4 + * the tests were repeated for the PALETTE color type here - this is no + * longer necessary (and doesn't seem to have been necessary before.) + */ + { + /* The following temporary indicates if overall gamma correction is + * required. + */ + int gamma_correction = 0; + + if (png_ptr->colorspace.gamma != 0) /* has been set */ + { + if (png_ptr->screen_gamma != 0) /* screen set too */ + gamma_correction = png_gamma_threshold(png_ptr->colorspace.gamma, + png_ptr->screen_gamma); + + else + /* Assume the output matches the input; a long time default behavior + * of libpng, although the standard has nothing to say about this. + */ + png_ptr->screen_gamma = png_reciprocal(png_ptr->colorspace.gamma); + } + + else if (png_ptr->screen_gamma != 0) + /* The converse - assume the file matches the screen, note that this + * perhaps undesireable default can (from 1.5.4) be changed by calling + * png_set_alpha_mode (even if the alpha handling mode isn't required + * or isn't changed from the default.) + */ + png_ptr->colorspace.gamma = png_reciprocal(png_ptr->screen_gamma); + + else /* neither are set */ + /* Just in case the following prevents any processing - file and screen + * are both assumed to be linear and there is no way to introduce a + * third gamma value other than png_set_background with 'UNIQUE', and, + * prior to 1.5.4 + */ + png_ptr->screen_gamma = png_ptr->colorspace.gamma = PNG_FP_1; + + /* We have a gamma value now. */ + png_ptr->colorspace.flags |= PNG_COLORSPACE_HAVE_GAMMA; + + /* Now turn the gamma transformation on or off as appropriate. Notice + * that PNG_GAMMA just refers to the file->screen correction. Alpha + * composition may independently cause gamma correction because it needs + * linear data (e.g. if the file has a gAMA chunk but the screen gamma + * hasn't been specified.) In any case this flag may get turned off in + * the code immediately below if the transform can be handled outside the + * row loop. + */ + if (gamma_correction) + png_ptr->transformations |= PNG_GAMMA; + + else + png_ptr->transformations &= ~PNG_GAMMA; + } +#endif + + /* Certain transformations have the effect of preventing other + * transformations that happen afterward in png_do_read_transformations, + * resolve the interdependencies here. From the code of + * png_do_read_transformations the order is: + * + * 1) PNG_EXPAND (including PNG_EXPAND_tRNS) + * 2) PNG_STRIP_ALPHA (if no compose) + * 3) PNG_RGB_TO_GRAY + * 4) PNG_GRAY_TO_RGB iff !PNG_BACKGROUND_IS_GRAY + * 5) PNG_COMPOSE + * 6) PNG_GAMMA + * 7) PNG_STRIP_ALPHA (if compose) + * 8) PNG_ENCODE_ALPHA + * 9) PNG_SCALE_16_TO_8 + * 10) PNG_16_TO_8 + * 11) PNG_QUANTIZE (converts to palette) + * 12) PNG_EXPAND_16 + * 13) PNG_GRAY_TO_RGB iff PNG_BACKGROUND_IS_GRAY + * 14) PNG_INVERT_MONO + * 15) PNG_SHIFT + * 16) PNG_PACK + * 17) PNG_BGR + * 18) PNG_PACKSWAP + * 19) PNG_FILLER (includes PNG_ADD_ALPHA) + * 20) PNG_INVERT_ALPHA + * 21) PNG_SWAP_ALPHA + * 22) PNG_SWAP_BYTES + * 23) PNG_USER_TRANSFORM [must be last] + */ +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_STRIP_ALPHA) && + !(png_ptr->transformations & PNG_COMPOSE)) + { + /* Stripping the alpha channel happens immediately after the 'expand' + * transformations, before all other transformation, so it cancels out + * the alpha handling. It has the side effect negating the effect of + * PNG_EXPAND_tRNS too: + */ + png_ptr->transformations &= ~(PNG_BACKGROUND_EXPAND | PNG_ENCODE_ALPHA | + PNG_EXPAND_tRNS); + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + + /* Kill the tRNS chunk itself too. Prior to 1.5.4 this did not happen + * so transparency information would remain just so long as it wasn't + * expanded. This produces unexpected API changes if the set of things + * that do PNG_EXPAND_tRNS changes (perfectly possible given the + * documentation - which says ask for what you want, accept what you + * get.) This makes the behavior consistent from 1.5.4: + */ + png_ptr->num_trans = 0; + } +#endif /* STRIP_ALPHA supported, no COMPOSE */ + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + /* If the screen gamma is about 1.0 then the OPTIMIZE_ALPHA and ENCODE_ALPHA + * settings will have no effect. + */ + if (!png_gamma_significant(png_ptr->screen_gamma)) + { + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + } +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + /* Make sure the coefficients for the rgb to gray conversion are set + * appropriately. + */ + if (png_ptr->transformations & PNG_RGB_TO_GRAY) + png_colorspace_set_rgb_coefficients(png_ptr); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) + /* Detect gray background and attempt to enable optimization for + * gray --> RGB case. + * + * Note: if PNG_BACKGROUND_EXPAND is set and color_type is either RGB or + * RGB_ALPHA (in which case need_expand is superfluous anyway), the + * background color might actually be gray yet not be flagged as such. + * This is not a problem for the current code, which uses + * PNG_BACKGROUND_IS_GRAY only to decide when to do the + * png_do_gray_to_rgb() transformation. + * + * TODO: this code needs to be revised to avoid the complexity and + * interdependencies. The color type of the background should be recorded in + * png_set_background, along with the bit depth, then the code has a record + * of exactly what color space the background is currently in. + */ + if (png_ptr->transformations & PNG_BACKGROUND_EXPAND) + { + /* PNG_BACKGROUND_EXPAND: the background is in the file color space, so if + * the file was grayscale the background value is gray. + */ + if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) + png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; + } + + else if (png_ptr->transformations & PNG_COMPOSE) + { + /* PNG_COMPOSE: png_set_background was called with need_expand false, + * so the color is in the color space of the output or png_set_alpha_mode + * was called and the color is black. Ignore RGB_TO_GRAY because that + * happens before GRAY_TO_RGB. + */ + if (png_ptr->transformations & PNG_GRAY_TO_RGB) + { + if (png_ptr->background.red == png_ptr->background.green && + png_ptr->background.red == png_ptr->background.blue) + { + png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; + png_ptr->background.gray = png_ptr->background.red; + } + } + } +#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */ +#endif /* PNG_READ_GRAY_TO_RGB_SUPPORTED */ + + /* For indexed PNG data (PNG_COLOR_TYPE_PALETTE) many of the transformations + * can be performed directly on the palette, and some (such as rgb to gray) + * can be optimized inside the palette. This is particularly true of the + * composite (background and alpha) stuff, which can be pretty much all done + * in the palette even if the result is expanded to RGB or gray afterward. + * + * NOTE: this is Not Yet Implemented, the code behaves as in 1.5.1 and + * earlier and the palette stuff is actually handled on the first row. This + * leads to the reported bug that the palette returned by png_get_PLTE is not + * updated. + */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + png_init_palette_transformations(png_ptr); + + else + png_init_rgb_transformations(png_ptr); + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \ + defined(PNG_READ_EXPAND_16_SUPPORTED) + if ((png_ptr->transformations & PNG_EXPAND_16) && + (png_ptr->transformations & PNG_COMPOSE) && + !(png_ptr->transformations & PNG_BACKGROUND_EXPAND) && + png_ptr->bit_depth != 16) + { + /* TODO: fix this. Because the expand_16 operation is after the compose + * handling the background color must be 8, not 16, bits deep, but the + * application will supply a 16-bit value so reduce it here. + * + * The PNG_BACKGROUND_EXPAND code above does not expand to 16 bits at + * present, so that case is ok (until do_expand_16 is moved.) + * + * NOTE: this discards the low 16 bits of the user supplied background + * color, but until expand_16 works properly there is no choice! + */ +# define CHOP(x) (x)=((png_uint_16)PNG_DIV257(x)) + CHOP(png_ptr->background.red); + CHOP(png_ptr->background.green); + CHOP(png_ptr->background.blue); + CHOP(png_ptr->background.gray); +# undef CHOP + } +#endif /* PNG_READ_BACKGROUND_SUPPORTED && PNG_READ_EXPAND_16_SUPPORTED */ + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \ + (defined(PNG_READ_SCALE_16_TO_8_SUPPORTED) || \ + defined(PNG_READ_STRIP_16_TO_8_SUPPORTED)) + if ((png_ptr->transformations & (PNG_16_TO_8|PNG_SCALE_16_TO_8)) && + (png_ptr->transformations & PNG_COMPOSE) && + !(png_ptr->transformations & PNG_BACKGROUND_EXPAND) && + png_ptr->bit_depth == 16) + { + /* On the other hand, if a 16-bit file is to be reduced to 8-bits per + * component this will also happen after PNG_COMPOSE and so the background + * color must be pre-expanded here. + * + * TODO: fix this too. + */ + png_ptr->background.red = (png_uint_16)(png_ptr->background.red * 257); + png_ptr->background.green = + (png_uint_16)(png_ptr->background.green * 257); + png_ptr->background.blue = (png_uint_16)(png_ptr->background.blue * 257); + png_ptr->background.gray = (png_uint_16)(png_ptr->background.gray * 257); + } +#endif + + /* NOTE: below 'PNG_READ_ALPHA_MODE_SUPPORTED' is presumed to also enable the + * background support (see the comments in scripts/pnglibconf.dfa), this + * allows pre-multiplication of the alpha channel to be implemented as + * compositing on black. This is probably sub-optimal and has been done in + * 1.5.4 betas simply to enable external critique and testing (i.e. to + * implement the new API quickly, without lots of internal changes.) + */ + +#ifdef PNG_READ_GAMMA_SUPPORTED +# ifdef PNG_READ_BACKGROUND_SUPPORTED + /* Includes ALPHA_MODE */ + png_ptr->background_1 = png_ptr->background; +# endif + + /* This needs to change - in the palette image case a whole set of tables are + * built when it would be quicker to just calculate the correct value for + * each palette entry directly. Also, the test is too tricky - why check + * PNG_RGB_TO_GRAY if PNG_GAMMA is not set? The answer seems to be that + * PNG_GAMMA is cancelled even if the gamma is known? The test excludes the + * PNG_COMPOSE case, so apparently if there is no *overall* gamma correction + * the gamma tables will not be built even if composition is required on a + * gamma encoded value. + * + * In 1.5.4 this is addressed below by an additional check on the individual + * file gamma - if it is not 1.0 both RGB_TO_GRAY and COMPOSE need the + * tables. + */ + if ((png_ptr->transformations & PNG_GAMMA) + || ((png_ptr->transformations & PNG_RGB_TO_GRAY) + && (png_gamma_significant(png_ptr->colorspace.gamma) || + png_gamma_significant(png_ptr->screen_gamma))) + || ((png_ptr->transformations & PNG_COMPOSE) + && (png_gamma_significant(png_ptr->colorspace.gamma) + || png_gamma_significant(png_ptr->screen_gamma) +# ifdef PNG_READ_BACKGROUND_SUPPORTED + || (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_UNIQUE + && png_gamma_significant(png_ptr->background_gamma)) +# endif + )) || ((png_ptr->transformations & PNG_ENCODE_ALPHA) + && png_gamma_significant(png_ptr->screen_gamma)) + ) + { + png_build_gamma_table(png_ptr, png_ptr->bit_depth); + +#ifdef PNG_READ_BACKGROUND_SUPPORTED + if (png_ptr->transformations & PNG_COMPOSE) + { + /* Issue a warning about this combination: because RGB_TO_GRAY is + * optimized to do the gamma transform if present yet do_background has + * to do the same thing if both options are set a + * double-gamma-correction happens. This is true in all versions of + * libpng to date. + */ + if (png_ptr->transformations & PNG_RGB_TO_GRAY) + png_warning(png_ptr, + "libpng does not support gamma+background+rgb_to_gray"); + + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + /* We don't get to here unless there is a tRNS chunk with non-opaque + * entries - see the checking code at the start of this function. + */ + png_color back, back_1; + png_colorp palette = png_ptr->palette; + int num_palette = png_ptr->num_palette; + int i; + if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE) + { + + back.red = png_ptr->gamma_table[png_ptr->background.red]; + back.green = png_ptr->gamma_table[png_ptr->background.green]; + back.blue = png_ptr->gamma_table[png_ptr->background.blue]; + + back_1.red = png_ptr->gamma_to_1[png_ptr->background.red]; + back_1.green = png_ptr->gamma_to_1[png_ptr->background.green]; + back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue]; + } + else + { + png_fixed_point g, gs; + + switch (png_ptr->background_gamma_type) + { + case PNG_BACKGROUND_GAMMA_SCREEN: + g = (png_ptr->screen_gamma); + gs = PNG_FP_1; + break; + + case PNG_BACKGROUND_GAMMA_FILE: + g = png_reciprocal(png_ptr->colorspace.gamma); + gs = png_reciprocal2(png_ptr->colorspace.gamma, + png_ptr->screen_gamma); + break; + + case PNG_BACKGROUND_GAMMA_UNIQUE: + g = png_reciprocal(png_ptr->background_gamma); + gs = png_reciprocal2(png_ptr->background_gamma, + png_ptr->screen_gamma); + break; + default: + g = PNG_FP_1; /* back_1 */ + gs = PNG_FP_1; /* back */ + break; + } + + if (png_gamma_significant(gs)) + { + back.red = png_gamma_8bit_correct(png_ptr->background.red, + gs); + back.green = png_gamma_8bit_correct(png_ptr->background.green, + gs); + back.blue = png_gamma_8bit_correct(png_ptr->background.blue, + gs); + } + + else + { + back.red = (png_byte)png_ptr->background.red; + back.green = (png_byte)png_ptr->background.green; + back.blue = (png_byte)png_ptr->background.blue; + } + + if (png_gamma_significant(g)) + { + back_1.red = png_gamma_8bit_correct(png_ptr->background.red, + g); + back_1.green = png_gamma_8bit_correct( + png_ptr->background.green, g); + back_1.blue = png_gamma_8bit_correct(png_ptr->background.blue, + g); + } + + else + { + back_1.red = (png_byte)png_ptr->background.red; + back_1.green = (png_byte)png_ptr->background.green; + back_1.blue = (png_byte)png_ptr->background.blue; + } + } + + for (i = 0; i < num_palette; i++) + { + if (i < (int)png_ptr->num_trans && + png_ptr->trans_alpha[i] != 0xff) + { + if (png_ptr->trans_alpha[i] == 0) + { + palette[i] = back; + } + else /* if (png_ptr->trans_alpha[i] != 0xff) */ + { + png_byte v, w; + + v = png_ptr->gamma_to_1[palette[i].red]; + png_composite(w, v, png_ptr->trans_alpha[i], back_1.red); + palette[i].red = png_ptr->gamma_from_1[w]; + + v = png_ptr->gamma_to_1[palette[i].green]; + png_composite(w, v, png_ptr->trans_alpha[i], back_1.green); + palette[i].green = png_ptr->gamma_from_1[w]; + + v = png_ptr->gamma_to_1[palette[i].blue]; + png_composite(w, v, png_ptr->trans_alpha[i], back_1.blue); + palette[i].blue = png_ptr->gamma_from_1[w]; + } + } + else + { + palette[i].red = png_ptr->gamma_table[palette[i].red]; + palette[i].green = png_ptr->gamma_table[palette[i].green]; + palette[i].blue = png_ptr->gamma_table[palette[i].blue]; + } + } + + /* Prevent the transformations being done again. + * + * NOTE: this is highly dubious; it removes the transformations in + * place. This seems inconsistent with the general treatment of the + * transformations elsewhere. + */ + png_ptr->transformations &= ~(PNG_COMPOSE | PNG_GAMMA); + } /* color_type == PNG_COLOR_TYPE_PALETTE */ + + /* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */ + else /* color_type != PNG_COLOR_TYPE_PALETTE */ + { + int gs_sig, g_sig; + png_fixed_point g = PNG_FP_1; /* Correction to linear */ + png_fixed_point gs = PNG_FP_1; /* Correction to screen */ + + switch (png_ptr->background_gamma_type) + { + case PNG_BACKGROUND_GAMMA_SCREEN: + g = png_ptr->screen_gamma; + /* gs = PNG_FP_1; */ + break; + + case PNG_BACKGROUND_GAMMA_FILE: + g = png_reciprocal(png_ptr->colorspace.gamma); + gs = png_reciprocal2(png_ptr->colorspace.gamma, + png_ptr->screen_gamma); + break; + + case PNG_BACKGROUND_GAMMA_UNIQUE: + g = png_reciprocal(png_ptr->background_gamma); + gs = png_reciprocal2(png_ptr->background_gamma, + png_ptr->screen_gamma); + break; + + default: + png_error(png_ptr, "invalid background gamma type"); + } + + g_sig = png_gamma_significant(g); + gs_sig = png_gamma_significant(gs); + + if (g_sig) + png_ptr->background_1.gray = png_gamma_correct(png_ptr, + png_ptr->background.gray, g); + + if (gs_sig) + png_ptr->background.gray = png_gamma_correct(png_ptr, + png_ptr->background.gray, gs); + + if ((png_ptr->background.red != png_ptr->background.green) || + (png_ptr->background.red != png_ptr->background.blue) || + (png_ptr->background.red != png_ptr->background.gray)) + { + /* RGB or RGBA with color background */ + if (g_sig) + { + png_ptr->background_1.red = png_gamma_correct(png_ptr, + png_ptr->background.red, g); + + png_ptr->background_1.green = png_gamma_correct(png_ptr, + png_ptr->background.green, g); + + png_ptr->background_1.blue = png_gamma_correct(png_ptr, + png_ptr->background.blue, g); + } + + if (gs_sig) + { + png_ptr->background.red = png_gamma_correct(png_ptr, + png_ptr->background.red, gs); + + png_ptr->background.green = png_gamma_correct(png_ptr, + png_ptr->background.green, gs); + + png_ptr->background.blue = png_gamma_correct(png_ptr, + png_ptr->background.blue, gs); + } + } + + else + { + /* GRAY, GRAY ALPHA, RGB, or RGBA with gray background */ + png_ptr->background_1.red = png_ptr->background_1.green + = png_ptr->background_1.blue = png_ptr->background_1.gray; + + png_ptr->background.red = png_ptr->background.green + = png_ptr->background.blue = png_ptr->background.gray; + } + + /* The background is now in screen gamma: */ + png_ptr->background_gamma_type = PNG_BACKGROUND_GAMMA_SCREEN; + } /* color_type != PNG_COLOR_TYPE_PALETTE */ + }/* png_ptr->transformations & PNG_BACKGROUND */ + + else + /* Transformation does not include PNG_BACKGROUND */ +#endif /* PNG_READ_BACKGROUND_SUPPORTED */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + /* RGB_TO_GRAY needs to have non-gamma-corrected values! */ + && ((png_ptr->transformations & PNG_EXPAND) == 0 || + (png_ptr->transformations & PNG_RGB_TO_GRAY) == 0) +#endif + ) + { + png_colorp palette = png_ptr->palette; + int num_palette = png_ptr->num_palette; + int i; + + /* NOTE: there are other transformations that should probably be in + * here too. + */ + for (i = 0; i < num_palette; i++) + { + palette[i].red = png_ptr->gamma_table[palette[i].red]; + palette[i].green = png_ptr->gamma_table[palette[i].green]; + palette[i].blue = png_ptr->gamma_table[palette[i].blue]; + } + + /* Done the gamma correction. */ + png_ptr->transformations &= ~PNG_GAMMA; + } /* color_type == PALETTE && !PNG_BACKGROUND transformation */ + } +#ifdef PNG_READ_BACKGROUND_SUPPORTED + else +#endif +#endif /* PNG_READ_GAMMA_SUPPORTED */ + +#ifdef PNG_READ_BACKGROUND_SUPPORTED + /* No GAMMA transformation (see the hanging else 4 lines above) */ + if ((png_ptr->transformations & PNG_COMPOSE) && + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)) + { + int i; + int istop = (int)png_ptr->num_trans; + png_color back; + png_colorp palette = png_ptr->palette; + + back.red = (png_byte)png_ptr->background.red; + back.green = (png_byte)png_ptr->background.green; + back.blue = (png_byte)png_ptr->background.blue; + + for (i = 0; i < istop; i++) + { + if (png_ptr->trans_alpha[i] == 0) + { + palette[i] = back; + } + + else if (png_ptr->trans_alpha[i] != 0xff) + { + /* The png_composite() macro is defined in png.h */ + png_composite(palette[i].red, palette[i].red, + png_ptr->trans_alpha[i], back.red); + + png_composite(palette[i].green, palette[i].green, + png_ptr->trans_alpha[i], back.green); + + png_composite(palette[i].blue, palette[i].blue, + png_ptr->trans_alpha[i], back.blue); + } + } + + png_ptr->transformations &= ~PNG_COMPOSE; + } +#endif /* PNG_READ_BACKGROUND_SUPPORTED */ + +#ifdef PNG_READ_SHIFT_SUPPORTED + if ((png_ptr->transformations & PNG_SHIFT) && + !(png_ptr->transformations & PNG_EXPAND) && + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)) + { + int i; + int istop = png_ptr->num_palette; + int shift = 8 - png_ptr->sig_bit.red; + + png_ptr->transformations &= ~PNG_SHIFT; + + /* significant bits can be in the range 1 to 7 for a meaninful result, if + * the number of significant bits is 0 then no shift is done (this is an + * error condition which is silently ignored.) + */ + if (shift > 0 && shift < 8) for (i=0; ipalette[i].red; + + component >>= shift; + png_ptr->palette[i].red = (png_byte)component; + } + + shift = 8 - png_ptr->sig_bit.green; + if (shift > 0 && shift < 8) for (i=0; ipalette[i].green; + + component >>= shift; + png_ptr->palette[i].green = (png_byte)component; + } + + shift = 8 - png_ptr->sig_bit.blue; + if (shift > 0 && shift < 8) for (i=0; ipalette[i].blue; + + component >>= shift; + png_ptr->palette[i].blue = (png_byte)component; + } + } +#endif /* PNG_READ_SHIFT_SUPPORTED */ +} + +/* Modify the info structure to reflect the transformations. The + * info should be updated so a PNG file could be written with it, + * assuming the transformations result in valid PNG data. + */ +void /* PRIVATE */ +png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr) +{ + png_debug(1, "in png_read_transform_info"); + +#ifdef PNG_READ_EXPAND_SUPPORTED + if (png_ptr->transformations & PNG_EXPAND) + { + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + /* This check must match what actually happens in + * png_do_expand_palette; if it ever checks the tRNS chunk to see if + * it is all opaque we must do the same (at present it does not.) + */ + if (png_ptr->num_trans > 0) + info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA; + + else + info_ptr->color_type = PNG_COLOR_TYPE_RGB; + + info_ptr->bit_depth = 8; + info_ptr->num_trans = 0; + } + else + { + if (png_ptr->num_trans) + { + if (png_ptr->transformations & PNG_EXPAND_tRNS) + info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; + } + if (info_ptr->bit_depth < 8) + info_ptr->bit_depth = 8; + + info_ptr->num_trans = 0; + } + } +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) + /* The following is almost certainly wrong unless the background value is in + * the screen space! + */ + if (png_ptr->transformations & PNG_COMPOSE) + info_ptr->background = png_ptr->background; +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED + /* The following used to be conditional on PNG_GAMMA (prior to 1.5.4), + * however it seems that the code in png_init_read_transformations, which has + * been called before this from png_read_update_info->png_read_start_row + * sometimes does the gamma transform and cancels the flag. + * + * TODO: this looks wrong; the info_ptr should end up with a gamma equal to + * the screen_gamma value. The following probably results in weirdness if + * the info_ptr is used by the app after the rows have been read. + */ + info_ptr->colorspace.gamma = png_ptr->colorspace.gamma; +#endif + + if (info_ptr->bit_depth == 16) + { +# ifdef PNG_READ_16BIT_SUPPORTED +# ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + if (png_ptr->transformations & PNG_SCALE_16_TO_8) + info_ptr->bit_depth = 8; +# endif + +# ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + if (png_ptr->transformations & PNG_16_TO_8) + info_ptr->bit_depth = 8; +# endif + +# else + /* No 16 bit support: force chopping 16-bit input down to 8, in this case + * the app program can chose if both APIs are available by setting the + * correct scaling to use. + */ +# ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + /* For compatibility with previous versions use the strip method by + * default. This code works because if PNG_SCALE_16_TO_8 is already + * set the code below will do that in preference to the chop. + */ + png_ptr->transformations |= PNG_16_TO_8; + info_ptr->bit_depth = 8; +# else + +# ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + png_ptr->transformations |= PNG_SCALE_16_TO_8; + info_ptr->bit_depth = 8; +# else + + CONFIGURATION ERROR: you must enable at least one 16 to 8 method +# endif +# endif +#endif /* !READ_16BIT_SUPPORTED */ + } + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + if (png_ptr->transformations & PNG_GRAY_TO_RGB) + info_ptr->color_type = (png_byte)(info_ptr->color_type | + PNG_COLOR_MASK_COLOR); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + if (png_ptr->transformations & PNG_RGB_TO_GRAY) + info_ptr->color_type = (png_byte)(info_ptr->color_type & + ~PNG_COLOR_MASK_COLOR); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + if (png_ptr->transformations & PNG_QUANTIZE) + { + if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || + (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) && + png_ptr->palette_lookup && info_ptr->bit_depth == 8) + { + info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; + } + } +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED + if (png_ptr->transformations & PNG_EXPAND_16 && info_ptr->bit_depth == 8 && + info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) + { + info_ptr->bit_depth = 16; + } +#endif + +#ifdef PNG_READ_PACK_SUPPORTED + if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8)) + info_ptr->bit_depth = 8; +#endif + + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + info_ptr->channels = 1; + + else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) + info_ptr->channels = 3; + + else + info_ptr->channels = 1; + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + if (png_ptr->transformations & PNG_STRIP_ALPHA) + { + info_ptr->color_type = (png_byte)(info_ptr->color_type & + ~PNG_COLOR_MASK_ALPHA); + info_ptr->num_trans = 0; + } +#endif + + if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) + info_ptr->channels++; + +#ifdef PNG_READ_FILLER_SUPPORTED + /* STRIP_ALPHA and FILLER allowed: MASK_ALPHA bit stripped above */ + if ((png_ptr->transformations & PNG_FILLER) && + ((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || + (info_ptr->color_type == PNG_COLOR_TYPE_GRAY))) + { + info_ptr->channels++; + /* If adding a true alpha channel not just filler */ + if (png_ptr->transformations & PNG_ADD_ALPHA) + info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; + } +#endif + +#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) && \ +defined(PNG_READ_USER_TRANSFORM_SUPPORTED) + if (png_ptr->transformations & PNG_USER_TRANSFORM) + { + if (info_ptr->bit_depth < png_ptr->user_transform_depth) + info_ptr->bit_depth = png_ptr->user_transform_depth; + + if (info_ptr->channels < png_ptr->user_transform_channels) + info_ptr->channels = png_ptr->user_transform_channels; + } +#endif + + info_ptr->pixel_depth = (png_byte)(info_ptr->channels * + info_ptr->bit_depth); + + info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width); + + /* Adding in 1.5.4: cache the above value in png_struct so that we can later + * check in png_rowbytes that the user buffer won't get overwritten. Note + * that the field is not always set - if png_read_update_info isn't called + * the application has to either not do any transforms or get the calculation + * right itself. + */ + png_ptr->info_rowbytes = info_ptr->rowbytes; + +#ifndef PNG_READ_EXPAND_SUPPORTED + if (png_ptr) + return; +#endif +} + +/* Transform the row. The order of transformations is significant, + * and is very touchy. If you add a transformation, take care to + * decide how it fits in with the other transformations here. + */ +void /* PRIVATE */ +png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info) +{ + png_debug(1, "in png_do_read_transformations"); + + if (png_ptr->row_buf == NULL) + { + /* Prior to 1.5.4 this output row/pass where the NULL pointer is, but this + * error is incredibly rare and incredibly easy to debug without this + * information. + */ + png_error(png_ptr, "NULL row buffer"); + } + + /* The following is debugging; prior to 1.5.4 the code was never compiled in; + * in 1.5.4 PNG_FLAG_DETECT_UNINITIALIZED was added and the macro + * PNG_WARN_UNINITIALIZED_ROW removed. In 1.6 the new flag is set only for + * all transformations, however in practice the ROW_INIT always gets done on + * demand, if necessary. + */ + if ((png_ptr->flags & PNG_FLAG_DETECT_UNINITIALIZED) != 0 && + !(png_ptr->flags & PNG_FLAG_ROW_INIT)) + { + /* Application has failed to call either png_read_start_image() or + * png_read_update_info() after setting transforms that expand pixels. + * This check added to libpng-1.2.19 (but not enabled until 1.5.4). + */ + png_error(png_ptr, "Uninitialized row"); + } + +#ifdef PNG_READ_EXPAND_SUPPORTED + if (png_ptr->transformations & PNG_EXPAND) + { + if (row_info->color_type == PNG_COLOR_TYPE_PALETTE) + { + png_do_expand_palette(row_info, png_ptr->row_buf + 1, + png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans); + } + + else + { + if (png_ptr->num_trans && + (png_ptr->transformations & PNG_EXPAND_tRNS)) + png_do_expand(row_info, png_ptr->row_buf + 1, + &(png_ptr->trans_color)); + + else + png_do_expand(row_info, png_ptr->row_buf + 1, + NULL); + } + } +#endif + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_STRIP_ALPHA) && + !(png_ptr->transformations & PNG_COMPOSE) && + (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) + png_do_strip_channel(row_info, png_ptr->row_buf + 1, + 0 /* at_start == false, because SWAP_ALPHA happens later */); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + if (png_ptr->transformations & PNG_RGB_TO_GRAY) + { + int rgb_error = + png_do_rgb_to_gray(png_ptr, row_info, + png_ptr->row_buf + 1); + + if (rgb_error) + { + png_ptr->rgb_to_gray_status=1; + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) == + PNG_RGB_TO_GRAY_WARN) + png_warning(png_ptr, "png_do_rgb_to_gray found nongray pixel"); + + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) == + PNG_RGB_TO_GRAY_ERR) + png_error(png_ptr, "png_do_rgb_to_gray found nongray pixel"); + } + } +#endif + +/* From Andreas Dilger e-mail to png-implement, 26 March 1998: + * + * In most cases, the "simple transparency" should be done prior to doing + * gray-to-RGB, or you will have to test 3x as many bytes to check if a + * pixel is transparent. You would also need to make sure that the + * transparency information is upgraded to RGB. + * + * To summarize, the current flow is: + * - Gray + simple transparency -> compare 1 or 2 gray bytes and composite + * with background "in place" if transparent, + * convert to RGB if necessary + * - Gray + alpha -> composite with gray background and remove alpha bytes, + * convert to RGB if necessary + * + * To support RGB backgrounds for gray images we need: + * - Gray + simple transparency -> convert to RGB + simple transparency, + * compare 3 or 6 bytes and composite with + * background "in place" if transparent + * (3x compare/pixel compared to doing + * composite with gray bkgrnd) + * - Gray + alpha -> convert to RGB + alpha, composite with background and + * remove alpha bytes (3x float + * operations/pixel compared with composite + * on gray background) + * + * Greg's change will do this. The reason it wasn't done before is for + * performance, as this increases the per-pixel operations. If we would check + * in advance if the background was gray or RGB, and position the gray-to-RGB + * transform appropriately, then it would save a lot of work/time. + */ + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + /* If gray -> RGB, do so now only if background is non-gray; else do later + * for performance reasons + */ + if ((png_ptr->transformations & PNG_GRAY_TO_RGB) && + !(png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) + png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) + if (png_ptr->transformations & PNG_COMPOSE) + png_do_compose(row_info, png_ptr->row_buf + 1, png_ptr); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED + if ((png_ptr->transformations & PNG_GAMMA) && +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + /* Because RGB_TO_GRAY does the gamma transform. */ + !(png_ptr->transformations & PNG_RGB_TO_GRAY) && +#endif +#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) + /* Because PNG_COMPOSE does the gamma transform if there is something to + * do (if there is an alpha channel or transparency.) + */ + !((png_ptr->transformations & PNG_COMPOSE) && + ((png_ptr->num_trans != 0) || + (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) && +#endif + /* Because png_init_read_transformations transforms the palette, unless + * RGB_TO_GRAY will do the transform. + */ + (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)) + png_do_gamma(row_info, png_ptr->row_buf + 1, png_ptr); +#endif + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_STRIP_ALPHA) && + (png_ptr->transformations & PNG_COMPOSE) && + (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) + png_do_strip_channel(row_info, png_ptr->row_buf + 1, + 0 /* at_start == false, because SWAP_ALPHA happens later */); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + if ((png_ptr->transformations & PNG_ENCODE_ALPHA) && + (row_info->color_type & PNG_COLOR_MASK_ALPHA)) + png_do_encode_alpha(row_info, png_ptr->row_buf + 1, png_ptr); +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + if (png_ptr->transformations & PNG_SCALE_16_TO_8) + png_do_scale_16_to_8(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + /* There is no harm in doing both of these because only one has any effect, + * by putting the 'scale' option first if the app asks for scale (either by + * calling the API or in a TRANSFORM flag) this is what happens. + */ + if (png_ptr->transformations & PNG_16_TO_8) + png_do_chop(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + if (png_ptr->transformations & PNG_QUANTIZE) + { + png_do_quantize(row_info, png_ptr->row_buf + 1, + png_ptr->palette_lookup, png_ptr->quantize_index); + + if (row_info->rowbytes == 0) + png_error(png_ptr, "png_do_quantize returned rowbytes=0"); + } +#endif /* PNG_READ_QUANTIZE_SUPPORTED */ + +#ifdef PNG_READ_EXPAND_16_SUPPORTED + /* Do the expansion now, after all the arithmetic has been done. Notice + * that previous transformations can handle the PNG_EXPAND_16 flag if this + * is efficient (particularly true in the case of gamma correction, where + * better accuracy results faster!) + */ + if (png_ptr->transformations & PNG_EXPAND_16) + png_do_expand_16(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + /* NOTE: moved here in 1.5.4 (from much later in this list.) */ + if ((png_ptr->transformations & PNG_GRAY_TO_RGB) && + (png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) + png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_INVERT_SUPPORTED + if (png_ptr->transformations & PNG_INVERT_MONO) + png_do_invert(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_SHIFT_SUPPORTED + if (png_ptr->transformations & PNG_SHIFT) + png_do_unshift(row_info, png_ptr->row_buf + 1, + &(png_ptr->shift)); +#endif + +#ifdef PNG_READ_PACK_SUPPORTED + if (png_ptr->transformations & PNG_PACK) + png_do_unpack(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED + /* Added at libpng-1.5.10 */ + if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && + png_ptr->num_palette_max >= 0) + png_do_check_palette_indexes(png_ptr, row_info); +#endif + +#ifdef PNG_READ_BGR_SUPPORTED + if (png_ptr->transformations & PNG_BGR) + png_do_bgr(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_PACKSWAP_SUPPORTED + if (png_ptr->transformations & PNG_PACKSWAP) + png_do_packswap(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_FILLER_SUPPORTED + if (png_ptr->transformations & PNG_FILLER) + png_do_read_filler(row_info, png_ptr->row_buf + 1, + (png_uint_32)png_ptr->filler, png_ptr->flags); +#endif + +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED + if (png_ptr->transformations & PNG_INVERT_ALPHA) + png_do_read_invert_alpha(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED + if (png_ptr->transformations & PNG_SWAP_ALPHA) + png_do_read_swap_alpha(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_16BIT_SUPPORTED +#ifdef PNG_READ_SWAP_SUPPORTED + if (png_ptr->transformations & PNG_SWAP_BYTES) + png_do_swap(row_info, png_ptr->row_buf + 1); +#endif +#endif + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + if (png_ptr->transformations & PNG_USER_TRANSFORM) + { + if (png_ptr->read_user_transform_fn != NULL) + (*(png_ptr->read_user_transform_fn)) /* User read transform function */ + (png_ptr, /* png_ptr */ + row_info, /* row_info: */ + /* png_uint_32 width; width of row */ + /* png_size_t rowbytes; number of bytes in row */ + /* png_byte color_type; color type of pixels */ + /* png_byte bit_depth; bit depth of samples */ + /* png_byte channels; number of channels (1-4) */ + /* png_byte pixel_depth; bits per pixel (depth*channels) */ + png_ptr->row_buf + 1); /* start of pixel data for row */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED + if (png_ptr->user_transform_depth) + row_info->bit_depth = png_ptr->user_transform_depth; + + if (png_ptr->user_transform_channels) + row_info->channels = png_ptr->user_transform_channels; +#endif + row_info->pixel_depth = (png_byte)(row_info->bit_depth * + row_info->channels); + + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_info->width); + } +#endif +} + +#ifdef PNG_READ_PACK_SUPPORTED +/* Unpack pixels of 1, 2, or 4 bits per pixel into 1 byte per pixel, + * without changing the actual values. Thus, if you had a row with + * a bit depth of 1, you would end up with bytes that only contained + * the numbers 0 or 1. If you would rather they contain 0 and 255, use + * png_do_shift() after this. + */ +void /* PRIVATE */ +png_do_unpack(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_unpack"); + + if (row_info->bit_depth < 8) + { + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + switch (row_info->bit_depth) + { + case 1: + { + png_bytep sp = row + (png_size_t)((row_width - 1) >> 3); + png_bytep dp = row + (png_size_t)row_width - 1; + png_uint_32 shift = 7 - (int)((row_width + 7) & 0x07); + for (i = 0; i < row_width; i++) + { + *dp = (png_byte)((*sp >> shift) & 0x01); + + if (shift == 7) + { + shift = 0; + sp--; + } + + else + shift++; + + dp--; + } + break; + } + + case 2: + { + + png_bytep sp = row + (png_size_t)((row_width - 1) >> 2); + png_bytep dp = row + (png_size_t)row_width - 1; + png_uint_32 shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); + for (i = 0; i < row_width; i++) + { + *dp = (png_byte)((*sp >> shift) & 0x03); + + if (shift == 6) + { + shift = 0; + sp--; + } + + else + shift += 2; + + dp--; + } + break; + } + + case 4: + { + png_bytep sp = row + (png_size_t)((row_width - 1) >> 1); + png_bytep dp = row + (png_size_t)row_width - 1; + png_uint_32 shift = (int)((1 - ((row_width + 1) & 0x01)) << 2); + for (i = 0; i < row_width; i++) + { + *dp = (png_byte)((*sp >> shift) & 0x0f); + + if (shift == 4) + { + shift = 0; + sp--; + } + + else + shift = 4; + + dp--; + } + break; + } + + default: + break; + } + row_info->bit_depth = 8; + row_info->pixel_depth = (png_byte)(8 * row_info->channels); + row_info->rowbytes = row_width * row_info->channels; + } +} +#endif + +#ifdef PNG_READ_SHIFT_SUPPORTED +/* Reverse the effects of png_do_shift. This routine merely shifts the + * pixels back to their significant bits values. Thus, if you have + * a row of bit depth 8, but only 5 are significant, this will shift + * the values back to 0 through 31. + */ +void /* PRIVATE */ +png_do_unshift(png_row_infop row_info, png_bytep row, + png_const_color_8p sig_bits) +{ + int color_type; + + png_debug(1, "in png_do_unshift"); + + /* The palette case has already been handled in the _init routine. */ + color_type = row_info->color_type; + + if (color_type != PNG_COLOR_TYPE_PALETTE) + { + int shift[4]; + int channels = 0; + int bit_depth = row_info->bit_depth; + + if (color_type & PNG_COLOR_MASK_COLOR) + { + shift[channels++] = bit_depth - sig_bits->red; + shift[channels++] = bit_depth - sig_bits->green; + shift[channels++] = bit_depth - sig_bits->blue; + } + + else + { + shift[channels++] = bit_depth - sig_bits->gray; + } + + if (color_type & PNG_COLOR_MASK_ALPHA) + { + shift[channels++] = bit_depth - sig_bits->alpha; + } + + { + int c, have_shift; + + for (c = have_shift = 0; c < channels; ++c) + { + /* A shift of more than the bit depth is an error condition but it + * gets ignored here. + */ + if (shift[c] <= 0 || shift[c] >= bit_depth) + shift[c] = 0; + + else + have_shift = 1; + } + + if (!have_shift) + return; + } + + switch (bit_depth) + { + default: + /* Must be 1bpp gray: should not be here! */ + /* NOTREACHED */ + break; + + case 2: + /* Must be 2bpp gray */ + /* assert(channels == 1 && shift[0] == 1) */ + { + png_bytep bp = row; + png_bytep bp_end = bp + row_info->rowbytes; + + while (bp < bp_end) + { + int b = (*bp >> 1) & 0x55; + *bp++ = (png_byte)b; + } + break; + } + + case 4: + /* Must be 4bpp gray */ + /* assert(channels == 1) */ + { + png_bytep bp = row; + png_bytep bp_end = bp + row_info->rowbytes; + int gray_shift = shift[0]; + int mask = 0xf >> gray_shift; + + mask |= mask << 4; + + while (bp < bp_end) + { + int b = (*bp >> gray_shift) & mask; + *bp++ = (png_byte)b; + } + break; + } + + case 8: + /* Single byte components, G, GA, RGB, RGBA */ + { + png_bytep bp = row; + png_bytep bp_end = bp + row_info->rowbytes; + int channel = 0; + + while (bp < bp_end) + { + int b = *bp >> shift[channel]; + if (++channel >= channels) + channel = 0; + *bp++ = (png_byte)b; + } + break; + } + +#ifdef PNG_READ_16BIT_SUPPORTED + case 16: + /* Double byte components, G, GA, RGB, RGBA */ + { + png_bytep bp = row; + png_bytep bp_end = bp + row_info->rowbytes; + int channel = 0; + + while (bp < bp_end) + { + int value = (bp[0] << 8) + bp[1]; + + value >>= shift[channel]; + if (++channel >= channels) + channel = 0; + *bp++ = (png_byte)(value >> 8); + *bp++ = (png_byte)(value & 0xff); + } + break; + } +#endif + } + } +} +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +/* Scale rows of bit depth 16 down to 8 accurately */ +void /* PRIVATE */ +png_do_scale_16_to_8(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_scale_16_to_8"); + + if (row_info->bit_depth == 16) + { + png_bytep sp = row; /* source */ + png_bytep dp = row; /* destination */ + png_bytep ep = sp + row_info->rowbytes; /* end+1 */ + + while (sp < ep) + { + /* The input is an array of 16 bit components, these must be scaled to + * 8 bits each. For a 16 bit value V the required value (from the PNG + * specification) is: + * + * (V * 255) / 65535 + * + * This reduces to round(V / 257), or floor((V + 128.5)/257) + * + * Represent V as the two byte value vhi.vlo. Make a guess that the + * result is the top byte of V, vhi, then the correction to this value + * is: + * + * error = floor(((V-vhi.vhi) + 128.5) / 257) + * = floor(((vlo-vhi) + 128.5) / 257) + * + * This can be approximated using integer arithmetic (and a signed + * shift): + * + * error = (vlo-vhi+128) >> 8; + * + * The approximate differs from the exact answer only when (vlo-vhi) is + * 128; it then gives a correction of +1 when the exact correction is + * 0. This gives 128 errors. The exact answer (correct for all 16 bit + * input values) is: + * + * error = (vlo-vhi+128)*65535 >> 24; + * + * An alternative arithmetic calculation which also gives no errors is: + * + * (V * 255 + 32895) >> 16 + */ + + png_int_32 tmp = *sp++; /* must be signed! */ + tmp += (((int)*sp++ - tmp + 128) * 65535) >> 24; + *dp++ = (png_byte)tmp; + } + + row_info->bit_depth = 8; + row_info->pixel_depth = (png_byte)(8 * row_info->channels); + row_info->rowbytes = row_info->width * row_info->channels; + } +} +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +void /* PRIVATE */ +/* Simply discard the low byte. This was the default behavior prior + * to libpng-1.5.4. + */ +png_do_chop(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_chop"); + + if (row_info->bit_depth == 16) + { + png_bytep sp = row; /* source */ + png_bytep dp = row; /* destination */ + png_bytep ep = sp + row_info->rowbytes; /* end+1 */ + + while (sp < ep) + { + *dp++ = *sp; + sp += 2; /* skip low byte */ + } + + row_info->bit_depth = 8; + row_info->pixel_depth = (png_byte)(8 * row_info->channels); + row_info->rowbytes = row_info->width * row_info->channels; + } +} +#endif + +#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED +void /* PRIVATE */ +png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_read_swap_alpha"); + + { + png_uint_32 row_width = row_info->width; + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + /* This converts from RGBA to ARGB */ + if (row_info->bit_depth == 8) + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save; + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + /* This converts from RRGGBBAA to AARRGGBB */ + else + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save[2]; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save[0] = *(--sp); + save[1] = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save[0]; + *(--dp) = save[1]; + } + } +#endif + } + + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + /* This converts from GA to AG */ + if (row_info->bit_depth == 8) + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save; + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + /* This converts from GGAA to AAGG */ + else + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save[2]; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save[0] = *(--sp); + save[1] = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save[0]; + *(--dp) = save[1]; + } + } +#endif + } + } +} +#endif + +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED +void /* PRIVATE */ +png_do_read_invert_alpha(png_row_infop row_info, png_bytep row) +{ + png_uint_32 row_width; + png_debug(1, "in png_do_read_invert_alpha"); + + row_width = row_info->width; + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This inverts the alpha channel in RGBA */ + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + +/* This does nothing: + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + We can replace it with: +*/ + sp-=3; + dp=sp; + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + /* This inverts the alpha channel in RRGGBBAA */ + else + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = (png_byte)(255 - *(--sp)); + +/* This does nothing: + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + We can replace it with: +*/ + sp-=6; + dp=sp; + } + } +#endif + } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This inverts the alpha channel in GA */ + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = *(--sp); + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + else + { + /* This inverts the alpha channel in GGAA */ + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = (png_byte)(255 - *(--sp)); +/* + *(--dp) = *(--sp); + *(--dp) = *(--sp); +*/ + sp-=2; + dp=sp; + } + } +#endif + } +} +#endif + +#ifdef PNG_READ_FILLER_SUPPORTED +/* Add filler channel if we have RGB color */ +void /* PRIVATE */ +png_do_read_filler(png_row_infop row_info, png_bytep row, + png_uint_32 filler, png_uint_32 flags) +{ + png_uint_32 i; + png_uint_32 row_width = row_info->width; + +#ifdef PNG_READ_16BIT_SUPPORTED + png_byte hi_filler = (png_byte)((filler>>8) & 0xff); +#endif + png_byte lo_filler = (png_byte)(filler & 0xff); + + png_debug(1, "in png_do_read_filler"); + + if ( + row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + if (row_info->bit_depth == 8) + { + if (flags & PNG_FLAG_FILLER_AFTER) + { + /* This changes the data from G to GX */ + png_bytep sp = row + (png_size_t)row_width; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 1; i < row_width; i++) + { + *(--dp) = lo_filler; + *(--dp) = *(--sp); + } + *(--dp) = lo_filler; + row_info->channels = 2; + row_info->pixel_depth = 16; + row_info->rowbytes = row_width * 2; + } + + else + { + /* This changes the data from G to XG */ + png_bytep sp = row + (png_size_t)row_width; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = lo_filler; + } + row_info->channels = 2; + row_info->pixel_depth = 16; + row_info->rowbytes = row_width * 2; + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + else if (row_info->bit_depth == 16) + { + if (flags & PNG_FLAG_FILLER_AFTER) + { + /* This changes the data from GG to GGXX */ + png_bytep sp = row + (png_size_t)row_width * 2; + png_bytep dp = sp + (png_size_t)row_width * 2; + for (i = 1; i < row_width; i++) + { + *(--dp) = hi_filler; + *(--dp) = lo_filler; + *(--dp) = *(--sp); + *(--dp) = *(--sp); + } + *(--dp) = hi_filler; + *(--dp) = lo_filler; + row_info->channels = 2; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + + else + { + /* This changes the data from GG to XXGG */ + png_bytep sp = row + (png_size_t)row_width * 2; + png_bytep dp = sp + (png_size_t)row_width * 2; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = hi_filler; + *(--dp) = lo_filler; + } + row_info->channels = 2; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + } +#endif + } /* COLOR_TYPE == GRAY */ + else if (row_info->color_type == PNG_COLOR_TYPE_RGB) + { + if (row_info->bit_depth == 8) + { + if (flags & PNG_FLAG_FILLER_AFTER) + { + /* This changes the data from RGB to RGBX */ + png_bytep sp = row + (png_size_t)row_width * 3; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 1; i < row_width; i++) + { + *(--dp) = lo_filler; + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + } + *(--dp) = lo_filler; + row_info->channels = 4; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + + else + { + /* This changes the data from RGB to XRGB */ + png_bytep sp = row + (png_size_t)row_width * 3; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = lo_filler; + } + row_info->channels = 4; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + else if (row_info->bit_depth == 16) + { + if (flags & PNG_FLAG_FILLER_AFTER) + { + /* This changes the data from RRGGBB to RRGGBBXX */ + png_bytep sp = row + (png_size_t)row_width * 6; + png_bytep dp = sp + (png_size_t)row_width * 2; + for (i = 1; i < row_width; i++) + { + *(--dp) = hi_filler; + *(--dp) = lo_filler; + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + } + *(--dp) = hi_filler; + *(--dp) = lo_filler; + row_info->channels = 4; + row_info->pixel_depth = 64; + row_info->rowbytes = row_width * 8; + } + + else + { + /* This changes the data from RRGGBB to XXRRGGBB */ + png_bytep sp = row + (png_size_t)row_width * 6; + png_bytep dp = sp + (png_size_t)row_width * 2; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = hi_filler; + *(--dp) = lo_filler; + } + + row_info->channels = 4; + row_info->pixel_depth = 64; + row_info->rowbytes = row_width * 8; + } + } +#endif + } /* COLOR_TYPE == RGB */ +} +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +/* Expand grayscale files to RGB, with or without alpha */ +void /* PRIVATE */ +png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) +{ + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + png_debug(1, "in png_do_gray_to_rgb"); + + if (row_info->bit_depth >= 8 && + !(row_info->color_type & PNG_COLOR_MASK_COLOR)) + { + if (row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + if (row_info->bit_depth == 8) + { + /* This changes G to RGB */ + png_bytep sp = row + (png_size_t)row_width - 1; + png_bytep dp = sp + (png_size_t)row_width * 2; + for (i = 0; i < row_width; i++) + { + *(dp--) = *sp; + *(dp--) = *sp; + *(dp--) = *(sp--); + } + } + + else + { + /* This changes GG to RRGGBB */ + png_bytep sp = row + (png_size_t)row_width * 2 - 1; + png_bytep dp = sp + (png_size_t)row_width * 4; + for (i = 0; i < row_width; i++) + { + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *(sp--); + *(dp--) = *(sp--); + } + } + } + + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This changes GA to RGBA */ + png_bytep sp = row + (png_size_t)row_width * 2 - 1; + png_bytep dp = sp + (png_size_t)row_width * 2; + for (i = 0; i < row_width; i++) + { + *(dp--) = *(sp--); + *(dp--) = *sp; + *(dp--) = *sp; + *(dp--) = *(sp--); + } + } + + else + { + /* This changes GGAA to RRGGBBAA */ + png_bytep sp = row + (png_size_t)row_width * 4 - 1; + png_bytep dp = sp + (png_size_t)row_width * 4; + for (i = 0; i < row_width; i++) + { + *(dp--) = *(sp--); + *(dp--) = *(sp--); + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *(sp--); + *(dp--) = *(sp--); + } + } + } + row_info->channels = (png_byte)(row_info->channels + 2); + row_info->color_type |= PNG_COLOR_MASK_COLOR; + row_info->pixel_depth = (png_byte)(row_info->channels * + row_info->bit_depth); + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); + } +} +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +/* Reduce RGB files to grayscale, with or without alpha + * using the equation given in Poynton's ColorFAQ of 1998-01-04 at + * (THIS LINK IS DEAD June 2008 but + * versions dated 1998 through November 2002 have been archived at + * http://web.archive.org/web/20000816232553/http://www.inforamp.net/ + * ~poynton/notes/colour_and_gamma/ColorFAQ.txt ) + * Charles Poynton poynton at poynton.com + * + * Y = 0.212671 * R + 0.715160 * G + 0.072169 * B + * + * which can be expressed with integers as + * + * Y = (6969 * R + 23434 * G + 2365 * B)/32768 + * + * Poynton's current link (as of January 2003 through July 2011): + * + * has changed the numbers slightly: + * + * Y = 0.2126*R + 0.7152*G + 0.0722*B + * + * which can be expressed with integers as + * + * Y = (6966 * R + 23436 * G + 2366 * B)/32768 + * + * Historically, however, libpng uses numbers derived from the ITU-R Rec 709 + * end point chromaticities and the D65 white point. Depending on the + * precision used for the D65 white point this produces a variety of different + * numbers, however if the four decimal place value used in ITU-R Rec 709 is + * used (0.3127,0.3290) the Y calculation would be: + * + * Y = (6968 * R + 23435 * G + 2366 * B)/32768 + * + * While this is correct the rounding results in an overflow for white, because + * the sum of the rounded coefficients is 32769, not 32768. Consequently + * libpng uses, instead, the closest non-overflowing approximation: + * + * Y = (6968 * R + 23434 * G + 2366 * B)/32768 + * + * Starting with libpng-1.5.5, if the image being converted has a cHRM chunk + * (including an sRGB chunk) then the chromaticities are used to calculate the + * coefficients. See the chunk handling in pngrutil.c for more information. + * + * In all cases the calculation is to be done in a linear colorspace. If no + * gamma information is available to correct the encoding of the original RGB + * values this results in an implicit assumption that the original PNG RGB + * values were linear. + * + * Other integer coefficents can be used via png_set_rgb_to_gray(). Because + * the API takes just red and green coefficients the blue coefficient is + * calculated to make the sum 32768. This will result in different rounding + * to that used above. + */ +int /* PRIVATE */ +png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row) + +{ + int rgb_error = 0; + + png_debug(1, "in png_do_rgb_to_gray"); + + if (!(row_info->color_type & PNG_COLOR_MASK_PALETTE) && + (row_info->color_type & PNG_COLOR_MASK_COLOR)) + { + PNG_CONST png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff; + PNG_CONST png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff; + PNG_CONST png_uint_32 bc = 32768 - rc - gc; + PNG_CONST png_uint_32 row_width = row_info->width; + PNG_CONST int have_alpha = + (row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0; + + if (row_info->bit_depth == 8) + { +#ifdef PNG_READ_GAMMA_SUPPORTED + /* Notice that gamma to/from 1 are not necessarily inverses (if + * there is an overall gamma correction). Prior to 1.5.5 this code + * checked the linearized values for equality; this doesn't match + * the documentation, the original values must be checked. + */ + if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL) + { + png_bytep sp = row; + png_bytep dp = row; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + png_byte red = *(sp++); + png_byte green = *(sp++); + png_byte blue = *(sp++); + + if (red != green || red != blue) + { + red = png_ptr->gamma_to_1[red]; + green = png_ptr->gamma_to_1[green]; + blue = png_ptr->gamma_to_1[blue]; + + rgb_error |= 1; + *(dp++) = png_ptr->gamma_from_1[ + (rc*red + gc*green + bc*blue + 16384)>>15]; + } + + else + { + /* If there is no overall correction the table will not be + * set. + */ + if (png_ptr->gamma_table != NULL) + red = png_ptr->gamma_table[red]; + + *(dp++) = red; + } + + if (have_alpha) + *(dp++) = *(sp++); + } + } + else +#endif + { + png_bytep sp = row; + png_bytep dp = row; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + png_byte red = *(sp++); + png_byte green = *(sp++); + png_byte blue = *(sp++); + + if (red != green || red != blue) + { + rgb_error |= 1; + /* NOTE: this is the historical approach which simply + * truncates the results. + */ + *(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15); + } + + else + *(dp++) = red; + + if (have_alpha) + *(dp++) = *(sp++); + } + } + } + + else /* RGB bit_depth == 16 */ + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (png_ptr->gamma_16_to_1 != NULL && png_ptr->gamma_16_from_1 != NULL) + { + png_bytep sp = row; + png_bytep dp = row; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + png_uint_16 red, green, blue, w; + + red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + + if (red == green && red == blue) + { + if (png_ptr->gamma_16_table != NULL) + w = png_ptr->gamma_16_table[(red&0xff) + >> png_ptr->gamma_shift][red>>8]; + + else + w = red; + } + + else + { + png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) + >> png_ptr->gamma_shift][red>>8]; + png_uint_16 green_1 = + png_ptr->gamma_16_to_1[(green&0xff) >> + png_ptr->gamma_shift][green>>8]; + png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) + >> png_ptr->gamma_shift][blue>>8]; + png_uint_16 gray16 = (png_uint_16)((rc*red_1 + gc*green_1 + + bc*blue_1 + 16384)>>15); + w = png_ptr->gamma_16_from_1[(gray16&0xff) >> + png_ptr->gamma_shift][gray16 >> 8]; + rgb_error |= 1; + } + + *(dp++) = (png_byte)((w>>8) & 0xff); + *(dp++) = (png_byte)(w & 0xff); + + if (have_alpha) + { + *(dp++) = *(sp++); + *(dp++) = *(sp++); + } + } + } + else +#endif + { + png_bytep sp = row; + png_bytep dp = row; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + png_uint_16 red, green, blue, gray16; + + red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2; + + if (red != green || red != blue) + rgb_error |= 1; + + /* From 1.5.5 in the 16 bit case do the accurate conversion even + * in the 'fast' case - this is because this is where the code + * ends up when handling linear 16 bit data. + */ + gray16 = (png_uint_16)((rc*red + gc*green + bc*blue + 16384) >> + 15); + *(dp++) = (png_byte)((gray16>>8) & 0xff); + *(dp++) = (png_byte)(gray16 & 0xff); + + if (have_alpha) + { + *(dp++) = *(sp++); + *(dp++) = *(sp++); + } + } + } + } + + row_info->channels = (png_byte)(row_info->channels - 2); + row_info->color_type = (png_byte)(row_info->color_type & + ~PNG_COLOR_MASK_COLOR); + row_info->pixel_depth = (png_byte)(row_info->channels * + row_info->bit_depth); + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); + } + return rgb_error; +} +#endif +#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ + +#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +/* Build a grayscale palette. Palette is assumed to be 1 << bit_depth + * large of png_color. This lets grayscale images be treated as + * paletted. Most useful for gamma correction and simplification + * of code. This API is not used internally. + */ +void PNGAPI +png_build_grayscale_palette(int bit_depth, png_colorp palette) +{ + int num_palette; + int color_inc; + int i; + int v; + + png_debug(1, "in png_do_build_grayscale_palette"); + + if (palette == NULL) + return; + + switch (bit_depth) + { + case 1: + num_palette = 2; + color_inc = 0xff; + break; + + case 2: + num_palette = 4; + color_inc = 0x55; + break; + + case 4: + num_palette = 16; + color_inc = 0x11; + break; + + case 8: + num_palette = 256; + color_inc = 1; + break; + + default: + num_palette = 0; + color_inc = 0; + break; + } + + for (i = 0, v = 0; i < num_palette; i++, v += color_inc) + { + palette[i].red = (png_byte)v; + palette[i].green = (png_byte)v; + palette[i].blue = (png_byte)v; + } +} +#endif + + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) +/* Replace any alpha or transparency with the supplied background color. + * "background" is already in the screen gamma, while "background_1" is + * at a gamma of 1.0. Paletted files have already been taken care of. + */ +void /* PRIVATE */ +png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr) +{ +#ifdef PNG_READ_GAMMA_SUPPORTED + png_const_bytep gamma_table = png_ptr->gamma_table; + png_const_bytep gamma_from_1 = png_ptr->gamma_from_1; + png_const_bytep gamma_to_1 = png_ptr->gamma_to_1; + png_const_uint_16pp gamma_16 = png_ptr->gamma_16_table; + png_const_uint_16pp gamma_16_from_1 = png_ptr->gamma_16_from_1; + png_const_uint_16pp gamma_16_to_1 = png_ptr->gamma_16_to_1; + int gamma_shift = png_ptr->gamma_shift; + int optimize = (png_ptr->flags & PNG_FLAG_OPTIMIZE_ALPHA) != 0; +#endif + + png_bytep sp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + int shift; + + png_debug(1, "in png_do_compose"); + + { + switch (row_info->color_type) + { + case PNG_COLOR_TYPE_GRAY: + { + switch (row_info->bit_depth) + { + case 1: + { + sp = row; + shift = 7; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x01) + == png_ptr->trans_color.gray) + { + unsigned int tmp = *sp & (0x7f7f >> (7 - shift)); + tmp |= png_ptr->background.gray << shift; + *sp = (png_byte)(tmp & 0xff); + } + + if (!shift) + { + shift = 7; + sp++; + } + + else + shift--; + } + break; + } + + case 2: + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_table != NULL) + { + sp = row; + shift = 6; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x03) + == png_ptr->trans_color.gray) + { + unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); + tmp |= png_ptr->background.gray << shift; + *sp = (png_byte)(tmp & 0xff); + } + + else + { + unsigned int p = (*sp >> shift) & 0x03; + unsigned int g = (gamma_table [p | (p << 2) | + (p << 4) | (p << 6)] >> 6) & 0x03; + unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); + tmp |= g << shift; + *sp = (png_byte)(tmp & 0xff); + } + + if (!shift) + { + shift = 6; + sp++; + } + + else + shift -= 2; + } + } + + else +#endif + { + sp = row; + shift = 6; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x03) + == png_ptr->trans_color.gray) + { + unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); + tmp |= png_ptr->background.gray << shift; + *sp = (png_byte)(tmp & 0xff); + } + + if (!shift) + { + shift = 6; + sp++; + } + + else + shift -= 2; + } + } + break; + } + + case 4: + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_table != NULL) + { + sp = row; + shift = 4; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x0f) + == png_ptr->trans_color.gray) + { + unsigned int tmp = *sp & (0xf0f >> (4 - shift)); + tmp |= png_ptr->background.gray << shift; + *sp = (png_byte)(tmp & 0xff); + } + + else + { + unsigned int p = (*sp >> shift) & 0x0f; + unsigned int g = (gamma_table[p | (p << 4)] >> 4) & + 0x0f; + unsigned int tmp = *sp & (0xf0f >> (4 - shift)); + tmp |= g << shift; + *sp = (png_byte)(tmp & 0xff); + } + + if (!shift) + { + shift = 4; + sp++; + } + + else + shift -= 4; + } + } + + else +#endif + { + sp = row; + shift = 4; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x0f) + == png_ptr->trans_color.gray) + { + unsigned int tmp = *sp & (0xf0f >> (4 - shift)); + tmp |= png_ptr->background.gray << shift; + *sp = (png_byte)(tmp & 0xff); + } + + if (!shift) + { + shift = 4; + sp++; + } + + else + shift -= 4; + } + } + break; + } + + case 8: + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_table != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp++) + { + if (*sp == png_ptr->trans_color.gray) + *sp = (png_byte)png_ptr->background.gray; + + else + *sp = gamma_table[*sp]; + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp++) + { + if (*sp == png_ptr->trans_color.gray) + *sp = (png_byte)png_ptr->background.gray; + } + } + break; + } + + case 16: + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_16 != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 2) + { + png_uint_16 v; + + v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + + if (v == png_ptr->trans_color.gray) + { + /* Background is already in screen gamma */ + *sp = (png_byte)((png_ptr->background.gray >> 8) + & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray + & 0xff); + } + + else + { + v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 2) + { + png_uint_16 v; + + v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + + if (v == png_ptr->trans_color.gray) + { + *sp = (png_byte)((png_ptr->background.gray >> 8) + & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray + & 0xff); + } + } + } + break; + } + + default: + break; + } + break; + } + + case PNG_COLOR_TYPE_RGB: + { + if (row_info->bit_depth == 8) + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_table != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 3) + { + if (*sp == png_ptr->trans_color.red && + *(sp + 1) == png_ptr->trans_color.green && + *(sp + 2) == png_ptr->trans_color.blue) + { + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; + } + + else + { + *sp = gamma_table[*sp]; + *(sp + 1) = gamma_table[*(sp + 1)]; + *(sp + 2) = gamma_table[*(sp + 2)]; + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 3) + { + if (*sp == png_ptr->trans_color.red && + *(sp + 1) == png_ptr->trans_color.green && + *(sp + 2) == png_ptr->trans_color.blue) + { + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; + } + } + } + } + else /* if (row_info->bit_depth == 16) */ + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_16 != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 6) + { + png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + + png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + + png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + + *(sp + 5)); + + if (r == png_ptr->trans_color.red && + g == png_ptr->trans_color.green && + b == png_ptr->trans_color.blue) + { + /* Background is already in screen gamma */ + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) + & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green + & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) + & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); + } + + else + { + png_uint_16 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + + v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; + *(sp + 2) = (png_byte)((v >> 8) & 0xff); + *(sp + 3) = (png_byte)(v & 0xff); + + v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; + *(sp + 4) = (png_byte)((v >> 8) & 0xff); + *(sp + 5) = (png_byte)(v & 0xff); + } + } + } + + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 6) + { + png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + + png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + + png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + + *(sp + 5)); + + if (r == png_ptr->trans_color.red && + g == png_ptr->trans_color.green && + b == png_ptr->trans_color.blue) + { + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) + & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green + & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) + & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); + } + } + } + } + break; + } + + case PNG_COLOR_TYPE_GRAY_ALPHA: + { + if (row_info->bit_depth == 8) + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_to_1 != NULL && gamma_from_1 != NULL && + gamma_table != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 2) + { + png_uint_16 a = *(sp + 1); + + if (a == 0xff) + *sp = gamma_table[*sp]; + + else if (a == 0) + { + /* Background is already in screen gamma */ + *sp = (png_byte)png_ptr->background.gray; + } + + else + { + png_byte v, w; + + v = gamma_to_1[*sp]; + png_composite(w, v, a, png_ptr->background_1.gray); + if (!optimize) + w = gamma_from_1[w]; + *sp = w; + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 2) + { + png_byte a = *(sp + 1); + + if (a == 0) + *sp = (png_byte)png_ptr->background.gray; + + else if (a < 0xff) + png_composite(*sp, *sp, a, png_ptr->background.gray); + } + } + } + else /* if (png_ptr->bit_depth == 16) */ + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_16 != NULL && gamma_16_from_1 != NULL && + gamma_16_to_1 != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 4) + { + png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + + if (a == (png_uint_16)0xffff) + { + png_uint_16 v; + + v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + } + + else if (a == 0) + { + /* Background is already in screen gamma */ + *sp = (png_byte)((png_ptr->background.gray >> 8) + & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); + } + + else + { + png_uint_16 g, v, w; + + g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; + png_composite_16(v, g, a, png_ptr->background_1.gray); + if (optimize) + w = v; + else + w = gamma_16_from_1[(v&0xff) >> gamma_shift][v >> 8]; + *sp = (png_byte)((w >> 8) & 0xff); + *(sp + 1) = (png_byte)(w & 0xff); + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 4) + { + png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + + if (a == 0) + { + *sp = (png_byte)((png_ptr->background.gray >> 8) + & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); + } + + else if (a < 0xffff) + { + png_uint_16 g, v; + + g = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + png_composite_16(v, g, a, png_ptr->background.gray); + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + } + } + } + } + break; + } + + case PNG_COLOR_TYPE_RGB_ALPHA: + { + if (row_info->bit_depth == 8) + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_to_1 != NULL && gamma_from_1 != NULL && + gamma_table != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 4) + { + png_byte a = *(sp + 3); + + if (a == 0xff) + { + *sp = gamma_table[*sp]; + *(sp + 1) = gamma_table[*(sp + 1)]; + *(sp + 2) = gamma_table[*(sp + 2)]; + } + + else if (a == 0) + { + /* Background is already in screen gamma */ + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; + } + + else + { + png_byte v, w; + + v = gamma_to_1[*sp]; + png_composite(w, v, a, png_ptr->background_1.red); + if (!optimize) w = gamma_from_1[w]; + *sp = w; + + v = gamma_to_1[*(sp + 1)]; + png_composite(w, v, a, png_ptr->background_1.green); + if (!optimize) w = gamma_from_1[w]; + *(sp + 1) = w; + + v = gamma_to_1[*(sp + 2)]; + png_composite(w, v, a, png_ptr->background_1.blue); + if (!optimize) w = gamma_from_1[w]; + *(sp + 2) = w; + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 4) + { + png_byte a = *(sp + 3); + + if (a == 0) + { + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; + } + + else if (a < 0xff) + { + png_composite(*sp, *sp, a, png_ptr->background.red); + + png_composite(*(sp + 1), *(sp + 1), a, + png_ptr->background.green); + + png_composite(*(sp + 2), *(sp + 2), a, + png_ptr->background.blue); + } + } + } + } + else /* if (row_info->bit_depth == 16) */ + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_16 != NULL && gamma_16_from_1 != NULL && + gamma_16_to_1 != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 8) + { + png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) + << 8) + (png_uint_16)(*(sp + 7))); + + if (a == (png_uint_16)0xffff) + { + png_uint_16 v; + + v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + + v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; + *(sp + 2) = (png_byte)((v >> 8) & 0xff); + *(sp + 3) = (png_byte)(v & 0xff); + + v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; + *(sp + 4) = (png_byte)((v >> 8) & 0xff); + *(sp + 5) = (png_byte)(v & 0xff); + } + + else if (a == 0) + { + /* Background is already in screen gamma */ + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) + & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green + & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) + & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); + } + + else + { + png_uint_16 v, w; + + v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; + png_composite_16(w, v, a, png_ptr->background_1.red); + if (!optimize) + w = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> + 8]; + *sp = (png_byte)((w >> 8) & 0xff); + *(sp + 1) = (png_byte)(w & 0xff); + + v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)]; + png_composite_16(w, v, a, png_ptr->background_1.green); + if (!optimize) + w = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> + 8]; + + *(sp + 2) = (png_byte)((w >> 8) & 0xff); + *(sp + 3) = (png_byte)(w & 0xff); + + v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)]; + png_composite_16(w, v, a, png_ptr->background_1.blue); + if (!optimize) + w = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> + 8]; + + *(sp + 4) = (png_byte)((w >> 8) & 0xff); + *(sp + 5) = (png_byte)(w & 0xff); + } + } + } + + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 8) + { + png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) + << 8) + (png_uint_16)(*(sp + 7))); + + if (a == 0) + { + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) + & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green + & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) + & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); + } + + else if (a < 0xffff) + { + png_uint_16 v; + + png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + + *(sp + 5)); + + png_composite_16(v, r, a, png_ptr->background.red); + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + + png_composite_16(v, g, a, png_ptr->background.green); + *(sp + 2) = (png_byte)((v >> 8) & 0xff); + *(sp + 3) = (png_byte)(v & 0xff); + + png_composite_16(v, b, a, png_ptr->background.blue); + *(sp + 4) = (png_byte)((v >> 8) & 0xff); + *(sp + 5) = (png_byte)(v & 0xff); + } + } + } + } + break; + } + + default: + break; + } + } +} +#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_READ_ALPHA_MODE_SUPPORTED */ + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* Gamma correct the image, avoiding the alpha channel. Make sure + * you do this after you deal with the transparency issue on grayscale + * or RGB images. If your bit depth is 8, use gamma_table, if it + * is 16, use gamma_16_table and gamma_shift. Build these with + * build_gamma_table(). + */ +void /* PRIVATE */ +png_do_gamma(png_row_infop row_info, png_bytep row, png_structrp png_ptr) +{ + png_const_bytep gamma_table = png_ptr->gamma_table; + png_const_uint_16pp gamma_16_table = png_ptr->gamma_16_table; + int gamma_shift = png_ptr->gamma_shift; + + png_bytep sp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_gamma"); + + if (((row_info->bit_depth <= 8 && gamma_table != NULL) || + (row_info->bit_depth == 16 && gamma_16_table != NULL))) + { + switch (row_info->color_type) + { + case PNG_COLOR_TYPE_RGB: + { + if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp++; + *sp = gamma_table[*sp]; + sp++; + *sp = gamma_table[*sp]; + sp++; + } + } + + else /* if (row_info->bit_depth == 16) */ + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v; + + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + } + } + break; + } + + case PNG_COLOR_TYPE_RGB_ALPHA: + { + if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp++; + + *sp = gamma_table[*sp]; + sp++; + + *sp = gamma_table[*sp]; + sp++; + + sp++; + } + } + + else /* if (row_info->bit_depth == 16) */ + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 4; + } + } + break; + } + + case PNG_COLOR_TYPE_GRAY_ALPHA: + { + if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp += 2; + } + } + + else /* if (row_info->bit_depth == 16) */ + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 4; + } + } + break; + } + + case PNG_COLOR_TYPE_GRAY: + { + if (row_info->bit_depth == 2) + { + sp = row; + for (i = 0; i < row_width; i += 4) + { + int a = *sp & 0xc0; + int b = *sp & 0x30; + int c = *sp & 0x0c; + int d = *sp & 0x03; + + *sp = (png_byte)( + ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)| + ((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)| + ((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)| + ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) )); + sp++; + } + } + + if (row_info->bit_depth == 4) + { + sp = row; + for (i = 0; i < row_width; i += 2) + { + int msb = *sp & 0xf0; + int lsb = *sp & 0x0f; + + *sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0) + | (((int)gamma_table[(lsb << 4) | lsb]) >> 4)); + sp++; + } + } + + else if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp++; + } + } + + else if (row_info->bit_depth == 16) + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + } + } + break; + } + + default: + break; + } + } +} +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +/* Encode the alpha channel to the output gamma (the input channel is always + * linear.) Called only with color types that have an alpha channel. Needs the + * from_1 tables. + */ +void /* PRIVATE */ +png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr) +{ + png_uint_32 row_width = row_info->width; + + png_debug(1, "in png_do_encode_alpha"); + + if (row_info->color_type & PNG_COLOR_MASK_ALPHA) + { + if (row_info->bit_depth == 8) + { + PNG_CONST png_bytep table = png_ptr->gamma_from_1; + + if (table != NULL) + { + PNG_CONST int step = + (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 4 : 2; + + /* The alpha channel is the last component: */ + row += step - 1; + + for (; row_width > 0; --row_width, row += step) + *row = table[*row]; + + return; + } + } + + else if (row_info->bit_depth == 16) + { + PNG_CONST png_uint_16pp table = png_ptr->gamma_16_from_1; + PNG_CONST int gamma_shift = png_ptr->gamma_shift; + + if (table != NULL) + { + PNG_CONST int step = + (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 8 : 4; + + /* The alpha channel is the last component: */ + row += step - 2; + + for (; row_width > 0; --row_width, row += step) + { + png_uint_16 v; + + v = table[*(row + 1) >> gamma_shift][*row]; + *row = (png_byte)((v >> 8) & 0xff); + *(row + 1) = (png_byte)(v & 0xff); + } + + return; + } + } + } + + /* Only get to here if called with a weird row_info; no harm has been done, + * so just issue a warning. + */ + png_warning(png_ptr, "png_do_encode_alpha: unexpected call"); +} +#endif + +#ifdef PNG_READ_EXPAND_SUPPORTED +/* Expands a palette row to an RGB or RGBA row depending + * upon whether you supply trans and num_trans. + */ +void /* PRIVATE */ +png_do_expand_palette(png_row_infop row_info, png_bytep row, + png_const_colorp palette, png_const_bytep trans_alpha, int num_trans) +{ + int shift, value; + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_expand_palette"); + + if (row_info->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (row_info->bit_depth < 8) + { + switch (row_info->bit_depth) + { + case 1: + { + sp = row + (png_size_t)((row_width - 1) >> 3); + dp = row + (png_size_t)row_width - 1; + shift = 7 - (int)((row_width + 7) & 0x07); + for (i = 0; i < row_width; i++) + { + if ((*sp >> shift) & 0x01) + *dp = 1; + + else + *dp = 0; + + if (shift == 7) + { + shift = 0; + sp--; + } + + else + shift++; + + dp--; + } + break; + } + + case 2: + { + sp = row + (png_size_t)((row_width - 1) >> 2); + dp = row + (png_size_t)row_width - 1; + shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x03; + *dp = (png_byte)value; + if (shift == 6) + { + shift = 0; + sp--; + } + + else + shift += 2; + + dp--; + } + break; + } + + case 4: + { + sp = row + (png_size_t)((row_width - 1) >> 1); + dp = row + (png_size_t)row_width - 1; + shift = (int)((row_width & 0x01) << 2); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x0f; + *dp = (png_byte)value; + if (shift == 4) + { + shift = 0; + sp--; + } + + else + shift += 4; + + dp--; + } + break; + } + + default: + break; + } + row_info->bit_depth = 8; + row_info->pixel_depth = 8; + row_info->rowbytes = row_width; + } + + if (row_info->bit_depth == 8) + { + { + if (num_trans > 0) + { + sp = row + (png_size_t)row_width - 1; + dp = row + (png_size_t)(row_width << 2) - 1; + + for (i = 0; i < row_width; i++) + { + if ((int)(*sp) >= num_trans) + *dp-- = 0xff; + + else + *dp-- = trans_alpha[*sp]; + + *dp-- = palette[*sp].blue; + *dp-- = palette[*sp].green; + *dp-- = palette[*sp].red; + sp--; + } + row_info->bit_depth = 8; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + row_info->color_type = 6; + row_info->channels = 4; + } + + else + { + sp = row + (png_size_t)row_width - 1; + dp = row + (png_size_t)(row_width * 3) - 1; + + for (i = 0; i < row_width; i++) + { + *dp-- = palette[*sp].blue; + *dp-- = palette[*sp].green; + *dp-- = palette[*sp].red; + sp--; + } + + row_info->bit_depth = 8; + row_info->pixel_depth = 24; + row_info->rowbytes = row_width * 3; + row_info->color_type = 2; + row_info->channels = 3; + } + } + } + } +} + +/* If the bit depth < 8, it is expanded to 8. Also, if the already + * expanded transparency value is supplied, an alpha channel is built. + */ +void /* PRIVATE */ +png_do_expand(png_row_infop row_info, png_bytep row, + png_const_color_16p trans_color) +{ + int shift, value; + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_expand"); + + { + if (row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + unsigned int gray = trans_color ? trans_color->gray : 0; + + if (row_info->bit_depth < 8) + { + switch (row_info->bit_depth) + { + case 1: + { + gray = (gray & 0x01) * 0xff; + sp = row + (png_size_t)((row_width - 1) >> 3); + dp = row + (png_size_t)row_width - 1; + shift = 7 - (int)((row_width + 7) & 0x07); + for (i = 0; i < row_width; i++) + { + if ((*sp >> shift) & 0x01) + *dp = 0xff; + + else + *dp = 0; + + if (shift == 7) + { + shift = 0; + sp--; + } + + else + shift++; + + dp--; + } + break; + } + + case 2: + { + gray = (gray & 0x03) * 0x55; + sp = row + (png_size_t)((row_width - 1) >> 2); + dp = row + (png_size_t)row_width - 1; + shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x03; + *dp = (png_byte)(value | (value << 2) | (value << 4) | + (value << 6)); + if (shift == 6) + { + shift = 0; + sp--; + } + + else + shift += 2; + + dp--; + } + break; + } + + case 4: + { + gray = (gray & 0x0f) * 0x11; + sp = row + (png_size_t)((row_width - 1) >> 1); + dp = row + (png_size_t)row_width - 1; + shift = (int)((1 - ((row_width + 1) & 0x01)) << 2); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x0f; + *dp = (png_byte)(value | (value << 4)); + if (shift == 4) + { + shift = 0; + sp--; + } + + else + shift = 4; + + dp--; + } + break; + } + + default: + break; + } + + row_info->bit_depth = 8; + row_info->pixel_depth = 8; + row_info->rowbytes = row_width; + } + + if (trans_color != NULL) + { + if (row_info->bit_depth == 8) + { + gray = gray & 0xff; + sp = row + (png_size_t)row_width - 1; + dp = row + (png_size_t)(row_width << 1) - 1; + + for (i = 0; i < row_width; i++) + { + if (*sp == gray) + *dp-- = 0; + + else + *dp-- = 0xff; + + *dp-- = *sp--; + } + } + + else if (row_info->bit_depth == 16) + { + unsigned int gray_high = (gray >> 8) & 0xff; + unsigned int gray_low = gray & 0xff; + sp = row + row_info->rowbytes - 1; + dp = row + (row_info->rowbytes << 1) - 1; + for (i = 0; i < row_width; i++) + { + if (*(sp - 1) == gray_high && *(sp) == gray_low) + { + *dp-- = 0; + *dp-- = 0; + } + + else + { + *dp-- = 0xff; + *dp-- = 0xff; + } + + *dp-- = *sp--; + *dp-- = *sp--; + } + } + + row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA; + row_info->channels = 2; + row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1); + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, + row_width); + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_color) + { + if (row_info->bit_depth == 8) + { + png_byte red = (png_byte)(trans_color->red & 0xff); + png_byte green = (png_byte)(trans_color->green & 0xff); + png_byte blue = (png_byte)(trans_color->blue & 0xff); + sp = row + (png_size_t)row_info->rowbytes - 1; + dp = row + (png_size_t)(row_width << 2) - 1; + for (i = 0; i < row_width; i++) + { + if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue) + *dp-- = 0; + + else + *dp-- = 0xff; + + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + } + } + else if (row_info->bit_depth == 16) + { + png_byte red_high = (png_byte)((trans_color->red >> 8) & 0xff); + png_byte green_high = (png_byte)((trans_color->green >> 8) & 0xff); + png_byte blue_high = (png_byte)((trans_color->blue >> 8) & 0xff); + png_byte red_low = (png_byte)(trans_color->red & 0xff); + png_byte green_low = (png_byte)(trans_color->green & 0xff); + png_byte blue_low = (png_byte)(trans_color->blue & 0xff); + sp = row + row_info->rowbytes - 1; + dp = row + (png_size_t)(row_width << 3) - 1; + for (i = 0; i < row_width; i++) + { + if (*(sp - 5) == red_high && + *(sp - 4) == red_low && + *(sp - 3) == green_high && + *(sp - 2) == green_low && + *(sp - 1) == blue_high && + *(sp ) == blue_low) + { + *dp-- = 0; + *dp-- = 0; + } + + else + { + *dp-- = 0xff; + *dp-- = 0xff; + } + + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + } + } + row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA; + row_info->channels = 4; + row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2); + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); + } + } +} +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* If the bit depth is 8 and the color type is not a palette type expand the + * whole row to 16 bits. Has no effect otherwise. + */ +void /* PRIVATE */ +png_do_expand_16(png_row_infop row_info, png_bytep row) +{ + if (row_info->bit_depth == 8 && + row_info->color_type != PNG_COLOR_TYPE_PALETTE) + { + /* The row have a sequence of bytes containing [0..255] and we need + * to turn it into another row containing [0..65535], to do this we + * calculate: + * + * (input / 255) * 65535 + * + * Which happens to be exactly input * 257 and this can be achieved + * simply by byte replication in place (copying backwards). + */ + png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */ + png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */ + while (dp > sp) + dp[-2] = dp[-1] = *--sp, dp -= 2; + + row_info->rowbytes *= 2; + row_info->bit_depth = 16; + row_info->pixel_depth = (png_byte)(row_info->channels * 16); + } +} +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +void /* PRIVATE */ +png_do_quantize(png_row_infop row_info, png_bytep row, + png_const_bytep palette_lookup, png_const_bytep quantize_lookup) +{ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_quantize"); + + if (row_info->bit_depth == 8) + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB && palette_lookup) + { + int r, g, b, p; + sp = row; + dp = row; + for (i = 0; i < row_width; i++) + { + r = *sp++; + g = *sp++; + b = *sp++; + + /* This looks real messy, but the compiler will reduce + * it down to a reasonable formula. For example, with + * 5 bits per color, we get: + * p = (((r >> 3) & 0x1f) << 10) | + * (((g >> 3) & 0x1f) << 5) | + * ((b >> 3) & 0x1f); + */ + p = (((r >> (8 - PNG_QUANTIZE_RED_BITS)) & + ((1 << PNG_QUANTIZE_RED_BITS) - 1)) << + (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) | + (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) & + ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) << + (PNG_QUANTIZE_BLUE_BITS)) | + ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) & + ((1 << PNG_QUANTIZE_BLUE_BITS) - 1)); + + *dp++ = palette_lookup[p]; + } + + row_info->color_type = PNG_COLOR_TYPE_PALETTE; + row_info->channels = 1; + row_info->pixel_depth = row_info->bit_depth; + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); + } + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA && + palette_lookup != NULL) + { + int r, g, b, p; + sp = row; + dp = row; + for (i = 0; i < row_width; i++) + { + r = *sp++; + g = *sp++; + b = *sp++; + sp++; + + p = (((r >> (8 - PNG_QUANTIZE_RED_BITS)) & + ((1 << PNG_QUANTIZE_RED_BITS) - 1)) << + (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) | + (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) & + ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) << + (PNG_QUANTIZE_BLUE_BITS)) | + ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) & + ((1 << PNG_QUANTIZE_BLUE_BITS) - 1)); + + *dp++ = palette_lookup[p]; + } + + row_info->color_type = PNG_COLOR_TYPE_PALETTE; + row_info->channels = 1; + row_info->pixel_depth = row_info->bit_depth; + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); + } + + else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && + quantize_lookup) + { + sp = row; + + for (i = 0; i < row_width; i++, sp++) + { + *sp = quantize_lookup[*sp]; + } + } + } +} +#endif /* PNG_READ_QUANTIZE_SUPPORTED */ +#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ + +#ifdef PNG_MNG_FEATURES_SUPPORTED +/* Undoes intrapixel differencing */ +void /* PRIVATE */ +png_do_read_intrapixel(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_read_intrapixel"); + + if ( + (row_info->color_type & PNG_COLOR_MASK_COLOR)) + { + int bytes_per_pixel; + png_uint_32 row_width = row_info->width; + + if (row_info->bit_depth == 8) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 3; + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 4; + + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + *(rp) = (png_byte)((256 + *rp + *(rp + 1)) & 0xff); + *(rp+2) = (png_byte)((256 + *(rp + 2) + *(rp + 1)) & 0xff); + } + } + else if (row_info->bit_depth == 16) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 6; + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 8; + + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + png_uint_32 s0 = (*(rp ) << 8) | *(rp + 1); + png_uint_32 s1 = (*(rp + 2) << 8) | *(rp + 3); + png_uint_32 s2 = (*(rp + 4) << 8) | *(rp + 5); + png_uint_32 red = (s0 + s1 + 65536) & 0xffff; + png_uint_32 blue = (s2 + s1 + 65536) & 0xffff; + *(rp ) = (png_byte)((red >> 8) & 0xff); + *(rp + 1) = (png_byte)(red & 0xff); + *(rp + 4) = (png_byte)((blue >> 8) & 0xff); + *(rp + 5) = (png_byte)(blue & 0xff); + } + } + } +} +#endif /* PNG_MNG_FEATURES_SUPPORTED */ +#endif /* PNG_READ_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngrutil.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngrutil.c new file mode 100644 index 0000000000..01c3679dff --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngrutil.c @@ -0,0 +1,4462 @@ + +/* pngrutil.c - utilities to read a PNG file + * + * Last changed in libpng 1.6.2 [April 25, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file contains routines that are only called from within + * libpng itself during the course of reading an image. + */ + +#include "pngpriv.h" + +#ifdef PNG_READ_SUPPORTED + +#define png_strtod(p,a,b) strtod(a,b) + +png_uint_32 PNGAPI +png_get_uint_31(png_const_structrp png_ptr, png_const_bytep buf) +{ + png_uint_32 uval = png_get_uint_32(buf); + + if (uval > PNG_UINT_31_MAX) + png_error(png_ptr, "PNG unsigned integer out of range"); + + return (uval); +} + +#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_READ_cHRM_SUPPORTED) +/* The following is a variation on the above for use with the fixed + * point values used for gAMA and cHRM. Instead of png_error it + * issues a warning and returns (-1) - an invalid value because both + * gAMA and cHRM use *unsigned* integers for fixed point values. + */ +#define PNG_FIXED_ERROR (-1) + +static png_fixed_point /* PRIVATE */ +png_get_fixed_point(png_structrp png_ptr, png_const_bytep buf) +{ + png_uint_32 uval = png_get_uint_32(buf); + + if (uval <= PNG_UINT_31_MAX) + return (png_fixed_point)uval; /* known to be in range */ + + /* The caller can turn off the warning by passing NULL. */ + if (png_ptr != NULL) + png_warning(png_ptr, "PNG fixed point integer out of range"); + + return PNG_FIXED_ERROR; +} +#endif + +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +/* NOTE: the read macros will obscure these definitions, so that if + * PNG_USE_READ_MACROS is set the library will not use them internally, + * but the APIs will still be available externally. + * + * The parentheses around "PNGAPI function_name" in the following three + * functions are necessary because they allow the macros to co-exist with + * these (unused but exported) functions. + */ + +/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */ +png_uint_32 (PNGAPI +png_get_uint_32)(png_const_bytep buf) +{ + png_uint_32 uval = + ((png_uint_32)(*(buf )) << 24) + + ((png_uint_32)(*(buf + 1)) << 16) + + ((png_uint_32)(*(buf + 2)) << 8) + + ((png_uint_32)(*(buf + 3)) ) ; + + return uval; +} + +/* Grab a signed 32-bit integer from a buffer in big-endian format. The + * data is stored in the PNG file in two's complement format and there + * is no guarantee that a 'png_int_32' is exactly 32 bits, therefore + * the following code does a two's complement to native conversion. + */ +png_int_32 (PNGAPI +png_get_int_32)(png_const_bytep buf) +{ + png_uint_32 uval = png_get_uint_32(buf); + if ((uval & 0x80000000) == 0) /* non-negative */ + return uval; + + uval = (uval ^ 0xffffffff) + 1; /* 2's complement: -x = ~x+1 */ + return -(png_int_32)uval; +} + +/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */ +png_uint_16 (PNGAPI +png_get_uint_16)(png_const_bytep buf) +{ + /* ANSI-C requires an int value to accomodate at least 16 bits so this + * works and allows the compiler not to worry about possible narrowing + * on 32 bit systems. (Pre-ANSI systems did not make integers smaller + * than 16 bits either.) + */ + unsigned int val = + ((unsigned int)(*buf) << 8) + + ((unsigned int)(*(buf + 1))); + + return (png_uint_16)val; +} + +#endif /* PNG_READ_INT_FUNCTIONS_SUPPORTED */ + +/* Read and check the PNG file signature */ +void /* PRIVATE */ +png_read_sig(png_structrp png_ptr, png_inforp info_ptr) +{ + png_size_t num_checked, num_to_check; + + /* Exit if the user application does not expect a signature. */ + if (png_ptr->sig_bytes >= 8) + return; + + num_checked = png_ptr->sig_bytes; + num_to_check = 8 - num_checked; + +#ifdef PNG_IO_STATE_SUPPORTED + png_ptr->io_state = PNG_IO_READING | PNG_IO_SIGNATURE; +#endif + + /* The signature must be serialized in a single I/O call. */ + png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check); + png_ptr->sig_bytes = 8; + + if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) + { + if (num_checked < 4 && + png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) + png_error(png_ptr, "Not a PNG file"); + else + png_error(png_ptr, "PNG file corrupted by ASCII conversion"); + } + if (num_checked < 3) + png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; +} + +/* Read the chunk header (length + type name). + * Put the type name into png_ptr->chunk_name, and return the length. + */ +png_uint_32 /* PRIVATE */ +png_read_chunk_header(png_structrp png_ptr) +{ + png_byte buf[8]; + png_uint_32 length; + +#ifdef PNG_IO_STATE_SUPPORTED + png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_HDR; +#endif + + /* Read the length and the chunk name. + * This must be performed in a single I/O call. + */ + png_read_data(png_ptr, buf, 8); + length = png_get_uint_31(png_ptr, buf); + + /* Put the chunk name into png_ptr->chunk_name. */ + png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(buf+4); + + png_debug2(0, "Reading %lx chunk, length = %lu", + (unsigned long)png_ptr->chunk_name, (unsigned long)length); + + /* Reset the crc and run it over the chunk name. */ + png_reset_crc(png_ptr); + png_calculate_crc(png_ptr, buf + 4, 4); + + /* Check to see if chunk name is valid. */ + png_check_chunk_name(png_ptr, png_ptr->chunk_name); + +#ifdef PNG_IO_STATE_SUPPORTED + png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_DATA; +#endif + + return length; +} + +/* Read data, and (optionally) run it through the CRC. */ +void /* PRIVATE */ +png_crc_read(png_structrp png_ptr, png_bytep buf, png_uint_32 length) +{ + if (png_ptr == NULL) + return; + + png_read_data(png_ptr, buf, length); + png_calculate_crc(png_ptr, buf, length); +} + +/* Optionally skip data and then check the CRC. Depending on whether we + * are reading an ancillary or critical chunk, and how the program has set + * things up, we may calculate the CRC on the data and print a message. + * Returns '1' if there was a CRC error, '0' otherwise. + */ +int /* PRIVATE */ +png_crc_finish(png_structrp png_ptr, png_uint_32 skip) +{ + /* The size of the local buffer for inflate is a good guess as to a + * reasonable size to use for buffering reads from the application. + */ + while (skip > 0) + { + png_uint_32 len; + png_byte tmpbuf[PNG_INFLATE_BUF_SIZE]; + + len = (sizeof tmpbuf); + if (len > skip) + len = skip; + skip -= len; + + png_crc_read(png_ptr, tmpbuf, len); + } + + if (png_crc_error(png_ptr)) + { + if (PNG_CHUNK_ANCILLARY(png_ptr->chunk_name) ? + !(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) : + (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_USE)) + { + png_chunk_warning(png_ptr, "CRC error"); + } + + else + { + png_chunk_benign_error(png_ptr, "CRC error"); + return (0); + } + + return (1); + } + + return (0); +} + +/* Compare the CRC stored in the PNG file with that calculated by libpng from + * the data it has read thus far. + */ +int /* PRIVATE */ +png_crc_error(png_structrp png_ptr) +{ + png_byte crc_bytes[4]; + png_uint_32 crc; + int need_crc = 1; + + if (PNG_CHUNK_ANCILLARY(png_ptr->chunk_name)) + { + if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) == + (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) + need_crc = 0; + } + + else /* critical */ + { + if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) + need_crc = 0; + } + +#ifdef PNG_IO_STATE_SUPPORTED + png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_CRC; +#endif + + /* The chunk CRC must be serialized in a single I/O call. */ + png_read_data(png_ptr, crc_bytes, 4); + + if (need_crc) + { + crc = png_get_uint_32(crc_bytes); + return ((int)(crc != png_ptr->crc)); + } + + else + return (0); +} + +/* Manage the read buffer; this simply reallocates the buffer if it is not small + * enough (or if it is not allocated). The routine returns a pointer to the + * buffer; if an error occurs and 'warn' is set the routine returns NULL, else + * it will call png_error (via png_malloc) on failure. (warn == 2 means + * 'silent'). + */ +static png_bytep +png_read_buffer(png_structrp png_ptr, png_alloc_size_t new_size, int warn) +{ + png_bytep buffer = png_ptr->read_buffer; + + if (buffer != NULL && new_size > png_ptr->read_buffer_size) + { + png_ptr->read_buffer = NULL; + png_ptr->read_buffer = NULL; + png_ptr->read_buffer_size = 0; + png_free(png_ptr, buffer); + buffer = NULL; + } + + if (buffer == NULL) + { + buffer = png_voidcast(png_bytep, png_malloc_base(png_ptr, new_size)); + + if (buffer != NULL) + { + png_ptr->read_buffer = buffer; + png_ptr->read_buffer_size = new_size; + } + + else if (warn < 2) /* else silent */ + { +#ifdef PNG_WARNINGS_SUPPORTED + if (warn) + png_chunk_warning(png_ptr, "insufficient memory to read chunk"); + else +#endif + { +#ifdef PNG_ERROR_TEXT_SUPPORTED + png_chunk_error(png_ptr, "insufficient memory to read chunk"); +#endif + } + } + } + + return buffer; +} + +/* png_inflate_claim: claim the zstream for some nefarious purpose that involves + * decompression. Returns Z_OK on success, else a zlib error code. It checks + * the owner but, in final release builds, just issues a warning if some other + * chunk apparently owns the stream. Prior to release it does a png_error. + */ +static int +png_inflate_claim(png_structrp png_ptr, png_uint_32 owner, int window_bits) +{ + if (png_ptr->zowner != 0) + { + char msg[64]; + + PNG_STRING_FROM_CHUNK(msg, png_ptr->zowner); + /* So the message that results is " using zstream"; this is an + * internal error, but is very useful for debugging. i18n requirements + * are minimal. + */ + (void)png_safecat(msg, (sizeof msg), 4, " using zstream"); +# if PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC + png_chunk_warning(png_ptr, msg); + png_ptr->zowner = 0; +# else + png_chunk_error(png_ptr, msg); +# endif + } + + /* Implementation note: unlike 'png_deflate_claim' this internal function + * does not take the size of the data as an argument. Some efficiency could + * be gained by using this when it is known *if* the zlib stream itself does + * not record the number; however, this is an illusion: the original writer + * of the PNG may have selected a lower window size, and we really must + * follow that because, for systems with with limited capabilities, we + * would otherwise reject the application's attempts to use a smaller window + * size (zlib doesn't have an interface to say "this or lower"!). + * + * inflateReset2 was added to zlib 1.2.4; before this the window could not be + * reset, therefore it is necessary to always allocate the maximum window + * size with earlier zlibs just in case later compressed chunks need it. + */ + { + int ret; /* zlib return code */ + + /* Set this for safety, just in case the previous owner left pointers to + * memory allocations. + */ + png_ptr->zstream.next_in = NULL; + png_ptr->zstream.avail_in = 0; + png_ptr->zstream.next_out = NULL; + png_ptr->zstream.avail_out = 0; + + if (png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) + { +# if ZLIB_VERNUM < 0x1240 + PNG_UNUSED(window_bits) + ret = inflateReset(&png_ptr->zstream); +# else + ret = inflateReset2(&png_ptr->zstream, window_bits); +# endif + } + + else + { +# if ZLIB_VERNUM < 0x1240 + ret = inflateInit(&png_ptr->zstream); +# else + ret = inflateInit2(&png_ptr->zstream, window_bits); +# endif + + if (ret == Z_OK) + png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED; + } + + if (ret == Z_OK) + png_ptr->zowner = owner; + + else + png_zstream_error(png_ptr, ret); + + return ret; + } +} + +#ifdef PNG_READ_COMPRESSED_TEXT_SUPPORTED +/* png_inflate now returns zlib error codes including Z_OK and Z_STREAM_END to + * allow the caller to do multiple calls if required. If the 'finish' flag is + * set Z_FINISH will be passed to the final inflate() call and Z_STREAM_END must + * be returned or there has been a problem, otherwise Z_SYNC_FLUSH is used and + * Z_OK or Z_STREAM_END will be returned on success. + * + * The input and output sizes are updated to the actual amounts of data consumed + * or written, not the amount available (as in a z_stream). The data pointers + * are not changed, so the next input is (data+input_size) and the next + * available output is (output+output_size). + */ +static int +png_inflate(png_structrp png_ptr, png_uint_32 owner, int finish, + /* INPUT: */ png_const_bytep input, png_uint_32p input_size_ptr, + /* OUTPUT: */ png_bytep output, png_alloc_size_t *output_size_ptr) +{ + if (png_ptr->zowner == owner) /* Else not claimed */ + { + int ret; + png_alloc_size_t avail_out = *output_size_ptr; + png_uint_32 avail_in = *input_size_ptr; + + /* zlib can't necessarily handle more than 65535 bytes at once (i.e. it + * can't even necessarily handle 65536 bytes) because the type uInt is + * "16 bits or more". Consequently it is necessary to chunk the input to + * zlib. This code uses ZLIB_IO_MAX, from pngpriv.h, as the maximum (the + * maximum value that can be stored in a uInt.) It is possible to set + * ZLIB_IO_MAX to a lower value in pngpriv.h and this may sometimes have + * a performance advantage, because it reduces the amount of data accessed + * at each step and that may give the OS more time to page it in. + */ + png_ptr->zstream.next_in = PNGZ_INPUT_CAST(input); + /* avail_in and avail_out are set below from 'size' */ + png_ptr->zstream.avail_in = 0; + png_ptr->zstream.avail_out = 0; + + /* Read directly into the output if it is available (this is set to + * a local buffer below if output is NULL). + */ + if (output != NULL) + png_ptr->zstream.next_out = output; + + do + { + uInt avail; + Byte local_buffer[PNG_INFLATE_BUF_SIZE]; + + /* zlib INPUT BUFFER */ + /* The setting of 'avail_in' used to be outside the loop; by setting it + * inside it is possible to chunk the input to zlib and simply rely on + * zlib to advance the 'next_in' pointer. This allows arbitrary + * amounts of data to be passed through zlib at the unavoidable cost of + * requiring a window save (memcpy of up to 32768 output bytes) + * every ZLIB_IO_MAX input bytes. + */ + avail_in += png_ptr->zstream.avail_in; /* not consumed last time */ + + avail = ZLIB_IO_MAX; + + if (avail_in < avail) + avail = (uInt)avail_in; /* safe: < than ZLIB_IO_MAX */ + + avail_in -= avail; + png_ptr->zstream.avail_in = avail; + + /* zlib OUTPUT BUFFER */ + avail_out += png_ptr->zstream.avail_out; /* not written last time */ + + avail = ZLIB_IO_MAX; /* maximum zlib can process */ + + if (output == NULL) + { + /* Reset the output buffer each time round if output is NULL and + * make available the full buffer, up to 'remaining_space' + */ + png_ptr->zstream.next_out = local_buffer; + if ((sizeof local_buffer) < avail) + avail = (sizeof local_buffer); + } + + if (avail_out < avail) + avail = (uInt)avail_out; /* safe: < ZLIB_IO_MAX */ + + png_ptr->zstream.avail_out = avail; + avail_out -= avail; + + /* zlib inflate call */ + /* In fact 'avail_out' may be 0 at this point, that happens at the end + * of the read when the final LZ end code was not passed at the end of + * the previous chunk of input data. Tell zlib if we have reached the + * end of the output buffer. + */ + ret = inflate(&png_ptr->zstream, avail_out > 0 ? Z_NO_FLUSH : + (finish ? Z_FINISH : Z_SYNC_FLUSH)); + } while (ret == Z_OK); + + /* For safety kill the local buffer pointer now */ + if (output == NULL) + png_ptr->zstream.next_out = NULL; + + /* Claw back the 'size' and 'remaining_space' byte counts. */ + avail_in += png_ptr->zstream.avail_in; + avail_out += png_ptr->zstream.avail_out; + + /* Update the input and output sizes; the updated values are the amount + * consumed or written, effectively the inverse of what zlib uses. + */ + if (avail_out > 0) + *output_size_ptr -= avail_out; + + if (avail_in > 0) + *input_size_ptr -= avail_in; + + /* Ensure png_ptr->zstream.msg is set (even in the success case!) */ + png_zstream_error(png_ptr, ret); + return ret; + } + + else + { + /* This is a bad internal error. The recovery assigns to the zstream msg + * pointer, which is not owned by the caller, but this is safe; it's only + * used on errors! + */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("zstream unclaimed"); + return Z_STREAM_ERROR; + } +} + +/* + * Decompress trailing data in a chunk. The assumption is that read_buffer + * points at an allocated area holding the contents of a chunk with a + * trailing compressed part. What we get back is an allocated area + * holding the original prefix part and an uncompressed version of the + * trailing part (the malloc area passed in is freed). + */ +static int +png_decompress_chunk(png_structrp png_ptr, + png_uint_32 chunklength, png_uint_32 prefix_size, + png_alloc_size_t *newlength /* must be initialized to the maximum! */, + int terminate /*add a '\0' to the end of the uncompressed data*/) +{ + /* TODO: implement different limits for different types of chunk. + * + * The caller supplies *newlength set to the maximum length of the + * uncompressed data, but this routine allocates space for the prefix and + * maybe a '\0' terminator too. We have to assume that 'prefix_size' is + * limited only by the maximum chunk size. + */ + png_alloc_size_t limit = PNG_SIZE_MAX; + +# ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED + if (png_ptr->user_chunk_malloc_max > 0 && + png_ptr->user_chunk_malloc_max < limit) + limit = png_ptr->user_chunk_malloc_max; +# elif PNG_USER_CHUNK_MALLOC_MAX > 0 + if (PNG_USER_CHUNK_MALLOC_MAX < limit) + limit = PNG_USER_CHUNK_MALLOC_MAX; +# endif + + if (limit >= prefix_size + (terminate != 0)) + { + int ret; + + limit -= prefix_size + (terminate != 0); + + if (limit < *newlength) + *newlength = limit; + + /* Now try to claim the stream; the 'warn' setting causes zlib to be told + * to use the maximum window size during inflate; this hides errors in the + * deflate header window bits value which is used if '0' is passed. In + * fact this only has an effect with zlib versions 1.2.4 and later - see + * the comments in png_inflate_claim above. + */ + ret = png_inflate_claim(png_ptr, png_ptr->chunk_name, + png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN ? 15 : 0); + + if (ret == Z_OK) + { + png_uint_32 lzsize = chunklength - prefix_size; + + ret = png_inflate(png_ptr, png_ptr->chunk_name, 1/*finish*/, + /* input: */ png_ptr->read_buffer + prefix_size, &lzsize, + /* output: */ NULL, newlength); + + if (ret == Z_STREAM_END) + { + /* Use 'inflateReset' here, not 'inflateReset2' because this + * preserves the previously decided window size (otherwise it would + * be necessary to store the previous window size.) In practice + * this doesn't matter anyway, because png_inflate will call inflate + * with Z_FINISH in almost all cases, so the window will not be + * maintained. + */ + if (inflateReset(&png_ptr->zstream) == Z_OK) + { + /* Because of the limit checks above we know that the new, + * expanded, size will fit in a size_t (let alone an + * png_alloc_size_t). Use png_malloc_base here to avoid an + * extra OOM message. + */ + png_alloc_size_t new_size = *newlength; + png_alloc_size_t buffer_size = prefix_size + new_size + + (terminate != 0); + png_bytep text = png_voidcast(png_bytep, png_malloc_base(png_ptr, + buffer_size)); + + if (text != NULL) + { + ret = png_inflate(png_ptr, png_ptr->chunk_name, 1/*finish*/, + png_ptr->read_buffer + prefix_size, &lzsize, + text + prefix_size, newlength); + + if (ret == Z_STREAM_END) + { + if (new_size == *newlength) + { + if (terminate) + text[prefix_size + *newlength] = 0; + + if (prefix_size > 0) + memcpy(text, png_ptr->read_buffer, prefix_size); + + { + png_bytep old_ptr = png_ptr->read_buffer; + + png_ptr->read_buffer = text; + png_ptr->read_buffer_size = buffer_size; + text = old_ptr; /* freed below */ + } + } + + else + { + /* The size changed on the second read, there can be no + * guarantee that anything is correct at this point. + * The 'msg' pointer has been set to "unexpected end of + * LZ stream", which is fine, but return an error code + * that the caller won't accept. + */ + ret = PNG_UNEXPECTED_ZLIB_RETURN; + } + } + + else if (ret == Z_OK) + ret = PNG_UNEXPECTED_ZLIB_RETURN; /* for safety */ + + /* Free the text pointer (this is the old read_buffer on + * success) + */ + png_free(png_ptr, text); + + /* This really is very benign, but it's still an error because + * the extra space may otherwise be used as a Trojan Horse. + */ + if (ret == Z_STREAM_END && + chunklength - prefix_size != lzsize) + png_chunk_benign_error(png_ptr, "extra compressed data"); + } + + else + { + /* Out of memory allocating the buffer */ + ret = Z_MEM_ERROR; + png_zstream_error(png_ptr, Z_MEM_ERROR); + } + } + + else + { + /* inflateReset failed, store the error message */ + png_zstream_error(png_ptr, ret); + + if (ret == Z_STREAM_END) + ret = PNG_UNEXPECTED_ZLIB_RETURN; + } + } + + else if (ret == Z_OK) + ret = PNG_UNEXPECTED_ZLIB_RETURN; + + /* Release the claimed stream */ + png_ptr->zowner = 0; + } + + else /* the claim failed */ if (ret == Z_STREAM_END) /* impossible! */ + ret = PNG_UNEXPECTED_ZLIB_RETURN; + + return ret; + } + + else + { + /* Application/configuration limits exceeded */ + png_zstream_error(png_ptr, Z_MEM_ERROR); + return Z_MEM_ERROR; + } +} +#endif /* PNG_READ_COMPRESSED_TEXT_SUPPORTED */ + +#ifdef PNG_READ_iCCP_SUPPORTED +/* Perform a partial read and decompress, producing 'avail_out' bytes and + * reading from the current chunk as required. + */ +static int +png_inflate_read(png_structrp png_ptr, png_bytep read_buffer, uInt read_size, + png_uint_32p chunk_bytes, png_bytep next_out, png_alloc_size_t *out_size, + int finish) +{ + if (png_ptr->zowner == png_ptr->chunk_name) + { + int ret; + + /* next_in and avail_in must have been initialized by the caller. */ + png_ptr->zstream.next_out = next_out; + png_ptr->zstream.avail_out = 0; /* set in the loop */ + + do + { + if (png_ptr->zstream.avail_in == 0) + { + if (read_size > *chunk_bytes) + read_size = (uInt)*chunk_bytes; + *chunk_bytes -= read_size; + + if (read_size > 0) + png_crc_read(png_ptr, read_buffer, read_size); + + png_ptr->zstream.next_in = read_buffer; + png_ptr->zstream.avail_in = read_size; + } + + if (png_ptr->zstream.avail_out == 0) + { + uInt avail = ZLIB_IO_MAX; + if (avail > *out_size) + avail = (uInt)*out_size; + *out_size -= avail; + + png_ptr->zstream.avail_out = avail; + } + + /* Use Z_SYNC_FLUSH when there is no more chunk data to ensure that all + * the available output is produced; this allows reading of truncated + * streams. + */ + ret = inflate(&png_ptr->zstream, + *chunk_bytes > 0 ? Z_NO_FLUSH : (finish ? Z_FINISH : Z_SYNC_FLUSH)); + } + while (ret == Z_OK && (*out_size > 0 || png_ptr->zstream.avail_out > 0)); + + *out_size += png_ptr->zstream.avail_out; + png_ptr->zstream.avail_out = 0; /* Should not be required, but is safe */ + + /* Ensure the error message pointer is always set: */ + png_zstream_error(png_ptr, ret); + return ret; + } + + else + { + png_ptr->zstream.msg = PNGZ_MSG_CAST("zstream unclaimed"); + return Z_STREAM_ERROR; + } +} +#endif + +/* Read and check the IDHR chunk */ +void /* PRIVATE */ +png_handle_IHDR(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte buf[13]; + png_uint_32 width, height; + int bit_depth, color_type, compression_type, filter_type; + int interlace_type; + + png_debug(1, "in png_handle_IHDR"); + + if (png_ptr->mode & PNG_HAVE_IHDR) + png_chunk_error(png_ptr, "out of place"); + + /* Check the length */ + if (length != 13) + png_chunk_error(png_ptr, "invalid"); + + png_ptr->mode |= PNG_HAVE_IHDR; + + png_crc_read(png_ptr, buf, 13); + png_crc_finish(png_ptr, 0); + + width = png_get_uint_31(png_ptr, buf); + height = png_get_uint_31(png_ptr, buf + 4); + bit_depth = buf[8]; + color_type = buf[9]; + compression_type = buf[10]; + filter_type = buf[11]; + interlace_type = buf[12]; + + /* Set internal variables */ + png_ptr->width = width; + png_ptr->height = height; + png_ptr->bit_depth = (png_byte)bit_depth; + png_ptr->interlaced = (png_byte)interlace_type; + png_ptr->color_type = (png_byte)color_type; +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_ptr->filter_type = (png_byte)filter_type; +#endif + png_ptr->compression_type = (png_byte)compression_type; + + /* Find number of channels */ + switch (png_ptr->color_type) + { + default: /* invalid, png_set_IHDR calls png_error */ + case PNG_COLOR_TYPE_GRAY: + case PNG_COLOR_TYPE_PALETTE: + png_ptr->channels = 1; + break; + + case PNG_COLOR_TYPE_RGB: + png_ptr->channels = 3; + break; + + case PNG_COLOR_TYPE_GRAY_ALPHA: + png_ptr->channels = 2; + break; + + case PNG_COLOR_TYPE_RGB_ALPHA: + png_ptr->channels = 4; + break; + } + + /* Set up other useful info */ + png_ptr->pixel_depth = (png_byte)(png_ptr->bit_depth * + png_ptr->channels); + png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->width); + png_debug1(3, "bit_depth = %d", png_ptr->bit_depth); + png_debug1(3, "channels = %d", png_ptr->channels); + png_debug1(3, "rowbytes = %lu", (unsigned long)png_ptr->rowbytes); + png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, + color_type, interlace_type, compression_type, filter_type); +} + +/* Read and check the palette */ +void /* PRIVATE */ +png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_color palette[PNG_MAX_PALETTE_LENGTH]; + int num, i; +#ifdef PNG_POINTER_INDEXING_SUPPORTED + png_colorp pal_ptr; +#endif + + png_debug(1, "in png_handle_PLTE"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + /* Moved to before the 'after IDAT' check below because otherwise duplicate + * PLTE chunks are potentially ignored (the spec says there shall not be more + * than one PLTE, the error is not treated as benign, so this check trumps + * the requirement that PLTE appears before IDAT.) + */ + else if (png_ptr->mode & PNG_HAVE_PLTE) + png_chunk_error(png_ptr, "duplicate"); + + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + /* This is benign because the non-benign error happened before, when an + * IDAT was encountered in a color-mapped image with no PLTE. + */ + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + png_ptr->mode |= PNG_HAVE_PLTE; + + if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "ignored in grayscale PNG"); + return; + } + +#ifndef PNG_READ_OPT_PLTE_SUPPORTED + if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) + { + png_crc_finish(png_ptr, length); + return; + } +#endif + + if (length > 3*PNG_MAX_PALETTE_LENGTH || length % 3) + { + png_crc_finish(png_ptr, length); + + if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) + png_chunk_benign_error(png_ptr, "invalid"); + + else + png_chunk_error(png_ptr, "invalid"); + + return; + } + + /* The cast is safe because 'length' is less than 3*PNG_MAX_PALETTE_LENGTH */ + num = (int)length / 3; + +#ifdef PNG_POINTER_INDEXING_SUPPORTED + for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++) + { + png_byte buf[3]; + + png_crc_read(png_ptr, buf, 3); + pal_ptr->red = buf[0]; + pal_ptr->green = buf[1]; + pal_ptr->blue = buf[2]; + } +#else + for (i = 0; i < num; i++) + { + png_byte buf[3]; + + png_crc_read(png_ptr, buf, 3); + /* Don't depend upon png_color being any order */ + palette[i].red = buf[0]; + palette[i].green = buf[1]; + palette[i].blue = buf[2]; + } +#endif + + /* If we actually need the PLTE chunk (ie for a paletted image), we do + * whatever the normal CRC configuration tells us. However, if we + * have an RGB image, the PLTE can be considered ancillary, so + * we will act as though it is. + */ +#ifndef PNG_READ_OPT_PLTE_SUPPORTED + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) +#endif + { + png_crc_finish(png_ptr, 0); + } + +#ifndef PNG_READ_OPT_PLTE_SUPPORTED + else if (png_crc_error(png_ptr)) /* Only if we have a CRC error */ + { + /* If we don't want to use the data from an ancillary chunk, + * we have two options: an error abort, or a warning and we + * ignore the data in this chunk (which should be OK, since + * it's considered ancillary for a RGB or RGBA image). + * + * IMPLEMENTATION NOTE: this is only here because png_crc_finish uses the + * chunk type to determine whether to check the ancillary or the critical + * flags. + */ + if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_USE)) + { + if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) + { + png_chunk_benign_error(png_ptr, "CRC error"); + } + + else + { + png_chunk_warning(png_ptr, "CRC error"); + return; + } + } + + /* Otherwise, we (optionally) emit a warning and use the chunk. */ + else if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) + { + png_chunk_warning(png_ptr, "CRC error"); + } + } +#endif + + /* TODO: png_set_PLTE has the side effect of setting png_ptr->palette to its + * own copy of the palette. This has the side effect that when png_start_row + * is called (this happens after any call to png_read_update_info) the + * info_ptr palette gets changed. This is extremely unexpected and + * confusing. + * + * Fix this by not sharing the palette in this way. + */ + png_set_PLTE(png_ptr, info_ptr, palette, num); + + /* The three chunks, bKGD, hIST and tRNS *must* appear after PLTE and before + * IDAT. Prior to 1.6.0 this was not checked; instead the code merely + * checked the apparent validity of a tRNS chunk inserted before PLTE on a + * palette PNG. 1.6.0 attempts to rigorously follow the standard and + * therefore does a benign error if the erroneous condition is detected *and* + * cancels the tRNS if the benign error returns. The alternative is to + * amend the standard since it would be rather hypocritical of the standards + * maintainers to ignore it. + */ +#ifdef PNG_READ_tRNS_SUPPORTED + if (png_ptr->num_trans > 0 || + (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS) != 0)) + { + /* Cancel this because otherwise it would be used if the transforms + * require it. Don't cancel the 'valid' flag because this would prevent + * detection of duplicate chunks. + */ + png_ptr->num_trans = 0; + + if (info_ptr != NULL) + info_ptr->num_trans = 0; + + png_chunk_benign_error(png_ptr, "tRNS must be after"); + } +#endif + +#ifdef PNG_READ_hIST_SUPPORTED + if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST) != 0) + png_chunk_benign_error(png_ptr, "hIST must be after"); +#endif + +#ifdef PNG_READ_bKGD_SUPPORTED + if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD) != 0) + png_chunk_benign_error(png_ptr, "bKGD must be after"); +#endif +} + +void /* PRIVATE */ +png_handle_IEND(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_debug(1, "in png_handle_IEND"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR) || !(png_ptr->mode & PNG_HAVE_IDAT)) + png_chunk_error(png_ptr, "out of place"); + + png_ptr->mode |= (PNG_AFTER_IDAT | PNG_HAVE_IEND); + + png_crc_finish(png_ptr, length); + + if (length != 0) + png_chunk_benign_error(png_ptr, "invalid"); + + PNG_UNUSED(info_ptr) +} + +#ifdef PNG_READ_gAMA_SUPPORTED +void /* PRIVATE */ +png_handle_gAMA(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_fixed_point igamma; + png_byte buf[4]; + + png_debug(1, "in png_handle_gAMA"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (png_ptr->mode & (PNG_HAVE_IDAT|PNG_HAVE_PLTE)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + if (length != 4) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_crc_read(png_ptr, buf, 4); + + if (png_crc_finish(png_ptr, 0)) + return; + + igamma = png_get_fixed_point(NULL, buf); + + png_colorspace_set_gamma(png_ptr, &png_ptr->colorspace, igamma); + png_colorspace_sync(png_ptr, info_ptr); +} +#endif + +#ifdef PNG_READ_sBIT_SUPPORTED +void /* PRIVATE */ +png_handle_sBIT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + unsigned int truelen; + png_byte buf[4]; + + png_debug(1, "in png_handle_sBIT"); + + buf[0] = buf[1] = buf[2] = buf[3] = 0; + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (png_ptr->mode & (PNG_HAVE_IDAT|PNG_HAVE_PLTE)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "duplicate"); + return; + } + + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + truelen = 3; + + else + truelen = png_ptr->channels; + + if (length != truelen || length > 4) + { + png_chunk_benign_error(png_ptr, "invalid"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buf, truelen); + + if (png_crc_finish(png_ptr, 0)) + return; + + if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) + { + png_ptr->sig_bit.red = buf[0]; + png_ptr->sig_bit.green = buf[1]; + png_ptr->sig_bit.blue = buf[2]; + png_ptr->sig_bit.alpha = buf[3]; + } + + else + { + png_ptr->sig_bit.gray = buf[0]; + png_ptr->sig_bit.red = buf[0]; + png_ptr->sig_bit.green = buf[0]; + png_ptr->sig_bit.blue = buf[0]; + png_ptr->sig_bit.alpha = buf[1]; + } + + png_set_sBIT(png_ptr, info_ptr, &(png_ptr->sig_bit)); +} +#endif + +#ifdef PNG_READ_cHRM_SUPPORTED +void /* PRIVATE */ +png_handle_cHRM(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte buf[32]; + png_xy xy; + + png_debug(1, "in png_handle_cHRM"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (png_ptr->mode & (PNG_HAVE_IDAT|PNG_HAVE_PLTE)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + if (length != 32) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_crc_read(png_ptr, buf, 32); + + if (png_crc_finish(png_ptr, 0)) + return; + + xy.whitex = png_get_fixed_point(NULL, buf); + xy.whitey = png_get_fixed_point(NULL, buf + 4); + xy.redx = png_get_fixed_point(NULL, buf + 8); + xy.redy = png_get_fixed_point(NULL, buf + 12); + xy.greenx = png_get_fixed_point(NULL, buf + 16); + xy.greeny = png_get_fixed_point(NULL, buf + 20); + xy.bluex = png_get_fixed_point(NULL, buf + 24); + xy.bluey = png_get_fixed_point(NULL, buf + 28); + + if (xy.whitex == PNG_FIXED_ERROR || + xy.whitey == PNG_FIXED_ERROR || + xy.redx == PNG_FIXED_ERROR || + xy.redy == PNG_FIXED_ERROR || + xy.greenx == PNG_FIXED_ERROR || + xy.greeny == PNG_FIXED_ERROR || + xy.bluex == PNG_FIXED_ERROR || + xy.bluey == PNG_FIXED_ERROR) + { + png_chunk_benign_error(png_ptr, "invalid values"); + return; + } + + /* If a colorspace error has already been output skip this chunk */ + if (png_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) + return; + + if (png_ptr->colorspace.flags & PNG_COLORSPACE_FROM_cHRM) + { + png_ptr->colorspace.flags |= PNG_COLORSPACE_INVALID; + png_colorspace_sync(png_ptr, info_ptr); + png_chunk_benign_error(png_ptr, "duplicate"); + return; + } + + png_ptr->colorspace.flags |= PNG_COLORSPACE_FROM_cHRM; + (void)png_colorspace_set_chromaticities(png_ptr, &png_ptr->colorspace, &xy, + 1/*prefer cHRM values*/); + png_colorspace_sync(png_ptr, info_ptr); +} +#endif + +#ifdef PNG_READ_sRGB_SUPPORTED +void /* PRIVATE */ +png_handle_sRGB(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte intent; + + png_debug(1, "in png_handle_sRGB"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (png_ptr->mode & (PNG_HAVE_IDAT|PNG_HAVE_PLTE)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + if (length != 1) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_crc_read(png_ptr, &intent, 1); + + if (png_crc_finish(png_ptr, 0)) + return; + + /* If a colorspace error has already been output skip this chunk */ + if (png_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) + return; + + /* Only one sRGB or iCCP chunk is allowed, use the HAVE_INTENT flag to detect + * this. + */ + if (png_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_INTENT) + { + png_ptr->colorspace.flags |= PNG_COLORSPACE_INVALID; + png_colorspace_sync(png_ptr, info_ptr); + png_chunk_benign_error(png_ptr, "too many profiles"); + return; + } + + (void)png_colorspace_set_sRGB(png_ptr, &png_ptr->colorspace, intent); + png_colorspace_sync(png_ptr, info_ptr); +} +#endif /* PNG_READ_sRGB_SUPPORTED */ + +#ifdef PNG_READ_iCCP_SUPPORTED +void /* PRIVATE */ +png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +/* Note: this does not properly handle profiles that are > 64K under DOS */ +{ + png_const_charp errmsg = NULL; /* error message output, or no error */ + int finished = 0; /* crc checked */ + + png_debug(1, "in png_handle_iCCP"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (png_ptr->mode & (PNG_HAVE_IDAT|PNG_HAVE_PLTE)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + /* Consistent with all the above colorspace handling an obviously *invalid* + * chunk is just ignored, so does not invalidate the color space. An + * alternative is to set the 'invalid' flags at the start of this routine + * and only clear them in they were not set before and all the tests pass. + * The minimum 'deflate' stream is assumed to be just the 2 byte header and 4 + * byte checksum. The keyword must be one character and there is a + * terminator (0) byte and the compression method. + */ + if (length < 9) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "too short"); + return; + } + + /* If a colorspace error has already been output skip this chunk */ + if (png_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) + { + png_crc_finish(png_ptr, length); + return; + } + + /* Only one sRGB or iCCP chunk is allowed, use the HAVE_INTENT flag to detect + * this. + */ + if ((png_ptr->colorspace.flags & PNG_COLORSPACE_HAVE_INTENT) == 0) + { + uInt read_length, keyword_length; + char keyword[81]; + + /* Find the keyword; the keyword plus separator and compression method + * bytes can be at most 81 characters long. + */ + read_length = 81; /* maximum */ + if (read_length > length) + read_length = (uInt)length; + + png_crc_read(png_ptr, (png_bytep)keyword, read_length); + length -= read_length; + + keyword_length = 0; + while (keyword_length < 80 && keyword_length < read_length && + keyword[keyword_length] != 0) + ++keyword_length; + + /* TODO: make the keyword checking common */ + if (keyword_length >= 1 && keyword_length <= 79) + { + /* We only understand '0' compression - deflate - so if we get a + * different value we can't safely decode the chunk. + */ + if (keyword_length+1 < read_length && + keyword[keyword_length+1] == PNG_COMPRESSION_TYPE_BASE) + { + read_length -= keyword_length+2; + + if (png_inflate_claim(png_ptr, png_iCCP, + png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN ? 15 : 0) == Z_OK) + { + Byte profile_header[132]; + Byte local_buffer[PNG_INFLATE_BUF_SIZE]; + png_alloc_size_t size = (sizeof profile_header); + + png_ptr->zstream.next_in = (Bytef*)keyword + (keyword_length+2); + png_ptr->zstream.avail_in = read_length; + (void)png_inflate_read(png_ptr, local_buffer, + (sizeof local_buffer), &length, profile_header, &size, + 0/*finish: don't, because the output is too small*/); + + if (size == 0) + { + /* We have the ICC profile header; do the basic header checks. + */ + const png_uint_32 profile_length = + png_get_uint_32(profile_header); + + if (png_icc_check_length(png_ptr, &png_ptr->colorspace, + keyword, profile_length)) + { + /* The length is apparently ok, so we can check the 132 + * byte header. + */ + if (png_icc_check_header(png_ptr, &png_ptr->colorspace, + keyword, profile_length, profile_header, + png_ptr->color_type)) + { + /* Now read the tag table; a variable size buffer is + * needed at this point, allocate one for the whole + * profile. The header check has already validated + * that none of these stuff will overflow. + */ + const png_uint_32 tag_count = png_get_uint_32( + profile_header+128); + png_bytep profile = png_read_buffer(png_ptr, + profile_length, 2/*silent*/); + + if (profile != NULL) + { + memcpy(profile, profile_header, + (sizeof profile_header)); + + size = 12 * tag_count; + + (void)png_inflate_read(png_ptr, local_buffer, + (sizeof local_buffer), &length, + profile + (sizeof profile_header), &size, 0); + + /* Still expect a a buffer error because we expect + * there to be some tag data! + */ + if (size == 0) + { + if (png_icc_check_tag_table(png_ptr, + &png_ptr->colorspace, keyword, profile_length, + profile)) + { + /* The profile has been validated for basic + * security issues, so read the whole thing in. + */ + size = profile_length - (sizeof profile_header) + - 12 * tag_count; + + (void)png_inflate_read(png_ptr, local_buffer, + (sizeof local_buffer), &length, + profile + (sizeof profile_header) + + 12 * tag_count, &size, 1/*finish*/); + + if (length > 0 && !(png_ptr->flags & + PNG_FLAG_BENIGN_ERRORS_WARN)) + errmsg = "extra compressed data"; + + /* But otherwise allow extra data: */ + else if (size == 0) + { + if (length > 0) + { + /* This can be handled completely, so + * keep going. + */ + png_chunk_warning(png_ptr, + "extra compressed data"); + } + + png_crc_finish(png_ptr, length); + finished = 1; + +# ifdef PNG_sRGB_SUPPORTED + /* Check for a match against sRGB */ + png_icc_set_sRGB(png_ptr, + &png_ptr->colorspace, profile, + png_ptr->zstream.adler); +# endif + + /* Steal the profile for info_ptr. */ + if (info_ptr != NULL) + { + png_free_data(png_ptr, info_ptr, + PNG_FREE_ICCP, 0); + + info_ptr->iccp_name = png_voidcast(char*, + png_malloc_base(png_ptr, + keyword_length+1)); + if (info_ptr->iccp_name != NULL) + { + memcpy(info_ptr->iccp_name, keyword, + keyword_length+1); + info_ptr->iccp_proflen = + profile_length; + info_ptr->iccp_profile = profile; + png_ptr->read_buffer = NULL; /*steal*/ + info_ptr->free_me |= PNG_FREE_ICCP; + info_ptr->valid |= PNG_INFO_iCCP; + } + + else + { + png_ptr->colorspace.flags |= + PNG_COLORSPACE_INVALID; + errmsg = "out of memory"; + } + } + + /* else the profile remains in the read + * buffer which gets reused for subsequent + * chunks. + */ + + if (info_ptr != NULL) + png_colorspace_sync(png_ptr, info_ptr); + + if (errmsg == NULL) + { + png_ptr->zowner = 0; + return; + } + } + + else if (size > 0) + errmsg = "truncated"; + + else + errmsg = png_ptr->zstream.msg; + } + + /* else png_icc_check_tag_table output an error */ + } + + else /* profile truncated */ + errmsg = png_ptr->zstream.msg; + } + + else + errmsg = "out of memory"; + } + + /* else png_icc_check_header output an error */ + } + + /* else png_icc_check_length output an error */ + } + + else /* profile truncated */ + errmsg = png_ptr->zstream.msg; + + /* Release the stream */ + png_ptr->zowner = 0; + } + + else /* png_inflate_claim failed */ + errmsg = png_ptr->zstream.msg; + } + + else + errmsg = "bad compression method"; /* or missing */ + } + + else + errmsg = "bad keyword"; + } + + else + errmsg = "too many profiles"; + + /* Failure: the reason is in 'errmsg' */ + if (!finished) + png_crc_finish(png_ptr, length); + + png_ptr->colorspace.flags |= PNG_COLORSPACE_INVALID; + png_colorspace_sync(png_ptr, info_ptr); + if (errmsg != NULL) /* else already output */ + png_chunk_benign_error(png_ptr, errmsg); +} +#endif /* PNG_READ_iCCP_SUPPORTED */ + +#ifdef PNG_READ_sPLT_SUPPORTED +void /* PRIVATE */ +png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +/* Note: this does not properly handle chunks that are > 64K under DOS */ +{ + png_bytep entry_start, buffer; + png_sPLT_t new_palette; + png_sPLT_entryp pp; + png_uint_32 data_length; + int entry_size, i; + png_uint_32 skip = 0; + png_uint_32 dl; + png_size_t max_dl; + + png_debug(1, "in png_handle_sPLT"); + +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return; + } + + if (--png_ptr->user_chunk_cache_max == 1) + { + png_warning(png_ptr, "No space in chunk cache for sPLT"); + png_crc_finish(png_ptr, length); + return; + } + } +#endif + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + +#ifdef PNG_MAX_MALLOC_64K + if (length > 65535U) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "too large to fit in memory"); + return; + } +#endif + + buffer = png_read_buffer(png_ptr, length+1, 2/*silent*/); + if (buffer == NULL) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of memory"); + return; + } + + + /* WARNING: this may break if size_t is less than 32 bits; it is assumed + * that the PNG_MAX_MALLOC_64K test is enabled in this case, but this is a + * potential breakage point if the types in pngconf.h aren't exactly right. + */ + png_crc_read(png_ptr, buffer, length); + + if (png_crc_finish(png_ptr, skip)) + return; + + buffer[length] = 0; + + for (entry_start = buffer; *entry_start; entry_start++) + /* Empty loop to find end of name */ ; + + ++entry_start; + + /* A sample depth should follow the separator, and we should be on it */ + if (entry_start > buffer + length - 2) + { + png_warning(png_ptr, "malformed sPLT chunk"); + return; + } + + new_palette.depth = *entry_start++; + entry_size = (new_palette.depth == 8 ? 6 : 10); + /* This must fit in a png_uint_32 because it is derived from the original + * chunk data length. + */ + data_length = length - (png_uint_32)(entry_start - buffer); + + /* Integrity-check the data length */ + if (data_length % entry_size) + { + png_warning(png_ptr, "sPLT chunk has bad length"); + return; + } + + dl = (png_int_32)(data_length / entry_size); + max_dl = PNG_SIZE_MAX / (sizeof (png_sPLT_entry)); + + if (dl > max_dl) + { + png_warning(png_ptr, "sPLT chunk too long"); + return; + } + + new_palette.nentries = (png_int_32)(data_length / entry_size); + + new_palette.entries = (png_sPLT_entryp)png_malloc_warn( + png_ptr, new_palette.nentries * (sizeof (png_sPLT_entry))); + + if (new_palette.entries == NULL) + { + png_warning(png_ptr, "sPLT chunk requires too much memory"); + return; + } + +#ifdef PNG_POINTER_INDEXING_SUPPORTED + for (i = 0; i < new_palette.nentries; i++) + { + pp = new_palette.entries + i; + + if (new_palette.depth == 8) + { + pp->red = *entry_start++; + pp->green = *entry_start++; + pp->blue = *entry_start++; + pp->alpha = *entry_start++; + } + + else + { + pp->red = png_get_uint_16(entry_start); entry_start += 2; + pp->green = png_get_uint_16(entry_start); entry_start += 2; + pp->blue = png_get_uint_16(entry_start); entry_start += 2; + pp->alpha = png_get_uint_16(entry_start); entry_start += 2; + } + + pp->frequency = png_get_uint_16(entry_start); entry_start += 2; + } +#else + pp = new_palette.entries; + + for (i = 0; i < new_palette.nentries; i++) + { + + if (new_palette.depth == 8) + { + pp[i].red = *entry_start++; + pp[i].green = *entry_start++; + pp[i].blue = *entry_start++; + pp[i].alpha = *entry_start++; + } + + else + { + pp[i].red = png_get_uint_16(entry_start); entry_start += 2; + pp[i].green = png_get_uint_16(entry_start); entry_start += 2; + pp[i].blue = png_get_uint_16(entry_start); entry_start += 2; + pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2; + } + + pp[i].frequency = png_get_uint_16(entry_start); entry_start += 2; + } +#endif + + /* Discard all chunk data except the name and stash that */ + new_palette.name = (png_charp)buffer; + + png_set_sPLT(png_ptr, info_ptr, &new_palette, 1); + + png_free(png_ptr, new_palette.entries); +} +#endif /* PNG_READ_sPLT_SUPPORTED */ + +#ifdef PNG_READ_tRNS_SUPPORTED +void /* PRIVATE */ +png_handle_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte readbuf[PNG_MAX_PALETTE_LENGTH]; + + png_debug(1, "in png_handle_tRNS"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "duplicate"); + return; + } + + if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) + { + png_byte buf[2]; + + if (length != 2) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_crc_read(png_ptr, buf, 2); + png_ptr->num_trans = 1; + png_ptr->trans_color.gray = png_get_uint_16(buf); + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) + { + png_byte buf[6]; + + if (length != 6) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_crc_read(png_ptr, buf, length); + png_ptr->num_trans = 1; + png_ptr->trans_color.red = png_get_uint_16(buf); + png_ptr->trans_color.green = png_get_uint_16(buf + 2); + png_ptr->trans_color.blue = png_get_uint_16(buf + 4); + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (!(png_ptr->mode & PNG_HAVE_PLTE)) + { + /* TODO: is this actually an error in the ISO spec? */ + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + if (length > png_ptr->num_palette || length > PNG_MAX_PALETTE_LENGTH || + length == 0) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_crc_read(png_ptr, readbuf, length); + png_ptr->num_trans = (png_uint_16)length; + } + + else + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid with alpha channel"); + return; + } + + if (png_crc_finish(png_ptr, 0)) + { + png_ptr->num_trans = 0; + return; + } + + /* TODO: this is a horrible side effect in the palette case because the + * png_struct ends up with a pointer to the tRNS buffer owned by the + * png_info. Fix this. + */ + png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans, + &(png_ptr->trans_color)); +} +#endif + +#ifdef PNG_READ_bKGD_SUPPORTED +void /* PRIVATE */ +png_handle_bKGD(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + unsigned int truelen; + png_byte buf[6]; + png_color_16 background; + + png_debug(1, "in png_handle_bKGD"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if ((png_ptr->mode & PNG_HAVE_IDAT) || + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + !(png_ptr->mode & PNG_HAVE_PLTE))) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "duplicate"); + return; + } + + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + truelen = 1; + + else if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) + truelen = 6; + + else + truelen = 2; + + if (length != truelen) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_crc_read(png_ptr, buf, truelen); + + if (png_crc_finish(png_ptr, 0)) + return; + + /* We convert the index value into RGB components so that we can allow + * arbitrary RGB values for background when we have transparency, and + * so it is easy to determine the RGB values of the background color + * from the info_ptr struct. + */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + background.index = buf[0]; + + if (info_ptr && info_ptr->num_palette) + { + if (buf[0] >= info_ptr->num_palette) + { + png_chunk_benign_error(png_ptr, "invalid index"); + return; + } + + background.red = (png_uint_16)png_ptr->palette[buf[0]].red; + background.green = (png_uint_16)png_ptr->palette[buf[0]].green; + background.blue = (png_uint_16)png_ptr->palette[buf[0]].blue; + } + + else + background.red = background.green = background.blue = 0; + + background.gray = 0; + } + + else if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) /* GRAY */ + { + background.index = 0; + background.red = + background.green = + background.blue = + background.gray = png_get_uint_16(buf); + } + + else + { + background.index = 0; + background.red = png_get_uint_16(buf); + background.green = png_get_uint_16(buf + 2); + background.blue = png_get_uint_16(buf + 4); + background.gray = 0; + } + + png_set_bKGD(png_ptr, info_ptr, &background); +} +#endif + +#ifdef PNG_READ_hIST_SUPPORTED +void /* PRIVATE */ +png_handle_hIST(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + unsigned int num, i; + png_uint_16 readbuf[PNG_MAX_PALETTE_LENGTH]; + + png_debug(1, "in png_handle_hIST"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if ((png_ptr->mode & PNG_HAVE_IDAT) || !(png_ptr->mode & PNG_HAVE_PLTE)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "duplicate"); + return; + } + + num = length / 2 ; + + if (num != png_ptr->num_palette || num > PNG_MAX_PALETTE_LENGTH) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + for (i = 0; i < num; i++) + { + png_byte buf[2]; + + png_crc_read(png_ptr, buf, 2); + readbuf[i] = png_get_uint_16(buf); + } + + if (png_crc_finish(png_ptr, 0)) + return; + + png_set_hIST(png_ptr, info_ptr, readbuf); +} +#endif + +#ifdef PNG_READ_pHYs_SUPPORTED +void /* PRIVATE */ +png_handle_pHYs(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte buf[9]; + png_uint_32 res_x, res_y; + int unit_type; + + png_debug(1, "in png_handle_pHYs"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "duplicate"); + return; + } + + if (length != 9) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_crc_read(png_ptr, buf, 9); + + if (png_crc_finish(png_ptr, 0)) + return; + + res_x = png_get_uint_32(buf); + res_y = png_get_uint_32(buf + 4); + unit_type = buf[8]; + png_set_pHYs(png_ptr, info_ptr, res_x, res_y, unit_type); +} +#endif + +#ifdef PNG_READ_oFFs_SUPPORTED +void /* PRIVATE */ +png_handle_oFFs(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte buf[9]; + png_int_32 offset_x, offset_y; + int unit_type; + + png_debug(1, "in png_handle_oFFs"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "duplicate"); + return; + } + + if (length != 9) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_crc_read(png_ptr, buf, 9); + + if (png_crc_finish(png_ptr, 0)) + return; + + offset_x = png_get_int_32(buf); + offset_y = png_get_int_32(buf + 4); + unit_type = buf[8]; + png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, unit_type); +} +#endif + +#ifdef PNG_READ_pCAL_SUPPORTED +/* Read the pCAL chunk (described in the PNG Extensions document) */ +void /* PRIVATE */ +png_handle_pCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_int_32 X0, X1; + png_byte type, nparams; + png_bytep buffer, buf, units, endptr; + png_charpp params; + int i; + + png_debug(1, "in png_handle_pCAL"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "duplicate"); + return; + } + + png_debug1(2, "Allocating and reading pCAL chunk data (%u bytes)", + length + 1); + + buffer = png_read_buffer(png_ptr, length+1, 2/*silent*/); + + if (buffer == NULL) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of memory"); + return; + } + + png_crc_read(png_ptr, buffer, length); + + if (png_crc_finish(png_ptr, 0)) + return; + + buffer[length] = 0; /* Null terminate the last string */ + + png_debug(3, "Finding end of pCAL purpose string"); + for (buf = buffer; *buf; buf++) + /* Empty loop */ ; + + endptr = buffer + length; + + /* We need to have at least 12 bytes after the purpose string + * in order to get the parameter information. + */ + if (endptr <= buf + 12) + { + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_debug(3, "Reading pCAL X0, X1, type, nparams, and units"); + X0 = png_get_int_32((png_bytep)buf+1); + X1 = png_get_int_32((png_bytep)buf+5); + type = buf[9]; + nparams = buf[10]; + units = buf + 11; + + png_debug(3, "Checking pCAL equation type and number of parameters"); + /* Check that we have the right number of parameters for known + * equation types. + */ + if ((type == PNG_EQUATION_LINEAR && nparams != 2) || + (type == PNG_EQUATION_BASE_E && nparams != 3) || + (type == PNG_EQUATION_ARBITRARY && nparams != 3) || + (type == PNG_EQUATION_HYPERBOLIC && nparams != 4)) + { + png_chunk_benign_error(png_ptr, "invalid parameter count"); + return; + } + + else if (type >= PNG_EQUATION_LAST) + { + png_chunk_benign_error(png_ptr, "unrecognized equation type"); + } + + for (buf = units; *buf; buf++) + /* Empty loop to move past the units string. */ ; + + png_debug(3, "Allocating pCAL parameters array"); + + params = png_voidcast(png_charpp, png_malloc_warn(png_ptr, + nparams * (sizeof (png_charp)))); + + if (params == NULL) + { + png_chunk_benign_error(png_ptr, "out of memory"); + return; + } + + /* Get pointers to the start of each parameter string. */ + for (i = 0; i < nparams; i++) + { + buf++; /* Skip the null string terminator from previous parameter. */ + + png_debug1(3, "Reading pCAL parameter %d", i); + + for (params[i] = (png_charp)buf; buf <= endptr && *buf != 0; buf++) + /* Empty loop to move past each parameter string */ ; + + /* Make sure we haven't run out of data yet */ + if (buf > endptr) + { + png_free(png_ptr, params); + png_chunk_benign_error(png_ptr, "invalid data"); + return; + } + } + + png_set_pCAL(png_ptr, info_ptr, (png_charp)buffer, X0, X1, type, nparams, + (png_charp)units, params); + + png_free(png_ptr, params); +} +#endif + +#ifdef PNG_READ_sCAL_SUPPORTED +/* Read the sCAL chunk */ +void /* PRIVATE */ +png_handle_sCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_bytep buffer; + png_size_t i; + int state; + + png_debug(1, "in png_handle_sCAL"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return; + } + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sCAL)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "duplicate"); + return; + } + + /* Need unit type, width, \0, height: minimum 4 bytes */ + else if (length < 4) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_debug1(2, "Allocating and reading sCAL chunk data (%u bytes)", + length + 1); + + buffer = png_read_buffer(png_ptr, length+1, 2/*silent*/); + + if (buffer == NULL) + { + png_chunk_benign_error(png_ptr, "out of memory"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buffer, length); + buffer[length] = 0; /* Null terminate the last string */ + + if (png_crc_finish(png_ptr, 0)) + return; + + /* Validate the unit. */ + if (buffer[0] != 1 && buffer[0] != 2) + { + png_chunk_benign_error(png_ptr, "invalid unit"); + return; + } + + /* Validate the ASCII numbers, need two ASCII numbers separated by + * a '\0' and they need to fit exactly in the chunk data. + */ + i = 1; + state = 0; + + if (!png_check_fp_number((png_const_charp)buffer, length, &state, &i) || + i >= length || buffer[i++] != 0) + png_chunk_benign_error(png_ptr, "bad width format"); + + else if (!PNG_FP_IS_POSITIVE(state)) + png_chunk_benign_error(png_ptr, "non-positive width"); + + else + { + png_size_t heighti = i; + + state = 0; + if (!png_check_fp_number((png_const_charp)buffer, length, &state, &i) || + i != length) + png_chunk_benign_error(png_ptr, "bad height format"); + + else if (!PNG_FP_IS_POSITIVE(state)) + png_chunk_benign_error(png_ptr, "non-positive height"); + + else + /* This is the (only) success case. */ + png_set_sCAL_s(png_ptr, info_ptr, buffer[0], + (png_charp)buffer+1, (png_charp)buffer+heighti); + } +} +#endif + +#ifdef PNG_READ_tIME_SUPPORTED +void /* PRIVATE */ +png_handle_tIME(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte buf[7]; + png_time mod_time; + + png_debug(1, "in png_handle_tIME"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "duplicate"); + return; + } + + if (png_ptr->mode & PNG_HAVE_IDAT) + png_ptr->mode |= PNG_AFTER_IDAT; + + if (length != 7) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return; + } + + png_crc_read(png_ptr, buf, 7); + + if (png_crc_finish(png_ptr, 0)) + return; + + mod_time.second = buf[6]; + mod_time.minute = buf[5]; + mod_time.hour = buf[4]; + mod_time.day = buf[3]; + mod_time.month = buf[2]; + mod_time.year = png_get_uint_16(buf); + + png_set_tIME(png_ptr, info_ptr, &mod_time); +} +#endif + +#ifdef PNG_READ_tEXt_SUPPORTED +/* Note: this does not properly handle chunks that are > 64K under DOS */ +void /* PRIVATE */ +png_handle_tEXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_text text_info; + png_bytep buffer; + png_charp key; + png_charp text; + png_uint_32 skip = 0; + + png_debug(1, "in png_handle_tEXt"); + +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return; + } + + if (--png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "no space in chunk cache"); + return; + } + } +#endif + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + if (png_ptr->mode & PNG_HAVE_IDAT) + png_ptr->mode |= PNG_AFTER_IDAT; + +#ifdef PNG_MAX_MALLOC_64K + if (length > 65535U) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "too large to fit in memory"); + return; + } +#endif + + buffer = png_read_buffer(png_ptr, length+1, 1/*warn*/); + + if (buffer == NULL) + { + png_chunk_benign_error(png_ptr, "out of memory"); + return; + } + + png_crc_read(png_ptr, buffer, length); + + if (png_crc_finish(png_ptr, skip)) + return; + + key = (png_charp)buffer; + key[length] = 0; + + for (text = key; *text; text++) + /* Empty loop to find end of key */ ; + + if (text != key + length) + text++; + + text_info.compression = PNG_TEXT_COMPRESSION_NONE; + text_info.key = key; + text_info.lang = NULL; + text_info.lang_key = NULL; + text_info.itxt_length = 0; + text_info.text = text; + text_info.text_length = strlen(text); + + if (png_set_text_2(png_ptr, info_ptr, &text_info, 1)) + png_warning(png_ptr, "Insufficient memory to process text chunk"); +} +#endif + +#ifdef PNG_READ_zTXt_SUPPORTED +/* Note: this does not correctly handle chunks that are > 64K under DOS */ +void /* PRIVATE */ +png_handle_zTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_const_charp errmsg = NULL; + png_bytep buffer; + png_uint_32 keyword_length; + + png_debug(1, "in png_handle_zTXt"); + +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return; + } + + if (--png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "no space in chunk cache"); + return; + } + } +#endif + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + if (png_ptr->mode & PNG_HAVE_IDAT) + png_ptr->mode |= PNG_AFTER_IDAT; + + buffer = png_read_buffer(png_ptr, length, 2/*silent*/); + + if (buffer == NULL) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of memory"); + return; + } + + png_crc_read(png_ptr, buffer, length); + + if (png_crc_finish(png_ptr, 0)) + return; + + /* TODO: also check that the keyword contents match the spec! */ + for (keyword_length = 0; + keyword_length < length && buffer[keyword_length] != 0; + ++keyword_length) + /* Empty loop to find end of name */ ; + + if (keyword_length > 79 || keyword_length < 1) + errmsg = "bad keyword"; + + /* zTXt must have some LZ data after the keyword, although it may expand to + * zero bytes; we need a '\0' at the end of the keyword, the compression type + * then the LZ data: + */ + else if (keyword_length + 3 > length) + errmsg = "truncated"; + + else if (buffer[keyword_length+1] != PNG_COMPRESSION_TYPE_BASE) + errmsg = "unknown compression type"; + + else + { + png_alloc_size_t uncompressed_length = PNG_SIZE_MAX; + + /* TODO: at present png_decompress_chunk imposes a single application + * level memory limit, this should be split to different values for iCCP + * and text chunks. + */ + if (png_decompress_chunk(png_ptr, length, keyword_length+2, + &uncompressed_length, 1/*terminate*/) == Z_STREAM_END) + { + png_text text; + + /* It worked; png_ptr->read_buffer now looks like a tEXt chunk except + * for the extra compression type byte and the fact that it isn't + * necessarily '\0' terminated. + */ + buffer = png_ptr->read_buffer; + buffer[uncompressed_length+(keyword_length+2)] = 0; + + text.compression = PNG_TEXT_COMPRESSION_zTXt; + text.key = (png_charp)buffer; + text.text = (png_charp)(buffer + keyword_length+2); + text.text_length = uncompressed_length; + text.itxt_length = 0; + text.lang = NULL; + text.lang_key = NULL; + + if (png_set_text_2(png_ptr, info_ptr, &text, 1)) + errmsg = "insufficient memory"; + } + + else + errmsg = png_ptr->zstream.msg; + } + + if (errmsg != NULL) + png_chunk_benign_error(png_ptr, errmsg); +} +#endif + +#ifdef PNG_READ_iTXt_SUPPORTED +/* Note: this does not correctly handle chunks that are > 64K under DOS */ +void /* PRIVATE */ +png_handle_iTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_const_charp errmsg = NULL; + png_bytep buffer; + png_uint_32 prefix_length; + + png_debug(1, "in png_handle_iTXt"); + +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return; + } + + if (--png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "no space in chunk cache"); + return; + } + } +#endif + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_chunk_error(png_ptr, "missing IHDR"); + + if (png_ptr->mode & PNG_HAVE_IDAT) + png_ptr->mode |= PNG_AFTER_IDAT; + + buffer = png_read_buffer(png_ptr, length+1, 1/*warn*/); + + if (buffer == NULL) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of memory"); + return; + } + + png_crc_read(png_ptr, buffer, length); + + if (png_crc_finish(png_ptr, 0)) + return; + + /* First the keyword. */ + for (prefix_length=0; + prefix_length < length && buffer[prefix_length] != 0; + ++prefix_length) + /* Empty loop */ ; + + /* Perform a basic check on the keyword length here. */ + if (prefix_length > 79 || prefix_length < 1) + errmsg = "bad keyword"; + + /* Expect keyword, compression flag, compression type, language, translated + * keyword (both may be empty but are 0 terminated) then the text, which may + * be empty. + */ + else if (prefix_length + 5 > length) + errmsg = "truncated"; + + else if (buffer[prefix_length+1] == 0 || + (buffer[prefix_length+1] == 1 && + buffer[prefix_length+2] == PNG_COMPRESSION_TYPE_BASE)) + { + int compressed = buffer[prefix_length+1] != 0; + png_uint_32 language_offset, translated_keyword_offset; + png_alloc_size_t uncompressed_length = 0; + + /* Now the language tag */ + prefix_length += 3; + language_offset = prefix_length; + + for (; prefix_length < length && buffer[prefix_length] != 0; + ++prefix_length) + /* Empty loop */ ; + + /* WARNING: the length may be invalid here, this is checked below. */ + translated_keyword_offset = ++prefix_length; + + for (; prefix_length < length && buffer[prefix_length] != 0; + ++prefix_length) + /* Empty loop */ ; + + /* prefix_length should now be at the trailing '\0' of the translated + * keyword, but it may already be over the end. None of this arithmetic + * can overflow because chunks are at most 2^31 bytes long, but on 16-bit + * systems the available allocaton may overflow. + */ + ++prefix_length; + + if (!compressed && prefix_length <= length) + uncompressed_length = length - prefix_length; + + else if (compressed && prefix_length < length) + { + uncompressed_length = PNG_SIZE_MAX; + + /* TODO: at present png_decompress_chunk imposes a single application + * level memory limit, this should be split to different values for + * iCCP and text chunks. + */ + if (png_decompress_chunk(png_ptr, length, prefix_length, + &uncompressed_length, 1/*terminate*/) == Z_STREAM_END) + buffer = png_ptr->read_buffer; + + else + errmsg = png_ptr->zstream.msg; + } + + else + errmsg = "truncated"; + + if (errmsg == NULL) + { + png_text text; + + buffer[uncompressed_length+prefix_length] = 0; + + if (compressed) + text.compression = PNG_ITXT_COMPRESSION_NONE; + + else + text.compression = PNG_ITXT_COMPRESSION_zTXt; + + text.key = (png_charp)buffer; + text.lang = (png_charp)buffer + language_offset; + text.lang_key = (png_charp)buffer + translated_keyword_offset; + text.text = (png_charp)buffer + prefix_length; + text.text_length = 0; + text.itxt_length = uncompressed_length; + + if (png_set_text_2(png_ptr, info_ptr, &text, 1)) + errmsg = "insufficient memory"; + } + } + + else + errmsg = "bad compression info"; + + if (errmsg != NULL) + png_chunk_benign_error(png_ptr, errmsg); +} +#endif + +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +/* Utility function for png_handle_unknown; set up png_ptr::unknown_chunk */ +static int +png_cache_unknown_chunk(png_structrp png_ptr, png_uint_32 length) +{ + png_alloc_size_t limit = PNG_SIZE_MAX; + + if (png_ptr->unknown_chunk.data != NULL) + { + png_free(png_ptr, png_ptr->unknown_chunk.data); + png_ptr->unknown_chunk.data = NULL; + } + +# ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED + if (png_ptr->user_chunk_malloc_max > 0 && + png_ptr->user_chunk_malloc_max < limit) + limit = png_ptr->user_chunk_malloc_max; + +# elif PNG_USER_CHUNK_MALLOC_MAX > 0 + if (PNG_USER_CHUNK_MALLOC_MAX < limit) + limit = PNG_USER_CHUNK_MALLOC_MAX; +# endif + + if (length <= limit) + { + PNG_CSTRING_FROM_CHUNK(png_ptr->unknown_chunk.name, png_ptr->chunk_name); + /* The following is safe because of the PNG_SIZE_MAX init above */ + png_ptr->unknown_chunk.size = (png_size_t)length/*SAFE*/; + /* 'mode' is a flag array, only the bottom four bits matter here */ + png_ptr->unknown_chunk.location = (png_byte)png_ptr->mode/*SAFE*/; + + if (length == 0) + png_ptr->unknown_chunk.data = NULL; + + else + { + /* Do a 'warn' here - it is handled below. */ + png_ptr->unknown_chunk.data = png_voidcast(png_bytep, + png_malloc_warn(png_ptr, length)); + } + } + + if (png_ptr->unknown_chunk.data == NULL && length > 0) + { + /* This is benign because we clean up correctly */ + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "unknown chunk exceeds memory limits"); + return 0; + } + + else + { + if (length > 0) + png_crc_read(png_ptr, png_ptr->unknown_chunk.data, length); + png_crc_finish(png_ptr, 0); + return 1; + } +} +#endif /* PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */ + +/* Handle an unknown, or known but disabled, chunk */ +void /* PRIVATE */ +png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr, + png_uint_32 length, int keep) +{ + int handled = 0; /* the chunk was handled */ + + png_debug(1, "in png_handle_unknown"); + +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED + /* NOTE: this code is based on the code in libpng-1.4.12 except for fixing + * the bug which meant that setting a non-default behavior for a specific + * chunk would be ignored (the default was always used unless a user + * callback was installed). + * + * 'keep' is the value from the png_chunk_unknown_handling, the setting for + * this specific chunk_name, if PNG_HANDLE_AS_UNKNOWN_SUPPORTED, if not it + * will always be PNG_HANDLE_CHUNK_AS_DEFAULT and it needs to be set here. + * This is just an optimization to avoid multiple calls to the lookup + * function. + */ +# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +# ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + keep = png_chunk_unknown_handling(png_ptr, png_ptr->chunk_name); +# endif +# endif + + /* One of the following methods will read the chunk or skip it (at least one + * of these is always defined because this is the only way to switch on + * PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) + */ +# ifdef PNG_READ_USER_CHUNKS_SUPPORTED + /* The user callback takes precedence over the chunk keep value, but the + * keep value is still required to validate a save of a critical chunk. + */ + if (png_ptr->read_user_chunk_fn != NULL) + { + if (png_cache_unknown_chunk(png_ptr, length)) + { + /* Callback to user unknown chunk handler */ + int ret = (*(png_ptr->read_user_chunk_fn))(png_ptr, + &png_ptr->unknown_chunk); + + /* ret is: + * negative: An error occured, png_chunk_error will be called. + * zero: The chunk was not handled, the chunk will be discarded + * unless png_set_keep_unknown_chunks has been used to set + * a 'keep' behavior for this particular chunk, in which + * case that will be used. A critical chunk will cause an + * error at this point unless it is to be saved. + * positive: The chunk was handled, libpng will ignore/discard it. + */ + if (ret < 0) + png_chunk_error(png_ptr, "error in user chunk"); + + else if (ret == 0) + { + /* If the keep value is 'default' or 'never' override it, but + * still error out on critical chunks unless the keep value is + * 'always' While this is weird it is the behavior in 1.4.12. + * A possible improvement would be to obey the value set for the + * chunk, but this would be an API change that would probably + * damage some applications. + * + * The png_app_warning below catches the case that matters, where + * the application has not set specific save or ignore for this + * chunk or global save or ignore. + */ + if (keep < PNG_HANDLE_CHUNK_IF_SAFE) + { +# ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + if (png_ptr->unknown_default < PNG_HANDLE_CHUNK_IF_SAFE) + { + png_chunk_warning(png_ptr, "Saving unknown chunk:"); + png_app_warning(png_ptr, + "forcing save of an unhandled chunk;" + " please call png_set_keep_unknown_chunks"); + /* with keep = PNG_HANDLE_CHUNK_IF_SAFE */ + } +# endif + keep = PNG_HANDLE_CHUNK_IF_SAFE; + } + } + + else /* chunk was handled */ + { + handled = 1; + /* Critical chunks can be safely discarded at this point. */ + keep = PNG_HANDLE_CHUNK_NEVER; + } + } + + else + keep = PNG_HANDLE_CHUNK_NEVER; /* insufficient memory */ + } + + else + /* Use the SAVE_UNKNOWN_CHUNKS code or skip the chunk */ +# endif /* PNG_READ_USER_CHUNKS_SUPPORTED */ + +# ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED + { + /* keep is currently just the per-chunk setting, if there was no + * setting change it to the global default now (not that this may + * still be AS_DEFAULT) then obtain the cache of the chunk if required, + * if not simply skip the chunk. + */ + if (keep == PNG_HANDLE_CHUNK_AS_DEFAULT) + keep = png_ptr->unknown_default; + + if (keep == PNG_HANDLE_CHUNK_ALWAYS || + (keep == PNG_HANDLE_CHUNK_IF_SAFE && + PNG_CHUNK_ANCILLARY(png_ptr->chunk_name))) + { + if (!png_cache_unknown_chunk(png_ptr, length)) + keep = PNG_HANDLE_CHUNK_NEVER; + } + + else + png_crc_finish(png_ptr, length); + } +# else +# ifndef PNG_READ_USER_CHUNKS_SUPPORTED +# error no method to support READ_UNKNOWN_CHUNKS +# endif + + { + /* If here there is no read callback pointer set and no support is + * compiled in to just save the unknown chunks, so simply skip this + * chunk. If 'keep' is something other than AS_DEFAULT or NEVER then + * the app has erroneously asked for unknown chunk saving when there + * is no support. + */ + if (keep > PNG_HANDLE_CHUNK_NEVER) + png_app_error(png_ptr, "no unknown chunk support available"); + + png_crc_finish(png_ptr, length); + } +# endif + +# ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED + /* Now store the chunk in the chunk list if appropriate, and if the limits + * permit it. + */ + if (keep == PNG_HANDLE_CHUNK_ALWAYS || + (keep == PNG_HANDLE_CHUNK_IF_SAFE && + PNG_CHUNK_ANCILLARY(png_ptr->chunk_name))) + { +# ifdef PNG_USER_LIMITS_SUPPORTED + switch (png_ptr->user_chunk_cache_max) + { + case 2: + png_ptr->user_chunk_cache_max = 1; + png_chunk_benign_error(png_ptr, "no space in chunk cache"); + /* FALL THROUGH */ + case 1: + /* NOTE: prior to 1.6.0 this case resulted in an unknown critical + * chunk being skipped, now there will be a hard error below. + */ + break; + + default: /* not at limit */ + --(png_ptr->user_chunk_cache_max); + /* FALL THROUGH */ + case 0: /* no limit */ +# endif /* PNG_USER_LIMITS_SUPPORTED */ + /* Here when the limit isn't reached or when limits are compiled + * out; store the chunk. + */ + png_set_unknown_chunks(png_ptr, info_ptr, + &png_ptr->unknown_chunk, 1); + handled = 1; +# ifdef PNG_USER_LIMITS_SUPPORTED + break; + } +# endif + } +# else /* no store support! */ + PNG_UNUSED(info_ptr) +# error untested code (reading unknown chunks with no store support) +# endif + + /* Regardless of the error handling below the cached data (if any) can be + * freed now. Notice that the data is not freed if there is a png_error, but + * it will be freed by destroy_read_struct. + */ + if (png_ptr->unknown_chunk.data != NULL) + png_free(png_ptr, png_ptr->unknown_chunk.data); + png_ptr->unknown_chunk.data = NULL; + +#else /* !PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */ + /* There is no support to read an unknown chunk, so just skip it. */ + png_crc_finish(png_ptr, length); + PNG_UNUSED(info_ptr) + PNG_UNUSED(keep) +#endif /* !PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */ + + /* Check for unhandled critical chunks */ + if (!handled && PNG_CHUNK_CRITICAL(png_ptr->chunk_name)) + png_chunk_error(png_ptr, "unhandled critical chunk"); +} + +/* This function is called to verify that a chunk name is valid. + * This function can't have the "critical chunk check" incorporated + * into it, since in the future we will need to be able to call user + * functions to handle unknown critical chunks after we check that + * the chunk name itself is valid. + */ + +/* Bit hacking: the test for an invalid byte in the 4 byte chunk name is: + * + * ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97)) + */ + +void /* PRIVATE */ +png_check_chunk_name(png_structrp png_ptr, png_uint_32 chunk_name) +{ + int i; + + png_debug(1, "in png_check_chunk_name"); + + for (i=1; i<=4; ++i) + { + int c = chunk_name & 0xff; + + if (c < 65 || c > 122 || (c > 90 && c < 97)) + png_chunk_error(png_ptr, "invalid chunk type"); + + chunk_name >>= 8; + } +} + +/* Combines the row recently read in with the existing pixels in the row. This + * routine takes care of alpha and transparency if requested. This routine also + * handles the two methods of progressive display of interlaced images, + * depending on the 'display' value; if 'display' is true then the whole row + * (dp) is filled from the start by replicating the available pixels. If + * 'display' is false only those pixels present in the pass are filled in. + */ +void /* PRIVATE */ +png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display) +{ + unsigned int pixel_depth = png_ptr->transformed_pixel_depth; + png_const_bytep sp = png_ptr->row_buf + 1; + png_uint_32 row_width = png_ptr->width; + unsigned int pass = png_ptr->pass; + png_bytep end_ptr = 0; + png_byte end_byte = 0; + unsigned int end_mask; + + png_debug(1, "in png_combine_row"); + + /* Added in 1.5.6: it should not be possible to enter this routine until at + * least one row has been read from the PNG data and transformed. + */ + if (pixel_depth == 0) + png_error(png_ptr, "internal row logic error"); + + /* Added in 1.5.4: the pixel depth should match the information returned by + * any call to png_read_update_info at this point. Do not continue if we got + * this wrong. + */ + if (png_ptr->info_rowbytes != 0 && png_ptr->info_rowbytes != + PNG_ROWBYTES(pixel_depth, row_width)) + png_error(png_ptr, "internal row size calculation error"); + + /* Don't expect this to ever happen: */ + if (row_width == 0) + png_error(png_ptr, "internal row width error"); + + /* Preserve the last byte in cases where only part of it will be overwritten, + * the multiply below may overflow, we don't care because ANSI-C guarantees + * we get the low bits. + */ + end_mask = (pixel_depth * row_width) & 7; + if (end_mask != 0) + { + /* end_ptr == NULL is a flag to say do nothing */ + end_ptr = dp + PNG_ROWBYTES(pixel_depth, row_width) - 1; + end_byte = *end_ptr; +# ifdef PNG_READ_PACKSWAP_SUPPORTED + if (png_ptr->transformations & PNG_PACKSWAP) /* little-endian byte */ + end_mask = 0xff << end_mask; + + else /* big-endian byte */ +# endif + end_mask = 0xff >> end_mask; + /* end_mask is now the bits to *keep* from the destination row */ + } + + /* For non-interlaced images this reduces to a memcpy(). A memcpy() + * will also happen if interlacing isn't supported or if the application + * does not call png_set_interlace_handling(). In the latter cases the + * caller just gets a sequence of the unexpanded rows from each interlace + * pass. + */ +#ifdef PNG_READ_INTERLACING_SUPPORTED + if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE) && + pass < 6 && (display == 0 || + /* The following copies everything for 'display' on passes 0, 2 and 4. */ + (display == 1 && (pass & 1) != 0))) + { + /* Narrow images may have no bits in a pass; the caller should handle + * this, but this test is cheap: + */ + if (row_width <= PNG_PASS_START_COL(pass)) + return; + + if (pixel_depth < 8) + { + /* For pixel depths up to 4 bpp the 8-pixel mask can be expanded to fit + * into 32 bits, then a single loop over the bytes using the four byte + * values in the 32-bit mask can be used. For the 'display' option the + * expanded mask may also not require any masking within a byte. To + * make this work the PACKSWAP option must be taken into account - it + * simply requires the pixels to be reversed in each byte. + * + * The 'regular' case requires a mask for each of the first 6 passes, + * the 'display' case does a copy for the even passes in the range + * 0..6. This has already been handled in the test above. + * + * The masks are arranged as four bytes with the first byte to use in + * the lowest bits (little-endian) regardless of the order (PACKSWAP or + * not) of the pixels in each byte. + * + * NOTE: the whole of this logic depends on the caller of this function + * only calling it on rows appropriate to the pass. This function only + * understands the 'x' logic; the 'y' logic is handled by the caller. + * + * The following defines allow generation of compile time constant bit + * masks for each pixel depth and each possibility of swapped or not + * swapped bytes. Pass 'p' is in the range 0..6; 'x', a pixel index, + * is in the range 0..7; and the result is 1 if the pixel is to be + * copied in the pass, 0 if not. 'S' is for the sparkle method, 'B' + * for the block method. + * + * With some compilers a compile time expression of the general form: + * + * (shift >= 32) ? (a >> (shift-32)) : (b >> shift) + * + * Produces warnings with values of 'shift' in the range 33 to 63 + * because the right hand side of the ?: expression is evaluated by + * the compiler even though it isn't used. Microsoft Visual C (various + * versions) and the Intel C compiler are known to do this. To avoid + * this the following macros are used in 1.5.6. This is a temporary + * solution to avoid destabilizing the code during the release process. + */ +# if PNG_USE_COMPILE_TIME_MASKS +# define PNG_LSR(x,s) ((x)>>((s) & 0x1f)) +# define PNG_LSL(x,s) ((x)<<((s) & 0x1f)) +# else +# define PNG_LSR(x,s) ((x)>>(s)) +# define PNG_LSL(x,s) ((x)<<(s)) +# endif +# define S_COPY(p,x) (((p)<4 ? PNG_LSR(0x80088822,(3-(p))*8+(7-(x))) :\ + PNG_LSR(0xaa55ff00,(7-(p))*8+(7-(x)))) & 1) +# define B_COPY(p,x) (((p)<4 ? PNG_LSR(0xff0fff33,(3-(p))*8+(7-(x))) :\ + PNG_LSR(0xff55ff00,(7-(p))*8+(7-(x)))) & 1) + + /* Return a mask for pass 'p' pixel 'x' at depth 'd'. The mask is + * little endian - the first pixel is at bit 0 - however the extra + * parameter 's' can be set to cause the mask position to be swapped + * within each byte, to match the PNG format. This is done by XOR of + * the shift with 7, 6 or 4 for bit depths 1, 2 and 4. + */ +# define PIXEL_MASK(p,x,d,s) \ + (PNG_LSL(((PNG_LSL(1U,(d)))-1),(((x)*(d))^((s)?8-(d):0)))) + + /* Hence generate the appropriate 'block' or 'sparkle' pixel copy mask. + */ +# define S_MASKx(p,x,d,s) (S_COPY(p,x)?PIXEL_MASK(p,x,d,s):0) +# define B_MASKx(p,x,d,s) (B_COPY(p,x)?PIXEL_MASK(p,x,d,s):0) + + /* Combine 8 of these to get the full mask. For the 1-bpp and 2-bpp + * cases the result needs replicating, for the 4-bpp case the above + * generates a full 32 bits. + */ +# define MASK_EXPAND(m,d) ((m)*((d)==1?0x01010101:((d)==2?0x00010001:1))) + +# define S_MASK(p,d,s) MASK_EXPAND(S_MASKx(p,0,d,s) + S_MASKx(p,1,d,s) +\ + S_MASKx(p,2,d,s) + S_MASKx(p,3,d,s) + S_MASKx(p,4,d,s) +\ + S_MASKx(p,5,d,s) + S_MASKx(p,6,d,s) + S_MASKx(p,7,d,s), d) + +# define B_MASK(p,d,s) MASK_EXPAND(B_MASKx(p,0,d,s) + B_MASKx(p,1,d,s) +\ + B_MASKx(p,2,d,s) + B_MASKx(p,3,d,s) + B_MASKx(p,4,d,s) +\ + B_MASKx(p,5,d,s) + B_MASKx(p,6,d,s) + B_MASKx(p,7,d,s), d) + +#if PNG_USE_COMPILE_TIME_MASKS + /* Utility macros to construct all the masks for a depth/swap + * combination. The 's' parameter says whether the format is PNG + * (big endian bytes) or not. Only the three odd-numbered passes are + * required for the display/block algorithm. + */ +# define S_MASKS(d,s) { S_MASK(0,d,s), S_MASK(1,d,s), S_MASK(2,d,s),\ + S_MASK(3,d,s), S_MASK(4,d,s), S_MASK(5,d,s) } + +# define B_MASKS(d,s) { B_MASK(1,d,s), S_MASK(3,d,s), S_MASK(5,d,s) } + +# define DEPTH_INDEX(d) ((d)==1?0:((d)==2?1:2)) + + /* Hence the pre-compiled masks indexed by PACKSWAP (or not), depth and + * then pass: + */ + static PNG_CONST png_uint_32 row_mask[2/*PACKSWAP*/][3/*depth*/][6] = + { + /* Little-endian byte masks for PACKSWAP */ + { S_MASKS(1,0), S_MASKS(2,0), S_MASKS(4,0) }, + /* Normal (big-endian byte) masks - PNG format */ + { S_MASKS(1,1), S_MASKS(2,1), S_MASKS(4,1) } + }; + + /* display_mask has only three entries for the odd passes, so index by + * pass>>1. + */ + static PNG_CONST png_uint_32 display_mask[2][3][3] = + { + /* Little-endian byte masks for PACKSWAP */ + { B_MASKS(1,0), B_MASKS(2,0), B_MASKS(4,0) }, + /* Normal (big-endian byte) masks - PNG format */ + { B_MASKS(1,1), B_MASKS(2,1), B_MASKS(4,1) } + }; + +# define MASK(pass,depth,display,png)\ + ((display)?display_mask[png][DEPTH_INDEX(depth)][pass>>1]:\ + row_mask[png][DEPTH_INDEX(depth)][pass]) + +#else /* !PNG_USE_COMPILE_TIME_MASKS */ + /* This is the runtime alternative: it seems unlikely that this will + * ever be either smaller or faster than the compile time approach. + */ +# define MASK(pass,depth,display,png)\ + ((display)?B_MASK(pass,depth,png):S_MASK(pass,depth,png)) +#endif /* !PNG_USE_COMPILE_TIME_MASKS */ + + /* Use the appropriate mask to copy the required bits. In some cases + * the byte mask will be 0 or 0xff, optimize these cases. row_width is + * the number of pixels, but the code copies bytes, so it is necessary + * to special case the end. + */ + png_uint_32 pixels_per_byte = 8 / pixel_depth; + png_uint_32 mask; + +# ifdef PNG_READ_PACKSWAP_SUPPORTED + if (png_ptr->transformations & PNG_PACKSWAP) + mask = MASK(pass, pixel_depth, display, 0); + + else +# endif + mask = MASK(pass, pixel_depth, display, 1); + + for (;;) + { + png_uint_32 m; + + /* It doesn't matter in the following if png_uint_32 has more than + * 32 bits because the high bits always match those in m<<24; it is, + * however, essential to use OR here, not +, because of this. + */ + m = mask; + mask = (m >> 8) | (m << 24); /* rotate right to good compilers */ + m &= 0xff; + + if (m != 0) /* something to copy */ + { + if (m != 0xff) + *dp = (png_byte)((*dp & ~m) | (*sp & m)); + else + *dp = *sp; + } + + /* NOTE: this may overwrite the last byte with garbage if the image + * is not an exact number of bytes wide; libpng has always done + * this. + */ + if (row_width <= pixels_per_byte) + break; /* May need to restore part of the last byte */ + + row_width -= pixels_per_byte; + ++dp; + ++sp; + } + } + + else /* pixel_depth >= 8 */ + { + unsigned int bytes_to_copy, bytes_to_jump; + + /* Validate the depth - it must be a multiple of 8 */ + if (pixel_depth & 7) + png_error(png_ptr, "invalid user transform pixel depth"); + + pixel_depth >>= 3; /* now in bytes */ + row_width *= pixel_depth; + + /* Regardless of pass number the Adam 7 interlace always results in a + * fixed number of pixels to copy then to skip. There may be a + * different number of pixels to skip at the start though. + */ + { + unsigned int offset = PNG_PASS_START_COL(pass) * pixel_depth; + + row_width -= offset; + dp += offset; + sp += offset; + } + + /* Work out the bytes to copy. */ + if (display) + { + /* When doing the 'block' algorithm the pixel in the pass gets + * replicated to adjacent pixels. This is why the even (0,2,4,6) + * passes are skipped above - the entire expanded row is copied. + */ + bytes_to_copy = (1<<((6-pass)>>1)) * pixel_depth; + + /* But don't allow this number to exceed the actual row width. */ + if (bytes_to_copy > row_width) + bytes_to_copy = row_width; + } + + else /* normal row; Adam7 only ever gives us one pixel to copy. */ + bytes_to_copy = pixel_depth; + + /* In Adam7 there is a constant offset between where the pixels go. */ + bytes_to_jump = PNG_PASS_COL_OFFSET(pass) * pixel_depth; + + /* And simply copy these bytes. Some optimization is possible here, + * depending on the value of 'bytes_to_copy'. Special case the low + * byte counts, which we know to be frequent. + * + * Notice that these cases all 'return' rather than 'break' - this + * avoids an unnecessary test on whether to restore the last byte + * below. + */ + switch (bytes_to_copy) + { + case 1: + for (;;) + { + *dp = *sp; + + if (row_width <= bytes_to_jump) + return; + + dp += bytes_to_jump; + sp += bytes_to_jump; + row_width -= bytes_to_jump; + } + + case 2: + /* There is a possibility of a partial copy at the end here; this + * slows the code down somewhat. + */ + do + { + dp[0] = sp[0], dp[1] = sp[1]; + + if (row_width <= bytes_to_jump) + return; + + sp += bytes_to_jump; + dp += bytes_to_jump; + row_width -= bytes_to_jump; + } + while (row_width > 1); + + /* And there can only be one byte left at this point: */ + *dp = *sp; + return; + + case 3: + /* This can only be the RGB case, so each copy is exactly one + * pixel and it is not necessary to check for a partial copy. + */ + for(;;) + { + dp[0] = sp[0], dp[1] = sp[1], dp[2] = sp[2]; + + if (row_width <= bytes_to_jump) + return; + + sp += bytes_to_jump; + dp += bytes_to_jump; + row_width -= bytes_to_jump; + } + + default: +#if PNG_ALIGN_TYPE != PNG_ALIGN_NONE + /* Check for double byte alignment and, if possible, use a + * 16-bit copy. Don't attempt this for narrow images - ones that + * are less than an interlace panel wide. Don't attempt it for + * wide bytes_to_copy either - use the memcpy there. + */ + if (bytes_to_copy < 16 /*else use memcpy*/ && + png_isaligned(dp, png_uint_16) && + png_isaligned(sp, png_uint_16) && + bytes_to_copy % (sizeof (png_uint_16)) == 0 && + bytes_to_jump % (sizeof (png_uint_16)) == 0) + { + /* Everything is aligned for png_uint_16 copies, but try for + * png_uint_32 first. + */ + if (png_isaligned(dp, png_uint_32) && + png_isaligned(sp, png_uint_32) && + bytes_to_copy % (sizeof (png_uint_32)) == 0 && + bytes_to_jump % (sizeof (png_uint_32)) == 0) + { + png_uint_32p dp32 = png_aligncast(png_uint_32p,dp); + png_const_uint_32p sp32 = png_aligncastconst( + png_const_uint_32p, sp); + size_t skip = (bytes_to_jump-bytes_to_copy) / + (sizeof (png_uint_32)); + + do + { + size_t c = bytes_to_copy; + do + { + *dp32++ = *sp32++; + c -= (sizeof (png_uint_32)); + } + while (c > 0); + + if (row_width <= bytes_to_jump) + return; + + dp32 += skip; + sp32 += skip; + row_width -= bytes_to_jump; + } + while (bytes_to_copy <= row_width); + + /* Get to here when the row_width truncates the final copy. + * There will be 1-3 bytes left to copy, so don't try the + * 16-bit loop below. + */ + dp = (png_bytep)dp32; + sp = (png_const_bytep)sp32; + do + *dp++ = *sp++; + while (--row_width > 0); + return; + } + + /* Else do it in 16-bit quantities, but only if the size is + * not too large. + */ + else + { + png_uint_16p dp16 = png_aligncast(png_uint_16p, dp); + png_const_uint_16p sp16 = png_aligncastconst( + png_const_uint_16p, sp); + size_t skip = (bytes_to_jump-bytes_to_copy) / + (sizeof (png_uint_16)); + + do + { + size_t c = bytes_to_copy; + do + { + *dp16++ = *sp16++; + c -= (sizeof (png_uint_16)); + } + while (c > 0); + + if (row_width <= bytes_to_jump) + return; + + dp16 += skip; + sp16 += skip; + row_width -= bytes_to_jump; + } + while (bytes_to_copy <= row_width); + + /* End of row - 1 byte left, bytes_to_copy > row_width: */ + dp = (png_bytep)dp16; + sp = (png_const_bytep)sp16; + do + *dp++ = *sp++; + while (--row_width > 0); + return; + } + } +#endif /* PNG_ALIGN_ code */ + + /* The true default - use a memcpy: */ + for (;;) + { + memcpy(dp, sp, bytes_to_copy); + + if (row_width <= bytes_to_jump) + return; + + sp += bytes_to_jump; + dp += bytes_to_jump; + row_width -= bytes_to_jump; + if (bytes_to_copy > row_width) + bytes_to_copy = row_width; + } + } + + /* NOT REACHED*/ + } /* pixel_depth >= 8 */ + + /* Here if pixel_depth < 8 to check 'end_ptr' below. */ + } + else +#endif + + /* If here then the switch above wasn't used so just memcpy the whole row + * from the temporary row buffer (notice that this overwrites the end of the + * destination row if it is a partial byte.) + */ + memcpy(dp, sp, PNG_ROWBYTES(pixel_depth, row_width)); + + /* Restore the overwritten bits from the last byte if necessary. */ + if (end_ptr != NULL) + *end_ptr = (png_byte)((end_byte & end_mask) | (*end_ptr & ~end_mask)); +} + +#ifdef PNG_READ_INTERLACING_SUPPORTED +void /* PRIVATE */ +png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass, + png_uint_32 transformations /* Because these may affect the byte layout */) +{ + /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + /* Offset to next interlace block */ + static PNG_CONST int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; + + png_debug(1, "in png_do_read_interlace"); + if (row != NULL && row_info != NULL) + { + png_uint_32 final_width; + + final_width = row_info->width * png_pass_inc[pass]; + + switch (row_info->pixel_depth) + { + case 1: + { + png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 3); + png_bytep dp = row + (png_size_t)((final_width - 1) >> 3); + int sshift, dshift; + int s_start, s_end, s_inc; + int jstop = png_pass_inc[pass]; + png_byte v; + png_uint_32 i; + int j; + +#ifdef PNG_READ_PACKSWAP_SUPPORTED + if (transformations & PNG_PACKSWAP) + { + sshift = (int)((row_info->width + 7) & 0x07); + dshift = (int)((final_width + 7) & 0x07); + s_start = 7; + s_end = 0; + s_inc = -1; + } + + else +#endif + { + sshift = 7 - (int)((row_info->width + 7) & 0x07); + dshift = 7 - (int)((final_width + 7) & 0x07); + s_start = 0; + s_end = 7; + s_inc = 1; + } + + for (i = 0; i < row_info->width; i++) + { + v = (png_byte)((*sp >> sshift) & 0x01); + for (j = 0; j < jstop; j++) + { + unsigned int tmp = *dp & (0x7f7f >> (7 - dshift)); + tmp |= v << dshift; + *dp = (png_byte)(tmp & 0xff); + + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + + else + dshift += s_inc; + } + + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + + else + sshift += s_inc; + } + break; + } + + case 2: + { + png_bytep sp = row + (png_uint_32)((row_info->width - 1) >> 2); + png_bytep dp = row + (png_uint_32)((final_width - 1) >> 2); + int sshift, dshift; + int s_start, s_end, s_inc; + int jstop = png_pass_inc[pass]; + png_uint_32 i; + +#ifdef PNG_READ_PACKSWAP_SUPPORTED + if (transformations & PNG_PACKSWAP) + { + sshift = (int)(((row_info->width + 3) & 0x03) << 1); + dshift = (int)(((final_width + 3) & 0x03) << 1); + s_start = 6; + s_end = 0; + s_inc = -2; + } + + else +#endif + { + sshift = (int)((3 - ((row_info->width + 3) & 0x03)) << 1); + dshift = (int)((3 - ((final_width + 3) & 0x03)) << 1); + s_start = 0; + s_end = 6; + s_inc = 2; + } + + for (i = 0; i < row_info->width; i++) + { + png_byte v; + int j; + + v = (png_byte)((*sp >> sshift) & 0x03); + for (j = 0; j < jstop; j++) + { + unsigned int tmp = *dp & (0x3f3f >> (6 - dshift)); + tmp |= v << dshift; + *dp = (png_byte)(tmp & 0xff); + + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + + else + dshift += s_inc; + } + + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + + else + sshift += s_inc; + } + break; + } + + case 4: + { + png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 1); + png_bytep dp = row + (png_size_t)((final_width - 1) >> 1); + int sshift, dshift; + int s_start, s_end, s_inc; + png_uint_32 i; + int jstop = png_pass_inc[pass]; + +#ifdef PNG_READ_PACKSWAP_SUPPORTED + if (transformations & PNG_PACKSWAP) + { + sshift = (int)(((row_info->width + 1) & 0x01) << 2); + dshift = (int)(((final_width + 1) & 0x01) << 2); + s_start = 4; + s_end = 0; + s_inc = -4; + } + + else +#endif + { + sshift = (int)((1 - ((row_info->width + 1) & 0x01)) << 2); + dshift = (int)((1 - ((final_width + 1) & 0x01)) << 2); + s_start = 0; + s_end = 4; + s_inc = 4; + } + + for (i = 0; i < row_info->width; i++) + { + png_byte v = (png_byte)((*sp >> sshift) & 0x0f); + int j; + + for (j = 0; j < jstop; j++) + { + unsigned int tmp = *dp & (0xf0f >> (4 - dshift)); + tmp |= v << dshift; + *dp = (png_byte)(tmp & 0xff); + + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + + else + dshift += s_inc; + } + + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + + else + sshift += s_inc; + } + break; + } + + default: + { + png_size_t pixel_bytes = (row_info->pixel_depth >> 3); + + png_bytep sp = row + (png_size_t)(row_info->width - 1) + * pixel_bytes; + + png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes; + + int jstop = png_pass_inc[pass]; + png_uint_32 i; + + for (i = 0; i < row_info->width; i++) + { + png_byte v[8]; + int j; + + memcpy(v, sp, pixel_bytes); + + for (j = 0; j < jstop; j++) + { + memcpy(dp, v, pixel_bytes); + dp -= pixel_bytes; + } + + sp -= pixel_bytes; + } + break; + } + } + + row_info->width = final_width; + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width); + } +#ifndef PNG_READ_PACKSWAP_SUPPORTED + PNG_UNUSED(transformations) /* Silence compiler warning */ +#endif +} +#endif /* PNG_READ_INTERLACING_SUPPORTED */ + +static void +png_read_filter_row_sub(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + png_size_t i; + png_size_t istop = row_info->rowbytes; + unsigned int bpp = (row_info->pixel_depth + 7) >> 3; + png_bytep rp = row + bpp; + + PNG_UNUSED(prev_row) + + for (i = bpp; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + (int)(*(rp-bpp))) & 0xff); + rp++; + } +} + +static void +png_read_filter_row_up(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + png_size_t i; + png_size_t istop = row_info->rowbytes; + png_bytep rp = row; + png_const_bytep pp = prev_row; + + for (i = 0; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); + rp++; + } +} + +static void +png_read_filter_row_avg(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + png_size_t i; + png_bytep rp = row; + png_const_bytep pp = prev_row; + unsigned int bpp = (row_info->pixel_depth + 7) >> 3; + png_size_t istop = row_info->rowbytes - bpp; + + for (i = 0; i < bpp; i++) + { + *rp = (png_byte)(((int)(*rp) + + ((int)(*pp++) / 2 )) & 0xff); + + rp++; + } + + for (i = 0; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + + (int)(*pp++ + *(rp-bpp)) / 2 ) & 0xff); + + rp++; + } +} + +static void +png_read_filter_row_paeth_1byte_pixel(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + png_bytep rp_end = row + row_info->rowbytes; + int a, c; + + /* First pixel/byte */ + c = *prev_row++; + a = *row + c; + *row++ = (png_byte)a; + + /* Remainder */ + while (row < rp_end) + { + int b, pa, pb, pc, p; + + a &= 0xff; /* From previous iteration or start */ + b = *prev_row++; + + p = b - c; + pc = a - c; + +# ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +# else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +# endif + + /* Find the best predictor, the least of pa, pb, pc favoring the earlier + * ones in the case of a tie. + */ + if (pb < pa) pa = pb, a = b; + if (pc < pa) a = c; + + /* Calculate the current pixel in a, and move the previous row pixel to c + * for the next time round the loop + */ + c = b; + a += *row; + *row++ = (png_byte)a; + } +} + +static void +png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + int bpp = (row_info->pixel_depth + 7) >> 3; + png_bytep rp_end = row + bpp; + + /* Process the first pixel in the row completely (this is the same as 'up' + * because there is only one candidate predictor for the first row). + */ + while (row < rp_end) + { + int a = *row + *prev_row++; + *row++ = (png_byte)a; + } + + /* Remainder */ + rp_end += row_info->rowbytes - bpp; + + while (row < rp_end) + { + int a, b, c, pa, pb, pc, p; + + c = *(prev_row - bpp); + a = *(row - bpp); + b = *prev_row++; + + p = b - c; + pc = a - c; + +# ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +# else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +# endif + + if (pb < pa) pa = pb, a = b; + if (pc < pa) a = c; + + c = b; + a += *row; + *row++ = (png_byte)a; + } +} + +static void +png_init_filter_functions(png_structrp pp) + /* This function is called once for every PNG image to set the + * implementations required to reverse the filtering of PNG rows. Reversing + * the filter is the first transformation performed on the row data. It is + * performed in place, therefore an implementation can be selected based on + * the image pixel format. If the implementation depends on image width then + * take care to ensure that it works correctly if the image is interlaced - + * interlacing causes the actual row width to vary. + */ +{ + unsigned int bpp = (pp->pixel_depth + 7) >> 3; + + pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub; + pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up; + pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg; + if (bpp == 1) + pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = + png_read_filter_row_paeth_1byte_pixel; + else + pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = + png_read_filter_row_paeth_multibyte_pixel; + +#ifdef PNG_FILTER_OPTIMIZATIONS + /* To use this define PNG_FILTER_OPTIMIZATIONS as the name of a function to + * call to install hardware optimizations for the above functions; simply + * replace whatever elements of the pp->read_filter[] array with a hardware + * specific (or, for that matter, generic) optimization. + * + * To see an example of this examine what configure.ac does when + * --enable-arm-neon is specified on the command line. + */ + PNG_FILTER_OPTIMIZATIONS(pp, bpp); +#endif +} + +void /* PRIVATE */ +png_read_filter_row(png_structrp pp, png_row_infop row_info, png_bytep row, + png_const_bytep prev_row, int filter) +{ + /* OPTIMIZATION: DO NOT MODIFY THIS FUNCTION, instead #define + * PNG_FILTER_OPTIMIZATIONS to a function that overrides the generic + * implementations. See png_init_filter_functions above. + */ + if (pp->read_filter[0] == NULL) + png_init_filter_functions(pp); + if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST) + pp->read_filter[filter-1](row_info, row, prev_row); +} + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +void /* PRIVATE */ +png_read_IDAT_data(png_structrp png_ptr, png_bytep output, + png_alloc_size_t avail_out) +{ + /* Loop reading IDATs and decompressing the result into output[avail_out] */ + png_ptr->zstream.next_out = output; + png_ptr->zstream.avail_out = 0; /* safety: set below */ + + if (output == NULL) + avail_out = 0; + + do + { + int ret; + png_byte tmpbuf[PNG_INFLATE_BUF_SIZE]; + + if (png_ptr->zstream.avail_in == 0) + { + uInt avail_in; + png_bytep buffer; + + while (png_ptr->idat_size == 0) + { + png_crc_finish(png_ptr, 0); + + png_ptr->idat_size = png_read_chunk_header(png_ptr); + /* This is an error even in the 'check' case because the code just + * consumed a non-IDAT header. + */ + if (png_ptr->chunk_name != png_IDAT) + png_error(png_ptr, "Not enough image data"); + } + + avail_in = png_ptr->IDAT_read_size; + + if (avail_in > png_ptr->idat_size) + avail_in = (uInt)png_ptr->idat_size; + + /* A PNG with a gradually increasing IDAT size will defeat this attempt + * to minimize memory usage by causing lots of re-allocs, but + * realistically doing IDAT_read_size re-allocs is not likely to be a + * big problem. + */ + buffer = png_read_buffer(png_ptr, avail_in, 0/*error*/); + + png_crc_read(png_ptr, buffer, avail_in); + png_ptr->idat_size -= avail_in; + + png_ptr->zstream.next_in = buffer; + png_ptr->zstream.avail_in = avail_in; + } + + /* And set up the output side. */ + if (output != NULL) /* standard read */ + { + uInt out = ZLIB_IO_MAX; + + if (out > avail_out) + out = (uInt)avail_out; + + avail_out -= out; + png_ptr->zstream.avail_out = out; + } + + else /* after last row, checking for end */ + { + png_ptr->zstream.next_out = tmpbuf; + png_ptr->zstream.avail_out = (sizeof tmpbuf); + } + + /* Use NO_FLUSH; this gives zlib the maximum opportunity to optimize the + * process. If the LZ stream is truncated the sequential reader will + * terminally damage the stream, above, by reading the chunk header of the + * following chunk (it then exits with png_error). + * + * TODO: deal more elegantly with truncated IDAT lists. + */ + ret = inflate(&png_ptr->zstream, Z_NO_FLUSH); + + /* Take the unconsumed output back. */ + if (output != NULL) + avail_out += png_ptr->zstream.avail_out; + + else /* avail_out counts the extra bytes */ + avail_out += (sizeof tmpbuf) - png_ptr->zstream.avail_out; + + png_ptr->zstream.avail_out = 0; + + if (ret == Z_STREAM_END) + { + /* Do this for safety; we won't read any more into this row. */ + png_ptr->zstream.next_out = NULL; + + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; + + if (png_ptr->zstream.avail_in > 0 || png_ptr->idat_size > 0) + png_chunk_benign_error(png_ptr, "Extra compressed data"); + break; + } + + if (ret != Z_OK) + { + png_zstream_error(png_ptr, ret); + + if (output != NULL) + png_chunk_error(png_ptr, png_ptr->zstream.msg); + + else /* checking */ + { + png_chunk_benign_error(png_ptr, png_ptr->zstream.msg); + return; + } + } + } while (avail_out > 0); + + if (avail_out > 0) + { + /* The stream ended before the image; this is the same as too few IDATs so + * should be handled the same way. + */ + if (output != NULL) + png_error(png_ptr, "Not enough image data"); + + else /* the deflate stream contained extra data */ + png_chunk_benign_error(png_ptr, "Too much image data"); + } +} + +void /* PRIVATE */ +png_read_finish_IDAT(png_structrp png_ptr) +{ + /* We don't need any more data and the stream should have ended, however the + * LZ end code may actually not have been processed. In this case we must + * read it otherwise stray unread IDAT data or, more likely, an IDAT chunk + * may still remain to be consumed. + */ + if (!(png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED)) + { + /* The NULL causes png_read_IDAT_data to swallow any remaining bytes in + * the compressed stream, but the stream may be damaged too, so even after + * this call we may need to terminate the zstream ownership. + */ + png_read_IDAT_data(png_ptr, NULL, 0); + png_ptr->zstream.next_out = NULL; /* safety */ + + /* Now clear everything out for safety; the following may not have been + * done. + */ + if (!(png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED)) + { + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; + } + } + + /* If the zstream has not been released do it now *and* terminate the reading + * of the final IDAT chunk. + */ + if (png_ptr->zowner == png_IDAT) + { + /* Always do this; the pointers otherwise point into the read buffer. */ + png_ptr->zstream.next_in = NULL; + png_ptr->zstream.avail_in = 0; + + /* Now we no longer own the zstream. */ + png_ptr->zowner = 0; + + /* The slightly weird semantics of the sequential IDAT reading is that we + * are always in or at the end of an IDAT chunk, so we always need to do a + * crc_finish here. If idat_size is non-zero we also need to read the + * spurious bytes at the end of the chunk now. + */ + (void)png_crc_finish(png_ptr, png_ptr->idat_size); + } +} + +void /* PRIVATE */ +png_read_finish_row(png_structrp png_ptr) +{ +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* Start of interlace block */ + static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; + + /* Offset to next interlace block */ + static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; + + /* Start of interlace block in the y direction */ + static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; + + /* Offset to next interlace block in the y direction */ + static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; +#endif /* PNG_READ_INTERLACING_SUPPORTED */ + + png_debug(1, "in png_read_finish_row"); + png_ptr->row_number++; + if (png_ptr->row_number < png_ptr->num_rows) + return; + +#ifdef PNG_READ_INTERLACING_SUPPORTED + if (png_ptr->interlaced) + { + png_ptr->row_number = 0; + + /* TO DO: don't do this if prev_row isn't needed (requires + * read-ahead of the next row's filter byte. + */ + memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); + + do + { + png_ptr->pass++; + + if (png_ptr->pass >= 7) + break; + + png_ptr->iwidth = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + + if (!(png_ptr->transformations & PNG_INTERLACE)) + { + png_ptr->num_rows = (png_ptr->height + + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; + } + + else /* if (png_ptr->transformations & PNG_INTERLACE) */ + break; /* libpng deinterlacing sees every row */ + + } while (png_ptr->num_rows == 0 || png_ptr->iwidth == 0); + + if (png_ptr->pass < 7) + return; + } +#endif /* PNG_READ_INTERLACING_SUPPORTED */ + + /* Here after at the end of the last row of the last pass. */ + png_read_finish_IDAT(png_ptr); +} +#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ + +void /* PRIVATE */ +png_read_start_row(png_structrp png_ptr) +{ +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* Start of interlace block */ + static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; + + /* Offset to next interlace block */ + static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; + + /* Start of interlace block in the y direction */ + static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; + + /* Offset to next interlace block in the y direction */ + static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; +#endif + + int max_pixel_depth; + png_size_t row_bytes; + + png_debug(1, "in png_read_start_row"); + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED + png_init_read_transformations(png_ptr); +#endif +#ifdef PNG_READ_INTERLACING_SUPPORTED + if (png_ptr->interlaced) + { + if (!(png_ptr->transformations & PNG_INTERLACE)) + png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - + png_pass_ystart[0]) / png_pass_yinc[0]; + + else + png_ptr->num_rows = png_ptr->height; + + png_ptr->iwidth = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + } + + else +#endif /* PNG_READ_INTERLACING_SUPPORTED */ + { + png_ptr->num_rows = png_ptr->height; + png_ptr->iwidth = png_ptr->width; + } + + max_pixel_depth = png_ptr->pixel_depth; + + /* WARNING: * png_read_transform_info (pngrtran.c) performs a simpliar set of + * calculations to calculate the final pixel depth, then + * png_do_read_transforms actually does the transforms. This means that the + * code which effectively calculates this value is actually repeated in three + * separate places. They must all match. Innocent changes to the order of + * transformations can and will break libpng in a way that causes memory + * overwrites. + * + * TODO: fix this. + */ +#ifdef PNG_READ_PACK_SUPPORTED + if ((png_ptr->transformations & PNG_PACK) && png_ptr->bit_depth < 8) + max_pixel_depth = 8; +#endif + +#ifdef PNG_READ_EXPAND_SUPPORTED + if (png_ptr->transformations & PNG_EXPAND) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (png_ptr->num_trans) + max_pixel_depth = 32; + + else + max_pixel_depth = 24; + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) + { + if (max_pixel_depth < 8) + max_pixel_depth = 8; + + if (png_ptr->num_trans) + max_pixel_depth *= 2; + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) + { + if (png_ptr->num_trans) + { + max_pixel_depth *= 4; + max_pixel_depth /= 3; + } + } + } +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED + if (png_ptr->transformations & PNG_EXPAND_16) + { +# ifdef PNG_READ_EXPAND_SUPPORTED + /* In fact it is an error if it isn't supported, but checking is + * the safe way. + */ + if (png_ptr->transformations & PNG_EXPAND) + { + if (png_ptr->bit_depth < 16) + max_pixel_depth *= 2; + } + else +# endif + png_ptr->transformations &= ~PNG_EXPAND_16; + } +#endif + +#ifdef PNG_READ_FILLER_SUPPORTED + if (png_ptr->transformations & (PNG_FILLER)) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) + { + if (max_pixel_depth <= 8) + max_pixel_depth = 16; + + else + max_pixel_depth = 32; + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB || + png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (max_pixel_depth <= 32) + max_pixel_depth = 32; + + else + max_pixel_depth = 64; + } + } +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + if (png_ptr->transformations & PNG_GRAY_TO_RGB) + { + if ( +#ifdef PNG_READ_EXPAND_SUPPORTED + (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) || +#endif +#ifdef PNG_READ_FILLER_SUPPORTED + (png_ptr->transformations & (PNG_FILLER)) || +#endif + png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (max_pixel_depth <= 16) + max_pixel_depth = 32; + + else + max_pixel_depth = 64; + } + + else + { + if (max_pixel_depth <= 8) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + max_pixel_depth = 32; + + else + max_pixel_depth = 24; + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + max_pixel_depth = 64; + + else + max_pixel_depth = 48; + } + } +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) && \ +defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) + if (png_ptr->transformations & PNG_USER_TRANSFORM) + { + int user_pixel_depth = png_ptr->user_transform_depth * + png_ptr->user_transform_channels; + + if (user_pixel_depth > max_pixel_depth) + max_pixel_depth = user_pixel_depth; + } +#endif + + /* This value is stored in png_struct and double checked in the row read + * code. + */ + png_ptr->maximum_pixel_depth = (png_byte)max_pixel_depth; + png_ptr->transformed_pixel_depth = 0; /* calculated on demand */ + + /* Align the width on the next larger 8 pixels. Mainly used + * for interlacing + */ + row_bytes = ((png_ptr->width + 7) & ~((png_uint_32)7)); + /* Calculate the maximum bytes needed, adding a byte and a pixel + * for safety's sake + */ + row_bytes = PNG_ROWBYTES(max_pixel_depth, row_bytes) + + 1 + ((max_pixel_depth + 7) >> 3); + +#ifdef PNG_MAX_MALLOC_64K + if (row_bytes > (png_uint_32)65536L) + png_error(png_ptr, "This image requires a row greater than 64KB"); +#endif + + if (row_bytes + 48 > png_ptr->old_big_row_buf_size) + { + png_free(png_ptr, png_ptr->big_row_buf); + png_free(png_ptr, png_ptr->big_prev_row); + + if (png_ptr->interlaced) + png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr, + row_bytes + 48); + + else + png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes + 48); + + png_ptr->big_prev_row = (png_bytep)png_malloc(png_ptr, row_bytes + 48); + +#ifdef PNG_ALIGNED_MEMORY_SUPPORTED + /* Use 16-byte aligned memory for row_buf with at least 16 bytes + * of padding before and after row_buf; treat prev_row similarly. + * NOTE: the alignment is to the start of the pixels, one beyond the start + * of the buffer, because of the filter byte. Prior to libpng 1.5.6 this + * was incorrect; the filter byte was aligned, which had the exact + * opposite effect of that intended. + */ + { + png_bytep temp = png_ptr->big_row_buf + 32; + int extra = (int)((temp - (png_bytep)0) & 0x0f); + png_ptr->row_buf = temp - extra - 1/*filter byte*/; + + temp = png_ptr->big_prev_row + 32; + extra = (int)((temp - (png_bytep)0) & 0x0f); + png_ptr->prev_row = temp - extra - 1/*filter byte*/; + } + +#else + /* Use 31 bytes of padding before and 17 bytes after row_buf. */ + png_ptr->row_buf = png_ptr->big_row_buf + 31; + png_ptr->prev_row = png_ptr->big_prev_row + 31; +#endif + png_ptr->old_big_row_buf_size = row_bytes + 48; + } + +#ifdef PNG_MAX_MALLOC_64K + if (png_ptr->rowbytes > 65535) + png_error(png_ptr, "This image requires a row greater than 64KB"); + +#endif + if (png_ptr->rowbytes > (PNG_SIZE_MAX - 1)) + png_error(png_ptr, "Row has too many bytes to allocate in memory"); + + memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); + + png_debug1(3, "width = %u,", png_ptr->width); + png_debug1(3, "height = %u,", png_ptr->height); + png_debug1(3, "iwidth = %u,", png_ptr->iwidth); + png_debug1(3, "num_rows = %u,", png_ptr->num_rows); + png_debug1(3, "rowbytes = %lu,", (unsigned long)png_ptr->rowbytes); + png_debug1(3, "irowbytes = %lu", + (unsigned long)PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1); + + /* The sequential reader needs a buffer for IDAT, but the progressive reader + * does not, so free the read buffer now regardless; the sequential reader + * reallocates it on demand. + */ + if (png_ptr->read_buffer) + { + png_bytep buffer = png_ptr->read_buffer; + + png_ptr->read_buffer_size = 0; + png_ptr->read_buffer = NULL; + png_free(png_ptr, buffer); + } + + /* Finally claim the zstream for the inflate of the IDAT data, use the bits + * value from the stream (note that this will result in a fatal error if the + * IDAT stream has a bogus deflate header window_bits value, but this should + * not be happening any longer!) + */ + if (png_inflate_claim(png_ptr, png_IDAT, 0) != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg); + + png_ptr->flags |= PNG_FLAG_ROW_INIT; +} +#endif /* PNG_READ_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngset.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngset.c new file mode 100644 index 0000000000..fcb0779131 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngset.c @@ -0,0 +1,1606 @@ + +/* pngset.c - storage of image information into info struct + * + * Last changed in libpng 1.6.2 [April 25, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * The functions here are used during reads to store data from the file + * into the info struct, and during writes to store application data + * into the info struct for writing into the file. This abstracts the + * info struct and allows us to change the structure in the future. + */ + +#include "pngpriv.h" + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + +#ifdef PNG_bKGD_SUPPORTED +void PNGAPI +png_set_bKGD(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_color_16p background) +{ + png_debug1(1, "in %s storage function", "bKGD"); + + if (png_ptr == NULL || info_ptr == NULL || background == NULL) + return; + + info_ptr->background = *background; + info_ptr->valid |= PNG_INFO_bKGD; +} +#endif + +#ifdef PNG_cHRM_SUPPORTED +void PNGFAPI +png_set_cHRM_fixed(png_const_structrp png_ptr, png_inforp info_ptr, + png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x, + png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y, + png_fixed_point blue_x, png_fixed_point blue_y) +{ + png_xy xy; + + png_debug1(1, "in %s storage function", "cHRM fixed"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + xy.redx = red_x; + xy.redy = red_y; + xy.greenx = green_x; + xy.greeny = green_y; + xy.bluex = blue_x; + xy.bluey = blue_y; + xy.whitex = white_x; + xy.whitey = white_y; + + if (png_colorspace_set_chromaticities(png_ptr, &info_ptr->colorspace, &xy, + 2/* override with app values*/)) + info_ptr->colorspace.flags |= PNG_COLORSPACE_FROM_cHRM; + + png_colorspace_sync_info(png_ptr, info_ptr); +} + +void PNGFAPI +png_set_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_inforp info_ptr, + png_fixed_point int_red_X, png_fixed_point int_red_Y, + png_fixed_point int_red_Z, png_fixed_point int_green_X, + png_fixed_point int_green_Y, png_fixed_point int_green_Z, + png_fixed_point int_blue_X, png_fixed_point int_blue_Y, + png_fixed_point int_blue_Z) +{ + png_XYZ XYZ; + + png_debug1(1, "in %s storage function", "cHRM XYZ fixed"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + XYZ.red_X = int_red_X; + XYZ.red_Y = int_red_Y; + XYZ.red_Z = int_red_Z; + XYZ.green_X = int_green_X; + XYZ.green_Y = int_green_Y; + XYZ.green_Z = int_green_Z; + XYZ.blue_X = int_blue_X; + XYZ.blue_Y = int_blue_Y; + XYZ.blue_Z = int_blue_Z; + + if (png_colorspace_set_endpoints(png_ptr, &info_ptr->colorspace, &XYZ, 2)) + info_ptr->colorspace.flags |= PNG_COLORSPACE_FROM_cHRM; + + png_colorspace_sync_info(png_ptr, info_ptr); +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_cHRM(png_const_structrp png_ptr, png_inforp info_ptr, + double white_x, double white_y, double red_x, double red_y, + double green_x, double green_y, double blue_x, double blue_y) +{ + png_set_cHRM_fixed(png_ptr, info_ptr, + png_fixed(png_ptr, white_x, "cHRM White X"), + png_fixed(png_ptr, white_y, "cHRM White Y"), + png_fixed(png_ptr, red_x, "cHRM Red X"), + png_fixed(png_ptr, red_y, "cHRM Red Y"), + png_fixed(png_ptr, green_x, "cHRM Green X"), + png_fixed(png_ptr, green_y, "cHRM Green Y"), + png_fixed(png_ptr, blue_x, "cHRM Blue X"), + png_fixed(png_ptr, blue_y, "cHRM Blue Y")); +} + +void PNGAPI +png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X, + double red_Y, double red_Z, double green_X, double green_Y, double green_Z, + double blue_X, double blue_Y, double blue_Z) +{ + png_set_cHRM_XYZ_fixed(png_ptr, info_ptr, + png_fixed(png_ptr, red_X, "cHRM Red X"), + png_fixed(png_ptr, red_Y, "cHRM Red Y"), + png_fixed(png_ptr, red_Z, "cHRM Red Z"), + png_fixed(png_ptr, green_X, "cHRM Red X"), + png_fixed(png_ptr, green_Y, "cHRM Red Y"), + png_fixed(png_ptr, green_Z, "cHRM Red Z"), + png_fixed(png_ptr, blue_X, "cHRM Red X"), + png_fixed(png_ptr, blue_Y, "cHRM Red Y"), + png_fixed(png_ptr, blue_Z, "cHRM Red Z")); +} +# endif /* PNG_FLOATING_POINT_SUPPORTED */ + +#endif /* PNG_cHRM_SUPPORTED */ + +#ifdef PNG_gAMA_SUPPORTED +void PNGFAPI +png_set_gAMA_fixed(png_const_structrp png_ptr, png_inforp info_ptr, + png_fixed_point file_gamma) +{ + png_debug1(1, "in %s storage function", "gAMA"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + png_colorspace_set_gamma(png_ptr, &info_ptr->colorspace, file_gamma); + png_colorspace_sync_info(png_ptr, info_ptr); +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_gAMA(png_const_structrp png_ptr, png_inforp info_ptr, double file_gamma) +{ + png_set_gAMA_fixed(png_ptr, info_ptr, png_fixed(png_ptr, file_gamma, + "png_set_gAMA")); +} +# endif +#endif + +#ifdef PNG_hIST_SUPPORTED +void PNGAPI +png_set_hIST(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_uint_16p hist) +{ + int i; + + png_debug1(1, "in %s storage function", "hIST"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (info_ptr->num_palette == 0 || info_ptr->num_palette + > PNG_MAX_PALETTE_LENGTH) + { + png_warning(png_ptr, + "Invalid palette size, hIST allocation skipped"); + + return; + } + + png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0); + + /* Changed from info->num_palette to PNG_MAX_PALETTE_LENGTH in + * version 1.2.1 + */ + info_ptr->hist = png_voidcast(png_uint_16p, png_malloc_warn(png_ptr, + PNG_MAX_PALETTE_LENGTH * (sizeof (png_uint_16)))); + + if (info_ptr->hist == NULL) + { + png_warning(png_ptr, "Insufficient memory for hIST chunk data"); + return; + } + + info_ptr->free_me |= PNG_FREE_HIST; + + for (i = 0; i < info_ptr->num_palette; i++) + info_ptr->hist[i] = hist[i]; + + info_ptr->valid |= PNG_INFO_hIST; +} +#endif + +void PNGAPI +png_set_IHDR(png_const_structrp png_ptr, png_inforp info_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type) +{ + png_debug1(1, "in %s storage function", "IHDR"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->width = width; + info_ptr->height = height; + info_ptr->bit_depth = (png_byte)bit_depth; + info_ptr->color_type = (png_byte)color_type; + info_ptr->compression_type = (png_byte)compression_type; + info_ptr->filter_type = (png_byte)filter_type; + info_ptr->interlace_type = (png_byte)interlace_type; + + png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height, + info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type, + info_ptr->compression_type, info_ptr->filter_type); + + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + info_ptr->channels = 1; + + else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) + info_ptr->channels = 3; + + else + info_ptr->channels = 1; + + if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) + info_ptr->channels++; + + info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth); + + /* Check for potential overflow */ + if (width > + (PNG_UINT_32_MAX >> 3) /* 8-byte RRGGBBAA pixels */ + - 48 /* bigrowbuf hack */ + - 1 /* filter byte */ + - 7*8 /* rounding of width to multiple of 8 pixels */ + - 8) /* extra max_pixel_depth pad */ + info_ptr->rowbytes = 0; + else + info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width); +} + +#ifdef PNG_oFFs_SUPPORTED +void PNGAPI +png_set_oFFs(png_const_structrp png_ptr, png_inforp info_ptr, + png_int_32 offset_x, png_int_32 offset_y, int unit_type) +{ + png_debug1(1, "in %s storage function", "oFFs"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->x_offset = offset_x; + info_ptr->y_offset = offset_y; + info_ptr->offset_unit_type = (png_byte)unit_type; + info_ptr->valid |= PNG_INFO_oFFs; +} +#endif + +#ifdef PNG_pCAL_SUPPORTED +void PNGAPI +png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type, + int nparams, png_const_charp units, png_charpp params) +{ + png_size_t length; + int i; + + png_debug1(1, "in %s storage function", "pCAL"); + + if (png_ptr == NULL || info_ptr == NULL || purpose == NULL || units == NULL + || (nparams > 0 && params == NULL)) + return; + + length = strlen(purpose) + 1; + png_debug1(3, "allocating purpose for info (%lu bytes)", + (unsigned long)length); + + /* TODO: validate format of calibration name and unit name */ + + /* Check that the type matches the specification. */ + if (type < 0 || type > 3) + png_error(png_ptr, "Invalid pCAL equation type"); + + if (nparams < 0 || nparams > 255) + png_error(png_ptr, "Invalid pCAL parameter count"); + + /* Validate params[nparams] */ + for (i=0; ipcal_purpose = png_voidcast(png_charp, + png_malloc_warn(png_ptr, length)); + + if (info_ptr->pcal_purpose == NULL) + { + png_warning(png_ptr, "Insufficient memory for pCAL purpose"); + return; + } + + memcpy(info_ptr->pcal_purpose, purpose, length); + + png_debug(3, "storing X0, X1, type, and nparams in info"); + info_ptr->pcal_X0 = X0; + info_ptr->pcal_X1 = X1; + info_ptr->pcal_type = (png_byte)type; + info_ptr->pcal_nparams = (png_byte)nparams; + + length = strlen(units) + 1; + png_debug1(3, "allocating units for info (%lu bytes)", + (unsigned long)length); + + info_ptr->pcal_units = png_voidcast(png_charp, + png_malloc_warn(png_ptr, length)); + + if (info_ptr->pcal_units == NULL) + { + png_warning(png_ptr, "Insufficient memory for pCAL units"); + return; + } + + memcpy(info_ptr->pcal_units, units, length); + + info_ptr->pcal_params = png_voidcast(png_charpp, png_malloc_warn(png_ptr, + (png_size_t)((nparams + 1) * (sizeof (png_charp))))); + + if (info_ptr->pcal_params == NULL) + { + png_warning(png_ptr, "Insufficient memory for pCAL params"); + return; + } + + memset(info_ptr->pcal_params, 0, (nparams + 1) * (sizeof (png_charp))); + + for (i = 0; i < nparams; i++) + { + length = strlen(params[i]) + 1; + png_debug2(3, "allocating parameter %d for info (%lu bytes)", i, + (unsigned long)length); + + info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length); + + if (info_ptr->pcal_params[i] == NULL) + { + png_warning(png_ptr, "Insufficient memory for pCAL parameter"); + return; + } + + memcpy(info_ptr->pcal_params[i], params[i], length); + } + + info_ptr->valid |= PNG_INFO_pCAL; + info_ptr->free_me |= PNG_FREE_PCAL; +} +#endif + +#ifdef PNG_sCAL_SUPPORTED +void PNGAPI +png_set_sCAL_s(png_const_structrp png_ptr, png_inforp info_ptr, + int unit, png_const_charp swidth, png_const_charp sheight) +{ + png_size_t lengthw = 0, lengthh = 0; + + png_debug1(1, "in %s storage function", "sCAL"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* Double check the unit (should never get here with an invalid + * unit unless this is an API call.) + */ + if (unit != 1 && unit != 2) + png_error(png_ptr, "Invalid sCAL unit"); + + if (swidth == NULL || (lengthw = strlen(swidth)) == 0 || + swidth[0] == 45 /* '-' */ || !png_check_fp_string(swidth, lengthw)) + png_error(png_ptr, "Invalid sCAL width"); + + if (sheight == NULL || (lengthh = strlen(sheight)) == 0 || + sheight[0] == 45 /* '-' */ || !png_check_fp_string(sheight, lengthh)) + png_error(png_ptr, "Invalid sCAL height"); + + info_ptr->scal_unit = (png_byte)unit; + + ++lengthw; + + png_debug1(3, "allocating unit for info (%u bytes)", (unsigned int)lengthw); + + info_ptr->scal_s_width = png_voidcast(png_charp, + png_malloc_warn(png_ptr, lengthw)); + + if (info_ptr->scal_s_width == NULL) + { + png_warning(png_ptr, "Memory allocation failed while processing sCAL"); + return; + } + + memcpy(info_ptr->scal_s_width, swidth, lengthw); + + ++lengthh; + + png_debug1(3, "allocating unit for info (%u bytes)", (unsigned int)lengthh); + + info_ptr->scal_s_height = png_voidcast(png_charp, + png_malloc_warn(png_ptr, lengthh)); + + if (info_ptr->scal_s_height == NULL) + { + png_free (png_ptr, info_ptr->scal_s_width); + info_ptr->scal_s_width = NULL; + + png_warning(png_ptr, "Memory allocation failed while processing sCAL"); + return; + } + + memcpy(info_ptr->scal_s_height, sheight, lengthh); + + info_ptr->valid |= PNG_INFO_sCAL; + info_ptr->free_me |= PNG_FREE_SCAL; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_sCAL(png_const_structrp png_ptr, png_inforp info_ptr, int unit, + double width, double height) +{ + png_debug1(1, "in %s storage function", "sCAL"); + + /* Check the arguments. */ + if (width <= 0) + png_warning(png_ptr, "Invalid sCAL width ignored"); + + else if (height <= 0) + png_warning(png_ptr, "Invalid sCAL height ignored"); + + else + { + /* Convert 'width' and 'height' to ASCII. */ + char swidth[PNG_sCAL_MAX_DIGITS+1]; + char sheight[PNG_sCAL_MAX_DIGITS+1]; + + png_ascii_from_fp(png_ptr, swidth, (sizeof swidth), width, + PNG_sCAL_PRECISION); + png_ascii_from_fp(png_ptr, sheight, (sizeof sheight), height, + PNG_sCAL_PRECISION); + + png_set_sCAL_s(png_ptr, info_ptr, unit, swidth, sheight); + } +} +# endif + +# ifdef PNG_FIXED_POINT_SUPPORTED +void PNGAPI +png_set_sCAL_fixed(png_const_structrp png_ptr, png_inforp info_ptr, int unit, + png_fixed_point width, png_fixed_point height) +{ + png_debug1(1, "in %s storage function", "sCAL"); + + /* Check the arguments. */ + if (width <= 0) + png_warning(png_ptr, "Invalid sCAL width ignored"); + + else if (height <= 0) + png_warning(png_ptr, "Invalid sCAL height ignored"); + + else + { + /* Convert 'width' and 'height' to ASCII. */ + char swidth[PNG_sCAL_MAX_DIGITS+1]; + char sheight[PNG_sCAL_MAX_DIGITS+1]; + + png_ascii_from_fixed(png_ptr, swidth, (sizeof swidth), width); + png_ascii_from_fixed(png_ptr, sheight, (sizeof sheight), height); + + png_set_sCAL_s(png_ptr, info_ptr, unit, swidth, sheight); + } +} +# endif +#endif + +#ifdef PNG_pHYs_SUPPORTED +void PNGAPI +png_set_pHYs(png_const_structrp png_ptr, png_inforp info_ptr, + png_uint_32 res_x, png_uint_32 res_y, int unit_type) +{ + png_debug1(1, "in %s storage function", "pHYs"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->x_pixels_per_unit = res_x; + info_ptr->y_pixels_per_unit = res_y; + info_ptr->phys_unit_type = (png_byte)unit_type; + info_ptr->valid |= PNG_INFO_pHYs; +} +#endif + +void PNGAPI +png_set_PLTE(png_structrp png_ptr, png_inforp info_ptr, + png_const_colorp palette, int num_palette) +{ + + png_debug1(1, "in %s storage function", "PLTE"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (num_palette < 0 || num_palette > PNG_MAX_PALETTE_LENGTH) + { + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + png_error(png_ptr, "Invalid palette length"); + + else + { + png_warning(png_ptr, "Invalid palette length"); + return; + } + } + + if ((num_palette > 0 && palette == NULL) || + (num_palette == 0 +# ifdef PNG_MNG_FEATURES_SUPPORTED + && (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0 +# endif + )) + { + png_chunk_report(png_ptr, "Invalid palette", PNG_CHUNK_ERROR); + return; + } + + /* It may not actually be necessary to set png_ptr->palette here; + * we do it for backward compatibility with the way the png_handle_tRNS + * function used to do the allocation. + * + * 1.6.0: the above statement appears to be incorrect; something has to set + * the palette inside png_struct on read. + */ + png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0); + + /* Changed in libpng-1.2.1 to allocate PNG_MAX_PALETTE_LENGTH instead + * of num_palette entries, in case of an invalid PNG file that has + * too-large sample values. + */ + png_ptr->palette = png_voidcast(png_colorp, png_calloc(png_ptr, + PNG_MAX_PALETTE_LENGTH * (sizeof (png_color)))); + + if (num_palette > 0) + memcpy(png_ptr->palette, palette, num_palette * (sizeof (png_color))); + info_ptr->palette = png_ptr->palette; + info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette; + + info_ptr->free_me |= PNG_FREE_PLTE; + + info_ptr->valid |= PNG_INFO_PLTE; +} + +#ifdef PNG_sBIT_SUPPORTED +void PNGAPI +png_set_sBIT(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_color_8p sig_bit) +{ + png_debug1(1, "in %s storage function", "sBIT"); + + if (png_ptr == NULL || info_ptr == NULL || sig_bit == NULL) + return; + + info_ptr->sig_bit = *sig_bit; + info_ptr->valid |= PNG_INFO_sBIT; +} +#endif + +#ifdef PNG_sRGB_SUPPORTED +void PNGAPI +png_set_sRGB(png_const_structrp png_ptr, png_inforp info_ptr, int srgb_intent) +{ + png_debug1(1, "in %s storage function", "sRGB"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + (void)png_colorspace_set_sRGB(png_ptr, &info_ptr->colorspace, srgb_intent); + png_colorspace_sync_info(png_ptr, info_ptr); +} + +void PNGAPI +png_set_sRGB_gAMA_and_cHRM(png_const_structrp png_ptr, png_inforp info_ptr, + int srgb_intent) +{ + png_debug1(1, "in %s storage function", "sRGB_gAMA_and_cHRM"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (png_colorspace_set_sRGB(png_ptr, &info_ptr->colorspace, srgb_intent)) + { + /* This causes the gAMA and cHRM to be written too */ + info_ptr->colorspace.flags |= + PNG_COLORSPACE_FROM_gAMA|PNG_COLORSPACE_FROM_cHRM; + } + + png_colorspace_sync_info(png_ptr, info_ptr); +} +#endif /* sRGB */ + + +#ifdef PNG_iCCP_SUPPORTED +void PNGAPI +png_set_iCCP(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_charp name, int compression_type, + png_const_bytep profile, png_uint_32 proflen) +{ + png_charp new_iccp_name; + png_bytep new_iccp_profile; + png_size_t length; + + png_debug1(1, "in %s storage function", "iCCP"); + + if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL) + return; + + if (compression_type != PNG_COMPRESSION_TYPE_BASE) + png_app_error(png_ptr, "Invalid iCCP compression method"); + + /* Set the colorspace first because this validates the profile; do not + * override previously set app cHRM or gAMA here (because likely as not the + * application knows better than libpng what the correct values are.) Pass + * the info_ptr color_type field to png_colorspace_set_ICC because in the + * write case it has not yet been stored in png_ptr. + */ + { + int result = png_colorspace_set_ICC(png_ptr, &info_ptr->colorspace, name, + proflen, profile, info_ptr->color_type); + + png_colorspace_sync_info(png_ptr, info_ptr); + + /* Don't do any of the copying if the profile was bad, or inconsistent. */ + if (!result) + return; + + /* But do write the gAMA and cHRM chunks from the profile. */ + info_ptr->colorspace.flags |= + PNG_COLORSPACE_FROM_gAMA|PNG_COLORSPACE_FROM_cHRM; + } + + length = strlen(name)+1; + new_iccp_name = png_voidcast(png_charp, png_malloc_warn(png_ptr, length)); + + if (new_iccp_name == NULL) + { + png_benign_error(png_ptr, "Insufficient memory to process iCCP chunk"); + return; + } + + memcpy(new_iccp_name, name, length); + new_iccp_profile = png_voidcast(png_bytep, + png_malloc_warn(png_ptr, proflen)); + + if (new_iccp_profile == NULL) + { + png_free(png_ptr, new_iccp_name); + png_benign_error(png_ptr, + "Insufficient memory to process iCCP profile"); + return; + } + + memcpy(new_iccp_profile, profile, proflen); + + png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, 0); + + info_ptr->iccp_proflen = proflen; + info_ptr->iccp_name = new_iccp_name; + info_ptr->iccp_profile = new_iccp_profile; + info_ptr->free_me |= PNG_FREE_ICCP; + info_ptr->valid |= PNG_INFO_iCCP; +} +#endif + +#ifdef PNG_TEXT_SUPPORTED +void PNGAPI +png_set_text(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_textp text_ptr, int num_text) +{ + int ret; + ret = png_set_text_2(png_ptr, info_ptr, text_ptr, num_text); + + if (ret) + png_error(png_ptr, "Insufficient memory to store text"); +} + +int /* PRIVATE */ +png_set_text_2(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_textp text_ptr, int num_text) +{ + int i; + + png_debug1(1, "in %lx storage function", png_ptr == NULL ? "unexpected" : + (unsigned long)png_ptr->chunk_name); + + if (png_ptr == NULL || info_ptr == NULL || num_text <= 0 || text_ptr == NULL) + return(0); + + /* Make sure we have enough space in the "text" array in info_struct + * to hold all of the incoming text_ptr objects. This compare can't overflow + * because max_text >= num_text (anyway, subtract of two positive integers + * can't overflow in any case.) + */ + if (num_text > info_ptr->max_text - info_ptr->num_text) + { + int old_num_text = info_ptr->num_text; + int max_text; + png_textp new_text = NULL; + + /* Calculate an appropriate max_text, checking for overflow. */ + max_text = old_num_text; + if (num_text <= INT_MAX - max_text) + { + max_text += num_text; + + /* Round up to a multiple of 8 */ + if (max_text < INT_MAX-8) + max_text = (max_text + 8) & ~0x7; + + else + max_text = INT_MAX; + + /* Now allocate a new array and copy the old members in, this does all + * the overflow checks. + */ + new_text = png_voidcast(png_textp,png_realloc_array(png_ptr, + info_ptr->text, old_num_text, max_text-old_num_text, + sizeof *new_text)); + } + + if (new_text == NULL) + { + png_chunk_report(png_ptr, "too many text chunks", + PNG_CHUNK_WRITE_ERROR); + return 1; + } + + png_free(png_ptr, info_ptr->text); + + info_ptr->text = new_text; + info_ptr->free_me |= PNG_FREE_TEXT; + info_ptr->max_text = max_text; + /* num_text is adjusted below as the entries are copied in */ + + png_debug1(3, "allocated %d entries for info_ptr->text", max_text); + } + + for (i = 0; i < num_text; i++) + { + size_t text_length, key_len; + size_t lang_len, lang_key_len; + png_textp textp = &(info_ptr->text[info_ptr->num_text]); + + if (text_ptr[i].key == NULL) + continue; + + if (text_ptr[i].compression < PNG_TEXT_COMPRESSION_NONE || + text_ptr[i].compression >= PNG_TEXT_COMPRESSION_LAST) + { + png_chunk_report(png_ptr, "text compression mode is out of range", + PNG_CHUNK_WRITE_ERROR); + continue; + } + + key_len = strlen(text_ptr[i].key); + + if (text_ptr[i].compression <= 0) + { + lang_len = 0; + lang_key_len = 0; + } + + else +# ifdef PNG_iTXt_SUPPORTED + { + /* Set iTXt data */ + + if (text_ptr[i].lang != NULL) + lang_len = strlen(text_ptr[i].lang); + + else + lang_len = 0; + + if (text_ptr[i].lang_key != NULL) + lang_key_len = strlen(text_ptr[i].lang_key); + + else + lang_key_len = 0; + } +# else /* PNG_iTXt_SUPPORTED */ + { + png_chunk_report(png_ptr, "iTXt chunk not supported", + PNG_CHUNK_WRITE_ERROR); + continue; + } +# endif + + if (text_ptr[i].text == NULL || text_ptr[i].text[0] == '\0') + { + text_length = 0; +# ifdef PNG_iTXt_SUPPORTED + if (text_ptr[i].compression > 0) + textp->compression = PNG_ITXT_COMPRESSION_NONE; + + else +# endif + textp->compression = PNG_TEXT_COMPRESSION_NONE; + } + + else + { + text_length = strlen(text_ptr[i].text); + textp->compression = text_ptr[i].compression; + } + + textp->key = png_voidcast(png_charp,png_malloc_base(png_ptr, + key_len + text_length + lang_len + lang_key_len + 4)); + + if (textp->key == NULL) + { + png_chunk_report(png_ptr, "text chunk: out of memory", + PNG_CHUNK_WRITE_ERROR); + return 1; + } + + png_debug2(2, "Allocated %lu bytes at %p in png_set_text", + (unsigned long)(png_uint_32) + (key_len + lang_len + lang_key_len + text_length + 4), + textp->key); + + memcpy(textp->key, text_ptr[i].key, key_len); + *(textp->key + key_len) = '\0'; + + if (text_ptr[i].compression > 0) + { + textp->lang = textp->key + key_len + 1; + memcpy(textp->lang, text_ptr[i].lang, lang_len); + *(textp->lang + lang_len) = '\0'; + textp->lang_key = textp->lang + lang_len + 1; + memcpy(textp->lang_key, text_ptr[i].lang_key, lang_key_len); + *(textp->lang_key + lang_key_len) = '\0'; + textp->text = textp->lang_key + lang_key_len + 1; + } + + else + { + textp->lang=NULL; + textp->lang_key=NULL; + textp->text = textp->key + key_len + 1; + } + + if (text_length) + memcpy(textp->text, text_ptr[i].text, text_length); + + *(textp->text + text_length) = '\0'; + +# ifdef PNG_iTXt_SUPPORTED + if (textp->compression > 0) + { + textp->text_length = 0; + textp->itxt_length = text_length; + } + + else +# endif + { + textp->text_length = text_length; + textp->itxt_length = 0; + } + + info_ptr->num_text++; + png_debug1(3, "transferred text chunk %d", info_ptr->num_text); + } + + return(0); +} +#endif + +#ifdef PNG_tIME_SUPPORTED +void PNGAPI +png_set_tIME(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_timep mod_time) +{ + png_debug1(1, "in %s storage function", "tIME"); + + if (png_ptr == NULL || info_ptr == NULL || mod_time == NULL || + (png_ptr->mode & PNG_WROTE_tIME)) + return; + + if (mod_time->month == 0 || mod_time->month > 12 || + mod_time->day == 0 || mod_time->day > 31 || + mod_time->hour > 23 || mod_time->minute > 59 || + mod_time->second > 60) + { + png_warning(png_ptr, "Ignoring invalid time value"); + return; + } + + info_ptr->mod_time = *mod_time; + info_ptr->valid |= PNG_INFO_tIME; +} +#endif + +#ifdef PNG_tRNS_SUPPORTED +void PNGAPI +png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr, + png_const_bytep trans_alpha, int num_trans, png_const_color_16p trans_color) +{ + png_debug1(1, "in %s storage function", "tRNS"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (trans_alpha != NULL) + { + /* It may not actually be necessary to set png_ptr->trans_alpha here; + * we do it for backward compatibility with the way the png_handle_tRNS + * function used to do the allocation. + * + * 1.6.0: The above statement is incorrect; png_handle_tRNS effectively + * relies on png_set_tRNS storing the information in png_struct + * (otherwise it won't be there for the code in pngrtran.c). + */ + + png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0); + + /* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */ + png_ptr->trans_alpha = info_ptr->trans_alpha = png_voidcast(png_bytep, + png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH)); + + if (num_trans > 0 && num_trans <= PNG_MAX_PALETTE_LENGTH) + memcpy(info_ptr->trans_alpha, trans_alpha, (png_size_t)num_trans); + } + + if (trans_color != NULL) + { + int sample_max = (1 << info_ptr->bit_depth); + + if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY && + trans_color->gray > sample_max) || + (info_ptr->color_type == PNG_COLOR_TYPE_RGB && + (trans_color->red > sample_max || + trans_color->green > sample_max || + trans_color->blue > sample_max))) + png_warning(png_ptr, + "tRNS chunk has out-of-range samples for bit_depth"); + + info_ptr->trans_color = *trans_color; + + if (num_trans == 0) + num_trans = 1; + } + + info_ptr->num_trans = (png_uint_16)num_trans; + + if (num_trans != 0) + { + info_ptr->valid |= PNG_INFO_tRNS; + info_ptr->free_me |= PNG_FREE_TRNS; + } +} +#endif + +#ifdef PNG_sPLT_SUPPORTED +void PNGAPI +png_set_sPLT(png_const_structrp png_ptr, + png_inforp info_ptr, png_const_sPLT_tp entries, int nentries) +/* + * entries - array of png_sPLT_t structures + * to be added to the list of palettes + * in the info structure. + * + * nentries - number of palette structures to be + * added. + */ +{ + png_sPLT_tp np; + + if (png_ptr == NULL || info_ptr == NULL || nentries <= 0 || entries == NULL) + return; + + /* Use the internal realloc function, which checks for all the possible + * overflows. Notice that the parameters are (int) and (size_t) + */ + np = png_voidcast(png_sPLT_tp,png_realloc_array(png_ptr, + info_ptr->splt_palettes, info_ptr->splt_palettes_num, nentries, + sizeof *np)); + + if (np == NULL) + { + /* Out of memory or too many chunks */ + png_chunk_report(png_ptr, "too many sPLT chunks", PNG_CHUNK_WRITE_ERROR); + return; + } + + png_free(png_ptr, info_ptr->splt_palettes); + info_ptr->splt_palettes = np; + info_ptr->free_me |= PNG_FREE_SPLT; + + np += info_ptr->splt_palettes_num; + + do + { + png_size_t length; + + /* Skip invalid input entries */ + if (entries->name == NULL || entries->entries == NULL) + { + /* png_handle_sPLT doesn't do this, so this is an app error */ + png_app_error(png_ptr, "png_set_sPLT: invalid sPLT"); + /* Just skip the invalid entry */ + continue; + } + + np->depth = entries->depth; + + /* In the even of out-of-memory just return - there's no point keeping on + * trying to add sPLT chunks. + */ + length = strlen(entries->name) + 1; + np->name = png_voidcast(png_charp, png_malloc_base(png_ptr, length)); + + if (np->name == NULL) + break; + + memcpy(np->name, entries->name, length); + + /* IMPORTANT: we have memory now that won't get freed if something else + * goes wrong, this code must free it. png_malloc_array produces no + * warnings, use a png_chunk_report (below) if there is an error. + */ + np->entries = png_voidcast(png_sPLT_entryp, png_malloc_array(png_ptr, + entries->nentries, sizeof (png_sPLT_entry))); + + if (np->entries == NULL) + { + png_free(png_ptr, np->name); + break; + } + + np->nentries = entries->nentries; + /* This multiply can't overflow because png_malloc_array has already + * checked it when doing the allocation. + */ + memcpy(np->entries, entries->entries, + entries->nentries * sizeof (png_sPLT_entry)); + + /* Note that 'continue' skips the advance of the out pointer and out + * count, so an invalid entry is not added. + */ + info_ptr->valid |= PNG_INFO_sPLT; + ++(info_ptr->splt_palettes_num); + ++np; + } + while (++entries, --nentries); + + if (nentries > 0) + png_chunk_report(png_ptr, "sPLT out of memory", PNG_CHUNK_WRITE_ERROR); +} +#endif /* PNG_sPLT_SUPPORTED */ + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +static png_byte +check_location(png_const_structrp png_ptr, int location) +{ + location &= (PNG_HAVE_IHDR|PNG_HAVE_PLTE|PNG_AFTER_IDAT); + + /* New in 1.6.0; copy the location and check it. This is an API + * change, previously the app had to use the + * png_set_unknown_chunk_location API below for each chunk. + */ + if (location == 0 && !(png_ptr->mode & PNG_IS_READ_STRUCT)) + { + /* Write struct, so unknown chunks come from the app */ + png_app_warning(png_ptr, + "png_set_unknown_chunks now expects a valid location"); + /* Use the old behavior */ + location = (png_byte)(png_ptr->mode & + (PNG_HAVE_IHDR|PNG_HAVE_PLTE|PNG_AFTER_IDAT)); + } + + /* This need not be an internal error - if the app calls + * png_set_unknown_chunks on a read pointer it must get the location right. + */ + if (location == 0) + png_error(png_ptr, "invalid location in png_set_unknown_chunks"); + + /* Now reduce the location to the top-most set bit by removing each least + * significant bit in turn. + */ + while (location != (location & -location)) + location &= ~(location & -location); + + /* The cast is safe because 'location' is a bit mask and only the low four + * bits are significant. + */ + return (png_byte)location; +} + +void PNGAPI +png_set_unknown_chunks(png_const_structrp png_ptr, + png_inforp info_ptr, png_const_unknown_chunkp unknowns, int num_unknowns) +{ + png_unknown_chunkp np; + + if (png_ptr == NULL || info_ptr == NULL || num_unknowns <= 0 || + unknowns == NULL) + return; + + /* Check for the failure cases where support has been disabled at compile + * time. This code is hardly ever compiled - it's here because + * STORE_UNKNOWN_CHUNKS is set by both read and write code (compiling in this + * code) but may be meaningless if the read or write handling of unknown + * chunks is not compiled in. + */ +# if !defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) && \ + defined(PNG_READ_SUPPORTED) + if (png_ptr->mode & PNG_IS_READ_STRUCT) + { + png_app_error(png_ptr, "no unknown chunk support on read"); + return; + } +# endif +# if !defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) && \ + defined(PNG_WRITE_SUPPORTED) + if (!(png_ptr->mode & PNG_IS_READ_STRUCT)) + { + png_app_error(png_ptr, "no unknown chunk support on write"); + return; + } +# endif + + /* Prior to 1.6.0 this code used png_malloc_warn; however, this meant that + * unknown critical chunks could be lost with just a warning resulting in + * undefined behavior. Now png_chunk_report is used to provide behavior + * appropriate to read or write. + */ + np = png_voidcast(png_unknown_chunkp, png_realloc_array(png_ptr, + info_ptr->unknown_chunks, info_ptr->unknown_chunks_num, num_unknowns, + sizeof *np)); + + if (np == NULL) + { + png_chunk_report(png_ptr, "too many unknown chunks", + PNG_CHUNK_WRITE_ERROR); + return; + } + + png_free(png_ptr, info_ptr->unknown_chunks); + info_ptr->unknown_chunks = np; /* safe because it is initialized */ + info_ptr->free_me |= PNG_FREE_UNKN; + + np += info_ptr->unknown_chunks_num; + + /* Increment unknown_chunks_num each time round the loop to protect the + * just-allocated chunk data. + */ + for (; num_unknowns > 0; --num_unknowns, ++unknowns) + { + memcpy(np->name, unknowns->name, (sizeof np->name)); + np->name[(sizeof np->name)-1] = '\0'; + np->location = check_location(png_ptr, unknowns->location); + + if (unknowns->size == 0) + { + np->data = NULL; + np->size = 0; + } + + else + { + np->data = png_voidcast(png_bytep, + png_malloc_base(png_ptr, unknowns->size)); + + if (np->data == NULL) + { + png_chunk_report(png_ptr, "unknown chunk: out of memory", + PNG_CHUNK_WRITE_ERROR); + /* But just skip storing the unknown chunk */ + continue; + } + + memcpy(np->data, unknowns->data, unknowns->size); + np->size = unknowns->size; + } + + /* These increments are skipped on out-of-memory for the data - the + * unknown chunk entry gets overwritten if the png_chunk_report returns. + * This is correct in the read case (the chunk is just dropped.) + */ + ++np; + ++(info_ptr->unknown_chunks_num); + } +} + +void PNGAPI +png_set_unknown_chunk_location(png_const_structrp png_ptr, png_inforp info_ptr, + int chunk, int location) +{ + /* This API is pretty pointless in 1.6.0 because the location can be set + * before the call to png_set_unknown_chunks. + * + * TODO: add a png_app_warning in 1.7 + */ + if (png_ptr != NULL && info_ptr != NULL && chunk >= 0 && + chunk < info_ptr->unknown_chunks_num) + { + if ((location & (PNG_HAVE_IHDR|PNG_HAVE_PLTE|PNG_AFTER_IDAT)) == 0) + { + png_app_error(png_ptr, "invalid unknown chunk location"); + /* Fake out the pre 1.6.0 behavior: */ + if ((location & PNG_HAVE_IDAT)) /* undocumented! */ + location = PNG_AFTER_IDAT; + + else + location = PNG_HAVE_IHDR; /* also undocumented */ + } + + info_ptr->unknown_chunks[chunk].location = + check_location(png_ptr, location); + } +} +#endif + + +#ifdef PNG_MNG_FEATURES_SUPPORTED +png_uint_32 PNGAPI +png_permit_mng_features (png_structrp png_ptr, png_uint_32 mng_features) +{ + png_debug(1, "in png_permit_mng_features"); + + if (png_ptr == NULL) + return 0; + + png_ptr->mng_features_permitted = mng_features & PNG_ALL_MNG_FEATURES; + + return png_ptr->mng_features_permitted; +} +#endif + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +static unsigned int +add_one_chunk(png_bytep list, unsigned int count, png_const_bytep add, int keep) +{ + unsigned int i; + + /* Utility function: update the 'keep' state of a chunk if it is already in + * the list, otherwise add it to the list. + */ + for (i=0; i= PNG_HANDLE_CHUNK_LAST) + { + png_app_error(png_ptr, "png_set_keep_unknown_chunks: invalid keep"); + return; + } + + if (num_chunks_in <= 0) + { + png_ptr->unknown_default = keep; + + /* '0' means just set the flags, so stop here */ + if (num_chunks_in == 0) + return; + } + + if (num_chunks_in < 0) + { + /* Ignore all unknown chunks and all chunks recognized by + * libpng except for IHDR, PLTE, tRNS, IDAT, and IEND + */ + static PNG_CONST png_byte chunks_to_ignore[] = { + 98, 75, 71, 68, '\0', /* bKGD */ + 99, 72, 82, 77, '\0', /* cHRM */ + 103, 65, 77, 65, '\0', /* gAMA */ + 104, 73, 83, 84, '\0', /* hIST */ + 105, 67, 67, 80, '\0', /* iCCP */ + 105, 84, 88, 116, '\0', /* iTXt */ + 111, 70, 70, 115, '\0', /* oFFs */ + 112, 67, 65, 76, '\0', /* pCAL */ + 112, 72, 89, 115, '\0', /* pHYs */ + 115, 66, 73, 84, '\0', /* sBIT */ + 115, 67, 65, 76, '\0', /* sCAL */ + 115, 80, 76, 84, '\0', /* sPLT */ + 115, 84, 69, 82, '\0', /* sTER */ + 115, 82, 71, 66, '\0', /* sRGB */ + 116, 69, 88, 116, '\0', /* tEXt */ + 116, 73, 77, 69, '\0', /* tIME */ + 122, 84, 88, 116, '\0' /* zTXt */ + }; + + chunk_list = chunks_to_ignore; + num_chunks = (sizeof chunks_to_ignore)/5; + } + + else /* num_chunks_in > 0 */ + { + if (chunk_list == NULL) + { + /* Prior to 1.6.0 this was silently ignored, now it is an app_error + * which can be switched off. + */ + png_app_error(png_ptr, "png_set_keep_unknown_chunks: no chunk list"); + return; + } + + num_chunks = num_chunks_in; + } + + old_num_chunks = png_ptr->num_chunk_list; + if (png_ptr->chunk_list == NULL) + old_num_chunks = 0; + + /* Since num_chunks is always restricted to UINT_MAX/5 this can't overflow. + */ + if (num_chunks + old_num_chunks > UINT_MAX/5) + { + png_app_error(png_ptr, "png_set_keep_unknown_chunks: too many chunks"); + return; + } + + /* If these chunks are being reset to the default then no more memory is + * required because add_one_chunk above doesn't extend the list if the 'keep' + * parameter is the default. + */ + if (keep) + { + new_list = png_voidcast(png_bytep, png_malloc(png_ptr, + 5 * (num_chunks + old_num_chunks))); + + if (old_num_chunks > 0) + memcpy(new_list, png_ptr->chunk_list, 5*old_num_chunks); + } + + else if (old_num_chunks > 0) + new_list = png_ptr->chunk_list; + + else + new_list = NULL; + + /* Add the new chunks together with each one's handling code. If the chunk + * already exists the code is updated, otherwise the chunk is added to the + * end. (In libpng 1.6.0 order no longer matters because this code enforces + * the earlier convention that the last setting is the one that is used.) + */ + if (new_list != NULL) + { + png_const_bytep inlist; + png_bytep outlist; + unsigned int i; + + for (i=0; ichunk_list != new_list) + png_free(png_ptr, new_list); + + new_list = NULL; + } + } + + else + num_chunks = 0; + + png_ptr->num_chunk_list = num_chunks; + + if (png_ptr->chunk_list != new_list) + { + if (png_ptr->chunk_list != NULL) + png_free(png_ptr, png_ptr->chunk_list); + + png_ptr->chunk_list = new_list; + } +} +#endif + +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED +void PNGAPI +png_set_read_user_chunk_fn(png_structrp png_ptr, png_voidp user_chunk_ptr, + png_user_chunk_ptr read_user_chunk_fn) +{ + png_debug(1, "in png_set_read_user_chunk_fn"); + + if (png_ptr == NULL) + return; + + png_ptr->read_user_chunk_fn = read_user_chunk_fn; + png_ptr->user_chunk_ptr = user_chunk_ptr; +} +#endif + +#ifdef PNG_INFO_IMAGE_SUPPORTED +void PNGAPI +png_set_rows(png_const_structrp png_ptr, png_inforp info_ptr, + png_bytepp row_pointers) +{ + png_debug1(1, "in %s storage function", "rows"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (info_ptr->row_pointers && (info_ptr->row_pointers != row_pointers)) + png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); + + info_ptr->row_pointers = row_pointers; + + if (row_pointers) + info_ptr->valid |= PNG_INFO_IDAT; +} +#endif + +void PNGAPI +png_set_compression_buffer_size(png_structrp png_ptr, png_size_t size) +{ + if (png_ptr == NULL) + return; + + if (size == 0 || size > PNG_UINT_31_MAX) + png_error(png_ptr, "invalid compression buffer size"); + +# ifdef PNG_SEQUENTIAL_READ_SUPPORTED + if (png_ptr->mode & PNG_IS_READ_STRUCT) + { + png_ptr->IDAT_read_size = (png_uint_32)size; /* checked above */ + return; + } +# endif + +# ifdef PNG_WRITE_SUPPORTED + if (!(png_ptr->mode & PNG_IS_READ_STRUCT)) + { + if (png_ptr->zowner != 0) + { + png_warning(png_ptr, + "Compression buffer size cannot be changed because it is in use"); + return; + } + + if (size > ZLIB_IO_MAX) + { + png_warning(png_ptr, + "Compression buffer size limited to system maximum"); + size = ZLIB_IO_MAX; /* must fit */ + } + + else if (size < 6) + { + /* Deflate will potentially go into an infinite loop on a SYNC_FLUSH + * if this is permitted. + */ + png_warning(png_ptr, + "Compression buffer size cannot be reduced below 6"); + return; + } + + if (png_ptr->zbuffer_size != size) + { + png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list); + png_ptr->zbuffer_size = (uInt)size; + } + } +# endif +} + +void PNGAPI +png_set_invalid(png_const_structrp png_ptr, png_inforp info_ptr, int mask) +{ + if (png_ptr && info_ptr) + info_ptr->valid &= ~mask; +} + + +#ifdef PNG_SET_USER_LIMITS_SUPPORTED +/* This function was added to libpng 1.2.6 */ +void PNGAPI +png_set_user_limits (png_structrp png_ptr, png_uint_32 user_width_max, + png_uint_32 user_height_max) +{ + /* Images with dimensions larger than these limits will be + * rejected by png_set_IHDR(). To accept any PNG datastream + * regardless of dimensions, set both limits to 0x7ffffffL. + */ + if (png_ptr == NULL) + return; + + png_ptr->user_width_max = user_width_max; + png_ptr->user_height_max = user_height_max; +} + +/* This function was added to libpng 1.4.0 */ +void PNGAPI +png_set_chunk_cache_max (png_structrp png_ptr, png_uint_32 user_chunk_cache_max) +{ + if (png_ptr) + png_ptr->user_chunk_cache_max = user_chunk_cache_max; +} + +/* This function was added to libpng 1.4.1 */ +void PNGAPI +png_set_chunk_malloc_max (png_structrp png_ptr, + png_alloc_size_t user_chunk_malloc_max) +{ + if (png_ptr) + png_ptr->user_chunk_malloc_max = user_chunk_malloc_max; +} +#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ + + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +void PNGAPI +png_set_benign_errors(png_structrp png_ptr, int allowed) +{ + png_debug(1, "in png_set_benign_errors"); + + /* If allowed is 1, png_benign_error() is treated as a warning. + * + * If allowed is 0, png_benign_error() is treated as an error (which + * is the default behavior if png_set_benign_errors() is not called). + */ + + if (allowed) + png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN | + PNG_FLAG_APP_WARNINGS_WARN | PNG_FLAG_APP_ERRORS_WARN; + + else + png_ptr->flags &= ~(PNG_FLAG_BENIGN_ERRORS_WARN | + PNG_FLAG_APP_WARNINGS_WARN | PNG_FLAG_APP_ERRORS_WARN); +} +#endif /* PNG_BENIGN_ERRORS_SUPPORTED */ + +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED + /* Whether to report invalid palette index; added at libng-1.5.10. + * It is possible for an indexed (color-type==3) PNG file to contain + * pixels with invalid (out-of-range) indexes if the PLTE chunk has + * fewer entries than the image's bit-depth would allow. We recover + * from this gracefully by filling any incomplete palette with zeroes + * (opaque black). By default, when this occurs libpng will issue + * a benign error. This API can be used to override that behavior. + */ +void PNGAPI +png_set_check_for_invalid_index(png_structrp png_ptr, int allowed) +{ + png_debug(1, "in png_set_check_for_invalid_index"); + + if (allowed > 0) + png_ptr->num_palette_max = 0; + + else + png_ptr->num_palette_max = -1; +} +#endif +#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngstruct.h b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngstruct.h new file mode 100644 index 0000000000..d58c028844 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngstruct.h @@ -0,0 +1,489 @@ + +/* pngstruct.h - header file for PNG reference library + * + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Last changed in libpng 1.6.1 [March 28, 2013] + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* The structure that holds the information to read and write PNG files. + * The only people who need to care about what is inside of this are the + * people who will be modifying the library for their own special needs. + * It should NOT be accessed directly by an application. + */ + +#ifndef PNGSTRUCT_H +#define PNGSTRUCT_H +/* zlib.h defines the structure z_stream, an instance of which is included + * in this structure and is required for decompressing the LZ compressed + * data in PNG files. + */ +#ifndef ZLIB_CONST + /* We must ensure that zlib uses 'const' in declarations. */ +# define ZLIB_CONST +#endif +#include "zlib.h" +#ifdef const + /* zlib.h sometimes #defines const to nothing, undo this. */ +# undef const +#endif + +/* zlib.h has mediocre z_const use before 1.2.6, this stuff is for compatibility + * with older builds. + */ +#if ZLIB_VERNUM < 0x1260 +# define PNGZ_MSG_CAST(s) png_constcast(char*,s) +# define PNGZ_INPUT_CAST(b) png_constcast(png_bytep,b) +#else +# define PNGZ_MSG_CAST(s) (s) +# define PNGZ_INPUT_CAST(b) (b) +#endif + +/* zlib.h declares a magic type 'uInt' that limits the amount of data that zlib + * can handle at once. This type need be no larger than 16 bits (so maximum of + * 65535), this define allows us to discover how big it is, but limited by the + * maximuum for png_size_t. The value can be overriden in a library build + * (pngusr.h, or set it in CPPFLAGS) and it works to set it to a considerably + * lower value (e.g. 255 works). A lower value may help memory usage (slightly) + * and may even improve performance on some systems (and degrade it on others.) + */ +#ifndef ZLIB_IO_MAX +# define ZLIB_IO_MAX ((uInt)-1) +#endif + +#ifdef PNG_WRITE_SUPPORTED +/* The type of a compression buffer list used by the write code. */ +typedef struct png_compression_buffer +{ + struct png_compression_buffer *next; + png_byte output[1]; /* actually zbuf_size */ +} png_compression_buffer, *png_compression_bufferp; + +#define PNG_COMPRESSION_BUFFER_SIZE(pp)\ + (offsetof(png_compression_buffer, output) + (pp)->zbuffer_size) +#endif + +/* Colorspace support; structures used in png_struct, png_info and in internal + * functions to hold and communicate information about the color space. + * + * PNG_COLORSPACE_SUPPORTED is only required if the application will perform + * colorspace corrections, otherwise all the colorspace information can be + * skipped and the size of libpng can be reduced (significantly) by compiling + * out the colorspace support. + */ +#ifdef PNG_COLORSPACE_SUPPORTED +/* The chromaticities of the red, green and blue colorants and the chromaticity + * of the corresponding white point (i.e. of rgb(1.0,1.0,1.0)). + */ +typedef struct png_xy +{ + png_fixed_point redx, redy; + png_fixed_point greenx, greeny; + png_fixed_point bluex, bluey; + png_fixed_point whitex, whitey; +} png_xy; + +/* The same data as above but encoded as CIE XYZ values. When this data comes + * from chromaticities the sum of the Y values is assumed to be 1.0 + */ +typedef struct png_XYZ +{ + png_fixed_point red_X, red_Y, red_Z; + png_fixed_point green_X, green_Y, green_Z; + png_fixed_point blue_X, blue_Y, blue_Z; +} png_XYZ; +#endif /* COLORSPACE */ + +#if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED) +/* A colorspace is all the above plus, potentially, profile information, + * however at present libpng does not use the profile internally so it is only + * stored in the png_info struct (if iCCP is supported.) The rendering intent + * is retained here and is checked. + * + * The file gamma encoding information is also stored here and gamma correction + * is done by libpng, whereas color correction must currently be done by the + * application. + */ +typedef struct png_colorspace +{ +#ifdef PNG_GAMMA_SUPPORTED + png_fixed_point gamma; /* File gamma */ +#endif + +#ifdef PNG_COLORSPACE_SUPPORTED + png_xy end_points_xy; /* End points as chromaticities */ + png_XYZ end_points_XYZ; /* End points as CIE XYZ colorant values */ + png_uint_16 rendering_intent; /* Rendering intent of a profile */ +#endif + + /* Flags are always defined to simplify the code. */ + png_uint_16 flags; /* As defined below */ +} png_colorspace, * PNG_RESTRICT png_colorspacerp; + +typedef const png_colorspace * PNG_RESTRICT png_const_colorspacerp; + +/* General flags for the 'flags' field */ +#define PNG_COLORSPACE_HAVE_GAMMA 0x0001 +#define PNG_COLORSPACE_HAVE_ENDPOINTS 0x0002 +#define PNG_COLORSPACE_HAVE_INTENT 0x0004 +#define PNG_COLORSPACE_FROM_gAMA 0x0008 +#define PNG_COLORSPACE_FROM_cHRM 0x0010 +#define PNG_COLORSPACE_FROM_sRGB 0x0020 +#define PNG_COLORSPACE_ENDPOINTS_MATCH_sRGB 0x0040 +#define PNG_COLORSPACE_MATCHES_sRGB 0x0080 /* exact match on profile */ +#define PNG_COLORSPACE_INVALID 0x8000 +#define PNG_COLORSPACE_CANCEL(flags) (0xffff ^ (flags)) +#endif /* COLORSPACE || GAMMA */ + +struct png_struct_def +{ +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf jmp_buf_local; /* New name in 1.6.0 for jmp_buf in png_struct */ + png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */ + jmp_buf *jmp_buf_ptr; /* passed to longjmp_fn */ + size_t jmp_buf_size; /* size of the above, if allocated */ +#endif + png_error_ptr error_fn; /* function for printing errors and aborting */ +#ifdef PNG_WARNINGS_SUPPORTED + png_error_ptr warning_fn; /* function for printing warnings */ +#endif + png_voidp error_ptr; /* user supplied struct for error functions */ + png_rw_ptr write_data_fn; /* function for writing output data */ + png_rw_ptr read_data_fn; /* function for reading input data */ + png_voidp io_ptr; /* ptr to application struct for I/O functions */ + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr read_user_transform_fn; /* user read transform */ +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr write_user_transform_fn; /* user write transform */ +#endif + +/* These were added in libpng-1.0.2 */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + png_voidp user_transform_ptr; /* user supplied struct for user transform */ + png_byte user_transform_depth; /* bit depth of user transformed pixels */ + png_byte user_transform_channels; /* channels in user transformed pixels */ +#endif +#endif + + png_uint_32 mode; /* tells us where we are in the PNG file */ + png_uint_32 flags; /* flags indicating various things to libpng */ + png_uint_32 transformations; /* which transformations to perform */ + + png_uint_32 zowner; /* ID (chunk type) of zstream owner, 0 if none */ + z_stream zstream; /* decompression structure */ + +#ifdef PNG_WRITE_SUPPORTED + png_compression_bufferp zbuffer_list; /* Created on demand during write */ + uInt zbuffer_size; /* size of the actual buffer */ + + int zlib_level; /* holds zlib compression level */ + int zlib_method; /* holds zlib compression method */ + int zlib_window_bits; /* holds zlib compression window bits */ + int zlib_mem_level; /* holds zlib compression memory level */ + int zlib_strategy; /* holds zlib compression strategy */ +#endif +/* Added at libpng 1.5.4 */ +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED + int zlib_text_level; /* holds zlib compression level */ + int zlib_text_method; /* holds zlib compression method */ + int zlib_text_window_bits; /* holds zlib compression window bits */ + int zlib_text_mem_level; /* holds zlib compression memory level */ + int zlib_text_strategy; /* holds zlib compression strategy */ +#endif +/* End of material added at libpng 1.5.4 */ +/* Added at libpng 1.6.0 */ +#ifdef PNG_WRITE_SUPPORTED + int zlib_set_level; /* Actual values set into the zstream on write */ + int zlib_set_method; + int zlib_set_window_bits; + int zlib_set_mem_level; + int zlib_set_strategy; +#endif + + png_uint_32 width; /* width of image in pixels */ + png_uint_32 height; /* height of image in pixels */ + png_uint_32 num_rows; /* number of rows in current pass */ + png_uint_32 usr_width; /* width of row at start of write */ + png_size_t rowbytes; /* size of row in bytes */ + png_uint_32 iwidth; /* width of current interlaced row in pixels */ + png_uint_32 row_number; /* current row in interlace pass */ + png_uint_32 chunk_name; /* PNG_CHUNK() id of current chunk */ + png_bytep prev_row; /* buffer to save previous (unfiltered) row. + * This is a pointer into big_prev_row + */ + png_bytep row_buf; /* buffer to save current (unfiltered) row. + * This is a pointer into big_row_buf + */ +#ifdef PNG_WRITE_SUPPORTED + png_bytep sub_row; /* buffer to save "sub" row when filtering */ + png_bytep up_row; /* buffer to save "up" row when filtering */ + png_bytep avg_row; /* buffer to save "avg" row when filtering */ + png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ +#endif + png_size_t info_rowbytes; /* Added in 1.5.4: cache of updated row bytes */ + + png_uint_32 idat_size; /* current IDAT size for read */ + png_uint_32 crc; /* current chunk CRC value */ + png_colorp palette; /* palette from the input file */ + png_uint_16 num_palette; /* number of color entries in palette */ + +/* Added at libpng-1.5.10 */ +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED + int num_palette_max; /* maximum palette index found in IDAT */ +#endif + + png_uint_16 num_trans; /* number of transparency values */ + png_byte compression; /* file compression type (always 0) */ + png_byte filter; /* file filter type (always 0) */ + png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + png_byte pass; /* current interlace pass (0 - 6) */ + png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */ + png_byte color_type; /* color type of file */ + png_byte bit_depth; /* bit depth of file */ + png_byte usr_bit_depth; /* bit depth of users row: write only */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte channels; /* number of channels in file */ +#ifdef PNG_WRITE_SUPPORTED + png_byte usr_channels; /* channels at start of write: write only */ +#endif + png_byte sig_bytes; /* magic bytes read/written from start of file */ + png_byte maximum_pixel_depth; + /* pixel depth used for the row buffers */ + png_byte transformed_pixel_depth; + /* pixel depth after read/write transforms */ +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) + png_uint_16 filler; /* filler bytes for pixel expansion */ +#endif + +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) + png_byte background_gamma_type; + png_fixed_point background_gamma; + png_color_16 background; /* background color in screen gamma space */ +#ifdef PNG_READ_GAMMA_SUPPORTED + png_color_16 background_1; /* background normalized to gamma 1.0 */ +#endif +#endif /* PNG_bKGD_SUPPORTED */ + +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_flush_ptr output_flush_fn; /* Function for flushing output */ + png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ + png_uint_32 flush_rows; /* number of rows written since last flush */ +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED + int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */ + png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */ + + png_bytep gamma_table; /* gamma table for 8-bit depth files */ + png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */ +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + png_bytep gamma_from_1; /* converts from 1.0 to screen */ + png_bytep gamma_to_1; /* converts from file to 1.0 */ + png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */ + png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */ +#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) + png_color_8 sig_bit; /* significant bits in each available channel */ +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) + png_color_8 shift; /* shift for significant bit tranformation */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ + || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep trans_alpha; /* alpha values for paletted files */ + png_color_16 trans_color; /* transparent color for non-paletted files */ +#endif + + png_read_status_ptr read_row_fn; /* called after each row is decoded */ + png_write_status_ptr write_row_fn; /* called after each row is encoded */ +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + png_progressive_info_ptr info_fn; /* called after header data fully read */ + png_progressive_row_ptr row_fn; /* called after a prog. row is decoded */ + png_progressive_end_ptr end_fn; /* called after image is complete */ + png_bytep save_buffer_ptr; /* current location in save_buffer */ + png_bytep save_buffer; /* buffer for previously read data */ + png_bytep current_buffer_ptr; /* current location in current_buffer */ + png_bytep current_buffer; /* buffer for recently used data */ + png_uint_32 push_length; /* size of current input chunk */ + png_uint_32 skip_length; /* bytes to skip in input data */ + png_size_t save_buffer_size; /* amount of data now in save_buffer */ + png_size_t save_buffer_max; /* total size of save_buffer */ + png_size_t buffer_size; /* total amount of available input data */ + png_size_t current_buffer_size; /* amount of data now in current_buffer */ + int process_mode; /* what push library is currently doing */ + int cur_palette; /* current push library palette index */ + +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) +/* For the Borland special 64K segment handler */ + png_bytepp offset_table_ptr; + png_bytep offset_table; + png_uint_16 offset_table_number; + png_uint_16 offset_table_count; + png_uint_16 offset_table_count_free; +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + png_bytep palette_lookup; /* lookup table for quantizing */ + png_bytep quantize_index; /* index translation for palette files */ +#endif + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + png_byte heuristic_method; /* heuristic for row filter selection */ + png_byte num_prev_filters; /* number of weights for previous rows */ + png_bytep prev_filters; /* filter type(s) of previous row(s) */ + png_uint_16p filter_weights; /* weight(s) for previous line(s) */ + png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */ + png_uint_16p filter_costs; /* relative filter calculation cost */ + png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ +#endif + + /* Options */ +#ifdef PNG_SET_OPTION_SUPPORTED + png_byte options; /* On/off state (up to 4 options) */ +#endif + +#if PNG_LIBPNG_VER < 10700 +/* To do: remove this from libpng-1.7 */ +#ifdef PNG_TIME_RFC1123_SUPPORTED + char time_buffer[29]; /* String to hold RFC 1123 time text */ +#endif +#endif + +/* New members added in libpng-1.0.6 */ + + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#ifdef PNG_USER_CHUNKS_SUPPORTED + png_voidp user_chunk_ptr; +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED + png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ +#endif +#endif + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + int unknown_default; /* As PNG_HANDLE_* */ + unsigned int num_chunk_list; /* Number of entries in the list */ + png_bytep chunk_list; /* List of png_byte[5]; the textual chunk name + * followed by a PNG_HANDLE_* byte */ +#endif + +/* New members added in libpng-1.0.3 */ +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + png_byte rgb_to_gray_status; + /* Added in libpng 1.5.5 to record setting of coefficients: */ + png_byte rgb_to_gray_coefficients_set; + /* These were changed from png_byte in libpng-1.0.6 */ + png_uint_16 rgb_to_gray_red_coeff; + png_uint_16 rgb_to_gray_green_coeff; + /* deleted in 1.5.5: rgb_to_gray_blue_coeff; */ +#endif + +/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ +#if defined(PNG_MNG_FEATURES_SUPPORTED) +/* Changed from png_byte to png_uint_32 at version 1.2.0 */ + png_uint_32 mng_features_permitted; +#endif + +/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_byte filter_type; +#endif + +/* New members added in libpng-1.2.0 */ + +/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ +#ifdef PNG_USER_MEM_SUPPORTED + png_voidp mem_ptr; /* user supplied struct for mem functions */ + png_malloc_ptr malloc_fn; /* function for allocating memory */ + png_free_ptr free_fn; /* function for freeing memory */ +#endif + +/* New member added in libpng-1.0.13 and 1.2.0 */ + png_bytep big_row_buf; /* buffer to save current (unfiltered) row */ + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* The following three members were added at version 1.0.14 and 1.2.4 */ + png_bytep quantize_sort; /* working sort array */ + png_bytep index_to_palette; /* where the original index currently is + in the palette */ + png_bytep palette_to_index; /* which original index points to this + palette color */ +#endif + +/* New members added in libpng-1.0.16 and 1.2.6 */ + png_byte compression_type; + +#ifdef PNG_USER_LIMITS_SUPPORTED + png_uint_32 user_width_max; + png_uint_32 user_height_max; + + /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown + * chunks that can be stored (0 means unlimited). + */ + png_uint_32 user_chunk_cache_max; + + /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk + * can occupy when decompressed. 0 means unlimited. + */ + png_alloc_size_t user_chunk_malloc_max; +#endif + +/* New member added in libpng-1.0.25 and 1.2.17 */ +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED + /* Temporary storage for unknown chunk that the library doesn't recognize, + * used while reading the chunk. + */ + png_unknown_chunk unknown_chunk; +#endif + +/* New member added in libpng-1.2.26 */ + png_size_t old_big_row_buf_size; + +#ifdef PNG_READ_SUPPORTED +/* New member added in libpng-1.2.30 */ + png_bytep read_buffer; /* buffer for reading chunk data */ + png_alloc_size_t read_buffer_size; /* current size of the buffer */ +#endif +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED + uInt IDAT_read_size; /* limit on read buffer size for IDAT */ +#endif + +#ifdef PNG_IO_STATE_SUPPORTED +/* New member added in libpng-1.4.0 */ + png_uint_32 io_state; +#endif + +/* New member added in libpng-1.5.6 */ + png_bytep big_prev_row; + +/* New member added in libpng-1.5.7 */ + void (*read_filter[PNG_FILTER_VALUE_LAST-1])(png_row_infop row_info, + png_bytep row, png_const_bytep prev_row); + +#ifdef PNG_READ_SUPPORTED +#if defined(PNG_COLORSPACE_SUPPORTED) || defined(PNG_GAMMA_SUPPORTED) + png_colorspace colorspace; +#endif +#endif +}; +#endif /* PNGSTRUCT_H */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngtest.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngtest.c new file mode 100644 index 0000000000..144f2db35d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngtest.c @@ -0,0 +1,1971 @@ + +/* pngtest.c - a simple test program to test libpng + * + * Last changed in libpng 1.6.2 [April 25, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This program reads in a PNG image, writes it out again, and then + * compares the two files. If the files are identical, this shows that + * the basic chunk handling, filtering, and (de)compression code is working + * properly. It does not currently test all of the transforms, although + * it probably should. + * + * The program will report "FAIL" in certain legitimate cases: + * 1) when the compression level or filter selection method is changed. + * 2) when the maximum IDAT size (PNG_ZBUF_SIZE in pngconf.h) is not 8192. + * 3) unknown unsafe-to-copy ancillary chunks or unknown critical chunks + * exist in the input file. + * 4) others not listed here... + * In these cases, it is best to check with another tool such as "pngcheck" + * to see what the differences between the two files are. + * + * If a filename is given on the command-line, then this file is used + * for the input, rather than the default "pngtest.png". This allows + * testing a wide variety of files easily. You can also test a number + * of files at once by typing "pngtest -m file1.png file2.png ..." + */ + +#define _POSIX_SOURCE 1 + +#include +#include +#include + +/* Defined so I can write to a file on gui/windowing platforms */ +/* #define STDERR stderr */ +#define STDERR stdout /* For DOS */ + +#include "png.h" + +/* Known chunks that exist in pngtest.png must be supported or pngtest will fail + * simply as a result of re-ordering them. This may be fixed in 1.7 + */ +#if defined PNG_READ_SUPPORTED && /* else nothing can be done */\ + defined PNG_READ_bKGD_SUPPORTED &&\ + defined PNG_READ_cHRM_SUPPORTED &&\ + defined PNG_READ_gAMA_SUPPORTED &&\ + defined PNG_READ_oFFs_SUPPORTED &&\ + defined PNG_READ_pCAL_SUPPORTED &&\ + defined PNG_READ_pHYs_SUPPORTED &&\ + defined PNG_READ_sBIT_SUPPORTED &&\ + defined PNG_READ_sCAL_SUPPORTED &&\ + defined PNG_READ_sRGB_SUPPORTED &&\ + defined PNG_READ_tEXt_SUPPORTED &&\ + defined PNG_READ_tIME_SUPPORTED &&\ + defined PNG_READ_zTXt_SUPPORTED + +#include "zlib.h" +/* Copied from pngpriv.h but only used in error messages below. */ +#ifndef PNG_ZBUF_SIZE +# define PNG_ZBUF_SIZE 8192 +#endif +#define FCLOSE(file) fclose(file) + +#ifndef PNG_STDIO_SUPPORTED +typedef FILE * png_FILE_p; +#endif + +/* Makes pngtest verbose so we can find problems. */ +#ifndef PNG_DEBUG +# define PNG_DEBUG 0 +#endif + +#if PNG_DEBUG > 1 +# define pngtest_debug(m) ((void)fprintf(stderr, m "\n")) +# define pngtest_debug1(m,p1) ((void)fprintf(stderr, m "\n", p1)) +# define pngtest_debug2(m,p1,p2) ((void)fprintf(stderr, m "\n", p1, p2)) +#else +# define pngtest_debug(m) ((void)0) +# define pngtest_debug1(m,p1) ((void)0) +# define pngtest_debug2(m,p1,p2) ((void)0) +#endif + +#if !PNG_DEBUG +# define SINGLE_ROWBUF_ALLOC /* Makes buffer overruns easier to nail */ +#endif + +/* Turn on CPU timing +#define PNGTEST_TIMING +*/ + +#ifndef PNG_FLOATING_POINT_SUPPORTED +#undef PNGTEST_TIMING +#endif + +#ifdef PNGTEST_TIMING +static float t_start, t_stop, t_decode, t_encode, t_misc; +#include +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED +#define PNG_tIME_STRING_LENGTH 29 +static int tIME_chunk_present = 0; +static char tIME_string[PNG_tIME_STRING_LENGTH] = "tIME chunk is not present"; +#endif + +static int verbose = 0; +static int strict = 0; +static int relaxed = 0; +static int unsupported_chunks = 0; /* chunk unsupported by libpng in input */ +static int error_count = 0; /* count calls to png_error */ +static int warning_count = 0; /* count calls to png_warning */ + +#ifdef __TURBOC__ +#include +#endif + +/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */ +#ifndef png_jmpbuf +# define png_jmpbuf(png_ptr) png_ptr->jmpbuf +#endif + +/* Defines for unknown chunk handling if required. */ +#ifndef PNG_HANDLE_CHUNK_ALWAYS +# define PNG_HANDLE_CHUNK_ALWAYS 3 +#endif +#ifndef PNG_HANDLE_CHUNK_IF_SAFE +# define PNG_HANDLE_CHUNK_IF_SAFE 2 +#endif + +/* Utility to save typing/errors, the argument must be a name */ +#define MEMZERO(var) ((void)memset(&var, 0, sizeof var)) + +/* Example of using row callbacks to make a simple progress meter */ +static int status_pass = 1; +static int status_dots_requested = 0; +static int status_dots = 1; + +static void PNGCBAPI +read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) +{ + if (png_ptr == NULL || row_number > PNG_UINT_31_MAX) + return; + + if (status_pass != pass) + { + fprintf(stdout, "\n Pass %d: ", pass); + status_pass = pass; + status_dots = 31; + } + + status_dots--; + + if (status_dots == 0) + { + fprintf(stdout, "\n "); + status_dots=30; + } + + fprintf(stdout, "r"); +} + +#ifdef PNG_WRITE_SUPPORTED +static void PNGCBAPI +write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) +{ + if (png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7) + return; + + fprintf(stdout, "w"); +} +#endif + + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED +/* Example of using user transform callback (we don't transform anything, + * but merely examine the row filters. We set this to 256 rather than + * 5 in case illegal filter values are present.) + */ +static png_uint_32 filters_used[256]; +static void PNGCBAPI +count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data) +{ + if (png_ptr != NULL && row_info != NULL) + ++filters_used[*(data - 1)]; +} +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED +/* Example of using user transform callback (we don't transform anything, + * but merely count the zero samples) + */ + +static png_uint_32 zero_samples; + +static void PNGCBAPI +count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) +{ + png_bytep dp = data; + if (png_ptr == NULL) + return; + + /* Contents of row_info: + * png_uint_32 width width of row + * png_uint_32 rowbytes number of bytes in row + * png_byte color_type color type of pixels + * png_byte bit_depth bit depth of samples + * png_byte channels number of channels (1-4) + * png_byte pixel_depth bits per pixel (depth*channels) + */ + + /* Counts the number of zero samples (or zero pixels if color_type is 3 */ + + if (row_info->color_type == 0 || row_info->color_type == 3) + { + int pos = 0; + png_uint_32 n, nstop; + + for (n = 0, nstop=row_info->width; nbit_depth == 1) + { + if (((*dp << pos++ ) & 0x80) == 0) + zero_samples++; + + if (pos == 8) + { + pos = 0; + dp++; + } + } + + if (row_info->bit_depth == 2) + { + if (((*dp << (pos+=2)) & 0xc0) == 0) + zero_samples++; + + if (pos == 8) + { + pos = 0; + dp++; + } + } + + if (row_info->bit_depth == 4) + { + if (((*dp << (pos+=4)) & 0xf0) == 0) + zero_samples++; + + if (pos == 8) + { + pos = 0; + dp++; + } + } + + if (row_info->bit_depth == 8) + if (*dp++ == 0) + zero_samples++; + + if (row_info->bit_depth == 16) + { + if ((*dp | *(dp+1)) == 0) + zero_samples++; + dp+=2; + } + } + } + else /* Other color types */ + { + png_uint_32 n, nstop; + int channel; + int color_channels = row_info->channels; + if (row_info->color_type > 3)color_channels--; + + for (n = 0, nstop=row_info->width; nbit_depth == 8) + if (*dp++ == 0) + zero_samples++; + + if (row_info->bit_depth == 16) + { + if ((*dp | *(dp+1)) == 0) + zero_samples++; + + dp+=2; + } + } + if (row_info->color_type > 3) + { + dp++; + if (row_info->bit_depth == 16) + dp++; + } + } + } +} +#endif /* PNG_WRITE_USER_TRANSFORM_SUPPORTED */ + +#ifndef PNG_STDIO_SUPPORTED +/* START of code to validate stdio-free compilation */ +/* These copies of the default read/write functions come from pngrio.c and + * pngwio.c. They allow "don't include stdio" testing of the library. + * This is the function that does the actual reading of data. If you are + * not reading from a standard C stream, you should create a replacement + * read_data function and use it at run time with png_set_read_fn(), rather + * than changing the library. + */ + +#ifdef PNG_IO_STATE_SUPPORTED +void +pngtest_check_io_state(png_structp png_ptr, png_size_t data_length, + png_uint_32 io_op); +void +pngtest_check_io_state(png_structp png_ptr, png_size_t data_length, + png_uint_32 io_op) +{ + png_uint_32 io_state = png_get_io_state(png_ptr); + int err = 0; + + /* Check if the current operation (reading / writing) is as expected. */ + if ((io_state & PNG_IO_MASK_OP) != io_op) + png_error(png_ptr, "Incorrect operation in I/O state"); + + /* Check if the buffer size specific to the current location + * (file signature / header / data / crc) is as expected. + */ + switch (io_state & PNG_IO_MASK_LOC) + { + case PNG_IO_SIGNATURE: + if (data_length > 8) + err = 1; + break; + case PNG_IO_CHUNK_HDR: + if (data_length != 8) + err = 1; + break; + case PNG_IO_CHUNK_DATA: + break; /* no restrictions here */ + case PNG_IO_CHUNK_CRC: + if (data_length != 4) + err = 1; + break; + default: + err = 1; /* uninitialized */ + } + if (err) + png_error(png_ptr, "Bad I/O state or buffer size"); +} +#endif + +static void PNGCBAPI +pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_size_t check = 0; + png_voidp io_ptr; + + /* fread() returns 0 on error, so it is OK to store this in a png_size_t + * instead of an int, which is what fread() actually returns. + */ + io_ptr = png_get_io_ptr(png_ptr); + if (io_ptr != NULL) + { + check = fread(data, 1, length, (png_FILE_p)io_ptr); + } + + if (check != length) + { + png_error(png_ptr, "Read Error"); + } + +#ifdef PNG_IO_STATE_SUPPORTED + pngtest_check_io_state(png_ptr, length, PNG_IO_READING); +#endif +} + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +static void PNGCBAPI +pngtest_flush(png_structp png_ptr) +{ + /* Do nothing; fflush() is said to be just a waste of energy. */ + PNG_UNUSED(png_ptr) /* Stifle compiler warning */ +} +#endif + +/* This is the function that does the actual writing of data. If you are + * not writing to a standard C stream, you should create a replacement + * write_data function and use it at run time with png_set_write_fn(), rather + * than changing the library. + */ +static void PNGCBAPI +pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_size_t check; + + check = fwrite(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr)); + + if (check != length) + { + png_error(png_ptr, "Write Error"); + } + +#ifdef PNG_IO_STATE_SUPPORTED + pngtest_check_io_state(png_ptr, length, PNG_IO_WRITING); +#endif +} +#endif /* !PNG_STDIO_SUPPORTED */ + +/* This function is called when there is a warning, but the library thinks + * it can continue anyway. Replacement functions don't have to do anything + * here if you don't want to. In the default configuration, png_ptr is + * not used, but it is passed in case it may be useful. + */ +typedef struct +{ + PNG_CONST char *file_name; +} pngtest_error_parameters; + +static void PNGCBAPI +pngtest_warning(png_structp png_ptr, png_const_charp message) +{ + PNG_CONST char *name = "UNKNOWN (ERROR!)"; + pngtest_error_parameters *test = + (pngtest_error_parameters*)png_get_error_ptr(png_ptr); + + ++warning_count; + + if (test != NULL && test->file_name != NULL) + name = test->file_name; + + fprintf(STDERR, "%s: libpng warning: %s\n", name, message); +} + +/* This is the default error handling function. Note that replacements for + * this function MUST NOT RETURN, or the program will likely crash. This + * function is used by default, or if the program supplies NULL for the + * error function pointer in png_set_error_fn(). + */ +static void PNGCBAPI +pngtest_error(png_structp png_ptr, png_const_charp message) +{ + ++error_count; + + pngtest_warning(png_ptr, message); + /* We can return because png_error calls the default handler, which is + * actually OK in this case. + */ +} + +/* END of code to validate stdio-free compilation */ + +/* START of code to validate memory allocation and deallocation */ +#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG + +/* Allocate memory. For reasonable files, size should never exceed + * 64K. However, zlib may allocate more then 64K if you don't tell + * it not to. See zconf.h and png.h for more information. zlib does + * need to allocate exactly 64K, so whatever you call here must + * have the ability to do that. + * + * This piece of code can be compiled to validate max 64K allocations + * by setting MAXSEG_64K in zlib zconf.h *or* PNG_MAX_MALLOC_64K. + */ +typedef struct memory_information +{ + png_alloc_size_t size; + png_voidp pointer; + struct memory_information *next; +} memory_information; +typedef memory_information *memory_infop; + +static memory_infop pinformation = NULL; +static int current_allocation = 0; +static int maximum_allocation = 0; +static int total_allocation = 0; +static int num_allocations = 0; + +png_voidp PNGCBAPI png_debug_malloc PNGARG((png_structp png_ptr, + png_alloc_size_t size)); +void PNGCBAPI png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr)); + +png_voidp +PNGCBAPI png_debug_malloc(png_structp png_ptr, png_alloc_size_t size) +{ + + /* png_malloc has already tested for NULL; png_create_struct calls + * png_debug_malloc directly, with png_ptr == NULL which is OK + */ + + if (size == 0) + return (NULL); + + /* This calls the library allocator twice, once to get the requested + buffer and once to get a new free list entry. */ + { + /* Disable malloc_fn and free_fn */ + memory_infop pinfo; + png_set_mem_fn(png_ptr, NULL, NULL, NULL); + pinfo = (memory_infop)png_malloc(png_ptr, + (sizeof *pinfo)); + pinfo->size = size; + current_allocation += size; + total_allocation += size; + num_allocations ++; + + if (current_allocation > maximum_allocation) + maximum_allocation = current_allocation; + + pinfo->pointer = png_malloc(png_ptr, size); + /* Restore malloc_fn and free_fn */ + + png_set_mem_fn(png_ptr, + NULL, png_debug_malloc, png_debug_free); + + if (size != 0 && pinfo->pointer == NULL) + { + current_allocation -= size; + total_allocation -= size; + png_error(png_ptr, + "out of memory in pngtest->png_debug_malloc"); + } + + pinfo->next = pinformation; + pinformation = pinfo; + /* Make sure the caller isn't assuming zeroed memory. */ + memset(pinfo->pointer, 0xdd, pinfo->size); + + if (verbose) + printf("png_malloc %lu bytes at %p\n", (unsigned long)size, + pinfo->pointer); + + return (png_voidp)(pinfo->pointer); + } +} + +/* Free a pointer. It is removed from the list at the same time. */ +void PNGCBAPI +png_debug_free(png_structp png_ptr, png_voidp ptr) +{ + if (png_ptr == NULL) + fprintf(STDERR, "NULL pointer to png_debug_free.\n"); + + if (ptr == 0) + { +#if 0 /* This happens all the time. */ + fprintf(STDERR, "WARNING: freeing NULL pointer\n"); +#endif + return; + } + + /* Unlink the element from the list. */ + { + memory_infop *ppinfo = &pinformation; + + for (;;) + { + memory_infop pinfo = *ppinfo; + + if (pinfo->pointer == ptr) + { + *ppinfo = pinfo->next; + current_allocation -= pinfo->size; + if (current_allocation < 0) + fprintf(STDERR, "Duplicate free of memory\n"); + /* We must free the list element too, but first kill + the memory that is to be freed. */ + memset(ptr, 0x55, pinfo->size); + png_free_default(png_ptr, pinfo); + pinfo = NULL; + break; + } + + if (pinfo->next == NULL) + { + fprintf(STDERR, "Pointer %x not found\n", (unsigned int)ptr); + break; + } + + ppinfo = &pinfo->next; + } + } + + /* Finally free the data. */ + if (verbose) + printf("Freeing %p\n", ptr); + + png_free_default(png_ptr, ptr); + ptr = NULL; +} +#endif /* PNG_USER_MEM_SUPPORTED && PNG_DEBUG */ +/* END of code to test memory allocation/deallocation */ + + +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED +/* Demonstration of user chunk support of the sTER and vpAg chunks */ + +/* (sTER is a public chunk not yet known by libpng. vpAg is a private +chunk used in ImageMagick to store "virtual page" size). */ + +static struct user_chunk_data +{ + png_const_infop info_ptr; + png_uint_32 vpAg_width, vpAg_height; + png_byte vpAg_units; + png_byte sTER_mode; + int location[2]; +} +user_chunk_data; + +/* Used for location and order; zero means nothing. */ +#define have_sTER 0x01 +#define have_vpAg 0x02 +#define before_PLTE 0x10 +#define before_IDAT 0x20 +#define after_IDAT 0x40 + +static void +init_callback_info(png_const_infop info_ptr) +{ + MEMZERO(user_chunk_data); + user_chunk_data.info_ptr = info_ptr; +} + +static int +set_location(png_structp png_ptr, struct user_chunk_data *data, int what) +{ + int location; + + if ((data->location[0] & what) || (data->location[1] & what)) + return 0; /* already have one of these */ + + /* Find where we are (the code below zeros info_ptr to indicate that the + * chunks before the first IDAT have been read.) + */ + if (data->info_ptr == NULL) /* after IDAT */ + location = what | after_IDAT; + + else if (png_get_valid(png_ptr, data->info_ptr, PNG_INFO_PLTE)) + location = what | before_IDAT; + + else + location = what | before_PLTE; + + if (data->location[0] == 0) + data->location[0] = location; + + else + data->location[1] = location; + + return 1; /* handled */ +} + +static int PNGCBAPI read_user_chunk_callback(png_struct *png_ptr, + png_unknown_chunkp chunk) +{ + struct user_chunk_data *my_user_chunk_data = + (struct user_chunk_data*)png_get_user_chunk_ptr(png_ptr); + + if (my_user_chunk_data == NULL) + png_error(png_ptr, "lost user chunk pointer"); + + /* Return one of the following: + * return (-n); chunk had an error + * return (0); did not recognize + * return (n); success + * + * The unknown chunk structure contains the chunk data: + * png_byte name[5]; + * png_byte *data; + * png_size_t size; + * + * Note that libpng has already taken care of the CRC handling. + */ + + if (chunk->name[0] == 115 && chunk->name[1] == 84 && /* s T */ + chunk->name[2] == 69 && chunk->name[3] == 82) /* E R */ + { + /* Found sTER chunk */ + if (chunk->size != 1) + return (-1); /* Error return */ + + if (chunk->data[0] != 0 && chunk->data[0] != 1) + return (-1); /* Invalid mode */ + + if (set_location(png_ptr, my_user_chunk_data, have_sTER)) + { + my_user_chunk_data->sTER_mode=chunk->data[0]; + return (1); + } + + else + return (0); /* duplicate sTER - give it to libpng */ + } + + if (chunk->name[0] != 118 || chunk->name[1] != 112 || /* v p */ + chunk->name[2] != 65 || chunk->name[3] != 103) /* A g */ + return (0); /* Did not recognize */ + + /* Found ImageMagick vpAg chunk */ + + if (chunk->size != 9) + return (-1); /* Error return */ + + if (!set_location(png_ptr, my_user_chunk_data, have_vpAg)) + return (0); /* duplicate vpAg */ + + my_user_chunk_data->vpAg_width = png_get_uint_31(png_ptr, chunk->data); + my_user_chunk_data->vpAg_height = png_get_uint_31(png_ptr, chunk->data + 4); + my_user_chunk_data->vpAg_units = chunk->data[8]; + + return (1); +} + +#ifdef PNG_WRITE_SUPPORTED +static void +write_sTER_chunk(png_structp write_ptr) +{ + png_byte png_sTER[5] = {115, 84, 69, 82, '\0'}; + + if (verbose) + fprintf(STDERR, "\n stereo mode = %d\n", user_chunk_data.sTER_mode); + + png_write_chunk(write_ptr, png_sTER, &user_chunk_data.sTER_mode, 1); +} + +static void +write_vpAg_chunk(png_structp write_ptr) +{ + png_byte png_vpAg[5] = {118, 112, 65, 103, '\0'}; + + png_byte vpag_chunk_data[9]; + + if (verbose) + fprintf(STDERR, " vpAg = %lu x %lu, units = %d\n", + (unsigned long)user_chunk_data.vpAg_width, + (unsigned long)user_chunk_data.vpAg_height, + user_chunk_data.vpAg_units); + + png_save_uint_32(vpag_chunk_data, user_chunk_data.vpAg_width); + png_save_uint_32(vpag_chunk_data + 4, user_chunk_data.vpAg_height); + vpag_chunk_data[8] = user_chunk_data.vpAg_units; + png_write_chunk(write_ptr, png_vpAg, vpag_chunk_data, 9); +} + +static void +write_chunks(png_structp write_ptr, int location) +{ + int i; + + /* Notice that this preserves the original chunk order, however chunks + * intercepted by the callback will be written *after* chunks passed to + * libpng. This will actually reverse a pair of sTER chunks or a pair of + * vpAg chunks, resulting in an error later. This is not worth worrying + * about - the chunks should not be duplicated! + */ + for (i=0; i<2; ++i) + { + if (user_chunk_data.location[i] == (location | have_sTER)) + write_sTER_chunk(write_ptr); + + else if (user_chunk_data.location[i] == (location | have_vpAg)) + write_vpAg_chunk(write_ptr); + } +} +#endif /* PNG_WRITE_SUPPORTED */ +#else /* !PNG_READ_USER_CHUNKS_SUPPORTED */ +# define write_chunks(pp,loc) ((void)0) +#endif +/* END of code to demonstrate user chunk support */ + +/* START of code to check that libpng has the required text support; this only + * checks for the write support because if read support is missing the chunk + * will simply not be reported back to pngtest. + */ +#ifdef PNG_TEXT_SUPPORTED +static void +pngtest_check_text_support(png_const_structp png_ptr, png_textp text_ptr, + int num_text) +{ + while (num_text > 0) + { + switch (text_ptr[--num_text].compression) + { + case PNG_TEXT_COMPRESSION_NONE: + break; + + case PNG_TEXT_COMPRESSION_zTXt: +# ifndef PNG_WRITE_zTXt_SUPPORTED + ++unsupported_chunks; +# endif + break; + + case PNG_ITXT_COMPRESSION_NONE: + case PNG_ITXT_COMPRESSION_zTXt: +# ifndef PNG_WRITE_iTXt_SUPPORTED + ++unsupported_chunks; +# endif + break; + + default: + /* This is an error */ + png_error(png_ptr, "invalid text chunk compression field"); + break; + } + } +} +#endif +/* END of code to check that libpng has the required text support */ + +/* Test one file */ +static int +test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) +{ + static png_FILE_p fpin; + static png_FILE_p fpout; /* "static" prevents setjmp corruption */ + pngtest_error_parameters error_parameters; + png_structp read_ptr; + png_infop read_info_ptr, end_info_ptr; +#ifdef PNG_WRITE_SUPPORTED + png_structp write_ptr; + png_infop write_info_ptr; + png_infop write_end_info_ptr; +#else + png_structp write_ptr = NULL; + png_infop write_info_ptr = NULL; + png_infop write_end_info_ptr = NULL; +#endif + png_bytep row_buf; + png_uint_32 y; + png_uint_32 width, height; + int num_pass, pass; + int bit_depth, color_type; + + row_buf = NULL; + error_parameters.file_name = inname; + + if ((fpin = fopen(inname, "rb")) == NULL) + { + fprintf(STDERR, "Could not find input file %s\n", inname); + return (1); + } + + if ((fpout = fopen(outname, "wb")) == NULL) + { + fprintf(STDERR, "Could not open output file %s\n", outname); + FCLOSE(fpin); + return (1); + } + + pngtest_debug("Allocating read and write structures"); +#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG + read_ptr = + png_create_read_struct_2(PNG_LIBPNG_VER_STRING, NULL, + NULL, NULL, NULL, png_debug_malloc, png_debug_free); +#else + read_ptr = + png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); +#endif + png_set_error_fn(read_ptr, &error_parameters, pngtest_error, + pngtest_warning); + +#ifdef PNG_WRITE_SUPPORTED +#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG + write_ptr = + png_create_write_struct_2(PNG_LIBPNG_VER_STRING, NULL, + NULL, NULL, NULL, png_debug_malloc, png_debug_free); +#else + write_ptr = + png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); +#endif + png_set_error_fn(write_ptr, &error_parameters, pngtest_error, + pngtest_warning); +#endif + pngtest_debug("Allocating read_info, write_info and end_info structures"); + read_info_ptr = png_create_info_struct(read_ptr); + end_info_ptr = png_create_info_struct(read_ptr); +#ifdef PNG_WRITE_SUPPORTED + write_info_ptr = png_create_info_struct(write_ptr); + write_end_info_ptr = png_create_info_struct(write_ptr); +#endif + +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED + init_callback_info(read_info_ptr); + png_set_read_user_chunk_fn(read_ptr, &user_chunk_data, + read_user_chunk_callback); +#endif + +#ifdef PNG_SETJMP_SUPPORTED + pngtest_debug("Setting jmpbuf for read struct"); + if (setjmp(png_jmpbuf(read_ptr))) + { + fprintf(STDERR, "%s -> %s: libpng read error\n", inname, outname); + png_free(read_ptr, row_buf); + row_buf = NULL; + png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); +#ifdef PNG_WRITE_SUPPORTED + png_destroy_info_struct(write_ptr, &write_end_info_ptr); + png_destroy_write_struct(&write_ptr, &write_info_ptr); +#endif + FCLOSE(fpin); + FCLOSE(fpout); + return (1); + } + +#ifdef PNG_WRITE_SUPPORTED + pngtest_debug("Setting jmpbuf for write struct"); + + if (setjmp(png_jmpbuf(write_ptr))) + { + fprintf(STDERR, "%s -> %s: libpng write error\n", inname, outname); + png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); + png_destroy_info_struct(write_ptr, &write_end_info_ptr); +#ifdef PNG_WRITE_SUPPORTED + png_destroy_write_struct(&write_ptr, &write_info_ptr); +#endif + FCLOSE(fpin); + FCLOSE(fpout); + return (1); + } +#endif +#endif + + if (strict) + { + /* Treat png_benign_error() as errors on read */ + png_set_benign_errors(read_ptr, 0); + +#ifdef PNG_WRITE_SUPPORTED + /* Treat them as errors on write */ + png_set_benign_errors(write_ptr, 0); +#endif + + /* if strict is not set, then app warnings and errors are treated as + * warnings in release builds, but not in unstable builds; this can be + * changed with '--relaxed'. + */ + } + + else if (relaxed) + { + /* Allow application (pngtest) errors and warnings to pass */ + png_set_benign_errors(read_ptr, 1); + +#ifdef PNG_WRITE_SUPPORTED + png_set_benign_errors(write_ptr, 1); +#endif + } + + pngtest_debug("Initializing input and output streams"); +#ifdef PNG_STDIO_SUPPORTED + png_init_io(read_ptr, fpin); +# ifdef PNG_WRITE_SUPPORTED + png_init_io(write_ptr, fpout); +# endif +#else + png_set_read_fn(read_ptr, (png_voidp)fpin, pngtest_read_data); +# ifdef PNG_WRITE_SUPPORTED + png_set_write_fn(write_ptr, (png_voidp)fpout, pngtest_write_data, +# ifdef PNG_WRITE_FLUSH_SUPPORTED + pngtest_flush); +# else + NULL); +# endif +# endif +#endif + + if (status_dots_requested == 1) + { +#ifdef PNG_WRITE_SUPPORTED + png_set_write_status_fn(write_ptr, write_row_callback); +#endif + png_set_read_status_fn(read_ptr, read_row_callback); + } + + else + { +#ifdef PNG_WRITE_SUPPORTED + png_set_write_status_fn(write_ptr, NULL); +#endif + png_set_read_status_fn(read_ptr, NULL); + } + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + { + int i; + + for (i = 0; i<256; i++) + filters_used[i] = 0; + + png_set_read_user_transform_fn(read_ptr, count_filters); + } +#endif +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + zero_samples = 0; + png_set_write_user_transform_fn(write_ptr, count_zero_samples); +#endif + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + /* Preserve all the unknown chunks, if possible. If this is disabled then, + * even if the png_{get,set}_unknown_chunks stuff is enabled, we can't use + * libpng to *save* the unknown chunks on read (because we can't switch the + * save option on!) + * + * Notice that if SET_UNKNOWN_CHUNKS is *not* supported read will discard all + * unknown chunks and write will write them all. + */ +#ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED + png_set_keep_unknown_chunks(read_ptr, PNG_HANDLE_CHUNK_ALWAYS, + NULL, 0); +#endif +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED + png_set_keep_unknown_chunks(write_ptr, PNG_HANDLE_CHUNK_ALWAYS, + NULL, 0); +#endif +#endif + + pngtest_debug("Reading info struct"); + png_read_info(read_ptr, read_info_ptr); + +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED + /* This is a bit of a hack; there is no obvious way in the callback function + * to determine that the chunks before the first IDAT have been read, so + * remove the info_ptr (which is only used to determine position relative to + * PLTE) here to indicate that we are after the IDAT. + */ + user_chunk_data.info_ptr = NULL; +#endif + + pngtest_debug("Transferring info struct"); + { + int interlace_type, compression_type, filter_type; + + if (png_get_IHDR(read_ptr, read_info_ptr, &width, &height, &bit_depth, + &color_type, &interlace_type, &compression_type, &filter_type)) + { + png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth, +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + color_type, interlace_type, compression_type, filter_type); +#else + color_type, PNG_INTERLACE_NONE, compression_type, filter_type); +#endif + } + } +#ifdef PNG_FIXED_POINT_SUPPORTED +#ifdef PNG_cHRM_SUPPORTED + { + png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x, + blue_y; + + if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, + &red_x, &red_y, &green_x, &green_y, &blue_x, &blue_y)) + { + png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x, + red_y, green_x, green_y, blue_x, blue_y); + } + } +#endif +#ifdef PNG_gAMA_SUPPORTED + { + png_fixed_point gamma; + + if (png_get_gAMA_fixed(read_ptr, read_info_ptr, &gamma)) + png_set_gAMA_fixed(write_ptr, write_info_ptr, gamma); + } +#endif +#else /* Use floating point versions */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +#ifdef PNG_cHRM_SUPPORTED + { + double white_x, white_y, red_x, red_y, green_x, green_y, blue_x, + blue_y; + + if (png_get_cHRM(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, + &red_y, &green_x, &green_y, &blue_x, &blue_y)) + { + png_set_cHRM(write_ptr, write_info_ptr, white_x, white_y, red_x, + red_y, green_x, green_y, blue_x, blue_y); + } + } +#endif +#ifdef PNG_gAMA_SUPPORTED + { + double gamma; + + if (png_get_gAMA(read_ptr, read_info_ptr, &gamma)) + png_set_gAMA(write_ptr, write_info_ptr, gamma); + } +#endif +#endif /* Floating point */ +#endif /* Fixed point */ +#ifdef PNG_iCCP_SUPPORTED + { + png_charp name; + png_bytep profile; + png_uint_32 proflen; + int compression_type; + + if (png_get_iCCP(read_ptr, read_info_ptr, &name, &compression_type, + &profile, &proflen)) + { + png_set_iCCP(write_ptr, write_info_ptr, name, compression_type, + profile, proflen); + } + } +#endif +#ifdef PNG_sRGB_SUPPORTED + { + int intent; + + if (png_get_sRGB(read_ptr, read_info_ptr, &intent)) + png_set_sRGB(write_ptr, write_info_ptr, intent); + } +#endif + { + png_colorp palette; + int num_palette; + + if (png_get_PLTE(read_ptr, read_info_ptr, &palette, &num_palette)) + png_set_PLTE(write_ptr, write_info_ptr, palette, num_palette); + } +#ifdef PNG_bKGD_SUPPORTED + { + png_color_16p background; + + if (png_get_bKGD(read_ptr, read_info_ptr, &background)) + { + png_set_bKGD(write_ptr, write_info_ptr, background); + } + } +#endif +#ifdef PNG_hIST_SUPPORTED + { + png_uint_16p hist; + + if (png_get_hIST(read_ptr, read_info_ptr, &hist)) + png_set_hIST(write_ptr, write_info_ptr, hist); + } +#endif +#ifdef PNG_oFFs_SUPPORTED + { + png_int_32 offset_x, offset_y; + int unit_type; + + if (png_get_oFFs(read_ptr, read_info_ptr, &offset_x, &offset_y, + &unit_type)) + { + png_set_oFFs(write_ptr, write_info_ptr, offset_x, offset_y, unit_type); + } + } +#endif +#ifdef PNG_pCAL_SUPPORTED + { + png_charp purpose, units; + png_charpp params; + png_int_32 X0, X1; + int type, nparams; + + if (png_get_pCAL(read_ptr, read_info_ptr, &purpose, &X0, &X1, &type, + &nparams, &units, ¶ms)) + { + png_set_pCAL(write_ptr, write_info_ptr, purpose, X0, X1, type, + nparams, units, params); + } + } +#endif +#ifdef PNG_pHYs_SUPPORTED + { + png_uint_32 res_x, res_y; + int unit_type; + + if (png_get_pHYs(read_ptr, read_info_ptr, &res_x, &res_y, &unit_type)) + png_set_pHYs(write_ptr, write_info_ptr, res_x, res_y, unit_type); + } +#endif +#ifdef PNG_sBIT_SUPPORTED + { + png_color_8p sig_bit; + + if (png_get_sBIT(read_ptr, read_info_ptr, &sig_bit)) + png_set_sBIT(write_ptr, write_info_ptr, sig_bit); + } +#endif +#ifdef PNG_sCAL_SUPPORTED +#if defined(PNG_FLOATING_POINT_SUPPORTED) && \ + defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) + { + int unit; + double scal_width, scal_height; + + if (png_get_sCAL(read_ptr, read_info_ptr, &unit, &scal_width, + &scal_height)) + { + png_set_sCAL(write_ptr, write_info_ptr, unit, scal_width, scal_height); + } + } +#else +#ifdef PNG_FIXED_POINT_SUPPORTED + { + int unit; + png_charp scal_width, scal_height; + + if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width, + &scal_height)) + { + png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, + scal_height); + } + } +#endif +#endif +#endif +#ifdef PNG_TEXT_SUPPORTED + { + png_textp text_ptr; + int num_text; + + if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0) + { + pngtest_debug1("Handling %d iTXt/tEXt/zTXt chunks", num_text); + + pngtest_check_text_support(read_ptr, text_ptr, num_text); + + if (verbose) + { + int i; + + printf("\n"); + for (i=0; igray > sample_max) || + (color_type == PNG_COLOR_TYPE_RGB && + ((int)trans_color->red > sample_max || + (int)trans_color->green > sample_max || + (int)trans_color->blue > sample_max)))) + png_set_tRNS(write_ptr, write_info_ptr, trans_alpha, num_trans, + trans_color); + } + } +#endif +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED + { + png_unknown_chunkp unknowns; + int num_unknowns = png_get_unknown_chunks(read_ptr, read_info_ptr, + &unknowns); + + if (num_unknowns) + { + png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns, + num_unknowns); +#if PNG_LIBPNG_VER < 10600 + /* Copy the locations from the read_info_ptr. The automatically + * generated locations in write_end_info_ptr are wrong prior to 1.6.0 + * because they are reset from the write pointer (removed in 1.6.0). + */ + { + int i; + for (i = 0; i < num_unknowns; i++) + png_set_unknown_chunk_location(write_ptr, write_info_ptr, i, + unknowns[i].location); + } +#endif + } + } +#endif + +#ifdef PNG_WRITE_SUPPORTED + pngtest_debug("Writing info struct"); + + /* Write the info in two steps so that if we write the 'unknown' chunks here + * they go to the correct place. + */ + png_write_info_before_PLTE(write_ptr, write_info_ptr); + + write_chunks(write_ptr, before_PLTE); /* before PLTE */ + + png_write_info(write_ptr, write_info_ptr); + + write_chunks(write_ptr, before_IDAT); /* after PLTE */ +#endif + +#ifdef SINGLE_ROWBUF_ALLOC + pngtest_debug("Allocating row buffer..."); + row_buf = (png_bytep)png_malloc(read_ptr, + png_get_rowbytes(read_ptr, read_info_ptr)); + + pngtest_debug1("\t0x%08lx", (unsigned long)row_buf); +#endif /* SINGLE_ROWBUF_ALLOC */ + pngtest_debug("Writing row data"); + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) + num_pass = png_set_interlace_handling(read_ptr); +# ifdef PNG_WRITE_SUPPORTED + png_set_interlace_handling(write_ptr); +# endif +#else + num_pass = 1; +#endif + +#ifdef PNGTEST_TIMING + t_stop = (float)clock(); + t_misc += (t_stop - t_start); + t_start = t_stop; +#endif + for (pass = 0; pass < num_pass; pass++) + { + pngtest_debug1("Writing row data for pass %d", pass); + for (y = 0; y < height; y++) + { +#ifndef SINGLE_ROWBUF_ALLOC + pngtest_debug2("Allocating row buffer (pass %d, y = %u)...", pass, y); + row_buf = (png_bytep)png_malloc(read_ptr, + png_get_rowbytes(read_ptr, read_info_ptr)); + + pngtest_debug2("\t0x%08lx (%u bytes)", (unsigned long)row_buf, + png_get_rowbytes(read_ptr, read_info_ptr)); + +#endif /* !SINGLE_ROWBUF_ALLOC */ + png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1); + +#ifdef PNG_WRITE_SUPPORTED +#ifdef PNGTEST_TIMING + t_stop = (float)clock(); + t_decode += (t_stop - t_start); + t_start = t_stop; +#endif + png_write_rows(write_ptr, (png_bytepp)&row_buf, 1); +#ifdef PNGTEST_TIMING + t_stop = (float)clock(); + t_encode += (t_stop - t_start); + t_start = t_stop; +#endif +#endif /* PNG_WRITE_SUPPORTED */ + +#ifndef SINGLE_ROWBUF_ALLOC + pngtest_debug2("Freeing row buffer (pass %d, y = %u)", pass, y); + png_free(read_ptr, row_buf); + row_buf = NULL; +#endif /* !SINGLE_ROWBUF_ALLOC */ + } + } + +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED + png_free_data(read_ptr, read_info_ptr, PNG_FREE_UNKN, -1); +#endif +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED + png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1); +#endif + + pngtest_debug("Reading and writing end_info data"); + + png_read_end(read_ptr, end_info_ptr); +#ifdef PNG_TEXT_SUPPORTED + { + png_textp text_ptr; + int num_text; + + if (png_get_text(read_ptr, end_info_ptr, &text_ptr, &num_text) > 0) + { + pngtest_debug1("Handling %d iTXt/tEXt/zTXt chunks", num_text); + + pngtest_check_text_support(read_ptr, text_ptr, num_text); + + if (verbose) + { + int i; + + printf("\n"); + for (i=0; i 0) + { + /* We don't really expect to get here because of the setjmp handling + * above, but this is safe. + */ + fprintf(STDERR, "\n %s: %d libpng errors found (%d warnings)", + inname, error_count, warning_count); + + if (strict != 0) + return (1); + } + +# ifdef PNG_WRITE_SUPPORTED + /* If there we no write support nothing was written! */ + else if (unsupported_chunks > 0) + { + fprintf(STDERR, "\n %s: unsupported chunks (%d)%s", + inname, unsupported_chunks, strict ? ": IGNORED --strict!" : ""); + } +# endif + + else if (warning_count > 0) + { + fprintf(STDERR, "\n %s: %d libpng warnings found", + inname, warning_count); + + if (strict != 0) + return (1); + } + + pngtest_debug("Opening files for comparison"); + if ((fpin = fopen(inname, "rb")) == NULL) + { + fprintf(STDERR, "Could not find file %s\n", inname); + return (1); + } + + if ((fpout = fopen(outname, "rb")) == NULL) + { + fprintf(STDERR, "Could not find file %s\n", outname); + FCLOSE(fpin); + return (1); + } + +#ifdef PNG_WRITE_SUPPORTED /* else nothing was written */ + { + int wrote_question = 0; + + for (;;) + { + png_size_t num_in, num_out; + char inbuf[256], outbuf[256]; + + + num_in = fread(inbuf, 1, sizeof inbuf, fpin); + num_out = fread(outbuf, 1, sizeof outbuf, fpout); + + if (num_in != num_out) + { + fprintf(STDERR, "\nFiles %s and %s are of a different size\n", + inname, outname); + + if (wrote_question == 0 && unsupported_chunks == 0) + { + fprintf(STDERR, + " Was %s written with the same maximum IDAT chunk size (%d bytes),", + inname, PNG_ZBUF_SIZE); + fprintf(STDERR, + "\n filtering heuristic (libpng default), compression"); + fprintf(STDERR, + " level (zlib default),\n and zlib version (%s)?\n\n", + ZLIB_VERSION); + wrote_question = 1; + } + + FCLOSE(fpin); + FCLOSE(fpout); + + if (strict != 0 && unsupported_chunks == 0) + return (1); + + else + return (0); + } + + if (!num_in) + break; + + if (memcmp(inbuf, outbuf, num_in)) + { + fprintf(STDERR, "\nFiles %s and %s are different\n", inname, + outname); + + if (wrote_question == 0 && unsupported_chunks == 0) + { + fprintf(STDERR, + " Was %s written with the same maximum IDAT chunk size (%d bytes),", + inname, PNG_ZBUF_SIZE); + fprintf(STDERR, + "\n filtering heuristic (libpng default), compression"); + fprintf(STDERR, + " level (zlib default),\n and zlib version (%s)?\n\n", + ZLIB_VERSION); + wrote_question = 1; + } + + FCLOSE(fpin); + FCLOSE(fpout); + + /* NOTE: the unsupported_chunks escape is permitted here because + * unsupported text chunk compression will result in the compression + * mode being changed (to NONE) yet, in the test case, the result + * can be exactly the same size! + */ + if (strict != 0 && unsupported_chunks == 0) + return (1); + + else + return (0); + } + } + } +#endif /* PNG_WRITE_SUPPORTED */ + + FCLOSE(fpin); + FCLOSE(fpout); + + return (0); +} + +/* Input and output filenames */ +#ifdef RISCOS +static PNG_CONST char *inname = "pngtest/png"; +static PNG_CONST char *outname = "pngout/png"; +#else +static PNG_CONST char *inname = "pngtest.png"; +static PNG_CONST char *outname = "pngout.png"; +#endif + +int +main(int argc, char *argv[]) +{ + int multiple = 0; + int ierror = 0; + + fprintf(STDERR, "\n Testing libpng version %s\n", PNG_LIBPNG_VER_STRING); + fprintf(STDERR, " with zlib version %s\n", ZLIB_VERSION); + fprintf(STDERR, "%s", png_get_copyright(NULL)); + /* Show the version of libpng used in building the library */ + fprintf(STDERR, " library (%lu):%s", + (unsigned long)png_access_version_number(), + png_get_header_version(NULL)); + + /* Show the version of libpng used in building the application */ + fprintf(STDERR, " pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER, + PNG_HEADER_VERSION_STRING); + + /* Do some consistency checking on the memory allocation settings, I'm + * not sure this matters, but it is nice to know, the first of these + * tests should be impossible because of the way the macros are set + * in pngconf.h + */ +#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) + fprintf(STDERR, " NOTE: Zlib compiled for max 64k, libpng not\n"); +#endif + /* I think the following can happen. */ +#if !defined(MAXSEG_64K) && defined(PNG_MAX_MALLOC_64K) + fprintf(STDERR, " NOTE: libpng compiled for max 64k, zlib not\n"); +#endif + + if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING)) + { + fprintf(STDERR, + "Warning: versions are different between png.h and png.c\n"); + fprintf(STDERR, " png.h version: %s\n", PNG_LIBPNG_VER_STRING); + fprintf(STDERR, " png.c version: %s\n\n", png_libpng_ver); + ++ierror; + } + + if (argc > 1) + { + if (strcmp(argv[1], "-m") == 0) + { + multiple = 1; + status_dots_requested = 0; + } + + else if (strcmp(argv[1], "-mv") == 0 || + strcmp(argv[1], "-vm") == 0 ) + { + multiple = 1; + verbose = 1; + status_dots_requested = 1; + } + + else if (strcmp(argv[1], "-v") == 0) + { + verbose = 1; + status_dots_requested = 1; + inname = argv[2]; + } + + else if (strcmp(argv[1], "--strict") == 0) + { + status_dots_requested = 0; + verbose = 1; + inname = argv[2]; + strict++; + relaxed = 0; + } + + else if (strcmp(argv[1], "--relaxed") == 0) + { + status_dots_requested = 0; + verbose = 1; + inname = argv[2]; + strict = 0; + relaxed++; + } + + else + { + inname = argv[1]; + status_dots_requested = 0; + } + } + + if (!multiple && argc == 3 + verbose) + outname = argv[2 + verbose]; + + if ((!multiple && argc > 3 + verbose) || (multiple && argc < 2)) + { + fprintf(STDERR, + "usage: %s [infile.png] [outfile.png]\n\t%s -m {infile.png}\n", + argv[0], argv[0]); + fprintf(STDERR, + " reads/writes one PNG file (without -m) or multiple files (-m)\n"); + fprintf(STDERR, + " with -m %s is used as a temporary file\n", outname); + exit(1); + } + + if (multiple) + { + int i; +#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG + int allocation_now = current_allocation; +#endif + for (i=2; isize, + (unsigned int)pinfo->pointer); + pinfo = pinfo->next; + } + } +#endif + } +#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG + fprintf(STDERR, " Current memory allocation: %10d bytes\n", + current_allocation); + fprintf(STDERR, " Maximum memory allocation: %10d bytes\n", + maximum_allocation); + fprintf(STDERR, " Total memory allocation: %10d bytes\n", + total_allocation); + fprintf(STDERR, " Number of allocations: %10d\n", + num_allocations); +#endif + } + + else + { + int i; + for (i = 0; i<3; ++i) + { + int kerror; +#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG + int allocation_now = current_allocation; +#endif + if (i == 1) + status_dots_requested = 1; + + else if (verbose == 0) + status_dots_requested = 0; + + if (i == 0 || verbose == 1 || ierror != 0) + fprintf(STDERR, "\n Testing %s:", inname); + + kerror = test_one_file(inname, outname); + + if (kerror == 0) + { + if (verbose == 1 || i == 2) + { +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + int k; +#endif +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + fprintf(STDERR, "\n PASS (%lu zero samples)\n", + (unsigned long)zero_samples); +#else + fprintf(STDERR, " PASS\n"); +#endif +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + for (k = 0; k<256; k++) + if (filters_used[k]) + fprintf(STDERR, " Filter %d was used %lu times\n", + k, (unsigned long)filters_used[k]); +#endif +#ifdef PNG_TIME_RFC1123_SUPPORTED + if (tIME_chunk_present != 0) + fprintf(STDERR, " tIME = %s\n", tIME_string); +#endif /* PNG_TIME_RFC1123_SUPPORTED */ + } + } + + else + { + if (verbose == 0 && i != 2) + fprintf(STDERR, "\n Testing %s:", inname); + + fprintf(STDERR, " FAIL\n"); + ierror += kerror; + } +#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG + if (allocation_now != current_allocation) + fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n", + current_allocation - allocation_now); + + if (current_allocation != 0) + { + memory_infop pinfo = pinformation; + + fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n", + current_allocation); + + while (pinfo != NULL) + { + fprintf(STDERR, " %lu bytes at %x\n", + (unsigned long)pinfo->size, (unsigned int)pinfo->pointer); + pinfo = pinfo->next; + } + } +#endif + } +#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG + fprintf(STDERR, " Current memory allocation: %10d bytes\n", + current_allocation); + fprintf(STDERR, " Maximum memory allocation: %10d bytes\n", + maximum_allocation); + fprintf(STDERR, " Total memory allocation: %10d bytes\n", + total_allocation); + fprintf(STDERR, " Number of allocations: %10d\n", + num_allocations); +#endif + } + +#ifdef PNGTEST_TIMING + t_stop = (float)clock(); + t_misc += (t_stop - t_start); + t_start = t_stop; + fprintf(STDERR, " CPU time used = %.3f seconds", + (t_misc+t_decode+t_encode)/(float)CLOCKS_PER_SEC); + fprintf(STDERR, " (decoding %.3f,\n", + t_decode/(float)CLOCKS_PER_SEC); + fprintf(STDERR, " encoding %.3f ,", + t_encode/(float)CLOCKS_PER_SEC); + fprintf(STDERR, " other %.3f seconds)\n\n", + t_misc/(float)CLOCKS_PER_SEC); +#endif + + if (ierror == 0) + fprintf(STDERR, " libpng passes test\n"); + + else + fprintf(STDERR, " libpng FAILS test\n"); + + return (int)(ierror != 0); +} +#else +int +main(void) +{ + fprintf(STDERR, + " test ignored because libpng was not built with read support\n"); + /* And skip this test */ + return 77; +} +#endif + +/* Generate a compiler error if there is an old png.h in the search path. */ +typedef png_libpng_version_1_6_2 Your_png_h_is_not_version_1_6_2; diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngtest.png b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngtest.png new file mode 100644 index 0000000000..cb3fef4cf8 Binary files /dev/null and b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngtest.png differ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngtrans.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngtrans.c new file mode 100644 index 0000000000..8f8bc5d9e7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngtrans.c @@ -0,0 +1,841 @@ + +/* pngtrans.c - transforms the data in a row (used by both readers and writers) + * + * Last changed in libpng 1.6.2 [April 25, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#include "pngpriv.h" + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Turn on BGR-to-RGB mapping */ +void PNGAPI +png_set_bgr(png_structrp png_ptr) +{ + png_debug(1, "in png_set_bgr"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_BGR; +} +#endif + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Turn on 16 bit byte swapping */ +void PNGAPI +png_set_swap(png_structrp png_ptr) +{ + png_debug(1, "in png_set_swap"); + + if (png_ptr == NULL) + return; + + if (png_ptr->bit_depth == 16) + png_ptr->transformations |= PNG_SWAP_BYTES; +} +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) +/* Turn on pixel packing */ +void PNGAPI +png_set_packing(png_structrp png_ptr) +{ + png_debug(1, "in png_set_packing"); + + if (png_ptr == NULL) + return; + + if (png_ptr->bit_depth < 8) + { + png_ptr->transformations |= PNG_PACK; + png_ptr->usr_bit_depth = 8; + } +} +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) +/* Turn on packed pixel swapping */ +void PNGAPI +png_set_packswap(png_structrp png_ptr) +{ + png_debug(1, "in png_set_packswap"); + + if (png_ptr == NULL) + return; + + if (png_ptr->bit_depth < 8) + png_ptr->transformations |= PNG_PACKSWAP; +} +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) +void PNGAPI +png_set_shift(png_structrp png_ptr, png_const_color_8p true_bits) +{ + png_debug(1, "in png_set_shift"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_SHIFT; + png_ptr->shift = *true_bits; +} +#endif + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) +int PNGAPI +png_set_interlace_handling(png_structrp png_ptr) +{ + png_debug(1, "in png_set_interlace handling"); + + if (png_ptr && png_ptr->interlaced) + { + png_ptr->transformations |= PNG_INTERLACE; + return (7); + } + + return (1); +} +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +/* Add a filler byte on read, or remove a filler or alpha byte on write. + * The filler type has changed in v0.95 to allow future 2-byte fillers + * for 48-bit input data, as well as to avoid problems with some compilers + * that don't like bytes as parameters. + */ +void PNGAPI +png_set_filler(png_structrp png_ptr, png_uint_32 filler, int filler_loc) +{ + png_debug(1, "in png_set_filler"); + + if (png_ptr == NULL) + return; + + /* In libpng 1.6 it is possible to determine whether this is a read or write + * operation and therefore to do more checking here for a valid call. + */ + if (png_ptr->mode & PNG_IS_READ_STRUCT) + { +# ifdef PNG_READ_FILLER_SUPPORTED + /* On read png_set_filler is always valid, regardless of the base PNG + * format, because other transformations can give a format where the + * filler code can execute (basically an 8 or 16-bit component RGB or G + * format.) + * + * NOTE: usr_channels is not used by the read code! (This has led to + * confusion in the past.) The filler is only used in the read code. + */ + png_ptr->filler = (png_uint_16)filler; +# else + png_app_error(png_ptr, "png_set_filler not supported on read"); + PNG_UNUSED(filler) /* not used in the write case */ + return; +# endif + } + + else /* write */ + { +# ifdef PNG_WRITE_FILLER_SUPPORTED + /* On write the usr_channels parameter must be set correctly at the + * start to record the number of channels in the app-supplied data. + */ + switch (png_ptr->color_type) + { + case PNG_COLOR_TYPE_RGB: + png_ptr->usr_channels = 4; + break; + + case PNG_COLOR_TYPE_GRAY: + if (png_ptr->bit_depth >= 8) + { + png_ptr->usr_channels = 2; + break; + } + + else + { + /* There simply isn't any code in libpng to strip out bits + * from bytes when the components are less than a byte in + * size! + */ + png_app_error(png_ptr, + "png_set_filler is invalid for low bit depth gray output"); + return; + } + + default: + png_app_error(png_ptr, + "png_set_filler: inappropriate color type"); + return; + } +# else + png_app_error(png_ptr, "png_set_filler not supported on write"); + return; +# endif + } + + /* Here on success - libpng supports the operation, set the transformation + * and the flag to say where the filler channel is. + */ + png_ptr->transformations |= PNG_FILLER; + + if (filler_loc == PNG_FILLER_AFTER) + png_ptr->flags |= PNG_FLAG_FILLER_AFTER; + + else + png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER; +} + +/* Added to libpng-1.2.7 */ +void PNGAPI +png_set_add_alpha(png_structrp png_ptr, png_uint_32 filler, int filler_loc) +{ + png_debug(1, "in png_set_add_alpha"); + + if (png_ptr == NULL) + return; + + png_set_filler(png_ptr, filler, filler_loc); + /* The above may fail to do anything. */ + if (png_ptr->transformations & PNG_FILLER) + png_ptr->transformations |= PNG_ADD_ALPHA; +} + +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +void PNGAPI +png_set_swap_alpha(png_structrp png_ptr) +{ + png_debug(1, "in png_set_swap_alpha"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_SWAP_ALPHA; +} +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +void PNGAPI +png_set_invert_alpha(png_structrp png_ptr) +{ + png_debug(1, "in png_set_invert_alpha"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_INVERT_ALPHA; +} +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +void PNGAPI +png_set_invert_mono(png_structrp png_ptr) +{ + png_debug(1, "in png_set_invert_mono"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_INVERT_MONO; +} + +/* Invert monochrome grayscale data */ +void /* PRIVATE */ +png_do_invert(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_invert"); + + /* This test removed from libpng version 1.0.13 and 1.2.0: + * if (row_info->bit_depth == 1 && + */ + if (row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + png_bytep rp = row; + png_size_t i; + png_size_t istop = row_info->rowbytes; + + for (i = 0; i < istop; i++) + { + *rp = (png_byte)(~(*rp)); + rp++; + } + } + + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && + row_info->bit_depth == 8) + { + png_bytep rp = row; + png_size_t i; + png_size_t istop = row_info->rowbytes; + + for (i = 0; i < istop; i += 2) + { + *rp = (png_byte)(~(*rp)); + rp += 2; + } + } + +#ifdef PNG_16BIT_SUPPORTED + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && + row_info->bit_depth == 16) + { + png_bytep rp = row; + png_size_t i; + png_size_t istop = row_info->rowbytes; + + for (i = 0; i < istop; i += 4) + { + *rp = (png_byte)(~(*rp)); + *(rp + 1) = (png_byte)(~(*(rp + 1))); + rp += 4; + } + } +#endif +} +#endif + +#ifdef PNG_16BIT_SUPPORTED +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Swaps byte order on 16 bit depth images */ +void /* PRIVATE */ +png_do_swap(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_swap"); + + if (row_info->bit_depth == 16) + { + png_bytep rp = row; + png_uint_32 i; + png_uint_32 istop= row_info->width * row_info->channels; + + for (i = 0; i < istop; i++, rp += 2) + { + png_byte t = *rp; + *rp = *(rp + 1); + *(rp + 1) = t; + } + } +} +#endif +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) +static PNG_CONST png_byte onebppswaptable[256] = { + 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, + 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, + 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, + 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, + 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, + 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, + 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, + 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, + 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, + 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, + 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, + 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, + 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, + 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, + 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, + 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, + 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, + 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1, + 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, + 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, + 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, + 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, + 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, + 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, + 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, + 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, + 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, + 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, + 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, + 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, + 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, + 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF +}; + +static PNG_CONST png_byte twobppswaptable[256] = { + 0x00, 0x40, 0x80, 0xC0, 0x10, 0x50, 0x90, 0xD0, + 0x20, 0x60, 0xA0, 0xE0, 0x30, 0x70, 0xB0, 0xF0, + 0x04, 0x44, 0x84, 0xC4, 0x14, 0x54, 0x94, 0xD4, + 0x24, 0x64, 0xA4, 0xE4, 0x34, 0x74, 0xB4, 0xF4, + 0x08, 0x48, 0x88, 0xC8, 0x18, 0x58, 0x98, 0xD8, + 0x28, 0x68, 0xA8, 0xE8, 0x38, 0x78, 0xB8, 0xF8, + 0x0C, 0x4C, 0x8C, 0xCC, 0x1C, 0x5C, 0x9C, 0xDC, + 0x2C, 0x6C, 0xAC, 0xEC, 0x3C, 0x7C, 0xBC, 0xFC, + 0x01, 0x41, 0x81, 0xC1, 0x11, 0x51, 0x91, 0xD1, + 0x21, 0x61, 0xA1, 0xE1, 0x31, 0x71, 0xB1, 0xF1, + 0x05, 0x45, 0x85, 0xC5, 0x15, 0x55, 0x95, 0xD5, + 0x25, 0x65, 0xA5, 0xE5, 0x35, 0x75, 0xB5, 0xF5, + 0x09, 0x49, 0x89, 0xC9, 0x19, 0x59, 0x99, 0xD9, + 0x29, 0x69, 0xA9, 0xE9, 0x39, 0x79, 0xB9, 0xF9, + 0x0D, 0x4D, 0x8D, 0xCD, 0x1D, 0x5D, 0x9D, 0xDD, + 0x2D, 0x6D, 0xAD, 0xED, 0x3D, 0x7D, 0xBD, 0xFD, + 0x02, 0x42, 0x82, 0xC2, 0x12, 0x52, 0x92, 0xD2, + 0x22, 0x62, 0xA2, 0xE2, 0x32, 0x72, 0xB2, 0xF2, + 0x06, 0x46, 0x86, 0xC6, 0x16, 0x56, 0x96, 0xD6, + 0x26, 0x66, 0xA6, 0xE6, 0x36, 0x76, 0xB6, 0xF6, + 0x0A, 0x4A, 0x8A, 0xCA, 0x1A, 0x5A, 0x9A, 0xDA, + 0x2A, 0x6A, 0xAA, 0xEA, 0x3A, 0x7A, 0xBA, 0xFA, + 0x0E, 0x4E, 0x8E, 0xCE, 0x1E, 0x5E, 0x9E, 0xDE, + 0x2E, 0x6E, 0xAE, 0xEE, 0x3E, 0x7E, 0xBE, 0xFE, + 0x03, 0x43, 0x83, 0xC3, 0x13, 0x53, 0x93, 0xD3, + 0x23, 0x63, 0xA3, 0xE3, 0x33, 0x73, 0xB3, 0xF3, + 0x07, 0x47, 0x87, 0xC7, 0x17, 0x57, 0x97, 0xD7, + 0x27, 0x67, 0xA7, 0xE7, 0x37, 0x77, 0xB7, 0xF7, + 0x0B, 0x4B, 0x8B, 0xCB, 0x1B, 0x5B, 0x9B, 0xDB, + 0x2B, 0x6B, 0xAB, 0xEB, 0x3B, 0x7B, 0xBB, 0xFB, + 0x0F, 0x4F, 0x8F, 0xCF, 0x1F, 0x5F, 0x9F, 0xDF, + 0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF +}; + +static PNG_CONST png_byte fourbppswaptable[256] = { + 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, + 0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0, + 0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71, + 0x81, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, 0xE1, 0xF1, + 0x02, 0x12, 0x22, 0x32, 0x42, 0x52, 0x62, 0x72, + 0x82, 0x92, 0xA2, 0xB2, 0xC2, 0xD2, 0xE2, 0xF2, + 0x03, 0x13, 0x23, 0x33, 0x43, 0x53, 0x63, 0x73, + 0x83, 0x93, 0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3, + 0x04, 0x14, 0x24, 0x34, 0x44, 0x54, 0x64, 0x74, + 0x84, 0x94, 0xA4, 0xB4, 0xC4, 0xD4, 0xE4, 0xF4, + 0x05, 0x15, 0x25, 0x35, 0x45, 0x55, 0x65, 0x75, + 0x85, 0x95, 0xA5, 0xB5, 0xC5, 0xD5, 0xE5, 0xF5, + 0x06, 0x16, 0x26, 0x36, 0x46, 0x56, 0x66, 0x76, + 0x86, 0x96, 0xA6, 0xB6, 0xC6, 0xD6, 0xE6, 0xF6, + 0x07, 0x17, 0x27, 0x37, 0x47, 0x57, 0x67, 0x77, + 0x87, 0x97, 0xA7, 0xB7, 0xC7, 0xD7, 0xE7, 0xF7, + 0x08, 0x18, 0x28, 0x38, 0x48, 0x58, 0x68, 0x78, + 0x88, 0x98, 0xA8, 0xB8, 0xC8, 0xD8, 0xE8, 0xF8, + 0x09, 0x19, 0x29, 0x39, 0x49, 0x59, 0x69, 0x79, + 0x89, 0x99, 0xA9, 0xB9, 0xC9, 0xD9, 0xE9, 0xF9, + 0x0A, 0x1A, 0x2A, 0x3A, 0x4A, 0x5A, 0x6A, 0x7A, + 0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xFA, + 0x0B, 0x1B, 0x2B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B, + 0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0xDB, 0xEB, 0xFB, + 0x0C, 0x1C, 0x2C, 0x3C, 0x4C, 0x5C, 0x6C, 0x7C, + 0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xDC, 0xEC, 0xFC, + 0x0D, 0x1D, 0x2D, 0x3D, 0x4D, 0x5D, 0x6D, 0x7D, + 0x8D, 0x9D, 0xAD, 0xBD, 0xCD, 0xDD, 0xED, 0xFD, + 0x0E, 0x1E, 0x2E, 0x3E, 0x4E, 0x5E, 0x6E, 0x7E, + 0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0xDE, 0xEE, 0xFE, + 0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F, + 0x8F, 0x9F, 0xAF, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF +}; + +/* Swaps pixel packing order within bytes */ +void /* PRIVATE */ +png_do_packswap(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_packswap"); + + if (row_info->bit_depth < 8) + { + png_bytep rp; + png_const_bytep end, table; + + end = row + row_info->rowbytes; + + if (row_info->bit_depth == 1) + table = onebppswaptable; + + else if (row_info->bit_depth == 2) + table = twobppswaptable; + + else if (row_info->bit_depth == 4) + table = fourbppswaptable; + + else + return; + + for (rp = row; rp < end; rp++) + *rp = table[*rp]; + } +} +#endif /* PNG_READ_PACKSWAP_SUPPORTED or PNG_WRITE_PACKSWAP_SUPPORTED */ + +#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ + defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +/* Remove a channel - this used to be 'png_do_strip_filler' but it used a + * somewhat weird combination of flags to determine what to do. All the calls + * to png_do_strip_filler are changed in 1.5.2 to call this instead with the + * correct arguments. + * + * The routine isn't general - the channel must be the channel at the start or + * end (not in the middle) of each pixel. + */ +void /* PRIVATE */ +png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start) +{ + png_bytep sp = row; /* source pointer */ + png_bytep dp = row; /* destination pointer */ + png_bytep ep = row + row_info->rowbytes; /* One beyond end of row */ + + /* At the start sp will point to the first byte to copy and dp to where + * it is copied to. ep always points just beyond the end of the row, so + * the loop simply copies (channels-1) channels until sp reaches ep. + * + * at_start: 0 -- convert AG, XG, ARGB, XRGB, AAGG, XXGG, etc. + * nonzero -- convert GA, GX, RGBA, RGBX, GGAA, RRGGBBXX, etc. + */ + + /* GA, GX, XG cases */ + if (row_info->channels == 2) + { + if (row_info->bit_depth == 8) + { + if (at_start) /* Skip initial filler */ + ++sp; + else /* Skip initial channel and, for sp, the filler */ + sp += 2, ++dp; + + /* For a 1 pixel wide image there is nothing to do */ + while (sp < ep) + *dp++ = *sp, sp += 2; + + row_info->pixel_depth = 8; + } + + else if (row_info->bit_depth == 16) + { + if (at_start) /* Skip initial filler */ + sp += 2; + else /* Skip initial channel and, for sp, the filler */ + sp += 4, dp += 2; + + while (sp < ep) + *dp++ = *sp++, *dp++ = *sp, sp += 3; + + row_info->pixel_depth = 16; + } + + else + return; /* bad bit depth */ + + row_info->channels = 1; + + /* Finally fix the color type if it records an alpha channel */ + if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + row_info->color_type = PNG_COLOR_TYPE_GRAY; + } + + /* RGBA, RGBX, XRGB cases */ + else if (row_info->channels == 4) + { + if (row_info->bit_depth == 8) + { + if (at_start) /* Skip initial filler */ + ++sp; + else /* Skip initial channels and, for sp, the filler */ + sp += 4, dp += 3; + + /* Note that the loop adds 3 to dp and 4 to sp each time. */ + while (sp < ep) + *dp++ = *sp++, *dp++ = *sp++, *dp++ = *sp, sp += 2; + + row_info->pixel_depth = 24; + } + + else if (row_info->bit_depth == 16) + { + if (at_start) /* Skip initial filler */ + sp += 2; + else /* Skip initial channels and, for sp, the filler */ + sp += 8, dp += 6; + + while (sp < ep) + { + /* Copy 6 bytes, skip 2 */ + *dp++ = *sp++, *dp++ = *sp++; + *dp++ = *sp++, *dp++ = *sp++; + *dp++ = *sp++, *dp++ = *sp, sp += 3; + } + + row_info->pixel_depth = 48; + } + + else + return; /* bad bit depth */ + + row_info->channels = 3; + + /* Finally fix the color type if it records an alpha channel */ + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + row_info->color_type = PNG_COLOR_TYPE_RGB; + } + + else + return; /* The filler channel has gone already */ + + /* Fix the rowbytes value. */ + row_info->rowbytes = dp-row; +} +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Swaps red and blue bytes within a pixel */ +void /* PRIVATE */ +png_do_bgr(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_bgr"); + + if ((row_info->color_type & PNG_COLOR_MASK_COLOR)) + { + png_uint_32 row_width = row_info->width; + if (row_info->bit_depth == 8) + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 3) + { + png_byte save = *rp; + *rp = *(rp + 2); + *(rp + 2) = save; + } + } + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 4) + { + png_byte save = *rp; + *rp = *(rp + 2); + *(rp + 2) = save; + } + } + } + +#ifdef PNG_16BIT_SUPPORTED + else if (row_info->bit_depth == 16) + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 6) + { + png_byte save = *rp; + *rp = *(rp + 4); + *(rp + 4) = save; + save = *(rp + 1); + *(rp + 1) = *(rp + 5); + *(rp + 5) = save; + } + } + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 8) + { + png_byte save = *rp; + *rp = *(rp + 4); + *(rp + 4) = save; + save = *(rp + 1); + *(rp + 1) = *(rp + 5); + *(rp + 5) = save; + } + } + } +#endif + } +} +#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */ + +#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \ + defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED) +/* Added at libpng-1.5.10 */ +void /* PRIVATE */ +png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info) +{ + if (png_ptr->num_palette < (1 << row_info->bit_depth) && + png_ptr->num_palette > 0) /* num_palette can be 0 in MNG files */ + { + /* Calculations moved outside switch in an attempt to stop different + * compiler warnings. 'padding' is in *bits* within the last byte, it is + * an 'int' because pixel_depth becomes an 'int' in the expression below, + * and this calculation is used because it avoids warnings that other + * forms produced on either GCC or MSVC. + */ + int padding = (-row_info->pixel_depth * row_info->width) & 7; + png_bytep rp = png_ptr->row_buf + row_info->rowbytes; + + switch (row_info->bit_depth) + { + case 1: + { + /* in this case, all bytes must be 0 so we don't need + * to unpack the pixels except for the rightmost one. + */ + for (; rp > png_ptr->row_buf; rp--) + { + if (*rp >> padding != 0) + png_ptr->num_palette_max = 1; + padding = 0; + } + + break; + } + + case 2: + { + for (; rp > png_ptr->row_buf; rp--) + { + int i = ((*rp >> padding) & 0x03); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + i = (((*rp >> padding) >> 2) & 0x03); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + i = (((*rp >> padding) >> 4) & 0x03); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + i = (((*rp >> padding) >> 6) & 0x03); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + padding = 0; + } + + break; + } + + case 4: + { + for (; rp > png_ptr->row_buf; rp--) + { + int i = ((*rp >> padding) & 0x0f); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + i = (((*rp >> padding) >> 4) & 0x0f); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + padding = 0; + } + + break; + } + + case 8: + { + for (; rp > png_ptr->row_buf; rp--) + { + if (*rp > png_ptr->num_palette_max) + png_ptr->num_palette_max = (int) *rp; + } + + break; + } + + default: + break; + } + } +} +#endif /* PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED */ + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +void PNGAPI +png_set_user_transform_info(png_structrp png_ptr, png_voidp + user_transform_ptr, int user_transform_depth, int user_transform_channels) +{ + png_debug(1, "in png_set_user_transform_info"); + + if (png_ptr == NULL) + return; + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 && + (png_ptr->flags & PNG_FLAG_ROW_INIT) != 0) + { + png_app_error(png_ptr, + "info change after png_start_read_image or png_read_update_info"); + return; + } +#endif + + png_ptr->user_transform_ptr = user_transform_ptr; + png_ptr->user_transform_depth = (png_byte)user_transform_depth; + png_ptr->user_transform_channels = (png_byte)user_transform_channels; +} +#endif + +/* This function returns a pointer to the user_transform_ptr associated with + * the user transform functions. The application should free any memory + * associated with this pointer before png_write_destroy and png_read_destroy + * are called. + */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +png_voidp PNGAPI +png_get_user_transform_ptr(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return (NULL); + + return png_ptr->user_transform_ptr; +} +#endif + +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED +png_uint_32 PNGAPI +png_get_current_row_number(png_const_structrp png_ptr) +{ + /* See the comments in png.h - this is the sub-image row when reading and + * interlaced image. + */ + if (png_ptr != NULL) + return png_ptr->row_number; + + return PNG_UINT_32_MAX; /* help the app not to fail silently */ +} + +png_byte PNGAPI +png_get_current_pass_number(png_const_structrp png_ptr) +{ + if (png_ptr != NULL) + return png_ptr->pass; + return 8; /* invalid */ +} +#endif /* PNG_USER_TRANSFORM_INFO_SUPPORTED */ +#endif /* PNG_READ_USER_TRANSFORM_SUPPORTED || + PNG_WRITE_USER_TRANSFORM_SUPPORTED */ +#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngusr.dfa b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngusr.dfa new file mode 100644 index 0000000000..9d39564b51 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngusr.dfa @@ -0,0 +1,14 @@ +# pngusr.dfa +# +# Build time configuration of libpng +# +# Enter build configuration options in this file +# +# Security settings: by default these limits are unset, you can change them +# here by entering the appropriate values as #defines preceded by '@' (to cause, +# them to be passed through to the build of pnglibconf.h), for example: +# +# @# define PNG_USER_WIDTH_MAX 1000000 +# @# define PNG_USER_HEIGHT_MAX 1000000 +# @# define PNG_USER_CHUNK_CACHE_MAX 128 +# @# define PNG_USER_CHUNK_MALLOC_MAX 8000000 diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwio.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwio.c new file mode 100644 index 0000000000..e3289dfe4a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwio.c @@ -0,0 +1,164 @@ + +/* pngwio.c - functions for data output + * + * Last changed in libpng 1.6.0 [February 14, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file provides a location for all output. Users who need + * special handling are expected to write functions that have the same + * arguments as these and perform similar functions, but that possibly + * use different output methods. Note that you shouldn't change these + * functions, but rather write replacement functions and then change + * them at run time with png_set_write_fn(...). + */ + +#include "pngpriv.h" + +#ifdef PNG_WRITE_SUPPORTED + +/* Write the data to whatever output you are using. The default routine + * writes to a file pointer. Note that this routine sometimes gets called + * with very small lengths, so you should implement some kind of simple + * buffering if you are using unbuffered writes. This should never be asked + * to write more than 64K on a 16 bit machine. + */ + +void /* PRIVATE */ +png_write_data(png_structrp png_ptr, png_const_bytep data, png_size_t length) +{ + /* NOTE: write_data_fn must not change the buffer! */ + if (png_ptr->write_data_fn != NULL ) + (*(png_ptr->write_data_fn))(png_ptr, png_constcast(png_bytep,data), + length); + + else + png_error(png_ptr, "Call to NULL write function"); +} + +#ifdef PNG_STDIO_SUPPORTED +/* This is the function that does the actual writing of data. If you are + * not writing to a standard C stream, you should create a replacement + * write_data function and use it at run time with png_set_write_fn(), rather + * than changing the library. + */ +void PNGCBAPI +png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_size_t check; + + if (png_ptr == NULL) + return; + + check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr)); + + if (check != length) + png_error(png_ptr, "Write Error"); +} +#endif + +/* This function is called to output any data pending writing (normally + * to disk). After png_flush is called, there should be no data pending + * writing in any buffers. + */ +#ifdef PNG_WRITE_FLUSH_SUPPORTED +void /* PRIVATE */ +png_flush(png_structrp png_ptr) +{ + if (png_ptr->output_flush_fn != NULL) + (*(png_ptr->output_flush_fn))(png_ptr); +} + +# ifdef PNG_STDIO_SUPPORTED +void PNGCBAPI +png_default_flush(png_structp png_ptr) +{ + png_FILE_p io_ptr; + + if (png_ptr == NULL) + return; + + io_ptr = png_voidcast(png_FILE_p, (png_ptr->io_ptr)); + fflush(io_ptr); +} +# endif +#endif + +/* This function allows the application to supply new output functions for + * libpng if standard C streams aren't being used. + * + * This function takes as its arguments: + * png_ptr - pointer to a png output data structure + * io_ptr - pointer to user supplied structure containing info about + * the output functions. May be NULL. + * write_data_fn - pointer to a new output function that takes as its + * arguments a pointer to a png_struct, a pointer to + * data to be written, and a 32-bit unsigned int that is + * the number of bytes to be written. The new write + * function should call png_error(png_ptr, "Error msg") + * to exit and output any fatal error messages. May be + * NULL, in which case libpng's default function will + * be used. + * flush_data_fn - pointer to a new flush function that takes as its + * arguments a pointer to a png_struct. After a call to + * the flush function, there should be no data in any buffers + * or pending transmission. If the output method doesn't do + * any buffering of output, a function prototype must still be + * supplied although it doesn't have to do anything. If + * PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile + * time, output_flush_fn will be ignored, although it must be + * supplied for compatibility. May be NULL, in which case + * libpng's default function will be used, if + * PNG_WRITE_FLUSH_SUPPORTED is defined. This is not + * a good idea if io_ptr does not point to a standard + * *FILE structure. + */ +void PNGAPI +png_set_write_fn(png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn) +{ + if (png_ptr == NULL) + return; + + png_ptr->io_ptr = io_ptr; + +#ifdef PNG_STDIO_SUPPORTED + if (write_data_fn != NULL) + png_ptr->write_data_fn = write_data_fn; + + else + png_ptr->write_data_fn = png_default_write_data; +#else + png_ptr->write_data_fn = write_data_fn; +#endif + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +# ifdef PNG_STDIO_SUPPORTED + + if (output_flush_fn != NULL) + png_ptr->output_flush_fn = output_flush_fn; + + else + png_ptr->output_flush_fn = png_default_flush; + +# else + png_ptr->output_flush_fn = output_flush_fn; +# endif +#endif /* PNG_WRITE_FLUSH_SUPPORTED */ + + /* It is an error to read while writing a png file */ + if (png_ptr->read_data_fn != NULL) + { + png_ptr->read_data_fn = NULL; + + png_warning(png_ptr, + "Can't set both read_data_fn and write_data_fn in the" + " same structure"); + } +} +#endif /* PNG_WRITE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwrite.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwrite.c new file mode 100644 index 0000000000..33924aac0c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwrite.c @@ -0,0 +1,2331 @@ + +/* pngwrite.c - general routines to write a PNG file + * + * Last changed in libpng 1.6.2 [April 25, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#include "pngpriv.h" +#if defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) +# include +#endif + +#ifdef PNG_WRITE_SUPPORTED + +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +/* Write out all the unknown chunks for the current given location */ +static void +write_unknown_chunks(png_structrp png_ptr, png_const_inforp info_ptr, + unsigned int where) +{ + if (info_ptr->unknown_chunks_num) + { + png_const_unknown_chunkp up; + + png_debug(5, "writing extra chunks"); + + for (up = info_ptr->unknown_chunks; + up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; + ++up) + if (up->location & where) + { + /* If per-chunk unknown chunk handling is enabled use it, otherwise + * just write the chunks the application has set. + */ +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + int keep = png_handle_as_unknown(png_ptr, up->name); + + /* NOTE: this code is radically different from the read side in the + * matter of handling an ancillary unknown chunk. In the read side + * the default behavior is to discard it, in the code below the default + * behavior is to write it. Critical chunks are, however, only + * written if explicitly listed or if the default is set to write all + * unknown chunks. + * + * The default handling is also slightly weird - it is not possible to + * stop the writing of all unsafe-to-copy chunks! + * + * TODO: REVIEW: this would seem to be a bug. + */ + if (keep != PNG_HANDLE_CHUNK_NEVER && + ((up->name[3] & 0x20) /* safe-to-copy overrides everything */ || + keep == PNG_HANDLE_CHUNK_ALWAYS || + (keep == PNG_HANDLE_CHUNK_AS_DEFAULT && + png_ptr->unknown_default == PNG_HANDLE_CHUNK_ALWAYS))) +#endif + { + /* TODO: review, what is wrong with a zero length unknown chunk? */ + if (up->size == 0) + png_warning(png_ptr, "Writing zero-length unknown chunk"); + + png_write_chunk(png_ptr, up->name, up->data, up->size); + } + } + } +} +#endif /* PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED */ + +/* Writes all the PNG information. This is the suggested way to use the + * library. If you have a new chunk to add, make a function to write it, + * and put it in the correct location here. If you want the chunk written + * after the image data, put it in png_write_end(). I strongly encourage + * you to supply a PNG_INFO_ flag, and check info_ptr->valid before writing + * the chunk, as that will keep the code from breaking if you want to just + * write a plain PNG file. If you have long comments, I suggest writing + * them in png_write_end(), and compressing them. + */ +void PNGAPI +png_write_info_before_PLTE(png_structrp png_ptr, png_const_inforp info_ptr) +{ + png_debug(1, "in png_write_info_before_PLTE"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) + { + /* Write PNG signature */ + png_write_sig(png_ptr); + +#ifdef PNG_MNG_FEATURES_SUPPORTED + if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \ + (png_ptr->mng_features_permitted)) + { + png_warning(png_ptr, "MNG features are not allowed in a PNG datastream"); + png_ptr->mng_features_permitted = 0; + } +#endif + + /* Write IHDR information. */ + png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height, + info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type, + info_ptr->filter_type, +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + info_ptr->interlace_type +#else + 0 +#endif + ); + + /* The rest of these check to see if the valid field has the appropriate + * flag set, and if it does, writes the chunk. + * + * 1.6.0: COLORSPACE support controls the writing of these chunks too, and + * the chunks will be written if the WRITE routine is there and information + * is available in the COLORSPACE. (See png_colorspace_sync_info in png.c + * for where the valid flags get set.) + * + * Under certain circumstances the colorspace can be invalidated without + * syncing the info_struct 'valid' flags; this happens if libpng detects and + * error and calls png_error while the color space is being set, yet the + * application continues writing the PNG. So check the 'invalid' flag here + * too. + */ +#ifdef PNG_GAMMA_SUPPORTED +# ifdef PNG_WRITE_gAMA_SUPPORTED + if (!(info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) && + (info_ptr->colorspace.flags & PNG_COLORSPACE_FROM_gAMA) && + (info_ptr->valid & PNG_INFO_gAMA)) + png_write_gAMA_fixed(png_ptr, info_ptr->colorspace.gamma); +# endif +#endif + +#ifdef PNG_COLORSPACE_SUPPORTED + /* Write only one of sRGB or an ICC profile. If a profile was supplied + * and it matches one of the known sRGB ones issue a warning. + */ +# ifdef PNG_WRITE_iCCP_SUPPORTED + if (!(info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) && + (info_ptr->valid & PNG_INFO_iCCP)) + { +# ifdef PNG_WRITE_sRGB_SUPPORTED + if (info_ptr->valid & PNG_INFO_sRGB) + png_app_warning(png_ptr, + "profile matches sRGB but writing iCCP instead"); +# endif + + png_write_iCCP(png_ptr, info_ptr->iccp_name, + info_ptr->iccp_profile); + } +# ifdef PNG_WRITE_sRGB_SUPPORTED + else +# endif +# endif + +# ifdef PNG_WRITE_sRGB_SUPPORTED + if (!(info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) && + (info_ptr->valid & PNG_INFO_sRGB)) + png_write_sRGB(png_ptr, info_ptr->colorspace.rendering_intent); +# endif /* WRITE_sRGB */ +#endif /* COLORSPACE */ + +#ifdef PNG_WRITE_sBIT_SUPPORTED + if (info_ptr->valid & PNG_INFO_sBIT) + png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type); +#endif + +#ifdef PNG_COLORSPACE_SUPPORTED +# ifdef PNG_WRITE_cHRM_SUPPORTED + if (!(info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) && + (info_ptr->colorspace.flags & PNG_COLORSPACE_FROM_cHRM) && + (info_ptr->valid & PNG_INFO_cHRM)) + png_write_cHRM_fixed(png_ptr, &info_ptr->colorspace.end_points_xy); +# endif +#endif + +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED + write_unknown_chunks(png_ptr, info_ptr, PNG_HAVE_IHDR); +#endif + + png_ptr->mode |= PNG_WROTE_INFO_BEFORE_PLTE; + } +} + +void PNGAPI +png_write_info(png_structrp png_ptr, png_const_inforp info_ptr) +{ +#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) + int i; +#endif + + png_debug(1, "in png_write_info"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + png_write_info_before_PLTE(png_ptr, info_ptr); + + if (info_ptr->valid & PNG_INFO_PLTE) + png_write_PLTE(png_ptr, info_ptr->palette, + (png_uint_32)info_ptr->num_palette); + + else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + png_error(png_ptr, "Valid palette required for paletted images"); + +#ifdef PNG_WRITE_tRNS_SUPPORTED + if (info_ptr->valid & PNG_INFO_tRNS) + { +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED + /* Invert the alpha channel (in tRNS) */ + if ((png_ptr->transformations & PNG_INVERT_ALPHA) && + info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + int j; + for (j = 0; j<(int)info_ptr->num_trans; j++) + info_ptr->trans_alpha[j] = + (png_byte)(255 - info_ptr->trans_alpha[j]); + } +#endif + png_write_tRNS(png_ptr, info_ptr->trans_alpha, &(info_ptr->trans_color), + info_ptr->num_trans, info_ptr->color_type); + } +#endif +#ifdef PNG_WRITE_bKGD_SUPPORTED + if (info_ptr->valid & PNG_INFO_bKGD) + png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type); +#endif + +#ifdef PNG_WRITE_hIST_SUPPORTED + if (info_ptr->valid & PNG_INFO_hIST) + png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette); +#endif + +#ifdef PNG_WRITE_oFFs_SUPPORTED + if (info_ptr->valid & PNG_INFO_oFFs) + png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset, + info_ptr->offset_unit_type); +#endif + +#ifdef PNG_WRITE_pCAL_SUPPORTED + if (info_ptr->valid & PNG_INFO_pCAL) + png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0, + info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams, + info_ptr->pcal_units, info_ptr->pcal_params); +#endif + +#ifdef PNG_WRITE_sCAL_SUPPORTED + if (info_ptr->valid & PNG_INFO_sCAL) + png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit, + info_ptr->scal_s_width, info_ptr->scal_s_height); +#endif /* sCAL */ + +#ifdef PNG_WRITE_pHYs_SUPPORTED + if (info_ptr->valid & PNG_INFO_pHYs) + png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit, + info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type); +#endif /* pHYs */ + +#ifdef PNG_WRITE_tIME_SUPPORTED + if (info_ptr->valid & PNG_INFO_tIME) + { + png_write_tIME(png_ptr, &(info_ptr->mod_time)); + png_ptr->mode |= PNG_WROTE_tIME; + } +#endif /* tIME */ + +#ifdef PNG_WRITE_sPLT_SUPPORTED + if (info_ptr->valid & PNG_INFO_sPLT) + for (i = 0; i < (int)info_ptr->splt_palettes_num; i++) + png_write_sPLT(png_ptr, info_ptr->splt_palettes + i); +#endif /* sPLT */ + +#ifdef PNG_WRITE_TEXT_SUPPORTED + /* Check to see if we need to write text chunks */ + for (i = 0; i < info_ptr->num_text; i++) + { + png_debug2(2, "Writing header text chunk %d, type %d", i, + info_ptr->text[i].compression); + /* An internationalized chunk? */ + if (info_ptr->text[i].compression > 0) + { +#ifdef PNG_WRITE_iTXt_SUPPORTED + /* Write international chunk */ + png_write_iTXt(png_ptr, + info_ptr->text[i].compression, + info_ptr->text[i].key, + info_ptr->text[i].lang, + info_ptr->text[i].lang_key, + info_ptr->text[i].text); +#else + png_warning(png_ptr, "Unable to write international text"); +#endif + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; + } + + /* If we want a compressed text chunk */ + else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt) + { +#ifdef PNG_WRITE_zTXt_SUPPORTED + /* Write compressed chunk */ + png_write_zTXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, 0, + info_ptr->text[i].compression); +#else + png_warning(png_ptr, "Unable to write compressed text"); +#endif + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; + } + + else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) + { +#ifdef PNG_WRITE_tEXt_SUPPORTED + /* Write uncompressed chunk */ + png_write_tEXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, + 0); + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; +#else + /* Can't get here */ + png_warning(png_ptr, "Unable to write uncompressed text"); +#endif + } + } +#endif /* tEXt */ + +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED + write_unknown_chunks(png_ptr, info_ptr, PNG_HAVE_PLTE); +#endif +} + +/* Writes the end of the PNG file. If you don't want to write comments or + * time information, you can pass NULL for info. If you already wrote these + * in png_write_info(), do not write them again here. If you have long + * comments, I suggest writing them here, and compressing them. + */ +void PNGAPI +png_write_end(png_structrp png_ptr, png_inforp info_ptr) +{ + png_debug(1, "in png_write_end"); + + if (png_ptr == NULL) + return; + + if (!(png_ptr->mode & PNG_HAVE_IDAT)) + png_error(png_ptr, "No IDATs written into file"); + +#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED + if (png_ptr->num_palette_max > png_ptr->num_palette) + png_benign_error(png_ptr, "Wrote palette index exceeding num_palette"); +#endif + + /* See if user wants us to write information chunks */ + if (info_ptr != NULL) + { +#ifdef PNG_WRITE_TEXT_SUPPORTED + int i; /* local index variable */ +#endif +#ifdef PNG_WRITE_tIME_SUPPORTED + /* Check to see if user has supplied a time chunk */ + if ((info_ptr->valid & PNG_INFO_tIME) && + !(png_ptr->mode & PNG_WROTE_tIME)) + png_write_tIME(png_ptr, &(info_ptr->mod_time)); + +#endif +#ifdef PNG_WRITE_TEXT_SUPPORTED + /* Loop through comment chunks */ + for (i = 0; i < info_ptr->num_text; i++) + { + png_debug2(2, "Writing trailer text chunk %d, type %d", i, + info_ptr->text[i].compression); + /* An internationalized chunk? */ + if (info_ptr->text[i].compression > 0) + { +#ifdef PNG_WRITE_iTXt_SUPPORTED + /* Write international chunk */ + png_write_iTXt(png_ptr, + info_ptr->text[i].compression, + info_ptr->text[i].key, + info_ptr->text[i].lang, + info_ptr->text[i].lang_key, + info_ptr->text[i].text); +#else + png_warning(png_ptr, "Unable to write international text"); +#endif + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; + } + + else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt) + { +#ifdef PNG_WRITE_zTXt_SUPPORTED + /* Write compressed chunk */ + png_write_zTXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, 0, + info_ptr->text[i].compression); +#else + png_warning(png_ptr, "Unable to write compressed text"); +#endif + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; + } + + else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) + { +#ifdef PNG_WRITE_tEXt_SUPPORTED + /* Write uncompressed chunk */ + png_write_tEXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, 0); +#else + png_warning(png_ptr, "Unable to write uncompressed text"); +#endif + + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; + } + } +#endif +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED + write_unknown_chunks(png_ptr, info_ptr, PNG_AFTER_IDAT); +#endif + } + + png_ptr->mode |= PNG_AFTER_IDAT; + + /* Write end of PNG file */ + png_write_IEND(png_ptr); + /* This flush, added in libpng-1.0.8, removed from libpng-1.0.9beta03, + * and restored again in libpng-1.2.30, may cause some applications that + * do not set png_ptr->output_flush_fn to crash. If your application + * experiences a problem, please try building libpng with + * PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED defined, and report the event to + * png-mng-implement at lists.sf.net . + */ +#ifdef PNG_WRITE_FLUSH_SUPPORTED +# ifdef PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED + png_flush(png_ptr); +# endif +#endif +} + +#ifdef PNG_CONVERT_tIME_SUPPORTED +void PNGAPI +png_convert_from_struct_tm(png_timep ptime, PNG_CONST struct tm * ttime) +{ + png_debug(1, "in png_convert_from_struct_tm"); + + ptime->year = (png_uint_16)(1900 + ttime->tm_year); + ptime->month = (png_byte)(ttime->tm_mon + 1); + ptime->day = (png_byte)ttime->tm_mday; + ptime->hour = (png_byte)ttime->tm_hour; + ptime->minute = (png_byte)ttime->tm_min; + ptime->second = (png_byte)ttime->tm_sec; +} + +void PNGAPI +png_convert_from_time_t(png_timep ptime, time_t ttime) +{ + struct tm *tbuf; + + png_debug(1, "in png_convert_from_time_t"); + + tbuf = gmtime(&ttime); + png_convert_from_struct_tm(ptime, tbuf); +} +#endif + +/* Initialize png_ptr structure, and allocate any memory needed */ +PNG_FUNCTION(png_structp,PNGAPI +png_create_write_struct,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn),PNG_ALLOCATED) +{ +#ifndef PNG_USER_MEM_SUPPORTED + png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr, + error_fn, warn_fn, NULL, NULL, NULL); +#else + return png_create_write_struct_2(user_png_ver, error_ptr, error_fn, + warn_fn, NULL, NULL, NULL); +} + +/* Alternate initialize png_ptr structure, and allocate any memory needed */ +PNG_FUNCTION(png_structp,PNGAPI +png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED) +{ + png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr, + error_fn, warn_fn, mem_ptr, malloc_fn, free_fn); +#endif /* PNG_USER_MEM_SUPPORTED */ + + /* Set the zlib control values to defaults; they can be overridden by the + * application after the struct has been created. + */ + png_ptr->zbuffer_size = PNG_ZBUF_SIZE; + + /* The 'zlib_strategy' setting is irrelevant because png_default_claim in + * pngwutil.c defaults it according to whether or not filters will be used, + * and ignores this setting. + */ + png_ptr->zlib_strategy = PNG_Z_DEFAULT_STRATEGY; + png_ptr->zlib_level = PNG_Z_DEFAULT_COMPRESSION; + png_ptr->zlib_mem_level = 8; + png_ptr->zlib_window_bits = 15; + png_ptr->zlib_method = 8; + +#ifdef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED + png_ptr->zlib_text_strategy = PNG_TEXT_Z_DEFAULT_STRATEGY; + png_ptr->zlib_text_level = PNG_TEXT_Z_DEFAULT_COMPRESSION; + png_ptr->zlib_text_mem_level = 8; + png_ptr->zlib_text_window_bits = 15; + png_ptr->zlib_text_method = 8; +#endif /* PNG_WRITE_COMPRESSED_TEXT_SUPPORTED */ + + /* This is a highly dubious configuration option; by default it is off, but + * it may be appropriate for private builds that are testing extensions not + * conformant to the current specification, or of applications that must not + * fail to write at all costs! + */ +# ifdef PNG_BENIGN_WRITE_ERRORS_SUPPORTED + png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; + /* In stable builds only warn if an application error can be completely + * handled. + */ +# endif + + /* App warnings are warnings in release (or release candidate) builds but + * are errors during development. + */ +# if PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC + png_ptr->flags |= PNG_FLAG_APP_WARNINGS_WARN; +# endif + + if (png_ptr != NULL) + { + /* TODO: delay this, it can be done in png_init_io() (if the app doesn't + * do it itself) avoiding setting the default function if it is not + * required. + */ + png_set_write_fn(png_ptr, NULL, NULL, NULL); + } + + return png_ptr; +} + + +/* Write a few rows of image data. If the image is interlaced, + * either you will have to write the 7 sub images, or, if you + * have called png_set_interlace_handling(), you will have to + * "write" the image seven times. + */ +void PNGAPI +png_write_rows(png_structrp png_ptr, png_bytepp row, + png_uint_32 num_rows) +{ + png_uint_32 i; /* row counter */ + png_bytepp rp; /* row pointer */ + + png_debug(1, "in png_write_rows"); + + if (png_ptr == NULL) + return; + + /* Loop through the rows */ + for (i = 0, rp = row; i < num_rows; i++, rp++) + { + png_write_row(png_ptr, *rp); + } +} + +/* Write the image. You only need to call this function once, even + * if you are writing an interlaced image. + */ +void PNGAPI +png_write_image(png_structrp png_ptr, png_bytepp image) +{ + png_uint_32 i; /* row index */ + int pass, num_pass; /* pass variables */ + png_bytepp rp; /* points to current row */ + + if (png_ptr == NULL) + return; + + png_debug(1, "in png_write_image"); + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* Initialize interlace handling. If image is not interlaced, + * this will set pass to 1 + */ + num_pass = png_set_interlace_handling(png_ptr); +#else + num_pass = 1; +#endif + /* Loop through passes */ + for (pass = 0; pass < num_pass; pass++) + { + /* Loop through image */ + for (i = 0, rp = image; i < png_ptr->height; i++, rp++) + { + png_write_row(png_ptr, *rp); + } + } +} + +/* Called by user to write a row of image data */ +void PNGAPI +png_write_row(png_structrp png_ptr, png_const_bytep row) +{ + /* 1.5.6: moved from png_struct to be a local structure: */ + png_row_info row_info; + + if (png_ptr == NULL) + return; + + png_debug2(1, "in png_write_row (row %u, pass %d)", + png_ptr->row_number, png_ptr->pass); + + /* Initialize transformations and other stuff if first time */ + if (png_ptr->row_number == 0 && png_ptr->pass == 0) + { + /* Make sure we wrote the header info */ + if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) + png_error(png_ptr, + "png_write_info was never called before png_write_row"); + + /* Check for transforms that have been set but were defined out */ +#if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED) + if (png_ptr->transformations & PNG_INVERT_MONO) + png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined"); +#endif + +#if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED) + if (png_ptr->transformations & PNG_FILLER) + png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined"); +#endif +#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \ + defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + png_warning(png_ptr, + "PNG_WRITE_PACKSWAP_SUPPORTED is not defined"); +#endif + +#if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED) + if (png_ptr->transformations & PNG_PACK) + png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined"); +#endif + +#if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED) + if (png_ptr->transformations & PNG_SHIFT) + png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined"); +#endif + +#if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED) + if (png_ptr->transformations & PNG_BGR) + png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined"); +#endif + +#if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED) + if (png_ptr->transformations & PNG_SWAP_BYTES) + png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined"); +#endif + + png_write_start_row(png_ptr); + } + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* If interlaced and not interested in row, return */ + if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) + { + switch (png_ptr->pass) + { + case 0: + if (png_ptr->row_number & 0x07) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 1: + if ((png_ptr->row_number & 0x07) || png_ptr->width < 5) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 2: + if ((png_ptr->row_number & 0x07) != 4) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 3: + if ((png_ptr->row_number & 0x03) || png_ptr->width < 3) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 4: + if ((png_ptr->row_number & 0x03) != 2) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 5: + if ((png_ptr->row_number & 0x01) || png_ptr->width < 2) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 6: + if (!(png_ptr->row_number & 0x01)) + { + png_write_finish_row(png_ptr); + return; + } + break; + + default: /* error: ignore it */ + break; + } + } +#endif + + /* Set up row info for transformations */ + row_info.color_type = png_ptr->color_type; + row_info.width = png_ptr->usr_width; + row_info.channels = png_ptr->usr_channels; + row_info.bit_depth = png_ptr->usr_bit_depth; + row_info.pixel_depth = (png_byte)(row_info.bit_depth * row_info.channels); + row_info.rowbytes = PNG_ROWBYTES(row_info.pixel_depth, row_info.width); + + png_debug1(3, "row_info->color_type = %d", row_info.color_type); + png_debug1(3, "row_info->width = %u", row_info.width); + png_debug1(3, "row_info->channels = %d", row_info.channels); + png_debug1(3, "row_info->bit_depth = %d", row_info.bit_depth); + png_debug1(3, "row_info->pixel_depth = %d", row_info.pixel_depth); + png_debug1(3, "row_info->rowbytes = %lu", (unsigned long)row_info.rowbytes); + + /* Copy user's row into buffer, leaving room for filter byte. */ + memcpy(png_ptr->row_buf + 1, row, row_info.rowbytes); + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* Handle interlacing */ + if (png_ptr->interlaced && png_ptr->pass < 6 && + (png_ptr->transformations & PNG_INTERLACE)) + { + png_do_write_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass); + /* This should always get caught above, but still ... */ + if (!(row_info.width)) + { + png_write_finish_row(png_ptr); + return; + } + } +#endif + +#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED + /* Handle other transformations */ + if (png_ptr->transformations) + png_do_write_transformations(png_ptr, &row_info); +#endif + + /* At this point the row_info pixel depth must match the 'transformed' depth, + * which is also the output depth. + */ + if (row_info.pixel_depth != png_ptr->pixel_depth || + row_info.pixel_depth != png_ptr->transformed_pixel_depth) + png_error(png_ptr, "internal write transform logic error"); + +#ifdef PNG_MNG_FEATURES_SUPPORTED + /* Write filter_method 64 (intrapixel differencing) only if + * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and + * 2. Libpng did not write a PNG signature (this filter_method is only + * used in PNG datastreams that are embedded in MNG datastreams) and + * 3. The application called png_permit_mng_features with a mask that + * included PNG_FLAG_MNG_FILTER_64 and + * 4. The filter_method is 64 and + * 5. The color_type is RGB or RGBA + */ + if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) + { + /* Intrapixel differencing */ + png_do_write_intrapixel(&row_info, png_ptr->row_buf + 1); + } +#endif + +/* Added at libpng-1.5.10 */ +#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED + /* Check for out-of-range palette index */ + if (row_info.color_type == PNG_COLOR_TYPE_PALETTE && + png_ptr->num_palette_max >= 0) + png_do_check_palette_indexes(png_ptr, &row_info); +#endif + + /* Find a filter if necessary, filter the row and write it out. */ + png_write_find_filter(png_ptr, &row_info); + + if (png_ptr->write_row_fn != NULL) + (*(png_ptr->write_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); +} + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +/* Set the automatic flush interval or 0 to turn flushing off */ +void PNGAPI +png_set_flush(png_structrp png_ptr, int nrows) +{ + png_debug(1, "in png_set_flush"); + + if (png_ptr == NULL) + return; + + png_ptr->flush_dist = (nrows < 0 ? 0 : nrows); +} + +/* Flush the current output buffers now */ +void PNGAPI +png_write_flush(png_structrp png_ptr) +{ + png_debug(1, "in png_write_flush"); + + if (png_ptr == NULL) + return; + + /* We have already written out all of the data */ + if (png_ptr->row_number >= png_ptr->num_rows) + return; + + png_compress_IDAT(png_ptr, NULL, 0, Z_SYNC_FLUSH); + png_ptr->flush_rows = 0; + png_flush(png_ptr); +} +#endif /* PNG_WRITE_FLUSH_SUPPORTED */ + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +static void png_reset_filter_heuristics(png_structrp png_ptr);/* forward decl */ +#endif + +/* Free any memory used in png_ptr struct without freeing the struct itself. */ +static void +png_write_destroy(png_structrp png_ptr) +{ + png_debug(1, "in png_write_destroy"); + + /* Free any memory zlib uses */ + if (png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) + deflateEnd(&png_ptr->zstream); + + /* Free our memory. png_free checks NULL for us. */ + png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list); + png_free(png_ptr, png_ptr->row_buf); +#ifdef PNG_WRITE_FILTER_SUPPORTED + png_free(png_ptr, png_ptr->prev_row); + png_free(png_ptr, png_ptr->sub_row); + png_free(png_ptr, png_ptr->up_row); + png_free(png_ptr, png_ptr->avg_row); + png_free(png_ptr, png_ptr->paeth_row); +#endif + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + /* Use this to save a little code space, it doesn't free the filter_costs */ + png_reset_filter_heuristics(png_ptr); + png_free(png_ptr, png_ptr->filter_costs); + png_free(png_ptr, png_ptr->inv_filter_costs); +#endif + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + png_free(png_ptr, png_ptr->chunk_list); +#endif + + /* The error handling and memory handling information is left intact at this + * point: the jmp_buf may still have to be freed. See png_destroy_png_struct + * for how this happens. + */ +} + +/* Free all memory used by the write. + * In libpng 1.6.0 this API changed quietly to no longer accept a NULL value for + * *png_ptr_ptr. Prior to 1.6.0 it would accept such a value and it would free + * the passed in info_structs but it would quietly fail to free any of the data + * inside them. In 1.6.0 it quietly does nothing (it has to be quiet because it + * has no png_ptr.) + */ +void PNGAPI +png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr) +{ + png_debug(1, "in png_destroy_write_struct"); + + if (png_ptr_ptr != NULL) + { + png_structrp png_ptr = *png_ptr_ptr; + + if (png_ptr != NULL) /* added in libpng 1.6.0 */ + { + png_destroy_info_struct(png_ptr, info_ptr_ptr); + + *png_ptr_ptr = NULL; + png_write_destroy(png_ptr); + png_destroy_png_struct(png_ptr); + } + } +} + +/* Allow the application to select one or more row filters to use. */ +void PNGAPI +png_set_filter(png_structrp png_ptr, int method, int filters) +{ + png_debug(1, "in png_set_filter"); + + if (png_ptr == NULL) + return; + +#ifdef PNG_MNG_FEATURES_SUPPORTED + if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + (method == PNG_INTRAPIXEL_DIFFERENCING)) + method = PNG_FILTER_TYPE_BASE; + +#endif + if (method == PNG_FILTER_TYPE_BASE) + { + switch (filters & (PNG_ALL_FILTERS | 0x07)) + { +#ifdef PNG_WRITE_FILTER_SUPPORTED + case 5: + case 6: + case 7: png_app_error(png_ptr, "Unknown row filter for method 0"); + /* FALL THROUGH */ +#endif /* PNG_WRITE_FILTER_SUPPORTED */ + case PNG_FILTER_VALUE_NONE: + png_ptr->do_filter = PNG_FILTER_NONE; break; + +#ifdef PNG_WRITE_FILTER_SUPPORTED + case PNG_FILTER_VALUE_SUB: + png_ptr->do_filter = PNG_FILTER_SUB; break; + + case PNG_FILTER_VALUE_UP: + png_ptr->do_filter = PNG_FILTER_UP; break; + + case PNG_FILTER_VALUE_AVG: + png_ptr->do_filter = PNG_FILTER_AVG; break; + + case PNG_FILTER_VALUE_PAETH: + png_ptr->do_filter = PNG_FILTER_PAETH; break; + + default: + png_ptr->do_filter = (png_byte)filters; break; +#else + default: + png_app_error(png_ptr, "Unknown row filter for method 0"); +#endif /* PNG_WRITE_FILTER_SUPPORTED */ + } + + /* If we have allocated the row_buf, this means we have already started + * with the image and we should have allocated all of the filter buffers + * that have been selected. If prev_row isn't already allocated, then + * it is too late to start using the filters that need it, since we + * will be missing the data in the previous row. If an application + * wants to start and stop using particular filters during compression, + * it should start out with all of the filters, and then add and + * remove them after the start of compression. + */ + if (png_ptr->row_buf != NULL) + { +#ifdef PNG_WRITE_FILTER_SUPPORTED + if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL) + { + png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; + } + + if ((png_ptr->do_filter & PNG_FILTER_UP) && png_ptr->up_row == NULL) + { + if (png_ptr->prev_row == NULL) + { + png_warning(png_ptr, "Can't add Up filter after starting"); + png_ptr->do_filter = (png_byte)(png_ptr->do_filter & + ~PNG_FILTER_UP); + } + + else + { + png_ptr->up_row = (png_bytep)png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; + } + } + + if ((png_ptr->do_filter & PNG_FILTER_AVG) && png_ptr->avg_row == NULL) + { + if (png_ptr->prev_row == NULL) + { + png_warning(png_ptr, "Can't add Average filter after starting"); + png_ptr->do_filter = (png_byte)(png_ptr->do_filter & + ~PNG_FILTER_AVG); + } + + else + { + png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; + } + } + + if ((png_ptr->do_filter & PNG_FILTER_PAETH) && + png_ptr->paeth_row == NULL) + { + if (png_ptr->prev_row == NULL) + { + png_warning(png_ptr, "Can't add Paeth filter after starting"); + png_ptr->do_filter &= (png_byte)(~PNG_FILTER_PAETH); + } + + else + { + png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; + } + } + + if (png_ptr->do_filter == PNG_NO_FILTERS) +#endif /* PNG_WRITE_FILTER_SUPPORTED */ + png_ptr->do_filter = PNG_FILTER_NONE; + } + } + else + png_error(png_ptr, "Unknown custom filter method"); +} + +/* This allows us to influence the way in which libpng chooses the "best" + * filter for the current scanline. While the "minimum-sum-of-absolute- + * differences metric is relatively fast and effective, there is some + * question as to whether it can be improved upon by trying to keep the + * filtered data going to zlib more consistent, hopefully resulting in + * better compression. + */ +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* GRR 970116 */ +/* Convenience reset API. */ +static void +png_reset_filter_heuristics(png_structrp png_ptr) +{ + /* Clear out any old values in the 'weights' - this must be done because if + * the app calls set_filter_heuristics multiple times with different + * 'num_weights' values we would otherwise potentially have wrong sized + * arrays. + */ + png_ptr->num_prev_filters = 0; + png_ptr->heuristic_method = PNG_FILTER_HEURISTIC_UNWEIGHTED; + if (png_ptr->prev_filters != NULL) + { + png_bytep old = png_ptr->prev_filters; + png_ptr->prev_filters = NULL; + png_free(png_ptr, old); + } + if (png_ptr->filter_weights != NULL) + { + png_uint_16p old = png_ptr->filter_weights; + png_ptr->filter_weights = NULL; + png_free(png_ptr, old); + } + + if (png_ptr->inv_filter_weights != NULL) + { + png_uint_16p old = png_ptr->inv_filter_weights; + png_ptr->inv_filter_weights = NULL; + png_free(png_ptr, old); + } + + /* Leave the filter_costs - this array is fixed size. */ +} + +static int +png_init_filter_heuristics(png_structrp png_ptr, int heuristic_method, + int num_weights) +{ + if (png_ptr == NULL) + return 0; + + /* Clear out the arrays */ + png_reset_filter_heuristics(png_ptr); + + /* Check arguments; the 'reset' function makes the correct settings for the + * unweighted case, but we must handle the weight case by initializing the + * arrays for the caller. + */ + if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int i; + + if (num_weights > 0) + { + png_ptr->prev_filters = (png_bytep)png_malloc(png_ptr, + (png_uint_32)((sizeof (png_byte)) * num_weights)); + + /* To make sure that the weighting starts out fairly */ + for (i = 0; i < num_weights; i++) + { + png_ptr->prev_filters[i] = 255; + } + + png_ptr->filter_weights = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)((sizeof (png_uint_16)) * num_weights)); + + png_ptr->inv_filter_weights = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)((sizeof (png_uint_16)) * num_weights)); + + for (i = 0; i < num_weights; i++) + { + png_ptr->inv_filter_weights[i] = + png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; + } + + /* Safe to set this now */ + png_ptr->num_prev_filters = (png_byte)num_weights; + } + + /* If, in the future, there are other filter methods, this would + * need to be based on png_ptr->filter. + */ + if (png_ptr->filter_costs == NULL) + { + png_ptr->filter_costs = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)((sizeof (png_uint_16)) * PNG_FILTER_VALUE_LAST)); + + png_ptr->inv_filter_costs = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)((sizeof (png_uint_16)) * PNG_FILTER_VALUE_LAST)); + } + + for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) + { + png_ptr->inv_filter_costs[i] = + png_ptr->filter_costs[i] = PNG_COST_FACTOR; + } + + /* All the arrays are inited, safe to set this: */ + png_ptr->heuristic_method = PNG_FILTER_HEURISTIC_WEIGHTED; + + /* Return the 'ok' code. */ + return 1; + } + else if (heuristic_method == PNG_FILTER_HEURISTIC_DEFAULT || + heuristic_method == PNG_FILTER_HEURISTIC_UNWEIGHTED) + { + return 1; + } + else + { + png_warning(png_ptr, "Unknown filter heuristic method"); + return 0; + } +} + +/* Provide floating and fixed point APIs */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_filter_heuristics(png_structrp png_ptr, int heuristic_method, + int num_weights, png_const_doublep filter_weights, + png_const_doublep filter_costs) +{ + png_debug(1, "in png_set_filter_heuristics"); + + /* The internal API allocates all the arrays and ensures that the elements of + * those arrays are set to the default value. + */ + if (!png_init_filter_heuristics(png_ptr, heuristic_method, num_weights)) + return; + + /* If using the weighted method copy in the weights. */ + if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int i; + for (i = 0; i < num_weights; i++) + { + if (filter_weights[i] <= 0.0) + { + png_ptr->inv_filter_weights[i] = + png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; + } + + else + { + png_ptr->inv_filter_weights[i] = + (png_uint_16)(PNG_WEIGHT_FACTOR*filter_weights[i]+.5); + + png_ptr->filter_weights[i] = + (png_uint_16)(PNG_WEIGHT_FACTOR/filter_weights[i]+.5); + } + } + + /* Here is where we set the relative costs of the different filters. We + * should take the desired compression level into account when setting + * the costs, so that Paeth, for instance, has a high relative cost at low + * compression levels, while it has a lower relative cost at higher + * compression settings. The filter types are in order of increasing + * relative cost, so it would be possible to do this with an algorithm. + */ + for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) if (filter_costs[i] >= 1.0) + { + png_ptr->inv_filter_costs[i] = + (png_uint_16)(PNG_COST_FACTOR / filter_costs[i] + .5); + + png_ptr->filter_costs[i] = + (png_uint_16)(PNG_COST_FACTOR * filter_costs[i] + .5); + } + } +} +#endif /* FLOATING_POINT */ + +#ifdef PNG_FIXED_POINT_SUPPORTED +void PNGAPI +png_set_filter_heuristics_fixed(png_structrp png_ptr, int heuristic_method, + int num_weights, png_const_fixed_point_p filter_weights, + png_const_fixed_point_p filter_costs) +{ + png_debug(1, "in png_set_filter_heuristics_fixed"); + + /* The internal API allocates all the arrays and ensures that the elements of + * those arrays are set to the default value. + */ + if (!png_init_filter_heuristics(png_ptr, heuristic_method, num_weights)) + return; + + /* If using the weighted method copy in the weights. */ + if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int i; + for (i = 0; i < num_weights; i++) + { + if (filter_weights[i] <= 0) + { + png_ptr->inv_filter_weights[i] = + png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; + } + + else + { + png_ptr->inv_filter_weights[i] = (png_uint_16) + ((PNG_WEIGHT_FACTOR*filter_weights[i]+PNG_FP_HALF)/PNG_FP_1); + + png_ptr->filter_weights[i] = (png_uint_16)((PNG_WEIGHT_FACTOR* + PNG_FP_1+(filter_weights[i]/2))/filter_weights[i]); + } + } + + /* Here is where we set the relative costs of the different filters. We + * should take the desired compression level into account when setting + * the costs, so that Paeth, for instance, has a high relative cost at low + * compression levels, while it has a lower relative cost at higher + * compression settings. The filter types are in order of increasing + * relative cost, so it would be possible to do this with an algorithm. + */ + for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) + if (filter_costs[i] >= PNG_FP_1) + { + png_uint_32 tmp; + + /* Use a 32 bit unsigned temporary here because otherwise the + * intermediate value will be a 32 bit *signed* integer (ANSI rules) + * and this will get the wrong answer on division. + */ + tmp = PNG_COST_FACTOR*PNG_FP_1 + (filter_costs[i]/2); + tmp /= filter_costs[i]; + + png_ptr->inv_filter_costs[i] = (png_uint_16)tmp; + + tmp = PNG_COST_FACTOR * filter_costs[i] + PNG_FP_HALF; + tmp /= PNG_FP_1; + + png_ptr->filter_costs[i] = (png_uint_16)tmp; + } + } +} +#endif /* FIXED_POINT */ +#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ + +void PNGAPI +png_set_compression_level(png_structrp png_ptr, int level) +{ + png_debug(1, "in png_set_compression_level"); + + if (png_ptr == NULL) + return; + + png_ptr->zlib_level = level; +} + +void PNGAPI +png_set_compression_mem_level(png_structrp png_ptr, int mem_level) +{ + png_debug(1, "in png_set_compression_mem_level"); + + if (png_ptr == NULL) + return; + + png_ptr->zlib_mem_level = mem_level; +} + +void PNGAPI +png_set_compression_strategy(png_structrp png_ptr, int strategy) +{ + png_debug(1, "in png_set_compression_strategy"); + + if (png_ptr == NULL) + return; + + /* The flag setting here prevents the libpng dynamic selection of strategy. + */ + png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY; + png_ptr->zlib_strategy = strategy; +} + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +void PNGAPI +png_set_compression_window_bits(png_structrp png_ptr, int window_bits) +{ + if (png_ptr == NULL) + return; + + /* Prior to 1.6.0 this would warn but then set the window_bits value, this + * meant that negative window bits values could be selected which would cause + * libpng to write a non-standard PNG file with raw deflate or gzip + * compressed IDAT or ancillary chunks. Such files can be read and there is + * no warning on read, so this seems like a very bad idea. + */ + if (window_bits > 15) + { + png_warning(png_ptr, "Only compression windows <= 32k supported by PNG"); + window_bits = 15; + } + + else if (window_bits < 8) + { + png_warning(png_ptr, "Only compression windows >= 256 supported by PNG"); + window_bits = 8; + } + + png_ptr->zlib_window_bits = window_bits; +} + +void PNGAPI +png_set_compression_method(png_structrp png_ptr, int method) +{ + png_debug(1, "in png_set_compression_method"); + + if (png_ptr == NULL) + return; + + /* This would produce an invalid PNG file if it worked, but it doesn't and + * deflate will fault it, so it is harmless to just warn here. + */ + if (method != 8) + png_warning(png_ptr, "Only compression method 8 is supported by PNG"); + + png_ptr->zlib_method = method; +} + +/* The following were added to libpng-1.5.4 */ +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +void PNGAPI +png_set_text_compression_level(png_structrp png_ptr, int level) +{ + png_debug(1, "in png_set_text_compression_level"); + + if (png_ptr == NULL) + return; + + png_ptr->zlib_text_level = level; +} + +void PNGAPI +png_set_text_compression_mem_level(png_structrp png_ptr, int mem_level) +{ + png_debug(1, "in png_set_text_compression_mem_level"); + + if (png_ptr == NULL) + return; + + png_ptr->zlib_text_mem_level = mem_level; +} + +void PNGAPI +png_set_text_compression_strategy(png_structrp png_ptr, int strategy) +{ + png_debug(1, "in png_set_text_compression_strategy"); + + if (png_ptr == NULL) + return; + + png_ptr->zlib_text_strategy = strategy; +} + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +void PNGAPI +png_set_text_compression_window_bits(png_structrp png_ptr, int window_bits) +{ + if (png_ptr == NULL) + return; + + if (window_bits > 15) + { + png_warning(png_ptr, "Only compression windows <= 32k supported by PNG"); + window_bits = 15; + } + + else if (window_bits < 8) + { + png_warning(png_ptr, "Only compression windows >= 256 supported by PNG"); + window_bits = 8; + } + + png_ptr->zlib_text_window_bits = window_bits; +} + +void PNGAPI +png_set_text_compression_method(png_structrp png_ptr, int method) +{ + png_debug(1, "in png_set_text_compression_method"); + + if (png_ptr == NULL) + return; + + if (method != 8) + png_warning(png_ptr, "Only compression method 8 is supported by PNG"); + + png_ptr->zlib_text_method = method; +} +#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */ +/* end of API added to libpng-1.5.4 */ + +void PNGAPI +png_set_write_status_fn(png_structrp png_ptr, png_write_status_ptr write_row_fn) +{ + if (png_ptr == NULL) + return; + + png_ptr->write_row_fn = write_row_fn; +} + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED +void PNGAPI +png_set_write_user_transform_fn(png_structrp png_ptr, png_user_transform_ptr + write_user_transform_fn) +{ + png_debug(1, "in png_set_write_user_transform_fn"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_USER_TRANSFORM; + png_ptr->write_user_transform_fn = write_user_transform_fn; +} +#endif + + +#ifdef PNG_INFO_IMAGE_SUPPORTED +void PNGAPI +png_write_png(png_structrp png_ptr, png_inforp info_ptr, + int transforms, voidp params) +{ + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* Write the file header information. */ + png_write_info(png_ptr, info_ptr); + + /* ------ these transformations don't touch the info structure ------- */ + +#ifdef PNG_WRITE_INVERT_SUPPORTED + /* Invert monochrome pixels */ + if (transforms & PNG_TRANSFORM_INVERT_MONO) + png_set_invert_mono(png_ptr); +#endif + +#ifdef PNG_WRITE_SHIFT_SUPPORTED + /* Shift the pixels up to a legal bit depth and fill in + * as appropriate to correctly scale the image. + */ + if ((transforms & PNG_TRANSFORM_SHIFT) + && (info_ptr->valid & PNG_INFO_sBIT)) + png_set_shift(png_ptr, &info_ptr->sig_bit); +#endif + +#ifdef PNG_WRITE_PACK_SUPPORTED + /* Pack pixels into bytes */ + if (transforms & PNG_TRANSFORM_PACKING) + png_set_packing(png_ptr); +#endif + +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED + /* Swap location of alpha bytes from ARGB to RGBA */ + if (transforms & PNG_TRANSFORM_SWAP_ALPHA) + png_set_swap_alpha(png_ptr); +#endif + +#ifdef PNG_WRITE_FILLER_SUPPORTED + /* Pack XRGB/RGBX/ARGB/RGBA into RGB (4 channels -> 3 channels) */ + if (transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER) + png_set_filler(png_ptr, 0, PNG_FILLER_AFTER); + + else if (transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE) + png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); +#endif + +#ifdef PNG_WRITE_BGR_SUPPORTED + /* Flip BGR pixels to RGB */ + if (transforms & PNG_TRANSFORM_BGR) + png_set_bgr(png_ptr); +#endif + +#ifdef PNG_WRITE_SWAP_SUPPORTED + /* Swap bytes of 16-bit files to most significant byte first */ + if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) + png_set_swap(png_ptr); +#endif + +#ifdef PNG_WRITE_PACKSWAP_SUPPORTED + /* Swap bits of 1, 2, 4 bit packed pixel formats */ + if (transforms & PNG_TRANSFORM_PACKSWAP) + png_set_packswap(png_ptr); +#endif + +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED + /* Invert the alpha channel from opacity to transparency */ + if (transforms & PNG_TRANSFORM_INVERT_ALPHA) + png_set_invert_alpha(png_ptr); +#endif + + /* ----------------------- end of transformations ------------------- */ + + /* Write the bits */ + if (info_ptr->valid & PNG_INFO_IDAT) + png_write_image(png_ptr, info_ptr->row_pointers); + + /* It is REQUIRED to call this to finish writing the rest of the file */ + png_write_end(png_ptr, info_ptr); + + PNG_UNUSED(transforms) /* Quiet compiler warnings */ + PNG_UNUSED(params) +} +#endif + + +#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED +#ifdef PNG_STDIO_SUPPORTED /* currently required for png_image_write_* */ +/* Initialize the write structure - general purpose utility. */ +static int +png_image_write_init(png_imagep image) +{ + png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, image, + png_safe_error, png_safe_warning); + + if (png_ptr != NULL) + { + png_infop info_ptr = png_create_info_struct(png_ptr); + + if (info_ptr != NULL) + { + png_controlp control = png_voidcast(png_controlp, + png_malloc_warn(png_ptr, (sizeof *control))); + + if (control != NULL) + { + memset(control, 0, (sizeof *control)); + + control->png_ptr = png_ptr; + control->info_ptr = info_ptr; + control->for_write = 1; + + image->opaque = control; + return 1; + } + + /* Error clean up */ + png_destroy_info_struct(png_ptr, &info_ptr); + } + + png_destroy_write_struct(&png_ptr, NULL); + } + + return png_image_error(image, "png_image_write_: out of memory"); +} + +/* Arguments to png_image_write_main: */ +typedef struct +{ + /* Arguments: */ + png_imagep image; + png_const_voidp buffer; + png_int_32 row_stride; + png_const_voidp colormap; + int convert_to_8bit; + /* Local variables: */ + png_const_voidp first_row; + ptrdiff_t row_bytes; + png_voidp local_row; +} png_image_write_control; + +/* Write png_uint_16 input to a 16-bit PNG; the png_ptr has already been set to + * do any necessary byte swapping. The component order is defined by the + * png_image format value. + */ +static int +png_write_image_16bit(png_voidp argument) +{ + png_image_write_control *display = png_voidcast(png_image_write_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + + png_const_uint_16p input_row = png_voidcast(png_const_uint_16p, + display->first_row); + png_uint_16p output_row = png_voidcast(png_uint_16p, display->local_row); + png_uint_16p row_end; + const int channels = (image->format & PNG_FORMAT_FLAG_COLOR) ? 3 : 1; + int aindex = 0; + png_uint_32 y = image->height; + + if (image->format & PNG_FORMAT_FLAG_ALPHA) + { + if (image->format & PNG_FORMAT_FLAG_AFIRST) + { + aindex = -1; + ++input_row; /* To point to the first component */ + ++output_row; + } + + else + aindex = channels; + } + + else + png_error(png_ptr, "png_write_image: internal call error"); + + /* Work out the output row end and count over this, note that the increment + * above to 'row' means that row_end can actually be beyond the end of the + * row; this is correct. + */ + row_end = output_row + image->width * (channels+1); + + while (y-- > 0) + { + png_const_uint_16p in_ptr = input_row; + png_uint_16p out_ptr = output_row; + + while (out_ptr < row_end) + { + const png_uint_16 alpha = in_ptr[aindex]; + png_uint_32 reciprocal = 0; + int c; + + out_ptr[aindex] = alpha; + + /* Calculate a reciprocal. The correct calculation is simply + * component/alpha*65535 << 15. (I.e. 15 bits of precision); this + * allows correct rounding by adding .5 before the shift. 'reciprocal' + * is only initialized when required. + */ + if (alpha > 0 && alpha < 65535) + reciprocal = ((0xffff<<15)+(alpha>>1))/alpha; + + c = channels; + do /* always at least one channel */ + { + png_uint_16 component = *in_ptr++; + + /* The following gives 65535 for an alpha of 0, which is fine, + * otherwise if 0/0 is represented as some other value there is more + * likely to be a discontinuity which will probably damage + * compression when moving from a fully transparent area to a + * nearly transparent one. (The assumption here is that opaque + * areas tend not to be 0 intensity.) + */ + if (component >= alpha) + component = 65535; + + /* component 0 && alpha < 65535) + { + png_uint_32 calc = component * reciprocal; + calc += 16384; /* round to nearest */ + component = (png_uint_16)(calc >> 15); + } + + *out_ptr++ = component; + } + while (--c > 0); + + /* Skip to next component (skip the intervening alpha channel) */ + ++in_ptr; + ++out_ptr; + } + + png_write_row(png_ptr, png_voidcast(png_const_bytep, display->local_row)); + input_row += display->row_bytes/(sizeof (png_uint_16)); + } + + return 1; +} + +/* Given 16-bit input (1 to 4 channels) write 8-bit output. If an alpha channel + * is present it must be removed from the components, the components are then + * written in sRGB encoding. No components are added or removed. + * + * Calculate an alpha reciprocal to reverse pre-multiplication. As above the + * calculation can be done to 15 bits of accuracy; however, the output needs to + * be scaled in the range 0..255*65535, so include that scaling here. + */ +#define UNP_RECIPROCAL(alpha) ((((0xffff*0xff)<<7)+(alpha>>1))/alpha) + +static png_byte +png_unpremultiply(png_uint_32 component, png_uint_32 alpha, + png_uint_32 reciprocal/*from the above macro*/) +{ + /* The following gives 1.0 for an alpha of 0, which is fine, otherwise if 0/0 + * is represented as some other value there is more likely to be a + * discontinuity which will probably damage compression when moving from a + * fully transparent area to a nearly transparent one. (The assumption here + * is that opaque areas tend not to be 0 intensity.) + * + * There is a rounding problem here; if alpha is less than 128 it will end up + * as 0 when scaled to 8 bits. To avoid introducing spurious colors into the + * output change for this too. + */ + if (component >= alpha || alpha < 128) + return 255; + + /* component 0) + { + /* The test is that alpha/257 (rounded) is less than 255, the first value + * that becomes 255 is 65407. + * NOTE: this must agree with the PNG_DIV257 macro (which must, therefore, + * be exact!) [Could also test reciprocal != 0] + */ + if (alpha < 65407) + { + component *= reciprocal; + component += 64; /* round to nearest */ + component >>= 7; + } + + else + component *= 255; + + /* Convert the component to sRGB. */ + return (png_byte)PNG_sRGB_FROM_LINEAR(component); + } + + else + return 0; +} + +static int +png_write_image_8bit(png_voidp argument) +{ + png_image_write_control *display = png_voidcast(png_image_write_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + + png_const_uint_16p input_row = png_voidcast(png_const_uint_16p, + display->first_row); + png_bytep output_row = png_voidcast(png_bytep, display->local_row); + png_uint_32 y = image->height; + const int channels = (image->format & PNG_FORMAT_FLAG_COLOR) ? 3 : 1; + + if (image->format & PNG_FORMAT_FLAG_ALPHA) + { + png_bytep row_end; + int aindex; + + if (image->format & PNG_FORMAT_FLAG_AFIRST) + { + aindex = -1; + ++input_row; /* To point to the first component */ + ++output_row; + } + + else + aindex = channels; + + /* Use row_end in place of a loop counter: */ + row_end = output_row + image->width * (channels+1); + + while (y-- > 0) + { + png_const_uint_16p in_ptr = input_row; + png_bytep out_ptr = output_row; + + while (out_ptr < row_end) + { + png_uint_16 alpha = in_ptr[aindex]; + png_byte alphabyte = (png_byte)PNG_DIV257(alpha); + png_uint_32 reciprocal = 0; + int c; + + /* Scale and write the alpha channel. */ + out_ptr[aindex] = alphabyte; + + if (alphabyte > 0 && alphabyte < 255) + reciprocal = UNP_RECIPROCAL(alpha); + + c = channels; + do /* always at least one channel */ + *out_ptr++ = png_unpremultiply(*in_ptr++, alpha, reciprocal); + while (--c > 0); + + /* Skip to next component (skip the intervening alpha channel) */ + ++in_ptr; + ++out_ptr; + } /* while out_ptr < row_end */ + + png_write_row(png_ptr, png_voidcast(png_const_bytep, + display->local_row)); + input_row += display->row_bytes/(sizeof (png_uint_16)); + } /* while y */ + } + + else + { + /* No alpha channel, so the row_end really is the end of the row and it + * is sufficient to loop over the components one by one. + */ + png_bytep row_end = output_row + image->width * channels; + + while (y-- > 0) + { + png_const_uint_16p in_ptr = input_row; + png_bytep out_ptr = output_row; + + while (out_ptr < row_end) + { + png_uint_32 component = *in_ptr++; + + component *= 255; + *out_ptr++ = (png_byte)PNG_sRGB_FROM_LINEAR(component); + } + + png_write_row(png_ptr, output_row); + input_row += display->row_bytes/(sizeof (png_uint_16)); + } + } + + return 1; +} + +static void +png_image_set_PLTE(png_image_write_control *display) +{ + const png_imagep image = display->image; + const void *cmap = display->colormap; + const int entries = image->colormap_entries > 256 ? 256 : + (int)image->colormap_entries; + + /* NOTE: the caller must check for cmap != NULL and entries != 0 */ + const png_uint_32 format = image->format; + const int channels = PNG_IMAGE_SAMPLE_CHANNELS(format); + +# ifdef PNG_FORMAT_BGR_SUPPORTED + const int afirst = (format & PNG_FORMAT_FLAG_AFIRST) != 0 && + (format & PNG_FORMAT_FLAG_ALPHA) != 0; +# else +# define afirst 0 +# endif + +# ifdef PNG_FORMAT_BGR_SUPPORTED + const int bgr = (format & PNG_FORMAT_FLAG_BGR) ? 2 : 0; +# else +# define bgr 0 +# endif + + int i, num_trans; + png_color palette[256]; + png_byte tRNS[256]; + + memset(tRNS, 255, (sizeof tRNS)); + memset(palette, 0, (sizeof palette)); + + for (i=num_trans=0; i= 3) /* RGB */ + { + palette[i].blue = (png_byte)PNG_sRGB_FROM_LINEAR(255 * + entry[(2 ^ bgr)]); + palette[i].green = (png_byte)PNG_sRGB_FROM_LINEAR(255 * + entry[1]); + palette[i].red = (png_byte)PNG_sRGB_FROM_LINEAR(255 * + entry[bgr]); + } + + else /* Gray */ + palette[i].blue = palette[i].red = palette[i].green = + (png_byte)PNG_sRGB_FROM_LINEAR(255 * *entry); + } + + else /* alpha */ + { + png_uint_16 alpha = entry[afirst ? 0 : channels-1]; + png_byte alphabyte = (png_byte)PNG_DIV257(alpha); + png_uint_32 reciprocal = 0; + + /* Calculate a reciprocal, as in the png_write_image_8bit code above + * this is designed to produce a value scaled to 255*65535 when + * divided by 128 (i.e. asr 7). + */ + if (alphabyte > 0 && alphabyte < 255) + reciprocal = (((0xffff*0xff)<<7)+(alpha>>1))/alpha; + + tRNS[i] = alphabyte; + if (alphabyte < 255) + num_trans = i+1; + + if (channels >= 3) /* RGB */ + { + palette[i].blue = png_unpremultiply(entry[afirst + (2 ^ bgr)], + alpha, reciprocal); + palette[i].green = png_unpremultiply(entry[afirst + 1], alpha, + reciprocal); + palette[i].red = png_unpremultiply(entry[afirst + bgr], alpha, + reciprocal); + } + + else /* gray */ + palette[i].blue = palette[i].red = palette[i].green = + png_unpremultiply(entry[afirst], alpha, reciprocal); + } + } + + else /* Color-map has sRGB values */ + { + png_const_bytep entry = png_voidcast(png_const_bytep, cmap); + + entry += i * channels; + + switch (channels) + { + case 4: + tRNS[i] = entry[afirst ? 0 : 3]; + if (tRNS[i] < 255) + num_trans = i+1; + /* FALL THROUGH */ + case 3: + palette[i].blue = entry[afirst + (2 ^ bgr)]; + palette[i].green = entry[afirst + 1]; + palette[i].red = entry[afirst + bgr]; + break; + + case 2: + tRNS[i] = entry[1 ^ afirst]; + if (tRNS[i] < 255) + num_trans = i+1; + /* FALL THROUGH */ + case 1: + palette[i].blue = palette[i].red = palette[i].green = + entry[afirst]; + break; + + default: + break; + } + } + } + +# ifdef afirst +# undef afirst +# endif +# ifdef bgr +# undef bgr +# endif + + png_set_PLTE(image->opaque->png_ptr, image->opaque->info_ptr, palette, + entries); + + if (num_trans > 0) + png_set_tRNS(image->opaque->png_ptr, image->opaque->info_ptr, tRNS, + num_trans, NULL); + + image->colormap_entries = entries; +} + +static int +png_image_write_main(png_voidp argument) +{ + png_image_write_control *display = png_voidcast(png_image_write_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + png_inforp info_ptr = image->opaque->info_ptr; + png_uint_32 format = image->format; + + int colormap = (format & PNG_FORMAT_FLAG_COLORMAP) != 0; + int linear = !colormap && (format & PNG_FORMAT_FLAG_LINEAR) != 0; /* input */ + int alpha = !colormap && (format & PNG_FORMAT_FLAG_ALPHA) != 0; + int write_16bit = linear && !colormap && !display->convert_to_8bit; + +# ifdef PNG_BENIGN_ERRORS_SUPPORTED + /* Make sure we error out on any bad situation */ + png_set_benign_errors(png_ptr, 0/*error*/); +# endif + + /* Default the 'row_stride' parameter if required. */ + if (display->row_stride == 0) + display->row_stride = PNG_IMAGE_ROW_STRIDE(*image); + + /* Set the required transforms then write the rows in the correct order. */ + if (format & PNG_FORMAT_FLAG_COLORMAP) + { + if (display->colormap != NULL && image->colormap_entries > 0) + { + png_uint_32 entries = image->colormap_entries; + + png_set_IHDR(png_ptr, info_ptr, image->width, image->height, + entries > 16 ? 8 : (entries > 4 ? 4 : (entries > 2 ? 2 : 1)), + PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + + png_image_set_PLTE(display); + } + + else + png_error(image->opaque->png_ptr, + "no color-map for color-mapped image"); + } + + else + png_set_IHDR(png_ptr, info_ptr, image->width, image->height, + write_16bit ? 16 : 8, + ((format & PNG_FORMAT_FLAG_COLOR) ? PNG_COLOR_MASK_COLOR : 0) + + ((format & PNG_FORMAT_FLAG_ALPHA) ? PNG_COLOR_MASK_ALPHA : 0), + PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + + /* Counter-intuitively the data transformations must be called *after* + * png_write_info, not before as in the read code, but the 'set' functions + * must still be called before. Just set the color space information, never + * write an interlaced image. + */ + + if (write_16bit) + { + /* The gamma here is 1.0 (linear) and the cHRM chunk matches sRGB. */ + png_set_gAMA_fixed(png_ptr, info_ptr, PNG_GAMMA_LINEAR); + + if (!(image->flags & PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB)) + png_set_cHRM_fixed(png_ptr, info_ptr, + /* color x y */ + /* white */ 31270, 32900, + /* red */ 64000, 33000, + /* green */ 30000, 60000, + /* blue */ 15000, 6000 + ); + } + + else if (!(image->flags & PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB)) + png_set_sRGB(png_ptr, info_ptr, PNG_sRGB_INTENT_PERCEPTUAL); + + /* Else writing an 8-bit file and the *colors* aren't sRGB, but the 8-bit + * space must still be gamma encoded. + */ + else + png_set_gAMA_fixed(png_ptr, info_ptr, PNG_GAMMA_sRGB_INVERSE); + + /* Write the file header. */ + png_write_info(png_ptr, info_ptr); + + /* Now set up the data transformations (*after* the header is written), + * remove the handled transformations from the 'format' flags for checking. + * + * First check for a little endian system if writing 16 bit files. + */ + if (write_16bit) + { + PNG_CONST png_uint_16 le = 0x0001; + + if (*(png_const_bytep)&le) + png_set_swap(png_ptr); + } + +# ifdef PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED + if (format & PNG_FORMAT_FLAG_BGR) + { + if (!colormap && (format & PNG_FORMAT_FLAG_COLOR) != 0) + png_set_bgr(png_ptr); + format &= ~PNG_FORMAT_FLAG_BGR; + } +# endif + +# ifdef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED + if (format & PNG_FORMAT_FLAG_AFIRST) + { + if (!colormap && (format & PNG_FORMAT_FLAG_ALPHA) != 0) + png_set_swap_alpha(png_ptr); + format &= ~PNG_FORMAT_FLAG_AFIRST; + } +# endif + + /* If there are 16 or fewer color-map entries we wrote a lower bit depth + * above, but the application data is still byte packed. + */ + if (colormap && image->colormap_entries <= 16) + png_set_packing(png_ptr); + + /* That should have handled all (both) the transforms. */ + if ((format & ~(png_uint_32)(PNG_FORMAT_FLAG_COLOR | PNG_FORMAT_FLAG_LINEAR | + PNG_FORMAT_FLAG_ALPHA | PNG_FORMAT_FLAG_COLORMAP)) != 0) + png_error(png_ptr, "png_write_image: unsupported transformation"); + + { + png_const_bytep row = png_voidcast(png_const_bytep, display->buffer); + ptrdiff_t row_bytes = display->row_stride; + + if (linear) + row_bytes *= (sizeof (png_uint_16)); + + if (row_bytes < 0) + row += (image->height-1) * (-row_bytes); + + display->first_row = row; + display->row_bytes = row_bytes; + } + + /* Apply 'fast' options if the flag is set. */ + if ((image->flags & PNG_IMAGE_FLAG_FAST) != 0) + { + png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, PNG_NO_FILTERS); + /* NOTE: determined by experiment using pngstest, this reflects some + * balance between the time to write the image once and the time to read + * it about 50 times. The speed-up in pngstest was about 10-20% of the + * total (user) time on a heavily loaded system. + */ + png_set_compression_level(png_ptr, 3); + } + + /* Check for the cases that currently require a pre-transform on the row + * before it is written. This only applies when the input is 16-bit and + * either there is an alpha channel or it is converted to 8-bit. + */ + if ((linear && alpha) || (!colormap && display->convert_to_8bit)) + { + png_bytep row = png_voidcast(png_bytep, png_malloc(png_ptr, + png_get_rowbytes(png_ptr, info_ptr))); + int result; + + display->local_row = row; + if (write_16bit) + result = png_safe_execute(image, png_write_image_16bit, display); + else + result = png_safe_execute(image, png_write_image_8bit, display); + display->local_row = NULL; + + png_free(png_ptr, row); + + /* Skip the 'write_end' on error: */ + if (!result) + return 0; + } + + /* Otherwise this is the case where the input is in a format currently + * supported by the rest of the libpng write code; call it directly. + */ + else + { + png_const_bytep row = png_voidcast(png_const_bytep, display->first_row); + ptrdiff_t row_bytes = display->row_bytes; + png_uint_32 y = image->height; + + while (y-- > 0) + { + png_write_row(png_ptr, row); + row += row_bytes; + } + } + + png_write_end(png_ptr, info_ptr); + return 1; +} + +int PNGAPI +png_image_write_to_stdio(png_imagep image, FILE *file, int convert_to_8bit, + const void *buffer, png_int_32 row_stride, const void *colormap) +{ + /* Write the image to the given (FILE*). */ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + if (file != NULL) + { + if (png_image_write_init(image)) + { + png_image_write_control display; + int result; + + /* This is slightly evil, but png_init_io doesn't do anything other + * than this and we haven't changed the standard IO functions so + * this saves a 'safe' function. + */ + image->opaque->png_ptr->io_ptr = file; + + memset(&display, 0, (sizeof display)); + display.image = image; + display.buffer = buffer; + display.row_stride = row_stride; + display.colormap = colormap; + display.convert_to_8bit = convert_to_8bit; + + result = png_safe_execute(image, png_image_write_main, &display); + png_image_free(image); + return result; + } + + else + return 0; + } + + else + return png_image_error(image, + "png_image_write_to_stdio: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_write_to_stdio: incorrect PNG_IMAGE_VERSION"); + + else + return 0; +} + +int PNGAPI +png_image_write_to_file(png_imagep image, const char *file_name, + int convert_to_8bit, const void *buffer, png_int_32 row_stride, + const void *colormap) +{ + /* Write the image to the named file. */ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + if (file_name != NULL) + { + FILE *fp = fopen(file_name, "wb"); + + if (fp != NULL) + { + if (png_image_write_to_stdio(image, fp, convert_to_8bit, buffer, + row_stride, colormap)) + { + int error; /* from fflush/fclose */ + + /* Make sure the file is flushed correctly. */ + if (fflush(fp) == 0 && ferror(fp) == 0) + { + if (fclose(fp) == 0) + return 1; + + error = errno; /* from fclose */ + } + + else + { + error = errno; /* from fflush or ferror */ + (void)fclose(fp); + } + + (void)remove(file_name); + /* The image has already been cleaned up; this is just used to + * set the error (because the original write succeeded). + */ + return png_image_error(image, strerror(error)); + } + + else + { + /* Clean up: just the opened file. */ + (void)fclose(fp); + (void)remove(file_name); + return 0; + } + } + + else + return png_image_error(image, strerror(errno)); + } + + else + return png_image_error(image, + "png_image_write_to_file: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_write_to_file: incorrect PNG_IMAGE_VERSION"); + + else + return 0; +} +#endif /* PNG_STDIO_SUPPORTED */ +#endif /* SIMPLIFIED_WRITE */ +#endif /* PNG_WRITE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwtran.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwtran.c new file mode 100644 index 0000000000..98703f8c81 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwtran.c @@ -0,0 +1,637 @@ + +/* pngwtran.c - transforms the data in a row for PNG writers + * + * Last changed in libpng 1.6.0 [February 14, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#include "pngpriv.h" + +#ifdef PNG_WRITE_SUPPORTED + +#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED +/* Transform the data according to the user's wishes. The order of + * transformations is significant. + */ +void /* PRIVATE */ +png_do_write_transformations(png_structrp png_ptr, png_row_infop row_info) +{ + png_debug(1, "in png_do_write_transformations"); + + if (png_ptr == NULL) + return; + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + if (png_ptr->transformations & PNG_USER_TRANSFORM) + if (png_ptr->write_user_transform_fn != NULL) + (*(png_ptr->write_user_transform_fn)) /* User write transform + function */ + (png_ptr, /* png_ptr */ + row_info, /* row_info: */ + /* png_uint_32 width; width of row */ + /* png_size_t rowbytes; number of bytes in row */ + /* png_byte color_type; color type of pixels */ + /* png_byte bit_depth; bit depth of samples */ + /* png_byte channels; number of channels (1-4) */ + /* png_byte pixel_depth; bits per pixel (depth*channels) */ + png_ptr->row_buf + 1); /* start of pixel data for row */ +#endif + +#ifdef PNG_WRITE_FILLER_SUPPORTED + if (png_ptr->transformations & PNG_FILLER) + png_do_strip_channel(row_info, png_ptr->row_buf + 1, + !(png_ptr->flags & PNG_FLAG_FILLER_AFTER)); +#endif + +#ifdef PNG_WRITE_PACKSWAP_SUPPORTED + if (png_ptr->transformations & PNG_PACKSWAP) + png_do_packswap(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_WRITE_PACK_SUPPORTED + if (png_ptr->transformations & PNG_PACK) + png_do_pack(row_info, png_ptr->row_buf + 1, + (png_uint_32)png_ptr->bit_depth); +#endif + +#ifdef PNG_WRITE_SWAP_SUPPORTED + if (png_ptr->transformations & PNG_SWAP_BYTES) + png_do_swap(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_WRITE_SHIFT_SUPPORTED + if (png_ptr->transformations & PNG_SHIFT) + png_do_shift(row_info, png_ptr->row_buf + 1, + &(png_ptr->shift)); +#endif + +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED + if (png_ptr->transformations & PNG_SWAP_ALPHA) + png_do_write_swap_alpha(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED + if (png_ptr->transformations & PNG_INVERT_ALPHA) + png_do_write_invert_alpha(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_WRITE_BGR_SUPPORTED + if (png_ptr->transformations & PNG_BGR) + png_do_bgr(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_WRITE_INVERT_SUPPORTED + if (png_ptr->transformations & PNG_INVERT_MONO) + png_do_invert(row_info, png_ptr->row_buf + 1); +#endif +} + +#ifdef PNG_WRITE_PACK_SUPPORTED +/* Pack pixels into bytes. Pass the true bit depth in bit_depth. The + * row_info bit depth should be 8 (one pixel per byte). The channels + * should be 1 (this only happens on grayscale and paletted images). + */ +void /* PRIVATE */ +png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) +{ + png_debug(1, "in png_do_pack"); + + if (row_info->bit_depth == 8 && + row_info->channels == 1) + { + switch ((int)bit_depth) + { + case 1: + { + png_bytep sp, dp; + int mask, v; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + sp = row; + dp = row; + mask = 0x80; + v = 0; + + for (i = 0; i < row_width; i++) + { + if (*sp != 0) + v |= mask; + + sp++; + + if (mask > 1) + mask >>= 1; + + else + { + mask = 0x80; + *dp = (png_byte)v; + dp++; + v = 0; + } + } + + if (mask != 0x80) + *dp = (png_byte)v; + + break; + } + + case 2: + { + png_bytep sp, dp; + int shift, v; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + sp = row; + dp = row; + shift = 6; + v = 0; + + for (i = 0; i < row_width; i++) + { + png_byte value; + + value = (png_byte)(*sp & 0x03); + v |= (value << shift); + + if (shift == 0) + { + shift = 6; + *dp = (png_byte)v; + dp++; + v = 0; + } + + else + shift -= 2; + + sp++; + } + + if (shift != 6) + *dp = (png_byte)v; + + break; + } + + case 4: + { + png_bytep sp, dp; + int shift, v; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + sp = row; + dp = row; + shift = 4; + v = 0; + + for (i = 0; i < row_width; i++) + { + png_byte value; + + value = (png_byte)(*sp & 0x0f); + v |= (value << shift); + + if (shift == 0) + { + shift = 4; + *dp = (png_byte)v; + dp++; + v = 0; + } + + else + shift -= 4; + + sp++; + } + + if (shift != 4) + *dp = (png_byte)v; + + break; + } + + default: + break; + } + + row_info->bit_depth = (png_byte)bit_depth; + row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, + row_info->width); + } +} +#endif + +#ifdef PNG_WRITE_SHIFT_SUPPORTED +/* Shift pixel values to take advantage of whole range. Pass the + * true number of bits in bit_depth. The row should be packed + * according to row_info->bit_depth. Thus, if you had a row of + * bit depth 4, but the pixels only had values from 0 to 7, you + * would pass 3 as bit_depth, and this routine would translate the + * data to 0 to 15. + */ +void /* PRIVATE */ +png_do_shift(png_row_infop row_info, png_bytep row, + png_const_color_8p bit_depth) +{ + png_debug(1, "in png_do_shift"); + + if (row_info->color_type != PNG_COLOR_TYPE_PALETTE) + { + int shift_start[4], shift_dec[4]; + int channels = 0; + + if (row_info->color_type & PNG_COLOR_MASK_COLOR) + { + shift_start[channels] = row_info->bit_depth - bit_depth->red; + shift_dec[channels] = bit_depth->red; + channels++; + + shift_start[channels] = row_info->bit_depth - bit_depth->green; + shift_dec[channels] = bit_depth->green; + channels++; + + shift_start[channels] = row_info->bit_depth - bit_depth->blue; + shift_dec[channels] = bit_depth->blue; + channels++; + } + + else + { + shift_start[channels] = row_info->bit_depth - bit_depth->gray; + shift_dec[channels] = bit_depth->gray; + channels++; + } + + if (row_info->color_type & PNG_COLOR_MASK_ALPHA) + { + shift_start[channels] = row_info->bit_depth - bit_depth->alpha; + shift_dec[channels] = bit_depth->alpha; + channels++; + } + + /* With low row depths, could only be grayscale, so one channel */ + if (row_info->bit_depth < 8) + { + png_bytep bp = row; + png_size_t i; + unsigned int mask; + png_size_t row_bytes = row_info->rowbytes; + + if (bit_depth->gray == 1 && row_info->bit_depth == 2) + mask = 0x55; + + else if (row_info->bit_depth == 4 && bit_depth->gray == 3) + mask = 0x11; + + else + mask = 0xff; + + for (i = 0; i < row_bytes; i++, bp++) + { + int j; + unsigned int v, out; + + v = *bp; + out = 0; + + for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0]) + { + if (j > 0) + out |= v << j; + + else + out |= (v >> (-j)) & mask; + } + + *bp = (png_byte)(out & 0xff); + } + } + + else if (row_info->bit_depth == 8) + { + png_bytep bp = row; + png_uint_32 i; + png_uint_32 istop = channels * row_info->width; + + for (i = 0; i < istop; i++, bp++) + { + + const unsigned int c = i%channels; + int j; + unsigned int v, out; + + v = *bp; + out = 0; + + for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) + { + if (j > 0) + out |= v << j; + + else + out |= v >> (-j); + } + + *bp = (png_byte)(out & 0xff); + } + } + + else + { + png_bytep bp; + png_uint_32 i; + png_uint_32 istop = channels * row_info->width; + + for (bp = row, i = 0; i < istop; i++) + { + const unsigned int c = i%channels; + int j; + unsigned int value, v; + + v = png_get_uint_16(bp); + value = 0; + + for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) + { + if (j > 0) + value |= v << j; + + else + value |= v >> (-j); + } + *bp++ = (png_byte)((value >> 8) & 0xff); + *bp++ = (png_byte)(value & 0xff); + } + } + } +} +#endif + +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED +void /* PRIVATE */ +png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_write_swap_alpha"); + + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This converts from ARGB to RGBA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save; + } + } + +#ifdef PNG_WRITE_16BIT_SUPPORTED + else + { + /* This converts from AARRGGBB to RRGGBBAA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save[2]; + save[0] = *(sp++); + save[1] = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save[0]; + *(dp++) = save[1]; + } + } +#endif /* PNG_WRITE_16BIT_SUPPORTED */ + } + + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This converts from AG to GA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save; + } + } + +#ifdef PNG_WRITE_16BIT_SUPPORTED + else + { + /* This converts from AAGG to GGAA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save[2]; + save[0] = *(sp++); + save[1] = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save[0]; + *(dp++) = save[1]; + } + } +#endif /* PNG_WRITE_16BIT_SUPPORTED */ + } + } +} +#endif + +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED +void /* PRIVATE */ +png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_write_invert_alpha"); + + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This inverts the alpha channel in RGBA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + /* Does nothing + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + */ + sp+=3; dp = sp; + *(dp++) = (png_byte)(255 - *(sp++)); + } + } + +#ifdef PNG_WRITE_16BIT_SUPPORTED + else + { + /* This inverts the alpha channel in RRGGBBAA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + /* Does nothing + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + */ + sp+=6; dp = sp; + *(dp++) = (png_byte)(255 - *(sp++)); + *(dp++) = (png_byte)(255 - *(sp++)); + } + } +#endif /* PNG_WRITE_16BIT_SUPPORTED */ + } + + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This inverts the alpha channel in GA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + *(dp++) = *(sp++); + *(dp++) = (png_byte)(255 - *(sp++)); + } + } + +#ifdef PNG_WRITE_16BIT_SUPPORTED + else + { + /* This inverts the alpha channel in GGAA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + /* Does nothing + *(dp++) = *(sp++); + *(dp++) = *(sp++); + */ + sp+=2; dp = sp; + *(dp++) = (png_byte)(255 - *(sp++)); + *(dp++) = (png_byte)(255 - *(sp++)); + } + } +#endif /* PNG_WRITE_16BIT_SUPPORTED */ + } + } +} +#endif +#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ + +#ifdef PNG_MNG_FEATURES_SUPPORTED +/* Undoes intrapixel differencing */ +void /* PRIVATE */ +png_do_write_intrapixel(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_write_intrapixel"); + + if ((row_info->color_type & PNG_COLOR_MASK_COLOR)) + { + int bytes_per_pixel; + png_uint_32 row_width = row_info->width; + if (row_info->bit_depth == 8) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 3; + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 4; + + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + *(rp) = (png_byte)((*rp - *(rp + 1)) & 0xff); + *(rp + 2) = (png_byte)((*(rp + 2) - *(rp + 1)) & 0xff); + } + } + +#ifdef PNG_WRITE_16BIT_SUPPORTED + else if (row_info->bit_depth == 16) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 6; + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 8; + + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + png_uint_32 s0 = (*(rp ) << 8) | *(rp + 1); + png_uint_32 s1 = (*(rp + 2) << 8) | *(rp + 3); + png_uint_32 s2 = (*(rp + 4) << 8) | *(rp + 5); + png_uint_32 red = (png_uint_32)((s0 - s1) & 0xffffL); + png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL); + *(rp ) = (png_byte)((red >> 8) & 0xff); + *(rp + 1) = (png_byte)(red & 0xff); + *(rp + 4) = (png_byte)((blue >> 8) & 0xff); + *(rp + 5) = (png_byte)(blue & 0xff); + } + } +#endif /* PNG_WRITE_16BIT_SUPPORTED */ + } +} +#endif /* PNG_MNG_FEATURES_SUPPORTED */ +#endif /* PNG_WRITE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwutil.c b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwutil.c new file mode 100644 index 0000000000..49e6a2d213 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/pngwutil.c @@ -0,0 +1,3023 @@ + +/* pngwutil.c - utilities to write a PNG file + * + * Last changed in libpng 1.6.2 [April 25, 2013] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#include "pngpriv.h" + +#ifdef PNG_WRITE_SUPPORTED + +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +/* Place a 32-bit number into a buffer in PNG byte order. We work + * with unsigned numbers for convenience, although one supported + * ancillary chunk uses signed (two's complement) numbers. + */ +void PNGAPI +png_save_uint_32(png_bytep buf, png_uint_32 i) +{ + buf[0] = (png_byte)((i >> 24) & 0xff); + buf[1] = (png_byte)((i >> 16) & 0xff); + buf[2] = (png_byte)((i >> 8) & 0xff); + buf[3] = (png_byte)(i & 0xff); +} + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +void PNGAPI +png_save_uint_16(png_bytep buf, unsigned int i) +{ + buf[0] = (png_byte)((i >> 8) & 0xff); + buf[1] = (png_byte)(i & 0xff); +} +#endif + +/* Simple function to write the signature. If we have already written + * the magic bytes of the signature, or more likely, the PNG stream is + * being embedded into another stream and doesn't need its own signature, + * we should call png_set_sig_bytes() to tell libpng how many of the + * bytes have already been written. + */ +void PNGAPI +png_write_sig(png_structrp png_ptr) +{ + png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10}; + +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that the signature is being written */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_SIGNATURE; +#endif + + /* Write the rest of the 8 byte signature */ + png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes], + (png_size_t)(8 - png_ptr->sig_bytes)); + + if (png_ptr->sig_bytes < 3) + png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; +} + +/* Write the start of a PNG chunk. The type is the chunk type. + * The total_length is the sum of the lengths of all the data you will be + * passing in png_write_chunk_data(). + */ +static void +png_write_chunk_header(png_structrp png_ptr, png_uint_32 chunk_name, + png_uint_32 length) +{ + png_byte buf[8]; + +#if defined(PNG_DEBUG) && (PNG_DEBUG > 0) + PNG_CSTRING_FROM_CHUNK(buf, chunk_name); + png_debug2(0, "Writing %s chunk, length = %lu", buf, (unsigned long)length); +#endif + + if (png_ptr == NULL) + return; + +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that the chunk header is being written. + * PNG_IO_CHUNK_HDR requires a single I/O call. + */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_HDR; +#endif + + /* Write the length and the chunk name */ + png_save_uint_32(buf, length); + png_save_uint_32(buf + 4, chunk_name); + png_write_data(png_ptr, buf, 8); + + /* Put the chunk name into png_ptr->chunk_name */ + png_ptr->chunk_name = chunk_name; + + /* Reset the crc and run it over the chunk name */ + png_reset_crc(png_ptr); + + png_calculate_crc(png_ptr, buf + 4, 4); + +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that chunk data will (possibly) be written. + * PNG_IO_CHUNK_DATA does NOT require a specific number of I/O calls. + */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_DATA; +#endif +} + +void PNGAPI +png_write_chunk_start(png_structrp png_ptr, png_const_bytep chunk_string, + png_uint_32 length) +{ + png_write_chunk_header(png_ptr, PNG_CHUNK_FROM_STRING(chunk_string), length); +} + +/* Write the data of a PNG chunk started with png_write_chunk_header(). + * Note that multiple calls to this function are allowed, and that the + * sum of the lengths from these calls *must* add up to the total_length + * given to png_write_chunk_header(). + */ +void PNGAPI +png_write_chunk_data(png_structrp png_ptr, png_const_bytep data, + png_size_t length) +{ + /* Write the data, and run the CRC over it */ + if (png_ptr == NULL) + return; + + if (data != NULL && length > 0) + { + png_write_data(png_ptr, data, length); + + /* Update the CRC after writing the data, + * in case that the user I/O routine alters it. + */ + png_calculate_crc(png_ptr, data, length); + } +} + +/* Finish a chunk started with png_write_chunk_header(). */ +void PNGAPI +png_write_chunk_end(png_structrp png_ptr) +{ + png_byte buf[4]; + + if (png_ptr == NULL) return; + +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that the chunk CRC is being written. + * PNG_IO_CHUNK_CRC requires a single I/O function call. + */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_CRC; +#endif + + /* Write the crc in a single operation */ + png_save_uint_32(buf, png_ptr->crc); + + png_write_data(png_ptr, buf, (png_size_t)4); +} + +/* Write a PNG chunk all at once. The type is an array of ASCII characters + * representing the chunk name. The array must be at least 4 bytes in + * length, and does not need to be null terminated. To be safe, pass the + * pre-defined chunk names here, and if you need a new one, define it + * where the others are defined. The length is the length of the data. + * All the data must be present. If that is not possible, use the + * png_write_chunk_start(), png_write_chunk_data(), and png_write_chunk_end() + * functions instead. + */ +static void +png_write_complete_chunk(png_structrp png_ptr, png_uint_32 chunk_name, + png_const_bytep data, png_size_t length) +{ + if (png_ptr == NULL) + return; + + /* On 64 bit architectures 'length' may not fit in a png_uint_32. */ + if (length > PNG_UINT_31_MAX) + png_error(png_ptr, "length exceeds PNG maxima"); + + png_write_chunk_header(png_ptr, chunk_name, (png_uint_32)length); + png_write_chunk_data(png_ptr, data, length); + png_write_chunk_end(png_ptr); +} + +/* This is the API that calls the internal function above. */ +void PNGAPI +png_write_chunk(png_structrp png_ptr, png_const_bytep chunk_string, + png_const_bytep data, png_size_t length) +{ + png_write_complete_chunk(png_ptr, PNG_CHUNK_FROM_STRING(chunk_string), data, + length); +} + +/* This is used below to find the size of an image to pass to png_deflate_claim, + * so it only needs to be accurate if the size is less than 16384 bytes (the + * point at which a lower LZ window size can be used.) + */ +static png_alloc_size_t +png_image_size(png_structrp png_ptr) +{ + /* Only return sizes up to the maximum of a png_uint_32, do this by limiting + * the width and height used to 15 bits. + */ + png_uint_32 h = png_ptr->height; + + if (png_ptr->rowbytes < 32768 && h < 32768) + { + if (png_ptr->interlaced) + { + /* Interlacing makes the image larger because of the replication of + * both the filter byte and the padding to a byte boundary. + */ + png_uint_32 w = png_ptr->width; + unsigned int pd = png_ptr->pixel_depth; + png_alloc_size_t cb_base; + int pass; + + for (cb_base=0, pass=0; pass<=6; ++pass) + { + png_uint_32 pw = PNG_PASS_COLS(w, pass); + + if (pw > 0) + cb_base += (PNG_ROWBYTES(pd, pw)+1) * PNG_PASS_ROWS(h, pass); + } + + return cb_base; + } + + else + return (png_ptr->rowbytes+1) * h; + } + + else + return 0xffffffffU; +} + +#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED + /* This is the code to hack the first two bytes of the deflate stream (the + * deflate header) to correct the windowBits value to match the actual data + * size. Note that the second argument is the *uncompressed* size but the + * first argument is the *compressed* data (and it must be deflate + * compressed.) + */ +static void +optimize_cmf(png_bytep data, png_alloc_size_t data_size) +{ + /* Optimize the CMF field in the zlib stream. The resultant zlib stream is + * still compliant to the stream specification. + */ + if (data_size <= 16384) /* else windowBits must be 15 */ + { + unsigned int z_cmf = data[0]; /* zlib compression method and flags */ + + if ((z_cmf & 0x0f) == 8 && (z_cmf & 0xf0) <= 0x70) + { + unsigned int z_cinfo; + unsigned int half_z_window_size; + + z_cinfo = z_cmf >> 4; + half_z_window_size = 1U << (z_cinfo + 7); + + if (data_size <= half_z_window_size) /* else no change */ + { + unsigned int tmp; + + do + { + half_z_window_size >>= 1; + --z_cinfo; + } + while (z_cinfo > 0 && data_size <= half_z_window_size); + + z_cmf = (z_cmf & 0x0f) | (z_cinfo << 4); + + data[0] = (png_byte)z_cmf; + tmp = data[1] & 0xe0; + tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f; + data[1] = (png_byte)tmp; + } + } + } +} +#else +# define optimize_cmf(dp,dl) ((void)0) +#endif /* PNG_WRITE_OPTIMIZE_CMF_SUPPORTED */ + +/* Initialize the compressor for the appropriate type of compression. */ +static int +png_deflate_claim(png_structrp png_ptr, png_uint_32 owner, + png_alloc_size_t data_size) +{ + if (png_ptr->zowner != 0) + { + char msg[64]; + + PNG_STRING_FROM_CHUNK(msg, owner); + msg[4] = ':'; + msg[5] = ' '; + PNG_STRING_FROM_CHUNK(msg+6, png_ptr->zowner); + /* So the message that results is " using zstream"; this is an + * internal error, but is very useful for debugging. i18n requirements + * are minimal. + */ + (void)png_safecat(msg, (sizeof msg), 10, " using zstream"); +# if PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC + png_warning(png_ptr, msg); + + /* Attempt sane error recovery */ + if (png_ptr->zowner == png_IDAT) /* don't steal from IDAT */ + { + png_ptr->zstream.msg = PNGZ_MSG_CAST("in use by IDAT"); + return Z_STREAM_ERROR; + } + + png_ptr->zowner = 0; +# else + png_error(png_ptr, msg); +# endif + } + + { + int level = png_ptr->zlib_level; + int method = png_ptr->zlib_method; + int windowBits = png_ptr->zlib_window_bits; + int memLevel = png_ptr->zlib_mem_level; + int strategy; /* set below */ + int ret; /* zlib return code */ + + if (owner == png_IDAT) + { + if (png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY) + strategy = png_ptr->zlib_strategy; + + else if (png_ptr->do_filter != PNG_FILTER_NONE) + strategy = PNG_Z_DEFAULT_STRATEGY; + + else + strategy = PNG_Z_DEFAULT_NOFILTER_STRATEGY; + } + + else + { +# ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED + level = png_ptr->zlib_text_level; + method = png_ptr->zlib_text_method; + windowBits = png_ptr->zlib_text_window_bits; + memLevel = png_ptr->zlib_text_mem_level; + strategy = png_ptr->zlib_text_strategy; +# else + /* If customization is not supported the values all come from the + * IDAT values except for the strategy, which is fixed to the + * default. (This is the pre-1.6.0 behavior too, although it was + * implemented in a very different way.) + */ + strategy = Z_DEFAULT_STRATEGY; +# endif + } + + /* Adjust 'windowBits' down if larger than 'data_size'; to stop this + * happening just pass 32768 as the data_size parameter. Notice that zlib + * requires an extra 262 bytes in the window in addition to the data to be + * able to see the whole of the data, so if data_size+262 takes us to the + * next windowBits size we need to fix up the value later. (Because even + * though deflate needs the extra window, inflate does not!) + */ + if (data_size <= 16384) + { + /* IMPLEMENTATION NOTE: this 'half_window_size' stuff is only here to + * work round a Microsoft Visual C misbehavior which, contrary to C-90, + * widens the result of the following shift to 64-bits if (and, + * apparently, only if) it is used in a test. + */ + unsigned int half_window_size = 1U << (windowBits-1); + + while (data_size + 262 <= half_window_size) + { + half_window_size >>= 1; + --windowBits; + } + } + + /* Check against the previous initialized values, if any. */ + if ((png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) && + (png_ptr->zlib_set_level != level || + png_ptr->zlib_set_method != method || + png_ptr->zlib_set_window_bits != windowBits || + png_ptr->zlib_set_mem_level != memLevel || + png_ptr->zlib_set_strategy != strategy)) + { + if (deflateEnd(&png_ptr->zstream) != Z_OK) + png_warning(png_ptr, "deflateEnd failed (ignored)"); + + png_ptr->flags &= ~PNG_FLAG_ZSTREAM_INITIALIZED; + } + + /* For safety clear out the input and output pointers (currently zlib + * doesn't use them on Init, but it might in the future). + */ + png_ptr->zstream.next_in = NULL; + png_ptr->zstream.avail_in = 0; + png_ptr->zstream.next_out = NULL; + png_ptr->zstream.avail_out = 0; + + /* Now initialize if required, setting the new parameters, otherwise just + * to a simple reset to the previous parameters. + */ + if (png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) + ret = deflateReset(&png_ptr->zstream); + + else + { + ret = deflateInit2(&png_ptr->zstream, level, method, windowBits, + memLevel, strategy); + + if (ret == Z_OK) + png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED; + } + + /* The return code is from either deflateReset or deflateInit2; they have + * pretty much the same set of error codes. + */ + if (ret == Z_OK) + png_ptr->zowner = owner; + + else + png_zstream_error(png_ptr, ret); + + return ret; + } +} + +/* Clean up (or trim) a linked list of compression buffers. */ +void /* PRIVATE */ +png_free_buffer_list(png_structrp png_ptr, png_compression_bufferp *listp) +{ + png_compression_bufferp list = *listp; + + if (list != NULL) + { + *listp = NULL; + + do + { + png_compression_bufferp next = list->next; + + png_free(png_ptr, list); + list = next; + } + while (list != NULL); + } +} + +#ifdef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED +/* This pair of functions encapsulates the operation of (a) compressing a + * text string, and (b) issuing it later as a series of chunk data writes. + * The compression_state structure is shared context for these functions + * set up by the caller to allow access to the relevant local variables. + * + * compression_buffer (new in 1.6.0) is just a linked list of zbuffer_size + * temporary buffers. From 1.6.0 it is retained in png_struct so that it will + * be correctly freed in the event of a write error (previous implementations + * just leaked memory.) + */ +typedef struct +{ + png_const_bytep input; /* The uncompressed input data */ + png_alloc_size_t input_len; /* Its length */ + png_uint_32 output_len; /* Final compressed length */ + png_byte output[1024]; /* First block of output */ +} compression_state; + +static void +png_text_compress_init(compression_state *comp, png_const_bytep input, + png_alloc_size_t input_len) +{ + comp->input = input; + comp->input_len = input_len; + comp->output_len = 0; +} + +/* Compress the data in the compression state input */ +static int +png_text_compress(png_structrp png_ptr, png_uint_32 chunk_name, + compression_state *comp, png_uint_32 prefix_len) +{ + int ret; + + /* To find the length of the output it is necessary to first compress the + * input, the result is buffered rather than using the two-pass algorithm + * that is used on the inflate side; deflate is assumed to be slower and a + * PNG writer is assumed to have more memory available than a PNG reader. + * + * IMPLEMENTATION NOTE: the zlib API deflateBound() can be used to find an + * upper limit on the output size, but it is always bigger than the input + * size so it is likely to be more efficient to use this linked-list + * approach. + */ + ret = png_deflate_claim(png_ptr, chunk_name, comp->input_len); + + if (ret != Z_OK) + return ret; + + /* Set up the compression buffers, we need a loop here to avoid overflowing a + * uInt. Use ZLIB_IO_MAX to limit the input. The output is always limited + * by the output buffer size, so there is no need to check that. Since this + * is ANSI-C we know that an 'int', hence a uInt, is always at least 16 bits + * in size. + */ + { + png_compression_bufferp *end = &png_ptr->zbuffer_list; + png_alloc_size_t input_len = comp->input_len; /* may be zero! */ + png_uint_32 output_len; + + /* zlib updates these for us: */ + png_ptr->zstream.next_in = PNGZ_INPUT_CAST(comp->input); + png_ptr->zstream.avail_in = 0; /* Set below */ + png_ptr->zstream.next_out = comp->output; + png_ptr->zstream.avail_out = (sizeof comp->output); + + output_len = png_ptr->zstream.avail_out; + + do + { + uInt avail_in = ZLIB_IO_MAX; + + if (avail_in > input_len) + avail_in = (uInt)input_len; + + input_len -= avail_in; + + png_ptr->zstream.avail_in = avail_in; + + if (png_ptr->zstream.avail_out == 0) + { + png_compression_buffer *next; + + /* Chunk data is limited to 2^31 bytes in length, so the prefix + * length must be counted here. + */ + if (output_len + prefix_len > PNG_UINT_31_MAX) + { + ret = Z_MEM_ERROR; + break; + } + + /* Need a new (malloc'ed) buffer, but there may be one present + * already. + */ + next = *end; + if (next == NULL) + { + next = png_voidcast(png_compression_bufferp, png_malloc_base + (png_ptr, PNG_COMPRESSION_BUFFER_SIZE(png_ptr))); + + if (next == NULL) + { + ret = Z_MEM_ERROR; + break; + } + + /* Link in this buffer (so that it will be freed later) */ + next->next = NULL; + *end = next; + } + + png_ptr->zstream.next_out = next->output; + png_ptr->zstream.avail_out = png_ptr->zbuffer_size; + output_len += png_ptr->zstream.avail_out; + + /* Move 'end' to the next buffer pointer. */ + end = &next->next; + } + + /* Compress the data */ + ret = deflate(&png_ptr->zstream, + input_len > 0 ? Z_NO_FLUSH : Z_FINISH); + + /* Claw back input data that was not consumed (because avail_in is + * reset above every time round the loop). + */ + input_len += png_ptr->zstream.avail_in; + png_ptr->zstream.avail_in = 0; /* safety */ + } + while (ret == Z_OK); + + /* There may be some space left in the last output buffer, this needs to + * be subtracted from output_len. + */ + output_len -= png_ptr->zstream.avail_out; + png_ptr->zstream.avail_out = 0; /* safety */ + comp->output_len = output_len; + + /* Now double check the output length, put in a custom message if it is + * too long. Otherwise ensure the z_stream::msg pointer is set to + * something. + */ + if (output_len + prefix_len >= PNG_UINT_31_MAX) + { + png_ptr->zstream.msg = PNGZ_MSG_CAST("compressed data too long"); + ret = Z_MEM_ERROR; + } + + else + png_zstream_error(png_ptr, ret); + + /* Reset zlib for another zTXt/iTXt or image data */ + png_ptr->zowner = 0; + + /* The only success case is Z_STREAM_END, input_len must be 0, if not this + * is an internal error. + */ + if (ret == Z_STREAM_END && input_len == 0) + { + /* Fix up the deflate header, if required */ + optimize_cmf(comp->output, comp->input_len); + + /* But Z_OK is returned, not Z_STREAM_END; this allows the claim + * function above to return Z_STREAM_END on an error (though it never + * does in the current versions of zlib.) + */ + return Z_OK; + } + + else + return ret; + } +} + +/* Ship the compressed text out via chunk writes */ +static void +png_write_compressed_data_out(png_structrp png_ptr, compression_state *comp) +{ + png_uint_32 output_len = comp->output_len; + png_const_bytep output = comp->output; + png_uint_32 avail = (sizeof comp->output); + png_compression_buffer *next = png_ptr->zbuffer_list; + + for (;;) + { + if (avail > output_len) + avail = output_len; + + png_write_chunk_data(png_ptr, output, avail); + + output_len -= avail; + + if (output_len == 0 || next == NULL) + break; + + avail = png_ptr->zbuffer_size; + output = next->output; + next = next->next; + } + + /* This is an internal error; 'next' must have been NULL! */ + if (output_len > 0) + png_error(png_ptr, "error writing ancillary chunked compressed data"); +} +#endif /* PNG_WRITE_COMPRESSED_TEXT_SUPPORTED */ + +#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ + defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) +/* Check that the tEXt or zTXt keyword is valid per PNG 1.0 specification, + * and if invalid, correct the keyword rather than discarding the entire + * chunk. The PNG 1.0 specification requires keywords 1-79 characters in + * length, forbids leading or trailing whitespace, multiple internal spaces, + * and the non-break space (0x80) from ISO 8859-1. Returns keyword length. + * + * The 'new_key' buffer must be 80 characters in size (for the keyword plus a + * trailing '\0'). If this routine returns 0 then there was no keyword, or a + * valid one could not be generated, and the caller must png_error. + */ +static png_uint_32 +png_check_keyword(png_structrp png_ptr, png_const_charp key, png_bytep new_key) +{ + png_const_charp orig_key = key; + png_uint_32 key_len = 0; + int bad_character = 0; + int space = 1; + + png_debug(1, "in png_check_keyword"); + + if (key == NULL) + { + *new_key = 0; + return 0; + } + + while (*key && key_len < 79) + { + png_byte ch = (png_byte)(0xff & *key++); + + if ((ch > 32 && ch <= 126) || (ch >= 161 /*&& ch <= 255*/)) + *new_key++ = ch, ++key_len, space = 0; + + else if (!space) + { + /* A space or an invalid character when one wasn't seen immediately + * before; output just a space. + */ + *new_key++ = 32, ++key_len, space = 1; + + /* If the character was not a space then it is invalid. */ + if (ch != 32) + bad_character = ch; + } + + else if (!bad_character) + bad_character = ch; /* just skip it, record the first error */ + } + + if (key_len > 0 && space) /* trailing space */ + { + --key_len, --new_key; + if (!bad_character) + bad_character = 32; + } + + /* Terminate the keyword */ + *new_key = 0; + + if (key_len == 0) + return 0; + + /* Try to only output one warning per keyword: */ + if (*key) /* keyword too long */ + png_warning(png_ptr, "keyword truncated"); + + else if (bad_character) + { + PNG_WARNING_PARAMETERS(p) + + png_warning_parameter(p, 1, orig_key); + png_warning_parameter_signed(p, 2, PNG_NUMBER_FORMAT_02x, bad_character); + + png_formatted_warning(png_ptr, p, "keyword \"@1\": bad character '0x@2'"); + } + + return key_len; +} +#endif + +/* Write the IHDR chunk, and update the png_struct with the necessary + * information. Note that the rest of this code depends upon this + * information being correct. + */ +void /* PRIVATE */ +png_write_IHDR(png_structrp png_ptr, png_uint_32 width, png_uint_32 height, + int bit_depth, int color_type, int compression_type, int filter_type, + int interlace_type) +{ + png_byte buf[13]; /* Buffer to store the IHDR info */ + + png_debug(1, "in png_write_IHDR"); + + /* Check that we have valid input data from the application info */ + switch (color_type) + { + case PNG_COLOR_TYPE_GRAY: + switch (bit_depth) + { + case 1: + case 2: + case 4: + case 8: +#ifdef PNG_WRITE_16BIT_SUPPORTED + case 16: +#endif + png_ptr->channels = 1; break; + + default: + png_error(png_ptr, + "Invalid bit depth for grayscale image"); + } + break; + + case PNG_COLOR_TYPE_RGB: +#ifdef PNG_WRITE_16BIT_SUPPORTED + if (bit_depth != 8 && bit_depth != 16) +#else + if (bit_depth != 8) +#endif + png_error(png_ptr, "Invalid bit depth for RGB image"); + + png_ptr->channels = 3; + break; + + case PNG_COLOR_TYPE_PALETTE: + switch (bit_depth) + { + case 1: + case 2: + case 4: + case 8: + png_ptr->channels = 1; + break; + + default: + png_error(png_ptr, "Invalid bit depth for paletted image"); + } + break; + + case PNG_COLOR_TYPE_GRAY_ALPHA: + if (bit_depth != 8 && bit_depth != 16) + png_error(png_ptr, "Invalid bit depth for grayscale+alpha image"); + + png_ptr->channels = 2; + break; + + case PNG_COLOR_TYPE_RGB_ALPHA: +#ifdef PNG_WRITE_16BIT_SUPPORTED + if (bit_depth != 8 && bit_depth != 16) +#else + if (bit_depth != 8) +#endif + png_error(png_ptr, "Invalid bit depth for RGBA image"); + + png_ptr->channels = 4; + break; + + default: + png_error(png_ptr, "Invalid image color type specified"); + } + + if (compression_type != PNG_COMPRESSION_TYPE_BASE) + { + png_warning(png_ptr, "Invalid compression type specified"); + compression_type = PNG_COMPRESSION_TYPE_BASE; + } + + /* Write filter_method 64 (intrapixel differencing) only if + * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and + * 2. Libpng did not write a PNG signature (this filter_method is only + * used in PNG datastreams that are embedded in MNG datastreams) and + * 3. The application called png_permit_mng_features with a mask that + * included PNG_FLAG_MNG_FILTER_64 and + * 4. The filter_method is 64 and + * 5. The color_type is RGB or RGBA + */ + if ( +#ifdef PNG_MNG_FEATURES_SUPPORTED + !((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) && + (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) && + (filter_type == PNG_INTRAPIXEL_DIFFERENCING)) && +#endif + filter_type != PNG_FILTER_TYPE_BASE) + { + png_warning(png_ptr, "Invalid filter type specified"); + filter_type = PNG_FILTER_TYPE_BASE; + } + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + if (interlace_type != PNG_INTERLACE_NONE && + interlace_type != PNG_INTERLACE_ADAM7) + { + png_warning(png_ptr, "Invalid interlace type specified"); + interlace_type = PNG_INTERLACE_ADAM7; + } +#else + interlace_type=PNG_INTERLACE_NONE; +#endif + + /* Save the relevent information */ + png_ptr->bit_depth = (png_byte)bit_depth; + png_ptr->color_type = (png_byte)color_type; + png_ptr->interlaced = (png_byte)interlace_type; +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_ptr->filter_type = (png_byte)filter_type; +#endif + png_ptr->compression_type = (png_byte)compression_type; + png_ptr->width = width; + png_ptr->height = height; + + png_ptr->pixel_depth = (png_byte)(bit_depth * png_ptr->channels); + png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width); + /* Set the usr info, so any transformations can modify it */ + png_ptr->usr_width = png_ptr->width; + png_ptr->usr_bit_depth = png_ptr->bit_depth; + png_ptr->usr_channels = png_ptr->channels; + + /* Pack the header information into the buffer */ + png_save_uint_32(buf, width); + png_save_uint_32(buf + 4, height); + buf[8] = (png_byte)bit_depth; + buf[9] = (png_byte)color_type; + buf[10] = (png_byte)compression_type; + buf[11] = (png_byte)filter_type; + buf[12] = (png_byte)interlace_type; + + /* Write the chunk */ + png_write_complete_chunk(png_ptr, png_IHDR, buf, (png_size_t)13); + + if (!(png_ptr->do_filter)) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE || + png_ptr->bit_depth < 8) + png_ptr->do_filter = PNG_FILTER_NONE; + + else + png_ptr->do_filter = PNG_ALL_FILTERS; + } + + png_ptr->mode = PNG_HAVE_IHDR; /* not READY_FOR_ZTXT */ +} + +/* Write the palette. We are careful not to trust png_color to be in the + * correct order for PNG, so people can redefine it to any convenient + * structure. + */ +void /* PRIVATE */ +png_write_PLTE(png_structrp png_ptr, png_const_colorp palette, + png_uint_32 num_pal) +{ + png_uint_32 i; + png_const_colorp pal_ptr; + png_byte buf[3]; + + png_debug(1, "in png_write_PLTE"); + + if (( +#ifdef PNG_MNG_FEATURES_SUPPORTED + !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) && +#endif + num_pal == 0) || num_pal > 256) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + png_error(png_ptr, "Invalid number of colors in palette"); + } + + else + { + png_warning(png_ptr, "Invalid number of colors in palette"); + return; + } + } + + if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR)) + { + png_warning(png_ptr, + "Ignoring request to write a PLTE chunk in grayscale PNG"); + + return; + } + + png_ptr->num_palette = (png_uint_16)num_pal; + png_debug1(3, "num_palette = %d", png_ptr->num_palette); + + png_write_chunk_header(png_ptr, png_PLTE, (png_uint_32)(num_pal * 3)); +#ifdef PNG_POINTER_INDEXING_SUPPORTED + + for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++) + { + buf[0] = pal_ptr->red; + buf[1] = pal_ptr->green; + buf[2] = pal_ptr->blue; + png_write_chunk_data(png_ptr, buf, (png_size_t)3); + } + +#else + /* This is a little slower but some buggy compilers need to do this + * instead + */ + pal_ptr=palette; + + for (i = 0; i < num_pal; i++) + { + buf[0] = pal_ptr[i].red; + buf[1] = pal_ptr[i].green; + buf[2] = pal_ptr[i].blue; + png_write_chunk_data(png_ptr, buf, (png_size_t)3); + } + +#endif + png_write_chunk_end(png_ptr); + png_ptr->mode |= PNG_HAVE_PLTE; +} + +/* This is similar to png_text_compress, above, except that it does not require + * all of the data at once and, instead of buffering the compressed result, + * writes it as IDAT chunks. Unlike png_text_compress it *can* png_error out + * because it calls the write interface. As a result it does its own error + * reporting and does not return an error code. In the event of error it will + * just call png_error. The input data length may exceed 32-bits. The 'flush' + * parameter is exactly the same as that to deflate, with the following + * meanings: + * + * Z_NO_FLUSH: normal incremental output of compressed data + * Z_SYNC_FLUSH: do a SYNC_FLUSH, used by png_write_flush + * Z_FINISH: this is the end of the input, do a Z_FINISH and clean up + * + * The routine manages the acquire and release of the png_ptr->zstream by + * checking and (at the end) clearing png_ptr->zowner, it does some sanity + * checks on the 'mode' flags while doing this. + */ +void /* PRIVATE */ +png_compress_IDAT(png_structrp png_ptr, png_const_bytep input, + png_alloc_size_t input_len, int flush) +{ + if (png_ptr->zowner != png_IDAT) + { + /* First time. Ensure we have a temporary buffer for compression and + * trim the buffer list if it has more than one entry to free memory. + * If 'WRITE_COMPRESSED_TEXT' is not set the list will never have been + * created at this point, but the check here is quick and safe. + */ + if (png_ptr->zbuffer_list == NULL) + { + png_ptr->zbuffer_list = png_voidcast(png_compression_bufferp, + png_malloc(png_ptr, PNG_COMPRESSION_BUFFER_SIZE(png_ptr))); + png_ptr->zbuffer_list->next = NULL; + } + + else + png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list->next); + + /* It is a terminal error if we can't claim the zstream. */ + if (png_deflate_claim(png_ptr, png_IDAT, png_image_size(png_ptr)) != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg); + + /* The output state is maintained in png_ptr->zstream, so it must be + * initialized here after the claim. + */ + png_ptr->zstream.next_out = png_ptr->zbuffer_list->output; + png_ptr->zstream.avail_out = png_ptr->zbuffer_size; + } + + /* Now loop reading and writing until all the input is consumed or an error + * terminates the operation. The _out values are maintained across calls to + * this function, but the input must be reset each time. + */ + png_ptr->zstream.next_in = PNGZ_INPUT_CAST(input); + png_ptr->zstream.avail_in = 0; /* set below */ + for (;;) + { + int ret; + + /* INPUT: from the row data */ + uInt avail = ZLIB_IO_MAX; + + if (avail > input_len) + avail = (uInt)input_len; /* safe because of the check */ + + png_ptr->zstream.avail_in = avail; + input_len -= avail; + + ret = deflate(&png_ptr->zstream, input_len > 0 ? Z_NO_FLUSH : flush); + + /* Include as-yet unconsumed input */ + input_len += png_ptr->zstream.avail_in; + png_ptr->zstream.avail_in = 0; + + /* OUTPUT: write complete IDAT chunks when avail_out drops to zero, note + * that these two zstream fields are preserved across the calls, therefore + * there is no need to set these up on entry to the loop. + */ + if (png_ptr->zstream.avail_out == 0) + { + png_bytep data = png_ptr->zbuffer_list->output; + uInt size = png_ptr->zbuffer_size; + + /* Write an IDAT containing the data then reset the buffer. The + * first IDAT may need deflate header optimization. + */ +# ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED + if (!(png_ptr->mode & PNG_HAVE_IDAT) && + png_ptr->compression_type == PNG_COMPRESSION_TYPE_BASE) + optimize_cmf(data, png_image_size(png_ptr)); +# endif + + png_write_complete_chunk(png_ptr, png_IDAT, data, size); + png_ptr->mode |= PNG_HAVE_IDAT; + + png_ptr->zstream.next_out = data; + png_ptr->zstream.avail_out = size; + + /* For SYNC_FLUSH or FINISH it is essential to keep calling zlib with + * the same flush parameter until it has finished output, for NO_FLUSH + * it doesn't matter. + */ + if (ret == Z_OK && flush != Z_NO_FLUSH) + continue; + } + + /* The order of these checks doesn't matter much; it just effect which + * possible error might be detected if multiple things go wrong at once. + */ + if (ret == Z_OK) /* most likely return code! */ + { + /* If all the input has been consumed then just return. If Z_FINISH + * was used as the flush parameter something has gone wrong if we get + * here. + */ + if (input_len == 0) + { + if (flush == Z_FINISH) + png_error(png_ptr, "Z_OK on Z_FINISH with output space"); + + return; + } + } + + else if (ret == Z_STREAM_END && flush == Z_FINISH) + { + /* This is the end of the IDAT data; any pending output must be + * flushed. For small PNG files we may still be at the beginning. + */ + png_bytep data = png_ptr->zbuffer_list->output; + uInt size = png_ptr->zbuffer_size - png_ptr->zstream.avail_out; + +# ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED + if (!(png_ptr->mode & PNG_HAVE_IDAT) && + png_ptr->compression_type == PNG_COMPRESSION_TYPE_BASE) + optimize_cmf(data, png_image_size(png_ptr)); +# endif + + png_write_complete_chunk(png_ptr, png_IDAT, data, size); + png_ptr->zstream.avail_out = 0; + png_ptr->zstream.next_out = NULL; + png_ptr->mode |= PNG_HAVE_IDAT | PNG_AFTER_IDAT; + + png_ptr->zowner = 0; /* Release the stream */ + return; + } + + else + { + /* This is an error condition. */ + png_zstream_error(png_ptr, ret); + png_error(png_ptr, png_ptr->zstream.msg); + } + } +} + +/* Write an IEND chunk */ +void /* PRIVATE */ +png_write_IEND(png_structrp png_ptr) +{ + png_debug(1, "in png_write_IEND"); + + png_write_complete_chunk(png_ptr, png_IEND, NULL, (png_size_t)0); + png_ptr->mode |= PNG_HAVE_IEND; +} + +#ifdef PNG_WRITE_gAMA_SUPPORTED +/* Write a gAMA chunk */ +void /* PRIVATE */ +png_write_gAMA_fixed(png_structrp png_ptr, png_fixed_point file_gamma) +{ + png_byte buf[4]; + + png_debug(1, "in png_write_gAMA"); + + /* file_gamma is saved in 1/100,000ths */ + png_save_uint_32(buf, (png_uint_32)file_gamma); + png_write_complete_chunk(png_ptr, png_gAMA, buf, (png_size_t)4); +} +#endif + +#ifdef PNG_WRITE_sRGB_SUPPORTED +/* Write a sRGB chunk */ +void /* PRIVATE */ +png_write_sRGB(png_structrp png_ptr, int srgb_intent) +{ + png_byte buf[1]; + + png_debug(1, "in png_write_sRGB"); + + if (srgb_intent >= PNG_sRGB_INTENT_LAST) + png_warning(png_ptr, + "Invalid sRGB rendering intent specified"); + + buf[0]=(png_byte)srgb_intent; + png_write_complete_chunk(png_ptr, png_sRGB, buf, (png_size_t)1); +} +#endif + +#ifdef PNG_WRITE_iCCP_SUPPORTED +/* Write an iCCP chunk */ +void /* PRIVATE */ +png_write_iCCP(png_structrp png_ptr, png_const_charp name, + png_const_bytep profile) +{ + png_uint_32 name_len; + png_uint_32 profile_len; + png_byte new_name[81]; /* 1 byte for the compression byte */ + compression_state comp; + + png_debug(1, "in png_write_iCCP"); + + /* These are all internal problems: the profile should have been checked + * before when it was stored. + */ + if (profile == NULL) + png_error(png_ptr, "No profile for iCCP chunk"); /* internal error */ + + profile_len = png_get_uint_32(profile); + + if (profile_len < 132) + png_error(png_ptr, "ICC profile too short"); + + if (profile_len & 0x03) + png_error(png_ptr, "ICC profile length invalid (not a multiple of 4)"); + + { + png_uint_32 embedded_profile_len = png_get_uint_32(profile); + + if (profile_len != embedded_profile_len) + png_error(png_ptr, "Profile length does not match profile"); + } + + name_len = png_check_keyword(png_ptr, name, new_name); + + if (name_len == 0) + png_error(png_ptr, "iCCP: invalid keyword"); + + new_name[++name_len] = PNG_COMPRESSION_TYPE_BASE; + + /* Make sure we include the NULL after the name and the compression type */ + ++name_len; + + png_text_compress_init(&comp, profile, profile_len); + + /* Allow for keyword terminator and compression byte */ + if (png_text_compress(png_ptr, png_iCCP, &comp, name_len) != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg); + + png_write_chunk_header(png_ptr, png_iCCP, name_len + comp.output_len); + + png_write_chunk_data(png_ptr, new_name, name_len); + + png_write_compressed_data_out(png_ptr, &comp); + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_sPLT_SUPPORTED +/* Write a sPLT chunk */ +void /* PRIVATE */ +png_write_sPLT(png_structrp png_ptr, png_const_sPLT_tp spalette) +{ + png_uint_32 name_len; + png_byte new_name[80]; + png_byte entrybuf[10]; + png_size_t entry_size = (spalette->depth == 8 ? 6 : 10); + png_size_t palette_size = entry_size * spalette->nentries; + png_sPLT_entryp ep; +#ifndef PNG_POINTER_INDEXING_SUPPORTED + int i; +#endif + + png_debug(1, "in png_write_sPLT"); + + name_len = png_check_keyword(png_ptr, spalette->name, new_name); + + if (name_len == 0) + png_error(png_ptr, "sPLT: invalid keyword"); + + /* Make sure we include the NULL after the name */ + png_write_chunk_header(png_ptr, png_sPLT, + (png_uint_32)(name_len + 2 + palette_size)); + + png_write_chunk_data(png_ptr, (png_bytep)new_name, + (png_size_t)(name_len + 1)); + + png_write_chunk_data(png_ptr, &spalette->depth, (png_size_t)1); + + /* Loop through each palette entry, writing appropriately */ +#ifdef PNG_POINTER_INDEXING_SUPPORTED + for (ep = spalette->entries; epentries + spalette->nentries; ep++) + { + if (spalette->depth == 8) + { + entrybuf[0] = (png_byte)ep->red; + entrybuf[1] = (png_byte)ep->green; + entrybuf[2] = (png_byte)ep->blue; + entrybuf[3] = (png_byte)ep->alpha; + png_save_uint_16(entrybuf + 4, ep->frequency); + } + + else + { + png_save_uint_16(entrybuf + 0, ep->red); + png_save_uint_16(entrybuf + 2, ep->green); + png_save_uint_16(entrybuf + 4, ep->blue); + png_save_uint_16(entrybuf + 6, ep->alpha); + png_save_uint_16(entrybuf + 8, ep->frequency); + } + + png_write_chunk_data(png_ptr, entrybuf, entry_size); + } +#else + ep=spalette->entries; + for (i = 0; i>spalette->nentries; i++) + { + if (spalette->depth == 8) + { + entrybuf[0] = (png_byte)ep[i].red; + entrybuf[1] = (png_byte)ep[i].green; + entrybuf[2] = (png_byte)ep[i].blue; + entrybuf[3] = (png_byte)ep[i].alpha; + png_save_uint_16(entrybuf + 4, ep[i].frequency); + } + + else + { + png_save_uint_16(entrybuf + 0, ep[i].red); + png_save_uint_16(entrybuf + 2, ep[i].green); + png_save_uint_16(entrybuf + 4, ep[i].blue); + png_save_uint_16(entrybuf + 6, ep[i].alpha); + png_save_uint_16(entrybuf + 8, ep[i].frequency); + } + + png_write_chunk_data(png_ptr, entrybuf, entry_size); + } +#endif + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_sBIT_SUPPORTED +/* Write the sBIT chunk */ +void /* PRIVATE */ +png_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type) +{ + png_byte buf[4]; + png_size_t size; + + png_debug(1, "in png_write_sBIT"); + + /* Make sure we don't depend upon the order of PNG_COLOR_8 */ + if (color_type & PNG_COLOR_MASK_COLOR) + { + png_byte maxbits; + + maxbits = (png_byte)(color_type==PNG_COLOR_TYPE_PALETTE ? 8 : + png_ptr->usr_bit_depth); + + if (sbit->red == 0 || sbit->red > maxbits || + sbit->green == 0 || sbit->green > maxbits || + sbit->blue == 0 || sbit->blue > maxbits) + { + png_warning(png_ptr, "Invalid sBIT depth specified"); + return; + } + + buf[0] = sbit->red; + buf[1] = sbit->green; + buf[2] = sbit->blue; + size = 3; + } + + else + { + if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth) + { + png_warning(png_ptr, "Invalid sBIT depth specified"); + return; + } + + buf[0] = sbit->gray; + size = 1; + } + + if (color_type & PNG_COLOR_MASK_ALPHA) + { + if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth) + { + png_warning(png_ptr, "Invalid sBIT depth specified"); + return; + } + + buf[size++] = sbit->alpha; + } + + png_write_complete_chunk(png_ptr, png_sBIT, buf, size); +} +#endif + +#ifdef PNG_WRITE_cHRM_SUPPORTED +/* Write the cHRM chunk */ +void /* PRIVATE */ +png_write_cHRM_fixed(png_structrp png_ptr, const png_xy *xy) +{ + png_byte buf[32]; + + png_debug(1, "in png_write_cHRM"); + + /* Each value is saved in 1/100,000ths */ + png_save_int_32(buf, xy->whitex); + png_save_int_32(buf + 4, xy->whitey); + + png_save_int_32(buf + 8, xy->redx); + png_save_int_32(buf + 12, xy->redy); + + png_save_int_32(buf + 16, xy->greenx); + png_save_int_32(buf + 20, xy->greeny); + + png_save_int_32(buf + 24, xy->bluex); + png_save_int_32(buf + 28, xy->bluey); + + png_write_complete_chunk(png_ptr, png_cHRM, buf, 32); +} +#endif + +#ifdef PNG_WRITE_tRNS_SUPPORTED +/* Write the tRNS chunk */ +void /* PRIVATE */ +png_write_tRNS(png_structrp png_ptr, png_const_bytep trans_alpha, + png_const_color_16p tran, int num_trans, int color_type) +{ + png_byte buf[6]; + + png_debug(1, "in png_write_tRNS"); + + if (color_type == PNG_COLOR_TYPE_PALETTE) + { + if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette) + { + png_app_warning(png_ptr, + "Invalid number of transparent colors specified"); + return; + } + + /* Write the chunk out as it is */ + png_write_complete_chunk(png_ptr, png_tRNS, trans_alpha, + (png_size_t)num_trans); + } + + else if (color_type == PNG_COLOR_TYPE_GRAY) + { + /* One 16 bit value */ + if (tran->gray >= (1 << png_ptr->bit_depth)) + { + png_app_warning(png_ptr, + "Ignoring attempt to write tRNS chunk out-of-range for bit_depth"); + + return; + } + + png_save_uint_16(buf, tran->gray); + png_write_complete_chunk(png_ptr, png_tRNS, buf, (png_size_t)2); + } + + else if (color_type == PNG_COLOR_TYPE_RGB) + { + /* Three 16 bit values */ + png_save_uint_16(buf, tran->red); + png_save_uint_16(buf + 2, tran->green); + png_save_uint_16(buf + 4, tran->blue); +#ifdef PNG_WRITE_16BIT_SUPPORTED + if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4])) +#else + if (buf[0] | buf[2] | buf[4]) +#endif + { + png_app_warning(png_ptr, + "Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8"); + return; + } + + png_write_complete_chunk(png_ptr, png_tRNS, buf, (png_size_t)6); + } + + else + { + png_app_warning(png_ptr, "Can't write tRNS with an alpha channel"); + } +} +#endif + +#ifdef PNG_WRITE_bKGD_SUPPORTED +/* Write the background chunk */ +void /* PRIVATE */ +png_write_bKGD(png_structrp png_ptr, png_const_color_16p back, int color_type) +{ + png_byte buf[6]; + + png_debug(1, "in png_write_bKGD"); + + if (color_type == PNG_COLOR_TYPE_PALETTE) + { + if ( +#ifdef PNG_MNG_FEATURES_SUPPORTED + (png_ptr->num_palette || + (!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE))) && +#endif + back->index >= png_ptr->num_palette) + { + png_warning(png_ptr, "Invalid background palette index"); + return; + } + + buf[0] = back->index; + png_write_complete_chunk(png_ptr, png_bKGD, buf, (png_size_t)1); + } + + else if (color_type & PNG_COLOR_MASK_COLOR) + { + png_save_uint_16(buf, back->red); + png_save_uint_16(buf + 2, back->green); + png_save_uint_16(buf + 4, back->blue); +#ifdef PNG_WRITE_16BIT_SUPPORTED + if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4])) +#else + if (buf[0] | buf[2] | buf[4]) +#endif + { + png_warning(png_ptr, + "Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8"); + + return; + } + + png_write_complete_chunk(png_ptr, png_bKGD, buf, (png_size_t)6); + } + + else + { + if (back->gray >= (1 << png_ptr->bit_depth)) + { + png_warning(png_ptr, + "Ignoring attempt to write bKGD chunk out-of-range for bit_depth"); + + return; + } + + png_save_uint_16(buf, back->gray); + png_write_complete_chunk(png_ptr, png_bKGD, buf, (png_size_t)2); + } +} +#endif + +#ifdef PNG_WRITE_hIST_SUPPORTED +/* Write the histogram */ +void /* PRIVATE */ +png_write_hIST(png_structrp png_ptr, png_const_uint_16p hist, int num_hist) +{ + int i; + png_byte buf[3]; + + png_debug(1, "in png_write_hIST"); + + if (num_hist > (int)png_ptr->num_palette) + { + png_debug2(3, "num_hist = %d, num_palette = %d", num_hist, + png_ptr->num_palette); + + png_warning(png_ptr, "Invalid number of histogram entries specified"); + return; + } + + png_write_chunk_header(png_ptr, png_hIST, (png_uint_32)(num_hist * 2)); + + for (i = 0; i < num_hist; i++) + { + png_save_uint_16(buf, hist[i]); + png_write_chunk_data(png_ptr, buf, (png_size_t)2); + } + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_tEXt_SUPPORTED +/* Write a tEXt chunk */ +void /* PRIVATE */ +png_write_tEXt(png_structrp png_ptr, png_const_charp key, png_const_charp text, + png_size_t text_len) +{ + png_uint_32 key_len; + png_byte new_key[80]; + + png_debug(1, "in png_write_tEXt"); + + key_len = png_check_keyword(png_ptr, key, new_key); + + if (key_len == 0) + png_error(png_ptr, "tEXt: invalid keyword"); + + if (text == NULL || *text == '\0') + text_len = 0; + + else + text_len = strlen(text); + + if (text_len > PNG_UINT_31_MAX - (key_len+1)) + png_error(png_ptr, "tEXt: text too long"); + + /* Make sure we include the 0 after the key */ + png_write_chunk_header(png_ptr, png_tEXt, + (png_uint_32)/*checked above*/(key_len + text_len + 1)); + /* + * We leave it to the application to meet PNG-1.0 requirements on the + * contents of the text. PNG-1.0 through PNG-1.2 discourage the use of + * any non-Latin-1 characters except for NEWLINE. ISO PNG will forbid them. + * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG. + */ + png_write_chunk_data(png_ptr, new_key, key_len + 1); + + if (text_len) + png_write_chunk_data(png_ptr, (png_const_bytep)text, text_len); + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_zTXt_SUPPORTED +/* Write a compressed text chunk */ +void /* PRIVATE */ +png_write_zTXt(png_structrp png_ptr, png_const_charp key, png_const_charp text, + png_size_t text_len, int compression) +{ + png_uint_32 key_len; + png_byte new_key[81]; + compression_state comp; + + png_debug(1, "in png_write_zTXt"); + PNG_UNUSED(text_len) /* Always use strlen */ + + if (compression == PNG_TEXT_COMPRESSION_NONE) + { + png_write_tEXt(png_ptr, key, text, 0); + return; + } + + if (compression != PNG_TEXT_COMPRESSION_zTXt) + png_error(png_ptr, "zTXt: invalid compression type"); + + key_len = png_check_keyword(png_ptr, key, new_key); + + if (key_len == 0) + png_error(png_ptr, "zTXt: invalid keyword"); + + /* Add the compression method and 1 for the keyword separator. */ + new_key[++key_len] = PNG_COMPRESSION_TYPE_BASE; + ++key_len; + + /* Compute the compressed data; do it now for the length */ + png_text_compress_init(&comp, (png_const_bytep)text, + text == NULL ? 0 : strlen(text)); + + if (png_text_compress(png_ptr, png_zTXt, &comp, key_len) != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg); + + /* Write start of chunk */ + png_write_chunk_header(png_ptr, png_zTXt, key_len + comp.output_len); + + /* Write key */ + png_write_chunk_data(png_ptr, new_key, key_len); + + /* Write the compressed data */ + png_write_compressed_data_out(png_ptr, &comp); + + /* Close the chunk */ + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_iTXt_SUPPORTED +/* Write an iTXt chunk */ +void /* PRIVATE */ +png_write_iTXt(png_structrp png_ptr, int compression, png_const_charp key, + png_const_charp lang, png_const_charp lang_key, png_const_charp text) +{ + png_uint_32 key_len, prefix_len; + png_size_t lang_len, lang_key_len; + png_byte new_key[82]; + compression_state comp; + + png_debug(1, "in png_write_iTXt"); + + key_len = png_check_keyword(png_ptr, key, new_key); + + if (key_len == 0) + png_error(png_ptr, "iTXt: invalid keyword"); + + /* Set the compression flag */ + switch (compression) + { + case PNG_ITXT_COMPRESSION_NONE: + case PNG_TEXT_COMPRESSION_NONE: + compression = new_key[++key_len] = 0; /* no compression */ + break; + + case PNG_TEXT_COMPRESSION_zTXt: + case PNG_ITXT_COMPRESSION_zTXt: + compression = new_key[++key_len] = 1; /* compressed */ + break; + + default: + png_error(png_ptr, "iTXt: invalid compression"); + } + + new_key[++key_len] = PNG_COMPRESSION_TYPE_BASE; + ++key_len; /* for the keywod separator */ + + /* We leave it to the application to meet PNG-1.0 requirements on the + * contents of the text. PNG-1.0 through PNG-1.2 discourage the use of + * any non-Latin-1 characters except for NEWLINE. ISO PNG, however, + * specifies that the text is UTF-8 and this really doesn't require any + * checking. + * + * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG. + * + * TODO: validate the language tag correctly (see the spec.) + */ + if (lang == NULL) lang = ""; /* empty language is valid */ + lang_len = strlen(lang)+1; + if (lang_key == NULL) lang_key = ""; /* may be empty */ + lang_key_len = strlen(lang_key)+1; + if (text == NULL) text = ""; /* may be empty */ + + prefix_len = key_len; + if (lang_len > PNG_UINT_31_MAX-prefix_len) + prefix_len = PNG_UINT_31_MAX; + else + prefix_len = (png_uint_32)(prefix_len + lang_len); + + if (lang_key_len > PNG_UINT_31_MAX-prefix_len) + prefix_len = PNG_UINT_31_MAX; + else + prefix_len = (png_uint_32)(prefix_len + lang_key_len); + + png_text_compress_init(&comp, (png_const_bytep)text, strlen(text)); + + if (compression) + { + if (png_text_compress(png_ptr, png_iTXt, &comp, prefix_len) != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg); + } + + else + { + if (comp.input_len > PNG_UINT_31_MAX-prefix_len) + png_error(png_ptr, "iTXt: uncompressed text too long"); + + /* So the string will fit in a chunk: */ + comp.output_len = (png_uint_32)/*SAFE*/comp.input_len; + } + + png_write_chunk_header(png_ptr, png_iTXt, comp.output_len + prefix_len); + + png_write_chunk_data(png_ptr, new_key, key_len); + + png_write_chunk_data(png_ptr, (png_const_bytep)lang, lang_len); + + png_write_chunk_data(png_ptr, (png_const_bytep)lang_key, lang_key_len); + + if (compression) + png_write_compressed_data_out(png_ptr, &comp); + + else + png_write_chunk_data(png_ptr, (png_const_bytep)text, comp.input_len); + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_oFFs_SUPPORTED +/* Write the oFFs chunk */ +void /* PRIVATE */ +png_write_oFFs(png_structrp png_ptr, png_int_32 x_offset, png_int_32 y_offset, + int unit_type) +{ + png_byte buf[9]; + + png_debug(1, "in png_write_oFFs"); + + if (unit_type >= PNG_OFFSET_LAST) + png_warning(png_ptr, "Unrecognized unit type for oFFs chunk"); + + png_save_int_32(buf, x_offset); + png_save_int_32(buf + 4, y_offset); + buf[8] = (png_byte)unit_type; + + png_write_complete_chunk(png_ptr, png_oFFs, buf, (png_size_t)9); +} +#endif +#ifdef PNG_WRITE_pCAL_SUPPORTED +/* Write the pCAL chunk (described in the PNG extensions document) */ +void /* PRIVATE */ +png_write_pCAL(png_structrp png_ptr, png_charp purpose, png_int_32 X0, + png_int_32 X1, int type, int nparams, png_const_charp units, + png_charpp params) +{ + png_uint_32 purpose_len; + png_size_t units_len, total_len; + png_size_tp params_len; + png_byte buf[10]; + png_byte new_purpose[80]; + int i; + + png_debug1(1, "in png_write_pCAL (%d parameters)", nparams); + + if (type >= PNG_EQUATION_LAST) + png_error(png_ptr, "Unrecognized equation type for pCAL chunk"); + + purpose_len = png_check_keyword(png_ptr, purpose, new_purpose); + + if (purpose_len == 0) + png_error(png_ptr, "pCAL: invalid keyword"); + + ++purpose_len; /* terminator */ + + png_debug1(3, "pCAL purpose length = %d", (int)purpose_len); + units_len = strlen(units) + (nparams == 0 ? 0 : 1); + png_debug1(3, "pCAL units length = %d", (int)units_len); + total_len = purpose_len + units_len + 10; + + params_len = (png_size_tp)png_malloc(png_ptr, + (png_alloc_size_t)(nparams * (sizeof (png_size_t)))); + + /* Find the length of each parameter, making sure we don't count the + * null terminator for the last parameter. + */ + for (i = 0; i < nparams; i++) + { + params_len[i] = strlen(params[i]) + (i == nparams - 1 ? 0 : 1); + png_debug2(3, "pCAL parameter %d length = %lu", i, + (unsigned long)params_len[i]); + total_len += params_len[i]; + } + + png_debug1(3, "pCAL total length = %d", (int)total_len); + png_write_chunk_header(png_ptr, png_pCAL, (png_uint_32)total_len); + png_write_chunk_data(png_ptr, new_purpose, purpose_len); + png_save_int_32(buf, X0); + png_save_int_32(buf + 4, X1); + buf[8] = (png_byte)type; + buf[9] = (png_byte)nparams; + png_write_chunk_data(png_ptr, buf, (png_size_t)10); + png_write_chunk_data(png_ptr, (png_const_bytep)units, (png_size_t)units_len); + + for (i = 0; i < nparams; i++) + { + png_write_chunk_data(png_ptr, (png_const_bytep)params[i], params_len[i]); + } + + png_free(png_ptr, params_len); + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_sCAL_SUPPORTED +/* Write the sCAL chunk */ +void /* PRIVATE */ +png_write_sCAL_s(png_structrp png_ptr, int unit, png_const_charp width, + png_const_charp height) +{ + png_byte buf[64]; + png_size_t wlen, hlen, total_len; + + png_debug(1, "in png_write_sCAL_s"); + + wlen = strlen(width); + hlen = strlen(height); + total_len = wlen + hlen + 2; + + if (total_len > 64) + { + png_warning(png_ptr, "Can't write sCAL (buffer too small)"); + return; + } + + buf[0] = (png_byte)unit; + memcpy(buf + 1, width, wlen + 1); /* Append the '\0' here */ + memcpy(buf + wlen + 2, height, hlen); /* Do NOT append the '\0' here */ + + png_debug1(3, "sCAL total length = %u", (unsigned int)total_len); + png_write_complete_chunk(png_ptr, png_sCAL, buf, total_len); +} +#endif + +#ifdef PNG_WRITE_pHYs_SUPPORTED +/* Write the pHYs chunk */ +void /* PRIVATE */ +png_write_pHYs(png_structrp png_ptr, png_uint_32 x_pixels_per_unit, + png_uint_32 y_pixels_per_unit, + int unit_type) +{ + png_byte buf[9]; + + png_debug(1, "in png_write_pHYs"); + + if (unit_type >= PNG_RESOLUTION_LAST) + png_warning(png_ptr, "Unrecognized unit type for pHYs chunk"); + + png_save_uint_32(buf, x_pixels_per_unit); + png_save_uint_32(buf + 4, y_pixels_per_unit); + buf[8] = (png_byte)unit_type; + + png_write_complete_chunk(png_ptr, png_pHYs, buf, (png_size_t)9); +} +#endif + +#ifdef PNG_WRITE_tIME_SUPPORTED +/* Write the tIME chunk. Use either png_convert_from_struct_tm() + * or png_convert_from_time_t(), or fill in the structure yourself. + */ +void /* PRIVATE */ +png_write_tIME(png_structrp png_ptr, png_const_timep mod_time) +{ + png_byte buf[7]; + + png_debug(1, "in png_write_tIME"); + + if (mod_time->month > 12 || mod_time->month < 1 || + mod_time->day > 31 || mod_time->day < 1 || + mod_time->hour > 23 || mod_time->second > 60) + { + png_warning(png_ptr, "Invalid time specified for tIME chunk"); + return; + } + + png_save_uint_16(buf, mod_time->year); + buf[2] = mod_time->month; + buf[3] = mod_time->day; + buf[4] = mod_time->hour; + buf[5] = mod_time->minute; + buf[6] = mod_time->second; + + png_write_complete_chunk(png_ptr, png_tIME, buf, (png_size_t)7); +} +#endif + +/* Initializes the row writing capability of libpng */ +void /* PRIVATE */ +png_write_start_row(png_structrp png_ptr) +{ +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* Start of interlace block */ + static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; + + /* Offset to next interlace block */ + static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; + + /* Start of interlace block in the y direction */ + static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; + + /* Offset to next interlace block in the y direction */ + static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; +#endif + + png_alloc_size_t buf_size; + int usr_pixel_depth; + + png_debug(1, "in png_write_start_row"); + + usr_pixel_depth = png_ptr->usr_channels * png_ptr->usr_bit_depth; + buf_size = PNG_ROWBYTES(usr_pixel_depth, png_ptr->width) + 1; + + /* 1.5.6: added to allow checking in the row write code. */ + png_ptr->transformed_pixel_depth = png_ptr->pixel_depth; + png_ptr->maximum_pixel_depth = (png_byte)usr_pixel_depth; + + /* Set up row buffer */ + png_ptr->row_buf = (png_bytep)png_malloc(png_ptr, buf_size); + + png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE; + +#ifdef PNG_WRITE_FILTER_SUPPORTED + /* Set up filtering buffer, if using this filter */ + if (png_ptr->do_filter & PNG_FILTER_SUB) + { + png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, png_ptr->rowbytes + 1); + + png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; + } + + /* We only need to keep the previous row if we are using one of these. */ + if (png_ptr->do_filter & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH)) + { + /* Set up previous row buffer */ + png_ptr->prev_row = (png_bytep)png_calloc(png_ptr, buf_size); + + if (png_ptr->do_filter & PNG_FILTER_UP) + { + png_ptr->up_row = (png_bytep)png_malloc(png_ptr, + png_ptr->rowbytes + 1); + + png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; + } + + if (png_ptr->do_filter & PNG_FILTER_AVG) + { + png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, + png_ptr->rowbytes + 1); + + png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; + } + + if (png_ptr->do_filter & PNG_FILTER_PAETH) + { + png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr, + png_ptr->rowbytes + 1); + + png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; + } + } +#endif /* PNG_WRITE_FILTER_SUPPORTED */ + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* If interlaced, we need to set up width and height of pass */ + if (png_ptr->interlaced) + { + if (!(png_ptr->transformations & PNG_INTERLACE)) + { + png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - + png_pass_ystart[0]) / png_pass_yinc[0]; + + png_ptr->usr_width = (png_ptr->width + png_pass_inc[0] - 1 - + png_pass_start[0]) / png_pass_inc[0]; + } + + else + { + png_ptr->num_rows = png_ptr->height; + png_ptr->usr_width = png_ptr->width; + } + } + + else +#endif + { + png_ptr->num_rows = png_ptr->height; + png_ptr->usr_width = png_ptr->width; + } +} + +/* Internal use only. Called when finished processing a row of data. */ +void /* PRIVATE */ +png_write_finish_row(png_structrp png_ptr) +{ +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* Start of interlace block */ + static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; + + /* Offset to next interlace block */ + static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; + + /* Start of interlace block in the y direction */ + static PNG_CONST png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; + + /* Offset to next interlace block in the y direction */ + static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; +#endif + + png_debug(1, "in png_write_finish_row"); + + /* Next row */ + png_ptr->row_number++; + + /* See if we are done */ + if (png_ptr->row_number < png_ptr->num_rows) + return; + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* If interlaced, go to next pass */ + if (png_ptr->interlaced) + { + png_ptr->row_number = 0; + if (png_ptr->transformations & PNG_INTERLACE) + { + png_ptr->pass++; + } + + else + { + /* Loop until we find a non-zero width or height pass */ + do + { + png_ptr->pass++; + + if (png_ptr->pass >= 7) + break; + + png_ptr->usr_width = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + + png_ptr->num_rows = (png_ptr->height + + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; + + if (png_ptr->transformations & PNG_INTERLACE) + break; + + } while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0); + + } + + /* Reset the row above the image for the next pass */ + if (png_ptr->pass < 7) + { + if (png_ptr->prev_row != NULL) + memset(png_ptr->prev_row, 0, + (png_size_t)(PNG_ROWBYTES(png_ptr->usr_channels* + png_ptr->usr_bit_depth, png_ptr->width)) + 1); + + return; + } + } +#endif + + /* If we get here, we've just written the last row, so we need + to flush the compressor */ + png_compress_IDAT(png_ptr, NULL, 0, Z_FINISH); +} + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED +/* Pick out the correct pixels for the interlace pass. + * The basic idea here is to go through the row with a source + * pointer and a destination pointer (sp and dp), and copy the + * correct pixels for the pass. As the row gets compacted, + * sp will always be >= dp, so we should never overwrite anything. + * See the default: case for the easiest code to understand. + */ +void /* PRIVATE */ +png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) +{ + /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* Start of interlace block */ + static PNG_CONST png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; + + /* Offset to next interlace block */ + static PNG_CONST png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; + + png_debug(1, "in png_do_write_interlace"); + + /* We don't have to do anything on the last pass (6) */ + if (pass < 6) + { + /* Each pixel depth is handled separately */ + switch (row_info->pixel_depth) + { + case 1: + { + png_bytep sp; + png_bytep dp; + int shift; + int d; + int value; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + dp = row; + d = 0; + shift = 7; + + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + sp = row + (png_size_t)(i >> 3); + value = (int)(*sp >> (7 - (int)(i & 0x07))) & 0x01; + d |= (value << shift); + + if (shift == 0) + { + shift = 7; + *dp++ = (png_byte)d; + d = 0; + } + + else + shift--; + + } + if (shift != 7) + *dp = (png_byte)d; + + break; + } + + case 2: + { + png_bytep sp; + png_bytep dp; + int shift; + int d; + int value; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + dp = row; + shift = 6; + d = 0; + + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + sp = row + (png_size_t)(i >> 2); + value = (*sp >> ((3 - (int)(i & 0x03)) << 1)) & 0x03; + d |= (value << shift); + + if (shift == 0) + { + shift = 6; + *dp++ = (png_byte)d; + d = 0; + } + + else + shift -= 2; + } + if (shift != 6) + *dp = (png_byte)d; + + break; + } + + case 4: + { + png_bytep sp; + png_bytep dp; + int shift; + int d; + int value; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + dp = row; + shift = 4; + d = 0; + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + sp = row + (png_size_t)(i >> 1); + value = (*sp >> ((1 - (int)(i & 0x01)) << 2)) & 0x0f; + d |= (value << shift); + + if (shift == 0) + { + shift = 4; + *dp++ = (png_byte)d; + d = 0; + } + + else + shift -= 4; + } + if (shift != 4) + *dp = (png_byte)d; + + break; + } + + default: + { + png_bytep sp; + png_bytep dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + png_size_t pixel_bytes; + + /* Start at the beginning */ + dp = row; + + /* Find out how many bytes each pixel takes up */ + pixel_bytes = (row_info->pixel_depth >> 3); + + /* Loop through the row, only looking at the pixels that matter */ + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + /* Find out where the original pixel is */ + sp = row + (png_size_t)i * pixel_bytes; + + /* Move the pixel */ + if (dp != sp) + memcpy(dp, sp, pixel_bytes); + + /* Next pixel */ + dp += pixel_bytes; + } + break; + } + } + /* Set new row width */ + row_info->width = (row_info->width + + png_pass_inc[pass] - 1 - + png_pass_start[pass]) / + png_pass_inc[pass]; + + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, + row_info->width); + } +} +#endif + +/* This filters the row, chooses which filter to use, if it has not already + * been specified by the application, and then writes the row out with the + * chosen filter. + */ +static void png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row, + png_size_t row_bytes); + +#define PNG_MAXSUM (((png_uint_32)(-1)) >> 1) +#define PNG_HISHIFT 10 +#define PNG_LOMASK ((png_uint_32)0xffffL) +#define PNG_HIMASK ((png_uint_32)(~PNG_LOMASK >> PNG_HISHIFT)) +void /* PRIVATE */ +png_write_find_filter(png_structrp png_ptr, png_row_infop row_info) +{ + png_bytep best_row; +#ifdef PNG_WRITE_FILTER_SUPPORTED + png_bytep prev_row, row_buf; + png_uint_32 mins, bpp; + png_byte filter_to_do = png_ptr->do_filter; + png_size_t row_bytes = row_info->rowbytes; +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + int num_p_filters = png_ptr->num_prev_filters; +#endif + + png_debug(1, "in png_write_find_filter"); + +#ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS) + { + /* These will never be selected so we need not test them. */ + filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH); + } +#endif + + /* Find out how many bytes offset each pixel is */ + bpp = (row_info->pixel_depth + 7) >> 3; + + prev_row = png_ptr->prev_row; +#endif + best_row = png_ptr->row_buf; +#ifdef PNG_WRITE_FILTER_SUPPORTED + row_buf = best_row; + mins = PNG_MAXSUM; + + /* The prediction method we use is to find which method provides the + * smallest value when summing the absolute values of the distances + * from zero, using anything >= 128 as negative numbers. This is known + * as the "minimum sum of absolute differences" heuristic. Other + * heuristics are the "weighted minimum sum of absolute differences" + * (experimental and can in theory improve compression), and the "zlib + * predictive" method (not implemented yet), which does test compressions + * of lines using different filter methods, and then chooses the + * (series of) filter(s) that give minimum compressed data size (VERY + * computationally expensive). + * + * GRR 980525: consider also + * + * (1) minimum sum of absolute differences from running average (i.e., + * keep running sum of non-absolute differences & count of bytes) + * [track dispersion, too? restart average if dispersion too large?] + * + * (1b) minimum sum of absolute differences from sliding average, probably + * with window size <= deflate window (usually 32K) + * + * (2) minimum sum of squared differences from zero or running average + * (i.e., ~ root-mean-square approach) + */ + + + /* We don't need to test the 'no filter' case if this is the only filter + * that has been chosen, as it doesn't actually do anything to the data. + */ + if ((filter_to_do & PNG_FILTER_NONE) && filter_to_do != PNG_FILTER_NONE) + { + png_bytep rp; + png_uint_32 sum = 0; + png_size_t i; + int v; + + for (i = 0, rp = row_buf + 1; i < row_bytes; i++, rp++) + { + v = *rp; + sum += (v < 128) ? v : 256 - v; + } + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + png_uint_32 sumhi, sumlo; + int j; + sumlo = sum & PNG_LOMASK; + sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; /* Gives us some footroom */ + + /* Reduce the sum if we match any of the previous rows */ + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE) + { + sumlo = (sumlo * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + + sumhi = (sumhi * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + /* Factor in the cost of this filter (this is here for completeness, + * but it makes no sense to have a "cost" for the NONE filter, as + * it has the minimum possible computational cost - none). + */ + sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> + PNG_COST_SHIFT; + + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> + PNG_COST_SHIFT; + + if (sumhi > PNG_HIMASK) + sum = PNG_MAXSUM; + + else + sum = (sumhi << PNG_HISHIFT) + sumlo; + } +#endif + mins = sum; + } + + /* Sub filter */ + if (filter_to_do == PNG_FILTER_SUB) + /* It's the only filter so no testing is needed */ + { + png_bytep rp, lp, dp; + png_size_t i; + + for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp; + i++, rp++, dp++) + { + *dp = *rp; + } + + for (lp = row_buf + 1; i < row_bytes; + i++, rp++, lp++, dp++) + { + *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); + } + + best_row = png_ptr->sub_row; + } + + else if (filter_to_do & PNG_FILTER_SUB) + { + png_bytep rp, dp, lp; + png_uint_32 sum = 0, lmins = mins; + png_size_t i; + int v; + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + /* We temporarily increase the "minimum sum" by the factor we + * would reduce the sum of this filter, so that we can do the + * early exit comparison without scaling the sum each time. + */ + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 lmhi, lmlo; + lmlo = lmins & PNG_LOMASK; + lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB) + { + lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> + PNG_COST_SHIFT; + + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> + PNG_COST_SHIFT; + + if (lmhi > PNG_HIMASK) + lmins = PNG_MAXSUM; + + else + lmins = (lmhi << PNG_HISHIFT) + lmlo; + } +#endif + + for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp; + i++, rp++, dp++) + { + v = *dp = *rp; + + sum += (v < 128) ? v : 256 - v; + } + + for (lp = row_buf + 1; i < row_bytes; + i++, rp++, lp++, dp++) + { + v = *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); + + sum += (v < 128) ? v : 256 - v; + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 sumhi, sumlo; + sumlo = sum & PNG_LOMASK; + sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB) + { + sumlo = (sumlo * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + + sumhi = (sumhi * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + sumlo = (sumlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> + PNG_COST_SHIFT; + + sumhi = (sumhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> + PNG_COST_SHIFT; + + if (sumhi > PNG_HIMASK) + sum = PNG_MAXSUM; + + else + sum = (sumhi << PNG_HISHIFT) + sumlo; + } +#endif + + if (sum < mins) + { + mins = sum; + best_row = png_ptr->sub_row; + } + } + + /* Up filter */ + if (filter_to_do == PNG_FILTER_UP) + { + png_bytep rp, dp, pp; + png_size_t i; + + for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1, + pp = prev_row + 1; i < row_bytes; + i++, rp++, pp++, dp++) + { + *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff); + } + + best_row = png_ptr->up_row; + } + + else if (filter_to_do & PNG_FILTER_UP) + { + png_bytep rp, dp, pp; + png_uint_32 sum = 0, lmins = mins; + png_size_t i; + int v; + + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 lmhi, lmlo; + lmlo = lmins & PNG_LOMASK; + lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP) + { + lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> + PNG_COST_SHIFT; + + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> + PNG_COST_SHIFT; + + if (lmhi > PNG_HIMASK) + lmins = PNG_MAXSUM; + + else + lmins = (lmhi << PNG_HISHIFT) + lmlo; + } +#endif + + for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1, + pp = prev_row + 1; i < row_bytes; i++) + { + v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); + + sum += (v < 128) ? v : 256 - v; + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 sumhi, sumlo; + sumlo = sum & PNG_LOMASK; + sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP) + { + sumlo = (sumlo * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + + sumhi = (sumhi * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> + PNG_COST_SHIFT; + + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> + PNG_COST_SHIFT; + + if (sumhi > PNG_HIMASK) + sum = PNG_MAXSUM; + + else + sum = (sumhi << PNG_HISHIFT) + sumlo; + } +#endif + + if (sum < mins) + { + mins = sum; + best_row = png_ptr->up_row; + } + } + + /* Avg filter */ + if (filter_to_do == PNG_FILTER_AVG) + { + png_bytep rp, dp, pp, lp; + png_uint_32 i; + + for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1, + pp = prev_row + 1; i < bpp; i++) + { + *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); + } + + for (lp = row_buf + 1; i < row_bytes; i++) + { + *dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) + & 0xff); + } + best_row = png_ptr->avg_row; + } + + else if (filter_to_do & PNG_FILTER_AVG) + { + png_bytep rp, dp, pp, lp; + png_uint_32 sum = 0, lmins = mins; + png_size_t i; + int v; + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 lmhi, lmlo; + lmlo = lmins & PNG_LOMASK; + lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_AVG) + { + lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> + PNG_COST_SHIFT; + + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> + PNG_COST_SHIFT; + + if (lmhi > PNG_HIMASK) + lmins = PNG_MAXSUM; + + else + lmins = (lmhi << PNG_HISHIFT) + lmlo; + } +#endif + + for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1, + pp = prev_row + 1; i < bpp; i++) + { + v = *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); + + sum += (v < 128) ? v : 256 - v; + } + + for (lp = row_buf + 1; i < row_bytes; i++) + { + v = *dp++ = + (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) & 0xff); + + sum += (v < 128) ? v : 256 - v; + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 sumhi, sumlo; + sumlo = sum & PNG_LOMASK; + sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE) + { + sumlo = (sumlo * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + + sumhi = (sumhi * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> + PNG_COST_SHIFT; + + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> + PNG_COST_SHIFT; + + if (sumhi > PNG_HIMASK) + sum = PNG_MAXSUM; + + else + sum = (sumhi << PNG_HISHIFT) + sumlo; + } +#endif + + if (sum < mins) + { + mins = sum; + best_row = png_ptr->avg_row; + } + } + + /* Paeth filter */ + if (filter_to_do == PNG_FILTER_PAETH) + { + png_bytep rp, dp, pp, cp, lp; + png_size_t i; + + for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1, + pp = prev_row + 1; i < bpp; i++) + { + *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); + } + + for (lp = row_buf + 1, cp = prev_row + 1; i < row_bytes; i++) + { + int a, b, c, pa, pb, pc, p; + + b = *pp++; + c = *cp++; + a = *lp++; + + p = b - c; + pc = a - c; + +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + + p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; + + *dp++ = (png_byte)(((int)*rp++ - p) & 0xff); + } + best_row = png_ptr->paeth_row; + } + + else if (filter_to_do & PNG_FILTER_PAETH) + { + png_bytep rp, dp, pp, cp, lp; + png_uint_32 sum = 0, lmins = mins; + png_size_t i; + int v; + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 lmhi, lmlo; + lmlo = lmins & PNG_LOMASK; + lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH) + { + lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> + PNG_COST_SHIFT; + + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> + PNG_COST_SHIFT; + + if (lmhi > PNG_HIMASK) + lmins = PNG_MAXSUM; + + else + lmins = (lmhi << PNG_HISHIFT) + lmlo; + } +#endif + + for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1, + pp = prev_row + 1; i < bpp; i++) + { + v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); + + sum += (v < 128) ? v : 256 - v; + } + + for (lp = row_buf + 1, cp = prev_row + 1; i < row_bytes; i++) + { + int a, b, c, pa, pb, pc, p; + + b = *pp++; + c = *cp++; + a = *lp++; + +#ifndef PNG_SLOW_PAETH + p = b - c; + pc = a - c; +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; +#else /* PNG_SLOW_PAETH */ + p = a + b - c; + pa = abs(p - a); + pb = abs(p - b); + pc = abs(p - c); + + if (pa <= pb && pa <= pc) + p = a; + + else if (pb <= pc) + p = b; + + else + p = c; +#endif /* PNG_SLOW_PAETH */ + + v = *dp++ = (png_byte)(((int)*rp++ - p) & 0xff); + + sum += (v < 128) ? v : 256 - v; + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 sumhi, sumlo; + sumlo = sum & PNG_LOMASK; + sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH) + { + sumlo = (sumlo * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + + sumhi = (sumhi * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> + PNG_COST_SHIFT; + + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> + PNG_COST_SHIFT; + + if (sumhi > PNG_HIMASK) + sum = PNG_MAXSUM; + + else + sum = (sumhi << PNG_HISHIFT) + sumlo; + } +#endif + + if (sum < mins) + { + best_row = png_ptr->paeth_row; + } + } +#endif /* PNG_WRITE_FILTER_SUPPORTED */ + + /* Do the actual writing of the filtered row data from the chosen filter. */ + png_write_filtered_row(png_ptr, best_row, row_info->rowbytes+1); + +#ifdef PNG_WRITE_FILTER_SUPPORTED +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + /* Save the type of filter we picked this time for future calculations */ + if (png_ptr->num_prev_filters > 0) + { + int j; + + for (j = 1; j < num_p_filters; j++) + { + png_ptr->prev_filters[j] = png_ptr->prev_filters[j - 1]; + } + + png_ptr->prev_filters[j] = best_row[0]; + } +#endif +#endif /* PNG_WRITE_FILTER_SUPPORTED */ +} + + +/* Do the actual writing of a previously filtered row. */ +static void +png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row, + png_size_t full_row_length/*includes filter byte*/) +{ + png_debug(1, "in png_write_filtered_row"); + + png_debug1(2, "filter = %d", filtered_row[0]); + + png_compress_IDAT(png_ptr, filtered_row, full_row_length, Z_NO_FLUSH); + + /* Swap the current and previous rows */ + if (png_ptr->prev_row != NULL) + { + png_bytep tptr; + + tptr = png_ptr->prev_row; + png_ptr->prev_row = png_ptr->row_buf; + png_ptr->row_buf = tptr; + } + + /* Finish row - updates counters and flushes zlib if last row */ + png_write_finish_row(png_ptr); + +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_ptr->flush_rows++; + + if (png_ptr->flush_dist > 0 && + png_ptr->flush_rows >= png_ptr->flush_dist) + { + png_write_flush(png_ptr); + } +#endif +} +#endif /* PNG_WRITE_SUPPORTED */ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/libpng.tgt b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/libpng.tgt new file mode 100644 index 0000000000..096b2eef17 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/libpng.tgt @@ -0,0 +1,383 @@ +40 +targetIdent +0 +MProject +1 +MComponent +0 +2 +WString +3 +LIB +3 +WString +5 +n_2sn +1 +0 +0 +4 +MCommand +0 +5 +MCommand +0 +6 +MItem +10 +libpng.lib +7 +WString +3 +LIB +8 +WVList +0 +9 +WVList +1 +10 +ActionStates +11 +WString +5 +&Make +12 +WVList +0 +-1 +1 +1 +0 +13 +WPickList +16 +14 +MItem +3 +*.c +15 +WString +4 +COBJ +16 +WVList +2 +17 +MVState +18 +WString +3 +WCC +19 +WString +25 +n????Include directories: +1 +20 +WString +39 +"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" +0 +21 +MVState +22 +WString +3 +WCC +23 +WString +25 +n????Include directories: +0 +24 +WString +39 +"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" +0 +25 +WVList +1 +26 +ActionStates +27 +WString +5 +&Make +28 +WVList +0 +-1 +1 +1 +0 +29 +MItem +11 +..\..\png.c +30 +WString +4 +COBJ +31 +WVList +0 +32 +WVList +0 +14 +1 +1 +0 +33 +MItem +16 +..\..\pngerror.c +34 +WString +4 +COBJ +35 +WVList +0 +36 +WVList +0 +14 +1 +1 +0 +37 +MItem +14 +..\..\pngget.c +38 +WString +4 +COBJ +39 +WVList +0 +40 +WVList +0 +14 +1 +1 +0 +41 +MItem +14 +..\..\pngmem.c +42 +WString +4 +COBJ +43 +WVList +0 +44 +WVList +0 +14 +1 +1 +0 +45 +MItem +16 +..\..\pngpread.c +46 +WString +4 +COBJ +47 +WVList +0 +48 +WVList +0 +14 +1 +1 +0 +49 +MItem +15 +..\..\pngread.c +50 +WString +4 +COBJ +51 +WVList +0 +52 +WVList +0 +14 +1 +1 +0 +53 +MItem +14 +..\..\pngrio.c +54 +WString +4 +COBJ +55 +WVList +0 +56 +WVList +0 +14 +1 +1 +0 +57 +MItem +16 +..\..\pngrtran.c +58 +WString +4 +COBJ +59 +WVList +0 +60 +WVList +0 +14 +1 +1 +0 +61 +MItem +16 +..\..\pngrutil.c +62 +WString +4 +COBJ +63 +WVList +0 +64 +WVList +0 +14 +1 +1 +0 +65 +MItem +14 +..\..\pngset.c +66 +WString +4 +COBJ +67 +WVList +0 +68 +WVList +0 +14 +1 +1 +0 +69 +MItem +16 +..\..\pngtrans.c +70 +WString +4 +COBJ +71 +WVList +0 +72 +WVList +0 +14 +1 +1 +0 +73 +MItem +14 +..\..\pngwio.c +74 +WString +4 +COBJ +75 +WVList +0 +76 +WVList +0 +14 +1 +1 +0 +77 +MItem +16 +..\..\pngwrite.c +78 +WString +4 +COBJ +79 +WVList +0 +80 +WVList +0 +14 +1 +1 +0 +81 +MItem +16 +..\..\pngwtran.c +82 +WString +4 +COBJ +83 +WVList +0 +84 +WVList +0 +14 +1 +1 +0 +85 +MItem +16 +..\..\pngwutil.c +86 +WString +4 +COBJ +87 +WVList +0 +88 +WVList +0 +14 +1 +1 +0 diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/libpng.wpj b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/libpng.wpj new file mode 100644 index 0000000000..fe7583f018 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/libpng.wpj @@ -0,0 +1,112 @@ +40 +projectIdent +0 +VpeMain +1 +WRect +256 +0 +8960 +9294 +2 +MProject +3 +MCommand +322 +# Locations of zlib and (if required) awk (change as required:) +set zlib=..\..\..\zlib +set awk= +# +@if not exist pngconfig.dfa $(MAKE) $(__MAKEOPTS__) -f pngconfig.mak defaults +@if exist config.inf type config.inf +@echo Checking for the libpng configuration file pnglibconf.h +$(MAKE) $(__MAKEOPTS__) -f pngconfig.mak +4 +MCommand +19 +@type pngconfig.inf +4 +5 +WFileName +10 +libpng.tgt +6 +WFileName +11 +pngtest.tgt +7 +WFileName +12 +pngvalid.tgt +8 +WFileName +12 +pngstest.tgt +9 +WVList +4 +10 +VComponent +11 +WRect +0 +0 +5638 +4174 +0 +0 +12 +WFileName +10 +libpng.tgt +0 +0 +13 +VComponent +14 +WRect +1280 +1550 +5638 +4174 +0 +0 +15 +WFileName +11 +pngtest.tgt +0 +1 +16 +VComponent +17 +WRect +524 +497 +5638 +4174 +0 +0 +18 +WFileName +12 +pngvalid.tgt +0 +1 +19 +VComponent +20 +WRect +2054 +2701 +5674 +4232 +0 +0 +21 +WFileName +12 +pngstest.tgt +0 +1 +19 diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngconfig.mak b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngconfig.mak new file mode 100755 index 0000000000..0f98878051 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngconfig.mak @@ -0,0 +1,160 @@ +# This is an OpenWatcom make file which builds pnglibconf.h - the libpng +# configuration header. You can ignore this file if you don't need to +# configure libpng; a default configuration will be built. +# +# For more information build libpng.wpj under the IDE and then read the +# generated files: +# +# config.inf: Basic configuration information for a standard build. +# pngconfig.dfa: Advanced configuration for non-standard libpng builds. +# +DELETE=rm -f +ECHO=echo +COPY=copy +# +# If your configuration needs to test compiler flags when building +# pnglibconf.h you may need to override the following on the wmake command +# line: +CFLAGS= +CC=wcl386 +CPP=$(CC) -pw0 +# +# Read awk from the environment if set, else it can be set on the command +# line (the default approach is to set the %awk% environment variable in the +# IDE libpng.wpj 'before' rule - this setting is local.) +!ifdef %awk +AWK=$(%awk) +!endif +# +# pnglibconf.h must exist in the source directory, this is the final rule +# which copies the local built version (and this is the default target for +# this makefile.) +..\..\pnglibconf.h: pnglibconf.h + $(COPY) pnglibconf.h $@ + +!ifdef AWK +# CPPFLAGS should contain the options to control the result, +# but DEFS and CFLAGS are also supported here, override +# as appropriate +DFNFLAGS = $(DEFS) $(CPPFLAGS) $(CFLAGS) + +pnglibconf.h: pnglibconf.dfn + $(DELETE) $@ dfn.c dfn1.out dfn2.out + $(ECHO) $#include "pnglibconf.dfn" >dfn.c + $(CPP) $(DFNFLAGS) dfn.c >dfn1.out + $(AWK) -f << dfn1.out >dfn2.out +/^.*PNG_DEFN_MAGIC-.*-PNG_DEFN_END.*$$/{ + sub(/^.*PNG_DEFN_MAGIC-/, "") + sub(/ *-PNG_DEFN_END.*$$/, "") + gsub(/ *@@@ */, "") + print +} +<< + $(COPY) dfn2.out $@ + @type << >pngconfig.inf +This is a locally configurable build of libpng.lib; for configuration +instructions consult and edit projects/openwatcom/pngconfig.dfa +<< + $(DELETE) dfn.c dfn1.out dfn2.out + +pnglibconf.dfn: ..\..\scripts\pnglibconf.dfa ..\..\scripts\options.awk pngconfig.dfa ..\..\pngconf.h + $(DELETE) $@ dfn1.out dfn2.out + $(AWK) -f ..\..\scripts\options.awk out=dfn1.out version=search ..\..\pngconf.h ..\..\scripts\pnglibconf.dfa pngconfig.dfa $(DFA_XTRA) 1>&2 + $(AWK) -f ..\..\scripts\options.awk out=dfn2.out dfn1.out 1>&2 + $(COPY) dfn2.out $@ + $(DELETE) dfn1.out dfn2.out + +!else +# The following lines are used to copy scripts\pnglibconf.h.prebuilt and make +# the required change to the calling convention. +# +# By default libpng is built to use the __cdecl calling convention on +# Windows. This gives compatibility with MSVC and GCC. Unfortunately it +# does not work with OpenWatcom because OpenWatcom implements longjmp using +# the __watcall convention (compared with both MSVC and GCC which use __cdecl +# for library functions.) +# +# Thus the default must be changed to build on OpenWatcom and, once changed, +# the result will not be compatible with applications built using other +# compilers (in fact attempts to build will fail at compile time.) +# +pnglibconf.h: ..\..\scripts\pnglibconf.h.prebuilt .existsonly + @$(ECHO) . + @$(ECHO) . + @$(ECHO) $$(AWK) NOT AVAILABLE: COPYING scripts\pnglibconf.h.prebuilt + @$(ECHO) . + @$(ECHO) . + vi -q -k ":1,$$s/PNG_API_RULE 0$$/PNG_API_RULE 2/\n:w! $@\n:q!\n" ..\..\scripts\pnglibconf.h.prebuilt + @$(ECHO) . + @$(ECHO) . + @$(ECHO) YOU HAVE A DEFAULT CONFIGURATION BECAUSE YOU DO NOT HAVE AWK! + @$(ECHO) . + @$(ECHO) . + @type << >pngconfig.inf +This is the default configuration of libpng.lib, if you wish to +change the configuration please consult the instructions in +projects/owatcom/pngconfig.dfa. +<< + +!endif + +# Make the default files +defaults: .symbolic + @$(COPY) << config.inf +$# The libpng project is incompletely configured. To complete configuration +$# please complete the following steps: +$# +$# 1) Edit the 'before' rule of libpng.wpj (from the IDE) to define the +$# locations of the zlib include file zlib.h and the built zlib library, +$# zlib.lib. +$# +$# 2) If you want to change libpng to a non-standard configuration also +$# change the definition of 'awk' in the before rule to the name of your +$# awk command. For more instructions on configuration read +$# pngconfig.dfa. +$# +$# 3) Delete this file (config.inf). +<< + @$(COPY) << pngconfig.dfa +$# pngconfig.dfa: this file contains configuration options for libpng. +$# If emtpy the standard configuration will be built. For this file to be +$# used a working version of the program 'awk' is required and the program +$# must be identified in the 'before' rule of the project. +$# +$# If you don't already have 'awk', or the version of awk you have seems not +$# to work, download Brian Kernighan's awk (Brian Kernighan is the author of +$# awk.) You can find source code and a built executable (called awk95.exe) +$# here: +$# +$# http://www.cs.princeton.edu/~bwk/btl.mirror/ +$# +$# The executable works just fine. +$# +$# If build issues errors after a change to pngconfig.dfa you have entered +$# inconsistent feature requests, or even malformed requests, in +$# pngconfig.dfa. The error messages from awk should be comprehensible, but +$# if not simply go back to the start (nothing but comments in this file) and +$# enter configuration lines one by one until one produces an error. (Or, of +$# course, do the standard binary chop.) +$# +$# You need to rebuild everything after a change to pnglibconf.dfa - i.e. you +$# must do Actions/Mark All Targets for Remake. This is because the compiler +$# generated dependency information (as of OpenWatcom 1.9) does not record the +$# dependency on pnglibconf.h correctly. +$# +$# If awk isn't set then this file is bypassed. If you just want the standard +$# configuration it is automatically produced from the distributed version +$# (scripts\pnglibconf.h.prebuilt) by editting PNG_API_RULE to 2 (to force use +$# of the OpenWatcom library calling convention.) +$# +<< + +clean:: .symbolic + $(DELETE) ..\..\pnglibconf.h pnglibconf.* dfn.c *.out pngconfig.inf + $(DELETE) *.obj *.mbr *.sym *.err *.pch libpng.mk + $(DELETE) libpng.lib libpng.lbr libpng.lb1 libpng.cbr libpng.mk1 + $(DELETE) pngtest.exe pngtest.map pngtest.lk1 pngtest.mk1 + $(DELETE) pngvalid.exe pngvalid.map pngvalid.lk1 pngvalid.mk1 + +distclean:: clean .symbolic + $(DELETE) zlib.inf awk.inf config.inf pngconfig.dfa diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngstest.tgt b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngstest.tgt new file mode 100644 index 0000000000..f5d024518f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngstest.tgt @@ -0,0 +1,219 @@ +40 +targetIdent +0 +MProject +1 +MComponent +0 +2 +WString +4 +NEXE +3 +WString +5 +nc2en +1 +0 +0 +4 +MCommand +0 +5 +MCommand +1118 +pngstest --strict --log ../../contrib/pngsuite/basn0g01.png ../../contrib/pngsuite/basn0g02.png ../../contrib/pngsuite/basn0g04.png ../../contrib/pngsuite/basn0g08.png ../../contrib/pngsuite/basn0g16.png ../../contrib/pngsuite/basn2c08.png ../../contrib/pngsuite/basn2c16.png ../../contrib/pngsuite/basn3p01.png ../../contrib/pngsuite/basn3p02.png ../../contrib/pngsuite/basn3p04.png ../../contrib/pngsuite/basn3p08.png ../../contrib/pngsuite/basn4a08.png ../../contrib/pngsuite/basn4a16.png ../../contrib/pngsuite/basn6a08.png ../../contrib/pngsuite/basn6a16.png ../../contrib/pngsuite/ftbbn0g04.png ../../contrib/pngsuite/ftbbn0g01.png ../../contrib/pngsuite/ftbbn0g02.png ../../contrib/pngsuite/ftbbn2c16.png ../../contrib/pngsuite/ftbbn3p08.png ../../contrib/pngsuite/ftbgn2c16.png ../../contrib/pngsuite/ftbgn3p08.png ../../contrib/pngsuite/ftbrn2c08.png ../../contrib/pngsuite/ftbwn0g16.png ../../contrib/pngsuite/ftbwn3p08.png ../../contrib/pngsuite/ftbyn3p08.png ../../contrib/pngsuite/ftp0n0g08.png ../../contrib/pngsuite/ftp0n2c08.png ../../contrib/pngsuite/ftp0n3p08.png ../../contrib/pngsuite/ftp1n3p08.png +6 +MItem +12 +pngstest.exe +7 +WString +4 +NEXE +8 +WVList +6 +9 +MVState +10 +WString +7 +WINLINK +11 +WString +11 +?????Stack: +1 +12 +WString +4 +768k +0 +13 +MVState +14 +WString +7 +WINLINK +15 +WString +28 +?????Library directories(;): +1 +16 +WString +8 +$(%zlib) +0 +17 +MVState +18 +WString +7 +WINLINK +19 +WString +18 +?????Libraries(,): +1 +20 +WString +19 +libpng.lib zlib.lib +0 +21 +MVState +22 +WString +7 +WINLINK +23 +WString +11 +?????Stack: +0 +24 +WString +4 +768k +0 +25 +MVState +26 +WString +7 +WINLINK +27 +WString +28 +?????Library directories(;): +0 +28 +WString +8 +$(%zlib) +0 +29 +MVState +30 +WString +7 +WINLINK +31 +WString +18 +?????Libraries(,): +0 +32 +WString +19 +libpng.lib zlib.lib +0 +33 +WVList +1 +34 +ActionStates +35 +WString +4 +&Run +36 +WVList +0 +-1 +1 +1 +0 +37 +WPickList +2 +38 +MItem +3 +*.c +39 +WString +4 +COBJ +40 +WVList +2 +41 +MVState +42 +WString +3 +WCC +43 +WString +25 +n????Include directories: +1 +44 +WString +39 +"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" +0 +45 +MVState +46 +WString +3 +WCC +47 +WString +25 +n????Include directories: +0 +48 +WString +39 +"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" +0 +49 +WVList +0 +-1 +1 +1 +0 +50 +MItem +33 +..\..\contrib\libtests\pngstest.c +51 +WString +4 +COBJ +52 +WVList +0 +53 +WVList +0 +38 +1 +1 +0 diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngtest.tgt b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngtest.tgt new file mode 100644 index 0000000000..ca3db8c3ac --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngtest.tgt @@ -0,0 +1,179 @@ +40 +targetIdent +0 +MProject +1 +MComponent +0 +2 +WString +4 +NEXE +3 +WString +5 +nc2en +1 +0 +0 +4 +MCommand +0 +5 +MCommand +34 +cd ..\.. +projects\owatcom\pngtest +6 +MItem +11 +pngtest.exe +7 +WString +4 +NEXE +8 +WVList +4 +9 +MVState +10 +WString +7 +WINLINK +11 +WString +28 +?????Library directories(;): +1 +12 +WString +8 +$(%zlib) +0 +13 +MVState +14 +WString +7 +WINLINK +15 +WString +18 +?????Libraries(,): +1 +16 +WString +19 +libpng.lib zlib.lib +0 +17 +MVState +18 +WString +7 +WINLINK +19 +WString +28 +?????Library directories(;): +0 +20 +WString +8 +$(%zlib) +0 +21 +MVState +22 +WString +7 +WINLINK +23 +WString +18 +?????Libraries(,): +0 +24 +WString +19 +libpng.lib zlib.lib +0 +25 +WVList +0 +-1 +1 +1 +0 +26 +WPickList +2 +27 +MItem +3 +*.c +28 +WString +4 +COBJ +29 +WVList +2 +30 +MVState +31 +WString +3 +WCC +32 +WString +25 +n????Include directories: +1 +33 +WString +39 +"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" +0 +34 +MVState +35 +WString +3 +WCC +36 +WString +25 +n????Include directories: +0 +37 +WString +39 +"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" +0 +38 +WVList +0 +-1 +1 +1 +0 +39 +MItem +15 +..\..\pngtest.c +40 +WString +4 +COBJ +41 +WVList +0 +42 +WVList +0 +27 +1 +1 +0 diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngvalid.tgt b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngvalid.tgt new file mode 100644 index 0000000000..1cc79085ef --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/owatcom/pngvalid.tgt @@ -0,0 +1,210 @@ +40 +targetIdent +0 +MProject +1 +MComponent +0 +2 +WString +4 +NEXE +3 +WString +5 +nc2en +1 +0 +0 +4 +MCommand +0 +5 +MCommand +8 +pngvalid +6 +MItem +12 +pngvalid.exe +7 +WString +4 +NEXE +8 +WVList +6 +9 +MVState +10 +WString +7 +WINLINK +11 +WString +11 +?????Stack: +1 +12 +WString +4 +768k +0 +13 +MVState +14 +WString +7 +WINLINK +15 +WString +28 +?????Library directories(;): +1 +16 +WString +8 +$(%zlib) +0 +17 +MVState +18 +WString +7 +WINLINK +19 +WString +18 +?????Libraries(,): +1 +20 +WString +19 +libpng.lib zlib.lib +0 +21 +MVState +22 +WString +7 +WINLINK +23 +WString +11 +?????Stack: +0 +24 +WString +4 +768k +0 +25 +MVState +26 +WString +7 +WINLINK +27 +WString +28 +?????Library directories(;): +0 +28 +WString +8 +$(%zlib) +0 +29 +MVState +30 +WString +7 +WINLINK +31 +WString +18 +?????Libraries(,): +0 +32 +WString +19 +libpng.lib zlib.lib +0 +33 +WVList +0 +-1 +1 +1 +0 +34 +WPickList +2 +35 +MItem +3 +*.c +36 +WString +4 +COBJ +37 +WVList +2 +38 +MVState +39 +WString +3 +WCC +40 +WString +25 +n????Include directories: +1 +41 +WString +39 +"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" +0 +42 +MVState +43 +WString +3 +WCC +44 +WString +25 +n????Include directories: +0 +45 +WString +39 +"$(%zlib);$(%watcom)/h;$(%watcom)/h/nt" +0 +46 +WVList +0 +-1 +1 +1 +0 +47 +MItem +33 +..\..\contrib\libtests\pngvalid.c +48 +WString +4 +COBJ +49 +WVList +0 +50 +WVList +0 +35 +1 +1 +0 diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/PRJ0041.mak b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/PRJ0041.mak new file mode 100644 index 0000000000..c7a68b503e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/PRJ0041.mak @@ -0,0 +1,21 @@ +# Prevent "Cannot find missing dependency..." warnings while compiling +# pngwin.rc (PRJ0041). + +all: $(IntDir)\alloc.h \ + $(IntDir)\fp.h \ + $(IntDir)\m68881.h \ + $(IntDir)\mem.h \ + $(IntDir)\pngusr.h \ + $(IntDir)\strings.h \ + $(IntDir)\unistd.h \ + $(IntDir)\unixio.h + +$(IntDir)\alloc.h \ +$(IntDir)\fp.h \ +$(IntDir)\m68881.h \ +$(IntDir)\mem.h \ +$(IntDir)\pngusr.h \ +$(IntDir)\strings.h \ +$(IntDir)\unistd.h \ +$(IntDir)\unixio.h: + @!echo.>$@ diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/README.txt b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/README.txt new file mode 100644 index 0000000000..34565e4d00 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/README.txt @@ -0,0 +1,58 @@ +Microsoft Developer Studio Project File, Format Version 7.10 for libpng. + +Copyright (C) 2004 Simon-Pierre Cadieux. + +This code is released under the libpng license. +For conditions of distribution and use, see copyright notice in png.h + +NOTE: This project will be removed from libpng-1.5.0. It has +been replaced with the "vstudio" project. + +Assumptions: +* The libpng source files are in ..\.. +* The zlib source files are in ..\..\..\zlib +* The zlib project file is in . /* Warning: This is until the zlib project + files get intergrated into the next zlib release. The final zlib project + directory will then be ..\..\..\zlib\projects\visualc71. */ + +To use: + +1) On the main menu, select "File | Open Solution". + Open "libpng.sln". + +2) Display the Solution Explorer view (Ctrl+Alt+L) + +3) Set one of the project as the StartUp project. If you just want to build the + binaries set "libpng" as the startup project (Select "libpng" tree view + item + Project | Set as StartUp project). If you want to build and test the + binaries set it to "pngtest" (Select "pngtest" tree view item + + Project | Set as StartUp project) + +4) Select "Build | Configuration Manager...". + Choose the configuration you wish to build. + +5) Select "Build | Clean Solution". + +6) Select "Build | Build Solution (Ctrl-Shift-B)" + +This project builds the libpng binaries as follows: + +* Win32_DLL_Release\libpng16.dll DLL build +* Win32_DLL_Debug\libpng16d.dll DLL build (debug version) +* Win32_DLL_VB\libpng16vb.dll DLL build for Visual Basic, using stdcall +* Win32_LIB_Release\libpng.lib static build +* Win32_LIB_Debug\libpngd.lib static build (debug version) + +Notes: + +If you change anything in the source files, or select different compiler +settings, please change the DLL name to something different than any of +the above names. Also, make sure that in your "pngusr.h" you define +PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX according to the +instructions provided in "pngconf.h". + +All DLLs built by this project use the Microsoft dynamic C runtime library +MSVCR71.DLL (MSVCR71D.DLL for debug versions). If you distribute any of the +above mentioned libraries you may have to include this DLL in your package. +For a list of files that are redistributable in Visual Studio see +$(VCINSTALLDIR)\redist.txt. diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/README_zlib.txt b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/README_zlib.txt new file mode 100644 index 0000000000..81d11cbb57 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/README_zlib.txt @@ -0,0 +1,44 @@ +/* WARNING: This file was put in the LibPNG distribution for convenience only. + It is expected to be part of the next zlib release under + "projects\visualc71\README.txt." */ + +Microsoft Developer Studio Project File, Format Version 7.10 for zlib. + +Copyright (C) 2004 Simon-Pierre Cadieux. +Copyright (C) 2004 Cosmin Truta. + +This code is released under the libpng license. +For conditions of distribution and use, see copyright notice in zlib.h. + +NOTE: This project will be removed from libpng-1.5.0. It has +been replaced with the "vstudio" project. + +To use: + +1) On the main menu, select "File | Open Solution". + Open "zlib.sln". + +2) Display the Solution Explorer view (Ctrl+Alt+L) + +3) Set one of the project as the StartUp project. If you just want to build the + binaries set "zlib" as the startup project (Select "zlib" tree view item + + Project | Set as StartUp project). If you want to build and test the + binaries set it to "example" (Select "example" tree view item + Project | + Set as StartUp project), If you want to build the minigzip utility set it to + "minigzip" (Select "minigzip" tree view item + Project | Set as StartUp + project + +4) Select "Build | Configuration Manager...". + Choose the configuration you wish to build. + +5) Select "Build | Clean Solution". + +6) Select "Build | Build Solution (Ctrl-Shift-B)" + +This project builds the zlib binaries as follows: + +* Win32_DLL_Release\zlib1.dll DLL build +* Win32_DLL_Debug\zlib1d.dll DLL build (debug version) +* Win32_LIB_Release\zlib.lib static build +* Win32_LIB_Debug\zlibd.lib static build (debug version) + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/libpng.sln b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/libpng.sln new file mode 100644 index 0000000000..adce68aae0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/libpng.sln @@ -0,0 +1,60 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng.vcproj", "{0008960E-E0DD-41A6-8265-00B31DDB4C21}" + ProjectSection(ProjectDependencies) = postProject + {2D4F8105-7D21-454C-9932-B47CAB71A5C0} = {2D4F8105-7D21-454C-9932-B47CAB71A5C0} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngtest", "pngtest.vcproj", "{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}" + ProjectSection(ProjectDependencies) = postProject + {0008960E-E0DD-41A6-8265-00B31DDB4C21} = {0008960E-E0DD-41A6-8265-00B31DDB4C21} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcproj", "{2D4F8105-7D21-454C-9932-B47CAB71A5C0}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + DLL Debug = DLL Debug + DLL Release = DLL Release + DLL VB = DLL VB + LIB Debug = LIB Debug + LIB Release = LIB Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.ActiveCfg = DLL Debug|Win32 + {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.Build.0 = DLL Debug|Win32 + {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.ActiveCfg = DLL Release|Win32 + {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.Build.0 = DLL Release|Win32 + {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.ActiveCfg = DLL VB|Win32 + {0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.Build.0 = DLL VB|Win32 + {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.ActiveCfg = LIB Debug|Win32 + {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.Build.0 = LIB Debug|Win32 + {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.ActiveCfg = LIB Release|Win32 + {0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.Build.0 = LIB Release|Win32 + {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.ActiveCfg = DLL Debug|Win32 + {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.Build.0 = DLL Debug|Win32 + {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.ActiveCfg = DLL Release|Win32 + {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.Build.0 = DLL Release|Win32 + {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.ActiveCfg = DLL VB|Win32 + {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.Build.0 = DLL VB|Win32 + {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.ActiveCfg = LIB Debug|Win32 + {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.Build.0 = LIB Debug|Win32 + {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.ActiveCfg = LIB Release|Win32 + {FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.Build.0 = LIB Release|Win32 + {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.ActiveCfg = DLL Debug|Win32 + {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.Build.0 = DLL Debug|Win32 + {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.ActiveCfg = DLL Release|Win32 + {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.Build.0 = DLL Release|Win32 + {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.ActiveCfg = DLL Release|Win32 + {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.Build.0 = DLL Release|Win32 + {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.ActiveCfg = LIB Debug|Win32 + {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.Build.0 = LIB Debug|Win32 + {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.ActiveCfg = LIB Release|Win32 + {2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.Build.0 = LIB Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/libpng.vcproj b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/libpng.vcproj new file mode 100644 index 0000000000..24285c761d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/libpng.vcproj @@ -0,0 +1,419 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/pngtest.vcproj b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/pngtest.vcproj new file mode 100644 index 0000000000..356eb3cc4b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/pngtest.vcproj @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/zlib.vcproj b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/zlib.vcproj new file mode 100644 index 0000000000..614b869e7f --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/visualc71/zlib.vcproj @@ -0,0 +1,391 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/WARNING b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/WARNING new file mode 100644 index 0000000000..da002c937d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/WARNING @@ -0,0 +1,27 @@ +WARNING +======= +Libpng 1.6 does not use the default run-time library when building static +library builds of libpng; instead of the shared DLL runtime it uses a static +runtime. If you need to change this make sure to change the setting on all the +relevant projects: + +libpng +zlib +all the test programs + +The runtime library settings for each build are as follows: + + Release Debug +DLL /MD /MDd +Library /MT /MTd + +NOTICE that libpng 1.5 erroneously used /MD for Debug DLL builds; if you used +the debug builds in your app and you changed your app to use /MD you will need +to change it to /MDd for libpng 1.6. + +The Visual Studio 2010 defaults for a Win32 DLL or Static Library project are +as follows: + + Release Debug +DLL /MD /MDd +Static Library /MD /MDd diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/libpng/libpng.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/libpng/libpng.vcxproj new file mode 100644 index 0000000000..42195b5e85 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/libpng/libpng.vcxproj @@ -0,0 +1,234 @@ + + + + + Debug Library + Win32 + + + Debug + Win32 + + + Release Library + Win32 + + + Release + Win32 + + + + {D6973076-9317-4EF2-A0B8-B7A18AC0713E} + Win32Proj + libpng + + + + + DynamicLibrary + MultiByte + true + + + StaticLibrary + MultiByte + + + DynamicLibrary + true + MultiByte + + + StaticLibrary + MultiByte + + + + + + + + + + + + + + + + + + + false + + + $(ProjectName)16 + + + false + + $(ProjectName)16 + + + false + + + $(ProjectName)16 + + + false + + $(ProjectName)16 + + + + Use + Level4 + false + ProgramDatabase + EnableFastChecks + WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + true + false + false + pngpriv.h + true + CompileAsC + true + 4996;4127 + $(ZLibSrcDir);%(AdditionalIncludeDirectories) + true + Disabled + MultiThreadedDebugDLL + + + Windows + true + zlib.lib + 16 + $(OutDir) + + + + + Use + Level4 + false + ProgramDatabase + Disabled + EnableFastChecks + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + true + false + false + pngpriv.h + true + CompileAsC + true + 4996;4127 + $(ZLibSrcDir);%(AdditionalIncludeDirectories) + true + MultiThreadedDebug + + + Windows + true + + + + + Level4 + Use + ProgramDatabase + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + false + pngpriv.h + true + CompileAsC + true + false + 4996;4127 + $(ZLibSrcDir);%(AdditionalIncludeDirectories) + true + Full + + + Windows + true + true + true + zlib.lib + 16 + $(OutDir) + + + + + Level4 + Use + ProgramDatabase + MultiThreaded + true + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + false + pngpriv.h + true + CompileAsC + true + false + 4996;4127 + $(ZLibSrcDir);%(AdditionalIncludeDirectories) + true + Full + true + + + Windows + true + true + true + + + true + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + true + true + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pnglibconf/pnglibconf.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pnglibconf/pnglibconf.vcxproj new file mode 100644 index 0000000000..49e8d6b3c0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pnglibconf/pnglibconf.vcxproj @@ -0,0 +1,61 @@ + + + + + Release + Win32 + + + + {EB33566E-DA7F-4D28-9077-88C0B7C77E35} + pnglibconf + + + + Application + false + true + MultiByte + + + + + + + + + + + Build + + + + Level3 + MaxSpeed + true + true + + + true + true + true + + + copy ..\..\..\scripts\pnglibconf.h.prebuilt ..\..\..\pnglibconf.h + + + Generating pnglibconf.h + + + ..\..\..\pnglibconf.h + + + ..\..\..\scripts\pnglibconf.h.prebuilt + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngstest/pngstest.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngstest/pngstest.vcxproj new file mode 100644 index 0000000000..83b106f77b --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngstest/pngstest.vcxproj @@ -0,0 +1,219 @@ + + + + + Debug Library + Win32 + + + Debug + Win32 + + + Release Library + Win32 + + + Release + Win32 + + + + {277AC57F-313B-4D06-B119-A3CDB672D2FF} + Win32Proj + pngstest + + + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + + NotUsing + Level4 + false + ProgramDatabase + Disabled + EnableFastChecks + WIN32;_DEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + true + false + true + false + MultiThreadedDebugDLL + + + Console + true + libpng16.lib + $(OutDir) + + + Executing libpng simplified API test program + "$(OutDir)pngstest.exe" --strict --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn0g01.png ../../../contrib/pngsuite/ftbbn0g02.png ../../../contrib/pngsuite/ftbbn0g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn0g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n0g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png + $(IntDir)pngstest.out + $(OutDir)pngstest.exe + + + + + NotUsing + Level4 + false + ProgramDatabase + Disabled + EnableFastChecks + MultiThreadedDebug + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + true + false + true + false + + + Console + true + libpng16.lib;zlib.lib + $(OutDir) + + + Executing libpng simplified API test program + "$(OutDir)pngstest.exe" --strict --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn0g01.png ../../../contrib/pngsuite/ftbbn0g02.png ../../../contrib/pngsuite/ftbbn0g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn0g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n0g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png + $(IntDir)pngstest.out + $(OutDir)pngstest.exe + + + + + Level4 + NotUsing + ProgramDatabase + Full + false + true + WIN32;NDEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + false + true + true + false + + + Console + true + true + true + libpng16.lib + $(OutDir) + UseLinkTimeCodeGeneration + + + Executing libpng simplified API test program + "$(OutDir)pngstest.exe" --strict --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn0g01.png ../../../contrib/pngsuite/ftbbn0g02.png ../../../contrib/pngsuite/ftbbn0g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn0g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n0g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png + $(IntDir)pngstest.out + $(OutDir)pngstest.exe + + + + + Level4 + NotUsing + ProgramDatabase + Full + MultiThreaded + false + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + false + true + true + false + + + Console + true + true + true + libpng16.lib;zlib.lib + $(OutDir) + UseLinkTimeCodeGeneration + + + Executing libpng simplified API test program + "$(OutDir)pngstest.exe" --strict --log --touch "$(IntDir)pngstest.out" ../../../contrib/pngsuite/basn0g01.png ../../../contrib/pngsuite/basn0g02.png ../../../contrib/pngsuite/basn0g04.png ../../../contrib/pngsuite/basn0g08.png ../../../contrib/pngsuite/basn0g16.png ../../../contrib/pngsuite/basn2c08.png ../../../contrib/pngsuite/basn2c16.png ../../../contrib/pngsuite/basn3p01.png ../../../contrib/pngsuite/basn3p02.png ../../../contrib/pngsuite/basn3p04.png ../../../contrib/pngsuite/basn3p08.png ../../../contrib/pngsuite/basn4a08.png ../../../contrib/pngsuite/basn4a16.png ../../../contrib/pngsuite/basn6a08.png ../../../contrib/pngsuite/basn6a16.png ../../../contrib/pngsuite/ftbbn0g01.png ../../../contrib/pngsuite/ftbbn0g02.png ../../../contrib/pngsuite/ftbbn0g04.png ../../../contrib/pngsuite/ftbbn2c16.png ../../../contrib/pngsuite/ftbbn3p08.png ../../../contrib/pngsuite/ftbgn2c16.png ../../../contrib/pngsuite/ftbgn3p08.png ../../../contrib/pngsuite/ftbrn2c08.png ../../../contrib/pngsuite/ftbwn0g16.png ../../../contrib/pngsuite/ftbwn3p08.png ../../../contrib/pngsuite/ftbyn3p08.png ../../../contrib/pngsuite/ftp0n0g08.png ../../../contrib/pngsuite/ftp0n2c08.png ../../../contrib/pngsuite/ftp0n3p08.png ../../../contrib/pngsuite/ftp1n3p08.png + $(IntDir)pngstest.out + $(OutDir)pngstest.exe + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngtest/pngtest.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngtest/pngtest.vcxproj new file mode 100644 index 0000000000..39b8de4309 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngtest/pngtest.vcxproj @@ -0,0 +1,220 @@ + + + + + Debug Library + Win32 + + + Debug + Win32 + + + Release Library + Win32 + + + Release + Win32 + + + + {228BA965-50D5-42B2-8BCF-AFCC227E3C1D} + Win32Proj + pngtest + + + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + + NotUsing + Level4 + false + ProgramDatabase + Disabled + EnableFastChecks + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996 + false + true + true + true + false + true + false + MultiThreadedDebugDLL + + + Console + true + libpng16.lib + $(OutDir) + + + Executing PNG test program + "$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png" + $(IntDir)pngout.png + ..\..\..\pngtest.png;$(OutDir)pngtest.exe + + + + + NotUsing + Level4 + false + ProgramDatabase + Disabled + EnableFastChecks + MultiThreadedDebug + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996 + false + true + true + true + false + true + false + + + Console + true + libpng16.lib;zlib.lib + $(OutDir) + + + Executing PNG test program + "$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png" + $(IntDir)pngout.png + ..\..\..\pngtest.png;$(OutDir)pngtest.exe + + + + + Level4 + NotUsing + ProgramDatabase + Full + false + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996 + false + true + true + false + true + true + false + + + Console + true + true + true + UseLinkTimeCodeGeneration + libpng16.lib + $(OutDir) + + + Executing PNG test program + "$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png" + $(IntDir)pngout.png + ..\..\..\pngtest.png;$(OutDir)pngtest.exe + + + + + Level4 + NotUsing + ProgramDatabase + Full + MultiThreaded + false + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996 + false + true + true + false + true + true + false + + + Console + true + true + true + libpng16.lib;zlib.lib + UseLinkTimeCodeGeneration + $(OutDir) + + + Executing PNG test program + $(OutDir)pngtest.exe ..\..\..\pngtest.png $(IntDir)pngout.png + "$(OutDir)pngtest.exe" ..\..\..\pngtest.png "$(IntDir)pngout.png" + $(IntDir)pngout.png + ..\..\..\pngtest.png;$(OutDir)pngtest.exe + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngunknown/pngunknown.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngunknown/pngunknown.vcxproj new file mode 100644 index 0000000000..f4a2edc9b5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngunknown/pngunknown.vcxproj @@ -0,0 +1,219 @@ + + + + + Debug Library + Win32 + + + Debug + Win32 + + + Release Library + Win32 + + + Release + Win32 + + + + {C5D3156C-8C8C-4936-B35F-2B829BA36FEC} + Win32Proj + pngunknown + + + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + + NotUsing + Level4 + false + ProgramDatabase + Disabled + EnableFastChecks + WIN32;_DEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + true + false + true + false + MultiThreadedDebugDLL + + + Console + true + libpng16.lib + $(OutDir) + + + Executing PNG validation program + "$(OutDir)pngunknown.exe" --strict --default --touch "$(IntDir)pngunknown.out" ../../../pngtest.png + $(IntDir)pngunknown.out + $(OutDir)pngunknown.exe + + + + + NotUsing + Level4 + false + ProgramDatabase + Disabled + EnableFastChecks + MultiThreadedDebug + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + true + false + true + false + + + Console + true + libpng16.lib;zlib.lib + $(OutDir) + + + Executing PNG validation program + "$(OutDir)pngunknown.exe" --strict --default --touch "$(IntDir)pngunknown.out" ../../../pngtest.png + $(IntDir)pngunknown.out + $(OutDir)pngunknown.exe + + + + + Level4 + NotUsing + ProgramDatabase + Full + false + true + WIN32;NDEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + false + true + true + false + + + Console + true + true + true + libpng16.lib + $(OutDir) + UseLinkTimeCodeGeneration + + + Executing PNG validation program + "$(OutDir)pngunknown.exe" --strict --default --touch "$(IntDir)pngunknown.out" ../../../pngtest.png + $(IntDir)pngunknown.out + $(OutDir)pngunknown.exe + + + + + Level4 + NotUsing + ProgramDatabase + Full + MultiThreaded + false + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + false + true + true + false + + + Console + true + true + true + libpng16.lib;zlib.lib + $(OutDir) + UseLinkTimeCodeGeneration + + + Executing PNG validation program + "$(OutDir)pngunknown.exe" --strict --default --touch "$(IntDir)pngunknown.out" ../../../pngtest.png + $(IntDir)pngunknown.out + $(OutDir)pngunknown.exe + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngvalid/pngvalid.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngvalid/pngvalid.vcxproj new file mode 100644 index 0000000000..a87283aa95 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/pngvalid/pngvalid.vcxproj @@ -0,0 +1,219 @@ + + + + + Debug Library + Win32 + + + Debug + Win32 + + + Release Library + Win32 + + + Release + Win32 + + + + {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8} + Win32Proj + pngvalid + + + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + + NotUsing + Level4 + false + ProgramDatabase + Disabled + EnableFastChecks + WIN32;_DEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + true + false + true + false + MultiThreadedDebugDLL + + + Console + true + libpng16.lib;zlib.lib + $(OutDir) + + + Executing PNG validation program + "$(OutDir)pngvalid.exe" --touch "$(IntDir)pngvalid.out" + $(IntDir)pngvalid.out + $(OutDir)pngvalid.exe + + + + + NotUsing + Level4 + false + ProgramDatabase + Disabled + EnableFastChecks + MultiThreadedDebug + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + true + false + true + false + + + Console + true + libpng16.lib;zlib.lib + $(OutDir) + + + Executing PNG validation program + "$(OutDir)pngvalid.exe" --touch "$(IntDir)pngvalid.out" + $(IntDir)pngvalid.out + $(OutDir)pngvalid.exe + + + + + Level4 + NotUsing + ProgramDatabase + Full + false + true + WIN32;NDEBUG;_CONSOLE;PNG_USE_DLL;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + false + true + true + false + + + Console + true + true + true + libpng16.lib;zlib.lib + $(OutDir) + UseLinkTimeCodeGeneration + + + Executing PNG validation program + "$(OutDir)pngvalid.exe" --touch "$(IntDir)pngvalid.out" + $(IntDir)pngvalid.out + $(OutDir)pngvalid.exe + + + + + Level4 + NotUsing + ProgramDatabase + Full + MultiThreaded + false + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(ZLibSrcDir);..\..\..\scripts;%(AdditionalIncludeDirectories) + 4996;4127 + false + true + true + false + true + true + false + + + Console + true + true + true + libpng16.lib;zlib.lib + $(OutDir) + UseLinkTimeCodeGeneration + + + Executing PNG validation program + "$(OutDir)pngvalid.exe" --touch "$(IntDir)pngvalid.out" + $(IntDir)pngvalid.out + $(OutDir)pngvalid.exe + + + + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/readme.txt b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/readme.txt new file mode 100644 index 0000000000..1af61c9a41 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/readme.txt @@ -0,0 +1,65 @@ + +VisualStudio instructions + +libpng version 1.6.2 - April 25, 2013 + +Copyright (c) 1998-2010 Glenn Randers-Pehrson + +This code is released under the libpng license. +For conditions of distribution and use, see the disclaimer +and license in png.h + +This directory contains support for building libpng under MicroSoft +VisualStudio 2010. It may also work under later versions of VisualStudio. +You should be familiar with VisualStudio before using this directory. + +Initial preparations +==================== +You must enter some information in zlib.props before attempting to build +with this 'solution'. Please read and edit zlib.props first. You will +probably not be familiar with the contents of zlib.props - do not worry, +it is mostly harmless. + +This is all you need to do to build the 'release' and 'release library' +configurations. + +Debugging +========= +The release configurations default to /Ox optimization. Full debugging +information is produced (in the .pdb), but if you encounter a problem the +optimization may make it difficult to debug. Simply rebuild with a lower +optimization level (e.g. /Od.) + +Linking your application +======================== +Normally you should link against the 'release' configuration. This builds a +DLL for libpng with the default runtime options used by Visual Studio 2010. +In particular the runtime library is the "MultiThreaded DLL" version. +If you use Visual Studio defaults to build your application you will have no +problems. + +If you don't use the Visual Studio defaults your application must still be built +with the default runtime option (/MD). If, for some reason, it is not then your +application will crash inside libpng16.dll as soon as libpng tries to read +from a file handle you pass in. + +If you do not want to use the DLL, for example for a very small application, +the 'release library' configuration may be more appropriate. This is built +with a non-standard runtime library - the "MultiThreaded" version. When you +build your application it must be compiled with this option (/MT), otherwise +it will not build (if you are lucky) or crash (if you are not.) + +Stop reading here +================= +You have enough information to build a working application. + +Debug versions have limited support +=================================== +This solution includes limited support for debug versions of libpng. You +do not need these unless your own solution itself uses debug builds (it is +far more effective to debug on the release builds, there is no point building +a special debug build unless you have heap corruption problems that you can't +track down.) + +The debug build of libpng is minimally supported. Support for debug builds of +zlib is also minimal. You really don't want to do this. diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/vstudio.sln b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/vstudio.sln new file mode 100644 index 0000000000..5e79aee69e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/vstudio.sln @@ -0,0 +1,109 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcxproj", "{60F89955-91C6-3A36-8000-13C592FEC2DF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pnglibconf", "pnglibconf\pnglibconf.vcxproj", "{EB33566E-DA7F-4D28-9077-88C0B7C77E35}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng\libpng.vcxproj", "{D6973076-9317-4EF2-A0B8-B7A18AC0713E}" + ProjectSection(ProjectDependencies) = postProject + {60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF} + {EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngtest", "pngtest\pngtest.vcxproj", "{228BA965-50D5-42B2-8BCF-AFCC227E3C1D}" + ProjectSection(ProjectDependencies) = postProject + {60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF} + {EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35} + {D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngvalid", "pngvalid\pngvalid.vcxproj", "{9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}" + ProjectSection(ProjectDependencies) = postProject + {60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF} + {EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35} + {D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngstest", "pngstest\pngstest.vcxproj", "{277AC57F-313B-4D06-B119-A3CDB672D2FF}" + ProjectSection(ProjectDependencies) = postProject + {60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF} + {EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35} + {D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngunknown", "pngunknown\pngunknown.vcxproj", "{C5D3156C-8C8C-4936-B35F-2B829BA36FEC}" + ProjectSection(ProjectDependencies) = postProject + {60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF} + {EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35} + {D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug Library|Win32 = Debug Library|Win32 + Debug|Win32 = Debug|Win32 + Release Library|Win32 = Release Library|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug Library|Win32.ActiveCfg = Debug Library|Win32 + {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug Library|Win32.Build.0 = Debug Library|Win32 + {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|Win32.ActiveCfg = Debug|Win32 + {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|Win32.Build.0 = Debug|Win32 + {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release Library|Win32.ActiveCfg = Release Library|Win32 + {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release Library|Win32.Build.0 = Release Library|Win32 + {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|Win32.ActiveCfg = Release|Win32 + {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|Win32.Build.0 = Release|Win32 + {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug Library|Win32.ActiveCfg = Debug Library|Win32 + {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug Library|Win32.Build.0 = Debug Library|Win32 + {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug|Win32.ActiveCfg = Debug|Win32 + {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Debug|Win32.Build.0 = Debug|Win32 + {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release Library|Win32.ActiveCfg = Release Library|Win32 + {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release Library|Win32.Build.0 = Release Library|Win32 + {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|Win32.ActiveCfg = Release|Win32 + {228BA965-50D5-42B2-8BCF-AFCC227E3C1D}.Release|Win32.Build.0 = Release|Win32 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug Library|Win32.ActiveCfg = Debug Library|Win32 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug Library|Win32.Build.0 = Debug Library|Win32 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|Win32.ActiveCfg = Debug|Win32 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|Win32.Build.0 = Debug|Win32 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release Library|Win32.ActiveCfg = Release Library|Win32 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release Library|Win32.Build.0 = Release Library|Win32 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|Win32.ActiveCfg = Release|Win32 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|Win32.Build.0 = Release|Win32 + {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug Library|Win32.ActiveCfg = Debug Library|Win32 + {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug Library|Win32.Build.0 = Debug Library|Win32 + {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug|Win32.ActiveCfg = Debug|Win32 + {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Debug|Win32.Build.0 = Debug|Win32 + {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release Library|Win32.ActiveCfg = Release Library|Win32 + {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release Library|Win32.Build.0 = Release Library|Win32 + {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release|Win32.ActiveCfg = Release|Win32 + {9B36B6FE-7FC0-434F-A71F-BBEF8099F1D8}.Release|Win32.Build.0 = Release|Win32 + {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug Library|Win32.ActiveCfg = Release|Win32 + {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug Library|Win32.Build.0 = Release|Win32 + {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug|Win32.ActiveCfg = Release|Win32 + {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Debug|Win32.Build.0 = Release|Win32 + {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release Library|Win32.ActiveCfg = Release|Win32 + {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release Library|Win32.Build.0 = Release|Win32 + {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|Win32.ActiveCfg = Release|Win32 + {EB33566E-DA7F-4D28-9077-88C0B7C77E35}.Release|Win32.Build.0 = Release|Win32 + {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug Library|Win32.ActiveCfg = Debug Library|Win32 + {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug Library|Win32.Build.0 = Debug Library|Win32 + {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug|Win32.ActiveCfg = Debug|Win32 + {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Debug|Win32.Build.0 = Debug|Win32 + {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release Library|Win32.ActiveCfg = Release Library|Win32 + {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release Library|Win32.Build.0 = Release Library|Win32 + {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release|Win32.ActiveCfg = Release|Win32 + {277AC57F-313B-4D06-B119-A3CDB672D2FF}.Release|Win32.Build.0 = Release|Win32 + {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug Library|Win32.ActiveCfg = Debug Library|Win32 + {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug Library|Win32.Build.0 = Debug Library|Win32 + {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug|Win32.ActiveCfg = Debug|Win32 + {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Debug|Win32.Build.0 = Debug|Win32 + {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release Library|Win32.ActiveCfg = Release Library|Win32 + {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release Library|Win32.Build.0 = Release Library|Win32 + {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release|Win32.ActiveCfg = Release|Win32 + {C5D3156C-8C8C-4936-B35F-2B829BA36FEC}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/zlib.props b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/zlib.props new file mode 100644 index 0000000000..c73bf08964 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/zlib.props @@ -0,0 +1,45 @@ + + + + + + + ..\..\..\..\zlib-1.2.5 + + + true + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/zlib/zlib.vcxproj b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/zlib/zlib.vcxproj new file mode 100644 index 0000000000..63562556b5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/projects/vstudio/zlib/zlib.vcxproj @@ -0,0 +1,169 @@ + + + + + Debug Library + Win32 + + + Debug + Win32 + + + Release Library + Win32 + + + Release + Win32 + + + + + + + + + + + + + + + + + {60F89955-91C6-3A36-8000-13C592FEC2DF} + Win32Proj + zlib + + + + + StaticLibrary + + + StaticLibrary + + + StaticLibrary + + + StaticLibrary + + + StaticLibrary + + + + + + + + + + + + + + + + + + + true + + + true + + + true + + + true + + + true + + + + WIN32;_DEBUG;_WINDOWS;Z_SOLO;%(PreprocessorDefinitions) + MultiThreadedDebug + TurnOffAllWarnings + ProgramDatabase + Disabled + true + true + + + MachineX86 + true + Windows + + + + + WIN32;_DEBUG;_WINDOWS;Z_SOLO;%(PreprocessorDefinitions) + TurnOffAllWarnings + ProgramDatabase + Disabled + true + true + MultiThreadedDebugDLL + + + MachineX86 + true + Windows + + + + + Level3 + ProgramDatabase + Full + true + true + false + true + true + true + MultiThreaded + WIN32;NDEBUG;_WINDOWS;Z_SOLO;%(PreprocessorDefinitions) + + + MachineX86 + true + Windows + + + true + + + + + Level3 + ProgramDatabase + Full + true + true + false + true + true + true + WIN32;NDEBUG;_WINDOWS;Z_SOLO;%(PreprocessorDefinitions) + + + MachineX86 + true + Windows + true + true + + + true + + + + + + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/README.txt b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/README.txt new file mode 100644 index 0000000000..6f5f062c45 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/README.txt @@ -0,0 +1,86 @@ + +Makefiles for libpng version 1.6.2 - April 25, 2013 + +pnglibconf.h.prebuilt => Stores configuration settings + makefile.linux => Linux/ELF makefile + (gcc, creates libpng16.so.16.1.6.2) + makefile.gcc => Generic makefile (gcc, creates static libpng.a) + makefile.knr => Archaic UNIX Makefile that converts files with + ansi2knr (Requires ansi2knr.c from + ftp://ftp.cs.wisc.edu/ghost) + makefile.acorn => Acorn makefile + makefile.aix => AIX/gcc makefile + makefile.amiga => Amiga makefile + makefile.atari => Atari makefile + makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode) + makefile.beos => beos makefile + makefile.bor => Borland makefile (uses bcc) + makefile.cegcc => minge32ce for Windows CE makefile + makefile.darwin => Darwin makefile, can use on MacosX + makefile.dec => DEC Alpha UNIX makefile + makefile.dj2 => DJGPP 2 makefile + makefile.elf => Linux/ELF makefile symbol versioning, + (gcc, creates libpng16.so.16.1.6.2) + makefile.freebsd => FreeBSD makefile + makefile.gcc => Generic gcc makefile + makefile.hpgcc => HPUX makefile using gcc + makefile.hpux => HPUX (10.20 and 11.00) makefile + makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit + makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static) + makefile.intel => Intel C/C++ version 4.0 and later + makefile.mips => MIPS makefile + makefile.msc => Microsoft C makefile + makefile.netbsd => NetBSD/cc makefile, makes libpng.so. + makefile.openbsd => OpenBSD makefile + makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def) + makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc + makefile.sggcc => Silicon Graphics (gcc, + creates libpng16.so.16.1.6.2) + makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) + makefile.solaris => Solaris 2.X makefile (gcc, + creates libpng16.so.16.1.6.2) + makefile.so9 => Solaris 9 makefile (gcc, + creates libpng16.so.16.1.6.2) + makefile.std => Generic UNIX makefile (cc, creates static libpng.a) + makefile.sunos => Sun makefile + makefile.32sunu => Sun Ultra 32-bit makefile + makefile.64sunu => Sun Ultra 64-bit makefile + makefile.tc3 => Turbo C 3.0 makefile + makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later + makevms.com => VMS build script + smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler + (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc) + +Other supporting scripts: + README.txt => This file + descrip.mms => VMS makefile for MMS or MMK + libpng-config-body.in => used by several makefiles to create libpng-config + libpng-config-head.in => used by several makefiles to create libpng-config + libpng.pc.in => Used by several makefiles to create libpng.pc + pngwin.rc => Used by the visualc71 project. + pngwin.def => Used by makefile.os2 + pngwin.dfn => Used to maintain pngwin.def + SCOPTIONS.ppc => Used with smakefile.ppc + + checksym.awk => Used for maintaining pnglibconf.h + def.dfn => Used for maintaining pnglibconf.h + options.awk => Used for maintaining pnglibconf.h + pnglibconf.dfa => Used for maintaining pnglibconf.h + pnglibconf.mak => Used for maintaining pnglibconf.h + sym.dfn => Used for symbol versioning + symbols.def => Used for symbol versioning + symbols.dfn => Used for symbol versioning + vers.dfn => Used for symbol versioning + + libtool.m4 => Used by autoconf tools + ltoptions.m4 => Used by autoconf tools + ltsugar.m4 => Used by autoconf tools + ltversion.m4 => Used by autoconf tools + lt~obsolete.m4 => Used by autoconf tools + + intprefix.dfn => Used by autoconf tools + macro.lst => Used by autoconf tools + prefix.dfn => Used by autoconf tools + + +Further information can be found in comments in the individual makefiles. diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/SCOPTIONS.ppc b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/SCOPTIONS.ppc new file mode 100644 index 0000000000..2c3503e9eb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/SCOPTIONS.ppc @@ -0,0 +1,7 @@ +OPTIMIZE +OPTPEEP +OPTTIME +OPTSCHED +AUTOREGISTER +PARMS=REGISTERS +INCLUDEDIR=hlp:ppc/include diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/checksym.awk b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/checksym.awk new file mode 100755 index 0000000000..fe3af55e05 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/checksym.awk @@ -0,0 +1,173 @@ +#!/bin/awk -f +# Check a list of symbols against the master definition +# (official) list. Arguments: +# +# awk -f checksym.awk official-def list-to-check +# +# Output is a file in the current directory called 'symbols.new', +# the value of the awk variable "of" (which can be changed on the +# command line if required.) stdout holds error messages. Error +# code indicates success or failure. +# +# NOTE: this is a pure, old fashioned, awk script. It will +# work with any awk + +BEGIN{ + err=0 + master="" # master file + official[1] = "" # defined symbols from master file + symbol[1] = "" # defined symbols from png.h + removed[1] = "" # removed symbols from png.h + lasto = 0 # last ordinal value from png.h + mastero = 0 # highest ordinal in master file + symbolo = 0 # highest ordinal in png.h + missing = "error"# log an error on missing symbols + of="symbols.new" # default to a fixed name +} + +# Read existing definitions from the master file (the first +# file on the command line.) This must be a def file and it +# has definition lines (others are ignored) of the form: +# +# symbol @ordinal +# +master == "" { + master = FILENAME +} +FILENAME==master && NF==2 && $2~/^@/ && $1!~/^;/ { + o=0+substr($2,2) + if (o > 0) { + if (official[o] == "") { + official[o] = $1 + if (o > mastero) mastero = o + next + } else + print master ": duplicated symbol:", official[o] ":", $0 + } else + print master ": bad export line format:", $0 + err = 1 +} +FILENAME==master && $1==";missing" && NF==2{ + # This allows the master file to control how missing symbols + # are handled; symbols that aren't in either the master or + # the new file. Valid values are 'ignore', 'warning' and + # 'error' + missing = $2 +} +FILENAME==master { + next +} + +# Read new definitions, these are free form but the lines must +# just be symbol definitions. Lines will be commented out for +# 'removed' symbols, introduced in png.h using PNG_REMOVED rather +# than PNG_EXPORT. Use symbols.dfn or pngwin.dfn to generate the +# input file. +# +# symbol @ordinal # two fields, exported symbol +# ; symbol @ordinal # three fields, removed symbol +# ; @ordinal # two fields, the last ordinal +NF==2 && $1 == ";" && $2 ~ /^@[1-9][0-9]*$/ { # last ordinal + o=0+substr($2,2) + if (lasto == 0 || lasto == o) + lasto=o + else { + print "png.h: duplicated last ordinal:", lasto, o + err = 1 + } + next +} +NF==3 && $1 == ";" && $3 ~ /^@[1-9][0-9]*$/ { # removed symbol + o=0+substr($3,2) + if (removed[o] == "" || removed[o] == $2) { + removed[o] = $2 + if (o > symbolo) symbolo = o + } else { + print "png.h: duplicated removed symbol", o ": '" removed[o] "' != '" $2 "'" + err = 1 + } + next +} +NF==2 && $2 ~ /^@[1-9][0-9]*$/ { # exported symbol + o=0+substr($2,2) + if (symbol[o] == "" || symbol[o] == $1) { + symbol[o] = $1 + if (o > symbolo) symbolo = o + } else { + print "png.h: duplicated symbol", o ": '" symbol[o] "' != '" $1 "'" + err = 1 + } +} +{ + next # skip all other lines +} + +# At the end check for symbols marked as both duplicated and removed +END{ + if (symbolo > lasto) { + print "highest symbol ordinal in png.h,", symbolo ", exceeds last ordinal from png.h", lasto + err = 1 + } + if (mastero > lasto) { + print "highest symbol ordinal in", master ",", mastero ", exceeds last ordinal from png.h", lasto + err = 1 + } + unexported=0 + # Add a standard header to symbols.new: + print ";Version INSERT-VERSION-HERE" >of + print ";--------------------------------------------------------------" >of + print "; LIBPNG symbol list as a Win32 DEF file" >of + print "; Contains all the symbols that can be exported from libpng" >of + print ";--------------------------------------------------------------" >of + print "LIBRARY" >of + print "" >of + print "EXPORTS" >of + + for (o=1; o<=lasto; ++o) { + if (symbol[o] == "" && removed[o] == "") { + if (unexported == 0) unexported = o + if (official[o] == "") { + # missing in export list too, so ok + if (o < lasto) continue + } + } + if (unexported != 0) { + # Symbols in the .def but not in the new file are errors, but + # the 'unexported' symbols aren't in either. By default this + # is an error too (see the setting of 'missing' at the start), + # but this can be reset on the command line or by stuff in the + # file - see the comments above. + if (missing != "ignore") { + if (o-1 > unexported) + print "png.h:", missing ": missing symbols:", unexported "-" o-1 + else + print "png.h:", missing ": missing symbol:", unexported + if (missing != "warning") + err = 1 + } + unexported = 0 + } + if (symbol[o] != "" && removed[o] != "") { + print "png.h: symbol", o, "both exported as '" symbol[o] "' and removed as '" removed[o] "'" + err = 1 + } else if (symbol[o] != official[o]) { + # either the symbol is missing somewhere or it changed + err = 1 + if (symbol[o] == "") + print "png.h: symbol", o, "is exported as '" official[o] "' in", master + else if (official[o] == "") + print "png.h: exported symbol", o, "'" symbol[o] "' not present in", master + else + print "png.h: exported symbol", o, "'" symbol[o] "' exists as '" official[o] "' in", master + } + + # Finally generate symbols.new + if (symbol[o] != "") + print " " symbol[o], "@" o > of + } + + if (err != 0) { + print "*** A new list is in", of, "***" + exit 1 + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/chkfmt b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/chkfmt new file mode 100755 index 0000000000..9da6475fd4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/chkfmt @@ -0,0 +1,137 @@ +#!/bin/sh +# +# Check the format of the source files in the current directory - checks for a +# line length of 80 characters max and no tab characters. +# +# Optionally arguments are files or directories to check. +# +# -v: output the long lines (makes fixing them easier) +# -e: spawn an editor for each file that needs a change ($EDITOR must be +# defined). When using -e the script MUST be run from an interactive +# command line. +verbose= +edit= +vers= +test "$1" = "-v" && { + shift + verbose=yes +} +test "$1" = "-e" && { + shift + if test -n "$EDITOR" + then + edit=yes + + # Copy the standard streams for the editor + exec 3>&0 4>&1 5>&2 + else + echo "chkfmt -e: EDITOR must be defined" >&2 + exit 1 + fi +} + +# Function to edit a single file - if the file isn't changed ask the user +# whether or not to continue. This stuff only works if the script is run from +# the command line (otherwise, don't specify -e or you will be sorry). +doed(){ + cp "$file" "$file".orig + "$EDITOR" "$file" 0>&3 1>&4 2>&5 3>&- 4>&- 5>&- || exit 1 + if cmp -s "$file".orig "$file" + then + rm "$file".orig + echo -n "$file: file not changed, type anything to continue: " >&5 + read ans 0>&3 + test -n "$ans" || return 1 + fi + return 0 +} + +# In beta versions the version string which appears in files can be a little +# long and cause spuriously overlong lines. To avoid this subtitute the version +# string with a 'standard' version a.b.cc before checking for long lines. +if test -r png.h +then + vers="`sed -n -e \ + 's/^#define PNG_LIBPNG_VER_STRING .\([0-9]\.[0-9]\.[0-9][0-9a-z]*\).$/\1/p' \ + png.h`" + echo "chkfmt: checking version $vers" +fi +if test -z "$vers" +then + echo "chkfmt: png.h not found, ignoring version number" >&2 +fi + +test -n "$1" || set -- . +find "$@" \( -type d \( -name '.git' -o -name '.libs' -o -name 'projects' \) \ + -prune \) -o \( -type f \ + ! -name '*.[oa]' ! -name '*.l[oa]' ! -name '*.png' ! -name '*.out' \ + ! -name '*.jpg' ! -name '*.patch' ! -name '*.obj' ! -name '*.exe' \ + ! -name '*.com' ! -name '*.tar.*' ! -name '*.zip' ! -name '*.ico' \ + ! -name '*.res' ! -name '*.rc' ! -name '*.mms' ! -name '*.rej' \ + ! -name '*.dsp' ! -name '*.orig' ! -name '*.dfn' ! -name '*.swp' \ + ! -name '~*' ! -name '*.3' \ + ! -name 'missing' ! -name 'mkinstalldirs' ! -name 'depcomp' \ + ! -name 'aclocal.m4' ! -name 'install-sh' ! -name 'Makefile.in' \ + ! -name 'ltmain.sh' ! -name 'config*' -print \) | { + st=0 + while read file + do + case "$file" in + *.mak|*[Mm]akefile.*|*[Mm]akefile) + # Makefiles require tabs, dependency lines can be this long. + check_tabs= + line_length=100;; + *.awk) + # Includes literal tabs + check_tabs= + # The following is arbitrary + line_length=132;; + *contrib/*/*.[ch]) + check_tabs=yes + line_length=96;; + *) + check_tabs=yes + line_length=80;; + esac + + # Note that vers can only contain 0-9, . and a-z + if test -n "$vers" + then + sed -e "s/$vers/a.b.cc/g" "$file" >"$file".$$ + else + cp "$file" "$file".$$ + fi + splt="`fold -$line_length "$file".$$ | diff -c "$file".$$ -`" + rm "$file".$$ + + if test -n "$splt" + then + echo "$file: lines too long" + st=1 + if test -n "$EDITOR" -a -n "$edit" + then + doed "$file" || exit 1 + elif test -n "$verbose" + then + echo "$splt" + fi + fi + if test -n "$check_tabs" + then + tab="`tr -c -d '\t' <"$file"`" + if test -n "$tab" + then + echo "$file: file contains tab characters" + st=1 + if test -n "$EDITOR" -a -n "$edit" + then + doed "$file" || exit 1 + elif test -n "$verbose" + then + echo "$splt" + fi + fi + fi + done + exit $st +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/def.dfn b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/def.dfn new file mode 100644 index 0000000000..1415c2c4eb --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/def.dfn @@ -0,0 +1,29 @@ +/* def.dfn - define format of libpng.def + * + * Last changed in libpng version 1.5.7 [December 15, 2011] + * Copyright (c) 2010-2011 Glenn Randers-Pehrson + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* Write the export file header: */ +PNG_DFN ";--------------------------------------------------------------" +PNG_DFN "; LIBPNG module definition file for OS/2" +PNG_DFN ";--------------------------------------------------------------" +PNG_DFN "" +PNG_DFN "; If you give the library an explicit name one or other files" +PNG_DFN "; may need modifying to support the new name on one or more" +PNG_DFN "; systems." +PNG_DFN "LIBRARY" +PNG_DFN "OS2 DESCRIPTION "PNG image compression library"" +PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE" +PNG_DFN "" +PNG_DFN "EXPORTS" +PNG_DFN ";Version 1.6.2" + +#define PNG_EXPORTA(ordinal, type, name, args, attributes)\ + PNG_DFN "@" SYMBOL_PREFIX "@@" name "@" + +#include "../png.h" diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/descrip.mms b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/descrip.mms new file mode 100644 index 0000000000..eb9a807131 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/descrip.mms @@ -0,0 +1,52 @@ + +cc_defs = /inc=$(ZLIBSRC) +c_deb = + +.ifdef __DECC__ +pref = /prefix=all +.endif + + + +OBJS = png.obj, pngset.obj, pngget.obj, pngrutil.obj, pngtrans.obj,\ + pngwutil.obj, pngread.obj, pngmem.obj, pngwrite.obj, pngrtran.obj,\ + pngwtran.obj, pngrio.obj, pngwio.obj, pngerror.obj, pngpread.obj + + +CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) + +all : pngtest.exe libpng.olb + @ write sys$output " pngtest available" + +libpng.olb : libpng.olb($(OBJS)) + @ write sys$output " Libpng available" + + +pngtest.exe : pngtest.obj libpng.olb + link pngtest,libpng.olb/lib,$(ZLIBSRC)libz.olb/lib + +test : pngtest.exe + run pngtest + +clean : + delete *.obj;*,*.exe; + + +# Other dependencies. +png.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngpread.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngset.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngget.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngread.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngrtran.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngrutil.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngerror.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngmem.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngrio.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngwio.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngtrans.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngwrite.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngwtran.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h +pngwutil.obj : png.h, pngconf.h, pnglibconf.h, pngpriv.h, pngstruct.h, pnginfo.h, pngdebug.h + +pngtest.obj : png.h, pngconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/dfn.awk b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/dfn.awk new file mode 100644 index 0000000000..89b92d5d9e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/dfn.awk @@ -0,0 +1,203 @@ +#!/bin/awk -f +# scripts/dfn.awk - process a .dfn file +# +# last changed in libpng version 1.5.14 - February 4, 2013 +# +# Copyright (c) 2013-2013 Glenn Randers-Pehrson +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# The output of this script is written to the file given by +# the variable 'out', which should be set on the command line. +# Error messages are printed to stdout and if any are printed +# the script will exit with error code 1. + +BEGIN{ + out="/dev/null" # as a flag + out_count=0 # count of output lines + err=0 # set if an error occured + sort=0 # sort the output + array[""]="" +} + +# The output file must be specified before any input: +NR==1 && out == "/dev/null" { + print "out=output.file must be given on the command line" + # but continue without setting the error code, this allows the + # script to be checked easily +} + +# Output can be sorted; two lines are recognized +$1 == "PNG_DFN_START_SORT"{ + sort=0+$2 + next +} + +$1 ~ /^PNG_DFN_END_SORT/{ + # Do a very simple, slow, sort; notice that blank lines won't be + # output by this + for (entry in array) { + while (array[entry] != "") { + key = entry + value = array[key] + array[key] = "" + + for (alt in array) { + if (array[alt] != "" && alt < key) { + array[key] = value + value = array[alt] + key = alt + array[alt] = "" + } + } + + print value >out + } + } + sort=0 + next +} + +/^[^"]*PNG_DFN *".*"[^"]*$/{ + # A definition line, apparently correctly formated, extract the + # definition then replace any doubled "" that remain with a single + # double quote. Notice that the original doubled double quotes + # may have been split by tokenization + # + # Sometimes GCC splits the PNG_DFN lines, we know this has happened + # if the quotes aren't closed and must read another line. In this + # case it is essential to reject lines that start '#' because those + # are introduced #line directives. + orig=$0 + line=$0 + lineno=FNR + if (lineno == "") lineno=NR + + if (sub(/^[^"]*PNG_DFN *"/,"",line) != 1) { + print "line", lineno ": processing failed:" + print orig + err=1 + next + } else { + ++out_count + } + + # Now examine quotes within the value: + # + # @" - delete this and any following spaces + # "@ - delete this and any preceding spaces + # @' - replace this by a double quote + # + # This allows macro substitution by the C compiler thus: + # + # #define first_name John + # #define last_name Smith + # + # PNG_DFN"#define name @'@" first_name "@ @" last_name "@@'" + # + # Might get C preprocessed to: + # + # PNG_DFN "#define foo @'@" John "@ @" Smith "@@'" + # + # Which this script reduces to: + # + # #define name "John Smith" + # + while (1) { + # While there is an @" remove it and the next "@ + if (line ~ /@"/) { + if (line ~ /@".*"@/) { + # Do this special case first to avoid swallowing extra spaces + # before or after the @ stuff: + if (!sub(/@" *"@/, "", line)) { + # Ok, do it in pieces - there has to be a non-space between the + # two. NOTE: really weird things happen if a leading @" is + # lost - the code will error out below (I believe). + if (!sub(/@" */, "", line) || !sub(/ *"@/, "", line)) { + print "line", lineno, ": internal error:", orig + exit 1 + } + } + } + + # There is no matching "@. Assume a split line + else while (1) { + if (getline nextline) { + # If the line starts with '#' it is a preprocesor line directive + # from cc -E, skip it: + if (nextline !~ /^#/) { + line = line " " nextline + break + } + } else { + # This is end-of-input - probably a missig "@ on the first line: + print "line", lineno ": unbalanced @\" ... \"@ pair" + err=1 + next + } + } + + # Keep going until all the @" have gone + continue + } + + # Attempt to remove a trailing " (not preceded by '@') - if this can + # be done stop now, if not assume a split line again + if (sub(/"[^"]*$/, "", line)) + break + + # Read another line + while (1) { + if (getline nextline) { + if (nextline !~ /^#/) { + line = line " " nextline + # Go back to stripping @" "@ pairs + break + } + } else { + print "line", lineno ": unterminated PNG_DFN string" + err=1 + next + } + } + } + + # Put any needed double quotes in (at the end, because these would otherwise + # interfere with the processing above.) + gsub(/@'/,"\"", line) + + # Remove any trailing spaces (not really required, but for + # editorial consistency + sub(/ *$/, "", line) + + # Remove trailing CR + sub(/ $/, "", line) + + if (sort) { + if (split(line, parts) < sort) { + print "line", lineno ": missing sort field:", line + err=1 + } else + array[parts[sort]] = line + } + + else + print line >out + next +} + +/PNG_DFN/{ + print "line", NR, "incorrectly formated PNG_DFN line:" + print $0 + err = 1 +} + +END{ + if (out_count > 0 || err > 0) + exit err + + print "no definition lines found" + exit 1 +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/intprefix.dfn b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/intprefix.dfn new file mode 100644 index 0000000000..790bdfee92 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/intprefix.dfn @@ -0,0 +1,19 @@ + +/* intprefix.dfn - generate an unprefixed internal symbol list + * + * Last changed in libpng version 1.6.0 [January 30, 2012] + * Copyright (c) 2012 Glenn Randers-Pehrson + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#define PNG_INTERNAL_DATA(type, name, array)\ + PNG_DFN "@" name "@" + +#define PNG_INTERNAL_FUNCTION(type, name, args, attributes)\ + PNG_DFN "@" name "@" + +#define PNGPREFIX_H /* self generation */ +#include "../pngpriv.h" diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/libpng-config-body.in b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/libpng-config-body.in new file mode 100755 index 0000000000..b466432d54 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/libpng-config-body.in @@ -0,0 +1,96 @@ + +usage() +{ + cat <='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2011 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_REPLACE_SHELLFNS + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[23]].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) + + +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/ltoptions.m4 b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/ltoptions.m4 new file mode 100644 index 0000000000..5d9acd8e23 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/ltoptions.m4 @@ -0,0 +1,384 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 7 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/ltsugar.m4 b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/ltsugar.m4 new file mode 100644 index 0000000000..9000a057d3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/ltversion.m4 b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/ltversion.m4 new file mode 100644 index 0000000000..07a8602d48 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 3337 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.2' +macro_revision='1.3337' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/lt~obsolete.m4 b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/lt~obsolete.m4 new file mode 100644 index 0000000000..c573da90c5 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/lt~obsolete.m4 @@ -0,0 +1,98 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/macro.lst b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/macro.lst new file mode 100644 index 0000000000..57124b76a0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/macro.lst @@ -0,0 +1,3 @@ +get_uint_32(buf) +get_uint_16(buf) +get_int_32(buf) diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.32sunu b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.32sunu new file mode 100644 index 0000000000..6eef5b7b45 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.32sunu @@ -0,0 +1,241 @@ +# makefile for libpng on Solaris 2.x with cc +# Contributed by William L. Sebok, based on makefile.linux +# Copyright (C) 2002, 2006, 2010-2011 Glenn Randers-Pehrson +# Copyright (C) 1998 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger + +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Library name: +LIBNAME=libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).so +LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.so + +# Utilities: +CC=cc +AR_RC=ar rc +MKDIR_P=mkdir -p +LN_SF=ln -f -s +RANLIB=echo +RM_F=/bin/rm -f + +SUN_CC_FLAGS=-fast -xtarget=ultra +SUN_LD_FLAGS=-fast -xtarget=ultra + +# where make install puts libpng.a, libpng16.so and libpng16/png.h +prefix=/a +exec_prefix=$(prefix) + +# Where the zlib library and include files are located +# Changing these to ../zlib poses a security risk. If you want +# to have zlib in an adjacent directory, specify the full path instead of "..". +#ZLIBLIB=../zlib +#ZLIBINC=../zlib + +ZLIBLIB=/usr/lib +ZLIBINC=/usr/include + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion +CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \ + # $(WARNMORE) -g -DPNG_DEBUG=5 +LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config + +include scripts/pnglibconf.mak +DELETE = $(RM_F) +DFNFLAGS = $(DEFS) $(CPPFLAGS) + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo libdir=\"$(LIBPATH)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-R$(LIBPATH)\"; \ + echo ccopts=\"-xtarget=ultra\"; \ + echo ldopts=\"-xtarget=ultra\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) + @case "`type ld`" in *ucb*) \ + echo; \ + echo '## WARNING:'; \ + echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ + echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ + echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ + echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ + echo '## at all. If it is, things are likely to break because of'; \ + echo '## the libucb dependency that is created.'; \ + echo; \ + ;; \ + esac + $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \ + -o $(LIBSOMAJ) $(OBJSDLL) + +pngtest: pngtest.o $(LIBSO) + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \ + $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) + ./pngtestd pngtest.png + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \ + $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBSO) $(LIBSOMAJ)* \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.64sunu b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.64sunu new file mode 100644 index 0000000000..1aaf696258 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.64sunu @@ -0,0 +1,241 @@ +# makefile for libpng on Solaris 2.x with cc +# Contributed by William L. Sebok, based on makefile.linux +# Copyright (C) 2002, 2006, 2010-2011 Glenn Randers-Pehrson +# Copyright (C) 1998 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger + +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Library name: +LIBNAME=libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).so +LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.so + +# Utilities: +CC=cc +AR_RC=ar rc +MKDIR_P=mkdir -p +LN_SF=ln -f -s +RANLIB=echo +RM_F=/bin/rm -f + +SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9 +SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9 + +# where make install puts libpng.a, libpng16.so and libpng16/png.h +prefix=/a +exec_prefix=$(prefix) + +# Where the zlib library and include files are located +# Changing these to ../zlib poses a security risk. If you want +# to have zlib in an adjacent directory, specify the full path instead of "..". +#ZLIBLIB=../zlib +#ZLIBINC=../zlib + +ZLIBLIB=/usr/lib +ZLIBINC=/usr/include + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion +CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \ + # $(WARNMORE) -g -DPNG_DEBUG=5 +LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config + +include scripts/pnglibconf.mak +DELETE = $(RM_F) +DFNFLAGS = $(DEFS) $(CPPFLAGS) + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo libdir=\"$(LIBPATH)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-R$(LIBPATH)\"; \ + echo ccopts=\"-xtarget=ultra -xarch=v9\"; \ + echo ldopts=\"-xtarget=ultra -xarch=v9\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) + @case "`type ld`" in *ucb*) \ + echo; \ + echo '## WARNING:'; \ + echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ + echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ + echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ + echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ + echo '## at all. If it is, things are likely to break because of'; \ + echo '## the libucb dependency that is created.'; \ + echo; \ + ;; \ + esac + $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \ + -o $(LIBSOMAJ) $(OBJSDLL) + +pngtest: pngtest.o $(LIBSO) + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \ + $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) + ./pngtestd pngtest.png + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \ + $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBSO) $(LIBSOMAJ)* \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.acorn b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.acorn new file mode 100644 index 0000000000..00b8fb5b35 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.acorn @@ -0,0 +1,57 @@ +# Project: libpng + + +# Toolflags: +CCflags = -c -depend !Depend -IC:,Zlib: -g -throwback -DRISCOS -fnah +C++flags = -c -depend !Depend -IC: -throwback +Linkflags = -aif -c++ -o $@ +ObjAsmflags = -throwback -NoCache -depend !Depend +CMHGflags = +LibFileflags = -c -l -o $@ +Squeezeflags = -o $@ + +# Final targets: +@.libpng-lib: @.o.png @.o.pngerror @.o.pngrio @.o.pngwio @.o.pngmem \ + @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngrtran \ + @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil + LibFile $(LibFileflags) @.o.png @.o.pngerror @.o.pngrio @.o.pngrtran \ + @.o.pngmem @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngwio \ + @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil +@.mm-libpng-lib: @.mm.png @.mm.pngerror @.mm.pngrio @.mm.pngwio @.mm.pngmem \ + @.mm.pngpread @.mm.pngset @.mm.pngget @.mm.pngread @.mm.pngrtran \ + @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite @.mm.pngwtran @.mm.pngwutil + LibFile $(LibFileflags) @.mm.png @.mm.pngerror @.mm.pngrio \ + @.mm.pngwio @.mm.pngmem @.mm.pngpread @.mm.pngset @.mm.pngget \ + @.mm.pngread @.mm.pngrtran @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite \ + @.mm.pngwtran @.mm.pngwutil + + +# User-editable dependencies: +# (C) Copyright 1997 Tom Tanner +Test: @.pngtest + .pngtest + @remove .pngtest + +#It would be nice if you could stop "make" listing from here on! +@.pngtest: @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib + Link $(Linkflags) @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib + +.SUFFIXES: .o .mm .c + +.c.mm: + MemCheck.CC cc $(ccflags) -o $@ LibPng:$< +.c.o: + cc $(ccflags) -o $@ $< + +# See scripts.mak.libpngconf for how to generate this: +@.h.libpngconf: @.scripts.h.libpngconf + copy @.scripts.h.libpngconf $@ + +# Static dependencies: +@.o.png @.o.pngerror @.o.pngrio @.o.pngwio @.o.pngmem \ +@.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngrtran \ +@.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil \ +@.o.pngtest: @.h.libpngconf + + +# Dynamic dependencies: diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.aix b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.aix new file mode 100644 index 0000000000..ae89cd441e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.aix @@ -0,0 +1,121 @@ +# makefile for libpng using gcc (generic, static library) +# Copyright (C) 2002, 2006-2009 Glenn Randers-Pehrson +# Copyright (C) 2000 Cosmin Truta +# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc) +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Location of the zlib library and include files +ZLIBINC = ../zlib +ZLIBLIB = ../zlib + +# Compiler, linker, lib and other tools +CC = gcc +LD = $(CC) +AR_RC = ar rcs +MKDIR_P = mkdir -p +RANLIB = ranlib +RM_F = rm -f +LN_SF = ln -f -s + +LIBNAME=libpng16 +PNGMAJ = 16 + +prefix=/usr/local +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) + +CDEBUG = -g -DPNG_DEBUG=5 +LDDEBUG = +CRELEASE = -O2 +LDRELEASE = -s +WARNMORE=-W -Wall +CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE) +LDFLAGS = -L. -L$(ZLIBLIB) -lpng16 -lz -lm $(LDRELEASE) + +# File extensions +O=.o +A=.a +E= + +# Variables +OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ + pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ + pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) + +# Targets +all: $(LIBNAME)$(A) pngtest$(E) + +include scripts/pnglibconf.mak +REMOVE = $(RM_F) +DFNFLAGS = $(DEFS) $(CPPFLAGS) + +$(LIBNAME)$(A): $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +test: pngtest$(E) + ./pngtest$(E) + +pngtest$(E): pngtest$(O) $(LIBNAME)$(A) + $(LD) -o $@ pngtest$(O) $(LDFLAGS) + +install: $(LIBNAME)$(A) + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DI)/$(LIBNAME)/png.h + -@$(RM_F) $(DI)/$(LIBNAME)/pngconf.h + -@$(RM_F) $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h + -@$(RM_F) $(DI)/pngconf.h + -@$(RM_F) $(DI)/pnglibconf.h + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h \ + $(DI)/$(LIBNAME)/pngconf.h \ + $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) -r $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + -@$(RM_F) $(DL)/$(LIBNAME)$(A) + -@$(RM_F) $(DL)/libpng$(A) + cp $(LIBNAME)$(A) $(DL)/$(LIBNAME)$(A) + chmod 644 $(DL)/$(LIBNAME)$(A) + (cd $(DL); $(LN_SF) $(LIBNAME)$(A) libpng$(A)) + (cd $(DI); $(LN_SF) libpng/* .;) + +clean: + $(RM_F) *.o $(LIBNAME)$(A) pngtest pngout.png pnglibconf.h + +png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest$(O): png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.amiga b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.amiga new file mode 100644 index 0000000000..228b5c22a7 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.amiga @@ -0,0 +1,56 @@ +# Commodore Amiga Makefile +# makefile for libpng and SAS C V6.5x compiler +# Copyright (C) 1995-2000 Wolf Faust +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h +# +# Location/path of zlib include files +ZLIB=/zlib +#compiler +CC=sc +#compiler flags +# WARNING: a bug in V6.51 causes bad code with OPTGO +# So use V6.55 or set NOOPTGO!!!!!!!!! +CFLAGS= NOSTKCHK PARMS=REG OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL\ + OPTLOOP OPTRDEP=4 OPTDEP=4 OPTCOMP=4 INCLUDEDIR=$(ZLIB) \ + DEFINE=PNG_INTERNAL +#linker flags +LDFLAGS= SD ND BATCH +#link libs +LDLIBS= libpng.lib libgz.lib LIB:scm.lib LIB:sc.lib Lib:amiga.lib +# linker +LN= slink +# file deletion command +RM= delete quiet +# file copy command? +CP= copy +# library (.lib) file creation command +AR= oml +# make directory command +MKDIR= makedir + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.lib pngtest + +libpng.lib: $(OBJS) +-$(RM) libpng.lib +$(AR) libpng.lib r $(OBJS) + +$(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h + +pnglibconf.h: scripts/pnglibconf.h.prebuilt +$(CP) scripts/pnglibconf.h.prebuilt pnglibconf.h + +pngtest: pngtest.o libpng.lib +$(LN) libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo libs=\"-lpng16 -lz \"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + cp $(LIBSO)* /boot/home/config/lib + +$(LIBSOMAJ): $(OBJSDLL) + $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \ + $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS) + +pngtest: pngtest.o $(LIBSO) + $(CC) -L$(ZLIBLIB) -L. -lz -lpng16 -o pngtest pngtest.o + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) $(CFLAGS) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtestd pngtest.png + +test-installed: + $(CC) $(CFLAGS) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ + $(LIBSO) $(LIBSOMAJ)* pngtesti \ + pnglibconf.h libpng.pc + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.bor b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.bor new file mode 100644 index 0000000000..e3b36a51e3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.bor @@ -0,0 +1,161 @@ +# Makefile for libpng +# 16-bit Borland C++ (Note: All modules are compiled in C mode) +# To build the library, do: +# "make -fmakefile.bor -DMODEL=c" +# or: "make -fmakefile.bor -DMODEL=l" +# +# ------------ Borland C++ ------------ + +### Absolutely necessary for this makefile to work +.AUTODEPEND + +## Where zlib.h, zconf.h and zlib_MODEL.lib are +ZLIB_DIR=..\zlib + +## Compiler, linker and lib stuff +CC=bcc +LD=bcc +LIB=tlib + +!ifndef MODEL +MODEL=l +!endif + +MODEL_ARG=-m$(MODEL) + +#TARGET_CPU=3 +# 2 = 286, 3 = 386, etc. +!ifndef TARGET_CPU +TARGET_CPU=2 +!endif + +# Use this if you don't want Borland's fancy exception handling +# (for Borland C++ 4.0 or later) +#NOEHLIB=noeh$(MODEL).lib + +!ifdef DEBUG +CDEBUG=-v +LDEBUG=-v +!else +CDEBUG= +LDEBUG= +!endif + +# STACKOFLOW=1 +!ifdef STACKOFLOW +CDEBUG=$(CDEBUG) -N +LDEBUG=$(LDEBUG) -N +!endif + +# -X- turn on dependency generation in the object file +# -w set all warnings on +# -O2 optimize for speed +# -Z global optimization +CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG) + +# -M generate map file +LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG) + +## Variables + +OBJS = \ + png.obj \ + pngerror.obj \ + pngget.obj \ + pngmem.obj \ + pngpread.obj \ + pngread.obj \ + pngrio.obj \ + pngrtran.obj \ + pngrutil.obj \ + pngset.obj \ + pngtrans.obj \ + pngwio.obj \ + pngwrite.obj \ + pngwtran.obj \ + pngwutil.obj + +LIBOBJS = \ + +png.obj \ + +pngerror.obj \ + +pngget.obj \ + +pngmem.obj \ + +pngpread.obj \ + +pngread.obj \ + +pngrio.obj \ + +pngrtran.obj \ + +pngrutil.obj \ + +pngset.obj \ + +pngtrans.obj \ + +pngwio.obj \ + +pngwrite.obj \ + +pngwtran.obj \ + +pngwutil.obj + +LIBNAME=libpng$(MODEL).lib + +## Implicit rules + +# Braces let make "batch" calls to the compiler, +# 2 calls instead of 12; space is important. +.c.obj: + $(CC) $(CFLAGS) -c {$*.c } + +.c.exe: + $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB) + +## Major targets + +all: libpng pngtest + +# try !inlude scripts\pnglibconf.mak for more options +pnglibconf.h: scripts\pnglibconf.h.prebuilt + copy scripts\pnglibconf.h.prebuilt $@ + +libpng: $(LIBNAME) + +pngtest: pngtest$(MODEL).exe + +test: pngtest$(MODEL).exe + pngtest$(MODEL) + +## Minor Targets + +png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.obj: pngget.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.obj: pngmem.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.obj: pngpread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.obj: pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.obj: pngrio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.obj: pngrtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.obj: pngrutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.obj: pngset.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.obj: pngtrans.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.obj: pngwio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.obj: pngwrite.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.obj: pngwtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.obj: pngwutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +$(LIBNAME): $(OBJS) + -del $(LIBNAME) + $(LIB) $(LIBNAME) @&&| +$(LIBOBJS), libpng$(MODEL) +| + +pngtest$(MODEL).obj: pngtest.c png.h pngconf.h pnglibconf.h + $(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c + +pngtest$(MODEL).exe: pngtest$(MODEL).obj + $(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB) + +# Clean up anything else you want +clean: + -del pnglibconf.h + -del *.obj + -del *.exe + -del *.lib + -del *.lst + -del *.map + +# End of makefile for libpng diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.cegcc b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.cegcc new file mode 100644 index 0000000000..d13012d0d2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.cegcc @@ -0,0 +1,116 @@ +# Makefile for creating Windows CE release archives, with the +# mingw32ce compiler. + +# Last updated: 22-Jul-2008 + +# Copyright (C) 2008 Vincent Torri + +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# To get some help, type +# +# make help +# +# To create the archives +# +# make +# +# To remove everything, type: +# +# make clean + +VERMAJ = 1 +VERMIN = 6 +VERMIC = 2 +VER = $(VERMAJ).$(VERMIN).$(VERMIC) +NAME = libpng +PACKAGE = $(NAME)-$(VER) + +BIN = libpng16-0.dll +LIB = libpng16.a libpng16.dll.a libpng.a libpng.dll.a +INCLUDE = png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +PC = libpng16.pc libpng.pc + +MANIFESTVERBIN = "Libpng-$(VER): Binary files" +MANIFESTVERDEV = "Libpng-$(VER): Developer files" +MANIFESTVERDESC = "Libpng: the official PNG reference library" + +all: $(NAME) + +$(NAME): remove-old copy-src compilation copy manifest archive + @echo " * Removal of the directories" + @rm -rf $(PACKAGE)/ $(PACKAGE)-bin/ $(PACKAGE)-dev/ + +remove-old: + @echo " * Removal of the old files" + @rm -rf $(PACKAGE)-bin* + @rm -rf $(PACKAGE)-dev* + +copy-src: + @echo " * Copy of source files" + @cp -R ../src/$(PACKAGE) . + @echo " * Creation of directories and files" + @mkdir -p $(PACKAGE)-bin/bin + @mkdir -p $(PACKAGE)-bin/manifest + @mkdir -p $(PACKAGE)-dev/lib/pkgconfig + @mkdir -p $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN) + @mkdir -p $(PACKAGE)-dev/manifest + @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.mft + @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.ver + @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.mft + @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.ver + +compilation: + @echo " * Compilation of $(PACKAGE)" + cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_CONSOLE_IO_SUPPORTED -D_WIN32_WCE=0x0420" \ + CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" \ + LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" \ + ./configure --prefix=/opt/wince --host=arm-mingw32ce && make + +copy: + @echo " * Copy of binary and development files" + @for i in $(BIN); do \ + cp $(PACKAGE)/.libs/$$i $(PACKAGE)-bin/bin; \ + done + @for i in $(LIB); do \ + cp $(PACKAGE)/.libs/$$i $(PACKAGE)-dev/lib; \ + done + @for i in $(INCLUDE); do \ + cp $(PACKAGE)/$$i $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN); \ + done + @for i in $(PC); do \ + cp $(PACKAGE)/$$i $(PACKAGE)-dev/lib/pkgconfig; \ + done + +manifest: + @echo " * Creation of the manifest" + @cd $(PACKAGE)-bin && find * >> manifest/$(PACKAGE)-bin.mft + @cd $(PACKAGE)-bin && \ + echo $(MANIFESTVERBIN) >> manifest/$(PACKAGE)-bin.ver && \ + echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-bin.ver + @cd $(PACKAGE)-dev && find * >> manifest/$(PACKAGE)-dev.mft + @cd $(PACKAGE)-dev && \ + echo $(MANIFESTVERDEV) >> manifest/$(PACKAGE)-dev.ver && \ + echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-dev.ver + +archive: + @echo " * Creation of the archives" + @tar cf $(PACKAGE)-bin.tar $(PACKAGE)-bin + @bzip2 -9 $(PACKAGE)-bin.tar + @tar cf $(PACKAGE)-dev.tar $(PACKAGE)-dev + @bzip2 -9 $(PACKAGE)-dev.tar + +clean: + @echo " * Cleaning" + @rm -rf $(PACKAGE)* + +help: + @echo + @echo "To create the archives, type:" + @echo " make" + @echo + @echo "To remove everything, type:" + @echo " make clean" + @echo diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.darwin b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.darwin new file mode 100644 index 0000000000..814fef5025 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.darwin @@ -0,0 +1,218 @@ +# makefile for libpng on Darwin / Mac OS X +# Copyright (C) 2002, 2004, 2006, 2008, 2010-2011 Glenn Randers-Pehrson +# Copyright (C) 2001 Christoph Pfisterer +# derived from makefile.linux: +# Copyright (C) 1998, 1999 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# where "make install" puts libpng.a, libpng16.dylib, png.h, pngconf.h, +# and pnglibconf.h +prefix=/usr/local +exec_prefix=$(prefix) + +# Where the zlib library and include files are located +ZLIBLIB=/usr/lib +ZLIBINC=/usr/include + +# Library name: +LIBNAME = libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).dylib +LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib +LIBSOREL=$(LIBNAME).$(PNGMAJ).$(RELEASE).dylib +OLDSO=libpng.dylib + +# Utilities: +CC=cc +AR_RC=ar rc +MKDIR_P=mkdir -p +LN_SF=ln -sf +RANLIB=ranlib +RM_F=/bin/rm -f +ARCH=-arch ppc -arch i386 -arch x86_64 + +# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops +CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops $(ARCH) +LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz $(ARCH) + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -fno-common -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) + $(CC) -dynamiclib \ + -install_name $(LIBPATH)/$(LIBSOMAJ) \ + -current_version 16 -compatibility_version 16 \ + $(ARCH) -o $(LIBSOMAJ) \ + $(OBJSDLL) -L$(ZLIBLIB) -lz + +pngtest: pngtest.o $(LIBSO) + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + $(RANLIB) $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL) + chmod 755 $(DL)/$(LIBSOMAJ) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtestd pngtest.png + +test-installed: + $(CC) $(CFLAGS) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ + libpng.pc $(LIBNAME).*dylib pngtesti pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.dec b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.dec new file mode 100644 index 0000000000..79e3724740 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.dec @@ -0,0 +1,202 @@ +# makefile for libpng on DEC Alpha Unix +# Copyright (C) 2000-2002, 2006, 2010-2011 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Library name: +PNGMAJ = 16 +LIBNAME = libpng16 + +# Shared library names: +LIBSO=$(LIBNAME).so +LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.so + +# Utilities: +AR_RC=ar rc +CC=cc +MKDIR_P=mkdir +LN_SF=ln -f -s +RANLIB=ranlib +RM_F=/bin/rm -f + +# where make install puts libpng.a and png.h +prefix=/usr/local +exec_prefix=$(prefix) +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1 +LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo ccopts=\"-std\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJS) + $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ + -soname $(LIBSOMAJ) + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); $(LN_SF)(LIBNAME) libpng; $(LN_SF)(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); $(LN_SF)(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF)(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -w1 -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtestd pngtest.png + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -w1 -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -R$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBSO) $(LIBSOMAJ)* \ + libpng.pc pnglibconf.h + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.dj2 b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.dj2 new file mode 100644 index 0000000000..ad117bc5e2 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.dj2 @@ -0,0 +1,62 @@ +# DJGPP (DOS gcc) makefile for libpng +# Copyright (C) 2002, 2006, 2009-2010-2011 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# where make install will put libpng.a and png.h +#prefix=/usr/local +prefix=. +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +CC=gcc +CFLAGS=-I../zlib -O -DPNG_NO_SNPRINTF +LDFLAGS=-L. -L../zlib/ -lpng -lz -lm + +RANLIB=ranlib + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \ + pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + coff2exe pngtest + +test: pngtest + ./pngtest +clean: + rm -f *.o libpng.a pngtest pngout.png pnglibconf.h + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.elf b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.elf new file mode 100644 index 0000000000..15a8ee67b0 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.elf @@ -0,0 +1,263 @@ +# makefile for libpng.a and libpng16.so on Linux ELF with gcc +# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2011 Greg Roelofs +# and Glenn Randers-Pehrson +# Copyright (C) 1996, 1997 Andreas Dilger +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Modified for Debian by Junichi Uekawa and Josselin Mouette +# Major modifications are: +# * link libpng explicitly with libz and libm +# * $(OLDSO).16 is a symlink rather than a different library +# * versioned symbols + +# Library name: +LIBNAME = libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).so +LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.so +OLDSOMAJ=libpng.so.16 + +# Utilities: +AR_RC=ar rc +CC=gcc +MKDIR_P=mkdir -p +LN_SF=ln -sf +RANLIB=ranlib +RM_F=/bin/rm -f + +# where "make install" puts libpng16.a, libpng16.so*, +# libpng16/png.h, libpng16/pngconf.h, and libpng16/pnglibconf.h +# Prefix must be a full pathname. +prefix=/usr/local +exec_prefix=$(prefix) + +# Where the zlib library and include files are located. +ZLIBLIB=/usr/local/lib +ZLIBINC=/usr/local/include +# ZLIBLIB=../zlib +# ZLIBINC=../zlib + +ALIGN= +# for i386: +#ALIGN=-malign-loops=2 -malign-functions=2 + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion + +# for pgcc version 2.95.1, -O3 is buggy; don't use it. + +CFLAGS=-W -Wall -D_REENTRANT -O2 \ + $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 + +LDFLAGS=-L. -lpng16 +LDFLAGS_A=libpng.a -lz -lm +LIBADDFLAGS=-lz -lm + + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng.syms: png.h pngconf.h pnglibconf.h + $(CC) $(CFLAGS) -E -DPNG_BUILDSYMS -DPNG_INTERNAL png.h |\ + awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG16_%s {global:\n",PNGMAJ)}\ + { for (i=1;i+2<=NF;++i)\ + if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\ + print $$(i+1) ";";\ + for (i=1;i+1<=NF;++i)\ + if ($$(i)=="PNG_DATA_EXPORT")\ + print $$(i+1) ";";}\ + END{print "local: *; };"}' >$@.new + $(RM_F) $@ + mv $@.new $@ + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"\"; \ + echo R_opts=\"\"; \ + echo libs=\"-lpng16\"; \ + echo all_libs=\"-lpng16 $(LIBADDFLAGS)\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) libpng.syms + $(CC) -shared -Wl,-soname,$(LIBSOMAJ) \ + -Wl,-version-script,libpng.syms \ + -o $(LIBSOMAJ) \ + $(OBJSDLL) + +pngtest: pngtest.o $(LIBSO) + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +pngtest-static: pngtest.o libpng.a + $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A) + +test: pngtest pngtest-static + @echo "" + @echo " Running pngtest dynamically linked with $(LIBSO):" + @echo "" + LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" ./pngtest + @echo "" + @echo " Running pngtest statically linked with libpng.a:" + @echo "" + ./pngtest-static + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtestd pngtest.png + +test-installed: + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a libpng.syms pngtest pngout.png libpng-config \ + $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ + libpng.pc pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.freebsd b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.freebsd new file mode 100644 index 0000000000..0ddf4ae4aa --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.freebsd @@ -0,0 +1,61 @@ +# makefile for libpng under FreeBSD +# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +PREFIX?= /usr/local +SHLIB_VER?= 16 + +LIB= png +SHLIB_MAJOR= ${SHLIB_VER} +SHLIB_MINOR= 0 +NO_PROFILE= YES +NO_OBJ= YES + +# where make install puts libpng.a and png.h +DESTDIR= ${PREFIX} +LIBDIR= /lib +INCS= png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +INCSDIR= /include/libpng +INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk +MAN= libpng.3 libpngpf.3 png.5 +MANDIR= /man/man +SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \ + libpng/pngconf.h ${INCSDIR}/../pngconf.h \ + libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h + +# where make install finds libz.a and zlib.h +ZLIBLIB= /usr/lib +ZLIBINC= /usr/include + +LDADD+= -lm -lz +#LDADD+= -lm -lz -lssp_nonshared # for OSVERSION < 800000 ? + +DPADD+= ${LIBM} ${LIBZ} + +CFLAGS+= -I. -I${ZLIBINC} + +SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ + pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ + pngwtran.c pngmem.c pngerror.c pngpread.c + +pngtest: pngtest.o libpng.a + ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \ + -lpng ${LDADD} + +CLEANFILES= pngtest pngtest.o pngout.png + +test: pngtest + ./pngtest + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +.include diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.gcc b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.gcc new file mode 100644 index 0000000000..94349fbf1c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.gcc @@ -0,0 +1,87 @@ +# makefile for libpng using gcc (generic, static library) +# Copyright (C) 2008 Glenn Randers-Pehrson +# Copyright (C) 2000 Cosmin Truta +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Location of the zlib library and include files +ZLIBINC = ../zlib +ZLIBLIB = ../zlib + +# Compiler, linker, lib and other tools +CC = gcc +LD = $(CC) +AR_RC = ar rcs +RANLIB = ranlib +RM_F = rm -f + +CDEBUG = -g -DPNG_DEBUG=5 +LDDEBUG = +CRELEASE = -O2 +LDRELEASE = -s +#CFLAGS = -W -Wall $(CDEBUG) +CFLAGS = -W -Wall $(CRELEASE) +#LDFLAGS = $(LDDEBUG) +LDFLAGS = $(LDRELEASE) +LIBS = -lz -lm + +# File extensions +O=.o +A=.a +EXE= + +# Variables +OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ + pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ + pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) + +# Targets +all: static + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +.c$(O): + $(CC) -c $(CFLAGS) -I$(ZLIBINC) $< + +static: libpng$(A) pngtest$(EXE) + +shared: + @echo This is a generic makefile that cannot create shared libraries. + @echo Please use a configuration that is specific to your platform. + @false + +libpng$(A): $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +test: pngtest$(EXE) + ./pngtest$(EXE) + +pngtest$(EXE): pngtest$(O) libpng$(A) + $(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS) + +clean: + $(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png pnglibconf.h + +png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest$(O): png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.hp64 b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.hp64 new file mode 100644 index 0000000000..bf51962471 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.hp64 @@ -0,0 +1,224 @@ +# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. +# Copyright (C) 1999-2002, 2006, 2009, 2010-2011 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42 +# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Where the zlib library and include files are located +ZLIBLIB=/opt/zlib/lib +ZLIBINC=/opt/zlib/include + +# Note that if you plan to build a libpng shared library, zlib must also +# be a shared library, which zlib's configure does not do. After running +# zlib's configure, edit the appropriate lines of makefile to read: +# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \ +# LDSHARED=ld -b +# SHAREDLIB=libz.sl + +# Library name: +LIBNAME = libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).sl +LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.sl + +# Utilities: +AR_RC=ar rc +CC=cc +MKDIR_P=mkdir -p +LN_SF=ln -sf +RANLIB=ranlib +RM_F=/bin/rm -f + +CFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \ +-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP +# Caution: be sure you have built zlib with the same CFLAGS. +CCFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \ +-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP + +LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm + +# where make install puts libpng.a, libpng16.sl, and png.h +prefix=/opt/libpng +exec_prefix=$(prefix) +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) +z -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) + $(LD) -b +s \ + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtestd pngtest.png + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) $(CCFLAGS) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBSO) $(LIBSOMAJ)* \ + libpng.pc pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.hpgcc b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.hpgcc new file mode 100644 index 0000000000..bf44d2262c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.hpgcc @@ -0,0 +1,230 @@ +# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker. +# Copyright (C) 2002, 2006-2008, 2010-2011 Glenn Randers-Pehrson +# Copyright (C) 2001, Laurent faillie +# Copyright (C) 1998, 1999 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Library name: +LIBNAME = libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).sl +LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.sl + +# Utilities: +CC=gcc +LD=ld +AR_RC=ar rc +MKDIR_P=mkdir -p +LN_SF=ln -sf +RANLIB=ranlib +RM_F=/bin/rm -f + +# where "make install" puts libpng.a, $(OLDSO)*, png.h, pngconf.h +# and pnglibconf.h +prefix=/usr/local +exec_prefix=$(prefix) + +# Where the zlib library and include files are located +ZLIBLIB=/opt/zlib/lib +ZLIBINC=/opt/zlib/include + +# Note that if you plan to build a libpng shared library, zlib must also +# be a shared library, which zlib's configure does not do. After running +# zlib's configure, edit the appropriate lines of makefile to read: +# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \ +# LDSHARED=ld -b +# SHAREDLIB=libz.sl + +ALIGN= +# for i386: +#ALIGN=-malign-loops=2 -malign-functions=2 + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion + +# for pgcc version 2.95.1, -O3 is buggy; don't use it. + +CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \ + $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 +#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm +LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) + $(LD) -b +s \ + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) + +pngtest: pngtest.o $(LIBSO) + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtestd pngtest.png + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBSO) $(LIBSOMAJ)* \ + libpng.pc pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.hpux b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.hpux new file mode 100644 index 0000000000..1c2970b7f8 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.hpux @@ -0,0 +1,221 @@ +# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. +# Copyright (C) 1999-2002, 2006, 2010-2011 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42 +# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Where the zlib library and include files are located +ZLIBLIB=/opt/zlib/lib +ZLIBINC=/opt/zlib/include + +# Note that if you plan to build a libpng shared library, zlib must also +# be a shared library, which zlib's configure does not do. After running +# zlib's configure, edit the appropriate lines of makefile to read: +# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \ +# LDSHARED=ld -b +# SHAREDLIB=libz.sl + +# Library name: +LIBNAME = libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).sl +LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.sl + +# Utilities: +AR_RC=ar rc +CC=cc +MKDIR_P=mkdir -p +LN_SF=ln -sf +RANLIB=ranlib +RM_F=/bin/rm -f + +# where make install puts libpng.a, libpng16.sl, and png.h +prefix=/opt/libpng +exec_prefix=$(prefix) +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0 +# Caution: be sure you have built zlib with the same CFLAGS. +CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) +z -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) + $(LD) -b +s \ + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtestd pngtest.png + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) $(CCFLAGS) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBSO) $(LIBSOMAJ)* \ + libpng.pc pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.ibmc b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.ibmc new file mode 100644 index 0000000000..a19090dfe9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.ibmc @@ -0,0 +1,82 @@ +# Makefile for libpng (static) +# IBM C version 3.x for Win32 and OS/2 +# Copyright (C) 2006 Glenn Randers-Pehrson +# Copyright (C) 2000 Cosmin Truta +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h +# +# Notes: +# Derived from makefile.std +# All modules are compiled in C mode +# Tested under Win32, expected to work under OS/2 +# Can be easily adapted for IBM VisualAge/C++ for AIX + +# Location of the zlib library and include files +ZLIBINC = ../zlib +ZLIBLIB = ../zlib + +# Compiler, linker, lib and other tools +CC = icc +LD = ilink +AR = ilib +RM = del + +CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3 +LDFLAGS = + +# File extensions +O=.obj +A=.lib +E=.exe + +# Variables +OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ + pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ + pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) + +LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A) + +# Targets +all: libpng$(A) pngtest$(E) + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng$(A): $(OBJS) + $(AR) -out:$@ $(OBJS) + +test: pngtest$(E) + pngtest$(E) + +pngtest: pngtest$(E) + +pngtest$(E): pngtest$(O) libpng$(A) + $(LD) $(LDFLAGS) pngtest$(O) $(LIBS) + +clean: + $(RM) *$(O) + $(RM) libpng$(A) + $(RM) pnglibconf.h + $(RM) pngtest$(E) + $(RM) pngout.png + +png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest$(O): png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.intel b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.intel new file mode 100644 index 0000000000..3a45014cf3 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.intel @@ -0,0 +1,110 @@ +# Makefile for libpng +# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later + +# Copyright (C) 2006 Glenn Randers-Pehrson +# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is +# copyright 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h +# +# To use, do "nmake /f scripts\makefile.intel" +# +# ------------------- Intel C/C++ Compiler 4.0 and later ------------------- + +# Where the zlib library and include files are located +ZLIBLIB=..\zlib +ZLIBINC=..\zlib + +# Target CPU +CPU=6 # Pentium II +#CPU=5 # Pentium + +# Calling convention +CALLING=r # __fastcall +#CALLING=z # __stdcall +#CALLING=d # __cdecl + +# Uncomment next to put error messages in a file +#ERRFILE=>>pngerrs + +# -------------------------------------------------------------------------- + +CC=icl -c +CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) -nologo +LD=link +LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO + +O=.obj + +OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \ +pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) \ +pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) + +all: test + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +libpng.lib: $(OBJS) + if exist libpng.lib del libpng.lib + lib /NOLOGO /OUT:libpng.lib $(OBJS) + +pngtest.exe: pngtest.obj libpng.lib + $(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib + +pngtest$(O): png.h pngconf.h pnglibconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +test: pngtest.exe + pngtest.exe + + +# End of makefile for libpng diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.knr b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.knr new file mode 100644 index 0000000000..e2d2d4e591 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.knr @@ -0,0 +1,109 @@ +# makefile for libpng +# Copyright (C) 2002, 2006, 2009 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h +# +# This makefile requires the file ansi2knr.c, which you can get +# from the Ghostscript ftp site at ftp://ftp.cs.wisc.edu/ghost/ +# If you have libjpeg, you probably already have ansi2knr.c in the jpeg +# source distribution. + +# where make install puts libpng.a and png.h +prefix=/usr/local +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +CC=cc +CFLAGS=-I../zlib -O +LDFLAGS=-L. -L../zlib/ -lpng -lz -lm +# flags for ansi2knr +ANSI2KNRFLAGS= + +RANLIB=ranlib +#RANLIB=echo + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: ansi2knr libpng.a pngtest + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +# general rule to allow ansi2knr to work +.c.o: + ./ansi2knr $*.c T$*.c + $(CC) $(CFLAGS) -c T$*.c + rm -f T$*.c $*.o + mv T$*.o $*.o + +ansi2knr: ansi2knr.c + $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c + +libpng.a: ansi2knr $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install: libpng.a png.h pngconf.h pnglibconf.h + -@mkdir $(DESTDIR)$(INCPATH) + -@mkdir $(DESTDIR)$(INCPATH)/libpng + -@mkdir $(DESTDIR)$(LIBPATH) + -@rm -f $(DESTDIR)$(INCPATH)/png.h + -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h + cp png.h $(DESTDIR)$(INCPATH)/libpng + cp pngconf.h $(DESTDIR)$(INCPATH)/libpng + cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng + chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h + (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) + cp libpng.a $(DESTDIR)$(LIBPATH) + chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a + +clean: + rm -f *.o libpng.a pngtest pngout.png ansi2knr pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.linux b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.linux new file mode 100644 index 0000000000..3a13f0c37d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.linux @@ -0,0 +1,239 @@ +# makefile for libpng.a and libpng16.so on Linux ELF with gcc +# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2011 Greg Roelofs and +# Glenn Randers-Pehrson +# Copyright (C) 1996, 1997 Andreas Dilger +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Library name: +LIBNAME = libpng16 +PNGMAJ = 16 +RELEASE = 2 + +# Shared library names: +LIBSO=$(LIBNAME).so +LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.so + +# Utilities: +AR_RC=ar rc +CC=gcc +MKDIR_P=mkdir -p +LN_SF=ln -sf +RANLIB=ranlib +RM_F=/bin/rm -f + +# where "make install" puts libpng16.a, libpng16.so*, +# libpng16/png.h, libpng16/pngconf.h, and libpng16/pnglibconf.h +# Prefix must be a full pathname. +prefix=/usr/local +exec_prefix=$(prefix) + +# Where the zlib library and include files are located. +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +ALIGN= +# for i386: +#ALIGN=-malign-loops=2 -malign-functions=2 + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion + +# for pgcc version 2.95.1, -O3 is buggy; don't use it. + +CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops \ + $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 + +LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng16 -lz -lm +LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) + $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) + +pngtest: pngtest.o $(LIBSO) + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +pngtest-static: pngtest.o libpng.a + $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A) + +test: pngtest pngtest-static + @echo "" + @echo " Running pngtest dynamically linked with $(LIBSO):" + @echo "" + ./pngtest + @echo "" + @echo " Running pngtest statically linked with libpng.a:" + @echo "" + ./pngtest-static + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtestd pngtest.png + +test-installed: + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ + $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ + libpng.pc pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.mips b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.mips new file mode 100644 index 0000000000..d6a5cc31b4 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.mips @@ -0,0 +1,94 @@ +# makefile for libpng +# Copyright (C) Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# where make install puts libpng.a and png.h +prefix=/usr/local +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +CC=cc +CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips +#CFLAGS=-O +LDFLAGS=-L. -L../zlib/ -lpng -lz -lm + +#RANLIB=ranlib +RANLIB=echo + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install: libpng.a + -@mkdir $(DESTDIR)$(INCPATH) + -@mkdir $(DESTDIR)$(INCPATH)/libpng + -@mkdir $(DESTDIR)$(LIBPATH) + -@rm -f $(DESTDIR)$(INCPATH)/png.h + -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h + -@rm -f $(DESTDIR)$(INCPATH)/pnglibconf.h + cp png.h $(DESTDIR)$(INCPATH)/libpng + cp pngconf.h $(DESTDIR)$(INCPATH)/libpng + cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng + chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h + (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) + cp libpng.a $(DESTDIR)$(LIBPATH) + chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a + +clean: + rm -f *.o libpng.a pngtest pngout.png pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.msc b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.msc new file mode 100644 index 0000000000..e3ad73e757 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.msc @@ -0,0 +1,95 @@ +# makefile for libpng +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# Copyright (C) 2006, 2009 Glenn Randers-Pehrson +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h +# +# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib + +# -------- Microsoft C 5.1 and later, does not use assembler code -------- +MODEL=L +CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib +#-Ox generates bad code with MSC 5.1 +CC=cl +LD=link +LDFLAGS=/e/st:0x1500/noe +O=.obj + +#uncomment next to put error messages in a file +ERRFILE= >> pngerrs + +# variables +OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) +OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) +OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) + +all: libpng.lib + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) + del libpng.lib + lib libpng $(OBJS1); + lib libpng $(OBJS2); + lib libpng $(OBJS3); + +pngtest$(O): png.h pngconf.h pnglibconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngtest.exe: pngtest.obj libpng.lib + $(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ; + +test: pngtest.exe + pngtest + +# End of makefile for libpng + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.msys b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.msys new file mode 100644 index 0000000000..fc76184b41 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.msys @@ -0,0 +1,204 @@ +# makefile for libpng using MSYS/gcc (shared, static library) +# Copyright (C) 2012 Glenn Randers-Pehrson and Christopher M. Wheeler +# +# Portions taken from makefile.linux: +# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2011 Greg Roelofs and +# Glenn Randers-Pehrson +# Copyright (C) 2000 Cosmin Truta +# Copyright (C) 1996, 1997 Andreas Dilger +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h +# # # # # # # # # # # # # # # # # +prefix=/usr/local +exec_prefix=$(prefix) + +# Library name: +LIBNAME = libpng16 +PNGMAJ = 16 +RELEASE = 2 + +# Shared library names: +LIBSO=$(LIBNAME).dll +LIBSOMAJ=$(LIBNAME).dll.$(PNGMAJ) +LIBSOREL=$(PNGMAJ).$(RELEASE) +OLDSO=libpng.dll + +# Where the zlib library and include files are located. +#ZLIBLIB=../zlib +#ZLIBINC=../zlib +ZLIBLIB=/usr/local/lib +ZLIBINC=/usr/local/include + +# Compiler, linker, lib and other tools +CC = gcc +LD = $(CC) +AR_RC = ar rcs +RANLIB = ranlib +RM_F = rm -rf +MKDIR_P=mkdir -p +LN_SF=ln -sf + +#ARCH = -march=pentium3 +#ARCH = -march=i686 +ARCH = +CDEBUG = -g -DPNG_DEBUG=5 +LDDEBUG = +CRELEASE = -O2 +LDRELEASE = -s +#CFLAGS = -W -Wall $(CDEBUG) +CFLAGS = -W -Wall $(CRELEASE) $(ARCH) +#LDFLAGS = $(LDDEBUG) +LDFLAGS = $(LDRELEASE) +LIBS = -lz -lm + +# File extensions +O=.o +A=.a +EXE=.exe + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. + +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +# Variables +OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ + pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ + pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) + +# Targets +all: static shared + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +.c$(O): + $(CC) -c $(CFLAGS) -I$(ZLIBINC) $< + +static: libpng$(A) pngtest$(EXE) + +shared: $(LIBSOMAJ) + $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSO) + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): + $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOMAJ) + +libpng$(A): $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSO) $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +test: pngtest$(EXE) + ./pngtest$(EXE) + +pngtest$(EXE): pngtest$(O) libpng$(A) + $(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS) + +clean: + $(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png pnglibconf.h $(LIBSO) \ + $(LIBSOMAJ) libpng-config + +png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest$(O): png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.ne12bsd b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.ne12bsd new file mode 100644 index 0000000000..086decf1a1 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.ne12bsd @@ -0,0 +1,50 @@ +# makefile for libpng for NetBSD for the standard +# make obj && make depend && make && make test +# make includes && make install +# Copyright (C) 2002 Patrick R.L. Welche +# Copyright (C) 2007, 2009 Glenn Randers-Pehrson +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# You should also run makefile.netbsd + +LOCALBASE?=/usr/local +LIBDIR= ${LOCALBASE}/lib +MANDIR= ${LOCALBASE}/man +INCSDIR=${LOCALBASE}/include/libpng16 + +LIB= png16 +SHLIB_MAJOR= 0 +SHLIB_MINOR= 1.6.2 +SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ + pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ + pngwtran.c pngmem.c pngerror.c pngpread.c +INCS= png.h pngconf.h pnglibconf.h +MAN= libpng.3 libpngpf.3 png.5 + +CPPFLAGS+=-I${.CURDIR} + +# We should be able to do something like this instead of the manual +# uncommenting, but it core dumps for me at the moment: +# .if ${MACHINE_ARCH} == "i386" +# MKLINT= no +# .endif + +CLEANFILES+=pngtest.o pngtest pnglibconf.h + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +pngtest.o: pngtest.c + ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} + +pngtest: pngtest.o libpng.a + ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm + +test: pngtest + cd ${.CURDIR} && ${.OBJDIR}/pngtest + +.include diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.netbsd b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.netbsd new file mode 100644 index 0000000000..04ddf6d0da --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.netbsd @@ -0,0 +1,50 @@ +# makefile for libpng for NetBSD for the standard +# make obj && make depend && make && make test +# make includes && make install +# Copyright (C) 2002 Patrick R.L. Welche +# Copyright (C) 2007-2009 Glenn Randers-Pehrson +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# You should also run makefile.ne16bsd + +LOCALBASE?=/usr/local +LIBDIR= ${LOCALBASE}/lib +MANDIR= ${LOCALBASE}/man +INCSDIR=${LOCALBASE}/include + +LIB= png +SHLIB_MAJOR= 16 +SHLIB_MINOR= 1.6.2 +SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ + pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ + pngwtran.c pngmem.c pngerror.c pngpread.c +INCS= png.h pngconf.h pnglibconf.h +MAN= libpng.3 libpngpf.3 png.5 + +CPPFLAGS+=-I${.CURDIR} + +# We should be able to do something like this instead of the manual +# uncommenting, but it core dumps for me at the moment: +# .if ${MACHINE_ARCH} == "i386" +# MKLINT= no +# .endif + +CLEANFILES+=pngtest.o pngtest pnglibconf.h + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +pngtest.o: pngtest.c + ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} + +pngtest: pngtest.o libpng.a + ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm + +test: pngtest + cd ${.CURDIR} && ${.OBJDIR}/pngtest + +.include diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.openbsd b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.openbsd new file mode 100644 index 0000000000..60265589c6 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.openbsd @@ -0,0 +1,82 @@ +# makefile for libpng +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# Copyright (C) 2007-2009 Glenn Randers-Pehrson +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +PREFIX?= /usr/local +LIBDIR= ${PREFIX}/lib +MANDIR= ${PREFIX}/man/cat + +SHLIB_MAJOR= 16 +SHLIB_MINOR= 1.6.2 + +LIB= png +SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ + pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \ + pngwio.c pngwrite.c pngwtran.c pngwutil.c + +HDRS= png.h pngconf.h pnglibconf.h + +CFLAGS+= -W -Wall +CPPFLAGS+= -I${.CURDIR} + +NOPROFILE= Yes + +CLEANFILES+= pngtest.o pngtest pnglibconf.h + +MAN= libpng.3 libpngpf.3 png.5 +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \ + libpng-manual.txt + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +pngtest.o: pngtest.c + ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} + +pngtest: pngtest.o + ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm + +test: pngtest + cd ${.OBJDIR} && env \ + LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest + +beforeinstall: + if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \ + fi + if [ ! -d ${DESTDIR}${LIBDIR} ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \ + fi + if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \ + fi + if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \ + fi + if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \ + fi + if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \ + fi + +afterinstall: + @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a + @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a + @rm -f ${DESTDIR}${PREFIX}/include/png.h + @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h + @rm -f ${DESTDIR}${PREFIX}/include/pnglibconf.h + @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true + ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ + -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include + ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ + -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include + ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ + -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png + +.include diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sco b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sco new file mode 100644 index 0000000000..c5f254f6ea --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sco @@ -0,0 +1,218 @@ +# makefile for SCO OSr5 ELF and Unixware 7 with Native cc +# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx +# force ELF build dynamic linking, SONAME setting in lib and RPATH in app +# Copyright (C) 2002, 2006, 2010-2011 Glenn Randers-Pehrson +# Copyright (C) 1998 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Library name: +LIBNAME = libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).so +LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.so + +# Utilities: +CC=cc +AR_RC=ar rc +MKDIR_P=mkdir +LN_SF=ln -f -s +RANLIB=echo +RM_F=/bin/rm -f + +# where make install puts libpng.a, $(OLDSO)*, and png.h +prefix=/usr/local +exec_prefix=$(prefix) + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +CFLAGS= -dy -belf -I$(ZLIBINC) -O3 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng16 -lz -lm + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo ccopts=\"-belf\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) + $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOMAJ) \ + $(OBJSDLL) + +pngtest: pngtest.o $(LIBSO) + LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + -@$(RM_F) $(DI)/png.h + -@$(RM_F) $(DI)/pngconf.h + -@$(RM_F) $(DI)/pnglibconf.h + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) $(CFLAGS) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtestd pngtest.png + +test-installed: + $(CC) $(CFLAGS) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ + $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ + pnglibconf.h libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sggcc b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sggcc new file mode 100644 index 0000000000..7c427bea65 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sggcc @@ -0,0 +1,228 @@ +# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc' +# Copyright (C) 2001-2002, 2006, 2010-2011 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Library name: +LIBNAME=libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).so +LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.so + +# Utilities: +AR_RC=ar rc +CC=gcc +MKDIR_P=mkdir -p +LN_SF=ln -sf +RANLIB=echo +RM_F=/bin/rm -f + +# Where make install puts libpng.a, libpng16.so, and libpng16/png.h +# Prefix must be a full pathname. + +prefix=/usr/local +exec_prefix=$(prefix) + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib32 +#ZLIBINC=/usr/local/include +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +# ABI can be blank to use default for your system, -32, -o32, -n32, or -64 +# See "man abi". zlib must be built with the same ABI. +ABI= + +WARNMORE= # -g -DPNG_DEBUG=5 +CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32 +LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm +LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ + -set_version sgi$(PNGMAJ).0 +# See "man dso" for info about shared objects + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +#LIBPATH=$(exec_prefix)/lib32 +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest shared libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +shared: $(LIBSOMAJ) + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo ccopts=\"$(ABI)\"; \ + echo cppflags=\"\"; \ + echo ldopts=\"$(ABI)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libdir=\"$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJS) + $(LDSHARED) -o $@ $(OBJS) + $(RM_F) $(LIBSO) $(LIBSOMAJ) + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + echo + echo Testing local static library. + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) \ + -rpath $(ZLIBLIB):$(DL) \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtestd pngtest.png + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtesti pngtest.png + +clean: + $(RM_F) libpng.a pngtest pngtesti pngout.png libpng.pc \ + so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sgi b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sgi new file mode 100644 index 0000000000..f40461e33e --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sgi @@ -0,0 +1,229 @@ +# makefile for libpng.a and libpng16.so, SGI IRIX with 'cc' +# Copyright (C) 2001-2002, 2006, 2007, 2010-2011 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Library name: +LIBNAME=libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).so +LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.so + +# Utilities: +AR_RC=ar rc +CC=cc +MKDIR_P=mkdir -p +LN_SF=ln -sf +RANLIB=echo +RM_F=/bin/rm -f + +# Where make install puts libpng.a, libpng16.so, and libpng16/png.h +# Prefix must be a full pathname. + +prefix=/usr/local +exec_prefix=$(prefix) + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib32 +#ZLIBINC=/usr/local/include +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +# ABI can be blank to use default for your system, -32, -o32, -n32, or -64 +# See "man abi". zlib must be built with the same ABI. +ABI= + +WARNMORE=-fullwarn +# Note: -KPIC is the default anyhow +#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC # -g -DPNG_DEBUG=5 +CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) +LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng16 -lz -lm +LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm +LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ + -set_version sgi$(PNGMAJ).0 +# See "man dso" for info about shared objects + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +#LIBPATH=$(exec_prefix)/lib32 +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest shared libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo ccopts=\"$(ABI)\"; \ + echo ldopts=\"$(ABI)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libdir=\"$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJS) + $(LDSHARED) -o $@ $(OBJS) + $(RM_F) $(LIBSO) $(LIBSOMAJ) + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + echo + echo Testing local static library. + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(DL) -L$(ZLIBLIB) \ + -rpath $(ZLIBLIB):$(DL) \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtestd pngtest.png + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ + $(LIBSO) $(LIBSOMAJ)* \ + so_locations pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.so9 b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.so9 new file mode 100644 index 0000000000..a7773d1837 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.so9 @@ -0,0 +1,239 @@ +# makefile for libpng on Solaris 9 (beta) with Forte cc +# Updated by Chad Schrock for Solaris 9 +# Contributed by William L. Sebok, based on makefile.linux +# Copyright (C) 2002, 2006, 2008, 2010-2011 Glenn Randers-Pehrson +# Copyright (C) 1998-2001 Greg Roelofs +# Copyright (C) 1996-1997 Andreas Dilger +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Library name: +PNGMAJ = 16 +LIBNAME = libpng16 + +# Shared library names: +LIBSO=$(LIBNAME).so +LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.so + +# Utilities: +# gcc 2.95 doesn't work. +CC=cc +AR_RC=ar rc +MKDIR_P=mkdir -p +LN_SF=ln -f -s +RANLIB=echo +RM_F=/bin/rm -f + +# Where make install puts libpng.a, $(OLDSO)*, and png.h +prefix=/usr/local +exec_prefix=$(prefix) + +# Where the zlib library and include files are located +# Changing these to ../zlib poses a security risk. If you want +# to have zlib in an adjacent directory, specify the full path instead of "..". +#ZLIBLIB=../zlib +#ZLIBINC=../zlib +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +#Use the preinstalled zlib that comes with Solaris 9: +ZLIBLIB=/usr/lib +ZLIBINC=/usr/include + +#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion +#CFLAGS=-I$(ZLIBINC) -W -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -DPNG_NO_MMX_CODE +CFLAGS=-I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE +LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-R$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) + @case "`type ld`" in *ucb*) \ + echo; \ + echo '## WARNING:'; \ + echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ + echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ + echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ + echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ + echo '## at all. If it is, things are likely to break because of'; \ + echo '## the libucb dependency that is created.'; \ + echo; \ + ;; \ + esac + $(LD) -G -h $(LIBSOMAJ) \ + -o $(LIBSOMAJ) $(OBJSDLL) + +pngtest: pngtest.o $(LIBSO) + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \ + -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) + ./pngtestd pngtest.png + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \ + -L$(ZLIBLIB) -R$(ZLIBLIB) + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBSO) $(LIBSOMAJ)* \ + libpng.pc pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.solaris b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.solaris new file mode 100644 index 0000000000..be423a184c --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.solaris @@ -0,0 +1,236 @@ +# makefile for libpng on Solaris 2.x with gcc +# Copyright (C) 2004, 2006-2008, 2010-2011 Glenn Randers-Pehrson +# Contributed by William L. Sebok, based on makefile.linux +# Copyright (C) 1998 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Library name: +LIBNAME = libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).so +LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.so + +# Utilities: +AR_RC=ar rc +CC=gcc +MKDIR_P=mkdir -p +LN_SF=ln -f -s +RANLIB=echo +RM_F=/bin/rm -f + +# Where make install puts libpng.a, libpng16.so*, and png.h +prefix=/usr/local +exec_prefix=$(prefix) + +# Where the zlib library and include files are located +# Changing these to ../zlib poses a security risk. If you want +# to have zlib in an adjacent directory, specify the full path instead of "..". +#ZLIBLIB=../zlib +#ZLIBINC=../zlib + +ZLIBLIB=/usr/local/lib +ZLIBINC=/usr/local/include + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion +CFLAGS=-I$(ZLIBINC) -W -Wall -O \ + # $(WARNMORE) -g -DPNG_DEBUG=5 +LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo cppflags=\"\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-R$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) + @case "`type ld`" in *ucb*) \ + echo; \ + echo '## WARNING:'; \ + echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ + echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ + echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ + echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ + echo '## at all. If it is, things are likely to break because of'; \ + echo '## the libucb dependency that is created.'; \ + echo; \ + ;; \ + esac + $(LD) -G -h $(LIBSOMAJ) \ + -o $(LIBSOMAJ) $(OBJSDLL) + +pngtest: pngtest.o $(LIBSO) + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \ + -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) + ./pngtestd pngtest.png + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \ + -L$(ZLIBLIB) -R$(ZLIBLIB) + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBSO) $(LIBSOMAJ)* \ + libpng.pc pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.solaris-x86 b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.solaris-x86 new file mode 100644 index 0000000000..d41e659c56 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.solaris-x86 @@ -0,0 +1,236 @@ +# makefile for libpng on Solaris 2.x with gcc +# Copyright (C) 2004, 2006-2008, 2010-2011 Glenn Randers-Pehrson +# Contributed by William L. Sebok, based on makefile.linux +# Copyright (C) 1998 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger + +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# Library name: +LIBNAME = libpng16 +PNGMAJ = 16 + +# Shared library names: +LIBSO=$(LIBNAME).so +LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) +OLDSO=libpng.so + +# Utilities: +AR_RC=ar rc +CC=gcc +MKDIR_P=mkdir -p +LN_SF=ln -f -s +RANLIB=echo +RM_F=/bin/rm -f + +# Where make install puts libpng.a, libpng16.so*, and png.h +prefix=/usr/local +exec_prefix=$(prefix) + +# Where the zlib library and include files are located +# Changing these to ../zlib poses a security risk. If you want +# to have zlib in an adjacent directory, specify the full path instead of "..". +#ZLIBLIB=../zlib +#ZLIBINC=../zlib + +ZLIBLIB=/usr/local/lib +ZLIBINC=/usr/local/include + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion +CFLAGS=-I$(ZLIBINC) -W -Wall -O \ + # $(WARNMORE) -g -DPNG_DEBUG=5 +LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng16 -lz -lm + +INCPATH=$(prefix)/include +LIBPATH=$(exec_prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(exec_prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c + +all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ + -e s!@exec_prefix@!$(exec_prefix)! \ + -e s!@libdir@!$(LIBPATH)! \ + -e s!@includedir@!$(INCPATH)! \ + -e s!-lpng16!-lpng16\ -lz\ -lm! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo cppflags=\""; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-R$(LIBPATH)\"; \ + echo libs=\"-lpng16 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBSO): $(LIBSOMAJ) + $(LN_SF) $(LIBSOMAJ) $(LIBSO) + +$(LIBSOMAJ): $(OBJSDLL) + @case "`type ld`" in *ucb*) \ + echo; \ + echo '## WARNING:'; \ + echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ + echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ + echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ + echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ + echo '## at all. If it is, things are likely to break because of'; \ + echo '## the libucb dependency that is created.'; \ + echo; \ + ;; \ + esac + $(LD) -G -h $(LIBSOMAJ) \ + -o $(LIBSOMAJ) $(OBJSDLL) + +pngtest: pngtest.o $(LIBSO) + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h pnglibconf.h + -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi + cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h + -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h + -@$(RM_F) $(DI)/libpng + (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@$(RM_F) $(DL)/libpng.a + (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) + (cd $(DL); \ + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi + -@$(RM_F) $(DM)/man3/libpng.3 + -@$(RM_F) $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi + -@$(RM_F) $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi + -@$(RM_F) $(DB)/libpng-config + -@$(RM_F) $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. Use test-dd to test it +# before then. + +test-dd: + echo + echo Testing installed dynamic shared library in $(DL). + $(CC) -I$(DI) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \ + -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) + ./pngtestd pngtest.png + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ + -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \ + -L$(ZLIBLIB) -R$(ZLIBLIB) + ./pngtesti pngtest.png + +clean: + $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBSO) $(LIBSOMAJ)* \ + libpng.pc pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.std b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.std new file mode 100644 index 0000000000..419eeedf29 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.std @@ -0,0 +1,124 @@ +# makefile for libpng +# Copyright (C) 2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# where make install puts libpng.a and png.h +prefix=/usr/local +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +CC=cc +AR_RC=ar rc +MKDIR_P=mkdir +LN_SF=ln -sf +RANLIB=ranlib +RM_F=rm -f +AWK = awk +SED = sed +CPP = $(CC) -E +ECHO = echo + +DFNFLAGS = # DFNFLAGS contains -D options to use in the libpng build +DFA_EXTRA = # extra files that can be used to control configuration +CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest + +# The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt, +# copy this if the following doesn't work. +pnglibconf.h: pnglibconf.dfn + $(RM_F) $@ pnglibconf.c pnglibconf.out pnglibconf.tmp + $(ECHO) '#include "pnglibconf.dfn"' >pnglibconf.c + $(ECHO) "If '$(CC) -E' crashes try /lib/cpp (e.g. CPP='/lib/cpp')" >&2 + $(CPP) $(DFNFLAGS) pnglibconf.c >pnglibconf.out + $(AWK) -f "scripts/dfn.awk" out="pnglibconf.tmp" pnglibconf.out 1>&2 + mv pnglibconf.tmp $@ + +pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA) + $(RM_F) $@ pnglibconf.pre pnglibconf.tmp + $(ECHO) "Calling $(AWK) from scripts/pnglibconf.mak" >&2 + $(ECHO) "If 'awk' crashes try a better awk (e.g. AWK='nawk')" >&2 + $(AWK) -f scripts/options.awk out="pnglibconf.pre"\ + version=search pngconf.h scripts/pnglibconf.dfa\ + pngusr.dfa $(DFA_XTRA) 1>&2 + $(AWK) -f scripts/options.awk out="pnglibconf.tmp" pnglibconf.pre 1>&2 + mv pnglibconf.tmp $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install: libpng.a pnglibconf.h + -@$(MKDIR_P) $(DESTDIR)$(INCPATH) + -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng + -@$(MKDIR_P) $(DESTDIR)$(LIBPATH) + -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h + -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h + -@$(RM_F) $(DESTDIR)$(INCPATH)/pnglibconf.h + cp png.h $(DESTDIR)$(INCPATH)/libpng + cp pngconf.h $(DESTDIR)$(INCPATH)/libpng + cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng + chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h + (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) + cp libpng.a $(DESTDIR)$(LIBPATH) + chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a + +clean: + $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.* + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sunos b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sunos new file mode 100644 index 0000000000..c1d0165056 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.sunos @@ -0,0 +1,107 @@ +# makefile for libpng +# Copyright (C) 2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# where make install puts libpng.a and png.h +prefix=/usr/local +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes + +CC=gcc +AR_RC=ar rc +MKDIR_P=mkdir -p +LN_SF=ln -f -s +RANLIB=ranlib +RM_F=/bin/rm -f + +CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +libpng.a: $(OBJS) + $(AR_RC) $@ $(OBJS) + $(RANLIB) $@ + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install: libpng.a + -@$(MKDIR_P) $(DESTDIR)$(INCPATH) + -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng + -@$(MKDIR_P) $(DESTDIR)$(LIBPATH) + -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h + -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h + -@$(RM_F) $(DESTDIR)$(INCPATH)/pnglibconf.h + cp png.h $(DESTDIR)$(INCPATH)/libpng + cp pngconf.h $(DESTDIR)$(INCPATH)/libpng + cp pnglibconf.h $(DESTDIR)$(INCPATH)/libpng + chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pnglibconf.h + (cd $(DESTDIR)$(INCPATH); $(LN_SF) libpng/* .) + cp libpng.a $(DESTDIR)$(LIBPATH) + chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a + +clean: + $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + +pngtest.o: png.h pngconf.h pnglibconf.h diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.tc3 b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.tc3 new file mode 100644 index 0000000000..a046bf6ab9 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.tc3 @@ -0,0 +1,93 @@ +# Makefile for libpng +# TurboC/C++ (Note: All modules are compiled in C mode) + +# To use, do "make -fmakefile.tc3" + +# ----- Turbo C 3.00 (can be modified to work with earlier versions) ----- + +MODEL=l +CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib +#CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00 +CC=tcc +LD=tcc +LIB=tlib +LDFLAGS=-m$(MODEL) -L..\zlib +O=.obj +E=.exe + +# variables +OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) +OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) +OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) +OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O) +OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O) +OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O) + +all: libpng$(MODEL).lib pngtest$(E) + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts/pnglibconf.h.prebuilt + cp scripts/pnglibconf.h.prebuilt $@ + +pngtest: pngtest$(E) + +test: pngtest$(E) + pngtest$(E) + +png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngtest$(O): png.h pngconf.h pnglibconf.h + $(CC) -c $(CFLAGS) $*.c + +pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c + +libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3) + $(LIB) libpng$(MODEL) +$(OBJSL1) + $(LIB) libpng$(MODEL) +$(OBJSL2) + $(LIB) libpng$(MODEL) +$(OBJSL3) + +pngtest$(E): pngtest$(O) libpng$(MODEL).lib + $(LD) $(LDFLAGS) pngtest.obj libpng$(MODEL).lib zlib_$(MODEL).lib + +# End of makefile for libpng diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.vcwin32 b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.vcwin32 new file mode 100644 index 0000000000..3ca7a01148 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makefile.vcwin32 @@ -0,0 +1,108 @@ +# makefile for libpng +# Copyright (C) 1998 Tim Wegner +# Copyright (C) 2006,2009,2011 Glenn Randers-Pehrson +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h +# +# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib +# To use, do "nmake /f scripts\makefile.vcwin32" + +# -------- Microsoft Visual C++ 2.0 and later, no assembler code -------- + +# Compiler, linker, librarian, and other tools +CC = cl +LD = link +AR = lib +CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -MD -O2 -W3 -I..\zlib +LDFLAGS = -nologo +ARFLAGS = -nologo +RM = del + +# File extensions +O=.obj + +#uncomment next to put error messages in a file +#ERRFILE= >> pngerrs.log + +# Variables +OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) +OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) +OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) +OBJS = $(OBJS1) $(OBJS2) $(OBJS3) + +# Targets +all: libpng.lib + +# see scripts/pnglibconf.mak for more options +pnglibconf.h: scripts\pnglibconf.h.prebuilt + copy scripts\pnglibconf.h.prebuilt $@ + +png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +libpng.lib: $(OBJS) + -$(RM) $@ + $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE) + +pngtest$(O): png.h pngconf.h pnglibconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngtest.exe: pngtest$(O) libpng.lib + $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE) + +test: pngtest.exe + pngtest + +clean: + -$(RM) *$(O) + -$(RM) libpng.lib + -$(RM) pnglibconf.h + -$(RM) pngtest.exe + -$(RM) pngout.png + +# End of makefile for libpng + diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makevms.com b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makevms.com new file mode 100644 index 0000000000..6928553570 --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/makevms.com @@ -0,0 +1,142 @@ +$! make libpng under VMS +$! +$! +$! Check for MMK/MMS +$! +$! This procedure accepts one parameter (contrib), which causes it to build +$! the programs from the contrib directory instead of libpng. +$! +$ p1 = f$edit(p1,"UPCASE") +$ if p1 .eqs. "CONTRIB" +$ then +$ set def [.contrib.gregbook] +$ @makevms +$ set def [-.pngminus] +$ @makevms +$ set def [--] +$ exit +$ endif +$ Make = "" +$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" +$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK" +$! +$! Look for the compiler used +$! +$ zlibsrc = "[-.zlib]" +$ ccopt="/include=''zlibsrc'" +$ if f$getsyi("HW_MODEL").ge.1024 +$ then +$ ccopt = "/prefix=all"+ccopt +$ comp = "__decc__=1" +$ if f$trnlnm("SYS").eqs."" then define sys sys$library: +$ else +$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" +$ then +$ if f$trnlnm("SYS").eqs."" then define sys sys$library: +$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs."" +$ then +$ comp = "__gcc__=1" +$ CC :== GCC +$ else +$ comp = "__vaxc__=1" +$ endif +$ else +$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: +$ ccopt = "/decc/prefix=all"+ccopt +$ comp = "__decc__=1" +$ endif +$ endif +$! +$! Build the thing plain or with mms/mmk +$! +$ write sys$output "Compiling Libpng sources ..." +$ if make.eqs."" +$ then +$ dele pngtest.obj;* +$ CALL MAKE png.OBJ "cc ''CCOPT' png" - + png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngset.OBJ "cc ''CCOPT' pngset" - + pngset.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngget.OBJ "cc ''CCOPT' pngget" - + pngget.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngread.OBJ "cc ''CCOPT' pngread" - + pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" - + pngpread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngrtran.OBJ "cc ''CCOPT' pngrtran" - + pngrtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngrutil.OBJ "cc ''CCOPT' pngrutil" - + pngrutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngerror.OBJ "cc ''CCOPT' pngerror" - + pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngmem.OBJ "cc ''CCOPT' pngmem" - + pngmem.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngrio.OBJ "cc ''CCOPT' pngrio" - + pngrio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngwio.OBJ "cc ''CCOPT' pngwio" - + pngwio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngtrans.OBJ "cc ''CCOPT' pngtrans" - + pngtrans.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngwrite.OBJ "cc ''CCOPT' pngwrite" - + pngwrite.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngwtran.OBJ "cc ''CCOPT' pngwtran" - + pngwtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ CALL MAKE pngwutil.OBJ "cc ''CCOPT' pngwutil" - + pngwutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h +$ write sys$output "Building Libpng ..." +$ CALL MAKE libpng.OLB "lib/crea libpng.olb *.obj" *.OBJ +$ write sys$output "Building pngtest..." +$ CALL MAKE pngtest.OBJ "cc ''CCOPT' pngtest" - + pngtest.c png.h pngconf.h pnglibconf.h +$ call make pngtest.exe - + "LINK pngtest,libpng.olb/lib,''zlibsrc'libz.olb/lib" - + pngtest.obj libpng.olb +$ write sys$output "Testing Libpng..." +$ run pngtest +$ else +$ if f$search("DESCRIP.MMS") .eqs. "" then copy/nolog [.SCRIPTS]DESCRIP.MMS [] +$ 'make'/macro=('comp',zlibsrc='zlibsrc') +$ endif +$ write sys$output "Libpng build completed" +$ exit +$! +$! +$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES +$ V = 'F$Verify(0) +$! P1 = What we are trying to make +$! P2 = Command to make it +$! P3 - P8 What it depends on +$ +$ If F$Search(P1) .Eqs. "" Then Goto Makeit +$ Time = F$CvTime(F$File(P1,"RDT")) +$arg=3 +$Loop: +$ Argument = P'arg +$ If Argument .Eqs. "" Then Goto Exit +$ El=0 +$Loop2: +$ File = F$Element(El," ",Argument) +$ If File .Eqs. " " Then Goto Endl +$ AFile = "" +$Loop3: +$ OFile = AFile +$ AFile = F$Search(File) +$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl +$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit +$ Goto Loop3 +$NextEL: +$ El = El + 1 +$ Goto Loop2 +$EndL: +$ arg=arg+1 +$ If arg .Le. 8 Then Goto Loop +$ Goto Exit +$ +$Makeit: +$ VV=F$VERIFY(0) +$ write sys$output P2 +$ 'P2 +$ VV='F$Verify(VV) +$Exit: +$ If V Then Set Verify +$ENDSUBROUTINE diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/options.awk b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/options.awk new file mode 100755 index 0000000000..c3a850173d --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/options.awk @@ -0,0 +1,893 @@ +#!/bin/awk -f +# scripts/options.awk - library build configuration control +# +# last changed in libpng version 1.5.7 - December 15, 2011 +# +# Copyright (c) 1998-2011 Glenn Randers-Pehrson +# +# This code is released under the libpng license. +# For conditions of distribution and use, see the disclaimer +# and license in png.h + +# The output of this script is written to the file given by +# the variable 'out'. The script is run twice, once with +# an intermediate output file, 'options.tmp' then again on +# that file to produce the final output: +# +# awk -f scripts/options.awk out=options.tmp scripts/options.dfa 1>&2 +# awk -f scripts/options.awk out=options.dfn options.tmp 1>&2 +# +# Some options may be specified on the command line: +# +# deb=1 Causes debugging to be output +# logunsupported=1 Causes all options to be recorded in the output +# everything=off Causes all options to be disabled by default +# everything=on Causes all options to be enabled by default +# +# If awk fails on your platform, try nawk instead. +# +# These options may also be specified in the original input file (and +# are copied to the preprocessed file). + +BEGIN{ + out="" # intermediate, preprocessed, file + pre=-1 # preprocess (first line) + version="libpng version unknown" # version information + version_file="" # where to find the version + err=0 # in-line exit sets this + # The following definitions prevent the C preprocessor noticing the lines + # that will be in the final output file. Some C preprocessors tokenise + # the lines, for example by inserting spaces around operators, and all + # C preprocessors notice lines that start with '#', most remove comments. + # The technique adopted here is to make the final output lines into + # C strings (enclosed in double quotes), preceeded by PNG_DFN. As a + # consequence the output cannot contain a 'raw' double quote - instead put + # @' in, this will be replaced by a single " afterward. See the parser + # script dfn.awk for more capabilities (not required here). Note that if + # you need a " in a 'setting' in pnglibconf.dfa it must also be @'! + dq="@'" # For a single double quote + start=" PNG_DFN \"" # Start stuff to output (can't contain a "!) + end="\" " # End stuff to output + subs="@\" " # Substitute start (substitute a C macro) + sube=" \"@" # Substitute end + comment=start "/*" # Comment start + cend="*/" end # Comment end + def=start "#define PNG_" # Arbitrary define + sup="_SUPPORTED" end # end supported option + und=comment "#undef PNG_" # Unsupported option + une="_SUPPORTED" cend # end unsupported option + error=start "ERROR:" # error message, terminate with 'end' + + # Variables + deb=0 # debug - set on command line + everything="" # do not override defaults + logunsupported=0 # write unsupported options too + + # Precreate arrays + # for each option: + option[""] = "" # list of all options: default enabled/disabled + done[""] = 1 # marks option as having been output + requires[""] = "" # requires by option + iffs[""] = "" # if by option + enabledby[""] = "" # options that enable it by option + sets[""] = "" # settings set by each option + setval[""] = "" # value to set (indexed: 'option sets[option]') + # for each setting: + setting[""] = "" # requires by setting + defaults[""] = "" # used for a defaulted value + doneset[""] = 1 # marks setting as having been output + r[""] = "" # Temporary array + + # For decorating the output file + protect = "" +} + +# The output file must be specified before any input: +out == "" { + print "out=output.file must be given on the command line" + err = 1 + exit 1 +} + +# The very first line indicates whether we are reading pre-processed +# input or not, this must come *first* because 'PREPROCESSED' needs +# to be the very first line in the temporary file. +pre == -1{ + if ($0 == "PREPROCESSED") { + pre = 0 + next + } else { + pre = 1 + print "PREPROCESSED" >out + # And fall through to continue processing + } +} + +# While pre-processing if version is set to "search" look for a version string +# in the following file. +pre && version == "search" && version_file == ""{ + version_file = FILENAME +} + +pre && version == "search" && version_file != FILENAME{ + print "version string not found in", version_file + err = 1 + exit 1 +} + +pre && version == "search" && $0 ~ /^ \* libpng version/{ + version = substr($0, 4) + print "version =", version >out + next +} + +pre && FILENAME == version_file{ + next +} + +# variable=value +# Sets the given variable to the given value (the syntax is fairly +# free form, except for deb (you are expected to understand how to +# set the debug variable...) +# +# This happens before the check on 'pre' below skips most of the +# rest of the actions, so the variable settings happen during +# preprocessing but are recorded in the END action too. This +# allows them to be set on the command line too. +$0 ~ /^[ ]*version[ ]*=/{ + sub(/^[ ]*version[ ]*=[ ]*/, "") + version = $0 + next +} +$0 ~ /^[ ]*everything[ =]*off[ ]*$/{ + everything = "off" + next +} +$0 ~ /^[ ]*everything[ =]*on[ ]*$/{ + everything = "on" + next +} +$0 ~ /^[ ]*logunsupported[ =]*0[ ]*$/{ + logunsupported = 0 + next +} +$0 ~ /^[ ]*logunsupported[ =]*1[ ]*$/{ + logunsupported = 1 + next +} +$1 == "deb" && $2 == "=" && NF == 3{ + deb = $3 + next +} + +# Preprocessing - this just copies the input file with lines +# that need preprocessing (just chunk at present) expanded +# The bare "pre" instead of "pre != 0" crashes under Sunos awk +pre && $1 != "chunk"{ + print >out + next +} + +# The first characters of the line determine how it is processed, +# leading spaces are ignored. In general tokens that are not +# keywords are the names of options. An option 'name' is +# controlled by the definition of the corresponding macros: +# +# PNG_name_SUPPORTED The option is turned on +# PNG_NO_name +# PNG_NO_name_SUPPORTED If the first macro is not defined +# either of these will turn the option off +# +# If none of these macros are defined the option is turned on, unless +# the keyword 'off' is given in a line relating to the option. The +# keyword 'on' can also be given, but it will be ignored (since it is +# the default.) +# +# In the syntax below a 'name' is indicated by "NAME", other macro +# values are indicated by "MACRO", as with "NAME" the leading "PNG_" +# is omitted, but in this case the "NO_" prefix and the "_SUPPORTED" +# suffix are never used. +# +# Each line is introduced by a keyword - the first non-space characters +# on the line. A line starting with a '#' is a comment - it is totally +# ignored. Keywords are as follows, a NAME, is simply a macro name +# without the leading PNG_, PNG_NO_ or the trailing _SUPPORTED. + +$1 ~ /^#/ || $0 ~ /^[ ]*$/{ + next +} + +# com +# The whole line is placed in the output file as a comment with +# the preceding 'com' removed +$1 == "com"{ + if (NF > 1) { + # sub(/^[ ]*com[ ]*/, "") + $1 = "" + print comment $0, cend >out + } else + print start end >out + next +} + +# version +# Inserts a version comment +$1 == "version" && NF == 1{ + if (version == "") { + print "ERROR: no version string set" + err = 1 # prevent END{} running + exit 1 + } + + print comment, version, cend >out + next +} + +# file output input protect +# Informational: the official name of the input file (without +# make generated local directories), the official name of the +# output file and, if required, a name to use in a protection +# macro for the contents. +$1 == "file" && NF >= 2{ + print comment, $2, cend >out + print comment, "Machine generated file: DO NOT EDIT", cend >out + if (NF >= 3) + print comment, "Derived from:", $3, cend >out + protect = $4 + if (protect != "") { + print start "#ifndef", protect end >out + print start "#define", protect end >out + } + next +} + +# option NAME ( (requires|enables|if) NAME* | on | off | disabled | +# sets SETTING VALUE+ )* +# +# Declares an option 'NAME' and describes its default setting (disabled) +# and its relationship to other options. The option is disabled +# unless *all* the options listed after 'requires' are set and at +# least one of the options listed after 'if' is set. If the +# option is set then it turns on all the options listed after 'enables'. +# +# Note that "enables" takes priority over the required/if/disabled/off +# setting of the target option. +# +# The definition file may list an option as 'disabled': off by default, +# otherwise the option is enabled: on by default. A later (and it must +# be later) entry may turn an option on or off explicitly. + +$1 == "option" && NF >= 2{ + opt = $2 + sub(/,$/,"",opt) + onoff = option[opt] # records current (and the default is "", enabled) + key = "" + istart = 3 + do { + if (istart == 1) { # continuation line + val = getline + + if (val != 1) { # error reading it + if (val == 0) + print "option", opt ": ERROR: missing contination line" + else + print "option", opt ": ERROR: error reading continuation line" + + # This is a hard error + err = 1 # prevent END{} running + exit 1 + } + } + + for (i=istart; i<=NF; ++i) { + val=$(i) + sub(/,$/,"",val) + if (val == "on" || val == "off" || val == "disabled") { + key = "" + if (onoff != val) { + # on or off can zap disabled or enabled: + if (onoff == "" || (onoff == "disabled" || onoff == "enabled") && + (val == "on" || val == "off")) { + # It's easy to mis-spell the option when turning it + # on or off, so warn about it here: + if (onoff == "" && (val == "on" || val == "off")) { + print "option", opt ": ERROR: turning unrecognized option", val + # For the moment error out - it is safer + err = 1 # prevent END{} running + exit 1 + } + onoff = val + } else { + # Print a message, otherwise the error + # below is incomprehensible + print "option", opt ": currently", onoff ": attempt to turn", val + break + } + } + } else if (val == "requires" || val == "if" || val == "enables" || val =="sets") { + key = val + } else if (key == "requires") { + requires[opt] = requires[opt] " " val + } else if (key == "if") { + iffs[opt] = iffs[opt] " " val + } else if (key == "enables") { + enabledby[val] = enabledby[val] " " opt + } else if (key == "sets") { + sets[opt] = sets[opt] " " val + key = "setval" + set = val + } else if (key == "setval") { + setval[opt " " set] = setval[opt " " set] " " val + } else + break # bad line format + } + + istart = 1 + } while (i > NF && $0 ~ /,$/) + + if (i > NF) { + # Set the option, defaulting to 'enabled' + if (onoff == "") onoff = "enabled" + option[opt] = onoff + next + } + # Else fall through to the error handler +} + +# chunk NAME [requires OPT] [enables LIST] [on|off|disabled] +# Expands to the 'option' settings appropriate to the reading and +# writing of an ancilliary PNG chunk 'NAME': +# +# option READ_NAME requires READ_ANCILLARY_CHUNKS [READ_OPT] +# option READ_NAME enables NAME LIST +# [option READ_NAME off] +# option WRITE_NAME requires WRITE_ANCILLARY_CHUNKS [WRITE_OPT] +# option WRITE_NAME enables NAME LIST +# [option WRITE_NAME off] + +pre != 0 && $1 == "chunk" && NF >= 2{ + # 'chunk' is handled on the first pass by writing appropriate + # 'option' lines into the intermediate file. + opt = $2 + sub(/,$/,"",opt) + onoff = "" + reqread = "" + reqwrite = "" + enables = "" + req = 0 + istart = 3 + do { + if (istart == 1) { # continuation line + val = getline + + if (val != 1) { # error reading it + if (val == 0) + print "chunk", opt ": ERROR: missing contination line" + else + print "chunk", opt ": ERROR: error reading continuation line" + + # This is a hard error + err = 1 # prevent END{} running + exit 1 + } + } + + # read the keywords/additional OPTS + for (i=istart; i<=NF; ++i) { + val = $(i) + sub(/,$/,"",val) + if (val == "on" || val == "off" || val == "disabled") { + if (onoff != val) { + if (onoff == "") + onoff = val + else + break # on/off conflict + } + req = 0 + } else if (val == "requires") + req = 1 + else if (val == "enables") + req = 2 + else if (req == 1){ + reqread = reqread " READ_" val + reqwrite = reqwrite " WRITE_" val + } else if (req == 2) + enables = enables " " val + else + break # bad line: handled below + } + + istart = 1 + } while (i > NF && $0 ~ /,$/) + + if (i > NF) { + # Output new 'option' lines to the intermediate file (out) + print "option READ_" opt, "requires READ_ANCILLARY_CHUNKS" reqread, "enables", opt enables , onoff >out + print "option WRITE_" opt, "requires WRITE_ANCILLARY_CHUNKS" reqwrite, "enables", opt enables, onoff >out + next + } + # Else hit the error handler below - bad line format! +} + +# setting MACRO ( requires MACRO* )* [ default VALUE ] +# Behaves in a similar way to 'option' without looking for NO_ or +# _SUPPORTED; the macro is enabled if it is defined so long as all +# the 'requires' macros are also defined. The definitions may be +# empty, an error will be issued if the 'requires' macros are +# *not* defined. If given the 'default' value is used if the +# macro is not defined. The default value will be re-tokenised. +# (BTW: this is somewhat restrictive, it mainly exists for the +# support of non-standard configurations and numeric parameters, +# see the uses in scripts/options.dat + +$1 == "setting" && (NF == 2 || NF >= 3 && ($3 == "requires" || $3 == "default")){ + reqs = "" + deflt = "" + isdef = 0 + key = "" + for (i=3; i<=NF; ++i) + if ($(i) == "requires" || $(i) == "default") { + key = $(i) + if (key == "default") isdef = 1 + } else if (key == "requires") + reqs = reqs " " $(i) + else if (key == "default") + deflt = deflt " " $(i) + else + break # Format error, handled below + + setting[$2] = reqs + # NOTE: this overwrites a previous value silently + if (isdef && deflt == "") + deflt = " " # as a flag to force output + defaults[$2] = deflt + next +} + +# The order of the dependency lines (option, chunk, setting) is irrelevant +# - the 'enables', 'requires' and 'if' settings will be used to determine +# the correct order in the output and the final values in pnglibconf.h are +# not order dependent. 'requires' and 'if' entries take precedence over +# 'enables' from other options; if an option requires another option it +# won't be set regardless of any options that enable it unless the other +# option is also enabled. +# +# Similarly 'enables' trumps a NO_ definition in CFLAGS or pngusr.h +# +# For simplicity cycles in the definitions are regarded as errors, +# even if they are not ambiguous. +# A given NAME can be specified in as many 'option' lines as required, the +# definitions are additive. + +# For backwards compatibility equivalent macros may be listed thus: +# +# = [NO_]NAME MACRO +# Makes -DMACRO equivalent to -DPNG_NO_NAME or -DPNG_NAME_SUPPORTED +# as appropriate. +# +# The definition is injected into the C compiler input when encountered +# in the second pass (so all these definitions appear *after* the @ +# lines!) +# +# 'NAME' is as above, but 'MACRO' is the full text of the equivalent +# old, deprecated, macro. + +$1 == "=" && NF == 3{ + print "#ifdef PNG_" $3 >out + if ($2 ~ /^NO_/) + print "# define PNG_" $2 >out + else + print "# define PNG_" $2 "_SUPPORTED" >out + print "#endif" >out + next +} + +# Lines may be injected into the C compiler input by preceding them +# with an "@" character. The line is copied with just the leading +# @ removed. + +$1 ~ /^@/{ + # sub(/^[ ]*@/, "") + $1 = substr($1, 2) + print >out + next +} + +# Check for unreognized lines, because of the preprocessing chunk +# format errors will be detected on the first pass independent of +# any other format errors. +{ + print "options.awk: bad line (" NR "):", $0 + err = 1 # prevent END{} running + exit 1 +} + +# For checking purposes names that start with "ok_" or "fail_" are +# not output to pnglibconf.h and must be either enabled or disabled +# respectively for the build to succeed. This allows interdependencies +# between options of the form "at least one of" or "at most one of" +# to be checked. For example: +# +# option FLOATING_POINT enables ok_math +# option FIXED_POINT enables ok_math +# This ensures that at least one of FLOATING_POINT and FIXED_POINT +# must be set for the build to succeed. +# +# option fail_math requires FLOATING_POINT FIXED_POINT +# This means the build will fail if *both* FLOATING_POINT and +# FIXED_POINT are set (this is an example; in fact both are allowed.) +# +# If all these options were given the build would require exactly one +# of the names to be enabled. + +END{ + # END{} gets run on an exit (a traditional awk feature) + if (err) exit 1 + + if (pre) { + # Record the final value of the variables + print "deb =", deb >out + if (everything != "") { + print "everything =", everything >out + } + print "logunsupported =", logunsupported >out + exit 0 + } + + # Do the options first (allowing options to set settings). The dependency + # tree is thus: + # + # name > name + # name requires name + # name if name + # name enabledby name + # + # First build a list 'tree' by option of all the things on which + # it depends. + print "" >out + print "/* OPTIONS */" >out + print comment, "options", cend >out + for (opt in enabledby) tree[opt] = 1 # may not be explicit options + for (opt in option) if (opt != "") { + o = option[opt] + # option should always be one of the following values + if (o != "on" && o != "off" && o != "disabled" && o != "enabled") { + print "internal option error (" o ")" + exit 1 + } + tree[opt] = "" # so unlisted options marked + } + for (opt in tree) if (opt != "") { + if (tree[opt] == 1) { + tree[opt] = "" + if (option[opt] != "") { + print "internal error (1)" + exit 1 + } + # Macros only listed in 'enables' remain off unless + # one of the enabling macros is on. + option[opt] = "disabled" + } + + split("", list) # clear 'list' + # Now add every requires, iffs or enabledby entry to 'list' + # so that we can add a unique list of requirements to tree[i] + split(requires[opt] iffs[opt] enabledby[opt], r) + for (i in r) list[r[i]] = 1 + for (i in list) tree[opt] = tree[opt] " " i + } + + # print the tree for extreme debugging + if (deb > 2) for (i in tree) if (i != "") print i, "depends-on" tree[i] + + # Ok, now check all options marked explicitly 'on' or 'off': + # + # If an option[opt] is 'on' then turn on all requires[opt] + # If an option[opt] is 'off' then turn off all enabledby[opt] + # + # Error out if we have to turn 'on' an 'off' option or vice versa. + npending = 0 + for (opt in option) if (opt != "") { + if (option[opt] == "on" || option[opt] == "off") { + pending[++npending] = opt + } + } + + err = 0 # set on error + while (npending > 0) { + opt = pending[npending--] + if (option[opt] == "on") { + nreqs = split(requires[opt], r) + for (j=1; j<=nreqs; ++j) { + if (option[r[j]] == "off") { + print "option", opt, "turned on, but requirement", r[j], "is turned off" + err = 1 + } else if (option[r[j]] != "on") { + option[r[j]] = "on" + pending[++npending] = r[j] + } + } + } else { + if (option[opt] != "off") { + print "internal error (2)" + exit 1 + } + nreqs = split(enabledby[opt], r) + for (j=1; j<=nreqs; ++j) { + if (option[r[j]] == "on") { + print "option", opt, "turned off, but enabled by", r[j], "which is turned on" + err = 1 + } else if (option[r[j]] != "off") { + option[r[j]] = "off" + pending[++npending] = r[j] + } + } + } + } + if (err) exit 1 + + # Sort options: + print "PNG_DFN_START_SORT 2" >out + + # option[i] is now the complete list of all the tokens we may + # need to output, go through it as above, depth first. + finished = 0 + while (!finished) { + finished = 1 + movement = 0 # done nothing + for (i in option) if (!done[i]) { + nreqs = split(tree[i], r) + if (nreqs > 0) { + for (j=1; j<=nreqs; ++j) if (!done[r[j]]) { + break + } + if (j<=nreqs) { + finished = 0 + continue # next option + } + } + + # All the requirements have been processed, output + # this option. An option is _SUPPORTED if: + # + # all 'requires' are _SUPPORTED AND + # at least one of the 'if' options are _SUPPORTED AND + # EITHER: + # The name is _SUPPORTED (on the command line) + # OR: + # an 'enabledby' is _SUPPORTED + # OR: + # NO_name is not defined AND + # the option is not disabled; an option is disabled if: + # option == off + # option == disabled && everything != on + # option == "" && everything == off + if (deb) print "option", i + print "" >out + print "/* option:", i, option[i] >out + print " * requires: " requires[i] >out + print " * if: " iffs[i] >out + print " * enabled-by:" enabledby[i] >out + print " * sets: " sets[i], "*/" >out + print "#undef PNG_on" >out + print "#define PNG_on 1" >out + + # requires + nreqs = split(requires[i], r) + for (j=1; j<=nreqs; ++j) { + print "#ifndef PNG_" r[j] "_SUPPORTED" >out + print "# undef PNG_on /*!" r[j] "*/" >out + # this error appears in the final output if something + # was switched 'on' but the processing above to force + # the requires did not work + if (option[i] == "on") { + print error, i, "requires", r[j] end >out + } + print "#endif" >out + } + + # if + nreqs = split(iffs[i], r) + print "#undef PNG_no_if" >out + if (nreqs > 0) { + print "/* if" iffs[i], "*/" >out + print "#define PNG_no_if 1" >out + for (j=1; j<=nreqs; ++j) { + print "#ifdef PNG_" r[j] "_SUPPORTED" >out + print "# undef PNG_no_if /*" r[j] "*/" >out + print "#endif" >out + } + print "#ifdef PNG_no_if /*missing if*/" >out + print "# undef PNG_on" >out + # There is no checking above for this, because we + # don't know which 'if' to choose, so whine about + # it here: + if (option[i] == "on") { + print error, i, "needs one of:", iffs[i] end >out + } + print "#endif" >out + } + + print "#ifdef PNG_on /*requires, if*/" >out + # enables + print "# undef PNG_not_enabled" >out + print "# define PNG_not_enabled 1" >out + print " /* enabled by" enabledby[i], "*/" >out + nreqs = split(enabledby[i], r) + for (j=1; j<=nreqs; ++j) { + print "#ifdef PNG_" r[j] "_SUPPORTED" >out + print "# undef PNG_not_enabled /*" r[j] "*/" >out + # Oops, probably not intended (should be factored + # out by the checks above). + if (option[i] == "off") { + print error, i, "enabled by:", r[j] end >out + } + print "#endif" >out + } + + print "# ifndef PNG_" i "_SUPPORTED /*!command line*/" >out + print "# ifdef PNG_not_enabled /*!enabled*/" >out + if (option[i] == "off" || option[i] == "disabled" && everything != "on" || option[i] == "enabled" && everything == "off") { + print "# undef PNG_on /*default off*/" >out + } else { + print "# ifdef PNG_NO_" i >out + print "# undef PNG_on /*turned off*/" >out + print "# endif" >out + print "# ifdef PNG_NO_" i "_SUPPORTED" >out + print "# undef PNG_on /*turned off*/" >out + print "# endif" >out + } + print "# endif /*!enabled*/" >out + print "# ifdef PNG_on" >out + # The _SUPPORTED macro must be defined so that dependent + # options output later work. + print "# define PNG_" i "_SUPPORTED" >out + print "# endif" >out + print "# endif /*!command line*/" >out + # If PNG_on is still set the option should be defined in + # pnglibconf.h + print "# ifdef PNG_on" >out + if (i ~ /^fail_/) { + print error, i, "is on: enabled by:" iffs[i] enabledby[i] ", requires" requires[i] end >out + } else if (i !~ /^ok_/) { + print def i sup >out + # Supported option, set required settings + nreqs = split(sets[i], r) + for (j=1; j<=nreqs; ++j) { + print "# ifdef PNG_set_" r[j] >out + # Some other option has already set a value: + print error, i, "sets", r[j] ": duplicate setting" end >out + print error, " previous value: " end "PNG_set_" r[j] >out + print "# else" >out + # Else set the default: note that this won't accept arbitrary + # values, the setval string must be acceptable to all the C + # compilers we use. That means it must be VERY simple; a number, + # a name or a string. + print "# define PNG_set_" r[j], setval[i " " r[j]] >out + print "# endif" >out + } + } + print "# endif /* definition */" >out + print "#endif /*requires, if*/" >out + if (logunsupported || i ~ /^ok_/) { + print "#ifndef PNG_on" >out + if (logunsupported) { + print und i une >out + } + if (i ~ /^ok_/) { + print error, i, "not enabled: requires:" requires[i] ", enabled by:" iffs[i] enabledby[i] end >out + } + print "#endif" >out + } + + done[i] = 1 + ++movement + } + + if (!finished && !movement) { + print "option: loop or missing option in dependency tree, cannot process:" + for (i in option) if (!done[i]) { + print " option", i, "depends on" tree[i], "needs:" + nreqs = split(tree[i], r) + if (nreqs > 0) for (j=1; j<=nreqs; ++j) if (!done[r[j]]) { + print " " r[j] + } + } + exit 1 + } + } + print "PNG_DFN_END_SORT" >out + print comment, "end of options", cend >out + + # Do the 'setting' values second, the algorithm the standard + # tree walk (O(1)) done in an O(2) while/for loop; interations + # settings x depth, outputing the deepest required macros + # first. + print "" >out + print "/* SETTINGS */" >out + print comment, "settings", cend >out + # Sort (in dfn.awk) on field 2, the setting name + print "PNG_DFN_START_SORT 2" >out + finished = 0 + while (!finished) { + finished = 1 + movement = 0 # done nothing + for (i in setting) if (!doneset[i]) { + nreqs = split(setting[i], r) + if (nreqs > 0) { + # By default assume the requires values are options, but if there + # is no option with that name check for a setting + for (j=1; j<=nreqs; ++j) if (option[r[j]] == "" && !doneset[r[j]]) { + break + } + if (j<=nreqs) { + finished = 0 + continue # try a different setting + } + } + + # All the requirements have been processed, output + # this setting. + if (deb) print "setting", i + deflt = defaults[i] + # Remove any spurious trailing spaces + sub(/ *$/,"",deflt) + # A leading @ means leave it unquoted so the preprocessor + # can substitute the build time value + if (deflt ~ /^ @/) + deflt = " " subs substr(deflt, 3) sube + print "" >out + print "/* setting: ", i >out + print " * requires:" setting[i] >out + print " * default: ", defaults[i] deflt, "*/" >out + for (j=1; j<=nreqs; ++j) { + if (option[r[j]] != "") + print "#ifndef PNG_" r[j] "_SUPPORTED" >out + else + print "#ifndef PNG_" r[j] >out + print error, i, "requires", r[j] end >out + print "# endif" >out + } + # The precedence is: + # + # 1) External definition; trumps: + # 2) Option 'sets' value; trumps: + # 3) Setting 'default' + # + print "#ifdef PNG_" i >out + # PNG_ is defined, so substitute the value: + print def i, subs "PNG_" i sube end >out + print "#else /* use default */" >out + print "# ifdef PNG_set_" i >out + # Value from an option 'sets' argument + print def i, subs "PNG_set_" i sube end >out + # This is so that subsequent tests on the setting work: + print "# define PNG_" i, "1" >out + if (defaults[i] != "") { + print "# else /*default*/" >out + print def i deflt end >out + print "# define PNG_" i, "1" >out + } + print "# endif /* defaults */" >out + print "#endif /* setting", i, "*/" >out + + doneset[i] = 1 + ++movement + } + + if (!finished && !movement) { + print "setting: loop or missing setting in 'requires', cannot process:" + for (i in setting) if (!doneset[i]) { + print " setting", i, "requires" setting[i] + } + exit 1 + } + } + print "PNG_DFN_END_SORT" >out + print comment, "end of settings", cend >out + + # Regular end - everything looks ok + if (protect != "") { + print start "#endif", "/*", protect, "*/" end >out + } +} diff --git a/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/pnglibconf.dfa b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/pnglibconf.dfa new file mode 100644 index 0000000000..c95b10255a --- /dev/null +++ b/3rdparty/wxwidgets3.0-3.0.1/src/png/scripts/pnglibconf.dfa @@ -0,0 +1,856 @@ +# scripts/pnglibconf.dfa - library build configuration control +# +@/*- pnglibconf.dfn intermediate file +@ * generated from scripts/pnglibconf.dfa +@ */ +# +com pnglibconf.h - library build configuration +com +version +com +com Copyright (c) 1998-2012 Glenn Randers-Pehrson +com +com This code is released under the libpng license. +com For conditions of distribution and use, see the disclaimer +com and license in png.h +com + +file pnglibconf.h scripts/pnglibconf.dfa PNGLCONF_H + +# This file is preprocessed by scripts/options.awk and the +# C compiler to generate 'pnglibconf.h' - a list of all the +# configuration options. The file lists the various options +# that can *only* be specified during the libpng build; +# pnglibconf.h freezes the definitions selected for the specific +# build. +# +# The syntax is detailed in scripts/options.awk; this is a summary +# only: +# +# setting [requires ...] [default] +# #define PNG_ /* value comes from current setting */ +# option [requires ...] [if ...] [enables ...] [disabled] +# #define PNG__SUPPORTED if the requirements are met and +# enable the other options listed +# chunk [requires ...] [enables ...] [disabled] +# Enable chunk processing for the given ancillary chunk; any +# 'requires something' expands to READ_something for read and +# WRITE_something for write, but the enables list members are +# used as given (e.g. enables GAMMA just expands to that on the +# correspond READ_name and WRITE_name lines.) +# +# "," may be used to separate options on an 'option' line and is ignored; it +# doesn't change the meaning of the line. (NOT setting, where "," becomes +# part of the setting!) A comma at the end of an option line causes a +# continuation (the next line is included in the option too.) +# +# Note that the 'on' and 'off' keywords, while valid on both option +# and chunk, should not be used in this file because they force the +# relevant options on or off. + +#---------------------------------------------------------------------- + +# The following setting, option and chunk values can all be changed +# while building libpng: +# +# setting: change 'setting' lines to fine tune library performance; +# changes to the settings don't affect the libpng API functionally +# +# option: change 'option' lines to remove or add capabilities from +# or to the library; options change the library API +# +# chunk: change 'chunk' lines to remove capabilities to process +# optional ('ancillary') chunks. This does not prevent PNG +# decoding but does change the libpng API because some chunks +# will be ignored. +# +# There are three ways of disabling features, in no particular order: +# +# 1) Create 'pngusr.h', enter the required private build information +# detailed below and #define PNG_NO_